[libterralib] 06/24: Imported Upstream version 3.3.1

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Sat Aug 1 23:04:20 UTC 2015


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository libterralib.

commit bccc215a78fb1e05ac481ce5f1458f0b0b15f111
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Sun Aug 2 00:54:09 2015 +0200

    Imported Upstream version 3.3.1
---
 examples/Debug/ijl15.dll                           |   Bin
 examples/Debug/libMySQL.dll                        |   Bin
 examples/Debug/libpq.dll                           |   Bin
 examples/Debug/msjava.dll                          |   Bin 0 -> 940304 bytes
 examples/Debug/oci.dll                             |   Bin
 examples/Debug/zlib.dll                            |   Bin
 examples/{Release/zlib.dll => Debug/zlib1.dll}     |   Bin
 examples/Makefile                                  |    45 +
 examples/Readme                                    |   113 +-
 examples/Release/ijl15.dll                         |   Bin 372736 -> 0 bytes
 examples/Release/libMySQL.dll                      |   Bin 925696 -> 0 bytes
 examples/Release/libpq.dll                         |   Bin 90112 -> 0 bytes
 examples/Release/oci.dll                           |   Bin 97280 -> 0 bytes
 examples/addGeomRepresentation/.cdtproject         |     0
 examples/addGeomRepresentation/.project            |    18 +-
 examples/addGeomRepresentation/Makefile            |    27 +-
 .../addGeomRepresentation.cpp                      |    12 +-
 .../addGeomRepresentation.dsp                      |     8 +-
 .../addGeomRepresentation.dsw                      |    49 +-
 .../addGeomRepresentation.pro                      |    41 +-
 .../addGeomRepresentation.sln                      |    46 +
 .../addGeomRepresentation.vcproj                   |   164 +
 examples/base/base.pro                             |    83 +
 examples/convertCoordinates/.cdtproject            |     0
 examples/convertCoordinates/.project               |    18 +-
 examples/convertCoordinates/Makefile               |    28 +-
 examples/convertCoordinates/convertCoordinates.cpp |     4 +-
 examples/convertCoordinates/convertCoordinates.dsp |     8 +-
 examples/convertCoordinates/convertCoordinates.dsw |    49 +-
 examples/convertCoordinates/convertCoordinates.pro |    44 +-
 examples/convertCoordinates/convertCoordinates.sln |    39 +
 .../convertCoordinates/convertCoordinates.vcproj   |   154 +
 examples/copyLayer/.cdtproject                     |     0
 examples/copyLayer/.project                        |     0
 examples/copyLayer/Makefile                        |    29 +-
 examples/copyLayer/copyLayer.cpp                   |     4 +-
 examples/copyLayer/copyLayer.dsp                   |     8 +-
 examples/copyLayer/copyLayer.dsw                   |    49 +-
 examples/copyLayer/copyLayer.pro                   |    56 +-
 examples/copyLayer/copyLayer.sln                   |    45 +
 examples/copyLayer/copyLayer.vcproj                |   229 +
 examples/createCoverage/createCoverage.cpp         |   314 +
 examples/createCoverage/createCoverage.sln         |    50 +
 examples/createCoverage/createCoverage.vcproj      |   162 +
 examples/createDatabase/.cdtproject                |     0
 examples/createDatabase/.project                   |    18 +-
 examples/createDatabase/Makefile                   |    24 +-
 examples/createDatabase/createDatabase.cpp         |    13 +-
 examples/createDatabase/createDatabase.dsp         |     8 +-
 examples/createDatabase/createDatabase.dsw         |    62 +-
 examples/createDatabase/createDatabase.pro         |    44 +-
 examples/createDatabase/createDatabase.sln         |    50 +
 examples/createDatabase/createDatabase.vcproj      |   139 +
 examples/createLayer/.cdtproject                   |     0
 examples/createLayer/.project                      |     0
 examples/createLayer/Makefile                      |    29 +-
 examples/createLayer/createLayer.cpp               |     5 +-
 examples/createLayer/createLayer.dsp               |     8 +-
 examples/createLayer/createLayer.dsw               |    49 +-
 examples/createLayer/createLayer.pro               |    44 +-
 examples/createLayer/createLayer.sln               |    37 +
 examples/createLayer/createLayer.vcproj            |   200 +
 examples/createProximityMatrix/.cdtproject         |    17 -
 examples/createProximityMatrix/.project            |   104 -
 examples/createProximityMatrix/Makefile            |    23 -
 .../createProximityMatrix.cpp                      |   131 -
 .../createProximityMatrix.dsp                      |   114 -
 .../createProximityMatrix.dsw                      |    89 -
 .../createProximityMatrix.pro                      |    47 -
 examples/createSTElementSet/.cdtproject            |     0
 examples/createSTElementSet/.project               |     0
 examples/createSTElementSet/Makefile               |    25 +-
 examples/createSTElementSet/createSTElementSet.cpp |    31 +-
 examples/createSTElementSet/createSTElementSet.dsp |     8 +-
 examples/createSTElementSet/createSTElementSet.dsw |    46 +-
 examples/createSTElementSet/createSTElementSet.pro |    45 +-
 examples/createSTElementSet/createSTElementSet.sln |    47 +
 .../createSTElementSet/createSTElementSet.vcproj   |   164 +
 examples/createSTElementSetFromLayer/.cdtproject   |     0
 examples/createSTElementSetFromLayer/.project      |     0
 examples/createSTElementSetFromLayer/Makefile      |    25 +-
 .../createSTElementSetFromLayer.cpp                |    33 +-
 .../createSTElementSetFromLayer.dsp                |     8 +-
 .../createSTElementSetFromLayer.dsw                |    46 +-
 .../createSTElementSetFromLayer.pro                |    45 +-
 .../createSTElementSetFromLayer.sln                |    53 +
 .../createSTElementSetFromLayer.vcproj             |   206 +
 .../createSTElementSetFromShapeFile/.cdtproject    |    17 -
 examples/createSTElementSetFromShapeFile/.project  |   104 -
 examples/createSTElementSetFromShapeFile/Makefile  |    23 -
 .../createSTElementSetFromShapeFile.cpp            |    76 -
 .../createSTElementSetFromShapeFile.dsp            |   130 -
 .../createSTElementSetFromShapeFile.dsw            |    89 -
 .../createSTElementSetFromShapeFile.pro            |    51 -
 examples/createSTElementSetFromTheme/.cdtproject   |    17 -
 examples/createSTElementSetFromTheme/.project      |   104 -
 examples/createSTElementSetFromTheme/Makefile      |    23 -
 .../createSTElementSetFromTheme.cpp                |   147 -
 .../createSTElementSetFromTheme.dsp                |   114 -
 .../createSTElementSetFromTheme.dsw                |    89 -
 .../createSTElementSetFromTheme.pro                |    47 -
 examples/createTable/.cdtproject                   |     0
 examples/createTable/.project                      |     0
 examples/createTable/Makefile                      |    26 +-
 examples/createTable/createTable.cpp               |     6 +-
 examples/createTable/createTable.dsp               |     8 +-
 examples/createTable/createTable.dsw               |    46 +-
 examples/createTable/createTable.pro               |    44 +-
 examples/createTable/createTable.sln               |    48 +
 examples/createTable/createTable.vcproj            |   139 +
 examples/createTheme/.cdtproject                   |     0
 examples/createTheme/.project                      |    18 +-
 examples/createTheme/Makefile                      |    28 +-
 examples/createTheme/createTheme.cpp               |    72 +-
 examples/createTheme/createTheme.dsp               |     8 +-
 examples/createTheme/createTheme.dsw               |    46 +-
 examples/createTheme/createTheme.pro               |    45 +-
 examples/createTheme/createTheme.sln               |    47 +
 examples/createTheme/createTheme.vcproj            |   164 +
 examples/data/BairroBH.MID                         |   240 +
 examples/data/BairroBH.MIF                         | 19189 ++++++++++++++++
 examples/data/BairrosPoA.dbf                       |   Bin
 examples/data/BairrosPoA.shp                       |   Bin
 examples/data/BairrosPoA.shx                       |   Bin
 examples/data/BairrosRecife.mid                    |     0
 examples/data/BairrosRecife.mif                    |     0
 examples/data/BairrosRecife2.csv                   |     0
 examples/data/BrasiliaPol.dbf                      |   Bin 0 -> 474 bytes
 examples/data/BrasiliaPol.shp                      |   Bin 0 -> 364 bytes
 examples/data/BrasiliaPol.shx                      |   Bin 0 -> 108 bytes
 examples/data/Brasilia_RGB.tif                     |   Bin 0 -> 1413 bytes
 examples/data/Cadastro_Escolas.geo                 |     0
 examples/data/Cadastro_Escolas.tab                 |     0
 examples/data/Distritos.mid                        |     0
 examples/data/Distritos.mif                        |     0
 examples/data/EstadosBrasil.dbf                    |   Bin
 examples/data/EstadosBrasil.shp                    |   Bin
 examples/data/EstadosBrasil.shx                    |   Bin
 examples/data/Mapa_Distritos_SP.dbf                |   Bin 0 -> 12705 bytes
 examples/data/Mapa_Distritos_SP.shp                |   Bin 0 -> 421012 bytes
 examples/data/Mapa_Distritos_SP.shx                |   Bin 0 -> 868 bytes
 examples/data/Mapa_Drenagem_SP.dbf                 |   Bin 0 -> 3409 bytes
 examples/data/Mapa_Drenagem_SP.shp                 |   Bin 0 -> 651380 bytes
 examples/data/Mapa_Drenagem_SP.shx                 |   Bin 0 -> 676 bytes
 examples/data/Mapa_Industrias_SP.dbf               |   Bin 0 -> 18186 bytes
 examples/data/Mapa_Industrias_SP.shp               |   Bin 0 -> 8388 bytes
 examples/data/Mapa_Industrias_SP.shx               |   Bin 0 -> 2468 bytes
 examples/data/OcorrenciasBH.csv                    |  6502 ++++++
 examples/data/OcorrenciasPoA.dbf                   |   Bin
 examples/data/OcorrenciasPoA.shp                   |   Bin
 examples/data/OcorrenciasPoA.shx                   |   Bin
 examples/data/SOCEC.dbf                            |   Bin
 examples/data/cities.dbf                           |   Bin 3366 -> 0 bytes
 examples/data/cities.shp                           |   Bin 1108 -> 0 bytes
 examples/data/cities.shx                           |   Bin 388 -> 0 bytes
 examples/data/elevation.raw                        |   Bin
 examples/data/nat1.tif                             |   Bin
 examples/data/nat2.tif                             |   Bin
 examples/data/rivers.dbf                           |   Bin 2528 -> 0 bytes
 examples/data/rivers.shp                           |   Bin 20208 -> 0 bytes
 examples/data/rivers.shx                           |   Bin 340 -> 0 bytes
 examples/data/sampa.jpg                            |   Bin
 examples/data/samples.spr                          | 22878 +++++++++++++++++++
 examples/data/sp_589x703.raw                       |     1 +
 examples/data/states.dbf                           |   Bin 4034 -> 0 bytes
 examples/data/states.shp                           |   Bin 51924 -> 0 bytes
 examples/data/states.shx                           |   Bin 356 -> 0 bytes
 examples/databaseQuery/.cdtproject                 |     0
 examples/databaseQuery/.project                    |     0
 examples/databaseQuery/Makefile                    |    25 +-
 examples/databaseQuery/databaseQuery.cpp           |     4 +-
 examples/databaseQuery/databaseQuery.dsp           |     8 +-
 examples/databaseQuery/databaseQuery.dsw           |    46 +-
 examples/databaseQuery/databaseQuery.pro           |    44 +-
 examples/databaseQuery/databaseQuery.sln           |    45 +
 examples/databaseQuery/databaseQuery.vcproj        |   139 +
 examples/databaseSQLQuery/.cdtproject              |     0
 examples/databaseSQLQuery/.project                 |     0
 examples/databaseSQLQuery/Makefile                 |    27 +-
 examples/databaseSQLQuery/databaseSQLQuery.cpp     |     4 +-
 examples/databaseSQLQuery/databaseSQLQuery.dsp     |     8 +-
 examples/databaseSQLQuery/databaseSQLQuery.dsw     |    46 +-
 examples/databaseSQLQuery/databaseSQLQuery.pro     |    44 +-
 examples/databaseSQLQuery/databaseSQLQuery.sln     |    50 +
 examples/databaseSQLQuery/databaseSQLQuery.vcproj  |   139 +
 examples/examples.sln                              |   332 +
 examples/image_processing/Makefile                 |    21 +
 .../image_processing/bin/run_all_tests_unix.sh     |    48 +
 examples/image_processing/image_processing.pro     |     7 +
 examples/image_processing/image_processing.sln     |   348 +
 examples/image_processing/readme.txt               |    34 +
 .../resources/cbers2b_hrc_crop.tif                 |   Bin 0 -> 8323600 bytes
 .../resources/cbers2b_rgb342_crop.tif              |   Bin 0 -> 389304 bytes
 .../image_processing}/resources/cbers_b2_crop.tif  |   Bin
 .../image_processing/resources/cbers_b2_crop_A.tif |   Bin 0 -> 343756 bytes
 .../resources/cbers_b2_crop_B_contraste.tif        |   Bin 0 -> 337922 bytes
 .../image_processing/resources/cbers_b2_crop_C.tif |   Bin 0 -> 165374 bytes
 .../resources/cbers_b2_crop_contraste.tif          |   Bin 0 -> 721734 bytes
 .../cbers_b2_crop_contraste_halfsampled.tif        |   Bin 0 -> 183037 bytes
 .../resources/cbers_rgb342_crop1.tif               |   Bin 0 -> 2651660 bytes
 .../resources/cbers_rgb342_crop1_halfsampled.tif   |   Bin 0 -> 665042 bytes
 .../resources/cbers_rgb342_crop2.tif               |   Bin 0 -> 2539660 bytes
 .../resources/cbers_rgb342_crop3.tif               |   Bin 0 -> 2651660 bytes
 examples/image_processing/run_all_tests_unix.sh    |    51 +
 .../source/TePDIArithmetic/TePDIArithmetic.pro     |     9 +
 .../TePDIArithmetic/TePDIArithmetic_test.cpp       |   512 +
 .../TePDIArithmetic/TePDIArithmetic_test.vcproj    |   146 +
 .../source/TePDIBDFilter/TePDIBDFilter.pro         |     8 +
 .../source/TePDIBDFilter/TePDIBDFilter_test.cpp    |   110 +
 .../source/TePDIBDFilter/TePDIBDFilter_test.vcproj |   146 +
 .../source/TePDIBlending/TePDIBlending.pro         |     7 +
 .../source/TePDIBlending/TePDIBlending_test.cpp    |   411 +
 .../source/TePDIBlending/TePDIBlending_test.vcproj |   146 +
 .../TePDIClassification/TePDIClassification.pro    |     8 +
 .../TePDIClassification_test.cpp                   |   211 +
 .../TePDIClassification_test.vcproj                |   146 +
 .../TePDIColorTransform/TePDIColorTransform.pro    |     5 +
 .../TePDIColorTransform_test.cpp                   |   282 +
 .../TePDIColorTransform_test.vcproj                |   146 +
 .../source/TePDIContrast/TePDIContrast.pro         |     7 +
 .../source/TePDIContrast/TePDIContrast_test.cpp    |   548 +
 .../source/TePDIContrast/TePDIContrast_test.vcproj |   146 +
 .../TePDICorrelationMatching.pro                   |     7 +
 .../TePDICorrelationMatching_test.cpp              |   486 +
 .../TePDICorrelationMatching_test.vcproj           |   146 +
 .../TePDIDecorrelationEnhancement.pro              |     6 +
 .../TePDIDecorrelationEnhancement_test.cpp         |    83 +
 .../TePDIDecorrelationEnhancement_test.vcproj      |   146 +
 .../source/TePDIFilterMask/TePDIFilterMask.pro     |     4 +
 .../TePDIFilterMask/TePDIFilterMask_test.cpp       |   169 +
 .../TePDIFilterMask/TePDIFilterMask_test.vcproj    |   146 +
 .../source/TePDIFusion/TePDIFusion.pro             |     7 +
 .../source/TePDIFusion/TePDIFusion_test.cpp        |   215 +
 .../source/TePDIFusion/TePDIFusion_test.vcproj     |   146 +
 .../source/TePDIHaralick/TePDIHaralick.pro         |     5 +
 .../source/TePDIHaralick/TePDIHaralick_test.cpp    |   106 +
 .../source/TePDIHaralick/TePDIHaralick_test.vcproj |   146 +
 .../source/TePDIHistogram/TePDIHistogram.pro       |     4 +
 .../source/TePDIHistogram/TePDIHistogram_test.cpp  |  1202 +
 .../TePDIHistogram/TePDIHistogram_test.vcproj      |   146 +
 .../source/TePDIInterpolator/TePDIInterpolator.pro |     6 +
 .../TePDIInterpolator/TePDIInterpolator_test.cpp   |   160 +
 .../TePDIInterpolator_test.vcproj                  |   146 +
 .../TePDIJointHistogram/TePDIJointHistogram.pro    |     4 +
 .../TePDIJointHistogram_test.cpp                   |   378 +
 .../TePDIJointHistogram_test.vcproj                |   146 +
 .../source/TePDILinearFilter/TePDILinearFilter.pro |     8 +
 .../TePDILinearFilter/TePDILinearFilter_test.cpp   |   222 +
 .../TePDILinearFilter_test.vcproj                  |   146 +
 .../source/TePDIMIMatching/TePDIMIMatching.pro     |     7 +
 .../TePDIMIMatching/TePDIMIMatching_test.cpp       |   743 +
 .../TePDIMIMatching/TePDIMIMatching_test.vcproj    |   146 +
 .../source/TePDIMMIOMatching/TePDIMMIOMatching.pro |     7 +
 .../TePDIMMIOMatching/TePDIMMIOMatching_test.cpp   |   937 +
 .../TePDIMMIOMatching_test.vcproj                  |   146 +
 .../TePDIMathFunctions/TePDIMathFunctions.pro      |     4 +
 .../TePDIMathFunctions/TePDIMathFunctions_test.cpp |   117 +
 .../TePDIMathFunctions_test.vcproj                 |   146 +
 .../source/TePDIMatrix/TePDIMatrix.pro             |     5 +
 .../source/TePDIMatrix/TePDIMatrix_test.cpp        |   174 +
 .../source/TePDIMatrix/TePDIMatrix_test.vcproj     |   146 +
 .../TePDIMatrixFunctions/TePDIMatrixFunctions.pro  |     5 +
 .../TePDIMatrixFunctions_test.cpp                  |   116 +
 .../TePDIMatrixFunctions_test.vcproj               |   146 +
 .../source/TePDIMixModel/TePDIMixModel.pro         |     7 +
 .../source/TePDIMixModel/TePDIMixModel_test.cpp    |   180 +
 .../source/TePDIMixModel/TePDIMixModel_test.vcproj |   146 +
 .../source/TePDIMorfFilter/TePDIMorfFilter.pro     |     9 +
 .../TePDIMorfFilter/TePDIMorfFilter_test.cpp       |   769 +
 .../TePDIMorfFilter/TePDIMorfFilter_test.vcproj    |   146 +
 .../source/TePDIMosaic/TePDIMosaic.pro             |     7 +
 .../source/TePDIMosaic/TePDIMosaic_test.cpp        |   233 +
 .../source/TePDIMosaic/TePDIMosaic_test.vcproj     |   146 +
 .../source/TePDIOFMatching/TePDIOFMatching.pro     |     7 +
 .../TePDIOFMatching/TePDIOFMatching_test.cpp       |   903 +
 .../TePDIOFMatching/TePDIOFMatching_test.vcproj    |   146 +
 .../source/TePDIPIManager/TePDIPIManager.pro       |     5 +
 .../source/TePDIPIManager/TePDIPIManager_test.cpp  |    64 +
 .../TePDIPIManager/TePDIPIManager_test.vcproj      |   146 +
 .../source/TePDIParameters/TePDIParameters.pro     |     4 +
 .../TePDIParameters/TePDIParameters_test.cpp       |    69 +
 .../TePDIParameters/TePDIParameters_test.vcproj    |   146 +
 .../TePDIPrincipalComponents.pro                   |     7 +
 .../TePDIPrincipalComponents_test.cpp              |   172 +
 .../TePDIPrincipalComponents_test.vcproj           |   146 +
 .../source/TePDIRadarFilters/TePDIRadarFilters.pro |     7 +
 .../TePDIRadarFilters/TePDIRadarFilters_test.cpp   |   260 +
 .../TePDIRadarFilters_test.vcproj                  |   146 +
 .../TePDIRaster2Vector/TePDIRaster2Vector.pro      |    11 +
 .../TePDIRaster2Vector/TePDIRaster2Vector_test.cpp |   570 +
 .../TePDIRaster2Vector_test.vcproj                 |   146 +
 .../source/TePDIRegister/TePDIRegister.pro         |     7 +
 .../source/TePDIRegister/TePDIRegister_test.cpp    |   138 +
 .../source/TePDIRegister/TePDIRegister_test.vcproj |   146 +
 .../source/TePDIRgbPalette/TePDIRgbPalette.pro     |     4 +
 .../TePDIRgbPalette/TePDIRgbPalette_test.cpp       |    34 +
 .../TePDIRgbPalette/TePDIRgbPalette_test.vcproj    |   146 +
 .../source/TePDISegmentation/TePDISegmentation.pro |     8 +
 .../TePDISegmentation/TePDISegmentation_test.cpp   |   328 +
 .../TePDISegmentation_test.vcproj                  |   146 +
 .../TePDISensorSimulator/TePDISensorSimulator.pro  |     7 +
 .../TePDISensorSimulator_test.cpp                  |    67 +
 .../TePDISensorSimulator_test.vcproj               |   146 +
 .../source/TePDIStatistic/TePDIStatistic.pro       |     5 +
 .../source/TePDIStatistic/TePDIStatistic_test.cpp  |   360 +
 .../TePDIStatistic/TePDIStatistic_test.vcproj      |   146 +
 .../source/TePDIUtils/TePDIUtils.pro               |    13 +
 .../source/TePDIUtils/TePDIUtils_test.cpp          |  1023 +
 .../source/TePDIUtils/TePDIUtils_test.vcproj       |   146 +
 .../source/TePDIWavelets/TePDIWavelets.pro         |     7 +
 .../source/TePDIWavelets/TePDIWavelets_test.cpp    |   265 +
 .../source/TePDIWavelets/TePDIWavelets_test.vcproj |   146 +
 .../source/base/TePDIExamplesBase.hpp              |    16 +
 examples/image_processing/source/base/base.pro     |    42 +
 examples/image_processing/source/source.pro        |    41 +
 examples/importCSV/.cdtproject                     |     0
 examples/importCSV/.project                        |    18 +-
 examples/importCSV/Makefile                        |    26 +-
 examples/importCSV/importCSV.cpp                   |   235 +-
 examples/importCSV/importCSV.dsp                   |     8 +-
 examples/importCSV/importCSV.dsw                   |    46 +-
 examples/importCSV/importCSV.pro                   |    50 +-
 examples/importCSV/importCSV.sln                   |    47 +
 examples/importCSV/importCSV.vcproj                |   173 +
 examples/importDBF/.cdtproject                     |     0
 examples/importDBF/.project                        |     0
 examples/importDBF/Makefile                        |    32 +-
 examples/importDBF/importDBF.cpp                   |    33 +-
 examples/importDBF/importDBF.dsp                   |     8 +-
 examples/importDBF/importDBF.dsw                   |    33 +-
 examples/importDBF/importDBF.pro                   |    48 +-
 examples/importDBF/importDBF.sln                   |    55 +
 examples/importDBF/importDBF.vcproj                |   170 +
 examples/importGeoTab/.cdtproject                  |     0
 examples/importGeoTab/.project                     |    22 +-
 examples/importGeoTab/Makefile                     |    27 +-
 examples/importGeoTab/importGeoTab.cpp             |    65 +-
 examples/importGeoTab/importGeoTab.dsp             |     8 +-
 examples/importGeoTab/importGeoTab.dsw             |    46 +-
 examples/importGeoTab/importGeoTab.pro             |    48 +-
 examples/importGeoTab/importGeoTab.sln             |    47 +
 examples/importGeoTab/importGeoTab.vcproj          |   170 +
 examples/importGridData/.cdtproject                |     0
 examples/importGridData/.project                   |    18 +-
 examples/importGridData/Makefile                   |    26 +-
 examples/importGridData/importGridData.cpp         |    14 +-
 examples/importGridData/importGridData.dsp         |     8 +-
 examples/importGridData/importGridData.dsw         |    39 +-
 examples/importGridData/importGridData.pro         |    44 +-
 examples/importGridData/importGridData.sln         |    47 +
 examples/importGridData/importGridData.vcproj      |   164 +
 examples/importJPEG/.cdtproject                    |     0
 examples/importJPEG/.project                       |    18 +-
 examples/importJPEG/Makefile                       |    25 +-
 examples/importJPEG/importJPEG.cpp                 |    19 +-
 examples/importJPEG/importJPEG.dsp                 |     8 +-
 examples/importJPEG/importJPEG.dsw                 |    33 +-
 examples/importJPEG/importJPEG.pro                 |    43 +-
 examples/importJPEG/importJPEG.sln                 |    47 +
 examples/importJPEG/importJPEG.vcproj              |   164 +
 examples/importMIDMIF/.cdtproject                  |     0
 examples/importMIDMIF/.project                     |    18 +-
 examples/importMIDMIF/Makefile                     |    24 +-
 examples/importMIDMIF/importMIDMIF.cpp             |    87 +-
 examples/importMIDMIF/importMIDMIF.dsp             |    12 +-
 examples/importMIDMIF/importMIDMIF.dsw             |    46 +-
 examples/importMIDMIF/importMIDMIF.pro             |    52 +-
 examples/importMIDMIF/importMIDMIF.sln             |    47 +
 examples/importMIDMIF/importMIDMIF.vcproj          |   176 +
 examples/importShape/.cdtproject                   |     0
 examples/importShape/.project                      |    18 +-
 examples/importShape/Makefile                      |    33 +-
 examples/importShape/importShape.cpp               |    92 +-
 examples/importShape/importShape.dsp               |     8 +-
 examples/importShape/importShape.dsw               |    33 +-
 examples/importShape/importShape.pro               |    50 +-
 examples/importShape/importShape.sln               |    55 +
 examples/importShape/importShape.vcproj            |   170 +
 examples/mosaicTIFFImages/.cdtproject              |     0
 examples/mosaicTIFFImages/.project                 |     0
 examples/mosaicTIFFImages/Makefile                 |    26 +-
 examples/mosaicTIFFImages/mosaicTIFFImages.cpp     |     9 +-
 examples/mosaicTIFFImages/mosaicTIFFImages.dsp     |     0
 examples/mosaicTIFFImages/mosaicTIFFImages.dsw     |     0
 examples/mosaicTIFFImages/mosaicTIFFImages.pro     |    43 +-
 examples/mosaicTIFFImages/mosaicTIFFImages.sln     |    47 +
 examples/mosaicTIFFImages/mosaicTIFFImages.vcproj  |   167 +
 .../proxMatrixAndSpatialStatistics/.cdtproject     |     0
 examples/proxMatrixAndSpatialStatistics/.project   |     0
 examples/proxMatrixAndSpatialStatistics/Makefile   |    26 +-
 .../proxMatrixAndSpatialStatistics.cpp             |    34 +-
 .../proxMatrixAndSpatialStatistics.dsp             |    12 +-
 .../proxMatrixAndSpatialStatistics.dsw             |    49 +-
 .../proxMatrixAndSpatialStatistics.pro             |    44 +-
 .../proxMatrixAndSpatialStatistics.sln             |    53 +
 .../proxMatrixAndSpatialStatistics.vcproj          |   203 +
 examples/querierFromLayer/.cdtproject              |     0
 examples/querierFromLayer/.project                 |     0
 examples/querierFromLayer/Makefile                 |    27 +-
 examples/querierFromLayer/querierFromLayer.cpp     |    23 +-
 examples/querierFromLayer/querierFromLayer.dsp     |     8 +-
 examples/querierFromLayer/querierFromLayer.dsw     |    46 +-
 examples/querierFromLayer/querierFromLayer.pro     |    44 +-
 examples/querierFromLayer/querierFromLayer.sln     |    45 +
 examples/querierFromLayer/querierFromLayer.vcproj  |   201 +
 examples/querierFromTheme/.cdtproject              |     0
 examples/querierFromTheme/.project                 |     0
 examples/querierFromTheme/Makefile                 |    27 +-
 examples/querierFromTheme/querierFromTheme.cpp     |    22 +-
 examples/querierFromTheme/querierFromTheme.dsp     |     8 +-
 examples/querierFromTheme/querierFromTheme.dsw     |    46 +-
 examples/querierFromTheme/querierFromTheme.pro     |    44 +-
 examples/querierFromTheme/querierFromTheme.sln     |    45 +
 examples/querierFromTheme/querierFromTheme.vcproj  |   201 +
 examples/querierGroupChronon/.cdtproject           |    17 -
 examples/querierGroupChronon/.project              |   104 -
 examples/querierGroupChronon/Makefile              |    23 -
 .../querierGroupChronon/querierGroupChronon.cpp    |   141 -
 .../querierGroupChronon/querierGroupChronon.dsp    |   114 -
 .../querierGroupChronon/querierGroupChronon.dsw    |    89 -
 .../querierGroupChronon/querierGroupChronon.pro    |    47 -
 examples/querierGroupElement/.cdtproject           |    17 -
 examples/querierGroupElement/.project              |   104 -
 examples/querierGroupElement/Makefile              |    23 -
 .../querierGroupElement/querierGroupElement.cpp    |   123 -
 .../querierGroupElement/querierGroupElement.dsp    |   114 -
 .../querierGroupElement/querierGroupElement.dsw    |    89 -
 .../querierGroupElement/querierGroupElement.pro    |    47 -
 examples/querierGroupSpatialRest/.cdtproject       |    17 -
 examples/querierGroupSpatialRest/.project          |   104 -
 examples/querierGroupSpatialRest/Makefile          |    23 -
 .../querierGroupSpatialRest.cpp                    |   163 -
 .../querierGroupSpatialRest.dsp                    |   114 -
 .../querierGroupSpatialRest.dsw                    |    89 -
 .../querierGroupSpatialRest.pro                    |    47 -
 examples/querierWithSpatialRestBox/.cdtproject     |    17 -
 examples/querierWithSpatialRestBox/.project        |   104 -
 examples/querierWithSpatialRestBox/Makefile        |    23 -
 .../querierWithSpatialRestBox.cpp                  |   117 -
 .../querierWithSpatialRestBox.dsp                  |   114 -
 .../querierWithSpatialRestBox.dsw                  |    89 -
 .../querierWithSpatialRestBox.pro                  |    47 -
 .../querierWithSpatialRestGeometry/.cdtproject     |    17 -
 examples/querierWithSpatialRestGeometry/.project   |   104 -
 examples/querierWithSpatialRestGeometry/Makefile   |    23 -
 .../querierWithSpatialRestGeometry.cpp             |   152 -
 .../querierWithSpatialRestGeometry.dsp             |   114 -
 .../querierWithSpatialRestGeometry.dsw             |    89 -
 .../querierWithSpatialRestGeometry.pro             |    47 -
 examples/rasterSlicing/.cdtproject                 |     0
 examples/rasterSlicing/.project                    |     0
 examples/rasterSlicing/Makefile                    |    27 +-
 examples/rasterSlicing/rasterSlicing.cpp           |    59 +-
 examples/rasterSlicing/rasterSlicing.dsp           |     4 +-
 examples/rasterSlicing/rasterSlicing.dsw           |     0
 examples/rasterSlicing/rasterSlicing.pro           |    43 +-
 examples/rasterSlicing/rasterSlicing.sln           |    39 +
 examples/rasterSlicing/rasterSlicing.vcproj        |   164 +
 examples/spatialQuery/.cdtproject                  |     0
 examples/spatialQuery/.project                     |     0
 examples/spatialQuery/Makefile                     |    30 +-
 examples/spatialQuery/spatialQuery.cpp             |   101 +-
 examples/spatialQuery/spatialQuery.dsp             |     8 +-
 examples/spatialQuery/spatialQuery.dsw             |    41 +-
 examples/spatialQuery/spatialQuery.pro             |    50 +-
 examples/spatialQuery/spatialQuery.sln             |    54 +
 examples/spatialQuery/spatialQuery.vcproj          |   189 +
 examples/spatialQueryAndBuffer/.cdtproject         |     0
 examples/spatialQueryAndBuffer/.project            |     0
 examples/spatialQueryAndBuffer/Makefile            |    25 +-
 .../spatialQueryAndBuffer.cpp                      |    50 +-
 .../spatialQueryAndBuffer.dsp                      |     4 +-
 .../spatialQueryAndBuffer.dsw                      |    39 +-
 .../spatialQueryAndBuffer.pro                      |    49 +-
 .../spatialQueryAndBuffer.sln                      |    45 +
 .../spatialQueryAndBuffer.vcproj                   |   183 +
 examples/themeGrouping/.cdtproject                 |     0
 examples/themeGrouping/.project                    |     0
 examples/themeGrouping/Makefile                    |    27 +-
 examples/themeGrouping/themeGrouping.cpp           |    26 +-
 examples/themeGrouping/themeGrouping.dsp           |     4 +-
 examples/themeGrouping/themeGrouping.dsw           |    50 +-
 examples/themeGrouping/themeGrouping.pro           |    44 +-
 examples/themeGrouping/themeGrouping.sln           |    47 +
 examples/themeGrouping/themeGrouping.vcproj        |   200 +
 src/STLport/BC50/README                            |     8 -
 src/STLport/BC50/algorith.h                        |    21 -
 src/STLport/BC50/alloc.h                           |    31 -
 src/STLport/BC50/bak/stddef.h                      |    21 -
 src/STLport/BC50/bak/stdlib.h                      |    16 -
 src/STLport/BC50/bitset.h                          |    21 -
 src/STLport/BC50/cassert.h                         |    21 -
 src/STLport/BC50/cctype.h                          |    21 -
 src/STLport/BC50/cerrno.h                          |    21 -
 src/STLport/BC50/cfloat.h                          |    21 -
 src/STLport/BC50/climits.h                         |    21 -
 src/STLport/BC50/clocale.h                         |    21 -
 src/STLport/BC50/cmath.h                           |    21 -
 src/STLport/BC50/complex.h                         |    31 -
 src/STLport/BC50/csetjmp.h                         |    21 -
 src/STLport/BC50/csignal.h                         |    21 -
 src/STLport/BC50/cstdarg.h                         |    21 -
 src/STLport/BC50/cstddef.h                         |    21 -
 src/STLport/BC50/cstdio.h                          |    21 -
 src/STLport/BC50/cstdlib.h                         |    16 -
 src/STLport/BC50/cstring.h                         |    19 -
 src/STLport/BC50/ctime.h                           |    21 -
 src/STLport/BC50/cwchar.h                          |    21 -
 src/STLport/BC50/cwctype.h                         |    21 -
 src/STLport/BC50/deque.h                           |    21 -
 src/STLport/BC50/exceptio.h                        |    21 -
 src/STLport/BC50/fstream.h                         |    21 -
 src/STLport/BC50/function.h                        |    21 -
 src/STLport/BC50/hash_map.h                        |    21 -
 src/STLport/BC50/hash_set.h                        |    21 -
 src/STLport/BC50/iomanip.h                         |    21 -
 src/STLport/BC50/ios.h                             |    21 -
 src/STLport/BC50/iosfwd.h                          |    21 -
 src/STLport/BC50/iostream.h                        |    21 -
 src/STLport/BC50/istream.h                         |    21 -
 src/STLport/BC50/iterator.h                        |    21 -
 src/STLport/BC50/limits.h                          |    32 -
 src/STLport/BC50/list.h                            |    21 -
 src/STLport/BC50/locale.h                          |    30 -
 src/STLport/BC50/make_bc50.sh                      |    12 -
 src/STLport/BC50/map.h                             |    21 -
 src/STLport/BC50/memory.h                          |    33 -
 src/STLport/BC50/numeric.h                         |    21 -
 src/STLport/BC50/ostream.h                         |    21 -
 src/STLport/BC50/pthread_alloc.h                   |    21 -
 src/STLport/BC50/queue.h                           |    21 -
 src/STLport/BC50/rope.h                            |    21 -
 src/STLport/BC50/set.h                             |    21 -
 src/STLport/BC50/slist.h                           |    21 -
 src/STLport/BC50/sstream.h                         |    21 -
 src/STLport/BC50/stack.h                           |    21 -
 src/STLport/BC50/stdexcep.h                        |    21 -
 src/STLport/BC50/stl_tmpl.h                        |    21 -
 src/STLport/BC50/streambu.h                        |    21 -
 src/STLport/BC50/streambuf.h                       |    31 -
 src/STLport/BC50/string.h                          |    33 -
 src/STLport/BC50/strstrea.h                        |    21 -
 src/STLport/BC50/typeinfo.h                        |    21 -
 src/STLport/BC50/using/cstring.h                   |    54 -
 src/STLport/BC50/using/fstream.h                   |    19 -
 src/STLport/BC50/using/iomanip.h                   |     6 -
 src/STLport/BC50/using/ios.h                       |    41 -
 src/STLport/BC50/using/iosfwd.h                    |    54 -
 src/STLport/BC50/using/iostream.h                  |    11 -
 src/STLport/BC50/using/istream.h                   |    15 -
 src/STLport/BC50/using/locale.h                    |    62 -
 src/STLport/BC50/using/ostream.h                   |    10 -
 src/STLport/BC50/using/sstream.h                   |    16 -
 src/STLport/BC50/using/streambuf.h                 |     5 -
 src/STLport/BC50/using/strstream.h                 |     4 -
 src/STLport/BC50/utility.h                         |    21 -
 src/STLport/BC50/valarray.h                        |    21 -
 src/STLport/BC50/vector.h                          |    21 -
 src/STLport/algorithm                              |    60 -
 src/STLport/bitset                                 |    64 -
 src/STLport/cassert                                |    34 -
 src/STLport/cctype                                 |    78 -
 src/STLport/cerrno                                 |    49 -
 src/STLport/cfloat                                 |    41 -
 src/STLport/climits                                |    46 -
 src/STLport/clocale                                |    49 -
 src/STLport/cmath                                  |    93 -
 src/STLport/complex                                |    52 -
 src/STLport/config/_epilog.h                       |    33 -
 src/STLport/config/_msvc_warnings_off.h            |    20 -
 src/STLport/config/_prolog.h                       |    46 -
 src/STLport/config/new_compiler/README             |    12 -
 src/STLport/config/new_compiler/configure          |  3644 ---
 src/STLport/config/new_compiler/configure.in       |  1424 --
 src/STLport/config/new_compiler/stlconf.h.in       |   133 -
 src/STLport/config/new_compiler/unconfigure        |     3 -
 src/STLport/config/stl_apcc.h                      |    32 -
 src/STLport/config/stl_apple.h                     |   112 -
 src/STLport/config/stl_as400.h                     |    60 -
 src/STLport/config/stl_bc.h                        |   204 -
 src/STLport/config/stl_como.h                      |   209 -
 src/STLport/config/stl_confix.h                    |    78 -
 src/STLport/config/stl_cray.h                      |    68 -
 src/STLport/config/stl_dec.h                       |   110 -
 src/STLport/config/stl_dec_vms.h                   |    96 -
 src/STLport/config/stl_dm.h                        |   225 -
 src/STLport/config/stl_fujitsu.h                   |     5 -
 src/STLport/config/stl_gcc.h                       |   376 -
 src/STLport/config/stl_hpacc.h                     |   218 -
 src/STLport/config/stl_ibm.h                       |   139 -
 src/STLport/config/stl_icc.h                       |    49 -
 src/STLport/config/stl_intel.h                     |    14 -
 src/STLport/config/stl_kai.h                       |    58 -
 src/STLport/config/stl_mlc.h                       |     8 -
 src/STLport/config/stl_msvc.h                      |   208 -
 src/STLport/config/stl_mwerks.h                    |   140 -
 src/STLport/config/stl_mycomp.h                    |   268 -
 src/STLport/config/stl_sco.h                       |    35 -
 src/STLport/config/stl_select_lib.h                |    36 -
 src/STLport/config/stl_sgi.h                       |    94 -
 src/STLport/config/stl_solaris.h                   |    35 -
 src/STLport/config/stl_sunpro.h                    |   175 -
 src/STLport/config/stl_symantec.h                  |    42 -
 src/STLport/config/stl_watcom.h                    |   152 -
 src/STLport/config/stl_wince.h                     |   188 -
 src/STLport/config/stlcomp.h                       |   122 -
 src/STLport/config/vc_select_lib.h                 |    35 -
 src/STLport/csetjmp                                |    54 -
 src/STLport/csignal                                |    49 -
 src/STLport/cstdarg                                |    45 -
 src/STLport/cstddef                                |    58 -
 src/STLport/cstdio                                 |   134 -
 src/STLport/cstdlib                                |   114 -
 src/STLport/cstring                                |    45 -
 src/STLport/ctime                                  |    58 -
 src/STLport/ctype.h                                |    36 -
 src/STLport/cwchar                                 |   250 -
 src/STLport/cwctype                                |    81 -
 src/STLport/deque                                  |    55 -
 src/STLport/exception                              |   188 -
 src/STLport/exception.h                            |    46 -
 src/STLport/export                                 |    85 -
 src/STLport/export.sun                             |    48 -
 src/STLport/fstream                                |    61 -
 src/STLport/fstream.h                              |    57 -
 src/STLport/functional                             |    48 -
 src/STLport/hash_map                               |    42 -
 src/STLport/hash_set                               |    42 -
 src/STLport/iomanip                                |   194 -
 src/STLport/iomanip.h                              |    69 -
 src/STLport/ios                                    |    46 -
 src/STLport/ios.h                                  |    57 -
 src/STLport/iosfwd                                 |    62 -
 src/STLport/iostream                               |    97 -
 src/STLport/iostream.h                             |   119 -
 src/STLport/istream                                |    53 -
 src/STLport/istream.h                              |    63 -
 src/STLport/iterator                               |    59 -
 src/STLport/limits                                 |    44 -
 src/STLport/list                                   |    55 -
 src/STLport/locale                                 |   168 -
 src/STLport/locale.h                               |    35 -
 src/STLport/map                                    |    53 -
 src/STLport/math.h                                 |    46 -
 src/STLport/mem.h                                  |    51 -
 src/STLport/memory                                 |    70 -
 src/STLport/mmemory.h                              |     1 -
 src/STLport/new                                    |    54 -
 src/STLport/new.h                                  |    48 -
 src/STLport/numeric                                |    50 -
 src/STLport/old_hp/algo.h                          |   146 -
 src/STLport/old_hp/algobase.h                      |    97 -
 src/STLport/old_hp/alloc.h                         |   103 -
 src/STLport/old_hp/bvector.h                       |    68 -
 src/STLport/old_hp/defalloc.h                      |    87 -
 src/STLport/old_hp/deque.h                         |    68 -
 src/STLport/old_hp/export                          |    27 -
 src/STLport/old_hp/function.h                      |   126 -
 src/STLport/old_hp/hash_map.h                      |    62 -
 src/STLport/old_hp/hash_set.h                      |    58 -
 src/STLport/old_hp/hashtable.h                     |    70 -
 src/STLport/old_hp/heap.h                          |    58 -
 src/STLport/old_hp/iterator.h                      |   147 -
 src/STLport/old_hp/list.h                          |    62 -
 src/STLport/old_hp/map.h                           |    60 -
 src/STLport/old_hp/multimap.h                      |    58 -
 src/STLport/old_hp/multiset.h                      |    58 -
 src/STLport/old_hp/numeric.h                       |    25 -
 src/STLport/old_hp/pair.h                          |    59 -
 src/STLport/old_hp/pthread_alloc.h                 |    57 -
 src/STLport/old_hp/queue.h                         |    23 -
 src/STLport/old_hp/rope.h                          |    50 -
 src/STLport/old_hp/set.h                           |    57 -
 src/STLport/old_hp/slist.h                         |    57 -
 src/STLport/old_hp/stack.h                         |    73 -
 src/STLport/old_hp/tempbuf.h                       |    79 -
 src/STLport/old_hp/tree.h                          |    60 -
 src/STLport/old_hp/vector.h                        |    65 -
 src/STLport/ostream                                |    49 -
 src/STLport/ostream.h                              |    53 -
 src/STLport/pthread.h                              |    39 -
 src/STLport/pthread_alloc                          |    49 -
 src/STLport/queue                                  |    55 -
 src/STLport/rlocks.h                               |    11 -
 src/STLport/rope                                   |    37 -
 src/STLport/set                                    |    53 -
 src/STLport/setjmp.h                               |    38 -
 src/STLport/signal.h                               |    35 -
 src/STLport/slist                                  |    44 -
 src/STLport/sstream                                |    54 -
 src/STLport/stack                                  |    55 -
 src/STLport/stdarg.h                               |    35 -
 src/STLport/stddef.h                               |    37 -
 src/STLport/stdexcept                              |   180 -
 src/STLport/stdio.h                                |    47 -
 src/STLport/stdio_streambuf                        |   121 -
 src/STLport/stdiostream.h                          |    10 -
 src/STLport/stdlib.h                               |    35 -
 src/STLport/stl/_abbrevs.h                         |    70 -
 src/STLport/stl/_algo.c                            |  1765 --
 src/STLport/stl/_algo.h                            |   740 -
 src/STLport/stl/_algobase.c                        |   392 -
 src/STLport/stl/_algobase.h                        |   583 -
 src/STLport/stl/_alloc.c                           |   370 -
 src/STLport/stl/_alloc.h                           |   531 -
 src/STLport/stl/_alloc_old.h                       |   303 -
 src/STLport/stl/_auto_ptr.h                        |   129 -
 src/STLport/stl/_bitset.c                          |   407 -
 src/STLport/stl/_bitset.h                          |   768 -
 src/STLport/stl/_bvector.h                         |   807 -
 src/STLport/stl/_check_config.h                    |    37 -
 src/STLport/stl/_cmath.h                           |   208 -
 src/STLport/stl/_codecvt.h                         |   307 -
 src/STLport/stl/_collate.h                         |   182 -
 src/STLport/stl/_complex.c                         |   169 -
 src/STLport/stl/_complex.h                         |   969 -
 src/STLport/stl/_config.h                          |  1064 -
 src/STLport/stl/_config_compat.h                   |    89 -
 src/STLport/stl/_config_compat_post.h              |    35 -
 src/STLport/stl/_construct.h                       |   167 -
 src/STLport/stl/_ctraits_fns.h                     |    95 -
 src/STLport/stl/_ctype.h                           |   269 -
 src/STLport/stl/_cwchar.h                          |   112 -
 src/STLport/stl/_deque.c                           |   676 -
 src/STLport/stl/_deque.h                           |   953 -
 src/STLport/stl/_epilog.h                          |    44 -
 src/STLport/stl/_exception.h                       |     0
 src/STLport/stl/_fstream.c                         |   749 -
 src/STLport/stl/_fstream.h                         |   741 -
 src/STLport/stl/_function.h                        |   371 -
 src/STLport/stl/_function_adaptors.h               |   802 -
 src/STLport/stl/_function_base.h                   |   226 -
 src/STLport/stl/_hash_fun.h                        |   107 -
 src/STLport/stl/_hash_map.h                        |   468 -
 src/STLport/stl/_hash_set.h                        |   470 -
 src/STLport/stl/_hashtable.c                       |   468 -
 src/STLport/stl/_hashtable.h                       |   613 -
 src/STLport/stl/_heap.c                            |   242 -
 src/STLport/stl/_heap.h                            |   129 -
 src/STLport/stl/_ios.c                             |   127 -
 src/STLport/stl/_ios.h                             |   199 -
 src/STLport/stl/_ios_base.h                        |   403 -
 src/STLport/stl/_iosfwd.h                          |   159 -
 src/STLport/stl/_istream.c                         |  1430 --
 src/STLport/stl/_istream.h                         |   344 -
 src/STLport/stl/_istreambuf_iterator.h             |   167 -
 src/STLport/stl/_iterator.h                        |   269 -
 src/STLport/stl/_iterator_base.h                   |   463 -
 src/STLport/stl/_iterator_old.h                    |   351 -
 src/STLport/stl/_limits.c                          |   293 -
 src/STLport/stl/_limits.h                          |   557 -
 src/STLport/stl/_list.c                            |   210 -
 src/STLport/stl/_list.h                            |   575 -
 src/STLport/stl/_locale.h                          |   233 -
 src/STLport/stl/_map.h                             |   411 -
 src/STLport/stl/_messages_facets.h                 |   168 -
 src/STLport/stl/_monetary.c                        |   527 -
 src/STLport/stl/_monetary.h                        |   463 -
 src/STLport/stl/_new.h                             |    93 -
 src/STLport/stl/_null_stream.h                     |    42 -
 src/STLport/stl/_num_get.c                         |   671 -
 src/STLport/stl/_num_get.h                         |   259 -
 src/STLport/stl/_num_put.c                         |   553 -
 src/STLport/stl/_num_put.h                         |   186 -
 src/STLport/stl/_numeric.c                         |   104 -
 src/STLport/stl/_numeric.h                         |   186 -
 src/STLport/stl/_numpunct.h                        |   170 -
 src/STLport/stl/_ostream.c                         |   382 -
 src/STLport/stl/_ostream.h                         |   356 -
 src/STLport/stl/_ostreambuf_iterator.h             |    97 -
 src/STLport/stl/_pair.h                            |   161 -
 src/STLport/stl/_prolog.h                          |    17 -
 src/STLport/stl/_pthread_alloc.c                   |   262 -
 src/STLport/stl/_pthread_alloc.h                   |   489 -
 src/STLport/stl/_ptrs_specialize.h                 |    72 -
 src/STLport/stl/_queue.h                           |   212 -
 src/STLport/stl/_range_errors.h                    |    97 -
 src/STLport/stl/_raw_storage_iter.h                |    82 -
 src/STLport/stl/_relops.h                          |    33 -
 src/STLport/stl/_relops_cont.h                     |    29 -
 src/STLport/stl/_relops_hash_cont.h                |    32 -
 src/STLport/stl/_relops_template.h                 |     1 -
 src/STLport/stl/_rope.c                            |  1540 --
 src/STLport/stl/_rope.h                            |  2518 --
 src/STLport/stl/_set.h                             |   372 -
 src/STLport/stl/_site_config.h                     |   194 -
 src/STLport/stl/_slist.c                           |   179 -
 src/STLport/stl/_slist.h                           |   741 -
 src/STLport/stl/_slist_base.c                      |   109 -
 src/STLport/stl/_slist_base.h                      |    87 -
 src/STLport/stl/_sparc_atomic.h                    |    60 -
 src/STLport/stl/_sstream.c                         |   543 -
 src/STLport/stl/_sstream.h                         |   252 -
 src/STLport/stl/_stack.h                           |   105 -
 src/STLport/stl/_stdio_file.h                      |   758 -
 src/STLport/stl/_stream_iterator.h                 |   343 -
 src/STLport/stl/_streambuf.c                       |   216 -
 src/STLport/stl/_streambuf.h                       |   526 -
 src/STLport/stl/_streambuf_iterator.h              |    83 -
 src/STLport/stl/_string.c                          |   580 -
 src/STLport/stl/_string.h                          |  1501 --
 src/STLport/stl/_string_fwd.c                      |    48 -
 src/STLport/stl/_string_fwd.h                      |    61 -
 src/STLport/stl/_string_hash.h                     |    70 -
 src/STLport/stl/_string_io.c                       |   334 -
 src/STLport/stl/_string_io.h                       |   122 -
 src/STLport/stl/_strstream.h                       |   141 -
 src/STLport/stl/_tempbuf.c                         |    57 -
 src/STLport/stl/_tempbuf.h                         |   165 -
 src/STLport/stl/_threads.c                         |   172 -
 src/STLport/stl/_threads.h                         |   721 -
 src/STLport/stl/_time_facets.c                     |   497 -
 src/STLport/stl/_time_facets.h                     |   315 -
 src/STLport/stl/_tree.c                            |   715 -
 src/STLport/stl/_tree.h                            |   622 -
 src/STLport/stl/_uninitialized.h                   |   287 -
 src/STLport/stl/_valarray.c                        |   197 -
 src/STLport/stl/_valarray.h                        |  1657 --
 src/STLport/stl/_vector.c                          |   137 -
 src/STLport/stl/_vector.h                          |   591 -
 src/STLport/stl/c_locale.h                         |   436 -
 src/STLport/stl/char_traits.h                      |   266 -
 src/STLport/stl/concept_checks.h                   |   810 -
 src/STLport/stl/debug/_debug.c                     |   490 -
 src/STLport/stl/debug/_debug.h                     |   426 -
 src/STLport/stl/debug/_deque.h                     |   281 -
 src/STLport/stl/debug/_hashtable.h                 |   261 -
 src/STLport/stl/debug/_iterator.h                  |   394 -
 src/STLport/stl/debug/_list.h                      |   318 -
 src/STLport/stl/debug/_relops_cont.h               |    41 -
 src/STLport/stl/debug/_relops_hash_cont.h          |    34 -
 src/STLport/stl/debug/_slist.h                     |   399 -
 src/STLport/stl/debug/_string.h                    |   772 -
 src/STLport/stl/debug/_tree.h                      |   249 -
 src/STLport/stl/debug/_vector.h                    |   300 -
 src/STLport/stl/msl_string.h                       |    42 -
 src/STLport/stl/type_traits.h                      |   418 -
 src/STLport/stl/wrappers/_deque.h                  |    76 -
 src/STLport/stl/wrappers/_hash_map.h               |   147 -
 src/STLport/stl/wrappers/_hash_set.h               |   150 -
 src/STLport/stl/wrappers/_list.h                   |    86 -
 src/STLport/stl/wrappers/_map.h                    |   150 -
 src/STLport/stl/wrappers/_mmap.h                   |    46 -
 src/STLport/stl/wrappers/_set.h                    |   141 -
 src/STLport/stl/wrappers/_slist.h                  |    83 -
 src/STLport/stl/wrappers/_vector.h                 |    89 -
 src/STLport/stl_user_config.h                      |   202 -
 src/STLport/streambuf                              |    45 -
 src/STLport/streambuf.h                            |    63 -
 src/STLport/string                                 |    62 -
 src/STLport/string.h                               |    39 -
 src/STLport/strstream                              |    59 -
 src/STLport/strstream.h                            |    75 -
 src/STLport/time.h                                 |    35 -
 src/STLport/typeinfo                               |    86 -
 src/STLport/typeinfo.h                             |    62 -
 src/STLport/using/cstring                          |    54 -
 src/STLport/using/export                           |    12 -
 src/STLport/using/fstream                          |    19 -
 src/STLport/using/h/fstream.h                      |     4 -
 src/STLport/using/h/iomanip.h                      |     6 -
 src/STLport/using/h/iostream.h                     |    24 -
 src/STLport/using/h/ostream.h                      |     6 -
 src/STLport/using/h/streambuf.h                    |     1 -
 src/STLport/using/h/strstream.h                    |     4 -
 src/STLport/using/iomanip                          |     6 -
 src/STLport/using/ios                              |    41 -
 src/STLport/using/iosfwd                           |    54 -
 src/STLport/using/iostream                         |    14 -
 src/STLport/using/istream                          |    16 -
 src/STLport/using/locale                           |    65 -
 src/STLport/using/ostream                          |    10 -
 src/STLport/using/sstream                          |    16 -
 src/STLport/using/streambuf                        |     5 -
 src/STLport/using/strstream                        |     4 -
 src/STLport/utility                                |    65 -
 src/STLport/valarray                               |    47 -
 src/STLport/vector                                 |    57 -
 src/STLport/wchar.h                                |    50 -
 src/STLport/wctype.h                               |    35 -
 src/STLport/wrap_std/complex                       |    49 -
 src/STLport/wrap_std/export                        |    13 -
 src/STLport/wrap_std/fstream                       |    25 -
 src/STLport/wrap_std/h/fstream.h                   |     7 -
 src/STLport/wrap_std/h/iostream.h                  |    11 -
 src/STLport/wrap_std/h/streambuf.h                 |     9 -
 src/STLport/wrap_std/h/strstream.h                 |    31 -
 src/STLport/wrap_std/iomanip                       |    40 -
 src/STLport/wrap_std/ios                           |    29 -
 src/STLport/wrap_std/iosfwd                        |    94 -
 src/STLport/wrap_std/iostream                      |    35 -
 src/STLport/wrap_std/istream                       |    47 -
 src/STLport/wrap_std/locale                        |    30 -
 src/STLport/wrap_std/ostream                       |    44 -
 src/STLport/wrap_std/sstream                       |    25 -
 src/STLport/wrap_std/streambuf                     |    30 -
 src/STLport/wrap_std/strstream                     |    27 -
 src/shapelib/dbfopen.c                             |  1542 --
 src/shapelib/shapefil.h                            |   496 -
 src/shapelib/shpopen.c                             |  1872 --
 src/terralib/PDI/.cvsignore                        |     1 -
 src/terralib/PDI/Doxyfile                          |   214 -
 src/terralib/PDI/PDI.pro                           |     8 -
 src/terralib/PDI/bin/.cvsignore                    |     0
 src/terralib/PDI/bin/dynamic/.cvsignore            |     1 -
 src/terralib/PDI/bin/static/.cvsignore             |     1 -
 src/terralib/PDI/docs/.cvsignore                   |     1 -
 src/terralib/PDI/source/.cvsignore                 |     2 -
 src/terralib/PDI/source/TePDIAgnostic.cpp          |    13 -
 src/terralib/PDI/source/TePDIAgnostic.hpp          |   257 -
 src/terralib/PDI/source/TePDIAlgorithm.cpp         |    42 -
 src/terralib/PDI/source/TePDIAlgorithm.hpp         |   106 -
 src/terralib/PDI/source/TePDIBox.cpp               |    37 -
 src/terralib/PDI/source/TePDIBox.hpp               |    77 -
 src/terralib/PDI/source/TePDIContrast.cpp          |   879 -
 src/terralib/PDI/source/TePDIContrast.hpp          |   278 -
 src/terralib/PDI/source/TePDIFilter.cpp            |    17 -
 src/terralib/PDI/source/TePDIFilter.hpp            |    85 -
 src/terralib/PDI/source/TePDIFilterMask.cpp        |    17 -
 src/terralib/PDI/source/TePDIFilterMask.hpp        |    53 -
 src/terralib/PDI/source/TePDILinearFilter.cpp      |    90 -
 src/terralib/PDI/source/TePDILinearFilter.hpp      |    86 -
 src/terralib/PDI/source/TePDIParameters.cpp        |   313 -
 src/terralib/PDI/source/TePDIParameters.hpp        |   306 -
 src/terralib/PDI/source/TePDIRgbPalette.cpp        |   194 -
 src/terralib/PDI/source/TePDIRgbPalette.hpp        |   238 -
 src/terralib/PDI/source/TePDISharedPtr.cpp         |   146 -
 src/terralib/PDI/source/TePDISharedPtr.hpp         |   142 -
 src/terralib/PDI/source/TePDITypes.hpp             |    84 -
 src/terralib/PDI/source/TePDIUtils.cpp             |   284 -
 src/terralib/PDI/source/TePDIUtils.hpp             |   132 -
 src/terralib/PDI/source/projects/.cvsignore        |     2 -
 src/terralib/PDI/source/projects/base/.cvsignore   |     4 -
 src/terralib/PDI/source/projects/base/base.pro     |    52 -
 .../PDI/source/projects/dynamic/.cvsignore         |     4 -
 .../PDI/source/projects/dynamic/dynamic.pro        |    17 -
 src/terralib/PDI/source/projects/projects.pro      |     6 -
 src/terralib/PDI/source/projects/static/.cvsignore |     4 -
 src/terralib/PDI/source/projects/static/static.pro |    17 -
 src/terralib/PDI/source/source.pro                 |     6 -
 src/terralib/PDI/tests/.cvsignore                  |     1 -
 src/terralib/PDI/tests/bin/.cvsignore              |     3 -
 src/terralib/PDI/tests/resources/.cvsignore        |     1 -
 src/terralib/PDI/tests/source/.cvsignore           |     2 -
 .../PDI/tests/source/TePDIContrast/.cvsignore      |     3 -
 .../tests/source/TePDIContrast/TePDIContrast.pro   |     7 -
 .../source/TePDIContrast/TePDIContrast_test.cpp    |   346 -
 .../PDI/tests/source/TePDIParameters/.cvsignore    |     3 -
 .../source/TePDIParameters/TePDIParameters.pro     |     6 -
 .../TePDIParameters/TePDIParameters_test.cpp       |   103 -
 .../PDI/tests/source/TePDISharedPtr/.cvsignore     |     3 -
 .../tests/source/TePDISharedPtr/TePDISharedPtr.pro |     7 -
 .../source/TePDISharedPtr/TePDISharedPtr_test.cpp  |    65 -
 .../PDI/tests/source/TePDIUtils/.cvsignore         |     3 -
 .../PDI/tests/source/TePDIUtils/TePDIUtils.pro     |    10 -
 .../tests/source/TePDIUtils/TePDIUtils_test.cpp    |   119 -
 src/terralib/PDI/tests/source/base/.cvsignore      |     2 -
 src/terralib/PDI/tests/source/base/base.pro        |    27 -
 src/terralib/PDI/tests/source/source.pro           |    10 -
 src/terralib/PDI/tests/tests.pro                   |     7 -
 src/terralib/application/TeApplicationUtils.cpp    |   409 -
 src/terralib/application/TeApplicationUtils.h      |   102 -
 src/terralib/application/TeColorUtils.cpp          |   198 -
 src/terralib/application/TeColorUtils.h            |    58 -
 src/terralib/application/TeDatabaseUtils.cpp       |  3269 ---
 src/terralib/application/TeDatabaseUtils.h         |   179 -
 src/terralib/application/TeGUIUtils.cpp            |   141 -
 src/terralib/application/TeGUIUtils.h              |    42 -
 src/terralib/application/TeMSVFactory.h            |   192 -
 src/terralib/application/TePlotTheme.h             |  2155 --
 src/terralib/application/TePlotView.h              |    41 -
 src/terralib/application/TeSemivarModelFactory.h   |   153 -
 src/terralib/application/TeThemeApplication.cpp    |   345 -
 src/terralib/application/TeThemeApplication.h      |   314 -
 src/terralib/application/TeUpdateDBVersion.cpp     |   545 -
 src/terralib/application/TeUpdateDBVersion.h       |    46 -
 src/terralib/application/qt/TeDecoderQtImage.cpp   |   102 -
 src/terralib/application/qt/TeDecoderQtImage.h     |    61 -
 src/terralib/application/qt/TeQtAnimaThread.cpp    |   117 -
 src/terralib/application/qt/TeQtBasicCanvas.cpp    |  2428 --
 src/terralib/application/qt/TeQtBasicCanvas.h      |   280 -
 src/terralib/application/qt/TeQtCanvas.cpp         |   625 -
 src/terralib/application/qt/TeQtCanvas.h           |   118 -
 src/terralib/application/qt/TeQtChartItem.cpp      |    87 -
 src/terralib/application/qt/TeQtChartItem.h        |    63 -
 src/terralib/application/qt/TeQtCheckListItem.cpp  |    95 -
 src/terralib/application/qt/TeQtCheckListItem.h    |    72 -
 src/terralib/application/qt/TeQtDatabaseItem.cpp   |    40 -
 src/terralib/application/qt/TeQtDatabaseItem.h     |    51 -
 .../application/qt/TeQtDatabasesListView.cpp       |   270 -
 .../application/qt/TeQtDatabasesListView.h         |    92 -
 src/terralib/application/qt/TeQtGrid.cpp           |  2765 ---
 src/terralib/application/qt/TeQtGrid.h             |   251 -
 src/terralib/application/qt/TeQtLayerItem.cpp      |    43 -
 src/terralib/application/qt/TeQtLayerItem.h        |    49 -
 src/terralib/application/qt/TeQtLegendItem.cpp     |   319 -
 src/terralib/application/qt/TeQtLegendItem.h       |    71 -
 src/terralib/application/qt/TeQtMethods.cpp        |    98 -
 src/terralib/application/qt/TeQtMethods.h          |    64 -
 src/terralib/application/qt/TeQtProgress.h         |   138 -
 src/terralib/application/qt/TeQtShowMedia.cpp      |  1444 --
 src/terralib/application/qt/TeQtShowMedia.h        |    77 -
 src/terralib/application/qt/TeQtTable.cpp          |   316 -
 src/terralib/application/qt/TeQtTable.h            |    67 -
 src/terralib/application/qt/TeQtTerraStat.cpp      |  1184 -
 src/terralib/application/qt/TeQtTerraStat.h        |   207 -
 src/terralib/application/qt/TeQtTextEdit.cpp       |   862 -
 src/terralib/application/qt/TeQtTextEdit.h         |   150 -
 src/terralib/application/qt/TeQtThemeItem.cpp      |   187 -
 src/terralib/application/qt/TeQtThemeItem.h        |    57 -
 src/terralib/application/qt/TeQtViewItem.cpp       |    49 -
 src/terralib/application/qt/TeQtViewItem.h         |    54 -
 src/terralib/application/qt/TeQtViewsListView.cpp  |   767 -
 src/terralib/application/qt/TeQtViewsListView.h    |   146 -
 src/terralib/application/qt/TeWaitCursor.cpp       |    59 -
 src/terralib/application/qt/TeWaitCursor.h         |    36 -
 src/terralib/application/qt/resultVisual.h         |    37 -
 src/terralib/drivers/MrSID/TeDecoderMrSID.cpp      |   404 +-
 src/terralib/drivers/MrSID/TeDecoderMrSID.h        |    88 +-
 src/terralib/drivers/MrSID/TeMrSID.cpp             |   793 +-
 src/terralib/drivers/MrSID/TeMrSID.h               |   293 +-
 src/terralib/drivers/MySQL/TeMySQL.cpp             |  1319 +-
 src/terralib/drivers/MySQL/TeMySQL.h               |    97 +-
 .../drivers/MySQL/include/config-netware.h         |   119 -
 src/terralib/drivers/MySQL/include/config-os2.h    |   835 -
 src/terralib/drivers/MySQL/include/config-win.h    |   396 -
 src/terralib/drivers/MySQL/include/errmsg.h        |    92 -
 src/terralib/drivers/MySQL/include/libmysql.def    |   147 -
 src/terralib/drivers/MySQL/include/libmysqld.def   |   159 -
 src/terralib/drivers/MySQL/include/m_ctype.h       |   450 -
 src/terralib/drivers/MySQL/include/m_string.h      |   264 -
 src/terralib/drivers/MySQL/include/my_alloc.h      |    52 -
 src/terralib/drivers/MySQL/include/my_dbug.h       |    94 -
 src/terralib/drivers/MySQL/include/my_getopt.h     |    77 -
 src/terralib/drivers/MySQL/include/my_global.h     |  1191 -
 src/terralib/drivers/MySQL/include/my_list.h       |    46 -
 src/terralib/drivers/MySQL/include/my_pthread.h    |   700 -
 src/terralib/drivers/MySQL/include/my_sys.h        |   785 -
 src/terralib/drivers/MySQL/include/mysql.h         |   742 -
 src/terralib/drivers/MySQL/include/mysql_com.h     |   402 -
 src/terralib/drivers/MySQL/include/mysql_embed.h   |    33 -
 src/terralib/drivers/MySQL/include/mysql_time.h    |    44 -
 src/terralib/drivers/MySQL/include/mysql_version.h |    29 -
 src/terralib/drivers/MySQL/include/mysqld_error.h  |   322 -
 src/terralib/drivers/MySQL/include/raid.h          |   158 -
 src/terralib/drivers/MySQL/include/typelib.h       |    33 -
 .../drivers/OracleSpatial/OCI/include/cdemodp0.h   |   109 -
 .../drivers/OracleSpatial/OCI/include/kusapi.h     |   775 -
 .../drivers/OracleSpatial/OCI/include/kustags.h    |  1034 -
 .../drivers/OracleSpatial/OCI/include/nzerror.h    |   647 -
 .../drivers/OracleSpatial/OCI/include/nzt.h        |  2750 ---
 .../drivers/OracleSpatial/OCI/include/occi.h       |    78 -
 .../drivers/OracleSpatial/OCI/include/occiAQ.h     |   374 -
 .../drivers/OracleSpatial/OCI/include/occiCommon.h |   872 -
 .../OracleSpatial/OCI/include/occiControl.h        |  2060 --
 .../drivers/OracleSpatial/OCI/include/occiData.h   |   936 -
 .../OracleSpatial/OCI/include/occiObjects.h        |   990 -
 .../drivers/OracleSpatial/OCI/include/oci.h        |  2366 --
 .../drivers/OracleSpatial/OCI/include/oci1.h       |   183 -
 .../drivers/OracleSpatial/OCI/include/oci8dp.h     |   315 -
 .../drivers/OracleSpatial/OCI/include/ociap.h      | 10240 ---------
 .../drivers/OracleSpatial/OCI/include/ociapr.h     |   157 -
 .../drivers/OracleSpatial/OCI/include/ocidef.h     |   888 -
 .../drivers/OracleSpatial/OCI/include/ocidem.h     |   112 -
 .../drivers/OracleSpatial/OCI/include/ocidfn.h     |   251 -
 .../drivers/OracleSpatial/OCI/include/ociextp.h    |   281 -
 .../drivers/OracleSpatial/OCI/include/ocikp.h      | 10223 ---------
 .../drivers/OracleSpatial/OCI/include/ocikpr.h     |   168 -
 .../drivers/OracleSpatial/OCI/include/ocixad.h     |   316 -
 .../drivers/OracleSpatial/OCI/include/ocixmldb.h   |   139 -
 .../drivers/OracleSpatial/OCI/include/odci.h       |   657 -
 .../drivers/OracleSpatial/OCI/include/oratypes.h   |   307 -
 .../drivers/OracleSpatial/OCI/include/ori.h        |  2094 --
 .../drivers/OracleSpatial/OCI/include/orid.h       |   372 -
 .../drivers/OracleSpatial/OCI/include/orl.h        |  3628 ---
 .../drivers/OracleSpatial/OCI/include/oro.h        |   883 -
 .../drivers/OracleSpatial/OCI/include/ort.h        |  2593 ---
 .../drivers/OracleSpatial/TeOracleSpatial.cpp      |  6810 ------
 .../drivers/OracleSpatial/TeOracleSpatial.h        |   392 -
 src/terralib/drivers/OracleSpatial/connect.cpp     |   425 -
 src/terralib/drivers/OracleSpatial/connect.h       |   111 -
 src/terralib/drivers/OracleSpatial/cursor.cpp      |  1172 -
 src/terralib/drivers/OracleSpatial/cursor.h        |   225 -
 src/terralib/drivers/OracleSpatial/ociap.h         | 10097 --------
 src/terralib/drivers/OracleSpatial/sdo_oci.cpp     |  3097 ---
 src/terralib/drivers/OracleSpatial/sdo_oci.h       |  1541 --
 src/terralib/drivers/PAMDecoder/TeDecoderPAM.cpp   |   295 +
 src/terralib/drivers/PAMDecoder/TeDecoderPAM.h     |    85 +
 src/terralib/drivers/PostgreSQL/TePGInterface.cpp  |  1045 +-
 src/terralib/drivers/PostgreSQL/TePGInterface.h    |   157 +-
 src/terralib/drivers/PostgreSQL/TePGUtils.cpp      |   148 +-
 src/terralib/drivers/PostgreSQL/TePGUtils.h        |    32 +-
 src/terralib/drivers/PostgreSQL/TePostGIS.cpp      |  1291 +-
 src/terralib/drivers/PostgreSQL/TePostGIS.h        |   120 +-
 src/terralib/drivers/PostgreSQL/TePostgreSQL.cpp   |  3188 ++-
 src/terralib/drivers/PostgreSQL/TePostgreSQL.h     |   279 +-
 .../drivers/PostgreSQL/includepg/ecpg_informix.h   |    90 -
 .../drivers/PostgreSQL/includepg/ecpgerrno.h       |    77 -
 .../drivers/PostgreSQL/includepg/ecpglib.h         |    94 -
 .../drivers/PostgreSQL/includepg/ecpgtype.h        |    93 -
 .../drivers/PostgreSQL/includepg/libpq-fe.h        |   503 -
 .../drivers/PostgreSQL/includepg/pg_config.h       |   685 -
 .../PostgreSQL/includepg/pg_config_manual.h        |   229 -
 .../drivers/PostgreSQL/includepg/pg_config_os.h    |   244 -
 .../drivers/PostgreSQL/includepg/pgtypes_date.h    |    27 -
 .../drivers/PostgreSQL/includepg/pgtypes_error.h   |    15 -
 .../PostgreSQL/includepg/pgtypes_interval.h        |    30 -
 .../drivers/PostgreSQL/includepg/pgtypes_numeric.h |    68 -
 .../PostgreSQL/includepg/pgtypes_timestamp.h       |    33 -
 .../drivers/PostgreSQL/includepg/postgres_ext.h    |    69 -
 .../drivers/PostgreSQL/includepg/sql3types.h       |    48 -
 src/terralib/drivers/PostgreSQL/includepg/sqlca.h  |    66 -
 src/terralib/drivers/PostgreSQL/readme.txt         |    44 +
 src/terralib/drivers/libjpeg/TeLibJpegWrapper.cpp  |   216 +
 src/terralib/drivers/libjpeg/TeLibJpegWrapper.h    |    97 +
 src/terralib/drivers/libjpeg/jmemdst.c             |   157 +
 src/terralib/drivers/libjpeg/jmemdstsrc.h          |    68 +
 src/terralib/drivers/libjpeg/jmemsrc.c             |    94 +
 .../drivers/qt/TeAddressNotifyFunctorWindow.h      |    84 +
 src/terralib/drivers/qt/TeDecoderQtImage.cpp       |   125 +
 src/terralib/drivers/qt/TeDecoderQtImage.h         |    74 +
 src/terralib/drivers/qt/TeGUIUtils.cpp             |   272 +
 src/terralib/drivers/qt/TeGUIUtils.h               |    60 +
 .../qt/TeInitRasterQtDecoder.cpp                   |     0
 src/terralib/drivers/qt/TeQtAnimaThread.cpp        |   117 +
 .../{application => drivers}/qt/TeQtAnimaThread.h  |     0
 src/terralib/drivers/qt/TeQtBigTable.cpp           |   158 +
 src/terralib/drivers/qt/TeQtBigTable.h             |    51 +
 src/terralib/drivers/qt/TeQtCanvas.cpp             |  3411 +++
 src/terralib/drivers/qt/TeQtCanvas.h               |   415 +
 src/terralib/drivers/qt/TeQtChartItem.cpp          |    87 +
 src/terralib/drivers/qt/TeQtChartItem.h            |    63 +
 src/terralib/drivers/qt/TeQtCheckListItem.cpp      |    97 +
 src/terralib/drivers/qt/TeQtCheckListItem.h        |    80 +
 src/terralib/drivers/qt/TeQtColorBar.cpp           |  1100 +
 src/terralib/drivers/qt/TeQtColorBar.h             |   118 +
 src/terralib/drivers/qt/TeQtDataSource.h           |    24 +
 src/terralib/drivers/qt/TeQtDatabaseItem.cpp       |    40 +
 src/terralib/drivers/qt/TeQtDatabaseItem.h         |    51 +
 src/terralib/drivers/qt/TeQtDatabaseItemFCT.cpp    |    40 +
 src/terralib/drivers/qt/TeQtDatabaseItemFCT.h      |    52 +
 src/terralib/drivers/qt/TeQtDatabasesListView.cpp  |   292 +
 src/terralib/drivers/qt/TeQtDatabasesListView.h    |    95 +
 .../drivers/qt/TeQtDatabasesListViewFCT.cpp        |   326 +
 src/terralib/drivers/qt/TeQtDatabasesListViewFCT.h |    98 +
 src/terralib/drivers/qt/TeQtFrame.cpp              |    59 +
 src/terralib/drivers/qt/TeQtFrame.h                |    55 +
 src/terralib/drivers/qt/TeQtGLWidget.cpp           |  1403 ++
 src/terralib/drivers/qt/TeQtGLWidget.h             |   151 +
 .../{application => drivers}/qt/TeQtGraph.cpp      |     0
 .../{application => drivers}/qt/TeQtGraph.h        |     0
 src/terralib/drivers/qt/TeQtGrid.cpp               |  2941 +++
 src/terralib/drivers/qt/TeQtGrid.h                 |   253 +
 src/terralib/drivers/qt/TeQtGridSource.cpp         |   632 +
 src/terralib/drivers/qt/TeQtGridSource.h           |    87 +
 .../{application => drivers}/qt/TeQtLatEdit.cpp    |     0
 .../{application => drivers}/qt/TeQtLatEdit.h      |     0
 src/terralib/drivers/qt/TeQtLayerItem.cpp          |    43 +
 src/terralib/drivers/qt/TeQtLayerItem.h            |    49 +
 src/terralib/drivers/qt/TeQtLayerItemFCT.cpp       |    44 +
 src/terralib/drivers/qt/TeQtLayerItemFCT.h         |    49 +
 src/terralib/drivers/qt/TeQtLegendItem.cpp         |   351 +
 src/terralib/drivers/qt/TeQtLegendItem.h           |    73 +
 src/terralib/drivers/qt/TeQtLegendSource.cpp       |   848 +
 src/terralib/drivers/qt/TeQtLegendSource.h         |    64 +
 .../{application => drivers}/qt/TeQtLongEdit.cpp   |     0
 .../{application => drivers}/qt/TeQtLongEdit.h     |     0
 src/terralib/drivers/qt/TeQtMethods.cpp            |   453 +
 src/terralib/drivers/qt/TeQtMethods.h              |    76 +
 src/terralib/drivers/qt/TeQtProgress.h             |   138 +
 src/terralib/drivers/qt/TeQtShowMedia.cpp          |  1983 ++
 src/terralib/drivers/qt/TeQtShowMedia.h            |    83 +
 src/terralib/drivers/qt/TeQtTable.cpp              |   314 +
 src/terralib/drivers/qt/TeQtTable.h                |    69 +
 src/terralib/drivers/qt/TeQtTerraStat.cpp          |  1276 ++
 src/terralib/drivers/qt/TeQtTerraStat.h            |   209 +
 src/terralib/drivers/qt/TeQtTextEdit.cpp           |   862 +
 src/terralib/drivers/qt/TeQtTextEdit.h             |   150 +
 src/terralib/drivers/qt/TeQtThemeItem.cpp          |   212 +
 src/terralib/drivers/qt/TeQtThemeItem.h            |    64 +
 src/terralib/drivers/qt/TeQtThemeItemFCT.cpp       |   197 +
 src/terralib/drivers/qt/TeQtThemeItemFCT.h         |    59 +
 src/terralib/drivers/qt/TeQtViewItem.cpp           |    75 +
 src/terralib/drivers/qt/TeQtViewItem.h             |    58 +
 src/terralib/drivers/qt/TeQtViewItemFCT.cpp        |    50 +
 src/terralib/drivers/qt/TeQtViewItemFCT.h          |    54 +
 src/terralib/drivers/qt/TeQtViewsListView.cpp      |   921 +
 src/terralib/drivers/qt/TeQtViewsListView.h        |   135 +
 src/terralib/drivers/qt/TeQtViewsListViewFCT.cpp   |   885 +
 src/terralib/drivers/qt/TeQtViewsListViewFCT.h     |   154 +
 src/terralib/drivers/qt/TeWaitCursor.cpp           |    59 +
 src/terralib/drivers/qt/TeWaitCursor.h             |    52 +
 src/terralib/drivers/qt/resultVisual.h             |    37 +
 src/terralib/drivers/qwt/TeQwtPlot.cpp             |    41 +
 src/terralib/drivers/qwt/TeQwtPlot.h               |    50 +
 src/terralib/drivers/qwt/TeQwtPlotCurve.cpp        |    53 +
 src/terralib/drivers/qwt/TeQwtPlotCurve.h          |    46 +
 src/terralib/drivers/qwt/TeQwtPlotPicker.cpp       |   225 +
 src/terralib/drivers/qwt/TeQwtPlotPicker.h         |    72 +
 src/terralib/drivers/qwt/TeQwtPlotZoomer.cpp       |   192 +
 src/terralib/drivers/qwt/TeQwtPlotZoomer.h         |    58 +
 src/terralib/drivers/shapelib/TeDriverSHPDBF.cpp   |  2413 ++
 src/terralib/drivers/shapelib/TeDriverSHPDBF.h     |   277 +
 .../shapelib}/TeExportDBF.cpp                      |     0
 src/terralib/drivers/shapelib/TeExportSHP.cpp      |   663 +
 src/terralib/drivers/shapelib/TeImportDBF.cpp      |   441 +
 src/terralib/drivers/shapelib/TeImportSHP.cpp      |  1370 ++
 src/terralib/drivers/shapelib/TeQuerierSHP.cpp     |   105 +
 src/terralib/drivers/shapelib/TeQuerierSHP.h       |   118 +
 .../drivers/shapelib/TeSTEFunctionsSHP.cpp         |   126 +
 src/terralib/drivers/shapelib/TeSTEFunctionsSHP.h  |    88 +
 src/terralib/dtm/TeDTMAlgorithm.cpp                |    73 +
 src/terralib/dtm/TeDTMAlgorithm.h                  |   147 +
 src/terralib/dtm/TeDTMDefines.h                    |    73 +
 src/terralib/dtm/TeDTMParameters.cpp               |    12 +
 src/terralib/dtm/TeDTMParameters.h                 |    64 +
 src/terralib/functions/TeAddressLocator.cpp        |    12 +-
 src/terralib/functions/TeAddressLocator.h          |    12 +-
 src/terralib/functions/TeCellAlgorithms.cpp        |  1196 +-
 src/terralib/functions/TeCellAlgorithms.h          |   436 +-
 src/terralib/functions/TeCoordAlgorithms.cpp       |     3 +-
 src/terralib/functions/TeCoordAlgorithms.h         |     5 +-
 src/terralib/functions/TeDriverBNA.h               |    78 +
 src/terralib/functions/TeDriverCSV.h               |   115 +
 src/terralib/functions/TeDriverMIDMIF.h            |   119 +
 src/terralib/functions/TeDriverSPRING.h            |   116 +
 src/terralib/functions/TeExportCSV.cpp             |   183 +
 src/terralib/functions/TeExportMIF.cpp             |   420 +-
 src/terralib/functions/TeExportSHP.cpp             |   443 -
 src/terralib/functions/TeExportSPR.cpp             |  1117 +-
 .../functions/TeGeoProcessingFunctions.cpp         |  2119 +-
 src/terralib/functions/TeGeoProcessingFunctions.h  |   144 +-
 src/terralib/functions/TeImportBNA.cpp             |    27 +-
 src/terralib/functions/TeImportCSV.cpp             |   252 +
 src/terralib/functions/TeImportDBF.cpp             |   442 -
 src/terralib/functions/TeImportExport.h            |   254 +-
 src/terralib/functions/TeImportGeo.cpp             |    27 +-
 src/terralib/functions/TeImportMIF.cpp             |    82 +-
 src/terralib/functions/TeImportSHP.cpp             |   882 -
 src/terralib/functions/TeImportSPR.cpp             |     0
 src/terralib/functions/TeImportSPR.h               |     0
 src/terralib/functions/TeInterpolation.cpp         |   369 +
 src/terralib/functions/TeInterpolation.h           |   356 +
 src/terralib/functions/TeLayerFunctions.cpp        |   655 +-
 src/terralib/functions/TeLayerFunctions.h          |    33 +-
 src/terralib/functions/TeMIFProjection.cpp         |     3 +-
 src/terralib/functions/TeMIFProjection.h           |     6 +-
 src/terralib/functions/TeMemoryZonal.cpp           |    90 +
 src/terralib/functions/TeMemoryZonal.h             |    49 +
 src/terralib/functions/TeRasterIteratorSet.h       |   106 +
 src/terralib/functions/TeSPRFile.cpp               |    43 +-
 src/terralib/functions/TeSPRFile.h                 |    15 +-
 src/terralib/functions/TeSTEFunctionsSHP.cpp       |   214 -
 src/terralib/functions/TeSTEFunctionsSHP.h         |    41 -
 src/terralib/functions/TeSimilarity.cpp            |     2 +-
 src/terralib/functions/TeThemeFunctions.cpp        |    48 +-
 src/terralib/functions/TeThemeFunctions.h          |     0
 src/terralib/image_processing/TePDIAlgorithm.cpp   |   143 +
 src/terralib/image_processing/TePDIAlgorithm.hpp   |   216 +
 .../image_processing/TePDIAlgorithmFactory.cpp     |    11 +
 .../image_processing/TePDIAlgorithmFactory.hpp     |    95 +
 src/terralib/image_processing/TePDIArithmetic.cpp  |   280 +
 src/terralib/image_processing/TePDIArithmetic.hpp  |   184 +
 .../image_processing/TePDIArithmeticFactory.cpp    |    25 +
 .../image_processing/TePDIArithmeticFactory.hpp    |    69 +
 src/terralib/image_processing/TePDIBDFilter.cpp    |   454 +
 src/terralib/image_processing/TePDIBDFilter.hpp    |   116 +
 .../image_processing/TePDIBDFilterFactory.cpp      |    24 +
 .../image_processing/TePDIBDFilterFactory.hpp      |    67 +
 src/terralib/image_processing/TePDIBaatz.cpp       |  1373 ++
 src/terralib/image_processing/TePDIBaatz.hpp       |   221 +
 .../image_processing/TePDIBatchGeoMosaic.cpp       |   414 +
 .../image_processing/TePDIBatchGeoMosaic.hpp       |   147 +
 .../TePDIBatchGeoMosaicFactory.cpp                 |    26 +
 .../TePDIBatchGeoMosaicFactory.hpp                 |    69 +
 .../image_processing/TePDIBlendStratFactory.cpp    |    12 +
 .../image_processing/TePDIBlendStratFactory.hpp    |    67 +
 src/terralib/image_processing/TePDIBlending.cpp    |  1094 +
 src/terralib/image_processing/TePDIBlending.hpp    |   197 +
 .../image_processing/TePDIBlendingFactory.cpp      |    26 +
 .../image_processing/TePDIBlendingFactory.hpp      |    67 +
 .../image_processing/TePDIBlendingStrategy.cpp     |    22 +
 .../image_processing/TePDIBlendingStrategy.hpp     |    71 +
 .../image_processing/TePDIBufferedFilter.cpp       |   173 +
 .../image_processing/TePDIBufferedFilter.hpp       |   152 +
 src/terralib/image_processing/TePDICluster.cpp     |   349 +
 src/terralib/image_processing/TePDICluster.hpp     |   285 +
 .../image_processing/TePDIColorTransform.cpp       |   586 +
 .../image_processing/TePDIColorTransform.hpp       |   152 +
 .../TePDIColorTransformFactory.cpp                 |    24 +
 .../TePDIColorTransformFactory.hpp                 |    67 +
 src/terralib/image_processing/TePDIContrast.cpp    |  1739 ++
 src/terralib/image_processing/TePDIContrast.hpp    |   411 +
 .../image_processing/TePDIContrastFactory.cpp      |    24 +
 .../image_processing/TePDIContrastFactory.hpp      |    67 +
 .../image_processing/TePDICorrelationMatching.cpp  |  1027 +
 .../image_processing/TePDICorrelationMatching.hpp  |   187 +
 .../TePDIDecorrelationEnhancement.cpp              |   170 +
 .../TePDIDecorrelationEnhancement.hpp              |    88 +
 src/terralib/image_processing/TePDIDefines.hpp     |   128 +
 src/terralib/image_processing/TePDIEMClas.cpp      |   428 +
 src/terralib/image_processing/TePDIEMClas.hpp      |   142 +
 .../image_processing/TePDIEMClasFactory.cpp        |    25 +
 .../image_processing/TePDIEMClasFactory.hpp        |    68 +
 src/terralib/image_processing/TePDIEspecData.cpp   |    95 +
 src/terralib/image_processing/TePDIEspecData.hpp   |    67 +
 .../image_processing/TePDIEuclidianBlendSF.cpp     |    20 +
 .../image_processing/TePDIEuclidianBlendSF.hpp     |    67 +
 .../TePDIEuclidianBlendStrategy.cpp                |   988 +
 .../TePDIEuclidianBlendStrategy.hpp                |   169 +
 src/terralib/image_processing/TePDIFilterMask.cpp  |   657 +
 src/terralib/image_processing/TePDIFilterMask.hpp  |   345 +
 src/terralib/image_processing/TePDIFusion.cpp      |    51 +
 src/terralib/image_processing/TePDIFusion.hpp      |    96 +
 .../image_processing/TePDIFusionFactory.cpp        |    26 +
 .../image_processing/TePDIFusionFactory.hpp        |    67 +
 .../image_processing/TePDIGarguetFusionSF.cpp      |    21 +
 .../image_processing/TePDIGarguetFusionSF.hpp      |    70 +
 .../TePDIGarguetFusionStrategy.cpp                 |   329 +
 .../TePDIGarguetFusionStrategy.hpp                 |   133 +
 src/terralib/image_processing/TePDIGeoMosaic.cpp   |   280 +
 src/terralib/image_processing/TePDIGeoMosaic.hpp   |   110 +
 .../image_processing/TePDIGeoMosaicFactory.cpp     |    26 +
 .../image_processing/TePDIGeoMosaicFactory.hpp     |    68 +
 src/terralib/image_processing/TePDIHaralick.cpp    |   605 +
 src/terralib/image_processing/TePDIHaralick.hpp    |   311 +
 src/terralib/image_processing/TePDIHistogram.cpp   |  1296 ++
 src/terralib/image_processing/TePDIHistogram.hpp   |   329 +
 src/terralib/image_processing/TePDIIHSFusionSF.cpp |    21 +
 src/terralib/image_processing/TePDIIHSFusionSF.hpp |    70 +
 .../image_processing/TePDIIHSFusionStrategy.cpp    |   317 +
 .../image_processing/TePDIIHSFusionStrategy.hpp    |    92 +
 .../image_processing/TePDIInterpolator.cpp         |   384 +
 .../image_processing/TePDIInterpolator.hpp         |   298 +
 src/terralib/image_processing/TePDIIsosegClas.cpp  |   397 +
 src/terralib/image_processing/TePDIIsosegClas.hpp  |   145 +
 .../image_processing/TePDIIsosegClasFactory.cpp    |    25 +
 .../image_processing/TePDIIsosegClasFactory.hpp    |    68 +
 .../image_processing/TePDIJointHistogram.cpp       |  1026 +
 .../image_processing/TePDIJointHistogram.hpp       |   191 +
 src/terralib/image_processing/TePDIKMeansClas.cpp  |   344 +
 src/terralib/image_processing/TePDIKMeansClas.hpp  |   208 +
 .../image_processing/TePDIKMeansClasFactory.cpp    |    25 +
 .../image_processing/TePDIKMeansClasFactory.hpp    |    68 +
 src/terralib/image_processing/TePDILevelRemap.cpp  |   520 +
 src/terralib/image_processing/TePDILevelRemap.hpp  |   183 +
 .../image_processing/TePDILinearFilter.cpp         |   373 +
 .../image_processing/TePDILinearFilter.hpp         |    96 +
 .../image_processing/TePDILinearFilterFactory.cpp  |    25 +
 .../image_processing/TePDILinearFilterFactory.hpp  |    67 +
 src/terralib/image_processing/TePDIMIMatching.cpp  |  1238 +
 src/terralib/image_processing/TePDIMIMatching.hpp  |   190 +
 .../image_processing/TePDIMMIOMatching.cpp         |  2783 +++
 .../image_processing/TePDIMMIOMatching.hpp         |   492 +
 .../image_processing/TePDIMallatWavelets.cpp       |  2017 ++
 .../image_processing/TePDIMallatWavelets.hpp       |   485 +
 .../image_processing/TePDIMathFunctions.cpp        |    31 +
 .../image_processing/TePDIMathFunctions.hpp        |    80 +
 src/terralib/image_processing/TePDIMatrix.hpp      |   829 +
 .../image_processing/TePDIMatrixFunctions.cpp      |   140 +
 .../image_processing/TePDIMatrixFunctions.hpp      |    92 +
 src/terralib/image_processing/TePDIMixModel.cpp    |    42 +
 src/terralib/image_processing/TePDIMixModel.hpp    |    98 +
 .../image_processing/TePDIMixModelComponent.cpp    |    49 +
 .../image_processing/TePDIMixModelComponent.hpp    |    88 +
 .../TePDIMixModelComponentList.cpp                 |    79 +
 .../TePDIMixModelComponentList.hpp                 |   107 +
 .../image_processing/TePDIMixModelFactory.cpp      |    21 +
 .../image_processing/TePDIMixModelFactory.hpp      |    59 +
 .../image_processing/TePDIMixModelSpectralBand.cpp |    39 +
 .../image_processing/TePDIMixModelSpectralBand.hpp |    98 +
 .../TePDIMixModelSpectralBandList.cpp              |    54 +
 .../TePDIMixModelSpectralBandList.hpp              |    83 +
 .../image_processing/TePDIMixModelStratFactory.cpp |    12 +
 .../image_processing/TePDIMixModelStratFactory.hpp |    66 +
 .../image_processing/TePDIMixModelStrategy.cpp     |    22 +
 .../image_processing/TePDIMixModelStrategy.hpp     |    72 +
 src/terralib/image_processing/TePDIMorfFilter.cpp  |  1335 ++
 src/terralib/image_processing/TePDIMorfFilter.hpp  |   138 +
 .../image_processing/TePDIMorfFilterFactory.cpp    |    24 +
 .../image_processing/TePDIMorfFilterFactory.hpp    |    67 +
 .../image_processing/TePDIMtxDoubleAdpt.hpp        |   140 +
 src/terralib/image_processing/TePDINoBlendSF.cpp   |    20 +
 src/terralib/image_processing/TePDINoBlendSF.hpp   |    67 +
 .../image_processing/TePDINoBlendStrategy.cpp      |   265 +
 .../image_processing/TePDINoBlendStrategy.hpp      |   116 +
 src/terralib/image_processing/TePDIOFMatching.cpp  |  2560 +++
 src/terralib/image_processing/TePDIOFMatching.hpp  |   347 +
 src/terralib/image_processing/TePDIPIManager.cpp   |   189 +
 src/terralib/image_processing/TePDIPIManager.hpp   |   137 +
 .../TePDIPIManagerGlobalSettings.hpp               |    98 +
 src/terralib/image_processing/TePDIParameters.cpp  |    65 +
 src/terralib/image_processing/TePDIParameters.hpp  |   176 +
 .../image_processing/TePDIPrincipalComponents.cpp  |   409 +
 .../image_processing/TePDIPrincipalComponents.hpp  |   114 +
 .../TePDIPrincipalComponentsFactory.cpp            |    24 +
 .../TePDIPrincipalComponentsFactory.hpp            |    68 +
 .../TePDIPrincipalComponentsFusion.cpp             |   241 +
 .../TePDIPrincipalComponentsFusion.hpp             |   107 +
 .../image_processing/TePDIPrincoMixModelSF.cpp     |    21 +
 .../image_processing/TePDIPrincoMixModelSF.hpp     |    59 +
 .../TePDIPrincoMixModelStrategy.cpp                |   555 +
 .../TePDIPrincoMixModelStrategy.hpp                |    95 +
 src/terralib/image_processing/TePDIRadarFilter.cpp |    19 +
 src/terralib/image_processing/TePDIRadarFilter.hpp |    70 +
 .../image_processing/TePDIRadarFrostFilter.cpp     |   377 +
 .../image_processing/TePDIRadarFrostFilter.hpp     |   108 +
 .../TePDIRadarFrostFilterFactory.cpp               |    24 +
 .../TePDIRadarFrostFilterFactory.hpp               |    67 +
 .../image_processing/TePDIRadarKuanFilter.cpp      |   633 +
 .../image_processing/TePDIRadarKuanFilter.hpp      |   134 +
 .../TePDIRadarKuanFilterFactory.cpp                |    24 +
 .../TePDIRadarKuanFilterFactory.hpp                |    67 +
 .../image_processing/TePDIRadarLeeFilter.cpp       |   635 +
 .../image_processing/TePDIRadarLeeFilter.hpp       |   134 +
 .../TePDIRadarLeeFilterFactory.cpp                 |    24 +
 .../TePDIRadarLeeFilterFactory.hpp                 |    67 +
 .../image_processing/TePDIRaster2Vector.cpp        |   886 +
 .../image_processing/TePDIRaster2Vector.hpp        |   315 +
 .../image_processing/TePDIRaster2VectorFactory.cpp |    24 +
 .../image_processing/TePDIRaster2VectorFactory.hpp |    67 +
 .../image_processing/TePDIRasterRUBuffer.cpp       |   146 +
 .../image_processing/TePDIRasterRUBuffer.hpp       |    87 +
 src/terralib/image_processing/TePDIRegGrowSeg.cpp  |   998 +
 src/terralib/image_processing/TePDIRegGrowSeg.hpp  |   755 +
 .../image_processing/TePDIRegGrowSegFactory.cpp    |    26 +
 .../image_processing/TePDIRegGrowSegFactory.hpp    |    68 +
 src/terralib/image_processing/TePDIRegion.cpp      |    43 +
 src/terralib/image_processing/TePDIRegion.hpp      |   172 +
 src/terralib/image_processing/TePDIRegister.cpp    |   330 +
 src/terralib/image_processing/TePDIRegister.hpp    |   111 +
 .../image_processing/TePDIRegisterFactory.cpp      |    26 +
 .../image_processing/TePDIRegisterFactory.hpp      |    68 +
 src/terralib/image_processing/TePDIRgbPalette.cpp  |    12 +
 src/terralib/image_processing/TePDIRgbPalette.hpp  |    66 +
 .../image_processing/TePDIRgbPaletteFunctions.cpp  |    57 +
 .../image_processing/TePDIRgbPaletteFunctions.hpp  |    45 +
 .../image_processing/TePDIRgbPaletteNode.hpp       |    94 +
 .../image_processing/TePDISensorSimulator.cpp      |   259 +
 .../image_processing/TePDISensorSimulator.hpp      |   107 +
 .../TePDISensorSimulatorFactory.cpp                |    27 +
 .../TePDISensorSimulatorFactory.hpp                |    68 +
 src/terralib/image_processing/TePDIStatistic.cpp   |  1172 +
 src/terralib/image_processing/TePDIStatistic.hpp   |   505 +
 src/terralib/image_processing/TePDIStrategy.cpp    |    35 +
 src/terralib/image_processing/TePDIStrategy.hpp    |   119 +
 .../image_processing/TePDIStrategyFactory.cpp      |    11 +
 .../image_processing/TePDIStrategyFactory.hpp      |    79 +
 src/terralib/image_processing/TePDITypes.hpp       |   136 +
 src/terralib/image_processing/TePDIUtils.cpp       |  1594 ++
 src/terralib/image_processing/TePDIUtils.hpp       |   631 +
 .../image_processing/TePDIVenturaFusionSF.cpp      |    21 +
 .../image_processing/TePDIVenturaFusionSF.hpp      |    70 +
 .../TePDIVenturaFusionStrategy.cpp                 |   522 +
 .../TePDIVenturaFusionStrategy.hpp                 |   143 +
 .../image_processing/TePDIWaveletAtrous.cpp        |   375 +
 .../image_processing/TePDIWaveletAtrous.hpp        |   113 +
 .../image_processing/data_structs/TeTileIndexer.h  |   242 +
 src/terralib/kernel/Gra_algo.h                     |     4 +-
 src/terralib/kernel/TeAbstractFactory.h            |   145 +
 src/terralib/kernel/TeAbstractTheme.cpp            |  1294 ++
 src/terralib/kernel/TeAbstractTheme.h              |   688 +
 src/terralib/kernel/TeAffineGT.cpp                 |   227 +
 src/terralib/kernel/TeAffineGT.h                   |   103 +
 src/terralib/kernel/TeAffineGTFactory.cpp          |    48 +
 src/terralib/kernel/TeAffineGTFactory.h            |    71 +
 src/terralib/kernel/TeAgnostic.cpp                 |    14 +
 src/terralib/kernel/TeAgnostic.h                   |   397 +
 src/terralib/kernel/TeAsciiFile.cpp                |    22 +-
 src/terralib/kernel/TeAsciiFile.h                  |    11 +-
 src/terralib/kernel/TeAssertions.h                 |    45 +-
 src/terralib/kernel/TeAttribute.h                  |    51 +-
 src/terralib/kernel/TeBaseSTInstance.h             |   552 +
 src/terralib/kernel/TeBaseSTInstanceSet.h          |  1212 +
 src/terralib/kernel/TeBlockLoader.cpp              |   171 +
 src/terralib/kernel/TeBlockLoader.h                |    95 +
 src/terralib/kernel/TeBox.cpp                      |    30 +-
 src/terralib/kernel/TeBox.h                        |    46 +-
 src/terralib/kernel/TeBufferRegion.cpp             |  1049 +-
 src/terralib/kernel/TeBufferRegion.h               |   126 +-
 src/terralib/kernel/TeCentroid.cpp                 |   161 +-
 src/terralib/kernel/TeCommunicator.h               |   413 +
 src/terralib/kernel/TeComposite.h                  |    23 +-
 .../kernel/TeComputeAttributeStrategies.cpp        |  1161 +-
 src/terralib/kernel/TeComputeAttributeStrategies.h |  1295 +-
 src/terralib/kernel/TeConsoleErrorMessage.cpp      |     0
 src/terralib/kernel/TeConsoleErrorMessage.h        |     5 +-
 src/terralib/kernel/TeCoord2D.h                    |    66 +-
 src/terralib/kernel/TeCounted.h                    |    15 +-
 src/terralib/kernel/TeCoverage.h                   |   378 +
 src/terralib/kernel/TeCoverageDecoder.h            |   186 +
 src/terralib/kernel/TeCoverageDecoderCacheLRU.h    |   190 +
 src/terralib/kernel/TeCoverageDecoderDatabase.h    |   391 +
 src/terralib/kernel/TeCoverageImport.h             |   678 +
 src/terralib/kernel/TeCoverageImportUtils.cpp      |   286 +
 src/terralib/kernel/TeCoverageImportUtils.h        |    48 +
 src/terralib/kernel/TeCoverageInterpolator.h       |   102 +
 src/terralib/kernel/TeCoverageInterpolatorNN.h     |   256 +
 src/terralib/kernel/TeCoverageParams.h             |   249 +
 src/terralib/kernel/TeCoverageUtils.cpp            |   293 +
 src/terralib/kernel/TeCoverageUtils.h              |    56 +
 src/terralib/kernel/TeDBConnectionsPool.cpp        |   524 +
 src/terralib/kernel/TeDBConnectionsPool.h          |    75 +
 src/terralib/kernel/TeDataTypes.h                  |    44 +-
 src/terralib/kernel/TeDatabase.cpp                 |  6482 ++++--
 src/terralib/kernel/TeDatabase.h                   |   550 +-
 src/terralib/kernel/TeDatabaseFactory.cpp          |    36 +
 src/terralib/kernel/TeDatabaseFactory.h            |    58 +
 src/terralib/kernel/TeDatabaseFactoryParams.cpp    |    77 +
 src/terralib/kernel/TeDatabaseFactoryParams.h      |    71 +
 src/terralib/kernel/TeDatum.cpp                    |   310 +-
 src/terralib/kernel/TeDatum.h                      |    58 +-
 src/terralib/kernel/TeDecoder.h                    |   121 +-
 src/terralib/kernel/TeDecoderASCIIGrid.cpp         |   149 +-
 src/terralib/kernel/TeDecoderASCIIGrid.h           |    69 +-
 src/terralib/kernel/TeDecoderDatabase.cpp          |   309 +-
 src/terralib/kernel/TeDecoderDatabase.h            |    31 +-
 src/terralib/kernel/TeDecoderFile.cpp              |    62 +-
 src/terralib/kernel/TeDecoderFile.h                |    29 +-
 src/terralib/kernel/TeDecoderJPEG.cpp              |   245 +-
 src/terralib/kernel/TeDecoderJPEG.h                |    43 +-
 src/terralib/kernel/TeDecoderMemory.cpp            |   656 +-
 src/terralib/kernel/TeDecoderMemory.h              |   259 +-
 src/terralib/kernel/TeDecoderMemoryMap.cpp         |   568 +-
 src/terralib/kernel/TeDecoderMemoryMap.h           |    43 +-
 src/terralib/kernel/TeDecoderSPR.cpp               |   179 +-
 src/terralib/kernel/TeDecoderSPR.h                 |    54 +-
 src/terralib/kernel/TeDecoderSmartMem.cpp          |   539 +
 src/terralib/kernel/TeDecoderSmartMem.h            |   382 +
 src/terralib/kernel/TeDecoderTIFF.cpp              |  1900 +-
 src/terralib/kernel/TeDecoderTIFF.h                |   256 +-
 src/terralib/kernel/TeDecoderVirtualMemory.cpp     |   207 +-
 src/terralib/kernel/TeDecoderVirtualMemory.h       |   187 +-
 src/terralib/kernel/TeDefines.h                    |   239 +-
 src/terralib/kernel/TeErrorLog.cpp                 |    41 +-
 src/terralib/kernel/TeErrorLog.h                   |     9 +-
 src/terralib/kernel/TeErrorMessage.cpp             |     2 +-
 src/terralib/kernel/TeErrorMessage.h               |     9 +-
 src/terralib/kernel/TeException.cpp                |     7 +-
 src/terralib/kernel/TeException.h                  |    10 +-
 src/terralib/kernel/TeExternalTheme.cpp            |  1486 ++
 src/terralib/kernel/TeExternalTheme.h              |   404 +
 src/terralib/kernel/TeFactory.h                    |     8 +-
 src/terralib/kernel/TeFileTheme.cpp                |   496 +
 src/terralib/kernel/TeFileTheme.h                  |   212 +
 src/terralib/kernel/TeFragmentation.cpp            |   522 +-
 src/terralib/kernel/TeFragmentation.h              |    37 +-
 src/terralib/kernel/TeFunctionCallThreadJob.cpp    |    25 +
 src/terralib/kernel/TeFunctionCallThreadJob.h      |    67 +
 src/terralib/kernel/TeGTFactory.cpp                |    32 +
 src/terralib/kernel/TeGTFactory.h                  |    78 +
 src/terralib/kernel/TeGTParams.cpp                 |   112 +
 src/terralib/kernel/TeGTParams.h                   |   249 +
 src/terralib/kernel/TeGeneralizedProxMatrix.cpp    |   433 -
 src/terralib/kernel/TeGeneralizedProxMatrix.h      |   545 +-
 src/terralib/kernel/TeGeoDataDriver.h              |    70 +
 src/terralib/kernel/TeGeometricTransformation.cpp  |  1217 +
 src/terralib/kernel/TeGeometricTransformation.h    |   486 +
 src/terralib/kernel/TeGeometry.cpp                 |    47 +-
 src/terralib/kernel/TeGeometry.h                   |   139 +-
 src/terralib/kernel/TeGeometryAlgorithms.cpp       |   236 +-
 src/terralib/kernel/TeGeometryAlgorithms.h         |   827 +-
 src/terralib/kernel/TeGraph.cpp                    |     8 +-
 src/terralib/kernel/TeGraph.h                      |    10 +-
 src/terralib/kernel/TeGridIndex.h                  |   413 +
 src/terralib/kernel/TeGroupingAlgorithms.cpp       |    26 +-
 src/terralib/kernel/TeGroupingAlgorithms.h         |    43 +-
 src/terralib/kernel/TeImportRaster.cpp             |   726 +-
 src/terralib/kernel/TeImportRaster.h               |    40 +-
 src/terralib/kernel/TeInitQuerierStrategy.cpp      |    41 -
 src/terralib/kernel/TeInitQuerierStrategy.h        |    32 -
 src/terralib/kernel/TeInitRasterDecoders.cpp       |    58 +-
 src/terralib/kernel/TeInitRasterDecoders.h         |    52 +-
 src/terralib/kernel/TeIntersector.cpp              |   874 +-
 src/terralib/kernel/TeIntersector.h                |   494 +-
 src/terralib/kernel/TeKdTree.h                     |  1190 +
 src/terralib/kernel/TeLayer.cpp                    |   719 +-
 src/terralib/kernel/TeLayer.h                      |   252 +-
 src/terralib/kernel/TeLegendEntry.cpp              |   174 +
 src/terralib/kernel/TeLegendEntry.h                |   118 +-
 src/terralib/kernel/TeMappedMemory.cpp             |   421 +
 src/terralib/kernel/TeMappedMemory.h               |   232 +
 src/terralib/kernel/TeMatrix.cpp                   |    52 +-
 src/terralib/kernel/TeMatrix.h                     |    63 +-
 src/terralib/kernel/TeMeasure.h                    |     8 +-
 src/terralib/kernel/TeMetaModelCache.cpp           |    40 +
 src/terralib/kernel/TeMetaModelCache.h             |   118 +
 src/terralib/kernel/TeMultiContainer.h             |   625 +
 src/terralib/kernel/TeMultiGeometry.cpp            |   110 +-
 src/terralib/kernel/TeMultiGeometry.h              |    91 +-
 src/terralib/kernel/TeMutex.cpp                    |    59 +
 src/terralib/kernel/TeMutex.h                      |   179 +
 src/terralib/kernel/TeNeighbours.cpp               |     2 +-
 src/terralib/kernel/TeNeighbours.h                 |    23 +-
 src/terralib/kernel/TeNetwork.cpp                  |     2 +-
 src/terralib/kernel/TeNetwork.h                    |    14 +-
 src/terralib/kernel/TeOverlay.cpp                  |  1226 +-
 src/terralib/kernel/TeOverlay.h                    |   202 +-
 src/terralib/kernel/TeOverlayUtils.cpp             |  1222 +
 src/terralib/kernel/TeOverlayUtils.h               |   172 +
 src/terralib/kernel/TePieBar.h                     |    30 +-
 src/terralib/kernel/TePrecision.h                  |    38 +-
 src/terralib/kernel/TeProgress.cpp                 |     8 +-
 src/terralib/kernel/TeProgress.h                   |    29 +-
 src/terralib/kernel/TeProgressBase.h               |     9 +-
 src/terralib/kernel/TeProject.cpp                  |   291 +
 src/terralib/kernel/TeProject.h                    |   176 +
 src/terralib/kernel/TeProjection.cpp               |   700 +-
 src/terralib/kernel/TeProjection.h                 |   206 +-
 src/terralib/kernel/TeProjectiveGT.cpp             |   589 +
 src/terralib/kernel/TeProjectiveGT.h               |   123 +
 src/terralib/kernel/TeProjectiveGTFactory.cpp      |    49 +
 src/terralib/kernel/TeProjectiveGTFactory.h        |    67 +
 src/terralib/kernel/TePrototype.h                  |    30 +-
 .../kernel/TeProxMatrixConstructionStrategy.cpp    |   513 +-
 .../kernel/TeProxMatrixConstructionStrategy.h      |   339 +-
 src/terralib/kernel/TeProxMatrixImplementation.cpp |   293 +-
 src/terralib/kernel/TeProxMatrixImplementation.h   |   107 +-
 src/terralib/kernel/TeProxMatrixSlicingStrategy.h  |    60 +-
 src/terralib/kernel/TeProxMatrixStrategies.cpp     |    46 +-
 src/terralib/kernel/TeProxMatrixWeightsStrategy.h  |   104 +-
 src/terralib/kernel/TeQuerier.cpp                  |    64 +-
 src/terralib/kernel/TeQuerier.h                    |   100 +-
 src/terralib/kernel/TeQuerierDB.cpp                |   388 +-
 src/terralib/kernel/TeQuerierDB.h                  |   139 +-
 src/terralib/kernel/TeQuerierDBStr1.cpp            |   980 +-
 src/terralib/kernel/TeQuerierDBStr1.h              |   123 +-
 src/terralib/kernel/TeQuerierDBStr2.cpp            |   163 +-
 src/terralib/kernel/TeQuerierDBStr2.h              |    50 +-
 src/terralib/kernel/TeQuerierDBStr3.cpp            |   227 +-
 src/terralib/kernel/TeQuerierDBStr3.h              |    59 +-
 src/terralib/kernel/TeQuerierImpl.cpp              |    63 +-
 src/terralib/kernel/TeQuerierImpl.h                |   109 +-
 src/terralib/kernel/TeQuerierParams.cpp            |    42 +-
 src/terralib/kernel/TeQuerierParams.h              |   191 +-
 src/terralib/kernel/TeQuerierSHP.h                 |    70 -
 src/terralib/kernel/TeRTree.h                      |   980 +
 src/terralib/kernel/TeRaster.cpp                   |   522 +-
 src/terralib/kernel/TeRaster.h                     |   512 +-
 src/terralib/kernel/TeRasterMemManager.cpp         |   503 +
 src/terralib/kernel/TeRasterMemManager.h           |   257 +
 src/terralib/kernel/TeRasterParams.cpp             |   522 +-
 src/terralib/kernel/TeRasterParams.h               |   401 +-
 src/terralib/kernel/TeRasterRemap.cpp              |    86 +-
 src/terralib/kernel/TeRasterRemap.h                |    39 +-
 src/terralib/kernel/TeRasterTransform.cpp          |    30 +-
 src/terralib/kernel/TeRasterTransform.h            |   186 +-
 src/terralib/kernel/TeRedBlackTree.h               |    42 +-
 src/terralib/kernel/TeRepresentation.cpp           |     2 +-
 src/terralib/kernel/TeRepresentation.h             |    25 +-
 src/terralib/kernel/TeSTEFunctionsDB.cpp           |   623 -
 src/terralib/kernel/TeSTEFunctionsDB.h             |   405 +-
 src/terralib/kernel/TeSTElement.cpp                |   196 -
 src/terralib/kernel/TeSTElement.h                  |   148 -
 src/terralib/kernel/TeSTElementSet.cpp             |   558 +-
 src/terralib/kernel/TeSTElementSet.h               |   267 +-
 src/terralib/kernel/TeSTEvent.cpp                  |   379 +-
 src/terralib/kernel/TeSTEvent.h                    |   292 +-
 src/terralib/kernel/TeSTInstance.cpp               |   397 +-
 src/terralib/kernel/TeSTInstance.h                 |   283 +-
 src/terralib/kernel/TeSharedPtr.h                  |   435 +
 src/terralib/kernel/TeSingleton.h                  |     9 +-
 src/terralib/kernel/TeSlice.h                      |    26 +-
 src/terralib/kernel/TeSparseMatrix.h               |     2 +
 src/terralib/kernel/TeSpatialOperations.cpp        |   219 +-
 src/terralib/kernel/TeSpatialOperations.h          |   127 +-
 src/terralib/kernel/TeStatistics.h                 |   180 +-
 src/terralib/kernel/TeStdFile.cpp                  |     2 +-
 src/terralib/kernel/TeStdFile.h                    |     9 +-
 src/terralib/kernel/TeStdIOProgress.cpp            |    78 +
 src/terralib/kernel/TeStdIOProgress.h              |    93 +-
 src/terralib/kernel/TeTable.cpp                    |    42 +-
 src/terralib/kernel/TeTable.h                      |    20 +-
 src/terralib/kernel/TeTempFilesRemover.cpp         |   137 +
 src/terralib/kernel/TeTempFilesRemover.h           |    93 +
 src/terralib/kernel/TeTemporalSeries.cpp           |    13 +-
 src/terralib/kernel/TeTemporalSeries.h             |    27 +-
 src/terralib/kernel/TeTheme.cpp                    |  2049 +-
 src/terralib/kernel/TeTheme.h                      |   928 +-
 src/terralib/kernel/TeThread.cpp                   |   285 +
 src/terralib/kernel/TeThread.h                     |   157 +
 src/terralib/kernel/TeThreadDatatypes.h            |    59 +
 src/terralib/kernel/TeThreadFunctor.cpp            |    76 +
 src/terralib/kernel/TeThreadFunctor.h              |   133 +
 src/terralib/kernel/TeThreadJob.cpp                |     9 +
 src/terralib/kernel/TeThreadJob.h                  |    56 +
 src/terralib/kernel/TeThreadJobsManager.cpp        |   343 +
 src/terralib/kernel/TeThreadJobsManager.h          |   144 +
 src/terralib/kernel/TeThreadParameters.h           |    40 +
 src/terralib/kernel/TeThreadSignal.cpp             |   192 +
 src/terralib/kernel/TeThreadSignal.h               |   141 +
 src/terralib/kernel/TeTime.cpp                     |    78 +-
 src/terralib/kernel/TeTime.h                       |    49 +-
 src/terralib/kernel/TeTimeInterval.cpp             |    10 +-
 src/terralib/kernel/TeTimeInterval.h               |    49 +-
 src/terralib/kernel/TeTin.cpp                      |   658 +-
 src/terralib/kernel/TeTin.h                        |   236 +-
 src/terralib/kernel/TeUtils.cpp                    |   492 +-
 src/terralib/kernel/TeUtils.h                      |   210 +-
 src/terralib/kernel/TeVectorRemap.cpp              |    73 +-
 src/terralib/kernel/TeVectorRemap.h                |    50 +-
 src/terralib/kernel/TeVersion.h                    |    37 +
 src/terralib/kernel/TeView.h                       |   118 +-
 src/terralib/kernel/TeViewNode.cpp                 |   362 +
 src/terralib/kernel/TeViewNode.h                   |   419 +-
 src/terralib/kernel/TeViewTreeIterator.cpp         |     0
 src/terralib/kernel/TeViewTreeIterator.h           |     6 +-
 src/terralib/kernel/TeViewTreeUtils.cpp            |     0
 src/terralib/kernel/TeViewTreeUtils.h              |     4 +-
 src/terralib/kernel/TeVisual.cpp                   |   258 +
 src/terralib/kernel/TeVisual.h                     |   448 +-
 src/terralib/kernel/checkvec.h                     |    75 +-
 src/terralib/kernel/dynpq.h                        |   301 +-
 src/terralib/kernel/gra_util.h                     |     0
 src/terralib/kernel/graph.h                        |   614 +-
 src/terralib/kernel/ijl.h                          |  1513 --
 src/terralib/kernel/jpeg.cpp                       |   452 -
 src/terralib/kernel/jpeg.h                         |    95 -
 src/terralib/kernel/lexTemporal.cpp                |    13 +-
 src/terralib/kernel/showseq.h                      |     0
 src/terralib/kernel/yyTemporal.cpp                 |     6 +-
 src/terralib/kernel/yyTemporal.h                   |     2 +-
 src/terralib/stat/TeBayesFunctions.cpp             |   172 +-
 src/terralib/stat/TeBayesFunctions.h               |   163 +-
 src/terralib/stat/TeKMeansGrouping.h               |     5 +-
 src/terralib/stat/TeKernelFunctions.cpp            |     3 +-
 src/terralib/stat/TeKernelFunctions.h              |    47 +-
 src/terralib/stat/TeKernelParams.h                 |    10 +-
 .../{application => stat}/TeMSVFactory.cpp         |     0
 src/terralib/stat/TeMSVFactory.h                   |   191 +
 .../TeSemivarModelFactory.cpp                      |     0
 src/terralib/stat/TeSemivarModelFactory.h          |   154 +
 src/terralib/stat/TeSkaterArvore.cpp               |     0
 src/terralib/stat/TeSkaterArvore.h                 |     4 +-
 src/terralib/stat/TeSkaterFunctions.cpp            |    99 +-
 src/terralib/stat/TeSkaterFunctions.h              |    87 +-
 src/terralib/stat/TeSkaterGrafo.cpp                |   111 -
 src/terralib/stat/TeSkaterGrafo.h                  |   133 +-
 src/terralib/stat/TeSpatialStatistics.cpp          |   987 -
 src/terralib/stat/TeSpatialStatistics.h            |   833 +-
 src/terralib/stat/TeStatDataStructures.cpp         |    50 +-
 src/terralib/stat/TeStatDataStructures.h           |   133 +-
 src/terralib/stat/TeStatDefines.h                  |    56 +
 src/terralib/stat/TeTreeMinimum.cpp                |   314 +-
 src/terralib/stat/TeTreeMinimum.h                  |    33 +-
 src/terralib/stat/erro.h                           |     0
 src/terralib/stat/filaDouble.cpp                   |     0
 src/terralib/stat/filaDouble.h                     |     5 +-
 src/terralib/stat/filaInt.cpp                      |     0
 src/terralib/stat/filaInt.h                        |     6 +-
 src/terralib/stat/filaR.cpp                        |     0
 src/terralib/stat/filaR.h                          |     4 +-
 src/terralib/stat/hash.cpp                         |     6 +
 src/terralib/stat/hash.h                           |     7 +
 src/terralib/stat/heap.cpp                         |     1 +
 src/terralib/stat/heap.h                           |     4 +-
 src/terralib/stat/lista.cpp                        |     6 +
 src/terralib/stat/lista.h                          |     4 +-
 src/terralib/utils/TeColorUtils.cpp                |   750 +
 src/terralib/utils/TeColorUtils.h                  |    92 +
 src/terralib/utils/TeDatabaseUtils.cpp             |   582 +
 src/terralib/utils/TeDatabaseUtils.h               |   122 +
 src/terralib/utils/TeUpdateDBVersion.cpp           |  1641 ++
 src/terralib/utils/TeUpdateDBVersion.h             |    66 +
 src/terralib/utils/TeWKBGeometryDecoder.cpp        |   372 +
 src/terralib/utils/TeWKBGeometryDecoder.h          |    94 +
 src/tiff/cpl_csv.c                                 |  1013 -
 src/tiff/cpl_csv.h                                 |    86 -
 src/tiff/cpl_serv.c                                |   599 -
 src/tiff/cpl_serv.h                                |   276 -
 src/tiff/csv/README                                |    38 -
 src/tiff/csv/alias.csv                             |  2001 --
 src/tiff/csv/area.csv                              |  1751 --
 src/tiff/csv/codes.csv                             |    84 -
 src/tiff/csv/compd_cs.c                            |    12 -
 src/tiff/csv/compd_cs.csv                          |     9 -
 src/tiff/csv/coordinate_axis.csv                   |    75 -
 src/tiff/csv/coordinate_axis_name.csv              |    29 -
 src/tiff/csv/coordinate_operation.csv              |  2020 --
 src/tiff/csv/coordinate_operation_method.csv       |  1513 --
 src/tiff/csv/coordinate_operation_parameter.csv    |    99 -
 .../csv/coordinate_operation_parameter_value.csv   |  8406 -------
 src/tiff/csv/coordinate_operation_path.csv         |   336 -
 src/tiff/csv/coordinate_reference_system.csv       |  2609 ---
 src/tiff/csv/coordinate_system.csv                 |    38 -
 src/tiff/csv/datum.csv                             |   332 -
 src/tiff/csv/deprecation.csv                       |   276 -
 src/tiff/csv/ellips_alias.c                        |    10 -
 src/tiff/csv/ellips_alias.csv                      |     7 -
 src/tiff/csv/ellipsoid.c                           |    42 -
 src/tiff/csv/ellipsoid.csv                         |    39 -
 src/tiff/csv/gcs.csv                               |   278 -
 src/tiff/csv/gdatum_alias.c                        |    11 -
 src/tiff/csv/gdatum_alias.csv                      |     8 -
 src/tiff/csv/geod_datum.c                          |   213 -
 src/tiff/csv/geod_datum.csv                        |   210 -
 src/tiff/csv/geod_trf.c                            |   492 -
 src/tiff/csv/geod_trf.csv                          |   489 -
 src/tiff/csv/horiz_cs.c                            |  1496 --
 src/tiff/csv/horiz_cs.csv                          |  1493 --
 src/tiff/csv/naming_system.csv                     |    13 -
 src/tiff/csv/p_meridian.c                          |    17 -
 src/tiff/csv/p_meridian.csv                        |    14 -
 src/tiff/csv/pcs.csv                               |  2251 --
 src/tiff/csv/prime_meridian.csv                    |    14 -
 src/tiff/csv/projop_wparm.csv                      |  1083 -
 src/tiff/csv/stateplane.csv                        |   258 -
 src/tiff/csv/trf_method.c                          |   205 -
 src/tiff/csv/trf_method.csv                        |   984 -
 src/tiff/csv/trf_nonpolynomial.c                   |  1082 -
 src/tiff/csv/trf_nonpolynomial.csv                 |  1079 -
 src/tiff/csv/trf_path.c                            |   568 -
 src/tiff/csv/trf_path.csv                          |   565 -
 src/tiff/csv/unit_of_measure.csv                   |    64 -
 src/tiff/csv/uom_an_alias.c                        |     5 -
 src/tiff/csv/uom_an_alias.csv                      |     2 -
 src/tiff/csv/uom_angle.c                           |    18 -
 src/tiff/csv/uom_angle.csv                         |    15 -
 src/tiff/csv/uom_le_alias.c                        |    27 -
 src/tiff/csv/uom_le_alias.csv                      |    24 -
 src/tiff/csv/uom_length.c                          |    39 -
 src/tiff/csv/uom_length.csv                        |    36 -
 src/tiff/csv/uom_sc_alias.c                        |     4 -
 src/tiff/csv/uom_sc_alias.csv                      |     1 -
 src/tiff/csv/uom_scale.c                           |     6 -
 src/tiff/csv/uom_scale.csv                         |     3 -
 src/tiff/csv/version_history.csv                   |    23 -
 src/tiff/csv/vert_cs.c                             |    31 -
 src/tiff/csv/vert_cs.csv                           |    28 -
 src/tiff/csv/vert_datum.c                          |    32 -
 src/tiff/csv/vert_datum.csv                        |    29 -
 src/tiff/csv/vert_offset.c                         |     5 -
 src/tiff/csv/vert_offset.csv                       |     2 -
 src/tiff/epsg_datum.inc                            |   174 -
 src/tiff/epsg_ellipse.inc                          |    48 -
 src/tiff/epsg_gcs.inc                              |   193 -
 src/tiff/epsg_pcs.inc                              |  1003 -
 src/tiff/epsg_pm.inc                               |    22 -
 src/tiff/epsg_proj.inc                             |   443 -
 src/tiff/epsg_units.inc                            |    35 -
 src/tiff/epsg_vertcs.inc                           |    46 -
 src/tiff/fax3sm.c                                  |  1046 -
 src/tiff/geo_config.h                              |    20 -
 src/tiff/geo_ctrans.inc                            |    55 -
 src/tiff/geo_extra.c                               |   750 -
 src/tiff/geo_free.c                                |    62 -
 src/tiff/geo_get.c                                 |   176 -
 src/tiff/geo_keyp.h                                |    98 -
 src/tiff/geo_names.c                               |   175 -
 src/tiff/geo_new.c                                 |   224 -
 src/tiff/geo_normalize.c                           |  2330 --
 src/tiff/geo_normalize.h                           |   233 -
 src/tiff/geo_print.c                               |   496 -
 src/tiff/geo_set.c                                 |   259 -
 src/tiff/geo_tiffp.c                               |   140 -
 src/tiff/geo_tiffp.h                               |   113 -
 src/tiff/geo_trans.c                               |   326 -
 src/tiff/geo_write.c                               |   190 -
 src/tiff/geokeys.h                                 |    54 -
 src/tiff/geokeys.inc                               |    76 -
 src/tiff/geonames.h                                |   146 -
 src/tiff/geotiff.h                                 |   117 -
 src/tiff/geotiff_proj4.c                           |   679 -
 src/tiff/geotiffio.h                               |    16 -
 src/tiff/geovalues.h                               |   120 -
 src/tiff/port.h                                    |    32 -
 src/tiff/t4.h                                      |   285 -
 src/tiff/tif_aux.c                                 |   218 -
 src/tiff/tif_close.c                               |    80 -
 src/tiff/tif_codec.c                               |   150 -
 src/tiff/tif_color.c                               |   268 -
 src/tiff/tif_compress.c                            |   233 -
 src/tiff/tif_dir.c                                 |  1419 --
 src/tiff/tif_dir.h                                 |   267 -
 src/tiff/tif_dirinfo.c                             |   480 -
 src/tiff/tif_dirread.c                             |  1485 --
 src/tiff/tif_dirwrite.c                            |  1233 -
 src/tiff/tif_dumpmode.c                            |   118 -
 src/tiff/tif_error.c                               |    49 -
 src/tiff/tif_extension.c                           |   109 -
 src/tiff/tif_fax3.c                                |  1515 --
 src/tiff/tif_fax3.h                                |   525 -
 src/tiff/tif_flush.c                               |    67 -
 src/tiff/tif_getimage.c                            |  2584 ---
 src/tiff/tif_jpeg.c                                |  1667 --
 src/tiff/tif_luv.c                                 |  1586 --
 src/tiff/tif_lzw.c                                 |   745 -
 src/tiff/tif_machdep.c                             |   186 -
 src/tiff/tif_next.c                                |   142 -
 src/tiff/tif_open.c                                |   495 -
 src/tiff/tif_packbits.c                            |   300 -
 src/tiff/tif_pixarlog.c                            |  1305 --
 src/tiff/tif_predict.c                             |   464 -
 src/tiff/tif_predict.h                             |    61 -
 src/tiff/tif_print.c                               |   613 -
 src/tiff/tif_read.c                                |   637 -
 src/tiff/tif_strip.c                               |   217 -
 src/tiff/tif_swab.c                                |   217 -
 src/tiff/tif_thunder.c                             |   154 -
 src/tiff/tif_tile.c                                |   219 -
 src/tiff/tif_unix.c                                |   228 -
 src/tiff/tif_version.c                             |    33 -
 src/tiff/tif_warning.c                             |    49 -
 src/tiff/tif_win32.c                               |   323 -
 src/tiff/tif_write.c                               |   726 -
 src/tiff/tif_zip.c                                 |   368 -
 src/tiff/tiff.h                                    |   482 -
 src/tiff/tiffcomp.h                                |   220 -
 src/tiff/tiffconf.h                                |   153 -
 src/tiff/tiffio.h                                  |   479 -
 src/tiff/tiffiop.h                                 |   289 -
 src/tiff/tiffvers.h                                |     9 -
 src/tiff/uvcode.h                                  |   173 -
 src/tiff/version.h                                 |     1 -
 src/tiff/xtiff.c                                   |   198 -
 src/tiff/xtiffio.h                                 |    72 -
 src/tiff/xtiffiop.h                                |    90 -
 src/zlib/ChangeLog                                 |   471 -
 src/zlib/FAQ                                       |    72 -
 src/zlib/Makefile                                  |    99 -
 src/zlib/README                                    |   148 -
 src/zlib/algorithm.txt                             |   213 -
 src/zlib/zconf.h                                   |   279 -
 src/zlib/zlib.h                                    |   893 -
 terralibx/PostgreSQL/libpq.a                       |   Bin 137152 -> 0 bytes
 terralibx/image_processing/Makefile                |    21 +
 terralibx/image_processing/terralibpdi.pro         |   264 +
 terralibx/shapelib/Makefile                        |    11 -
 terralibx/shapelib/shapelib.pro                    |    18 -
 terralibx/stat/Makefile                            |    10 +
 terralibx/stat/stat.pro                            |    36 +-
 terralibx/terralib/Makefile                        |    32 +-
 terralibx/terralib/terralib.kdevprj                |   795 -
 terralibx/terralib/terralib.pro                    |   139 +-
 terralibx/tiff/Makefile                            |    13 -
 terralibx/tiff/tiff.pro                            |    61 -
 1936 files changed, 231872 insertions(+), 291003 deletions(-)

diff --git a/examples/Debug/ijl15.dll b/examples/Debug/ijl15.dll
old mode 100644
new mode 100755
diff --git a/examples/Debug/libMySQL.dll b/examples/Debug/libMySQL.dll
old mode 100644
new mode 100755
diff --git a/examples/Debug/libpq.dll b/examples/Debug/libpq.dll
old mode 100644
new mode 100755
diff --git a/examples/Debug/msjava.dll b/examples/Debug/msjava.dll
new file mode 100755
index 0000000..bbec191
Binary files /dev/null and b/examples/Debug/msjava.dll differ
diff --git a/examples/Debug/oci.dll b/examples/Debug/oci.dll
old mode 100644
new mode 100755
diff --git a/examples/Debug/zlib.dll b/examples/Debug/zlib.dll
old mode 100644
new mode 100755
diff --git a/examples/Release/zlib.dll b/examples/Debug/zlib1.dll
old mode 100644
new mode 100755
similarity index 100%
rename from examples/Release/zlib.dll
rename to examples/Debug/zlib1.dll
diff --git a/examples/Makefile b/examples/Makefile
new file mode 100755
index 0000000..50fb840
--- /dev/null
+++ b/examples/Makefile
@@ -0,0 +1,45 @@
+
+SUBDIRS = \
+	createDatabase \
+	createLayer \
+	createTable \
+	importMIDMIF \
+	importShape \
+	importDBF \
+	importJPEG \
+	copyLayer \
+	importGeoTab \
+	convertCoordinates \
+	databaseQuery \
+	databaseSQLQuery \
+	spatialQuery \
+	addGeomRepresentation \
+	createTheme \
+	themeGrouping \
+	createSTElementSet \
+	mosaicTIFFImages \
+	importCSV \
+	importGridData \
+	rasterSlicing \
+	querierFromTheme \
+	proxMatrixAndSpatialStatistics \
+	spatialQueryAndBuffer \
+	querierFromLayer \
+	createSTElementSetFromLayer \
+	image_processing
+
+all:
+	@for i in $(SUBDIRS); do \
+	( cd $$i; make; ); done
+
+debug:
+	@for i in $(SUBDIRS); do \
+	( cd $$i; make debug; ); done
+
+clean:
+	@for i in $(SUBDIRS); do \
+	( cd $$i; make clean; ); done
+
+clean_debug:
+	@for i in $(SUBDIRS); do \
+	( cd $$i; make clean_debug; ); done
diff --git a/examples/Readme b/examples/Readme
old mode 100644
new mode 100755
index ca95af1..09a3c45
--- a/examples/Readme
+++ b/examples/Readme
@@ -1,96 +1,143 @@
-						TerraLib Examples
+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.
+Each one of the items below corresponds to a directory that contains the  source files that
+implement some operation using TerraLib. 
+
+The data used in the examples can be found in the "data" directory.
+
+Each directory also has some compilation/linking files. 
+
+For Windows users these files are Microsoft Visual .NET 2003 solution and project files (*.sln, *.vcproj).
+The executables are generated in the directory Release/Debug
+
+For Linux users there are Makefiles and .pro files used by qmake. The executables are generated in each directory 
+that contains the example.
+
+Some of the examples depend on the execution of others. So we recommend that they
+should be run in the order proposed bellow.
 
 1. createDatabase
-It illustrates how to create a TerraLib database, creating all of the tables that
+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
+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
+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
+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
+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
+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
+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
+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)
+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
+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
+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)
+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
+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)
+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
+Illustrates how to make spatial queries on the layers of a TerraLib database.
+Imports the shapefiles Mada_Distritos_SP, Mapa_Drenagem_SP and Mapa_Industrias_SP.
 
 14. addGeomRepresentation
-It illustrates how to add a point representation (centroids) to a layer with polygon
+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)
+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,
+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)
+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)
+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
+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)
+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, 
+Illustrates how to import two 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
+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
+It depends on the files BairrosRecife.MIF BairrosRecife.MID and BairrosRecife2.csv
+
+20. importGridData
+Illustrates how to import grid data in raw format for a TerraLib database already
+created.
+Source Data: elevation.raw
+
+21. rasterSlicing
+Illustrates how to group the values of a raster data in a set of classes.
+It depends on the layer created in example 20 (importGridData).
+
+22. querierFromTheme
+Illustrates how to use a querier from theme.
+It depends on the theme created in the item 15 (createTheme).
+
+23.proxMatrixAndSpatialStatistics
+Illustrates how to build a proximity matrix and how to calculate some spatial analysis index.
+It depends on the layer created in the item 4 (importMIDMIF)
+
+24. spatialQueryAndBuffer
+Illustrates how to do some spatial queries involving objects with points, lines and polygon geometries,
+and to generate a buffer operation.
+It depends on the layers create in the item 13 (spatialQuery).
+
+25. querierFromLayer
+Illustrates how to use a querier from layer.
+Requires the layer CadastroEscolas created in the item 9 (importGeoTab).
+
+26. createSTElementSetFromLayer
+Illustrates how to create a new Spatial Temporal Element Set (STElementSet) from a layer. 
+It uses the same input files used in the item 5 (importShape).
+ 
+27. image_processing
+This directory contains a set of testing routines for image processing
+algorithms from TerraLib - LibPDI ( image_processing ).
+This routines can be used as examples for using the tested classes.
+
diff --git a/examples/Release/ijl15.dll b/examples/Release/ijl15.dll
deleted file mode 100644
index 0ea9873..0000000
Binary files a/examples/Release/ijl15.dll and /dev/null differ
diff --git a/examples/Release/libMySQL.dll b/examples/Release/libMySQL.dll
deleted file mode 100644
index de2c2d2..0000000
Binary files a/examples/Release/libMySQL.dll and /dev/null differ
diff --git a/examples/Release/libpq.dll b/examples/Release/libpq.dll
deleted file mode 100644
index 6e95daa..0000000
Binary files a/examples/Release/libpq.dll and /dev/null differ
diff --git a/examples/Release/oci.dll b/examples/Release/oci.dll
deleted file mode 100644
index 59be9f8..0000000
Binary files a/examples/Release/oci.dll and /dev/null differ
diff --git a/examples/addGeomRepresentation/.cdtproject b/examples/addGeomRepresentation/.cdtproject
old mode 100644
new mode 100755
diff --git a/examples/addGeomRepresentation/.project b/examples/addGeomRepresentation/.project
old mode 100644
new mode 100755
index cb77656..04ee9ca
--- a/examples/addGeomRepresentation/.project
+++ b/examples/addGeomRepresentation/.project
@@ -14,21 +14,21 @@
 				</dictionary>
 				<dictionary>
 					<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
-					<value>clean all</value>
+					<value>all</value>
 				</dictionary>
 				<dictionary>
 					<key>org.eclipse.cdt.make.core.incrementalBuildTarget</key>
 					<value>all</value>
 				</dictionary>
 				<dictionary>
-					<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
-					<value>false</value>
-				</dictionary>
-				<dictionary>
 					<key>org.eclipse.cdt.make.core.buildLocation</key>
 					<value></value>
 				</dictionary>
 				<dictionary>
+					<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
+					<value>false</value>
+				</dictionary>
+				<dictionary>
 					<key>org.eclipse.cdt.make.core.enableFullBuild</key>
 					<value>true</value>
 				</dictionary>
@@ -53,13 +53,13 @@
 					<value>make</value>
 				</dictionary>
 				<dictionary>
-					<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
-					<value>all</value>
-				</dictionary>
-				<dictionary>
 					<key>org.eclipse.cdt.make.core.stopOnError</key>
 					<value>false</value>
 				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
+					<value>all</value>
+				</dictionary>
 			</arguments>
 		</buildCommand>
 		<buildCommand>
diff --git a/examples/addGeomRepresentation/Makefile b/examples/addGeomRepresentation/Makefile
old mode 100644
new mode 100755
index fb9f796..a8493ab
--- a/examples/addGeomRepresentation/Makefile
+++ b/examples/addGeomRepresentation/Makefile
@@ -1,23 +1,30 @@
 all: addGeomRepresentation
 
-shapelib:
-	cd ../terralibx/shapelib; make
-
-tiff:
-	cd ../terralibx/tiff; make
+debug: addGeomRepresentation_dbg
 
 terralib:
-	cd ../terralibx/terralib; make
-
-stat:
-	cd ../terralibx/stat; make
+	cd ../../terralibx/terralib; make
 
-addGeomRepresentation: shapelib tiff terralib stat
+terralib_dbg:
+	cd ../../terralibx/terralib; make debug
+	
+addGeomRepresentation: terralib
 	qmake -o makeAddGeomRepresentation addGeomRepresentation.pro; make -f makeAddGeomRepresentation
 
+addGeomRepresentation_dbg: terralib_dbg
+	qmake -o makeAddGeomRepresentation.debug addGeomRepresentation.pro TE_PROJECT_TYPE=DEBUG; \
+	make -f makeAddGeomRepresentation.debug
+
 clean:
 	if \
 		test -f makeAddGeomRepresentation; \
 	then \
 		make -f makeAddGeomRepresentation distclean; rm -f makeAddGeomRepresentation; \
+	fi
+	
+clean_debug:
+	if \
+		test -f makeAddGeomRepresentation.debug; \
+	then \
+		make -f makeAddGeomRepresentation.debug distclean; rm -f makeAddGeomRepresentation.debug; \
 	fi
\ No newline at end of file
diff --git a/examples/addGeomRepresentation/addGeomRepresentation.cpp b/examples/addGeomRepresentation/addGeomRepresentation.cpp
old mode 100644
new mode 100755
index 0ab24da..931557a
--- a/examples/addGeomRepresentation/addGeomRepresentation.cpp
+++ b/examples/addGeomRepresentation/addGeomRepresentation.cpp
@@ -34,11 +34,11 @@ int main()
 {
  	// Datatabase server parameters
 	string host = "localhost";
-	string dbname = "TerraTeste";
+	string dbname = "DB320RC1";
 	string user = "root";
-	string password = "";
+	string password = "vinhas";
 
-	// Open a connection to the TerraTeste MySQL database
+	// Open a connection to the DB320RC1 MySQL database
 	TeDatabase* db = new TeMySQL();
 	if (!db->connect(host, user, password, dbname))
 	{
@@ -54,6 +54,7 @@ int main()
 	{
 		cout << "Fail to load layer \"Distritos\": " << db->errorMessage() << endl << endl;
 		db->close();
+		delete db;
 		cout << "Press Enter\n";
 		getchar();
 		return 1;
@@ -68,6 +69,7 @@ int main()
 		{
 			cout << "The table of points \"" << pointsTableName << "\" already exists in the database!\n\n";  
 			db->close();
+			delete db;
 			cout << "Press Enter\n";
 			getchar();
 			return 1;
@@ -76,10 +78,11 @@ int main()
 
 	TeRepresentation* repPol = distritos->getRepresentation(TePOLYGONS);
 	TePointSet centroids; 	//generate centroids
-	if (db->Centroid(repPol->tableName_, TePOLYGONS, centroids) == false)
+	if (db->centroid(repPol->tableName_, TePOLYGONS, centroids) == false)
 	{
 		cout << "Fail to create centroids: " << db->errorMessage();  
 		db->close();
+		delete db;
 		cout << "Press Enter\n";
 		getchar();
 		return 1;
@@ -90,6 +93,7 @@ int main()
 	cout << "Centroids created!\n\n";  
 
 	db->close();
+	delete db;
 	cout << "Press Enter\n";
 	getchar();
 	return 0;
diff --git a/examples/addGeomRepresentation/addGeomRepresentation.dsp b/examples/addGeomRepresentation/addGeomRepresentation.dsp
old mode 100644
new mode 100755
index 542ab26..07b62ba
--- a/examples/addGeomRepresentation/addGeomRepresentation.dsp
+++ b/examples/addGeomRepresentation/addGeomRepresentation.dsp
@@ -42,7 +42,7 @@ RSC=rc.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drive [...]
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\terralibw\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\include" /I "..\..\src\terralib\drivers\PostgreSQL" /I "..\..\src\terralib\drivers\PostgreSQL\includepg" /I "..\..\src\terralib\drivers\PostgreSQ [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "NDEBUG"
 # ADD RSC /l 0x416 /d "NDEBUG"
@@ -51,7 +51,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\shapelib\Release\shapelib.lib ..\..\terralibw\freetype\Release\freetype.lib ..\..\terralibw\tiff\Release\tiff.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\Postg [...]
+# ADD LINK32 ..\..\terralibw\terralib\Release\terralib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\libpq.lib /nologo /subsystem:console /machine:I386 /out:"../Release/addGeomRepresentation.exe"
 # SUBTRACT LINK32 /pdb:none
 
 !ELSEIF  "$(CFG)" == "addGeomRepresentation - Win32 Debug"
@@ -68,7 +68,7 @@ LINK32=link.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terra [...]
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\terralibw\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\include" /I "..\..\src\terralib\drive [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "_DEBUG"
 # ADD RSC /l 0x416 /d "_DEBUG"
@@ -77,7 +77,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\shapelib\Debug\shapelib.lib ..\..\terralibw\freetype\Debug\freetype.lib ..\..\terralibw\tiff\Debug\tiff.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\li [...]
+# ADD LINK32 ..\..\terralibw\terralib\Debug\terralib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\libpq.lib /nologo /subsystem:console /debug /machine:I386 /out:"../Debug/addGeomRepresentation.exe" /pdbtype:sept
 # SUBTRACT LINK32 /pdb:none
 
 !ENDIF 
diff --git a/examples/addGeomRepresentation/addGeomRepresentation.dsw b/examples/addGeomRepresentation/addGeomRepresentation.dsw
old mode 100644
new mode 100755
index c6679e6..8b0d711
--- a/examples/addGeomRepresentation/addGeomRepresentation.dsw
+++ b/examples/addGeomRepresentation/addGeomRepresentation.dsw
@@ -3,7 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
 
 ###############################################################################
 
-Project: "addGeomRepresentation"=".\addGeomRepresentation.dsp" - Package Owner=<4>
+Project: "addGeomRepresentation"=.\addGeomRepresentation.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -18,52 +18,7 @@ Package=<4>
 
 ###############################################################################
 
-Project: "freetype"="..\..\terralibw\freetype\freetype.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "shapelib"="..\..\terralibw\shapelib\shapelib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "terralib"="..\..\terralibw\terralib\terralib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name freetype
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name shapelib
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name tiff
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "tiff"="..\..\terralibw\tiff\tiff.dsp" - Package Owner=<4>
+Project: "terralib"=..\..\terralibw\terralib\terralib.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
diff --git a/examples/addGeomRepresentation/addGeomRepresentation.pro b/examples/addGeomRepresentation/addGeomRepresentation.pro
old mode 100644
new mode 100755
index 44f3460..5e7b01c
--- a/examples/addGeomRepresentation/addGeomRepresentation.pro
+++ b/examples/addGeomRepresentation/addGeomRepresentation.pro
@@ -1,43 +1,18 @@
-TEMPLATE = app
-TARGET = addGeomRepresentation
-CONFIG += qt warn_on thread debug rtti exceptions
-LANGUAGE = C++
+include( ../base/base.pro )
 
-OBJECTS_DIR = .obj
 
 SOURCES	+= \
 	addGeomRepresentation.cpp \
-	../src/terralib/drivers/MySQL/TeMySQL.cpp
+	../../src/terralib/drivers/MySQL/TeMySQL.cpp
 
 HEADERS	+= \
-	../src/terralib/drivers/MySQL/TeMySQL.h
+	../../src/terralib/drivers/MySQL/TeMySQL.h
 	
-INCLUDEPATH += \
-	. \
-	.. \
-	../src/terralib/kernel \
-	../src/terralib/application \
-	../src/terralib/functions \
-	../src/terralib/stat \
-	../src/shapelib \
-	../src/zlib \
-	../src/terralib/application/qt \
-	../src/terralib/drivers/MySQL \
-	../src/terralib/drivers/MySQL/include \
-	../src/terralib/drivers/OracleSpatial \
-	../src/terralib/drivers/OracleSpatial/OCI/include \
-	../src/terralib/drivers/PostgreSQL \
-	../src/terralib/drivers/PostgreSQL/includepg 
-
-LIBS += \
-	-L../terralibx/shapelib \
-	-L../terralibx/stat \
-	-L../terralibx/terralib \
-	-L../terralibx/tiff \
-	-L../terralibx/PostgreSQL \
-	-L/usr/local/lib -L/usr/lib -L/usr/lib/mysql -L/usr/local/lib/mysql \
-	-L/usr/local/mysql -L/usr/local/mysql/lib -L. \
-    -lshapelib -lstat -lterralib -ltiff -lmysqlclient -lpq -lcrypt
+
+
+
+ 
+
 
 
 
diff --git a/examples/addGeomRepresentation/addGeomRepresentation.sln b/examples/addGeomRepresentation/addGeomRepresentation.sln
new file mode 100755
index 0000000..df653af
--- /dev/null
+++ b/examples/addGeomRepresentation/addGeomRepresentation.sln
@@ -0,0 +1,46 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "addGeomRepresentation", "addGeomRepresentation.vcproj", "{AC29CA10-2B75-494F-A370-6767C7AB5FC1}"
+	ProjectSection(ProjectDependencies) = postProject
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C} = {BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjpeg", "..\..\terralibw\libjpeg\libjpeg.vcproj", "{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tiff", "..\..\terralibw\tiff\tiff.vcproj", "{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "terralib", "..\..\terralibw\terralib\terralib.vcproj", "{F6FE4C5D-54E9-4F24-92B1-66A78C65EA3F}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		Debug = Debug
+		Release = Release
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.ActiveCfg = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.Build.0 = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.ActiveCfg = Release|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.Build.0 = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.ActiveCfg = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.Build.0 = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.ActiveCfg = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.Build.0 = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.ActiveCfg = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.Build.0 = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.ActiveCfg = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.Build.0 = Release|Win32
+		{F6FE4C5D-54E9-4F24-92B1-66A78C65EA3F}.Debug.ActiveCfg = Debug|Win32
+		{F6FE4C5D-54E9-4F24-92B1-66A78C65EA3F}.Debug.Build.0 = Debug|Win32
+		{F6FE4C5D-54E9-4F24-92B1-66A78C65EA3F}.Release.ActiveCfg = Release|Win32
+		{F6FE4C5D-54E9-4F24-92B1-66A78C65EA3F}.Release.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
diff --git a/examples/addGeomRepresentation/addGeomRepresentation.vcproj b/examples/addGeomRepresentation/addGeomRepresentation.vcproj
new file mode 100755
index 0000000..d90f9ac
--- /dev/null
+++ b/examples/addGeomRepresentation/addGeomRepresentation.vcproj
@@ -0,0 +1,164 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="addGeomRepresentation"
+	ProjectGUID="{AC29CA10-2B75-494F-A370-6767C7AB5FC1}">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\Debug\"
+			IntermediateDirectory="..\Debug\"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="-Zm200 -GX -w34100 -w34189"
+				Optimization="4"
+				AdditionalIncludeDirectories=".;..;..\..\src\terralib\kernel;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include"
+				PreprocessorDefinitions="UNICODE,WIN32"
+				GeneratePreprocessedFile="0"
+				MinimalRebuild="TRUE"
+				ExceptionHandling="TRUE"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				AssemblerListingLocation="..\Debug\"
+				ObjectFile="..\Debug\"
+				ProgramDataBaseFileName=".\"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Debug/terralib/terralib.lib ../../Debug/libjpeg/libjpeg.lib ../../Debug/tiff/tiff.lib ../../Debug/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
+				OutputFile="..\Debug\addGeomRepresentation.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreDefaultLibraryNames="msvcrt.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				WarningLevel="0"
+				DefaultCharType="0"
+				EnableErrorChecks="1"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\Release\"
+			IntermediateDirectory="..\Release\"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="-Zm200 -GX -w34100 -w34189"
+				Optimization="4"
+				AdditionalIncludeDirectories=".;..;..\..\src\terralib\kernel;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include"
+				PreprocessorDefinitions="UNICODE,WIN32"
+				GeneratePreprocessedFile="0"
+				MinimalRebuild="TRUE"
+				ExceptionHandling="TRUE"
+				RuntimeLibrary="2"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				AssemblerListingLocation="..\Debug\"
+				ObjectFile="..\Debug\"
+				ProgramDataBaseFileName=".\"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Release/terralib/terralib.lib ../../Release/libjpeg/libjpeg.lib ../../Release/tiff/tiff.lib ../../Release/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
+				OutputFile="..\Release\addGeomRepresentation.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				WarningLevel="0"
+				DefaultCharType="0"
+				EnableErrorChecks="1"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath="addGeomRepresentation.cpp">
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.h">
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/base/base.pro b/examples/base/base.pro
new file mode 100644
index 0000000..186eb87
--- /dev/null
+++ b/examples/base/base.pro
@@ -0,0 +1,83 @@
+TEMPLATE = app
+
+# Define your mysql client path
+MYSQL_CLIENT = /usr/local/mysql/lib
+
+# =====================================================================
+# From this point do not change this pro file
+# =====================================================================
+
+CONFIG = warn_on thread rtti exceptions 
+
+# Configure to debug or release
+#-------------------------------------------------
+isEmpty(TE_PROJECT_TYPE) {
+	TE_PROJECT_TYPE=RELEASE
+}
+
+contains(TE_PROJECT_TYPE , DEBUG) {
+    CONFIG -= release
+    CONFIG += debug
+}
+
+contains(TE_PROJECT_TYPE , RELEASE) {
+    CONFIG += release
+}
+#-------------------------------------------------
+
+
+INCLUDEPATH = \
+  . \
+  .. \
+  ../../src/terralib/kernel \
+  ../../src/terralib/functions \
+  ../../src/terralib/stat \
+  ../../src/terralib/utils \
+  ../../src/terralib/drivers/shapelib \
+  ../../src/terralib/drivers/MySQL \
+  ../../src/terralib/drivers/MySQL/include \
+  ../../src/terralib/drivers/shapelib \
+  ../../src/shapelib \
+  ../../src/zlib \
+  ../../src/tiff \
+  $$INCLUDEPATH
+
+unix {
+  OBJECTS_DIR = .obj
+
+  release {
+     LIBS += -L../../terralibx/Release
+  }
+  debug {
+     LIBS += -L../../terralibx/Debug
+  }
+
+  LIBS += \
+    -L/usr/local/lib \
+    -L/usr/lib \
+    -L$$MYSQL_CLIENT \
+    -ljpeg \
+    -lshapelib \
+    -lz \
+    -lterralibtiff \
+    -lcrypt \
+    -L/usr/lib/mysql -L/usr/local/lib/mysql -L/usr/local/mysql -lmysqlclient \
+    -lterralib \
+    -lstat
+}
+
+win32 {
+  CONFIG += console
+  DESTDIR = ../Debug
+  OBJECTS_DIR = ../Debug
+  LIBS += \
+    ../../terralibw/shapelib/Debug/shapelib.lib \
+    ../../terralibw/stat/Debug/stat.lib \
+    ../../terralibw/terralib/Debug/terralib.lib \
+    ../../terralibw/tiff/Debug/tiff.lib \
+    ../../terralibw/libjpeg/Debug/libjpeg.lib \
+    ../../terralibw/OracleSpatial/Oci/Oci.lib \
+    ../../terralibw/MySQL/libMySQL.lib \
+    ../../terralibw/PostgreSQL/libpq.lib 
+}
+ 
diff --git a/examples/convertCoordinates/.cdtproject b/examples/convertCoordinates/.cdtproject
old mode 100644
new mode 100755
diff --git a/examples/convertCoordinates/.project b/examples/convertCoordinates/.project
old mode 100644
new mode 100755
index 13596ff..f020624
--- a/examples/convertCoordinates/.project
+++ b/examples/convertCoordinates/.project
@@ -14,21 +14,21 @@
 				</dictionary>
 				<dictionary>
 					<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
-					<value>clean all</value>
+					<value>all</value>
 				</dictionary>
 				<dictionary>
 					<key>org.eclipse.cdt.make.core.incrementalBuildTarget</key>
 					<value>all</value>
 				</dictionary>
 				<dictionary>
-					<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
-					<value>false</value>
-				</dictionary>
-				<dictionary>
 					<key>org.eclipse.cdt.make.core.buildLocation</key>
 					<value></value>
 				</dictionary>
 				<dictionary>
+					<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
+					<value>false</value>
+				</dictionary>
+				<dictionary>
 					<key>org.eclipse.cdt.make.core.enableFullBuild</key>
 					<value>true</value>
 				</dictionary>
@@ -53,13 +53,13 @@
 					<value>make</value>
 				</dictionary>
 				<dictionary>
-					<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
-					<value>all</value>
-				</dictionary>
-				<dictionary>
 					<key>org.eclipse.cdt.make.core.stopOnError</key>
 					<value>false</value>
 				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
+					<value>all</value>
+				</dictionary>
 			</arguments>
 		</buildCommand>
 		<buildCommand>
diff --git a/examples/convertCoordinates/Makefile b/examples/convertCoordinates/Makefile
old mode 100644
new mode 100755
index 5125abf..e1ab44e
--- a/examples/convertCoordinates/Makefile
+++ b/examples/convertCoordinates/Makefile
@@ -1,23 +1,31 @@
 all: convertCoordinates
 
-shapelib:
-	cd ../terralibx/shapelib; make
-
-tiff:
-	cd ../terralibx/tiff; make
+debug: convertCoordinates_dbg
 
 terralib:
-	cd ../terralibx/terralib; make
+	cd ../../terralibx/terralib; make
+	
+terralib_dbg:
+	cd ../../terralibx/terralib; make debug
 
-stat:
-	cd ../terralibx/stat; make
+convertCoordinates: terralib
+	qmake -o makeConvertCoordinates convertCoordinates.pro; \
+	make -f makeConvertCoordinates
 
-convertCoordinates: shapelib tiff terralib stat
-	qmake -o makeConvertCoordinates convertCoordinates.pro; make -f makeConvertCoordinates
+convertCoordinates_dbg: terralib_dbg
+	qmake -o makeConvertCoordinates.debug convertCoordinates.pro TE_PROJECT_TYPE=DEBUG; \
+	make -f makeConvertCoordinates.debug
 
 clean:
 	if \
 		test -f makeConvertCoordinates; \
 	then \
 		make -f makeConvertCoordinates distclean; rm -f makeConvertCoordinates; \
+	fi
+	
+	clean_debug:
+	if \
+		test -f makeConvertCoordinates.debug; \
+	then \
+		make -f makeConvertCoordinates.debug distclean; rm -f makeConvertCoordinates.debug; \
 	fi
\ No newline at end of file
diff --git a/examples/convertCoordinates/convertCoordinates.cpp b/examples/convertCoordinates/convertCoordinates.cpp
old mode 100644
new mode 100755
index 5af38eb..029ca91
--- a/examples/convertCoordinates/convertCoordinates.cpp
+++ b/examples/convertCoordinates/convertCoordinates.cpp
@@ -21,11 +21,11 @@ indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
 /* 
-        This file showns an example of how to create a new TerraLib database
-        in an MySQL SGDB
+        This file showns an example of how to convert coordinates from a projection to another.
 
         Author: Lubia Vinhas  
 */
+
 #include <TeProjection.h>
 #include <iostream>
 
diff --git a/examples/convertCoordinates/convertCoordinates.dsp b/examples/convertCoordinates/convertCoordinates.dsp
old mode 100644
new mode 100755
index d8501dc..e5cff49
--- a/examples/convertCoordinates/convertCoordinates.dsp
+++ b/examples/convertCoordinates/convertCoordinates.dsp
@@ -42,7 +42,7 @@ RSC=rc.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drive [...]
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include"  /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\include" / [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "NDEBUG"
 # ADD RSC /l 0x416 /d "NDEBUG"
@@ -51,7 +51,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\shapelib\Release\shapelib.lib ..\..\terralibw\freetype\Release\freetype.lib ..\..\terralibw\tiff\Release\tiff.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\Postg [...]
+# ADD LINK32 ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\shapelib\Release\shapelib.lib ..\..\terralibw\tiff\Release\tiff.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\libpq.lib /nologo /subsystem:console /ma [...]
 # SUBTRACT LINK32 /pdb:none
 
 !ELSEIF  "$(CFG)" == "convertCoordinates - Win32 Debug"
@@ -68,7 +68,7 @@ LINK32=link.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terra [...]
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\in [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "_DEBUG"
 # ADD RSC /l 0x416 /d "_DEBUG"
@@ -77,7 +77,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\shapelib\Debug\shapelib.lib ..\..\terralibw\freetype\Debug\freetype.lib ..\..\terralibw\tiff\Debug\tiff.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\li [...]
+# ADD LINK32 ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\shapelib\Debug\shapelib.lib ..\..\terralibw\tiff\Debug\tiff.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\libpq.lib /nologo /subsystem:console /debug /m [...]
 # SUBTRACT LINK32 /pdb:none
 
 !ENDIF 
diff --git a/examples/convertCoordinates/convertCoordinates.dsw b/examples/convertCoordinates/convertCoordinates.dsw
old mode 100644
new mode 100755
index 124a217..28c69e9
--- a/examples/convertCoordinates/convertCoordinates.dsw
+++ b/examples/convertCoordinates/convertCoordinates.dsw
@@ -3,7 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
 
 ###############################################################################
 
-Project: "convertCoordinates"=".\convertCoordinates.dsp" - Package Owner=<4>
+Project: "convertCoordinates"=.\convertCoordinates.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -18,52 +18,7 @@ Package=<4>
 
 ###############################################################################
 
-Project: "freetype"="..\..\terralibw\freetype\freetype.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "shapelib"="..\..\terralibw\shapelib\shapelib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "terralib"="..\..\terralibw\terralib\terralib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name freetype
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name shapelib
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name tiff
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "tiff"="..\..\terralibw\tiff\tiff.dsp" - Package Owner=<4>
+Project: "terralib"=..\..\terralibw\terralib\terralib.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
diff --git a/examples/convertCoordinates/convertCoordinates.pro b/examples/convertCoordinates/convertCoordinates.pro
old mode 100644
new mode 100755
index 3b58927..45e2e5f
--- a/examples/convertCoordinates/convertCoordinates.pro
+++ b/examples/convertCoordinates/convertCoordinates.pro
@@ -1,45 +1,5 @@
-TEMPLATE = app
-TARGET = convertCoordinates
-CONFIG += qt warn_on thread debug rtti exceptions
-LANGUAGE = C++
-
-OBJECTS_DIR = .obj
+include( ../base/base.pro )
 
 SOURCES	+= \
-	convertCoordinates.cpp
-
-HEADERS	+= \
-	
-INCLUDEPATH += \
-	. \
-	.. \
-	../src/terralib/kernel \
-	../src/terralib/application \
-	../src/terralib/functions \
-	../src/terralib/stat \
-	../src/shapelib \
-	../src/zlib \
-	../src/terralib/application/qt \
-	../src/terralib/drivers/MySQL \
-	../src/terralib/drivers/MySQL/include \
-	../src/terralib/drivers/OracleSpatial \
-	../src/terralib/drivers/OracleSpatial/OCI/include \
-	../src/terralib/drivers/PostgreSQL \
-	../src/terralib/drivers/PostgreSQL/includepg 
-
-LIBS += \
-	-L../terralibx/shapelib \
-	-L../terralibx/stat \
-	-L../terralibx/terralib \
-	-L../terralibx/tiff \
-	-L../terralibx/PostgreSQL \
-	-L/usr/local/lib -L/usr/lib -L/usr/lib/mysql -L/usr/local/lib/mysql \
-	-L/usr/local/mysql -L/usr/local/mysql/lib -L. \
-    -lshapelib -lstat -lterralib -ltiff -lmysqlclient -lpq -lcrypt
-
-
-
-
-
-
+	convertCoordinates.cpp 
 
diff --git a/examples/convertCoordinates/convertCoordinates.sln b/examples/convertCoordinates/convertCoordinates.sln
new file mode 100755
index 0000000..31ab911
--- /dev/null
+++ b/examples/convertCoordinates/convertCoordinates.sln
@@ -0,0 +1,39 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "convertCoordinates", "convertCoordinates.vcproj", "{7AF97D40-AC01-471B-AE4A-81D2542DFE5A}"
+	ProjectSection(ProjectDependencies) = postProject
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C} = {BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}
+		{99BC87CA-140D-4A99-803C-DF078430A6C8} = {99BC87CA-140D-4A99-803C-DF078430A6C8}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "terralib", "..\..\terralibw\terralib\terralib.vcproj", "{99BC87CA-140D-4A99-803C-DF078430A6C8}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjpeg", "..\..\terralibw\libjpeg\libjpeg.vcproj", "{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		Debug = Debug
+		Release = Release
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{7AF97D40-AC01-471B-AE4A-81D2542DFE5A}.Debug.ActiveCfg = Debug|Win32
+		{7AF97D40-AC01-471B-AE4A-81D2542DFE5A}.Debug.Build.0 = Debug|Win32
+		{7AF97D40-AC01-471B-AE4A-81D2542DFE5A}.Release.ActiveCfg = Release|Win32
+		{7AF97D40-AC01-471B-AE4A-81D2542DFE5A}.Release.Build.0 = Release|Win32
+		{99BC87CA-140D-4A99-803C-DF078430A6C8}.Debug.ActiveCfg = Debug|Win32
+		{99BC87CA-140D-4A99-803C-DF078430A6C8}.Debug.Build.0 = Debug|Win32
+		{99BC87CA-140D-4A99-803C-DF078430A6C8}.Release.ActiveCfg = Release|Win32
+		{99BC87CA-140D-4A99-803C-DF078430A6C8}.Release.Build.0 = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.ActiveCfg = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.Build.0 = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.ActiveCfg = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
diff --git a/examples/convertCoordinates/convertCoordinates.vcproj b/examples/convertCoordinates/convertCoordinates.vcproj
new file mode 100755
index 0000000..14583a6
--- /dev/null
+++ b/examples/convertCoordinates/convertCoordinates.vcproj
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="convertCoordinates"
+	ProjectGUID="{7AF97D40-AC01-471B-AE4A-81D2542DFE5A}">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="."
+			IntermediateDirectory="..\Debug\"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="-Zm200 -GX -w34100 -w34189"
+				Optimization="4"
+				AdditionalIncludeDirectories=".;..;..\..\src\terralib\kernel"
+				PreprocessorDefinitions="UNICODE,WIN32"
+				GeneratePreprocessedFile="0"
+				MinimalRebuild="TRUE"
+				ExceptionHandling="TRUE"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				AssemblerListingLocation="..\Debug\"
+				ObjectFile="..\Debug\"
+				ProgramDataBaseFileName=".\"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Debug/terralib/terralib.lib ../../Debug/libjpeg/libjpeg.lib ../../Debug/tiff/tiff.lib ../../Debug/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
+				OutputFile="..\Debug\convertCoordinates.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreDefaultLibraryNames="msvcrt.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				WarningLevel="0"
+				DefaultCharType="0"
+				EnableErrorChecks="1"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="-Zm200 -GX -w34100 -w34189"
+				Optimization="4"
+				AdditionalIncludeDirectories=".;..;..\..\src\terralib\kernel"
+				PreprocessorDefinitions="UNICODE,WIN32"
+				GeneratePreprocessedFile="0"
+				MinimalRebuild="TRUE"
+				ExceptionHandling="TRUE"
+				RuntimeLibrary="2"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				AssemblerListingLocation="..\Debug\"
+				ObjectFile="..\Debug\"
+				ProgramDataBaseFileName=".\"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Release/terralib/terralib.lib ../../Release/libjpeg/libjpeg.lib ../../Release/tiff/tiff.lib ../../Release/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
+				OutputFile="..\Debug\convertCoordinates.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				WarningLevel="0"
+				DefaultCharType="0"
+				EnableErrorChecks="1"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath="convertCoordinates.cpp">
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/copyLayer/.cdtproject b/examples/copyLayer/.cdtproject
old mode 100644
new mode 100755
diff --git a/examples/copyLayer/.project b/examples/copyLayer/.project
old mode 100644
new mode 100755
diff --git a/examples/copyLayer/Makefile b/examples/copyLayer/Makefile
old mode 100644
new mode 100755
index 8920e34..4f30efc
--- a/examples/copyLayer/Makefile
+++ b/examples/copyLayer/Makefile
@@ -1,23 +1,30 @@
 all: copyLayer
 
-shapelib:
-	cd ../terralibx/shapelib; make
-
-tiff:
-	cd ../terralibx/tiff; make
+debug: copyLayer_dbg
 
 terralib:
-	cd ../terralibx/terralib; make
-
-stat:
-	cd ../terralibx/stat; make
+	cd ../../terralibx/terralib; make
+	
+terralib_dbg:
+	cd ../../terralibx/terralib; make debug
 
-copyLayer: shapelib tiff terralib stat
+copyLayer: terralib
 	qmake -o makeCopyLayer copyLayer.pro; make -f makeCopyLayer
 
+copyLayer_dbg: terralib_dbg
+	qmake -o makeCopyLayer.debug copyLayer.pro TE_PROJECT_TYPE=DEBUG; \
+	make -f makeCopyLayer.debug;	
+
 clean:
 	if \
 		test -f makeCopyLayer; \
 	then \
 		make -f makeCopyLayer distclean; rm -f makeCopyLayer; \
-	fi
\ No newline at end of file
+	fi
+	
+clean_debug:
+	if \
+		test -f makeCopyLayer.debug; \
+	then \
+		make -f makeCopyLayer.debug distclean; rm -f makeCopyLayer.debug; \
+	fi	
\ No newline at end of file
diff --git a/examples/copyLayer/copyLayer.cpp b/examples/copyLayer/copyLayer.cpp
old mode 100644
new mode 100755
index ef3f7bd..b31c630
--- a/examples/copyLayer/copyLayer.cpp
+++ b/examples/copyLayer/copyLayer.cpp
@@ -33,9 +33,9 @@ int main()
 {
 	// Datatabase server parameters
 	string host = "localhost";
-	string dbname = "TerraTeste";
+	string dbname = "DB320RC1";
 	string user = "root";
-	string password = "";
+	string password = "vinhas";
 
 	// Open a connection to a MySQL database 
 	TeDatabase* db = new TeMySQL();
diff --git a/examples/copyLayer/copyLayer.dsp b/examples/copyLayer/copyLayer.dsp
old mode 100644
new mode 100755
index e5fcc87..9bd9399
--- a/examples/copyLayer/copyLayer.dsp
+++ b/examples/copyLayer/copyLayer.dsp
@@ -42,7 +42,7 @@ RSC=rc.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drive [...]
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\include" /I [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "NDEBUG"
 # ADD RSC /l 0x416 /d "NDEBUG"
@@ -51,7 +51,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\shapelib\Release\shapelib.lib ..\..\terralibw\freetype\Release\freetype.lib ..\..\terralibw\tiff\Release\tiff.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\Postg [...]
+# ADD LINK32 ..\..\terralibw\terralib\Release\terralib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\libpq.lib /nologo /subsystem:console /machine:I386 /out:"../Release/copyLayer.exe"
 # SUBTRACT LINK32 /pdb:none
 
 !ELSEIF  "$(CFG)" == "copyLayer - Win32 Debug"
@@ -68,7 +68,7 @@ LINK32=link.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terra [...]
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include"  /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\i [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "_DEBUG"
 # ADD RSC /l 0x416 /d "_DEBUG"
@@ -77,7 +77,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\shapelib\Debug\shapelib.lib ..\..\terralibw\freetype\Debug\freetype.lib ..\..\terralibw\tiff\Debug\tiff.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\li [...]
+# ADD LINK32 ..\..\terralibw\terralib\Debug\terralib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\libpq.lib /nologo /subsystem:console /debug /machine:I386 /out:"../Debug/copyLayer.exe" /pdbtype:sept
 # SUBTRACT LINK32 /pdb:none
 
 !ENDIF 
diff --git a/examples/copyLayer/copyLayer.dsw b/examples/copyLayer/copyLayer.dsw
old mode 100644
new mode 100755
index 1907dea..3cd0221
--- a/examples/copyLayer/copyLayer.dsw
+++ b/examples/copyLayer/copyLayer.dsw
@@ -3,7 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
 
 ###############################################################################
 
-Project: "copyLayer"=".\copyLayer.dsp" - Package Owner=<4>
+Project: "copyLayer"=.\copyLayer.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -18,52 +18,7 @@ Package=<4>
 
 ###############################################################################
 
-Project: "freetype"="..\..\terralibw\freetype\freetype.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "shapelib"="..\..\terralibw\shapelib\shapelib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "terralib"="..\..\terralibw\terralib\terralib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name freetype
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name shapelib
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name tiff
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "tiff"="..\..\terralibw\tiff\tiff.dsp" - Package Owner=<4>
+Project: "terralib"=..\..\terralibw\terralib\terralib.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
diff --git a/examples/copyLayer/copyLayer.pro b/examples/copyLayer/copyLayer.pro
old mode 100644
new mode 100755
index 4d73380..193353d
--- a/examples/copyLayer/copyLayer.pro
+++ b/examples/copyLayer/copyLayer.pro
@@ -1,49 +1,11 @@
-TEMPLATE = app
-TARGET = copyLayer
-CONFIG += qt warn_on thread debug rtti exceptions
-LANGUAGE = C++
-
-OBJECTS_DIR = .obj
-
-SOURCES	+= \
-	copyLayer.cpp \
-	../src/terralib/functions/TeLayerFunctions.cpp \
-	../src/terralib/drivers/MySQL/TeMySQL.cpp
-
-HEADERS	+= \
-	../src/terralib/functions/TeLayerFunctions.h \
-	../src/terralib/drivers/MySQL/TeMySQL.h
-	
-INCLUDEPATH += \
-	. \
-	.. \
-	../src/terralib/kernel \
-	../src/terralib/application \
-	../src/terralib/functions \
-	../src/terralib/stat \
-	../src/shapelib \
-	../src/zlib \
-	../src/terralib/application/qt \
-	../src/terralib/drivers/MySQL \
-	../src/terralib/drivers/MySQL/include \
-	../src/terralib/drivers/OracleSpatial \
-	../src/terralib/drivers/OracleSpatial/OCI/include \
-	../src/terralib/drivers/PostgreSQL \
-	../src/terralib/drivers/PostgreSQL/includepg 
-
-LIBS += \
-	-L../terralibx/shapelib \
-	-L../terralibx/stat \
-	-L../terralibx/terralib \
-	-L../terralibx/tiff \
-	-L../terralibx/PostgreSQL \
-	-L/usr/local/lib -L/usr/lib -L/usr/lib/mysql -L/usr/local/lib/mysql \
-	-L/usr/local/mysql -L/usr/local/mysql/lib -L. \
-    -lshapelib -lstat -lterralib -ltiff -lmysqlclient -lpq -lcrypt
-
-
-
-
-
+include( ../base/base.pro )
 
+SOURCES += \
+  copyLayer.cpp \
+  ../../src/terralib/functions/TeLayerFunctions.cpp \
+  ../../src/terralib/drivers/MySQL/TeMySQL.cpp \
+  ../../src/terralib/utils/TeDatabaseUtils.cpp
 
+HEADERS += \
+  ../../src/terralib/functions/TeLayerFunctions.h \
+  ../../src/terralib/drivers/MySQL/TeMySQL.h
diff --git a/examples/copyLayer/copyLayer.sln b/examples/copyLayer/copyLayer.sln
new file mode 100755
index 0000000..95c9333
--- /dev/null
+++ b/examples/copyLayer/copyLayer.sln
@@ -0,0 +1,45 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "copyLayer", "copyLayer.vcproj", "{1676F9CB-817E-443B-AAB3-DDF062370977}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "terralib", "..\..\terralibw\terralib\terralib.vcproj", "{539D68C7-96A1-4951-AB50-B7F579C01933}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjpeg", "..\..\terralibw\libjpeg\libjpeg.vcproj", "{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tiff", "..\..\terralibw\tiff\tiff.vcproj", "{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		Debug = Debug
+		Release = Release
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{1676F9CB-817E-443B-AAB3-DDF062370977}.Debug.ActiveCfg = Debug|Win32
+		{1676F9CB-817E-443B-AAB3-DDF062370977}.Debug.Build.0 = Debug|Win32
+		{1676F9CB-817E-443B-AAB3-DDF062370977}.Release.ActiveCfg = Release|Win32
+		{1676F9CB-817E-443B-AAB3-DDF062370977}.Release.Build.0 = Release|Win32
+		{539D68C7-96A1-4951-AB50-B7F579C01933}.Debug.ActiveCfg = Debug|Win32
+		{539D68C7-96A1-4951-AB50-B7F579C01933}.Debug.Build.0 = Debug|Win32
+		{539D68C7-96A1-4951-AB50-B7F579C01933}.Release.ActiveCfg = Release|Win32
+		{539D68C7-96A1-4951-AB50-B7F579C01933}.Release.Build.0 = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.ActiveCfg = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.Build.0 = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.ActiveCfg = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.Build.0 = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.ActiveCfg = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.Build.0 = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.ActiveCfg = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
diff --git a/examples/copyLayer/copyLayer.vcproj b/examples/copyLayer/copyLayer.vcproj
new file mode 100755
index 0000000..8242f63
--- /dev/null
+++ b/examples/copyLayer/copyLayer.vcproj
@@ -0,0 +1,229 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="copyLayer"
+	ProjectGUID="{BA9A9F9F-CD6E-4203-97C6-EBF862BE6A4D}"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Release"
+			IntermediateDirectory=".\Release"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories="..\..\\src\terralib\utils;.;..\..\src\terralib\kernel;..\..\src\terralib\functions;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="TRUE"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\Release/copyLayer.pch"
+				AssemblerListingLocation=".\Release/"
+				ObjectFile=".\Release/"
+				ProgramDataBaseFileName=".\Release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Release/terralib/terralib.lib ../../Release/libjpeg/libjpeg.lib ../../Release/tiff/tiff.lib ../../Release/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
+				OutputFile="../Release/copyLayer.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				ProgramDatabaseFile=".\Release/copyLayer.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\Release/copyLayer.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1046"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Debug"
+			IntermediateDirectory=".\Debug"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;..\..\src\terralib\kernel;..\..\src\terralib\functions;..\..\src\terralib\utils;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				PrecompiledHeaderFile=".\Debug/copyLayer.pch"
+				AssemblerListingLocation=".\Debug/"
+				ObjectFile=".\Debug/"
+				ProgramDataBaseFileName=".\Debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="4"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Debug/terralib/terralib.lib ../../Debug/libjpeg/libjpeg.lib ../../Debug/tiff/tiff.lib ../../Debug/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
+				OutputFile="../Debug/copyLayer.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=".\Debug/copyLayer.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\Debug/copyLayer.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1046"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath="copyLayer.cpp">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\utils\TeDatabaseUtils.cpp">
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\functions\TeLayerFunctions.cpp">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.cpp">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+			<File
+				RelativePath="..\..\src\terralib\utils\TeDatabaseUtils.h">
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\functions\TeLayerFunctions.h">
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.h">
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/createCoverage/createCoverage.cpp b/examples/createCoverage/createCoverage.cpp
new file mode 100644
index 0000000..8d5ce19
--- /dev/null
+++ b/examples/createCoverage/createCoverage.cpp
@@ -0,0 +1,314 @@
+#include "TeDatabase.h"
+#include "TeAdoDB.h"
+#include "TeBlockLoader.h"
+#include "TeCoverage.h"
+#include "TeCoverageDecoder.h"
+#include "TeCoverageImport.h"
+
+void printGeom(TePoint& point)
+{
+    std::cout << "(" << point.location().x() << "," << point.location().y() << ")";
+}
+
+void printGeom(TeLine2D& line)
+{
+    std::cout << "(line id = " << line.geomId() << ")";
+}
+
+void printGeom(TePolygon& poly)
+{
+    std::cout << "(polygon id = " << poly.geomId() << ")";
+}
+
+template <class T>
+void testCoverage(std::string& databaseFile, std::string& coverageLayerName, std::string& coverageId, std::string& srcLayerName, std::vector<std::string>& columns)
+{
+    std::cout << "Entered testCoverage." << std::endl;
+
+    // Connect to the database
+	TeDatabase* myDB = new TeAdo();
+	bool connected = myDB->connect("", "", "", databaseFile, 0);
+    myDB->loadLayerSet(true);
+
+    // Setup coverage layer
+    TeLayer* layer = NULL;
+    try
+    {
+        // Check if coverage layer exists
+        if (myDB->layerExist(coverageLayerName))
+        {
+            std::cout << "> Layer '" << coverageLayerName << "' found on database." << std::endl;
+
+            std::vector<std::string> coverageIds;
+            layer = new TeLayer(coverageLayerName, myDB);
+            TeRetrieveCoverageIds(layer, coverageIds);
+
+            // Check if coverage is in the coverage layer
+            if (find(coverageIds.begin(), coverageIds.end(), coverageId) != coverageIds.end())
+            {
+                std::cout << "> Coverage '" << coverageId << "' found on layer '" << layer->name() << "'." << std::endl;
+            }
+            else
+            {
+                std::string errorMsg = "Coverage '" + coverageId + "' not found on layer '" + layer->name() + "'.";
+                throw TeException(UNKNOWN_ERROR_TYPE, errorMsg, false);
+            }
+        }
+        else
+        {
+            std::cout << "> Layer '" << coverageLayerName << "' not found on database." << std::endl;
+
+            // Check if source layer exists
+            if (myDB->layerExist(srcLayerName))
+            {
+                std::cout << "> Source layer '" << srcLayerName << "' found on database." << std::endl;
+
+                // Import from source layer
+                TeLayer* srcLayer = new TeLayer(srcLayerName, myDB);
+                layer = TeCoverageImportLayer<T>(myDB, coverageLayerName, srcLayer, columns, coverageId);
+                
+                if (layer)
+                {
+                    std::cout << "> Imported coverage data from source layer '" << srcLayerName << "'." << std::endl;
+                }
+                else
+                {
+                    std::string errorMsg = "Couldn't import coverage data from source layer '" + srcLayerName + "'.";
+                    throw TeException(UNKNOWN_ERROR_TYPE, errorMsg, false);
+                }
+            }
+            else
+            {
+                std::string errorMsg = "Source layer '" + srcLayerName + "' not found on database.";
+                throw TeException(UNKNOWN_ERROR_TYPE, errorMsg, false);
+            }
+        }
+    }
+    catch(TeException e)
+    {
+        std::cout << "Error: " << e.message() << std::endl;
+        return;
+    }
+
+    // Setup coverage parameters
+    TeCoverageParams coverageParams = TeCoverageParams(myDB, layer->id(), coverageId);
+    coverageParams.setPersistenceType(TePERSISTENCE_DATABASE_CACHELRU);
+
+    // Create and initialize coverage
+    TeCoverage<T> coverage = TeCoverage<T>(coverageParams);
+    coverage.init();
+    std::cout << "> Coverage '" << coverageParams.getCoverageId() << "' created and initialized." << std::endl;
+    std::cout << "Coverage bounding box: (" << coverage.box().x1() << ", " << coverage.box().y1() << ", " << coverage.box().x2() << ", " << coverage.box().y2() << ") " << std::endl;
+    std::vector<TeCoverageDimension> dimensions = coverage.getParameters().getDimensions();
+    std::cout << "Coverage dimensions: ";
+    for (std::vector<TeCoverageDimension>::iterator it = dimensions.begin(); it != dimensions.end(); ++it)
+    {
+        std::cout << "{" << it->dimension_id << ": " << it->name << "}, ";
+    }
+    std::cout << std::endl;
+
+    unsigned int numDimensions = dimensions.size();
+
+    // ============================= TEST 1 ===================================
+
+    std::cout << "-------------------------------------------" << std::endl;
+    std::cout << "> (Test 1: Spatial selection)" << std::endl;
+
+    // Ask the user for a selection box
+    std::cout << "Enter box coordinates for the spatial query" << std::endl;
+
+    double x1, y1, x2, y2;
+    std::cout << "lower x: ";
+    std::cin >> x1;
+    std::cout << "lower y: ";
+    std::cin >> y1;
+    std::cout << "upper x: ";
+    std::cin >> x2;
+    std::cout << "upper y: ";
+    std::cin >> y2;
+    TeBox box(x1, y1, x2, y2);
+    TePolygon poly = TeMakePolygon(box);
+
+    TeCoverage<T>::iterator itSamples = coverage.begin(poly);
+    TeCoverage<T>::iterator endSamples = coverage.end(poly);
+
+    std::cout << "> Result of spatial query:" << std::endl;
+
+    // Iterate and print geometries and values
+    while (itSamples != endSamples) {
+
+        printGeom(*itSamples);
+
+        std::cout << ": {";
+        for (unsigned int i = 0; i < numDimensions; ++i)
+        {
+            std::cout << itSamples[i] << ", ";
+        }
+        std::cout << "}" << std::endl;
+        itSamples++;
+    }
+
+    // ============================= TEST 2 ===================================
+
+    std::cout << "-------------------------------------------" << std::endl;
+    std::cout << "> (Test 2: Interpolated value)" << std::endl;
+
+    // Ask the user for an arbitrary position
+    std::cout << "Enter arbitrary coordinate for interpolating" << std::endl;
+    double x, y;
+    std::cout << "x: ";
+    std::cin >> x;
+    std::cout << "y: ";
+    std::cin >> y;
+
+    // Get interpolated value
+    TeCoord2D location = TeCoord2D(x, y);
+    std::vector<double> values;
+    coverage.evaluate(location, values);
+    std::cout << "> Result of interpolation:" << std::endl;
+    std::cout << "(" << x << ", " << y << ")";
+    std::cout << ": {";
+    for (unsigned int i = 0; i < numDimensions; ++i)
+    {
+        std::cout << values[i] << ", ";
+    }
+    std::cout << "}" << std::endl;
+
+    // ============================= TEST 3 ===================================
+    
+    // Create raster and fill with interpolated coverage data
+    std::cout << "-------------------------------------------" << std::endl;
+    std::cout << "> (Test 3: Fill Raster with interpolated data)" << std::endl;
+
+    std::cout << "Enter parameters for filling raster" << std::endl;
+    int nRows, nCols, srcDimension;
+    std::cout << "Number of rows: ";
+    std::cin >> nRows;
+    std::cout << "Number of columns: ";
+    std::cin >> nCols;
+    std::cout << "ID of coverage dimension to be read: ";
+    std::cin >> srcDimension;
+
+    // Create raster projection and get coverage projection
+    TeProjection* rasterProj = new TeLatLong(TeDatumFactory::make("SAD69"));
+    TeProjection* coverageProj = coverage.getParameters().getProjection();
+    coverageProj->setDestinationProjection(rasterProj);
+
+    // Get coverage box coordinates
+    TeCoord2D lowerLeft = TeCoord2D(coverage.box().x1(), coverage.box().y1());
+    TeCoord2D upperRight = TeCoord2D(coverage.box().x2(), coverage.box().y2());
+
+    // Convert to intermediate projection
+    lowerLeft = coverageProj->PC2LL(lowerLeft);
+    upperRight = coverageProj->PC2LL(upperRight);
+
+    // Convert to raster projection
+    lowerLeft = rasterProj->LL2PC(lowerLeft);
+    upperRight = rasterProj->LL2PC(upperRight);
+
+    TeBox rasterBox = TeBox(lowerLeft, upperRight); // Raster bounding box
+
+    // Set raster params and create raster in memory
+    TeRasterParams rasterParams;
+    rasterParams.nBands(1);
+    rasterParams.projection(rasterProj);
+    rasterParams.setDataType(TeDOUBLE);
+    rasterParams.decoderIdentifier_ = "MEM";
+    rasterParams.mode_ = 'c';
+    rasterParams.boundingBoxLinesColumns(rasterBox.x1(),
+                                         rasterBox.y1(),
+                                         rasterBox.x2(),
+                                         rasterBox.y2(),
+                                         nRows, nCols);
+    TeRaster* rasterMem = new TeRaster(rasterParams);
+    rasterMem->init();
+    if (!rasterMem->status())
+    {
+        cout << "Falha ao criar raster em memoria." << endl;
+    }
+
+    // Fill coverage with interpolated values from the coverage, counting time
+    time_t when;
+    int beginTime = time(&when);
+    coverage.evaluate(*rasterMem, 0, srcDimension);
+    int endTime = time(&when);
+
+    // Show contents of the raster
+    for (TeRaster::iterator it = rasterMem->begin(); it != rasterMem->end(); it++)
+    {
+        TeCoord2D pixelCoord = rasterMem->index2Coord(TeCoord2D(it.currentColumn(), it.currentLine()));
+        double val = 0;
+        rasterMem->getElement(it.currentColumn(), it.currentLine(), val);
+        std::cout << "coord(" << it.currentColumn() << "," << it.currentLine() << ") = (" << pixelCoord.x() << "," << pixelCoord.y() << "): value = [" << val << "]" << std::endl;
+    }
+
+    // Show time spent in raster interpolation
+    std::cout << "Completed interpolation of " << nRows << "x" << nCols << " raster in " << (endTime - beginTime) << "s." << std::endl;
+
+	// Close database connection
+	myDB->close();
+}
+
+void main(int argc, char* argv[])
+{
+    std::cout << "This application will test some coverage functions.\n"
+            << "What support representation do you want for the coverage?\n"
+            << "(1=Point, 2=Line, 3=Polygon): ";
+
+    int coverageType = -1;
+    std::cin >> coverageType;
+
+    std::string databaseFile, coverageLayerName, coverageId, srcLayerName;
+    std::vector<std::string> columns;
+
+    switch (coverageType)
+    {
+    case 1:
+        // Database location
+        databaseFile = ".\\cidades.mdb";
+
+        // Information about coverage to be created/accessed
+        coverageLayerName = "CidadesCoverageLayer";
+        coverageId = "CidadesCoverage";
+
+        // Information about source for importing
+        srcLayerName = "CIDADES_point";
+        columns.push_back("MD_LONGITU");
+        columns.push_back("MD_LATITUD");
+
+        testCoverage<TePoint>(databaseFile, coverageLayerName, coverageId, srcLayerName, columns);
+        break;
+
+    case 2:
+        // Database location
+        databaseFile = ".\\sergipe.mdb";
+
+        // Information about coverage to be created/accessed
+        coverageLayerName = "AltimetriaCoverageLayer";
+        coverageId = "AltimetriaCoverage";
+
+        // Information about source for importing
+        srcLayerName = "Altimetria_lin";
+        columns.push_back("COTA");
+        columns.push_back("LENGTH");
+
+        testCoverage<TeLine2D>(databaseFile, coverageLayerName, coverageId, srcLayerName, columns);
+        break;
+
+    case 3:
+        // Database location
+        databaseFile = ".\\sergipe.mdb";
+
+        // Information about coverage to be created/accessed
+        coverageLayerName = "UsoDoSoloCoverageLayer";
+        coverageId = "UsoDoSoloCoverage";
+
+        // Information about source for importing
+        srcLayerName = "UsodoSolo_pol";
+        columns.push_back("AREA");
+        columns.push_back("PERIMETER");
+
+        testCoverage<TePolygon>(databaseFile, coverageLayerName, coverageId, srcLayerName, columns);
+        break;
+    }
+}
diff --git a/examples/createCoverage/createCoverage.sln b/examples/createCoverage/createCoverage.sln
new file mode 100644
index 0000000..b6d3e38
--- /dev/null
+++ b/examples/createCoverage/createCoverage.sln
@@ -0,0 +1,50 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "createCoverage", "createCoverage.vcproj", "{3BD83FB7-80E0-4B98-BB25-F40B27FD544C}"
+	ProjectSection(ProjectDependencies) = postProject
+		{1253197A-5710-4924-9706-6449C0C32FE9} = {1253197A-5710-4924-9706-6449C0C32FE9}
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C} = {BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}
+		{DD1ADACD-7990-4793-9952-25197394954A} = {DD1ADACD-7990-4793-9952-25197394954A}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "terralib", "..\..\terralibw\terralib\terralib.vcproj", "{1253197A-5710-4924-9706-6449C0C32FE9}"
+	ProjectSection(ProjectDependencies) = postProject
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C} = {BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}
+		{DD1ADACD-7990-4793-9952-25197394954A} = {DD1ADACD-7990-4793-9952-25197394954A}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjpeg", "..\..\terralibw\libjpeg\libjpeg.vcproj", "{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tiff", "..\..\terralibw\tiff\tiff.vcproj", "{DD1ADACD-7990-4793-9952-25197394954A}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		Debug = Debug
+		Release = Release
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{3BD83FB7-80E0-4B98-BB25-F40B27FD544C}.Debug.ActiveCfg = Debug|Win32
+		{3BD83FB7-80E0-4B98-BB25-F40B27FD544C}.Debug.Build.0 = Debug|Win32
+		{3BD83FB7-80E0-4B98-BB25-F40B27FD544C}.Release.ActiveCfg = Release|Win32
+		{3BD83FB7-80E0-4B98-BB25-F40B27FD544C}.Release.Build.0 = Release|Win32
+		{1253197A-5710-4924-9706-6449C0C32FE9}.Debug.ActiveCfg = Debug|Win32
+		{1253197A-5710-4924-9706-6449C0C32FE9}.Debug.Build.0 = Debug|Win32
+		{1253197A-5710-4924-9706-6449C0C32FE9}.Release.ActiveCfg = Release|Win32
+		{1253197A-5710-4924-9706-6449C0C32FE9}.Release.Build.0 = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.ActiveCfg = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.Build.0 = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.ActiveCfg = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.Build.0 = Release|Win32
+		{DD1ADACD-7990-4793-9952-25197394954A}.Debug.ActiveCfg = Debug|Win32
+		{DD1ADACD-7990-4793-9952-25197394954A}.Debug.Build.0 = Debug|Win32
+		{DD1ADACD-7990-4793-9952-25197394954A}.Release.ActiveCfg = Release|Win32
+		{DD1ADACD-7990-4793-9952-25197394954A}.Release.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
diff --git a/examples/createCoverage/createCoverage.vcproj b/examples/createCoverage/createCoverage.vcproj
new file mode 100644
index 0000000..dd12eb6
--- /dev/null
+++ b/examples/createCoverage/createCoverage.vcproj
@@ -0,0 +1,162 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="createCoverage"
+	ProjectGUID="{3BD83FB7-80E0-4B98-BB25-F40B27FD544C}"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\Debug\"
+			IntermediateDirectory="..\Debug\"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="4"
+				AdditionalIncludeDirectories=".;..;..\..\src\terralib\kernel;..\..\terralibw\ado"
+				PreprocessorDefinitions="UNICODE,WIN32"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				RuntimeTypeInfo="TRUE"
+				UsePrecompiledHeader="0"
+				AssemblerListingLocation="..\Debug\"
+				ObjectFile="..\Debug\"
+				ProgramDataBaseFileName=".\"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Debug/terralib/terralib.lib ../../Debug/libjpeg/libjpeg.lib ../../Debug/tiff/tiff.lib ../../terralibw/zlib/zlibdll.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
+				OutputFile="$(OutDir)\$(ProjectName).exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				AdditionalLibraryDirectories=""
+				IgnoreDefaultLibraryNames="msvcrt.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"
+				TargetMachine="0"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Debug\*.dll $(OutDir)
+copy /y cidades.mdb.bak cidades.mdb
+copy /y sergipe.mdb.bak sergipe.mdb
+"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\Release\"
+			IntermediateDirectory="..\Release\"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="D:\Users\vitorcd\Terralib_CVS\src\terralib\kernel;D:\Users\vitorcd\Terralib_CVS\terralibw\ado"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="4"
+				UsePrecompiledHeader="3"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				OutputFile="$(OutDir)/createCoverage.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\createCoverage.cpp">
+			</File>
+			<File
+				RelativePath="..\..\terralibw\ado\TeAdoDB.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="0"/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+			<File
+				RelativePath="..\..\terralibw\ado\TeAdoDB.h">
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+		</Filter>
+		<File
+			RelativePath=".\ReadMe.txt">
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/createDatabase/.cdtproject b/examples/createDatabase/.cdtproject
old mode 100644
new mode 100755
diff --git a/examples/createDatabase/.project b/examples/createDatabase/.project
old mode 100644
new mode 100755
index c549545..431ee19
--- a/examples/createDatabase/.project
+++ b/examples/createDatabase/.project
@@ -14,21 +14,21 @@
 				</dictionary>
 				<dictionary>
 					<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
-					<value>clean all</value>
+					<value>all</value>
 				</dictionary>
 				<dictionary>
 					<key>org.eclipse.cdt.make.core.incrementalBuildTarget</key>
 					<value>all</value>
 				</dictionary>
 				<dictionary>
-					<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
-					<value>false</value>
-				</dictionary>
-				<dictionary>
 					<key>org.eclipse.cdt.make.core.buildLocation</key>
 					<value></value>
 				</dictionary>
 				<dictionary>
+					<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
+					<value>false</value>
+				</dictionary>
+				<dictionary>
 					<key>org.eclipse.cdt.make.core.enableFullBuild</key>
 					<value>true</value>
 				</dictionary>
@@ -53,13 +53,13 @@
 					<value>make</value>
 				</dictionary>
 				<dictionary>
-					<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
-					<value>all</value>
-				</dictionary>
-				<dictionary>
 					<key>org.eclipse.cdt.make.core.stopOnError</key>
 					<value>false</value>
 				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
+					<value>all</value>
+				</dictionary>
 			</arguments>
 		</buildCommand>
 		<buildCommand>
diff --git a/examples/createDatabase/Makefile b/examples/createDatabase/Makefile
old mode 100644
new mode 100755
index c883e6e..4db6120
--- a/examples/createDatabase/Makefile
+++ b/examples/createDatabase/Makefile
@@ -1,23 +1,29 @@
 all: createDatabase
 
-shapelib:
-	cd ../terralibx/shapelib; make
-
-tiff:
-	cd ../terralibx/tiff; make
+debug: createDB_dbg
 
 terralib:
-	cd ../terralibx/terralib; make
+	cd ../../terralibx/terralib; make
 
-stat:
-	cd ../terralibx/stat; make
+terralib_dbg:
+	cd ../../terralibx/terralib; make debug
 
-createDatabase: shapelib tiff terralib stat
+createDatabase: terralib
 	qmake -o makeCreateDatabase createDatabase.pro; make -f makeCreateDatabase
 
+createDB_dbg: terralib_dbg
+	qmake -o makeCreateDatabase.debug createDatabase.pro TE_PROJECT_TYPE=DEBUG; make -f makeCreateDatabase.debug
+
 clean:
 	if \
 		test -f makeCreateDatabase; \
 	then \
 		make -f makeCreateDatabase distclean; rm -f makeCreateDatabase; \
+	fi
+
+clean_debug:
+	if \
+		test -f makeCreateDatabase.debug; \
+	then \
+		make -f makeCreateDatabase.debug distclean; rm -f makeCreateDatabase.debug; \
 	fi
\ No newline at end of file
diff --git a/examples/createDatabase/createDatabase.cpp b/examples/createDatabase/createDatabase.cpp
old mode 100644
new mode 100755
index 0c660e2..28c1d6f
--- a/examples/createDatabase/createDatabase.cpp
+++ b/examples/createDatabase/createDatabase.cpp
@@ -21,30 +21,29 @@ indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
 /* 
-	This file shows an example of how to create a TerraLib database called "TerraTeste"
+	This file shows an example of how to create a TerraLib database called "DB320RC1"
 	in an MySQL DBMS Server running in the local machine, supposing there is an
 	user called "root" with no password.
 
 	Author: Lubia Vinhas  
 */
 
-#include <TeMySQL.h>
+#include "TeMySQL.h"
 
 int main()
 {
 	// Datatabase server parameters
 	string host = "localhost";
-	string dbname = "TerraTeste";
+	string dbname = "DB320RC1";
 	string user = "root";
-	string password = "";
+	string password = "vinhas";
 
 	// Creates a new database
 	TeDatabase* db = new TeMySQL();
-	if (!db->newDatabase(dbname, user, password, host))
+	if (db->newDatabase(dbname, user, password, host) == false)
 	{
 		cout << "Error: " << db->errorMessage() << endl;
 		cout << endl << "Press Enter\n";
-		cout.flush();
 		getchar();
 		return 1;
 	}
@@ -54,8 +53,8 @@ int main()
 
 	// Close database
 	db->close();
+	delete db;
 	cout << endl << "Press Enter\n";
-	cout.flush();
 	getchar();
 	return 0;
 }
diff --git a/examples/createDatabase/createDatabase.dsp b/examples/createDatabase/createDatabase.dsp
old mode 100644
new mode 100755
index 7fe906f..a7edf53
--- a/examples/createDatabase/createDatabase.dsp
+++ b/examples/createDatabase/createDatabase.dsp
@@ -42,7 +42,7 @@ RSC=rc.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drive [...]
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\include" /I [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "NDEBUG"
 # ADD RSC /l 0x416 /d "NDEBUG"
@@ -51,7 +51,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\shapelib\Release\shapelib.lib ..\..\terralibw\freetype\Release\freetype.lib ..\..\terralibw\tiff\Release\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\Postg [...]
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\libpq.lib /nologo /subsystem:console /machine:I386 /out:"../Release/createDatabase.exe"
 # SUBTRACT LINK32 /pdb:none
 
 !ELSEIF  "$(CFG)" == "createDatabase - Win32 Debug"
@@ -68,7 +68,7 @@ LINK32=link.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terra [...]
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\in [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "_DEBUG"
 # ADD RSC /l 0x416 /d "_DEBUG"
@@ -77,7 +77,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\shapelib\Debug\shapelib.lib ..\..\terralibw\freetype\Debug\freetype.lib ..\..\terralibw\tiff\Debug\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\li [...]
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\libpq.lib /nologo /subsystem:console /debug /machine:I386 /out:"../Debug/createDatabase.exe" /pdbtype:sept
 # SUBTRACT LINK32 /pdb:none
 
 !ENDIF 
diff --git a/examples/createDatabase/createDatabase.dsw b/examples/createDatabase/createDatabase.dsw
old mode 100644
new mode 100755
index 93a869b..2a6a1fb
--- a/examples/createDatabase/createDatabase.dsw
+++ b/examples/createDatabase/createDatabase.dsw
@@ -3,67 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
 
 ###############################################################################
 
-Project: "createDatabase"=".\createDatabase.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name terralib
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "freetype"="..\..\terralibw\freetype\freetype.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "shapelib"="..\..\terralibw\shapelib\shapelib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "terralib"="..\..\terralibw\terralib\terralib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name freetype
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name shapelib
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name tiff
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "tiff"="..\..\terralibw\tiff\tiff.dsp" - Package Owner=<4>
+Project: "createDatabase"=.\createDatabase.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
diff --git a/examples/createDatabase/createDatabase.pro b/examples/createDatabase/createDatabase.pro
old mode 100644
new mode 100755
index bc8cadc..ce03277
--- a/examples/createDatabase/createDatabase.pro
+++ b/examples/createDatabase/createDatabase.pro
@@ -1,47 +1,9 @@
-TEMPLATE = app
-TARGET = createDatabase
-CONFIG += qt warn_on thread debug rtti exceptions
-LANGUAGE = C++
-
-OBJECTS_DIR = .obj
+include( ../base/base.pro )
 
 SOURCES	+= \
 	createDatabase.cpp \
-	../src/terralib/drivers/MySQL/TeMySQL.cpp
+	../../src/terralib/drivers/MySQL/TeMySQL.cpp
 
 HEADERS	+= \
-	../src/terralib/drivers/MySQL/TeMySQL.h
+	../../src/terralib/drivers/MySQL/TeMySQL.h
 	
-INCLUDEPATH += \
-	. \
-	.. \
-	../src/terralib/kernel \
-	../src/terralib/application \
-	../src/terralib/functions \
-	../src/terralib/stat \
-	../src/shapelib \
-	../src/zlib \
-	../src/terralib/application/qt \
-	../src/terralib/drivers/MySQL \
-	../src/terralib/drivers/MySQL/include \
-	../src/terralib/drivers/OracleSpatial \
-	../src/terralib/drivers/OracleSpatial/OCI/include \
-	../src/terralib/drivers/PostgreSQL \
-	../src/terralib/drivers/PostgreSQL/includepg 
-
-LIBS += \
-	-L../terralibx/shapelib \
-	-L../terralibx/stat \
-	-L../terralibx/terralib \
-	-L../terralibx/tiff \
-	-L../terralibx/PostgreSQL \
-	-L/usr/local/lib -L/usr/lib -L/usr/lib/mysql -L/usr/local/lib/mysql \
-	-L/usr/local/mysql -L/usr/local/mysql/lib -L. \
-    -lshapelib -lstat -lterralib -ltiff -lmysqlclient -lpq -lcrypt
-
-
-
-
-
-
-
diff --git a/examples/createDatabase/createDatabase.sln b/examples/createDatabase/createDatabase.sln
new file mode 100755
index 0000000..0e3836c
--- /dev/null
+++ b/examples/createDatabase/createDatabase.sln
@@ -0,0 +1,50 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "createDatabase", "createDatabase.vcproj", "{94BFC951-F445-444C-96B9-F65C27CE30CA}"
+	ProjectSection(ProjectDependencies) = postProject
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C} = {BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E} = {5E26C3A1-28D3-40FA-A3F5-115180C98E0E}
+		{70DF8CB8-3CDB-4040-A832-A2FDC05758C2} = {70DF8CB8-3CDB-4040-A832-A2FDC05758C2}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjpeg", "..\..\terralibw\libjpeg\libjpeg.vcproj", "{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "terralib", "..\..\terralibw\terralib\terralib.vcproj", "{70DF8CB8-3CDB-4040-A832-A2FDC05758C2}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tiff", "..\..\terralibw\tiff\tiff.vcproj", "{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		Debug = Debug
+		Release = Release
+	EndGlobalSection
+	GlobalSection(ProjectDependencies) = postSolution
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{94BFC951-F445-444C-96B9-F65C27CE30CA}.Debug.ActiveCfg = Debug|Win32
+		{94BFC951-F445-444C-96B9-F65C27CE30CA}.Debug.Build.0 = Debug|Win32
+		{94BFC951-F445-444C-96B9-F65C27CE30CA}.Release.ActiveCfg = Release|Win32
+		{94BFC951-F445-444C-96B9-F65C27CE30CA}.Release.Build.0 = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.ActiveCfg = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.Build.0 = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.ActiveCfg = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.Build.0 = Release|Win32
+		{70DF8CB8-3CDB-4040-A832-A2FDC05758C2}.Debug.ActiveCfg = Debug|Win32
+		{70DF8CB8-3CDB-4040-A832-A2FDC05758C2}.Debug.Build.0 = Debug|Win32
+		{70DF8CB8-3CDB-4040-A832-A2FDC05758C2}.Release.ActiveCfg = Release|Win32
+		{70DF8CB8-3CDB-4040-A832-A2FDC05758C2}.Release.Build.0 = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.ActiveCfg = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.Build.0 = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.ActiveCfg = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
diff --git a/examples/createDatabase/createDatabase.vcproj b/examples/createDatabase/createDatabase.vcproj
new file mode 100755
index 0000000..fb85883
--- /dev/null
+++ b/examples/createDatabase/createDatabase.vcproj
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="createDatabase"
+	ProjectGUID="{970FF570-5C7F-48A4-B8C7-C0539D3A45DA}">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="."
+			IntermediateDirectory="..\Debug\"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="-Zm200 -GX -w34100 -w34189"
+				Optimization="4"
+				AdditionalIncludeDirectories=".;..\..\src\terralib\kernel;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include"
+				PreprocessorDefinitions="UNICODE,WIN32"
+				GeneratePreprocessedFile="0"
+				MinimalRebuild="TRUE"
+				ExceptionHandling="TRUE"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				AssemblerListingLocation="..\Debug\"
+				ObjectFile="..\Debug\"
+				ProgramDataBaseFileName=".\"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Debug/terralib/terralib.lib ../../Debug/libjpeg/libjpeg.lib ../../Debug/tiff/tiff.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
+				OutputFile="..\Debug\createDatabase.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreDefaultLibraryNames="msvcrt.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				WarningLevel="0"
+				DefaultCharType="0"
+				EnableErrorChecks="1"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="."
+			IntermediateDirectory="..\Release\"
+			ConfigurationType="1">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories=".;..\..\src\terralib\kernel;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include"
+				PreprocessorDefinitions="UNICODE,WIN32"
+				RuntimeLibrary="2"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Release/terralib/terralib.lib ../../Release/libjpeg/libjpeg.lib ../../Release/tiff/tiff.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
+				OutputFile="..\Release\createDatabase.exe"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath=".\createDatabase.cpp">
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.h">
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/createLayer/.cdtproject b/examples/createLayer/.cdtproject
old mode 100644
new mode 100755
diff --git a/examples/createLayer/.project b/examples/createLayer/.project
old mode 100644
new mode 100755
diff --git a/examples/createLayer/Makefile b/examples/createLayer/Makefile
old mode 100644
new mode 100755
index 424dccc..83717c9
--- a/examples/createLayer/Makefile
+++ b/examples/createLayer/Makefile
@@ -1,23 +1,30 @@
 all: createLayer
 
-shapelib:
-	cd ../terralibx/shapelib; make
-
-tiff:
-	cd ../terralibx/tiff; make
+debug: createLayer_dbg
 
 terralib:
-	cd ../terralibx/terralib; make
-
-stat:
-	cd ../terralibx/stat; make
+	cd ../../terralibx/terralib; make
+	
+terralib_dbg:
+	cd ../../terralibx/terralib; make debug
 
-createLayer: shapelib tiff terralib stat
+createLayer: terralib
 	qmake -o makeCreateLayer createLayer.pro; make -f makeCreateLayer
 
+createLayer_dbg: terralib_dbg
+	qmake -o makeCreateLayer.debug createLayer.pro TE_PROJECT_TYPE=DEBUG; make -f makeCreateLayer.debug
+	
 clean:
 	if \
 		test -f makeCreateLayer; \
 	then \
 		make -f makeCreateLayer distclean; rm -f makeCreateLayer; \
-	fi
\ No newline at end of file
+	fi
+	
+clean_debug:
+	if \
+		test -f makeCreateLayer.debug; \
+	then \
+		make -f makeCreateLayer.debug distclean; rm -f makeCreateLayer.debug; \
+	fi
+
diff --git a/examples/createLayer/createLayer.cpp b/examples/createLayer/createLayer.cpp
old mode 100644
new mode 100755
index 6a6e44f..b0eb98d
--- a/examples/createLayer/createLayer.cpp
+++ b/examples/createLayer/createLayer.cpp
@@ -35,9 +35,9 @@ int main()
 {
 	// Datatabase server parameters
 	string host = "localhost";
-	string dbname = "TerraTeste";
+	string dbname = "DB320RC1";
 	string user = "root";
-	string password = "";
+	string password = "vinhas";
 
 	// Opens a connection to a database accessible though ADO
 	TeDatabase* db = new TeMySQL();
@@ -213,6 +213,7 @@ int main()
 
 	at.rep_.type_ = TeREAL; // a float attribute
 	at.rep_.name_ = "val1";
+	at.rep_.decimals_ = 3;
 	at.rep_.isPrimaryKey_ = false;
 	attList.push_back(at);  
 
diff --git a/examples/createLayer/createLayer.dsp b/examples/createLayer/createLayer.dsp
old mode 100644
new mode 100755
index 86ea6b4..d02414d
--- a/examples/createLayer/createLayer.dsp
+++ b/examples/createLayer/createLayer.dsp
@@ -42,7 +42,7 @@ RSC=rc.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drive [...]
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\include" /I [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "NDEBUG"
 # ADD RSC /l 0x416 /d "NDEBUG"
@@ -51,7 +51,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\shapelib\Release\shapelib.lib ..\..\terralibw\freetype\Release\freetype.lib ..\..\terralibw\tiff\Release\tiff.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\Postg [...]
+# ADD LINK32 ..\..\terralibw\terralib\Release\terralib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\libpq.lib /nologo /subsystem:console /machine:I386 /out:"../Release/createLayer.exe"
 # SUBTRACT LINK32 /pdb:none
 
 !ELSEIF  "$(CFG)" == "createLayer - Win32 Debug"
@@ -68,7 +68,7 @@ LINK32=link.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terra [...]
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\in [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "_DEBUG"
 # ADD RSC /l 0x416 /d "_DEBUG"
@@ -77,7 +77,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\shapelib\Debug\shapelib.lib ..\..\terralibw\freetype\Debug\freetype.lib ..\..\terralibw\tiff\Debug\tiff.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\li [...]
+# ADD LINK32 ..\..\terralibw\terralib\Debug\terralib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\libpq.lib /nologo /subsystem:console /debug /machine:I386 /out:"../Debug/createLayer.exe" /pdbtype:sept
 # SUBTRACT LINK32 /pdb:none
 
 !ENDIF 
diff --git a/examples/createLayer/createLayer.dsw b/examples/createLayer/createLayer.dsw
old mode 100644
new mode 100755
index 74d2e1b..8d21e03
--- a/examples/createLayer/createLayer.dsw
+++ b/examples/createLayer/createLayer.dsw
@@ -3,19 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
 
 ###############################################################################
 
-Project: "freetype"="..\..\terralibw\freetype\freetype.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "createLayer"=".\createLayer.dsp" - Package Owner=<4>
+Project: "createLayer"=.\createLayer.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -30,40 +18,7 @@ Package=<4>
 
 ###############################################################################
 
-Project: "shapelib"="..\..\terralibw\shapelib\shapelib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "terralib"="..\..\terralibw\terralib\terralib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name freetype
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name shapelib
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name tiff
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "tiff"="..\..\terralibw\tiff\tiff.dsp" - Package Owner=<4>
+Project: "terralib"=..\..\terralibw\terralib\terralib.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
diff --git a/examples/createLayer/createLayer.pro b/examples/createLayer/createLayer.pro
old mode 100644
new mode 100755
index 3b1bb3d..d92f83c
--- a/examples/createLayer/createLayer.pro
+++ b/examples/createLayer/createLayer.pro
@@ -1,47 +1,9 @@
-TEMPLATE = app
-TARGET = createLayer
-CONFIG += qt warn_on thread debug rtti exceptions
-LANGUAGE = C++
+include( ../base/base.pro )
 
-OBJECTS_DIR = .obj
 
 SOURCES	+= \
 	createLayer.cpp \
-	../src/terralib/drivers/MySQL/TeMySQL.cpp
+	../../src/terralib/drivers/MySQL/TeMySQL.cpp
 
 HEADERS	+= \
-	../src/terralib/drivers/MySQL/TeMySQL.h
-	
-INCLUDEPATH += \
-	. \
-	.. \
-	../src/terralib/kernel \
-	../src/terralib/application \
-	../src/terralib/functions \
-	../src/terralib/stat \
-	../src/shapelib \
-	../src/zlib \
-	../src/terralib/application/qt \
-	../src/terralib/drivers/MySQL \
-	../src/terralib/drivers/MySQL/include \
-	../src/terralib/drivers/OracleSpatial \
-	../src/terralib/drivers/OracleSpatial/OCI/include \
-	../src/terralib/drivers/PostgreSQL \
-	../src/terralib/drivers/PostgreSQL/includepg 
-
-LIBS += \
-	-L../terralibx/shapelib \
-	-L../terralibx/stat \
-	-L../terralibx/terralib \
-	-L../terralibx/tiff \
-	-L../terralibx/PostgreSQL \
-	-L/usr/local/lib -L/usr/lib -L/usr/lib/mysql -L/usr/local/lib/mysql \
-	-L/usr/local/mysql -L/usr/local/mysql/lib -L. \
-    -lshapelib -lstat -lterralib -ltiff -lmysqlclient -lpq -lcrypt
-
-
-
-
-
-
-
+	../../src/terralib/drivers/MySQL/TeMySQL.h
diff --git a/examples/createLayer/createLayer.sln b/examples/createLayer/createLayer.sln
new file mode 100755
index 0000000..bd39f62
--- /dev/null
+++ b/examples/createLayer/createLayer.sln
@@ -0,0 +1,37 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "createLayer", "createLayer.vcproj", "{3E68D3AC-EC5C-4DA5-A4D3-CE3A9381BC16}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "terralib", "..\..\terralibw\terralib\terralib.vcproj", "{F6FE4C5D-54E9-4F24-92B1-66A78C65EA3F}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tiff", "..\..\terralibw\tiff\tiff.vcproj", "{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		Debug = Debug
+		Release = Release
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{3E68D3AC-EC5C-4DA5-A4D3-CE3A9381BC16}.Debug.ActiveCfg = Debug|Win32
+		{3E68D3AC-EC5C-4DA5-A4D3-CE3A9381BC16}.Debug.Build.0 = Debug|Win32
+		{3E68D3AC-EC5C-4DA5-A4D3-CE3A9381BC16}.Release.ActiveCfg = Release|Win32
+		{3E68D3AC-EC5C-4DA5-A4D3-CE3A9381BC16}.Release.Build.0 = Release|Win32
+		{F6FE4C5D-54E9-4F24-92B1-66A78C65EA3F}.Debug.ActiveCfg = Debug|Win32
+		{F6FE4C5D-54E9-4F24-92B1-66A78C65EA3F}.Debug.Build.0 = Debug|Win32
+		{F6FE4C5D-54E9-4F24-92B1-66A78C65EA3F}.Release.ActiveCfg = Release|Win32
+		{F6FE4C5D-54E9-4F24-92B1-66A78C65EA3F}.Release.Build.0 = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.ActiveCfg = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.Build.0 = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.ActiveCfg = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
diff --git a/examples/createLayer/createLayer.vcproj b/examples/createLayer/createLayer.vcproj
new file mode 100755
index 0000000..ad291ab
--- /dev/null
+++ b/examples/createLayer/createLayer.vcproj
@@ -0,0 +1,200 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="createLayer"
+	ProjectGUID="{60593B0C-8CD8-4157-95EC-0185FBAD9268}"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Debug"
+			IntermediateDirectory=".\Debug"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;..\..\src\terralib\kernel;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				PrecompiledHeaderFile=".\Debug/createLayer.pch"
+				AssemblerListingLocation=".\Debug/"
+				ObjectFile=".\Debug/"
+				ProgramDataBaseFileName=".\Debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="4"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Debug/terralib/terralib.lib ../../Debug/libjpeg/libjpeg.lib ../../Debug/tiff/tiff.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
+				OutputFile="../Debug/createLayer.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=".\Debug/createLayer.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\Debug/createLayer.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1046"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Release"
+			IntermediateDirectory=".\Release"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories=".;..\..\src\terralib\kernel;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="TRUE"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\Release/createLayer.pch"
+				AssemblerListingLocation=".\Release/"
+				ObjectFile=".\Release/"
+				ProgramDataBaseFileName=".\Release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Release/terralib/terralib.lib ../../Release/libjpeg/libjpeg.lib ../../Release/tiff/tiff.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
+				OutputFile="../Release/createLayer.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				ProgramDatabaseFile=".\Release/createLayer.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\Release/createLayer.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1046"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath="createLayer.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.h">
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/createProximityMatrix/.cdtproject b/examples/createProximityMatrix/.cdtproject
deleted file mode 100644
index fc69c6a..0000000
--- a/examples/createProximityMatrix/.cdtproject
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse-cdt version="2.0"?>
-
-<cdtproject id="org.eclipse.cdt.make.core.make">
-<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
-<data>
-<item id="org.eclipse.cdt.core.pathentry">
-<pathentry kind="src" path=""/>
-<pathentry kind="out" path=""/>
-<pathentry kind="con" path="org.eclipse.cdt.make.core.DISCOVERED_SCANNER_INFO"/>
-</item>
-<item id="cdt_indexer">
-<indexEnabled indexValue="false"/>
-<indexerProblemsEnabled indexProblemsValue="0"/>
-</item>
-</data>
-</cdtproject>
diff --git a/examples/createProximityMatrix/.project b/examples/createProximityMatrix/.project
deleted file mode 100644
index ec93901..0000000
--- a/examples/createProximityMatrix/.project
+++ /dev/null
@@ -1,104 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>createProximityMatrix</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.cdt.make.core.makeBuilder</name>
-			<arguments>
-				<dictionary>
-					<key>org.eclipse.cdt.core.errorOutputParser</key>
-					<value>org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.VCErrorParser;</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
-					<value>clean all</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.incrementalBuildTarget</key>
-					<value>all</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
-					<value>false</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.buildLocation</key>
-					<value></value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.enableFullBuild</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.enabledIncrementalBuild</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
-					<value>clean</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.buildCommand</key>
-					<value>make</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
-					<value>all</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.stopOnError</key>
-					<value>false</value>
-				</dictionary>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.cdt.make.core.ScannerConfigBuilder</name>
-			<arguments>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.ScannerConfigDiscoveryEnabled</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.makeBuilderParserId</key>
-					<value>org.eclipse.cdt.make.core.GCCScannerInfoConsoleParser</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.esiProviderCommandEnabled</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.siProblemGenerationEnabled</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.useDefaultESIProviderCmd</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.makeBuilderParserEnabled</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.esiProviderParserId</key>
-					<value>org.eclipse.cdt.make.core.GCCSpecsConsoleParser</value>
-				</dictionary>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.cdt.core.cnature</nature>
-		<nature>org.eclipse.cdt.make.core.makeNature</nature>
-		<nature>org.eclipse.cdt.make.core.ScannerConfigNature</nature>
-	</natures>
-</projectDescription>
diff --git a/examples/createProximityMatrix/Makefile b/examples/createProximityMatrix/Makefile
deleted file mode 100644
index d969fd8..0000000
--- a/examples/createProximityMatrix/Makefile
+++ /dev/null
@@ -1,23 +0,0 @@
-all: createProximityMatrix
-
-shapelib:
-	cd ../terralibx/shapelib; make
-
-tiff:
-	cd ../terralibx/tiff; make
-
-terralib:
-	cd ../terralibx/terralib; make
-
-stat:
-	cd ../terralibx/stat; make
-
-createProximityMatrix: shapelib tiff terralib stat
-	qmake -o makeCreateProximityMatrix createProximityMatrix.pro; make -f makeCreateProximityMatrix
-
-clean:
-	if \
-		test -f makeCreateProximityMatrix; \
-	then \
-		make -f makeCreateProximityMatrix distclean; rm -f makeCreateProximityMatrix; \
-	fi
\ No newline at end of file
diff --git a/examples/createProximityMatrix/createProximityMatrix.cpp b/examples/createProximityMatrix/createProximityMatrix.cpp
deleted file mode 100644
index 49eb34b..0000000
--- a/examples/createProximityMatrix/createProximityMatrix.cpp
+++ /dev/null
@@ -1,131 +0,0 @@
-/************************************************************************************
-TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The library provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use
-of this library and its documentation.
-*************************************************************************************/
-
-/* 
-   This file illustrates an example of how to create a proximity matrix from a 
-   Spatial Temporal Element Set (STElementSet). 
-   In this example, the distance strategy is used to construct the matrix.   
-
-   Author: Karine Reis   
-*/
-
-#include <TeSTElementSet.h>
-#include <TeSTEFunctionsDB.h>
-#include <TeInitQuerierStrategy.h>
-#include <TeGeneralizedProxMatrix.h>
-#include <TeMySQL.h>
-
-int main()
-{	
- 	// Datatabase server parameters
-	string host = "localhost";
-	string dbname = "TerraLib";
-	string user = "root";
-	string password = "ferreira";
-
-	// Open a connection to the TerraTeste MySQL database 
-	TeDatabase* db = new TeMySQL();
-	if (!db->connect(host, user, password, dbname))
-	{
-		cout << "Error: " << db->errorMessage() << endl;
-		cout << endl << "Press Enter\n";
-		getchar();
-		return 1;
-	}
-	cout << "Connection successful to the database \"" << dbname << "\" on MySQL server \"" << host << "\" !\n";;
-		
-	
-	// Opens a connection to a TerraLib database 
-    // Loads a layer named DistritosSP 
-	TeLayer* DistritosSP =  new TeLayer("DistritosSP");
-	if (!db->loadLayer(DistritosSP))
-	{
-	    cout << "Fail to load the layer!" << db->errorMessage() << endl;
-		db->close();
-		cout << endl << "Press Enter\n";
-		getchar();
-        return 1;
-	}
-
-	// Inits querier strategies
-	TeInitQuerierStrategies();
-    
-	// Creates a STElementSet from DistritosSP layer 
-	TeSTElementSet steSet(DistritosSP);
-
-	// Builds the STElementSet with geometries
-	if(!TeSTOSetBuildDB(&steSet, true, false))
-	{
-		cout << "Error! " << endl;
-		cout << endl << "Press Enter\n";
-		getchar();
-		return 1;
-	}
-	
-	// Shows how many elements the elementSet has
-	cout << "Number of elements: " <<  steSet.numElements() << endl;
-
-	
-	// Builds the proximity matrix
-	TeGeneralizedProxMatrix				proxMat;
-	
-	TeProxMatrixLocalDistanceStrategy   sc_dist (&steSet, TePOLYGONS, 12000.00);
-	TeProxMatrixNoWeightsStrategy		sw_no;
-	TeProxMatrixNoSlicingStrategy		ss_no;
-	
-	proxMat.setCurrentSlicingStrategy(&ss_no);
-	proxMat.setCurrentWeightsStrategy(&sw_no);
-	proxMat.setCurrentConstructionStrategy(&sc_dist);
-
-	if(!proxMat.ConstructMatrix())
-	{
-		cout << "Error building proximity matrix! " << endl;
-		getchar();
-		db->close ();
-		return 0;
-	}
-
-	// Shows the neighbours of each object from proxMat
-	TeSTElementSet::iterator it = steSet.begin();
-	while ( it != steSet.end())
-	{
-		cout<< " The neighbours of the element  "<< (*it).objectId() << " are: " << endl;
-			
-		// Gets the neighbours of an element
-		TeNeighboursMap neighbors = proxMat.getMapNeighbours((*it).objectId());
-		TeNeighboursMap::iterator itN = neighbors.begin();
-		while (itN != neighbors.end())
-		{
-			cout<< "         "<<(*itN).first << endl;
-			++itN;
-		}
-		cout << endl;
-		++it;
-	}
-
-	
-	db->close();
-	cout << endl << "Press Enter\n";
-	getchar();
-	return 0;
-}
diff --git a/examples/createProximityMatrix/createProximityMatrix.dsp b/examples/createProximityMatrix/createProximityMatrix.dsp
deleted file mode 100644
index cc7ba19..0000000
--- a/examples/createProximityMatrix/createProximityMatrix.dsp
+++ /dev/null
@@ -1,114 +0,0 @@
-# Microsoft Developer Studio Project File - Name="createProximityMatrix" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=createProximityMatrix - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "createProximityMatrix.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "createProximityMatrix.mak" CFG="createProximityMatrix - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "createProximityMatrix - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "createProximityMatrix - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "createProximityMatrix - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drive [...]
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x416 /d "NDEBUG"
-# ADD RSC /l 0x416 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\shapelib\Release\shapelib.lib ..\..\terralibw\freetype\Release\freetype.lib ..\..\terralibw\tiff\Release\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\Postg [...]
-# SUBTRACT LINK32 /pdb:none
-
-!ELSEIF  "$(CFG)" == "createProximityMatrix - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terra [...]
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x416 /d "_DEBUG"
-# ADD RSC /l 0x416 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\shapelib\Debug\shapelib.lib ..\..\terralibw\freetype\Debug\freetype.lib ..\..\terralibw\tiff\Debug\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\li [...]
-# SUBTRACT LINK32 /pdb:none
-
-!ENDIF 
-
-# Begin Target
-
-# Name "createProximityMatrix - Win32 Release"
-# Name "createProximityMatrix - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\createProximityMatrix.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\terralib\drivers\MySQL\TeMySQL.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\src\terralib\drivers\MySQL\TeMySQL.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/examples/createProximityMatrix/createProximityMatrix.dsw b/examples/createProximityMatrix/createProximityMatrix.dsw
deleted file mode 100644
index 7f285c2..0000000
--- a/examples/createProximityMatrix/createProximityMatrix.dsw
+++ /dev/null
@@ -1,89 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "createProximityMatrix"=".\createProximityMatrix.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name terralib
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "freetype"="..\..\terralibw\freetype\freetype.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "shapelib"="..\..\terralibw\shapelib\shapelib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "terralib"="..\..\terralibw\terralib\terralib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name freetype
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name shapelib
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name tiff
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "tiff"="..\..\terralibw\tiff\tiff.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/examples/createProximityMatrix/createProximityMatrix.pro b/examples/createProximityMatrix/createProximityMatrix.pro
deleted file mode 100644
index 49a7bba..0000000
--- a/examples/createProximityMatrix/createProximityMatrix.pro
+++ /dev/null
@@ -1,47 +0,0 @@
-TEMPLATE = app
-TARGET = createProximityMatrix
-CONFIG += qt warn_on thread debug rtti exceptions
-LANGUAGE = C++
-
-OBJECTS_DIR = .obj
-
-SOURCES	+= \
-	createProximityMatrix.cpp \
-	../src/terralib/drivers/MySQL/TeMySQL.cpp
-
-HEADERS	+= \
-	../src/terralib/drivers/MySQL/TeMySQL.h
-	
-INCLUDEPATH += \
-	. \
-	.. \
-	../src/terralib/kernel \
-	../src/terralib/application \
-	../src/terralib/functions \
-	../src/terralib/stat \
-	../src/shapelib \
-	../src/zlib \
-	../src/terralib/application/qt \
-	../src/terralib/drivers/MySQL \
-	../src/terralib/drivers/MySQL/include \
-	../src/terralib/drivers/OracleSpatial \
-	../src/terralib/drivers/OracleSpatial/OCI/include \
-	../src/terralib/drivers/PostgreSQL \
-	../src/terralib/drivers/PostgreSQL/includepg 
-
-LIBS += \
-	-L../terralibx/shapelib \
-	-L../terralibx/stat \
-	-L../terralibx/terralib \
-	-L../terralibx/tiff \
-	-L../terralibx/PostgreSQL \
-	-L/usr/local/lib -L/usr/lib -L/usr/lib/mysql -L/usr/local/lib/mysql \
-	-L/usr/local/mysql -L/usr/local/mysql/lib -L. \
-    -lshapelib -lstat -lterralib -ltiff -lmysqlclient -lpq -lcrypt
-
-
-
-
-
-
-
diff --git a/examples/createSTElementSet/.cdtproject b/examples/createSTElementSet/.cdtproject
old mode 100644
new mode 100755
diff --git a/examples/createSTElementSet/.project b/examples/createSTElementSet/.project
old mode 100644
new mode 100755
diff --git a/examples/createSTElementSet/Makefile b/examples/createSTElementSet/Makefile
old mode 100644
new mode 100755
index 596d1eb..93f8d6d
--- a/examples/createSTElementSet/Makefile
+++ b/examples/createSTElementSet/Makefile
@@ -1,23 +1,30 @@
 all: createSTElementSet
 
-shapelib:
-	cd ../terralibx/shapelib; make
-
-tiff:
-	cd ../terralibx/tiff; make
+debug: createSTElementSet_dbg
 
 terralib:
-	cd ../terralibx/terralib; make
+	cd ../../terralibx/terralib; make
 
-stat:
-	cd ../terralibx/stat; make
+terralib_dbg:
+	cd ../../terralibx/terralib; make debug
 
-createSTElementSet: shapelib tiff terralib stat
+createSTElementSet: terralib
 	qmake -o makeCreateSTElementSet createSTElementSet.pro; make -f makeCreateSTElementSet
 
+createSTElementSet_dbg: terralib_dbg
+	qmake -o makeCreateSTElementSet.debug createSTElementSet.pro TE_PROJECT_TYPE=DEBUG; \
+	make -f makeCreateSTElementSet.debug
+
 clean:
 	if \
 		test -f makeCreateSTElementSet; \
 	then \
 		make -f makeCreateSTElementSet distclean; rm -f makeCreateSTElementSet; \
+	fi
+	
+clean_debug:
+	if \
+		test -f makeCreateSTElementSet.debug; \
+	then \
+		make -f makeCreateSTElementSet.debug distclean; rm -f makeCreateSTElementSet.debug; \
 	fi
\ No newline at end of file
diff --git a/examples/createSTElementSet/createSTElementSet.cpp b/examples/createSTElementSet/createSTElementSet.cpp
old mode 100644
new mode 100755
index 5e865c2..4541284
--- a/examples/createSTElementSet/createSTElementSet.cpp
+++ b/examples/createSTElementSet/createSTElementSet.cpp
@@ -31,7 +31,6 @@ of this library and its documentation.
    Author: Karine Reis   
 */
 
-#include <TeInitQuerierStrategy.h>
 #include <TeQuerierParams.h>
 #include <TeQuerier.h>
 #include <TeMySQL.h>
@@ -40,11 +39,11 @@ int main()
 {	
  	// Datatabase server parameters
 	string host = "localhost";
-	string dbname = "TerraLib";
+	string dbname = "DB320RC1";
 	string user = "root";
-	string password = "ferreira";
+	string password = "vinhas";
 
-	// Open a connection to the TerraTeste MySQL database 
+	// Open a connection to the DB320RC1 MySQL database 
 	TeDatabase* db = new TeMySQL();
 	if (!db->connect(host, user, password, dbname))
 	{
@@ -55,23 +54,23 @@ int main()
 	}
 	cout << "Connection successful to the database \"" << dbname << "\" on MySQL server \"" << host << "\" !\n";;
 	
-	TeTheme* trmsp = new TeTheme("DistritosSP");
+	// Load a previously created theme named DistritosSaoPaulo.
+	// This theme was created on a layer of the metropolitan districts of Sao Paulo city
+	TeTheme* trmsp = new TeTheme("DistritosSaoPaulo");
 	if (!db->loadTheme(trmsp))
 	{
-	    cout << "Fail to load the theme \"T_dist\": " << db->errorMessage() << endl;
+		cout << "Fail to load the theme \"DistritosSaoPaulo\": " << db->errorMessage() << endl;
 		db->close();
 		cout << endl << "Press Enter\n";
 		getchar();
-        return 1;
+	        return 1;
 	}
 
-	TeInitQuerierStrategies();
-
 	// Defines the attributes that will be kept in the STElementSet. 
 	// The attribute name must be in the format "table_name.attribute_name"
 	vector<string> attrs;
-	attrs.push_back("DistritosSP.Nome");
-	attrs.push_back("DistritosSP.Populac");
+	attrs.push_back("Distritos.Nome_Distrito");
+	attrs.push_back("Distritos.Pop2000");
 
 	// Define the parameters of the querier
 	TeQuerierParams qpar(false, attrs);
@@ -88,13 +87,13 @@ int main()
 	TeSTInstance steInstance;
 	while (qdb.fetchInstance(steInstance))
 	{
-		string sigla, pop;
-		steInstance.getPropertyValue("DistritosSP.Nome", sigla);
-		steInstance.getPropertyValue("DistritosSP.Populac", pop);
+		string nome, pop;
+		steInstance.getPropertyValue("Nome_distrito", nome);
+		steInstance.getPropertyValue("Pop2000", pop);
 		
 		cout << " Object Identifier :  "<< steInstance.objectId() << endl; 
-		cout << " Sigla             :  "<< sigla  << endl; 
-		cout << " Renda             :  "<< pop  << endl << endl; 
+		cout << " Nome Distrito     :  "<< nome  << endl; 
+		cout << " Pop2000           :  "<< pop  << endl << endl; 
 	}
 
 	db->close();
diff --git a/examples/createSTElementSet/createSTElementSet.dsp b/examples/createSTElementSet/createSTElementSet.dsp
old mode 100644
new mode 100755
index 4d182a9..a6ad148
--- a/examples/createSTElementSet/createSTElementSet.dsp
+++ b/examples/createSTElementSet/createSTElementSet.dsp
@@ -42,7 +42,7 @@ RSC=rc.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drive [...]
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\terralibw\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\include" /I "..\..\src [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "NDEBUG"
 # ADD RSC /l 0x416 /d "NDEBUG"
@@ -51,7 +51,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\shapelib\Release\shapelib.lib ..\..\terralibw\freetype\Release\freetype.lib ..\..\terralibw\tiff\Release\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\Postg [...]
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib /nologo /subsystem:console /machine:I386 /out:"../Release/createSTElementSet.exe"
 # SUBTRACT LINK32 /pdb:none
 
 !ELSEIF  "$(CFG)" == "createSTElementSet - Win32 Debug"
@@ -68,7 +68,7 @@ LINK32=link.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terra [...]
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\terralibw\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\include" /I " [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "_DEBUG"
 # ADD RSC /l 0x416 /d "_DEBUG"
@@ -77,7 +77,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\shapelib\Debug\shapelib.lib ..\..\terralibw\freetype\Debug\freetype.lib ..\..\terralibw\tiff\Debug\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\li [...]
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\libpq.lib /nologo /subsystem:console /debug /machine:I386 /out:"../Debug/createSTElementSet.exe" /pdbtype:sept
 # SUBTRACT LINK32 /pdb:none
 
 !ENDIF 
diff --git a/examples/createSTElementSet/createSTElementSet.dsw b/examples/createSTElementSet/createSTElementSet.dsw
old mode 100644
new mode 100755
index 1dffefa..0cc332a
--- a/examples/createSTElementSet/createSTElementSet.dsw
+++ b/examples/createSTElementSet/createSTElementSet.dsw
@@ -3,7 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
 
 ###############################################################################
 
-Project: "createSTElementSet"=".\createSTElementSet.dsp" - Package Owner=<4>
+Project: "createSTElementSet"=.\createSTElementSet.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -18,31 +18,7 @@ Package=<4>
 
 ###############################################################################
 
-Project: "freetype"="..\..\terralibw\freetype\freetype.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "shapelib"="..\..\terralibw\shapelib\shapelib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "terralib"="..\..\terralibw\terralib\terralib.dsp" - Package Owner=<4>
+Project: "terralib"=..\..\terralibw\terralib\terralib.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -53,24 +29,6 @@ Package=<4>
     Begin Project Dependency
     Project_Dep_Name freetype
     End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name shapelib
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name tiff
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "tiff"="..\..\terralibw\tiff\tiff.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
 }}}
 
 ###############################################################################
diff --git a/examples/createSTElementSet/createSTElementSet.pro b/examples/createSTElementSet/createSTElementSet.pro
old mode 100644
new mode 100755
index 95e757b..1b70907
--- a/examples/createSTElementSet/createSTElementSet.pro
+++ b/examples/createSTElementSet/createSTElementSet.pro
@@ -1,47 +1,8 @@
-TEMPLATE = app
-TARGET = createSTElementSet
-CONFIG += qt warn_on thread debug rtti exceptions
-LANGUAGE = C++
-
-OBJECTS_DIR = .obj
+include( ../base/base.pro )
 
 SOURCES	+= \
 	createSTElementSet.cpp \
-	../src/terralib/drivers/MySQL/TeMySQL.cpp
+	../../src/terralib/drivers/MySQL/TeMySQL.cpp
 
 HEADERS	+= \
-	../src/terralib/drivers/MySQL/TeMySQL.h
-	
-INCLUDEPATH += \
-	. \
-	.. \
-	../src/terralib/kernel \
-	../src/terralib/application \
-	../src/terralib/functions \
-	../src/terralib/stat \
-	../src/shapelib \
-	../src/zlib \
-	../src/terralib/application/qt \
-	../src/terralib/drivers/MySQL \
-	../src/terralib/drivers/MySQL/include \
-	../src/terralib/drivers/OracleSpatial \
-	../src/terralib/drivers/OracleSpatial/OCI/include \
-	../src/terralib/drivers/PostgreSQL \
-	../src/terralib/drivers/PostgreSQL/includepg 
-
-LIBS += \
-	-L../terralibx/shapelib \
-	-L../terralibx/stat \
-	-L../terralibx/terralib \
-	-L../terralibx/tiff \
-	-L../terralibx/PostgreSQL \
-	-L/usr/local/lib -L/usr/lib -L/usr/lib/mysql -L/usr/local/lib/mysql \
-	-L/usr/local/mysql -L/usr/local/mysql/lib -L. \
-    -lshapelib -lstat -lterralib -ltiff -lmysqlclient -lpq -lcrypt
-
-
-
-
-
-
-
+	../../src/terralib/drivers/MySQL/TeMySQL.h
diff --git a/examples/createSTElementSet/createSTElementSet.sln b/examples/createSTElementSet/createSTElementSet.sln
new file mode 100755
index 0000000..0c8c5b8
--- /dev/null
+++ b/examples/createSTElementSet/createSTElementSet.sln
@@ -0,0 +1,47 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "createSTElementSet", "createSTElementSet.vcproj", "{AC29CA10-2B75-494F-A370-6767C7AB5FC1}"
+	ProjectSection(ProjectDependencies) = postProject
+		{40917057-E283-4760-B645-D2BA2D7E5A35} = {40917057-E283-4760-B645-D2BA2D7E5A35}
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C} = {BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "terralib", "..\..\terralibw\terralib\terralib.vcproj", "{40917057-E283-4760-B645-D2BA2D7E5A35}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjpeg", "..\..\terralibw\libjpeg\libjpeg.vcproj", "{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tiff", "..\..\terralibw\tiff\tiff.vcproj", "{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		Debug = Debug
+		Release = Release
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.ActiveCfg = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.Build.0 = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.ActiveCfg = Release|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.Build.0 = Release|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Debug.ActiveCfg = Debug|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Debug.Build.0 = Debug|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Release.ActiveCfg = Release|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Release.Build.0 = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.ActiveCfg = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.Build.0 = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.ActiveCfg = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.Build.0 = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.ActiveCfg = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.Build.0 = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.ActiveCfg = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
diff --git a/examples/createSTElementSet/createSTElementSet.vcproj b/examples/createSTElementSet/createSTElementSet.vcproj
new file mode 100755
index 0000000..9a5dfd0
--- /dev/null
+++ b/examples/createSTElementSet/createSTElementSet.vcproj
@@ -0,0 +1,164 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="createSTElementSet"
+	ProjectGUID="{AC29CA10-2B75-494F-A370-6767C7AB5FC1}">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\Debug\"
+			IntermediateDirectory="..\Debug\"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="-Zm200 -GX -w34100 -w34189"
+				Optimization="4"
+				AdditionalIncludeDirectories=".;..;..\..\src\terralib\kernel;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include"
+				PreprocessorDefinitions="UNICODE,WIN32"
+				GeneratePreprocessedFile="0"
+				MinimalRebuild="TRUE"
+				ExceptionHandling="TRUE"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				AssemblerListingLocation="..\Debug\"
+				ObjectFile="..\Debug\"
+				ProgramDataBaseFileName=".\"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Debug/terralib/terralib.lib ../../Debug/libjpeg/libjpeg.lib ../../Debug/tiff/tiff.lib ../../Debug/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
+				OutputFile="..\Debug\createSTElementSet.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreDefaultLibraryNames="msvcrt.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				WarningLevel="0"
+				DefaultCharType="0"
+				EnableErrorChecks="1"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\Release\"
+			IntermediateDirectory="..\Release\"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="-Zm200 -GX -w34100 -w34189"
+				Optimization="4"
+				AdditionalIncludeDirectories=".;..;..\..\src\terralib\kernel;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include"
+				PreprocessorDefinitions="UNICODE,WIN32"
+				GeneratePreprocessedFile="0"
+				MinimalRebuild="TRUE"
+				ExceptionHandling="TRUE"
+				RuntimeLibrary="2"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				AssemblerListingLocation="..\Debug\"
+				ObjectFile="..\Debug\"
+				ProgramDataBaseFileName=".\"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Release/terralib/terralib.lib ../../Release/libjpeg/libjpeg.lib ../../Release/tiff/tiff.lib ../../Release/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
+				OutputFile="..\Release\createSTElementSet.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				WarningLevel="0"
+				DefaultCharType="0"
+				EnableErrorChecks="1"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath="createSTElementSet.cpp">
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.h">
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/createSTElementSetFromLayer/.cdtproject b/examples/createSTElementSetFromLayer/.cdtproject
old mode 100644
new mode 100755
diff --git a/examples/createSTElementSetFromLayer/.project b/examples/createSTElementSetFromLayer/.project
old mode 100644
new mode 100755
diff --git a/examples/createSTElementSetFromLayer/Makefile b/examples/createSTElementSetFromLayer/Makefile
old mode 100644
new mode 100755
index 2f7a78d..d150f79
--- a/examples/createSTElementSetFromLayer/Makefile
+++ b/examples/createSTElementSetFromLayer/Makefile
@@ -1,23 +1,30 @@
 all: createSTElementSetFromLayer
 
-shapelib:
-	cd ../terralibx/shapelib; make
-
-tiff:
-	cd ../terralibx/tiff; make
+debug: createSTElementSetFromLayer_dbg
 
 terralib:
-	cd ../terralibx/terralib; make
+	cd ../../terralibx/terralib; make
 
-stat:
-	cd ../terralibx/stat; make
+terralib_dbg:
+	cd ../../terralibx/terralib; make debug
 
-createSTElementSetFromLayer: shapelib tiff terralib stat
+createSTElementSetFromLayer: terralib
 	qmake -o makeCreateSTElementSetFromLayer createSTElementSetFromLayer.pro; make -f makeCreateSTElementSetFromLayer
 
+createSTElementSetFromLayer_dbg: terralib_dbg
+	qmake -o makeCreateSTElementSetFromLayer.debug createSTElementSetFromLayer.pro TE_PROJECT_TYPE=DEBUG; \
+	make -f makeCreateSTElementSetFromLayer.debug
+
 clean:
 	if \
 		test -f makeCreateSTElementSetFromLayer; \
 	then \
 		make -f makeCreateSTElementSetFromLayer distclean; rm -f makeCreateSTElementSetFromLayer; \
+	fi
+	
+clean_debug:
+	if \
+		test -f makeCreateSTElementSetFromLayer.debug; \
+	then \
+		make -f makeCreateSTElementSetFromLayer.debug distclean; rm -f makeCreateSTElementSetFromLayer.debug; \
 	fi
\ No newline at end of file
diff --git a/examples/createSTElementSetFromLayer/createSTElementSetFromLayer.cpp b/examples/createSTElementSetFromLayer/createSTElementSetFromLayer.cpp
old mode 100644
new mode 100755
index 810b38b..284d32f
--- a/examples/createSTElementSetFromLayer/createSTElementSetFromLayer.cpp
+++ b/examples/createSTElementSetFromLayer/createSTElementSetFromLayer.cpp
@@ -33,18 +33,19 @@ of this library and its documentation.
 
 #include <TeSTElementSet.h>
 #include <TeSTEFunctionsDB.h>
-#include <TeInitQuerierStrategy.h>
 #include <TeMySQL.h>
+#include <TeDriverSHPDBF.h>
+
 
 int main()
 {	
  	// Datatabase server parameters
 	string host = "localhost";
-	string dbname = "TerraLib";
+	string dbname = "DB320RC1";
 	string user = "root";
-	string password = "ferreira";
+	string password = "vinhas";
 
-	// Open a connection to the TerraTeste MySQL database 
+	// Open a connection to the DB320RC1 MySQL database 
 	TeDatabase* db = new TeMySQL();
 	if (!db->connect(host, user, password, dbname))
 	{
@@ -55,6 +56,25 @@ int main()
 	}
 	cout << "Connection successful to the database \"" << dbname << "\" on MySQL server \"" << host << "\" !\n";;
 	
+	//Verify if there is the layer "EstadosBrasil"
+	string layerName = "EstadosBrasil";
+	if (!db->layerExist(layerName))
+	{
+		// Create a new layer in the database
+		TeDatum sad69 = TeDatumFactory::make("SAD69");
+		TePolyconic* proj = new TePolyconic(sad69, -54);
+
+		TeLayer* layer = new TeLayer(layerName, db, proj);
+		string filename = "../data/EstadosBrasil.shp";	// Shapefile path
+		string tablename = "EstadosBrasil";	// Name of the attribute table
+
+		if (TeImportShape(layer, filename, tablename))
+			cout << "The shapefile \"EstadosBrasil.shp\" was imported successfully into the TerraLib database!\n" << endl;
+		else
+			cout << "Error: Fail to import the shapefile \"EstadosBrasil.shp\"!\n" << endl;
+
+	}
+	
 	// Loads the layer
 	TeLayer* estados = new TeLayer("EstadosBrasil");
 	if (!db->loadLayer(estados))
@@ -66,9 +86,6 @@ int main()
         return 1;
 	}
 
-	// Inits querier strategies
-	TeInitQuerierStrategies();
-
 	// Creates a elementSet from the layer "estados"
 	TeSTElementSet steSet (estados);
 
@@ -93,7 +110,7 @@ int main()
 	// Prints the number of elements of the elementSet
 	cout << "Number of elements: " << steSet.numElements() << endl;
 
-	
+	//Traverse all instances of the set using iterator
 	TeSTElementSet::iterator it = steSet.begin();
 	while ( it != steSet.end())
 	{
diff --git a/examples/createSTElementSetFromLayer/createSTElementSetFromLayer.dsp b/examples/createSTElementSetFromLayer/createSTElementSetFromLayer.dsp
old mode 100644
new mode 100755
index 54d6bb3..878e4c4
--- a/examples/createSTElementSetFromLayer/createSTElementSetFromLayer.dsp
+++ b/examples/createSTElementSetFromLayer/createSTElementSetFromLayer.dsp
@@ -42,7 +42,7 @@ RSC=rc.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drive [...]
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\terralibw\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\include" /I "..\..\src [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "NDEBUG"
 # ADD RSC /l 0x416 /d "NDEBUG"
@@ -51,7 +51,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\shapelib\Release\shapelib.lib ..\..\terralibw\freetype\Release\freetype.lib ..\..\terralibw\tiff\Release\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\Postg [...]
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib /nologo /subsystem:console /machine:I386 /out:"../Release/createSTElementSetFromLayer.exe"
 # SUBTRACT LINK32 /pdb:none
 
 !ELSEIF  "$(CFG)" == "createSTElementSetFromLayer - Win32 Debug"
@@ -68,7 +68,7 @@ LINK32=link.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terra [...]
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\terralibw\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\include" /I " [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "_DEBUG"
 # ADD RSC /l 0x416 /d "_DEBUG"
@@ -77,7 +77,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\shapelib\Debug\shapelib.lib ..\..\terralibw\freetype\Debug\freetype.lib ..\..\terralibw\tiff\Debug\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\li [...]
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\libpq.lib /nologo /subsystem:console /debug /machine:I386 /out:"../Debug/createSTElementSetFromLayer.exe" /pdbtype:sept
 # SUBTRACT LINK32 /pdb:none
 
 !ENDIF 
diff --git a/examples/createSTElementSetFromLayer/createSTElementSetFromLayer.dsw b/examples/createSTElementSetFromLayer/createSTElementSetFromLayer.dsw
old mode 100644
new mode 100755
index 4b25b14..bee2f9f
--- a/examples/createSTElementSetFromLayer/createSTElementSetFromLayer.dsw
+++ b/examples/createSTElementSetFromLayer/createSTElementSetFromLayer.dsw
@@ -3,7 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
 
 ###############################################################################
 
-Project: "createSTElementSetFromLayer"=".\createSTElementSetFromLayer.dsp" - Package Owner=<4>
+Project: "createSTElementSetFromLayer"=.\createSTElementSetFromLayer.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -18,31 +18,7 @@ Package=<4>
 
 ###############################################################################
 
-Project: "freetype"="..\..\terralibw\freetype\freetype.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "shapelib"="..\..\terralibw\shapelib\shapelib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "terralib"="..\..\terralibw\terralib\terralib.dsp" - Package Owner=<4>
+Project: "terralib"=..\..\terralibw\terralib\terralib.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -53,24 +29,6 @@ Package=<4>
     Begin Project Dependency
     Project_Dep_Name freetype
     End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name shapelib
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name tiff
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "tiff"="..\..\terralibw\tiff\tiff.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
 }}}
 
 ###############################################################################
diff --git a/examples/createSTElementSetFromLayer/createSTElementSetFromLayer.pro b/examples/createSTElementSetFromLayer/createSTElementSetFromLayer.pro
old mode 100644
new mode 100755
index 30cc298..207cf2a
--- a/examples/createSTElementSetFromLayer/createSTElementSetFromLayer.pro
+++ b/examples/createSTElementSetFromLayer/createSTElementSetFromLayer.pro
@@ -1,47 +1,10 @@
-TEMPLATE = app
-TARGET = createSTElementSetFromLayer
-CONFIG += qt warn_on thread debug rtti exceptions
-LANGUAGE = C++
-
-OBJECTS_DIR = .obj
+include( ../base/base.pro )
 
 SOURCES	+= \
 	createSTElementSetFromLayer.cpp \
-	../src/terralib/drivers/MySQL/TeMySQL.cpp
+	../../src/terralib/drivers/shapelib/TeDriverSHPDBF.cpp \
+	../../src/terralib/drivers/MySQL/TeMySQL.cpp 
 
 HEADERS	+= \
-	../src/terralib/drivers/MySQL/TeMySQL.h
-	
-INCLUDEPATH += \
-	. \
-	.. \
-	../src/terralib/kernel \
-	../src/terralib/application \
-	../src/terralib/functions \
-	../src/terralib/stat \
-	../src/shapelib \
-	../src/zlib \
-	../src/terralib/application/qt \
-	../src/terralib/drivers/MySQL \
-	../src/terralib/drivers/MySQL/include \
-	../src/terralib/drivers/OracleSpatial \
-	../src/terralib/drivers/OracleSpatial/OCI/include \
-	../src/terralib/drivers/PostgreSQL \
-	../src/terralib/drivers/PostgreSQL/includepg 
-
-LIBS += \
-	-L../terralibx/shapelib \
-	-L../terralibx/stat \
-	-L../terralibx/terralib \
-	-L../terralibx/tiff \
-	-L../terralibx/PostgreSQL \
-	-L/usr/local/lib -L/usr/lib -L/usr/lib/mysql -L/usr/local/lib/mysql \
-	-L/usr/local/mysql -L/usr/local/mysql/lib -L. \
-    -lshapelib -lstat -lterralib -ltiff -lmysqlclient -lpq -lcrypt
-
-
-
-
-
-
+	../../src/terralib/drivers/MySQL/TeMySQL.h
 
diff --git a/examples/createSTElementSetFromLayer/createSTElementSetFromLayer.sln b/examples/createSTElementSetFromLayer/createSTElementSetFromLayer.sln
new file mode 100755
index 0000000..bceb76f
--- /dev/null
+++ b/examples/createSTElementSetFromLayer/createSTElementSetFromLayer.sln
@@ -0,0 +1,53 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "createSTElementSetFromLayer", "createSTElementSetFromLayer.vcproj", "{06A7D1C0-37F4-41A8-8358-798E127BFE47}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "terralib", "..\..\terralibw\terralib\terralib.vcproj", "{70DF8CB8-3CDB-4040-A832-A2FDC05758C2}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjpeg", "..\..\terralibw\libjpeg\libjpeg.vcproj", "{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tiff", "..\..\terralibw\tiff\tiff.vcproj", "{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shapelib", "..\..\terralibw\shapelib\shapelib.vcproj", "{FF21EC9C-A877-4664-93FA-021381849044}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		Debug = Debug
+		Release = Release
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{06A7D1C0-37F4-41A8-8358-798E127BFE47}.Debug.ActiveCfg = Debug|Win32
+		{06A7D1C0-37F4-41A8-8358-798E127BFE47}.Debug.Build.0 = Debug|Win32
+		{06A7D1C0-37F4-41A8-8358-798E127BFE47}.Release.ActiveCfg = Release|Win32
+		{06A7D1C0-37F4-41A8-8358-798E127BFE47}.Release.Build.0 = Release|Win32
+		{70DF8CB8-3CDB-4040-A832-A2FDC05758C2}.Debug.ActiveCfg = Debug|Win32
+		{70DF8CB8-3CDB-4040-A832-A2FDC05758C2}.Debug.Build.0 = Debug|Win32
+		{70DF8CB8-3CDB-4040-A832-A2FDC05758C2}.Release.ActiveCfg = Release|Win32
+		{70DF8CB8-3CDB-4040-A832-A2FDC05758C2}.Release.Build.0 = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.ActiveCfg = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.Build.0 = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.ActiveCfg = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.Build.0 = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.ActiveCfg = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.Build.0 = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.ActiveCfg = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.Build.0 = Release|Win32
+		{FF21EC9C-A877-4664-93FA-021381849044}.Debug.ActiveCfg = Debug|Win32
+		{FF21EC9C-A877-4664-93FA-021381849044}.Debug.Build.0 = Debug|Win32
+		{FF21EC9C-A877-4664-93FA-021381849044}.Release.ActiveCfg = Release|Win32
+		{FF21EC9C-A877-4664-93FA-021381849044}.Release.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
diff --git a/examples/createSTElementSetFromLayer/createSTElementSetFromLayer.vcproj b/examples/createSTElementSetFromLayer/createSTElementSetFromLayer.vcproj
new file mode 100755
index 0000000..7d319f4
--- /dev/null
+++ b/examples/createSTElementSetFromLayer/createSTElementSetFromLayer.vcproj
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="createSTElementSetFromLayer"
+	ProjectGUID="{13B81AAF-DFE1-4E64-8B6D-1D4251DF8926}"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Release"
+			IntermediateDirectory=".\Release"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories=".;..;..\..\src\terralib\kernel;..\..\src\terralib\drivers\shapelib;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include;..\..\src\shapelib"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="TRUE"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\Release/createSTElementSetFromLayer.pch"
+				AssemblerListingLocation=".\Release/"
+				ObjectFile=".\Release/"
+				ProgramDataBaseFileName=".\Release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Release/terralib/terralib.lib ../../Release/libjpeg/libjpeg.lib ../../Release/tiff/tiff.lib ../../Release/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
+				OutputFile="../Release/createSTElementSetFromLayer.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				ProgramDatabaseFile=".\Release/createSTElementSetFromLayer.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\Release/createSTElementSetFromLayer.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1046"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Debug"
+			IntermediateDirectory=".\Debug"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;..;..\..\src\terralib\kernel;..\..\src\terralib\functions;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include;..\..\src\terralib\drivers\shapelib;..\..\src\shapelib"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				PrecompiledHeaderFile=".\Debug/createSTElementSetFromLayer.pch"
+				AssemblerListingLocation=".\Debug/"
+				ObjectFile=".\Debug/"
+				ProgramDataBaseFileName=".\Debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="4"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Debug/terralib/terralib.lib ../../Debug/libjpeg/libjpeg.lib ../../Debug/tiff/tiff.lib ../../Debug/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib"
+				OutputFile="../Debug/createSTElementSetFromLayer.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=".\Debug/createSTElementSetFromLayer.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\Debug/createSTElementSetFromLayer.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1046"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath="createSTElementSetFromLayer.cpp">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\drivers\shapelib\TeImportDBF.cpp">
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\drivers\shapelib\TeImportSHP.cpp">
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.cpp">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.h">
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/createSTElementSetFromShapeFile/.cdtproject b/examples/createSTElementSetFromShapeFile/.cdtproject
deleted file mode 100644
index fc69c6a..0000000
--- a/examples/createSTElementSetFromShapeFile/.cdtproject
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse-cdt version="2.0"?>
-
-<cdtproject id="org.eclipse.cdt.make.core.make">
-<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
-<data>
-<item id="org.eclipse.cdt.core.pathentry">
-<pathentry kind="src" path=""/>
-<pathentry kind="out" path=""/>
-<pathentry kind="con" path="org.eclipse.cdt.make.core.DISCOVERED_SCANNER_INFO"/>
-</item>
-<item id="cdt_indexer">
-<indexEnabled indexValue="false"/>
-<indexerProblemsEnabled indexProblemsValue="0"/>
-</item>
-</data>
-</cdtproject>
diff --git a/examples/createSTElementSetFromShapeFile/.project b/examples/createSTElementSetFromShapeFile/.project
deleted file mode 100644
index 35c9993..0000000
--- a/examples/createSTElementSetFromShapeFile/.project
+++ /dev/null
@@ -1,104 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>createSTElementSetFromShapeFile</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.cdt.make.core.makeBuilder</name>
-			<arguments>
-				<dictionary>
-					<key>org.eclipse.cdt.core.errorOutputParser</key>
-					<value>org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.VCErrorParser;</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
-					<value>clean all</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.incrementalBuildTarget</key>
-					<value>all</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
-					<value>false</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.buildLocation</key>
-					<value></value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.enableFullBuild</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.enabledIncrementalBuild</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
-					<value>clean</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.buildCommand</key>
-					<value>make</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
-					<value>all</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.stopOnError</key>
-					<value>false</value>
-				</dictionary>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.cdt.make.core.ScannerConfigBuilder</name>
-			<arguments>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.ScannerConfigDiscoveryEnabled</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.makeBuilderParserId</key>
-					<value>org.eclipse.cdt.make.core.GCCScannerInfoConsoleParser</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.esiProviderCommandEnabled</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.siProblemGenerationEnabled</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.useDefaultESIProviderCmd</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.makeBuilderParserEnabled</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.esiProviderParserId</key>
-					<value>org.eclipse.cdt.make.core.GCCSpecsConsoleParser</value>
-				</dictionary>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.cdt.core.cnature</nature>
-		<nature>org.eclipse.cdt.make.core.makeNature</nature>
-		<nature>org.eclipse.cdt.make.core.ScannerConfigNature</nature>
-	</natures>
-</projectDescription>
diff --git a/examples/createSTElementSetFromShapeFile/Makefile b/examples/createSTElementSetFromShapeFile/Makefile
deleted file mode 100644
index 90879dc..0000000
--- a/examples/createSTElementSetFromShapeFile/Makefile
+++ /dev/null
@@ -1,23 +0,0 @@
-all: createSTElementSetFromShapeFile
-
-shapelib:
-	cd ../terralibx/shapelib; make
-
-tiff:
-	cd ../terralibx/tiff; make
-
-terralib:
-	cd ../terralibx/terralib; make
-
-stat:
-	cd ../terralibx/stat; make
-
-createSTElementSetFromShapeFile: shapelib tiff terralib stat
-	qmake -o makeCreateSTElementSetFromShapeFile createSTElementSetFromShapeFile.pro; make -f makeCreateSTElementSetFromShapeFile
-
-clean:
-	if \
-		test -f makeCreateSTElementSetFromShapeFile; \
-	then \
-		make -f makeCreateSTElementSetFromShapeFile distclean; rm -f makeCreateSTElementSetFromShapeFile; \
-	fi
\ No newline at end of file
diff --git a/examples/createSTElementSetFromShapeFile/createSTElementSetFromShapeFile.cpp b/examples/createSTElementSetFromShapeFile/createSTElementSetFromShapeFile.cpp
deleted file mode 100644
index 6a7ccef..0000000
--- a/examples/createSTElementSetFromShapeFile/createSTElementSetFromShapeFile.cpp
+++ /dev/null
@@ -1,76 +0,0 @@
-/************************************************************************************
-TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The library provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use
-of this library and its documentation.
-*************************************************************************************/
-/* 
-   This file illustrates an example of how to create a new Spatial Temporal Element 
-   Set (STElementSet) from a shapefile. 
-
-   Author: Karine Reis Ferreira 
-*/
-
-
-#include <TeSTElementSet.h>
-#include <TeSTEFunctionsSHP.h>
-#include <TeMySQL.h>
-
-int
-main()
-{
-	
-	// shape file name with its path 
-	string filename = "../../examples/data/EstadosBrasil.shp";
-	
-	TeSTElementSet  steSet;
-
-	// fills the element set from shape file
-	if (!TeSTOSetBuildSHP(steSet,filename))
-	{
-		cout << "Erro\n";
-		return 1;
-	}
-	
-	// prints the number of elements of the element set
-	cout << "Number of elements: " << steSet.numElements() << endl;
-
-	TeSTElementSet::iterator it = steSet.begin();
-	while ( it != steSet.end())
-	{
-		TeSTInstance st = (*it);
-
-		string desc;
-		// returns the attributes
-		TePropertyVector vectp = st.getPropertyVector();
-
-		cout << "Id: " << st.objectId() << "\nProperties:\n "; 
-		for (unsigned int i=0; i<vectp.size(); i++)
-		{
-			cout << vectp[i].attr_.rep_.name_ << "  =  ";
-			cout << vectp[i].value_ << endl;
-		}
-		cout << endl;
-		++it;
-	}
-	cout << "End\n";
-	cout.flush();
-	getchar();
-	return 0;
-}
diff --git a/examples/createSTElementSetFromShapeFile/createSTElementSetFromShapeFile.dsp b/examples/createSTElementSetFromShapeFile/createSTElementSetFromShapeFile.dsp
deleted file mode 100644
index fcefc4e..0000000
--- a/examples/createSTElementSetFromShapeFile/createSTElementSetFromShapeFile.dsp
+++ /dev/null
@@ -1,130 +0,0 @@
-# Microsoft Developer Studio Project File - Name="createSTElementSetFromShapeFile" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=createSTElementSetFromShapeFile - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "createSTElementSetFromShapeFile.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "createSTElementSetFromShapeFile.mak" CFG="createSTElementSetFromShapeFile - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "createSTElementSetFromShapeFile - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "createSTElementSetFromShapeFile - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "createSTElementSetFromShapeFile - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drive [...]
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x416 /d "NDEBUG"
-# ADD RSC /l 0x416 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\shapelib\Release\shapelib.lib ..\..\terralibw\freetype\Release\freetype.lib ..\..\terralibw\tiff\Release\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\Postg [...]
-# SUBTRACT LINK32 /pdb:none
-
-!ELSEIF  "$(CFG)" == "createSTElementSetFromShapeFile - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terra [...]
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x416 /d "_DEBUG"
-# ADD RSC /l 0x416 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\shapelib\Debug\shapelib.lib ..\..\terralibw\freetype\Debug\freetype.lib ..\..\terralibw\tiff\Debug\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\li [...]
-# SUBTRACT LINK32 /pdb:none
-
-!ENDIF 
-
-# Begin Target
-
-# Name "createSTElementSetFromShapeFile - Win32 Release"
-# Name "createSTElementSetFromShapeFile - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\createSTElementSetFromShapeFile.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\terralib\functions\TeImportDBF.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\terralib\drivers\MySQL\TeMySQL.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\terralib\functions\TeSTEFunctionsSHP.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\src\terralib\functions\TeImportExport.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\terralib\drivers\MySQL\TeMySQL.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\terralib\functions\TeSTEFunctionsSHP.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/examples/createSTElementSetFromShapeFile/createSTElementSetFromShapeFile.dsw b/examples/createSTElementSetFromShapeFile/createSTElementSetFromShapeFile.dsw
deleted file mode 100644
index 3f4dfc7..0000000
--- a/examples/createSTElementSetFromShapeFile/createSTElementSetFromShapeFile.dsw
+++ /dev/null
@@ -1,89 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "createSTElementSetFromShapeFile"=".\createSTElementSetFromShapeFile.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name terralib
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "freetype"="..\..\terralibw\freetype\freetype.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "shapelib"="..\..\terralibw\shapelib\shapelib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "terralib"="..\..\terralibw\terralib\terralib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name freetype
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name shapelib
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name tiff
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "tiff"="..\..\terralibw\tiff\tiff.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/examples/createSTElementSetFromShapeFile/createSTElementSetFromShapeFile.pro b/examples/createSTElementSetFromShapeFile/createSTElementSetFromShapeFile.pro
deleted file mode 100644
index 42a59ab..0000000
--- a/examples/createSTElementSetFromShapeFile/createSTElementSetFromShapeFile.pro
+++ /dev/null
@@ -1,51 +0,0 @@
-TEMPLATE = app
-TARGET = createSTElementSetFromShapeFile
-CONFIG += qt warn_on thread debug rtti exceptions
-LANGUAGE = C++
-
-OBJECTS_DIR = .obj
-
-SOURCES	+= \
-	createSTElementSetFromShapeFile.cpp \
-	../src/terralib/functions/TeImportDBF.cpp \
-	../src/terralib/functions/TeSTEFunctionsSHP.cpp \
-	../src/terralib/drivers/MySQL/TeMySQL.cpp
-
-HEADERS	+= \
-	../src/terralib/functions/TeImportExport.h \
-	../src/terralib/functions/TeSTEFunctionsSHP.h \
-	../src/terralib/drivers/MySQL/TeMySQL.h
-	
-INCLUDEPATH += \
-	. \
-	.. \
-	../src/terralib/kernel \
-	../src/terralib/application \
-	../src/terralib/functions \
-	../src/terralib/stat \
-	../src/shapelib \
-	../src/zlib \
-	../src/terralib/application/qt \
-	../src/terralib/drivers/MySQL \
-	../src/terralib/drivers/MySQL/include \
-	../src/terralib/drivers/OracleSpatial \
-	../src/terralib/drivers/OracleSpatial/OCI/include \
-	../src/terralib/drivers/PostgreSQL \
-	../src/terralib/drivers/PostgreSQL/includepg 
-
-LIBS += \
-	-L../terralibx/shapelib \
-	-L../terralibx/stat \
-	-L../terralibx/terralib \
-	-L../terralibx/tiff \
-	-L../terralibx/PostgreSQL \
-	-L/usr/local/lib -L/usr/lib -L/usr/lib/mysql -L/usr/local/lib/mysql \
-	-L/usr/local/mysql -L/usr/local/mysql/lib -L. \
-    -lshapelib -lstat -lterralib -ltiff -lmysqlclient -lpq -lcrypt
-
-
-
-
-
-
-
diff --git a/examples/createSTElementSetFromTheme/.cdtproject b/examples/createSTElementSetFromTheme/.cdtproject
deleted file mode 100644
index fc69c6a..0000000
--- a/examples/createSTElementSetFromTheme/.cdtproject
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse-cdt version="2.0"?>
-
-<cdtproject id="org.eclipse.cdt.make.core.make">
-<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
-<data>
-<item id="org.eclipse.cdt.core.pathentry">
-<pathentry kind="src" path=""/>
-<pathentry kind="out" path=""/>
-<pathentry kind="con" path="org.eclipse.cdt.make.core.DISCOVERED_SCANNER_INFO"/>
-</item>
-<item id="cdt_indexer">
-<indexEnabled indexValue="false"/>
-<indexerProblemsEnabled indexProblemsValue="0"/>
-</item>
-</data>
-</cdtproject>
diff --git a/examples/createSTElementSetFromTheme/.project b/examples/createSTElementSetFromTheme/.project
deleted file mode 100644
index 1f4381d..0000000
--- a/examples/createSTElementSetFromTheme/.project
+++ /dev/null
@@ -1,104 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>createSTElementSetFromTheme</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.cdt.make.core.makeBuilder</name>
-			<arguments>
-				<dictionary>
-					<key>org.eclipse.cdt.core.errorOutputParser</key>
-					<value>org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.VCErrorParser;</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
-					<value>clean all</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.incrementalBuildTarget</key>
-					<value>all</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
-					<value>false</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.buildLocation</key>
-					<value></value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.enableFullBuild</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.enabledIncrementalBuild</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
-					<value>clean</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.buildCommand</key>
-					<value>make</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
-					<value>all</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.stopOnError</key>
-					<value>false</value>
-				</dictionary>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.cdt.make.core.ScannerConfigBuilder</name>
-			<arguments>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.ScannerConfigDiscoveryEnabled</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.makeBuilderParserId</key>
-					<value>org.eclipse.cdt.make.core.GCCScannerInfoConsoleParser</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.esiProviderCommandEnabled</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.siProblemGenerationEnabled</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.useDefaultESIProviderCmd</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.makeBuilderParserEnabled</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.esiProviderParserId</key>
-					<value>org.eclipse.cdt.make.core.GCCSpecsConsoleParser</value>
-				</dictionary>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.cdt.core.cnature</nature>
-		<nature>org.eclipse.cdt.make.core.makeNature</nature>
-		<nature>org.eclipse.cdt.make.core.ScannerConfigNature</nature>
-	</natures>
-</projectDescription>
diff --git a/examples/createSTElementSetFromTheme/Makefile b/examples/createSTElementSetFromTheme/Makefile
deleted file mode 100644
index ce3c22a..0000000
--- a/examples/createSTElementSetFromTheme/Makefile
+++ /dev/null
@@ -1,23 +0,0 @@
-all: createSTElementSetFromTheme
-
-shapelib:
-	cd ../terralibx/shapelib; make
-
-tiff:
-	cd ../terralibx/tiff; make
-
-terralib:
-	cd ../terralibx/terralib; make
-
-stat:
-	cd ../terralibx/stat; make
-
-createSTElementSetFromTheme: shapelib tiff terralib stat
-	qmake -o makeCreateSTElementSetFromTheme createSTElementSetFromTheme.pro; make -f makeCreateSTElementSetFromTheme
-
-clean:
-	if \
-		test -f makeCreateSTElementSetFromTheme; \
-	then \
-		make -f makeCreateSTElementSetFromTheme distclean; rm -f makeCreateSTElementSetFromTheme; \
-	fi
\ No newline at end of file
diff --git a/examples/createSTElementSetFromTheme/createSTElementSetFromTheme.cpp b/examples/createSTElementSetFromTheme/createSTElementSetFromTheme.cpp
deleted file mode 100644
index cae45f4..0000000
--- a/examples/createSTElementSetFromTheme/createSTElementSetFromTheme.cpp
+++ /dev/null
@@ -1,147 +0,0 @@
-/************************************************************************************
-TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The library provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use
-of this library and its documentation.
-*************************************************************************************/
-
-/* 
-   This file illustrates an example of how to create a new Spatial Temporal Element 
-   Set (STElementSet) from a theme. A Spatial Temporal Element Set can be created 
-   from a layer or from a theme.
-   This example creates a theme with spatial and attribute restrictions and fills 
-   a STElementSet from this created theme with all attributes and geometries.
-
-   Author: Karine Reis   
-*/
-
-#include <TeSTElementSet.h>
-#include <TeSTEFunctionsDB.h>
-#include <TeInitQuerierStrategy.h>
-#include <TeMySQL.h>
-
-int main()
-{	
- 	// Datatabase server parameters
-	string host = "localhost";
-	string dbname = "TerraLib";
-	string user = "root";
-	string password = "ferreira";
-
-	// Open a connection to the TerraTeste MySQL database 
-	TeDatabase* db = new TeMySQL();
-	if (!db->connect(host, user, password, dbname))
-	{
-		cout << "Error: " << db->errorMessage() << endl;
-		cout << endl << "Press Enter\n";
-		getchar();
-		return 1;
-	}
-	cout << "Connection successful to the database \"" << dbname << "\" on MySQL server \"" << host << "\" !\n";;
-	
-	// Loads the layer
-	TeLayer* bairrosPA =  new TeLayer("BairrosPoA");
-	if (!db->loadLayer(bairrosPA))
-	{
-	    cout << "Fail to load the layer!" << db->errorMessage() << endl;
-		db->close();
-		cout << endl << "Press Enter\n";
-		getchar();
-        return 1;
-	}
-
-	// Loads the geometry of Santo Antonio district (id = 48)
-	TePolygonSet ps;
-	bairrosPA->loadGeometrySet("48", ps);
-		
-	// Loads a layer named OcorrenciaPoA 
-	TeLayer* OcorrenciaPoA =  new TeLayer("OcorrenciasPoA");
-	if (!db->loadLayer(OcorrenciaPoA))
-	{
-	    cout << "Fail to load the layer!" << db->errorMessage() << endl;
-		db->close();
-		cout << endl << "Press Enter\n";
-		getchar();
-        return 1;
-	}
-
-	// Create a theme with retrictions from Ocorrencias layer, in memory
-	TeTheme* Ocorrencias = new TeTheme("Ocorrencias", OcorrenciaPoA);
-	TeAttrTableVector attrTables;
-	OcorrenciaPoA->getAttrTables(attrTables);
-	Ocorrencias->setAttTables(attrTables);
-	
-	//spatial restriction: within Santo Antonio district
-	Ocorrencias->setSpatialRest (&ps, TePOINTS, TeWITHIN);
-	//attribute restriction: type "amea�a"
-	Ocorrencias->attributeRest(" EVENTO = 'Amea�a' ");
-
-	// Inits querier strategies
-	TeInitQuerierStrategies();
-		
-	// Creates a elementSet from theme 
-	TeSTElementSet  steSet(Ocorrencias);
-
-	// Builds the elementSet with geometries and all attributes	
-	bool loadGeometries = true;
-	bool loadAllAttributes = true;
-	if(!TeSTOSetBuildDB(&steSet, loadGeometries, loadAllAttributes))
-	{
-		cout << "Error! " << endl;
-		cout << endl << "Press Enter\n";
-		getchar();
-		return 1;
-	}
-	
-	// Shows how many elements the elementSet has
-	cout << "Number of elements: " <<  steSet.numElements() << endl;
-
-	TeSTElementSet::iterator it = steSet.begin();
-	while ( it != steSet.end())
-	{
-		TeSTInstance st = (*it);
-
-		//Gets attribute value
-		string event;
-		st.getPropertyValue("EVENTO", event);
-		
-		cout << " Object Identifier :  " << st.objectId() << endl; 
-		cout << " Event	  :  " << event  << endl ; 
-				
-		//Gets geometry
-		if(st.hasPoints())
-		{
-			TePointSet pset;
-			st.getGeometry (pset);
-			cout<< "     point id: "<< pset[0].objectId ()	 << endl;
-			for(unsigned int j=0; j<pset.size (); ++j)
-			{
-				string point =  Te2String(pset[j].location().x()) +";"+  Te2String(pset[j].location().y());
-				cout<< "		point: " << " ("+ point + ") " <<endl << endl;
-			}
-		}
-		++it;
-	}
-
-	db->close();
-	delete (Ocorrencias);
-	cout << endl << "Press Enter\n";
-	getchar();
-	return 0;
-}
diff --git a/examples/createSTElementSetFromTheme/createSTElementSetFromTheme.dsp b/examples/createSTElementSetFromTheme/createSTElementSetFromTheme.dsp
deleted file mode 100644
index 432296a..0000000
--- a/examples/createSTElementSetFromTheme/createSTElementSetFromTheme.dsp
+++ /dev/null
@@ -1,114 +0,0 @@
-# Microsoft Developer Studio Project File - Name="createSTElementSetFromTheme" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=createSTElementSetFromTheme - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "createSTElementSetFromTheme.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "createSTElementSetFromTheme.mak" CFG="createSTElementSetFromTheme - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "createSTElementSetFromTheme - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "createSTElementSetFromTheme - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "createSTElementSetFromTheme - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drive [...]
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x416 /d "NDEBUG"
-# ADD RSC /l 0x416 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\shapelib\Release\shapelib.lib ..\..\terralibw\freetype\Release\freetype.lib ..\..\terralibw\tiff\Release\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\Postg [...]
-# SUBTRACT LINK32 /pdb:none
-
-!ELSEIF  "$(CFG)" == "createSTElementSetFromTheme - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terra [...]
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x416 /d "_DEBUG"
-# ADD RSC /l 0x416 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\shapelib\Debug\shapelib.lib ..\..\terralibw\freetype\Debug\freetype.lib ..\..\terralibw\tiff\Debug\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\li [...]
-# SUBTRACT LINK32 /pdb:none
-
-!ENDIF 
-
-# Begin Target
-
-# Name "createSTElementSetFromTheme - Win32 Release"
-# Name "createSTElementSetFromTheme - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\createSTElementSetFromTheme.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\terralib\drivers\MySQL\TeMySQL.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\src\terralib\drivers\MySQL\TeMySQL.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/examples/createSTElementSetFromTheme/createSTElementSetFromTheme.dsw b/examples/createSTElementSetFromTheme/createSTElementSetFromTheme.dsw
deleted file mode 100644
index f73c38d..0000000
--- a/examples/createSTElementSetFromTheme/createSTElementSetFromTheme.dsw
+++ /dev/null
@@ -1,89 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "createSTElementSetFromTheme"=".\createSTElementSetFromTheme.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name terralib
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "freetype"="..\..\terralibw\freetype\freetype.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "shapelib"="..\..\terralibw\shapelib\shapelib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "terralib"="..\..\terralibw\terralib\terralib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name freetype
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name shapelib
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name tiff
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "tiff"="..\..\terralibw\tiff\tiff.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/examples/createSTElementSetFromTheme/createSTElementSetFromTheme.pro b/examples/createSTElementSetFromTheme/createSTElementSetFromTheme.pro
deleted file mode 100644
index 4579446..0000000
--- a/examples/createSTElementSetFromTheme/createSTElementSetFromTheme.pro
+++ /dev/null
@@ -1,47 +0,0 @@
-TEMPLATE = app
-TARGET = createSTElementSetFromTheme
-CONFIG += qt warn_on thread debug rtti exceptions
-LANGUAGE = C++
-
-OBJECTS_DIR = .obj
-
-SOURCES	+= \
-	createSTElementSetFromTheme.cpp \
-	../src/terralib/drivers/MySQL/TeMySQL.cpp
-
-HEADERS	+= \
-	../src/terralib/drivers/MySQL/TeMySQL.h
-	
-INCLUDEPATH += \
-	. \
-	.. \
-	../src/terralib/kernel \
-	../src/terralib/application \
-	../src/terralib/functions \
-	../src/terralib/stat \
-	../src/shapelib \
-	../src/zlib \
-	../src/terralib/application/qt \
-	../src/terralib/drivers/MySQL \
-	../src/terralib/drivers/MySQL/include \
-	../src/terralib/drivers/OracleSpatial \
-	../src/terralib/drivers/OracleSpatial/OCI/include \
-	../src/terralib/drivers/PostgreSQL \
-	../src/terralib/drivers/PostgreSQL/includepg 
-
-LIBS += \
-	-L../terralibx/shapelib \
-	-L../terralibx/stat \
-	-L../terralibx/terralib \
-	-L../terralibx/tiff \
-	-L../terralibx/PostgreSQL \
-	-L/usr/local/lib -L/usr/lib -L/usr/lib/mysql -L/usr/local/lib/mysql \
-	-L/usr/local/mysql -L/usr/local/mysql/lib -L. \
-    -lshapelib -lstat -lterralib -ltiff -lmysqlclient -lpq -lcrypt
-
-
-
-
-
-
-
diff --git a/examples/createTable/.cdtproject b/examples/createTable/.cdtproject
old mode 100644
new mode 100755
diff --git a/examples/createTable/.project b/examples/createTable/.project
old mode 100644
new mode 100755
diff --git a/examples/createTable/Makefile b/examples/createTable/Makefile
old mode 100644
new mode 100755
index 580198d..7662135
--- a/examples/createTable/Makefile
+++ b/examples/createTable/Makefile
@@ -1,23 +1,29 @@
 all: createTable
 
-shapelib:
-	cd ../terralibx/shapelib; make
-
-tiff:
-	cd ../terralibx/tiff; make
+debug: createTable_dbg
 
 terralib:
-	cd ../terralibx/terralib; make
+	cd ../../terralibx/terralib; make
 
-stat:
-	cd ../terralibx/stat; make
+terralib_dbg:
+	cd ../../terralibx/terralib; make debug
 
-createTable: shapelib tiff terralib stat
+createTable:  terralib 
 	qmake -o makeCreateTable createTable.pro; make -f makeCreateTable
 
+createTable_dbg: terralib_dbg
+	qmake -o makeCreateTable.debug createTable.pro TE_PROJECT_TYPE=DEBUG; make -f makeCreateTable.debug
+
 clean:
 	if \
 		test -f makeCreateTable; \
 	then \
 		make -f makeCreateTable distclean; rm -f makeCreateTable; \
-	fi
\ No newline at end of file
+	fi
+	
+	clean_debug:
+	if \
+		test -f makeCreateTable.debug; \
+	then \
+		make -f makeCreateTable.debug distclean; rm -f makeCreateTable.debug; \
+	fi
diff --git a/examples/createTable/createTable.cpp b/examples/createTable/createTable.cpp
old mode 100644
new mode 100755
index e43fa40..dea9266
--- a/examples/createTable/createTable.cpp
+++ b/examples/createTable/createTable.cpp
@@ -38,11 +38,11 @@ int main()
 {
  	// Datatabase server parameters
 	string host = "localhost";
-	string dbname = "TerraTeste";
+	string dbname = "DB320RC1";
 	string user = "root";
-	string password = "";
+	string password = "vinhas";
 
-	// Open a connection to the TerraTeste MySQL database 
+	// Open a connection to the DB320RC1 MySQL database 
 	TeDatabase* db = new TeMySQL();
 	if (!db->connect(host, user, password, dbname))
 	{
diff --git a/examples/createTable/createTable.dsp b/examples/createTable/createTable.dsp
old mode 100644
new mode 100755
index f2830bd..3f8ac08
--- a/examples/createTable/createTable.dsp
+++ b/examples/createTable/createTable.dsp
@@ -42,7 +42,7 @@ RSC=rc.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drive [...]
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\terralibw\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\include" /I "..\..\src [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "NDEBUG"
 # ADD RSC /l 0x416 /d "NDEBUG"
@@ -51,7 +51,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\shapelib\Release\shapelib.lib ..\..\terralibw\freetype\Release\freetype.lib ..\..\terralibw\tiff\Release\tiff.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\Postg [...]
+# ADD LINK32 ..\..\terralibw\terralib\Release\terralib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\libpq.lib /nologo /subsystem:console /machine:I386 /out:"../Release/createTable.exe"
 # SUBTRACT LINK32 /pdb:none
 
 !ELSEIF  "$(CFG)" == "createTable - Win32 Debug"
@@ -68,7 +68,7 @@ LINK32=link.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terra [...]
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\terralibw\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\include" /I " [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "_DEBUG"
 # ADD RSC /l 0x416 /d "_DEBUG"
@@ -77,7 +77,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\shapelib\Debug\shapelib.lib ..\..\terralibw\freetype\Debug\freetype.lib ..\..\terralibw\tiff\Debug\tiff.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\li [...]
+# ADD LINK32 ..\..\terralibw\terralib\Debug\terralib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\libpq.lib /nologo /subsystem:console /debug /machine:I386 /out:"../Debug/createTable.exe" /pdbtype:sept
 # SUBTRACT LINK32 /pdb:none
 
 !ENDIF 
diff --git a/examples/createTable/createTable.dsw b/examples/createTable/createTable.dsw
old mode 100644
new mode 100755
index d065a6c..ace9880
--- a/examples/createTable/createTable.dsw
+++ b/examples/createTable/createTable.dsw
@@ -3,7 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
 
 ###############################################################################
 
-Project: "createTable"=".\createTable.dsp" - Package Owner=<4>
+Project: "createTable"=.\createTable.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -18,31 +18,7 @@ Package=<4>
 
 ###############################################################################
 
-Project: "freetype"="..\..\terralibw\freetype\freetype.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "shapelib"="..\..\terralibw\shapelib\shapelib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "terralib"="..\..\terralibw\terralib\terralib.dsp" - Package Owner=<4>
+Project: "terralib"=..\..\terralibw\terralib\terralib.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -53,24 +29,6 @@ Package=<4>
     Begin Project Dependency
     Project_Dep_Name freetype
     End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name shapelib
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name tiff
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "tiff"="..\..\terralibw\tiff\tiff.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
 }}}
 
 ###############################################################################
diff --git a/examples/createTable/createTable.pro b/examples/createTable/createTable.pro
old mode 100644
new mode 100755
index 9222d75..ea74e02
--- a/examples/createTable/createTable.pro
+++ b/examples/createTable/createTable.pro
@@ -1,47 +1,9 @@
-TEMPLATE = app
-TARGET = createTable
-CONFIG += qt warn_on thread debug rtti exceptions
-LANGUAGE = C++
-
-OBJECTS_DIR = .obj
+include( ../base/base.pro )
 
 SOURCES	+= \
 	createTable.cpp \
-	../src/terralib/drivers/MySQL/TeMySQL.cpp
+	../../src/terralib/drivers/MySQL/TeMySQL.cpp
 
 HEADERS	+= \
-	../src/terralib/drivers/MySQL/TeMySQL.h
-	
-INCLUDEPATH += \
-	. \
-	.. \
-	../src/terralib/kernel \
-	../src/terralib/application \
-	../src/terralib/functions \
-	../src/terralib/stat \
-	../src/shapelib \
-	../src/zlib \
-	../src/terralib/application/qt \
-	../src/terralib/drivers/MySQL \
-	../src/terralib/drivers/MySQL/include \
-	../src/terralib/drivers/OracleSpatial \
-	../src/terralib/drivers/OracleSpatial/OCI/include \
-	../src/terralib/drivers/PostgreSQL \
-	../src/terralib/drivers/PostgreSQL/includepg 
-
-LIBS += \
-	-L../terralibx/shapelib \
-	-L../terralibx/stat \
-	-L../terralibx/terralib \
-	-L../terralibx/tiff \
-	-L../terralibx/PostgreSQL \
-	-L/usr/local/lib -L/usr/lib -L/usr/lib/mysql -L/usr/local/lib/mysql \
-	-L/usr/local/mysql -L/usr/local/mysql/lib -L. \
-    -lshapelib -lstat -lterralib -ltiff -lmysqlclient -lpq -lcrypt
-
-
-
-
-
-
+	../../src/terralib/drivers/MySQL/TeMySQL.h
 
diff --git a/examples/createTable/createTable.sln b/examples/createTable/createTable.sln
new file mode 100755
index 0000000..57002ee
--- /dev/null
+++ b/examples/createTable/createTable.sln
@@ -0,0 +1,48 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "terralib", "..\..\terralibw\terralib\terralib.vcproj", "{99BC87CA-140D-4A99-803C-DF078430A6C8}"
+	ProjectSection(ProjectDependencies) = postProject
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C} = {BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E} = {5E26C3A1-28D3-40FA-A3F5-115180C98E0E}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjpeg", "..\..\terralibw\libjpeg\libjpeg.vcproj", "{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "createTable", "createTable.vcproj", "{970FF570-5C7F-48A4-B8C7-C0539D3A45DA}"
+	ProjectSection(ProjectDependencies) = postProject
+		{99BC87CA-140D-4A99-803C-DF078430A6C8} = {99BC87CA-140D-4A99-803C-DF078430A6C8}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tiff", "..\..\terralibw\tiff\tiff.vcproj", "{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		Debug = Debug
+		Release = Release
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{99BC87CA-140D-4A99-803C-DF078430A6C8}.Debug.ActiveCfg = Debug|Win32
+		{99BC87CA-140D-4A99-803C-DF078430A6C8}.Debug.Build.0 = Debug|Win32
+		{99BC87CA-140D-4A99-803C-DF078430A6C8}.Release.ActiveCfg = Release|Win32
+		{99BC87CA-140D-4A99-803C-DF078430A6C8}.Release.Build.0 = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.ActiveCfg = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.Build.0 = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.ActiveCfg = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.Build.0 = Release|Win32
+		{970FF570-5C7F-48A4-B8C7-C0539D3A45DA}.Debug.ActiveCfg = Debug|Win32
+		{970FF570-5C7F-48A4-B8C7-C0539D3A45DA}.Debug.Build.0 = Debug|Win32
+		{970FF570-5C7F-48A4-B8C7-C0539D3A45DA}.Release.ActiveCfg = Release|Win32
+		{970FF570-5C7F-48A4-B8C7-C0539D3A45DA}.Release.Build.0 = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.ActiveCfg = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.Build.0 = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.ActiveCfg = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
diff --git a/examples/createTable/createTable.vcproj b/examples/createTable/createTable.vcproj
new file mode 100755
index 0000000..c8ab969
--- /dev/null
+++ b/examples/createTable/createTable.vcproj
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="createTable"
+	ProjectGUID="{970FF570-5C7F-48A4-B8C7-C0539D3A45DA}">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="."
+			IntermediateDirectory="..\Debug\"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="-Zm200 -GX -w34100 -w34189"
+				Optimization="4"
+				AdditionalIncludeDirectories=".;..\..\src\terralib\kernel;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include"
+				PreprocessorDefinitions="UNICODE,WIN32"
+				GeneratePreprocessedFile="0"
+				MinimalRebuild="TRUE"
+				ExceptionHandling="TRUE"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				AssemblerListingLocation="..\Debug\"
+				ObjectFile="..\Debug\"
+				ProgramDataBaseFileName=".\"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Debug/terralib/terralib.lib ../../Debug/libjpeg/libjpeg.lib ../../Debug/tiff/tiff.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
+				OutputFile="..\Debug\createTable.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreDefaultLibraryNames="msvcrt.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				WarningLevel="0"
+				DefaultCharType="0"
+				EnableErrorChecks="1"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="."
+			IntermediateDirectory="..\Release\"
+			ConfigurationType="1">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories=".;..\..\src\terralib\kernel;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include"
+				PreprocessorDefinitions="UNICODE,WIN32"
+				RuntimeLibrary="2"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Release/terralib/terralib.lib ../../Release/libjpeg/libjpeg.lib ../../Release/tiff/tiff.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
+				OutputFile="..\Release\createTable.exe"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath=".\createTable.cpp">
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.h">
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/createTheme/.cdtproject b/examples/createTheme/.cdtproject
old mode 100644
new mode 100755
diff --git a/examples/createTheme/.project b/examples/createTheme/.project
old mode 100644
new mode 100755
index a70d613..e25381a
--- a/examples/createTheme/.project
+++ b/examples/createTheme/.project
@@ -14,21 +14,21 @@
 				</dictionary>
 				<dictionary>
 					<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
-					<value>clean all</value>
+					<value>all</value>
 				</dictionary>
 				<dictionary>
 					<key>org.eclipse.cdt.make.core.incrementalBuildTarget</key>
 					<value>all</value>
 				</dictionary>
 				<dictionary>
-					<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
-					<value>false</value>
-				</dictionary>
-				<dictionary>
 					<key>org.eclipse.cdt.make.core.buildLocation</key>
 					<value></value>
 				</dictionary>
 				<dictionary>
+					<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
+					<value>false</value>
+				</dictionary>
+				<dictionary>
 					<key>org.eclipse.cdt.make.core.enableFullBuild</key>
 					<value>true</value>
 				</dictionary>
@@ -53,13 +53,13 @@
 					<value>make</value>
 				</dictionary>
 				<dictionary>
-					<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
-					<value>all</value>
-				</dictionary>
-				<dictionary>
 					<key>org.eclipse.cdt.make.core.stopOnError</key>
 					<value>false</value>
 				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
+					<value>all</value>
+				</dictionary>
 			</arguments>
 		</buildCommand>
 		<buildCommand>
diff --git a/examples/createTheme/Makefile b/examples/createTheme/Makefile
old mode 100644
new mode 100755
index 3d8e7f1..64bc7f2
--- a/examples/createTheme/Makefile
+++ b/examples/createTheme/Makefile
@@ -1,23 +1,31 @@
 all: createTheme
 
-shapelib:
-	cd ../terralibx/shapelib; make
-
-tiff:
-	cd ../terralibx/tiff; make
+debug: createTheme_dbg
 
 terralib:
-	cd ../terralibx/terralib; make
-
-stat:
-	cd ../terralibx/stat; make
+	cd ../../terralibx/terralib; make
+	
+terralib_dbg:
+	cd ../../terralibx/terralib; make debug
 
-createTheme: shapelib tiff terralib stat
+createTheme: terralib
 	qmake -o makeCreateTheme createTheme.pro; make -f makeCreateTheme
 
+
+createTheme_dbg: terralib_dbg
+	qmake -o makeCreateTheme.debug createTheme.pro TE_PROJECT_TYPE=DEBUG; \
+	make -f makeCreateTheme.debug
+
 clean:
 	if \
 		test -f makeCreateTheme; \
 	then \
 		make -f makeCreateTheme distclean; rm -f makeCreateTheme; \
+	fi
+	
+clean_debug:
+	if \
+		test -f makeCreateTheme.debug; \
+	then \
+		make -f makeCreateTheme.debug distclean; rm -f makeCreateTheme.debug; \
 	fi
\ No newline at end of file
diff --git a/examples/createTheme/createTheme.cpp b/examples/createTheme/createTheme.cpp
old mode 100644
new mode 100755
index bab0582..cc08e1b
--- a/examples/createTheme/createTheme.cpp
+++ b/examples/createTheme/createTheme.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -35,11 +35,11 @@ int main()
 {
  	// Datatabase server parameters
 	string host = "localhost";
-	string dbname = "TerraTeste";
+	string dbname = "DB320RC1";
 	string user = "root";
-	string password = "";
+	string password = "vinhas";
 
-	// Open a connection to the TerraTeste MySQL database 
+	// Open a connection to the DB320RC1 MySQL database 
 	TeDatabase* db = new TeMySQL();
 	if (!db->connect(host, user, password, dbname))
 	{
@@ -56,21 +56,23 @@ int main()
 	{
 		cout << "Fail to load the layer \"Distritos\": " << db->errorMessage() << endl;
 		db->close();
+		delete db;
 		cout << endl << "Press Enter\n";
 		getchar();
 		return 1;
 	}
 
-	TeProjection* proj = dist->projection(); 
+	TeProjection* proj = TeProjectionFactory::make(dist->projection()->params()); 
 
 	// Create a view with the same projection of the layer
 	string viewName = "SaoPaulo";
 
 	// Check whether there is a view with this name in the datatabase
-	if (db->viewExist(viewName))
+	if (db->viewExist(viewName) == true)
 	{
-		cout << "There is already a view named \"" << viewName << "\" in the TerraLib database!\n";
+		cout << "There is already a view named \"SaoPaulo\" in the database\n";
 		db->close();
+		delete db;
 		cout << endl << "Press Enter\n";
 		getchar();
 		return 1;
@@ -78,46 +80,49 @@ int main()
 
 	TeView* view = new TeView(viewName, user); 
 	view->projection(proj);
-	if (!db->insertView(view))			// save the view in the database
+	if (!db->insertView(view))		// save the view in the database
 	{
 		cout << "Fail to insert the view \"SaoPaulo\" into the database: " << db->errorMessage() << endl;
 		db->close();
+		delete db;
 		cout << endl << "Press Enter\n";
 		getchar();
 		return 1;
 	}
 
 	// Create a theme that will contain all of the objects of the layer (no restrictions applied)
-	TeTheme* theme = new TeTheme("T_dist", dist);
+	TeTheme* theme = new TeTheme("DistritosSaoPaulo", dist);
 	view->add(theme);
 		
 	// Set a default visual for the geometries of the objects of the layer 
 	// Polygons will be set with the blue color
 	TeColor color;
-	TeVisual polygonVisual(TePOLYGONS);
 	color.init(0,0,255);
-	polygonVisual.color(color); 
-    theme->setVisualDefault(polygonVisual, TePOLYGONS);
+	TeVisual* polygonVisual = TeVisualFactory::make("tevisual");
+	polygonVisual->color(color); 
 
-	// Polygons will be set with the red color
-    TeVisual pointVisual(TePOINTS);
+	// Points will be set with the red color
 	color.init(255,0,0);
-	pointVisual.color(color);
-    pointVisual.style(TePtTypeX);
+	TeVisual* pointVisual = TeVisualFactory::make("tevisual");
+	pointVisual->color(color);
+   	pointVisual->style(TePtTypeX);
+
+    theme->setVisualDefault(polygonVisual, TePOLYGONS);
     theme->setVisualDefault(pointVisual, TePOINTS);
 
 	// Set all of the geometrical representations to be visible
 	int allRep = dist->geomRep();
 	theme->visibleRep(allRep);
 
-	// Show all of the attribute tables of the layer
+	// Set the attribute tables of the theme equal the tables of the layer 
 	theme->setAttTables(dist->attrTables());
 
 	// Save the theme in the database
     if (!theme->save())	
     {
-		cout << "Fail to save the theme \"T_dist\" in the database: " << db->errorMessage() << endl;
+		cout << "Fail to save the theme \"DistritosSaoPaulo\" in the database: " << db->errorMessage() << endl;
 		db->close();
+		delete db;
 		cout << endl << "Press Enter\n";
 		getchar();
 		return 1;
@@ -126,18 +131,18 @@ int main()
 	// Build the collection of objects associated to the theme
 	if (!theme->buildCollection())
 	{
-		cout << "Fail to build the theme \"T_dist\": " << db->errorMessage() << endl;
+		cout << "Fail to build the theme \"DistritosSaoPaulo\": " << db->errorMessage() << endl;
 		db->close();
+		delete db;
 		cout << endl << "Press Enter\n";
 		getchar();
 		return 1;
 	}
-	cout << "The theme \"T_dist\" was created without restrictions!\n";
+	cout << "The theme \"DistritosSaoPaulo\" was created without restrictions!\n";
 
 	// Create a theme with the following attribute restriction:
 	// Districts with population higher than 100,000 people
-
-	TeTheme* themeRest = new TeTheme("T_dist_POP", dist);
+	TeTheme* themeRest = new TeTheme("Pop91GT100000", dist);
 	themeRest->setAttTables (dist->attrTables());
 	
 	// Set the attribute restriction
@@ -147,9 +152,16 @@ int main()
 	// Set all of the geometrical representations to be visible
 	themeRest->visibleRep(allRep);
 
+	TeVisual* polygonVisual2 = TeVisualFactory::make("tevisual");
+	polygonVisual2->color(color); 
+
+   	TeVisual* pointVisual2 = TeVisualFactory::make("tevisual");
+	pointVisual2->color(color);
+   	pointVisual2->style(TePtTypeX);
+
 	// Set the visual
-	themeRest->setVisualDefault(polygonVisual, TePOLYGONS);
-	themeRest->setVisualDefault(pointVisual, TePOINTS);
+	themeRest->setVisualDefault(polygonVisual2, TePOLYGONS);
+	themeRest->setVisualDefault(pointVisual2, TePOINTS);
 
 	// Insert the theme into the view
 	view->add(themeRest);
@@ -157,8 +169,9 @@ int main()
 	// Save the theme in the database
 	if (!themeRest->save())
     {
-		cout << "Fail to save the theme \"T_dist_POP\" in the database: " << db->errorMessage() << endl;
+		cout << "Fail to save the theme \"Pop91GT100000\" in the database: " << db->errorMessage() << endl;
 		db->close();
+		delete db;
 		cout << endl << "Press Enter\n";
 		getchar();
 		return 1;
@@ -167,17 +180,18 @@ int main()
 	// Build the collection of objects associated to the theme
 	if (!themeRest->buildCollection())
 	{
-		cout << "Fail to build the theme \"T_dist_POP\": " << db->errorMessage() << endl;
+		cout << "Fail to build the theme \"Pop91GT100000\": " << db->errorMessage() << endl;
 		db->close();
+		delete db;
 		cout << endl << "Press Enter\n";
 		getchar();
 		return 1;
 	}
 
-	cout << "The theme  \"T_dist_POP\" was created with attribute restrictions!\n\n";
-	db->close();
+	cout << "The theme  \"Pop91GT100000\" was created with attribute restrictions!\n\n";
+	delete db;
 	cout << endl << "Press Enter\n";
-    getchar();
+   	getchar();
 	return 0;
 }
 
diff --git a/examples/createTheme/createTheme.dsp b/examples/createTheme/createTheme.dsp
old mode 100644
new mode 100755
index 65444fd..33a9547
--- a/examples/createTheme/createTheme.dsp
+++ b/examples/createTheme/createTheme.dsp
@@ -42,7 +42,7 @@ RSC=rc.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drive [...]
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\terralibw\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\include" /I "..\..\src [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "NDEBUG"
 # ADD RSC /l 0x416 /d "NDEBUG"
@@ -51,7 +51,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\shapelib\Release\shapelib.lib ..\..\terralibw\freetype\Release\freetype.lib ..\..\terralibw\tiff\Release\tiff.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\Postg [...]
+# ADD LINK32 ..\..\terralibw\terralib\Release\terralib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\libpq.lib /nologo /subsystem:console /machine:I386 /out:"../Release/createTheme.exe"
 # SUBTRACT LINK32 /pdb:none
 
 !ELSEIF  "$(CFG)" == "createTheme - Win32 Debug"
@@ -68,7 +68,7 @@ LINK32=link.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terra [...]
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\terralibw\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\include" /I " [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "_DEBUG"
 # ADD RSC /l 0x416 /d "_DEBUG"
@@ -77,7 +77,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\shapelib\Debug\shapelib.lib ..\..\terralibw\freetype\Debug\freetype.lib ..\..\terralibw\tiff\Debug\tiff.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\li [...]
+# ADD LINK32 ..\..\terralibw\terralib\Debug\terralib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\libpq.lib /nologo /subsystem:console /debug /machine:I386 /out:"../Debug/createTheme.exe" /pdbtype:sept
 # SUBTRACT LINK32 /pdb:none
 
 !ENDIF 
diff --git a/examples/createTheme/createTheme.dsw b/examples/createTheme/createTheme.dsw
old mode 100644
new mode 100755
index e178cf7..ddd8628
--- a/examples/createTheme/createTheme.dsw
+++ b/examples/createTheme/createTheme.dsw
@@ -3,7 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
 
 ###############################################################################
 
-Project: "createTheme"=".\createTheme.dsp" - Package Owner=<4>
+Project: "createTheme"=.\createTheme.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -18,31 +18,7 @@ Package=<4>
 
 ###############################################################################
 
-Project: "freetype"="..\..\terralibw\freetype\freetype.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "shapelib"="..\..\terralibw\shapelib\shapelib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "terralib"="..\..\terralibw\terralib\terralib.dsp" - Package Owner=<4>
+Project: "terralib"=..\..\terralibw\terralib\terralib.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -53,24 +29,6 @@ Package=<4>
     Begin Project Dependency
     Project_Dep_Name freetype
     End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name shapelib
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name tiff
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "tiff"="..\..\terralibw\tiff\tiff.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
 }}}
 
 ###############################################################################
diff --git a/examples/createTheme/createTheme.pro b/examples/createTheme/createTheme.pro
old mode 100644
new mode 100755
index d710cdc..dd2b76e
--- a/examples/createTheme/createTheme.pro
+++ b/examples/createTheme/createTheme.pro
@@ -1,47 +1,6 @@
-TEMPLATE = app
-TARGET = createTheme
-CONFIG += qt warn_on thread debug rtti exceptions
-LANGUAGE = C++
-
-OBJECTS_DIR = .obj
+include( ../base/base.pro )
 
 SOURCES	+= \
 	createTheme.cpp \
-	../src/terralib/drivers/MySQL/TeMySQL.cpp
-
-HEADERS	+= \
-	../src/terralib/drivers/MySQL/TeMySQL.h
-	
-INCLUDEPATH += \
-	. \
-	.. \
-	../src/terralib/kernel \
-	../src/terralib/application \
-	../src/terralib/functions \
-	../src/terralib/stat \
-	../src/shapelib \
-	../src/zlib \
-	../src/terralib/application/qt \
-	../src/terralib/drivers/MySQL \
-	../src/terralib/drivers/MySQL/include \
-	../src/terralib/drivers/OracleSpatial \
-	../src/terralib/drivers/OracleSpatial/OCI/include \
-	../src/terralib/drivers/PostgreSQL \
-	../src/terralib/drivers/PostgreSQL/includepg 
-
-LIBS += \
-	-L../terralibx/shapelib \
-	-L../terralibx/stat \
-	-L../terralibx/terralib \
-	-L../terralibx/tiff \
-	-L../terralibx/PostgreSQL \
-	-L/usr/local/lib -L/usr/lib -L/usr/lib/mysql -L/usr/local/lib/mysql \
-	-L/usr/local/mysql -L/usr/local/mysql/lib -L. \
-    -lshapelib -lstat -lterralib -ltiff -lmysqlclient -lpq -lcrypt
-
-
-
-
-
-
+	../../src/terralib/drivers/MySQL/TeMySQL.cpp
 
diff --git a/examples/createTheme/createTheme.sln b/examples/createTheme/createTheme.sln
new file mode 100755
index 0000000..518136f
--- /dev/null
+++ b/examples/createTheme/createTheme.sln
@@ -0,0 +1,47 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "createTheme", "createTheme.vcproj", "{AC29CA10-2B75-494F-A370-6767C7AB5FC1}"
+	ProjectSection(ProjectDependencies) = postProject
+		{40917057-E283-4760-B645-D2BA2D7E5A35} = {40917057-E283-4760-B645-D2BA2D7E5A35}
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C} = {BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "terralib", "..\..\terralibw\terralib\terralib.vcproj", "{40917057-E283-4760-B645-D2BA2D7E5A35}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjpeg", "..\..\terralibw\libjpeg\libjpeg.vcproj", "{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tiff", "..\..\terralibw\tiff\tiff.vcproj", "{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		Debug = Debug
+		Release = Release
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.ActiveCfg = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.Build.0 = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.ActiveCfg = Release|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.Build.0 = Release|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Debug.ActiveCfg = Debug|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Debug.Build.0 = Debug|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Release.ActiveCfg = Release|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Release.Build.0 = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.ActiveCfg = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.Build.0 = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.ActiveCfg = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.Build.0 = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.ActiveCfg = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.Build.0 = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.ActiveCfg = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
diff --git a/examples/createTheme/createTheme.vcproj b/examples/createTheme/createTheme.vcproj
new file mode 100755
index 0000000..c514614
--- /dev/null
+++ b/examples/createTheme/createTheme.vcproj
@@ -0,0 +1,164 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="createTheme"
+	ProjectGUID="{AC29CA10-2B75-494F-A370-6767C7AB5FC1}">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\Debug\"
+			IntermediateDirectory="..\Debug\"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="-Zm200 -GX -w34100 -w34189"
+				Optimization="4"
+				AdditionalIncludeDirectories=".;..;..\..\src\terralib\application;..\..\src\terralib\kernel;..\..\src\zlib;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include"
+				PreprocessorDefinitions="UNICODE,WIN32"
+				GeneratePreprocessedFile="0"
+				MinimalRebuild="TRUE"
+				ExceptionHandling="TRUE"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				AssemblerListingLocation="..\Debug\"
+				ObjectFile="..\Debug\"
+				ProgramDataBaseFileName=".\"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Debug/terralib/terralib.lib ../../Debug/libjpeg/libjpeg.lib ../../Debug/tiff/tiff.lib ../../Debug/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
+				OutputFile="..\Debug\createTheme.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreDefaultLibraryNames="msvcrt.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				WarningLevel="0"
+				DefaultCharType="0"
+				EnableErrorChecks="1"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\Release\"
+			IntermediateDirectory="..\Release\"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="-Zm200 -GX -w34100 -w34189"
+				Optimization="4"
+				AdditionalIncludeDirectories=".;..;..\..\src\terralib\application;..\..\src\terralib\kernel;..\..\src\zlib;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include"
+				PreprocessorDefinitions="UNICODE,WIN32"
+				GeneratePreprocessedFile="0"
+				MinimalRebuild="TRUE"
+				ExceptionHandling="TRUE"
+				RuntimeLibrary="2"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				AssemblerListingLocation="..\Debug\"
+				ObjectFile="..\Debug\"
+				ProgramDataBaseFileName=".\"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Release/terralib/terralib.lib ../../Release/libjpeg/libjpeg.lib ../../Release/tiff/tiff.lib ../../Release/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
+				OutputFile="..\Release\createTheme.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreDefaultLibraryNames="msvcrt.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				WarningLevel="0"
+				DefaultCharType="0"
+				EnableErrorChecks="1"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath="createTheme.cpp">
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.h">
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/data/BairroBH.MID b/examples/data/BairroBH.MID
new file mode 100755
index 0000000..c903dae
--- /dev/null
+++ b/examples/data/BairroBH.MID
@@ -0,0 +1,240 @@
+"AARAO REIS","600",5415
+"AEROPORTO","830",5906
+"ALIPIO DE MELO","602",11683
+"ALTO BARROCA","822",8633
+"ALTO DOS CAICARAS","603",1283
+"ALTO DOS PINHEIROS","604",1991
+"ALVARO CAMARGOS","605",2828
+"ALVORADA","606",4711
+"ANCHIETA","607",12883
+"APARECIDA","608",6935
+"APARECIDA - SETIMA SECAO","821",6533
+"BAIRRO DA GRACA","609",5767
+"BAIRRO DAS INDUSTRIAS","610",17922
+"BAIRRO DAS MANSOES","611",591
+"BALEIA","612",4507
+"BANDEIRANTES","742",4303
+"BARREIRO DE BAIXO","613",24944
+"BARREIRO DE CIMA","614",15573
+"BARRO PRETO","617",6551
+"BARROCA","616",3665
+"BELVEDERE","618",2453
+"BETANIA","619",19660
+"BOA VISTA","620",18471
+"BOM JESUS","621",4190
+"BONFIM","622",5116
+"BRAUNAS","652",1234
+"BURITIS","623",4462
+"C.H. CONFISCO","835",2184
+"CABANA","624",18752
+"CACHOEIRINHA","625",15640
+"CAETANO FURQUIM","626",6930
+"CAICARA","628",13847
+"CAICARA ADELAIDE","627",10237
+"CALAFATE","629",5541
+"CALIFORNIA","630",6028
+"CAMARGOS","631",3494
+"CAMPO ALEGRE","632",2073
+"CANAA","634",1889
+"CAPITAO EDUARDO","906",469
+"CARDOSO","635",18057
+"CARLOS PRATES","636",19998
+"CARMO","637",3175
+"CASA BRANCA","638",1349
+"CASTELO","639",5783
+"CENTRO","642",16304
+"CEU AZUL","643",20843
+"CIDADE JARDIM","644",2376
+"CIDADE NOVA","645",17820
+"COLEGIO BATISTA","646",2290
+"CONCORDIA","647",12231
+"CONJUNTO CALIFORNIA","648",4026
+"CONJUNTO CALIFORNIA 2","649",1796
+"CONJUNTO CELSO MACHADO","650",2139
+"CONJUNTO ITACOLOMI","651",883
+"CONJUNTO SANTA MARIA","769",826
+"COPACABANA","828",6592
+"COQUEIROS","654",10528
+"CORACAO DE JESUS","655",5593
+"CORACAO EUCARISTICO","656",7434
+"CRUZEIRO","657",7944
+"DOM BOSCO","658",6980
+"DOM CABRAL","659",5671
+"DOM JOAQUIM","660",4641
+"DOM SILVERIO","661",6125
+"DONA CLARA","662",3615
+"DURVAL DE BARROS","663",2583
+"ENGENHO NOGUEIRA","664",2016
+"ERMELINDA","665",2317
+"ESPLANADA","666",8850
+"ESTORIL","667",2881
+"ESTRELA DALVA","668",6680
+"ETELVINA CARNEIRO","669",939
+"EUROPA","670",10648
+"EYMARD","671",6673
+"FILADELFIA","676",4498
+"FLAVIO MARQUES LISBOA","677",5457
+"FLORAMAR","678",17914
+"FLORESTA","679",17753
+"FREI EUSTAQUIO","680",5004
+"FREI LEOPOLDO","615",2630
+"FUNCIONARIOS","681",18575
+"GAMELEIRA","682",5295
+"GARCAS","807",317
+"GLALIJA","683",2161
+"GLORIA","684",20053
+"GORDURAS","685",8361
+"GOVERNADOR BENEDITO VALADARES","601",3276
+"GRAJAU","686",7117
+"GUARANI","687",6144
+"GUTIERREZ","689",17077
+"HAVAI","690",6052
+"HELIOPOLIS","691",3030
+"HORTO","692",9664
+"INCONFIDENCIA","693",3019
+"INDEPENDENCIA","694",12517
+"INDUSTRIAL RODRIGUES DA CUNHA","695",2903
+"INSTITUTO AGRONOMICO","696",7836
+"IPANEMA","697",3800
+"IPIRANGA","698",11449
+"ITAPUA","699",7571
+"JAQUELINE","700",8488
+"JARAGUA","701",3647
+"JARDIM AMERICA","702",23627
+"JARDIM ATLANTICO","653",3999
+"JARDIM DOS COMERCIARIOS","703",14312
+"JARDIM FELICIDADE","834",14749
+"JARDIM MONTANHES","704",15071
+"JARDIM VITORIA","831",7799
+"JARDINOPOLIS","705",2290
+"JATOBA","706",36127
+"JOAO PINHEIRO","707",11150
+"JULIANA","688",4235
+"LAGOA","708",5162
+"LAGOINHA","710",7426
+"LAGOINHA (VENDA NOVA)","709",6855
+"LEBLON","711",18784
+"LETICIA","712",9146
+"LIBERDADE","713",5588
+"LINDEIA","714",17370
+"LOURDES","715",16035
+"LUXEMBURGO","716",5903
+"MAGNESITA","717",6232
+"MANGABEIRAS","718",4391
+"MANTIQUEIRA","719",19969
+"MARAJO","720",2642
+"MARIA GORETTI","771",3106
+"MARIA HELENA","721",2155
+"MARIA VIRGINIA","816",1957
+"MARIZE","675",3232
+"MILIONARIOS","722",9420
+"MINAS BRASIL","723",1754
+"MINAS CAIXA","724",11040
+"MINASLANDIA","725",2699
+"MONSENHOR MESSIAS","726",4607
+"MORRO DAS PEDRAS","672",15234
+"MORRO DO PAPAGAIO","825",14244
+"NOVA BARROCA","727",4655
+"NOVA CACHOEIRINHA","824",8405
+"NOVA CINTRA","728",5894
+"NOVA ESPERANCA","729",4142
+"NOVA FLORESTA","730",4253
+"NOVA GAMELEIRA","731",9294
+"NOVA GRANADA","732",4094
+"NOVA PAMPULHA","733",780
+"NOVA SUISSA","734",17113
+"NOVA VISTA","735",8432
+"NOVO SAO LUCAS","736",5110
+"OLARIA","833",4363
+"OLHOS D AGUA","737",3041
+"OURO PRETO","738",10221
+"PADRE EUSTAQUIO","739",28325
+"PALMARES","740",3482
+"PALMEIRAS","741",8299
+"PAQUETA","743",1799
+"PARAISO","744",10230
+"PARQUE DAS MANGABEIRAS","902",2358
+"PATROCINIO","745",1813
+"PAULO VI","905",4491
+"PEDREIRA PRADO LOPES","746",9361
+"PEDRO II","747",5730
+"PINDORAMA","748",5736
+"PIRAJA","749",5405
+"PLANALTO","750",13614
+"POMPEIA","751",8099
+"PONGELUPE","823",2008
+"PRADO","752",10166
+"PRIMAVERA","753",1107
+"PRIMEIRO DE MAIO","754",13544
+"PROVIDENCIA","756",12493
+"REGINA","757",4758
+"RENASCENCA","758",9378
+"RIBEIRO DE ABREU","759",20162
+"RIO BRANCO","818",6602
+"SAGRADA FAMILIA","760",32291
+"SALGADO FILHO","761",10861
+"SANTA AMELIA","762",8524
+"SANTA BRANCA","829",4500
+"SANTA CRUZ","763",5061
+"SANTA CRUZ (BARREIRO DE CIMA)","764",4406
+"SANTA EFIGENIA","765",23850
+"SANTA HELENA","766",6244
+"SANTA INES","767",8628
+"SANTA LUCIA","768",6891
+"SANTA MARIA","770",5566
+"SANTA MONICA","772",27689
+"SANTA ROSA","773",5004
+"SANTA TEREZA","774",10241
+"SANTA TEREZINHA","775",12676
+"SANTO AGOSTINHO","776",7537
+"SANTO ANDRE","777",11267
+"SANTO ANTONIO","778",21915
+"SAO BENTO","779",4531
+"SAO BERNARDO","780",13174
+"SAO CRISTOVAO","781",6349
+"SAO FRANCISCO","782",5729
+"SAO GABRIEL","783",35801
+"SAO GERALDO","784",20297
+"SAO JOAO BATISTA","786",10276
+"SAO JOAO BATISTA (VENDA NOVA)","785",13265
+"SAO JOSE","640",1093
+"SAO JOSE","787",12673
+"SAO LUCAS","788",5724
+"SAO LUIZ","641",4516
+"SAO MARCOS","789",11181
+"SAO PAULO","791",12121
+"SAO PAULO (VENDA NOVA)","790",32100
+"SAO PEDRO","792",5236
+"SAO SALVADOR","793",11371
+"SAO TOMAZ","794",6053
+"SARANDI","795",10233
+"SAUDADE","796",13820
+"SERRA","797",21538
+"SERRA VERDE","799",14019
+"SERRANO","798",8112
+"SION","801",18816
+"SOLIMOES","802",1583
+"SUMARE","674",2821
+"TAQUARIL","803",13804
+"TEIXEIRA DIAS","804",8458
+"TIROL","805",20474
+"TREVO","827",341
+"TUPI","806",24555
+"UFMG","633",211
+"UNIAO","808",13047
+"UNIVERSITARIO","809",3684
+"VALE DO JATOBA","832",8412
+"VENDA NOVA","810",18170
+"VERA CRUZ","811",22051
+"VILA BRASILIA","812",10920
+"VILA CAFEZAL","826",29008
+"VILA CEMIG","673",3334
+"VILA CLORIS","813",3621
+"VILA OESTE","814",4863
+"VILA PARIS","815",4134
+"VILA VIRGINIA","817",1738
+"VISTA ALEGRE","819",17227
+"WASHINGTON PIRES","755",1225
+"XANGRILA","820",194
+"ZONA RURAL","901",2709
+"ZONA RURAL - SERRA DO CURRAL","903",13577
diff --git a/examples/data/BairroBH.MIF b/examples/data/BairroBH.MIF
new file mode 100755
index 0000000..5b56394
--- /dev/null
+++ b/examples/data/BairroBH.MIF
@@ -0,0 +1,19189 @@
+Version 300
+Charset "WindowsLatin1"
+Delimiter ","
+Index 1
+CoordSys Earth Projection 8, 92, "m", -45, 0, 0.9996, 500000, 10000000 Bounds (-7745874.38492, 1999.40969607) (8745874.38492, 19998000.5903)
+Columns 3
+  nobai Char(49)
+  CDBAI Char(3)
+  pop_estim Integer
+Data
+
+Region  1
+  52
+612711.24 804892.23
+612676.53 804879.46
+612547.32 804802.54
+612474.15 804736.89
+612413.58 804792.38
+612399.6 804829.51
+612386.73 804890.97
+612371.78 804967.65
+612296.55 804950.28
+612263.04 804940.9
+612179.37 804712.57
+612077.61 804705.82
+612071.82 804784.91
+612060.73 804800.83
+611969.81 804934.62
+611957.32 804961.32
+611790.26 805226.43
+611868.61 805222.34
+611914.97 805215.41
+611959.74 805209.02
+612031.68 805199.96
+612066.31 805222.87
+612124.38 805275.99
+612175.26 805329.52
+612232.82 805388.14
+612261.59 805416.38
+612289.76 805420.21
+612344.19 805422.78
+612401.81 805428.38
+612467.29 805432.37
+612553.35 805441.71
+612678.58 805450.77
+612769.71 805430.12
+612858.17 805381.63
+613234.2 805154.47
+613218.29 805144.82
+613165.6 805112.29
+613120.12 805081.43
+613080.04 805048.94
+613042.28 804998.19
+613032.7 804979.95
+612987.38 804818.92
+612967.61 804822.29
+612942.39 804822.28
+612905.42 804819.88
+612877.94 804818.92
+612853.35 804818.43
+612839.85 804837.24
+612844.67 804862.31
+612824.42 804893.16
+612778.5 804900.67
+612711.24 804892.23
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 612512.05 805109.6
+Region  1
+  138
+608916.5 804023.17
+608727.71 804535.57
+608280.43 804976.11
+608267.23 805019.36
+608268.14 805060.33
+608276.11 805146.6
+608281.79 805231.96
+608285.89 805281.13
+608290.22 805339.63
+608295.23 805410.19
+608317.08 805450.25
+608343.49 805483.03
+608353.95 805502.12
+608371.25 805508.95
+608497.82 805472.52
+608731.38 805401
+608928.52 805350.47
+608976.78 805539.87
+609210.34 805476.11
+609209.63 805449.75
+609214.7 805422.42
+609222.85 805382.01
+609207.37 805350.6
+609192.35 805323.74
+609186.43 805306.89
+609179.83 805294.4
+609203.05 805283.93
+609255.86 805252.51
+609315.05 805205.16
+609341.44 805195.14
+609374.22 805192.86
+609369.67 805155.02
+609454.81 805134.54
+609523.1 805121.79
+609607.39 805106.52
+609733.96 805090
+609861.18 805077.29
+609900.44 805089.92
+609973.82 805152.79
+610054.41 805194.23
+610110.86 805202.88
+610140 805202.88
+610124.07 805151.43
+610099.81 805072.1
+610346.57 804987.83
+610464.94 804992.2
+610632.15 804898.9
+610683 804868.29
+610697.22 804857.93
+610721.33 804838.4
+610805.44 804748.99
+610844 804730.43
+611023.33 804657.88
+611382.27 804517.55
+611396.73 804561.67
+611568.97 804480.02
+611605.13 804462.67
+611709.26 804412.53
+611741.81 804441.45
+611756.75 804430.85
+611769.53 804421.93
+611781.1 804413.49
+611806.13 804396.81
+611826.05 804383.47
+611839.79 804400.28
+611816.17 804371.18
+611792.9 804356.35
+611756.99 804347.19
+611720.34 804342.37
+611673.72 804332.65
+611665.04 804309.5
+611648.16 804271.41
+611633.7 804240.06
+611614.41 804197.62
+611596.56 804153.25
+611588.36 804132.51
+611562.32 804124.8
+611542.55 804119.97
+611525.67 804114.19
+611504.21 804107.19
+611491.67 804102.37
+611475.28 804097.06
+611460.33 804092.24
+611448.75 804088.38
+611434.29 804083.56
+611399.57 804075.41
+611395.23 804110.61
+611396.68 804136.17
+611394.75 804164.14
+611394.27 804191.63
+611391.61 804232.38
+611388.23 804278.19
+611387.27 804325.46
+611373.77 804323.04
+611237.76 803938.43
+611173.87 803966.3
+611064.41 804006.84
+610954.97 804057.51
+610927.75 804059.42
+610902.44 804064.5
+610800.59 804113.26
+610686.72 804168.36
+610638.62 804178.51
+610596.24 804201.31
+610526.63 804214.63
+610486.07 804216.22
+610408.57 804245.18
+610252.51 804326.86
+610164.71 804261.46
+610072.57 804312.08
+609932.05 804393.5
+609814.23 804475.8
+609758.68 804514.33
+609751.81 804489.54
+609746.74 804469.23
+609580.84 804530.93
+609517.44 804557.42
+609492.71 804562.24
+609447.44 804550.68
+609403.61 804541.53
+609369.9 804525.15
+609403.85 804163.77
+609216.03 803973.06
+609211.94 803938.65
+609209.53 803898.68
+609136.33 803928.06
+609079.51 803954.06
+609037.13 803905.9
+609066.26 803823.83
+609074.93 803792.05
+609071.08 803771.34
+609057.6 803749.67
+609043.15 803729.44
+609028.22 803703.43
+609016.18 803730.89
+608993.06 803798.31
+608922.76 804007.76
+608916.5 804023.17
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 609754.23 804682.77
+Region  1
+  69
+603925.58 800180.38
+603931.33 800239.97
+603938.89 800297.21
+603960.32 800405.92
+603980.85 800501.62
+604004.24 800608.71
+604021.47 800697.34
+604034.4 800760.74
+604066.4 800914.04
+604068.52 800927.89
+604641.63 800402.4
+604717.44 800338.6
+604758.21 800306.51
+604855.81 800254.89
+604818.28 800175.73
+604784.45 800107.63
+604765.36 800065.56
+604746.05 800000.28
+604723.06 799925.67
+604676.62 799771.92
+604659.27 799700.05
+604634.75 799618.7
+604610.89 799582.26
+604577.92 799557.53
+604516.74 799531.49
+604502.21 799524.32
+604548.63 799429.3
+604621.88 799405.99
+604710.16 799380.02
+604722.4 799294.55
+604744.53 799130.12
+604824.36 799054.63
+604806.35 798871.75
+604863.62 798816.21
+604838.89 798787.57
+604819.15 798764.38
+604798.76 798742.26
+604790.52 798723.16
+604790.95 798700.6
+604759.71 798686.28
+604738.02 798677.17
+604727.61 798671.97
+604679.01 798727.5
+604631.29 798767.85
+604423.24 798855.26
+604393.11 798878.94
+604369.43 798914.45
+604307.02 799053.27
+604298.09 799081.15
+604151.09 799398.74
+604101.76 799513.96
+604089.98 799530.56
+604076.02 799548.84
+604029.34 799577.42
+603968.37 799603.78
+603929.63 799619.34
+603899.78 799640.61
+603885.65 799656.67
+603876.44 799664.93
+603855.8 799723.35
+603833.73 799826.09
+603826.27 799874.15
+603819.21 799915.62
+603806.14 799971.03
+603798.82 800007.63
+603835.42 800036.9
+603875.67 800075.06
+603904.15 800112.43
+603925.58 800180.38
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 604352.15 799829.41
+Region  1
+  20
+608017.05 795860.74
+608286.33 795846.18
+608304.77 795846.18
+608726.4 795929.63
+608755.03 795763.22
+608668.17 795446.5
+608607.32 795433.32
+608462.44 795398.35
+608284.4 795354.71
+607822.28 795240.98
+607724.01 795391.11
+607697.09 795435.98
+607665.07 795516.03
+607650.29 795586.62
+607655.63 795686.08
+607659.96 795810.28
+607656.08 795918.96
+607678.4 795911.2
+607777.86 795880.63
+608017.05 795860.74
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 608170.23 795613.77
+Region  1
+  28
+608045.21 799290.88
+608104.1 799248.45
+608121.72 799258.18
+608158 799254.71
+608192.64 799268.13
+608227.28 799303.63
+608196.54 799147.76
+608159.3 799132.17
+608119.89 799110.93
+608085.06 799098.29
+607959.7 799038.66
+607883.49 799004.02
+607881.33 799062.04
+607849.29 799013.11
+607813.14 798962.21
+607811.19 798927.32
+607787.81 798916.93
+607770.92 798910
+607678.27 798868.87
+607651.86 798855.01
+607650.72 798892.91
+607650.25 798958.63
+607649.47 798996.84
+607648.17 799102.92
+607676.75 799109.41
+607858.38 799246.06
+607985.89 799337.64
+608045.21 799290.88
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 607901.58 799120.1
+Region  1
+  124
+604282.24 796153.99
+604377.36 796086.2
+604445.11 796037.46
+604408.91 795986.98
+604385.24 795953.48
+604375.11 795921.68
+604364.28 795886.48
+604347.78 795826.79
+604327.59 795795.08
+604316.82 795776.72
+604283.9 795753.3
+604256.67 795732.41
+604226.91 795706.45
+604215.44 795675.24
+604214.4 795644.87
+604215.1 795610.67
+604217.89 795553.77
+604219.63 795513.98
+604218.41 795489.36
+604174.78 795532.99
+604147.21 795561.62
+604098.35 795606.64
+604035.87 795647.83
+603972.35 795670.52
+603954.55 795674.36
+603933.78 795681.12
+603918.07 795683.91
+603838.49 795684.61
+603709.7 795669.95
+603622.97 795654.06
+603482.28 795647.03
+603396.55 795676.4
+603298.75 795739.12
+603154.81 795843.25
+603037.05 795881.61
+602961.98 795882.28
+602892.97 795865.56
+602827.14 795841.04
+602785.65 795821.36
+602729.34 795792.63
+602528.08 795670.13
+601865.86 795232.56
+601875.2 795319.19
+601879.45 795409.22
+602086.68 795502.65
+602108.34 795528.55
+602234.88 795616.03
+602244.23 795638.11
+602244.65 795674.2
+602224.69 795708.17
+602200.69 795791.17
+602161.2 795869.3
+602140.6 795909.46
+602098.56 795989.29
+602082.21 796022.59
+602057.16 796103.7
+602057.8 796138.76
+602063.32 796176.55
+602070.96 796233.46
+602078.81 796261.7
+602100.9 796316.05
+602130.4 796384.66
+602192.61 796510.18
+602231.68 796580.25
+602361.41 796685.77
+602431.06 796694.68
+602474.37 796689.16
+602493.48 796743.94
+602397.93 796799.15
+602302.18 796903.82
+602270.33 796930.99
+602280.1 796964.12
+602342.52 796912.73
+602489.87 796827.38
+602557.82 796805.3
+602677.36 796769.42
+602895.78 796705.19
+602974.51 796679.78
+603030.18 796663.69
+603108.28 796639.77
+603109.53 796556.42
+603119.69 796378.26
+603127.07 796352.67
+603224.44 796238.18
+603301.18 796151.93
+603354.91 796109.6
+603434.49 796066.21
+603408.88 796016.87
+603383.91 795976.02
+603346.24 795930.54
+603314.02 795895.34
+603342.17 795850.04
+603365.02 795814.11
+603397.19 795776.86
+603432.54 795770.72
+603478.47 795774.11
+603506.41 795788.92
+603527.37 795818.13
+603574.8 795917.97
+603590.89 795953.95
+603600.62 795984.85
+603605.92 796002.03
+603569.72 796068.01
+603591.52 796079.87
+603632.8 796104.63
+603693.55 796140.55
+603755.99 796173.99
+603795.79 796191.75
+603820.35 796215.25
+603847.23 796244.46
+603860.57 796258.48
+603870.15 796267.2
+603971.37 796296.39
+603985.97 796264
+603992.96 796260.83
+603997.49 796256.84
+604000.64 796254.84
+604016.33 796245.91
+604035.38 796228.13
+604093.48 796244.32
+604111.26 796272.9
+604173.81 796232.89
+604225.72 796193.68
+604282.24 796153.99
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 603010.9 796093.07
+Region  1
+  58
+603754.53 797528.56
+603744.72 797566.48
+603786.95 797646.5
+603802.51 797756.67
+603803.78 797818.67
+603742.82 797850.42
+603783.46 797848.87
+603860.61 797890.46
+603904.11 797943.17
+603911.41 797958.39
+603922.21 797980.93
+603929.19 797999.03
+603932.37 798007.92
+603936.81 798018.4
+603939.99 798028.24
+603943.48 798040.63
+603977.13 798070.47
+604024.76 798024.43
+604053.05 797978.38
+604073.02 797939.34
+604077.78 797903.14
+604101.81 797876.11
+604114.51 797864.04
+604135.1 797842.04
+604153.85 797826.23
+604204.42 797779.97
+604244.8 797740.38
+604191.08 797730.58
+604159.34 797723.13
+604174.24 797707.84
+604187.18 797696.08
+604197.39 797686.28
+604216.21 797669.03
+604222.29 797663.33
+604229.34 797657.06
+604238.35 797649.22
+604243.84 797644.12
+604260.7 797630.01
+604287.86 797609.34
+604280.24 797594.52
+604233.47 797533.99
+604165.61 797470.38
+604160.5 797460.38
+604126.64 797426.33
+604089.17 797366
+604051.07 797308.85
+603990.75 797295.52
+603956.46 797298.69
+603933.6 797303.77
+603901.85 797312.03
+603875.18 797327.27
+603854.22 797349.49
+603827.55 797354.57
+603789.55 797350.19
+603753.26 797349.49
+603693.57 797403.47
+603721.51 797472.05
+603754.53 797528.56
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 603977.82 797631.45
+Region  1
+  59
+614846.87 802270.79
+614856.35 802317.82
+614858.95 802364.44
+614857.22 802443.18
+614850.85 802504.56
+614835.51 802581.86
+614801.63 802743.12
+614806.84 802798
+614813.79 802802.18
+614838.11 802803.92
+614860.11 802726.9
+614879.22 802663.21
+614941.47 802691.88
+615005.74 802716.78
+615041.35 802731.54
+615069.14 802741.38
+615096.36 802751.86
+615121.83 802757.65
+615181.47 802746.07
+615260.51 802729.02
+615327.1 802716.86
+615331.73 802679.8
+615346.78 802642.17
+615379.21 802591.79
+615409.32 802606.27
+615429.58 802613.22
+615455.06 802623.06
+615481.41 802632
+615508.91 802568.58
+615519.33 802510.1
+615522.81 802424.41
+615530.34 802382.14
+615522.23 802308.02
+615512.97 802253.01
+615493.28 802235.64
+615424.38 802198.58
+615407.87 802187.29
+615362.13 802107.38
+615413.08 802082.49
+615361.55 802007.21
+615359.53 801986.08
+615341 801958.86
+615295.26 801900.38
+615258.78 801847.69
+615217.98 801793.84
+615168.19 801786.55
+615124.12 801803.99
+615064.82 801847.12
+614936.41 801903.24
+614775.01 801939.05
+614703.66 801981.23
+614723.69 801991.04
+614751.55 802004.58
+614792.08 802056.69
+614801.93 802077.54
+614806.27 802102.11
+614820.77 802149.96
+614833.77 802208.96
+614846.87 802270.79
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 615135.75 802300.57
+Region  1
+  42
+612692.29 793449.16
+612630.05 793435.51
+612576.54 793402.02
+612483.82 793344.23
+612414.18 793298.68
+612346.55 793277.09
+612279.24 793286.29
+612136.88 793314.08
+612101.64 793309
+611860.96 793947.03
+611896.98 794073.48
+612042.44 794612.37
+612109.11 794445.47
+612106.46 794420.99
+612089.77 794355.97
+612131.32 794343.71
+612181.72 794311.7
+612184.44 794296.03
+612308.72 794239.55
+612346.8 794183.01
+612434.31 794142.47
+612495.85 794107.08
+612550.29 794048.49
+612556.05 794033.49
+612573.76 794008.03
+612709.53 793881.16
+612739.53 793853.09
+612754.91 793866.93
+612783.76 793895.78
+612785.68 793793.86
+612801.83 793816.93
+612827.22 793833.09
+612901.83 793828.86
+612931.45 793816.55
+612949.53 793780.78
+612890.3 793750.01
+612852.22 793719.62
+612825.33 793677.45
+612825.49 793560.45
+612792.79 793490.59
+612746.58 793462.18
+612692.29 793449.16
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 612312.8 793804.7
+Region  1
+  52
+609675.48 799987.34
+609597.92 799951.29
+609606.06 799843.8
+609527.1 799839.9
+609141.9 799768.55
+609129.08 799836.55
+609127.49 799836.23
+609072.4 800120.73
+609195.97 800274.02
+609272.98 800382.23
+609313.13 800447.28
+609347.54 800496.82
+609385.62 800538.8
+609409.12 800561.03
+609433.32 800582.28
+609495.72 800632.98
+609524.51 800659.71
+609630.83 800659.6
+609682.44 800666.25
+609719.15 800695.15
+609748.51 800711.9
+609767.09 800715.8
+609808.15 800713.5
+609838.65 800708.04
+609848.17 800691.39
+609866.39 800666.14
+609876.55 800653.76
+609898.97 800616.45
+609951.77 800534.27
+609961.37 800520.73
+609968.99 800505.8
+609975.98 800489.61
+609982.33 800471.83
+609989.63 800449.29
+609992.81 800435.32
+609995.66 800417.54
+609997.23 800398.9
+609999.94 800369.81
+609998.9 800342.36
+609995.79 800315.42
+609991.65 800293.66
+609977.66 800238.23
+609971.34 800206.34
+609966.01 800183.57
+609960.45 800153.43
+609958.76 800137.98
+609957.73 800124.52
+609957.36 800115.13
+609908.94 800085.19
+609898.71 800089.1
+609783.95 800036.08
+609675.48 799987.34
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 609547.02 800238.65
+Region  1
+  64
+609010.03 800456.56
+609060.72 800407.82
+609086.07 800336.17
+609145.03 800215.29
+609072.4 800120.73
+608987.59 800037.38
+608953.96 800000.82
+608921.78 799930.63
+608889.61 799866.78
+608865.67 799820.9
+608840.32 799782.88
+608680.45 799841.37
+608561.05 799890.77
+608536.17 799904.74
+608440.63 799975.91
+608438.68 800062.67
+608401.28 800173.67
+608362.71 800227.15
+608457.22 800329.26
+608464.83 800338.85
+608447.97 800355.37
+608412.28 800388.75
+608382.87 800413.87
+608395.09 800424.77
+608485.48 800524.34
+608585.45 800634.84
+608511.92 800701.43
+608498.72 800715.39
+608509.33 800735.4
+608508.73 800761.97
+608495.46 800777.8
+608480.32 800817.66
+608462.88 800838.47
+608448.09 800861.96
+608420.27 800885.39
+608384.11 800931.99
+608394.37 800943.39
+608365.86 800977.6
+608363.2 800990.14
+608370.05 801004.2
+608370.43 801040.3
+608447.19 801073.74
+608571.84 801115.17
+608785.94 801189.83
+608996.76 801256.5
+608934.53 801182.21
+608907.23 801148.55
+608855.16 801094.58
+608828.49 801063.46
+608810.07 801042.12
+608837.37 801018.73
+608796.74 800988.53
+608752.05 800957.97
+608738.77 800937.9
+608731.94 800912.55
+608731.94 800886.23
+608748.03 800801.91
+608824.55 800726.85
+608886.72 800662.26
+608901.34 800638.37
+608933.28 800575.74
+608949.85 800509.94
+608961.77 800488.24
+609010.03 800456.56
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 608711.26 800440.68
+Region  1
+  69
+612222.84 799151.62
+612209.18 799081.44
+612186.64 799038.26
+612155.37 799002.48
+612115.67 798970.73
+612028.03 798934.85
+611915.51 798900.25
+611829.34 798868.79
+611782.83 798852.38
+611723.1 799028.37
+611683.17 799148.47
+611659.04 799221.5
+611636.65 799286.46
+611625.06 799326.03
+611623.47 799413.99
+611618.86 799438.61
+611602.81 799465.77
+611567.25 799526.35
+611548.68 799562.57
+611517.42 799640.34
+611493.39 799700.73
+611466.82 799730.04
+611439.07 799748.8
+611410.55 799775.37
+611393.74 799803.51
+611387.68 799836.99
+611391.98 799932.34
+611402.53 799915.15
+611409.56 799899.91
+611426.95 799858.31
+611452.36 799806.63
+611480.5 799778.11
+611572.72 799739.81
+611597.14 799700.13
+611604.18 799652.84
+611613.16 799626.66
+611630.75 799598.13
+611662.79 799564.14
+611702.07 799564.25
+611808.37 799585.36
+611813.45 799599.82
+611899.23 799646.9
+611939.48 799669.18
+611963.31 799680.12
+611974.26 799686.76
+612035.61 799703.18
+612088.8 799716.41
+612138 799730.14
+612165.5 799740.25
+612173.6 799745.26
+612171.45 799753.01
+612165.85 799767.21
+612141.75 799811.98
+612113.33 799864.93
+612099.13 799904.11
+612123.92 799905.92
+612173.94 799892.64
+612204.3 799892.7
+612239.59 799899.67
+612298.99 799915.69
+612304.65 799887.75
+612312.86 799865.08
+612325.36 799827.18
+612328.88 799770.12
+612318.09 799680.29
+612303.8 799612.97
+612273.32 799442.82
+612249.51 799276.73
+612222.84 799151.62
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 611955.94 799378.49
+Region  1
+  175
+604487.77 793061.44
+604548.09 793043.03
+604643.62 793004.4
+604734.15 792979.53
+604798.28 792957.94
+604878.41 792928.48
+604921.47 792912.85
+604947.51 792908.41
+604941.79 792889.36
+604931.63 792823.95
+604968.46 792827.13
+604998.31 792827.76
+605031.33 792829.03
+605026.25 792804.27
+605018.63 792768.07
+605010.43 792731.69
+604940.26 792754.23
+604887.56 792752.33
+604817.71 792691.68
+604895.5 792528.79
+604877.41 792398.6
+604833.59 792362.1
+604871.69 792351.27
+604904.71 792289.11
+604946.62 792289.11
+604933.92 792207.83
+604897.09 792188.78
+604902.17 792164.65
+604935.19 792165.92
+604975.83 792112.58
+605005.04 792099.88
+605041.17 792105.16
+605066.15 792092.47
+605103.82 792083.79
+605154.2 792084.28
+605184.68 792077.93
+605193.57 792070.94
+605196.32 792056.76
+605187.01 792046.7
+605163.3 792056.65
+605155.47 792055.38
+605148.06 792037.17
+605183.83 792001.83
+605159.28 791988.28
+605138.75 791974.52
+605137.05 791964.79
+605173.46 791943.2
+605174.52 791929.65
+605170.71 791914.41
+605164.99 791904.67
+605160.76 791893.24
+605148.48 791866.36
+605211.02 791815.01
+605297.49 791745.34
+605431.37 791635.87
+605481.01 791590.2
+605549.69 791515.55
+605608.64 791439.27
+605658.59 791362.15
+605711.4 791281.99
+605770.88 791189.79
+605819.77 791096.23
+605858.47 790927.44
+605880.53 790820.69
+605914.51 790740.51
+605964.99 790680.45
+605998.43 790656.59
+606054.95 790628.44
+606158.14 790585.72
+606033.66 790429.92
+605958.57 790404.18
+605894.86 790398.04
+605861.4 790407.7
+605813.13 790386.37
+605805.01 790387.17
+605798.44 790373.2
+605800.14 790356.48
+605758.44 790343.35
+605754.63 790351.61
+605750.83 790358.56
+605743.2 790377.59
+605727.01 790397.59
+605711.77 790409.66
+605673.67 790418.87
+605622.24 790430.93
+605601.6 790447.44
+605584.77 790479.51
+605536.19 790561.79
+605512.38 790569.72
+605473.01 790569.72
+605430.46 790590.99
+605334.58 790646.87
+605329.5 790665.6
+605312.35 790664.02
+605271.4 790661.81
+605256.79 790668.8
+605241.23 790703.41
+605223.45 790742.78
+605210.12 790755.16
+605184.72 790778.66
+605149.16 790811.37
+605106.3 790850.74
+605065.34 790888.49
+605093.28 790928.82
+605055.5 790954.85
+605030.73 790973.9
+604993.9 791001.88
+604942.46 791059.35
+604930.4 791081.26
+604855.79 791286.42
+604781.49 791494.7
+604805.3 791501.69
+604832.92 791508.99
+604858.64 791515.34
+604893.24 791522.65
+604924.99 791529.95
+604945.95 791533.76
+604975.79 791541.38
+605012.94 791549.64
+605018.34 791660.19
+604972.92 791778.04
+604913.23 791910.76
+604713.52 791734.26
+604641.44 791791.7
+604630.65 791802.5
+604622.07 791827.93
+604590.63 791932.7
+604557.61 792039.09
+604526.49 792144.21
+604524.31 792191.66
+604522.68 792227.71
+604477.55 792235.35
+604412.15 792246.78
+604353.73 792258.84
+604248.95 792277.89
+604168.01 792293.52
+604194.98 792477.92
+604221.06 792552.14
+604242.65 792586.43
+604287.73 792576.9
+604409.02 792557.22
+604462.99 792550.23
+604509.98 792541.98
+604479.5 792589.6
+604440.77 792646.12
+604358.06 792733.45
+604205.82 792761.02
+604247 792856.13
+603541.73 792708.49
+603535.38 792700.24
+603423.95 792677.01
+603406.17 792687.17
+603314.74 792771.62
+603276.01 792802.1
+603219.49 792864.33
+603187.11 792939.26
+603189.01 793009.74
+603204.25 793088.48
+603261.59 793180.23
+603346.4 793224.53
+603435.63 793235.28
+603527.39 793227.68
+603619.15 793211.22
+603710.28 793199.2
+603775.28 793197.97
+603925.14 793218.93
+603993.72 793219.56
+604210.89 793146.54
+604283.28 793121.77
+604292.79 793118.59
+604299.77 793115.42
+604308.03 793110.34
+604377.24 793090.65
+604374.7 793097.64
+604487.77 793061.44
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 604793.23 791945.3
+Region  1
+  52
+609459.87 791813.23
+609454.25 791709.36
+609461.23 791660.81
+609400.27 791650.65
+609387.57 791582.7
+609377.41 791575.72
+609355.19 791545.24
+609325.98 791508.41
+609296.77 791482.37
+609277.72 791472.85
+609256.76 791480.47
+609244.06 791498.88
+609232.63 791482.37
+609222.47 791467.77
+609214.85 791455.07
+609033.06 791439.49
+608885.11 791330.59
+608905.75 791287.73
+608862.25 791271.54
+608828.28 791282.97
+608742.87 791362.98
+608615.55 791487.47
+608610.79 791516.37
+608622.4 791606.13
+608563.41 791672.51
+608511.34 791781.74
+608706.28 791870.34
+608683.11 791923.05
+608736.76 791937.33
+608789.47 791970.67
+608833.92 792023.66
+608877.73 792010.01
+608908.53 792010.33
+608973.94 792015.41
+609012.36 792015.4
+609030.77 792021.75
+609046.65 792032.86
+609071.73 792049.38
+609056.81 792065.22
+609048.87 792076.65
+609037.44 792121.1
+609094.15 792134.09
+609105.13 792135.65
+609169.27 792139.46
+609224.2 792130.26
+609265.34 792113.9
+609317.1 792080.56
+609360.6 792031.35
+609450.46 792057.7
+609472.2 792006.42
+609475.21 791908.12
+609459.87 791813.23
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 609024.61 791733.53
+Region  1
+  123
+614878.82 796162.9
+615175.36 796495.68
+615216 796537.91
+615256.32 796579.82
+615172.18 796556.01
+615162.34 796563.31
+615151.86 796582.68
+615115.04 796618.24
+615116.47 796724.56
+615109.32 796891.63
+615092.81 796917.07
+615147.42 796926.28
+615203.93 796935.49
+615238.22 796972.32
+615262.04 796943.74
+615294.11 796873.22
+615321.8 796799.53
+615357.04 796754.76
+615489.42 796780.46
+615499.6 796931.62
+615501.19 796953.21
+615504.05 796972.26
+615505.63 796988.77
+615507.74 797003.12
+615513.25 797095.45
+615536.75 797105.92
+615563.73 797117.35
+615592.63 797129.74
+615648.19 797143.71
+615691.26 797132.34
+615755.44 797092.3
+615799.85 797079.48
+615881.15 797085
+616011.01 797097.54
+616052.62 797087.34
+616080.32 797069.37
+616109.95 797026.13
+616119.48 796963.9
+616101.41 796910.16
+616075.27 796869.87
+616034.63 796784.14
+616043.74 796731.02
+616051.14 796702.86
+616057.49 796678.73
+616063.84 796660.35
+616072.73 796637.49
+616101.94 796550.5
+616044.15 796393.6
+616513.17 796181.05
+616552.4 796134.85
+616593.51 796066.49
+616646.03 796017.76
+616636.02 796003.67
+616585.42 795931.11
+616596.85 795836.23
+616612.5 795720.29
+616657.15 795663.77
+616698.64 795612.31
+616765.1 795531.25
+616779.49 795531.61
+616872.62 795531.39
+616927.23 795530.33
+616961.31 795531.17
+617008.52 795527.27
+616973.04 795453.21
+616921.12 795400.03
+616867.29 795325.97
+616812.84 795263.3
+616753.95 795204.43
+616676.06 795118.96
+616615.27 795040.47
+616590.56 794969.57
+616593.07 794911.97
+616621.53 794848.05
+616663.91 794794.89
+616697.75 794769.96
+616728.17 794756.44
+616755.82 794735.86
+616703.7 794652.44
+616577.42 794614.34
+616510.59 794668.88
+616438.76 794667.95
+616426.78 794689.46
+616405.63 794693.58
+616313.24 794722.05
+616186.65 794731.52
+616016.4 794765.68
+615967.68 794795.42
+615955.67 794842.89
+615936.08 794937.2
+615896.88 795038.47
+615811.46 795117.57
+615700.09 795183.39
+615437.67 794783.49
+615296.7 794902.87
+615125.55 795050.77
+615116.03 795096.49
+615108.26 795125.07
+615085.29 795212.61
+615034.49 795230.39
+614977.34 795253.25
+615001.37 795316.21
+614985.56 795338.99
+614956.39 795406.19
+614830.02 795705.27
+614588.08 795561.83
+614576.02 795545.32
+614472.51 795483.09
+614316.94 795512.93
+614189.3 795507.21
+614189.3 795528.17
+614187.98 795986.72
+614271.8 795987.99
+614325.14 795982.91
+614335.93 795978.47
+614361.33 795979.74
+614398.43 795981.36
+614444.01 795989.6
+614493.37 795988.34
+614566.8 796001.64
+614661.75 796008.62
+614751.22 796043.24
+614878.82 796162.9
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 615690.6 795803.9
+Region  1
+  158
+604366.78 804044.43
+604471.39 804148.41
+604298.09 804342.62
+604294.09 804350.98
+604363.18 804390.25
+604399.54 804430.98
+604470.26 804550.46
+604493.9 804584.64
+604535.71 804597.73
+604736.97 804625.18
+604807.52 804633.55
+604843.53 804623.36
+604874.98 804603.18
+604901.89 804563.9
+604909.52 804541.72
+604924.61 804493.2
+604943.52 804433.19
+604947.52 804376.84
+604937.34 804311.74
+604930.79 804274.28
+604899.98 804104.2
+604910.78 804023.62
+604983.87 803725.41
+604981.33 803664.72
+605106.78 803609.06
+605307.02 803714.61
+605341.5 803818.84
+605294.13 803862.04
+605259.24 803906.91
+605250.1 803954.27
+605260.07 804001.62
+605282.5 804058.95
+605290.4 804180.67
+605302.86 804366.77
+605309.51 804394.19
+605324.47 804409.98
+605337.76 804418.28
+605352.71 804429.92
+605384.92 804455.25
+605439.63 804494.43
+605483.85 804533.23
+605523.04 804581.72
+605550.19 804634.49
+605592.49 804781.49
+605605.26 804825.77
+605628.57 804850.55
+605655.73 804858.7
+605684.05 804853.65
+605707.33 804835.81
+605721.3 804788.47
+605728.29 804727.55
+605755.84 804680.6
+605790.37 804649.56
+605823.15 804632.27
+605864.28 804624.9
+605971.76 804641.97
+606056.15 804660.81
+606110.47 804673.62
+606157.03 804683.71
+606198.16 804683.71
+606249.96 804668.42
+606291.08 804642.03
+606334.54 804603.23
+606364.03 804563.66
+606374.31 804520.8
+606377.41 804451.73
+606392.74 804421.28
+606424.95 804398
+606462.19 804390.24
+606499.44 804400.33
+606521.95 804416.24
+606540.33 804431.78
+606568.51 804469.39
+606616.82 804491.73
+606677.34 804481.65
+606770.85 804411.8
+606825.17 804365.63
+606846.32 804330.09
+606854.47 804293.23
+606843.41 804243.8
+606730.7 804023.57
+606679.68 803922.1
+606641.84 803825.27
+606647.66 803787.24
+606665.12 803759.31
+606656.59 803720.12
+606647.9 803682.85
+606635.35 803632.66
+606625.42 803581.43
+606610.78 803523.41
+606604.95 803473.26
+606605.03 803427.74
+606614.19 803398.73
+606646.08 803329.73
+606497.89 803102.08
+606375.57 802865.27
+606266.06 802882.25
+606205.45 802904.07
+606151.32 802926.95
+606074.48 802960.93
+606036.57 802980.01
+605992.66 802999.35
+605962.86 803012.42
+605940.91 803036.47
+605918.43 803022.35
+605880.79 803003.01
+605815.45 802970.6
+605788.78 802964.33
+605722.57 802979.61
+605613.39 803005.36
+605513.02 803025.75
+605501 803009.02
+605361.71 803029.15
+605303.16 803035.94
+605268.66 803037.51
+605267.09 803045.35
+605255.07 803064.17
+605234.68 803100.76
+605215.86 803131.61
+605157.31 803102.33
+605149.2 803057.11
+605149.73 803024.7
+605168.02 802978.18
+605176.91 802953.61
+605166.45 802930.6
+605142.93 802945.76
+604978.78 803051.88
+604931.74 803101.55
+604496.31 802887.67
+604431.69 803016.92
+604416.3 803049.54
+604359.68 803023.08
+604320.29 803002.15
+604288.9 802983.07
+604188.88 803185.22
+604146.41 803173.52
+604097.79 803180.91
+604051.01 803165.52
+604005.47 803144.6
+603962.39 803122.44
+603919.3 803092.28
+603887.91 803069.51
+603852.22 803039.96
+603824.52 803019.04
+603798.36 802998.42
+603784.82 802996.57
+603773.12 802986.73
+603746.66 803010.73
+603726.35 803032.89
+603694.96 803063.05
+603663.25 803094.74
+604547.04 803934.26
+604516.71 803972.24
+604476.23 804001.36
+604436.37 804016.56
+604402.2 804025.44
+604378.15 804028.61
+604366.78 804044.43
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 605479.21 803744.22
+Region  1
+  229
+603174.97 791627.83
+603266.43 791732.62
+603336.92 791844.39
+603375.03 791935.21
+603375.97 791959.04
+603323.57 792132.75
+603300.4 792190.22
+603306.11 792237.85
+603421.7 792359.79
+603430.59 792432.82
+603296.31 792603.34
+603406.17 792687.17
+603423.95 792677.01
+603535.38 792700.24
+603541.73 792708.49
+604247 792856.13
+604205.82 792761.02
+604358.06 792733.45
+604440.77 792646.12
+604479.5 792589.6
+604509.98 792541.98
+604462.99 792550.23
+604409.02 792557.22
+604287.73 792576.9
+604242.65 792586.43
+604221.06 792552.14
+604194.98 792477.92
+604168.01 792293.52
+604248.95 792277.89
+604353.73 792258.84
+604412.15 792246.78
+604477.55 792235.35
+604522.68 792227.71
+604524.31 792191.66
+604526.49 792144.21
+604557.61 792039.09
+604590.63 791932.7
+604622.07 791827.93
+604630.65 791802.5
+604641.44 791791.7
+604713.52 791734.26
+604913.23 791910.76
+604972.92 791778.04
+605018.34 791660.19
+605012.94 791549.64
+604975.79 791541.38
+604945.95 791533.76
+604924.99 791529.95
+604893.24 791522.65
+604858.64 791515.34
+604832.92 791508.99
+604805.3 791501.69
+604781.49 791494.7
+604855.79 791286.42
+604930.4 791081.26
+604845.98 791040.7
+604271.3 790718.45
+604242.09 790748.3
+604193.19 790748.3
+604157.31 790733.05
+604131.91 790741.31
+604092.07 790671.94
+604055.08 790591.45
+604015.07 790481.91
+603989.7 790377.14
+603963.03 790207.59
+603653.82 790031.88
+603556.42 790420.75
+602988.37 790293.74
+603005.3 790207.59
+602967.75 790198.02
+602919.89 790188.45
+602855.1 790180.35
+602846.26 790172.99
+602805.38 790144.64
+602722.91 790192.5
+602634.55 790244.78
+602551.35 790308.1
+602439.43 790275.7
+602432.8 790305.89
+602419.92 790373.26
+602399.31 790462.36
+602388.26 790512.43
+602250.57 790481.5
+602270.84 790386.88
+602326.06 790157.15
+602367.3 790118.86
+602359.93 790102.67
+602256.85 790084.26
+602189.11 790068.06
+602150.52 790059.94
+602260.62 789554.65
+602176.63 789505.63
+602103.29 789478.96
+602054.08 789457.08
+601975.02 789486.29
+601911.2 789509.15
+601823.58 789537.7
+601683.88 789499.28
+601631.81 789482.42
+601585.14 789464.64
+601520.37 789448.13
+601462.26 789436.7
+601413.05 789426.23
+601335.1 789389.72
+601290.84 789358
+601201.94 789281.48
+601195.59 789265.61
+601177.81 789300.85
+601157.8 789315.46
+601140.66 789321.49
+601125.1 789327.2
+601154.95 789335.46
+601182.55 789360.58
+601188.28 789371.34
+601198.13 789385.94
+601198.13 789402.45
+601195.59 789424.68
+601183.52 789472.31
+601160.97 789539.3
+601161.29 789559.94
+601171.13 789592.01
+601167.01 789607.57
+601141.29 789626.63
+601073.35 789681.24
+601049.22 789707.6
+601041.28 789728.23
+601044.08 789742.87
+601043.19 789751.09
+601047.63 789769.51
+601044.46 789774.91
+601043.47 789795.4
+601041.57 789811.86
+601046 789831.73
+601048.54 789845.7
+601052.04 789862.84
+601055.53 789883.16
+601110.92 789903.97
+601104.57 789923.33
+601102.03 789947.15
+601104.89 789975.41
+601113.78 789989.38
+601136.32 790015.73
+601097.91 790022.08
+601070.14 790019.48
+600944.84 789980.44
+600912.45 789963.29
+600856.79 789915.64
+600814.02 789883.27
+600765.11 789862.31
+600725.74 789861.04
+600655.85 789888.38
+600562.2 789934.42
+600611.74 790039.21
+600619.99 790081.76
+600617.45 790116.06
+600628.86 790142.07
+600629.54 790128.04
+600719.07 790086.21
+600784.16 790071.9
+600850.21 790071.9
+600934.04 790089.04
+601012.79 790128.42
+601053.44 790160.81
+601097.26 790211.62
+601153.47 790302.15
+601304.31 790546.99
+601334.79 790610.5
+601397.99 790796.29
+601445.62 790859.8
+601517.38 790911.24
+601606.62 790939.51
+601698.71 790936.97
+601711.41 790945.23
+601708.23 791000.48
+601687.91 791029.7
+601705.69 791048.11
+601723.16 791044.66
+601758.73 791028.15
+601776.51 791039.58
+601805.72 791076.41
+601834.3 791084.67
+601849.55 791082.13
+601871.77 791070.7
+601892.73 791073.24
+601921.95 791113.88
+601965.77 791139.92
+601986.73 791172.95
+601996.25 791215.5
+602012.13 791259.95
+602037.53 791259.95
+602068.02 791271.39
+602125.49 791290.15
+602145.18 791318.73
+602158.52 791349.22
+602176.3 791372.72
+602223.93 791388.59
+602258.23 791389.23
+602278.55 791380.97
+602303.32 791372.72
+602328.39 791375.32
+602344.6 791408.28
+602362.38 791407.01
+602387.88 791383.54
+602440.81 791395.9
+602482.73 791411.14
+602535.44 791445.44
+602583.45 791462.01
+602631.55 791490.48
+602678.97 791520.38
+602737.08 791547.39
+602782.81 791555.66
+602796.78 791562.63
+602827.9 791563.9
+602869.18 791559.45
+602880.61 791562.63
+602899.03 791562.63
+602913.64 791561.99
+602922.53 791559.45
+602935.87 791559.45
+602949.2 791557.55
+602965.72 791559.45
+602981.59 791554.37
+603019.7 791552.47
+603043.2 791556.28
+603067.33 791564.53
+603111.79 791583.59
+603123.85 791598.19
+603174.97 791627.83
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 603056.04 791013.06
+Region  1
+  99
+604789.14 789148.97
+604711.04 789220.76
+604566.57 789049.27
+604541.81 789001.33
+604203.99 789091.23
+603926.18 789106.77
+603899.51 789107.4
+603806.11 789455.12
+603800.4 789473.22
+603797.22 789484.97
+603856.91 789511.96
+603842.31 789431.95
+603963.27 789497.35
+604307.63 789681.07
+604820.4 789957.34
+604810.88 790026.84
+604792.78 790151.62
+604791.19 790227.86
+604784.83 790244.06
+604804.83 790387.29
+604826.84 790480.81
+604861.67 790620.73
+604884.53 790666.13
+604910.38 790725.64
+604907.84 790803.76
+604890.71 790874.52
+604877.38 790946.6
+604867.85 790993.31
+604845.98 791040.7
+604930.4 791081.26
+604942.46 791059.35
+604993.9 791001.88
+605030.73 790973.9
+605055.5 790954.85
+605093.28 790928.82
+605065.34 790888.49
+605106.3 790850.74
+605149.16 790811.37
+605184.72 790778.66
+605210.12 790755.16
+605223.45 790742.78
+605241.23 790703.41
+605256.79 790668.8
+605271.4 790661.81
+605312.35 790664.02
+605329.5 790665.6
+605334.58 790646.87
+605430.46 790590.99
+605473.01 790569.72
+605512.38 790569.72
+605536.19 790561.79
+605584.77 790479.51
+605601.6 790447.44
+605622.24 790430.93
+605673.67 790418.87
+605711.77 790409.66
+605727.01 790397.59
+605743.2 790377.59
+605750.83 790358.56
+605754.63 790351.61
+605758.44 790343.35
+605789.55 790270.96
+605801.94 790232.44
+605815.15 790194.5
+605944.69 790107.19
+605966.28 790084.33
+605975.03 790004.3
+605984.71 789866.34
+605973.28 789839.99
+605911.69 789781.88
+605840.3 789714.83
+605804.42 789678.63
+605847.28 789558.93
+605879.03 789504.01
+605955.23 789438.27
+605927.74 789400.51
+605902.41 789364.43
+605871.38 789309.35
+605840.97 789251.12
+605807.56 789226.84
+605746.92 789203.34
+605698.98 789183.66
+605633.57 789162.98
+605516.41 789114.72
+605487.2 789115.97
+605434.5 789132.48
+605373.22 789159.47
+605300.83 789191.54
+605289.57 789054.6
+605254.33 789029.68
+605212.36 789001.01
+605139.55 788947.2
+605107.28 788924.78
+605005.36 788854.61
+604996.78 788842.87
+604951.06 788988.61
+604937.09 789011.15
+604863.12 789078.49
+604789.14 789148.97
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 605064.43 789757.31
+Region  1
+  27
+609056.02 796409.29
+609267.23 797215.74
+609270.34 797227.62
+609271.61 797232.45
+609273.26 797238.75
+609360.23 797274.01
+609360.24 797274.01
+609360.26 797274.02
+609432.33 797303.24
+609512.36 797335.69
+609512.41 797335.71
+609536.47 797345.46
+609541.84 797345.36
+609718.25 797342.19
+609718.28 797342.19
+609721.17 797342.14
+610050.46 797317.15
+610101.36 797313.29
+610129.65 797311.15
+610396.51 796849.49
+610445.47 796767.66
+610364.34 796720.1
+609200.43 796041.44
+609187.49 796032.42
+609186.66 796035.38
+609186.35 796036.26
+609056.02 796409.29
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 609665.33 796785.33
+Region  1
+  30
+608286.33 795846.18
+608017.05 795860.74
+607777.86 795880.63
+607678.4 795911.2
+607656.08 795918.96
+607635.94 795927.94
+607627.21 795982.28
+607664.36 796092.06
+607663.64 796118
+607662.2 796138.18
+607657.16 796309.69
+607696.07 796320.5
+607753.36 796332.38
+607810.29 796306.44
+607880.19 796268.97
+607911.18 796267.52
+607945.77 796138.53
+607994.77 796104.66
+608029.36 796082.32
+608035.85 796088.81
+608046.66 796107.54
+608063.23 796139.25
+608075.48 796165.2
+608087.01 796224.29
+608042.34 796306.44
+608147.55 796335.99
+608188.62 796271.13
+608201.59 796258.16
+608304.77 795846.18
+608286.33 795846.18
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 607951.35 796064.08
+Region  1
+  111
+610975.76 792025.47
+611024.47 792073.78
+611045.17 792131.49
+611043.66 792191.8
+611017.08 792256.53
+610981.04 792286.4
+610928.94 792309.03
+610813.53 792326.34
+610618.19 792352.94
+610556.42 792369.91
+610505.5 792405.55
+610476.49 792451.14
+610463.25 792519.37
+610492.62 792601.04
+610689.13 792836.04
+610723.74 792824.61
+610837.4 792910.33
+610847.88 792905.89
+610866.61 792874.14
+610945.2 792827.62
+610989.97 792806.98
+611026.48 792803.81
+611048.39 792805.72
+611110.31 792759.12
+611170.43 792718.61
+611223.83 792677.57
+611314 792669
+611376.23 792650.27
+611406.86 792661.53
+611526.37 792754.4
+611628.29 792821.06
+611606.07 792910.28
+611685.3 792894.88
+611752.29 792880.26
+611716.69 792779.63
+611792.25 792738.67
+611841.46 792851.39
+611861.78 792825.67
+611877.98 792794.87
+611903.86 792711.84
+611920.69 792679.78
+611958.79 792637.86
+612005.01 792589.12
+612019.3 792538
+611995.49 792462.12
+611983.89 792382.57
+611941.15 792285.25
+611887.17 792040.63
+612025.6 792038.73
+611978.3 791896.48
+611918.29 791957.45
+611843.04 791837.73
+611790.34 791793.26
+611781.13 791715.16
+611811.93 791645.28
+611799.55 791611.29
+611765.26 791602.72
+611747.8 791609.07
+611695.41 791642.09
+611854.16 791436.37
+612049.1 791434.47
+611924.96 791332.22
+611906.58 791222.68
+611890.38 791207.44
+611862.13 791211.57
+611844.35 791220.46
+611769.41 791228.08
+611731.63 791211.25
+611704.25 791114.33
+611660.07 791061.36
+611658.49 791037.55
+611651.5 791016.27
+611623.65 790991.21
+611558.25 790961.04
+611537.29 790960.41
+611474.99 790997.55
+611437.99 791030.69
+611340.01 791070.86
+611273.02 791074.04
+611216.18 791052.13
+611045.88 790956.4
+610917.94 790891.86
+610790.38 790774.05
+610627.18 790610.78
+610582.86 790562.66
+610517.75 790481.14
+610501.09 790467.73
+610491.75 790442.95
+610473.06 790409.64
+610471.84 790393.39
+610448.48 790346.06
+610424.1 790316
+610405.82 790291.22
+610306.09 790215.05
+610261.17 790156.26
+610245.15 790130.96
+610221.49 790067.22
+610189.91 790116.34
+610138.54 790169.6
+610099.79 790215.73
+610078.85 790267.39
+610081.39 790329.62
+610140.13 790525.48
+610196.5 790718.36
+610199.32 790825.1
+610231.85 790910.99
+610567.76 791819.43
+610596.27 791871.02
+610645.32 791908.14
+610933.83 792003.52
+610975.76 792025.47
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 611098.07 791696.71
+Region  1
+  132
+606721.71 793362.33
+606768.52 793293.34
+606793.94 793257.4
+606817.44 793218.98
+606506.54 792862.58
+606584.33 792757.48
+606601.47 792724.11
+606641.79 792617.7
+606678.62 792547.53
+606694.93 792511.83
+606708.26 792481.99
+606744.06 792413.9
+606745.49 792388.94
+606749.05 792351.85
+606746.2 792296.23
+606738.35 792255.57
+606720.16 792204.58
+606699.48 792175.34
+606583.22 792079.77
+606318.21 791904.04
+606317.57 791829.14
+606328.36 791727.51
+606333.44 791669.09
+606332.17 791631.63
+606287.09 791513.59
+606278.52 791480.25
+606321.07 791450.09
+606355.99 791423.1
+606298.48 791376.39
+606062.26 791187.8
+605955.57 791087.34
+605911.76 791060.03
+605875.94 791035.71
+605961.03 790960.46
+605858.47 790927.44
+605819.77 791096.23
+605770.88 791189.79
+605711.4 791281.99
+605658.59 791362.15
+605608.64 791439.27
+605549.69 791515.55
+605481.01 791590.2
+605431.37 791635.87
+605297.49 791745.34
+605211.02 791815.01
+605148.48 791866.36
+605160.76 791893.24
+605164.99 791904.67
+605170.71 791914.41
+605174.52 791929.65
+605173.46 791943.2
+605137.05 791964.79
+605138.75 791974.52
+605159.28 791988.28
+605183.83 792001.83
+605148.06 792037.17
+605155.47 792055.38
+605163.3 792056.65
+605187.01 792046.7
+605196.32 792056.76
+605193.57 792070.94
+605184.68 792077.93
+605154.2 792084.28
+605103.82 792083.79
+605066.15 792092.47
+605041.17 792105.16
+605005.04 792099.88
+604975.83 792112.58
+604935.19 792165.92
+604902.17 792164.65
+604897.09 792188.78
+604933.92 792207.83
+604946.62 792289.11
+604904.71 792289.11
+604871.69 792351.27
+604833.59 792362.1
+604877.41 792398.6
+604895.5 792528.79
+604817.71 792691.68
+604887.56 792752.33
+604940.26 792754.23
+605010.43 792731.69
+605018.63 792768.07
+605026.25 792804.27
+605031.33 792829.03
+604998.31 792827.76
+604968.46 792827.13
+604931.63 792823.95
+604941.79 792889.36
+604947.51 792908.41
+605031.45 792911.35
+605108.8 792939.52
+605153.88 792970.64
+605191 793002.73
+605235.46 793041.47
+605280.55 793092.28
+605331.99 793145.62
+605477.41 793205.95
+605541.87 793210.08
+605602.84 793210.08
+605664.44 793211.99
+605740.64 793218.34
+605818.12 793233.58
+605901.95 793268.51
+605960.79 793313.89
+606008.08 793351.26
+606050.04 793383.68
+606094.66 793421.82
+606132.42 793453.86
+606188.67 793511.26
+606220.71 793558.56
+606244.57 793623.67
+606237.49 793689.02
+606216.13 793752.72
+606183.52 793804.02
+606148.48 793837.19
+606010.26 793934.49
+606040.74 793983.7
+606329.14 793849.57
+606387.56 793823.85
+606474.77 793737.3
+606510.96 793716.98
+606568.11 793714.44
+606577 793700.47
+606560.81 793670.31
+606565.57 793657.29
+606575.41 793633.79
+606601.39 793614.35
+606611.55 793555.16
+606631.55 793496.45
+606653.77 793460.57
+606721.71 793362.33
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 605891.86 792461.58
+Region  1
+  72
+615754.36 800435.37
+615832.84 800427.71
+616204.04 800506.18
+616203.56 800476.04
+616189.21 800430.59
+616194.95 800349.25
+616204.28 800214.1
+616246.86 800204.53
+616246.51 800159.14
+616245.94 800153.35
+616244.88 800137.68
+616245.34 800130.28
+616220.66 800061.76
+616222.54 800025.73
+616179.99 799914.28
+616161.9 799866.02
+616124.21 799787.6
+616041.54 799815.15
+616021.81 799759.26
+616008.19 799713.82
+615931.68 799699.53
+615881.51 799717
+615876.43 799739.86
+615867.9 799769.36
+615860.06 799803.4
+615866.81 799822.46
+615886.95 799872.34
+615906.52 799937.28
+615902.54 799938.01
+615788.29 799979.12
+615779.63 799990.37
+615746.75 800085.14
+615671.01 800066.1
+615591.39 800015.04
+615542.49 799983.45
+615456.37 799914.64
+615437.96 799901.02
+615416.18 799884.27
+615055.78 799796.55
+614707.04 799306.85
+614642.09 799354.24
+614583.67 799354.24
+614534.77 799326.3
+614482.29 799275.33
+614434.76 799229.17
+614463.31 799279.77
+614483 799333.53
+614486.88 799395.53
+614488.08 799451.12
+614467.14 799509.76
+614443.68 799544.1
+614414.57 799578.24
+614337.09 799628.92
+614285.36 799654.67
+614238.04 799684.82
+614170.8 799726.57
+614121.82 799777.79
+614106.99 799812.24
+614087.85 799862.95
+614078.76 799889.74
+614077.81 799904.57
+614411.46 800172.25
+614460.97 800227.99
+614537.04 800323.2
+614571.71 800382.28
+614727.67 800332.52
+614795.61 800309.08
+614776.47 800244.97
+614778.86 800232.53
+615224.27 800324.85
+615636.67 800410.97
+615754.36 800435.37
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 615134.59 799996.79
+Region  1
+  29
+609626.53 799456.79
+609259.34 799386.37
+609215 799391.25
+609198.65 799472.44
+609181.82 799557.5
+609168.17 799629.15
+609140.64 799768.32
+609527.1 799839.9
+609606.06 799843.8
+609597.75 799953.48
+609912.63 800095.8
+609956.5 800116.28
+609967.22 800003.19
+609949.67 799980.77
+609900.93 799933
+609862.91 799896.93
+609838.54 799872.56
+609820.99 799856.96
+609838.54 799779.95
+609850.24 799708.79
+609860.96 799661.02
+609856.09 799613.25
+609852.39 799558.92
+609806.25 799555.8
+609772.95 799554.41
+609736.65 799553.3
+609702.27 799550.31
+609622.79 799547.27
+609626.53 799456.79
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 609547.1 799701.09
+Region  1
+  40
+609977.59 798430.62
+610349.98 798233.01
+610781.51 798002.88
+610752.99 797972.24
+610690.5 797956.47
+610638.02 797949.49
+610619.02 797927.72
+610586.34 797893.13
+610569.18 797875.43
+610553.37 797857.53
+610458.47 797853.5
+610331.97 797859.67
+610219.9 797864.95
+610157.54 797868.49
+610104.16 797860.32
+610038.93 797829.38
+609956 797785.37
+609870.21 797756.23
+609770.13 797726.92
+609709.8 797725.42
+609628.37 797732.5
+609562.74 797749.93
+609513.3 797783.55
+609476.95 797841.72
+609460.06 797877.39
+609427.79 797941.83
+609386.54 798023.68
+609314.77 798166.8
+609269.96 798221.4
+609223.39 798255.72
+609141.56 798300.26
+609026.36 798363.44
+609039.43 798385.23
+609104.37 798482.7
+609127.52 798518.11
+609193.84 798617.41
+609267.77 798492.3
+609794.22 798505.1
+609842.29 798504.94
+609977.59 798430.62
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 609836.99 798138.18
+Region  1
+  136
+603740.77 805799.57
+604404.28 805677.04
+604440.74 805674.5
+604472.96 805683.82
+604522.99 805749.11
+604591.67 805848.32
+604702.34 805517.2
+604749.83 805431.56
+604793.07 805353.55
+604793.07 805352.71
+604808.33 805306.92
+604872.78 805246.71
+604918.14 805203.89
+604974.11 805158.1
+605058.05 805114.01
+605178.46 805048.72
+605210.92 804998.68
+605205.28 804947.43
+605117.13 804758.83
+605069.98 804734.23
+605003.87 804750.12
+604938.83 804789.78
+604882.99 804805.89
+604778.73 804822.37
+604713.78 804827.86
+604580.04 804807.25
+604488.63 804797.24
+604397.17 804768.17
+604318.07 804742.28
+604264.38 804745.64
+604219.32 804761.46
+604193.43 804763.37
+604168.99 804752.35
+604156.04 804734.61
+604151.48 804711.87
+604163.47 804682.15
+604197.5 804630.86
+604199.42 804597.78
+604182.64 804561.83
+604154.83 804515.7
+604133.37 804477.52
+604118.1 804448.79
+604113.01 804419.71
+604127.56 804384.07
+604163.55 804341.53
+604185.37 804325.89
+604216.28 804319.71
+604294.09 804350.98
+604298.09 804342.62
+604471.39 804148.41
+604366.78 804044.43
+604378.15 804028.61
+604402.2 804025.44
+604436.37 804016.56
+604476.23 804001.36
+604516.71 803972.24
+604547.04 803934.26
+603663.25 803094.74
+603604.32 803040.44
+603564 803015.86
+603528.6 803003.07
+603486.31 802995.2
+603429.28 802994.22
+603361.42 802994.22
+603294.55 802992.25
+603262.1 802995.2
+603213.92 803006.02
+603175.57 803015.86
+603017.24 803143.69
+602769.4 803382.68
+602747.77 803474.14
+602746.78 803506.59
+602745.8 803527.24
+602741.87 803544.94
+602734.98 803563.63
+602723.18 803626.56
+602713.35 803670.82
+602710.42 803723.94
+602739.92 803787.86
+602780.75 803830.64
+602822.05 803858.17
+602874.17 803868.99
+602890.89 803867.02
+602935.14 803895.54
+602970.54 804000.77
+602989.23 804034.2
+603025.61 804068.62
+603060.03 804066.65
+603085 804064.07
+603129.86 804033.22
+603184.93 803930.94
+603230.16 803867.02
+603251.8 803830.64
+603299 803840.47
+603330.47 803885.71
+603374.72 803952.58
+603406.46 803986.72
+603436.17 804026.83
+603478.45 804115.34
+603446.98 804161.56
+603413.55 804205.81
+603381.1 804248.1
+603357.49 804283.5
+603325.04 804337.59
+603298.49 804376.92
+603398.11 804391.63
+603478.52 804406.14
+603580.42 804397.86
+603803.5 804430.78
+603840 804440.75
+603865.52 804450.77
+603845.1 804474.28
+603551.08 804725.59
+603314.71 804936.79
+603230.34 805010.14
+603173.53 805060.16
+603121.81 805102.56
+603064.87 805166.17
+603035.32 805227.21
+603025.99 805245.01
+603050.58 805256.04
+603374.04 805382.39
+603152.75 805939.36
+603148.77 805949.36
+603449.63 806093.46
+603454.97 806083.46
+603473.62 806048.53
+603493.86 806032.7
+603512.83 806016.24
+603550.15 805995.98
+603569.76 805987.74
+603600.11 805955.46
+603630.23 805910.13
+603675.68 805840.58
+603701.85 805813.72
+603740.77 805799.57
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 603828.12 804538.39
+Region  1
+  69
+607834.8 789884.27
+607441.1 789809.65
+607384.91 789816.95
+607344.73 789800.3
+607090.48 789835.06
+607046.98 789790.93
+606780.84 789931.75
+606856.72 790022.89
+606816.71 790043.5
+606709.72 790200.99
+606742.41 790291.96
+606757.34 790358.95
+606844.07 790748.64
+606951.38 790793.41
+607052.36 790837.23
+607015.83 790870.57
+607009.17 790909.97
+607031.07 790952.51
+607067.27 791013.78
+607095.84 791067.76
+607096.82 791112.84
+607051.39 791149.99
+606999 791157.58
+607039.96 791227.75
+607065.68 791266.17
+607131.09 791263
+607172.36 791264.27
+607205.11 791260.97
+607189.51 791307.77
+607216.81 791324.63
+607282.85 791357.01
+607352.7 791388.76
+607371.11 791396.38
+607389.84 791426.86
+607412.7 791447.83
+607428.89 791458.63
+607451.43 791467.2
+607482.87 791473.87
+607534.3 791483.71
+607538.43 791526.56
+607547 791563.07
+607557.16 791620.54
+607570.82 791693.25
+607591.77 791813.56
+607594.94 791924.01
+608271.39 791975.44
+608299.38 791888.28
+608320.34 791864.14
+608366.7 791857.48
+608427.98 791859.06
+608456.87 791850.17
+608482.91 791832.07
+608497.16 791817.53
+608511.34 791781.74
+608563.41 791672.51
+608622.4 791606.13
+608610.79 791516.37
+608615.55 791487.47
+608621.58 791441.12
+608627.3 791395.39
+608629.83 791376.69
+608652.02 791219.93
+608659.64 791148.81
+608511.08 791065.86
+608450.09 791162.15
+608227.84 790894.81
+608629.82 790219.61
+608167.54 790000.16
+607834.8 789884.27
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 607731.57 790804.15
+Region  1
+  25
+603126.4 802871.3
+602818.6 802723.79
+602811.72 802715.93
+602809.75 802715.93
+602793.03 802749.36
+602763.53 802784.76
+602710.43 802817.21
+602558.01 802886.05
+602478.84 802882.63
+602414.93 802914.09
+602516.71 803078.79
+602562.93 803162.39
+602605.21 803231.23
+602634.72 803282.37
+602663.24 803330.55
+602706.51 803403.33
+602747.77 803474.14
+602769.4 803382.68
+603017.24 803143.69
+603175.57 803015.86
+603129.35 802964.72
+603123.45 802923.42
+603124.43 802900.8
+603123.45 802886.05
+603126.4 802871.3
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 602798.84 803037.38
+Region  1
+  67
+604533.92 794044.44
+604547.26 794081.28
+604538.37 794124.47
+604523.12 794145.11
+604384.25 794168.93
+604253.55 794189.25
+604113.1 794218.5
+604095.32 794222.95
+604479.93 794831.8
+604564.4 794772.42
+604536.14 794733.36
+604498.99 794688.91
+604485.97 794666.05
+604472.15 794619.52
+604470.72 794571.71
+604497.71 794529.16
+604562.49 794474.23
+604634.1 794401.01
+604703.32 794418.15
+604757.78 794457.38
+604834.31 794518.66
+604914.97 794477.07
+604955.46 794458.84
+604999.91 794502.34
+605039.29 794479.16
+605120.9 794469.95
+605129.3 794430.2
+605131.84 794420.99
+604974.53 794215.55
+605011.2 794204.96
+605051.53 794195.59
+605012.73 794129.1
+604990.93 794090.6
+604975.45 794060.25
+604973.69 794055.37
+604909.14 794072.52
+604871.67 794047.76
+604857.28 794007.96
+604864.27 793878.72
+604897.09 793818.59
+604975.62 793667.09
+605011.39 793649.73
+605054.58 793653.33
+605076.59 793636.19
+605122.31 793640.84
+605194.07 793571.17
+605286.68 793489.76
+605238.42 793431.65
+605176.02 793401.3
+605084.25 793439.09
+604948.49 793485.57
+604889.43 793518.91
+604862.82 793533.59
+604821.07 793593.72
+604785.02 793668.4
+604756.85 793763.59
+604725.56 793764.6
+604628.24 793775.02
+604613.48 793773.91
+604577.59 793799.95
+604543.62 793781.85
+604508.37 793756.45
+604467.72 793783.44
+604453.91 793793.43
+604467.71 793838.5
+604477.4 793909.17
+604533.92 794044.44
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 604693.77 794126.66
+Region  1
+  92
+610518.38 801303.38
+610714.63 801226.77
+610850.84 801174.05
+610941.65 801180.51
+610981.46 801182.05
+611003.84 801166.55
+611015.89 801133.41
+611116.5 801144.03
+611196.87 801147.4
+611335.02 801167.2
+611281.66 801060.46
+611278 801026.63
+611278.43 800968.09
+611283.59 800916.45
+611211.5 800884.32
+611192.99 800922.2
+611087.97 800905.84
+610950.82 800883.41
+610879.67 800872.07
+610783.9 800819.69
+610701.8 800738.37
+610626.36 800665.27
+610645.9 800616.8
+610665.84 800569.49
+610683.24 800527.45
+610716.47 800444.96
+610697.7 800426.98
+610669.36 800419.74
+610658.99 800323.34
+610649.61 800237.72
+610643.55 800193.71
+610615.02 800126.08
+610610.72 800103.41
+610602.12 800085.43
+610611.5 799990.04
+610618.34 799958.19
+610633.98 799933.56
+610653.91 799916.36
+610687.53 799910.5
+610688.71 799872.58
+610688.71 799837.39
+610627.72 799844.43
+610574.95 799850.68
+610556.57 799852.64
+610532.34 799854.98
+610440.47 799877.27
+610415.33 799884.78
+610338.81 799876.52
+610282.93 799862.52
+610253.09 799844.74
+610242.93 799824.42
+610207.37 799848.57
+610182.92 799865.71
+610132.94 799894.98
+610095.9 799917.41
+610066.65 799934.95
+610049.25 799950.17
+609992.42 799938.1
+609967.22 800003.19
+609956.5 800116.28
+609960.39 800163.07
+609969.17 800202.06
+609997.75 800326.15
+609997.75 800400.43
+609985.64 800465.03
+609953.97 800529.15
+609838.89 800708
+609813.63 800768.39
+609808.55 800830.54
+609836.11 800929.28
+609879.3 801068.67
+609892.99 801129.65
+609892.36 801193.37
+609871.58 801275.63
+609829.31 801393.96
+609739.85 801657.67
+609735.1 801674.65
+609959.7 801971.07
+609990.83 802033.47
+610013.02 802110.45
+610038.49 802197.47
+610066.68 802129.69
+610139.22 801966.05
+610394.87 802094.3
+610409.07 802042.22
+610406.68 802005.86
+610445.64 801778.01
+610438.32 801644.18
+610363.22 801470.53
+610331.37 801400.38
+610367.52 801363.79
+610518.38 801303.38
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 610317.77 800934.73
+Region  1
+  120
+616755.31 799397.96
+616768.8 799375.89
+616783.08 799352.07
+616791.97 799330.48
+616802.45 799310.16
+616803.4 799267.61
+616812.29 799235.55
+616821.07 799179.86
+616833.88 799153.31
+616841.5 799119.02
+616847.22 799099.63
+616854.52 799085.02
+616863.1 799076.77
+616905.32 799064.38
+616938.03 799065.97
+616968.19 799074.23
+617111.39 799092.33
+617127.26 799093.29
+617137.74 799085.67
+617153.3 799050.42
+617159.01 799017.08
+617153.3 799005.02
+617134.67 799006.1
+617139.97 798964.64
+617152.02 798955.97
+617126.83 798912.47
+617116.35 798853.28
+617097.8 798826.46
+617078.76 798782.58
+617060.19 798761.61
+617057.18 798740.49
+617069.11 798705.21
+617093.94 798591.91
+617053.32 798547.42
+617060.79 798531.99
+617115.27 798535.85
+617164.69 798556.82
+617190.49 798531.99
+617196.38 798510.47
+617186.26 798486.12
+617191.68 798467.95
+617177.22 798446.02
+617171.43 798423.6
+617165.77 798406.4
+617224.11 798375.07
+617281.24 798359.16
+617284.13 798349.03
+617262.56 798312.74
+617290.76 798292.73
+617316.07 798284.06
+617331.5 798273.69
+617332.83 798251.43
+617345.36 798232.87
+617373.57 798241.79
+617380.8 798255.29
+617388.03 798252.88
+617395.26 798208.28
+617409.72 798190.69
+617433.47 798183.8
+617485.3 798160.9
+617533.64 798116.7
+617577.39 798070.8
+617635.48 798029.82
+617644.88 797994.62
+617587.27 797993.42
+617521.7 797982.33
+617482.93 797972.41
+617440.5 797959.15
+617380.99 797951.58
+617335.43 797965.53
+617282.29 797990.23
+617204.45 798001.02
+617161.99 797964.98
+617048.2 797869.77
+616555.12 797636.95
+616527.82 797587.14
+616505.91 797545.86
+616409.07 797619.84
+616395.07 797672.45
+616372.55 797788.42
+616359.85 797853.41
+616350.96 797889.71
+616372.55 797938.33
+616417.72 798067.85
+616446.31 798151.98
+616465.38 798210.81
+616475.42 798270.11
+616470.97 798355.55
+616455.41 798405.08
+616432.14 798460.73
+616405.65 798535.4
+616386.83 798614.94
+616369.68 798702.28
+616380.48 798709.9
+616398.58 798751.5
+616333.81 798788.93
+616259.83 798838.15
+616196.96 798877.52
+616137.59 798915.3
+616145.36 798929.04
+616198.72 799016.66
+616214.44 799044.13
+616198.24 799120.65
+616166.05 799273.2
+616150.28 799318.76
+616122.82 799449.45
+616113.93 799472.95
+616112.66 799482.48
+616190.7 799521.65
+616260.52 799549.69
+616280.86 799567.83
+616296.25 799541.44
+616671.2 799626.66
+616698.14 799633.8
+616723.42 799587.62
+616731.12 799548.04
+616713.53 799515.61
+616716.28 799482.07
+616741.02 799432.04
+616755.31 799397.96
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 616725.83 798592.17
+Region  1
+  135
+608501.68 798601.09
+607699.22 798592.87
+607684.77 798653.61
+607665.49 798731.8
+607652.94 798786.36
+607651.86 798855.01
+607678.27 798868.87
+607770.92 798910
+607787.81 798916.93
+607811.19 798927.32
+607813.14 798962.21
+607849.29 799013.11
+607881.33 799062.04
+607883.49 799004.02
+607959.7 799038.66
+608085.06 799098.29
+608119.89 799110.93
+608159.3 799132.17
+608196.54 799147.76
+608227.28 799303.63
+608192.64 799268.13
+608158 799254.71
+608121.72 799258.18
+608104.1 799248.45
+608045.21 799290.88
+607985.89 799337.64
+607858.38 799246.06
+607676.75 799109.41
+607648.17 799102.92
+607516.55 799095.99
+607449.87 799086.9
+607364.83 799079.32
+607336.7 799099.23
+607317.43 799069.59
+607295.36 799042.76
+607225.02 799094.27
+607154.89 799147.72
+607085.53 799183.37
+607058.23 799198.61
+607027.11 799214.49
+607002.97 799227.83
+606985.83 799237.35
+606958.52 799251.96
+606936.93 799268.47
+606911.53 799237.99
+606906.45 799202.43
+606903.27 799157.97
+606791.5 799227.19
+606781.28 799235.48
+606767.82 799235.48
+606758.39 799249.83
+606783.52 799287.97
+606788.91 799321.63
+606791.6 799356.18
+606800.57 799407.33
+606757.95 799397.01
+606730.13 799395.22
+606707.69 799396.56
+606690.19 799397.01
+606667.31 799398.81
+606627.37 799414.96
+606646.67 799446.82
+606691.61 799526.85
+606725.65 799593.04
+606799.89 799738.24
+606856.62 799839.42
+606910.52 799936.81
+606944.9 799985.23
+606968.21 800020.03
+607005.55 800057.4
+607090.66 800127.38
+607162.52 800167.1
+607223.99 800199.25
+607291.13 800233.29
+607369.62 800274.9
+607440.95 800320.92
+607506.26 800384.08
+607574.02 800432.84
+607641.2 800495.43
+607715.34 800561.19
+607837.23 800647.9
+607873.74 800681.32
+607927.99 800715.91
+607955.9 800732.57
+607963.46 800724.06
+608045.26 800632.77
+608109.56 800555.23
+608155.9 800496.61
+608185.21 800434.2
+608215.47 800350.98
+608248.09 800300.38
+608293.48 800266.34
+608362.71 800227.15
+608401.28 800173.67
+608438.68 800062.67
+608440.63 799975.91
+608536.17 799904.74
+608561.05 799890.77
+608680.45 799841.37
+608840.32 799782.88
+608804.99 799691.02
+608790.37 799614
+608791.58 799533.82
+608781.83 799456.81
+608767.94 799408.31
+608721.14 799321.55
+608678.25 799275.24
+608634.38 799241.12
+608603.19 799223.09
+608603.94 799206.27
+608605.89 799104.39
+608641.47 799105.37
+608745.29 799107.81
+608735.06 799014.71
+608725.8 798953.29
+608721.41 798909.42
+608711.52 798829.09
+608706.07 798793.14
+608632.23 798805.09
+608596.79 798807.64
+608543 798818.42
+608503.12 798822.87
+608461.65 798825.67
+608483.98 798785.63
+608494.87 798768.2
+608507.81 798744.11
+608522.79 798720.41
+608535.59 798697.26
+608507.54 798681.47
+608483.44 798668.54
+608468.46 798660.1
+608480.44 798640.22
+608489.43 798623.61
+608494.6 798614.35
+608501.68 798601.09
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 607836.58 799593.41
+Region  1
+  62
+607651.86 798855.01
+607652.94 798786.36
+607665.49 798731.8
+607684.77 798653.61
+607699.22 798592.87
+607712.91 798540.59
+607739.98 798430.4
+607623.07 798401.82
+607593.84 798395.57
+607571.76 798389.94
+607647.76 798114.29
+607653.6 798091.57
+607508.55 798053.9
+607452.69 798059.53
+607399.86 798062.56
+607390.77 798099.8
+607384.92 798116.02
+607378.86 798135.07
+607329.06 798134.21
+607294.85 798135.07
+607299.62 798246.35
+607302.64 798414.81
+607017.94 798417.6
+606874.62 798425.39
+606750.52 798451.42
+606754.99 798574.63
+606761.34 798721.97
+606764.19 798807.42
+606766.1 798933.79
+606756.26 798967.1
+606722.6 799012.19
+606698.46 799036.32
+606666.08 799101.09
+606648.22 799135.09
+606701.41 799177.14
+606758.39 799249.83
+606767.82 799235.48
+606781.28 799235.48
+606791.5 799227.19
+606903.27 799157.97
+606906.45 799202.43
+606911.53 799237.99
+606936.93 799268.47
+606958.52 799251.96
+606985.83 799237.35
+607002.97 799227.83
+607027.11 799214.49
+607058.23 799198.61
+607085.53 799183.37
+607154.89 799147.72
+607225.02 799094.27
+607295.36 799042.76
+607317.43 799069.59
+607336.7 799099.23
+607364.83 799079.32
+607449.87 799086.9
+607516.55 799095.99
+607648.17 799102.92
+607649.47 798996.84
+607650.25 798958.63
+607650.72 798892.91
+607651.86 798855.01
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 607226.3 798712.48
+Region  1
+  75
+607254.24 796698.42
+607329.17 796728.9
+607414.27 796749.18
+607471.42 796764.74
+607554.93 796794.28
+607636.84 796832.38
+607793.36 796916.44
+607848.13 796969.77
+607884.88 797034.62
+607917.31 797084.35
+607964.38 797175.46
+608026.98 797228.93
+608062.16 797103.8
+608096.75 796969.77
+608122.69 796921.48
+608150.07 796929.41
+608170.25 796925.09
+608134.94 796798.98
+608140.71 796754.3
+608189.34 796740.24
+608187.18 796727.27
+608179.98 796704.93
+608173.49 796678.99
+608179.98 796643.68
+608235.11 796425.69
+608248.8 796360.12
+608231.14 796355.44
+608203.76 796348.96
+608147.55 796335.99
+608042.34 796306.44
+608087.01 796224.29
+608075.48 796165.2
+608063.23 796139.25
+608046.66 796107.54
+608035.85 796088.81
+608029.36 796082.32
+607994.77 796104.66
+607945.77 796138.53
+607911.18 796267.52
+607880.19 796268.97
+607810.29 796306.44
+607753.36 796332.38
+607696.07 796320.5
+607657.16 796309.69
+607662.2 796138.18
+607641.3 796155.47
+607607.43 796205.19
+607590.14 796270.77
+607563.48 796281.58
+607532.49 796207.36
+607176.14 796278.31
+607155.24 796278.31
+607064.44 796334.52
+607028.5 796471.92
+606717.98 796537.83
+606657.34 796544.18
+606570.66 796533.71
+606505.26 796501.33
+606456.36 796450.52
+606422.08 796399.1
+606392.23 796414.98
+606347.15 796473.4
+606320.48 796530.56
+606300.79 796599.14
+606269.8 796673.28
+606253.8 796703.58
+606296.4 796739.11
+606374.14 796774.06
+606530.11 796788.97
+606614.16 796765.8
+606824.67 796695.58
+606944.37 796663.83
+607042.79 796660.02
+607183.44 796683.19
+607254.24 796698.42
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 607482.92 796580.34
+Region  1
+  188
+603698.09 797108.93
+603772.24 797073.97
+603769.17 797067.85
+603755.88 797041.3
+603736.75 797000.29
+603694.84 796951.39
+603650.99 796861.78
+603626.22 796782.4
+603609.72 796725.92
+603600.2 796690.36
+603611.9 796632.07
+603657.23 796588.43
+603708.66 796556.62
+603761.1 796532.6
+603782.76 796535.31
+604167.34 796684.44
+604172.42 796673.64
+604179.4 796664.75
+604067.9 796417.63
+604016.33 796245.91
+604000.64 796254.84
+603997.49 796256.84
+603992.96 796260.83
+603985.97 796264
+603971.37 796296.39
+603870.15 796267.2
+603860.57 796258.48
+603847.23 796244.46
+603820.35 796215.25
+603795.79 796191.75
+603755.99 796173.99
+603693.55 796140.55
+603632.8 796104.63
+603591.52 796079.87
+603569.72 796068.01
+603605.92 796002.03
+603600.62 795984.85
+603590.89 795953.95
+603574.8 795917.97
+603527.37 795818.13
+603506.41 795788.92
+603478.47 795774.11
+603432.54 795770.72
+603397.19 795776.86
+603365.02 795814.11
+603342.17 795850.04
+603314.02 795895.34
+603346.24 795930.54
+603383.91 795976.02
+603408.88 796016.87
+603434.49 796066.21
+603354.91 796109.6
+603301.18 796151.93
+603224.44 796238.18
+603127.07 796352.67
+603119.69 796378.26
+603109.53 796556.42
+603108.28 796639.77
+603030.18 796663.69
+602974.51 796679.78
+602895.78 796705.19
+602677.36 796769.42
+602557.82 796805.3
+602489.87 796827.38
+602342.52 796912.73
+602280.1 796964.12
+602276.28 796968.36
+602270.14 796971.96
+602287.97 796993.62
+602300.71 797009.33
+602316.85 797028.86
+602342.75 797058.58
+602374.59 797092.97
+602406.01 797123.54
+602458.66 797119.3
+602513.76 797118.71
+602563.5 797143.26
+602584.88 797175.22
+602598.42 797215.22
+602602.23 797239.58
+602607.1 797276.41
+602608.37 797297.15
+602609.85 797313.66
+602614.95 797376.23
+602621.78 797389.9
+602680.07 797435.94
+602724.53 797473.73
+602755.65 797507.39
+602776.13 797540.26
+602784.38 797561.86
+602788.83 797574.24
+602793.91 797598.69
+602806.61 797627.59
+602809.94 797656.99
+602818.68 797721.81
+602969.83 797987.91
+603133.06 798213.04
+603362.8 798364.38
+603488.55 798405.35
+603512.05 798378.99
+603539.67 798365.34
+603588.89 798361.84
+603607.94 798326.93
+603666.05 798136.72
+603685.04 798118.11
+603691.08 798111.43
+603695.84 798106.35
+603699.97 798102.54
+603706 798096.51
+603714.57 798086.03
+603737.75 798061.26
+603764.41 798044.75
+603868.23 798024.12
+603943.48 798040.63
+603939.99 798028.24
+603936.81 798018.4
+603932.37 798007.92
+603929.19 797999.03
+603922.21 797980.93
+603911.41 797958.39
+603904.11 797943.17
+603860.61 797890.46
+603783.46 797848.87
+603742.82 797850.42
+603803.78 797818.67
+603802.51 797756.67
+603786.95 797646.5
+603744.72 797566.48
+603754.53 797528.56
+603721.51 797472.05
+603693.57 797403.47
+603753.26 797349.49
+603789.55 797350.19
+603827.55 797354.57
+603854.22 797349.49
+603875.18 797327.27
+603901.85 797312.03
+603933.6 797303.77
+603956.46 797298.69
+603990.75 797295.52
+604051.07 797308.85
+604089.17 797366
+604126.64 797426.33
+604160.5 797460.38
+604137.68 797386.32
+604101.87 797233.29
+604141.24 797153.28
+604151.72 797135.82
+604116.79 797067.23
+604100.61 797014.87
+604063.45 797095.18
+604040.28 797137.45
+604020.9 797173.96
+603974.54 797261.6
+603919.63 797232.02
+603964.38 797150.46
+603902.14 797132.64
+603821.74 797124.86
+603788.19 797105.87
+603772.49 797074.48
+603698.13 797109.17
+603694.36 797111.08
+603713.37 797130.92
+603720.56 797238.02
+603682.86 797257.46
+603653.22 797263.39
+603602.8 797274.84
+603552.17 797275.47
+603492.03 797268.49
+603439.02 797260.85
+603377.22 797244.73
+603329.35 797230.49
+603303.78 797221.82
+603301.66 797209.33
+603306.53 797191.76
+603310.97 797176.53
+603324.73 797150.91
+603360.72 797144.72
+603433.32 797136.47
+603500.63 797129.27
+603560.32 797122.46
+603593.98 797119.71
+603625.73 797116.95
+603693.5 797110.48
+603698.03 797108.96
+603698.05 797108.95
+603698.07 797108.94
+603698.09 797108.93
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 603311.29 797168.24
+Region  1
+  62
+602585.49 794303.08
+602547.38 794301.2
+602509.05 794331.19
+602479.06 794336.61
+602450.73 794340.77
+602433.65 794354.94
+602365.34 794380.76
+602295.15 794394.32
+602293.48 794438.48
+602283.48 794458.89
+602272.24 794469.72
+602262.66 794480.14
+602246.83 794498.88
+602222.25 794523.46
+602192.05 794557.04
+602174.14 794575.79
+602153.94 794643.09
+602134.36 794704.74
+602098.74 794819.96
+602070 794915.77
+602082.91 794920.77
+602141.23 794934.51
+602194.23 794926.35
+602254.36 794914.97
+602324.52 794899.11
+602362.84 794891.61
+602407.41 794883.28
+602444.89 794875.74
+602466.26 794866.64
+602511.94 794845.38
+602555.16 794827.75
+602604.69 794804.67
+602678.56 794796
+602726.4 794788.8
+602784.39 794780.55
+602798.57 794768.7
+602810.63 794741.18
+602812.11 794714.52
+603025.88 794687.02
+603101.87 794679.4
+603053.9 794273.19
+603084.7 794266.34
+603152.26 794268.84
+603214.28 794270.12
+603262.92 794272.84
+603261.29 794248.73
+603261.11 794244.81
+603277.56 794225.82
+603292.75 794210
+603302.62 794199.17
+603311.37 794190.42
+603323.03 794180.84
+603190.15 794133.76
+603028.93 794121.68
+602989.57 794146.85
+602943.33 794183.51
+602898.54 794199.94
+602833.14 794203.28
+602785.24 794241.19
+602759.2 794241.84
+602614.65 794294.75
+602585.49 794303.08
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 602650.89 794538.13
+Region  1
+  24
+610478.51 806853.55
+610451.45 806764.68
+610302.34 806646.63
+610176.09 806676.39
+610107.57 806697.73
+610094.2 806745.74
+610078.24 806790.6
+610076.88 806829.33
+610077.15 806856.06
+610078.1 806897.38
+610083.77 806913.15
+610097.74 806946.04
+610105.85 806957.93
+610114.85 806970.2
+610130.12 806987.93
+610303.19 807204.24
+610457.73 807380.62
+610490.76 807344.39
+610508.35 807318.28
+610524.87 807263.39
+610539.26 807162.14
+610534.2 807084.6
+610502.76 806953.5
+610478.51 806853.55
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 610325.7 806968.08
+Region  1
+  84
+610000.22 809630.78
+610179.74 812529.46
+610168.22 812532.2
+610150.73 812548.43
+610102.16 812575.9
+610099.07 812605.6
+610102.16 812632.2
+610089.78 812651.39
+610060.08 812668.71
+610024.2 812686.65
+609985.83 812707.69
+609947.47 812726.87
+609917.15 812747.29
+609893.02 812768.33
+609866.42 812801.74
+609851.31 812831.68
+609838.57 812853.1
+609830.23 812877.26
+609819.39 812905.07
+609876.95 812936.52
+609933.36 812946.21
+610053.34 812898.13
+610101.45 812945.07
+610224.77 812929.97
+610241.01 812919.43
+610304.83 812896.63
+610379.47 812875.55
+610443.86 812870.99
+610473.48 812864.16
+610491.72 812839.09
+610497.42 812828.83
+610511.09 812802.05
+610504.82 812758.18
+610493.43 812734.81
+610481.46 812710.31
+610457.8 812581.25
+610438.42 812551.05
+610325.01 812345.93
+610317.03 812307.75
+610314.75 812259.89
+610316.76 812239.09
+610315.05 812217.44
+610323.03 812171.86
+610296.22 812051.63
+610254.06 811980.98
+610258.62 811886.4
+610284.26 811806.63
+610325.54 811725.43
+610354.03 811643.38
+610334.34 811597.51
+610321.8 811519.45
+610304.14 811468.73
+610277.93 811260.76
+610290.24 811204.24
+610315.06 811128.45
+610390.11 811051.76
+610427.3 810983.22
+610491.59 810885.99
+610519.21 810849.65
+610551.29 810721.53
+610595.71 810663.38
+610648.31 810630.44
+610700.38 810604.4
+610755.1 810577.84
+610740.23 810552.34
+610728.54 810523.11
+610719.27 810408.62
+610711.3 810325.2
+610691.38 810267.56
+610656.31 810223.99
+610620.72 810196.89
+610581.93 810179.36
+610423.6 810115.6
+610337 810083.19
+610279.62 810047.06
+610243.49 809985.96
+610227.4 809918.05
+610212.89 809873.63
+610197.48 809843.7
+610132.19 809788.39
+610060.56 809733.99
+610038.17 809665.92
+609998.85 809612.29
+610000.22 809630.78
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 610269.65 811208.28
+Region  1
+  39
+618796.43 806979.58
+618779.92 806888.14
+618691.1 806705.43
+618586.09 806489.76
+618642.76 806458.76
+618688.48 806463.84
+618744.36 806347
+618750.71 806278.42
+618713.88 806176.82
+618349.39 806547.66
+618208.42 806477.81
+618177.94 806551.47
+618337.96 806639.1
+618541.16 806518.45
+618505.6 806454.95
+618523.38 806402.88
+618585.75 806490.34
+618691.4 806707.61
+618660.54 806726.85
+618623.71 806687.48
+618560.21 806723.04
+618548.78 806792.89
+618501.79 806799.24
+618397.65 806861.47
+618397.65 806963.07
+618419.24 807017.68
+618424.32 807093.88
+618463.69 807142.14
+618518.3 807255.17
+618534.81 807242.47
+618529.73 807330.1
+618563.11 807462.45
+618604.95 807454.48
+618531.53 807329.11
+618623.71 807267.87
+618694.83 807211.99
+618749.44 807142.14
+618781.19 807071.02
+618796.43 806979.58
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 618574.67 806824.02
+Region  1
+  98
+604338.38 787582.99
+603781.88 787427.05
+603705.03 787389.58
+603664.7 787351.79
+603633.9 787307.97
+603613.9 787270.5
+603601.2 787244.78
+603591.04 787220.65
+603581.52 787196.2
+603552.95 787193.34
+603433.25 787300.02
+603391.66 787397.2
+603357.69 787474.68
+603335.78 787513.38
+603296.73 787558.79
+603262.13 787614.95
+603229.11 787670.2
+603182.75 787727.98
+603135.13 787760.36
+603127.69 787729.17
+602800.35 787575.79
+602641.1 787581.93
+602595.7 787584.5
+602592.21 787594.98
+602575.38 787626.42
+602568.71 787638.8
+602560 787649.8
+602644.78 787693.94
+602775.9 787753.63
+603001.79 787849.8
+602923.37 787893.94
+602888.13 787913.94
+602838.92 787939.66
+602753.2 787992.68
+602703.03 788008.51
+602694.14 788037.69
+602662.39 788130.41
+602677.49 788167.87
+602700.98 788296.78
+602725.11 788305.99
+602699.71 788377.73
+602657.49 788441.56
+602665.19 788467.69
+602676.22 788529.51
+603030.9 788632.62
+603059.79 788641.15
+603167.42 788670.68
+603215.69 788684.67
+603249.98 788562.11
+603282.99 788454.43
+603924.36 788661.11
+603969.45 788653.47
+603993.26 788645.54
+604006.6 788631.25
+604015.49 788614.1
+604023.74 788574.1
+603974.85 788553.09
+603983.74 788532.77
+604007.55 788501.02
+604073.27 788439.43
+604248.22 788440.34
+604258.7 788406.05
+604269.04 788395.76
+604293.08 788362.85
+604325.06 788346
+604358.4 788339.65
+604417.77 788323.14
+604457.77 788329.49
+604490.16 788350.43
+604554.61 788327.57
+604564.77 788318.05
+604588.9 788299.95
+604589.86 788290.2
+604572.29 788284.69
+604564.25 788274.73
+604537.16 788259.7
+604534.83 788245.73
+604544.78 788229.43
+604583.94 788211.44
+604605.32 788208.45
+604620.35 788193.21
+604620.14 788181.36
+604594.1 788174.37
+604595.48 788163.46
+604619.52 788154.86
+604635.82 788111.95
+604652.96 788092.63
+604685.02 788032.79
+604597.09 787999.06
+604550.1 787942.12
+604530.9 787921.08
+604491.02 787896.39
+604459.31 787881.01
+604428.83 787873.39
+604377.71 787873.7
+604346.28 787764.14
+604347.23 787612.1
+604338.38 787582.99
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 603594.59 788031.96
+Region  1
+  83
+609513.3 797783.55
+609562.74 797749.93
+609628.37 797732.5
+609709.8 797725.42
+609770.13 797726.92
+609870.21 797756.23
+609956 797785.37
+610038.93 797829.38
+610104.16 797860.32
+610157.54 797868.49
+610219.9 797864.95
+610331.97 797859.67
+610458.47 797853.5
+610553.37 797857.53
+610624.36 797800.2
+610660.37 797744.98
+610632.61 797722.27
+610631.77 797721.28
+610631.76 797721.27
+610312.77 797346.95
+610303.95 797342.41
+610303.94 797342.41
+610295.21 797337.92
+610295.19 797337.91
+610228.59 797303.64
+610141.32 797310.26
+610137.4 797310.56
+610129.65 797311.15
+610101.36 797313.29
+610050.46 797317.15
+609721.17 797342.14
+609718.28 797342.19
+609718.25 797342.19
+609541.84 797345.36
+609536.47 797345.46
+609512.41 797335.71
+609512.36 797335.69
+609432.33 797303.24
+609360.26 797274.02
+609360.24 797274.01
+609360.23 797274.01
+609273.26 797238.75
+609271.61 797232.45
+609270.34 797227.62
+609267.23 797215.74
+609258.44 797212.05
+609101.56 797154.13
+608960.15 797175.03
+608831.65 797204.11
+608765.53 797253.82
+608694.71 797258.51
+608582.44 797335.17
+608519.61 797359.55
+608446.46 797355.33
+608314 797314.33
+608181.06 797218.38
+608062.16 797103.8
+608026.98 797228.93
+607956.31 797550.18
+607849.83 797990.5
+607893.13 798006.57
+608127.21 798093.01
+608212.99 798143.39
+608337.45 798220.41
+608418.34 798271.07
+608466.68 798301.74
+608510.72 798324.33
+608563.92 798345.82
+608623.44 798364.13
+608734.4 798399.98
+608817.46 798411.42
+608888.68 798407.16
+608946.96 798395.18
+609026.36 798363.44
+609141.56 798300.26
+609223.39 798255.72
+609269.96 798221.4
+609314.77 798166.8
+609386.54 798023.68
+609427.79 797941.83
+609460.06 797877.39
+609476.95 797841.72
+609513.3 797783.55
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 609035.79 797715.38
+Region  1
+  8
+612042.44 794612.37
+611896.98 794073.48
+611517.67 794169.95
+611529.6 794224.95
+611692.15 794859.51
+611959.77 794883.85
+612120.89 794904.17
+612042.44 794612.37
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 611812.98 794502.19
+Region  1
+  21
+616671.2 799626.66
+616296.25 799541.44
+616280.86 799567.83
+616434.73 800081.34
+616471.76 800112.11
+616508.2 800122.36
+616538.03 800107.49
+616560.03 800095.98
+616585.49 800063.17
+616647.06 799989.5
+616662.45 799952.11
+616676.75 799889.44
+616687.74 799821.82
+616674 799797.08
+616656.96 799775.09
+616668.5 799744.3
+616681.4 799725.89
+616685.79 799700.6
+616683.05 799672.02
+616698.14 799633.8
+616671.2 799626.66
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 616502.58 799807.2
+Region  1
+  127
+604516.67 802005.15
+604673.04 802066.06
+604733.53 802093.61
+604795.26 802140.52
+604844.64 802200.6
+604866.04 802264.79
+604874.27 802345.44
+604854.1 802480
+604876.76 802452.81
+604900 802428.4
+605078.88 802356.5
+605096.14 802362.82
+605140.43 802395.04
+605180.98 802424.08
+605213.19 802445.94
+605268.98 802427.53
+605301.19 802384.39
+605344.91 802320.55
+605397.82 802244.62
+605461.89 802151.24
+605493.15 802073.35
+605521.67 801999.28
+605529.16 801920.35
+605505.1 801786.2
+605498.05 801731.96
+605496.03 801671.22
+605494.88 801629.17
+605491.42 801573.28
+605489.12 801530.65
+605343.45 800790.35
+605355.7 800678.81
+605394.57 800540.44
+605405.37 800543.94
+605420.29 800547.11
+605495.85 800560.45
+605555.86 800569.66
+605563.79 800517.56
+605576.49 800451.55
+605586.02 800423.61
+605607.92 800371.86
+605662.85 800395.35
+605689.2 800406.15
+605713.97 800415.67
+605736.18 800367.46
+605746.02 800347.14
+605760.31 800316.66
+605788.89 800299.2
+605818.55 800281.9
+605871.12 800252.21
+605899.06 800243
+605930.81 800206.17
+605903.5 800178.23
+605886.99 800163.62
+605835.56 800178.86
+605811.11 800188.07
+605762.53 800182.67
+605773.01 800151.88
+605787.62 800122.03
+605798.1 800099.8
+605811.75 800073.77
+605820.64 800049.94
+605828.58 800030.25
+605839.38 800006.12
+605840.01 799985.8
+605822.13 799959.03
+605793.86 799905.18
+605751.68 799898
+605737.77 799895.31
+605735.53 799859.86
+605732.84 799834.28
+605730.59 799809.15
+605720.93 799739.38
+605710.61 799649.19
+605672.91 799703.48
+605655.86 799720.98
+605628.49 799718.29
+605590.35 799713.8
+605580.92 799703.48
+605575.99 799685.98
+605567.46 799663.1
+605561.18 799638.87
+605546.59 799585.25
+605523.93 799490.34
+605522.59 799408.22
+605548.85 799290.43
+605556.16 799192.25
+605540.98 799189.24
+605418.48 799199.11
+605325.39 799206.07
+605252.25 799222.67
+605169.91 799237.7
+605096.77 799260.14
+605009.27 799284.37
+604710.16 799380.02
+604621.88 799405.99
+604548.63 799429.3
+604502.21 799524.32
+604516.74 799531.49
+604577.92 799557.53
+604610.89 799582.26
+604634.75 799618.7
+604659.27 799700.05
+604676.62 799771.92
+604723.06 799925.67
+604746.05 800000.28
+604765.36 800065.56
+604784.45 800107.63
+604818.28 800175.73
+604855.81 800254.89
+604758.21 800306.51
+604717.44 800338.6
+604641.63 800402.4
+604068.52 800927.89
+604121.71 801165.66
+604132.87 801558.43
+604150.78 801637.8
+604187.03 801703.08
+604210.42 801742.47
+604232.57 801777.55
+604255.96 801815.71
+604288.58 801871.11
+604315.97 801903.44
+604344.49 801926.3
+604400.23 801959.8
+604441.52 801974.84
+604468.01 801985.29
+604516.67 802005.15
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 604982 800833.23
+Region  1
+  49
+610396.51 796849.49
+610129.65 797311.15
+610137.4 797310.56
+610141.32 797310.26
+610228.59 797303.64
+610295.19 797337.91
+610295.21 797337.92
+610303.94 797342.41
+610303.95 797342.41
+610312.77 797346.95
+610631.76 797721.27
+610631.77 797721.28
+610632.61 797722.27
+610660.37 797744.98
+610784.42 797846.47
+610895.94 797914.74
+610954.26 797934.59
+611008.97 797939.4
+611054.7 797924.12
+611077.59 797916.47
+611087.59 797913.13
+611279.6 797714.87
+611615.08 797617.44
+611615.09 797617.44
+611618.55 797616.43
+611754.38 797695.33
+611747.51 797640.44
+611734.97 797597.8
+611731.33 797568.17
+611703.51 797451.9
+611666.53 797339.3
+611638.65 797248.78
+611633.55 797157.64
+611643.01 797067.76
+611670.83 796997.5
+611730.94 796934.21
+611825.87 796913.34
+611868.61 796937.4
+611914.93 796854.82
+611894.42 796844.33
+611899.19 796788.51
+611766.04 796286.36
+611762.54 796273.77
+611356.52 796376.94
+611321.54 796387.43
+610600.74 796581.61
+610409.8 796630.57
+610445.47 796767.66
+610396.51 796849.49
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 611082.25 797086.06
+Region  1
+  183
+604501.94 807272.23
+604430.43 807260.47
+604442.65 807279.93
+604457.59 807299.84
+604468.9 807316.58
+604484.74 807340.57
+604362.09 807316.58
+604345.8 807322.02
+604332.23 807352.79
+604300.55 807352.34
+604249.86 807355.05
+604142.6 807379.91
+604049.38 807404.8
+603952.53 807438.29
+603887.6 807461.15
+603823.34 807479.25
+603729.67 807500.06
+603696.18 807509.56
+603659.08 807522.69
+603672.2 807562.06
+603695.73 807642.6
+603718.82 807737.6
+603718.93 807823.64
+603764.59 807886.25
+603812.09 807907.11
+603886.15 807907.7
+603994.46 807967.75
+604023.62 807998.1
+604030 808034.79
+604050.27 808049.33
+604145.28 808099.27
+604166.85 808139.75
+604148.57 808196.06
+604120.21 808294.14
+604080.44 808385.89
+604036.87 808468.16
+604007.23 808552.95
+603990.82 808590.29
+604004.84 808665.57
+603987.82 808724.41
+603966.98 808762.38
+603926.54 808821.24
+603913.35 808902.86
+603943.19 808972.44
+604004.07 809057.82
+604031.97 809100.19
+604055.47 809162.81
+604167.61 809244.37
+604194.13 809256.19
+604211.09 809263.25
+604240.77 809237.81
+604226.22 809249.17
+604255.94 809220.06
+604277.52 809184.1
+604301.55 809143.82
+604324.88 809191.87
+604365.4 809171.93
+604411.58 809142.81
+604432.47 809135.21
+604453.97 809120.65
+604454.56 809092.64
+604450.32 809054.47
+604467.28 809050.23
+604525.23 809043.17
+604583.19 809036.1
+604617.82 809028.32
+604628.42 809021.26
+604621.35 809007.12
+604612.87 808990.16
+604610.04 808973.9
+604619.94 808954.12
+604666.58 808924.43
+604707.58 808894.69
+604743.62 808877.79
+604756.34 808925.14
+604793.09 808964.72
+604819.24 809010.66
+604834.08 809054.47
+604839.43 809083.15
+604779.42 809212.86
+604768.69 809236.27
+604774.41 809258.41
+604804.82 809290.02
+604837.15 809333.66
+604863.72 809324.16
+604900.41 809295.04
+604913.07 809293.14
+604929.57 809336.15
+604941.59 809333.61
+604963.1 809325.38
+605006.81 809298.14
+605157.61 809399.87
+605006.81 809298.14
+605096.7 809242.63
+605169.68 809194.25
+605159.82 809175.36
+605145.87 809150.06
+605135.09 809134.25
+605130.65 809120.97
+605145.18 809100.09
+605217.92 809043.75
+605282.43 808988.68
+605333.4 808950.86
+605368.73 808920.47
+605424.57 808877.36
+605454.46 808832.98
+605492.07 808780.78
+605478.28 808760.04
+605489.23 808704.56
+605502.66 808644.49
+605516.09 808570.99
+605542.95 808527.17
+605594.54 808479.82
+605638.94 808445.2
+605666.11 808404.69
+605660.33 808340.17
+605629.52 808213.79
+605503.72 808197.53
+605523.51 808121.91
+605497.71 808112.31
+605475.1 808111.6
+605454.6 808113.72
+605454.6 808091.81
+605461.67 808005.59
+605368.38 807993.57
+605335.16 807969.55
+605330.22 807947.64
+605335.52 807848.98
+605315.73 807846.16
+605300.18 807844.04
+605289.4 807839.92
+605269.79 807825.66
+605292.98 807579.27
+605299.18 807436.03
+605262.34 807427.44
+605265.78 807414.35
+605279.9 807351.37
+605292.98 807285.95
+605309.5 807188.98
+605332.22 806994.78
+605151.8 806974.81
+605073.64 806967.59
+605079.15 806928.33
+605089.47 806843.63
+604940.68 806880.36
+604840.87 806902.16
+604814.02 806914.56
+604787.16 806930.4
+604758.92 806942.79
+604753.76 806930.76
+604643.22 806738.31
+604624.63 806688.73
+604632.89 806568.22
+604620.5 806484.89
+604508.94 806608.16
+604457.98 806628.13
+604407.02 806632.95
+604340.22 806628.13
+604256.89 806639.15
+604252.84 806553.62
+604251.04 806470.1
+604246.22 806376.45
+604132.35 806377.8
+604133.62 806416.71
+604104.01 806413.96
+604014.15 806410.49
+604010.71 806456.63
+603970.77 806527.56
+603905.46 806655.66
+603866.96 806746.78
+603853.78 806835.99
+603859.55 806894.83
+603893.19 806971.36
+603929.96 807011.83
+603993.94 807052.92
+604091.48 807097.79
+604207.36 807134.43
+604318.8 807160.94
+604466.33 807193.13
+604507.82 807199.82
+604514.61 807201.18
+604507.82 807229.69
+604501.94 807272.23
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 604649.37 807950.47
+Region  1
+  36
+609923.45 795453.85
+610085.28 795410.24
+610158.17 795390.6
+610273.88 795359.41
+610288.59 795355.45
+610160.8 794944.94
+610151.5 794877.14
+610140.07 794808.88
+610121.34 794779.67
+610097.04 794747.44
+610042.25 794677.14
+610033.36 794659.36
+610021.3 794633.64
+610003.52 794634.59
+609944.46 794637.45
+609854.93 794643.8
+609770.87 794647.4
+609771.51 794630.88
+609756.9 794622.63
+609668.89 794588.79
+609650.79 794590.06
+609601.51 794590.98
+609578.99 794602.24
+609545.7 794643.04
+609513.8 794681.03
+609522.25 794711.51
+609518.49 794767.79
+609508.88 794880.14
+609524.82 794982.43
+609556.95 795148.23
+609597.99 795334.69
+609626.83 795404.31
+609680.3 795519.21
+609695.98 795515.15
+609696.4 795515.04
+609923.45 795453.85
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 609858.46 795048.8
+Region  1
+  93
+612204.3 799892.7
+612173.94 799892.64
+612123.92 799905.92
+612099.13 799904.11
+612113.33 799864.93
+612141.75 799811.98
+612165.85 799767.21
+612171.45 799753.01
+612173.6 799745.26
+612165.5 799740.25
+612138 799730.14
+612088.8 799716.41
+612035.61 799703.18
+611974.26 799686.76
+611978.72 799703.65
+611983.82 799735.92
+611991.06 799762.18
+611997.12 799781.84
+611987.74 799803.73
+611902.55 799840.85
+611884.76 799882.05
+611837.48 799976.62
+611842.57 800017.33
+611848.77 800056.11
+611860.02 800177.69
+611866.05 800228.49
+611870.56 800264.87
+611874.86 800304.9
+611857.21 800315.24
+611831.38 800328.58
+611807.27 800342.79
+611810.72 800390.57
+611815.02 800422.86
+611786.62 800440.08
+611747.01 800464.18
+611756.65 800528.88
+611757.07 800542.37
+611982.41 800618.48
+612040.28 800722.76
+612071.95 800781.4
+612124.73 800880.67
+612120.82 800933.84
+612097.49 801026.49
+612079.38 801095.61
+612096.39 801087.88
+612112.59 801078.67
+612154.18 801062.16
+612202.12 801049.14
+612262.73 801046.65
+612330.35 801051.83
+612401.5 801103.43
+612434.33 801078.8
+612467.55 801051.96
+612498.99 801025.61
+612533.91 801007.54
+612581.54 800999.29
+612640.56 800997.1
+612681.87 800977.06
+612708.08 800955.19
+612755.03 800915.43
+612765.88 800906.74
+612805.35 800845.75
+612860.96 800811.66
+612909.31 800779.97
+612980.15 800732.99
+612995.52 800754.37
+613061.06 800707.96
+613049.71 800690.62
+613182.49 800607.09
+613186.13 800580.4
+613173.59 800531.19
+613146.55 800447.41
+613155.34 800419.2
+613146.55 800399.48
+613135.32 800379.46
+613126.67 800367.19
+613096.71 800304.11
+613056.15 800226.25
+613034.17 800157.98
+612983.11 800070.72
+612932.34 800014.75
+612872.22 799980.93
+612820.94 799972.14
+612752.54 799970.97
+612706.61 799971.19
+612576.45 799936.79
+612519.98 799922.14
+612450.03 799903.38
+612312.86 799865.08
+612304.65 799887.75
+612298.99 799915.69
+612239.59 799899.67
+612204.3 799892.7
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 612441.74 800413.96
+Region  1
+  20
+611580.4 798459.32
+611580.85 798142.82
+611389.82 798144.64
+611251.89 798145.32
+611194.9 798144.41
+611189.99 798181.88
+611177.57 798262.5
+611157.29 798416.92
+611114.66 798563.5
+611161.62 798533.86
+611205.85 798502.86
+611232.75 798492.37
+611260.56 798491.46
+611282.44 798496.02
+611304.1 798504.91
+611327.81 798514.03
+611346.5 798520.41
+611367.48 798514.49
+611480.55 798485.31
+611580.4 798459.32
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 611367.5 798327.2
+Region  1
+  43
+611782.83 798852.38
+611495.18 798748.59
+611392.55 798716.02
+611054.01 798770.98
+610933.86 798792.93
+610779.06 799024.33
+610589.85 799319.74
+610624.38 799488.64
+610658.99 799504.51
+610698.7 799522.64
+610644.41 799587.1
+610550.1 799658.54
+610534.29 799824.88
+610532.34 799854.98
+610556.57 799852.64
+610574.95 799850.68
+610627.72 799844.43
+610688.71 799837.39
+610682.5 799812.22
+610677.74 799785.23
+610707.13 799766.02
+610755.99 799732.36
+610843.18 799674.1
+610903.96 799630.12
+610945.07 799591.54
+610991.42 799627.1
+611031.75 799641.7
+611134.3 799669.66
+611285.88 799704.64
+611466.82 799730.04
+611493.39 799700.73
+611517.42 799640.34
+611548.68 799562.57
+611567.25 799526.35
+611602.81 799465.77
+611618.86 799438.61
+611623.47 799413.99
+611625.06 799326.03
+611636.65 799286.46
+611659.04 799221.5
+611683.17 799148.47
+611723.1 799028.37
+611782.83 798852.38
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 611164.83 799245.06
+Region  1
+  30
+603821.74 797124.86
+603902.14 797132.64
+603964.38 797150.46
+603919.63 797232.02
+603974.54 797261.6
+604020.9 797173.96
+604040.28 797137.45
+604063.45 797095.18
+604100.61 797014.87
+604100.96 796996.76
+604103.2 796986.68
+604150.19 796765.72
+604167.34 796684.44
+603782.76 796535.31
+603761.1 796532.6
+603708.66 796556.62
+603657.23 796588.43
+603611.9 796632.07
+603600.2 796690.36
+603609.72 796725.92
+603626.22 796782.4
+603650.99 796861.78
+603694.84 796951.39
+603736.75 797000.29
+603755.88 797041.3
+603769.17 797067.85
+603772.24 797073.97
+603772.49 797074.48
+603788.19 797105.87
+603821.74 797124.86
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 603887.46 796841.34
+Region  1
+  31
+603693.5 797110.48
+603625.73 797116.95
+603593.98 797119.71
+603560.32 797122.46
+603500.63 797129.27
+603433.32 797136.47
+603360.72 797144.72
+603324.73 797150.91
+603310.97 797176.53
+603306.53 797191.76
+603301.66 797209.33
+603303.78 797221.82
+603329.35 797230.49
+603377.22 797244.73
+603439.02 797260.85
+603492.03 797268.49
+603552.17 797275.47
+603602.8 797274.84
+603653.22 797263.39
+603682.86 797257.46
+603720.56 797238.02
+603713.37 797130.92
+603694.36 797111.08
+603698.13 797109.17
+603772.49 797074.48
+603772.24 797073.97
+603698.09 797108.93
+603698.07 797108.94
+603698.05 797108.95
+603698.03 797108.96
+603693.5 797110.48
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 603530.73 797194.72
+Region  1
+  32
+604066.4 800914.04
+604034.4 800760.74
+604021.47 800697.34
+604004.24 800608.71
+603965.46 800615.48
+603931 800624.72
+603878.25 800637.18
+603835.41 800646.38
+603792.19 800659.37
+603743.43 800649.9
+603713.73 800646.87
+603693.42 800643.8
+603670.65 800641.95
+603671.58 800671.22
+603670.96 800722.92
+603662.34 800772.16
+603648.8 800800.47
+603637.72 800842.32
+603626.95 800876.46
+603615.88 800906.62
+603611.57 800922.01
+603604.18 800936.16
+603491.55 800930.01
+603528.78 801103.88
+603540.48 801153.12
+603568.81 801220.02
+603610.61 801237.71
+603627.71 801242.13
+604057.47 801174.67
+604121.71 801165.66
+604068.52 800927.89
+604066.4 800914.04
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 603819.45 800953.76
+Region  1
+  29
+603960.32 800405.92
+603938.89 800297.21
+603931.33 800239.97
+603925.58 800180.38
+603904.15 800112.43
+603875.67 800075.06
+603835.42 800036.9
+603798.82 800007.63
+603776.61 800087.34
+603752.57 800153.72
+603724.86 800205.99
+603668.94 800264.01
+603639.41 800291.98
+603641.5 800304.53
+603642.03 800346.34
+603642.55 800412.19
+603658.56 800480.45
+603670.65 800641.95
+603693.42 800643.8
+603713.73 800646.87
+603743.43 800649.9
+603792.19 800659.37
+603835.41 800646.38
+603878.25 800637.18
+603931 800624.72
+603965.46 800615.48
+604004.24 800608.71
+603980.85 800501.62
+603960.32 800405.92
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 603813.08 800388.27
+Region  1
+  28
+608948.41 793545.77
+608961.1 793467.46
+608955.39 793367.76
+608943.32 793339.19
+608947.13 793292.83
+609002.78 793209.48
+609051.49 793141.13
+608995.65 793163.6
+608953.74 793149
+608910.78 793131.25
+608896.18 793162.05
+608855.95 793245.52
+608811.88 793330.93
+608759.81 793442.06
+608785.21 793452.22
+608756.68 793491.74
+608709.25 793610.73
+608667.45 793699.13
+608680.47 793703.25
+608695.71 793707.06
+608714.44 793712.46
+608725.24 793716.59
+608730.95 793717.54
+608741.43 793720.4
+608750 793707.06
+608890.02 793633.7
+608918.28 793616.24
+608948.41 793545.77
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 608857.31 793447.2
+Region  1
+  45
+606077.61 806011.73
+605745.81 806310.32
+605394.95 806113.23
+605352.68 806152.3
+605319.61 806148.91
+605305.19 806157.39
+605248.91 806380.45
+605200.01 806589.11
+605164.2 806844.55
+605415.9 806621.76
+606703.67 806756.72
+606726.4 806783.58
+606729.84 806808.37
+606762.34 806812.99
+606824.96 806769.94
+606880.64 806752.83
+606876.65 806742.83
+606864.76 806712.98
+606839.42 806695.91
+606795.72 806673.16
+606757.69 806640.91
+606729.17 806604.87
+606720.25 806559.32
+606725.26 806517.56
+606776.99 806400.02
+606774.64 806341.32
+606753.51 806240.36
+606732.27 806052.55
+606714.43 805960.19
+606690.48 805739.82
+606682.65 805631.03
+606646.65 805491.73
+606634.85 805506.57
+606610.42 805538.27
+606536.55 805597
+606481.46 805646.65
+606437.85 805597.74
+606368.3 805698.97
+606289.79 805808.47
+606185.81 805936.56
+606150.87 805922.12
+606115.91 805908.01
+606111.09 805955.52
+606095.25 805982.38
+606077.61 806011.73
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 606141.58 806308.87
+Region  1
+  61
+602586.14 798507.59
+602557.24 798487.9
+602516.6 798466.64
+602484.21 798399.97
+602445.48 798338.04
+602443.58 798310.42
+602444.21 798266.28
+602347.06 798230.09
+602202.47 798177.56
+602081.31 798126.18
+602060.35 798116.65
+601973.99 798086.81
+602035.59 798175.71
+602038.13 798260.16
+602022.25 798326.84
+602017.81 798400.49
+602005.75 798423.35
+601946.06 798483.04
+601914.95 798554.79
+601949.87 798744.02
+602061 798781.48
+602021.8 798874.63
+601997.67 798912.73
+601955.12 799055.61
+601971.63 799193.35
+601968.46 799209.23
+601995.27 799270.96
+602035.03 799356.26
+602008.36 799437.56
+602209.5 799503.89
+602182.95 799587.21
+602383.14 799649.15
+602372.08 799614.12
+602444.71 799546.65
+602509.6 799501.68
+602593.11 799437.33
+602728.23 799328
+602781.69 799284.49
+602803.62 799253.34
+602806.96 799246.06
+602811.09 799238.43
+602877.16 799203.26
+602957.1 799168.36
+603054.22 799121.36
+603041.69 799088.05
+603001.17 798972.1
+602979.1 798908.73
+602951.16 798884.28
+602927.02 798872.21
+602860.34 798867.13
+602827.15 798869.43
+602753.01 798872.87
+602801.28 798810.95
+602834.62 798772.53
+602839.06 798750.94
+602877.96 798676.13
+602897.65 798631.04
+602827.47 798613.26
+602766.68 798599.32
+602657.59 798543.79
+602586.14 798507.59
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 602389.85 798906.04
+Region  1
+  48
+610073.61 794046.78
+610002.33 794005.36
+609958.2 793974.24
+609989.62 793921.84
+610001.05 793898.03
+609951.84 793835.8
+609903.9 793773.25
+609828.33 793922.79
+609733.4 793925.02
+609703.88 793921.19
+609674.67 793904.36
+609657.52 793871.66
+609610.53 793815.14
+609595.92 793835.78
+609570.53 793871.38
+609553.06 793923.14
+609557.19 793978.07
+609564.37 794005.86
+609622.65 794074.6
+609602.97 794094.92
+609561.06 794132.71
+609581.06 794162.23
+609601.83 794188.43
+609603.73 794293.52
+609644.42 794310.98
+609644.42 794335.75
+609649.64 794456.25
+609650.79 794590.06
+609668.89 794588.79
+609756.9 794622.63
+609771.51 794630.88
+609770.87 794647.4
+609854.93 794643.8
+609944.46 794637.45
+610003.52 794634.59
+610021.3 794633.64
+610021.62 794578.71
+610069.8 794516.06
+610088.49 794473.78
+610085.58 794425.55
+610063.42 794385.67
+610019.9 794340.76
+609996.6 794287.58
+609992.79 794218.68
+610003.59 794165.03
+610024.71 794123.62
+610059.32 794068.37
+610073.61 794046.78
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 609822.33 794242.14
+Region  1
+  32
+605239.41 796179.88
+605890.43 796943.85
+606048.37 797132.45
+606052.17 797114.08
+606058.08 797085.44
+606062.09 797066.05
+606064.25 797055.61
+606073.01 797041.43
+606073.02 797041.42
+606103.48 796992.15
+606162.85 796975.84
+606241.28 796960.92
+606250.16 796848.48
+606222.64 796809.69
+606266.04 796777.67
+606257.93 796768.69
+606247.45 796749
+606239.19 796729.01
+606222.97 796700.49
+606193.2 796661.87
+606157.4 796611.8
+606021.83 796394.35
+605983.59 796272.52
+605734.65 796118.73
+605681.63 796085.93
+605658.77 796065.05
+605587.01 795964.79
+605481.97 796007.66
+605419.2 796039.54
+605357.83 796076.84
+605231.07 796169.79
+605239.41 796179.88
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 605792.64 796500.08
+Region  1
+  32
+612410.34 794953.98
+613034.19 793881.37
+613061.38 793835.57
+613005.18 793808.73
+612949.53 793780.78
+612931.45 793816.55
+612901.83 793828.86
+612827.22 793833.09
+612801.83 793816.93
+612785.68 793793.86
+612783.76 793895.78
+612754.91 793866.93
+612739.53 793853.09
+612709.53 793881.16
+612573.76 794008.03
+612556.05 794033.49
+612550.29 794048.49
+612495.85 794107.08
+612434.31 794142.47
+612346.8 794183.01
+612308.72 794239.55
+612184.44 794296.03
+612181.72 794311.7
+612131.32 794343.71
+612089.77 794355.97
+612106.46 794420.99
+612109.11 794445.47
+612042.44 794612.37
+612120.89 794904.17
+612386.84 794937.71
+612397.3 794944.95
+612410.34 794953.98
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 612489.17 794390.91
+Region  1
+  59
+604729.38 797111.07
+604484.23 796924.33
+604474.23 796916.71
+604291.77 796774.81
+604206.03 796702.41
+604189.56 796681.26
+604179.4 796664.75
+604172.42 796673.64
+604167.34 796684.44
+604150.19 796765.72
+604103.2 796986.68
+604100.96 796996.76
+604100.61 797014.87
+604116.79 797067.23
+604151.72 797135.82
+604141.24 797153.28
+604101.87 797233.29
+604137.68 797386.32
+604160.5 797460.38
+604165.61 797470.38
+604233.47 797533.99
+604280.24 797594.52
+604287.86 797609.34
+604293.63 797618.64
+604314.4 797632.76
+604314.01 797657.06
+604311.47 797690.98
+604319.68 797706.27
+604354.96 797761.55
+604390.24 797819.18
+604412.78 797856.99
+604441.78 797913.05
+604462.76 797950.48
+604487.06 797989.29
+604510.98 797969.69
+604522.74 797961.06
+604538.42 797954.01
+604584.67 797936.37
+604674.61 797900.21
+604815.28 797840.81
+604885.62 797804.87
+604994.59 797805.32
+605030.98 797784.12
+605098.2 797737.87
+605132.58 797729.83
+605164.74 797734.3
+605201.36 797748.14
+605244.23 797764.22
+605304.52 797785.21
+605367.04 797793.25
+605364.36 797748.14
+605349.62 797697.68
+605257.41 797574.66
+605220.79 797535.81
+605151.74 797454.32
+605012.66 797316.51
+604892.09 797233.25
+604818.01 797174.37
+604729.38 797111.07
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 604605.94 797408.49
+Region  1
+  39
+605890.43 796943.85
+605239.41 796179.88
+605231.07 796169.79
+605166.16 796220.67
+605120.98 796265.84
+605078.44 796311.02
+605027.76 796374.82
+604971.18 796459.91
+604951.88 796478.33
+604867.02 796557.07
+604768.55 796639.73
+604699.25 796682.72
+604658.02 796761.23
+604609.11 796835.58
+604543.54 796886.67
+604474.23 796916.71
+604484.23 796924.33
+604729.38 797111.07
+604818.01 797174.37
+604892.09 797233.25
+605012.66 797316.51
+605151.74 797454.32
+605220.79 797535.81
+605257.41 797574.66
+605285.1 797513.93
+605314.16 797449.4
+605326.54 797396.69
+605332.58 797284.91
+605417.67 797320.79
+605447.51 797307.46
+605459.89 797330.6
+605429.09 797403.63
+605446.24 797435.7
+605457.67 797442.05
+605573.89 797282.05
+605625 797192.51
+605721.52 797094.08
+605836.78 796990.21
+605890.43 796943.85
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 605211.08 796876.74
+Region  1
+  59
+613828.84 801483.22
+613777.73 801403.88
+613691.25 801275.75
+613669.61 801291.62
+613605.65 801319.27
+613547.43 801333.85
+613395.83 801381.3
+613342.45 801417.8
+613278.37 801474.52
+613182.48 801640.05
+613159.77 801684.54
+613137.07 801719.83
+613096.57 801788.75
+613056.98 801823.43
+612987.64 801844.29
+612971.99 801859.33
+612872 801908.46
+612862 801913.72
+612928.41 802072.6
+612935.07 802088.16
+612943.01 802109.11
+612948.09 802124.67
+612955.4 802140.21
+612964.29 802158.62
+612969.68 802174.5
+612980.8 802190.69
+612986.2 802204.99
+613077.63 802133.86
+613168.75 802095.77
+613183.36 802093.3
+613232.89 802088.22
+613317.34 802080.92
+613351.95 802079.02
+613396.72 802070.44
+613441.17 802051.71
+613465.93 802026.94
+613565.64 801932.58
+613655.61 802078.17
+613687.28 802157
+613709.17 802148.92
+613741.18 802144.54
+613764.59 802161.28
+613816.81 802195.98
+613847.47 802214.85
+613872.74 802231.35
+613913.84 802259.65
+613958.31 802204.4
+614010.19 802131.97
+614046.41 802080.22
+614136.62 801940.47
+614173.46 801884.39
+614172.36 801884.39
+614172.36 801885.49
+614100.33 801809.07
+614049.75 801752.44
+614005.77 801702.96
+613922.48 801607.04
+613866.4 801530.07
+613828.84 801483.22
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 613552.13 801800.38
+Region  1
+  62
+614615.1 804517.23
+614611.61 804661.09
+614637.83 804649.14
+614678.99 804627.56
+614712.52 804615.61
+614763.97 804591.71
+614796.99 804575.9
+614846.78 804565.61
+614915.82 804564.94
+614962.46 804573.07
+614999.64 804583.36
+615052.08 804606.27
+615100.21 804641.45
+615146.85 804691.08
+615187.18 804761.65
+615209.42 804837.04
+615239.29 805011.98
+615267.18 804990.4
+615326.26 804932.31
+615316.97 804881.19
+615328.25 804855.3
+615387.17 804798.01
+615367.92 804752.54
+615345.01 804704.07
+615351.48 804687.31
+615337.54 804672.7
+615297.71 804648.14
+615298.38 804617.6
+615306.17 804579.61
+615317.62 804494.45
+615309.66 804432.71
+615303.68 804401.84
+615302.19 804362.14
+615295.55 804330.27
+615300.19 804274.33
+615368.46 804215.91
+615431 804143.84
+615442.75 804114.31
+615392.27 804113.04
+615304.64 804054.61
+615272.82 804048.62
+614746.55 803936.55
+614641.16 803921.78
+614629.22 803920.12
+614620.59 803918.46
+614117.87 803873.01
+614080.19 803904.72
+614048.32 803916.67
+614018.12 803925.3
+613999.53 803932.94
+613981.1 803955
+614025.42 804024.56
+614052.18 804069.33
+614075.54 804110.54
+614119.52 804137.55
+614155.37 804132.57
+614185.24 804127.92
+614233.04 804149.83
+614323.82 804207.4
+614489.29 804380.8
+614560.83 804456
+614615.1 804517.23
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 614811.93 804268.77
+Region  1
+  52
+611116.02 803411.38
+611009.44 803397.88
+610757.88 803346.52
+610715.79 803386.35
+610708.1 803420.62
+610703.94 803435.35
+610675.44 803556.4
+610605.56 803557.89
+610546.08 803578.8
+610473.2 803609.45
+610254.91 803702.81
+610267.16 803734.47
+610276.12 803759.26
+610283.43 803775.81
+610335.68 803882.58
+610375.27 803952.2
+610418.12 804001.48
+610482.78 804203.67
+610486.07 804216.22
+610526.63 804214.63
+610596.24 804201.31
+610638.62 804178.51
+610686.72 804168.36
+610800.59 804113.26
+610902.44 804064.5
+610927.75 804059.42
+610954.97 804057.51
+611064.41 804006.84
+611173.87 803966.3
+611237.76 803938.43
+611373.77 804323.04
+611387.27 804325.46
+611388.23 804278.19
+611391.61 804232.38
+611394.27 804191.63
+611394.75 804164.14
+611396.68 804136.17
+611395.23 804110.61
+611399.57 804075.41
+611529.79 803864.7
+611592.96 803889.77
+611575.6 803817.44
+611734.51 803916.05
+611802.02 803906.88
+611838.19 803870.23
+611861.82 803792.58
+611396.64 803355.97
+611342.52 803374.22
+611298.8 803391.57
+611244.3 803409.9
+611211.51 803419.1
+611116.02 803411.38
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 611017.21 803763.33
+Region  1
+  30
+598372.94 790866.12
+598306.78 790893.36
+598247.85 790910.04
+598097.43 790855.56
+598076.88 790871.1
+598116.22 790988.13
+598046.31 791010.85
+598110.71 791205.9
+598280.46 791183.54
+598723.93 791084.55
+598786.2 791105.45
+598837.56 791109.6
+598837.56 791103.7
+598841.04 791099.14
+598764.59 791013.74
+598717.61 790959.52
+598700.37 790935.62
+598659.79 790892.25
+598639.85 790861.52
+598662.71 790810.72
+598683.03 790765
+598606.17 790751.65
+598571.88 790724.98
+598546.48 790699.58
+598520.25 790672.15
+598502.46 790657.14
+598491.9 790649.91
+598453.27 790698.53
+598399.06 790842.77
+598372.94 790866.12
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 598416.39 790980.17
+Region  1
+  125
+607090.66 800127.38
+607005.55 800057.4
+606968.21 800020.03
+606944.9 799985.23
+606910.52 799936.81
+606856.62 799839.42
+606799.89 799738.24
+606725.65 799593.04
+606691.61 799526.85
+606646.67 799446.82
+606627.37 799414.96
+606613.07 799389.56
+606605.77 799374.64
+606541 799394.36
+606485.26 799411.01
+606433.73 799426.85
+606392.9 799437.17
+606360.98 799443.26
+606341.3 799446.43
+606319.07 799443.57
+606304.15 799438.81
+606287.32 799481.04
+606274.59 799502.86
+606261.42 799528.71
+606245.05 799554.5
+606249.09 799572.45
+606254.47 799601.62
+606260.76 799626.75
+606371.38 799712.23
+606387.98 799732.42
+606405.03 799768.77
+606414 799814.09
+606419.38 799881.4
+606426.56 799964.42
+606421.09 800024.9
+606414.74 800052.84
+606391.24 800106.82
+606363.93 800177.31
+606351.87 800216.68
+606339.49 800248.17
+606324.25 800272.93
+606458.24 800380.9
+606520.48 800425.35
+606517.31 800444.4
+606505.24 800492.03
+606489.68 800546.99
+606480.79 800586.36
+606483.97 800596.52
+606466.82 800607.32
+606466.19 800621.92
+606459.2 800650.5
+606447.13 800682.89
+606435.7 800709.56
+606421.1 800738.14
+606430.27 800758.81
+606450.92 800750.24
+606453.8 800722.01
+606456.1 800705.88
+606468.2 800686.87
+606489.96 800687.06
+606536.31 800694.04
+606583.94 800698.49
+606597.67 800712.97
+606604.89 800835.65
+606641.51 800841.38
+606645.9 800930.53
+606617.99 800972.05
+606609.35 800980.69
+606596.1 800991.06
+606581.69 800998.55
+606534.45 801022.75
+606535.6 801037.15
+606537.05 801128.5
+606541.66 801238.53
+606573.34 801293.84
+606589.19 801343.65
+606604.17 801431.22
+606612.23 801477.31
+606623.47 801527.72
+606651.7 801623.35
+606660.34 801749.52
+606668.4 801797.91
+606689.14 801838.24
+606729.22 801892.81
+606787.85 801976.5
+606819.52 802022.83
+606828.98 802035.6
+606831.34 802205.33
+606832.89 802250.44
+606967.26 802248.04
+607000.49 802212.88
+607046.24 802170.98
+607056.57 802176.55
+607063.85 802179.88
+607070.82 802183.82
+607096.29 802200.8
+607153.31 802119.64
+607154.97 802014.89
+607159.23 801937.34
+607233.45 801606.83
+607260.87 801475.39
+607282.11 801351.61
+607324.69 801208.71
+607354.01 801142.52
+607400.34 801085.78
+607489.23 801038.5
+607663.7 800982.21
+607752.59 800943.44
+607813.11 800895.22
+607863.23 800836.59
+607919.96 800770.39
+607955.9 800732.57
+607927.99 800715.91
+607873.74 800681.32
+607837.23 800647.9
+607715.34 800561.19
+607641.2 800495.43
+607574.02 800432.84
+607506.26 800384.08
+607440.95 800320.92
+607369.62 800274.9
+607291.13 800233.29
+607223.99 800199.25
+607162.52 800167.1
+607090.66 800127.38
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 606960.87 800777.78
+Region  1
+  41
+609060.72 800407.82
+609010.03 800456.56
+608961.77 800488.24
+608949.85 800509.94
+608933.28 800575.74
+608901.34 800638.37
+608886.72 800662.26
+608824.55 800726.85
+608748.03 800801.91
+608731.94 800886.23
+608731.94 800912.55
+608738.77 800937.9
+608752.05 800957.97
+608796.74 800988.53
+608837.37 801018.73
+608810.07 801042.12
+608828.49 801063.46
+608855.16 801094.58
+608907.23 801148.55
+608925.64 801132.68
+608953.58 801106.64
+608935.17 801064.1
+608952.95 801059.02
+608984.98 801056.18
+609016.45 801068.54
+609065.27 801098.16
+609082.93 801083.25
+609074.23 801055.84
+609069.74 801005.82
+609109.89 800901.22
+609143.27 800822.63
+609142.8 800716.42
+609206 800588.07
+609251.3 800512.74
+609313.13 800447.28
+609272.98 800382.23
+609195.97 800274.02
+609072.4 800120.73
+609145.03 800215.29
+609086.07 800336.17
+609060.72 800407.82
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 609015.77 800713.88
+Region  1
+  45
+615119.27 798565.21
+614982.73 798259.75
+614601.96 798190.07
+614119.96 798258.97
+614077.67 798358.91
+614052.7 798437.27
+614051.54 798516.36
+614061.11 798582.15
+614107.38 798689.27
+614144.87 798735.7
+614021.2 798750.99
+614011.2 798754.79
+614425.83 799219.17
+614434.76 799229.17
+614482.29 799275.33
+614534.77 799326.3
+614583.67 799354.24
+614642.09 799354.24
+614707.04 799306.85
+614720.52 799280.3
+614723.03 799172.24
+614729.52 799142.75
+614759.68 799098.77
+614788.16 799076.99
+614871.92 799051.86
+614926.79 799037.62
+614975.46 799026
+615046.58 799008.86
+615109.45 798993.55
+615222.48 798966.88
+615280.9 798946.56
+615316.47 798907.13
+615366.98 798788.8
+615401.56 798771.24
+615409.81 798742.67
+615414.89 798726.79
+615422.51 798703.93
+615418.71 798684.89
+615387.59 798655.67
+615367.27 798632.81
+615352.02 798618.84
+615339.96 798562.32
+615319.95 798473.77
+615307.25 798479.48
+615119.27 798565.21
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 614658.47 798696.42
+Region  1
+  98
+608485.65 793140.1
+608524.39 793134.1
+608623.13 793088.7
+608670.76 793100.13
+608821.25 793093.46
+608910.78 793131.25
+608953.74 793149
+608995.65 793163.6
+609051.49 793141.13
+609107.16 793048.72
+609168.81 792948.9
+609183.73 792875.22
+609133.88 792693.65
+609132.61 792641.89
+609143.4 792564.45
+609156.73 792476.21
+609177.05 792422.87
+609258.99 792314.26
+609346.45 792207.1
+609411.09 792120.89
+609450.46 792057.7
+609360.6 792031.35
+609317.1 792080.56
+609265.34 792113.9
+609224.2 792130.26
+609169.27 792139.46
+609105.13 792135.65
+609094.15 792134.09
+609037.44 792121.1
+609048.87 792076.65
+609056.81 792065.22
+609071.73 792049.38
+609046.65 792032.86
+609030.77 792021.75
+609012.36 792015.4
+608973.94 792015.41
+608908.53 792010.33
+608877.73 792010.01
+608833.92 792023.66
+608789.47 791970.67
+608736.76 791937.33
+608683.11 791923.05
+608706.28 791870.34
+608511.34 791781.74
+608497.16 791817.53
+608482.91 791832.07
+608456.87 791850.17
+608427.98 791859.06
+608366.7 791857.48
+608320.34 791864.14
+608299.38 791888.28
+608271.39 791975.44
+608273.3 792011.95
+608292.66 792014.82
+608297.11 792037.36
+608265.99 792092.29
+608244.4 792113.88
+608232.97 792128.48
+608205.03 792173.25
+608202.18 792184.68
+608204.4 792195.16
+608231.7 792213.89
+608238.17 792280.03
+608230.87 792309.24
+608216.9 792335.6
+608182.61 792354.33
+608165.15 792380.68
+608148.95 792415.61
+608099.74 792475.95
+608059.1 792516.59
+608060.68 792521.98
+608071.16 792528.34
+608085.13 792564.85
+608103.92 792633.38
+608072.35 792677.66
+608029.49 792735.12
+607978.69 792781.16
+607935.51 792819.26
+607876.65 792872.58
+607719.1 793019.46
+607755.61 793046.45
+607746.72 793078.52
+607728.73 793101.37
+607764.6 793138.84
+607775.34 793113.07
+608124.01 793253.49
+608147.19 793264.92
+608179.57 793161.73
+608222.76 793122.67
+608267.89 793092.28
+608296.1 793064.88
+608318 793045.83
+608311.02 793091.87
+608300.54 793132.82
+608369.76 793151.24
+608439.61 793165.82
+608445.01 793137.56
+608485.65 793140.1
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 608591.72 792577.33
+Region  1
+  66
+608271.39 791975.44
+607594.94 791924.01
+607540.97 791922.43
+607488.58 791916.73
+607456.51 791930.7
+607435.24 791894.5
+607401.91 791871.35
+607339.68 791856.74
+607253.63 791872.3
+607157.11 791869.46
+607064.4 791846.6
+607078.78 791940.11
+607089.48 792036.16
+607105.99 792119.35
+607140.28 792224.32
+607151.39 792293.05
+607170.1 792410.42
+607172.02 792456.62
+607183.43 792515.49
+607182.6 792666.54
+607217.53 792672.58
+607263.56 792693.84
+607288.64 792708.12
+607321.66 792724.95
+607361.35 792731.94
+607409.29 792706.22
+607446.44 792707.17
+607517.24 792710.35
+607525.18 792654.46
+607528.42 792592.76
+607534.86 792538.47
+607600.9 792511.17
+607613.6 792502.28
+607653.28 792524.18
+607734.25 792494.02
+607787.9 792454.65
+607817.43 792448.93
+607826.98 792414.8
+607846.98 792402.26
+607913.02 792442.27
+607941.62 792419.11
+607953.05 792419.11
+607987.34 792426.73
+608014.96 792443.88
+608034.97 792472.45
+608039.73 792496.27
+608049.57 792511.51
+608059.1 792516.59
+608099.74 792475.95
+608148.95 792415.61
+608165.15 792380.68
+608182.61 792354.33
+608216.9 792335.6
+608230.87 792309.24
+608238.17 792280.03
+608231.7 792213.89
+608204.4 792195.16
+608202.18 792184.68
+608205.03 792173.25
+608232.97 792128.48
+608244.4 792113.88
+608265.99 792092.29
+608297.11 792037.36
+608292.66 792014.82
+608273.3 792011.95
+608271.39 791975.44
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 607613.83 792231.96
+Region  1
+  51
+611575.67 809277.92
+611601.06 809292.42
+611626.45 809319.62
+611648.21 809345.01
+611681.76 809343.2
+611708.05 809343.2
+611739.79 809342.29
+611765.18 809339.57
+611801.44 809339.57
+611872.63 809335.61
+611923.41 809333.79
+611976 809323.82
+611979.62 809302.96
+612024.92 808792.02
+612017.32 808788.23
+611958.32 808804.74
+611850.87 808809.76
+611795.56 808809.76
+611774.71 808812.48
+611742.07 808823.36
+611718.16 808831.53
+611703.4 808839.61
+611681.89 808844.05
+611627.44 808842.18
+611621.86 808779.39
+611614 808690.99
+611520.83 808685.54
+611516.81 808705.66
+611513.43 808767.58
+611509.95 808796.16
+611504.51 808838.78
+611502.7 808883.21
+611499.07 808939.42
+611419.28 808864.16
+611378.07 808871.39
+611335.03 808870.78
+611302.75 808876.49
+611281.25 808894.21
+611255.3 808901.18
+611223.03 808911.95
+611198.94 808935.61
+611256.06 809002.71
+611269.66 809039.89
+611283.26 809107.89
+611302.3 809158.66
+611321.34 809176.8
+611392.07 809204
+611433.77 809220.32
+611484.55 809238.46
+611538.05 809262.03
+611575.67 809277.92
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 611667.36 809046.53
+Region  1
+  95
+607773 810132.63
+607782 810173.47
+607777.5 810231.95
+607737.36 810334.4
+607709.67 810396.7
+607687.94 810465.2
+607671.87 810507.44
+607670.77 810519.45
+607727.96 810538.71
+607734.3 810543.77
+607760.63 810583.27
+607774.28 810613.11
+607810.35 810641.79
+607991.75 810779.17
+607969.6 810654.57
+608119.12 810619.27
+608132.62 810627.92
+608246.14 810536.54
+608289.75 810579.46
+608321.59 810563.54
+608365.2 810592.61
+608385.28 810645.22
+608451.48 810539.01
+608464.89 810522.7
+608561.8 810603
+608578.41 810641.76
+608599.87 810659.76
+608631.71 810681.22
+608666.32 810700.6
+608704.22 810717.29
+608714.22 810710.56
+608775.7 810669.18
+608811.12 810635.63
+608846.53 810604.62
+608868.03 810584.37
+608883.84 810564.75
+608892.68 810540.07
+608879.87 810511.28
+608868.1 810481.51
+608854.95 810442.06
+608841.8 810418.52
+608830.03 810406.75
+608826.07 810394.61
+608827.96 810380.69
+608842.74 810330.33
+608889.03 810257.8
+608862.78 810243.29
+608846.2 810230.86
+608824.78 810210.13
+608806.13 810175.6
+608781.63 810128.44
+608764.76 810088.91
+608746.84 810044.64
+608733.66 810013.02
+608712.58 809983.5
+608688.34 809965.06
+608667.78 809935.54
+608653.03 809906.56
+608634.05 809871.77
+608614.02 809840.68
+608584.51 809813.27
+608551.39 809796.92
+608519.68 809791.66
+608487.45 809789.99
+608458.28 809796.68
+608427.71 809711.83
+608391.35 809677.67
+608366.58 809658.69
+608339.7 809638.14
+608319.15 809617.06
+608302.81 809596.5
+608289.63 809583.85
+608270.13 809562.24
+608235.87 809525.35
+608203.72 809490.04
+608156.28 809436.81
+608049.29 809507.43
+607999.8 809537.81
+607959.21 809565.02
+607936.37 809588.56
+607914.91 809613.48
+607890.68 809652.93
+607874.76 809650.86
+607817.99 809637.01
+607782.69 809681.32
+607763.86 809709.98
+607731.12 809738.41
+607683.36 809778.56
+607652.9 809802.1
+607582.3 809848.48
+607636.98 809925.31
+607683.71 809994.19
+607723.16 810051.64
+607746.7 810086.25
+607773 810132.63
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 608226.42 810147.25
+Region  1
+  40
+613749.53 803345.94
+613716.42 803260.38
+613684.12 803138.48
+613672.54 803098.52
+613640.88 803009.83
+613644.38 802916.45
+613442.67 802872.15
+613420.09 802890.1
+613389.98 802913.84
+613366.82 802928.9
+613337.29 802950.32
+613288.08 802987.38
+613200.92 803049.59
+613134.91 802929.19
+613059.06 802896.19
+612961.79 803397.67
+612969.89 803452.68
+612919.17 803476.8
+613055.01 803551.62
+613146.94 803598.16
+613273.73 803659.74
+613362.55 803706.24
+613418.32 803733.46
+613484.54 803763.12
+613543.62 803786.69
+613608.18 803807.06
+613679.88 803824.32
+613760.87 803838.26
+613834.23 803846.96
+613945.09 803856.92
+614118.36 803873.52
+614120.19 803807.62
+614122.18 803746.88
+614138.53 803729.13
+614159.93 803708.19
+614172.74 803695.63
+614180.47 803688.62
+614190.86 803678.22
+613745.06 803370.02
+613749.53 803345.94
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 613495.14 803405.54
+Region  1
+  89
+602285.18 797543.89
+602290.89 797519.12
+602337.25 797461.97
+602362.02 797440.8
+602401.38 797411.38
+602418.31 797396.78
+602428.26 797385.35
+602454.93 797367.99
+602472.92 797375.61
+602478 797397.41
+602482.87 797434.45
+602520.12 797347.87
+602545.93 797312.81
+602584.45 797260.32
+602602.23 797239.58
+602598.42 797215.22
+602584.88 797175.22
+602563.5 797143.26
+602513.76 797118.71
+602458.66 797119.3
+602406.01 797123.54
+602374.59 797092.97
+602342.75 797058.58
+602316.85 797028.86
+602300.71 797009.33
+602287.97 796993.62
+602270.14 796971.96
+602224.88 797010.69
+602192.62 797037.19
+602147.68 797074.64
+602101.01 797111.51
+602064.97 797142.38
+602018.31 797180.97
+601983.75 797208.62
+601948.61 797238
+601908.2 797268.02
+601882.94 797281.21
+601854.14 797293.3
+601793.08 797315.19
+601886.97 797507.59
+601864.51 797524.88
+601844.65 797536.68
+601821.03 797550.51
+601795.68 797553.97
+601772.84 797560.37
+601757.83 797588.98
+601747.6 797625.54
+601755.24 797705.69
+601777.29 797733.79
+601829.59 797776.59
+601844.08 797802.32
+601847.97 797866.73
+601847.54 797885.32
+601848.4 797905.2
+601870.45 797890.5
+601878.66 797884.02
+601886.01 797877.97
+601894.22 797869.75
+601912.38 797847.27
+601901.14 797812.26
+601889.68 797786.53
+601866.77 797744.17
+601843.43 797701.37
+601818.35 797655.98
+601829.16 797642.58
+601840.67 797640.05
+601856.83 797641.28
+601873.25 797651.66
+601906.97 797695.75
+601931.61 797721.69
+601941.42 797725.4
+601954.96 797722.55
+602047.9 797680.19
+602061.3 797779.62
+602077.51 797817.88
+602102.58 797869.75
+602111.43 797888.12
+602149.04 797897.2
+602220.8 797920.98
+602255.82 797934.81
+602294.29 797945.18
+602278.73 797909.74
+602252.36 797853.54
+602235.93 797818.09
+602220.37 797785.24
+602229.3 797768.64
+602240.09 797733.71
+602262.95 797644.18
+602285.18 797543.89
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 602150.63 797425.48
+Region  1
+  82
+604203.99 789091.23
+604541.81 789001.33
+604566.57 789049.27
+604711.04 789220.76
+604789.14 789148.97
+604863.12 789078.49
+604937.09 789011.15
+604951.06 788988.61
+604996.78 788842.87
+605134.9 788781.59
+605261.58 788700.6
+605324.13 788669.14
+605338.42 788658.03
+605382.55 788588.5
+605400.97 788545.95
+605413.99 788521.52
+605427.32 788493.9
+605446.69 788452.62
+605468.28 788402.14
+605518.12 788409.79
+605569.24 788419.31
+605617.18 788430.11
+605629.25 788407.25
+605648.62 788370.41
+605671.79 788328.5
+605733.71 788213.23
+605774.98 788133.26
+605721.64 788130.4
+605704.81 788122.78
+605689.89 788111.67
+605671.48 788083.69
+605611.16 788053.53
+605549.24 788026.54
+605491.78 788097.98
+605456.54 788143.1
+605412.41 788198.99
+605381.7 788245.28
+605372.72 788288.8
+605387.01 788325.93
+605215.24 788344.67
+605171.1 788404.36
+605120.62 788452.63
+605065.38 788492.95
+604990.13 788539.3
+604950.76 788562.16
+604905.23 788588.27
+604864.72 788615.18
+604834.24 788617.69
+604730.1 788624.36
+604691.36 788584.99
+604648.82 788502.43
+604609.13 788425.28
+604597.71 788403.06
+604581.92 788374.88
+604554.61 788327.57
+604490.16 788350.43
+604457.77 788329.49
+604417.77 788323.14
+604358.4 788339.65
+604325.06 788346
+604293.08 788362.85
+604269.04 788395.76
+604258.7 788406.05
+604248.22 788440.34
+604073.27 788439.43
+604007.55 788501.02
+603983.74 788532.77
+603974.85 788553.09
+604023.74 788574.1
+604015.49 788614.1
+604006.6 788631.25
+603993.26 788645.54
+603969.45 788653.47
+603924.36 788661.11
+603932.3 788666.83
+603934.84 788673.18
+603940.55 788684.29
+603971.03 788692.86
+604007.76 788705.87
+603899.51 789107.4
+603926.18 789106.77
+604203.99 789091.23
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 604696.44 788677.63
+Region  1
+  82
+610994.52 806714.04
+610976.2 806812.55
+610950.3 806882.34
+610929.27 806921.15
+610894.22 807002.12
+610877.72 807050.03
+610839.86 807148.75
+610823.5 807227.84
+610810.31 807303.13
+610800.91 807381.59
+610814.91 807443.58
+610859.94 807545.39
+610916.34 807540.67
+611036.58 807590.85
+611065.18 807631.35
+611218.84 807775.69
+611369.4 807908.36
+611416.82 807935.44
+611461.04 807959.29
+611513.14 807977.82
+611557.48 807996.78
+611606.23 808006.87
+611642.16 808016.17
+611679.92 808024.12
+611737.06 808006.24
+611777.31 807985.86
+611874.85 807945.77
+611875.76 807917.66
+611877.34 807713.25
+611912.25 807564.81
+611984.19 807455.57
+612016.43 807447.81
+612068.39 807359.6
+612053.47 807348.95
+612099.83 807227.44
+611980.2 807136.56
+611862.96 807131.23
+611944.5 806787.59
+611998.15 806679.13
+612002.86 806670.67
+612007.66 806657.35
+612041.1 806592.44
+612069.47 806517.19
+612067.08 806483.89
+612053.58 806407.09
+612045.5 806350.43
+612050.29 806274.87
+612071.08 806149.53
+612101.72 806118.35
+612156.61 806079.99
+612265.25 806019.2
+612324.09 805983.12
+612384.96 805941.14
+612399.88 805918.14
+612418.53 805883.5
+612427.06 805845.67
+612371.64 805841.94
+612339.13 805831.28
+612216.57 805760.94
+612099.59 805690.31
+611979.71 805614.81
+611795.33 805517.3
+611785.21 805528.49
+611782.54 805555.66
+611755.1 805617.74
+611751.37 805653.97
+611692.23 805663.56
+611642.68 805683.8
+611620.84 805709.91
+611609.94 805752.26
+611601.13 806134.52
+611521.21 806130.79
+611426.38 806177.68
+611301.18 806074.85
+611073.69 806276.23
+611049.72 806323.12
+611033.2 806369.47
+611020.62 806429.95
+611016.3 806512.83
+611008.83 806584.13
+611001.77 806649.59
+610994.52 806714.04
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 611553.42 806838.7
+Region  1
+  102
+612097.89 798438.95
+612167.2 798383.78
+612259.98 798313.35
+612347.52 798244.5
+612394.02 798151.94
+612432.56 798074.2
+612486.36 798034.99
+612544.26 798001.71
+612632.94 797964.54
+612663.04 797958.62
+612744.19 797961.35
+612740.55 797921.68
+612738.27 797907.55
+612735.31 797892.8
+612706.13 797894.17
+612676.04 797895.54
+612624.06 797898.27
+612612.67 797802.98
+612604.46 797734.13
+612602.18 797715.89
+612597.16 797680.33
+612593.97 797653.43
+612572.09 797653.43
+612569.35 797616.95
+612563.42 797577.74
+612540.17 797579.11
+612489.1 797587.32
+612459.47 797574.55
+612438.95 797568.62
+612403.39 797543.55
+612509.85 797394.67
+612404.75 797334.37
+612501.86 797166.47
+612502.35 797165.63
+612502.83 797164.79
+612549.01 797084.94
+612576.29 797037.77
+612575.72 797037.73
+612458.25 797060.59
+612418.88 797058.05
+612364.9 797033.28
+612267.11 796987.56
+612153.95 796980.3
+612131.73 797002.91
+612017.03 796992.71
+611965.5 796980.78
+611885.59 796945.74
+611868.61 796937.4
+611825.87 796913.34
+611730.94 796934.21
+611670.83 796997.5
+611643.01 797067.76
+611633.55 797157.64
+611638.65 797248.78
+611666.53 797339.3
+611703.51 797451.9
+611731.33 797568.17
+611734.97 797597.8
+611747.51 797640.44
+611754.38 797695.33
+611618.55 797616.43
+611615.09 797617.44
+611615.08 797617.44
+611279.6 797714.87
+611087.59 797913.13
+611077.59 797916.47
+611054.7 797924.12
+611060.01 797931.73
+611105.13 797998.74
+611135.88 798000.34
+611169.51 798000.32
+611212.47 798001.71
+611200.16 798091.07
+611194.9 798144.41
+611251.89 798145.32
+611389.82 798144.64
+611580.85 798142.82
+611580.4 798459.32
+611480.55 798485.31
+611367.48 798514.49
+611346.5 798520.41
+611327.81 798514.03
+611304.1 798504.91
+611282.44 798496.02
+611260.56 798491.46
+611232.75 798492.37
+611205.85 798502.86
+611161.62 798533.86
+611114.66 798563.5
+611092.77 798638.76
+611054.01 798770.98
+611392.55 798716.02
+611495.18 798748.59
+611782.83 798852.38
+611829.34 798868.79
+611915.51 798900.25
+611928.05 798854.92
+611955.86 798755.53
+611972.05 798709.26
+612004.88 798629.47
+612075.32 798469.21
+612097.89 798438.95
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 611903.78 797880.65
+Region  1
+  61
+604423.24 798855.26
+604631.29 798767.85
+604679.01 798727.5
+604727.61 798671.97
+604766 798603.63
+604850.39 798403.79
+604594.35 798440
+604542.41 798446.59
+604519.4 798441.87
+604464.14 798388.96
+604451.6 798387.39
+604485.49 798254.69
+604510.97 798178.66
+604520.19 798137.69
+604515.1 798078.5
+604496.08 798035.94
+604487.06 797989.29
+604462.76 797950.48
+604441.78 797913.05
+604412.78 797856.99
+604390.24 797819.18
+604354.96 797761.55
+604319.68 797706.27
+604311.47 797690.98
+604314.01 797657.06
+604314.4 797632.76
+604293.63 797618.64
+604287.86 797609.34
+604260.7 797630.01
+604243.84 797644.12
+604238.35 797649.22
+604229.34 797657.06
+604222.29 797663.33
+604216.21 797669.03
+604197.39 797686.28
+604187.18 797696.08
+604174.24 797707.84
+604159.34 797723.13
+604191.08 797730.58
+604244.8 797740.38
+604204.42 797779.97
+604153.85 797826.23
+604135.1 797842.04
+604114.51 797864.04
+604101.81 797876.11
+604077.78 797903.14
+604073.02 797939.34
+604053.05 797978.38
+604116.1 798006.61
+604092.29 798048.2
+604119.45 798122.78
+604306.78 798582.97
+604128.16 798658.36
+604085.93 798775.84
+604150.64 798931.22
+604221.45 799108.41
+604298.09 799081.15
+604307.02 799053.27
+604369.43 798914.45
+604393.11 798878.94
+604423.24 798855.26
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 604367.49 798397.82
+Region  1
+  59
+611097.39 809452.46
+611097.39 809486.01
+611076.53 809546.76
+611039.36 809635.62
+611046.61 809665.54
+611144.99 810017.79
+611184.9 810041.16
+611214.66 810050.01
+611234.28 810045.57
+611248.82 810032.91
+611264.62 810004.44
+611274.07 809958.25
+611270.84 809891.83
+611266.37 809850.08
+611272.01 809793.78
+611277.05 809775.43
+611350.81 809657.86
+611588.37 809973.39
+611619.2 809909.01
+611676.58 809882.79
+611718.48 809874.11
+611800.09 809851.45
+611833.64 809841.47
+611869 809841.47
+611740.24 809623.81
+611740.24 809570.32
+611678.13 809440.22
+611682.67 809413.92
+611765.18 809339.57
+611739.79 809342.29
+611708.05 809343.2
+611681.76 809343.2
+611648.21 809345.01
+611626.45 809319.62
+611601.06 809292.42
+611575.67 809277.92
+611538.05 809262.03
+611484.55 809238.46
+611433.77 809220.32
+611392.07 809204
+611321.34 809176.8
+611302.3 809158.66
+611283.26 809107.89
+611269.66 809039.89
+611256.06 809002.71
+611198.94 808935.61
+611189.61 808914.71
+611183.27 808916.86
+611168.73 808931.41
+611144.72 808964.32
+611128.29 808986.48
+611107.41 808989.02
+611064.74 809000.9
+611040.26 809076.15
+611002.18 809179.52
+611035.96 809208.72
+611045.25 809261.56
+611063.29 809330.17
+611097.39 809452.46
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 611366.04 809516.79
+Region  1
+  35
+612627.29 795734.74
+612476.97 795141.57
+612476.96 795141.53
+612476.94 795141.43
+612476.85 795141.09
+612437.9 794987.39
+612433.5 794970.02
+612423.28 794962.94
+612423.28 794962.95
+612410.34 794953.98
+612397.3 794944.95
+612386.84 794937.71
+612120.89 794904.17
+611959.77 794883.85
+611692.15 794859.51
+611683.12 794858.69
+611447.42 794837.26
+611447.21 794837.24
+611321.14 794825.77
+611229.67 794817.46
+611227.96 794817.3
+611209.69 794815.64
+611000.71 794871.73
+610957.01 794883.46
+610964.47 794905.01
+611356.52 796376.94
+611762.54 796273.77
+612842.35 795983.71
+612749.68 795876.43
+612749.62 795876.36
+612749.56 795876.29
+612729.07 795852.56
+612641.71 795751.43
+612638.47 795747.68
+612627.29 795734.74
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 611823.95 795542
+Region  1
+  113
+605706.05 795244.08
+605671.11 795215.3
+605644.39 795169.06
+605597.12 795190.64
+605562.18 795205.03
+605528.27 795138.23
+605501.55 795100.21
+605482.03 795075.55
+605440.42 795029.82
+605400.34 794990.77
+605359.24 794956.86
+605310.94 794918.84
+605242.1 794886.98
+605223.6 794877.74
+605171.19 794859.24
+605104.4 794842.8
+605060.21 794836.63
+605065.35 794763.67
+605036.58 794758.53
+605019.11 794746.2
+605001.64 794733.87
+604982.12 794718.46
+604969.78 794707.15
+604950.26 794694.82
+604917.38 794678.38
+604875.25 794665.02
+604851.15 794652.38
+604733.5 794745.28
+604596 794852.56
+604604.89 794904.64
+604626.96 794967.64
+604645.31 795017.95
+604631.02 795042.4
+604712.62 795091.01
+604788.5 795112.92
+604861.53 795115.46
+604840.89 795157.37
+604784.38 795181.82
+604691.67 795201.85
+604598.32 795209.79
+604620.23 795219.95
+604633.56 795225.35
+604695.12 795263.28
+604756.53 795266.79
+604876.94 795294.21
+604980.01 795345.08
+605095.6 795432.15
+605223.67 795556.7
+605368.17 795679.73
+605436.14 795767
+605476.93 795816.55
+605576.92 795949
+605579.99 795953.83
+605587.01 795964.79
+605658.77 796065.05
+605681.63 796085.93
+605734.65 796118.73
+605983.59 796272.52
+606021.83 796394.35
+606157.4 796611.8
+606193.2 796661.87
+606222.97 796700.49
+606239.19 796729.01
+606253.8 796703.58
+606269.8 796673.28
+606300.79 796599.14
+606320.48 796530.56
+606347.15 796473.4
+606392.23 796414.98
+606422.08 796399.1
+606456.36 796450.52
+606505.26 796501.33
+606570.66 796533.71
+606657.34 796544.18
+606717.98 796537.83
+606740.2 796434.69
+606794.18 796198.8
+606725.28 796169.59
+606663.05 796137.84
+606576.37 796083.86
+606540.49 796028.94
+606492.87 795951.78
+606462.71 795893.97
+606484.02 795779.57
+606500.45 795702.35
+606544.3 795608.74
+606538.27 795567.15
+606502.07 795501.76
+606457.94 795426.54
+606382.05 795309.34
+606316.02 795209.95
+606263.63 795140.74
+606243.23 795068.72
+606231.81 794997.83
+606226.72 794942.76
+606121.73 794977.41
+605939.84 795042.15
+605945.49 795046.77
+605967.07 795075.55
+605981.45 795110.49
+605975.29 795137.2
+605968.09 795161.87
+605950.62 795195.78
+605929.04 795222.5
+605920.82 795227.64
+605889.99 795247.16
+605876.64 795254.35
+605845.81 795264.63
+605830.39 795266.68
+605802.65 795268.74
+605772.84 795267.71
+605745.1 795258.46
+605706.05 795244.08
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 605804.48 795614.98
+Region  1
+  82
+605200.01 806589.11
+605248.91 806380.45
+605305.19 806157.39
+605305.19 806141.28
+605296.31 806111.18
+605309.02 806066.24
+605324.29 805999.25
+605352.27 805883.93
+605352.27 805850.86
+605329.89 805809.7
+605285.72 805776.67
+605261.98 805735.12
+605261.98 805692.72
+605278.93 805655.42
+605329.81 805619.8
+605368.81 805574.86
+605383.65 805537.98
+605381.11 805494.73
+605303.1 805293.77
+605279.36 805263.25
+605249.68 805247.13
+605214.6 805241.63
+605136.91 805240.35
+605090.55 805257.51
+605011.47 805291.08
+604946.55 805323.03
+604901.61 805344.23
+604906.87 805362.5
+604942.06 805461.3
+604970.62 805527.08
+604978.91 805573.89
+604951.09 805599.21
+604922 805618.84
+604891.49 805658.95
+604867.39 805691.32
+604844.66 805760.18
+604823.31 805834.55
+604823.31 805861.41
+604835.03 805920.66
+604854.3 805993.63
+604837.08 806036.33
+604787.5 806099.69
+604661.82 806260.45
+604610.52 806324.8
+604580.91 806364.74
+604554.74 806368.87
+604540.96 806347.52
+604521.34 806304.52
+604488.97 806267.34
+604460.05 806247.37
+604430.44 806234.97
+604402.2 806229.46
+604375 806227.7
+604348.14 806239.41
+604298.56 806230.45
+604247.6 806218.06
+604255.17 806271.77
+604246.22 806376.45
+604251.04 806470.1
+604252.84 806553.62
+604256.89 806639.15
+604340.22 806628.13
+604407.02 806632.95
+604457.98 806628.13
+604508.94 806608.16
+604620.5 806484.89
+604632.89 806568.22
+604624.63 806688.73
+604643.22 806738.31
+604753.76 806930.76
+604758.92 806942.79
+604787.16 806930.4
+604814.02 806914.56
+604840.87 806902.16
+604940.68 806880.36
+605089.47 806843.63
+605079.15 806928.33
+605073.64 806967.59
+605151.8 806974.81
+605161.44 806882.53
+605164.2 806844.55
+605200.01 806589.11
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 604937.34 806176.05
+Region  1
+  46
+603582.75 794507.53
+603622.95 794530.87
+603674.06 794543.54
+603719.78 794548.62
+603784.68 794555.67
+603845.51 794568.3
+603862.02 794569.57
+603905.2 794581
+603936.32 794597.51
+603964.89 794609.58
+603990.93 794541.63
+604032.84 794445.11
+604054.24 794368.98
+604054.68 794292.16
+604041.98 794209.61
+604064.84 794181
+603838.15 794046.38
+603797.53 793742.87
+603720.67 793750.43
+603692.74 793821.73
+603644.56 793873.15
+603621.71 793885.77
+603606.48 793898.51
+603590.51 793930.96
+603571.11 793956.84
+603527.78 794022.29
+603499.45 794070.61
+603464.46 794132.68
+603391.14 794174.76
+603354.48 794185.59
+603323.03 794180.84
+603311.37 794190.42
+603302.62 794199.17
+603292.75 794210
+603277.56 794225.82
+603261.11 794244.81
+603261.29 794248.73
+603262.92 794272.84
+603289.38 794275.38
+603322.19 794286.81
+603353.54 794301.15
+603387.73 794330.27
+603433.32 794373.96
+603477.02 794423.97
+603526.22 794471.61
+603582.75 794507.53
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 603720.07 794237.54
+Region  1
+  96
+602951.16 798884.28
+602979.1 798908.73
+603001.17 798972.1
+603041.69 799088.05
+603054.22 799121.36
+603063.81 799129.62
+603068.87 799135.21
+603080.59 799147.47
+603106.7 799175.71
+603131.91 799207.55
+603185.72 799274.14
+603246.98 799272.01
+603298.4 799276.81
+603365.35 799257.35
+603411.72 799248.46
+603432.67 799252.59
+603462.84 799269.74
+603503.64 799311.51
+603545.24 799359.77
+603598.75 799400.56
+603646.38 799433.59
+603707.35 799475.18
+603704.17 799519
+603722.27 799512.02
+603774.98 799489.79
+603847.39 799462.16
+603890.57 799440.57
+603919.94 799404.51
+603936.77 799341.32
+603941.22 799287.65
+603947.41 799224.9
+603968.68 799176.96
+603992.98 799141.27
+604019.65 799104.12
+604058.87 799037.28
+604069.82 798845.94
+604078.3 798817.12
+604085.93 798775.84
+604128.16 798658.36
+604306.78 798582.97
+604119.45 798122.78
+604092.29 798048.2
+604116.1 798006.61
+604053.05 797978.38
+604024.76 798024.43
+603977.13 798070.47
+603943.48 798040.63
+603868.23 798024.12
+603764.41 798044.75
+603737.75 798061.26
+603714.57 798086.03
+603706 798096.51
+603699.97 798102.54
+603695.84 798106.35
+603691.08 798111.43
+603685.04 798118.11
+603666.05 798136.72
+603607.94 798326.93
+603588.89 798361.84
+603539.67 798365.34
+603512.05 798378.99
+603488.55 798405.35
+603362.8 798364.38
+603133.06 798213.04
+602969.83 797987.91
+602818.68 797721.81
+602803.44 797732.38
+602752 797779.05
+602713.89 797813.35
+602684.85 797838.27
+602511.84 797994.81
+602501.36 798004.97
+602487.71 798017.67
+602465.8 798035.77
+602441.67 798011.32
+602441.67 798044.66
+602444.21 798266.28
+602443.58 798310.42
+602445.48 798338.04
+602484.21 798399.97
+602516.6 798466.64
+602557.24 798487.9
+602586.14 798507.59
+602657.59 798543.79
+602766.68 798599.32
+602827.47 798613.26
+602897.65 798631.04
+602877.96 798676.13
+602839.06 798750.94
+602834.62 798772.53
+602801.28 798810.95
+602753.01 798872.87
+602827.15 798869.43
+602860.34 798867.13
+602927.02 798872.21
+602951.16 798884.28
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 603400.59 798612.54
+Region  1
+  488
+617923.15 808064.91
+617999.3 808047.86
+618078 808048.02
+618103.46 808051.34
+618249.24 808049.91
+618255.55 808051.97
+618344.54 808097.13
+618379.3 808119.04
+618444.82 808076.1
+618466.3 808050.43
+618486.44 808010.58
+618506.04 807955.41
+618506.37 807903.53
+618501.3 807810
+618505.95 807785.42
+618494.56 807731.47
+618494.9 807652.12
+618501.43 807571.43
+618513.28 807520.19
+618563.11 807462.45
+618529.73 807330.1
+618534.81 807242.47
+618518.3 807255.17
+618463.69 807142.14
+618424.32 807093.88
+618419.24 807017.68
+618397.65 806963.07
+618397.65 806861.47
+618501.79 806799.24
+618548.78 806792.89
+618560.21 806723.04
+618623.71 806687.48
+618660.54 806726.85
+618691.4 806707.61
+618585.75 806490.34
+618523.38 806402.88
+618505.6 806454.95
+618541.16 806518.45
+618337.96 806639.1
+618177.94 806551.47
+618208.42 806477.81
+618349.39 806547.66
+618713.88 806176.82
+618750.71 806278.42
+618744.36 806347
+618688.48 806463.84
+618642.76 806458.76
+618586.09 806489.76
+618691.1 806705.43
+618779.92 806888.14
+618796.43 806979.58
+618781.19 807071.02
+618749.44 807142.14
+618694.83 807211.99
+618623.71 807267.87
+618531.53 807329.11
+618604.95 807454.48
+618772.74 807451.6
+618886.29 807456.66
+618934.11 807461.75
+618990.25 807451.84
+619015.04 807443.21
+619099.06 807431.4
+619160.82 807413.91
+619191.26 807398.7
+619205.2 807396.49
+619233.87 807364.31
+619253.8 807311.85
+619253.69 807289.36
+619238.31 807238.73
+619199.57 807190.69
+619173.12 807143.21
+619167.81 807128.16
+619098.2 807059.92
+619081.6 807040.66
+619036.35 806999.83
+618997.29 806949.71
+618939.51 806890.61
+618907.42 806863.83
+618875.17 806835.84
+618847.17 806803.84
+618826.84 806744.78
+618828.35 806716.59
+618891.66 806586.83
+618920.37 806540.49
+619006.9 806383.64
+619028.47 806315.41
+619114.99 806247.34
+619158.11 806170.82
+619182.15 806134.71
+619178.03 806110.54
+619130.65 806071.98
+618950.04 805984.71
+618902.24 805970.43
+618871.06 805954.36
+618723.27 805939.53
+618679.46 805911.37
+618653.91 805877.31
+618629.88 805799.94
+618615.32 805765.32
+618595.54 805693.63
+618584.55 805628.59
+618595.26 805528.36
+618613.94 805412.99
+618624.37 805365.21
+618632.89 805308.62
+618637.69 805269.23
+618648.41 805232.97
+618765.56 805091.93
+618794.95 805028.2
+618802.62 804957.7
+618833.3 804880.77
+618873.53 804801.32
+618924.31 804698.24
+618961.76 804656.25
+619011.05 804617.53
+619073.9 804587.86
+619113.63 804554.17
+619206.66 804524
+619247.14 804497.6
+619296.42 804446.81
+619330.62 804393.5
+619389.71 804331.84
+619476.7 804272
+619517.43 804247.86
+619587.84 804190.03
+619655.56 804125.41
+619709.36 804035.4
+619746.01 803942.13
+619787.25 803889.33
+619763.11 803864.19
+619606.73 804010.01
+619570.52 804017.56
+619525.77 804012.53
+619428.22 803941.13
+619359.33 803937.61
+619263.57 804030.48
+619206.21 804099.27
+619148.89 804125.92
+619094.08 804122.4
+619011.11 804053.01
+618941.96 803997.37
+618879.1 803946.58
+618841.39 803929.98
+618799.65 803928.48
+618758.92 803941.05
+618745.04 803942.18
+618726.99 803906.12
+618722.46 803869.41
+618711.37 803846.66
+618714.92 803814.1
+618714.92 803786.94
+618694.81 803763.79
+618674.43 803742.99
+618664.36 803712.56
+618641.75 803698.74
+618615.1 803675.61
+618550.23 803630.35
+618523.68 803590.53
+618488.21 803572.83
+618465 803552.61
+618448.9 803520.98
+618436.33 803503.84
+618398.62 803480.2
+618359.39 803464.11
+618321.68 803439.47
+618318.36 803404.63
+618319.42 803382.4
+618301.82 803372.34
+618225.88 803347.7
+618201.24 803321.55
+618187.16 803300.43
+618168.05 803269.25
+618152.21 803255.95
+618107.96 803238.35
+618085.84 803222.76
+618069.24 803208.18
+618054.66 803188.57
+618041.58 803164.43
+618022.98 803133.76
+618009.9 803109.62
+617997.59 803089.82
+617966.91 803083.29
+617933.72 803083.29
+617905.56 803061.16
+617899.53 803034.01
+617897.01 802999.81
+617852.53 802939.23
+617832.24 802915.2
+617799.93 802894.34
+617759.4 802882.97
+617721.26 802865.37
+617685.56 802849.28
+617651.36 802824.64
+617631.25 802803.52
+617622.55 802783.72
+617594.66 802750.2
+617571.66 802735.95
+617508.8 802769.14
+617483.32 802801.5
+617469.08 802839.54
+617458.52 802875.74
+617434.88 802922.01
+617374.04 802946.65
+617356.68 802976.13
+617306.43 803076.8
+617297.62 803117.29
+617300.82 803145.76
+617271.84 803256.49
+617257.33 803294.46
+617191.55 803333.09
+617134 803379.3
+617104.29 803412.85
+617065.32 803418.92
+617001.77 803431.88
+616961.97 803436.03
+616858.27 803404.54
+616815.15 803387.09
+616725.83 803279.97
+616710.9 803268.17
+616637.6 803267.57
+616592.03 803272.03
+616486.34 803291.06
+616427.99 803287.85
+616300.15 803284.59
+616264.9 803277.4
+616249.16 803243.86
+616234.09 803172.67
+616210.65 803147.51
+616146.64 803096.17
+616020.19 803043.97
+615955.84 803065.88
+615882.59 803076.49
+615809.16 803122.87
+615789.99 803135.53
+615770.06 803148.86
+615746.32 803166.81
+615753.26 803191.13
+615770.63 803211.4
+615770.06 803225.3
+615756.16 803252.51
+615780.48 803352.68
+615761.89 803418.86
+615741.69 803475.17
+615713.89 803523.26
+615663.3 803572.63
+615625 803597.82
+615553.31 803636.33
+615485.43 803661.74
+615508.66 803715.85
+615505.68 803790.87
+615487.09 803855.93
+615492.13 803859.89
+615569.71 803921.26
+615478.81 803990.16
+615442.92 804008.1
+615418.87 804023.72
+615382.36 804046.96
+615336.22 804044.3
+615272.82 804048.62
+615304.64 804054.61
+615339.24 804061.9
+615617.23 804128.32
+615686.52 804145.92
+615771.01 804169.15
+616036.05 804243.81
+616080.73 804258.21
+616118.91 804270.33
+616142.69 804277.88
+616172.65 804301.01
+616203.29 804325.68
+616237.02 804357.36
+616262.4 804382.97
+616285.84 804405.04
+616309.5 804426.64
+616354.54 804378.17
+616358.77 804374.27
+616362.67 804369.07
+616367.54 804365.82
+616372.74 804362.24
+616376.64 804357.37
+616376.64 804348.91
+616387.37 804335.59
+616398.75 804327.14
+616418.53 804311.91
+616438.54 804296.34
+616451.6 804281.89
+616479.4 804255.21
+616581.69 804237.97
+616642.83 804211.85
+616679.52 804197.95
+616707.87 804182.38
+616740.67 804164.59
+616770.13 804147.92
+616809.6 804137.35
+616855.2 804142.61
+616935.04 804170.63
+616960.25 804083.78
+616961.65 803998.34
+616974.26 803936.71
+616982.16 803860.6
+617023.28 803817
+617042.89 803769.39
+617080.35 803742.1
+617133.8 803677.01
+617170.55 803663.67
+617332.83 803730.81
+617327.03 803751.12
+617302.36 803809.1
+617324.53 803824.91
+617346.69 803838.82
+617469.94 803955.49
+617508.35 803965.47
+617533.9 804002.58
+617530.45 804020.25
+617541.97 804036
+617576.16 804035.23
+617625.33 803992.59
+617618.42 803976.84
+617659.54 803985.44
+617728.29 804084.79
+617746.92 804117.23
+617748.46 804182.92
+617725.6 804221.96
+617710.23 804269.21
+617711.96 804317.86
+617712.34 804384.7
+617695.63 804433.34
+617666.82 804475.6
+617630.33 804531.39
+617580.12 804601.89
+617547.86 804624.93
+617456.46 804653.35
+617340.87 804735.92
+617251.2 804804.47
+617222.2 804843.12
+617199.93 804930.3
+617178.42 804963.71
+617135.8 804989.06
+617094.71 804937.21
+617076.08 804903.29
+616856.8 804940.92
+616734.3 804947.07
+616754.27 804869.49
+616744.86 804857.34
+616736.8 804830.46
+616668.44 804782.84
+616602.96 804736.54
+616481.61 804761.89
+616488.33 804837.72
+616497.05 804954.49
+616505.35 805029.13
+616534.94 805150.29
+616676.76 805435.97
+616707.4 805505.24
+616733.49 805574.54
+616759.71 805682.88
+616763.33 805745.76
+616765.04 805838.11
+616771.45 805915.29
+616778.46 805961.46
+616792.45 806027.25
+616782.01 806095.91
+616765.96 806108.39
+616702.94 806189.25
+616667.87 806220.17
+616661.92 806239.79
+616637.55 806276.65
+616605.44 806301.62
+616614.95 806345.02
+616627.44 806391.39
+616642.3 806438.36
+616670.95 806457.02
+616696.35 806469.62
+616672.22 806505.18
+616660.79 806557.25
+616660.79 806620.75
+617149.74 806564.87
+616869.07 806949.68
+616330.59 807086.84
+616278.52 806751.56
+616175.73 806731.84
+616132.3 806778.74
+616094.63 806846.28
+616060.89 806887.76
+616017.75 806902.14
+615932.03 806896.61
+615887.78 806915.41
+615859.02 806949.7
+615843.54 807007.22
+615823.08 807051.88
+615803.48 807072.77
+615774.38 807091.76
+615730.99 807096.54
+615684.49 807094.33
+615654.75 807099.4
+615626.28 807117.13
+615594.09 807159.86
+615583.58 807243.94
+615563.66 807287.64
+615534.35 807316.4
+615488.44 807334.65
+615429.8 807373.93
+615410.45 807410.44
+615434.17 807441.74
+615456.99 807475.89
+615527.93 807522.04
+615546.94 807539.11
+615569.77 807580.85
+615579.3 807616.28
+615574.91 807661.19
+615559.76 807697.26
+615529.4 807727
+615392.12 807806.14
+615382.63 807816.9
+615383.34 807890.28
+615382.09 807906.73
+615369.44 807921.29
+615295.43 807964.97
+615269.54 808032.04
+615249.3 808051.66
+615229.68 808056.1
+615206.88 808043.45
+615189.15 808033.34
+615173.32 808032.08
+615154.97 808037.78
+615143.59 808049.18
+615144.24 808065.62
+615151.22 808083.97
+615168.23 808113.18
+615174.05 808123.18
+615197.23 808116.45
+615260.98 808092.56
+615346.91 808053.34
+615497.03 808046.26
+615562.9 808058.84
+615617.39 808086.38
+615707.22 808148.06
+615743.75 808161.83
+615778.48 808160.04
+615793.15 808154.35
+615808.72 808146.57
+615818.45 808139.33
+615840.59 808115.91
+615873.47 808080.47
+615907.61 808041.23
+615951.19 807986.14
+615990.42 807945.57
+616033.66 807926.85
+616074.24 807927.74
+616096.08 807935.76
+616124.61 807958.5
+616141.11 807983.91
+616252.16 808154.71
+616288.09 808191.84
+616340.17 808228.48
+616446.95 808249.63
+616533.89 808265.23
+616589.18 808299.12
+616781.8 808545.18
+616790.27 808556.77
+616825.32 808567.22
+616869.63 808550.9
+616916.28 808548.57
+616951.26 808566.06
+616966.92 808595.97
+616971.09 808678.01
+616997.91 808717.66
+617023.57 808738.65
+617078.37 808744.48
+617165.44 808732.85
+617211.32 808735.15
+617271.96 808740.98
+617362.59 808747.6
+617407.23 808780.63
+617512.18 808812.12
+617698.41 808906.92
+617713.69 808807.92
+617732.4 808680.71
+617734.4 808598.31
+617737.39 808469.44
+617742.59 808410.43
+617739.38 808343.97
+617743.59 808308.33
+617753 808275.46
+617801.82 808178.87
+617863.48 808117.63
+617923.15 808064.91
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 617461.01 805855.05
+Region  1
+  44
+602949.44 795149.64
+602938.39 795123.23
+603032.33 794965.51
+603061.86 794962.86
+603044.28 794825.51
+603025.88 794687.02
+602812.11 794714.52
+602810.63 794741.18
+602798.57 794768.7
+602784.39 794780.55
+602726.4 794788.8
+602678.56 794796
+602604.69 794804.67
+602555.16 794827.75
+602511.94 794845.38
+602466.26 794866.64
+602444.89 794875.74
+602407.41 794883.28
+602362.84 794891.61
+602324.52 794899.11
+602254.36 794914.97
+602194.23 794926.35
+602141.23 794934.51
+602082.91 794920.77
+602070 794915.77
+602052.28 794971.38
+602041.24 795002.8
+602017.46 795081.79
+601996.23 795142.94
+601862.04 795209.19
+601865.86 795232.56
+602528.08 795670.13
+602524.27 795646.08
+602524.87 795610.83
+602468.13 795573.16
+602445.49 795540.57
+602441.25 795507.74
+602437.87 795464.99
+602465.17 795465.41
+602577.14 795473.05
+602686.52 795478.91
+602830.03 795486.53
+602934.19 795204.84
+602949.44 795149.64
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 602522.37 795141.76
+Region  1
+  42
+608237.86 794727.66
+608191.51 794772.12
+608185.16 794778.47
+608176.76 794786.07
+608104.64 794858.21
+608082.7 794893.03
+608024.11 794994.96
+607986.27 795061.91
+607940.17 795129.1
+607822.28 795240.98
+608284.4 795354.71
+608462.44 795398.35
+608607.32 795433.32
+608668.17 795446.5
+608522.78 794890.13
+608791.81 794819.05
+608788.3 794805.25
+608775.39 794764.82
+608764.59 794727.57
+608751.26 794731.38
+608685.84 794747.23
+608613.67 794765.22
+608598.27 794707.01
+608588.16 794666.94
+608545.71 794490.52
+608533.59 794454.67
+608526.6 794434.03
+608510.73 794394.98
+608405 794339.42
+608355.83 794298.39
+608314.14 794258.81
+608315.19 794247.59
+608301.44 794264.95
+608289.79 794280.82
+608281.02 794310.73
+608216.91 794563.49
+608182.94 794554.28
+608150.55 794546.98
+608133.66 794623.39
+608110.55 794712.11
+608201.67 794674.96
+608237.86 794727.66
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 608340 794929.45
+Region  1
+  49
+612427.06 805845.67
+612618.37 805870.71
+612791.29 805814.58
+612913.32 805766.08
+612949.56 805759.16
+612948.76 805726.41
+612998.31 805642.75
+613047.34 805609.71
+613152.85 805537.23
+613198.42 805505.1
+613229.86 805481.51
+613261.83 805445.81
+613316.72 805337.1
+613315.92 805319.24
+613306.86 805293.13
+613288.2 805254.27
+613266.36 805192.42
+613234.2 805154.47
+612858.17 805381.63
+612769.71 805430.12
+612678.58 805450.77
+612553.35 805441.71
+612467.29 805432.37
+612401.81 805428.38
+612344.19 805422.78
+612289.76 805420.21
+612261.59 805416.38
+612232.82 805388.14
+612175.26 805329.52
+612124.38 805275.99
+612066.31 805222.87
+612031.68 805199.96
+611959.74 805209.02
+611914.97 805215.41
+611868.61 805222.34
+611790.26 805226.43
+611795.59 805272.26
+611790.81 805331.59
+611773.76 805383.81
+611755.37 805445.89
+611763.89 805487.46
+611777.75 805503.44
+611795.33 805517.3
+611979.71 805614.81
+612099.59 805690.31
+612216.57 805760.94
+612339.13 805831.28
+612371.64 805841.94
+612427.06 805845.67
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 612519.9 805526.83
+Region  1
+  53
+609277.95 795863.12
+609536.93 795558.01
+609674.64 795520.9
+609674.68 795520.89
+609678.24 795519.93
+609680.35 795519.36
+609626.83 795404.31
+609597.99 795334.69
+609556.95 795148.23
+609524.82 794982.43
+609508.88 794880.14
+609518.49 794767.79
+609522.25 794711.51
+609513.8 794681.03
+609476.75 794631.31
+609436.42 794610.21
+609306.04 794580.66
+609262.89 794559.56
+609218.88 794508.23
+609215.42 794353.29
+609197.32 794308.21
+609111.21 794246.99
+609086.75 794257.47
+609045.16 794271.76
+609033.89 794309.36
+609017.69 794364.3
+609002.45 794415.1
+608993.11 794438.91
+608986.44 794461.48
+608981.68 794471.64
+608978.51 794481.48
+609053.75 794586.55
+609068.99 794586.55
+609095.66 794643.06
+609021.79 794666.58
+608964.42 794679.72
+608914.47 794695.39
+608883.14 794709.55
+608844.61 794746.17
+608810.95 794807.15
+608791.81 794819.05
+608522.78 794890.13
+608668.17 795446.5
+608755.03 795763.22
+608726.4 795929.63
+608820.53 795950.01
+608933.57 795976.21
+609033.04 795998.26
+609184.42 796030.28
+609187.49 796032.42
+609213.55 795938.99
+609277.84 795863.25
+609277.95 795863.12
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 609099.76 795223.21
+Region  1
+  52
+607615.44 793398.53
+606929.51 793063.99
+606817.44 793218.98
+606793.94 793257.4
+606768.52 793293.34
+606721.71 793362.33
+606653.77 793460.57
+606631.55 793496.45
+606611.55 793555.16
+606601.39 793614.35
+606575.41 793633.79
+606593.03 793645.48
+606619.82 793662.06
+606631.3 793677.37
+606646.61 793659.51
+606667.02 793644.21
+606681.05 793636.55
+606710.39 793632.72
+606723.15 793631.45
+606737.18 793636.55
+606797.13 793655.69
+606854.54 793674.82
+606915.77 793699.06
+606937.45 793701.61
+606971.9 793704.16
+607003.79 793709.26
+607012.72 793687.58
+607022.92 793656.96
+607154.31 793700.33
+607192.58 793707.99
+607215.54 793710.54
+607235.95 793710.54
+607253.81 793718.19
+607286.97 793752.63
+607299.73 793767.94
+607315.04 793789.63
+607322.69 793802.38
+607336.72 793826.62
+607349.48 793838.1
+607382.65 793878.92
+607397.88 793899.09
+607422.32 793846.7
+607439.79 793771.09
+607445.31 793732.71
+607461.74 793653.59
+607474.37 793592.2
+607514.73 793552.64
+607564.26 793532
+607594.11 793494.54
+607599.64 793450.43
+607612.4 793408.53
+607615.44 793398.53
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 607105.04 793460.81
+Region  1
+  63
+611467.61 805203.94
+611370.62 805153.32
+611322.13 805132.53
+611282.16 805124.54
+611233.67 805121.87
+611196.9 805131.47
+611171.05 805147.19
+611139.29 805156.35
+611094.85 805159.98
+611059.68 805169.57
+611079.39 805227.12
+611102.84 805260.16
+611093.25 805271.89
+611084.41 805306.32
+611035.43 805307.83
+611002.39 805320.62
+610844.1 805408.01
+610808.93 805395.76
+610776.43 805411.21
+610791.08 805443.45
+610811.86 805498.33
+610845.97 805562.81
+610858.76 805592.66
+610875.81 805615.57
+610891.52 805665.95
+610894.72 805714.98
+610883.8 805763.74
+610871.55 805795.71
+610859.29 805835.68
+610848.63 805881.18
+610865.94 805981.61
+610942.29 806050.4
+610968.24 806104.15
+610997.49 806157.92
+611014 806193.97
+611026.72 806243.95
+611033.2 806369.47
+611049.72 806323.12
+611073.69 806276.23
+611301.18 806074.85
+611426.38 806177.68
+611521.21 806130.79
+611601.13 806134.52
+611609.94 805752.26
+611620.84 805709.91
+611642.68 805683.8
+611692.23 805663.56
+611751.37 805653.97
+611755.1 805617.74
+611782.54 805555.66
+611785.21 805528.49
+611795.33 805517.3
+611777.75 805503.44
+611763.89 805487.46
+611755.37 805445.89
+611773.76 805383.81
+611790.81 805331.59
+611795.59 805272.26
+611790.26 805226.43
+611711.41 805235.13
+611593.64 805245.26
+611554.21 805242.06
+611467.61 805203.94
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 611285.96 805657.67
+Region  1
+  49
+613142.25 798426.02
+613462.12 798372.11
+613608.36 798348.96
+613615.26 798399.54
+613574.77 798488.13
+613537.5 798551.37
+613601.31 798586.38
+613653.54 798624.51
+613631.52 798662.34
+613826.03 798570
+614011.2 798754.79
+614021.2 798750.99
+614144.87 798735.7
+614107.38 798689.27
+614061.11 798582.15
+614051.54 798516.36
+614052.7 798437.27
+614077.67 798358.91
+614119.96 798258.97
+614198.47 798095.49
+614114.17 798055.93
+614079.57 798058.59
+614040.84 798071.6
+613943.2 798111.37
+613955.27 798078.35
+613965.07 798058.35
+613970.78 798043.74
+613978.76 798027.55
+613990.83 797999.61
+614006.43 797953.69
+614009.25 797946.35
+613878.54 797893.57
+613901.69 797827.51
+613257.15 797568.02
+612593.97 797653.43
+612597.16 797680.33
+612602.18 797715.89
+612604.46 797734.13
+612612.67 797802.98
+612624.06 797898.27
+612676.04 797895.54
+612706.13 797894.17
+612735.31 797892.8
+612738.27 797907.55
+612740.55 797921.68
+612744.19 797961.35
+612892.83 797970.47
+613067.15 797981.57
+613142.25 798426.02
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 613469.32 798066.56
+Region  1
+  63
+605181.54 798006.53
+605132.6 798009.96
+605050.31 798019.55
+604998.38 798027.94
+604964.82 798046.72
+604926.88 798081.07
+604896.92 798117.82
+604880.74 798153.15
+604880.74 798204.29
+604886.62 798268.6
+604887.49 798295.93
+604856.47 798391.64
+604850.39 798403.79
+604766 798603.63
+604727.61 798671.97
+604738.02 798677.17
+604759.71 798686.28
+604790.95 798700.6
+604790.52 798723.16
+604798.76 798742.26
+604819.15 798764.38
+604838.89 798787.57
+604863.62 798816.21
+604806.35 798871.75
+604824.36 799054.63
+604885.1 798999.52
+604941.94 798948.76
+604958.86 798922.29
+604975.56 798860.47
+605032.62 798627.28
+605041.94 798594.52
+605126.77 798616.39
+605164.08 798614.66
+605187.51 798598.16
+605218.1 798564.94
+605294.46 798482.5
+605290.99 798468.62
+605281.44 798458.64
+605264.95 798458.21
+605239.35 798476.86
+605225.04 798486.84
+605206.38 798506.37
+605186.03 798522.69
+605163.43 798531.1
+605133.48 798531.13
+605108.97 798516.13
+605092.92 798495.34
+605085.98 798465.4
+605085.98 798438.5
+605095.96 798401.62
+605124.46 798359.68
+605267.59 798256.08
+605291.92 798120.48
+605292.56 798114.77
+605293.19 798105.56
+605292.59 798094.41
+605296.58 798050.87
+605311.76 797995.34
+605314.96 797978.97
+605322.95 797957.39
+605282.6 797982.96
+605249.84 797999.34
+605181.54 798006.53
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 605009.02 798427.64
+Region  1
+  56
+601351.95 785668.74
+601344.01 785716.82
+601336.43 785756.16
+601320.37 785773.29
+601249.62 785789.54
+601222.18 785816.61
+601198 785833.22
+601157.57 785849.1
+601108.12 785863.9
+601031.96 785888.44
+601001.28 785893.51
+600856.17 785911.56
+600820.8 785916.62
+600795.17 785920.59
+600799.14 785964.99
+600803.65 786003.78
+600817.36 786109.54
+600811.04 786145.13
+600795.88 786242.95
+600755.09 786298.08
+600805.86 786309.29
+601321.44 786462.75
+601892.48 786612.91
+601941.48 786684.13
+602018.32 786627.61
+602222.18 786485.36
+602376.18 786371.37
+602485.06 786287.22
+602044.35 785736.06
+602122.32 785675.62
+602162.82 785646.51
+602236.11 785590.66
+602046.23 785327.48
+602079.74 785230.64
+602071.5 785207.85
+602048.78 785191.22
+602009.41 785178.52
+602007.51 785189.95
+601984.65 785255.35
+601852.35 785060.46
+601833.72 785041.83
+601795.44 785063.69
+601758.11 785120.02
+601722.05 785165.59
+601680.3 785219.38
+601648.03 785265.59
+601613.87 785307.36
+601584.13 785343.43
+601566.42 785385.84
+601530.36 785428.87
+601481.01 785466.85
+601448.7 785481.08
+601405.38 785528.01
+601377.24 785558.62
+601369.02 785610.51
+601351.95 785668.74
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 601674.2 785985.02
+Region  1
+  66
+616304.96 808541.6
+616347.96 808506.78
+616396.67 808478.92
+616411.24 808490.3
+616427.72 808506.74
+616458.13 808530.13
+616501.83 808547.19
+616553.09 808537.04
+616599.94 808546.51
+616647.46 808583.81
+616693.72 808619.21
+616719.05 808626.79
+616744.33 808600.21
+616776.57 808562.23
+616790.27 808556.77
+616781.8 808545.18
+616589.18 808299.12
+616533.89 808265.23
+616446.95 808249.63
+616340.17 808228.48
+616288.09 808191.84
+616252.16 808154.71
+616141.11 807983.91
+616124.61 807958.5
+616096.08 807935.76
+616074.24 807927.74
+616033.66 807926.85
+615990.42 807945.57
+615951.19 807986.14
+615907.61 808041.23
+615873.47 808080.47
+615840.59 808115.91
+615818.45 808139.33
+615808.72 808146.57
+615793.15 808154.35
+615788.96 808207.05
+615778.18 808317.84
+615793.15 808353.77
+615777.88 808430.18
+615770.69 808503.24
+615756.32 808518.81
+615753.92 808551.15
+615734.76 808573.9
+615715.6 808640.97
+615721.58 808668.52
+615692.84 808742.77
+615665.29 808791.88
+615696.43 808843.38
+615738.79 808878.25
+615796.4 808885.18
+615846.39 808871.24
+615918.57 808881.96
+615954.14 808876.51
+615965.7 808874.74
+615965.46 808870.12
+615962.86 808815.71
+616000.78 808764.45
+616049.48 808734.69
+616081.74 808716.33
+616103.87 808696.07
+616160.21 808704.26
+616203.89 808703.61
+616229.18 808685.25
+616234.19 808641.59
+616267.66 808579.58
+616304.96 808541.6
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 616112.36 808421.49
+Region  1
+  87
+613473.66 799558.01
+613378.74 799580.83
+613260.55 799591.68
+613166.73 799611.94
+613087.01 799638.56
+613025.62 799653.14
+612953.4 799670.16
+612896.38 799696.7
+612909.36 799744.13
+612951.82 799856.26
+612962.72 799887.8
+612964.98 799914.84
+612990.78 799955.5
+613026.35 800110.68
+613034.17 800157.98
+613056.15 800226.25
+613096.71 800304.11
+613126.67 800367.19
+613135.32 800379.46
+613146.55 800399.48
+613155.34 800419.2
+613227.43 800560.9
+613261.69 800625.42
+613286.46 800688.67
+613311.71 800756.51
+613340.78 800837.96
+613358.13 800861.04
+613391.76 800902.3
+613469.5 800980.53
+613550.47 801066.75
+613621.75 801168.42
+613691.25 801275.75
+613785.3 801242.86
+613758.68 801198.23
+613796.47 801130.77
+613841.45 800793.49
+613868.72 800600.68
+613870.89 800559.3
+613864.19 800519.59
+613836.44 800431.56
+613827.12 800397.35
+613811.81 800346.16
+613798.89 800295.45
+613799.59 800255.98
+613820.64 800160.29
+613848.15 800042.84
+613865.38 799967.72
+613888.11 799874.19
+613916.58 799754.35
+613984.04 799830.9
+614077.81 799904.57
+614078.76 799889.74
+614087.85 799862.95
+614106.99 799812.24
+614121.82 799777.79
+614170.8 799726.57
+614238.04 799684.82
+614285.36 799654.67
+614337.09 799628.92
+614414.57 799578.24
+614443.68 799544.1
+614467.14 799509.76
+614488.08 799451.12
+614486.88 799395.53
+614483 799333.53
+614463.31 799279.77
+614434.76 799229.17
+614425.83 799219.17
+614011.2 798754.79
+613826.03 798570
+613631.52 798662.34
+613614.01 798705.82
+613600.18 798750.15
+613552.75 798943.82
+613556.14 798998.57
+613567.43 799029.63
+613586.63 799189.96
+613600.75 799275.79
+613602.49 799320.7
+613612.32 799368.68
+613641.68 799421.19
+613687.42 799460.72
+613620.79 799459.02
+613597.64 799469.19
+613595.95 799485.56
+613572.8 799540.33
+613473.66 799558.01
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 613685.86 799828.12
+Region  1
+  47
+605030.98 797784.12
+604994.59 797805.32
+604885.62 797804.87
+604815.28 797840.81
+604674.61 797900.21
+604584.67 797936.37
+604538.42 797954.01
+604522.74 797961.06
+604510.98 797969.69
+604487.06 797989.29
+604496.08 798035.94
+604515.1 798078.5
+604520.19 798137.69
+604510.97 798178.66
+604485.49 798254.69
+604451.6 798387.39
+604464.14 798388.96
+604519.4 798441.87
+604542.41 798446.59
+604594.35 798440
+604850.39 798403.79
+604856.47 798391.64
+604887.49 798295.93
+604886.62 798268.6
+604880.74 798204.29
+604880.74 798153.15
+604896.92 798117.82
+604926.88 798081.07
+604964.82 798046.72
+604998.38 798027.94
+605050.31 798019.55
+605132.6 798009.96
+605181.54 798006.53
+605249.84 797999.34
+605282.6 797982.96
+605322.95 797957.39
+605344.12 797902.66
+605362.33 797840.8
+605365.46 797816.69
+605367.04 797793.25
+605304.52 797785.21
+605244.23 797764.22
+605201.36 797748.14
+605164.74 797734.3
+605132.58 797729.83
+605098.2 797737.87
+605030.98 797784.12
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 604840.19 798065.49
+Region  1
+  46
+611382.37 801255.86
+611421.18 801312.79
+611464.36 801418.43
+611501.85 801531.02
+611562.86 801639.93
+611574.49 801666.71
+611610.72 801731.01
+611662.8 801774.48
+612248.3 802014.91
+612204.83 801861.41
+612184.23 801789.66
+612147.1 801666.5
+612084.13 801469.99
+612054.86 801353.59
+612047.14 801258.06
+612055.9 801176.45
+612067.23 801123.3
+612079.38 801095.61
+612097.49 801026.49
+612120.82 800933.84
+612124.73 800880.67
+612071.95 800781.4
+612040.28 800722.76
+611982.41 800618.48
+611757.07 800542.37
+611423.05 800439.43
+611430.8 800490.66
+611433.81 800530.69
+611417.22 800544.26
+611396.13 800583
+611397.21 800660.27
+611398.93 800713.65
+611391.18 800734.75
+611369.04 800759.07
+611339.34 800784.03
+611325.13 800805.56
+611314.37 800853.33
+611296.07 800888.04
+611283.59 800916.45
+611278.43 800968.09
+611278 801026.63
+611281.66 801060.46
+611335.02 801167.2
+611349.23 801193.89
+611361.28 801214.97
+611382.37 801255.86
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 611753.44 801179.48
+Region  1
+  17
+608251.51 805983.13
+608711.29 806982.56
+608719.03 807007.96
+608872.05 807211.06
+608926 807117.86
+609661.27 806143.08
+609893.46 805919.58
+609885.73 805906.92
+609699.75 805604.81
+609624.86 805507.22
+609587.99 805477.17
+609514.69 805440.75
+609413.62 805427.59
+609210.34 805476.11
+608976.78 805539.87
+608149.75 805763.47
+608251.51 805983.13
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 609010.6 806140.12
+Region  1
+  129
+611859.28 810753.6
+611917.01 810663.94
+611944.71 810637.08
+611978.61 810619.31
+612008.4 810593.67
+612044.93 810583.18
+612184.98 810498.82
+612310.95 810499.45
+612342.84 810492.69
+612404.66 810467.58
+612474.25 810447.95
+612567.68 810442.7
+612625.83 810445.43
+612660.78 810436.3
+612692.8 810416.85
+612735.1 810368.41
+612746.02 810347
+612767.71 810301.09
+612794.79 810282.62
+612937.66 810195.2
+612962.95 810172.2
+612995.38 810101.13
+612976.48 810081.18
+612948.45 810066.93
+612904.15 810075.17
+612886.22 810088.53
+612860.4 810072.23
+612762.4 810111.39
+612627.77 810125.54
+612578.66 810096.54
+612522.43 810048.78
+612497.07 810016.52
+612453.27 809881.8
+612435.43 809767.31
+612444.18 809653.43
+612449.79 809562.34
+612463.06 809539.56
+612478.22 809511.08
+612477.55 809476.29
+612463.6 809454.15
+612435.73 809432.03
+612328.71 809380.03
+611976 809323.82
+611923.41 809333.79
+611872.63 809335.61
+611801.44 809339.57
+611765.18 809339.57
+611682.67 809413.92
+611678.13 809440.22
+611740.24 809570.32
+611740.24 809623.81
+611869 809841.47
+611833.64 809841.47
+611800.09 809851.45
+611718.48 809874.11
+611676.58 809882.79
+611619.2 809909.01
+611588.37 809973.39
+611350.81 809657.86
+611277.05 809775.43
+611272.01 809793.78
+611266.37 809850.08
+611270.84 809891.83
+611274.07 809958.25
+611264.62 810004.44
+611248.82 810032.91
+611234.28 810045.57
+611214.66 810050.01
+611184.9 810041.16
+611144.99 810017.79
+611046.61 809665.54
+610907.88 809703.62
+610834.44 809710.88
+610774.6 809744.42
+610704.78 809759.84
+610692.09 809747.15
+610606.68 809749.8
+610585.81 809759.93
+610582.02 809775.11
+610599.15 809852.77
+610535.68 809889.04
+610501.22 809852.77
+610464.05 809815.6
+610396.05 809738.53
+610386.07 809732.18
+610366.13 809741.25
+610345.27 809754.85
+610318.98 809772.98
+610293.59 809788.39
+610270.92 809803.81
+610249.74 809818.92
+610219.24 809843.7
+610197.48 809843.7
+610212.89 809873.63
+610227.4 809918.05
+610243.49 809985.96
+610279.62 810047.06
+610337 810083.19
+610423.6 810115.6
+610581.93 810179.36
+610620.72 810196.89
+610656.31 810223.99
+610691.38 810267.56
+610711.3 810325.2
+610719.27 810408.62
+610728.54 810523.11
+610740.23 810552.34
+610755.1 810577.84
+610780.08 810565.62
+610832.16 810552.18
+610891.55 810545.52
+610963.15 810463.93
+611013.65 810432.29
+611054.72 810430.63
+611136.87 810462.27
+611259.79 810447.55
+611284.21 810476.97
+611305.31 810589.65
+611326.69 810653.75
+611357.69 810697.7
+611398.03 810771.15
+611431.2 810830.35
+611466.68 810849.87
+611532.81 810857.22
+611609.74 810876.65
+611724.01 810881.79
+611765.67 810870.77
+611811.13 810836.19
+611859.28 810753.6
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 611646.54 810102.21
+Region  1
+  41
+609943.25 803673.69
+609548.33 803856.88
+609533.88 803840.02
+609252.61 803957.86
+609216.03 803973.06
+609403.85 804163.77
+609369.9 804525.15
+609403.61 804541.53
+609447.44 804550.68
+609492.71 804562.24
+609517.44 804557.42
+609580.84 804530.93
+609746.74 804469.23
+609751.81 804489.54
+609758.68 804514.33
+609814.23 804475.8
+609932.05 804393.5
+610072.57 804312.08
+610164.71 804261.46
+610252.51 804326.86
+610408.57 804245.18
+610486.07 804216.22
+610482.78 804203.67
+610418.12 804001.48
+610375.27 803952.2
+610335.68 803882.58
+610283.43 803775.81
+610276.12 803759.26
+610267.16 803734.47
+610254.91 803702.81
+610241.77 803708.19
+610227.43 803721.33
+610141.12 803796.89
+610103.79 803830.94
+610079.75 803867.79
+610046.6 803932
+609992.1 803976.67
+609975.08 803926.49
+609952.08 803845.25
+609948.65 803765.66
+609943.25 803673.69
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 609839.53 804116.56
+Region  1
+  114
+607728.59 794654.98
+607785.52 794577.76
+607835.96 794476.42
+607874.04 794354.52
+607884.19 794278.61
+607885.24 794162.23
+607887.99 794066.15
+607893.53 793914.91
+607912.68 793861.22
+607962.63 793777.83
+608019.04 793689.28
+608047.94 793625.04
+608065.3 793563.45
+608084.45 793486.87
+608455.72 793562.76
+608477.4 793628.64
+608518.89 793702.24
+608631.08 793753.03
+608647.38 793755.57
+608667.45 793699.13
+608709.25 793610.73
+608756.68 793491.74
+608785.21 793452.22
+608759.81 793442.06
+608811.88 793330.93
+608855.95 793245.52
+608896.18 793162.05
+608910.78 793131.25
+608821.25 793093.46
+608670.76 793100.13
+608623.13 793088.7
+608524.39 793134.1
+608485.65 793140.1
+608445.01 793137.56
+608439.61 793165.82
+608369.76 793151.24
+608300.54 793132.82
+608311.02 793091.87
+608318 793045.83
+608296.1 793064.88
+608267.89 793092.28
+608222.76 793122.67
+608179.57 793161.73
+608147.19 793264.92
+608124.01 793253.49
+607775.34 793113.07
+607764.6 793138.84
+607759.84 793171.54
+607774.12 793249.68
+607772.54 793270.95
+607751.58 793296.39
+607648.08 793343.06
+607624.58 793361.16
+607615.44 793398.53
+607612.4 793408.53
+607599.64 793450.43
+607594.11 793494.54
+607564.26 793532
+607514.73 793552.64
+607474.37 793592.2
+607461.74 793653.59
+607445.31 793732.71
+607439.79 793771.09
+607422.32 793846.7
+607397.88 793899.09
+607386.13 793919.41
+607392.16 794002.59
+607388.03 794086.78
+607377.55 794119.15
+607308.97 794247.1
+607286.2 794281.17
+607260.9 794295.59
+607126.71 794280.53
+607099.65 794284.18
+607063.78 794307.24
+607043.6 794337.98
+606944.16 794336.87
+606907.81 794498.09
+606902.04 794522.11
+606860.21 794697.26
+606814.45 794898.9
+606801.13 794929.06
+606787.06 794969.8
+606754.57 795107.08
+606787.55 795092.52
+606837.03 795075.06
+606836.31 795092.86
+606824.17 795164.56
+606755.78 795371.68
+606732.79 795447.56
+606731.33 795474.24
+606742.97 795496.55
+606766.74 795515.46
+606784.68 795439.8
+606868.11 795487.33
+607000.52 795562.99
+606991.78 795444.17
+607031.07 795298.67
+607052.64 795211.12
+607075.44 795128.66
+607088.29 795083.31
+607160.56 795122.11
+607235.02 795165.02
+607289.83 795197.04
+607415.47 795179.57
+607431.71 795179.33
+607568.05 795163.32
+607560.77 795126.93
+607554.95 795092.97
+607553.49 795019.71
+607559.76 794949.96
+607593.41 794859.99
+607666 794746.76
+607728.59 794654.98
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 607648.26 794166.49
+Region  1
+  151
+606289.79 805808.47
+606368.3 805698.97
+606437.85 805597.74
+606481.46 805646.65
+606536.55 805597
+606610.42 805538.27
+606634.85 805506.57
+606646.65 805491.73
+606642.38 805471.73
+606778.74 805421.46
+606891.06 805484.34
+606949.33 805510.88
+607029.12 805532.35
+607086.73 805538.65
+607113.42 805537.84
+607128.57 805495.84
+607140.62 805450.05
+607142.68 805419.75
+607170.12 805412.71
+607241.85 805386.01
+607289.37 805362.59
+607341.7 805340.55
+607396.11 805336.42
+607451.54 805356.79
+607517.66 805386.4
+607569.58 805414.02
+607562.98 805505.28
+607561.16 805555.35
+607569.81 805567.18
+607697.7 805814.24
+607714.08 805847.92
+607716.82 805877.05
+607713.86 805935.04
+607709.76 806001.94
+607709.76 806083.87
+607870.21 806158.15
+608231.02 805991.32
+608251.51 805983.13
+608149.75 805763.47
+608976.78 805539.87
+608928.52 805350.47
+608731.38 805401
+608497.82 805472.52
+608371.25 805508.95
+608353.95 805502.12
+608343.49 805483.03
+608317.08 805450.25
+608295.23 805410.19
+608290.22 805339.63
+608285.89 805281.13
+608281.79 805231.96
+608276.11 805146.6
+608268.14 805060.33
+608267.23 805019.36
+608280.43 804976.11
+608247.88 805013.65
+608239.68 805034.14
+608229.67 805094.24
+608219.42 805182.34
+608209.86 805257.46
+608202.36 805331.43
+608182.78 805417.47
+608158.2 805459.36
+608116.97 805493.28
+608026.37 805536.98
+607984.94 805547
+607928.04 805532.43
+607892.53 805504.2
+607867.03 805461.41
+607868.87 805416.01
+607876.44 805377.45
+607897.79 805296.19
+607891.59 805262.44
+607875.06 805232.14
+607817.22 805180.49
+607749.04 805120.58
+607721.5 805084.82
+607691.2 805025.59
+607682.24 804976.7
+607668.47 804774.93
+607647.81 804738.05
+607625.43 804716.7
+607591 804681.58
+607577.91 804665.74
+607566.9 804656.79
+607555.88 804647.84
+607545.55 804642.33
+607535.22 804640.95
+607524.89 804647.84
+607517.66 804659.92
+607531.43 804681.96
+607557.6 804718.46
+607519.03 804755.64
+607486.32 804788.37
+607457.4 804820.05
+607434.67 804842.78
+607421.59 804866.19
+607418.84 804893.05
+607426.41 804924.73
+607469.8 804993.59
+607473.93 805025.96
+607460.84 805061.77
+607435.36 805085.87
+607396.11 805092.76
+607350.66 805077.61
+607326.56 805036.98
+607300.39 804982.57
+607272.15 804960.54
+607244.61 804955.03
+607137.18 804988.77
+607072.1 805007.7
+607033.54 805001.5
+606971.44 804974.38
+606809.04 804894.76
+606775.64 804866.2
+606747.41 804808.35
+606672.34 804763.59
+606623.03 804760.72
+606575.93 804778.05
+606507.07 804825.57
+606440.96 804888.23
+606371.06 804935.39
+606323.55 804993.92
+606270.52 805070.36
+606125.56 805189.84
+606089.75 805235.98
+606027.08 805329.63
+606000.91 805357.18
+605898.3 805428.8
+605833.32 805472.86
+605792.21 805497.56
+605737.82 805534.28
+605635.06 805583.34
+605560.45 805622.35
+605512.96 805672.37
+605479.89 805713.07
+605468.87 805752.08
+605469.72 805834.33
+605466.74 805940.74
+605450.63 805985.68
+605428.29 806039.93
+605403.55 806094.64
+605394.95 806113.23
+605745.81 806310.32
+606077.61 806011.73
+606095.25 805982.38
+606111.09 805955.52
+606115.91 805908.01
+606150.87 805922.12
+606185.81 805936.56
+606289.79 805808.47
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 606966 805487.41
+Region  1
+  116
+607523.78 810777
+607414.21 810884.01
+607381.84 810932.34
+607381.84 810932.34
+607437.89 811012.46
+607439.39 811053.31
+607407.19 811132.18
+607390.38 811163.94
+607367.96 811196.32
+607357.37 811213.76
+607346.16 811233.69
+607338.07 811246.77
+607328.72 811261.09
+607321.25 811271.05
+607312.53 811283.51
+607302.57 811299.7
+607288.25 811319.63
+607273.3 811340.8
+607249.01 811375.05
+607229.71 811401.21
+607215.67 811424.52
+607193.45 811409.91
+607188.37 811422.61
+607176.61 811444.17
+607159.79 811465.76
+607138.83 811482.27
+607102.95 811521.64
+607078.51 811553.68
+606996.59 811684.79
+607006.27 811784.04
+607040.88 811912
+607050.09 811997.38
+607028.5 812025.95
+607045.64 812081.2
+607020.88 812078.96
+607042.55 812133.85
+607053.14 812169.35
+607056.88 812215.43
+607051.9 812249.06
+607044.38 812285.98
+607161.12 812332.75
+607236.48 812357.38
+607284.59 812356.09
+607333.95 812345.31
+607381.41 812335.17
+607412.38 812299.09
+607415.49 812258.6
+607442.67 812223.15
+607484.4 812188.34
+607542.6 812157.94
+607587.51 812138.3
+607615.32 812102.86
+607648.81 812052.23
+607696.2 811987.04
+607746.15 811946.53
+607804.99 811918.66
+607856.23 811893.96
+607899.84 811845.22
+607918.15 811802.82
+607947.18 811736.38
+607985.09 811677.52
+608073.2 811664.82
+608095.54 811630.57
+608127.57 811579.18
+608161.82 811523.32
+608185.66 811483.85
+608213.92 811431.45
+608251.29 811369.79
+608297.37 811295.43
+608353.97 811292.45
+608420.25 811295.43
+608489.51 811294.69
+608532.71 811296.18
+608561.01 811305.86
+608574.03 811298.03
+608586.69 811274.95
+608595.63 811251.12
+608615.74 811224.3
+608643.29 811193.77
+608672.34 811152.06
+608693.19 811105.14
+608718.15 811049.65
+608736.77 811001.25
+608739.01 810958.79
+608737.52 810926.77
+608727.83 810885.81
+608715.47 810854.96
+608694.71 810807.89
+608676.71 810757.36
+608687.15 810738.17
+608704.22 810717.29
+608666.32 810700.6
+608631.71 810681.22
+608599.87 810659.76
+608578.41 810641.76
+608561.8 810603
+608464.89 810522.7
+608451.48 810539.01
+608385.28 810645.22
+608365.2 810592.61
+608321.59 810563.54
+608289.75 810579.46
+608246.14 810536.54
+608132.62 810627.92
+608119.12 810619.27
+607969.6 810654.57
+607991.75 810779.17
+607810.35 810641.79
+607774.28 810613.11
+607760.63 810583.27
+607734.3 810543.77
+607727.96 810538.71
+607670.77 810519.45
+607620.94 810659.42
+607577.09 810726.68
+607523.78 810777
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 607796.34 811343.79
+Region  1
+  55
+612099.83 807227.44
+612053.47 807348.95
+612068.39 807359.6
+612016.43 807447.81
+611984.19 807455.57
+611912.25 807564.81
+611877.34 807713.25
+611875.76 807917.66
+611874.85 807945.77
+611931.85 807928.73
+611964.38 807909.59
+612010.85 807899.41
+612055.07 807877.05
+612083.89 807853.2
+612197.18 807901.4
+612366.25 807653.17
+612379.58 807626.11
+612391.51 807606.73
+612413.87 807599.28
+612447.16 807591.83
+612480.45 807590.34
+612514.24 807587.85
+612585.29 807574.93
+612630.51 807557.05
+612672.47 807514.59
+612684.39 807509.62
+612695.82 807505.15
+612709.73 807433.6
+612733.09 807359.06
+612761.91 807298.94
+612792.96 807237.58
+612811.42 807189.9
+612830.36 807137.39
+612844.24 807100.06
+612869.52 807059.56
+612880.25 807024.76
+612887.66 806965.53
+612895.95 806936.5
+612914.33 806920.37
+612978.23 806888.07
+613002.27 806869.72
+613052.86 806826.04
+613088.3 806814.64
+613118.04 806803.24
+613135.11 806782.36
+613141.92 806756.07
+613134.45 806731.18
+613113.72 806757.73
+613074.95 806760.88
+612710.99 806771.8
+611998.15 806679.13
+611944.5 806787.59
+611862.96 807131.23
+611980.2 807136.56
+612099.83 807227.44
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 612352.16 807209.11
+Region  1
+  149
+606044.05 798724.21
+606093.91 798759.13
+606030.4 798778.19
+605994.5 798803.33
+605939.57 798843.34
+605890.04 798888.77
+605863.06 798920.52
+605827.5 798961.16
+605779.87 799008.19
+605707.8 799077.72
+605669.82 799122.08
+605643.99 799154.54
+605625.37 799167.17
+605589.68 799188.13
+605556.16 799192.25
+605548.85 799290.43
+605522.59 799408.22
+605523.93 799490.34
+605546.59 799585.25
+605561.18 799638.87
+605567.46 799663.1
+605575.99 799685.98
+605580.92 799703.48
+605590.35 799713.8
+605628.49 799718.29
+605655.86 799720.98
+605672.91 799703.48
+605710.61 799649.19
+605720.93 799739.38
+605730.59 799809.15
+605732.84 799834.28
+605735.53 799859.86
+605737.77 799895.31
+605751.68 799898
+605793.86 799905.18
+605822.13 799959.03
+605840.01 799985.8
+605839.38 800006.12
+605828.58 800030.25
+605820.64 800049.94
+605811.75 800073.77
+605798.1 800099.8
+605787.62 800122.03
+605773.01 800151.88
+605762.53 800182.67
+605811.11 800188.07
+605835.56 800178.86
+605886.99 800163.62
+605903.5 800178.23
+605930.81 800206.17
+605944.46 800228.08
+605952.73 800240.53
+605955.27 800260.22
+605952.09 800326.27
+605990.83 800384.7
+606012.11 800396.41
+606038.15 800394.5
+606102.29 800386.25
+606173.41 800352.59
+606233.75 800324.01
+606297.89 800293.53
+606324.25 800272.93
+606339.49 800248.17
+606351.87 800216.68
+606363.93 800177.31
+606391.24 800106.82
+606414.74 800052.84
+606421.09 800024.9
+606426.56 799964.42
+606419.38 799881.4
+606414 799814.09
+606405.03 799768.77
+606387.98 799732.42
+606371.38 799712.23
+606260.76 799626.75
+606254.47 799601.62
+606249.09 799572.45
+606245.05 799554.5
+606261.42 799528.71
+606274.59 799502.86
+606287.32 799481.04
+606304.15 799438.81
+606319.07 799443.57
+606341.3 799446.43
+606360.98 799443.26
+606392.9 799437.17
+606433.73 799426.85
+606485.26 799411.01
+606541 799394.36
+606605.77 799374.64
+606613.07 799389.56
+606627.37 799414.96
+606667.31 799398.81
+606690.19 799397.01
+606707.69 799396.56
+606730.13 799395.22
+606757.95 799397.01
+606800.57 799407.33
+606791.6 799356.18
+606788.91 799321.63
+606783.52 799287.97
+606758.39 799249.83
+606701.41 799177.14
+606648.22 799135.09
+606666.08 799101.09
+606698.46 799036.32
+606722.6 799012.19
+606756.26 798967.1
+606766.1 798933.79
+606764.19 798807.42
+606761.34 798721.97
+606754.99 798574.63
+606750.52 798451.42
+606747.34 798393.64
+606652.73 798348.55
+606599.39 798321.25
+606529.54 798283.15
+606536.54 798268.22
+606543.55 798256.52
+606562.66 798223.29
+606538.89 798070.84
+606514.99 797912.68
+606459.1 797987.33
+606442.28 798020
+606410.22 798081.6
+606401.96 798083.19
+606349.89 798190.51
+606334.97 798193.05
+606275.6 798316.25
+606280.68 798346.42
+606306.08 798354.35
+606292.75 798395
+606287.16 798404.74
+606287.99 798429.01
+606282.27 798433.14
+606272.84 798467.66
+606255.49 798506.71
+606249.63 798531.68
+606253.06 798560.16
+606229.88 798571.59
+606203.21 798572.86
+606199.4 798566.51
+606173.37 798556.66
+606173.05 798582.07
+606140.03 798603.02
+606117.81 798645.57
+606089.1 798675.3
+606072.95 798693.72
+606044.05 798724.21
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 606193.9 799263.83
+Region  1
+  82
+617533.9 804002.58
+617508.35 803965.47
+617469.94 803955.49
+617346.69 803838.82
+617324.53 803824.91
+617302.36 803809.1
+617327.03 803751.12
+617332.83 803730.81
+617170.55 803663.67
+617134.56 803674.7
+617080.35 803742.1
+617042.89 803769.39
+617023.28 803817
+616982.16 803860.6
+616974.26 803936.71
+616961.65 803998.34
+616960.25 804083.78
+616935.04 804170.63
+616855.2 804142.61
+616809.6 804137.35
+616770.13 804147.92
+616740.67 804164.59
+616707.87 804182.38
+616679.52 804197.95
+616642.83 804211.85
+616581.69 804237.97
+616479.4 804255.21
+616451.6 804281.89
+616438.54 804296.34
+616418.53 804311.91
+616398.75 804327.14
+616387.37 804335.59
+616376.64 804348.91
+616376.64 804357.37
+616372.74 804362.24
+616367.54 804365.82
+616362.67 804369.07
+616358.77 804374.27
+616354.54 804378.17
+616309.5 804426.64
+616394 804508.86
+616431.84 804562.03
+616450.5 804602.51
+616461.26 804628.24
+616469.32 804658.58
+616477.58 804732.12
+616481.61 804761.89
+616602.96 804736.54
+616668.44 804782.84
+616736.8 804830.46
+616744.29 804856.82
+616754.27 804869.49
+616734.3 804947.07
+616856.8 804940.92
+617076.08 804903.29
+617094.71 804937.21
+617135.8 804989.06
+617178.42 804963.71
+617199.93 804930.3
+617222.2 804843.12
+617251.2 804804.47
+617340.87 804735.92
+617456.46 804653.35
+617547.86 804624.93
+617580.12 804601.89
+617630.33 804531.39
+617666.82 804475.6
+617695.63 804433.34
+617712.34 804384.7
+617711.96 804317.86
+617710.23 804269.21
+617725.6 804221.96
+617748.46 804182.92
+617746.92 804117.23
+617728.29 804084.79
+617659.54 803985.44
+617618.42 803976.84
+617625.33 803992.59
+617576.16 804035.23
+617541.97 804036
+617530.45 804020.25
+617533.9 804002.58
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 617086.51 804375.3
+Region  1
+  62
+604479.93 794831.8
+604095.32 794222.95
+604064.84 794181
+604041.98 794209.61
+604054.68 794292.16
+604054.24 794368.98
+604032.84 794445.11
+603990.93 794541.63
+603964.89 794609.58
+603952.19 794711.18
+604016.96 794796.91
+604089.5 794832.21
+604124.27 794835.64
+604260.31 794838.56
+604288.89 794857.61
+604313.31 794882.35
+604313.22 794882.28
+604335.13 794923.87
+604355.5 794976.9
+604370.95 794998.82
+604412.58 795078.37
+604463.42 795136.19
+604598.32 795209.79
+604691.67 795201.85
+604784.38 795181.82
+604840.89 795157.37
+604861.53 795115.46
+604788.5 795112.92
+604712.62 795091.01
+604631.02 795042.4
+604645.31 795017.95
+604626.96 794967.64
+604604.89 794904.64
+604596 794852.56
+604733.5 794745.28
+604851.15 794652.38
+604881 794628.24
+604902.91 794612.68
+604921.96 794595.54
+604935.93 794584.42
+604948.32 794574.58
+604960.86 794564.58
+604977.37 794550.6
+605030.4 794555.05
+605016.74 794528.06
+605006.26 794510.28
+604999.91 794502.34
+604955.46 794458.84
+604914.97 794477.07
+604834.31 794518.66
+604757.78 794457.38
+604703.32 794418.15
+604634.1 794401.01
+604562.49 794474.23
+604497.71 794529.16
+604470.72 794571.71
+604472.15 794619.52
+604485.97 794666.05
+604498.99 794688.91
+604536.14 794733.36
+604564.4 794772.42
+604479.93 794831.8
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 604173.96 794695.4
+Region  1
+  189
+599825.71 788435.97
+599762.82 788648.03
+599735.99 788767.33
+599740.43 788821.94
+599814.56 788866.79
+599890.88 788916.47
+599927.4 788948.22
+600079.3 789043.31
+600239.64 789098.24
+600487.24 789178.25
+600517.72 789096.96
+600522.17 789080.44
+600539.37 789082.62
+600582.29 789092.92
+600623.14 789097.79
+600662.08 789122.77
+600691.51 789131.02
+600726.43 789156.85
+600749.93 789184.36
+600782.53 789200.24
+600849.21 789228.39
+600879.26 789178.19
+600917.58 789132.26
+600968.17 789088.87
+600989.76 789092.68
+601018.34 789094.37
+601052.2 789096.07
+601077.81 789074.25
+601092.84 789066
+601109.65 789068.14
+601126.74 789081.44
+601188.34 789105.91
+601211.84 789006.42
+601222 788946.52
+601238.09 788945.88
+601303.17 788989.38
+601379.06 789041.77
+601426.68 789072.56
+601474.63 789107.17
+601485.1 789099.87
+601548.11 789027
+601589.7 788982.86
+601637.96 788934.28
+601756.71 788933.64
+601796.71 788903.77
+601854.81 788851.38
+601887.52 788807.57
+601934.19 788726.6
+601958.95 788676.08
+601968.48 788662.11
+602022.23 788751.79
+602069.72 788807.5
+602181.84 788893.6
+602295.19 788979.01
+602360.6 789029.21
+602400.61 789064.45
+602465.37 789079.39
+602571.42 789102.89
+602594.91 789089.87
+602636.82 789058.12
+602704.81 789000.93
+602814.67 788913.93
+602850.55 788883.1
+602891.19 788854.52
+602915.01 788863.73
+602971.52 788892.62
+603030.9 788632.62
+602676.22 788529.51
+602665.19 788467.69
+602657.49 788441.56
+602699.71 788377.73
+602725.11 788305.99
+602700.98 788296.78
+602677.49 788167.87
+602662.39 788130.41
+602694.14 788037.69
+602703.03 788008.51
+602753.2 787992.68
+602838.92 787939.66
+602888.13 787913.94
+602923.37 787893.94
+603001.79 787849.8
+602775.9 787753.63
+602644.78 787693.94
+602560 787649.8
+602568.71 787638.8
+602575.38 787626.42
+602592.21 787594.98
+602595.7 787584.5
+602641.1 787581.93
+602800.35 787575.79
+603127.69 787729.17
+603135.13 787760.36
+603182.75 787727.98
+603229.11 787670.2
+603262.13 787614.95
+603296.73 787558.79
+603335.78 787513.38
+603357.69 787474.68
+603391.66 787397.2
+603433.25 787300.02
+603552.95 787193.34
+603581.52 787196.2
+603605.65 787162.83
+603604.06 787153.62
+603662.16 787048.18
+603732.65 786987.22
+603792.66 786931.66
+603819.71 786882.29
+603820.34 786879.12
+603832.35 786844.31
+603808.92 786820.89
+603790.57 786821.52
+603776 786800.63
+603748.15 786786.07
+603721.55 786745.55
+603693.69 786737.32
+603650.65 786722.12
+603596.21 786708.82
+603563.93 786699.96
+603543.67 786681.6
+603505.68 786663.87
+603486.06 786660.7
+603477.19 786650.57
+603454.41 786642.34
+603418.97 786661.33
+603353.78 786673.34
+603272.13 786669.53
+603225.3 786685.35
+603205.04 786680.28
+603187.31 786665.72
+603142.37 786653.06
+603113.88 786642.29
+603089.83 786642.29
+603065.14 786640.39
+603027.79 786624.56
+602994.88 786619.49
+602934.74 786602.39
+602898.66 786601.12
+602875.87 786590.99
+602861.94 786575.8
+602739.77 786532.1
+602715.72 786528.3
+602701.15 786506.78
+602678.36 786494.12
+602606.19 786455.5
+602546.02 786451.05
+602481.88 786444.06
+602447.59 786431.36
+602420.92 786407.23
+602400.6 786390.72
+602376.18 786371.37
+602222.18 786485.36
+602018.32 786627.61
+601941.48 786684.13
+601892.48 786612.91
+601321.44 786462.75
+600805.86 786309.29
+600755.09 786298.08
+600683.77 786395.87
+600594.54 786555.2
+600590.8 786599.16
+600568.38 786643.74
+600473.23 786755.99
+600458.12 786799.13
+600467.15 786800.69
+601207.17 786885.06
+601022.17 787562.68
+601512.71 787615.02
+601425.08 787809.42
+600980.58 787757.7
+601008.92 787619.22
+600188.68 787552.79
+600182.33 787552.79
+600143.39 787596.98
+600111 787628.73
+600048.77 787689.9
+600017.01 787732.82
+599974.25 787755.68
+599947.36 787788.66
+599935.51 787826.97
+599931.06 787878
+599922.59 787910.59
+599888.3 788004.99
+599833.88 788122.02
+599819.27 788169.43
+599828.14 788222.67
+599830.26 788289.35
+599825.71 788435.97
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 601663.6 787800.87
+Region  1
+  75
+604834.35 795667.02
+604779.53 795657.81
+604719.88 795642.46
+604666.37 795631.93
+604614.26 795620.91
+604550.94 795610.92
+604502.38 795601.86
+604418.67 795633.69
+604350.69 795656.54
+604285.07 795637.35
+604243.97 795620.37
+604215.1 795610.67
+604214.4 795644.87
+604215.44 795675.24
+604226.91 795706.45
+604256.67 795732.41
+604283.9 795753.3
+604316.82 795776.72
+604327.59 795795.08
+604347.78 795826.79
+604364.28 795886.48
+604375.11 795921.68
+604385.24 795953.48
+604408.91 795986.98
+604445.11 796037.46
+604377.36 796086.2
+604282.24 796153.99
+604225.72 796193.68
+604173.81 796232.89
+604111.26 796272.9
+604093.48 796244.32
+604035.38 796228.13
+604016.33 796245.91
+604067.9 796417.63
+604179.4 796664.75
+604189.56 796681.26
+604206.03 796702.41
+604291.77 796774.81
+604474.23 796916.71
+604543.54 796886.67
+604609.11 796835.58
+604658.02 796761.23
+604699.25 796682.72
+604768.55 796639.73
+604867.02 796557.07
+604951.88 796478.33
+604971.18 796459.91
+605027.76 796374.82
+605078.44 796311.02
+605120.98 796265.84
+605166.16 796220.67
+605231.07 796169.79
+605357.83 796076.84
+605419.2 796039.54
+605481.97 796007.66
+605587.01 795964.79
+605579.99 795953.83
+605576.92 795949
+605476.93 795816.55
+605436.14 795767
+605353.59 795797.76
+605288.4 795820.54
+605258.48 795827.1
+605192.48 795801.89
+605124.49 795806.72
+605074.47 795808.48
+605042.03 795811.1
+605016.59 795810.67
+605016.59 795789.61
+605015.28 795753.21
+604997.29 795739.17
+604963.96 795714.61
+604931.5 795690.93
+604887.86 795680.62
+604834.35 795667.02
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 604692.27 796185.13
+Region  1
+  74
+610955.11 808688.58
+610515.18 808691.97
+610474.64 808664.15
+610302.47 808737.43
+610302.47 808737.43
+610312.29 808749.58
+610329.22 808775.96
+610342.92 808811.59
+610349.43 808852.35
+610346.69 808903.05
+610323.73 808966.01
+610295.65 809007.24
+610255.58 809052.11
+610202.48 809101.78
+610168.41 809129.7
+610105 809190.08
+610048.14 809279.32
+609996.72 809357.23
+609998.85 809612.29
+610038.17 809665.92
+610060.56 809733.99
+610132.19 809788.39
+610197.48 809843.7
+610219.24 809843.7
+610249.74 809818.92
+610270.92 809803.81
+610293.59 809788.39
+610318.98 809772.98
+610345.27 809754.85
+610366.13 809741.25
+610386.07 809732.18
+610396.05 809738.53
+610464.05 809815.6
+610501.22 809852.77
+610535.68 809889.04
+610599.15 809852.77
+610582.02 809775.11
+610585.81 809759.93
+610606.68 809749.8
+610692.09 809747.15
+610704.78 809759.84
+610774.6 809744.42
+610834.44 809710.88
+610907.88 809703.62
+611046.61 809665.54
+611039.36 809635.62
+611076.53 809546.76
+611097.39 809486.01
+611097.39 809452.46
+611063.29 809330.17
+611045.25 809261.56
+611035.96 809208.72
+611002.18 809179.52
+611040.26 809076.15
+611064.74 809000.9
+611107.41 808989.02
+611128.29 808986.48
+611144.72 808964.32
+611168.73 808931.41
+611183.27 808916.86
+611189.61 808914.71
+611198.94 808935.61
+611223.03 808911.95
+611255.3 808901.18
+611281.25 808894.21
+611302.75 808876.49
+611335.03 808870.78
+611378.07 808871.39
+611419.28 808864.16
+611353.09 808799.79
+611257.15 808769.41
+611230.68 808746.29
+611184.44 808648.37
+610955.11 808688.58
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 610617.98 809244.47
+Region  1
+  61
+604425.44 809400.5
+604446.39 809449.84
+604463.58 809528.28
+604479.49 809593.44
+604501.68 809625.69
+604623.47 809726.83
+604677.7 809776.15
+604716.77 809786.48
+604905.7 809771.55
+604902.95 809706.94
+604983.06 809611.48
+605099.44 809502.79
+605097.34 809461.38
+605157.61 809399.87
+605006.81 809298.14
+604963.1 809325.38
+604941.59 809333.61
+604929.57 809336.15
+604913.07 809293.14
+604900.41 809295.04
+604863.72 809324.16
+604837.15 809333.66
+604804.82 809290.02
+604774.41 809258.41
+604768.69 809236.27
+604779.42 809212.86
+604839.43 809083.15
+604834.08 809054.47
+604819.24 809010.66
+604793.09 808964.72
+604756.34 808925.14
+604743.62 808877.79
+604707.58 808894.69
+604666.58 808924.43
+604619.94 808954.12
+604610.04 808973.9
+604612.87 808990.16
+604621.35 809007.12
+604628.42 809021.26
+604617.82 809028.32
+604583.19 809036.1
+604525.23 809043.17
+604467.28 809050.23
+604450.32 809054.47
+604454.56 809092.64
+604453.97 809120.65
+604432.47 809135.21
+604411.58 809142.81
+604365.4 809171.93
+604324.88 809191.87
+604301.55 809143.82
+604277.52 809184.1
+604255.94 809220.06
+604226.22 809249.17
+604240.77 809237.81
+604211.09 809263.25
+604237.24 809270.32
+604286 809287.99
+604348.2 809315.55
+604393.74 809359.4
+604425.44 809400.5
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 604695.71 809376.5
+Region  1
+  65
+610781.51 798002.88
+610349.98 798233.01
+610188.89 798320.38
+610210.12 798339.77
+610218.01 798346.74
+610254.87 798381.17
+610275.2 798400.58
+610316.15 798439.72
+610290.36 798463.07
+610258.05 798499.01
+610258.05 798529.96
+610261.54 798578.35
+610264.88 798624.15
+610265.34 798651.02
+610255.33 798688.34
+610234.39 798709.27
+610167.35 798731.11
+610176.3 798738.84
+610189.35 798744.91
+610201.18 798749.46
+610216.35 798755.83
+610231.51 798761.29
+610256.39 798763.41
+610290.67 798748.85
+610331.32 798730.95
+610355.89 798718.51
+610397.45 798766.14
+610421.15 798788.56
+610448.5 798812.72
+610500.48 798849.2
+610569.78 798878.83
+610594.61 798892.66
+610629.52 798930.41
+610671.01 798963.69
+610725.72 798989.23
+610779.06 799024.33
+610933.86 798792.93
+611054.01 798770.98
+611092.77 798638.76
+611114.66 798563.5
+611157.29 798416.92
+611177.57 798262.5
+611189.99 798181.88
+611194.9 798144.41
+611200.16 798091.07
+611212.47 798001.71
+611169.51 798000.32
+611135.88 798000.34
+611105.13 797998.74
+611060.01 797931.73
+611054.7 797924.12
+611008.97 797939.4
+610954.26 797934.59
+610895.94 797914.74
+610784.42 797846.47
+610660.37 797744.98
+610624.36 797800.2
+610553.37 797857.53
+610569.18 797875.43
+610586.34 797893.13
+610619.02 797927.72
+610638.02 797949.49
+610690.5 797956.47
+610752.99 797972.24
+610781.51 798002.88
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 610738.65 798411.14
+Region  1
+  51
+604817.85 810463.99
+605681.3 810183.82
+605712.81 810174.65
+605781.56 810135.69
+605838.28 810109.33
+605885.78 810105.33
+605872.6 810084.71
+605849 810005.43
+605817.13 810005.93
+605781.5 809926.58
+605770.33 809893.93
+605748.92 809829.7
+605727.51 809801.32
+605704.61 809779.41
+605703.5 809752.05
+605660.05 809726.83
+605603.29 809657.63
+605593.58 809665.02
+605544.79 809612.74
+605512.07 809575.53
+605474.77 809544.38
+605452.63 809539.05
+605431.72 809537
+605403.84 809531.67
+605435.82 809497.64
+605455.09 809472.22
+605443.61 809468.12
+605422.29 809466.07
+605389.08 809461.97
+605252.15 809446.01
+605230.23 809454.82
+605204.81 809479.42
+605195.79 809517.55
+605169.34 809580.86
+605168.09 809436.23
+605099.44 809502.79
+604983.06 809611.48
+604902.95 809706.94
+604905.7 809771.55
+604716.77 809786.48
+604677.7 809776.15
+604701.28 809800.29
+604718.51 809829.8
+604720.27 809870.58
+604740.79 810201.3
+604741.06 810254.2
+604725.15 810271.66
+604683.06 810396.89
+604740.55 810460.02
+604779.56 810476.96
+604817.85 810463.99
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 605220.85 809964.73
+Region  1
+  45
+605549.66 807841.92
+606147.21 807902.31
+606121.25 807948.6
+606209.33 807913.64
+606235.55 807880.4
+606264.53 807823.86
+606309.05 807753.19
+606357.82 807675.45
+606393.74 807618.6
+606402 807543.33
+606416.79 807476.33
+606422.88 807399.77
+606466.12 807327.5
+606492.62 807257.89
+606520.38 807190.18
+606532.35 807144.63
+606546.87 807108.56
+606578.45 807059.83
+606624.58 806992.11
+606671.35 806938.94
+606706.11 806894
+606729.48 806856.03
+606762.34 806812.99
+606729.84 806808.37
+606726.4 806783.58
+606703.67 806756.72
+605415.9 806621.76
+605164.2 806844.55
+605161.44 806882.53
+605151.8 806974.81
+605332.22 806994.78
+605309.5 807188.98
+605292.98 807285.95
+605279.9 807351.37
+605265.78 807414.35
+605262.34 807427.44
+605299.18 807436.03
+605292.98 807579.27
+605269.79 807825.66
+605289.4 807839.92
+605300.18 807844.04
+605315.73 807846.16
+605335.52 807848.98
+605544.71 807870.89
+605549.66 807841.92
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 605884.83 807234.71
+Region  1
+  81
+607102.65 809940.33
+607128.72 809954.36
+607151.64 809969.83
+607177.42 809991.03
+607206.64 810012.23
+607219.82 810023.12
+607215.24 810028.84
+607193.47 810061.5
+607187.16 810072.96
+607176.85 810080.41
+607215.24 810170.36
+607182.01 810186.98
+607166.54 810195.57
+607149.92 810199.58
+607099.9 810409.31
+607178.56 810477.12
+607158.12 810694.35
+607381.84 810932.34
+607381.84 810932.34
+607414.21 810884.01
+607523.78 810777
+607577.09 810726.68
+607620.94 810659.42
+607670.77 810519.45
+607671.87 810507.44
+607687.94 810465.2
+607709.67 810396.7
+607737.36 810334.4
+607777.5 810231.95
+607782 810173.47
+607773 810132.63
+607746.7 810086.25
+607723.16 810051.64
+607683.71 809994.19
+607636.98 809925.31
+607582.3 809848.48
+607652.9 809802.1
+607683.36 809778.56
+607731.12 809738.41
+607763.86 809709.98
+607782.69 809681.32
+607817.99 809637.01
+607829.07 809616.94
+607796.54 809612.09
+607753.62 809610.02
+607707.24 809610.02
+607647.01 809610.02
+607610.33 809606.56
+607535.57 809579.56
+607462.88 809545.64
+607408.54 809511.35
+607238.25 809392.98
+606851.18 809107.72
+606840.15 808990.46
+606821.71 808990.28
+606617.94 809073.74
+606620.9 809090.32
+606626.01 809149.57
+606631.46 809169.19
+606641.14 809188.35
+606667.5 809242.77
+606678.67 809266.55
+606736.25 809390.02
+606767.77 809459.92
+606767.77 809476.53
+606631.41 809451.32
+606608.49 809446.74
+606590.73 809445.02
+606591.3 809457.48
+606597.03 809463.35
+606619.95 809482.26
+606617.08 809510.33
+606614.22 809569.35
+606622.24 809575.65
+606657.76 809606.59
+606672.95 809612.03
+606742.37 809924.13
+606799.42 809935.88
+606853.11 809946.9
+606862.51 809952.24
+607102.65 809940.33
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 607236.37 809923.59
+Region  1
+  41
+609972.53 803028.68
+609959.17 802969.21
+609940.09 802904.69
+609917.78 802831.97
+609918.74 802815.32
+609946.12 802761.36
+609978.14 802714.61
+610007.6 802677.75
+610022.52 802652.74
+610029.67 802626.88
+610027.7 802604.13
+609977.96 802639.71
+609927.52 802668.29
+609888.82 802691.25
+609823.8 802727.37
+609794.32 802754.83
+609658.62 802802.5
+609634.05 802784.2
+609616.24 802750.49
+609428.65 802549.41
+609028.22 803703.43
+609043.15 803729.44
+609057.6 803749.67
+609071.08 803771.34
+609074.93 803792.05
+609066.26 803823.83
+609037.13 803905.9
+609079.51 803954.06
+609136.33 803928.06
+609209.53 803898.68
+609211.94 803938.65
+609216.03 803973.06
+609252.61 803957.86
+609533.88 803840.02
+609548.33 803856.88
+609943.25 803673.69
+609957.14 803519.81
+609965.13 803428.54
+609957.93 803161.96
+609971.39 803082.86
+609972.53 803028.68
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 609538.86 803317.76
+Region  1
+  51
+600091.28 790263.68
+599995.06 790178.88
+599944.89 790155.39
+599892.18 790139.51
+599822.32 790137.6
+599779.45 790144.25
+599613.06 790200.77
+599507.63 790202.04
+599407.92 790165.84
+599385.06 790195.69
+599274.24 790308.43
+599182.15 790361.15
+599075.44 790407.51
+599010.67 790432.27
+598968.76 790457.04
+598898.28 790509.11
+598833.51 790550.38
+598787.17 790580.85
+598754.15 790612.6
+598717.32 790702.77
+598698.27 790731.98
+598683.03 790765
+598662.71 790810.72
+598639.85 790861.52
+598659.79 790892.25
+598700.37 790935.62
+598717.61 790959.52
+598764.59 791013.74
+598841.04 791099.14
+598837.56 791103.7
+598837.56 791109.6
+598921.79 791137.69
+599009.69 791206.81
+599055.87 791268.83
+599128.35 791262.92
+599221.99 791265.98
+599373.58 791304.67
+599532.49 791281.44
+599734 791185.06
+599998.08 791130.68
+599960.31 790995.89
+600647.19 790187.83
+600628.86 790142.07
+600621.84 790150.3
+600479.64 790246.25
+600418.67 790289.44
+600352.94 790315.76
+600302.13 790324.02
+600236.08 790322.11
+600166.86 790308.14
+600091.28 790263.68
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 599532.45 790707.5
+Region  1
+  24
+610092.97 795436.65
+610409.8 796630.57
+610600.74 796581.61
+611321.54 796387.43
+611356.52 796376.94
+610964.47 794905.01
+610957.01 794883.46
+610875.49 794905.34
+610875.4 794905.36
+610768.27 794934.12
+610681.61 794960.77
+610681.59 794960.78
+610681.54 794960.8
+610681.5 794960.81
+610681.47 794960.82
+610559.48 794998.34
+610558.47 794998.65
+610355.98 795337.29
+610288.59 795355.45
+610273.88 795359.41
+610158.17 795390.6
+610085.28 795410.24
+610086.66 795414.99
+610092.97 795436.65
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 610721.55 795806.17
+Region  1
+  51
+609190.7 793604.19
+609155.14 793614.01
+609095.45 793615.91
+608981.78 793614.33
+608933.84 793613.07
+608918.28 793616.24
+608890.02 793633.7
+608750 793707.06
+608741.43 793720.4
+608741.74 793801.35
+608768.58 793934.25
+608810.18 794003.74
+608977.68 794165.54
+609088.82 794233.81
+609111.21 794246.99
+609197.32 794308.21
+609215.42 794353.29
+609218.88 794508.23
+609262.89 794559.56
+609306.04 794580.66
+609436.42 794610.21
+609476.75 794631.31
+609513.8 794681.03
+609545.7 794643.04
+609578.99 794602.24
+609601.51 794590.98
+609650.79 794590.06
+609649.64 794456.25
+609644.42 794335.75
+609644.42 794310.98
+609603.73 794293.52
+609601.83 794188.43
+609581.06 794162.23
+609561.06 794132.71
+609602.97 794094.92
+609622.65 794074.6
+609564.37 794005.86
+609557.19 793978.07
+609553.06 793923.14
+609570.53 793871.38
+609595.92 793835.78
+609610.53 793815.14
+609635.31 793774.8
+609637.39 793708.62
+609606.27 793659.94
+609550.17 793586.26
+609544.54 793576.58
+609530.21 793561.73
+609499.47 793546.36
+609406.6 793522.59
+609190.7 793604.19
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 609269.26 794021.25
+Region  1
+  34
+604253.55 794189.25
+604384.25 794168.93
+604523.12 794145.11
+604538.37 794124.47
+604547.26 794081.28
+604533.92 794044.44
+604477.4 793909.17
+604467.71 793838.5
+604453.91 793793.43
+604431.68 793758.18
+604417.07 793752.46
+604377.06 793740.08
+604378.01 793697.53
+604369.28 793653.84
+604359.44 793630.97
+604344.2 793623.35
+604320.38 793616.68
+604314.5 793590.78
+604329.43 793565.37
+604356.27 793534.43
+604372.13 793500.73
+604372.6 793465.94
+604358.63 793437.37
+604324.02 793413.87
+604138.41 793397.84
+604100.63 793378.15
+604003.93 793443.41
+603827.69 793664.12
+603797.53 793742.87
+603838.15 794046.38
+604064.84 794181
+604095.32 794222.95
+604113.1 794218.5
+604253.55 794189.25
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 604154.11 793827.73
+Region  1
+  141
+613793.24 792410.3
+613604.41 792354.73
+613505 792234.17
+613472.17 792217.95
+613443.96 792201.31
+613375.57 792177.47
+613350.91 792156.74
+613329.76 792148
+613270.39 792136.58
+613222.45 792094.27
+613216.24 792063.81
+613198.63 792034.06
+613148.71 792021.93
+613100.22 792016.59
+613065.29 792003.89
+613023.38 791958.8
+612950.36 791942.29
+612919.88 791911.18
+612811.93 791874.35
+612732.55 791829.9
+612617.62 791720.68
+612537.95 791667.66
+612478.9 791621.94
+612394.12 791600.67
+612303.95 791557.49
+612270.3 791516.85
+612169.97 791454.62
+612049.1 791434.47
+611854.16 791436.37
+611695.41 791642.09
+611747.8 791609.07
+611765.26 791602.72
+611799.55 791611.29
+611811.93 791645.28
+611781.13 791715.16
+611790.34 791793.26
+611843.04 791837.73
+611918.29 791957.45
+611978.3 791896.48
+612025.6 792038.73
+611887.17 792040.63
+611941.15 792285.25
+611983.89 792382.57
+611995.49 792462.12
+612019.3 792538
+612005.01 792589.12
+611958.79 792637.86
+611920.69 792679.78
+611903.86 792711.84
+611877.98 792794.87
+611861.78 792825.67
+611841.46 792851.39
+611849.72 792871.08
+611875.73 792921.82
+611912.24 792924.04
+612008.13 792990.72
+612028.61 793030.24
+612035.91 793107.08
+612043.05 793200.9
+612047.35 793237.25
+612061 793274.71
+612101.64 793309
+612136.88 793314.08
+612279.24 793286.29
+612346.55 793277.09
+612414.18 793298.68
+612483.82 793344.23
+612576.54 793402.02
+612630.05 793435.51
+612692.29 793449.16
+612746.58 793462.18
+612792.79 793490.59
+612825.49 793560.45
+612825.33 793677.45
+612852.22 793719.62
+612890.3 793750.01
+612949.53 793780.78
+613005.18 793808.73
+613061.38 793835.57
+613147.26 793857.04
+613217.39 793877.55
+613262.23 793954.84
+613278.2 794048.34
+613298.32 794121.58
+613339.92 794188.84
+613403.4 794245.27
+613494.11 794272.7
+613682.62 794255.45
+613703.42 794248.37
+613789.27 794248.37
+613863.19 794250.04
+613885.76 794240.74
+613904.34 794219.06
+613937.09 794138.97
+613962.75 794102.68
+614005.43 794074.57
+614045.23 794001.09
+614044.1 793876.07
+614104.9 793762.12
+614140.01 793315.25
+614505.35 793007.99
+614490.36 793005.28
+614480.66 792979.67
+614469.97 792964.51
+614436.9 792953.44
+614399.07 792927.89
+614393.02 792925.71
+614345.06 792865.9
+614304.04 792816.67
+614299.19 792782.28
+614299.81 792775.82
+614291.61 792758.17
+614272.15 792744.8
+614238.58 792714.96
+614232.78 792706.06
+614225.82 792681.57
+614220.94 792673.97
+614209.32 792662.35
+614195.75 792651.29
+614171.88 792633.02
+614167.32 792629.6
+614157.25 792623.13
+614129.9 792608.21
+614114.86 792605.85
+614103.49 792600.4
+614099.62 792596.53
+614093.17 792587.5
+614084.85 792568.3
+614063.22 792542.07
+614040.34 792535.98
+614022.14 792519.88
+614001.13 792501.61
+613967.81 792498.37
+613947.97 792492.59
+613928.82 792483.76
+613882.89 792481.08
+613850.7 792461.81
+613839.14 792454.85
+613826.12 792431.9
+613818.66 792425.56
+613793.24 792410.3
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 613056.29 792860.51
+Region  1
+  115
+607102.65 809940.33
+606862.51 809952.24
+606285.1 809983.3
+606259.89 809986.16
+606255.59 810021.4
+606235.55 810063.29
+606202.88 810092.44
+606174.24 810097.03
+606088.7 810097.9
+605937.34 810100.75
+605885.78 810105.33
+605838.28 810109.33
+605781.56 810135.69
+605712.81 810174.65
+605857.51 810793.14
+605817.12 810799.73
+605856.65 811009.42
+605766.97 811025.99
+605752.43 811033.5
+605792.98 811081.23
+605803.24 811164.38
+605790.66 811216.96
+605829.67 811398.65
+605828.12 811485.33
+605811.18 811518.7
+605770.63 811672.68
+605777.82 811695.77
+605828.89 811789.96
+605867.12 811950.37
+605876.87 811999.13
+605876.87 812037.11
+605881.74 812052.75
+605886.36 812104.08
+605899.2 812116.4
+605911 812112.8
+606003.9 812071.74
+606009.03 812064.56
+606040.34 812001.43
+606098.34 811974.74
+606136.32 811968.58
+606184.31 811989.9
+606241.8 812026.86
+606401.42 812088.96
+606487.65 812115.65
+606562.84 812203.68
+606611.08 812246.8
+606624.43 812251.93
+606677.81 812249.87
+606752.23 812260.65
+606779.17 812281.93
+606823.83 812298.86
+606847.67 812323.94
+606877.68 812341.87
+606885.11 812343.92
+606892.61 812344.05
+606930.49 812341.13
+606939.52 812337.44
+606959.98 812320.52
+606983.75 812295.85
+607004.09 812281.49
+607025.39 812275.96
+607044.38 812285.98
+607051.9 812249.06
+607056.88 812215.43
+607053.14 812169.35
+607042.55 812133.85
+607020.88 812078.96
+607045.64 812081.2
+607028.5 812025.95
+607050.09 811997.38
+607040.88 811912
+607006.27 811784.04
+606996.59 811684.79
+607078.51 811553.68
+607102.95 811521.64
+607138.83 811482.27
+607159.79 811465.76
+607176.61 811444.17
+607188.37 811422.61
+607193.45 811409.91
+607215.67 811424.52
+607229.71 811401.21
+607249.01 811375.05
+607273.3 811340.8
+607288.25 811319.63
+607302.57 811299.7
+607312.53 811283.51
+607321.25 811271.05
+607328.72 811261.09
+607338.07 811246.77
+607346.16 811233.69
+607357.37 811213.76
+607367.96 811196.32
+607390.38 811163.94
+607407.19 811132.18
+607439.39 811053.31
+607437.89 811012.46
+607381.84 810932.34
+607158.12 810694.35
+607178.56 810477.12
+607099.9 810409.31
+607149.92 810199.58
+607166.54 810195.57
+607182.01 810186.98
+607215.24 810170.36
+607176.85 810080.41
+607187.16 810072.96
+607193.47 810061.5
+607215.24 810028.84
+607219.82 810023.12
+607206.64 810012.23
+607177.42 809991.03
+607151.64 809969.83
+607128.72 809954.36
+607102.65 809940.33
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 606525.69 811049.13
+Region  1
+  39
+606967.62 792921.42
+607013.31 792868.03
+607053.65 792825.17
+607093.34 792775
+607109.22 792783.89
+607121.28 792790.56
+607133.35 792797.86
+607144.78 792804.53
+607155.25 792772.46
+607161.96 792744.65
+607167.68 792713.54
+607182.6 792666.54
+607128.31 792634.79
+607084.81 792610.98
+607036.87 792584.27
+607007.02 792567.76
+606941.3 792530.93
+606908.28 792512.52
+606874.95 792494.42
+606845.42 792481.4
+606813.99 792540.46
+606788.59 792525.53
+606764.78 792511.83
+606743.82 792500.72
+606726.04 792490.56
+606716.52 792485.8
+606708.26 792481.99
+606694.93 792511.83
+606678.62 792547.53
+606641.79 792617.7
+606601.47 792724.11
+606584.33 792757.48
+606506.54 792862.58
+606817.44 793218.98
+606929.51 793063.99
+606968.88 793014.18
+607017.46 792950.32
+606973.97 792934.76
+606967.62 792921.42
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 606829.86 792805.92
+Region  1
+  36
+614620.59 803918.46
+614733.44 803266.83
+614706.55 803257.2
+614658.42 803235.29
+614630.54 803223.34
+614646.74 803192.04
+614635.85 803192.8
+614617.76 803176.37
+614603.15 803126.58
+614594.19 803079.78
+614570.96 803097.7
+614557.35 803107.66
+614513.2 803139.53
+614501.97 803154.38
+614472.04 803192.64
+614446.82 803226.16
+614417.77 803211.4
+614402.84 803247.25
+614393.76 803279.85
+614375.4 803320.19
+614359.8 803351.49
+614339.26 803393.78
+614314.24 803440.29
+614285.61 803496.51
+614256.61 803555.97
+614220.74 803621.37
+614205.12 803651.39
+614190.86 803678.22
+614180.47 803688.62
+614172.74 803695.63
+614159.93 803708.19
+614138.53 803729.13
+614122.18 803746.88
+614120.19 803807.62
+614118.36 803873.52
+614620.59 803918.46
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 614462.53 803571.49
+Region  1
+  29
+605681.3 810183.82
+604817.85 810463.99
+604779.56 810476.96
+604807.79 810488.77
+604845 810509.52
+604876.3 810521.32
+604901.97 810526.46
+604978.96 810530.56
+605036.96 810565.46
+605162.19 810674.79
+605226.09 810709.42
+605401.63 810781.28
+605434.99 810792.57
+605457.57 810794.63
+605581.01 810786.15
+605605.65 810798.46
+605665.7 810868.27
+605695.21 810952.18
+605736.78 811014.28
+605740.62 811021.18
+605745.24 811026.83
+605749.86 811030.42
+605752.43 811033.5
+605766.97 811025.99
+605856.65 811009.42
+605817.12 810799.73
+605857.51 810793.14
+605712.81 810174.65
+605681.3 810183.82
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 605466.81 810552.02
+Region  1
+  39
+611858.41 802723.22
+611768.07 802665.93
+611720.98 802633.33
+611741.35 802607.97
+611750.86 802581.71
+611618.64 802536.88
+611580.6 802520.58
+611559.32 802505.19
+611543.47 802491.15
+611524.9 802459
+611430.26 802468.05
+611413.22 802593.61
+611400.19 802733.13
+611393.74 802793.99
+611392.22 802817.89
+611395.89 802840.05
+611408.02 802923.55
+611449.88 802986.8
+611488.8 803036.03
+611552.61 803124.72
+611577.91 803163.47
+611589.76 803180.76
+611602.89 803203.18
+611743.75 803112.55
+611836.91 803049.44
+611904.38 803010.95
+611916.61 803005.06
+611950.57 802967.93
+611971.85 802976.99
+611992.69 802985.07
+612014.43 802994.12
+612020.01 802977.14
+612042.04 802919.48
+612052.45 802903.18
+612137.13 802816.69
+612039.32 802810.35
+611997.2 802801.75
+611918.65 802766.39
+611858.41 802723.22
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 611670.59 802834
+Region  1
+  71
+610955.11 808688.58
+611184.44 808648.37
+611230.68 808746.29
+611257.15 808769.41
+611353.09 808799.79
+611419.28 808864.16
+611499.07 808939.42
+611502.7 808883.21
+611504.51 808838.78
+611509.95 808796.16
+611513.43 808767.58
+611516.81 808705.66
+611520.83 808685.54
+611499.07 808665.6
+611490.91 808645.65
+611478.46 808608.81
+611416.1 808494.69
+611387.99 808438.48
+611386.18 808401.3
+611341.75 808318.79
+611378.24 808301.37
+611369.63 808266.92
+611379.31 808197.67
+611406.64 808158.28
+611451.86 808087.72
+611470.74 808076.3
+611514.96 808070.33
+611547.26 808072.82
+611578.06 808062.38
+611594.46 808070.33
+611611.85 808111.08
+611662.03 808169.71
+611702.78 808181.14
+611717.28 808151.33
+611718.53 808136.78
+611715.98 808114.01
+611706.47 808098.83
+611709.61 808070.36
+611741.04 808043.01
+611777.31 807985.86
+611737.06 808006.24
+611679.92 808024.12
+611642.16 808016.17
+611606.23 808006.87
+611557.48 807996.78
+611513.14 807977.82
+611461.04 807959.29
+611416.82 807935.44
+611369.4 807908.36
+611218.84 807775.69
+611065.18 807631.35
+611036.58 807590.85
+610916.34 807540.67
+610859.94 807545.39
+610799.8 807595.6
+610763.14 807625.89
+610737.39 807652.72
+610729.42 807689.38
+610717.73 807726.04
+610711.89 807739.85
+610665.92 807751.13
+610608.28 807758.98
+610550.93 807790.34
+610210.72 808551.4
+610196.68 808585.79
+610213.78 808611.14
+610252.46 808663.64
+610302.47 808737.43
+610474.64 808664.15
+610515.18 808691.97
+610955.11 808688.58
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 610917.13 808237.38
+Region  1
+  33
+604307.63 789681.07
+603963.27 789497.35
+603842.31 789431.95
+603856.91 789511.96
+603797.22 789484.97
+603656.45 790021.88
+603653.82 790031.88
+603963.03 790207.59
+603989.7 790377.14
+604015.07 790481.91
+604055.08 790591.45
+604092.07 790671.94
+604131.91 790741.31
+604157.31 790733.05
+604193.19 790748.3
+604242.09 790748.3
+604271.3 790718.45
+604845.98 791040.7
+604867.85 790993.31
+604877.38 790946.6
+604890.71 790874.52
+604907.84 790803.76
+604910.38 790725.64
+604884.53 790666.13
+604861.67 790620.73
+604826.84 790480.81
+604804.83 790387.29
+604784.83 790244.06
+604791.19 790227.86
+604792.78 790151.62
+604810.88 790026.84
+604820.4 789957.34
+604307.63 789681.07
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 604324.82 790213.98
+Region  1
+  22
+606048.37 797132.45
+605890.43 796943.85
+605836.78 796990.21
+605721.52 797094.08
+605625 797192.51
+605573.89 797282.05
+605457.67 797442.05
+605473.58 797454.06
+605503.11 797475.97
+605551.37 797508.67
+605605.98 797542.36
+605659.63 797556.96
+605724.4 797551.88
+605782.18 797530.65
+605849.49 797506.2
+605922.84 797479.53
+605977.76 797435.06
+605991.73 797393.15
+606001.57 797322.96
+606046.02 797219.46
+606049.01 797139.44
+606048.37 797132.45
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 605788.41 797290.2
+Region  1
+  48
+609055.88 808985.64
+608966.38 809012.11
+608868.35 809017.38
+608802.99 809023.18
+608740.8 809042.15
+608679.13 809081.15
+608644.88 809111.2
+608596.65 809150.98
+608536.04 809195.25
+608618.79 809289.07
+608953.7 809762.6
+608966.35 809770.5
+609030.7 809642.52
+609440.95 809996.32
+609467.82 809942.04
+609483.1 809908.32
+609495.75 809887.76
+609525.26 809867.21
+609618.01 809825.05
+609704.97 809749.16
+609759.05 809700.21
+609818.01 809649.23
+609865.95 809614.76
+609925.91 809532.26
+609948.78 809524.26
+609961.41 809491.99
+609968.95 809434.42
+609981.56 809389.5
+609996.72 809357.23
+609989.89 809260.37
+609982.77 809177.31
+609980.03 809108.47
+609993.56 809027.74
+610018.61 808949.08
+610046.99 808868.72
+610074.79 808789.63
+610027.88 808734.29
+609979.39 808846.56
+609931.43 808879.23
+609808.62 808932.46
+609756.97 808909.8
+609706.64 808868.99
+609530.08 808678.2
+609450.23 808747
+609379.07 808801.81
+609314.77 808839.23
+609231.5 808888.78
+609055.88 808985.64
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 609371.74 809310.12
+Region  1
+  37
+612356.75 804434.09
+611839.79 804400.28
+611826.05 804383.47
+611806.13 804396.81
+611781.1 804413.49
+611769.53 804421.93
+611756.75 804430.85
+611741.81 804441.45
+611709.26 804412.53
+611605.13 804462.67
+611568.97 804480.02
+611774.54 804912.3
+611816.11 804920.29
+611839.55 804926.15
+611855.54 804930.42
+611869.4 804932.55
+611882.19 804936.81
+611896.57 804945.34
+611902.44 804935.75
+611957.32 804961.32
+611969.81 804934.62
+612060.73 804800.83
+612071.82 804784.91
+612077.61 804705.82
+612179.37 804712.57
+612263.04 804940.9
+612296.55 804950.28
+612371.78 804967.65
+612386.73 804890.97
+612399.6 804829.51
+612413.58 804792.38
+612474.15 804736.89
+612457.28 804715.67
+612417.38 804646.14
+612390.86 804601.06
+612380.14 804510.31
+612356.75 804434.09
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 612024.14 804647.38
+Region  1
+  34
+607597.08 797900.34
+606753.8 797924.82
+606697.81 797966.19
+606648.14 798056.7
+606538.89 798070.84
+606562.66 798223.29
+606543.55 798256.52
+606536.54 798268.22
+606529.54 798283.15
+606599.39 798321.25
+606652.73 798348.55
+606747.34 798393.64
+606750.52 798451.42
+606874.62 798425.39
+607017.94 798417.6
+607302.64 798414.81
+607299.62 798246.35
+607294.85 798135.07
+607329.06 798134.21
+607378.86 798135.07
+607384.92 798116.02
+607390.77 798099.8
+607399.86 798062.56
+607452.69 798059.53
+607508.55 798053.9
+607653.6 798091.57
+607657.5 798078.58
+607666.16 798042.64
+607677.85 797979.85
+607681.52 797968.75
+607684.34 797961.15
+607690.83 797945.13
+607694.73 797935.61
+607597.08 797900.34
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 607039.26 798143.64
+Region  1
+  72
+608286.4 794218.34
+608315.19 794247.59
+608314.14 794258.81
+608355.83 794298.39
+608405 794339.42
+608510.73 794394.98
+608526.6 794434.03
+608533.59 794454.67
+608545.71 794490.52
+608588.16 794666.94
+608598.27 794707.01
+608613.67 794765.22
+608685.84 794747.23
+608751.26 794731.38
+608764.59 794727.57
+608775.39 794764.82
+608788.3 794805.25
+608791.81 794819.05
+608810.95 794807.15
+608844.61 794746.17
+608883.14 794709.55
+608914.47 794695.39
+608964.42 794679.72
+609021.79 794666.58
+609095.66 794643.06
+609068.99 794586.55
+609053.75 794586.55
+608978.51 794481.48
+608981.68 794471.64
+608986.44 794461.48
+608993.11 794438.91
+609002.45 794415.1
+609017.69 794364.3
+609033.89 794309.36
+609045.16 794271.76
+609086.75 794257.47
+609111.21 794246.99
+609088.82 794233.81
+608977.68 794165.54
+608810.18 794003.74
+608768.58 793934.25
+608741.74 793801.35
+608741.43 793720.4
+608730.95 793717.54
+608725.24 793716.59
+608714.44 793712.46
+608695.71 793707.06
+608680.47 793703.25
+608667.45 793699.13
+608647.38 793755.57
+608631.08 793753.03
+608518.89 793702.24
+608477.4 793628.64
+608455.72 793562.76
+608084.45 793486.87
+608065.3 793563.45
+608047.94 793625.04
+608019.04 793689.28
+607962.63 793777.83
+607912.68 793861.22
+607996.61 793906.02
+608005.71 793900.94
+608101.6 793899.45
+608089.11 793928.87
+608044.24 793943.27
+608022.86 794003.76
+608007.84 794042.5
+608074.51 794079.33
+608157.07 794124.43
+608201.31 794148.77
+608238.14 794171.35
+608286.4 794218.34
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 608533.32 794106.87
+Region  1
+  67
+610400.36 793003.22
+610398.31 793060.84
+610364.65 793157.99
+610348.46 793159.58
+610324.33 793167.84
+610295.89 793207.77
+610267.7 793269.18
+610240.71 793327.28
+610215.31 793338.39
+610189.27 793334.89
+610166.73 793322.51
+610013.07 793317.66
+609910.84 793322.16
+609924.49 793329.47
+609945.76 793342.11
+610047.36 793417.36
+610059.89 793441.93
+610105.14 793506.52
+610152.13 793583.36
+610164.51 793624.96
+610256.27 793683.7
+610272.64 793661.6
+610295.96 793630.04
+610322 793621.78
+610345.42 793618.57
+610387.4 793652.92
+610542.66 793648.79
+610603.62 793646.9
+610669.98 793645.31
+610755.12 793644.35
+610767.19 793662.13
+610760.84 793694.2
+610740.2 793724.05
+610708.45 793806.6
+610710.51 793868.98
+610714.96 793957.57
+610740.04 794004.88
+610807.67 793951.22
+610901.33 793884.54
+610930.05 793858.15
+610951.64 793822.17
+610957.35 793810.1
+610965.4 793790.42
+610968.07 793766.72
+610939.67 793736.41
+610961.18 793708.26
+610937.88 793653.88
+610949.37 793626.51
+610957.33 793563.41
+610949.54 793535.29
+610958.01 793497.98
+610985.7 793442.21
+610984.16 793404.51
+610953.57 793352.74
+610915.5 793289.27
+610914.53 793239.46
+610913.76 793179.07
+610920.68 793142.15
+610778.82 792942.88
+610747.07 792937.8
+610721.67 792933.04
+610662.93 792919.08
+610609.59 792915.9
+610557.84 792922.57
+610513.71 792938.13
+610467.67 792960.99
+610400.36 793003.22
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 610588.33 793393.03
+Region  1
+  66
+606929.51 793063.99
+607615.44 793398.53
+607624.58 793361.16
+607648.08 793343.06
+607751.58 793296.39
+607772.54 793270.95
+607774.12 793249.68
+607759.84 793171.54
+607764.6 793138.84
+607728.73 793101.37
+607746.72 793078.52
+607755.61 793046.45
+607719.1 793019.46
+607876.65 792872.58
+607935.51 792819.26
+607978.69 792781.16
+608029.49 792735.12
+608072.35 792677.66
+608103.92 792633.38
+608085.13 792564.85
+608071.16 792528.34
+608060.68 792521.98
+608059.1 792516.59
+608049.57 792511.51
+608039.73 792496.27
+608034.97 792472.45
+608014.96 792443.88
+607987.34 792426.73
+607953.05 792419.11
+607941.62 792419.11
+607913.02 792442.27
+607846.98 792402.26
+607826.98 792414.8
+607817.43 792448.93
+607787.9 792454.65
+607734.25 792494.02
+607653.28 792524.18
+607613.6 792502.28
+607600.9 792511.17
+607534.86 792538.47
+607528.42 792592.76
+607525.18 792654.46
+607517.24 792710.35
+607446.44 792707.17
+607409.29 792706.22
+607361.35 792731.94
+607321.66 792724.95
+607288.64 792708.12
+607263.56 792693.84
+607217.53 792672.58
+607182.6 792666.54
+607167.68 792713.54
+607161.96 792744.65
+607155.25 792772.46
+607144.78 792804.53
+607133.35 792797.86
+607121.28 792790.56
+607109.22 792783.89
+607093.34 792775
+607053.65 792825.17
+607013.31 792868.03
+606967.62 792921.42
+606973.97 792934.76
+607017.46 792950.32
+606968.88 793014.18
+606929.51 793063.99
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 607538.49 792893.99
+Region  1
+  49
+609879.3 801068.67
+609836.11 800929.28
+609808.55 800830.54
+609813.63 800768.39
+609838.89 800708
+609808.15 800713.5
+609767.09 800715.8
+609748.51 800711.9
+609719.15 800695.15
+609682.44 800666.25
+609630.83 800659.6
+609524.51 800659.71
+609495.72 800632.98
+609433.32 800582.28
+609409.12 800561.03
+609385.62 800538.8
+609347.54 800496.82
+609313.13 800447.28
+609251.3 800512.74
+609206 800588.07
+609142.8 800716.42
+609143.27 800822.63
+609109.89 800901.22
+609069.74 801005.82
+609074.23 801055.84
+609082.93 801083.25
+609065.27 801098.16
+609016.45 801068.54
+608984.98 801056.18
+608952.95 801059.02
+608935.17 801064.1
+608953.58 801106.64
+608925.64 801132.68
+608907.23 801148.55
+608934.53 801182.21
+608996.76 801256.5
+609085.66 801293.33
+609217.86 801333.94
+609305.37 801363.3
+609481.98 801424.2
+609545.37 801454.77
+609607.98 801510.8
+609735.1 801674.65
+609739.85 801657.67
+609829.31 801393.96
+609871.58 801275.63
+609892.36 801193.37
+609892.99 801129.65
+609879.3 801068.67
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 609467.76 801046.44
+Region  1
+  77
+605601.54 793714.4
+605578.68 793690.58
+605524.06 793631.52
+605446.1 793548.82
+605410.53 793507.54
+605361.94 793454.52
+605345.43 793438.64
+605315.58 793459.91
+605286.68 793489.76
+605194.07 793571.17
+605122.31 793640.84
+605076.59 793636.19
+605054.58 793653.33
+605011.39 793649.73
+604975.62 793667.09
+604897.09 793818.59
+604864.27 793878.72
+604857.28 794007.96
+604871.67 794047.76
+604909.14 794072.52
+604973.69 794055.37
+605007.56 794049.02
+605049.68 794036.54
+605100.26 794029.98
+605159.52 794027.89
+605322.08 794031.44
+605366.32 794053.24
+605423.47 794095.78
+605469.4 794131.13
+605496.59 794150.94
+605533.42 794176.53
+605567.29 794201.72
+605597.77 794226.27
+605638.41 794257.17
+605669.11 794276.84
+605698.95 794298.01
+605718.64 794300.97
+605736.2 794301.6
+605787.83 794266.06
+605836.54 794230.13
+605877.39 794202.61
+605929.25 794165.99
+605950.64 794142.23
+605946.44 794095.82
+605947.82 794066.07
+605951.31 794050.19
+605955.33 794034.19
+605959.46 794017.68
+605964.54 794002.12
+605972.48 793986.56
+605979.46 793973.22
+605987.72 793959.25
+606010.26 793934.49
+606148.48 793837.19
+606183.52 793804.02
+606216.13 793752.72
+606237.49 793689.02
+606244.57 793623.67
+606220.71 793558.56
+606188.67 793511.26
+606132.42 793453.86
+606094.66 793421.82
+606050.04 793383.68
+606008.08 793351.26
+605960.79 793313.89
+605943.63 793335.24
+605913.5 793377.58
+605869.25 793437.84
+605836.69 793480.61
+605846.85 793558.41
+605867.49 793733
+605803.98 793776.19
+605767.46 793756.82
+605704.59 793743.48
+605646.95 793734.72
+605616.46 793734.08
+605601.54 793714.4
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 605581.82 793826.98
+Region  1
+  28
+608678.25 799275.24
+608721.14 799321.55
+608767.94 799408.31
+608781.83 799456.81
+608791.58 799533.82
+608790.37 799614
+608804.99 799691.02
+608840.32 799782.88
+608865.67 799820.9
+608889.61 799866.78
+608921.78 799930.63
+608953.96 800000.82
+608987.59 800037.38
+609072.4 800120.73
+609140.64 799768.32
+609168.17 799629.15
+609181.82 799557.5
+609198.65 799472.44
+609215 799391.25
+609280.53 799126.82
+608765.28 799110.24
+608745.29 799107.81
+608641.47 799105.37
+608605.89 799104.39
+608603.94 799206.27
+608603.19 799223.09
+608634.38 799241.12
+608678.25 799275.24
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 608973.15 799478.78
+Region  1
+  50
+611860.02 800177.69
+611848.77 800056.11
+611842.57 800017.33
+611837.48 799976.62
+611884.76 799882.05
+611902.55 799840.85
+611987.74 799803.73
+611997.12 799781.84
+611991.06 799762.18
+611983.82 799735.92
+611978.72 799703.65
+611974.26 799686.76
+611963.31 799680.12
+611939.48 799669.18
+611899.23 799646.9
+611813.45 799599.82
+611808.37 799585.36
+611702.07 799564.25
+611662.79 799564.14
+611630.75 799598.13
+611613.16 799626.66
+611604.18 799652.84
+611597.14 799700.13
+611572.72 799739.81
+611480.5 799778.11
+611452.36 799806.63
+611426.95 799858.31
+611409.56 799899.91
+611402.53 799915.15
+611391.98 799932.34
+611392.17 800023.13
+611393.54 800067.53
+611396.27 800121.85
+611400.38 800210.76
+611406.24 800273.67
+611414.44 800349.02
+611423.05 800439.43
+611757.07 800542.37
+611756.65 800528.88
+611747.01 800464.18
+611786.62 800440.08
+611815.02 800422.86
+611810.72 800390.57
+611807.27 800342.79
+611831.38 800328.58
+611857.21 800315.24
+611874.86 800304.9
+611870.56 800264.87
+611866.05 800228.49
+611860.02 800177.69
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 611659.44 800043.55
+Region  1
+  126
+606043.81 794756.25
+605960.2 794651.85
+605951.73 794533.44
+606044.86 794439.48
+606088.46 794395.46
+606092.9 794342.97
+606055.57 794266.73
+606017.56 794186.97
+606002.96 794158.05
+606001.05 794132.34
+606000.73 794105.98
+606031.53 793991.64
+606040.74 793983.7
+606010.26 793934.49
+605987.72 793959.25
+605979.46 793973.22
+605972.48 793986.56
+605964.54 794002.12
+605959.46 794017.68
+605955.33 794034.19
+605951.31 794050.19
+605947.82 794066.07
+605946.44 794095.82
+605950.64 794142.23
+605929.25 794165.99
+605877.39 794202.61
+605836.54 794230.13
+605787.83 794266.06
+605736.2 794301.6
+605718.64 794300.97
+605698.95 794298.01
+605669.11 794276.84
+605638.41 794257.17
+605597.77 794226.27
+605567.29 794201.72
+605533.42 794176.53
+605496.59 794150.94
+605469.4 794131.13
+605423.47 794095.78
+605366.32 794053.24
+605358.91 794068.48
+605351.5 794079.66
+605349.81 794106.97
+605356.15 794129.85
+605363.77 794152.07
+605380.82 794177.39
+605398.49 794198.42
+605363.14 794183.61
+605333.93 794179.16
+605308.11 794179.37
+605400.59 794320.49
+605440.6 794408.32
+605435.31 794415.1
+605420.49 794395.86
+605335.82 794455.12
+605328.23 794490.89
+605301.22 794523.39
+605278.4 794532.56
+605247.22 794531.33
+605215.84 794522.78
+605200.96 794508.31
+605178.67 794483.14
+605131.84 794420.99
+605129.3 794430.2
+605120.9 794469.95
+605039.29 794479.16
+604999.91 794502.34
+605006.26 794510.28
+605016.74 794528.06
+605030.4 794555.05
+604977.37 794550.6
+604960.86 794564.58
+604948.32 794574.58
+604935.93 794584.42
+604921.96 794595.54
+604902.91 794612.68
+604881 794628.24
+604851.15 794652.38
+604875.25 794665.02
+604917.38 794678.38
+604950.26 794694.82
+604969.78 794707.15
+604982.12 794718.46
+605001.64 794733.87
+605019.11 794746.2
+605036.58 794758.53
+605065.35 794763.67
+605060.21 794836.63
+605104.4 794842.8
+605171.19 794859.24
+605223.6 794877.74
+605242.1 794886.98
+605310.94 794918.84
+605359.24 794956.86
+605400.34 794990.77
+605440.42 795029.82
+605482.03 795075.55
+605501.55 795100.21
+605528.27 795138.23
+605562.18 795205.03
+605597.12 795190.64
+605644.39 795169.06
+605671.11 795215.3
+605706.05 795244.08
+605745.1 795258.46
+605772.84 795267.71
+605802.65 795268.74
+605830.39 795266.68
+605845.81 795264.63
+605876.64 795254.35
+605889.99 795247.16
+605920.82 795227.64
+605929.04 795222.5
+605950.62 795195.78
+605968.09 795161.87
+605975.29 795137.2
+605981.45 795110.49
+605967.07 795075.55
+605945.49 795046.77
+605939.84 795042.15
+606121.73 794977.41
+606226.72 794942.76
+606214.24 794890.26
+606211.47 794865.08
+606109.86 794808.58
+606043.81 794756.25
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 605624.78 794678.27
+Region  1
+  54
+608216.91 794563.49
+608281.02 794310.73
+608289.79 794280.82
+608301.44 794264.95
+608315.19 794247.59
+608286.4 794218.34
+608238.14 794171.35
+608201.31 794148.77
+608157.07 794124.43
+608074.51 794079.33
+608007.84 794042.5
+608022.86 794003.76
+608044.24 793943.27
+608089.11 793928.87
+608101.6 793899.45
+608005.71 793900.94
+607996.61 793906.02
+607912.68 793861.22
+607893.53 793914.91
+607887.99 794066.15
+607885.24 794162.23
+607884.19 794278.61
+607874.04 794354.52
+607835.96 794476.42
+607785.52 794577.76
+607728.59 794654.98
+607666 794746.76
+607593.41 794859.99
+607559.76 794949.96
+607553.49 795019.71
+607554.95 795092.97
+607637.43 795146.82
+607649.56 795172.05
+607667.99 795186.61
+607700.01 795199.22
+607713.33 795282.43
+607738.56 795256.23
+607763.29 795224.23
+607822.28 795240.98
+607940.17 795129.1
+607986.27 795061.91
+608024.11 794994.96
+608082.7 794893.03
+608104.64 794858.21
+608176.76 794786.07
+608185.16 794778.47
+608191.51 794772.12
+608237.86 794727.66
+608201.67 794674.96
+608110.55 794712.11
+608133.66 794623.39
+608150.55 794546.98
+608182.94 794554.28
+608216.91 794563.49
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 607935.93 794625.17
+Region  1
+  62
+602929.39 806601.71
+603026.47 806783.58
+603128.41 806869.26
+603159.47 806949.46
+603163.36 806959.5
+603173.47 806957.18
+603232.34 806961.58
+603306.44 806993.81
+603367.93 807063.37
+603403.44 807114.59
+603390.85 807165.85
+603363.78 807285.43
+603336.11 807431.59
+603340.62 807490.43
+603374.19 807511.29
+603495.1 807520.71
+603607.49 807524.5
+603642.33 807524.5
+603659.08 807522.69
+603696.18 807509.56
+603729.67 807500.06
+603823.34 807479.25
+603887.6 807461.15
+603952.53 807438.29
+604049.38 807404.8
+604142.6 807379.91
+604249.86 807355.05
+604300.55 807352.34
+604332.23 807352.79
+604345.8 807322.02
+604362.09 807316.58
+604484.74 807340.57
+604468.9 807316.58
+604457.59 807299.84
+604442.65 807279.93
+604430.43 807260.47
+604501.94 807272.23
+604507.82 807229.69
+604514.61 807201.18
+604507.82 807199.82
+604466.33 807193.13
+604318.8 807160.94
+604207.36 807134.43
+604091.48 807097.79
+603993.94 807052.92
+603929.96 807011.83
+603893.19 806971.36
+603859.55 806894.83
+603853.78 806835.99
+603866.96 806746.78
+603812.92 806684.97
+603750.01 806651.03
+603686.65 806619.8
+603664.48 806600.8
+603634.61 806523.86
+603594.78 806531.1
+603552.24 806540.6
+603459.97 806261.74
+603449.63 806093.46
+603148.77 805949.36
+602904.8 806561.85
+602929.39 806601.71
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 603540.01 806857.79
+Region  1
+  95
+606754.57 795107.08
+606787.06 794969.8
+606801.13 794929.06
+606814.45 794898.9
+606860.21 794697.26
+606902.04 794522.11
+606907.81 794498.09
+606862.65 794535.88
+606808.21 794583.92
+606745.6 794635.64
+606690.51 794718.27
+606673.22 794738.13
+606646.63 794750.94
+606525.8 794757.94
+606469.49 794794.32
+606397.31 794821.41
+606300.58 794818.09
+606239.41 794846.45
+606214.24 794890.26
+606226.72 794942.76
+606231.81 794997.83
+606243.23 795068.72
+606263.63 795140.74
+606316.02 795209.95
+606382.05 795309.34
+606457.94 795426.54
+606502.07 795501.76
+606538.27 795567.15
+606544.3 795608.74
+606500.45 795702.35
+606484.02 795779.57
+606462.71 795893.97
+606492.87 795951.78
+606540.49 796028.94
+606576.37 796083.86
+606663.05 796137.84
+606725.28 796169.59
+606794.18 796198.8
+606740.2 796434.69
+606717.98 796537.83
+607028.5 796471.92
+607064.44 796334.52
+607155.24 796278.31
+607176.14 796278.31
+607532.49 796207.36
+607563.48 796281.58
+607590.14 796270.77
+607607.43 796205.19
+607641.3 796155.47
+607662.2 796138.18
+607663.64 796118
+607664.36 796092.06
+607627.21 795982.28
+607635.94 795927.94
+607656.08 795918.96
+607659.96 795810.28
+607655.63 795686.08
+607650.29 795586.62
+607665.07 795516.03
+607697.09 795435.98
+607724.01 795391.11
+607822.28 795240.98
+607763.29 795224.23
+607738.56 795256.23
+607713.33 795282.43
+607700.01 795199.22
+607667.99 795186.61
+607649.56 795172.05
+607637.43 795146.82
+607554.95 795092.97
+607560.77 795126.93
+607568.05 795163.32
+607431.71 795179.33
+607415.47 795179.57
+607289.83 795197.04
+607235.02 795165.02
+607160.56 795122.11
+607088.29 795083.31
+607075.44 795128.66
+607052.64 795211.12
+607031.07 795298.67
+606991.78 795444.17
+607000.52 795562.99
+606868.11 795487.33
+606784.68 795439.8
+606766.74 795515.46
+606742.97 795496.55
+606731.33 795474.24
+606732.79 795447.56
+606755.78 795371.68
+606824.17 795164.56
+606836.31 795092.86
+606837.03 795075.06
+606787.55 795092.52
+606754.57 795107.08
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 607000.52 795606.63
+Region  1
+  48
+614879.39 800944.38
+614986.88 800896.27
+615106.74 800912.22
+615224.94 800910.57
+615340.95 800840.19
+615477.02 800851.43
+615527.6 800870.12
+615622.72 800850.33
+615659.55 800761.26
+615765.62 800663.34
+615823.98 800612.15
+615835.47 800602.58
+615909.62 800617.41
+615905.79 800662.86
+615937.37 800707.35
+615961.99 800774.57
+616012.22 800825.29
+616070.11 800826.72
+616141.39 800783.19
+616214.59 800747.3
+616207.42 800602.34
+616205.25 800511.2
+616204.04 800506.18
+615832.84 800427.71
+615754.36 800435.37
+615636.67 800410.97
+615224.27 800324.85
+614778.86 800232.53
+614776.47 800244.97
+614795.61 800309.08
+614727.67 800332.52
+614571.71 800382.28
+614596.53 800492.79
+614603.57 800578.54
+614605.6 800645.87
+614575.63 800754.43
+614564.64 800830.3
+614549.79 800884.18
+614575.63 800812.16
+614610.82 800794.56
+614658.1 800799.51
+614696.04 800838
+614723.53 800845.15
+614744.42 800840.75
+614772.46 800824.8
+614813.14 800828.65
+614843.66 800916.89
+614879.39 800944.38
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 615280.7 800598.9
+Region  1
+  31
+613632.92 796134.95
+613737.44 796105.19
+613943.72 795984.84
+614156.23 795978.47
+614187.98 795986.72
+614189.3 795528.17
+614189.3 795507.21
+614142.31 795509.12
+614026.74 795505.31
+614034.25 795367.97
+614037.4 795319.86
+614038.66 795304.67
+613990.67 795233
+613974.79 795222.53
+613913.3 795222.37
+613843.68 795221.1
+613674.69 795228.67
+613541.11 795528.28
+613515.71 795591.78
+613436.33 795687.99
+613444.59 795713.71
+613497.61 795705.77
+613489.78 795798.58
+613461.16 795829.59
+613430.39 795880.41
+613461.4 795888.99
+613496.7 795900.44
+613451.85 795972.01
+613473.34 796007.79
+613515.56 796168.35
+613632.92 796134.95
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 613812.83 795692.53
+Region  1
+  57
+601975.02 789486.29
+602054.08 789457.08
+602103.29 789478.96
+602176.63 789505.63
+602194.56 789483.01
+602226.3 789436.69
+602269.34 789372.62
+602309.34 789309.75
+602348.21 789182.58
+602337.1 789163.22
+602408.86 789124.48
+602443.15 789107.02
+602458.71 789088.6
+602465.37 789079.39
+602400.61 789064.45
+602360.6 789029.21
+602295.19 788979.01
+602181.84 788893.6
+602069.72 788807.5
+602022.23 788751.79
+601968.48 788662.11
+601958.95 788676.08
+601934.19 788726.6
+601887.52 788807.57
+601854.81 788851.38
+601796.71 788903.77
+601756.71 788933.64
+601637.96 788934.28
+601589.7 788982.86
+601548.11 789027
+601485.1 789099.87
+601474.63 789107.17
+601426.68 789072.56
+601379.06 789041.77
+601303.17 788989.38
+601238.09 788945.88
+601222 788946.52
+601211.84 789006.42
+601188.34 789105.91
+601150.58 789222.13
+601125.1 789327.2
+601140.66 789321.49
+601157.8 789315.46
+601177.81 789300.85
+601195.59 789265.61
+601201.94 789281.48
+601290.84 789358
+601335.1 789389.72
+601413.05 789426.23
+601462.26 789436.7
+601520.37 789448.13
+601585.14 789464.64
+601631.81 789482.42
+601683.88 789499.28
+601823.58 789537.7
+601911.2 789509.15
+601975.02 789486.29
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 601816.08 789178.69
+Region  1
+  101
+608312.24 787960.41
+608222.18 787963.39
+608205.99 788003.4
+608069.46 788041.53
+608018.34 788045.97
+607979.29 788040.89
+607931.35 788066.29
+607819.27 788113.58
+607020.11 787632.27
+606715.72 787720.21
+606690.63 787727.93
+606757.79 787795.86
+606787.51 787825.39
+607238.52 788283.86
+607170.45 788363.9
+607180.58 788382.26
+607204.64 788396.82
+607232.49 788403.78
+607282.5 788427.21
+607324.92 788446.21
+607364.17 788482.29
+607357.85 788500.01
+607265.48 788598.11
+607221.19 788648.11
+607190.2 788696.84
+607173.13 788741.78
+607246.57 788796.22
+607308.61 788823.45
+607383.31 788852.58
+607443.44 788865.88
+607483.94 788858.92
+607557.99 788829.18
+607665.58 788804.51
+607758.62 788793.13
+607818.75 788800.1
+607870.66 788809.6
+607901.67 788814.04
+607920.65 788795.05
+607928.87 788770.37
+607945.95 788746.95
+607974.43 788727.33
+608010.5 788716.58
+608054.81 788727.35
+608118.11 788736.22
+608156.72 788745.72
+608199.13 788755.22
+608225.73 788778.01
+608245.35 788791.94
+608276.37 788792.57
+608316.24 788789.41
+608352.32 788789.42
+608375.75 788812.84
+608386.51 788833.1
+608396.66 788891.97
+608394.78 788925.51
+608361.24 788938.17
+608337.19 788966.65
+608304.3 789002.09
+608274.56 789033.1
+608249.88 789048.92
+608190.39 789051.44
+608169.51 789080.55
+608172.69 789121.06
+608180.3 789159.68
+608192.97 789183.1
+608210.7 789200.82
+608228.42 789211.59
+608255.01 789214.75
+608156.9 789212.21
+608059.43 789205.87
+607987.9 789200.16
+607937.98 789421.69
+608723.67 789957.29
+608828.71 789871.85
+608914.14 789833.89
+608988.19 789818.07
+609032.49 789799.09
+609087.54 789752.26
+609130.56 789712.39
+609251.44 789667.47
+609132.31 789326.28
+609132.93 789302.86
+609057.05 789205.24
+608993.64 789111.65
+608952.63 789043.51
+608789.68 788771.76
+608765.61 788726.82
+608701.04 788617.86
+608627.06 788502.11
+608573.47 788422.35
+608502.01 788323.22
+608436.6 788236.17
+608365.14 788138.55
+608333.44 788088.73
+608320.11 788043.17
+608312.78 788013.4
+608311.4 788005.32
+608313.18 787952.79
+608314.21 787858.88
+608313.59 787858.68
+608312.24 787960.41
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 607494.84 788794.79
+Region  1
+  150
+606604.89 800835.65
+606597.67 800712.97
+606583.94 800698.49
+606536.31 800694.04
+606489.96 800687.06
+606468.2 800686.87
+606456.1 800705.88
+606453.8 800722.01
+606450.92 800750.24
+606430.27 800758.81
+606421.1 800738.14
+606435.7 800709.56
+606447.13 800682.89
+606459.2 800650.5
+606466.19 800621.92
+606466.82 800607.32
+606483.97 800596.52
+606480.79 800586.36
+606489.68 800546.99
+606505.24 800492.03
+606517.31 800444.4
+606520.48 800425.35
+606458.24 800380.9
+606324.25 800272.93
+606297.89 800293.53
+606233.75 800324.01
+606173.41 800352.59
+606102.29 800386.25
+606038.15 800394.5
+606012.11 800396.41
+605990.83 800384.7
+605952.09 800326.27
+605955.27 800260.22
+605952.73 800240.53
+605944.46 800228.08
+605930.81 800206.17
+605899.06 800243
+605871.12 800252.21
+605818.55 800281.9
+605788.89 800299.2
+605760.31 800316.66
+605746.02 800347.14
+605736.18 800367.46
+605713.97 800415.67
+605689.2 800406.15
+605662.85 800395.35
+605607.92 800371.86
+605586.02 800423.61
+605576.49 800451.55
+605563.79 800517.56
+605555.86 800569.66
+605495.85 800560.45
+605420.29 800547.11
+605405.37 800543.94
+605394.57 800540.44
+605355.7 800678.81
+605343.45 800790.35
+605489.12 801530.65
+605491.42 801573.28
+605953.46 801356.72
+606202.33 801371.07
+606186.78 801429.83
+606164.89 801507.03
+606149.62 801606.39
+606139.25 801639.23
+606123.99 801667.69
+606102.59 801713.77
+606100.95 801749.99
+606096.83 801804.3
+606061.44 801838.05
+606019.47 801858.62
+605976.68 801867.67
+605978.73 801989.91
+605910.42 801985.8
+605842.11 801985.8
+605804.25 801993.2
+605744.17 802017.89
+605600.97 802083.73
+605726.07 802462.33
+605736.77 802499.37
+605801.79 802471.39
+605834.71 802400.61
+605887.79 802299.79
+605929.76 802219.14
+605961.86 802191.15
+605984.08 802185.39
+606020.29 802186.17
+606030.17 802210.08
+606051.57 802267.69
+606263.45 802871.8
+606266.06 802882.25
+606375.57 802865.27
+606497.89 803102.08
+606646.08 803329.73
+606659.95 803315.35
+606681.38 803297.58
+606709.61 803274.06
+606727.48 803256.83
+606758.75 803230.67
+606755.09 803109.91
+606754.4 803002.72
+606752.95 802922.3
+606786.18 802919.89
+606867.33 802915.33
+606867.82 802800.71
+606921.75 802688.02
+606920.79 802653.83
+606912.12 802624.45
+606986.53 802470.56
+606945.59 802423.37
+606931.87 802407.22
+606983.88 802353.76
+607010.51 802325.41
+607040.71 802295.49
+607067.67 802267.55
+607095.4 802205.07
+607147.88 802206.48
+607096.29 802200.8
+607070.82 802183.82
+607063.85 802179.88
+607056.57 802176.55
+607046.24 802170.98
+607000.49 802212.88
+606967.26 802248.04
+606832.89 802250.44
+606831.34 802205.33
+606828.98 802035.6
+606819.52 802022.83
+606787.85 801976.5
+606729.22 801892.81
+606689.14 801838.24
+606668.4 801797.91
+606660.34 801749.52
+606651.7 801623.35
+606623.47 801527.72
+606612.23 801477.31
+606604.17 801431.22
+606589.19 801343.65
+606573.34 801293.84
+606541.66 801238.53
+606537.05 801128.5
+606535.6 801037.15
+606534.45 801022.75
+606581.69 800998.55
+606596.1 800991.06
+606609.35 800980.69
+606617.99 800972.05
+606645.9 800930.53
+606641.51 800841.38
+606604.89 800835.65
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 606205.27 801600.42
+Region  1
+  125
+606530.11 796788.97
+606374.14 796774.06
+606296.4 796739.11
+606253.8 796703.58
+606239.19 796729.01
+606247.45 796749
+606257.93 796768.69
+606266.04 796777.67
+606222.64 796809.69
+606250.16 796848.48
+606241.28 796960.92
+606162.85 796975.84
+606103.48 796992.15
+606073.02 797041.42
+606064.25 797055.61
+606062.09 797066.05
+606058.08 797085.44
+606052.17 797114.08
+606048.37 797132.45
+606049.01 797139.44
+606046.02 797219.46
+606001.57 797322.96
+605991.73 797393.15
+605977.76 797435.06
+605922.84 797479.53
+605849.49 797506.2
+605782.18 797530.65
+605724.4 797551.88
+605659.63 797556.96
+605605.98 797542.36
+605551.37 797508.67
+605503.11 797475.97
+605473.58 797454.06
+605457.67 797442.05
+605446.24 797435.7
+605429.09 797403.63
+605459.89 797330.6
+605447.51 797307.46
+605417.67 797320.79
+605332.58 797284.91
+605326.54 797396.69
+605314.16 797449.4
+605285.1 797513.93
+605257.41 797574.66
+605349.62 797697.68
+605364.36 797748.14
+605367.04 797793.25
+605365.46 797816.69
+605362.33 797840.8
+605344.12 797902.66
+605322.95 797957.39
+605314.96 797978.97
+605311.76 797995.34
+605296.58 798050.87
+605292.59 798094.41
+605293.19 798105.56
+605292.56 798114.77
+605291.92 798120.48
+605313.67 798198.46
+605334.48 798247.84
+605357.34 798284.04
+605372.9 798301.19
+605419.74 798343.58
+605471.82 798381.37
+605544.69 798435.15
+605598.36 798471.99
+605656.79 798513.9
+605728.08 798570.62
+606030.4 798778.19
+606093.91 798759.13
+606044.05 798724.21
+606072.95 798693.72
+606089.1 798675.3
+606117.81 798645.57
+606140.03 798603.02
+606173.05 798582.07
+606173.37 798556.66
+606199.4 798566.51
+606203.21 798572.86
+606229.88 798571.59
+606253.06 798560.16
+606249.63 798531.68
+606255.49 798506.71
+606272.84 798467.66
+606282.27 798433.14
+606287.99 798429.01
+606287.16 798404.74
+606292.75 798395
+606306.08 798354.35
+606280.68 798346.42
+606275.6 798316.25
+606334.97 798193.05
+606349.89 798190.51
+606401.96 798083.19
+606410.22 798081.6
+606442.28 798020
+606459.1 797987.33
+606514.99 797912.68
+606538.89 798070.84
+606648.14 798056.7
+606697.81 797966.19
+606753.8 797924.82
+607597.08 797900.34
+607694.73 797935.61
+607781.33 797965.48
+607849.83 797990.5
+607956.31 797550.18
+608026.98 797228.93
+607964.38 797175.46
+607917.31 797084.35
+607884.88 797034.62
+607848.13 796969.77
+607793.36 796916.44
+607636.84 796832.38
+607554.93 796794.28
+607471.42 796764.74
+607414.27 796749.18
+607329.17 796728.9
+607254.24 796698.42
+607183.44 796683.19
+607042.79 796660.02
+606944.37 796663.83
+606824.67 796695.58
+606614.16 796765.8
+606530.11 796788.97
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 606622.85 797570.72
+Region  1
+  62
+611272.15 802077.31
+611280.56 802105.1
+611126.86 802194.96
+610982.54 802277.37
+610953.8 802294.96
+611008.1 802386.1
+611033.77 802430.32
+611064.94 802485.2
+611090.01 802530.6
+611112.37 802570.58
+611004.64 802550.25
+610948.4 802541.44
+610938.23 802552.28
+610911.81 802649.85
+610905.71 802674.25
+611392.22 802817.89
+611393.74 802793.99
+611400.19 802733.13
+611413.22 802593.61
+611430.26 802468.05
+611524.9 802459
+611543.47 802491.15
+611559.32 802505.19
+611580.6 802520.58
+611618.64 802536.88
+611750.86 802581.71
+611741.35 802607.97
+611720.98 802633.33
+611768.07 802665.93
+611858.41 802723.22
+611918.65 802766.39
+611997.2 802801.75
+612039.32 802810.35
+612137.13 802816.69
+612157.5 802794.5
+612194.64 802753.75
+612215.01 802715.26
+612250.79 802691.71
+612281.35 802576
+612311.24 802502.64
+612327.31 802440.83
+612333.65 802358.87
+612317.8 802243.81
+612248.3 802014.91
+611662.8 801774.48
+611610.72 801731.01
+611574.49 801666.71
+611501.36 801641.1
+611449.43 801622.15
+611416.63 801610.81
+611369 801613.99
+611328.67 801633.68
+611293.74 801669.88
+611336.92 801679.4
+611394.08 801694.96
+611393.13 801714.65
+611385.98 801808.52
+611378.84 801918.57
+611373.6 801963.47
+611357.72 801989.2
+611326.13 802021.43
+611272.15 802077.31
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 611679.53 802293.6
+Region  1
+  116
+606583.22 792079.77
+606699.48 792175.34
+606720.16 792204.58
+606738.35 792255.57
+606746.2 792296.23
+606749.05 792351.85
+606745.49 792388.94
+606744.06 792413.9
+606708.26 792481.99
+606716.52 792485.8
+606726.04 792490.56
+606743.82 792500.72
+606764.78 792511.83
+606788.59 792525.53
+606813.99 792540.46
+606845.42 792481.4
+606874.95 792494.42
+606908.28 792512.52
+606941.3 792530.93
+607007.02 792567.76
+607036.87 792584.27
+607084.81 792610.98
+607128.31 792634.79
+607182.6 792666.54
+607183.43 792515.49
+607172.02 792456.62
+607170.1 792410.42
+607151.39 792293.05
+607140.28 792224.32
+607105.99 792119.35
+607089.48 792036.16
+607078.78 791940.11
+607064.4 791846.6
+607157.11 791869.46
+607253.63 791872.3
+607339.68 791856.74
+607401.91 791871.35
+607435.24 791894.5
+607456.51 791930.7
+607488.58 791916.73
+607540.97 791922.43
+607594.94 791924.01
+607591.77 791813.56
+607570.82 791693.25
+607557.16 791620.54
+607547 791563.07
+607538.43 791526.56
+607534.3 791483.71
+607482.87 791473.87
+607451.43 791467.2
+607428.89 791458.63
+607412.7 791447.83
+607389.84 791426.86
+607371.11 791396.38
+607352.7 791388.76
+607282.85 791357.01
+607216.81 791324.63
+607189.51 791307.77
+607205.11 791260.97
+607172.36 791264.27
+607131.09 791263
+607065.68 791266.17
+607039.96 791227.75
+606999 791157.58
+607051.39 791149.99
+607096.82 791112.84
+607095.84 791067.76
+607067.27 791013.78
+607031.07 790952.51
+607009.17 790909.97
+607015.83 790870.57
+607052.36 790837.23
+606951.38 790793.41
+606844.07 790748.64
+606757.34 790358.95
+606742.41 790291.96
+606685.77 790303.72
+606640.65 790313.9
+606598.01 790324.35
+606611.37 790385.22
+606601.21 790430.95
+606598.03 790457.93
+606594.86 790479.84
+606582.47 790475.05
+606542.78 790461.4
+606474.06 790560.31
+606451.51 790604.44
+606372.46 790671.13
+606277.52 790696.21
+606242.6 790698.12
+606179.73 790660.01
+606166.36 790615.72
+606161.49 790601.96
+606158.14 790585.72
+606054.95 790628.44
+605998.43 790656.59
+605964.99 790680.45
+605914.51 790740.51
+605880.53 790820.69
+605858.47 790927.44
+605961.03 790960.46
+605875.94 791035.71
+605911.76 791060.03
+605955.57 791087.34
+606062.26 791187.8
+606298.48 791376.39
+606355.99 791423.1
+606321.07 791450.09
+606278.52 791480.25
+606287.09 791513.59
+606332.17 791631.63
+606333.44 791669.09
+606328.36 791727.51
+606317.57 791829.14
+606318.21 791904.04
+606583.22 792079.77
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 606730.28 791424.24
+Region  1
+  57
+605197.47 802712.88
+605736.77 802499.37
+605726.07 802462.33
+605600.97 802083.73
+605744.17 802017.89
+605804.25 801993.2
+605842.11 801985.8
+605910.42 801985.8
+605978.73 801989.91
+605976.68 801867.67
+606019.47 801858.62
+606061.44 801838.05
+606096.83 801804.3
+606100.95 801749.99
+606102.59 801713.77
+606123.99 801667.69
+606139.25 801639.23
+606149.62 801606.39
+606164.89 801507.03
+606186.78 801429.83
+606202.33 801371.07
+605953.46 801356.72
+605491.42 801573.28
+605494.88 801629.17
+605496.03 801671.22
+605498.05 801731.96
+605505.1 801786.2
+605529.16 801920.35
+605521.67 801999.28
+605493.15 802073.35
+605461.89 802151.24
+605397.82 802244.62
+605344.91 802320.55
+605301.19 802384.39
+605268.98 802427.53
+605213.19 802445.94
+605180.98 802424.08
+605140.43 802395.04
+605096.14 802362.82
+605078.88 802356.5
+604900 802428.4
+604876.76 802452.81
+604854.1 802480
+604848.01 802523.91
+604842.26 802578.27
+604837.81 802684.65
+604833.02 802720.31
+604864.08 802734.11
+604906.07 802747.34
+605001.44 802789.73
+605020.78 802796.52
+605035.42 802804.89
+605047.96 802787.11
+605062.08 802771.95
+605085.08 802759.93
+605115.4 802746.86
+605197.47 802712.88
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 605568.21 802069.14
+Region  1
+  54
+615175.36 796495.68
+614878.82 796162.9
+614751.22 796043.24
+614661.75 796008.62
+614566.8 796001.64
+614493.37 795988.34
+614444.01 795989.6
+614398.43 795981.36
+614361.33 795979.74
+614335.93 795978.47
+614325.14 795982.91
+614323.87 795994.34
+614316.25 796024.19
+614291.48 796074.35
+614258.46 796128.96
+614224.68 796190.26
+614218.67 796287.11
+614241.83 796324.26
+614337.72 796422.05
+614349.79 796455.71
+614338.48 796502.58
+614235.89 796588.25
+614177.22 796600.13
+614045.66 796619.74
+614012.18 796648.53
+613987.82 796701.99
+614713.69 796781.16
+614662.94 797266.24
+614646.46 797422.02
+614642.22 797456.94
+614637.9 797489.34
+614665.09 797462.48
+614702.18 797416.02
+614795.81 797380.73
+614845.5 797356.98
+614907.08 797317.73
+614921.64 797303.34
+614935.14 797287.9
+615054.06 797163.56
+615144.71 797072.87
+615230.92 796976.78
+615238.22 796972.32
+615203.93 796935.49
+615147.42 796926.28
+615092.81 796917.07
+615109.32 796891.63
+615116.47 796724.56
+615115.04 796618.24
+615151.86 796582.68
+615162.34 796563.31
+615172.18 796556.01
+615256.32 796579.82
+615216 796537.91
+615175.36 796495.68
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 614709.24 796609.83
+Region  1
+  126
+614514.98 794648.74
+614577.21 794691.26
+614644.52 794735.07
+614680.08 794755.39
+614718.81 794778.25
+614749.59 794802.01
+614734.35 795035.69
+614728.68 795097.76
+614820.12 795099.03
+614897.59 795100.93
+614957.28 795100.93
+615067.13 795102.84
+615125.55 795050.77
+615296.7 794902.87
+615437.67 794783.49
+615700.09 795183.39
+615811.46 795117.57
+615896.88 795038.47
+615936.08 794937.2
+615955.67 794842.89
+615967.68 794795.42
+616016.4 794765.68
+616186.65 794731.52
+616313.24 794722.05
+616405.63 794693.58
+616426.78 794689.46
+616438.76 794667.95
+616381.3 794595.13
+616353.85 794551.65
+616387.2 794501.11
+616373.68 794467.62
+616304.19 794387.89
+616288.23 794273.9
+616250.89 794193.24
+616251.51 794131.48
+616235.92 794104.76
+616185.84 794096.16
+616138.57 794133.33
+616112.76 794141.01
+616092.79 794158.83
+616049.03 794152.83
+616020.76 794134.71
+615893.87 794071.72
+615870.84 794024.4
+615853.33 794006.88
+615836.12 794005.04
+615819 794020.1
+615805.79 794044.68
+615775.68 794033.31
+615777.34 794011.03
+615764.13 793998.44
+615726.96 793967.71
+615721.12 793943.13
+615713.94 793928.84
+615672.15 793900.88
+615631.6 793881.52
+615617.46 793871.08
+615611.63 793845.88
+615615.31 793803.79
+615612.87 793780.74
+615608.26 793754.62
+615591.67 793735.57
+615554.18 793709.15
+615534.52 793697.78
+615520.69 793675.04
+615488.59 793644.47
+615474.45 793635.25
+615418.53 793584.86
+615384.32 793570.89
+615305.98 793581.33
+615285.7 793580.1
+615232.85 793521.11
+615211.2 793505.9
+615194.61 793504.05
+615165.12 793482.24
+615139.92 793468.72
+615108.89 793464.72
+615058.19 793461.96
+615006.12 793446.44
+614991.37 793435.38
+614973.55 793398.82
+614956.04 793375.16
+614913.2 793337.83
+614897.84 793298.81
+614888.62 793274.23
+614877.74 793246.42
+614829.5 793229.83
+614792.02 793180.67
+614774.51 793130.58
+614719.49 793091.31
+614673.27 793064.72
+614650.03 793062.07
+614632.21 793047.02
+614607.32 793037.18
+614585.5 793015.98
+614568.91 793005.84
+614505.35 793007.99
+614140.01 793315.25
+614104.9 793762.12
+614044.1 793876.07
+614045.23 794001.09
+614005.43 794074.57
+613962.75 794102.68
+613937.09 794138.97
+613904.34 794219.06
+613885.76 794240.74
+613863.19 794250.04
+613789.27 794248.37
+613703.42 794248.37
+613682.62 794255.45
+613578.19 794352.36
+613566.04 794432.95
+613674.25 794459.44
+613756.16 794489.29
+613813.95 794477.86
+613871.09 794467.71
+614000 794442.94
+614106.68 794423.26
+614231.77 794399.13
+614298.45 794434.69
+614335.27 794470.28
+614377.18 794493.77
+614497.83 794510.92
+614544.82 794532.51
+614570.86 794568.07
+614514.98 794648.74
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 615028.52 794173.94
+Region  1
+  37
+604974.53 794215.55
+605131.84 794420.99
+605178.67 794483.14
+605200.96 794508.31
+605215.84 794522.78
+605247.22 794531.33
+605278.4 794532.56
+605301.22 794523.39
+605328.23 794490.89
+605335.82 794455.12
+605420.49 794395.86
+605435.31 794415.1
+605440.6 794408.32
+605400.59 794320.49
+605308.11 794179.37
+605333.93 794179.16
+605363.14 794183.61
+605398.49 794198.42
+605380.82 794177.39
+605363.77 794152.07
+605356.15 794129.85
+605349.81 794106.97
+605351.5 794079.66
+605358.91 794068.48
+605366.32 794053.24
+605322.08 794031.44
+605159.52 794027.89
+605100.26 794029.98
+605049.68 794036.54
+605007.56 794049.02
+604973.69 794055.37
+604975.45 794060.25
+604990.93 794090.6
+605012.73 794129.1
+605051.53 794195.59
+605011.2 794204.96
+604974.53 794215.55
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 605208.06 794251
+Region  1
+  37
+616627.44 806391.39
+616614.95 806345.02
+616605.44 806301.62
+616637.55 806276.65
+616661.92 806239.79
+616667.87 806220.17
+616702.94 806189.25
+616765.96 806108.39
+616782.01 806095.91
+616792.45 806027.25
+616778.46 805961.46
+616771.45 805915.29
+616765.04 805838.11
+616763.33 805745.76
+616759.71 805682.88
+616740.71 805692.38
+616706.68 805709.09
+616666.18 805722.39
+616618.08 805730
+616572.51 805735.09
+616540.25 805755.98
+616467.51 805815.48
+616355.59 805931.29
+616262.63 806023.7
+616093.49 806167
+616349.92 806654.27
+616278.52 806751.56
+616330.59 807086.84
+616869.07 806949.68
+617149.74 806564.87
+616660.79 806620.75
+616660.79 806557.25
+616672.22 806505.18
+616696.35 806469.62
+616670.95 806457.02
+616642.3 806438.36
+616627.44 806391.39
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 616548.22 806436.98
+Region  1
+  44
+610349.98 798233.01
+609977.59 798430.62
+609842.29 798504.94
+609794.22 798505.1
+609787.22 799131.61
+609809.37 799133.47
+609824.38 799133.88
+609843.8 799131.75
+609898.85 799132.25
+610002.91 799197.47
+610092.85 799254.65
+610104.08 799232.51
+610140.2 799139.3
+610128.67 799112
+610182.98 799004.59
+610199.36 798978.2
+610223.32 798946.65
+610253.96 798916.01
+610277.48 798890.71
+610235.61 798880.7
+610202.55 798864.92
+610208.01 798845.2
+610213.92 798822.87
+610231.51 798761.29
+610216.35 798755.83
+610201.18 798749.46
+610189.35 798744.91
+610176.3 798738.84
+610167.35 798731.11
+610234.39 798709.27
+610255.33 798688.34
+610265.34 798651.02
+610264.88 798624.15
+610261.54 798578.35
+610258.05 798529.96
+610258.05 798499.01
+610290.36 798463.07
+610316.15 798439.72
+610275.2 798400.58
+610254.87 798381.17
+610218.01 798346.74
+610210.12 798339.77
+610188.89 798320.38
+610349.98 798233.01
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 610024.55 798770.02
+Region  1
+  58
+608337.45 798220.41
+608212.99 798143.39
+608127.21 798093.01
+607893.13 798006.57
+607849.83 797990.5
+607781.33 797965.48
+607694.73 797935.61
+607690.83 797945.13
+607684.34 797961.15
+607681.52 797968.75
+607677.85 797979.85
+607666.16 798042.64
+607657.5 798078.58
+607653.6 798091.57
+607647.76 798114.29
+607571.76 798389.94
+607593.84 798395.57
+607623.07 798401.82
+607739.98 798430.4
+607712.91 798540.59
+607699.22 798592.87
+608501.68 798601.09
+608494.6 798614.35
+608489.43 798623.61
+608480.44 798640.22
+608468.46 798660.1
+608483.44 798668.54
+608507.54 798681.47
+608535.59 798697.26
+608522.79 798720.41
+608507.81 798744.11
+608494.87 798768.2
+608483.98 798785.63
+608461.65 798825.67
+608503.12 798822.87
+608543 798818.42
+608596.79 798807.64
+608632.23 798805.09
+608706.07 798793.14
+608731.13 798788.79
+608765.57 798783.5
+608883.77 798788.94
+608885.94 798568.09
+608931.03 798568.31
+608963.57 798554.33
+609104.37 798482.7
+609039.43 798385.23
+609026.36 798363.44
+608946.96 798395.18
+608888.68 798407.16
+608817.46 798411.42
+608734.4 798399.98
+608623.44 798364.13
+608563.92 798345.82
+608510.72 798324.33
+608466.68 798301.74
+608418.34 798271.07
+608337.45 798220.41
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 608241.53 798404.5
+Region  1
+  86
+602511.84 797994.81
+602684.85 797838.27
+602713.89 797813.35
+602752 797779.05
+602803.44 797732.38
+602818.68 797721.81
+602809.94 797656.99
+602806.61 797627.59
+602793.91 797598.69
+602788.83 797574.24
+602784.38 797561.86
+602776.13 797540.26
+602755.65 797507.39
+602724.53 797473.73
+602680.07 797435.94
+602621.78 797389.9
+602614.95 797376.23
+602609.85 797313.66
+602608.37 797297.15
+602607.1 797276.41
+602602.23 797239.58
+602584.45 797260.32
+602545.93 797312.81
+602520.12 797347.87
+602482.87 797434.45
+602478 797397.41
+602472.92 797375.61
+602454.93 797367.99
+602428.26 797385.35
+602418.31 797396.78
+602401.38 797411.38
+602362.02 797440.8
+602337.25 797461.97
+602290.89 797519.12
+602285.18 797543.89
+602262.95 797644.18
+602240.09 797733.71
+602229.3 797768.64
+602220.37 797785.24
+602235.93 797818.09
+602252.36 797853.54
+602278.73 797909.74
+602294.29 797945.18
+602255.82 797934.81
+602220.8 797920.98
+602149.04 797897.2
+602111.43 797888.12
+602102.58 797869.75
+602077.51 797817.88
+602061.3 797779.62
+602047.9 797680.19
+601954.96 797722.55
+601941.42 797725.4
+601931.61 797721.69
+601906.97 797695.75
+601873.25 797651.66
+601856.83 797641.28
+601840.67 797640.05
+601829.16 797642.58
+601818.35 797655.98
+601843.43 797701.37
+601866.77 797744.17
+601889.68 797786.53
+601901.14 797812.26
+601912.38 797847.27
+601894.22 797869.75
+601886.01 797877.97
+601878.66 797884.02
+601870.45 797890.5
+601848.4 797905.2
+601852.92 797978.9
+601877.56 797998.79
+601916.74 798022.78
+601964.12 798073.22
+601973.99 798086.81
+602060.35 798116.65
+602081.31 798126.18
+602202.47 798177.56
+602347.06 798230.09
+602444.21 798266.28
+602441.67 798044.66
+602441.67 798011.32
+602465.8 798035.77
+602487.71 798017.67
+602501.36 798004.97
+602511.84 797994.81
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 602363.24 797793.9
+Region  1
+  45
+614375.4 803320.19
+614393.76 803279.85
+614402.84 803247.25
+614417.77 803211.4
+614446.82 803226.16
+614472.04 803192.64
+614501.97 803154.38
+614513.2 803139.53
+614557.35 803107.66
+614570.96 803097.7
+614594.19 803079.78
+614594.52 803071.15
+614600.42 803044.39
+614609.68 802985.91
+614591.45 802974.03
+614548.6 802950.29
+614512.12 802942.18
+614484.91 802941.02
+614455.95 802943.92
+614399.5 802950.01
+614396.03 802981.28
+614160.95 802958.12
+614132.22 802933.73
+614045.69 802908.59
+614003.74 802890.67
+613950.35 802869.57
+613844.13 802891.92
+613776.82 802905.82
+613696.34 802922.5
+613644.38 802916.45
+613640.88 803009.83
+613672.54 803098.52
+613684.12 803138.48
+613716.42 803260.38
+613749.53 803345.94
+613745.06 803370.02
+614190.86 803678.22
+614205.12 803651.39
+614220.74 803621.37
+614256.61 803555.97
+614285.61 803496.51
+614314.24 803440.29
+614339.26 803393.78
+614359.8 803351.49
+614375.4 803320.19
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 614083.75 803200.32
+Region  1
+  89
+609893.46 805919.58
+609661.27 806143.08
+608926 807117.86
+608872.05 807211.06
+608951.84 807272.63
+609013.28 807310.86
+609069.04 807343.41
+609116.84 807376.68
+609162.7 807400.92
+609229.63 807433.6
+609276.01 807456.79
+609349.54 807497.08
+609384.33 807532.39
+609419.11 807577.72
+609474.98 807649.93
+609532.17 807722.91
+609583.3 807787.21
+609648.39 807875.45
+609705.84 807954.51
+609731.66 807954.51
+609751.42 807893.94
+609758.54 807871.24
+609767.18 807835.73
+609805.45 807718.92
+609865.53 807422.14
+609873.29 807362.54
+609865.77 807296.4
+609849.78 807254.94
+609971.43 807217.31
+609976.34 807210.21
+609989.7 807191.94
+610008.25 807165.48
+610106.67 807017.93
+610130.12 806987.93
+610114.85 806970.2
+610105.85 806957.93
+610097.74 806946.04
+610083.77 806913.15
+610078.1 806897.38
+610077.15 806856.06
+610076.88 806829.33
+610078.24 806790.6
+610094.2 806745.74
+610107.57 806697.73
+610176.09 806676.39
+610302.34 806646.63
+610451.45 806764.68
+610478.51 806853.55
+610502.76 806953.5
+610534.2 807084.6
+610539.26 807162.14
+610524.87 807263.39
+610508.35 807318.28
+610490.76 807344.39
+610457.73 807380.62
+610471.58 807396.08
+610545.86 807419.04
+610595.26 807438.63
+610668.14 807465.89
+610724.7 807504.24
+610800.31 807524.02
+610859.94 807545.39
+610814.91 807443.58
+610800.91 807381.59
+610810.31 807303.13
+610823.5 807227.84
+610839.86 807148.75
+610877.72 807050.03
+610894.22 807002.12
+610929.27 806921.15
+610950.3 806882.34
+610976.2 806812.55
+610994.52 806714.04
+611001.77 806649.59
+611008.83 806584.13
+611016.3 806512.83
+611020.62 806429.95
+611033.2 806369.47
+611026.72 806243.95
+611014 806193.97
+610997.49 806157.92
+610968.24 806104.15
+610942.29 806050.4
+610865.94 805981.61
+610761.23 805931.99
+610207.84 805800.62
+610193.73 805814.3
+610094.02 805720.96
+609893.46 805919.58
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 610047.37 806718.97
+Region  1
+  50
+615164.91 797967.27
+615119.29 797933.13
+615093.92 797891.39
+615081.18 797826.79
+615075.46 797769.01
+615070.38 797743.61
+615038.61 797705.41
+615003.07 797659.86
+614972.59 797630.01
+614892.17 797531.51
+614866.09 797475.11
+614883.55 797429.39
+614948.95 797342.71
+614954.98 797310.96
+614935.14 797287.9
+614921.64 797303.34
+614907.08 797317.73
+614845.5 797356.98
+614795.81 797380.73
+614702.18 797416.02
+614665.09 797462.48
+614637.9 797489.34
+614620.77 797650.59
+614622.03 797691.58
+614627.11 797716.35
+614674.67 797730.27
+614710.94 797738.58
+614697.6 797805.26
+614681.73 797881.47
+614590.91 797871.94
+614505.81 797866.86
+614342.29 797916.73
+614320.06 797912.92
+614292.45 797911.34
+614198.47 798095.49
+614119.96 798258.97
+614601.96 798190.07
+614982.73 798259.75
+615119.27 798565.21
+615307.25 798479.48
+615319.95 798473.77
+615307.25 798396.92
+615294.49 798324.66
+615285.34 798278.51
+615276.45 798228.98
+615261.97 798141.83
+615246.06 798074.15
+615240.89 798036.56
+615198.34 797999.73
+615164.91 797967.27
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 614811.38 797990.12
+Region  1
+  52
+603781.88 787427.05
+604338.38 787582.99
+604323.93 787235.51
+604431.28 787271.65
+604444.57 787260.89
+604469.22 787179.87
+604465.42 787164.68
+604377.42 787119.73
+604343.57 787097.13
+604303.35 787070.98
+604289.59 787063.47
+604324.52 787020.93
+604342.93 786996.16
+604351.82 786964.41
+604353.41 786940.91
+604358.8 786877.73
+604359.44 786857.09
+604359.76 786842.8
+604359.12 786823.43
+604366.11 786788.83
+604382.61 786727.24
+604408.32 786625.95
+604415.63 786590.38
+604417.21 786550.06
+604410.23 786518.3
+604396.89 786495.76
+604345.46 786479.88
+604286.65 786454.47
+604243.61 786435.48
+604224.49 786430.67
+604192.42 786472.9
+604171.15 786513.23
+604123.21 786567.87
+604029.23 786636.14
+603905.72 786716.15
+603837.9 786834.31
+603832.35 786844.31
+603820.34 786879.12
+603819.71 786882.29
+603792.66 786931.66
+603732.65 786987.22
+603662.16 787048.18
+603604.06 787153.62
+603605.65 787162.83
+603581.52 787196.2
+603591.04 787220.65
+603601.2 787244.78
+603613.9 787270.5
+603633.9 787307.97
+603664.7 787351.79
+603705.03 787389.58
+603781.88 787427.05
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 604069.88 787054.99
+Region  1
+  42
+608140.71 796754.3
+608134.94 796798.98
+608170.25 796925.09
+608150.07 796929.41
+608122.69 796921.48
+608096.75 796969.77
+608062.16 797103.8
+608181.06 797218.38
+608314 797314.33
+608446.46 797355.33
+608519.61 797359.55
+608582.44 797335.17
+608694.71 797258.51
+608765.53 797253.82
+608831.65 797204.11
+608960.15 797175.03
+609101.56 797154.13
+609258.44 797212.05
+609267.23 797215.74
+609056.02 796409.29
+609186.35 796036.26
+609186.66 796035.38
+609187.49 796032.42
+609184.42 796030.28
+609033.04 795998.26
+608933.57 795976.21
+608820.53 795950.01
+608726.4 795929.63
+608304.77 795846.18
+608201.59 796258.16
+608188.62 796271.13
+608147.55 796335.99
+608203.76 796348.96
+608231.14 796355.44
+608248.8 796360.12
+608235.11 796425.69
+608179.98 796643.68
+608173.49 796678.99
+608179.98 796704.93
+608187.18 796727.27
+608189.34 796740.24
+608140.71 796754.3
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 608644 796625.62
+Region  1
+  34
+604058.87 799037.28
+604019.65 799104.12
+603992.98 799141.27
+603968.68 799176.96
+603947.41 799224.9
+603941.22 799287.65
+603936.77 799341.32
+603919.94 799404.51
+603890.57 799440.57
+603847.39 799462.16
+603774.98 799489.79
+603722.27 799512.02
+603704.17 799519
+603685.28 799538.19
+603704.65 799603.64
+603720.52 799628.73
+603792.92 799665.88
+603876.44 799664.93
+603885.65 799656.67
+603899.78 799640.61
+603929.63 799619.34
+603968.37 799603.78
+604029.34 799577.42
+604076.02 799548.84
+604089.98 799530.56
+604101.76 799513.96
+604151.09 799398.74
+604298.09 799081.15
+604221.45 799108.41
+604150.64 798931.22
+604085.93 798775.84
+604078.3 798817.12
+604069.82 798845.94
+604058.87 799037.28
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 604021.55 799319.12
+Region  1
+  64
+611836.91 803049.44
+611743.75 803112.55
+611602.89 803203.18
+611618.26 803232.97
+611592.49 803249.77
+611550.26 803274.61
+611396.64 803355.97
+611861.82 803792.58
+611838.19 803870.23
+611802.02 803906.88
+611734.51 803916.05
+611575.6 803817.44
+611592.96 803889.77
+611529.79 803864.7
+611399.57 804075.41
+611434.29 804083.56
+611448.75 804088.38
+611460.33 804092.24
+611475.28 804097.06
+611491.67 804102.37
+611504.21 804107.19
+611525.67 804114.19
+611542.55 804119.97
+611562.32 804124.8
+611588.36 804132.51
+611596.56 804153.25
+611614.41 804197.62
+611633.7 804240.06
+611648.16 804271.41
+611665.04 804309.5
+611673.72 804332.65
+611720.34 804342.37
+611756.99 804347.19
+611774.92 804341.83
+611787.08 804344.95
+611807.35 804353.16
+611839.79 804400.28
+612356.75 804434.09
+612351.85 804418.26
+612319.5 804328.88
+612244.41 804146.74
+612203.22 804053.08
+612124.68 803857.46
+612301.74 803835.72
+612306.49 803739.99
+612296.76 803712.12
+612304 803613.86
+612327.55 803554.54
+612417.88 803563.35
+612438.26 803532.11
+612309.89 803295.5
+612373.74 803241.16
+612410.41 803271.04
+612481.06 803316.78
+612563.24 803365.88
+612527.92 803285.74
+612531.55 803254.97
+612014.43 802994.12
+611992.69 802985.07
+611971.85 802976.99
+611950.57 802967.93
+611916.61 803005.06
+611904.38 803010.95
+611836.91 803049.44
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 611955.73 803697.81
+Region  1
+  61
+612124.68 803857.46
+612203.22 804053.08
+612244.41 804146.74
+612319.5 804328.88
+612351.85 804418.26
+612356.75 804434.09
+612380.14 804510.31
+612390.86 804601.06
+612417.38 804646.14
+612457.28 804715.67
+612474.15 804736.89
+612547.32 804802.54
+612676.53 804879.46
+612711.24 804892.23
+612778.5 804900.67
+612824.42 804893.16
+612844.67 804862.31
+612839.85 804837.24
+612853.35 804818.43
+612877.94 804818.92
+612905.42 804819.88
+612942.39 804822.28
+612967.61 804822.29
+612987.38 804818.92
+612958.93 804728.28
+612785.14 804182.62
+612964.88 804103.62
+612960.63 804072.61
+612988.13 804069.36
+613024.21 804053.29
+613049.49 804022.91
+613273.73 803659.74
+613146.94 803598.16
+613055.01 803551.62
+613060.9 803560.58
+613063.16 803566.91
+613069.5 803583.22
+613071.77 803596.8
+613068.61 803627.49
+613050.91 803646.47
+613005.99 803661.05
+612987.32 803671.31
+612979.62 803683.99
+612810.72 803675.39
+612814.79 803591.62
+612811.17 803554.03
+612792.15 803519.17
+612762.49 803491.79
+612563.24 803365.88
+612481.06 803316.78
+612410.41 803271.04
+612373.74 803241.16
+612309.89 803295.5
+612438.26 803532.11
+612417.88 803563.35
+612327.55 803554.54
+612304 803613.86
+612296.76 803712.12
+612306.49 803739.99
+612301.74 803835.72
+612124.68 803857.46
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 612643.74 804070.02
+Region  1
+  57
+598713.45 789929.46
+598689.48 789982.78
+598691.6 790006.81
+598702.57 790045.81
+598710.64 790072.63
+598696.44 790129.71
+598662.99 790260.34
+598627.65 790355.01
+598653.67 790403.64
+598654.23 790436.44
+598640.33 790470.91
+598585.85 790535.39
+598515.25 790619.34
+598491.9 790649.91
+598502.46 790657.14
+598520.25 790672.15
+598546.48 790699.58
+598571.88 790724.98
+598606.17 790751.65
+598683.03 790765
+598698.27 790731.98
+598717.32 790702.77
+598754.15 790612.6
+598787.17 790580.85
+598833.51 790550.38
+598898.28 790509.11
+598968.76 790457.04
+599010.67 790432.27
+599075.44 790407.51
+599182.15 790361.15
+599274.24 790308.43
+599385.06 790195.69
+599407.92 790165.84
+599327.26 790100.43
+599241.97 789947.46
+599186.73 789834.46
+599149.58 789759.21
+599134.97 789737.62
+599090.84 789646.77
+599081.31 789551.51
+599056.85 789548.99
+599055.27 789562.01
+599048.92 789611.81
+599045.76 789659.14
+598949.1 789726.68
+598931.53 789680.6
+598899.97 789624.43
+598896.53 789637.39
+598883.99 789657.53
+598875.36 789667.35
+598852.64 789698.27
+598834.34 789722.26
+598819.19 789742.45
+598808.46 789755.7
+598742.35 789914.52
+598726.93 789925.9
+598713.45 789929.46
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 598938.84 790163.14
+Region  1
+  65
+610643.55 800193.71
+610649.61 800237.72
+610658.99 800323.34
+610669.36 800419.74
+610697.7 800426.98
+610716.47 800444.96
+610683.24 800527.45
+610665.84 800569.49
+610645.9 800616.8
+610626.36 800665.27
+610701.8 800738.37
+610783.9 800819.69
+610879.67 800872.07
+610950.82 800883.41
+611087.97 800905.84
+611192.99 800922.2
+611211.5 800884.32
+611283.59 800916.45
+611296.07 800888.04
+611314.37 800853.33
+611325.13 800805.56
+611339.34 800784.03
+611369.04 800759.07
+611391.18 800734.75
+611398.93 800713.65
+611397.21 800660.27
+611396.13 800583
+611417.22 800544.26
+611433.81 800530.69
+611430.8 800490.66
+611423.05 800439.43
+611414.44 800349.02
+611406.24 800273.67
+611400.38 800210.76
+611396.27 800121.85
+611393.54 800067.53
+611392.17 800023.13
+611391.98 799932.34
+611387.68 799836.99
+611393.74 799803.51
+611410.55 799775.37
+611439.07 799748.8
+611466.82 799730.04
+611285.88 799704.64
+611134.3 799669.66
+611031.75 799641.7
+610991.42 799627.1
+610945.07 799591.54
+610903.96 799630.12
+610843.18 799674.1
+610755.99 799732.36
+610707.13 799766.02
+610677.74 799785.23
+610682.5 799812.22
+610688.71 799837.39
+610688.71 799872.58
+610687.53 799910.5
+610653.91 799916.36
+610633.98 799933.56
+610618.34 799958.19
+610611.5 799990.04
+610602.12 800085.43
+610610.72 800103.41
+610615.02 800126.08
+610643.55 800193.71
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 611034 800267.98
+Region  1
+  138
+616132.3 806778.74
+616175.73 806731.84
+616278.52 806751.56
+616349.92 806654.27
+616093.49 806167
+616038.74 806066.63
+616003.71 805996.61
+615975.81 805951.08
+615958.66 805895.42
+615949.98 805846.81
+615945.89 805777.13
+615917.62 805735.65
+615707.75 805622.83
+615548.47 805537.38
+615477.13 805484.3
+615472.15 805446.97
+615176 805524.95
+615103.41 805544.47
+615050.32 805559.4
+615025.43 805566.04
+615001.25 805565.64
+615012.16 805590.09
+615018.8 805616.64
+615030.43 805635.84
+615041.88 805688.98
+615027.35 805718.08
+614998.25 805732.64
+614962.17 805740.25
+614903.31 805741.54
+614791.92 805756.78
+614765.34 805767.54
+614743.83 805782.1
+614736.33 805802.88
+614728.86 805836.9
+614718.9 805908.24
+614685.11 805934.59
+614662.99 805960.54
+614638.97 805999.14
+614633.32 806052.91
+614634.02 806119.97
+614653.05 806152.22
+614658.14 806180.68
+614656.26 806201.56
+614638.56 806221.18
+614608.18 806234.48
+614581.62 806256
+614562.94 806287.36
+614564.6 806434.19
+614500.73 806443.31
+614510.68 806471.52
+614522.29 806504.7
+614536.83 806533.34
+614669.56 806651.96
+614878.61 806983.78
+614891.46 807050.57
+614886.49 807105.32
+614860.77 807170.85
+614785.69 807264.99
+614750.02 807312.28
+614720.4 807364.83
+614695.74 807453.8
+614703.02 807544.38
+614725.66 807610.3
+614764.67 807663.88
+614830.18 807744.76
+614918.11 807855.36
+614905.98 807863.04
+614854.4 807857.58
+614819.63 807864.86
+614798.2 807902.88
+614800.62 807939.27
+614806.28 807962.32
+614832.76 808016.71
+614830.74 808040.57
+614766.44 808083.44
+614884.12 808547.67
+615018.38 808510.47
+615037.7 808508.5
+615042.77 808518.62
+615033.93 808537.6
+615007.37 808562.28
+614984.61 808591.39
+614985.91 808624.29
+615002.41 808663.5
+615127.7 808621.69
+615111.81 808561.6
+615114.32 808533.13
+615194.88 808510.26
+615237.59 808367.97
+615174.05 808123.18
+615168.23 808113.18
+615151.22 808083.97
+615144.24 808065.62
+615143.59 808049.18
+615154.97 808037.78
+615173.32 808032.08
+615189.15 808033.34
+615206.88 808043.45
+615229.68 808056.1
+615249.3 808051.66
+615269.54 808032.04
+615295.43 807964.97
+615369.44 807921.29
+615382.09 807906.73
+615383.34 807890.28
+615382.63 807816.9
+615392.12 807806.14
+615529.4 807727
+615559.76 807697.26
+615574.91 807661.19
+615579.3 807616.28
+615569.77 807580.85
+615546.94 807539.11
+615527.93 807522.04
+615456.99 807475.89
+615434.17 807441.74
+615410.45 807410.44
+615429.8 807373.93
+615488.44 807334.65
+615534.35 807316.4
+615563.66 807287.64
+615583.58 807243.94
+615594.09 807159.86
+615626.28 807117.13
+615654.75 807099.4
+615684.49 807094.33
+615730.99 807096.54
+615774.38 807091.76
+615803.48 807072.77
+615823.08 807051.88
+615843.54 807007.22
+615859.02 806949.7
+615887.78 806915.41
+615932.03 806896.61
+616017.75 806902.14
+616060.89 806887.76
+616094.63 806846.28
+616132.3 806778.74
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 615308.94 806746.68
+Region  1
+  37
+607242.45 808795.44
+607231.62 808762.94
+607513.73 808753.17
+607671.58 808749.14
+607652.88 808742.77
+607578.78 808721.31
+607402.73 808661.3
+607338.49 808625.5
+607258.21 808560.5
+607206.38 808491.67
+607174.94 808420.71
+607106.77 808219.54
+606918.55 808238.23
+606842.71 808243.54
+606796.44 808249.11
+606672.34 808261.39
+606611.59 808280.93
+606527.73 808308.98
+606469 808328.12
+606400.69 808351.61
+606312.59 808359.2
+606213.4 808337.88
+606176.64 808386.43
+606160.98 808446.47
+606132.26 808590.91
+606415.07 808845.88
+606423.55 808872.03
+606472.31 808920.79
+606515.42 808961.79
+606592.81 809038.41
+606612.02 809025.79
+606615.86 809054.81
+606617.94 809073.74
+606821.71 808990.28
+606840.15 808990.46
+606840.95 808956.47
+607242.45 808795.44
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 606761.99 808608.31
+Region  1
+  81
+612432.56 798074.2
+612394.02 798151.94
+612347.52 798244.5
+612259.98 798313.35
+612167.2 798383.78
+612097.89 798438.95
+612075.32 798469.21
+612004.88 798629.47
+611972.05 798709.26
+611955.86 798755.53
+611928.05 798854.92
+611915.51 798900.25
+612028.03 798934.85
+612115.67 798970.73
+612155.37 799002.48
+612186.64 799038.26
+612209.18 799081.44
+612222.84 799151.62
+612249.51 799276.73
+612273.32 799442.82
+612303.8 799612.97
+612318.09 799680.29
+612328.88 799770.12
+612325.36 799827.18
+612312.86 799865.08
+612450.03 799903.38
+612519.98 799922.14
+612576.45 799936.79
+612706.61 799971.19
+612752.54 799970.97
+612820.94 799972.14
+612872.22 799980.93
+612932.34 800014.75
+612983.11 800070.72
+613034.17 800157.98
+613026.35 800110.68
+612990.78 799955.5
+612964.98 799914.84
+612962.72 799887.8
+612951.82 799856.26
+612909.36 799744.13
+612896.38 799696.7
+612953.4 799670.16
+613025.62 799653.14
+613087.01 799638.56
+613166.73 799611.94
+613260.55 799591.68
+613378.74 799580.83
+613473.66 799558.01
+613572.8 799540.33
+613595.95 799485.56
+613597.64 799469.19
+613620.79 799459.02
+613687.42 799460.72
+613641.68 799421.19
+613612.32 799368.68
+613602.49 799320.7
+613600.75 799275.79
+613586.63 799189.96
+613567.43 799029.63
+613556.14 798998.57
+613552.75 798943.82
+613600.18 798750.15
+613614.01 798705.82
+613631.52 798662.34
+613653.54 798624.51
+613601.31 798586.38
+613537.5 798551.37
+613574.77 798488.13
+613615.26 798399.54
+613608.36 798348.96
+613462.12 798372.11
+613142.25 798426.02
+613067.15 797981.57
+612892.83 797970.47
+612744.19 797961.35
+612663.04 797958.62
+612632.94 797964.54
+612544.26 798001.71
+612486.36 798034.99
+612432.56 798074.2
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 612818.92 798946.66
+Region  1
+  80
+606797.13 793655.69
+606737.18 793636.55
+606723.15 793631.45
+606710.39 793632.72
+606681.05 793636.55
+606667.02 793644.21
+606646.61 793659.51
+606631.3 793677.37
+606619.82 793662.06
+606593.03 793645.48
+606575.41 793633.79
+606565.57 793657.29
+606560.81 793670.31
+606577 793700.47
+606568.11 793714.44
+606510.96 793716.98
+606474.77 793737.3
+606387.56 793823.85
+606329.14 793849.57
+606040.74 793983.7
+606031.53 793991.64
+606000.73 794105.98
+606001.05 794132.34
+606002.96 794158.05
+606017.56 794186.97
+606055.57 794266.73
+606092.9 794342.97
+606088.46 794395.46
+606044.86 794439.48
+605951.73 794533.44
+605960.2 794651.85
+606043.81 794756.25
+606109.86 794808.58
+606211.47 794865.08
+606214.24 794890.26
+606239.41 794846.45
+606300.58 794818.09
+606397.31 794821.41
+606469.49 794794.32
+606525.8 794757.94
+606646.63 794750.94
+606673.22 794738.13
+606690.51 794718.27
+606745.6 794635.64
+606808.21 794583.92
+606862.65 794535.88
+606907.81 794498.09
+606944.16 794336.87
+607043.6 794337.98
+607063.78 794307.24
+607099.65 794284.18
+607126.71 794280.53
+607260.9 794295.59
+607286.2 794281.17
+607308.97 794247.1
+607377.55 794119.15
+607388.03 794086.78
+607392.16 794002.59
+607386.13 793919.41
+607397.88 793899.09
+607382.65 793878.92
+607349.48 793838.1
+607336.72 793826.62
+607322.69 793802.38
+607315.04 793789.63
+607299.73 793767.94
+607286.97 793752.63
+607253.81 793718.19
+607235.95 793710.54
+607215.54 793710.54
+607192.58 793707.99
+607154.31 793700.33
+607022.92 793656.96
+607012.72 793687.58
+607003.79 793709.26
+606971.9 793704.16
+606937.45 793701.61
+606915.77 793699.06
+606854.54 793674.82
+606797.13 793655.69
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 606627.37 794202.76
+Region  1
+  73
+607666.97 806259.51
+607703.61 806161.93
+607709.76 806083.87
+607709.76 806001.94
+607713.86 805935.04
+607716.82 805877.05
+607714.08 805847.92
+607697.7 805814.24
+607569.81 805567.18
+607561.16 805555.35
+607562.98 805505.28
+607569.58 805414.02
+607517.66 805386.4
+607451.54 805356.79
+607396.11 805336.42
+607341.7 805340.55
+607289.37 805362.59
+607241.85 805386.01
+607170.12 805412.71
+607142.68 805419.75
+607140.62 805450.05
+607128.57 805495.84
+607113.42 805537.84
+607086.73 805538.65
+607029.12 805532.35
+606949.33 805510.88
+606891.06 805484.34
+606778.74 805421.46
+606642.38 805471.73
+606646.65 805491.73
+606682.65 805631.03
+606690.48 805739.82
+606714.43 805960.19
+606732.27 806052.55
+606753.51 806240.36
+606774.64 806341.32
+606776.99 806400.02
+606725.26 806517.56
+606720.25 806559.32
+606729.17 806604.87
+606757.69 806640.91
+606795.72 806673.16
+606839.42 806695.91
+606864.76 806712.98
+606876.65 806742.83
+606880.64 806752.83
+606959.12 806747.1
+607054.07 806750.21
+607142.51 806765.54
+607230.17 806777.28
+607291.22 806809.37
+607322.53 806844.59
+607368.7 806870.41
+607414.1 806900.94
+607455.18 806956.12
+607489.62 806992.12
+607567.1 807026.56
+607659.46 807050.04
+607751.03 807071.17
+607746.34 807034.39
+607746.34 806996.04
+607746.62 806978.38
+607748.44 806955.17
+607757.54 806920.67
+607768.47 806859.59
+607780.21 806824.49
+607794.19 806758.99
+607799.19 806696.63
+607787.59 806607.71
+607755.95 806449.54
+607731.14 806350.54
+607704.29 806297.74
+607666.97 806259.51
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 607248.74 806160.89
+Region  1
+  37
+608711.29 806982.56
+608251.51 805983.13
+608231.02 805991.32
+607870.21 806158.15
+607709.76 806083.87
+607703.61 806161.93
+607666.97 806259.51
+607704.29 806297.74
+607731.14 806350.54
+607755.95 806449.54
+607787.59 806607.71
+607799.19 806696.63
+607794.19 806758.99
+607780.21 806824.49
+607768.47 806859.59
+607757.54 806920.67
+607748.44 806955.17
+607746.62 806978.38
+607746.34 806996.04
+607883.62 806960.63
+607921.85 806963.36
+607976.92 806966.55
+608062.26 806974.92
+608241.59 806991.3
+608349.91 807289.81
+608365.39 807277.53
+608479.63 807187.41
+608518.77 807176.94
+608554.73 807180.58
+608592.05 807185.13
+608665.1 807191.27
+608675.57 807147.58
+608683.76 807112.53
+608689.68 807088.86
+608709.47 807010.33
+608719.03 807007.96
+608711.29 806982.56
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 608182.48 806624.35
+Region  1
+  55
+610681.43 802061.74
+610559.7 802116.25
+610454.42 802167.38
+610420.89 802182.58
+610401.43 802195.25
+610379.87 802186.27
+610387.98 802117.54
+610394.87 802094.3
+610139.22 801966.05
+610066.68 802129.69
+610038.49 802197.47
+610068.26 802265.97
+610121.37 802351.88
+610186.95 802454.71
+610226.26 802503.69
+610264.84 802536
+610324.88 802567.56
+610376 802578.65
+610448.34 802586.37
+610534.73 802589.21
+610606.55 802594.63
+610649.24 802604.79
+610706.29 802621.5
+610905.71 802674.25
+610911.81 802649.85
+610938.23 802552.28
+610948.4 802541.44
+611004.64 802550.25
+611112.37 802570.58
+611090.01 802530.6
+611064.94 802485.2
+611033.77 802430.32
+611008.1 802386.1
+610953.8 802294.96
+610982.54 802277.37
+611126.86 802194.96
+611280.56 802105.1
+611272.15 802077.31
+611326.13 802021.43
+611357.72 801989.2
+611373.6 801963.47
+611378.84 801918.57
+611385.98 801808.52
+611393.13 801714.65
+611394.08 801694.96
+611336.92 801679.4
+611293.74 801669.88
+611252.68 801709.56
+611190.71 801759.57
+611126.82 801796.93
+611003.32 801859.13
+610876.98 801950.79
+610815.92 801994.94
+610774.6 802016.33
+610681.43 802061.74
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 610728.1 802224.9
+Region  1
+  20
+603302.86 789119.79
+603532.11 789273.8
+603773.41 789437.03
+603806.11 789455.12
+603899.51 789107.4
+604007.76 788705.87
+603971.03 788692.86
+603940.55 788684.29
+603934.84 788673.18
+603932.3 788666.83
+603924.36 788661.11
+603282.99 788454.43
+603249.98 788562.11
+603215.69 788684.67
+603167.42 788670.68
+603059.79 788641.15
+603030.9 788632.62
+602971.52 788892.62
+603009.94 788916.44
+603302.86 789119.79
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 603529.16 788900.8
+Region  1
+  97
+613515.56 796168.35
+613065.97 796290.42
+613049.31 796226.01
+613047.65 796219.59
+613037.92 796206.01
+612851.8 795994.65
+612842.35 795983.71
+611762.54 796273.77
+611766.04 796286.36
+611899.19 796788.51
+611894.42 796844.33
+611914.93 796854.82
+611868.61 796937.4
+611885.59 796945.74
+611965.5 796980.78
+612017.03 796992.71
+612131.73 797002.91
+612153.95 796980.3
+612267.11 796987.56
+612364.9 797033.28
+612418.88 797058.05
+612458.25 797060.59
+612575.72 797037.73
+612576.29 797037.77
+612649.39 797043.46
+612738.29 797083.46
+612812.58 797122.2
+612952.92 797228.24
+613052.15 797294.93
+613118.19 797320.33
+613191.85 797309.53
+613255.99 797275.24
+613348.06 797207.3
+613564.6 797124.74
+613629.84 797118.05
+613682.38 797135.78
+613756.28 797184.56
+613829.07 797232.31
+613904.2 797280.65
+614002.3 797340.34
+614034.33 797424.79
+614086.16 797501.67
+614157.79 797596.6
+614208.17 797667.31
+614223.9 797698.76
+614244.19 797745.61
+614239.11 797818.63
+614208 797895.47
+614125.45 797991.35
+614056.23 798043.42
+613990.83 798075.17
+613955.27 798078.35
+613943.2 798111.37
+614040.84 798071.6
+614079.57 798058.59
+614114.17 798055.93
+614198.47 798095.49
+614292.45 797911.34
+614320.06 797912.92
+614342.29 797916.73
+614505.81 797866.86
+614590.91 797871.94
+614681.73 797881.47
+614697.6 797805.26
+614710.94 797738.58
+614674.67 797730.27
+614627.11 797716.35
+614622.03 797691.58
+614620.77 797650.59
+614637.9 797489.34
+614642.22 797456.94
+614646.46 797422.02
+614662.94 797266.24
+614713.69 796781.16
+613987.82 796701.99
+614012.18 796648.53
+614045.66 796619.74
+614177.22 796600.13
+614235.89 796588.25
+614338.48 796502.58
+614349.79 796455.71
+614337.72 796422.05
+614241.83 796324.26
+614218.67 796287.11
+614224.68 796190.26
+614258.46 796128.96
+614291.48 796074.35
+614316.25 796024.19
+614323.87 795994.34
+614325.14 795982.91
+614271.8 795987.99
+614187.98 795986.72
+614156.23 795978.47
+613943.72 795984.84
+613737.44 796105.19
+613632.92 796134.95
+613515.56 796168.35
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 613375.09 796765.84
+Region  1
+  19
+603656.45 790021.88
+603797.22 789484.97
+603800.4 789473.22
+603806.11 789455.12
+603773.41 789437.03
+603532.11 789273.8
+603302.86 789119.79
+603293.97 789142.02
+603229.11 789305.8
+603099.22 789659.61
+603006.78 789927.79
+602935.35 790140.59
+602919.89 790188.45
+602967.75 790198.02
+603005.3 790207.59
+602988.37 790293.74
+603556.42 790420.75
+603653.82 790031.88
+603656.45 790021.88
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 603375.5 789820.02
+Region  1
+  57
+614380.73 801199.31
+614377.99 801092.73
+614412.62 801055.35
+614463.62 801029.07
+614499.49 800985.52
+614518.73 800954.73
+614533.03 800923.95
+614549.79 800884.18
+614564.64 800830.3
+614575.63 800754.43
+614605.6 800645.87
+614603.57 800578.54
+614596.53 800492.79
+614571.71 800382.28
+614537.04 800323.2
+614460.97 800227.99
+614411.46 800172.25
+614077.81 799904.57
+613984.04 799830.9
+613916.58 799754.35
+613888.11 799874.19
+613865.38 799967.72
+613848.15 800042.84
+613820.64 800160.29
+613799.59 800255.98
+613798.89 800295.45
+613811.81 800346.16
+613827.12 800397.35
+613836.44 800431.56
+613864.19 800519.59
+613870.89 800559.3
+613868.72 800600.68
+613841.45 800793.49
+613796.47 801130.77
+613758.68 801198.23
+613785.3 801242.86
+613691.25 801275.75
+613777.73 801403.88
+613828.84 801483.22
+613866.4 801530.07
+613922.48 801607.04
+614005.77 801702.96
+614049.75 801752.44
+614100.33 801809.07
+614172.36 801885.49
+614185.55 801862.95
+614252.63 801759.59
+614250.43 801750.23
+614289.47 801680.41
+614330.15 801591.34
+614323.01 801551.75
+614300.25 801490.36
+614303.21 801437.37
+614315.86 801360.95
+614336.75 801308.72
+614367.54 801234.5
+614380.73 801199.31
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 614139.89 800798.67
+Region  1
+  123
+610567.76 791819.43
+610231.85 790910.99
+610199.32 790825.1
+610050.24 790895.11
+610010.41 790919.72
+609984.06 790932.42
+609953.26 790954.01
+609924.05 790976.87
+609897.55 790994.88
+609869.07 791018.93
+609760.87 791088.54
+609651.4 791171.44
+609524.1 791287.12
+609377.41 791462.69
+609214.85 791455.07
+609222.47 791467.77
+609232.63 791482.37
+609244.06 791498.88
+609256.76 791480.47
+609277.72 791472.85
+609296.77 791482.37
+609325.98 791508.41
+609355.19 791545.24
+609377.41 791575.72
+609387.57 791582.7
+609400.27 791650.65
+609461.23 791660.81
+609454.25 791709.36
+609459.87 791813.23
+609475.21 791908.12
+609472.2 792006.42
+609450.46 792057.7
+609411.09 792120.89
+609346.45 792207.1
+609396.7 792250.75
+609411.08 792269.49
+609426.33 792323.47
+609417.56 792369.03
+609398.82 792397.93
+609342.47 792469.87
+609462.16 792560.36
+609517.72 792491.78
+609544.72 792449.84
+609565.52 792401.74
+609575.21 792332.35
+609580.61 792300.17
+609596.49 792284.29
+609688.25 792245.24
+609759.69 792215.69
+609804.14 792197.59
+609797.15 792235.37
+609787.31 792278.87
+609819.55 792265.22
+609868.91 792246.8
+609861.29 792280.12
+609853.67 792311.24
+609843.83 792349.98
+609833.35 792395.7
+609853.03 792406.21
+609876.85 792419.23
+609899.39 792433.2
+609902.56 792465.59
+609907.64 792505.59
+609911.45 792546.21
+609916.53 792598.92
+609923.83 792684
+609906.38 792767.47
+609900.34 792798.58
+609894.63 792831.29
+609974.64 792832.56
+609974 792873.83
+609973.05 792939.89
+609973.05 793003.39
+609973.05 793073.88
+609973.06 793161.21
+609957.18 793162.48
+609923.53 793162.16
+609891.78 793163.11
+609892.73 793239.98
+609958.45 793239.34
+610040.69 793239.66
+610073.39 793239.64
+610107.04 793239.64
+610133.71 793232.33
+610160.38 793217.41
+610166.73 793322.51
+610189.27 793334.89
+610215.31 793338.39
+610240.71 793327.28
+610267.7 793269.18
+610295.89 793207.77
+610324.33 793167.84
+610348.46 793159.58
+610364.65 793157.99
+610398.31 793060.84
+610400.36 793003.22
+610467.67 792960.99
+610513.71 792938.13
+610557.84 792922.57
+610609.59 792915.9
+610662.93 792919.08
+610721.67 792933.04
+610747.07 792937.8
+610778.82 792942.88
+610689.13 792836.04
+610492.62 792601.04
+610463.25 792519.37
+610476.49 792451.14
+610505.5 792405.55
+610556.42 792369.91
+610618.19 792352.94
+610813.53 792326.34
+610928.94 792309.03
+610981.04 792286.4
+611017.08 792256.53
+611043.66 792191.8
+611045.17 792131.49
+611024.47 792073.78
+610975.76 792025.47
+610933.83 792003.52
+610645.32 791908.14
+610596.27 791871.02
+610567.76 791819.43
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 610102.47 792024.54
+Region  1
+  47
+603482.28 795647.03
+603622.97 795654.06
+603709.7 795669.95
+603838.49 795684.61
+603918.07 795683.91
+603888.63 794997.02
+603776.87 795028.14
+603770.21 795044.09
+603729.05 795065.89
+603673.81 795065.25
+603642.06 795049.38
+603556.97 795060.16
+603438.86 795029.68
+603327.1 795016.98
+603221.05 795041.75
+603179.65 795012.7
+603146.84 794997.04
+603137.1 795019.9
+603125.46 795012.92
+603084.17 794979.65
+603073.39 794971.85
+603061.86 794962.86
+603032.33 794965.51
+602938.39 795123.23
+602949.44 795149.64
+602934.19 795204.84
+602830.03 795486.53
+602686.52 795478.91
+602577.14 795473.05
+602465.17 795465.41
+602437.87 795464.99
+602441.25 795507.74
+602445.49 795540.57
+602468.13 795573.16
+602524.87 795610.83
+602524.27 795646.08
+602528.08 795670.13
+602729.34 795792.63
+602785.65 795821.36
+602827.14 795841.04
+602892.97 795865.56
+602961.98 795882.28
+603037.05 795881.61
+603154.81 795843.25
+603298.75 795739.12
+603396.55 795676.4
+603482.28 795647.03
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 603272.83 795428.52
+Region  1
+  133
+606546.87 807108.56
+606532.35 807144.63
+606520.38 807190.18
+606492.62 807257.89
+606466.12 807327.5
+606422.88 807399.77
+606416.79 807476.33
+606402 807543.33
+606393.74 807618.6
+606357.82 807675.45
+606309.05 807753.19
+606264.53 807823.86
+606235.55 807880.4
+606209.33 807913.64
+606121.25 807948.6
+606147.21 807902.31
+605549.66 807841.92
+605544.71 807870.89
+605335.52 807848.98
+605330.22 807947.64
+605335.16 807969.55
+605368.38 807993.57
+605461.67 808005.59
+605454.6 808091.81
+605454.6 808113.72
+605475.1 808111.6
+605497.71 808112.31
+605523.51 808121.91
+605503.72 808197.53
+605629.52 808213.79
+605660.33 808340.17
+605666.11 808404.69
+605638.94 808445.2
+605594.54 808479.82
+605542.95 808527.17
+605516.09 808570.99
+605502.66 808644.49
+605489.23 808704.56
+605478.28 808760.04
+605492.07 808780.78
+605732.35 808832.41
+605759.21 808837.36
+605785.36 808840.19
+605807.26 808827.46
+605870.87 808785.06
+605865.92 808813.33
+605855.19 808878.35
+605851.41 808899.86
+605859.02 808914.41
+605885.65 808952.35
+605898.32 808972.59
+605907.83 808987.13
+605985.72 808966.32
+605985.72 808982.58
+606000.27 809001.01
+606170.89 808991.76
+606236.61 808986.82
+606281.14 808983.28
+606337.68 809006.61
+606362.41 809015.79
+606400.93 808890.41
+606415.07 808845.88
+606132.26 808590.91
+606160.98 808446.47
+606176.64 808386.43
+606213.4 808337.88
+606312.59 808359.2
+606400.69 808351.61
+606469 808328.12
+606527.73 808308.98
+606611.59 808280.93
+606672.34 808261.39
+606796.44 808249.11
+606842.71 808243.54
+606918.55 808238.23
+607106.77 808219.54
+607174.94 808420.71
+607206.38 808491.67
+607258.21 808560.5
+607338.49 808625.5
+607402.73 808661.3
+607578.78 808721.31
+607652.88 808742.77
+607671.58 808749.14
+607751.25 808744.67
+607797.87 808734.65
+607752.95 808684.34
+607696.87 808621.46
+607652.03 808573.66
+607647.78 808502.7
+607640.75 808381.83
+607638.86 808249.91
+607659.25 808209.12
+607690.11 808160.72
+607824.54 807939.76
+607882.53 807841.82
+607922.47 807778.52
+607994.9 807657.22
+608038.87 807555.89
+608084.34 807453.92
+608139.18 807362.64
+608195.16 807364
+608247.51 807362.18
+608349.91 807289.81
+608241.59 806991.3
+608062.26 806974.92
+607976.92 806966.55
+607921.85 806963.36
+607883.62 806960.63
+607746.34 806996.04
+607746.34 807034.39
+607751.03 807071.17
+607659.46 807050.04
+607567.1 807026.56
+607489.62 806992.12
+607455.18 806956.12
+607414.1 806900.94
+607368.7 806870.41
+607322.53 806844.59
+607291.22 806809.37
+607230.17 806777.28
+607142.51 806765.54
+607054.07 806750.21
+606959.12 806747.1
+606880.64 806752.83
+606824.96 806769.94
+606762.34 806812.99
+606729.48 806856.03
+606706.11 806894
+606671.35 806938.94
+606624.58 806992.11
+606578.45 807059.83
+606546.87 807108.56
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 606896.73 807815.75
+Region  1
+  56
+609965.13 803428.54
+609957.14 803519.81
+609943.25 803673.69
+609948.65 803765.66
+609952.08 803845.25
+609975.08 803926.49
+609992.1 803976.67
+610046.6 803932
+610079.75 803867.79
+610103.79 803830.94
+610141.12 803796.89
+610227.43 803721.33
+610241.77 803708.19
+610254.91 803702.81
+610473.2 803609.45
+610546.08 803578.8
+610605.56 803557.89
+610675.44 803556.4
+610703.94 803435.35
+610708.1 803420.62
+610715.79 803386.35
+610757.88 803346.52
+610794.09 803187.31
+610805.46 803133.68
+610822.69 803069.36
+610808.19 803059.51
+610789.14 803045.9
+610658.64 802961.82
+610546.56 802888.49
+610523.02 802893.47
+610485.23 802902.44
+610436.56 802900.2
+610400.05 802891.87
+610369.95 802871.37
+610321.76 802840.13
+610280.45 802813.87
+610254.51 802801.7
+610170.28 802797.22
+610164.04 802780.73
+610143.23 802747.11
+610127.61 802705.28
+610122.36 802688.26
+610119.62 802679.22
+610036.6 802657.99
+610022.52 802652.74
+610007.6 802677.75
+609978.14 802714.61
+609946.12 802761.36
+609918.74 802815.32
+609917.78 802831.97
+609940.09 802904.69
+609959.17 802969.21
+609972.53 803028.68
+609971.39 803082.86
+609957.93 803161.96
+609965.13 803428.54
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 610294.57 803263.83
+Region  1
+  53
+612593.97 797653.43
+613257.15 797568.02
+613901.69 797827.51
+613878.54 797893.57
+614009.25 797946.35
+614006.43 797953.69
+613990.83 797999.61
+613978.76 798027.55
+613970.78 798043.74
+613965.07 798058.35
+613955.27 798078.35
+613990.83 798075.17
+614056.23 798043.42
+614125.45 797991.35
+614208 797895.47
+614239.11 797818.63
+614244.19 797745.61
+614223.9 797698.76
+614208.17 797667.31
+614157.79 797596.6
+614086.16 797501.67
+614034.33 797424.79
+614002.3 797340.34
+613904.2 797280.65
+613829.07 797232.31
+613756.28 797184.56
+613682.38 797135.78
+613629.84 797118.05
+613564.6 797124.74
+613348.06 797207.3
+613255.99 797275.24
+613191.85 797309.53
+613118.19 797320.33
+613052.15 797294.93
+612952.92 797228.24
+612812.58 797122.2
+612738.29 797083.46
+612649.39 797043.46
+612576.29 797037.77
+612549.01 797084.94
+612502.35 797165.63
+612501.86 797166.47
+612404.75 797334.37
+612509.85 797394.67
+612403.39 797543.55
+612438.95 797568.62
+612459.47 797574.55
+612489.1 797587.32
+612540.17 797579.11
+612563.42 797577.74
+612569.35 797616.95
+612572.09 797653.43
+612593.97 797653.43
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 613365.03 797472.66
+Region  1
+  100
+604837.81 802684.65
+604842.26 802578.27
+604848.01 802523.91
+604854.1 802480
+604874.27 802345.44
+604866.04 802264.79
+604844.64 802200.6
+604795.26 802140.52
+604733.53 802093.61
+604673.04 802066.06
+604516.67 802005.15
+604492.92 802036.11
+604444.54 802109.53
+604401.83 802173.95
+604357.88 802233.63
+604228.58 802286.31
+604169.49 802267.23
+604070.79 802238.34
+604034.7 802227.22
+604014.39 802221.69
+603969.46 802283.23
+603636.66 802748.96
+603603.2 802791.82
+603573.71 802824.24
+603580.36 802844.68
+603697.61 802862.69
+603773.12 802986.73
+603784.82 802996.57
+603798.36 802998.42
+603824.52 803019.04
+603852.22 803039.96
+603887.91 803069.51
+603919.3 803092.28
+603962.39 803122.44
+604005.47 803144.6
+604051.01 803165.52
+604097.79 803180.91
+604146.41 803173.52
+604188.88 803185.22
+604288.9 802983.07
+604320.29 803002.15
+604359.68 803023.08
+604416.3 803049.54
+604431.69 803016.92
+604496.31 802887.67
+604931.74 803101.55
+604978.78 803051.88
+605142.93 802945.76
+605166.45 802930.6
+605176.91 802953.61
+605168.02 802978.18
+605149.73 803024.7
+605149.2 803057.11
+605157.31 803102.33
+605215.86 803131.61
+605234.68 803100.76
+605255.07 803064.17
+605267.09 803045.35
+605268.66 803037.51
+605303.16 803035.94
+605361.71 803029.15
+605501 803009.02
+605513.02 803025.75
+605613.39 803005.36
+605722.57 802979.61
+605788.78 802964.33
+605815.45 802970.6
+605880.79 803003.01
+605918.43 803022.35
+605940.91 803036.47
+605962.86 803012.42
+605992.66 802999.35
+606036.57 802980.01
+606074.48 802960.93
+606151.32 802926.95
+606205.45 802904.07
+606266.06 802882.25
+606263.45 802871.8
+606051.57 802267.69
+606030.17 802210.08
+606020.29 802186.17
+605984.08 802185.39
+605961.86 802191.15
+605929.76 802219.14
+605887.79 802299.79
+605834.71 802400.61
+605801.79 802471.39
+605736.77 802499.37
+605197.47 802712.88
+605115.4 802746.86
+605085.08 802759.93
+605062.08 802771.95
+605047.96 802787.11
+605035.42 802804.89
+605020.78 802796.52
+605001.44 802789.73
+604906.07 802747.34
+604864.08 802734.11
+604833.02 802720.31
+604837.81 802684.65
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 604836.35 802677.09
+Region  1
+  21
+610409.8 796630.57
+610092.97 795436.65
+610086.66 795414.99
+610085.28 795410.24
+609923.45 795453.85
+609696.71 795514.96
+609696.4 795515.04
+609682.69 795518.73
+609680.35 795519.36
+609678.24 795519.93
+609674.68 795520.89
+609674.64 795520.9
+609536.93 795558.01
+609277.95 795863.12
+609277.84 795863.25
+609213.55 795938.99
+609187.49 796032.42
+609200.43 796041.44
+610364.34 796720.1
+610445.47 796767.66
+610409.8 796630.57
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 609861.22 796017.31
+Region  1
+  45
+608765.28 799110.24
+609280.53 799126.82
+609215 799391.25
+609259.34 799386.37
+609626.53 799456.79
+609622.79 799547.27
+609702.27 799550.31
+609736.65 799553.3
+609772.95 799554.41
+609806.25 799555.8
+609852.39 799558.92
+609847.88 799505.5
+609844.41 799460.75
+609881.53 799507.23
+609905.46 799516.25
+609941.54 799514.52
+609976.66 799496.43
+610008.21 799442.43
+610055.08 799345.17
+610078.29 799289.84
+610092.85 799254.65
+610002.91 799197.47
+609898.85 799132.25
+609843.8 799131.75
+609824.38 799133.88
+609809.37 799133.47
+609787.22 799131.61
+609794.22 798505.1
+609267.77 798492.3
+609193.84 798617.41
+609127.52 798518.11
+609104.37 798482.7
+608963.57 798554.33
+608931.03 798568.31
+608885.94 798568.09
+608883.77 798788.94
+608765.57 798783.5
+608731.13 798788.79
+608706.07 798793.14
+608711.52 798829.09
+608721.41 798909.42
+608725.8 798953.29
+608735.06 799014.71
+608745.29 799107.81
+608765.28 799110.24
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 609414.03 798979.15
+Region  1
+  65
+610559.48 794998.34
+610681.5 794960.81
+610681.54 794960.8
+610681.59 794960.78
+610681.61 794960.77
+610768.27 794934.12
+610875.4 794905.36
+610875.49 794905.34
+610957.01 794883.46
+611000.71 794871.73
+611209.69 794815.64
+611227.96 794817.3
+611229.67 794817.46
+611033.95 794075.11
+610999.9 794023.18
+610972.59 793985.92
+610901.33 793884.54
+610807.67 793951.22
+610740.04 794004.88
+610714.96 793957.57
+610710.51 793868.98
+610708.45 793806.6
+610740.2 793724.05
+610760.84 793694.2
+610767.19 793662.13
+610755.12 793644.35
+610669.98 793645.31
+610603.62 793646.9
+610542.66 793648.79
+610387.4 793652.92
+610345.42 793618.57
+610322 793621.78
+610295.96 793630.04
+610272.64 793661.6
+610256.27 793683.7
+610164.51 793624.96
+610166.42 793656.07
+610172.14 793756.41
+610185.97 793778.68
+610187.9 793845.14
+610151.85 793914.76
+610073.61 794046.78
+610059.32 794068.37
+610024.71 794123.62
+610003.59 794165.03
+609992.79 794218.68
+609996.6 794287.58
+610019.9 794340.76
+610063.42 794385.67
+610085.58 794425.55
+610088.49 794473.78
+610069.8 794516.06
+610021.62 794578.71
+610021.3 794633.64
+610033.36 794659.36
+610042.25 794677.14
+610097.04 794747.44
+610121.34 794779.67
+610140.07 794808.88
+610151.5 794877.14
+610160.8 794944.94
+610288.59 795355.45
+610355.98 795337.29
+610558.47 794998.65
+610559.48 794998.34
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 610548.32 794412.86
+Region  1
+  86
+609718.41 793322.99
+609750.82 793322.8
+609910.84 793322.16
+610013.07 793317.66
+610166.73 793322.51
+610160.38 793217.41
+610133.71 793232.33
+610107.04 793239.64
+610073.39 793239.64
+610040.69 793239.66
+609958.45 793239.34
+609892.73 793239.98
+609891.78 793163.11
+609923.53 793162.16
+609957.18 793162.48
+609973.06 793161.21
+609973.05 793073.88
+609973.05 793003.39
+609973.05 792939.89
+609974 792873.83
+609974.64 792832.56
+609894.63 792831.29
+609900.34 792798.58
+609906.38 792767.47
+609923.83 792684
+609916.53 792598.92
+609911.45 792546.21
+609907.64 792505.59
+609902.56 792465.59
+609899.39 792433.2
+609876.85 792419.23
+609853.03 792406.21
+609833.35 792395.7
+609843.83 792349.98
+609853.67 792311.24
+609861.29 792280.12
+609868.91 792246.8
+609819.55 792265.22
+609787.31 792278.87
+609797.15 792235.37
+609804.14 792197.59
+609759.69 792215.69
+609688.25 792245.24
+609596.49 792284.29
+609580.61 792300.17
+609575.21 792332.35
+609565.52 792401.74
+609544.72 792449.84
+609517.72 792491.78
+609462.16 792560.36
+609342.47 792469.87
+609398.82 792397.93
+609417.56 792369.03
+609426.33 792323.47
+609411.08 792269.49
+609396.7 792250.75
+609346.45 792207.1
+609258.99 792314.26
+609177.05 792422.87
+609156.73 792476.21
+609143.4 792564.45
+609132.61 792641.89
+609133.88 792693.65
+609183.73 792875.22
+609168.81 792948.9
+609107.16 793048.72
+609051.49 793141.13
+609002.78 793209.48
+608947.13 793292.83
+608943.32 793339.19
+608955.39 793367.76
+608961.1 793467.46
+608948.41 793545.77
+608918.28 793616.24
+608933.84 793613.07
+608981.78 793614.33
+609095.45 793615.91
+609155.14 793614.01
+609190.7 793604.19
+609406.6 793522.59
+609499.47 793546.36
+609530.21 793561.73
+609544.54 793576.58
+609574.3 793534.83
+609659.06 793409.48
+609718.41 793322.99
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 609492.45 792961.13
+Region  1
+  69
+610193.73 805814.3
+610207.84 805800.62
+610761.23 805931.99
+610865.94 805981.61
+610848.63 805881.18
+610859.29 805835.68
+610871.55 805795.71
+610883.8 805763.74
+610894.72 805714.98
+610891.52 805665.95
+610875.81 805615.57
+610858.76 805592.66
+610845.97 805562.81
+610811.86 805498.33
+610791.08 805443.45
+610776.43 805411.21
+610808.93 805395.76
+610844.1 805408.01
+611002.39 805320.62
+611035.43 805307.83
+611084.41 805306.32
+611093.25 805271.89
+611102.84 805260.16
+611079.39 805227.12
+611059.68 805169.57
+611094.85 805159.98
+611139.29 805156.35
+611171.05 805147.19
+611196.9 805131.47
+611233.67 805121.87
+611282.16 805124.54
+611322.13 805132.53
+611370.62 805153.32
+611467.61 805203.94
+611554.21 805242.06
+611593.64 805245.26
+611711.41 805235.13
+611790.26 805226.43
+611957.32 804961.32
+611902.44 804935.75
+611896.57 804945.34
+611882.19 804936.81
+611869.4 804932.55
+611855.54 804930.42
+611839.55 804926.15
+611816.11 804920.29
+611774.54 804912.3
+611568.97 804480.02
+611396.73 804561.67
+611382.27 804517.55
+611023.33 804657.88
+610844 804730.43
+610805.44 804748.99
+610721.33 804838.4
+610697.22 804857.93
+610683 804868.29
+610632.15 804898.9
+610464.94 804992.2
+610346.57 804987.83
+610099.81 805072.1
+610124.07 805151.43
+610140 805202.88
+610151.84 805297.47
+610166.82 805371.49
+610143.71 805366.36
+610102.22 805628.99
+610092.2 805700.02
+610094.02 805720.96
+610193.73 805814.3
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 610898.57 805181.48
+Region  1
+  70
+610282.93 799862.52
+610338.81 799876.52
+610415.33 799884.78
+610440.47 799877.27
+610532.34 799854.98
+610534.29 799824.88
+610550.1 799658.54
+610644.41 799587.1
+610698.7 799522.64
+610658.99 799504.51
+610624.38 799488.64
+610589.85 799319.74
+610779.06 799024.33
+610725.72 798989.23
+610671.01 798963.69
+610629.52 798930.41
+610594.61 798892.66
+610569.78 798878.83
+610500.48 798849.2
+610448.5 798812.72
+610421.15 798788.56
+610397.45 798766.14
+610355.89 798718.51
+610331.32 798730.95
+610290.67 798748.85
+610256.39 798763.41
+610231.51 798761.29
+610213.92 798822.87
+610208.01 798845.2
+610202.55 798864.92
+610235.61 798880.7
+610277.48 798890.71
+610253.96 798916.01
+610223.32 798946.65
+610199.36 798978.2
+610182.98 799004.59
+610128.67 799112
+610140.2 799139.3
+610104.08 799232.51
+610092.85 799254.65
+610078.29 799289.84
+610055.08 799345.17
+610008.21 799442.43
+609976.66 799496.43
+609941.54 799514.52
+609905.46 799516.25
+609881.53 799507.23
+609844.41 799460.75
+609847.88 799505.5
+609852.39 799558.92
+609856.09 799613.25
+609860.96 799661.02
+609850.24 799708.79
+609838.54 799779.95
+609820.99 799856.96
+609838.54 799872.56
+609862.91 799896.93
+609900.93 799933
+609949.67 799980.77
+609967.22 800003.19
+609992.42 799938.1
+610049.25 799950.17
+610066.65 799934.95
+610095.9 799917.41
+610132.94 799894.98
+610182.92 799865.71
+610207.37 799848.57
+610242.93 799824.42
+610253.09 799844.74
+610282.93 799862.52
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 610302.18 799401.54
+Region  1
+  73
+609959.7 801971.07
+609735.1 801674.65
+609607.98 801510.8
+609545.37 801454.77
+609481.98 801424.2
+609305.37 801363.3
+609217.86 801333.94
+609085.66 801293.33
+608996.76 801256.5
+608785.94 801189.83
+608571.84 801115.17
+608447.19 801073.74
+608370.43 801040.3
+608338.12 801055.88
+608338.12 801068.04
+608343.44 801080.58
+608382.59 801130.37
+608437.69 801158.87
+608458.41 801174.25
+608466.01 801190.59
+608461.83 801250.25
+608457.43 801317.33
+608452.11 801349.64
+608460.24 801369.61
+608455.68 801412.18
+608467.84 801477.55
+608466.32 801536.85
+608432.11 801601.46
+608407.03 801663.8
+608402.41 801699.92
+608407.49 801729.13
+608420.19 801755.8
+608434.16 801785.01
+608450.67 801829.46
+608468.36 801872.94
+608494.95 801882.42
+608538.3 801898.04
+608587.83 801843.43
+608628.47 801807.87
+608653.87 801785.01
+609171.37 802336.92
+609020.02 802475
+609026.76 802512.56
+609034.47 802540.98
+609053.25 802562.17
+609076.61 802570.11
+609115.62 802561.44
+609144.99 802541.7
+609176.78 802519.55
+609236.5 802481.02
+609285.14 802447.79
+609351.6 802418.41
+609423.6 802424.77
+609466.7 802430.45
+609428.65 802549.41
+609616.24 802750.49
+609634.05 802784.2
+609658.62 802802.5
+609794.32 802754.83
+609823.8 802727.37
+609888.82 802691.25
+609927.52 802668.29
+609977.96 802639.71
+610027.7 802604.13
+610028.58 802565.8
+610014.55 802494.97
+610070.33 802426.25
+610121.37 802351.88
+610068.26 802265.97
+610038.49 802197.47
+610013.02 802110.45
+609990.83 802033.47
+609959.7 801971.07
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 609273.83 801908.22
+Region  1
+  174
+613342.23 805375.22
+613966.89 805614.13
+614298.72 806107.69
+614439.34 806252.52
+614500.73 806443.31
+614564.6 806434.19
+614562.94 806287.36
+614581.62 806256
+614608.18 806234.48
+614638.56 806221.18
+614656.26 806201.56
+614658.14 806180.68
+614653.05 806152.22
+614634.02 806119.97
+614633.32 806052.91
+614638.97 805999.14
+614662.99 805960.54
+614685.11 805934.59
+614718.9 805908.24
+614728.86 805836.9
+614736.33 805802.88
+614743.83 805782.1
+614765.34 805767.54
+614791.92 805756.78
+614903.31 805741.54
+614962.17 805740.25
+614998.25 805732.64
+615027.35 805718.08
+615041.88 805688.98
+615030.43 805635.84
+615018.8 805616.64
+615012.16 805590.09
+615001.25 805565.64
+615025.43 805566.04
+615050.32 805559.4
+615103.41 805544.47
+615176 805524.95
+615472.15 805446.97
+615477.13 805484.3
+615548.47 805537.38
+615707.75 805622.83
+615917.62 805735.65
+615945.89 805777.13
+615949.98 805846.81
+615958.66 805895.42
+615975.81 805951.08
+616003.71 805996.61
+616038.74 806066.63
+616093.49 806167
+616262.63 806023.7
+616355.59 805931.29
+616467.51 805815.48
+616540.25 805755.98
+616572.51 805735.09
+616618.08 805730
+616666.18 805722.39
+616706.68 805709.09
+616740.71 805692.38
+616759.71 805682.88
+616733.49 805574.54
+616707.4 805505.24
+616676.76 805435.97
+616534.94 805150.29
+616505.35 805029.13
+616497.05 804954.49
+616488.33 804837.72
+616481.61 804761.89
+616477.58 804732.12
+616469.32 804658.58
+616461.26 804628.24
+616450.5 804602.51
+616431.84 804562.03
+616394 804508.86
+616309.5 804426.64
+616285.84 804405.04
+616262.4 804382.97
+616237.02 804357.36
+616203.29 804325.68
+616172.65 804301.01
+616142.69 804277.88
+616118.91 804270.33
+616080.73 804258.21
+616036.05 804243.81
+615771.01 804169.15
+615686.52 804145.92
+615617.23 804128.32
+615339.24 804061.9
+615304.64 804054.61
+615392.27 804113.04
+615442.75 804114.31
+615431 804143.84
+615368.46 804215.91
+615300.19 804274.33
+615295.55 804330.27
+615302.19 804362.14
+615303.68 804401.84
+615309.66 804432.71
+615317.62 804494.45
+615306.17 804579.61
+615298.38 804617.6
+615297.71 804648.14
+615337.54 804672.7
+615351.48 804687.31
+615345.01 804704.07
+615367.92 804752.54
+615387.17 804798.01
+615328.25 804855.3
+615316.97 804881.19
+615326.26 804932.31
+615267.18 804990.4
+615239.29 805011.98
+615209.42 804837.04
+615187.18 804761.65
+615146.85 804691.08
+615100.21 804641.45
+615052.08 804606.27
+614999.64 804583.36
+614962.46 804573.07
+614915.82 804564.94
+614846.78 804565.61
+614796.99 804575.9
+614763.97 804591.71
+614712.52 804615.61
+614678.99 804627.56
+614637.83 804649.14
+614611.61 804661.09
+614615.1 804517.23
+614560.83 804456
+614489.29 804380.8
+614323.82 804207.4
+614233.04 804149.83
+614185.24 804127.92
+614155.37 804132.57
+614119.52 804137.55
+614075.54 804110.54
+614052.18 804069.33
+614025.42 804024.56
+613981.1 803955
+613999.53 803932.94
+614018.12 803925.3
+614048.32 803916.67
+614080.19 803904.72
+614118.36 803873.52
+613945.09 803856.92
+613834.23 803846.96
+613760.87 803838.26
+613679.88 803824.32
+613608.18 803807.06
+613543.62 803786.69
+613484.54 803763.12
+613418.32 803733.46
+613362.55 803706.24
+613273.73 803659.74
+613049.49 804022.91
+613024.21 804053.29
+612988.13 804069.36
+612960.63 804072.61
+612964.88 804103.62
+612785.14 804182.62
+612958.93 804728.28
+612987.38 804818.92
+613032.7 804979.95
+613042.28 804998.19
+613080.04 805048.94
+613120.12 805081.43
+613165.6 805112.29
+613218.29 805144.82
+613234.2 805154.47
+613266.36 805192.42
+613288.2 805254.27
+613306.86 805293.13
+613315.92 805319.24
+613316.72 805337.1
+613342.23 805375.22
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 614724.22 804955.63
+Region  1
+  73
+616122.82 799449.45
+616150.28 799318.76
+616166.05 799273.2
+616198.24 799120.65
+616214.44 799044.13
+616198.72 799016.66
+616145.36 798929.04
+616137.59 798915.3
+616077.27 798941.02
+616030.81 798945.55
+615977.66 798962.66
+615910.57 798980.35
+615868.66 798981.3
+615820.72 798954.32
+615784.52 798897.16
+615748.65 798819.39
+615535.54 798768.07
+615401.56 798771.24
+615366.98 798788.8
+615316.47 798907.13
+615280.9 798946.56
+615222.48 798966.88
+615109.45 798993.55
+615046.58 799008.86
+614975.46 799026
+614926.79 799037.62
+614871.92 799051.86
+614788.16 799076.99
+614759.68 799098.77
+614729.52 799142.75
+614723.03 799172.24
+614720.52 799280.3
+614707.04 799306.85
+615055.78 799796.55
+615416.18 799884.27
+615437.96 799901.02
+615456.37 799914.64
+615542.49 799983.45
+615591.39 800015.04
+615671.01 800066.1
+615746.75 800085.14
+615779.63 799990.37
+615788.29 799979.12
+615902.54 799938.01
+615906.52 799937.28
+615886.95 799872.34
+615866.81 799822.46
+615860.06 799803.4
+615867.9 799769.36
+615876.43 799739.86
+615881.51 799717
+615931.68 799699.53
+616008.19 799713.82
+616021.81 799759.26
+616041.54 799815.15
+616124.21 799787.6
+616161.9 799866.02
+616179.99 799914.28
+616222.54 800025.73
+616220.66 800061.76
+616245.34 800130.28
+616252.28 800091.63
+616265.24 800062.01
+616295.32 800023.84
+616322.4 800010.65
+616394.17 800023.03
+616434.73 800081.34
+616280.86 799567.83
+616260.52 799549.69
+616190.7 799521.65
+616112.66 799482.48
+616113.93 799472.95
+616122.82 799449.45
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 615562.85 799407.57
+Region  1
+  47
+611196.87 801147.4
+611116.5 801144.03
+611015.89 801133.41
+611003.84 801166.55
+610981.46 801182.05
+610941.65 801180.51
+610850.84 801174.05
+610714.63 801226.77
+610518.38 801303.38
+610367.52 801363.79
+610331.37 801400.38
+610363.22 801470.53
+610438.32 801644.18
+610445.64 801778.01
+610406.68 802005.86
+610409.07 802042.22
+610394.87 802094.3
+610387.98 802117.54
+610379.87 802186.27
+610401.43 802195.25
+610420.89 802182.58
+610454.42 802167.38
+610559.7 802116.25
+610681.43 802061.74
+610774.6 802016.33
+610815.92 801994.94
+610876.98 801950.79
+611003.32 801859.13
+611126.82 801796.93
+611190.71 801759.57
+611252.68 801709.56
+611293.74 801669.88
+611328.67 801633.68
+611369 801613.99
+611416.63 801610.81
+611449.43 801622.15
+611501.36 801641.1
+611574.49 801666.71
+611562.86 801639.93
+611501.85 801531.02
+611464.36 801418.43
+611421.18 801312.79
+611382.37 801255.86
+611361.28 801214.97
+611349.23 801193.89
+611335.02 801167.2
+611196.87 801147.4
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 610875.36 801577.18
+Region  1
+  81
+608038.87 807555.89
+607994.9 807657.22
+607922.47 807778.52
+607882.53 807841.82
+607824.54 807939.76
+607690.11 808160.72
+607659.25 808209.12
+607638.86 808249.91
+607640.75 808381.83
+607647.78 808502.7
+607652.03 808573.66
+607696.87 808621.46
+607752.95 808684.34
+607797.87 808734.65
+607905.92 808703.03
+608030.57 808645.35
+608131.76 808591.59
+608186.05 808548.9
+608221.89 808516.75
+608338.37 808558.38
+608445.1 808620.8
+608504.66 808641.35
+608568.96 808656.64
+608865.17 808381.98
+608939.48 808348.25
+609000.1 808319.79
+609043.05 808260.49
+609028.82 808243.1
+609009.32 808221.49
+609021.44 808198.83
+609021.44 808161.41
+609015.64 808096.58
+609016.17 808044.93
+609003.78 807996.73
+608989.03 807953.51
+608984.81 807920.83
+608987.45 807881.83
+608977.17 807855.77
+608953.98 807838.38
+608921.83 807835.74
+608833.81 807857.35
+608833.28 807838.38
+608835.92 807826.26
+608841.19 807813.61
+608850.15 807799.9
+608868.07 807785.67
+608888.1 807778.29
+608920.25 807769.33
+608932.37 807753
+608919.19 807720.85
+608852.52 807648.89
+609019.34 807516.34
+609064.14 807508.44
+609115.79 807501.59
+609169.02 807491.05
+609249.66 807471.54
+609276.01 807456.79
+609229.63 807433.6
+609162.7 807400.92
+609116.84 807376.68
+609069.04 807343.41
+609013.28 807310.86
+608951.84 807272.63
+608872.05 807211.06
+608719.03 807007.96
+608709.47 807010.33
+608689.68 807088.86
+608683.76 807112.53
+608675.57 807147.58
+608665.1 807191.27
+608592.05 807185.13
+608554.73 807180.58
+608518.77 807176.94
+608479.63 807187.41
+608365.39 807277.53
+608349.91 807289.81
+608247.51 807362.18
+608195.16 807364
+608139.18 807362.64
+608084.34 807453.92
+608038.87 807555.89
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 608398.99 807959.41
+Region  1
+  8
+608993.06 803798.31
+607875.29 803403.91
+607844.46 803395.24
+607744.77 803362.49
+607739.96 803615.34
+608916.5 804023.17
+608922.76 804007.76
+608993.06 803798.31
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 608346.71 803696.9
+Region  1
+  63
+606030.4 798778.19
+605728.08 798570.62
+605656.79 798513.9
+605598.36 798471.99
+605544.69 798435.15
+605471.82 798381.37
+605419.74 798343.58
+605372.9 798301.19
+605357.34 798284.04
+605334.48 798247.84
+605313.67 798198.46
+605291.92 798120.48
+605267.59 798256.08
+605124.46 798359.68
+605095.96 798401.62
+605085.98 798438.5
+605085.98 798465.4
+605092.92 798495.34
+605108.97 798516.13
+605133.48 798531.13
+605163.43 798531.1
+605186.03 798522.69
+605206.38 798506.37
+605225.04 798486.84
+605239.35 798476.86
+605264.95 798458.21
+605281.44 798458.64
+605290.99 798468.62
+605294.46 798482.5
+605218.1 798564.94
+605187.51 798598.16
+605164.08 798614.66
+605126.77 798616.39
+605041.94 798594.52
+605032.62 798627.28
+604975.56 798860.47
+604958.86 798922.29
+604941.94 798948.76
+604885.1 798999.52
+604824.36 799054.63
+604744.53 799130.12
+604722.4 799294.55
+604710.16 799380.02
+605009.27 799284.37
+605096.77 799260.14
+605169.91 799237.7
+605252.25 799222.67
+605325.39 799206.07
+605418.48 799199.11
+605540.98 799189.24
+605556.16 799192.25
+605589.68 799188.13
+605625.37 799167.17
+605643.99 799154.54
+605669.82 799122.08
+605707.8 799077.72
+605779.87 799008.19
+605827.5 798961.16
+605863.06 798920.52
+605890.04 798888.77
+605939.57 798843.34
+605994.5 798803.33
+606030.4 798778.19
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 605342.81 798844.12
+Region  1
+  42
+613318.17 795364.78
+612697.83 795750.05
+612641.71 795751.43
+612729.07 795852.56
+612747.63 795874.05
+612749.56 795876.29
+612749.62 795876.36
+612842.35 795983.71
+612851.8 795994.65
+613037.92 796206.01
+613047.65 796219.59
+613049.31 796226.01
+613065.97 796290.42
+613515.56 796168.35
+613473.34 796007.79
+613451.85 795972.01
+613496.7 795900.44
+613461.4 795888.99
+613430.39 795880.41
+613367.89 795868
+613334.01 795876.11
+613299.19 795909.51
+613276.78 795941.96
+613249.11 795989.19
+613224.78 796034.04
+613221.44 796051.69
+613226.21 796076.02
+613234.32 796104.65
+613242.91 796142.34
+613199.49 796153.79
+613136.04 796172.39
+613106.94 796101.79
+613082.13 796045.49
+613144.63 795941.48
+613314.41 795703.87
+613397.92 795575.27
+613414.43 795552.73
+613399.47 795536.25
+613370.29 795501.33
+613355.05 795495.3
+613338.18 795421.94
+613318.17 795364.78
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 613123.08 795849.26
+Region  1
+  112
+607761.4 804265.59
+607826.9 804272.81
+607909.73 804296.89
+607972.82 804316.64
+608011.34 804332.53
+608044.34 804361.65
+608065.05 804412.7
+608079.73 804479.93
+608090.81 804532.42
+608113.34 804624.07
+608124.35 804670.21
+608138.82 804740.45
+608158.65 804816.95
+608184.14 804862.48
+608203.49 804891.42
+608240.37 804929.21
+608280.43 804976.11
+608727.71 804535.57
+608916.5 804023.17
+607739.96 803615.34
+607744.77 803362.49
+607844.46 803395.24
+608068.17 802768.36
+607263.44 802611.88
+607210.8 802531.55
+607147.88 802206.48
+607095.4 802205.07
+607067.67 802267.55
+607040.71 802295.49
+607010.51 802325.41
+606983.88 802353.76
+606931.87 802407.22
+606945.59 802423.37
+606986.53 802470.56
+606912.12 802624.45
+606920.79 802653.83
+606921.75 802688.02
+606867.82 802800.71
+606867.33 802915.33
+606786.18 802919.89
+606752.95 802922.3
+606754.4 803002.72
+606755.09 803109.91
+606758.75 803230.67
+606727.48 803256.83
+606709.61 803274.06
+606681.38 803297.58
+606659.95 803315.35
+606646.08 803329.73
+606614.19 803398.73
+606605.03 803427.74
+606604.95 803473.26
+606610.78 803523.41
+606625.42 803581.43
+606635.35 803632.66
+606647.9 803682.85
+606656.59 803720.12
+606665.12 803759.31
+606683.36 803749.22
+606715.17 803741.07
+606741.56 803744.95
+606761.35 803756.2
+606782.3 803774.44
+606802.09 803800.05
+606823.82 803825.27
+606846.32 803849.33
+606863.47 803870.43
+606887.16 803895.73
+606919.82 803929.72
+606939.08 803940.79
+606959.31 803935.98
+606979.53 803904.19
+606975.2 803858.44
+607006.98 803819.43
+607044.07 803775.13
+607079.22 803739.49
+607110.29 803701.66
+607148.33 803651.57
+607180.6 803607.27
+607234.15 803478
+607253.08 803440.42
+607273.79 803411.05
+607303.16 803397.56
+607335.91 803394.67
+607372.51 803408.16
+607406.71 803435.61
+607419.23 803462.58
+607418.75 803499.18
+607400.71 803543.71
+607379.98 803573.07
+607342.59 803634.21
+607296.9 803716.85
+607261.75 803778.5
+607231.89 803833.4
+607199.14 803888.3
+607180.92 803934.81
+607157.57 803993.03
+607135.57 804043.8
+607130.76 804092.44
+607142.31 804134.82
+607168.32 804181.54
+607195.05 804223.7
+607220.58 804261.27
+607255.25 804310.87
+607292.82 804333.51
+607340.98 804339.29
+607390.58 804319.54
+607449.33 804295.94
+607493.39 804289.43
+607578.64 804282.69
+607684.34 804272.81
+607761.4 804265.59
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 607654.2 803633.54
+Region  1
+  77
+614835.51 802581.86
+614850.85 802504.56
+614857.22 802443.18
+614858.95 802364.44
+614856.35 802317.82
+614846.87 802270.79
+614833.77 802208.96
+614820.77 802149.96
+614806.27 802102.11
+614801.93 802077.54
+614792.08 802056.69
+614751.55 802004.58
+614723.69 801991.04
+614703.66 801981.23
+614638.06 801972.15
+614585.66 801967.19
+614520.81 801957.35
+614485.49 801957.35
+614439.17 801958.51
+614412.07 801949.82
+614380.18 801946.52
+614333.45 801939.37
+614277.92 801931.13
+614235.58 801922.33
+614196.55 801904.19
+614173.46 801884.39
+614136.62 801940.47
+614046.41 802080.22
+614010.19 802131.97
+613958.31 802204.4
+613913.84 802259.65
+613880.82 802310.19
+613850.66 802358.6
+613813.45 802434.51
+613660.16 802441.58
+613644.34 802465.9
+613688.12 802490.15
+613692.5 802517.09
+613593.15 802591.85
+613510.48 802633.76
+613503.07 802707.18
+613455.41 802762.14
+613442.1 802776.61
+613428.78 802791.67
+613432.83 802806.72
+613442.67 802872.15
+613644.38 802916.45
+613696.34 802922.5
+613776.82 802905.82
+613844.13 802891.92
+613950.35 802869.57
+614003.74 802890.67
+614045.69 802908.59
+614132.22 802933.73
+614160.95 802958.12
+614396.03 802981.28
+614399.5 802950.01
+614455.95 802943.92
+614484.91 802941.02
+614512.12 802942.18
+614548.6 802950.29
+614591.45 802974.03
+614609.68 802985.91
+614600.42 803044.39
+614594.52 803071.15
+614594.19 803079.78
+614603.15 803126.58
+614617.76 803176.37
+614635.85 803192.8
+614646.74 803192.04
+614630.54 803223.34
+614658.42 803235.29
+614706.55 803257.2
+614733.44 803266.83
+614806.84 802798
+614801.63 802743.12
+614835.51 802581.86
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 614285.24 802525.19
+Region  1
+  97
+612014.43 802994.12
+612531.55 803254.97
+612527.92 803285.74
+612563.24 803365.88
+612762.49 803491.79
+612792.15 803519.17
+612811.17 803554.03
+612814.79 803591.62
+612810.72 803675.39
+612979.62 803683.99
+612987.32 803671.31
+613005.99 803661.05
+613050.91 803646.47
+613068.61 803627.49
+613071.77 803596.8
+613069.5 803583.22
+613063.16 803566.91
+613060.9 803560.58
+613055.01 803551.62
+612919.17 803476.8
+612969.89 803452.68
+612961.79 803397.67
+613059.06 802896.19
+613134.91 802929.19
+613200.92 803049.59
+613288.08 802987.38
+613337.29 802950.32
+613366.82 802928.9
+613389.98 802913.84
+613420.09 802890.1
+613442.67 802872.15
+613432.83 802806.72
+613428.78 802791.67
+613442.1 802776.61
+613455.41 802762.14
+613503.07 802707.18
+613510.48 802633.76
+613593.15 802591.85
+613692.5 802517.09
+613688.12 802490.15
+613644.34 802465.9
+613660.16 802441.58
+613813.45 802434.51
+613850.66 802358.6
+613880.82 802310.19
+613913.84 802259.65
+613872.74 802231.35
+613847.47 802214.85
+613816.81 802195.98
+613764.59 802161.28
+613741.18 802144.54
+613709.17 802148.92
+613687.28 802157
+613655.61 802078.17
+613565.64 801932.58
+613465.93 802026.94
+613441.17 802051.71
+613396.72 802070.44
+613351.95 802079.02
+613317.34 802080.92
+613232.89 802088.22
+613183.36 802093.3
+613168.75 802095.77
+613077.63 802133.86
+612986.2 802204.99
+612980.8 802190.69
+612969.68 802174.5
+612964.29 802158.62
+612955.4 802140.21
+612948.09 802124.67
+612943.01 802109.11
+612935.07 802088.16
+612928.41 802072.6
+612862 801913.72
+612836.39 801923.16
+612760.57 801914.87
+612691.51 801887.86
+612524.1 801697.89
+612477.74 801648.99
+612241.29 801763.85
+612184.23 801789.66
+612204.83 801861.41
+612248.3 802014.91
+612317.8 802243.81
+612333.65 802358.87
+612327.31 802440.83
+612311.24 802502.64
+612281.35 802576
+612250.79 802691.71
+612215.01 802715.26
+612194.64 802753.75
+612157.5 802794.5
+612137.13 802816.69
+612052.45 802903.18
+612042.04 802919.48
+612020.01 802977.14
+612014.43 802994.12
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 612856.63 802582.78
+Region  1
+  112
+606170.89 808991.76
+606000.27 809001.01
+605985.72 808982.58
+605985.72 808966.32
+605907.83 808987.13
+605898.32 808972.59
+605885.65 808952.35
+605859.02 808914.41
+605851.41 808899.86
+605855.19 808878.35
+605865.92 808813.33
+605870.87 808785.06
+605807.26 808827.46
+605785.36 808840.19
+605759.21 808837.36
+605732.35 808832.41
+605492.07 808780.78
+605454.46 808832.98
+605424.57 808877.36
+605368.73 808920.47
+605333.4 808950.86
+605282.43 808988.68
+605217.92 809043.75
+605145.18 809100.09
+605130.65 809120.97
+605135.09 809134.25
+605145.87 809150.06
+605159.82 809175.36
+605169.68 809194.25
+605096.7 809242.63
+605006.81 809298.14
+605157.61 809399.87
+605097.34 809461.38
+605099.44 809502.79
+605168.09 809436.23
+605169.34 809580.86
+605195.79 809517.55
+605204.81 809479.42
+605230.23 809454.82
+605252.15 809446.01
+605389.08 809461.97
+605422.29 809466.07
+605443.61 809468.12
+605455.09 809472.22
+605435.82 809497.64
+605403.84 809531.67
+605431.72 809537
+605452.63 809539.05
+605474.77 809544.38
+605512.07 809575.53
+605544.79 809612.74
+605593.58 809665.02
+605603.29 809657.63
+605660.05 809726.83
+605703.5 809752.05
+605704.61 809779.41
+605727.51 809801.32
+605748.92 809829.7
+605770.33 809893.93
+605781.5 809926.58
+605817.13 810005.93
+605849 810005.43
+605872.6 810084.71
+605885.78 810105.33
+605937.34 810100.75
+606088.7 810097.9
+606174.24 810097.03
+606202.88 810092.44
+606235.55 810063.29
+606255.59 810021.4
+606259.89 809986.16
+606285.1 809983.3
+606862.51 809952.24
+607102.65 809940.33
+606862.51 809952.24
+606853.11 809946.9
+606799.42 809935.88
+606742.37 809924.13
+606672.95 809612.03
+606657.76 809606.59
+606622.24 809575.65
+606614.22 809569.35
+606617.08 809510.33
+606619.95 809482.26
+606597.03 809463.35
+606591.3 809457.48
+606590.73 809445.02
+606608.49 809446.74
+606631.41 809451.32
+606767.77 809476.53
+606767.77 809459.92
+606736.25 809390.02
+606678.67 809266.55
+606667.5 809242.77
+606641.14 809188.35
+606631.46 809169.19
+606626.01 809149.57
+606620.9 809090.32
+606617.94 809073.74
+606615.86 809054.81
+606612.02 809025.79
+606592.81 809038.41
+606515.42 808961.79
+606472.31 808920.79
+606423.55 808872.03
+606415.07 808845.88
+606400.93 808890.41
+606362.41 809015.79
+606337.68 809006.61
+606281.14 808983.28
+606236.61 808986.82
+606170.89 808991.76
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 605987.79 809421.54
+Region  1
+  31
+611033.95 794075.11
+611229.67 794817.46
+611321.14 794825.77
+611447.06 794837.22
+611447.21 794837.24
+611447.42 794837.26
+611683.12 794858.69
+611692.15 794859.51
+611529.6 794224.95
+611517.67 794169.95
+611440.73 793940.9
+611383.48 793852.16
+611358.9 793818.52
+611337.91 793785.13
+611320.74 793763.18
+611255.38 793778.93
+611250.6 793812.38
+611222.12 793813.64
+611121.29 793830.46
+611089.37 793808.93
+611064.37 793823.54
+611027.41 793805.66
+610968.07 793766.72
+610965.4 793790.42
+610957.35 793810.1
+610951.64 793822.17
+610930.05 793858.15
+610901.33 793884.54
+610972.59 793985.92
+610999.9 794023.18
+611033.95 794075.11
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 611318.38 794316.76
+Region  1
+  63
+603545.24 799359.77
+603503.64 799311.51
+603462.84 799269.74
+603432.67 799252.59
+603411.72 799248.46
+603365.35 799257.35
+603298.4 799276.81
+603246.98 799272.01
+603185.72 799274.14
+603131.91 799207.55
+603106.7 799175.71
+603080.59 799147.47
+603068.87 799135.21
+603063.81 799129.62
+603054.22 799121.36
+602957.1 799168.36
+602877.16 799203.26
+602811.09 799238.43
+602806.96 799246.06
+602803.62 799253.34
+602781.69 799284.49
+602728.23 799328
+602593.11 799437.33
+602509.6 799501.68
+602444.71 799546.65
+602372.08 799614.12
+602383.14 799649.15
+602372.08 799684.91
+602356.97 799738
+602554.76 799801.05
+602528.31 799887.44
+602727.67 799949.59
+602672.02 800121.84
+603072.2 800250.71
+603048.68 800330.17
+603050.77 800346.37
+603255.17 800310.3
+603307.18 800298.01
+603404.46 800284.4
+603494.88 800287.01
+603540.88 800287.01
+603595.76 800287.01
+603639.41 800291.98
+603668.94 800264.01
+603724.86 800205.99
+603752.57 800153.72
+603776.61 800087.34
+603798.82 800007.63
+603806.14 799971.03
+603819.21 799915.62
+603826.27 799874.15
+603833.73 799826.09
+603855.8 799723.35
+603876.44 799664.93
+603792.92 799665.88
+603720.52 799628.73
+603704.65 799603.64
+603685.28 799538.19
+603704.17 799519
+603707.35 799475.18
+603646.38 799433.59
+603598.75 799400.56
+603545.24 799359.77
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 603163.15 799757.21
+Region  1
+  38
+609861.18 805077.29
+609733.96 805090
+609607.39 805106.52
+609523.1 805121.79
+609454.81 805134.54
+609369.67 805155.02
+609374.22 805192.86
+609341.44 805195.14
+609315.05 805205.16
+609255.86 805252.51
+609203.05 805283.93
+609179.83 805294.4
+609186.43 805306.89
+609192.35 805323.74
+609207.37 805350.6
+609222.85 805382.01
+609214.7 805422.42
+609209.63 805449.75
+609210.34 805476.11
+609413.62 805427.59
+609514.69 805440.75
+609587.99 805477.17
+609624.86 805507.22
+609699.75 805604.81
+609885.73 805906.92
+609893.46 805919.58
+610094.02 805720.96
+610092.2 805700.02
+610102.22 805628.99
+610143.71 805366.36
+610166.82 805371.49
+610151.84 805297.47
+610140 805202.88
+610110.86 805202.88
+610054.41 805194.23
+609973.82 805152.79
+609900.44 805089.92
+609861.18 805077.29
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 609761.16 805403.61
+Region  1
+  46
+603636.66 802748.96
+603969.46 802283.23
+603449.54 801903.15
+603445.36 801894.78
+603095.38 801786.01
+603085.69 801782.68
+603130.12 801851.39
+603024.52 801989.4
+602972.24 802050.56
+602951.6 802075.92
+602905.07 802138.13
+602878.41 802171.58
+602846 802212.88
+602826.66 802238.5
+602803.13 802275.61
+602786.54 802305.43
+602727.24 802464.89
+602769.72 802518.64
+602813.68 802658.89
+602811.72 802715.93
+602818.6 802723.79
+603126.4 802871.3
+603123.45 802886.05
+603124.43 802900.8
+603123.45 802923.42
+603129.35 802964.72
+603175.57 803015.86
+603213.92 803006.02
+603262.1 802995.2
+603294.55 802992.25
+603361.42 802994.22
+603429.28 802994.22
+603486.31 802995.2
+603528.6 803003.07
+603564 803015.86
+603604.32 803040.44
+603663.25 803094.74
+603694.96 803063.05
+603726.35 803032.89
+603746.66 803010.73
+603773.12 802986.73
+603697.61 802862.69
+603580.36 802844.68
+603573.71 802824.24
+603603.2 802791.82
+603636.66 802748.96
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 603322.18 802437.6
+Region  1
+  92
+615881.15 797085
+615799.85 797079.48
+615755.44 797092.3
+615691.26 797132.34
+615648.19 797143.71
+615592.63 797129.74
+615563.73 797117.35
+615536.75 797105.92
+615513.25 797095.45
+615507.74 797003.12
+615505.63 796988.77
+615504.05 796972.26
+615501.19 796953.21
+615499.6 796931.62
+615489.42 796780.46
+615357.04 796754.76
+615321.8 796799.53
+615294.11 796873.22
+615262.04 796943.74
+615238.22 796972.32
+615230.92 796976.78
+615144.71 797072.87
+615054.06 797163.56
+614935.14 797287.9
+614954.98 797310.96
+614948.95 797342.71
+614883.55 797429.39
+614866.09 797475.11
+614892.17 797531.51
+614972.59 797630.01
+615662.84 797779.82
+615694.38 797636.58
+615888.69 797679.13
+615855.35 797827.74
+616365.89 797936.74
+616372.55 797938.33
+616350.96 797889.71
+616359.85 797853.41
+616372.55 797788.42
+616395.07 797672.45
+616409.07 797619.84
+616505.91 797545.86
+616527.82 797587.14
+616555.12 797636.95
+617048.2 797869.77
+617056.26 797851.91
+617063.71 797832.81
+617000.57 797800.87
+617012.95 797772.3
+616994.54 797754.83
+616993.59 797733.88
+616988.23 797712.01
+616969.46 797531.94
+616949.75 797381.46
+616896.41 797357.76
+616904.88 797318.16
+616916.52 797278.58
+616978.53 797282.83
+617032.3 797275.84
+617088.17 797232.5
+617096.18 797163.93
+617166.23 796846.3
+617089.39 796845.21
+617045.15 796843.09
+616967.05 796857.12
+616890.64 796871.94
+616811.68 796886.33
+616785.86 796895.01
+616644.03 797042.6
+616605.71 797083.66
+616528.23 797162.83
+616411.82 797284.31
+616377.74 797318.81
+616277.83 797363.75
+616236.97 797367.77
+616189.98 797358.88
+616101.93 797310.63
+616135.78 797234.81
+616162.27 797181.08
+616199.49 797141.43
+616207.11 797108.62
+616198.43 797043.7
+616198.43 797012.37
+616210.28 796994.38
+616215.57 796979.14
+616174.93 796957.77
+616119.48 796963.9
+616109.95 797026.13
+616080.32 797069.37
+616052.62 797087.34
+616011.01 797097.54
+615881.15 797085
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 616015.31 797378.59
+Region  1
+  45
+613427.79 795096.34
+613480.74 795078.74
+613545.73 795060.19
+613567.41 795058.86
+613623.61 795026.12
+613698.39 795035.41
+613792.02 795042.28
+613894.24 795053.34
+613965.93 795060.86
+614003.17 794684.29
+613566.04 794432.95
+613578.19 794352.36
+613682.62 794255.45
+613494.11 794272.7
+613403.4 794245.27
+613339.92 794188.84
+613298.32 794121.58
+613278.2 794048.34
+613262.23 793954.84
+613217.39 793877.55
+613147.26 793857.04
+613061.38 793835.57
+613034.19 793881.37
+612410.34 794953.98
+612423.28 794962.94
+612433.5 794970.02
+612437.9 794987.39
+612476.85 795141.09
+612476.94 795141.43
+612476.96 795141.53
+612476.97 795141.57
+612477.01 795141.71
+612627.29 795734.74
+612638.47 795747.68
+612641.71 795751.43
+612697.83 795750.05
+613318.17 795364.78
+613288.33 795261.91
+613343.89 795280.01
+613330.24 795226.03
+613321.03 795191.11
+613389.93 795130.47
+613396.6 795130.18
+613391.52 795104.14
+613427.79 795096.34
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 613117.15 794817.38
+Region  1
+  125
+608883.84 810564.75
+608868.03 810584.37
+608846.53 810604.62
+608811.12 810635.63
+608775.7 810669.18
+608714.22 810710.56
+608704.22 810717.29
+608687.15 810738.17
+608676.71 810757.36
+608694.71 810807.89
+608715.47 810854.96
+608727.83 810885.81
+608737.52 810926.77
+608739.01 810958.79
+608736.77 811001.25
+608718.15 811049.65
+608693.19 811105.14
+608672.34 811152.06
+608643.29 811193.77
+608615.74 811224.3
+608595.63 811251.12
+608586.69 811274.95
+608574.03 811298.03
+608561.01 811305.86
+608554.31 811352.78
+608537.88 811499.96
+608540.73 811534.71
+608555.54 811567.75
+608558.52 811631.04
+608501.66 811707.04
+608351.28 811865.17
+608358.79 811941.38
+608394.52 812030.63
+608405.34 812053.99
+608453.77 812095.58
+608469.39 812126.06
+608492.18 812124.92
+608582.2 812160.24
+608663.92 812227.75
+608685.6 812259
+608747.13 812380.36
+608779.04 812412.84
+608791.57 812450.44
+608856.8 812507.76
+608894.41 812514.59
+608930.31 812497.5
+608972.47 812519.15
+609016.34 812508.9
+609042.55 812522.57
+609067.32 812748.48
+609141.67 812812.01
+609280.12 812821.12
+609359.89 812793.21
+609429.97 812806.31
+609498.91 812838.22
+609608.3 812859.3
+609640.77 812863.85
+609672.11 812838.79
+609700.03 812837.08
+609819.39 812905.07
+609830.23 812877.26
+609838.57 812853.1
+609851.31 812831.68
+609866.42 812801.74
+609893.02 812768.33
+609917.15 812747.29
+609947.47 812726.87
+609985.83 812707.69
+610024.2 812686.65
+610060.08 812668.71
+610089.78 812651.39
+610102.16 812632.2
+610099.07 812605.6
+610102.16 812575.9
+610150.73 812548.43
+610168.22 812532.2
+610179.74 812529.46
+610000.22 809630.78
+609998.85 809612.29
+609996.72 809357.23
+609981.56 809389.5
+609968.95 809434.42
+609961.41 809491.99
+609948.78 809524.26
+609925.91 809532.26
+609865.95 809614.76
+609818.01 809649.23
+609759.05 809700.21
+609704.97 809749.16
+609618.01 809825.05
+609525.26 809867.21
+609495.75 809887.76
+609483.1 809908.32
+609467.82 809942.04
+609440.95 809996.32
+609030.7 809642.52
+608966.35 809770.5
+608948.96 809808.98
+608925.77 809844.29
+608901.53 809871.17
+608880.65 809897.35
+608858.84 809920.56
+608835.65 809939.53
+608861.11 809977.07
+608841.44 809991.18
+608813.51 810010.69
+608808.24 810042.84
+608811.67 810058.34
+608764.76 810088.91
+608781.63 810128.44
+608806.13 810175.6
+608824.78 810210.13
+608846.2 810230.86
+608862.78 810243.29
+608889.03 810257.8
+608842.74 810330.33
+608827.96 810380.69
+608826.07 810394.61
+608830.03 810406.75
+608841.8 810418.52
+608854.95 810442.06
+608868.1 810481.51
+608879.87 810511.28
+608892.68 810540.07
+608883.84 810564.75
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 609396.71 811328.99
+Region  1
+  72
+603297.42 801493.83
+603212.21 801560.22
+603157.84 801611.45
+603081.47 801771.31
+603085.69 801782.68
+603095.38 801786.01
+603445.36 801894.78
+603449.54 801903.15
+603969.46 802283.23
+604014.39 802221.69
+604034.7 802227.22
+604070.79 802238.34
+604169.49 802267.23
+604228.58 802286.31
+604357.88 802233.63
+604401.83 802173.95
+604444.54 802109.53
+604492.92 802036.11
+604516.67 802005.15
+604468.01 801985.29
+604441.52 801974.84
+604400.23 801959.8
+604344.49 801926.3
+604315.97 801903.44
+604288.58 801871.11
+604255.96 801815.71
+604232.57 801777.55
+604210.42 801742.47
+604187.03 801703.08
+604150.78 801637.8
+604132.87 801558.43
+604121.71 801165.66
+604057.47 801174.67
+603651.26 801262.67
+603605.1 801256.52
+603557.76 801223.56
+603540.48 801153.12
+603528.78 801103.88
+603491.55 800930.01
+603604.18 800936.16
+603611.57 800922.01
+603615.88 800906.62
+603626.95 800876.46
+603637.72 800842.32
+603648.8 800800.47
+603662.34 800772.16
+603670.96 800722.92
+603671.58 800671.22
+603670.65 800641.95
+603658.56 800480.45
+603642.55 800412.19
+603642.03 800346.34
+603641.5 800304.53
+603639.41 800291.98
+603595.76 800287.01
+603540.88 800287.01
+603494.88 800287.01
+603404.46 800284.4
+603307.18 800298.01
+603255.17 800310.3
+603050.77 800346.37
+603060.7 800380.35
+603199.96 800766.93
+603222.7 800835.15
+603234.2 801017.07
+603242.29 801113.52
+603254.83 801154.29
+603283.56 801194.55
+603360.41 801305.89
+603346.29 801349.81
+603318.59 801432.92
+603297.42 801493.83
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 603680.45 801401.37
+Region  1
+  65
+610984.16 793404.51
+610985.7 793442.21
+610958.01 793497.98
+610949.54 793535.29
+610957.33 793563.41
+610949.37 793626.51
+610937.88 793653.88
+610961.18 793708.26
+610939.67 793736.41
+610968.07 793766.72
+611027.41 793805.66
+611064.37 793823.54
+611089.37 793808.93
+611121.29 793830.46
+611222.12 793813.64
+611250.6 793812.38
+611255.38 793778.93
+611320.74 793763.18
+611337.91 793785.13
+611358.9 793818.52
+611383.48 793852.16
+611440.73 793940.9
+611517.67 794169.95
+611896.98 794073.48
+611860.96 793947.03
+612101.64 793309
+612061 793274.71
+612047.35 793237.25
+612043.05 793200.9
+612035.91 793107.08
+612028.61 793030.24
+612008.13 792990.72
+611912.24 792924.04
+611875.73 792921.82
+611849.72 792871.08
+611841.46 792851.39
+611792.25 792738.67
+611716.69 792779.63
+611752.29 792880.26
+611685.3 792894.88
+611606.07 792910.28
+611628.29 792821.06
+611526.37 792754.4
+611406.86 792661.53
+611376.23 792650.27
+611314 792669
+611223.83 792677.57
+611170.43 792718.61
+611110.31 792759.12
+611048.39 792805.72
+611026.48 792803.81
+610989.97 792806.98
+610945.2 792827.62
+610866.61 792874.14
+610847.88 792905.89
+610837.4 792910.33
+610723.74 792824.61
+610689.13 792836.04
+610778.82 792942.88
+610920.68 793142.15
+610913.76 793179.07
+610914.53 793239.46
+610915.5 793289.27
+610953.57 793352.74
+610984.16 793404.51
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 611470.62 793350.38
+Region  1
+  52
+612366.25 807653.17
+612197.18 807901.4
+612083.89 807853.2
+612055.07 807877.05
+612161.9 808010.21
+612254.7 808154.88
+612271.82 808185.24
+612429.45 808268.11
+612463.31 808297.9
+612497.62 808303.77
+612520.19 808337.18
+612549.53 808335.82
+612564.88 808308.28
+612563.53 808277.14
+612573.46 808245.08
+612594.68 808222.06
+612605.51 808191.81
+612590.39 808174.47
+612595.35 808154.61
+612608.9 808148.74
+612648.17 808155.06
+612640.76 808081.95
+612641.98 808038.94
+612647.65 808016.79
+612657.76 807998.44
+612686.22 807973.12
+612716.58 807942.75
+612743.14 807921.86
+612760.21 807897.18
+612787.46 807857.81
+612773.46 807829.83
+612779.33 807769.79
+612773.46 807722.11
+612767.96 807680.54
+612778.35 807656.7
+612794.14 807637.79
+612790.3 807596.68
+612756.94 807567.76
+612719.17 807543.41
+612699.8 807522.54
+612695.82 807505.15
+612684.39 807509.62
+612672.47 807514.59
+612630.51 807557.05
+612585.29 807574.93
+612514.24 807587.85
+612480.45 807590.34
+612447.16 807591.83
+612413.87 807599.28
+612391.51 807606.73
+612379.58 807626.11
+612366.25 807653.17
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 612481.05 807905.21
+Region  1
+  38
+608585.45 800634.84
+608485.48 800524.34
+608395.09 800424.77
+608382.87 800413.87
+608412.28 800388.75
+608447.97 800355.37
+608464.83 800338.85
+608457.22 800329.26
+608362.71 800227.15
+608293.48 800266.34
+608248.09 800300.38
+608215.47 800350.98
+608185.21 800434.2
+608155.9 800496.61
+608109.56 800555.23
+608045.26 800632.77
+607963.46 800724.06
+607996.63 800748.32
+608059.36 800804.59
+608126.53 800862.13
+608211.21 800931.15
+608271.73 800985.05
+608370.43 801040.3
+608370.05 801004.2
+608363.2 800990.14
+608365.86 800977.6
+608394.37 800943.39
+608384.11 800931.99
+608420.27 800885.39
+608448.09 800861.96
+608462.88 800838.47
+608480.32 800817.66
+608495.46 800777.8
+608508.73 800761.97
+608509.33 800735.4
+608498.72 800715.39
+608511.92 800701.43
+608585.45 800634.84
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 608292.24 800644.99
+Region  1
+  191
+618080.5 795941.46
+618037.05 795915.08
+617968.57 795841.89
+617921.23 795831.02
+617902.99 795810.07
+617897.37 795760.58
+617722.51 795605.86
+617678.82 795560.28
+617656.02 795523.57
+617652.34 795499.25
+617604.74 795488.75
+617585.1 795451.4
+617566.1 795420.38
+617519.88 795371
+617459.73 795331.75
+617428.85 795311.82
+617388.19 795284.27
+617357.46 795223.74
+617348.34 795172.36
+617304.49 795118.43
+617281.99 795099.42
+617186.15 795081.96
+617170.63 795083.51
+617144.44 795138.39
+617061.54 795146.24
+617012.71 795118.83
+616966.57 795084.83
+616915.92 795031.65
+616895.15 794998.54
+616763.8 794950.02
+616749.66 794918.98
+616775.17 794882.73
+616779.77 794871.67
+616765.33 794852.62
+616744.94 794829.71
+616725.85 794814.36
+616728.17 794756.44
+616697.75 794769.96
+616663.91 794794.89
+616621.53 794848.05
+616593.07 794911.97
+616590.56 794969.57
+616615.27 795040.47
+616676.06 795118.96
+616753.95 795204.43
+616812.84 795263.3
+616867.29 795325.97
+616921.12 795400.03
+616973.04 795453.21
+617008.52 795527.27
+616961.31 795531.17
+616927.23 795530.33
+616872.62 795531.39
+616779.49 795531.61
+616765.1 795531.25
+616698.64 795612.31
+616657.15 795663.77
+616612.5 795720.29
+616596.85 795836.23
+616585.42 795931.11
+616636.02 796003.67
+616646.03 796017.76
+616593.51 796066.49
+616552.4 796134.85
+616513.17 796181.05
+616044.15 796393.6
+616101.94 796550.5
+616072.73 796637.49
+616063.84 796660.35
+616057.49 796678.73
+616051.14 796702.86
+616043.74 796731.02
+616034.63 796784.14
+616075.27 796869.87
+616101.41 796910.16
+616119.48 796963.9
+616174.93 796957.77
+616215.57 796979.14
+616210.28 796994.38
+616198.43 797012.37
+616198.43 797043.7
+616207.11 797108.62
+616199.49 797141.43
+616162.27 797181.08
+616135.78 797234.81
+616101.93 797310.63
+616189.98 797358.88
+616236.97 797367.77
+616277.83 797363.75
+616377.74 797318.81
+616411.82 797284.31
+616528.23 797162.83
+616605.71 797083.66
+616644.03 797042.6
+616785.86 796895.01
+616811.68 796886.33
+616890.64 796871.94
+616967.05 796857.12
+617045.15 796843.09
+617089.39 796845.21
+617166.23 796846.3
+617096.18 797163.93
+617088.17 797232.5
+617032.3 797275.84
+616978.53 797282.83
+616916.52 797278.58
+616904.88 797318.16
+616896.41 797357.76
+616949.75 797381.46
+616969.46 797531.94
+616988.23 797712.01
+616993.59 797733.88
+616994.54 797754.83
+617012.95 797772.3
+617000.57 797800.87
+617063.71 797832.81
+617056.26 797851.91
+617048.2 797869.77
+617161.99 797964.98
+617204.45 798001.02
+617282.29 797990.23
+617335.43 797965.53
+617380.99 797951.58
+617440.5 797959.15
+617482.93 797972.41
+617521.7 797982.33
+617587.27 797993.42
+617644.88 797994.62
+617628.01 797951.72
+617600.77 797912.66
+617626.42 797816.84
+617645.04 797785.04
+617641.16 797776.11
+617606.64 797757.88
+617601.6 797745.86
+617610.52 797712.89
+617610.72 797685.17
+617619.64 797674.31
+617617.31 797657.24
+617616.54 797644.44
+617639.81 797639.4
+617653 797643.28
+617671.61 797655.3
+617679.37 797655.3
+617693.33 797642.12
+617734.84 797614.58
+617739.49 797582.77
+617755.19 797574.43
+617767.61 797570.55
+617770.71 797518.18
+617782.35 797491.41
+617815.9 797454.36
+617848.1 797413.23
+617856.24 797389.18
+617846.55 797369.39
+617858.96 797352.32
+617918.9 797320.29
+617926.66 797306.32
+617946.06 797294.3
+617946.45 797284.98
+617959.64 797290.03
+617990.48 797266.93
+618016.48 797228.91
+618047.91 797186.61
+618099.51 797210.67
+618233.56 797098.34
+618232.79 797052.55
+618271.98 796981.55
+618265.96 796926.6
+618277.21 796889.35
+618277.21 796841.24
+618274.3 796788.3
+618290.21 796727.78
+618301.66 796646.9
+618374.02 796562.09
+618395.75 796497.68
+618376.16 796418.71
+618361.8 796392.72
+618327.07 796374.31
+618321.64 796334.34
+618319.31 796294.38
+618324.55 796206.48
+618323.38 796163.8
+618274.11 796156.82
+618248.89 796144.01
+618211.25 796102.11
+618181.18 796061.15
+618184.68 796008
+618144.71 795962.99
+618118.53 795949.61
+618080.5 795941.46
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 617256.44 796504.65
+Region  1
+  49
+603006.78 789927.79
+603099.22 789659.61
+603229.11 789305.8
+603293.97 789142.02
+603302.86 789119.79
+603009.94 788916.44
+602971.52 788892.62
+602915.01 788863.73
+602891.19 788854.52
+602850.55 788883.1
+602814.67 788913.93
+602704.81 789000.93
+602636.82 789058.12
+602594.91 789089.87
+602571.42 789102.89
+602465.37 789079.39
+602458.71 789088.6
+602443.15 789107.02
+602408.86 789124.48
+602337.1 789163.22
+602348.21 789182.58
+602309.34 789309.75
+602269.34 789372.62
+602226.3 789436.69
+602194.56 789483.01
+602176.63 789505.63
+602260.62 789554.65
+602150.52 790059.94
+602189.11 790068.06
+602256.85 790084.26
+602359.93 790102.67
+602367.3 790118.86
+602326.06 790157.15
+602270.84 790386.88
+602250.57 790481.5
+602388.26 790512.43
+602399.31 790462.36
+602419.92 790373.26
+602432.8 790305.89
+602439.43 790275.7
+602551.35 790308.1
+602634.55 790244.78
+602722.91 790192.5
+602805.38 790144.64
+602846.26 790172.99
+602855.1 790180.35
+602919.89 790188.45
+602935.35 790140.59
+603006.78 789927.79
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 602688 789606.2
+Region  1
+  160
+598876.92 788917.84
+598880.32 788962.71
+598868.21 789001.68
+598864.3 789063.44
+598834.06 789118.92
+598809.97 789164.21
+598797.09 789192.28
+598826.3 789218.32
+598889.49 789262.45
+598909.49 789290.39
+598924.73 789322.46
+598932.98 789365.96
+598927.07 789424.22
+598918.24 789490.92
+598908.72 789563.32
+598899.97 789624.43
+598931.53 789680.6
+598949.1 789726.68
+599045.76 789659.14
+599048.92 789611.81
+599055.27 789562.01
+599056.85 789548.99
+599081.31 789551.51
+599090.84 789646.77
+599134.97 789737.62
+599149.58 789759.21
+599186.73 789834.46
+599241.97 789947.46
+599327.26 790100.43
+599407.92 790165.84
+599507.63 790202.04
+599613.06 790200.77
+599779.45 790144.25
+599822.32 790137.6
+599892.18 790139.51
+599944.89 790155.39
+599995.06 790178.88
+600091.28 790263.68
+600166.86 790308.14
+600236.08 790322.11
+600302.13 790324.02
+600352.94 790315.76
+600418.67 790289.44
+600479.64 790246.25
+600621.84 790150.3
+600628.86 790142.07
+600617.45 790116.06
+600619.99 790081.76
+600611.74 790039.21
+600562.2 789934.42
+600655.85 789888.38
+600725.74 789861.04
+600765.11 789862.31
+600814.02 789883.27
+600856.79 789915.64
+600912.45 789963.29
+600944.84 789980.44
+601070.14 790019.48
+601097.91 790022.08
+601136.32 790015.73
+601113.78 789989.38
+601104.89 789975.41
+601102.03 789947.15
+601104.57 789923.33
+601110.92 789903.97
+601055.53 789883.16
+601052.04 789862.84
+601048.54 789845.7
+601046 789831.73
+601041.57 789811.86
+601043.47 789795.4
+601044.46 789774.91
+601047.63 789769.51
+601043.19 789751.09
+601044.08 789742.87
+601041.28 789728.23
+601049.22 789707.6
+601073.35 789681.24
+601141.29 789626.63
+601167.01 789607.57
+601171.13 789592.01
+601161.29 789559.94
+601160.97 789539.3
+601183.52 789472.31
+601195.59 789424.68
+601198.13 789402.45
+601198.13 789385.94
+601188.28 789371.34
+601182.55 789360.58
+601154.95 789335.46
+601125.1 789327.2
+601150.58 789222.13
+601188.34 789105.91
+601126.74 789081.44
+601109.65 789068.14
+601092.84 789066
+601077.81 789074.25
+601052.2 789096.07
+601018.34 789094.37
+600989.76 789092.68
+600968.17 789088.87
+600917.58 789132.26
+600879.26 789178.19
+600849.21 789228.39
+600782.53 789200.24
+600749.93 789184.36
+600726.43 789156.85
+600691.51 789131.02
+600662.08 789122.77
+600623.14 789097.79
+600582.29 789092.92
+600539.37 789082.62
+600522.17 789080.44
+600517.72 789096.96
+600487.24 789178.25
+600239.64 789098.24
+600079.3 789043.31
+599927.4 788948.22
+599890.88 788916.47
+599814.56 788866.79
+599740.43 788821.94
+599735.99 788767.33
+599762.82 788648.03
+599825.71 788435.97
+599830.26 788289.35
+599828.14 788222.67
+599806.13 788226.91
+599783.91 788227.96
+599758.72 788226.48
+599736.2 788230.76
+599713.16 788245.38
+599691.73 788270.61
+599663.79 788305.34
+599630.05 788371.76
+599632.15 788413.92
+599634.15 788450.17
+599639.45 788503.57
+599589.07 788537.1
+599464.99 788617.74
+599450.17 788620.95
+599402.2 788607.46
+599361.34 788593.64
+599319.68 788582.02
+599297.94 788575.54
+599261.28 788591.56
+599223.23 788603.98
+599189.28 788616.07
+599149.62 788606.66
+599126.19 788602.05
+599073.81 788590.12
+599058.19 788590.52
+599047.77 788601.74
+599026.64 788681.8
+598996.39 788693.61
+598965.35 788706.03
+598899.25 788732.53
+598858.19 788747.95
+598881.12 788881.06
+598881.72 788902.49
+598876.92 788917.84
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 599914.66 789443.59
+Region  1
+  74
+604348.14 806239.41
+604375 806227.7
+604402.2 806229.46
+604430.44 806234.97
+604460.05 806247.37
+604488.97 806267.34
+604521.34 806304.52
+604540.96 806347.52
+604554.74 806368.87
+604580.91 806364.74
+604610.52 806324.8
+604661.82 806260.45
+604787.5 806099.69
+604837.08 806036.33
+604854.3 805993.63
+604835.03 805920.66
+604823.31 805861.41
+604823.31 805834.55
+604844.66 805760.18
+604867.39 805691.32
+604891.49 805658.95
+604922 805618.84
+604951.09 805599.21
+604978.91 805573.89
+604970.62 805527.08
+604942.06 805461.3
+604906.87 805362.5
+604901.61 805344.23
+604857.51 805367.97
+604827.84 805367.97
+604804.09 805348.47
+604808.33 805306.92
+604793.07 805352.71
+604793.07 805353.55
+604749.83 805431.56
+604702.34 805517.2
+604591.67 805848.32
+604522.99 805749.11
+604472.96 805683.82
+604440.74 805674.5
+604404.28 805677.04
+603740.77 805799.57
+603701.85 805813.72
+603675.68 805840.58
+603630.23 805910.13
+603600.11 805955.46
+603569.76 805987.74
+603550.15 805995.98
+603512.83 806016.24
+603493.86 806032.7
+603473.62 806048.53
+603454.97 806083.46
+603449.63 806093.46
+603459.97 806261.74
+603552.24 806540.6
+603594.78 806531.1
+603634.61 806523.86
+603664.48 806600.8
+603686.65 806619.8
+603750.01 806651.03
+603812.92 806684.97
+603866.96 806746.78
+603905.46 806655.66
+603970.77 806527.56
+604010.71 806456.63
+604014.15 806410.49
+604104.01 806413.96
+604133.62 806416.71
+604132.35 806377.8
+604246.22 806376.45
+604255.17 806271.77
+604247.6 806218.06
+604298.56 806230.45
+604348.14 806239.41
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 604165.01 806057.47
+Region  1
+  90
+612399.88 805918.14
+612384.96 805941.14
+612324.09 805983.12
+612265.25 806019.2
+612156.61 806079.99
+612101.72 806118.35
+612071.08 806149.53
+612050.29 806274.87
+612045.5 806350.43
+612053.58 806407.09
+612067.08 806483.89
+612069.47 806517.19
+612041.1 806592.44
+612007.66 806657.35
+612002.86 806670.67
+611998.15 806679.13
+612710.99 806771.8
+613074.95 806760.88
+613113.72 806757.73
+613134.45 806731.18
+613109.57 806668.13
+613102.93 806602.6
+613113.72 806576.05
+613156.43 806578.02
+613240.64 806570.25
+613317.79 806576.05
+613421.48 806600.11
+613466.28 806625.83
+613535.13 806662.33
+613551.31 806694.25
+613566.24 806726.6
+613582 806772.23
+613578.68 806817.85
+613601.91 806852.7
+613610.21 806872.6
+613647.54 806890.85
+613715.56 806852.7
+613767.41 806867.18
+613881.06 806943.5
+613947.42 806985.81
+613970.65 806986.63
+613998.03 806967.56
+614022.91 806935.2
+614035.36 806909.49
+614085.96 806928.57
+614086.79 806974.19
+614087.37 807014.72
+614092.6 807067.1
+614096.74 807110.24
+614100.89 807159.18
+614113.34 807186.56
+614125.36 807210.2
+614144.55 807227.88
+614164.82 807249.38
+614207.26 807275.93
+614250.95 807291.72
+614298.44 807303.72
+614340.22 807321.36
+614377.55 807335.46
+614408.62 807344.79
+614439.01 807347.31
+614234.49 806650.9
+614280.5 806556.56
+614315.34 806476.93
+614351.01 806398.95
+614409.08 806413.88
+614456.46 806429.39
+614491.61 806459.94
+614522.29 806504.7
+614510.68 806471.52
+614500.73 806443.31
+614439.34 806252.52
+614298.72 806107.69
+613966.89 805614.13
+613342.23 805375.22
+613316.72 805337.1
+613261.83 805445.81
+613229.86 805481.51
+613198.42 805505.1
+613152.85 805537.23
+613047.34 805609.71
+612998.31 805642.75
+612948.76 805726.41
+612949.56 805759.16
+612913.32 805766.08
+612791.29 805814.58
+612618.37 805870.71
+612427.06 805845.67
+612418.53 805883.5
+612399.88 805918.14
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 613334.14 806264.58
+Region  1
+  76
+609171.37 802336.92
+608653.87 801785.01
+608628.47 801807.87
+608587.83 801843.43
+608538.3 801898.04
+608494.95 801882.42
+608468.36 801872.94
+608450.67 801829.46
+608434.16 801785.01
+608420.19 801755.8
+608407.49 801729.13
+608402.41 801699.92
+608407.03 801663.8
+608432.11 801601.46
+608466.32 801536.85
+608467.84 801477.55
+608455.68 801412.18
+608460.24 801369.61
+608452.11 801349.64
+608457.43 801317.33
+608461.83 801250.25
+608466.01 801190.59
+608458.41 801174.25
+608437.69 801158.87
+608382.59 801130.37
+608343.44 801080.58
+608338.12 801068.04
+608338.12 801055.88
+608370.43 801040.3
+608271.73 800985.05
+608211.21 800931.15
+608126.53 800862.13
+608059.36 800804.59
+607996.63 800748.32
+607963.46 800724.06
+607955.9 800732.57
+607919.96 800770.39
+607863.23 800836.59
+607813.11 800895.22
+607752.59 800943.44
+607663.7 800982.21
+607489.23 801038.5
+607400.34 801085.78
+607354.01 801142.52
+607324.69 801208.71
+607282.11 801351.61
+607260.87 801475.39
+607233.45 801606.83
+607159.23 801937.34
+607154.97 802014.89
+607153.31 802119.64
+607096.29 802200.8
+607147.88 802206.48
+607210.8 802531.55
+607263.44 802611.88
+608068.17 802768.36
+607844.46 803395.24
+607875.29 803403.91
+608993.06 803798.31
+609016.18 803730.89
+609028.22 803703.43
+609428.65 802549.41
+609466.7 802430.45
+609423.6 802424.77
+609351.6 802418.41
+609285.14 802447.79
+609236.5 802481.02
+609176.78 802519.55
+609144.99 802541.7
+609115.62 802561.44
+609076.61 802570.11
+609053.25 802562.17
+609034.47 802540.98
+609026.76 802512.56
+609020.02 802475
+609171.37 802336.92
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 608217.67 802309.68
+Region  1
+  70
+613550.47 801066.75
+613469.5 800980.53
+613391.76 800902.3
+613358.13 800861.04
+613340.78 800837.96
+613311.71 800756.51
+613286.46 800688.67
+613261.69 800625.42
+613227.43 800560.9
+613155.34 800419.2
+613146.55 800447.41
+613173.59 800531.19
+613186.13 800580.4
+613182.49 800607.09
+613049.71 800690.62
+613061.06 800707.96
+612995.52 800754.37
+612980.15 800732.99
+612909.31 800779.97
+612860.96 800811.66
+612805.35 800845.75
+612765.88 800906.74
+612755.03 800915.43
+612708.08 800955.19
+612681.87 800977.06
+612640.56 800997.1
+612581.54 800999.29
+612533.91 801007.54
+612498.99 801025.61
+612467.55 801051.96
+612434.33 801078.8
+612401.5 801103.43
+612330.35 801051.83
+612262.73 801046.65
+612202.12 801049.14
+612154.18 801062.16
+612112.59 801078.67
+612096.39 801087.88
+612079.38 801095.61
+612067.23 801123.3
+612055.9 801176.45
+612047.14 801258.06
+612054.86 801353.59
+612084.13 801469.99
+612147.1 801666.5
+612184.23 801789.66
+612241.29 801763.85
+612477.74 801648.99
+612524.1 801697.89
+612691.51 801887.86
+612760.57 801914.87
+612836.39 801923.16
+612862 801913.72
+612872 801908.46
+612971.99 801859.33
+612987.64 801844.29
+613056.98 801823.43
+613096.57 801788.75
+613137.07 801719.83
+613159.77 801684.54
+613182.48 801640.05
+613278.37 801474.52
+613342.45 801417.8
+613395.83 801381.3
+613547.43 801333.85
+613605.65 801319.27
+613669.61 801291.62
+613691.25 801275.75
+613621.75 801168.42
+613550.47 801066.75
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 612833.04 801294.54
+Region  1
+  61
+611392.22 802817.89
+610905.71 802674.25
+610706.29 802621.5
+610649.24 802604.79
+610606.55 802594.63
+610534.73 802589.21
+610448.34 802586.37
+610376 802578.65
+610324.88 802567.56
+610264.84 802536
+610226.26 802503.69
+610186.95 802454.71
+610121.37 802351.88
+610070.33 802426.25
+610014.55 802494.97
+610028.58 802565.8
+610027.7 802604.13
+610029.67 802626.88
+610022.52 802652.74
+610036.6 802657.99
+610119.62 802679.22
+610122.36 802688.26
+610127.61 802705.28
+610143.23 802747.11
+610164.04 802780.73
+610170.28 802797.22
+610254.51 802801.7
+610280.45 802813.87
+610321.76 802840.13
+610369.95 802871.37
+610400.05 802891.87
+610436.56 802900.2
+610485.23 802902.44
+610523.02 802893.47
+610546.56 802888.49
+610658.64 802961.82
+610789.14 803045.9
+610808.19 803059.51
+610822.69 803069.36
+610805.46 803133.68
+610794.09 803187.31
+610757.88 803346.52
+611009.44 803397.88
+611116.02 803411.38
+611211.51 803419.1
+611244.3 803409.9
+611298.8 803391.57
+611342.52 803374.22
+611396.64 803355.97
+611550.26 803274.61
+611592.49 803249.77
+611618.26 803232.97
+611602.89 803203.18
+611589.76 803180.76
+611577.91 803163.47
+611552.61 803124.72
+611488.8 803036.03
+611449.88 802986.8
+611408.02 802923.55
+611395.89 802840.05
+611392.22 802817.89
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 610883.78 802946.02
+Region  1
+  23
+601022.17 787562.68
+601207.17 786885.06
+600467.15 786800.69
+600458.12 786799.13
+600458.43 786832.15
+600448.78 786900.67
+600442.23 786959.24
+600434.45 787043.64
+600424.48 787142.74
+600419.81 787184.79
+600398.32 787222.79
+600373.4 787267.64
+600318.27 787320.57
+600248.51 787386.59
+600226.39 787421.16
+600194 787530.48
+600182.33 787552.79
+600188.68 787552.79
+601008.92 787619.22
+600980.58 787757.7
+601425.08 787809.42
+601512.71 787615.02
+601022.17 787562.68
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 600801.76 787289.54
+Region  1
+  187
+608049.29 809507.43
+608156.28 809436.81
+608203.72 809490.04
+608235.87 809525.35
+608270.13 809562.24
+608289.63 809583.85
+608302.81 809596.5
+608319.15 809617.06
+608339.7 809638.14
+608366.58 809658.69
+608391.35 809677.67
+608427.71 809711.83
+608458.28 809796.68
+608487.45 809789.99
+608519.68 809791.66
+608551.39 809796.92
+608584.51 809813.27
+608614.02 809840.68
+608634.05 809871.77
+608653.03 809906.56
+608667.78 809935.54
+608688.34 809965.06
+608712.58 809983.5
+608733.66 810013.02
+608746.84 810044.64
+608764.76 810088.91
+608811.67 810058.34
+608808.24 810042.84
+608813.51 810010.69
+608841.44 809991.18
+608861.11 809977.07
+608835.65 809939.53
+608858.84 809920.56
+608880.65 809897.35
+608901.53 809871.17
+608925.77 809844.29
+608948.96 809808.98
+608966.35 809770.5
+608953.7 809762.6
+608618.79 809289.07
+608536.04 809195.25
+608596.65 809150.98
+608644.88 809111.2
+608679.13 809081.15
+608740.8 809042.15
+608802.99 809023.18
+608868.35 809017.38
+608966.38 809012.11
+609055.88 808985.64
+609231.5 808888.78
+609314.77 808839.23
+609379.07 808801.81
+609450.23 808747
+609530.08 808678.2
+609706.64 808868.99
+609756.97 808909.8
+609808.62 808932.46
+609931.43 808879.23
+609979.39 808846.56
+610027.88 808734.29
+610074.79 808789.63
+610046.99 808868.72
+610018.61 808949.08
+609993.56 809027.74
+609980.03 809108.47
+609982.77 809177.31
+609989.89 809260.37
+609996.72 809357.23
+610048.14 809279.32
+610105 809190.08
+610168.41 809129.7
+610202.48 809101.78
+610255.58 809052.11
+610295.65 809007.24
+610323.73 808966.01
+610346.69 808903.05
+610349.43 808852.35
+610342.92 808811.59
+610329.22 808775.96
+610312.29 808749.58
+610302.47 808737.43
+610252.46 808663.64
+610213.78 808611.14
+610196.68 808585.79
+610210.72 808551.4
+610550.93 807790.34
+610554.17 807762.21
+610477.61 807755.8
+610438.68 807757.57
+610411.73 807755.8
+610391.54 807751.55
+610342.45 807743.07
+610265.21 807734.88
+610252.55 807733.63
+610197.09 807749.96
+610159.37 807758.46
+610113.15 807755.8
+610070.82 807753.96
+610022.86 807750.28
+609977.53 807750.8
+609948.02 807756.07
+609902.69 807780.32
+609885.56 807786.91
+609808.09 807815.37
+609774.35 807830.13
+609767.18 807835.73
+609758.54 807871.24
+609751.42 807893.94
+609731.66 807954.51
+609705.84 807954.51
+609648.39 807875.45
+609583.3 807787.21
+609532.17 807722.91
+609474.98 807649.93
+609419.11 807577.72
+609384.33 807532.39
+609349.54 807497.08
+609276.01 807456.79
+609249.66 807471.54
+609169.02 807491.05
+609115.79 807501.59
+609064.14 807508.44
+609019.34 807516.34
+608852.52 807648.89
+608919.19 807720.85
+608932.37 807753
+608920.25 807769.33
+608888.1 807778.29
+608868.07 807785.67
+608850.15 807799.9
+608841.19 807813.61
+608835.92 807826.26
+608833.28 807838.38
+608833.81 807857.35
+608921.83 807835.74
+608953.98 807838.38
+608977.17 807855.77
+608987.45 807881.83
+608984.81 807920.83
+608989.03 807953.51
+609003.78 807996.73
+609016.17 808044.93
+609015.64 808096.58
+609021.44 808161.41
+609021.44 808198.83
+609009.32 808221.49
+609028.82 808243.1
+609043.05 808260.49
+609000.1 808319.79
+608939.48 808348.25
+608865.17 808381.98
+608568.96 808656.64
+608504.66 808641.35
+608445.1 808620.8
+608338.37 808558.38
+608221.89 808516.75
+608186.05 808548.9
+608131.76 808591.59
+608030.57 808645.35
+607905.92 808703.03
+607797.87 808734.65
+607751.25 808744.67
+607671.58 808749.14
+607513.73 808753.17
+607231.62 808762.94
+607242.45 808795.44
+606840.95 808956.47
+606840.15 808990.46
+606851.18 809107.72
+607238.25 809392.98
+607408.54 809511.35
+607462.88 809545.64
+607535.57 809579.56
+607610.33 809606.56
+607647.01 809610.02
+607707.24 809610.02
+607753.62 809610.02
+607796.54 809612.09
+607829.07 809616.94
+607817.99 809637.01
+607874.76 809650.86
+607890.68 809652.93
+607914.91 809613.48
+607936.37 809588.56
+607959.21 809565.02
+607999.8 809537.81
+608049.29 809507.43
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 608852.72 808711.19
+Region  1
+  59
+616365.89 797936.74
+615855.35 797827.74
+615888.69 797679.13
+615694.38 797636.58
+615662.84 797779.82
+614972.59 797630.01
+615003.07 797659.86
+615038.61 797705.41
+615070.38 797743.61
+615075.46 797769.01
+615081.18 797826.79
+615093.92 797891.39
+615119.29 797933.13
+615164.91 797967.27
+615198.34 797999.73
+615240.89 798036.56
+615246.06 798074.15
+615261.97 798141.83
+615276.45 798228.98
+615285.34 798278.51
+615294.49 798324.66
+615307.25 798396.92
+615319.95 798473.77
+615339.96 798562.32
+615352.02 798618.84
+615367.27 798632.81
+615387.59 798655.67
+615418.71 798684.89
+615422.51 798703.93
+615414.89 798726.79
+615409.81 798742.67
+615401.56 798771.24
+615535.54 798768.07
+615748.65 798819.39
+615784.52 798897.16
+615820.72 798954.32
+615868.66 798981.3
+615910.57 798980.35
+615977.66 798962.66
+616030.81 798945.55
+616077.27 798941.02
+616137.59 798915.3
+616196.96 798877.52
+616259.83 798838.15
+616333.81 798788.93
+616398.58 798751.5
+616380.48 798709.9
+616369.68 798702.28
+616386.83 798614.94
+616405.65 798535.4
+616432.14 798460.73
+616455.41 798405.08
+616470.97 798355.55
+616475.42 798270.11
+616465.38 798210.81
+616446.31 798151.98
+616417.72 798067.85
+616372.55 797938.33
+616365.89 797936.74
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 615812.97 798284.9
+Region  1
+  65
+614733.44 803266.83
+614620.59 803918.46
+614629.22 803920.12
+614641.16 803921.78
+614746.55 803936.55
+615272.82 804048.62
+615336.22 804044.3
+615382.36 804046.96
+615418.87 804023.72
+615442.92 804008.1
+615478.81 803990.16
+615569.71 803921.26
+615492.13 803859.89
+615487.09 803855.93
+615505.68 803790.87
+615508.66 803715.85
+615485.43 803661.74
+615553.31 803636.33
+615625 803597.82
+615663.3 803572.63
+615713.89 803523.26
+615741.69 803475.17
+615761.89 803418.86
+615780.48 803352.68
+615756.16 803252.51
+615770.06 803225.3
+615770.63 803211.4
+615753.26 803191.13
+615746.32 803166.81
+615711.86 803135.26
+615684.07 803098.78
+615641.22 803057.67
+615588.98 802960.64
+615578.11 802927.39
+615570 802892.65
+615592.58 802877.59
+615607.64 802855.59
+615607.34 802762.03
+615585.34 802689.65
+615566.23 802665.91
+615509.45 802641.82
+615493.27 802637.53
+615493.27 802637.53
+615481.41 802632
+615455.06 802623.06
+615429.58 802613.22
+615409.32 802606.27
+615379.21 802591.79
+615346.78 802642.17
+615331.73 802679.8
+615327.1 802716.86
+615260.51 802729.02
+615181.47 802746.07
+615121.83 802757.65
+615096.36 802751.86
+615069.14 802741.38
+615041.35 802731.54
+615005.74 802716.78
+614941.47 802691.88
+614879.22 802663.21
+614860.11 802726.9
+614838.11 802803.92
+614813.79 802802.18
+614806.84 802798
+614733.44 803266.83
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 615189.54 803356.25
+Region  1
+  100
+614316.94 795512.93
+614472.51 795483.09
+614576.02 795545.32
+614588.08 795561.83
+614830.02 795705.27
+614956.39 795406.19
+614985.56 795338.99
+615001.37 795316.21
+614977.34 795253.25
+615034.49 795230.39
+615085.29 795212.61
+615108.26 795125.07
+615116.03 795096.49
+615125.55 795050.77
+615067.13 795102.84
+614957.28 795100.93
+614897.59 795100.93
+614820.12 795099.03
+614728.68 795097.76
+614734.35 795035.69
+614749.59 794802.01
+614718.81 794778.25
+614680.08 794755.39
+614644.52 794735.07
+614577.21 794691.26
+614514.98 794648.74
+614570.86 794568.07
+614544.82 794532.51
+614497.83 794510.92
+614377.18 794493.77
+614335.27 794470.28
+614298.45 794434.69
+614231.77 794399.13
+614106.68 794423.26
+614000 794442.94
+613871.09 794467.71
+613813.95 794477.86
+613756.16 794489.29
+613674.25 794459.44
+613566.04 794432.95
+614003.17 794684.29
+613965.93 795060.86
+613894.24 795053.34
+613792.02 795042.28
+613698.39 795035.41
+613623.61 795026.12
+613567.41 795058.86
+613545.73 795060.19
+613480.74 795078.74
+613427.79 795096.34
+613391.52 795104.14
+613396.6 795130.18
+613389.93 795130.47
+613321.03 795191.11
+613330.24 795226.03
+613343.89 795280.01
+613288.33 795261.91
+613318.17 795364.78
+613338.18 795421.94
+613355.05 795495.3
+613370.29 795501.33
+613399.47 795536.25
+613414.43 795552.73
+613397.92 795575.27
+613314.41 795703.87
+613144.63 795941.48
+613082.13 796045.49
+613106.94 796101.79
+613136.04 796172.39
+613199.49 796153.79
+613242.91 796142.34
+613234.32 796104.65
+613226.21 796076.02
+613221.44 796051.69
+613224.78 796034.04
+613249.11 795989.19
+613276.78 795941.96
+613299.19 795909.51
+613334.01 795876.11
+613367.89 795868
+613430.39 795880.41
+613461.16 795829.59
+613489.78 795798.58
+613497.61 795705.77
+613444.59 795713.71
+613436.33 795687.99
+613515.71 795591.78
+613541.11 795528.28
+613674.69 795228.67
+613843.68 795221.1
+613913.3 795222.37
+613974.79 795222.53
+613990.67 795233
+614038.66 795304.67
+614037.4 795319.86
+614034.25 795367.97
+614026.74 795505.31
+614142.31 795509.12
+614189.3 795507.21
+614316.94 795512.93
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 614189.49 795135.53
+Region  1
+  35
+605382.55 788588.5
+605338.42 788658.03
+605324.13 788669.14
+605261.58 788700.6
+605134.9 788781.59
+604996.78 788842.87
+605005.36 788854.61
+605107.28 788924.78
+605139.55 788947.2
+605212.36 789001.01
+605254.33 789029.68
+605289.57 789054.6
+605309.22 789030.77
+605323.86 789013.8
+605336.21 788998.87
+605355.58 788975.99
+605402.88 788900.74
+605442.89 788898.52
+605487.65 788888.39
+605528.29 788874.74
+605559.41 788840.45
+605590.25 788781.71
+605637.56 788702.33
+605643.91 788687.41
+605660.41 788594.69
+605631.18 788488.37
+605617.18 788430.11
+605569.24 788419.31
+605518.12 788409.79
+605468.28 788402.14
+605446.69 788452.62
+605427.32 788493.9
+605413.99 788521.52
+605400.97 788545.95
+605382.55 788588.5
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 605391.36 788738.97
+Region  1
+  50
+609873.29 807362.54
+609865.53 807422.14
+609805.45 807718.92
+609767.18 807835.73
+609774.35 807830.13
+609808.09 807815.37
+609885.56 807786.91
+609902.69 807780.32
+609948.02 807756.07
+609977.53 807750.8
+610022.86 807750.28
+610070.82 807753.96
+610113.15 807755.8
+610159.37 807758.46
+610197.09 807749.96
+610252.55 807733.63
+610265.21 807734.88
+610342.45 807743.07
+610391.54 807751.55
+610411.73 807755.8
+610438.68 807757.57
+610477.61 807755.8
+610554.17 807762.21
+610550.93 807790.34
+610608.28 807758.98
+610665.92 807751.13
+610711.89 807739.85
+610717.73 807726.04
+610729.42 807689.38
+610737.39 807652.72
+610763.14 807625.89
+610799.8 807595.6
+610859.94 807545.39
+610800.31 807524.02
+610724.7 807504.24
+610668.14 807465.89
+610595.26 807438.63
+610545.86 807419.04
+610471.58 807396.08
+610457.73 807380.62
+610303.19 807204.24
+610130.12 806987.93
+610106.67 807017.93
+610008.25 807165.48
+609989.7 807191.94
+609976.34 807210.21
+609971.43 807217.31
+609849.78 807254.94
+609865.77 807296.4
+609873.29 807362.54
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 610234.43 807491.85
+Region  1
+  68
+603888.63 794997.02
+603918.07 795683.91
+603933.78 795681.12
+603954.55 795674.36
+603972.35 795670.52
+604035.87 795647.83
+604098.35 795606.64
+604147.21 795561.62
+604174.78 795532.99
+604218.41 795489.36
+604219.63 795513.98
+604217.89 795553.77
+604215.1 795610.67
+604243.97 795620.37
+604285.07 795637.35
+604350.69 795656.54
+604418.67 795633.69
+604502.38 795601.86
+604550.94 795610.92
+604614.26 795620.91
+604666.37 795631.93
+604719.88 795642.46
+604779.53 795657.81
+604834.35 795667.02
+604887.86 795680.62
+604931.5 795690.93
+604963.96 795714.61
+604997.29 795739.17
+605015.28 795753.21
+605016.59 795789.61
+605016.59 795810.67
+605042.03 795811.1
+605074.47 795808.48
+605124.49 795806.72
+605192.48 795801.89
+605258.48 795827.1
+605288.4 795820.54
+605353.59 795797.76
+605436.14 795767
+605368.17 795679.73
+605223.67 795556.7
+605095.6 795432.15
+604980.01 795345.08
+604876.94 795294.21
+604756.53 795266.79
+604695.12 795263.28
+604633.56 795225.35
+604620.23 795219.95
+604598.32 795209.79
+604463.42 795136.19
+604412.58 795078.37
+604370.95 794998.82
+604355.5 794976.9
+604335.13 794923.87
+604313.22 794882.28
+604288.89 794857.61
+604260.31 794838.56
+604150.98 794858.19
+604056.1 794899.36
+604026.98 794911.4
+604002.88 794920.94
+603980.29 794930.98
+603964.72 794937.51
+603943.64 794947.05
+603918.78 794956.33
+603900.03 794961.41
+603888.23 794968.18
+603888.63 794997.02
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 604488.93 795381.06
+Region  1
+  36
+609659.06 793409.48
+609574.3 793534.83
+609544.54 793576.58
+609550.17 793586.26
+609606.27 793659.94
+609637.39 793708.62
+609635.31 793774.8
+609610.53 793815.14
+609657.52 793871.66
+609674.67 793904.36
+609703.88 793921.19
+609733.4 793925.02
+609828.33 793922.79
+609903.9 793773.25
+609951.84 793835.8
+610001.05 793898.03
+609989.62 793921.84
+609958.2 793974.24
+610002.33 794005.36
+610073.61 794046.78
+610151.85 793914.76
+610187.9 793845.14
+610185.97 793778.68
+610172.14 793756.41
+610166.42 793656.07
+610164.51 793624.96
+610152.13 793583.36
+610105.14 793506.52
+610059.89 793441.93
+610047.36 793417.36
+609945.76 793342.11
+609924.49 793329.47
+609910.84 793322.16
+609750.82 793322.8
+609718.41 793322.99
+609659.06 793409.48
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 609884.14 793650.19
+Region  1
+  58
+604056.1 794899.36
+604150.98 794858.19
+604260.31 794838.56
+604124.27 794835.64
+604089.5 794832.21
+604016.96 794796.91
+603952.19 794711.18
+603964.89 794609.58
+603936.32 794597.51
+603905.2 794581
+603862.02 794569.57
+603845.51 794568.3
+603784.68 794555.67
+603719.78 794548.62
+603674.06 794543.54
+603622.95 794530.87
+603582.75 794507.53
+603526.22 794471.61
+603477.02 794423.97
+603433.32 794373.96
+603387.73 794330.27
+603353.54 794301.15
+603322.19 794286.81
+603289.38 794275.38
+603262.92 794272.84
+603214.28 794270.12
+603152.26 794268.84
+603084.7 794266.34
+603053.9 794273.19
+603101.87 794679.4
+603025.88 794687.02
+603044.28 794825.51
+603061.86 794962.86
+603073.39 794971.85
+603084.17 794979.65
+603125.46 795012.92
+603137.1 795019.9
+603146.84 794997.04
+603179.65 795012.7
+603221.05 795041.75
+603327.1 795016.98
+603438.86 795029.68
+603556.97 795060.16
+603642.06 795049.38
+603673.81 795065.25
+603729.05 795065.89
+603770.21 795044.09
+603776.87 795028.14
+603888.63 794997.02
+603888.23 794968.18
+603900.03 794961.41
+603918.78 794956.33
+603943.64 794947.05
+603964.72 794937.51
+603980.29 794930.98
+604002.88 794920.94
+604026.98 794911.4
+604056.1 794899.36
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 603478.02 794720.45
+Region  1
+  113
+604862.82 793533.59
+604889.43 793518.91
+604948.49 793485.57
+605084.25 793439.09
+605176.02 793401.3
+605238.42 793431.65
+605286.68 793489.76
+605315.58 793459.91
+605345.43 793438.64
+605361.94 793454.52
+605410.53 793507.54
+605446.1 793548.82
+605524.06 793631.52
+605578.68 793690.58
+605601.54 793714.4
+605616.46 793734.08
+605646.95 793734.72
+605704.59 793743.48
+605767.46 793756.82
+605803.98 793776.19
+605867.49 793733
+605846.85 793558.41
+605836.69 793480.61
+605869.25 793437.84
+605913.5 793377.58
+605943.63 793335.24
+605960.79 793313.89
+605901.95 793268.51
+605818.12 793233.58
+605740.64 793218.34
+605664.44 793211.99
+605602.84 793210.08
+605541.87 793210.08
+605477.41 793205.95
+605331.99 793145.62
+605280.55 793092.28
+605235.46 793041.47
+605191 793002.73
+605153.88 792970.64
+605108.8 792939.52
+605031.45 792911.35
+604947.51 792908.41
+604921.47 792912.85
+604878.41 792928.48
+604798.28 792957.94
+604734.15 792979.53
+604643.62 793004.4
+604548.09 793043.03
+604487.77 793061.44
+604374.7 793097.64
+604371.53 793108.43
+604367.75 793120.5
+604362.67 793130.02
+604355.69 793140.18
+604348.7 793154.15
+604338.54 793171.3
+604330.29 793189.71
+604305.78 793211.19
+604295.02 793206.13
+604236.29 793222.74
+604171.52 793243.69
+604128.34 793253.85
+604090.88 793258.3
+604059.13 793283.06
+604036.84 793296.64
+604027.38 793318.63
+604005.15 793345.94
+603984.83 793361.18
+603970.23 793377.69
+603958.8 793389.12
+603940.38 793398.64
+603923.24 793408.8
+603874.98 793429.76
+603838.78 793443.73
+603770.2 793445
+603735.91 793471.03
+603702.26 793495.8
+603713.69 793540.25
+603716.69 793587.15
+603747.34 793719.95
+603720.67 793750.43
+603797.53 793742.87
+603827.69 793664.12
+604003.93 793443.41
+604100.63 793378.15
+604138.41 793397.84
+604324.02 793413.87
+604358.63 793437.37
+604372.6 793465.94
+604372.13 793500.73
+604356.27 793534.43
+604329.43 793565.37
+604314.5 793590.78
+604320.38 793616.68
+604344.2 793623.35
+604359.44 793630.97
+604369.28 793653.84
+604378.01 793697.53
+604377.06 793740.08
+604417.07 793752.46
+604431.68 793758.18
+604453.91 793793.43
+604467.72 793783.44
+604508.37 793756.45
+604543.62 793781.85
+604577.59 793799.95
+604613.48 793773.91
+604628.24 793775.02
+604725.56 793764.6
+604756.85 793763.59
+604785.02 793668.4
+604821.07 793593.72
+604862.82 793533.59
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 604916.87 793360.87
+Region  1
+  28
+598751.15 789320.53
+598725.52 789361.68
+598698.53 789417.54
+598702.98 789437.86
+598728.7 789496.96
+598743.3 789542.68
+598759.43 789597.1
+598777.47 789657
+598799.02 789726.96
+598808.46 789755.7
+598819.19 789742.45
+598834.34 789722.26
+598852.64 789698.27
+598875.36 789667.35
+598883.99 789657.53
+598896.53 789637.39
+598899.97 789624.43
+598908.72 789563.32
+598918.24 789490.92
+598927.07 789424.22
+598932.98 789365.96
+598924.73 789322.46
+598909.49 789290.39
+598889.49 789262.45
+598826.3 789218.32
+598797.09 789192.28
+598772.64 789264.99
+598751.15 789320.53
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 598825.55 789457.37
+Region  1
+  16
+602904.8 806561.85
+603148.77 805949.36
+603152.75 805939.36
+603374.04 805382.39
+603050.58 805256.04
+603025.99 805245.01
+602667.91 806118.53
+602673.01 806141.94
+602687.62 806186.85
+602680.69 806207.1
+602656.05 806245.7
+602666.21 806274.17
+602715.63 806306.41
+602757.26 806332.06
+602809.83 806409.23
+602904.8 806561.85
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 602992.17 805848.76
+Region  1
+  323
+614884.12 808547.67
+614766.44 808083.44
+614830.74 808040.57
+614832.76 808016.71
+614806.28 807962.32
+614800.62 807939.27
+614798.2 807902.88
+614819.63 807864.86
+614854.4 807857.58
+614905.98 807863.04
+614918.11 807855.36
+614830.18 807744.76
+614764.67 807663.88
+614725.66 807610.3
+614703.02 807544.38
+614695.74 807453.8
+614720.4 807364.83
+614750.02 807312.28
+614785.69 807264.99
+614860.77 807170.85
+614886.49 807105.32
+614891.46 807050.57
+614878.61 806983.78
+614669.56 806651.96
+614536.83 806533.34
+614522.29 806504.7
+614491.61 806459.94
+614456.46 806429.39
+614409.08 806413.88
+614351.01 806398.95
+614315.34 806476.93
+614280.5 806556.56
+614234.49 806650.9
+614439.01 807347.31
+614408.62 807344.79
+614377.55 807335.46
+614340.22 807321.36
+614298.44 807303.72
+614250.95 807291.72
+614207.26 807275.93
+614164.82 807249.38
+614144.55 807227.88
+614125.36 807210.2
+614113.34 807186.56
+614100.89 807159.18
+614096.74 807110.24
+614092.6 807067.1
+614087.37 807014.72
+614086.79 806974.19
+614085.96 806928.57
+614035.36 806909.49
+614022.91 806935.2
+613998.03 806967.56
+613970.65 806986.63
+613947.42 806985.81
+613881.06 806943.5
+613767.41 806867.18
+613715.56 806852.7
+613647.54 806890.85
+613610.21 806872.6
+613601.91 806852.7
+613578.68 806817.85
+613582 806772.23
+613566.24 806726.6
+613551.31 806694.25
+613535.13 806662.33
+613466.28 806625.83
+613421.48 806600.11
+613317.79 806576.05
+613240.64 806570.25
+613156.43 806578.02
+613113.72 806576.05
+613102.93 806602.6
+613109.57 806668.13
+613134.45 806731.18
+613141.92 806756.07
+613135.11 806782.36
+613118.04 806803.24
+613088.3 806814.64
+613052.86 806826.04
+613002.27 806869.72
+612978.23 806888.07
+612914.33 806920.37
+612895.95 806936.5
+612887.66 806965.53
+612880.25 807024.76
+612869.52 807059.56
+612844.24 807100.06
+612830.36 807137.39
+612811.42 807189.9
+612792.96 807237.58
+612761.91 807298.94
+612733.09 807359.06
+612709.73 807433.6
+612695.82 807505.15
+612699.8 807522.54
+612719.17 807543.41
+612756.94 807567.76
+612790.3 807596.68
+612794.14 807637.79
+612778.35 807656.7
+612767.96 807680.54
+612773.46 807722.11
+612779.33 807769.79
+612773.46 807829.83
+612787.46 807857.81
+612760.21 807897.18
+612743.14 807921.86
+612716.58 807942.75
+612686.22 807973.12
+612657.76 807998.44
+612647.65 808016.79
+612641.98 808038.94
+612640.76 808081.95
+612648.17 808155.06
+612608.9 808148.74
+612595.35 808154.61
+612590.39 808174.47
+612605.51 808191.81
+612594.68 808222.06
+612573.46 808245.08
+612563.53 808277.14
+612564.88 808308.28
+612549.53 808335.82
+612520.19 808337.18
+612497.62 808303.77
+612463.31 808297.9
+612429.45 808268.11
+612271.82 808185.24
+612254.7 808154.88
+612161.9 808010.21
+612055.07 807877.05
+612010.85 807899.41
+611964.38 807909.59
+611931.85 807928.73
+611874.85 807945.77
+611777.31 807985.86
+611741.04 808043.01
+611709.61 808070.36
+611706.47 808098.83
+611715.98 808114.01
+611718.53 808136.78
+611717.28 808151.33
+611702.78 808181.14
+611662.03 808169.71
+611611.85 808111.08
+611594.46 808070.33
+611578.06 808062.38
+611547.26 808072.82
+611514.96 808070.33
+611470.74 808076.3
+611451.86 808087.72
+611406.64 808158.28
+611379.31 808197.67
+611369.63 808266.92
+611378.24 808301.37
+611341.75 808318.79
+611386.18 808401.3
+611387.99 808438.48
+611416.1 808494.69
+611478.46 808608.81
+611490.91 808645.65
+611499.07 808665.6
+611520.83 808685.54
+611614 808690.99
+611621.86 808779.39
+611627.44 808842.18
+611681.89 808844.05
+611703.4 808839.61
+611718.16 808831.53
+611742.07 808823.36
+611774.71 808812.48
+611795.56 808809.76
+611850.87 808809.76
+611958.32 808804.74
+612017.32 808788.23
+612024.92 808792.02
+611979.62 809302.96
+611976 809323.82
+612328.71 809380.03
+612435.73 809432.03
+612463.6 809454.15
+612477.55 809476.29
+612478.22 809511.08
+612463.06 809539.56
+612449.79 809562.34
+612444.18 809653.43
+612435.43 809767.31
+612453.27 809881.8
+612497.07 810016.52
+612522.43 810048.78
+612578.66 810096.54
+612627.77 810125.54
+612762.4 810111.39
+612860.4 810072.23
+612886.22 810088.53
+612904.15 810075.17
+612948.45 810066.93
+612976.48 810081.18
+612995.38 810101.13
+613021.41 810082.86
+613035.9 810079.93
+613082.3 810090.21
+613107.91 810105.96
+613137.51 810153.38
+613186.92 810239.63
+613198.98 810336.35
+613313.27 810450.86
+613324.6 810471.5
+613378.15 810516.37
+613527.86 810559.22
+613541.83 810554.36
+613597.36 810605.68
+613627.41 810614.36
+613721.69 810630.13
+613739.04 810639.65
+613801.9 810640.5
+613898.51 810655.21
+613905.29 810652.46
+613907.52 810608.33
+613993.95 810538.38
+614044.11 810462.61
+614059.93 810407.59
+614069.64 810358.91
+614089.33 810335.1
+614142.67 810259.75
+614176.75 810202.17
+614209.36 810115.2
+614226.03 810049.24
+614265.17 809991.26
+614288.36 809985.46
+614326.05 809993.43
+614355.76 810017.35
+614411.93 810012.63
+614435.85 810025.68
+614546.74 810011.18
+614602.55 810001.76
+614677.2 810031.48
+614735.18 810064.09
+614810.55 810044.52
+614815.63 810024.23
+614815.63 809977.12
+614858.39 809979.29
+614877.57 809972.4
+614909.69 809976.07
+614956.57 809905
+615009.48 809860.06
+615033.4 809860.06
+615123.27 809888.33
+615175.45 809931.09
+615201.54 809979.65
+615224.73 810012.99
+615295.04 810073.14
+615336.69 810098.15
+615378.73 810095.97
+615545.42 810009
+615558 809934.98
+615555.2 809824.97
+615512.8 809731.41
+615512.8 809679.95
+615506.27 809599.5
+615488.88 809584.28
+615475.11 809550.21
+615450.47 809525.57
+615448.64 809473.74
+615439.94 809432.43
+615421.82 809407.06
+615471.04 809348.36
+615483.42 809284.58
+615537.06 809275.16
+615619.68 809272.26
+615711 809253.41
+615797.25 809200.5
+615896.25 809192.39
+615911.83 809124.46
+615945.8 809003.36
+615958.85 808970.02
+615965.37 808945.38
+615968.06 808920.1
+615965.7 808874.74
+615954.14 808876.51
+615918.57 808881.96
+615846.39 808871.24
+615796.4 808885.18
+615738.79 808878.25
+615696.43 808843.38
+615665.29 808791.88
+615692.84 808742.77
+615721.58 808668.52
+615715.6 808640.97
+615734.76 808573.9
+615753.92 808551.15
+615756.32 808518.81
+615770.69 808503.24
+615777.88 808430.18
+615793.15 808353.77
+615778.18 808317.84
+615788.96 808207.05
+615793.15 808154.35
+615778.48 808160.04
+615743.75 808161.83
+615707.22 808148.06
+615617.39 808086.38
+615562.9 808058.84
+615497.03 808046.26
+615346.91 808053.34
+615260.98 808092.56
+615210.74 808114.9
+615174.05 808123.18
+615237.59 808367.97
+615194.88 808510.26
+615114.32 808533.13
+615111.81 808561.6
+615127.7 808621.69
+615002.41 808663.5
+614985.91 808624.29
+614984.61 808591.39
+615007.37 808562.28
+615033.93 808537.6
+615042.77 808518.62
+615037.7 808508.5
+615018.38 808510.47
+614884.12 808547.67
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 613755.9 808654.74
+Region  1
+  689
+608222.18 787963.39
+608312.24 787960.41
+608313.59 787858.68
+608207.84 787787.45
+608148.35 787741.28
+608111.71 787716.45
+608075.69 787699.19
+608019.68 787658.63
+608000.46 787642.13
+607951.71 787631.23
+607922.95 787628.81
+607888.29 787615.95
+607848.32 787578.7
+607759.08 787512
+607697.35 787470.87
+607657.46 787444.28
+607640.34 787437.77
+607613.09 787428.57
+607551.08 787407.33
+607486.27 787381.59
+607416.75 787353.6
+607363 787331.24
+607311.94 787319.96
+607208.49 787279.65
+607189.7 787259.73
+607129.65 787158.54
+607091.64 787105.65
+607060.02 787034.81
+606997.8 787009.35
+606889.03 786918.58
+606821.11 786884.85
+606788.22 786848.21
+606775.93 786807.91
+606742.29 786778.78
+606690.55 786731.35
+606664.06 786721.59
+606631.76 786723.46
+606592.69 786703.74
+606584.99 786679.83
+606572.51 786658.05
+606548.74 786621.25
+606503.9 786559.23
+606480.38 786543.32
+606450.91 786531.1
+606452.77 786514.64
+606451.54 786498.31
+606407.65 786468.92
+606371.92 786454.71
+606354.4 786437.19
+606345.37 786421.79
+606350.15 786409.32
+606379.35 786386.75
+606391.83 786373.48
+606397.67 786352.5
+606387.58 786298.87
+606379.09 786278.43
+606369.78 786245.56
+606372.7 786209.71
+606383.33 786175.98
+606378.84 786161.44
+606371.97 786143.89
+606359.39 786121.01
+606364.54 786081.92
+606359.58 786062.85
+606350.08 786050.85
+606292.04 786006.91
+606275.14 785985.05
+606244.41 785968.92
+606216.85 785929.58
+606218.61 785864.12
+606204.26 785826.27
+606187.25 785805.13
+606145.47 785779.28
+606079.68 785711.97
+606078.03 785648.9
+606066.97 785590.88
+606012.16 785484.82
+605991.15 785447.09
+605978.07 785435.41
+605965.16 785413.54
+605862.37 785361.92
+605796.4 785301.05
+605787.61 785269.8
+605788.04 785242.24
+605791.85 785201.44
+605781.84 785155.83
+605723.9 785136.56
+605713.82 785125.01
+605709.03 785100.31
+605695.2 785072.58
+605644.64 785041.53
+605604.7 785024.82
+605565.93 785024.91
+605500.62 785034.11
+605447.48 785047.1
+605426.83 785039.23
+605403.05 785019.97
+605381.12 785014.98
+605377.06 785003.43
+605357.52 784989.17
+605355.25 784965.29
+605327.3 784934.98
+605342.11 784901.4
+605388.62 784851.54
+605400.6 784816.67
+605399.3 784795.99
+605396.22 784738.24
+605377.19 784707.22
+605354.03 784669.52
+605338.05 784639.17
+605318.83 784524.81
+605225.59 784438.7
+605111.83 784388.22
+605093.04 784366.61
+605088.5 784357.1
+605087.42 784352.78
+605069.07 784308.94
+605043.63 784266.33
+604869.44 784074.12
+604812.21 784038.18
+604814.61 784000.75
+604790.3 783943.6
+604794.3 783908.92
+604808.45 783887.24
+604813.42 783836.46
+604808.78 783802.43
+604811.92 783772.09
+604793.66 783696.76
+604793.76 783637.28
+604782.31 783615.02
+604760.16 783594.42
+604750.87 783579.29
+604712.94 783536.65
+604674.05 783499.48
+604665.84 783476.14
+604670.27 783459.16
+604698.57 783447.92
+604735.18 783391.87
+604787.68 783370.69
+604887.46 783364.44
+604953.12 783352.57
+604973.42 783341.98
+604983.78 783322.11
+604983.57 783263.8
+604935.84 783227.95
+604913.03 783207.97
+604863.11 783152.54
+604814.53 783098.76
+604759.02 783017.23
+604702.2 782946.55
+604677.91 782895.37
+604679.65 782847.66
+604674.44 782807.76
+604693.52 782740.11
+604744.7 782623.01
+604751.64 782596.99
+604751.64 782563.16
+604738.63 782522.39
+604707.83 782471.32
+604637.58 782435.88
+604585.68 782408.67
+604560.99 782378.92
+604517.44 782353.02
+604485.02 782254.88
+604432.48 782168.82
+604394.49 782089.71
+604378.66 782028.95
+604345.76 782001.04
+604315.38 781942.3
+604267.11 781867.1
+604257.11 781858.08
+604173.59 781873.43
+604084.98 781855.56
+603995.74 781861.02
+603930.73 781837.98
+603868.19 781820.7
+603749.56 781749.25
+603664.12 781730.27
+603606.53 781722.04
+603555.9 781721.41
+603507.17 781709.39
+603459.07 781699.9
+603351.49 781700.54
+603243.22 781659.17
+603205.74 781659.17
+603181.26 781698.65
+603146.46 781728.39
+603121.15 781770.16
+603103.44 781816.36
+603085.73 781865.1
+603077.1 781897.2
+603007.28 781960.66
+602966.15 781991.68
+602903.9 782056.23
+602846.17 782104.85
+602800.38 782131.55
+602762.42 782176.48
+602723.07 782204.74
+602713.07 782211.93
+602659.79 782227.41
+602663.34 782245.09
+602689.67 782275.21
+602712.45 782300.53
+602725.13 782333.21
+602744.37 782376.77
+602740.32 782422.35
+602733.23 782475.02
+602746.4 782531.74
+602759.98 782608.1
+602759.86 782666.21
+602768.21 782714.37
+602804.18 782775.38
+602831.15 782811.35
+602894.09 782859.51
+602951.89 782916.67
+602983.35 782954.56
+603017.63 782987.18
+603060.67 783032.11
+603095.44 783053.13
+603170.58 783072.4
+603212.97 783084.6
+603248.01 783097.29
+603267.56 783132.13
+603286.83 783180.3
+603316.05 783202.49
+603385.41 783227.53
+603436.79 783265.43
+603487.9 783332.08
+603498.04 783389.04
+603511.98 783454.85
+603532.24 783499.15
+603553.13 783530.16
+603595.75 783586.21
+603608.59 783619
+603617.58 783706.99
+603625.29 783724.97
+603619.51 783789.2
+603575.84 783838.01
+603550.15 783893.89
+603541.48 783936.56
+603479.82 784001.42
+603361.65 784072.72
+603295.5 784110.61
+603227.73 784121.16
+603142.96 784166.76
+603083.72 784269.38
+602940.65 784265.06
+602792.29 784270.19
+602765.31 784287.53
+602737.7 784333.78
+602717.14 784471.22
+602692.1 784515.54
+602538.91 784541.54
+602500.71 784554.07
+602468.59 784640.14
+602411.75 784659.71
+602312.2 784728.44
+602188.25 784806.15
+602133.66 784833.77
+602039.56 784882.88
+601934.88 784941.97
+601884.46 784970.54
+601833.72 785041.83
+601852.35 785060.46
+601984.65 785255.35
+602007.51 785189.95
+602009.41 785178.52
+602048.78 785191.22
+602071.5 785207.85
+602079.74 785230.64
+602046.23 785327.48
+602236.11 785590.66
+602162.82 785646.51
+602122.32 785675.62
+602044.35 785736.06
+602485.06 786287.22
+602376.18 786371.37
+602400.6 786390.72
+602420.92 786407.23
+602447.59 786431.36
+602481.88 786444.06
+602546.02 786451.05
+602606.19 786455.5
+602678.36 786494.12
+602701.15 786506.78
+602715.72 786528.3
+602739.77 786532.1
+602861.94 786575.8
+602875.87 786590.99
+602898.66 786601.12
+602934.74 786602.39
+602994.88 786619.49
+603027.79 786624.56
+603065.14 786640.39
+603089.83 786642.29
+603113.88 786642.29
+603142.37 786653.06
+603187.31 786665.72
+603205.04 786680.28
+603225.3 786685.35
+603272.13 786669.53
+603353.78 786673.34
+603418.97 786661.33
+603454.41 786642.34
+603477.19 786650.57
+603486.06 786660.7
+603505.68 786663.87
+603543.67 786681.6
+603563.93 786699.96
+603596.21 786708.82
+603650.65 786722.12
+603693.69 786737.32
+603721.55 786745.55
+603748.15 786786.07
+603776 786800.63
+603790.57 786821.52
+603808.92 786820.89
+603832.35 786844.31
+603837.9 786834.31
+603905.72 786716.15
+604029.23 786636.14
+604123.21 786567.87
+604171.15 786513.23
+604192.42 786472.9
+604224.49 786430.67
+604243.61 786435.48
+604286.65 786454.47
+604345.46 786479.88
+604396.89 786495.76
+604410.23 786518.3
+604417.21 786550.06
+604415.63 786590.38
+604408.32 786625.95
+604382.61 786727.24
+604366.11 786788.83
+604359.12 786823.43
+604359.76 786842.8
+604359.44 786857.09
+604358.8 786877.73
+604353.41 786940.91
+604351.82 786964.41
+604342.93 786996.16
+604324.52 787020.93
+604289.59 787063.47
+604303.35 787070.98
+604343.57 787097.13
+604377.42 787119.73
+604465.42 787164.68
+604469.22 787179.87
+604444.57 787260.89
+604431.28 787271.65
+604323.93 787235.51
+604338.38 787582.99
+604347.23 787612.1
+604346.28 787764.14
+604377.71 787873.7
+604428.83 787873.39
+604459.31 787881.01
+604491.02 787896.39
+604530.9 787921.08
+604550.1 787942.12
+604597.09 787999.06
+604685.02 788032.79
+604652.96 788092.63
+604635.82 788111.95
+604619.52 788154.86
+604595.48 788163.46
+604594.1 788174.37
+604620.14 788181.36
+604620.35 788193.21
+604605.32 788208.45
+604583.94 788211.44
+604544.78 788229.43
+604534.83 788245.73
+604537.16 788259.7
+604564.25 788274.73
+604572.29 788284.69
+604589.86 788290.2
+604588.9 788299.95
+604564.77 788318.05
+604554.61 788327.57
+604581.92 788374.88
+604597.71 788403.06
+604609.13 788425.28
+604648.82 788502.43
+604691.36 788584.99
+604730.1 788624.36
+604834.24 788617.69
+604864.72 788615.18
+604905.23 788588.27
+604950.76 788562.16
+604990.13 788539.3
+605065.38 788492.95
+605120.62 788452.63
+605171.1 788404.36
+605215.24 788344.67
+605387.01 788325.93
+605372.72 788288.8
+605381.7 788245.28
+605412.41 788198.99
+605456.54 788143.1
+605491.78 788097.98
+605549.24 788026.54
+605611.16 788053.53
+605671.48 788083.69
+605689.89 788111.67
+605704.81 788122.78
+605721.64 788130.4
+605774.98 788133.26
+605733.71 788213.23
+605671.79 788328.5
+605648.62 788370.41
+605629.25 788407.25
+605617.18 788430.11
+605631.18 788488.37
+605660.41 788594.69
+605643.91 788687.41
+605637.56 788702.33
+605590.25 788781.71
+605559.41 788840.45
+605528.29 788874.74
+605487.65 788888.39
+605442.89 788898.52
+605402.88 788900.74
+605355.58 788975.99
+605336.21 788998.87
+605323.86 789013.8
+605309.22 789030.77
+605289.57 789054.6
+605300.83 789191.54
+605373.22 789159.47
+605434.5 789132.48
+605487.2 789115.97
+605516.41 789114.72
+605633.57 789162.98
+605698.98 789183.66
+605746.92 789203.34
+605807.56 789226.84
+605840.97 789251.12
+605871.38 789309.35
+605902.41 789364.43
+605927.74 789400.51
+605955.23 789438.27
+605879.03 789504.01
+605847.28 789558.93
+605804.42 789678.63
+605840.3 789714.83
+605911.69 789781.88
+605973.28 789839.99
+605984.71 789866.34
+605975.03 790004.3
+605966.28 790084.33
+605944.69 790107.19
+605815.15 790194.5
+605801.94 790232.44
+605789.55 790270.96
+605758.44 790343.35
+605800.14 790356.48
+605798.44 790373.2
+605805.01 790387.17
+605813.13 790386.37
+605861.4 790407.7
+605894.86 790398.04
+605958.57 790404.18
+606033.66 790429.92
+606158.14 790585.72
+606161.49 790601.96
+606166.36 790615.72
+606179.73 790660.01
+606242.6 790698.12
+606277.52 790696.21
+606372.46 790671.13
+606451.51 790604.44
+606474.06 790560.31
+606542.78 790461.4
+606582.47 790475.05
+606594.86 790479.84
+606598.03 790457.93
+606601.21 790430.95
+606611.37 790385.22
+606598.01 790324.35
+606640.65 790313.9
+606685.77 790303.72
+606742.41 790291.96
+606709.72 790200.99
+606816.71 790043.5
+606856.72 790022.89
+606780.84 789931.75
+607046.98 789790.93
+607090.48 789835.06
+607344.73 789800.3
+607384.91 789816.95
+607441.1 789809.65
+607834.8 789884.27
+608167.54 790000.16
+608629.82 790219.61
+608227.84 790894.81
+608450.09 791162.15
+608511.08 791065.86
+608659.64 791148.81
+608652.02 791219.93
+608629.83 791376.69
+608627.3 791395.39
+608621.58 791441.12
+608615.55 791487.47
+608742.87 791362.98
+608828.28 791282.97
+608862.25 791271.54
+608905.75 791287.73
+608885.11 791330.59
+609033.06 791439.49
+609214.85 791455.07
+609377.41 791462.69
+609524.1 791287.12
+609651.4 791171.44
+609760.87 791088.54
+609869.07 791018.93
+609897.55 790994.88
+609924.05 790976.87
+609953.26 790954.01
+609984.06 790932.42
+610010.41 790919.72
+610050.24 790895.11
+610199.32 790825.1
+610196.5 790718.36
+610140.13 790525.48
+610081.39 790329.62
+610078.85 790267.39
+610099.79 790215.73
+610138.54 790169.6
+610189.91 790116.34
+610221.49 790067.22
+610193.8 790035.8
+610156.12 790001.34
+610126.3 789949.42
+610161.58 789888.88
+610141.62 789847.08
+610125.51 789829.16
+610058.68 789810.52
+610023.67 789760.07
+610033.79 789704.96
+610015.81 789676.89
+609995.14 789664.41
+609919.96 789645.21
+609901.99 789631.22
+609882.02 789584.63
+609858.73 789513.95
+609844.89 789465.76
+609781.1 789432.35
+609756.08 789398.55
+609629.09 789310.96
+609595.93 789274.05
+609534.92 789269.67
+609479.53 789254.89
+609426.75 789222.52
+609335.32 789174.41
+609327.1 789156.41
+609343.77 789143.9
+609345.13 789135.86
+609336.8 789098.97
+609311.79 789082.89
+609275.95 789028.02
+609161.13 788995.57
+609127.47 788946.24
+609126.74 788880.88
+609147.89 788834.05
+609154.87 788772.68
+609167.79 788708.7
+609167.27 788687.38
+609154.04 788653.07
+609119.55 788636.74
+609089.91 788635.51
+609041.77 788658.44
+609008.06 788664.39
+608987.79 788657.18
+608960.54 788628.78
+608935.67 788581.6
+608918.35 788524.4
+608911.03 788503.23
+608902.44 788460.97
+608898.93 788449.48
+608876.8 788431.83
+608787.39 788294.48
+608721.23 788209.53
+608656.84 788170.76
+608587.34 788087.93
+608549.82 788015.61
+608492.2 787969.04
+608441.66 787926.64
+608390.19 787911.04
+608314.21 787858.76
+608314.21 787858.88
+608313.18 787952.79
+608311.4 788005.32
+608312.78 788013.4
+608320.11 788043.17
+608333.44 788088.73
+608365.14 788138.55
+608436.6 788236.17
+608502.01 788323.22
+608573.47 788422.35
+608627.06 788502.11
+608701.04 788617.86
+608765.61 788726.82
+608789.68 788771.76
+608952.63 789043.51
+608993.64 789111.65
+609057.05 789205.24
+609132.93 789302.86
+609132.31 789326.28
+609251.44 789667.47
+609130.56 789712.39
+609087.54 789752.26
+609032.49 789799.09
+608988.19 789818.07
+608914.14 789833.89
+608828.71 789871.85
+608723.67 789957.29
+607937.98 789421.69
+607987.9 789200.16
+608059.43 789205.87
+608156.9 789212.21
+608255.01 789214.75
+608228.42 789211.59
+608210.7 789200.82
+608192.97 789183.1
+608180.3 789159.68
+608172.69 789121.06
+608169.51 789080.55
+608190.39 789051.44
+608249.88 789048.92
+608274.56 789033.1
+608304.3 789002.09
+608337.19 788966.65
+608361.24 788938.17
+608394.78 788925.51
+608396.66 788891.97
+608386.51 788833.1
+608375.75 788812.84
+608352.32 788789.42
+608316.24 788789.41
+608276.37 788792.57
+608245.35 788791.94
+608225.73 788778.01
+608199.13 788755.22
+608156.72 788745.72
+608118.11 788736.22
+608054.81 788727.35
+608010.5 788716.58
+607974.43 788727.33
+607945.95 788746.95
+607928.87 788770.37
+607920.65 788795.05
+607901.67 788814.04
+607870.66 788809.6
+607818.75 788800.1
+607758.62 788793.13
+607665.58 788804.51
+607557.99 788829.18
+607483.94 788858.92
+607443.44 788865.88
+607383.31 788852.58
+607308.61 788823.45
+607246.57 788796.22
+607173.13 788741.78
+607190.2 788696.84
+607221.19 788648.11
+607265.48 788598.11
+607357.85 788500.01
+607364.17 788482.29
+607324.92 788446.21
+607282.5 788427.21
+607232.49 788403.78
+607204.64 788396.82
+607180.58 788382.26
+607170.45 788363.9
+607238.52 788283.86
+606787.51 787825.39
+606757.79 787795.86
+606690.63 787727.93
+606715.72 787720.21
+607020.11 787632.27
+607819.27 788113.58
+607931.35 788066.29
+607979.29 788040.89
+608018.34 788045.97
+608069.46 788041.53
+608205.99 788003.4
+608222.18 787963.39
+    Pen (1,2,16711935) 
+    Brush (1,0,16777215)
+    Center 605541.26 786761.23
diff --git a/examples/data/BairrosPoA.dbf b/examples/data/BairrosPoA.dbf
old mode 100644
new mode 100755
diff --git a/examples/data/BairrosPoA.shp b/examples/data/BairrosPoA.shp
old mode 100644
new mode 100755
diff --git a/examples/data/BairrosPoA.shx b/examples/data/BairrosPoA.shx
old mode 100644
new mode 100755
diff --git a/examples/data/BairrosRecife.mid b/examples/data/BairrosRecife.mid
old mode 100644
new mode 100755
diff --git a/examples/data/BairrosRecife.mif b/examples/data/BairrosRecife.mif
old mode 100644
new mode 100755
diff --git a/examples/data/BairrosRecife2.csv b/examples/data/BairrosRecife2.csv
old mode 100644
new mode 100755
diff --git a/examples/data/BrasiliaPol.dbf b/examples/data/BrasiliaPol.dbf
new file mode 100755
index 0000000..506b360
Binary files /dev/null and b/examples/data/BrasiliaPol.dbf differ
diff --git a/examples/data/BrasiliaPol.shp b/examples/data/BrasiliaPol.shp
new file mode 100755
index 0000000..9162aba
Binary files /dev/null and b/examples/data/BrasiliaPol.shp differ
diff --git a/examples/data/BrasiliaPol.shx b/examples/data/BrasiliaPol.shx
new file mode 100755
index 0000000..66b80ba
Binary files /dev/null and b/examples/data/BrasiliaPol.shx differ
diff --git a/examples/data/Brasilia_RGB.tif b/examples/data/Brasilia_RGB.tif
new file mode 100755
index 0000000..514d97d
Binary files /dev/null and b/examples/data/Brasilia_RGB.tif differ
diff --git a/examples/data/Cadastro_Escolas.geo b/examples/data/Cadastro_Escolas.geo
old mode 100644
new mode 100755
diff --git a/examples/data/Cadastro_Escolas.tab b/examples/data/Cadastro_Escolas.tab
old mode 100644
new mode 100755
diff --git a/examples/data/Distritos.mid b/examples/data/Distritos.mid
old mode 100644
new mode 100755
diff --git a/examples/data/Distritos.mif b/examples/data/Distritos.mif
old mode 100644
new mode 100755
diff --git a/examples/data/EstadosBrasil.dbf b/examples/data/EstadosBrasil.dbf
old mode 100644
new mode 100755
diff --git a/examples/data/EstadosBrasil.shp b/examples/data/EstadosBrasil.shp
old mode 100644
new mode 100755
diff --git a/examples/data/EstadosBrasil.shx b/examples/data/EstadosBrasil.shx
old mode 100644
new mode 100755
diff --git a/examples/data/Mapa_Distritos_SP.dbf b/examples/data/Mapa_Distritos_SP.dbf
new file mode 100755
index 0000000..cfbdf58
Binary files /dev/null and b/examples/data/Mapa_Distritos_SP.dbf differ
diff --git a/examples/data/Mapa_Distritos_SP.shp b/examples/data/Mapa_Distritos_SP.shp
new file mode 100755
index 0000000..6738d47
Binary files /dev/null and b/examples/data/Mapa_Distritos_SP.shp differ
diff --git a/examples/data/Mapa_Distritos_SP.shx b/examples/data/Mapa_Distritos_SP.shx
new file mode 100755
index 0000000..b85425b
Binary files /dev/null and b/examples/data/Mapa_Distritos_SP.shx differ
diff --git a/examples/data/Mapa_Drenagem_SP.dbf b/examples/data/Mapa_Drenagem_SP.dbf
new file mode 100755
index 0000000..4fa92fb
Binary files /dev/null and b/examples/data/Mapa_Drenagem_SP.dbf differ
diff --git a/examples/data/Mapa_Drenagem_SP.shp b/examples/data/Mapa_Drenagem_SP.shp
new file mode 100755
index 0000000..5132d3f
Binary files /dev/null and b/examples/data/Mapa_Drenagem_SP.shp differ
diff --git a/examples/data/Mapa_Drenagem_SP.shx b/examples/data/Mapa_Drenagem_SP.shx
new file mode 100755
index 0000000..269f3a8
Binary files /dev/null and b/examples/data/Mapa_Drenagem_SP.shx differ
diff --git a/examples/data/Mapa_Industrias_SP.dbf b/examples/data/Mapa_Industrias_SP.dbf
new file mode 100644
index 0000000..6c4dac8
Binary files /dev/null and b/examples/data/Mapa_Industrias_SP.dbf differ
diff --git a/examples/data/Mapa_Industrias_SP.shp b/examples/data/Mapa_Industrias_SP.shp
new file mode 100644
index 0000000..b54ed37
Binary files /dev/null and b/examples/data/Mapa_Industrias_SP.shp differ
diff --git a/examples/data/Mapa_Industrias_SP.shx b/examples/data/Mapa_Industrias_SP.shx
new file mode 100644
index 0000000..6f8ea0e
Binary files /dev/null and b/examples/data/Mapa_Industrias_SP.shx differ
diff --git a/examples/data/OcorrenciasBH.csv b/examples/data/OcorrenciasBH.csv
new file mode 100755
index 0000000..90e76a2
--- /dev/null
+++ b/examples/data/OcorrenciasBH.csv
@@ -0,0 +1,6502 @@
+COD;Nrbo;Nat;Descricao;Ender;Num;Logr;DataHora;Origem;Post;Comp;Bairro;Munic;X;Y;ID
+1;2001000025;B04001;HOMICIDIO TENTAD;RUA DO GROTAO;200;107217;1/1/2001 00:23:00;CIDADAO COMUM;S;;HAVAI;BH;607513.23;793290.01;0
+2;2001000059;B04001;HOMICIDIO TENTAD;RUA SAO CLEMENTE;1258;62197;1/1/2001 00:53:00;CIDADAO COMUM;S;;PARQUE RIACHUELO;BH;609535.38;800385.58;1
+3;2001000068;B06000;LESAO CORPORAL;RUA CORONEL SEVE;830;18072;1/1/2001 00:58:00;CIDADAO COMUM;S;;ARAGUAIA;BH;604805.84;789781.71;2
+4;2001000076;B06000;LESAO CORPORAL;RUA PADRE ODORIC;95;51629;1/1/2001 01:03:00;CIDADAO COMUM;S;0;SAO PEDRO;BH;611365.75;794708.98;3
+5;2001000088;B03000;AMEACA;RUA PADRE CYR AS;116;12091;1/1/2001 01:10:00;CIDADAO COMUM;S;;PRIMEIRO DE MAIO;BH;612147.89;803583.29;4
+6;2001000091;B03000;AMEACA;RUA TRINTA E SET;54;34190;1/1/2001 01:11:00;CIDADAO COMUM;S;0;CONJUNTO FELICID;BH;612530.17;807443.42;5
+7;2001000199;B06000;LESAO CORPORAL;BECO UNIAO;60;302076;1/1/2001 02:23:00;CIDADAO COMUM;N;;VILA CASTANHEIRA;BH;601465.58;788609.45;6
+8;2001000202;B06000;LESAO CORPORAL;RUA JAGUARIBE;821;36822;1/1/2001 02:26:00;CIDADAO COMUM;S;FU;CONCORDIA;BH;611317.87;799724.84;7
+9;2001000234;B06000;LESAO CORPORAL;RUA GOVERNADOR M;23;31642;1/1/2001 02:47:00;CIDADAO COMUM;S;;GAMELEIRA;BH;606275.34;796492.16;8
+10;2001000271;B02000;RIXA;RUA ALVARO OLIVE;175;58381;1/1/2001 03:08:00;CIDADAO COMUM;S;CAA;MARIA VIRGINIA;BH;611835.32;802870.75;9
+11;2001000301;B06000;LESAO CORPORAL;RUA CONEGO TRIND;450;16861;1/1/2001 03:30:00;CIDADAO COMUM;S;B;JARDIM LEBLON;BH;605814.70;807064.01;10
+12;2001000319;B06000;LESAO CORPORAL;RUA PROFESSORA G;528;86335;1/1/2001 03:46:00;INICIATIVA;N;0;FLORAMAR;BH;611759.02;807690.27;11
+13;2001000363;B06000;LESAO CORPORAL;RUA CAMILO DE BR;636;11896;1/1/2001 04:28:00;CIDADAO COMUM;S;;PADRE EUSTAQUIO;BH;605855.99;798012.24;12
+14;2001000372;B03000;AMEACA;RUA JOSE DE FREI;100;99942;1/1/2001 04:36:00;CIDADAO COMUM;S;;PIRATININGA;BH;606412.42;809836.32;13
+15;2001000399;B04001;HOMICIDIO TENTAD;RUA GERALDO SILV;216;56588;1/1/2001 04:49:00;CIDADAO COMUM;N;LJA;RIO BRANCO;BH;606400.39;808660.43;14
+16;2001000422;B02000;RIXA;RUA JUREMA;553;39745;1/1/2001 05:08:00;CIDADAO COMUM;S;0;DA GRACA;BH;612108.35;799658.14;15
+17;2001000425;B04001;HOMICIDIO TENTAD;RUA CORONEL JOAQ;1202;87063;1/1/2001 05:13:00;CIDADAO COMUM;S;SL1408;CEU AZUL;BH;605036.32;808629.66;16
+18;2001000460;B04002;HOMICIDIO CONSUM;RUA ALFREDO ALVE;17;20636;1/1/2001 05:48:00;CIDADAO COMUM;S;;SAO JOAO BATISTA;BH;608766.99;807874.12;17
+19;2001000467;B06000;LESAO CORPORAL;AV SILVA LOBO;667;65889;1/1/2001 05:55:00;CIDADAO COMUM;S;AN2;NOVA SUISSA;BH;607649.22;796002.23;18
+20;2001000508;B04001;HOMICIDIO TENTAD;RUA ITAIPU;170;35439;1/1/2001 06:43:00;CIDADAO COMUM;N;0;VERA CRUZ;BH;616260.45;798259.34;19
+21;2001000512;B06000;LESAO CORPORAL;RUA JURAMENTO;191;39732;1/1/2001 06:45:00;CIDADAO COMUM;S;;PARAISO;BH;614799.88;797390.14;20
+22;2001000514;B06000;LESAO CORPORAL;RUA JULIO MESQUI;100;81849;1/1/2001 06:47:00;INICIATIVA;S;0;ITAIPU BH;BH;599095.68;788673.49;21
+23;2001000515;B04001;HOMICIDIO TENTAD;BECO ALEGRE;10;77047;1/1/2001 06:48:00;CIDADAO COMUM;S;;SALGADO FILHO;BH;606081.83;794476.42;22
+24;2001000548;B06000;LESAO CORPORAL;RUA ESPIRITO SAN;250;26052;1/1/2001 07:35:00;INICIATIVA;N;0;CENTRO (BH);BH;611330.13;797421.35;23
+25;2001000552;B06000;LESAO CORPORAL;RUA DIVINOPOLIS;253;21424;1/1/2001 07:40:00;CIDADAO COMUM;S;0;SANTA TEREZA;BH;613916.97;797543.46;24
+26;2001000662;B06000;LESAO CORPORAL;RUA ELISA DE CAR;38;9768;1/1/2001 09:40:00;CIDADAO COMUM;S;0;JARDIM ESTRELA;BH;607183.28;809980.10;25
+27;2001000713;B06000;LESAO CORPORAL;AV AUGUSTO DE LI;685;6731;1/1/2001 10:36:00;INICIATIVA;N;0;CENTRO (BH);BH;610740.67;796659.40;26
+28;2001000719;B06000;LESAO CORPORAL;RUA CASTELO BRAN;100;14030;1/1/2001 10:40:00;CIDADAO COMUM;S;CAA;SANTA TEREZINHA;BH;604419.23;802582.27;27
+29;2001000865;B03000;AMEACA;RUA CORONEL EUGE;64;48324;1/1/2001 13:25:00;CIDADAO COMUM;S;;SAO GABRIEL;BH;613368.05;804242.96;28
+30;2001000866;B06000;LESAO CORPORAL;RUA JOAIMA;35;37359;1/1/2001 13:25:00;CIDADAO COMUM;S;CAC;JARDIM LEBLON;BH;605654.36;808186.87;29
+31;2001000912;B03000;AMEACA;AV ABILIO MACHAD;47;634;1/1/2001 14:16:00;INICIATIVA;N;0;INCONFIDENCIA;BH;605263.41;797972.47;30
+32;2001000946;B06000;LESAO CORPORAL;AV NELIO CERQUEI;15;72359;1/1/2001 14:52:00;CIDADAO COMUM;S;;TIROL;BH;600947.66;789885.51;31
+33;2001000983;B06000;LESAO CORPORAL;RUA DIRCEU DUART;32;86902;1/1/2001 15:25:00;CIDADAO COMUM;S;;TREVO;BH;603501.37;806677.03;32
+34;2001001008;B04001;HOMICIDIO TENTAD;RUA FIRMINO DUAR;309;89879;1/1/2001 15:44:00;CIDADAO COMUM;N;CA;PALMEIRAS;BH;607146.75;791513.38;33
+35;2001001033;B04001;HOMICIDIO TENTAD;PRACA BAGATELLE;49;84720;1/1/2001 16:06:00;INICIATIVA;S;0;AEROPORTO DA PAM;BH;609324.75;804535.55;34
+36;2001001071;B03000;AMEACA;RUA ARISCO;50;74758;1/1/2001 16:40:00;CIDADAO COMUM;S;;JARDIM VITORIA;BH;616713.81;804674.58;35
+37;2001001073;B03000;AMEACA;RUA CORREAS;575;87091;1/1/2001 16:41:00;CIDADAO COMUM;N;;BELVEDERE;BH;612014.79;792467.39;36
+38;2001001100;B03000;AMEACA;RUA VIRTULINO PI;250;130438;1/1/2001 17:05:00;CIDADAO COMUM;N;;OLARIA;BH;602132.24;789116.66;37
+39;2001001122;B04002;HOMICIDIO CONSUM;RUA GUIMARAES;1046;62953;1/1/2001 17:18:00;INICIATIVA;N;0;SAO FRANCISCO;BH;608640.25;801619.48;38
+40;2001001192;B03000;AMEACA;RUA FELISBURGO;290;3950;1/1/2001 18:07:00;CIDADAO COMUM;S;LJB;PROVIDENCIA;BH;612659.95;804501.51;39
+41;2001001235;B04001;HOMICIDIO TENTAD;AV CRISTIANO MAC;6760;18652;1/1/2001 18:38:00;CIDADAO COMUM;N;TERREO;CELESTINO;BH;612122.58;803304.40;40
+42;2001001246;B03000;AMEACA;RUA PROFESSOR RO;245;30334;1/1/2001 18:47:00;CIDADAO COMUM;S;;SALGADO FILHO;BH;607159.88;793820.71;41
+43;2001001249;B04001;HOMICIDIO TENTAD;RUA HILO ESTEVAM;126;94721;1/1/2001 18:51:00;CIDADAO COMUM;N;CAA;CASTELO;BH;605544.85;799870.90;42
+44;2001001294;B02000;RIXA;RUA PORANGA;180;54702;1/1/2001 19:15:00;CIDADAO COMUM;N;CAN;IPANEMA;BH;604697.48;798156.89;43
+45;2001001329;B03000;AMEACA;RUA REDENCAO;151;6413;1/1/2001 19:35:00;CIDADAO COMUM;S;;SAO JOSE;BH;605190.15;798573.66;44
+46;2001001378;B04001;HOMICIDIO TENTAD;RUA AUGUSTO CALH;113;6671;1/1/2001 20:04:00;CIDADAO COMUM;N;;TUPI;BH;613374.04;806556.45;45
+47;2001001391;B06000;LESAO CORPORAL;RUA ITAJUBA;2146;35495;1/1/2001 20:13:00;CIDADAO COMUM;N;0;SAGRADA FAMILIA;BH;612389.93;799465.33;46
+48;2001001505;B06000;LESAO CORPORAL;AV DO CONTORNO;1700;17228;1/1/2001 21:34:00;CIDADAO COMUM;N;PX1700;CENTRO (BH);BH;612216.60;797607.77;47
+49;2001001539;B06000;LESAO CORPORAL;RUA PADRE PEDRO ;281;51657;1/1/2001 21:49:00;INICIATIVA;N;0;PIRATININGA;BH;605627.01;810002.31;48
+50;2001001585;B06000;LESAO CORPORAL;RUA DOS TAMOIOS;19;66825;1/1/2001 22:31:00;CIDADAO COMUM;S;;CENTRO (BH);BH;611310.59;796955.28;49
+51;2001001638;B06000;LESAO CORPORAL;RUA LENI AMARAL;10;75130;1/1/2001 23:10:00;CIDADAO COMUM;N;0;PARQUE NOVO PROG;CO;602712.79;800069.59;50
+52;2001001639;B03000;AMEACA;RUA SERINGUEIRA;39;90471;1/1/2001 23:10:00;CIDADAO COMUM;S;;PATROCINIO;BH;605322.15;794242.76;51
+53;2001001663;B03000;AMEACA;RUA SERRA DA MOE;61;120796;1/1/2001 23:28:00;CIDADAO COMUM;S;AP304;ANTONIO RIBEIRO ;BH;614923.14;807439.28;52
+54;2001001754;B03000;AMEACA;AV DOS CLARINS;220;118337;2/1/2001 00:47:00;CIDADAO COMUM;S;0;CH CALIFORNIA;BH;604029.04;796740.78;53
+55;2001002036;B03000;AMEACA;RUA BEIRA LINHA;224;121732;2/1/2001 09:04:00;CIDADAO COMUM;S;;ANTONIO RIBEIRO ;BH;615460.33;805397.29;54
+56;2001002178;B03000;AMEACA;RUA JULITA NOGUE;425;39597;2/1/2001 11:11:00;CIDADAO COMUM;N;FU;SARANDI (URCA/BH;BH;603736.32;802490.17;55
+57;2001002183;B03000;AMEACA;RUA PITT;231;54380;2/1/2001 11:14:00;CIDADAO COMUM;S;;UNIAO;BH;612654.99;801102.30;56
+58;2001002285;B03000;AMEACA;AV SEN LEVINDO C;1891;14866;2/1/2001 12:34:00;INICIATIVA;N;0;SANTA CECILIA;BH;600974.57;787879.14;57
+59;2001002303;B06000;LESAO CORPORAL;RUA CAMBUQUIRA;111;11830;2/1/2001 12:53:00;CIDADAO COMUM;N;;CARLOS PRATES;BH;609340.52;798017.72;58
+60;2001002364;B06000;LESAO CORPORAL;AV BIAS FORTES;1772;9553;2/1/2001 13:51:00;CIDADAO COMUM;N;;BARRO PRETO;BH;610196.72;797244.85;59
+61;2001002489;B04001;HOMICIDIO TENTAD;RUA NEFELINA;14;81228;2/1/2001 15:27:00;CIDADAO COMUM;S;;SANTA TEREZA;BH;612774.85;797219.81;60
+62;2001002662;B05000;SEQUESTRO E CARC;RUA ITARANA;39;35946;2/1/2001 17:19:00;CIDADAO COMUM;S;CSC;CAICARA;BH;607841.94;799963.57;61
+63;2001002694;B06000;LESAO CORPORAL;RUA MARECHAL RON;202;43677;2/1/2001 17:35:00;CIDADAO COMUM;S;;PRIMEIRO DE MAIO;BH;611946.85;803377.88;62
+64;2001002795;B03000;AMEACA;RUA TANCREDO EST;106;66838;2/1/2001 18:40:00;INICIATIVA;S;0;SAO TOMAZ;BH;609723.18;805275.89;63
+65;2001002805;B03000;AMEACA;RUA MONTEIRO LOB;37;46590;2/1/2001 18:43:00;CIDADAO COMUM;S;;PROFESSOR WASHIN;IB;598805.74;789334.93;64
+66;2001002849;B03000;AMEACA;RUA JOAQUIM GOUV;565;1422;2/1/2001 18:57:00;POLICIAL MILITAR;S;0;SAO PAULO;BH;612537.01;803135.61;65
+67;2001002884;B03000;AMEACA;RUA ESTER DE LIM;288;26301;2/1/2001 19:10:00;CIDADAO COMUM;N;;SAO JOAO BATISTA;BH;611011.80;801489.74;66
+68;2001002908;B03000;AMEACA;RUA FERNAO DIAS;1022;28133;2/1/2001 19:20:00;CIDADAO COMUM;S;0;VERA CRUZ;BH;616049.67;798294.87;67
+69;2001002924;B06000;LESAO CORPORAL;RUA DOS VIOLONCE;410;125948;2/1/2001 19:26:00;CIDADAO COMUM;S;0;CH CALIFORNIA;BH;604013.72;797224.38;68
+70;2001002977;B03000;AMEACA;RUA MELCHIOR DIA;14;99577;2/1/2001 20:02:00;CIDADAO COMUM;N;;VERA CRUZ;BH;616662.42;797200.41;69
+71;2001002991;B03000;AMEACA;RUA PADRE EUSTAQ;1284;51294;2/1/2001 20:10:00;CIDADAO COMUM;S;;CARLOS PRATES;BH;608346.53;797943.62;70
+72;2001003016;B03000;AMEACA;RUA SOARES NOGUE;52;66220;2/1/2001 20:23:00;CIDADAO COMUM;S;;VILA MAGNESITA;BH;602129.61;794910.94;71
+73;2001003022;B03000;AMEACA;RUA CARNEIRO DE ;94;127348;2/1/2001 20:26:00;CIDADAO COMUM;N;0;SAO PAULO;BH;612957.95;802850.74;72
+74;2001003052;B03000;AMEACA;RUA ITAPERUNA;130;35785;2/1/2001 20:46:00;INICIATIVA;S;0;SAUDADE;BH;614979.57;797450.46;73
+75;2001003054;B06000;LESAO CORPORAL;RUA JOSE GOMES;371;38802;2/1/2001 20:48:00;CIDADAO COMUM;N;;SARANDI (URCA/BH;BH;603642.20;802295.14;74
+76;2001003088;B04001;HOMICIDIO TENTAD;AV BARAO HOMEM D;510;7936;2/1/2001 21:08:00;CIDADAO COMUM;S;FR449;NOVA SUISSA;BH;607529.85;795029.50;75
+77;2001003128;B04001;HOMICIDIO TENTAD;RUA DOIS;36;27130;2/1/2001 21:24:00;CIDADAO COMUM;S;0;PAULO VI;BH;616592.76;806783.71;76
+78;2001003160;B03000;AMEACA;AV DOM PEDRO II;3545;53145;2/1/2001 21:47:00;CIDADAO COMUM;N;0;ADELAIDE;BH;607409.82;797890.53;77
+79;2001003185;B03000;AMEACA;RUA GENTIOS;1350;30983;2/1/2001 22:03:00;CIDADAO COMUM;S;0;CORACAO DE JESUS;BH;608905.13;793585.28;78
+80;2001003196;B04001;HOMICIDIO TENTAD;RUA LEONCIO CHAG;236;40700;2/1/2001 22:06:00;CIDADAO COMUM;N;;UNIAO;BH;613064.02;800949.19;79
+81;2001003322;B03000;AMEACA;RUA PRINCESA IZA;45;23420;2/1/2001 23:28:00;CIDADAO COMUM;S;0;CASTANHEIRAS (TA;BH;617682.03;797457.97;80
+82;2001003354;B03000;AMEACA;AV CLARA NUNES;306;45644;2/1/2001 23:54:00;CIDADAO COMUM;S;0;RENASCENCA;BH;611039.95;800586.09;81
+83;2001003374;B03000;AMEACA;AV JOSE CANDIDO ;1190;12602;3/1/2001 00:11:00;INICIATIVA;N;0;UNIAO;BH;613277.34;800584.46;82
+84;2001003377;B06000;LESAO CORPORAL;RUA 1;11;27156;3/1/2001 00:16:00;CIDADAO COMUM;N;0;PAULO SEXTO;BH;616440.05;806805.03;83
+85;2001003421;B06000;LESAO CORPORAL;RUA MARIA ROSA D;839;107800;3/1/2001 01:09:00;CIDADAO COMUM;S;;MANTIQUEIRA;BH;606529.17;811742.51;84
+86;2001003422;B03000;AMEACA;RUA CONCEICAO DO;1280;68253;3/1/2001 01:11:00;CIDADAO COMUM;S;0;SANTA INES;BH;613887.33;801220.49;85
+87;2001003433;B08000;VIOLACAO DE DOMI;RUA DO PROGRESSO;50;25311;3/1/2001 01:29:00;CIDADAO COMUM;N;;TAQUARIL;BH;616998.11;797400.70;86
+88;2001003450;B04001;HOMICIDIO TENTAD;AV PRESIDENTE AN;1240;4461;3/1/2001 01:55:00;CIDADAO COMUM;N;;SAO CRISTOVAO;BH;610402.72;799177.41;87
+89;2001003489;B03000;AMEACA;RUA MARIA GERTRU;808;98993;3/1/2001 03:25:00;CIDADAO COMUM;S;;CEU AZUL;BH;604484.86;808826.28;88
+90;2001003554;B03000;AMEACA;AV CRISTIANO MAC;4000;18652;3/1/2001 05:23:00;INICIATIVA;N;0;DOS PALMARES;BH;612434.91;802092.92;89
+91;2001003563;B06000;LESAO CORPORAL;AV PAES DE ABREU;205;51758;3/1/2001 05:45:00;CIDADAO COMUM;S;0;ERMELINDA;BH;608960.89;800469.77;90
+92;2001003618;B03000;AMEACA;RUA EDSON;525;25050;3/1/2001 07:32:00;CIDADAO COMUM;S;0;UNIAO;BH;612997.48;801565.94;91
+93;2001003778;B03000;AMEACA;RUA JAGUARI;139;36807;3/1/2001 10:09:00;CIDADAO COMUM;N;;BONFIM;BH;609648.11;797805.24;92
+94;2001003868;B03000;AMEACA;AV AUGUSTO DE LI;134;6731;3/1/2001 11:36:00;CIDADAO COMUM;S;SJ;CENTRO (BH);BH;611209.44;796588.30;93
+95;2001004071;B06000;LESAO CORPORAL;RUA CAMILO DE BR;636;11896;3/1/2001 14:06:00;CIDADAO COMUM;S;0;PADRE EUSTAQUIO;BH;605855.99;798012.24;94
+96;2001004348;B06000;LESAO CORPORAL;RUA ARANTINA;134;58697;3/1/2001 16:59:00;CIDADAO COMUM;S;0;MINASLANDIA;BH;612191.42;804524.92;95
+97;2001004358;B03000;AMEACA;RUA JORNALISTA O;157;53057;3/1/2001 17:05:00;CIDADAO COMUM;S;0;EYMARD;BH;613530.40;803630.21;96
+98;2001004388;B06000;LESAO CORPORAL;AV CIVILIZACAO;655;51657;3/1/2001 17:20:00;POLICIAL MILITAR;S;0;LEBLON;BH;605180.09;810022.74;97
+99;2001004423;B04001;HOMICIDIO TENTAD;RUA SAO PAULO;279;63464;3/1/2001 17:40:00;CIDADAO COMUM;S;0;CENTRO BH;BH;611088.02;797493.26;98
+100;2001004516;B06000;LESAO CORPORAL;RUA MARTIM DE CA;723;44944;3/1/2001 18:36:00;INICIATIVA;S;0;SANTO AGOSTINHO;BH;609264.88;796048.94;99
+101;2001004539;B03000;AMEACA;RUA RAINHA DAS F;185;92159;3/1/2001 18:50:00;CIDADAO COMUM;S;0;FILADELFIA;BH;602133.38;797481.77;100
+102;2001004579;B03000;AMEACA;RUA FALCAO;200;27749;3/1/2001 19:08:00;CIDADAO COMUM;S;;FLAVIO MARQUES D;BH;604919.00;788611.78;101
+103;2001004584;B06000;LESAO CORPORAL;AV EUGENIO RICAL;440;111568;3/1/2001 19:08:00;CIDADAO COMUM;S;;CORACAO EUCARIST;BH;605706.92;796121.88;102
+104;2001004611;B03000;AMEACA;AV SERRANA;530;65040;3/1/2001 19:27:00;CIDADAO COMUM;N;0;SERRANO;BH;603547.03;801432.44;103
+105;2001004672;B03000;AMEACA;RUA DOUTOR BENED;155;12252;3/1/2001 20:01:00;CIDADAO COMUM;S;;AARAO REIS;BH;612381.24;803451.51;104
+106;2001004728;B03000;AMEACA;AV CARANDAI;200;13081;3/1/2001 20:38:00;INICIATIVA;N;0;FUNCIONARIOS;BH;612639.37;796065.46;105
+107;2001004771;B03000;AMEACA;RUA POLONIA;816;54541;3/1/2001 21:02:00;CIDADAO COMUM;S;;JARDIM LEBLON;BH;605588.31;807537.18;106
+108;2001004858;B06000;LESAO CORPORAL;RUA DOUTOR CRIST;5655;55598;3/1/2001 21:53:00;CIDADAO COMUM;S;0;BONSUCESSO;BH;606433.34;793314.02;107
+109;2001004861;B06000;LESAO CORPORAL;RUA RIO DAS FLOR;170;92770;3/1/2001 21:54:00;CIDADAO COMUM;S;;PILAR;BH;607837.36;788169.94;108
+110;2001005031;B06000;LESAO CORPORAL;ESTRADA DO CERCA;2265;26428;3/1/2001 23:49:00;CIDADAO COMUM;N;0;SAO DOMINGOS;BH;607618.88;793402.60;109
+111;2001005081;B06000;LESAO CORPORAL;RUA BAURU;270;8510;4/1/2001 00:19:00;CIDADAO COMUM;S;BL/08 CASA 65;PIRATININGA;BH;605644.06;809035.86;110
+112;2001005100;B06000;LESAO CORPORAL;RUA MARCIA WINDS;97;21478;4/1/2001 00:39:00;CIDADAO COMUM;N;;MINEIRAO;BH;601682.50;785249.63;111
+113;2001005192;B04001;HOMICIDIO TENTAD;RUA MUNIZ;149;170850;4/1/2001 01:53:00;CIDADAO COMUM;S;0;MORRO DAS PEDRAS;BH;608113.39;793880.88;112
+114;2001005207;B03000;AMEACA;RUA CELIO DE CAS;185;14507;4/1/2001 02:13:00;CIDADAO COMUM;S;0;FLORESTA;BH;611275.26;797940.88;113
+115;2001005237;B06000;LESAO CORPORAL;AV OLEGARIO MACI;642;49699;4/1/2001 02:44:00;CIDADAO COMUM;N;EM FRENTE AO HOT;CENTRO (BH);BH;610498.04;797083.99;114
+116;2001005292;B02000;RIXA;AV AMAZONAS;4601;3140;4/1/2001 04:03:00;CIDADAO COMUM;N;;NOVA SUISSA;BH;607279.09;796018.67;115
+117;2001005297;B02000;RIXA;RUA DOS CAETES;372;11376;4/1/2001 04:11:00;CIDADAO COMUM;N;0;CENTRO (BH);BH;611253.80;797440.40;116
+118;2001005456;B03000;AMEACA;RUA JUSSARA;30;39859;4/1/2001 08:26:00;CIDADAO COMUM;S;AP101;DA GRACA;BH;611788.28;799174.80;117
+119;2001005492;B04001;HOMICIDIO TENTAD;RUA CAMILO DE BR;636;11896;4/1/2001 09:00:00;CIDADAO COMUM;S;;PADRE EUSTAQUIO;BH;605855.99;798012.24;118
+120;2001005708;B03000;AMEACA;RUA CARLOS PINTO;176;107220;4/1/2001 11:26:00;CIDADAO COMUM;S;0;CH JATOBA IV;BH;600744.25;787612.36;119
+121;2001005758;B03000;AMEACA;RUA MUNIZ;100;170850;4/1/2001 12:15:00;CIDADAO COMUM;S;0;MORRO DAS PEDRAS;BH;608081.16;793922.64;120
+122;2001005759;B03000;AMEACA;RUA QUARENTA E D;46;34830;4/1/2001 12:16:00;CIDADAO COMUM;N;CSC;CONJUNTO FELICID;BH;612592.89;807203.40;121
+123;2001005783;B03000;AMEACA;RUA JOAQUIM HENR;58;94371;4/1/2001 12:49:00;CIDADAO COMUM;S;CAZZ;OURO PRETO;BH;606222.37;801428.56;122
+124;2001005786;B03000;AMEACA;RUA ADOLFO LIPPI;140;114377;4/1/2001 12:50:00;CIDADAO COMUM;N;0;GARCAS;BH;604210.15;806428.13;123
+125;2001005875;B04002;HOMICIDIO CONSUM;RUA SOCRATES;24;85953;4/1/2001 13:58:00;CIDADAO COMUM;N;;DOM SILVERIO;BH;615325.98;804426.93;124
+126;2001006054;B03000;AMEACA;AV SILVA LOBO;1349;65889;4/1/2001 16:06:00;CIDADAO COMUM;S;PX1339;NOVA SUISSA;BH;607796.39;795312.06;125
+127;2001006300;B03000;AMEACA;RUA DOM RAFAEL;5;23026;4/1/2001 18:12:00;CIDADAO COMUM;S;;TAQUARIL;BH;617052.78;797306.19;126
+128;2001006317;B03000;AMEACA;RUA ELANEY;75;106517;4/1/2001 18:25:00;INICIATIVA;S;0;NOVA YORK;BH;608476.48;810630.48;127
+129;2001006394;B06000;LESAO CORPORAL;RUA JOSE BITES P;125;9263;4/1/2001 19:02:00;INICIATIVA;S;0;PLANALTO;BH;609866.26;807083.02;128
+130;2001006444;B03000;AMEACA;RUA PADRE PETROL;435;53577;4/1/2001 19:30:00;CIDADAO COMUM;S;0;SAGRADA FAMILIA;BH;613153.17;798892.77;129
+131;2001006458;B06000;LESAO CORPORAL;RUA MARIANA BARC;271;62994;4/1/2001 19:35:00;CIDADAO COMUM;S;0;APARECIDA SETIMA;BH;608942.35;800261.12;130
+132;2001006483;B06000;LESAO CORPORAL;BECO SOL NASCENT;146;301434;4/1/2001 19:47:00;CIDADAO COMUM;S;PX135;CAFEZAL;BH;614453.31;795387.14;131
+133;2001006531;B06000;LESAO CORPORAL;AV JOAQUIM DE OL;100;91852;4/1/2001 20:14:00;CIDADAO COMUM;S;;DAS INDUSTRIAS;BH;605302.61;791288.17;132
+134;2001006561;B03000;AMEACA;RUA DOS TUPIS;560;69965;4/1/2001 20:30:00;INICIATIVA;N;0;CENTRO BH;BH;610743.92;796999.61;133
+135;2001006607;B04001;HOMICIDIO TENTAD;RUA DA PAZ;45;31236;4/1/2001 20:55:00;CIDADAO COMUM;N;0;CONJ HAB JARDIM ;BH;603918.54;798119.82;134
+136;2001006617;B03000;AMEACA;BECO PRINCIPAL;55;301983;4/1/2001 21:00:00;CIDADAO COMUM;S;0;SAO JOSE;BH;604808.72;799278.97;135
+137;2001006646;B03000;AMEACA;RUA DOS APIACAS;311;5032;4/1/2001 21:18:00;CIDADAO COMUM;S;;GLORIA;BH;602801.44;797853.30;136
+138;2001006695;B03000;AMEACA;RUA PADRE FEIJO;25;51326;4/1/2001 21:45:00;CIDADAO COMUM;N;0;SAUDADE;BH;614908.34;797473.24;137
+139;2001006713;B03000;AMEACA;RUA CIPRIANO DE ;65;15856;4/1/2001 21:53:00;CIDADAO COMUM;N;CS17;CINQUENTENARIO;BH;606432.80;793433.46;138
+140;2001006756;B04001;HOMICIDIO TENTAD;AV CRISTIANO MAC;5393;18652;4/1/2001 22:14:00;INICIATIVA;N;0;DOS PALMARES;BH;612255.77;802179.75;139
+141;2001006798;B06000;LESAO CORPORAL;RUA CASTANHOLAS;10;100508;4/1/2001 22:46:00;CIDADAO COMUM;S;;MADRID;BH;611241.05;808632.80;140
+142;2001006824;B03000;AMEACA;RUA CACATUA;422;11219;4/1/2001 23:00:00;CIDADAO COMUM;S;;FLAVIO MARQUES D;BH;604646.79;788784.90;141
+143;2001006941;B04002;HOMICIDIO CONSUM;RUA ANTARES;160;4244;5/1/2001 00:09:00;INICIATIVA;N;0;SANTA LUCIA;BH;610301.90;793066.15;142
+144;2001006955;B03000;AMEACA;AV CORONEL DURVA;25;17688;5/1/2001 00:15:00;INICIATIVA;N;0;DURVAL DE BARROS;BH;598751.16;791078.18;143
+145;2001007010;B03000;AMEACA;AV SILVA LOBO;883;65889;5/1/2001 00:58:00;INICIATIVA;S;0;NOVA SUISSA;BH;607689.30;795757.86;144
+146;2001007408;B06000;LESAO CORPORAL;AV DO CONTORNO;2660;17228;5/1/2001 09:03:00;CIDADAO COMUM;N;LJ4;CENTRO (BH);BH;612719.50;796848.35;145
+147;2001007413;B03000;AMEACA;RUA FLOR DE MAIO;101;300399;5/1/2001 09:08:00;CIDADAO COMUM;S;;VILA CAFEZAL;BH;614412.83;794669.54;146
+148;2001007558;B03000;AMEACA;RUA JOANA ANGELI;975;37374;5/1/2001 10:47:00;CIDADAO COMUM;S;;MINASLANDIA;BH;612135.77;804101.78;147
+149;2001007565;B03000;AMEACA;RUA JOSE PINTO D;20;100901;5/1/2001 10:49:00;CIDADAO COMUM;S;0;JARDIM GUANABARA;BH;611479.65;807085.75;148
+150;2001007622;B03000;AMEACA;RUA MARECHAL BIT;476;43589;5/1/2001 11:36:00;CIDADAO COMUM;S;AP04;GUTIERREZ;BH;608965.94;795104.99;149
+151;2001007678;B03000;AMEACA;RUA MAESTRO JOSE;40;80760;5/1/2001 12:12:00;CIDADAO COMUM;S;AP602;NOVA SUISSA;BH;606643.01;795091.48;150
+152;2001007766;B03000;AMEACA;RUA OITO;35;117287;5/1/2001 13:10:00;CIDADAO COMUM;N;;LINDEIA;BH;600021.70;790389.81;151
+153;2001007775;B06000;LESAO CORPORAL;RUA DOS TUPIS;1253;69965;5/1/2001 13:16:00;CIDADAO COMUM;S;LJC;BARRO PRETO;BH;610089.19;797131.58;152
+154;2001007794;B03000;AMEACA;RUA MANNESMANN;250;42936;5/1/2001 13:26:00;CIDADAO COMUM;S;0;MILIONARIOS;BH;604801.53;790717.02;153
+155;2001007856;B06000;LESAO CORPORAL;AV BRASIL;1124;10420;5/1/2001 14:03:00;CIDADAO COMUM;N;;FUNCIONARIOS;BH;612027.86;796111.45;154
+156;2001007936;B03000;AMEACA;PRACA ESTEVAO LU;23;26314;5/1/2001 14:58:00;CIDADAO COMUM;N;LJ7;HORTO;BH;613259.16;797963.43;155
+157;2001007938;B03000;AMEACA;RUA JOSE SANTIAG;240;39152;5/1/2001 15:00:00;CIDADAO COMUM;N;CAFR;PIRAJA;BH;613860.40;803263.57;156
+158;2001007945;B03000;AMEACA;RUA SAGARANA;90;59848;5/1/2001 15:01:00;CIDADAO COMUM;S;0;SANTO ANTONIO;BH;610964.40;794592.76;157
+159;2001007961;B06000;LESAO CORPORAL;RUA ENGENHEIRO R;5;94214;5/1/2001 15:14:00;CIDADAO COMUM;N;CAFRENT;CARDOSO;BH;603229.05;788522.32;158
+160;2001008303;B06000;LESAO CORPORAL;RUA CURITIBA;495;19090;5/1/2001 18:13:00;CIDADAO COMUM;N;;CENTRO (BH);BH;610917.19;797386.71;159
+161;2001008430;B03000;AMEACA;AV VISCONDE DE I;20;73289;5/1/2001 19:29:00;INICIATIVA;S;;BARREIRO;BH;602935.35;791287.83;160
+162;2001008451;B03000;AMEACA;RUA ALTINA DE AL;60;15351;5/1/2001 19:43:00;CIDADAO COMUM;S;L;MANTIQUEIRA;BH;607039.64;810032.05;161
+163;2001008533;B03000;AMEACA;RUA CARLOS PINTO;230;107220;5/1/2001 20:29:00;CIDADAO COMUM;N;;CH JATOBA IV;BH;600731.30;787610.33;162
+164;2001008539;B06000;LESAO CORPORAL;RUA ARTUR DE CAS;307;125428;5/1/2001 20:33:00;CIDADAO COMUM;N;;BELMONT;BH;615672.42;805539.35;163
+165;2001008620;B04001;HOMICIDIO TENTAD;RUA ITORORO;584;36154;5/1/2001 21:07:00;CIDADAO COMUM;S;AP101;PADRE EUSTAQUIO;BH;607305.95;797432.52;164
+166;2001008687;B04001;HOMICIDIO TENTAD;RUA MIGUEL PINTO;1473;128757;5/1/2001 21:52:00;CIDADAO COMUM;S;FR;NOVA ESPERANCA;BH;609007.48;799307.70;165
+167;2001008711;B03000;AMEACA;AV DO CONTORNO;2107;17228;5/1/2001 22:03:00;CIDADAO COMUM;S;FR;CENTRO (BH);BH;612416.86;797360.21;166
+168;2001008724;B03000;AMEACA;RUA HORTO;60;25973;5/1/2001 22:10:00;CIDADAO COMUM;S;0;TAQUARIL;BH;617020.54;797738.78;167
+169;2001008756;B04001;HOMICIDIO TENTAD;AV ESPLANADA;199;126244;5/1/2001 22:28:00;CIDADAO COMUM;N;;SAO GABRIEL;BH;613212.38;804445.02;168
+170;2001008827;B04001;HOMICIDIO TENTAD;RUA CARLOS ETIEN;13;13356;5/1/2001 23:13:00;CIDADAO COMUM;S;0;SERRA;BH;613992.00;794863.88;169
+171;2001008940;B04001;HOMICIDIO TENTAD;RUA PEDRA CORAL;54;114005;6/1/2001 00:09:00;CIDADAO COMUM;N;0;PIRATININGA;BH;606451.75;808885.02;170
+172;2001008963;B03000;AMEACA;RUA MONTES CLARO;189;46650;6/1/2001 00:21:00;CIDADAO COMUM;S;0;CARMO;BH;611641.54;794467.80;171
+173;2001009004;B04001;HOMICIDIO TENTAD;RUA TEOFILO PIRE;117;67465;6/1/2001 00:48:00;CIDADAO COMUM;S;CSA;BOA VISTA;BH;615282.49;800096.43;172
+174;2001009074;B06000;LESAO CORPORAL;AV AMAZONAS;641;3140;6/1/2001 01:37:00;INICIATIVA;N;0;CENTRO BH;BH;610925.18;797013.32;173
+175;2001009120;B06000;LESAO CORPORAL;PRACA RAUL SOARE;28;58010;6/1/2001 02:07:00;CIDADAO COMUM;N;;LOURDES;BH;610531.41;796704.90;174
+176;2001009139;B06000;LESAO CORPORAL;AV AUGUSTO DE LI;1454;6731;6/1/2001 02:20:00;CIDADAO COMUM;N;PX1454;BARRO PRETO;BH;609927.60;796926.67;175
+177;2001009238;B06000;LESAO CORPORAL;RUA FRANCISCO VE;90;29703;6/1/2001 03:39:00;INICIATIVA;N;0;TUPI;BH;612776.15;806731.54;176
+178;2001009242;B06000;LESAO CORPORAL;RUA PIUM I;1233;54393;6/1/2001 03:42:00;CIDADAO COMUM;N;AP12;SION;BH;611952.65;793761.39;177
+179;2001009326;B06000;LESAO CORPORAL;RUA JOAO DE PAUL;589;63032;6/1/2001 04:46:00;CIDADAO COMUM;S;0;SAGRADA FAMILIA;BH;613318.42;799419.50;178
+180;2001009327;B04001;HOMICIDIO TENTAD;RUA JAGUARAO;286;36790;6/1/2001 04:47:00;CIDADAO COMUM;S;CAFU;BONFIM;BH;610034.79;798147.70;179
+181;2001009450;B06000;LESAO CORPORAL;RUA OTAVIANO PEN;545;128454;6/1/2001 07:23:00;CIDADAO COMUM;N;0;SERRA VERDE;BH;609655.77;810567.19;180
+182;2001009557;B06000;LESAO CORPORAL;RUA B;107;47637;6/1/2001 09:00:00;CIDADAO COMUM;N;;VILA CASTANHEIRA;BH;601135.26;788571.24;181
+183;2001009572;B03000;AMEACA;RUA DES BRAULIO;2070;19917;6/1/2001 09:13:00;CIDADAO COMUM;N;;VERA CRUZ;BH;616352.52;797404.60;182
+184;2001009598;B06000;LESAO CORPORAL;RUA RAIMUNDO TIN;163;301229;6/1/2001 09:27:00;INICIATIVA;S;0;MORRO DO PAPAGAI;BH;610693.03;793106.49;183
+185;2001009667;B03000;AMEACA;RUA MARIA VIRGIN;20;24693;6/1/2001 10:29:00;CIDADAO COMUM;S;0;TAQUARIL;BH;617298.30;797352.94;184
+186;2001009674;B06000;LESAO CORPORAL;AV DO CONTORNO;10555;17228;6/1/2001 10:34:00;CIDADAO COMUM;S;;BARRO PRETO;BH;609494.49;797370.90;185
+187;2001009717;B06000;LESAO CORPORAL;RUA JOAQUIM HENR;145;94371;6/1/2001 11:05:00;CIDADAO COMUM;N;0;OURO PRETO;BH;606357.63;801486.70;186
+188;2001009805;B03000;AMEACA;RUA DOS CAETES;515;11376;6/1/2001 12:25:00;CIDADAO COMUM;S;0;CENTRO (BH);BH;611105.83;797439.64;187
+189;2001009808;B04001;HOMICIDIO TENTAD;AV ELISIO DE BRI;789;25251;6/1/2001 12:26:00;CIDADAO COMUM;N;LJC;BOA VISTA;BH;615152.32;799844.87;188
+190;2001009814;B03000;AMEACA;RUA ZURICK;1122;74092;6/1/2001 12:30:00;POLICIAL MILITAR;S;0;NOVA SUISSA;BH;606773.32;795411.41;189
+191;2001009817;B03000;AMEACA;RUA HOFFMAN;83;33320;6/1/2001 12:33:00;CIDADAO COMUM;N;;SANTA CRUZ (BARR;BH;603763.82;789406.87;190
+192;2001009868;B03000;AMEACA;RODOVIA MGT 262;298;26598;6/1/2001 13:11:00;CIDADAO COMUM;S;0;VILA BRASILIA;BH;614655.94;803592.58;191
+193;2001009873;B03000;AMEACA;AV SANTA TEREZIN;705;61415;6/1/2001 13:16:00;CIDADAO COMUM;S;;SANTA TEREZINHA;BH;604567.76;802538.51;192
+194;2001009880;B06000;LESAO CORPORAL;RUA BASE;45;23836;6/1/2001 13:24:00;CIDADAO COMUM;S;;CARDOSO;BH;602968.44;788548.82;193
+195;2001009882;B03000;AMEACA;RUA JOSE SANTIAG;240;39152;6/1/2001 13:23:00;CIDADAO COMUM;N;0;PIRAJA;BH;613860.40;803263.57;194
+196;2001009914;B03000;AMEACA;RUA RUBENS FERRE;120;16339;6/1/2001 13:49:00;CIDADAO COMUM;N;;SAO SALVADOR;BH;602807.32;798925.23;195
+197;2001009935;B03000;AMEACA;RUA DEMETRIO RIB;361;19797;6/1/2001 14:02:00;CIDADAO COMUM;S;0;VERA CRUZ;BH;615665.70;798276.22;196
+198;2001009954;B06000;LESAO CORPORAL;RUA OSCAR LOBO P;270;104480;6/1/2001 14:23:00;CIDADAO COMUM;S;0;PRIMEIRO DE MAIO;BH;612347.11;803516.89;197
+199;2001010004;B03000;AMEACA;RUA DOS TIMBIRAS;2636;67682;6/1/2001 15:16:00;INICIATIVA;N;0;SANTO AGOSTINHO;BH;610194.40;796558.80;198
+200;2001010019;B06000;LESAO CORPORAL;RUA LEO MARENTE;95;94807;6/1/2001 15:22:00;CIDADAO COMUM;N;FU;JARDIM MONTANHES;BH;606344.73;799379.58;199
+201;2001010081;B06000;LESAO CORPORAL;AV SANTOS DUMONT;629;61950;6/1/2001 16:08:00;CIDADAO COMUM;S;;CENTRO (BH);BH;611010.46;797549.36;200
+202;2001010097;B03000;AMEACA;RUA DO SERMAO;55;64990;6/1/2001 16:21:00;CIDADAO COMUM;S;A;SAO JOSE;BH;605696.31;798909.45;201
+203;2001010101;B03000;AMEACA;AV OTACILIO NEGR;640;50566;6/1/2001 16:21:00;INICIATIVA;S;0;JARDIM ATLANTICO;BH;607915.61;804275.70;202
+204;2001010121;B03000;AMEACA;AV PRESIDENTE AN;1880;4461;6/1/2001 16:34:00;INICIATIVA;S;0;SAO CRISTOVAO;BH;610064.06;799761.80;203
+205;2001010140;B03000;AMEACA;RUA EXPEDITO FLA;41;84847;6/1/2001 16:47:00;CIDADAO COMUM;S;0;DA LAGOA;BH;604809.35;809054.13;204
+206;2001010156;B03000;AMEACA;ESTRADA DO CERCA;1657;26428;6/1/2001 17:05:00;CIDADAO COMUM;N;0;JARDIM AMERICA;BH;607402.86;793956.59;205
+207;2001010201;B06000;LESAO CORPORAL;AV DOS ANDRADAS;560;3761;6/1/2001 17:31:00;INICIATIVA;N;0;CENTRO BH;BH;611447.51;797112.93;206
+208;2001010224;B03000;AMEACA;RUA VIANA DO CAS;65;63640;6/1/2001 17:42:00;CIDADAO COMUM;N;0;SAO FRANCISCO;BH;609912.68;802193.15;207
+209;2001010238;B06000;LESAO CORPORAL;RUA DOM PEDRITO;144;51300;6/1/2001 17:53:00;CIDADAO COMUM;N;;NOVA VISTA;BH;614736.17;800536.88;208
+210;2001010239;B06000;LESAO CORPORAL;RUA PERNAMBUCO;835;53463;6/1/2001 17:54:00;CIDADAO COMUM;S;;FUNCIONARIOS;BH;611560.86;795440.65;209
+211;2001010252;B02000;RIXA;RUA MIOSOTIS;180;45859;6/1/2001 18:04:00;CIDADAO COMUM;S;0;SANTO ANDRE;BH;608901.95;798729.73;210
+212;2001010253;B03000;AMEACA;RUA JOVINO RODRI;244;85083;6/1/2001 18:06:00;CIDADAO COMUM;S;FR945;MANTIQUEIRA;BH;606548.35;810771.26;211
+213;2001010268;B03000;AMEACA;RUA MACHADO DE A;53;42214;6/1/2001 18:14:00;CIDADAO COMUM;S;0;LAGOINHA;BH;610245.43;798573.73;212
+214;2001010415;B06000;LESAO CORPORAL;AV CRISTIANO MAC;5550;18652;6/1/2001 19:24:00;INICIATIVA;S;0;DOS PALMARES;BH;612348.26;802981.49;213
+215;2001010433;B06000;LESAO CORPORAL;RUA ITA;18;86593;6/1/2001 19:32:00;CIDADAO COMUM;N;;VERA CRUZ;BH;616400.79;797361.07;214
+216;2001010448;B03000;AMEACA;RUA HEITOR A MON;233;119862;6/1/2001 19:38:00;INICIATIVA;S;;SERRA VERDE;BH;609591.23;811073.16;215
+217;2001010450;B04001;HOMICIDIO TENTAD;RUA CONCHAS;129;80178;6/1/2001 19:40:00;CIDADAO COMUM;N;CAB;COQUEIROS;BH;602679.62;799734.06;216
+218;2001010452;B03000;AMEACA;RUA GENERAL OZOR;930;30901;6/1/2001 19:41:00;CIDADAO COMUM;S;0;VERA CRUZ;BH;615902.29;797976.19;217
+219;2001010503;B02000;RIXA;RUA SANHARO;146;82044;6/1/2001 20:08:00;CIDADAO COMUM;S;CA3;SAO GABRIEL;BH;614094.42;804833.97;218
+220;2001010505;B06000;LESAO CORPORAL;AV DO CONTORNO;1822;17228;6/1/2001 20:09:00;CIDADAO COMUM;N;;FLORESTA;BH;612276.36;797514.41;219
+221;2001010543;B06000;LESAO CORPORAL;RUA DENES;11;31150;6/1/2001 20:35:00;CIDADAO COMUM;N;CJ2;CONJ HAB JARDIM ;BH;603875.61;798234.43;220
+222;2001010552;B03000;AMEACA;RUA COPEIA;824;17269;6/1/2001 20:39:00;CIDADAO COMUM;S;;SAO GERALDO;BH;615664.60;799735.84;221
+223;2001010559;B06000;LESAO CORPORAL;RUA ANDIROBA;238;99882;6/1/2001 20:44:00;CIDADAO COMUM;N;;VILA SANTA BRANC;BH;604861.58;810000.41;222
+224;2001010650;B03000;AMEACA;RUA RAMIRO SIQUE;180;128858;6/1/2001 21:22:00;CIDADAO COMUM;S;;CASTANHEIRAS (TA;BH;617752.43;797349.60;223
+225;2001010723;B04001;HOMICIDIO TENTAD;RUA MOURA COSTA;151;72711;6/1/2001 21:59:00;CIDADAO COMUM;N;;PLANALTO;BH;609379.75;807147.29;224
+226;2001010764;B06000;LESAO CORPORAL;AV GENERAL OLIMP;236;329;6/1/2001 22:17:00;CIDADAO COMUM;N;;ITAPOA;BH;609013.66;806961.90;225
+227;2001010782;B04001;HOMICIDIO TENTAD;RUA EXPEDICIONAR;190;31627;6/1/2001 22:27:00;INICIATIVA;S;0;MARIA GORETTI;BH;614391.02;803230.73;226
+228;2001010789;B06000;LESAO CORPORAL;RUA SANTA CRUZ;42;60481;6/1/2001 22:33:00;CIDADAO COMUM;N;LJ01;VENDA NOVA;BH;608901.14;808750.75;227
+229;2001010804;B04001;HOMICIDIO TENTAD;RUA OHM;160;49153;6/1/2001 22:42:00;CIDADAO COMUM;S;0;PRIMEIRO DE MAIO;BH;612219.81;803558.99;228
+230;2001010919;B06000;LESAO CORPORAL;RUA AMANDO COUTO;651;3037;6/1/2001 23:48:00;INICIATIVA;S;0;SAO TOMAZ;BH;609953.26;805413.09;229
+231;2001010920;B04001;HOMICIDIO TENTAD;AV WALDOMIRO LOB;453;66548;6/1/2001 23:49:00;CIDADAO COMUM;S;;GUARANI;BH;612827.54;805381.24;230
+232;2001010951;B03000;AMEACA;PRACA ESMERALDA;2;25932;7/1/2001 00:05:00;CIDADAO COMUM;S;LJ02;PIRAJA;BH;613180.37;803029.37;231
+233;2001010955;B03000;AMEACA;RUA ITAIPU;1149;35439;7/1/2001 00:07:00;CIDADAO COMUM;S;0;VERA CRUZ;BH;616346.43;797993.47;232
+234;2001010966;B04001;HOMICIDIO TENTAD;AV CORONEL DURVA;459;17688;7/1/2001 00:13:00;INICIATIVA;N;0;DURVAL DE BARROS;BH;598326.03;790923.98;233
+235;2001010979;B06000;LESAO CORPORAL;RUA PROFESSORA G;709;86335;7/1/2001 00:20:00;INICIATIVA;N;0;FLORAMAR;BH;611863.73;807061.97;234
+236;2001010986;B06000;LESAO CORPORAL;RUA DA BOLIVIA;746;9884;7/1/2001 00:24:00;INICIATIVA;S;0;SION;BH;610943.73;793524.50;235
+237;2001010995;B03000;AMEACA;RUA MANOEL PEDRO;26;81892;7/1/2001 00:27:00;CIDADAO COMUM;S;A;MARIA GORETTI;BH;614266.81;803203.79;236
+238;2001010996;B03000;AMEACA;AV BRIGADEIRO ED;1213;2860;7/1/2001 00:30:00;CIDADAO COMUM;S;;GLORIA;BH;604077.57;798736.59;237
+239;2001011005;B03000;AMEACA;RUA DOS TUPIS;420;69965;7/1/2001 00:37:00;INICIATIVA;N;0;CENTRO BH;BH;610881.32;796955.33;238
+240;2001011056;B06000;LESAO CORPORAL;RUA FAISAO;115;27710;7/1/2001 01:09:00;CIDADAO COMUM;S;0;FLAVIO MARQUES D;BH;604790.92;789116.71;239
+241;2001011071;B03000;AMEACA;RUA LINCOLN;73;41136;7/1/2001 01:19:00;CIDADAO COMUM;S;;UNIAO;BH;612490.76;801290.23;240
+242;2001011080;B03000;AMEACA;RUA CARMELITA PR;1096;17316;7/1/2001 01:28:00;CIDADAO COMUM;N;0;SALGADO FILHO;BH;606179.87;794384.52;241
+243;2001011094;B04001;HOMICIDIO TENTAD;RUA GABRO;411;30435;7/1/2001 01:40:00;INICIATIVA;S;0;SANTA TEREZA;BH;612938.43;797259.63;242
+244;2001011190;B04001;HOMICIDIO TENTAD;AV SINFRONIO BRO;1201;66116;7/1/2001 02:50:00;INICIATIVA;N;0;BARREIRO;BH;602184.38;790705.71;243
+245;2001011241;B02000;RIXA;AV PRESIDENTE AN;2201;4461;7/1/2001 03:21:00;INICIATIVA;S;;CACHOEIRINHA;BH;609937.30;800018.63;244
+246;2001011262;B03000;AMEACA;RUA PEDRINOPOLIS;544;52980;7/1/2001 03:34:00;CIDADAO COMUM;N;;JARDIM LEBLON;BH;605715.33;807080.47;245
+247;2001011272;B04001;HOMICIDIO TENTAD;RUA XAPURI;1145;73815;7/1/2001 03:44:00;INICIATIVA;S;;JARDIM AMERICA;BH;607415.47;793908.72;246
+248;2001011279;B06000;LESAO CORPORAL;RUA VASSOURAS;353;71369;7/1/2001 03:50:00;CIDADAO COMUM;S;0;SENHOR BOM JESUS;BH;609502.59;799678.80;247
+249;2001011291;B06000;LESAO CORPORAL;AV RAJA GABAGLIA;3600;57830;7/1/2001 03:57:00;CIDADAO COMUM;S;0;ESTORIL;BH;609250.36;792265.54;248
+250;2001011318;B06000;LESAO CORPORAL;RUA FORMIGA;50;29136;7/1/2001 04:24:00;CIDADAO COMUM;S;;LAGOINHA;BH;610336.11;798756.88;249
+251;2001011391;B02000;RIXA;RUA SAO LAZARO;1089;63219;7/1/2001 05:42:00;CIDADAO COMUM;S;0;SAGRADA FAMILIA;BH;612506.27;799625.54;250
+252;2001011432;B04002;HOMICIDIO CONSUM;RUA PLOTINO;154;60541;7/1/2001 06:58:00;CIDADAO COMUM;N;;BELMONT;BH;615334.54;804870.99;251
+253;2001011471;B03000;AMEACA;AV SANTOS DUMONT;680;61950;7/1/2001 07:41:00;INICIATIVA;N;0;CENTRO (BH);BH;610999.13;797614.04;252
+254;2001011484;B06000;LESAO CORPORAL;RUA LADAINHA;80;40118;7/1/2001 07:47:00;CIDADAO COMUM;S;;PRIMEIRO DE MAIO;BH;611966.74;803424.16;253
+255;2001011712;B03000;AMEACA;RUA AMANDA;5;91317;7/1/2001 11:30:00;CIDADAO COMUM;S;;CONJUNTO VISTA A;BH;605786.45;792731.99;254
+256;2001011727;B04001;HOMICIDIO TENTAD;AV DO CONTORNO;1277;17228;7/1/2001 11:37:00;CIDADAO COMUM;N;;FLORESTA;BH;611851.77;797784.50;255
+257;2001011729;B04001;HOMICIDIO TENTAD;RUA VERDEJANTE;36;82085;7/1/2001 11:42:00;CIDADAO COMUM;N;CAFUND;SAO GABRIEL;BH;614028.89;804701.38;256
+258;2001011737;B06000;LESAO CORPORAL;RUA DO LAGO;130;40161;7/1/2001 11:48:00;CIDADAO COMUM;N;0;SAO MARCOS;BH;614043.12;802745.70;257
+259;2001011788;B03000;AMEACA;AV SARAMENHA;1525;64007;7/1/2001 12:30:00;CIDADAO COMUM;S;0;GUARANI;BH;613298.64;805560.73;258
+260;2001011803;B03000;AMEACA;RUA BOAVENTURA;866;9783;7/1/2001 12:45:00;CIDADAO COMUM;S;;VILA INDAIA;BH;609526.29;803265.21;259
+261;2001011816;B08000;VIOLACAO DE DOMI;AV AMAZONAS;2445;3140;7/1/2001 13:02:00;CIDADAO COMUM;S;PX1232;BARRO PRETO;BH;609381.70;796116.30;260
+262;2001011833;B03000;AMEACA;RUA GERALDO FERN;25;99611;7/1/2001 13:16:00;CIDADAO COMUM;S;;TUPI;BH;614138.51;806080.95;261
+263;2001011861;B04002;HOMICIDIO CONSUM;RUA JOAO NEIVA;342;38783;7/1/2001 13:37:00;CIDADAO COMUM;N;;BOA VISTA;BH;616140.07;800029.20;262
+264;2001011885;B06000;LESAO CORPORAL;RUA MUNIZ;5;170850;7/1/2001 13:58:00;INICIATIVA;S;0;MORRO DAS PEDRAS;BH;608082.99;793968.66;263
+265;2001011892;B06000;LESAO CORPORAL;RUA CARLOS NIEME;437;13472;7/1/2001 14:00:00;CIDADAO COMUM;N;0;SAGRADA FAMILIA;BH;613554.65;798857.84;264
+266;2001011907;B03000;AMEACA;RUA BRUNO FERRET;39;86827;7/1/2001 14:08:00;CIDADAO COMUM;N;;JARDIM ESTRELA;BH;607224.25;810342.62;265
+267;2001011954;B06000;LESAO CORPORAL;RUA PROFESSORA V;3;56893;7/1/2001 14:52:00;CIDADAO COMUM;S;CSA;CHACARAS REUNIDA;BH;605513.76;789431.48;266
+268;2001011962;B06000;LESAO CORPORAL;RUA ARANTINA;375;58697;7/1/2001 14:57:00;CIDADAO COMUM;S;;MINASLANDIA;BH;612163.22;804486.82;267
+269;2001012003;B03000;AMEACA;RUA CINQUENTA E ;198;106201;7/1/2001 15:27:00;CIDADAO COMUM;S;;NOVA YORK;BH;608663.41;810949.46;268
+270;2001012119;B06000;LESAO CORPORAL;RUA MARIANA OLIV;132;94573;7/1/2001 16:43:00;CIDADAO COMUM;S;;OURO PRETO;BH;606307.16;800636.59;269
+271;2001012120;B04001;HOMICIDIO TENTAD;RUA GENTIOS;1350;30983;7/1/2001 16:44:00;CIDADAO COMUM;S;0;CORACAO DE JESUS;BH;608905.13;793585.28;270
+272;2001012123;B04001;HOMICIDIO TENTAD;RUA PADRE PEDRO ;175;51657;7/1/2001 16:45:00;CIDADAO COMUM;S;;VENDA NOVA;BH;609671.68;808130.71;271
+273;2001012152;B06000;LESAO CORPORAL;RUA CURIMATA;481;48050;7/1/2001 17:06:00;CIDADAO COMUM;S;;SAO GABRIEL;BH;613956.09;804602.01;272
+274;2001012158;B03000;AMEACA;RUA RAMIRO SIQUE;180;128858;7/1/2001 17:09:00;CIDADAO COMUM;S;0;CASTANHEIRAS (TA;BH;617752.43;797349.60;273
+275;2001012171;B03000;AMEACA;RUA ARACI;347;5335;7/1/2001 17:23:00;CIDADAO COMUM;S;;PINDORAMA;BH;602504.13;797676.24;274
+276;2001012176;B03000;AMEACA;RUA ANDARAI;22;3720;7/1/2001 17:24:00;CIDADAO COMUM;N;0;NOVA VISTA;BH;615259.17;800656.50;275
+277;2001012177;B03000;AMEACA;RUA ADOLFO CIOLE;620;20318;7/1/2001 17:24:00;CIDADAO COMUM;N;CA2;CARDOSO;BH;603802.34;787701.58;276
+278;2001346643;B03000;AMEACA;AV MEM DE SA;1224;45395;28/6/2001 00:37:00;POLICIAL MILITAR;S;0;SANTA EFIGENIA;BH;614262.45;796371.32;277
+279;2001346783;B03000;AMEACA;AV ELISIO DE BRI;426;25251;28/6/2001 03:54:00;INICIATIVA;N;0;BOA VISTA;BH;614758.16;799709.43;278
+280;2001347067;B06000;LESAO CORPORAL;RUA PROFESSORA G;707;86335;28/6/2001 09:26:00;CIDADAO COMUM;N;;FLORAMAR;BH;611863.73;807061.97;279
+281;2001347148;B04001;HOMICIDIO TENTAD;RUA MARIA ANTONI;35;103014;28/6/2001 10:29:00;CIDADAO COMUM;S;0;BONSUCESSO;BH;605397.56;789332.51;280
+282;2001347198;B06000;LESAO CORPORAL;RUA LINDOLFO DE ;2148;41164;28/6/2001 11:06:00;INICIATIVA;S;0;SAO DOMINGOS;BH;607826.43;793671.48;281
+283;2001347210;B03000;AMEACA;BECO PEDRA VERDE;200;301698;28/6/2001 11:11:00;CIDADAO COMUM;S;PROX. BAR DA EVA;VILA CAFEZAL;BH;614697.65;795170.79;282
+284;2001347276;B06000;LESAO CORPORAL;ESTRADA BEIRA LI;475;10878;28/6/2001 12:03:00;CIDADAO COMUM;S;;SAO GABRIEL;BH;616523.09;806630.25;283
+285;2001347323;B05000;SEQUESTRO E CARC;AV SILVA LOBO;1350;65889;28/6/2001 12:36:00;CIDADAO COMUM;S;SEQUETRO RELAMPA;NOVA SUISSA;BH;607813.65;795224.49;284
+286;2001347399;B06000;LESAO CORPORAL;RUA SAO PAULO;108;90213;28/6/2001 13:40:00;CIDADAO COMUM;N;FR;SARANDI (URCA/BH;BH;603053.55;802645.18;285
+287;2001347554;B03000;AMEACA;RUA DAS CLARINET;15;9119;28/6/2001 15:40:00;CIDADAO COMUM;S;;CH CALIFORNIA;BH;604022.46;796614.78;286
+288;2001347588;B06000;LESAO CORPORAL;AV DOS ANDRADAS;551;3761;28/6/2001 16:01:00;INICIATIVA;S;0;CENTRO BH;BH;611552.00;797031.24;287
+289;2001347690;B06000;LESAO CORPORAL;RUA JUNO;264;39629;28/6/2001 16:55:00;INICIATIVA;N;0;GLORIA;BH;604390.58;798253.34;288
+290;2001347752;B03000;AMEACA;RUA DOUTOR RIBEI;137;23650;28/6/2001 17:33:00;CIDADAO COMUM;S;;DAS INDUSTRIAS;BH;603479.43;793070.91;289
+291;2001347766;B04001;HOMICIDIO TENTAD;RUA CARLOS QUADR;236;13431;28/6/2001 17:41:00;CIDADAO COMUM;S;0;SALGADO FILHO;BH;605994.61;794519.63;290
+292;2001347878;B03000;AMEACA;AV FRANCISCO SA;360;29656;28/6/2001 18:52:00;CIDADAO COMUM;S;0;PRADO;BH;608929.98;796435.96;291
+293;2001347893;B03000;AMEACA;RUA VEREADOR ANT;67;93602;28/6/2001 18:59:00;CIDADAO COMUM;N;;INDEPENDENCIA;BH;601901.25;786466.11;292
+294;2001347981;B03000;AMEACA;RUA TITO LIVIO;39;67828;28/6/2001 19:44:00;CIDADAO COMUM;S;;PRIMAVERA;BH;604537.21;798547.45;293
+295;2001348004;B06000;LESAO CORPORAL;RUA K;510;41495;28/6/2001 19:59:00;INICIATIVA;S;0;CH CONFISCO (CO);CO;602570.39;802980.95;294
+296;2001348244;B03000;AMEACA;RUA FLOR DE PITA;114;42949;28/6/2001 22:52:00;CIDADAO COMUM;S;;INDEPENDENCIA;BH;601585.95;786070.71;295
+297;2001348268;B03000;AMEACA;RUA ITARARE;21;35959;28/6/2001 23:07:00;CIDADAO COMUM;S;;CONCORDIA;BH;610756.05;799121.84;296
+298;2001348297;B06000;LESAO CORPORAL;RUA ARARIBA;539;5540;28/6/2001 23:23:00;CIDADAO COMUM;N;;SAO CRISTOVAO;BH;610505.35;799302.92;297
+299;2001348312;B06000;LESAO CORPORAL;AV PEDREIRA;66;52952;28/6/2001 23:38:00;CIDADAO COMUM;S;;PROVIDENCIA;BH;612837.94;804549.46;298
+300;2001348328;B03000;AMEACA;RUA MELODIA;53;301462;28/6/2001 23:49:00;CIDADAO COMUM;N;0;VILA CAFEZAL;BH;614240.36;795425.90;299
+301;2001348355;B04001;HOMICIDIO TENTAD;RUA CARMO DO RIO;100;13687;29/6/2001 00:06:00;INICIATIVA;S;0;PRADO LOPES;BH;609978.15;798887.53;300
+302;2001348374;B03000;AMEACA;RUA DES TEOFILO;46;20015;29/6/2001 00:25:00;CIDADAO COMUM;N;A;PEDRO SEGUNDO;BH;608693.98;798614.04;301
+303;2001348456;B03000;AMEACA;RUA DOS AIMORES;666;1640;29/6/2001 02:19:00;CIDADAO COMUM;S;0;FUNCIONARIOS;BH;611990.60;795940.64;302
+304;2001348463;B06000;LESAO CORPORAL;RUA PADRE PEDRO ;3200;51657;29/6/2001 02:33:00;INICIATIVA;S;0;LETICIA;BH;607060.12;809957.54;303
+305;2001348510;B06000;LESAO CORPORAL;RUA FELIPE DOS S;531;27953;29/6/2001 03:58:00;CIDADAO COMUM;S;0;LOURDES;BH;610274.10;795492.35;304
+306;2001348553;B06000;LESAO CORPORAL;RUA TAIOBEIRAS;518;17168;29/6/2001 05:46:00;CIDADAO COMUM;S;;COQUEIROS;BH;602451.58;799029.95;305
+307;2001348639;B06000;LESAO CORPORAL;RUA MANOEL TAVAR;470;1536;29/6/2001 07:47:00;CIDADAO COMUM;N;0;GOIANIA;BH;614972.82;802744.77;306
+308;2001348673;B03000;AMEACA;RUA JOSE LIMA DE;81;73641;29/6/2001 08:15:00;CIDADAO COMUM;N;;FLORAMAR;BH;611399.18;806761.31;307
+309;2001348784;B03000;AMEACA;RUA DAS CANARIAS;18;64325;29/6/2001 09:23:00;CIDADAO COMUM;S;;JARDIM ATLANTICO;BH;608145.36;805911.71;308
+310;2001348794;B08000;VIOLACAO DE DOMI;RUA PROFESSORA G;654;86335;29/6/2001 09:33:00;CIDADAO COMUM;N;0;FLORAMAR;BH;611900.95;807062.44;309
+311;2001348805;B06000;LESAO CORPORAL;RUA CESAR BERNAR;375;122675;29/6/2001 09:38:00;CIDADAO COMUM;S;0;CEU AZUL;BH;604662.26;808108.81;310
+312;2001348867;B06000;LESAO CORPORAL;RUA SAO JOSE DO ;60;15465;29/6/2001 10:19:00;CIDADAO COMUM;S;;PLANALTO;BH;609807.84;806352.82;311
+313;2001348893;B06000;LESAO CORPORAL;RUA PROFESSORA G;654;86335;29/6/2001 10:33:00;CIDADAO COMUM;N;0;FLORAMAR;BH;611900.95;807062.44;312
+314;2001348909;B03000;AMEACA;RUA SAO SILVESTR;50;116445;29/6/2001 10:43:00;CIDADAO COMUM;S;;PAULO SEXTO;BH;616542.19;805927.67;313
+315;2001348985;B03000;AMEACA;RUA ENGENHO DE D;643;25614;29/6/2001 11:39:00;CIDADAO COMUM;S;LJ11;CAICARA;BH;607887.64;799242.48;314
+316;2001349002;B06000;LESAO CORPORAL;AV GETULIO VARGA;1280;81256;29/6/2001 11:51:00;INICIATIVA;N;0;FUNCIONARIOS;BH;611488.28;795119.52;315
+317;2001349018;B03000;AMEACA;RUA WALDEMAR DIA;439;15377;29/6/2001 12:00:00;CIDADAO COMUM;S;;CANDELARIA;BH;608268.08;808962.30;316
+318;2001349023;B03000;AMEACA;RUA MARCAZITA;75;43488;29/6/2001 12:02:00;CIDADAO COMUM;S;CAFU;SAO CRISTOVAO;BH;610039.61;799325.32;317
+319;2001349037;B03000;AMEACA;RUA EXPEDITO RIB;168;41467;29/6/2001 12:14:00;CIDADAO COMUM;S;;VILA SUZANA;BH;611846.11;803060.50;318
+320;2001349150;B06000;LESAO CORPORAL;RUA JOAO GUALBER;150;68414;29/6/2001 13:41:00;CIDADAO COMUM;N;;SAO JOAO BATISTA;BH;608949.69;808085.04;319
+321;2001349249;B06000;LESAO CORPORAL;RUA PADRE EUSTAQ;125;51294;29/6/2001 15:03:00;CIDADAO COMUM;S;;CARLOS PRATES;BH;609409.13;797633.34;320
+322;2001349380;B06000;LESAO CORPORAL;RUA JOANA D'ARC;133;37387;29/6/2001 16:27:00;CIDADAO COMUM;S;0;MINASLANDIA;BH;611958.71;804054.10;321
+323;2001349384;B08000;VIOLACAO DE DOMI;RUA DOUTOR RIBEI;414;23650;29/6/2001 16:28:00;CIDADAO COMUM;S;NR CORRETO 422.;DAS INDUSTRIAS;BH;603510.74;792720.82;322
+324;2001349436;B09000;ABANDONO DE INCA;RUA CATANDUVAS;560;14217;29/6/2001 16:49:00;CIDADAO COMUM;N;0;RENASCENCA;BH;610845.32;800521.36;323
+325;2001349513;B06000;LESAO CORPORAL;RUA DOUTOR BENED;423;12252;29/6/2001 17:33:00;CIDADAO COMUM;S;;ANTONIO RIBEIRO ;BH;612546.01;803738.77;324
+326;2001349599;B03000;AMEACA;RUA PONTA GROSSA;392;14900;29/6/2001 18:22:00;CIDADAO COMUM;S;0;ARAGUAIA;BH;604863.70;789804.10;325
+327;2001349728;B06000;LESAO CORPORAL;RUA CAPA PRETA;509;14232;29/6/2001 19:25:00;CIDADAO COMUM;N;;JOAO PINHEIRO;BH;604842.89;795724.14;326
+328;2001349752;B03000;AMEACA;AV STA ROSA;345;61301;29/6/2001 19:41:00;CIDADAO COMUM;N;;SAO LUIZ;BH;608850.97;804571.43;327
+329;2001349784;B03000;AMEACA;RUA MICA;109;45685;29/6/2001 20:02:00;CIDADAO COMUM;S;0;SAO LUCAS;BH;613238.00;796036.84;328
+330;2001349789;B04002;HOMICIDIO CONSUM;RUA AGUAS DE LIN;65;40902;29/6/2001 20:00:00;CIDADAO COMUM;N;;ITAIPU BH;BH;599247.70;788871.68;329
+331;2001349849;B03000;AMEACA;RUA W TRES;10;122621;29/6/2001 20:43:00;CIDADAO COMUM;S;;PONGELUPE;BH;603702.18;787305.62;330
+332;2001349987;B03000;AMEACA;RUA ANTONIO VIEI;436;4925;29/6/2001 22:16:00;CIDADAO COMUM;N;;GLALIJA;BH;603363.05;794230.23;331
+333;2001350071;B06000;LESAO CORPORAL;AV PERIMETRAL;307;78531;29/6/2001 23:08:00;CIDADAO COMUM;S;;VILA CASTANHEIRA;BH;601415.66;788841.83;332
+334;2001350156;B04001;HOMICIDIO TENTAD;RUA QUINZE;18;122215;29/6/2001 23:58:00;CIDADAO COMUM;N;0;JARDIM DOS COMER;BH;607720.46;810683.19;333
+335;2001350158;B04001;HOMICIDIO TENTAD;RUA JOAQUIM DE F;140;38033;30/6/2001 00:00:00;CIDADAO COMUM;S;AN2;BARREIRO;BH;602884.71;791123.78;334
+336;2001350190;B06000;LESAO CORPORAL;RUA URSULA PAULI;2338;71066;30/6/2001 00:22:00;CIDADAO COMUM;S;;CH BONSUCESSO;BH;605473.82;791757.57;335
+337;2001350212;B06000;LESAO CORPORAL;AV AMAZONAS;5800;3140;30/6/2001 00:47:00;INICIATIVA;S;0;GAMELEIRA;BH;606262.47;795876.96;336
+338;2001350216;B06000;LESAO CORPORAL;AV NELIO CERQUEI;15;72359;30/6/2001 00:50:00;CIDADAO COMUM;S;;TIROL;BH;600947.66;789885.51;337
+339;2001350230;B06000;LESAO CORPORAL;RUA ANTONIO MART;5;4676;30/6/2001 01:01:00;CIDADAO COMUM;S;0;ESTRELA DO ORIEN;BH;605805.26;792166.99;338
+340;2001350332;B03000;AMEACA;RUA MINAS NOVAS;108;45818;30/6/2001 02:36:00;CIDADAO COMUM;S;0;CRUZEIRO;BH;612204.10;794772.00;339
+341;2001350344;B03000;AMEACA;AV CIVILIZACAO;911;51657;30/6/2001 02:51:00;INICIATIVA;S;0;JARDIM FLORENCIA;BH;609133.74;808652.87;340
+342;2001350345;B06000;LESAO CORPORAL;AV SANTOS DUMONT;597;61950;30/6/2001 02:52:00;CIDADAO COMUM;N;;CENTRO (BH);BH;611065.32;797537.18;341
+343;2001350351;B08000;VIOLACAO DE DOMI;AV PRUDENTE DE M;1220;55774;30/6/2001 02:57:00;CIDADAO COMUM;N;0;CORACAO DE JESUS;BH;610007.32;794115.40;342
+344;2001350396;B06000;LESAO CORPORAL;AV ITAU;955;36025;30/6/2001 03:38:00;CIDADAO COMUM;N;0;DOM BOSCO;BH;604558.93;796915.41;343
+345;2001350406;B06000;LESAO CORPORAL;AV AMAZONAS;5800;3140;30/6/2001 03:54:00;INICIATIVA;S;0;GAMELEIRA;BH;606262.47;795876.96;344
+346;2001350523;B06000;LESAO CORPORAL;RUA POLYCARPO DE;600;115137;30/6/2001 07:29:00;CIDADAO COMUM;S;CA02;BANDEIRANTES;BH;604403.57;803709.10;345
+347;2001350570;B06000;LESAO CORPORAL;RUA RADIALISTA A;390;100031;30/6/2001 08:14:00;CIDADAO COMUM;S;;CEU AZUL;BH;604019.52;808819.00;346
+348;2001350625;B03000;AMEACA;AV OLEGARIO MACI;188;49699;30/6/2001 08:53:00;CIDADAO COMUM;S;LJ08;CENTRO (BH);BH;610617.38;797516.23;347
+349;2001350666;B03000;AMEACA;RUA DES BRAULIO;1210;19917;30/6/2001 09:25:00;CIDADAO COMUM;S;;VERA CRUZ;BH;616240.69;797882.85;348
+350;2001350716;B04002;HOMICIDIO CONSUM;RUA GRAUNAS;449;31797;30/6/2001 10:05:00;CIDADAO COMUM;N;CAFU;VILA CEMIG;BH;605631.69;788709.00;349
+351;2001350786;B03000;AMEACA;RUA PINTORA DJAN;60;129255;30/6/2001 10:49:00;CIDADAO COMUM;S;CA01;TUPI;BH;614207.76;806225.28;350
+352;2001350795;B03000;AMEACA;RUA ALUIZIO DAVI;740;9770;30/6/2001 10:55:00;CIDADAO COMUM;S;LJ21;OURO PRETO;BH;606194.96;801103.04;351
+353;2001350799;B03000;AMEACA;RUA ENCOSTA;12;20406;30/6/2001 10:57:00;CIDADAO COMUM;S;;SANTA MONICA;BH;607344.77;807411.00;352
+354;2001350990;B03000;AMEACA;RUA SALITRE;245;60006;30/6/2001 13:38:00;CIDADAO COMUM;S;CAFU;CACHOEIRINHA;BH;611049.66;801460.02;353
+355;2001351032;B03000;AMEACA;RUA SAO LAZARO;1099;63219;30/6/2001 14:11:00;CIDADAO COMUM;S;CAB;SAGRADA FAMILIA;BH;612509.83;799636.46;354
+356;2001351050;B06000;LESAO CORPORAL;RUA VOLTA REDOND;218;73600;30/6/2001 14:22:00;CIDADAO COMUM;S;;CARDOSO;BH;603536.07;787805.19;355
+357;2001351074;B03000;AMEACA;RUA BERNARDO CIS;301;9351;30/6/2001 14:38:00;POLICIAL MILITAR;N;AN1;PARQUE RIACHUELO;BH;609625.53;799953.65;356
+358;2001351147;B03000;AMEACA;RUA URSULA PAULI;2303;71066;30/6/2001 15:27:00;CIDADAO COMUM;S;0;CH BONSUCESSO;BH;605518.68;791726.85;357
+359;2001351158;B03000;AMEACA;BECO LUIZ ALBERT;36;300741;30/6/2001 15:31:00;CIDADAO COMUM;S;;HORTO;BH;613875.22;798204.15;358
+360;2001351160;B08000;VIOLACAO DE DOMI;RUA GASTAO BRAUL;229;103304;30/6/2001 15:32:00;CIDADAO COMUM;S;;GAMELEIRA;BH;605464.66;795301.09;359
+361;2001351197;B03000;AMEACA;AV ALVARO DA SIL;480;2872;30/6/2001 15:47:00;CIDADAO COMUM;N;0;BARREIRO;BH;602448.91;791262.85;360
+362;2001012206;B03000;AMEACA;RUA ESTRELA DA J;138;26705;7/1/2001 17:36:00;CIDADAO COMUM;S;;VISTA ALEGRE;BH;604749.69;793333.72;361
+363;2001012218;B04001;HOMICIDIO TENTAD;RUA PADRE PEDRO ;322;51657;7/1/2001 17:47:00;CIDADAO COMUM;S;0;VILA SANTO ANTON;BH;609650.08;808286.90;362
+364;2001012223;B06000;LESAO CORPORAL;RUA ITAPETINGA;1341;35804;7/1/2001 17:51:00;CIDADAO COMUM;N;0;CACHOEIRINHA;BH;609965.84;800605.10;363
+365;2001012232;B03000;AMEACA;RUA JOVINA GOMES;503;70454;7/1/2001 17:55:00;CIDADAO COMUM;S;;LETICIA;BH;607250.11;809471.34;364
+366;2001012264;B06000;LESAO CORPORAL;RUA AUTA DE SOUZ;106;95374;7/1/2001 18:17:00;CIDADAO COMUM;S;;SANTA MARIA;BH;603542.99;795180.27;365
+367;2001012265;B04001;HOMICIDIO TENTAD;RUA BATISTA CARN;190;8419;7/1/2001 18:17:00;CIDADAO COMUM;S;CAFU;SALGADO FILHO;BH;606473.20;794973.26;366
+368;2001012319;B03000;AMEACA;RUA MARTINS ALVE;838;45023;7/1/2001 18:57:00;CIDADAO COMUM;S;;NOVA ESPERANCA;BH;608959.70;799444.10;367
+369;2001012348;B06000;LESAO CORPORAL;RUA OLIVIO RODRI;24;49976;7/1/2001 19:11:00;CIDADAO COMUM;S;CSA;NOVA VISTA;BH;614970.31;800898.62;368
+370;2001012375;B04001;HOMICIDIO TENTAD;AV DA SINFONIA;437;101627;7/1/2001 19:28:00;CIDADAO COMUM;N;0;SANTA AMELIA;BH;607345.20;806795.49;369
+371;2001012423;B06000;LESAO CORPORAL;RUA FRANCISCO VE;27;29703;7/1/2001 19:52:00;CIDADAO COMUM;S;;TUPI;BH;612704.06;806765.25;370
+372;2001012442;B02000;RIXA;RUA SAO PEDRO DA;410;102989;7/1/2001 20:01:00;CIDADAO COMUM;S;0;OLHOS DAGUA;BH;607826.44;788139.72;371
+373;2001012480;B02000;RIXA;RUA DA BAHIA;10;81155;7/1/2001 20:19:00;CIDADAO COMUM;N;0;CENTRO (BH);BH;611510.18;797579.14;372
+374;2001012491;B03000;AMEACA;RUA HILO ESTEVAM;21;94721;7/1/2001 20:21:00;CIDADAO COMUM;S;;CASTELO;BH;605600.44;799917.04;373
+375;2001012528;B03000;AMEACA;RUA LUCIA MIGUEL;446;41555;7/1/2001 20:41:00;CIDADAO COMUM;S;0;TUPI;BH;612593.89;806369.45;374
+376;2001012544;B06000;LESAO CORPORAL;RUA SERESTA;14;301463;7/1/2001 20:48:00;CIDADAO COMUM;S;;VILA CAFEZAL;BH;614046.73;795320.77;375
+377;2001012622;B06000;LESAO CORPORAL;RUA OLIMPIO DA S;45;28045;7/1/2001 21:24:00;CIDADAO COMUM;S;;PRIMEIRO DE MAIO;BH;612550.80;803827.00;376
+378;2001012707;B06000;LESAO CORPORAL;BECO FREI MARIAN;120;300767;7/1/2001 22:10:00;CIDADAO COMUM;S;NR 195 CORRETO;CARLOS PRATES;BH;608761.56;797834.53;377
+379;2001012725;B06000;LESAO CORPORAL;RUA DAS CANOAS;531;12669;7/1/2001 22:19:00;CIDADAO COMUM;S;0;ESTRELA DO ORIEN;BH;605578.92;792635.96;378
+380;2001012737;B04001;HOMICIDIO TENTAD;RUA QUARENTA E O;124;35048;7/1/2001 22:26:00;CIDADAO COMUM;S;;CONJUNTO FELICID;BH;612791.10;806999.98;379
+381;2001012739;B04001;HOMICIDIO TENTAD;RUA PAULO DE FRO;95;52722;7/1/2001 22:24:00;INICIATIVA;S;0;CENTRO (BH);BH;610759.34;797631.71;380
+382;2001012794;B06000;LESAO CORPORAL;RUA DUZENTOS E Q;44;24321;7/1/2001 22:56:00;CIDADAO COMUM;N;;CH VALE DO JATOB;BH;600616.01;787089.50;381
+383;2001012852;B06000;LESAO CORPORAL;RUA CARLOS SA;300;13520;7/1/2001 23:25:00;CIDADAO COMUM;N;0;COPACABANA;BH;606083.57;805652.90;382
+384;2001013025;B08000;VIOLACAO DE DOMI;RUA VILA RICA;843;71992;8/1/2001 01:05:00;INICIATIVA;N;0;PADRE EUSTAQUIO;BH;606711.67;797747.92;383
+385;2001013035;B06000;LESAO CORPORAL;RUA ANA JOSEFINA;64;85521;8/1/2001 01:12:00;CIDADAO COMUM;N;0;SAO JOAO BATISTA;BH;608128.63;807571.42;384
+386;2001013105;B04001;HOMICIDIO TENTAD;RUA SAUL;65;170891;8/1/2001 02:15:00;INICIATIVA;S;0;MORRO DAS PEDRAS;BH;608165.20;793608.91;385
+387;2001013168;B06000;LESAO CORPORAL;RUA DOS AIMORES;2198;1640;8/1/2001 03:15:00;INICIATIVA;N;0;BARRO PRETO;BH;610507.20;796334.72;386
+388;2001013289;B03000;AMEACA;RUA COQUEIROS;270;17297;8/1/2001 07:00:00;CIDADAO COMUM;S;;CACHOEIRINHA;BH;610594.69;801052.44;387
+389;2001013379;B03000;AMEACA;RUA SANTAREM;343;61484;8/1/2001 08:09:00;CIDADAO COMUM;S;;NOVA CINTRA;BH;605767.46;793810.29;388
+390;2001013420;B06000;LESAO CORPORAL;RUA JOSE ANTENOR;141;97483;8/1/2001 08:38:00;CIDADAO COMUM;S;;HELIOPOLIS;BH;611315.24;805296.94;389
+391;2001013489;B03000;AMEACA;RUA SAO MATIAS;397;63408;8/1/2001 09:22:00;CIDADAO COMUM;S;;SERRANO;BH;603549.73;800736.58;390
+392;2001013529;B06000;LESAO CORPORAL;RUA FLOR DO BAIL;278;28480;8/1/2001 09:50:00;CIDADAO COMUM;S;0;JARDIM MONTANHES;BH;606264.34;799574.20;391
+393;2001013633;B06000;LESAO CORPORAL;RUA DOS CACTOS;568;73119;8/1/2001 11:19:00;CIDADAO COMUM;S;;LINDEIA;BH;599166.10;790634.92;392
+394;2001013700;B03000;AMEACA;RUA IZABEL GLANS;230;99678;8/1/2001 12:11:00;CIDADAO COMUM;S;CAA;INDUSTRIAL RODRI;BH;616223.51;808595.24;393
+395;2001013798;B03000;AMEACA;RUA CARANCHO;22;13079;8/1/2001 13:27:00;CIDADAO COMUM;S;;FLAVIO MARQUES D;BH;604506.63;788542.81;394
+396;2001013800;B03000;AMEACA;RUA MATERLANDIA;8;45124;8/1/2001 13:28:00;CIDADAO COMUM;S;;SANTA INES;BH;613935.57;801097.60;395
+397;2001013969;B03000;AMEACA;RUA BARAO DE AIU;662;7835;8/1/2001 15:22:00;CIDADAO COMUM;S;;ALTO DOS PINHEIR;BH;604250.87;796242.09;396
+398;2001013977;B03000;AMEACA;AV OLEGARIO MACI;208;49699;8/1/2001 15:24:00;CIDADAO COMUM;S;;CENTRO (BH);BH;610610.60;797496.18;397
+399;2001013982;B04001;HOMICIDIO TENTAD;AV AMERICO VESPU;40;3355;8/1/2001 15:25:00;CIDADAO COMUM;S;;PARQUE RIACHUELO;BH;609791.15;800757.25;398
+400;2001014145;B06000;LESAO CORPORAL;ESTRADA BEIRA LI;31;10878;8/1/2001 16:57:00;CIDADAO COMUM;N;REF:CASA DE RACO;SAO GABRIEL;BH;616119.62;806734.88;399
+401;2001014146;B03000;AMEACA;RUA FRANCISCO AS;275;15641;8/1/2001 16:59:00;CIDADAO COMUM;S;;DAS INDUSTRIAS;BH;604904.12;791193.78;400
+402;2001014291;B06000;LESAO CORPORAL;RUA GUAICURUS;436;32009;8/1/2001 18:24:00;CIDADAO COMUM;S;0;CENTRO (BH);BH;611227.45;797639.92;401
+403;2001014298;B03000;AMEACA;RUA SAO PAULO;672;63464;8/1/2001 18:26:00;CIDADAO COMUM;S;0;CENTRO (BH);BH;610954.65;797132.32;402
+404;2001014342;B03000;AMEACA;RUA PRIMEIRO DE ;135;55226;8/1/2001 18:51:00;CIDADAO COMUM;S;;APARECIDA;BH;609171.85;799995.94;403
+405;2001014358;B06000;LESAO CORPORAL;RUA ROSANGELA;198;59328;8/1/2001 18:55:00;CIDADAO COMUM;S;;DA LAGOA;BH;604499.11;809027.11;404
+406;2001014446;B04001;HOMICIDIO TENTAD;RUA TURQUESA;483;70035;8/1/2001 19:42:00;INICIATIVA;N;0;PRADO;BH;608600.91;796259.29;405
+407;2001014458;B04001;HOMICIDIO TENTAD;BECO PAI JOAQUIM;25;171056;8/1/2001 19:42:00;CIDADAO COMUM;N;0;CABANA;BH;604389.54;794182.77;406
+408;2001014463;B03000;AMEACA;RUA GURUPA;148;32557;8/1/2001 19:55:00;CIDADAO COMUM;N;;CACHOEIRINHA;BH;610305.58;801088.40;407
+409;2001014497;B03000;AMEACA;AV ERICO VERISSI;159;41671;8/1/2001 20:12:00;CIDADAO COMUM;S;0;SAO JOAO BATISTA;BH;608449.99;808287.11;408
+410;2001014511;B03000;AMEACA;RUA FURQUIM;421;30117;8/1/2001 20:17:00;CIDADAO COMUM;S;0;VERA CRUZ;BH;615033.05;797748.03;409
+411;2001014537;B03000;AMEACA;AV BALEARES;545;89333;8/1/2001 20:33:00;CIDADAO COMUM;N;;JARDIM EUROPA;BH;608404.44;810117.51;410
+412;2001014556;B03000;AMEACA;RUA ALCIDES PERE;195;107711;8/1/2001 20:43:00;CIDADAO COMUM;S;FR;MANTIQUEIRA;BH;606787.92;811935.52;411
+413;2001014687;B06000;LESAO CORPORAL;RUA CAICARA;225;11451;8/1/2001 22:03:00;CIDADAO COMUM;S;0;SAO GERALDO;BH;615072.13;799252.45;412
+414;2001014734;B04001;HOMICIDIO TENTAD;RUA CINQUENTA E ;11;33925;8/1/2001 22:43:00;INICIATIVA;N;0;FELICIDADE;BH;612673.36;806807.75;413
+415;2001014739;B06000;LESAO CORPORAL;RUA DOUTOR CRIST;185;55598;8/1/2001 22:46:00;CIDADAO COMUM;S;0;BONSUCESSO;BH;604650.82;789126.07;414
+416;2001014742;B03000;AMEACA;RUA JOSE ALVES D;250;38424;8/1/2001 22:50:00;CIDADAO COMUM;S;;SAO BERNARDO;BH;610799.19;805124.67;415
+417;2001014820;B06000;LESAO CORPORAL;RUA DOS VICENTIN;130;63159;8/1/2001 23:44:00;CIDADAO COMUM;S;;PLANALTO;BH;610713.35;805437.73;416
+418;2001014838;B06000;LESAO CORPORAL;RUA MARINHO EVAN;30;124960;8/1/2001 23:55:00;CIDADAO COMUM;S;FR;PETROPOLIS;BH;601216.32;786613.61;417
+419;2001014860;B03000;AMEACA;AV SOCIAIS;60;12959;9/1/2001 00:08:00;CIDADAO COMUM;S;;JARDIM VITORIA;BH;615537.12;803931.69;418
+420;2001014949;B03000;AMEACA;RUA DOM PEDRITO;464;51300;9/1/2001 01:34:00;CIDADAO COMUM;S;0;NOVA VISTA;BH;614816.51;800793.30;419
+421;2001015067;B03000;AMEACA;RUA PADRE FEIJO;982;51326;9/1/2001 04:10:00;CIDADAO COMUM;S;0;VERA CRUZ;BH;615870.08;797655.07;420
+422;2001015076;B03000;AMEACA;PRACA SAO GERALD;39;62027;9/1/2001 04:58:00;CIDADAO COMUM;N;0;SAO GERALDO;BH;615306.86;799493.53;421
+423;2001015093;B06000;LESAO CORPORAL;AV CRISTIANO MAC;5554;18652;9/1/2001 06:24:00;INICIATIVA;S;0;DOS PALMARES;BH;612348.26;802981.49;422
+424;2001015203;B03000;AMEACA;RUA ITAMARACA;25;35542;9/1/2001 08:10:00;CIDADAO COMUM;S;0;CONCORDIA;BH;611172.87;798780.05;423
+425;2001015286;B03000;AMEACA;RUA FLOR DE ABRI;10;28464;9/1/2001 09:17:00;CIDADAO COMUM;N;;JARDIM MONTANHES;BH;605903.22;799072.14;424
+426;2001015401;B03000;AMEACA;RUA NOVA LIMA;20;74799;9/1/2001 11:02:00;CIDADAO COMUM;N;;JARDIM VITORIA;BH;616617.92;804643.10;425
+427;2001015416;B03000;AMEACA;AV DO CONTORNO;2300;17228;9/1/2001 11:10:00;CIDADAO COMUM;N;0;CENTRO (BH);BH;612513.76;797078.00;426
+428;2001015417;B03000;AMEACA;RUA CARAVELAS;811;13141;9/1/2001 11:10:00;CIDADAO COMUM;S;0;VERA CRUZ;BH;615714.70;797598.16;427
+429;2001015439;B03000;AMEACA;RUA DA BAHIA;1148;81155;9/1/2001 11:34:00;INICIATIVA;S;AP1611;LOURDES;BH;611230.12;796512.50;428
+430;2001015440;B06000;LESAO CORPORAL;RUA SAO JOAO BAT;310;62824;9/1/2001 11:33:00;CIDADAO COMUM;S;;JARDIM LEBLON;BH;605534.57;808136.46;429
+431;2001015458;B04001;HOMICIDIO TENTAD;RUA GLEUCY JOSE ;95;128860;9/1/2001 11:47:00;CIDADAO COMUM;S;0;CASTANHEIRAS (TA;BH;617303.66;796895.30;430
+432;2001015585;B03000;AMEACA;AV WALDOMIRO LOB;992;66548;9/1/2001 13:42:00;CIDADAO COMUM;N;0;GUARANI;BH;612224.50;805424.28;431
+433;2001015629;B03000;AMEACA;AV CRISTOVAO COL;161;18738;9/1/2001 14:22:00;INICIATIVA;N;0;FUNCIONARIOS;BH;611455.89;794979.69;432
+434;2001015652;B03000;AMEACA;RUA JANUARIO BOR;451;89709;9/1/2001 14:36:00;CIDADAO COMUM;S;0;JARDIM VITORIA;BH;617420.91;804492.75;433
+435;2001015745;B03000;AMEACA;RUA JUNDIAI;97;39616;9/1/2001 15:33:00;CIDADAO COMUM;S;;CONCORDIA;BH;610808.71;799153.94;434
+436;2001015969;B06000;LESAO CORPORAL;AV ARTUR BERNARD;1461;60844;9/1/2001 17:46:00;CIDADAO COMUM;S;;VILA PARIS;BH;610407.20;793259.63;435
+437;2001016078;B03000;AMEACA;AV DOM PEDRO II;1020;53145;9/1/2001 18:52:00;CIDADAO COMUM;N;;BONFIM;BH;609572.19;797764.43;436
+438;2001016093;B03000;AMEACA;RUA SUDAO;82;116606;9/1/2001 18:59:00;CIDADAO COMUM;S;;CANAA;BH;610209.28;810853.60;437
+439;2001016133;B06000;LESAO CORPORAL;RUA DO ACRE;12;877;9/1/2001 19:24:00;INICIATIVA;N;0;CENTRO (BH);BH;610703.72;797641.10;438
+440;2001016156;B03000;AMEACA;RUA FLOR DE MAIO;77;300399;9/1/2001 19:36:00;CIDADAO COMUM;S;0;VILA CAFEZAL;BH;614327.62;794723.12;439
+441;2001016248;B06000;LESAO CORPORAL;AV PARANAIBA;285;52256;9/1/2001 20:25:00;CIDADAO COMUM;S;;SENHOR BOM JESUS;BH;609720.07;799824.06;440
+442;2001016331;B03000;AMEACA;AV CRISTIANO MAC;848;18652;9/1/2001 21:07:00;INICIATIVA;S;0;DA GRACA;BH;612306.88;799435.98;441
+443;2001016336;B05000;SEQUESTRO E CARC;AV SANTOS DUMONT;381;61950;9/1/2001 21:10:00;CIDADAO COMUM;S;;CENTRO (BH);BH;611250.50;797490.44;442
+444;2001016350;B03000;AMEACA;RUA ALINE;658;2352;9/1/2001 21:14:00;CIDADAO COMUM;S;;COQUEIROS;BH;602349.52;798353.27;443
+445;2001016355;B08000;VIOLACAO DE DOMI;RUA THAIS;10;67594;9/1/2001 21:17:00;CIDADAO COMUM;S;;GLORIA;BH;604077.88;798711.92;444
+446;2001016432;B06000;LESAO CORPORAL;RUA ENGENHEIRO Z;35;17937;9/1/2001 21:57:00;CIDADAO COMUM;N;0;SANTO ANTONIO;BH;610239.72;793815.04;445
+447;2001016441;B03000;AMEACA;RUA CORREAS;651;87091;9/1/2001 22:03:00;CIDADAO COMUM;N;;BELVEDERE;BH;611978.72;792341.14;446
+448;2001016509;B06000;LESAO CORPORAL;AV SILVA LOBO;295;65889;9/1/2001 22:45:00;CIDADAO COMUM;S;;CALAFATE;BH;607634.19;796415.21;447
+449;2001016512;B06000;LESAO CORPORAL;RUA DOS CAETES;435;11376;9/1/2001 22:47:00;CIDADAO COMUM;N;0;CENTRO (BH);BH;611180.00;797412.98;448
+450;2001016520;B06000;LESAO CORPORAL;RUA INGLATERRA;1744;34552;9/1/2001 22:51:00;CIDADAO COMUM;S;;COPACABANA;BH;606211.83;806736.77;449
+451;2001016526;B03000;AMEACA;RUA SALGUEIRO;255;3226;9/1/2001 22:51:00;CIDADAO COMUM;S;0;IPIRANGA;BH;611974.61;800595.47;450
+452;2001016622;B06000;LESAO CORPORAL;RUA SAO GERALDO;190;170283;9/1/2001 23:39:00;CIDADAO COMUM;N;0;CABANA;BH;604753.11;793990.28;451
+453;2001016634;B03000;AMEACA;RUA W QUATRO;190;122634;9/1/2001 23:48:00;CIDADAO COMUM;S;202;PONGELUPE;BH;604134.92;787374.21;452
+454;2001016673;B04001;HOMICIDIO TENTAD;RUA DOUTOR CRIST;312;55598;10/1/2001 00:12:00;CIDADAO COMUM;S;0;CRISTO REDENTOR;BH;604751.25;789297.85;453
+455;2001016795;B04001;HOMICIDIO TENTAD;RUA BRAS;300;170835;10/1/2001 01:55:00;CIDADAO COMUM;S;0;MORRO DAS PEDRAS;BH;608242.10;793878.82;454
+456;2001016842;B03000;AMEACA;RUA JOSE ROMANO;142;15796;10/1/2001 02:45:00;CIDADAO COMUM;N;CA01;SAO JOSE;BH;605207.68;798783.98;455
+457;2001016856;B03000;AMEACA;RUA GUAICURUS;633;32009;10/1/2001 02:55:00;CIDADAO COMUM;S;0;CENTRO (BH);BH;611041.29;797644.01;456
+458;2001016910;B04001;HOMICIDIO TENTAD;AV RAJA GABAGLIA;170;57830;10/1/2001 04:36:00;INICIATIVA;S;0;CIDADE JARDIM;BH;609584.57;795355.36;457
+459;2001016946;B06000;LESAO CORPORAL;RUA DOS GOITACAZ;506;31400;10/1/2001 05:41:00;CIDADAO COMUM;S;;CENTRO (BH);BH;610773.41;796842.64;458
+460;2001016959;B04002;HOMICIDIO CONSUM;RUA AGGEO PIO;10;89711;10/1/2001 06:19:00;CIDADAO COMUM;N;0;PALMEIRAS;BH;606647.20;790442.61;459
+461;2001016963;B03000;AMEACA;RUA PADRE PEDRO ;2227;51657;10/1/2001 06:27:00;INICIATIVA;N;0;CANDELARIA;BH;607904.37;809480.72;460
+462;2001016996;B03000;AMEACA;RUA SENA MADUREI;596;64671;10/1/2001 07:19:00;CIDADAO COMUM;S;;OURO PRETO;BH;605824.18;802464.45;461
+463;2001017102;B06000;LESAO CORPORAL;RUA MARIA GERTRU;290;98993;10/1/2001 08:30:00;INICIATIVA;N;0;CEU AZUL;BH;604701.02;808439.25;462
+464;2001017334;B03000;AMEACA;RUA BONAPARTE;122;10083;10/1/2001 11:40:00;CIDADAO COMUM;S;0;PADRE EUSTAQUIO;BH;607575.01;797505.56;463
+465;2001017348;B06000;LESAO CORPORAL;RUA REAL GRANDEZ;264;58089;10/1/2001 11:53:00;CIDADAO COMUM;S;AP302;PATROCINIO;BH;603316.69;798928.15;464
+466;2001017450;B03000;AMEACA;RUA DAVIDSON PIM;247;124189;10/1/2001 13:01:00;CIDADAO COMUM;S;0;JARDIM DOS COMER;BH;607292.47;811797.42;465
+467;2001017798;B04002;HOMICIDIO CONSUM;RUA ALICE;40;170949;10/1/2001 17:02:00;CIDADAO COMUM;N;0;MORRO DAS PEDRAS;BH;607996.88;793885.89;466
+468;2001017995;B06000;LESAO CORPORAL;AV PRESIDENTE AN;7920;4461;10/1/2001 18:34:00;CIDADAO COMUM;S;;SAO LUIZ;BH;608635.14;804693.17;467
+469;2001018012;B03000;AMEACA;RUA ITAJUBA;580;35495;10/1/2001 18:42:00;CIDADAO COMUM;S;0;FLORESTA;BH;612088.81;797996.25;468
+470;2001018298;B03000;AMEACA;RUA CARVALHOS;219;13788;10/1/2001 21:14:00;CIDADAO COMUM;S;0;MANGABEIRAS;BH;612116.96;792573.56;469
+471;2001018321;B06000;LESAO CORPORAL;RUA FRANCISCO JO;545;118223;10/1/2001 21:26:00;CIDADAO COMUM;S;;ITAIPU BH;BH;599752.96;789472.97;470
+472;2001018328;B06000;LESAO CORPORAL;RUA OMAR GOMES D;16;24259;10/1/2001 21:29:00;CIDADAO COMUM;S;;CH VALE DO JATOB;BH;600890.73;787146.97;471
+473;2001018400;B03000;AMEACA;RUA LEOPOLDO GOM;1663;40770;10/1/2001 22:08:00;INICIATIVA;N;0;VERA CRUZ;BH;616032.33;798192.27;472
+474;2001018405;B03000;AMEACA;RUA OCARA;80;49065;10/1/2001 22:10:00;CIDADAO COMUM;S;0;VILA MARAVILHAS;BH;603299.78;795546.30;473
+475;2001018407;B06000;LESAO CORPORAL;RUA VOLTS;40;73626;10/1/2001 22:10:00;CIDADAO COMUM;S;;PRIMEIRO DE MAIO;BH;612172.58;803421.57;474
+476;2001018430;B03000;AMEACA;RUA CIRILO GASPA;326;63348;10/1/2001 22:22:00;CIDADAO COMUM;S;;APARECIDA SETIMA;BH;608684.85;800162.78;475
+477;2001018441;B04001;HOMICIDIO TENTAD;RUA TUCUMAN;50;69823;10/1/2001 22:26:00;CIDADAO COMUM;S;;SAO GERALDO;BH;614856.59;799413.07;476
+478;2001018450;B06000;LESAO CORPORAL;RUA ZILAH RODRIG;48;74008;10/1/2001 22:31:00;CIDADAO COMUM;N;A;NOVA BARROCA;BH;607546.31;792666.26;477
+479;2001018473;B03000;AMEACA;RUA NOVA REPUBLI;212;130110;10/1/2001 22:51:00;CIDADAO COMUM;S;;CEU AZUL;BH;603826.50;807802.31;478
+480;2001018533;B03000;AMEACA;RUA CONSELHEIRO ;14;17095;10/1/2001 23:18:00;CIDADAO COMUM;S;CS2;CENTRO (BH);BH;612530.47;797030.47;479
+481;2001018563;B08000;VIOLACAO DE DOMI;RUA FERNAO DIAS;73;28133;10/1/2001 23:36:00;CIDADAO COMUM;S;0;CASA BRANCA;BH;615967.41;798817.35;480
+482;2001018571;B04001;HOMICIDIO TENTAD;RUA CURRAL DEL R;201;19122;10/1/2001 23:39:00;CIDADAO COMUM;S;;CABANA;BH;604797.75;793784.12;481
+483;2001018601;B04002;HOMICIDIO CONSUM;RUA FREI LUIZ DE;215;29961;10/1/2001 23:56:00;CIDADAO COMUM;N;;JOAO PINHEIRO;BH;604640.64;796058.63;482
+484;2001018615;B03000;AMEACA;RUA NAVAJOS;190;47334;11/1/2001 00:02:00;CIDADAO COMUM;S;0;SANTA MONICA;BH;607290.06;807088.32;483
+485;2001018627;B03000;AMEACA;RUA CHAFARIZ;81;300275;11/1/2001 00:12:00;CIDADAO COMUM;S;;HAVAI;BH;607397.53;793768.20;484
+486;2001018652;B04001;HOMICIDIO TENTAD;RUA DONA CARMEM;512;22820;11/1/2001 00:28:00;CIDADAO COMUM;S;;SARANDI (URCA/BH;BH;603873.41;802278.24;485
+487;2001018751;B03000;AMEACA;RUA PADRE PEDRO ;2555;51657;11/1/2001 01:31:00;CIDADAO COMUM;N;0;JARDIM EUROPA;BH;607741.76;809685.90;486
+488;2001018774;B04001;HOMICIDIO TENTAD;AV ESPLANADA;63;126244;11/1/2001 01:57:00;CIDADAO COMUM;N;;SAO GABRIEL;BH;613213.55;804435.56;487
+489;2001018891;B06000;LESAO CORPORAL;RUA VINTE E DOIS;86;118702;11/1/2001 04:29:00;CIDADAO COMUM;S;0;CEU AZUL;BH;604192.72;807622.62;488
+490;2001018929;B06000;LESAO CORPORAL;AV BIAS FORTES;1603;9553;11/1/2001 05:51:00;CIDADAO COMUM;S;0;BARRO PRETO;BH;610264.01;797012.81;489
+491;2001018990;B06000;LESAO CORPORAL;RUA VENANCIO COR;133;70643;11/1/2001 07:21:00;CIDADAO COMUM;S;A;BARREIRO;BH;602024.26;791119.07;490
+492;2001019006;B03000;AMEACA;RUA PADRE ROLIM;850;51672;11/1/2001 07:40:00;CIDADAO COMUM;S;PX163;SANTA EFIGENIA;BH;612095.64;796347.69;491
+493;2001019049;B03000;AMEACA;RUA OITO;35;117287;11/1/2001 08:23:00;CIDADAO COMUM;N;;LINDEIA;BH;600021.70;790389.81;492
+494;2001019201;B03000;AMEACA;RUA LINCOLN;202;41136;11/1/2001 10:19:00;CIDADAO COMUM;N;;UNIAO;BH;612570.90;801367.78;493
+495;2001019205;B03000;AMEACA;RUA ARCABOUCO;40;5700;11/1/2001 10:20:00;CIDADAO COMUM;S;;PINDORAMA;BH;602278.45;797808.57;494
+496;2001019225;B03000;AMEACA;RUA COLONITA;3;16326;11/1/2001 10:31:00;CIDADAO COMUM;S;;SANTA TEREZINHA;BH;604791.25;802270.96;495
+497;2001019301;B03000;AMEACA;RUA HOFFMAN;863;33320;11/1/2001 11:20:00;CIDADAO COMUM;S;;SANTA CRUZ (BARR;BH;603059.63;788930.45;496
+498;2001019318;B03000;AMEACA;RUA WILSON TAVAR;960;118958;11/1/2001 11:33:00;CIDADAO COMUM;S;;TEIXEIRA DIAS;BH;602967.07;789432.38;497
+499;2001019379;B04001;HOMICIDIO TENTAD;RUA ESTACIO RODR;157;26194;11/1/2001 12:11:00;INICIATIVA;N;0;NOVA BARROCA;BH;607870.76;792669.98;498
+500;2001019390;B03000;AMEACA;RUA LUIZ LOPES;82;94431;11/1/2001 12:18:00;CIDADAO COMUM;S;0;OURO PRETO;BH;606237.42;801258.18;499
+501;2001019419;B06000;LESAO CORPORAL;RUA DOS TAMOIOS;350;66825;11/1/2001 12:41:00;CIDADAO COMUM;N;0;CENTRO (BH);BH;611013.54;797064.26;500
+502;2001019469;B03000;AMEACA;RUA IPANEMA;22;34726;11/1/2001 13:15:00;CIDADAO COMUM;S;;SARANDI (URCA/BH;BH;603482.92;802695.57;501
+503;2001019492;B03000;AMEACA;RUA EXPEDICIONAR;781;31627;11/1/2001 13:42:00;CIDADAO COMUM;N;;MARIA GORETTI;BH;614437.73;803006.94;502
+504;2001019537;B03000;AMEACA;AV AUGUSTO DE LI;1549;6731;11/1/2001 14:22:00;INICIATIVA;N;0;BARRO PRETO;BH;609833.79;796889.71;503
+505;2001019618;B03000;AMEACA;AV AGENOR DE PAU;285;86250;11/1/2001 15:32:00;CIDADAO COMUM;N;;JAQUELINE;BH;611475.70;810215.54;504
+506;2001019619;B03000;AMEACA;RUA DONA LUCI;26;86004;11/1/2001 15:31:00;CIDADAO COMUM;N;BL10    CS70;ESTRELA DALVA;BH;607207.00;791913.46;505
+507;2001019633;B04001;HOMICIDIO TENTAD;RUA POVOA DE VAR;437;54958;11/1/2001 15:40:00;CIDADAO COMUM;N;;PAQUETA;BH;605302.03;802656.56;506
+508;2001019673;B06000;LESAO CORPORAL;RUA GALENA;137;30491;11/1/2001 16:04:00;CIDADAO COMUM;S;;LAGOINHA;BH;610984.03;798720.81;507
+509;2001019682;B03000;AMEACA;RUA IBERTIOGA;256;33809;11/1/2001 16:14:00;CIDADAO COMUM;N;0;SAO JOAO BATISTA;BH;611151.93;801287.85;508
+510;2001019692;B03000;AMEACA;RUA FILOMENA GAS;450;62083;11/1/2001 16:19:00;CIDADAO COMUM;N;0;APARECIDA SETIMA;BH;608686.14;800564.39;509
+511;2001019760;B04001;HOMICIDIO TENTAD;AV SILVIANO BRAN;1970;66002;11/1/2001 16:52:00;CIDADAO COMUM;N;LJD;HORTO;BH;613169.88;797967.87;510
+512;2001019824;B06000;LESAO CORPORAL;AV AFONSO PENA;1212;1259;11/1/2001 17:25:00;CIDADAO COMUM;N;0;CENTRO (BH);BH;611387.08;796661.11;511
+513;2001019828;B03000;AMEACA;RUA APRIGIO RIBE;209;36403;11/1/2001 17:28:00;INICIATIVA;S;0;DOM JOAQUIM;BH;613772.67;801498.72;512
+514;2001019901;B03000;AMEACA;RUA CONDE DE LIN;315;16657;11/1/2001 18:08:00;CIDADAO COMUM;S;;CIDADE JARDIM;BH;610022.64;795071.12;513
+515;2001019913;B03000;AMEACA;RUA QUARENTA E D;90;106964;11/1/2001 18:18:00;CIDADAO COMUM;S;CAFRENT;NOVA CINTRA;BH;605544.50;793587.13;514
+516;2001019922;B03000;AMEACA;RUA REIS DE ABRE;227;63363;11/1/2001 18:21:00;CIDADAO COMUM;S;0;APARECIDA SETIMA;BH;608511.82;800590.42;515
+517;2001019950;B03000;AMEACA;RUA DOS TIMBIRAS;1986;67682;11/1/2001 18:37:00;CIDADAO COMUM;S;PX1986;LOURDES;BH;610826.13;796391.34;516
+518;2001019990;B08000;VIOLACAO DE DOMI;RUA CONSELHEIRO ;1715;17095;11/1/2001 18:59:00;CIDADAO COMUM;N;;SANTA EFIGENIA;BH;613260.28;797299.09;517
+519;2001020007;B06000;LESAO CORPORAL;RUA DOS TIMBIRAS;2674;67682;11/1/2001 19:05:00;CIDADAO COMUM;N;;SANTO AGOSTINHO;BH;610160.88;796568.65;518
+520;2001020011;B04002;HOMICIDIO CONSUM;RUA BANDONION;322;170139;11/1/2001 19:09:00;CIDADAO COMUM;S;0;VILA CAFEZAL;BH;614122.39;794785.34;519
+521;2001020022;B06000;LESAO CORPORAL;RUA LARANJEIRAS;285;40423;11/1/2001 19:14:00;CIDADAO COMUM;S;;LEBLON;BH;605674.28;809817.52;520
+522;2001020083;B06000;LESAO CORPORAL;RUA UM;460;27979;11/1/2001 19:47:00;CIDADAO COMUM;S;;CAPITAO EDUARDO;BH;618652.15;807023.45;521
+523;2001020163;B03000;AMEACA;RUA JOSE CARLOS ;137;19601;11/1/2001 20:24:00;CIDADAO COMUM;N;0;DAS INDUSTRIAS;BH;603937.17;793007.50;522
+524;2001020249;B03000;AMEACA;RUA B;331;99463;11/1/2001 21:18:00;CIDADAO COMUM;S;0;ANTONIO RIBEIRO ;BH;615177.80;808389.59;523
+525;2001020261;B03000;AMEACA;RUA SERRINHA;19;129201;11/1/2001 21:24:00;CIDADAO COMUM;S;0;INDEPENDENCIA;BH;600519.25;786719.95;524
+526;2001020469;B06000;LESAO CORPORAL;RUA DAS TABOADAS;15;300190;11/1/2001 23:20:00;CIDADAO COMUM;S;;SAO JOAO BATISTA;BH;608784.28;807980.25;525
+527;2001020505;B03000;AMEACA;RUA JABOTICABAL;1453;36517;11/1/2001 23:37:00;CIDADAO COMUM;N;;JARDIM AMERICA;BH;607241.48;793984.92;526
+528;2001020518;B06000;LESAO CORPORAL;RUA RUBENS DE SO;680;63060;11/1/2001 23:44:00;CIDADAO COMUM;S;;AARAO REIS;BH;612429.10;804993.67;527
+529;2001020611;B04002;HOMICIDIO CONSUM;RUA FREI ANTONIO;108;29845;12/1/2001 00:44:00;CIDADAO COMUM;N;AP202;NOVA CACHOEIRINH;BH;609550.05;801171.08;528
+530;2001020630;B04001;HOMICIDIO TENTAD;ALAMEDA INTERLIG;10;90270;12/1/2001 00:59:00;CIDADAO COMUM;N;0;SERRA VERDE;BH;609772.02;810394.22;529
+531;2001020637;B06000;LESAO CORPORAL;RUA ENCANTADO;299;25453;12/1/2001 01:06:00;CIDADAO COMUM;N;;CAICARA;BH;607616.04;799442.79;530
+532;2001020647;B04002;HOMICIDIO CONSUM;RUA SOCRATES;30;85953;12/1/2001 01:16:00;CIDADAO COMUM;N;;DOM SILVERIO;BH;615325.98;804426.93;531
+533;2001020688;B03000;AMEACA;AV SINFRONIO BRO;1210;66116;12/1/2001 01:45:00;CIDADAO COMUM;S;;BARREIRO;BH;602205.97;790748.09;532
+534;2001020758;B06000;LESAO CORPORAL;AV BRASIL;256;10420;12/1/2001 02:53:00;CIDADAO COMUM;N;PX246;SANTA EFIGENIA;BH;612788.88;796553.11;533
+535;2001020765;B06000;LESAO CORPORAL;AV FRANCISCO SAL;898;29669;12/1/2001 03:01:00;CIDADAO COMUM;N;0;SANTA EFIGENIA;BH;612234.65;796788.78;534
+536;2001020968;B03000;AMEACA;RUA MENOTTI MUCC;216;45468;12/1/2001 08:14:00;CIDADAO COMUM;S;;VILA OESTE;BH;603917.44;794443.61;535
+537;2001021032;B03000;AMEACA;RUA SAUDE;79;64164;12/1/2001 08:53:00;CIDADAO COMUM;S;AP102 B;PADRE EUSTAQUIO;BH;605543.58;797680.50;536
+538;2001021065;B06000;LESAO CORPORAL;RUA ALBATROZ;433;1753;12/1/2001 09:06:00;CIDADAO COMUM;N;BL4     CS107;VILA CLORIS;BH;610454.04;807552.45;537
+539;2001021099;B03000;AMEACA;RUA ALFENAS;455;2208;12/1/2001 09:25:00;CIDADAO COMUM;S;AP207;CRUZEIRO;BH;612352.66;794210.94;538
+540;2001021112;B06000;LESAO CORPORAL;RUA DELMO RENAUL;54;70596;12/1/2001 09:36:00;CIDADAO COMUM;N;CASA 2;AARAO REIS;BH;612861.79;804917.93;539
+541;2001021135;B08000;VIOLACAO DE DOMI;RUA PROFESSORA V;3;56893;12/1/2001 09:45:00;CIDADAO COMUM;N;**13**;CHACARAS REUNIDA;BH;605513.76;789431.48;540
+542;2001021145;B03000;AMEACA;RUA NICIAS CONTI;80;56115;12/1/2001 09:56:00;CIDADAO COMUM;S;;GAMELEIRA;BH;605599.41;795256.93;541
+543;2001021193;B08000;VIOLACAO DE DOMI;RUA IBIZA;27;85257;12/1/2001 10:38:00;CIDADAO COMUM;S;;JARDIM EUROPA;BH;608390.06;809789.59;542
+544;2001021300;B03000;AMEACA;RUA GAMA;82;30536;12/1/2001 12:10:00;CIDADAO COMUM;S;;BONFIM;BH;610070.14;798082.23;543
+545;2001021343;B03000;AMEACA;AV DOUTOR CRISTI;50;62459;12/1/2001 12:32:00;CIDADAO COMUM;N;0;VILA CLORIS;BH;609728.30;807891.34;544
+546;2001021380;B06000;LESAO CORPORAL;RUA CORONEL COST;275;10809;12/1/2001 13:01:00;CIDADAO COMUM;S;0;PLANALTO;BH;610783.13;806561.04;545
+547;2001021382;B03000;AMEACA;RUA CAMELIA;80;11842;12/1/2001 12:58:00;CIDADAO COMUM;S;;BANDEIRANTES DO ;BH;606332.11;793590.42;546
+548;2001021454;B03000;AMEACA;RUA SACADURA CAB;18;59807;12/1/2001 13:49:00;CIDADAO COMUM;S;;VILA OESTE;BH;604480.03;795002.18;547
+549;2001021499;B03000;AMEACA;RUA VITORIA;294;73480;12/1/2001 14:21:00;CIDADAO COMUM;S;0;NOVA CACHOEIRINH;BH;609645.56;801127.17;548
+550;2001021699;B06000;LESAO CORPORAL;RUA TREMEDAL;76;68240;12/1/2001 16:35:00;CIDADAO COMUM;N;0;CARLOS PRATES;BH;609427.34;797783.99;549
+551;2001021709;B03000;AMEACA;RUA JUIZ DE FORA;1381;39455;12/1/2001 16:43:00;INICIATIVA;N;0;BARRO PRETO;BH;609377.30;795937.94;550
+552;2001021758;B04001;HOMICIDIO TENTAD;RUA LUPERCIO PAI;358;57335;12/1/2001 17:11:00;CIDADAO COMUM;N;;TIROL;BH;599905.68;788964.16;551
+553;2001021814;B06000;LESAO CORPORAL;RUA FLOR D'AGUA;375;28565;12/1/2001 17:41:00;CIDADAO COMUM;N;;JARDIM MONTANHES;BH;605701.81;799712.75;552
+554;2001021873;B06000;LESAO CORPORAL;RUA FELIPE DOS S;531;27953;12/1/2001 18:19:00;POLICIAL MILITAR;S;0;LOURDES;BH;610274.10;795492.35;553
+555;2001021878;B04001;HOMICIDIO TENTAD;RUA VALERIO;108;71268;12/1/2001 18:20:00;CIDADAO COMUM;S;C;PIRAJA;BH;613129.62;803028.68;554
+556;2001021881;B03000;AMEACA;RUA ESTADOS UNID;361;26239;12/1/2001 18:20:00;POLICIAL MILITAR;S;0;COPACABANA;BH;606126.26;806325.42;555
+557;2001021906;B04001;HOMICIDIO TENTAD;AV CRISTIANO MAC;5387;18652;12/1/2001 18:39:00;CIDADAO COMUM;N;;DOS PALMARES;BH;612255.52;802177.46;556
+558;2001021970;B03000;AMEACA;RUA MONTE SIAO;576;46559;12/1/2001 19:10:00;CIDADAO COMUM;S;;SERRA;BH;613413.20;795071.16;557
+559;2001022011;B03000;AMEACA;RUA MONTES CLARO;348;46650;12/1/2001 19:30:00;CIDADAO COMUM;S;AP803;CARMO;BH;611781.30;794373.73;558
+560;2001022094;B06000;LESAO CORPORAL;RUA SERRINHA;40;129201;12/1/2001 20:15:00;CIDADAO COMUM;S;0;INDEPENDENCIA;BH;600457.30;786999.51;559
+561;2001022109;B03000;AMEACA;RUA DES TINOCO;577;20028;12/1/2001 20:21:00;CIDADAO COMUM;S;;MONSENHOR MESSIA;BH;606789.83;798133.46;560
+562;2001022128;B03000;AMEACA;RUA SACADURA CAB;413;59807;12/1/2001 20:31:00;CIDADAO COMUM;S;;VILA OESTE;BH;604119.86;795095.14;561
+563;2001022135;B06000;LESAO CORPORAL;AV DO CONTORNO;1368;17228;12/1/2001 20:35:00;CIDADAO COMUM;S;0;CENTRO (BH);BH;611964.60;797777.29;562
+564;2001022152;B06000;LESAO CORPORAL;RUA MORUNGABA;402;85981;12/1/2001 20:45:00;CIDADAO COMUM;S;0;MARILANDIA (IB);IB;599619.85;788524.08;563
+565;2001022176;B06000;LESAO CORPORAL;AV SANTOS DUMONT;305;61950;12/1/2001 20:59:00;CIDADAO COMUM;S;PX305;CENTRO (BH);BH;611328.73;797470.25;564
+566;2001022189;B06000;LESAO CORPORAL;RUA PROFESSOR ME;289;77920;12/1/2001 21:02:00;CIDADAO COMUM;S;;MANGABEIRAS;BH;612132.44;792715.35;565
+567;2001022190;B06000;LESAO CORPORAL;RUA SAO JOAO DA ;380;62900;12/1/2001 21:02:00;CIDADAO COMUM;S;;SANTA BRANCA;BH;608313.33;806933.86;566
+568;2001022233;B06000;LESAO CORPORAL;RUA MIGUEL GOMES;354;70757;12/1/2001 21:25:00;CIDADAO COMUM;N;;MANTIQUEIRA;BH;606993.39;812216.05;567
+569;2001022245;B06000;LESAO CORPORAL;AV SILVA LOBO;620;65889;12/1/2001 21:33:00;CIDADAO COMUM;N;0;CALAFATE;BH;607644.28;796106.65;568
+570;2001022298;B04001;HOMICIDIO TENTAD;RUA DOS COMANCHE;25;16367;12/1/2001 22:02:00;INICIATIVA;S;0;ITAMARATI;BH;607092.27;806826.66;569
+571;2001022305;B04001;HOMICIDIO TENTAD;AV COLETORA;1064;78241;12/1/2001 22:07:00;CIDADAO COMUM;S;;VILA PINHO;BH;602444.19;787672.15;570
+572;2001022335;B03000;AMEACA;RUA CORNELIO CER;23;17417;12/1/2001 22:19:00;CIDADAO COMUM;S;;PADRE EUSTAQUIO;BH;606440.81;797810.81;571
+573;2001022393;B04001;HOMICIDIO TENTAD;RUA CAMILO DE BR;636;11896;12/1/2001 22:52:00;CIDADAO COMUM;S;;PADRE EUSTAQUIO;BH;605855.99;798012.24;572
+574;2001022466;B04001;HOMICIDIO TENTAD;RUA PADRE CAFE;1215;51253;12/1/2001 23:35:00;INICIATIVA;S;0;VERA CRUZ;BH;616153.74;797899.31;573
+575;2001022624;B03000;AMEACA;RUA SOARES NOGUE;161;66220;13/1/2001 01:08:00;CIDADAO COMUM;N;AP2;VILA MAGNESITA;BH;602235.99;794935.65;574
+576;2001022733;B06000;LESAO CORPORAL;RUA POUSO ALEGRE;2522;54932;13/1/2001 02:19:00;CIDADAO COMUM;N;BLC APTO201;FLORESTA;BH;613435.30;798084.21;575
+577;2001022750;B05000;SEQUESTRO E CARC;RUA JOSE BARSAND;190;88734;13/1/2001 02:25:00;POLICIAL MILITAR;S;SL301;DOS PALMARES;BH;612127.41;802150.37;576
+578;2001022797;B02000;RIXA;AV RAJA GABAGLIA;2985;57830;13/1/2001 03:02:00;CIDADAO COMUM;N;0;ESTORIL;BH;609208.29;792438.19;577
+579;2001022800;B02000;RIXA;RUA JOAO SAMAHA;271;7397;13/1/2001 03:06:00;CIDADAO COMUM;S;0;SANTA BRANCA;BH;608625.93;807245.10;578
+580;2001022809;B06000;LESAO CORPORAL;RUA DESENGANO;42;19860;13/1/2001 03:12:00;CIDADAO COMUM;S;CSFRE;MANGABEIRAS;BH;612203.19;792486.25;579
+581;2001022884;B06000;LESAO CORPORAL;RUA ABRAHAO JOAO;191;80859;13/1/2001 04:05:00;CIDADAO COMUM;N;;PARQUE SAO JOSE;BH;606953.95;792329.56;580
+582;2001022924;B03000;AMEACA;RUA GONCALVES DE;304;31582;13/1/2001 04:39:00;CIDADAO COMUM;S;;CAMARGOS;BH;602331.85;794593.77;581
+583;2001022931;B04001;HOMICIDIO TENTAD;RUA DOS CAETES;435;11376;13/1/2001 04:44:00;INICIATIVA;N;0;CENTRO BH;BH;611180.00;797412.98;582
+584;2001022940;B04001;HOMICIDIO TENTAD;RUA FERNAO DIAS;1855;28133;13/1/2001 04:51:00;INICIATIVA;S;0;JONAS VEIGA;BH;616249.53;797464.28;583
+585;2001023136;B06000;LESAO CORPORAL;RUA DOS GUARANIS;301;32181;13/1/2001 08:34:00;INICIATIVA;S;0;CENTRO (BH);BH;610722.99;797339.12;584
+586;2001023150;B06000;LESAO CORPORAL;RUA CARLINDO COS;83;97294;13/1/2001 08:45:00;CIDADAO COMUM;S;0;EYMARD;BH;613742.58;803685.81;585
+587;2001023177;B06000;LESAO CORPORAL;RUA EUFRATES;9;26821;13/1/2001 09:06:00;CIDADAO COMUM;S;CAFU;COQUEIROS;BH;603406.63;799967.72;586
+588;2001023319;B03000;AMEACA;RUA CARAVELAS;155;13141;13/1/2001 11:09:00;CIDADAO COMUM;N;0;VERA CRUZ;BH;615531.31;798475.90;587
+589;2001023341;B03000;AMEACA;AV SOCIAIS;80;12959;13/1/2001 11:21:00;CIDADAO COMUM;S;0;JARDIM VITORIA;BH;615537.12;803931.69;588
+590;2001023347;B03000;AMEACA;RUA RIACHUELO;501;58527;13/1/2001 11:24:00;CIDADAO COMUM;N;BLA     AP102;CARLOS PRATES;BH;608088.93;797566.54;589
+591;2001023411;B06000;LESAO CORPORAL;RUA ARGEMIRO BAE;80;93022;13/1/2001 12:27:00;CIDADAO COMUM;N;;INDEPENDENCIA;BH;601241.15;785911.18;590
+592;2001023455;B03000;AMEACA;RUA ALGA MARINHA;883;66623;13/1/2001 12:54:00;CIDADAO COMUM;S;CAFU;FLORAMAR;BH;610844.23;807388.97;591
+593;2001023505;B06000;LESAO CORPORAL;RUA CAMILO DE BR;636;11896;13/1/2001 13:39:00;CIDADAO COMUM;S;;PADRE EUSTAQUIO;BH;605855.99;798012.24;592
+594;2001023540;B06000;LESAO CORPORAL;RUA GURUPA;130;32557;13/1/2001 14:05:00;CIDADAO COMUM;S;;CACHOEIRINHA;BH;610294.19;801115.97;593
+595;2001023568;B03000;AMEACA;RUA GENOVEVA DE ;571;30970;13/1/2001 14:20:00;CIDADAO COMUM;S;0;SAGRADA FAMILIA;BH;612420.80;798614.04;594
+596;2001023670;B03000;AMEACA;RUA AVELEDA;72;6987;13/1/2001 15:17:00;CIDADAO COMUM;S;;PINDORAMA;BH;602756.68;797541.67;595
+597;2001023695;B03000;AMEACA;RUA JOSE PEDRO D;454;78560;13/1/2001 15:28:00;POLICIAL MILITAR;N;0;VILA SANTA RITA;BH;601506.24;787345.07;596
+598;2001023732;B06000;LESAO CORPORAL;RUA OLIVIO RODRI;13;49976;13/1/2001 15:55:00;POLICIAL MILITAR;N;0;NOVA VISTA;BH;615133.79;800903.01;597
+599;2001023788;B03000;AMEACA;RUA VINTE E OITO;35;72967;13/1/2001 16:33:00;CIDADAO COMUM;S;0;ALTO DOS PINHEIR;BH;603829.39;795965.50;598
+600;2001023807;B06000;LESAO CORPORAL;RUA DAS DRACENAS;600;33461;13/1/2001 16:47:00;INICIATIVA;S;0;LINDEIA;BH;598761.19;790775.84;599
+601;2001023819;B03000;AMEACA;AV NOSSA SENHORA;693;47996;13/1/2001 16:53:00;CIDADAO COMUM;N;0;CARMO;BH;611528.60;794103.66;600
+602;2001023843;B06000;LESAO CORPORAL;RUA MARIA ANALIA;32;300366;13/1/2001 17:05:00;CIDADAO COMUM;N;0;POMPEIA;BH;606878.92;808915.74;601
+603;2001023897;B06000;LESAO CORPORAL;AV WARLEY APAREC;150;78529;13/1/2001 17:36:00;CIDADAO COMUM;S;0;VILA COLUMBIARA;BH;603986.17;788979.48;602
+604;2001023907;B06000;LESAO CORPORAL;BECO DO INDIO;42;301593;13/1/2001 17:44:00;CIDADAO COMUM;N;;CAFEZAL;BH;614068.93;794877.88;603
+605;2001023949;B03000;AMEACA;RUA RADIALISTA D;298;99334;13/1/2001 18:06:00;CIDADAO COMUM;S;;CEU AZUL;BH;605040.80;807668.88;604
+606;2001023955;B04001;HOMICIDIO TENTAD;RUA FRANCISCO MA;465;89447;13/1/2001 18:10:00;CIDADAO COMUM;N;;CH JATOBA IV;BH;600305.09;787628.76;605
+607;2001024066;B06000;LESAO CORPORAL;RUA BADARO JUNIO;27;7532;13/1/2001 19:06:00;CIDADAO COMUM;S;0;PRIMEIRO DE MAIO;BH;612043.50;803566.82;606
+608;2001024138;B04002;HOMICIDIO CONSUM;BECO SAO JOAO DE;150;171084;13/1/2001 19:54:00;CIDADAO COMUM;N;0;CABANA;BH;604617.23;793823.45;607
+609;2001024150;B04001;HOMICIDIO TENTAD;AV NOSSA SENHORA;1030;47996;13/1/2001 19:58:00;CIDADAO COMUM;S;0;SAO PEDRO;BH;611365.27;793876.27;608
+610;2001024222;B03000;AMEACA;RUA BARAUNAS;63;80124;13/1/2001 20:30:00;CIDADAO COMUM;S;0;VILA INDAIA;BH;609882.06;802973.44;609
+611;2001024243;B03000;AMEACA;RUA CARLOS PEIXO;186;13485;13/1/2001 20:37:00;CIDADAO COMUM;N;AP201;SAO LUCAS;BH;613570.29;796453.95;610
+612;2001024248;B06000;LESAO CORPORAL;RUA PONTA GROSSA;895;14900;13/1/2001 20:42:00;CIDADAO COMUM;S;0;MILIONARIOS;BH;604801.53;790245.22;611
+613;2001024306;B03000;AMEACA;RUA GREGORIO DE ;175;31885;13/1/2001 21:01:00;CIDADAO COMUM;S;;SANTA EFIGENIA;BH;613997.42;796252.13;612
+614;2001024307;B03000;AMEACA;RUA GABRO;423;30435;13/1/2001 21:01:00;INICIATIVA;S;0;SANTA TEREZA;BH;612938.43;797259.63;613
+615;2001024312;B06000;LESAO CORPORAL;RUA SERRINHA;26;129201;13/1/2001 21:01:00;CIDADAO COMUM;N;0;INDEPENDENCIA;BH;600458.57;786991.65;614
+616;2001024322;B02000;RIXA;RUA DELEGADO PAU;180;90469;13/1/2001 21:07:00;CIDADAO COMUM;N;0;SAO MARCOS;BH;614606.28;802323.69;615
+617;2001024348;B03000;AMEACA;AV PRESIDENTE TA;696;35366;13/1/2001 21:18:00;CIDADAO COMUM;S;CAA;JARDIM MONTANHES;BH;605568.94;799837.94;616
+618;2001024356;B03000;AMEACA;AV DO CONTORNO;10888;17228;13/1/2001 21:22:00;INICIATIVA;S;0;BARRO PRETO;BH;610124.53;797278.95;617
+619;2001024374;B03000;AMEACA;RUA OTAVIO OTONI;49;50626;13/1/2001 21:31:00;CIDADAO COMUM;S;AP201;UNIAO;BH;613006.36;800792.50;618
+620;2001024381;B04001;HOMICIDIO TENTAD;RUA DAS PETUNIAS;110;11870;13/1/2001 21:35:00;CIDADAO COMUM;S;;LINDEIA;BH;599571.37;791092.66;619
+621;2001024384;B03000;AMEACA;RUA NOVA ESPERAN;19;83898;13/1/2001 21:37:00;CIDADAO COMUM;S;0;CEU AZUL;BH;604441.83;807900.54;620
+622;2001024479;B03000;AMEACA;RUA M;81;37812;13/1/2001 22:18:00;CIDADAO COMUM;S;;MINASCAIXA;BH;609087.53;810096.51;621
+623;2001024482;B03000;AMEACA;BECO PARAISO;12;302036;13/1/2001 22:18:00;INICIATIVA;N;0;PALMEIRAS;BH;606213.48;790637.47;622
+624;2001024488;B04002;HOMICIDIO CONSUM;RUA CRISTALIA;47;70899;13/1/2001 22:21:00;CIDADAO COMUM;N;0;PROVIDENCIA;BH;612455.05;804419.38;623
+625;2001024563;B06000;LESAO CORPORAL;AV MEM DE SA;207;45395;13/1/2001 23:02:00;INICIATIVA;N;0;PARAISO;BH;614125.51;797081.42;624
+626;2001024572;B03000;AMEACA;RUA VIRGILIO;70;73150;13/1/2001 23:06:00;CIDADAO COMUM;S;CAFR;PATROCINIO;BH;603914.84;799134.72;625
+627;2001024630;B03000;AMEACA;AV CRISTIANO MAC;880;18652;13/1/2001 23:41:00;CIDADAO COMUM;S;0;DA GRACA;BH;612307.14;799463.41;626
+628;2001024676;B09000;ABANDONO DE INCA;RUA CONCEICAO TE;180;22921;14/1/2001 00:04:00;CIDADAO COMUM;S;;NAZARE;BH;615576.95;804459.95;627
+629;2001024698;B04001;HOMICIDIO TENTAD;AV FRANCISCO SA;830;29656;14/1/2001 00:14:00;CIDADAO COMUM;N;0;PRADO;BH;608886.90;796021.80;628
+630;2001024708;B04001;HOMICIDIO TENTAD;RUA SAO JOSE DE ;689;63120;14/1/2001 00:19:00;CIDADAO COMUM;S;CSA;BOA VISTA;BH;616023.69;800139.76;629
+631;2001024734;B09000;ABANDONO DE INCA;RUA HENRIQUE BAD;117;86020;14/1/2001 00:33:00;CIDADAO COMUM;S;0;ESTRELA DALVA;BH;607188.76;792453.56;630
+632;2001024767;B03000;AMEACA;RUA JOSE PEDRO D;319;78560;14/1/2001 01:03:00;CIDADAO COMUM;N;;VILA SANTA RITA;BH;601528.97;787235.11;631
+633;2001024785;B03000;AMEACA;PRACA RAUL SOARE;259;58010;14/1/2001 01:12:00;CIDADAO COMUM;S;;BARRO PRETO;BH;610365.17;796828.93;632
+634;2001024808;B03000;AMEACA;RUA BOLIVAR FERR;217;89995;14/1/2001 01:26:00;CIDADAO COMUM;N;0;PALMEIRAS;BH;607417.17;791603.80;633
+635;2001024829;B03000;AMEACA;RUA PADRE LEOPOL;658;14185;14/1/2001 01:36:00;CIDADAO COMUM;S;;JOAO PINHEIRO;BH;604726.86;795773.34;634
+636;2001024858;B02000;RIXA;RUA OPALA;12;50263;14/1/2001 01:48:00;CIDADAO COMUM;N;BAR NIKAS BAR NO;CRUZEIRO;BH;612338.91;794504.06;635
+637;2001024860;B06000;LESAO CORPORAL;RUA MAJOR DELFIN;2798;42620;14/1/2001 01:48:00;CIDADAO COMUM;S;;SAO FRANCISCO;BH;608833.07;801262.09;636
+638;2001024964;B06000;LESAO CORPORAL;RUA DAS CANOAS;336;12669;14/1/2001 03:02:00;CIDADAO COMUM;S;;ESTRELA DO ORIEN;BH;605685.71;792606.93;637
+639;2001025010;B03000;AMEACA;RUA DOS COMANCHE;709;16367;14/1/2001 03:32:00;CIDADAO COMUM;S;;ITAMARATI;BH;606559.95;807215.50;638
+640;2001025024;B06000;LESAO CORPORAL;AV ELISIO DE BRI;5;25251;14/1/2001 03:41:00;CIDADAO COMUM;N;0;BOA VISTA;BH;614339.09;799657.38;639
+641;2001025040;B04001;HOMICIDIO TENTAD;AV RAJA GABAGLIA;1315;57830;14/1/2001 03:50:00;CIDADAO COMUM;N;0;MORRO DAS PEDRAS;BH;609086.55;794205.08;640
+642;2001025118;B03000;AMEACA;RUA BERNARDO GUI;1313;9364;14/1/2001 05:03:00;CIDADAO COMUM;N;;FUNCIONARIOS;BH;611312.78;795943.41;641
+643;2001025165;B06000;LESAO CORPORAL;RUA ALCIDES PERE;306;107711;14/1/2001 05:52:00;CIDADAO COMUM;S;;MANTIQUEIRA;BH;606823.28;811840.98;642
+644;2001025288;B03000;AMEACA;RUA DAS CARMELIT;34;121401;14/1/2001 08:29:00;INICIATIVA;N;0;PLANALTO;BH;610545.05;805542.73;643
+645;2001025312;B02000;RIXA;RUA CINCO;180;302813;14/1/2001 08:57:00;CIDADAO COMUM;S;;NOVO AARAO REIS;BH;614547.56;805977.33;644
+646;2001025318;B03000;AMEACA;RUA CONSELHEIRO ;2379;17095;14/1/2001 09:03:00;CIDADAO COMUM;S;0;SANTA EFIGENIA;BH;613824.99;797328.11;645
+647;2001025431;B06000;LESAO CORPORAL;RUA CLAUDINOR ME;52;113610;14/1/2001 10:44:00;CIDADAO COMUM;S;FU;MINASCAIXA;BH;609563.18;809229.69;646
+648;2001025477;B03000;AMEACA;RUA JAQUES ROBER;345;36992;14/1/2001 11:30:00;CIDADAO COMUM;S;;SAO MARCOS;BH;614136.47;802428.12;647
+649;2001025479;B04001;HOMICIDIO TENTAD;AV JOSE BONIFACI;306;38579;14/1/2001 11:33:00;INICIATIVA;N;0;PRADO LOPES;BH;610119.54;799105.82;648
+650;2001025546;B06000;LESAO CORPORAL;RUA CAIO VIANA M;604;11477;14/1/2001 12:40:00;CIDADAO COMUM;S;;ARAGUAIA;BH;604706.23;789321.47;649
+651;2001025586;B03000;AMEACA;RUA CANANEIA;729;12400;14/1/2001 13:06:00;CIDADAO COMUM;S;0;ADELAIDE;BH;607461.12;798380.05;650
+652;2001025600;B03000;AMEACA;RUA ABATI;157;574;14/1/2001 13:12:00;CIDADAO COMUM;S;;SANTA MARIA;BH;603141.19;795508.74;651
+653;2001025607;B03000;AMEACA;AV MEM DE SA;1624;45395;14/1/2001 13:18:00;CIDADAO COMUM;S;0;SANTA EFIGENIA;BH;614287.39;796014.50;652
+654;2001025663;B04001;HOMICIDIO TENTAD;RUA JOSE SABINO ;310;98911;14/1/2001 14:03:00;CIDADAO COMUM;S;0;LAGOA;BH;604678.65;809376.42;653
+655;2001025686;B03000;AMEACA;RUA CRACOVIA;240;85317;14/1/2001 14:24:00;CIDADAO COMUM;S;0;JARDIM EUROPA;BH;608352.36;810508.56;654
+656;2001025687;B03000;AMEACA;AV UM;730;110679;14/1/2001 14:25:00;INICIATIVA;N;0;JARDIM GUANABARA;BH;611764.80;807968.67;655
+657;2001025705;B05000;SEQUESTRO E CARC;RUA DA BAHIA;507;81155;14/1/2001 14:39:00;CIDADAO COMUM;N;AN8;CENTRO (BH);BH;611425.43;797129.06;656
+658;2001025741;B03000;AMEACA;RUA MARIA DE LOU;112;50540;14/1/2001 15:03:00;CIDADAO COMUM;N;;DAS INDUSTRIAS;BH;604565.35;792282.09;657
+659;2001025765;B06000;LESAO CORPORAL;RUA SOCRATES ALV;146;95144;14/1/2001 15:15:00;CIDADAO COMUM;N;0;VIRGINIA;BH;603128.23;794618.01;658
+660;2001025783;B06000;LESAO CORPORAL;ALAMEDA EZEQUIEL;225;27446;14/1/2001 15:28:00;CIDADAO COMUM;N;;CENTRO (BH);BH;611899.54;796686.86;659
+661;2001025788;B06000;LESAO CORPORAL;RUA JUATUBA;42;39367;14/1/2001 15:30:00;CIDADAO COMUM;S;;VISTA ALEGRE;BH;605262.83;793420.62;660
+662;2001025805;B03000;AMEACA;RUA JOSE MARIA B;549;38380;14/1/2001 15:37:00;CIDADAO COMUM;S;;SANTA MONICA;BH;607631.11;807779.33;661
+663;2001025826;B06000;LESAO CORPORAL;RUA FLOR DO BESO;252;28492;14/1/2001 15:55:00;CIDADAO COMUM;S;;JARDIM MONTANHES;BH;605981.94;799070.49;662
+664;2001025867;B03000;AMEACA;RUA LUPERCIO PAI;206;57335;14/1/2001 16:14:00;CIDADAO COMUM;S;;TIROL;BH;599910.51;788988.30;663
+665;2001025948;B03000;AMEACA;RUA CARMO DA CAC;54;13659;14/1/2001 16:59:00;CIDADAO COMUM;S;0;SALGADO FILHO;BH;606116.87;794269.97;664
+666;2001025963;B06000;LESAO CORPORAL;RUA EUCLASIO;275;26787;14/1/2001 17:07:00;CIDADAO COMUM;S;;SANTA EFIGENIA;BH;613747.64;796622.12;665
+667;2001025964;B06000;LESAO CORPORAL;RUA CINQUENTA;165;302845;14/1/2001 17:07:00;CIDADAO COMUM;S;;TUPI;BH;614216.87;805557.43;666
+668;2001025991;B03000;AMEACA;RUA 4;63;19352;14/1/2001 17:20:00;CIDADAO COMUM;N;;PAULO SEXTO;BH;616421.68;807028.64;667
+669;2001026009;B03000;AMEACA;AV SEN LEVINDO C;4005;14866;14/1/2001 17:28:00;CIDADAO COMUM;S;;CH VALE DO JATOB;BH;601311.25;786581.21;668
+670;2001026010;B06000;LESAO CORPORAL;RUA CONSELHEIRO ;88;17067;14/1/2001 17:32:00;CIDADAO COMUM;N;;SANTO ANDRE;BH;609523.31;798729.48;669
+671;2001026051;B03000;AMEACA;RUA MARTE;128;44916;14/1/2001 17:47:00;CIDADAO COMUM;S;;SANTA LUCIA;BH;610133.28;791493.83;670
+672;2001026100;B03000;AMEACA;RUA FORMOSA;195;29149;14/1/2001 18:10:00;CIDADAO COMUM;S;;HORTO;BH;613302.97;797777.02;671
+673;2001026113;B03000;AMEACA;RUA JACINTO OLAU;186;36690;14/1/2001 18:15:00;CIDADAO COMUM;S;;SANTA CRUZ;BH;610317.15;802037.66;672
+674;2001026152;B09000;ABANDONO DE INCA;RUA PAPOULA;36;31844;14/1/2001 18:38:00;CIDADAO COMUM;S;;REGINA;BH;598758.69;790411.48;673
+675;2001026224;B03000;AMEACA;RUA PAULO DE FRO;95;52722;14/1/2001 19:14:00;INICIATIVA;N;0;CENTRO (BH);BH;610759.34;797631.71;674
+676;2001026226;B03000;AMEACA;BECO DAS MARIAS;39;301279;14/1/2001 19:15:00;CIDADAO COMUM;S;;MORRO DO PAPAGAI;BH;610478.54;793616.03;675
+677;2001026247;B03000;AMEACA;RUA DUZENTOS E Q;22;24321;14/1/2001 19:26:00;CIDADAO COMUM;N;0;CH VALE DO JATOB;BH;600599.26;787072.73;676
+678;2001026254;B04001;HOMICIDIO TENTAD;RUA SAO VICENTE;86;88126;14/1/2001 19:28:00;CIDADAO COMUM;S;;GRANJA FREITAS;BH;617022.85;798456.93;677
+679;2001026321;B06000;LESAO CORPORAL;RUA SAO JOAO DE ;166;110073;14/1/2001 19:58:00;CIDADAO COMUM;S;;PILAR;BH;607626.60;788623.46;678
+680;2001026324;B06000;LESAO CORPORAL;PRACA CORACAO EU;170;27865;14/1/2001 19:59:00;CIDADAO COMUM;N;AP203;CORACAO EUCARIST;BH;605810.66;796462.32;679
+681;2001026348;B03000;AMEACA;RUA DOUTOR ALIPI;564;2365;14/1/2001 20:09:00;CIDADAO COMUM;N;;CAFEZAL;BH;613838.04;794600.97;680
+682;2001026360;B06000;LESAO CORPORAL;RUA VINTE E OITO;50;33231;14/1/2001 20:12:00;CIDADAO COMUM;S;LJ1;CONJUNTO FELICID;BH;612370.27;807127.34;681
+683;2001026361;B06000;LESAO CORPORAL;RUA JOSE AUGUSTO;113;126257;14/1/2001 20:12:00;CIDADAO COMUM;S;REF:PADARIA ALIN;SAO GABRIEL;BH;613394.90;804456.58;682
+684;2001026416;B04001;HOMICIDIO TENTAD;AV DOM PEDRO II;356;53145;14/1/2001 20:48:00;CIDADAO COMUM;N;0;BONFIM;BH;610241.25;797885.18;683
+685;2001026434;B03000;AMEACA;RUA DESEMBARGADO;601;19986;14/1/2001 20:49:00;CIDADAO COMUM;S;0;SERRA;BH;613943.78;794925.46;684
+686;2001026446;B04001;HOMICIDIO TENTAD;RUA ARACITABA;30;127032;14/1/2001 20:58:00;CIDADAO COMUM;S;;MINASLANDIA;BH;611804.35;804462.96;685
+687;2001026452;B06000;LESAO CORPORAL;RUA FURTADO DE M;292;30158;14/1/2001 21:00:00;CIDADAO COMUM;S;;SAO TOMAZ;BH;609763.86;805611.19;686
+688;2001026471;B06000;LESAO CORPORAL;RUA ABELARDO CHA;175;118208;14/1/2001 21:06:00;CIDADAO COMUM;N;;CH TUNEL DE IBIR;BH;599752.96;789832.81;687
+689;2001026514;B06000;LESAO CORPORAL;AV BIAS FORTES;1660;9553;14/1/2001 21:30:00;CIDADAO COMUM;S;;CENTRO (BH);BH;610287.90;797080.46;688
+690;2001026532;B06000;LESAO CORPORAL;AV PRESIDENTE AN;8281;4461;14/1/2001 21:43:00;CIDADAO COMUM;S;;SAO LUIZ;BH;608284.86;804912.96;689
+691;2001026561;B06000;LESAO CORPORAL;RUA LUNDS FERREI;426;41920;14/1/2001 21:53:00;CIDADAO COMUM;S;0;NOVA VISTA;BH;615413.68;800845.00;690
+692;2001026573;B04001;HOMICIDIO TENTAD;RUA DOS CACTOS;283;73119;14/1/2001 21:58:00;CIDADAO COMUM;S;REF:FINAL DO 111;LINDEIA;BH;598989.23;790846.45;691
+693;2001026594;B04001;HOMICIDIO TENTAD;RUA PONTA PORA;170;54601;14/1/2001 22:09:00;CIDADAO COMUM;S;CAA;SANTA EFIGENIA;BH;613187.23;796919.20;692
+694;2001026600;B06000;LESAO CORPORAL;RUA DOUTOR RIBEI;274;23650;14/1/2001 22:10:00;CIDADAO COMUM;S;;DAS INDUSTRIAS;BH;603471.00;792938.94;693
+695;2001026669;B06000;LESAO CORPORAL;RUA MARICA;285;82072;14/1/2001 22:50:00;CIDADAO COMUM;S;;SAO GABRIEL;BH;613896.03;804943.57;694
+696;2001026777;B06000;LESAO CORPORAL;RUA CARMO DA CAC;10;13659;14/1/2001 23:41:00;CIDADAO COMUM;N;FU;SALGADO FILHO;BH;606146.59;794290.29;695
+697;2001026793;B04002;HOMICIDIO CONSUM;RUA DOIS;46;109530;14/1/2001 23:47:00;CIDADAO COMUM;N;0;BONSUCESSO;BH;605286.24;790363.21;696
+698;2001026822;B03000;AMEACA;RUA CASTRO ALVES;454;14103;15/1/2001 00:00:00;INICIATIVA;S;;COPACABANA;BH;606016.58;806527.82;697
+699;2001026862;B06000;LESAO CORPORAL;RUA MARIA ROSA D;102;107800;15/1/2001 00:20:00;CIDADAO COMUM;S;;MANTIQUEIRA;BH;606001.06;811254.93;698
+700;2001026911;B03000;AMEACA;RUA URSULA PAULI;125;71066;15/1/2001 00:56:00;CIDADAO COMUM;S;;SALGADO FILHO;BH;606633.82;793659.59;699
+701;2001026952;B06000;LESAO CORPORAL;RUA DOS TIMBIRAS;2330;67682;15/1/2001 01:24:00;INICIATIVA;N;0;LOURDES;BH;610463.01;796492.25;700
+702;2001026955;B04002;HOMICIDIO CONSUM;RUA CORONEL ANTO;355;17590;15/1/2001 01:26:00;CIDADAO COMUM;N;FU;JARDIM LEBLON;BH;605978.18;807516.94;701
+703;2001026974;B04001;HOMICIDIO TENTAD;RUA ITAIPU;700;35439;15/1/2001 01:39:00;INICIATIVA;N;0;VERA CRUZ;BH;616224.80;798437.20;702
+704;2001027080;B06000;LESAO CORPORAL;AV ERICO VERISSI;561;41671;15/1/2001 02:55:00;CIDADAO COMUM;N;0;CANDELARIA;BH;608128.88;808577.02;703
+705;2001027123;B03000;AMEACA;AV PRESIDENTE AN;828;4461;15/1/2001 03:46:00;CIDADAO COMUM;S;;LAGOINHA;BH;610489.09;798788.67;704
+706;2001027124;B03000;AMEACA;RUA DOS TUPINAMB;379;69940;15/1/2001 03:47:00;CIDADAO COMUM;S;APA;CENTRO (BH);BH;611197.53;797270.63;705
+707;2001027153;B04001;HOMICIDIO TENTAD;RUA DEZESSEIS;99;32821;15/1/2001 04:44:00;INICIATIVA;S;0;FELICIDADE;BH;612155.90;807182.11;706
+708;2001027224;B03000;AMEACA;RUA JORNALISTA W;505;70381;15/1/2001 07:02:00;CIDADAO COMUM;S;LJA;ITAPOA;BH;609750.72;805961.76;707
+709;2001027290;B03000;AMEACA;RUA LUISIANIA;294;81789;15/1/2001 07:59:00;CIDADAO COMUM;S;;ITAIPU BH;BH;599010.84;789210.41;708
+710;2001027535;B03000;AMEACA;RUA JOAO CAETANO;832;37510;15/1/2001 11:11:00;CIDADAO COMUM;S;;NOVA SUISSA;BH;606577.50;795368.27;709
+711;2001027586;B03000;AMEACA;RUA RAMIRO SIQUE;10;128858;15/1/2001 11:53:00;CIDADAO COMUM;N;0;CASTANHEIRAS (TA;BH;617650.40;797388.81;710
+712;2001027634;B03000;AMEACA;AV NOSSA SENHORA;2777;48107;15/1/2001 12:29:00;CIDADAO COMUM;S;0;CARLOS PRATES;BH;609303.34;797427.37;711
+713;2001027649;B03000;AMEACA;RUA FREI CONCEIC;735;29873;15/1/2001 12:46:00;CIDADAO COMUM;S;;JOAO PINHEIRO;BH;604480.03;796335.08;712
+714;2001027671;B03000;AMEACA;RUA BRODOSQUI;264;37160;15/1/2001 12:59:00;CIDADAO COMUM;S;CAA;PIRATININGA;BH;606033.72;809532.74;713
+715;2001027791;B06000;LESAO CORPORAL;RUA MOACIR JOSE ;132;50121;15/1/2001 15:01:00;CIDADAO COMUM;N;;MINASCAIXA;BH;609283.97;809358.15;714
+716;2001027793;B06000;LESAO CORPORAL;RUA RORE CARVALH;181;83567;15/1/2001 15:02:00;CIDADAO COMUM;S;CAFU;LINDEIA;BH;599095.79;791253.82;715
+717;2001027813;B03000;AMEACA;RUA HELIO COSTA;46;32948;15/1/2001 15:07:00;CIDADAO COMUM;S;;PIRAJA;BH;613809.20;802945.76;716
+718;2001027828;B03000;AMEACA;RUA INFANTIL;15;80660;15/1/2001 15:15:00;CIDADAO COMUM;S;;DOM BOSCO;BH;604612.96;797108.92;717
+719;2001027978;B03000;AMEACA;RUA JOAO ALEXAND;879;71384;15/1/2001 16:57:00;CIDADAO COMUM;S;;MILIONARIOS;BH;604478.18;790259.98;718
+720;2001028028;B03000;AMEACA;RUA ITOBI DO OES;100;36139;15/1/2001 17:20:00;CIDADAO COMUM;S;CA2;IPANEMA;BH;605021.06;797922.52;719
+721;2001028144;B08000;VIOLACAO DE DOMI;RUA MODESTINA DE;29;56878;15/1/2001 18:33:00;CIDADAO COMUM;N;0;VISTA ALEGRE;BH;604513.40;793406.58;720
+722;2001028242;B03000;AMEACA;ALAMEDA DAS LATH;1000;84572;15/1/2001 19:17:00;CIDADAO COMUM;N;AP101;SAO LUIZ;BH;608746.76;804097.55;721
+723;2001028284;B06000;LESAO CORPORAL;RUA PAULO TIMOTE;131;41918;15/1/2001 19:42:00;CIDADAO COMUM;N;LJ1;VILA HUMAITA;BH;610309.93;801564.82;722
+724;2001028289;B03000;AMEACA;RUA SAO GERALDO;353;170283;15/1/2001 19:45:00;CIDADAO COMUM;S;;CABANA;BH;604778.44;793924.70;723
+725;2001028291;B03000;AMEACA;RUA BOTUCATU;796;10285;15/1/2001 19:46:00;CIDADAO COMUM;S;;RENASCENCA;BH;611024.84;800182.69;724
+726;2001028438;B06000;LESAO CORPORAL;RUA NELSON HUNGR;1530;46634;15/1/2001 21:08:00;CIDADAO COMUM;S;;TUPI;BH;613245.05;806364.51;725
+727;2001028450;B03000;AMEACA;RUA ASPASIA;127;6293;15/1/2001 21:18:00;INICIATIVA;S;0;ADELAIDE;BH;606996.13;798544.21;726
+728;2001028479;B04001;HOMICIDIO TENTAD;AV DO CONTORNO;4520;17228;15/1/2001 21:32:00;CIDADAO COMUM;N;0;CENTRO (BH);BH;612542.80;795507.60;727
+729;2001028491;B06000;LESAO CORPORAL;RUA PADRE PEDRO ;1701;51657;15/1/2001 21:39:00;CIDADAO COMUM;S;0;VENDA NOVA;BH;608416.84;809036.43;728
+730;2001028514;B06000;LESAO CORPORAL;RUA MODESTINA DE;40;56878;15/1/2001 21:51:00;CIDADAO COMUM;S;;VISTA ALEGRE;BH;604473.55;793453.50;729
+731;2001028518;B06000;LESAO CORPORAL;RUA LIMA;15;41063;15/1/2001 21:54:00;CIDADAO COMUM;S;LJ1;COPACABANA;BH;606113.57;806114.27;730
+732;2001028601;B03000;AMEACA;RUA CORONEL JOAQ;290;87063;15/1/2001 22:36:00;CIDADAO COMUM;S;0;CEU AZUL;BH;604704.15;807808.13;731
+733;2001028710;B06000;LESAO CORPORAL;RUA DINIS DIAS;145;119673;15/1/2001 23:48:00;CIDADAO COMUM;S;0;VERA CRUZ;BH;616573.20;797526.82;732
+734;2001028780;B06000;LESAO CORPORAL;RUA OSCAR LOBO P;270;104480;16/1/2001 00:53:00;CIDADAO COMUM;S;0;PRIMEIRO DE MAIO;BH;612347.11;803516.89;733
+735;2001028833;B06000;LESAO CORPORAL;AV DOS ANDRADAS;391;3761;16/1/2001 01:33:00;INICIATIVA;S;0;CENTRO (BH);BH;611562.02;797248.57;734
+736;2001028838;B03000;AMEACA;RUA IRAI;55;34915;16/1/2001 01:37:00;CIDADAO COMUM;N;;CORACAO DE JESUS;BH;609854.94;794169.18;735
+737;2001028846;B08000;VIOLACAO DE DOMI;RUA DOM JOAQUIM ;874;22313;16/1/2001 01:46:00;CIDADAO COMUM;N;0;CORACAO EUCARIST;BH;605566.78;796249.94;736
+738;2001028883;B06000;LESAO CORPORAL;AV AFONSO PENA;3032;1259;16/1/2001 02:30:00;INICIATIVA;N;0;FUNCIONARIOS;BH;612321.21;795046.07;737
+739;2001029145;B06000;LESAO CORPORAL;RUA SAO MATIAS;258;63408;16/1/2001 08:59:00;INICIATIVA;N;0;SERRANO;BH;603478.33;800637.91;738
+740;2001029265;B03000;AMEACA;AV SILVA LOBO;1685;65889;16/1/2001 10:13:00;INICIATIVA;S;0;GRAJAU;BH;608088.35;794919.48;739
+741;2001029275;B06000;LESAO CORPORAL;RUA DA BAHIA;422;81155;16/1/2001 10:21:00;CIDADAO COMUM;S;;CENTRO (BH);BH;611417.58;797211.95;740
+742;2001029310;B06000;LESAO CORPORAL;RUA FRANCISCO DA;411;29729;16/1/2001 10:40:00;CIDADAO COMUM;N;;MONSENHOR MESSIA;BH;606892.04;798251.49;741
+743;2001029335;B03000;AMEACA;RUA ABEILARD PER;48;587;16/1/2001 11:13:00;CIDADAO COMUM;N;CAD;SANTA AMELIA;BH;606763.27;805442.04;742
+744;2001029346;B03000;AMEACA;RUA OZENIL JOSE ;75;86058;16/1/2001 11:19:00;CIDADAO COMUM;S;;VILA FREI LEOPOL;BH;611670.79;809683.45;743
+745;2001029406;B08000;VIOLACAO DE DOMI;RUA POUSO ALEGRE;1314;54932;16/1/2001 12:06:00;CIDADAO COMUM;N;;FLORESTA;BH;612350.46;797901.33;744
+746;2001029518;B03000;AMEACA;RUA FELIPE CAMAR;12;27938;16/1/2001 13:35:00;CIDADAO COMUM;S;;ESPLANADA;BH;613862.69;798419.73;745
+747;2001029618;B06000;LESAO CORPORAL;RUA DOS AERONAUT;385;1158;16/1/2001 14:55:00;INICIATIVA;S;0;LIBERDADE;BH;609426.98;803824.32;746
+748;2001029623;B03000;AMEACA;AV BALEARES;247;89333;16/1/2001 14:59:00;CIDADAO COMUM;N;;JARDIM EUROPA;BH;608053.98;809851.39;747
+749;2001029681;B03000;AMEACA;RUA CURITIBA;175;19090;16/1/2001 15:41:00;INICIATIVA;S;0;CENTRO (BH);BH;611005.46;797704.71;748
+750;2001029690;B06000;LESAO CORPORAL;RUA JOSE FLAUSIN;67;95462;16/1/2001 15:46:00;CIDADAO COMUM;S;0;JARDIM VITORIA;BH;617042.59;804184.81;749
+751;2001029710;B04001;HOMICIDIO TENTAD;RUA SAO TOMAS DE;690;63782;16/1/2001 16:02:00;CIDADAO COMUM;S;;MORRO DO PAPAGAI;BH;610807.00;793360.70;750
+752;2001029748;B03000;AMEACA;ALAMEDA DIOGO GU;369;21336;16/1/2001 16:34:00;CIDADAO COMUM;S;;VILA CASTANHEIRA;BH;601653.68;788600.58;751
+753;2001029824;B03000;AMEACA;RUA NELSON HUNGR;1530;46634;16/1/2001 17:18:00;CIDADAO COMUM;S;;TUPI;BH;613245.05;806364.51;752
+754;2001029849;B03000;AMEACA;RUA WILSON SOARE;530;20664;16/1/2001 17:27:00;CIDADAO COMUM;N;;PLANALTO;BH;610604.63;806147.71;753
+755;2001029852;B03000;AMEACA;RUA JOSE ROBERTO;254;78516;16/1/2001 17:27:00;CIDADAO COMUM;S;;VILA PINHO;BH;602471.77;787524.60;754
+756;2001029870;B03000;AMEACA;RUA JOAQUIM TEIX;10;128845;16/1/2001 17:36:00;CIDADAO COMUM;N;;CASTANHEIRAS (TA;BH;617405.88;796871.94;755
+757;2001029962;B03000;AMEACA;RUA MATIAS AIRES;330;34032;16/1/2001 18:35:00;CIDADAO COMUM;N;;VILA MARAVILHAS;BH;603054.76;795104.69;756
+758;2001029971;B06000;LESAO CORPORAL;RUA PERNAMBUCO;836;53463;16/1/2001 18:38:00;CIDADAO COMUM;S;PX836;FUNCIONARIOS;BH;611527.62;795448.67;757
+759;2001030057;B03000;AMEACA;RUA CANDELARIA;46;12501;16/1/2001 19:16:00;CIDADAO COMUM;N;;VILA OESTE;BH;604297.32;795319.54;758
+760;2001030067;B03000;AMEACA;RUA MINERVINA EU;137;80820;16/1/2001 19:21:00;CIDADAO COMUM;N;;ESTRELA DO ORIEN;BH;606081.61;792178.90;759
+761;2001030122;B04001;HOMICIDIO TENTAD;RUA DA BAHIA;850;81155;16/1/2001 19:51:00;CIDADAO COMUM;N;0;CENTRO (BH);BH;611305.01;796799.04;760
+762;2001030162;B03000;AMEACA;RUA DALVA DE MAT;123;19595;16/1/2001 20:16:00;CIDADAO COMUM;S;0;SANTA MONICA DO ;BH;606079.43;808382.47;761
+763;2001030179;B06000;LESAO CORPORAL;RUA DOM CAVATI;55;29300;16/1/2001 20:26:00;CIDADAO COMUM;S;;PROVIDENCIA;BH;612535.57;804337.76;762
+764;2001030225;B03000;AMEACA;RUA BARAO DE COC;245;7876;16/1/2001 20:54:00;CIDADAO COMUM;S;;SAGRADA FAMILIA;BH;612850.49;798180.54;763
+765;2001030236;B06000;LESAO CORPORAL;RUA CIBIPURUNA;125;60885;16/1/2001 21:08:00;CIDADAO COMUM;S;0;INDUSTRIAL RODRI;BH;616020.85;808409.77;764
+766;2001030297;B03000;AMEACA;RUA VISCONDE DE ;74;73263;16/1/2001 21:49:00;POLICIAL MILITAR;S;0;MAGNESITA;BH;604112.14;794187.97;765
+767;2001030317;B03000;AMEACA;RUA ROSA NEGRA;266;124481;16/1/2001 22:03:00;CIDADAO COMUM;S;;ETELVINA CARNEIR;BH;611498.24;809077.19;766
+768;2001030350;B06000;LESAO CORPORAL;RUA RIACHUELO;1591;58527;16/1/2001 22:29:00;CIDADAO COMUM;S;0;PADRE EUSTAQUIO;BH;606987.22;797534.27;767
+769;2001030355;B03000;AMEACA;RUA GUILHERME PI;337;32516;16/1/2001 22:33:00;CIDADAO COMUM;N;0;MAGNESITA;BH;604227.98;793866.65;768
+770;2001030372;B03000;AMEACA;AV AFONSO PENA;1757;1259;16/1/2001 22:45:00;CIDADAO COMUM;N;0;FUNCIONARIOS;BH;611723.59;796200.98;769
+771;2001030405;B03000;AMEACA;RUA FELIPE DE ME;60;27940;16/1/2001 23:03:00;CIDADAO COMUM;S;0;UNIAO;BH;612275.77;801646.08;770
+772;2001030501;B04001;HOMICIDIO TENTAD;RUA PADRE CAFE;86;51253;16/1/2001 23:46:00;CIDADAO COMUM;S;0;SAUDADE;BH;615066.13;797633.87;771
+773;2001030596;B06000;LESAO CORPORAL;RUA BERNARDO GUI;2213;9364;17/1/2001 00:48:00;INICIATIVA;N;0;LOURDES;BH;610447.87;796167.73;772
+774;2001030617;B03000;AMEACA;RUA VINTE E NOVE;19;73061;17/1/2001 01:10:00;CIDADAO COMUM;S;;JOAO PINHEIRO;BH;604534.00;796873.73;773
+775;2001030637;B04001;HOMICIDIO TENTAD;RUA NANA;255;47186;17/1/2001 01:26:00;INICIATIVA;S;0;MILIONARIOS;BH;603947.95;789918.54;774
+776;2001030671;B04001;HOMICIDIO TENTAD;RUA DAS VERBENAS;62;71545;17/1/2001 01:59:00;CIDADAO COMUM;N;0;LINDEIA;BH;598771.99;790934.64;775
+777;2001030711;B06000;LESAO CORPORAL;RUA FLOR DA AMIZ;320;94646;17/1/2001 02:48:00;CIDADAO COMUM;N;0;JARDIM MONTANHES;BH;606193.98;799691.50;776
+778;2001030745;B03000;AMEACA;RUA PADRE JOAO C;411;51455;17/1/2001 03:31:00;CIDADAO COMUM;S;;CORACAO EUCARIST;BH;605827.87;796830.47;777
+779;2001031093;B04002;HOMICIDIO CONSUM;AV SEN LEVINDO C;250;14866;17/1/2001 09:49:00;CIDADAO COMUM;N;0;SANTA CECILIA;BH;600966.68;789489.63;778
+780;2001031100;B03000;AMEACA;AV BERNARDO VASC;1094;9411;17/1/2001 09:52:00;CIDADAO COMUM;N;FU;CACHOEIRINHA;BH;610848.37;801008.03;779
+781;2001031122;B03000;AMEACA;AV AFONSO PENA;4183;1259;17/1/2001 10:10:00;CIDADAO COMUM;S;0;CRUZEIRO;BH;612944.53;794095.63;780
+782;2001031193;B06000;LESAO CORPORAL;RUA TIZIU;514;95881;17/1/2001 11:01:00;CIDADAO COMUM;S;BECO SANTO ANTON;GOIANIA;BH;615351.18;802590.79;781
+783;2001031259;B03000;AMEACA;AV AMAZONAS;2234;3140;17/1/2001 11:54:00;INICIATIVA;S;;BARRO PRETO;BH;609538.19;796266.31;782
+784;2001031309;B03000;AMEACA;RUA ENGENHO DO S;634;80427;17/1/2001 12:33:00;CIDADAO COMUM;S;;ENGENHO NOGUEIRA;BH;606378.52;800198.44;783
+785;2001031353;B03000;AMEACA;RUA CONCEICAO DO;215;81978;17/1/2001 13:04:00;CIDADAO COMUM;S;;SAO GABRIEL;BH;614115.15;804354.59;784
+786;2001031379;B03000;AMEACA;RUA RIO DE JANEI;2101;58772;17/1/2001 13:21:00;CIDADAO COMUM;N;0;LOURDES;BH;610746.64;795656.51;785
+787;2001031587;B06000;LESAO CORPORAL;RUA TREZE DE SET;197;69168;17/1/2001 15:47:00;CIDADAO COMUM;S;;LEONINA;BH;608459.92;793384.14;786
+788;2001031669;B03000;AMEACA;RUA ITAPECERICA;946;35757;17/1/2001 16:35:00;CIDADAO COMUM;N;;LAGOINHA;BH;610331.36;798629.12;787
+789;2001031682;B03000;AMEACA;RUA STA CRUZ;703;60466;17/1/2001 16:40:00;CIDADAO COMUM;N;CASA;GRAJAU;BH;608278.05;795120.98;788
+790;2001031690;B03000;AMEACA;RUA FERNANDES TO;45;81271;17/1/2001 16:47:00;CIDADAO COMUM;S;LJ3;FUNCIONARIOS;BH;611476.90;794887.18;789
+791;2001031697;B03000;AMEACA;RUA EXPEDITO FLA;70;84847;17/1/2001 16:50:00;CIDADAO COMUM;N;CASA 41;DA LAGOA;BH;604749.70;809113.09;790
+792;2001031887;B06000;LESAO CORPORAL;RUA INDO;56;34436;17/1/2001 18:33:00;CIDADAO COMUM;S;;CH BETANIA;BH;605116.60;792343.88;791
+793;2001031898;B06000;LESAO CORPORAL;RUA JOAQUIM TEIX;6;128845;17/1/2001 18:39:00;CIDADAO COMUM;S;;CASTANHEIRAS (TA;BH;617405.88;796871.94;792
+794;2001032040;B03000;AMEACA;RUA SEBASTIAO BR;67;107406;17/1/2001 19:59:00;CIDADAO COMUM;S;;DAS INDUSTRIAS;BH;604814.01;792442.75;793
+795;2001032056;B06000;LESAO CORPORAL;ALAMEDA DIOGO GU;320;21336;17/1/2001 20:11:00;CIDADAO COMUM;S;;CASTANHEIRA 2;BH;601785.37;788781.93;794
+796;2001032095;B03000;AMEACA;AV SARAMENHA;1723;64007;17/1/2001 20:33:00;CIDADAO COMUM;S;BL. 32  AP. 104;TUPI;BH;613342.58;805500.03;795
+797;2001032106;B06000;LESAO CORPORAL;RUA JOAO PIRES;95;37866;17/1/2001 20:44:00;CIDADAO COMUM;S;CA;JARDINOPOLIS;BH;604534.36;794612.47;796
+798;2001032176;B03000;AMEACA;AV NOSSA SENHORA;327;48311;17/1/2001 21:36:00;CIDADAO COMUM;S;;PRIMEIRO DE NOVE;BH;612830.58;805154.47;797
+799;2001032362;B03000;AMEACA;RUA TREZE;39;126358;17/1/2001 23:28:00;CIDADAO COMUM;N;;PARQUE SAO JOSE;BH;607047.22;792095.32;798
+800;2001032402;B06000;LESAO CORPORAL;AV RESSACA;370;58454;17/1/2001 23:55:00;CIDADAO COMUM;N;;PADRE EUSTAQUIO;BH;606052.47;797241.79;799
+801;2001032521;B06000;LESAO CORPORAL;RUA MAJOR MESSIA;221;115200;18/1/2001 01:06:00;CIDADAO COMUM;N;0;BANDEIRANTES;BH;604706.99;804294.47;800
+802;2001032524;B06000;LESAO CORPORAL;RUA PADRE PEDRO ;175;51657;18/1/2001 01:16:00;CIDADAO COMUM;S;;VENDA NOVA;BH;609671.68;808130.71;801
+803;2001032593;B06000;LESAO CORPORAL;RUA UARIRA;510;70136;18/1/2001 02:19:00;CIDADAO COMUM;S;0;SAO GERALDO;BH;616229.57;798932.07;802
+804;2001032641;B03000;AMEACA;RUA ARA;139;5250;18/1/2001 02:59:00;CIDADAO COMUM;S;;VILA MARAVILHAS;BH;603021.07;795464.44;803
+805;2001032671;B06000;LESAO CORPORAL;RUA LADAINHA;270;40118;18/1/2001 03:36:00;CIDADAO COMUM;N;CAFU;PRIMEIRO DE MAIO;BH;612103.94;803801.29;804
+806;2001032700;B04001;HOMICIDIO TENTAD;RUA ATIBAIA;191;6530;18/1/2001 04:23:00;INICIATIVA;S;0;PIRATININGA;BH;606522.83;809420.66;805
+807;2001032894;B03000;AMEACA;AV FRANKLIN MAGA;45;29744;18/1/2001 08:46:00;CIDADAO COMUM;S;;TUPI;BH;612519.21;806390.63;806
+808;2001033024;B03000;AMEACA;RUA JOAQUIM SOAR;533;38190;18/1/2001 10:23:00;INICIATIVA;N;0;FLORAMAR;BH;612345.71;805930.65;807
+809;2001033060;B08000;VIOLACAO DE DOMI;RUA BARAO DO MON;960;63653;18/1/2001 10:44:00;CIDADAO COMUM;N;0;CARDOSO;BH;604059.47;787725.48;808
+810;2001033175;B03000;AMEACA;AV BERNARDO VASC;1194;9411;18/1/2001 12:13:00;CIDADAO COMUM;S;FU;CACHOEIRINHA;BH;610951.68;801058.28;809
+811;2001033181;B03000;AMEACA;RUA DOM EUGENIO ;18;22212;18/1/2001 12:20:00;CIDADAO COMUM;N;0;PLANALTO;BH;610690.75;805714.94;810
+812;2001033198;B03000;AMEACA;RUA PONTE NOVA;875;54655;18/1/2001 12:38:00;INICIATIVA;N;0;FLORESTA;BH;611771.89;798243.03;811
+813;2001033239;B02000;RIXA;AV WALDOMIRO LOB;768;66548;18/1/2001 12:59:00;INICIATIVA;N;0;GUARANI;BH;612664.28;805480.89;812
+814;2001033273;B05000;SEQUESTRO E CARC;AV DOM PEDRO II;3552;53145;18/1/2001 13:15:00;INICIATIVA;N;0;ADELAIDE;BH;607395.18;797928.58;813
+815;2001033299;B03000;AMEACA;AV OLEGARIO MACI;1423;49699;18/1/2001 13:40:00;CIDADAO COMUM;S;;LOURDES;BH;610355.84;796334.11;814
+816;2001033329;B06000;LESAO CORPORAL;AV AMAZONAS;2267;3140;18/1/2001 14:08:00;CIDADAO COMUM;N;;BARRO PRETO;BH;609538.15;796202.90;815
+817;2001033436;B06000;LESAO CORPORAL;RUA SANTISSIMA T;157;61516;18/1/2001 15:17:00;CIDADAO COMUM;N;AP108;SAGRADA FAMILIA;BH;613387.78;798604.45;816
+818;2001033449;B03000;AMEACA;RUA A I;1;31526;18/1/2001 15:25:00;CIDADAO COMUM;S;0;PAULO SEXTO;BH;616922.56;806705.51;817
+819;2001033492;B06000;LESAO CORPORAL;AV MEM DE SA;1736;45395;18/1/2001 15:52:00;CIDADAO COMUM;N;;FAZENDINHA;BH;614290.42;795998.55;818
+820;2001033512;B06000;LESAO CORPORAL;RUA CONSELHEIRO ;1715;17095;18/1/2001 16:03:00;CIDADAO COMUM;N;;SANTA EFIGENIA;BH;613260.28;797299.09;819
+821;2001033581;B02000;RIXA;RUA RADIALISTA H;35;78950;18/1/2001 16:50:00;CIDADAO COMUM;S;;CEU AZUL;BH;604408.05;808022.13;820
+822;2001033635;B03000;AMEACA;RUA PADRE PEDRO ;111;51657;18/1/2001 17:12:00;CIDADAO COMUM;S;;VENDA NOVA;BH;605043.91;810026.57;821
+823;2001033652;B06000;LESAO CORPORAL;RUA PADRE JULIO ;55;51496;18/1/2001 17:20:00;INICIATIVA;S;0;VERA CRUZ;BH;615000.53;797344.42;822
+824;2001033741;B04001;HOMICIDIO TENTAD;RUA SAO TOMAS DE;584;63782;18/1/2001 18:08:00;INICIATIVA;S;0;MORRO DO PAPAGAI;BH;610825.76;793399.28;823
+825;2001033749;B03000;AMEACA;RUA TIRADENTES;16;48251;18/1/2001 18:13:00;CIDADAO COMUM;S;0;PIRATININGA;BH;605198.06;809060.84;824
+826;2001033881;B04001;HOMICIDIO TENTAD;RUA BRAS;204;170835;18/1/2001 19:13:00;CIDADAO COMUM;N;;MORRO DAS PEDRAS;BH;608209.00;793886.27;825
+827;2001033898;B06000;LESAO CORPORAL;RUA IGUACU;674;34118;18/1/2001 19:21:00;CIDADAO COMUM;S;;CONCORDIA;BH;611530.53;799063.01;826
+828;2001033920;B04001;HOMICIDIO TENTAD;RUA JOSE GONCALV;89;99901;18/1/2001 19:33:00;CIDADAO COMUM;S;0;MARIA GORETTI;BH;614585.31;802987.34;827
+829;2001033923;B03000;AMEACA;RUA ARARI;95;5537;18/1/2001 19:35:00;CIDADAO COMUM;S;OFICINA DO RAMIR;BONFIM;BH;609908.17;797814.73;828
+830;2001033955;B04001;HOMICIDIO TENTAD;RUA PENIDO;83;53306;18/1/2001 19:46:00;CIDADAO COMUM;N;0;PIRAJA;BH;613156.80;803005.55;829
+831;2001033963;B05000;SEQUESTRO E CARC;RUA JACUI;382;36734;18/1/2001 19:49:00;CIDADAO COMUM;N;0;FLORESTA;BH;611811.78;798148.04;830
+832;2001033964;B04001;HOMICIDIO TENTAD;RUA TENENTE JOAO;72;113450;18/1/2001 19:49:00;CIDADAO COMUM;N;;JARDIM GUANABARA;BH;611909.09;807527.63;831
+833;2001034016;B03000;AMEACA;RUA VINTE E OITO;39;33231;18/1/2001 20:25:00;CIDADAO COMUM;S;;CONJUNTO FELICID;BH;612386.16;807143.06;832
+834;2001034052;B03000;AMEACA;RUA BONINAS;271;10115;18/1/2001 20:43:00;CIDADAO COMUM;S;;ESPLANADA;BH;614462.59;798690.33;833
+835;2001034059;B05000;SEQUESTRO E CARC;RUA TEBAS;820;67090;18/1/2001 20:40:00;CIDADAO COMUM;N;;VERA CRUZ;BH;616073.41;798319.09;834
+836;2001034147;B03000;AMEACA;RUA DOS CARIJOS;930;81243;18/1/2001 21:36:00;CIDADAO COMUM;S;;CENTRO (BH);BH;610563.81;797327.45;835
+837;2001034186;B06000;LESAO CORPORAL;RUA SAO TOMAS DE;500;63782;18/1/2001 21:54:00;INICIATIVA;S;0;SAO PEDRO;BH;610867.78;793546.24;836
+838;2001034200;B06000;LESAO CORPORAL;RUA CARLOS SCHET;505;118771;18/1/2001 22:02:00;CIDADAO COMUM;N;;JARDINOPOLIS;BH;605039.83;794569.69;837
+839;2001034282;B06000;LESAO CORPORAL;RUA GUAICURUS;638;32009;18/1/2001 22:50:00;INICIATIVA;S;;CENTRO (BH);BH;611045.09;797686.44;838
+840;2001034301;B03000;AMEACA;RUA SERTAOZINHO;134;84138;18/1/2001 22:59:00;CIDADAO COMUM;N;LJA;JARDIM LEBLON;BH;606208.01;807819.22;839
+841;2001034337;B03000;AMEACA;RUA JAIR LOPES C;25;89359;18/1/2001 23:11:00;CIDADAO COMUM;S;0;LETICIA;BH;607488.53;810081.42;840
+842;2001034362;B03000;AMEACA;RUA ROSALVO DE M;140;70439;18/1/2001 23:27:00;CIDADAO COMUM;S;;GOIANIA;BH;615264.97;803384.96;841
+843;2001034389;B06000;LESAO CORPORAL;RUA ASTOLFO DUTR;380;6426;18/1/2001 23:47:00;CIDADAO COMUM;S;0;ESPLANADA;BH;615034.80;798256.05;842
+844;2001034419;B03000;AMEACA;RUA CRISANTEMO;140;18564;19/1/2001 00:09:00;CIDADAO COMUM;S;;MARAJO;BH;606711.50;793120.10;843
+845;2001034434;B06000;LESAO CORPORAL;RUA SUCURI;169;66450;19/1/2001 00:22:00;CIDADAO COMUM;S;0;SAO GERALDO;BH;615059.26;799704.01;844
+846;2001034446;B06000;LESAO CORPORAL;RUA AUGUSTO CESA;70;86451;19/1/2001 00:35:00;CIDADAO COMUM;S;0;LETICIA;BH;606880.19;809662.24;845
+847;2001034488;B03000;AMEACA;RUA SAO MATIAS;397;63408;19/1/2001 01:11:00;CIDADAO COMUM;S;;SERRANO;BH;603549.73;800736.58;846
+848;2001034498;B03000;AMEACA;AV AFONSO PENA;526;1259;19/1/2001 01:17:00;CIDADAO COMUM;S;;CENTRO (BH);BH;611038.27;797264.23;847
+849;2001034552;B09000;ABANDONO DE INCA;RUA ILACIR PEREI;578;114701;19/1/2001 02:13:00;INICIATIVA;N;0;VILA SILVEIRA;BH;612048.74;800476.30;848
+850;2001034715;B03000;AMEACA;RUA CORONEL COST;275;10809;19/1/2001 06:52:00;CIDADAO COMUM;N;0;PLANALTO;BH;610783.13;806561.04;849
+851;2001034845;B06000;LESAO CORPORAL;RUA CRACOVIA;640;85317;19/1/2001 08:35:00;CIDADAO COMUM;S;REF:FINAL DO 220;JARDIM EUROPA;BH;608697.40;810214.06;850
+852;2001034937;B06000;LESAO CORPORAL;RUA RIO COMPRIDO;43;62751;19/1/2001 09:32:00;CIDADAO COMUM;S;ITINERARIO DO 22;VILA SANTA BRANC;BH;605245.60;809653.11;851
+853;2001034962;B03000;AMEACA;RUA ANITA GARIBA;249;4184;19/1/2001 10:00:00;CIDADAO COMUM;S;0;MORRO DAS PEDRAS;BH;608959.99;794513.91;852
+854;2001034972;B06000;LESAO CORPORAL;RUA DOS GOITACAZ;1152;31400;19/1/2001 10:07:00;CIDADAO COMUM;N;PX663;BARRO PRETO;BH;610173.27;797003.72;853
+855;2001034995;B06000;LESAO CORPORAL;RUA SILVIO GUEDE;10;89610;19/1/2001 10:23:00;CIDADAO COMUM;S;;PALMEIRAS;BH;606875.00;790987.05;854
+856;2001035112;B03000;AMEACA;RUA PLATINA;1115;54453;19/1/2001 11:46:00;CIDADAO COMUM;N;;CALAFATE;BH;608044.17;796840.68;855
+857;2001035113;B06000;LESAO CORPORAL;RUA TRES;166;32301;19/1/2001 11:46:00;CIDADAO COMUM;S;;CONJUNTO FELICID;BH;612209.41;807411.82;856
+858;2001035170;B04001;HOMICIDIO TENTAD;RUA PEDRO LESSA;360;53117;19/1/2001 12:26:00;INICIATIVA;N;0;PRADO LOPES;BH;609977.82;798809.19;857
+859;2001035224;B03000;AMEACA;RUA RIO DE JANEI;1058;58772;19/1/2001 13:00:00;CIDADAO COMUM;N;0;CENTRO (BH);BH;610976.88;796673.06;858
+860;2001035227;B03000;AMEACA;RUA LIMEIRA;139;54050;19/1/2001 13:03:00;CIDADAO COMUM;S;0;SAO PAULO;BH;606102.38;809708.12;859
+861;2001035483;B03000;AMEACA;RUA LILAS;35;18261;19/1/2001 15:50:00;CIDADAO COMUM;S;0;ALTO DOS PINHEIR;BH;604116.21;795997.43;860
+862;2001035556;B06000;LESAO CORPORAL;RUA JOSE MAURICI;426;58035;19/1/2001 16:32:00;POLICIAL CIVIL;S;;SANTA CRUZ;BH;610629.80;801740.90;861
+863;2001035570;B03000;AMEACA;RUA CARVALHOS;219;13788;19/1/2001 16:40:00;CIDADAO COMUM;S;0;MANGABEIRAS;BH;612116.96;792573.56;862
+864;2001035575;B03000;AMEACA;RUA SILVIO GUEDE;10;89610;19/1/2001 16:43:00;CIDADAO COMUM;S;;PALMEIRAS;BH;606875.00;790987.05;863
+865;2001035577;B02000;RIXA;RUA CLOVIS DE CA;60;16064;19/1/2001 16:44:00;INICIATIVA;N;0;FLORAMAR;BH;612179.96;805856.34;864
+866;2001035788;B03000;AMEACA;BECO NOVA PONTE;60;301242;19/1/2001 18:40:00;CIDADAO COMUM;S;;MORRO DO PAPAGAI;BH;610896.07;793759.09;865
+867;2001035797;B03000;AMEACA;AV AUGUSTO DE LI;1288;6731;19/1/2001 18:46:00;CIDADAO COMUM;S;CAFU;BARRO PRETO;BH;610091.59;796885.43;866
+868;2001035862;B04001;HOMICIDIO TENTAD;RUA GERALDO ROSA;413;124898;19/1/2001 19:16:00;CIDADAO COMUM;S;;MANGUEIRAS;BH;600857.84;786602.84;867
+869;2001035915;B06000;LESAO CORPORAL;RUA CORNELIO CER;475;17417;19/1/2001 19:45:00;CIDADAO COMUM;S;0;PADRE EUSTAQUIO;BH;605985.02;797880.54;868
+870;2001035955;B03000;AMEACA;RUA IPE ROSA;25;82781;19/1/2001 20:07:00;CIDADAO COMUM;N;0;CELESTINO;BH;610571.21;808589.32;869
+871;2001035993;B03000;AMEACA;RUA TRES;251;300266;19/1/2001 20:31:00;CIDADAO COMUM;S;;VISTA DO SOL;BH;616371.41;804771.28;870
+872;2001036011;B04001;HOMICIDIO TENTAD;RUA PRINCIPAL;116;300224;19/1/2001 20:38:00;CIDADAO COMUM;N;;MORRO DO PAPAGAI;BH;610483.68;793552.32;871
+873;2001036029;B04001;HOMICIDIO TENTAD;RUA GIRASSOL;50;170242;19/1/2001 20:45:00;CIDADAO COMUM;N;;CABANA;BH;604916.41;794394.64;872
+874;2001036040;B03000;AMEACA;AV DOM PEDRO II;533;53145;19/1/2001 20:47:00;CIDADAO COMUM;S;0;BONFIM;BH;610107.60;797839.85;873
+875;2001036088;B06000;LESAO CORPORAL;RUA AZURITA;109;7094;19/1/2001 21:10:00;CIDADAO COMUM;S;;VIRGINIA;BH;603185.21;794446.73;874
+876;2001036091;B06000;LESAO CORPORAL;RUA ANITA GARIBA;54;4184;19/1/2001 21:11:00;INICIATIVA;S;0;MORRO DAS PEDRAS;BH;608849.03;794573.30;875
+877;2001036185;B03000;AMEACA;RUA GOVERNADOR M;23;31642;19/1/2001 21:53:00;CIDADAO COMUM;S;;GAMELEIRA;BH;606275.34;796492.16;876
+878;2001036203;B06000;LESAO CORPORAL;RUA MARCIOS MOUR;63;117306;19/1/2001 22:02:00;CIDADAO COMUM;S;;LINDEIA;BH;600079.56;790636.85;877
+879;2001036272;B06000;LESAO CORPORAL;RUA TAIOBEIRAS;100;17168;19/1/2001 22:39:00;INICIATIVA;S;0;COQUEIROS;BH;602596.36;798636.04;878
+880;2001036329;B04001;HOMICIDIO TENTAD;AV DOM PEDRO II;5146;53145;19/1/2001 23:12:00;CIDADAO COMUM;N;0;JARDIM MONTANHES;BH;606192.09;798764.89;879
+881;2001036365;B06000;LESAO CORPORAL;RUA CAICARA;341;11451;19/1/2001 23:28:00;CIDADAO COMUM;S;;SAO GERALDO;BH;615112.79;799155.44;880
+882;2001036369;B06000;LESAO CORPORAL;AV SEN LEVINDO C;1007;14866;19/1/2001 23:30:00;CIDADAO COMUM;S;;MANGUEIRAS;BH;600926.54;788061.46;881
+883;2001036406;B06000;LESAO CORPORAL;AV CLARA NUNES;670;45644;19/1/2001 23:51:00;CIDADAO COMUM;N;0;CACHOEIRINHA;BH;611029.42;800928.11;882
+884;2001036416;B03000;AMEACA;RUA PEDRO SIMONI;159;301397;20/1/2001 00:00:00;CIDADAO COMUM;S;;OLARIA;BH;601031.98;789234.70;883
+885;2001036433;B03000;AMEACA;AV DOM PEDRO II;1950;53145;20/1/2001 00:09:00;CIDADAO COMUM;S;;CARLOS PRATES;BH;608938.73;798417.38;884
+886;2001036489;B04002;HOMICIDIO CONSUM;RUA ILDEU MOREIR;150;80947;20/1/2001 00:37:00;CIDADAO COMUM;N;0;NOVA CINTRA;BH;605708.95;793399.71;885
+887;2001036556;B03000;AMEACA;RUA JOAQUIM TEIX;63;38207;20/1/2001 01:13:00;CIDADAO COMUM;0;0;CARDOSO;BH;604078.65;788100.48;886
+888;2001036558;B06000;LESAO CORPORAL;RUA JOSE JOAQUIM;342;38871;20/1/2001 01:16:00;CIDADAO COMUM;S;0;SANTA CRUZ;BH;610903.81;802145.71;887
+889;2001036569;B03000;AMEACA;RUA JOSE LEITE S;60;20548;20/1/2001 01:22:00;CIDADAO COMUM;S;0;LETICIA;BH;607463.95;810357.59;888
+890;2001036651;B06000;LESAO CORPORAL;AV BERNARDO VASC;2717;9411;20/1/2001 02:24:00;INICIATIVA;S;0;IPIRANGA;BH;612138.82;801992.11;889
+891;2001036668;B03000;AMEACA;RUA CASTANHAL;170;96250;20/1/2001 02:34:00;CIDADAO COMUM;S;0;SAO GABRIEL;BH;614605.78;804429.58;890
+892;2001036690;B04001;HOMICIDIO TENTAD;AV FURQUIM WERNE;1200;650;20/1/2001 02:46:00;INICIATIVA;N;0;TUPI;BH;613155.12;806559.58;891
+893;2001036707;B03000;AMEACA;RUA ANTONIO RIBE;75;96783;20/1/2001 02:56:00;CIDADAO COMUM;S;FU;ANTONIO RIBEIRO ;BH;615051.81;806806.25;892
+894;2001036715;B06000;LESAO CORPORAL;RUA DOS CAETES;372;11376;20/1/2001 03:03:00;CIDADAO COMUM;N;PX409;CENTRO (BH);BH;611253.80;797440.40;893
+895;2001036726;B04001;HOMICIDIO TENTAD;RUA QUATRO DE MA;3;57118;20/1/2001 03:09:00;INICIATIVA;S;0;LEONINA;BH;608663.34;793662.61;894
+896;2001036740;B04001;HOMICIDIO TENTAD;AV AMERICO VESPU;1003;3355;20/1/2001 03:14:00;CIDADAO COMUM;N;0;APARECIDA;BH;609058.54;800075.87;895
+897;2001036755;B06000;LESAO CORPORAL;RUA RIO DE JANEI;97;58772;20/1/2001 03:29:00;CIDADAO COMUM;N;0;CENTRO (BH);BH;611257.43;797586.02;896
+898;2001036758;B02000;RIXA;RUA CONTAGEM;1600;70293;20/1/2001 03:33:00;CIDADAO COMUM;S;;SANTA INES;BH;614360.04;801201.70;897
+899;2001036992;B03000;AMEACA;RUA JOSE BARTOLO;36;38512;20/1/2001 08:12:00;CIDADAO COMUM;S;;TUPI;BH;612479.09;806154.91;898
+900;2001037070;B03000;AMEACA;AV FREI ANDREONI;489;75533;20/1/2001 09:15:00;CIDADAO COMUM;S;;SALGADO FILHO;BH;606885.38;794024.37;899
+901;2001037105;B03000;AMEACA;RUA AZALEIA;9;115846;20/1/2001 09:44:00;CIDADAO COMUM;S;0;HAVAI;BH;607259.91;793586.09;900
+902;2001037133;B03000;AMEACA;RUA IPE ROSA;25;82781;20/1/2001 10:03:00;CIDADAO COMUM;N;0;CELESTINO;BH;610571.21;808589.32;901
+903;2001037268;B03000;AMEACA;RUA BELA EMILIA;27;96175;20/1/2001 11:51:00;CIDADAO COMUM;S;CA27;OLARIA;BH;601235.90;789192.41;902
+904;2001037308;B04001;HOMICIDIO TENTAD;RUA WILDE JOSE P;35;99321;20/1/2001 12:14:00;CIDADAO COMUM;N;;PLANALTO;BH;609479.86;806756.19;903
+905;2001037335;B03000;AMEACA;RUA CURUPAITI;206;19148;20/1/2001 12:30:00;CIDADAO COMUM;S;CA;PADRE EUSTAQUIO;BH;606230.45;797888.54;904
+906;2001037337;B03000;AMEACA;AV CRISTIANO MAC;1718;18652;20/1/2001 12:31:00;CIDADAO COMUM;S;0;CIDADE NOVA;BH;612292.78;800077.49;905
+907;2001037348;B03000;AMEACA;RUA MANOEL JOSE ;55;43129;20/1/2001 12:44:00;CIDADAO COMUM;N;0;SANTA CRUZ;BH;610823.28;802125.09;906
+908;2001037394;B06000;LESAO CORPORAL;RUA PURUS;605;55819;20/1/2001 13:20:00;CIDADAO COMUM;N;FU;CONCORDIA;BH;610757.70;799431.82;907
+909;2001037417;B06000;LESAO CORPORAL;RUA PRINCIPAL;55;102699;20/1/2001 13:34:00;CIDADAO COMUM;N;;TIROL;BH;600922.75;789246.93;908
+910;2001037434;B04001;HOMICIDIO TENTAD;RUA YUCATAN;70;36302;20/1/2001 13:47:00;INICIATIVA;S;0;SAO PEDRO;BH;611188.45;793833.06;909
+911;2001037471;B06000;LESAO CORPORAL;RUA SALVADOR PIR;246;60122;20/1/2001 14:08:00;CIDADAO COMUM;S;0;MILIONARIOS;BH;604338.28;790483.75;910
+912;2001037519;B06000;LESAO CORPORAL;RUA SAO TOMAS;7;63770;20/1/2001 14:41:00;CIDADAO COMUM;N;;PLANALTO;BH;610686.83;805550.99;911
+913;2001037553;B03000;AMEACA;RUA DIVINO ESPIR;128;96768;20/1/2001 15:08:00;CIDADAO COMUM;S;;ANTONIO RIBEIRO ;BH;614627.89;806302.83;912
+914;2001037652;B03000;AMEACA;RUA ANTONIO JOSE;21;4622;20/1/2001 15:57:00;CIDADAO COMUM;S;;MAGNESITA;BH;604151.12;794091.76;913
+915;2001037676;B03000;AMEACA;RUA JANETE CLAIR;172;50046;20/1/2001 16:10:00;CIDADAO COMUM;N;;SANTA MONICA;BH;607144.48;807726.85;914
+916;2001037702;B04001;HOMICIDIO TENTAD;AV SOLFERINA RIC;840;72840;20/1/2001 16:26:00;INICIATIVA;S;0;JATOBA;BH;600254.65;788290.33;915
+917;2001037728;B04001;HOMICIDIO TENTAD;RUA EVOCACAO;475;26948;20/1/2001 16:45:00;CIDADAO COMUM;S;;SAO JOSE;BH;605856.28;798750.25;916
+918;2001037732;B04001;HOMICIDIO TENTAD;RUA TANCREDO EST;54;66838;20/1/2001 16:48:00;CIDADAO COMUM;S;;SAO TOMAZ;BH;609723.18;805275.89;917
+919;2001037739;B06000;LESAO CORPORAL;RUA MUNICIPAL;46;171677;20/1/2001 16:52:00;INICIATIVA;N;0;VILA CEMIG;BH;605614.67;788590.06;918
+920;2001037779;B06000;LESAO CORPORAL;RUA GUAICURUS;660;32009;20/1/2001 17:11:00;INICIATIVA;N;0;CENTRO (BH);BH;611027.05;797689.74;919
+921;2001037812;B06000;LESAO CORPORAL;RUA JOAO PAULO I;65;300458;20/1/2001 17:27:00;CIDADAO COMUM;S;;SAO DOMINGOS;BH;607677.28;793509.05;920
+922;2001037820;B04002;HOMICIDIO CONSUM;RUA BANDONION;110;170139;20/1/2001 17:32:00;CIDADAO COMUM;N;;VILA CAFEZAL;BH;613977.41;795089.89;921
+923;2001037856;B06000;LESAO CORPORAL;RUA WALDEMAR DIA;115;15377;20/1/2001 17:53:00;CIDADAO COMUM;S;;CANDELARIA;BH;607931.15;809003.07;922
+924;2001037938;B03000;AMEACA;RUA J;165;41470;20/1/2001 18:37:00;CIDADAO COMUM;S;;CH CONFISCO;BH;602785.39;803022.89;923
+925;2001037965;B06000;LESAO CORPORAL;RUA TRES;396;302811;20/1/2001 18:52:00;CIDADAO COMUM;S;CA15;NOVO AARAO REIS;BH;614548.88;806088.28;924
+926;2001038016;B03000;AMEACA;RUA PEDRA DA VAR;8;127086;20/1/2001 19:19:00;CIDADAO COMUM;S;0;PIRATININGA;BH;605753.30;809312.53;925
+927;2001038183;B03000;AMEACA;RUA CASCALHEIRA;177;13889;20/1/2001 20:44:00;CIDADAO COMUM;S;;VENDA NOVA;BH;609380.40;808731.30;926
+928;2001038240;B03000;AMEACA;RUA OTAVIO CARNE;480;50594;20/1/2001 21:13:00;CIDADAO COMUM;S;0;BOA VISTA;BH;614841.38;799836.60;927
+929;2001038261;B06000;LESAO CORPORAL;RUA JOAO BERNARD;11;114897;20/1/2001 21:22:00;CIDADAO COMUM;S;AP101;PAQUETA;BH;605412.69;802594.48;928
+930;2001038268;B06000;LESAO CORPORAL;RUA BIMBARRA;345;9641;20/1/2001 21:26:00;CIDADAO COMUM;S;;CALAFATE;BH;607141.45;796609.73;929
+931;2001038329;B06000;LESAO CORPORAL;RUA DAS PERPETUA;615;911;20/1/2001 21:56:00;CIDADAO COMUM;N;;LINDEIA;BH;599593.30;790595.60;930
+932;2001038457;B03000;AMEACA;RUA FRANCISCO RO;600;10994;20/1/2001 23:10:00;CIDADAO COMUM;S;;DOM JOAQUIM;BH;613331.06;802015.37;931
+933;2001038479;B03000;AMEACA;RUA VICENTE SOLL;179;24781;20/1/2001 23:20:00;CIDADAO COMUM;S;;NOVA GAMELEIRA;BH;605440.68;794937.65;932
+934;2001038532;B04001;HOMICIDIO TENTAD;RUA DOUTOR CRIST;145;55598;20/1/2001 23:47:00;CIDADAO COMUM;S;0;BARREIRO DE CIMA;BH;604618.87;789081.22;933
+935;2001038588;B06000;LESAO CORPORAL;RUA DOS AIMORES;2198;1640;21/1/2001 00:18:00;CIDADAO COMUM;N;0;LOURDES;BH;610507.20;796334.72;934
+936;2001038624;B03000;AMEACA;RUA PAMPLONA;160;102862;21/1/2001 00:44:00;CIDADAO COMUM;S;0;CH DA LAGOA;BH;604911.66;802925.82;935
+937;2001038693;B06000;LESAO CORPORAL;RUA SEBASTIAO PE;60;125052;21/1/2001 01:20:00;CIDADAO COMUM;S;0;CONJUNTO ERNESTO;BH;601292.68;787495.16;936
+938;2001038729;B03000;AMEACA;PRACA SAO VICENT;10;63902;21/1/2001 01:39:00;CIDADAO COMUM;S;0;PADRE EUSTAQUIO;BH;605483.12;797829.06;937
+939;2001038737;B06000;LESAO CORPORAL;RUA PADRE EUSTAQ;2521;51294;21/1/2001 01:43:00;INICIATIVA;N;0;PADRE EUSTAQUIO;BH;607174.78;797630.57;938
+940;2001038756;B04001;HOMICIDIO TENTAD;RUA MUTUM;288;47003;21/1/2001 01:59:00;CIDADAO COMUM;S;0;PADRE EUSTAQUIO;BH;606334.37;797068.42;939
+941;2001038762;B03000;AMEACA;RUA DOS CARIJOS;408;81243;21/1/2001 02:05:00;CIDADAO COMUM;N;AP4;CENTRO (BH);BH;611064.18;797198.94;940
+942;2001038767;B04002;HOMICIDIO CONSUM;RUA TOMBOS;52;67985;21/1/2001 02:09:00;INICIATIVA;N;0;CALAFATE;BH;607976.07;796885.75;941
+943;2001038780;B06000;LESAO CORPORAL;AV DOM JOAO VI;1640;22294;21/1/2001 02:15:00;INICIATIVA;N;0;PALMEIRAS;BH;606859.87;791154.76;942
+944;2001038784;B06000;LESAO CORPORAL;RUA TAMANDARE;261;66778;21/1/2001 02:18:00;CIDADAO COMUM;S;0;JOAO PINHEIRO;BH;605277.43;795832.10;943
+945;2001038806;B03000;AMEACA;RUA CURITIBA;339;19090;21/1/2001 02:31:00;CIDADAO COMUM;S;;CENTRO (BH);BH;610965.75;797546.07;944
+946;2001038890;B06000;LESAO CORPORAL;AV SEN LEVINDO C;4445;14866;21/1/2001 03:43:00;CIDADAO COMUM;N;0;CH VALE DO JATOB;BH;601253.14;786620.47;945
+947;2001038915;B02000;RIXA;AV VILARINHOS;313;109988;21/1/2001 03:59:00;CIDADAO COMUM;S;;VENDA NOVA;BH;609359.99;808778.03;946
+948;2001039010;B03000;AMEACA;RUA DOS TUPINAMB;875;69940;21/1/2001 05:43:00;CIDADAO COMUM;N;0;CENTRO (BH);BH;610735.22;797386.07;947
+949;2001039148;B06000;LESAO CORPORAL;AV AFONSO PENA;305;1259;21/1/2001 08:31:00;CIDADAO COMUM;N;PX305;CENTRO (BH);BH;610990.99;797465.67;948
+950;2001039240;B03000;AMEACA;RUA STA ROSA;10;61314;21/1/2001 09:57:00;CIDADAO COMUM;N;NUMERO CORRETO E;SAO TOMAZ;BH;609654.78;805254.46;949
+951;2001039277;B04001;HOMICIDIO TENTAD;RUA PADRE PEDRO ;322;51657;21/1/2001 10:29:00;CIDADAO COMUM;S;;VILA SANTO ANTON;BH;609650.08;808286.90;950
+952;2001039291;B03000;AMEACA;RUA MADEIRA;95;42328;21/1/2001 10:40:00;CIDADAO COMUM;S;;RENASCENCA;BH;611016.45;799716.70;951
+953;2001039354;B06000;LESAO CORPORAL;RUA LINDOLFO DE ;2615;41164;21/1/2001 11:46:00;CIDADAO COMUM;N;NR/EXATO: 2685;SAO DOMINGOS;BH;608030.43;793288.52;952
+954;2001039355;B03000;AMEACA;RUA BARREIRO GRA;141;8258;21/1/2001 11:46:00;INICIATIVA;N;0;MARIA GORETTI;BH;614070.76;803291.42;953
+955;2001039358;B03000;AMEACA;RUA FRANCISCO BR;63;65270;21/1/2001 11:49:00;CIDADAO COMUM;S;LJA;ESTRELA DALVA;BH;607266.70;792342.60;954
+956;2001039382;B03000;AMEACA;RUA SA E BENEVID;86;10708;21/1/2001 12:14:00;CIDADAO COMUM;N;;UNIVERSITARIO;BH;610216.40;802593.25;955
+957;2001039416;B03000;AMEACA;RUA XAVIER DA VE;166;73843;21/1/2001 12:40:00;CIDADAO COMUM;N;;MINAS BRASIL;BH;605784.32;797406.65;956
+958;2001039475;B06000;LESAO CORPORAL;RUA JARDIM DAS O;37;56083;21/1/2001 13:43:00;CIDADAO COMUM;S;0;SAO JOSE;BH;605441.09;799029.32;957
+959;2001039481;B03000;AMEACA;RUA GALBA;152;30463;21/1/2001 13:44:00;CIDADAO COMUM;S;;GLORIA;BH;604337.53;798313.12;958
+960;2001039521;B03000;AMEACA;RUA BOM JESUS DA;599;99680;21/1/2001 14:16:00;CIDADAO COMUM;S;;SANTA TEREZINHA;BH;604069.20;802854.62;959
+961;2001039534;B03000;AMEACA;RUA TENENTE ALIP;40;86436;21/1/2001 14:27:00;INICIATIVA;S;0;JARDIM GUANABARA;BH;611918.24;807418.95;960
+962;2001039550;B04001;HOMICIDIO TENTAD;AV NELIO CERQUEI;15;72359;21/1/2001 14:38:00;CIDADAO COMUM;N;;TIROL;BH;600947.66;789885.51;961
+963;2001039569;B06000;LESAO CORPORAL;RUA DOS CAETES;650;11376;21/1/2001 14:50:00;CIDADAO COMUM;S;PX262;CENTRO (BH);BH;610985.31;797507.20;962
+964;2001039577;B03000;AMEACA;RUA IPANEMA;1135;34726;21/1/2001 14:58:00;CIDADAO COMUM;S;;SARANDI (URCA/BH;BH;602814.25;802311.29;963
+965;2001039578;B06000;LESAO CORPORAL;RUA VITORIA REGI;338;73540;21/1/2001 14:58:00;CIDADAO COMUM;S;0;LINDEIA;BH;599149.00;790863.07;964
+966;2001039605;B03000;AMEACA;RUA DIMAS;87;21291;21/1/2001 15:12:00;CIDADAO COMUM;S;FR;SAO PAULO;BH;613218.01;802951.21;965
+967;2001039615;B03000;AMEACA;RUA JOAO PINTO;10;105542;21/1/2001 15:15:00;CIDADAO COMUM;S;0;JARDINOPOLIS;BH;605044.55;794808.96;966
+968;2001039672;B03000;AMEACA;RUA PADRE MARINH;60;51571;21/1/2001 15:58:00;CIDADAO COMUM;N;0;SANTA EFIGENIA;BH;613015.90;796391.73;967
+969;2001039745;B03000;AMEACA;AV SOUZA AGUIAR;2184;84402;21/1/2001 16:51:00;CIDADAO COMUM;N;;CAETANO FURQUIM;BH;616305.52;798833.55;968
+970;2001039818;B06000;LESAO CORPORAL;RUA FRANCISCO DU;247;46316;21/1/2001 17:29:00;CIDADAO COMUM;N;;SANTA TEREZINHA;BH;604462.79;802286.77;969
+971;2001039821;B06000;LESAO CORPORAL;RUA DOS COMANCHE;717;16367;21/1/2001 17:29:00;CIDADAO COMUM;S;;ITAMARATI;BH;606559.95;807215.50;970
+972;2001039827;B03000;AMEACA;RUA DAS PETUNIAS;1055;11870;21/1/2001 17:34:00;CIDADAO COMUM;S;;LINDEIA;BH;598670.92;790714.72;971
+973;2001039840;B06000;LESAO CORPORAL;RUA SAO SEBASTIA;11;170227;21/1/2001 17:37:00;CIDADAO COMUM;N;;CABANA;BH;604747.07;794381.91;972
+974;2001039862;B06000;LESAO CORPORAL;AV SINFRONIO BRO;1355;66116;21/1/2001 17:49:00;CIDADAO COMUM;S;;BARREIRO;BH;602021.17;790667.36;973
+975;2001039880;B03000;AMEACA;RUA NATIVIDADE;36;96641;21/1/2001 17:57:00;CIDADAO COMUM;S;;ESTRELA DO ORIEN;BH;605991.69;792207.10;974
+976;2001039932;B06000;LESAO CORPORAL;RUA CARTAGENA;154;62257;21/1/2001 18:26:00;CIDADAO COMUM;S;LJA;TREVO;BH;604055.51;805882.78;975
+977;2001039939;B06000;LESAO CORPORAL;AV BRAULIO GOMES;448;81710;21/1/2001 18:24:00;CIDADAO COMUM;N;;ITAIPU BH;BH;600487.50;789975.51;976
+978;2001039961;B03000;AMEACA;RUA PADRE GERALD;28;79840;21/1/2001 18:40:00;CIDADAO COMUM;N;0;MAGNESITA;BH;604349.31;793797.91;977
+979;2001039979;B02000;RIXA;RUA OSCAR CORREI;185;50440;21/1/2001 18:49:00;CIDADAO COMUM;S;;FLORAMAR;BH;611918.19;806355.64;978
+980;2001040002;B03000;AMEACA;RUA ANTONIO PRET;39;4780;21/1/2001 18:58:00;CIDADAO COMUM;N;;ALIPIO DE MELO;BH;604937.08;798863.96;979
+981;2001040030;B06000;LESAO CORPORAL;RUA MARIA MARTIN;1807;44248;21/1/2001 19:14:00;CIDADAO COMUM;N;CAB;SAGRADA FAMILIA;BH;613531.45;799029.43;980
+982;2001040101;B03000;AMEACA;RUA COMENDADOR W;472;16430;21/1/2001 19:48:00;INICIATIVA;S;0;SAO TOMAZ;BH;610078.75;805261.96;981
+983;2001040108;B03000;AMEACA;RUA DA CONSTITUI;26;102368;21/1/2001 19:51:00;CIDADAO COMUM;N;FU;CEU AZUL;BH;604159.50;807833.29;982
+984;2001040115;B04001;HOMICIDIO TENTAD;RUA FATIMA SIMOE;63;117205;21/1/2001 19:56:00;CIDADAO COMUM;N;0;CAPITAO EDUARDO;BH;618273.92;806536.95;983
+985;2001040172;B04001;HOMICIDIO TENTAD;RUA SOARES DO CO;54;66217;21/1/2001 20:27:00;CIDADAO COMUM;N;;VILA PARIS;BH;609894.39;793593.43;984
+986;2001040193;B06000;LESAO CORPORAL;RUA JANUARIA MAR;55;85418;21/1/2001 20:36:00;CIDADAO COMUM;S;;SERRA VERDE;BH;608917.00;810389.06;985
+987;2001040195;B03000;AMEACA;RUA STA DOROTEIA;30;60500;21/1/2001 20:37:00;CIDADAO COMUM;S;CAB;SAO GABRIEL;BH;613919.00;804270.30;986
+988;2001040271;B03000;AMEACA;RUA JOSEFINA FIR;133;98690;21/1/2001 21:08:00;CIDADAO COMUM;S;;MANTIQUEIRA;BH;607149.10;810079.48;987
+989;2001040294;B06000;LESAO CORPORAL;RUA DOS INDEPEND;258;109165;21/1/2001 21:19:00;CIDADAO COMUM;S;0;VILA SANTA RITA;BH;601157.29;787604.80;988
+990;2001040385;B06000;LESAO CORPORAL;RUA OCIDENTAL;532;73903;21/1/2001 22:05:00;CIDADAO COMUM;S;0;SERRANO;BH;603644.31;800551.97;989
+991;2001040488;B03000;AMEACA;AV SILVA GUIMARA;20;65863;21/1/2001 23:12:00;INICIATIVA;N;0;ITAIPU BH;BH;598818.25;789175.63;990
+992;2001040505;B06000;LESAO CORPORAL;RUA BEZERRA DE M;131;9525;21/1/2001 23:22:00;CIDADAO COMUM;S;CAA;NAZARE;BH;615459.45;804541.73;991
+993;2001040518;B04001;HOMICIDIO TENTAD;RUA SESSENTA E O;359;106066;21/1/2001 23:28:00;CIDADAO COMUM;N;FU;TOPAZIO;BH;607584.58;812106.94;992
+994;2001040568;B03000;AMEACA;RUA ENGENHO DO C;154;94586;22/1/2001 00:04:00;CIDADAO COMUM;S;;ENGENHO NOGUEIRA;BH;606492.27;800416.82;993
+995;2001040585;B03000;AMEACA;RUA PINTOR AUGUS;20;128091;22/1/2001 00:13:00;CIDADAO COMUM;S;CSA;TUPI;BH;613230.05;805854.87;994
+996;2001040597;B04001;HOMICIDIO TENTAD;RUA JAGUARIBE;71;36822;22/1/2001 00:28:00;CIDADAO COMUM;S;;CONCORDIA;BH;610604.19;799503.99;995
+997;2001040609;B06000;LESAO CORPORAL;RUA BEIRA LINHA;188;121732;22/1/2001 00:42:00;CIDADAO COMUM;S;;ANTONIO RIBEIRO ;BH;615463.61;805379.11;996
+998;2001040618;B03000;AMEACA;RUA LAURO GOMES ;128;64845;22/1/2001 00:51:00;CIDADAO COMUM;S;AP2;DOM JOAQUIM;BH;613776.69;801526.10;997
+999;2001040661;B08000;VIOLACAO DE DOMI;RUA MADALENA;315;42315;22/1/2001 01:16:00;CIDADAO COMUM;N;0;SENHOR BOM JESUS;BH;609692.90;799840.91;998
+1000;2001040696;B04001;HOMICIDIO TENTAD;AV BERNARDO VASC;1172;9411;22/1/2001 01:57:00;CIDADAO COMUM;N;;CACHOEIRINHA;BH;610951.68;801058.28;999
+1001;2001040802;B06000;LESAO CORPORAL;RUA SAO JOAQUIM;698;62940;22/1/2001 04:24:00;CIDADAO COMUM;S;;SAGRADA FAMILIA;BH;613152.40;799476.16;1000
+1002;2001041104;B03000;AMEACA;AV AFONSO PENA;867;1259;22/1/2001 10:15:00;CIDADAO COMUM;N;0;CENTRO (BH);BH;611254.14;797008.25;1001
+1003;2001041109;B06000;LESAO CORPORAL;RUA VIOLETA;596;73074;22/1/2001 10:16:00;CIDADAO COMUM;S;;ESPLANADA;BH;614632.06;798499.76;1002
+1004;2001041181;B06000;LESAO CORPORAL;RUA MARIA ANTONI;123;15730;22/1/2001 11:21:00;CIDADAO COMUM;N;;SAO JOAO BATISTA;BH;608281.16;808228.73;1003
+1005;2001041191;B03000;AMEACA;AV AFONSO PENA;571;1259;22/1/2001 11:27:00;CIDADAO COMUM;N;;CENTRO (BH);BH;611120.69;797250.44;1004
+1006;2001041277;B09000;ABANDONO DE INCA;RUA GAMA CERQUEI;840;30564;22/1/2001 12:31:00;CIDADAO COMUM;N;;JARDIM AMERICA;BH;607374.14;794959.39;1005
+1007;2001041394;B03000;AMEACA;RUA DONA VIRGINI;110;23054;22/1/2001 14:11:00;CIDADAO COMUM;S;;PADRE EUSTAQUIO;BH;606564.90;797958.84;1006
+1008;2001041412;B03000;AMEACA;RUA GALDINO;18;75590;22/1/2001 14:27:00;CIDADAO COMUM;S;;LINDEIA;BH;599722.92;790847.61;1007
+1009;2001041423;B03000;AMEACA;RUA JOAQUIM DE F;1313;38033;22/1/2001 14:35:00;INICIATIVA;S;0;SANTA HELENA (BH;BH;603050.87;790075.16;1008
+1010;2001041519;B03000;AMEACA;RUA LICINIO PORT;28;20434;22/1/2001 15:43:00;CIDADAO COMUM;S;;TIROL;BH;599792.31;789385.84;1009
+1011;2001041545;B04001;HOMICIDIO TENTAD;RUA ICO;130;34020;22/1/2001 15:57:00;CIDADAO COMUM;S;;SAUDADE;BH;615033.00;797538.06;1010
+1012;2001041573;B03000;AMEACA;RUA MORRINHOS;397;46808;22/1/2001 16:08:00;CIDADAO COMUM;N;0;CAETANO FURQUIM;BH;616540.30;798975.24;1011
+1013;2001041608;B03000;AMEACA;RUA TUCUMAN;40;69823;22/1/2001 16:31:00;INICIATIVA;N;0;SAO GERALDO;BH;614856.59;799413.07;1012
+1014;2001041799;B06000;LESAO CORPORAL;RUA COVA IRIA;406;120972;22/1/2001 18:21:00;CIDADAO COMUM;N;;MARIA HELENA;BH;605238.63;810733.95;1013
+1015;2001041803;B06000;LESAO CORPORAL;RUA TREZE DE SET;266;69168;22/1/2001 18:23:00;CIDADAO COMUM;N;;LEONINA;BH;608522.06;793376.97;1014
+1016;2001041831;B03000;AMEACA;RUA MARCIA WINDS;82;21478;22/1/2001 18:35:00;CIDADAO COMUM;S;;MINEIRAO;BH;601800.40;785099.89;1015
+1017;2001041843;B04001;HOMICIDIO TENTAD;RUA CURITIBA;685;19090;22/1/2001 18:40:00;CIDADAO COMUM;N;0;CENTRO (BH);BH;610868.54;797204.70;1016
+1018;2001041890;B03000;AMEACA;RUA ENGENHO DO S;713;80427;22/1/2001 19:04:00;INICIATIVA;N;;ENGENHO NOGUEIRA;BH;606348.11;800172.67;1017
+1019;2001041907;B03000;AMEACA;RUA MINISTRO OLI;531;46619;22/1/2001 19:12:00;INICIATIVA;S;0;SANTA MONICA;BH;607645.48;807903.83;1018
+1020;2001041917;B06000;LESAO CORPORAL;RUA DOM LUCIO AN;892;22382;22/1/2001 19:17:00;CIDADAO COMUM;S;AP 204;CORACAO EUCARIST;BH;605491.73;796342.06;1019
+1021;2001042143;B04001;HOMICIDIO TENTAD;BECO SAO PAULO;5;301199;22/1/2001 21:21:00;CIDADAO COMUM;S;0;MORRO DO PAPAGAI;BH;610955.63;793472.49;1020
+1022;2001042149;B04002;HOMICIDIO CONSUM;RUA CORONEL ANTO;182;17590;22/1/2001 21:24:00;INICIATIVA;N;0;JARDIM LEBLON;BH;606140.28;807563.65;1021
+1023;2001042224;B03000;AMEACA;RUA VEREADOR ORL;259;71573;22/1/2001 22:12:00;CIDADAO COMUM;S;;DAS INDUSTRIAS;BH;603777.40;792859.37;1022
+1024;2001042265;B04001;HOMICIDIO TENTAD;AV MENELICK DE C;386;30448;22/1/2001 22:36:00;INICIATIVA;N;0;FLAVIO MARQUES D;BH;604597.26;788928.08;1023
+1025;2001042338;B03000;AMEACA;RUA CACONDE;109;11275;22/1/2001 23:32:00;CIDADAO COMUM;S;;NOVA FLORESTA;BH;611770.35;800238.44;1024
+1026;2001042371;B06000;LESAO CORPORAL;RODOVIA MG 20;17;26620;22/1/2001 23:58:00;INICIATIVA;S;0;BELO HORIZONTE (;BH;614269.93;806003.75;1025
+1027;2001042380;B04002;HOMICIDIO CONSUM;BECO PRINCIPAL;5;301983;23/1/2001 00:09:00;CIDADAO COMUM;N;0;SAO JOSE;BH;604808.72;799278.97;1026
+1028;2001042402;B04001;HOMICIDIO TENTAD;RUA DAS GAIVOTAS;778;30450;23/1/2001 00:19:00;CIDADAO COMUM;S;;VILA CLORIS;BH;611033.72;807691.96;1027
+1029;2001042428;B06000;LESAO CORPORAL;RUA TIZIU;66;95881;23/1/2001 00:34:00;CIDADAO COMUM;N;LJ;GOIANIA;BH;615310.05;802956.29;1028
+1030;2001042441;B03000;AMEACA;RUA PAGEU;200;51818;23/1/2001 00:43:00;CIDADAO COMUM;S;0;CONCORDIA;BH;611061.99;798954.74;1029
+1031;2001042563;B06000;LESAO CORPORAL;RUA CONSELHEIRO ;369;17095;23/1/2001 02:54:00;INICIATIVA;N;0;FLORESTA;BH;612011.55;797008.04;1030
+1032;2001042583;B08000;VIOLACAO DE DOMI;RUA ROBERTO BARB;16;94053;23/1/2001 03:29:00;INICIATIVA;N;0;CARDOSO;BH;603859.19;788590.10;1031
+1033;2001042596;B06000;LESAO CORPORAL;RUA NELSON HUNGR;10;46634;23/1/2001 03:47:00;CIDADAO COMUM;N;;TUPI;BH;612851.92;806239.44;1032
+1034;2001042696;B03000;AMEACA;RUA FLOR DE VIDR;310;13504;23/1/2001 07:32:00;CIDADAO COMUM;N;0;CASTELO;BH;605657.99;799640.71;1033
+1035;2001042742;B06000;LESAO CORPORAL;RUA RAVENA;179;58048;23/1/2001 08:14:00;CIDADAO COMUM;S;;NOVA VISTA;BH;614868.70;800661.13;1034
+1036;2001042783;B06000;LESAO CORPORAL;RUA CONDOR;405;16773;23/1/2001 08:49:00;CIDADAO COMUM;N;0;NOVA CINTRA;BH;605871.88;793840.52;1035
+1037;2001042838;B06000;LESAO CORPORAL;RUA JOAO PAULO I;220;300458;23/1/2001 09:26:00;CIDADAO COMUM;N;;SAO DOMINGOS;BH;607666.14;793505.29;1036
+1038;2001042899;B03000;AMEACA;AV PRESIDENTE AN;3333;4461;23/1/2001 10:14:00;INICIATIVA;N;0;CACHOEIRINHA;BH;609867.68;801202.75;1037
+1039;2001043019;B03000;AMEACA;RUA ALVARO ALVIM;15;103490;23/1/2001 11:32:00;CIDADAO COMUM;S;;CAICARA;BH;607829.25;800104.71;1038
+1040;2001043064;B03000;AMEACA;RUA CHAFARIZ;111;300275;23/1/2001 12:07:00;CIDADAO COMUM;N;;HAVAI;BH;607375.81;793751.13;1039
+1041;2001043148;B06000;LESAO CORPORAL;AV CRISTIANO MAC;7020;18652;23/1/2001 13:14:00;CIDADAO COMUM;S;;VILA SUZANA;BH;612053.97;803296.28;1040
+1042;2001043181;B06000;LESAO CORPORAL;RUA DOUTOR SETTE;396;23662;23/1/2001 13:45:00;CIDADAO COMUM;S;AP402;LUXEMBURGO;BH;609314.30;794473.59;1041
+1043;2001043201;B03000;AMEACA;RUA DOS TIMBIRAS;1350;67682;23/1/2001 13:56:00;CIDADAO COMUM;S;;FUNCIONARIOS;BH;611415.81;796238.60;1042
+1044;2001043276;B03000;AMEACA;RUA CAMAPUAN;200;11726;23/1/2001 14:50:00;CIDADAO COMUM;S;AP503;ALTO BARROCA;BH;607974.18;795648.55;1043
+1045;2001043278;B03000;AMEACA;RUA DOS TAMOIOS;486;66825;23/1/2001 14:51:00;INICIATIVA;S;PX438;CENTRO (BH);BH;610901.10;797097.30;1044
+1046;2001043312;B03000;AMEACA;RUA FRANCISCO MA;420;56824;23/1/2001 15:16:00;INICIATIVA;S;0;ESTRELA DALVA;BH;607428.83;792074.36;1045
+1047;2001043368;B06000;LESAO CORPORAL;RUA JEQUIA;270;37245;23/1/2001 15:50:00;CIDADAO COMUM;N;CAFR;SAO CRISTOVAO;BH;610642.51;799757.02;1046
+1048;2001043397;B06000;LESAO CORPORAL;AV JOSE RACHEL D;130;85912;23/1/2001 16:05:00;CIDADAO COMUM;S;0;JARDIM VITORIA;BH;616924.95;804830.32;1047
+1049;2001043531;B03000;AMEACA;RUA FORMIGA;431;29136;23/1/2001 17:33:00;CIDADAO COMUM;S;;LAGOINHA;BH;610642.40;798955.21;1048
+1050;2001043533;B03000;AMEACA;RUA CONGONHAL;50;82955;23/1/2001 17:35:00;CIDADAO COMUM;S;;SANTA TEREZINHA;BH;604214.03;802374.59;1049
+1051;2001043541;B06000;LESAO CORPORAL;RUA SAO BENTO;1862;127801;23/1/2001 17:41:00;CIDADAO COMUM;S;;INSTITUTO AGRONO;BH;613806.19;798841.38;1050
+1052;2001043682;B06000;LESAO CORPORAL;RUA VENEZA;16;71444;23/1/2001 18:55:00;CIDADAO COMUM;S;B;NOVA SUISSA;BH;607426.53;795521.26;1051
+1053;2001043765;B03000;AMEACA;RUA DOS JES;158;37333;23/1/2001 19:45:00;CIDADAO COMUM;S;0;SANTA MONICA;BH;607044.75;807302.74;1052
+1054;2001043807;B03000;AMEACA;RUA JAIME GOMES;40;36835;23/1/2001 20:20:00;CIDADAO COMUM;S;;FLORESTA;BH;612185.31;798118.31;1053
+1055;2001043817;B03000;AMEACA;RUA CASTELO BRAN;70;14030;23/1/2001 20:24:00;CIDADAO COMUM;S;;SANTA TEREZINHA;BH;604435.67;802549.95;1054
+1056;2001043831;B06000;LESAO CORPORAL;AV OTACILIO NEGR;3400;50566;23/1/2001 20:40:00;CIDADAO COMUM;S;;SAO LUIZ;BH;606628.37;803745.77;1055
+1057;2001043837;B03000;AMEACA;RUA BENJAMIM QUA;133;9210;23/1/2001 20:43:00;CIDADAO COMUM;S;0;PARAISO;BH;614517.71;797103.48;1056
+1058;2001043854;B03000;AMEACA;RUA GASPARINO CA;277;114903;23/1/2001 20:53:00;INICIATIVA;S;0;PAQUETA;BH;605422.28;802400.54;1057
+1059;2001043896;B03000;AMEACA;RUA MANOEL CAYLL;160;43043;23/1/2001 21:26:00;CIDADAO COMUM;S;AP102;HORTO;BH;613298.53;798204.06;1058
+1060;2001043949;B06000;LESAO CORPORAL;RUA CHAFARIZ;40;300275;23/1/2001 21:55:00;CIDADAO COMUM;N;CAB;HAVAI;BH;607407.04;793804.07;1059
+1061;2001044015;B06000;LESAO CORPORAL;AV AUGUSTO DE LI;1122;6731;23/1/2001 22:44:00;CIDADAO COMUM;N;BLJ     AP301;BARRO PRETO;BH;610255.53;796843.17;1060
+1062;2001044020;B06000;LESAO CORPORAL;RUA CARAVELAS;410;13141;23/1/2001 22:49:00;CIDADAO COMUM;S;0;VERA CRUZ;BH;615549.03;798247.68;1061
+1063;2001044040;B03000;AMEACA;RUA YARA LUCIA;44;33777;23/1/2001 23:01:00;CIDADAO COMUM;S;PX30;NOVA CINTRA;BH;606182.82;793671.01;1062
+1064;2001044084;B06000;LESAO CORPORAL;RUA IBITIRA;228;33940;23/1/2001 23:33:00;CIDADAO COMUM;S;CAA;VILA MARAVILHAS;BH;602921.19;795334.48;1063
+1065;2001044123;B06000;LESAO CORPORAL;RUA STA CLAUDIA;246;60453;24/1/2001 00:05:00;CIDADAO COMUM;S;0;ARAGUAIA;BH;604414.90;789230.99;1064
+1066;2001044126;B06000;LESAO CORPORAL;AV VILARINHOS;530;109988;24/1/2001 00:06:00;CIDADAO COMUM;N;0;VENDA NOVA;BH;609120.91;808971.44;1065
+1067;2001044157;B03000;AMEACA;RUA CAETANO PIRR;465;45773;24/1/2001 00:35:00;CIDADAO COMUM;S;A;MILIONARIOS;BH;604038.30;790103.10;1066
+1068;2001044174;B06000;LESAO CORPORAL;RUA VINTE E UM D;7;72286;24/1/2001 00:51:00;CIDADAO COMUM;N;;CENTRO (BH);BH;610893.23;797841.46;1067
+1069;2001044311;B06000;LESAO CORPORAL;AV AUGUSTO DE LI;876;6731;24/1/2001 03:44:00;INICIATIVA;N;0;CENTRO (BH);BH;610565.57;796755.00;1068
+1070;2001044359;B04001;HOMICIDIO TENTAD;RUA DAS PERPETUA;615;911;24/1/2001 05:08:00;CIDADAO COMUM;N;;LINDEIA;BH;599593.30;790595.60;1069
+1071;2001044716;B04002;HOMICIDIO CONSUM;RUA CACHOEIRA DE;10;11247;24/1/2001 11:00:00;CIDADAO COMUM;N;;MORRO DAS PEDRAS;BH;609110.10;794267.00;1070
+1072;2001044993;B03000;AMEACA;AV AMAZONAS;3034;3140;24/1/2001 14:35:00;CIDADAO COMUM;S;0;GUTIERREZ;BH;608815.11;795984.84;1071
+1073;2001045017;B03000;AMEACA;RUA JOSE LAVARIN;232;40537;24/1/2001 14:53:00;CIDADAO COMUM;S;FU;PARAISO;BH;614298.37;796663.19;1072
+1074;2001045143;B03000;AMEACA;RUA ITAIPU;1149;35439;24/1/2001 15:54:00;CIDADAO COMUM;S;0;VERA CRUZ;BH;616346.43;797993.47;1073
+1075;2001045149;B03000;AMEACA;RUA LEONCIO CHAG;214;40700;24/1/2001 15:55:00;CIDADAO COMUM;N;0;UNIAO;BH;613047.37;800965.00;1074
+1076;2001045158;B06000;LESAO CORPORAL;RUA AMERICO SCOT;53;3342;24/1/2001 16:01:00;CIDADAO COMUM;S;;SERRA;BH;612638.54;795565.51;1075
+1077;2001045167;B03000;AMEACA;RUA FERNAO DIAS;80;28133;24/1/2001 16:04:00;CIDADAO COMUM;S;0;CASA BRANCA;BH;615915.15;798840.47;1076
+1078;2001045249;B06000;LESAO CORPORAL;RUA FELISBURGO;108;3950;24/1/2001 16:46:00;CIDADAO COMUM;S;0;PROVIDENCIA;BH;612659.95;804501.51;1077
+1079;2001045290;B03000;AMEACA;RUA PEDRO GLANSM;120;53044;24/1/2001 17:14:00;CIDADAO COMUM;S;0;INDUSTRIAL RODRI;BH;615927.58;808718.47;1078
+1080;2001045375;B06000;LESAO CORPORAL;RUA GUARATINGUET;24;32295;24/1/2001 18:01:00;CIDADAO COMUM;N;CAFU;GUARANI;BH;612687.54;805517.29;1079
+1081;2001045377;B06000;LESAO CORPORAL;RUA GUARARAPES;22;32241;24/1/2001 18:01:00;CIDADAO COMUM;S;;GLORIA;BH;603926.83;798914.01;1080
+1082;2001045445;B03000;AMEACA;AV ASSIS CHATEAU;176;6353;24/1/2001 18:40:00;CIDADAO COMUM;S;;FLORESTA;BH;612121.94;797426.16;1081
+1083;2001045543;B04001;HOMICIDIO TENTAD;RUA SOLIMOES;172;66273;24/1/2001 19:22:00;CIDADAO COMUM;S;;CABANA;BH;604623.34;794561.91;1082
+1084;2001045631;B03000;AMEACA;RUA DEZOITO;25;80225;24/1/2001 20:15:00;CIDADAO COMUM;S;;NOVA CINTRA;BH;605387.77;793337.29;1083
+1085;2001045633;B06000;LESAO CORPORAL;RUA RUBIO FERREI;124;56373;24/1/2001 20:16:00;CIDADAO COMUM;N;FU;TIROL;BH;599909.18;789518.18;1084
+1086;2001045730;B03000;AMEACA;RUA CARMEM;117;100407;24/1/2001 21:14:00;CIDADAO COMUM;N;;SANTA MONICA DO ;BH;606236.18;808762.74;1085
+1087;2001045738;B03000;AMEACA;RUA PADRE PEDRO ;175;51657;24/1/2001 21:19:00;CIDADAO COMUM;S;;VENDA NOVA;BH;609671.68;808130.71;1086
+1088;2001045757;B03000;AMEACA;RUA T;171;78456;24/1/2001 21:31:00;CIDADAO COMUM;N;;VILA PINHO;BH;602287.09;787641.67;1087
+1089;2001045759;B04001;HOMICIDIO TENTAD;RUA VERA LUCIA;100;71520;24/1/2001 21:29:00;CIDADAO COMUM;N;HOSP. DOM BOSCO;SINIMBU;BH;606759.42;808149.86;1088
+1090;2001045797;B03000;AMEACA;RUA CORREGO DA M;175;18160;24/1/2001 21:53:00;CIDADAO COMUM;S;;SAGRADA FAMILIA;BH;613008.28;798049.61;1089
+1091;2001045827;B06000;LESAO CORPORAL;RUA COLUNA PREST;509;16354;24/1/2001 22:16:00;INICIATIVA;N;0;PROVIDENCIA;BH;612375.03;803902.06;1090
+1092;2001045847;B09000;ABANDONO DE INCA;RUA DOS GUARANIS;527;32181;24/1/2001 22:27:00;CIDADAO COMUM;S;PX527;CENTRO (BH);BH;610657.75;797116.77;1091
+1093;2001045864;B04001;HOMICIDIO TENTAD;RUA CINCO;140;78037;24/1/2001 22:35:00;CIDADAO COMUM;S;0;INDEPENDENCIA;BH;601574.18;786072.51;1092
+1094;2001045905;B03000;AMEACA;RUA MADRE ISABEL;130;120768;24/1/2001 22:56:00;POLICIAL MILITAR;N;0;SAO GERALDO;BH;616215.65;799943.84;1093
+1095;2001045932;B03000;AMEACA;RUA DES BRAULIO;1553;19917;24/1/2001 23:15:00;INICIATIVA;N;0;VERA CRUZ;BH;616310.09;797705.61;1094
+1096;2001045960;B06000;LESAO CORPORAL;RUA ANTONIO FALA;441;82930;24/1/2001 23:33:00;CIDADAO COMUM;S;;SARANDI (URCA/BH;BH;603894.24;802156.28;1095
+1097;2001045965;B03000;AMEACA;RUA ONZE DE DEZE;93;112687;24/1/2001 23:39:00;CIDADAO COMUM;S;0;LEONINA;BH;608748.36;793528.53;1096
+1098;2001046114;B03000;AMEACA;AV SERRANA;530;65040;25/1/2001 01:36:00;CIDADAO COMUM;N;;SERRANO;BH;603547.03;801432.44;1097
+1099;2001046127;B03000;AMEACA;RUA JOSE MOREIRA;409;55368;25/1/2001 01:44:00;CIDADAO COMUM;S;FU;SAO MARCOS;BH;614431.87;802397.68;1098
+1100;2001046164;B03000;AMEACA;RUA JORNALISTA O;252;53057;25/1/2001 02:24:00;CIDADAO COMUM;S;;EYMARD;BH;613619.32;803624.62;1099
+1101;2001046236;B06000;LESAO CORPORAL;RUA SETIBA;221;32314;25/1/2001 03:52:00;CIDADAO COMUM;S;0;IPANEMA;BH;604627.33;798423.60;1100
+1102;2001046241;B06000;LESAO CORPORAL;RUA DOS CHILENOS;101;15188;25/1/2001 04:03:00;CIDADAO COMUM;N;;GORDURAS;BH;616531.80;804343.27;1101
+1103;2001046501;B04001;HOMICIDIO TENTAD;RUA PADRE PEDRO ;322;51657;25/1/2001 09:30:00;CIDADAO COMUM;S;0;VILA SANTO ANTON;BH;609650.08;808286.90;1102
+1104;2001046539;B08000;VIOLACAO DE DOMI;RUA POUSO ALEGRE;2486;54932;25/1/2001 09:55:00;CIDADAO COMUM;N;;FLORESTA;BH;613399.86;798014.09;1103
+1105;2001046563;B06000;LESAO CORPORAL;RUA PONTALINA;151;57640;25/1/2001 10:09:00;CIDADAO COMUM;S;;CH CELSO MACHADO;BH;603970.94;801060.78;1104
+1106;2001046593;B06000;LESAO CORPORAL;RUA JUIZ MILTON ;34;78342;25/1/2001 10:32:00;CIDADAO COMUM;S;;ANTONIO RIBEIRO ;BH;614919.77;806285.93;1105
+1107;2001046600;B06000;LESAO CORPORAL;RUA ROMUALDO DIA;291;78705;25/1/2001 10:38:00;CIDADAO COMUM;N;REF:MERCEARIA DO;CH JATOBA IV;BH;600109.79;787826.40;1106
+1108;2001046621;B06000;LESAO CORPORAL;AV RAJA GABAGLIA;1700;57830;25/1/2001 10:54:00;CIDADAO COMUM;N;0;MORRO DAS PEDRAS;BH;608719.62;793771.09;1107
+1109;2001046625;B03000;AMEACA;RUA AVENTINO;247;7025;25/1/2001 10:57:00;CIDADAO COMUM;N;CAB;GLORIA;BH;604050.11;798085.79;1108
+1110;2001046635;B03000;AMEACA;RUA JOAO PAULO I;175;300458;25/1/2001 11:07:00;CIDADAO COMUM;S;;SAO DOMINGOS;BH;607677.28;793509.05;1109
+1111;2001046745;B06000;LESAO CORPORAL;RUA BELEM DE JUD;287;124797;25/1/2001 12:25:00;CIDADAO COMUM;N;;CRISTO REDENTOR;BH;604914.21;790484.26;1110
+1112;2001046764;B03000;AMEACA;RUA DOZE DE MAIO;89;24072;25/1/2001 12:43:00;CIDADAO COMUM;S;;LEONINA;BH;608268.84;793457.66;1111
+1113;2001046785;B03000;AMEACA;RUA OTAVIANO PEN;270;128454;25/1/2001 12:57:00;CIDADAO COMUM;S;AP204;SERRA VERDE;BH;609633.96;810676.53;1112
+1114;2001046824;B06000;LESAO CORPORAL;RUA JOAQUIM ANAC;23;118932;25/1/2001 13:19:00;INICIATIVA;N;0;TEIXEIRA DIAS;BH;603052.88;789295.61;1113
+1115;2001046834;B03000;AMEACA;RUA DOS CAETES;323;11376;25/1/2001 13:28:00;CIDADAO COMUM;S;;CENTRO (BH);BH;611304.85;797393.25;1114
+1116;2001046851;B03000;AMEACA;RUA GABRO;379;30435;25/1/2001 13:39:00;CIDADAO COMUM;S;0;SANTA TEREZA;BH;612925.79;797244.47;1115
+1117;2001046948;B04001;HOMICIDIO TENTAD;AV NOSSA SENHORA;1719;47996;25/1/2001 14:44:00;INICIATIVA;S;0;SAO PEDRO;BH;611051.04;793277.57;1116
+1118;2001047162;B04001;HOMICIDIO TENTAD;RUA QUATRO DE JU;40;170910;25/1/2001 16:52:00;CIDADAO COMUM;N;;LEONINA;BH;608611.71;793487.56;1117
+1119;2001047229;B06000;LESAO CORPORAL;RUA SERENATA;237;172351;25/1/2001 17:21:00;CIDADAO COMUM;S;;VILA CAFEZAL;BH;614290.56;795445.06;1118
+1120;2001047233;B06000;LESAO CORPORAL;RUA JOAQUIM ASSI;140;92679;25/1/2001 17:23:00;CIDADAO COMUM;S;;CALIFORNIA;BH;603481.98;796969.02;1119
+1121;2001047329;B03000;AMEACA;RUA JOAQUIM DE F;1313;38033;25/1/2001 18:20:00;CIDADAO COMUM;S;;SANTA HELENA (BH;BH;603050.87;790075.16;1120
+1122;2001047383;B06000;LESAO CORPORAL;AV BIAS FORTES;161;9553;25/1/2001 18:46:00;CIDADAO COMUM;S;PX400;LOURDES;BH;610994.27;795773.90;1121
+1123;2001047430;B03000;AMEACA;RUA FARMACEUTICO;400;70426;25/1/2001 19:07:00;CIDADAO COMUM;S;0;CANDELARIA;BH;607825.43;809110.55;1122
+1124;2001047502;B04002;HOMICIDIO CONSUM;RUA GRAUNAS;181;31797;25/1/2001 19:49:00;CIDADAO COMUM;N;;FLAVIO MARQUES D;BH;605268.99;788621.91;1123
+1125;2001047511;B03000;AMEACA;RUA POLONIA;51;54541;25/1/2001 19:57:00;CIDADAO COMUM;N;;COPACABANA;BH;605659.23;806545.79;1124
+1126;2001047531;B03000;AMEACA;RUA HELE AMARAL ;45;112747;25/1/2001 20:04:00;CIDADAO COMUM;N;FU;SAO MARCOS;BH;614384.96;802750.10;1125
+1127;2001047634;B04001;HOMICIDIO TENTAD;RUA ALVARO FERRE;75;113591;25/1/2001 21:08:00;CIDADAO COMUM;S;0;JARDIM EUROPA;BH;608159.91;810568.87;1126
+1128;2001047641;B06000;LESAO CORPORAL;RUA ALTEROSA;5;26138;25/1/2001 21:13:00;CIDADAO COMUM;N;0;TAQUARIL;BH;617385.86;797791.56;1127
+1129;2001047653;B04001;HOMICIDIO TENTAD;AV A;270;302850;25/1/2001 21:18:00;INICIATIVA;S;0;GUARANI;BH;613784.86;805457.10;1128
+1130;2001047663;B03000;AMEACA;RUA MALMEQUER;421;42687;25/1/2001 21:23:00;CIDADAO COMUM;N;CA1;LINDEIA;BH;599129.73;791104.90;1129
+1131;2001047717;B03000;AMEACA;RUA MARIA LETICI;205;126780;25/1/2001 21:57:00;CIDADAO COMUM;S;0;DAS INDUSTRIAS;BH;605272.86;790815.43;1130
+1132;2001047724;B04001;HOMICIDIO TENTAD;RUA MANOEL TAVAR;402;1536;25/1/2001 22:05:00;CIDADAO COMUM;S;;GOIANIA;BH;614972.82;802744.77;1131
+1133;2001047745;B06000;LESAO CORPORAL;RUA ROSA CRUZ;255;59283;25/1/2001 22:20:00;CIDADAO COMUM;S;CSB;BOA VISTA;BH;616069.21;799968.25;1132
+1134;2001047758;B06000;LESAO CORPORAL;PRACA ITAPIRA;10;35845;25/1/2001 22:24:00;CIDADAO COMUM;N;;SAO GERALDO;BH;616265.14;798905.89;1133
+1135;2001047775;B06000;LESAO CORPORAL;AV DOUTOR CRISTI;2300;62459;25/1/2001 22:35:00;CIDADAO COMUM;S;0;ITAPOA;BH;609779.66;806002.26;1134
+1136;2001047781;B04001;HOMICIDIO TENTAD;RUA JUATUBA;42;39367;25/1/2001 22:41:00;CIDADAO COMUM;N;;VISTA ALEGRE;BH;605262.83;793420.62;1135
+1137;2001047808;B06000;LESAO CORPORAL;RUA MARIA IZABEL;106;107900;25/1/2001 22:57:00;CIDADAO COMUM;S;;MANTIQUEIRA;BH;606572.69;811478.62;1136
+1138;2001048040;B03000;AMEACA;AV BRASIL;248;10420;26/1/2001 00:54:00;CIDADAO COMUM;N;;SANTA EFIGENIA;BH;612792.45;796553.47;1137
+1139;2001048067;B06000;LESAO CORPORAL;AV VILARINHOS;1551;109988;26/1/2001 01:13:00;CIDADAO COMUM;S;;VENDA NOVA;BH;608767.45;809004.21;1138
+1140;2001048096;B04002;HOMICIDIO CONSUM;AV A;213;302850;26/1/2001 01:43:00;CIDADAO COMUM;S;;GUARANI;BH;613831.79;805433.00;1139
+1141;2001048120;B06000;LESAO CORPORAL;AV OLEGARIO MACI;228;49699;26/1/2001 02:09:00;INICIATIVA;S;0;CENTRO (BH);BH;610607.36;797465.13;1140
+1142;2001048142;B06000;LESAO CORPORAL;RUA SAO FELIPE;282;62386;26/1/2001 02:23:00;CIDADAO COMUM;N;0;SAGRADA FAMILIA;BH;613372.54;798722.04;1141
+1143;2001048268;B05000;SEQUESTRO E CARC;RUA PLATINA;1328;54453;26/1/2001 04:47:00;CIDADAO COMUM;S;FR1328;CALAFATE;BH;607876.92;796707.40;1142
+1144;2001048271;B03000;AMEACA;AV BRASIL;248;10420;26/1/2001 04:55:00;INICIATIVA;S;0;SANTA EFIGENIA;BH;612792.45;796553.47;1143
+1145;2001048331;B06000;LESAO CORPORAL;RUA JOAQUIM DE P;1000;38147;26/1/2001 06:39:00;CIDADAO COMUM;N;;ALIPIO DE MELO;BH;604681.70;799201.87;1144
+1146;2001048348;B03000;AMEACA;RUA PROFESSOR AI;700;72608;26/1/2001 06:59:00;CIDADAO COMUM;S;;SAO JOAO BATISTA;BH;608615.33;807850.01;1145
+1147;2001048563;B06000;LESAO CORPORAL;AV CRISTIANO MAC;2062;18652;26/1/2001 09:33:00;CIDADAO COMUM;N;0;CIDADE NOVA;BH;612189.85;800428.05;1146
+1148;2001048708;B03000;AMEACA;RUA ITARARE;217;35959;26/1/2001 11:06:00;CIDADAO COMUM;S;;CONCORDIA;BH;610928.47;799185.62;1147
+1149;2001048858;B04001;HOMICIDIO TENTAD;RUA JOSE LAVARIN;245;40537;26/1/2001 13:06:00;CIDADAO COMUM;S;;PARAISO;BH;614324.25;796702.92;1148
+1150;2001048874;B04002;HOMICIDIO CONSUM;RUA MONTEIRO LOB;241;46590;26/1/2001 13:13:00;CIDADAO COMUM;N;0;JATOBA;IB;598882.79;789573.14;1149
+1151;2001048894;B06000;LESAO CORPORAL;AV AFONSO PENA;464;1259;26/1/2001 13:22:00;INICIATIVA;S;0;CENTRO (BH);BH;611005.20;797320.30;1150
+1152;2001048910;B03000;AMEACA;RUA MANOEL DINIZ;17;43069;26/1/2001 13:34:00;CIDADAO COMUM;N;0;DOS PALMARES;BH;612125.79;802687.18;1151
+1153;2001048931;B03000;AMEACA;RUA MADRID;201;42403;26/1/2001 13:44:00;INICIATIVA;S;0;COPACABANA;BH;606232.37;806154.01;1152
+1154;2001048993;B03000;AMEACA;RUA AROEIRA NEVE;247;92423;26/1/2001 14:30:00;CIDADAO COMUM;S;CAFU;ALVARO CAMARGOS;BH;604010.44;797371.18;1153
+1155;2001049041;B03000;AMEACA;RUA DOUTOR ALIPI;502;2365;26/1/2001 15:03:00;CIDADAO COMUM;S;;CAFEZAL;BH;613838.04;794600.97;1154
+1156;2001049051;B06000;LESAO CORPORAL;AV DOM PEDRO II;4414;53145;26/1/2001 15:09:00;CIDADAO COMUM;S;;PADRE EUSTAQUIO;BH;606624.52;798141.20;1155
+1157;2001049190;B06000;LESAO CORPORAL;AV JOSE BONIFACI;90;38579;26/1/2001 16:26:00;CIDADAO COMUM;S;;PRADO LOPES;BH;610155.34;799025.63;1156
+1158;2001049194;B03000;AMEACA;AV HENFIL;590;103550;26/1/2001 16:29:00;INICIATIVA;S;0;SARANDI (URCA/BH;BH;603609.38;801869.84;1157
+1159;2001049372;B06000;LESAO CORPORAL;AV AFONSO VAZ DE;1025;1306;26/1/2001 18:09:00;CIDADAO COMUM;S;0;BARREIRO;BH;602121.95;790867.83;1158
+1160;2001049375;B06000;LESAO CORPORAL;AV ASSIS CHATEAU;23;6353;26/1/2001 18:11:00;CIDADAO COMUM;N;LJZZ;FLORESTA;BH;612282.71;797462.19;1159
+1161;2001049385;B06000;LESAO CORPORAL;RUA CAICARA;1387;11451;26/1/2001 18:15:00;CIDADAO COMUM;N;;SAO GERALDO;BH;616156.88;799378.61;1160
+1162;2001049419;B04002;HOMICIDIO CONSUM;RUA FLOR DO BESO;240;28492;26/1/2001 18:35:00;CIDADAO COMUM;N;0;JARDIM MONTANHES;BH;605973.04;799060.82;1161
+1163;2001049457;B04002;HOMICIDIO CONSUM;RUA ARISTOLINO B;10;41089;26/1/2001 19:00:00;CIDADAO COMUM;N;REF:CASA NOVA;REGINA;BH;598834.62;789796.85;1162
+1164;2001049491;B06000;LESAO CORPORAL;RUA BEIRA ALTA;1036;62777;26/1/2001 19:18:00;CIDADAO COMUM;S;0;SAO FRANCISCO;BH;609649.09;802529.74;1163
+1165;2001049537;B03000;AMEACA;RUA CELIO CAUTIE;36;92612;26/1/2001 19:44:00;CIDADAO COMUM;S;;CALIFORNIA;BH;603380.35;796952.78;1164
+1166;2001049634;B03000;AMEACA;RUA RAMOS;79;57870;26/1/2001 20:46:00;CIDADAO COMUM;S;;SAO MARCOS;BH;614428.82;802482.52;1165
+1167;2001049651;B04001;HOMICIDIO TENTAD;RUA SAO PAULO;365;90213;26/1/2001 20:54:00;CIDADAO COMUM;S;LJA;SARANDI (URCA/BH;BH;602814.92;802490.07;1166
+1168;2001049735;B03000;AMEACA;RUA JOAO PINTO;35;105542;26/1/2001 21:29:00;CIDADAO COMUM;S;;JARDINOPOLIS;BH;605029.47;794803.37;1167
+1169;2001049801;B06000;LESAO CORPORAL;RUA SERVIDAO;93;170201;26/1/2001 22:11:00;CIDADAO COMUM;N;0;CABANA;BH;604396.96;794232.57;1168
+1170;2001049808;B04001;HOMICIDIO TENTAD;RUA AMPERE;1;3484;26/1/2001 22:14:00;CIDADAO COMUM;N;CAB;PRIMEIRO DE MAIO;BH;612112.26;803408.93;1169
+1171;2001049828;B03000;AMEACA;RUA ANTONIO JUST;420;4648;26/1/2001 22:32:00;CIDADAO COMUM;S;;POMPEIA;BH;614843.56;798116.13;1170
+1172;2001049867;B03000;AMEACA;RUA RADIALISTA A;200;122398;26/1/2001 22:54:00;CIDADAO COMUM;N;CS03;CEU AZUL;BH;604585.98;808469.73;1171
+1173;2001049875;B03000;AMEACA;RUA MAYRINK;604;42573;26/1/2001 22:55:00;CIDADAO COMUM;S;;CAETANO FURQUIM;BH;616305.86;799381.93;1172
+1174;2001049979;B08000;VIOLACAO DE DOMI;RUA FREI LUIZ DE;60;96540;26/1/2001 23:52:00;CIDADAO COMUM;S;;ANTONIO RIBEIRO ;BH;614919.28;806533.15;1173
+1175;2001049987;B04001;HOMICIDIO TENTAD;RUA VINTE E UM D;7;72286;26/1/2001 23:55:00;INICIATIVA;N;0;CENTRO (BH);BH;610893.23;797841.46;1174
+1176;2001050074;B04001;HOMICIDIO TENTAD;RUA DOS COMANCHE;495;16367;27/1/2001 00:36:00;CIDADAO COMUM;S;0;ITAMARATI;BH;606692.45;806999.22;1175
+1177;2001050089;B06000;LESAO CORPORAL;RUA GABRO;310;30435;27/1/2001 00:49:00;CIDADAO COMUM;N;0;SANTA TEREZA;BH;612866.12;797324.00;1176
+1178;2001050128;B03000;AMEACA;AV DO CONTORNO;10185;17228;27/1/2001 01:06:00;CIDADAO COMUM;S;0;BARRO PRETO;BH;609218.63;797141.66;1177
+1179;2001050191;B04001;HOMICIDIO TENTAD;RUA DOS URUGUAIO;151;46710;27/1/2001 01:50:00;INICIATIVA;S;0;GORDURAS;BH;616632.70;804348.93;1178
+1180;2001050256;B06000;LESAO CORPORAL;RUA ESPIRITO SAN;35;26052;27/1/2001 02:32:00;INICIATIVA;S;0;CENTRO (BH);BH;611414.93;797615.20;1179
+1181;2001050261;B04001;HOMICIDIO TENTAD;RUA ANTONIO TEIX;1223;119037;27/1/2001 02:33:00;CIDADAO COMUM;S;;TEIXEIRA DIAS;BH;602609.16;790019.78;1180
+1182;2001050273;B03000;AMEACA;RUA MIGUEL ABRAS;105;45698;27/1/2001 02:35:00;CIDADAO COMUM;S;AP301;SERRA;BH;612787.45;794670.58;1181
+1183;2001050281;B04001;HOMICIDIO TENTAD;RUA CARLOS SCHET;523;118771;27/1/2001 02:44:00;CIDADAO COMUM;N;;JARDINOPOLIS;BH;605039.83;794569.69;1182
+1184;2001050339;B03000;AMEACA;RUA CORONEL NEWT;520;124872;27/1/2001 03:22:00;CIDADAO COMUM;N;0;MANGUEIRAS;BH;600751.18;786764.27;1183
+1185;2001050341;B06000;LESAO CORPORAL;RUA DOS CAETES;920;11376;27/1/2001 03:23:00;INICIATIVA;S;0;CENTRO (BH);BH;610732.50;797574.81;1184
+1186;2001050377;B03000;AMEACA;RUA JOSE LEAL DO;71;110593;27/1/2001 03:50:00;CIDADAO COMUM;S;;JARDIM GUANABARA;BH;611585.51;807912.79;1185
+1187;2001050413;B06000;LESAO CORPORAL;RUA LAGOA DOS PA;145;40190;27/1/2001 04:18:00;CIDADAO COMUM;N;;JARDIM LEBLON;BH;605885.22;807433.39;1186
+1188;2001050423;B06000;LESAO CORPORAL;RUA OURO PRETO;293;50730;27/1/2001 04:28:00;CIDADAO COMUM;S;0;BARRO PRETO;BH;609961.08;797017.98;1187
+1189;2001050440;B02000;RIXA;RUA ANGATUBA;144;84368;27/1/2001 04:40:00;CIDADAO COMUM;S;;PIRATININGA;BH;605572.65;809065.32;1188
+1190;2001050455;B03000;AMEACA;RUA SAO TEOFILO;289;105441;27/1/2001 04:55:00;CIDADAO COMUM;N;;PAULO SEXTO;BH;616316.21;806468.17;1189
+1191;2001050466;B03000;AMEACA;RUA JOAO SAMAHA;261;7397;27/1/2001 05:06:00;CIDADAO COMUM;N;;SAO JOAO BATISTA;BH;608633.12;807211.33;1190
+1192;2001050532;B03000;AMEACA;RUA WANDERSON BI;119;102080;27/1/2001 06:35:00;CIDADAO COMUM;N;FR;MINEIRAO;BH;601946.30;785457.99;1191
+1193;2001050545;B06000;LESAO CORPORAL;RUA SAO JOAQUIM;460;62940;27/1/2001 07:00:00;CIDADAO COMUM;S;;SAGRADA FAMILIA;BH;612928.27;799516.16;1192
+1194;2001050551;B04002;HOMICIDIO CONSUM;RUA PLINIO TEIXE;61;98155;27/1/2001 07:07:00;CIDADAO COMUM;S;;DOM SILVERIO;BH;615265.19;804798.58;1193
+1195;2001050560;B04002;HOMICIDIO CONSUM;RUA ANDREQUICE;50;3888;27/1/2001 07:16:00;CIDADAO COMUM;N;;DOM CABRAL;BH;604920.41;797169.31;1194
+1196;2001050572;B06000;LESAO CORPORAL;RUA DOS TUPIS;212;69965;27/1/2001 07:33:00;CIDADAO COMUM;S;;CENTRO (BH);BH;611089.79;796902.82;1195
+1197;2001050596;B03000;AMEACA;RUA REIS DE ABRE;340;63363;27/1/2001 07:48:00;CIDADAO COMUM;S;CAFU;APARECIDA SETIMA;BH;608643.80;800686.52;1196
+1198;2001050642;B08000;VIOLACAO DE DOMI;RUA LINCOLN;477;41136;27/1/2001 08:17:00;CIDADAO COMUM;N;;UNIAO;BH;612774.54;801729.46;1197
+1199;2001050646;B06000;LESAO CORPORAL;PRACA AFONSO ARI;176;1205;27/1/2001 08:19:00;INICIATIVA;N;0;CENTRO (BH);BH;611333.30;796434.60;1198
+1200;2001050686;B03000;AMEACA;RUA MADRID;230;42403;27/1/2001 09:00:00;INICIATIVA;S;;COPACABANA;BH;606215.50;806159.29;1199
+1201;2001050713;B03000;AMEACA;RUA ANITA GARIBA;210;4184;27/1/2001 09:34:00;CIDADAO COMUM;S;CAB;MORRO DAS PEDRAS;BH;608935.51;794538.06;1200
+1202;2001050725;B06000;LESAO CORPORAL;RUA ESTRELA DE P;23;90024;27/1/2001 09:45:00;CIDADAO COMUM;S;;ESTRELA DO ORIEN;BH;605955.92;791890.07;1201
+1203;2001050746;B03000;AMEACA;PRACA ITAPIRA;10;35845;27/1/2001 10:01:00;CIDADAO COMUM;S;;SAO GERALDO;BH;616265.14;798905.89;1202
+1204;2001050770;B03000;AMEACA;RUA JOSE MOREIRA;481;95232;27/1/2001 10:20:00;CIDADAO COMUM;N;0;TIROL;BH;600268.32;789248.46;1203
+1205;2001050788;B06000;LESAO CORPORAL;AV AMAZONAS;2267;3140;27/1/2001 10:34:00;CIDADAO COMUM;S;;SANTO AGOSTINHO;BH;609538.15;796202.90;1204
+1206;2001050937;B03000;AMEACA;RUA IPANEMA;1135;34726;27/1/2001 12:49:00;CIDADAO COMUM;S;;SARANDI (URCA/BH;BH;602814.25;802311.29;1205
+1207;2001050941;B03000;AMEACA;RUA HAVANA;220;115036;27/1/2001 12:49:00;CIDADAO COMUM;N;AP101;ESTRELA DALVA;BH;607670.74;792047.48;1206
+1208;2001050948;B04001;HOMICIDIO TENTAD;RUA PADRE PEDRO ;322;51657;27/1/2001 13:00:00;CIDADAO COMUM;S;;VILA SANTO ANTON;BH;609650.08;808286.90;1207
+1209;2001050949;B03000;AMEACA;RUA OLAVO BILAC;700;49660;27/1/2001 13:00:00;CIDADAO COMUM;N;;SANTA MONICA;BH;607643.18;808117.12;1208
+1210;2001051049;B03000;AMEACA;RUA DECIO SALEMA;67;88750;27/1/2001 14:07:00;CIDADAO COMUM;S;;DOS PALMARES;BH;611952.79;802027.46;1209
+1211;2001051052;B04002;HOMICIDIO CONSUM;RUA PITANGUI;34;54365;27/1/2001 14:09:00;CIDADAO COMUM;N;AP204;SAO CRISTOVAO;BH;610522.93;799402.64;1210
+1212;2001051157;B06000;LESAO CORPORAL;RUA JULITA NOGUE;376;39597;27/1/2001 15:06:00;CIDADAO COMUM;S;;SARANDI (URCA/BH;BH;603732.82;802432.71;1211
+1213;2001051175;B03000;AMEACA;RUA ILHA DE MALT;383;20926;27/1/2001 15:13:00;CIDADAO COMUM;S;0;SAO GABRIEL;BH;613705.47;804079.08;1212
+1214;2001051187;B03000;AMEACA;RUA STO IDELFONS;75;61850;27/1/2001 15:22:00;CIDADAO COMUM;S;0;APARECIDA SETIMA;BH;608474.99;800221.72;1213
+1215;2001051261;B03000;AMEACA;RUA SAO PAULO;848;63464;27/1/2001 16:02:00;INICIATIVA;S;1302;CENTRO BH;BH;610915.13;796961.87;1214
+1216;2001051290;B02000;RIXA;AV AFONSO PENA;464;1259;27/1/2001 16:12:00;CIDADAO COMUM;S;0;CENTRO (BH);BH;611005.20;797320.30;1215
+1217;2001051296;B04001;HOMICIDIO TENTAD;RUA SEBASTIAO SA;168;90078;27/1/2001 16:16:00;CIDADAO COMUM;S;;SAO MARCOS;BH;614744.66;802402.66;1216
+1218;2001051342;B03000;AMEACA;RUA IPANEMA;1135;34726;27/1/2001 16:46:00;CIDADAO COMUM;S;;SARANDI (URCA/BH;BH;602814.25;802311.29;1217
+1219;2001051358;B08000;VIOLACAO DE DOMI;RUA SAO PEDRO DO;33;63842;27/1/2001 16:53:00;CIDADAO COMUM;N;;PRIMEIRO DE MAIO;BH;612040.86;803799.62;1218
+1220;2001051423;B03000;AMEACA;RUA ESPIRITO SAN;421;26052;27/1/2001 17:29:00;INICIATIVA;N;0;CENTRO BH;BH;611314.96;797240.91;1219
+1221;2001051430;B06000;LESAO CORPORAL;RUA WALTER IANNI;250;82186;27/1/2001 17:37:00;CIDADAO COMUM;S;;SAO GABRIEL;BH;613230.08;803699.54;1220
+1222;2001051432;B03000;AMEACA;RUA JOAO PINTO;35;105542;27/1/2001 17:37:00;CIDADAO COMUM;S;;JARDINOPOLIS;BH;605029.47;794803.37;1221
+1223;2001051466;B06000;LESAO CORPORAL;RUA PORTO SEGURO;505;60595;27/1/2001 18:01:00;CIDADAO COMUM;N;;NOVA VISTA;BH;614940.97;800734.58;1222
+1224;2001051470;B06000;LESAO CORPORAL;RUA CLEANTO;42;46499;27/1/2001 18:00:00;CIDADAO COMUM;S;FR30;BELMONT;BH;615394.32;805069.93;1223
+1225;2001051500;B03000;AMEACA;RUA CESAR SALLES;85;113490;27/1/2001 18:15:00;CIDADAO COMUM;S;;JARDIM ESTRELA;BH;607230.33;810530.99;1224
+1226;2001051519;B06000;LESAO CORPORAL;AV LEONIL PRATA;221;101223;27/1/2001 18:27:00;INICIATIVA;N;0;CONJUNTO ALIPIO ;BH;604161.15;799915.91;1225
+1227;2001051531;B06000;LESAO CORPORAL;RUA PADRE PETROL;141;53577;27/1/2001 18:32:00;CIDADAO COMUM;S;;SAGRADA FAMILIA;BH;612868.29;799155.55;1226
+1228;2001051552;B06000;LESAO CORPORAL;BECO LUIZ ALBERT;36;300741;27/1/2001 18:44:00;INICIATIVA;S;0;HORTO;BH;613875.22;798204.15;1227
+1229;2001051562;B03000;AMEACA;RUA SABRINA FERR;34;1132;27/1/2001 18:51:00;CIDADAO COMUM;S;;CARDOSO;BH;603666.33;788546.78;1228
+1230;2001051565;B03000;AMEACA;RUA NELSON DE SE;235;47448;27/1/2001 18:52:00;CIDADAO COMUM;N;0;CINQUENTENARIO;BH;606251.88;792825.67;1229
+1231;2001051584;B03000;AMEACA;RUA IRAPIRUARA;102;101872;27/1/2001 19:04:00;CIDADAO COMUM;N;0;SAO COSME (SL);SL;610221.72;812531.14;1230
+1232;2001051594;B04001;HOMICIDIO TENTAD;RUA CONSUELO;146;106296;27/1/2001 19:04:00;CIDADAO COMUM;S;;JARDIM DOS COMER;BH;607848.43;811390.89;1231
+1233;2001051600;B03000;AMEACA;RUA RENATO GONCA;122;14475;27/1/2001 19:12:00;CIDADAO COMUM;N;0;DOM JOAQUIM;BH;613762.36;801977.09;1232
+1234;2001051646;B06000;LESAO CORPORAL;RUA MORUMBI;96;46849;27/1/2001 19:39:00;CIDADAO COMUM;S;;ITAIPU BH;BH;599330.25;788838.38;1233
+1235;2001051818;B02000;RIXA;RUA OCARA;333;49065;27/1/2001 21:06:00;CIDADAO COMUM;N;;VILA MARAVILHAS;BH;603016.39;795307.65;1234
+1236;2001051850;B06000;LESAO CORPORAL;RUA CAMAPUAN;250;11726;27/1/2001 21:31:00;CIDADAO COMUM;S;A;ALTO BARROCA;BH;607995.04;795600.51;1235
+1237;2001051902;B06000;LESAO CORPORAL;AV SILVA GUIMARA;60;65863;27/1/2001 21:52:00;CIDADAO COMUM;S;;ITAIPU BH;BH;598869.30;789086.11;1236
+1238;2001051904;B06000;LESAO CORPORAL;AV FREI HENRIQUE;410;81360;27/1/2001 21:52:00;CIDADAO COMUM;S;303,BLOCO C.;NOVA CACHOEIRINH;BH;609359.89;801137.27;1237
+1239;2001051948;B04001;HOMICIDIO TENTAD;RUA PROFESSORA G;660;86335;27/1/2001 22:15:00;CIDADAO COMUM;N;;FLORAMAR;BH;611900.95;807062.44;1238
+1240;2001051965;B06000;LESAO CORPORAL;AV BIAS FORTES;1770;9553;27/1/2001 22:29:00;INICIATIVA;N;0;BARRO PRETO;BH;610196.72;797244.85;1239
+1241;2001051992;B06000;LESAO CORPORAL;RUA MEYER;311;45326;27/1/2001 22:45:00;CIDADAO COMUM;N;;CAICARA;BH;607697.54;799497.02;1240
+1242;2001052009;B04001;HOMICIDIO TENTAD;RUA NOVE DE DEZE;211;48872;27/1/2001 22:51:00;INICIATIVA;S;0;LEONINA;BH;608390.33;793413.61;1241
+1243;2001052169;B03000;AMEACA;RUA CARLOS SHIRN;7;7182;28/1/2001 00:21:00;CIDADAO COMUM;S;CAB;TIROL;BH;601034.52;789803.43;1242
+1244;2001052170;B06000;LESAO CORPORAL;RUA ZURICK;11;74092;28/1/2001 00:23:00;CIDADAO COMUM;S;0;NOVA SUISSA;BH;606533.22;796470.48;1243
+1245;2001052190;B03000;AMEACA;RUA VARNA;275;85231;28/1/2001 00:35:00;CIDADAO COMUM;S;CAA;JARDIM EUROPA;BH;608204.41;810553.78;1244
+1246;2001052192;B06000;LESAO CORPORAL;RUA NELSON HUNGR;449;46634;28/1/2001 00:37:00;CIDADAO COMUM;S;REF:CAMPO DO TUP;TUPI;BH;612722.64;806192.86;1245
+1247;2001052311;B06000;LESAO CORPORAL;RUA BARDANA;20;96600;28/1/2001 01:42:00;CIDADAO COMUM;S;;ANTONIO RIBEIRO ;BH;614835.21;806457.22;1246
+1248;2001052312;B03000;AMEACA;RUA CINQUENTA E ;317;74137;28/1/2001 01:43:00;CIDADAO COMUM;N;;NOVA YORK;BH;608575.18;810924.30;1247
+1249;2001052330;B06000;LESAO CORPORAL;RUA GESTAL MOREI;59;47779;28/1/2001 01:52:00;CIDADAO COMUM;S;;VILA CASTANHEIRA;BH;601255.90;788791.33;1248
+1250;2001052372;B06000;LESAO CORPORAL;RUA DA HARMONIA;17;32847;28/1/2001 02:16:00;CIDADAO COMUM;S;;FERNAO DIAS;BH;612751.05;802595.90;1249
+1251;2001052383;B03000;AMEACA;RUA DOUTOR ALIPI;243;2365;28/1/2001 02:21:00;CIDADAO COMUM;N;;SERRA;BH;613840.35;794757.13;1250
+1252;2001052422;B04001;HOMICIDIO TENTAD;RUA CAMILO DE BR;636;11896;28/1/2001 02:42:00;CIDADAO COMUM;N;;PADRE EUSTAQUIO;BH;605855.99;798012.24;1251
+1253;2001052443;B06000;LESAO CORPORAL;RUA PADRE PEDRO ;960;51657;28/1/2001 02:55:00;INICIATIVA;S;0;VENDA NOVA;BH;609089.09;808708.75;1252
+1254;2001052456;B06000;LESAO CORPORAL;RUA CINCO DE JUL;10;15670;28/1/2001 03:00:00;CIDADAO COMUM;N;;PRIMEIRO DE MAIO;BH;612568.07;803874.18;1253
+1255;2001052490;B06000;LESAO CORPORAL;AV BIAS FORTES;1166;9553;28/1/2001 03:25:00;INICIATIVA;N;0;LOURDES;BH;610518.39;796681.64;1254
+1256;2001052493;B06000;LESAO CORPORAL;RUA DOIS;45;302810;28/1/2001 03:26:00;INICIATIVA;S;0;NOVO AARAO REIS;BH;614384.20;805861.01;1255
+1257;2001052574;B04001;HOMICIDIO TENTAD;RUA LADAINHA;45;40118;28/1/2001 04:33:00;CIDADAO COMUM;N;;PRIMEIRO DE MAIO;BH;612013.16;803584.39;1256
+1258;2001052588;B06000;LESAO CORPORAL;AV ABILIO MACHAD;3123;634;28/1/2001 04:47:00;CIDADAO COMUM;N;0;CONJUNTO ALIPIO ;BH;603784.55;799976.88;1257
+1259;2001052625;B03000;AMEACA;RUA TAMBORIL;810;66793;28/1/2001 05:21:00;INICIATIVA;S;0;CONCORDIA;BH;611055.36;799478.21;1258
+1260;2001052673;B03000;AMEACA;RUA CAIANA;78;11350;28/1/2001 06:35:00;CIDADAO COMUM;S;0;SANTA INES;BH;614529.10;800410.29;1259
+1261;2001052738;B06000;LESAO CORPORAL;AV RAJA GABAGLIA;1002;57830;28/1/2001 08:03:00;CIDADAO COMUM;N;;GUTIERREZ;BH;609199.03;794395.98;1260
+1262;2001052829;B06000;LESAO CORPORAL;RUA CARAVELAS;314;13141;28/1/2001 10:03:00;CIDADAO COMUM;N;CAC;VERA CRUZ;BH;615535.24;798308.71;1261
+1263;2001052895;B03000;AMEACA;RUA JOSE LAVARIN;245;40537;28/1/2001 11:04:00;CIDADAO COMUM;S;0;PARAISO;BH;614324.25;796702.92;1262
+1264;2001052971;B06000;LESAO CORPORAL;RUA DOS CURIANGO;30;19050;28/1/2001 12:14:00;CIDADAO COMUM;N;;VILA CLORIS;BH;610539.11;807498.57;1263
+1265;2001052986;B03000;AMEACA;RUA MARIA ROSA D;803;107800;28/1/2001 12:27:00;CIDADAO COMUM;N;;MANTIQUEIRA;BH;606508.78;811712.71;1264
+1266;2001052989;B03000;AMEACA;RUA IVAPE;150;124601;28/1/2001 12:28:00;CIDADAO COMUM;S;0;JAQUELINE;BH;611546.33;810757.01;1265
+1267;2001053049;B03000;AMEACA;AV ESPLANADA;213;126244;28/1/2001 13:29:00;CIDADAO COMUM;S;0;SAO GABRIEL;BH;613217.11;804464.30;1266
+1268;2001053052;B03000;AMEACA;RUA DOS NAMBIQUA;75;110477;28/1/2001 13:30:00;CIDADAO COMUM;N;0;SANTA MONICA;BH;606757.55;806811.23;1267
+1269;2001053091;B06000;LESAO CORPORAL;AV AMAZONAS;2267;3140;28/1/2001 13:58:00;CIDADAO COMUM;S;;BARRO PRETO;BH;609538.15;796202.90;1268
+1270;2001053275;B03000;AMEACA;RUA LAPINHA;786;40376;28/1/2001 16:06:00;CIDADAO COMUM;N;;SALGADO FILHO;BH;606744.32;794824.20;1269
+1271;2001053282;B06000;LESAO CORPORAL;RUA CAVAQUINHO;21;301465;28/1/2001 16:10:00;CIDADAO COMUM;S;;VILA CAFEZAL;BH;614169.38;795393.99;1270
+1272;2001053356;B06000;LESAO CORPORAL;RUA N;6;27197;28/1/2001 16:53:00;CIDADAO COMUM;S;0;PAULO SEXTO;BH;616415.06;806950.10;1271
+1273;2001053363;B06000;LESAO CORPORAL;RUA JANETE CLAIR;168;50046;28/1/2001 16:58:00;CIDADAO COMUM;S;;SANTA MONICA;BH;607149.50;807738.88;1272
+1274;2001053403;B03000;AMEACA;RUA DAVID CAMPIS;218;19683;28/1/2001 17:24:00;CIDADAO COMUM;S;AP401;FLORESTA;BH;611994.62;797423.35;1273
+1275;2001053425;B03000;AMEACA;RUA JOSE FRANCIS;87;78469;28/1/2001 17:35:00;CIDADAO COMUM;S;;VILA PINHO;BH;602321.14;787694.01;1274
+1276;2001053426;B06000;LESAO CORPORAL;RUA NELITA SALER;151;15770;28/1/2001 17:35:00;CIDADAO COMUM;N;;SAO JOAO BATISTA;BH;608440.05;808269.08;1275
+1277;2001053432;B03000;AMEACA;RUA DOS XERENTES;24;84166;28/1/2001 17:39:00;CIDADAO COMUM;S;;SANTA MONICA;BH;606998.62;807231.05;1276
+1278;2001053449;B06000;LESAO CORPORAL;RUA IZABEL DIAS ;30;101920;28/1/2001 17:45:00;CIDADAO COMUM;S;;TEIXEIRA DIAS;BH;602673.89;789210.29;1277
+1279;2001053454;B03000;AMEACA;RUA JOAQUIM HENR;86;106605;28/1/2001 17:49:00;CIDADAO COMUM;S;A;MARIA HELENA;BH;605823.93;810911.64;1278
+1280;2001053485;B03000;AMEACA;RUA MARIA DE OLI;120;44276;28/1/2001 18:06:00;CIDADAO COMUM;S;;INDUSTRIAL RODRI;BH;615725.91;808833.53;1279
+1281;2001053501;B03000;AMEACA;RUA BEIRA LINHA;48;121732;28/1/2001 18:15:00;CIDADAO COMUM;S;CAA;SAO GABRIEL;BH;615355.82;805237.80;1280
+1282;2001053506;B06000;LESAO CORPORAL;RUA SAO GERALDO;301;170283;28/1/2001 18:18:00;CIDADAO COMUM;S;0;CABANA;BH;604776.91;793944.01;1281
+1283;2001053510;B03000;AMEACA;RUA FLOR DE ALEC;389;92451;28/1/2001 18:23:00;CIDADAO COMUM;S;NR EXATO - 490;FILADELFIA;BH;602449.93;797457.13;1282
+1284;2001053517;B03000;AMEACA;AV SEN LEVINDO C;3997;14866;28/1/2001 18:29:00;POLICIAL MILITAR;S;0;CH VALE DO JATOB;BH;601259.67;786764.12;1283
+1285;2001053523;B03000;AMEACA;RUA CAXANGA;267;14390;28/1/2001 18:32:00;POLICIAL MILITAR;S;;GUARANI;BH;612391.07;805707.53;1284
+1286;2001053525;B06000;LESAO CORPORAL;RUA VINTE E NOVE;206;73061;28/1/2001 18:35:00;CIDADAO COMUM;S;CSA;JOAO PINHEIRO;BH;604400.97;796725.97;1285
+1287;2001053542;B04001;HOMICIDIO TENTAD;AV TERESA CRISTI;718;67512;28/1/2001 18:47:00;CIDADAO COMUM;S;;CARLOS PRATES;BH;608524.82;797475.69;1286
+1288;2001053549;B03000;AMEACA;RUA DIVINO;172;21409;28/1/2001 18:51:00;CIDADAO COMUM;N;0;ERMELINDA;BH;609039.36;800563.79;1287
+1289;2001053567;B03000;AMEACA;RUA ITABORAI;73;92870;28/1/2001 19:02:00;CIDADAO COMUM;S;PX6;PILAR;BH;607759.30;788416.73;1288
+1290;2001053588;B03000;AMEACA;RUA BARAO DO MON;645;63653;28/1/2001 19:10:00;CIDADAO COMUM;N;;CARDOSO;BH;604055.56;787957.50;1289
+1291;2001053638;B03000;AMEACA;RUA AGUAS VERMEL;60;82098;28/1/2001 19:39:00;CIDADAO COMUM;S;;MINASLANDIA;BH;612295.05;804465.10;1290
+1292;2001053658;B06000;LESAO CORPORAL;RUA CONCEICAO DO;167;68253;28/1/2001 19:51:00;CIDADAO COMUM;S;CA2;SANTA INES;BH;614119.12;799674.66;1291
+1293;2001053669;B03000;AMEACA;RUA CANDELARIA;102;12514;28/1/2001 20:00:00;CIDADAO COMUM;S;CSA;NAZARE;BH;615755.10;804693.59;1292
+1294;2001053674;B03000;AMEACA;RUA ALABASTRO;400;1665;28/1/2001 20:03:00;CIDADAO COMUM;N;AP203;SAGRADA FAMILIA;BH;613052.21;798230.19;1293
+1295;2001053681;B03000;AMEACA;RUA ALGARVE;735;61396;28/1/2001 20:08:00;CIDADAO COMUM;N;CAA;SAO FRANCISCO;BH;609186.09;801896.95;1294
+1296;2001053683;B06000;LESAO CORPORAL;RUA LASSANCE;548;84415;28/1/2001 20:09:00;CIDADAO COMUM;S;0;BOA VISTA;BH;615768.49;799690.36;1295
+1297;2001053714;B06000;LESAO CORPORAL;RUA FERNAO DIAS;1694;28133;28/1/2001 20:29:00;CIDADAO COMUM;S;FU;VERA CRUZ;BH;616219.71;797519.14;1296
+1298;2001053718;B06000;LESAO CORPORAL;RUA PROFESSOR ME;275;77920;28/1/2001 20:32:00;CIDADAO COMUM;S;;MANGABEIRAS;BH;612090.78;792751.46;1297
+1299;2001053738;B04002;HOMICIDIO CONSUM;RUA DOUTOR CRIST;312;55598;28/1/2001 20:44:00;OUTROS;N;0;ARAGUAIA;BH;604751.25;789297.85;1298
+1300;2001053745;B04001;HOMICIDIO TENTAD;RUA DOUTOR BENED;445;12252;28/1/2001 20:48:00;CIDADAO COMUM;N;CAFR;ANTONIO RIBEIRO ;BH;612559.52;803764.92;1299
+1301;2001053752;B04002;HOMICIDIO CONSUM;RUA FLOR DE ACAC;220;102226;28/1/2001 20:46:00;CIDADAO COMUM;N;0;MINEIRAO;BH;601652.97;785722.31;1300
+1302;2001053763;B03000;AMEACA;RUA CACIMBA DE A;128;82029;28/1/2001 20:55:00;CIDADAO COMUM;S;;SAO GABRIEL;BH;614244.12;804717.14;1301
+1303;2001053769;B06000;LESAO CORPORAL;RUA MARROCOS;862;44869;28/1/2001 20:56:00;CIDADAO COMUM;S;;JARDIM LEBLON;BH;605521.60;807505.20;1302
+1304;2001053786;B03000;AMEACA;RUA DONA FRANCEL;178;22861;28/1/2001 21:04:00;CIDADAO COMUM;S;0;MARIA VIRGINIA;BH;611567.91;802625.14;1303
+1305;2001053825;B04002;HOMICIDIO CONSUM;RUA DONA LALA FE;854;18712;28/1/2001 21:21:00;CIDADAO COMUM;S;0;MILIONARIOS;BH;604700.79;790766.05;1304
+1306;2001053833;B03000;AMEACA;RUA MONTE SIMPLO;1552;46574;28/1/2001 21:24:00;CIDADAO COMUM;S;;JARDIM AMERICA;BH;606848.39;794673.93;1305
+1307;2001053868;B03000;AMEACA;RUA MENDES DE OL;213;45430;28/1/2001 21:47:00;CIDADAO COMUM;S;0;SANTO ANDRE;BH;609706.47;798762.86;1306
+1308;2001053912;B03000;AMEACA;RUA MARIA AMELIA;490;43812;28/1/2001 22:06:00;CIDADAO COMUM;S;LJZ;SAO BERNARDO;BH;610757.05;805313.24;1307
+1309;2001054009;B06000;LESAO CORPORAL;RUA CLORITA;64;16051;28/1/2001 23:01:00;CIDADAO COMUM;S;AT1701;SANTA TEREZA;BH;612843.67;797209.41;1308
+1310;2001054032;B04002;HOMICIDIO CONSUM;BECO MARCO ANTON;15;170750;28/1/2001 23:12:00;CIDADAO COMUM;S;;MORRO DAS PEDRAS;BH;608920.38;794610.08;1309
+1311;2001054111;B06000;LESAO CORPORAL;AV NELIO CERQUEI;15;72359;29/1/2001 00:01:00;CIDADAO COMUM;S;;TIROL;BH;600947.66;789885.51;1310
+1312;2001054156;B03000;AMEACA;RUA LEONCIO JOSE;82;86350;29/1/2001 00:24:00;CIDADAO COMUM;S;;JARDIM GUANABARA;BH;611968.50;807233.49;1311
+1313;2001054157;B06000;LESAO CORPORAL;RUA VICTOR SANCH;284;87089;29/1/2001 00:26:00;CIDADAO COMUM;N;0;CEU AZUL;BH;605262.37;808625.54;1312
+1314;2001054158;B06000;LESAO CORPORAL;RUA W TRES;446;122621;29/1/2001 00:27:00;CIDADAO COMUM;S;0;PONGELUPE;BH;603956.29;787319.05;1313
+1315;2001054160;B02000;RIXA;AV SANTA TEREZIN;165;61415;29/1/2001 00:28:00;CIDADAO COMUM;S;0;CH DA LAGOA;BH;605063.85;802804.94;1314
+1316;2001054180;B03000;AMEACA;AV DO CONTORNO;6200;17228;29/1/2001 00:39:00;CIDADAO COMUM;S;0;CENTRO (BH);BH;611304.57;794846.88;1315
+1317;2001054243;B03000;AMEACA;RUA ABILIO FERNA;71;95421;29/1/2001 01:23:00;CIDADAO COMUM;S;;JARDIM VITORIA;BH;616742.67;804336.01;1316
+1318;2001054246;B06000;LESAO CORPORAL;RUA EUDES GARCIA;315;113419;29/1/2001 01:25:00;INICIATIVA;N;0;FLORAMAR;BH;611582.85;806831.85;1317
+1319;2001054255;B04001;HOMICIDIO TENTAD;AV LEONIL PRATA;221;101223;29/1/2001 01:35:00;CIDADAO COMUM;S;;CONJUNTO ALIPIO ;BH;604161.15;799915.91;1318
+1320;2001054429;B03000;AMEACA;AV PARANA;122;52230;29/1/2001 05:30:00;INICIATIVA;S;;CENTRO (BH);BH;610785.23;797422.18;1319
+1321;2001054657;B08000;VIOLACAO DE DOMI;RUA CONTAGEM;1225;70293;29/1/2001 09:19:00;CIDADAO COMUM;N;0;BOA VISTA;BH;614534.83;800862.24;1320
+1322;2001054660;B03000;AMEACA;RUA PENIDO;64;53306;29/1/2001 09:21:00;CIDADAO COMUM;S;;PIRAJA;BH;613178.39;802974.59;1321
+1323;2001054799;B06000;LESAO CORPORAL;RUA EUCLIDES DA ;60;26806;29/1/2001 11:17:00;CIDADAO COMUM;N;0;PRADO;BH;608952.90;796051.89;1322
+1324;2001054815;B03000;AMEACA;RUA W TRES;464;122621;29/1/2001 11:24:00;CIDADAO COMUM;S;0;PONGELUPE;BH;603956.29;787319.05;1323
+1325;2001054838;B03000;AMEACA;RUA DOUTOR CRIST;277;55598;29/1/2001 11:44:00;CIDADAO COMUM;S;;ARAGUAIA;BH;604648.63;789196.82;1324
+1326;2001054868;B06000;LESAO CORPORAL;AV COLETORA;956;78241;29/1/2001 12:09:00;CIDADAO COMUM;S;;VILA PINHO;BH;602212.14;787909.78;1325
+1327;2001054918;B06000;LESAO CORPORAL;RUA LUIZA GOMES ;99;86681;29/1/2001 12:45:00;CIDADAO COMUM;N;CS01;JAQUELINE;BH;611466.53;809848.13;1326
+1328;2001054962;B03000;AMEACA;RUA A;673;41110;29/1/2001 13:20:00;CIDADAO COMUM;S;;CH CONFISCO;BH;602680.51;802847.95;1327
+1329;2001055030;B06000;LESAO CORPORAL;RUA ANIBAL VAZ D;35;4128;29/1/2001 14:18:00;CIDADAO COMUM;S;0;TUPI;BH;612241.94;806597.44;1328
+1330;2001055079;B03000;AMEACA;RUA DES BRAULIO;1147;19917;29/1/2001 15:02:00;CIDADAO COMUM;S;;VERA CRUZ;BH;616247.76;797972.01;1329
+1331;2001055128;B04001;HOMICIDIO TENTAD;RUA TIBIRICA;137;67613;29/1/2001 15:31:00;CIDADAO COMUM;S;;NOVA GRANADA;BH;608221.23;794143.73;1330
+1332;2001055209;B03000;AMEACA;RUA DOUTOR CRIST;5913;55598;29/1/2001 16:13:00;CIDADAO COMUM;N;0;ARAGUAIA;BH;605633.98;789574.15;1331
+1333;2001055359;B03000;AMEACA;RUA MACHADO DE A;131;42214;29/1/2001 17:32:00;CIDADAO COMUM;S;;LAGOINHA;BH;610184.60;798601.91;1332
+1334;2001055391;B03000;AMEACA;RUA SAO TOMAS DE;920;63782;29/1/2001 17:55:00;CIDADAO COMUM;S;0;MORRO DO PAPAGAI;BH;610767.14;793197.10;1333
+1335;2001055413;B03000;AMEACA;RUA FREI GASPAR;157;29886;29/1/2001 18:08:00;CIDADAO COMUM;S;;CABANA;BH;604297.25;794201.39;1334
+1336;2001055428;B03000;AMEACA;RUA AROEIRA;923;81385;29/1/2001 18:10:00;CIDADAO COMUM;S;CAA;SAO JOAO BATISTA;BH;610704.45;801881.67;1335
+1337;2001055456;B03000;AMEACA;RUA PEREIRA PASS;42;53375;29/1/2001 18:27:00;CIDADAO COMUM;S;;PRADO LOPES;BH;610200.44;798788.69;1336
+1338;2001055499;B03000;AMEACA;RUA DR CELSO AZE;32;23256;29/1/2001 18:53:00;CIDADAO COMUM;S;AP09;NOVA CINTRA;BH;605899.79;793934.12;1337
+1339;2001055526;B03000;AMEACA;RUA STELLA HANRI;186;91184;29/1/2001 19:11:00;CIDADAO COMUM;S;APTO 201;BURITIS;BH;607973.76;791265.75;1338
+1340;2001055536;B06000;LESAO CORPORAL;RUA FRANCE JOSE ;328;85751;29/1/2001 19:15:00;CIDADAO COMUM;N;CAA;SERRA VERDE;BH;609703.97;810229.05;1339
+1341;2001055558;B03000;AMEACA;RUA CELSO DA CUN;108;86511;29/1/2001 19:24:00;POLICIAL MILITAR;S;0;TREVO;BH;603458.59;806578.82;1340
+1342;2001055570;B03000;AMEACA;RUA HERCULANO SO;727;90093;29/1/2001 19:29:00;CIDADAO COMUM;S;;SAO MARCOS;BH;614694.95;802735.17;1341
+1343;2001055598;B06000;LESAO CORPORAL;RUA FLOR DO ORIE;214;50190;29/1/2001 19:53:00;CIDADAO COMUM;N;;JARDIM MONTANHES;BH;605906.21;799974.11;1342
+1344;2001055608;B03000;AMEACA;RUA LA PAZ;71;40363;29/1/2001 19:56:00;CIDADAO COMUM;S;0;COPACABANA;BH;605705.71;806410.64;1343
+1345;2001055646;B06000;LESAO CORPORAL;RUA CASCADURA;58;13863;29/1/2001 20:23:00;CIDADAO COMUM;N;;CAICARA;BH;607422.93;799127.29;1344
+1346;2001055668;B03000;AMEACA;RUA EPAMINONDAS ;15;25696;29/1/2001 20:33:00;CIDADAO COMUM;S;;VISTA ALEGRE;BH;604476.95;793805.73;1345
+1347;2001055686;B03000;AMEACA;RUA SERRAVITE;35;65081;29/1/2001 20:45:00;CIDADAO COMUM;S;AP24;FLORESTA;BH;612213.50;797991.04;1346
+1348;2001055723;B03000;AMEACA;AV SOUZA AGUIAR;847;84402;29/1/2001 21:08:00;CIDADAO COMUM;S;0;SAO GERALDO;BH;615363.95;798852.85;1347
+1349;2001055772;B03000;AMEACA;RUA NUNO TRISTAO;286;102370;29/1/2001 21:44:00;CIDADAO COMUM;S;;VERA CRUZ;BH;616633.04;797516.63;1348
+1350;2001055788;B03000;AMEACA;RUA HERMENEGILDO;225;33197;29/1/2001 21:52:00;CIDADAO COMUM;S;;TUPI;BH;612279.45;806696.80;1349
+1351;2001055823;B04001;HOMICIDIO TENTAD;AV CRISTIANO MAC;7100;18652;29/1/2001 22:16:00;INICIATIVA;S;0;VILA SUZANA;BH;612026.03;803295.77;1350
+1352;2001055836;B06000;LESAO CORPORAL;AV ITAITE;836;35441;29/1/2001 22:24:00;CIDADAO COMUM;S;LJ;SAO GERALDO;BH;615609.27;799536.30;1351
+1353;2001055880;B03000;AMEACA;RUA TRINTA E OIT;21;34681;29/1/2001 22:55:00;CIDADAO COMUM;S;A;CONJUNTO FELICID;BH;612484.12;807437.95;1352
+1354;2001055892;B03000;AMEACA;RUA MINERVINA EU;100;80820;29/1/2001 22:59:00;CIDADAO COMUM;S;;ESTRELA DO ORIEN;BH;606081.95;792227.89;1353
+1355;2001055976;B03000;AMEACA;BECO NOSSA SENHO;110;300380;29/1/2001 23:52:00;CIDADAO COMUM;S;AP601;PRADO LOPES;BH;609845.68;798847.17;1354
+1356;2001055999;B03000;AMEACA;RUA ALFREDO ALVE;260;108175;30/1/2001 00:07:00;CIDADAO COMUM;S;0;MANTIQUEIRA;BH;606762.54;811481.99;1355
+1357;2001056121;B03000;AMEACA;RUA POUSO ALEGRE;282;54932;30/1/2001 01:45:00;CIDADAO COMUM;N;;FLORESTA;BH;611333.17;797986.35;1356
+1358;2001056150;B06000;LESAO CORPORAL;RUA MADALENA;57;42315;30/1/2001 02:11:00;CIDADAO COMUM;N;;SENHOR BOM JESUS;BH;609926.03;799941.02;1357
+1359;2001056363;B03000;AMEACA;RUA DOS GUARANIS;201;32181;30/1/2001 07:28:00;INICIATIVA;S;0;CENTRO (BH);BH;610742.55;797432.73;1358
+1360;2001056543;B06000;LESAO CORPORAL;RUA SESSENTA E C;41;33650;30/1/2001 10:02:00;CIDADAO COMUM;N;;CONJUNTO FELICID;BH;612355.18;806822.66;1359
+1361;2001056548;B04001;HOMICIDIO TENTAD;RUA MODELO;46;46026;30/1/2001 10:02:00;CIDADAO COMUM;N;;DOS PALMARES;BH;612190.56;802776.59;1360
+1362;2001056633;B06000;LESAO CORPORAL;AV AFONSO PENA;381;1259;30/1/2001 10:53:00;CIDADAO COMUM;S;0;CENTRO (BH);BH;611019.19;797421.73;1361
+1363;2001056801;B04001;HOMICIDIO TENTAD;AV PRESIDENTE AN;7500;4461;30/1/2001 12:53:00;CIDADAO COMUM;S;0;SAO LUIZ;BH;608835.03;804381.07;1362
+1364;2001056804;B04001;HOMICIDIO TENTAD;AV WALDIR SOEIRO;10;118904;30/1/2001 13:02:00;INICIATIVA;N;0;BETANIA;BH;603541.81;789510.67;1363
+1365;2001056822;B06000;LESAO CORPORAL;RUA IARA;7;33751;30/1/2001 13:18:00;CIDADAO COMUM;N;CSFDS;POMPEIA;BH;614644.40;798189.26;1364
+1366;2001056888;B03000;AMEACA;RUA JUPARANA;265;39672;30/1/2001 14:12:00;CIDADAO COMUM;S;0;CONCORDIA;BH;611081.27;799473.64;1365
+1367;2001056931;B03000;AMEACA;RUA ENGENHO DO S;359;80427;30/1/2001 14:34:00;CIDADAO COMUM;N;0;ENGENHO NOGUEIRA;BH;606394.48;799795.89;1366
+1368;2001056997;B06000;LESAO CORPORAL;RUA BANGU;210;84598;30/1/2001 15:17:00;CIDADAO COMUM;N;;CAICARA;BH;607093.33;799200.45;1367
+1369;2001057006;B03000;AMEACA;RUA TACIBA;223;32024;30/1/2001 15:24:00;CIDADAO COMUM;S;0;COQUEIROS;BH;602360.48;799174.13;1368
+1370;2001057158;B03000;AMEACA;RUA OSCAR NEGRAO;428;17776;30/1/2001 16:43:00;CIDADAO COMUM;S;ATO 204;JARDINOPOLIS;BH;605047.53;794663.48;1369
+1371;2001057188;B06000;LESAO CORPORAL;RUA ALEXANDRE SI;140;2135;30/1/2001 17:00:00;CIDADAO COMUM;N;;SALGADO FILHO;BH;606816.61;794109.41;1370
+1372;2001057365;B03000;AMEACA;RUA MAURA;803;82205;30/1/2001 18:49:00;CIDADAO COMUM;S;;IPIRANGA;BH;612027.95;801355.98;1371
+1373;2001057409;B09000;ABANDONO DE INCA;RUA JUAZEIRO DO ;181;64873;30/1/2001 19:08:00;CIDADAO COMUM;N;;ANTONIO RIBEIRO ;BH;615324.29;806762.00;1372
+1374;2001057414;B03000;AMEACA;RUA ITAIPU;960;35439;30/1/2001 19:10:00;CIDADAO COMUM;S;CA3;VERA CRUZ;BH;616274.97;798164.89;1373
+1375;2001057490;B03000;AMEACA;RUA GUAICUI;151;31999;30/1/2001 19:59:00;CIDADAO COMUM;S;0;CORACAO DE JESUS;BH;609829.07;794224.02;1374
+1376;2001057553;B03000;AMEACA;RUA MANOEL PEDRO;11;81892;30/1/2001 20:44:00;CIDADAO COMUM;S;;PIRAJA;BH;614154.29;803189.54;1375
+1377;2001057607;B02000;RIXA;RUA JULITA NUNES;572;130047;30/1/2001 21:19:00;POLICIAL MILITAR;N;;MINASCAIXA;BH;609418.89;809963.99;1376
+1378;2001057639;B06000;LESAO CORPORAL;RUA SAO CLEMENTE;628;62197;30/1/2001 21:41:00;CIDADAO COMUM;S;;SENHOR BOM JESUS;BH;609621.52;799734.14;1377
+1379;2001057649;B03000;AMEACA;RUA COUTO DE MAG;664;18463;30/1/2001 21:48:00;CIDADAO COMUM;S;;PARAISO;BH;614639.66;796763.67;1378
+1380;2001057660;B03000;AMEACA;AV SANTA TEREZA;55;61383;30/1/2001 21:55:00;CIDADAO COMUM;S;;VERA CRUZ;BH;616478.06;797391.26;1379
+1381;2001057698;B03000;AMEACA;RUA JOAQUIM PURI;147;96087;30/1/2001 22:23:00;CIDADAO COMUM;S;;MARIA GORETTI;BH;614549.72;803290.47;1380
+1382;2001057740;B06000;LESAO CORPORAL;RUA JOSE FELIX M;1223;7416;30/1/2001 22:50:00;CIDADAO COMUM;S;;MANTIQUEIRA;BH;606398.63;811463.72;1381
+1383;2001057741;B03000;AMEACA;RUA RIO PETROPOL;305;91893;30/1/2001 22:49:00;CIDADAO COMUM;S;;FILADELFIA;BH;602103.96;797827.26;1382
+1384;2001057761;B06000;LESAO CORPORAL;RUA ARAGUARI;12;5376;30/1/2001 23:00:00;INICIATIVA;S;;BARRO PRETO;BH;610125.29;797250.75;1383
+1385;2001057762;B06000;LESAO CORPORAL;AV FURQUIM WERNE;48;650;30/1/2001 23:01:00;INICIATIVA;S;0;TUPI;BH;613005.07;805799.44;1384
+1386;2001057809;B03000;AMEACA;BECO SANTA MARIA;62;48960;30/1/2001 23:33:00;INICIATIVA;S;A;VILA PARAISO;BH;606182.79;790615.55;1385
+1387;2001057828;B04001;HOMICIDIO TENTAD;RUA AREIA BRANCA;10;75707;30/1/2001 23:36:00;CIDADAO COMUM;S;0;ANTONIO RIBEIRO ;BH;614957.33;807774.40;1386
+1388;2001057851;B02000;RIXA;RUA JACUI;3076;36734;30/1/2001 23:50:00;CIDADAO COMUM;S;0;IPIRANGA;BH;611440.16;800881.73;1387
+1389;2001057872;B04001;HOMICIDIO TENTAD;RUA MOEMA;95;46070;31/1/2001 00:05:00;INICIATIVA;N;0;PADRE EUSTAQUIO;BH;606560.38;798127.38;1388
+1390;2001057993;B03000;AMEACA;RUA MARIANO DE A;537;44411;31/1/2001 01:58:00;CIDADAO COMUM;S;0;ESPLANADA;BH;614922.39;798396.44;1389
+1391;2001058010;B04001;HOMICIDIO TENTAD;AV MANOEL GOMES;250;43103;31/1/2001 02:31:00;CIDADAO COMUM;N;;NOVA CACHOEIRINH;BH;609668.41;801466.24;1390
+1392;2001058084;B06000;LESAO CORPORAL;RUA OTAVIO CARNE;568;50594;31/1/2001 04:41:00;CIDADAO COMUM;S;;BOA VISTA;BH;614956.47;799991.12;1391
+1393;2001058262;B03000;AMEACA;RUA ITAPEVA;721;35820;31/1/2001 08:41:00;CIDADAO COMUM;S;;CONCORDIA;BH;611512.69;799189.30;1392
+1394;2001058280;B04001;HOMICIDIO TENTAD;AV AFONSO PENA;590;1259;31/1/2001 08:49:00;INICIATIVA;N;0;CENTRO BH;BH;611078.27;797193.62;1393
+1395;2001058316;B03000;AMEACA;RUA JOSE EDUARDO;375;38770;31/1/2001 09:17:00;CIDADAO COMUM;S;;MILIONARIOS;BH;604315.58;790674.24;1394
+1396;2001058329;B06000;LESAO CORPORAL;AV SEN LEVINDO C;55;14866;31/1/2001 09:28:00;CIDADAO COMUM;N;CAA;INDEPENDENCIA;BH;601582.86;786276.22;1395
+1397;2001058332;B06000;LESAO CORPORAL;RUA ANGOLA;741;4001;31/1/2001 09:30:00;CIDADAO COMUM;S;AN2;SAO PAULO;BH;613020.50;802906.60;1396
+1398;2001058381;B04001;HOMICIDIO TENTAD;RUA PADRE PEDRO ;1428;51657;31/1/2001 10:01:00;CIDADAO COMUM;N;;VENDA NOVA;BH;608684.86;808921.08;1397
+1399;2001058403;B04001;HOMICIDIO TENTAD;RUA MARLY PASSOS;225;118107;31/1/2001 10:14:00;CIDADAO COMUM;S;;CH TUNEL DE IBIR;BH;599637.89;789970.22;1398
+1400;2001058524;B03000;AMEACA;RUA PADRE MARINH;246;51571;31/1/2001 11:37:00;CIDADAO COMUM;N;0;SANTA EFIGENIA;BH;612834.71;796437.03;1399
+1401;2001058572;B03000;AMEACA;AV TERESA CRISTI;729;67512;31/1/2001 12:10:00;CIDADAO COMUM;S;;CARLOS PRATES;BH;602258.86;791337.75;1400
+1402;2001058607;B03000;AMEACA;RUA ITAOCA;95;35703;31/1/2001 12:31:00;CIDADAO COMUM;S;0;FLORAMAR;BH;611520.36;805977.45;1401
+1403;2001058618;B03000;AMEACA;RUA CONDOR;425;16773;31/1/2001 12:38:00;CIDADAO COMUM;S;0;NOVA CINTRA;BH;605857.42;793824.01;1402
+1404;2001058670;B03000;AMEACA;RUA QUARENTA E U;46;34801;31/1/2001 13:13:00;INICIATIVA;N;0;FELICIDADE;BH;612521.64;807196.19;1403
+1405;2001058698;B04002;HOMICIDIO CONSUM;RUA PRINCIPAL;49;300224;31/1/2001 13:32:00;CIDADAO COMUM;N;;MORRO DO PAPAGAI;BH;610480.42;793583.71;1404
+1406;2001058716;B06000;LESAO CORPORAL;RUA JOAO MAGELA ;120;99390;31/1/2001 13:45:00;CIDADAO COMUM;S;;CEU AZUL;BH;605062.14;807887.41;1405
+1407;2001058767;B03000;AMEACA;RUA PATROCINIO;209;52574;31/1/2001 14:23:00;CIDADAO COMUM;S;;CARLOS PRATES;BH;609810.09;797518.64;1406
+1408;2001058820;B03000;AMEACA;RUA SAO JOAO DE ;90;110073;31/1/2001 14:58:00;CIDADAO COMUM;S;;PILAR;BH;607693.72;788702.75;1407
+1409;2001058831;B06000;LESAO CORPORAL;RUA MACON RIBEIR;57;70514;31/1/2001 15:02:00;CIDADAO COMUM;N;LJ;VENDA NOVA;BH;609690.76;808307.39;1408
+1410;2001058879;B06000;LESAO CORPORAL;PRACA PRIMEIRO D;38;55254;31/1/2001 15:35:00;POLICIAL MILITAR;N;0;CENTRO (BH);BH;610657.63;796948.07;1409
+1411;2001058885;B03000;AMEACA;RUA EPAMINONDAS ;33;25696;31/1/2001 15:41:00;CIDADAO COMUM;S;;VISTA ALEGRE;BH;604476.95;793805.73;1410
+1412;2001058943;B06000;LESAO CORPORAL;RUA NICOLINA DE ;71;44263;31/1/2001 16:21:00;CIDADAO COMUM;S;0;HAVAI;BH;607309.12;793702.59;1411
+1413;2001058952;B06000;LESAO CORPORAL;RUA JOAQUIM TEIX;150;128845;31/1/2001 16:26:00;POLICIAL MILITAR;N;0;CASTANHEIRAS (TA;BH;617405.88;796871.94;1412
+1414;2001058958;B06000;LESAO CORPORAL;RUA ANTONIO RODR;480;11537;31/1/2001 16:31:00;CIDADAO COMUM;S;;VENDA NOVA;BH;607247.00;809301.40;1413
+1415;2001059044;B03000;AMEACA;RUA CORREGO DA M;63;18160;31/1/2001 17:16:00;CIDADAO COMUM;S;LJ;SAGRADA FAMILIA;BH;612904.87;798017.92;1414
+1416;2001059173;B03000;AMEACA;RUA SANTOS;903;61910;31/1/2001 18:24:00;CIDADAO COMUM;S;AP101;JARDIM AMERICA;BH;607394.98;794391.51;1415
+1417;2001059237;B03000;AMEACA;RUA BENJAMIM JAC;71;9207;31/1/2001 19:00:00;CIDADAO COMUM;S;0;GUTIERREZ;BH;608577.81;794897.65;1416
+1418;2001059300;B04001;HOMICIDIO TENTAD;RUA ALZIRA GONCA;190;58615;31/1/2001 19:34:00;CIDADAO COMUM;N;;VENDA NOVA;BH;608972.31;808425.51;1417
+1419;2001059360;B03000;AMEACA;RUA SAO LUIZ GON;210;63290;31/1/2001 20:04:00;CIDADAO COMUM;N;CAFU;IPIRANGA;BH;611529.38;800705.13;1418
+1420;2001059382;B09000;ABANDONO DE INCA;RUA DAS PETUNIAS;1069;11870;31/1/2001 20:17:00;CIDADAO COMUM;N;;LINDEIA;BH;598693.86;790907.36;1419
+1421;2001059436;B04001;HOMICIDIO TENTAD;RUA SANTA LUZIA;55;60904;31/1/2001 20:51:00;CIDADAO COMUM;N;AP301;NOVA CINTRA;BH;605213.06;793118.55;1420
+1422;2001059446;B03000;AMEACA;RUA PRINCIPAL;401;300224;31/1/2001 20:56:00;CIDADAO COMUM;N;0;MORRO DO PAPAGAI;BH;610524.12;793316.01;1421
+1423;2001059455;B03000;AMEACA;AV MEM DE SA;538;45395;31/1/2001 20:59:00;CIDADAO COMUM;S;0;SANTA EFIGENIA;BH;613961.23;796782.49;1422
+1424;2001059463;B03000;AMEACA;AV AUGUSTO DE LI;385;6731;31/1/2001 21:03:00;CIDADAO COMUM;S;AP102;CENTRO (BH);BH;611025.06;796588.88;1423
+1425;2001059469;B03000;AMEACA;RUA VITORIA REGI;201;73540;31/1/2001 21:04:00;CIDADAO COMUM;S;0;LINDEIA;BH;599089.55;790969.98;1424
+1426;2001059501;B04001;HOMICIDIO TENTAD;RUA CINQUENTA E ;235;33925;31/1/2001 21:23:00;CIDADAO COMUM;N;;CONJUNTO FELICID;BH;612859.28;806829.06;1425
+1427;2001059566;B03000;AMEACA;RUA CURVELO;50;19150;31/1/2001 22:00:00;CIDADAO COMUM;S;AP304;FLORESTA;BH;612139.97;797829.32;1426
+1428;2001059572;B04001;HOMICIDIO TENTAD;RUA SEIS;306;300264;31/1/2001 22:04:00;CIDADAO COMUM;N;0;VISTA DO SOL;BH;616300.81;804950.19;1427
+1429;2001059585;B08000;VIOLACAO DE DOMI;RUA JOAO AMACECK;129;37462;31/1/2001 22:10:00;CIDADAO COMUM;N;;BOA VISTA;BH;616121.92;799878.30;1428
+1430;2001059655;B03000;AMEACA;RUA JOINVILLE;99;53510;31/1/2001 23:00:00;CIDADAO COMUM;N;;COPACABANA;BH;606583.92;806827.53;1429
+1431;2001059686;B06000;LESAO CORPORAL;RUA FLOREAL;96;113926;31/1/2001 23:12:00;CIDADAO COMUM;N;0;PIRATININGA;BH;605452.17;809312.96;1430
+1432;2001059694;B06000;LESAO CORPORAL;RUA MACIEL RIBEI;30;81499;31/1/2001 23:17:00;CIDADAO COMUM;S;0;JARDIM GUANABARA;BH;611750.66;807384.55;1431
+1433;2001059711;B02000;RIXA;RUA KEPLER;196;39990;31/1/2001 23:28:00;CIDADAO COMUM;S;;SANTA LUCIA;BH;609886.18;792478.04;1432
+1434;2001059763;B03000;AMEACA;RUA TRIPUI;131;69763;31/1/2001 23:55:00;CIDADAO COMUM;S;0;GUARANI;BH;612931.77;805684.10;1433
+1435;2001059832;B02000;RIXA;RUA DOUTOR CRIST;312;55598;1/2/2001 00:40:00;CIDADAO COMUM;S;0;BARREIRO DE CIMA;BH;604751.25;789297.85;1434
+1436;2001059842;B06000;LESAO CORPORAL;RUA NEFELINA;99;81228;1/2/2001 00:54:00;CIDADAO COMUM;S;0;SANTA TEREZA;BH;612838.15;797304.69;1435
+1437;2001059851;B03000;AMEACA;RUA BRASIL TRI-C;180;170485;1/2/2001 01:04:00;INICIATIVA;N;0;DOM CABRAL;BH;604562.87;796907.92;1436
+1438;2001060029;B02000;RIXA;PRACA DUQUE DE C;69;24145;1/2/2001 04:19:00;INICIATIVA;N;0;SANTA TEREZA;BH;613410.51;797459.13;1437
+1439;2001060132;B04001;HOMICIDIO TENTAD;RUA CARMELITA CO;338;93366;1/2/2001 07:20:00;CIDADAO COMUM;S;;INDEPENDENCIA;BH;600867.06;785924.34;1438
+1440;2001060145;B03000;AMEACA;AV AFONSO PENA;372;1259;1/2/2001 07:33:00;CIDADAO COMUM;S;;CENTRO (BH);BH;610959.28;797388.43;1439
+1441;2001060393;B03000;AMEACA;RUA MAJOR DELFIN;1070;42620;1/2/2001 10:35:00;CIDADAO COMUM;S;;SAO FRANCISCO;BH;609785.00;802309.75;1440
+1442;2001060421;B06000;LESAO CORPORAL;BECO SANTO ANTON;282;96349;1/2/2001 11:02:00;INICIATIVA;N;0;PRIMEIRO DE MAIO;BH;612200.69;803724.03;1441
+1443;2001060436;B03000;AMEACA;RUA CAPA PRETA;186;14232;1/2/2001 11:10:00;CIDADAO COMUM;N;CAA;JOAO PINHEIRO;BH;605022.27;796035.34;1442
+1444;2001060485;B03000;AMEACA;RUA SILVEIRA MAR;538;65977;1/2/2001 11:50:00;CIDADAO COMUM;S;FU;PARQUE RIACHUELO;BH;609470.74;800354.37;1443
+1445;2001060593;B03000;AMEACA;RUA DA BOLIVIA;897;9884;1/2/2001 13:18:00;CIDADAO COMUM;S;0;SION;BH;611010.39;793433.40;1444
+1446;2001060608;B03000;AMEACA;BECO DAS MARIAS;35;301279;1/2/2001 13:25:00;CIDADAO COMUM;N;;MORRO DO PAPAGAI;BH;610462.00;793612.12;1445
+1447;2001060632;B06000;LESAO CORPORAL;RUA NELSON;605;47407;1/2/2001 13:40:00;CIDADAO COMUM;N;;UNIAO;BH;613017.58;801280.15;1446
+1448;2001060716;B03000;AMEACA;RUA MARIO SALUST;258;34492;1/2/2001 14:31:00;CIDADAO COMUM;S;0;GOIANIA;BH;614977.70;803071.04;1447
+1449;2001060725;B03000;AMEACA;AV SERRANA;435;65040;1/2/2001 14:36:00;CIDADAO COMUM;S;0;SERRANO;BH;603481.26;801371.79;1448
+1450;2001060727;B03000;AMEACA;AV SILVA GUIMARA;97;65863;1/2/2001 14:37:00;INICIATIVA;S;0;ITAIPU BH;BH;598852.15;789036.88;1449
+1451;2001060729;B04001;HOMICIDIO TENTAD;AV CIVILIZACAO;300;51657;1/2/2001 14:37:00;INICIATIVA;N;0;LEBLON;BH;605644.83;810039.92;1450
+1452;2001060777;B06000;LESAO CORPORAL;AV SINFRONIO BRO;688;66116;1/2/2001 15:08:00;INICIATIVA;N;0;BARREIRO;BH;602643.71;790854.32;1451
+1453;2001060794;B03000;AMEACA;AV ALVARO DA SIL;938;2872;1/2/2001 15:21:00;CIDADAO COMUM;S;;BARREIRO;BH;602015.43;790984.73;1452
+1454;2001060800;B06000;LESAO CORPORAL;BECO BOA VISTA;90;170302;1/2/2001 15:25:00;CIDADAO COMUM;N;;CABANA;BH;604870.95;793612.31;1453
+1455;2001060822;B03000;AMEACA;RUA JURAMENTO;191;39732;1/2/2001 15:38:00;CIDADAO COMUM;S;0;PARAISO;BH;614799.88;797390.14;1454
+1456;2001060872;B03000;AMEACA;RUA CRISTALIA;192;70899;1/2/2001 16:06:00;CIDADAO COMUM;S;;PROVIDENCIA;BH;612534.68;804567.59;1455
+1457;2001061075;B03000;AMEACA;RUA SETE DE SETE;200;170167;1/2/2001 17:55:00;CIDADAO COMUM;S;0;CABANA;BH;604457.24;794353.97;1456
+1458;2001061136;B06000;LESAO CORPORAL;RUA URCA;219;71040;1/2/2001 18:31:00;CIDADAO COMUM;S;;SARANDI (URCA/BH;BH;603289.41;802477.20;1457
+1459;2001061149;B03000;AMEACA;RUA SAO CLEMENTE;40;62197;1/2/2001 18:35:00;CIDADAO COMUM;S;0;SANTO ANDRE;BH;609648.20;799172.19;1458
+1460;2001061168;B03000;AMEACA;RUA ETILANDIA;130;26759;1/2/2001 18:45:00;CIDADAO COMUM;S;CAA;ANTONIO RIBEIRO ;BH;615163.64;806661.04;1459
+1461;2001061193;B03000;AMEACA;RUA FLOR DA PASC;34;28795;1/2/2001 19:01:00;CIDADAO COMUM;N;;JARDIM MONTANHES;BH;605912.50;799356.90;1460
+1462;2001061258;B03000;AMEACA;AV SERRANA;1322;65040;1/2/2001 19:36:00;CIDADAO COMUM;S;;SARANDI (URCA/BH;BH;603457.28;802162.09;1461
+1463;2001061264;B06000;LESAO CORPORAL;RUA LUAR DE MINA;23;88343;1/2/2001 19:38:00;CIDADAO COMUM;S;;VENDA NOVA;BH;607263.75;809334.88;1462
+1464;2001061304;B03000;AMEACA;RUA REGENCIA;316;301448;1/2/2001 19:58:00;CIDADAO COMUM;S;PX271;VILA CAFEZAL;BH;614098.82;795476.81;1463
+1465;2001061437;B03000;AMEACA;RUA ANTONIO VIEI;234;4925;1/2/2001 21:05:00;CIDADAO COMUM;N;0;GLALIJA;BH;603544.15;794206.42;1464
+1466;2001061455;B03000;AMEACA;AV FLOR DE SEDA;235;748;1/2/2001 21:14:00;CIDADAO COMUM;S;0;LINDEIA;BH;599017.62;790942.00;1465
+1467;2001061507;B03000;AMEACA;RUA CAMILO GOMES;395;11902;1/2/2001 21:42:00;CIDADAO COMUM;S;CAFR;ITAIPU BH;BH;599526.34;789343.98;1466
+1468;2001061604;B06000;LESAO CORPORAL;RUA ALAGOAS;896;1678;1/2/2001 22:38:00;CIDADAO COMUM;N;1106;FUNCIONARIOS;BH;611371.17;795424.35;1467
+1469;2001061631;B06000;LESAO CORPORAL;RUA MICA;151;45685;1/2/2001 23:02:00;CIDADAO COMUM;S;;SAO LUCAS;BH;613254.23;795969.45;1468
+1470;2001061669;B06000;LESAO CORPORAL;BECO CANARINHO;20;172074;1/2/2001 23:14:00;CIDADAO COMUM;S;;VILA CEMIG;BH;605308.22;788787.01;1469
+1471;2001061680;B06000;LESAO CORPORAL;AV AFONSO PENA;1301;1259;1/2/2001 23:20:00;CIDADAO COMUM;N;0;CENTRO (BH);BH;611434.79;796733.41;1470
+1472;2001061694;B06000;LESAO CORPORAL;RUA JULIO PIRES ;73;39543;1/2/2001 23:32:00;CIDADAO COMUM;N;;RIO BRANCO;BH;607144.25;808780.18;1471
+1473;2001061712;B06000;LESAO CORPORAL;RUA PERNAMBUCO;1077;53463;1/2/2001 23:40:00;CIDADAO COMUM;N;0;FUNCIONARIOS;BH;611502.50;795210.22;1472
+1474;2001061785;B06000;LESAO CORPORAL;AV CRISTIANO MAC;2250;18652;2/2/2001 00:21:00;INICIATIVA;N;0;CIDADE NOVA;BH;612163.55;800630.11;1473
+1475;2001061796;B06000;LESAO CORPORAL;RUA SERINGUEIRA;808;90471;2/2/2001 00:30:00;CIDADAO COMUM;S;;PATROCINIO;BH;605107.82;794408.66;1474
+1476;2001061833;B03000;AMEACA;RUA CONTAGEM;1010;70293;2/2/2001 00:53:00;CIDADAO COMUM;S;0;NOVA VISTA;BH;614621.27;800626.08;1475
+1477;2001061837;B06000;LESAO CORPORAL;RUA DES BRAULIO;1341;19917;2/2/2001 00:58:00;CIDADAO COMUM;S;0;VERA CRUZ;BH;616286.46;797842.29;1476
+1478;2001061842;B03000;AMEACA;RUA PADRE PAULO ;85;56096;2/2/2001 01:00:00;CIDADAO COMUM;S;0;FLORAMAR;BH;611731.42;807037.64;1477
+1479;2001061911;B04001;HOMICIDIO TENTAD;AV PRUDENTE DE M;1000;55774;2/2/2001 01:50:00;INICIATIVA;N;0;CORACAO DE JESUS;BH;609997.99;794345.70;1478
+1480;2001061942;B03000;AMEACA;AV A;74;302850;2/2/2001 02:14:00;CIDADAO COMUM;S;;NOVO AARAO REIS;BH;613873.98;805539.35;1479
+1481;2001061950;B04001;HOMICIDIO TENTAD;AV ARTUR BERNARD;1180;60844;2/2/2001 02:19:00;INICIATIVA;S;0;VILA PARIS;BH;610180.14;793263.99;1480
+1482;2001061994;B06000;LESAO CORPORAL;RUA SERRINHA;61;129201;2/2/2001 03:10:00;CIDADAO COMUM;N;;MANGUEIRAS;BH;600519.25;786719.95;1481
+1483;2001062013;B06000;LESAO CORPORAL;RUA DOS GOITACAZ;1361;31400;2/2/2001 03:28:00;CIDADAO COMUM;N;0;BARRO PRETO;BH;609953.61;797025.02;1482
+1484;2001062058;B04002;HOMICIDIO CONSUM;RUA CONCEICAO DE;488;16515;2/2/2001 04:29:00;INICIATIVA;N;0;JARDIM LEBLON;BH;605827.11;807322.29;1483
+1485;2001062083;B03000;AMEACA;RUA JOSE CAMILO ;63;82350;2/2/2001 05:17:00;CIDADAO COMUM;N;;SAO BERNARDO;BH;611432.74;805022.11;1484
+1486;2001062201;B04002;HOMICIDIO CONSUM;RUA MUNICIPAL;49;171677;2/2/2001 07:54:00;CIDADAO COMUM;S;;VILA CEMIG;BH;605549.39;788565.80;1485
+1487;2001062279;B06000;LESAO CORPORAL;AV AMAZONAS;885;3140;2/2/2001 08:51:00;INICIATIVA;N;0;CENTRO (BH);BH;610745.60;796908.15;1486
+1488;2001062289;B03000;AMEACA;RUA SAO PAULO;370;90213;2/2/2001 08:55:00;CIDADAO COMUM;S;0;SARANDI (URCA/BH;BH;602793.89;802510.17;1487
+1489;2001062300;B06000;LESAO CORPORAL;RUA DES BRAULIO;1341;19917;2/2/2001 09:02:00;CIDADAO COMUM;S;0;VERA CRUZ;BH;616286.46;797842.29;1488
+1490;2001062326;B03000;AMEACA;RUA PIAUI;164;53624;2/2/2001 09:16:00;CIDADAO COMUM;S;;SANTA EFIGENIA;BH;612590.73;796729.91;1489
+1491;2001062340;B06000;LESAO CORPORAL;RUA ITAPEVA;721;35820;2/2/2001 09:25:00;CIDADAO COMUM;S;;CONCORDIA;BH;611512.69;799189.30;1490
+1492;2001062362;B06000;LESAO CORPORAL;RUA TEN ANASTACI;1046;67263;2/2/2001 09:36:00;CIDADAO COMUM;S;PX215;SAO LUCAS;BH;613301.83;796082.54;1491
+1493;2001062462;B06000;LESAO CORPORAL;RUA VICENTE DE A;301;71807;2/2/2001 10:42:00;INICIATIVA;S;* SLU *;BARREIRO;BH;602068.68;790559.92;1492
+1494;2001062509;B03000;AMEACA;AV SEN LEVINDO C;3363;14866;2/2/2001 11:13:00;INICIATIVA;S;0;CH VALE DO JATOB;BH;601209.33;786916.79;1493
+1495;2001062610;B03000;AMEACA;RUA IGUACU;35;34118;2/2/2001 12:30:00;CIDADAO COMUM;S;;CONCORDIA;BH;610921.00;798888.59;1494
+1496;2001062625;B03000;AMEACA;AV RAUL MOURAO G;137;89900;2/2/2001 12:37:00;INICIATIVA;S;;PALMEIRAS;BH;606587.40;791752.04;1495
+1497;2001062635;B03000;AMEACA;AV SINFRONIO BRO;452;66116;2/2/2001 12:44:00;CIDADAO COMUM;S;;BARREIRO;BH;602895.18;790906.39;1496
+1498;2001062636;B06000;LESAO CORPORAL;RUA QUARENTA E T;135;56780;2/2/2001 12:44:00;CIDADAO COMUM;N;];GOIANIA;BH;615572.59;803438.36;1497
+1499;2001062637;B06000;LESAO CORPORAL;RUA 35;5;302833;2/2/2001 12:45:00;CIDADAO COMUM;S;;NOVO AARAO REIS;BH;613942.87;805469.60;1498
+1500;2001062705;B06000;LESAO CORPORAL;RUA D;48;47740;2/2/2001 13:34:00;CIDADAO COMUM;S;0;VILA CASTANHEIRA;BH;601064.32;788642.82;1499
+1501;2001062712;B03000;AMEACA;RUA GUSTAVO DA S;69;32617;2/2/2001 13:43:00;CIDADAO COMUM;N;;INSTITUTO AGRONO;BH;613767.26;798748.73;1500
+1502;2001062802;B03000;AMEACA;RUA CONCEICAO DA;69;46360;2/2/2001 14:48:00;INICIATIVA;S;0;COQUEIROS;BH;603000.95;800039.62;1501
+1503;2001062834;B06000;LESAO CORPORAL;AV AFONSO PENA;1707;1259;2/2/2001 15:07:00;CIDADAO COMUM;S;LJ1;CENTRO (BH);BH;611696.54;796248.60;1502
+1504;2001062838;B06000;LESAO CORPORAL;RUA JOAQUIM ARIS;12;114087;2/2/2001 15:13:00;CIDADAO COMUM;S;;LETICIA;BH;607112.71;809608.80;1503
+1505;2001062874;B03000;AMEACA;RUA FREI LUIZ DE;980;29961;2/2/2001 15:25:00;CIDADAO COMUM;S;;ALTO DOS PINHEIR;BH;604208.48;796388.72;1504
+1506;2001062951;B03000;AMEACA;RUA GERALDO SILV;205;56588;2/2/2001 16:13:00;CIDADAO COMUM;S;;RIO BRANCO;BH;606436.61;808648.71;1505
+1507;2001062998;B03000;AMEACA;RUA GIRASSOL;403;31277;2/2/2001 16:43:00;CIDADAO COMUM;S;;LINDEIA;BH;599265.73;791053.31;1506
+1508;2001063130;B03000;AMEACA;RUA PATU;26;52587;2/2/2001 17:49:00;INICIATIVA;S;0;SAO GERALDO;BH;616132.74;799457.09;1507
+1509;2001063187;B04001;HOMICIDIO TENTAD;RUA PORUINA;95;54860;2/2/2001 18:21:00;CIDADAO COMUM;N;AP202;JARDIM AMERICA;BH;606963.06;794728.99;1508
+1510;2001063190;B03000;AMEACA;RUA ORION RIGEL ;195;128961;2/2/2001 18:21:00;CIDADAO COMUM;S;AP05;FLORAMAR;BH;611775.11;807103.70;1509
+1511;2001063224;B03000;AMEACA;AV SANTOS DUMONT;690;61950;2/2/2001 18:41:00;CIDADAO COMUM;S;0;CENTRO (BH);BH;610987.45;797613.53;1510
+1512;2001063257;B06000;LESAO CORPORAL;RUA JOSE LINS DO;124;38903;2/2/2001 18:54:00;CIDADAO COMUM;S;;TUPI;BH;612511.61;806023.59;1511
+1513;2001063264;B06000;LESAO CORPORAL;AV ARTUR BERNARD;1400;60844;2/2/2001 18:58:00;CIDADAO COMUM;S;;VILA PARIS;BH;610262.27;793237.57;1512
+1514;2001063276;B03000;AMEACA;RUA PARAIBA;845;52170;2/2/2001 19:08:00;CIDADAO COMUM;N;;FUNCIONARIOS;BH;611731.54;795534.42;1513
+1515;2001063341;B04001;HOMICIDIO TENTAD;RUA VASCO DA GAM;316;71330;2/2/2001 19:44:00;CIDADAO COMUM;N;;SAO BERNARDO;BH;611169.88;805021.78;1514
+1516;2001063344;B06000;LESAO CORPORAL;RUA PADRE PEDRO ;426;51644;2/2/2001 19:46:00;CIDADAO COMUM;S;AP202;CORACAO EUCARIST;BH;605699.54;796696.04;1515
+1517;2001063407;B04001;HOMICIDIO TENTAD;RUA PADRE CAFE;105;51253;2/2/2001 20:15:00;CIDADAO COMUM;N;;SAUDADE;BH;615127.56;797675.19;1516
+1518;2001063440;B03000;AMEACA;AV AFONSO PENA;3888;1259;2/2/2001 20:29:00;CIDADAO COMUM;S;PROX. BANCO ITAU;CRUZEIRO;BH;612736.07;794330.03;1517
+1519;2001063567;B06000;LESAO CORPORAL;RUA SENHOR DOS P;175;64817;2/2/2001 21:33:00;CIDADAO COMUM;S;;SAO FRANCISCO;BH;609781.32;802567.71;1518
+1520;2001063648;B03000;AMEACA;RUA RADIALISTA C;299;99375;2/2/2001 22:24:00;CIDADAO COMUM;S;;CEU AZUL;BH;604907.33;807570.81;1519
+1521;2001063671;B03000;AMEACA;RUA JAIR NEGRAO ;5;21944;2/2/2001 22:35:00;CIDADAO COMUM;S;0;JARDIM ESTRELA;BH;607349.55;810148.64;1520
+1522;2001063809;B06000;LESAO CORPORAL;RUA JANUARIO PER;57;86363;2/2/2001 23:43:00;CIDADAO COMUM;N;0;JAQUELINE;BH;611073.74;810225.60;1521
+1523;2001063818;B03000;AMEACA;RUA ADONIAS FILH;191;22010;2/2/2001 23:49:00;CIDADAO COMUM;S;;SANTA MARIA;BH;603661.98;795283.35;1522
+1524;2001063825;B06000;LESAO CORPORAL;RUA ANTONIO GENT;21;4562;2/2/2001 23:49:00;CIDADAO COMUM;S;;CONCORDIA;BH;610610.15;799328.53;1523
+1525;2001063906;B03000;AMEACA;RUA CARMEM;117;100407;3/2/2001 00:36:00;CIDADAO COMUM;N;;SANTA MONICA DO ;BH;606236.18;808762.74;1524
+1526;2001063962;B03000;AMEACA;RUA CORONEL ANTO;418;17590;3/2/2001 01:07:00;CIDADAO COMUM;S;;JARDIM LEBLON;BH;605911.45;807534.46;1525
+1527;2001063964;B03000;AMEACA;RUA ENEAS;862;25481;3/2/2001 01:08:00;CIDADAO COMUM;S;;NOVO GLORIA;BH;603052.25;799062.91;1526
+1528;2001063969;B03000;AMEACA;RUA DOUTOR VIEIR;975;129964;3/2/2001 01:10:00;CIDADAO COMUM;N;;SAGRADA FAMILIA;BH;612837.37;798930.87;1527
+1529;2001064004;B04002;HOMICIDIO CONSUM;AV WALDOMIRO LOB;591;66548;3/2/2001 01:28:00;CIDADAO COMUM;N;CA01;GUARANI;BH;612785.98;805403.93;1528
+1530;2001064013;B06000;LESAO CORPORAL;RUA CORONEL JOAQ;1162;87063;3/2/2001 01:31:00;CIDADAO COMUM;S;;CEU AZUL;BH;605013.45;808558.53;1529
+1531;2001064032;B04001;HOMICIDIO TENTAD;RUA ATIBAIA;215;6530;3/2/2001 01:43:00;CIDADAO COMUM;S;;PIRATININGA;BH;606550.78;809443.16;1530
+1532;2001064078;B06000;LESAO CORPORAL;RUA LUCERNA;165;83655;3/2/2001 02:08:00;CIDADAO COMUM;S;LJ1;JARDIM EUROPA;BH;607904.55;810123.51;1531
+1533;2001064093;B06000;LESAO CORPORAL;RUA PADRE MANOEL;20;51556;3/2/2001 02:21:00;CIDADAO COMUM;N;0;VILA OESTE;BH;605001.79;795759.79;1532
+1534;2001064105;B03000;AMEACA;AV RAJA GABAGLIA;2708;57830;3/2/2001 02:30:00;CIDADAO COMUM;S;;ESTORIL;BH;609088.84;792662.10;1533
+1535;2001064106;B04001;HOMICIDIO TENTAD;RUA MARCOS PAULO;87;81911;3/2/2001 02:30:00;CIDADAO COMUM;S;0;MARIA GORETTI;BH;614036.11;803725.32;1534
+1536;2001064192;B06000;LESAO CORPORAL;AV PRUDENTE DE M;1111;55774;3/2/2001 03:31:00;CIDADAO COMUM;S;AP01;CORACAO DE JESUS;BH;610016.76;794258.13;1535
+1537;2001064248;B04001;HOMICIDIO TENTAD;RUA CONCEICAO DO;1044;68253;3/2/2001 03:58:00;CIDADAO COMUM;N;FU;SANTA INES;BH;613891.99;800833.38;1536
+1538;2001064279;B06000;LESAO CORPORAL;AV DO CONTORNO;8159;17228;3/2/2001 04:19:00;INICIATIVA;N;0;CENTRO BH;BH;609751.80;795477.78;1537
+1539;2001064286;B06000;LESAO CORPORAL;RUA CAMILO DE BR;636;11896;3/2/2001 04:23:00;CIDADAO COMUM;S;;PADRE EUSTAQUIO;BH;605855.99;798012.24;1538
+1540;2001064357;B03000;AMEACA;RUA NOVA SUISSA;90;23707;3/2/2001 05:42:00;CIDADAO COMUM;S;;TAQUARIL;BH;617425.46;797075.87;1539
+1541;2001064425;B03000;AMEACA;RUA CLORITA;100;16051;3/2/2001 07:11:00;CIDADAO COMUM;N;0;SANTA TEREZA;BH;612847.22;797209.80;1540
+1542;2001064448;B06000;LESAO CORPORAL;RUA ESPIRITO SAN;250;26052;3/2/2001 07:47:00;CIDADAO COMUM;S;;CENTRO (BH);BH;611330.13;797421.35;1541
+1543;2001064522;B03000;AMEACA;RUA ALVARENGA PE;1027;2683;3/2/2001 08:52:00;CIDADAO COMUM;S;AP201;SANTO AGOSTINHO;BH;610138.17;795955.25;1542
+1544;2001064560;B03000;AMEACA;RUA JOAQUIM ANAC;23;118932;3/2/2001 09:13:00;INICIATIVA;S;0;TEIXEIRA DIAS;BH;603052.88;789295.61;1543
+1545;2001064665;B03000;AMEACA;RUA SAO MATEUS;414;63389;3/2/2001 10:29:00;CIDADAO COMUM;S;APTO 404;SAGRADA FAMILIA;BH;613396.28;799197.79;1544
+1546;2001064690;B03000;AMEACA;RUA VEBRA;5;82637;3/2/2001 10:51:00;CIDADAO COMUM;S;0;MARIA GORETTI;BH;614667.55;803334.30;1545
+1547;2001064793;B03000;AMEACA;AV PRESIDENTE AN;1397;4461;3/2/2001 12:12:00;CIDADAO COMUM;S;;SAO CRISTOVAO;BH;610280.96;799328.31;1546
+1548;2001064860;B03000;AMEACA;RUA INDEPENDENCI;659;34391;3/2/2001 13:09:00;CIDADAO COMUM;N;;CABANA;BH;604615.33;794432.74;1547
+1549;2001065007;B03000;AMEACA;RUA DONA LUCI;10;86004;3/2/2001 14:52:00;CIDADAO COMUM;S;0;ESTRELA DALVA;BH;607227.83;791915.50;1548
+1550;2001065028;B03000;AMEACA;RUA ALEIXO LOURE;140;56650;3/2/2001 15:07:00;INICIATIVA;S;0;CARDOSO;BH;603942.21;787795.21;1549
+1551;2001065054;B06000;LESAO CORPORAL;RUA DA DESCIDA;53;65154;3/2/2001 15:23:00;CIDADAO COMUM;S;CAA;SAO JOSE;BH;605272.07;798601.47;1550
+1552;2001065143;B06000;LESAO CORPORAL;RUA SAO PAULO;124;63464;3/2/2001 16:17:00;INICIATIVA;S;0;CENTRO BH;BH;611102.49;797669.42;1551
+1553;2001065184;B03000;AMEACA;RUA DONA LUCI;10;86004;3/2/2001 16:43:00;CIDADAO COMUM;N;0;ESTRELA DALVA;BH;607227.83;791915.50;1552
+1554;2001065212;B06000;LESAO CORPORAL;RUA AUGUSTO DOS ;820;6669;3/2/2001 16:58:00;CIDADAO COMUM;S;;SINIMBU;BH;606642.44;808285.27;1553
+1555;2001065238;B06000;LESAO CORPORAL;AV NELIO CERQUEI;15;72359;3/2/2001 17:12:00;INICIATIVA;S;0;TIROL;BH;600947.66;789885.51;1554
+1556;2001065260;B06000;LESAO CORPORAL;RUA DEMERGINA MA;112;48756;3/2/2001 17:23:00;CIDADAO COMUM;S;0;JONAS VEIGA;BH;616164.65;797149.10;1555
+1557;2001065269;B06000;LESAO CORPORAL;RUA OITENTA E DO;25;124223;3/2/2001 17:26:00;CIDADAO COMUM;S;;JARDIM DOS COMER;BH;607793.10;811865.64;1556
+1558;2001065295;B03000;AMEACA;RUA NHONHO BROCH;35;47580;3/2/2001 17:41:00;INICIATIVA;N;0;DAS INDUSTRIAS;BH;604735.48;792089.49;1557
+1559;2001065296;B03000;AMEACA;RUA GERALDO FERR;213;96222;3/2/2001 17:40:00;CIDADAO COMUM;N;CAA;MANTIQUEIRA;BH;606241.53;810809.31;1558
+1560;2001065308;B03000;AMEACA;RUA ENGENHO DA N;143;94504;3/2/2001 17:49:00;CIDADAO COMUM;N;;ENGENHO NOGUEIRA;BH;606394.76;800258.95;1559
+1561;2001065316;B03000;AMEACA;RUA JULIO PIRES ;97;39543;3/2/2001 17:53:00;CIDADAO COMUM;S;CAA;RIO BRANCO;BH;607122.60;808788.73;1560
+1562;2001065365;B06000;LESAO CORPORAL;RUA ANIBAL BENEV;231;4083;3/2/2001 18:24:00;CIDADAO COMUM;S;;SANTA EFIGENIA;BH;613656.92;796467.64;1561
+1563;2001065386;B03000;AMEACA;RUA BOLIVAR FERR;156;89995;3/2/2001 18:36:00;CIDADAO COMUM;N;;PALMEIRAS;BH;607337.16;791539.73;1562
+1564;2001065391;B06000;LESAO CORPORAL;RUA JOSE CLEMENT;542;38670;3/2/2001 18:42:00;CIDADAO COMUM;S;;IPIRANGA;BH;611983.53;800784.84;1563
+1565;2001065402;B06000;LESAO CORPORAL;AV RAJA GABAGLIA;2222;57830;3/2/2001 18:49:00;INICIATIVA;S;0;ESTORIL;BH;608853.99;793279.32;1564
+1566;2001065409;B06000;LESAO CORPORAL;RUA TEREZINHA FR;12;105136;3/2/2001 18:51:00;CIDADAO COMUM;N;;DAS INDUSTRIAS;BH;605517.42;791015.18;1565
+1567;2001065419;B06000;LESAO CORPORAL;RUA SERRINHA;172;129201;3/2/2001 18:54:00;CIDADAO COMUM;0;;MANGUEIRAS;BH;600395.13;787259.05;1566
+1568;2001065432;B06000;LESAO CORPORAL;RUA LEOPOLDO GOM;1499;40770;3/2/2001 19:01:00;CIDADAO COMUM;S;0;VERA CRUZ;BH;615753.66;798128.77;1567
+1569;2001065447;B06000;LESAO CORPORAL;RUA ELETRON;100;25210;3/2/2001 19:10:00;CIDADAO COMUM;N;;PRIMEIRO DE MAIO;BH;612263.84;803426.36;1568
+1570;2001065450;B06000;LESAO CORPORAL;RUA YUCATAN;70;36302;3/2/2001 19:12:00;POLICIAL MILITAR;S;;SAO PEDRO;BH;611188.45;793833.06;1569
+1571;2001065452;B04001;HOMICIDIO TENTAD;RUA AUGUSTA ANDR;91;99104;3/2/2001 19:12:00;CIDADAO COMUM;N;CS1;JAQUELINE;BH;610916.35;810299.61;1570
+1572;2001065466;B03000;AMEACA;RUA BRASIL;39;10446;3/2/2001 19:22:00;CIDADAO COMUM;N;;CABANA;BH;604919.66;793520.54;1571
+1573;2001065474;B04001;HOMICIDIO TENTAD;RUA POPULAR;81;54696;3/2/2001 19:26:00;CIDADAO COMUM;N;0;SAO CRISTOVAO;BH;610254.78;799269.93;1572
+1574;2001065530;B06000;LESAO CORPORAL;RUA JOAQUIM HENR;61;106605;3/2/2001 19:53:00;CIDADAO COMUM;S;;MARIA HELENA;BH;605851.29;810925.75;1573
+1575;2001065569;B06000;LESAO CORPORAL;RUA MARIA AUTA;85;91332;3/2/2001 20:13:00;CIDADAO COMUM;N;0;PALMEIRAS;BH;606555.53;791338.66;1574
+1576;2001065614;B03000;AMEACA;RUA FERNAO DIAS;1022;28133;3/2/2001 20:20:00;CIDADAO COMUM;S;0;VERA CRUZ;BH;616049.67;798294.87;1575
+1577;2001065617;B06000;LESAO CORPORAL;RUA PROGRESSO;1242;55759;3/2/2001 20:28:00;CIDADAO COMUM;S;AP 203;MONSENHOR MESSIA;BH;607191.53;797933.65;1576
+1578;2001065639;B03000;AMEACA;RUA ANIBAL BENEV;316;4083;3/2/2001 20:42:00;CIDADAO COMUM;S;0;SANTA EFIGENIA;BH;613731.62;796429.78;1577
+1579;2001065642;B03000;AMEACA;RUA JOSE GONCALV;985;38828;3/2/2001 20:43:00;CIDADAO COMUM;N;0;BARREIRO;BH;602322.13;790879.97;1578
+1580;2001065648;B03000;AMEACA;RUA GUARARAPES;1425;32241;3/2/2001 20:45:00;CIDADAO COMUM;S;CAFR;GLORIA;BH;602749.14;798328.63;1579
+1581;2001065651;B06000;LESAO CORPORAL;AV BRAULIO GOMES;1050;81710;3/2/2001 20:47:00;CIDADAO COMUM;N;0;ITAIPU BH;BH;599840.36;789003.21;1580
+1582;2001065795;B03000;AMEACA;RUA TEODORO BONF;120;102430;3/2/2001 21:41:00;INICIATIVA;N;0;VERA CRUZ;BH;616904.51;797429.79;1581
+1583;2001065821;B03000;AMEACA;RUA EMILIO CARAM;315;92578;3/2/2001 21:51:00;CIDADAO COMUM;S;0;CALIFORNIA;BH;603435.58;796803.82;1582
+1584;2001065838;B03000;AMEACA;RUA IARA;518;33751;3/2/2001 21:57:00;CIDADAO COMUM;S;0;POMPEIA;BH;614707.91;797693.11;1583
+1585;2001065842;B06000;LESAO CORPORAL;RUA DR GERALDO S;158;23372;3/2/2001 21:58:00;INICIATIVA;S;0;REGINA;BH;599187.17;790136.57;1584
+1586;2001065844;B06000;LESAO CORPORAL;RUA DOS JAVAES;715;37198;3/2/2001 21:58:00;CIDADAO COMUM;N;0;SANTA MONICA;BH;606509.12;807854.37;1585
+1587;2001065847;B03000;AMEACA;RUA MAURO COURA ;155;86930;3/2/2001 22:01:00;CIDADAO COMUM;S;;NOVO PAQUETA;BH;605770.00;801615.17;1586
+1588;2001065857;B06000;LESAO CORPORAL;RUA JOSE OURIVIO;103;39023;3/2/2001 22:05:00;CIDADAO COMUM;N;;CACHOEIRINHA;BH;610133.84;801161.17;1587
+1589;2001065899;B06000;LESAO CORPORAL;RUA ALFREDO ALVE;237;20636;3/2/2001 22:31:00;CIDADAO COMUM;S;;SAO JOAO BATISTA;BH;608508.39;808007.47;1588
+1590;2001065902;B06000;LESAO CORPORAL;RUA SAO PAULO;412;90213;3/2/2001 22:32:00;CIDADAO COMUM;S;;SARANDI (URCA/BH;BH;602793.89;802510.17;1589
+1591;2001065911;B06000;LESAO CORPORAL;RUA TRES;210;302811;3/2/2001 22:35:00;CIDADAO COMUM;S;;NOVO AARAO REIS;BH;614468.64;806039.61;1590
+1592;2001065929;B04001;HOMICIDIO TENTAD;RUA DALVA DE MAT;29;19595;3/2/2001 22:43:00;CIDADAO COMUM;S;;SANTA MONICA DO ;BH;606094.58;808319.55;1591
+1593;2001065951;B06000;LESAO CORPORAL;RUA AMARANTO;183;3080;3/2/2001 22:55:00;CIDADAO COMUM;N;0;LINDEIA;BH;599445.88;790872.47;1592
+1594;2001065966;B03000;AMEACA;RUA CAPITAO PROC;26;12886;3/2/2001 23:03:00;CIDADAO COMUM;S;A;SANTA TEREZA;BH;612952.30;797362.40;1593
+1595;2001065990;B03000;AMEACA;RUA MARIANA;1204;44380;3/2/2001 23:13:00;CIDADAO COMUM;S;0;SANTO ANDRE;BH;609625.10;798862.81;1594
+1596;2001066063;B03000;AMEACA;RUA NELSON HUNGR;10;46634;3/2/2001 23:52:00;CIDADAO COMUM;S;CAA;TUPI;BH;612851.92;806239.44;1595
+1597;2001066080;B03000;AMEACA;AV VEREADOR CICE;655;19756;4/2/2001 00:01:00;CIDADAO COMUM;S;;JOAO PINHEIRO;BH;604995.41;796458.52;1596
+1598;2001066084;B06000;LESAO CORPORAL;RUA ARISTOLINO B;151;41089;4/2/2001 00:03:00;INICIATIVA;S;0;REGINA;BH;598850.12;789949.69;1597
+1599;2001066136;B03000;AMEACA;RUA RADIALISTA W;56;98823;4/2/2001 00:35:00;CIDADAO COMUM;N;0;CEU AZUL;BH;604488.67;808458.66;1598
+1600;2001066188;B06000;LESAO CORPORAL;RUA CORONEL JOAQ;308;87063;4/2/2001 01:06:00;INICIATIVA;N;0;CEU AZUL;BH;604708.59;807851.94;1599
+1601;2001066271;B04001;HOMICIDIO TENTAD;RUA COROCOCO;11;76700;4/2/2001 01:49:00;INICIATIVA;S;0;NOVO AARAO REIS;BH;614329.87;806083.51;1600
+1602;2001066382;B02000;RIXA;RUA ALVARES MACI;312;2756;4/2/2001 02:58:00;CIDADAO COMUM;S;0;SANTA EFIGENIA;BH;612816.00;796590.28;1601
+1603;2001066390;B06000;LESAO CORPORAL;AV NELIO CERQUEI;15;72359;4/2/2001 03:04:00;CIDADAO COMUM;N;;TIROL;BH;600947.66;789885.51;1602
+1604;2001066394;B06000;LESAO CORPORAL;AV ANTONIO ABRAH;1100;4320;4/2/2001 03:05:00;CIDADAO COMUM;S;0;SAO JOSE;BH;607791.03;803406.56;1603
+1605;2001066417;B03000;AMEACA;RUA JOAO PIRES;357;37866;4/2/2001 03:21:00;CIDADAO COMUM;N;;JARDINOPOLIS;BH;604771.54;794346.93;1604
+1606;2001066466;B06000;LESAO CORPORAL;RUA PROFESSORA V;3;56893;4/2/2001 03:42:00;CIDADAO COMUM;N;CSA;CHACARAS REUNIDA;BH;605513.76;789431.48;1605
+1607;2001066515;B06000;LESAO CORPORAL;RUA CAMELIA;110;11842;4/2/2001 04:32:00;CIDADAO COMUM;S;;BANDEIRANTES DO ;BH;606343.03;793587.88;1606
+1608;2001066542;B04001;HOMICIDIO TENTAD;RUA NINIVE;64;47700;4/2/2001 04:51:00;CIDADAO COMUM;S;CAA;SAO SALVADOR;BH;603563.72;799724.10;1607
+1609;2001066544;B06000;LESAO CORPORAL;RUA TENENTE VITO;71;67351;4/2/2001 04:51:00;INICIATIVA;N;0;SANTA TEREZA;BH;613395.47;797441.30;1608
+1610;2001066567;B03000;AMEACA;RUA VINHEDO;179;111858;4/2/2001 05:17:00;CIDADAO COMUM;S;;ITAIPU BH;BH;599333.04;789042.72;1609
+1611;2001066648;B03000;AMEACA;RUA DA PEDREIRA;400;301298;4/2/2001 07:03:00;CIDADAO COMUM;N;0;MORRO DAS PEDRAS;BH;608618.39;794087.94;1610
+1612;2001066749;B06000;LESAO CORPORAL;RUA ESPIRITO SAN;350;26052;4/2/2001 08:52:00;INICIATIVA;N;0;CENTRO BH;BH;611301.04;797310.96;1611
+1613;2001066790;B03000;AMEACA;AV AGENOR DE PAU;84;86250;4/2/2001 09:27:00;CIDADAO COMUM;N;;VILA FREI LEOPOL;BH;611111.29;809996.06;1612
+1614;2001066807;B06000;LESAO CORPORAL;RUA SETE DE OUTU;377;85030;4/2/2001 09:41:00;CIDADAO COMUM;N;;JARDIM DOS COMER;BH;607382.83;811141.67;1613
+1615;2001066816;B04001;HOMICIDIO TENTAD;RUA CARMELITA CO;140;93366;4/2/2001 09:56:00;CIDADAO COMUM;S;CA1;MINEIRAO;BH;600972.13;785917.35;1614
+1616;2001066847;B03000;AMEACA;RUA K;132;78774;4/2/2001 10:13:00;CIDADAO COMUM;S;0;CH JATOBA IV;BH;600562.64;787899.51;1615
+1617;2001066882;B03000;AMEACA;RUA BENEDITO NEV;185;9061;4/2/2001 10:45:00;CIDADAO COMUM;N;AP1202;NAZARE;BH;615997.83;804535.57;1616
+1618;2001066908;B03000;AMEACA;RUA CARMO;97;170992;4/2/2001 11:14:00;INICIATIVA;N;0;MORRO DAS PEDRAS;BH;608239.92;794053.80;1617
+1619;2001066963;B06000;LESAO CORPORAL;RUA CAMPINA VERD;65;12110;4/2/2001 12:14:00;CIDADAO COMUM;N;0;SALGADO FILHO;BH;606175.99;794495.57;1618
+1620;2001067032;B03000;AMEACA;RUA CAIO VIANA M;604;11477;4/2/2001 13:08:00;CIDADAO COMUM;S;;ARAGUAIA;BH;604706.23;789321.47;1619
+1621;2001067052;B03000;AMEACA;AV BERNARDO VASC;2295;9411;4/2/2001 13:22:00;CIDADAO COMUM;S;;SANTA CRUZ;BH;611969.00;801923.00;1620
+1622;2001067131;B03000;AMEACA;RUA CARLOS PINHE;19;13498;4/2/2001 14:19:00;CIDADAO COMUM;N;;JARDIM MONTANHES;BH;606713.12;798861.18;1621
+1623;2001067142;B03000;AMEACA;RUA CARLOS EDUAR;210;92073;4/2/2001 14:22:00;CIDADAO COMUM;N;;CALIFORNIA;BH;602559.02;797182.09;1622
+1624;2001067193;B03000;AMEACA;AV PRESIDENTE CA;2020;55125;4/2/2001 15:04:00;CIDADAO COMUM;N;;CAICARA;BH;608432.84;800193.57;1623
+1625;2001067217;B03000;AMEACA;RUA PADRE FEIJO;416;51326;4/2/2001 15:21:00;INICIATIVA;S;0;SAUDADE;BH;615275.06;797524.13;1624
+1626;2001067392;B03000;AMEACA;RUA SAMUEL GAMMO;60;89591;4/2/2001 17:09:00;CIDADAO COMUM;S;;PALMEIRAS;BH;606686.57;790636.24;1625
+1627;2001067441;B06000;LESAO CORPORAL;AV UM;690;110679;4/2/2001 17:38:00;CIDADAO COMUM;N;CAA;JARDIM GUANABARA;BH;611709.66;807996.63;1626
+1628;2001067472;B03000;AMEACA;RUA DA FORTUNA;420;29209;4/2/2001 17:54:00;CIDADAO COMUM;S;0;SANTA CRUZ (BARR;BH;603043.11;788655.87;1627
+1629;2001067480;B04002;HOMICIDIO CONSUM;RUA GENTIOS;109;30983;4/2/2001 17:59:00;CIDADAO COMUM;N;;LUXEMBURGO;BH;608911.22;793572.33;1628
+1630;2001067494;B03000;AMEACA;RUA ESTRADA NOVA;224;170517;4/2/2001 18:06:00;CIDADAO COMUM;S;;MORRO DAS PEDRAS;BH;608342.46;794041.79;1629
+1631;2001067517;B06000;LESAO CORPORAL;AV DO CONTORNO;777;17228;4/2/2001 18:17:00;POLICIAL MILITAR;N;0;CENTRO (BH);BH;611399.16;797723.83;1630
+1632;2001067520;B06000;LESAO CORPORAL;RUA FLOR DA AMEI;240;77539;4/2/2001 18:17:00;CIDADAO COMUM;S;;JARDIM ALVORADA;BH;606203.88;800157.23;1631
+1633;2001067589;B03000;AMEACA;RUA COSTA JUNIOR;97;18321;4/2/2001 18:58:00;CIDADAO COMUM;N;97B;NOVA CACHOEIRINH;BH;609712.41;801469.91;1632
+1634;2001067703;B04001;HOMICIDIO TENTAD;RUA JOAQUIM PURI;5;96087;4/2/2001 20:03:00;INICIATIVA;N;0;MARIA GORETTI;BH;614651.86;803376.96;1633
+1635;2001067713;B03000;AMEACA;RUA DO CAFE;250;11389;4/2/2001 20:08:00;CIDADAO COMUM;S;FR;SANTA CRUZ (BARR;BH;603088.07;788898.98;1634
+1636;2001067714;B04002;HOMICIDIO CONSUM;RUA EPAMINONDAS ;305;25696;4/2/2001 20:09:00;CIDADAO COMUM;N;;VISTA ALEGRE;BH;604790.40;793595.99;1635
+1637;2001067723;B06000;LESAO CORPORAL;RUA MANHUMIRIM;737;42908;4/2/2001 20:15:00;INICIATIVA;N;0;ADELAIDE;BH;607822.69;798019.82;1636
+1638;2001067729;B03000;AMEACA;RUA MADRE SILVA;10;42384;4/2/2001 20:18:00;CIDADAO COMUM;S;0;ESPLANADA;BH;614409.41;798868.24;1637
+1639;2001067889;B03000;AMEACA;RUA JOAO ABRAS;115;124920;4/2/2001 21:41:00;CIDADAO COMUM;N;;MANGUEIRAS;BH;600549.95;786723.91;1638
+1640;2001067925;B03000;AMEACA;RUA MILTON DIAS;253;82712;4/2/2001 21:55:00;INICIATIVA;S;0;JARDIM VITORIA;BH;617102.88;803874.69;1639
+1641;2001067947;B03000;AMEACA;RUA DETETIVE WIL;168;21815;4/2/2001 22:08:00;POLICIAL MILITAR;S;0;DAS INDUSTRIAS;BH;605205.22;791432.67;1640
+1642;2001067981;B03000;AMEACA;RUA ESPINOSA;1062;26024;4/2/2001 22:25:00;INICIATIVA;N;0;CARLOS PRATES;BH;608710.01;797660.23;1641
+1643;2001067982;B03000;AMEACA;RUA LUIZ LOPES;68;94431;4/2/2001 22:26:00;CIDADAO COMUM;S;;OURO PRETO;BH;606229.55;801269.61;1642
+1644;2001067989;B04001;HOMICIDIO TENTAD;RUA CAMPANARIO;513;12010;4/2/2001 22:30:00;CIDADAO COMUM;S;0;SANTA INES;BH;614382.53;800754.13;1643
+1645;2001068010;B03000;AMEACA;RUA DAS FLORES;132;28930;4/2/2001 22:45:00;CIDADAO COMUM;N;AP32;NOVA SUISSA;BH;607488.91;795325.47;1644
+1646;2001068067;B06000;LESAO CORPORAL;AV PRUDENTE DE M;1150;55774;4/2/2001 23:13:00;CIDADAO COMUM;S;;CORACAO DE JESUS;BH;610007.32;794115.40;1645
+1647;2001068086;B04001;HOMICIDIO TENTAD;RUA CONTAGEM;801;70293;4/2/2001 23:19:00;CIDADAO COMUM;S;CAA;BOA VISTA;BH;614535.71;800352.87;1646
+1648;2001068120;B06000;LESAO CORPORAL;RUA RAINHA DAS F;39;92159;4/2/2001 23:37:00;CIDADAO COMUM;S;0;FILADELFIA;BH;602179.51;797574.42;1647
+1649;2001068144;B03000;AMEACA;RUA PAMIR;191;51947;4/2/2001 23:50:00;CIDADAO COMUM;S;;CH BETANIA;BH;605245.60;792168.52;1648
+1650;2001068214;B06000;LESAO CORPORAL;RUA JOSE BENEVID;451;99580;5/2/2001 00:21:00;CIDADAO COMUM;S;0;LETICIA;BH;606760.76;809412.33;1649
+1651;2001068229;B06000;LESAO CORPORAL;RUA DES BARCELOS;1500;19904;5/2/2001 00:30:00;INICIATIVA;S;0;JARDIM AMERICA;BH;606729.35;795407.19;1650
+1652;2001068305;B06000;LESAO CORPORAL;RUA LUIZ LOPES;22;94431;5/2/2001 01:13:00;CIDADAO COMUM;S;0;OURO PRETO;BH;606191.02;801329.52;1651
+1653;2001068306;B03000;AMEACA;AV SILVA LOBO;237;65889;5/2/2001 01:11:00;POLICIAL MILITAR;N;;CALAFATE;BH;607663.44;796335.47;1652
+1654;2001068311;B03000;AMEACA;RUA GERALDO FERR;213;96222;5/2/2001 01:16:00;CIDADAO COMUM;S;C;MANTIQUEIRA;BH;606241.53;810809.31;1653
+1655;2001068324;B03000;AMEACA;RUA I;129;36687;5/2/2001 01:32:00;CIDADAO COMUM;S;0;MINASCAIXA;BH;609198.28;809916.80;1654
+1656;2001068361;B06000;LESAO CORPORAL;AV BIAS FORTES;1772;9553;5/2/2001 02:02:00;CIDADAO COMUM;S;;BARRO PRETO;BH;610196.72;797244.85;1655
+1657;2001068440;B06000;LESAO CORPORAL;AV CIVILIZACAO;730;51657;5/2/2001 03:10:00;CIDADAO COMUM;S;;JARDIM FLORENCIA;BH;609311.62;808604.54;1656
+1658;2001068536;B03000;AMEACA;RUA VIANA DO CAS;1167;63640;5/2/2001 06:04:00;CIDADAO COMUM;S;0;SAO FRANCISCO;BH;609175.75;801372.41;1657
+1659;2001068657;B06000;LESAO CORPORAL;RUA TIMOTEO NONA;229;86161;5/2/2001 08:16:00;CIDADAO COMUM;N;;JAQUELINE;BH;611446.46;810532.25;1658
+1660;2001068734;B06000;LESAO CORPORAL;RUA TIRADENTES;90;85607;5/2/2001 09:00:00;CIDADAO COMUM;S;;ALVORADA (SB);SB;615497.04;802314.39;1659
+1661;2001068748;B06000;LESAO CORPORAL;RUA ANTONIO SILV;141;87108;5/2/2001 09:12:00;CIDADAO COMUM;S;0;DA LAGOA;BH;604758.70;808936.59;1660
+1662;2001068943;B03000;AMEACA;RUA FLOR DE MAIO;152;300399;5/2/2001 11:35:00;CIDADAO COMUM;S;0;VILA CAFEZAL;BH;614299.55;794710.96;1661
+1663;2001068976;B03000;AMEACA;RUA ALFREDO ALVE;468;20636;5/2/2001 11:57:00;INICIATIVA;S;0;SAO JOAO BATISTA;BH;608516.97;808041.50;1662
+1664;2001068995;B06000;LESAO CORPORAL;AV OLEGARIO MACI;1206;49699;5/2/2001 12:08:00;INICIATIVA;S;0;LOURDES;BH;610340.00;796469.41;1663
+1665;2001068999;B03000;AMEACA;RUA BOACHA;378;9695;5/2/2001 12:11:00;CIDADAO COMUM;S;;DOM BOSCO;BH;604947.57;797405.33;1664
+1666;2001069095;B03000;AMEACA;RUA JAIR NEGRAO ;5;21944;5/2/2001 13:39:00;INICIATIVA;S;0;JARDIM ESTRELA;BH;607349.55;810148.64;1665
+1667;2001069132;B03000;AMEACA;AV BRASIL;237;10420;5/2/2001 13:59:00;CIDADAO COMUM;N;SL1003;SANTA EFIGENIA;BH;612812.64;796502.70;1666
+1668;2001069146;B06000;LESAO CORPORAL;RUA ALEXANDRE TO;186;2163;5/2/2001 14:06:00;CIDADAO COMUM;S;;HORTO;BH;613173.91;798217.77;1667
+1669;2001069347;B03000;AMEACA;RUA EVARISTO DA ;51;26922;5/2/2001 16:07:00;CIDADAO COMUM;N;FUNDOS;PRADO LOPES;BH;610160.34;798662.11;1668
+1670;2001069374;B03000;AMEACA;RUA SANTO ANDRE;115;26282;5/2/2001 16:19:00;CIDADAO COMUM;S;;TAQUARIL;BH;617403.36;797627.63;1669
+1671;2001069406;B03000;AMEACA;RUA CHIQUINHA GO;120;97200;5/2/2001 16:37:00;CIDADAO COMUM;N;;TUPI;BH;613769.37;806154.10;1670
+1672;2001069466;B03000;AMEACA;RUA CORONEL PEDR;128;18031;5/2/2001 16:59:00;CIDADAO COMUM;S;;CIDADE NOVA;BH;612312.95;800326.26;1671
+1673;2001069495;B04001;HOMICIDIO TENTAD;RUA TIGRE;471;67639;5/2/2001 17:18:00;INICIATIVA;N;0;SAO SALVADOR;BH;603394.12;800043.56;1672
+1674;2001069516;B03000;AMEACA;RUA SERRA DOS AI;154;65025;5/2/2001 17:27:00;CIDADAO COMUM;N;0;JARDIM LEBLON;BH;605851.32;807675.65;1673
+1675;2001069592;B06000;LESAO CORPORAL;RUA PIRACICABA;207;54047;5/2/2001 18:09:00;CIDADAO COMUM;N;0;PEDRO SEGUNDO;BH;608102.79;798417.13;1674
+1676;2001069604;B04001;HOMICIDIO TENTAD;RUA ALGARVE;400;61396;5/2/2001 18:16:00;CIDADAO COMUM;S;0;SAO FRANCISCO;BH;609107.38;801969.00;1675
+1677;2001069634;B03000;AMEACA;RUA SILVA ALVARE;626;65810;5/2/2001 18:32:00;CIDADAO COMUM;S;0;SAO GERALDO;BH;615385.74;799442.89;1676
+1678;2001069646;B03000;AMEACA;RUA MOISES;117;46114;5/2/2001 18:38:00;POLICIAL MILITAR;S;;SAO SALVADOR;BH;603000.91;799203.73;1677
+1679;2001069679;B06000;LESAO CORPORAL;ESTRADA DO CERCA;2603;26428;5/2/2001 18:51:00;CIDADAO COMUM;S;;HAVAI;BH;607721.78;793319.05;1678
+1680;2001069712;B03000;AMEACA;RUA PEONIA;411;115799;5/2/2001 19:03:00;CIDADAO COMUM;N;;HAVAI;BH;607162.30;793263.14;1679
+1681;2001069750;B06000;LESAO CORPORAL;AV PRESIDENTE AN;2563;4461;5/2/2001 19:27:00;CIDADAO COMUM;S;0;CACHOEIRINHA;BH;609975.05;800406.95;1680
+1682;2001069814;B03000;AMEACA;RUA MARIA AMELIA;62;43800;5/2/2001 20:04:00;CIDADAO COMUM;S;0;NOVA GAMELEIRA;BH;605575.64;794758.64;1681
+1683;2001069821;B06000;LESAO CORPORAL;RUA ANA PEREIRA ;127;90415;5/2/2001 20:07:00;CIDADAO COMUM;S;;AARAO REIS;BH;613081.27;803728.83;1682
+1684;2001069849;B03000;AMEACA;RUA SEBASTIAO CL;25;108190;5/2/2001 20:22:00;CIDADAO COMUM;S;;MANTIQUEIRA;BH;606855.47;811488.80;1683
+1685;2001069941;B06000;LESAO CORPORAL;RUA SETE DE OUTU;102;85030;5/2/2001 21:11:00;CIDADAO COMUM;S;0;JARDIM DOS COMER;BH;607536.55;810892.37;1684
+1686;2001069968;B03000;AMEACA;RUA MARECHAL BIT;865;43589;5/2/2001 21:31:00;CIDADAO COMUM;N;AP601;GUTIERREZ;BH;608918.42;795085.07;1685
+1687;2001070040;B03000;AMEACA;RUA JOSE CAMBRAI;378;80786;5/2/2001 22:08:00;CIDADAO COMUM;S;;NOVA BARROCA;BH;607453.81;793052.97;1686
+1688;2001070154;B03000;AMEACA;RUA JOSE GOMES;334;38802;5/2/2001 23:19:00;CIDADAO COMUM;N;;SARANDI (URCA/BH;BH;603682.39;802289.69;1687
+1689;2001070181;B06000;LESAO CORPORAL;RUA DOS VICENTIN;85;63159;5/2/2001 23:42:00;CIDADAO COMUM;S;;PLANALTO;BH;610711.47;805504.00;1688
+1690;2001070204;B03000;AMEACA;RUA JAGUARA;600;36775;5/2/2001 23:58:00;CIDADAO COMUM;N;0;SAUDADE;BH;615333.34;797495.39;1689
+1691;2001070241;B04001;HOMICIDIO TENTAD;AV SARAMENHA;636;64007;6/2/2001 00:30:00;INICIATIVA;N;0;FLORAMAR;BH;612390.88;805800.78;1690
+1692;2001070259;B06000;LESAO CORPORAL;RUA MARECHAL RON;68;43677;6/2/2001 00:43:00;INICIATIVA;N;0;PRIMEIRO DE MAIO;BH;611883.66;803480.80;1691
+1693;2001070283;B06000;LESAO CORPORAL;AV DO CONTORNO;5602;17228;6/2/2001 01:14:00;CIDADAO COMUM;S;0;CARMO;BH;611910.43;794907.67;1692
+1694;2001070288;B03000;AMEACA;RUA DOS BANDOLIN;1;106980;6/2/2001 01:21:00;CIDADAO COMUM;S;0;DOM BOSCO;BH;604085.47;796771.04;1693
+1695;2001070292;B06000;LESAO CORPORAL;AV ASSIS CHATEAU;726;6353;6/2/2001 01:29:00;CIDADAO COMUM;S;;CENTRO (BH);BH;611774.82;797225.12;1694
+1696;2001070320;B03000;AMEACA;RUA NEFELINA;99;81228;6/2/2001 02:01:00;CIDADAO COMUM;N;;SANTA TEREZA;BH;612838.15;797304.69;1695
+1697;2001070324;B03000;AMEACA;RUA CORONEL ALVA;175;17520;6/2/2001 02:04:00;CIDADAO COMUM;N;;FLORAMAR;BH;611562.81;806331.42;1696
+1698;2001070544;B06000;LESAO CORPORAL;AV BARAO HOMEM D;1270;7936;6/2/2001 07:24:00;CIDADAO COMUM;S;;JARDIM AMERICA;BH;607864.45;794292.87;1697
+1699;2001070603;B06000;LESAO CORPORAL;AV SANTOS DUMONT;680;61950;6/2/2001 08:13:00;INICIATIVA;N;0;CENTRO (BH);BH;610999.13;797614.04;1698
+1700;2001070604;B06000;LESAO CORPORAL;RUA SAO CLEMENTE;807;62197;6/2/2001 08:12:00;CIDADAO COMUM;N;;SENHOR BOM JESUS;BH;609581.73;799913.96;1699
+1701;2001070701;B03000;AMEACA;RUA GUANABARA;15;32040;6/2/2001 09:22:00;CIDADAO COMUM;S;;CONCORDIA;BH;611511.11;798794.06;1700
+1702;2001070754;B03000;AMEACA;RUA M;32;120210;6/2/2001 09:53:00;CIDADAO COMUM;S;AP102;DIAMANTE;BH;602103.71;789532.87;1701
+1703;2001070769;B06000;LESAO CORPORAL;AV ITAU;512;36025;6/2/2001 10:10:00;CIDADAO COMUM;S;;DOM BOSCO;BH;605311.81;797266.71;1702
+1704;2001070816;B03000;AMEACA;AV BERNARDO VASC;288;9411;6/2/2001 10:34:00;CIDADAO COMUM;S;E M PROF. HEONOR;CACHOEIRINHA;BH;609909.14;801037.91;1703
+1705;2001070823;B03000;AMEACA;RUA POLONIA;15;54541;6/2/2001 10:38:00;CIDADAO COMUM;N;0;COPACABANA;BH;605659.23;806545.79;1704
+1706;2001070846;B03000;AMEACA;ESTRADA DOS BORG;104;85893;6/2/2001 10:50:00;CIDADAO COMUM;N;;JARDIM VITORIA;BH;616597.33;804710.50;1705
+1707;2001070848;B06000;LESAO CORPORAL;RUA QUARENTA E S;84;302843;6/2/2001 10:50:00;INICIATIVA;S;0;NOVO ARAO REIS;BH;614233.65;805810.54;1706
+1708;2001070982;B03000;AMEACA;RUA H;12;78295;6/2/2001 12:20:00;CIDADAO COMUM;S;0;VILA PINHO;BH;601931.42;788161.20;1707
+1709;2001071260;B06000;LESAO CORPORAL;RUA SAO GERALDO;275;170283;6/2/2001 15:35:00;CIDADAO COMUM;S;;CABANA;BH;604775.39;793964.32;1708
+1710;2001071267;B06000;LESAO CORPORAL;RUA JACAREI;353;13154;6/2/2001 15:40:00;INICIATIVA;N;0;COQUEIROS;BH;602568.63;798483.85;1709
+1711;2001071341;B06000;LESAO CORPORAL;RUA DOS TUPIS;666;69965;6/2/2001 16:18:00;INICIATIVA;N;0;BARRO PRETO;BH;610636.56;797022.10;1710
+1712;2001071412;B06000;LESAO CORPORAL;RUA SILVEIRA MAR;283;65977;6/2/2001 16:56:00;CIDADAO COMUM;S;;PARQUE RIACHUELO;BH;609501.21;800093.16;1711
+1713;2001071474;B03000;AMEACA;RUA MARIANO PROC;997;44424;6/2/2001 17:33:00;CIDADAO COMUM;S;;JOAO PINHEIRO;BH;604645.59;796389.21;1712
+1714;2001071545;B03000;AMEACA;RUA OLAVO BILAC;311;49660;6/2/2001 18:15:00;CIDADAO COMUM;N;;SANTA MONICA;BH;607863.74;807696.64;1713
+1715;2001071609;B03000;AMEACA;RUA DA FLAGELACA;123;56042;6/2/2001 18:53:00;CIDADAO COMUM;S;CAFRENT;SAO JOSE;BH;605589.94;798801.47;1714
+1716;2001071644;B03000;AMEACA;RUA JOSE JOAO GA;109;24551;6/2/2001 19:08:00;CIDADAO COMUM;N;;CH VALE DO JATOB;BH;600794.39;787466.77;1715
+1717;2001071645;B03000;AMEACA;AV ALTAMIRO AVEL;391;122937;6/2/2001 19:08:00;CIDADAO COMUM;N;0;CASTELO;BH;604570.40;801462.65;1716
+1718;2001071740;B06000;LESAO CORPORAL;AV OIAPOQUE;284;49166;6/2/2001 19:56:00;INICIATIVA;S;0;CENTRO (BH);BH;610899.84;797829.02;1717
+1719;2001071754;B03000;AMEACA;AV NOSSA SENHORA;344;48311;6/2/2001 20:00:00;CIDADAO COMUM;S;CAFR;PRIMEIRO DE NOVE;BH;612802.94;805193.38;1718
+1720;2001071788;B03000;AMEACA;AV DOS ANDRADAS;3520;3761;6/2/2001 20:21:00;CIDADAO COMUM;S;0;SANTA EFIGENIA;BH;613892.46;797180.43;1719
+1721;2001071831;B04001;HOMICIDIO TENTAD;RUA ELIAS SALIBA;202;58961;6/2/2001 20:50:00;CIDADAO COMUM;S;0;NOVO GLORIA;BH;602991.88;798853.32;1720
+1722;2001071855;B02000;RIXA;AV PRESIDENTE AN;3860;4461;6/2/2001 21:06:00;INICIATIVA;N;0;CACHOEIRINHA;BH;609645.14;802028.98;1721
+1723;2001071911;B03000;AMEACA;RUA TAMBORIL;536;66793;6/2/2001 21:33:00;CIDADAO COMUM;S;0;CONCORDIA;BH;611236.65;799260.64;1722
+1724;2001071966;B04002;HOMICIDIO CONSUM;RUA TEBAS;892;67090;6/2/2001 21:57:00;CIDADAO COMUM;N;0;VERA CRUZ;BH;616165.12;798336.16;1723
+1725;2001072104;B06000;LESAO CORPORAL;RUA JOAQUIM SOAR;466;38190;6/2/2001 23:17:00;CIDADAO COMUM;S;0;FLORAMAR;BH;612307.60;805870.83;1724
+1726;2001072156;B03000;AMEACA;RUA UM;32;27979;6/2/2001 23:45:00;CIDADAO COMUM;N;CAA;CAPITAO EDUARDO;BH;618614.13;806901.22;1725
+1727;2001072171;B04001;HOMICIDIO TENTAD;RUA TENENTE JOAO;85;113450;6/2/2001 23:57:00;CIDADAO COMUM;S;;JARDIM GUANABARA;BH;611899.67;807534.07;1726
+1728;2001072180;B06000;LESAO CORPORAL;AV XIMANGO;600;73856;7/2/2001 00:07:00;INICIATIVA;S;;FLAVIO MARQUES D;BH;604518.35;788396.04;1727
+1729;2001072227;B06000;LESAO CORPORAL;AV OLEGARIO MACI;459;49699;7/2/2001 00:38:00;INICIATIVA;S;0;CENTRO (BH);BH;610594.57;797209.17;1728
+1730;2001072257;B03000;AMEACA;RUA DUARTINA;420;29278;7/2/2001 01:12:00;CIDADAO COMUM;S;0;NOVA VISTA;BH;614879.93;800739.70;1729
+1731;2001072274;B03000;AMEACA;AV OLEGARIO MACI;642;49699;7/2/2001 01:25:00;CIDADAO COMUM;S;PR642;CENTRO (BH);BH;610498.04;797083.99;1730
+1732;2001072352;B06000;LESAO CORPORAL;RUA MANOEL CAYLL;121;43043;7/2/2001 02:27:00;CIDADAO COMUM;N;;HORTO;BH;613259.68;798134.49;1731
+1733;2001072388;B04001;HOMICIDIO TENTAD;AV BERNARDO MONT;367;9392;7/2/2001 02:58:00;CIDADAO COMUM;S;;SANTA EFIGENIA;BH;612374.91;796851.89;1732
+1734;2001072431;B03000;AMEACA;RUA GERALDO PEDR;337;106315;7/2/2001 03:48:00;CIDADAO COMUM;S;;NOVA YORK;BH;608385.57;811231.11;1733
+1735;2001072458;B03000;AMEACA;RUA MACEDONIA;131;38289;7/2/2001 04:19:00;CIDADAO COMUM;N;CAA;COQUEIROS;BH;603334.57;799872.76;1734
+1736;2001072492;B03000;AMEACA;AV ELIAS ANTONIO;490;104726;7/2/2001 06:00:00;CIDADAO COMUM;N;AP401;LETICIA;BH;607244.80;809413.40;1735
+1737;2001072557;B03000;AMEACA;RUA RAMIRO SIQUE;19;128858;7/2/2001 07:26:00;CIDADAO COMUM;S;;CASTANHEIRAS (TA;BH;617768.11;797161.56;1736
+1738;2001072590;B03000;AMEACA;RUA ALCIDES LINS;455;1914;7/2/2001 07:55:00;CIDADAO COMUM;S;ESCOLA STOS DUMO;VILA SANTO ANTON;BH;609186.90;808524.24;1737
+1739;2001072670;B03000;AMEACA;RUA ITAMARATI;250;48277;7/2/2001 08:58:00;CIDADAO COMUM;N;BAR NOSSO BARZIN;PIRATININGA;BH;605206.37;808939.33;1738
+1740;2001072672;B03000;AMEACA;RUA A;330;41110;7/2/2001 08:59:00;CIDADAO COMUM;S;;CH CONFISCO;BH;602965.99;802835.21;1739
+1741;2001072747;B03000;AMEACA;RUA CORCOVADO;833;14894;7/2/2001 10:08:00;CIDADAO COMUM;S;AP301;JARDIM AMERICA;BH;607334.53;794302.08;1740
+1742;2001072774;B06000;LESAO CORPORAL;RUA ITAJUBA;954;35495;7/2/2001 10:19:00;CIDADAO COMUM;N;0;FLORESTA;BH;612190.33;798386.12;1741
+1743;2001072799;B03000;AMEACA;RUA CARMO DO RIO;288;13687;7/2/2001 10:36:00;CIDADAO COMUM;N;;PRADO LOPES;BH;609993.05;798980.09;1742
+1744;2001072875;B06000;LESAO CORPORAL;ALAMEDA EZEQUIEL;225;27446;7/2/2001 11:21:00;INICIATIVA;N;0;CENTRO (BH);BH;611899.54;796686.86;1743
+1745;2001072881;B04001;HOMICIDIO TENTAD;RUA INDEPENDENCI;340;34391;7/2/2001 11:26:00;CIDADAO COMUM;S;;JARDINOPOLIS;BH;604509.30;794718.09;1744
+1746;2001072907;B03000;AMEACA;RUA DAS PETUNIAS;969;11870;7/2/2001 11:48:00;CIDADAO COMUM;N;;LINDEIA;BH;598921.19;791104.13;1745
+1747;2001072911;B03000;AMEACA;RUA JAGUARIBE;883;36822;7/2/2001 11:53:00;CIDADAO COMUM;S;;CONCORDIA;BH;611378.39;799732.86;1746
+1748;2001072953;B06000;LESAO CORPORAL;RUA DESEMBARGADO;430;116202;7/2/2001 12:26:00;CIDADAO COMUM;S;;DONA CLARA;BH;610723.18;803594.67;1747
+1749;2001072956;B03000;AMEACA;RUA MONTE CASTEL;66;127234;7/2/2001 12:30:00;CIDADAO COMUM;S;;VILA OESTE;BH;604489.89;795257.80;1748
+1750;2001072970;B04001;HOMICIDIO TENTAD;RUA MUNIZ;149;170850;7/2/2001 12:38:00;INICIATIVA;S;0;MORRO DAS PEDRAS;BH;608113.39;793880.88;1749
+1751;2001073159;B03000;AMEACA;RUA ARAGUARI;628;5376;7/2/2001 14:48:00;INICIATIVA;S;INICIATIVA DA VP;BARRO PRETO;BH;609954.68;796706.40;1750
+1752;2001073181;B03000;AMEACA;RUA URSULA PAULI;1442;71066;7/2/2001 15:03:00;CIDADAO COMUM;S;0;BETANIA;BH;605777.81;792682.47;1751
+1753;2001073272;B03000;AMEACA;RUA IPE;345;34767;7/2/2001 15:44:00;CIDADAO COMUM;N;0;SAO CRISTOVAO;BH;610494.64;799268.14;1752
+1754;2001073357;B06000;LESAO CORPORAL;RUA CATALUNHA;443;14204;7/2/2001 16:18:00;CIDADAO COMUM;S;0;SARANDI (URCA/BH;BH;603933.81;802539.25;1753
+1755;2001073400;B03000;AMEACA;RUA EXPEDICIONAR;48;31627;7/2/2001 16:43:00;CIDADAO COMUM;N;;MARIA GORETTI;BH;614332.83;803360.97;1754
+1756;2001073819;B04002;HOMICIDIO CONSUM;RUA CINCO;52;78037;7/2/2001 20:40:00;CIDADAO COMUM;N;;INDEPENDENCIA;BH;601318.63;786154.43;1755
+1757;2001073820;B06000;LESAO CORPORAL;AV DOM JOSE GASP;500;22339;7/2/2001 20:40:00;CIDADAO COMUM;N;CSA;CORACAO EUCARIST;BH;605797.97;796894.62;1756
+1758;2001073833;B03000;AMEACA;ALAMEDA EZEQUIEL;345;27446;7/2/2001 20:46:00;CIDADAO COMUM;S;;CENTRO (BH);BH;611840.81;796451.07;1757
+1759;2001073843;B03000;AMEACA;RUA AMERICANOS;50;3254;7/2/2001 20:52:00;CIDADAO COMUM;S;;FAZENDINHA;BH;603722.29;790086.11;1758
+1760;2001073861;B04001;HOMICIDIO TENTAD;AV AMINTAS JAQUE;60;52546;7/2/2001 21:00:00;CIDADAO COMUM;N;0;COQUEIROS;BH;603487.16;799877.67;1759
+1761;2001073930;B04001;HOMICIDIO TENTAD;AV DO CONTORNO;1982;17228;7/2/2001 21:39:00;CIDADAO COMUM;S;FR2107;CENTRO (BH);BH;612352.69;797370.37;1760
+1762;2001073945;B06000;LESAO CORPORAL;RUA 36;194;302834;7/2/2001 21:45:00;CIDADAO COMUM;S;REF:POSTO FELIPE;NOVO AARAO REIS;BH;613827.91;805532.46;1761
+1763;2001073956;B03000;AMEACA;RUA HELIO RODRIG;304;32950;7/2/2001 21:52:00;CIDADAO COMUM;N;0;BOA VISTA;BH;614343.25;800026.03;1762
+1764;2001073991;B06000;LESAO CORPORAL;RUA ROSEIRAL;54;59416;7/2/2001 22:12:00;CIDADAO COMUM;N;CS;SANTO ANDRE;BH;609832.66;799191.69;1763
+1765;2001074002;B03000;AMEACA;AV AUGUSTO DE LI;1096;6731;7/2/2001 22:17:00;CIDADAO COMUM;S;PX1096;BARRO PRETO;BH;610281.56;796840.01;1764
+1766;2001074043;B06000;LESAO CORPORAL;RUA FREI VICENTE;247;30029;7/2/2001 22:42:00;INICIATIVA;S;0;SANTA MONICA;BH;607277.72;807964.07;1765
+1767;2001074066;B03000;AMEACA;RUA SOROR ANA AN;70;19337;7/2/2001 22:59:00;CIDADAO COMUM;N;;CAMPO ALEGRE;BH;610387.80;807162.63;1766
+1768;2001074150;B02000;RIXA;RUA VICENTINA DE;549;71891;7/2/2001 23:52:00;CIDADAO COMUM;S;;SAGRADA FAMILIA;BH;613595.79;798515.06;1767
+1769;2001074222;B08000;VIOLACAO DE DOMI;RUA MARMORE;614;44695;8/2/2001 00:48:00;CIDADAO COMUM;N;CSFU;SANTA TEREZA;BH;613418.76;797408.02;1768
+1770;2001074246;B06000;LESAO CORPORAL;AV PARANA;39;52230;8/2/2001 01:04:00;CIDADAO COMUM;N;;CENTRO (BH);BH;610859.45;797471.75;1769
+1771;2001074658;B03000;AMEACA;RUA H;7;78295;8/2/2001 09:19:00;CIDADAO COMUM;S;;VILA PINHO;BH;601974.30;788329.06;1770
+1772;2001074721;B03000;AMEACA;AV BIAS FORTES;1035;9553;8/2/2001 10:03:00;CIDADAO COMUM;S;;LOURDES;BH;610553.39;796535.86;1771
+1773;2001074812;B03000;AMEACA;AV BARAO HOMEM D;1884;7936;8/2/2001 11:00:00;CIDADAO COMUM;S;;LEONINA;BH;608064.83;793456.63;1772
+1774;2001074849;B03000;AMEACA;AV NOSSA SENHORA;879;47996;8/2/2001 11:33:00;INICIATIVA;S;;CARMO;BH;611483.97;793937.14;1773
+1775;2001074858;B03000;AMEACA;RUA JOSE LAPORTE;237;123826;8/2/2001 11:37:00;INICIATIVA;S;;ESTORIL;BH;608574.77;792517.75;1774
+1776;2001074914;B03000;AMEACA;RUA PARIS;107;52316;8/2/2001 12:19:00;CIDADAO COMUM;N;0;COPACABANA;BH;606011.45;806325.41;1775
+1777;2001074943;B03000;AMEACA;RUA DOUTOR CEZAR;97;80962;8/2/2001 12:39:00;CIDADAO COMUM;S;;NOVA CINTRA;BH;605438.05;793395.99;1776
+1778;2001075012;B03000;AMEACA;AV FURQUIM WERNE;80;650;8/2/2001 13:20:00;CIDADAO COMUM;S;LJA;TUPI;BH;613037.46;805818.71;1777
+1779;2001075034;B03000;AMEACA;AV DOM JOAO VI;784;22294;8/2/2001 13:37:00;CIDADAO COMUM;S;CAFR;CINQUENTENARIO;BH;606589.71;791888.93;1778
+1780;2001075122;B03000;AMEACA;AV ARTUR BERNARD;1180;60844;8/2/2001 14:39:00;CIDADAO COMUM;S;0;VILA PARIS;BH;610180.14;793263.99;1779
+1781;2001075157;B06000;LESAO CORPORAL;RUA PONTA PORA;295;54601;8/2/2001 15:04:00;CIDADAO COMUM;S;PX36;SANTA EFIGENIA;BH;613215.57;796976.97;1780
+1782;2001075175;B06000;LESAO CORPORAL;RUA IBIRAPITANGA;59;33880;8/2/2001 15:14:00;CIDADAO COMUM;S;0;DOM CABRAL;BH;605182.78;796323.06;1781
+1783;2001075204;B06000;LESAO CORPORAL;RUA CAMILO DE BR;636;11896;8/2/2001 15:31:00;CIDADAO COMUM;S;;PADRE EUSTAQUIO;BH;605855.99;798012.24;1782
+1784;2001075207;B03000;AMEACA;AV GUANABARA;312;93400;8/2/2001 15:34:00;CIDADAO COMUM;N;CA312;SARANDI (URCA/BH;BH;602854.58;802637.55;1783
+1785;2001075232;B03000;AMEACA;RUA CURITIBA;914;19090;8/2/2001 15:47:00;CIDADAO COMUM;S;;CENTRO (BH);BH;610779.71;797017.51;1784
+1786;2001075335;B06000;LESAO CORPORAL;RUA CARMELA ALUO;249;13558;8/2/2001 16:58:00;CIDADAO COMUM;N;0;ARAGUAIA;BH;605218.59;789628.45;1785
+1787;2001075348;B03000;AMEACA;RUA IPANEMA;1120;34726;8/2/2001 17:05:00;CIDADAO COMUM;S;0;SARANDI (URCA/BH;BH;602824.51;802350.58;1786
+1788;2001075382;B03000;AMEACA;AV AMINTAS VIDAL;1689;118769;8/2/2001 17:21:00;CIDADAO COMUM;S;AP103;NOVA GAMELEIRA;BH;605235.40;794648.57;1787
+1789;2001075421;B03000;AMEACA;RUA EXPEDICIONAR;500;27096;8/2/2001 17:44:00;CIDADAO COMUM;S;0;SAO LUIZ;BH;606853.89;803084.68;1788
+1790;2001075450;B03000;AMEACA;RUA VISEU;1178;62042;8/2/2001 17:59:00;CIDADAO COMUM;S;;SAO FRANCISCO;BH;609516.82;802452.66;1789
+1791;2001075465;B06000;LESAO CORPORAL;RUA JACUI;1467;36734;8/2/2001 18:08:00;CIDADAO COMUM;N;;CONCORDIA;BH;611633.01;799247.97;1790
+1792;2001075469;B03000;AMEACA;RUA INACIO MURTA;156;34322;8/2/2001 18:10:00;CIDADAO COMUM;S;CA18;COPACABANA;BH;606337.97;805563.86;1791
+1793;2001075470;B06000;LESAO CORPORAL;RUA GERALDO FERR;170;96222;8/2/2001 18:11:00;CIDADAO COMUM;S;;MANTIQUEIRA;BH;606278.02;810733.96;1792
+1794;2001075486;B03000;AMEACA;RUA YUCATAN;70;36302;8/2/2001 18:17:00;POLICIAL MILITAR;S;0;SAO PEDRO;BH;611188.45;793833.06;1793
+1795;2001075493;B06000;LESAO CORPORAL;RUA JOSE ANTONIO;62;80483;8/2/2001 18:24:00;CIDADAO COMUM;S;;JARDIM ALVORADA;BH;606114.48;800215.54;1794
+1796;2001075514;B06000;LESAO CORPORAL;RUA SAO CRISTOVA;70;25378;8/2/2001 18:35:00;CIDADAO COMUM;N;;TAQUARIL;BH;617039.20;797453.04;1795
+1797;2001075541;B06000;LESAO CORPORAL;RUA M;3;27184;8/2/2001 18:49:00;CIDADAO COMUM;S;0;PAULO SEXTO;BH;616370.43;806971.69;1796
+1798;2001075618;B03000;AMEACA;RUA JOSE BERNARD;41;83251;8/2/2001 19:26:00;CIDADAO COMUM;N;;SANTA HELENA (BH;BH;603509.72;789328.98;1797
+1799;2001075724;B06000;LESAO CORPORAL;RUA AARAO REIS;194;473;8/2/2001 20:30:00;INICIATIVA;S;0;CENTRO BH;BH;611579.10;797272.30;1798
+1800;2001075739;B03000;AMEACA;RUA V;176;118150;8/2/2001 20:40:00;CIDADAO COMUM;S;;CH TUNEL DE IBIR;BH;599765.67;789621.94;1799
+1801;2001075749;B06000;LESAO CORPORAL;RUA ENGENHO DA E;69;94977;8/2/2001 20:46:00;CIDADAO COMUM;N;CAFU;ENGENHO NOGUEIRA;BH;606438.46;800149.67;1800
+1802;2001075751;B03000;AMEACA;RUA SAUDE;252;64164;8/2/2001 20:47:00;CIDADAO COMUM;S;;PADRE EUSTAQUIO;BH;605595.24;797841.46;1801
+1803;2001075797;B03000;AMEACA;RUA PEDRO AMERIC;320;113157;8/2/2001 21:14:00;CIDADAO COMUM;S;CSFR;TUPI;BH;613781.51;806534.29;1802
+1804;2001075805;B04001;HOMICIDIO TENTAD;RUA ROMA;105;59227;8/2/2001 21:18:00;CIDADAO COMUM;S;;COPACABANA;BH;606318.49;806279.57;1803
+1805;2001075811;B03000;AMEACA;RUA PROFESSOR AI;808;72608;8/2/2001 21:21:00;CIDADAO COMUM;S;;SAO JOAO BATISTA;BH;608500.71;807940.36;1804
+1806;2001076026;B03000;AMEACA;AV ITAITE;504;35441;8/2/2001 23:04:00;CIDADAO COMUM;S;;SAO GERALDO;BH;615257.50;799429.25;1805
+1807;2001076062;B06000;LESAO CORPORAL;RUA SAO CRISTOVA;199;62229;8/2/2001 23:19:00;CIDADAO COMUM;N;0;SAO BERNARDO;BH;610869.22;805058.68;1806
+1808;2001076067;B03000;AMEACA;RUA GENTIOS;1350;30983;8/2/2001 23:19:00;INICIATIVA;S;HT 124.14 SD MAR;CORACAO DE JESUS;BH;608905.13;793585.28;1807
+1809;2001076070;B06000;LESAO CORPORAL;RUA A;128;78673;8/2/2001 23:26:00;CIDADAO COMUM;N;;CH JATOBA IV;BH;600210.63;787810.91;1808
+1810;2001076075;B06000;LESAO CORPORAL;AV AGENOR DE PAU;280;86250;8/2/2001 23:28:00;POLICIAL MILITAR;N;0;JAQUELINE;BH;611517.37;810264.32;1809
+1811;2001076103;B03000;AMEACA;RUA BARAO DE LEO;330;7964;8/2/2001 23:41:00;CIDADAO COMUM;N;;ALTO DOS PINHEIR;BH;604194.18;796281.95;1810
+1812;2001076111;B03000;AMEACA;RUA FREI MARTINH;42;94154;8/2/2001 23:45:00;CIDADAO COMUM;S;0;PAQUETA;BH;605242.03;802751.03;1811
+1813;2001076231;B06000;LESAO CORPORAL;RUA NICOLINA DE ;15;44263;9/2/2001 01:45:00;INICIATIVA;S;0;HAVAI;BH;607302.26;793743.23;1812
+1814;2001076252;B04001;HOMICIDIO TENTAD;RUA JOAQUIM GOUV;10;1422;9/2/2001 01:55:00;INICIATIVA;S;0;SAO PAULO;BH;612535.79;802867.60;1813
+1815;2001076323;B03000;AMEACA;RUA CORONEL NEWT;332;124872;9/2/2001 02:51:00;CIDADAO COMUM;S;0;MANGUEIRAS;BH;600855.58;786772.21;1814
+1816;2001076328;B03000;AMEACA;RUA POTOMAIO;658;54920;9/2/2001 02:57:00;CIDADAO COMUM;N;0;SAO GERALDO;BH;615643.99;799123.70;1815
+1817;2001076354;B06000;LESAO CORPORAL;RUA DIVINO ESPIR;75;96768;9/2/2001 03:27:00;CIDADAO COMUM;N;;ANTONIO RIBEIRO ;BH;614662.44;806404.94;1816
+1818;2001076375;B06000;LESAO CORPORAL;AV URUGUAI;96;71113;9/2/2001 03:46:00;CIDADAO COMUM;N;0;SION;BH;611525.36;793887.62;1817
+1819;2001076612;B03000;AMEACA;RUA JOAO BATISTA;60;97745;9/2/2001 08:47:00;CIDADAO COMUM;N;;DOM SILVERIO;BH;614734.92;804019.88;1818
+1820;2001076653;B03000;AMEACA;RUA PADRE EUSTAQ;1255;51294;9/2/2001 09:25:00;CIDADAO COMUM;N;LJ02;CARLOS PRATES;BH;608384.30;797938.60;1819
+1821;2001076722;B03000;AMEACA;RUA COPO DE LEIT;40;98606;9/2/2001 10:24:00;CIDADAO COMUM;S;;VILA FREI LEOPOL;BH;611148.28;809422.81;1820
+1822;2001076772;B03000;AMEACA;AV DOM JOAO VI;784;22294;9/2/2001 10:54:00;CIDADAO COMUM;S;CAFR;CINQUENTENARIO;BH;606589.71;791888.93;1821
+1823;2001076992;B06000;LESAO CORPORAL;RUA YUCATAN;70;36302;9/2/2001 13:46:00;INICIATIVA;S;;SAO PEDRO;BH;611188.45;793833.06;1822
+1824;2001077010;B03000;AMEACA;RUA AMERICO MART;310;46228;9/2/2001 14:01:00;CIDADAO COMUM;N;;MINASLANDIA;BH;612269.47;804162.89;1823
+1825;2001077087;B06000;LESAO CORPORAL;RUA GERALDO FERR;78;96222;9/2/2001 14:56:00;CIDADAO COMUM;N;;MANTIQUEIRA;BH;606284.84;810641.13;1824
+1826;2001077237;B04001;HOMICIDIO TENTAD;AV SILVA LOBO;2425;65889;9/2/2001 16:24:00;INICIATIVA;S;0;GRAJAU;BH;608493.57;794563.18;1825
+1827;2001077285;B04002;HOMICIDIO CONSUM;RUA CAMILA DE SO;100;74294;9/2/2001 16:52:00;CIDADAO COMUM;N;0;SAO JOAO BATISTA;BH;608167.22;807611.94;1826
+1828;2001077311;B06000;LESAO CORPORAL;RUA QUITANDINHA;176;57600;9/2/2001 17:11:00;POLICIAL MILITAR;S;0;SERRANO;BH;603414.69;800598.96;1827
+1829;2001077333;B06000;LESAO CORPORAL;RUA PADRE CORREA;327;51266;9/2/2001 17:26:00;CIDADAO COMUM;S;PX327;SANTA EFIGENIA;BH;614030.80;796078.14;1828
+1830;2001077417;B06000;LESAO CORPORAL;RUA CONCHAS;196;80178;9/2/2001 18:11:00;CIDADAO COMUM;N;;COQUEIROS;BH;602671.11;799789.15;1829
+1831;2001077449;B06000;LESAO CORPORAL;RUA ERNESTO TOGN;37;129850;9/2/2001 18:29:00;CIDADAO COMUM;N;0;GORDURAS;BH;616207.37;803889.32;1830
+1832;2001077475;B03000;AMEACA;RUA VASCO BALBOA;507;102396;9/2/2001 18:47:00;CIDADAO COMUM;S;;VERA CRUZ;BH;616645.98;797621.02;1831
+1833;2001077521;B04001;HOMICIDIO TENTAD;RUA SERRINHA;19;129201;9/2/2001 19:13:00;CIDADAO COMUM;N;0;INDEPENDENCIA;BH;600519.25;786719.95;1832
+1834;2001077570;B04001;HOMICIDIO TENTAD;RUA DEZOITO;47;80225;9/2/2001 19:41:00;INICIATIVA;S;0;NOVA CINTRA;BH;605380.91;793339.84;1833
+1835;2001077754;B03000;AMEACA;RUA E;25;24609;9/2/2001 21:14:00;CIDADAO COMUM;S;;SAGRADA FAMILIA;BH;613409.70;798697.81;1834
+1836;2001077877;B03000;AMEACA;AV AMINTAS JAQUE;131;52546;9/2/2001 22:26:00;CIDADAO COMUM;N;;COQUEIROS;BH;602749.04;799120.63;1835
+1837;2001077892;B03000;AMEACA;RUA CLOTILDE RIB;12;72507;9/2/2001 22:35:00;CIDADAO COMUM;S;;SAO JOAO BATISTA;BH;608811.96;807889.70;1836
+1838;2001077894;B06000;LESAO CORPORAL;RUA DOS GOITACAZ;527;31400;9/2/2001 22:37:00;CIDADAO COMUM;N;0;CENTRO (BH);BH;610800.99;796803.14;1837
+1839;2001077922;B04001;HOMICIDIO TENTAD;RUA DES BRAULIO;1522;19917;9/2/2001 22:52:00;INICIATIVA;N;0;VERA CRUZ;BH;616275.72;797731.58;1838
+1840;2001077945;B06000;LESAO CORPORAL;RUA GOIAS;58;31393;9/2/2001 23:01:00;CIDADAO COMUM;S;0;CENTRO (BH);BH;611325.19;796598.30;1839
+1841;2001078018;B06000;LESAO CORPORAL;RUA BRASIL;15;10446;9/2/2001 23:45:00;CIDADAO COMUM;S;;CABANA;BH;604813.51;793739.13;1840
+1842;2001078030;B03000;AMEACA;RUA PRINCESA LEO;110;55327;9/2/2001 23:54:00;CIDADAO COMUM;S;FU;IPIRANGA;BH;611523.35;801138.47;1841
+1843;2001078141;B03000;AMEACA;RUA ESTEVAO MUSS;227;26327;10/2/2001 00:49:00;CIDADAO COMUM;S;;NOVA GAMELEIRA;BH;605568.02;794405.75;1842
+1844;2001078189;B03000;AMEACA;RUA JOSE FERREIR;80;69650;10/2/2001 01:16:00;CIDADAO COMUM;N;;FLORAMAR;BH;611705.38;806398.85;1843
+1845;2001078203;B03000;AMEACA;AV SARAMENHA;1150;64007;10/2/2001 01:24:00;CIDADAO COMUM;S;;GUARANI;BH;612916.89;805724.57;1844
+1846;2001078255;B03000;AMEACA;RUA DELFIM MOREI;11;19730;10/2/2001 01:53:00;CIDADAO COMUM;N;0;BOA VISTA;BH;614618.57;800009.25;1845
+1847;2001078280;B06000;LESAO CORPORAL;RUA OSWALDO JOSE;50;20160;10/2/2001 02:10:00;CIDADAO COMUM;S;;MINASCAIXA;BH;609180.23;809203.87;1846
+1848;2001078281;B04001;HOMICIDIO TENTAD;RUA DOUTOR CRIST;390;55598;10/2/2001 02:12:00;CIDADAO COMUM;S;;ARAGUAIA;BH;604864.19;789415.74;1847
+1849;2001078285;B06000;LESAO CORPORAL;RUA CARLOS ESTEV;7;74496;10/2/2001 02:15:00;INICIATIVA;S;0;TUPI;BH;612542.70;806590.74;1848
+1850;2001078305;B06000;LESAO CORPORAL;RUA DOS VIOLINOS;340;101797;10/2/2001 02:29:00;CIDADAO COMUM;N;;CH CALIFORNIA;BH;603894.90;796720.96;1849
+1851;2001078317;B06000;LESAO CORPORAL;AV JOSE LOPES MU;101;19176;10/2/2001 02:34:00;INICIATIVA;S;L;FLORAMAR;BH;611566.94;806488.49;1850
+1852;2001078346;B06000;LESAO CORPORAL;RUA PADUA;280;51745;10/2/2001 02:54:00;INICIATIVA;S;0;MARIA VIRGINIA;BH;611522.89;802814.14;1851
+1853;2001078410;B02000;RIXA;RUA RAIMUNDO MAG;88;57801;10/2/2001 03:31:00;CIDADAO COMUM;S;0;MARIA GORETTI;BH;614095.77;803555.29;1852
+1854;2001078422;B03000;AMEACA;AV CORONEL DURVA;652;17688;10/2/2001 03:40:00;CIDADAO COMUM;N;0;DURVAL DE BARROS;BH;598098.20;790874.26;1853
+1855;2001078424;B03000;AMEACA;PRACA CHUI;37;15210;10/2/2001 03:40:00;CIDADAO COMUM;S;B;JOAO PINHEIRO;BH;604582.28;796335.40;1854
+1856;2001078426;B04002;HOMICIDIO CONSUM;RUA MARIANITA;6;101122;10/2/2001 03:40:00;CIDADAO COMUM;S;0;CONJUNTO ALIPIO ;BH;603833.65;799926.48;1855
+1857;2001078457;B02000;RIXA;RUA PARAIBA;993;52170;10/2/2001 04:02:00;CIDADAO COMUM;N;FR993;FUNCIONARIOS;BH;611690.70;795387.82;1856
+1858;2001078490;B03000;AMEACA;RUA DES BRAULIO;1044;19917;10/2/2001 04:26:00;CIDADAO COMUM;S;0;VERA CRUZ;BH;616205.73;798039.53;1857
+1859;2001078513;B06000;LESAO CORPORAL;RUA MUNIZ;470;170850;10/2/2001 04:46:00;CIDADAO COMUM;S;;MORRO DAS PEDRAS;BH;608195.31;793753.03;1858
+1860;2001078614;B06000;LESAO CORPORAL;AV SEN LEVINDO C;1846;14866;10/2/2001 07:02:00;INICIATIVA;S;0;SANTA CECILIA;BH;600957.86;787724.62;1859
+1861;2001078630;B04001;HOMICIDIO TENTAD;RUA JORNALISTA J;222;6470;10/2/2001 07:22:00;CIDADAO COMUM;N;;NOVA CINTRA;BH;606207.46;793674.57;1860
+1862;2001078834;B03000;AMEACA;AV MEM DE SA;1203;45395;10/2/2001 10:22:00;CIDADAO COMUM;N;;PARAISO;BH;614307.18;796365.33;1861
+1863;2001078839;B03000;AMEACA;RUA CASTIGLIANO;377;14056;10/2/2001 10:26:00;CIDADAO COMUM;S;;PADRE EUSTAQUIO;BH;607244.05;797116.33;1862
+1864;2001078841;B04002;HOMICIDIO CONSUM;RUA UM;14;27979;10/2/2001 10:27:00;CIDADAO COMUM;N;;CAPITAO EDUARDO;BH;618614.13;806901.22;1863
+1865;2001078880;B03000;AMEACA;RUA ANTONIO JOSE;265;7431;10/2/2001 10:58:00;CIDADAO COMUM;S;INICIATIVA DA MP;CEU AZUL;BH;605135.52;807570.40;1864
+1866;2001078954;B06000;LESAO CORPORAL;RUA CAMOES;400;11971;10/2/2001 12:00:00;CIDADAO COMUM;S;;SAO LUCAS;BH;613224.65;795764.03;1865
+1867;2001078967;B06000;LESAO CORPORAL;RUA TIRADENTES;215;85607;10/2/2001 12:14:00;CIDADAO COMUM;N;0;VILA SAO JORGE;BH;615513.82;802373.44;1866
+1868;2001079037;B03000;AMEACA;RUA SAO PEDRO;169;96046;10/2/2001 12:55:00;CIDADAO COMUM;S;;MARIA GORETTI;BH;614537.78;803247.55;1867
+1869;2001079045;B03000;AMEACA;RUA LAMBDA;150;40307;10/2/2001 13:01:00;CIDADAO COMUM;N;0;CAICARA;BH;608190.20;799951.28;1868
+1870;2001079046;B06000;LESAO CORPORAL;RUA JOSE TEIXEIR;210;72995;10/2/2001 13:02:00;CIDADAO COMUM;S;;FLORAMAR;BH;611479.65;807013.94;1869
+1871;2001079083;B03000;AMEACA;RUA NADIR;138;47173;10/2/2001 13:23:00;CIDADAO COMUM;S;0;ADELAIDE;BH;607481.75;798916.11;1870
+1872;2001079097;B03000;AMEACA;RUA RIO DE JANEI;18;58772;10/2/2001 13:34:00;CIDADAO COMUM;S;0;CENTRO (BH);BH;611248.04;797676.50;1871
+1873;2001079113;B03000;AMEACA;AV ALVARES CABRA;780;2730;10/2/2001 13:44:00;INICIATIVA;S;0;LOURDES;BH;610742.90;796168.29;1872
+1874;2001079138;B03000;AMEACA;RUA EVARISTO DA ;10;26922;10/2/2001 13:57:00;CIDADAO COMUM;S;;PRADO LOPES;BH;610219.65;798678.72;1873
+1875;2001079201;B06000;LESAO CORPORAL;RUA TEIXEIRAS;40;67222;10/2/2001 14:39:00;CIDADAO COMUM;N;LJB;ERMELINDA;BH;609010.61;801078.91;1874
+1876;2001079258;B03000;AMEACA;RUA SAO TEOFILO;22;105441;10/2/2001 15:33:00;CIDADAO COMUM;S;0;PAULO SEXTO;BH;616200.84;806211.29;1875
+1877;2001079278;B03000;AMEACA;RUA FREI VICENTE;247;30029;10/2/2001 15:44:00;CIDADAO COMUM;S;;SANTA MONICA;BH;607277.72;807964.07;1876
+1878;2001079318;B06000;LESAO CORPORAL;RUA JACUI;2811;36734;10/2/2001 16:01:00;CIDADAO COMUM;S;;IPIRANGA;BH;611411.53;800497.94;1877
+1879;2001079319;B03000;AMEACA;RUA DA BAHIA;561;81155;10/2/2001 16:01:00;INICIATIVA;S;0;CENTRO (BH);BH;611416.65;797071.68;1878
+1880;2001079321;B03000;AMEACA;AV AUGUSTO DE LI;134;6731;10/2/2001 16:00:00;INICIATIVA;N;0;CENTRO (BH);BH;611209.44;796588.30;1879
+1881;2001079324;B04002;HOMICIDIO CONSUM;RUA REGENCIA;160;301448;10/2/2001 16:03:00;INICIATIVA;N;0;VILA CAFEZAL;BH;614098.82;795476.81;1880
+1882;2001079339;B03000;AMEACA;RUA MUNICIPAL;24;171677;10/2/2001 16:14:00;CIDADAO COMUM;S;;VILA CEMIG;BH;605534.66;788579.65;1881
+1883;2001079375;B06000;LESAO CORPORAL;BECO BELMIRO DIA;15;171015;10/2/2001 16:39:00;CIDADAO COMUM;S;CAFR;CABANA;BH;604778.50;794122.00;1882
+1884;2001079425;B02000;RIXA;RUA PINTOR RENAT;437;26617;10/2/2001 17:03:00;CIDADAO COMUM;N;FU;TUPI;BH;613985.37;806046.29;1883
+1885;2001079426;B06000;LESAO CORPORAL;RUA A;311;78673;10/2/2001 17:02:00;CIDADAO COMUM;S;0;CH JATOBA IV;BH;600108.52;787774.84;1884
+1886;2001079444;B03000;AMEACA;RUA ESTEVAO MUSS;60;26327;10/2/2001 17:12:00;CIDADAO COMUM;S;CAA;NOVA GAMELEIRA;BH;605516.79;794498.15;1885
+1887;2001079478;B03000;AMEACA;RUA CARVALHOS;137;13788;10/2/2001 17:34:00;CIDADAO COMUM;N;CAA;MANGABEIRAS;BH;612119.88;792554.36;1886
+1888;2001079495;B06000;LESAO CORPORAL;RUA ANTONIO MARM;26;102907;10/2/2001 17:45:00;CIDADAO COMUM;N;;CH DA LAGOA;BH;605102.35;802904.34;1887
+1889;2001079500;B03000;AMEACA;RUA MARCO AURELI;127;61821;10/2/2001 17:47:00;CIDADAO COMUM;S;;NAZARE;BH;615586.92;804707.76;1888
+1890;2001079502;B03000;AMEACA;RUA MARCIOS MOUR;280;117306;10/2/2001 17:49:00;CIDADAO COMUM;N;;LINDEIA;BH;600206.92;790444.42;1889
+1891;2001079518;B03000;AMEACA;RUA PADRE JULIO ;1571;51496;10/2/2001 17:55:00;CIDADAO COMUM;S;;VERA CRUZ;BH;616274.14;797626.03;1890
+1892;2001079534;B04001;HOMICIDIO TENTAD;PRACA CARDEAL AR;10;13182;10/2/2001 18:04:00;CIDADAO COMUM;N;0;NOVA CINTRA;BH;605707.20;793813.75;1891
+1893;2001079582;B06000;LESAO CORPORAL;AV COLETORA;920;78241;10/2/2001 18:31:00;CIDADAO COMUM;S;;VILA PINHO;BH;602212.14;787909.78;1892
+1894;2001079584;B06000;LESAO CORPORAL;RUA MANHUARA;942;42891;10/2/2001 18:31:00;CIDADAO COMUM;S;CACIMA;PROVIDENCIA;BH;612690.19;804281.53;1893
+1895;2001079650;B06000;LESAO CORPORAL;RUA AVILA;26;86739;10/2/2001 19:10:00;CIDADAO COMUM;S;CSB;JARDIM EUROPA;BH;608597.44;810162.74;1894
+1896;2001079661;B03000;AMEACA;RUA CONEGO PINHE;254;16820;10/2/2001 19:17:00;CIDADAO COMUM;N;;SANTA EFIGENIA;BH;614304.74;797161.13;1895
+1897;2001079668;B03000;AMEACA;RUA CARMO DO RIO;70;13687;10/2/2001 19:23:00;CIDADAO COMUM;N;;PRADO LOPES;BH;609977.20;798867.23;1896
+1898;2001079684;B04001;HOMICIDIO TENTAD;RUA MARZAGANIA;113;88066;10/2/2001 19:33:00;CIDADAO COMUM;S;0;GRANJA FREITAS;BH;617023.58;798845.01;1897
+1899;2001079718;B06000;LESAO CORPORAL;RUA DA RESSURREI;238;58470;10/2/2001 19:52:00;CIDADAO COMUM;S;0;SAO JOSE;BH;605345.40;798739.68;1898
+1900;2001079731;B04002;HOMICIDIO CONSUM;RUA ALICE;100;170949;10/2/2001 19:58:00;CIDADAO COMUM;N;;MORRO DAS PEDRAS;BH;607996.88;793885.89;1899
+1901;2001079774;B06000;LESAO CORPORAL;RUA PROFESSOR MI;108;128628;10/2/2001 20:27:00;INICIATIVA;S;0;NOVA ESPERANCA;BH;609336.96;799237.81;1900
+1902;2001079780;B03000;AMEACA;RUA PADRE MANOEL;15;51556;10/2/2001 20:30:00;CIDADAO COMUM;S;0;JOAO PINHEIRO;BH;605001.34;795728.64;1901
+1903;2001079798;B03000;AMEACA;RUA MANOEL PAULI;125;43185;10/2/2001 20:44:00;CIDADAO COMUM;S;;DURVAL DE BARROS;IB;598267.43;791064.47;1902
+1904;2001079848;B06000;LESAO CORPORAL;RUA DINIS DIAS;145;119673;10/2/2001 21:10:00;CIDADAO COMUM;S;0;VERA CRUZ;BH;616573.20;797526.82;1903
+1905;2001079851;B04001;HOMICIDIO TENTAD;RUA BATISTA CARN;98;8419;10/2/2001 21:12:00;CIDADAO COMUM;N;;SALGADO FILHO;BH;606473.20;794973.26;1904
+1906;2001079885;B03000;AMEACA;RUA TEBAS;670;67090;10/2/2001 21:25:00;INICIATIVA;N;0;VERA CRUZ;BH;615977.89;798300.24;1905
+1907;2001079894;B02000;RIXA;RUA ALCOBACA;1210;62708;10/2/2001 21:30:00;CIDADAO COMUM;S;0;SAO FRANCISCO;BH;608806.89;801887.18;1906
+1908;2001079932;B06000;LESAO CORPORAL;RUA NIQUELINA;20;47738;10/2/2001 21:56:00;INICIATIVA;N;0;SANTA EFIGENIA;BH;613202.56;796623.13;1907
+1909;2001080034;B03000;AMEACA;RUA SERRA NEGRA;145;65038;10/2/2001 23:05:00;CIDADAO COMUM;S;;SAO CRISTOVAO;BH;610132.74;799274.01;1908
+1910;2001080038;B06000;LESAO CORPORAL;RUA CORONEL ANTO;26;17590;10/2/2001 23:08:00;CIDADAO COMUM;N;;JARDIM LEBLON;BH;606351.58;807582.90;1909
+1911;2001080039;B06000;LESAO CORPORAL;AV MENELICK DE C;256;30448;10/2/2001 23:09:00;INICIATIVA;S;0;FLAVIO MARQUES D;BH;604486.70;788882.24;1910
+1912;2001080057;B06000;LESAO CORPORAL;RUA H;432;78295;10/2/2001 23:15:00;CIDADAO COMUM;S;CAA;VILA PINHO;BH;602014.90;788025.16;1911
+1913;2001080082;B03000;AMEACA;RUA CORONEL FULG;186;17750;10/2/2001 23:26:00;CIDADAO COMUM;S;PX186;SAO LUCAS;BH;613210.64;796135.07;1912
+1914;2001080106;B04001;HOMICIDIO TENTAD;RUA ELVIRA AUGUS;461;21222;10/2/2001 23:39:00;POLICIAL MILITAR;N;0;BOA VISTA;BH;615016.28;800012.15;1913
+1915;2001080134;B03000;AMEACA;RUA ARTUR DE SA;564;6211;10/2/2001 23:49:00;CIDADAO COMUM;S;;UNIAO;BH;612425.80;801529.08;1914
+1916;2001080164;B04001;HOMICIDIO TENTAD;RUA PITANGUI;4000;54365;11/2/2001 00:02:00;CIDADAO COMUM;S;0;ESPLANADA;BH;614196.00;798230.33;1915
+1917;2001080172;B06000;LESAO CORPORAL;RUA MONTE CARMEL;197;46420;11/2/2001 00:08:00;CIDADAO COMUM;S;AP04;FLORESTA;BH;612341.65;798167.69;1916
+1918;2001080180;B06000;LESAO CORPORAL;RUA CAMPOS SALES;472;12300;11/2/2001 00:12:00;INICIATIVA;S;0;NOVA SUISSA;BH;607050.85;796279.60;1917
+1919;2001080182;B04002;HOMICIDIO CONSUM;RUA EMIDIO FURTA;737;108525;11/2/2001 00:10:00;INICIATIVA;N;0;LETICIA;BH;606802.06;809377.86;1918
+1920;2001080200;B06000;LESAO CORPORAL;RODOVIA MGT 262;1060;26598;11/2/2001 00:21:00;CIDADAO COMUM;S;;SAO MARCOS;BH;614799.23;802174.37;1919
+1921;2001080240;B03000;AMEACA;RUA JOSUE MENEZE;255;72982;11/2/2001 00:41:00;CIDADAO COMUM;S;;GAMELEIRA;BH;605384.39;795273.46;1920
+1922;2001080247;B06000;LESAO CORPORAL;AV NOSSA SENHORA;3126;48107;11/2/2001 00:46:00;INICIATIVA;S;0;CARLOS PRATES;BH;608689.07;797282.61;1921
+1923;2001080259;B03000;AMEACA;RUA DAS VERBENAS;752;71545;11/2/2001 00:52:00;CIDADAO COMUM;N;;LINDEIA;BH;598936.24;790800.47;1922
+1924;2001080261;B04001;HOMICIDIO TENTAD;RUA RIO JORDAO;258;124816;11/2/2001 00:52:00;CIDADAO COMUM;N;0;CRISTO REDENTOR;BH;605093.51;790501.88;1923
+1925;2001080318;B04001;HOMICIDIO TENTAD;RUA EXPEDICIONAR;65;19570;11/2/2001 01:17:00;INICIATIVA;S;0;MARIA GORETTI;BH;614141.03;803465.87;1924
+1926;2001080406;B04002;HOMICIDIO CONSUM;RUA ANAPURUS;32;20894;11/2/2001 01:56:00;CIDADAO COMUM;N;0;SAO GABRIEL;BH;613070.65;804032.62;1925
+1927;2001080426;B06000;LESAO CORPORAL;RUA SAO VICENTE;16;88126;11/2/2001 02:04:00;CIDADAO COMUM;S;BLOCO 300;GRANJA FREITAS;BH;617082.39;798490.25;1926
+1928;2001080486;B06000;LESAO CORPORAL;RUA JOAO PROCOPI;282;69070;11/2/2001 02:39:00;CIDADAO COMUM;S;;JARDIM ALVORADA;BH;606052.66;800374.59;1927
+1929;2001080515;B06000;LESAO CORPORAL;RUA FLOR DO NATA;166;28741;11/2/2001 02:55:00;CIDADAO COMUM;N;;JARDIM MONTANHES;BH;606469.77;798943.26;1928
+1930;2001080526;B06000;LESAO CORPORAL;RUA PERNAMBUCO;514;53463;11/2/2001 02:59:00;INICIATIVA;S;0;FUNCIONARIOS;BH;611607.37;795755.17;1929
+1931;2001080528;B06000;LESAO CORPORAL;RUA LEOPOLDO GOM;955;40770;11/2/2001 03:00:00;INICIATIVA;N;0;VERA CRUZ;BH;615259.66;798008.79;1930
+1932;2001080529;B04001;HOMICIDIO TENTAD;RUA TEN ANASTACI;550;67263;11/2/2001 03:00:00;CIDADAO COMUM;S;;SANTA EFIGENIA;BH;613431.12;796565.01;1931
+1933;2001080534;B03000;AMEACA;RUA INACIO PARRE;389;21730;11/2/2001 03:02:00;CIDADAO COMUM;S;;ESTRELA DALVA;BH;607308.18;792108.65;1932
+1934;2001080537;B06000;LESAO CORPORAL;RUA EXPEDICIONAR;95;27418;11/2/2001 03:03:00;CIDADAO COMUM;N;0;ADELAIDE;BH;607416.33;798153.36;1933
+1935;2001080567;B06000;LESAO CORPORAL;RUA JOAO GUALBER;16;20450;11/2/2001 03:21:00;CIDADAO COMUM;N;0;CEU AZUL;BH;605094.97;807593.39;1934
+1936;2001080617;B02000;RIXA;AV OTACILIO NEGR;11840;50566;11/2/2001 03:48:00;CIDADAO COMUM;N;;TREVO;BH;604861.56;805383.18;1935
+1937;2001080632;B03000;AMEACA;AV BRIGADEIRO ED;1080;2860;11/2/2001 03:55:00;POLICIAL MILITAR;N;0;GLORIA;BH;604212.05;798647.23;1936
+1938;2001080650;B06000;LESAO CORPORAL;AV SEN LEVINDO C;4405;14866;11/2/2001 04:07:00;CIDADAO COMUM;N;0;CH VALE DO JATOB;BH;601253.14;786620.47;1937
+1939;2001080675;B06000;LESAO CORPORAL;RUA M;46;78790;11/2/2001 04:24:00;CIDADAO COMUM;S;;CH JATOBA IV;BH;600650.50;787805.22;1938
+1940;2001080688;B06000;LESAO CORPORAL;RUA DR PEDRO RUE;280;113853;11/2/2001 04:36:00;CIDADAO COMUM;S;0;LETICIA;BH;606912.50;809559.22;1939
+1941;2001080747;B03000;AMEACA;RUA PAULO ALVES ;18;24580;11/2/2001 05:18:00;CIDADAO COMUM;N;0;CH VALE DO JATOB;BH;600632.65;787523.33;1940
+1942;2001080779;B03000;AMEACA;RUA STA CATARINA;655;60400;11/2/2001 05:43:00;INICIATIVA;N;0;LOURDES;BH;610491.35;796335.53;1941
+1943;2001080781;B03000;AMEACA;AV CIVILIZACAO;90;51657;11/2/2001 05:45:00;CIDADAO COMUM;S;;LEBLON;BH;605103.49;810060.35;1942
+1944;2001080785;B06000;LESAO CORPORAL;RUA HUMAITA;1040;33562;11/2/2001 05:49:00;CIDADAO COMUM;N;LJ;PADRE EUSTAQUIO;BH;606604.09;797013.74;1943
+1945;2001080797;B03000;AMEACA;PRACA QUINZE DE ;9;57565;11/2/2001 06:06:00;INICIATIVA;N;0;BONFIM;BH;609834.50;798492.95;1944
+1946;2001080809;B04002;HOMICIDIO CONSUM;RUA MANHUMIRIM;808;42908;11/2/2001 06:23:00;CIDADAO COMUM;N;0;ADELAIDE;BH;607843.93;798076.55;1945
+1947;2001080827;B03000;AMEACA;RUA SAO MIGUEL;1501;63410;11/2/2001 06:50:00;INICIATIVA;S;0;ITAPOA;BH;609533.82;805627.88;1946
+1948;2001080880;B06000;LESAO CORPORAL;PRACA RAUL SOARE;423;58010;11/2/2001 07:46:00;CIDADAO COMUM;N;;CENTRO (BH);BH;610510.71;796848.26;1947
+1949;2001080911;B06000;LESAO CORPORAL;AV AMAZONAS;166;3140;11/2/2001 08:17:00;CIDADAO COMUM;S;0;CENTRO (BH);BH;611331.41;797309.82;1948
+1950;2001080958;B03000;AMEACA;RUA MARIA DE LOU;585;20765;11/2/2001 08:44:00;CIDADAO COMUM;N;;LETICIA;BH;607064.26;809882.88;1949
+1951;2001080969;B06000;LESAO CORPORAL;RUA GUIDO CIOLET;40;19440;11/2/2001 08:55:00;CIDADAO COMUM;N;;BARREIRO;BH;602909.44;790423.89;1950
+1952;2001080977;B06000;LESAO CORPORAL;AV AMINTAS JAQUE;175;52546;11/2/2001 09:00:00;CIDADAO COMUM;N;0;COQUEIROS;BH;603381.96;799800.15;1951
+1953;2001081007;B03000;AMEACA;RUA ALECRIM DA S;15;105596;11/2/2001 09:30:00;CIDADAO COMUM;S;;ANTONIO RIBEIRO ;BH;615935.58;806050.26;1952
+1954;2001081030;B06000;LESAO CORPORAL;RUA ROCHA PITA;409;59000;11/2/2001 09:49:00;CIDADAO COMUM;S;;POMPEIA;BH;615026.15;797886.50;1953
+1955;2001081040;B06000;LESAO CORPORAL;RUA ANTONIO SIMI;80;118526;11/2/2001 09:56:00;CIDADAO COMUM;S;;REGINA;BH;598646.53;790272.89;1954
+1956;2001081042;B06000;LESAO CORPORAL;RUA FORMIGA;50;29136;11/2/2001 09:55:00;CIDADAO COMUM;N;;LAGOINHA;BH;610336.11;798756.88;1955
+1957;2001081053;B04001;HOMICIDIO TENTAD;RUA JUNQUILHOS;1234;39657;11/2/2001 10:09:00;CIDADAO COMUM;N;;JARDIM AMERICA;BH;607397.31;795111.26;1956
+1958;2001081068;B06000;LESAO CORPORAL;RUA MANGARATIBA;238;42822;11/2/2001 10:24:00;INICIATIVA;S;0;SAO GERALDO;BH;614996.90;799256.76;1957
+1959;2001081076;B06000;LESAO CORPORAL;AV BASILIO DA GA;385;8361;11/2/2001 10:31:00;CIDADAO COMUM;N;;TUPI;BH;613167.64;805972.52;1958
+1960;2001081090;B06000;LESAO CORPORAL;RUA ENCANTADO;269;25453;11/2/2001 10:42:00;CIDADAO COMUM;S;;CAICARA;BH;607644.74;799420.19;1959
+1961;2001081100;B03000;AMEACA;RUA CALIFORNIA;831;11653;11/2/2001 10:48:00;INICIATIVA;S;0;SION;BH;611481.57;793037.66;1960
+1962;2001081128;B03000;AMEACA;RUA FRANCISCO GO;64;68569;11/2/2001 11:10:00;CIDADAO COMUM;S;0;ESTRELA DALVA;BH;607396.99;792279.34;1961
+1963;2001081159;B06000;LESAO CORPORAL;AV ITAU;1337;36025;11/2/2001 11:37:00;CIDADAO COMUM;N;0;JOAO PINHEIRO;BH;604300.14;796713.76;1962
+1964;2001081224;B03000;AMEACA;RUA LEOPOLDO GOM;184;40770;11/2/2001 12:22:00;CIDADAO COMUM;S;;POMPEIA;BH;614481.68;797860.86;1963
+1965;2001081231;B04001;HOMICIDIO TENTAD;RUA SERRA NEGRA;135;65038;11/2/2001 12:28:00;CIDADAO COMUM;S;;SAO CRISTOVAO;BH;610139.91;799281.20;1964
+1966;2001081242;B03000;AMEACA;RUA FLORESTAL;36;123611;11/2/2001 12:36:00;CIDADAO COMUM;S;;INSTITUTO AGRONO;BH;613828.23;799199.35;1965
+1967;2001081283;B06000;LESAO CORPORAL;RUA ITAIPU;960;35439;11/2/2001 13:11:00;CIDADAO COMUM;S;;VERA CRUZ;BH;616274.97;798164.89;1966
+1968;2001081314;B06000;LESAO CORPORAL;RUA JULITA NOGUE;403;39597;11/2/2001 13:32:00;CIDADAO COMUM;S;;SARANDI (URCA/BH;BH;603725.15;802483.82;1967
+1969;2001081315;B06000;LESAO CORPORAL;RUA DOS GOITACAZ;697;31400;11/2/2001 13:32:00;INICIATIVA;N;0;CENTRO (BH);BH;610556.85;796867.59;1968
+1970;2001081317;B05000;SEQUESTRO E CARC;RUA MOACYR FROES;170;108380;11/2/2001 13:33:00;INICIATIVA;N;0;SAO JOAO BATISTA;BH;608939.36;807397.69;1969
+1971;2001081417;B03000;AMEACA;RUA SILVA ORTIZ;315;7520;11/2/2001 14:50:00;CIDADAO COMUM;N;CS02;JOAO PINHEIRO;BH;604641.80;796156.88;1970
+1972;2001081434;B04002;HOMICIDIO CONSUM;RUA SAO GERALDO;54;62650;11/2/2001 15:06:00;CIDADAO COMUM;N;;NOVA CINTRA;BH;605798.69;794163.16;1971
+1973;2001081501;B03000;AMEACA;RUA CORONEL REMI;367;92928;11/2/2001 15:55:00;CIDADAO COMUM;S;;VILA MARAVILHAS;BH;603166.34;795066.83;1972
+1974;2001081528;B03000;AMEACA;RUA EVARISTO DA ;335;26922;11/2/2001 16:11:00;CIDADAO COMUM;S;;PRADO LOPES;BH;610037.93;798652.33;1973
+1975;2001081588;B03000;AMEACA;RUA COPERNICO PI;78;6630;11/2/2001 16:52:00;CIDADAO COMUM;S;BECO E;SANTO ANTONIO;BH;610449.69;793640.03;1974
+1976;2001081620;B02000;RIXA;RUA RIO DAS FLOR;170;92770;11/2/2001 17:10:00;CIDADAO COMUM;N;;PILAR;BH;607837.36;788169.94;1975
+1977;2001081676;B03000;AMEACA;RUA NARCISO PERE;141;78267;11/2/2001 17:38:00;CIDADAO COMUM;S;CAB;VILA PINHO;BH;601878.96;788485.35;1976
+1978;2001081694;B06000;LESAO CORPORAL;RUA MARIA DA CON;243;107881;11/2/2001 17:42:00;CIDADAO COMUM;S;;MANTIQUEIRA;BH;606570.12;811671.60;1977
+1979;2001081699;B04001;HOMICIDIO TENTAD;AV DOM PEDRO I;3083;48337;11/2/2001 17:44:00;CIDADAO COMUM;N;;PLANALTO;BH;609678.52;807952.23;1978
+1980;2001081773;B06000;LESAO CORPORAL;RUA GRAO MOGOL;197;31769;11/2/2001 18:20:00;CIDADAO COMUM;N;0;CARMO;BH;611788.50;794682.45;1979
+1981;2001081799;B02000;RIXA;RUA RIO DE JANEI;282;58772;11/2/2001 18:35:00;CIDADAO COMUM;S;FR;CENTRO (BH);BH;611181.78;797418.31;1980
+1982;2001081850;B04001;HOMICIDIO TENTAD;RUA ARTUR DE SA;939;6211;11/2/2001 18:58:00;CIDADAO COMUM;N;;UNIAO;BH;612733.03;801920.16;1981
+1983;2001081899;B04001;HOMICIDIO TENTAD;AV SILVA LOBO;1710;65889;11/2/2001 19:17:00;CIDADAO COMUM;S;;GRAJAU;BH;608050.43;794902.40;1982
+1984;2001081904;B04001;HOMICIDIO TENTAD;RUA DOMINGOS ROC;123;22631;11/2/2001 19:20:00;CIDADAO COMUM;S;;SALGADO FILHO;BH;606553.35;795142.98;1983
+1985;2001081928;B06000;LESAO CORPORAL;RUA SABINO JOSE ;207;118210;11/2/2001 19:34:00;CIDADAO COMUM;S;;TIROL;BH;599914.84;789810.06;1984
+1986;2001081946;B04001;HOMICIDIO TENTAD;RUA ARACY DE ALM;211;85648;11/2/2001 19:41:00;CIDADAO COMUM;S;0;GOIANIA;BH;614914.01;803850.11;1985
+1987;2001081962;B04001;HOMICIDIO TENTAD;RUA D;81;79764;11/2/2001 19:51:00;CIDADAO COMUM;S;0;JARDIM VITORIA;BH;616942.69;804583.48;1986
+1988;2001081965;B06000;LESAO CORPORAL;RUA MARIA ROSA D;31;14591;11/2/2001 19:54:00;CIDADAO COMUM;N;;CH VALE DO JATOB;BH;600813.94;787318.13;1987
+1989;2001081977;B03000;AMEACA;RUA BENEDITO ANI;81;56244;11/2/2001 20:02:00;CIDADAO COMUM;N;;NOVA YORK;BH;608363.76;810624.49;1988
+1990;2001082021;B03000;AMEACA;RUA CINCO;14;302813;11/2/2001 20:22:00;CIDADAO COMUM;S;0;NOVO AARAO REIS;BH;614439.74;805916.30;1989
+1991;2001082123;B06000;LESAO CORPORAL;RUA GENERAL SAMP;110;30927;11/2/2001 21:22:00;INICIATIVA;S;0;POMPEIA;BH;614275.40;798137.47;1990
+1992;2001082126;B06000;LESAO CORPORAL;RUA HESPERIA;516;33260;11/2/2001 21:22:00;CIDADAO COMUM;S;0;PARQUE RIACHUELO;BH;609757.21;800624.53;1991
+1993;2001082143;B03000;AMEACA;RUA MAJOR DELFIN;3143;42620;11/2/2001 21:31:00;CIDADAO COMUM;S;0;APARECIDA SETIMA;BH;608575.21;800912.64;1992
+1994;2001082148;B03000;AMEACA;RUA PONTA PORA;35;54601;11/2/2001 21:35:00;CIDADAO COMUM;N;0;SANTA EFIGENIA;BH;613128.09;796821.54;1993
+1995;2001082159;B03000;AMEACA;RUA CAMILO GOMES;395;11902;11/2/2001 21:38:00;CIDADAO COMUM;S;CAFR;ITAIPU BH;BH;599526.34;789343.98;1994
+1996;2001082160;B03000;AMEACA;RUA TIBIRICA;20;67613;11/2/2001 21:40:00;CIDADAO COMUM;S;;JARDIM AMERICA;BH;608290.82;794241.49;1995
+1997;2001082258;B03000;AMEACA;RUA BRAS;20;170835;11/2/2001 22:23:00;CIDADAO COMUM;S;;MORRO DAS PEDRAS;BH;608019.79;793890.35;1996
+1998;2001082266;B06000;LESAO CORPORAL;RUA UM;29;302808;11/2/2001 22:28:00;CIDADAO COMUM;S;;NOVO AARAO REIS;BH;614345.23;805792.20;1997
+1999;2001082309;B03000;AMEACA;RUA JANUARIA;480;36936;11/2/2001 22:50:00;CIDADAO COMUM;S;AP402;FLORESTA;BH;611701.44;798121.30;1998
+2000;2001082331;B03000;AMEACA;RUA INTERNA;88;34666;11/2/2001 23:06:00;CIDADAO COMUM;S;;MAGNESITA;BH;603921.34;793691.32;1999
+2001;2001082378;B06000;LESAO CORPORAL;RUA ITABERA;115;35224;11/2/2001 23:27:00;CIDADAO COMUM;N;AP03;SANTA EFIGENIA;BH;614248.22;797046.89;2000
+2002;2001082448;B03000;AMEACA;RUA DURVALIA;100;115704;12/2/2001 00:00:00;CIDADAO COMUM;N;;HAVAI;BH;607390.14;793424.75;2001
+2003;2001082462;B06000;LESAO CORPORAL;RUA CINQUENTA E ;348;106201;12/2/2001 00:16:00;CIDADAO COMUM;N;0;NOVA YORK;BH;608638.63;810805.70;2002
+2004;2001082465;B04001;HOMICIDIO TENTAD;PRACA ESMERALDA;10;25932;12/2/2001 00:19:00;CIDADAO COMUM;N;0;PIRAJA;BH;613180.37;803029.37;2003
+2005;2001082468;B06000;LESAO CORPORAL;RUA STA JULIANA;259;60829;12/2/2001 00:20:00;CIDADAO COMUM;S;;SALGADO FILHO;BH;606335.02;794528.18;2004
+2006;2001082508;B04002;HOMICIDIO CONSUM;RUA MODELO;371;46026;12/2/2001 00:56:00;INICIATIVA;N;0;SUZANA;BH;612016.08;802934.75;2005
+2007;2001082548;B05000;SEQUESTRO E CARC;RUA CONCEICAO DO;55;21106;12/2/2001 01:17:00;INICIATIVA;S;0;OURO PRETO;BH;606837.86;802480.63;2006
+2008;2001082579;B06000;LESAO CORPORAL;AV DOUTOR CRISTI;862;62459;12/2/2001 01:49:00;INICIATIVA;N;0;PLANALTO;BH;609793.27;807173.69;2007
+2009;2001082983;B03000;AMEACA;RUA JOAO AFONSO ;407;7457;12/2/2001 09:22:00;CIDADAO COMUM;S;0;OURO PRETO;BH;606679.76;802575.31;2008
+2010;2001083030;B03000;AMEACA;RUA CINCO;14;302813;12/2/2001 09:47:00;CIDADAO COMUM;S;;NOVO AARAO REIS;BH;614439.74;805916.30;2009
+2011;2001083044;B03000;AMEACA;RUA FRUTAL;319;30060;12/2/2001 09:54:00;CIDADAO COMUM;S;AP203;SANTA EFIGENIA;BH;613765.93;796775.54;2010
+2012;2001083112;B04001;HOMICIDIO TENTAD;RUA DOS BANDOLIN;114;106980;12/2/2001 10:39:00;CIDADAO COMUM;N;0;CH CALIFORNIA;BH;604133.35;796768.11;2011
+2013;2001083142;B06000;LESAO CORPORAL;AV DO CONTORNO;1542;17228;12/2/2001 11:01:00;INICIATIVA;S;0;FLORESTA;BH;612129.40;797743.70;2012
+2014;2001083167;B06000;LESAO CORPORAL;AV CLARA NUNES;822;45644;12/2/2001 11:16:00;CIDADAO COMUM;S;;CACHOEIRINHA;BH;611029.42;801039.87;2013
+2015;2001083307;B04002;HOMICIDIO CONSUM;RUA DOUTOR ALIPI;25;2365;12/2/2001 12:42:00;CIDADAO COMUM;N;0;SERRA;BH;613823.09;794921.03;2014
+2016;2001083403;B03000;AMEACA;RUA ITAQUERA;587;35920;12/2/2001 13:48:00;CIDADAO COMUM;S;;CONCORDIA;BH;611337.87;799230.32;2015
+2017;2001083469;B06000;LESAO CORPORAL;RUA WENCESLAU BR;77;73727;12/2/2001 14:26:00;CIDADAO COMUM;S;;COPACABANA;BH;606339.57;806993.12;2016
+2018;2001083505;B04002;HOMICIDIO CONSUM;AV OLEGARIO MACI;1611;49699;12/2/2001 14:43:00;CIDADAO COMUM;N;0;CENTRO (BH);BH;610311.35;796159.61;2017
+2019;2001083547;B03000;AMEACA;RUA ITAPARICA;221;35731;12/2/2001 15:14:00;CIDADAO COMUM;N;;SERRA;BH;613007.39;795346.68;2018
+2020;2001083570;B06000;LESAO CORPORAL;RUA CARLOS ETIEN;13;13356;12/2/2001 15:32:00;CIDADAO COMUM;S;;SERRA;BH;613992.00;794863.88;2019
+2021;2001083573;B06000;LESAO CORPORAL;AV BARAO HOMEM D;1997;7936;12/2/2001 15:34:00;CIDADAO COMUM;N;;LEONINA;BH;608163.53;793322.71;2020
+2022;2001083664;B06000;LESAO CORPORAL;RUA PADRE PETROL;1160;53577;12/2/2001 16:35:00;CIDADAO COMUM;N;AP205;SAGRADA FAMILIA;BH;613590.37;798532.20;2021
+2023;2001083681;B06000;LESAO CORPORAL;AV FRANCISCO SA;1409;29656;12/2/2001 16:45:00;CIDADAO COMUM;S;;GUTIERREZ;BH;608968.06;795431.45;2022
+2024;2001083794;B06000;LESAO CORPORAL;RUA DA BAHIA;380;81155;12/2/2001 17:42:00;CIDADAO COMUM;S;PX380;CENTRO (BH);BH;611423.82;797248.36;2023
+2025;2001083842;B04001;HOMICIDIO TENTAD;RUA VILA RICA;1989;71992;12/2/2001 18:12:00;CIDADAO COMUM;N;BL1     AP104;JARDIM MONTANHES;BH;606729.96;798841.80;2024
+2026;2001084077;B06000;LESAO CORPORAL;RUA MIOSOTIS;180;45859;12/2/2001 21:02:00;CIDADAO COMUM;N;;SANTO ANDRE;BH;608901.95;798729.73;2025
+2027;2001084081;B06000;LESAO CORPORAL;RUA EPAMINONDAS ;65;25696;12/2/2001 21:04:00;CIDADAO COMUM;S;;VISTA ALEGRE;BH;604476.95;793805.73;2026
+2028;2001084102;B03000;AMEACA;RUA JOAO PINTO;15;105542;12/2/2001 21:23:00;CIDADAO COMUM;S;APT301;JARDINOPOLIS;BH;605029.47;794803.37;2027
+2029;2001084181;B03000;AMEACA;RUA JOSE DE OLIV;22;63161;12/2/2001 22:12:00;CIDADAO COMUM;N;;ARAGUAIA;BH;604028.76;790381.13;2028
+2030;2001084207;B02000;RIXA;RUA ITANHAEM;345;100173;12/2/2001 22:34:00;INICIATIVA;S;0;PIRATININGA;BH;605634.00;808953.53;2029
+2031;2001084253;B03000;AMEACA;RUA DEMOCRITO;58;26078;12/2/2001 23:07:00;CIDADAO COMUM;S;;BELMONT;BH;615545.74;804744.99;2030
+2032;2001084510;B06000;LESAO CORPORAL;RUA JULIO DE CAS;1132;39470;13/2/2001 03:50:00;CIDADAO COMUM;S;0;CINQUENTENARIO;BH;606683.66;792194.71;2031
+2033;2001084532;B06000;LESAO CORPORAL;AV CIVILIZACAO;889;51657;13/2/2001 04:35:00;INICIATIVA;S;0;JARDIM FLORENCIA;BH;609155.17;808648.71;2032
+2034;2001084876;B04001;HOMICIDIO TENTAD;RUA FLOR DE VIDR;5;13504;13/2/2001 10:45:00;CIDADAO COMUM;N;0;CASTELO;BH;605642.59;799384.30;2033
+2035;2001084975;B04001;HOMICIDIO TENTAD;RUA PACIFICO CAR;250;93426;13/2/2001 12:08:00;INICIATIVA;N;0;INDEPENDENCIA;BH;602007.04;786043.55;2034
+2036;2001085018;B03000;AMEACA;AV AUGUSTO DE LI;486;6731;13/2/2001 12:35:00;CIDADAO COMUM;S;AP403;CENTRO (BH);BH;610871.39;796677.01;2035
+2037;2001085062;B03000;AMEACA;RUA SERRINHA;19;129201;13/2/2001 13:14:00;CIDADAO COMUM;S;0;INDEPENDENCIA;BH;600519.25;786719.95;2036
+2038;2001085080;B06000;LESAO CORPORAL;RUA ACUCENAS;70;892;13/2/2001 13:31:00;CIDADAO COMUM;S;;NOVA SUISSA;BH;607357.83;795794.04;2037
+2039;2001085093;B03000;AMEACA;RUA MONSENHOR PA;101;46329;13/2/2001 13:35:00;CIDADAO COMUM;N;0;VISTA ALEGRE;BH;604816.75;793484.58;2038
+2040;2001085141;B06000;LESAO CORPORAL;RUA RAIMUNDO CEZ;45;130280;13/2/2001 14:09:00;CIDADAO COMUM;S;;CASTANHEIRA 2;BH;601563.68;788756.45;2039
+2041;2001085182;B06000;LESAO CORPORAL;AV LUXEMBURGO;9;127612;13/2/2001 14:39:00;INICIATIVA;N;0;JARDIM EUROPA;BH;607808.50;810256.46;2040
+2042;2001085186;B03000;AMEACA;RUA ITAMAR;230;35527;13/2/2001 14:42:00;CIDADAO COMUM;N;0;VERA CRUZ;BH;616310.09;798514.15;2041
+2043;2001085206;B03000;AMEACA;RUA IRLANDA;51;35063;13/2/2001 15:00:00;POLICIAL MILITAR;N;0;ITAPOA;BH;608317.79;805800.24;2042
+2044;2001085210;B03000;AMEACA;RUA JOAO ALEXAND;267;71384;13/2/2001 15:07:00;CIDADAO COMUM;N;;MILIONARIOS;BH;603980.36;789980.34;2043
+2045;2001085222;B03000;AMEACA;RUA CARVALHO DE ;59;13810;13/2/2001 15:11:00;CIDADAO COMUM;S;CAB;BOA VISTA;BH;614427.79;799810.56;2044
+2046;2001085244;B06000;LESAO CORPORAL;RUA DAVIDSON PIM;440;124189;13/2/2001 15:22:00;CIDADAO COMUM;S;0;TOPAZIO;BH;607419.22;811909.65;2045
+2047;2001085305;B03000;AMEACA;RUA MILTON VIEIR;80;45786;13/2/2001 15:53:00;CIDADAO COMUM;S;0;CIDADE NOVA;BH;612458.82;800064.95;2046
+2048;2001085421;B08000;VIOLACAO DE DOMI;RUA DONA NAIR;120;22962;13/2/2001 17:11:00;CIDADAO COMUM;S;;DAS INDUSTRIAS;BH;604635.38;792141.95;2047
+2049;2001085596;B03000;AMEACA;RUA PLATAO;180;63187;13/2/2001 18:48:00;CIDADAO COMUM;S;;NAZARE;BH;615718.21;804422.79;2048
+2050;2001085644;B03000;AMEACA;RUA LEO MARENTE;112;94807;13/2/2001 19:21:00;CIDADAO COMUM;N;0;JARDIM MONTANHES;BH;606371.05;799398.56;2049
+2051;2001085724;B03000;AMEACA;RUA CONSELHEIRO ;2015;17041;13/2/2001 20:05:00;CIDADAO COMUM;S;0;SAGRADA FAMILIA;BH;612870.41;799864.95;2050
+2052;2001085727;B06000;LESAO CORPORAL;RUA DEZESSETE;130;32862;13/2/2001 20:07:00;CIDADAO COMUM;N;0;CONJUNTO FELICID;BH;612198.23;807435.95;2051
+2053;2001085789;B03000;AMEACA;RUA FERNAO DIAS;1022;28133;13/2/2001 20:48:00;INICIATIVA;N;0;VERA CRUZ;BH;616049.67;798294.87;2052
+2054;2001085814;B03000;AMEACA;RUA ITANHAEM;345;100173;13/2/2001 21:10:00;CIDADAO COMUM;S;0;PIRATININGA;BH;605634.00;808953.53;2053
+2055;2001085825;B06000;LESAO CORPORAL;RUA FRANCISCO BI;1590;29353;13/2/2001 21:13:00;CIDADAO COMUM;S;AP203;MONSENHOR MESSIA;BH;607087.58;798304.09;2054
+2056;2001085836;B04001;HOMICIDIO TENTAD;BECO HELIOTERIO;12;170863;13/2/2001 21:26:00;INICIATIVA;S;0;LEONINA;BH;608284.91;793801.92;2055
+2057;2001085869;B03000;AMEACA;RUA JOSE FERNAND;122;119948;13/2/2001 21:52:00;CIDADAO COMUM;S;0;SAO GERALDO;BH;616040.45;799464.74;2056
+2058;2001085875;B06000;LESAO CORPORAL;RUA SAO TOMAS DE;133;63782;13/2/2001 21:58:00;CIDADAO COMUM;S;;SAO PEDRO;BH;610990.24;793846.72;2057
+2059;2001085899;B04001;HOMICIDIO TENTAD;RUA VILA ISABEL;25;84370;13/2/2001 22:10:00;CIDADAO COMUM;S;0;VILA SANTA BRANC;BH;605053.21;809820.25;2058
+2060;2001085961;B06000;LESAO CORPORAL;RUA CHAPINHA;170;15061;13/2/2001 22:56:00;CIDADAO COMUM;N;;JARDINOPOLIS;BH;604518.33;794265.31;2059
+2061;2001085976;B06000;LESAO CORPORAL;RUA PINTOR RENAT;258;26617;13/2/2001 23:03:00;CIDADAO COMUM;S;;TUPI;BH;613981.53;805995.61;2060
+2062;2001085979;B06000;LESAO CORPORAL;RUA MARIA BEATRI;54;43881;13/2/2001 23:04:00;CIDADAO COMUM;N;0;HAVAI;BH;606696.13;793615.49;2061
+2063;2001086053;B04002;HOMICIDIO CONSUM;AV UM;595;301245;13/2/2001 23:45:00;CIDADAO COMUM;S;0;NOVO AARAO REIS;BH;614648.71;805739.64;2062
+2064;2001086084;B06000;LESAO CORPORAL;RUA NUBIA REZEND;278;97950;14/2/2001 00:10:00;CIDADAO COMUM;N;0;DOM SILVERIO;BH;615162.22;804356.62;2063
+2065;2001086115;B03000;AMEACA;RUA ARIOLINO ARI;192;85811;14/2/2001 00:38:00;CIDADAO COMUM;S;;SERRA VERDE;BH;609175.05;810135.20;2064
+2066;2001086131;B03000;AMEACA;RUA CORNELIA;172;17404;14/2/2001 00:57:00;CIDADAO COMUM;S;;DOM JOAQUIM;BH;613726.12;801994.35;2065
+2067;2001086263;B04002;HOMICIDIO CONSUM;AV BARAO HOMEM D;1280;7936;14/2/2001 03:49:00;CIDADAO COMUM;N;PX1280;JARDIM AMERICA;BH;607865.97;794285.50;2066
+2068;2001086280;B06000;LESAO CORPORAL;RUA DES BARCELOS;574;19904;14/2/2001 04:08:00;CIDADAO COMUM;S;;NOVA SUISSA;BH;607344.70;796068.28;2067
+2069;2001086355;B03000;AMEACA;RUA DINIS DIAS;389;119673;14/2/2001 07:04:00;CIDADAO COMUM;N;;VERA CRUZ;BH;616573.20;797526.82;2068
+2070;2001086372;B06000;LESAO CORPORAL;RUA MICHEL GARIB;219;85490;14/2/2001 07:17:00;CIDADAO COMUM;N;;MINASCAIXA;BH;608812.41;809462.99;2069
+2071;2001086380;B03000;AMEACA;RUA SERRA DA MOE;161;120796;14/2/2001 07:21:00;CIDADAO COMUM;N;AP201;ANTONIO RIBEIRO ;BH;614997.56;807384.95;2070
+2072;2001086619;B03000;AMEACA;RUA SALINAS;432;59992;14/2/2001 10:04:00;CIDADAO COMUM;S;0;FLORESTA;BH;612149.51;798050.73;2071
+2073;2001086645;B03000;AMEACA;RUA FLOR DE LIMA;16;23810;14/2/2001 10:20:00;CIDADAO COMUM;S;0;FILADELFIA;BH;602168.34;797463.32;2072
+2074;2001086693;B03000;AMEACA;RUA PIRAQUARA;320;54189;14/2/2001 10:49:00;CIDADAO COMUM;S;;VILA OESTE;BH;604522.65;795351.05;2073
+2075;2001086791;B03000;AMEACA;AV AUGUSTO DE LI;215;6731;14/2/2001 12:15:00;INICIATIVA;S;;CENTRO (BH);BH;611184.43;796546.36;2074
+2076;2001086853;B03000;AMEACA;RUA PRINCESA LEO;220;55327;14/2/2001 13:08:00;CIDADAO COMUM;S;;IPIRANGA;BH;611610.24;801056.09;2075
+2077;2001086872;B06000;LESAO CORPORAL;RUA PADRE ADOLFO;79;85332;14/2/2001 13:31:00;INICIATIVA;N;0;MINASCAIXA;BH;609204.95;809728.62;2076
+2078;2001086890;B03000;AMEACA;RUA ROGERIO APAR;100;96682;14/2/2001 13:44:00;POLICIAL MILITAR;S;SOL PM/SOMENTE R;ANTONIO RIBEIRO ;BH;615004.45;806026.02;2077
+2079;2001086902;B03000;AMEACA;RUA ACALIFA;209;98385;14/2/2001 13:53:00;CIDADAO COMUM;S;;JULIANA;BH;611057.85;809064.48;2078
+2080;2001087048;B03000;AMEACA;AV URUGUAI;335;71113;14/2/2001 15:31:00;CIDADAO COMUM;S;SL14;SION;BH;611750.13;793745.62;2079
+2081;2001087196;B03000;AMEACA;RUA AMANDO COUTO;230;3037;14/2/2001 16:53:00;CIDADAO COMUM;N;SL101;SAO TOMAZ;BH;609922.73;805494.21;2080
+2082;2001087204;B03000;AMEACA;AV SIDERAL;371;65721;14/2/2001 16:58:00;CIDADAO COMUM;S;0;VISTA ALEGRE;BH;604340.08;793439.54;2081
+2083;2001087261;B03000;AMEACA;RUA GETULIO DRUM;155;26040;14/2/2001 17:25:00;CIDADAO COMUM;S;;NOVA CINTRA;BH;605566.99;793350.25;2082
+2084;2001087335;B03000;AMEACA;RUA STA CATARINA;352;60400;14/2/2001 18:16:00;POLICIAL MILITAR;N;0;CENTRO (BH);BH;610547.19;796653.24;2083
+2085;2001087379;B06000;LESAO CORPORAL;AV SERRANA;647;65040;14/2/2001 18:36:00;CIDADAO COMUM;S;LJ6;SERRANO;BH;603476.59;801568.74;2084
+2086;2001087398;B04001;HOMICIDIO TENTAD;RUA PROFESSORA G;450;86335;14/2/2001 18:49:00;CIDADAO COMUM;S;0;FLORAMAR;BH;611770.58;807594.40;2085
+2087;2001087466;B03000;AMEACA;RUA H;440;78295;14/2/2001 19:22:00;CIDADAO COMUM;S;;VILA PINHO;BH;602017.92;788016.06;2086
+2088;2001087483;B03000;AMEACA;RUA F;85;302327;14/2/2001 19:38:00;CIDADAO COMUM;S;;BONSUCESSO;BH;606318.82;789810.40;2087
+2089;2001087486;B04001;HOMICIDIO TENTAD;RUA OSCAR NEGRAO;29;17776;14/2/2001 19:42:00;CIDADAO COMUM;S;;GAMELEIRA;BH;605045.53;795084.05;2088
+2090;2001087493;B03000;AMEACA;RUA JOSE DE ALEN;269;82274;14/2/2001 19:43:00;CIDADAO COMUM;S;;GUARANI;BH;611909.31;804949.94;2089
+2091;2001087596;B03000;AMEACA;RUA SERENATA;68;172351;14/2/2001 20:37:00;CIDADAO COMUM;S;;VILA CAFEZAL;BH;614101.09;795309.49;2090
+2092;2001087611;B06000;LESAO CORPORAL;RUA SAO PAULO;409;63464;14/2/2001 20:47:00;CIDADAO COMUM;N;0;CENTRO (BH);BH;611057.56;797364.72;2091
+2093;2001087632;B06000;LESAO CORPORAL;RUA GERALDO ILID;283;107680;14/2/2001 20:56:00;CIDADAO COMUM;N;;MANTIQUEIRA;BH;606527.82;812020.77;2092
+2094;2001087748;B02000;RIXA;RUA VEREADOR JUL;17;125456;14/2/2001 22:07:00;INICIATIVA;S;0;NOVA GAMELEIRA;BH;605709.31;795133.42;2093
+2095;2001087762;B06000;LESAO CORPORAL;RUA LAJEDO;335;130034;14/2/2001 22:10:00;CIDADAO COMUM;S;FU;SAO GABRIEL;BH;614399.48;804590.63;2094
+2096;2001087818;B02000;RIXA;AV CRISTIANO MAC;4000;18652;14/2/2001 22:50:00;INICIATIVA;N;0;DOS PALMARES;BH;612434.91;802092.92;2095
+2097;2001087866;B04001;HOMICIDIO TENTAD;RUA CARMELITA CO;100;93366;14/2/2001 23:14:00;POLICIAL MILITAR;S;0;MINEIRAO;BH;600997.54;785906.69;2096
+2098;2001087869;B06000;LESAO CORPORAL;RUA CRISTAL;312;18611;14/2/2001 23:16:00;CIDADAO COMUM;S;;SANTA TEREZA;BH;612754.03;797170.88;2097
+2099;2001087872;B03000;AMEACA;RUA NIQUELINA;892;47738;14/2/2001 23:17:00;INICIATIVA;N;0;SANTA EFIGENIA;BH;613866.59;797105.70;2098
+2100;2001087874;B05000;SEQUESTRO E CARC;RUA LUIZ BALENA;70;114796;14/2/2001 23:19:00;CIDADAO COMUM;N;AP201;VILA SILVEIRA;BH;611916.32;800099.52;2099
+2101;2001087892;B06000;LESAO CORPORAL;RUA ARAGUARI;525;5376;14/2/2001 23:26:00;CIDADAO COMUM;N;AP-1406;BARRO PRETO;BH;610030.23;796776.44;2100
+2102;2001087908;B03000;AMEACA;RUA ANGRA DOS RE;101;4027;14/2/2001 23:35:00;CIDADAO COMUM;N;0;NOVA GRANADA;BH;607661.15;795094.51;2101
+2103;2001087946;B03000;AMEACA;AV DOM JOAO VI;1010;22294;15/2/2001 00:01:00;INICIATIVA;S;0;PALMEIRAS;BH;606644.46;791666.74;2102
+2104;2001087977;B03000;AMEACA;RUA MANOEL CAYLL;121;43043;15/2/2001 00:22:00;CIDADAO COMUM;S;;HORTO;BH;613259.68;798134.49;2103
+2105;2001088110;B06000;LESAO CORPORAL;RUA VOLTS;280;73626;15/2/2001 02:23:00;CIDADAO COMUM;S;;PRIMEIRO DE MAIO;BH;612030.29;803549.80;2104
+2106;2001088114;B06000;LESAO CORPORAL;BECO NOSSA SENHO;930;170113;15/2/2001 02:25:00;CIDADAO COMUM;N;3 AGUA;CAFEZAL;BH;614339.35;794970.47;2105
+2107;2001088177;B04001;HOMICIDIO TENTAD;RUA ITUMIRIM;16;36230;15/2/2001 03:56:00;CIDADAO COMUM;S;CSA;SANTA INES;BH;614584.65;800620.95;2106
+2108;2001088220;B06000;LESAO CORPORAL;RUA DOS GUARANIS;26;32181;15/2/2001 04:53:00;INICIATIVA;S;0;CENTRO (BH);BH;610757.73;797608.11;2107
+2109;2001088358;B03000;AMEACA;RUA CIRILO GASPA;326;63348;15/2/2001 08:10:00;CIDADAO COMUM;S;;APARECIDA SETIMA;BH;608684.85;800162.78;2108
+2110;2001088395;B09000;ABANDONO DE INCA;RUA JUNQUEIRA FR;20;39644;15/2/2001 08:37:00;CIDADAO COMUM;N;0;SANTA MONICA;BH;607163.35;807956.23;2109
+2111;2001088397;B03000;AMEACA;RUA RIO GRANDE D;708;58731;15/2/2001 08:36:00;CIDADAO COMUM;N;PX2300;FUNCIONARIOS;BH;611896.05;795752.13;2110
+2112;2001088614;B06000;LESAO CORPORAL;AV DOS ANDRADAS;356;3761;15/2/2001 10:53:00;INICIATIVA;S;0;CENTRO BH;BH;611480.30;797265.49;2111
+2113;2001088676;B03000;AMEACA;RUA CARANGOLA;228;13094;15/2/2001 11:44:00;CIDADAO COMUM;S;PX230;SANTO ANTONIO;BH;610754.02;794740.44;2112
+2114;2001088695;B04001;HOMICIDIO TENTAD;RUA ROSA ROCHA C;54;19453;15/2/2001 11:54:00;INICIATIVA;N;0;CARDOSO;BH;603554.58;788167.67;2113
+2115;2001088939;B06000;LESAO CORPORAL;RUA ANGOLA;790;4001;15/2/2001 15:19:00;CIDADAO COMUM;S;;SAO PAULO;BH;613029.32;802881.46;2114
+2116;2001089077;B03000;AMEACA;AV DO CONTORNO;1781;17228;15/2/2001 16:37:00;CIDADAO COMUM;N;0;CENTRO (BH);BH;612253.65;797644.51;2115
+2117;2001089086;B06000;LESAO CORPORAL;RUA UARIRA;350;70136;15/2/2001 16:40:00;CIDADAO COMUM;S;0;SAO GERALDO;BH;616162.91;799326.26;2116
+2118;2001089167;B03000;AMEACA;RUA DO LAGO;510;40161;15/2/2001 17:24:00;CIDADAO COMUM;S;;SAO MARCOS;BH;614189.26;802411.99;2117
+2119;2001089275;B03000;AMEACA;RUA NOVA ESPERAN;205;83898;15/2/2001 18:20:00;CIDADAO COMUM;S;CAC;CEU AZUL;BH;604285.81;807801.26;2118
+2120;2001089356;B04001;HOMICIDIO TENTAD;RUA CRISTIANO OT;212;29192;15/2/2001 18:53:00;CIDADAO COMUM;S;AP201;SANTA TEREZINHA;BH;604360.17;802644.76;2119
+2121;2001089401;B03000;AMEACA;RUA CONTENDAS;63;17215;15/2/2001 19:14:00;CIDADAO COMUM;S;0;BARROCA;BH;607701.63;795996.98;2120
+2122;2001089485;B03000;AMEACA;RUA DES SARAIVA;1075;66535;15/2/2001 20:03:00;CIDADAO COMUM;S;0;VERA CRUZ;BH;616101.45;797681.72;2121
+2123;2001089505;B03000;AMEACA;RUA GUAICUI;151;31999;15/2/2001 20:16:00;INICIATIVA;N;0;CORACAO DE JESUS;BH;609829.07;794224.02;2122
+2124;2001089636;B03000;AMEACA;AV RAJA GABAGLIA;1710;57830;15/2/2001 21:38:00;CIDADAO COMUM;S;;MORRO DAS PEDRAS;BH;608719.62;793771.09;2123
+2125;2001089652;B04001;HOMICIDIO TENTAD;AV MARIA CONCEIC;1356;32052;15/2/2001 21:52:00;CIDADAO COMUM;N;;GOIANIA;BH;615166.56;803057.27;2124
+2126;2001089657;B03000;AMEACA;RUA RADIALISTA M;330;98864;15/2/2001 21:53:00;CIDADAO COMUM;S;0;CEU AZUL;BH;604309.77;808868.97;2125
+2127;2001089658;B06000;LESAO CORPORAL;RUA PRATINHA;49;88485;15/2/2001 21:54:00;CIDADAO COMUM;S;CAC;CAICARA;BH;606915.08;799459.94;2126
+2128;2001089664;B03000;AMEACA;RUA ARAL;59;5389;15/2/2001 21:56:00;CIDADAO COMUM;S;;CH BETANIA;BH;605281.73;792385.15;2127
+2129;2001089665;B06000;LESAO CORPORAL;RUA CASTELO BRAN;110;14030;15/2/2001 21:56:00;CIDADAO COMUM;N;CAA;SANTA TEREZINHA;BH;604414.63;802592.40;2128
+2130;2001089677;B06000;LESAO CORPORAL;RUA ARARIBA;235;5540;15/2/2001 22:05:00;CIDADAO COMUM;N;;SAO CRISTOVAO;BH;610149.82;799166.33;2129
+2131;2001089724;B03000;AMEACA;RUA TRINTA E SET;31;34190;15/2/2001 22:32:00;CIDADAO COMUM;S;31;CONJUNTO FELICID;BH;612467.97;807431.31;2130
+2132;2001089766;B06000;LESAO CORPORAL;RUA JOAO PAULINO;50;87048;15/2/2001 23:01:00;CIDADAO COMUM;S;0;DA LAGOA;BH;604692.66;809030.76;2131
+2133;2001089832;B03000;AMEACA;RUA AROEIRA;892;81385;15/2/2001 23:35:00;INICIATIVA;S;0;SAO JOAO BATISTA;BH;610748.85;801927.11;2132
+2134;2001089909;B03000;AMEACA;AV CACHOEIRINHA;861;11250;16/2/2001 00:20:00;CIDADAO COMUM;S;0;CACHOEIRINHA;BH;610468.79;801301.88;2133
+2135;2001089951;B06000;LESAO CORPORAL;AV BRASIL;41;10420;16/2/2001 00:56:00;CIDADAO COMUM;N;;SANTA EFIGENIA;BH;612997.74;796618.26;2134
+2136;2001089970;B03000;AMEACA;AV OLINTO MEIREL;1400;49847;16/2/2001 01:07:00;INICIATIVA;S;0;SANTA HELENA (BH;BH;603611.60;790119.35;2135
+2137;2001089972;B03000;AMEACA;RUA PARAIBA;1255;52170;16/2/2001 01:09:00;INICIATIVA;S;0;FUNCIONARIOS;BH;611617.62;795132.74;2136
+2138;2001089982;B06000;LESAO CORPORAL;RUA ALFREDINA AM;135;2251;16/2/2001 01:21:00;CIDADAO COMUM;S;AN2;MILIONARIOS;BH;604399.69;790520.39;2137
+2139;2001090014;B04001;HOMICIDIO TENTAD;AV CORONEL DURVA;732;17688;16/2/2001 01:54:00;CIDADAO COMUM;S;;DURVAL DE BARROS;BH;598151.28;790894.64;2138
+2140;2001090047;B03000;AMEACA;RUA ATTILIO DE M;351;111630;16/2/2001 02:29:00;CIDADAO COMUM;S;CAA     FU;DIAMANTE;BH;601521.26;789910.34;2139
+2141;2001090073;B06000;LESAO CORPORAL;AV DO CONTORNO;6244;17228;16/2/2001 03:04:00;CIDADAO COMUM;N;;CENTRO (BH);BH;611257.58;794841.55;2140
+2142;2001090159;B02000;RIXA;RUA OURO PRETO;300;50730;16/2/2001 04:42:00;CIDADAO COMUM;N;0;BARRO PRETO;BH;609908.33;797015.97;2141
+2143;2001090187;B06000;LESAO CORPORAL;AV SANTOS DUMONT;680;61950;16/2/2001 05:42:00;INICIATIVA;N;0;CENTRO BH;BH;610999.13;797614.04;2142
+2144;2001090391;B03000;AMEACA;RUA E;70;130743;16/2/2001 08:50:00;CIDADAO COMUM;N;0;INSTITUTO AGRONO;BH;614047.53;799573.40;2143
+2145;2001090441;B03000;AMEACA;AV OLEGARIO MACI;698;49699;16/2/2001 09:29:00;CIDADAO COMUM;S;MERCADO NOVO;CENTRO (BH);BH;610483.21;797000.62;2144
+2146;2001090443;B03000;AMEACA;RUA JOSE OVIDIO ;970;10298;16/2/2001 09:30:00;CIDADAO COMUM;N;0;CARDOSO;BH;603504.94;787842.27;2145
+2147;2001090488;B03000;AMEACA;RUA ILHA DE MALT;90;20926;16/2/2001 10:15:00;INICIATIVA;N;0;SAO GABRIEL;BH;614020.17;803939.85;2146
+2148;2001090518;B03000;AMEACA;RUA IRMAOS RODRI;110;35108;16/2/2001 10:27:00;CIDADAO COMUM;N;;AARAO REIS;BH;613324.76;805089.21;2147
+2149;2001090564;B03000;AMEACA;RUA BEBEDOURO;80;128010;16/2/2001 10:50:00;CIDADAO COMUM;S;0;NOVA VISTA;BH;615701.66;800447.38;2148
+2150;2001090574;B06000;LESAO CORPORAL;RUA SAO RAFAEL;128;63580;16/2/2001 10:59:00;CIDADAO COMUM;S;FUNDOS;FLORESTA;BH;612235.40;798259.74;2149
+2151;2001090580;B03000;AMEACA;RUA SABINOPOLIS;391;59790;16/2/2001 11:03:00;INICIATIVA;N;0;CARLOS PRATES;BH;608912.23;798344.41;2150
+2152;2001090640;B04002;HOMICIDIO CONSUM;RUA ACALIFA;8;98385;16/2/2001 11:46:00;CIDADAO COMUM;S;ACAMPAMENTO MARI;JULIANA;BH;611001.95;809141.12;2151
+2153;2001090712;B06000;LESAO CORPORAL;RUA HORACIO DOLA;175;11565;16/2/2001 12:29:00;INICIATIVA;S;0;CEU AZUL;BH;604118.20;807543.82;2152
+2154;2001090756;B03000;AMEACA;RUA PITANGUI;33;54365;16/2/2001 13:05:00;CIDADAO COMUM;N;0;SAO CRISTOVAO;BH;610543.96;799415.99;2153
+2155;2001090775;B03000;AMEACA;RUA PADRE FEIJO;549;51326;16/2/2001 13:19:00;POLICIAL MILITAR;S;;SAUDADE;BH;615464.89;797595.09;2154
+2156;2001090908;B04001;HOMICIDIO TENTAD;RUA ALEXANDRITA;284;91304;16/2/2001 14:49:00;CIDADAO COMUM;S;;BETANIA;BH;605673.10;793001.80;2155
+2157;2001090915;B03000;AMEACA;RUA GETULIO DRUM;280;26040;16/2/2001 14:55:00;CIDADAO COMUM;S;;NOVA CINTRA;BH;605578.88;793232.64;2156
+2158;2001090916;B03000;AMEACA;RUA CAMILO DE BR;636;11896;16/2/2001 14:55:00;CIDADAO COMUM;S;0;PADRE EUSTAQUIO;BH;605855.99;798012.24;2157
+2159;2001090975;B03000;AMEACA;RUA PADRE JULIO ;1571;51496;16/2/2001 15:36:00;CIDADAO COMUM;S;0;VERA CRUZ;BH;616274.14;797626.03;2158
+2160;2001090979;B03000;AMEACA;RUA RAIMUNDO TIN;182;301229;16/2/2001 15:37:00;CIDADAO COMUM;S;;MORRO DO PAPAGAI;BH;610702.97;793142.76;2159
+2161;2001091133;B06000;LESAO CORPORAL;AV CHURCHILL;39;15222;16/2/2001 16:57:00;INICIATIVA;S;0;SANTA EFIGENIA;BH;613209.68;796790.66;2160
+2162;2001091142;B03000;AMEACA;RUA ANTONIO CARL;21;108670;16/2/2001 17:03:00;CIDADAO COMUM;S;;MINASCAIXA;BH;608872.80;809582.96;2161
+2163;2001091174;B06000;LESAO CORPORAL;RUA ARIOLINO ARI;159;85811;16/2/2001 17:15:00;CIDADAO COMUM;S;0;SERRA VERDE;BH;609207.39;810119.05;2162
+2164;2001091292;B06000;LESAO CORPORAL;AV PRUDENTE DE M;1965;55774;16/2/2001 18:22:00;CIDADAO COMUM;S;AP701;SANTO ANTONIO;BH;610208.70;793775.64;2163
+2165;2001091329;B06000;LESAO CORPORAL;RUA E;62;302329;16/2/2001 18:43:00;CIDADAO COMUM;S;0;BOM SUCESSO;BH;606194.00;789731.97;2164
+2166;2001091359;B03000;AMEACA;RUA FRANCELINA A;549;29265;16/2/2001 19:07:00;CIDADAO COMUM;S;;PIRAJA;BH;614287.13;803103.73;2165
+2167;2001091364;B06000;LESAO CORPORAL;RUA ITABIRA;450;35237;16/2/2001 19:11:00;INICIATIVA;S;0;LAGOINHA;BH;610968.63;798450.39;2166
+2168;2001091369;B06000;LESAO CORPORAL;RUA PARA DE MINA;845;52070;16/2/2001 19:14:00;INICIATIVA;N;0;PADRE EUSTAQUIO;BH;605807.00;797725.10;2167
+2169;2001091385;B03000;AMEACA;RUA DO CARMO;117;13646;16/2/2001 19:27:00;CIDADAO COMUM;S;0;ITAIPU BH;BH;598973.23;789319.66;2168
+2170;2001091400;B06000;LESAO CORPORAL;RUA ALVARO FERNA;148;102415;16/2/2001 19:37:00;INICIATIVA;S;0;VERA CRUZ;BH;616786.53;797450.04;2169
+2171;2001091428;B03000;AMEACA;RUA GRAVETEIRO;50;95853;16/2/2001 19:51:00;CIDADAO COMUM;N;;GOIANIA;BH;615297.87;802503.50;2170
+2172;2001091464;B03000;AMEACA;RUA ARISCO;152;74758;16/2/2001 20:14:00;CIDADAO COMUM;S;;JARDIM VITORIA;BH;616713.81;804674.58;2171
+2173;2001091477;B03000;AMEACA;RUA DAS PERPETUA;1071;911;16/2/2001 20:29:00;CIDADAO COMUM;N;0;LINDEIA;BH;599244.38;790367.98;2172
+2174;2001091483;B04001;HOMICIDIO TENTAD;RUA FREI MANOEL ;577;29974;16/2/2001 20:32:00;CIDADAO COMUM;S;BLB     AP902;LIBERDADE;BH;609905.49;803627.17;2173
+2175;2001091502;B06000;LESAO CORPORAL;RUA RIACHO;87;24927;16/2/2001 20:44:00;CIDADAO COMUM;N;0;TAQUARIL;BH;617229.41;797173.93;2174
+2176;2001091582;B03000;AMEACA;BECO PRIMEIRO DE;13;302438;16/2/2001 21:31:00;CIDADAO COMUM;S;CAB;MANTIQUEIRA;BH;606906.19;811699.13;2175
+2177;2001091604;B06000;LESAO CORPORAL;RUA ELOI MENDES;201;25277;16/2/2001 21:47:00;CIDADAO COMUM;S;;SAGRADA FAMILIA;BH;612761.04;798110.17;2176
+2178;2001091615;B03000;AMEACA;RUA PADRE MANOEL;143;51569;16/2/2001 21:52:00;CIDADAO COMUM;S;;SANTA EFIGENIA;BH;614135.75;796233.74;2177
+2179;2001091627;B06000;LESAO CORPORAL;RUA REGIA;207;58209;16/2/2001 22:05:00;CIDADAO COMUM;N;;NOVA CINTRA;BH;605661.54;794056.19;2178
+2180;2001091634;B03000;AMEACA;RUA BADARO JUNIO;15;7532;16/2/2001 22:09:00;CIDADAO COMUM;S;;PRIMEIRO DE MAIO;BH;612042.23;803554.37;2179
+2181;2001091663;B03000;AMEACA;RUA PROFESSOR RU;450;86754;16/2/2001 22:32:00;CIDADAO COMUM;N;CAB;JARDIM GUANABARA;BH;611585.01;807365.63;2180
+2182;2001091668;B03000;AMEACA;RUA DOS CACTOS;57;73119;16/2/2001 22:37:00;INICIATIVA;S;0;LINDEIA;BH;598831.75;791014.25;2181
+2183;2001091699;B04001;HOMICIDIO TENTAD;RUA FAISAO;700;27710;16/2/2001 22:48:00;POLICIAL MILITAR;N;0;FLAVIO MARQUES D;BH;605210.94;788677.86;2182
+2184;2001091769;B03000;AMEACA;AV SETE DE ABRIL;519;65560;16/2/2001 23:29:00;CIDADAO COMUM;S;;ESPLANADA;BH;614504.08;798488.31;2183
+2185;2001091779;B06000;LESAO CORPORAL;RUA JOSE BARBOSA;157;85304;16/2/2001 23:32:00;CIDADAO COMUM;S;;JAQUELINE;BH;610514.81;810125.87;2184
+2186;2001091815;B06000;LESAO CORPORAL;RUA 35;42;302833;17/2/2001 00:00:00;CIDADAO COMUM;S;0;NOVO AARAO REIS;BH;613934.25;805520.40;2185
+2187;2001091831;B04002;HOMICIDIO CONSUM;RUA FAUSTINO ASS;148;27824;17/2/2001 00:05:00;CIDADAO COMUM;N;0;MAGNESITA;BH;604163.70;793810.66;2186
+2188;2001091840;B03000;AMEACA;RUA JOSE ROMANO;121;15796;17/2/2001 00:14:00;CIDADAO COMUM;S;;SAO JOSE;BH;605134.23;798826.00;2187
+2189;2001091851;B06000;LESAO CORPORAL;RUA JOSE BARBOSA;517;85304;17/2/2001 00:22:00;CIDADAO COMUM;N;0;JAQUELINE;BH;610735.42;810323.17;2188
+2190;2001091864;B06000;LESAO CORPORAL;RUA BANDONION;211;170139;17/2/2001 00:30:00;CIDADAO COMUM;S;PX472;VILA CAFEZAL;BH;614041.90;794984.61;2189
+2191;2001091883;B03000;AMEACA;RUA BANDONION;79;170139;17/2/2001 00:40:00;INICIATIVA;N;0;VILA CAFEZAL;BH;614016.06;795069.25;2190
+2192;2001091884;B06000;LESAO CORPORAL;RUA DONA LUCI;408;86004;17/2/2001 00:41:00;INICIATIVA;N;0;CINQUENTENARIO;BH;606438.83;791862.80;2191
+2193;2001091942;B04001;HOMICIDIO TENTAD;AV BRIGADEIRO ED;870;2860;17/2/2001 01:11:00;CIDADAO COMUM;S;0;GLORIA;BH;604398.53;798513.15;2192
+2194;2001091999;B03000;AMEACA;RUA ESTRELA;26;86310;17/2/2001 01:45:00;CIDADAO COMUM;N;0;CELESTINO;BH;610886.12;808672.60;2193
+2195;2001092003;B03000;AMEACA;RUA HELVECIO MON;97;33001;17/2/2001 01:48:00;CIDADAO COMUM;N;;VILA OESTE;BH;604410.60;795565.96;2194
+2196;2001092030;B06000;LESAO CORPORAL;AV SINFRONIO BRO;350;66116;17/2/2001 02:07:00;CIDADAO COMUM;N;0;BARREIRO;BH;603002.38;790928.20;2195
+2197;2001092056;B03000;AMEACA;RUA PARA DE MINA;139;52070;17/2/2001 02:21:00;CIDADAO COMUM;N;;PADRE EUSTAQUIO;BH;606589.43;797648.14;2196
+2198;2001092069;B03000;AMEACA;RUA CONTAGEM;1600;70293;17/2/2001 02:35:00;CIDADAO COMUM;S;;SANTA INES;BH;614360.04;801201.70;2197
+2199;2001092115;B06000;LESAO CORPORAL;RUA SAO PAULO;279;63464;17/2/2001 02:59:00;CIDADAO COMUM;N;;CENTRO (BH);BH;611088.02;797493.26;2198
+2200;2001092138;B06000;LESAO CORPORAL;RUA PONTA GROSSA;905;14900;17/2/2001 03:18:00;CIDADAO COMUM;S;0;CRISTO REDENTOR;BH;604801.53;790245.22;2199
+2201;2001092142;B06000;LESAO CORPORAL;RUA QUARENTA E S;50;302841;17/2/2001 03:19:00;CIDADAO COMUM;S;;NOVO AARAO REIS;BH;614267.81;805802.32;2200
+2202;2001092155;B03000;AMEACA;RUA DR BROCHADO;16;23215;17/2/2001 03:28:00;CIDADAO COMUM;S;0;VERA CRUZ;BH;615833.96;798332.84;2201
+2203;2001092195;B04001;HOMICIDIO TENTAD;RUA TEBAS;401;67090;17/2/2001 03:47:00;INICIATIVA;N;0;VERA CRUZ;BH;615721.64;798265.77;2202
+2204;2001092237;B06000;LESAO CORPORAL;AV AUGUSTO DE LI;877;6731;17/2/2001 04:22:00;CIDADAO COMUM;N;0;BARRO PRETO;BH;610561.38;796714.77;2203
+2205;2001092245;B06000;LESAO CORPORAL;RUA PRELUDIO;239;101642;17/2/2001 04:30:00;CIDADAO COMUM;S;;SANTA AMELIA;BH;607538.25;806790.64;2204
+2206;2001092278;B06000;LESAO CORPORAL;RUA DOUTOR CRIST;312;55598;17/2/2001 05:14:00;CIDADAO COMUM;S;0;BONSUCESSO;BH;604751.25;789297.85;2205
+2207;2001092325;B03000;AMEACA;AV ITAITE;50;35441;17/2/2001 06:17:00;CIDADAO COMUM;S;;SAO GERALDO;BH;614822.25;799362.74;2206
+2208;2001092338;B03000;AMEACA;RUA CLOTILDE RIB;83;72507;17/2/2001 06:42:00;CIDADAO COMUM;S;;SAO JOAO BATISTA;BH;608840.66;807990.84;2207
+2209;2001092503;B03000;AMEACA;AV CECILIA PINTO;125;14447;17/2/2001 09:08:00;CIDADAO COMUM;N;;SAO BERNARDO;BH;610655.78;805320.47;2208
+2210;2001092544;B03000;AMEACA;RUA DO CAMPO;120;12136;17/2/2001 09:42:00;INICIATIVA;S;0;HAVAI;BH;607432.47;793601.64;2209
+2211;2001092547;B03000;AMEACA;RUA ERNESTO CARN;43;28099;17/2/2001 09:46:00;CIDADAO COMUM;N;CAA;PADRE EUSTAQUIO;BH;606439.90;797104.09;2210
+2212;2001092694;B03000;AMEACA;RUA AMERICA;41;3239;17/2/2001 11:46:00;CIDADAO COMUM;S;;SAO BERNARDO;BH;611091.64;804986.46;2211
+2213;2001092801;B06000;LESAO CORPORAL;RUA FERNAO GOMES;160;119705;17/2/2001 13:13:00;INICIATIVA;S;0;VERA CRUZ;BH;616951.95;797377.70;2212
+2214;2001092891;B06000;LESAO CORPORAL;RUA A;335;78673;17/2/2001 14:05:00;CIDADAO COMUM;N;;CH JATOBA IV;BH;600123.46;788004.17;2213
+2215;2001092911;B03000;AMEACA;RUA ITABERA;296;35224;17/2/2001 14:23:00;CIDADAO COMUM;N;;SANTA EFIGENIA;BH;614214.74;797171.59;2214
+2216;2001092913;B06000;LESAO CORPORAL;AV PRESIDENTE AN;758;4461;17/2/2001 14:21:00;CIDADAO COMUM;S;0;LAGOINHA;BH;610544.46;798745.75;2215
+2217;2001093016;B03000;AMEACA;AV PRUDENTE DE M;393;55774;17/2/2001 15:23:00;CIDADAO COMUM;S;LJ01;CIDADE JARDIM;BH;610187.86;794922.92;2216
+2218;2001093022;B04001;HOMICIDIO TENTAD;RUA JULIO DE CAS;1232;39470;17/2/2001 15:25:00;CIDADAO COMUM;N;;CINQUENTENARIO;BH;606605.39;792116.47;2217
+2219;2001093134;B06000;LESAO CORPORAL;RUA PONTA PORA;28;54601;17/2/2001 16:29:00;CIDADAO COMUM;S;;SANTA EFIGENIA;BH;613149.37;796815.00;2218
+2220;2001093139;B03000;AMEACA;RUA TULIPA;1274;69851;17/2/2001 16:30:00;INICIATIVA;S;0;ESPLANADA;BH;615286.17;798382.46;2219
+2221;2001093251;B06000;LESAO CORPORAL;RUA FLOR DA ROMA;88;23808;17/2/2001 17:35:00;CIDADAO COMUM;S;;VILA IPE;BH;605882.08;799902.76;2220
+2222;2001093260;B03000;AMEACA;RUA DAS PRINCESA;101;55330;17/2/2001 17:45:00;CIDADAO COMUM;N;;VILA OESTE;BH;604262.01;794976.39;2221
+2223;2001093305;B03000;AMEACA;RUA CINQUENTA E ;89;106201;17/2/2001 18:13:00;CIDADAO COMUM;S;;NOVA YORK;BH;608593.49;810710.03;2222
+2224;2001093338;B03000;AMEACA;RUA SAO JOAO DE ;285;110073;17/2/2001 18:29:00;CIDADAO COMUM;S;;PILAR;BH;607532.32;788462.72;2223
+2225;2001093342;B03000;AMEACA;RUA DOS VIOLINOS;123;101797;17/2/2001 18:32:00;CIDADAO COMUM;S;AP202;CH CALIFORNIA;BH;603794.84;796641.72;2224
+2226;2001093355;B03000;AMEACA;RUA MARIA APAREC;100;43853;17/2/2001 18:45:00;CIDADAO COMUM;S;0;SAO MARCOS;BH;613901.71;802711.93;2225
+2227;2001093370;B03000;AMEACA;RUA DUZENTOS E T;73;24536;17/2/2001 18:50:00;CIDADAO COMUM;S;0;CH VALE DO JATOB;BH;600454.11;787414.72;2226
+2228;2001093392;B03000;AMEACA;RUA SANTA FRANCI;685;60655;17/2/2001 19:03:00;CIDADAO COMUM;S;0;APARECIDA SETIMA;BH;608451.88;800571.03;2227
+2229;2001093398;B03000;AMEACA;RUA CAMASSARI;141;11754;17/2/2001 19:06:00;CIDADAO COMUM;S;0;BONSUCESSO;BH;605030.60;790317.84;2228
+2230;2001093401;B06000;LESAO CORPORAL;RUA WALTER IANNI;80;82186;17/2/2001 19:08:00;INICIATIVA;N;0;SAO GABRIEL;BH;613192.78;803761.07;2229
+2231;2001093468;B06000;LESAO CORPORAL;RUA ENCOSTA;12;20406;17/2/2001 19:45:00;CIDADAO COMUM;S;;SANTA MONICA;BH;607344.77;807411.00;2230
+2232;2001093531;B03000;AMEACA;RUA SAO MATIAS;320;63408;17/2/2001 20:13:00;CIDADAO COMUM;S;;SERRANO;BH;603539.80;800675.01;2231
+2233;2001093536;B02000;RIXA;RUA TOME DE SOUZ;935;67998;17/2/2001 20:15:00;CIDADAO COMUM;N;0;FUNCIONARIOS;BH;611457.69;795178.33;2232
+2234;2001093551;B04001;HOMICIDIO TENTAD;RUA BONFIM;641;10096;17/2/2001 20:21:00;CIDADAO COMUM;S;;BONFIM;BH;610151.96;798046.05;2233
+2235;2001093571;B06000;LESAO CORPORAL;RUA TOME DE SOUZ;935;67998;17/2/2001 20:32:00;INICIATIVA;S;0;FUNCIONARIOS;BH;611457.69;795178.33;2234
+2236;2001093618;B03000;AMEACA;RUA DOS TUPIS;1642;69965;17/2/2001 20:50:00;CIDADAO COMUM;S;;BARRO PRETO;BH;609682.21;797276.24;2235
+2237;2001093629;B03000;AMEACA;RUA JOSE JOAQUIM;255;38871;17/2/2001 20:54:00;CIDADAO COMUM;S;0;SANTA CRUZ;BH;610954.46;802060.45;2236
+2238;2001093645;B06000;LESAO CORPORAL;AV DO CONTORNO;1955;17228;17/2/2001 20:57:00;CIDADAO COMUM;S;FR;CENTRO (BH);BH;612342.06;797489.86;2237
+2239;2001093660;B06000;LESAO CORPORAL;RUA PAU FERRO;335;102138;17/2/2001 21:08:00;CIDADAO COMUM;S;0;SOLIMOES;BH;612656.52;807906.15;2238
+2240;2001093665;B03000;AMEACA;RUA GEORGINA PEN;150;31006;17/2/2001 21:07:00;CIDADAO COMUM;S;A;SAO LUCAS;BH;614133.28;795705.78;2239
+2241;2001093683;B03000;AMEACA;RUA BOA VISTA;235;170170;17/2/2001 21:17:00;CIDADAO COMUM;S;;CABANA;BH;604488.55;794283.53;2240
+2242;2001093691;B02000;RIXA;RUA CANDELARIA;95;12501;17/2/2001 21:20:00;CIDADAO COMUM;S;CAC;VILA OESTE;BH;604307.70;795241.24;2241
+2243;2001093702;B04001;HOMICIDIO TENTAD;ESTRADA DO CERCA;2090;26428;17/2/2001 21:24:00;CIDADAO COMUM;S;;JARDIM AMERICA;BH;607493.80;793552.14;2242
+2244;2001093794;B06000;LESAO CORPORAL;RUA BOAVENTURA;67;9783;17/2/2001 22:13:00;CIDADAO COMUM;S;;VILA INDAIA;BH;609601.28;804249.81;2243
+2245;2001093818;B03000;AMEACA;RUA VINTE E TRES;43;85550;17/2/2001 22:28:00;INICIATIVA;N;0;SERRA VERDE;BH;609894.94;810467.98;2244
+2246;2001093884;B06000;LESAO CORPORAL;RUA PORTO SEGURO;1331;60595;17/2/2001 23:07:00;CIDADAO COMUM;S;CAFR;NOVA VISTA;BH;615617.40;800842.65;2245
+2247;2001093995;B06000;LESAO CORPORAL;RUA TENENTE VITO;10;67351;17/2/2001 23:24:00;INICIATIVA;S;0;SANTA TEREZA;BH;613424.95;797503.01;2246
+2248;2001094047;B04001;HOMICIDIO TENTAD;RUA VINTE E SEIS;160;72780;17/2/2001 23:59:00;POLICIAL MILITAR;S;0;LEONINA;BH;608498.24;793329.27;2247
+2249;2001094074;B03000;AMEACA;RUA VIOLETA DE M;26;80253;18/2/2001 00:17:00;CIDADAO COMUM;S;0;SAO JOSE;BH;605328.14;799159.14;2248
+2250;2001094114;B03000;AMEACA;AV RAJA GABAGLIA;3500;57830;18/2/2001 00:48:00;INICIATIVA;N;0;ESTORIL;BH;609202.60;792327.00;2249
+2251;2001094130;B03000;AMEACA;RUA GABRO;412;30435;18/2/2001 00:59:00;CIDADAO COMUM;S;0;SANTA TEREZA;BH;612889.45;797274.75;2250
+2252;2001094202;B06000;LESAO CORPORAL;RUA JOAQUIM RAMO;587;38175;18/2/2001 01:37:00;CIDADAO COMUM;N;0;PARAISO;BH;614891.10;796559.44;2251
+2253;2001094203;B02000;RIXA;RUA URSULA PAULI;1619;71066;18/2/2001 01:38:00;CIDADAO COMUM;S;AP04;ESTRELA DO ORIEN;BH;605719.59;792476.26;2252
+2254;2001094232;B04002;HOMICIDIO CONSUM;RUA FLAMENGO;16;130601;18/2/2001 01:59:00;CIDADAO COMUM;N;0;LEBLON;BH;605783.10;809975.35;2253
+2255;2001094234;B04001;HOMICIDIO TENTAD;RUA SAO TOMAS DE;470;63782;18/2/2001 02:00:00;INICIATIVA;N;0;MORRO DO PAPAGAI;BH;610865.34;793549.62;2254
+2256;2001094241;B06000;LESAO CORPORAL;RUA BONFIM;513;10096;18/2/2001 02:05:00;CIDADAO COMUM;S;;BONFIM;BH;610224.47;797941.04;2255
+2257;2001094250;B03000;AMEACA;RUA U;5;27260;18/2/2001 02:14:00;CIDADAO COMUM;S;;PAULO SEXTO;BH;616607.44;806842.86;2256
+2258;2001094269;B03000;AMEACA;AV COLETORA;204;78241;18/2/2001 02:34:00;CIDADAO COMUM;S;;VILA PINHO;BH;601871.72;788550.76;2257
+2259;2001094271;B03000;AMEACA;AV DO CONTORNO;6001;17228;18/2/2001 02:35:00;INICIATIVA;S;0;CARMO;BH;611659.17;794835.24;2258
+2260;2001094303;B06000;LESAO CORPORAL;RUA CORONEL ANTO;245;17619;18/2/2001 03:02:00;CIDADAO COMUM;S;;REGINA;BH;599153.96;790105.62;2259
+2261;2001094354;B06000;LESAO CORPORAL;RUA RITMO;168;301436;18/2/2001 04:01:00;CIDADAO COMUM;N;;VILA CAFEZAL;BH;614143.53;795296.98;2260
+2262;2001094359;B06000;LESAO CORPORAL;RUA GUAICURUS;538;32009;18/2/2001 04:10:00;INICIATIVA;S;0;CENTRO BH;BH;611143.63;797659.74;2261
+2263;2001094388;B03000;AMEACA;RUA DUZENTOS E T;73;24536;18/2/2001 04:45:00;CIDADAO COMUM;S;0;CH VALE DO JATOB;BH;600454.11;787414.72;2262
+2264;2001094417;B03000;AMEACA;RUA EGITO;190;25189;18/2/2001 05:20:00;CIDADAO COMUM;S;0;SAO SALVADOR;BH;603437.23;799645.18;2263
+2265;2001094432;B04002;HOMICIDIO CONSUM;RUA CONDOR;445;16773;18/2/2001 05:38:00;CIDADAO COMUM;N;0;NOVA CINTRA;BH;605847.00;793807.25;2264
+2266;2001094434;B03000;AMEACA;RUA TRIPUI;20;69763;18/2/2001 05:42:00;CIDADAO COMUM;S;;GUARANI;BH;612802.62;805718.90;2265
+2267;2001094445;B02000;RIXA;AV SARAMENHA;720;64007;18/2/2001 06:01:00;INICIATIVA;N;0;FLORAMAR;BH;612541.25;805817.83;2266
+2268;2001094448;B04001;HOMICIDIO TENTAD;RUA GENERAL LADA;171;36520;18/2/2001 06:14:00;CIDADAO COMUM;N;CA3;GOIANIA;BH;615050.81;802764.73;2267
+2269;2001094466;B04002;HOMICIDIO CONSUM;BECO SANTO ANTON;58;302091;18/2/2001 06:49:00;CIDADAO COMUM;N;;VILA CALIFORNIA;BH;603966.86;797275.61;2268
+2270;2001094515;B03000;AMEACA;RUA SAO PEDRO DO;19;63842;18/2/2001 07:54:00;CIDADAO COMUM;S;0;PRIMEIRO DE MAIO;BH;612040.86;803799.62;2269
+2271;2001094559;B03000;AMEACA;RUA FLOR DA PAIX;42;28782;18/2/2001 08:35:00;CIDADAO COMUM;N;;JARDIM MONTANHES;BH;605881.83;799262.46;2270
+2272;2001094577;B03000;AMEACA;RUA CANARIO;703;50106;18/2/2001 08:50:00;CIDADAO COMUM;S;0;GOIANIA;BH;615544.37;803013.49;2271
+2273;2001094689;B06000;LESAO CORPORAL;RUA REGENCIA;100;301448;18/2/2001 10:29:00;INICIATIVA;S;0;VILA CAFEZAL;BH;614118.47;795470.66;2272
+2274;2001094709;B03000;AMEACA;RUA FREI LEOPOLD;153;29946;18/2/2001 10:40:00;CIDADAO COMUM;S;0;OURO PRETO;BH;606823.65;802833.82;2273
+2275;2001094815;B06000;LESAO CORPORAL;AV OLEGARIO MACI;5;49699;18/2/2001 12:01:00;CIDADAO COMUM;S;;CENTRO (BH);BH;610698.51;797640.81;2274
+2276;2001094854;B06000;LESAO CORPORAL;AV OIAPOQUE;264;49166;18/2/2001 12:30:00;CIDADAO COMUM;S;0;CENTRO (BH);BH;610918.13;797828.76;2275
+2277;2001094864;B04001;HOMICIDIO TENTAD;AV WALDIR SOEIRO;10;118904;18/2/2001 12:39:00;CIDADAO COMUM;N;0;MILIONARIOS;BH;603541.81;789510.67;2276
+2278;2001094868;B04001;HOMICIDIO TENTAD;RUA GENERAL OZOR;707;30901;18/2/2001 12:41:00;CIDADAO COMUM;N;0;VERA CRUZ;BH;615594.65;797934.45;2277
+2279;2001094874;B06000;LESAO CORPORAL;RUA PIRAPORA;99;54176;18/2/2001 12:44:00;CIDADAO COMUM;N;;SANTA EFIGENIA;BH;613695.01;796551.73;2278
+2280;2001094913;B06000;LESAO CORPORAL;RUA CONSELHEIRO ;3792;17095;18/2/2001 13:15:00;INICIATIVA;N;0;SAGRADA FAMILIA;BH;613741.51;798439.29;2279
+2281;2001094970;B06000;LESAO CORPORAL;RUA DALMI CECILI;144;101176;18/2/2001 13:55:00;CIDADAO COMUM;N;CSC;FLORAMAR;BH;610937.76;807364.76;2280
+2282;2001095011;B06000;LESAO CORPORAL;AV MEM DE SA;1728;45395;18/2/2001 14:20:00;INICIATIVA;S;0;FAZENDINHA;BH;614290.42;795998.55;2281
+2283;2001095020;B03000;AMEACA;RUA BONFIM;544;10096;18/2/2001 14:27:00;CIDADAO COMUM;S;FU;BONFIM;BH;610213.22;797986.51;2282
+2284;2001095021;B03000;AMEACA;PRACA BAGATELLE;35;84720;18/2/2001 14:30:00;CIDADAO COMUM;S;;AEROPORTO DA PAM;BH;609214.07;804691.90;2283
+2285;2001095037;B06000;LESAO CORPORAL;RUA MARQUES DO L;482;44755;18/2/2001 14:36:00;CIDADAO COMUM;N;CA01;JOAO PINHEIRO;BH;604482.56;796269.88;2284
+2286;2001095043;B03000;AMEACA;RUA RADIALISTA M;1111;98864;18/2/2001 14:43:00;CIDADAO COMUM;S;;CEU AZUL;BH;604226.17;808393.41;2285
+2287;2001095089;B03000;AMEACA;RUA ITAPECERICA;42;35757;18/2/2001 15:19:00;CIDADAO COMUM;N;;LAGOINHA;BH;610796.43;798065.06;2286
+2288;2001095093;B03000;AMEACA;RUA CINABRIO;300;15276;18/2/2001 15:22:00;CIDADAO COMUM;S;CAFR;PRADO LOPES;BH;610021.42;798566.35;2287
+2289;2001095105;B06000;LESAO CORPORAL;RUA EDUARDO CARL;42;130582;18/2/2001 15:28:00;CIDADAO COMUM;S;;ARAGUAIA;BH;604696.58;789263.56;2288
+2290;2001095106;B03000;AMEACA;RUA REIS DE ABRE;224;63363;18/2/2001 15:31:00;CIDADAO COMUM;N;;APARECIDA SETIMA;BH;608553.03;800581.70;2289
+2291;2001095119;B03000;AMEACA;RUA SAO TOMAS DE;595;63782;18/2/2001 15:39:00;CIDADAO COMUM;S;0;MORRO DO PAPAGAI;BH;610837.70;793388.15;2290
+2292;2001095121;B03000;AMEACA;AV WASHINGTON LU;115;73701;18/2/2001 15:43:00;CIDADAO COMUM;S;;SAO BERNARDO;BH;611072.54;804833.84;2291
+2293;2001095129;B04001;HOMICIDIO TENTAD;RUA SAO TOMAS;6;63770;18/2/2001 15:46:00;CIDADAO COMUM;S;;PLANALTO;BH;610641.48;805609.77;2292
+2294;2001095179;B06000;LESAO CORPORAL;RUA MILTON DIAS;111;82712;18/2/2001 16:26:00;CIDADAO COMUM;S;0;JARDIM VITORIA;BH;617080.52;803920.41;2293
+2295;2001095231;B06000;LESAO CORPORAL;BECO PRINCIPAL;230;170504;18/2/2001 17:00:00;CIDADAO COMUM;S;;MORRO DAS PEDRAS;BH;608596.19;793933.42;2294
+2296;2001095306;B06000;LESAO CORPORAL;AV DJALMA VIEIRA;994;53410;18/2/2001 17:56:00;CIDADAO COMUM;S;;CH VALE DO JATOB;BH;600495.77;787406.59;2295
+2297;2001095314;B06000;LESAO CORPORAL;RUA F;80;27487;18/2/2001 18:01:00;CIDADAO COMUM;S;0;VILA MARAVILHAS;BH;603084.51;795584.66;2296
+2298;2001095333;B03000;AMEACA;RUA JULITA NOGUE;406;39597;18/2/2001 18:18:00;CIDADAO COMUM;N;;SARANDI (URCA/BH;BH;603772.02;802478.16;2297
+2299;2001095337;B06000;LESAO CORPORAL;AV DOM JOAO VI;169;22294;18/2/2001 18:20:00;CIDADAO COMUM;N;;CINQUENTENARIO;BH;606195.21;792895.55;2298
+2300;2001095354;B03000;AMEACA;RUA ENGENHO DO O;73;103102;18/2/2001 18:35:00;CIDADAO COMUM;S;CAB;ENGENHO NOGUEIRA;BH;606446.26;800361.51;2299
+2301;2001095367;B03000;AMEACA;RUA BEIRA MAR;422;94992;18/2/2001 18:40:00;CIDADAO COMUM;S;;SARANDI (URCA/BH;BH;603081.96;802265.91;2300
+2302;2001095389;B06000;LESAO CORPORAL;RUA CAMILO DE BR;248;11896;18/2/2001 18:52:00;CIDADAO COMUM;S;0;PADRE EUSTAQUIO;BH;606212.93;797959.97;2301
+2303;2001095415;B06000;LESAO CORPORAL;RUA FREI LUIZ DE;140;29961;18/2/2001 19:06:00;CIDADAO COMUM;N;;ALTO DOS PINHEIR;BH;604876.04;795919.50;2302
+2304;2001095471;B04002;HOMICIDIO CONSUM;RUA FERNAO DIAS;1853;28133;18/2/2001 19:45:00;CIDADAO COMUM;N;0;JONAS VEIGA;BH;616249.53;797464.28;2303
+2305;2001095477;B03000;AMEACA;RUA ARIOLINO ARI;159;85811;18/2/2001 19:48:00;CIDADAO COMUM;S;0;SERRA VERDE;BH;609207.39;810119.05;2304
+2306;2001095530;B06000;LESAO CORPORAL;RUA JOSE PINTO D;10;100901;18/2/2001 20:18:00;CIDADAO COMUM;S;0;JARDIM GUANABARA;BH;611479.65;807085.75;2305
+2307;2001095609;B06000;LESAO CORPORAL;RUA CONEGO SANTA;546;16859;18/2/2001 20:58:00;CIDADAO COMUM;S;;CACHOEIRINHA;BH;610600.04;801826.61;2306
+2308;2001095611;B03000;AMEACA;RUA JOEL JOSE DE;281;68698;18/2/2001 20:59:00;CIDADAO COMUM;N;;DAS INDUSTRIAS;BH;605046.83;791261.70;2307
+2309;2001095623;B06000;LESAO CORPORAL;RUA DOS TUPIS;369;69965;18/2/2001 21:06:00;CIDADAO COMUM;N;;CENTRO (BH);BH;610933.97;796910.36;2308
+2310;2001095643;B04001;HOMICIDIO TENTAD;RUA REIS DE ABRE;440;63363;18/2/2001 21:18:00;CIDADAO COMUM;S;LJ1;APARECIDA SETIMA;BH;608751.51;800785.16;2309
+2311;2001095665;B03000;AMEACA;RUA MARIA PIETRA;125;2668;18/2/2001 21:28:00;INICIATIVA;N;0;SAO PAULO;BH;612440.02;802941.04;2310
+2312;2001095682;B03000;AMEACA;RUA PARANAMIRIM;24;52269;18/2/2001 21:41:00;CIDADAO COMUM;S;0;BONSUCESSO;BH;605341.80;790124.53;2311
+2313;2001095693;B04001;HOMICIDIO TENTAD;RUA MUNIZ;149;170850;18/2/2001 21:47:00;INICIATIVA;N;0;MORRO DAS PEDRAS;BH;608113.39;793880.88;2312
+2314;2001095699;B03000;AMEACA;RUA CALDAS DA RA;2559;61100;18/2/2001 21:51:00;CIDADAO COMUM;S;CSA;SAO FRANCISCO;BH;608467.61;800980.26;2313
+2315;2001095707;B04001;HOMICIDIO TENTAD;RUA JOSE FELIX M;800;7416;18/2/2001 21:56:00;INICIATIVA;N;0;MANTIQUEIRA;BH;606465.11;810558.08;2314
+2316;2001095715;B03000;AMEACA;RUA CASCALHEIRA;177;13889;18/2/2001 22:01:00;CIDADAO COMUM;N;;VENDA NOVA;BH;609380.40;808731.30;2315
+2317;2001095755;B06000;LESAO CORPORAL;RUA DOS AFONSOS;371;1319;18/2/2001 22:28:00;CIDADAO COMUM;N;CA02;BOA VISTA;BH;615950.95;800243.51;2316
+2318;2001095758;B03000;AMEACA;RUA MANGARATIBA;174;42822;18/2/2001 22:31:00;CIDADAO COMUM;S;0;SAO GERALDO;BH;615031.70;799151.60;2317
+2319;2001095759;B03000;AMEACA;RUA CAMPOS SALES;472;12300;18/2/2001 22:31:00;CIDADAO COMUM;S;0;CALAFATE;BH;607050.85;796279.60;2318
+2320;2001095797;B03000;AMEACA;RUA SAO TOMAS DE;609;63782;18/2/2001 22:57:00;CIDADAO COMUM;N;0;MORRO DO PAPAGAI;BH;610837.70;793388.15;2319
+2321;2001095831;B03000;AMEACA;RUA STO ANTONIO;233;61759;18/2/2001 23:11:00;POLICIAL MILITAR;N;;SAO TOMAZ;BH;609990.56;805531.55;2320
+2322;2001095866;B03000;AMEACA;RUA CALDAS DA RA;805;61100;18/2/2001 23:29:00;CIDADAO COMUM;S;0;SAO FRANCISCO;BH;609644.68;802276.32;2321
+2323;2001095872;B04001;HOMICIDIO TENTAD;RUA JOAQUIM ANAC;23;118932;18/2/2001 23:32:00;CIDADAO COMUM;S;0;TEIXEIRA DIAS;BH;603052.88;789295.61;2322
+2324;2001095883;B06000;LESAO CORPORAL;AV DJALMA VIEIRA;764;53410;18/2/2001 23:40:00;CIDADAO COMUM;S;;CH VALE DO JATOB;BH;600529.64;787199.48;2323
+2325;2001095901;B03000;AMEACA;RUA AMERICO MAGA;560;3314;18/2/2001 23:48:00;CIDADAO COMUM;S;0;BARREIRO;BH;602218.78;790571.99;2324
+2326;2001095907;B06000;LESAO CORPORAL;RUA DOUTOR BENED;473;12252;18/2/2001 23:50:00;CIDADAO COMUM;N;;ANTONIO RIBEIRO ;BH;612581.15;803808.71;2325
+2327;2001095922;B06000;LESAO CORPORAL;RUA ANTONIO TEIX;715;119037;19/2/2001 00:01:00;CIDADAO COMUM;S;AP202;TEIXEIRA DIAS;BH;602289.75;790401.66;2326
+2328;2001095946;B04001;HOMICIDIO TENTAD;RUA ICO;126;34020;19/2/2001 00:21:00;CIDADAO COMUM;N;0;SAUDADE;BH;615030.21;797547.97;2327
+2329;2001095954;B06000;LESAO CORPORAL;RUA AGUIA;265;104625;19/2/2001 00:25:00;CIDADAO COMUM;S;;GOIANIA;BH;615619.21;803362.78;2328
+2330;2001095955;B03000;AMEACA;AV WALDOMIRO LOB;1500;66548;19/2/2001 00:26:00;CIDADAO COMUM;N;;GUARANI;BH;612111.73;805291.94;2329
+2331;2001096017;B06000;LESAO CORPORAL;RUA DOS GOITACAZ;1368;31400;19/2/2001 01:05:00;CIDADAO COMUM;N;0;BARRO PRETO;BH;609964.47;797064.77;2330
+2332;2001096038;B03000;AMEACA;RUA LIGNITO;36;41050;19/2/2001 01:18:00;CIDADAO COMUM;S;AP 202;SANTA EFIGENIA;BH;613978.82;796630.25;2331
+2333;2001096442;B03000;AMEACA;RUA MODESTINO GO;119;84430;19/2/2001 09:48:00;CIDADAO COMUM;S;0;NOVA VISTA;BH;614906.32;800737.33;2332
+2334;2001096450;B06000;LESAO CORPORAL;AV SARAMENHA;170;64007;19/2/2001 09:57:00;CIDADAO COMUM;S;;FLORAMAR;BH;611924.76;805561.32;2333
+2335;2001096544;B06000;LESAO CORPORAL;RUA OSCAR LOBO P;27;104480;19/2/2001 11:02:00;CIDADAO COMUM;S;;PRIMEIRO DE MAIO;BH;612321.28;803479.45;2334
+2336;2001096593;B06000;LESAO CORPORAL;RUA SAO PAULO;1106;63464;19/2/2001 11:42:00;CIDADAO COMUM;S;0;CENTRO (BH);BH;610856.65;796731.49;2335
+2337;2001096634;B03000;AMEACA;RUA PASSA TEMPO;600;52432;19/2/2001 12:15:00;INICIATIVA;S;;CARMO;BH;611611.62;794303.33;2336
+2338;2001096635;B03000;AMEACA;RUA LOURDES;84;108106;19/2/2001 12:17:00;CIDADAO COMUM;N;CA12;SANTA MONICA DO ;BH;605821.64;808586.26;2337
+2339;2001096677;B03000;AMEACA;RUA MARIO SOARES;980;44641;19/2/2001 12:50:00;CIDADAO COMUM;N;A;DOM BOSCO;BH;604460.37;797645.73;2338
+2340;2001096678;B03000;AMEACA;RUA SAO RICARDO;124;83920;19/2/2001 12:52:00;CIDADAO COMUM;N;;PAULO SEXTO;BH;616411.25;806313.89;2339
+2341;2001096679;B06000;LESAO CORPORAL;RUA JOEL SANTANA;50;100205;19/2/2001 12:53:00;CIDADAO COMUM;S;;BRAUNAS;BH;603823.79;804620.90;2340
+2342;2001096737;B03000;AMEACA;RUA ANTONIO LUCI;83;14709;19/2/2001 13:43:00;CIDADAO COMUM;N;;CH VALE DO JATOB;BH;600810.66;787478.72;2341
+2343;2001096750;B08000;VIOLACAO DE DOMI;RUA SANTOS;1639;61910;19/2/2001 13:50:00;CIDADAO COMUM;S;;JARDIM AMERICA;BH;607707.17;793808.83;2342
+2344;2001097001;B06000;LESAO CORPORAL;RUA LAGOA DA PRA;454;40187;19/2/2001 16:24:00;CIDADAO COMUM;N;;SALGADO FILHO;BH;606490.48;794951.41;2343
+2345;2001097013;B03000;AMEACA;RUA SAO CLEMENTE;1258;62197;19/2/2001 16:31:00;CIDADAO COMUM;S;;PARQUE RIACHUELO;BH;609535.38;800385.58;2344
+2346;2001097029;B03000;AMEACA;RUA TEBAS;820;67090;19/2/2001 16:45:00;INICIATIVA;N;0;VERA CRUZ;BH;616073.41;798319.09;2345
+2347;2001097050;B06000;LESAO CORPORAL;RUA RADIALISTA M;162;81127;19/2/2001 17:02:00;CIDADAO COMUM;N;;CEU AZUL;BH;604385.56;808571.36;2346
+2348;2001097165;B03000;AMEACA;RUA JAIME SALSE;118;36848;19/2/2001 18:21:00;CIDADAO COMUM;N;0;MAGNESITA;BH;604098.60;793775.56;2347
+2349;2001097191;B06000;LESAO CORPORAL;AV MEIER;570;83857;19/2/2001 18:37:00;INICIATIVA;S;;ZOOLOGICO;BH;603156.99;802837.24;2348
+2350;2001097200;B03000;AMEACA;RUA DA BOLIVIA;758;9884;19/2/2001 18:40:00;CIDADAO COMUM;N;;SION;BH;610943.73;793524.50;2349
+2351;2001097207;B02000;RIXA;RUA NHONHO BROCH;214;47580;19/2/2001 18:45:00;CIDADAO COMUM;N;;DAS INDUSTRIAS;BH;604635.54;792049.77;2350
+2352;2001097218;B03000;AMEACA;RODOVIA MG 20;68;26620;19/2/2001 18:52:00;CIDADAO COMUM;S;0;BELO HORIZONTE (;BH;614262.81;805994.36;2351
+2353;2001097225;B03000;AMEACA;RUA GILBERTO FRE;40;92593;19/2/2001 18:56:00;CIDADAO COMUM;N;0;CHACARAS REUNIDA;BH;605821.94;789605.11;2352
+2354;2001097292;B06000;LESAO CORPORAL;RUA BEGONIA;71;94889;19/2/2001 19:37:00;INICIATIVA;S;0;LINDEIA;BH;599348.67;790354.44;2353
+2355;2001097302;B06000;LESAO CORPORAL;RUA CECILIA MARI;132;78759;19/2/2001 19:50:00;CIDADAO COMUM;S;0;CH JATOBA IV;BH;600506.19;787792.37;2354
+2356;2001097305;B06000;LESAO CORPORAL;RUA CINCO;25;27128;19/2/2001 19:52:00;CIDADAO COMUM;S;0;PAULO SEXTO;BH;616801.10;806900.75;2355
+2357;2001097357;B03000;AMEACA;RUA DOM LUCIO AN;411;22382;19/2/2001 20:31:00;CIDADAO COMUM;S;AP502;CORACAO EUCARIST;BH;605812.96;796643.35;2356
+2358;2001097370;B03000;AMEACA;RUA FILEMON MATO;121;91824;19/2/2001 20:39:00;INICIATIVA;S;0;LINDEIA;BH;599659.84;791195.04;2357
+2359;2001097451;B06000;LESAO CORPORAL;AV AUGUSTO DE LI;1472;6731;19/2/2001 21:34:00;CIDADAO COMUM;S;PX1454;BARRO PRETO;BH;609889.16;796941.60;2358
+2360;2001097482;B03000;AMEACA;RUA ERNESTO TOGN;22;129850;19/2/2001 22:01:00;CIDADAO COMUM;S;0;GORDURAS;BH;616254.09;803812.57;2359
+2361;2001097533;B03000;AMEACA;RUA BARROQUINHA;50;170498;19/2/2001 22:51:00;CIDADAO COMUM;N;AN2;CABANA;BH;604310.01;794399.73;2360
+2362;2001097539;B04001;HOMICIDIO TENTAD;RUA DEZ;84;108538;19/2/2001 22:56:00;CIDADAO COMUM;N;0;DAS INDUSTRIAS;BH;604982.91;791211.23;2361
+2363;2001097639;B03000;AMEACA;RUA DOUTOR CAMIL;17;23228;20/2/2001 00:17:00;CIDADAO COMUM;S;PX17;SAO LUCAS;BH;613282.55;795474.81;2362
+2364;2001097640;B03000;AMEACA;RUA MARECHAL HEN;75;38351;20/2/2001 00:18:00;CIDADAO COMUM;N;;TUPI;BH;612646.28;806452.90;2363
+2365;2001097819;B03000;AMEACA;RUA REMI PEREIRA;120;96727;20/2/2001 06:27:00;CIDADAO COMUM;N;;ANTONIO RIBEIRO ;BH;614954.59;806157.68;2364
+2366;2001097842;B03000;AMEACA;RUA CABEDELO;18;82016;20/2/2001 06:57:00;CIDADAO COMUM;S;0;SAO GABRIEL;BH;614170.46;804650.36;2365
+2367;2001097945;B03000;AMEACA;RUA PONTA GROSSA;892;14900;20/2/2001 08:13:00;CIDADAO COMUM;S;0;MILIONARIOS;BH;604828.64;790426.10;2366
+2368;2001098267;B03000;AMEACA;RUA ANGOLA;28;4001;20/2/2001 12:18:00;CIDADAO COMUM;S;;SAO PAULO;BH;612347.81;802847.99;2367
+2369;2001098314;B03000;AMEACA;RUA JAIR AFONSO ;11;53104;20/2/2001 12:57:00;CIDADAO COMUM;N;;PIRATININGA;BH;606718.57;809902.65;2368
+2370;2001098373;B03000;AMEACA;RUA BONFIM DE AB;23;10102;20/2/2001 13:50:00;CIDADAO COMUM;S;;SANTA CRUZ;BH;610768.91;802546.50;2369
+2371;2001098400;B04001;HOMICIDIO TENTAD;RUA MARTA GONCAL;139;102847;20/2/2001 14:08:00;POLICIAL MILITAR;N;0;CH DA LAGOA;BH;604899.39;802953.25;2370
+2372;2001098481;B06000;LESAO CORPORAL;RUA JOAO GOMIDE ;193;68921;20/2/2001 15:03:00;CIDADAO COMUM;N;;COQUEIROS;BH;602301.00;798690.19;2371
+2373;2001098536;B03000;AMEACA;AV DOM PEDRO II;1426;53145;20/2/2001 15:35:00;CIDADAO COMUM;N;;BONFIM;BH;609360.60;798114.20;2372
+2374;2001098539;B03000;AMEACA;RUA RADIALISTA J;45;99031;20/2/2001 15:36:00;INICIATIVA;S;0;CEU AZUL;BH;604501.89;808357.72;2373
+2375;2001098547;B03000;AMEACA;RUA J;329;47350;20/2/2001 15:41:00;CIDADAO COMUM;S;;VILA CASTANHEIRA;BH;601281.34;788532.74;2374
+2376;2001098696;B03000;AMEACA;RUA URCA;800;71040;20/2/2001 16:59:00;CIDADAO COMUM;N;;SARANDI (URCA/BH;BH;602998.93;802378.25;2375
+2377;2001098874;B03000;AMEACA;AV ABILIO MACHAD;1054;634;20/2/2001 18:34:00;CIDADAO COMUM;S;;CONJUNTO ALIPIO ;BH;604787.27;798591.50;2376
+2378;2001098894;B04002;HOMICIDIO CONSUM;RUA RAIMUNDO TIN;150;301229;20/2/2001 18:45:00;CIDADAO COMUM;S;;MORRO DO PAPAGAI;BH;610732.45;793209.20;2377
+2379;2001099048;B03000;AMEACA;RUA JOAQUIM RAMO;326;38175;20/2/2001 20:20:00;CIDADAO COMUM;S;;PARAISO;BH;614858.19;796846.14;2378
+2380;2001099086;B03000;AMEACA;RUA BARAO DE CAM;188;7850;20/2/2001 20:43:00;CIDADAO COMUM;S;;SAO JOSE;BH;605155.86;798480.70;2379
+2381;2001099109;B03000;AMEACA;AV MARIA CONCEIC;1075;32052;20/2/2001 20:58:00;CIDADAO COMUM;S;CAFU;GOIANIA;BH;615361.70;803442.89;2380
+2382;2001099173;B03000;AMEACA;AV DOUTOR CRISTI;2152;62459;20/2/2001 21:38:00;CIDADAO COMUM;S;;ITAPOA;BH;609739.69;806030.28;2381
+2383;2001099274;B06000;LESAO CORPORAL;RUA LUPERCIO PAI;50;57335;20/2/2001 22:40:00;INICIATIVA;N;0;TIROL;BH;599917.53;789181.52;2382
+2384;2001099286;B03000;AMEACA;RUA DONA SINVALI;435;59863;20/2/2001 22:48:00;CIDADAO COMUM;S;;ANTONIO RIBEIRO ;BH;615490.44;807265.68;2383
+2385;2001099327;B03000;AMEACA;RUA JOAO PAULO I;65;300458;20/2/2001 23:10:00;CIDADAO COMUM;N;;SAO DOMINGOS;BH;607677.28;793509.05;2384
+2386;2001099335;B06000;LESAO CORPORAL;RUA RADIALISTA C;25;57348;20/2/2001 23:15:00;INICIATIVA;N;0;CEU AZUL;BH;604520.56;807229.82;2385
+2387;2001099387;B03000;AMEACA;RUA JACOB MARRA ;53;119847;20/2/2001 23:49:00;CIDADAO COMUM;S;AP103;SERRA VERDE;BH;609498.28;810533.01;2386
+2388;2001099418;B04001;HOMICIDIO TENTAD;RUA RAMIRO SIQUE;95;128858;21/2/2001 00:08:00;CIDADAO COMUM;S;0;CASTANHEIRAS (TA;BH;617771.12;797214.62;2387
+2389;2001099453;B03000;AMEACA;RUA JOAQUIM GOUV;12;1422;21/2/2001 00:43:00;CIDADAO COMUM;S;0;SAO PAULO;BH;612535.79;802867.60;2388
+2390;2001099486;B06000;LESAO CORPORAL;RUA CELIO DINIZ;215;111656;21/2/2001 01:11:00;CIDADAO COMUM;S;0;RIO BRANCO;BH;606714.88;808783.28;2389
+2391;2001099659;B03000;AMEACA;RUA CABEDELO;70;82016;21/2/2001 06:42:00;CIDADAO COMUM;S;0;SAO GABRIEL;BH;614177.56;804723.53;2390
+2392;2001099661;B03000;AMEACA;RUA UBA;313;70149;21/2/2001 06:44:00;CIDADAO COMUM;S;APT214;FLORESTA;BH;611232.61;798155.29;2391
+2393;2001099688;B06000;LESAO CORPORAL;AV CRISTIANO MAC;4000;18652;21/2/2001 07:13:00;INICIATIVA;N;0;PALMARES;BH;612434.91;802092.92;2392
+2394;2001099706;B04001;HOMICIDIO TENTAD;RUA SANTA CRUZ;5;23360;21/2/2001 07:25:00;CIDADAO COMUM;S;0;TAQUARIL;BH;617658.23;797386.88;2393
+2395;2001099720;B03000;AMEACA;RUA MUNHOZ;578;13573;21/2/2001 07:36:00;CIDADAO COMUM;N;AP202;SANTA ROSA;BH;610348.81;803561.40;2394
+2396;2001099721;B06000;LESAO CORPORAL;RUA DOS GUARANIS;6;32181;21/2/2001 07:37:00;INICIATIVA;S;0;CENTRO BH;BH;610799.21;797579.92;2395
+2397;2001099846;B03000;AMEACA;RUA HERCULANO MO;105;37967;21/2/2001 09:00:00;CIDADAO COMUM;S;;NOVA CINTRA;BH;605544.73;793496.43;2396
+2398;2001099870;B03000;AMEACA;PRACA DUQUE DE C;15;24145;21/2/2001 09:19:00;CIDADAO COMUM;S;;SANTA TEREZA;BH;613412.06;797495.79;2397
+2399;2001099926;B06000;LESAO CORPORAL;RUA LEOPOLDO GOM;1663;40770;21/2/2001 09:57:00;INICIATIVA;S;0;VERA CRUZ;BH;616032.33;798192.27;2398
+2400;2001099942;B03000;AMEACA;RUA REYNALDO SMI;104;111177;21/2/2001 10:06:00;CIDADAO COMUM;S;APTO 201;SANTA AMELIA;BH;606951.74;805850.94;2399
+2401;2001099998;B03000;AMEACA;RUA JOSE DE LIMA;52;38897;21/2/2001 10:49:00;CIDADAO COMUM;N;0;FLORAMAR;BH;611909.78;805737.84;2400
+2402;2001100060;B06000;LESAO CORPORAL;RUA FERNAO DIAS;923;28133;21/2/2001 11:49:00;INICIATIVA;N;0;CAETANO FURQUIM;BH;616127.28;798063.59;2401
+2403;2001100061;B06000;LESAO CORPORAL;AV PRESIDENTE AN;2747;4461;21/2/2001 11:49:00;CIDADAO COMUM;S;;CACHOEIRINHA;BH;609898.08;800576.10;2402
+2404;2001100130;B06000;LESAO CORPORAL;AV FRANCISCO DES;364;29400;21/2/2001 12:47:00;INICIATIVA;S;0;ANCHIETA;BH;612071.32;794111.30;2403
+2405;2001100180;B03000;AMEACA;AV SEBASTIAO DE ;97;116101;21/2/2001 13:27:00;CIDADAO COMUM;S;0;DONA CLARA;BH;610312.62;803707.12;2404
+2406;2001100259;B03000;AMEACA;RUA VINTE E TRES;71;101730;21/2/2001 14:33:00;CIDADAO COMUM;N;;SAO MARCOS;BH;614482.87;802741.97;2405
+2407;2001100349;B02000;RIXA;RUA DOS COMERCIA;187;101251;21/2/2001 15:34:00;CIDADAO COMUM;N;0;CONJUNTO ALIPIO ;BH;604650.57;799721.85;2406
+2408;2001100382;B06000;LESAO CORPORAL;RUA GUAICURUS;547;32009;21/2/2001 15:53:00;INICIATIVA;N;0;CENTRO (BH);BH;611125.89;797629.28;2407
+2409;2001100404;B06000;LESAO CORPORAL;RUA DOS CAETES;920;11376;21/2/2001 16:12:00;INICIATIVA;S;0;CENTRO BH;BH;610732.50;797574.81;2408
+2410;2001100413;B03000;AMEACA;RUA DONA CONCEIC;365;16528;21/2/2001 16:14:00;CIDADAO COMUM;S;;JARDIM FLORENCIA;BH;604771.69;810125.01;2409
+2411;2001100497;B04001;HOMICIDIO TENTAD;RUA UM;29;302808;21/2/2001 16:59:00;CIDADAO COMUM;S;;NOVO AARAO REIS;BH;614345.23;805792.20;2410
+2412;2001100543;B03000;AMEACA;RUA DA OLARIA;388;18640;21/2/2001 17:18:00;CIDADAO COMUM;S;;OLARIA;BH;601188.13;789175.19;2411
+2413;2001100583;B03000;AMEACA;RUA OITO;491;117287;21/2/2001 17:34:00;CIDADAO COMUM;S;CAA;LINDEIA;BH;599818.67;790753.26;2412
+2414;2001100600;B04001;HOMICIDIO TENTAD;RUA BEZERRA DE M;99;9525;21/2/2001 17:39:00;INICIATIVA;N;0;NAZARE;BH;615471.18;804578.13;2413
+2415;2001100669;B03000;AMEACA;RUA CURITIBA;914;19090;21/2/2001 18:14:00;CIDADAO COMUM;S;0;CENTRO (BH);BH;610779.71;797017.51;2414
+2416;2001100684;B03000;AMEACA;AV BALEARES;319;89333;21/2/2001 18:23:00;CIDADAO COMUM;N;;JARDIM EUROPA;BH;608067.53;809872.95;2415
+2417;2001100700;B06000;LESAO CORPORAL;RUA F;62;105278;21/2/2001 18:32:00;CIDADAO COMUM;N;;ANTONIO RIBEIRO ;BH;614864.40;807874.65;2416
+2418;2001100707;B03000;AMEACA;RUA DES BRAULIO;1359;19917;21/2/2001 18:35:00;CIDADAO COMUM;S;0;VERA CRUZ;BH;616284.49;797815.10;2417
+2419;2001100722;B03000;AMEACA;RUA MONTE BRANCO;470;46417;21/2/2001 18:51:00;CIDADAO COMUM;S;0;NOVA SUISSA;BH;606655.16;795731.00;2418
+2420;2001100750;B03000;AMEACA;PRACA SAO VICENT;60;63902;21/2/2001 19:04:00;CIDADAO COMUM;S;;PADRE EUSTAQUIO;BH;605439.94;797844.56;2419
+2421;2001100778;B03000;AMEACA;AV CARANDAI;219;13081;21/2/2001 19:18:00;INICIATIVA;S;0;FUNCIONARIOS;BH;612589.23;796026.58;2420
+2422;2001100783;B03000;AMEACA;AV ARTUR BERNARD;2848;60844;21/2/2001 19:20:00;INICIATIVA;S;0;VILA PARIS;BH;610410.67;793282.74;2421
+2423;2001100826;B04002;HOMICIDIO CONSUM;RUA MALVA;10;115760;21/2/2001 19:45:00;INICIATIVA;S;0;HAVAI;BH;607288.35;793433.20;2422
+2424;2001100881;B03000;AMEACA;RUA AMUR;48;3497;21/2/2001 20:14:00;CIDADAO COMUM;S;0;CH BETANIA;BH;605011.02;792353.02;2423
+2425;2001100901;B03000;AMEACA;AV PRESIDENTE AN;7920;4461;21/2/2001 20:23:00;CIDADAO COMUM;S;0;SAO LUIZ;BH;608635.14;804693.17;2424
+2426;2001100941;B03000;AMEACA;RUA PADRE EUSTAQ;2401;51294;21/2/2001 20:50:00;INICIATIVA;N;0;PADRE EUSTAQUIO;BH;607335.24;797620.70;2425
+2427;2001100943;B04001;HOMICIDIO TENTAD;RUA VINTE E DOIS;23;118702;21/2/2001 20:51:00;CIDADAO COMUM;S;0;CEU AZUL;BH;604092.74;807628.21;2426
+2428;2001100968;B03000;AMEACA;RUA ARACA;52;5262;21/2/2001 21:07:00;CIDADAO COMUM;S;;SAO CRISTOVAO;BH;609876.75;799484.37;2427
+2429;2001101001;B06000;LESAO CORPORAL;RUA DOMINGOS ROC;343;22631;21/2/2001 21:32:00;CIDADAO COMUM;S;CAD;SALGADO FILHO;BH;606524.25;795445.27;2428
+2430;2001101004;B03000;AMEACA;RUA RADIALISTA O;122;103446;21/2/2001 21:32:00;CIDADAO COMUM;S;CSB;CEU AZUL;BH;604457.63;808510.55;2429
+2431;2001101041;B03000;AMEACA;RUA FREDERICO BR;300;51080;21/2/2001 21:57:00;CIDADAO COMUM;S;;CARLOS PRATES;BH;608056.63;797436.64;2430
+2432;2001101211;B03000;AMEACA;RUA JACUTINGA;90;36750;21/2/2001 23:44:00;CIDADAO COMUM;N;0;PADRE EUSTAQUIO;BH;606244.30;797617.34;2431
+2433;2001101246;B04001;HOMICIDIO TENTAD;AV FREI ANDREONI;609;75533;22/2/2001 00:05:00;CIDADAO COMUM;S;;SALGADO FILHO;BH;606840.37;793987.35;2432
+2434;2001101267;B06000;LESAO CORPORAL;RUA LISBOA;598;41252;22/2/2001 00:18:00;CIDADAO COMUM;N;0;COPACABANA;BH;606187.97;806472.44;2433
+2435;2001101290;B06000;LESAO CORPORAL;RUA W QUATRO;514;122634;22/2/2001 00:35:00;CIDADAO COMUM;S;;PONGELUPE;BH;603929.62;787324.64;2434
+2436;2001101310;B03000;AMEACA;RUA ALCEU AMOROS;73;102024;22/2/2001 00:54:00;CIDADAO COMUM;N;;MINEIRAO;BH;601744.06;785344.75;2435
+2437;2001101452;B06000;LESAO CORPORAL;RUA PINTOR AUGUS;285;128091;22/2/2001 04:24:00;CIDADAO COMUM;N;;TUPI;BH;613297.04;805806.56;2436
+2438;2001101460;B02000;RIXA;AV OLEGARIO MACI;579;49699;22/2/2001 04:48:00;INICIATIVA;N;VAGA LUME CENTER;CENTRO BH;BH;610560.87;797092.76;2437
+2439;2001101499;B03000;AMEACA;BECO LORENCO SIL;260;302105;22/2/2001 05:55:00;CIDADAO COMUM;N;0;JARDIM LEBLON;BH;605709.69;807233.04;2438
+2440;2001101671;B03000;AMEACA;RUA DOUTOR ANTON;60;23130;22/2/2001 08:49:00;CIDADAO COMUM;S;0;SAO CRISTOVAO;BH;610229.36;799732.11;2439
+2441;2001101860;B03000;AMEACA;RUA JURUA;955;39799;22/2/2001 10:40:00;CIDADAO COMUM;N;0;DA GRACA;BH;612096.46;799861.01;2440
+2442;2001101898;B03000;AMEACA;RUA TEBAS;253;67090;22/2/2001 11:07:00;CIDADAO COMUM;S;0;VERA CRUZ;BH;615547.45;798229.16;2441
+2443;2001101930;B06000;LESAO CORPORAL;RUA SAO PAULO;249;63464;22/2/2001 11:31:00;CIDADAO COMUM;N;SALA 308;CENTRO (BH);BH;611100.20;797529.33;2442
+2444;2001101935;B03000;AMEACA;AV STA ROSA;166;61301;22/2/2001 11:34:00;CIDADAO COMUM;S;0;SAO LUIZ;BH;608988.02;804670.34;2443
+2445;2001102015;B06000;LESAO CORPORAL;RUA BURI;51;10764;22/2/2001 12:27:00;CIDADAO COMUM;N;0;CACHOEIRINHA;BH;610328.10;801370.73;2444
+2446;2001102059;B03000;AMEACA;RUA POUSO ALEGRE;1314;54932;22/2/2001 13:04:00;CIDADAO COMUM;S;;FLORESTA;BH;612350.46;797901.33;2445
+2447;2001102067;B06000;LESAO CORPORAL;RUA AMELIA NAVES;62;91345;22/2/2001 13:13:00;CIDADAO COMUM;S;;PALMEIRAS;BH;606759.30;791240.11;2446
+2448;2001102218;B03000;AMEACA;RUA CAICARA;1381;11451;22/2/2001 14:58:00;CIDADAO COMUM;N;0;SAO GERALDO;BH;616106.59;799365.14;2447
+2449;2001102250;B06000;LESAO CORPORAL;AV SILVIANO BRAN;652;66002;22/2/2001 15:18:00;CIDADAO COMUM;S;;SAGRADA FAMILIA;BH;612067.13;798452.85;2448
+2450;2001102414;B03000;AMEACA;RUA JOSE GONCALV;99;38828;22/2/2001 16:36:00;CIDADAO COMUM;N;;BARREIRO;BH;602247.62;791245.80;2449
+2451;2001102436;B03000;AMEACA;AV DOM PEDRO I;1680;48337;22/2/2001 16:48:00;CIDADAO COMUM;S;;ITAPOA;BH;608647.29;806767.29;2450
+2452;2001102504;B06000;LESAO CORPORAL;RUA ESPINOSA;183;26024;22/2/2001 17:32:00;CIDADAO COMUM;N;;SANTO ANDRE;BH;609102.22;798462.10;2451
+2453;2001102675;B03000;AMEACA;RUA JULIO DE CAS;1227;39470;22/2/2001 19:08:00;INICIATIVA;S;0;CINQUENTENARIO;BH;606610.98;792052.30;2452
+2454;2001102682;B03000;AMEACA;RUA ARTUR ALVIM;265;6110;22/2/2001 19:12:00;CIDADAO COMUM;S;;INSTITUTO AGRONO;BH;613624.18;798721.80;2453
+2455;2001102701;B06000;LESAO CORPORAL;RUA MARIA BEATRI;1038;43881;22/2/2001 19:29:00;CIDADAO COMUM;N;;HAVAI;BH;607183.31;792946.88;2454
+2456;2001102705;B03000;AMEACA;RUA CONDOR;253;16773;22/2/2001 19:31:00;CIDADAO COMUM;N;CAB;NOVA CINTRA;BH;605677.65;793973.38;2455
+2457;2001102769;B03000;AMEACA;RUA CONDE DE PAL;200;16685;22/2/2001 20:02:00;CIDADAO COMUM;S;AP103;CABANA;BH;604461.38;793915.85;2456
+2458;2001102795;B03000;AMEACA;RUA DOUTOR CRIST;185;55598;22/2/2001 20:23:00;CIDADAO COMUM;S;;ARAGUAIA;BH;604650.82;789126.07;2457
+2459;2001102845;B03000;AMEACA;RUA MARIA AMELIA;721;43812;22/2/2001 21:03:00;CIDADAO COMUM;S;;SAO BERNARDO;BH;610257.12;805510.06;2458
+2460;2001102872;B04001;HOMICIDIO TENTAD;BECO HELIOTERIO;100;170863;22/2/2001 21:22:00;INICIATIVA;S;0;LEONINA;BH;608285.06;793705.32;2459
+2461;2001102887;B03000;AMEACA;RUA SAO PEDRO;51;96046;22/2/2001 21:32:00;CIDADAO COMUM;S;0;MARIA GORETTI;BH;614466.68;803349.59;2460
+2462;2001102946;B04001;HOMICIDIO TENTAD;RUA DOS FRANCISC;50;62723;22/2/2001 22:21:00;CIDADAO COMUM;N;CA1;PLANALTO;BH;610878.58;805675.14;2461
+2463;2001102961;B06000;LESAO CORPORAL;RUA SAO PAULO;78;63464;22/2/2001 22:27:00;INICIATIVA;N;0;CENTRO BH;BH;611107.57;797698.12;2462
+2464;2001102980;B06000;LESAO CORPORAL;RUA MARIA ROSA D;719;107800;22/2/2001 22:42:00;INICIATIVA;N;0;MANTIQUEIRA;BH;606463.33;811640.07;2463
+2465;2001103016;B06000;LESAO CORPORAL;AV BRIGADEIRO ED;980;2860;22/2/2001 22:59:00;CIDADAO COMUM;S;0;GLORIA;BH;604325.87;798595.64;2464
+2466;2001103020;B06000;LESAO CORPORAL;AV MEM DE SA;1310;45395;22/2/2001 23:09:00;CIDADAO COMUM;N;0;PARAISO;BH;614204.17;796304.90;2465
+2467;2001103029;B06000;LESAO CORPORAL;RUA AMERICO SCOT;63;3342;22/2/2001 23:12:00;CIDADAO COMUM;N;;SERRA;BH;612649.72;795554.59;2466
+2468;2001103096;B04002;HOMICIDIO CONSUM;AV RAJA GABAGLIA;2222;57830;22/2/2001 23:57:00;INICIATIVA;S;0;ESTORIL;BH;608853.99;793279.32;2467
+2469;2001103238;B03000;AMEACA;RUA CUIABA;1243;81269;23/2/2001 01:19:00;CIDADAO COMUM;S;AP401;BARROCA;BH;607852.76;795971.31;2468
+2470;2001103353;B03000;AMEACA;RUA MANOEL COUTO;560;43056;23/2/2001 03:23:00;CIDADAO COMUM;S;;CIDADE JARDIM;BH;609733.64;794645.46;2469
+2471;2001103382;B04002;HOMICIDIO CONSUM;PRACA BERNARDO D;50;9424;23/2/2001 03:54:00;CIDADAO COMUM;N;0;ERMELINDA;BH;609134.84;801050.78;2470
+2472;2001103393;B04001;HOMICIDIO TENTAD;AV CRISTIANO MAC;4000;18652;23/2/2001 03:58:00;INICIATIVA;S;0;DOS PALMARES;BH;612434.91;802092.92;2471
+2473;2001103394;B03000;AMEACA;RUA MARFIM;734;50207;23/2/2001 04:03:00;CIDADAO COMUM;S;;COQUEIROS;BH;602183.65;798513.40;2472
+2474;2001103445;B06000;LESAO CORPORAL;RUA PADRE PEDRO ;322;51657;23/2/2001 05:10:00;CIDADAO COMUM;S;;VILA SANTO ANTON;BH;609650.08;808286.90;2473
+2475;2001103487;B06000;LESAO CORPORAL;AV OLEGARIO MACI;657;49699;23/2/2001 05:59:00;POLICIAL MILITAR;N;0;CENTRO (BH);BH;610536.33;797017.45;2474
+2476;2001103551;B06000;LESAO CORPORAL;RUA CAETES;16;31208;23/2/2001 07:13:00;CIDADAO COMUM;S;;CONJ HAB JARDIM ;BH;603845.30;798142.06;2475
+2477;2001103582;B03000;AMEACA;RUA SANTA CRUZ;140;23360;23/2/2001 07:35:00;CIDADAO COMUM;N;0;TAQUARIL;BH;617675.20;797420.56;2476
+2478;2001103607;B04001;HOMICIDIO TENTAD;RUA TEBAS;267;67090;23/2/2001 07:49:00;INICIATIVA;N;0;VERA CRUZ;BH;615547.45;798229.16;2477
+2479;2001103731;B03000;AMEACA;RUA ANITA BLUMBE;19;38815;23/2/2001 08:53:00;CIDADAO COMUM;S;;BANDEIRANTES;BH;606031.12;802912.13;2478
+2480;2001103762;B03000;AMEACA;RUA DOS GUARANIS;100;32181;23/2/2001 09:12:00;INICIATIVA;N;0;CENTRO (BH);BH;610735.90;797543.55;2479
+2481;2001103903;B03000;AMEACA;RUA JORNALISTA M;97;20488;23/2/2001 10:41:00;CIDADAO COMUM;N;0;ANTONIO RIBEIRO ;BH;615929.10;806739.07;2480
+2482;2001104110;B03000;AMEACA;RUA PADRE JULIO ;1070;51496;23/2/2001 13:10:00;CIDADAO COMUM;N;;VERA CRUZ;BH;615893.98;797514.95;2481
+2483;2001104345;B03000;AMEACA;AV BRASIL;723;10420;23/2/2001 15:36:00;CIDADAO COMUM;S;AP1404;SANTA EFIGENIA;BH;612425.27;796268.81;2482
+2484;2001104401;B02000;RIXA;RUA SEBASTIAO FE;170;29063;23/2/2001 16:33:00;CIDADAO COMUM;N;0;CALIFORNIA;BH;603429.75;796223.66;2483
+2485;2001104402;B06000;LESAO CORPORAL;RUA DIVA;180;109950;23/2/2001 16:34:00;CIDADAO COMUM;S;0;SANTA MONICA DO ;BH;606025.20;808435.76;2484
+2486;2001104404;B06000;LESAO CORPORAL;RUA NARCISA PERE;325;78720;23/2/2001 16:34:00;INICIATIVA;N;0;CH JATOBA IV;BH;600341.04;787842.12;2485
+2487;2001104406;B06000;LESAO CORPORAL;RUA BIMBARRA;350;9641;23/2/2001 16:34:00;CIDADAO COMUM;S;;CALAFATE;BH;607195.50;796594.64;2486
+2488;2001104409;B03000;AMEACA;RUA SAO MANOEL;197;63335;23/2/2001 16:35:00;CIDADAO COMUM;S;0;FLORESTA;BH;611949.84;798441.30;2487
+2489;2001104410;B03000;AMEACA;RUA JOAQUIM DE F;1313;38033;23/2/2001 16:35:00;CIDADAO COMUM;S;;SANTA HELENA (BH;BH;603050.87;790075.16;2488
+2490;2001104431;B04001;HOMICIDIO TENTAD;RUA LUIZ LOPES;232;94431;23/2/2001 16:40:00;CIDADAO COMUM;N;0;OURO PRETO;BH;606295.93;801150.74;2489
+2491;2001104600;B06000;LESAO CORPORAL;RUA SENHORA DO P;2842;62231;23/2/2001 17:54:00;CIDADAO COMUM;N;;CINQUENTENARIO;BH;606406.64;790677.98;2490
+2492;2001104609;B06000;LESAO CORPORAL;RUA PAULO KRUGER;204;55910;23/2/2001 18:01:00;CIDADAO COMUM;S;;FLORAMAR;BH;611701.18;806916.68;2491
+2493;2001104889;B06000;LESAO CORPORAL;RUA CONCEICAO CH;117;20387;23/2/2001 20:23:00;CIDADAO COMUM;S;0;SAO JOAO BATISTA;BH;608745.78;808046.24;2492
+2494;2001104903;B06000;LESAO CORPORAL;AV PARANA;523;52230;23/2/2001 20:34:00;INICIATIVA;N;0;CENTRO (BH);BH;610725.40;796994.57;2493
+2495;2001104918;B03000;AMEACA;RUA G;50;47435;23/2/2001 20:39:00;CIDADAO COMUM;S;;VILA CASTANHEIRA;BH;601086.93;788642.82;2494
+2496;2001105009;B03000;AMEACA;AV PRESIDENTE AN;4040;4461;23/2/2001 21:22:00;INICIATIVA;N;0;SAO FRANCISCO;BH;609574.90;802239.54;2495
+2497;2001105146;B06000;LESAO CORPORAL;RUA SAO PAULO;271;63464;23/2/2001 22:37:00;INICIATIVA;S;VP7782;CENTRO (BH);BH;611088.90;797498.96;2496
+2498;2001105154;B06000;LESAO CORPORAL;RUA MENDES;99;26963;23/2/2001 22:41:00;INICIATIVA;N;0;PIRAJA;BH;613234.27;802879.31;2497
+2499;2001105165;B06000;LESAO CORPORAL;AV SARAMENHA;1072;64007;23/2/2001 22:47:00;INICIATIVA;S;0;GUARANI;BH;612916.89;805724.57;2498
+2500;2001105214;B03000;AMEACA;RUA CORONEL ALVA;25;17520;23/2/2001 23:25:00;CIDADAO COMUM;S;0;FLORAMAR;BH;611475.38;806507.14;2499
+2501;2001105223;B03000;AMEACA;RUA DESEMBARGADO;1456;94891;23/2/2001 23:27:00;CIDADAO COMUM;S;;ENGENHO NOGUEIRA;BH;606512.31;801019.24;2500
+2502;2001105264;B06000;LESAO CORPORAL;AV GUARAPARI;1234;20711;23/2/2001 23:54:00;CIDADAO COMUM;S;0;JARDIM ATLANTICO;BH;607413.32;806390.79;2501
+2503;2001105265;B04001;HOMICIDIO TENTAD;RUA RAIMUNDO TIN;65;301229;23/2/2001 23:57:00;INICIATIVA;S;0;MORRO DO PAPAGAI;BH;610757.06;793273.56;2502
+2504;2001105279;B06000;LESAO CORPORAL;RUA AMARANTO VER;62;110120;24/2/2001 00:01:00;CIDADAO COMUM;N;;ANTONIO RIBEIRO ;BH;615845.03;805907.88;2503
+2505;2001105293;B03000;AMEACA;RUA PIRATININGA;20;54210;24/2/2001 00:08:00;CIDADAO COMUM;S;;CARLOS PRATES;BH;609977.00;797713.87;2504
+2506;2001105310;B03000;AMEACA;RUA CONSELHEIRO ;15;17095;24/2/2001 00:23:00;CIDADAO COMUM;S;;CENTRO (BH);BH;612543.94;797025.95;2505
+2507;2001105406;B04001;HOMICIDIO TENTAD;AV JOSE RACHEL D;397;85912;24/2/2001 01:15:00;CIDADAO COMUM;N;;JARDIM VITORIA;BH;616985.36;804671.06;2506
+2508;2001105422;B06000;LESAO CORPORAL;RUA PITT;187;54380;24/2/2001 01:25:00;CIDADAO COMUM;S;;UNIAO;BH;612621.52;801125.76;2507
+2509;2001105450;B03000;AMEACA;RUA BENJAMIN FLO;60;9162;24/2/2001 01:43:00;CIDADAO COMUM;S;;CINQUENTENARIO;BH;606255.12;793325.23;2508
+2510;2001105465;B03000;AMEACA;RUA MATIAS AIRES;296;34032;24/2/2001 01:51:00;CIDADAO COMUM;S;;VILA MARAVILHAS;BH;603072.43;795117.27;2509
+2511;2001105473;B03000;AMEACA;AV FRANCISCO SA;830;29656;24/2/2001 01:58:00;CIDADAO COMUM;S;0;GUTIERREZ;BH;608886.90;796021.80;2510
+2512;2001105503;B04001;HOMICIDIO TENTAD;RUA PROFESSOR CA;240;89853;24/2/2001 02:22:00;CIDADAO COMUM;N;;PALMEIRAS;BH;606944.81;791601.05;2511
+2513;2001105518;B06000;LESAO CORPORAL;RUA DOS CAETES;499;11376;24/2/2001 02:32:00;INICIATIVA;N;0;CENTRO BH;BH;611125.13;797436.34;2512
+2514;2001105526;B03000;AMEACA;RUA TIRADENTES;26;85607;24/2/2001 02:36:00;CIDADAO COMUM;S;0;ALVORADA;BH;615497.04;802314.39;2513
+2515;2001105568;B03000;AMEACA;RUA ANDIROBA;30;102935;24/2/2001 03:08:00;INICIATIVA;N;0;SAO PAULO;BH;612437.66;803008.77;2514
+2516;2001105649;B05000;SEQUESTRO E CARC;RUA JOAQUIM RAMO;173;38175;24/2/2001 04:41:00;CIDADAO COMUM;S;0;PARAISO;BH;614826.55;797125.45;2515
+2517;2001105688;B08000;VIOLACAO DE DOMI;RUA SEVERINO LAR;351;57221;24/2/2001 05:16:00;CIDADAO COMUM;S;;MINASCAIXA;BH;609620.22;809012.12;2516
+2518;2001105699;B06000;LESAO CORPORAL;PRACA MODESTINO ;39;46039;24/2/2001 05:35:00;CIDADAO COMUM;S;;FLAVIO MARQUES D;BH;604068.02;788748.39;2517
+2519;2001105712;B03000;AMEACA;RUA DAVID FONSEC;380;19696;24/2/2001 06:04:00;CIDADAO COMUM;S;0;ARAGUAIA;BH;604476.46;790256.25;2518
+2520;2001105717;B04002;HOMICIDIO CONSUM;RUA ECA DE QUEIR;202;24968;24/2/2001 06:07:00;INICIATIVA;N;0;COPACABANA;BH;606539.78;806907.32;2519
+2521;2001105721;B06000;LESAO CORPORAL;RUA FLOR DE LIMA;64;23810;24/2/2001 06:07:00;CIDADAO COMUM;S;0;PINDORAMA;BH;602279.39;797503.89;2520
+2522;2001105742;B06000;LESAO CORPORAL;RUA ALFREDO ALVE;45;108175;24/2/2001 06:37:00;CIDADAO COMUM;S;;MANTIQUEIRA;BH;606710.57;811632.81;2521
+2523;2001105763;B06000;LESAO CORPORAL;RUA THIAGO SALLE;26;65012;24/2/2001 07:06:00;CIDADAO COMUM;S;0;JARDIM ESTRELA;BH;607320.11;810230.39;2522
+2524;2001105764;B03000;AMEACA;RUA DOM RAFAEL;5;23026;24/2/2001 07:06:00;INICIATIVA;N;0;TAQUARIL;BH;617052.78;797306.19;2523
+2525;2001105853;B03000;AMEACA;BECO SOL NASCENT;141;301434;24/2/2001 08:10:00;CIDADAO COMUM;S;PX135;CAFEZAL;BH;614209.99;795215.91;2524
+2526;2001105883;B06000;LESAO CORPORAL;RUA OSWALDO BRAG;34;72185;24/2/2001 08:30:00;CIDADAO COMUM;N;;SANTA AMELIA;BH;607351.55;806454.90;2525
+2527;2001105976;B03000;AMEACA;RUA ANTONIO MARZ;347;94520;24/2/2001 09:26:00;CIDADAO COMUM;S;CA347;OURO PRETO;BH;606195.44;800699.90;2526
+2528;2001106002;B03000;AMEACA;RUA AURELIANO LE;107;6832;24/2/2001 09:48:00;CIDADAO COMUM;S;;LIBERDADE;BH;609500.21;803405.43;2527
+2529;2001106210;B03000;AMEACA;RUA AGUANIL;640;1564;24/2/2001 12:20:00;CIDADAO COMUM;S;CAFR;VISTA ALEGRE;BH;605291.18;793463.89;2528
+2530;2001106230;B03000;AMEACA;RUA DAS PERPETUA;12;911;24/2/2001 12:30:00;CIDADAO COMUM;S;;LINDEIA;BH;599704.53;791168.04;2529
+2531;2001106327;B06000;LESAO CORPORAL;RUA OSCAR LOBO P;270;104480;24/2/2001 13:34:00;CIDADAO COMUM;S;0;PRIMEIRO DE MAIO;BH;612347.11;803516.89;2530
+2532;2001106334;B03000;AMEACA;RUA APORE;575;5099;24/2/2001 13:39:00;CIDADAO COMUM;N;;PARQUE RIACHUELO;BH;609511.92;800464.70;2531
+2533;2001106408;B06000;LESAO CORPORAL;RUA ROSA DE PEDR;20;124494;24/2/2001 14:25:00;CIDADAO COMUM;S;;ETELVINA CARNEIR;BH;611390.80;809189.08;2532
+2534;2001106409;B06000;LESAO CORPORAL;AV PRESIDENTE AN;4013;4461;24/2/2001 14:26:00;CIDADAO COMUM;S;0;SAO FRANCISCO;BH;609536.57;802154.10;2533
+2535;2001106490;B03000;AMEACA;RUA LUIZ BRANDAO;727;41656;24/2/2001 15:25:00;CIDADAO COMUM;S;;PARAISO;BH;614745.37;796750.21;2534
+2536;2001106523;B03000;AMEACA;RUA JAIR AFONSO ;9;53104;24/2/2001 15:37:00;CIDADAO COMUM;S;;PIRATININGA;BH;606827.32;809921.05;2535
+2537;2001106558;B06000;LESAO CORPORAL;RUA TENENTE VITO;71;67351;24/2/2001 15:59:00;CIDADAO COMUM;N;;SANTA TEREZA;BH;613395.47;797441.30;2536
+2538;2001106561;B03000;AMEACA;RUA ALMADA;174;2393;24/2/2001 16:01:00;CIDADAO COMUM;N;;PINDORAMA;BH;602539.53;797812.24;2537
+2539;2001106594;B03000;AMEACA;AV JOAO XXIII;227;37926;24/2/2001 16:17:00;CIDADAO COMUM;S;0;CONJUNTO ALIPIO ;BH;604398.40;799487.39;2538
+2540;2001106610;B06000;LESAO CORPORAL;RUA CAMPINA VERD;237;12110;24/2/2001 16:25:00;CIDADAO COMUM;N;0;SALGADO FILHO;BH;606135.94;794519.08;2539
+2541;2001106615;B03000;AMEACA;RUA KEPLER;173;39990;24/2/2001 16:30:00;CIDADAO COMUM;N;;SANTA LUCIA;BH;609519.93;791702.20;2540
+2542;2001106634;B03000;AMEACA;BECO SOL NASCENT;240;301434;24/2/2001 16:38:00;CIDADAO COMUM;N;0;CAFEZAL;BH;614453.31;795387.14;2541
+2543;2001106669;B06000;LESAO CORPORAL;RUA PIRAMBO;412;54090;24/2/2001 16:56:00;CIDADAO COMUM;S;0;SAO JOAO BATISTA;BH;610666.17;801718.53;2542
+2544;2001106765;B06000;LESAO CORPORAL;RUA PITANGUI;2218;54365;24/2/2001 17:51:00;CIDADAO COMUM;S;0;SAGRADA FAMILIA;BH;612464.06;798517.38;2543
+2545;2001106790;B06000;LESAO CORPORAL;AV VEREADOR CICE;615;19756;24/2/2001 18:01:00;CIDADAO COMUM;S;0;JOAO PINHEIRO;BH;604877.79;796469.45;2544
+2546;2001106795;B03000;AMEACA;RUA SAO TOMAS DE;478;63782;24/2/2001 18:04:00;CIDADAO COMUM;S;PX77;MORRO DO PAPAGAI;BH;610863.39;793538.47;2545
+2547;2001106867;B04001;HOMICIDIO TENTAD;AV VINTE E OITO ;356;72970;24/2/2001 18:46:00;INICIATIVA;N;0;ESPLANADA;BH;614552.43;798837.28;2546
+2548;2001106875;B06000;LESAO CORPORAL;RUA SAO PAULO;100;63464;24/2/2001 18:49:00;CIDADAO COMUM;S;0;CENTRO (BH);BH;611108.08;797692.28;2547
+2549;2001106902;B03000;AMEACA;RUA JOSE DE ARAU;508;24725;24/2/2001 19:03:00;CIDADAO COMUM;N;;SALGADO FILHO;BH;607209.92;793937.31;2548
+2550;2001106918;B03000;AMEACA;RUA REAL GRANDEZ;119;58089;24/2/2001 19:11:00;CIDADAO COMUM;S;;NOVO GLORIA;BH;603101.41;798931.25;2549
+2551;2001106943;B06000;LESAO CORPORAL;RUA EPHIGENIA NA;12;98533;24/2/2001 19:26:00;CIDADAO COMUM;S;0;CASTELO;BH;605318.52;799860.30;2550
+2552;2001106960;B06000;LESAO CORPORAL;AV RAJA GABAGLIA;2400;57830;24/2/2001 19:36:00;INICIATIVA;S;0;ESTORIL;BH;609018.00;793117.61;2551
+2553;2001106969;B06000;LESAO CORPORAL;RUA TRINTA E UM;23;95490;24/2/2001 19:38:00;POLICIAL MILITAR;S;0;MARIA GORETTI;BH;614564.25;803088.11;2552
+2554;2001107051;B06000;LESAO CORPORAL;RUA PITANGUI;3225;54365;24/2/2001 20:21:00;INICIATIVA;N;0;CONCORDIA;BH;613314.48;798412.93;2553
+2555;2001107087;B04001;HOMICIDIO TENTAD;RUA OESTE;519;49125;24/2/2001 20:36:00;CIDADAO COMUM;S;;CALAFATE;BH;608042.76;796702.89;2554
+2556;2001107110;B04002;HOMICIDIO CONSUM;RUA RAIMUNDO TIN;129;301229;24/2/2001 20:49:00;CIDADAO COMUM;N;;MORRO DO PAPAGAI;BH;610720.17;793143.45;2555
+2557;2001107139;B03000;AMEACA;RUA SAO TIAGO;10;21682;24/2/2001 21:02:00;CIDADAO COMUM;S;0;SAO TOMAZ;BH;610320.61;805512.06;2556
+2558;2001107221;B06000;LESAO CORPORAL;RUA PINHAL;90;12108;24/2/2001 21:46:00;CIDADAO COMUM;S;;PIRATININGA;BH;606126.70;809852.49;2557
+2559;2001107259;B03000;AMEACA;RUA MARCELINA FR;117;124655;24/2/2001 22:04:00;CIDADAO COMUM;S;;JAQUELINE;BH;611565.58;810539.70;2558
+2560;2001107267;B06000;LESAO CORPORAL;RUA FAGUNDES VAR;68;27689;24/2/2001 22:08:00;CIDADAO COMUM;S;;LAGOINHA;BH;610273.99;798496.34;2559
+2561;2001107301;B03000;AMEACA;RUA ROSALVO DE M;220;70439;24/2/2001 22:27:00;CIDADAO COMUM;S;A;GOIANIA;BH;615275.20;803488.95;2560
+2562;2001107322;B06000;LESAO CORPORAL;RUA ESPIRITO SAN;320;26052;24/2/2001 22:36:00;CIDADAO COMUM;N;;CENTRO (BH);BH;611297.21;797352.55;2561
+2563;2001107340;B06000;LESAO CORPORAL;RUA FORMIGA;50;29136;24/2/2001 22:48:00;CIDADAO COMUM;S;;LAGOINHA;BH;610336.11;798756.88;2562
+2564;2001107426;B06000;LESAO CORPORAL;AV FURQUIM WERNE;11;650;24/2/2001 23:28:00;INICIATIVA;N;0;SOLIMOES;BH;612945.73;805797.12;2563
+2565;2001107440;B06000;LESAO CORPORAL;RUA PERNAMBUCO;1077;53463;24/2/2001 23:37:00;CIDADAO COMUM;N;0;FUNCIONARIOS;BH;611502.50;795210.22;2564
+2566;2001107453;B04001;HOMICIDIO TENTAD;RUA COPERNICO PI;55;6630;24/2/2001 23:41:00;CIDADAO COMUM;S;0;MORRO DO PAPAGAI;BH;610405.30;793669.43;2565
+2567;2001107490;B03000;AMEACA;RUA PROFESSORA A;313;130479;24/2/2001 23:57:00;CIDADAO COMUM;S;0;OLARIA;BH;601738.06;789041.13;2566
+2568;2001107553;B03000;AMEACA;RUA STA JOSEFINA;885;60803;25/2/2001 00:34:00;CIDADAO COMUM;S;0;APARECIDA SETIMA;BH;608456.09;800930.17;2567
+2569;2001107593;B06000;LESAO CORPORAL;RUA EDSON LUIZ M;72;25062;25/2/2001 00:58:00;INICIATIVA;S;0;MARIA GORETTI;BH;614153.98;803689.74;2568
+2570;2001107620;B03000;AMEACA;RUA NATAL;373;47306;25/2/2001 01:10:00;CIDADAO COMUM;S;0;SANTO ANDRE;BH;609189.92;799371.29;2569
+2571;2001107662;B06000;LESAO CORPORAL;AV FURQUIM WERNE;120;650;25/2/2001 01:32:00;CIDADAO COMUM;S;;TUPI;BH;613071.54;805851.16;2570
+2572;2001107666;B06000;LESAO CORPORAL;RUA CARVALHOS;5;13788;25/2/2001 01:32:00;CIDADAO COMUM;N;;MANGABEIRAS;BH;612030.85;792390.04;2571
+2573;2001107714;B04001;HOMICIDIO TENTAD;RUA JOAQUIM DE P;945;38147;25/2/2001 02:04:00;CIDADAO COMUM;N;CAB;ALIPIO DE MELO;BH;604655.51;799121.62;2572
+2574;2001107730;B06000;LESAO CORPORAL;RUA PARA DE MINA;1186;52070;25/2/2001 02:10:00;CIDADAO COMUM;S;;PADRE EUSTAQUIO;BH;605500.40;797813.06;2573
+2575;2001107740;B04001;HOMICIDIO TENTAD;RUA NELSON HUNGR;273;46634;25/2/2001 02:15:00;CIDADAO COMUM;S;;TUPI;BH;612567.47;806138.51;2574
+2576;2001107745;B06000;LESAO CORPORAL;AV WALDOMIRO LOB;1665;66548;25/2/2001 02:18:00;INICIATIVA;S;0;GUARANI;BH;611916.93;805178.94;2575
+2577;2001107781;B06000;LESAO CORPORAL;AV JOAQUIM CLEME;18;38018;25/2/2001 02:39:00;CIDADAO COMUM;S;0;FLORAMAR;BH;611922.55;805613.83;2576
+2578;2001107799;B06000;LESAO CORPORAL;RUA CHAFARIZ;119;93568;25/2/2001 02:51:00;CIDADAO COMUM;N;;INDEPENDENCIA;BH;601522.62;786428.24;2577
+2579;2001107809;B06000;LESAO CORPORAL;RUA OURO PRETO;285;50730;25/2/2001 02:56:00;CIDADAO COMUM;N;0;BARRO PRETO;BH;609961.08;797017.98;2578
+2580;2001107892;B04001;HOMICIDIO TENTAD;RUA RAMIRO SIQUE;55;128858;25/2/2001 03:59:00;INICIATIVA;S;0;CASTANHEIRAS (TA;BH;617767.11;797185.33;2579
+2581;2001107955;B06000;LESAO CORPORAL;RODOVIA BR 356;5100;10317;25/2/2001 04:55:00;CIDADAO COMUM;N;;BELVEDERE;BH;610345.89;791069.48;2580
+2582;2001108010;B02000;RIXA;RUA CURITIBA;275;19090;25/2/2001 05:59:00;POLICIAL MILITAR;N;;CENTRO (BH);BH;610963.21;797560.80;2581
+2583;2001108110;B06000;LESAO CORPORAL;RUA OLENKA DIAS ;46;33506;25/2/2001 08:05:00;CIDADAO COMUM;N;;NOVA BARROCA;BH;607432.41;792756.34;2582
+2584;2001108239;B06000;LESAO CORPORAL;AV OLEGARIO MACI;459;49699;25/2/2001 09:32:00;INICIATIVA;S;0;CENTRO BH;BH;610594.57;797209.17;2583
+2585;2001108265;B03000;AMEACA;RUA TRINTA E SEI;201;34310;25/2/2001 09:52:00;CIDADAO COMUM;N;0;CONJUNTO FELICID;BH;612501.14;807529.70;2584
+2586;2001108381;B04001;HOMICIDIO TENTAD;RUA MUNIZ;149;170850;25/2/2001 11:30:00;INICIATIVA;S;0;MORRO DAS PEDRAS;BH;608113.39;793880.88;2585
+2587;2001108404;B04001;HOMICIDIO TENTAD;AV BIAS FORTES;1696;9553;25/2/2001 11:43:00;INICIATIVA;N;0;CENTRO BH;BH;610237.36;797177.50;2586
+2588;2001108413;B03000;AMEACA;AV AMAZONAS;2267;3140;25/2/2001 11:52:00;CIDADAO COMUM;S;0;BARRO PRETO;BH;609538.15;796202.90;2587
+2589;2001108419;B03000;AMEACA;RUA RIBEIRAO DAS;72;46688;25/2/2001 11:57:00;CIDADAO COMUM;N;CSB;PARAISO;BH;614172.67;796041.86;2588
+2590;2001108433;B06000;LESAO CORPORAL;RUA ALEXANDRE SI;205;2135;25/2/2001 12:04:00;CIDADAO COMUM;S;;SALGADO FILHO;BH;605987.96;793132.08;2589
+2591;2001108456;B03000;AMEACA;RUA GERALDO RIBE;49;43680;25/2/2001 12:25:00;CIDADAO COMUM;N;;NOVO GLORIA;BH;603076.41;798841.74;2590
+2592;2001108541;B06000;LESAO CORPORAL;RUA POTENGI;27;61428;25/2/2001 13:43:00;POLICIAL MILITAR;S;;SAO GABRIEL;BH;613898.77;803936.09;2591
+2593;2001108579;B03000;AMEACA;ALAMEDA ALVARO C;100;2816;25/2/2001 14:11:00;CIDADAO COMUM;S;;SANTA EFIGENIA;BH;612069.23;796731.22;2592
+2594;2001108619;B03000;AMEACA;RUA PADRE PEDRO ;4950;51657;25/2/2001 14:38:00;CIDADAO COMUM;N;APTO.:104 - BLOC;MANTIQUEIRA;BH;606693.60;809984.49;2593
+2595;2001108645;B04002;HOMICIDIO CONSUM;RUA TREZE DE MAI;164;120944;25/2/2001 14:57:00;CIDADAO COMUM;N;;MARIA HELENA;BH;605148.22;810689.31;2594
+2596;2001108653;B06000;LESAO CORPORAL;RUA JOSE ANTENOR;10;16049;25/2/2001 15:03:00;CIDADAO COMUM;N;;PRIMEIRO DE MAIO;BH;612546.74;803795.50;2595
+2597;2001108683;B03000;AMEACA;RUA COSTA RICA;86;68685;25/2/2001 15:21:00;CIDADAO COMUM;N;0;COQUEIROS;BH;602114.03;799090.79;2596
+2598;2001108722;B06000;LESAO CORPORAL;AV BRASIL;1460;10420;25/2/2001 15:49:00;CIDADAO COMUM;S;0;FUNCIONARIOS;BH;611745.06;795947.58;2597
+2599;2001108742;B03000;AMEACA;RUA SERRA NEGRA;1747;65038;25/2/2001 16:01:00;CIDADAO COMUM;S;;SANTO ANDRE;BH;608895.81;799098.28;2598
+2600;2001108773;B06000;LESAO CORPORAL;RUA PASSARELA;83;302328;25/2/2001 16:22:00;CIDADAO COMUM;S;0;BONSUCESSO;BH;606149.87;789752.27;2599
+2601;2001108810;B06000;LESAO CORPORAL;AV PRESIDENTE AN;2957;4461;25/2/2001 16:47:00;INICIATIVA;N;0;PARQUE RIACHUELO;BH;609797.06;800844.62;2600
+2602;2001108832;B06000;LESAO CORPORAL;RUA SAPUCAI;100;63943;25/2/2001 17:03:00;CIDADAO COMUM;N;;FLORESTA;BH;611873.41;797692.97;2601
+2603;2001108861;B03000;AMEACA;RUA EUFRATES;278;26821;25/2/2001 17:23:00;CIDADAO COMUM;N;0;COQUEIROS;BH;603482.30;800034.96;2602
+2604;2001108942;B03000;AMEACA;RUA CINCO;154;302813;25/2/2001 18:16:00;CIDADAO COMUM;S;;NOVO AARAO REIS;BH;614537.55;805974.74;2603
+2605;2001108957;B03000;AMEACA;RUA DONA GENI;92;22874;25/2/2001 18:19:00;CIDADAO COMUM;N;0;JARDIM FLORENCIA;BH;605132.66;810238.28;2604
+2606;2001109034;B04001;HOMICIDIO TENTAD;RUA ARARIBA;255;5540;25/2/2001 19:06:00;CIDADAO COMUM;N;;SAO CRISTOVAO;BH;610179.08;799177.02;2605
+2607;2001109039;B06000;LESAO CORPORAL;RUA ZURICK;640;74092;25/2/2001 19:10:00;CIDADAO COMUM;S;0;NOVA SUISSA;BH;606662.78;795875.98;2606
+2608;2001109073;B03000;AMEACA;RUA MARANGUAPE;355;43447;25/2/2001 19:27:00;CIDADAO COMUM;S;AP-303;BARROCA;BH;607967.88;796076.63;2607
+2609;2001109075;B06000;LESAO CORPORAL;RUA COPAIBA;10;104801;25/2/2001 19:30:00;CIDADAO COMUM;S;;INDUSTRIAL RODRI;BH;615815.87;808158.86;2608
+2610;2001109107;B03000;AMEACA;AV PARANA;246;52230;25/2/2001 19:42:00;INICIATIVA;N;0;CENTRO (BH);BH;610752.57;797284.29;2609
+2611;2001109129;B06000;LESAO CORPORAL;RUA VERGARA;123;109178;25/2/2001 19:55:00;CIDADAO COMUM;S;;COQUEIROS;BH;602357.56;799632.39;2610
+2612;2001109169;B03000;AMEACA;RUA OFICINAS;153;49140;25/2/2001 20:11:00;CIDADAO COMUM;S;0;ESPLANADA;BH;614750.88;798897.40;2611
+2613;2001109198;B03000;AMEACA;RUA PROFESSORA A;205;22008;25/2/2001 20:26:00;INICIATIVA;S;0;CANDELARIA;BH;608013.33;808737.70;2612
+2614;2001109199;B03000;AMEACA;AV PRESIDENTE AN;7920;4461;25/2/2001 20:28:00;CIDADAO COMUM;S;;SAO LUIZ;BH;608635.14;804693.17;2613
+2615;2001109255;B04001;HOMICIDIO TENTAD;AV SEN LEVINDO C;2270;14866;25/2/2001 20:58:00;CIDADAO COMUM;S;;SANTA CECILIA;BH;600975.64;787380.04;2614
+2616;2001109274;B04001;HOMICIDIO TENTAD;AV RAJA GABAGLIA;2225;57830;25/2/2001 21:04:00;INICIATIVA;N;0;LEONINA;BH;609138.65;793053.24;2615
+2617;2001109340;B03000;AMEACA;RUA VILA RICA;1929;71992;25/2/2001 21:32:00;INICIATIVA;S;401;JARDIM MONTANHES;BH;606729.96;798841.80;2616
+2618;2001109342;B06000;LESAO CORPORAL;RUA FLOR BRANCA;25;28509;25/2/2001 21:32:00;CIDADAO COMUM;N;0;JARDIM MONTANHES;BH;605799.54;799045.82;2617
+2619;2001109345;B06000;LESAO CORPORAL;RUA CLELIA;175;16008;25/2/2001 21:33:00;CIDADAO COMUM;N;;SANTA MONICA;BH;606886.03;807994.52;2618
+2620;2001109365;B06000;LESAO CORPORAL;RUA JOANA DARC;31;170141;25/2/2001 21:48:00;CIDADAO COMUM;N;;VILA CAFEZAL;BH;614352.14;794982.51;2619
+2621;2001109389;B06000;LESAO CORPORAL;RUA HOFFMAN;630;33320;25/2/2001 22:01:00;CIDADAO COMUM;S;0;SANTA CRUZ (BARR;BH;603165.37;789052.57;2620
+2622;2001109395;B06000;LESAO CORPORAL;RUA VICOSA;816;71910;25/2/2001 22:02:00;CIDADAO COMUM;S;PX342;SANTO ANTONIO;BH;610915.33;793946.00;2621
+2623;2001109432;B06000;LESAO CORPORAL;RUA BARAO DO MON;810;63653;25/2/2001 22:15:00;CIDADAO COMUM;S;;CARDOSO;BH;604036.31;787823.06;2622
+2624;2001109491;B02000;RIXA;RUA DOS AFONSOS;439;1319;25/2/2001 22:51:00;CIDADAO COMUM;S;0;BOA VISTA;BH;616017.53;800220.24;2623
+2625;2001109500;B06000;LESAO CORPORAL;RUA DA FLAGELACA;143;56042;25/2/2001 22:54:00;CIDADAO COMUM;N;0;SAO JOSE;BH;605583.59;798817.24;2624
+2626;2001109536;B03000;AMEACA;AV NEMEN LARA RO;250;104537;25/2/2001 23:17:00;CIDADAO COMUM;S;;SERRA VERDE;BH;609434.17;810322.36;2625
+2627;2001109563;B06000;LESAO CORPORAL;AV PRESIDENTE AN;4013;4461;25/2/2001 23:31:00;CIDADAO COMUM;S;0;SAO FRANCISCO;BH;609536.57;802154.10;2626
+2628;2001109578;B06000;LESAO CORPORAL;RUA FAGUNDES VAR;108;27689;25/2/2001 23:38:00;CIDADAO COMUM;S;;LAGOINHA;BH;610267.48;798536.31;2627
+2629;2001109589;B04001;HOMICIDIO TENTAD;AV ARTUR BERNARD;1200;60844;25/2/2001 23:43:00;POLICIAL MILITAR;S;0;VILA PARIS;BH;610180.14;793263.99;2628
+2630;2001109652;B03000;AMEACA;RUA DOS AFONSOS;156;1319;26/2/2001 00:14:00;CIDADAO COMUM;S;CAB;BOA VISTA;BH;615727.67;800287.75;2629
+2631;2001109693;B06000;LESAO CORPORAL;RUA RIO GRANDE;719;97238;26/2/2001 00:33:00;CIDADAO COMUM;N;0;MINASLANDIA;BH;611610.44;804160.03;2630
+2632;2001109701;B06000;LESAO CORPORAL;RUA JOAQUIM TEIX;63;38207;26/2/2001 00:40:00;CIDADAO COMUM;S;0;CARDOSO;BH;604078.65;788100.48;2631
+2633;2001109706;B03000;AMEACA;RUA DOIS;12;27130;26/2/2001 00:42:00;CIDADAO COMUM;S;;PAULO SEXTO;BH;616403.95;806778.34;2632
+2634;2001109712;B03000;AMEACA;RUA NOVE;75;81013;26/2/2001 00:44:00;CIDADAO COMUM;S;;NOVA CINTRA;BH;605202.66;793145.62;2633
+2635;2001109814;B03000;AMEACA;RUA FAISAO;730;27710;26/2/2001 01:49:00;INICIATIVA;S;0;FLAVIO MARQUES D;BH;605277.76;788638.67;2634
+2636;2001109878;B05000;SEQUESTRO E CARC;RUA LASSANCE;235;84415;26/2/2001 02:31:00;CIDADAO COMUM;N;0;SAO GERALDO;BH;615719.21;799981.01;2635
+2637;2001109955;B06000;LESAO CORPORAL;RUA CRISTAL;256;18611;26/2/2001 03:26:00;CIDADAO COMUM;S;;SANTA TEREZA;BH;612735.35;797203.71;2636
+2638;2001110036;B06000;LESAO CORPORAL;AV ASSIS CHATEAU;526;6353;26/2/2001 04:50:00;INICIATIVA;S;0;FLORESTA;BH;611816.86;797247.91;2637
+2639;2001110038;B06000;LESAO CORPORAL;RUA SILVA ALVARE;271;65810;26/2/2001 04:53:00;CIDADAO COMUM;S;0;SAO GERALDO;BH;615444.32;799061.06;2638
+2640;2001110067;B03000;AMEACA;RUA PAULO BRANDA;286;52710;26/2/2001 05:48:00;CIDADAO COMUM;S;CAB;SANTA EFIGENIA;BH;613634.47;796180.78;2639
+2641;2001110086;B06000;LESAO CORPORAL;RUA DOUTOR RIBEI;38;23650;26/2/2001 06:13:00;CIDADAO COMUM;N;0;DAS INDUSTRIAS;BH;603413.75;793166.39;2640
+2642;2001110279;B06000;LESAO CORPORAL;RUA CONDOR;425;16773;26/2/2001 09:43:00;CIDADAO COMUM;N;0;NOVA CINTRA;BH;605857.42;793824.01;2641
+2643;2001110342;B03000;AMEACA;RUA ATTILIO DE M;456;111630;26/2/2001 10:35:00;CIDADAO COMUM;N;0;DIAMANTE;BH;601519.35;789800.80;2642
+2644;2001110411;B04001;HOMICIDIO TENTAD;RUA TREZE;98;302331;26/2/2001 11:28:00;CIDADAO COMUM;N;;BONSUCESSO;BH;606355.86;789862.18;2643
+2645;2001110507;B03000;AMEACA;RUA JAGUARIBE;116;36822;26/2/2001 12:38:00;CIDADAO COMUM;S;;CONCORDIA;BH;610734.26;799522.66;2644
+2646;2001110624;B06000;LESAO CORPORAL;RUA JAGUARIBE;116;36822;26/2/2001 14:27:00;CIDADAO COMUM;N;CAB;CONCORDIA;BH;610734.26;799522.66;2645
+2647;2001110638;B06000;LESAO CORPORAL;RUA JOAO SILVA;45;89548;26/2/2001 14:31:00;CIDADAO COMUM;N;0;JARDIM VITORIA;BH;617433.32;804609.88;2646
+2648;2001110661;B03000;AMEACA;RUA ALBERTO MART;221;85244;26/2/2001 15:02:00;CIDADAO COMUM;S;0;JAQUELINE;BH;610706.28;810149.56;2647
+2649;2001110667;B03000;AMEACA;RUA FELICIO ROXO;5;27912;26/2/2001 15:04:00;CIDADAO COMUM;S;;SANTA CRUZ;BH;611328.66;801692.14;2648
+2650;2001110674;B04001;HOMICIDIO TENTAD;RUA CAMETA;89;11883;26/2/2001 15:08:00;CIDADAO COMUM;S;;SAUDADE;BH;615105.71;797645.06;2649
+2651;2001110683;B06000;LESAO CORPORAL;RUA TRES;10;126837;26/2/2001 15:13:00;CIDADAO COMUM;S;;CONJUNTO VISTA A;BH;605133.98;792598.37;2650
+2652;2001110693;B04001;HOMICIDIO TENTAD;RUA ESTANISLAU P;18;86842;26/2/2001 15:24:00;INICIATIVA;N;0;CEU AZUL;BH;603281.88;806905.01;2651
+2653;2001110699;B03000;AMEACA;RUA CLORITA;100;16051;26/2/2001 15:26:00;CIDADAO COMUM;S;0;SANTA TEREZA;BH;612847.22;797209.80;2652
+2654;2001110730;B06000;LESAO CORPORAL;RUA FELISBURGO;108;3950;26/2/2001 15:45:00;CIDADAO COMUM;S;;PROVIDENCIA;BH;612659.95;804501.51;2653
+2655;2001110764;B03000;AMEACA;RUA DOS JAVAES;315;37198;26/2/2001 16:11:00;CIDADAO COMUM;S;;SANTA MONICA;BH;606537.47;807752.17;2654
+2656;2001110773;B03000;AMEACA;AV AMAZONAS;6556;3140;26/2/2001 16:15:00;CIDADAO COMUM;S;0;GAMELEIRA;BH;605457.51;795682.06;2655
+2657;2001110801;B03000;AMEACA;RUA TUCA;80;69808;26/2/2001 16:32:00;CIDADAO COMUM;S;;MARIA GORETTI;BH;614229.42;803814.92;2656
+2658;2001110831;B06000;LESAO CORPORAL;RUA BERTOPOLIS;256;41873;26/2/2001 16:48:00;CIDADAO COMUM;S;0;PROVIDENCIA;BH;612487.20;804200.25;2657
+2659;2001110881;B03000;AMEACA;RUA COSME E DAMI;444;18246;26/2/2001 17:21:00;CIDADAO COMUM;N;;UNIVERSITARIO;BH;610495.10;802666.38;2658
+2660;2001110889;B06000;LESAO CORPORAL;RUA GERALDO MART;143;86086;26/2/2001 17:25:00;CIDADAO COMUM;N;0;JAQUELINE;BH;611308.77;810320.43;2659
+2661;2001110918;B06000;LESAO CORPORAL;RUA MAJOR DELFIN;2614;42620;26/2/2001 17:40:00;CIDADAO COMUM;S;0;SAO FRANCISCO;BH;608955.78;801400.33;2660
+2662;2001110968;B06000;LESAO CORPORAL;RUA BANDEIRANTES;42;71908;26/2/2001 18:13:00;CIDADAO COMUM;S;CAFR;NOVA CINTRA;BH;606042.17;793837.55;2661
+2663;2001111064;B06000;LESAO CORPORAL;RUA ANTONIO BICA;69;84875;26/2/2001 19:08:00;CIDADAO COMUM;N;0;DA LAGOA;BH;604696.70;809222.53;2662
+2664;2001111071;B03000;AMEACA;RUA PADRE CAFE;1230;51253;26/2/2001 19:12:00;CIDADAO COMUM;S;;VERA CRUZ;BH;616158.27;797878.23;2663
+2665;2001111077;B03000;AMEACA;RUA LEOPOLDO GOM;241;40770;26/2/2001 19:16:00;CIDADAO COMUM;N;;POMPEIA;BH;614535.33;797876.85;2664
+2666;2001111203;B03000;AMEACA;RUA JORNALISTA C;185;120682;26/2/2001 20:26:00;CIDADAO COMUM;S;0;CHACARAS REUNIDA;BH;605748.54;789323.77;2665
+2667;2001111212;B03000;AMEACA;RUA ALBERTO MART;221;85244;26/2/2001 20:28:00;CIDADAO COMUM;N;0;JAQUELINE;BH;610706.28;810149.56;2666
+2668;2001111280;B04001;HOMICIDIO TENTAD;RUA ANAPURUS;79;20894;26/2/2001 21:07:00;INICIATIVA;S;0;SAO GABRIEL;BH;613199.76;804134.53;2667
+2669;2001111334;B04002;HOMICIDIO CONSUM;ESTRADA DO CERCA;2700;26428;26/2/2001 21:34:00;CIDADAO COMUM;N;;HAVAI;BH;607731.88;793293.52;2668
+2670;2001111478;B06000;LESAO CORPORAL;RUA CONSELHEIRO ;2555;17095;26/2/2001 22:58:00;CIDADAO COMUM;S;0;SANTA EFIGENIA;BH;613979.96;797400.79;2669
+2671;2001111532;B04001;HOMICIDIO TENTAD;RUA JOSE FELIX M;800;7416;26/2/2001 23:29:00;CIDADAO COMUM;N;;MANTIQUEIRA;BH;606465.11;810558.08;2670
+2672;2001111562;B06000;LESAO CORPORAL;RUA ABILIO FERNA;195;95421;26/2/2001 23:43:00;CIDADAO COMUM;N;0;JARDIM VITORIA;BH;616838.69;804321.77;2671
+2673;2001111585;B06000;LESAO CORPORAL;RUA MICA;159;45685;26/2/2001 23:59:00;CIDADAO COMUM;S;0;SAO LUCAS;BH;613254.73;795968.68;2672
+2674;2001111600;B06000;LESAO CORPORAL;RUA MANJERICAO;543;34464;27/2/2001 00:09:00;CIDADAO COMUM;N;;LINDEIA;BH;599654.37;791207.03;2673
+2675;2001111659;B06000;LESAO CORPORAL;RUA DOS BENEDITI;85;63310;27/2/2001 00:57:00;CIDADAO COMUM;S;;PLANALTO;BH;610768.63;805419.05;2674
+2676;2001111732;B06000;LESAO CORPORAL;RUA DAS GABIROBA;95;30375;27/2/2001 01:40:00;CIDADAO COMUM;N;PRONTO SOCORRO J;VILA CLORIS;BH;610034.72;808298.49;2675
+2677;2001111738;B06000;LESAO CORPORAL;AV SANTOS DUMONT;477;61950;27/2/2001 01:48:00;CIDADAO COMUM;N;0;CENTRO (BH);BH;611172.34;797512.69;2676
+2678;2001111758;B06000;LESAO CORPORAL;RUA FRANCISCO LE;422;29495;27/2/2001 02:04:00;CIDADAO COMUM;N;0;SAO MARCOS;BH;614241.44;802567.46;2677
+2679;2001111784;B03000;AMEACA;RUA HUMAITA;47;33562;27/2/2001 02:20:00;CIDADAO COMUM;S;0;PADRE EUSTAQUIO;BH;607640.09;796954.54;2678
+2680;2001111829;B06000;LESAO CORPORAL;AV SANTOS DUMONT;574;61950;27/2/2001 02:58:00;INICIATIVA;S;0;CENTRO (BH);BH;611085.24;797586.10;2679
+2681;2001111903;B06000;LESAO CORPORAL;AV PARANA;368;52230;27/2/2001 04:17:00;POLICIAL MILITAR;S;;CENTRO (BH);BH;610721.21;797160.64;2680
+2682;2001111924;B06000;LESAO CORPORAL;AV CRISTIANO MAC;1460;18652;27/2/2001 04:39:00;INICIATIVA;S;0;CELESTINO;BH;612408.10;799806.41;2681
+2683;2001111936;B03000;AMEACA;AV ESPLANADA;56;126244;27/2/2001 04:57:00;CIDADAO COMUM;S;;SAO GABRIEL;BH;613206.75;804342.60;2682
+2684;2001111982;B02000;RIXA;AV DOS ANDRADAS;377;3761;27/2/2001 06:11:00;INICIATIVA;N;0;CENTRO (BH);BH;611545.35;797222.18;2683
+2685;2001112028;B06000;LESAO CORPORAL;RUA RUI GUERRA;90;301669;27/2/2001 07:26:00;CIDADAO COMUM;S;;VILA CAFEZAL;BH;614477.59;795128.95;2684
+2686;2001112105;B03000;AMEACA;RUA DAS CARMELIT;103;121401;27/2/2001 08:30:00;CIDADAO COMUM;N;;PLANALTO;BH;610572.62;805546.84;2685
+2687;2001112380;B04002;HOMICIDIO CONSUM;RUA SAUL;22;170891;27/2/2001 12:29:00;CIDADAO COMUM;S;0;MORRO DAS PEDRAS;BH;608144.99;793571.20;2686
+2688;2001112418;B03000;AMEACA;RUA ROSALINA BAN;215;59302;27/2/2001 13:01:00;CIDADAO COMUM;S;;MINASLANDIA;BH;611890.83;803991.25;2687
+2689;2001112444;B03000;AMEACA;RUA RAMIRO SIQUE;45;128858;27/2/2001 13:30:00;CIDADAO COMUM;N;;CASTANHEIRAS (TA;BH;617763.55;797138.45;2688
+2690;2001112456;B03000;AMEACA;RUA NANA;689;47186;27/2/2001 13:47:00;CIDADAO COMUM;S;0;MILIONARIOS;BH;603866.49;789493.30;2689
+2691;2001112459;B03000;AMEACA;RUA ALTINOPOLIS;829;36296;27/2/2001 13:49:00;CIDADAO COMUM;S;LJA;PIRATININGA;BH;605549.05;809289.01;2690
+2692;2001112463;B06000;LESAO CORPORAL;RUA DA PEDREIRA;347;301298;27/2/2001 13:52:00;CIDADAO COMUM;S;;MORRO DAS PEDRAS;BH;608679.64;794084.76;2691
+2693;2001112488;B06000;LESAO CORPORAL;RUA JERUSALEM;348;37320;27/2/2001 14:13:00;INICIATIVA;S;0;SAO SALVADOR;BH;603256.17;799675.78;2692
+2694;2001112512;B06000;LESAO CORPORAL;RUA DOUTOR CRIST;175;55598;27/2/2001 14:33:00;INICIATIVA;S;0;BONSUCESSO;BH;604650.82;789126.07;2693
+2695;2001112597;B03000;AMEACA;RUA DR JOSE ERNE;26;1362;27/2/2001 15:32:00;CIDADAO COMUM;S;FU;JARDIM MONTANHES;BH;606642.37;799044.19;2694
+2696;2001112615;B03000;AMEACA;RUA JOSE BARBOSA;675;85304;27/2/2001 15:47:00;CIDADAO COMUM;S;0;JAQUELINE;BH;610743.31;810454.35;2695
+2697;2001112618;B03000;AMEACA;RUA DOMICIO GABR;407;14623;27/2/2001 15:49:00;CIDADAO COMUM;S;;CH VALE DO JATOB;BH;600606.12;787280.28;2696
+2698;2001112636;B03000;AMEACA;RUA FRANCISCO DU;1057;46316;27/2/2001 16:04:00;CIDADAO COMUM;S;;SANTA TEREZINHA;BH;604095.29;803005.00;2697
+2699;2001112670;B03000;AMEACA;AV DORA TOMICH L;135;100060;27/2/2001 16:19:00;CIDADAO COMUM;S;;BRAUNAS;BH;604689.70;805481.65;2698
+2700;2001112701;B06000;LESAO CORPORAL;RUA COUTO DE MAG;271;18463;27/2/2001 16:32:00;CIDADAO COMUM;S;;PARAISO;BH;614290.78;796749.32;2699
+2701;2001112722;B06000;LESAO CORPORAL;RUA PAU BRASIL;516;109401;27/2/2001 16:39:00;CIDADAO COMUM;N;SOLIMOES;SOLIMOES;BH;612440.90;807719.97;2700
+2702;2001112740;B04001;HOMICIDIO TENTAD;RUA GUAICURUS;538;32009;27/2/2001 16:56:00;INICIATIVA;S;0;CENTRO BH;BH;611143.63;797659.74;2701
+2703;2001112787;B06000;LESAO CORPORAL;RUA ESTORIL;1507;63827;27/2/2001 17:31:00;CIDADAO COMUM;S;;SAO FRANCISCO;BH;608967.89;801689.91;2702
+2704;2001112797;B03000;AMEACA;RUA MIKHAIL NIME;88;130481;27/2/2001 17:38:00;INICIATIVA;S;0;HELIOPOLIS;BH;611319.96;805188.66;2703
+2705;2001112830;B03000;AMEACA;RUA MARIO SOARES;492;44641;27/2/2001 17:56:00;CIDADAO COMUM;N;0;DOM BOSCO;BH;604170.41;797305.50;2704
+2706;2001112918;B04002;HOMICIDIO CONSUM;RUA PADRE PEDRO ;175;51657;27/2/2001 18:48:00;POLICIAL MILITAR;N;0;VENDA NOVA;BH;609671.68;808130.71;2705
+2707;2001112963;B04002;HOMICIDIO CONSUM;RUA CANDIDO DE S;840;12628;27/2/2001 19:07:00;CIDADAO COMUM;N;0;GAMELEIRA;BH;605603.59;794333.92;2706
+2708;2001112972;B03000;AMEACA;ALAMEDA CHICO ME;100;96018;27/2/2001 19:13:00;CIDADAO COMUM;N;;VILA CASTANHEIRA;BH;601310.13;788681.30;2707
+2709;2001112973;B04001;HOMICIDIO TENTAD;AV GUARATA;633;32267;27/2/2001 19:13:00;CIDADAO COMUM;S;;PRADO;BH;608528.64;797229.38;2708
+2710;2001113033;B06000;LESAO CORPORAL;AV NELIO CERQUEI;15;72359;27/2/2001 19:44:00;CIDADAO COMUM;S;;TIROL;BH;600947.66;789885.51;2709
+2711;2001113064;B03000;AMEACA;RUA PONTE NOVA;354;54655;27/2/2001 19:57:00;POLICIAL MILITAR;S;;COLEGIO BATISTA;BH;611261.34;798370.33;2710
+2712;2001113095;B03000;AMEACA;AV MANOEL GOMES;106;43103;27/2/2001 20:16:00;CIDADAO COMUM;S;;NOVA CACHOEIRINH;BH;609780.82;801385.63;2711
+2713;2001113141;B03000;AMEACA;AV CRISTIANO MAC;1616;18652;27/2/2001 20:38:00;CIDADAO COMUM;S;0;CIDADE NOVA;BH;612314.39;800010.13;2712
+2714;2001113202;B03000;AMEACA;RUA DEPUTADO SEB;923;89724;27/2/2001 21:14:00;CIDADAO COMUM;N;0;PALMEIRAS;BH;606848.85;790779.26;2713
+2715;2001113227;B03000;AMEACA;RUA TAPIRA;20;66939;27/2/2001 21:23:00;CIDADAO COMUM;N;FE;CONCORDIA;BH;610810.13;799594.08;2714
+2716;2001113261;B06000;LESAO CORPORAL;RUA JOSE HONORAT;320;100826;27/2/2001 21:38:00;CIDADAO COMUM;S;CAFU;JARDIM GUANABARA;BH;611008.01;807522.85;2715
+2717;2001113288;B03000;AMEACA;RUA STIBINA;279;66434;27/2/2001 21:49:00;CIDADAO COMUM;S;;SANTA EFIGENIA;BH;614304.97;796464.86;2716
+2718;2001113371;B03000;AMEACA;RUA OSWALDO GOEL;68;97470;27/2/2001 22:23:00;CIDADAO COMUM;N;;TUPI;BH;613632.96;806410.86;2717
+2719;2001113386;B03000;AMEACA;RUA ANTONIO DA C;132;98937;27/2/2001 22:31:00;CIDADAO COMUM;S;0;LAGOA;BH;604752.28;809599.37;2718
+2720;2001113418;B06000;LESAO CORPORAL;PRACA MINERVA;39;45833;27/2/2001 22:45:00;INICIATIVA;N;0;PROFESSOR WASHIN;IB;598848.60;789287.98;2719
+2721;2001113482;B03000;AMEACA;RUA MARECHAL RON;108;43677;27/2/2001 23:17:00;CIDADAO COMUM;S;;PRIMEIRO DE MAIO;BH;611883.66;803480.80;2720
+2722;2001113492;B06000;LESAO CORPORAL;RUA AGUA DE COLO;12;105570;27/2/2001 23:25:00;CIDADAO COMUM;N;;ANTONIO RIBEIRO ;BH;616067.52;806207.89;2721
+2723;2001113519;B03000;AMEACA;RUA DES SARAIVA;931;66535;27/2/2001 23:43:00;CIDADAO COMUM;S;;VERA CRUZ;BH;616054.70;797928.23;2722
+2724;2001113572;B06000;LESAO CORPORAL;RUA ANTONIO JOSE;216;7431;28/2/2001 00:25:00;INICIATIVA;S;0;CEU AZUL;BH;605133.43;807821.38;2723
+2725;2001113731;B03000;AMEACA;RUA SAFIRA;95;59835;28/2/2001 02:24:00;INICIATIVA;S;0;PRADO;BH;608617.43;796702.89;2724
+2726;2001113752;B06000;LESAO CORPORAL;RUA OSWALDO GOEL;68;97470;28/2/2001 02:37:00;CIDADAO COMUM;N;;TUPI;BH;613632.96;806410.86;2725
+2727;2001113759;B04001;HOMICIDIO TENTAD;AV DOM PEDRO II;4205;53145;28/2/2001 02:43:00;INICIATIVA;S;0;PADRE EUSTAQUIO;BH;606744.93;797901.91;2726
+2728;2001113860;B04001;HOMICIDIO TENTAD;ESTRADA DOS BORG;5;85893;28/2/2001 04:34:00;INICIATIVA;S;0;JARDIM VITORIA;BH;616433.49;804527.60;2727
+2729;2001114009;B03000;AMEACA;RUA FORMIGA;50;29136;28/2/2001 07:58:00;CIDADAO COMUM;S;;SAO CRISTOVAO;BH;610336.11;798756.88;2728
+2730;2001114092;B04001;HOMICIDIO TENTAD;AV PRESIDENTE AN;3710;4461;28/2/2001 09:09:00;CIDADAO COMUM;S;;CACHOEIRINHA;BH;609808.70;801577.71;2729
+2731;2001114187;B03000;AMEACA;RUA DR JOSE ERNE;26;1362;28/2/2001 10:07:00;CIDADAO COMUM;S;FU;JARDIM MONTANHES;BH;606642.37;799044.19;2730
+2732;2001114239;B06000;LESAO CORPORAL;AV BARBACENA;415;8084;28/2/2001 10:44:00;CIDADAO COMUM;S;;BARRO PRETO;BH;609507.27;796845.22;2731
+2733;2001114276;B03000;AMEACA;RUA CIRILO GASPA;326;63348;28/2/2001 11:20:00;CIDADAO COMUM;S;;APARECIDA SETIMA;BH;608684.85;800162.78;2732
+2734;2001114472;B03000;AMEACA;RUA PROFESSOR JO;95;55529;28/2/2001 14:08:00;CIDADAO COMUM;N;0;CONCORDIA;BH;611231.92;799402.77;2733
+2735;2001114499;B04001;HOMICIDIO TENTAD;AV CECILIA PINTO;33;14447;28/2/2001 14:32:00;CIDADAO COMUM;S;0;SAO BERNARDO;BH;610600.26;805253.80;2734
+2736;2001114536;B03000;AMEACA;RUA DOS MACARICO;158;42170;28/2/2001 14:54:00;CIDADAO COMUM;S;AP04;VILA CLORIS;BH;610202.02;807689.91;2735
+2737;2001114552;B06000;LESAO CORPORAL;RUA MARCAZITA;162;43488;28/2/2001 15:07:00;CIDADAO COMUM;N;0;SAO CRISTOVAO;BH;610040.06;799407.54;2736
+2738;2001114596;B03000;AMEACA;AV JOAO XXIII;41;37926;28/2/2001 15:34:00;INICIATIVA;N;0;CONJUNTO ALIPIO ;BH;604194.53;799545.38;2737
+2739;2001114644;B03000;AMEACA;RUA AGRIPINO GRI;86;1450;28/2/2001 15:57:00;CIDADAO COMUM;S;0;TUPI;BH;613304.20;806016.33;2738
+2740;2001114678;B03000;AMEACA;RUA ITABIRA;493;35237;28/2/2001 16:16:00;CIDADAO COMUM;N;AP102;LAGOINHA;BH;610931.11;798451.36;2739
+2741;2001114681;B06000;LESAO CORPORAL;RUA OSCAR LOBO P;270;104480;28/2/2001 16:18:00;CIDADAO COMUM;S;;PRIMEIRO DE MAIO;BH;612347.11;803516.89;2740
+2742;2001114688;B04001;HOMICIDIO TENTAD;RUA MUNIZ;100;170850;28/2/2001 16:25:00;INICIATIVA;S;0;MORRO DAS PEDRAS;BH;608081.16;793922.64;2741
+2743;2001114757;B03000;AMEACA;RUA ASTOLFO DUTR;542;6426;28/2/2001 17:12:00;INICIATIVA;S;0;ESPLANADA;BH;615215.48;798283.62;2742
+2744;2001114765;B06000;LESAO CORPORAL;RUA PIRATUBA;71;54236;28/2/2001 17:17:00;CIDADAO COMUM;N;0;SANTO ANDRE;BH;609779.72;799545.81;2743
+2745;2001114779;B03000;AMEACA;RUA DOS GUAJAJAR;1268;32037;28/2/2001 17:26:00;CIDADAO COMUM;S;AP2822;SANTO AGOSTINHO;BH;610359.02;796667.12;2744
+2746;2001114924;B03000;AMEACA;RUA CAMPANARIO;557;12010;28/2/2001 19:05:00;CIDADAO COMUM;S;;SANTA INES;BH;614359.44;800809.14;2745
+2747;2001114998;B04001;HOMICIDIO TENTAD;BECO UNIAO;5;302591;28/2/2001 19:58:00;CIDADAO COMUM;N;;HORIZONTE (NEVES;RN;603390.24;807473.62;2746
+2748;2001115013;B03000;AMEACA;RUA HILDEBRANDO ;304;129788;28/2/2001 20:09:00;CIDADAO COMUM;S;0;COPACABANA;BH;606515.65;806259.16;2747
+2749;2001115022;B03000;AMEACA;RUA BOM DESPACHO;390;9944;28/2/2001 20:16:00;CIDADAO COMUM;S;0;SANTA TEREZA;BH;614081.01;797685.62;2748
+2750;2001115062;B08000;VIOLACAO DE DOMI;AV FRANCISCO SA;55;29656;28/2/2001 20:42:00;CIDADAO COMUM;S;;PRADO;BH;609022.99;796771.47;2749
+2751;2001115065;B06000;LESAO CORPORAL;RUA CAETANO PIRR;520;45773;28/2/2001 20:44:00;INICIATIVA;S;0;MILIONARIOS;BH;604100.25;790093.56;2750
+2752;2001115077;B06000;LESAO CORPORAL;RUA JABOTICABAL;822;36517;28/2/2001 20:52:00;CIDADAO COMUM;S;0;JARDIM AMERICA;BH;607756.01;794117.46;2751
+2753;2001115118;B06000;LESAO CORPORAL;AV CIVILIZACAO;911;51657;28/2/2001 21:20:00;CIDADAO COMUM;N;BL12 APTO203;JARDIM FLORENCIA;BH;609133.74;808652.87;2752
+2754;2001115135;B06000;LESAO CORPORAL;RUA YUCATAN;8;36302;28/2/2001 21:33:00;INICIATIVA;S;0;SAO PEDRO;BH;611235.19;793829.00;2753
+2755;2001115172;B03000;AMEACA;AV JOAO FIRMINO ;249;47259;28/2/2001 21:55:00;CIDADAO COMUM;S;;VILA CASTANHEIRA;BH;601168.35;788608.66;2754
+2756;2001115204;B03000;AMEACA;RUA AUGUSTO DE A;189;6643;28/2/2001 22:18:00;CIDADAO COMUM;S;0;BOA VISTA;BH;615915.90;799869.09;2755
+2757;2001115225;B06000;LESAO CORPORAL;RUA DOUTOR BENED;2090;12252;28/2/2001 22:34:00;CIDADAO COMUM;S;;ANTONIO RIBEIRO ;BH;613267.66;805156.63;2756
+2758;2001115248;B03000;AMEACA;RUA JOSE MAURICI;97;58035;28/2/2001 22:54:00;CIDADAO COMUM;S;CAA;VILA HUMAITA;BH;610284.60;801833.76;2757
+2759;2001115326;B06000;LESAO CORPORAL;RUA JOSE MARIA B;373;38380;28/2/2001 23:39:00;CIDADAO COMUM;S;0;SANTA MONICA;BH;607751.02;807597.60;2758
+2760;2001115488;B03000;AMEACA;AV NELIO CERQUEI;15;72359;1/3/2001 02:40:00;CIDADAO COMUM;S;0;TIROL;BH;600947.66;789885.51;2759
+2761;2001115505;B03000;AMEACA;RUA EMILIO RICAL;141;102806;1/3/2001 03:07:00;CIDADAO COMUM;S;AP104;JOAO PINHEIRO;BH;605108.25;795890.74;2760
+2762;2001115858;B03000;AMEACA;RUA FERREIRA DOS;95;28234;1/3/2001 10:05:00;CIDADAO COMUM;S;;PIRAJA;BH;613165.96;802804.35;2761
+2763;2001115889;B03000;AMEACA;RUA ALVARES MACI;670;2756;1/3/2001 10:50:00;CIDADAO COMUM;S;0;SANTA EFIGENIA;BH;612469.08;796685.32;2762
+2764;2001115966;B03000;AMEACA;RUA CORNELIO CER;753;17417;1/3/2001 11:36:00;CIDADAO COMUM;S;;PADRE EUSTAQUIO;BH;605629.54;797930.61;2763
+2765;2001115976;B03000;AMEACA;RUA Q;144;78415;1/3/2001 11:44:00;CIDADAO COMUM;N;;VILA PINHO;BH;602175.50;788033.53;2764
+2766;2001115985;B03000;AMEACA;RUA MARIA AMELIA;841;43812;1/3/2001 11:56:00;CIDADAO COMUM;N;;SAO BERNARDO;BH;610257.12;805510.06;2765
+2767;2001116096;B04001;HOMICIDIO TENTAD;RUA BOGOTA;23;9856;1/3/2001 13:19:00;CIDADAO COMUM;S;CASA C;JARDIM AMERICA;BH;607651.60;794611.02;2766
+2768;2001116146;B06000;LESAO CORPORAL;RUA CRISANTEMO;210;18564;1/3/2001 13:57:00;CIDADAO COMUM;S;;MARAJO;BH;606640.47;793158.42;2767
+2769;2001116150;B03000;AMEACA;RUA JOSE ISIDORO;67;38869;1/3/2001 13:58:00;CIDADAO COMUM;S;0;MARIA GORETTI;BH;614288.39;803379.27;2768
+2770;2001116165;B03000;AMEACA;RUA CHAFARIZ;40;300275;1/3/2001 14:09:00;CIDADAO COMUM;S;CAB;HAVAI;BH;607407.04;793804.07;2769
+2771;2001116187;B04001;HOMICIDIO TENTAD;RUA CORCOVADO;1133;14894;1/3/2001 14:26:00;CIDADAO COMUM;S;;JARDIM AMERICA;BH;607494.97;794011.81;2770
+2772;2001116188;B06000;LESAO CORPORAL;RUA PASSA QUATRO;325;52420;1/3/2001 14:26:00;CIDADAO COMUM;S;AP02;CAICARA;BH;607592.67;799403.42;2771
+2773;2001116190;B03000;AMEACA;RUA SAO RAFAEL;138;63580;1/3/2001 14:26:00;CIDADAO COMUM;N;;FLORESTA;BH;612241.79;798264.50;2772
+2774;2001116251;B06000;LESAO CORPORAL;RUA DEMETRIO RIB;1363;19797;1/3/2001 15:03:00;CIDADAO COMUM;S;0;SAUDADE;BH;615883.06;797293.92;2773
+2775;2001116256;B03000;AMEACA;RUA MARCO ANTONI;53;54829;1/3/2001 15:06:00;CIDADAO COMUM;N;0;MARIA VIRGINIA;BH;612035.38;802855.52;2774
+2776;2001116258;B03000;AMEACA;RUA MECA;53;45281;1/3/2001 15:06:00;CIDADAO COMUM;S;0;CH BETANIA;BH;605413.35;792348.38;2775
+2777;2001116317;B06000;LESAO CORPORAL;AV BARBACENA;653;8084;1/3/2001 15:52:00;CIDADAO COMUM;S;;BARRO PRETO;BH;609636.01;796640.35;2776
+2778;2001116490;B03000;AMEACA;RUA AUGUSTO DE A;189;6643;1/3/2001 17:28:00;CIDADAO COMUM;S;0;BOA VISTA;BH;615915.90;799869.09;2777
+2779;2001116610;B06000;LESAO CORPORAL;RUA WILSON ABRAO;165;113286;1/3/2001 18:27:00;CIDADAO COMUM;N;;MINASCAIXA;BH;608897.10;809883.65;2778
+2780;2001116617;B03000;AMEACA;AV AUGUSTO DE LI;1640;6731;1/3/2001 18:32:00;CIDADAO COMUM;S;;BARRO PRETO;BH;609741.31;796987.79;2779
+2781;2001116619;B03000;AMEACA;RUA JOAQUIM ANAC;23;118932;1/3/2001 18:33:00;INICIATIVA;N;0;TEIXEIRA DIAS;BH;603052.88;789295.61;2780
+2782;2001116923;B03000;AMEACA;RUA GLAUBER ROCH;75;94139;1/3/2001 21:18:00;CIDADAO COMUM;S;0;PAQUETA;BH;605378.45;802809.61;2781
+2783;2001116936;B03000;AMEACA;RUA DARIO FARIA ;352;39240;1/3/2001 21:24:00;CIDADAO COMUM;S;0;DAS INDUSTRIAS;BH;604227.17;792565.96;2782
+2784;2001116939;B06000;LESAO CORPORAL;RUA SAO MIGUEL;995;63410;1/3/2001 21:28:00;CIDADAO COMUM;S;0;ITAPOA;BH;609281.94;805595.11;2783
+2785;2001116945;B03000;AMEACA;RUA PADRE AUGUST;15;51238;1/3/2001 21:32:00;CIDADAO COMUM;S;;HELIOPOLIS;BH;611053.12;806066.34;2784
+2786;2001116973;B06000;LESAO CORPORAL;RUA DA PEDREIRA;328;301298;1/3/2001 21:50:00;CIDADAO COMUM;N;AGUARDA NA 125 C;MORRO DAS PEDRAS;BH;608618.39;794087.94;2785
+2787;2001117029;B04001;HOMICIDIO TENTAD;RUA BARAO DE COR;45;7910;1/3/2001 22:26:00;CIDADAO COMUM;S;0;SAO TOMAZ;BH;609532.40;805277.88;2786
+2788;2001117050;B06000;LESAO CORPORAL;RUA MUCURI;5;46880;1/3/2001 22:38:00;INICIATIVA;N;0;FLORESTA;BH;612422.07;797232.88;2787
+2789;2001117063;B06000;LESAO CORPORAL;RUA FREI ZACARIA;330;37610;1/3/2001 22:46:00;CIDADAO COMUM;S;;SARANDI (URCA/BH;BH;603812.96;802146.64;2788
+2790;2001117079;B03000;AMEACA;RUA CLORITA;100;16051;1/3/2001 22:57:00;CIDADAO COMUM;N;0;SANTA TEREZA;BH;612847.22;797209.80;2789
+2791;2001117099;B03000;AMEACA;RUA JOSE LUIZ DI;406;83945;1/3/2001 23:11:00;CIDADAO COMUM;S;0;ARAGUAIA;BH;605070.02;789748.80;2790
+2792;2001117103;B06000;LESAO CORPORAL;RUA ANTONIO EUST;85;72103;1/3/2001 23:14:00;CIDADAO COMUM;S;;TIROL;BH;600127.68;789465.93;2791
+2793;2001117130;B06000;LESAO CORPORAL;RUA PAI TOMAS;90;51760;1/3/2001 23:33:00;CIDADAO COMUM;N;CA;CABANA;BH;604944.65;794453.85;2792
+2794;2001117136;B03000;AMEACA;RUA FERNAO DIAS;60;28133;1/3/2001 23:41:00;INICIATIVA;S;0;CASA BRANCA;BH;616318.93;799741.71;2793
+2795;2001117223;B04002;HOMICIDIO CONSUM;RUA HUMAITA;1234;33562;2/3/2001 01:09:00;CIDADAO COMUM;N;CAA;PADRE EUSTAQUIO;BH;606390.98;797020.45;2794
+2796;2001117236;B03000;AMEACA;AV AUGUSTO DE LI;46;6731;2/3/2001 01:25:00;INICIATIVA;N;0;CENTRO BH;BH;611284.46;796568.91;2795
+2797;2001117250;B08000;VIOLACAO DE DOMI;RUA PIRATININGA;225;54150;2/3/2001 01:45:00;CIDADAO COMUM;S;CS;CARDOSO;BH;603928.77;788099.60;2796
+2798;2001117262;B03000;AMEACA;RUA CARMESIA;617;13618;2/3/2001 01:57:00;CIDADAO COMUM;S;;SANTA INES;BH;614301.69;800789.19;2797
+2799;2001117363;B06000;LESAO CORPORAL;AV CRISTIANO MAC;10727;18652;2/3/2001 04:13:00;INICIATIVA;N;0;VILA CLORIS;BH;611116.34;806188.75;2798
+2800;2001117372;B04001;HOMICIDIO TENTAD;RUA DOS COMANCHE;105;16367;2/3/2001 04:35:00;INICIATIVA;N;0;ITAMARATI;BH;606988.32;806826.23;2799
+2801;2001117503;B06000;LESAO CORPORAL;RUA COSTA MACHAD;382;18334;2/3/2001 07:55:00;CIDADAO COMUM;N;;UNIVERSITARIO;BH;610772.74;802837.58;2800
+2802;2001117571;B04001;HOMICIDIO TENTAD;RUA VIGIA;185;71977;2/3/2001 08:42:00;CIDADAO COMUM;N;;SAO GERALDO;BH;615575.02;798840.43;2801
+2803;2001117677;B09000;ABANDONO DE INCA;RUA ABAIBA;289;561;2/3/2001 09:50:00;CIDADAO COMUM;S;;SAO PAULO;BH;612405.72;802787.54;2802
+2804;2001117690;B03000;AMEACA;RUA JORDAO;100;96090;2/3/2001 10:01:00;CIDADAO COMUM;N;;OLARIA;BH;601797.43;789255.76;2803
+2805;2001117733;B08000;VIOLACAO DE DOMI;AV SEN LEVINDO C;4007;14866;2/3/2001 10:27:00;INICIATIVA;S;0;CH VALE DO JATOB;BH;601309.73;786551.23;2804
+2806;2001117800;B03000;AMEACA;RUA MENDES DE OL;1084;45430;2/3/2001 11:10:00;CIDADAO COMUM;N;0;SANTO ANDRE;BH;609718.74;799470.77;2805
+2807;2001117812;B03000;AMEACA;RUA ALFREDINA AM;220;2251;2/3/2001 11:23:00;CIDADAO COMUM;N;LJ1;MILIONARIOS;BH;604422.87;790414.37;2806
+2808;2001117876;B03000;AMEACA;RUA PADRE CYR AS;57;12091;2/3/2001 12:20:00;CIDADAO COMUM;S;;PRIMEIRO DE MAIO;BH;612109.79;803534.32;2807
+2809;2001117924;B03000;AMEACA;RUA VOLUNTARIOS ;117;73639;2/3/2001 13:01:00;CIDADAO COMUM;N;;IPIRANGA;BH;611544.61;800681.01;2808
+2810;2001117955;B03000;AMEACA;RUA JACUI;2664;36734;2/3/2001 13:20:00;CIDADAO COMUM;S;;NOVA FLORESTA;BH;611427.64;800343.72;2809
+2811;2001117997;B06000;LESAO CORPORAL;AV DOS ANDRADAS;318;3761;2/3/2001 13:47:00;CIDADAO COMUM;S;PX333;CENTRO (BH);BH;611498.16;797301.08;2810
+2812;2001118025;B04001;HOMICIDIO TENTAD;AV RAJA GABAGLIA;1740;57830;2/3/2001 14:01:00;INICIATIVA;N;0;GUTIERREZ;BH;608719.62;793771.09;2811
+2813;2001118066;B03000;AMEACA;AV PRESIDENTE CO;163;55140;2/3/2001 14:27:00;CIDADAO COMUM;N;;DAS INDUSTRIAS;BH;603598.49;792896.47;2812
+2814;2001118095;B06000;LESAO CORPORAL;RUA MORRINHOS;194;46808;2/3/2001 14:43:00;CIDADAO COMUM;S;0;CAETANO FURQUIM;BH;616454.98;798919.85;2813
+2815;2001118103;B03000;AMEACA;RUA AMENDITA;71;3213;2/3/2001 14:49:00;CIDADAO COMUM;S;CSB;FILADELFIA;BH;602278.57;797876.85;2814
+2816;2001118189;B03000;AMEACA;RUA PONTA PORA;45;54601;2/3/2001 15:51:00;CIDADAO COMUM;N;0;SANTA EFIGENIA;BH;613127.25;796831.17;2815
+2817;2001118205;B06000;LESAO CORPORAL;AV LUXEMBURGO;29;127612;2/3/2001 16:01:00;CIDADAO COMUM;S;0;JARDIM EUROPA;BH;607874.09;810280.10;2816
+2818;2001118211;B03000;AMEACA;RUA IARA;370;33751;2/3/2001 16:03:00;CIDADAO COMUM;S;0;POMPEIA;BH;614672.10;797859.09;2817
+2819;2001118329;B06000;LESAO CORPORAL;BECO LORENCO SIL;137;302105;2/3/2001 17:15:00;CIDADAO COMUM;S;;JARDIM LEBLON;BH;605675.37;807175.93;2818
+2820;2001118396;B03000;AMEACA;RUA DONA HONORIN;46;22395;2/3/2001 17:57:00;CIDADAO COMUM;N;CSFR;ENGENHO NOGUEIRA;BH;606991.70;800313.31;2819
+2821;2001118437;B04001;HOMICIDIO TENTAD;RUA MANAIRA;90;96235;2/3/2001 18:19:00;CIDADAO COMUM;S;0;SAO GABRIEL;BH;614046.95;805015.29;2820
+2822;2001118472;B03000;AMEACA;RUA FERNAO DIAS;237;28133;2/3/2001 18:38:00;CIDADAO COMUM;N;CSFR;CASA BRANCA;BH;615994.86;798666.47;2821
+2823;2001118488;B03000;AMEACA;RUA ALEM PARAIBA;274;81357;2/3/2001 18:50:00;CIDADAO COMUM;S;0;BONFIM;BH;610523.78;798150.33;2822
+2824;2001118490;B04001;HOMICIDIO TENTAD;RUA NHONHO BROCH;215;47580;2/3/2001 18:52:00;CIDADAO COMUM;S;;DAS INDUSTRIAS;BH;604663.85;792029.41;2823
+2825;2001118644;B03000;AMEACA;RUA BERNADETH JO;89;94230;2/3/2001 20:18:00;CIDADAO COMUM;S;;CARDOSO;BH;603122.39;788415.38;2824
+2826;2001118646;B03000;AMEACA;RUA ADAMINA;385;993;2/3/2001 20:20:00;CIDADAO COMUM;S;;SANTA TEREZA;BH;613245.80;797540.93;2825
+2827;2001118668;B04001;HOMICIDIO TENTAD;BECO COPACABANA;150;170460;2/3/2001 20:35:00;CIDADAO COMUM;N;;CABANA;BH;604709.11;794310.50;2826
+2828;2001118767;B03000;AMEACA;RUA MANOEL CAYLL;121;43043;2/3/2001 21:31:00;CIDADAO COMUM;S;;HORTO;BH;613259.68;798134.49;2827
+2829;2001118838;B04001;HOMICIDIO TENTAD;RUA GABRO;379;30435;2/3/2001 22:21:00;CIDADAO COMUM;N;0;SANTA TEREZA;BH;612925.79;797244.47;2828
+2830;2001118845;B06000;LESAO CORPORAL;RUA GUARAIBA;98;96291;2/3/2001 22:25:00;CIDADAO COMUM;S;CSA;SAO GABRIEL;BH;614482.79;804612.97;2829
+2831;2001118885;B06000;LESAO CORPORAL;RUA JOAO GUALBER;150;68414;2/3/2001 22:54:00;INICIATIVA;N;0;SAO JOAO BATISTA;BH;608949.69;808085.04;2830
+2832;2001118895;B06000;LESAO CORPORAL;RUA SEIS;84;86174;2/3/2001 22:57:00;CIDADAO COMUM;N;;JAQUELINE;BH;611389.70;810027.38;2831
+2833;2001118896;B03000;AMEACA;RUA LEOPOLDO GOM;148;40770;2/3/2001 22:59:00;CIDADAO COMUM;S;;POMPEIA;BH;614465.15;797866.77;2832
+2834;2001118907;B03000;AMEACA;AV B;346;93643;2/3/2001 23:07:00;CIDADAO COMUM;S;;INDEPENDENCIA;BH;601444.33;786227.25;2833
+2835;2001118950;B03000;AMEACA;RUA ANTONIO TEIX;23;119037;2/3/2001 23:28:00;CIDADAO COMUM;N;;TEIXEIRA DIAS;BH;603001.89;789757.04;2834
+2836;2001118952;B03000;AMEACA;AV DOS ANDRADAS;6001;3761;2/3/2001 23:27:00;CIDADAO COMUM;S;0;VERA CRUZ;BH;615410.70;798622.38;2835
+2837;2001118960;B06000;LESAO CORPORAL;RUA CHACARAS REU;107;120411;2/3/2001 23:35:00;CIDADAO COMUM;S;;CHACARAS REUNIDA;BH;605765.30;789253.09;2836
+2838;2001118963;B03000;AMEACA;RUA BRAGA;155;10332;2/3/2001 23:39:00;CIDADAO COMUM;S;;SALGADO FILHO;BH;607240.53;794200.41;2837
+2839;2001118969;B03000;AMEACA;RUA GASPAR DE LE;45;119720;2/3/2001 23:43:00;CIDADAO COMUM;N;;VERA CRUZ;BH;616869.52;797183.90;2838
+2840;2001119053;B02000;RIXA;AV WALDOMIRO LOB;1536;66548;3/3/2001 00:33:00;CIDADAO COMUM;S;;GUARANI;BH;612089.63;805263.76;2839
+2841;2001119069;B04001;HOMICIDIO TENTAD;RUA JULIO DE CAS;6;39470;3/3/2001 00:45:00;CIDADAO COMUM;S;0;CINQUENTENARIO;BH;606321.36;793163.73;2840
+2842;2001119070;B03000;AMEACA;RUA ORLANDO RODR;20;128630;3/3/2001 00:45:00;CIDADAO COMUM;S;CAA;SALGADO FILHO;BH;607282.69;794204.34;2841
+2843;2001119071;B06000;LESAO CORPORAL;RUA JULIO FERREI;265;20995;3/3/2001 00:46:00;CIDADAO COMUM;S;0;SANTA AMELIA;BH;607245.17;806503.88;2842
+2844;2001119107;B06000;LESAO CORPORAL;RUA JOSE DE ALEN;50;116980;3/3/2001 01:05:00;CIDADAO COMUM;S;;CAPITAO EDUARDO;BH;618262.11;806584.69;2843
+2845;2001119129;B06000;LESAO CORPORAL;AV DOM PEDRO II;4205;53145;3/3/2001 01:15:00;CIDADAO COMUM;S;0;PADRE EUSTAQUIO;BH;606744.93;797901.91;2844
+2846;2001119159;B06000;LESAO CORPORAL;RUA DAS GABIROBA;95;30375;3/3/2001 01:36:00;CIDADAO COMUM;S;;VILA CLORIS;BH;610034.72;808298.49;2845
+2847;2001119180;B03000;AMEACA;RUA ORDALIA;2;50310;3/3/2001 01:59:00;CIDADAO COMUM;S;;PATROCINIO;BH;603533.64;798879.31;2846
+2848;2001119195;B04001;HOMICIDIO TENTAD;RUA MARIA BEATRI;710;43881;3/3/2001 02:04:00;CIDADAO COMUM;N;LJB;HAVAI;BH;606975.56;793180.58;2847
+2849;2001119210;B06000;LESAO CORPORAL;RUA MARCELINA FR;48;124655;3/3/2001 02:16:00;CIDADAO COMUM;S;;JAQUELINE;BH;611484.77;810591.71;2848
+2850;2001119258;B04001;HOMICIDIO TENTAD;AV CRISTIANO MAC;8665;18652;3/3/2001 02:38:00;CIDADAO COMUM;N;;DONA CLARA;BH;611659.92;803708.12;2849
+2851;2001119315;B06000;LESAO CORPORAL;RUA ESMERALDO BO;255;75650;3/3/2001 03:28:00;CIDADAO COMUM;N;201;BURITIS;BH;608019.94;790475.98;2850
+2852;2001119344;B06000;LESAO CORPORAL;AV SANTOS DUMONT;270;61950;3/3/2001 03:56:00;CIDADAO COMUM;N;0;CENTRO (BH);BH;611379.38;797507.11;2851
+2853;2001119367;B03000;AMEACA;RUA LEOPOLDO GOM;1591;40770;3/3/2001 04:14:00;CIDADAO COMUM;N;;VERA CRUZ;BH;615861.34;798144.40;2852
+2854;2001119377;B04001;HOMICIDIO TENTAD;AV VEREADOR CICE;105;19756;3/3/2001 04:20:00;INICIATIVA;N;0;CORACAO EUCARIST;BH;605300.75;796090.62;2853
+2855;2001119403;B03000;AMEACA;RUA PIRANGUINHO;145;54122;3/3/2001 04:52:00;CIDADAO COMUM;S;;SAO GERALDO;BH;616037.88;799139.11;2854
+2856;2001119419;B06000;LESAO CORPORAL;RUA AARAO REIS;364;473;3/3/2001 05:33:00;CIDADAO COMUM;N;;CENTRO (BH);BH;611579.10;797272.30;2855
+2857;2001119439;B03000;AMEACA;RUA LEOPOLDO GOM;1591;40770;3/3/2001 06:51:00;INICIATIVA;S;0;VERA CRUZ;BH;615861.34;798144.40;2856
+2858;2001119446;B03000;AMEACA;RUA LUIZ CASTANH;240;41697;3/3/2001 07:05:00;CIDADAO COMUM;N;0;SANTA CRUZ;BH;611154.40;801888.99;2857
+2859;2001119489;B06000;LESAO CORPORAL;RUA SERENATA;115;172351;3/3/2001 08:02:00;CIDADAO COMUM;S;0;SERRA;BH;614062.04;795309.15;2858
+2860;2001119504;B03000;AMEACA;RUA MURILO PINTO;84;91691;3/3/2001 08:15:00;CIDADAO COMUM;N;0;SALGADO FILHO;BH;607074.69;793938.12;2859
+2861;2001119507;B03000;AMEACA;RUA VINTE E SEIS;75;72780;3/3/2001 08:16:00;INICIATIVA;S;0;LEONINA;BH;608491.67;793462.89;2860
+2862;2001119538;B03000;AMEACA;RUA NOVA LIMA;292;48453;3/3/2001 08:45:00;CIDADAO COMUM;S;0;CARLOS PRATES;BH;609248.22;798009.84;2861
+2863;2001119550;B09000;ABANDONO DE INCA;RUA FRANCISCO LE;72;29495;3/3/2001 09:00:00;CIDADAO COMUM;S;FU;SAO MARCOS;BH;614356.83;802276.53;2862
+2864;2001119611;B03000;AMEACA;AV DO CONTORNO;1341;17228;3/3/2001 09:57:00;INICIATIVA;N;0;CENTRO (BH);BH;611909.94;797822.35;2863
+2865;2001119613;B06000;LESAO CORPORAL;RUA BOLIVAR;458;9871;3/3/2001 09:58:00;CIDADAO COMUM;N;0;UNIAO;BH;612866.19;801674.00;2864
+2866;2001119616;B03000;AMEACA;RUA INDEPENDENCI;831;34391;3/3/2001 10:01:00;CIDADAO COMUM;S;0;CABANA;BH;605985.71;793145.38;2865
+2867;2001119633;B03000;AMEACA;RUA FLOR DE VIDR;44;13504;3/3/2001 10:23:00;CIDADAO COMUM;S;;CASTELO;BH;605631.15;799432.80;2866
+2868;2001119638;B08000;VIOLACAO DE DOMI;RUA TEBAS;480;67090;3/3/2001 10:25:00;CIDADAO COMUM;N;;VERA CRUZ;BH;615811.31;798263.72;2867
+2869;2001119639;B06000;LESAO CORPORAL;RUA SA E BENEVID;36;10708;3/3/2001 10:25:00;CIDADAO COMUM;S;;UNIVERSITARIO;BH;610216.40;802593.25;2868
+2870;2001119686;B03000;AMEACA;RUA OSWALDO DE S;433;50553;3/3/2001 11:04:00;CIDADAO COMUM;N;0;DOM BOSCO;BH;604169.56;797430.90;2869
+2871;2001119695;B03000;AMEACA;RUA PENALVA;51;96276;3/3/2001 11:14:00;CIDADAO COMUM;N;REF///DEPOSITO J;DOM SILVERIO;BH;614562.09;804374.72;2870
+2872;2001119728;B04001;HOMICIDIO TENTAD;RUA DES CINTRA N;864;62966;3/3/2001 11:47:00;CIDADAO COMUM;N;0;MILIONARIOS;BH;604725.20;790121.59;2871
+2873;2001119742;B03000;AMEACA;RUA JOAO LIRIO D;26;108581;3/3/2001 12:05:00;CIDADAO COMUM;S;REF///SUPERM. FO;VENDA NOVA;BH;608643.28;808563.86;2872
+2874;2001119753;B03000;AMEACA;RUA ARACI;429;5335;3/3/2001 12:13:00;CIDADAO COMUM;S;CSA;PINDORAMA;BH;602526.65;797595.21;2873
+2875;2001119811;B03000;AMEACA;RUA SAO MATIAS;150;63408;3/3/2001 13:01:00;CIDADAO COMUM;N;0;SERRANO;BH;603286.89;800380.66;2874
+2876;2001119829;B03000;AMEACA;RUA TUCA;370;69808;3/3/2001 13:14:00;CIDADAO COMUM;S;CAA;MARIA GORETTI;BH;614517.00;803684.53;2875
+2877;2001119864;B03000;AMEACA;RUA SAO PAULO;118;63464;3/3/2001 13:42:00;CIDADAO COMUM;S;;CENTRO (BH);BH;611103.76;797674.75;2876
+2878;2001119877;B03000;AMEACA;RUA CINCO;154;302813;3/3/2001 13:53:00;CIDADAO COMUM;N;;NOVO AARAO REIS;BH;614537.55;805974.74;2877
+2879;2001119929;B03000;AMEACA;RUA DEMETRIO RIB;1397;19797;3/3/2001 14:29:00;POLICIAL MILITAR;S;0;SAUDADE;BH;615890.15;797259.25;2878
+2880;2001119972;B06000;LESAO CORPORAL;RUA MADRE ISABEL;100;120768;3/3/2001 15:00:00;CIDADAO COMUM;S;;SAO GERALDO;BH;616215.65;799943.84;2879
+2881;2001119982;B03000;AMEACA;RUA JOSE TEIXEIR;187;72995;3/3/2001 15:10:00;CIDADAO COMUM;N;;FLORAMAR;BH;611473.63;806945.13;2880
+2882;2001120095;B06000;LESAO CORPORAL;RUA FRANCISCO MA;445;89447;3/3/2001 16:12:00;CIDADAO COMUM;S;;CH JATOBA IV;BH;600342.66;787631.44;2881
+2883;2001120122;B06000;LESAO CORPORAL;RUA Z;5;29123;3/3/2001 16:30:00;CIDADAO COMUM;N;CAA;CAPITAO EDUARDO;BH;618671.14;807129.45;2882
+2884;2001120124;B03000;AMEACA;RUA DES BRAULIO;20;19917;3/3/2001 16:32:00;POLICIAL MILITAR;S;0;VERA CRUZ;BH;616057.65;798818.48;2883
+2885;2001120159;B03000;AMEACA;RUA RIACHO;5;24927;3/3/2001 16:56:00;CIDADAO COMUM;S;;TAQUARIL;BH;617267.94;797108.52;2884
+2886;2001120165;B06000;LESAO CORPORAL;AV SALAMANCA;175;21480;3/3/2001 17:00:00;CIDADAO COMUM;S;CAFR;JARDIM EUROPA;BH;608328.18;809912.26;2885
+2887;2001120220;B03000;AMEACA;RUA AGUA BOA;87;130567;3/3/2001 17:36:00;CIDADAO COMUM;S;;ARAGUAIA;BH;603962.80;789155.02;2886
+2888;2001120239;B04002;HOMICIDIO CONSUM;RUA AGUA DOCE DO;225;1523;3/3/2001 17:51:00;CIDADAO COMUM;N;;JARDIM LEBLON;BH;605966.04;807870.45;2887
+2889;2001120287;B06000;LESAO CORPORAL;RUA N;121;37780;3/3/2001 18:28:00;CIDADAO COMUM;N;;MINASCAIXA;BH;608881.39;810032.40;2888
+2890;2001120292;B06000;LESAO CORPORAL;RUA PERNAMBUCO;1077;53463;3/3/2001 18:30:00;CIDADAO COMUM;S;0;FUNCIONARIOS;BH;611502.50;795210.22;2889
+2891;2001120323;B06000;LESAO CORPORAL;RUA CURITIBA;767;19090;3/3/2001 18:49:00;CIDADAO COMUM;S;0;CENTRO (BH);BH;610846.44;797113.78;2890
+2892;2001120343;B06000;LESAO CORPORAL;RUA DOS TIMBIRAS;853;67682;3/3/2001 19:00:00;INICIATIVA;N;0;BARRO PRETO;BH;611886.69;796078.48;2891
+2893;2001120350;B04001;HOMICIDIO TENTAD;RUA PADRE JULIO ;471;51496;3/3/2001 19:04:00;POLICIAL MILITAR;N;CAA;VERA CRUZ;BH;615410.34;797432.56;2892
+2894;2001120390;B06000;LESAO CORPORAL;RUA ATTILIO DE M;363;111630;3/3/2001 19:31:00;POLICIAL MILITAR;S;0;DIAMANTE;BH;601525.46;789900.12;2893
+2895;2001120433;B03000;AMEACA;RUA CORCOVADO;55;95015;3/3/2001 19:55:00;INICIATIVA;S;0;SARANDI (URCA/BH;BH;603193.23;802354.91;2894
+2896;2001120441;B03000;AMEACA;AV IVAI;1178;80629;3/3/2001 20:02:00;CIDADAO COMUM;S;;DOM BOSCO;BH;604605.18;797950.15;2895
+2897;2001120528;B04001;HOMICIDIO TENTAD;RUA JOAQUIM LEIT;87;64413;3/3/2001 20:55:00;CIDADAO COMUM;S;0;MANTIQUEIRA;BH;606801.78;810035.40;2896
+2898;2001120610;B03000;AMEACA;RUA ATAULFO ALVE;99;6482;3/3/2001 21:37:00;CIDADAO COMUM;S;;TUPI;BH;613317.31;806200.20;2897
+2899;2001120622;B06000;LESAO CORPORAL;RUA GEORGINA PEN;90;31006;3/3/2001 21:42:00;CIDADAO COMUM;S;PX305;SAO LUCAS;BH;614133.28;795705.78;2898
+2900;2001120624;B03000;AMEACA;RUA PADRE JULIO ;48;51496;3/3/2001 21:43:00;CIDADAO COMUM;N;FU;VERA CRUZ;BH;614971.95;797313.30;2899
+2901;2001120629;B03000;AMEACA;RUA REAL MADRID;209;58091;3/3/2001 21:46:00;CIDADAO COMUM;S;;COQUEIROS;BH;603451.26;800201.70;2900
+2902;2001120725;B03000;AMEACA;RUA JOAO GUALBER;1438;37692;3/3/2001 22:41:00;CIDADAO COMUM;S;0;SAGRADA FAMILIA;BH;612708.10;799896.97;2901
+2903;2001120754;B06000;LESAO CORPORAL;AV FURQUIM WERNE;30;650;3/3/2001 23:04:00;INICIATIVA;N;0;TUPI;BH;613005.07;805799.44;2902
+2904;2001120765;B06000;LESAO CORPORAL;RUA DR BROCHADO;103;23215;3/3/2001 23:11:00;CIDADAO COMUM;N;CA55;VERA CRUZ;BH;615814.74;798592.95;2903
+2905;2001120767;B03000;AMEACA;RUA QUARENTA E S;25;302841;3/3/2001 23:12:00;CIDADAO COMUM;N;;NOVO AARAO REIS;BH;614269.60;805745.84;2904
+2906;2001120841;B06000;LESAO CORPORAL;RUA MARANHAO;1737;43462;3/3/2001 23:54:00;INICIATIVA;N;0;FUNCIONARIOS;BH;612357.28;795160.76;2905
+2907;2001120845;B06000;LESAO CORPORAL;AV SINFRONIO BRO;80;66116;3/3/2001 23:55:00;CIDADAO COMUM;S;;BARREIRO;BH;603269.29;790982.81;2906
+2908;2001120891;B03000;AMEACA;RUA MARIA DO CAR;192;83236;4/3/2001 00:20:00;CIDADAO COMUM;N;;SANTA CRUZ (BARR;BH;603418.68;788956.00;2907
+2909;2001120957;B04001;HOMICIDIO TENTAD;RUA DOS TUPINAMB;908;69940;4/3/2001 00:57:00;INICIATIVA;N;0;CENTRO (BH);BH;610686.75;797442.02;2908
+2910;2001120981;B06000;LESAO CORPORAL;PRACA RAUL SOARE;10;58010;4/3/2001 01:07:00;INICIATIVA;S;0;CENTRO (BH);BH;610534.96;796717.53;2909
+2911;2001120985;B04001;HOMICIDIO TENTAD;RUA DOIS;42;27130;4/3/2001 01:07:00;CIDADAO COMUM;N;0;PAULO SEXTO;BH;616599.36;806788.61;2910
+2912;2001121076;B03000;AMEACA;RUA LUCIA MIGUEL;38;41555;4/3/2001 02:04:00;INICIATIVA;S;0;TUPI;BH;612616.49;805975.44;2911
+2913;2001121110;B06000;LESAO CORPORAL;RUA TOME DE SOUZ;1380;67998;4/3/2001 02:32:00;POLICIAL MILITAR;S;0;LOURDES;BH;611029.66;795329.53;2912
+2914;2001121147;B03000;AMEACA;RUA PIRAI;204;54062;4/3/2001 03:05:00;CIDADAO COMUM;S;FR168;CONCORDIA;BH;610712.96;799396.54;2913
+2915;2001121185;B06000;LESAO CORPORAL;AV GENERAL OLIMP;556;329;4/3/2001 03:34:00;CIDADAO COMUM;N;;ITAPOA;BH;609185.49;806725.82;2914
+2916;2001121201;B03000;AMEACA;AV SEN LEVINDO C;23;14866;4/3/2001 03:47:00;CIDADAO COMUM;S;;INDEPENDENCIA;BH;600967.99;789592.58;2915
+2917;2001121205;B06000;LESAO CORPORAL;RUA PEDRO LUIZ D;289;100841;4/3/2001 03:51:00;CIDADAO COMUM;S;0;FLORAMAR;BH;611454.51;807362.84;2916
+2918;2001121213;B06000;LESAO CORPORAL;RUA BADARO JUNIO;38;7532;4/3/2001 04:01:00;CIDADAO COMUM;S;;PRIMEIRO DE MAIO;BH;612064.33;803545.79;2917
+2919;2001121256;B04001;HOMICIDIO TENTAD;AV GETULIO VARGA;1238;81256;4/3/2001 04:44:00;INICIATIVA;S;0;FUNCIONARIOS;BH;611530.70;795136.03;2918
+2920;2001121281;B06000;LESAO CORPORAL;RUA PARA DE MINA;972;52070;4/3/2001 05:03:00;CIDADAO COMUM;S;;PADRE EUSTAQUIO;BH;605685.93;797784.68;2919
+2921;2001121406;B02000;RIXA;AV SARAMENHA;303;64007;4/3/2001 08:01:00;CIDADAO COMUM;N;;FLORAMAR;BH;612061.08;805691.75;2920
+2922;2001121429;B06000;LESAO CORPORAL;RUA RAMIRO SIQUE;66;128858;4/3/2001 08:20:00;CIDADAO COMUM;S;;CASTANHEIRAS (TA;BH;617650.40;797388.81;2921
+2923;2001121431;B06000;LESAO CORPORAL;RUA B;160;47637;4/3/2001 08:12:00;CIDADAO COMUM;S;;VILA CASTANHEIRA;BH;601142.40;788544.37;2922
+2924;2001121452;B06000;LESAO CORPORAL;RUA DOUTOR JULIO;85;112315;4/3/2001 08:42:00;CIDADAO COMUM;N;CA;OURO PRETO;BH;605834.18;802796.95;2923
+2925;2001121453;B03000;AMEACA;RUA NELSON SOARE;157;47450;4/3/2001 08:42:00;CIDADAO COMUM;S;;DOM BOSCO;BH;604257.72;796952.69;2924
+2926;2001121563;B03000;AMEACA;RUA OURO BRANCO;124;50701;4/3/2001 10:22:00;CIDADAO COMUM;S;;POMPEIA;BH;614764.54;797598.86;2925
+2927;2001121583;B03000;AMEACA;RUA VERA LUCIA;226;71520;4/3/2001 10:35:00;CIDADAO COMUM;S;0;SINIMBU;BH;606703.86;808030.07;2926
+2928;2001121612;B03000;AMEACA;RUA GENTIOS;1350;30983;4/3/2001 10:58:00;CIDADAO COMUM;S;0;LUXEMBURGO;BH;608905.13;793585.28;2927
+2929;2001121653;B03000;AMEACA;RUA ARANTINA;274;58697;4/3/2001 11:29:00;CIDADAO COMUM;S;CAA;MINASLANDIA;BH;612171.98;804515.39;2928
+2930;2001121663;B03000;AMEACA;RUA DESEMBARGADO;601;19986;4/3/2001 11:42:00;CIDADAO COMUM;S;;SERRA;BH;613943.78;794925.46;2929
+2931;2001121679;B09000;ABANDONO DE INCA;AV AMINTAS JAQUE;1100;52546;4/3/2001 11:56:00;CIDADAO COMUM;S;;COQUEIROS;BH;602729.07;799162.42;2930
+2932;2001121693;B06000;LESAO CORPORAL;RUA COPERNICO PI;15;6630;4/3/2001 12:04:00;CIDADAO COMUM;S;;SANTO ANTONIO;BH;610369.73;793668.93;2931
+2933;2001121780;B04001;HOMICIDIO TENTAD;RUA EDMAR COLINI;348;104638;4/3/2001 13:23:00;CIDADAO COMUM;S;;MANTIQUEIRA;BH;605882.85;811488.28;2932
+2934;2001121829;B06000;LESAO CORPORAL;RUA RIBATEJO;112;63058;4/3/2001 13:56:00;INICIATIVA;N;0;SAO FRANCISCO;BH;609796.03;802014.20;2933
+2935;2001121839;B03000;AMEACA;RUA DES TEOFILO;55;20015;4/3/2001 14:07:00;CIDADAO COMUM;S;;PEDRO SEGUNDO;BH;608657.91;798601.08;2934
+2936;2001121845;B06000;LESAO CORPORAL;RUA DOS TUPINAMB;688;69940;4/3/2001 14:11:00;INICIATIVA;N;0;CENTRO BH;BH;610916.87;797380.59;2935
+2937;2001121850;B03000;AMEACA;RUA PORTO SEGURO;480;60595;4/3/2001 14:12:00;CIDADAO COMUM;S;;NOVA VISTA;BH;614968.49;800704.88;2936
+2938;2001121910;B06000;LESAO CORPORAL;RUA MARIA AMBROS;241;86206;4/3/2001 15:04:00;CIDADAO COMUM;N;;VILA FREI LEOPOL;BH;611121.44;810097.63;2937
+2939;2001121919;B04002;HOMICIDIO CONSUM;RUA DOS INDUSTRI;225;34480;4/3/2001 15:12:00;CIDADAO COMUM;N;0;DAS INDUSTRIAS;BH;604608.18;792459.57;2938
+2940;2001121989;B04001;HOMICIDIO TENTAD;VIA PASSAGEM PED;14;35744;4/3/2001 15:52:00;CIDADAO COMUM;N;0;CAPITAO EDUARDO;BH;618468.35;807122.91;2939
+2941;2001121995;B06000;LESAO CORPORAL;RUA JULIO CESAR;245;39483;4/3/2001 15:55:00;CIDADAO COMUM;N;0;NAZARE;BH;615538.35;804353.02;2940
+2942;2001122058;B03000;AMEACA;AV CACHOEIRINHA;1000;11250;4/3/2001 16:35:00;CIDADAO COMUM;S;0;CACHOEIRINHA;BH;610539.92;801314.88;2941
+2943;2001122096;B03000;AMEACA;RUA JATAI;1351;37116;4/3/2001 17:01:00;CIDADAO COMUM;S;0;CONCORDIA;BH;611142.78;799513.14;2942
+2944;2001122213;B06000;LESAO CORPORAL;RUA CORNELIO CER;16;17417;4/3/2001 18:07:00;CIDADAO COMUM;S;;PADRE EUSTAQUIO;BH;606458.19;797838.52;2943
+2945;2001122224;B03000;AMEACA;RUA AMANDO COUTO;230;3037;4/3/2001 18:12:00;CIDADAO COMUM;S;0;SAO TOMAZ;BH;609922.73;805494.21;2944
+2946;2001122232;B03000;AMEACA;AV PRESIDENTE AN;4013;4461;4/3/2001 18:18:00;POLICIAL MILITAR;N;0;SAO FRANCISCO;BH;609536.57;802154.10;2945
+2947;2001122240;B03000;AMEACA;RUA BRISTOL;27;97543;4/3/2001 18:20:00;CIDADAO COMUM;N;;JARDIM EUROPA;BH;607783.31;810421.22;2946
+2948;2001122248;B03000;AMEACA;RUA DOUTOR CRIST;5800;55598;4/3/2001 18:32:00;CIDADAO COMUM;N;;ARAGUAIA;BH;605425.77;789436.02;2947
+2949;2001122273;B04002;HOMICIDIO CONSUM;RUA CORONEL JOAQ;400;17864;4/3/2001 18:49:00;CIDADAO COMUM;N;;HELIOPOLIS;BH;610982.98;806034.03;2948
+2950;2001122323;B03000;AMEACA;RUA TRINTA;102;106141;4/3/2001 19:17:00;CIDADAO COMUM;S;0;JARDIM DOS COMER;BH;608088.16;810913.29;2949
+2951;2001122343;B03000;AMEACA;RUA BONINAS;265;94863;4/3/2001 19:31:00;CIDADAO COMUM;S;;LINDEIA;BH;599815.61;790501.68;2950
+2952;2001122369;B06000;LESAO CORPORAL;RUA VEREADOR ANT;41;93602;4/3/2001 19:49:00;CIDADAO COMUM;S;;INDEPENDENCIA;BH;601665.13;786440.78;2951
+2953;2001122371;B03000;AMEACA;RUA MANOEL ALEXA;300;1580;4/3/2001 19:49:00;INICIATIVA;S;0;SAO PAULO;BH;612667.88;802769.94;2952
+2954;2001122471;B03000;AMEACA;RUA MANOEL PASSO;151;43160;4/3/2001 20:51:00;CIDADAO COMUM;S;0;VILA HUMAITA;BH;610414.87;801554.81;2953
+2955;2001122474;B04001;HOMICIDIO TENTAD;RUA SOFRE;42;85588;4/3/2001 20:53:00;CIDADAO COMUM;S;0;GOIANIA;BH;615466.95;802363.54;2954
+2956;2001122500;B06000;LESAO CORPORAL;AV ALFREDO CARAM;310;2277;4/3/2001 21:04:00;CIDADAO COMUM;S;;SAO LUIZ;BH;607189.83;803094.77;2955
+2957;2001122521;B06000;LESAO CORPORAL;RUA PADRE PEDRO ;725;51657;4/3/2001 21:11:00;INICIATIVA;N;0;CANDELARIA;BH;609314.30;808555.78;2956
+2958;2001122536;B04001;HOMICIDIO TENTAD;RUA SACRAMENTO;170;59822;4/3/2001 21:20:00;CIDADAO COMUM;N;AP401;SERRA;BH;613713.64;795025.29;2957
+2959;2001122557;B06000;LESAO CORPORAL;RUA IRACI SANSAO;140;78443;4/3/2001 21:36:00;CIDADAO COMUM;S;;VILA PINHO;BH;602369.97;787512.60;2958
+2960;2001122599;B06000;LESAO CORPORAL;RUA VEREADOR ANT;81;93602;4/3/2001 21:59:00;CIDADAO COMUM;S;0;INDEPENDENCIA;BH;601901.25;786466.11;2959
+2961;2001122607;B06000;LESAO CORPORAL;RUA JURACY CAMAR;304;39720;4/3/2001 22:05:00;CIDADAO COMUM;S;0;TUPI;BH;613245.23;805753.50;2960
+2962;2001122628;B06000;LESAO CORPORAL;RUA BARAO DO MON;757;63653;4/3/2001 22:18:00;CIDADAO COMUM;S;;CARDOSO;BH;604068.44;787904.09;2961
+2963;2001122641;B03000;AMEACA;RODOVIA BRASILIA;190;124400;4/3/2001 22:26:00;CIDADAO COMUM;S;0;SAO BENEDITO (SL;SL;610627.87;810496.47;2962
+2964;2001122646;B03000;AMEACA;RUA MEDEIA;628;64426;4/3/2001 22:32:00;CIDADAO COMUM;S;;VILA CAPRI;BH;608913.64;809686.79;2963
+2965;2001122660;B03000;AMEACA;RUA VICENTE SOLL;86;24781;4/3/2001 22:43:00;CIDADAO COMUM;S;CAA;NOVA GAMELEIRA;BH;605568.33;794890.84;2964
+2966;2001122671;B04001;HOMICIDIO TENTAD;RUA BACO;485;85461;4/3/2001 22:51:00;CIDADAO COMUM;N;;VILA CAPRI;BH;608762.35;809576.72;2965
+2967;2001122699;B03000;AMEACA;RUA DOS MOICANOS;315;92741;4/3/2001 23:11:00;CIDADAO COMUM;N;0;PILAR;BH;607410.73;788295.46;2966
+2968;2001122720;B06000;LESAO CORPORAL;RUA DOS TUPIS;751;69965;4/3/2001 23:25:00;INICIATIVA;N;PPM.1;CENTRO (BH);BH;610541.84;797015.87;2967
+2969;2001122815;B03000;AMEACA;RUA ALCINDO VIEI;150;1968;5/3/2001 00:30:00;CIDADAO COMUM;N;;BARREIRO;BH;602801.65;791079.84;2968
+2970;2001122903;B04002;HOMICIDIO CONSUM;RUA ANTONIO MARI;180;103420;5/3/2001 01:31:00;CIDADAO COMUM;N;;BELMONT;BH;615617.05;805562.96;2969
+2971;2001122936;B06000;LESAO CORPORAL;RUA MAFRA;538;66488;5/3/2001 02:19:00;CIDADAO COMUM;S;;COQUEIROS;BH;602417.29;798939.66;2970
+2972;2001122943;B06000;LESAO CORPORAL;AV PRESIDENTE AN;400;4461;5/3/2001 02:27:00;CIDADAO COMUM;N;;LAGOINHA;BH;610659.00;798426.12;2971
+2973;2001123277;B03000;AMEACA;RUA SAO SALVADOR;46;63612;5/3/2001 09:00:00;CIDADAO COMUM;S;;BONFIM;BH;610151.37;797963.59;2972
+2974;2001123527;B03000;AMEACA;RUA SANTO AGOSTI;1271;61557;5/3/2001 12:07:00;CIDADAO COMUM;N;;INSTITUTO AGRONO;BH;613648.90;799370.40;2973
+2975;2001123609;B04002;HOMICIDIO CONSUM;RUA SAO SIMAO;200;92161;5/3/2001 13:20:00;CIDADAO COMUM;N;;ARAGUAIA;BH;605420.44;789857.68;2974
+2976;2001123757;B03000;AMEACA;AV GENERAL OLIMP;604;329;5/3/2001 15:04:00;CIDADAO COMUM;S;;ITAPOA;BH;609214.29;806688.46;2975
+2977;2001123814;B06000;LESAO CORPORAL;RUA ARIOLINO ARI;159;85811;5/3/2001 15:36:00;CIDADAO COMUM;N;;SERRA VERDE;BH;609207.39;810119.05;2976
+2978;2001123894;B03000;AMEACA;RUA PADRE FELIPE;11;51339;5/3/2001 16:18:00;CIDADAO COMUM;N;0;SANTA CRUZ;BH;610690.00;802397.32;2977
+2979;2001123898;B03000;AMEACA;RUA JOAO ANTONIO;160;122054;5/3/2001 16:19:00;CIDADAO COMUM;S;;JARDIM DOS COMER;BH;607884.02;810802.11;2978
+2980;2001123903;B03000;AMEACA;RUA JOSE GONCALV;127;99901;5/3/2001 16:28:00;CIDADAO COMUM;S;NR/EXATO: 129;MARIA GORETTI;BH;614573.12;802978.70;2979
+2981;2001123907;B03000;AMEACA;RUA PRIMEIRO DE ;35;23978;5/3/2001 16:31:00;CIDADAO COMUM;S;0;TAQUARIL;BH;617547.71;797272.25;2980
+2982;2001124154;B06000;LESAO CORPORAL;RUA PROFESSOR RA;276;55673;5/3/2001 18:50:00;CIDADAO COMUM;N;;PADRE EUSTAQUIO;BH;606499.51;797431.02;2981
+2983;2001124239;B03000;AMEACA;RUA SAO PEDRO;230;96046;5/3/2001 19:31:00;CIDADAO COMUM;S;0;MARIA GORETTI;BH;614553.53;803184.78;2982
+2984;2001124243;B06000;LESAO CORPORAL;RUA MARIA;75;43737;5/3/2001 19:33:00;CIDADAO COMUM;N;;VILA MARAVILHAS;BH;603288.12;795483.45;2983
+2985;2001124249;B06000;LESAO CORPORAL;RUA JUIZ MILTON ;165;78342;5/3/2001 19:37:00;CIDADAO COMUM;N;;ANTONIO RIBEIRO ;BH;615036.21;806160.82;2984
+2986;2001124308;B06000;LESAO CORPORAL;RUA ERNESTO AUST;65;25784;5/3/2001 20:17:00;CIDADAO COMUM;S;;BOA VISTA;BH;614683.32;799433.40;2985
+2987;2001124315;B06000;LESAO CORPORAL;RUA DR BROCHADO;931;23215;5/3/2001 20:20:00;CIDADAO COMUM;S;CAFU;VERA CRUZ;BH;615979.15;797788.31;2986
+2988;2001124317;B04001;HOMICIDIO TENTAD;AV DOS ANDRADAS;5455;3761;5/3/2001 20:21:00;CIDADAO COMUM;S;0;ESPLANADA;BH;615393.94;798623.14;2987
+2989;2001124326;B06000;LESAO CORPORAL;RUA PARA DE MINA;1170;52070;5/3/2001 20:26:00;CIDADAO COMUM;S;;PADRE EUSTAQUIO;BH;605500.40;797813.06;2988
+2990;2001124344;B04001;HOMICIDIO TENTAD;RUA DAS TABOADAS;10;300190;5/3/2001 20:31:00;CIDADAO COMUM;N;;SAO JOAO BATISTA;BH;608781.80;807946.76;2989
+2991;2001124358;B04001;HOMICIDIO TENTAD;RUA TEBAS;1215;67090;5/3/2001 20:39:00;CIDADAO COMUM;S;CSB;VERA CRUZ;BH;616361.69;798406.61;2990
+2992;2001124364;B09000;ABANDONO DE INCA;RUA STA MARIA;475;61024;5/3/2001 20:43:00;POLICIAL MILITAR;N;- P/2 16 BPM;SAO MARCOS;BH;614312.59;802504.64;2991
+2993;2001124445;B04001;HOMICIDIO TENTAD;AV DO CONTORNO;10677;17228;5/3/2001 21:32:00;CIDADAO COMUM;N;;BARRO PRETO;BH;609554.35;797409.14;2992
+2994;2001124605;B03000;AMEACA;RUA BOTAFOGO;102;10257;5/3/2001 23:28:00;CIDADAO COMUM;S;;SAO BERNARDO;BH;610941.52;804934.38;2993
+2995;2001124767;B03000;AMEACA;RUA DOS GOITACAZ;1203;31400;6/3/2001 03:05:00;CIDADAO COMUM;N;;BARRO PRETO;BH;610116.39;796977.69;2994
+2996;2001124803;B04001;HOMICIDIO TENTAD;PRACA RUI BARBOS;10;59558;6/3/2001 04:19:00;INICIATIVA;N;0;CENTRO BH;BH;611488.17;797485.82;2995
+2997;2001124923;B03000;AMEACA;RUA CORNELIO CER;306;17417;6/3/2001 07:47:00;CIDADAO COMUM;N;;PADRE EUSTAQUIO;BH;606165.11;797879.98;2996
+2998;2001125042;B05000;SEQUESTRO E CARC;RUA JOAO BATISTA;10;97745;6/3/2001 09:16:00;CIDADAO COMUM;N;0;DOM SILVERIO;BH;614734.92;804019.88;2997
+2999;2001125140;B03000;AMEACA;RUA FRANCISCO AL;70;29325;6/3/2001 10:04:00;CIDADAO COMUM;S;;SANTA AMELIA;BH;606448.55;805403.41;2998
+3000;2001125232;B03000;AMEACA;RUA CASTIGLIANO;708;14056;6/3/2001 11:04:00;CIDADAO COMUM;S;0;PADRE EUSTAQUIO;BH;607285.74;797447.96;2999
+3001;2001125299;B03000;AMEACA;RUA IRACEMA;96;34896;6/3/2001 11:58:00;CIDADAO COMUM;N;;VILA HUMAITA;BH;610308.42;801607.23;3000
+3002;2001125347;B03000;AMEACA;RUA NAZARE;18;25771;6/3/2001 12:22:00;CIDADAO COMUM;S;0;TAQUARIL;BH;617252.57;797798.96;3001
+3003;2001125399;B06000;LESAO CORPORAL;RUA ANTONIO JORG;92;100551;6/3/2001 13:04:00;CIDADAO COMUM;S;;CEU AZUL;BH;603811.20;807646.41;3002
+3004;2001125498;B08000;VIOLACAO DE DOMI;RUA ANTONIO SILV;141;87108;6/3/2001 14:14:00;CIDADAO COMUM;N;NUMERO CORRETO 1;DA LAGOA;BH;604758.70;808936.59;3003
+3005;2001125518;B03000;AMEACA;RUA CRUZEIRO DO ;1031;75168;6/3/2001 14:36:00;CIDADAO COMUM;N;;COQUEIROS;BH;602379.47;799714.08;3004
+3006;2001125636;B03000;AMEACA;RUA MARIA DA CON;123;107881;6/3/2001 15:51:00;CIDADAO COMUM;S;0;MANTIQUEIRA;BH;606501.70;811563.34;3005
+3007;2001125736;B06000;LESAO CORPORAL;AV BARAO HOMEM D;797;7936;6/3/2001 16:39:00;CIDADAO COMUM;S;0;JARDIM AMERICA;BH;607684.12;794788.83;3006
+3008;2001125762;B06000;LESAO CORPORAL;RUA RUBENS DE SO;631;63060;6/3/2001 16:52:00;CIDADAO COMUM;S;;AARAO REIS;BH;612567.12;805018.45;3007
+3009;2001125868;B03000;AMEACA;AV CENTRAL;1229;14812;6/3/2001 17:56:00;CIDADAO COMUM;S;LJ03;COPACABANA;BH;605957.82;807450.11;3008
+3010;2001125909;B06000;LESAO CORPORAL;AV SILVIANO BRAN;2099;66002;6/3/2001 18:25:00;CIDADAO COMUM;S;LJ02;HORTO;BH;613305.97;798057.81;3009
+3011;2001125912;B03000;AMEACA;RUA JOVINO RODRI;244;85083;6/3/2001 18:26:00;CIDADAO COMUM;S;0;MANTIQUEIRA;BH;606548.35;810771.26;3010
+3012;2001125923;B06000;LESAO CORPORAL;RUA JASSAPE;255;37103;6/3/2001 18:34:00;CIDADAO COMUM;N;;VILA MARAVILHAS;BH;603073.29;795519.68;3011
+3013;2001125940;B03000;AMEACA;RUA FERNANDO CAN;33;80818;6/3/2001 18:42:00;CIDADAO COMUM;N;FU;ESTRELA DO ORIEN;BH;605862.69;791985.49;3012
+3014;2001126007;B03000;AMEACA;RUA JOSE BENJAMI;36;95;6/3/2001 19:21:00;INICIATIVA;S;0;PLANALTO;BH;610484.66;806769.49;3013
+3015;2001126043;B04001;HOMICIDIO TENTAD;RUA INGLATERRA;138;34552;6/3/2001 19:45:00;CIDADAO COMUM;S;;JARDIM LEBLON;BH;606114.00;807514.48;3014
+3016;2001126104;B03000;AMEACA;RUA JANAUBA;75;36891;6/3/2001 20:23:00;CIDADAO COMUM;S;;VISTA ALEGRE;BH;604696.85;793369.28;3015
+3017;2001126109;B03000;AMEACA;RUA ITAPETINGA;53;35817;6/3/2001 20:21:00;CIDADAO COMUM;S;0;PIRATININGA;BH;605923.68;809900.61;3016
+3018;2001126112;B03000;AMEACA;RUA MALVINA PALH;70;96714;6/3/2001 20:25:00;CIDADAO COMUM;S;;SERRA VERDE;BH;609317.97;810139.24;3017
+3019;2001126128;B04001;HOMICIDIO TENTAD;RUA DOMINGOS FRA;10;103244;6/3/2001 20:40:00;CIDADAO COMUM;N;;OURO PRETO;BH;606343.45;800732.42;3018
+3020;2001126136;B06000;LESAO CORPORAL;RUA CINQUENTA E ;6;33900;6/3/2001 20:42:00;CIDADAO COMUM;S;ZZ;CONJUNTO FELICID;BH;612556.58;806824.33;3019
+3021;2001126176;B03000;AMEACA;RUA DELEGADO PAU;180;90469;6/3/2001 21:11:00;CIDADAO COMUM;S;;SAO MARCOS;BH;614606.28;802323.69;3020
+3022;2001126204;B09000;ABANDONO DE INCA;RUA BIMBARRA;326;9641;6/3/2001 21:32:00;CIDADAO COMUM;S;0;CALAFATE;BH;607195.50;796594.64;3021
+3023;2001126303;B06000;LESAO CORPORAL;RUA SILVA RESEND;170;28511;6/3/2001 22:47:00;CIDADAO COMUM;N;0;JARDIM MONTANHES;BH;606058.40;799084.79;3022
+3024;2001126305;B03000;AMEACA;RUA ANTONIO ORLI;559;55907;6/3/2001 22:50:00;CIDADAO COMUM;S;NUMERO CORRETO 5;SAO JOAO BATISTA;BH;608243.75;807563.95;3023
+3025;2001126315;B08000;VIOLACAO DE DOMI;RUA BABACU;40;126925;6/3/2001 22:58:00;CIDADAO COMUM;N;0;OLARIA;BH;601691.41;789264.08;3024
+3026;2001126322;B04001;HOMICIDIO TENTAD;RUA LAJEDO;410;130034;6/3/2001 23:02:00;CIDADAO COMUM;N;;SAO GABRIEL;BH;614464.85;804546.93;3025
+3027;2001126334;B06000;LESAO CORPORAL;RUA IMBARE;221;82491;6/3/2001 23:06:00;INICIATIVA;N;0;GUARANI;BH;612018.59;805507.76;3026
+3028;2001126345;B03000;AMEACA;RUA FLOR BRANCA;39;28509;6/3/2001 23:12:00;CIDADAO COMUM;S;;JARDIM MONTANHES;BH;605828.36;799059.89;3027
+3029;2001126385;B06000;LESAO CORPORAL;RUA PADRE ESPECH;42;51281;6/3/2001 23:36:00;CIDADAO COMUM;N;;GLORIA;BH;604236.49;798539.26;3028
+3030;2001126390;B06000;LESAO CORPORAL;RUA JOSIAS CASIM;161;63814;6/3/2001 23:33:00;CIDADAO COMUM;N;;SAGRADA FAMILIA;BH;613459.62;798877.69;3029
+3031;2001126398;B06000;LESAO CORPORAL;RUA OSCAR TROMPO;1396;50452;6/3/2001 23:44:00;INICIATIVA;N;0;MORRO DAS PEDRAS;BH;608530.75;794473.15;3030
+3032;2001126428;B06000;LESAO CORPORAL;RUA DOS CARIJOS;930;81243;6/3/2001 23:57:00;INICIATIVA;S;0;CENTRO BH;BH;610563.81;797327.45;3031
+3033;2001126457;B03000;AMEACA;RUA MONTANA;92;121745;7/3/2001 00:20:00;CIDADAO COMUM;N;;COQUEIROS;BH;603179.87;800404.09;3032
+3034;2001126547;B03000;AMEACA;PRACA RAUL SOARE;423;58010;7/3/2001 01:38:00;CIDADAO COMUM;N;0;CENTRO (BH);BH;610510.71;796848.26;3033
+3035;2001126634;B03000;AMEACA;RUA FLOR BRANCA;33;28509;7/3/2001 03:33:00;CIDADAO COMUM;N;0;JARDIM MONTANHES;BH;605816.65;799060.78;3034
+3036;2001126760;B06000;LESAO CORPORAL;RUA EXPEDICIONAR;12;31627;7/3/2001 07:24:00;CIDADAO COMUM;N;0;MARIA GORETTI;BH;614326.24;803386.64;3035
+3037;2001126795;B06000;LESAO CORPORAL;RUA CURITIBA;580;19090;7/3/2001 08:08:00;CIDADAO COMUM;S;;CENTRO (BH);BH;610868.49;797331.11;3036
+3038;2001126866;B03000;AMEACA;RUA DO LAGO;325;40161;7/3/2001 08:58:00;CIDADAO COMUM;S;;SAO MARCOS;BH;614131.46;802654.70;3037
+3039;2001126874;B03000;AMEACA;RUA WAGNER BUENO;406;86492;7/3/2001 09:06:00;CIDADAO COMUM;S;;JARDIM GUANABARA;BH;611620.07;807780.87;3038
+3040;2001126977;B03000;AMEACA;RUA ESPINOSA;987;26024;7/3/2001 10:06:00;CIDADAO COMUM;S;;CARLOS PRATES;BH;608773.85;797707.87;3039
+3041;2001127041;B03000;AMEACA;RUA HERCULANO DE;190;33130;7/3/2001 10:45:00;CIDADAO COMUM;S;AP301;GUTIERREZ;BH;609428.58;795499.24;3040
+3042;2001127077;B05000;SEQUESTRO E CARC;RUA HELGA TAVEIR;67;100693;7/3/2001 11:08:00;INICIATIVA;N;0;CEU AZUL;BH;603759.90;807691.36;3041
+3043;2001127098;B03000;AMEACA;RUA MARIA AMELIA;33;119024;7/3/2001 11:23:00;CIDADAO COMUM;S;0;TEIXEIRA DIAS;BH;602594.03;789712.61;3042
+3044;2001127124;B03000;AMEACA;RUA YUCATAN;100;36302;7/3/2001 11:38:00;CIDADAO COMUM;N;0;SAO PEDRO;BH;611188.45;793833.06;3043
+3045;2001127148;B04002;HOMICIDIO CONSUM;RUA BRASILIANITA;150;113894;7/3/2001 11:51:00;CIDADAO COMUM;N;;CANDELARIA;BH;607690.06;809275.37;3044
+3046;2001127201;B03000;AMEACA;RUA TABATINGA;208;66680;7/3/2001 12:21:00;CIDADAO COMUM;S;0;JOAO PINHEIRO;BH;604637.99;796344.27;3045
+3047;2001127247;B03000;AMEACA;RUA TAMBORIL;596;66793;7/3/2001 12:55:00;CIDADAO COMUM;N;0;CONCORDIA;BH;611198.91;799313.87;3046
+3048;2001127289;B03000;AMEACA;RUA MARIA AMELIA;33;119024;7/3/2001 13:30:00;CIDADAO COMUM;N;;TEIXEIRA DIAS;BH;602594.03;789712.61;3047
+3049;2001127360;B03000;AMEACA;AV FRANCISCO SAL;898;29669;7/3/2001 14:27:00;CIDADAO COMUM;N;0;SANTA EFIGENIA;BH;612234.65;796788.78;3048
+3050;2001127377;B03000;AMEACA;PRACA SANTO ANTO;125;61761;7/3/2001 14:36:00;CIDADAO COMUM;S;;JARAGUA;BH;609416.64;804336.33;3049
+3051;2001127405;B03000;AMEACA;RUA PURUS;394;55819;7/3/2001 14:59:00;CIDADAO COMUM;S;0;CONCORDIA;BH;610938.91;799271.58;3050
+3052;2001127436;B03000;AMEACA;AV DOM JOSE GASP;14;22339;7/3/2001 15:18:00;CIDADAO COMUM;S;0;CORACAO EUCARIST;BH;606024.82;797122.38;3051
+3053;2001127482;B06000;LESAO CORPORAL;AV FRANCISCO SAL;263;29669;7/3/2001 15:41:00;INICIATIVA;S;0;FUNCIONARIOS;BH;611966.14;797352.42;3052
+3054;2001127528;B06000;LESAO CORPORAL;RUA CAMPINA VERD;312;12110;7/3/2001 16:12:00;CIDADAO COMUM;N;;SALGADO FILHO;BH;606172.49;794445.71;3053
+3055;2001127548;B06000;LESAO CORPORAL;RUA SEMIRAMIS;160;64656;7/3/2001 16:22:00;CIDADAO COMUM;S;0;ARAGUAIA;BH;605337.72;789588.60;3054
+3056;2001127572;B06000;LESAO CORPORAL;RUA GALDINO;4;75590;7/3/2001 16:37:00;CIDADAO COMUM;N;0;LINDEIA;BH;599722.92;790847.61;3055
+3057;2001127591;B06000;LESAO CORPORAL;BECO SAO CRISTOV;5;301295;7/3/2001 16:47:00;CIDADAO COMUM;N;;MORRO DO PAPAGAI;BH;610556.36;793177.37;3056
+3058;2001127606;B06000;LESAO CORPORAL;RUA LUIZ LOPES;82;94431;7/3/2001 16:57:00;CIDADAO COMUM;S;;OURO PRETO;BH;606237.42;801258.18;3057
+3059;2001127633;B06000;LESAO CORPORAL;RUA MUQUICABA;370;65343;7/3/2001 17:12:00;CIDADAO COMUM;S;;GLORIA;BH;602088.07;798145.49;3058
+3060;2001127638;B06000;LESAO CORPORAL;RUA PROFESSOR EU;110;91418;7/3/2001 17:15:00;CIDADAO COMUM;S;;BURITIS;BH;607528.16;791585.70;3059
+3061;2001127708;B06000;LESAO CORPORAL;RUA COLUNA PREST;405;16354;7/3/2001 17:58:00;CIDADAO COMUM;S;;PROVIDENCIA;BH;612497.26;803910.18;3060
+3062;2001127720;B06000;LESAO CORPORAL;RUA MANOEL PASSO;369;43160;7/3/2001 18:04:00;CIDADAO COMUM;S;0;VILA HUMAITA;BH;610429.05;801721.18;3061
+3063;2001127743;B06000;LESAO CORPORAL;AV BELEM;320;8913;7/3/2001 18:15:00;CIDADAO COMUM;N;0;VERA CRUZ;BH;614947.36;797209.43;3062
+3064;2001127891;B03000;AMEACA;RUA DONA CARMEM;582;22820;7/3/2001 19:30:00;CIDADAO COMUM;N;0;SARANDI (URCA/BH;BH;603959.19;802338.10;3063
+3065;2001127929;B03000;AMEACA;RUA FICUS;125;28310;7/3/2001 19:46:00;CIDADAO COMUM;S;;INCONFIDENCIA;BH;605124.31;798223.07;3064
+3066;2001128029;B06000;LESAO CORPORAL;RUA ARROJADO LIS;120;6076;7/3/2001 20:54:00;CIDADAO COMUM;N;;INCONFIDENCIA;BH;605153.45;798173.45;3065
+3067;2001128053;B03000;AMEACA;RUA JESUINA FERR;167;119011;7/3/2001 21:06:00;INICIATIVA;S;0;TEIXEIRA DIAS;BH;602856.34;789660.64;3066
+3068;2001128088;B06000;LESAO CORPORAL;AV PORTUGAL;4984;54816;7/3/2001 21:26:00;CIDADAO COMUM;S;;ITAPOA;BH;609353.03;805409.84;3067
+3069;2001128093;B03000;AMEACA;RUA MARTINS SOAR;740;45049;7/3/2001 21:28:00;CIDADAO COMUM;S;;VISTA ALEGRE;BH;604912.80;792944.99;3068
+3070;2001128121;B03000;AMEACA;AV BERNARDO VASC;1252;9411;7/3/2001 21:41:00;CIDADAO COMUM;S;0;CACHOEIRINHA;BH;610951.68;801058.28;3069
+3071;2001128132;B09000;ABANDONO DE INCA;RUA DOS TABAIARE;42;66649;7/3/2001 21:46:00;CIDADAO COMUM;S;202;FLORESTA;BH;611831.98;797292.90;3070
+3072;2001128236;B03000;AMEACA;RUA FLOR DE MAIO;174;300399;7/3/2001 22:52:00;CIDADAO COMUM;S;0;VILA CAFEZAL;BH;614434.55;794786.90;3071
+3073;2001128265;B06000;LESAO CORPORAL;AV BIAS FORTES;722;9553;7/3/2001 23:10:00;INICIATIVA;N;0;LOURDES;BH;610734.57;796310.95;3072
+3074;2001128300;B06000;LESAO CORPORAL;RUA SAO MANOEL;94;63335;7/3/2001 23:26:00;CIDADAO COMUM;S;;FLORESTA;BH;611886.96;798345.12;3073
+3075;2001128303;B06000;LESAO CORPORAL;RUA DES RIBEIRO ;166;20002;7/3/2001 23:29:00;INICIATIVA;N;0;BARREIRO;BH;603033.13;791206.79;3074
+3076;2001128309;B03000;AMEACA;RUA MONTE DAS OL;65;99508;7/3/2001 23:31:00;CIDADAO COMUM;S;;OLARIA;BH;601547.09;789148.77;3075
+3077;2001128388;B04002;HOMICIDIO CONSUM;BECO CATARINO;430;301514;8/3/2001 00:23:00;CIDADAO COMUM;N;;SAO LUCAS;BH;613394.52;795818.55;3076
+3078;2001128417;B06000;LESAO CORPORAL;RUA QUINANTE;231;57234;8/3/2001 00:43:00;INICIATIVA;N;0;MINASCAIXA;BH;609661.87;808945.92;3077
+3079;2001128420;B06000;LESAO CORPORAL;RUA L;125;78787;8/3/2001 00:48:00;CIDADAO COMUM;S;0;CH JATOBA IV;BH;600586.54;787827.43;3078
+3080;2001128426;B03000;AMEACA;RUA ITAPETINGA;2228;35804;8/3/2001 00:46:00;CIDADAO COMUM;S;;CACHOEIRINHA;BH;610220.10;801479.69;3079
+3081;2001128460;B03000;AMEACA;RUA 51;239;302847;8/3/2001 01:30:00;CIDADAO COMUM;S;;NOVO AARAO REIS;BH;614103.15;805588.83;3080
+3082;2001128522;B03000;AMEACA;RUA FLORIANO PEI;5;29022;8/3/2001 02:56:00;CIDADAO COMUM;N;C;SAO GABRIEL;BH;613239.65;804432.77;3081
+3083;2001128528;B06000;LESAO CORPORAL;RUA CURITIBA;792;19090;8/3/2001 03:03:00;CIDADAO COMUM;N;;CENTRO (BH);BH;610814.12;797122.12;3082
+3084;2001128544;B03000;AMEACA;RUA JACUI;3489;36734;8/3/2001 03:31:00;CIDADAO COMUM;S;;IPIRANGA;BH;611609.85;801193.35;3083
+3085;2001128610;B03000;AMEACA;RUA JACUI;3493;36734;8/3/2001 05:50:00;INICIATIVA;N;0;IPIRANGA;BH;611618.36;801205.40;3084
+3086;2001128617;B06000;LESAO CORPORAL;RUA JULIO MESQUI;33;81849;8/3/2001 06:01:00;CIDADAO COMUM;S;;ITAIPU BH;BH;599314.94;788609.30;3085
+3087;2001128793;B03000;AMEACA;RUA STA APOLONIA;120;60352;8/3/2001 08:51:00;CIDADAO COMUM;N;0;DOM JOAQUIM;BH;614079.87;802000.80;3086
+3088;2001128821;B03000;AMEACA;RUA SALGUEIRO;48;3226;8/3/2001 09:13:00;CIDADAO COMUM;S;0;IPIRANGA;BH;611541.64;800461.93;3087
+3089;2001128825;B06000;LESAO CORPORAL;RUA PARAIBA;330;52170;8/3/2001 09:16:00;CIDADAO COMUM;N;AN19;FUNCIONARIOS;BH;611835.74;796063.52;3088
+3090;2001128859;B03000;AMEACA;RUA BERTOPOLIS;169;41873;8/3/2001 09:44:00;CIDADAO COMUM;S;;PROVIDENCIA;BH;612404.11;803929.57;3089
+3091;2001128883;B06000;LESAO CORPORAL;ALAMEDA DAS LATH;1200;84572;8/3/2001 10:00:00;CIDADAO COMUM;N;;SAO JOSE;BH;608808.73;803906.61;3090
+3092;2001128942;B03000;AMEACA;RUA ITABIRA;493;35237;8/3/2001 10:40:00;CIDADAO COMUM;S;CAP;LAGOINHA;BH;610931.11;798451.36;3091
+3093;2001128957;B03000;AMEACA;RUA JOSE AMARAL;155;80584;8/3/2001 10:53:00;CIDADAO COMUM;N;0;OURO PRETO;BH;606532.81;801594.14;3092
+3094;2001128991;B03000;AMEACA;RUA DOS NAMORADO;57;48210;8/3/2001 11:19:00;CIDADAO COMUM;S;LJB;PIRAJA;BH;614090.68;802963.39;3093
+3095;2001128994;B06000;LESAO CORPORAL;RUA MARTIM DE CA;256;44944;8/3/2001 11:20:00;CIDADAO COMUM;N;0;SANTO AGOSTINHO;BH;609741.45;795972.83;3094
+3096;2001129021;B06000;LESAO CORPORAL;RUA CHOPOTO;490;80180;8/3/2001 11:37:00;CIDADAO COMUM;N;;PINDORAMA;BH;601788.76;797759.65;3095
+3097;2001129204;B06000;LESAO CORPORAL;RUA SANTO AGOSTI;1381;61557;8/3/2001 13:46:00;CIDADAO COMUM;N;;INSTITUTO AGRONO;BH;613758.52;799384.75;3096
+3098;2001129302;B03000;AMEACA;RUA CARMO DA MAT;357;13661;8/3/2001 15:00:00;CIDADAO COMUM;S;;VERA CRUZ;BH;615362.69;797800.57;3097
+3099;2001129362;B06000;LESAO CORPORAL;RUA CORCOVADO;1720;14894;8/3/2001 15:47:00;CIDADAO COMUM;N;;SAO DOMINGOS;BH;607813.13;793342.15;3098
+3100;2001129373;B04001;HOMICIDIO TENTAD;RUA DOUTOR CRIST;312;55598;8/3/2001 15:53:00;CIDADAO COMUM;N;0;ARAGUAIA;BH;604751.25;789297.85;3099
+3101;2001129425;B06000;LESAO CORPORAL;RUA CINQUENTA E ;45;106416;8/3/2001 16:26:00;CIDADAO COMUM;S;;JARDIM DOS COMER;BH;608342.42;811076.87;3100
+3102;2001129466;B06000;LESAO CORPORAL;RUA CAMILO DE BR;636;11896;8/3/2001 16:47:00;CIDADAO COMUM;S;0;PADRE EUSTAQUIO;BH;605855.99;798012.24;3101
+3103;2001129508;B03000;AMEACA;RUA JOANESIA;10;37406;8/3/2001 17:13:00;INICIATIVA;S;0;SERRA;BH;612962.48;795111.42;3102
+3104;2001129512;B03000;AMEACA;RUA MONTEIRO LOB;92;46590;8/3/2001 17:16:00;CIDADAO COMUM;S;;PROFESSOR WASHIN;IB;598851.29;789377.12;3103
+3105;2001129520;B03000;AMEACA;RUA MARIA EUSTAQ;106;69460;8/3/2001 17:19:00;INICIATIVA;S;0;FLORAMAR;BH;611579.16;806666.38;3104
+3106;2001129599;B06000;LESAO CORPORAL;RUA DAVID NASSER;587;68382;8/3/2001 18:10:00;CIDADAO COMUM;N;0;PLANALTO;BH;609458.50;806627.41;3105
+3107;2001129625;B06000;LESAO CORPORAL;RUA EXPEDITO FLA;345;84847;8/3/2001 18:22:00;INICIATIVA;S;0;DA LAGOA;BH;604545.28;809198.83;3106
+3108;2001129662;B06000;LESAO CORPORAL;RUA DO LEBLON;330;40612;8/3/2001 18:45:00;CIDADAO COMUM;S;;SARANDI (URCA/BH;BH;602981.47;802543.20;3107
+3109;2001129685;B04002;HOMICIDIO CONSUM;RUA CINQUENTA;318;302845;8/3/2001 18:54:00;CIDADAO COMUM;S;0;TUPI;BH;614150.27;805475.49;3108
+3110;2001129778;B09000;ABANDONO DE INCA;ALAMEDA CHICO ME;37;96018;8/3/2001 19:34:00;CIDADAO COMUM;S;;VILA CASTANHEIRA;BH;601335.72;788785.36;3109
+3111;2001129840;B05000;SEQUESTRO E CARC;RUA JULIA FREITA;32;92262;8/3/2001 20:09:00;CIDADAO COMUM;N;0;ALVARO CAMARGOS;BH;604119.95;797579.85;3110
+3112;2001129857;B03000;AMEACA;RUA VILA DA BARR;512;8069;8/3/2001 20:19:00;CIDADAO COMUM;N;;BARREIRO;BH;602200.76;790298.47;3111
+3113;2001130090;B06000;LESAO CORPORAL;PRACA MILTON CAM;16;18867;8/3/2001 23:02:00;INICIATIVA;N;0;FUNCIONARIOS;BH;612371.63;794891.33;3112
+3114;2001130119;B06000;LESAO CORPORAL;RUA CAJUI;30;11580;8/3/2001 23:12:00;CIDADAO COMUM;S;;VILA SUZANA;BH;611836.44;803207.06;3113
+3115;2001130234;B06000;LESAO CORPORAL;RUA SOFRE;42;85588;9/3/2001 00:26:00;CIDADAO COMUM;S;0;GOIANIA;BH;615466.95;802363.54;3114
+3116;2001130302;B06000;LESAO CORPORAL;AV OLEGARIO MACI;735;49699;9/3/2001 01:19:00;INICIATIVA;N;0;CENTRO (BH);BH;610517.79;796937.79;3115
+3117;2001130451;B03000;AMEACA;AV GUANABARA;147;93400;9/3/2001 03:48:00;CIDADAO COMUM;S;;SARANDI (URCA/BH;BH;603018.25;802662.19;3116
+3118;2001130457;B06000;LESAO CORPORAL;RUA BRASIL;57;10446;9/3/2001 03:52:00;CIDADAO COMUM;S;;CABANA;BH;604945.57;793506.57;3117
+3119;2001130762;B06000;LESAO CORPORAL;RUA EMANUEL;224;87010;9/3/2001 09:31:00;CIDADAO COMUM;S;0;PILAR;BH;607677.72;788684.08;3118
+3120;2001130815;B03000;AMEACA;AV SILVA LOBO;1665;65889;9/3/2001 10:11:00;INICIATIVA;S;0;GRAJAU;BH;607998.83;795075.02;3119
+3121;2001130845;B06000;LESAO CORPORAL;RUA P SETE;31;36343;9/3/2001 10:32:00;CIDADAO COMUM;S;;SERRA VERDE;BH;608973.20;809822.11;3120
+3122;2001130880;B03000;AMEACA;RUA DES BRAULIO;2070;19917;9/3/2001 10:55:00;CIDADAO COMUM;S;;VERA CRUZ;BH;616352.52;797404.60;3121
+3123;2001130905;B03000;AMEACA;RUA CURA D'ARS;658;19019;9/3/2001 11:14:00;CIDADAO COMUM;N;;PRADO;BH;608458.95;796162.03;3122
+3124;2001130957;B04001;HOMICIDIO TENTAD;AV BARAO HOMEM D;75;7936;9/3/2001 11:43:00;CIDADAO COMUM;S;0;ESTORIL;BH;607588.49;794818.58;3123
+3125;2001130967;B06000;LESAO CORPORAL;RUA JORNALISTA J;20;86423;9/3/2001 11:50:00;CIDADAO COMUM;N;;VILA FREI LEOPOL;BH;611387.13;809456.99;3124
+3126;2001130988;B03000;AMEACA;RUA Q;49;78415;9/3/2001 12:07:00;CIDADAO COMUM;S;;VILA PINHO;BH;602108.64;787980.59;3125
+3127;2001131001;B03000;AMEACA;RUA VINTE E UM;150;302827;9/3/2001 12:17:00;CIDADAO COMUM;N;;NOVO AARAO REIS;BH;614559.08;805708.38;3126
+3128;2001131024;B06000;LESAO CORPORAL;RUA JOSE BENEDIT;95;14097;9/3/2001 12:36:00;CIDADAO COMUM;S;0;APARECIDA SETIMA;BH;608678.04;799900.10;3127
+3129;2001131052;B06000;LESAO CORPORAL;RUA DA BAHIA;1201;81155;9/3/2001 12:57:00;INICIATIVA;N;0;LOURDES;BH;611247.00;796466.91;3128
+3130;2001131062;B03000;AMEACA;AV PORTUGAL;1615;54816;9/3/2001 13:03:00;CIDADAO COMUM;N;LJ;JARDIM ATLANTICO;BH;606624.57;805076.59;3129
+3131;2001131084;B03000;AMEACA;AV BRIGADEIRO ED;146;2860;9/3/2001 13:15:00;CIDADAO COMUM;N;0;DOM BOSCO;BH;604415.87;797954.64;3130
+3132;2001131141;B03000;AMEACA;RUA FREI LEOPOLD;153;29946;9/3/2001 13:53:00;CIDADAO COMUM;S;;OURO PRETO;BH;606823.65;802833.82;3131
+3133;2001131326;B06000;LESAO CORPORAL;BECO BELMIRO DIA;12;171015;9/3/2001 15:51:00;CIDADAO COMUM;N;EN22;CABANA;BH;604788.98;794084.00;3132
+3134;2001131385;B03000;AMEACA;RUA JUATUBA;42;39367;9/3/2001 16:24:00;CIDADAO COMUM;N;0;VISTA ALEGRE;BH;605262.83;793420.62;3133
+3135;2001131589;B06000;LESAO CORPORAL;RUA FERNAO DIAS;1724;28133;9/3/2001 18:15:00;CIDADAO COMUM;S;;VERA CRUZ;BH;616225.47;797490.06;3134
+3136;2001131607;B03000;AMEACA;AV SANTA MATILDE;100;61125;9/3/2001 18:21:00;CIDADAO COMUM;S;0;DOM CABRAL;BH;604671.57;796695.46;3135
+3137;2001131626;B03000;AMEACA;RUA PERNAMBUCO;1408;53463;9/3/2001 18:29:00;CIDADAO COMUM;S;PX257;FUNCIONARIOS;BH;611366.54;794888.79;3136
+3138;2001131647;B06000;LESAO CORPORAL;RUA ANTONIO MARC;56;48539;9/3/2001 18:39:00;CIDADAO COMUM;S;0;MANTIQUEIRA;BH;606640.65;810340.57;3137
+3139;2001131681;B03000;AMEACA;BECO ALIPIO GOUL;25;301607;9/3/2001 19:04:00;INICIATIVA;S;0;CAFEZAL;BH;614372.36;794514.88;3138
+3140;2001131697;B03000;AMEACA;AV OLEGARIO MACI;742;49699;9/3/2001 19:12:00;CIDADAO COMUM;S;LJ1186;LOURDES;BH;610475.34;796973.70;3139
+3141;2001131743;B04001;HOMICIDIO TENTAD;RUA OPALA;52;50263;9/3/2001 19:39:00;CIDADAO COMUM;S;;CRUZEIRO;BH;612382.32;794474.41;3140
+3142;2001131750;B03000;AMEACA;RUA VINTE E UM;96;38727;9/3/2001 19:42:00;CIDADAO COMUM;S;0;EYMARD;BH;613449.25;803612.99;3141
+3143;2001131806;B06000;LESAO CORPORAL;RUA PINDARE;264;53725;9/3/2001 20:19:00;CIDADAO COMUM;S;;JARDIM FLORENCIA;BH;604842.13;810280.47;3142
+3144;2001131820;B03000;AMEACA;RUA SAO PEDRO;125;25642;9/3/2001 20:30:00;CIDADAO COMUM;S;;TAQUARIL;BH;617086.49;797642.21;3143
+3145;2001131823;B09000;ABANDONO DE INCA;RUA LINCOLN;116;41136;9/3/2001 20:31:00;CIDADAO COMUM;S;0;UNIAO;BH;612529.82;801293.20;3144
+3146;2001131845;B06000;LESAO CORPORAL;RUA UM;40;126811;9/3/2001 20:39:00;CIDADAO COMUM;S;CASA B/PROXIMO F;BETANIA;BH;605248.47;792522.98;3145
+3147;2001131935;B03000;AMEACA;RUA POROROCAS;157;54730;9/3/2001 21:33:00;CIDADAO COMUM;S;0;APARECIDA;BH;609174.80;799926.58;3146
+3148;2001131978;B06000;LESAO CORPORAL;AV DOM JOAO VI;500;22294;9/3/2001 22:00:00;CIDADAO COMUM;S;;CINQUENTENARIO;BH;606436.28;792638.35;3147
+3149;2001132045;B09000;ABANDONO DE INCA;RUA ROMA;425;59227;9/3/2001 22:52:00;CIDADAO COMUM;S;;COPACABANA;BH;606404.89;806324.07;3148
+3150;2001132053;B06000;LESAO CORPORAL;RUA MARIA HELENA;45;116763;9/3/2001 22:55:00;CIDADAO COMUM;N;0;GORDURAS;BH;618471.78;806457.72;3149
+3151;2001132080;B03000;AMEACA;RUA B;145;99463;9/3/2001 23:11:00;CIDADAO COMUM;S;0;ANTONIO RIBEIRO ;BH;615056.13;808241.11;3150
+3152;2001132097;B03000;AMEACA;RUA ALUIZIO DAVI;47;9770;9/3/2001 23:19:00;CIDADAO COMUM;N;;OURO PRETO;BH;606077.06;800835.16;3151
+3153;2001132123;B04001;HOMICIDIO TENTAD;RUA RIO DE JANEI;661;58772;9/3/2001 23:46:00;CIDADAO COMUM;N;0;CENTRO (BH);BH;611114.77;797039.90;3152
+3154;2001132179;B03000;AMEACA;AV JOAO XXIII;495;37926;10/3/2001 00:14:00;INICIATIVA;N;0;SAO JOSE;BH;604237.06;799490.03;3153
+3155;2001132215;B06000;LESAO CORPORAL;RUA ALBERTO BRES;416;1779;10/3/2001 00:43:00;MILITARES DAS FO;S;AP301;SAO LUCAS;BH;613739.06;795923.53;3154
+3156;2001132278;B06000;LESAO CORPORAL;RUA AGUANIL;621;1564;10/3/2001 01:19:00;CIDADAO COMUM;N;;VISTA ALEGRE;BH;605153.02;793405.94;3155
+3157;2001132312;B03000;AMEACA;RUA PILAR;143;53652;10/3/2001 01:38:00;CIDADAO COMUM;S;0;GRAJAU;BH;608312.73;795173.39;3156
+3158;2001132328;B06000;LESAO CORPORAL;RUA PENALVA;55;96276;10/3/2001 01:49:00;CIDADAO COMUM;S;;DOM SILVERIO;BH;614572.76;804374.21;3157
+3159;2001132364;B06000;LESAO CORPORAL;RUA ARCEBURGO;242;5754;10/3/2001 02:09:00;CIDADAO COMUM;N;0;BONFIM;BH;610028.45;797978.48;3158
+3160;2001132366;B06000;LESAO CORPORAL;RUA DES BRAULIO;1460;19917;10/3/2001 02:13:00;INICIATIVA;S;0;VERA CRUZ;BH;616272.96;797748.52;3159
+3161;2001132379;B06000;LESAO CORPORAL;RUA AMPERE;165;3484;10/3/2001 02:19:00;CIDADAO COMUM;S;;PRIMEIRO DE MAIO;BH;612179.88;803639.20;3160
+3162;2001132393;B04001;HOMICIDIO TENTAD;RUA ANTONIO JOSE;387;7431;10/3/2001 02:33:00;INICIATIVA;S;0;CEU AZUL;BH;605094.73;807852.13;3161
+3163;2001132421;B04001;HOMICIDIO TENTAD;RUA JOAO LUCIO B;207;37737;10/3/2001 02:56:00;CIDADAO COMUM;N;0;PRADO;BH;609066.20;796836.45;3162
+3164;2001132424;B06000;LESAO CORPORAL;RUA SOCRATES;704;85953;10/3/2001 03:00:00;CIDADAO COMUM;S;;DOM SILVERIO;BH;615328.85;804470.89;3163
+3165;2001132437;B02000;RIXA;RUA DESEMBARGADO;86;115569;10/3/2001 03:09:00;CIDADAO COMUM;S;0;SANTA ROSA;BH;610450.04;803515.63;3164
+3166;2001132463;B06000;LESAO CORPORAL;AV DEPUTADO ULTI;922;82549;10/3/2001 03:31:00;CIDADAO COMUM;N;0;PLANALTO;BH;610685.49;806327.55;3165
+3167;2001132471;B06000;LESAO CORPORAL;AV SANTOS DUMONT;574;61950;10/3/2001 03:37:00;CIDADAO COMUM;S;;CENTRO (BH);BH;611085.24;797586.10;3166
+3168;2001132479;B04001;HOMICIDIO TENTAD;RUA DOS CAETES;904;11376;10/3/2001 03:44:00;CIDADAO COMUM;N;;CENTRO (BH);BH;610737.67;797573.19;3167
+3169;2001132489;B03000;AMEACA;RUA DOM HENRIQUE;145;102531;10/3/2001 03:51:00;CIDADAO COMUM;N;;VERA CRUZ;BH;616541.52;797463.00;3168
+3170;2001132512;B03000;AMEACA;AV CECILIA PINTO;10;14447;10/3/2001 04:04:00;CIDADAO COMUM;N;;SAO BERNARDO;BH;610447.02;805109.36;3169
+3171;2001132562;B06000;LESAO CORPORAL;RUA JANUARIA;130;36936;10/3/2001 04:45:00;INICIATIVA;N;0;FLORESTA;BH;611623.24;797867.33;3170
+3172;2001132583;B03000;AMEACA;RUA CARMO DO PAR;24;13674;10/3/2001 05:08:00;INICIATIVA;S;0;SANTA BRANCA;BH;608430.17;806537.36;3171
+3173;2001132619;B06000;LESAO CORPORAL;RUA MANHUARA;754;42891;10/3/2001 05:48:00;CIDADAO COMUM;S;0;PROVIDENCIA;BH;612620.57;804097.74;3172
+3174;2001132724;B03000;AMEACA;RUA JOSE SANTIAG;217;39152;10/3/2001 08:13:00;CIDADAO COMUM;S;;PIRAJA;BH;613907.92;803290.60;3173
+3175;2001132783;B03000;AMEACA;RUA B;233;99463;10/3/2001 08:55:00;CIDADAO COMUM;S;CONJUNTO HABITAC;ANTONIO RIBEIRO ;BH;615108.83;808304.73;3174
+3176;2001132826;B03000;AMEACA;RUA JOAO ALPHONS;358;56900;10/3/2001 09:37:00;CIDADAO COMUM;S;;SANTA MARIA;BH;603482.31;795442.09;3175
+3177;2001132836;B03000;AMEACA;RUA E;25;24609;10/3/2001 09:42:00;CIDADAO COMUM;N;;SAGRADA FAMILIA;BH;613409.70;798697.81;3176
+3178;2001132854;B03000;AMEACA;RUA DESEMBARGADO;524;56837;10/3/2001 10:01:00;CIDADAO COMUM;S;0;OURO PRETO;BH;606619.76;801988.28;3177
+3179;2001132858;B03000;AMEACA;RUA ALGA MARINHA;837;66623;10/3/2001 10:04:00;CIDADAO COMUM;S;0;FLORAMAR;BH;610880.29;807307.57;3178
+3180;2001132875;B06000;LESAO CORPORAL;RUA EURITA;464;26910;10/3/2001 10:12:00;CIDADAO COMUM;S;0;SANTA TEREZA;BH;613248.91;797355.88;3179
+3181;2001132915;B06000;LESAO CORPORAL;AV DOM PEDRO II;5092;53145;10/3/2001 10:42:00;CIDADAO COMUM;S;;JARDIM MONTANHES;BH;606214.33;798752.85;3180
+3182;2001132939;B03000;AMEACA;RUA LAGOA DO OUR;60;96310;10/3/2001 11:05:00;CIDADAO COMUM;S;;SAO GABRIEL;BH;614514.29;804670.38;3181
+3183;2001132964;B03000;AMEACA;RUA ONZE DE AGOS;170;14800;10/3/2001 11:24:00;CIDADAO COMUM;S;0;LEONINA;BH;608260.71;793318.58;3182
+3184;2001133010;B06000;LESAO CORPORAL;RUA PONTA PORA;234;54601;10/3/2001 11:57:00;CIDADAO COMUM;S;;SANTA EFIGENIA;BH;613187.23;796919.20;3183
+3185;2001133018;B06000;LESAO CORPORAL;RUA AFONSO TAUNA;55;1287;10/3/2001 12:06:00;CIDADAO COMUM;N;;TUPI;BH;613048.27;805895.79;3184
+3186;2001133071;B03000;AMEACA;AV ABILIO MACHAD;1850;634;10/3/2001 12:46:00;INICIATIVA;N;0;GLORIA;BH;604280.89;799156.78;3185
+3187;2001133125;B06000;LESAO CORPORAL;RUA DOS CARIJOS;244;81243;10/3/2001 13:20:00;INICIATIVA;N;0;CENTRO (BH);BH;611237.36;797154.26;3186
+3188;2001133148;B03000;AMEACA;AV PERIMETRAL;575;78531;10/3/2001 13:34:00;CIDADAO COMUM;S;0;VILA PINHO;BH;601770.82;788354.35;3187
+3189;2001133167;B03000;AMEACA;RUA ITAQUERA;61;35920;10/3/2001 13:48:00;CIDADAO COMUM;S;0;CONCORDIA;BH;610845.53;799056.35;3188
+3190;2001133210;B04001;HOMICIDIO TENTAD;AV PRESIDENTE AN;50;4461;10/3/2001 14:14:00;INICIATIVA;N;0;LAGOINHA;BH;610871.52;798167.64;3189
+3191;2001133221;B03000;AMEACA;RUA CACHOEIRA DO;87;11221;10/3/2001 14:19:00;CIDADAO COMUM;N;0;CALAFATE;BH;607823.36;796524.67;3190
+3192;2001133233;B03000;AMEACA;RUA JOSE DO CARM;135;69559;10/3/2001 14:26:00;CIDADAO COMUM;S;;MINASCAIXA;BH;609514.03;809256.67;3191
+3193;2001133266;B06000;LESAO CORPORAL;RUA RAMIRO SIQUE;125;128858;10/3/2001 14:48:00;INICIATIVA;S;0;CASTANHEIRAS (TA;BH;617779.12;797270.76;3192
+3194;2001133288;B06000;LESAO CORPORAL;RUA NICIAS CONTI;840;56115;10/3/2001 15:06:00;CIDADAO COMUM;S;;GAMELEIRA;BH;605487.26;795114.95;3193
+3195;2001133323;B03000;AMEACA;RUA SEBASTIAO MA;6;67150;10/3/2001 15:25:00;CIDADAO COMUM;S;;UNIAO;BH;613320.67;801418.37;3194
+3196;2001133324;B06000;LESAO CORPORAL;RUA JOAQUIM CARD;399;71835;10/3/2001 15:26:00;POLICIAL MILITAR;N;FU;TUPI;BH;613424.10;806433.65;3195
+3197;2001133332;B03000;AMEACA;RUA BENEDITO NEV;80;9061;10/3/2001 15:27:00;CIDADAO COMUM;S;;NAZARE;BH;616036.74;804426.63;3196
+3198;2001133370;B06000;LESAO CORPORAL;RUA ANGRA DOS RE;101;4027;10/3/2001 15:56:00;CIDADAO COMUM;S;0;NOVA GRANADA;BH;607661.15;795094.51;3197
+3199;2001133372;B03000;AMEACA;AV ANTONIO ABRAH;1000;4320;10/3/2001 15:56:00;INICIATIVA;N;0;SAO LUIZ;BH;607791.03;803406.56;3198
+3200;2001133376;B03000;AMEACA;RUA Y;26;78497;10/3/2001 15:58:00;CIDADAO COMUM;S;;VILA PINHO;BH;602512.92;787531.28;3199
+3201;2001133431;B03000;AMEACA;RUA ARARIBA;317;5540;10/3/2001 16:27:00;CIDADAO COMUM;S;0;SAO CRISTOVAO;BH;610222.10;799194.68;3200
+3202;2001133453;B03000;AMEACA;RUA CAMBUI;329;11827;10/3/2001 16:43:00;CIDADAO COMUM;S;;GUARANI;BH;612340.28;805479.91;3201
+3203;2001133493;B03000;AMEACA;AV DOM JOAO VI;1015;22294;10/3/2001 17:04:00;CIDADAO COMUM;N;;PALMEIRAS;BH;606671.01;791769.47;3202
+3204;2001133517;B03000;AMEACA;RUA MONSENHOR NO;627;82968;10/3/2001 17:16:00;CIDADAO COMUM;S;;SARANDI (URCA/BH;BH;603609.05;802750.23;3203
+3205;2001133608;B03000;AMEACA;RUA DOS TUPIS;642;69965;10/3/2001 18:18:00;INICIATIVA;N;0;CENTRO (BH);BH;610664.10;797017.51;3204
+3206;2001133614;B06000;LESAO CORPORAL;RUA CINCO;18;27128;10/3/2001 18:23:00;CIDADAO COMUM;S;;PAULO SEXTO;BH;616655.75;806912.57;3205
+3207;2001133637;B03000;AMEACA;AV COLETORA;259;78241;10/3/2001 18:34:00;CIDADAO COMUM;S;CA;VILA PINHO;BH;601857.39;788584.95;3206
+3208;2001133639;B04001;HOMICIDIO TENTAD;RUA DO BATISMO;252;8390;10/3/2001 18:38:00;CIDADAO COMUM;S;;SAO JOSE;BH;605523.60;798732.42;3207
+3209;2001133661;B03000;AMEACA;RUA FLOR DA AMIZ;77;94646;10/3/2001 18:50:00;CIDADAO COMUM;S;;JARDIM MONTANHES;BH;606195.05;799625.17;3208
+3210;2001133668;B06000;LESAO CORPORAL;AV ANTONIO ABRAH;1000;4320;10/3/2001 18:56:00;INICIATIVA;N;0;SAO LUIZ;BH;607791.03;803406.56;3209
+3211;2001133685;B06000;LESAO CORPORAL;AV CECILIA PINTO;11;14447;10/3/2001 19:14:00;CIDADAO COMUM;S;;SAO BERNARDO;BH;610600.26;805253.80;3210
+3212;2001133726;B06000;LESAO CORPORAL;AV OTACILIO NEGR;1814;50566;10/3/2001 19:30:00;INICIATIVA;S;0;SAO LUIZ;BH;607161.46;804037.88;3211
+3213;2001133756;B06000;LESAO CORPORAL;RUA BEIRA ALTA;1016;62777;10/3/2001 19:45:00;CIDADAO COMUM;S;;SAO FRANCISCO;BH;609672.34;802505.06;3212
+3214;2001133825;B03000;AMEACA;RUA PINTOR ATAID;800;53870;10/3/2001 20:24:00;CIDADAO COMUM;S;CAFU;TUPI;BH;613715.53;806266.08;3213
+3215;2001133830;B04002;HOMICIDIO CONSUM;RUA BENTO;140;170807;10/3/2001 20:22:00;CIDADAO COMUM;N;;MORRO DAS PEDRAS;BH;608443.37;794109.13;3214
+3216;2001133843;B06000;LESAO CORPORAL;AV NOSSA SENHORA;2458;48107;10/3/2001 20:32:00;CIDADAO COMUM;N;;CARLOS PRATES;BH;609576.83;797656.73;3215
+3217;2001133878;B03000;AMEACA;RUA JOAQUIM PURI;183;96087;10/3/2001 20:54:00;CIDADAO COMUM;S;;MARIA GORETTI;BH;614518.23;803271.68;3216
+3218;2001133925;B06000;LESAO CORPORAL;RUA PINHEIROS;840;53794;10/3/2001 21:13:00;INICIATIVA;S;0;APARECIDA;BH;609294.20;800486.27;3217
+3219;2001133942;B04002;HOMICIDIO CONSUM;RUA RADIALISTA J;170;113664;10/3/2001 21:22:00;CIDADAO COMUM;N;LJ1;CEU AZUL;BH;604317.03;807560.85;3218
+3220;2001133970;B06000;LESAO CORPORAL;RUA CONEGO SANTA;71;16846;10/3/2001 21:38:00;CIDADAO COMUM;S;;CACHOEIRINHA;BH;609967.00;801045.34;3219
+3221;2001134000;B06000;LESAO CORPORAL;AV ALVARO DA SIL;120;2872;10/3/2001 21:58:00;CIDADAO COMUM;S;;BARREIRO;BH;602794.32;791345.50;3220
+3222;2001134002;B06000;LESAO CORPORAL;RUA JOAIMA;5;37359;10/3/2001 21:58:00;CIDADAO COMUM;N;;JARDIM LEBLON;BH;605520.04;808206.04;3221
+3223;2001134015;B06000;LESAO CORPORAL;RUA SAO PAULO;855;63464;10/3/2001 22:11:00;INICIATIVA;S;0;CENTRO (BH);BH;610942.81;796944.19;3222
+3224;2001134022;B04001;HOMICIDIO TENTAD;RUA ANTONIO VIEI;365;4925;10/3/2001 22:12:00;CIDADAO COMUM;S;;GLALIJA;BH;603373.75;794204.83;3223
+3225;2001134034;B03000;AMEACA;RUA DO LEBLON;425;40612;10/3/2001 22:24:00;CIDADAO COMUM;N;CAFR;SARANDI (URCA/BH;BH;602909.50;802449.12;3224
+3226;2001134053;B06000;LESAO CORPORAL;RUA ARMANDO RIBE;236;82435;10/3/2001 22:39:00;CIDADAO COMUM;N;0;SAO BERNARDO;BH;611325.66;805084.25;3225
+3227;2001134061;B03000;AMEACA;RUA JOSE DO CARM;130;40997;10/3/2001 22:47:00;INICIATIVA;S;0;VILA SUZANA;BH;611633.88;802983.51;3226
+3228;2001134090;B03000;AMEACA;RUA JOSE DOS SAN;595;118917;10/3/2001 23:02:00;CIDADAO COMUM;S;;TEIXEIRA DIAS;BH;602852.09;789247.61;3227
+3229;2001134095;B03000;AMEACA;RUA CLAUDINOR ME;125;113610;10/3/2001 23:05:00;CIDADAO COMUM;S;;MINASCAIXA;BH;609632.17;809246.02;3228
+3230;2001134157;B06000;LESAO CORPORAL;RUA SAIDE HADDAD;453;32632;10/3/2001 23:34:00;CIDADAO COMUM;N;;COPACABANA;BH;606667.30;806118.72;3229
+3231;2001134200;B06000;LESAO CORPORAL;RUA JACUI;520;36734;11/3/2001 00:08:00;CIDADAO COMUM;S;0;FLORESTA;BH;611817.14;798323.18;3230
+3232;2001134233;B06000;LESAO CORPORAL;AV JOSE BONIFACI;407;38579;11/3/2001 00:33:00;CIDADAO COMUM;N;0;PRADO LOPES;BH;610154.66;799019.14;3231
+3233;2001134292;B06000;LESAO CORPORAL;RUA AQUIDABAN;765;5190;11/3/2001 01:06:00;CIDADAO COMUM;N;AP201;PADRE EUSTAQUIO;BH;607112.28;797085.44;3232
+3234;2001134309;B06000;LESAO CORPORAL;RUA PECANHA;456;52880;11/3/2001 01:14:00;CIDADAO COMUM;S;;CARLOS PRATES;BH;610082.65;797547.31;3233
+3235;2001134366;B06000;LESAO CORPORAL;RUA FRANCISCO GO;11;68569;11/3/2001 01:47:00;CIDADAO COMUM;S;0;ESTRELA DALVA;BH;607532.57;792322.04;3234
+3236;2001134391;B06000;LESAO CORPORAL;RUA FLOR DA NOIV;220;28767;11/3/2001 02:06:00;CIDADAO COMUM;S;;JARDIM MONTANHES;BH;606155.93;799519.51;3235
+3237;2001134424;B02000;RIXA;RUA DOUTOR ALBER;40;23114;11/3/2001 02:30:00;CIDADAO COMUM;S;;HELIOPOLIS;BH;610784.10;805344.10;3236
+3238;2001134426;B04001;HOMICIDIO TENTAD;RUA VINTE E UM;150;302827;11/3/2001 02:16:00;CIDADAO COMUM;S;0;NOVO AARAO REIS;BH;614559.08;805708.38;3237
+3239;2001134439;B03000;AMEACA;AV SILVA LOBO;953;65889;11/3/2001 02:49:00;CIDADAO COMUM;S;0;CALAFATE;BH;607671.69;795612.00;3238
+3240;2001134493;B06000;LESAO CORPORAL;AV BIAS FORTES;1772;9553;11/3/2001 03:31:00;CIDADAO COMUM;S;;BARRO PRETO;BH;610196.72;797244.85;3239
+3241;2001134611;B06000;LESAO CORPORAL;RUA PADRE EUSTAQ;245;51294;11/3/2001 05:44:00;INICIATIVA;N;0;CARLOS PRATES;BH;609259.76;797673.34;3240
+3242;2001134770;B06000;LESAO CORPORAL;RUA ARGENTINA;330;5870;11/3/2001 08:40:00;CIDADAO COMUM;N;;COPACABANA;BH;606266.99;806343.30;3241
+3243;2001134910;B04001;HOMICIDIO TENTAD;AV RAJA GABAGLIA;2221;57830;11/3/2001 10:43:00;INICIATIVA;S;0;ESTORIL;BH;609072.11;793144.52;3242
+3244;2001134955;B03000;AMEACA;RUA DOS MOICANOS;27;84024;11/3/2001 11:10:00;CIDADAO COMUM;N;;SANTA MONICA;BH;606518.83;807252.81;3243
+3245;2001135047;B03000;AMEACA;RUA PARACATU;812;52095;11/3/2001 12:31:00;CIDADAO COMUM;N;0;SANTO AGOSTINHO;BH;609642.16;796526.05;3244
+3246;2001135061;B03000;AMEACA;RUA OLIVER;286;49950;11/3/2001 12:47:00;CIDADAO COMUM;S;;UNIAO;BH;612796.31;801453.59;3245
+3247;2001135100;B03000;AMEACA;RUA VERISSIMO GU;475;102720;11/3/2001 13:23:00;INICIATIVA;S;;REGINA;BH;599062.14;790155.01;3246
+3248;2001135107;B03000;AMEACA;RUA CECILIO EMIG;95;14131;11/3/2001 13:33:00;CIDADAO COMUM;N;0;PRIMEIRO DE MAIO;BH;612420.25;803804.17;3247
+3249;2001135112;B04001;HOMICIDIO TENTAD;RUA ADAMINA;285;993;11/3/2001 13:44:00;CIDADAO COMUM;N;CAB;SANTA TEREZA;BH;613245.80;797540.93;3248
+3250;2001135139;B04001;HOMICIDIO TENTAD;BECO PEDRA VERDE;195;301698;11/3/2001 14:07:00;CIDADAO COMUM;S;;VILA CAFEZAL;BH;614674.76;794885.65;3249
+3251;2001135140;B03000;AMEACA;RUA KEPLER;125;39990;11/3/2001 14:06:00;CIDADAO COMUM;S;0;SANTA LUCIA;BH;609926.77;792542.84;3250
+3252;2001135161;B06000;LESAO CORPORAL;RUA BABEL;453;7460;11/3/2001 14:29:00;CIDADAO COMUM;S;;SAO SALVADOR;BH;603180.30;799419.94;3251
+3253;2001135207;B03000;AMEACA;RUA CATALUNHA;400;14204;11/3/2001 15:13:00;CIDADAO COMUM;S;;SARANDI (URCA/BH;BH;603903.59;802481.58;3252
+3254;2001135286;B03000;AMEACA;RUA COMPASSO;79;301444;11/3/2001 15:51:00;CIDADAO COMUM;S;;VILA CAFEZAL;BH;614292.21;795356.13;3253
+3255;2001135350;B03000;AMEACA;RUA HERCILIA GOM;126;104389;11/3/2001 16:27:00;INICIATIVA;N;0;DAS INDUSTRIAS;BH;605366.03;791053.96;3254
+3256;2001135402;B03000;AMEACA;BECO DA AGUA;209;172308;11/3/2001 16:55:00;CIDADAO COMUM;S;;CAFEZAL;BH;614062.90;794471.00;3255
+3257;2001135454;B03000;AMEACA;RUA PROFESSOR NE;85;55617;11/3/2001 17:22:00;CIDADAO COMUM;S;AP204;LIBERDADE;BH;609112.67;804157.20;3256
+3258;2001135545;B06000;LESAO CORPORAL;RUA JOAO SILVA;36;89548;11/3/2001 18:16:00;CIDADAO COMUM;S;;JARDIM VITORIA;BH;617409.75;804658.18;3257
+3259;2001135556;B03000;AMEACA;RUA MONTE ALEGRE;974;46357;11/3/2001 18:22:00;CIDADAO COMUM;S;0;SAO LUCAS;BH;613142.34;795894.02;3258
+3260;2001135565;B03000;AMEACA;RUA ITAPAGIPE;299;35729;11/3/2001 18:32:00;CIDADAO COMUM;S;0;CONCORDIA;BH;611258.92;798905.89;3259
+3261;2001135582;B03000;AMEACA;RUA CENTRO SOCIA;481;14853;11/3/2001 18:39:00;CIDADAO COMUM;S;;CABANA;BH;604988.44;794481.77;3260
+3262;2001135642;B03000;AMEACA;RUA RAMIRO SIQUE;75;128858;11/3/2001 19:15:00;CIDADAO COMUM;N;;CASTANHEIRAS (TA;BH;617772.39;797223.77;3261
+3263;2001135655;B06000;LESAO CORPORAL;RUA PADRE JULIO ;1074;51496;11/3/2001 19:20:00;CIDADAO COMUM;S;0;VERA CRUZ;BH;615907.15;797512.07;3262
+3264;2001135672;B03000;AMEACA;RUA JOSE AGUILAR;52;65371;11/3/2001 19:31:00;CIDADAO COMUM;S;;SAO JOAO BATISTA;BH;608388.25;808451.24;3263
+3265;2001135704;B03000;AMEACA;RUA JULITA NUNES;210;130047;11/3/2001 19:51:00;CIDADAO COMUM;S;;MINASCAIXA;BH;609164.95;809748.79;3264
+3266;2001135711;B03000;AMEACA;AV ITAITUBA;450;35454;11/3/2001 19:58:00;CIDADAO COMUM;S;;BOA VISTA;BH;615072.17;799768.56;3265
+3267;2001135734;B06000;LESAO CORPORAL;RUA SILVIO GUEDE;80;89610;11/3/2001 20:08:00;CIDADAO COMUM;S;A;PALMEIRAS;BH;606793.47;790943.10;3266
+3268;2001135755;B06000;LESAO CORPORAL;RUA DOM LARA;36;22354;11/3/2001 20:20:00;CIDADAO COMUM;N;;VISTA ALEGRE;BH;604948.00;793141.08;3267
+3269;2001135759;B03000;AMEACA;AV AUGUSTO DE LI;566;6731;11/3/2001 20:22:00;CIDADAO COMUM;S;0;CENTRO (BH);BH;610794.74;796703.04;3268
+3270;2001135807;B03000;AMEACA;RUA CARLINDO COS;116;97294;11/3/2001 20:47:00;CIDADAO COMUM;S;;EYMARD;BH;613796.27;803705.16;3269
+3271;2001135814;B06000;LESAO CORPORAL;RUA OSCAR TROMPO;1396;50452;11/3/2001 20:52:00;INICIATIVA;S;0;MORRO DAS PEDRAS;BH;608530.75;794473.15;3270
+3272;2001135832;B06000;LESAO CORPORAL;RUA IPE;75;107002;11/3/2001 20:59:00;CIDADAO COMUM;S;0;NOVA CINTRA;BH;605934.79;794017.44;3271
+3273;2001135950;B06000;LESAO CORPORAL;RUA DR BROCHADO;347;23215;11/3/2001 22:07:00;CIDADAO COMUM;S;LJ;VERA CRUZ;BH;615924.06;798038.94;3272
+3274;2001135984;B06000;LESAO CORPORAL;RUA CORONEL ANTO;187;17619;11/3/2001 22:25:00;INICIATIVA;N;0;REGINA;BH;599173.76;790169.22;3273
+3275;2001136008;B06000;LESAO CORPORAL;RUA VEREADOR CAM;310;21005;11/3/2001 22:40:00;CIDADAO COMUM;S;0;ANTONIO RIBEIRO ;BH;615839.95;806852.22;3274
+3276;2001136016;B06000;LESAO CORPORAL;AV NELIO CERQUEI;15;72359;11/3/2001 22:50:00;INICIATIVA;S;0;TIROL;BH;600947.66;789885.51;3275
+3277;2001136021;B03000;AMEACA;RUA ARARUAMA;95;77945;11/3/2001 22:52:00;CIDADAO COMUM;S;;SALGADO FILHO;BH;606533.50;795254.31;3276
+3278;2001136023;B06000;LESAO CORPORAL;RUA PADRE PEDRO ;175;51657;11/3/2001 22:55:00;CIDADAO COMUM;S;;VENDA NOVA;BH;609671.68;808130.71;3277
+3279;2001136032;B06000;LESAO CORPORAL;AV LEONTINO FRAN;716;445;11/3/2001 23:00:00;CIDADAO COMUM;N;;SERRA VERDE;BH;608934.38;810294.22;3278
+3280;2001136046;B04001;HOMICIDIO TENTAD;RUA CONDE DE PRA;329;16704;11/3/2001 23:08:00;CIDADAO COMUM;N;0;PADRE EUSTAQUIO;BH;607817.82;797193.08;3279
+3281;2001136048;B04001;HOMICIDIO TENTAD;RUA DOS COMANCHE;835;16367;11/3/2001 23:09:00;CIDADAO COMUM;S;CA102;SANTA MONICA;BH;606520.24;807304.69;3280
+3282;2001136058;B04001;HOMICIDIO TENTAD;AV BRIGADEIRO ED;1250;2860;11/3/2001 23:15:00;CIDADAO COMUM;S;;GLORIA;BH;604129.27;798741.46;3281
+3283;2001136065;B06000;LESAO CORPORAL;AV COLETORA;706;78241;11/3/2001 23:18:00;CIDADAO COMUM;S;0;VILA PINHO;BH;602173.18;788104.09;3282
+3284;2001136072;B03000;AMEACA;RUA IBIRAPITANGA;13;33880;11/3/2001 23:20:00;CIDADAO COMUM;S;;DOM CABRAL;BH;605218.23;796295.85;3283
+3285;2001136083;B03000;AMEACA;RUA DR BROCHADO;786;23215;11/3/2001 23:28:00;CIDADAO COMUM;N;;VERA CRUZ;BH;615903.09;797998.69;3284
+3286;2001136122;B06000;LESAO CORPORAL;RUA UM;1;27979;11/3/2001 23:56:00;CIDADAO COMUM;S;0;CAPITAO EDUARDO;BH;618570.61;806854.95;3285
+3287;2001136133;B06000;LESAO CORPORAL;RUA MONTE ALEGRE;956;46357;12/3/2001 00:03:00;CIDADAO COMUM;N;;SAO LUCAS;BH;613132.69;795877.59;3286
+3288;2001136154;B06000;LESAO CORPORAL;RUA CISNE;29;15897;12/3/2001 00:21:00;CIDADAO COMUM;S;0;SANTA CRUZ (BARR;BH;603604.65;788616.62;3287
+3289;2001136176;B03000;AMEACA;RUA TREM DE FERR;500;9377;12/3/2001 00:38:00;CIDADAO COMUM;S;;ITAIPU BH;BH;598843.35;789728.92;3288
+3290;2001136186;B03000;AMEACA;AV IVAI;1283;80629;12/3/2001 00:41:00;CIDADAO COMUM;S;;DOM BOSCO;BH;604508.73;797938.76;3289
+3291;2001136197;B06000;LESAO CORPORAL;RUA VOLTS;281;73626;12/3/2001 00:47:00;CIDADAO COMUM;S;;PRIMEIRO DE MAIO;BH;612018.39;803526.32;3290
+3292;2001136248;B03000;AMEACA;AV AGENOR DE PAU;285;86250;12/3/2001 01:19:00;CIDADAO COMUM;S;REF///FABRICA DE;JAQUELINE;BH;611475.70;810215.54;3291
+3293;2001136304;B03000;AMEACA;RUA DOS CARIJOS;758;81243;12/3/2001 02:24:00;INICIATIVA;N;0;CENTRO BH;BH;610724.95;797294.54;3292
+3294;2001136750;B06000;LESAO CORPORAL;RUA SAO PAULO;279;63464;12/3/2001 11:01:00;INICIATIVA;N;0;CENTRO (BH);BH;611088.02;797493.26;3293
+3295;2001136769;B03000;AMEACA;RUA REAL MADRID;94;58091;12/3/2001 11:13:00;INICIATIVA;S;0;COQUEIROS;BH;603542.26;800110.20;3294
+3296;2001136822;B06000;LESAO CORPORAL;RUA RIACHO;90;24927;12/3/2001 11:49:00;CIDADAO COMUM;N;0;TAQUARIL;BH;617243.77;797186.28;3295
+3297;2001136898;B06000;LESAO CORPORAL;RUA UM;18;103128;12/3/2001 12:39:00;CIDADAO COMUM;S;0;OLHOS DAGUA;BH;605995.69;793120.57;3296
+3298;2001136922;B04002;HOMICIDIO CONSUM;RUA GILBERTO FRE;150;92593;12/3/2001 12:58:00;CIDADAO COMUM;N;0;CHACARAS REUNIDA;BH;605824.74;789594.96;3297
+3299;2001136943;B03000;AMEACA;RUA ITAPEVA;721;35820;12/3/2001 13:10:00;CIDADAO COMUM;N;0;CONCORDIA;BH;611512.69;799189.30;3298
+3300;2001136965;B03000;AMEACA;AV DOS BANDEIRAN;325;7775;12/3/2001 13:27:00;CIDADAO COMUM;S;0;SION;BH;611990.67;793015.07;3299
+3301;2001136997;B03000;AMEACA;RUA ALIPIO DE ME;735;2378;12/3/2001 14:00:00;CIDADAO COMUM;S;0;JARDIM MONTANHES;BH;606267.32;798788.92;3300
+3302;2001137181;B04001;HOMICIDIO TENTAD;AV GETULIO VARGA;1444;81256;12/3/2001 16:00:00;CIDADAO COMUM;N;;FUNCIONARIOS;BH;611346.34;795024.47;3301
+3303;2001137233;B03000;AMEACA;RUA IBIRAPITANGA;285;33880;12/3/2001 16:25:00;CIDADAO COMUM;S;0;DOM CABRAL;BH;605026.43;796485.74;3302
+3304;2001137242;B03000;AMEACA;AV SARAMENHA;1525;64007;12/3/2001 16:30:00;CIDADAO COMUM;S;0;GUARANI;BH;613298.64;805560.73;3303
+3305;2001137298;B03000;AMEACA;RUA GRAUNAS;213;31797;12/3/2001 16:54:00;CIDADAO COMUM;N;;FLAVIO MARQUES D;BH;605268.99;788621.91;3304
+3306;2001137310;B06000;LESAO CORPORAL;AV DOS ANDRADAS;1120;3761;12/3/2001 17:04:00;CIDADAO COMUM;N;;SANTA EFIGENIA;BH;612076.67;796872.70;3305
+3307;2001137316;B06000;LESAO CORPORAL;RUA I;155;41454;12/3/2001 17:06:00;CIDADAO COMUM;S;;CH CONFISCO;BH;602858.57;802861.67;3306
+3308;2001137333;B03000;AMEACA;RUA MARIA GERTRU;325;98993;12/3/2001 17:18:00;CIDADAO COMUM;N;;CEU AZUL;BH;604660.09;808431.77;3307
+3309;2001137337;B06000;LESAO CORPORAL;RUA PROFESSOR AN;62;4358;12/3/2001 17:19:00;CIDADAO COMUM;S;AP201;LOURDES;BH;610900.31;795508.58;3308
+3310;2001137432;B03000;AMEACA;PRACA RAUL SOARE;423;58010;12/3/2001 18:23:00;INICIATIVA;N;0;CENTRO BH;BH;610510.71;796848.26;3309
+3311;2001137546;B06000;LESAO CORPORAL;RUA SILVIANOPOLI;153;66015;12/3/2001 19:33:00;CIDADAO COMUM;N;0;SANTA TEREZA;BH;614056.98;797864.30;3310
+3312;2001137569;B03000;AMEACA;RUA DA COLINA;122;102270;12/3/2001 19:47:00;CIDADAO COMUM;S;0;TIROL;BH;601154.85;789668.92;3311
+3313;2001137582;B06000;LESAO CORPORAL;RUA MIRIAM WANDE;73;116041;12/3/2001 19:56:00;CIDADAO COMUM;N;0;DONA CLARA;BH;611425.09;803472.66;3312
+3314;2001137633;B03000;AMEACA;RUA CONDE D'EU;923;16631;12/3/2001 20:35:00;INICIATIVA;S;0;SAUDADE;BH;615588.75;797702.47;3313
+3315;2001137641;B06000;LESAO CORPORAL;RUA I;195;41454;12/3/2001 20:41:00;CIDADAO COMUM;N;CAFU;CH CONFISCO;BH;602841.28;802896.95;3314
+3316;2001137648;B03000;AMEACA;RUA IRACEMA BRAS;18;91405;12/3/2001 20:44:00;INICIATIVA;N;0;PALMEIRAS;BH;607490.84;791887.56;3315
+3317;2001137655;B03000;AMEACA;RUA CALMA;65;11679;12/3/2001 20:51:00;CIDADAO COMUM;S;0;BOA VISTA;BH;616096.68;800314.24;3316
+3318;2001137672;B03000;AMEACA;RUA GUAPORE;17;32125;12/3/2001 21:00:00;CIDADAO COMUM;S;;NOVA CINTRA;BH;605507.08;794128.89;3317
+3319;2001137741;B09000;ABANDONO DE INCA;RUA JOSE MAURO D;255;102125;12/3/2001 21:50:00;CIDADAO COMUM;N;CAA;MINEIRAO;BH;601633.89;785370.24;3318
+3320;2001137835;B03000;AMEACA;RUA PORTO SEGURO;544;60595;12/3/2001 22:55:00;CIDADAO COMUM;S;;NOVA VISTA;BH;615015.28;800738.31;3319
+3321;2001137851;B04001;HOMICIDIO TENTAD;RUA REGENCIA;271;301448;12/3/2001 23:03:00;CIDADAO COMUM;S;PX271;VILA CAFEZAL;BH;614107.56;795461.45;3320
+3322;2001137864;B03000;AMEACA;RUA ODILIA GONCA;163;49080;12/3/2001 23:10:00;CIDADAO COMUM;S;;PIRAJA;BH;614130.19;803011.41;3321
+3323;2001138002;B06000;LESAO CORPORAL;RUA ATALIBA LAGO;119;710;13/3/2001 01:09:00;CIDADAO COMUM;N;0;NOVA SUISSA;BH;607254.89;795684.00;3322
+3324;2001138145;B03000;AMEACA;RUA CURI;749;19047;13/3/2001 04:12:00;CIDADAO COMUM;S;CAFRENT;SAO GERALDO;BH;615768.04;799053.75;3323
+3325;2001138173;B06000;LESAO CORPORAL;RUA GONCALVES DI;2700;31513;13/3/2001 05:25:00;CIDADAO COMUM;S;0;SANTO AGOSTINHO;BH;609946.31;796198.75;3324
+3326;2001138221;B06000;LESAO CORPORAL;RUA QUATRO DE MA;140;57118;13/3/2001 07:00:00;CIDADAO COMUM;S;0;LEONINA;BH;608669.25;793470.73;3325
+3327;2001138408;B03000;AMEACA;AV CORONEL DURVA;842;17688;13/3/2001 09:11:00;CIDADAO COMUM;S;;DURVAL DE BARROS;BH;598151.28;790894.64;3326
+3328;2001138499;B03000;AMEACA;RUA JOSEFINA PIR;200;39253;13/3/2001 10:24:00;CIDADAO COMUM;S;;ITAIPU BH;BH;599776.55;789186.36;3327
+3329;2001138511;B03000;AMEACA;RUA FELIPE CAMAR;21;27938;13/3/2001 10:28:00;CIDADAO COMUM;S;;ESPLANADA;BH;614109.28;798485.73;3328
+3330;2001138568;B03000;AMEACA;AV MARIA CONCEIC;322;32052;13/3/2001 10:59:00;CIDADAO COMUM;S;;GOIANIA;BH;615551.34;803923.05;3329
+3331;2001138578;B06000;LESAO CORPORAL;RUA DUZENTOS E Q;76;24321;13/3/2001 11:04:00;CIDADAO COMUM;N;0;CH VALE DO JATOB;BH;600636.59;787113.12;3330
+3332;2001138653;B06000;LESAO CORPORAL;RUA VERISSIMO GU;462;102720;13/3/2001 11:57:00;CIDADAO COMUM;S;;ITAIPU BH;BH;599091.26;790147.08;3331
+3333;2001138702;B03000;AMEACA;AV DOUTOR CRISTI;2213;62459;13/3/2001 12:35:00;CIDADAO COMUM;S;;ITAPOA;BH;609823.89;806007.84;3332
+3334;2001138747;B06000;LESAO CORPORAL;RUA SILVA VIANA;89;65923;13/3/2001 13:01:00;CIDADAO COMUM;S;CSA;SALGADO FILHO;BH;606569.99;794493.65;3333
+3335;2001138752;B06000;LESAO CORPORAL;RUA STA EFIGENIA;50;60539;13/3/2001 13:08:00;CIDADAO COMUM;S;0;SAO MARCOS;BH;614184.47;802711.80;3334
+3336;2001138946;B03000;AMEACA;RUA ITAPEMA;162;35760;13/3/2001 15:29:00;INICIATIVA;S;0;ANCHIETA;BH;612289.18;793841.58;3335
+3337;2001139028;B06000;LESAO CORPORAL;RUA HERCULANO MO;205;37967;13/3/2001 16:17:00;CIDADAO COMUM;S;0;NOVA CINTRA;BH;605544.73;793496.43;3336
+3338;2001139330;B03000;AMEACA;RUA JACUI;2811;36734;13/3/2001 18:47:00;CIDADAO COMUM;N;;IPIRANGA;BH;611411.53;800497.94;3337
+3339;2001139401;B06000;LESAO CORPORAL;RUA BRANT HORTA;5;104593;13/3/2001 19:29:00;CIDADAO COMUM;S;;MARIA HELENA;BH;605831.72;810788.33;3338
+3340;2001139446;B04001;HOMICIDIO TENTAD;RUA JOSE FELIX M;1700;7416;13/3/2001 19:55:00;INICIATIVA;S;0;MANTIQUEIRA;BH;606728.71;811705.78;3339
+3341;2001139482;B03000;AMEACA;RUA ANGOLA;300;4001;13/3/2001 20:17:00;INICIATIVA;S;0;SAO PAULO;BH;612605.92;802886.01;3340
+3342;2001139492;B09000;ABANDONO DE INCA;RUA PATATIVA;105;52518;13/3/2001 20:19:00;CIDADAO COMUM;S;PRACA IRERE;FLAVIO MARQUES D;BH;604802.99;789000.10;3341
+3343;2001139542;B06000;LESAO CORPORAL;RUA GENERAL ARAN;189;30813;13/3/2001 20:57:00;CIDADAO COMUM;S;0;JARAGUA;BH;609466.26;804067.62;3342
+3344;2001139588;B03000;AMEACA;RUA TRINTA E SET;54;34190;13/3/2001 21:26:00;CIDADAO COMUM;S;0;CONJUNTO FELICID;BH;612530.17;807443.42;3343
+3345;2001139594;B06000;LESAO CORPORAL;RUA CALDAS DA RA;2178;61100;13/3/2001 21:31:00;CIDADAO COMUM;S;;SAO FRANCISCO;BH;609144.55;801773.57;3344
+3346;2001139684;B03000;AMEACA;RUA BARROCA;5;24611;13/3/2001 22:26:00;CIDADAO COMUM;S;NR125;TAQUARIL;BH;617467.89;797401.78;3345
+3347;2001139719;B03000;AMEACA;RUA IGUACU;508;34118;13/3/2001 22:52:00;CIDADAO COMUM;S;;CONCORDIA;BH;611371.61;799012.35;3346
+3348;2001139723;B03000;AMEACA;RUA SERRA JOSE V;140;52499;13/3/2001 22:56:00;CIDADAO COMUM;S;;SANTA CECILIA;BH;601470.84;787774.23;3347
+3349;2001139782;B03000;AMEACA;AV AMINTAS VIDAL;1729;118769;13/3/2001 23:24:00;CIDADAO COMUM;S;0;NOVA GAMELEIRA;BH;605199.95;794638.45;3348
+3350;2001139791;B04001;HOMICIDIO TENTAD;RUA JOSE JORGE F;321;38884;13/3/2001 23:30:00;CIDADAO COMUM;S;0;NOVA BARROCA;BH;607534.36;793019.31;3349
+3351;2001139814;B03000;AMEACA;RUA DES CINTRA N;656;62966;13/3/2001 23:44:00;CIDADAO COMUM;0;0;MILIONARIOS;BH;604451.86;789966.96;3350
+3352;2001139816;B03000;AMEACA;RUA PROFESSOR MI;1935;128628;13/3/2001 23:47:00;CIDADAO COMUM;S;;NOVA ESPERANCA;BH;608960.31;799824.11;3351
+3353;2001139825;B03000;AMEACA;RUA TREZE DE SET;180;69168;13/3/2001 23:54:00;CIDADAO COMUM;S;CAB;LEONINA;BH;608442.23;793344.13;3352
+3354;2001139829;B03000;AMEACA;AV FLOR DE SEDA;1290;748;13/3/2001 23:57:00;INICIATIVA;S;0;LINDEIA;BH;599939.54;790359.54;3353
+3355;2001139851;B04001;HOMICIDIO TENTAD;RUA DO CRUZEIRO;55;18854;14/3/2001 00:16:00;CIDADAO COMUM;S;;SAO MARCOS;BH;613597.78;802791.01;3354
+3356;2001140018;B03000;AMEACA;AV ANTONIO ABRAH;1000;4320;14/3/2001 03:26:00;INICIATIVA;N;0;SAO LUIZ;BH;607791.03;803406.56;3355
+3357;2001140054;B04001;HOMICIDIO TENTAD;RUA 39;176;302835;14/3/2001 04:59:00;INICIATIVA;N;0;NOVO AARAO REIS;BH;613952.77;805354.20;3356
+3358;2001140062;B08000;VIOLACAO DE DOMI;RUA CEARA;179;14406;14/3/2001 05:30:00;CIDADAO COMUM;S;0;SANTA EFIGENIA;BH;612485.49;796745.96;3357
+3359;2001140070;B06000;LESAO CORPORAL;RUA DOS CARIJOS;1022;81243;14/3/2001 05:48:00;INICIATIVA;S;0;CENTRO BH;BH;610474.65;797355.45;3358
+3360;2001140080;B03000;AMEACA;RUA LUCIO FLAVIO;20;50972;14/3/2001 06:11:00;CIDADAO COMUM;S;0;MINASCAIXA;BH;609454.19;809673.48;3359
+3361;2001140086;B06000;LESAO CORPORAL;AV ASSIS CHATEAU;421;6353;14/3/2001 06:15:00;CIDADAO COMUM;S;;FLORESTA;BH;611953.21;797271.49;3360
+3362;2001140106;B06000;LESAO CORPORAL;RUA GENERAL EPHI;115;50059;14/3/2001 07:06:00;CIDADAO COMUM;S;;ITAPOA;BH;609233.80;805997.47;3361
+3363;2001140112;B06000;LESAO CORPORAL;RUA LEOPOLDINA;13;40739;14/3/2001 07:12:00;CIDADAO COMUM;N;0;SANTO ANTONIO;BH;610963.61;794854.30;3362
+3364;2001140131;B02000;RIXA;RUA MANAUS;346;42747;14/3/2001 07:34:00;CIDADAO COMUM;S;;SANTA EFIGENIA;BH;612940.29;796427.76;3363
+3365;2001140321;B03000;AMEACA;RUA DAVIDSON PIM;214;124189;14/3/2001 09:35:00;CIDADAO COMUM;S;0;JARDIM DOS COMER;BH;607258.18;811738.99;3364
+3366;2001140457;B03000;AMEACA;RUA SAO CLARET;190;114755;14/3/2001 11:03:00;CIDADAO COMUM;N;AP302;VILA SILVEIRA;BH;611777.60;800427.71;3365
+3367;2001140661;B02000;RIXA;AV DOM PEDRO II;3400;53145;14/3/2001 13:38:00;INICIATIVA;N;;ADELAIDE;BH;607623.64;797937.10;3366
+3368;2001140669;B06000;LESAO CORPORAL;RUA PROFESSOR MO;725;55585;14/3/2001 13:40:00;CIDADAO COMUM;N;0;FUNCIONARIOS;BH;611848.20;794904.52;3367
+3369;2001140698;B08000;VIOLACAO DE DOMI;RUA ALFREDO NOHM;199;22704;14/3/2001 13:57:00;INICIATIVA;S;0;DAS INDUSTRIAS;BH;604541.99;792319.73;3368
+3370;2001140875;B03000;AMEACA;RUA PONTA PORA;140;54601;14/3/2001 16:03:00;POLICIAL MILITAR;N;;SANTA EFIGENIA;BH;613187.23;796919.20;3369
+3371;2001140906;B03000;AMEACA;RUA STA JUDITE;565;60816;14/3/2001 16:18:00;CIDADAO COMUM;S;;APARECIDA SETIMA;BH;608890.87;800502.72;3370
+3372;2001141013;B06000;LESAO CORPORAL;AV GETULIO VARGA;809;81256;14/3/2001 17:19:00;CIDADAO COMUM;S;0;FUNCIONARIOS;BH;611927.12;795308.34;3371
+3373;2001141071;B03000;AMEACA;RUA ALDO DE SA B;49;98750;14/3/2001 17:51:00;CIDADAO COMUM;N;;DA LAGOA;BH;604924.09;809416.56;3372
+3374;2001141121;B06000;LESAO CORPORAL;AV GETULIO VARGA;613;81256;14/3/2001 18:15:00;INICIATIVA;N;0;FUNCIONARIOS;BH;612093.15;795403.01;3373
+3375;2001141197;B03000;AMEACA;RUA SOFRE;42;85588;14/3/2001 18:58:00;CIDADAO COMUM;S;0;GOIANIA;BH;615466.95;802363.54;3374
+3376;2001141259;B04001;HOMICIDIO TENTAD;RUA CAPELINHA;20;300406;14/3/2001 19:24:00;CIDADAO COMUM;N;;MORRO DO PAPAGAI;BH;610483.17;793376.89;3375
+3377;2001141269;B06000;LESAO CORPORAL;RUA ARANTINA;165;58697;14/3/2001 19:35:00;CIDADAO COMUM;N;;MINASLANDIA;BH;612211.61;804489.48;3376
+3378;2001141276;B03000;AMEACA;RUA W QUATRO;514;122634;14/3/2001 19:38:00;CIDADAO COMUM;N;;PONGELUPE;BH;603929.62;787324.64;3377
+3379;2001141312;B03000;AMEACA;RUA RIO POMBA;1246;54567;14/3/2001 19:54:00;CIDADAO COMUM;S;;PADRE EUSTAQUIO;BH;607109.63;797801.63;3378
+3380;2001141380;B06000;LESAO CORPORAL;AV CORONEL JOSE ;181;84604;14/3/2001 20:33:00;CIDADAO COMUM;S;;SAO JOSE;BH;608832.60;803978.64;3379
+3381;2001141402;B06000;LESAO CORPORAL;RUA MARIANA BARC;145;62994;14/3/2001 20:47:00;CIDADAO COMUM;S;0;APARECIDA SETIMA;BH;608869.02;800147.51;3380
+3382;2001141441;B03000;AMEACA;RUA CEARA;279;14406;14/3/2001 21:09:00;CIDADAO COMUM;N;0;SANTA EFIGENIA;BH;612470.16;796689.96;3381
+3383;2001141449;B03000;AMEACA;RUA JOSE DE OLIV;25;63161;14/3/2001 21:13:00;CIDADAO COMUM;S;0;ARAGUAIA;BH;604052.63;790469.09;3382
+3384;2001141461;B03000;AMEACA;RUA OITENTA E TR;50;124280;14/3/2001 21:20:00;CIDADAO COMUM;S;;JARDIM DOS COMER;BH;607669.40;811934.97;3383
+3385;2001141469;B03000;AMEACA;RUA MARTINS AFON;388;71457;14/3/2001 21:23:00;CIDADAO COMUM;N;0;PATROCINIO;BH;603630.03;799348.03;3384
+3386;2001141515;B06000;LESAO CORPORAL;RUA JULIO KLEIM ;344;7302;14/3/2001 21:53:00;INICIATIVA;N;0;BETANIA;BH;605961.02;792449.57;3385
+3387;2001141665;B06000;LESAO CORPORAL;RUA CORONEL JOAQ;372;87063;14/3/2001 23:26:00;CIDADAO COMUM;S;0;CEU AZUL;BH;604738.67;807922.80;3386
+3388;2001141677;B09000;ABANDONO DE INCA;RUA CONEGO PINHE;708;16820;14/3/2001 23:33:00;CIDADAO COMUM;S;;PARAISO;BH;614349.66;796709.82;3387
+3389;2001141900;B06000;LESAO CORPORAL;RUA HENRIQUE DIA;93;33042;15/3/2001 03:13:00;CIDADAO COMUM;N;0;APARECIDA;BH;609281.26;800060.96;3388
+3390;2001141953;B03000;AMEACA;RUA JOANESIA;9;37406;15/3/2001 04:25:00;CIDADAO COMUM;N;AP03;SERRA;BH;612963.67;795138.79;3389
+3391;2001142178;B03000;AMEACA;RUA NOGUEIRA DE ;28;47800;15/3/2001 08:54:00;CIDADAO COMUM;S;0;JOAO PINHEIRO;BH;604732.74;795679.00;3390
+3392;2001142412;B06000;LESAO CORPORAL;RUA SESSENTA E O;31;106066;15/3/2001 11:32:00;CIDADAO COMUM;S;0;JARDIM DOS COMER;BH;607962.18;811691.00;3391
+3393;2001142522;B06000;LESAO CORPORAL;RUA NELSON JOSE ;59;98877;15/3/2001 12:52:00;CIDADAO COMUM;S;;DA LAGOA;BH;604821.51;809427.80;3392
+3394;2001142577;B03000;AMEACA;RUA SILVA ORTIZ;300;7520;15/3/2001 13:26:00;CIDADAO COMUM;N;;JOAO PINHEIRO;BH;604675.35;796257.53;3393
+3395;2001142606;B03000;AMEACA;RUA MALVA;156;115760;15/3/2001 13:49:00;CIDADAO COMUM;S;;HAVAI;BH;607321.62;793409.57;3394
+3396;2001142647;B03000;AMEACA;RUA LUTHER KING;20;41946;15/3/2001 14:12:00;CIDADAO COMUM;S;0;CIDADE NOVA;BH;612652.26;799995.01;3395
+3397;2001142773;B06000;LESAO CORPORAL;RUA CARLOS EDUAR;436;92073;15/3/2001 15:31:00;CIDADAO COMUM;S;0;FILADELFIA;BH;602312.89;797192.51;3396
+3398;2001142875;B02000;RIXA;RUA CONCEICAO DA;180;14258;15/3/2001 16:17:00;INICIATIVA;S;0;SANTA TEREZINHA;BH;604616.08;802515.97;3397
+3399;2001142985;B03000;AMEACA;RUA SANTOS;2200;61910;15/3/2001 17:24:00;INICIATIVA;S;0;SAO DOMINGOS;BH;607908.90;793256.53;3398
+3400;2001143090;B03000;AMEACA;RUA ASCENCAO;26;6278;15/3/2001 18:09:00;CIDADAO COMUM;S;;SAO JOSE;BH;605379.29;798810.81;3399
+3401;2001143142;B06000;LESAO CORPORAL;RUA CONSELHEIRO ;351;16988;15/3/2001 18:33:00;CIDADAO COMUM;S;0;SALGADO FILHO;BH;606657.62;794080.67;3400
+3402;2001143187;B03000;AMEACA;AV SANTOS DUMONT;381;61950;15/3/2001 18:55:00;CIDADAO COMUM;S;;CENTRO (BH);BH;611250.50;797490.44;3401
+3403;2001143202;B04001;HOMICIDIO TENTAD;RUA JOSE CHRISTI;105;106949;15/3/2001 19:02:00;INICIATIVA;N;0;NOVA CINTRA;BH;605792.55;793322.96;3402
+3404;2001143346;B03000;AMEACA;RUA CONDE D'EU;926;16631;15/3/2001 20:27:00;INICIATIVA;S;0;SAUDADE;BH;615552.91;797716.18;3403
+3405;2001143397;B03000;AMEACA;RUA CONDE D'EU;923;16631;15/3/2001 20:56:00;CIDADAO COMUM;S;FU;SAUDADE;BH;615588.75;797702.47;3404
+3406;2001143398;B03000;AMEACA;RUA UM;114;96005;15/3/2001 20:56:00;CIDADAO COMUM;S;0;MARIA GORETTI;BH;614583.51;803368.88;3405
+3407;2001143408;B03000;AMEACA;RUA CINCO;407;81647;15/3/2001 21:02:00;CIDADAO COMUM;N;;OLHOS DAGUA;BH;608262.81;788625.24;3406
+3408;2001143418;B05000;SEQUESTRO E CARC;RUA ABAETE;55;546;15/3/2001 21:04:00;CIDADAO COMUM;N;0;BONFIM;BH;610111.42;797998.63;3407
+3409;2001143426;B03000;AMEACA;RUA FATIMA SIMOE;44;117205;15/3/2001 21:15:00;CIDADAO COMUM;S;0;CAPITAO EDUARDO;BH;618332.22;806602.98;3408
+3410;2001143452;B03000;AMEACA;RUA JOSE SABINO ;125;98911;15/3/2001 21:28:00;CIDADAO COMUM;N;;DA LAGOA;BH;604731.93;809431.45;3409
+3411;2001143454;B03000;AMEACA;RUA PROFESSORA R;305;51887;15/3/2001 21:30:00;CIDADAO COMUM;S;;REGINA;BH;598852.69;790207.85;3410
+3412;2001143478;B04002;HOMICIDIO CONSUM;RUA DA BOLIVIA;136;9884;15/3/2001 21:47:00;CIDADAO COMUM;N;AP202;SAO PEDRO;BH;611293.61;793900.87;3411
+3413;2001143483;B06000;LESAO CORPORAL;RUA JACINTO FERR;209;36674;15/3/2001 21:49:00;CIDADAO COMUM;S;;NOVA BARROCA;BH;607663.08;792741.35;3412
+3414;2001143485;B06000;LESAO CORPORAL;RUA MANOEL CAYLL;121;43043;15/3/2001 21:52:00;CIDADAO COMUM;S;;HORTO;BH;613259.68;798134.49;3413
+3415;2001143512;B06000;LESAO CORPORAL;RUA VIRTULINO PI;155;130438;15/3/2001 22:06:00;CIDADAO COMUM;N;0;OLARIA;BH;602074.19;789195.72;3414
+3416;2001143628;B06000;LESAO CORPORAL;RUA MENDES DE OL;1084;45430;15/3/2001 23:17:00;CIDADAO COMUM;S;0;SANTO ANDRE;BH;609718.74;799470.77;3415
+3417;2001143672;B06000;LESAO CORPORAL;RUA DOS AGRONOMO;270;103459;15/3/2001 23:48:00;CIDADAO COMUM;N;;CONJUNTO ALIPIO ;BH;604645.46;800074.41;3416
+3418;2001143686;B06000;LESAO CORPORAL;RUA JOSE DE LIMA;37;38897;15/3/2001 23:58:00;INICIATIVA;S;0;FLORAMAR;BH;611871.50;805757.42;3417
+3419;2001143707;B03000;AMEACA;RUA CONDE D'EU;923;16631;16/3/2001 00:07:00;CIDADAO COMUM;S;0;SAUDADE;BH;615588.75;797702.47;3418
+3420;2001143721;B03000;AMEACA;RUA CAMPOS SALES;472;12300;16/3/2001 00:17:00;CIDADAO COMUM;S;0;NOVA SUISSA;BH;607050.85;796279.60;3419
+3421;2001143726;B06000;LESAO CORPORAL;RUA CARLOS FREDE;70;20610;16/3/2001 00:21:00;INICIATIVA;S;0;OURO PRETO;BH;606320.33;802238.74;3420
+3422;2001143738;B03000;AMEACA;RUA GUILHERME DE;400;32484;16/3/2001 00:28:00;CIDADAO COMUM;S;AP202;SANTO ANTONIO;BH;610616.72;793886.05;3421
+3423;2001143787;B03000;AMEACA;RUA SAO PAULO;848;63464;16/3/2001 01:17:00;INICIATIVA;N;APT1302;CENTRO BH;BH;610915.13;796961.87;3422
+3424;2001143833;B06000;LESAO CORPORAL;RUA ALCIDES PERE;866;107711;16/3/2001 01:54:00;CIDADAO COMUM;N;;MANTIQUEIRA;BH;606811.68;811564.61;3423
+3425;2001143851;B02000;RIXA;RUA MAJOR LOPES;760;42646;16/3/2001 02:16:00;CIDADAO COMUM;N;0;SAO PEDRO;BH;611405.26;794100.40;3424
+3426;2001143859;B04002;HOMICIDIO CONSUM;RUA DOUTOR ARGEM;160;23155;16/3/2001 02:25:00;CIDADAO COMUM;N;;SAO LUCAS;BH;614033.70;795650.47;3425
+3427;2001143974;B04001;HOMICIDIO TENTAD;RUA INDIANA;1270;34410;16/3/2001 04:58:00;INICIATIVA;S;0;JARDIM AMERICA;BH;607710.69;794088.68;3426
+3428;2001144154;B03000;AMEACA;RUA LUIZA SAN MA;861;41858;16/3/2001 08:34:00;CIDADAO COMUM;S;;PARAISO;BH;614280.39;796336.59;3427
+3429;2001144327;B03000;AMEACA;RUA A;709;41110;16/3/2001 10:17:00;CIDADAO COMUM;S;;CH CONFISCO;BH;602648.51;802862.42;3428
+3430;2001144365;B06000;LESAO CORPORAL;RUA JOAO ZACARIA;100;15500;16/3/2001 10:40:00;CIDADAO COMUM;N;;COPACABANA;BH;605379.27;806582.71;3429
+3431;2001144404;B03000;AMEACA;RUA PROFESSORA M;1090;70987;16/3/2001 11:06:00;CIDADAO COMUM;S;0;VILA OESTE;BH;604347.01;795429.68;3430
+3432;2001144467;B06000;LESAO CORPORAL;RUA PRINCIPAL;38;102699;16/3/2001 11:40:00;CIDADAO COMUM;S;;TIROL;BH;600913.57;789222.97;3431
+3433;2001144509;B03000;AMEACA;RUA CINCO;10;27128;16/3/2001 12:04:00;INICIATIVA;S;0;PAULO SEXTO;BH;616475.28;806960.67;3432
+3434;2001144526;B04002;HOMICIDIO CONSUM;RUA DOS BANDOLIN;540;106980;16/3/2001 12:17:00;CIDADAO COMUM;S;0;CH CALIFORNIA;BH;603983.54;797176.08;3433
+3435;2001144569;B06000;LESAO CORPORAL;RUA DOS TUPIS;820;69965;16/3/2001 12:48:00;INICIATIVA;S;0;CENTRO (BH);BH;610499.24;797065.06;3434
+3436;2001144598;B03000;AMEACA;AV DOM PEDRO II;5092;53145;16/3/2001 13:03:00;CIDADAO COMUM;S;;JARDIM MONTANHES;BH;606214.33;798752.85;3435
+3437;2001144639;B02000;RIXA;RUA HELIO GILBER;15;55991;16/3/2001 13:36:00;CIDADAO COMUM;N;0;FLORAMAR;BH;611891.86;806760.29;3436
+3438;2001144721;B03000;AMEACA;RUA GONCALVES DI;146;31513;16/3/2001 14:32:00;CIDADAO COMUM;S;;FUNCIONARIOS;BH;612406.58;795539.25;3437
+3439;2001144748;B03000;AMEACA;RUA CEARA;640;14406;16/3/2001 14:49:00;CIDADAO COMUM;S;;SANTA EFIGENIA;BH;612330.77;796303.86;3438
+3440;2001145048;B06000;LESAO CORPORAL;RUA JOSE MARIANO;11;50480;16/3/2001 17:42:00;CIDADAO COMUM;S;CAA;TUPI;BH;612132.07;806501.28;3439
+3441;2001145123;B03000;AMEACA;RUA PADRE EUSTAQ;2408;51294;16/3/2001 18:22:00;CIDADAO COMUM;S;0;PADRE EUSTAQUIO;BH;607296.09;797652.98;3440
+3442;2001145159;B03000;AMEACA;RUA MARIA COLARE;37;93832;16/3/2001 18:38:00;CIDADAO COMUM;S;0;DIAMANTE;BH;601312.46;789810.08;3441
+3443;2001145277;B04001;HOMICIDIO TENTAD;RUA FERNAO DIAS;1084;28133;16/3/2001 19:37:00;INICIATIVA;S;0;VERA CRUZ;BH;616058.53;798249.96;3442
+3444;2001145292;B06000;LESAO CORPORAL;AV OLEGARIO MACI;228;49699;16/3/2001 19:45:00;CIDADAO COMUM;S;0;CENTRO (BH);BH;610607.36;797465.13;3443
+3445;2001145345;B03000;AMEACA;RUA GENERAL OZOR;958;30901;16/3/2001 20:19:00;CIDADAO COMUM;S;CSA;VERA CRUZ;BH;616275.74;798043.34;3444
+3446;2001145353;B03000;AMEACA;RUA SAMBEATIBA;292;60163;16/3/2001 20:20:00;CIDADAO COMUM;N;CSA;CACHOEIRINHA;BH;610595.78;801153.89;3445
+3447;2001145392;B04001;HOMICIDIO TENTAD;RUA CAPIVARI;547;12918;16/3/2001 20:43:00;INICIATIVA;S;0;SERRA;BH;613619.59;794775.30;3446
+3448;2001145393;B03000;AMEACA;RUA TIZIU;562;95881;16/3/2001 20:41:00;CIDADAO COMUM;S;0;GOIANIA;BH;615351.18;802590.79;3447
+3449;2001145406;B06000;LESAO CORPORAL;RUA JOSE DO CARM;135;69559;16/3/2001 20:47:00;CIDADAO COMUM;S;;MINASCAIXA;BH;609514.03;809256.67;3448
+3450;2001145411;B06000;LESAO CORPORAL;RUA ALFEU DE CAR;235;2223;16/3/2001 20:53:00;CIDADAO COMUM;S;;TUPI;BH;613587.67;805832.09;3449
+3451;2001145528;B06000;LESAO CORPORAL;RUA ARTUR DE SA;1081;6211;16/3/2001 21:51:00;CIDADAO COMUM;S;;UNIAO;BH;612820.90;801929.81;3450
+3452;2001145532;B06000;LESAO CORPORAL;RUA CARLOS MUZZI;167;89967;16/3/2001 21:52:00;INICIATIVA;S;0;PALMEIRAS;BH;606570.26;791453.47;3451
+3453;2001145575;B03000;AMEACA;RUA MAURILIO GOM;653;43941;16/3/2001 22:18:00;CIDADAO COMUM;S;;MILIONARIOS;BH;604472.94;789934.70;3452
+3454;2001145625;B06000;LESAO CORPORAL;AV ITAU;1307;36025;16/3/2001 22:53:00;CIDADAO COMUM;N;0;JOAO PINHEIRO;BH;604313.94;796735.81;3453
+3455;2001145635;B03000;AMEACA;RUA ALMADA;97;2393;16/3/2001 22:56:00;CIDADAO COMUM;S;;PINDORAMA;BH;602560.67;797874.36;3454
+3456;2001145654;B03000;AMEACA;RUA TAMBORIL;536;66793;16/3/2001 23:08:00;CIDADAO COMUM;N;0;CONCORDIA;BH;611236.65;799260.64;3455
+3457;2001145661;B03000;AMEACA;RUA SERRINHA;100;129201;16/3/2001 23:13:00;INICIATIVA;S;0;MANGUEIRAS;BH;600477.81;786778.57;3456
+3458;2001145706;B03000;AMEACA;RUA ENGENHO VERM;113;94835;16/3/2001 23:38:00;CIDADAO COMUM;N;;ENGENHO NOGUEIRA;BH;606509.65;800521.34;3457
+3459;2001145734;B03000;AMEACA;RUA CANDIDO LUCI;639;12568;16/3/2001 23:49:00;CIDADAO COMUM;S;;PARQUE RIACHUELO;BH;609554.18;800062.48;3458
+3460;2001145800;B03000;AMEACA;RUA BENJAMIM JAC;98;9207;17/3/2001 00:31:00;CIDADAO COMUM;S;0;GUTIERREZ;BH;608757.98;794815.62;3459
+3461;2001145809;B03000;AMEACA;RUA NEFELINA;99;81228;17/3/2001 00:36:00;CIDADAO COMUM;S;0;SANTA TEREZA;BH;612838.15;797304.69;3460
+3462;2001145819;B03000;AMEACA;AV CLARA NUNES;736;45644;17/3/2001 00:39:00;CIDADAO COMUM;S;0;CACHOEIRINHA;BH;611029.42;800977.57;3461
+3463;2001145919;B04001;HOMICIDIO TENTAD;RUA PADRE CYR AS;10;12091;17/3/2001 01:34:00;CIDADAO COMUM;S;CS1;PRIMEIRO DE MAIO;BH;612115.88;803483.73;3462
+3464;2001145937;B03000;AMEACA;RUA EDSON LUIZ M;112;25062;17/3/2001 01:47:00;CIDADAO COMUM;N;CAB;MARIA GORETTI;BH;614197.63;803631.48;3463
+3465;2001145961;B06000;LESAO CORPORAL;RUA ALEM PARAIBA;504;81357;17/3/2001 02:04:00;CIDADAO COMUM;S;0;BONFIM;BH;610323.38;798258.43;3464
+3466;2001145973;B06000;LESAO CORPORAL;RUA MATA DA CORD;80;45111;17/3/2001 02:15:00;INICIATIVA;N;0;MANGABEIRAS;BH;613257.08;793831.98;3465
+3467;2001145992;B06000;LESAO CORPORAL;AV LEONTINO FRAN;130;445;17/3/2001 02:30:00;CIDADAO COMUM;N;0;SERRA VERDE;BH;609625.47;810530.91;3466
+3468;2001146010;B09000;ABANDONO DE INCA;RUA XAPURI;945;73815;17/3/2001 02:46:00;CIDADAO COMUM;S;;JARDIM AMERICA;BH;607567.46;794124.12;3467
+3469;2001146013;B08000;VIOLACAO DE DOMI;RUA MARIA ANALIA;32;300366;17/3/2001 02:49:00;CIDADAO COMUM;N;0;POMPEIA;BH;606878.92;808915.74;3468
+3470;2001146058;B02000;RIXA;AV JOSE LOPES MU;280;19176;17/3/2001 03:17:00;CIDADAO COMUM;S;BAR DO NADINHO;FLORAMAR;BH;611600.65;806347.17;3469
+3471;2001146078;B09000;ABANDONO DE INCA;RUA PADRE JULIO ;689;51496;17/3/2001 03:30:00;INICIATIVA;S;0;VERA CRUZ;BH;615671.77;797489.47;3470
+3472;2001146094;B03000;AMEACA;RUA ALAGOAS;1498;1678;17/3/2001 03:42:00;CIDADAO COMUM;S;0;FUNCIONARIOS;BH;611220.75;794842.31;3471
+3473;2001146100;B04001;HOMICIDIO TENTAD;RUA MANOEL TAVAR;303;1536;17/3/2001 03:48:00;CIDADAO COMUM;N;;GOIANIA;BH;614997.46;802812.46;3472
+3474;2001146163;B06000;LESAO CORPORAL;RUA DOS CARIJOS;91;81243;17/3/2001 04:51:00;CIDADAO COMUM;S;;CENTRO (BH);BH;611378.20;797082.80;3473
+3475;2001146168;B06000;LESAO CORPORAL;RUA TREMEDAL;10;68240;17/3/2001 04:54:00;INICIATIVA;S;0;CARLOS PRATES;BH;609440.09;797845.02;3474
+3476;2001146172;B03000;AMEACA;RUA ITALO DINELI;99;93063;17/3/2001 04:58:00;CIDADAO COMUM;S;;INDEPENDENCIA;BH;601209.85;786107.68;3475
+3477;2001146366;B06000;LESAO CORPORAL;RUA DOS GUARANIS;319;32181;17/3/2001 08:58:00;INICIATIVA;N;0;CENTRO BH;BH;610709.97;797311.90;3476
+3478;2001146390;B06000;LESAO CORPORAL;RUA VINTE;44;102342;17/3/2001 09:13:00;CIDADAO COMUM;N;;CEU AZUL;BH;604034.56;807504.41;3477
+3479;2001146418;B06000;LESAO CORPORAL;PRACA CARDEAL AR;16;13182;17/3/2001 09:24:00;CIDADAO COMUM;S;;NOVA CINTRA;BH;605707.20;793813.75;3478
+3480;2001146428;B03000;AMEACA;RUA BARREIRO;771;84342;17/3/2001 09:33:00;CIDADAO COMUM;S;;SAO GERALDO;BH;616339.91;799085.95;3479
+3481;2001146534;B06000;LESAO CORPORAL;RUA SEN FIRMINO;118;80616;17/3/2001 10:59:00;CIDADAO COMUM;S;CA1;OURO PRETO;BH;606298.47;801983.26;3480
+3482;2001146568;B04001;HOMICIDIO TENTAD;AV ARTUR BERNARD;2772;60844;17/3/2001 11:21:00;CIDADAO COMUM;S;;VILA PARIS;BH;610407.76;793270.00;3481
+3483;2001146634;B06000;LESAO CORPORAL;RUA DO CERCADINH;415;14881;17/3/2001 12:02:00;CIDADAO COMUM;S;;SALGADO FILHO;BH;606735.94;794868.66;3482
+3484;2001146649;B06000;LESAO CORPORAL;RUA GERALDO LOPE;88;46940;17/3/2001 12:11:00;CIDADAO COMUM;N;;MANTIQUEIRA;BH;606827.06;812118.20;3483
+3485;2001146661;B06000;LESAO CORPORAL;RUA DOS INCAS;75;34335;17/3/2001 12:19:00;CIDADAO COMUM;N;;SANTA MONICA;BH;606866.81;806924.00;3484
+3486;2001146766;B03000;AMEACA;RUA MONTE CASSIN;235;46432;17/3/2001 13:40:00;CIDADAO COMUM;S;;SANTA BRANCA;BH;607986.57;806091.99;3485
+3487;2001146775;B06000;LESAO CORPORAL;RUA TEBAS;818;67090;17/3/2001 13:47:00;CIDADAO COMUM;S;;VERA CRUZ;BH;616044.45;798315.21;3486
+3488;2001146785;B03000;AMEACA;RUA CAMOES;197;11971;17/3/2001 13:56:00;POLICIAL MILITAR;S;0;SAO LUCAS;BH;613046.92;795889.39;3487
+3489;2001146845;B08000;VIOLACAO DE DOMI;RUA ALEM PARAIBA;127;81357;17/3/2001 14:36:00;CIDADAO COMUM;N;0;BONFIM;BH;610651.10;798047.31;3488
+3490;2001146854;B03000;AMEACA;RUA FLAVIO MARQU;212;28436;17/3/2001 14:43:00;CIDADAO COMUM;N;CAFU;BARREIRO;BH;603060.95;791135.44;3489
+3491;2001146865;B03000;AMEACA;RUA JOAQUINA ANG;100;84761;17/3/2001 14:56:00;CIDADAO COMUM;S;;DA LAGOA;BH;604531.65;809462.44;3490
+3492;2001146909;B06000;LESAO CORPORAL;RUA NELSON;633;47407;17/3/2001 15:16:00;CIDADAO COMUM;S;;UNIAO;BH;613054.57;801287.70;3491
+3493;2001146913;B03000;AMEACA;RUA ARACY DE ALM;11;85648;17/3/2001 15:20:00;INICIATIVA;N;0;GOIANIA;BH;614691.72;803615.96;3492
+3494;2001146921;B06000;LESAO CORPORAL;RUA CONSELHEIRO ;1892;17026;17/3/2001 15:27:00;CIDADAO COMUM;N;;JARDIM AMERICA;BH;607532.92;793643.55;3493
+3495;2001146935;B03000;AMEACA;RUA LIVRAMENTO;275;41325;17/3/2001 15:32:00;CIDADAO COMUM;S;APT 103;VILA OESTE;BH;604678.91;795400.30;3494
+3496;2001147012;B03000;AMEACA;RUA CARANCHO;22;13079;17/3/2001 16:20:00;CIDADAO COMUM;S;;FLAVIO MARQUES D;BH;604506.63;788542.81;3495
+3497;2001147051;B03000;AMEACA;AV PROFESSOR ALF;400;2264;17/3/2001 16:36:00;CIDADAO COMUM;N;;SANTA EFIGENIA;BH;611944.42;796416.90;3496
+3498;2001147124;B06000;LESAO CORPORAL;RUA JOSE LAVARIN;237;40537;17/3/2001 17:21:00;CIDADAO COMUM;S;;PARAISO;BH;614295.70;796691.51;3497
+3499;2001147147;B06000;LESAO CORPORAL;RUA PAVAO;60;171510;17/3/2001 17:34:00;CIDADAO COMUM;S;0;VILA CEMIG;BH;605536.69;788858.86;3498
+3500;2001147176;B03000;AMEACA;RUA CINCO DE JUL;114;15670;17/3/2001 17:50:00;CIDADAO COMUM;N;0;PRIMEIRO DE MAIO;BH;612338.42;803849.66;3499
+3501;2001147190;B03000;AMEACA;RUA OITENTA E TR;7;124280;17/3/2001 18:02:00;CIDADAO COMUM;S;;JARDIM DOS COMER;BH;607733.73;811916.10;3500
+3502;2001147202;B06000;LESAO CORPORAL;RUA MARIA AMELIA;151;43812;17/3/2001 18:10:00;INICIATIVA;N;0;SAO TOMAZ;BH;610196.88;805486.32;3501
+3503;2001147220;B03000;AMEACA;RUA CRUZ DE MALT;19;18813;17/3/2001 18:17:00;CIDADAO COMUM;S;CA;NAZARE;BH;615899.65;804621.81;3502
+3504;2001147259;B03000;AMEACA;RUA MARIO SOARES;464;44641;17/3/2001 18:35:00;CIDADAO COMUM;N;FU;DOM BOSCO;BH;604167.26;797273.60;3503
+3505;2001147303;B04001;HOMICIDIO TENTAD;RUA TEBAS;670;67090;17/3/2001 19:00:00;INICIATIVA;N;0;VERA CRUZ;BH;615977.89;798300.24;3504
+3506;2001147318;B06000;LESAO CORPORAL;AV PRESIDENTE AN;845;4461;17/3/2001 19:06:00;CIDADAO COMUM;S;0;LAGOINHA;BH;610492.26;798773.24;3505
+3507;2001147322;B06000;LESAO CORPORAL;AV ANTONIO ABRAH;1000;4320;17/3/2001 19:08:00;INICIATIVA;N;0;SAO LUIZ;BH;607791.03;803406.56;3506
+3508;2001147330;B06000;LESAO CORPORAL;RUA MARIO MARTIN;232;44600;17/3/2001 19:13:00;CIDADAO COMUM;S;0;POMPEIA;BH;614937.63;797990.94;3507
+3509;2001147345;B03000;AMEACA;RUA ITAPOA;274;35873;17/3/2001 19:17:00;CIDADAO COMUM;S;;GLORIA;BH;602804.26;798134.63;3508
+3510;2001147381;B03000;AMEACA;RUA PARA DE MINA;821;52070;17/3/2001 19:31:00;INICIATIVA;S;0;PADRE EUSTAQUIO;BH;605833.93;797706.32;3509
+3511;2001147383;B06000;LESAO CORPORAL;RUA ESPIRITO SAN;1001;26052;17/3/2001 19:31:00;CIDADAO COMUM;N;;CENTRO (BH);BH;611161.78;796678.49;3510
+3512;2001147390;B03000;AMEACA;RUA RADIALISTA D;196;99334;17/3/2001 19:31:00;CIDADAO COMUM;N;;CEU AZUL;BH;605026.18;807770.66;3511
+3513;2001147410;B04001;HOMICIDIO TENTAD;RUA JACAREI;1190;13154;17/3/2001 19:44:00;CIDADAO COMUM;N;0;PINDORAMA;BH;602313.10;797841.05;3512
+3514;2001147411;B06000;LESAO CORPORAL;RUA GALDINO;4;75590;17/3/2001 19:46:00;CIDADAO COMUM;N;;LINDEIA;BH;599722.92;790847.61;3513
+3515;2001147421;B04002;HOMICIDIO CONSUM;RUA CINQUENTA E ;114;106201;17/3/2001 19:50:00;CIDADAO COMUM;N;0;NOVA YORK;BH;608696.88;810953.35;3514
+3516;2001147431;B03000;AMEACA;RUA MAJOR LOPES;511;42646;17/3/2001 19:56:00;CIDADAO COMUM;N;;SAO PEDRO;BH;611467.06;794345.31;3515
+3517;2001147502;B04001;HOMICIDIO TENTAD;RUA JOANA DARC;326;170141;17/3/2001 20:22:00;CIDADAO COMUM;N;;VILA CAFEZAL;BH;614576.09;794880.91;3516
+3518;2001147504;B06000;LESAO CORPORAL;RUA JOSE LEAL DO;119;110593;17/3/2001 20:24:00;CIDADAO COMUM;N;;JARDIM GUANABARA;BH;611553.51;807888.66;3517
+3519;2001147523;B06000;LESAO CORPORAL;RUA DOS ALAMOS;234;90080;17/3/2001 20:30:00;CIDADAO COMUM;S;;MARAJO;BH;606897.14;792529.00;3518
+3520;2001147617;B02000;RIXA;RUA MONTE ALEGRE;285;46357;17/3/2001 21:14:00;CIDADAO COMUM;S;;SERRA;BH;612735.09;795362.92;3519
+3521;2001147651;B03000;AMEACA;RUA CORACAO EUCA;284;17344;17/3/2001 21:29:00;CIDADAO COMUM;S;AP301;CORACAO EUCARIST;BH;605751.72;796518.06;3520
+3522;2001147658;B04001;HOMICIDIO TENTAD;RUA LONDRES;286;41366;17/3/2001 21:34:00;CIDADAO COMUM;N;;COPACABANA;BH;606209.73;806102.86;3521
+3523;2001147672;B06000;LESAO CORPORAL;RUA TABOAO DA SE;36;53347;17/3/2001 21:41:00;INICIATIVA;S;0;ITAIPU BH;BH;599335.27;788659.59;3522
+3524;2001147676;B06000;LESAO CORPORAL;RUA CRACOVIA;620;85317;17/3/2001 21:43:00;CIDADAO COMUM;S;CA620C;JARDIM EUROPA;BH;608692.32;810242.32;3523
+3525;2001147725;B06000;LESAO CORPORAL;RUA CAMIG;54;83453;17/3/2001 22:07:00;CIDADAO COMUM;S;;BETANIA;BH;604759.31;792879.57;3524
+3526;2001147744;B03000;AMEACA;RODOVIA MGT 262;248;26598;17/3/2001 22:18:00;CIDADAO COMUM;S;0;VILA BRASILIA;BH;614638.21;803650.72;3525
+3527;2001147745;B06000;LESAO CORPORAL;RUA IMPERATRIZ;30;122357;17/3/2001 22:18:00;CIDADAO COMUM;N;;SAO TOMAZ;BH;609306.94;805400.92;3526
+3528;2001147758;B06000;LESAO CORPORAL;RUA CHAFARIZ;100;300275;17/3/2001 22:23:00;CIDADAO COMUM;S;;HAVAI;BH;607371.53;793762.11;3527
+3529;2001147909;B04002;HOMICIDIO CONSUM;RUA SERRINHA;74;129201;17/3/2001 23:57:00;CIDADAO COMUM;N;0;MANGUEIRAS;BH;600452.04;787052.18;3528
+3530;2001147918;B04001;HOMICIDIO TENTAD;RUA BRAS;90;170835;18/3/2001 00:03:00;INICIATIVA;S;0;MORRO DAS PEDRAS;BH;608062.97;793879.17;3529
+3531;2001147927;B03000;AMEACA;RUA EMANUEL;77;87010;18/3/2001 00:07:00;CIDADAO COMUM;S;;PILAR;BH;607761.58;788553.01;3530
+3532;2001147937;B06000;LESAO CORPORAL;RUA COARI;241;16092;18/3/2001 00:15:00;INICIATIVA;S;0;SAO GERALDO;BH;615219.20;799212.31;3531
+3533;2001148061;B06000;LESAO CORPORAL;RUA LAVRAS;107;40540;18/3/2001 01:35:00;CIDADAO COMUM;S;0;SAO PEDRO;BH;611511.59;794723.74;3532
+3534;2001148065;B04002;HOMICIDIO CONSUM;RUA DA PEDREIRA;350;301298;18/3/2001 01:36:00;INICIATIVA;S;L;MORRO DAS PEDRAS;BH;608618.39;794087.94;3533
+3535;2001148069;B06000;LESAO CORPORAL;RUA LUIZ LOPES;333;94431;18/3/2001 01:40:00;CIDADAO COMUM;S;;OURO PRETO;BH;606306.33;801223.55;3534
+3536;2001148077;B06000;LESAO CORPORAL;RUA HERACLITO;210;125598;18/3/2001 01:46:00;CIDADAO COMUM;N;;BELMONT;BH;615384.05;804976.88;3535
+3537;2001148121;B06000;LESAO CORPORAL;RUA OLIMPIO DA S;59;28045;18/3/2001 02:10:00;CIDADAO COMUM;S;;PRIMEIRO DE MAIO;BH;612549.53;803816.58;3536
+3538;2001148173;B06000;LESAO CORPORAL;AV FURQUIM WERNE;100;650;18/3/2001 02:43:00;INICIATIVA;N;0;TUPI;BH;613046.58;805827.69;3537
+3539;2001148195;B03000;AMEACA;RUA LUIZA EFIGEN;275;119560;18/3/2001 03:02:00;CIDADAO COMUM;N;APTO309;VILA MAGNESITA;BH;602642.26;795177.79;3538
+3540;2001148220;B03000;AMEACA;AV CRISTIANO MAC;2020;18652;18/3/2001 03:24:00;CIDADAO COMUM;S;AP203;CIDADE NOVA;BH;612192.14;800401.14;3539
+3541;2001148232;B04001;HOMICIDIO TENTAD;RUA SOARES NOGUE;550;66220;18/3/2001 03:31:00;CIDADAO COMUM;N;0;VILA MAGNESITA;BH;602599.93;794792.84;3540
+3542;2001148242;B04001;HOMICIDIO TENTAD;RUA ALICE;182;170949;18/3/2001 03:39:00;CIDADAO COMUM;N;PX109;MORRO DAS PEDRAS;BH;608002.45;793792.58;3541
+3543;2001148332;B04001;HOMICIDIO TENTAD;AV CENTRAL;22;14812;18/3/2001 05:01:00;INICIATIVA;N;0;JARDIM LEBLON;BH;606118.45;806004.26;3542
+3544;2001148366;B04002;HOMICIDIO CONSUM;RUA FARADAY;50;27764;18/3/2001 05:49:00;CIDADAO COMUM;N;FU;PRIMEIRO DE MAIO;BH;612221.44;803449.31;3543
+3545;2001148395;B03000;AMEACA;AV PADRE JOSE MA;292;53448;18/3/2001 06:59:00;CIDADAO COMUM;S;;NOVA CINTRA;BH;605582.54;793667.41;3544
+3546;2001148431;B06000;LESAO CORPORAL;RUA OLARIA;30;49560;18/3/2001 07:57:00;CIDADAO COMUM;S;;SAO BERNARDO;BH;610900.05;805173.88;3545
+3547;2001148433;B06000;LESAO CORPORAL;RUA FLOR D'AGUA;600;28565;18/3/2001 07:55:00;CIDADAO COMUM;S;ESTA NO H. ALBER;JARDIM MONTANHES;BH;605734.71;800020.84;3546
+3548;2001148499;B08000;VIOLACAO DE DOMI;RUA SAO LUIZ;16;63288;18/3/2001 08:47:00;CIDADAO COMUM;N;CA16;SAO TOMAZ;BH;609860.89;805286.87;3547
+3549;2001148531;B03000;AMEACA;RUA FREDERICO AU;15;29785;18/3/2001 09:21:00;CIDADAO COMUM;N;;UNIVERSITARIO;BH;610671.05;802759.35;3548
+3550;2001148532;B03000;AMEACA;RUA SANTA FRANCI;630;60655;18/3/2001 09:14:00;CIDADAO COMUM;S;;APARECIDA SETIMA;BH;608507.50;800521.15;3549
+3551;2001148612;B03000;AMEACA;RUA HORTENCIA;767;33433;18/3/2001 10:15:00;CIDADAO COMUM;N;;ESPLANADA;BH;614778.34;798272.90;3550
+3552;2001148657;B02000;RIXA;AV ALVARES CABRA;211;2730;18/3/2001 10:51:00;INICIATIVA;N;0;LOURDES;BH;611296.92;796433.12;3551
+3553;2001148692;B03000;AMEACA;RUA LAGOA DOURAD;471;40174;18/3/2001 11:22:00;CIDADAO COMUM;S;;PRADO;BH;608581.17;796507.97;3552
+3554;2001148699;B06000;LESAO CORPORAL;RUA GRAUNAS;429;31797;18/3/2001 11:27:00;CIDADAO COMUM;N;;VILA CEMIG;BH;605560.06;788702.39;3553
+3555;2001148799;B06000;LESAO CORPORAL;RUA SERRA DOS AI;91;65025;18/3/2001 13:02:00;CIDADAO COMUM;N;FU;JARDIM LEBLON;BH;605955.53;807662.83;3554
+3556;2001148843;B04001;HOMICIDIO TENTAD;RUA SERRINHA;168;129201;18/3/2001 13:41:00;CIDADAO COMUM;S;;MANGUEIRAS;BH;600395.13;787259.05;3555
+3557;2001148861;B06000;LESAO CORPORAL;RUA DONA SINVALI;224;59863;18/3/2001 13:59:00;CIDADAO COMUM;N;0;ANTONIO RIBEIRO ;BH;615423.36;806998.20;3556
+3558;2001148866;B06000;LESAO CORPORAL;RUA AMARANTO VER;119;110120;18/3/2001 14:01:00;CIDADAO COMUM;S;0;ANTONIO RIBEIRO ;BH;615899.69;806141.36;3557
+3559;2001148880;B06000;LESAO CORPORAL;RUA JOSE ANTENOR;165;16049;18/3/2001 14:09:00;CIDADAO COMUM;N;;PRIMEIRO DE MAIO;BH;612330.81;803766.42;3558
+3560;2001148885;B03000;AMEACA;RUA DR BROCHADO;1076;23215;18/3/2001 14:13:00;CIDADAO COMUM;S;;VERA CRUZ;BH;615982.91;797659.64;3559
+3561;2001148905;B03000;AMEACA;RUA BADARO JUNIO;38;7532;18/3/2001 14:26:00;CIDADAO COMUM;N;;PRIMEIRO DE MAIO;BH;612064.33;803545.79;3560
+3562;2001148907;B06000;LESAO CORPORAL;RUA ARTUR ITABIR;655;6177;18/3/2001 14:28:00;CIDADAO COMUM;N;0;SAO JOSE;BH;607806.80;803463.71;3561
+3563;2001148959;B06000;LESAO CORPORAL;RUA EDMAR COLINI;857;104638;18/3/2001 15:09:00;CIDADAO COMUM;N;0;MANTIQUEIRA;BH;605904.97;812041.11;3562
+3564;2001148973;B04001;HOMICIDIO TENTAD;AV ARTUR BERNARD;1334;60844;18/3/2001 15:15:00;INICIATIVA;N;0;VILA PARIS;BH;610228.38;793304.17;3563
+3565;2001148994;B03000;AMEACA;RUA FRANCISCO GO;65;68569;18/3/2001 15:25:00;CIDADAO COMUM;S;FR23;ESTRELA DALVA;BH;607466.26;792294.61;3564
+3566;2001148998;B04002;HOMICIDIO CONSUM;RUA FLOR DE PITA;119;42949;18/3/2001 15:27:00;CIDADAO COMUM;N;0;INDEPENDENCIA;BH;601600.30;786045.97;3565
+3567;2001149029;B03000;AMEACA;AV AUGUSTO DE LI;1105;6731;18/3/2001 15:46:00;CIDADAO COMUM;N;;BARRO PRETO;BH;610249.02;796782.22;3566
+3568;2001149148;B03000;AMEACA;RUA DELFIM;194;19728;18/3/2001 16:56:00;CIDADAO COMUM;S;;SANTA CRUZ (BARR;BH;603557.64;789073.38;3567
+3569;2001149150;B02000;RIXA;RUA CARMELITA IN;281;121137;18/3/2001 16:57:00;CIDADAO COMUM;S;FU;MALDONADO;BH;602056.77;790380.15;3568
+3570;2001149161;B06000;LESAO CORPORAL;RUA JOAO SAMAHA;1282;7397;18/3/2001 17:02:00;CIDADAO COMUM;N;;SAO JOAO BATISTA;BH;608383.18;807945.10;3569
+3571;2001149164;B03000;AMEACA;ALAMEDA INDAIA;105;34363;18/3/2001 17:05:00;CIDADAO COMUM;S;;DOM CABRAL;BH;604920.54;796718.55;3570
+3572;2001149183;B03000;AMEACA;RUA FURTADO DE M;144;30158;18/3/2001 17:15:00;INICIATIVA;S;0;SAO TOMAZ;BH;609931.80;805638.24;3571
+3573;2001149223;B06000;LESAO CORPORAL;RUA DELMO RENAUL;6;70596;18/3/2001 17:46:00;CIDADAO COMUM;S;;AARAO REIS;BH;612821.17;804943.88;3572
+3574;2001149224;B06000;LESAO CORPORAL;RUA MACEDO;285;42182;18/3/2001 17:48:00;CIDADAO COMUM;S;0;FLORESTA;BH;612120.19;798390.29;3573
+3575;2001149235;B03000;AMEACA;RUA DOS PINTASSI;43;53813;18/3/2001 17:55:00;CIDADAO COMUM;N;;VILA CLORIS;BH;610040.49;807382.22;3574
+3576;2001149262;B06000;LESAO CORPORAL;AV JOAO XXIII;287;37926;18/3/2001 18:17:00;CIDADAO COMUM;S;0;CONJUNTO ALIPIO ;BH;604398.40;799487.39;3575
+3577;2001149265;B03000;AMEACA;RUA ARAGAO;140;5350;18/3/2001 18:21:00;CIDADAO COMUM;S;0;DOM BOSCO;BH;604648.22;797203.56;3576
+3578;2001149267;B06000;LESAO CORPORAL;RUA VOLTA GRANDE;134;73594;18/3/2001 18:20:00;CIDADAO COMUM;S;;SAGRADA FAMILIA;BH;612934.80;798672.43;3577
+3579;2001149286;B06000;LESAO CORPORAL;RUA ALBERTO MART;18;85244;18/3/2001 18:36:00;CIDADAO COMUM;S;;JAQUELINE;BH;610475.11;809992.93;3578
+3580;2001149289;B06000;LESAO CORPORAL;RUA ALZIRA MARIA;79;49254;18/3/2001 18:36:00;CIDADAO COMUM;N;LJ1;SANTA MONICA;BH;607065.04;807373.38;3579
+3581;2001149322;B03000;AMEACA;BECO SARGENTO SO;60;300412;18/3/2001 18:56:00;CIDADAO COMUM;S;;SANTA EFIGENIA;BH;614210.46;797140.33;3580
+3582;2001149334;B06000;LESAO CORPORAL;RUA PEDRO AMERIC;40;113157;18/3/2001 19:03:00;CIDADAO COMUM;N;;TUPI;BH;613644.24;806540.35;3581
+3583;2001149351;B03000;AMEACA;RUA JOAO CAETANO;834;37510;18/3/2001 19:13:00;INICIATIVA;S;0;NOVA SUISSA;BH;606534.92;795367.16;3582
+3584;2001149376;B03000;AMEACA;RUA MARIA GERTRU;823;98993;18/3/2001 19:32:00;CIDADAO COMUM;S;;CEU AZUL;BH;604453.51;808797.46;3583
+3585;2001149378;B06000;LESAO CORPORAL;RUA DOS INCONFID;937;34350;18/3/2001 19:34:00;CIDADAO COMUM;S;PX937;FUNCIONARIOS;BH;611530.18;795303.43;3584
+3586;2001149413;B03000;AMEACA;RUA TAIOBEIRAS;420;17168;18/3/2001 19:54:00;CIDADAO COMUM;S;;COQUEIROS;BH;602218.51;799284.00;3585
+3587;2001149422;B03000;AMEACA;RUA SAO JOAQUIM;698;62940;18/3/2001 20:04:00;CIDADAO COMUM;N;0;SAGRADA FAMILIA;BH;613152.40;799476.16;3586
+3588;2001149424;B03000;AMEACA;RUA ANTONIO SILV;85;103607;18/3/2001 20:04:00;CIDADAO COMUM;S;0;LINDEIA;BH;600014.68;790841.11;3587
+3589;2001149497;B06000;LESAO CORPORAL;RUA CABROBO;33;11187;18/3/2001 20:49:00;CIDADAO COMUM;S;;SAGRADA FAMILIA;BH;613112.62;798985.69;3588
+3590;2001149505;B09000;ABANDONO DE INCA;RUA CAMILO PRATE;301;11915;18/3/2001 20:50:00;CIDADAO COMUM;S;0;UNIAO;BH;613325.68;801204.49;3589
+3591;2001149511;B06000;LESAO CORPORAL;RUA VOLTA GRANDE;278;73594;18/3/2001 20:53:00;CIDADAO COMUM;S;;SAGRADA FAMILIA;BH;612839.11;798622.81;3590
+3592;2001149521;B06000;LESAO CORPORAL;RUA ITAMI;423;35671;18/3/2001 21:00:00;INICIATIVA;S;0;GUARANI;BH;612816.24;805557.38;3591
+3593;2001149523;B06000;LESAO CORPORAL;RUA PADRE SILVEI;540;51704;18/3/2001 21:01:00;INICIATIVA;S;0;SAO LUIZ;BH;608955.34;804515.98;3592
+3594;2001149533;B04001;HOMICIDIO TENTAD;RUA SERRA NEGRA;652;65038;18/3/2001 21:05:00;INICIATIVA;S;0;SANTO ANDRE;BH;609806.47;799141.42;3593
+3595;2001149547;B06000;LESAO CORPORAL;RUA SAN MARTIN;169;60208;18/3/2001 21:12:00;CIDADAO COMUM;S;0;UNIAO;BH;612658.97;801715.38;3594
+3596;2001149592;B04001;HOMICIDIO TENTAD;RUA EMERSON PEIX;26;116619;18/3/2001 21:48:00;CIDADAO COMUM;S;0;PARAISO;BH;614664.42;796179.44;3595
+3597;2001149657;B03000;AMEACA;RUA JUDA;148;12340;18/3/2001 22:31:00;INICIATIVA;S;0;SAO SALVADOR;BH;603624.77;799671.12;3596
+3598;2001149677;B03000;AMEACA;AV NOSSA SENHORA;1612;48107;18/3/2001 22:46:00;CIDADAO COMUM;S;0;CARLOS PRATES;BH;610355.98;797806.10;3597
+3599;2001149680;B03000;AMEACA;RUA CAMETA;125;11883;18/3/2001 22:44:00;CIDADAO COMUM;S;;SAUDADE;BH;615111.61;797615.51;3598
+3600;2001149691;B04001;HOMICIDIO TENTAD;RUA SOLIMOES;410;66273;18/3/2001 22:51:00;CIDADAO COMUM;N;;CABANA;BH;604890.13;794350.83;3599
+3601;2001149705;B06000;LESAO CORPORAL;RUA ITAMAR;691;35527;18/3/2001 22:55:00;CIDADAO COMUM;N;0;VERA CRUZ;BH;616421.36;798118.78;3600
+3602;2001149716;B06000;LESAO CORPORAL;RUA CARAVELAS;811;13141;18/3/2001 23:02:00;INICIATIVA;S;0;VERA CRUZ;BH;615714.70;797598.16;3601
+3603;2001149739;B04002;HOMICIDIO CONSUM;RUA ARISTOLINO B;190;41089;18/3/2001 23:15:00;CIDADAO COMUM;N;0;REGINA;BH;598888.42;789981.76;3602
+3604;2001149762;B02000;RIXA;RUA DOS CARIJOS;412;81243;18/3/2001 23:23:00;CIDADAO COMUM;S;PX244;CENTRO (BH);BH;611080.93;797191.84;3603
+3605;2001149768;B03000;AMEACA;RUA ROSA DE PEDR;20;124494;18/3/2001 23:27:00;CIDADAO COMUM;S;;ETELVINA CARNEIR;BH;611390.80;809189.08;3604
+3606;2001149841;B06000;LESAO CORPORAL;RUA OURO PRETO;293;50730;19/3/2001 00:00:00;CIDADAO COMUM;N;;BARRO PRETO;BH;609961.08;797017.98;3605
+3607;2001149850;B04001;HOMICIDIO TENTAD;RUA PONTA GROSSA;420;14900;19/3/2001 00:11:00;CIDADAO COMUM;S;0;ARAGUAIA;BH;604863.70;789804.10;3606
+3608;2001149909;B06000;LESAO CORPORAL;AV VINTE E OITO ;1300;72970;19/3/2001 00:47:00;CIDADAO COMUM;S;CSA;ESPLANADA;BH;614446.33;798009.59;3607
+3609;2001149972;B06000;LESAO CORPORAL;AV DO CONTORNO;2600;17228;19/3/2001 01:15:00;CIDADAO COMUM;N;0;CENTRO (BH);BH;612669.56;796877.24;3608
+3610;2001149990;B03000;AMEACA;AV PRESIDENTE TA;3587;35366;19/3/2001 01:27:00;CIDADAO COMUM;S;0;PAQUETA;BH;605080.35;802485.42;3609
+3611;2001150250;B03000;AMEACA;RUA OURO PRETO;1329;50730;19/3/2001 07:25:00;CIDADAO COMUM;S;AP202;SANTO AGOSTINHO;BH;609682.00;795988.07;3610
+3612;2001150271;B03000;AMEACA;RUA DOS GUARANIS;177;32181;19/3/2001 07:46:00;CIDADAO COMUM;S;EN177;CENTRO (BH);BH;610747.14;797450.62;3611
+3613;2001150385;B06000;LESAO CORPORAL;AV PARANA;246;52230;19/3/2001 08:54:00;INICIATIVA;S;0;CENTRO BH;BH;610752.57;797284.29;3612
+3614;2001150595;B03000;AMEACA;RUA MACEDO;184;42182;19/3/2001 11:03:00;CIDADAO COMUM;S;FU;FLORESTA;BH;612053.24;798305.99;3613
+3615;2001150602;B03000;AMEACA;RUA PARATI;337;110099;19/3/2001 11:03:00;CIDADAO COMUM;S;0;PILAR;BH;607573.03;788581.48;3614
+3616;2001150626;B09000;ABANDONO DE INCA;RUA VALAO;155;80238;19/3/2001 11:25:00;CIDADAO COMUM;S;;COQUEIROS;BH;602499.62;799683.99;3615
+3617;2001150660;B03000;AMEACA;RUA AURELIANO MA;156;6845;19/3/2001 11:47:00;CIDADAO COMUM;S;;PARAISO;BH;615026.70;796950.70;3616
+3618;2001150676;B03000;AMEACA;RUA ORLANDO MORE;6;87110;19/3/2001 12:03:00;CIDADAO COMUM;N;;DOM JOAQUIM;BH;614045.60;801793.68;3617
+3619;2001150725;B03000;AMEACA;RUA PADRE FEIJO;917;51326;19/3/2001 12:36:00;CIDADAO COMUM;S;0;SAUDADE;BH;615646.25;797648.91;3618
+3620;2001150732;B06000;LESAO CORPORAL;RUA GIBRALTAR;468;31223;19/3/2001 12:40:00;CIDADAO COMUM;S;0;NOVO GLORIA;BH;603168.59;798993.83;3619
+3621;2001150773;B03000;AMEACA;RUA CACHOEIRA DA;443;31958;19/3/2001 13:06:00;CIDADAO COMUM;S;0;GLORIA;BH;602888.75;798160.55;3620
+3622;2001150790;B03000;AMEACA;RUA PROFESSOR ES;830;26342;19/3/2001 13:14:00;CIDADAO COMUM;S;0;SERRA;BH;612840.03;794598.41;3621
+3623;2001150805;B04001;HOMICIDIO TENTAD;RUA RAIMUNDO TIN;44;301229;19/3/2001 13:29:00;INICIATIVA;N;0;MORRO DO PAPAGAI;BH;610762.74;793311.54;3622
+3624;2001151196;B06000;LESAO CORPORAL;AV SILVA LOBO;1397;65889;19/3/2001 17:09:00;CIDADAO COMUM;S;0;GRAJAU;BH;607823.81;795270.53;3623
+3625;2001151235;B03000;AMEACA;RUA RIO PETROPOL;295;91893;19/3/2001 17:30:00;CIDADAO COMUM;N;0;PINDORAMA;BH;602111.84;797838.19;3624
+3626;2001151257;B06000;LESAO CORPORAL;BECO OPALA;53;300769;19/3/2001 17:38:00;CIDADAO COMUM;S;0;CARLOS PRATES;BH;608757.86;797782.63;3625
+3627;2001151260;B03000;AMEACA;RUA CORONEL COST;135;10809;19/3/2001 17:39:00;CIDADAO COMUM;N;0;PLANALTO;BH;610637.95;806592.04;3626
+3628;2001151305;B06000;LESAO CORPORAL;RUA REMI PEREIRA;230;96727;19/3/2001 18:05:00;CIDADAO COMUM;S;0;ANTONIO RIBEIRO ;BH;614854.85;806306.99;3627
+3629;2001151462;B03000;AMEACA;RUA DAVID CAMPIS;80;19683;19/3/2001 19:29:00;INICIATIVA;S;0;FLORESTA;BH;612121.55;797462.14;3628
+3630;2001151533;B06000;LESAO CORPORAL;RUA LOTUS;455;100564;19/3/2001 20:11:00;CIDADAO COMUM;S;;BETANIA;BH;604877.82;792364.78;3629
+3631;2001151545;B03000;AMEACA;RUA ANITA GARIBA;5;4184;19/3/2001 20:17:00;INICIATIVA;N;0;MORRO DAS PEDRAS;BH;608751.79;794649.99;3630
+3632;2001151574;B06000;LESAO CORPORAL;RUA OLIVER;234;49950;19/3/2001 20:37:00;CIDADAO COMUM;N;0;UNIAO;BH;612739.53;801366.60;3631
+3633;2001151596;B06000;LESAO CORPORAL;RUA INDIANOPOLIS;508;34423;19/3/2001 20:54:00;CIDADAO COMUM;N;0;RENASCENCA;BH;610662.86;800609.57;3632
+3634;2001151609;B06000;LESAO CORPORAL;RUA BRASILINO VI;143;89589;19/3/2001 21:01:00;CIDADAO COMUM;S;;JARDIM VITORIA;BH;617170.18;804550.42;3633
+3635;2001151632;B03000;AMEACA;RUA ASTOLFO DUTR;651;6426;19/3/2001 21:18:00;CIDADAO COMUM;S;0;VERA CRUZ;BH;615314.92;798329.61;3634
+3636;2001151644;B03000;AMEACA;RUA GIRASSOL;234;31277;19/3/2001 21:26:00;CIDADAO COMUM;S;0;LINDEIA;BH;599424.88;790984.00;3635
+3637;2001151716;B02000;RIXA;RUA HONORIO BICA;90;29959;19/3/2001 22:17:00;CIDADAO COMUM;S;;NOVA VISTA;BH;615452.20;800576.26;3636
+3638;2001151869;B03000;AMEACA;AV PROFESSOR ALF;110;2264;19/3/2001 23:53:00;CIDADAO COMUM;N;0;SANTA EFIGENIA;BH;612047.80;796468.72;3637
+3639;2001151875;B08000;VIOLACAO DE DOMI;RUA CONDE RIBEIR;607;16717;19/3/2001 23:55:00;CIDADAO COMUM;S;;SAGRADA FAMILIA;BH;612740.88;798926.93;3638
+3640;2001151892;B03000;AMEACA;RUA BOREAL;56;10184;20/3/2001 00:08:00;CIDADAO COMUM;N;APTO 301;ADELAIDE;BH;606950.84;798500.09;3639
+3641;2001151908;B06000;LESAO CORPORAL;RUA DOIS;22;27130;20/3/2001 00:35:00;CIDADAO COMUM;S;;PAULO SEXTO;BH;616441.48;806767.08;3640
+3642;2001151929;B03000;AMEACA;AV ARTUR BERNARD;60;60844;20/3/2001 00:51:00;CIDADAO COMUM;S;;VILA PARIS;BH;610150.40;793809.60;3641
+3643;2001152119;B06000;LESAO CORPORAL;RUA MARIA ANTONI;108;93089;20/3/2001 06:41:00;CIDADAO COMUM;N;;INDEPENDENCIA;BH;601439.44;786074.51;3642
+3644;2001152376;B04002;HOMICIDIO CONSUM;RUA DOUTOR ARGEM;160;23155;20/3/2001 09:54:00;CIDADAO COMUM;N;0;SAO LUCAS;BH;614033.70;795650.47;3643
+3645;2001152468;B03000;AMEACA;AV BIAS FORTES;1171;9553;20/3/2001 10:44:00;INICIATIVA;S;0;LOURDES;BH;610488.02;796648.12;3644
+3646;2001152491;B03000;AMEACA;RUA LUIZ CASTANH;625;41697;20/3/2001 10:57:00;CIDADAO COMUM;S;CAA;SANTA CRUZ;BH;610814.26;802068.61;3645
+3647;2001152582;B03000;AMEACA;RUA PADRE BELCHI;267;51240;20/3/2001 11:51:00;CIDADAO COMUM;S;AP201;CENTRO (BH);BH;610814.67;796746.33;3646
+3648;2001152677;B03000;AMEACA;AV AUGUSTO DE LI;744;6731;20/3/2001 13:04:00;CIDADAO COMUM;N;LJ76;CENTRO (BH);BH;610661.75;796747.31;3647
+3649;2001152776;B03000;AMEACA;RUA COMENDADOR W;18;16430;20/3/2001 14:10:00;CIDADAO COMUM;S;0;SAO TOMAZ;BH;609994.29;805766.64;3648
+3650;2001152810;B04001;HOMICIDIO TENTAD;RUA MARZAGANIA;5;88066;20/3/2001 14:27:00;INICIATIVA;0;0;VERA CRUZ;BH;617023.58;798845.01;3649
+3651;2001152869;B03000;AMEACA;RUA DOS GUAJAJAR;2429;32037;20/3/2001 15:05:00;INICIATIVA;N;0;BARRO PRETO;BH;609225.26;796929.95;3650
+3652;2001152882;B06000;LESAO CORPORAL;RUA JOANA LOPES ;300;77340;20/3/2001 15:14:00;CIDADAO COMUM;N;;INDEPENDENCIA;BH;602100.12;786426.51;3651
+3653;2001153024;B03000;AMEACA;RUA DOS CONSTRUT;701;101249;20/3/2001 16:34:00;INICIATIVA;N;0;CONJUNTO ALIPIO ;BH;604117.89;800080.17;3652
+3654;2001153045;B06000;LESAO CORPORAL;RUA DUARTE DA CO;136;24117;20/3/2001 16:39:00;INICIATIVA;S;0;VILA INDAIA;BH;609723.00;803384.28;3653
+3655;2001153190;B03000;AMEACA;RUA DOS ECONOMIS;612;103272;20/3/2001 17:52:00;INICIATIVA;S;0;CONJUNTO ALIPIO ;BH;604238.00;800485.06;3654
+3656;2001153226;B06000;LESAO CORPORAL;RUA VEREADOR ANT;96;93602;20/3/2001 18:09:00;CIDADAO COMUM;S;;INDEPENDENCIA;BH;602105.45;786483.33;3655
+3657;2001153273;B04002;HOMICIDIO CONSUM;RUA BOLIVAR;571;9871;20/3/2001 18:43:00;CIDADAO COMUM;N;;UNIAO;BH;612952.36;801829.38;3656
+3658;2001153294;B03000;AMEACA;RUA ICA;265;33979;20/3/2001 18:56:00;CIDADAO COMUM;N;0;RENASCENCA;BH;611007.28;799791.40;3657
+3659;2001153343;B06000;LESAO CORPORAL;AV AMAZONAS;8063;3140;20/3/2001 19:25:00;CIDADAO COMUM;S;;JARDINOPOLIS;BH;604590.39;794944.77;3658
+3660;2001153371;B06000;LESAO CORPORAL;AV BIAS FORTES;1772;9553;20/3/2001 19:35:00;CIDADAO COMUM;S;;BARRO PRETO;BH;610196.72;797244.85;3659
+3661;2001153376;B06000;LESAO CORPORAL;RUA DOS INCONFID;20;25340;20/3/2001 19:37:00;CIDADAO COMUM;S;;TAQUARIL;BH;617047.89;797408.42;3660
+3662;2001153393;B03000;AMEACA;RUA SAO GERALDO;110;170283;20/3/2001 19:44:00;CIDADAO COMUM;S;0;CABANA;BH;604668.39;794124.46;3661
+3663;2001153453;B03000;AMEACA;RUA ARMINDA MORE;80;5997;20/3/2001 20:17:00;CIDADAO COMUM;S;;NOVA BARROCA;BH;607377.03;792889.19;3662
+3664;2001153597;B04001;HOMICIDIO TENTAD;RUA CARLOS PINHE;260;13498;20/3/2001 21:41:00;CIDADAO COMUM;N;CSF;JARDIM MONTANHES;BH;606565.14;798867.92;3663
+3665;2001153603;B06000;LESAO CORPORAL;AV VEREADOR CICE;520;19756;20/3/2001 21:45:00;CIDADAO COMUM;N;;DOM CABRAL;BH;605030.08;796406.17;3664
+3666;2001153655;B04001;HOMICIDIO TENTAD;RUA PRINCIPAL;5;170504;20/3/2001 22:17:00;CIDADAO COMUM;N;0;MORRO DAS PEDRAS;BH;608571.78;793994.63;3665
+3667;2001153712;B03000;AMEACA;RUA POUSO ALEGRE;1314;54932;20/3/2001 22:57:00;CIDADAO COMUM;N;;FLORESTA;BH;612350.46;797901.33;3666
+3668;2001153716;B03000;AMEACA;RUA LOTUS;420;100564;20/3/2001 22:58:00;CIDADAO COMUM;S;;BETANIA;BH;604969.15;792317.38;3667
+3669;2001153763;B02000;RIXA;RUA DOM PEDRITO;361;51300;20/3/2001 23:24:00;CIDADAO COMUM;S;0;NOVA VISTA;BH;614749.56;800708.97;3668
+3670;2001153777;B06000;LESAO CORPORAL;RUA DOS GUARANIS;200;32181;20/3/2001 23:37:00;INICIATIVA;S;0;CENTRO (BH);BH;610701.30;797475.97;3669
+3671;2001153806;B03000;AMEACA;RUA FERNAO DIAS;368;28133;20/3/2001 23:52:00;CIDADAO COMUM;S;LJ;CASA BRANCA;BH;615960.65;799305.77;3670
+3672;2001153862;B03000;AMEACA;RUA CAMPOS ELISE;897;12265;21/3/2001 00:39:00;CIDADAO COMUM;S;CAA;ALTO BARROCA;BH;607686.86;795553.41;3671
+3673;2001153880;B06000;LESAO CORPORAL;RUA ASA BRANCA;512;95737;21/3/2001 01:01:00;CIDADAO COMUM;S;;GOIANIA;BH;615345.92;802410.58;3672
+3674;2001153897;B04001;HOMICIDIO TENTAD;AV COLETORA;1160;78241;21/3/2001 01:11:00;CIDADAO COMUM;S;0;VILA PINHO;BH;602428.44;787588.34;3673
+3675;2001153911;B03000;AMEACA;RUA PATRIARCA;182;52559;21/3/2001 01:37:00;CIDADAO COMUM;S;AP202;IPIRANGA;BH;611538.59;800876.99;3674
+3676;2001153944;B03000;AMEACA;RUA CLORITA;100;16051;21/3/2001 02:12:00;CIDADAO COMUM;N;AP 1003;SANTA TEREZA;BH;612847.22;797209.80;3675
+3677;2001153948;B06000;LESAO CORPORAL;AV OLEGARIO MACI;515;49699;21/3/2001 02:19:00;CIDADAO COMUM;N;;CENTRO (BH);BH;610571.41;797149.18;3676
+3678;2001154155;B03000;AMEACA;RUA DOS TIMBIRAS;1228;67682;21/3/2001 07:11:00;CIDADAO COMUM;S;;FUNCIONARIOS;BH;611538.87;796208.86;3677
+3679;2001154212;B03000;AMEACA;RUA ESMERALDA;776;25920;21/3/2001 07:58:00;CIDADAO COMUM;S;;PRADO;BH;608599.45;795975.60;3678
+3680;2001154369;B03000;AMEACA;RUA CORONEL PEDR;164;18031;21/3/2001 09:36:00;CIDADAO COMUM;S;0;CIDADE NOVA;BH;612313.72;800359.78;3679
+3681;2001154380;B03000;AMEACA;RUA RIO GRANDE D;499;58744;21/3/2001 09:42:00;CIDADAO COMUM;S;;CENTRO (BH);BH;610383.31;797003.64;3680
+3682;2001154412;B03000;AMEACA;RUA ARAUA;312;5600;21/3/2001 10:00:00;CIDADAO COMUM;N;CA;SAO PAULO;BH;612777.64;803071.62;3681
+3683;2001154492;B03000;AMEACA;RUA BARAO DE COR;349;7891;21/3/2001 10:59:00;CIDADAO COMUM;N;0;BARREIRO;BH;602959.46;791015.32;3682
+3684;2001154559;B06000;LESAO CORPORAL;RUA CONGONHAS;606;16890;21/3/2001 11:50:00;INICIATIVA;N;0;SANTO ANTONIO;BH;610840.10;794487.88;3683
+3685;2001154562;B09000;ABANDONO DE INCA;RUA ITAPERUNA;160;35785;21/3/2001 11:53:00;CIDADAO COMUM;S;FU;SAUDADE;BH;614985.30;797412.99;3684
+3686;2001154626;B03000;AMEACA;RUA SIMAO TAMM;357;66084;21/3/2001 12:37:00;CIDADAO COMUM;S;0;CACHOEIRINHA;BH;610301.98;800541.54;3685
+3687;2001154645;B03000;AMEACA;RUA ILDEU MOREIR;99;80947;21/3/2001 12:52:00;CIDADAO COMUM;N;CAA;NOVA CINTRA;BH;605770.46;793443.77;3686
+3688;2001154676;B06000;LESAO CORPORAL;RUA WALFRIDO TEI;200;7154;21/3/2001 13:14:00;CIDADAO COMUM;S;;MINASCAIXA;BH;609178.70;809605.33;3687
+3689;2001154678;B08000;VIOLACAO DE DOMI;RUA ITAMI;326;35671;21/3/2001 13:18:00;INICIATIVA;S;0;GUARANI;BH;613009.51;805481.70;3688
+3690;2001154734;B04001;HOMICIDIO TENTAD;RUA ALIPIO DE ME;763;2378;21/3/2001 14:06:00;INICIATIVA;S;0;JARDIM MONTANHES;BH;606232.66;798813.74;3689
+3691;2001154831;B03000;AMEACA;RUA F;93;302327;21/3/2001 15:26:00;CIDADAO COMUM;S;;BONSUCESSO;BH;606318.82;789810.40;3690
+3692;2001154913;B03000;AMEACA;RUA ROGERIO APAR;25;96682;21/3/2001 15:59:00;CIDADAO COMUM;S;CAA;ANTONIO RIBEIRO ;BH;614926.02;805954.24;3691
+3693;2001154939;B03000;AMEACA;RUA RAMIRO SIQUE;8;128858;21/3/2001 16:10:00;CIDADAO COMUM;S;;CASTANHEIRAS (TA;BH;617650.40;797388.81;3692
+3694;2001154955;B06000;LESAO CORPORAL;AV OLEGARIO MACI;338;49699;21/3/2001 16:20:00;CIDADAO COMUM;N;LJ42;CENTRO (BH);BH;610579.39;797366.71;3693
+3695;2001154996;B03000;AMEACA;RUA INGLATERRA;410;34552;21/3/2001 16:47:00;INICIATIVA;S;;JARDIM LEBLON;BH;606157.81;807087.68;3694
+3696;2001155110;B06000;LESAO CORPORAL;RUA MENDES DE OL;474;45430;21/3/2001 17:52:00;CIDADAO COMUM;S;LJFU;SANTO ANDRE;BH;609733.99;799040.75;3695
+3697;2001155302;B06000;LESAO CORPORAL;AV DOM PEDRO II;1020;53145;21/3/2001 19:22:00;INICIATIVA;S;0;JARDIM MONTANHES;BH;609572.19;797764.43;3696
+3698;2001155322;B03000;AMEACA;RUA CORONEL JOAQ;20;17864;21/3/2001 19:31:00;CIDADAO COMUM;S;0;FLORAMAR;BH;611040.89;806104.13;3697
+3699;2001155354;B06000;LESAO CORPORAL;RUA ALEXANDRE LE;36;50162;21/3/2001 19:45:00;INICIATIVA;S;0;ESTRELA DALVA;BH;607674.96;792406.67;3698
+3700;2001155381;B04002;HOMICIDIO CONSUM;RUA ALIPIO DE ME;927;2378;21/3/2001 20:02:00;CIDADAO COMUM;N;0;JARDIM MONTANHES;BH;606079.76;798879.74;3699
+3701;2001155504;B04002;HOMICIDIO CONSUM;RUA JAIR DE MATO;5;93703;21/3/2001 21:03:00;INICIATIVA;N;0;INDEPENDENCIA;BH;601631.28;786418.61;3700
+3702;2001155550;B03000;AMEACA;RUA MARIA LUCIA ;330;114061;21/3/2001 21:34:00;INICIATIVA;S;0;SANTA MONICA DO ;BH;606272.35;808701.83;3701
+3703;2001155566;B03000;AMEACA;RUA MARECHAL HEN;30;38351;21/3/2001 21:47:00;CIDADAO COMUM;S;;TUPI;BH;612620.28;806401.73;3702
+3704;2001155633;B04002;HOMICIDIO CONSUM;RUA JAVARI;431;37204;21/3/2001 22:33:00;CIDADAO COMUM;N;0;RENASCENCA;BH;610659.27;799750.92;3703
+3705;2001155656;B03000;AMEACA;AV AMAZONAS;333;3140;21/3/2001 22:50:00;CIDADAO COMUM;S;0;CENTRO (BH);BH;611084.15;797100.95;3704
+3706;2001155658;B03000;AMEACA;RUA MANGARATIBA;174;42822;21/3/2001 22:55:00;CIDADAO COMUM;N;;SAO GERALDO;BH;615031.70;799151.60;3705
+3707;2001155747;B06000;LESAO CORPORAL;RUA MAURA;388;82205;21/3/2001 23:55:00;CIDADAO COMUM;N;;IPIRANGA;BH;611731.38;801595.73;3706
+3708;2001155757;B06000;LESAO CORPORAL;RUA E;361;41211;22/3/2001 00:03:00;CIDADAO COMUM;S;;CH CONFISCO;BH;602757.46;802918.53;3707
+3709;2001155779;B03000;AMEACA;RUA DOM PEDRITO;513;51300;22/3/2001 00:16:00;CIDADAO COMUM;S;0;NOVA VISTA (SB);SB;614792.29;800828.38;3708
+3710;2001155798;B04001;HOMICIDIO TENTAD;RUA SETE DE SETE;375;170167;22/3/2001 00:32:00;CIDADAO COMUM;S;0;CABANA;BH;604560.04;794283.05;3709
+3711;2001155820;B06000;LESAO CORPORAL;RUA CLAUDIO GOME;100;117060;22/3/2001 00:47:00;CIDADAO COMUM;S;AP201;DOS PALMARES;BH;611064.87;802289.97;3710
+3712;2001155828;B06000;LESAO CORPORAL;RUA FLOR DA AMIZ;10;94646;22/3/2001 00:57:00;CIDADAO COMUM;S;;JARDIM MONTANHES;BH;606160.75;799560.96;3711
+3713;2001155932;B03000;AMEACA;AV PARANA;26;52230;22/3/2001 02:20:00;INICIATIVA;S;0;CENTRO (BH);BH;610802.35;797494.35;3712
+3714;2001155956;B03000;AMEACA;RUA DES BRAULIO;1553;19917;22/3/2001 02:42:00;CIDADAO COMUM;N;0;VERA CRUZ;BH;616310.09;797705.61;3713
+3715;2001155980;B06000;LESAO CORPORAL;RUA MAJOR MESSIA;221;115200;22/3/2001 03:03:00;INICIATIVA;N;0;BANDEIRANTES;BH;604706.99;804294.47;3714
+3716;2001156089;B03000;AMEACA;RUA NELSON SOARE;316;47450;22/3/2001 06:22:00;CIDADAO COMUM;N;;DOM BOSCO;BH;604236.64;797100.59;3715
+3717;2001156367;B03000;AMEACA;RUA CONEGO SANTA;103;16859;22/3/2001 10:04:00;CIDADAO COMUM;S;0;CACHOEIRINHA;BH;610538.66;801482.66;3716
+3718;2001156449;B06000;LESAO CORPORAL;RUA LUIZ DA SILV;50;82158;22/3/2001 10:49:00;CIDADAO COMUM;S;0;SAO GABRIEL;BH;613336.01;803981.77;3717
+3719;2001156540;B03000;AMEACA;RUA CONDOR;186;16773;22/3/2001 11:46:00;CIDADAO COMUM;S;CAA;NOVA CINTRA;BH;605641.34;793929.45;3718
+3720;2001156595;B03000;AMEACA;RUA PEDRO LESSA;963;53117;22/3/2001 12:32:00;CIDADAO COMUM;S;;SANTO ANDRE;BH;609375.22;798807.26;3719
+3721;2001156844;B03000;AMEACA;RUA DONA LUIZA;491;22947;22/3/2001 15:25:00;INICIATIVA;S;0;MILIONARIOS;BH;604145.21;789897.69;3720
+3722;2001156885;B06000;LESAO CORPORAL;RUA CLORITA;100;16051;22/3/2001 15:50:00;CIDADAO COMUM;S;0;SANTA TEREZA;BH;612847.22;797209.80;3721
+3723;2001156964;B06000;LESAO CORPORAL;AV DOS ANDRADAS;302;3761;22/3/2001 16:32:00;CIDADAO COMUM;S;0;CENTRO (BH);BH;611502.37;797321.65;3722
+3724;2001156986;B04001;HOMICIDIO TENTAD;RUA AMAROS;201;3125;22/3/2001 16:44:00;CIDADAO COMUM;S;0;SAO PAULO;BH;612908.14;802687.28;3723
+3725;2001156989;B06000;LESAO CORPORAL;RUA CARMO DA CAC;10;13659;22/3/2001 16:46:00;CIDADAO COMUM;S;;SALGADO FILHO;BH;606146.59;794290.29;3724
+3726;2001157104;B06000;LESAO CORPORAL;AV NELSON LEMOS ;119;89172;22/3/2001 17:38:00;CIDADAO COMUM;S;LJ5;DOS PALMARES;BH;612117.64;802505.91;3725
+3727;2001157129;B03000;AMEACA;AV WALDOMIRO LOB;1665;66548;22/3/2001 17:52:00;CIDADAO COMUM;N;;GUARANI;BH;611916.93;805178.94;3726
+3728;2001157315;B04001;HOMICIDIO TENTAD;RUA PADRE PEDRO ;175;51657;22/3/2001 19:32:00;CIDADAO COMUM;S;;VENDA NOVA;BH;609671.68;808130.71;3727
+3729;2001157326;B03000;AMEACA;RUA CLORITA;100;16051;22/3/2001 19:41:00;CIDADAO COMUM;N;0;SANTA TEREZA;BH;612847.22;797209.80;3728
+3730;2001157335;B03000;AMEACA;RUA CAITITE;261;11524;22/3/2001 19:43:00;CIDADAO COMUM;S;;GLORIA;BH;603611.95;798765.39;3729
+3731;2001157405;B03000;AMEACA;RUA SAN SALVADOR;51;130728;22/3/2001 20:18:00;CIDADAO COMUM;S;0;ESTRELA DALVA;BH;607903.57;792246.82;3730
+3732;2001157415;B06000;LESAO CORPORAL;RUA FUNCIONARIOS;65;25163;22/3/2001 20:23:00;POLICIAL MILITAR;S;;TAQUARIL;BH;617149.42;797082.15;3731
+3733;2001157427;B06000;LESAO CORPORAL;RUA ESTRELA;90;86310;22/3/2001 20:38:00;CIDADAO COMUM;S;;CELESTINO;BH;610886.12;808672.60;3732
+3734;2001157429;B03000;AMEACA;RUA LUIZ DELFINO;220;35211;22/3/2001 20:39:00;CIDADAO COMUM;S;0;SANTA MONICA;BH;607532.77;807525.06;3733
+3735;2001157488;B03000;AMEACA;RUA JOSE PEDRO D;392;78560;22/3/2001 21:10:00;CIDADAO COMUM;S;CAFR;VILA SANTA RITA;BH;601530.38;787287.41;3734
+3736;2001157533;B08000;VIOLACAO DE DOMI;RUA LEOPOLDO GOM;287;40770;22/3/2001 21:34:00;CIDADAO COMUM;N;0;POMPEIA;BH;614583.76;797883.74;3735
+3737;2001157534;B04002;HOMICIDIO CONSUM;RUA MUNIZ;450;170850;22/3/2001 21:34:00;CIDADAO COMUM;N;;MORRO DAS PEDRAS;BH;608189.72;793769.03;3736
+3738;2001157538;B06000;LESAO CORPORAL;RUA VINTE E NOVE;274;73061;22/3/2001 21:38:00;CIDADAO COMUM;S;;JOAO PINHEIRO;BH;604371.26;796671.42;3737
+3739;2001157586;B03000;AMEACA;RUA AUGUSTO JOSE;40;6729;22/3/2001 22:04:00;CIDADAO COMUM;S;0;BETANIA;BH;605990.32;793126.57;3738
+3740;2001157597;B06000;LESAO CORPORAL;RUA EDUARDO LEIT;104;95258;22/3/2001 22:11:00;CIDADAO COMUM;N;;DAS INDUSTRIAS;BH;604948.63;791383.04;3739
+3741;2001157639;B06000;LESAO CORPORAL;RUA ROBERTSON PI;365;87149;22/3/2001 22:36:00;CIDADAO COMUM;S;;PONGELUPE;BH;603958.75;787192.76;3740
+3742;2001157641;B03000;AMEACA;RUA DOS BENEDITI;91;63310;22/3/2001 22:37:00;CIDADAO COMUM;S;;PLANALTO;BH;610767.07;805432.04;3741
+3743;2001157642;B03000;AMEACA;RUA CONSELHEIRO ;1517;17095;22/3/2001 22:37:00;CIDADAO COMUM;N;0;SANTA EFIGENIA;BH;613099.23;797328.67;3742
+3744;2001157644;B04002;HOMICIDIO CONSUM;RUA DOUTOR ARIST;596;89576;22/3/2001 22:39:00;CIDADAO COMUM;N;;PALMEIRAS;BH;606530.11;790740.76;3743
+3745;2001157653;B03000;AMEACA;RUA GENTIOS;1350;30983;22/3/2001 22:47:00;CIDADAO COMUM;S;0;CORACAO DE JESUS;BH;608905.13;793585.28;3744
+3746;2001157710;B04001;HOMICIDIO TENTAD;RUA JAGUARA;396;36775;22/3/2001 23:16:00;CIDADAO COMUM;N;CAB;SAUDADE;BH;615317.98;797573.75;3745
+3747;2001157773;B06000;LESAO CORPORAL;RUA ITAJUBA;2168;35495;22/3/2001 23:58:00;CIDADAO COMUM;S;;SAGRADA FAMILIA;BH;612394.62;799485.99;3746
+3748;2001157795;B06000;LESAO CORPORAL;RUA GUAICURUS;690;32009;23/3/2001 00:15:00;INICIATIVA;S;0;CENTRO (BH);BH;611000.88;797693.04;3747
+3749;2001157828;B06000;LESAO CORPORAL;RUA JOAO PROCOPI;211;69070;23/3/2001 00:44:00;CIDADAO COMUM;S;0;JARDIM ALVORADA;BH;605929.92;800245.45;3748
+3750;2001157863;B03000;AMEACA;AV AGENOR DE PAU;85;86250;23/3/2001 01:09:00;CIDADAO COMUM;N;;VILA FREI LEOPOL;BH;611303.39;810132.56;3749
+3751;2001157873;B06000;LESAO CORPORAL;RUA BARAO DE SAR;445;8043;23/3/2001 01:15:00;CIDADAO COMUM;S;AP304;HORTO;BH;613709.90;797916.68;3750
+3752;2001157916;B03000;AMEACA;RUA SAO RAFAEL;138;63580;23/3/2001 02:08:00;CIDADAO COMUM;S;;FLORESTA;BH;612241.79;798264.50;3751
+3753;2001158255;B03000;AMEACA;RUA ITAPERUNA;3;35785;23/3/2001 08:29:00;CIDADAO COMUM;S;0;SAUDADE;BH;614974.32;797593.43;3752
+3754;2001158287;B03000;AMEACA;RUA PRINCIPAL;300;170504;23/3/2001 08:47:00;INICIATIVA;S;0;MORRO DAS PEDRAS;BH;608596.19;793933.42;3753
+3755;2001158329;B03000;AMEACA;RUA DAVID RABELO;948;19702;23/3/2001 09:12:00;INICIATIVA;S;A;INCONFIDENCIA;BH;604928.15;798979.46;3754
+3756;2001158331;B03000;AMEACA;RUA DOS GUAJAJAR;190;32037;23/3/2001 09:17:00;CIDADAO COMUM;S;0;CENTRO (BH);BH;611392.58;796387.87;3755
+3757;2001158559;B06000;LESAO CORPORAL;AV TERESA CRISTI;175;67512;23/3/2001 12:10:00;CIDADAO COMUM;S;FR175;CARLOS PRATES;BH;609052.83;797141.23;3756
+3758;2001158587;B03000;AMEACA;RUA MARMORE;206;44695;23/3/2001 12:27:00;CIDADAO COMUM;N;CONJ7;SANTA TEREZA;BH;613022.23;797513.82;3757
+3759;2001158621;B03000;AMEACA;RUA VISCONDE DE ;472;73380;23/3/2001 12:42:00;CIDADAO COMUM;S;CASA 05.;SAO JOAO BATISTA;BH;607907.71;807824.31;3758
+3760;2001158630;B03000;AMEACA;RUA JOAQUIM GONC;495;119428;23/3/2001 12:48:00;CIDADAO COMUM;S;BL/16 APT/103;VILA MAGNESITA;BH;602540.14;795033.90;3759
+3761;2001158686;B03000;AMEACA;RUA JACAREI;187;13154;23/3/2001 13:15:00;CIDADAO COMUM;S;;COQUEIROS;BH;602705.00;798554.24;3760
+3762;2001158722;B03000;AMEACA;RUA DR BROCHADO;93;23215;23/3/2001 13:37:00;CIDADAO COMUM;S;CAA;VERA CRUZ;BH;615809.92;798594.98;3761
+3763;2001158767;B06000;LESAO CORPORAL;RUA MARIA BEATRI;90;126792;23/3/2001 14:11:00;CIDADAO COMUM;S;;DAS INDUSTRIAS;BH;605181.92;790926.68;3762
+3764;2001158796;B03000;AMEACA;AV AVAI;238;6946;23/3/2001 14:41:00;CIDADAO COMUM;S;LJ03;DOM BOSCO;BH;604297.83;797579.83;3763
+3765;2001158914;B06000;LESAO CORPORAL;RUA AROEIRA NEVE;151;92423;23/3/2001 15:37:00;CIDADAO COMUM;N;;ALVARO CAMARGOS;BH;604095.41;797469.10;3764
+3766;2001158941;B03000;AMEACA;RUA VIOLETA DE M;34;80253;23/3/2001 15:46:00;CIDADAO COMUM;S;;ALIPIO DE MELO;BH;605328.14;799159.14;3765
+3767;2001158990;B06000;LESAO CORPORAL;RUA MARIA BEATRI;90;126792;23/3/2001 16:05:00;CIDADAO COMUM;N;0;DAS INDUSTRIAS;BH;605181.92;790926.68;3766
+3768;2001159015;B03000;AMEACA;RUA DOMINGOS ROC;122;22631;23/3/2001 16:17:00;CIDADAO COMUM;S;;SALGADO FILHO;BH;606564.17;795287.65;3767
+3769;2001159044;B03000;AMEACA;RUA RIO GRANDE D;697;58744;23/3/2001 16:35:00;CIDADAO COMUM;S;SL804;BARRO PRETO;BH;610340.32;796860.88;3768
+3770;2001159091;B03000;AMEACA;RUA JASMIM;25;37071;23/3/2001 16:57:00;CIDADAO COMUM;S;;LINDEIA;BH;599163.11;790914.30;3769
+3771;2001159117;B03000;AMEACA;RUA ZILAH RODRIG;277;74008;23/3/2001 17:05:00;CIDADAO COMUM;0;0;NOVA BARROCA;BH;607736.18;792540.41;3770
+3772;2001159170;B03000;AMEACA;AV PADRE JOSE MA;781;53448;23/3/2001 17:28:00;CIDADAO COMUM;S;0;VISTA ALEGRE;BH;605084.94;793257.67;3771
+3773;2001159215;B03000;AMEACA;RUA SUASSUI;460;66447;23/3/2001 17:50:00;CIDADAO COMUM;S;;CARLOS PRATES;BH;608932.68;797321.00;3772
+3774;2001159241;B03000;AMEACA;RUA DR ANTONIO P;25;95030;23/3/2001 18:00:00;MILITARES DAS FO;S;0;COQUEIROS;BH;602118.47;799218.16;3773
+3775;2001159286;B06000;LESAO CORPORAL;AV PRESIDENTE CA;2020;55125;23/3/2001 18:23:00;CIDADAO COMUM;S;0;CAICARA;BH;608432.84;800193.57;3774
+3776;2001159312;B06000;LESAO CORPORAL;RUA IBERTIOGA;256;33809;23/3/2001 18:35:00;CIDADAO COMUM;S;FU;SAO JOAO BATISTA;BH;611151.93;801287.85;3775
+3777;2001159325;B03000;AMEACA;RUA SANTAREM;337;61484;23/3/2001 18:39:00;CIDADAO COMUM;S;0;NOVA CINTRA;BH;605761.62;793824.26;3776
+3778;2001159372;B03000;AMEACA;AV AMAZONAS;148;3140;23/3/2001 19:00:00;CIDADAO COMUM;S;;CENTRO (BH);BH;611346.52;797320.11;3777
+3779;2001159443;B03000;AMEACA;RUA ZENITE;520;73957;23/3/2001 19:42:00;CIDADAO COMUM;S;AP301;ADELAIDE;BH;606967.94;799056.74;3778
+3780;2001159445;B06000;LESAO CORPORAL;RUA GUAICURUS;177;32009;23/3/2001 19:44:00;POLICIAL MILITAR;S;0;CENTRO (BH);BH;611334.76;797567.17;3779
+3781;2001159499;B06000;LESAO CORPORAL;RUA EDSON LUIZ M;112;25062;23/3/2001 20:09:00;CIDADAO COMUM;S;CAB;MARIA GORETTI;BH;614197.63;803631.48;3780
+3782;2001159512;B03000;AMEACA;RUA FRANCISCO JO;545;118223;23/3/2001 20:14:00;POLICIAL MILITAR;N;0;ITAIPU BH;BH;599752.96;789472.97;3781
+3783;2001159524;B03000;AMEACA;RUA ANTONIO PEIX;192;12379;23/3/2001 20:20:00;CIDADAO COMUM;S;;ADELAIDE;BH;607407.69;798098.04;3782
+3784;2001159527;B06000;LESAO CORPORAL;RUA CARMELITA CO;17;93366;23/3/2001 20:23:00;INICIATIVA;S;0;MINEIRAO;BH;601088.47;785895.52;3783
+3785;2001159603;B03000;AMEACA;RUA AUGUSTO JOSE;401;6729;23/3/2001 20:59:00;CIDADAO COMUM;S;;ESTRELA DO ORIEN;BH;605834.73;791972.39;3784
+3786;2001159663;B03000;AMEACA;RUA MARROCOS;1380;44869;23/3/2001 21:21:00;CIDADAO COMUM;N;0;JARDIM LEBLON;BH;605477.74;807935.17;3785
+3787;2001159725;B06000;LESAO CORPORAL;RUA QUARENTA E O;218;35048;23/3/2001 21:57:00;CIDADAO COMUM;S;;CONJUNTO FELICID;BH;612674.73;807062.29;3786
+3788;2001159755;B06000;LESAO CORPORAL;RUA LAGOA DOURAD;255;40174;23/3/2001 22:11:00;CIDADAO COMUM;N;PX300;PRADO;BH;608792.86;796447.49;3787
+3789;2001159850;B06000;LESAO CORPORAL;RUA LEOPOLDO GOM;1614;40770;23/3/2001 23:16:00;CIDADAO COMUM;N;;VERA CRUZ;BH;615965.80;798142.50;3788
+3790;2001159951;B06000;LESAO CORPORAL;RUA DOS TUPIS;597;69965;24/3/2001 00:26:00;INICIATIVA;N;0;CENTRO BH;BH;610730.23;796962.57;3789
+3791;2001159980;B06000;LESAO CORPORAL;RUA DES BRAULIO;1138;19917;24/3/2001 00:41:00;CIDADAO COMUM;S;;VERA CRUZ;BH;616228.18;797935.95;3790
+3792;2001159986;B06000;LESAO CORPORAL;RUA VIOLETA DE M;430;80253;24/3/2001 00:45:00;INICIATIVA;S;0;SAO JOSE;BH;604587.45;799319.51;3791
+3793;2001159993;B06000;LESAO CORPORAL;RUA JOANA LOPES ;300;77340;24/3/2001 00:49:00;CIDADAO COMUM;S;;INDEPENDENCIA;BH;602100.12;786426.51;3792
+3794;2001159994;B06000;LESAO CORPORAL;RUA RADIALISTA W;49;99983;24/3/2001 00:50:00;CIDADAO COMUM;S;;CEU AZUL;BH;604193.21;808558.49;3793
+3795;2001160050;B06000;LESAO CORPORAL;RUA DR GERALDO S;280;23372;24/3/2001 01:20:00;INICIATIVA;S;0;REGINA;BH;599010.61;790221.47;3794
+3796;2001160057;B06000;LESAO CORPORAL;RUA ANTONIO DE F;410;4550;24/3/2001 01:22:00;CIDADAO COMUM;N;0;PIRAJA;BH;613437.47;803121.36;3795
+3797;2001160064;B06000;LESAO CORPORAL;RUA FLOR DE PITA;107;42949;24/3/2001 01:26:00;CIDADAO COMUM;S;0;INDEPENDENCIA;BH;601600.30;786045.97;3796
+3798;2001160122;B04001;HOMICIDIO TENTAD;RUA UNIAO;100;23587;24/3/2001 02:15:00;CIDADAO COMUM;S;0;TAQUARIL;BH;617415.17;796910.53;3797
+3799;2001160162;B06000;LESAO CORPORAL;RUA ELI PINHEIRO;499;42734;24/3/2001 02:41:00;CIDADAO COMUM;S;;PINDORAMA;BH;601964.61;797707.33;3798
+3800;2001160208;B06000;LESAO CORPORAL;RUA NADIR;519;47173;24/3/2001 03:13:00;CIDADAO COMUM;S;AP102;ADELAIDE;BH;607116.61;798871.94;3799
+3801;2001160228;B06000;LESAO CORPORAL;RUA CARLOS SCHET;625;118771;24/3/2001 03:25:00;CIDADAO COMUM;S;;JARDINOPOLIS;BH;604966.86;794527.69;3800
+3802;2001160261;B03000;AMEACA;RUA ARISTOTELES;150;22427;24/3/2001 03:55:00;CIDADAO COMUM;S;;NAZARE;BH;615473.36;804481.47;3801
+3803;2001160271;B06000;LESAO CORPORAL;RUA CHAPADA;108;42721;24/3/2001 04:01:00;CIDADAO COMUM;S;0;PRIMAVERA;BH;604251.15;798747.54;3802
+3804;2001160281;B06000;LESAO CORPORAL;AV ASSIS CHATEAU;429;6353;24/3/2001 04:06:00;CIDADAO COMUM;S;0;FLORESTA;BH;611933.16;797254.59;3803
+3805;2001160287;B06000;LESAO CORPORAL;RUA FELIPE DOS S;508;27953;24/3/2001 04:17:00;INICIATIVA;N;0;LOURDES;BH;610309.76;795521.03;3804
+3806;2001160297;B06000;LESAO CORPORAL;ESTRADA DO CERCA;1570;26428;24/3/2001 04:27:00;CIDADAO COMUM;S;0;JARDIM AMERICA;BH;607375.69;794003.07;3805
+3807;2001160309;B04001;HOMICIDIO TENTAD;RUA ENGENHEIRO A;111;4588;24/3/2001 04:51:00;CIDADAO COMUM;N;;JOAO PINHEIRO;BH;605231.12;795804.48;3806
+3808;2001160328;B06000;LESAO CORPORAL;RUA ESPIRITO SAN;283;26052;24/3/2001 05:22:00;CIDADAO COMUM;N;0;CENTRO (BH);BH;611347.16;797371.80;3807
+3809;2001160354;B06000;LESAO CORPORAL;RUA SILVA ALVARE;619;65810;24/3/2001 05:55:00;CIDADAO COMUM;S;0;SAO GERALDO;BH;615346.41;799416.06;3808
+3810;2001160374;B03000;AMEACA;AV PRESIDENTE AN;1000;4461;24/3/2001 06:32:00;CIDADAO COMUM;S;;SAO CRISTOVAO;BH;610467.56;799002.85;3809
+3811;2001160376;B03000;AMEACA;RUA NORONHA GUAR;140;47867;24/3/2001 06:40:00;CIDADAO COMUM;N;;BARREIRO;BH;602096.60;791122.57;3810
+3812;2001160398;B03000;AMEACA;AV NOSSA SENHORA;2654;48107;24/3/2001 07:15:00;CIDADAO COMUM;N;;CARLOS PRATES;BH;609400.94;797538.83;3811
+3813;2001160401;B06000;LESAO CORPORAL;RUA LAZARO FERRE;53;56143;24/3/2001 07:17:00;CIDADAO COMUM;N;;JARDIM GUANABARA;BH;611818.49;807543.63;3812
+3814;2001160402;B06000;LESAO CORPORAL;RUA DOS CAETES;540;11376;24/3/2001 07:20:00;INICIATIVA;S;0;CENTRO (BH);BH;611085.09;797483.48;3813
+3815;2001160471;B03000;AMEACA;RUA DOUTOR ALBER;149;23114;24/3/2001 08:13:00;CIDADAO COMUM;N;0;HELIOPOLIS;BH;610892.27;805316.02;3814
+3816;2001160486;B06000;LESAO CORPORAL;RUA MARIA CANDID;123;114957;24/3/2001 08:22:00;CIDADAO COMUM;S;FU;PAQUETA;BH;605581.25;802467.74;3815
+3817;2001160490;B06000;LESAO CORPORAL;RUA CARLOS MUZZI;137;89967;24/3/2001 08:24:00;CIDADAO COMUM;S;;PALMEIRAS;BH;606607.86;791463.13;3816
+3818;2001160552;B03000;AMEACA;RUA LEOPOLDINA;120;40739;24/3/2001 09:08:00;INICIATIVA;S;0;SANTO ANTONIO;BH;610885.17;794753.81;3817
+3819;2001160680;B03000;AMEACA;RUA TRES CORACOE;131;68805;24/3/2001 10:34:00;CIDADAO COMUM;S;;CALAFATE;BH;607965.67;796506.72;3818
+3820;2001160683;B03000;AMEACA;RUA SERGIPE;1211;64961;24/3/2001 10:35:00;CIDADAO COMUM;S;ARMADO DE REV;FUNCIONARIOS;BH;611200.95;795166.34;3819
+3821;2001160756;B04001;HOMICIDIO TENTAD;RUA SAO VICENTE;22;88126;24/3/2001 11:20:00;INICIATIVA;S;0;GRANJA FREITAS;BH;617082.39;798490.25;3820
+3822;2001160829;B04001;HOMICIDIO TENTAD;RUA 31;300;302830;24/3/2001 12:07:00;CIDADAO COMUM;S;AP703;NOVO AARAO REIS;BH;614073.73;805523.06;3821
+3823;2001160850;B06000;LESAO CORPORAL;RUA PAULINO CAET;300;20881;24/3/2001 12:16:00;CIDADAO COMUM;S;;CEU AZUL;BH;604892.28;807442.71;3822
+3824;2001160963;B06000;LESAO CORPORAL;RUA 36;94;302834;24/3/2001 13:42:00;CIDADAO COMUM;S;;NOVO AARAO REIS;BH;613775.82;805485.10;3823
+3825;2001160980;B04001;HOMICIDIO TENTAD;RUA SAO TOMAS DE;215;63782;24/3/2001 13:53:00;INICIATIVA;S;0;MORRO DO PAPAGAI;BH;610955.95;793822.34;3824
+3826;2001160990;B06000;LESAO CORPORAL;RUA RIACHO;80;24927;24/3/2001 13:57:00;CIDADAO COMUM;S;;TAQUARIL;BH;617249.69;797177.50;3825
+3827;2001161069;B03000;AMEACA;RUA Y;55;41817;24/3/2001 14:54:00;CIDADAO COMUM;N;;CH CONFISCO (CO);CO;602477.29;802958.98;3826
+3828;2001161092;B04002;HOMICIDIO CONSUM;RUA CHAFARIZ;54;93568;24/3/2001 15:18:00;CIDADAO COMUM;N;0;PETROPOLIS;BH;601454.00;786602.56;3827
+3829;2001161110;B03000;AMEACA;RUA PADRE EUSTAQ;1340;51294;24/3/2001 15:31:00;CIDADAO COMUM;S;0;CARLOS PRATES;BH;608296.40;797908.26;3828
+3830;2001161139;B03000;AMEACA;RUA DOS TAMOIOS;19;66825;24/3/2001 15:45:00;CIDADAO COMUM;N;;CENTRO (BH);BH;611310.59;796955.28;3829
+3831;2001161166;B03000;AMEACA;AV JOAQUIM ABEL ;185;123996;24/3/2001 15:47:00;CIDADAO COMUM;N;;MANTIQUEIRA;BH;606602.10;812230.32;3830
+3832;2001161190;B03000;AMEACA;RUA EXPEDITO FLA;44;84847;24/3/2001 16:07:00;CIDADAO COMUM;S;BL10;DA LAGOA;BH;604775.59;809097.83;3831
+3833;2001161203;B06000;LESAO CORPORAL;RUA HEMATITA;608;33014;24/3/2001 16:13:00;CIDADAO COMUM;S;;ADELAIDE;BH;607683.27;798277.79;3832
+3834;2001161224;B06000;LESAO CORPORAL;RUA CIPRIANO DE ;745;15856;24/3/2001 16:25:00;CIDADAO COMUM;S;;CINQUENTENARIO;BH;606346.75;792973.08;3833
+3835;2001161319;B06000;LESAO CORPORAL;RUA DOM SILVERIO;300;22496;24/3/2001 17:15:00;CIDADAO COMUM;S;;BELMONT;BH;615222.25;805374.99;3834
+3836;2001161335;B03000;AMEACA;RUA BRASIL;21;10446;24/3/2001 17:25:00;CIDADAO COMUM;S;;CABANA;BH;604813.51;793739.13;3835
+3837;2001161368;B03000;AMEACA;RUA ANTONIO PEIX;192;12379;24/3/2001 17:47:00;CIDADAO COMUM;S;;ADELAIDE;BH;607407.69;798098.04;3836
+3838;2001161386;B06000;LESAO CORPORAL;RUA NICOLINA DE ;69;44263;24/3/2001 17:56:00;INICIATIVA;S;0;HAVAI;BH;607317.75;793714.27;3837
+3839;2001161392;B03000;AMEACA;AV MIGUEL MOYSES;70;10811;24/3/2001 17:58:00;CIDADAO COMUM;N;;NOVA GAMELEIRA;BH;605508.31;794694.74;3838
+3840;2001161447;B03000;AMEACA;RUA DOS TIMBIRAS;2163;67682;24/3/2001 18:24:00;CIDADAO COMUM;S;AP401;LOURDES;BH;610609.99;796418.01;3839
+3841;2001161488;B06000;LESAO CORPORAL;RUA RIO DE JANEI;328;58772;24/3/2001 18:49:00;CIDADAO COMUM;N;;CENTRO (BH);BH;611168.31;797376.15;3840
+3842;2001161515;B03000;AMEACA;RUA H;152;41441;24/3/2001 19:04:00;POLICIAL MILITAR;S;0;CH CONFISCO;BH;602941.36;803114.92;3841
+3843;2001161545;B03000;AMEACA;RUA POVOA DE VAR;381;54958;24/3/2001 19:13:00;INICIATIVA;N;0;PAQUETA;BH;605370.76;802630.89;3842
+3844;2001161549;B06000;LESAO CORPORAL;AV NOSSA SENHORA;2299;48107;24/3/2001 19:15:00;INICIATIVA;N;0;CARLOS PRATES;BH;609679.55;797662.00;3843
+3845;2001161577;B03000;AMEACA;RUA RAMIRO SIQUE;73;128858;24/3/2001 19:26:00;INICIATIVA;S;0;CASTANHEIRAS (TA;BH;617772.39;797223.77;3844
+3846;2001161579;B04001;HOMICIDIO TENTAD;RUA DURVAL DE BA;10;24914;24/3/2001 19:27:00;INICIATIVA;N;0;TAQUARIL;BH;617311.85;797132.61;3845
+3847;2001161605;B06000;LESAO CORPORAL;RUA CORONEL ABIL;228;17518;24/3/2001 19:38:00;CIDADAO COMUM;S;0;CAETANO FURQUIM;BH;616532.45;799490.62;3846
+3848;2001161610;B06000;LESAO CORPORAL;RUA PROFESSOR ME;295;77920;24/3/2001 19:42:00;CIDADAO COMUM;S;0;MANGABEIRAS;BH;612132.44;792715.35;3847
+3849;2001161724;B04002;HOMICIDIO CONSUM;RUA REGENCIA;100;301448;24/3/2001 20:46:00;CIDADAO COMUM;N;0;VILA CAFEZAL;BH;614118.47;795470.66;3848
+3850;2001161744;B03000;AMEACA;RUA JULITA NUNES;211;130047;24/3/2001 20:54:00;CIDADAO COMUM;N;;MINASCAIXA;BH;609211.34;809819.89;3849
+3851;2001161766;B06000;LESAO CORPORAL;RUA FREI VICENTE;235;30029;24/3/2001 21:01:00;CIDADAO COMUM;N;0;SANTA MONICA;BH;607275.87;807974.29;3850
+3852;2001161789;B03000;AMEACA;RUA RIO PARNAIBA;230;52344;24/3/2001 21:10:00;CIDADAO COMUM;S;0;MINASLANDIA;BH;612194.90;804722.15;3851
+3853;2001161853;B03000;AMEACA;RUA SAO GONCALO ;165;62689;24/3/2001 21:44:00;CIDADAO COMUM;N;;JARDIM LEBLON;BH;605834.54;807920.69;3852
+3854;2001161854;B06000;LESAO CORPORAL;RUA BOM JARDIM;310;9972;24/3/2001 21:45:00;CIDADAO COMUM;N;;SARANDI (URCA/BH;BH;604021.54;802515.54;3853
+3855;2001161865;B03000;AMEACA;RUA PIO XI;560;53927;24/3/2001 21:48:00;CIDADAO COMUM;S;;IPIRANGA;BH;612058.97;800797.20;3854
+3856;2001161904;B06000;LESAO CORPORAL;RUA K;45;78774;24/3/2001 22:05:00;CIDADAO COMUM;N;0;CH JATOBA IV;BH;600642.62;787884.73;3855
+3857;2001161955;B06000;LESAO CORPORAL;RUA BEBERIBE;155;8550;24/3/2001 22:49:00;CIDADAO COMUM;N;;SAO CRISTOVAO;BH;610639.39;799190.15;3856
+3858;2001161982;B03000;AMEACA;RUA RITMO;273;301436;24/3/2001 23:01:00;CIDADAO COMUM;S;;VILA CAFEZAL;BH;614052.17;795226.81;3857
+3859;2001162002;B03000;AMEACA;RUA ALETES;200;2075;24/3/2001 23:10:00;CIDADAO COMUM;S;;PINDORAMA;BH;602582.06;797448.37;3858
+3860;2001162011;B03000;AMEACA;RUA STA INES;255;60730;24/3/2001 23:16:00;CIDADAO COMUM;S;;SAO MARCOS;BH;614319.43;802711.42;3859
+3861;2001162046;B03000;AMEACA;RUA MAURA;513;82205;24/3/2001 23:31:00;CIDADAO COMUM;S;FU;IPIRANGA;BH;611834.45;801543.11;3860
+3862;2001162097;B04002;HOMICIDIO CONSUM;AV BUENO CERQUEI;143;71343;25/3/2001 00:00:00;CIDADAO COMUM;N;CSA;UNIVERSITARIO;BH;610578.63;802883.10;3861
+3863;2001162126;B06000;LESAO CORPORAL;RUA DOS CARIJOS;412;81243;25/3/2001 00:14:00;INICIATIVA;N;0;CENTRO (BH);BH;611080.93;797191.84;3862
+3864;2001162128;B06000;LESAO CORPORAL;AV PRESIDENTE CA;800;55125;25/3/2001 00:15:00;CIDADAO COMUM;N;0;CAICARA;BH;608266.95;799059.21;3863
+3865;2001162156;B06000;LESAO CORPORAL;RUA PONTA GROSSA;20;14900;25/3/2001 00:34:00;CIDADAO COMUM;S;;ARAGUAIA;BH;604918.03;789453.17;3864
+3866;2001162169;B04001;HOMICIDIO TENTAD;RUA JOSE CHRISTI;110;106949;25/3/2001 00:41:00;CIDADAO COMUM;S;;NOVA CINTRA;BH;605812.26;793381.78;3865
+3867;2001162225;B02000;RIXA;AV PROFESSOR MAR;1430;91130;25/3/2001 01:10:00;CIDADAO COMUM;S;0;BURITIS;BH;608335.60;791553.16;3866
+3868;2001162251;B03000;AMEACA;PRACA CINQUENTEN;10;8462;25/3/2001 01:25:00;POLICIAL MILITAR;S;;CINQUENTENARIO;BH;606358.33;793267.49;3867
+3869;2001162257;B03000;AMEACA;RUA MARIA MARTIN;633;82680;25/3/2001 01:28:00;CIDADAO COMUM;S;0;CELESTINO;BH;611032.06;808645.30;3868
+3870;2001162281;B06000;LESAO CORPORAL;AV RAJA GABAGLIA;2200;57830;25/3/2001 01:37:00;INICIATIVA;N;0;ESTORIL;BH;608853.99;793279.32;3869
+3871;2001162284;B06000;LESAO CORPORAL;RUA MIGUEL PINTO;1595;128757;25/3/2001 01:35:00;CIDADAO COMUM;S;;NOVA ESPERANCA;BH;609001.69;799454.98;3870
+3872;2001162310;B03000;AMEACA;BECO A;18;302717;25/3/2001 01:45:00;CIDADAO COMUM;S;0;VILA CASTANHEIRA;BH;601391.47;788282.32;3871
+3873;2001162322;B06000;LESAO CORPORAL;AV PEDREIRA;66;52952;25/3/2001 01:52:00;INICIATIVA;S;0;PROVIDENCIA;BH;612837.94;804549.46;3872
+3874;2001162331;B03000;AMEACA;RUA EDSON TOMAS ;700;68556;25/3/2001 01:56:00;CIDADAO COMUM;S;;SAO BERNARDO;BH;611116.83;804710.84;3873
+3875;2001162364;B03000;AMEACA;RUA REGINO GONZA;11;95522;25/3/2001 02:11:00;CIDADAO COMUM;S;;JARDIM VITORIA;BH;617056.30;804188.87;3874
+3876;2001162406;B06000;LESAO CORPORAL;AV AMAZONAS;3615;3140;25/3/2001 02:32:00;CIDADAO COMUM;N;0;BARROCA;BH;608219.93;795824.43;3875
+3877;2001162408;B03000;AMEACA;RUA ANTONIO VERG;11;4900;25/3/2001 02:33:00;INICIATIVA;S;0;OURO PRETO;BH;605613.02;802592.15;3876
+3878;2001162430;B06000;LESAO CORPORAL;AV SILVIANO BRAN;427;66002;25/3/2001 02:47:00;CIDADAO COMUM;N;CAFU;SAGRADA FAMILIA;BH;612050.15;798570.93;3877
+3879;2001162484;B03000;AMEACA;RUA GABRO;267;30435;25/3/2001 03:27:00;CIDADAO COMUM;S;CAB;SANTA TEREZA;BH;612913.80;797341.46;3878
+3880;2001162560;B06000;LESAO CORPORAL;AV PRESIDENTE CA;800;55125;25/3/2001 04:18:00;INICIATIVA;S;0;CAICARA;BH;608266.95;799059.21;3879
+3881;2001162590;B06000;LESAO CORPORAL;AV SANTOS DUMONT;673;61950;25/3/2001 04:41:00;CIDADAO COMUM;S;PX734;CENTRO (BH);BH;610982.01;797558.77;3880
+3882;2001162693;B04002;HOMICIDIO CONSUM;RUA VEREADOR ANT;67;93602;25/3/2001 06:40:00;CIDADAO COMUM;S;;INDEPENDENCIA;BH;601901.25;786466.11;3881
+3883;2001162695;B03000;AMEACA;RUA OLAU FERREIR;19;49598;25/3/2001 06:41:00;CIDADAO COMUM;S;0;CAICARA;BH;607753.24;799849.35;3882
+3884;2001162703;B03000;AMEACA;RUA NATAL;373;47306;25/3/2001 07:00:00;CIDADAO COMUM;N;0;SANTO ANDRE;BH;609189.92;799371.29;3883
+3885;2001162749;B03000;AMEACA;RUA SAO JOAO;31;62780;25/3/2001 07:56:00;CIDADAO COMUM;S;0;FLAVIO MARQUES D;BH;604144.35;788857.30;3884
+3886;2001162812;B04002;HOMICIDIO CONSUM;RUA 51;227;302847;25/3/2001 08:38:00;CIDADAO COMUM;N;;NOVO AARAO REIS;BH;614103.15;805588.83;3885
+3887;2001162894;B03000;AMEACA;RUA DEPUTADA IVE;124;87325;25/3/2001 09:57:00;CIDADAO COMUM;N;;PONGELUPE;BH;603758.88;787112.87;3886
+3888;2001162938;B03000;AMEACA;RUA EXPEDITO FLA;359;84847;25/3/2001 10:29:00;CIDADAO COMUM;N;;DA LAGOA;BH;604520.36;809212.26;3887
+3889;2001162959;B02000;RIXA;RUA ASSEMBLEIA;90;6338;25/3/2001 10:42:00;CIDADAO COMUM;N;;LUXEMBURGO;BH;609657.18;794608.63;3888
+3890;2001162994;B06000;LESAO CORPORAL;RUA ITAMAR;70;35527;25/3/2001 11:10:00;INICIATIVA;N;0;VERA CRUZ;BH;616278.93;798658.76;3889
+3891;2001162997;B06000;LESAO CORPORAL;RUA PASSOS;41;52458;25/3/2001 11:10:00;CIDADAO COMUM;N;CSB;CARLOS PRATES;BH;609255.16;798152.08;3890
+3892;2001163036;B06000;LESAO CORPORAL;RUA BEZERRA DE M;82;9525;25/3/2001 11:46:00;CIDADAO COMUM;S;;NAZARE;BH;615434.80;804565.98;3891
+3893;2001163106;B04001;HOMICIDIO TENTAD;RUA DR JOAO CARV;137;36012;25/3/2001 12:42:00;CIDADAO COMUM;N;;PRADO LOPES;BH;610144.49;798836.55;3892
+3894;2001163241;B03000;AMEACA;RUA ABILIO BARRE;75;129661;25/3/2001 14:37:00;CIDADAO COMUM;S;;TUPI;BH;613770.88;806593.53;3893
+3895;2001163256;B06000;LESAO CORPORAL;RUA VINTE E QUAT;7;300270;25/3/2001 14:46:00;CIDADAO COMUM;S;PROX ESC. MURILO;VISTA DO SOL;BH;615774.88;804917.15;3894
+3896;2001163264;B06000;LESAO CORPORAL;RUA CORONEL ANTO;342;17590;25/3/2001 14:52:00;CIDADAO COMUM;N;CAFU;JARDIM LEBLON;BH;606018.67;807546.54;3895
+3897;2001163310;B03000;AMEACA;RUA NOSSA SENHOR;340;48021;25/3/2001 15:25:00;CIDADAO COMUM;S;;CACHOEIRINHA;BH;610236.98;800129.30;3896
+3898;2001163362;B06000;LESAO CORPORAL;AV SANTOS DUMONT;305;61950;25/3/2001 15:54:00;CIDADAO COMUM;N;PX305;CENTRO (BH);BH;611328.73;797470.25;3897
+3899;2001163415;B04001;HOMICIDIO TENTAD;RUA SAO TOMAS DE;491;63782;25/3/2001 16:21:00;CIDADAO COMUM;S;0;MORRO DO PAPAGAI;BH;610857.53;793450.63;3898
+3900;2001163424;B03000;AMEACA;RUA CARLINDO COS;75;97294;25/3/2001 16:27:00;CIDADAO COMUM;N;;EYMARD;BH;613736.10;803676.67;3899
+3901;2001163461;B06000;LESAO CORPORAL;AV MENELICK DE C;1420;30448;25/3/2001 16:46:00;CIDADAO COMUM;S;0;FLAVIO MARQUES D;BH;605358.05;788416.82;3900
+3902;2001163466;B06000;LESAO CORPORAL;RUA NIZIO TORRES;205;94659;25/3/2001 16:48:00;CIDADAO COMUM;S;CA2;OURO PRETO;BH;606256.94;800864.38;3901
+3903;2001163471;B06000;LESAO CORPORAL;RUA MARIA ROSA D;205;107800;25/3/2001 16:54:00;CIDADAO COMUM;S;;MANTIQUEIRA;BH;605990.28;811335.34;3902
+3904;2001163528;B06000;LESAO CORPORAL;RUA Q;74;78415;25/3/2001 17:31:00;CIDADAO COMUM;N;CA57;VILA PINHO;BH;602137.45;787979.37;3903
+3905;2001163541;B04001;HOMICIDIO TENTAD;RUA RIO NOVO;64;58817;25/3/2001 17:40:00;CIDADAO COMUM;N;0;LAGOINHA;BH;610575.70;798394.02;3904
+3906;2001163585;B06000;LESAO CORPORAL;RUA CLAUDIO BRAN;210;15960;25/3/2001 18:01:00;CIDADAO COMUM;N;;TUPI;BH;612776.24;806486.34;3905
+3907;2001163610;B04001;HOMICIDIO TENTAD;RUA ENGENHO DO S;760;80427;25/3/2001 18:07:00;INICIATIVA;N;0;ENGENHO NOGUEIRA;BH;606376.46;800209.42;3906
+3908;2001163631;B06000;LESAO CORPORAL;AV DOUTOR CRISTI;1109;62459;25/3/2001 18:21:00;INICIATIVA;S;0;PLANALTO;BH;610111.47;805715.27;3907
+3909;2001163646;B04001;HOMICIDIO TENTAD;RUA REGINO GONZA;11;95522;25/3/2001 18:33:00;POLICIAL MILITAR;N;SOL MILITAR REFO;JARDIM VITORIA;BH;617056.30;804188.87;3908
+3910;2001163677;B03000;AMEACA;RUA JOAQUIM CORR;14;57288;25/3/2001 18:47:00;CIDADAO COMUM;S;;CAMARGOS;BH;602174.27;794614.42;3909
+3911;2001163687;B03000;AMEACA;AV SANTA ALBERTI;200;116170;25/3/2001 18:54:00;CIDADAO COMUM;N;;CAETANO FURQUIM;BH;616505.24;799988.35;3910
+3912;2001163688;B03000;AMEACA;RUA MUNICIPAL;20;84239;25/3/2001 18:53:00;CIDADAO COMUM;S;CAC;RIO BRANCO;BH;606795.56;808729.34;3911
+3913;2001163709;B03000;AMEACA;RUA ALEXANDRE LE;27;50162;25/3/2001 19:04:00;CIDADAO COMUM;N;;ESTRELA DALVA;BH;607685.49;792465.04;3912
+3914;2001163727;B06000;LESAO CORPORAL;RUA DOS SALESIAN;680;9087;25/3/2001 19:13:00;CIDADAO COMUM;S;0;PLANALTO;BH;610416.78;805536.12;3913
+3915;2001163746;B06000;LESAO CORPORAL;AV DO CONTORNO;9530;17228;25/3/2001 19:24:00;CIDADAO COMUM;N;;BARRO PRETO;BH;609166.33;796740.91;3914
+3916;2001163767;B03000;AMEACA;AV MONTESE;1090;46675;25/3/2001 19:35:00;CIDADAO COMUM;S;;SANTA BRANCA;BH;607998.64;806599.40;3915
+3917;2001163773;B06000;LESAO CORPORAL;RUA BOM JESUS DA;250;99680;25/3/2001 19:34:00;CIDADAO COMUM;N;;SANTA TEREZINHA;BH;604196.12;802710.04;3916
+3918;2001163797;B03000;AMEACA;RUA TRES;86;300266;25/3/2001 19:51:00;CIDADAO COMUM;S;;VISTA DO SOL;BH;616379.13;804683.65;3917
+3919;2001163809;B03000;AMEACA;RUA SAO RAFAEL;138;63580;25/3/2001 19:58:00;CIDADAO COMUM;S;;FLORESTA;BH;612241.79;798264.50;3918
+3920;2001163825;B03000;AMEACA;RUA VINTE E SETE;191;33115;25/3/2001 20:05:00;CIDADAO COMUM;N;;CONJUNTO FELICID;BH;612303.47;807232.65;3919
+3921;2001163846;B04001;HOMICIDIO TENTAD;AV JOSE CANDIDO ;1200;12602;25/3/2001 20:15:00;INICIATIVA;N;0;UNIAO;BH;613277.34;800584.46;3920
+3922;2001163858;B06000;LESAO CORPORAL;RUA ALETES;134;2075;25/3/2001 20:20:00;CIDADAO COMUM;S;CAA;PINDORAMA;BH;602646.60;797535.96;3921
+3923;2001163859;B04001;HOMICIDIO TENTAD;RUA SETENTA E TR;25;124264;25/3/2001 20:21:00;CIDADAO COMUM;S;;JARDIM DOS COMER;BH;607860.04;811786.76;3922
+3924;2001163876;B03000;AMEACA;RUA NAVAJOS;393;47334;25/3/2001 20:27:00;CIDADAO COMUM;S;CASA 103;SANTA MONICA;BH;607322.84;807248.25;3923
+3925;2001163898;B03000;AMEACA;RUA ROCHA LAGOA;249;58990;25/3/2001 20:42:00;CIDADAO COMUM;N;CAA;CACHOEIRINHA;BH;609953.51;801281.16;3924
+3926;2001163963;B06000;LESAO CORPORAL;RUA DES BRAULIO;1235;19917;25/3/2001 21:11:00;CIDADAO COMUM;S;;VERA CRUZ;BH;616276.33;797850.05;3925
+3927;2001164004;B04001;HOMICIDIO TENTAD;RUA JULITA NOGUE;1000;39597;25/3/2001 21:31:00;CIDADAO COMUM;S;0;SANTA TEREZINHA;BH;604381.61;802818.36;3926
+3928;2001164012;B03000;AMEACA;RUA ANA SEVERINA;100;99955;25/3/2001 21:35:00;INICIATIVA;S;0;BRAUNAS;BH;603437.58;804941.90;3927
+3929;2001164056;B06000;LESAO CORPORAL;RUA MAUREA DE OL;215;117592;25/3/2001 21:50:00;CIDADAO COMUM;N;PROX.ORFANATO ST;VENDA NOVA;BH;607285.12;809101.82;3928
+3930;2001164061;B03000;AMEACA;RUA DOS TUPINAMB;518;69940;25/3/2001 21:56:00;CIDADAO COMUM;N;PX518;CENTRO (BH);BH;611073.31;797352.77;3929
+3931;2001164068;B04002;HOMICIDIO CONSUM;AV MARIA CONCEIC;1015;32052;25/3/2001 21:58:00;CIDADAO COMUM;N;CAB;GOIANIA;BH;615379.04;803475.97;3930
+3932;2001164083;B06000;LESAO CORPORAL;RUA CAMILO DE BR;636;11896;25/3/2001 22:08:00;CIDADAO COMUM;S;;PADRE EUSTAQUIO;BH;605855.99;798012.24;3931
+3933;2001164085;B03000;AMEACA;AV WALDOMIRO LOB;1220;66548;25/3/2001 22:08:00;CIDADAO COMUM;S;0;GUARANI;BH;612147.10;805326.19;3932
+3934;2001164094;B04001;HOMICIDIO TENTAD;RUA FLOR DE MAIO;447;300399;25/3/2001 22:12:00;INICIATIVA;S;0;VILA CAFEZAL;BH;614645.76;794817.74;3933
+3935;2001164110;B04001;HOMICIDIO TENTAD;AV DO CONTORNO;4052;17228;25/3/2001 22:19:00;CIDADAO COMUM;S;AP101;SAO LUCAS;BH;612793.97;795966.61;3934
+3936;2001164111;B03000;AMEACA;RUA INDUSTRIAL J;597;34477;25/3/2001 22:19:00;CIDADAO COMUM;S;A;NOVA GRANADA;BH;608020.74;794556.86;3935
+3937;2001164112;B03000;AMEACA;RUA GIBRALTAR;188;31223;25/3/2001 22:20:00;CIDADAO COMUM;N;PROX. A R:GUARAR;NOVO GLORIA;BH;603456.01;799013.92;3936
+3938;2001164146;B04001;HOMICIDIO TENTAD;RUA CONEGO TRIND;1445;16861;25/3/2001 22:39:00;CIDADAO COMUM;S;0;JARDIM LEBLON;BH;605675.61;808311.01;3937
+3939;2001164167;B03000;AMEACA;RUA SAO JOSE;400;63045;25/3/2001 22:56:00;CIDADAO COMUM;S;;NOVA CINTRA;BH;605876.86;794133.51;3938
+3940;2001164168;B03000;AMEACA;AV MENELICK DE C;205;30448;25/3/2001 22:57:00;CIDADAO COMUM;S;;FLAVIO MARQUES D;BH;604170.93;788789.23;3939
+3941;2001164264;B06000;LESAO CORPORAL;RUA SAO RODRIGUE;120;103420;25/3/2001 23:49:00;INICIATIVA;S;0;ANTONIO RIBEIRO ;BH;615617.05;805562.96;3940
+3942;2001164284;B03000;AMEACA;AV MANOEL GOMES;250;43103;26/3/2001 00:11:00;CIDADAO COMUM;S;0;NOVA CACHOEIRINH;BH;609668.41;801466.24;3941
+3943;2001164294;B03000;AMEACA;RUA ANTONIO VIEI;321;4925;26/3/2001 00:20:00;CIDADAO COMUM;S;0;GLALIJA;BH;603417.19;794194.43;3942
+3944;2001164434;B03000;AMEACA;RUA DIVINESIA;84;82199;26/3/2001 02:23:00;CIDADAO COMUM;S;;PROVIDENCIA;BH;612651.00;804712.28;3943
+3945;2001164499;B03000;AMEACA;PRACA CRISTO RED;50;18693;26/3/2001 04:15:00;CIDADAO COMUM;N;0;DAS INDUSTRIAS;BH;604707.83;790851.38;3944
+3946;2001164617;B06000;LESAO CORPORAL;AV AMAZONAS;1313;3140;26/3/2001 07:35:00;INICIATIVA;N;0;BARRO PRETO;BH;610339.94;796671.36;3945
+3947;2001164662;B03000;AMEACA;RUA DIVISA SANTA;260;21452;26/3/2001 08:07:00;CIDADAO COMUM;S;0;MILIONARIOS;BH;604225.39;790674.08;3946
+3948;2001164679;B03000;AMEACA;RUA CALDAS DA RA;855;61100;26/3/2001 08:15:00;CIDADAO COMUM;S;;SAO FRANCISCO;BH;609607.84;802228.80;3947
+3949;2001164717;B03000;AMEACA;RUA TEOFILO PIRE;117;67465;26/3/2001 08:36:00;CIDADAO COMUM;S;FU;BOA VISTA;BH;615282.49;800096.43;3948
+3950;2001164754;B03000;AMEACA;AV RAJA GABAGLIA;1740;57830;26/3/2001 09:02:00;CIDADAO COMUM;S;;MORRO DAS PEDRAS;BH;608719.62;793771.09;3949
+3951;2001164896;B03000;AMEACA;AV FLOR DE SEDA;781;748;26/3/2001 10:37:00;CIDADAO COMUM;S;0;LINDEIA;BH;599486.14;790600.03;3950
+3952;2001164927;B08000;VIOLACAO DE DOMI;RUA GUARATINGA;15;32282;26/3/2001 11:03:00;CIDADAO COMUM;S;;SION;BH;611644.45;793087.67;3951
+3953;2001164988;B03000;AMEACA;RUA VILA RICA;1795;71992;26/3/2001 11:48:00;CIDADAO COMUM;N;0;JARDIM MONTANHES;BH;606750.79;798775.44;3952
+3954;2001165099;B06000;LESAO CORPORAL;RUA JOSUE AZEVED;10;56487;26/3/2001 13:17:00;CIDADAO COMUM;S;0;PLANALTO;BH;610223.03;806345.30;3953
+3955;2001165108;B03000;AMEACA;RUA PEDRA DO IND;75;32774;26/3/2001 13:24:00;CIDADAO COMUM;N;;CANDELARIA;BH;608469.25;808762.11;3954
+3956;2001165115;B06000;LESAO CORPORAL;RUA DURVALIA;65;115704;26/3/2001 13:26:00;CIDADAO COMUM;N;;HAVAI;BH;607425.30;793431.31;3955
+3957;2001165160;B03000;AMEACA;AV SANTOS DUMONT;260;61950;26/3/2001 13:55:00;CIDADAO COMUM;N;PX262;CENTRO (BH);BH;611389.56;797503.41;3956
+3958;2001165167;B06000;LESAO CORPORAL;RUA CHEIK NAGIB ;205;52892;26/3/2001 14:00:00;POLICIAL MILITAR;S;0;JARDIM ATLANTICO;BH;607950.82;805633.54;3957
+3959;2001165259;B03000;AMEACA;RUA VIANA DO CAS;490;63640;26/3/2001 15:05:00;CIDADAO COMUM;N;;SAO FRANCISCO;BH;609580.11;801875.33;3958
+3960;2001165331;B06000;LESAO CORPORAL;AV AMAZONAS;555;3140;26/3/2001 15:47:00;CIDADAO COMUM;S;0;CENTRO (BH);BH;611012.14;797068.58;3959
+3961;2001165381;B03000;AMEACA;RUA SEBASTIAO MO;409;93555;26/3/2001 16:19:00;INICIATIVA;S;0;TIROL;BH;600565.02;789378.17;3960
+3962;2001165452;B06000;LESAO CORPORAL;RUA DAVIDSON PIM;53;124189;26/3/2001 16:54:00;CIDADAO COMUM;S;;JARDIM DOS COMER;BH;607054.62;811628.39;3961
+3963;2001165537;B06000;LESAO CORPORAL;RUA GUARDA CUSTO;143;32330;26/3/2001 17:43:00;CIDADAO COMUM;N;0;OURO PRETO;BH;606669.33;802899.77;3962
+3964;2001165544;B03000;AMEACA;RUA SEIS;289;21465;26/3/2001 17:47:00;CIDADAO COMUM;S;0;FLAVIO MARQUES D;BH;604570.80;788685.75;3963
+3965;2001165604;B03000;AMEACA;RUA DONA LUCI;74;86004;26/3/2001 18:17:00;INICIATIVA;S;0;CINQUENTENARIO;BH;606844.52;791890.31;3964
+3966;2001165647;B03000;AMEACA;RUA JAVARI;1176;37204;26/3/2001 18:41:00;CIDADAO COMUM;S;0;RENASCENCA;BH;610764.64;800500.36;3965
+3967;2001165791;B03000;AMEACA;RUA COLETORA A;219;103780;26/3/2001 19:41:00;CIDADAO COMUM;S;;PETROPOLIS;BH;601557.17;786612.31;3966
+3968;2001165812;B06000;LESAO CORPORAL;RUA SAO JOAQUIM;1189;62940;26/3/2001 19:58:00;CIDADAO COMUM;S;;SAGRADA FAMILIA;BH;613255.69;799389.27;3967
+3969;2001165838;B03000;AMEACA;RUA MADRE TEREZA;264;96594;26/3/2001 20:11:00;CIDADAO COMUM;N;0;JARDIM EUROPA;BH;608301.76;809616.81;3968
+3970;2001165845;B03000;AMEACA;RUA 1;100;300686;26/3/2001 20:18:00;CIDADAO COMUM;S;0;JARDIM DOS COMER;BH;607517.47;811158.32;3969
+3971;2001165865;B06000;LESAO CORPORAL;AV DOS ENGENHEIR;570;103027;26/3/2001 20:27:00;CIDADAO COMUM;N;AP204;CONJUNTO ALIPIO ;BH;604325.61;800713.15;3970
+3972;2001165906;B06000;LESAO CORPORAL;RUA PADRE BELCHI;323;51240;26/3/2001 20:54:00;INICIATIVA;S;0;CENTRO (BH);BH;610835.72;796709.76;3971
+3973;2001166016;B06000;LESAO CORPORAL;RUA BOLIVAR;206;9871;26/3/2001 22:09:00;CIDADAO COMUM;N;;UNIAO;BH;612670.70;801380.95;3972
+3974;2001166068;B03000;AMEACA;RUA JOAO CANDIDO;30;93240;26/3/2001 22:37:00;INICIATIVA;S;0;INDEPENDENCIA;BH;601117.42;785918.74;3973
+3975;2001166095;B03000;AMEACA;RUA NOVA FRIBURG;389;48438;26/3/2001 22:55:00;CIDADAO COMUM;S;0;SENHOR BOM JESUS;BH;609623.52;799755.41;3974
+3976;2001166131;B03000;AMEACA;RUA DOS BOROROS;58;10216;26/3/2001 23:15:00;CIDADAO COMUM;N;0;SANTA MONICA;BH;606568.60;807503.10;3975
+3977;2001166142;B03000;AMEACA;RUA JOAO BATISTA;10;97745;26/3/2001 23:21:00;CIDADAO COMUM;S;0;DOM SILVERIO;BH;614734.92;804019.88;3976
+3978;2001166237;B03000;AMEACA;RUA EXPEDICIONAR;119;27068;27/3/2001 00:38:00;CIDADAO COMUM;N;0;ADELAIDE;BH;607311.27;798455.73;3977
+3979;2001166301;B03000;AMEACA;RUA CHAFARIZ;101;300275;27/3/2001 01:46:00;CIDADAO COMUM;S;;HAVAI;BH;607375.81;793751.13;3978
+3980;2001166424;B04001;HOMICIDIO TENTAD;RUA CABROBO;179;11187;27/3/2001 03:42:00;CIDADAO COMUM;S;0;SAGRADA FAMILIA;BH;613152.24;799131.49;3979
+3981;2001166592;B03000;AMEACA;RUA CURITIBA;34;19090;27/3/2001 08:02:00;INICIATIVA;S;0;CENTRO BH;BH;610999.16;797826.98;3980
+3982;2001166788;B03000;AMEACA;RUA DARIO FARIA ;172;39240;27/3/2001 09:52:00;CIDADAO COMUM;S;;DAS INDUSTRIAS;BH;604413.16;792527.74;3981
+3983;2001166852;B03000;AMEACA;RUA RIO NEGRO;490;58804;27/3/2001 10:37:00;CIDADAO COMUM;S;;BARROCA;BH;608240.20;796055.77;3982
+3984;2001166886;B03000;AMEACA;AV PRESIDENTE CA;3001;55125;27/3/2001 10:53:00;POLICIAL MILITAR;S;0;CAICARA;BH;608178.06;800324.32;3983
+3985;2001166925;B03000;AMEACA;RUA INES GLANSMA;880;34511;27/3/2001 11:20:00;CIDADAO COMUM;S;;ANTONIO RIBEIRO ;BH;615208.26;807133.98;3984
+3986;2001166932;B03000;AMEACA;RUA MARIA DO CAR;15;83236;27/3/2001 11:24:00;CIDADAO COMUM;S;0;SANTA CRUZ (BARR;BH;603386.16;789142.95;3985
+3987;2001167019;B03000;AMEACA;RUA GUANABARA;714;32040;27/3/2001 12:16:00;CIDADAO COMUM;S;0;CONCORDIA;BH;611362.74;799465.31;3986
+3988;2001167193;B06000;LESAO CORPORAL;RUA MOEMA;384;46070;27/3/2001 14:16:00;CIDADAO COMUM;N;0;PADRE EUSTAQUIO;BH;606492.20;797861.20;3987
+3989;2001167241;B04002;HOMICIDIO CONSUM;BECO PAI JOAQUIM;251;171056;27/3/2001 14:43:00;CIDADAO COMUM;N;;CABANA;BH;604642.25;793982.11;3988
+3990;2001167247;B03000;AMEACA;RUA DA PAZ;30;31236;27/3/2001 14:46:00;CIDADAO COMUM;S;;CONJ HAB JARDIM ;BH;603953.08;798167.57;3989
+3991;2001167277;B03000;AMEACA;RUA HUMBERTO ROD;31;15480;27/3/2001 15:01:00;CIDADAO COMUM;N;CAFU;GOIANIA;BH;615645.47;803559.43;3990
+3992;2001167280;B06000;LESAO CORPORAL;RUA SERGIO MIRAN;47;80644;27/3/2001 15:03:00;CIDADAO COMUM;S;;OURO PRETO;BH;606189.60;801803.75;3991
+3993;2001167507;B03000;AMEACA;RUA DOS CAETES;657;11376;27/3/2001 17:10:00;POLICIAL MILITAR;N;0;CENTRO (BH);BH;610996.07;797471.77;3992
+3994;2001167580;B04001;HOMICIDIO TENTAD;ESTRADA DO CERCA;2350;26428;27/3/2001 17:45:00;CIDADAO COMUM;N;0;JARDIM AMERICA;BH;607601.11;793409.02;3993
+3995;2001167669;B03000;AMEACA;RUA SAO SALVADOR;46;63612;27/3/2001 18:31:00;CIDADAO COMUM;S;AP001;BONFIM;BH;610151.37;797963.59;3994
+3996;2001167896;B06000;LESAO CORPORAL;BECO TIA ANASTAC;25;301677;27/3/2001 20:22:00;CIDADAO COMUM;S;0;FAZENDINHA;BH;614673.21;795432.98;3995
+3997;2001167906;B03000;AMEACA;RUA FLOR DE VIDR;20;13504;27/3/2001 20:26:00;CIDADAO COMUM;S;AGUARDA NO FINAL;CASTELO;BH;605624.05;799447.30;3996
+3998;2001167922;B04001;HOMICIDIO TENTAD;AV PORTUGAL;3009;54816;27/3/2001 20:39:00;INICIATIVA;S;0;JARDIM ATLANTICO;BH;605742.12;805959.60;3997
+3999;2001167934;B03000;AMEACA;RODOVIA MGT 262;300;26598;27/3/2001 20:44:00;CIDADAO COMUM;S;;VILA BRASILIA;BH;614660.37;803506.34;3998
+4000;2001167943;B02000;RIXA;AV PRUDENTE DE M;720;55774;27/3/2001 20:51:00;CIDADAO COMUM;S;AP501;CORACAO DE JESUS;BH;610001.43;794654.44;3999
+4001;2001167958;B03000;AMEACA;RUA ENEIDA;328;25494;27/3/2001 21:03:00;CIDADAO COMUM;S;;PATROCINIO;BH;603602.88;799173.27;4000
+4002;2001167977;B03000;AMEACA;RUA ADAO MACIEL;185;106429;27/3/2001 21:15:00;CIDADAO COMUM;S;0;PRIMEIRO DE NOVE;BH;612581.61;805228.97;4001
+4003;2001167993;B06000;LESAO CORPORAL;RUA MARIA AMELIA;841;43812;27/3/2001 21:29:00;CIDADAO COMUM;S;;SAO BERNARDO;BH;610257.12;805510.06;4002
+4004;2001168075;B04001;HOMICIDIO TENTAD;RUA XINGU;560;73871;27/3/2001 22:21:00;CIDADAO COMUM;S;0;SANTA LUCIA;BH;609764.51;791271.71;4003
+4005;2001168080;B03000;AMEACA;RUA MARIA DE LOU;344;50540;27/3/2001 22:24:00;CIDADAO COMUM;N;0;DAS INDUSTRIAS;BH;604339.53;792318.45;4004
+4006;2001168087;B06000;LESAO CORPORAL;RUA JACUI;3930;36734;27/3/2001 22:32:00;CIDADAO COMUM;S;;IPIRANGA;BH;611988.07;801551.26;4005
+4007;2001168118;B06000;LESAO CORPORAL;RUA BOM JESUS DO;39;42012;27/3/2001 22:46:00;CIDADAO COMUM;N;CAFRENT;CAMPO ALEGRE;BH;610264.60;806691.71;4006
+4008;2001168179;B04001;HOMICIDIO TENTAD;BECO LORENCO SIL;127;302105;27/3/2001 23:17:00;CIDADAO COMUM;N;;JARDIM LEBLON;BH;605675.37;807168.57;4007
+4009;2001168190;B03000;AMEACA;RUA PROCOPIO FER;153;92552;27/3/2001 23:22:00;CIDADAO COMUM;S;;CALIFORNIA;BH;603463.88;796859.04;4008
+4010;2001168195;B06000;LESAO CORPORAL;RUA JORNALISTA D;65;122810;27/3/2001 23:23:00;CIDADAO COMUM;S;;BELVEDERE;BH;610550.50;791457.63;4009
+4011;2001168232;B05000;SEQUESTRO E CARC;AV BRAULIO GOMES;1453;81710;27/3/2001 23:46:00;CIDADAO COMUM;N;0;TIROL;BH;599864.95;789210.47;4010
+4012;2001168235;B03000;AMEACA;RUA ITAMBACURI;291;35570;27/3/2001 23:46:00;CIDADAO COMUM;S;;CARLOS PRATES;BH;608250.07;797536.60;4011
+4013;2001168245;B06000;LESAO CORPORAL;AV SANTOS DUMONT;574;61950;27/3/2001 23:52:00;INICIATIVA;S;0;CENTRO BH;BH;611085.24;797586.10;4012
+4014;2001168246;B03000;AMEACA;RUA CALAFATE;35;24044;27/3/2001 23:51:00;CIDADAO COMUM;N;;TAQUARIL;BH;617670.37;797320.52;4013
+4015;2001168283;B06000;LESAO CORPORAL;RUA CORNELIO CER;23;17417;28/3/2001 00:29:00;CIDADAO COMUM;S;;PADRE EUSTAQUIO;BH;606440.81;797810.81;4014
+4016;2001168289;B03000;AMEACA;RUA FLORALIA;40;28883;28/3/2001 00:32:00;INICIATIVA;S;0;ANCHIETA;BH;612042.63;794110.01;4015
+4017;2001168303;B03000;AMEACA;RUA JOAO DE MATO;6;37800;28/3/2001 00:47:00;CIDADAO COMUM;N;FR;IPIRANGA;BH;611683.83;800766.83;4016
+4018;2001168318;B03000;AMEACA;RUA CONCEICAO OL;275;108579;28/3/2001 01:05:00;CIDADAO COMUM;S;0;VILA SANTO ANTON;BH;609315.71;808212.65;4017
+4019;2001168326;B03000;AMEACA;AV VILARINHOS;1271;109988;28/3/2001 01:11:00;INICIATIVA;N;0;VENDA NOVA;BH;608853.02;808991.96;4018
+4020;2001168350;B04001;HOMICIDIO TENTAD;AV SILVIANO BRAN;2301;66002;28/3/2001 01:34:00;CIDADAO COMUM;S;;HORTO;BH;613485.88;798221.24;4019
+4021;2001168379;B03000;AMEACA;RUA AUGUSTA ANDR;1163;99104;28/3/2001 02:02:00;CIDADAO COMUM;S;;JAQUELINE;BH;611767.30;810612.10;4020
+4022;2001168393;B03000;AMEACA;RUA DO BATISMO;493;8390;28/3/2001 02:19:00;CIDADAO COMUM;N;;SAO JOSE;BH;605325.95;798900.22;4021
+4023;2001168607;B03000;AMEACA;RUA RADIALISTA A;120;122445;28/3/2001 07:54:00;CIDADAO COMUM;N;;CEU AZUL;BH;604759.99;808626.41;4022
+4024;2001168620;B03000;AMEACA;BECO SANTA CATAR;26;170255;28/3/2001 07:59:00;CIDADAO COMUM;S;FU;CABANA;BH;604766.78;794259.59;4023
+4025;2001168649;B03000;AMEACA;RUA JOAO ANTONIO;160;122054;28/3/2001 08:17:00;CIDADAO COMUM;S;;JARDIM DOS COMER;BH;607884.02;810802.11;4024
+4026;2001168712;B03000;AMEACA;AV FRANCISCO SA;334;29656;28/3/2001 08:55:00;CIDADAO COMUM;S;0;PRADO;BH;608934.20;796443.88;4025
+4027;2001168746;B03000;AMEACA;RUA SAO FELICISS;153;62373;28/3/2001 09:09:00;INICIATIVA;S;0;ESTRELA DO ORIEN;BH;605823.49;792412.58;4026
+4028;2001168771;B03000;AMEACA;AV BRIGADEIRO ED;1921;2860;28/3/2001 09:23:00;CIDADAO COMUM;S;0;PATROCINIO;BH;603691.51;799509.80;4027
+4029;2001168810;B09000;ABANDONO DE INCA;RUA CAMILO PRATE;35;11915;28/3/2001 09:47:00;CIDADAO COMUM;N;CAA;UNIAO;BH;613017.76;801351.18;4028
+4030;2001168828;B03000;AMEACA;RUA TOME DE SOUZ;248;67998;28/3/2001 09:56:00;CIDADAO COMUM;N;;FUNCIONARIOS;BH;612136.30;795032.33;4029
+4031;2001168833;B06000;LESAO CORPORAL;AV SARAMENHA;354;64007;28/3/2001 10:00:00;INICIATIVA;S;0;FLORAMAR;BH;612099.17;805663.93;4030
+4032;2001169124;B06000;LESAO CORPORAL;RUA PADRE EUSTAQ;2232;51294;28/3/2001 13:34:00;CIDADAO COMUM;S;;PADRE EUSTAQUIO;BH;607452.58;797649.52;4031
+4033;2001169162;B03000;AMEACA;AV NELIO CERQUEI;15;72359;28/3/2001 14:05:00;CIDADAO COMUM;S;UNIDADE DE URGEN;TIROL;BH;600947.66;789885.51;4032
+4034;2001169278;B03000;AMEACA;RUA ANTONIO JOSE;67;4635;28/3/2001 15:10:00;CIDADAO COMUM;S;201;CAICARA;BH;607554.63;800226.83;4033
+4035;2001169311;B03000;AMEACA;AV AFONSO PENA;1452;1259;28/3/2001 15:28:00;CIDADAO COMUM;N;;CENTRO (BH);BH;611506.40;796458.35;4034
+4036;2001169314;B04002;HOMICIDIO CONSUM;RUA GONCALVES MA;25;31567;28/3/2001 15:31:00;CIDADAO COMUM;N;;SANTA MONICA;BH;607990.26;807452.46;4035
+4037;2001169339;B06000;LESAO CORPORAL;RUA RADIALISTA P;120;98909;28/3/2001 15:44:00;CIDADAO COMUM;S;;CEU AZUL;BH;604177.44;808465.20;4036
+4038;2001169403;B03000;AMEACA;RUA JOSE BARTOLO;129;38525;28/3/2001 16:19:00;CIDADAO COMUM;S;0;CONJUNTO ALIPIO ;BH;603704.00;799565.04;4037
+4039;2001169447;B03000;AMEACA;RUA BARAO DE GUA;260;7923;28/3/2001 16:50:00;CIDADAO COMUM;S;AP04;JOAO PINHEIRO;BH;604824.14;796178.48;4038
+4040;2001169462;B03000;AMEACA;RUA POUSO ALEGRE;538;54932;28/3/2001 16:56:00;CIDADAO COMUM;S;0;FLORESTA;BH;611588.94;797985.47;4039
+4041;2001169483;B03000;AMEACA;RUA AVEIRO;865;60715;28/3/2001 17:07:00;CIDADAO COMUM;S;;SAO FRANCISCO;BH;608907.00;801541.82;4040
+4042;2001169527;B03000;AMEACA;RUA ERNESTO TOGN;83;129850;28/3/2001 17:37:00;CIDADAO COMUM;S;;GORDURAS;BH;616434.31;803881.80;4041
+4043;2001169558;B03000;AMEACA;RUA CAMBOATA;90;106230;28/3/2001 17:53:00;CIDADAO COMUM;S;;PATROCINIO;BH;605068.16;794132.71;4042
+4044;2001169597;B03000;AMEACA;RUA INDEPENDENCI;1009;34391;28/3/2001 18:15:00;CIDADAO COMUM;S;;CABANA;BH;605985.71;793145.38;4043
+4045;2001169603;B03000;AMEACA;RUA DONA LUIZA;600;22947;28/3/2001 18:20:00;CIDADAO COMUM;N;BL L,APTO 303;MILIONARIOS;BH;604360.74;789993.13;4044
+4046;2001169616;B03000;AMEACA;RUA ALVARES RUBI;98;2769;28/3/2001 18:28:00;INICIATIVA;N;0;TUPI;BH;612206.64;806160.80;4045
+4047;2001169636;B03000;AMEACA;RUA SAFIRA;95;59835;28/3/2001 18:44:00;CIDADAO COMUM;S;;PRADO;BH;608617.43;796702.89;4046
+4048;2001169681;B03000;AMEACA;RODOVIA BRASILIA;80;124400;28/3/2001 19:05:00;INICIATIVA;N;0;SAO BENEDITO (SL;SL;610627.87;810496.47;4047
+4049;2001169694;B03000;AMEACA;RUA ISLANDIA;25;83683;28/3/2001 19:10:00;CIDADAO COMUM;N;;JARDIM EUROPA;BH;607785.96;810027.21;4048
+4050;2001169699;B03000;AMEACA;RUA JACAREI;123;36586;28/3/2001 19:11:00;CIDADAO COMUM;S;0;PIRATININGA;BH;606579.01;809587.17;4049
+4051;2001169844;B06000;LESAO CORPORAL;RUA MARECHAL RON;186;43677;28/3/2001 20:28:00;CIDADAO COMUM;S;;PRIMEIRO DE MAIO;BH;611903.65;803402.26;4050
+4052;2001169849;B03000;AMEACA;RUA MONTE VIRGIN;295;46587;28/3/2001 20:31:00;INICIATIVA;S;0;MINASLANDIA;BH;612149.14;804944.69;4051
+4053;2001169914;B06000;LESAO CORPORAL;RUA CARMEM MIRAN;35;13605;28/3/2001 21:03:00;CIDADAO COMUM;S;0;TUPI;BH;612518.22;806227.57;4052
+4054;2001169921;B03000;AMEACA;RUA SANTA CLARA ;159;49295;28/3/2001 21:12:00;CIDADAO COMUM;S;;MINASLANDIA;BH;611739.23;804154.31;4053
+4055;2001169989;B03000;AMEACA;RUA VILA REAL;904;60683;28/3/2001 21:56:00;CIDADAO COMUM;S;;SAO FRANCISCO;BH;609535.45;801659.70;4054
+4056;2001170010;B03000;AMEACA;RUA JAIME SALSE;278;36848;28/3/2001 22:13:00;INICIATIVA;S;0;MAGNESITA;BH;604022.14;793879.98;4055
+4057;2001170051;B03000;AMEACA;RUA CASABLANCA;839;13850;28/3/2001 22:41:00;CIDADAO COMUM;N;CAB;SANTA TEREZINHA;BH;604208.62;803104.88;4056
+4058;2001170094;B09000;ABANDONO DE INCA;RUA A;135;99489;28/3/2001 23:05:00;CIDADAO COMUM;S;0;ANTONIO RIBEIRO ;BH;614971.05;808005.92;4057
+4059;2001170095;B06000;LESAO CORPORAL;RUA GUARATINGUET;87;32295;28/3/2001 23:08:00;CIDADAO COMUM;S;0;GUARANI;BH;612643.64;805626.34;4058
+4060;2001170096;B06000;LESAO CORPORAL;RUA DOS VIOLINOS;135;101797;28/3/2001 23:07:00;CIDADAO COMUM;S;0;CH CALIFORNIA;BH;603865.45;796695.57;4059
+4061;2001170160;B04001;HOMICIDIO TENTAD;RUA FELIPE CAMAR;12;27938;28/3/2001 23:48:00;CIDADAO COMUM;N;0;ESPLANADA;BH;613862.69;798419.73;4060
+4062;2001170163;B03000;AMEACA;RUA DO CARMO;170;13646;28/3/2001 23:51:00;CIDADAO COMUM;S;0;ITAIPU BH;BH;599008.41;789438.00;4061
+4063;2001170278;B06000;LESAO CORPORAL;RUA ANTONIO DE A;156;4345;29/3/2001 01:43:00;INICIATIVA;N;0;FUNCIONARIOS;BH;611821.42;794964.79;4062
+4064;2001170285;B06000;LESAO CORPORAL;PRACA DUQUE DE C;39;24145;29/3/2001 01:54:00;CIDADAO COMUM;S;0;SANTA TEREZA;BH;613405.86;797477.21;4063
+4065;2001170301;B03000;AMEACA;RUA FLOR DO ORIE;398;50190;29/3/2001 02:21:00;CIDADAO COMUM;S;;JARDIM MONTANHES;BH;606173.97;799884.28;4064
+4066;2001170313;B03000;AMEACA;RUA ESTADOS UNID;271;26239;29/3/2001 02:36:00;CIDADAO COMUM;S;;COPACABANA;BH;606171.40;806197.79;4065
+4067;2001170328;B02000;RIXA;RUA DOS CAETES;409;11376;29/3/2001 02:52:00;CIDADAO COMUM;S;PX409;CENTRO (BH);BH;611212.90;797410.52;4066
+4068;2001170385;B06000;LESAO CORPORAL;RUA JUAZEIRO DO ;8;64873;29/3/2001 04:16:00;CIDADAO COMUM;N;0;ANTONIO RIBEIRO ;BH;615003.76;806779.18;4067
+4069;2001170507;B03000;AMEACA;RUA OTAVIANO NEV;235;94517;29/3/2001 07:16:00;CIDADAO COMUM;N;AP601;OURO PRETO;BH;606299.39;801104.52;4068
+4070;2001170640;B06000;LESAO CORPORAL;RUA JACUI;1131;36734;29/3/2001 08:36:00;CIDADAO COMUM;N;;CONCORDIA;BH;611706.90;799025.84;4069
+4071;2001170642;B03000;AMEACA;RUA SAO JOAO DE ;36;110073;29/3/2001 08:35:00;CIDADAO COMUM;N;0;PILAR;BH;607619.96;788690.43;4070
+4072;2001170910;B06000;LESAO CORPORAL;RUA GONCALVES DI;1116;31513;29/3/2001 11:38:00;INICIATIVA;N;0;FUNCIONARIOS;BH;611468.71;795788.77;4071
+4073;2001171007;B03000;AMEACA;RUA OSORIO DUQUE;102;128136;29/3/2001 12:45:00;CIDADAO COMUM;S;;CAMPO ALEGRE;BH;610441.32;806709.79;4072
+4074;2001171073;B06000;LESAO CORPORAL;RUA MONTE ALEGRE;28;46357;29/3/2001 13:33:00;INICIATIVA;S;0;SERRA;BH;612538.37;795198.21;4073
+4075;2001171095;B03000;AMEACA;RUA C;53;102503;29/3/2001 13:47:00;CIDADAO COMUM;N;0;INDEPENDENCIA;BH;601649.58;786316.25;4074
+4076;2001171102;B06000;LESAO CORPORAL;RUA ITABIRA;493;35237;29/3/2001 13:56:00;CIDADAO COMUM;N;;LAGOINHA;BH;610931.11;798451.36;4075
+4077;2001171104;B06000;LESAO CORPORAL;RUA JOAO CAMPOS;114;48019;29/3/2001 13:58:00;CIDADAO COMUM;N;;CASTANHEIRA 2;BH;601623.61;788750.02;4076
+4078;2001171119;B06000;LESAO CORPORAL;RUA SERRINHA;53;129201;29/3/2001 14:07:00;CIDADAO COMUM;N;;MANGUEIRAS;BH;600519.25;786719.95;4077
+4079;2001171125;B06000;LESAO CORPORAL;RUA SAO DOMINGOS;360;62332;29/3/2001 14:10:00;CIDADAO COMUM;S;AP01;SANTO ANTONIO;BH;611078.05;794339.79;4078
+4080;2001171137;B03000;AMEACA;RUA RUBI;486;59517;29/3/2001 14:13:00;INICIATIVA;S;0;PRADO;BH;608575.67;796298.16;4079
+4081;2001171180;B03000;AMEACA;RUA DOS GUAJAJAR;496;32037;29/3/2001 14:37:00;CIDADAO COMUM;N;;LOURDES;BH;611128.51;796461.69;4080
+4082;2001171302;B03000;AMEACA;RUA SAO RAFAEL;138;63580;29/3/2001 15:38:00;CIDADAO COMUM;S;;FLORESTA;BH;612241.79;798264.50;4081
+4083;2001171305;B03000;AMEACA;RUA MERCEDES LUI;519;45483;29/3/2001 15:39:00;CIDADAO COMUM;S;;PIRAJA;BH;613947.54;803042.92;4082
+4084;2001171354;B03000;AMEACA;RUA DAS ARTEMISI;292;6091;29/3/2001 16:00:00;INICIATIVA;S;0;PARQUE SAO JOSE;BH;606852.54;792578.14;4083
+4085;2001171357;B06000;LESAO CORPORAL;AV JOAO PINHEIRO;467;37853;29/3/2001 16:01:00;CIDADAO COMUM;S;AP203;FUNCIONARIOS;BH;611292.51;796021.38;4084
+4086;2001171376;B03000;AMEACA;RUA NUNES VIEIRA;227;48932;29/3/2001 16:09:00;CIDADAO COMUM;S;POSTO MENINI DE ;SANTO ANTONIO;BH;610298.96;794576.25;4085
+4087;2001171419;B03000;AMEACA;RUA CAMILO PRATE;255;11915;29/3/2001 16:32:00;CIDADAO COMUM;N;CA3;UNIAO;BH;613231.52;801243.96;4086
+4088;2001171447;B03000;AMEACA;RUA HORIZONTE;375;33405;29/3/2001 16:53:00;CIDADAO COMUM;S;FR1661;PARAISO;BH;614681.90;796440.16;4087
+4089;2001171451;B06000;LESAO CORPORAL;RUA SATELITE;411;64076;29/3/2001 16:54:00;CIDADAO COMUM;S;;ADELAIDE;BH;607421.50;799006.29;4088
+4090;2001171470;B03000;AMEACA;RUA DES BRAULIO;1670;19917;29/3/2001 17:04:00;CIDADAO COMUM;N;0;VERA CRUZ;BH;616312.54;797548.95;4089
+4091;2001171499;B03000;AMEACA;RUA TEREZOPOLIS;65;26140;29/3/2001 17:15:00;CIDADAO COMUM;S;;TAQUARIL;BH;617459.03;797908.71;4090
+4092;2001171517;B06000;LESAO CORPORAL;RUA GUIA LOBO;30;32430;29/3/2001 17:24:00;CIDADAO COMUM;S;;ARAGUAIA;BH;604560.55;789502.59;4091
+4093;2001171567;B06000;LESAO CORPORAL;PRACA DA LIBERDA;87;40870;29/3/2001 17:51:00;INICIATIVA;N;0;LOURDES;BH;611248.83;795658.19;4092
+4094;2001171622;B06000;LESAO CORPORAL;RUA DOM SEBASTIA;576;22455;29/3/2001 18:21:00;CIDADAO COMUM;N;;COPACABANA;BH;605770.79;806817.25;4093
+4095;2001171623;B06000;LESAO CORPORAL;RUA COSTA MACHAD;402;18334;29/3/2001 18:20:00;CIDADAO COMUM;S;;UNIVERSITARIO;BH;610772.74;802837.58;4094
+4096;2001171630;B06000;LESAO CORPORAL;RUA PAULO TIMOTE;175;41918;29/3/2001 18:25:00;CIDADAO COMUM;S;;VILA HUMAITA;BH;610336.11;801567.61;4095
+4097;2001171682;B03000;AMEACA;RUA DOS INDUSTRI;1247;34480;29/3/2001 18:50:00;CIDADAO COMUM;S;;DAS INDUSTRIAS;BH;605216.21;791703.04;4096
+4098;2001171691;B06000;LESAO CORPORAL;RUA PARANAN;401;52271;29/3/2001 18:55:00;CIDADAO COMUM;N;FU;BONSUCESSO;BH;605204.95;790235.82;4097
+4099;2001171802;B03000;AMEACA;RUA HOFFMAN;80;33320;29/3/2001 19:37:00;CIDADAO COMUM;S;;SANTA CRUZ (BARR;BH;603694.24;789400.31;4098
+4100;2001171878;B06000;LESAO CORPORAL;RUA SAO TOMAS DE;787;63782;29/3/2001 20:29:00;CIDADAO COMUM;S;;MORRO DO PAPAGAI;BH;610797.04;793270.28;4099
+4101;2001171901;B03000;AMEACA;RUA DR BROCHADO;103;23215;29/3/2001 20:43:00;CIDADAO COMUM;N;CA55;VERA CRUZ;BH;615814.74;798592.95;4100
+4102;2001172111;B06000;LESAO CORPORAL;AV PRESIDENTE AN;2873;4461;29/3/2001 22:51:00;CIDADAO COMUM;S;0;CACHOEIRINHA;BH;609839.13;800672.59;4101
+4103;2001172118;B06000;LESAO CORPORAL;RUA PATRICIO BAR;159;106661;29/3/2001 22:56:00;CIDADAO COMUM;N;;CH CALIFORNIA DO;BH;603497.76;797154.52;4102
+4104;2001172134;B03000;AMEACA;RUA CONSELHEIRO ;2957;17095;29/3/2001 23:08:00;INICIATIVA;S;0;SANTA EFIGENIA;BH;614206.34;797690.26;4103
+4105;2001172324;B06000;LESAO CORPORAL;RUA NUMA NOGUEIR;111;48920;30/3/2001 01:07:00;CIDADAO COMUM;S;0;FLORAMAR;BH;611850.13;806046.56;4104
+4106;2001172327;B08000;VIOLACAO DE DOMI;RUA SESSENTA E U;161;33689;30/3/2001 01:11:00;CIDADAO COMUM;N;;CONJUNTO FELICID;BH;612458.15;806921.58;4105
+4107;2001172331;B03000;AMEACA;RUA FERNAO DIAS;1223;28133;30/3/2001 01:15:00;CIDADAO COMUM;S;0;VERA CRUZ;BH;616164.18;797853.81;4106
+4108;2001172372;B06000;LESAO CORPORAL;RUA SERGIPE;1456;64961;30/3/2001 01:45:00;CIDADAO COMUM;S;;FUNCIONARIOS;BH;611092.98;794935.73;4107
+4109;2001172427;B03000;AMEACA;RUA ARACAJU;169;5275;30/3/2001 02:52:00;CIDADAO COMUM;N;;SANTO ANDRE;BH;609468.69;799249.95;4108
+4110;2001172428;B06000;LESAO CORPORAL;AV GETULIO VARGA;263;81256;30/3/2001 02:52:00;CIDADAO COMUM;N;PX263;FUNCIONARIOS;BH;612405.05;795576.33;4109
+4111;2001172518;B04001;HOMICIDIO TENTAD;RUA SANTO AGOSTI;1271;61557;30/3/2001 05:29:00;CIDADAO COMUM;N;;INSTITUTO AGRONO;BH;613648.90;799370.40;4110
+4112;2001172710;B03000;AMEACA;RUA SALINAS;2113;59992;30/3/2001 08:43:00;CIDADAO COMUM;N;;SANTA TEREZA;BH;613571.20;797710.20;4111
+4113;2001172712;B06000;LESAO CORPORAL;AV BIAS FORTES;1772;9553;30/3/2001 08:45:00;CIDADAO COMUM;S;PX1772;BARRO PRETO;BH;610196.72;797244.85;4112
+4114;2001172843;B06000;LESAO CORPORAL;BECO CARTOLA;10;301689;30/3/2001 10:01:00;CIDADAO COMUM;S;;VILA CAFEZAL;BH;614408.03;795249.56;4113
+4115;2001172891;B03000;AMEACA;RUA DAS CLARINET;75;9119;30/3/2001 10:35:00;CIDADAO COMUM;S;;CH CALIFORNIA;BH;603994.02;796604.11;4114
+4116;2001173002;B03000;AMEACA;RUA IRIBA;276;35007;30/3/2001 11:51:00;CIDADAO COMUM;N;;CACHOEIRINHA;BH;610507.65;800899.30;4115
+4117;2001173075;B06000;LESAO CORPORAL;RUA ANTONIO TEIX;2056;119037;30/3/2001 12:48:00;CIDADAO COMUM;S;;TEIXEIRA DIAS;BH;603154.87;789443.56;4116
+4118;2001173132;B03000;AMEACA;AV DOM PEDRO II;3249;53145;30/3/2001 13:19:00;CIDADAO COMUM;S;;ADELAIDE;BH;607698.05;797913.20;4117
+4119;2001173160;B03000;AMEACA;RUA RAMIRO SIQUE;165;128858;30/3/2001 13:34:00;CIDADAO COMUM;S;0;CASTANHEIRAS (TA;BH;617702.63;797351.00;4118
+4120;2001173205;B06000;LESAO CORPORAL;RUA TEREZINHA FR;155;105136;30/3/2001 14:01:00;CIDADAO COMUM;S;0;DAS INDUSTRIAS;BH;605492.99;791083.70;4119
+4121;2001173330;B03000;AMEACA;RUA CINQUENTA;203;302845;30/3/2001 15:25:00;CIDADAO COMUM;S;;TUPI;BH;614197.66;805513.25;4120
+4122;2001173412;B06000;LESAO CORPORAL;RUA PADRE LAGE;19;4610;30/3/2001 16:10:00;CIDADAO COMUM;S;;DOM BOSCO;BH;604640.37;797142.70;4121
+4123;2001173413;B06000;LESAO CORPORAL;RUA JOSAFA BELO;77;38364;30/3/2001 16:11:00;INICIATIVA;N;0;CIDADE JARDIM;BH;610011.54;795221.71;4122
+4124;2001173552;B04002;HOMICIDIO CONSUM;RUA MARIA ROSA D;150;107800;30/3/2001 17:26:00;CIDADAO COMUM;N;;MANTIQUEIRA;BH;606011.75;811304.95;4123
+4125;2001173597;B06000;LESAO CORPORAL;RUA CELIA COSTA;31;105149;30/3/2001 17:45:00;CIDADAO COMUM;S;;PATROCINIO;BH;604016.70;799013.81;4124
+4126;2001173605;B04001;HOMICIDIO TENTAD;RUA LASSANCE;548;84415;30/3/2001 17:49:00;INICIATIVA;N;0;BOA VISTA;BH;615768.49;799690.36;4125
+4127;2001173695;B06000;LESAO CORPORAL;RUA TIMOTEO;448;69688;30/3/2001 18:43:00;CIDADAO COMUM;N;;SANTA INES;BH;614007.96;800435.59;4126
+4128;2001173701;B03000;AMEACA;RUA QUATRO;221;79588;30/3/2001 18:47:00;CIDADAO COMUM;S;;LINDEIA;BH;599659.25;790421.07;4127
+4129;2001173712;B03000;AMEACA;RUA EX-COMBATENT;180;19784;30/3/2001 18:55:00;CIDADAO COMUM;S;;SAO PAULO;BH;613081.65;802874.53;4128
+4130;2001173727;B06000;LESAO CORPORAL;AV BERNARDO MONT;879;9392;30/3/2001 19:05:00;INICIATIVA;S;0;SANTA EFIGENIA;BH;612245.04;796346.92;4129
+4131;2001173744;B03000;AMEACA;RUA CORONEL ANTO;182;17590;30/3/2001 19:13:00;CIDADAO COMUM;S;;JARDIM LEBLON;BH;606140.28;807563.65;4130
+4132;2001173821;B03000;AMEACA;RUA FRANCA;48;29224;30/3/2001 19:57:00;CIDADAO COMUM;S;0;JARDIM AMERICA;BH;607503.92;794169.65;4131
+4133;2001173833;B04001;HOMICIDIO TENTAD;AV AUGUSTO DE LI;2109;6731;30/3/2001 20:08:00;CIDADAO COMUM;S;0;CENTRO (BH);BH;609263.62;797044.80;4132
+4134;2001173857;B04002;HOMICIDIO CONSUM;AV COLETORA;478;78241;30/3/2001 20:21:00;INICIATIVA;N;0;VILA PINHO;BH;602113.34;788183.02;4133
+4135;2001173869;B04001;HOMICIDIO TENTAD;RUA ALGARVE;735;61396;30/3/2001 20:28:00;CIDADAO COMUM;N;CAA;SAO FRANCISCO;BH;609186.09;801896.95;4134
+4136;2001173891;B04002;HOMICIDIO CONSUM;RUA PRINCIPAL;428;300224;30/3/2001 20:39:00;CIDADAO COMUM;N;;MORRO DO PAPAGAI;BH;610510.27;793309.97;4135
+4137;2001173905;B03000;AMEACA;RUA DOUTOR BENED;1540;12252;30/3/2001 20:52:00;CIDADAO COMUM;N;;ANTONIO RIBEIRO ;BH;613682.32;803992.93;4136
+4138;2001173954;B03000;AMEACA;RUA JOSE BARTOLO;38;38525;30/3/2001 21:13:00;CIDADAO COMUM;S;;CONJUNTO ALIPIO ;BH;603707.54;799638.81;4137
+4139;2001174009;B03000;AMEACA;RUA HENRIQUE HOR;1324;88170;30/3/2001 21:52:00;CIDADAO COMUM;S;0;PLANALTO;BH;609649.18;806260.00;4138
+4140;2001174055;B04001;HOMICIDIO TENTAD;AV CRISTIANO MAC;4000;18652;30/3/2001 22:25:00;INICIATIVA;N;0;DOS PALMARES;BH;612434.91;802092.92;4139
+4141;2001174066;B06000;LESAO CORPORAL;RUA ROSA NEGRA;227;124481;30/3/2001 22:34:00;CIDADAO COMUM;S;FU;ETELVINA CARNEIR;BH;611506.11;809123.86;4140
+4142;2001174092;B03000;AMEACA;AV GANDHI;293;76160;30/3/2001 22:54:00;CIDADAO COMUM;N;;VILA SANTA LUZIA;CO;603027.36;801996.15;4141
+4143;2001174111;B06000;LESAO CORPORAL;AV NOSSA SENHORA;1800;47996;30/3/2001 23:05:00;INICIATIVA;S;0;SAO PEDRO;BH;611086.35;793436.77;4142
+4144;2001174167;B06000;LESAO CORPORAL;RUA FLOR DE PAU;23;80294;30/3/2001 23:38:00;CIDADAO COMUM;S;;JARDIM MONTANHES;BH;605654.63;799232.62;4143
+4145;2001174173;B06000;LESAO CORPORAL;RUA INHAMBU;40;56490;30/3/2001 23:39:00;CIDADAO COMUM;S;0;GOIANIA;BH;615378.23;802857.04;4144
+4146;2001174186;B03000;AMEACA;RUA MARIA BEATRI;606;43881;30/3/2001 23:52:00;CIDADAO COMUM;S;AP202;HAVAI;BH;606879.73;793253.08;4145
+4147;2001174232;B03000;AMEACA;RODOVIA MGT 262;291;26598;31/3/2001 00:19:00;CIDADAO COMUM;S;0;VILA BRASILIA;BH;614731.31;803443.10;4146
+4148;2001174260;B03000;AMEACA;RUA POUSO ALEGRE;2312;54932;31/3/2001 00:33:00;CIDADAO COMUM;S;BLC     AP106;FLORESTA;BH;613332.91;797870.75;4147
+4149;2001174296;B06000;LESAO CORPORAL;RUA AUGUSTO MEIE;230;6757;31/3/2001 00:52:00;CIDADAO COMUM;S;0;TUPI;BH;613793.27;806006.25;4148
+4150;2001174333;B04001;HOMICIDIO TENTAD;RUA MELODIA;53;301462;31/3/2001 01:09:00;CIDADAO COMUM;S;0;VILA CAFEZAL;BH;614240.36;795425.90;4149
+4151;2001174340;B06000;LESAO CORPORAL;RUA MARIA REGINA;759;124771;31/3/2001 01:12:00;INICIATIVA;S;0;CEU AZUL;BH;604595.45;807095.92;4150
+4152;2001174489;B02000;RIXA;AV SANTOS DUMONT;574;61950;31/3/2001 02:41:00;CIDADAO COMUM;S;PX587;CENTRO (BH);BH;611085.24;797586.10;4151
+4153;2001174547;B06000;LESAO CORPORAL;AV ERICO VERISSI;1000;41671;31/3/2001 03:19:00;INICIATIVA;S;0;SANTA MONICA;BH;607768.47;808762.85;4152
+4154;2001174555;B06000;LESAO CORPORAL;RUA CELIA DE SOU;671;14488;31/3/2001 03:23:00;CIDADAO COMUM;S;0;SAGRADA FAMILIA;BH;612595.85;798676.48;4153
+4155;2001174608;B03000;AMEACA;RUA CLOVIS DE CA;20;16064;31/3/2001 04:00:00;INICIATIVA;S;0;FLORAMAR;BH;612214.25;805793.87;4154
+4156;2001174621;B04001;HOMICIDIO TENTAD;RUA CAMBOATA;3;106230;31/3/2001 04:08:00;INICIATIVA;N;0;PATROCINIO;BH;605142.92;794077.66;4155
+4157;2001174721;B06000;LESAO CORPORAL;RUA DES CAMPOS;117;19920;31/3/2001 06:04:00;CIDADAO COMUM;S;;INCONFIDENCIA;BH;605053.40;798174.04;4156
+4158;2001174790;B06000;LESAO CORPORAL;RUA INDEPENDENCI;1009;34391;31/3/2001 07:21:00;CIDADAO COMUM;S;;CABANA;BH;605985.71;793145.38;4157
+4159;2001174807;B06000;LESAO CORPORAL;RUA VINTE E OITO;95;106182;31/3/2001 07:47:00;CIDADAO COMUM;S;0;JARDIM DOS COMER;BH;608112.67;810710.07;4158
+4160;2001174832;B03000;AMEACA;RUA PADRE MANOEL;143;51569;31/3/2001 08:07:00;CIDADAO COMUM;N;;SANTA EFIGENIA;BH;614135.75;796233.74;4159
+4161;2001174957;B08000;VIOLACAO DE DOMI;RUA AGUA MARINHA;39;87744;31/3/2001 09:37:00;CIDADAO COMUM;S;CA;CANDELARIA;BH;607662.50;809375.47;4160
+4162;2001174969;B06000;LESAO CORPORAL;RUA R;2;27231;31/3/2001 09:49:00;CIDADAO COMUM;S;;PAULO SEXTO;BH;616521.94;806858.96;4161
+4163;2001175043;B06000;LESAO CORPORAL;RUA MADRE PAULIN;245;15538;31/3/2001 10:34:00;CIDADAO COMUM;S;;DIAMANTE;BH;601308.14;789709.42;4162
+4164;2001175055;B03000;AMEACA;RUA MUNIZ;360;170850;31/3/2001 10:50:00;CIDADAO COMUM;S;;MORRO DAS PEDRAS;BH;608153.90;793811.95;4163
+4165;2001175118;B06000;LESAO CORPORAL;RUA DOS CARIJOS;645;81243;31/3/2001 11:33:00;POLICIAL CIVIL;N;;CENTRO (BH);BH;610833.39;797215.72;4164
+4166;2001175169;B03000;AMEACA;AV PARANAIBA;547;52256;31/3/2001 12:06:00;CIDADAO COMUM;S;;SENHOR BOM JESUS;BH;609858.31;800010.80;4165
+4167;2001175193;B04001;HOMICIDIO TENTAD;RUA PRINCIPAL;1030;300224;31/3/2001 12:32:00;INICIATIVA;S;0;MORRO DO PAPAGAI;BH;610701.80;792989.02;4166
+4168;2001175240;B03000;AMEACA;RUA FILOMENA GAS;177;62083;31/3/2001 13:04:00;CIDADAO COMUM;N;;APARECIDA SETIMA;BH;608447.47;800337.13;4167
+4169;2001175256;B03000;AMEACA;RUA SAO LEOPOLDO;10;63221;31/3/2001 13:17:00;CIDADAO COMUM;S;;CACHOEIRINHA;BH;610817.96;801203.39;4168
+4170;2001175305;B03000;AMEACA;RUA FLOR DO ORIE;329;50190;31/3/2001 13:54:00;CIDADAO COMUM;S;;JARDIM MONTANHES;BH;606029.07;799987.90;4169
+4171;2001175328;B03000;AMEACA;RUA PARAIBUNA;57;52196;31/3/2001 14:07:00;CIDADAO COMUM;S;CAA;MINASLANDIA;BH;611940.42;804599.42;4170
+4172;2001175359;B04001;HOMICIDIO TENTAD;RUA SAO TOMAS DE;535;63782;31/3/2001 14:26:00;INICIATIVA;S;0;MORRO DO PAPAGAI;BH;610849.00;793420.56;4171
+4173;2001175411;B06000;LESAO CORPORAL;AV BARBACENA;653;8084;31/3/2001 15:02:00;CIDADAO COMUM;N;PRONTO SOCORRO;BARRO PRETO;BH;609636.01;796640.35;4172
+4174;2001175446;B03000;AMEACA;RUA 51;5;302847;31/3/2001 15:30:00;CIDADAO COMUM;N;0;NOVO AARAO REIS;BH;614188.75;805564.70;4173
+4175;2001175500;B03000;AMEACA;RUA K;500;41495;31/3/2001 16:00:00;INICIATIVA;N;0;CH CONFISCO (CO);CO;602570.39;802980.95;4174
+4176;2001175534;B03000;AMEACA;RUA GABRO;23;30435;31/3/2001 16:22:00;CIDADAO COMUM;N;BECO BRILHANTINA;SANTA TEREZA;BH;613006.52;797578.51;4175
+4177;2001175557;B03000;AMEACA;RUA JOVIANO COEL;10;39294;31/3/2001 16:35:00;CIDADAO COMUM;S;AN2;RIO BRANCO;BH;606938.05;808860.20;4176
+4178;2001175560;B03000;AMEACA;RUA PIRAI;54;54062;31/3/2001 16:41:00;CIDADAO COMUM;S;CAC;CONCORDIA;BH;610781.50;799320.53;4177
+4179;2001175564;B04001;HOMICIDIO TENTAD;RUA CAMILA DE SO;37;74294;31/3/2001 16:45:00;CIDADAO COMUM;N;QUI;SAO JOAO BATISTA;BH;608148.92;807536.43;4178
+4180;2001175608;B06000;LESAO CORPORAL;RUA LIGNITO;343;41050;31/3/2001 17:11:00;CIDADAO COMUM;S;;SANTA EFIGENIA;BH;613799.80;796334.31;4179
+4181;2001175617;B03000;AMEACA;RUA MAJOR DELFIN;1214;42620;31/3/2001 17:17:00;CIDADAO COMUM;S;;SAO FRANCISCO;BH;609652.80;802187.36;4180
+4182;2001175632;B04001;HOMICIDIO TENTAD;RUA MUSAS;206;46993;31/3/2001 17:22:00;CIDADAO COMUM;N;;SANTA LUCIA;BH;610285.02;791421.66;4181
+4183;2001175657;B04001;HOMICIDIO TENTAD;RUA GUAPE;850;32100;31/3/2001 17:38:00;CIDADAO COMUM;N;PADARIA SANTA CR;SANTO ANDRE;BH;609843.76;799014.55;4182
+4184;2001175666;B06000;LESAO CORPORAL;RUA CASTELO DE B;41;124021;31/3/2001 17:40:00;CIDADAO COMUM;N;0;CASTELO;BH;605332.82;801428.56;4183
+4185;2001175688;B06000;LESAO CORPORAL;RUA NEY WERNECK;266;80382;31/3/2001 18:00:00;CIDADAO COMUM;S;;JARDIM MONTANHES;BH;606001.11;800117.22;4184
+4186;2001175806;B06000;LESAO CORPORAL;RUA HELIO LAZZAR;488;127694;31/3/2001 18:57:00;CIDADAO COMUM;S;;CAICARA;BH;607119.32;799646.13;4185
+4187;2001175876;B03000;AMEACA;RUA VISCONDE DE ;166;73380;31/3/2001 19:33:00;CIDADAO COMUM;S;;SAO JOAO BATISTA;BH;608052.72;807550.20;4186
+4188;2001175924;B06000;LESAO CORPORAL;RUA NEY WERNECK;200;80382;31/3/2001 19:57:00;CIDADAO COMUM;S;CA03;JARDIM MONTANHES;BH;605920.10;800059.06;4187
+4189;2001175972;B03000;AMEACA;RUA SAO PAULO;124;63464;31/3/2001 20:21:00;INICIATIVA;N;0;CENTRO (BH);BH;611102.49;797669.42;4188
+4190;2001176092;B03000;AMEACA;BECO SAO MIGUEL;19;171002;31/3/2001 21:15:00;CIDADAO COMUM;S;FUNDOS CEM COLIN;CABANA;BH;604847.29;794027.97;4189
+4191;2001176111;B06000;LESAO CORPORAL;RUA CURI;742;19047;31/3/2001 21:29:00;CIDADAO COMUM;S;0;SAO GERALDO;BH;615733.51;799053.01;4190
+4192;2001176152;B06000;LESAO CORPORAL;RUA OZANAM;475;50796;31/3/2001 21:56:00;CIDADAO COMUM;N;0;IPIRANGA;BH;611931.96;801078.35;4191
+4193;2001176153;B02000;RIXA;RUA LARANJEIRAS;305;40423;31/3/2001 21:56:00;CIDADAO COMUM;N;0;LEBLON;BH;605695.40;809792.54;4192
+4194;2001176169;B04001;HOMICIDIO TENTAD;RUA ANA FRANCA;200;3529;31/3/2001 22:05:00;CIDADAO COMUM;S;;DAS INDUSTRIAS;BH;604638.14;791892.60;4193
+4195;2001176199;B06000;LESAO CORPORAL;AV GOVERNADOR BE;826;67670;31/3/2001 22:25:00;CIDADAO COMUM;N;0;GAMELEIRA;BH;604830.93;795345.21;4194
+4196;2001176220;B06000;LESAO CORPORAL;RUA DOS AEROVIAR;59;1186;31/3/2001 22:38:00;CIDADAO COMUM;S;;LIBERDADE;BH;609063.15;804069.27;4195
+4197;2001176269;B06000;LESAO CORPORAL;AV SILVIANO BRAN;2503;66002;31/3/2001 23:17:00;CIDADAO COMUM;S;;HORTO;BH;613666.26;798305.11;4196
+4198;2001176280;B06000;LESAO CORPORAL;RUA NOSSA SENHOR;25;64905;31/3/2001 23:22:00;CIDADAO COMUM;N;0;JARDIM AMERICA;BH;607765.22;794520.66;4197
+4199;2001176304;B02000;RIXA;RUA MANTENA;80;43273;31/3/2001 23:34:00;CIDADAO COMUM;N;0;OURO PRETO;BH;606459.52;802813.73;4198
+4200;2001176309;B06000;LESAO CORPORAL;RUA MONTE ALEGRE;1055;46357;31/3/2001 23:36:00;CIDADAO COMUM;S;;SAO LUCAS;BH;613156.17;795981.81;4199
+4201;2001235488;B03000;AMEACA;RUA GRACILIANO R;124;31683;1/5/2001 01:58:00;CIDADAO COMUM;S;;TUPI;BH;612710.78;805937.90;4200
+4202;2001235683;B03000;AMEACA;RUA CORONEL ALTI;267;119100;1/5/2001 05:13:00;CIDADAO COMUM;S;0;TEIXEIRA DIAS;BH;602544.15;789909.92;4201
+4203;2001235684;B06000;LESAO CORPORAL;RUA OURO PRETO;285;50730;1/5/2001 05:14:00;CIDADAO COMUM;N;0;BARRO PRETO;BH;609961.08;797017.98;4202
+4204;2001235688;B04001;HOMICIDIO TENTAD;RUA PADRE VENANC;78;51717;1/5/2001 05:17:00;INICIATIVA;S;0;GLORIA;BH;603605.95;798587.38;4203
+4205;2001235690;B06000;LESAO CORPORAL;RUA DOS TUPIS;546;69965;1/5/2001 05:24:00;INICIATIVA;N;0;CENTRO (BH);BH;610760.44;796995.95;4204
+4206;2001235694;B06000;LESAO CORPORAL;RUA AMILCAR CABR;960;5146;1/5/2001 05:26:00;CIDADAO COMUM;S;0;MILIONARIOS;BH;604353.05;789957.05;4205
+4207;2001235725;B06000;LESAO CORPORAL;AV OLEGARIO MACI;663;49699;1/5/2001 06:45:00;POLICIAL MILITAR;N;;CENTRO (BH);BH;610536.72;797015.09;4206
+4208;2001235747;B04002;HOMICIDIO CONSUM;RUA JOAQUIM GONC;777;119428;1/5/2001 07:41:00;CIDADAO COMUM;N;;VILA MAGNESITA;BH;602285.91;795055.04;4207
+4209;2001235792;B06000;LESAO CORPORAL;RUA LUZIA SALOMA;445;85042;1/5/2001 08:20:00;CIDADAO COMUM;N;;MANTIQUEIRA;BH;606713.75;810778.88;4208
+4210;2001235893;B03000;AMEACA;AV SEN LEVINDO C;3320;14866;1/5/2001 09:54:00;CIDADAO COMUM;S;;CH VALE DO JATOB;BH;601145.74;787029.27;4209
+4211;2001235921;B04002;HOMICIDIO CONSUM;RUA DO GROTAO;112;107217;1/5/2001 10:16:00;CIDADAO COMUM;N;0;HAVAI;BH;607513.23;793290.01;4210
+4212;2001235942;B06000;LESAO CORPORAL;ALAMEDA EZEQUIEL;225;27446;1/5/2001 10:33:00;CIDADAO COMUM;S;;CENTRO (BH);BH;611899.54;796686.86;4211
+4213;2001235991;B04001;HOMICIDIO TENTAD;RUA JOAO LUCIO B;120;37737;1/5/2001 11:16:00;CIDADAO COMUM;S;;PRADO;BH;609122.06;796967.46;4212
+4214;2001235992;B03000;AMEACA;RUA URSULA PAULI;1750;71066;1/5/2001 11:18:00;CIDADAO COMUM;N;LJ4;ESTRELA DO ORIEN;BH;605775.64;792584.24;4213
+4215;2001236053;B06000;LESAO CORPORAL;RUA FLOR DE LIZ;42;28640;1/5/2001 12:11:00;CIDADAO COMUM;N;;JARDIM MONTANHES;BH;606502.24;799018.81;4214
+4216;2001236098;B06000;LESAO CORPORAL;RUA DOS ANDRADAS;11;3787;1/5/2001 12:55:00;CIDADAO COMUM;S;;VENDA NOVA;BH;609178.72;808615.38;4215
+4217;2001236194;B03000;AMEACA;RUA PERDIGAO PEQ;110;83006;1/5/2001 14:19:00;CIDADAO COMUM;S;;OURO PRETO;BH;605834.34;802999.45;4216
+4218;2001236220;B02000;RIXA;RUA VASSOURAS;750;71369;1/5/2001 14:37:00;CIDADAO COMUM;S;;SENHOR BOM JESUS;BH;609096.59;799624.01;4217
+4219;2001236278;B06000;LESAO CORPORAL;RUA GERALDA MARI;42;69662;1/5/2001 15:24:00;CIDADAO COMUM;N;;SAO JOAO BATISTA;BH;608535.68;807364.54;4218
+4220;2001236328;B06000;LESAO CORPORAL;RUA CARLINDO AUG;4;97124;1/5/2001 15:59:00;CIDADAO COMUM;S;0;SAO MARCOS;BH;614603.58;802449.51;4219
+4221;2001236456;B06000;LESAO CORPORAL;RUA FRUTAL;113;30060;1/5/2001 17:15:00;CIDADAO COMUM;S;0;SANTA EFIGENIA;BH;613818.79;796965.01;4220
+4222;2001236537;B06000;LESAO CORPORAL;RUA VIOLETA DE M;400;80253;1/5/2001 17:59:00;INICIATIVA;S;0;SAO JOSE;BH;604478.74;799349.35;4221
+4223;2001236567;B06000;LESAO CORPORAL;RUA GUAICURUS;538;32009;1/5/2001 18:14:00;INICIATIVA;S;0;CENTRO (BH);BH;611143.63;797659.74;4222
+4224;2001236587;B03000;AMEACA;RUA ESPORA;779;117319;1/5/2001 18:28:00;CIDADAO COMUM;S;;LINDEIA;BH;600383.46;790393.09;4223
+4225;2001236590;B04001;HOMICIDIO TENTAD;RUA MARIO FILHO;495;44579;1/5/2001 18:29:00;INICIATIVA;N;0;ERMELINDA;BH;609263.47;800331.22;4224
+4226;2001236620;B06000;LESAO CORPORAL;RUA SEBASTIAO GO;101;119821;1/5/2001 18:44:00;CIDADAO COMUM;S;;SERRA VERDE;BH;609664.46;810990.23;4225
+4227;2001236627;B03000;AMEACA;RUA HONORIO BICA;830;29959;1/5/2001 18:51:00;CIDADAO COMUM;S;0;NOVA VISTA;BH;615468.71;800578.81;4226
+4228;2001236701;B04001;HOMICIDIO TENTAD;AV PROFESSOR MAR;1390;91130;1/5/2001 19:25:00;CIDADAO COMUM;N;0;BURITIS;BH;608356.66;791712.79;4227
+4229;2001236733;B03000;AMEACA;RUA ADELIA CARME;297;1031;1/5/2001 19:41:00;CIDADAO COMUM;S;0;ITAIPU BH;BH;599573.53;789407.34;4228
+4230;2001236743;B04001;HOMICIDIO TENTAD;RUA SAO ROQUE;1570;63600;1/5/2001 19:47:00;CIDADAO COMUM;N;;INSTITUTO AGRONO;BH;613633.57;799210.41;4229
+4231;2001236753;B06000;LESAO CORPORAL;AV PARANA;466;52230;1/5/2001 19:56:00;POLICIAL CIVIL;N;0;CENTRO (BH);BH;610691.17;797079.45;4230
+4232;2001236757;B06000;LESAO CORPORAL;RUA DES TINOCO;547;20028;1/5/2001 19:57:00;CIDADAO COMUM;S;;MONSENHOR MESSIA;BH;606692.07;798141.20;4231
+4233;2001236774;B06000;LESAO CORPORAL;RUA ITATIAIA;86;17499;1/5/2001 20:05:00;CIDADAO COMUM;S;;BONFIM;BH;610307.06;798033.40;4232
+4234;2001236822;B06000;LESAO CORPORAL;RUA JANAITIBA;916;36889;1/5/2001 20:31:00;CIDADAO COMUM;N;0;SAO GERALDO;BH;616237.80;799193.05;4233
+4235;2001236852;B04002;HOMICIDIO CONSUM;RUA MICA;175;45685;1/5/2001 20:51:00;INICIATIVA;N;0;SAO LUCAS;BH;613254.99;795969.19;4234
+4236;2001236855;B03000;AMEACA;RUA GERALDO JARD;60;302051;1/5/2001 20:51:00;CIDADAO COMUM;S;0;CASTELO;BH;610589.31;804979.41;4235
+4237;2001236872;B06000;LESAO CORPORAL;RUA VISTA ALEGRE;627;73409;1/5/2001 21:01:00;CIDADAO COMUM;S;;SANTA EFIGENIA;BH;614626.92;796908.04;4236
+4238;2001236917;B03000;AMEACA;RUA LUNDS FERREI;187;41920;1/5/2001 21:28:00;CIDADAO COMUM;N;;NOVA VISTA;BH;615004.25;800832.46;4237
+4239;2001236921;B04002;HOMICIDIO CONSUM;RUA DA BOLIVIA;222;9884;1/5/2001 21:30:00;INICIATIVA;S;0;MORRO DO PAPAGAI;BH;611248.65;793837.13;4238
+4240;2001236922;B03000;AMEACA;RUA ALUISIO DE A;30;2642;1/5/2001 21:29:00;CIDADAO COMUM;S;;SANTA MONICA;BH;607420.66;808150.58;4239
+4241;2001236943;B06000;LESAO CORPORAL;RUA ITAJUBA;1057;35495;1/5/2001 21:46:00;CIDADAO COMUM;S;0;SAGRADA FAMILIA;BH;612183.27;798466.57;4240
+4242;2001236962;B03000;AMEACA;RUA NATERCIA;95;47321;1/5/2001 21:54:00;CIDADAO COMUM;S;;SANTA INES;BH;614017.02;801360.75;4241
+4243;2001236984;B02000;RIXA;RUA SAO JOAQUIM;1388;62940;1/5/2001 22:11:00;CIDADAO COMUM;S;;SAGRADA FAMILIA;BH;613458.25;799298.92;4242
+4244;2001237029;B03000;AMEACA;RUA ARAPE;141;29798;1/5/2001 22:30:00;CIDADAO COMUM;N;CAFR;UNIAO;BH;613068.53;801117.75;4243
+4245;2001237036;B06000;LESAO CORPORAL;RUA PINTO MARTIN;428;53854;1/5/2001 22:33:00;CIDADAO COMUM;N;0;VILA OESTE;BH;604042.43;795007.75;4244
+4246;2001237148;B06000;LESAO CORPORAL;RUA WALTER IANNI;80;82186;1/5/2001 23:39:00;INICIATIVA;N;0;SAO GABRIEL;BH;613192.78;803761.07;4245
+4247;2001237180;B03000;AMEACA;AV FLOR DE SEDA;1370;748;1/5/2001 23:59:00;CIDADAO COMUM;N;;LINDEIA;BH;599978.29;790345.69;4246
+4248;2001237184;B04002;HOMICIDIO CONSUM;BECO JOSE BONIFA;235;300984;1/5/2001 23:59:00;CIDADAO COMUM;N;0;PRADO LOPES;BH;610199.16;798938.94;4247
+4249;2001237255;B06000;LESAO CORPORAL;RUA MARIA DELFIN;99;43970;2/5/2001 01:08:00;CIDADAO COMUM;N;0;CINQUENTENARIO;BH;606411.72;793418.98;4248
+4250;2001237261;B03000;AMEACA;RUA CARLOS NIEME;455;13472;2/5/2001 01:24:00;INICIATIVA;S;0;SAGRADA FAMILIA;BH;613542.53;798883.75;4249
+4251;2001237280;B04001;HOMICIDIO TENTAD;ESTRADA DO CERCA;2178;26428;2/5/2001 01:41:00;CIDADAO COMUM;S;;SAO DOMINGOS;BH;607554.57;793526.69;4250
+4252;2001237465;B06000;LESAO CORPORAL;RUA CORONEL ANTO;784;17590;2/5/2001 07:11:00;CIDADAO COMUM;S;;JARDIM LEBLON;BH;605558.64;807500.35;4251
+4253;2001237627;B04001;HOMICIDIO TENTAD;RUA CAIO VIANA M;65;11477;2/5/2001 08:50:00;CIDADAO COMUM;S;FU;ARAGUAIA;BH;604494.91;789155.55;4252
+4254;2001237680;B06000;LESAO CORPORAL;RUA HILDEBRANDO ;556;129788;2/5/2001 09:17:00;CIDADAO COMUM;S;0;COPACABANA;BH;606580.08;806418.27;4253
+4255;2001237829;B06000;LESAO CORPORAL;AV BARBACENA;653;8084;2/5/2001 10:59:00;CIDADAO COMUM;S;;BARRO PRETO;BH;609636.01;796640.35;4254
+4256;2001237849;B03000;AMEACA;RUA PONTA GROSSA;1441;14900;2/5/2001 11:17:00;INICIATIVA;N;0;CRISTO REDENTOR;BH;604877.50;790823.59;4255
+4257;2001237884;B06000;LESAO CORPORAL;RUA DOUTOR ALIPI;389;2365;2/5/2001 11:42:00;CIDADAO COMUM;S;;SERRA;BH;613860.47;794632.24;4256
+4258;2001238076;B03000;AMEACA;RUA QUIARI;90;57161;2/5/2001 13:59:00;POLICIAL MILITAR;N;;SAO GERALDO;BH;615497.49;799877.42;4257
+4259;2001238189;B03000;AMEACA;RUA ORION RIGEL ;191;128961;2/5/2001 15:16:00;CIDADAO COMUM;S;0;FLORAMAR;BH;611775.11;807103.70;4258
+4260;2001238225;B03000;AMEACA;RUA DINIS DIAS;145;119673;2/5/2001 15:32:00;CIDADAO COMUM;S;0;VERA CRUZ;BH;616573.20;797526.82;4259
+4261;2001238276;B06000;LESAO CORPORAL;RUA BONFIM;1120;10096;2/5/2001 15:59:00;CIDADAO COMUM;S;;BONFIM;BH;609801.52;798284.45;4260
+4262;2001238313;B03000;AMEACA;RUA CURITIBA;949;19090;2/5/2001 16:16:00;CIDADAO COMUM;N;0;CENTRO (BH);BH;610799.92;796919.51;4261
+4263;2001238333;B03000;AMEACA;RUA MAJOR DELFIN;2450;42620;2/5/2001 16:29:00;INICIATIVA;S;;SAO FRANCISCO;BH;609055.69;801501.27;4262
+4264;2001238360;B03000;AMEACA;RUA BARAO DE SAR;559;8043;2/5/2001 16:44:00;CIDADAO COMUM;N;0;HORTO;BH;613733.24;797809.77;4263
+4265;2001238364;B03000;AMEACA;RUA VOLTS;25;73626;2/5/2001 16:45:00;CIDADAO COMUM;S;;PRIMEIRO DE MAIO;BH;612240.98;803326.26;4264
+4266;2001238367;B03000;AMEACA;RUA G;11;36721;2/5/2001 16:48:00;INICIATIVA;S;0;MINASCAIXA;BH;609150.38;809830.09;4265
+4267;2001238396;B03000;AMEACA;RUA JUATUBA;42;39367;2/5/2001 17:05:00;CIDADAO COMUM;S;NR CORRETO/57;VISTA ALEGRE;BH;605262.83;793420.62;4266
+4268;2001238560;B04001;HOMICIDIO TENTAD;RUA AFONSO PEREI;10;107752;2/5/2001 19:00:00;CIDADAO COMUM;N;;MANTIQUEIRA;BH;606653.03;811490.84;4267
+4269;2001238608;B03000;AMEACA;AV ITAITUBA;450;35454;2/5/2001 19:19:00;CIDADAO COMUM;N;0;BOA VISTA;BH;615072.17;799768.56;4268
+4270;2001238679;B03000;AMEACA;RUA BARAO DE MAC;449;7980;2/5/2001 19:55:00;CIDADAO COMUM;S;;SANTO ANTONIO;BH;610174.15;794888.88;4269
+4271;2001238686;B03000;AMEACA;RUA JOSE MOREIRA;422;55368;2/5/2001 20:01:00;CIDADAO COMUM;N;CSFU;SAO MARCOS;BH;614483.67;802473.88;4270
+4272;2001238703;B03000;AMEACA;RUA JOAO WESLEY;69;64441;2/5/2001 20:10:00;CIDADAO COMUM;S;0;SAO JOAO BATISTA;BH;608579.52;808541.11;4271
+4273;2001238742;B03000;AMEACA;RUA CARLOS ETIEN;84;13356;2/5/2001 20:37:00;INICIATIVA;N;0;SERRA;BH;613964.61;794958.91;4272
+4274;2001238770;B06000;LESAO CORPORAL;RUA URANO;338;71000;2/5/2001 20:48:00;CIDADAO COMUM;S;CAC;VILA SATELITE;BH;610013.62;808625.58;4273
+4275;2001238798;B06000;LESAO CORPORAL;AV MEM DE SA;1457;45395;2/5/2001 21:07:00;CIDADAO COMUM;S;;PARAISO;BH;614255.88;796144.29;4274
+4276;2001238874;B06000;LESAO CORPORAL;RUA DOS OTONI;637;50667;2/5/2001 22:04:00;INICIATIVA;N;0;SANTA EFIGENIA;BH;612405.45;796371.31;4275
+4277;2001238880;B03000;AMEACA;RUA CRISTAL;312;18611;2/5/2001 22:07:00;CIDADAO COMUM;N;;SANTA TEREZA;BH;612754.03;797170.88;4276
+4278;2001238894;B03000;AMEACA;RUA HORACIO DOLA;127;11565;2/5/2001 22:21:00;CIDADAO COMUM;N;;CEU AZUL;BH;604125.19;807520.28;4277
+4279;2001238912;B03000;AMEACA;RUA MEXICO;579;45660;2/5/2001 22:32:00;CIDADAO COMUM;S;;JARDIM LEBLON;BH;605377.49;807191.43;4278
+4280;2001238926;B03000;AMEACA;BECO ORIENTAL;150;301495;2/5/2001 22:42:00;CIDADAO COMUM;S;0;SAO LUCAS;BH;613207.58;795848.83;4279
+4281;2001238979;B03000;AMEACA;RUA LUPERCIO PAI;280;57335;2/5/2001 23:07:00;CIDADAO COMUM;S;0;TIROL;BH;599911.01;789035.54;4280
+4282;2001238987;B03000;AMEACA;RUA LOURIVAL SOA;26;109341;2/5/2001 23:13:00;CIDADAO COMUM;S;;CEU AZUL;BH;604657.01;807776.85;4281
+4283;2001238996;B03000;AMEACA;RUA SABARA;21;59750;2/5/2001 23:24:00;CIDADAO COMUM;S;0;FLORESTA;BH;611202.63;798017.88;4282
+4284;2001238998;B03000;AMEACA;AV SEN LEVINDO C;1070;14866;2/5/2001 23:24:00;CIDADAO COMUM;N;;SANTA CECILIA;BH;601290.55;786629.80;4283
+4285;2001239044;B02000;RIXA;RUA ITAQUERA;428;35920;2/5/2001 23:54:00;CIDADAO COMUM;N;0;CONCORDIA;BH;611178.14;799141.23;4284
+4286;2001239088;B03000;AMEACA;RUA TIZIU;542;95881;3/5/2001 00:38:00;CIDADAO COMUM;N;0;GOIANIA;BH;615351.18;802590.79;4285
+4287;2001239107;B03000;AMEACA;RUA DINIS DIAS;145;119673;3/5/2001 00:54:00;CIDADAO COMUM;S;;VERA CRUZ;BH;616573.20;797526.82;4286
+4288;2001239179;B04001;HOMICIDIO TENTAD;RUA DOUTOR BENED;400;12252;3/5/2001 01:59:00;INICIATIVA;N;0;ANTONIO RIBEIRO ;BH;612542.70;803696.47;4287
+4289;2001239180;B06000;LESAO CORPORAL;AV DO CONTORNO;10360;17228;3/5/2001 02:00:00;CIDADAO COMUM;N;;BARRO PRETO;BH;609614.39;797316.12;4288
+4290;2001239192;B06000;LESAO CORPORAL;RUA ZODIACO;637;74036;3/5/2001 02:16:00;CIDADAO COMUM;N;;SANTA LUCIA;BH;610296.58;791986.51;4289
+4291;2001239263;B03000;AMEACA;RUA DONATO DA FO;44;23067;3/5/2001 03:32:00;CIDADAO COMUM;S;AP 301;CORACAO DE JESUS;BH;610024.42;794463.88;4290
+4292;2001239507;B03000;AMEACA;RUA OURO PRETO;1421;50730;3/5/2001 08:27:00;CIDADAO COMUM;N;APT.203;SANTO AGOSTINHO;BH;609659.90;795880.65;4291
+4293;2001239604;B03000;AMEACA;RUA MARQUES DO L;470;44755;3/5/2001 09:18:00;CIDADAO COMUM;S;0;JOAO PINHEIRO;BH;604486.51;796277.77;4292
+4294;2001239649;B03000;AMEACA;RUA SAO LAZARO;831;63219;3/5/2001 09:39:00;CIDADAO COMUM;N;;SAGRADA FAMILIA;BH;612468.94;799392.66;4293
+4295;2001239730;B06000;LESAO CORPORAL;RUA SAO FIDELIS;701;48309;3/5/2001 10:31:00;CIDADAO COMUM;S;;NOVA VISTA;BH;615514.94;800550.35;4294
+4296;2001239779;B06000;LESAO CORPORAL;RUA FLOR DO AMEN;283;94910;3/5/2001 11:05:00;CIDADAO COMUM;S;;JARDIM MONTANHES;BH;606038.51;799794.54;4295
+4297;2001239942;B03000;AMEACA;RUA ANHEMBI;168;84396;3/5/2001 12:52:00;CIDADAO COMUM;S;;PIRATININGA;BH;605469.33;809069.82;4296
+4298;2001240172;B03000;AMEACA;AV ARTUR GUIMARA;1010;6151;3/5/2001 15:22:00;CIDADAO COMUM;S;;SANTA CRUZ;BH;610759.65;802050.82;4297
+4299;2001240206;B06000;LESAO CORPORAL;RUA GUARARAPES;1544;32241;3/5/2001 15:40:00;CIDADAO COMUM;S;0;NOVO GLORIA;BH;602656.25;798267.93;4298
+4300;2001240309;B06000;LESAO CORPORAL;RUA CELINA DIAS ;67;86307;3/5/2001 16:27:00;CIDADAO COMUM;S;;JAQUELINE;BH;610884.16;810367.55;4299
+4301;2001240424;B03000;AMEACA;RUA JEQUIRICA;157;37258;3/5/2001 17:32:00;CIDADAO COMUM;S;;CONCORDIA;BH;611254.76;799443.34;4300
+4302;2001240584;B03000;AMEACA;RUA GERALDO SILV;121;56588;3/5/2001 18:57:00;CIDADAO COMUM;S;AP02;RIO BRANCO;BH;606686.40;808809.56;4301
+4303;2001240720;B03000;AMEACA;RUA NELSON DE SE;91;47448;3/5/2001 20:04:00;CIDADAO COMUM;S;;CINQUENTENARIO;BH;606350.59;792901.24;4302
+4304;2001240732;B03000;AMEACA;RUA TREM DE FERR;145;9377;3/5/2001 20:10:00;INICIATIVA;S;0;ITAIPU BH;BH;598907.42;789366.11;4303
+4305;2001240758;B03000;AMEACA;PRACA CARLOS CHA;35;13328;3/5/2001 20:20:00;INICIATIVA;N;0;SANTO AGOSTINHO;BH;610136.92;795881.25;4304
+4306;2001240945;B06000;LESAO CORPORAL;RUA DOS INDEPEND;180;109165;3/5/2001 22:15:00;CIDADAO COMUM;S;;VILA SANTA RITA;BH;601157.29;787604.80;4305
+4307;2001240953;B03000;AMEACA;RUA EGEU;70;18680;3/5/2001 22:18:00;CIDADAO COMUM;S;;MINASLANDIA;BH;611648.78;804462.61;4306
+4308;2001241105;B06000;LESAO CORPORAL;RUA PADRE CAFE;1053;51253;3/5/2001 23:58:00;CIDADAO COMUM;N;;VERA CRUZ;BH;616124.40;797897.91;4307
+4309;2001241108;B06000;LESAO CORPORAL;RUA JOSE NILTON ;248;113144;4/5/2001 00:00:00;CIDADAO COMUM;N;0;TIROL;BH;599992.30;789975.91;4308
+4310;2001241114;B06000;LESAO CORPORAL;RUA LEOPOLDO GOM;1820;40770;4/5/2001 00:04:00;INICIATIVA;N;0;VERA CRUZ;BH;616129.07;798179.53;4309
+4311;2001241171;B03000;AMEACA;AV OLINTO MEIREL;1634;49847;4/5/2001 00:57:00;CIDADAO COMUM;N;0;MILIONARIOS;BH;603690.86;789825.51;4310
+4312;2001241221;B06000;LESAO CORPORAL;RUA ANTONIO SIMI;268;118526;4/5/2001 01:51:00;CIDADAO COMUM;S;;REGINA;BH;598714.08;790387.69;4311
+4313;2001241357;B04001;HOMICIDIO TENTAD;PRACA CARDEAL AR;96;13182;4/5/2001 04:39:00;CIDADAO COMUM;N;;NOVA CINTRA;BH;605691.12;793887.54;4312
+4314;2001241449;B03000;AMEACA;AV CARANDAI;897;13081;4/5/2001 07:39:00;CIDADAO COMUM;S;0;FUNCIONARIOS;BH;611934.68;796197.56;4313
+4315;2001241458;B03000;AMEACA;RUA CORONEL CAMI;460;17650;4/5/2001 07:48:00;CIDADAO COMUM;S;0;VILA OESTE;BH;604170.06;795259.34;4314
+4316;2001241522;B03000;AMEACA;RUA ITAPEVA;821;35820;4/5/2001 08:31:00;CIDADAO COMUM;S;0;CONCORDIA;BH;611604.06;799219.61;4315
+4317;2001241538;B06000;LESAO CORPORAL;RUA PRIMEIRO DE ;50;23978;4/5/2001 08:39:00;CIDADAO COMUM;S;CAST07;TAQUARIL;BH;617532.48;797226.06;4316
+4318;2001241586;B03000;AMEACA;RUA HERMILO ALVE;168;33216;4/5/2001 09:08:00;CIDADAO COMUM;S;;SANTA TEREZA;BH;612592.79;797429.00;4317
+4319;2001241733;B04001;HOMICIDIO TENTAD;RUA SEIS;80;86174;4/5/2001 10:48:00;CIDADAO COMUM;S;;JAQUELINE;BH;611389.70;810027.38;4318
+4320;2001241818;B06000;LESAO CORPORAL;RUA VENERO CAETA;76;91459;4/5/2001 11:49:00;CIDADAO COMUM;S;FU;PALMEIRAS;BH;606859.87;791116.66;4319
+4321;2001241823;B06000;LESAO CORPORAL;RUA CONSELHEIRO ;3792;17095;4/5/2001 11:53:00;INICIATIVA;N;0;HORTO;BH;613741.51;798439.29;4320
+4322;2001241856;B02000;RIXA;RUA ITAPEMA;185;35760;4/5/2001 12:17:00;INICIATIVA;N;0;ANCHIETA;BH;612293.88;793797.78;4321
+4323;2001241898;B03000;AMEACA;RUA EDUARDO QUEN;27;25047;4/5/2001 12:50:00;CIDADAO COMUM;N;;SAO BERNARDO;BH;610548.55;805019.11;4322
+4324;2001241908;B04001;HOMICIDIO TENTAD;RUA BENJAMIM JAC;800;9207;4/5/2001 12:57:00;CIDADAO COMUM;N;;GUTIERREZ;BH;609111.97;794709.49;4323
+4325;2001241973;B06000;LESAO CORPORAL;RUA BUENO DO PRA;866;10676;4/5/2001 13:38:00;CIDADAO COMUM;N;;ALTO DOS PINHEIR;BH;604211.61;796222.13;4324
+4326;2001242005;B03000;AMEACA;RUA FURTADO NUNE;25;30160;4/5/2001 13:57:00;CIDADAO COMUM;S;0;PADRE EUSTAQUIO;BH;606302.42;797166.69;4325
+4327;2001242011;B06000;LESAO CORPORAL;RUA RIO DE JANEI;821;58772;4/5/2001 14:06:00;INICIATIVA;N;0;CENTRO BH;BH;611082.48;796907.81;4326
+4328;2001242025;B06000;LESAO CORPORAL;RUA TOME DE SOUZ;935;67998;4/5/2001 14:16:00;INICIATIVA;N;0;FUNCIONARIOS;BH;611457.69;795178.33;4327
+4329;2001242058;B06000;LESAO CORPORAL;RUA JOSE NUNES C;60;119456;4/5/2001 14:39:00;CIDADAO COMUM;N;;VILA MAGNESITA;BH;602578.26;794932.48;4328
+4330;2001242109;B03000;AMEACA;RUA JOSE NILTON ;312;113144;4/5/2001 15:21:00;CIDADAO COMUM;S;;TIROL;BH;599975.29;790055.55;4329
+4331;2001242161;B04001;HOMICIDIO TENTAD;RUA BANDONION;54;170139;4/5/2001 15:44:00;CIDADAO COMUM;S;AP302;VILA CAFEZAL;BH;613977.41;795089.89;4330
+4332;2001242281;B06000;LESAO CORPORAL;RUA PADRE FEIJO;98;51326;4/5/2001 16:56:00;CIDADAO COMUM;N;;SAUDADE;BH;614957.36;797460.62;4331
+4333;2001242449;B06000;LESAO CORPORAL;RUA SUZANA;45;23284;4/5/2001 18:15:00;CIDADAO COMUM;S;SETOR 9;TAQUARIL;BH;617621.30;797027.01;4332
+4334;2001242573;B03000;AMEACA;RUA GASTAO DA CU;44;30712;4/5/2001 19:20:00;CIDADAO COMUM;S;0;MORRO DAS PEDRAS;BH;608652.47;794813.51;4333
+4335;2001242588;B04002;HOMICIDIO CONSUM;RUA LAUDIVINA LU;74;15380;4/5/2001 19:26:00;CIDADAO COMUM;N;;LETICIA;BH;607823.42;809796.60;4334
+4336;2001242654;B03000;AMEACA;RUA PORTO SEGURO;835;60595;4/5/2001 19:57:00;CIDADAO COMUM;S;;NOVA VISTA;BH;615303.96;800806.89;4335
+4337;2001242668;B06000;LESAO CORPORAL;RUA CAMILO DE BR;636;11896;4/5/2001 20:04:00;CIDADAO COMUM;S;;PADRE EUSTAQUIO;BH;605855.99;798012.24;4336
+4338;2001242705;B06000;LESAO CORPORAL;AV PRESIDENTE AN;1240;4461;4/5/2001 20:27:00;POLICIAL MILITAR;S;;SAO CRISTOVAO;BH;610402.72;799177.41;4337
+4339;2001242735;B06000;LESAO CORPORAL;RUA LEOPOLDO GOM;256;40770;4/5/2001 20:41:00;CIDADAO COMUM;S;0;POMPEIA;BH;614562.10;797847.38;4338
+4340;2001242798;B06000;LESAO CORPORAL;AV NOSSA SENHORA;1900;47996;4/5/2001 21:17:00;INICIATIVA;S;0;SAO PEDRO;BH;610981.82;793299.68;4339
+4341;2001242860;B06000;LESAO CORPORAL;RUA FIRMINO DUAR;287;89879;4/5/2001 21:55:00;POLICIAL MILITAR;S;0;PALMEIRAS;BH;607127.95;791538.27;4340
+4342;2001242964;B03000;AMEACA;RUA QUARENTA E S;91;302841;4/5/2001 23:00:00;CIDADAO COMUM;S;0;NOVO AARAO REIS;BH;614268.33;805792.06;4341
+4343;2001243177;B04001;HOMICIDIO TENTAD;AV NOSSA SENHORA;1900;47996;5/5/2001 00:59:00;INICIATIVA;S;0;SAO PEDRO;BH;610981.82;793299.68;4342
+4344;2001243210;B03000;AMEACA;RUA MONTE ALVERN;579;46385;5/5/2001 01:15:00;CIDADAO COMUM;S;;SAO JOAO BATISTA;BH;607879.30;808121.62;4343
+4345;2001243324;B06000;LESAO CORPORAL;RUA DANIEL DE CA;1679;19630;5/5/2001 02:44:00;CIDADAO COMUM;S;0;NOVA GRANADA;BH;609232.04;794835.81;4344
+4346;2001243372;B04001;HOMICIDIO TENTAD;RUA ANGATURAMA;411;3935;5/5/2001 03:09:00;CIDADAO COMUM;S;;SAO PAULO;BH;612782.45;802779.28;4345
+4347;2001243418;B04002;HOMICIDIO CONSUM;RUA ALIPIO DE ME;667;2378;5/5/2001 03:50:00;CIDADAO COMUM;N;0;JARDIM MONTANHES;BH;606333.50;798725.89;4346
+4348;2001243424;B06000;LESAO CORPORAL;RUA ITAMBE;27;35596;5/5/2001 04:00:00;CIDADAO COMUM;N;;FLORESTA;BH;611768.53;797139.48;4347
+4349;2001243440;B03000;AMEACA;RUA DA BAHIA;1196;81155;5/5/2001 04:18:00;CIDADAO COMUM;S;;LOURDES;BH;611215.54;796459.72;4348
+4350;2001243443;B06000;LESAO CORPORAL;AV CIVILIZACAO;1800;51657;5/5/2001 04:21:00;CIDADAO COMUM;S;;VILA SANTA BRANC;BH;608373.95;809140.92;4349
+4351;2001243461;B04001;HOMICIDIO TENTAD;RUA ITAMIRIM;780;35615;5/5/2001 04:35:00;CIDADAO COMUM;N;;VERA CRUZ;BH;615978.04;798604.99;4350
+4352;2001243469;B06000;LESAO CORPORAL;AV SANTOS DUMONT;436;61950;5/5/2001 04:46:00;CIDADAO COMUM;S;PX436;CENTRO (BH);BH;611217.57;797550.79;4351
+4353;2001243484;B06000;LESAO CORPORAL;AV CIVILIZACAO;1500;51657;5/5/2001 05:02:00;INICIATIVA;S;0;VILA SANTA BRANC;BH;608670.39;808930.49;4352
+4354;2001243499;B06000;LESAO CORPORAL;RUA VINTE E UM D;157;72286;5/5/2001 05:31:00;CIDADAO COMUM;S;PX207;CENTRO (BH);BH;610959.73;797725.04;4353
+4355;2001243537;B03000;AMEACA;AV BARAO HOMEM D;3163;7936;5/5/2001 06:25:00;CIDADAO COMUM;S;;ESTORIL;BH;608238.29;793044.57;4354
+4356;2001243742;B04001;HOMICIDIO TENTAD;RUA JOEL DE MATO;106;84660;5/5/2001 09:19:00;CIDADAO COMUM;N;;SALGADO FILHO;BH;607187.82;793819.19;4355
+4357;2001243783;B05000;SEQUESTRO E CARC;RUA OLINTO MAGAL;560;49834;5/5/2001 09:49:00;CIDADAO COMUM;N;;PADRE EUSTAQUIO;BH;606154.07;797798.82;4356
+4358;2001243795;B04001;HOMICIDIO TENTAD;RUA TIZIU;566;95881;5/5/2001 09:56:00;CIDADAO COMUM;N;CASA B;GOIANIA;BH;615351.18;802590.79;4357
+4359;2001243925;B03000;AMEACA;RUA FORMIGA;294;29136;5/5/2001 11:24:00;CIDADAO COMUM;S;0;SAO CRISTOVAO;BH;610521.09;798844.04;4358
+4360;2001243928;B03000;AMEACA;RUA GASTAO DA CU;44;30712;5/5/2001 11:26:00;CIDADAO COMUM;N;0;MORRO DAS PEDRAS;BH;608652.47;794813.51;4359
+4361;2001243955;B06000;LESAO CORPORAL;RUA DES BRAULIO;648;19917;5/5/2001 11:42:00;INICIATIVA;N;0;VERA CRUZ;BH;616109.45;798454.20;4360
+4362;2001244005;B03000;AMEACA;RUA SAIRA;10;48670;5/5/2001 12:09:00;CIDADAO COMUM;S;0;GOIANIA;BH;615390.10;802975.69;4361
+4363;2001244036;B06000;LESAO CORPORAL;RUA CORONEL SEVE;721;18072;5/5/2001 12:36:00;CIDADAO COMUM;S;;ARAGUAIA;BH;604669.06;789748.35;4362
+4364;2001244056;B04001;HOMICIDIO TENTAD;RUA SAO TOMAS DE;360;63782;5/5/2001 12:49:00;INICIATIVA;N;0;MORRO DO PAPAGAI;BH;610920.76;793642.68;4363
+4365;2001244106;B02000;RIXA;RUA FREI VICENTE;247;30029;5/5/2001 13:23:00;CIDADAO COMUM;N;;SANTA MONICA;BH;607277.72;807964.07;4364
+4366;2001244141;B03000;AMEACA;RUA CURITIBA;1832;19090;5/5/2001 13:45:00;INICIATIVA;S;0;LOURDES;BH;610540.51;796105.15;4365
+4367;2001244144;B03000;AMEACA;RUA ITAIPU;767;35439;5/5/2001 13:46:00;CIDADAO COMUM;N;;VERA CRUZ;BH;616248.63;798433.00;4366
+4368;2001244209;B06000;LESAO CORPORAL;RUA ALCIDA TORRE;186;112936;5/5/2001 14:29:00;CIDADAO COMUM;N;0;CH SANTA MARIA;BH;608957.30;793494.58;4367
+4369;2001244210;B03000;AMEACA;RUA PALESTINA;984;51861;5/5/2001 14:31:00;CIDADAO COMUM;S;;COQUEIROS;BH;603317.91;800262.15;4368
+4370;2001244220;B04001;HOMICIDIO TENTAD;RUA CAPIVARI;792;12918;5/5/2001 14:36:00;CIDADAO COMUM;S;;SERRA;BH;613862.34;794772.93;4369
+4371;2001244251;B04001;HOMICIDIO TENTAD;RUA FILOMENA REI;376;107967;5/5/2001 14:57:00;CIDADAO COMUM;N;0;MANTIQUEIRA;BH;606947.09;811786.56;4370
+4372;2001244255;B06000;LESAO CORPORAL;AV BERNARDO MONT;17;9392;5/5/2001 15:00:00;CIDADAO COMUM;N;0;FUNCIONARIOS;BH;612464.12;797183.95;4371
+4373;2001244274;B06000;LESAO CORPORAL;RUA FLUORINA;605;29091;5/5/2001 15:11:00;CIDADAO COMUM;S;0;POMPEIA;BH;614642.94;797560.93;4372
+4374;2001244288;B03000;AMEACA;RUA ANTENOR PRAT;10;86896;5/5/2001 15:23:00;CIDADAO COMUM;N;;NOVO PAQUETA;BH;605663.03;802024.87;4373
+4375;2001244294;B06000;LESAO CORPORAL;RUA ANTONIO FERR;360;70798;5/5/2001 15:27:00;CIDADAO COMUM;S;;SANTA HELENA (BH;BH;603091.88;790204.68;4374
+4376;2001244431;B06000;LESAO CORPORAL;AV VEREADOR CICE;34;19756;5/5/2001 16:37:00;CIDADAO COMUM;S;CAFU;CORACAO EUCARIST;BH;604819.38;796509.78;4375
+4377;2001244466;B03000;AMEACA;AV DO CONTORNO;11428;17228;5/5/2001 16:56:00;CIDADAO COMUM;S;0;CARLOS PRATES;BH;610540.75;797564.41;4376
+4378;2001244481;B03000;AMEACA;RUA WALDEMAR FAL;114;36429;5/5/2001 17:07:00;CIDADAO COMUM;N;;PLANALTO;BH;610860.67;806612.32;4377
+4379;2001244504;B03000;AMEACA;RUA BINARIO;190;301457;5/5/2001 17:19:00;CIDADAO COMUM;S;0;VILA CAFEZAL;BH;614311.76;795528.44;4378
+4380;2001244535;B03000;AMEACA;RUA ASTOLFO DUTR;953;6426;5/5/2001 17:36:00;CIDADAO COMUM;N;;VERA CRUZ;BH;615614.18;798400.93;4379
+4381;2001244546;B03000;AMEACA;RUA PERDIGAO PEQ;110;83006;5/5/2001 17:41:00;CIDADAO COMUM;N;;OURO PRETO;BH;605834.34;802999.45;4380
+4382;2001244568;B03000;AMEACA;RUA JUVENTUDE;345;99274;5/5/2001 17:54:00;CIDADAO COMUM;N;FR1;CEU AZUL;BH;604514.48;808009.59;4381
+4383;2001244594;B03000;AMEACA;RUA JACAREI;363;13154;5/5/2001 18:11:00;CIDADAO COMUM;S;0;COQUEIROS;BH;602568.63;798483.85;4382
+4384;2001244616;B03000;AMEACA;RUA CIPRIANO DE ;278;15856;5/5/2001 18:20:00;CIDADAO COMUM;S;FU;CINQUENTENARIO;BH;606286.24;793387.96;4383
+4385;2001244668;B06000;LESAO CORPORAL;RUA ANTONIO FERR;360;70798;5/5/2001 18:52:00;CIDADAO COMUM;N;;SANTA HELENA (BH;BH;603091.88;790204.68;4384
+4386;2001244713;B06000;LESAO CORPORAL;RUA CORONEL ANTO;757;17590;5/5/2001 19:12:00;CIDADAO COMUM;S;0;JARDIM LEBLON;BH;605502.27;807469.46;4385
+4387;2001244763;B03000;AMEACA;RUA COCAIS;671;16140;5/5/2001 19:36:00;CIDADAO COMUM;S;0;ESPLANADA;BH;615173.47;798832.72;4386
+4388;2001244779;B04001;HOMICIDIO TENTAD;AV CATULO DA PAI;655;59081;5/5/2001 19:45:00;INICIATIVA;S;0;DAS INDUSTRIAS;BH;604432.91;792729.44;4387
+4389;2001244804;B03000;AMEACA;RUA PEDRA DO IND;10;32774;5/5/2001 20:01:00;INICIATIVA;N;0;CANDELARIA;BH;608567.02;808676.74;4388
+4390;2001244827;B06000;LESAO CORPORAL;RUA ICARAI;412;34004;5/5/2001 20:09:00;CIDADAO COMUM;S;0;ALTO DOS CAICARA;BH;607901.24;798457.83;4389
+4391;2001244863;B06000;LESAO CORPORAL;RUA N;50;37780;5/5/2001 20:32:00;CIDADAO COMUM;N;;MINASCAIXA;BH;608946.55;810184.24;4390
+4392;2001244882;B03000;AMEACA;RUA WEAVER;65;25021;5/5/2001 20:41:00;CIDADAO COMUM;S;;DURVAL DE BARROS;IB;598280.05;790991.94;4391
+4393;2001244887;B03000;AMEACA;AV RAJA GABAGLIA;1000;57830;5/5/2001 20:44:00;INICIATIVA;N;0;GUTIERREZ;BH;609199.03;794395.98;4392
+4394;2001244897;B03000;AMEACA;RUA FREI LUIZ DE;175;29961;5/5/2001 20:51:00;CIDADAO COMUM;S;0;JOAO PINHEIRO;BH;604838.14;795915.30;4393
+4395;2001244917;B03000;AMEACA;BECO NOSSA SENHO;880;170113;5/5/2001 21:04:00;CIDADAO COMUM;S;0;CAFEZAL;BH;614316.22;794914.87;4394
+4396;2001244922;B03000;AMEACA;RUA TUBARAO;14;69791;5/5/2001 21:04:00;CIDADAO COMUM;S;0;CARDOSO;BH;604249.55;787840.85;4395
+4397;2001244943;B06000;LESAO CORPORAL;RUA FURTADO DE M;353;30145;5/5/2001 21:13:00;CIDADAO COMUM;S;;SANTA ROSA;BH;610023.23;803520.42;4396
+4398;2001244996;B03000;AMEACA;RUA BABEL;682;7460;5/5/2001 21:48:00;CIDADAO COMUM;S;0;SAO SALVADOR;BH;603045.44;799312.42;4397
+4399;2001245008;B03000;AMEACA;AV CRISTIANO MAC;4000;18652;5/5/2001 21:54:00;INICIATIVA;N;0;DOS PALMARES;BH;612434.91;802092.92;4398
+4400;2001245028;B06000;LESAO CORPORAL;RUA AUREO DRUMON;60;117435;5/5/2001 22:06:00;INICIATIVA;N;0;CASA BRANCA;BH;616476.94;799773.65;4399
+4401;2001245043;B06000;LESAO CORPORAL;RUA ANIBAL BENEV;75;4083;5/5/2001 22:15:00;INICIATIVA;N;0;SANTA EFIGENIA;BH;613526.59;796519.01;4400
+4402;2001245059;B04001;HOMICIDIO TENTAD;RUA PASSARELA;97;302328;5/5/2001 22:22:00;CIDADAO COMUM;S;0;BONSUCESSO;BH;606149.87;789752.27;4401
+4403;2001245061;B09000;ABANDONO DE INCA;RUA ARTUR DE SA;1107;6211;5/5/2001 22:20:00;CIDADAO COMUM;S;;UNIAO;BH;612854.19;801930.79;4402
+4404;2001245072;B03000;AMEACA;RUA HIGINO DE OL;221;83630;5/5/2001 22:25:00;CIDADAO COMUM;S;;ARAGUAIA;BH;604607.93;789209.81;4403
+4405;2001245077;B06000;LESAO CORPORAL;RUA ITATINGA;15;36000;5/5/2001 22:29:00;INICIATIVA;N;0;FLORAMAR;BH;611719.65;805792.24;4404
+4406;2001245104;B06000;LESAO CORPORAL;AV SIDERAL;579;65721;5/5/2001 22:49:00;CIDADAO COMUM;S;;VISTA ALEGRE;BH;604300.41;793606.82;4405
+4407;2001245204;B05000;SEQUESTRO E CARC;RUA CINQUENTA E ;38;33900;5/5/2001 23:32:00;CIDADAO COMUM;N;0;CONJUNTO FELICID;BH;612593.41;806824.84;4406
+4408;2001245208;B06000;LESAO CORPORAL;RUA CURITIBA;1099;19090;5/5/2001 23:35:00;INICIATIVA;N;0;CENTRO (BH);BH;610750.03;796765.47;4407
+4409;2001245264;B06000;LESAO CORPORAL;RUA DOMINGOS FRA;70;103244;6/5/2001 00:09:00;CIDADAO COMUM;S;;OURO PRETO;BH;606342.21;800670.65;4408
+4410;2001245281;B03000;AMEACA;RUA TAMBORIL;930;66793;6/5/2001 00:14:00;CIDADAO COMUM;S;;CONCORDIA;BH;610977.60;799570.66;4409
+4411;2001245295;B06000;LESAO CORPORAL;AV BIAS FORTES;1526;9553;6/5/2001 00:24:00;CIDADAO COMUM;S;;CENTRO (BH);BH;610343.53;796985.22;4410
+4412;2001245318;B03000;AMEACA;AV ABILIO MACHAD;762;634;6/5/2001 00:38:00;CIDADAO COMUM;S;;INCONFIDENCIA;BH;604926.99;798292.43;4411
+4413;2001245337;B03000;AMEACA;BECO SAO CAETANO;100;300716;6/5/2001 00:48:00;CIDADAO COMUM;N;0;PRADO LOPES;BH;609992.00;799125.07;4412
+4414;2001245350;B06000;LESAO CORPORAL;RUA JOSE FELIX M;680;7416;6/5/2001 00:55:00;CIDADAO COMUM;S;0;MANTIQUEIRA;BH;606479.01;810419.90;4413
+4415;2001245369;B03000;AMEACA;RUA RAMIRO ATHAN;35;94790;6/5/2001 01:10:00;CIDADAO COMUM;S;;ENGENHO NOGUEIRA;BH;606229.15;800580.68;4414
+4416;2001245420;B02000;RIXA;AV TERESA CRISTI;175;67512;6/5/2001 01:39:00;CIDADAO COMUM;S;;CARLOS PRATES;BH;609052.83;797141.23;4415
+4417;2001245481;B05000;SEQUESTRO E CARC;AV AMAZONAS;4434;3140;6/5/2001 02:09:00;CIDADAO COMUM;S;0;NOVA SUISSA;BH;607491.23;795998.20;4416
+4418;2001245482;B06000;LESAO CORPORAL;RUA RADIALISTA G;80;109442;6/5/2001 02:10:00;CIDADAO COMUM;S;;CEU AZUL;BH;604543.26;808886.65;4417
+4419;2001245488;B03000;AMEACA;RUA EXPEDICIONAR;505;82970;6/5/2001 02:13:00;CIDADAO COMUM;S;;SAO LUIZ;BH;606781.64;803296.30;4418
+4420;2001245531;B06000;LESAO CORPORAL;RUA DOS CAETES;180;11376;6/5/2001 02:43:00;CIDADAO COMUM;S;;CENTRO (BH);BH;611446.97;797386.75;4419
+4421;2001245549;B04002;HOMICIDIO CONSUM;RUA BINARIO;128;301457;6/5/2001 02:59:00;CIDADAO COMUM;N;;VILA CAFEZAL;BH;614311.76;795528.44;4420
+4422;2001245585;B03000;AMEACA;RUA EMBU;51;81810;6/5/2001 03:23:00;CIDADAO COMUM;S;0;ITAIPU BH;BH;599072.38;789121.58;4421
+4423;2001245602;B04002;HOMICIDIO CONSUM;RUA AMPERE;117;3484;6/5/2001 03:35:00;CIDADAO COMUM;N;;PRIMEIRO DE MAIO;BH;612156.78;803570.63;4422
+4424;2001245671;B02000;RIXA;RUA JANUARIA;65;36936;6/5/2001 04:28:00;CIDADAO COMUM;S;0;FLORESTA;BH;611563.51;797768.28;4423
+4425;2001245681;B06000;LESAO CORPORAL;RUA BIMBARRA;300;9641;6/5/2001 04:39:00;CIDADAO COMUM;S;;CALAFATE;BH;607195.50;796594.64;4424
+4426;2001245711;B06000;LESAO CORPORAL;AV BRIGADEIRO ED;2520;2860;6/5/2001 05:12:00;CIDADAO COMUM;N;0;SAO SALVADOR;BH;603671.98;799787.66;4425
+4427;2001245736;B02000;RIXA;RUA CONTAGEM;1275;70293;6/5/2001 05:37:00;CIDADAO COMUM;N;L;NOVA VISTA;BH;614505.49;800932.51;4426
+4428;2001245742;B06000;LESAO CORPORAL;RUA POTOMAIO;722;54920;6/5/2001 05:44:00;CIDADAO COMUM;S;0;SAO GERALDO;BH;615767.01;799159.51;4427
+4429;2001245962;B06000;LESAO CORPORAL;AV AMAZONAS;1684;3140;6/5/2001 10:00:00;INICIATIVA;N;0;BARRO PRETO;BH;610031.46;796551.75;4428
+4430;2001245983;B03000;AMEACA;RUA ITAPOA;260;82218;6/5/2001 10:14:00;CIDADAO COMUM;N;0;GUARANI;BH;612898.19;805462.56;4429
+4431;2001246031;B03000;AMEACA;RUA DOM PEDRITO;42;51300;6/5/2001 10:49:00;CIDADAO COMUM;S;0;NOVA VISTA;BH;614692.46;800392.26;4430
+4432;2001246072;B03000;AMEACA;RUA JULITA NUNES;211;130047;6/5/2001 11:22:00;CIDADAO COMUM;N;;MINASCAIXA;BH;609211.34;809819.89;4431
+4433;2001246111;B06000;LESAO CORPORAL;RUA CRUCILANDIA;200;18781;6/5/2001 11:53:00;CIDADAO COMUM;S;;JARDIM LEBLON;BH;605921.59;807710.06;4432
+4434;2001246133;B04001;HOMICIDIO TENTAD;RUA CAMILO DE BR;636;11896;6/5/2001 12:14:00;CIDADAO COMUM;S;;PADRE EUSTAQUIO;BH;605855.99;798012.24;4433
+4435;2001246138;B03000;AMEACA;RUA CIPRESTE;341;73087;6/5/2001 12:21:00;CIDADAO COMUM;S;CAFU;MARAJO;BH;606844.91;792758.83;4434
+4436;2001246139;B06000;LESAO CORPORAL;AV AUGUSTO DE LI;865;6731;6/5/2001 12:22:00;CIDADAO COMUM;N;0;BARRO PRETO;BH;610544.42;796719.11;4435
+4437;2001246190;B06000;LESAO CORPORAL;AV DOUTOR ALVARO;91;117665;6/5/2001 13:03:00;CIDADAO COMUM;S;APTO 704;SANTA MONICA;BH;608473.61;807215.71;4436
+4438;2001246226;B04001;HOMICIDIO TENTAD;RUA G;5;36721;6/5/2001 13:29:00;CIDADAO COMUM;S;;MINASCAIXA;BH;609150.38;809830.09;4437
+4439;2001246285;B04001;HOMICIDIO TENTAD;AV BARAO HOMEM D;1843;7936;6/5/2001 14:07:00;CIDADAO COMUM;S;;NOVA GRANADA;BH;608102.37;793516.46;4438
+4440;2001246379;B06000;LESAO CORPORAL;RUA LAGOINHAS;140;40221;6/5/2001 15:26:00;CIDADAO COMUM;S;;JARDIM FLORENCIA;BH;604925.31;810345.40;4439
+4441;2001246395;B04001;HOMICIDIO TENTAD;BECO MARCO ANTON;220;170750;6/5/2001 15:36:00;CIDADAO COMUM;N;;MORRO DAS PEDRAS;BH;608957.14;794564.47;4440
+4442;2001246412;B03000;AMEACA;RUA CRECIUMA;90;18549;6/5/2001 15:45:00;CIDADAO COMUM;N;APB;CARDOSO;BH;603433.71;787957.69;4441
+4443;2001246424;B03000;AMEACA;RUA JOAQUIM DE P;165;15349;6/5/2001 15:55:00;CIDADAO COMUM;S;ESCOLA ANTONIA F;SAO JOAO BATISTA;BH;608533.39;808412.51;4442
+4444;2001246447;B03000;AMEACA;BECO PRINCIPAL;240;301983;6/5/2001 16:13:00;CIDADAO COMUM;S;PROX. AO CAMPO;SAO JOSE;BH;605159.47;799250.89;4443
+4445;2001246487;B06000;LESAO CORPORAL;RUA FERNAO DIAS;388;28133;6/5/2001 16:34:00;CIDADAO COMUM;S;;CASA BRANCA;BH;616135.79;799507.45;4444
+4446;2001246555;B06000;LESAO CORPORAL;RUA LAURO SOARES;278;106599;6/5/2001 17:17:00;CIDADAO COMUM;S;;NOVA YORK;BH;608565.48;811276.66;4445
+4447;2001246610;B06000;LESAO CORPORAL;RUA JEQUIRICA;440;37258;6/5/2001 17:49:00;CIDADAO COMUM;S;;CONCORDIA;BH;611201.11;799723.09;4446
+4448;2001246650;B04001;HOMICIDIO TENTAD;RUA PADRE PEDRO ;175;51657;6/5/2001 18:06:00;CIDADAO COMUM;S;;VENDA NOVA;BH;609671.68;808130.71;4447
+4449;2001246669;B03000;AMEACA;RUA SAO GREGORIO;120;62710;6/5/2001 18:14:00;CIDADAO COMUM;N;0;AARAO REIS;BH;612875.24;803517.95;4448
+4450;2001246713;B06000;LESAO CORPORAL;RUA SAO JOAO;70;105426;6/5/2001 18:42:00;CIDADAO COMUM;N;;PAULO SEXTO;BH;616253.42;806196.50;4449
+4451;2001246717;B03000;AMEACA;AV NOSSA SENHORA;2078;47996;6/5/2001 18:42:00;CIDADAO COMUM;N;EM FRENTE RUA PA;SAO PEDRO;BH;610858.87;793078.63;4450
+4452;2001246731;B04001;HOMICIDIO TENTAD;RUA PROFESSOR CA;63;55443;6/5/2001 18:49:00;CIDADAO COMUM;S;;INDUSTRIAL RODRI;BH;615917.11;808278.38;4451
+4453;2001246821;B06000;LESAO CORPORAL;RUA MARILANDIA;71;96525;6/5/2001 19:41:00;CIDADAO COMUM;N;CAA;ANTONIO RIBEIRO ;BH;615507.36;806041.85;4452
+4454;2001246920;B03000;AMEACA;AV CRISTIANO MAC;7505;18652;6/5/2001 20:39:00;CIDADAO COMUM;S;0;VILA SUZANA;BH;611862.37;803269.47;4453
+4455;2001246959;B06000;LESAO CORPORAL;AV PARANA;33;52230;6/5/2001 21:00:00;CIDADAO COMUM;N;;CENTRO (BH);BH;610863.26;797477.33;4454
+4456;2001247166;B03000;AMEACA;RUA CURVELO;50;19150;6/5/2001 23:10:00;CIDADAO COMUM;S;AP102;FLORESTA;BH;612139.97;797829.32;4455
+4457;2001247198;B02000;RIXA;RUA SILVA ALVARE;614;65810;6/5/2001 23:33:00;INICIATIVA;N;0;SAO GERALDO;BH;615391.08;799419.26;4456
+4458;2001247265;B03000;AMEACA;PRACA DIVINA PAS;5;68846;7/5/2001 00:17:00;CIDADAO COMUM;S;;SAO GABRIEL;BH;614186.09;804239.54;4457
+4459;2001247283;B06000;LESAO CORPORAL;RUA SILVESTRE FE;510;65992;7/5/2001 00:31:00;CIDADAO COMUM;S;0;SAGRADA FAMILIA;BH;612773.97;798453.23;4458
+4460;2001247292;B06000;LESAO CORPORAL;RUA CERRO CORA;184;21553;7/5/2001 00:42:00;CIDADAO COMUM;S;;COQUEIROS;BH;602113.72;798098.87;4459
+4461;2001247338;B03000;AMEACA;RUA PEDRA SABAO;389;86509;7/5/2001 01:40:00;CIDADAO COMUM;N;0;PIRATININGA;BH;606405.34;809276.69;4460
+4462;2001247372;B06000;LESAO CORPORAL;RUA MARIETA ALEX;240;51036;7/5/2001 02:17:00;CIDADAO COMUM;S;;MINASCAIXA;BH;609420.35;809489.23;4461
+4463;2001247456;B03000;AMEACA;RUA MARIETA ALEX;210;51036;7/5/2001 04:07:00;CIDADAO COMUM;N;0;MINASCAIXA;BH;609447.04;809466.64;4462
+4464;2001247509;B03000;AMEACA;RUA JOEL JOSE DE;489;68698;7/5/2001 06:42:00;CIDADAO COMUM;S;;DAS INDUSTRIAS;BH;605136.14;791090.50;4463
+4465;2001247608;B06000;LESAO CORPORAL;RUA W QUATRO;514;122634;7/5/2001 08:15:00;CIDADAO COMUM;N;0;PONGELUPE;BH;603929.62;787324.64;4464
+4466;2001247906;B04001;HOMICIDIO TENTAD;RUA JOSE FELIX M;1716;7416;7/5/2001 11:22:00;CIDADAO COMUM;S;;MANTIQUEIRA;BH;606727.06;811723.89;4465
+4467;2001247964;B03000;AMEACA;RUA BARAO DE AIU;271;7835;7/5/2001 11:56:00;CIDADAO COMUM;S;0;JOAO PINHEIRO;BH;604506.82;796526.27;4466
+4468;2001247991;B06000;LESAO CORPORAL;RUA GOIAS;151;31393;7/5/2001 12:17:00;CIDADAO COMUM;N;;CENTRO (BH);BH;611426.58;796490.69;4467
+4469;2001248003;B06000;LESAO CORPORAL;RUA CONDE DE VAL;175;16758;7/5/2001 12:26:00;CIDADAO COMUM;N;0;NOVA CACHOEIRINH;BH;609756.08;801316.65;4468
+4470;2001248046;B03000;AMEACA;RUA BARAO DE COR;665;7910;7/5/2001 12:59:00;CIDADAO COMUM;N;0;SAO TOMAZ;BH;610090.94;805370.91;4469
+4471;2001248128;B06000;LESAO CORPORAL;RUA CURITIBA;400;19090;7/5/2001 14:06:00;INICIATIVA;S;0;CENTRO (BH);BH;610902.12;797451.92;4470
+4472;2001248142;B06000;LESAO CORPORAL;RUA FELIPE CAMAR;12;27938;7/5/2001 14:19:00;INICIATIVA;N;0;ESPLANADA;BH;613862.69;798419.73;4471
+4473;2001248286;B06000;LESAO CORPORAL;RUA DOS GUARANIS;169;32181;7/5/2001 15:49:00;INICIATIVA;S;0;CENTRO (BH);BH;610753.12;797462.10;4472
+4474;2001248370;B03000;AMEACA;RUA JOAQUIM ALVE;21;80887;7/5/2001 16:36:00;CIDADAO COMUM;N;;BETANIA;BH;605381.69;792920.20;4473
+4475;2001248490;B06000;LESAO CORPORAL;RUA CONSELHEIRO ;88;17067;7/5/2001 17:39:00;CIDADAO COMUM;S;;SANTO ANDRE;BH;609523.31;798729.48;4474
+4476;2001248493;B03000;AMEACA;RUA BELA EMILIA;200;96175;7/5/2001 17:40:00;CIDADAO COMUM;S;;OLARIA;BH;601337.35;789370.00;4475
+4477;2001248512;B03000;AMEACA;RUA CASABLANCA;3;13850;7/5/2001 17:50:00;CIDADAO COMUM;S;;SANTA TEREZINHA;BH;604682.45;802172.96;4476
+4478;2001248543;B04002;HOMICIDIO CONSUM;RUA GUAICURUS;500;32009;7/5/2001 18:03:00;CIDADAO COMUM;N;;CENTRO (BH);BH;611180.98;797650.33;4477
+4479;2001248631;B03000;AMEACA;RUA AMERICANOS;20;3254;7/5/2001 18:51:00;CIDADAO COMUM;S;0;FAZENDINHA;BH;603696.78;790070.38;4478
+4480;2001248736;B06000;LESAO CORPORAL;AV ABILIO MACHAD;3848;634;7/5/2001 19:41:00;CIDADAO COMUM;S;;SERRANO;BH;603259.17;800621.53;4479
+4481;2001248817;B06000;LESAO CORPORAL;RUA BARAO DO MON;960;63653;7/5/2001 20:24:00;CIDADAO COMUM;N;APTO-104;CARDOSO;BH;604059.47;787725.48;4480
+4482;2001248840;B04001;HOMICIDIO TENTAD;RUA RIO NOVO;129;58817;7/5/2001 20:41:00;INICIATIVA;N;0;LAGOINHA;BH;610648.13;798503.93;4481
+4483;2001248918;B03000;AMEACA;RUA CLAUDIO BRAN;340;15960;7/5/2001 21:34:00;CIDADAO COMUM;S;;TUPI;BH;612814.66;806637.99;4482
+4484;2001248981;B03000;AMEACA;AV PORTUGAL;1809;54816;7/5/2001 22:20:00;INICIATIVA;N;0;JARDIM ATLANTICO;BH;606307.50;805239.45;4483
+4485;2001249078;B06000;LESAO CORPORAL;RUA RODRIGUES AL;410;59126;7/5/2001 23:37:00;CIDADAO COMUM;N;AP101;PRADO LOPES;BH;610095.84;798792.47;4484
+4486;2001249185;B06000;LESAO CORPORAL;RUA SAIRA;307;48670;8/5/2001 01:54:00;CIDADAO COMUM;N;;GOIANIA;BH;615401.41;803182.53;4485
+4487;2001249218;B06000;LESAO CORPORAL;AV MONTESE;672;46675;8/5/2001 02:21:00;INICIATIVA;S;0;SANTA BRANCA;BH;608400.48;806406.08;4486
+4488;2001249666;B06000;LESAO CORPORAL;AV AUGUSTO DE LI;253;6731;8/5/2001 10:25:00;INICIATIVA;N;0;CENTRO (BH);BH;611160.79;796551.47;4487
+4489;2001249723;B03000;AMEACA;RUA DO SERMAO;148;64990;8/5/2001 11:01:00;CIDADAO COMUM;S;;SAO JOSE;BH;605777.82;798909.90;4488
+4490;2001249731;B03000;AMEACA;RUA JANAITIBA;888;36889;8/5/2001 11:07:00;CIDADAO COMUM;S;;SAO GERALDO;BH;616130.34;799168.86;4489
+4491;2001249752;B06000;LESAO CORPORAL;RUA DAMASCO;451;19614;8/5/2001 11:19:00;INICIATIVA;S;0;SAO SALVADOR;BH;603250.69;799385.12;4490
+4492;2001249903;B03000;AMEACA;RUA CAMPESTRE;428;12063;8/5/2001 13:03:00;CIDADAO COMUM;S;FU;SAGRADA FAMILIA;BH;612910.03;798086.76;4491
+4493;2001249924;B03000;AMEACA;RUA JAIR LOPES C;48;122101;8/5/2001 13:12:00;CIDADAO COMUM;S;0;JARDIM DOS COMER;BH;607851.73;810870.09;4492
+4494;2001249938;B03000;AMEACA;RUA ALEXANDRE LE;35;50162;8/5/2001 13:20:00;CIDADAO COMUM;N;;ESTRELA DALVA;BH;607696.16;792453.23;4493
+4495;2001249952;B03000;AMEACA;RUA NASCIMENTO;580;47261;8/5/2001 13:28:00;CIDADAO COMUM;S;0;FLAVIO MARQUES D;BH;604508.07;788992.97;4494
+4496;2001250073;B03000;AMEACA;RUA DA BAHIA;1148;81155;8/5/2001 14:49:00;INICIATIVA;S;SL1202;LOURDES;BH;611230.12;796512.50;4495
+4497;2001250149;B03000;AMEACA;RUA 51;114;302847;8/5/2001 15:29:00;CIDADAO COMUM;S;FU;NOVO AARAO REIS;BH;614109.28;805610.20;4496
+4498;2001250158;B03000;AMEACA;AV DOM PEDRO II;1900;53145;8/5/2001 15:35:00;CIDADAO COMUM;S;LJ154;CARLOS PRATES;BH;608983.67;798422.37;4497
+4499;2001250327;B06000;LESAO CORPORAL;RUA JANAITIBA;1347;36889;8/5/2001 17:02:00;CIDADAO COMUM;S;;CAETANO FURQUIM;BH;616608.63;799314.07;4498
+4500;2001250329;B04001;HOMICIDIO TENTAD;RUA JAGUARA;601;36775;8/5/2001 17:03:00;CIDADAO COMUM;S;L;SAUDADE;BH;615359.14;797487.70;4499
+4501;2001250339;B03000;AMEACA;RUA SANTA LUZIA;175;60904;8/5/2001 17:10:00;CIDADAO COMUM;N;0;NOVA CINTRA;BH;605214.60;793215.43;4500
+4502;2001250587;B06000;LESAO CORPORAL;RUA SEBASTIAO MO;409;93555;8/5/2001 19:18:00;INICIATIVA;S;0;TIROL;BH;600565.02;789378.17;4501
+4503;2001250608;B06000;LESAO CORPORAL;RUA CORONEL ABIL;52;17518;8/5/2001 19:30:00;CIDADAO COMUM;S;0;CAETANO FURQUIM;BH;616348.03;799463.87;4502
+4504;2001250693;B06000;LESAO CORPORAL;RUA ANTONIO DE A;1080;4345;8/5/2001 20:24:00;INICIATIVA;S;0;LOURDES;BH;610929.46;795211.87;4503
+4505;2001250704;B06000;LESAO CORPORAL;RUA CANDIDO SIQU;307;12615;8/5/2001 20:29:00;CIDADAO COMUM;S;;NOVA VISTA;BH;615150.40;800896.13;4504
+4506;2001250799;B05000;SEQUESTRO E CARC;AV PRESIDENTE AN;7823;4461;8/5/2001 21:25:00;CIDADAO COMUM;S;;SAO LUIZ;BH;608734.45;804398.54;4505
+4507;2001250835;B03000;AMEACA;RUA ALCINDO GUAN;31;98707;8/5/2001 21:47:00;CIDADAO COMUM;S;;CAMPO ALEGRE;BH;610349.19;806959.33;4506
+4508;2001250838;B03000;AMEACA;RUA REGENCIA;61;301448;8/5/2001 21:51:00;CIDADAO COMUM;N;CAB;VILA CAFEZAL;BH;614150.86;795438.09;4507
+4509;2001250851;B04002;HOMICIDIO CONSUM;RUA ESPIRITO SAN;946;26052;8/5/2001 21:58:00;CIDADAO COMUM;N;;CENTRO (BH);BH;611138.96;796746.01;4508
+4510;2001250879;B03000;AMEACA;RUA SANTA INES D;44;94227;8/5/2001 22:19:00;CIDADAO COMUM;S;FU;SANTA CECILIA;BH;601180.74;788442.37;4509
+4511;2001250957;B03000;AMEACA;RUA CRUZEIRO DO ;291;75168;8/5/2001 23:08:00;CIDADAO COMUM;S;;COQUEIROS;BH;602379.66;799734.65;4510
+4512;2001250967;B08000;VIOLACAO DE DOMI;RUA MONTE SIAO;231;46559;8/5/2001 23:18:00;CIDADAO COMUM;N;0;SERRA;BH;613107.73;795189.59;4511
+4513;2001250992;B06000;LESAO CORPORAL;RUA GUAICURUS;451;32009;8/5/2001 23:37:00;INICIATIVA;N;0;CENTRO BH;BH;611210.22;797600.57;4512
+4514;2001251009;B03000;AMEACA;RUA DOS UAICAS;360;18970;8/5/2001 23:50:00;CIDADAO COMUM;S;0;SANTA MONICA;BH;606735.24;807473.53;4513
+4515;2001251028;B04001;HOMICIDIO TENTAD;AV ANTONIO FRANC;33;53390;9/5/2001 00:07:00;INICIATIVA;N;0;BANDEIRANTES;BH;604326.94;804327.93;4514
+4516;2001251082;B03000;AMEACA;AV AMAZONAS;6768;3140;9/5/2001 00:39:00;CIDADAO COMUM;S;;GAMELEIRA;BH;605414.68;795606.90;4515
+4517;2001251129;B06000;LESAO CORPORAL;RUA MARTE;400;44929;9/5/2001 01:33:00;CIDADAO COMUM;S;0;VILA SATELITE;BH;610232.40;808735.34;4516
+4518;2001251167;B06000;LESAO CORPORAL;RUA BORDA DA MAT;78;10171;9/5/2001 02:21:00;CIDADAO COMUM;S;;BONFIM;BH;609993.99;798314.38;4517
+4519;2001251309;B06000;LESAO CORPORAL;RUA JOSE CHRISTI;25;106949;9/5/2001 07:19:00;CIDADAO COMUM;S;;NOVA CINTRA;BH;605857.11;793405.06;4518
+4520;2001251441;B03000;AMEACA;RUA FREI GASPAR;157;29886;9/5/2001 08:54:00;CIDADAO COMUM;N;;CABANA;BH;604297.25;794201.39;4519
+4521;2001251538;B03000;AMEACA;RUA CAMILO DE BR;636;11896;9/5/2001 10:09:00;CIDADAO COMUM;S;;PADRE EUSTAQUIO;BH;605855.99;798012.24;4520
+4522;2001251557;B03000;AMEACA;RUA DOUTOR SYLVI;925;123274;9/5/2001 10:17:00;CIDADAO COMUM;N;AP104;CASTELO;BH;604372.86;800845.50;4521
+4523;2001251581;B03000;AMEACA;RUA SANTO ANTONI;35;25986;9/5/2001 10:34:00;CIDADAO COMUM;S;;TAQUARIL;BH;617296.15;797925.88;4522
+4524;2001251679;B03000;AMEACA;RUA ZILDA REVERT;111;110612;9/5/2001 11:28:00;CIDADAO COMUM;N;;JARDIM GUANABARA;BH;611726.73;807911.32;4523
+4525;2001251715;B06000;LESAO CORPORAL;RUA RONDONIA;235;17127;9/5/2001 11:57:00;CIDADAO COMUM;S;0;GLORIA;BH;603466.48;798566.15;4524
+4526;2001251728;B04001;HOMICIDIO TENTAD;PRACA SAO VICENT;10;63902;9/5/2001 12:08:00;POLICIAL MILITAR;N;0;PADRE EUSTAQUIO;BH;605483.12;797829.06;4525
+4527;2001251748;B04001;HOMICIDIO TENTAD;RUA JOSE MAURO D;255;102125;9/5/2001 12:24:00;CIDADAO COMUM;S;;MINEIRAO;BH;601633.89;785370.24;4526
+4528;2001251750;B06000;LESAO CORPORAL;BECO CRAVO;20;301263;9/5/2001 12:27:00;INICIATIVA;S;0;MORRO DO PAPAGAI;BH;610463.43;793275.60;4527
+4529;2001251862;B06000;LESAO CORPORAL;AV AFONSO PENA;590;1259;9/5/2001 13:51:00;INICIATIVA;N;0;CENTRO BH;BH;611078.27;797193.62;4528
+4530;2001251905;B06000;LESAO CORPORAL;RUA PLATINA;1640;54453;9/5/2001 14:22:00;CIDADAO COMUM;N;0;CALAFATE;BH;607780.27;796697.87;4529
+4531;2001251930;B03000;AMEACA;AV GUARAPARI;126;20711;9/5/2001 14:38:00;CIDADAO COMUM;S;;JARDIM ATLANTICO;BH;607081.25;805991.12;4530
+4532;2001252019;B06000;LESAO CORPORAL;RUA QUINTA DA BO;60;99841;9/5/2001 15:33:00;CIDADAO COMUM;S;;VILA SANTA BRANC;BH;605014.26;809772.21;4531
+4533;2001252026;B04001;HOMICIDIO TENTAD;RUA JOAO PIRES;397;37866;9/5/2001 15:38:00;CIDADAO COMUM;S;;CABANA;BH;604773.50;794306.75;4532
+4534;2001252171;B06000;LESAO CORPORAL;RUA JOAO PIRES;1;37866;9/5/2001 16:58:00;CIDADAO COMUM;S;0;JARDINOPOLIS;BH;604514.03;794634.06;4533
+4535;2001252172;B04001;HOMICIDIO TENTAD;RUA ABILIO FERNA;381;95421;9/5/2001 17:02:00;CIDADAO COMUM;S;;JARDIM VITORIA;BH;616838.69;804321.77;4534
+4536;2001252178;B03000;AMEACA;RUA MIRAI;122;45919;9/5/2001 17:05:00;CIDADAO COMUM;S;;SANTO ANDRE;BH;609482.35;798454.10;4535
+4537;2001252223;B03000;AMEACA;RUA BURI;61;10764;9/5/2001 17:29:00;CIDADAO COMUM;S;;CACHOEIRINHA;BH;610312.98;801362.88;4536
+4538;2001252455;B04001;HOMICIDIO TENTAD;RUA JOAO LUIZ DE;410;37765;9/5/2001 19:30:00;CIDADAO COMUM;S;0;NOVA CACHOEIRINH;BH;609353.56;800937.01;4537
+4539;2001252497;B06000;LESAO CORPORAL;RUA F;198;41280;9/5/2001 19:55:00;CIDADAO COMUM;S;CAFR;CH CONFISCO;BH;602835.56;803046.97;4538
+4540;2001252506;B03000;AMEACA;RUA ILMENITA;237;82117;9/5/2001 19:59:00;CIDADAO COMUM;S;AP206;GLALIJA;BH;603069.39;794320.03;4539
+4541;2001252550;B03000;AMEACA;RUA MINERVA;640;45846;9/5/2001 20:29:00;CIDADAO COMUM;S;AP101;ADELAIDE;BH;607168.91;798964.10;4540
+4542;2001252585;B03000;AMEACA;RUA ARACATI;71;5307;9/5/2001 21:03:00;CIDADAO COMUM;S;AP302;NOVA SUISSA;BH;607257.82;795899.28;4541
+4543;2001252624;B03000;AMEACA;RUA JOAO SOARES ;23;74111;9/5/2001 21:22:00;CIDADAO COMUM;S;;JARDIM DOS COMER;BH;607768.98;811531.53;4542
+4544;2001252725;B03000;AMEACA;RUA SIRIUS;93;88113;9/5/2001 22:16:00;INICIATIVA;S;0;SANTA CRUZ (BARR;BH;603753.99;789251.72;4543
+4545;2001252726;B03000;AMEACA;RUA JOSE FELIX M;1716;7416;9/5/2001 22:16:00;CIDADAO COMUM;N;;MANTIQUEIRA;BH;606727.06;811723.89;4544
+4546;2001252732;B06000;LESAO CORPORAL;RUA K;35;36599;9/5/2001 22:17:00;CIDADAO COMUM;N;0;MINASCAIXA;BH;609084.97;809987.42;4545
+4547;2001252750;B03000;AMEACA;RUA MODELO;152;46026;9/5/2001 22:34:00;CIDADAO COMUM;N;0;MARIA VIRGINIA;BH;612120.40;802858.31;4546
+4548;2001252842;B06000;LESAO CORPORAL;AV SILVA LOBO;1600;65889;9/5/2001 23:38:00;CIDADAO COMUM;S;;GRAJAU;BH;607981.65;795035.94;4547
+4549;2001252859;B06000;LESAO CORPORAL;AV AFONSO PENA;3357;1259;9/5/2001 23:54:00;CIDADAO COMUM;S;0;CRUZEIRO;BH;612514.75;794823.74;4548
+4550;2001252865;B03000;AMEACA;RUA GUSTAVO DA S;1693;32617;10/5/2001 00:01:00;CIDADAO COMUM;N;;SANTA INES;BH;613754.67;800364.22;4549
+4551;2001252876;B03000;AMEACA;RUA JOAO ERMES;4;116561;10/5/2001 00:09:00;CIDADAO COMUM;S;0;PARAISO;BH;614519.97;796126.23;4550
+4552;2001252886;B03000;AMEACA;RUA TORONTO;70;100350;10/5/2001 00:13:00;CIDADAO COMUM;S;0;TREVO;BH;604033.51;806095.79;4551
+4553;2001252988;B03000;AMEACA;RUA CAMBE;126;40250;10/5/2001 01:52:00;CIDADAO COMUM;S;0;COQUEIROS;BH;602264.49;799116.82;4552
+4554;2001253024;B06000;LESAO CORPORAL;RUA FLOR DAS PED;690;28801;10/5/2001 02:38:00;CIDADAO COMUM;N;0;JARDIM MONTANHES;BH;606323.95;799397.43;4553
+4555;2001253106;B03000;AMEACA;RUA JANAUBA;320;36891;10/5/2001 05:00:00;CIDADAO COMUM;N;0;VISTA ALEGRE;BH;604453.47;793310.88;4554
+4556;2001253244;B03000;AMEACA;RUA JACUTINGA;808;36750;10/5/2001 08:18:00;CIDADAO COMUM;S;0;PADRE EUSTAQUIO;BH;605679.99;797701.48;4555
+4557;2001253246;B03000;AMEACA;RUA QUEOPS;131;60021;10/5/2001 08:17:00;CIDADAO COMUM;N;0;VISTA ALEGRE;BH;604351.56;793342.99;4556
+4558;2001253429;B06000;LESAO CORPORAL;RUA DO LAGO;147;40161;10/5/2001 10:38:00;CIDADAO COMUM;S;;SAO MARCOS;BH;614062.40;802766.77;4557
+4559;2001253441;B06000;LESAO CORPORAL;RUA SANTA ALEXAN;1030;60309;10/5/2001 10:50:00;CIDADAO COMUM;S;CS;ARAGUAIA;BH;604760.87;789628.98;4558
+4560;2001253475;B06000;LESAO CORPORAL;RUA CODAJAS;980;77898;10/5/2001 11:20:00;INICIATIVA;S;0;SAO GABRIEL;BH;613552.43;804595.92;4559
+4561;2001253510;B03000;AMEACA;RUA STA HELENA;103;60670;10/5/2001 11:46:00;INICIATIVA;N;0;SERRA;BH;613322.81;794435.59;4560
+4562;2001253541;B03000;AMEACA;RUA CORCOVADO;136;14894;10/5/2001 12:18:00;CIDADAO COMUM;S;;JARDIM AMERICA;BH;606973.95;794896.86;4561
+4563;2001253573;B03000;AMEACA;RUA VIOLETA DOS ;146;3989;10/5/2001 12:47:00;CIDADAO COMUM;S;;LINDEIA;BH;599182.03;790934.89;4562
+4564;2001253608;B03000;AMEACA;RUA ENGENHO DO S;1031;80427;10/5/2001 13:14:00;CIDADAO COMUM;S;0;ENGENHO NOGUEIRA;BH;606142.82;800344.91;4563
+4565;2001253831;B03000;AMEACA;AV JOSE BONIFACI;189;38579;10/5/2001 15:50:00;INICIATIVA;S;;PRADO LOPES;BH;610210.56;798939.37;4564
+4566;2001253991;B03000;AMEACA;RUA SANTA FRANCI;179;60655;10/5/2001 17:05:00;CIDADAO COMUM;S;0;APARECIDA SETIMA;BH;608755.22;800253.46;4565
+4567;2001254092;B03000;AMEACA;AV ERICO VERISSI;500;41671;10/5/2001 17:50:00;INICIATIVA;N;0;SAO JOAO BATISTA;BH;608155.75;808592.03;4566
+4568;2001254109;B06000;LESAO CORPORAL;AV RAJA GABAGLIA;1492;57830;10/5/2001 17:57:00;INICIATIVA;N;0;CIDADE JARDIM;BH;608850.52;794091.22;4567
+4569;2001254114;B03000;AMEACA;RUA FERNAO DIAS;251;28133;10/5/2001 17:58:00;CIDADAO COMUM;N;0;CASA BRANCA;BH;615998.48;798638.40;4568
+4570;2001254147;B06000;LESAO CORPORAL;RUA CORONEL JOSE;20;17892;10/5/2001 18:14:00;CIDADAO COMUM;S;0;SANTA CRUZ;BH;610767.91;802211.31;4569
+4571;2001254205;B06000;LESAO CORPORAL;RUA PASSOS;346;52458;10/5/2001 18:42:00;CIDADAO COMUM;S;AP204;CARLOS PRATES;BH;608956.39;798267.55;4570
+4572;2001254256;B03000;AMEACA;RUA ANTONIO SILV;90;87108;10/5/2001 19:07:00;CIDADAO COMUM;S;BLOCO 201;DA LAGOA;BH;604689.68;808944.30;4571
+4573;2001254276;B03000;AMEACA;RUA PORTO;890;60601;10/5/2001 19:13:00;CIDADAO COMUM;S;;SAO FRANCISCO;BH;608967.59;801936.11;4572
+4574;2001254344;B03000;AMEACA;RUA ALEXANDRE LE;6;50162;10/5/2001 19:55:00;CIDADAO COMUM;S;;ESTRELA DALVA;BH;607625.18;792478.81;4573
+4575;2001254455;B02000;RIXA;RUA PINTOR ATAID;390;53870;10/5/2001 20:55:00;CIDADAO COMUM;S;;TUPI;BH;613618.30;805975.02;4574
+4576;2001254485;B03000;AMEACA;RUA TUBARAO;56;69791;10/5/2001 21:11:00;CIDADAO COMUM;S;;CARDOSO;BH;604185.10;788056.10;4575
+4577;2001254513;B06000;LESAO CORPORAL;RUA LINCOLN;167;41136;10/5/2001 21:26:00;CIDADAO COMUM;N;0;UNIAO;BH;612532.35;801354.69;4576
+4578;2001254514;B06000;LESAO CORPORAL;RUA LUIZ CASTANH;495;41697;10/5/2001 21:26:00;CIDADAO COMUM;S;;SANTA CRUZ;BH;610908.25;802008.16;4577
+4579;2001254518;B04001;HOMICIDIO TENTAD;RUA SAO PEDRO DA;38;102989;10/5/2001 21:31:00;INICIATIVA;S;0;OLHOS DAGUA;BH;608147.07;788329.74;4578
+4580;2001254545;B03000;AMEACA;RUA JOAQUIM DE F;1265;38033;10/5/2001 21:46:00;CIDADAO COMUM;S;0;SANTA HELENA (BH;BH;603033.64;790158.08;4579
+4581;2001254652;B04002;HOMICIDIO CONSUM;RUA SERENATA;467;172351;10/5/2001 23:04:00;CIDADAO COMUM;S;;VILA CAFEZAL;BH;614363.58;795470.27;4580
+4582;2001254691;B03000;AMEACA;RUA ARTUR DE SA;956;6211;10/5/2001 23:24:00;CIDADAO COMUM;S;0;UNIAO;BH;612941.69;801856.30;4581
+4583;2001254693;B03000;AMEACA;RUA ONOFRE D`OLI;225;84746;10/5/2001 23:26:00;CIDADAO COMUM;N;LJB;DA LAGOA;BH;604554.22;809621.65;4582
+4584;2001254717;B04001;HOMICIDIO TENTAD;AV ELISIO DE BRI;777;25251;10/5/2001 23:43:00;CIDADAO COMUM;N;;BOA VISTA;BH;615141.65;799844.87;4583
+4585;2001254722;B04001;HOMICIDIO TENTAD;RUA STO ANTONIO ;671;61806;10/5/2001 23:46:00;CIDADAO COMUM;S;AP101;SANTO ANTONIO;BH;610832.25;793990.71;4584
+4586;2001254870;B03000;AMEACA;RUA BRUGES;29;86694;11/5/2001 02:02:00;CIDADAO COMUM;N;;JARDIM EUROPA;BH;608435.52;810233.73;4585
+4587;2001254908;B06000;LESAO CORPORAL;AV PRUDENTE DE M;569;55774;11/5/2001 02:59:00;CIDADAO COMUM;S;;SANTO ANTONIO;BH;610114.08;794733.79;4586
+4588;2001254923;B06000;LESAO CORPORAL;AV AFONSO PENA;329;1259;11/5/2001 03:25:00;CIDADAO COMUM;S;PX262;CENTRO (BH);BH;610993.53;797462.63;4587
+4589;2001254939;B06000;LESAO CORPORAL;AV GETULIO VARGA;710;81256;11/5/2001 03:43:00;INICIATIVA;S;0;FUNCIONARIOS;BH;611981.03;795397.59;4588
+4590;2001255241;B03000;AMEACA;RUA QUINTINO SIM;85;96903;11/5/2001 09:19:00;CIDADAO COMUM;S;;ANTONIO RIBEIRO ;BH;615085.10;805917.04;4589
+4591;2001255370;B04001;HOMICIDIO TENTAD;RUA POUSO ALEGRE;1333;54932;11/5/2001 10:47:00;INICIATIVA;N;0;FLORESTA;BH;612371.12;797930.27;4590
+4592;2001255480;B03000;AMEACA;AV DO CONTORNO;9384;17228;11/5/2001 11:59:00;CIDADAO COMUM;S;;BARRO PRETO;BH;609125.98;796561.06;4591
+4593;2001255571;B02000;RIXA;RUA BOAVENTURA;1878;9783;11/5/2001 13:08:00;INICIATIVA;N;0;LIBERDADE;BH;609483.47;804149.44;4592
+4594;2001255627;B06000;LESAO CORPORAL;AV DO CONTORNO;12;17228;11/5/2001 13:40:00;CIDADAO COMUM;S;0;CENTRO (BH);BH;610893.99;797847.30;4593
+4595;2001255641;B06000;LESAO CORPORAL;PRACA CARLOS CHA;60;13328;11/5/2001 13:48:00;CIDADAO COMUM;S;INICIATIVA POV 5;SANTO AGOSTINHO;BH;610052.84;795756.23;4594
+4596;2001255646;B06000;LESAO CORPORAL;RUA DOM FERRAO;74;22225;11/5/2001 13:51:00;CIDADAO COMUM;S;;SAO JOSE;BH;605189.39;798429.64;4595
+4597;2001255733;B03000;AMEACA;AV FRANCISCO SA;787;29656;11/5/2001 14:58:00;CIDADAO COMUM;S;;PRADO;BH;608927.04;796068.26;4596
+4598;2001255870;B04001;HOMICIDIO TENTAD;RUA CAPELINHA;400;12785;11/5/2001 16:14:00;INICIATIVA;N;0;SERRA;BH;613522.48;794649.03;4597
+4599;2001255937;B06000;LESAO CORPORAL;RUA DOS EXPEDICI;570;26989;11/5/2001 16:44:00;CIDADAO COMUM;S;;SANTA AMELIA;BH;606784.87;805558.89;4598
+4600;2001256002;B03000;AMEACA;AV TERESA CRISTI;2900;67512;11/5/2001 17:23:00;CIDADAO COMUM;S;;CALAFATE;BH;606779.86;796797.64;4599
+4601;2001256059;B06000;LESAO CORPORAL;RUA SAO PAULO;779;63464;11/5/2001 17:49:00;CIDADAO COMUM;S;0;CENTRO (BH);BH;610959.32;797010.67;4600
+4602;2001256203;B08000;VIOLACAO DE DOMI;RUA ALBUQUERQUE ;77;10880;11/5/2001 19:06:00;CIDADAO COMUM;N;;CAMPO ALEGRE;BH;610445.17;807211.91;4601
+4603;2001256263;B03000;AMEACA;AV TERESA CRISTI;685;67512;11/5/2001 19:38:00;CIDADAO COMUM;S;0;CARLOS PRATES;BH;602258.86;791337.75;4602
+4604;2001256401;B03000;AMEACA;RUA JOAQUIM FRAN;739;38046;11/5/2001 20:46:00;CIDADAO COMUM;S;;IPIRANGA;BH;611821.21;801601.31;4603
+4605;2001256429;B03000;AMEACA;RUA VERISSIMO GU;119;102720;11/5/2001 20:58:00;INICIATIVA;S;0;ITAIPU BH;BH;598941.05;789762.58;4604
+4606;2001256448;B06000;LESAO CORPORAL;RUA PROGRESSO;112;55759;11/5/2001 21:14:00;CIDADAO COMUM;S;0;PADRE EUSTAQUIO;BH;607146.45;796825.23;4605
+4607;2001256494;B06000;LESAO CORPORAL;RUA DAVID RABELO;769;19702;11/5/2001 21:36:00;CIDADAO COMUM;S;CSCSA;INCONFIDENCIA;BH;604970.59;798819.86;4606
+4608;2001256569;B04001;HOMICIDIO TENTAD;RUA CONCEICAO DE;378;16515;11/5/2001 22:30:00;CIDADAO COMUM;S;0;JARDIM LEBLON;BH;605972.65;807322.31;4607
+4609;2001256632;B03000;AMEACA;RUA DAS TABOADAS;55;300190;11/5/2001 23:08:00;CIDADAO COMUM;S;;SAO JOAO BATISTA;BH;608788.79;808021.90;4608
+4610;2001256740;B03000;AMEACA;AV DOM JOAO VI;1010;22294;12/5/2001 00:12:00;INICIATIVA;S;0;PALMEIRAS;BH;606644.46;791666.74;4609
+4611;2001256745;B06000;LESAO CORPORAL;RUA DOS TIMBIRAS;652;67682;12/5/2001 00:15:00;INICIATIVA;N;0;FUNCIONARIOS;BH;612095.69;796055.44;4610
+4612;2001256755;B06000;LESAO CORPORAL;RUA LINDOLFO DE ;1263;41164;12/5/2001 00:25:00;INICIATIVA;N;0;JARDIM AMERICA;BH;607430.53;794486.80;4611
+4613;2001256780;B04002;HOMICIDIO CONSUM;RUA CARACA;1071;12990;12/5/2001 00:37:00;CIDADAO COMUM;N;AP502;SERRA;BH;613823.56;794597.43;4612
+4614;2001256786;B03000;AMEACA;RUA CONSELHEIRO ;2303;17095;12/5/2001 00:39:00;CIDADAO COMUM;S;CS;SANTA EFIGENIA;BH;613771.63;797289.73;4613
+4615;2001256796;B06000;LESAO CORPORAL;RUA BRAZOPOLIS;121;10521;12/5/2001 00:46:00;CIDADAO COMUM;N;;FLORESTA;BH;612251.86;797133.18;4614
+4616;2001256802;B03000;AMEACA;RUA AGUAS DA PRA;11;13706;12/5/2001 00:50:00;CIDADAO COMUM;S;0;ITAIPU BH;BH;599099.77;789179.92;4615
+4617;2001256838;B06000;LESAO CORPORAL;RUA APORE;200;5099;12/5/2001 01:12:00;INICIATIVA;N;0;PARQUE RIACHUELO;BH;609728.86;800605.94;4616
+4618;2001256881;B06000;LESAO CORPORAL;RUA GUAICURUS;618;32009;12/5/2001 01:40:00;CIDADAO COMUM;S;EN618;CENTRO (BH);BH;611072.00;797681.10;4617
+4619;2001256912;B02000;RIXA;AV ITAITUBA;184;35454;12/5/2001 02:08:00;CIDADAO COMUM;S;0;BOA VISTA;BH;614838.03;799461.10;4618
+4620;2001256996;B06000;LESAO CORPORAL;RUA FREI CRISTOV;149;58278;12/5/2001 03:10:00;CIDADAO COMUM;N;;VILA OESTE;BH;605116.46;795770.62;4619
+4621;2001256998;B06000;LESAO CORPORAL;RUA ANGATURAMA;20;3935;12/5/2001 03:12:00;INICIATIVA;S;0;SAO PAULO;BH;612443.80;802655.56;4620
+4622;2001257019;B04001;HOMICIDIO TENTAD;BECO SANTA CATAR;40;170255;12/5/2001 03:36:00;CIDADAO COMUM;S;;CABANA;BH;604766.78;794259.59;4621
+4623;2001257030;B03000;AMEACA;RUA SAO CRISTOVA;5;25378;12/5/2001 03:46:00;CIDADAO COMUM;S;0;TAQUARIL;BH;617079.81;797404.89;4622
+4624;2001257031;B06000;LESAO CORPORAL;PRACA IRAJA;10;34928;12/5/2001 03:47:00;INICIATIVA;N;0;SAO CRISTOVAO;BH;610536.61;799448.54;4623
+4625;2001257035;B03000;AMEACA;RUA CANTORA MAYS;47;129431;12/5/2001 03:48:00;CIDADAO COMUM;S;0;TUPI;BH;614037.14;806688.21;4624
+4626;2001257078;B06000;LESAO CORPORAL;RUA ISABEL BUENO;1421;35136;12/5/2001 04:21:00;CIDADAO COMUM;S;0;JARAGUA;BH;609989.71;804029.32;4625
+4627;2001257096;B06000;LESAO CORPORAL;RUA ALOIZIO NOGU;45;73005;12/5/2001 04:33:00;CIDADAO COMUM;S;;PLANALTO;BH;609451.75;807323.17;4626
+4628;2001257201;B03000;AMEACA;RUA QUITANDINHA;123;57600;12/5/2001 06:32:00;CIDADAO COMUM;N;;SERRANO;BH;603488.06;800504.16;4627
+4629;2001257238;B06000;LESAO CORPORAL;RUA ARTUR DE SA;1098;6211;12/5/2001 07:18:00;CIDADAO COMUM;S;;UNIAO;BH;613434.92;801356.54;4628
+4630;2001257424;B03000;AMEACA;RUA RIO DAS FLOR;180;92770;12/5/2001 09:56:00;CIDADAO COMUM;S;0;PILAR;BH;607838.63;788171.21;4629
+4631;2001257509;B04001;HOMICIDIO TENTAD;RUA PRINCIPAL;9;300224;12/5/2001 11:07:00;CIDADAO COMUM;N;;MORRO DO PAPAGAI;BH;610432.17;793618.37;4630
+4632;2001257550;B03000;AMEACA;RUA GRAO MOGOL;202;31769;12/5/2001 11:30:00;INICIATIVA;S;0;CARMO;BH;611751.26;794655.75;4631
+4633;2001257562;B06000;LESAO CORPORAL;RUA BURI;51;10764;12/5/2001 11:39:00;CIDADAO COMUM;N;;CACHOEIRINHA;BH;610328.10;801370.73;4632
+4634;2001257579;B03000;AMEACA;RUA CORONEL JOAQ;1210;87063;12/5/2001 11:51:00;CIDADAO COMUM;S;CA3;CEU AZUL;BH;605036.32;808629.66;4633
+4635;2001257598;B06000;LESAO CORPORAL;RUA CASTIGLIANO;728;14056;12/5/2001 12:00:00;CIDADAO COMUM;S;0;PADRE EUSTAQUIO;BH;607280.97;797470.91;4634
+4636;2001257617;B03000;AMEACA;RUA MESSIAS COUT;200;127580;12/5/2001 12:18:00;INICIATIVA;N;0;CEU AZUL;BH;604895.88;807321.01;4635
+4637;2001257650;B03000;AMEACA;RUA SAO PAULO;834;63464;12/5/2001 12:38:00;CIDADAO COMUM;S;0;CENTRO (BH);BH;610919.36;796978.01;4636
+4638;2001257662;B03000;AMEACA;RUA JULIO MESQUI;283;81849;12/5/2001 12:41:00;CIDADAO COMUM;N;0;ITAIPU BH;BH;599468.18;788771.65;4637
+4639;2001257669;B03000;AMEACA;RUA SERRA DA MAN;965;109240;12/5/2001 12:49:00;CIDADAO COMUM;N;AP301;ANTONIO RIBEIRO ;BH;614881.68;807326.00;4638
+4640;2001257680;B06000;LESAO CORPORAL;RUA ALBERT SCHAR;7;1854;12/5/2001 12:57:00;CIDADAO COMUM;S;;MAGNESITA;BH;604047.83;793934.04;4639
+4641;2001257717;B06000;LESAO CORPORAL;AV DOUTOR ALVARO;800;117665;12/5/2001 13:25:00;CIDADAO COMUM;S;0;SANTA BRANCA;BH;608440.88;807202.81;4640
+4642;2001257731;B06000;LESAO CORPORAL;AV ASSIS CHATEAU;990;6353;12/5/2001 13:34:00;INICIATIVA;S;0;FLORESTA;BH;611413.87;797012.89;4641
+4643;2001257750;B06000;LESAO CORPORAL;RUA LEVI FREIRE;250;116546;12/5/2001 13:44:00;CIDADAO COMUM;N;0;PARAISO;BH;614520.44;796034.35;4642
+4644;2001257817;B06000;LESAO CORPORAL;RUA E;153;78718;12/5/2001 14:20:00;CIDADAO COMUM;N;;CH JATOBA IV;BH;600281.70;787829.99;4643
+4645;2001257833;B06000;LESAO CORPORAL;RUA RONDONIA;236;17127;12/5/2001 14:29:00;CIDADAO COMUM;N;CAFR;GLORIA;BH;603443.13;798525.97;4644
+4646;2001257838;B03000;AMEACA;RUA MARIA GERTRU;219;98993;12/5/2001 14:34:00;CIDADAO COMUM;S;0;CEU AZUL;BH;604827.21;808352.50;4645
+4647;2001257858;B03000;AMEACA;AV UM;860;301245;12/5/2001 14:49:00;CIDADAO COMUM;N;;NOVO AARAO REIS;BH;614827.68;805630.99;4646
+4648;2001257878;B03000;AMEACA;RUA PROMISSOES;202;55761;12/5/2001 14:58:00;CIDADAO COMUM;S;0;NOVA ESPERANCA;BH;608818.71;799315.46;4647
+4649;2001257922;B06000;LESAO CORPORAL;RUA RADIALISTA M;15;79562;12/5/2001 15:23:00;CIDADAO COMUM;S;;CEU AZUL;BH;604475.94;808710.04;4648
+4650;2001257973;B03000;AMEACA;AV CRISTIANO MAC;542;18652;12/5/2001 15:43:00;CIDADAO COMUM;S;;DA GRACA;BH;612039.80;798916.59;4649
+4651;2001258015;B03000;AMEACA;RUA CAPITAO NELS;315;72002;12/5/2001 16:04:00;CIDADAO COMUM;S;;VENDA NOVA;BH;609032.48;808918.34;4650
+4652;2001258028;B03000;AMEACA;RUA QUATRO DE MA;5;57118;12/5/2001 16:15:00;INICIATIVA;S;0;LEONINA;BH;608663.34;793662.61;4651
+4653;2001258049;B06000;LESAO CORPORAL;RUA CONCEICAO DA;500;14258;12/5/2001 16:23:00;CIDADAO COMUM;S;;SANTA TEREZINHA;BH;604382.93;802978.96;4652
+4654;2001258098;B06000;LESAO CORPORAL;RUA LUIZ VAZ DE ;61;105089;12/5/2001 16:49:00;CIDADAO COMUM;S;;VERA CRUZ;BH;616937.66;797132.02;4653
+4655;2001258176;B03000;AMEACA;RUA JOAO ALFREDO;55;37447;12/5/2001 17:29:00;CIDADAO COMUM;N;CS;HORTO;BH;613927.89;798257.61;4654
+4656;2001258215;B06000;LESAO CORPORAL;RUA CORONEL PEDR;199;18031;12/5/2001 17:46:00;CIDADAO COMUM;N;0;CIDADE NOVA;BH;612288.62;800421.50;4655
+4657;2001258223;B03000;AMEACA;AV ARI BARROSO;430;5902;12/5/2001 17:51:00;CIDADAO COMUM;S;FU;TUPI;BH;612787.40;806269.41;4656
+4658;2001258271;B06000;LESAO CORPORAL;RUA DOS INDEPEND;121;109165;12/5/2001 18:11:00;CIDADAO COMUM;S;;VILA SANTA RITA;BH;601142.53;787637.02;4657
+4659;2001258273;B03000;AMEACA;RUA DOS AEROVIAR;290;1186;12/5/2001 18:11:00;CIDADAO COMUM;S;0;LIBERDADE;BH;609377.19;803887.06;4658
+4660;2001258286;B03000;AMEACA;RUA SAGRES;101;59889;12/5/2001 18:19:00;CIDADAO COMUM;N;AP301;BARROCA;BH;607891.35;796012.94;4659
+4661;2001258297;B06000;LESAO CORPORAL;RUA ODILIA GONCA;52;49080;12/5/2001 18:33:00;CIDADAO COMUM;N;;PIRAJA;BH;614070.68;803150.89;4660
+4662;2001258304;B03000;AMEACA;RUA JOAQUIM CARD;414;71835;12/5/2001 18:35:00;CIDADAO COMUM;S;;TUPI;BH;613454.61;806454.28;4661
+4663;2001258307;B06000;LESAO CORPORAL;RUA DEZESSEIS;49;32821;12/5/2001 18:36:00;CIDADAO COMUM;S;SUPERMERCADO VEM;CONJUNTO FELICID;BH;612162.50;807188.97;4662
+4664;2001258333;B06000;LESAO CORPORAL;RUA L;117;78787;12/5/2001 18:51:00;CIDADAO COMUM;S;;CH JATOBA IV;BH;600594.32;787827.80;4663
+4665;2001258352;B06000;LESAO CORPORAL;RUA SENHOR DOS P;175;64817;12/5/2001 18:58:00;CIDADAO COMUM;S;0;SAO FRANCISCO;BH;609781.32;802567.71;4664
+4666;2001258372;B06000;LESAO CORPORAL;AV AFONSO PENA;1901;1259;12/5/2001 19:07:00;INICIATIVA;N;0;FUNCIONARIOS;BH;611800.51;796073.43;4665
+4667;2001258405;B03000;AMEACA;RUA ELIZABETH;194;80200;12/5/2001 19:18:00;CIDADAO COMUM;S;;COQUEIROS;BH;602038.28;798951.11;4666
+4668;2001258412;B04001;HOMICIDIO TENTAD;RUA OTAVIANO FAB;110;63307;12/5/2001 19:23:00;CIDADAO COMUM;S;CSFR;APARECIDA SETIMA;BH;608857.09;801112.17;4667
+4669;2001258432;B03000;AMEACA;AV PRESIDENTE AN;852;4461;12/5/2001 19:30:00;CIDADAO COMUM;S;0;LAGOINHA;BH;610473.85;798803.90;4668
+4670;2001258474;B03000;AMEACA;RUA MUQUICABA;210;65343;12/5/2001 19:50:00;CIDADAO COMUM;0;;COQUEIROS;BH;602234.45;798202.08;4669
+4671;2001258510;B03000;AMEACA;RUA JOAQUIM ASSI;26;92679;12/5/2001 20:11:00;CIDADAO COMUM;S;;CALIFORNIA;BH;603354.37;796982.95;4670
+4672;2001258518;B03000;AMEACA;RUA AUGUSTO MEIE;95;6757;12/5/2001 20:14:00;CIDADAO COMUM;S;CAA;TUPI;BH;613750.20;805945.30;4671
+4673;2001258559;B04002;HOMICIDIO CONSUM;RUA MONSENHOR PA;3;46329;12/5/2001 20:34:00;CIDADAO COMUM;N;;VISTA ALEGRE;BH;604730.86;793414.75;4672
+4674;2001258618;B06000;LESAO CORPORAL;RUA JOSE MARIA B;425;38380;12/5/2001 21:07:00;CIDADAO COMUM;N;0;SANTA MONICA;BH;607704.21;807669.09;4673
+4675;2001258644;B03000;AMEACA;RUA ALBERT SCHAR;84;1854;12/5/2001 21:16:00;CIDADAO COMUM;N;0;MAGNESITA;BH;603931.13;793864.90;4674
+4676;2001258665;B04001;HOMICIDIO TENTAD;RUA APORE;193;5099;12/5/2001 21:25:00;CIDADAO COMUM;S;0;CACHOEIRINHA;BH;609739.93;800581.13;4675
+4677;2001258690;B03000;AMEACA;AV PRESIDENTE CA;3001;55125;12/5/2001 21:37:00;INICIATIVA;S;INICIATIVA VP780;CAICARA;BH;608178.06;800324.32;4676
+4678;2001258700;B03000;AMEACA;RUA NOVA PONTE;308;48466;12/5/2001 21:46:00;INICIATIVA;S;102;SALGADO FILHO;BH;606459.09;794174.01;4677
+4679;2001258701;B06000;LESAO CORPORAL;RUA PEREIRA PASS;287;53375;12/5/2001 21:46:00;CIDADAO COMUM;S;;PRADO LOPES;BH;610162.72;798759.81;4678
+4680;2001258710;B06000;LESAO CORPORAL;RUA CONCEICAO DE;488;16515;12/5/2001 21:47:00;CIDADAO COMUM;S;0;JARDIM LEBLON;BH;605827.11;807322.29;4679
+4681;2001258721;B06000;LESAO CORPORAL;RUA EXPEDITO FLA;557;84847;12/5/2001 21:57:00;CIDADAO COMUM;S;;DA LAGOA;BH;604351.06;809302.59;4680
+4682;2001258729;B06000;LESAO CORPORAL;RUA PERNAMBUCO;1299;53463;12/5/2001 22:02:00;CIDADAO COMUM;N;0;FUNCIONARIOS;BH;611431.27;794981.10;4681
+4683;2001258731;B03000;AMEACA;RUA SAO JERONIMO;1271;79102;12/5/2001 22:03:00;CIDADAO COMUM;N;0;INSTITUTO AGRONO;BH;613760.56;799445.72;4682
+4684;2001258748;B03000;AMEACA;AV PRESIDENTE CA;3001;55125;12/5/2001 22:14:00;INICIATIVA;S;0;CAICARA;BH;608178.06;800324.32;4683
+4685;2001258751;B03000;AMEACA;RUA CASTELO DO P;167;47930;12/5/2001 22:14:00;CIDADAO COMUM;S;;SAO GABRIEL;BH;613593.07;804563.66;4684
+4686;2001258784;B06000;LESAO CORPORAL;RUA PADRE PEDRO ;175;51657;12/5/2001 22:32:00;CIDADAO COMUM;S;0;VENDA NOVA;BH;609671.68;808130.71;4685
+4687;2001258791;B06000;LESAO CORPORAL;RUA DA BAHIA;2115;81155;12/5/2001 22:39:00;CIDADAO COMUM;S;0;LOURDES;BH;611025.25;795571.99;4686
+4688;2001258840;B03000;AMEACA;RUA CASSITERITA;292;5612;12/5/2001 23:07:00;CIDADAO COMUM;S;FU;SANTA INES;BH;614227.45;800375.00;4687
+4689;2001258888;B05000;SEQUESTRO E CARC;AV PRESIDENTE AN;4013;4461;12/5/2001 23:28:00;CIDADAO COMUM;S;;SAO FRANCISCO;BH;609536.57;802154.10;4688
+4690;2001258889;B06000;LESAO CORPORAL;RUA JOSE BARTOLO;80;38525;12/5/2001 23:31:00;CIDADAO COMUM;S;;CONJUNTO ALIPIO ;BH;603707.54;799638.81;4689
+4691;2001258894;B03000;AMEACA;RUA MARIA MARTIN;1594;44248;12/5/2001 23:33:00;CIDADAO COMUM;S;AP102;SAGRADA FAMILIA;BH;613282.33;799066.17;4690
+4692;2001258932;B06000;LESAO CORPORAL;AV DOUTOR ALVARO;850;117665;13/5/2001 00:04:00;INICIATIVA;N;0;SANTA MONICA;BH;608763.01;807333.73;4691
+4693;2001258938;B04001;HOMICIDIO TENTAD;AV BARAO HOMEM D;1051;7936;13/5/2001 00:09:00;CIDADAO COMUM;S;;JARDIM AMERICA;BH;607839.34;794525.74;4692
+4694;2001259004;B04001;HOMICIDIO TENTAD;RUA VINTE E UM;112;122095;13/5/2001 00:56:00;CIDADAO COMUM;S;0;JARDIM DOS COMER;BH;607804.35;811033.87;4693
+4695;2001259034;B06000;LESAO CORPORAL;AV SANTOS DUMONT;680;61950;13/5/2001 01:18:00;INICIATIVA;S;0;CENTRO BH;BH;610999.13;797614.04;4694
+4696;2001259042;B08000;VIOLACAO DE DOMI;RUA DIAMANTINA;983;21162;13/5/2001 01:23:00;CIDADAO COMUM;N;;LAGOINHA;BH;610536.33;798826.01;4695
+4697;2001259058;B06000;LESAO CORPORAL;RUA FORMIGA;50;29136;13/5/2001 01:29:00;CIDADAO COMUM;S;0;LAGOINHA;BH;610336.11;798756.88;4696
+4698;2001259073;B06000;LESAO CORPORAL;RUA DOS CARIJOS;412;81243;13/5/2001 01:38:00;CIDADAO COMUM;S;0;CENTRO (BH);BH;611080.93;797191.84;4697
+4699;2001259088;B06000;LESAO CORPORAL;RUA PADRE PEDRO ;175;51657;13/5/2001 01:49:00;CIDADAO COMUM;S;;VENDA NOVA;BH;609671.68;808130.71;4698
+4700;2001259091;B06000;LESAO CORPORAL;RUA DIRAMIR LOUR;384;70530;13/5/2001 01:50:00;CIDADAO COMUM;N;AN      CA2;TIROL;BH;600155.33;789384.39;4699
+4701;2001259106;B04001;HOMICIDIO TENTAD;RUA RAMIRO SIQUE;325;128858;13/5/2001 02:02:00;CIDADAO COMUM;S;;CASTANHEIRAS (TA;BH;617477.62;797374.15;4700
+4702;2001259137;B06000;LESAO CORPORAL;RUA PROGRESSO;1375;55759;13/5/2001 02:21:00;CIDADAO COMUM;S;0;MONSENHOR MESSIA;BH;607167.73;798091.18;4701
+4703;2001259187;B06000;LESAO CORPORAL;RUA SAO BORJA;568;61620;13/5/2001 02:57:00;CIDADAO COMUM;N;;BOA VISTA;BH;615135.57;800346.41;4702
+4704;2001259312;B06000;LESAO CORPORAL;RUA FERNANDES TO;245;81271;13/5/2001 04:27:00;CIDADAO COMUM;S;FR250;FUNCIONARIOS;BH;611285.26;794930.19;4703
+4705;2001259339;B04002;HOMICIDIO CONSUM;RUA CURITIBA;32;19090;13/5/2001 04:57:00;CIDADAO COMUM;S;;CENTRO (BH);BH;610999.16;797826.98;4704
+4706;2001259357;B06000;LESAO CORPORAL;AV OLINTO MEIREL;2507;49847;13/5/2001 05:24:00;INICIATIVA;N;0;ARAGUAIA;BH;603968.63;788996.75;4705
+4707;2001259390;B06000;LESAO CORPORAL;RUA MAJOR WALTER;129;72390;13/5/2001 06:31:00;CIDADAO COMUM;N;CASA 03;PLANALTO;BH;609728.93;807677.63;4706
+4708;2001259396;B04001;HOMICIDIO TENTAD;RUA ARAPARI;43;5410;13/5/2001 06:38:00;CIDADAO COMUM;S;;SAO GERALDO;BH;615934.87;799624.71;4707
+4709;2001259453;B04001;HOMICIDIO TENTAD;AV DOM PEDRO I;175;48337;13/5/2001 08:02:00;CIDADAO COMUM;N;0;JARDIM ATLANTICO;BH;608131.43;805671.13;4708
+4710;2001259543;B03000;AMEACA;RUA GUARAIBA;198;96291;13/5/2001 09:15:00;CIDADAO COMUM;S;0;SAO GABRIEL;BH;614587.96;804585.04;4709
+4711;2001259612;B06000;LESAO CORPORAL;RUA CAVAQUINHO;15;301465;13/5/2001 10:20:00;CIDADAO COMUM;S;;VILA CAFEZAL;BH;614161.77;795395.78;4710
+4712;2001259659;B03000;AMEACA;AV AMAZONAS;5681;3140;13/5/2001 11:02:00;CIDADAO COMUM;S;0;NOVA SUISSA;BH;606524.08;795878.14;4711
+4713;2001259679;B03000;AMEACA;RUA ANTONIO MARZ;386;94520;13/5/2001 11:27:00;CIDADAO COMUM;S;0;OURO PRETO;BH;606238.36;800769.75;4712
+4714;2001259693;B06000;LESAO CORPORAL;RUA PORTO ALEGRE;590;44061;13/5/2001 11:46:00;CIDADAO COMUM;S;0;CARLOS PRATES;BH;608751.81;797637.69;4713
+4715;2001259698;B03000;AMEACA;RUA CONSELHEIRO ;51;17095;13/5/2001 11:50:00;CIDADAO COMUM;N;;CENTRO (BH);BH;612543.94;797025.95;4714
+4716;2001259729;B06000;LESAO CORPORAL;RUA QUARENTA E U;83;302837;13/5/2001 12:15:00;CIDADAO COMUM;S;;NOVO AARAO REIS;BH;614183.34;805806.43;4715
+4717;2001259756;B03000;AMEACA;RUA ESTANCIA;20;51597;13/5/2001 12:39:00;CIDADAO COMUM;S;;NOVA VISTA;BH;615503.60;800840.93;4716
+4718;2001259768;B03000;AMEACA;AV ARTUR BERNARD;132;60844;13/5/2001 12:53:00;CIDADAO COMUM;S;0;VILA PARIS;BH;610081.34;793505.68;4717
+4719;2001259775;B03000;AMEACA;RUA ARMANDO ZILL;22;9235;13/5/2001 12:59:00;CIDADAO COMUM;N;0;PLANALTO;BH;609811.97;807080.31;4718
+4720;2001259843;B06000;LESAO CORPORAL;RUA PALMIRA;642;51950;13/5/2001 13:57:00;INICIATIVA;S;0;SERRA;BH;613125.73;794915.16;4719
+4721;2001259867;B08000;VIOLACAO DE DOMI;RUA DES DRUMOND;72;19958;13/5/2001 14:16:00;INICIATIVA;N;0;SERRA;BH;612661.90;795485.42;4720
+4722;2001259953;B06000;LESAO CORPORAL;RUA ESTRELA DALV;107;97080;13/5/2001 15:12:00;CIDADAO COMUM;S;;ANTONIO RIBEIRO ;BH;614946.94;806014.91;4721
+4723;2001260002;B03000;AMEACA;RUA JOSE DE LIMA;516;38897;13/5/2001 15:43:00;CIDADAO COMUM;S;;FLORAMAR;BH;612310.27;805965.70;4722
+4724;2001260033;B03000;AMEACA;RUA ARMINDA MORE;61;5997;13/5/2001 15:58:00;CIDADAO COMUM;S;CAA;NOVA BARROCA;BH;607411.92;792906.03;4723
+4725;2001260048;B06000;LESAO CORPORAL;RUA ARACI;556;5335;13/5/2001 16:04:00;CIDADAO COMUM;N;;PINDORAMA;BH;602554.36;797419.36;4724
+4726;2001260112;B06000;LESAO CORPORAL;RUA MARIANA OLIV;178;94573;13/5/2001 16:42:00;CIDADAO COMUM;S;;OURO PRETO;BH;606307.92;800693.24;4725
+4727;2001260121;B03000;AMEACA;AV WASHINGTON LU;1571;73701;13/5/2001 16:45:00;CIDADAO COMUM;N;;SAO BERNARDO;BH;610155.55;805082.41;4726
+4728;2001260133;B03000;AMEACA;RUA HELIO GILBER;132;55991;13/5/2001 16:51:00;CIDADAO COMUM;S;;FLORAMAR;BH;611809.55;806797.10;4727
+4729;2001260148;B06000;LESAO CORPORAL;RUA MARQUESA DE ;55;44830;13/5/2001 17:00:00;CIDADAO COMUM;N;;JARDIM ROMA;BH;612053.62;805151.76;4728
+4730;2001260169;B06000;LESAO CORPORAL;RUA ANTONIO PEIX;120;12379;13/5/2001 17:10:00;INICIATIVA;S;0;ADELAIDE;BH;607417.84;798044.53;4729
+4731;2001260177;B04001;HOMICIDIO TENTAD;RUA DAS PETUNIAS;1449;11870;13/5/2001 17:15:00;INICIATIVA;S;0;LINDEIA;BH;598916.78;790521.90;4730
+4732;2001260221;B04002;HOMICIDIO CONSUM;RUA MUNICIPAL;180;171677;13/5/2001 17:44:00;CIDADAO COMUM;N;;VILA CEMIG;BH;605640.33;788590.82;4731
+4733;2001260257;B03000;AMEACA;RUA JOAQUIM HENR;145;94371;13/5/2001 18:04:00;CIDADAO COMUM;N;0;OURO PRETO;BH;606357.63;801486.70;4732
+4734;2001260321;B03000;AMEACA;RUA ADELIA CARME;250;1031;13/5/2001 18:40:00;CIDADAO COMUM;S;;ITAIPU BH;BH;599636.37;789371.37;4733
+4735;2001260324;B03000;AMEACA;RUA DOUTOR ALBER;149;23114;13/5/2001 18:43:00;CIDADAO COMUM;S;0;HELIOPOLIS;BH;610892.27;805316.02;4734
+4736;2001260366;B03000;AMEACA;RUA PAULO GONCAL;113;96538;13/5/2001 19:06:00;CIDADAO COMUM;N;0;SERRA VERDE;BH;608906.50;810218.95;4735
+4737;2001260376;B06000;LESAO CORPORAL;RUA DONA LALA FE;518;18712;13/5/2001 19:12:00;CIDADAO COMUM;S;CAFR;MILIONARIOS;BH;604501.36;790651.11;4736
+4738;2001260405;B06000;LESAO CORPORAL;RUA NARCISIO TEI;327;99072;13/5/2001 19:27:00;CIDADAO COMUM;N;;CEU AZUL;BH;605477.17;808266.38;4737
+4739;2001260431;B03000;AMEACA;RUA OSCAR NEGRAO;190;17776;13/5/2001 19:40:00;CIDADAO COMUM;S;;GAMELEIRA;BH;605051.19;794788.68;4738
+4740;2001260457;B03000;AMEACA;RUA MAJOR DELFIN;1900;42620;13/5/2001 19:53:00;CIDADAO COMUM;S;L;SAO FRANCISCO;BH;609452.74;801950.14;4739
+4741;2001260466;B03000;AMEACA;RUA LOURIVAL CAR;300;72318;13/5/2001 19:58:00;CIDADAO COMUM;S;0;PLANALTO;BH;610813.53;806285.84;4740
+4742;2001260469;B06000;LESAO CORPORAL;RUA MARIA CANDID;169;114957;13/5/2001 20:00:00;CIDADAO COMUM;S;AP101;PAQUETA;BH;605538.04;802484.02;4741
+4743;2001260507;B03000;AMEACA;RUA F;98;302327;13/5/2001 20:23:00;CIDADAO COMUM;S;0;BONSUCESSO;BH;606197.92;789828.69;4742
+4744;2001260519;B06000;LESAO CORPORAL;RUA REDENTOR;26;58177;13/5/2001 20:29:00;POLICIAL MILITAR;S;0;SAO JOSE;BH;605803.83;798763.19;4743
+4745;2001260531;B06000;LESAO CORPORAL;RUA ANIL;135;4130;13/5/2001 20:37:00;CIDADAO COMUM;S;CA03;COQUEIROS;BH;603022.64;799841.35;4744
+4746;2001260545;B09000;ABANDONO DE INCA;RUA PAPOULA;36;31844;13/5/2001 20:45:00;CIDADAO COMUM;S;LJA;REGINA;BH;598758.69;790411.48;4745
+4747;2001260558;B03000;AMEACA;RUA POTOMAIO;748;54920;13/5/2001 20:53:00;CIDADAO COMUM;S;;SAO GERALDO;BH;615802.83;799168.91;4746
+4748;2001260574;B04001;HOMICIDIO TENTAD;RUA CINCO;354;81647;13/5/2001 21:03:00;CIDADAO COMUM;N;;OLHOS DAGUA;BH;605646.00;790609.97;4747
+4749;2001260592;B04001;HOMICIDIO TENTAD;RUA PRINCIPAL;300;170504;13/5/2001 21:13:00;CIDADAO COMUM;S;0;MORRO DAS PEDRAS;BH;608596.19;793933.42;4748
+4750;2001260602;B03000;AMEACA;RUA VINTE E SEIS;355;72780;13/5/2001 21:17:00;CIDADAO COMUM;N;;LEONINA;BH;608535.90;793292.69;4749
+4751;2001260613;B03000;AMEACA;RUA WALTER IANNI;163;82186;13/5/2001 21:22:00;INICIATIVA;S;0;SAO GABRIEL;BH;613063.80;804020.31;4750
+4752;2001260619;B03000;AMEACA;RUA LUIZ LOPES;233;94431;13/5/2001 21:26:00;CIDADAO COMUM;S;;OURO PRETO;BH;606306.33;801223.55;4751
+4753;2001260637;B03000;AMEACA;RUA MIRAMAR;11;96929;13/5/2001 21:36:00;CIDADAO COMUM;N;;ANTONIO RIBEIRO ;BH;614767.26;805814.49;4752
+4754;2001260657;B06000;LESAO CORPORAL;RUA AFONSO DE CA;94;1246;13/5/2001 21:48:00;CIDADAO COMUM;S;;UNIVERSITARIO;BH;610387.82;802693.09;4753
+4755;2001260665;B03000;AMEACA;RUA ITAJOBI;21;35482;13/5/2001 21:50:00;CIDADAO COMUM;S;;POMPEIA;BH;614481.76;797983.31;4754
+4756;2001260704;B06000;LESAO CORPORAL;RUA MOACYR JOSE ;200;91068;13/5/2001 22:19:00;INICIATIVA;N;0;BURITIS;BH;607346.74;791431.83;4755
+4757;2001260710;B03000;AMEACA;RUA GUARARAPES;1860;32241;13/5/2001 22:21:00;CIDADAO COMUM;S;;GLORIA;BH;602480.24;798079.29;4756
+4758;2001260719;B06000;LESAO CORPORAL;RUA AVELINO GIAR;218;99350;13/5/2001 22:27:00;INICIATIVA;N;0;CEU AZUL;BH;604476.31;807597.49;4757
+4759;2001260722;B06000;LESAO CORPORAL;AV RAJA GABAGLIA;2985;57830;13/5/2001 22:28:00;INICIATIVA;N;0;ESTORIL;BH;609208.29;792438.19;4758
+4760;2001260781;B03000;AMEACA;RUA ANTARES;25;4244;13/5/2001 23:06:00;CIDADAO COMUM;S;0;SANTA LUCIA;BH;610164.63;793156.54;4759
+4761;2001260805;B02000;RIXA;RUA JOAQUIM DE F;1690;38033;13/5/2001 23:21:00;CIDADAO COMUM;N;;SANTA HELENA (BH;BH;603165.47;789641.23;4760
+4762;2001260847;B04001;HOMICIDIO TENTAD;RUA TAQUARACU;41;42167;13/5/2001 23:55:00;CIDADAO COMUM;S;0;CH CELSO MACHADO;BH;603814.57;800865.65;4761
+4763;2001260848;B03000;AMEACA;RUA DOM PEDRITO;138;51300;13/5/2001 23:56:00;CIDADAO COMUM;S;0;NOVA VISTA;BH;614713.80;800489.83;4762
+4764;2001260908;B03000;AMEACA;RUA MARQUES DE B;312;44730;14/5/2001 00:45:00;CIDADAO COMUM;S;0;SAUDADE;BH;615167.15;797589.14;4763
+4765;2001260921;B03000;AMEACA;RUA DIAS DE FARI;95;21250;14/5/2001 00:56:00;CIDADAO COMUM;S;;SAGRADA FAMILIA;BH;613724.89;798608.18;4764
+4766;2001260923;B06000;LESAO CORPORAL;RUA CINCO DE JUL;110;15670;14/5/2001 00:57:00;CIDADAO COMUM;N;0;PRIMEIRO DE MAIO;BH;612393.58;803875.40;4765
+4767;2001260948;B03000;AMEACA;RUA VEREADOR ORL;201;71573;14/5/2001 01:22:00;CIDADAO COMUM;N;0;DAS INDUSTRIAS;BH;603759.63;792842.36;4766
+4768;2001261104;B06000;LESAO CORPORAL;RUA OSORIO DA RO;69;125153;14/5/2001 06:12:00;CIDADAO COMUM;N;SUPERMERCADO CAR;MINEIRAO;BH;602016.31;785808.46;4767
+4769;2001261120;B03000;AMEACA;RUA CANA DA INDI;394;94848;14/5/2001 06:37:00;CIDADAO COMUM;N;;LINDEIA;BH;599823.12;790690.41;4768
+4770;2001261277;B03000;AMEACA;AV DO CONTORNO;677;17228;14/5/2001 08:48:00;CIDADAO COMUM;S;11 ANDAR;CENTRO (BH);BH;611305.43;797755.06;4769
+4771;2001261402;B06000;LESAO CORPORAL;RUA CANDIDA MARI;342;108830;14/5/2001 10:04:00;CIDADAO COMUM;S;;MANTIQUEIRA;BH;605976.13;811733.65;4770
+4772;2001261442;B03000;AMEACA;RUA PADRE ANTONI;230;82347;14/5/2001 10:31:00;CIDADAO COMUM;S;CAA;SAO BERNARDO;BH;611345.47;805007.03;4771
+4773;2001261507;B03000;AMEACA;RUA CINQUENTA A;77;302846;14/5/2001 11:13:00;CIDADAO COMUM;S;0;NOVO AARAO REIS;BH;614230.31;805549.12;4772
+4774;2001261516;B03000;AMEACA;RUA JORNALISTA J;173;38336;14/5/2001 11:19:00;INICIATIVA;S;APTO 202;CRUZEIRO;BH;612754.67;794039.36;4773
+4775;2001261526;B03000;AMEACA;RUA MENDES DE OL;1084;45430;14/5/2001 11:23:00;CIDADAO COMUM;S;0;SANTO ANDRE;BH;609718.74;799470.77;4774
+4776;2001261577;B03000;AMEACA;RUA MARIA MARTIN;1594;44248;14/5/2001 12:02:00;CIDADAO COMUM;S;AP 102;SAGRADA FAMILIA;BH;613282.33;799066.17;4775
+4777;2001261580;B03000;AMEACA;RUA JACAREI;123;36586;14/5/2001 12:04:00;CIDADAO COMUM;S;0;PIRATININGA;BH;606579.01;809587.17;4776
+4778;2001261628;B04002;HOMICIDIO CONSUM;RUA QUATRO DE JU;40;170910;14/5/2001 12:28:00;CIDADAO COMUM;S;;LEONINA;BH;608611.71;793487.56;4777
+4779;2001261639;B03000;AMEACA;RUA FALCAO;705;27749;14/5/2001 12:42:00;CIDADAO COMUM;N;;FLAVIO MARQUES D;BH;605316.73;788384.43;4778
+4780;2001261644;B04002;HOMICIDIO CONSUM;AV COLETORA;5;78241;14/5/2001 12:44:00;CIDADAO COMUM;N;0;VILA PINHO;BH;601752.97;788537.18;4779
+4781;2001261668;B03000;AMEACA;RUA OSCAR LOBO P;20;104480;14/5/2001 13:06:00;INICIATIVA;N;0;PRIMEIRO DE MAIO;BH;612345.92;803542.19;4780
+4782;2001261679;B08000;VIOLACAO DE DOMI;AV FRANCISCO SA;1007;29656;14/5/2001 13:10:00;INICIATIVA;N;0;GUTIERREZ;BH;608964.99;795860.37;4781
+4783;2001261715;B03000;AMEACA;RUA MAR DE ESPAN;770;43318;14/5/2001 13:43:00;CIDADAO COMUM;S;0;SANTO ANTONIO;BH;610593.29;794090.63;4782
+4784;2001261738;B06000;LESAO CORPORAL;RUA ALVARENGA PE;1366;2683;14/5/2001 14:02:00;CIDADAO COMUM;S;;SANTO AGOSTINHO;BH;609629.53;796137.77;4783
+4785;2001261807;B03000;AMEACA;RUA BENJAMIM JAC;274;9207;14/5/2001 14:56:00;CIDADAO COMUM;S;;GUTIERREZ;BH;608759.50;794812.82;4784
+4786;2001261861;B03000;AMEACA;RUA TRINTA E OIT;21;34681;14/5/2001 15:38:00;CIDADAO COMUM;S;;CONJUNTO FELICID;BH;612484.12;807437.95;4785
+4787;2001261880;B08000;VIOLACAO DE DOMI;RUA ESPIRITO SAN;54;26052;14/5/2001 15:48:00;CIDADAO COMUM;N;0;CENTRO (BH);BH;611361.32;797556.04;4786
+4788;2001261973;B04001;HOMICIDIO TENTAD;RUA JOAO CANDIDO;113;93240;14/5/2001 16:43:00;CIDADAO COMUM;S;0;INDEPENDENCIA;BH;601016.84;786016.92;4787
+4789;2001262021;B03000;AMEACA;RUA MUNIZ;149;170850;14/5/2001 17:11:00;INICIATIVA;S;INICIATIVA;MORRO DAS PEDRAS;BH;608113.39;793880.88;4788
+4790;2001262118;B06000;LESAO CORPORAL;RUA DOS AIMORES;2896;1640;14/5/2001 18:01:00;CIDADAO COMUM;S;0;BARRO PRETO;BH;609843.89;796509.28;4789
+4791;2001262131;B06000;LESAO CORPORAL;RUA MIRAMAR;11;96929;14/5/2001 18:06:00;CIDADAO COMUM;S;;ANTONIO RIBEIRO ;BH;614767.26;805814.49;4790
+4792;2001262200;B06000;LESAO CORPORAL;RUA DOZE;105;74178;14/5/2001 18:53:00;CIDADAO COMUM;S;;NOVA YORK;BH;608520.95;810739.19;4791
+4793;2001262257;B03000;AMEACA;RUA DA BALANCA;9;7605;14/5/2001 19:17:00;CIDADAO COMUM;S;0;ANTONIO RIBEIRO ;BH;615261.54;806909.29;4792
+4794;2001262280;B06000;LESAO CORPORAL;RUA DO ACRE;114;877;14/5/2001 19:40:00;INICIATIVA;S;0;CENTRO (BH);BH;610717.96;797611.34;4793
+4795;2001262341;B04001;HOMICIDIO TENTAD;RUA MAE D'AGUA;42;82489;14/5/2001 20:08:00;CIDADAO COMUM;S;CS;SAO GABRIEL;BH;613698.17;805073.78;4794
+4796;2001262410;B04001;HOMICIDIO TENTAD;RUA MARIA FRANCI;40;121906;14/5/2001 21:02:00;CIDADAO COMUM;N;;INDEPENDENCIA;BH;602238.64;786114.07;4795
+4797;2001262425;B06000;LESAO CORPORAL;RUA E 1;10;28073;14/5/2001 21:08:00;CIDADAO COMUM;N;0;CAPITAO EDUARDO;BH;618588.44;806798.16;4796
+4798;2001262426;B06000;LESAO CORPORAL;RUA BARAO DE MAU;282;7992;14/5/2001 21:11:00;CIDADAO COMUM;S;;SARANDI (URCA/BH;BH;603487.33;802924.92;4797
+4799;2001262449;B03000;AMEACA;BECO SAO SEBASTI;34;93470;14/5/2001 21:30:00;CIDADAO COMUM;S;;DOZE DE OUTUBRO;BH;606183.04;790631.55;4798
+4800;2001262485;B06000;LESAO CORPORAL;RUA MARIA BEATRI;301;43881;14/5/2001 21:58:00;CIDADAO COMUM;N;FR301;HAVAI;BH;606834.07;793558.59;4799
+4801;2001262487;B03000;AMEACA;RUA JAVARI;964;37204;14/5/2001 22:01:00;INICIATIVA;S;0;RENASCENCA;BH;610741.99;800276.63;4800
+4802;2001262505;B03000;AMEACA;RUA ARISTIDES FE;93;20793;14/5/2001 22:11:00;CIDADAO COMUM;S;;TIROL;BH;600120.66;789714.99;4801
+4803;2001262506;B03000;AMEACA;AV MARIA CONCEIC;286;32052;14/5/2001 22:10:00;CIDADAO COMUM;N;;GOIANIA;BH;615643.14;803997.94;4802
+4804;2001262515;B06000;LESAO CORPORAL;RUA REMI PEREIRA;234;96727;14/5/2001 22:19:00;CIDADAO COMUM;N;;ANTONIO RIBEIRO ;BH;614854.85;806306.99;4803
+4805;2001262546;B03000;AMEACA;RUA CABO FRIO;250;82031;14/5/2001 22:41:00;CIDADAO COMUM;S;CAA;SAO GABRIEL;BH;614311.41;804741.76;4804
+4806;2001262549;B03000;AMEACA;RUA BENVINDA DE ;120;9276;14/5/2001 22:42:00;CIDADAO COMUM;S;AP002;SANTO ANTONIO;BH;611009.60;794652.84;4805
+4807;2001262564;B03000;AMEACA;RUA CINQUENTA;115;106100;14/5/2001 22:52:00;CIDADAO COMUM;S;0;JARDIM DOS COMER;BH;608191.83;810920.50;4806
+4808;2001262583;B04001;HOMICIDIO TENTAD;RUA SAN MARINO;38;96409;14/5/2001 23:02:00;CIDADAO COMUM;S;0;JARDIM EUROPA;BH;607798.16;810368.84;4807
+4809;2001262616;B04001;HOMICIDIO TENTAD;RUA ONZE DE DEZE;86;112687;14/5/2001 23:20:00;CIDADAO COMUM;S;0;LEONINA;BH;608758.16;793556.94;4808
+4810;2001262685;B06000;LESAO CORPORAL;AV AFONSO PENA;758;1259;15/5/2001 00:21:00;CIDADAO COMUM;S;;CENTRO (BH);BH;611140.69;797058.18;4809
+4811;2001262731;B06000;LESAO CORPORAL;AV SANTOS DUMONT;109;61950;15/5/2001 01:11:00;CIDADAO COMUM;S;0;CENTRO (BH);BH;611469.19;797433.51;4810
+4812;2001262795;B06000;LESAO CORPORAL;RUA JOAO DE CARV;25;37550;15/5/2001 02:57:00;POLICIAL MILITAR;S;;DOM BOSCO;BH;604376.29;797736.45;4811
+4813;2001262829;B03000;AMEACA;AV OLEGARIO MACI;660;49699;15/5/2001 04:00:00;CIDADAO COMUM;N;0;CENTRO (BH);BH;610493.31;797062.69;4812
+4814;2001262833;B06000;LESAO CORPORAL;RUA JOSE CLEMENT;304;38667;15/5/2001 04:01:00;CIDADAO COMUM;S;;FLORAMAR;BH;612226.70;806061.56;4813
+4815;2001262899;B06000;LESAO CORPORAL;RUA ANTENOR VALE;119;100882;15/5/2001 06:45:00;CIDADAO COMUM;N;;FLORAMAR;BH;611247.72;807310.71;4814
+4816;2001262919;B03000;AMEACA;BECO SANTA MARIA;83;48960;15/5/2001 07:08:00;INICIATIVA;S;83-A;VILA PARAISO;BH;606118.68;790661.45;4815
+4817;2001263090;B03000;AMEACA;RUA ABILIO FERNA;375;95421;15/5/2001 09:18:00;CIDADAO COMUM;S;;JARDIM VITORIA;BH;616838.69;804321.77;4816
+4818;2001263151;B03000;AMEACA;RUA PEDRO LUCIO ;372;64293;15/5/2001 09:58:00;CIDADAO COMUM;N;;MINASCAIXA;BH;608988.43;809546.51;4817
+4819;2001263181;B06000;LESAO CORPORAL;RUA ENCANTADO;241;25453;15/5/2001 10:14:00;CIDADAO COMUM;S;0;CAICARA;BH;607683.35;799393.01;4818
+4820;2001263205;B03000;AMEACA;RUA JUIZ DE FORA;397;39455;15/5/2001 10:25:00;CIDADAO COMUM;S;LJ5;BARRO PRETO;BH;609618.99;796869.79;4819
+4821;2001263247;B06000;LESAO CORPORAL;RUA JOSE RAIMUND;13;123983;15/5/2001 10:52:00;CIDADAO COMUM;N;;MANTIQUEIRA;BH;606781.66;812080.95;4820
+4822;2001263268;B03000;AMEACA;RUA DOS URUGUAIO;85;46710;15/5/2001 11:05:00;CIDADAO COMUM;S;;GORDURAS;BH;616569.96;804408.86;4821
+4823;2001263274;B03000;AMEACA;RUA COSME E DAMI;26;18246;15/5/2001 11:08:00;CIDADAO COMUM;N;;UNIVERSITARIO;BH;610117.24;802600.75;4822
+4824;2001263385;B06000;LESAO CORPORAL;RUA BEIRA LINHA;278;121732;15/5/2001 12:27:00;CIDADAO COMUM;S;0;ANTONIO RIBEIRO ;BH;615460.33;805397.29;4823
+4825;2001263424;B03000;AMEACA;AV PRESIDENTE AN;845;4461;15/5/2001 12:53:00;CIDADAO COMUM;N;;LAGOINHA;BH;610492.26;798773.24;4824
+4826;2001263462;B03000;AMEACA;RUA LOPES TROVAO;121;41394;15/5/2001 13:28:00;CIDADAO COMUM;N;;FLORESTA;BH;611901.95;798312.61;4825
+4827;2001263481;B03000;AMEACA;RUA MILTON PALME;84;85837;15/5/2001 13:40:00;CIDADAO COMUM;N;SL737;SERRA VERDE;BH;609178.25;810223.10;4826
+4828;2001263487;B06000;LESAO CORPORAL;AV RAUL MOURAO G;499;89900;15/5/2001 13:47:00;CIDADAO COMUM;N;0;PALMEIRAS;BH;606963.83;791845.95;4827
+4829;2001263491;B04001;HOMICIDIO TENTAD;RUA JULIO CESAR ;110;91792;15/5/2001 13:50:00;CIDADAO COMUM;S;;CH ATILA DE PAIV;BH;601531.01;790750.83;4828
+4830;2001263505;B03000;AMEACA;RUA MODESTINO GO;53;84430;15/5/2001 13:58:00;CIDADAO COMUM;N;;NOVA VISTA;BH;614965.79;800757.80;4829
+4831;2001263534;B03000;AMEACA;RUA DOS JESUITAS;114;63391;15/5/2001 14:13:00;CIDADAO COMUM;S;LJ2;PLANALTO;BH;610253.29;805590.30;4830
+4832;2001263805;B03000;AMEACA;RUA JOSE ROMAO D;200;84850;15/5/2001 16:49:00;INICIATIVA;S;0;DA LAGOA;BH;604558.08;809126.53;4831
+4833;2001263867;B03000;AMEACA;RUA MODESTINO GO;53;84430;15/5/2001 17:17:00;CIDADAO COMUM;N;;NOVA VISTA;BH;614965.79;800757.80;4832
+4834;2001263893;B03000;AMEACA;RUA SAO SALVADOR;13;63612;15/5/2001 17:30:00;INICIATIVA;S;0;BONFIM;BH;610184.38;797952.86;4833
+4835;2001263979;B03000;AMEACA;RUA ITANAJE;24;35643;15/5/2001 18:16:00;CIDADAO COMUM;N;0;SALGADO FILHO;BH;606560.35;795249.35;4834
+4836;2001263984;B06000;LESAO CORPORAL;AV AFONSO PENA;3160;1259;15/5/2001 18:19:00;CIDADAO COMUM;N;0;CENTRO (BH);BH;612365.19;794973.12;4835
+4837;2001264048;B04001;HOMICIDIO TENTAD;RUA DOS GOITACAZ;1789;31400;15/5/2001 18:49:00;CIDADAO COMUM;N;0;BARRO PRETO;BH;609552.62;797129.26;4836
+4838;2001264215;B03000;AMEACA;AV ITAU;460;36025;15/5/2001 20:14:00;CIDADAO COMUM;S;APTO.:103.;DOM BOSCO;BH;605316.00;797316.62;4837
+4839;2001264258;B03000;AMEACA;RUA O;56;78396;15/5/2001 20:41:00;CIDADAO COMUM;N;0;VILA PINHO;BH;602074.09;788052.68;4838
+4840;2001264320;B03000;AMEACA;RUA DOS TABAIARE;42;66649;15/5/2001 21:19:00;CIDADAO COMUM;N;AP703;FLORESTA;BH;611831.98;797292.90;4839
+4841;2001264326;B03000;AMEACA;AV AUGUSTO DE LI;1327;6731;15/5/2001 21:22:00;CIDADAO COMUM;S;0;BARRO PRETO;BH;610051.77;796842.69;4840
+4842;2001264362;B06000;LESAO CORPORAL;RUA PROFESSOR OT;92;55632;15/5/2001 21:46:00;INICIATIVA;0;0;SANTA EFIGENIA;BH;612987.19;796926.84;4841
+4843;2001264368;B03000;AMEACA;RUA BENTO;90;170807;15/5/2001 21:50:00;CIDADAO COMUM;S;;MORRO DAS PEDRAS;BH;608443.37;794109.13;4842
+4844;2001264382;B06000;LESAO CORPORAL;AV BIAS FORTES;661;9553;15/5/2001 21:54:00;INICIATIVA;S;0;LOURDES;BH;610743.50;796207.75;4843
+4845;2001264421;B03000;AMEACA;RUA PROFESSOR OT;92;55632;15/5/2001 22:24:00;INICIATIVA;S;0;SANTA EFIGENIA;BH;612987.19;796926.84;4844
+4846;2001264462;B04002;HOMICIDIO CONSUM;RUA JOANA DARC;225;170141;15/5/2001 22:46:00;CIDADAO COMUM;S;0;VILA CAFEZAL;BH;614511.87;794982.94;4845
+4847;2001264537;B03000;AMEACA;RUA JOSE JOAQUIM;255;38871;15/5/2001 23:35:00;CIDADAO COMUM;S;0;SANTA CRUZ;BH;610954.46;802060.45;4846
+4848;2001264644;B03000;AMEACA;RUA DOS TUPIS;1044;69965;16/5/2001 01:22:00;INICIATIVA;N;0;BARRO PRETO;BH;610269.70;797121.45;4847
+4849;2001264670;B03000;AMEACA;RUA MAGNO MOURA;149;42545;16/5/2001 02:00:00;CIDADAO COMUM;S;;NOVA VISTA;BH;615900.66;800588.01;4848
+4850;2001264811;B06000;LESAO CORPORAL;RUA CONEGO SANTA;957;16859;16/5/2001 06:15:00;CIDADAO COMUM;N;0;CACHOEIRINHA;BH;610495.45;800852.05;4849
+4851;2001264827;B06000;LESAO CORPORAL;RUA SATURNINO FE;39;64108;16/5/2001 06:49:00;CIDADAO COMUM;S;;LETICIA;BH;607622.21;809926.71;4850
+4852;2001265006;B03000;AMEACA;RUA JOAQUIM CHAV;161;50931;16/5/2001 09:40:00;CIDADAO COMUM;N;0;MINASCAIXA;BH;609225.46;809596.53;4851
+4853;2001265080;B03000;AMEACA;RUA COPENHAGUE;76;63524;16/5/2001 10:17:00;INICIATIVA;S;0;TREVO;BH;604077.22;805831.39;4852
+4854;2001265109;B06000;LESAO CORPORAL;RUA DOS ADVOGADO;405;103130;16/5/2001 10:43:00;INICIATIVA;S;0;CONJUNTO ALIPIO ;BH;604499.30;800376.34;4853
+4855;2001265138;B06000;LESAO CORPORAL;RUA JAIME SALSE;278;36848;16/5/2001 11:08:00;INICIATIVA;N;0;MAGNESITA;BH;604022.14;793879.98;4854
+4856;2001265467;B03000;AMEACA;RUA JANAITIBA;803;36889;16/5/2001 14:47:00;CIDADAO COMUM;S;0;SAO GERALDO;BH;616039.65;799186.15;4855
+4857;2001265476;B06000;LESAO CORPORAL;RUA SAO TOMAS DE;535;63782;16/5/2001 14:54:00;CIDADAO COMUM;N;0;MORRO DO PAPAGAI;BH;610849.00;793420.56;4856
+4858;2001265482;B03000;AMEACA;RUA PAULO DE FRO;11;52722;16/5/2001 14:56:00;INICIATIVA;N;0;CENTRO BH;BH;610740.91;797637.21;4857
+4859;2001265634;B06000;LESAO CORPORAL;RUA DOM SILVERIO;300;22496;16/5/2001 16:18:00;CIDADAO COMUM;N;;BELMONT;BH;615222.25;805374.99;4858
+4860;2001265662;B06000;LESAO CORPORAL;RUA GEORGINA PEN;150;31006;16/5/2001 16:36:00;CIDADAO COMUM;S;CAFR;SAO LUCAS;BH;614133.28;795705.78;4859
+4861;2001265740;B03000;AMEACA;RUA ANDARAI;286;3720;16/5/2001 17:24:00;CIDADAO COMUM;N;0;NOVA VISTA (SB);SB;615301.42;800837.38;4860
+4862;2001265905;B04001;HOMICIDIO TENTAD;RUA GRAUNAS;338;31797;16/5/2001 18:58:00;CIDADAO COMUM;N;A;FLAVIO MARQUES D;BH;605357.25;788696.63;4861
+4863;2001266102;B03000;AMEACA;RUA SALINAS;1584;59992;16/5/2001 20:53:00;INICIATIVA;S;0;HORTO;BH;613059.02;797579.96;4862
+4864;2001266129;B03000;AMEACA;RUA SAO JERONIMO;47;62764;16/5/2001 21:12:00;CIDADAO COMUM;S;0;SAGRADA FAMILIA;BH;612475.53;799757.38;4863
+4865;2001266295;B06000;LESAO CORPORAL;RUA MARCAZITA;1;43488;16/5/2001 23:13:00;CIDADAO COMUM;S;;SAO CRISTOVAO;BH;610116.75;799181.06;4864
+4866;2001266311;B03000;AMEACA;RUA DOUTOR BENED;1689;12252;16/5/2001 23:22:00;CIDADAO COMUM;S;0;ANTONIO RIBEIRO ;BH;612974.25;804856.37;4865
+4867;2001266313;B03000;AMEACA;RUA NESTOR VERAS;105;85852;16/5/2001 23:27:00;CIDADAO COMUM;N;AN2;SERRA VERDE;BH;609293.01;810251.97;4866
+4868;2001266378;B06000;LESAO CORPORAL;RUA ANGATURAMA;14;3935;17/5/2001 00:17:00;INICIATIVA;S;0;SAO PAULO;BH;612414.84;802648.96;4867
+4869;2001266446;B06000;LESAO CORPORAL;RUA GIRASSOL;440;31277;17/5/2001 01:51:00;CIDADAO COMUM;N;;LINDEIA;BH;599263.27;791099.17;4868
+4870;2001266489;B06000;LESAO CORPORAL;RUA NAVARRA;39;113576;17/5/2001 02:51:00;CIDADAO COMUM;N;CAA;JARDIM EUROPA;BH;608746.87;810211.38;4869
+4871;2001266905;B06000;LESAO CORPORAL;RUA GENERAL OZOR;1131;30901;17/5/2001 10:46:00;CIDADAO COMUM;S;;VERA CRUZ;BH;615951.92;798005.52;4870
+4872;2001267080;B06000;LESAO CORPORAL;RUA JOAO AVELINO;235;83075;17/5/2001 13:01:00;CIDADAO COMUM;N;;CALIFORNIA;BH;603313.10;796473.50;4871
+4873;2001267167;B03000;AMEACA;RUA DOS ECONOMIS;612;103272;17/5/2001 14:15:00;INICIATIVA;S;MP6953 CB VICTOR;CONJUNTO ALIPIO ;BH;604238.00;800485.06;4872
+4874;2001267178;B03000;AMEACA;AV DOS BANDEIRAN;492;7775;17/5/2001 14:22:00;CIDADAO COMUM;S;FLORICULT. CIA D;SION;BH;612063.30;793124.76;4873
+4875;2001267208;B06000;LESAO CORPORAL;RUA VIOLETA DE M;9;80253;17/5/2001 14:38:00;CIDADAO COMUM;S;0;SAO JOSE;BH;604156.53;799475.93;4874
+4876;2001267270;B04001;HOMICIDIO TENTAD;RUA PRINCIPAL;200;170504;17/5/2001 15:14:00;INICIATIVA;S;0;MORRO DAS PEDRAS;BH;608596.19;793933.42;4875
+4877;2001267337;B03000;AMEACA;AV BARBACENA;252;8084;17/5/2001 15:47:00;CIDADAO COMUM;S;;BARRO PRETO;BH;609389.65;796964.49;4876
+4878;2001267379;B03000;AMEACA;RUA DOUTOR JOSE ;79;91547;17/5/2001 16:11:00;CIDADAO COMUM;S;0;SAO BENTO;BH;609872.53;793003.40;4877
+4879;2001267401;B03000;AMEACA;RUA CANA DA INDI;394;94848;17/5/2001 16:22:00;CIDADAO COMUM;N;0;LINDEIA;BH;599823.12;790690.41;4878
+4880;2001267513;B03000;AMEACA;AV PRESIDENTE AN;295;4461;17/5/2001 17:28:00;POLICIAL MILITAR;S;0;LAGOINHA;BH;610689.55;798286.65;4879
+4881;2001267545;B03000;AMEACA;AV ARQUITETO MOR;47;6050;17/5/2001 17:43:00;CIDADAO COMUM;N;FU;BARREIRO;BH;602994.37;791488.05;4880
+4882;2001267683;B06000;LESAO CORPORAL;RUA DOS GUARANIS;301;32181;17/5/2001 19:02:00;INICIATIVA;N;0;CENTRO BH;BH;610722.99;797339.12;4881
+4883;2001267743;B06000;LESAO CORPORAL;RUA GONCALVES DI;1041;31513;17/5/2001 19:31:00;CIDADAO COMUM;S;AP102;FUNCIONARIOS;BH;611538.79;795731.57;4882
+4884;2001267778;B03000;AMEACA;RUA CACILDA BECK;36;11262;17/5/2001 19:52:00;CIDADAO COMUM;S;0;TUPI;BH;613323.37;806316.54;4883
+4885;2001267853;B06000;LESAO CORPORAL;AV SEN LEVINDO C;1070;14866;17/5/2001 20:34:00;INICIATIVA;N;0;SANTA CECILIA;BH;601290.55;786629.80;4884
+4886;2001267905;B06000;LESAO CORPORAL;RUA BUARQUE DE M;85;10650;17/5/2001 21:13:00;CIDADAO COMUM;S;;FLORESTA;BH;611837.94;798205.68;4885
+4887;2001267924;B04001;HOMICIDIO TENTAD;AV SIDERAL;265;65721;17/5/2001 21:19:00;INICIATIVA;S;0;VISTA ALEGRE;BH;604262.37;793431.83;4886
+4888;2001268039;B06000;LESAO CORPORAL;RUA SEBASTIAO DE;151;64209;17/5/2001 22:18:00;INICIATIVA;S;;NOVA GRANADA;BH;607929.60;794787.71;4887
+4889;2001268119;B06000;LESAO CORPORAL;AV OLEGARIO MACI;372;49699;17/5/2001 23:09:00;INICIATIVA;S;0;CENTRO (BH);BH;610569.33;797339.29;4888
+4890;2001268126;B03000;AMEACA;RUA LEILOEIRO JO;121;85229;17/5/2001 23:11:00;CIDADAO COMUM;N;AP203;SANTA AMELIA;BH;606958.53;805966.94;4889
+4891;2001268139;B09000;ABANDONO DE INCA;RUA PEDRINOPOLIS;400;52980;17/5/2001 23:23:00;CIDADAO COMUM;S;0;JARDIM LEBLON;BH;605848.57;807100.75;4890
+4892;2001268218;B06000;LESAO CORPORAL;RUA CONSUELO;146;106296;18/5/2001 00:25:00;CIDADAO COMUM;S;;JARDIM DOS COMER;BH;607848.43;811390.89;4891
+4893;2001268236;B06000;LESAO CORPORAL;RUA AUGUSTA ANDR;1167;99104;18/5/2001 00:41:00;CIDADAO COMUM;S;;JAQUELINE;BH;611759.56;810626.88;4892
+4894;2001268268;B03000;AMEACA;RUA DOUTOR CRIST;312;55598;18/5/2001 01:12:00;CIDADAO COMUM;N;;ARAGUAIA;BH;604751.25;789297.85;4893
+4895;2001268310;B03000;AMEACA;RUA RIO BONITO;184;110174;18/5/2001 02:00:00;CIDADAO COMUM;S;;PILAR;BH;607753.16;788709.99;4894
+4896;2001268369;B03000;AMEACA;RUA DOS TIMBIRAS;2796;67682;18/5/2001 03:04:00;CIDADAO COMUM;S;;BARRO PRETO;BH;610033.69;796605.59;4895
+4897;2001268417;B06000;LESAO CORPORAL;RUA RADIALISTA E;36;12381;18/5/2001 04:23:00;CIDADAO COMUM;S;CAFR;CEU AZUL;BH;603996.65;808758.62;4896
+4898;2001268435;B06000;LESAO CORPORAL;RUA FERNAO DIAS;799;28133;18/5/2001 04:56:00;INICIATIVA;N;0;CAETANO FURQUIM;BH;615910.87;799034.52;4897
+4899;2001268774;B03000;AMEACA;RUA AUGUSTO MORE;512;6760;18/5/2001 10:30:00;CIDADAO COMUM;S;0;SANTA AMELIA;BH;606752.48;805506.78;4898
+4900;2001268820;B06000;LESAO CORPORAL;RUA MARIA ISABEL;15;118481;18/5/2001 11:00:00;CIDADAO COMUM;N;;MALDONADO;BH;601683.64;790179.32;4899
+4901;2001268899;B06000;LESAO CORPORAL;RUA EDUARDO QUEN;81;25047;18/5/2001 11:47:00;CIDADAO COMUM;S;0;SAO BERNARDO;BH;610496.41;805089.06;4900
+4902;2001268932;B03000;AMEACA;RUA CARMESIA;452;13618;18/5/2001 12:20:00;CIDADAO COMUM;S;BLF     AP403;SANTA INES;BH;614353.47;800610.41;4901
+4903;2001268938;B03000;AMEACA;RUA ALEM PARAIBA;1035;81357;18/5/2001 12:20:00;CIDADAO COMUM;S;0;BONFIM;BH;609842.01;798489.63;4902
+4904;2001268950;B06000;LESAO CORPORAL;RUA IPANEMA;785;34726;18/5/2001 12:33:00;CIDADAO COMUM;N;CA01;SARANDI (URCA/BH;BH;602941.78;802385.88;4903
+4905;2001268996;B03000;AMEACA;RUA VATICANO;349;71371;18/5/2001 13:05:00;CIDADAO COMUM;N;0;GLORIA;BH;604160.24;797994.67;4904
+4906;2001269010;B03000;AMEACA;AV OLEGARIO MACI;308;49699;18/5/2001 13:17:00;INICIATIVA;S;0;CENTRO (BH);BH;610578.92;797398.38;4905
+4907;2001269019;B03000;AMEACA;RUA TREZE DE SET;323;69168;18/5/2001 13:21:00;CIDADAO COMUM;S;;LEONINA;BH;608612.10;793426.03;4906
+4908;2001269080;B03000;AMEACA;RUA EXPEDICIONAR;158;27001;18/5/2001 14:06:00;CIDADAO COMUM;S;0;ADELAIDE;BH;607662.37;798580.43;4907
+4909;2001269088;B03000;AMEACA;RUA SAO BORJA;346;61620;18/5/2001 14:11:00;CIDADAO COMUM;N;CAA;BOA VISTA;BH;614926.86;800315.28;4908
+4910;2001269345;B03000;AMEACA;RUA PEDRO LESSA;137;53117;18/5/2001 16:46:00;CIDADAO COMUM;0;PANIFICADORA LAG;LAGOINHA;BH;610203.19;798737.46;4909
+4911;2001269348;B05000;SEQUESTRO E CARC;RUA JOSE CLETO;412;38682;18/5/2001 16:45:00;CIDADAO COMUM;S;AP301;DOS PALMARES;BH;610976.99;802305.66;4910
+4912;2001269644;B03000;AMEACA;RUA DES TORRES;131;81344;18/5/2001 19:09:00;CIDADAO COMUM;S;0;PEDRO SEGUNDO;BH;608747.06;798694.06;4911
+4913;2001269696;B06000;LESAO CORPORAL;RUA ETEL NOGUEIR;550;94416;18/5/2001 19:32:00;INICIATIVA;S;0;OURO PRETO;BH;606438.05;800864.00;4912
+4914;2001269721;B06000;LESAO CORPORAL;RUA JOSE ANTONIO;73;80483;18/5/2001 19:45:00;CIDADAO COMUM;S;A;JARDIM ALVORADA;BH;606135.30;800181.37;4913
+4915;2001269730;B03000;AMEACA;RUA BOLIVAR FERR;101;89995;18/5/2001 19:49:00;CIDADAO COMUM;S;PROX. PADARIA SA;PALMEIRAS;BH;607269.62;791505.60;4914
+4916;2001269765;B03000;AMEACA;RUA PAULO PAPINI;75;9190;18/5/2001 20:09:00;CIDADAO COMUM;S;0;PARAISO;BH;614770.70;797028.44;4915
+4917;2001269767;B06000;LESAO CORPORAL;RUA OURO FINO;16;50714;18/5/2001 20:11:00;CIDADAO COMUM;N;AP101;CRUZEIRO;BH;612074.49;794639.35;4916
+4918;2001269810;B03000;AMEACA;RUA DELIO JOSE C;65;74427;18/5/2001 20:34:00;INICIATIVA;S;0;PLANALTO;BH;610551.00;806441.67;4917
+4919;2001269818;B06000;LESAO CORPORAL;RUA MEDEIROS;204;62420;18/5/2001 20:38:00;CIDADAO COMUM;S;RUA DA GARAGEM D;MINASLANDIA;BH;612156.90;804581.93;4918
+4920;2001269827;B05000;SEQUESTRO E CARC;AV PRESIDENTE AN;901;4461;18/5/2001 20:42:00;CIDADAO COMUM;N;VITIMA NO DI;SAO CRISTOVAO;BH;610492.26;798773.24;4919
+4921;2001269885;B03000;AMEACA;RUA POVOA DE VAR;437;54958;18/5/2001 21:19:00;CIDADAO COMUM;N;;PAQUETA;BH;605302.03;802656.56;4920
+4922;2001269890;B03000;AMEACA;RUA W DOIS;155;122619;18/5/2001 21:22:00;CIDADAO COMUM;S;;PONGELUPE;BH;603965.42;787409.50;4921
+4923;2001269928;B03000;AMEACA;ALAMEDA VARGEM G;40;95967;18/5/2001 21:37:00;CIDADAO COMUM;S;0;VILA CASTANHEIRA;BH;601365.77;788667.34;4922
+4924;2001270019;B02000;RIXA;RUA NILO APARECI;425;7384;18/5/2001 22:24:00;CIDADAO COMUM;S;;PLANALTO;BH;609419.95;807033.99;4923
+4925;2001270055;B03000;AMEACA;RUA ALCINDO VIEI;583;1968;18/5/2001 22:47:00;CIDADAO COMUM;N;B;BARREIRO;BH;602841.65;790669.84;4924
+4926;2001270099;B04001;HOMICIDIO TENTAD;RUA ANDIROBA;7;102935;18/5/2001 23:12:00;INICIATIVA;S;0;SAO PAULO;BH;612393.94;802957.18;4925
+4927;2001270116;B03000;AMEACA;RUA DEZESSEIS;548;32821;18/5/2001 23:21:00;CIDADAO COMUM;N;;CONJUNTO FELICID;BH;612269.18;807345.95;4926
+4928;2001270148;B03000;AMEACA;RUA RIO GRANDE D;555;58744;18/5/2001 23:37:00;INICIATIVA;N;0;BARRO PRETO;BH;610367.39;796966.84;4927
+4929;2001270155;B04001;HOMICIDIO TENTAD;AV NELIO CERQUEI;15;72359;18/5/2001 23:39:00;CIDADAO COMUM;S;;TIROL;BH;600947.66;789885.51;4928
+4930;2001270163;B03000;AMEACA;RUA TOME DE SOUZ;950;67998;18/5/2001 23:48:00;CIDADAO COMUM;S;FR888;FUNCIONARIOS;BH;611435.66;795218.32;4929
+4931;2001270166;B03000;AMEACA;RUA MARIA DA FE;415;44046;18/5/2001 23:50:00;CIDADAO COMUM;S;;SALGADO FILHO;BH;606364.70;794639.09;4930
+4932;2001270264;B06000;LESAO CORPORAL;AV HENFIL;219;103550;19/5/2001 00:53:00;CIDADAO COMUM;N;0;SARANDI (URCA/BH;BH;603229.57;801700.39;4931
+4933;2001270266;B04001;HOMICIDIO TENTAD;RUA C;53;47693;19/5/2001 01:02:00;CIDADAO COMUM;S;0;VILA CASTANHEIRA;BH;601080.99;788618.39;4932
+4934;2001270268;B06000;LESAO CORPORAL;RUA DOS CAETES;342;11376;19/5/2001 01:02:00;CIDADAO COMUM;N;FR;CENTRO (BH);BH;611282.38;797431.89;4933
+4935;2001270307;B04002;HOMICIDIO CONSUM;RUA UM;43;94923;19/5/2001 01:25:00;CIDADAO COMUM;N;0;LINDEIA;BH;599399.40;790259.57;4934
+4936;2001270322;B04002;HOMICIDIO CONSUM;RUA BANDONION;100;170139;19/5/2001 01:39:00;CIDADAO COMUM;S;;VILA CAFEZAL;BH;613977.41;795089.89;4935
+4937;2001270333;B06000;LESAO CORPORAL;AV DOS ANDRADAS;346;3761;19/5/2001 01:48:00;CIDADAO COMUM;N;;CENTRO (BH);BH;611480.77;797265.49;4936
+4938;2001270402;B03000;AMEACA;RUA LIBANIA PENA;65;40855;19/5/2001 02:37:00;CIDADAO COMUM;S;;SAO BERNARDO;BH;610749.14;805180.30;4937
+4939;2001270410;B06000;LESAO CORPORAL;RUA QUIXADA;793;57612;19/5/2001 02:43:00;CIDADAO COMUM;S;;IPIRANGA;BH;611561.33;800355.15;4938
+4940;2001270432;B03000;AMEACA;RUA JULIO CESAR;140;39483;19/5/2001 02:59:00;CIDADAO COMUM;S;0;NAZARE;BH;615490.97;804461.80;4939
+4941;2001270514;B06000;LESAO CORPORAL;AV SANTOS DUMONT;680;61950;19/5/2001 04:09:00;INICIATIVA;S;0;CENTRO BH;BH;610999.13;797614.04;4940
+4942;2001270544;B06000;LESAO CORPORAL;AV AMAZONAS;5274;3140;19/5/2001 04:41:00;INICIATIVA;S;0;NOVA SUISSA;BH;606875.02;796011.33;4941
+4943;2001270551;B06000;LESAO CORPORAL;RUA DOS GOITACAZ;1679;31400;19/5/2001 04:46:00;INICIATIVA;N;0;BARRO PRETO;BH;609632.92;797106.27;4942
+4944;2001270624;B03000;AMEACA;RUA PADRE PEDRO ;2277;51657;19/5/2001 06:54:00;INICIATIVA;S;;JARDIM EUROPA;BH;608046.88;809283.20;4943
+4945;2001270706;B03000;AMEACA;RUA SATURNINO DE;50;64089;19/5/2001 10:00:00;INICIATIVA;N;0;CENTRO (BH);BH;610855.98;797753.13;4944
+4946;2001270828;B06000;LESAO CORPORAL;RUA CORONEL LOUR;25;109200;19/5/2001 10:54:00;CIDADAO COMUM;N;;JARDIM ALVORADA;BH;605889.74;800220.31;4945
+4947;2001270972;B03000;AMEACA;RUA CABROBO;573;11187;19/5/2001 13:30:00;CIDADAO COMUM;S;;SAGRADA FAMILIA;BH;613270.28;799510.57;4946
+4948;2001271000;B03000;AMEACA;RUA PORTO SEGURO;327;60595;19/5/2001 13:43:00;CIDADAO COMUM;S;;NOVA VISTA;BH;614852.94;800555.19;4947
+4949;2001271082;B06000;LESAO CORPORAL;RUA PADRE BELCHI;227;51240;19/5/2001 14:26:00;INICIATIVA;S;0;CENTRO (BH);BH;610792.57;796787.63;4948
+4950;2001271105;B06000;LESAO CORPORAL;AV AFONSO PENA;394;1259;19/5/2001 14:44:00;CIDADAO COMUM;S;0;CENTRO (BH);BH;610976.70;797371.57;4949
+4951;2001271134;B03000;AMEACA;RUA OITO;56;84819;19/5/2001 15:13:00;CIDADAO COMUM;S;;DA LAGOA;BH;604483.44;809351.75;4950
+4952;2001271145;B03000;AMEACA;RUA AARAO REIS;540;473;19/5/2001 15:17:00;CIDADAO COMUM;N;0;CENTRO (BH);BH;611545.12;797121.03;4951
+4953;2001271244;B03000;AMEACA;RUA DR BROCHADO;340;23215;19/5/2001 16:14:00;POLICIAL MILITAR;S;0;VERA CRUZ;BH;615875.51;798147.95;4952
+4954;2001271270;B03000;AMEACA;RUA PUBLICITARIO;95;21695;19/5/2001 16:26:00;CIDADAO COMUM;S;FU;AARAO REIS;BH;612736.33;804984.01;4953
+4955;2001271283;B06000;LESAO CORPORAL;RUA MARAVILHAS;251;41426;19/5/2001 16:35:00;CIDADAO COMUM;S;;PROVIDENCIA;BH;612382.90;804177.17;4954
+4956;2001271291;B06000;LESAO CORPORAL;RUA RIO GRANDE D;456;58744;19/5/2001 16:40:00;INICIATIVA;N;0;CENTRO BH;BH;610351.17;797021.88;4955
+4957;2001271420;B03000;AMEACA;AV SEN LEVINDO C;1923;14866;19/5/2001 17:58:00;CIDADAO COMUM;S;LJC;SANTA CECILIA;BH;601016.38;787684.29;4956
+4958;2001271430;B06000;LESAO CORPORAL;RUA DES BRAULIO;1380;19917;19/5/2001 18:01:00;CIDADAO COMUM;S;;VERA CRUZ;BH;616260.28;797776.23;4957
+4959;2001271431;B06000;LESAO CORPORAL;RUA CEL JOAO CAM;275;17808;19/5/2001 18:01:00;CIDADAO COMUM;S;;SINIMBU;BH;606419.60;808235.56;4958
+4960;2001271473;B03000;AMEACA;ESTRADA DOS BORG;42;85893;19/5/2001 18:21:00;CIDADAO COMUM;N;0;JARDIM VITORIA;BH;616427.41;804519.29;4959
+4961;2001271495;B03000;AMEACA;RUA JAIR NEGRAO ;21;21944;19/5/2001 18:35:00;CIDADAO COMUM;S;0;JARDIM ESTRELA;BH;607350.38;810168.77;4960
+4962;2001271524;B03000;AMEACA;RUA PARA DE MINA;390;52070;19/5/2001 18:58:00;CIDADAO COMUM;S;AP203;PADRE EUSTAQUIO;BH;606291.28;797707.27;4961
+4963;2001271536;B03000;AMEACA;RUA ALBA;37;1738;19/5/2001 19:03:00;CIDADAO COMUM;N;0;CAICARA;BH;608338.85;800029.22;4962
+4964;2001271550;B03000;AMEACA;RUA MARIA ANALIA;60;300366;19/5/2001 19:13:00;CIDADAO COMUM;S;;POMPEIA;BH;606878.92;808915.74;4963
+4965;2001271579;B06000;LESAO CORPORAL;RUA ARARUAMA;111;77945;19/5/2001 19:29:00;CIDADAO COMUM;N;;SALGADO FILHO;BH;606533.50;795254.31;4964
+4966;2001271659;B06000;LESAO CORPORAL;AV ARTUR GUIMARA;1000;6151;19/5/2001 20:15:00;CIDADAO COMUM;S;;SANTA CRUZ;BH;610780.22;802042.44;4965
+4967;2001271703;B04002;HOMICIDIO CONSUM;RUA DOS JAVAES;357;37198;19/5/2001 20:37:00;CIDADAO COMUM;S;;SANTA MONICA;BH;606525.85;807799.24;4966
+4968;2001271747;B03000;AMEACA;RUA MARIA CARMEM;905;127206;19/5/2001 21:01:00;CIDADAO COMUM;N;CAA;SANTA EFIGENIA;BH;614070.11;796009.57;4967
+4969;2001271750;B02000;RIXA;RUA GRAO PARA;389;31771;19/5/2001 21:04:00;CIDADAO COMUM;N;;SANTA EFIGENIA;BH;612830.65;796401.48;4968
+4970;2001271824;B06000;LESAO CORPORAL;AV ARTUR BERNARD;1150;60844;19/5/2001 21:39:00;INICIATIVA;S;0;VILA PARIS;BH;610180.14;793263.99;4969
+4971;2001271871;B04001;HOMICIDIO TENTAD;RUA REPUBLICA AR;20;58379;19/5/2001 22:10:00;CIDADAO COMUM;N;AP101;SION;BH;611786.71;793814.45;4970
+4972;2001271898;B03000;AMEACA;RUA NILO PECANHA;742;47665;19/5/2001 22:27:00;CIDADAO COMUM;S;0;BOA VISTA;BH;614370.93;800093.85;4971
+4973;2001271920;B06000;LESAO CORPORAL;RUA CLEANTO;69;46499;19/5/2001 22:38:00;CIDADAO COMUM;S;B;BELMONT;BH;615311.95;804929.64;4972
+4974;2001271964;B06000;LESAO CORPORAL;RUA OSCAR NEGRAO;200;17776;19/5/2001 23:10:00;CIDADAO COMUM;S;EM FRENTE A CADE;GAMELEIRA;BH;605051.19;794788.68;4973
+4975;2001271999;B06000;LESAO CORPORAL;RUA SILVA REIS;80;65908;19/5/2001 23:28:00;CIDADAO COMUM;N;;NOVA VISTA;BH;615541.63;800479.89;4974
+4976;2001272038;B04001;HOMICIDIO TENTAD;RUA EVOCACAO;375;26948;19/5/2001 23:52:00;INICIATIVA;N;SOCORRIDO AO ALB;SAO JOSE;BH;605821.48;798726.88;4975
+4977;2001272060;B06000;LESAO CORPORAL;ESTRADA BEIRA LI;286;10878;20/5/2001 00:03:00;INICIATIVA;S;0;SAO GABRIEL;BH;616550.18;806626.14;4976
+4978;2001272135;B03000;AMEACA;RUA PADRE PEDRO ;11;51657;20/5/2001 00:49:00;INICIATIVA;S;0;VENDA NOVA;BH;605831.31;809997.06;4977
+4979;2001272202;B06000;LESAO CORPORAL;AV ABILIO MACHAD;3123;634;20/5/2001 01:35:00;CIDADAO COMUM;S;0;ALIPIO DE MELO;BH;603784.55;799976.88;4978
+4980;2001272208;B04002;HOMICIDIO CONSUM;RUA OSCAR LOBO P;270;104480;20/5/2001 01:39:00;CIDADAO COMUM;N;;PRIMEIRO DE MAIO;BH;612347.11;803516.89;4979
+4981;2001272257;B02000;RIXA;RUA BOM RETIRO;210;10030;20/5/2001 02:05:00;CIDADAO COMUM;0;;JARDIM MONTANHES;BH;606360.47;798202.25;4980
+4982;2001272275;B04001;HOMICIDIO TENTAD;RUA CLAUDIO GOME;150;117060;20/5/2001 02:16:00;CIDADAO COMUM;N;CASA 09;DOS PALMARES;BH;611064.87;802289.97;4981
+4983;2001272289;B06000;LESAO CORPORAL;AV DO CONTORNO;6969;17228;20/5/2001 02:25:00;CIDADAO COMUM;N;;CENTRO (BH);BH;610714.40;794917.94;4982
+4984;2001272302;B04002;HOMICIDIO CONSUM;RUA CLEMENTE BAR;525;16010;20/5/2001 02:32:00;INICIATIVA;N;0;ALIPIO DE MELO;BH;604567.10;799155.53;4983
+4985;2001272369;B06000;LESAO CORPORAL;AV OLEGARIO MACI;220;49699;20/5/2001 03:25:00;CIDADAO COMUM;N;;CENTRO (BH);BH;610608.26;797483.18;4984
+4986;2001272379;B02000;RIXA;RUA CONSUELO;181;106296;20/5/2001 03:30:00;CIDADAO COMUM;S;;JARDIM DOS COMER;BH;607835.55;811463.55;4985
+4987;2001272417;B06000;LESAO CORPORAL;RUA VERISSIMO GU;475;102720;20/5/2001 04:13:00;INICIATIVA;N;0;REGINA;BH;599062.14;790155.01;4986
+4988;2001272490;B03000;AMEACA;RUA GUIDO CIOLET;76;19440;20/5/2001 05:22:00;CIDADAO COMUM;S;;BARREIRO;BH;602875.39;790418.81;4987
+4989;2001272530;B03000;AMEACA;RUA FLUORINA;570;29091;20/5/2001 06:39:00;CIDADAO COMUM;S;;POMPEIA;BH;614606.92;797613.73;4988
+4990;2001272690;B03000;AMEACA;AV BERNARDO VASC;1277;9411;20/5/2001 09:30:00;INICIATIVA;N;0;CACHOEIRINHA;BH;611028.41;801154.68;4989
+4991;2001272729;B06000;LESAO CORPORAL;AV SARAMENHA;165;64007;20/5/2001 10:09:00;INICIATIVA;N;0;FLORAMAR;BH;611941.98;805631.36;4990
+4992;2001272767;B06000;LESAO CORPORAL;AV BASILIO DA GA;36;8361;20/5/2001 10:36:00;CIDADAO COMUM;N;;TUPI;BH;613149.68;805708.58;4991
+4993;2001272828;B06000;LESAO CORPORAL;RUA BARAO DE COR;803;7910;20/5/2001 11:33:00;CIDADAO COMUM;S;CA2;SAO TOMAZ;BH;610349.02;805430.19;4992
+4994;2001272833;B03000;AMEACA;RUA LINCOLN;446;41136;20/5/2001 11:37:00;CIDADAO COMUM;S;0;UNIAO;BH;612776.31;801654.48;4993
+4995;2001272877;B03000;AMEACA;RUA CATAS ALTAS;105;51990;20/5/2001 12:15:00;CIDADAO COMUM;S;0;PROVIDENCIA;BH;612519.37;804119.57;4994
+4996;2001272878;B03000;AMEACA;RUA DOUTOR CAMIL;268;23228;20/5/2001 12:11:00;CIDADAO COMUM;S;;SAO LUCAS;BH;613449.89;795496.32;4995
+4997;2001272901;B03000;AMEACA;RUA GERALDO BERN;36;103461;20/5/2001 12:34:00;CIDADAO COMUM;S;;OURO PRETO;BH;606396.19;800721.24;4996
+4998;2001272904;B06000;LESAO CORPORAL;RUA JOSE CLETO;755;38682;20/5/2001 12:37:00;CIDADAO COMUM;S;;SANTA CRUZ;BH;610608.49;802484.40;4997
+4999;2001272974;B03000;AMEACA;RUA CLEBER SOARE;57;20116;20/5/2001 13:38:00;CIDADAO COMUM;S;;SANTA MONICA;BH;607150.82;807842.20;4998
+5000;2001273001;B03000;AMEACA;RUA FLOR DE VIDR;227;13504;20/5/2001 14:03:00;INICIATIVA;S;0;CASTELO;BH;605603.23;799571.25;4999
+5001;2001273007;B03000;AMEACA;RUA DA BAHIA;637;81155;20/5/2001 14:08:00;INICIATIVA;S;0;CENTRO (BH);BH;611390.26;797003.62;5000
+5002;2001273047;B06000;LESAO CORPORAL;RUA SERRA NEGRA;1392;65038;20/5/2001 14:31:00;CIDADAO COMUM;S;CAC;SANTO ANDRE;BH;609041.92;799138.87;5001
+5003;2001273068;B06000;LESAO CORPORAL;RUA COROA DE FRA;266;77189;20/5/2001 14:49:00;CIDADAO COMUM;N;;CH VALE DO JATOB;BH;600562.13;786921.65;5002
+5004;2001273118;B06000;LESAO CORPORAL;BECO TIA ANASTAC;46;301677;20/5/2001 15:32:00;CIDADAO COMUM;S;FU;FAZENDINHA;BH;614694.46;795507.37;5003
+5005;2001273131;B03000;AMEACA;RUA PADRE LUIZ C;142;42472;20/5/2001 15:41:00;CIDADAO COMUM;N;;DAS INDUSTRIAS;BH;603753.25;793019.65;5004
+5006;2001273211;B04001;HOMICIDIO TENTAD;RUA ARAUA;126;5600;20/5/2001 16:35:00;CIDADAO COMUM;S;;SAO PAULO;BH;612543.10;803149.82;5005
+5007;2001273270;B03000;AMEACA;RUA PASSARO LIRA;146;68442;20/5/2001 17:09:00;CIDADAO COMUM;S;0;GOIANIA;BH;615530.18;803239.52;5006
+5008;2001273299;B06000;LESAO CORPORAL;RUA PADRE EUSTAQ;685;51294;20/5/2001 17:22:00;CIDADAO COMUM;N;;CARLOS PRATES;BH;608908.98;797876.89;5007
+5009;2001273353;B03000;AMEACA;AV TERESA CRISTI;724;67512;20/5/2001 17:53:00;CIDADAO COMUM;S;;CARLOS PRATES;BH;608524.82;797475.69;5008
+5010;2001273364;B03000;AMEACA;AV ERICO VERISSI;1167;41671;20/5/2001 17:59:00;CIDADAO COMUM;S;0;SANTA MONICA;BH;607617.30;808717.70;5009
+5011;2001273381;B06000;LESAO CORPORAL;RUA JULIO MESQUI;8;81849;20/5/2001 18:13:00;CIDADAO COMUM;S;;ITAIPU BH;BH;599193.51;788636.30;5010
+5012;2001273390;B03000;AMEACA;RUA BERTALHA;160;110187;20/5/2001 18:19:00;CIDADAO COMUM;N;;ANTONIO RIBEIRO ;BH;615738.53;806166.25;5011
+5013;2001273408;B06000;LESAO CORPORAL;RUA LUPERCIO PAI;221;57335;20/5/2001 18:30:00;CIDADAO COMUM;S;0;TIROL;BH;599950.08;789076.85;5012
+5014;2001273433;B03000;AMEACA;RUA LUME;269;41961;20/5/2001 18:47:00;CIDADAO COMUM;N;;COQUEIROS;BH;603305.77;800449.88;5013
+5015;2001273446;B03000;AMEACA;RUA EXPEDITO FLA;90;84847;20/5/2001 18:51:00;CIDADAO COMUM;N;CASA 41 / BLOCO ;DA LAGOA;BH;604749.70;809113.09;5014
+5016;2001273450;B06000;LESAO CORPORAL;RUA SAO FELICISS;440;62373;20/5/2001 18:54:00;CIDADAO COMUM;S;;ESTRELA DO ORIEN;BH;606148.08;792191.84;5015
+5017;2001273454;B06000;LESAO CORPORAL;RUA TEOFILO FILH;150;91070;20/5/2001 18:55:00;CIDADAO COMUM;N;;JARDIM AMERICA;BH;605989.94;793124.95;5016
+5018;2001273499;B03000;AMEACA;RUA AMIRO RODRIG;26;61862;20/5/2001 19:17:00;INICIATIVA;S;0;APARECIDA SETIMA;BH;609026.94;800161.98;5017
+5019;2001273523;B03000;AMEACA;RUA POVOA DE VAR;437;54958;20/5/2001 19:26:00;CIDADAO COMUM;N;;PAQUETA;BH;605302.03;802656.56;5018
+5020;2001273580;B03000;AMEACA;AV AMAZONAS;1877;3140;20/5/2001 20:06:00;CIDADAO COMUM;S;;BARRO PRETO;BH;609886.56;796413.42;5019
+5021;2001273587;B03000;AMEACA;RUA AARAO REIS;554;473;20/5/2001 20:12:00;INICIATIVA;N;0;CENTRO (BH);BH;611545.12;797119.64;5020
+5022;2001273623;B03000;AMEACA;AV RAJA GABAGLIA;3077;57830;20/5/2001 20:31:00;CIDADAO COMUM;S;0;ESTORIL;BH;609208.29;792438.19;5021
+5023;2001273629;B06000;LESAO CORPORAL;RUA COMENDADOR A;287;16382;20/5/2001 20:35:00;CIDADAO COMUM;N;;ITAMARATI;BH;606664.16;807899.34;5022
+5024;2001273668;B06000;LESAO CORPORAL;RUA CONSELHEIRO ;379;17095;20/5/2001 21:01:00;CIDADAO COMUM;S;0;FLORESTA;BH;612028.06;797010.00;5023
+5025;2001273698;B06000;LESAO CORPORAL;AV ABILIO MACHAD;469;634;20/5/2001 21:20:00;CIDADAO COMUM;S;0;INCONFIDENCIA;BH;605007.68;798009.39;5024
+5026;2001273734;B06000;LESAO CORPORAL;RUA DANIEL LOPES;37;34449;20/5/2001 21:39:00;CIDADAO COMUM;N;0;DAS INDUSTRIAS;BH;603834.56;793135.67;5025
+5027;2001273802;B03000;AMEACA;RUA JOAQUIM LEMO;18;37724;20/5/2001 22:21:00;CIDADAO COMUM;S;;MINASCAIXA;BH;609275.23;810024.59;5026
+5028;2001273829;B03000;AMEACA;RUA CARLOS NIEME;825;13472;20/5/2001 22:36:00;CIDADAO COMUM;S;FU;SAGRADA FAMILIA;BH;613695.14;799445.07;5027
+5029;2001273889;B06000;LESAO CORPORAL;AV JOSE BONIFACI;190;38579;20/5/2001 23:04:00;CIDADAO COMUM;S;0;PRADO LOPES;BH;610155.34;799025.63;5028
+5030;2001273908;B03000;AMEACA;RUA MARIA FELICI;185;44059;20/5/2001 23:15:00;CIDADAO COMUM;S;;SARANDI (URCA/BH;BH;603734.72;802316.09;5029
+5031;2001274017;B03000;AMEACA;RUA NEFELINA;117;81228;21/5/2001 00:40:00;INICIATIVA;N;0;SANTA TEREZA;BH;612835.00;797309.03;5030
+5032;2001274031;B06000;LESAO CORPORAL;RUA LUIS AUGUSTO;5;124857;21/5/2001 00:52:00;CIDADAO COMUM;N;;MANGUEIRAS;BH;600721.87;786584.83;5031
+5033;2001274046;B02000;RIXA;RUA VISEU;908;62042;21/5/2001 01:08:00;CIDADAO COMUM;S;;SAO FRANCISCO;BH;609672.72;802306.32;5032
+5034;2001274196;B06000;LESAO CORPORAL;RUA BONAPARTE;75;10083;21/5/2001 06:48:00;CIDADAO COMUM;N;;PADRE EUSTAQUIO;BH;607584.10;797552.96;5033
+5035;2001274197;B03000;AMEACA;RUA MARACA;1154;43346;21/5/2001 06:53:00;CIDADAO COMUM;S;;CAETANO FURQUIM;BH;616526.60;799181.02;5034
+5036;2001274450;B06000;LESAO CORPORAL;RUA CENTAURO;541;14563;21/5/2001 09:48:00;CIDADAO COMUM;S;;SANTA LUCIA;BH;610100.51;792567.18;5035
+5037;2001274496;B03000;AMEACA;RUA CURITIBA;632;19090;21/5/2001 10:22:00;POLICIAL MILITAR;S;0;CENTRO (BH);BH;610853.82;797287.53;5036
+5038;2001274552;B03000;AMEACA;RUA DOS TUPINAMB;761;69940;21/5/2001 10:58:00;CIDADAO COMUM;S;0;CENTRO (BH);BH;610842.81;797365.98;5037
+5039;2001274570;B03000;AMEACA;RUA PLATINA;1457;54453;21/5/2001 11:11:00;CIDADAO COMUM;S;0;CALAFATE;BH;607792.63;796609.73;5038
+5040;2001274665;B03000;AMEACA;RUA TREZE;150;302331;21/5/2001 12:21:00;CIDADAO COMUM;S;;BONSUCESSO;BH;606355.86;789862.18;5039
+5041;2001274764;B03000;AMEACA;RUA FAGUNDES VAR;256;27689;21/5/2001 13:30:00;CIDADAO COMUM;N;0;LAGOINHA;BH;610256.27;798704.22;5040
+5042;2001274886;B03000;AMEACA;RUA PINTOR AUGUS;180;128091;21/5/2001 15:06:00;CIDADAO COMUM;S;;TUPI;BH;613389.00;805635.15;5041
+5043;2001274908;B04001;HOMICIDIO TENTAD;AV RAJA GABAGLIA;1600;57830;21/5/2001 15:16:00;INICIATIVA;S;0;MORRO DAS PEDRAS;BH;608784.38;794022.15;5042
+5044;2001274931;B03000;AMEACA;RUA SAO PAULO;114;63464;21/5/2001 15:31:00;CIDADAO COMUM;S;EN114   AN1;CENTRO (BH);BH;611103.00;797681.10;5043
+5045;2001274945;B06000;LESAO CORPORAL;RUA PITT;343;54380;21/5/2001 15:38:00;INICIATIVA;N;0;UNIAO;BH;612765.60;801021.57;5044
+5046;2001274949;B03000;AMEACA;AV JEQUITINHONHA;45;37305;21/5/2001 15:39:00;CIDADAO COMUM;S;;VERA CRUZ;BH;615703.97;798584.81;5045
+5047;2001274973;B03000;AMEACA;AV VINTE E OITO ;283;72970;21/5/2001 15:54:00;CIDADAO COMUM;S;;ESPLANADA;BH;614619.31;798893.34;5046
+5048;2001275004;B06000;LESAO CORPORAL;RUA EXPEDICIONAR;185;27027;21/5/2001 16:14:00;CIDADAO COMUM;N;0;SAO LUIZ;BH;606686.05;803437.82;5047
+5049;2001275221;B06000;LESAO CORPORAL;RUA ARIOLINO ARI;151;85811;21/5/2001 18:01:00;CIDADAO COMUM;N;CAFU;SERRA VERDE;BH;609228.75;810106.96;5048
+5050;2001275330;B04001;HOMICIDIO TENTAD;AV A;930;34099;21/5/2001 19:04:00;CIDADAO COMUM;N;;CONJUNTO FELICID;BH;612389.02;807268.89;5049
+5051;2001275338;B03000;AMEACA;RUA MONTE BRANCO;585;46417;21/5/2001 19:07:00;CIDADAO COMUM;S;0;NOVA SUISSA;BH;606551.97;795683.29;5050
+5052;2001275344;B04002;HOMICIDIO CONSUM;RUA JOAO PAULO I;5;300458;21/5/2001 19:09:00;CIDADAO COMUM;S;;JARDIM AMERICA;BH;607634.38;793575.75;5051
+5053;2001275414;B03000;AMEACA;RUA PAULA DIAS;66;52634;21/5/2001 19:50:00;INICIATIVA;N;0;UNIAO;BH;612328.98;801534.33;5052
+5054;2001275472;B06000;LESAO CORPORAL;RUA ALFEU DE CAR;276;2223;21/5/2001 20:28:00;CIDADAO COMUM;S;;TUPI;BH;613601.59;805893.87;5053
+5055;2001275546;B03000;AMEACA;RUA PARA DE MINA;271;52070;21/5/2001 21:35:00;CIDADAO COMUM;S;;PADRE EUSTAQUIO;BH;606412.82;797640.03;5054
+5056;2001275600;B04001;HOMICIDIO TENTAD;RUA JOSUE MARTIN;146;84821;21/5/2001 22:05:00;CIDADAO COMUM;N;;DA LAGOA;BH;604509.51;809508.04;5055
+5057;2001275603;B03000;AMEACA;RUA JOSE PINTO D;389;100901;21/5/2001 22:06:00;CIDADAO COMUM;S;;JARDIM GUANABARA;BH;611512.23;807703.49;5056
+5058;2001275640;B04001;HOMICIDIO TENTAD;RUA CURITIBA;258;19090;21/5/2001 22:33:00;INICIATIVA;N;0;CENTRO (BH);BH;610943.75;797629.80;5057
+5059;2001275833;B06000;LESAO CORPORAL;AV SANTA ALBERTI;903;116170;22/5/2001 01:47:00;CIDADAO COMUM;S;;CASA BRANCA;BH;616511.53;800054.35;5058
+5060;2001276130;B03000;AMEACA;RUA FERREIRA;288;28161;22/5/2001 08:52:00;CIDADAO COMUM;N;;EYMARD;BH;613694.20;803637.73;5059
+5061;2001276167;B04001;HOMICIDIO TENTAD;RUA SANTOS;2200;61910;22/5/2001 09:18:00;CIDADAO COMUM;N;0;SAO DOMINGOS;BH;607908.90;793256.53;5060
+5062;2001276251;B06000;LESAO CORPORAL;RUA ALIANCA;92;2324;22/5/2001 10:27:00;CIDADAO COMUM;N;0;SAO GABRIEL;BH;613401.48;804083.87;5061
+5063;2001276350;B06000;LESAO CORPORAL;AV ELIAS ANTONIO;502;104726;22/5/2001 11:38:00;CIDADAO COMUM;N;0;VENDA NOVA;BH;607224.67;809399.71;5062
+5064;2001276366;B03000;AMEACA;RUA FREI LUIZ DE;481;29961;22/5/2001 11:49:00;CIDADAO COMUM;S;;JOAO PINHEIRO;BH;604477.25;796175.73;5063
+5065;2001276411;B06000;LESAO CORPORAL;RUA AMERICO MAGA;422;3314;22/5/2001 12:20:00;CIDADAO COMUM;S;;BARREIRO;BH;602220.18;790566.15;5064
+5066;2001276422;B06000;LESAO CORPORAL;RUA DOS CARIJOS;504;81243;22/5/2001 12:32:00;INICIATIVA;N;0;CENTRO (BH);BH;610976.67;797223.89;5065
+5067;2001276488;B06000;LESAO CORPORAL;RUA GENTIL PORTU;449;119370;22/5/2001 13:23:00;CIDADAO COMUM;S;0;VILA MAGNESITA;BH;602070.13;795047.24;5066
+5068;2001276570;B06000;LESAO CORPORAL;RUA ESPINOSA;315;26024;22/5/2001 14:28:00;CIDADAO COMUM;N;;CARLOS PRATES;BH;609029.44;798321.28;5067
+5069;2001276579;B03000;AMEACA;RUA JOSE MOREIRA;1053;55368;22/5/2001 14:33:00;CIDADAO COMUM;S;;SAO MARCOS;BH;614395.90;802801.54;5068
+5070;2001276697;B03000;AMEACA;RUA FLOR DA CACH;330;28524;22/5/2001 15:39:00;CIDADAO COMUM;S;;JARDIM MONTANHES;BH;605682.14;799348.85;5069
+5071;2001276698;B06000;LESAO CORPORAL;RUA RIO GRANDE D;441;58744;22/5/2001 15:40:00;CIDADAO COMUM;S;LJ;CENTRO (BH);BH;610401.04;797083.20;5070
+5072;2001276808;B06000;LESAO CORPORAL;AV DOUTOR ALVARO;754;117665;22/5/2001 16:40:00;CIDADAO COMUM;S;0;SANTA BRANCA;BH;608440.88;807202.81;5071
+5073;2001277070;B06000;LESAO CORPORAL;RUA ANTONIO PRAC;98;109805;22/5/2001 18:49:00;CIDADAO COMUM;S;;BONSUCESSO;BH;605541.58;789914.87;5072
+5074;2001277095;B03000;AMEACA;RUA FERNAO DIAS;60;28133;22/5/2001 18:58:00;CIDADAO COMUM;S;0;CASA BRANCA;BH;616318.93;799741.71;5073
+5075;2001277203;B03000;AMEACA;RUA W QUATRO;339;122634;22/5/2001 20:05:00;CIDADAO COMUM;S;0;PONGELUPE;BH;604000.81;787302.07;5074
+5076;2001277223;B06000;LESAO CORPORAL;RUA SAO VICENTE;54;88126;22/5/2001 20:15:00;CIDADAO COMUM;S;BLOCO 390;GRANJA FREITAS;BH;617022.85;798456.93;5075
+5077;2001277336;B03000;AMEACA;RUA MARTINS SOAR;740;45049;22/5/2001 21:33:00;CIDADAO COMUM;S;;VISTA ALEGRE;BH;604912.80;792944.99;5076
+5078;2001277339;B03000;AMEACA;RUA VINTE;52;302826;22/5/2001 21:36:00;CIDADAO COMUM;S;;NOVO AARAO REIS;BH;614620.50;805688.82;5077
+5079;2001277380;B06000;LESAO CORPORAL;RUA MADALENA;307;42315;22/5/2001 22:01:00;CIDADAO COMUM;S;AP01;SENHOR BOM JESUS;BH;609701.82;799838.82;5078
+5080;2001277394;B06000;LESAO CORPORAL;AV FLOR DE SEDA;580;748;22/5/2001 22:12:00;CIDADAO COMUM;S;;LINDEIA;BH;599238.03;790679.79;5079
+5081;2001277399;B06000;LESAO CORPORAL;RUA DAS GABIROBA;95;30375;22/5/2001 22:18:00;CIDADAO COMUM;S;;VILA CLORIS;BH;610034.72;808298.49;5080
+5082;2001277400;B03000;AMEACA;RUA BELA EMILIA;200;96175;22/5/2001 22:16:00;CIDADAO COMUM;S;0;OLARIA;BH;601337.35;789370.00;5081
+5083;2001277466;B04001;HOMICIDIO TENTAD;RUA ALVARO OLIVE;175;58381;22/5/2001 23:04:00;CIDADAO COMUM;S;0;MARIA VIRGINIA;BH;611835.32;802870.75;5082
+5084;2001277478;B06000;LESAO CORPORAL;RUA SEARA;378;68685;22/5/2001 23:10:00;CIDADAO COMUM;S;0;COQUEIROS;BH;602279.67;798769.43;5083
+5085;2001277567;B06000;LESAO CORPORAL;AV NELIO CERQUEI;15;72359;23/5/2001 00:39:00;INICIATIVA;S;0;TIROL;BH;600947.66;789885.51;5084
+5086;2001277681;B03000;AMEACA;RUA ANTONIO JULI;216;111379;23/5/2001 03:03:00;CIDADAO COMUM;S;;SANTA AMELIA;BH;606775.18;806180.58;5085
+5087;2001277768;B06000;LESAO CORPORAL;RUA EXPEDITO FLA;40;84847;23/5/2001 05:56:00;CIDADAO COMUM;N;CA 41;DA LAGOA;BH;604784.62;809092.91;5086
+5088;2001277777;B06000;LESAO CORPORAL;RUA DOS GUARANIS;124;32181;23/5/2001 06:32:00;INICIATIVA;N;0;CENTRO (BH);BH;610723.61;797512.51;5087
+5089;2001278167;B03000;AMEACA;RUA ESTANISLAU F;111;26267;23/5/2001 11:25:00;CIDADAO COMUM;S;;BANDEIRANTES;BH;606222.65;802875.95;5088
+5090;2001278187;B03000;AMEACA;RUA DOS CARIJOS;408;81243;23/5/2001 11:39:00;CIDADAO COMUM;N;SOBRE LOJA;CENTRO (BH);BH;611064.18;797198.94;5089
+5091;2001278248;B03000;AMEACA;RUA BERNARDINO D;231;9336;23/5/2001 12:41:00;CIDADAO COMUM;S;;GUTIERREZ;BH;608913.93;795852.97;5090
+5092;2001278280;B03000;AMEACA;RUA ITAPETINGA;87;35804;23/5/2001 12:59:00;CIDADAO COMUM;S;0;SAO CRISTOVAO;BH;610402.29;799494.96;5091
+5093;2001278287;B03000;AMEACA;AV AFONSO PENA;4183;1259;23/5/2001 13:10:00;INICIATIVA;N;0;CRUZEIRO;BH;612944.53;794095.63;5092
+5094;2001278426;B03000;AMEACA;RUA OURO FINO;16;50714;23/5/2001 14:44:00;CIDADAO COMUM;S;AP901;CRUZEIRO;BH;612074.49;794639.35;5093
+5095;2001278451;B09000;ABANDONO DE INCA;RUA DOMINGOS DE ;73;102112;23/5/2001 15:03:00;CIDADAO COMUM;S;;ITAIPU BH;BH;599757.23;788374.16;5094
+5096;2001278476;B03000;AMEACA;RUA GUARAIBA;3;96291;23/5/2001 15:15:00;CIDADAO COMUM;S;;SAO GABRIEL;BH;614395.92;804666.82;5095
+5097;2001278552;B03000;AMEACA;RUA BANDONION;442;170139;23/5/2001 15:52:00;CIDADAO COMUM;N;PX472;VILA CAFEZAL;BH;614122.39;794785.34;5096
+5098;2001278610;B03000;AMEACA;RUA TOMBOS;38;67985;23/5/2001 16:16:00;CIDADAO COMUM;S;;CALAFATE;BH;607983.96;796880.16;5097
+5099;2001278633;B03000;AMEACA;RUA POUSO ALEGRE;105;54932;23/5/2001 16:29:00;CIDADAO COMUM;N;;FLORESTA;BH;611138.61;798018.14;5098
+5100;2001278753;B03000;AMEACA;RUA DOS BOROROS;19;10216;23/5/2001 17:35:00;INICIATIVA;S;0;SANTA MONICA;BH;606549.06;807469.90;5099
+5101;2001278850;B06000;LESAO CORPORAL;RUA QUARENTA E U;106;34801;23/5/2001 18:24:00;CIDADAO COMUM;S;;CONJUNTO FELICID;BH;612521.64;807196.19;5100
+5102;2001278927;B03000;AMEACA;RUA CANTAGALO;80;12697;23/5/2001 19:04:00;CIDADAO COMUM;S;;SANTO ANDRE;BH;609858.05;799342.85;5101
+5103;2001278946;B03000;AMEACA;AV SARAMENHA;1400;64007;23/5/2001 19:14:00;CIDADAO COMUM;S;;GUARANI;BH;613120.71;805643.66;5102
+5104;2001278966;B03000;AMEACA;RUA CINQUENTA;368;302845;23/5/2001 19:22:00;CIDADAO COMUM;S;;TUPI;BH;614150.27;805475.49;5103
+5105;2001278984;B03000;AMEACA;RUA CORONEL OTAV;29;13620;23/5/2001 19:36:00;CIDADAO COMUM;S;0;PARAISO;BH;614424.13;797386.27;5104
+5106;2001279009;B03000;AMEACA;RUA IPANEMA;1135;34726;23/5/2001 19:50:00;CIDADAO COMUM;S;;SARANDI (URCA/BH;BH;602814.25;802311.29;5105
+5107;2001279047;B03000;AMEACA;RUA MARIA BEATRI;166;43881;23/5/2001 20:11:00;CIDADAO COMUM;N;AP 103;HAVAI;BH;606737.06;793607.05;5106
+5108;2001279168;B06000;LESAO CORPORAL;AV NELIO CERQUEI;15;72359;23/5/2001 21:13:00;INICIATIVA;S;0;TIROL;BH;600947.66;789885.51;5107
+5109;2001279277;B03000;AMEACA;RUA BOLIVAR;458;9871;23/5/2001 22:26:00;CIDADAO COMUM;S;;UNIAO;BH;612866.19;801674.00;5108
+5110;2001279278;B04002;HOMICIDIO CONSUM;RUA RAINHA DAS F;162;92159;23/5/2001 22:26:00;CIDADAO COMUM;N;0;FILADELFIA;BH;602100.52;797477.94;5109
+5111;2001279344;B06000;LESAO CORPORAL;RUA DOS CAETES;372;11376;23/5/2001 23:04:00;CIDADAO COMUM;N;AN2;CENTRO (BH);BH;611253.80;797440.40;5110
+5112;2001279381;B03000;AMEACA;RUA JOAO ALVES T;75;84963;23/5/2001 23:20:00;CIDADAO COMUM;S;;MANTIQUEIRA;BH;606095.35;810560.19;5111
+5113;2001279416;B06000;LESAO CORPORAL;AV GETULIO VARGA;671;81256;23/5/2001 23:41:00;CIDADAO COMUM;N;0;FUNCIONARIOS;BH;612052.08;795376.53;5112
+5114;2001279426;B06000;LESAO CORPORAL;AV ITAITUBA;450;35454;23/5/2001 23:50:00;CIDADAO COMUM;N;0;BOA VISTA;BH;615072.17;799768.56;5113
+5115;2001279517;B06000;LESAO CORPORAL;BECO PAI JOAQUIM;130;171056;24/5/2001 01:13:00;CIDADAO COMUM;S;;CABANA;BH;604615.44;794171.61;5114
+5116;2001279549;B06000;LESAO CORPORAL;RUA DAS PETUNIAS;845;11870;24/5/2001 01:53:00;CIDADAO COMUM;N;;LINDEIA;BH;598835.03;791076.43;5115
+5117;2001279573;B03000;AMEACA;RUA PROFESSOR RU;337;86754;24/5/2001 02:39:00;CIDADAO COMUM;N;;JARDIM GUANABARA;BH;611623.53;807570.50;5116
+5118;2001279836;B03000;AMEACA;RUA ENGENHO DA P;72;85622;24/5/2001 09:04:00;INICIATIVA;S;0;ENGENHO NOGUEIRA;BH;606453.65;800474.17;5117
+5119;2001279952;B03000;AMEACA;RUA JOSUE MARTIN;768;84821;24/5/2001 10:08:00;CIDADAO COMUM;N;;DA LAGOA;BH;604376.66;809326.50;5118
+5120;2001280107;B06000;LESAO CORPORAL;RUA CANDIDO DE S;657;12628;24/5/2001 11:59:00;CIDADAO COMUM;N;;GAMELEIRA;BH;605715.13;794396.26;5119
+5121;2001280115;B03000;AMEACA;RUA JABOATAO;33;36498;24/5/2001 12:03:00;CIDADAO COMUM;S;;JARDINOPOLIS;BH;605038.10;794746.42;5120
+5122;2001280171;B03000;AMEACA;RUA DOS TUPINAMB;861;69940;24/5/2001 12:55:00;CIDADAO COMUM;S;;CENTRO (BH);BH;610736.01;797388.04;5121
+5123;2001280174;B06000;LESAO CORPORAL;RUA BENJAMIM JAC;294;9207;24/5/2001 12:59:00;CIDADAO COMUM;N;CAFU;GUTIERREZ;BH;608971.75;794756.23;5122
+5124;2001280327;B06000;LESAO CORPORAL;RUA CARANGOLA;288;13094;24/5/2001 14:45:00;CIDADAO COMUM;N;3 ANDAR;SANTO ANTONIO;BH;610731.49;794680.82;5123
+5125;2001280338;B06000;LESAO CORPORAL;AV CRISTIANO MAC;4000;18652;24/5/2001 14:54:00;INICIATIVA;N;0;DOS PALMARES;BH;612434.91;802092.92;5124
+5126;2001280343;B03000;AMEACA;RUA JULITA NOGUE;815;39597;24/5/2001 14:56:00;CIDADAO COMUM;S;LJ1;SANTA TEREZINHA;BH;604270.87;802788.56;5125
+5127;2001280372;B03000;AMEACA;RUA JOAO ALEXAND;267;71384;24/5/2001 15:15:00;CIDADAO COMUM;S;;MILIONARIOS;BH;603980.36;789980.34;5126
+5128;2001280491;B06000;LESAO CORPORAL;RUA CURITIBA;618;19090;24/5/2001 16:12:00;CIDADAO COMUM;S;FR601;CENTRO (BH);BH;610854.28;797299.45;5127
+5129;2001280502;B06000;LESAO CORPORAL;RUA GRAUNAS;414;31797;24/5/2001 16:19:00;CIDADAO COMUM;S;PROX. PADARIA GR;VILA CEMIG;BH;605539.74;788730.01;5128
+5130;2001280592;B03000;AMEACA;RUA RIO DE JANEI;1226;58772;24/5/2001 17:03:00;CIDADAO COMUM;S;0;LOURDES;BH;610936.28;796511.14;5129
+5131;2001280616;B03000;AMEACA;RUA SEBASTIAO DE;154;64209;24/5/2001 17:16:00;INICIATIVA;S;0;NOVA GRANADA;BH;607921.86;794816.01;5130
+5132;2001280644;B03000;AMEACA;RUA ITAOCA;135;35703;24/5/2001 17:31:00;CIDADAO COMUM;N;;FLORAMAR;BH;611520.36;805977.45;5131
+5133;2001280745;B03000;AMEACA;RUA MOREIRA DIAS;7;31191;24/5/2001 18:26:00;CIDADAO COMUM;N;LJ;CONJ HAB JARDIM ;BH;603860.94;798157.37;5132
+5134;2001280853;B03000;AMEACA;AV PRESIDENTE AN;2241;4461;24/5/2001 19:10:00;INICIATIVA;S;0;CACHOEIRINHA;BH;609932.46;800069.95;5133
+5135;2001280949;B03000;AMEACA;RUA IPANEMA;1061;34726;24/5/2001 20:04:00;CIDADAO COMUM;S;0;SARANDI (URCA/BH;BH;602857.04;802334.16;5134
+5136;2001280964;B05000;SEQUESTRO E CARC;RUA DEPUTADO ALV;416;66030;24/5/2001 20:08:00;CIDADAO COMUM;S;APTO 102;SANTO ANTONIO;BH;610586.47;793838.70;5135
+5137;2001280989;B05000;SEQUESTRO E CARC;RUA CORONEL JOAQ;257;17864;24/5/2001 20:18:00;CIDADAO COMUM;N;FU;HELIOPOLIS;BH;611086.49;806159.62;5136
+5138;2001281063;B03000;AMEACA;RUA EMANUEL;224;87010;24/5/2001 21:04:00;CIDADAO COMUM;S;0;PILAR;BH;607677.72;788684.08;5137
+5139;2001281065;B03000;AMEACA;AV DOS BANDEIRAN;2323;7775;24/5/2001 21:06:00;CIDADAO COMUM;S;;MANGABEIRAS;BH;613280.67;794128.20;5138
+5140;2001281119;B06000;LESAO CORPORAL;AV FRANCISCO SA;1369;29656;24/5/2001 21:31:00;CIDADAO COMUM;S;0;GUTIERREZ;BH;608976.96;795456.85;5139
+5141;2001281127;B03000;AMEACA;RUA DOS GOITACAZ;182;31400;24/5/2001 21:35:00;CIDADAO COMUM;S;0;CENTRO (BH);BH;611092.06;796762.15;5140
+5142;2001281197;B04001;HOMICIDIO TENTAD;RUA ALFREDO ALVE;10;20636;24/5/2001 22:19:00;CIDADAO COMUM;S;;SAO JOAO BATISTA;BH;608779.25;807888.15;5141
+5143;2001281392;B03000;AMEACA;RUA GONCALVES DI;2299;31513;25/5/2001 00:16:00;INICIATIVA;N;0;LOURDES;BH;610326.03;796058.66;5142
+5144;2001281409;B03000;AMEACA;AV PARANA;26;52230;25/5/2001 00:34:00;CIDADAO COMUM;S;;CENTRO (BH);BH;610802.35;797494.35;5143
+5145;2001281522;B03000;AMEACA;RUA MAJOR LOPES;729;42646;25/5/2001 02:47:00;CIDADAO COMUM;N;;SAO PEDRO;BH;611437.36;794125.71;5144
+5146;2001281898;B03000;AMEACA;RUA INDIANA;509;34410;25/5/2001 09:43:00;CIDADAO COMUM;S;AP301;JARDIM AMERICA;BH;607373.55;794767.27;5145
+5147;2001281946;B03000;AMEACA;RUA PADRE PEDRO ;3260;51657;25/5/2001 10:11:00;CIDADAO COMUM;N;0;LETICIA;BH;607007.69;809969.06;5146
+5148;2001282081;B02000;RIXA;AV OLEGARIO MACI;583;49699;25/5/2001 11:46:00;CIDADAO COMUM;S;LJ31;CENTRO (BH);BH;610565.00;797105.59;5147
+5149;2001282088;B06000;LESAO CORPORAL;VIA PRESIDENTE J;4500;130006;25/5/2001 11:50:00;CIDADAO COMUM;N;;CALIFORNIA;BH;607778.73;796821.76;5148
+5150;2001282089;B03000;AMEACA;RUA SAO LUIZ;5;63288;25/5/2001 11:51:00;CIDADAO COMUM;S;;SAO TOMAZ;BH;609870.41;805338.58;5149
+5151;2001282334;B03000;AMEACA;RUA CRUZEIRO DO ;209;18927;25/5/2001 14:41:00;CIDADAO COMUM;S;;SANTA HELENA (BH;BH;603532.73;789011.35;5150
+5152;2001282410;B06000;LESAO CORPORAL;AV PRESIDENTE CA;525;55125;25/5/2001 15:36:00;CIDADAO COMUM;N;0;ALTO DOS CAICARA;BH;608340.47;798800.45;5151
+5153;2001282491;B06000;LESAO CORPORAL;RUA DOUTOR GERVA;40;87050;25/5/2001 16:25:00;CIDADAO COMUM;N;0;OLHOS DAGUA;BH;608108.50;788523.67;5152
+5154;2001282503;B03000;AMEACA;RUA CINCO DE JAN;228;119604;25/5/2001 16:34:00;CIDADAO COMUM;N;NR CORRETO E 254;SAO GERALDO;BH;616284.75;799825.01;5153
+5155;2001282546;B06000;LESAO CORPORAL;AV AMAZONAS;478;3140;25/5/2001 16:53:00;CIDADAO COMUM;S;0;CENTRO (BH);BH;611039.88;797135.69;5154
+5156;2001282551;B04001;HOMICIDIO TENTAD;AV MANOEL SALLES;200;432;25/5/2001 16:56:00;CIDADAO COMUM;N;;CARDOSO;BH;603752.13;788401.90;5155
+5157;2001282566;B06000;LESAO CORPORAL;RUA SERRINHA;45;129201;25/5/2001 17:01:00;CIDADAO COMUM;N;;INDEPENDENCIA;BH;600519.25;786719.95;5156
+5158;2001282631;B03000;AMEACA;RUA GERALDA GONC;60;84254;25/5/2001 17:33:00;CIDADAO COMUM;S;RUA IZAUTINA MAR;JARDIM VITORIA;BH;617144.90;804912.86;5157
+5159;2001282726;B04001;HOMICIDIO TENTAD;RUA BENTO;30;170807;25/5/2001 18:27:00;INICIATIVA;S;0;MORRO DAS PEDRAS;BH;608443.37;794109.13;5158
+5160;2001282731;B03000;AMEACA;RUA I;130;104700;25/5/2001 18:26:00;CIDADAO COMUM;S;;SALGADO FILHO;BH;607030.39;793937.19;5159
+5161;2001282982;B06000;LESAO CORPORAL;AV PARANA;33;52230;25/5/2001 20:32:00;CIDADAO COMUM;N;;CENTRO (BH);BH;610863.26;797477.33;5160
+5162;2001283047;B06000;LESAO CORPORAL;RUA JOAQUIM TEIX;63;38207;25/5/2001 21:06:00;CIDADAO COMUM;S;;CARDOSO;BH;604078.65;788100.48;5161
+5163;2001283053;B06000;LESAO CORPORAL;RUA RADIALISTA A;178;99003;25/5/2001 21:10:00;CIDADAO COMUM;S;;CEU AZUL;BH;604527.89;807566.31;5162
+5164;2001283176;B05000;SEQUESTRO E CARC;RUA SESSENTA E U;100;65167;25/5/2001 22:18:00;CIDADAO COMUM;S;;SAO JOAO BATISTA;BH;608098.40;808395.62;5163
+5165;2001283214;B03000;AMEACA;AV DOM PEDRO II;2885;53145;25/5/2001 22:41:00;INICIATIVA;S;0;CARLOS PRATES;BH;608077.06;798049.51;5164
+5166;2001283237;B06000;LESAO CORPORAL;RUA CENTRALINA;270;14840;25/5/2001 22:52:00;CIDADAO COMUM;S;0;SANTA INES;BH;614171.90;800275.69;5165
+5167;2001283243;B03000;AMEACA;RUA MINISTRO OLI;72;46619;25/5/2001 22:57:00;CIDADAO COMUM;S;CAA;SANTA MONICA;BH;607953.66;807394.94;5166
+5168;2001283278;B03000;AMEACA;RUA OSWALDO FERR;70;39382;25/5/2001 23:12:00;CIDADAO COMUM;S;;DAS INDUSTRIAS;BH;604732.86;792044.18;5167
+5169;2001283305;B08000;VIOLACAO DE DOMI;RUA PROFESSOR AR;323;5801;25/5/2001 23:29:00;CIDADAO COMUM;S;AP02;SANTO ANTONIO;BH;610205.23;794414.18;5168
+5170;2001283337;B04001;HOMICIDIO TENTAD;RUA NOSSA SENHOR;10;170182;25/5/2001 23:43:00;CIDADAO COMUM;S;0;CABANA;BH;604634.49;794225.93;5169
+5171;2001283373;B06000;LESAO CORPORAL;RUA DESENGANO;32;19860;26/5/2001 00:02:00;CIDADAO COMUM;N;;MANGABEIRAS;BH;612211.82;792481.68;5170
+5172;2001283425;B06000;LESAO CORPORAL;RUA PLATINA;580;54453;26/5/2001 00:43:00;CIDADAO COMUM;S;0;PRADO;BH;608677.53;796816.06;5171
+5173;2001283430;B03000;AMEACA;AV PRESIDENTE AN;3633;4461;26/5/2001 00:48:00;CIDADAO COMUM;S;0;CACHOEIRINHA;BH;609764.82;801488.12;5172
+5174;2001283477;B02000;RIXA;RUA COBRE;200;16124;26/5/2001 01:11:00;CIDADAO COMUM;S;;CRUZEIRO;BH;612541.79;794425.08;5173
+5175;2001283500;B06000;LESAO CORPORAL;RUA DOUTOR RIBEI;355;23650;26/5/2001 01:26:00;CIDADAO COMUM;S;0;DAS INDUSTRIAS;BH;603537.51;792795.69;5174
+5176;2001283517;B03000;AMEACA;AV PRESIDENTE AN;3633;4461;26/5/2001 01:36:00;CIDADAO COMUM;N;0;CACHOEIRINHA;BH;609764.82;801488.12;5175
+5177;2001283535;B02000;RIXA;RUA CURITIBA;343;19090;26/5/2001 01:50:00;INICIATIVA;N;0;CENTRO (BH);BH;610968.29;797543.53;5176
+5178;2001283543;B06000;LESAO CORPORAL;RUA DANTE;416;19642;26/5/2001 01:58:00;CIDADAO COMUM;S;;SAO LUCAS;BH;612910.82;795728.90;5177
+5179;2001283616;B06000;LESAO CORPORAL;RUA MARMORE;582;44695;26/5/2001 02:57:00;CIDADAO COMUM;N;0;SANTA TEREZA;BH;613395.01;797414.73;5178
+5180;2001283663;B02000;RIXA;RUA SILVA ALVARE;507;65810;26/5/2001 03:30:00;CIDADAO COMUM;S;;SAO GERALDO;BH;615370.54;799332.02;5179
+5181;2001283700;B06000;LESAO CORPORAL;RUA SAO PAULO;175;63464;26/5/2001 04:26:00;CIDADAO COMUM;N;0;CENTRO (BH);BH;611119.54;797591.18;5180
+5182;2001283757;B04001;HOMICIDIO TENTAD;AV AMAZONAS;5253;3140;26/5/2001 05:45:00;INICIATIVA;S;0;NOVA SUISSA;BH;606825.09;795951.48;5181
+5183;2001283767;B06000;LESAO CORPORAL;RUA STA MARGARID;439;60986;26/5/2001 06:05:00;CIDADAO COMUM;S;;NAZARE;BH;615391.93;804360.13;5182
+5184;2001283791;B03000;AMEACA;RUA SILVA ALVARE;507;65810;26/5/2001 06:47:00;CIDADAO COMUM;N;;SAO GERALDO;BH;615370.54;799332.02;5183
+5185;2001283799;B06000;LESAO CORPORAL;RUA ESPIRITO SAN;361;26052;26/5/2001 06:59:00;CIDADAO COMUM;N;0;CENTRO (BH);BH;611326.30;797302.57;5184
+5186;2001283851;B06000;LESAO CORPORAL;AV NOSSA SENHORA;1890;47996;26/5/2001 07:51:00;INICIATIVA;N;0;SAO PEDRO;BH;611009.80;793343.42;5185
+5187;2001283940;B03000;AMEACA;RUA ITAPECERICA;769;35757;26/5/2001 08:52:00;INICIATIVA;S;0;LAGOINHA;BH;610386.11;798482.47;5186
+5188;2001283965;B03000;AMEACA;AV AMAZONAS;4410;3140;26/5/2001 09:14:00;CIDADAO COMUM;S;;NOVA SUISSA;BH;607487.10;796000.98;5187
+5189;2001283997;B03000;AMEACA;AV PORTUGAL;5101;54816;26/5/2001 09:34:00;CIDADAO COMUM;S;;ITAPOA;BH;609450.94;805490.11;5188
+5190;2001284134;B06000;LESAO CORPORAL;RUA SERRA FORMOS;20;109225;26/5/2001 11:14:00;CIDADAO COMUM;S;0;ANTONIO RIBEIRO ;BH;615180.89;807887.67;5189
+5191;2001284207;B03000;AMEACA;RUA TERCIA CABRA;50;118135;26/5/2001 12:13:00;CIDADAO COMUM;N;;CH TUNEL DE IBIR;BH;599852.03;789754.31;5190
+5192;2001284300;B06000;LESAO CORPORAL;RUA QUATRO;46;126840;26/5/2001 13:32:00;CIDADAO COMUM;S;0;BETANIA;BH;605305.32;792543.78;5191
+5193;2001284304;B06000;LESAO CORPORAL;AV GUARAPARI;1201;20711;26/5/2001 13:34:00;CIDADAO COMUM;N;;JARDIM ATLANTICO;BH;607346.51;806392.63;5192
+5194;2001284336;B03000;AMEACA;RUA ICARAI;978;34004;26/5/2001 13:55:00;CIDADAO COMUM;N;AP301;ALTO DOS CAICARA;BH;607895.02;799025.63;5193
+5195;2001284398;B03000;AMEACA;RUA NOSSA SENHOR;25;64905;26/5/2001 14:37:00;CIDADAO COMUM;S;0;JARDIM AMERICA;BH;607765.22;794520.66;5194
+5196;2001284399;B03000;AMEACA;RUA CATALUNHA;166;14204;26/5/2001 14:38:00;INICIATIVA;S;0;SARANDI (URCA/BH;BH;603684.17;802323.97;5195
+5197;2001284477;B03000;AMEACA;RUA INFANTIL;81;80660;26/5/2001 15:22:00;CIDADAO COMUM;S;;DOM BOSCO;BH;604563.01;797057.53;5196
+5198;2001284495;B06000;LESAO CORPORAL;RUA MARCELINO FE;727;43490;26/5/2001 15:32:00;CIDADAO COMUM;S;;SANTA INES;BH;614209.93;801758.02;5197
+5199;2001284503;B03000;AMEACA;RUA GUTIERREZ;5;24637;26/5/2001 15:35:00;CIDADAO COMUM;S;NUMERO CORRETO E;TAQUARIL;BH;617427.50;797417.78;5198
+5200;2001284543;B03000;AMEACA;RUA MARATAIZES;310;51092;26/5/2001 16:01:00;CIDADAO COMUM;S;;IPANEMA;BH;604675.62;798245.47;5199
+5201;2001284555;B04002;HOMICIDIO CONSUM;RUA DONA JUDITE ;794;39414;26/5/2001 16:10:00;CIDADAO COMUM;N;CAA;REGINA;BH;598670.03;790410.17;5200
+5202;2001284564;B06000;LESAO CORPORAL;AV SIDERAL;89;65721;26/5/2001 16:14:00;CIDADAO COMUM;S;;VISTA ALEGRE;BH;603852.38;793551.54;5201
+5203;2001284651;B03000;AMEACA;RUA VIOLETA DE M;90;80253;26/5/2001 17:06:00;INICIATIVA;N;0;SAO JOSE;BH;605267.44;799157.87;5202
+5204;2001284653;B03000;AMEACA;RUA JOAO DE MATO;190;37800;26/5/2001 17:04:00;CIDADAO COMUM;N;0;IPIRANGA;BH;611502.45;800913.64;5203
+5205;2001284663;B03000;AMEACA;RUA DES CINTRA N;540;62966;26/5/2001 17:15:00;CIDADAO COMUM;S;;MILIONARIOS;BH;604305.96;789885.00;5204
+5206;2001284692;B04002;HOMICIDIO CONSUM;RUA MARIA RITA B;285;121934;26/5/2001 17:31:00;INICIATIVA;N;0;INDEPENDENCIA;BH;602404.76;786326.03;5205
+5207;2001284716;B03000;AMEACA;RUA UM;505;27979;26/5/2001 17:42:00;CIDADAO COMUM;N;;CAPITAO EDUARDO;BH;618631.70;807113.56;5206
+5208;2001284719;B06000;LESAO CORPORAL;RUA LUNARDI;12;41899;26/5/2001 17:45:00;CIDADAO COMUM;N;0;PEDRO SEGUNDO;BH;608406.08;798297.52;5207
+5209;2001284743;B03000;AMEACA;RUA MAUREA DE OL;320;117592;26/5/2001 17:58:00;CIDADAO COMUM;N;;VENDA NOVA;BH;607368.76;809104.72;5208
+5210;2001284752;B03000;AMEACA;RUA ODILON DIAS ;268;49112;26/5/2001 18:03:00;CIDADAO COMUM;S;;DOM BOSCO;BH;604281.61;797258.86;5209
+5211;2001284758;B03000;AMEACA;RUA DEUSDALMA;112;20069;26/5/2001 18:06:00;CIDADAO COMUM;N;0;NOVA GAMELEIRA;BH;605634.14;794503.99;5210
+5212;2001284763;B06000;LESAO CORPORAL;RUA PAULO DUARTE;275;94066;26/5/2001 18:13:00;CIDADAO COMUM;S;CAUN;SANTA CECILIA;BH;601223.87;788340.04;5211
+5213;2001284770;B03000;AMEACA;AV SIDERAL;89;65721;26/5/2001 18:16:00;CIDADAO COMUM;S;0;VISTA ALEGRE;BH;603852.38;793551.54;5212
+5214;2001284778;B06000;LESAO CORPORAL;AV PADRE JOSE MA;1191;53448;26/5/2001 18:25:00;CIDADAO COMUM;S;;VISTA ALEGRE;BH;604787.25;793141.38;5213
+5215;2001284802;B03000;AMEACA;RUA JOSE DE ARAU;595;24725;26/5/2001 18:41:00;CIDADAO COMUM;N;0;SALGADO FILHO;BH;607367.03;793894.95;5214
+5216;2001284811;B03000;AMEACA;RUA ITANAJE;124;35643;26/5/2001 18:47:00;CIDADAO COMUM;S;0;SALGADO FILHO;BH;606436.88;795219.48;5215
+5217;2001284904;B03000;AMEACA;RUA ANCHIETA;130;23559;26/5/2001 19:31:00;INICIATIVA;S;0;TAQUARIL;BH;617463.18;796945.34;5216
+5218;2001284921;B03000;AMEACA;RUA DAS OLIVEIRA;279;119620;26/5/2001 19:38:00;CIDADAO COMUM;S;CA1;SAO GERALDO;BH;616314.78;799827.01;5217
+5219;2001284930;B06000;LESAO CORPORAL;RUA NELSON SOARE;417;47463;26/5/2001 19:41:00;CIDADAO COMUM;N;AP201;CIDADE NOVA;BH;612293.70;800251.52;5218
+5220;2001284964;B03000;AMEACA;RUA CINQUENTA E ;36;106416;26/5/2001 20:02:00;CIDADAO COMUM;N;0;JARDIM DOS COMER;BH;608384.93;811048.95;5219
+5221;2001285018;B03000;AMEACA;RUA JOSE CLETO;1075;38682;26/5/2001 20:36:00;CIDADAO COMUM;S;0;SANTA CRUZ;BH;610463.70;802431.79;5220
+5222;2001285049;B06000;LESAO CORPORAL;RUA MADRE TEREZA;264;96594;26/5/2001 20:51:00;CIDADAO COMUM;S;;JARDIM EUROPA;BH;608301.76;809616.81;5221
+5223;2001285093;B03000;AMEACA;RUA CHAFARIZ;60;300275;26/5/2001 21:11:00;CIDADAO COMUM;S;;HAVAI;BH;607388.59;793775.52;5222
+5224;2001285181;B06000;LESAO CORPORAL;RUA BOACHA;407;9695;26/5/2001 21:59:00;CIDADAO COMUM;S;;DOM BOSCO;BH;604961.28;797374.77;5223
+5225;2001285183;B04001;HOMICIDIO TENTAD;RUA JOAO PAULO I;230;300458;26/5/2001 21:57:00;CIDADAO COMUM;N;0;SAO DOMINGOS;BH;607666.14;793505.29;5224
+5226;2001285203;B06000;LESAO CORPORAL;AV VINTE E OITO ;356;72970;26/5/2001 22:10:00;CIDADAO COMUM;N;0;ESPLANADA;BH;614552.43;798837.28;5225
+5227;2001285214;B06000;LESAO CORPORAL;RUA AVELINO GIAR;218;99350;26/5/2001 22:14:00;CIDADAO COMUM;N;;CEU AZUL;BH;604476.31;807597.49;5226
+5228;2001285233;B03000;AMEACA;AV AMAZONAS;8524;3140;26/5/2001 22:29:00;CIDADAO COMUM;S;;JARDINOPOLIS;BH;604277.23;794566.59;5227
+5229;2001285235;B06000;LESAO CORPORAL;RUA PADRE FRANCI;412;51341;26/5/2001 22:30:00;CIDADAO COMUM;N;0;VILA PARIS;BH;609790.49;793465.90;5228
+5230;2001285319;B06000;LESAO CORPORAL;RUA CONDE DE LIN;994;16657;26/5/2001 23:11:00;CIDADAO COMUM;S;0;CORACAO DE JESUS;BH;609936.78;794362.75;5229
+5231;2001285332;B06000;LESAO CORPORAL;AV AMAZONAS;1040;3140;26/5/2001 23:17:00;INICIATIVA;S;0;CENTRO (BH);BH;610552.12;796862.46;5230
+5232;2001285381;B03000;AMEACA;RUA JARAGUA;70;23851;26/5/2001 23:41:00;CIDADAO COMUM;S;;TAQUARIL;BH;617279.96;796983.51;5231
+5233;2001285406;B06000;LESAO CORPORAL;RUA SERRA AZUL;62;65100;26/5/2001 23:53:00;CIDADAO COMUM;S;;VERA CRUZ;BH;616095.92;797406.02;5232
+5234;2001285415;B06000;LESAO CORPORAL;RUA MARCO AURELI;127;61821;27/5/2001 00:02:00;CIDADAO COMUM;S;LJA;NAZARE;BH;615586.92;804707.76;5233
+5235;2001285464;B04002;HOMICIDIO CONSUM;RUA DOS GUARANIS;597;32181;27/5/2001 00:38:00;CIDADAO COMUM;N;;CENTRO (BH);BH;610645.29;797060.64;5234
+5236;2001285473;B04001;HOMICIDIO TENTAD;RUA PINTARROXO;150;95954;27/5/2001 00:39:00;CIDADAO COMUM;S;0;GOIANIA;BH;615369.55;802331.82;5235
+5237;2001285512;B06000;LESAO CORPORAL;RUA JOSE FELIX M;852;7416;27/5/2001 01:01:00;INICIATIVA;S;0;MANTIQUEIRA;BH;606455.66;810642.94;5236
+5238;2001285583;B04001;HOMICIDIO TENTAD;RUA SERGIO MIRAN;260;80644;27/5/2001 01:45:00;CIDADAO COMUM;N;0;OURO PRETO;BH;606220.07;801489.47;5237
+5239;2001285600;B06000;LESAO CORPORAL;AV JEQUITINHONHA;867;37305;27/5/2001 01:52:00;CIDADAO COMUM;S;0;VERA CRUZ;BH;615872.02;797817.83;5238
+5240;2001285643;B04002;HOMICIDIO CONSUM;RUA VOLTS;40;73626;27/5/2001 02:24:00;CIDADAO COMUM;N;0;PRIMEIRO DE MAIO;BH;612172.58;803421.57;5239
+5241;2001285647;B06000;LESAO CORPORAL;RUA LUIS RODRIGU;144;85749;27/5/2001 02:25:00;CIDADAO COMUM;S;;CEU AZUL;BH;604852.37;807579.06;5240
+5242;2001285656;B08000;VIOLACAO DE DOMI;ALAMEDA INDAIA;125;34363;27/5/2001 02:28:00;CIDADAO COMUM;N;;DOM CABRAL;BH;604902.65;796728.21;5241
+5243;2001285687;B06000;LESAO CORPORAL;AV BRASIL;342;10420;27/5/2001 02:48:00;CIDADAO COMUM;S;PX342;SAO LUCAS;BH;612723.24;796515.30;5242
+5244;2001285700;B04001;HOMICIDIO TENTAD;RUA OLNEY BARREI;159;48973;27/5/2001 02:58:00;CIDADAO COMUM;S;0;DOM JOAQUIM;BH;613552.48;801797.81;5243
+5245;2001285715;B04001;HOMICIDIO TENTAD;RUA FLOR DE PITA;114;42949;27/5/2001 03:08:00;CIDADAO COMUM;N;0;INDEPENDENCIA;BH;601585.95;786070.71;5244
+5246;2001285841;B06000;LESAO CORPORAL;RUA MONLEVADE;110;46183;27/5/2001 04:41:00;CIDADAO COMUM;S;;CACHOEIRINHA;BH;610853.97;800937.94;5245
+5247;2001285872;B02000;RIXA;RUA JANUARIA;65;36936;27/5/2001 05:06:00;CIDADAO COMUM;S;0;FLORESTA;BH;611563.51;797768.28;5246
+5248;2001285881;B04001;HOMICIDIO TENTAD;RUA DIAMANTINA;70;21175;27/5/2001 05:17:00;CIDADAO COMUM;S;;CABANA;BH;604767.01;794055.25;5247
+5249;2001285924;B03000;AMEACA;AV COLETORA;127;78241;27/5/2001 06:11:00;CIDADAO COMUM;S;;VILA PINHO;BH;601784.22;788552.93;5248
+5250;2001285948;B03000;AMEACA;RUA DESENGANO;5;19860;27/5/2001 06:45:00;CIDADAO COMUM;N;;MANGABEIRAS;BH;612147.19;792537.48;5249
+5251;2001286123;B03000;AMEACA;RUA JOAQUIM RAMO;394;38175;27/5/2001 10:06:00;CIDADAO COMUM;S;FU;PARAISO;BH;614835.48;796823.96;5250
+5252;2001286145;B06000;LESAO CORPORAL;PRACA MARABU;112;43333;27/5/2001 10:24:00;CIDADAO COMUM;N;;FLAVIO MARQUES D;BH;604605.44;788619.51;5251
+5253;2001286178;B03000;AMEACA;RUA JULIO DE CAS;1227;39470;27/5/2001 10:51:00;INICIATIVA;N;0;CINQUENTENARIO;BH;606610.98;792052.30;5252
+5254;2001286277;B06000;LESAO CORPORAL;RUA RADIALISTA J;70;109367;27/5/2001 12:01:00;CIDADAO COMUM;N;;CEU AZUL;BH;605246.76;808308.68;5253
+5255;2001286322;B06000;LESAO CORPORAL;RUA SAO ROQUE;620;63600;27/5/2001 12:34:00;CIDADAO COMUM;S;;SAGRADA FAMILIA;BH;612678.13;799449.80;5254
+5256;2001286387;B06000;LESAO CORPORAL;RUA DOM HENRIQUE;145;102531;27/5/2001 13:24:00;CIDADAO COMUM;S;;VERA CRUZ;BH;616541.52;797463.00;5255
+5257;2001286408;B06000;LESAO CORPORAL;AV DOM JOAO VI;169;22294;27/5/2001 13:40:00;CIDADAO COMUM;N;;CINQUENTENARIO;BH;606195.21;792895.55;5256
+5258;2001286469;B06000;LESAO CORPORAL;RUA NELSON JOSE ;250;98877;27/5/2001 14:23:00;CIDADAO COMUM;S;;DA LAGOA;BH;604911.80;809367.50;5257
+5259;2001286481;B06000;LESAO CORPORAL;PRACA TEJO;12;67235;27/5/2001 14:33:00;CIDADAO COMUM;S;;PADRE EUSTAQUIO;BH;605960.64;797956.52;5258
+5260;2001286489;B06000;LESAO CORPORAL;RUA DR BROCHADO;888;23215;27/5/2001 14:37:00;INICIATIVA;S;0;VERA CRUZ;BH;615934.25;797872.40;5259
+5261;2001286498;B06000;LESAO CORPORAL;RUA JAIR LOPES C;192;89359;27/5/2001 14:42:00;CIDADAO COMUM;S;0;JARDIM ESTRELA;BH;607211.19;810184.65;5260
+5262;2001286502;B06000;LESAO CORPORAL;RUA SAO MIGUEL;1296;63410;27/5/2001 14:43:00;CIDADAO COMUM;S;BLE     CA48;ITAPOA;BH;609541.66;805574.12;5261
+5263;2001286521;B04001;HOMICIDIO TENTAD;BECO ARANA;118;79780;27/5/2001 15:03:00;CIDADAO COMUM;N;;SAO PAULO;BH;612523.47;803161.32;5262
+5264;2001286536;B06000;LESAO CORPORAL;RUA FLOR DE PEQU;35;94810;27/5/2001 15:12:00;CIDADAO COMUM;S;0;JARDIM ALVORADA;BH;606186.87;800088.39;5263
+5265;2001286545;B06000;LESAO CORPORAL;RUA JOAQUIM TEIX;140;128845;27/5/2001 15:18:00;CIDADAO COMUM;S;0;CASTANHEIRAS (TA;BH;617405.88;796871.94;5264
+5266;2001286551;B03000;AMEACA;RUA SAO LUIZ;10;26112;27/5/2001 15:19:00;CIDADAO COMUM;S;0;TAQUARIL;BH;617354.11;797763.63;5265
+5267;2001286558;B04001;HOMICIDIO TENTAD;ALAMEDA DAS PRIN;763;55342;27/5/2001 15:31:00;INICIATIVA;N;0;SAO JOSE;BH;608047.19;803545.43;5266
+5268;2001286573;B03000;AMEACA;RUA DOZE DE DEZE;90;24060;27/5/2001 15:40:00;CIDADAO COMUM;N;0;BELMONT;BH;615655.26;804957.06;5267
+5269;2001286583;B03000;AMEACA;RUA MARTINS SOAR;570;45049;27/5/2001 15:48:00;CIDADAO COMUM;N;;VISTA ALEGRE;BH;605080.53;792957.62;5268
+5270;2001286597;B03000;AMEACA;RUA CARACA;948;12990;27/5/2001 15:59:00;CIDADAO COMUM;S;;SERRA;BH;613753.87;794503.33;5269
+5271;2001286684;B03000;AMEACA;RUA G;90;78282;27/5/2001 17:04:00;CIDADAO COMUM;N;0;VILA PINHO;BH;601884.79;788409.89;5270
+5272;2001286726;B06000;LESAO CORPORAL;AV TERESA CRISTI;7836;67512;27/5/2001 17:32:00;CIDADAO COMUM;S;0;BETANIA;BH;604911.31;792765.55;5271
+5273;2001286830;B06000;LESAO CORPORAL;RUA BARAO DE COR;290;7910;27/5/2001 18:40:00;CIDADAO COMUM;S;;SAO TOMAZ;BH;609705.85;805280.22;5272
+5274;2001286831;B04002;HOMICIDIO CONSUM;AV OLINTO MEIREL;2480;49847;27/5/2001 18:39:00;CIDADAO COMUM;N;0;FLAVIO MARQUES D;BH;603783.40;789476.90;5273
+5275;2001286870;B03000;AMEACA;AV SETE DE ABRIL;711;65560;27/5/2001 19:00:00;CIDADAO COMUM;S;AP402;ESPLANADA;BH;614701.23;798401.70;5274
+5276;2001286920;B06000;LESAO CORPORAL;ALAMEDA DIOGO GU;405;21336;27/5/2001 19:22:00;CIDADAO COMUM;N;;VILA CASTANHEIRA;BH;601539.04;788530.12;5275
+5277;2001286933;B06000;LESAO CORPORAL;AV DEPUTADO ULTI;890;82549;27/5/2001 19:26:00;CIDADAO COMUM;N;;PLANALTO;BH;610672.89;806325.59;5276
+5278;2001287054;B06000;LESAO CORPORAL;RUA DOS BANDOLIN;489;106980;27/5/2001 20:41:00;CIDADAO COMUM;N;;CH CALIFORNIA;BH;603972.58;797126.87;5277
+5279;2001287058;B03000;AMEACA;RUA OZANAM;716;50796;27/5/2001 20:43:00;CIDADAO COMUM;N;0;IPIRANGA;BH;612055.67;800906.36;5278
+5280;2001287142;B03000;AMEACA;RUA CAMBE;557;40250;27/5/2001 21:21:00;CIDADAO COMUM;N;CAAN;COQUEIROS;BH;602564.33;798526.49;5279
+5281;2001287186;B03000;AMEACA;RUA MARIO SOARES;446;44641;27/5/2001 21:50:00;CIDADAO COMUM;S;AP201;DOM BOSCO;BH;604166.48;797249.18;5280
+5282;2001287210;B03000;AMEACA;RUA FREI ALBINO ;10;93048;27/5/2001 22:00:00;CIDADAO COMUM;S;0;INDEPENDENCIA;BH;601296.99;786093.21;5281
+5283;2001287232;B03000;AMEACA;RUA DES BRAULIO;2157;19917;27/5/2001 22:12:00;CIDADAO COMUM;S;;VERA CRUZ;BH;616414.12;797300.11;5282
+5284;2001287243;B06000;LESAO CORPORAL;AV WASHINGTON LU;913;73701;27/5/2001 22:17:00;CIDADAO COMUM;N;0;SAO BERNARDO;BH;610643.18;804939.91;5283
+5285;2001287256;B03000;AMEACA;RUA ARLEI QUEIRO;184;106356;27/5/2001 22:24:00;CIDADAO COMUM;S;;JARDIM DOS COMER;BH;607916.37;811372.01;5284
+5286;2001287283;B06000;LESAO CORPORAL;RUA EXPEDICIONAR;327;86666;27/5/2001 22:40:00;CIDADAO COMUM;N;;CONJUNTO FELICID;BH;611848.25;807663.34;5285
+5287;2001287289;B03000;AMEACA;RUA CONSELHEIRO ;30;15869;27/5/2001 22:43:00;CIDADAO COMUM;S;;SALGADO FILHO;BH;606636.12;794589.81;5286
+5288;2001287293;B03000;AMEACA;RUA MANOEL NUNES;269;43157;27/5/2001 22:44:00;CIDADAO COMUM;S;0;TUPI;BH;613856.56;806029.52;5287
+5289;2001287387;B06000;LESAO CORPORAL;RUA MADUREIRA;326;42416;27/5/2001 23:44:00;CIDADAO COMUM;N;0;PARQUE RIACHUELO;BH;609675.92;800149.35;5288
+5290;2001287407;B03000;AMEACA;RUA FLOR D'AGUA;295;28565;28/5/2001 00:02:00;CIDADAO COMUM;S;CAFR;JARDIM MONTANHES;BH;605689.51;799604.37;5289
+5291;2001287431;B06000;LESAO CORPORAL;RUA DIVISA NOVA;209;21440;28/5/2001 00:25:00;CIDADAO COMUM;N;0;SALGADO FILHO;BH;606192.97;794563.10;5290
+5292;2001287447;B04001;HOMICIDIO TENTAD;AV CRISTIANO MAC;580;18652;28/5/2001 00:39:00;INICIATIVA;S;0;CIDADE NOVA;BH;612034.84;801109.08;5291
+5293;2001287514;B03000;AMEACA;RUA JEQUIRICA;157;37258;28/5/2001 01:54:00;CIDADAO COMUM;N;0;CONCORDIA;BH;611254.76;799443.34;5292
+5294;2001287586;B03000;AMEACA;RUA GOUVEIA;1096;31630;28/5/2001 03:53:00;CIDADAO COMUM;S;0;BOA VISTA;BH;615182.93;800074.33;5293
+5295;2001287718;B03000;AMEACA;RUA DES SARAIVA;157;66535;28/5/2001 08:03:00;CIDADAO COMUM;N;0;VERA CRUZ;BH;615887.76;798678.76;5294
+5296;2001287725;B03000;AMEACA;RUA CAPA PRETA;111;14232;28/5/2001 08:08:00;CIDADAO COMUM;N;0;JOAO PINHEIRO;BH;605084.93;796075.85;5295
+5297;2001287841;B03000;AMEACA;RUA SEBASTIAO NE;57;15478;28/5/2001 09:17:00;CIDADAO COMUM;S;;ITAPOA;BH;609616.49;805847.33;5296
+5298;2001288081;B03000;AMEACA;AV BELEM;1093;8913;28/5/2001 12:04:00;CIDADAO COMUM;S;0;POMPEIA;BH;615054.50;797767.32;5297
+5299;2001288153;B06000;LESAO CORPORAL;RUA CORONEL JOSE;39;17892;28/5/2001 13:04:00;CIDADAO COMUM;N;;SANTA CRUZ;BH;610739.96;802185.68;5298
+5300;2001288185;B06000;LESAO CORPORAL;RUA CAPA PRETA;111;14232;28/5/2001 13:30:00;CIDADAO COMUM;N;0;JOAO PINHEIRO;BH;605084.93;796075.85;5299
+5301;2001288222;B03000;AMEACA;RUA DEZENOVE;41;130191;28/5/2001 13:59:00;CIDADAO COMUM;S;;DAS INDUSTRIAS;BH;604918.87;791473.08;5300
+5302;2001288305;B06000;LESAO CORPORAL;RUA NEFELINA;99;81228;28/5/2001 15:00:00;CIDADAO COMUM;S;;SANTA TEREZA;BH;612838.15;797304.69;5301
+5303;2001288312;B03000;AMEACA;RUA BARAO DE MAC;449;7980;28/5/2001 15:05:00;CIDADAO COMUM;S;;SANTO ANTONIO;BH;610174.15;794888.88;5302
+5304;2001288352;B03000;AMEACA;RUA SAO FELIPE;282;62386;28/5/2001 15:32:00;CIDADAO COMUM;S;;SAGRADA FAMILIA;BH;613372.54;798722.04;5303
+5305;2001288453;B06000;LESAO CORPORAL;RUA DOS CARIJOS;504;81243;28/5/2001 16:24:00;CIDADAO COMUM;S;0;CENTRO (BH);BH;610976.67;797223.89;5304
+5306;2001288483;B03000;AMEACA;RUA REGENCIA;195;301448;28/5/2001 16:39:00;CIDADAO COMUM;S;PX271;VILA CAFEZAL;BH;614107.56;795461.45;5305
+5307;2001288582;B03000;AMEACA;RUA DAVID RABELO;1023;19702;28/5/2001 17:28:00;CIDADAO COMUM;S;;INCONFIDENCIA;BH;604852.48;799008.93;5306
+5308;2001288590;B06000;LESAO CORPORAL;AV SOUZA AGUIAR;2184;84402;28/5/2001 17:36:00;CIDADAO COMUM;S;;CAETANO FURQUIM;BH;616305.52;798833.55;5307
+5309;2001288599;B06000;LESAO CORPORAL;RUA PAULO KRUGER;175;55910;28/5/2001 17:41:00;CIDADAO COMUM;S;;FLORAMAR;BH;611687.19;806856.30;5308
+5310;2001288601;B03000;AMEACA;AV OLEGARIO MACI;735;49699;28/5/2001 17:41:00;POLICIAL MILITAR;S;0;CENTRO (BH);BH;610517.79;796937.79;5309
+5311;2001288682;B06000;LESAO CORPORAL;RUA DAS VERBENAS;81;71545;28/5/2001 18:22:00;CIDADAO COMUM;S;;LINDEIA;BH;598801.30;790941.81;5310
+5312;2001288690;B06000;LESAO CORPORAL;AV FRANCISCO SA;1373;29656;28/5/2001 18:25:00;CIDADAO COMUM;S;AP2;GUTIERREZ;BH;608976.96;795456.85;5311
+5313;2001288701;B06000;LESAO CORPORAL;RUA LUCIA;20;41527;28/5/2001 18:33:00;CIDADAO COMUM;S;;MARIA GORETTI;BH;614026.99;803819.45;5312
+5314;2001288770;B06000;LESAO CORPORAL;AV PROFESSOR ALF;400;2264;28/5/2001 19:07:00;INICIATIVA;S;0;SANTA EFIGENIA;BH;611944.42;796416.90;5313
+5315;2001288976;B06000;LESAO CORPORAL;RUA TOBIAS MOSCO;55;97947;28/5/2001 20:48:00;CIDADAO COMUM;S;0;PROVIDENCIA;BH;612286.60;803830.35;5314
+5316;2001289022;B03000;AMEACA;AV AGENOR DE PAU;482;86250;28/5/2001 21:20:00;CIDADAO COMUM;S;;JAQUELINE;BH;611517.37;810264.32;5315
+5317;2001289080;B06000;LESAO CORPORAL;RUA GERALDO CAST;112;107812;28/5/2001 21:48:00;CIDADAO COMUM;S;0;MANTIQUEIRA;BH;606674.34;811207.21;5316
+5318;2001289160;B03000;AMEACA;RUA DOS TIMBIRAS;2469;67682;28/5/2001 22:40:00;CIDADAO COMUM;N;0;SANTO AGOSTINHO;BH;610326.19;796489.72;5317
+5319;2001289187;B03000;AMEACA;RUA INDIANOPOLIS;907;34423;28/5/2001 22:57:00;CIDADAO COMUM;S;;CACHOEIRINHA;BH;610919.83;800890.40;5318
+5320;2001289223;B06000;LESAO CORPORAL;RUA PLATINA;1281;54453;28/5/2001 23:17:00;CIDADAO COMUM;S;;CALAFATE;BH;607934.16;796732.35;5319
+5321;2001289256;B06000;LESAO CORPORAL;RUA JURITI;33;171450;28/5/2001 23:37:00;CIDADAO COMUM;S;;VILA CEMIG;BH;605430.16;788887.55;5320
+5322;2001289298;B03000;AMEACA;RUA HERCULANO PE;483;33143;29/5/2001 00:21:00;CIDADAO COMUM;S;NUMERO E O 483;SALGADO FILHO;BH;606642.48;795383.85;5321
+5323;2001289340;B03000;AMEACA;RUA ITAPETINGA;1341;35804;29/5/2001 01:05:00;CIDADAO COMUM;S;;CACHOEIRINHA;BH;609965.84;800605.10;5322
+5324;2001289349;B06000;LESAO CORPORAL;RUA JACAREI;1123;13154;29/5/2001 01:12:00;CIDADAO COMUM;S;;PINDORAMA;BH;602398.69;797917.94;5323
+5325;2001289434;B06000;LESAO CORPORAL;RUA POUSO ALEGRE;219;54932;29/5/2001 03:15:00;CIDADAO COMUM;S;BLB     AP108;FLORESTA;BH;611250.38;798020.65;5324
+5326;2001289609;B06000;LESAO CORPORAL;RUA NACIP RAYDAN;33;47132;29/5/2001 08:01:00;CIDADAO COMUM;S;INICIATIVA HT 14;RIO BRANCO;BH;606908.68;808543.95;5325
+5327;2001289648;B06000;LESAO CORPORAL;RUA RECIFE;726;58149;29/5/2001 08:29:00;CIDADAO COMUM;S;;SANTO ANDRE;BH;608741.90;799254.55;5326
+5328;2001289666;B03000;AMEACA;AV OLEGARIO MACI;572;49699;29/5/2001 08:38:00;CIDADAO COMUM;S;0;CENTRO (BH);BH;610516.97;797139.20;5327
+5329;2001289698;B03000;AMEACA;RUA CESARIO ALVI;688;15018;29/5/2001 08:59:00;CIDADAO COMUM;S;;PADRE EUSTAQUIO;BH;607391.04;797458.15;5328
+5330;2001289700;B06000;LESAO CORPORAL;AV SEN LEVINDO C;958;14866;29/5/2001 08:59:00;CIDADAO COMUM;N;;MANGUEIRAS;BH;601356.47;786363.54;5329
+5331;2001289708;B03000;AMEACA;RUA DOUTOR ALIPI;25;2365;29/5/2001 09:10:00;CIDADAO COMUM;S;;SERRA;BH;613823.09;794921.03;5330
+5332;2001289733;B03000;AMEACA;RUA JUNIA CRISTI;110;96377;29/5/2001 09:27:00;CIDADAO COMUM;S;;VISTA DO SOL;BH;616293.01;804590.04;5331
+5333;2001289778;B06000;LESAO CORPORAL;RUA AVE DO PARAI;237;6959;29/5/2001 09:52:00;CIDADAO COMUM;S;;FLAVIO MARQUES D;BH;604667.15;788706.56;5332
+5334;2001289920;B06000;LESAO CORPORAL;RUA JORDELINA MA;531;84948;29/5/2001 11:33:00;CIDADAO COMUM;N;CAFR;MANTIQUEIRA;BH;606139.38;810993.07;5333
+5335;2001289960;B03000;AMEACA;BECO SAO JOAQUIM;39;301212;29/5/2001 12:18:00;INICIATIVA;S;0;MORRO DO PAPAGAI;BH;610959.40;793684.37;5334
+5336;2001289999;B03000;AMEACA;ESTRADA DO CERCA;2251;26428;29/5/2001 12:49:00;INICIATIVA;S;0;SAO DOMINGOS;BH;607619.37;793428.63;5335
+5337;2001290169;B03000;AMEACA;RUA JOSE FERNAND;34;119948;29/5/2001 15:00:00;CIDADAO COMUM;N;0;SAO GERALDO;BH;615957.39;799439.10;5336
+5338;2001290263;B03000;AMEACA;RUA MORRO DA GRA;303;46823;29/5/2001 15:56:00;CIDADAO COMUM;S;CAA;JARDIM MONTANHES;BH;606309.98;798371.21;5337
+5339;2001290265;B03000;AMEACA;RUA MARIO SOARES;298;44641;29/5/2001 15:58:00;CIDADAO COMUM;S;;DOM BOSCO;BH;604166.68;797141.11;5338
+5340;2001290302;B03000;AMEACA;RUA JOSE ANTENOR;130;16049;29/5/2001 16:21:00;CIDADAO COMUM;N;CSA;PRIMEIRO DE MAIO;BH;612312.80;803782.08;5339
+5341;2001290342;B06000;LESAO CORPORAL;PRACA GREVILEA;30;1334;29/5/2001 16:39:00;CIDADAO COMUM;N;;PATROCINIO;BH;605248.49;794497.92;5340
+5342;2001290360;B04001;HOMICIDIO TENTAD;RUA BANDONION;122;170139;29/5/2001 16:48:00;INICIATIVA;S;0;VILA CAFEZAL;BH;613977.41;795089.89;5341
+5343;2001290368;B03000;AMEACA;RUA FERNAO DIAS;1210;28133;29/5/2001 16:53:00;CIDADAO COMUM;S;;VERA CRUZ;BH;616131.10;797898.69;5342
+5344;2001290372;B03000;AMEACA;RUA FERNAO DIAS;428;28133;29/5/2001 16:57:00;CIDADAO COMUM;S;;CASA BRANCA;BH;616090.44;799485.48;5343
+5345;2001290400;B03000;AMEACA;RUA ANTARES;170;4244;29/5/2001 17:12:00;CIDADAO COMUM;S;0;SANTA LUCIA;BH;610301.90;793066.15;5344
+5346;2001290423;B06000;LESAO CORPORAL;RUA DO FLAMENGO;84;28410;29/5/2001 17:24:00;CIDADAO COMUM;S;;SAO BERNARDO;BH;610992.47;804908.91;5345
+5347;2001290448;B06000;LESAO CORPORAL;AV JOSE BONIFACI;189;38579;29/5/2001 17:38:00;CIDADAO COMUM;S;0;PRADO LOPES;BH;610210.56;798939.37;5346
+5348;2001290479;B06000;LESAO CORPORAL;AV MEM DE SA;600;45395;29/5/2001 17:48:00;CIDADAO COMUM;S;;SANTA EFIGENIA;BH;613969.89;796740.47;5347
+5349;2001290557;B06000;LESAO CORPORAL;RUA CINQUENTA E ;317;74137;29/5/2001 18:18:00;CIDADAO COMUM;S;;NOVA YORK;BH;608575.18;810924.30;5348
+5350;2001290570;B06000;LESAO CORPORAL;RUA ARTUR DE SA;1096;6211;29/5/2001 18:27:00;CIDADAO COMUM;S;;UNIAO;BH;613434.92;801356.54;5349
+5351;2001290619;B06000;LESAO CORPORAL;RUA CONCEICAO DO;536;81978;29/5/2001 18:51:00;CIDADAO COMUM;N;LJA;SAO GABRIEL;BH;614391.87;804594.70;5350
+5352;2001290787;B03000;AMEACA;RUA QUARENTA E U;83;302837;29/5/2001 20:19:00;CIDADAO COMUM;N;0;NOVO AARAO REIS;BH;614183.34;805806.43;5351
+5353;2001290830;B03000;AMEACA;RUA OZENIL JOSE ;112;86058;29/5/2001 20:44:00;CIDADAO COMUM;S;;VILA FREI LEOPOL;BH;611716.17;809676.58;5352
+5354;2001290846;B03000;AMEACA;ESTRADA DOS BORG;5;85893;29/5/2001 20:57:00;CIDADAO COMUM;N;;JARDIM VITORIA;BH;616433.49;804527.60;5353
+5355;2001290853;B06000;LESAO CORPORAL;RUA XAVIER DA VE;152;73843;29/5/2001 21:00:00;CIDADAO COMUM;S;;MINAS BRASIL;BH;605794.49;797401.06;5354
+5356;2001290906;B04001;HOMICIDIO TENTAD;AV ALVARES CABRA;1030;2730;29/5/2001 21:34:00;INICIATIVA;N;0;LOURDES;BH;610560.65;796057.42;5355
+5357;2001290914;B04002;HOMICIDIO CONSUM;AV RAJA GABAGLIA;1961;57830;29/5/2001 21:38:00;INICIATIVA;N;0;LEONINA;BH;608875.32;793451.62;5356
+5358;2001290924;B06000;LESAO CORPORAL;RUA FLOR DA IMPE;448;28600;29/5/2001 21:46:00;CIDADAO COMUM;S;0;JARDIM MONTANHES;BH;605810.72;799740.52;5357
+5359;2001290979;B03000;AMEACA;RUA CORONEL ANTO;172;17590;29/5/2001 22:23:00;CIDADAO COMUM;N;;JARDIM LEBLON;BH;606140.28;807563.65;5358
+5360;2001291055;B03000;AMEACA;RUA MAURICIO PER;61;40666;29/5/2001 23:28:00;CIDADAO COMUM;S;0;JAQUELINE;BH;610598.71;810084.72;5359
+5361;2001291060;B03000;AMEACA;RUA ANTARES;170;4244;29/5/2001 23:31:00;CIDADAO COMUM;S;0;SANTA LUCIA;BH;610301.90;793066.15;5360
+5362;2001291099;B06000;LESAO CORPORAL;RUA ITANHOMI;85;35669;29/5/2001 23:56:00;CIDADAO COMUM;N;0;CARLOS PRATES;BH;608749.52;798284.45;5361
+5363;2001291719;B03000;AMEACA;RUA COROCOCO;33;76700;30/5/2001 11:10:00;CIDADAO COMUM;N;;NOVO AARAO REIS;BH;614301.94;806027.12;5362
+5364;2001291737;B06000;LESAO CORPORAL;RUA DINIS DIAS;145;119673;30/5/2001 11:21:00;CIDADAO COMUM;S;;VERA CRUZ;BH;616573.20;797526.82;5363
+5365;2001291778;B04001;HOMICIDIO TENTAD;RUA PENALVA;71;96276;30/5/2001 11:54:00;INICIATIVA;N;0;DOM SILVERIO;BH;614598.66;804371.67;5364
+5366;2001291817;B03000;AMEACA;RUA TOBIAS MOSCO;55;97947;30/5/2001 12:26:00;POLICIAL MILITAR;N;0;PROVIDENCIA;BH;612286.60;803830.35;5365
+5367;2001291892;B03000;AMEACA;RUA JULITA NOGUE;700;39597;30/5/2001 13:22:00;CIDADAO COMUM;N;;SANTA TEREZINHA;BH;604160.72;802710.37;5366
+5368;2001291966;B03000;AMEACA;RUA SANTO ANTONI;101;29832;30/5/2001 14:28:00;CIDADAO COMUM;S;CASA A;SALGADO FILHO;BH;606572.22;793836.55;5367
+5369;2001292012;B03000;AMEACA;RUA CURI;773;19047;30/5/2001 15:04:00;CIDADAO COMUM;N;BLB     AP302;SAO GERALDO;BH;615774.12;799043.09;5368
+5370;2001292059;B06000;LESAO CORPORAL;RUA JULITA NUNES;210;130047;30/5/2001 15:30:00;CIDADAO COMUM;S;0;MINASCAIXA;BH;609164.95;809748.79;5369
+5371;2001292063;B03000;AMEACA;AV CATULO DA PAI;526;59081;30/5/2001 15:32:00;CIDADAO COMUM;S;PRACA DOS INDUST;DAS INDUSTRIAS;BH;604336.90;792747.38;5370
+5372;2001292069;B04001;HOMICIDIO TENTAD;RUA CARLOS QUADR;96;13431;30/5/2001 15:38:00;CIDADAO COMUM;N;;SALGADO FILHO;BH;606077.39;794694.97;5371
+5373;2001292289;B03000;AMEACA;RUA GIRASSOL;35;170242;30/5/2001 17:44:00;CIDADAO COMUM;S;;CABANA;BH;604914.68;794410.67;5372
+5374;2001292318;B03000;AMEACA;RUA FRANCISCO LE;165;29495;30/5/2001 17:59:00;CIDADAO COMUM;S;0;SAO MARCOS;BH;614281.87;802378.50;5373
+5375;2001292324;B06000;LESAO CORPORAL;RUA BARAO DE MAC;449;7980;30/5/2001 18:03:00;CIDADAO COMUM;S;;SANTO ANTONIO;BH;610174.15;794888.88;5374
+5376;2001292371;B06000;LESAO CORPORAL;RUA FORMIGA;544;29136;30/5/2001 18:27:00;CIDADAO COMUM;S;0;LAGOINHA;BH;610753.25;798994.38;5375
+5377;2001292381;B03000;AMEACA;RUA CURI;773;19047;30/5/2001 18:33:00;CIDADAO COMUM;S;CA01;SAO GERALDO;BH;615774.12;799043.09;5376
+5378;2001292397;B06000;LESAO CORPORAL;RUA CARANGOLA;288;13094;30/5/2001 18:42:00;CIDADAO COMUM;S;0;SANTO ANTONIO;BH;610731.49;794680.82;5377
+5379;2001292477;B05000;SEQUESTRO E CARC;RUA ROGERIO FAJA;160;59167;30/5/2001 19:15:00;INICIATIVA;S;0;ANCHIETA;BH;612526.71;793523.78;5378
+5380;2001292523;B03000;AMEACA;RUA SEBASTIAO NE;57;15478;30/5/2001 19:35:00;CIDADAO COMUM;S;0;ITAPOA;BH;609616.49;805847.33;5379
+5381;2001292525;B06000;LESAO CORPORAL;RUA CINQUENTA E ;400;74137;30/5/2001 19:37:00;CIDADAO COMUM;S;CS;NOVA YORK;BH;608560.84;810967.05;5380
+5382;2001292547;B03000;AMEACA;RUA PEDRA DE ANI;265;24016;30/5/2001 19:47:00;CIDADAO COMUM;S;;PIRATININGA;BH;606397.61;809067.54;5381
+5383;2001292561;B03000;AMEACA;RUA DOUTOR JOSE ;80;72488;30/5/2001 19:55:00;CIDADAO COMUM;S;;PLANALTO;BH;610724.20;806179.76;5382
+5384;2001292584;B06000;LESAO CORPORAL;RUA GLEUCY JOSE ;5;128860;30/5/2001 20:05:00;INICIATIVA;S;0;CASTANHEIRAS (TA;BH;617303.66;796895.30;5383
+5385;2001292611;B04002;HOMICIDIO CONSUM;AV SIDERAL;635;65721;30/5/2001 20:22:00;CIDADAO COMUM;N;;VISTA ALEGRE;BH;604330.64;793630.31;5384
+5386;2001292640;B03000;AMEACA;RUA PITANGUI;530;54365;30/5/2001 20:40:00;CIDADAO COMUM;S;;CONCORDIA;BH;610812.36;798951.44;5385
+5387;2001292680;B03000;AMEACA;RUA CADIZ;200;21090;30/5/2001 21:06:00;INICIATIVA;S;0;JARDIM EUROPA;BH;608241.44;809904.76;5386
+5388;2001292712;B03000;AMEACA;RUA E;155;78254;30/5/2001 21:22:00;CIDADAO COMUM;S;;VILA PINHO;BH;601857.50;788531.20;5387
+5389;2001292750;B06000;LESAO CORPORAL;RUA SAO CRISTOVA;460;62260;30/5/2001 21:44:00;CIDADAO COMUM;S;;LEBLON;BH;605482.14;809635.82;5388
+5390;2001292773;B03000;AMEACA;RUA PINHAL;43;12108;30/5/2001 21:57:00;CIDADAO COMUM;N;0;PIRATININGA;BH;606115.25;809906.56;5389
+5391;2001292781;B04001;HOMICIDIO TENTAD;RUA SAO COSME;60;62216;30/5/2001 22:02:00;CIDADAO COMUM;S;0;GLORIA;BH;603350.23;798467.27;5390
+5392;2001292791;B04001;HOMICIDIO TENTAD;RUA CINQUENTA;203;302845;30/5/2001 22:11:00;CIDADAO COMUM;S;;TUPI;BH;614197.66;805513.25;5391
+5393;2001292812;B06000;LESAO CORPORAL;RODOVIA BR 356;5000;10317;30/5/2001 22:23:00;INICIATIVA;S;0;BELVEDERE;BH;610345.89;791069.48;5392
+5394;2001292839;B04001;HOMICIDIO TENTAD;AV NELIO CERQUEI;15;72359;30/5/2001 22:41:00;CIDADAO COMUM;S;0;TIROL;BH;600947.66;789885.51;5393
+5395;2001292849;B03000;AMEACA;RUA PEDRO NAVA;28;109631;30/5/2001 22:48:00;CIDADAO COMUM;S;0;TUPI;BH;613021.05;806403.70;5394
+5396;2001292864;B04001;HOMICIDIO TENTAD;AV PRESIDENTE AN;7440;4461;30/5/2001 22:52:00;CIDADAO COMUM;N;;LIBERDADE;BH;608848.82;804317.22;5395
+5397;2001292909;B02000;RIXA;RUA MANOEL PAULI;122;43185;30/5/2001 23:20:00;CIDADAO COMUM;S;;DURVAL DE BARROS;IB;598281.11;791094.85;5396
+5398;2001293035;B06000;LESAO CORPORAL;AV DOM PEDRO II;3573;53145;31/5/2001 00:47:00;INICIATIVA;N;0;PADRE EUSTAQUIO;BH;607359.84;797881.47;5397
+5399;2001293069;B06000;LESAO CORPORAL;AV DAS PALMEIRAS;847;51921;31/5/2001 01:11:00;INICIATIVA;N;0;SAO JOSE;BH;607761.79;803424.91;5398
+5400;2001293093;B02000;RIXA;RUA STO ANTONIO ;525;61806;31/5/2001 01:27:00;CIDADAO COMUM;S;AP601;SANTO ANTONIO;BH;610914.49;794114.23;5399
+5401;2001293159;B06000;LESAO CORPORAL;AV PRESIDENTE AN;1694;4461;31/5/2001 02:26:00;CIDADAO COMUM;S;0;SAO CRISTOVAO;BH;610133.22;799644.13;5400
+5402;2001293171;B06000;LESAO CORPORAL;RUA NANA;171;47186;31/5/2001 02:38:00;INICIATIVA;N;0;MILIONARIOS;BH;603968.42;790001.17;5401
+5403;2001293192;B04001;HOMICIDIO TENTAD;AV PRUDENTE DE M;914;55774;31/5/2001 03:15:00;CIDADAO COMUM;S;0;CORACAO DE JESUS;BH;610064.80;794421.13;5402
+5404;2001293300;B03000;AMEACA;RUA IZABEL;17;170734;31/5/2001 06:42:00;CIDADAO COMUM;S;0;MORRO DAS PEDRAS;BH;608601.43;794604.87;5403
+5405;2001293593;B03000;AMEACA;RUA SABINO JOSE ;50;118210;31/5/2001 10:22:00;INICIATIVA;S;0;TIROL;BH;599830.93;789972.56;5404
+5406;2001293618;B03000;AMEACA;AV AUGUSTO DE LI;1142;6731;31/5/2001 10:36:00;CIDADAO COMUM;0;AP 1404;BARRO PRETO;BH;610231.87;796856.58;5405
+5407;2001293677;B03000;AMEACA;RUA HENRIQUE DIA;81;33042;31/5/2001 11:18:00;CIDADAO COMUM;S;CA3;APARECIDA;BH;609285.64;800049.41;5406
+5408;2001293750;B03000;AMEACA;RUA GUIMARAES;900;62953;31/5/2001 12:07:00;INICIATIVA;S;0;SAO FRANCISCO;BH;608835.37;801449.62;5407
+5409;2001293894;B03000;AMEACA;PRACA AFONSO ARI;60;1205;31/5/2001 14:00:00;INICIATIVA;S;HOTEL DEL REY;CENTRO (BH);BH;611340.42;796563.87;5408
+5410;2001293957;B06000;LESAO CORPORAL;RUA PONTA PORA;200;54601;31/5/2001 14:35:00;CIDADAO COMUM;S;;SANTA EFIGENIA;BH;613187.23;796919.20;5409
+5411;2001294028;B03000;AMEACA;AV TERESA CRISTI;625;67512;31/5/2001 15:26:00;CIDADAO COMUM;N;0;CARLOS PRATES;BH;603730.45;793544.44;5410
+5412;2001294064;B06000;LESAO CORPORAL;RUA CLORITA;100;16051;31/5/2001 15:47:00;CIDADAO COMUM;S;0;SANTA TEREZA;BH;612847.22;797209.80;5411
+5413;2001294080;B03000;AMEACA;RUA PIRAPETINGA;436;54148;31/5/2001 15:55:00;INICIATIVA;S;0;SERRA;BH;612727.63;794527.29;5412
+5414;2001294088;B03000;AMEACA;RUA EMILIO RICAL;141;102806;31/5/2001 15:54:00;CIDADAO COMUM;S;0;JOAO PINHEIRO;BH;605108.25;795890.74;5413
+5415;2001294138;B06000;LESAO CORPORAL;RUA ANTONIO FAUS;76;97528;31/5/2001 16:20:00;CIDADAO COMUM;N;FU;DOM SILVERIO;BH;614828.18;804494.38;5414
+5416;2001294183;B06000;LESAO CORPORAL;RUA JOSE CUSTODI;131;84733;31/5/2001 16:47:00;CIDADAO COMUM;S;0;DA LAGOA;BH;604676.60;809611.69;5415
+5417;2001294228;B06000;LESAO CORPORAL;RUA MANOEL PAULI;214;43185;31/5/2001 17:23:00;CIDADAO COMUM;S;CAA;DURVAL DE BARROS;IB;598180.67;791056.45;5416
+5418;2001294299;B06000;LESAO CORPORAL;RUA SAPUCAI;499;63943;31/5/2001 17:54:00;INICIATIVA;N;0;FLORESTA;BH;611751.63;797265.20;5417
+5419;2001294323;B06000;LESAO CORPORAL;RUA DOS CAETES;273;11376;31/5/2001 18:10:00;INICIATIVA;S;0;CENTRO (BH);BH;611347.27;797380.42;5418
+5420;2001294356;B06000;LESAO CORPORAL;RUA CLORITA;100;16051;31/5/2001 18:25:00;CIDADAO COMUM;N;0;SANTA TEREZA;BH;612847.22;797209.80;5419
+5421;2001294378;B03000;AMEACA;AV WASHINGTON LU;1300;73701;31/5/2001 18:36:00;CIDADAO COMUM;N;0;SAO BERNARDO;BH;610297.76;805044.70;5420
+5422;2001294406;B03000;AMEACA;RUA MARIO MACHAD;50;84484;31/5/2001 18:51:00;CIDADAO COMUM;N;0;DOM SILVERIO;BH;615329.03;804272.61;5421
+5423;2001294421;B03000;AMEACA;RUA FREI LUIZ DE;481;29961;31/5/2001 18:57:00;INICIATIVA;S;0;JOAO PINHEIRO;BH;604477.25;796175.73;5422
+5424;2001294473;B06000;LESAO CORPORAL;RUA PIROLOZITO;55;54292;31/5/2001 19:18:00;CIDADAO COMUM;S;0;SANTA TEREZA;BH;614090.56;797908.92;5423
+5425;2001294484;B03000;AMEACA;AV ABILIO MACHAD;289;634;31/5/2001 19:24:00;CIDADAO COMUM;N;;INCONFIDENCIA;BH;605159.11;797994.37;5424
+5426;2001294498;B06000;LESAO CORPORAL;RUA FLOR DE MAIO;36;300399;31/5/2001 19:32:00;CIDADAO COMUM;S;PX472;VILA CAFEZAL;BH;614158.56;794801.41;5425
+5427;2001294580;B03000;AMEACA;RUA POTOMAIO;658;54920;31/5/2001 20:21:00;CIDADAO COMUM;S;0;SAO GERALDO;BH;615643.99;799123.70;5426
+5428;2001294636;B06000;LESAO CORPORAL;RUA LAVRAS;1038;40540;31/5/2001 20:58:00;INICIATIVA;N;0;SAO PEDRO;BH;611111.90;793838.67;5427
+5429;2001294659;B03000;AMEACA;RUA MERCEDES LUI;192;45483;31/5/2001 21:09:00;CIDADAO COMUM;S;0;PIRAJA;BH;613955.91;803348.34;5428
+5430;2001294667;B03000;AMEACA;RUA GUIA LOBO;200;32430;31/5/2001 21:12:00;INICIATIVA;S;0;ARAGUAIA;BH;604780.15;789332.65;5429
+5431;2001294721;B06000;LESAO CORPORAL;ESTRADA DO CERCA;2112;26428;31/5/2001 21:49:00;CIDADAO COMUM;S;;JARDIM AMERICA;BH;607514.35;793543.05;5430
+5432;2001294758;B06000;LESAO CORPORAL;RUA ENGENHO DO O;173;103102;31/5/2001 22:07:00;CIDADAO COMUM;S;CAB;ENGENHO NOGUEIRA;BH;606374.39;800410.53;5431
+5433;2001294932;B04002;HOMICIDIO CONSUM;AV UM;241;301245;1/6/2001 00:12:00;CIDADAO COMUM;S;0;NOVO AARAO REIS;BH;614419.15;805879.87;5432
+5434;2001294956;B06000;LESAO CORPORAL;RUA DES SARAIVA;608;66535;1/6/2001 00:35:00;CIDADAO COMUM;N;BECO TANCREDO NE;VERA CRUZ;BH;615953.00;798263.22;5433
+5435;2001294996;B04001;HOMICIDIO TENTAD;AV DO CONTORNO;6557;17228;1/6/2001 01:25:00;CIDADAO COMUM;S;0;CENTRO (BH);BH;611103.01;794818.70;5434
+5436;2001295050;B04002;HOMICIDIO CONSUM;RUA GAMA CERQUEI;850;30564;1/6/2001 02:30:00;CIDADAO COMUM;N;PROX. A BARAO;JARDIM AMERICA;BH;607640.84;794403.25;5435
+5437;2001295097;B03000;AMEACA;AV MONTESE;672;46675;1/6/2001 03:49:00;INICIATIVA;N;0;ITAPOA;BH;608400.48;806406.08;5436
+5438;2001295173;B03000;AMEACA;RUA CAPITAO DUAR;155;96701;1/6/2001 07:09:00;CIDADAO COMUM;S;;ANTONIO RIBEIRO ;BH;614915.48;806363.75;5437
+5439;2001295194;B03000;AMEACA;RUA SAO SALVADOR;46;63612;1/6/2001 07:22:00;CIDADAO COMUM;S;;BONFIM;BH;610151.37;797963.59;5438
+5440;2001295386;B03000;AMEACA;RUA JOAQUIM DE P;1000;38147;1/6/2001 09:46:00;CIDADAO COMUM;N;0;ALIPIO DE MELO;BH;604681.70;799201.87;5439
+5441;2001295394;B03000;AMEACA;RUA RIO DE JANEI;882;58772;1/6/2001 09:51:00;CIDADAO COMUM;N;LOJA MOURA CALCA;CENTRO (BH);BH;611020.00;796841.48;5440
+5442;2001295478;B06000;LESAO CORPORAL;RUA FLOR DE VIDR;44;13504;1/6/2001 11:01:00;CIDADAO COMUM;N;0;CASTELO;BH;605631.15;799432.80;5441
+5443;2001295497;B06000;LESAO CORPORAL;AV BIAS FORTES;1889;9553;1/6/2001 11:12:00;CIDADAO COMUM;S;;CARLOS PRATES;BH;610128.59;797270.32;5442
+5444;2001295536;B08000;VIOLACAO DE DOMI;RUA ABAETE;379;546;1/6/2001 11:46:00;CIDADAO COMUM;S;CAFR;BONFIM;BH;609826.63;797835.67;5443
+5445;2001295638;B03000;AMEACA;RUA DONA NOEMI;61;22988;1/6/2001 13:09:00;CIDADAO COMUM;N;0;PADRE EUSTAQUIO;BH;606252.90;797217.31;5444
+5446;2001295692;B03000;AMEACA;RUA PATROCINIO;209;52574;1/6/2001 13:45:00;CIDADAO COMUM;S;0;CARLOS PRATES;BH;609810.09;797518.64;5445
+5447;2001295737;B03000;AMEACA;RUA DA APRESENTA;59;5118;1/6/2001 14:12:00;CIDADAO COMUM;S;;SAO JOSE;BH;605407.63;798641.22;5446
+5448;2001295785;B03000;AMEACA;RUA ROSALINA BAN;215;59302;1/6/2001 14:57:00;CIDADAO COMUM;S;0;MINASLANDIA;BH;611890.83;803991.25;5447
+5449;2001295871;B06000;LESAO CORPORAL;RUA DOS GOITACAZ;790;31400;1/6/2001 15:50:00;INICIATIVA;N;0;BARRO PRETO;BH;610517.27;796910.59;5448
+5450;2001295875;B03000;AMEACA;RUA CABO VALERIO;78;111920;1/6/2001 15:53:00;CIDADAO COMUM;S;;CH ATILA DE PAIV;BH;601444.34;790687.78;5449
+5451;2001295926;B03000;AMEACA;RUA SERRA NEGRA;1224;65038;1/6/2001 16:21:00;CIDADAO COMUM;S;0;SANTO ANDRE;BH;609224.13;799135.37;5450
+5452;2001295929;B04001;HOMICIDIO TENTAD;RUA PRINCIPAL;701;300224;1/6/2001 16:20:00;CIDADAO COMUM;N;0;MORRO DO PAPAGAI;BH;610540.12;793166.02;5451
+5453;2001296069;B03000;AMEACA;RUA CIRILO GASPA;326;63348;1/6/2001 17:26:00;CIDADAO COMUM;S;0;APARECIDA SETIMA;BH;608684.85;800162.78;5452
+5454;2001296095;B06000;LESAO CORPORAL;RUA CARIOCA;114;81634;1/6/2001 17:46:00;INICIATIVA;S;0;SAO PAULO;BH;612315.00;802612.78;5453
+5455;2001296108;B03000;AMEACA;RUA GODOFREDO DE;375;31352;1/6/2001 17:49:00;CIDADAO COMUM;S;0;SAGRADA FAMILIA;BH;612726.57;799375.77;5454
+5456;2001296199;B03000;AMEACA;RUA MONTALVANIA;28;46344;1/6/2001 18:37:00;CIDADAO COMUM;S;;SANTA INES;BH;613916.00;800191.38;5455
+5457;2001296204;B03000;AMEACA;RUA LIMOEIRO;294;41108;1/6/2001 18:45:00;INICIATIVA;S;102;NOVA SUISSA;BH;607267.86;795880.77;5456
+5458;2001296341;B03000;AMEACA;RUA DA APRESENTA;59;5118;1/6/2001 19:52:00;INICIATIVA;S;;SAO JOSE;BH;605407.63;798641.22;5457
+5459;2001296413;B03000;AMEACA;RUA ARAGUARI;165;5376;1/6/2001 20:36:00;CIDADAO COMUM;S;;BARRO PRETO;BH;610131.21;797120.08;5458
+5460;2001296556;B03000;AMEACA;RUA NELSON HUNGR;10;46634;1/6/2001 21:58:00;CIDADAO COMUM;S;;TUPI;BH;612851.92;806239.44;5459
+5461;2001296572;B03000;AMEACA;RUA DES BRAULIO;1938;19917;1/6/2001 22:05:00;INICIATIVA;S;0;VERA CRUZ;BH;616339.91;797391.22;5460
+5462;2001296635;B06000;LESAO CORPORAL;BECO NOSSA SENHO;20;300897;1/6/2001 22:52:00;INICIATIVA;S;0;MORRO DAS PEDRAS;BH;608649.57;793925.65;5461
+5463;2001296638;B03000;AMEACA;RUA FREI LUIZ DE;59;29961;1/6/2001 22:54:00;CIDADAO COMUM;S;0;JOAO PINHEIRO;BH;604955.30;795833.82;5462
+5464;2001296645;B04002;HOMICIDIO CONSUM;RUA DOS CARIJOS;787;81243;1/6/2001 22:57:00;INICIATIVA;N;0;CENTRO (BH);BH;610711.74;797261.24;5463
+5465;2001296724;B06000;LESAO CORPORAL;AV SILVA LOBO;2366;65889;1/6/2001 23:46:00;INICIATIVA;S;0;GRAJAU;BH;608534.06;794486.36;5464
+5466;2001296730;B06000;LESAO CORPORAL;RUA JANUARIO PER;170;86363;1/6/2001 23:47:00;CIDADAO COMUM;N;;JAQUELINE;BH;611007.43;810129.96;5465
+5467;2001296741;B03000;AMEACA;AV RAJA GABAGLIA;1987;57830;1/6/2001 23:56:00;INICIATIVA;N;0;LEONINA;BH;608875.32;793451.62;5466
+5468;2001296747;B03000;AMEACA;RUA FEIRA DE SAN;358;12946;1/6/2001 23:58:00;CIDADAO COMUM;S;0;ANTONIO RIBEIRO ;BH;615488.77;806619.60;5467
+5469;2001296755;B06000;LESAO CORPORAL;RUA SEIS;62;302814;2/6/2001 00:08:00;INICIATIVA;N;0;NOVO ARAO REIS;BH;614490.26;805888.76;5468
+5470;2001296774;B04001;HOMICIDIO TENTAD;RUA ITAJOBI;10;35482;2/6/2001 00:17:00;INICIATIVA;S;0;POMPEIA;BH;614467.30;798001.31;5469
+5471;2001296853;B06000;LESAO CORPORAL;RUA PADRE PEDRO ;175;51657;2/6/2001 01:09:00;CIDADAO COMUM;0;;VENDA NOVA;BH;609671.68;808130.71;5470
+5472;2001296947;B06000;LESAO CORPORAL;RUA OUTONO;535;50768;2/6/2001 02:30:00;CIDADAO COMUM;N;;CRUZEIRO;BH;612086.42;794535.17;5471
+5473;2001296952;B06000;LESAO CORPORAL;RUA PERNAMBUCO;1184;53463;2/6/2001 02:30:00;CIDADAO COMUM;S;;FUNCIONARIOS;BH;611453.01;795164.24;5472
+5474;2001297020;B04001;HOMICIDIO TENTAD;AV BARAO HOMEM D;510;7936;2/6/2001 03:17:00;CIDADAO COMUM;N;;NOVA SUISSA;BH;607529.85;795029.50;5473
+5475;2001297053;B03000;AMEACA;RUA INGAI;693;36964;2/6/2001 03:52:00;CIDADAO COMUM;S;AP201;PADRE EUSTAQUIO;BH;607942.26;797392.70;5474
+5476;2001297084;B08000;VIOLACAO DE DOMI;RUA FRANCE JOSE ;328;85751;2/6/2001 04:21:00;CIDADAO COMUM;N;;SERRA VERDE;BH;609703.97;810229.05;5475
+5477;2001297169;B03000;AMEACA;RUA BINARIO;30;301457;2/6/2001 06:41:00;CIDADAO COMUM;S;;VILA CAFEZAL;BH;614325.07;795529.96;5476
+5478;2001297170;B04001;HOMICIDIO TENTAD;RUA JAIR NEGRAO ;5;21944;2/6/2001 06:42:00;CIDADAO COMUM;N;;JARDIM ESTRELA;BH;607349.55;810148.64;5477
+5479;2001297172;B03000;AMEACA;RUA DOS TUPIS;1110;69965;2/6/2001 06:44:00;CIDADAO COMUM;N;;BARRO PRETO;BH;610202.12;797135.97;5478
+5480;2001297344;B03000;AMEACA;RUA IPACARAI;365;34694;2/6/2001 09:16:00;INICIATIVA;S;0;GLORIA;BH;602745.45;798057.80;5479
+5481;2001297377;B06000;LESAO CORPORAL;RUA ONDINA PEDRO;30;82882;2/6/2001 09:36:00;CIDADAO COMUM;N;0;SERRANO;BH;603640.89;801660.33;5480
+5482;2001297399;B09000;ABANDONO DE INCA;RUA CORONEL JOAO;400;17836;2/6/2001 09:54:00;CIDADAO COMUM;0;0;FLORAMAR;BH;611414.14;806536.86;5481
+5483;2001297411;B03000;AMEACA;RUA M;100;37812;2/6/2001 10:01:00;CIDADAO COMUM;S;;MINASCAIXA;BH;609121.71;810078.66;5482
+5484;2001297452;B08000;VIOLACAO DE DOMI;RUA XAVIER DA VE;166;73843;2/6/2001 10:28:00;CIDADAO COMUM;N;;MINAS BRASIL;BH;605784.32;797406.65;5483
+5485;2001297468;B03000;AMEACA;RUA CAMPINA VERD;312;12110;2/6/2001 10:37:00;CIDADAO COMUM;S;0;SALGADO FILHO;BH;606172.49;794445.71;5484
+5486;2001297604;B06000;LESAO CORPORAL;RUA MARIA ANGELI;65;43825;2/6/2001 12:09:00;CIDADAO COMUM;S;CAFU;MARIA GORETTI;BH;614078.28;803663.57;5485
+5487;2001297620;B03000;AMEACA;RUA FERNANDO LOB;400;28118;2/6/2001 12:25:00;POLICIAL MILITAR;N;0;SANTA EFIGENIA;BH;614428.02;796990.29;5486
+5488;2001297682;B03000;AMEACA;RUA ROBERTO ALVA;488;125888;2/6/2001 13:09:00;CIDADAO COMUM;S;0;MANGABEIRAS;BH;613717.09;794096.65;5487
+5489;2001297739;B06000;LESAO CORPORAL;RUA DEUSDEDITH D;45;20071;2/6/2001 13:53:00;CIDADAO COMUM;S;;DOM BOSCO;BH;604180.22;796804.73;5488
+5490;2001297824;B06000;LESAO CORPORAL;RUA CAETANO VASC;11;98202;2/6/2001 15:00:00;CIDADAO COMUM;S;0;JARDIM VITORIA;BH;616275.04;804051.71;5489
+5491;2001297851;B03000;AMEACA;RUA PROFESSOR LE;396;84052;2/6/2001 15:19:00;CIDADAO COMUM;S;;ITAMARATI;BH;606383.37;807880.96;5490
+5492;2001297882;B03000;AMEACA;RUA TAPIRA;81;66939;2/6/2001 15:33:00;CIDADAO COMUM;S;0;CONCORDIA;BH;610785.63;799662.42;5491
+5493;2001297894;B04001;HOMICIDIO TENTAD;RUA CAMILO DE BR;636;11896;2/6/2001 15:44:00;CIDADAO COMUM;S;;PADRE EUSTAQUIO;BH;605855.99;798012.24;5492
+5494;2001297924;B03000;AMEACA;AV DOS ESPORTES;550;26065;2/6/2001 16:08:00;CIDADAO COMUM;N;0;PADRE EUSTAQUIO;BH;606264.57;797115.43;5493
+5495;2001297963;B06000;LESAO CORPORAL;RUA EVEREST;169;26935;2/6/2001 16:29:00;CIDADAO COMUM;S;0;BELMONT;BH;615458.96;805318.06;5494
+5496;2001297972;B06000;LESAO CORPORAL;RUA INTENDENTE C;420;34653;2/6/2001 16:35:00;CIDADAO COMUM;S;AP302;VILA INDAIA;BH;609729.35;803429.79;5495
+5497;2001297976;B04001;HOMICIDIO TENTAD;RUA GRAUNAS;42;31797;2/6/2001 16:37:00;CIDADAO COMUM;N;;FLAVIO MARQUES D;BH;605204.19;788456.55;5496
+5498;2001297977;B03000;AMEACA;RUA CONSELHEIRO ;231;17041;2/6/2001 16:37:00;CIDADAO COMUM;N;;SAGRADA FAMILIA;BH;612529.23;798131.69;5497
+5499;2001298009;B03000;AMEACA;RUA STA APOLONIA;548;60352;2/6/2001 16:52:00;CIDADAO COMUM;S;;DOM JOAQUIM;BH;613932.42;802281.61;5498
+5500;2001298039;B03000;AMEACA;RUA LUIZ LOPES;232;94431;2/6/2001 17:08:00;CIDADAO COMUM;S;;OURO PRETO;BH;606295.93;801150.74;5499
+5501;2001298063;B03000;AMEACA;RUA REGINA;17;58224;2/6/2001 17:23:00;CIDADAO COMUM;S;;EYMARD;BH;613648.70;803339.62;5500
+5502;2001298065;B03000;AMEACA;RUA FLOR DE VIDR;44;13504;2/6/2001 17:21:00;CIDADAO COMUM;S;0;CASTELO;BH;605631.15;799432.80;5501
+5503;2001298084;B06000;LESAO CORPORAL;RUA PEDRA DOURAD;158;127060;2/6/2001 17:32:00;CIDADAO COMUM;S;0;PIRATININGA;BH;605914.83;809333.11;5502
+5504;2001298101;B03000;AMEACA;RUA SARARE;25;64035;2/6/2001 17:48:00;CIDADAO COMUM;N;;JARDINOPOLIS;BH;604534.76;794804.54;5503
+5505;2001298102;B06000;LESAO CORPORAL;RUA HERCILIA GOM;186;104389;2/6/2001 17:50:00;CIDADAO COMUM;S;;DAS INDUSTRIAS;BH;605402.11;791022.21;5504
+5506;2001298284;B03000;AMEACA;RUA ITANHAEM;20;100173;2/6/2001 19:16:00;CIDADAO COMUM;S;;PIRATININGA;BH;605396.91;809225.25;5505
+5507;2001298286;B06000;LESAO CORPORAL;RUA PADRE FEIJO;2190;51326;2/6/2001 19:18:00;CIDADAO COMUM;S;0;VERA CRUZ;BH;616394.07;797774.76;5506
+5508;2001298296;B03000;AMEACA;AV AUGUSTO DE LI;170;6731;2/6/2001 19:21:00;CIDADAO COMUM;S;1502;CENTRO (BH);BH;611167.70;796596.57;5507
+5509;2001298323;B06000;LESAO CORPORAL;RUA AVELINO GIAR;65;99350;2/6/2001 19:39:00;INICIATIVA;N;0;CEU AZUL;BH;604887.51;807674.66;5508
+5510;2001298328;B06000;LESAO CORPORAL;RUA SARANDI;18;64010;2/6/2001 19:42:00;INICIATIVA;S;0;ESPLANADA;BH;615019.62;798459.96;5509
+5511;2001298355;B03000;AMEACA;RUA ESTEVAO DE O;207;26330;2/6/2001 19:55:00;CIDADAO COMUM;S;;JARDIM MONTANHES;BH;606323.57;798272.26;5510
+5512;2001298367;B03000;AMEACA;AV AFONSO PENA;590;1259;2/6/2001 20:01:00;INICIATIVA;N;0;CENTRO BH;BH;611078.27;797193.62;5511
+5513;2001298443;B04001;HOMICIDIO TENTAD;RUA MANTIQUEIRA;276;43286;2/6/2001 20:45:00;CIDADAO COMUM;N;0;SANTA INES;BH;614324.07;800485.83;5512
+5514;2001298469;B06000;LESAO CORPORAL;AV WALDIR SOEIRO;97;118904;2/6/2001 21:00:00;INICIATIVA;N;0;BETANIA;BH;601638.75;788954.48;5513
+5515;2001298474;B06000;LESAO CORPORAL;RUA NICIAS CONTI;115;56115;2/6/2001 21:02:00;CIDADAO COMUM;S;0;GAMELEIRA;BH;604986.20;794809.65;5514
+5516;2001298484;B03000;AMEACA;RUA DA BOLIVIA;648;9884;2/6/2001 21:07:00;INICIATIVA;S;0;SION;BH;610943.73;793524.50;5515
+5517;2001298496;B06000;LESAO CORPORAL;RUA DOS AMERICAN;1297;3254;2/6/2001 21:16:00;CIDADAO COMUM;S;;MILIONARIOS;BH;604811.91;790698.06;5516
+5518;2001298527;B03000;AMEACA;AV ITAITE;99;35441;2/6/2001 21:28:00;CIDADAO COMUM;S;0;SAO GERALDO;BH;614875.88;799394.79;5517
+5519;2001298538;B06000;LESAO CORPORAL;RUA GUARARAPES;951;32241;2/6/2001 21:33:00;CIDADAO COMUM;N;0;GLORIA;BH;603067.32;798685.03;5518
+5520;2001298558;B06000;LESAO CORPORAL;RUA ANA DE FREIT;87;3531;2/6/2001 21:42:00;CIDADAO COMUM;N;;DURVAL DE BARROS;IB;598543.34;790677.20;5519
+5521;2001298566;B03000;AMEACA;RUA ITAGUA;195;35338;2/6/2001 21:45:00;CIDADAO COMUM;S;0;VERA CRUZ;BH;615942.80;798772.06;5520
+5522;2001298601;B03000;AMEACA;AV BELEM;906;8913;2/6/2001 22:04:00;CIDADAO COMUM;S;0;VERA CRUZ;BH;615138.21;797926.24;5521
+5523;2001298619;B06000;LESAO CORPORAL;RUA AMARANTO;68;3080;2/6/2001 22:12:00;CIDADAO COMUM;S;;LINDEIA;BH;599564.60;790850.68;5522
+5524;2001298655;B03000;AMEACA;RUA ANTONIA DE C;162;65457;2/6/2001 22:30:00;CIDADAO COMUM;N;;MINASCAIXA;BH;608892.64;809255.94;5523
+5525;2001298692;B04002;HOMICIDIO CONSUM;AV ESPLANADA;600;126244;2/6/2001 22:47:00;CIDADAO COMUM;N;0;SAO GABRIEL;BH;613295.56;804506.46;5524
+5526;2001298703;B06000;LESAO CORPORAL;RUA DES ONOFRE M;18;108770;2/6/2001 22:55:00;INICIATIVA;N;0;RIO BRANCO;BH;607470.11;808742.09;5525
+5527;2001298717;B06000;LESAO CORPORAL;RUA SAO VICENTE;10;113680;2/6/2001 23:00:00;CIDADAO COMUM;S;;TIROL;BH;600949.68;789154.18;5526
+5528;2001298726;B03000;AMEACA;RUA OTAVIO CARNE;456;50594;2/6/2001 23:06:00;CIDADAO COMUM;S;0;BOA VISTA;BH;614836.31;799825.99;5527
+5529;2001298740;B04001;HOMICIDIO TENTAD;RUA CLORITA;100;16051;2/6/2001 23:11:00;CIDADAO COMUM;N;0;SANTA TEREZA;BH;612847.22;797209.80;5528
+5530;2001298741;B06000;LESAO CORPORAL;RUA VISCONDE DE ;584;73308;2/6/2001 23:11:00;CIDADAO COMUM;S;;JARDIM LEBLON;BH;605857.28;807175.17;5529
+5531;2001298768;B06000;LESAO CORPORAL;RUA BERNARDO CIS;183;9351;2/6/2001 23:23:00;CIDADAO COMUM;N;;PARQUE RIACHUELO;BH;609725.24;799999.49;5530
+5532;2001298777;B06000;LESAO CORPORAL;RUA JOSE MOREIRA;481;95232;2/6/2001 23:25:00;CIDADAO COMUM;S;0;TIROL;BH;600268.32;789248.46;5531
+5533;2001298824;B02000;RIXA;AV ITAITE;654;35441;2/6/2001 23:55:00;CIDADAO COMUM;N;;SAO GERALDO;BH;615408.86;799462.18;5532
+5534;2001298831;B03000;AMEACA;RUA GUARARAPES;951;32241;2/6/2001 23:59:00;CIDADAO COMUM;S;;GLORIA;BH;603067.32;798685.03;5533
+5535;2001298875;B03000;AMEACA;RUA ANTONIO JOSE;102;7431;3/6/2001 00:31:00;CIDADAO COMUM;S;;CEU AZUL;BH;605149.79;807714.83;5534
+5536;2001298885;B03000;AMEACA;RUA PEDRO LUIZ D;199;100841;3/6/2001 00:38:00;CIDADAO COMUM;S;;FLORAMAR;BH;611505.95;807230.49;5535
+5537;2001298930;B06000;LESAO CORPORAL;RUA GABRO;379;30435;3/6/2001 01:04:00;CIDADAO COMUM;N;0;SANTA TEREZA;BH;612925.79;797244.47;5536
+5538;2001298943;B06000;LESAO CORPORAL;RUA MOREIRA DIAS;7;31191;3/6/2001 01:11:00;CIDADAO COMUM;S;0;CONJ HAB JARDIM ;BH;603860.94;798157.37;5537
+5539;2001298998;B03000;AMEACA;RUA ANTONIO MARZ;354;94520;3/6/2001 01:43:00;CIDADAO COMUM;N;;OURO PRETO;BH;606237.09;800709.30;5538
+5540;2001299037;B04001;HOMICIDIO TENTAD;RUA DAVID FONSEC;450;19696;3/6/2001 02:01:00;CIDADAO COMUM;S;0;MILIONARIOS;BH;604513.19;789975.34;5539
+5541;2001299104;B06000;LESAO CORPORAL;RUA SAO PAULO;550;90213;3/6/2001 02:42:00;CIDADAO COMUM;S;CA;SARANDI (URCA/BH;BH;602793.89;802510.17;5540
+5542;2001299106;B06000;LESAO CORPORAL;AV SILVIANO BRAN;2400;66002;3/6/2001 02:44:00;INICIATIVA;S;0;HORTO;BH;613573.09;798218.66;5541
+5543;2001299181;B04001;HOMICIDIO TENTAD;RUA DOS GOITACAZ;1361;31400;3/6/2001 03:35:00;CIDADAO COMUM;N;;BARRO PRETO;BH;609953.61;797025.02;5542
+5544;2001299188;B06000;LESAO CORPORAL;RUA PROFESSOR SA;15;122722;3/6/2001 03:44:00;CIDADAO COMUM;S;0;BELVEDERE;BH;611311.76;791412.70;5543
+5545;2001299204;B03000;AMEACA;RUA MARIA;27;43737;3/6/2001 04:01:00;CIDADAO COMUM;N;;VILA MARAVILHAS;BH;603342.50;795417.91;5544
+5546;2001299247;B06000;LESAO CORPORAL;AV FLOR DE SEDA;883;748;3/6/2001 04:32:00;CIDADAO COMUM;S;0;LINDEIA;BH;599539.85;790575.26;5545
+5547;2001299256;B06000;LESAO CORPORAL;RUA OITO;95;81606;3/6/2001 04:40:00;CIDADAO COMUM;S;;OLHOS DAGUA;BH;608583.83;788592.29;5546
+5548;2001299298;B06000;LESAO CORPORAL;RUA PADRE PEDRO ;322;51657;3/6/2001 05:34:00;CIDADAO COMUM;S;0;VILA SANTO ANTON;BH;609650.08;808286.90;5547
+5549;2001299361;B06000;LESAO CORPORAL;RUA ARTUR DE SA;1095;6211;3/6/2001 07:16:00;CIDADAO COMUM;S;;UNIAO;BH;612867.65;801923.71;5548
+5550;2001299401;B03000;AMEACA;RUA FERNAO DIAS;428;28133;3/6/2001 08:03:00;CIDADAO COMUM;S;;CASA BRANCA;BH;616090.44;799485.48;5549
+5551;2001299440;B03000;AMEACA;RUA D;114;79764;3/6/2001 08:30:00;CIDADAO COMUM;S;;JARDIM VITORIA;BH;616892.23;804514.53;5550
+5552;2001299493;B03000;AMEACA;RUA P;9;27216;3/6/2001 09:32:00;CIDADAO COMUM;S;0;PAULO SEXTO;BH;616464.31;806936.03;5551
+5553;2001299532;B06000;LESAO CORPORAL;AV AUGUSTO DE LI;744;6731;3/6/2001 10:00:00;CIDADAO COMUM;N;0;CENTRO (BH);BH;610661.75;796747.31;5552
+5554;2001299539;B03000;AMEACA;RUA LEONCIO JOSE;49;86350;3/6/2001 10:05:00;CIDADAO COMUM;S;;JARDIM GUANABARA;BH;611933.98;807194.50;5553
+5555;2001299564;B09000;ABANDONO DE INCA;RUA CLOVIS DE CA;65;16064;3/6/2001 10:26:00;CIDADAO COMUM;S;;FLORAMAR;BH;612155.53;805842.63;5554
+5556;2001299571;B06000;LESAO CORPORAL;RUA CARLINDO AUG;5;97124;3/6/2001 10:30:00;CIDADAO COMUM;N;;SAO MARCOS;BH;614652.76;802454.88;5555
+5557;2001299638;B06000;LESAO CORPORAL;RUA ANTONIO JULI;218;111379;3/6/2001 11:18:00;CIDADAO COMUM;S;;SANTA AMELIA;BH;606775.18;806180.58;5556
+5558;2001299725;B06000;LESAO CORPORAL;RUA TRUCAL;92;95825;3/6/2001 12:15:00;CIDADAO COMUM;S;;GOIANIA;BH;615359.86;803216.58;5557
+5559;2001299825;B06000;LESAO CORPORAL;AV ALVARES CABRA;17;2730;3/6/2001 13:09:00;INICIATIVA;N;0;CENTRO BH;BH;611448.04;796520.02;5558
+5560;2001299832;B06000;LESAO CORPORAL;RUA CLOVIS DE SO;210;118642;3/6/2001 13:14:00;CIDADAO COMUM;N;;REGINA;BH;598820.84;789899.77;5559
+5561;2001299854;B03000;AMEACA;RUA VITORIA REGI;400;73540;3/6/2001 13:28:00;CIDADAO COMUM;S;CSB;LINDEIA;BH;599149.38;790905.76;5560
+5562;2001299857;B04001;HOMICIDIO TENTAD;RUA LA PAZ;151;40350;3/6/2001 13:27:00;CIDADAO COMUM;S;0;SION;BH;611089.07;793827.88;5561
+5563;2001299869;B03000;AMEACA;RUA SERVIDAO;27;106734;3/6/2001 13:38:00;CIDADAO COMUM;N;;JARDIM DOS COMER;BH;607267.69;811545.81;5562
+5564;2001299871;B03000;AMEACA;RUA SAO JERONIMO;1271;62764;3/6/2001 13:40:00;CIDADAO COMUM;N;0;SAGRADA FAMILIA;BH;612648.00;799754.06;5563
+5565;2001299997;B03000;AMEACA;RUA CAMPOS SALES;1023;12300;3/6/2001 15:06:00;CIDADAO COMUM;S;CAZZ;CALAFATE;BH;606539.69;796004.69;5564
+5566;2001300030;B06000;LESAO CORPORAL;RUA LAGUNA;104;94167;3/6/2001 15:25:00;CIDADAO COMUM;S;;SANTA CECILIA;BH;601002.03;787950.46;5565
+5567;2001300195;B03000;AMEACA;RUA QUINANTE;350;57234;3/6/2001 16:56:00;CIDADAO COMUM;N;;MINASCAIXA;BH;609756.82;808965.48;5566
+5568;2001300228;B06000;LESAO CORPORAL;RUA SAO JOAO BAT;93;62824;3/6/2001 17:13:00;CIDADAO COMUM;N;;JARDIM LEBLON;BH;605813.84;808139.15;5567
+5569;2001300229;B04001;HOMICIDIO TENTAD;RUA GAMA CERQUEI;1117;30564;3/6/2001 17:09:00;INICIATIVA;S;0;JARDIM AMERICA;BH;607837.58;794041.01;5568
+5570;2001300243;B03000;AMEACA;RUA ESTRELA DO S;226;26718;3/6/2001 17:27:00;CIDADAO COMUM;S;;SANTA TEREZA;BH;613340.29;797293.43;5569
+5571;2001300251;B03000;AMEACA;RUA MARIA;27;43737;3/6/2001 17:29:00;CIDADAO COMUM;S;0;VILA MARAVILHAS;BH;603342.50;795417.91;5570
+5572;2001300280;B06000;LESAO CORPORAL;RUA PARANOA;94;27521;3/6/2001 17:46:00;CIDADAO COMUM;S;;CH CELSO MACHADO;BH;603709.56;801171.39;5571
+5573;2001300307;B03000;AMEACA;RUA NATAL;166;47306;3/6/2001 17:57:00;CIDADAO COMUM;N;AP10;SANTO ANDRE;BH;609468.39;799440.41;5572
+5574;2001300310;B06000;LESAO CORPORAL;RUA GASPAR DE LE;45;119720;3/6/2001 17:58:00;INICIATIVA;S;0;VERA CRUZ;BH;616869.52;797183.90;5573
+5575;2001300364;B06000;LESAO CORPORAL;RUA IBIAPABA;389;33837;3/6/2001 18:23:00;CIDADAO COMUM;N;0;VILA IPIRANGA;BH;604922.07;789751.90;5574
+5576;2001300383;B06000;LESAO CORPORAL;RUA PARA DE MINA;10;52070;3/6/2001 18:32:00;INICIATIVA;N;0;PADRE EUSTAQUIO;BH;606706.69;797678.03;5575
+5577;2001300388;B03000;AMEACA;RUA GERALDO FERR;1510;41007;3/6/2001 18:33:00;CIDADAO COMUM;N;CAF;JARDIM VITORIA;BH;617152.34;804043.58;5576
+5578;2001300394;B06000;LESAO CORPORAL;RUA CONCEICAO CH;27;20387;3/6/2001 18:36:00;CIDADAO COMUM;S;;SAO JOAO BATISTA;BH;608844.59;808153.20;5577
+5579;2001300430;B06000;LESAO CORPORAL;RUA APERE;389;5020;3/6/2001 18:52:00;CIDADAO COMUM;0;0;SAO GERALDO;BH;615435.75;799736.04;5578
+5580;2001300432;B06000;LESAO CORPORAL;AV AMAZONAS;6000;3140;3/6/2001 18:53:00;POLICIAL MILITAR;S;0;GAMELEIRA;BH;606048.05;795827.62;5579
+5581;2001300451;B04001;HOMICIDIO TENTAD;BECO OPALA;75;300769;3/6/2001 19:00:00;CIDADAO COMUM;S;0;CARLOS PRATES;BH;608739.85;797746.86;5580
+5582;2001300466;B03000;AMEACA;RUA MOTOQUEIRO L;26;69505;3/6/2001 19:05:00;CIDADAO COMUM;S;0;FLORAMAR;BH;611770.40;806402.82;5581
+5583;2001300472;B03000;AMEACA;RUA MONTE SIMPLO;300;46574;3/6/2001 19:07:00;MILITARES DAS FO;S;;NOVA SUISSA;BH;606574.34;795868.64;5582
+5584;2001300493;B06000;LESAO CORPORAL;AV DOS CLARINS;54;118337;3/6/2001 19:16:00;CIDADAO COMUM;S;;CH CALIFORNIA;BH;604017.86;796719.43;5583
+5585;2001300517;B06000;LESAO CORPORAL;AV PRESIDENTE AN;3330;4461;3/6/2001 19:30:00;INICIATIVA;S;0;CACHOEIRINHA;BH;609917.41;801202.78;5584
+5586;2001300521;B06000;LESAO CORPORAL;AV ANTONIO ABRAH;1000;4320;3/6/2001 19:32:00;INICIATIVA;N;0;SAO LUIZ;BH;607791.03;803406.56;5585
+5587;2001300524;B06000;LESAO CORPORAL;AV PARANA;42;52230;3/6/2001 19:33:00;INICIATIVA;N;0;CENTRO (BH);BH;610805.41;797476.32;5586
+5588;2001300530;B03000;AMEACA;RUA FLOR DA SEIV;120;28739;3/6/2001 19:38:00;CIDADAO COMUM;S;LJA;JARDIM MONTANHES;BH;606072.83;799591.68;5587
+5589;2001300632;B06000;LESAO CORPORAL;RUA CINQUENTA E ;187;33736;3/6/2001 20:35:00;CIDADAO COMUM;S;;CONJUNTO FELICID;BH;612647.11;806904.94;5588
+5590;2001300686;B06000;LESAO CORPORAL;RUA MARIA BEATRI;76;43881;3/6/2001 21:06:00;CIDADAO COMUM;S;;HAVAI;BH;606696.13;793615.49;5589
+5591;2001300722;B06000;LESAO CORPORAL;BECO SAO SEBASTI;80;93470;3/6/2001 21:25:00;CIDADAO COMUM;S;CAFRENT;DOZE DE OUTUBRO;BH;606084.20;790709.65;5590
+5592;2001300797;B06000;LESAO CORPORAL;RUA IPE CLARO;300;124440;3/6/2001 22:13:00;INICIATIVA;N;0;ETELVINA CARNEIR;BH;611601.13;808955.15;5591
+5593;2001300817;B03000;AMEACA;RUA SAO PAULO;1031;63464;3/6/2001 22:25:00;INICIATIVA;S;0;CENTRO BH;BH;610900.59;796770.40;5592
+5594;2001300873;B05000;SEQUESTRO E CARC;RUA LAUDELINA CA;295;15594;3/6/2001 22:47:00;INICIATIVA;N;0;BRAUNAS;BH;604477.36;805759.23;5593
+5595;2001300876;B06000;LESAO CORPORAL;PRACA RUI BARBOS;50;59558;3/6/2001 22:50:00;CIDADAO COMUM;S;0;CENTRO (BH);BH;611488.17;797485.82;5594
+5596;2001300956;B03000;AMEACA;RUA NELSON HUNGR;10;46634;3/6/2001 23:29:00;CIDADAO COMUM;N;;TUPI;BH;612851.92;806239.44;5595
+5597;2001300966;B06000;LESAO CORPORAL;RUA PIO XI;560;53927;3/6/2001 23:40:00;INICIATIVA;S;0;IPIRANGA;BH;612058.97;800797.20;5596
+5598;2001301005;B06000;LESAO CORPORAL;RUA POMBA;405;57464;4/6/2001 00:04:00;CIDADAO COMUM;N;;GOIANIA;BH;615455.09;803054.45;5597
+5599;2001301078;B04001;HOMICIDIO TENTAD;RUA CONCEICAO DE;479;16515;4/6/2001 00:56:00;CIDADAO COMUM;N;;JARDIM LEBLON;BH;605887.75;807297.08;5598
+5600;2001301123;B03000;AMEACA;RUA ANTERO DE QU;405;4298;4/6/2001 01:44:00;CIDADAO COMUM;N;;SANTA BRANCA;BH;608270.89;806423.86;5599
+5601;2001301146;B04002;HOMICIDIO CONSUM;AV AMERICO VESPU;667;3355;4/6/2001 02:14:00;INICIATIVA;N;0;ERMELINDA;BH;609288.35;800370.16;5600
+5602;2001301308;B03000;AMEACA;RUA FLOR DA AMEI;263;77539;4/6/2001 07:31:00;CIDADAO COMUM;S;;JARDIM ALVORADA;BH;606349.66;800027.37;5601
+5603;2001301331;B06000;LESAO CORPORAL;AV OLEGARIO MACI;103;49699;4/6/2001 07:58:00;INICIATIVA;N;0;CENTRO (BH);BH;610681.26;797548.71;5602
+5604;2001301509;B03000;AMEACA;RUA CARMO DA CAC;10;13659;4/6/2001 09:58:00;CIDADAO COMUM;S;0;SALGADO FILHO;BH;606146.59;794290.29;5603
+5605;2001301637;B03000;AMEACA;RUA VENEZUELA;643;71460;4/6/2001 11:22:00;INICIATIVA;N;0;SION;BH;611300.07;793371.41;5604
+5606;2001301647;B03000;AMEACA;RUA LADAINHA;45;40118;4/6/2001 11:33:00;CIDADAO COMUM;S;;PRIMEIRO DE MAIO;BH;612013.16;803584.39;5605
+5607;2001301650;B04001;HOMICIDIO TENTAD;RUA CURRAL DEL R;194;19122;4/6/2001 11:33:00;CIDADAO COMUM;S;;CABANA;BH;604750.80;793811.34;5606
+5608;2001301663;B06000;LESAO CORPORAL;RUA MUNIZ;83;170850;4/6/2001 11:45:00;CIDADAO COMUM;S;;MORRO DAS PEDRAS;BH;608088.74;793990.65;5607
+5609;2001301677;B06000;LESAO CORPORAL;RUA ERNESTO GAZZ;110;99117;4/6/2001 11:57:00;CIDADAO COMUM;N;;CEU AZUL;BH;605033.43;808548.91;5608
+5610;2001301688;B03000;AMEACA;RUA CONSELHEIRO ;375;17041;4/6/2001 12:00:00;CIDADAO COMUM;S;0;SAGRADA FAMILIA;BH;612564.61;798267.52;5609
+5611;2001301723;B03000;AMEACA;RUA ARAPE;26;29798;4/6/2001 12:32:00;CIDADAO COMUM;S;26A;UNIAO;BH;612951.72;801000.18;5610
+5612;2001301746;B03000;AMEACA;RUA AQUILES LOBO;12;5219;4/6/2001 12:51:00;CIDADAO COMUM;S;;FLORESTA;BH;612358.94;797328.31;5611
+5613;2001301759;B06000;LESAO CORPORAL;RUA VILA REAL;87;60683;4/6/2001 13:03:00;CIDADAO COMUM;S;;SAO FRANCISCO;BH;609915.68;801999.03;5612
+5614;2001301793;B06000;LESAO CORPORAL;AV AMAZONAS;2267;3140;4/6/2001 13:33:00;INICIATIVA;N;INICIATIVA POV5.;BARRO PRETO;BH;609538.15;796202.90;5613
+5615;2001301844;B04001;HOMICIDIO TENTAD;RUA ONZE DE NOVE;56;81054;4/6/2001 14:10:00;INICIATIVA;S;0;LEONINA;BH;608376.82;793204.43;5614
+5616;2001301853;B06000;LESAO CORPORAL;RUA DO CALVARIO;258;11700;4/6/2001 14:16:00;CIDADAO COMUM;N;CSA;SAO MARCOS;BH;613836.82;802510.54;5615
+5617;2001301864;B03000;AMEACA;RUA STA JOSEFINA;821;60803;4/6/2001 14:20:00;CIDADAO COMUM;S;;APARECIDA SETIMA;BH;608530.91;800871.09;5616
+5618;2001301885;B06000;LESAO CORPORAL;RUA FLOR DE ABRI;5;28464;4/6/2001 14:38:00;CIDADAO COMUM;S;0;JARDIM MONTANHES;BH;606020.27;798873.31;5617
+5619;2001301937;B06000;LESAO CORPORAL;AV PRESIDENTE AN;4013;4461;4/6/2001 15:13:00;CIDADAO COMUM;S;0;SAO FRANCISCO;BH;609536.57;802154.10;5618
+5620;2001301938;B06000;LESAO CORPORAL;RUA BIMBARRA;343;9641;4/6/2001 15:13:00;CIDADAO COMUM;N;CAA;CALAFATE;BH;607141.45;796609.73;5619
+5621;2001301987;B06000;LESAO CORPORAL;RUA COSTA JUNIOR;119;18321;4/6/2001 15:41:00;CIDADAO COMUM;S;0;NOVA CACHOEIRINH;BH;609688.67;801513.50;5620
+5622;2001302005;B06000;LESAO CORPORAL;RUA CAPELINHA;20;300406;4/6/2001 15:52:00;CIDADAO COMUM;N;;MORRO DO PAPAGAI;BH;610483.17;793376.89;5621
+5623;2001302121;B06000;LESAO CORPORAL;AV AMAZONAS;1735;3140;4/6/2001 16:58:00;CIDADAO COMUM;N;0;BARRO PRETO;BH;610011.95;796485.92;5622
+5624;2001302139;B03000;AMEACA;AV WALDOMIRO LOB;1560;66548;4/6/2001 17:06:00;CIDADAO COMUM;N;0;GUARANI;BH;612066.64;805250.22;5623
+5625;2001302180;B03000;AMEACA;RUA WALESKA DE S;90;107954;4/6/2001 17:28:00;CIDADAO COMUM;N;;MANTIQUEIRA;BH;606465.56;811841.30;5624
+5626;2001302284;B03000;AMEACA;RUA DOS GUAJAJAR;2127;32037;4/6/2001 18:20:00;CIDADAO COMUM;S;0;BARRO PRETO;BH;609531.05;796845.76;5625
+5627;2001302375;B06000;LESAO CORPORAL;RUA AROEIRA DO S;105;105757;4/6/2001 19:02:00;CIDADAO COMUM;S;;ANTONIO RIBEIRO ;BH;615836.12;805770.66;5626
+5628;2001302503;B03000;AMEACA;RUA PLINIO TEIXE;25;98155;4/6/2001 20:08:00;CIDADAO COMUM;N;CA5;DOM SILVERIO;BH;615278.38;804834.14;5627
+5629;2001302525;B06000;LESAO CORPORAL;RUA CAMILO DE BR;636;11896;4/6/2001 20:21:00;CIDADAO COMUM;S;;PADRE EUSTAQUIO;BH;605855.99;798012.24;5628
+5630;2001302590;B03000;AMEACA;AV AMERICO VESPU;990;3355;4/6/2001 21:00:00;CIDADAO COMUM;S;0;APARECIDA;BH;609042.75;800120.55;5629
+5631;2001302630;B03000;AMEACA;AV A;455;34099;4/6/2001 21:24:00;CIDADAO COMUM;N;CAFR;CONJUNTO FELICID;BH;612533.56;807079.22;5630
+5632;2001302726;B03000;AMEACA;AV A;84;302850;4/6/2001 22:28:00;CIDADAO COMUM;N;;NOVO AARAO REIS;BH;613873.98;805539.35;5631
+5633;2001302935;B03000;AMEACA;RUA ANTONIO DE A;156;4345;5/6/2001 01:03:00;INICIATIVA;S;0;FUNCIONARIOS;BH;611821.42;794964.79;5632
+5634;2001303015;B04001;HOMICIDIO TENTAD;AV IBIRAPUERA;20;33893;5/6/2001 03:15:00;CIDADAO COMUM;N;0;ITAIPU BH;BH;599290.35;789040.69;5633
+5635;2001303179;B03000;AMEACA;PRACA SILVA GUIM;22;65850;5/6/2001 08:01:00;CIDADAO COMUM;N;0;CARMO;BH;611990.82;794859.98;5634
+5636;2001303214;B06000;LESAO CORPORAL;RUA MARCOS DONAT;125;99422;5/6/2001 08:18:00;CIDADAO COMUM;S;;ANTONIO RIBEIRO ;BH;614912.51;808004.53;5635
+5637;2001303354;B03000;AMEACA;RUA GENTIL TEODO;87;66333;5/6/2001 10:02:00;CIDADAO COMUM;N;;SAO JOAO BATISTA;BH;611230.41;801186.56;5636
+5638;2001303385;B06000;LESAO CORPORAL;RUA SAO BORJA;884;61620;5/6/2001 10:20:00;CIDADAO COMUM;N;;BOA VISTA;BH;615470.78;800428.06;5637
+5639;2001303520;B04001;HOMICIDIO TENTAD;RUA CAMILO PRATE;242;11915;5/6/2001 11:48:00;CIDADAO COMUM;N;;UNIAO;BH;613203.18;801235.39;5638
+5640;2001303527;B03000;AMEACA;RUA MARTINHO DE ;80;44985;5/6/2001 11:54:00;CIDADAO COMUM;N;CAA;NOVA CACHOEIRINH;BH;609773.94;801245.03;5639
+5641;2001303654;B03000;AMEACA;RUA ALCIDES LINS;502;1914;5/6/2001 13:28:00;CIDADAO COMUM;0;;VILA SANTO ANTON;BH;609215.72;808481.71;5640
+5642;2001303671;B06000;LESAO CORPORAL;AV URUGUAI;335;71113;5/6/2001 13:39:00;CIDADAO COMUM;N;SALA 14;SION;BH;611750.13;793745.62;5641
+5643;2001303768;B03000;AMEACA;RUA ITAPURA;397;35918;5/6/2001 14:41:00;CIDADAO COMUM;S;CAA;SAUDADE;BH;615292.38;797464.66;5642
+5644;2001303884;B06000;LESAO CORPORAL;RUA FERNANDES TO;1020;81271;5/6/2001 15:46:00;CIDADAO COMUM;S;0;LOURDES;BH;610527.63;795180.24;5643
+5645;2001304089;B04001;HOMICIDIO TENTAD;AV DEL REY;155;35381;5/6/2001 17:42:00;CIDADAO COMUM;N;;CAICARA;BH;608155.87;800189.74;5644
+5646;2001304105;B06000;LESAO CORPORAL;RUA RAINHA DAS F;150;92159;5/6/2001 17:54:00;CIDADAO COMUM;N;0;FILADELFIA;BH;602077.15;797500.80;5645
+5647;2001304131;B03000;AMEACA;AV SEN LEVINDO C;3363;14866;5/6/2001 18:06:00;CIDADAO COMUM;S;LJ;CH VALE DO JATOB;BH;601209.33;786916.79;5646
+5648;2001304139;B06000;LESAO CORPORAL;RUA PARA DE MINA;390;52070;5/6/2001 18:09:00;CIDADAO COMUM;S;0;PADRE EUSTAQUIO;BH;606291.28;797707.27;5647
+5649;2001304248;B06000;LESAO CORPORAL;RUA DOMINGOS VIE;587;22660;5/6/2001 19:02:00;CIDADAO COMUM;N;0;SANTA EFIGENIA;BH;612419.49;796795.17;5648
+5650;2001304287;B03000;AMEACA;RUA FRUTAL;379;30060;5/6/2001 19:20:00;CIDADAO COMUM;S;;SANTA EFIGENIA;BH;613747.13;796713.04;5649
+5651;2001304404;B03000;AMEACA;RUA CASA BRANCA;251;13848;5/6/2001 20:22:00;CIDADAO COMUM;S;;POMPEIA;BH;614924.14;798019.77;5650
+5652;2001304472;B04001;HOMICIDIO TENTAD;RUA AMAZONITA;495;3153;5/6/2001 20:58:00;CIDADAO COMUM;S;VITIMA JA SOCORR;POMPEIA;BH;614858.36;797726.26;5651
+5653;2001304477;B06000;LESAO CORPORAL;RUA JEQUIRICA;132;37258;5/6/2001 21:02:00;CIDADAO COMUM;N;0;CONCORDIA;BH;611258.32;799494.73;5652
+5654;2001304478;B06000;LESAO CORPORAL;RUA AGUA COMPRID;63;1508;5/6/2001 21:03:00;CIDADAO COMUM;S;;JARDIM LEBLON;BH;605882.52;808251.63;5653
+5655;2001304484;B04001;HOMICIDIO TENTAD;RUA PEDRO LESSA;100;53117;5/6/2001 21:09:00;INICIATIVA;S;0;LAGOINHA;BH;610197.53;798760.14;5654
+5656;2001304489;B06000;LESAO CORPORAL;RUA DO CAFE;234;11389;5/6/2001 21:11:00;CIDADAO COMUM;N;;SANTA CRUZ (BARR;BH;603108.90;788912.18;5655
+5657;2001304533;B06000;LESAO CORPORAL;RUA MATO GROSSO;457;45200;5/6/2001 21:39:00;INICIATIVA;S;0;BARRO PRETO;BH;610181.58;796806.67;5656
+5658;2001304575;B04002;HOMICIDIO CONSUM;RUA DEZ DE NOVEM;84;20374;5/6/2001 22:02:00;CIDADAO COMUM;S;;SAO TOMAZ;BH;609772.92;805395.37;5657
+5659;2001304582;B03000;AMEACA;AV OTACILIO NEGR;17447;50566;5/6/2001 22:11:00;INICIATIVA;N;0;JARDIM ATLANTICO;BH;607861.37;805251.64;5658
+5660;2001304606;B06000;LESAO CORPORAL;RUA JOAQUIM NABU;122;38121;5/6/2001 22:26:00;CIDADAO COMUM;S;;NOVA SUISSA;BH;606973.16;795764.37;5659
+5661;2001304619;B04002;HOMICIDIO CONSUM;RUA DEPUTADA IVE;100;87325;5/6/2001 22:35:00;CIDADAO COMUM;N;0;PONGELUPE;BH;603758.88;787112.87;5660
+5662;2001304630;B03000;AMEACA;RUA EVORA;136;26950;5/6/2001 22:41:00;CIDADAO COMUM;S;;PRIMAVERA;BH;604493.86;798763.19;5661
+5663;2001304673;B03000;AMEACA;RUA RIBATEJO;112;63058;5/6/2001 23:09:00;CIDADAO COMUM;N;0;SAO FRANCISCO;BH;609796.03;802014.20;5662
+5664;2001304706;B06000;LESAO CORPORAL;AV DO CONTORNO;4470;17228;5/6/2001 23:27:00;CIDADAO COMUM;S;PX50;CENTRO (BH);BH;612554.26;795566.52;5663
+5665;2001304715;B04001;HOMICIDIO TENTAD;RUA DEZESSETE;9;100306;5/6/2001 23:42:00;CIDADAO COMUM;S;;SAO MARCOS;BH;614505.24;802575.32;5664
+5666;2001304796;B03000;AMEACA;RUA VITORIA;5;301511;6/6/2001 00:59:00;INICIATIVA;S;0;SAO LUCAS;BH;613449.25;795834.03;5665
+5667;2001304807;B04001;HOMICIDIO TENTAD;RUA POTOMAIO;658;54920;6/6/2001 01:17:00;INICIATIVA;N;0;SAO GERALDO;BH;615643.99;799123.70;5666
+5668;2001304813;B03000;AMEACA;RUA CAICARA;24;11451;6/6/2001 01:32:00;CIDADAO COMUM;N;;SAO GERALDO;BH;616320.61;799419.93;5667
+5669;2001304818;B03000;AMEACA;RUA CORONEL EGID;415;17690;6/6/2001 01:35:00;INICIATIVA;S;0;SANTA EFIGENIA;BH;614439.06;796945.79;5668
+5670;2001304822;B04001;HOMICIDIO TENTAD;RUA MARIA CARMEM;549;127206;6/6/2001 01:45:00;CIDADAO COMUM;S;BLA     AP304;SANTA EFIGENIA;BH;614141.69;796132.08;5669
+5671;2001304838;B06000;LESAO CORPORAL;AV PRESIDENTE AN;2866;4461;6/6/2001 02:07:00;CIDADAO COMUM;S;;CACHOEIRINHA;BH;609879.81;800682.86;5670
+5672;2001305231;B06000;LESAO CORPORAL;RUA HELGA TAVEIR;530;100693;6/6/2001 09:47:00;CIDADAO COMUM;N;0;CEU AZUL;BH;603941.82;807926.54;5671
+5673;2001305240;B03000;AMEACA;RUA PIRANGUINHO;165;54122;6/6/2001 09:52:00;CIDADAO COMUM;N;;SAO GERALDO;BH;616057.71;799113.24;5672
+5674;2001305249;B03000;AMEACA;AV MEM DE SA;1397;45395;6/6/2001 09:55:00;CIDADAO COMUM;N;PX1397;PARAISO;BH;614236.79;796216.14;5673
+5675;2001305267;B03000;AMEACA;RUA TOME DE SOUZ;395;67998;6/6/2001 10:09:00;CIDADAO COMUM;S;;FUNCIONARIOS;BH;611948.04;795039.05;5674
+5676;2001305270;B03000;AMEACA;AV AFONSO PENA;867;1259;6/6/2001 10:13:00;INICIATIVA;S;0;CENTRO (BH);BH;611254.14;797008.25;5675
+5677;2001305283;B03000;AMEACA;RUA BELMIRO BRAG;1195;8982;6/6/2001 10:18:00;CIDADAO COMUM;S;AP204;ADELAIDE;BH;607026.45;798575.71;5676
+5678;2001305287;B03000;AMEACA;RUA UNIVERSO;680;70961;6/6/2001 10:18:00;CIDADAO COMUM;S;0;COPACABANA;BH;606119.55;806713.20;5677
+5679;2001305446;B03000;AMEACA;AV DO CONTORNO;3219;17228;6/6/2001 11:52:00;INICIATIVA;S;INICIATIVA DO VP;CENTRO (BH);BH;613212.31;796734.16;5678
+5680;2001305554;B03000;AMEACA;RUA DA BAHIA;1596;81155;6/6/2001 13:01:00;CIDADAO COMUM;S;AP202;LOURDES;BH;611120.55;796111.28;5679
+5681;2001305572;B06000;LESAO CORPORAL;AV OLINTO MEIREL;2632;49847;6/6/2001 13:11:00;CIDADAO COMUM;N;0;SANTA CRUZ (BARR;BH;603957.46;789009.43;5680
+5682;2001305579;B06000;LESAO CORPORAL;RUA AGUAS DE LIN;247;40902;6/6/2001 13:18:00;CIDADAO COMUM;N;CAA;ITAIPU BH;BH;599247.70;788871.68;5681
+5683;2001305696;B03000;AMEACA;RUA FRANCISCO LU;71;29514;6/6/2001 14:34:00;CIDADAO COMUM;N;;SANTA CRUZ;BH;610916.00;802176.45;5682
+5684;2001305756;B03000;AMEACA;AV DOM PEDRO II;3337;53145;6/6/2001 15:10:00;CIDADAO COMUM;N;;ADELAIDE;BH;607614.75;797887.86;5683
+5685;2001305843;B03000;AMEACA;RUA ITAPECERICA;685;35757;6/6/2001 15:54:00;CIDADAO COMUM;N;0;LAGOINHA;BH;610477.87;798369.81;5684
+5686;2001305910;B03000;AMEACA;BECO PEDRA VERDE;182;301698;6/6/2001 16:27:00;CIDADAO COMUM;N;;VILA CAFEZAL;BH;614697.65;795170.79;5685
+5687;2001305994;B03000;AMEACA;AV DO CONTORNO;6777;17228;6/6/2001 17:10:00;CIDADAO COMUM;S;;CENTRO (BH);BH;610892.04;794878.43;5686
+5688;2001306024;B03000;AMEACA;RUA CRAVEIRO LOP;860;18489;6/6/2001 17:24:00;CIDADAO COMUM;N;GALPAO EXPOMINAS;GAMELEIRA;BH;605727.56;796248.05;5687
+5689;2001306033;B02000;RIXA;RUA ALEXANDRE MA;324;52789;6/6/2001 17:30:00;CIDADAO COMUM;S;;NOVA CINTRA;BH;606006.18;793576.28;5688
+5690;2001306195;B06000;LESAO CORPORAL;AV PETIT;740;53551;6/6/2001 18:43:00;CIDADAO COMUM;S;FU;NOVA VISTA;BH;615847.28;800394.38;5689
+5691;2001306308;B06000;LESAO CORPORAL;RUA LOTUS;510;100564;6/6/2001 19:47:00;CIDADAO COMUM;S;;BETANIA;BH;604905.14;792400.97;5690
+5692;2001306315;B06000;LESAO CORPORAL;RUA CAPITAO GUST;312;32598;6/6/2001 19:45:00;CIDADAO COMUM;S;0;ADELAIDE;BH;607626.17;798233.85;5691
+5693;2001306384;B06000;LESAO CORPORAL;RUA IMBIACA;95;34206;6/6/2001 20:24:00;CIDADAO COMUM;S;;DOM CABRAL;BH;604742.86;797020.53;5692
+5694;2001306488;B03000;AMEACA;RUA NIQUELINA;1445;47738;6/6/2001 21:17:00;INICIATIVA;S;0;SANTA EFIGENIA;BH;614355.92;797450.36;5693
+5695;2001306523;B03000;AMEACA;AV JOAO XXIII;287;37926;6/6/2001 21:35:00;CIDADAO COMUM;S;;CONJUNTO ALIPIO ;BH;604398.40;799487.39;5694
+5696;2001306643;B04001;HOMICIDIO TENTAD;RUA CORURIPE;177;18233;6/6/2001 22:50:00;CIDADAO COMUM;S;0;NOVA GRANADA;BH;607718.16;795040.31;5695
+5697;2001306647;B06000;LESAO CORPORAL;RUA SEIS;84;86174;6/6/2001 22:55:00;CIDADAO COMUM;N;CA4;JAQUELINE;BH;611389.70;810027.38;5696
+5698;2001306653;B06000;LESAO CORPORAL;AV CECILIA PINTO;11;14447;6/6/2001 23:00:00;CIDADAO COMUM;S;;SAO BERNARDO;BH;610600.26;805253.80;5697
+5699;2001306657;B06000;LESAO CORPORAL;RUA JOAO ALVES T;446;84963;6/6/2001 23:03:00;CIDADAO COMUM;S;0;MANTIQUEIRA;BH;606089.89;810927.39;5698
+5700;2001306660;B06000;LESAO CORPORAL;RUA DAVIDSON PIM;466;124189;6/6/2001 23:04:00;CIDADAO COMUM;S;;TOPAZIO;BH;607497.32;812001.15;5699
+5701;2001306678;B06000;LESAO CORPORAL;RUA CORCOVADO;1614;14894;6/6/2001 23:18:00;INICIATIVA;S;0;SAO DOMINGOS;BH;607706.18;793576.66;5700
+5702;2001306712;B04001;HOMICIDIO TENTAD;RUA GUAICURUS;446;32009;6/6/2001 23:45:00;CIDADAO COMUM;N;0;CENTRO (BH);BH;611231.02;797639.92;5701
+5703;2001306720;B06000;LESAO CORPORAL;RUA DAS TABOADAS;124;300190;6/6/2001 23:51:00;CIDADAO COMUM;S;CSB;SAO JOAO BATISTA;BH;608839.98;808049.60;5702
+5704;2001306736;B09000;ABANDONO DE INCA;RUA FREI ZACARIA;376;37610;7/6/2001 00:03:00;CIDADAO COMUM;S;CAA;SARANDI (URCA/BH;BH;603887.13;802202.26;5703
+5705;2001306746;B03000;AMEACA;RUA ALVARES MACI;591;2756;7/6/2001 00:13:00;POLICIAL MILITAR;S;0;SANTA EFIGENIA;BH;612545.42;796667.48;5704
+5706;2001306768;B03000;AMEACA;RUA MAJOR MESSIA;343;115200;7/6/2001 00:29:00;CIDADAO COMUM;N;0;BANDEIRANTES;BH;604713.16;804349.62;5705
+5707;2001306865;B04001;HOMICIDIO TENTAD;RUA MARIA RITA B;163;121934;7/6/2001 02:36:00;CIDADAO COMUM;S;;INDEPENDENCIA;BH;602335.41;786241.08;5706
+5708;2001306931;B06000;LESAO CORPORAL;RUA DOS CAETES;409;11376;7/6/2001 05:06:00;CIDADAO COMUM;N;PX409;CENTRO (BH);BH;611212.90;797410.52;5707
+5709;2001306986;B03000;AMEACA;RUA ALAIR PEREIR;325;128873;7/6/2001 07:16:00;CIDADAO COMUM;S;;CASTANHEIRAS (TA;BH;617363.96;797160.02;5708
+5710;2001307031;B03000;AMEACA;RUA CABO FRIO;250;82031;7/6/2001 07:49:00;CIDADAO COMUM;S;CAA;SAO GABRIEL;BH;614311.41;804741.76;5709
+5711;2001307062;B08000;VIOLACAO DE DOMI;AV JOSE BONIFACI;189;38579;7/6/2001 08:08:00;CIDADAO COMUM;S;;PRADO LOPES;BH;610210.56;798939.37;5710
+5712;2001307250;B06000;LESAO CORPORAL;AV SILVIANO BRAN;444;66002;7/6/2001 10:07:00;CIDADAO COMUM;S;0;SAGRADA FAMILIA;BH;612009.58;798561.76;5711
+5713;2001307252;B06000;LESAO CORPORAL;RUA ESCRAVO ISID;572;25885;7/6/2001 10:09:00;CIDADAO COMUM;S;;SANTO ANDRE;BH;609868.46;799047.90;5712
+5714;2001307268;B06000;LESAO CORPORAL;RUA H;12;78295;7/6/2001 10:27:00;CIDADAO COMUM;S;0;VILA PINHO;BH;601931.42;788161.20;5713
+5715;2001307358;B03000;AMEACA;RUA CONSELHEIRO ;25;17054;7/6/2001 11:27:00;CIDADAO COMUM;N;;ALTO DOS CAICARA;BH;608118.02;799129.56;5714
+5716;2001307564;B03000;AMEACA;RUA GONCALVES DI;1896;31513;7/6/2001 14:09:00;CIDADAO COMUM;N;;LOURDES;BH;610731.97;795987.14;5715
+5717;2001307635;B04001;HOMICIDIO TENTAD;RUA ITAIPU;787;35439;7/6/2001 14:38:00;INICIATIVA;N;0;VERA CRUZ;BH;616254.15;798399.12;5716
+5718;2001307790;B06000;LESAO CORPORAL;RUA OURO PRETO;573;50730;7/6/2001 16:10:00;INICIATIVA;N;0;BARRO PRETO;BH;609882.70;796735.88;5717
+5719;2001307850;B06000;LESAO CORPORAL;RUA AURELIANO MA;107;6845;7/6/2001 16:39:00;CIDADAO COMUM;S;;PARAISO;BH;615050.99;797005.85;5718
+5720;2001307919;B06000;LESAO CORPORAL;RUA DEPUTADO RAI;147;83438;7/6/2001 17:17:00;CIDADAO COMUM;S;;MARIZE;BH;610957.10;807744.36;5719
+5721;2001307955;B06000;LESAO CORPORAL;RUA JOAO SOARES ;23;74111;7/6/2001 17:32:00;CIDADAO COMUM;S;0;JARDIM DOS COMER;BH;607768.98;811531.53;5720
+5722;2001308062;B03000;AMEACA;RUA ITAQUERA;843;35920;7/6/2001 18:18:00;CIDADAO COMUM;N;0;CONCORDIA;BH;611598.52;799291.25;5721
+5723;2001308099;B03000;AMEACA;RUA ONZE DE DEZE;110;112687;7/6/2001 18:33:00;CIDADAO COMUM;S;CAA;LEONINA;BH;608758.16;793565.97;5722
+5724;2001308173;B03000;AMEACA;RUA CARMELITA PR;722;17316;7/6/2001 19:05:00;CIDADAO COMUM;S;;SALGADO FILHO;BH;606261.79;794694.17;5723
+5725;2001308181;B03000;AMEACA;RUA MANOEL PASSO;450;43160;7/6/2001 19:08:00;CIDADAO COMUM;S;CSA;VILA HUMAITA;BH;610453.77;801846.66;5724
+5726;2001308244;B03000;AMEACA;RUA CUCO;652;90112;7/6/2001 19:33:00;CIDADAO COMUM;S;;GOIANIA;BH;615741.29;803187.70;5725
+5727;2001308250;B03000;AMEACA;AV OLEGARIO MACI;742;49699;7/6/2001 19:36:00;CIDADAO COMUM;S;;LOURDES;BH;610475.34;796973.70;5726
+5728;2001308307;B06000;LESAO CORPORAL;AV OLINTO MEIREL;1500;49847;7/6/2001 20:06:00;CIDADAO COMUM;S;0;MILIONARIOS;BH;603642.11;789991.70;5727
+5729;2001308317;B03000;AMEACA;RUA DR RAUL DE B;9;57956;7/6/2001 20:10:00;INICIATIVA;S;0;CASA BRANCA;BH;616356.49;799755.26;5728
+5730;2001308336;B06000;LESAO CORPORAL;RUA AUGUSTA ANDR;1240;99104;7/6/2001 20:21:00;CIDADAO COMUM;S;REF:PROXIMO FINA;JAQUELINE;BH;611721.24;810630.60;5729
+5731;2001308356;B06000;LESAO CORPORAL;RUA CAMPINA VERD;312;12110;7/6/2001 20:34:00;CIDADAO COMUM;S;0;SALGADO FILHO;BH;606172.49;794445.71;5730
+5732;2001308400;B03000;AMEACA;RUA NELSON SOARE;235;47463;7/6/2001 20:53:00;CIDADAO COMUM;S;0;CIDADE NOVA;BH;612344.14;800069.91;5731
+5733;2001308423;B03000;AMEACA;AV ARTUR GUIMARA;1010;6151;7/6/2001 21:05:00;CIDADAO COMUM;S;;SANTA CRUZ;BH;610759.65;802050.82;5732
+5734;2001308424;B06000;LESAO CORPORAL;RUA SERRA DOS OR;138;40578;7/6/2001 21:05:00;CIDADAO COMUM;S;;ANTONIO RIBEIRO ;BH;615451.58;807727.88;5733
+5735;2001308484;B03000;AMEACA;RUA JACUI;2722;36734;7/6/2001 21:40:00;CIDADAO COMUM;N;;NOVA FLORESTA;BH;611430.18;800387.15;5734
+5736;2001308533;B06000;LESAO CORPORAL;RUA DAS DRACENAS;427;33461;7/6/2001 22:03:00;CIDADAO COMUM;N;;LINDEIA;BH;598862.48;790625.78;5735
+5737;2001308701;B06000;LESAO CORPORAL;AV A;679;34099;7/6/2001 23:55:00;CIDADAO COMUM;N;;CONJUNTO FELICID;BH;612341.99;807254.84;5736
+5738;2001308802;B03000;AMEACA;RUA AUGUSTUS WIL;321;50090;8/6/2001 01:14:00;CIDADAO COMUM;S;;SANTA AMELIA;BH;607670.65;806516.20;5737
+5739;2001308803;B06000;LESAO CORPORAL;RUA JOAO LUIZ DE;360;37765;8/6/2001 01:15:00;CIDADAO COMUM;S;0;NOVA CACHOEIRINH;BH;609312.42;800902.42;5738
+5740;2001308967;B03000;AMEACA;AV PARANA;122;52230;8/6/2001 06:07:00;INICIATIVA;N;0;CENTRO (BH);BH;610785.23;797422.18;5739
+5741;2001309085;B03000;AMEACA;RUA CACHOEIRA DO;328;11234;8/6/2001 08:10:00;POLICIAL CIVIL;N;0;SANTA EFIGENIA;BH;614546.78;797375.65;5740
+5742;2001309250;B03000;AMEACA;AV URUGUAI;335;71113;8/6/2001 09:38:00;CIDADAO COMUM;S;SL14;SION;BH;611750.13;793745.62;5741
+5743;2001309509;B06000;LESAO CORPORAL;AV ERICO VERISSI;777;41671;8/6/2001 12:12:00;INICIATIVA;N;0;CANDELARIA;BH;607923.53;808663.31;5742
+5744;2001309569;B06000;LESAO CORPORAL;RUA AMANDA;350;91317;8/6/2001 12:53:00;CIDADAO COMUM;N;;CONJUNTO VISTA A;BH;605638.25;792913.17;5743
+5745;2001309636;B03000;AMEACA;RUA CARAVELAS;191;13141;8/6/2001 13:39:00;CIDADAO COMUM;S;CA1;VERA CRUZ;BH;615541.02;798435.24;5744
+5746;2001309686;B06000;LESAO CORPORAL;RUA GUAICURUS;451;32009;8/6/2001 14:14:00;CIDADAO COMUM;N;PX428;CENTRO (BH);BH;611210.22;797600.57;5745
+5747;2001309744;B03000;AMEACA;BECO PRIMEIRO DE;75;302438;8/6/2001 14:51:00;INICIATIVA;S;0;MANTIQUEIRA;BH;607062.15;811576.33;5746
+5748;2001309976;B03000;AMEACA;RUA BARBOSA;39;51178;8/6/2001 17:00:00;CIDADAO COMUM;N;0;COQUEIROS;BH;603046.78;799686.07;5747
+5749;2001309980;B06000;LESAO CORPORAL;RUA PONTE NOVA;888;54655;8/6/2001 17:03:00;CIDADAO COMUM;N;;FLORESTA;BH;611744.63;798218.29;5748
+5750;2001310074;B03000;AMEACA;RUA DOS GOITACAZ;771;31400;8/6/2001 18:01:00;CIDADAO COMUM;N;0;CENTRO (BH);BH;610520.96;796873.90;5749
+5751;2001310083;B03000;AMEACA;RUA JACUI;2722;36734;8/6/2001 18:04:00;CIDADAO COMUM;N;CASA 08;NOVA FLORESTA;BH;611430.18;800387.15;5750
+5752;2001310141;B06000;LESAO CORPORAL;RUA I;295;41454;8/6/2001 18:34:00;CIDADAO COMUM;S;;CH CONFISCO;BH;602797.84;802986.83;5751
+5753;2001310154;B06000;LESAO CORPORAL;RUA PROFESSOR MA;697;42498;8/6/2001 18:39:00;CIDADAO COMUM;S;CJ901;LIBERDADE;BH;609041.43;803974.87;5752
+5754;2001310310;B06000;LESAO CORPORAL;RUA DES SARAIVA;1075;66535;8/6/2001 20:03:00;CIDADAO COMUM;S;CS1;VERA CRUZ;BH;616101.45;797681.72;5753
+5755;2001310334;B06000;LESAO CORPORAL;RUA CAMILO DE BR;636;11896;8/6/2001 20:18:00;CIDADAO COMUM;S;;PADRE EUSTAQUIO;BH;605855.99;798012.24;5754
+5756;2001310337;B04002;HOMICIDIO CONSUM;AV OTACILIO NEGR;17676;50566;8/6/2001 20:18:00;CIDADAO COMUM;N;0;JARDIM ATLANTICO;BH;607848.71;805488.96;5755
+5757;2001310355;B03000;AMEACA;RUA CARLOS PINTO;325;107220;8/6/2001 20:32:00;CIDADAO COMUM;S;;CH JATOBA IV;BH;600627.32;787544.42;5756
+5758;2001310454;B03000;AMEACA;RUA RAIMUNDO TIN;50;301229;8/6/2001 21:29:00;INICIATIVA;S;0;MORRO DO PAPAGAI;BH;610762.74;793311.54;5757
+5759;2001310655;B04001;HOMICIDIO TENTAD;RUA POUSO ALEGRE;94;54932;8/6/2001 23:15:00;CIDADAO COMUM;S;0;FLORESTA;BH;611136.07;797991.21;5758
+5760;2001310678;B04001;HOMICIDIO TENTAD;ESTRADA DO CERCA;1035;26428;8/6/2001 23:29:00;INICIATIVA;0;0;JARDIM AMERICA;BH;607094.07;794616.79;5759
+5761;2001310683;B03000;AMEACA;RUA RENATO GONCA;31;14475;8/6/2001 23:32:00;CIDADAO COMUM;S;0;DOM JOAQUIM;BH;613661.46;801938.79;5760
+5762;2001310706;B06000;LESAO CORPORAL;RUA BRUGES;190;86694;8/6/2001 23:44:00;CIDADAO COMUM;N;;JARDIM EUROPA;BH;608594.89;810230.41;5761
+5763;2001310715;B06000;LESAO CORPORAL;RUA FRANCISCO BI;2370;29353;8/6/2001 23:51:00;INICIATIVA;S;;ADELAIDE;BH;607087.54;798984.64;5762
+5764;2001310746;B04001;HOMICIDIO TENTAD;RUA FERNAO DIAS;771;28133;9/6/2001 00:07:00;INICIATIVA;S;INICIATIVA DO HT;CAETANO FURQUIM;BH;615918.16;799039.80;5763
+5765;2001310802;B06000;LESAO CORPORAL;AV PRESIDENTE AN;191;4461;9/6/2001 00:43:00;POLICIAL MILITAR;S;;LAGOINHA;BH;610755.18;798205.83;5764
+5766;2001310805;B04001;HOMICIDIO TENTAD;RUA TREZE DE SET;180;69168;9/6/2001 00:43:00;CIDADAO COMUM;N;REF:FINAL 9202;LEONINA;BH;608442.23;793344.13;5765
+5767;2001310871;B04002;HOMICIDIO CONSUM;RUA QUELUZITA;12;40915;9/6/2001 01:32:00;CIDADAO COMUM;N;0;SAO PAULO;BH;612785.37;802514.84;5766
+5768;2001310879;B06000;LESAO CORPORAL;RUA ARIOLINO ARI;159;85811;9/6/2001 01:38:00;CIDADAO COMUM;N;;SERRA VERDE;BH;609207.39;810119.05;5767
+5769;2001310902;B03000;AMEACA;RUA RIO DE JANEI;842;58772;9/6/2001 01:55:00;CIDADAO COMUM;S;FR842;CENTRO (BH);BH;611039.08;796883.84;5768
+5770;2001310942;B04002;HOMICIDIO CONSUM;RUA TRES MARIAS;32;68833;9/6/2001 02:26:00;CIDADAO COMUM;N;0;SANTA CRUZ (BARR;BH;603509.09;788918.41;5769
+5771;2001310981;B06000;LESAO CORPORAL;RUA DOS GUAJAJAR;1022;32037;9/6/2001 02:53:00;INICIATIVA;S;INICIATIVA POV6.;CENTRO BH;BH;610486.05;796628.40;5770
+5772;2001310986;B03000;AMEACA;RUA QUARENTA E U;102;34801;9/6/2001 02:58:00;CIDADAO COMUM;N;;CONJUNTO FELICID;BH;612521.64;807196.19;5771
+5773;2001311035;B06000;LESAO CORPORAL;RUA ALMIRANTE AL;700;2494;9/6/2001 03:46:00;INICIATIVA;S;0;GUTIERREZ;BH;609108.08;795079.04;5772
+5774;2001311042;B06000;LESAO CORPORAL;RUA DAS PRINCESA;367;55330;9/6/2001 03:50:00;CIDADAO COMUM;S;;VILA OESTE;BH;603936.55;795087.90;5773
+5775;2001311043;B06000;LESAO CORPORAL;RUA SERGIPE;1221;64961;9/6/2001 03:50:00;CIDADAO COMUM;S;;FUNCIONARIOS;BH;611202.39;795153.85;5774
+5776;2001311055;B03000;AMEACA;RUA ESPIRITO SAN;946;26052;9/6/2001 04:01:00;CIDADAO COMUM;S;AP301;CENTRO (BH);BH;611138.96;796746.01;5775
+5777;2001311072;B06000;LESAO CORPORAL;AV JEQUITINHONHA;231;37305;9/6/2001 04:15:00;INICIATIVA;N;0;VERA CRUZ;BH;615747.31;798399.78;5776
+5778;2001311117;B06000;LESAO CORPORAL;RUA CONSELHEIRO ;3929;17095;9/6/2001 05:02:00;INICIATIVA;N;0;SAGRADA FAMILIA;BH;613749.08;798435.50;5777
+5779;2001311135;B06000;LESAO CORPORAL;AV DOS ANDRADAS;364;3761;9/6/2001 05:23:00;CIDADAO COMUM;S;;CENTRO (BH);BH;611480.30;797265.49;5778
+5780;2001311248;B02000;RIXA;RUA PADRE PEDRO ;2630;51657;9/6/2001 08:06:00;CIDADAO COMUM;S;;JARDIM EUROPA;BH;607686.72;809797.55;5779
+5781;2001311338;B04001;HOMICIDIO TENTAD;RUA JEQUIRICA;357;37258;9/6/2001 09:03:00;CIDADAO COMUM;N;CAC;CONCORDIA;BH;611192.98;799637.47;5780
+5782;2001311399;B03000;AMEACA;RUA SAO LAZARO;70;63219;9/6/2001 09:51:00;CIDADAO COMUM;S;FUNDOS;SAGRADA FAMILIA;BH;612389.37;798744.88;5781
+5783;2001311455;B03000;AMEACA;RUA OTAVIANO PEN;549;128454;9/6/2001 10:31:00;CIDADAO COMUM;S;0;SERRA VERDE;BH;609655.77;810567.19;5782
+5784;2001311507;B06000;LESAO CORPORAL;RUA JACUI;487;36734;9/6/2001 11:10:00;CIDADAO COMUM;N;0;FLORESTA;BH;611774.16;798289.34;5783
+5785;2001311529;B06000;LESAO CORPORAL;AV AUGUSTO DE LI;345;6731;9/6/2001 11:26:00;INICIATIVA;N;0;CENTRO (BH);BH;611069.26;796574.94;5784
+5786;2001311536;B06000;LESAO CORPORAL;AV VILARINHOS;2640;109988;9/6/2001 11:30:00;CIDADAO COMUM;S;;JARDIM EUROPA;BH;607859.01;809852.86;5785
+5787;2001311570;B06000;LESAO CORPORAL;RUA DEZESSETE;291;32862;9/6/2001 11:56:00;CIDADAO COMUM;N;CAA;CONJUNTO FELICID;BH;612252.68;807568.31;5786
+5788;2001311574;B06000;LESAO CORPORAL;RUA EXPEDITO RIB;406;41467;9/6/2001 11:58:00;CIDADAO COMUM;S;;VILA SUZANA;BH;611755.26;803117.98;5787
+5789;2001311597;B03000;AMEACA;AV NOSSA SENHORA;316;48311;9/6/2001 12:14:00;CIDADAO COMUM;S;0;PRIMEIRO DE NOVE;BH;612821.93;805191.13;5788
+5790;2001311689;B06000;LESAO CORPORAL;RUA PARA DE MINA;275;52070;9/6/2001 13:21:00;CIDADAO COMUM;N;0;PADRE EUSTAQUIO;BH;606411.19;797635.97;5789
+5791;2001311721;B03000;AMEACA;AV AMERICO VESPU;954;3355;9/6/2001 13:37:00;CIDADAO COMUM;S;CAA;APARECIDA;BH;609067.36;800150.52;5790
+5792;2001311724;B03000;AMEACA;RUA DES BARCELOS;450;19904;9/6/2001 13:39:00;CIDADAO COMUM;S;;NOVA SUISSA;BH;607399.05;796128.14;5791
+5793;2001311814;B03000;AMEACA;AV CRISTIANO MAC;2000;18652;9/6/2001 14:43:00;CIDADAO COMUM;S;0;CIDADE NOVA;BH;612196.70;800379.26;5792
+5794;2001311829;B02000;RIXA;RUA AUGUSTO FRAN;300;69230;9/6/2001 14:51:00;CIDADAO COMUM;N;0;SAO JOAO BATISTA;BH;608837.25;807592.10;5793
+5795;2001311830;B06000;LESAO CORPORAL;AV PRESIDENTE TA;746;35366;9/6/2001 14:55:00;CIDADAO COMUM;N;0;JARDIM MONTANHES;BH;605537.23;799893.01;5794
+5796;2001311831;B04001;HOMICIDIO TENTAD;RUA BRAGANCA;2;109092;9/6/2001 14:56:00;CIDADAO COMUM;N;CA02;COQUEIROS;BH;602175.97;799441.69;5795
+5797;2001311853;B03000;AMEACA;RUA ALCIDES PERE;236;107711;9/6/2001 15:06:00;CIDADAO COMUM;N;;MANTIQUEIRA;BH;606777.90;811900.92;5796
+5798;2001311954;B03000;AMEACA;RUA KIMBERLITA;201;57190;9/6/2001 16:07:00;CIDADAO COMUM;S;;SANTA TEREZA;BH;613732.10;797577.05;5797
+5799;2001311969;B06000;LESAO CORPORAL;RUA JUIZ ELYSEU ;285;62588;9/6/2001 16:14:00;CIDADAO COMUM;S;0;DAS INDUSTRIAS;BH;603441.90;792866.98;5798
+5800;2001311977;B03000;AMEACA;RUA SAO LAZARO;70;63219;9/6/2001 16:17:00;CIDADAO COMUM;N;;SAGRADA FAMILIA;BH;612389.37;798744.88;5799
+5801;2001312028;B06000;LESAO CORPORAL;RUA PROFESSOR ZI;317;55718;9/6/2001 16:46:00;CIDADAO COMUM;N;;MINAS BRASIL;BH;605757.79;797222.69;5800
+5802;2001312052;B06000;LESAO CORPORAL;RUA GUARAREMA;65;111010;9/6/2001 17:04:00;CIDADAO COMUM;N;CAA;CACHOEIRINHA;BH;610247.41;801060.78;5801
+5803;2001312055;B06000;LESAO CORPORAL;RUA FARMACEUTICO;16;61733;9/6/2001 17:06:00;CIDADAO COMUM;S;;NOVA CINTRA;BH;605821.57;793571.67;5802
+5804;2001312057;B03000;AMEACA;RUA CARLOS DE LA;46;13371;9/6/2001 17:06:00;CIDADAO COMUM;N;0;SANTA MONICA;BH;607983.09;807505.27;5803
+5805;2001312076;B06000;LESAO CORPORAL;RUA ESCRITOR HUM;9;129659;9/6/2001 17:14:00;CIDADAO COMUM;N;;TUPI;BH;613614.95;806792.88;5804
+5806;2001312081;B06000;LESAO CORPORAL;AV PRESIDENTE AN;7267;4461;9/6/2001 17:18:00;CIDADAO COMUM;N;;LIBERDADE;BH;608919.61;803884.14;5805
+5807;2001312151;B03000;AMEACA;RUA CARMELA ALUO;259;13558;9/6/2001 17:57:00;CIDADAO COMUM;N;0;BONSUCESSO;BH;605218.59;789645.48;5806
+5808;2001312184;B03000;AMEACA;RUA PONTA GROSSA;200;14900;9/6/2001 18:10:00;CIDADAO COMUM;N;0;ARAGUAIA;BH;604860.92;789716.01;5807
+5809;2001312219;B03000;AMEACA;RUA CASTRO ALVES;232;14103;9/6/2001 18:28:00;CIDADAO COMUM;N;A;COPACABANA;BH;605790.25;806502.86;5808
+5810;2001312285;B06000;LESAO CORPORAL;AV DOS JARDINS;409;117290;9/6/2001 19:05:00;CIDADAO COMUM;N;;LINDEIA;BH;599962.61;790648.30;5809
+5811;2001312309;B03000;AMEACA;RUA PALESTINA;50;51861;9/6/2001 19:15:00;CIDADAO COMUM;S;;SAO SALVADOR;BH;603317.09;799323.41;5810
+5812;2001312310;B06000;LESAO CORPORAL;RUA LUCIA MIGUEL;383;41555;9/6/2001 19:15:00;POLICIAL MILITAR;S;0;TUPI;BH;612536.99;806309.34;5811
+5813;2001312365;B06000;LESAO CORPORAL;RUA 18;32;21828;9/6/2001 19:42:00;CIDADAO COMUM;S;0;JARDIM DOS COMER;BH;608204.82;811136.31;5812
+5814;2001312436;B06000;LESAO CORPORAL;RUA STA RITA DUR;759;61270;9/6/2001 20:19:00;CIDADAO COMUM;S;AP201;FUNCIONARIOS;BH;611737.20;795391.37;5813
+5815;2001312482;B04001;HOMICIDIO TENTAD;RUA PROFESSOR CO;284;57310;9/6/2001 20:48:00;POLICIAL MILITAR;S;;PLANALTO;BH;609325.21;806811.45;5814
+5816;2001312528;B06000;LESAO CORPORAL;RUA CURITIBANOS;837;19107;9/6/2001 21:18:00;CIDADAO COMUM;S;;JARDIM AMERICA;BH;607514.33;793818.10;5815
+5817;2001312559;B06000;LESAO CORPORAL;AV DO CONTORNO;5602;17228;9/6/2001 21:34:00;CIDADAO COMUM;S;;CARMO;BH;611910.43;794907.67;5816
+5818;2001312574;B03000;AMEACA;RUA ZOROASTRO DE;54;74064;9/6/2001 21:43:00;CIDADAO COMUM;S;;DOM BOSCO;BH;604415.82;797027.21;5817
+5819;2001312602;B06000;LESAO CORPORAL;RUA ARTHUR LUCCH;730;83277;9/6/2001 21:56:00;CIDADAO COMUM;N;0;SANTA HELENA (BH;BH;603564.41;789534.30;5818
+5820;2001312631;B06000;LESAO CORPORAL;RUA LAURA SOARES;240;100867;9/6/2001 22:13:00;CIDADAO COMUM;S;0;FLORAMAR;BH;611217.50;807328.23;5819
+5821;2001312667;B04001;HOMICIDIO TENTAD;AV CRISTIANO MAC;4000;18652;9/6/2001 22:33:00;INICIATIVA;S;0;DOS PALMARES;BH;612434.91;802092.92;5820
+5822;2001312712;B04001;HOMICIDIO TENTAD;RUA ALTINOPOLIS;585;36296;9/6/2001 23:01:00;CIDADAO COMUM;S;;PIRATININGA;BH;605592.82;809341.84;5821
+5823;2001312745;B04001;HOMICIDIO TENTAD;RUA PAPOULA AZUL;51;119774;9/6/2001 23:21:00;CIDADAO COMUM;S;;HAVAI;BH;606864.21;793618.62;5822
+5824;2001312792;B04002;HOMICIDIO CONSUM;RUA ANAPURUS;600;20894;9/6/2001 23:48:00;CIDADAO COMUM;N;0;SAO GABRIEL;BH;613458.94;804196.63;5823
+5825;2001312851;B06000;LESAO CORPORAL;RUA CAVAQUINHO;15;301465;10/6/2001 00:31:00;CIDADAO COMUM;S;0;VILA CAFEZAL;BH;614161.77;795395.78;5824
+5826;2001312904;B03000;AMEACA;RUA DINIS DIAS;145;119673;10/6/2001 01:13:00;CIDADAO COMUM;S;;VERA CRUZ;BH;616573.20;797526.82;5825
+5827;2001312925;B06000;LESAO CORPORAL;RUA J;320;47350;10/6/2001 01:26:00;CIDADAO COMUM;S;;VILA CASTANHEIRA;BH;601249.95;788553.98;5826
+5828;2001312937;B04001;HOMICIDIO TENTAD;RUA JOSE BARBOSA;197;85304;10/6/2001 01:34:00;CIDADAO COMUM;S;;JAQUELINE;BH;610514.81;810125.87;5827
+5829;2001312972;B06000;LESAO CORPORAL;RUA BETULA;90;9500;10/6/2001 01:53:00;CIDADAO COMUM;N;;ARAGUAIA;BH;604981.38;789649.75;5828
+5830;2001312987;B03000;AMEACA;RUA URSULA PAULI;985;71066;10/6/2001 02:01:00;CIDADAO COMUM;S;;BETANIA;BH;606238.79;793107.91;5829
+5831;2001313063;B04001;HOMICIDIO TENTAD;RUA TIRADENTES;80;85607;10/6/2001 02:53:00;CIDADAO COMUM;S;;ALVORADA;BH;615497.04;802314.39;5830
+5832;2001313122;B04002;HOMICIDIO CONSUM;RUA SAO GERALDO;10;170283;10/6/2001 03:31:00;CIDADAO COMUM;N;0;CABANA;BH;604668.39;794124.46;5831
+5833;2001313145;B03000;AMEACA;RUA DA BAHIA;479;81155;10/6/2001 03:53:00;CIDADAO COMUM;S;0;CENTRO (BH);BH;611431.82;797150.49;5832
+5834;2001313165;B06000;LESAO CORPORAL;RUA GUAICURUS;690;32009;10/6/2001 04:08:00;INICIATIVA;N;0;CENTRO BH;BH;611000.88;797693.04;5833
+5835;2001313315;B03000;AMEACA;RUA FRANCISCA LE;212;29441;10/6/2001 07:58:00;INICIATIVA;N;0;UNIAO;BH;613207.57;800943.92;5834
+5836;2001313329;B04001;HOMICIDIO TENTAD;RUA AVELINO DOS ;132;6990;10/6/2001 08:13:00;CIDADAO COMUM;S;;SANTO ANDRE;BH;608938.77;798986.00;5835
+5837;2001313355;B06000;LESAO CORPORAL;RUA JOAO NEPOMUC;83;124176;10/6/2001 08:36:00;INICIATIVA;S;INIC.VP5867;JARDIM DOS COMER;BH;607184.27;811813.31;5836
+5838;2001313365;B04001;HOMICIDIO TENTAD;RUA JOAQUINA ANG;151;84761;10/6/2001 08:47:00;CIDADAO COMUM;N;PANIFICADORA BRA;DA LAGOA;BH;604460.97;809500.24;5837
+5839;2001313408;B06000;LESAO CORPORAL;AV ERICO VERISSI;1001;41671;10/6/2001 09:28:00;CIDADAO COMUM;N;AP301;SANTA MONICA;BH;607738.22;808727.73;5838
+5840;2001313549;B03000;AMEACA;RUA GERALDO RIBE;127;43680;10/6/2001 11:24:00;CIDADAO COMUM;S;CAA;NOVO GLORIA;BH;603097.99;798785.86;5839
+5841;2001313561;B03000;AMEACA;RUA TRES;98;32301;10/6/2001 11:36:00;CIDADAO COMUM;N;;CONJUNTO FELICID;BH;612209.41;807411.82;5840
+5842;2001313598;B03000;AMEACA;RUA FLORESTAL;36;123611;10/6/2001 12:04:00;CIDADAO COMUM;N;;INSTITUTO AGRONO;BH;613828.23;799199.35;5841
+5843;2001313650;B03000;AMEACA;AV CORONEL DURVA;860;17688;10/6/2001 12:46:00;CIDADAO COMUM;S;;DURVAL DE BARROS;BH;598151.28;790894.64;5842
+5844;2001313720;B03000;AMEACA;RUA PROFESSOR MA;637;42498;10/6/2001 13:32:00;CIDADAO COMUM;S;;SAO LUIZ;BH;609027.03;804041.57;5843
+5845;2001313735;B03000;AMEACA;RUA RIO DE JANEI;430;58772;10/6/2001 13:43:00;INICIATIVA;N;0;CENTRO (BH);BH;611148.38;797276.61;5844
+5846;2001313791;B04001;HOMICIDIO TENTAD;RUA SEBASTIAO MO;390;93555;10/6/2001 14:36:00;INICIATIVA;S;0;TIROL;BH;600537.35;789420.62;5845
+5847;2001313803;B03000;AMEACA;RUA VIOLETA DE M;430;80253;10/6/2001 14:44:00;CIDADAO COMUM;S;BECO SAO JOAO;SAO JOSE;BH;604587.45;799319.51;5846
+5848;2001313812;B03000;AMEACA;RUA SANTO ANDRE;55;26282;10/6/2001 14:56:00;CIDADAO COMUM;S;CAB;TAQUARIL;BH;617350.27;797630.94;5847
+5849;2001313846;B06000;LESAO CORPORAL;RUA MARCO AURELI;137;61821;10/6/2001 15:15:00;CIDADAO COMUM;S;CAA;NAZARE;BH;615636.15;804705.79;5848
+5850;2001313934;B06000;LESAO CORPORAL;RUA CRUZEIRO DO ;170;18927;10/6/2001 15:57:00;CIDADAO COMUM;N;0;SANTA HELENA (BH;BH;603493.85;789033.21;5849
+5851;2001313947;B03000;AMEACA;RUA WALDEMAR FAL;92;36429;10/6/2001 16:02:00;CIDADAO COMUM;S;0;PLANALTO;BH;610846.65;806603.67;5850
+5852;2001313989;B03000;AMEACA;RUA PURUS;668;55819;10/6/2001 16:22:00;CIDADAO COMUM;S;;CONCORDIA;BH;610705.32;799540.90;5851
+5853;2001313990;B06000;LESAO CORPORAL;RUA GALENA;79;30491;10/6/2001 16:22:00;CIDADAO COMUM;S;AP01;LAGOINHA;BH;611030.10;798682.21;5852
+5854;2001313995;B03000;AMEACA;AV BIAS FORTES;1526;9553;10/6/2001 16:26:00;CIDADAO COMUM;S;0;BARRO PRETO;BH;610343.53;796985.22;5853
+5855;2001314100;B03000;AMEACA;AV AUGUSTO DE LI;1324;6731;10/6/2001 17:16:00;CIDADAO COMUM;S;AP701;BARRO PRETO;BH;610063.55;796892.75;5854
+5856;2001314150;B06000;LESAO CORPORAL;RUA JOVIANO COEL;55;39294;10/6/2001 17:35:00;CIDADAO COMUM;S;;RIO BRANCO;BH;606857.20;808664.47;5855
+5857;2001314246;B04001;HOMICIDIO TENTAD;RUA DOUTOR CRIST;390;55598;10/6/2001 18:19:00;CIDADAO COMUM;S;;ARAGUAIA;BH;604864.19;789415.74;5856
+5858;2001314279;B06000;LESAO CORPORAL;RUA STO ANTONIO;207;61759;10/6/2001 18:36:00;CIDADAO COMUM;S;0;SAO TOMAZ;BH;609983.70;805566.23;5857
+5859;2001314296;B02000;RIXA;RUA CALDAS DA RA;575;61100;10/6/2001 18:46:00;CIDADAO COMUM;N;CAFU;SAO FRANCISCO;BH;609793.95;802422.17;5858
+5860;2001314303;B06000;LESAO CORPORAL;RUA CARMO DA MAT;644;13661;10/6/2001 18:47:00;CIDADAO COMUM;N;;VERA CRUZ;BH;615391.83;797554.64;5859
+5861;2001314331;B03000;AMEACA;AV SILVA LOBO;1035;65889;10/6/2001 19:00:00;INICIATIVA;N;0;NOVA GRANADA;BH;607680.38;795529.41;5860
+5862;2001314355;B06000;LESAO CORPORAL;RUA MARMORE;588;44695;10/6/2001 19:13:00;INICIATIVA;N;0;SANTA TEREZA;BH;613395.01;797414.73;5861
+5863;2001314372;B03000;AMEACA;RUA GERALDO FRAN;45;86060;10/6/2001 19:21:00;CIDADAO COMUM;S;;JAQUELINE;BH;611229.28;810256.18;5862
+5864;2001314382;B03000;AMEACA;RUA MONTE SIAO;573;46559;10/6/2001 19:25:00;INICIATIVA;N;0;SERRA;BH;613412.29;795061.49;5863
+5865;2001314428;B06000;LESAO CORPORAL;RUA FERNAO DIAS;840;28133;10/6/2001 19:46:00;INICIATIVA;S;0;CAETANO FURQUIM;BH;615877.50;799055.02;5864
+5866;2001314431;B02000;RIXA;RUA EDNA BRANDAO;75;99160;10/6/2001 19:47:00;INICIATIVA;S;0;SANTA AMELIA;BH;606976.14;805701.15;5865
+5867;2001314449;B02000;RIXA;RUA JOSE DE OLIV;72;63161;10/6/2001 19:58:00;CIDADAO COMUM;S;;ARAGUAIA;BH;604164.27;789183.07;5866
+5868;2001314488;B05000;SEQUESTRO E CARC;RUA VERONA;261;71661;10/6/2001 20:12:00;CIDADAO COMUM;S;;BANDEIRANTES;BH;605870.97;803359.12;5867
+5869;2001314508;B06000;LESAO CORPORAL;AV TERESA CRISTI;869;67512;10/6/2001 20:24:00;CIDADAO COMUM;S;0;CARLOS PRATES;BH;608268.22;797339.78;5868
+5870;2001314523;B03000;AMEACA;RUA JOSE JACINTO;270;67538;10/6/2001 20:31:00;CIDADAO COMUM;S;;DAS INDUSTRIAS;BH;604623.93;791960.37;5869
+5871;2001314617;B06000;LESAO CORPORAL;AV ERICO VERISSI;561;41671;10/6/2001 21:25:00;INICIATIVA;N;0;CANDELARIA;BH;608128.88;808577.02;5870
+5872;2001314649;B03000;AMEACA;RUA ADAMINA;234;993;10/6/2001 21:38:00;CIDADAO COMUM;N;CSA;SANTA TEREZA;BH;613193.20;797342.09;5871
+5873;2001314738;B06000;LESAO CORPORAL;AV PRESIDENTE CA;3001;55125;10/6/2001 22:31:00;CIDADAO COMUM;S;;CAICARA;BH;608178.06;800324.32;5872
+5874;2001314752;B04001;HOMICIDIO TENTAD;RUA SAO FELICISS;51;62373;10/6/2001 22:44:00;CIDADAO COMUM;S;;ESTRELA DO ORIEN;BH;605772.68;792439.17;5873
+5875;2001314780;B04001;HOMICIDIO TENTAD;RUA SAO TOMAS DE;739;63782;10/6/2001 23:03:00;CIDADAO COMUM;S;0;MORRO DO PAPAGAI;BH;610819.02;793333.13;5874
+5876;2001314795;B03000;AMEACA;RUA NARCISA PERE;90;78720;10/6/2001 23:11:00;CIDADAO COMUM;N;0;CH JATOBA IV;BH;600614.17;787750.61;5875
+5877;2001314946;B04001;HOMICIDIO TENTAD;RUA PADRE PETROL;31;53577;11/6/2001 01:22:00;INICIATIVA;S;0;SAGRADA FAMILIA;BH;612764.71;799184.30;5876
+5878;2001315078;B06000;LESAO CORPORAL;AV AFONSO PENA;398;1259;11/6/2001 05:06:00;CIDADAO COMUM;S;PX398;CENTRO (BH);BH;610976.65;797364.82;5877
+5879;2001315356;B06000;LESAO CORPORAL;RUA NILOPOLIS;50;87441;11/6/2001 09:52:00;INICIATIVA;S;0;PILAR;BH;608050.29;788327.07;5878
+5880;2001315390;B03000;AMEACA;RUA CLARA;31;171840;11/6/2001 10:08:00;CIDADAO COMUM;N;;VILA CEMIG;BH;605580.88;788660.00;5879
+5881;2001315428;B06000;LESAO CORPORAL;RUA PIUMA;413;92855;11/6/2001 10:31:00;CIDADAO COMUM;N;;SAO SALVADOR;BH;602763.71;799950.93;5880
+5882;2001315497;B06000;LESAO CORPORAL;RUA DOS APIACAS;76;5032;11/6/2001 11:20:00;CIDADAO COMUM;S;0;GLORIA;BH;602560.03;798017.10;5881
+5883;2001315634;B03000;AMEACA;RUA MARIA APAREC;77;116849;11/6/2001 13:12:00;CIDADAO COMUM;S;0;SANTA CRUZ;BH;610181.84;802182.01;5882
+5884;2001315672;B03000;AMEACA;RUA MARIA APAREC;115;43853;11/6/2001 13:42:00;POLICIAL MILITAR;N;0;SAO MARCOS;BH;613924.81;802705.15;5883
+5885;2001315799;B06000;LESAO CORPORAL;RUA FREI GASPAR;157;29886;11/6/2001 15:14:00;CIDADAO COMUM;S;0;CABANA;BH;604297.25;794201.39;5884
+5886;2001315820;B03000;AMEACA;RUA SEBASTIAO EV;55;100104;11/6/2001 15:29:00;CIDADAO COMUM;S;;SAO MARCOS;BH;614617.98;802826.35;5885
+5887;2001315851;B06000;LESAO CORPORAL;RUA HUMBERTO DE ;581;33590;11/6/2001 15:46:00;CIDADAO COMUM;S;;COPACABANA;BH;606089.56;807059.06;5886
+5888;2001316035;B06000;LESAO CORPORAL;RUA CINCO DE JAN;6;119604;11/6/2001 17:24:00;CIDADAO COMUM;N;;SAO GERALDO;BH;616273.08;799779.17;5887
+5889;2001316103;B03000;AMEACA;AV DOM PEDRO II;4155;53145;11/6/2001 17:55:00;CIDADAO COMUM;S;CAFU;PADRE EUSTAQUIO;BH;606790.98;797901.91;5888
+5890;2001316117;B06000;LESAO CORPORAL;RUA BRANDAO;32;10360;11/6/2001 18:03:00;CIDADAO COMUM;S;0;EYMARD;BH;613565.17;803366.01;5889
+5891;2001316141;B06000;LESAO CORPORAL;RUA MARIA AMELIA;520;43812;11/6/2001 18:16:00;CIDADAO COMUM;S;;SAO BERNARDO;BH;610736.86;805313.62;5890
+5892;2001316202;B03000;AMEACA;RUA MEDEIA;143;64426;11/6/2001 18:49:00;CIDADAO COMUM;S;A;VILA CAPRI;BH;608606.25;809304.68;5891
+5893;2001316277;B06000;LESAO CORPORAL;RUA DA BAHIA;1070;81155;11/6/2001 19:31:00;CIDADAO COMUM;N;MILITAR NO LOCAL;CENTRO (BH);BH;611250.10;796582.72;5892
+5894;2001316315;B04002;HOMICIDIO CONSUM;RUA QUATRO DE MA;26;57118;11/6/2001 19:53:00;CIDADAO COMUM;N;;LEONINA;BH;608650.17;793654.44;5893
+5895;2001316336;B03000;AMEACA;RUA VINTE;163;97140;11/6/2001 20:08:00;CIDADAO COMUM;N;;SAO MARCOS;BH;614596.78;802636.22;5894
+5896;2001316349;B03000;AMEACA;RUA IVO ROCHA;153;36330;11/6/2001 20:19:00;CIDADAO COMUM;S;;CINQUENTENARIO;BH;606520.91;793061.86;5895
+5897;2001316354;B05000;SEQUESTRO E CARC;RUA LEOPOLDINA;120;40739;11/6/2001 20:22:00;CIDADAO COMUM;S;AP404;SANTO ANTONIO;BH;610885.17;794753.81;5896
+5898;2001316355;B03000;AMEACA;RUA ANA HILBERT;111;3544;11/6/2001 20:16:00;CIDADAO COMUM;S;0;SANTA HELENA (BH;BH;603446.72;790142.99;5897
+5899;2001316371;B04001;HOMICIDIO TENTAD;AV RAJA GABAGLIA;1750;57830;11/6/2001 20:36:00;INICIATIVA;S;0;MORRO DAS PEDRAS;BH;608719.62;793771.09;5898
+5900;2001316421;B03000;AMEACA;RUA DOM LUCIO AN;101;22382;11/6/2001 21:07:00;CIDADAO COMUM;S;0;CORACAO EUCARIST;BH;605436.95;796211.96;5899
+5901;2001316490;B03000;AMEACA;RUA AUGUSTO JOSE;560;6729;11/6/2001 21:55:00;CIDADAO COMUM;S;;ESTRELA DO ORIEN;BH;605916.80;791810.80;5900
+5902;2001316531;B04001;HOMICIDIO TENTAD;RUA MAJOR DELFIN;2700;42620;11/6/2001 22:22:00;CIDADAO COMUM;S;;SAO FRANCISCO;BH;608893.52;801341.34;5901
+5903;2001316541;B06000;LESAO CORPORAL;RUA DOS TIMBIRAS;2900;67682;11/6/2001 22:27:00;INICIATIVA;S;0;BARRO PRETO;BH;609912.78;796638.75;5902
+5904;2001316592;B03000;AMEACA;RUA CAMPO DO MEI;55;12177;11/6/2001 23:05:00;CIDADAO COMUM;S;;JARDIM LEBLON;BH;605703.85;807563.76;5903
+5905;2001316625;B06000;LESAO CORPORAL;RUA BONAPARTE;606;10083;11/6/2001 23:22:00;CIDADAO COMUM;S;0;PADRE EUSTAQUIO;BH;607739.08;797055.95;5904
+5906;2001316644;B06000;LESAO CORPORAL;RUA URSULA PAULI;2465;71066;11/6/2001 23:42:00;INICIATIVA;S;0;CH BONSUCESSO;BH;605460.77;791671.99;5905
+5907;2001316803;B03000;AMEACA;RUA NEFELINA;117;81228;12/6/2001 03:12:00;CIDADAO COMUM;N;;SANTA TEREZA;BH;612835.00;797309.03;5906
+5908;2001316961;B06000;LESAO CORPORAL;RUA PURUS;125;55819;12/6/2001 07:55:00;CIDADAO COMUM;S;BECO DOS CAQUIS ;CONCORDIA;BH;611069.17;799069.41;5907
+5909;2001317004;B03000;AMEACA;RUA RIO POMBA;631;54567;12/6/2001 08:24:00;CIDADAO COMUM;S;CAA;PADRE EUSTAQUIO;BH;607685.08;797757.01;5908
+5910;2001317159;B06000;LESAO CORPORAL;RUA LUIZ CASTANH;773;41697;12/6/2001 09:48:00;CIDADAO COMUM;S;;SANTA CRUZ;BH;610661.48;802130.20;5909
+5911;2001317204;B03000;AMEACA;RUA JAIME SALSE;278;36848;12/6/2001 10:18:00;INICIATIVA;S;0;MAGNESITA;BH;604022.14;793879.98;5910
+5912;2001317237;B03000;AMEACA;RUA FRANCA;48;29224;12/6/2001 10:42:00;CIDADAO COMUM;S;BL18    AP09;JARDIM AMERICA;BH;607503.92;794169.65;5911
+5913;2001317308;B06000;LESAO CORPORAL;RUA DOUTOR BENED;1500;12252;12/6/2001 11:25:00;CIDADAO COMUM;S;;ANTONIO RIBEIRO ;BH;612933.21;804714.67;5912
+5914;2001317393;B06000;LESAO CORPORAL;RUA BELO ORIENTE;850;42923;12/6/2001 12:29:00;CIDADAO COMUM;N;CAFR;PROVIDENCIA;BH;612677.75;804042.59;5913
+5915;2001317467;B03000;AMEACA;AV RAJA GABAGLIA;1710;57830;12/6/2001 13:22:00;INICIATIVA;S;0;MORRO DAS PEDRAS;BH;608719.62;793771.09;5914
+5916;2001317551;B03000;AMEACA;RUA CECILIO EMIG;82;14131;12/6/2001 14:09:00;CIDADAO COMUM;S;REF:IGREJA SANTO;PRIMEIRO DE MAIO;BH;612455.98;803751.51;5915
+5917;2001317569;B06000;LESAO CORPORAL;RUA NOSSA SENHOR;855;48021;12/6/2001 14:22:00;CIDADAO COMUM;N;;CACHOEIRINHA;BH;610156.25;800645.51;5916
+5918;2001317579;B06000;LESAO CORPORAL;RUA TRES;5;126837;12/6/2001 14:25:00;CIDADAO COMUM;N;;CONJUNTO VISTA A;BH;605113.84;792582.18;5917
+5919;2001317731;B03000;AMEACA;RUA CASTELO DE A;70;124034;12/6/2001 15:53:00;CIDADAO COMUM;N;;CASTELO;BH;605287.78;801402.95;5918
+5920;2001317796;B06000;LESAO CORPORAL;RUA ROGERIO APAR;25;96682;12/6/2001 16:22:00;CIDADAO COMUM;S;0;ANTONIO RIBEIRO ;BH;614926.02;805954.24;5919
+5921;2001318172;B03000;AMEACA;AV NOSSA SENHORA;1700;48107;12/6/2001 20:07:00;CIDADAO COMUM;S;;CARLOS PRATES;BH;610293.44;797814.94;5920
+5922;2001318184;B03000;AMEACA;RUA CAPIVARI;1036;12918;12/6/2001 20:14:00;CIDADAO COMUM;S;;SERRA;BH;613966.21;794792.76;5921
+5923;2001318287;B03000;AMEACA;RUA VINTE E UM;85;122095;12/6/2001 21:21:00;CIDADAO COMUM;N;;JARDIM DOS COMER;BH;607810.43;810991.30;5922
+5924;2001318330;B04001;HOMICIDIO TENTAD;RUA FLOR DO AMEN;89;94910;12/6/2001 21:54:00;CIDADAO COMUM;S;;JARDIM MONTANHES;BH;605876.71;799791.72;5923
+5925;2001318380;B06000;LESAO CORPORAL;RUA CONTAGEM;1225;70293;12/6/2001 22:28:00;CIDADAO COMUM;S;RESTAURANTE PALA;NOVA VISTA;BH;614534.83;800862.24;5924
+5926;2001318398;B03000;AMEACA;RUA RIACHUELO;501;58527;12/6/2001 22:36:00;CIDADAO COMUM;S;BLA     AP102;CARLOS PRATES;BH;608088.93;797566.54;5925
+5927;2001318418;B04001;HOMICIDIO TENTAD;RUA CAMILO DE BR;636;11896;12/6/2001 22:46:00;CIDADAO COMUM;S;;PADRE EUSTAQUIO;BH;605855.99;798012.24;5926
+5928;2001318481;B03000;AMEACA;RUA BEGONIA;758;8812;12/6/2001 23:22:00;CIDADAO COMUM;S;0;ESPLANADA;BH;615103.97;798724.96;5927
+5929;2001318482;B03000;AMEACA;RUA FLOR DAS PED;360;28801;12/6/2001 23:25:00;CIDADAO COMUM;N;CA;JARDIM MONTANHES;BH;606148.99;799101.27;5928
+5930;2001318500;B03000;AMEACA;RUA MARIA BEATRI;56;43881;12/6/2001 23:36:00;CIDADAO COMUM;S;0;HAVAI;BH;606696.13;793615.49;5929
+5931;2001318514;B02000;RIXA;AV GETULIO VARGA;216;81256;12/6/2001 23:55:00;CIDADAO COMUM;N;;FUNCIONARIOS;BH;612417.35;795645.38;5930
+5932;2001318545;B04002;HOMICIDIO CONSUM;RUA B;81;47637;13/6/2001 00:20:00;CIDADAO COMUM;N;0;VILA CASTANHEIRA;BH;601122.18;788570.67;5931
+5933;2001318554;B06000;LESAO CORPORAL;AV PARANA;365;52230;13/6/2001 00:30:00;CIDADAO COMUM;S;;CENTRO (BH);BH;610769.16;797164.79;5932
+5934;2001318593;B06000;LESAO CORPORAL;RUA ENGENHO NOVO;209;25630;13/6/2001 01:07:00;CIDADAO COMUM;S;;POMPEIA;BH;614830.73;797567.55;5933
+5935;2001318600;B06000;LESAO CORPORAL;RUA AURELIANO PI;112;6858;13/6/2001 01:17:00;CIDADAO COMUM;S;;APARECIDA SETIMA;BH;609016.12;800210.99;5934
+5936;2001319261;B06000;LESAO CORPORAL;RUA GUIMARAES PA;144;87873;13/6/2001 12:34:00;CIDADAO COMUM;S;;VILA OESTE;BH;604338.90;795567.29;5935
+5937;2001319281;B09000;ABANDONO DE INCA;RUA PETRINA ALVE;312;1350;13/6/2001 12:52:00;CIDADAO COMUM;N;;GOIANIA;BH;615082.31;802831.51;5936
+5938;2001319437;B03000;AMEACA;RUA SAO LUIZ;410;63288;13/6/2001 14:39:00;INICIATIVA;S;0;SAO TOMAZ;BH;609850.88;805509.35;5937
+5939;2001319468;B06000;LESAO CORPORAL;RUA CUBATAO;316;84560;13/6/2001 15:05:00;CIDADAO COMUM;S;;RENASCENCA;BH;611087.08;800639.81;5938
+5940;2001319520;B03000;AMEACA;RUA MARIA AMELIA;550;43812;13/6/2001 15:33:00;CIDADAO COMUM;S;;SAO BERNARDO;BH;610819.92;805277.80;5939
+5941;2001319533;B06000;LESAO CORPORAL;RUA MARTINHO CAM;25;44972;13/6/2001 15:37:00;CIDADAO COMUM;S;;CRUZEIRO;BH;612259.84;794643.53;5940
+5942;2001319600;B06000;LESAO CORPORAL;RUA JACI NOGUEIR;212;36659;13/6/2001 16:12:00;CIDADAO COMUM;S;;FLORAMAR;BH;611955.57;806101.15;5941
+5943;2001319649;B06000;LESAO CORPORAL;RUA DAVID RABELO;221;19702;13/6/2001 16:44:00;CIDADAO COMUM;N;CAC;INCONFIDENCIA;BH;605006.34;798378.12;5942
+5944;2001319690;B03000;AMEACA;RUA SAO CLEMENTE;196;62197;13/6/2001 17:07:00;CIDADAO COMUM;S;;SANTO ANDRE;BH;609647.96;799330.51;5943
+5945;2001319777;B03000;AMEACA;RUA DOS ECONOMIS;612;103272;13/6/2001 17:54:00;INICIATIVA;S;0;CONJUNTO ALIPIO ;BH;604238.00;800485.06;5944
+5946;2001319875;B06000;LESAO CORPORAL;RUA SAO CLEMENTE;147;62197;13/6/2001 18:40:00;CIDADAO COMUM;S;;SANTO ANDRE;BH;609623.42;799280.71;5945
+5947;2001319979;B04001;HOMICIDIO TENTAD;RUA EXPEDICIONAR;49;31627;13/6/2001 19:25:00;CIDADAO COMUM;N;;MARIA GORETTI;BH;614368.17;803366.53;5946
+5948;2001320018;B06000;LESAO CORPORAL;RUA MUQUICABA;180;65343;13/6/2001 19:45:00;CIDADAO COMUM;S;;COQUEIROS;BH;602620.44;798332.25;5947
+5949;2001320081;B04001;HOMICIDIO TENTAD;RUA BENEDITO ANI;15;56244;13/6/2001 20:22:00;INICIATIVA;N;0;NOVA YORK;BH;608352.11;810599.17;5948
+5950;2001320155;B06000;LESAO CORPORAL;RUA PADRE PEDRO ;175;51657;13/6/2001 21:06:00;CIDADAO COMUM;S;;VENDA NOVA;BH;609671.68;808130.71;5949
+5951;2001320160;B04001;HOMICIDIO TENTAD;BECO HELIOTERIO;90;170863;13/6/2001 21:09:00;INICIATIVA;S;0;LEONINA;BH;608285.06;793705.32;5950
+5952;2001320173;B06000;LESAO CORPORAL;AV BALEARES;529;89333;13/6/2001 21:19:00;CIDADAO COMUM;S;;JARDIM EUROPA;BH;608358.52;810091.95;5951
+5953;2001320203;B04002;HOMICIDIO CONSUM;RUA REGENCIA;82;301448;13/6/2001 21:38:00;CIDADAO COMUM;N;;VILA CAFEZAL;BH;614123.87;795468.74;5952
+5954;2001320297;B06000;LESAO CORPORAL;PRACA RAUL SOARE;441;58010;13/6/2001 22:30:00;CIDADAO COMUM;S;0;CENTRO (BH);BH;610514.66;796843.53;5953
+5955;2001320312;B06000;LESAO CORPORAL;AV ELISIO DE BRI;23;25251;13/6/2001 22:42:00;CIDADAO COMUM;S;0;BOA VISTA;BH;614321.28;799654.60;5954
+5956;2001320313;B03000;AMEACA;RUA GIL DE OLIVE;215;112545;13/6/2001 22:42:00;CIDADAO COMUM;S;0;CEU AZUL;BH;604297.85;808055.70;5955
+5957;2001320362;B03000;AMEACA;PRACA CARDEAL AR;46;13182;13/6/2001 23:19:00;INICIATIVA;S;0;NOVA CINTRA;BH;605685.61;793811.72;5956
+5958;2001320418;B03000;AMEACA;RUA SATURNINO FE;58;64108;14/6/2001 00:03:00;CIDADAO COMUM;S;CAB;LETICIA;BH;607664.20;809941.98;5957
+5959;2001320459;B06000;LESAO CORPORAL;AV SINFRONIO BRO;1355;66116;14/6/2001 00:33:00;CIDADAO COMUM;S;0;BARREIRO;BH;602021.17;790667.36;5958
+5960;2001320570;B06000;LESAO CORPORAL;RUA ESPIRITO SAN;1025;26052;14/6/2001 02:12:00;CIDADAO COMUM;N;APTO 703;CENTRO (BH);BH;611153.91;796654.06;5959
+5961;2001320571;B02000;RIXA;RUA PADRE PEDRO ;870;51657;14/6/2001 02:13:00;CIDADAO COMUM;S;0;VENDA NOVA;BH;609186.76;808667.02;5960
+5962;2001320578;B03000;AMEACA;RUA JULIO PEREIR;28;102239;14/6/2001 02:20:00;INICIATIVA;S;0;CIDADE NOVA;BH;612273.13;800429.88;5961
+5963;2001320598;B02000;RIXA;RUA PADRE PEDRO ;870;51657;14/6/2001 02:47:00;CIDADAO COMUM;S;0;VENDA NOVA;BH;609186.76;808667.02;5962
+5964;2001320624;B03000;AMEACA;RUA FLOR DA ROMA;115;23808;14/6/2001 03:07:00;CIDADAO COMUM;S;;VILA IPE;BH;605905.20;799936.77;5963
+5965;2001320666;B06000;LESAO CORPORAL;AV AMAZONAS;333;3140;14/6/2001 03:43:00;INICIATIVA;S;0;CENTRO (BH);BH;611084.15;797100.95;5964
+5966;2001320699;B06000;LESAO CORPORAL;AV DO CONTORNO;1813;17228;14/6/2001 04:21:00;CIDADAO COMUM;S;0;CENTRO (BH);BH;612273.73;797607.09;5965
+5967;2001320702;B06000;LESAO CORPORAL;RUA FERNANDES TO;390;81271;14/6/2001 04:25:00;CIDADAO COMUM;N;0;LOURDES;BH;611239.41;794977.80;5966
+5968;2001320784;B03000;AMEACA;RUA RIO DE JANEI;147;58772;14/6/2001 06:53:00;CIDADAO COMUM;N;0;CENTRO (BH);BH;611252.60;797543.60;5967
+5969;2001320796;B03000;AMEACA;RUA FLAVIO MARQU;376;28436;14/6/2001 07:15:00;CIDADAO COMUM;N;;BARREIRO;BH;603097.24;790974.11;5968
+5970;2001320806;B06000;LESAO CORPORAL;RUA LOTUS;385;100564;14/6/2001 07:21:00;CIDADAO COMUM;S;;BETANIA;BH;604933.19;792316.58;5969
+5971;2001320877;B06000;LESAO CORPORAL;RUA BERILO;2;9289;14/6/2001 08:33:00;CIDADAO COMUM;S;;PRIMEIRO DE MAIO;BH;612085.16;803501.30;5970
+5972;2001320944;B03000;AMEACA;RUA LOURENCO VOL;237;97603;14/6/2001 09:26:00;CIDADAO COMUM;S;FR220;DOM SILVERIO;BH;614553.44;804153.08;5971
+5973;2001320965;B03000;AMEACA;AV DO CONTORNO;1277;17228;14/6/2001 09:45:00;INICIATIVA;N;0;BARRO PRETO;BH;611851.77;797784.50;5972
+5974;2001320978;B03000;AMEACA;AV OLINTO MEIREL;2511;49847;14/6/2001 09:55:00;CIDADAO COMUM;N;;ARAGUAIA;BH;603791.58;789431.89;5973
+5975;2001321018;B03000;AMEACA;RUA FREI CONCEIC;1196;29873;14/6/2001 10:22:00;CIDADAO COMUM;S;0;JOAO PINHEIRO;BH;604263.93;796522.94;5974
+5976;2001321103;B03000;AMEACA;RUA ANTONIO RODR;480;11537;14/6/2001 11:32:00;CIDADAO COMUM;N;;VENDA NOVA;BH;607247.00;809301.40;5975
+5977;2001321150;B06000;LESAO CORPORAL;RUA CARLOS MARQU;40;84200;14/6/2001 12:10:00;CIDADAO COMUM;N;;COPACABANA;BH;606242.68;805806.40;5976
+5978;2001321196;B06000;LESAO CORPORAL;AV AFONSO VAZ DE;65;1306;14/6/2001 12:44:00;CIDADAO COMUM;N;0;BARREIRO;BH;602931.29;791287.07;5977
+5979;2001321220;B06000;LESAO CORPORAL;RUA POUSO ALEGRE;2522;54932;14/6/2001 13:00:00;CIDADAO COMUM;N;;FLORESTA;BH;613435.30;798084.21;5978
+5980;2001321256;B06000;LESAO CORPORAL;RUA FARADAY;149;27764;14/6/2001 13:29:00;CIDADAO COMUM;N;CSA;PRIMEIRO DE MAIO;BH;612224.89;803549.14;5979
+5981;2001321283;B03000;AMEACA;AV JEQUITINHONHA;347;37305;14/6/2001 13:56:00;CIDADAO COMUM;N;CA1;VERA CRUZ;BH;615765.43;798316.29;5980
+5982;2001321285;B08000;VIOLACAO DE DOMI;RUA NETUNO;58;130021;14/6/2001 13:57:00;CIDADAO COMUM;N;;VILA SATELITE;BH;610007.16;808805.46;5981
+5983;2001321292;B03000;AMEACA;RUA CORONEL BERN;132;89941;14/6/2001 13:59:00;CIDADAO COMUM;S;0;PALMEIRAS;BH;606632.74;791582.00;5982
+5984;2001321331;B02000;RIXA;RUA PINTARROXO;167;95954;14/6/2001 14:28:00;CIDADAO COMUM;S;;GOIANIA;BH;615366.02;802364.10;5983
+5985;2001321333;B03000;AMEACA;RUA JORNALISTA J;192;6470;14/6/2001 14:30:00;CIDADAO COMUM;S;;NOVA CINTRA;BH;606205.43;793698.70;5984
+5986;2001321362;B06000;LESAO CORPORAL;AV COLETORA;580;78241;14/6/2001 14:52:00;CIDADAO COMUM;S;;VILA PINHO;BH;602113.34;788183.02;5985
+5987;2001321427;B03000;AMEACA;RUA PADRE TIAGO ;60;119430;14/6/2001 15:36:00;CIDADAO COMUM;S;APTO 103;VILA MAGNESITA;BH;602516.78;794930.47;5986
+5988;2001321460;B03000;AMEACA;AV OLEGARIO MACI;170;49699;14/6/2001 15:58:00;CIDADAO COMUM;N;;CENTRO (BH);BH;610621.91;797526.25;5987
+5989;2001321476;B03000;AMEACA;RUA BOREAL;56;10184;14/6/2001 16:08:00;CIDADAO COMUM;S;AP301;ADELAIDE;BH;606950.84;798500.09;5988
+5990;2001321512;B04001;HOMICIDIO TENTAD;RUA DIMAS PEREIR;48;107780;14/6/2001 16:33:00;CIDADAO COMUM;N;;MANTIQUEIRA;BH;606086.92;811647.38;5989
+5991;2001321516;B06000;LESAO CORPORAL;RUA SAO PAULO;157;63464;14/6/2001 16:35:00;INICIATIVA;S;0;CENTRO BH;BH;611124.36;797602.35;5990
+5992;2001321540;B03000;AMEACA;RUA NIQUELINA;1158;47738;14/6/2001 16:57:00;POLICIAL MILITAR;S;0;SANTA EFIGENIA;BH;614131.84;797245.39;5991
+5993;2001321574;B03000;AMEACA;RUA JOSE JACINTO;262;67538;14/6/2001 17:13:00;CIDADAO COMUM;S;;DAS INDUSTRIAS;BH;604619.48;791960.34;5992
+5994;2001321616;B04001;HOMICIDIO TENTAD;RUA DELIO VIEIRA;168;23344;14/6/2001 17:36:00;CIDADAO COMUM;S;;GLORIA;BH;603163.67;798723.49;5993
+5995;2001321618;B06000;LESAO CORPORAL;RUA SAO TIAGO;151;21682;14/6/2001 17:38:00;INICIATIVA;N;0;SAO TOMAZ;BH;610186.02;805592.90;5994
+5996;2001321655;B03000;AMEACA;RUA DOS TIMBIRAS;2500;67682;14/6/2001 17:56:00;POLICIAL MILITAR;S;0;SANTO AGOSTINHO;BH;610281.40;796553.09;5995
+5997;2001321670;B03000;AMEACA;RUA NIQUELINA;1158;47738;14/6/2001 18:03:00;CIDADAO COMUM;N;0;SANTA EFIGENIA;BH;614131.84;797245.39;5996
+5998;2001321776;B08000;VIOLACAO DE DOMI;AV DO CONTORNO;12;17228;14/6/2001 18:58:00;INICIATIVA;N;0;CENTRO BH;BH;610893.99;797847.30;5997
+5999;2001321839;B04001;HOMICIDIO TENTAD;RUA CORONEL SEVE;800;18072;14/6/2001 19:18:00;CIDADAO COMUM;S;0;ARAGUAIA;BH;604766.76;789755.34;5998
+6000;2001321853;B06000;LESAO CORPORAL;RUA DR JOAO CARV;142;36012;14/6/2001 19:25:00;CIDADAO COMUM;S;;PRADO LOPES;BH;610121.75;798846.43;5999
+6001;2001321886;B06000;LESAO CORPORAL;RUA PARACATU;724;52095;14/6/2001 19:48:00;CIDADAO COMUM;S;;BARRO PRETO;BH;609642.16;796526.05;6000
+6002;2001321943;B06000;LESAO CORPORAL;RUA PSI;16;49991;14/6/2001 20:20:00;CIDADAO COMUM;N;0;CAICARA;BH;608003.95;799396.57;6001
+6003;2001321960;B03000;AMEACA;AV PRESIDENTE CA;3001;55125;14/6/2001 20:29:00;INICIATIVA;S;0;CAICARA;BH;608178.06;800324.32;6002
+6004;2001321976;B03000;AMEACA;RUA PIRANGUINHO;157;54122;14/6/2001 20:42:00;CIDADAO COMUM;N;;SAO GERALDO;BH;616053.38;799126.91;6003
+6005;2001322019;B03000;AMEACA;RUA ANTONIO DE P;158;119254;14/6/2001 21:06:00;CIDADAO COMUM;S;AP301;SERRA VERDE;BH;609376.50;811110.92;6004
+6006;2001322034;B06000;LESAO CORPORAL;AV BIAS FORTES;1770;9553;14/6/2001 21:15:00;INICIATIVA;N;0;BARRO PRETO;BH;610196.72;797244.85;6005
+6007;2001322047;B04002;HOMICIDIO CONSUM;RUA ESPIRITO SAN;361;26052;14/6/2001 21:21:00;INICIATIVA;S;0;CENTRO BH;BH;611326.30;797302.57;6006
+6008;2001322054;B06000;LESAO CORPORAL;AV ASSIS CHATEAU;615;6353;14/6/2001 21:24:00;INICIATIVA;S;0;FLORESTA;BH;611764.60;797160.68;6007
+6009;2001322176;B04002;HOMICIDIO CONSUM;RUA APOLO OITO;345;83797;14/6/2001 22:28:00;CIDADAO COMUM;N;;CH ATILA DE PAIV;BH;601455.09;790798.99;6008
+6010;2001322178;B03000;AMEACA;RUA DAS VIOLAS;805;101670;14/6/2001 22:28:00;CIDADAO COMUM;S;0;VILA CALIFORNIA;BH;603660.18;796896.20;6009
+6011;2001322221;B06000;LESAO CORPORAL;RUA SAO VICENTE;86;88126;14/6/2001 22:48:00;CIDADAO COMUM;S;;GRANJA FREITAS;BH;617022.85;798456.93;6010
+6012;2001322232;B04001;HOMICIDIO TENTAD;AV CORONEL DURVA;38;17688;14/6/2001 22:57:00;CIDADAO COMUM;N;0;DURVAL DE BARROS;BH;598767.92;791083.00;6011
+6013;2001322300;B06000;LESAO CORPORAL;RUA DONA CARMEM;392;22820;14/6/2001 23:28:00;CIDADAO COMUM;S;;SARANDI (URCA/BH;BH;603768.76;802208.64;6012
+6014;2001322484;B04002;HOMICIDIO CONSUM;BECO PRINCIPAL;5;301983;15/6/2001 01:47:00;CIDADAO COMUM;N;;SAO JOSE;BH;604808.72;799278.97;6013
+6015;2001322511;B06000;LESAO CORPORAL;RUA LUCIO PETIT ;46;114121;15/6/2001 02:13:00;CIDADAO COMUM;S;;RIO BRANCO;BH;606256.19;808682.91;6014
+6016;2001322522;B03000;AMEACA;RUA FLOR DA VERD;253;28842;15/6/2001 02:23:00;CIDADAO COMUM;N;0;JARDIM ALVORADA;BH;606254.68;799470.06;6015
+6017;2001322576;B06000;LESAO CORPORAL;RUA RIO DE JANEI;462;58772;15/6/2001 03:46:00;CIDADAO COMUM;S;FR;CENTRO (BH);BH;611136.20;797245.88;6016
+6018;2001322607;B03000;AMEACA;RUA GRAJAU;261;31715;15/6/2001 05:13:00;CIDADAO COMUM;N;;ANCHIETA;BH;612355.52;793641.12;6017
+6019;2001322634;B06000;LESAO CORPORAL;AV CRISTIANO MAC;5387;18652;15/6/2001 06:25:00;CIDADAO COMUM;S;;DOS PALMARES;BH;612255.52;802177.46;6018
+6020;2001322638;B03000;AMEACA;RUA FRANCISCO DU;139;46316;15/6/2001 06:39:00;INICIATIVA;N;0;SANTA TEREZINHA;BH;604475.97;802319.26;6019
+6021;2001322803;B06000;LESAO CORPORAL;RUA JOAO SAMAHA;261;7397;15/6/2001 09:09:00;CIDADAO COMUM;N;;SAO JOAO BATISTA;BH;608633.12;807211.33;6020
+6022;2001322825;B06000;LESAO CORPORAL;RUA SUASSUI;393;66447;15/6/2001 09:25:00;CIDADAO COMUM;N;CAA;CARLOS PRATES;BH;608993.56;797367.98;6021
+6023;2001322896;B06000;LESAO CORPORAL;AV JEQUITINHONHA;1027;37305;15/6/2001 10:05:00;CIDADAO COMUM;S;0;VERA CRUZ;BH;615981.31;797493.07;6022
+6024;2001322955;B03000;AMEACA;RUA PEDRO GLANSM;55;53044;15/6/2001 10:45:00;CIDADAO COMUM;S;0;INDUSTRIAL RODRI;BH;615807.17;808659.59;6023
+6025;2001322993;B03000;AMEACA;RUA ALVARO OLIVE;111;58381;15/6/2001 11:17:00;CIDADAO COMUM;S;;MARIA VIRGINIA;BH;611875.97;802851.94;6024
+6026;2001323021;B03000;AMEACA;RUA LUCIA MIGUEL;140;41555;15/6/2001 11:34:00;CIDADAO COMUM;S;;TUPI;BH;612588.93;806074.09;6025
+6027;2001323029;B06000;LESAO CORPORAL;RUA HILARINO BEN;64;33298;15/6/2001 11:42:00;CIDADAO COMUM;S;;MAGNESITA;BH;604274.73;793891.55;6026
+6028;2001323035;B03000;AMEACA;RUA SOBRAL;404;66232;15/6/2001 11:44:00;CIDADAO COMUM;N;0;SANTA LUCIA;BH;610299.27;792033.67;6027
+6029;2001323057;B03000;AMEACA;BECO FREI MARIAN;120;300767;15/6/2001 12:02:00;CIDADAO COMUM;S;;CARLOS PRATES;BH;608761.56;797834.53;6028
+6030;2001323105;B03000;AMEACA;RUA MANAUS;611;42747;15/6/2001 12:42:00;INICIATIVA;S;0;SANTA EFIGENIA;BH;612917.36;796183.64;6029
+6031;2001323106;B04001;HOMICIDIO TENTAD;RUA MANAIRA;10;96235;15/6/2001 12:42:00;CIDADAO COMUM;S;0;SAO GABRIEL;BH;614046.95;805015.29;6030
+6032;2001323251;B04001;HOMICIDIO TENTAD;AV NOSSA SENHORA;2128;47996;15/6/2001 14:32:00;CIDADAO COMUM;S;0;SAO PEDRO;BH;610842.82;793056.52;6031
+6033;2001323264;B06000;LESAO CORPORAL;AV JEQUITINHONHA;1027;37305;15/6/2001 14:44:00;CIDADAO COMUM;S;CAFU;VERA CRUZ;BH;615981.31;797493.07;6032
+6034;2001323284;B06000;LESAO CORPORAL;AV BIAS FORTES;1836;9553;15/6/2001 15:00:00;CIDADAO COMUM;N;;CARLOS PRATES;BH;610196.72;797244.85;6033
+6035;2001323290;B06000;LESAO CORPORAL;RUA DOS EXPEDICI;59;26989;15/6/2001 15:03:00;CIDADAO COMUM;S;CA;SANTA AMELIA;BH;606863.60;806683.97;6034
+6036;2001323304;B03000;AMEACA;RUA MARIA ROSA D;599;107800;15/6/2001 15:12:00;CIDADAO COMUM;N;CSA;MANTIQUEIRA;BH;606348.34;811601.38;6035
+6037;2001323321;B03000;AMEACA;RUA TIJUCA;77;67667;15/6/2001 15:21:00;CIDADAO COMUM;S;0;LEBLON;BH;605675.09;809917.57;6036
+6038;2001323483;B06000;LESAO CORPORAL;RUA RIO PETROPOL;276;91893;15/6/2001 17:10:00;CIDADAO COMUM;N;0;PINDORAMA;BH;602095.17;797898.68;6037
+6039;2001323504;B03000;AMEACA;RUA ANTENOR PERD;178;74266;15/6/2001 17:24:00;CIDADAO COMUM;N;0;SAO JOAO BATISTA;BH;609049.41;808143.38;6038
+6040;2001323515;B08000;VIOLACAO DE DOMI;RUA BRAZILINA FE;120;89840;15/6/2001 17:34:00;CIDADAO COMUM;N;0;BETANIA;BH;605521.19;792493.46;6039
+6041;2001323560;B03000;AMEACA;RUA EDSON TOMAS ;276;68556;15/6/2001 18:08:00;INICIATIVA;N;0;SAO BERNARDO;BH;611475.18;804538.49;6040
+6042;2001323604;B03000;AMEACA;RUA NAIR PENTAGN;165;97657;15/6/2001 18:33:00;CIDADAO COMUM;S;0;HELIOPOLIS;BH;611056.37;805379.55;6041
+6043;2001323606;B03000;AMEACA;RUA DAVIDSON PIM;234;124189;15/6/2001 18:30:00;CIDADAO COMUM;S;;JARDIM DOS COMER;BH;607280.34;811756.73;6042
+6044;2001323827;B03000;AMEACA;RUA GUARARAPES;1860;32241;15/6/2001 20:49:00;CIDADAO COMUM;S;0;GLORIA;BH;602480.24;798079.29;6043
+6045;2001323838;B06000;LESAO CORPORAL;RUA RAIMUNDO GIL;320;63086;15/6/2001 20:55:00;CIDADAO COMUM;S;CAA;NOVA CINTRA;BH;605210.75;793177.47;6044
+6046;2001323839;B06000;LESAO CORPORAL;RUA MARECHAL GUA;100;96802;15/6/2001 20:56:00;CIDADAO COMUM;S;;ANTONIO RIBEIRO ;BH;615270.76;806183.72;6045
+6047;2001323866;B04002;HOMICIDIO CONSUM;AV AMINTAS JAQUE;313;52546;15/6/2001 21:17:00;CIDADAO COMUM;N;0;COQUEIROS;BH;603210.01;799696.54;6046
+6048;2001323869;B06000;LESAO CORPORAL;AV NELIO CERQUEI;687;72359;15/6/2001 21:18:00;CIDADAO COMUM;S;0;TIROL;BH;600383.74;789115.36;6047
+6049;2001323892;B03000;AMEACA;RUA MARIA JOANA ;266;119267;15/6/2001 21:34:00;CIDADAO COMUM;S;0;ALVORADA;BH;615255.07;802225.21;6048
+6050;2001323904;B06000;LESAO CORPORAL;RUA G;70;78733;15/6/2001 21:38:00;CIDADAO COMUM;S;;CH JATOBA IV;BH;600404.89;787792.43;6049
+6051;2001323905;B06000;LESAO CORPORAL;RUA RADIALISTA Z;81;15437;15/6/2001 21:39:00;CIDADAO COMUM;S;;CEU AZUL;BH;604523.50;807871.15;6050
+6052;2001323919;B04002;HOMICIDIO CONSUM;RUA SACRAMENTO;30;59822;15/6/2001 21:45:00;CIDADAO COMUM;S;0;SERRA;BH;613575.35;795041.52;6051
+6053;2001323947;B09000;ABANDONO DE INCA;RUA ANA PAULA;33;3598;15/6/2001 22:05:00;CIDADAO COMUM;S;;VILA SUZANA;BH;611442.14;802914.74;6052
+6054;2001323973;B03000;AMEACA;RUA DELMO RENAUL;43;70596;15/6/2001 22:17:00;CIDADAO COMUM;S;0;AARAO REIS;BH;612822.44;804930.93;6053
+6055;2001323985;B04001;HOMICIDIO TENTAD;RUA CAMBUQUIRA;798;11830;15/6/2001 22:28:00;CIDADAO COMUM;S;;CARLOS PRATES;BH;608642.63;798179.48;6054
+6056;2001324040;B06000;LESAO CORPORAL;RUA SAO JOSE;23;302037;15/6/2001 23:00:00;CIDADAO COMUM;S;CAC;DOZE DE OUTUBRO;BH;606186.44;790674.49;6055
+6057;2001324128;B04002;HOMICIDIO CONSUM;RUA P;16;78402;15/6/2001 23:56:00;CIDADAO COMUM;N;;VILA PINHO;BH;602081.24;787982.68;6056
+6058;2001324129;B06000;LESAO CORPORAL;RUA MOEMA;394;46070;15/6/2001 23:55:00;CIDADAO COMUM;S;0;PADRE EUSTAQUIO;BH;606488.15;797836.90;6057
+6059;2001324170;B03000;AMEACA;RUA PADRE LUIZ C;119;42472;16/6/2001 00:24:00;CIDADAO COMUM;S;;DAS INDUSTRIAS;BH;603784.38;793050.81;6058
+6060;2001324171;B03000;AMEACA;RUA PADRE PEDRO ;148;51657;16/6/2001 00:27:00;CIDADAO COMUM;S;0;VENDA NOVA;BH;609719.17;808135.92;6059
+6061;2001324241;B06000;LESAO CORPORAL;RUA DAS GABIROBA;95;30375;16/6/2001 01:28:00;POLICIAL CIVIL;S;;VILA CLORIS;BH;610034.72;808298.49;6060
+6062;2001324313;B03000;AMEACA;ESTRADA BEIRA LI;10;10878;16/6/2001 02:41:00;CIDADAO COMUM;S;0;SAO GABRIEL;BH;616178.24;806739.23;6061
+6063;2001324382;B06000;LESAO CORPORAL;RUA PADRE PEDRO ;951;51657;16/6/2001 04:08:00;CIDADAO COMUM;N;SJ;VENDA NOVA;BH;609054.57;808684.17;6062
+6064;2001324400;B06000;LESAO CORPORAL;RUA CAPANEMA;331;56979;16/6/2001 04:42:00;CIDADAO COMUM;N;;COQUEIROS;BH;602389.39;798785.86;6063
+6065;2001324511;B03000;AMEACA;RUA JOSE CLETO;425;38682;16/6/2001 07:50:00;CIDADAO COMUM;S;0;SANTA CRUZ;BH;610927.84;802291.16;6064
+6066;2001324607;B03000;AMEACA;RUA RAMIRO SIQUE;10;128858;16/6/2001 09:12:00;CIDADAO COMUM;S;;CASTANHEIRAS (TA;BH;617650.40;797388.81;6065
+6067;2001324666;B03000;AMEACA;RUA OLIVER;225;49950;16/6/2001 10:01:00;CIDADAO COMUM;N;;UNIAO;BH;612718.71;801397.71;6066
+6068;2001324724;B06000;LESAO CORPORAL;AV AUGUSTO DE LI;635;6731;16/6/2001 10:47:00;CIDADAO COMUM;N;;CENTRO (BH);BH;610790.65;796647.21;6067
+6069;2001324740;B03000;AMEACA;RUA FREDERICO BR;285;51080;16/6/2001 10:58:00;CIDADAO COMUM;S;;CARLOS PRATES;BH;608098.92;797431.78;6068
+6070;2001324751;B03000;AMEACA;RUA OZANAM;207;50796;16/6/2001 11:12:00;CIDADAO COMUM;S;AP104;IPIRANGA;BH;611657.56;801318.05;6069
+6071;2001324842;B03000;AMEACA;RUA TRINTA E TRE;137;34133;16/6/2001 12:14:00;CIDADAO COMUM;S;;CONJUNTO FELICID;BH;612435.60;807334.47;6070
+6072;2001324923;B03000;AMEACA;RUA GENTIL TEODO;87;66333;16/6/2001 13:13:00;CIDADAO COMUM;S;;SAO JOAO BATISTA;BH;611230.41;801186.56;6071
+6073;2001324937;B04001;HOMICIDIO TENTAD;RUA SERRINHA;658;129201;16/6/2001 13:24:00;CIDADAO COMUM;N;;CH VALE DO JATOB;BH;600157.51;787603.35;6072
+6074;2001324982;B03000;AMEACA;RUA DOUTOR LUIZ ;34;23505;16/6/2001 13:52:00;CIDADAO COMUM;S;0;MAGNESITA;BH;603885.26;793861.02;6073
+6075;2001324999;B04001;HOMICIDIO TENTAD;RUA NASCIMENTO G;620;47274;16/6/2001 14:09:00;INICIATIVA;N;0;MORRO DAS PEDRAS;BH;608659.42;794728.52;6074
+6076;2001325029;B06000;LESAO CORPORAL;RUA MARIA JOANA ;516;7328;16/6/2001 14:34:00;CIDADAO COMUM;S;;CARDOSO;BH;603100.97;788196.41;6075
+6077;2001325064;B06000;LESAO CORPORAL;RUA DAVID RABELO;416;19702;16/6/2001 15:01:00;CIDADAO COMUM;S;0;INCONFIDENCIA;BH;605050.70;798560.71;6076
+6078;2001325179;B03000;AMEACA;RUA IMPERATRIZ;32;122357;16/6/2001 16:11:00;CIDADAO COMUM;S;;SAO TOMAZ;BH;609306.94;805400.92;6077
+6079;2001325203;B06000;LESAO CORPORAL;RUA PADRE PEDRO ;175;51657;16/6/2001 16:25:00;CIDADAO COMUM;S;;VENDA NOVA;BH;609671.68;808130.71;6078
+6080;2001325207;B06000;LESAO CORPORAL;RUA CRUCIFICACAO;55;18766;16/6/2001 16:26:00;CIDADAO COMUM;S;;SAO JOSE;BH;605621.95;798926.66;6079
+6081;2001325250;B06000;LESAO CORPORAL;RUA ROBERTO DE M;100;130412;16/6/2001 16:55:00;CIDADAO COMUM;S;;OLARIA;BH;602109.78;789254.89;6080
+6082;2001325265;B03000;AMEACA;AV SILVA LOBO;1969;65889;16/6/2001 17:05:00;INICIATIVA;N;0;GRAJAU;BH;608248.61;794746.76;6081
+6083;2001325268;B06000;LESAO CORPORAL;RUA VEREADOR CAM;210;21005;16/6/2001 17:05:00;CIDADAO COMUM;S;;ANTONIO RIBEIRO ;BH;615766.93;806676.50;6082
+6084;2001325283;B03000;AMEACA;RUA DARIO GONCAL;379;19670;16/6/2001 17:16:00;INICIATIVA;N;0;FLORAMAR;BH;612133.58;805984.63;6083
+6085;2001325302;B03000;AMEACA;RUA ANTONIO LUCI;83;14709;16/6/2001 17:25:00;CIDADAO COMUM;N;CAFU;CH VALE DO JATOB;BH;600810.66;787478.72;6084
+6086;2001325333;B04002;HOMICIDIO CONSUM;RUA BENTO;12;170807;16/6/2001 17:38:00;INICIATIVA;N;0;MORRO DAS PEDRAS;BH;608443.37;794109.13;6085
+6087;2001325366;B04001;HOMICIDIO TENTAD;RUA PARINTINS;305;61560;16/6/2001 17:52:00;CIDADAO COMUM;S;AP301;SAO GABRIEL;BH;613301.07;804534.83;6086
+6088;2001325377;B03000;AMEACA;RUA MADRID;110;42403;16/6/2001 18:02:00;CIDADAO COMUM;S;CSXX;COPACABANA;BH;606215.50;806159.29;6087
+6089;2001325399;B03000;AMEACA;RUA ALFINETE;151;2249;16/6/2001 18:18:00;CIDADAO COMUM;S;;LINDEIA;BH;599467.32;790906.24;6088
+6090;2001325459;B06000;LESAO CORPORAL;AV ERICO VERISSI;2291;41671;16/6/2001 18:50:00;CIDADAO COMUM;N;0;SANTA MONICA;BH;606975.53;807805.13;6089
+6091;2001325524;B03000;AMEACA;AV WALDOMIRO LOB;330;66548;16/6/2001 19:16:00;CIDADAO COMUM;N;;GUARANI;BH;612929.48;805371.63;6090
+6092;2001325536;B03000;AMEACA;RUA SILVA BARBOS;123;126490;16/6/2001 19:23:00;CIDADAO COMUM;N;0;TIROL;BH;600046.40;789883.53;6091
+6093;2001325540;B03000;AMEACA;RUA OTAVIO TARQU;58;50639;16/6/2001 19:25:00;CIDADAO COMUM;S;CS;TUPI;BH;612691.45;805903.79;6092
+6094;2001325647;B06000;LESAO CORPORAL;RUA ESTEVAO MUSS;10;26327;16/6/2001 20:29:00;CIDADAO COMUM;S;0;NOVA GAMELEIRA;BH;605516.79;794498.15;6093
+6095;2001325677;B04001;HOMICIDIO TENTAD;RUA PORTO VELHO;490;62506;16/6/2001 20:46:00;CIDADAO COMUM;S;;GLORIA;BH;603911.24;798307.42;6094
+6096;2001325679;B03000;AMEACA;RUA AUGUSTA;73;6615;16/6/2001 20:51:00;CIDADAO COMUM;S;CAB;ITAIPU BH;BH;598978.25;789462.02;6095
+6097;2001325717;B06000;LESAO CORPORAL;RUA URSULA PAULI;2338;71066;16/6/2001 21:10:00;INICIATIVA;N;0;CH BONSUCESSO;BH;605473.82;791757.57;6096
+6098;2001325737;B06000;LESAO CORPORAL;RUA ANTONIO MARC;293;48539;16/6/2001 21:21:00;CIDADAO COMUM;N;;MANTIQUEIRA;BH;606469.80;810190.14;6097
+6099;2001325776;B06000;LESAO CORPORAL;AV SILVIANO BRAN;2700;66002;16/6/2001 21:41:00;INICIATIVA;S;0;HORTO;BH;613805.02;798316.76;6098
+6100;2001325826;B06000;LESAO CORPORAL;RUA APERE;196;5020;16/6/2001 22:19:00;CIDADAO COMUM;S;;SAO GERALDO;BH;615542.42;799519.99;6099
+6101;2001325838;B06000;LESAO CORPORAL;AV AFONSO PENA;590;1259;16/6/2001 22:25:00;INICIATIVA;N;0;CENTRO (BH);BH;611078.27;797193.62;6100
+6102;2001325969;B04001;HOMICIDIO TENTAD;RUA DOS LAZARIST;94;122486;16/6/2001 23:37:00;CIDADAO COMUM;S;CAB;PLANALTO;BH;610826.79;805918.07;6101
+6103;2001325972;B06000;LESAO CORPORAL;RUA GUAICURUS;451;32009;16/6/2001 23:40:00;CIDADAO COMUM;S;PX428;CENTRO (BH);BH;611210.22;797600.57;6102
+6104;2001325980;B03000;AMEACA;RUA MANJERICAO;637;34464;16/6/2001 23:43:00;CIDADAO COMUM;S;;LINDEIA;BH;599654.37;791207.03;6103
+6105;2001326019;B06000;LESAO CORPORAL;RUA BARRA DA TIJ;140;100098;17/6/2001 00:01:00;CIDADAO COMUM;N;CAB;VILA SANTA BRANC;BH;605384.20;809444.62;6104
+6106;2001326045;B03000;AMEACA;RUA FERNAO DIAS;1201;28133;17/6/2001 00:17:00;CIDADAO COMUM;S;0;VERA CRUZ;BH;616149.41;797919.40;6105
+6107;2001326046;B04001;HOMICIDIO TENTAD;RUA JOSE JORGE F;70;38884;17/6/2001 00:19:00;CIDADAO COMUM;N;;NOVA BARROCA;BH;607287.63;792753.33;6106
+6108;2001326102;B04001;HOMICIDIO TENTAD;RUA ESTOCOLMO;12;100390;17/6/2001 00:57:00;CIDADAO COMUM;N;;TREVO;BH;604166.43;805838.05;6107
+6109;2001326104;B03000;AMEACA;RUA PASCOA;72;52404;17/6/2001 00:57:00;CIDADAO COMUM;S;0;SAO JOSE;BH;605753.40;798866.19;6108
+6110;2001326108;B06000;LESAO CORPORAL;RUA IPE AMARELO;19;117362;17/6/2001 01:02:00;CIDADAO COMUM;S;CAB;LINDEIA;BH;600282.81;790534.78;6109
+6111;2001326119;B03000;AMEACA;AV MEM DE SA;942;45395;17/6/2001 01:09:00;CIDADAO COMUM;N;;PARAISO;BH;614245.94;796551.31;6110
+6112;2001326137;B03000;AMEACA;BECO DA AGUA;155;172308;17/6/2001 01:23:00;CIDADAO COMUM;S;CAZZZ;CAFEZAL;BH;614122.88;794504.57;6111
+6113;2001326211;B02000;RIXA;RUA URANO;258;71000;17/6/2001 02:10:00;CIDADAO COMUM;S;;VILA SATELITE;BH;610063.87;808693.02;6112
+6114;2001326215;B03000;AMEACA;RUA NOVE DE DEZE;10;48872;17/6/2001 02:13:00;CIDADAO COMUM;N;CAB;LEONINA;BH;608380.02;793403.51;6113
+6115;2001326223;B06000;LESAO CORPORAL;RUA SAIRA;285;48670;17/6/2001 02:22:00;CIDADAO COMUM;S;0;GOIANIA;BH;615408.70;803160.66;6114
+6116;2001326234;B02000;RIXA;AV SARAMENHA;1000;64007;17/6/2001 02:32:00;CIDADAO COMUM;S;0;TUPI;BH;612916.89;805724.57;6115
+6117;2001326253;B03000;AMEACA;RUA STA ALIANCA;17;60311;17/6/2001 02:47:00;CIDADAO COMUM;S;;DOM JOAQUIM;BH;613911.96;802400.90;6116
+6118;2001326283;B04001;HOMICIDIO TENTAD;RUA ALCANTARA;269;1870;17/6/2001 03:04:00;CIDADAO COMUM;S;0;NOVA GRANADA;BH;607795.92;794870.02;6117
+6119;2001326294;B03000;AMEACA;RUA BURI;51;10764;17/6/2001 03:13:00;CIDADAO COMUM;S;0;CACHOEIRINHA;BH;610328.10;801370.73;6118
+6120;2001326298;B03000;AMEACA;RUA GAMA CERQUEI;756;30564;17/6/2001 03:16:00;CIDADAO COMUM;S;CAC;JARDIM AMERICA;BH;607596.70;794467.83;6119
+6121;2001326364;B03000;AMEACA;RUA SACRAMENTO;170;59822;17/6/2001 04:23:00;CIDADAO COMUM;N;0;SERRA;BH;613713.64;795025.29;6120
+6122;2001326378;B03000;AMEACA;RUA MARIO SOARES;700;44641;17/6/2001 04:37:00;CIDADAO COMUM;S;0;DOM BOSCO;BH;604285.11;797448.93;6121
+6123;2001326389;B04002;HOMICIDIO CONSUM;RUA PADRE PEDRO ;322;51657;17/6/2001 04:54:00;CIDADAO COMUM;S;;VILA SANTO ANTON;BH;609650.08;808286.90;6122
+6124;2001326409;B03000;AMEACA;RUA OLARIA;80;25110;17/6/2001 05:14:00;CIDADAO COMUM;S;0;TAQUARIL;BH;617221.65;797115.07;6123
+6125;2001326472;B04002;HOMICIDIO CONSUM;RUA SAO VICENTE;140;63855;17/6/2001 07:22:00;CIDADAO COMUM;N;0;VENDA NOVA;BH;608585.03;808760.44;6124
+6126;2001326507;B06000;LESAO CORPORAL;RUA JOAQUIM ALVE;73;80887;17/6/2001 08:05:00;CIDADAO COMUM;N;CAB;BETANIA;BH;605405.07;792912.81;6125
+6127;2001326683;B03000;AMEACA;PRACA JOSE CAVAL;50;38639;17/6/2001 10:22:00;INICIATIVA;S;0;CORACAO DE JESUS;BH;609777.00;794213.05;6126
+6128;2001326729;B03000;AMEACA;RUA DOS AIMORES;1630;1640;17/6/2001 10:57:00;CIDADAO COMUM;S;AP21;LOURDES;BH;611057.68;796189.83;6127
+6129;2001326872;B06000;LESAO CORPORAL;RUA DUZENTOS E O;99;24261;17/6/2001 12:46:00;CIDADAO COMUM;S;;CH VALE DO JATOB;BH;600758.52;787074.86;6128
+6130;2001326900;B03000;AMEACA;RUA SAO MIGUEL;1501;63410;17/6/2001 13:11:00;CIDADAO COMUM;S;;ITAPOA;BH;609533.82;805627.88;6129
+6131;2001326950;B06000;LESAO CORPORAL;RUA DIVINO ESPIR;85;96768;17/6/2001 13:46:00;CIDADAO COMUM;S;;ANTONIO RIBEIRO ;BH;614662.44;806416.62;6130
+6132;2001327023;B03000;AMEACA;RUA CORACAO EUCA;75;17344;17/6/2001 14:37:00;CIDADAO COMUM;N;0;CORACAO EUCARIST;BH;605859.87;796363.89;6131
+6133;2001327035;B06000;LESAO CORPORAL;RUA INGLATERRA;226;34552;17/6/2001 14:45:00;CIDADAO COMUM;N;;JARDIM LEBLON;BH;606129.97;807391.13;6132
+6134;2001327046;B02000;RIXA;RUA CAMPOS SALES;350;12300;17/6/2001 14:59:00;CIDADAO COMUM;N;0;CALAFATE;BH;607187.46;796294.85;6133
+6135;2001327075;B03000;AMEACA;AV PRESIDENTE TA;3735;35366;17/6/2001 15:16:00;CIDADAO COMUM;S;;PAQUETA;BH;605051.03;802496.83;6134
+6136;2001327076;B06000;LESAO CORPORAL;RUA EVOCACAO;473;26948;17/6/2001 15:17:00;CIDADAO COMUM;S;;SAO JOSE;BH;605849.93;798746.20;6135
+6137;2001327109;B04001;HOMICIDIO TENTAD;RUA GUSTAVO DA S;1693;32617;17/6/2001 15:40:00;CIDADAO COMUM;N;;SANTA INES;BH;613754.67;800364.22;6136
+6138;2001327143;B06000;LESAO CORPORAL;RUA NOSSA SENHOR;37;102834;17/6/2001 16:02:00;CIDADAO COMUM;S;;CEU AZUL;BH;603522.11;807505.18;6137
+6139;2001327192;B06000;LESAO CORPORAL;RUA FRANCISCO SE;2;119699;17/6/2001 16:36:00;CIDADAO COMUM;S;;VERA CRUZ;BH;617010.39;797762.35;6138
+6140;2001327224;B06000;LESAO CORPORAL;RUA BEIRA ALTA;85;62777;17/6/2001 16:53:00;CIDADAO COMUM;S;0;SAO FRANCISCO;BH;609881.41;802314.78;6139
+6141;2001327236;B03000;AMEACA;RUA MONTE SILVES;108;46561;17/6/2001 16:59:00;CIDADAO COMUM;S;;MINASLANDIA;BH;612316.79;804895.21;6140
+6142;2001327321;B04001;HOMICIDIO TENTAD;RUA ARTUR DE SA;1305;6211;17/6/2001 17:54:00;CIDADAO COMUM;S;;UNIAO;BH;613170.84;801684.18;6141
+6143;2001327344;B06000;LESAO CORPORAL;RUA TAMAREIRA;120;99740;17/6/2001 18:02:00;CIDADAO COMUM;S;;OLARIA;BH;601456.59;789210.66;6142
+6144;2001327348;B03000;AMEACA;RUA OLINTO MAGAL;1850;49834;17/6/2001 18:04:00;CIDADAO COMUM;S;;IPANEMA;BH;604865.84;797988.70;6143
+6145;2001327477;B03000;AMEACA;RUA ABRAHAO JOAO;86;80859;17/6/2001 19:07:00;CIDADAO COMUM;S;;PARQUE SAO JOSE;BH;607070.62;792177.61;6144
+6146;2001327494;B03000;AMEACA;PRACA NOSSA SENH;95;47942;17/6/2001 19:19:00;CIDADAO COMUM;S;;MILIONARIOS;BH;604200.40;790234.15;6145
+6147;2001327534;B06000;LESAO CORPORAL;RUA A;162;36460;17/6/2001 19:42:00;CIDADAO COMUM;S;0;MINASCAIXA;BH;609181.68;810054.73;6146
+6148;2001327554;B06000;LESAO CORPORAL;RUA VICENTE CUNH;55;71848;17/6/2001 19:55:00;CIDADAO COMUM;S;0;BOA VISTA;BH;615551.80;800264.65;6147
+6149;2001327575;B03000;AMEACA;RUA CAICARA;1696;11451;17/6/2001 20:05:00;CIDADAO COMUM;S;;CAETANO FURQUIM;BH;615995.71;799311.10;6148
+6150;2001327576;B06000;LESAO CORPORAL;RUA JANE EYRE;1227;36910;17/6/2001 20:05:00;CIDADAO COMUM;S;CSA;MINASLANDIA;BH;611848.15;804028.58;6149
+6151;2001327582;B06000;LESAO CORPORAL;RUA LIMA;15;41063;17/6/2001 20:09:00;CIDADAO COMUM;S;LJ1;COPACABANA;BH;606113.57;806114.27;6150
+6152;2001327590;B06000;LESAO CORPORAL;RUA ANA RAFAEL D;513;78572;17/6/2001 20:12:00;CIDADAO COMUM;N;;VILA SANTA RITA;BH;601339.91;787583.63;6151
+6153;2001327630;B03000;AMEACA;RUA SAN MARTIN;150;60208;17/6/2001 20:27:00;CIDADAO COMUM;S;CAB;UNIAO;BH;612640.75;801688.68;6152
+6154;2001327649;B06000;LESAO CORPORAL;RUA FREI ZACARIA;186;37610;17/6/2001 20:34:00;CIDADAO COMUM;S;PROX. FINAL DO 3;SARANDI (URCA/BH;BH;603664.32;802044.70;6153
+6155;2001327742;B04002;HOMICIDIO CONSUM;AV JOSE CANDIDO ;2468;12602;17/6/2001 21:29:00;CIDADAO COMUM;N;DROGARIA DROGAZA;DOM JOAQUIM;BH;613887.75;801512.24;6154
+6156;2001327772;B03000;AMEACA;RUA DA ABOLICAO;401;42242;17/6/2001 21:44:00;CIDADAO COMUM;S;;JARDIM DOS COMER;BH;607586.54;810989.54;6155
+6157;2001327817;B03000;AMEACA;RUA ESTRELA DA J;138;26705;17/6/2001 22:17:00;CIDADAO COMUM;N;FR462;VISTA ALEGRE;BH;604749.69;793333.72;6156
+6158;2001327832;B06000;LESAO CORPORAL;AV BRIGADEIRO ED;1099;2860;17/6/2001 22:26:00;CIDADAO COMUM;N;;GLORIA;BH;604209.92;798598.54;6157
+6159;2001327868;B03000;AMEACA;RUA JANAUBA;370;36891;17/6/2001 22:45:00;CIDADAO COMUM;0;;VISTA ALEGRE;BH;604535.02;793331.14;6158
+6160;2001327870;B03000;AMEACA;RUA NIASSA;60;47592;17/6/2001 22:47:00;CIDADAO COMUM;S;;SAO SALVADOR;BH;602868.95;799108.68;6159
+6161;2001327892;B06000;LESAO CORPORAL;RUA MARIA ROSA D;758;107800;17/6/2001 22:58:00;CIDADAO COMUM;N;;MANTIQUEIRA;BH;606487.47;811625.86;6160
+6162;2001327956;B06000;LESAO CORPORAL;RUA TUIUTI;1131;69849;17/6/2001 23:43:00;CIDADAO COMUM;N;0;PADRE EUSTAQUIO;BH;606881.12;797315.71;6161
+6163;2001327960;B06000;LESAO CORPORAL;BECO BOA ESPERAN;38;302223;17/6/2001 23:45:00;CIDADAO COMUM;S;0;MORRO DO PAPAGAI;BH;610876.57;793768.26;6162
+6164;2001327985;B03000;AMEACA;RUA DAS OLIVEIRA;86;78922;17/6/2001 23:58:00;CIDADAO COMUM;S;0;PADRE EUSTAQUIO;BH;606298.52;796974.69;6163
+6165;2001328011;B09000;ABANDONO DE INCA;RUA GARRET;1186;30678;18/6/2001 00:21:00;INICIATIVA;S;0;JARDIM AMERICA;BH;607366.16;794291.41;6164
+6166;2001328079;B06000;LESAO CORPORAL;RUA JOAO PIRES;508;37866;18/6/2001 01:33:00;CIDADAO COMUM;S;;CABANA;BH;604906.04;794212.99;6165
+6167;2001328087;B06000;LESAO CORPORAL;RUA AGGEO PIO;40;89711;18/6/2001 01:40:00;CIDADAO COMUM;S;0;PALMEIRAS;BH;606610.57;790431.18;6166
+6168;2001328091;B04001;HOMICIDIO TENTAD;AV BARAO HOMEM D;1500;7936;18/6/2001 01:51:00;INICIATIVA;N;0;LEONINA;BH;607932.09;793780.23;6167
+6169;2001328365;B06000;LESAO CORPORAL;RUA MARIA REGINA;759;124771;18/6/2001 08:52:00;INICIATIVA;S;0;CEU AZUL;BH;604595.45;807095.92;6168
+6170;2001328473;B06000;LESAO CORPORAL;AV BELEM;875;8913;18/6/2001 10:02:00;CIDADAO COMUM;S;0;VERA CRUZ;BH;615290.39;798197.24;6169
+6171;2001328662;B03000;AMEACA;RUA UARIRA;350;70136;18/6/2001 12:17:00;INICIATIVA;S;0;SAO GERALDO;BH;616162.91;799326.26;6170
+6172;2001328667;B04001;HOMICIDIO TENTAD;AV AFONSO PENA;1650;1259;18/6/2001 12:19:00;CIDADAO COMUM;N;0;CENTRO (BH);BH;611599.78;796278.99;6171
+6173;2001328669;B06000;LESAO CORPORAL;RUA DORIVAL MACH;618;42227;18/6/2001 12:20:00;CIDADAO COMUM;N;;SANTA MONICA;BH;607487.17;807388.25;6172
+6174;2001328845;B06000;LESAO CORPORAL;RUA LASSANCE;586;84415;18/6/2001 14:13:00;CIDADAO COMUM;S;;SAO GERALDO;BH;615776.61;799647.18;6173
+6175;2001328929;B03000;AMEACA;RUA CINCO;100;78037;18/6/2001 15:07:00;CIDADAO COMUM;N;;INDEPENDENCIA;BH;601512.54;786086.62;6174
+6176;2001328960;B06000;LESAO CORPORAL;RUA ASSEMBLEIA;217;6338;18/6/2001 15:30:00;CIDADAO COMUM;S;;LUXEMBURGO;BH;609594.93;794581.12;6175
+6177;2001329136;B06000;LESAO CORPORAL;RUA PROFESSORA G;370;86335;18/6/2001 17:08:00;CIDADAO COMUM;N;0;FLORAMAR;BH;611783.09;807548.07;6176
+6178;2001329145;B03000;AMEACA;RUA TRES;71;76476;18/6/2001 17:14:00;CIDADAO COMUM;S;;REGINA;BH;599087.41;789774.50;6177
+6179;2001329160;B03000;AMEACA;RUA DONA CLARA;233;22859;18/6/2001 17:26:00;CIDADAO COMUM;S;;PARQUE RIACHUELO;BH;609877.61;800349.00;6178
+6180;2001329176;B03000;AMEACA;RUA SAO PAULO;1033;63464;18/6/2001 17:32:00;CIDADAO COMUM;N;0;CENTRO (BH);BH;610899.52;796753.82;6179
+6181;2001329379;B03000;AMEACA;RUA SANTO AGOSTI;1271;61557;18/6/2001 19:17:00;CIDADAO COMUM;N;;INSTITUTO AGRONO;BH;613648.90;799370.40;6180
+6182;2001329382;B04001;HOMICIDIO TENTAD;RUA PATROCINIO;118;52574;18/6/2001 19:17:00;CIDADAO COMUM;N;;CARLOS PRATES;BH;609914.10;797517.10;6181
+6183;2001329468;B06000;LESAO CORPORAL;RUA OBI;2;49052;18/6/2001 20:03:00;CIDADAO COMUM;S;;CH BETANIA;BH;605192.56;792417.97;6182
+6184;2001329495;B04002;HOMICIDIO CONSUM;AV CIVILIZACAO;889;51657;18/6/2001 20:20:00;CIDADAO COMUM;N;0;VILA SANTA BRANC;BH;609155.17;808648.71;6183
+6185;2001329508;B06000;LESAO CORPORAL;RUA ALICE TERAIA;200;92767;18/6/2001 20:26:00;INICIATIVA;S;0;PILAR;BH;607185.13;788258.51;6184
+6186;2001329511;B06000;LESAO CORPORAL;RUA BEZERRA DE M;94;9525;18/6/2001 20:28:00;CIDADAO COMUM;N;0;NAZARE;BH;615431.97;804557.49;6185
+6187;2001329529;B03000;AMEACA;RUA RIACHO;80;24927;18/6/2001 20:39:00;CIDADAO COMUM;S;;TAQUARIL;BH;617249.69;797177.50;6186
+6188;2001329603;B08000;VIOLACAO DE DOMI;RUA HENRIQUE BAD;171;86020;18/6/2001 21:35:00;CIDADAO COMUM;S;;PARQUE SAO JOSE;BH;607178.34;792364.15;6187
+6189;2001329650;B03000;AMEACA;ALAMEDA VARGEM G;38;95967;18/6/2001 22:24:00;CIDADAO COMUM;S;0;VILA CASTANHEIRA;BH;601365.77;788667.34;6188
+6190;2001329697;B06000;LESAO CORPORAL;RUA BANDONION;472;170139;18/6/2001 22:55:00;CIDADAO COMUM;S;PX472;VILA CAFEZAL;BH;614136.44;794775.38;6189
+6191;2001329821;B06000;LESAO CORPORAL;AV OIAPOQUE;85;49166;19/6/2001 00:47:00;INICIATIVA;S;0;CENTRO (BH);BH;611176.91;797703.67;6190
+6192;2001329825;B06000;LESAO CORPORAL;RUA CORREGO DA M;400;18160;19/6/2001 00:49:00;CIDADAO COMUM;N;AP902;HORTO;BH;613235.32;798042.59;6191
+6193;2001329874;B03000;AMEACA;AV SERRANA;217;65040;19/6/2001 02:20:00;CIDADAO COMUM;S;;SERRANO;BH;603435.57;801125.64;6192
+6194;2001329900;B06000;LESAO CORPORAL;AV OIAPOQUE;280;49166;19/6/2001 03:19:00;INICIATIVA;S;0;CENTRO (BH);BH;610908.21;797831.05;6193
+6195;2001329991;B04001;HOMICIDIO TENTAD;RUA DAS GABIROBA;5;30375;19/6/2001 07:29:00;CIDADAO COMUM;N;;VILA CLORIS;BH;610034.72;808298.49;6194
+6196;2001330003;B06000;LESAO CORPORAL;RUA PARACATU;1570;52095;19/6/2001 07:44:00;CIDADAO COMUM;S;;SANTO AGOSTINHO;BH;609475.97;795885.87;6195
+6197;2001330261;B03000;AMEACA;RUA ALVARENGA;30;74502;19/6/2001 10:27:00;INICIATIVA;N;INICIATIVA DA VP;PRIMEIRO DE NOVE;BH;612312.21;805334.82;6196
+6198;2001330306;B06000;LESAO CORPORAL;RUA LAGOA DOS PA;41;40190;19/6/2001 10:54:00;CIDADAO COMUM;S;0;JARDIM LEBLON;BH;605679.60;807460.55;6197
+6199;2001330376;B03000;AMEACA;RUA SAO JOAO EVA;676;62865;19/6/2001 11:36:00;CIDADAO COMUM;S;0;SANTO ANTONIO;BH;610809.68;794146.08;6198
+6200;2001330419;B03000;AMEACA;PRACA COMENDADOR;10;16395;19/6/2001 12:12:00;INICIATIVA;S;0;FLORESTA;BH;611966.10;798060.14;6199
+6201;2001330451;B03000;AMEACA;RUA CORONEL MARC;281;17978;19/6/2001 12:43:00;CIDADAO COMUM;S;;SANTA ROSA;BH;610254.94;803257.66;6200
+6202;2001330484;B03000;AMEACA;RUA BOM JESUS DA;659;99680;19/6/2001 13:06:00;CIDADAO COMUM;N;BL47    AP1003;SANTA TEREZINHA;BH;604062.02;802892.42;6201
+6203;2001330499;B06000;LESAO CORPORAL;RUA STA APOLONIA;120;60352;19/6/2001 13:15:00;CIDADAO COMUM;S;0;DOM JOAQUIM;BH;614079.87;802000.80;6202
+6204;2001330555;B03000;AMEACA;RUA FRANCISCO RO;64;10994;19/6/2001 13:44:00;CIDADAO COMUM;S;;DOM JOAQUIM;BH;613740.83;801756.15;6203
+6205;2001330623;B03000;AMEACA;RUA AQUILES LOBO;470;5219;19/6/2001 14:41:00;CIDADAO COMUM;S;;FLORESTA;BH;611971.87;797103.12;6204
+6206;2001330632;B03000;AMEACA;RUA ENGENHEIRO A;103;25500;19/6/2001 14:46:00;CIDADAO COMUM;S;;FLORAMAR;BH;611346.97;806271.04;6205
+6207;2001330720;B03000;AMEACA;AV AUGUSTO DE LI;1549;6731;19/6/2001 15:53:00;INICIATIVA;S;;BARRO PRETO;BH;609833.79;796889.71;6206
+6208;2001330833;B06000;LESAO CORPORAL;RUA PAULO KRUGER;230;55910;19/6/2001 16:46:00;CIDADAO COMUM;N;0;FLORAMAR;BH;611701.18;806916.68;6207
+6209;2001330896;B04001;HOMICIDIO TENTAD;RUA DONA CARMEM;741;22820;19/6/2001 17:22:00;CIDADAO COMUM;S;0;SARANDI (URCA/BH;BH;604141.60;802506.92;6208
+6210;2001330963;B02000;RIXA;RUA DA OLARIA;507;18640;19/6/2001 18:05:00;CIDADAO COMUM;N;REF:PROXIMO COGR;OLARIA;BH;601386.46;789148.72;6209
+6211;2001331052;B03000;AMEACA;RUA VIOLETA DE M;178;80253;19/6/2001 18:56:00;CIDADAO COMUM;S;0;SAO JOSE;BH;605196.32;799173.61;6210
+6212;2001331096;B06000;LESAO CORPORAL;RUA JOSE JORGE F;70;38884;19/6/2001 19:14:00;CIDADAO COMUM;S;;NOVA BARROCA;BH;607287.63;792753.33;6211
+6213;2001331262;B03000;AMEACA;RUA ESTADOS UNID;337;26239;19/6/2001 20:34:00;CIDADAO COMUM;S;LJ1;COPACABANA;BH;606183.03;806063.64;6212
+6214;2001331297;B03000;AMEACA;AV PARANA;200;52230;19/6/2001 20:55:00;INICIATIVA;N;0;CENTRO (BH);BH;610763.62;797326.10;6213
+6215;2001331304;B04002;HOMICIDIO CONSUM;RUA PRINCIPAL;300;170504;19/6/2001 20:59:00;INICIATIVA;N;0;MORRO DAS PEDRAS;BH;608596.19;793933.42;6214
+6216;2001331314;B03000;AMEACA;AV JOSE BONIFACI;189;38579;19/6/2001 21:07:00;INICIATIVA;S;0;PRADO LOPES;BH;610210.56;798939.37;6215
+6217;2001331344;B04002;HOMICIDIO CONSUM;RUA URSULA PAULI;1728;71066;19/6/2001 21:27:00;INICIATIVA;N;0;SALGADO FILHO;BH;605896.08;792802.21;6216
+6218;2001331359;B06000;LESAO CORPORAL;RUA DR PEDRO RUE;700;113853;19/6/2001 21:36:00;CIDADAO COMUM;N;;LETICIA;BH;607002.38;809601.56;6217
+6219;2001331367;B03000;AMEACA;RUA BEIRA MAR;421;94992;19/6/2001 21:40:00;CIDADAO COMUM;S;;SARANDI (URCA/BH;BH;603053.29;802253.83;6218
+6220;2001331373;B03000;AMEACA;RUA CALDAS DA RA;506;61100;19/6/2001 21:43:00;CIDADAO COMUM;S;;SAO FRANCISCO;BH;609820.95;802507.00;6219
+6221;2001331413;B04001;HOMICIDIO TENTAD;RUA FERNAO DIAS;100;28133;19/6/2001 22:05:00;INICIATIVA;N;0;CASA BRANCA;BH;616308.02;799694.32;6220
+6222;2001331494;B06000;LESAO CORPORAL;RUA DOS TUPIS;337;69965;19/6/2001 23:06:00;CIDADAO COMUM;S;;CENTRO (BH);BH;610958.56;796903.24;6221
+6223;2001331513;B06000;LESAO CORPORAL;RUA OSCAR TROMPO;1372;50452;19/6/2001 23:19:00;INICIATIVA;S;;MORRO DAS PEDRAS;BH;608553.52;794568.52;6222
+6224;2001331519;B04001;HOMICIDIO TENTAD;RUA GENTIOS;1350;30983;19/6/2001 23:21:00;CIDADAO COMUM;S;;CORACAO DE JESUS;BH;608905.13;793585.28;6223
+6225;2001331529;B04001;HOMICIDIO TENTAD;AV PORTUGAL;150;54816;19/6/2001 23:32:00;CIDADAO COMUM;N;;JARDIM ATLANTICO;BH;605670.52;806041.29;6224
+6226;2001331553;B03000;AMEACA;RUA MARIA DA GLO;63;86288;19/6/2001 23:49:00;CIDADAO COMUM;S;CS02;JAQUELINE;BH;611227.16;810173.00;6225
+6227;2001331562;B03000;AMEACA;RUA PROFESSOR MI;220;91128;19/6/2001 23:54:00;CIDADAO COMUM;S;APTO 102;BURITIS;BH;607948.05;790719.17;6226
+6228;2001331618;B06000;LESAO CORPORAL;RUA GUAICURUS;451;32009;20/6/2001 00:44:00;CIDADAO COMUM;S;PX428;CENTRO (BH);BH;611210.22;797600.57;6227
+6229;2001331632;B04002;HOMICIDIO CONSUM;AV CRISTIANO MAC;5397;18652;20/6/2001 00:53:00;CIDADAO COMUM;N;;SAO PAULO;BH;612256.79;802178.98;6228
+6230;2001331635;B03000;AMEACA;RUA PITANGUI;33;54365;20/6/2001 00:56:00;CIDADAO COMUM;N;0;SAO CRISTOVAO;BH;610543.96;799415.99;6229
+6231;2001331739;B04001;HOMICIDIO TENTAD;RUA BARAO DE COR;586;7910;20/6/2001 03:47:00;CIDADAO COMUM;S;;SAO TOMAZ;BH;610052.00;805335.74;6230
+6232;2001331772;B06000;LESAO CORPORAL;RUA DOUTOR CEZAR;145;80962;20/6/2001 05:06:00;CIDADAO COMUM;N;;NOVA CINTRA;BH;605479.20;793361.18;6231
+6233;2001331818;B04002;HOMICIDIO CONSUM;RUA QUATRO DE MA;6;57118;20/6/2001 06:56:00;CIDADAO COMUM;N;0;LEONINA;BH;608650.19;793692.46;6232
+6234;2001332186;B06000;LESAO CORPORAL;RUA DAS FLORES;200;170214;20/6/2001 11:18:00;CIDADAO COMUM;N;CAB;CABANA;BH;604375.80;794455.85;6233
+6235;2001332248;B03000;AMEACA;AV PRESIDENTE CA;1185;55125;20/6/2001 12:04:00;CIDADAO COMUM;S;CS;CAICARA;BH;608290.93;799772.80;6234
+6236;2001332295;B06000;LESAO CORPORAL;RUA JACUI;1131;36734;20/6/2001 12:36:00;INICIATIVA;N;0;CONCORDIA;BH;611706.90;799025.84;6235
+6237;2001332335;B03000;AMEACA;RUA IBIRAPITANGA;59;33880;20/6/2001 13:11:00;CIDADAO COMUM;S;;DOM CABRAL;BH;605182.78;796323.06;6236
+6238;2001332348;B03000;AMEACA;RUA JOSUE MARTIN;464;84821;20/6/2001 13:18:00;CIDADAO COMUM;N;;DA LAGOA;BH;604491.32;809555.61;6237
+6239;2001332393;B03000;AMEACA;RUA RUI GUERRA;20;301669;20/6/2001 13:45:00;CIDADAO COMUM;S;;VILA CAFEZAL;BH;614477.59;795128.95;6238
+6240;2001332458;B03000;AMEACA;RUA VASCO DA GAM;334;71330;20/6/2001 14:26:00;CIDADAO COMUM;S;0;SAO BERNARDO;BH;611151.08;804995.87;6239
+6241;2001332506;B03000;AMEACA;RUA VOLTS;40;73626;20/6/2001 15:02:00;CIDADAO COMUM;S;;PRIMEIRO DE MAIO;BH;612172.58;803421.57;6240
+6242;2001332547;B06000;LESAO CORPORAL;RUA CARDEAL;18;103001;20/6/2001 15:26:00;INICIATIVA;N;0;CONJUNTO ALIPIO ;BH;604210.73;799874.42;6241
+6243;2001332720;B06000;LESAO CORPORAL;RUA ANTARES;70;4244;20/6/2001 16:57:00;INICIATIVA;S;0;SANTA LUCIA;BH;610151.02;793124.83;6242
+6244;2001332733;B05000;SEQUESTRO E CARC;RUA JULIO PEREIR;298;102239;20/6/2001 17:02:00;INICIATIVA;N;0;CIDADE NOVA;BH;612286.60;800677.40;6243
+6245;2001332761;B03000;AMEACA;AV CIVILIZACAO;911;51657;20/6/2001 17:16:00;CIDADAO COMUM;S;;JARDIM FLORENCIA;BH;609133.74;808652.87;6244
+6246;2001332797;B03000;AMEACA;RUA ANGELINA DE ;1076;96207;20/6/2001 17:36:00;CIDADAO COMUM;S;;DOM SILVERIO;BH;615236.49;804525.63;6245
+6247;2001332806;B03000;AMEACA;AV SANTA TEREZIN;355;61415;20/6/2001 17:42:00;CIDADAO COMUM;S;;SANTA TEREZINHA;BH;604513.16;802496.64;6246
+6248;2001332833;B06000;LESAO CORPORAL;RUA SESSENTA E U;160;33689;20/6/2001 17:54:00;CIDADAO COMUM;S;0;CONJUNTO FELICID;BH;612483.89;806937.99;6247
+6249;2001332933;B03000;AMEACA;RUA ESTORIL;133;63827;20/6/2001 18:41:00;CIDADAO COMUM;S;;SAO FRANCISCO;BH;609800.46;802609.37;6248
+6250;2001333044;B06000;LESAO CORPORAL;RUA DA PAZ;110;31236;20/6/2001 19:32:00;CIDADAO COMUM;S;;CONJ HAB JARDIM ;BH;603850.05;798083.86;6249
+6251;2001333048;B06000;LESAO CORPORAL;AV BERNARDO VASC;837;9411;20/6/2001 19:33:00;CIDADAO COMUM;N;0;CACHOEIRINHA;BH;610594.13;800829.58;6250
+6252;2001333051;B03000;AMEACA;RUA PROFESSORA A;90;59923;20/6/2001 19:28:00;CIDADAO COMUM;S;;CAETANO FURQUIM;BH;616394.40;799545.27;6251
+6253;2001333134;B04001;HOMICIDIO TENTAD;RUA PROFESSOR PI;29;55658;20/6/2001 20:37:00;CIDADAO COMUM;N;0;CIDADE NOVA;BH;612187.10;800801.34;6252
+6254;2001333224;B03000;AMEACA;RUA DOS TUPINAMB;953;69940;20/6/2001 21:36:00;CIDADAO COMUM;S;APTO 1207;CENTRO (BH);BH;610646.84;797421.18;6253
+6255;2001333234;B03000;AMEACA;RUA CRISTAL;83;18611;20/6/2001 21:38:00;CIDADAO COMUM;S;0;SANTA TEREZA;BH;612657.77;797382.69;6254
+6256;2001333296;B03000;AMEACA;RUA ARISTIDES VI;75;84471;20/6/2001 22:24:00;CIDADAO COMUM;S;;MARIA GORETTI;BH;614483.20;803729.27;6255
+6257;2001333297;B06000;LESAO CORPORAL;AV OIAPOQUE;242;49166;20/6/2001 22:26:00;INICIATIVA;S;0;CENTRO (BH);BH;610939.71;797820.89;6256
+6258;2001333303;B03000;AMEACA;RUA EUCLASIO;474;26787;20/6/2001 22:25:00;CIDADAO COMUM;S;0;SANTA EFIGENIA;BH;613904.16;796503.28;6257
+6259;2001333380;B03000;AMEACA;RUA ITAI;959;35413;20/6/2001 23:12:00;CIDADAO COMUM;S;0;SANTA EFIGENIA;BH;613839.32;796099.97;6258
+6260;2001333415;B04002;HOMICIDIO CONSUM;RUA STO ANTONIO;5;61759;20/6/2001 23:29:00;CIDADAO COMUM;S;;SAO TOMAZ;BH;609947.81;805765.49;6259
+6261;2001333440;B06000;LESAO CORPORAL;RUA PURUS;125;55819;20/6/2001 23:40:00;CIDADAO COMUM;N;0;CONCORDIA;BH;611069.17;799069.41;6260
+6262;2001333517;B06000;LESAO CORPORAL;RUA ANDARAI;286;3720;21/6/2001 01:05:00;CIDADAO COMUM;N;0;NOVA VISTA (SB);SB;615301.42;800837.38;6261
+6263;2001333630;B03000;AMEACA;AV PRESIDENTE CA;320;55125;21/6/2001 04:18:00;INICIATIVA;S;0;CAMPUS UFMG;BH;608476.86;798679.56;6262
+6264;2001333881;B03000;AMEACA;AV PARANAIBA;429;52256;21/6/2001 09:18:00;CIDADAO COMUM;S;;SENHOR BOM JESUS;BH;609777.38;799943.11;6263
+6265;2001333883;B03000;AMEACA;AV DOS ANDRADAS;3540;3761;21/6/2001 09:20:00;CIDADAO COMUM;S;;SANTA EFIGENIA;BH;613913.55;797194.26;6264
+6266;2001333922;B03000;AMEACA;RUA CRUCILANDIA;55;18781;21/6/2001 09:44:00;CIDADAO COMUM;N;;JARDIM LEBLON;BH;605926.67;807569.38;6265
+6267;2001333998;B06000;LESAO CORPORAL;RUA ERNESTO AUST;420;25784;21/6/2001 10:37:00;CIDADAO COMUM;N;;BOA VISTA;BH;614936.22;799730.60;6266
+6268;2001334006;B04001;HOMICIDIO TENTAD;RUA CINQUENTA;350;302845;21/6/2001 10:42:00;INICIATIVA;S;0;TUPI;BH;614150.27;805475.49;6267
+6269;2001334147;B06000;LESAO CORPORAL;RUA AUGUSTO JOSE;283;6729;21/6/2001 12:10:00;CIDADAO COMUM;N;;BETANIA;BH;605791.54;792055.74;6268
+6270;2001334211;B08000;VIOLACAO DE DOMI;RUA OFICINAS;329;49140;21/6/2001 13:01:00;CIDADAO COMUM;N;;ESPLANADA;BH;614686.26;798740.80;6269
+6271;2001334490;B03000;AMEACA;RUA LAJEDO;530;130034;21/6/2001 15:53:00;CIDADAO COMUM;S;;SAO GABRIEL;BH;614592.06;804513.45;6270
+6272;2001334502;B04001;HOMICIDIO TENTAD;RUA JUSCELINO KU;45;74861;21/6/2001 16:00:00;CIDADAO COMUM;N;;JARDIM VITORIA;BH;616747.23;804553.20;6271
+6273;2001334566;B03000;AMEACA;RUA F DOIS;1;28653;21/6/2001 16:25:00;CIDADAO COMUM;S;;CAPITAO EDUARDO;BH;618568.08;806941.06;6272
+6274;2001334584;B03000;AMEACA;RUA TOME DE SOUZ;920;67998;21/6/2001 16:36:00;CIDADAO COMUM;N;;FUNCIONARIOS;BH;611510.63;795206.41;6273
+6275;2001334682;B03000;AMEACA;RUA SAO TOMAS;17;63770;21/6/2001 17:25:00;CIDADAO COMUM;N;;PLANALTO;BH;610686.83;805550.99;6274
+6276;2001334696;B03000;AMEACA;AV AMAZONAS;345;3140;21/6/2001 17:32:00;INICIATIVA;N;0;CENTRO (BH);BH;611084.15;797100.95;6275
+6277;2001334831;B06000;LESAO CORPORAL;RUA BANDONION;172;170139;21/6/2001 18:43:00;CIDADAO COMUM;S;0;VILA CAFEZAL;BH;613977.41;795089.89;6276
+6278;2001335098;B04001;HOMICIDIO TENTAD;RUA SERINGUEIRA;300;90471;21/6/2001 21:06:00;CIDADAO COMUM;S;0;PATROCINIO;BH;605268.53;794551.84;6277
+6279;2001335107;B06000;LESAO CORPORAL;RUA JOAQUIM DE F;1479;38033;21/6/2001 21:15:00;INICIATIVA;S;;SANTA HELENA (BH;BH;603134.26;789846.88;6278
+6280;2001335108;B09000;ABANDONO DE INCA;RUA CANDIDA FERR;5;12542;21/6/2001 21:14:00;POLICIAL MILITAR;S;;NOVA GAMELEIRA;BH;605763.19;794511.59;6279
+6281;2001335112;B06000;LESAO CORPORAL;RUA HELIUM;449;32976;21/6/2001 21:18:00;CIDADAO COMUM;S;;NOVA FLORESTA;BH;611770.19;800159.48;6280
+6282;2001335155;B06000;LESAO CORPORAL;AV OIAPOQUE;184;49166;21/6/2001 21:50:00;CIDADAO COMUM;N;0;CENTRO BH;BH;610988.22;797810.47;6281
+6283;2001335157;B03000;AMEACA;RUA DOS MAIAS;114;83999;21/6/2001 21:52:00;CIDADAO COMUM;S;CA03;SANTA MONICA;BH;607253.67;807274.56;6282
+6284;2001335172;B04001;HOMICIDIO TENTAD;AV JOSE BONIFACI;284;38579;21/6/2001 22:02:00;INICIATIVA;N;0;PRADO LOPES;BH;610129.14;799078.88;6283
+6285;2001335185;B04001;HOMICIDIO TENTAD;AV CRISTIANO MAC;5555;18652;21/6/2001 22:12:00;POLICIAL MILITAR;S;0;DOS PALMARES;BH;612227.11;802603.49;6284
+6286;2001335235;B03000;AMEACA;RUA PROFESSORA G;520;86335;21/6/2001 22:56:00;CIDADAO COMUM;S;;FLORAMAR;BH;611761.04;807676.30;6285
+6287;2001335261;B03000;AMEACA;RUA JULIA LOPES ;108;95333;21/6/2001 23:09:00;CIDADAO COMUM;S;;SANTA MARIA;BH;603320.49;795112.03;6286
+6288;2001335286;B03000;AMEACA;RUA FELICIDADE;70;25743;21/6/2001 23:28:00;CIDADAO COMUM;S;0;TAQUARIL;BH;617179.69;797703.11;6287
+6289;2001335330;B03000;AMEACA;RUA TABELIAO FER;207;66692;22/6/2001 00:05:00;INICIATIVA;S;0;CIDADE NOVA;BH;612332.83;800624.31;6288
+6290;2001335365;B04001;HOMICIDIO TENTAD;RUA RODRIGUES DO;45;59154;22/6/2001 00:31:00;CIDADAO COMUM;N;0;ERMELINDA;BH;608945.83;801127.50;6289
+6291;2001335427;B06000;LESAO CORPORAL;AV AMAZONAS;1746;3140;22/6/2001 01:38:00;CIDADAO COMUM;S;;BARRO PRETO;BH;609974.58;796529.68;6290
+6292;2001335428;B03000;AMEACA;RUA ANTONIO JOSE;300;7431;22/6/2001 01:38:00;CIDADAO COMUM;0;0;CEU AZUL;BH;605178.86;807552.02;6291
+6293;2001335492;B02000;RIXA;RUA PADRE PEDRO ;5631;51657;22/6/2001 02:50:00;INICIATIVA;N;0;MANTIQUEIRA;BH;606035.58;809984.17;6292
+6294;2001335562;B03000;AMEACA;RUA CLAUDIO MANO;47;15972;22/6/2001 04:52:00;CIDADAO COMUM;N;0;FUNCIONARIOS;BH;612460.15;795339.86;6293
+6295;2001335644;B03000;AMEACA;RUA OITO;56;84819;22/6/2001 07:30:00;CIDADAO COMUM;N;;DA LAGOA;BH;604483.44;809351.75;6294
+6296;2001335668;B04001;HOMICIDIO TENTAD;RUA BOAVENTURA;361;9783;22/6/2001 07:53:00;CIDADAO COMUM;S;;VILA INDAIA;BH;607139.57;802390.07;6295
+6297;2001335967;B03000;AMEACA;AV DO CONTORNO;3800;17228;22/6/2001 11:23:00;CIDADAO COMUM;S;;SAO LUCAS;BH;612975.85;796174.37;6296
+6298;2001336449;B06000;LESAO CORPORAL;AV DO CONTORNO;8372;17228;22/6/2001 16:53:00;CIDADAO COMUM;N;;CENTRO (BH);BH;609515.14;795627.09;6297
+6299;2001336490;B06000;LESAO CORPORAL;RUA CLOVIS DE SO;138;118642;22/6/2001 17:14:00;INICIATIVA;N;0;REGINA;BH;598943.95;789862.49;6298
+6300;2001336510;B03000;AMEACA;RUA BOM JESUS DA;497;99680;22/6/2001 17:23:00;CIDADAO COMUM;S;0;SANTA TEREZINHA;BH;604100.08;802814.35;6299
+6301;2001336624;B03000;AMEACA;RUA VOLGA;37;73581;22/6/2001 18:25:00;CIDADAO COMUM;S;;COQUEIROS;BH;602559.03;799047.10;6300
+6302;2001336641;B03000;AMEACA;RUA LIMEIRA;275;54050;22/6/2001 18:32:00;CIDADAO COMUM;S;;PIRATININGA;BH;606243.18;809547.88;6301
+6303;2001336650;B03000;AMEACA;RUA IPAMERI;310;14825;22/6/2001 18:33:00;CIDADAO COMUM;N;;ARAGUAIA;BH;605162.04;789659.13;6302
+6304;2001336843;B04001;HOMICIDIO TENTAD;RUA SAO GERALDO;73;170283;22/6/2001 19:52:00;CIDADAO COMUM;N;;CABANA;BH;604695.64;794127.52;6303
+6305;2001336866;B03000;AMEACA;RUA AUREO DRUMON;35;117435;22/6/2001 20:06:00;CIDADAO COMUM;S;0;CASA BRANCA;BH;616403.94;799816.82;6304
+6306;2001336877;B03000;AMEACA;RUA SAO PAULO;848;63464;22/6/2001 20:12:00;CIDADAO COMUM;S;AP1104;CENTRO (BH);BH;610915.13;796961.87;6305
+6307;2001336880;B06000;LESAO CORPORAL;RUA IRACEMA;34;34896;22/6/2001 20:14:00;CIDADAO COMUM;S;C;VILA HUMAITA;BH;610298.98;801523.27;6306
+6308;2001336908;B06000;LESAO CORPORAL;RUA FLOR DE ABRI;75;28464;22/6/2001 20:27:00;CIDADAO COMUM;N;0;JARDIM MONTANHES;BH;605861.84;799044.97;6307
+6309;2001336942;B06000;LESAO CORPORAL;AV AMAZONAS;5253;3140;22/6/2001 20:48:00;INICIATIVA;S;0;NOVA SUISSA;BH;606825.09;795951.48;6308
+6310;2001337020;B03000;AMEACA;RUA JULIO DE CAS;234;39470;22/6/2001 21:33:00;CIDADAO COMUM;S;;CINQUENTENARIO;BH;606434.93;792926.11;6309
+6311;2001337044;B06000;LESAO CORPORAL;RUA ZONA DA MATA;110;74049;22/6/2001 21:48:00;CIDADAO COMUM;S;0;SANTA AMELIA;BH;607020.99;806347.09;6310
+6312;2001337108;B04001;HOMICIDIO TENTAD;RUA BARREIRO GRA;120;8258;22/6/2001 22:27:00;INICIATIVA;N;0;MARIA GORETTI;BH;614113.53;803391.42;6311
+6313;2001337246;B04001;HOMICIDIO TENTAD;RUA PADRE PEDRO ;322;51657;22/6/2001 23:46:00;CIDADAO COMUM;S;UPA VENDA NOVA;VILA SANTO ANTON;BH;609650.08;808286.90;6312
+6314;2001337247;B06000;LESAO CORPORAL;AV TERESA CRISTI;6778;67512;22/6/2001 23:48:00;INICIATIVA;S;0;CINQUENTENARIO;BH;606046.64;793197.39;6313
+6315;2001337286;B06000;LESAO CORPORAL;RUA CONEGO SANTA;881;16859;23/6/2001 00:15:00;CIDADAO COMUM;S;0;CACHOEIRINHA;BH;610516.02;800779.29;6314
+6316;2001337321;B06000;LESAO CORPORAL;RUA URANDI;150;70974;23/6/2001 00:41:00;CIDADAO COMUM;S;;CONCORDIA;BH;611599.58;799038.35;6315
+6317;2001337385;B06000;LESAO CORPORAL;RUA SAO PAULO;279;63464;23/6/2001 01:22:00;CIDADAO COMUM;S;;CENTRO (BH);BH;611088.02;797493.26;6316
+6318;2001337403;B03000;AMEACA;RUA IARA;312;33751;23/6/2001 01:36:00;CIDADAO COMUM;N;;POMPEIA;BH;614667.76;797898.82;6317
+6319;2001337488;B06000;LESAO CORPORAL;RUA MARCO AURELI;32;61821;23/6/2001 02:44:00;INICIATIVA;S;0;NAZARE;BH;615693.25;804691.63;6318
+6320;2001337508;B06000;LESAO CORPORAL;RUA ESPIRITO SAN;101;26052;23/6/2001 02:58:00;CIDADAO COMUM;S;0;CENTRO (BH);BH;611395.36;797540.06;6319
+6321;2001337521;B04001;HOMICIDIO TENTAD;AV BERNARDO VASC;2717;9411;23/6/2001 03:11:00;CIDADAO COMUM;N;;IPIRANGA;BH;612138.82;801992.11;6320
+6322;2001337610;B04002;HOMICIDIO CONSUM;AV CORONEL DURVA;732;17688;23/6/2001 04:42:00;CIDADAO COMUM;N;;DURVAL DE BARROS;BH;598151.28;790894.64;6321
+6323;2001337677;B03000;AMEACA;RUA DES BRAULIO;247;19917;23/6/2001 06:15:00;CIDADAO COMUM;S;;VERA CRUZ;BH;616279.66;797686.69;6322
+6324;2001337752;B04001;HOMICIDIO TENTAD;RUA CINQUENTA;290;106100;23/6/2001 08:12:00;CIDADAO COMUM;N;;JARDIM DOS COMER;BH;608410.77;810960.29;6323
+6325;2001337761;B03000;AMEACA;RUA DES SARAIVA;1001;66535;23/6/2001 08:16:00;CIDADAO COMUM;S;CAFU;VERA CRUZ;BH;616098.29;797767.22;6324
+6326;2001337775;B03000;AMEACA;RUA AMILCAR CABR;250;5146;23/6/2001 08:26:00;CIDADAO COMUM;S;AP303;MILIONARIOS;BH;604246.18;790098.14;6325
+6327;2001337780;B06000;LESAO CORPORAL;RUA RIBEIRAO DAS;54;46688;23/6/2001 08:33:00;CIDADAO COMUM;N;0;PARAISO;BH;614140.00;796036.93;6326
+6328;2001337790;B04001;HOMICIDIO TENTAD;BECO SAO JOAO DE;220;171084;23/6/2001 08:37:00;CIDADAO COMUM;N;0;CABANA;BH;604606.84;793833.50;6327
+6329;2001337799;B03000;AMEACA;RUA ALICE;234;170949;23/6/2001 08:45:00;CIDADAO COMUM;N;0;MORRO DAS PEDRAS;BH;608002.45;793792.58;6328
+6330;2001337820;B03000;AMEACA;RUA CARACA;948;12990;23/6/2001 09:08:00;CIDADAO COMUM;S;;SERRA;BH;613753.87;794503.33;6329
+6331;2001337934;B03000;AMEACA;RUA TIPUANA;590;74300;23/6/2001 10:45:00;CIDADAO COMUM;S;;JULIANA;BH;610702.83;809126.98;6330
+6332;2001337941;B03000;AMEACA;AV WALDIR SOEIRO;345;118904;23/6/2001 10:49:00;CIDADAO COMUM;S;CAFDS;DAS INDUSTRIAS;BH;601686.77;788954.10;6331
+6333;2001337964;B06000;LESAO CORPORAL;RUA AUGUSTO FERR;410;85575;23/6/2001 11:11:00;CIDADAO COMUM;N;;SERRA VERDE;BH;609753.87;810385.88;6332
+6334;2001338027;B03000;AMEACA;RUA JORGE ANTONI;86;86391;23/6/2001 11:55:00;CIDADAO COMUM;0;;LETICIA;BH;606706.48;809837.19;6333
+6335;2001338105;B03000;AMEACA;RUA TEN ANASTACI;486;67263;23/6/2001 12:50:00;CIDADAO COMUM;N;0;SANTA EFIGENIA;BH;613443.83;796627.00;6334
+6336;2001338144;B03000;AMEACA;RUA TEBAS;840;67090;23/6/2001 13:28:00;POLICIAL MILITAR;S;0;VERA CRUZ;BH;616073.41;798319.09;6335
+6337;2001338191;B03000;AMEACA;RUA CONEGO ROCHA;47;16833;23/6/2001 13:52:00;CIDADAO COMUM;S;AP302;GUTIERREZ;BH;609565.01;795498.13;6336
+6338;2001338232;B03000;AMEACA;RUA ROSA MARIA S;106;20131;23/6/2001 14:22:00;CIDADAO COMUM;S;0;ITAPOA;BH;609283.13;806438.01;6337
+6339;2001338238;B04001;HOMICIDIO TENTAD;RUA ALICE;5;170949;23/6/2001 14:25:00;CIDADAO COMUM;S;0;MORRO DAS PEDRAS;BH;608015.47;793880.36;6338
+6340;2001338275;B06000;LESAO CORPORAL;RUA JOSE OVIDIO ;671;10298;23/6/2001 14:50:00;CIDADAO COMUM;N;;CARDOSO;BH;603962.71;787984.77;6339
+6341;2001338325;B03000;AMEACA;RUA NICOLAU COEL;45;119759;23/6/2001 15:18:00;CIDADAO COMUM;S;;VERA CRUZ;BH;616495.40;797313.44;6340
+6342;2001338332;B03000;AMEACA;AV SANTOS DUMONT;596;61950;23/6/2001 15:23:00;CIDADAO COMUM;S;AN1;CENTRO (BH);BH;611062.63;797591.94;6341
+6343;2001338345;B03000;AMEACA;RUA BERTOPOLIS;404;41873;23/6/2001 15:31:00;CIDADAO COMUM;S;0;PROVIDENCIA;BH;612526.93;804327.60;6342
+6344;2001338347;B03000;AMEACA;RUA TEFE;483;67121;23/6/2001 15:33:00;CIDADAO COMUM;S;;RENASCENCA;BH;610906.55;800086.84;6343
+6345;2001338369;B06000;LESAO CORPORAL;AV RAJA GABAGLIA;1740;57830;23/6/2001 15:48:00;INICIATIVA;S;0;LUXEMBURGO;BH;608719.62;793771.09;6344
+6346;2001338391;B03000;AMEACA;RUA VOLTA GRANDE;645;73594;23/6/2001 16:02:00;CIDADAO COMUM;S;;SAGRADA FAMILIA;BH;612975.31;798813.56;6345
+6347;2001338512;B03000;AMEACA;AV DO CONTORNO;6117;17228;23/6/2001 17:10:00;CIDADAO COMUM;N;0;CENTRO (BH);BH;611505.72;794818.76;6346
+6348;2001338573;B06000;LESAO CORPORAL;RUA DOS CONSTRUT;845;101249;23/6/2001 17:53:00;CIDADAO COMUM;S;0;CONJUNTO ALIPIO ;BH;604027.49;800198.33;6347
+6349;2001338577;B04001;HOMICIDIO TENTAD;RUA ALCIDA TORRE;120;112936;23/6/2001 17:53:00;INICIATIVA;N;0;CONJUNTO SANTA M;BH;608957.30;793494.58;6348
+6350;2001338618;B04001;HOMICIDIO TENTAD;RUA DOUTOR ALBER;15;4994;23/6/2001 18:15:00;INICIATIVA;S;0;PADRE EUSTAQUIO;BH;605823.47;797781.18;6349
+6351;2001338630;B04002;HOMICIDIO CONSUM;RUA SAO TOMAS DE;1079;63782;23/6/2001 18:24:00;CIDADAO COMUM;N;PX1079;MORRO DO PAPAGAI;BH;610696.43;793067.40;6350
+6352;2001338747;B03000;AMEACA;AV DOS ANDRADAS;4000;3761;23/6/2001 19:19:00;CIDADAO COMUM;S;;SANTA EFIGENIA;BH;614232.48;798106.24;6351
+6353;2001338771;B03000;AMEACA;RUA JOSE OSORIO;25;105091;23/6/2001 19:31:00;CIDADAO COMUM;S;;DAS INDUSTRIAS;BH;605474.09;790849.03;6352
+6354;2001338773;B03000;AMEACA;RUA ALICEDRO;77;2340;23/6/2001 19:30:00;CIDADAO COMUM;S;0;PINDORAMA;BH;602424.18;797655.47;6353
+6355;2001338837;B06000;LESAO CORPORAL;BECO PARAISO;12;302036;23/6/2001 20:03:00;INICIATIVA;S;0;PALMEIRAS;BH;606213.48;790637.47;6354
+6356;2001338908;B06000;LESAO CORPORAL;RUA CONDE D'EU;987;16631;23/6/2001 20:44:00;CIDADAO COMUM;S;;SAUDADE;BH;615598.60;797674.91;6355
+6357;2001338910;B06000;LESAO CORPORAL;RUA PERIMETRAL;178;53407;23/6/2001 20:45:00;CIDADAO COMUM;S;EM FRENTE A QUAD;CARLOS PRATES;BH;608223.50;797279.43;6356
+6358;2001338949;B06000;LESAO CORPORAL;RUA SARACA;700;63997;23/6/2001 21:07:00;CIDADAO COMUM;S;;SENHOR BOM JESUS;BH;609001.06;799557.24;6357
+6359;2001339077;B06000;LESAO CORPORAL;RUA NOVE;75;81013;23/6/2001 22:14:00;CIDADAO COMUM;S;;NOVA CINTRA;BH;605202.66;793145.62;6358
+6360;2001339116;B06000;LESAO CORPORAL;RUA ALVARO MATA;165;2844;23/6/2001 22:34:00;CIDADAO COMUM;S;0;ERMELINDA;BH;609096.01;801009.66;6359
+6361;2001339153;B03000;AMEACA;RUA DOZE DE DEZE;101;24060;23/6/2001 23:05:00;CIDADAO COMUM;S;CAFR;BELMONT;BH;615616.59;804938.16;6360
+6362;2001339195;B03000;AMEACA;RUA STA JUDITE;465;60816;23/6/2001 23:34:00;CIDADAO COMUM;S;CX6;APARECIDA SETIMA;BH;608750.85;800357.87;6361
+6363;2001339223;B03000;AMEACA;RUA CORNELIO PRO;40;36706;23/6/2001 23:48:00;CIDADAO COMUM;S;;NOVA VISTA;BH;614638.60;800712.32;6362
+6364;2001339233;B06000;LESAO CORPORAL;RUA JURUA;790;39799;23/6/2001 23:54:00;CIDADAO COMUM;N;AP303;DA GRACA;BH;612261.50;799605.83;6363
+6365;2001339247;B06000;LESAO CORPORAL;RUA DAS GABIROBA;95;30375;24/6/2001 00:05:00;CIDADAO COMUM;N;;VILA CLORIS;BH;610034.72;808298.49;6364
+6366;2001339266;B03000;AMEACA;RUA SERRA NEGRA;1372;65038;24/6/2001 00:23:00;CIDADAO COMUM;S;CAA;SANTO ANDRE;BH;609056.02;799135.06;6365
+6367;2001339299;B06000;LESAO CORPORAL;RUA JOSE SANGUIN;69;107028;24/6/2001 00:43:00;CIDADAO COMUM;N;;SAO JOAO BATISTA;BH;609033.61;807855.07;6366
+6368;2001339398;B02000;RIXA;AV SERRANA;774;65040;24/6/2001 02:04:00;CIDADAO COMUM;S;;SERRANO;BH;603492.23;801710.41;6367
+6369;2001339405;B06000;LESAO CORPORAL;RUA ANTONIO TEIX;1280;119037;24/6/2001 02:10:00;INICIATIVA;N;0;TEIXEIRA DIAS;BH;602642.10;789958.00;6368
+6370;2001339433;B02000;RIXA;RUA ALIANCA;99;2324;24/6/2001 02:29:00;CIDADAO COMUM;S;0;SAO GABRIEL;BH;613443.00;804094.68;6369
+6371;2001339474;B06000;LESAO CORPORAL;RUA CASCALHEIRA;52;13889;24/6/2001 03:03:00;INICIATIVA;S;0;VENDA NOVA;BH;609356.04;808626.75;6370
+6372;2001339485;B03000;AMEACA;AV JOSE LOPES MU;225;19176;24/6/2001 03:11:00;CIDADAO COMUM;N;;FLORAMAR;BH;611602.39;806414.44;6371
+6373;2001339515;B06000;LESAO CORPORAL;RUA HORIZONTE;69;33405;24/6/2001 03:32:00;CIDADAO COMUM;S;AP202;PARAISO;BH;614458.83;796413.39;6372
+6374;2001339551;B06000;LESAO CORPORAL;RUA MARCO AURELI;196;61821;24/6/2001 04:12:00;CIDADAO COMUM;S;;NAZARE;BH;615704.53;804641.91;6373
+6375;2001339585;B04001;HOMICIDIO TENTAD;AV SANTOS DUMONT;673;61950;24/6/2001 04:55:00;INICIATIVA;S;0;CENTRO BH;BH;610982.01;797558.77;6374
+6376;2001339826;B03000;AMEACA;RUA ESPINOSA;842;26024;24/6/2001 09:38:00;CIDADAO COMUM;S;;CARLOS PRATES;BH;608835.49;797841.84;6375
+6377;2001339854;B06000;LESAO CORPORAL;RODOVIA MGT 262;780;26598;24/6/2001 09:58:00;CIDADAO COMUM;S;;GOIANIA;BH;614725.95;803156.17;6376
+6378;2001339955;B03000;AMEACA;RUA CINQUENTA;280;106100;24/6/2001 11:19:00;CIDADAO COMUM;S;0;JARDIM DOS COMER;BH;608385.69;810923.86;6377
+6379;2001340050;B03000;AMEACA;RUA MADRE DOS AN;458;37172;24/6/2001 12:36:00;CIDADAO COMUM;S;0;PROVIDENCIA;BH;612440.57;804452.14;6378
+6380;2001340053;B03000;AMEACA;RUA PAULO TIMOTE;99;41918;24/6/2001 12:38:00;CIDADAO COMUM;N;;VILA HUMAITA;BH;610259.40;801578.24;6379
+6381;2001340067;B02000;RIXA;RUA CRISPIM JAQU;1000;18609;24/6/2001 12:54:00;CIDADAO COMUM;S;0;VISTA ALEGRE;BH;604692.26;793120.54;6380
+6382;2001340072;B04001;HOMICIDIO TENTAD;AV FURQUIM WERNE;7;650;24/6/2001 12:57:00;CIDADAO COMUM;N;;TUPI;BH;612940.53;805718.72;6381
+6383;2001340100;B06000;LESAO CORPORAL;RUA CANDIDO LUCI;411;12568;24/6/2001 13:19:00;CIDADAO COMUM;N;0;PARQUE RIACHUELO;BH;609781.70;800106.89;6382
+6384;2001340192;B06000;LESAO CORPORAL;RUA JOSE LUIZ DI;518;83945;24/6/2001 14:33:00;CIDADAO COMUM;S;FU;ARAGUAIA;BH;605111.03;789825.22;6383
+6385;2001340194;B03000;AMEACA;AV BARBACENA;1009;8084;24/6/2001 14:35:00;CIDADAO COMUM;S;;SANTO AGOSTINHO;BH;609814.42;796318.09;6384
+6386;2001340208;B06000;LESAO CORPORAL;RUA LIBANIA PENA;619;40855;24/6/2001 14:47:00;POLICIAL MILITAR;N;;SAO BERNARDO;BH;610581.29;805061.10;6385
+6387;2001340245;B06000;LESAO CORPORAL;RUA MARECHAL RON;337;43677;24/6/2001 15:03:00;CIDADAO COMUM;S;;PRIMEIRO DE MAIO;BH;611964.72;803360.61;6386
+6388;2001340400;B03000;AMEACA;RUA PADRE EUSTAQ;2183;51294;24/6/2001 16:22:00;INICIATIVA;S;;PADRE EUSTAQUIO;BH;607503.34;797614.57;6387
+6389;2001340449;B03000;AMEACA;RUA CINCO DE JUL;23;15670;24/6/2001 16:45:00;CIDADAO COMUM;S;;PRIMEIRO DE MAIO;BH;612552.07;803842.49;6388
+6390;2001340457;B03000;AMEACA;RUA LENI AMARAL;344;75130;24/6/2001 16:51:00;CIDADAO COMUM;S;;PARQUE NOVO PROG;CO;602711.02;799959.00;6389
+6391;2001340462;B06000;LESAO CORPORAL;RUA CINQUENTA E ;127;74137;24/6/2001 16:52:00;CIDADAO COMUM;S;;NOVA YORK;BH;608631.53;811073.66;6390
+6392;2001340463;B03000;AMEACA;RUA F;52;47388;24/6/2001 16:53:00;CIDADAO COMUM;S;;VILA PINHO;BH;601062.53;788698.15;6391
+6393;2001340471;B06000;LESAO CORPORAL;RUA JOSE CLETO;1100;38682;24/6/2001 16:58:00;INICIATIVA;N;0;DOS PALMARES;BH;610290.19;802437.88;6392
+6394;2001340488;B06000;LESAO CORPORAL;AV AFONSO PENA;2300;1259;24/6/2001 17:05:00;CIDADAO COMUM;S;PX2300;FUNCIONARIOS;BH;611928.21;795711.43;6393
+6395;2001340501;B06000;LESAO CORPORAL;RUA JULIO MESQUI;43;81849;24/6/2001 17:11:00;CIDADAO COMUM;N;0;ITAIPU BH;BH;599327.39;788616.41;6394
+6396;2001340524;B03000;AMEACA;RUA 76;170;124249;24/6/2001 17:29:00;CIDADAO COMUM;S;0;JARDIM DOS COMER;BH;607613.29;811768.50;6395
+6397;2001340526;B06000;LESAO CORPORAL;AV ABILIO MACHAD;1989;634;24/6/2001 17:33:00;INICIATIVA;N;0;GLORIA;BH;604187.17;799269.85;6396
+6398;2001340534;B02000;RIXA;RUA RIO DE JANEI;282;58772;24/6/2001 17:36:00;INICIATIVA;S;0;CENTRO (BH);BH;611181.78;797418.31;6397
+6399;2001340569;B06000;LESAO CORPORAL;RUA PURUS;540;55819;24/6/2001 17:56:00;CIDADAO COMUM;N;0;CONCORDIA;BH;610829.80;799382.32;6398
+6400;2001340573;B06000;LESAO CORPORAL;RUA DOUTOR ROBER;10;85610;24/6/2001 17:57:00;INICIATIVA;N;0;SERRA VERDE;BH;609549.68;809984.85;6399
+6401;2001340677;B06000;LESAO CORPORAL;RUA CORONEL OTAV;114;13620;24/6/2001 18:51:00;CIDADAO COMUM;N;;PARAISO;BH;614395.86;797635.16;6400
+6402;2001340697;B03000;AMEACA;RUA ALINE;907;2352;24/6/2001 18:59:00;INICIATIVA;N;0;PINDORAMA;BH;602382.96;798113.38;6401
+6403;2001340782;B04002;HOMICIDIO CONSUM;RUA DOZE;130;74178;24/6/2001 19:49:00;CIDADAO COMUM;N;;NOVA YORK;BH;608552.95;810735.96;6402
+6404;2001340784;B06000;LESAO CORPORAL;RUA CURITIBA;175;19090;24/6/2001 19:50:00;INICIATIVA;S;0;CENTRO (BH);BH;611005.46;797704.71;6403
+6405;2001340806;B06000;LESAO CORPORAL;RUA VEREADOR SOC;714;71586;24/6/2001 20:04:00;CIDADAO COMUM;N;;CARLOS PRATES;BH;608704.45;797784.61;6404
+6406;2001340868;B06000;LESAO CORPORAL;AV CIVILIZACAO;315;51657;24/6/2001 20:36:00;INICIATIVA;S;0;JARDIM FLORENCIA;BH;604827.53;810045.09;6405
+6407;2001340871;B03000;AMEACA;RUA MARIA MERCES;225;69284;24/6/2001 20:37:00;INICIATIVA;S;0;TIROL;BH;600618.46;789134.05;6406
+6408;2001340883;B06000;LESAO CORPORAL;RUA DR BROCHADO;864;23215;24/6/2001 20:44:00;CIDADAO COMUM;S;LJ;VERA CRUZ;BH;615928.19;797908.73;6407
+6409;2001340891;B03000;AMEACA;RUA VINTE E TRES;133;300330;24/6/2001 20:48:00;CIDADAO COMUM;S;0;VILA CALIFORNIA;BH;604003.11;797234.46;6408
+6410;2001340977;B03000;AMEACA;RUA BARAO DE SAR;488;8043;24/6/2001 21:31:00;CIDADAO COMUM;S;AP903;HORTO;BH;613702.53;797827.39;6409
+6411;2001340990;B06000;LESAO CORPORAL;RUA CASTELO BRAN;271;14030;24/6/2001 21:37:00;INICIATIVA;S;0;SANTA TEREZINHA;BH;604254.63;802847.80;6410
+6412;2001340993;B03000;AMEACA;RUA JOSE LAVARIN;750;40537;24/6/2001 21:42:00;CIDADAO COMUM;S;;PARAISO;BH;614679.14;796705.60;6411
+6413;2001340995;B03000;AMEACA;RUA PEPERI;1000;53259;24/6/2001 21:41:00;CIDADAO COMUM;S;0;NOVA GRANADA;BH;608160.45;794166.42;6412
+6414;2001341005;B03000;AMEACA;RUA VALAO;96;80238;24/6/2001 21:50:00;CIDADAO COMUM;N;0;COQUEIROS;BH;602714.03;799499.21;6413
+6415;2001341087;B06000;LESAO CORPORAL;RUA ITAQUERA;232;35920;24/6/2001 22:35:00;CIDADAO COMUM;S;0;CONCORDIA;BH;611011.46;799088.18;6414
+6416;2001341133;B06000;LESAO CORPORAL;RUA RADIALISTA C;182;99132;24/6/2001 23:01:00;CIDADAO COMUM;S;0;CEU AZUL;BH;604926.16;808509.27;6415
+6417;2001341147;B04001;HOMICIDIO TENTAD;RUA COSTA DAS PA;1;74846;24/6/2001 23:06:00;CIDADAO COMUM;N;;JARDIM VITORIA;BH;616667.46;804539.72;6416
+6418;2001341173;B04001;HOMICIDIO TENTAD;RUA PERUIBE;691;79610;24/6/2001 23:17:00;CIDADAO COMUM;N;0;PIRATININGA;BH;605780.79;809382.10;6417
+6419;2001341234;B04002;HOMICIDIO CONSUM;RUA RADIALISTA M;325;98864;25/6/2001 00:16:00;CIDADAO COMUM;N;;CEU AZUL;BH;604276.82;808882.62;6418
+6420;2001341291;B06000;LESAO CORPORAL;RUA DOUTOR CRIST;312;55598;25/6/2001 01:12:00;CIDADAO COMUM;S;0;ARAGUAIA;BH;604751.25;789297.85;6419
+6421;2001341296;B03000;AMEACA;AV LEONTINO FRAN;516;445;25/6/2001 01:21:00;CIDADAO COMUM;N;;SERRA VERDE;BH;609081.19;810348.74;6420
+6422;2001341312;B06000;LESAO CORPORAL;AV SARAMENHA;480;64007;25/6/2001 01:42:00;CIDADAO COMUM;S;INCI TPO4851 BPE;FLORAMAR;BH;612665.01;805817.21;6421
+6423;2001341326;B04002;HOMICIDIO CONSUM;AV PRESIDENTE AN;3073;4461;25/6/2001 02:13:00;CIDADAO COMUM;N;;CACHOEIRINHA;BH;609842.22;801019.10;6422
+6424;2001341328;B03000;AMEACA;RUA LUCIO FLAVIO;20;50972;25/6/2001 02:15:00;CIDADAO COMUM;N;;MINASCAIXA;BH;609454.19;809673.48;6423
+6425;2001341344;B06000;LESAO CORPORAL;RUA CONSELHEIRO ;3963;17095;25/6/2001 02:35:00;INICIATIVA;S;0;SAGRADA FAMILIA;BH;613739.23;798444.60;6424
+6426;2001341467;B03000;AMEACA;RUA ALUISIO DE A;30;2642;25/6/2001 07:30:00;CIDADAO COMUM;N;BL 13  APTO 202;SANTA MONICA;BH;607420.66;808150.58;6425
+6427;2001341524;B03000;AMEACA;RUA CURRAL DEL R;60;19122;25/6/2001 08:25:00;CIDADAO COMUM;S;0;CABANA;BH;604726.85;793857.84;6426
+6428;2001341538;B06000;LESAO CORPORAL;AV BARAO HOMEM D;1843;7936;25/6/2001 08:34:00;CIDADAO COMUM;S;;NOVA GRANADA;BH;608102.37;793516.46;6427
+6429;2001341689;B03000;AMEACA;RUA ITABIRA;510;35237;25/6/2001 10:10:00;CIDADAO COMUM;S;0;LAGOINHA;BH;610932.37;798497.33;6428
+6430;2001341703;B06000;LESAO CORPORAL;RUA DOS TIMBIRAS;138;67682;25/6/2001 10:18:00;CIDADAO COMUM;S;SL 501;FUNCIONARIOS;BH;612597.62;795925.49;6429
+6431;2001341736;B03000;AMEACA;RUA STA CATARINA;1234;60400;25/6/2001 10:48:00;INICIATIVA;N;0;LOURDES;BH;610316.02;795806.92;6430
+6432;2001341773;B06000;LESAO CORPORAL;RUA CAMILO DE BR;636;11896;25/6/2001 11:08:00;CIDADAO COMUM;S;;PADRE EUSTAQUIO;BH;605855.99;798012.24;6431
+6433;2001341899;B06000;LESAO CORPORAL;RUA BOACHA;381;9695;25/6/2001 12:33:00;CIDADAO COMUM;S;;DOM BOSCO;BH;604969.79;797397.60;6432
+6434;2001341931;B06000;LESAO CORPORAL;ALAMEDA DIOGO GU;479;21336;25/6/2001 12:48:00;CIDADAO COMUM;S;CA4;VILA CASTANHEIRA;BH;601475.52;788466.09;6433
+6435;2001341976;B06000;LESAO CORPORAL;RUA NEFELINA;127;81228;25/6/2001 13:31:00;CIDADAO COMUM;S;0;SANTA TEREZA;BH;612851.15;797300.76;6434
+6436;2001342212;B06000;LESAO CORPORAL;RUA BERNARDO GUI;20;9364;25/6/2001 16:05:00;CIDADAO COMUM;N;0;FUNCIONARIOS;BH;612577.23;795634.07;6435
+6437;2001342216;B03000;AMEACA;RUA SESSENTA E N;98;78976;25/6/2001 16:06:00;CIDADAO COMUM;S;0;NOVA YORK;BH;608040.39;811378.70;6436
+6438;2001342219;B03000;AMEACA;RUA MARGARIDA AS;525;61226;25/6/2001 16:09:00;CIDADAO COMUM;S;;CALIFORNIA;BH;603087.78;796379.85;6437
+6439;2001342236;B03000;AMEACA;RUA CANA DA INDI;394;94848;25/6/2001 16:20:00;CIDADAO COMUM;S;;LINDEIA;BH;599823.12;790690.41;6438
+6440;2001342239;B03000;AMEACA;RUA OHM;12;49153;25/6/2001 16:22:00;CIDADAO COMUM;S;;PRIMEIRO DE MAIO;BH;612164.04;803384.40;6439
+6441;2001342267;B06000;LESAO CORPORAL;RUA STO ANTONIO;218;61645;25/6/2001 16:42:00;CIDADAO COMUM;S;;VILA SANTO ANTON;BH;609460.12;808275.49;6440
+6442;2001342592;B03000;AMEACA;RUA AQUIRI;105;5234;25/6/2001 19:38:00;INICIATIVA;S;;AARAO REIS;BH;612521.48;804887.66;6441
+6443;2001342609;B03000;AMEACA;RUA JABIRU;408;36485;25/6/2001 19:53:00;CIDADAO COMUM;N;;FLAVIO MARQUES D;BH;604475.87;788500.08;6442
+6444;2001342650;B03000;AMEACA;RUA CARMELITA PR;1189;17316;25/6/2001 20:16:00;CIDADAO COMUM;S;CAA;SALGADO FILHO;BH;606197.02;794264.22;6443
+6445;2001342661;B03000;AMEACA;RUA RITA DE CASS;80;61267;25/6/2001 20:26:00;CIDADAO COMUM;S;0;NOVA CINTRA;BH;605839.44;793359.44;6444
+6446;2001342731;B03000;AMEACA;RUA DEZESSETE;573;32862;25/6/2001 21:15:00;CIDADAO COMUM;S;AP1;CONJUNTO FELICID;BH;612405.99;807435.12;6445
+6447;2001342784;B06000;LESAO CORPORAL;RUA JOSE BARTOLO;80;38525;25/6/2001 21:48:00;CIDADAO COMUM;N;BLC     AP107;CONJUNTO ALIPIO ;BH;603707.54;799638.81;6446
+6448;2001342991;B03000;AMEACA;AV AMAZONAS;4041;3140;26/6/2001 00:24:00;CIDADAO COMUM;S;;BARROCA;BH;607766.16;795855.52;6447
+6449;2001343131;B06000;LESAO CORPORAL;AV OLEGARIO MACI;579;49699;26/6/2001 03:36:00;CIDADAO COMUM;S;0;CENTRO (BH);BH;610560.87;797092.76;6448
+6450;2001343515;B03000;AMEACA;RUA DEZOITO;30;80225;26/6/2001 10:15:00;CIDADAO COMUM;S;0;NOVA CINTRA;BH;605414.94;793346.67;6449
+6451;2001343616;B06000;LESAO CORPORAL;RUA MARECHAL RON;87;43677;26/6/2001 11:18:00;CIDADAO COMUM;S;;PRIMEIRO DE MAIO;BH;611937.37;803522.85;6450
+6452;2001343618;B04001;HOMICIDIO TENTAD;AV ANTONIO ABRAH;1000;4320;26/6/2001 11:20:00;INICIATIVA;N;0;SAO LUIZ;BH;607791.03;803406.56;6451
+6453;2001343735;B03000;AMEACA;RUA DESCALVADO;204;19857;26/6/2001 12:37:00;CIDADAO COMUM;N;0;RENASCENCA;BH;611194.49;800550.72;6452
+6454;2001343766;B03000;AMEACA;RUA ALCINDO VIEI;583;1968;26/6/2001 12:54:00;CIDADAO COMUM;S;;BARREIRO;BH;602841.65;790669.84;6453
+6455;2001343767;B04001;HOMICIDIO TENTAD;RUA FLOR DE ABRI;27;28464;26/6/2001 12:54:00;CIDADAO COMUM;S;;JARDIM MONTANHES;BH;606010.63;798889.05;6454
+6456;2001343772;B03000;AMEACA;RUA JORNALISTA G;90;72172;26/6/2001 12:58:00;CIDADAO COMUM;S;;VILA SANTO ANTON;BH;608897.05;807828.39;6455
+6457;2001343786;B03000;AMEACA;RUA AMIRO RODRIG;96;61862;26/6/2001 13:09:00;CIDADAO COMUM;S;;APARECIDA SETIMA;BH;608980.16;800113.60;6456
+6458;2001343970;B03000;AMEACA;PRACA PAULO VI;20;120424;26/6/2001 15:19:00;INICIATIVA;S;0;CONJUNTO ALIPIO ;BH;604118.40;799596.48;6457
+6459;2001344044;B06000;LESAO CORPORAL;AV DOM PEDRO II;2679;53145;26/6/2001 16:04:00;CIDADAO COMUM;S;SL3A;CARLOS PRATES;BH;608253.87;798143.37;6458
+6460;2001344097;B03000;AMEACA;RUA DOM SILVERIO;300;22496;26/6/2001 16:30:00;INICIATIVA;N;0;BELMONT;BH;615222.25;805374.99;6459
+6461;2001344115;B03000;AMEACA;RUA JOSE CLEMENT;70;84862;26/6/2001 16:36:00;CIDADAO COMUM;N;;DA LAGOA;BH;604781.02;809128.05;6460
+6462;2001344155;B03000;AMEACA;RUA ITAPETINGA;1341;35804;26/6/2001 17:02:00;CIDADAO COMUM;N;0;CACHOEIRINHA;BH;609965.84;800605.10;6461
+6463;2001344199;B03000;AMEACA;RUA RIO DE JANEI;909;58772;26/6/2001 17:27:00;CIDADAO COMUM;N;;CENTRO (BH);BH;611055.94;796826.34;6462
+6464;2001344224;B03000;AMEACA;RUA ODILON BRAGA;1058;49100;26/6/2001 17:37:00;CIDADAO COMUM;N;0;MANGABEIRAS;BH;612805.67;793445.11;6463
+6465;2001344256;B06000;LESAO CORPORAL;RUA DOS BANDOLIN;555;106980;26/6/2001 17:49:00;CIDADAO COMUM;S;BOLCO B.;CH CALIFORNIA;BH;603953.43;797197.40;6464
+6466;2001344299;B03000;AMEACA;RUA MARIA DA SIL;677;44323;26/6/2001 18:17:00;CIDADAO COMUM;N;0;GLORIA;BH;603855.74;798980.34;6465
+6467;2001344395;B06000;LESAO CORPORAL;RUA SENHORA DO P;10;62231;26/6/2001 19:10:00;CIDADAO COMUM;S;0;CINQUENTENARIO;BH;606327.84;791562.32;6466
+6468;2001344548;B03000;AMEACA;RUA CURIATA;60;19062;26/6/2001 20:53:00;CIDADAO COMUM;S;0;GUARANI;BH;612579.40;805613.07;6467
+6469;2001344656;B04002;HOMICIDIO CONSUM;RUA JURAMENTO;800;39732;26/6/2001 22:09:00;CIDADAO COMUM;S;0;SAUDADE;BH;615203.20;796976.91;6468
+6470;2001344657;B03000;AMEACA;AV AUGUSTO DE LI;361;6731;26/6/2001 22:09:00;INICIATIVA;S;APTO 904;CENTRO BH;BH;611054.26;796579.41;6469
+6471;2001344725;B03000;AMEACA;RUA DIVISA SANTA;306;21452;26/6/2001 22:45:00;CIDADAO COMUM;N;0;MILIONARIOS;BH;604260.70;790692.63;6470
+6472;2001344746;B06000;LESAO CORPORAL;RUA ARISTOLINO B;300;41089;26/6/2001 22:55:00;INICIATIVA;S;0;REGINA;BH;598924.48;790096.71;6471
+6473;2001344807;B04001;HOMICIDIO TENTAD;RUA ZURICK;9;74092;26/6/2001 23:30:00;CIDADAO COMUM;S;0;NOVA SUISSA;BH;606533.22;796470.48;6472
+6474;2001344809;B06000;LESAO CORPORAL;AV AMAZONAS;139;3140;26/6/2001 23:32:00;CIDADAO COMUM;S;;CENTRO (BH);BH;611360.40;797271.51;6473
+6475;2001344816;B03000;AMEACA;RUA MARIA PIETRA;125;2668;26/6/2001 23:35:00;INICIATIVA;N;0;SAO PAULO;BH;612440.02;802941.04;6474
+6476;2001344842;B03000;AMEACA;RUA JOAO ALFREDO;66;37447;26/6/2001 23:51:00;CIDADAO COMUM;S;;HORTO;BH;613906.31;798281.36;6475
+6477;2001344871;B03000;AMEACA;RUA ALABANDINA;629;35400;27/6/2001 00:15:00;CIDADAO COMUM;N;APT 102;CAICARA;BH;607975.49;799959.05;6476
+6478;2001345042;B02000;RIXA;RUA ANDALUZITA;13;3718;27/6/2001 05:36:00;CIDADAO COMUM;N;;CARMO;BH;611931.63;794855.16;6477
+6479;2001345207;B03000;AMEACA;RUA SAO PEDRO DA;12;102989;27/6/2001 08:30:00;CIDADAO COMUM;S;;OLHOS DAGUA;BH;608155.44;788331.27;6478
+6480;2001345348;B03000;AMEACA;RUA VISEU;1178;62042;27/6/2001 10:04:00;CIDADAO COMUM;S;;SAO FRANCISCO;BH;609516.82;802452.66;6479
+6481;2001345361;B06000;LESAO CORPORAL;PRACA RIO BRANCO;100;58630;27/6/2001 10:21:00;INICIATIVA;S;0;CENTRO BH;BH;610794.50;797743.33;6480
+6482;2001345428;B03000;AMEACA;RUA ALCIDES GONC;61;1901;27/6/2001 11:15:00;CIDADAO COMUM;S;;CAMARGOS;BH;602711.47;794464.61;6481
+6483;2001345480;B03000;AMEACA;RUA MONTE ALVERN;563;46385;27/6/2001 12:03:00;CIDADAO COMUM;N;;SAO JOAO BATISTA;BH;607879.30;808121.62;6482
+6484;2001345568;B03000;AMEACA;RUA QUINTIL;536;96897;27/6/2001 13:17:00;CIDADAO COMUM;S;0;JARDIM ANA LUCIA;BH;609938.92;808861.42;6483
+6485;2001345579;B06000;LESAO CORPORAL;AV PARANA;523;52230;27/6/2001 13:24:00;INICIATIVA;N;PPM1.1;CENTRO (BH);BH;610725.40;796994.57;6484
+6486;2001345630;B03000;AMEACA;RUA LAGUNA;40;23170;27/6/2001 13:54:00;CIDADAO COMUM;S;0;TAQUARIL;BH;617501.43;797020.37;6485
+6487;2001345723;B06000;LESAO CORPORAL;RUA PITANGUI;34;54365;27/6/2001 15:10:00;CIDADAO COMUM;S;FR168;SAO CRISTOVAO;BH;610522.93;799402.64;6486
+6488;2001345793;B06000;LESAO CORPORAL;RUA ESPIRITO SAN;785;26052;27/6/2001 15:55:00;CIDADAO COMUM;N;;CENTRO (BH);BH;611219.33;796898.46;6487
+6489;2001345931;B06000;LESAO CORPORAL;RUA MONTE ALVERN;563;46385;27/6/2001 17:09:00;CIDADAO COMUM;S;;SAO JOAO BATISTA;BH;607879.30;808121.62;6488
+6490;2001345982;B06000;LESAO CORPORAL;RUA FRANCISCO FE;40;29426;27/6/2001 17:34:00;CIDADAO COMUM;N;0;TUPI;BH;613135.84;805984.96;6489
+6491;2001346037;B06000;LESAO CORPORAL;RUA LILIA;96;83730;27/6/2001 18:03:00;CIDADAO COMUM;N;0;SANTA MONICA;BH;606213.48;808831.98;6490
+6492;2001346067;B03000;AMEACA;RUA ABAIBA;218;561;27/6/2001 18:16:00;INICIATIVA;S;0;SAO PAULO;BH;612454.75;802727.11;6491
+6493;2001346081;B06000;LESAO CORPORAL;RUA ANTONIO ACAC;46;24564;27/6/2001 18:20:00;CIDADAO COMUM;S;;CH VALE DO JATOB;BH;600609.06;787448.50;6492
+6494;2001346145;B04001;HOMICIDIO TENTAD;RUA VILA REAL;87;60683;27/6/2001 18:58:00;CIDADAO COMUM;S;0;SAO FRANCISCO;BH;609915.68;801999.03;6493
+6495;2001346204;B04002;HOMICIDIO CONSUM;RUA CARACA;1071;12990;27/6/2001 19:27:00;INICIATIVA;N;0;SERRA;BH;613823.56;794597.43;6494
+6496;2001346328;B03000;AMEACA;RUA SAO MATEUS;171;20522;27/6/2001 20:41:00;CIDADAO COMUM;S;;CARDOSO;BH;603578.33;788323.16;6495
+6497;2001346357;B06000;LESAO CORPORAL;RUA TRINTA E OIT;212;34681;27/6/2001 21:01:00;CIDADAO COMUM;N;CAA;CONJUNTO FELICID;BH;612582.28;807355.59;6496
+6498;2001346377;B03000;AMEACA;RUA ORIENTAL;19;50364;27/6/2001 21:17:00;CIDADAO COMUM;S;CASA 160 NO BECO;SAO LUCAS;BH;613100.81;796033.16;6497
+6499;2001346396;B03000;AMEACA;RUA DIVINOPOLIS;253;21424;27/6/2001 21:30:00;CIDADAO COMUM;S;0;SANTA TEREZA;BH;613916.97;797543.46;6498
+6500;2001346469;B06000;LESAO CORPORAL;RUA SERVIDAO;93;170201;27/6/2001 22:26:00;CIDADAO COMUM;N;0;CABANA;BH;604396.96;794232.57;6499
+6501;2001346478;B03000;AMEACA;RUA CORONEL OTAV;20;13620;27/6/2001 22:32:00;CIDADAO COMUM;N;;POMPEIA;BH;614397.44;797674.95;6500
diff --git a/examples/data/OcorrenciasPoA.dbf b/examples/data/OcorrenciasPoA.dbf
old mode 100644
new mode 100755
diff --git a/examples/data/OcorrenciasPoA.shp b/examples/data/OcorrenciasPoA.shp
old mode 100644
new mode 100755
diff --git a/examples/data/OcorrenciasPoA.shx b/examples/data/OcorrenciasPoA.shx
old mode 100644
new mode 100755
diff --git a/examples/data/SOCEC.dbf b/examples/data/SOCEC.dbf
old mode 100644
new mode 100755
diff --git a/examples/data/cities.dbf b/examples/data/cities.dbf
deleted file mode 100644
index d85d10e..0000000
Binary files a/examples/data/cities.dbf and /dev/null differ
diff --git a/examples/data/cities.shp b/examples/data/cities.shp
deleted file mode 100644
index e5a4a1d..0000000
Binary files a/examples/data/cities.shp and /dev/null differ
diff --git a/examples/data/cities.shx b/examples/data/cities.shx
deleted file mode 100644
index 6e1886c..0000000
Binary files a/examples/data/cities.shx and /dev/null differ
diff --git a/examples/data/elevation.raw b/examples/data/elevation.raw
old mode 100644
new mode 100755
diff --git a/examples/data/nat1.tif b/examples/data/nat1.tif
old mode 100644
new mode 100755
diff --git a/examples/data/nat2.tif b/examples/data/nat2.tif
old mode 100644
new mode 100755
diff --git a/examples/data/rivers.dbf b/examples/data/rivers.dbf
deleted file mode 100644
index 4aa1d8b..0000000
Binary files a/examples/data/rivers.dbf and /dev/null differ
diff --git a/examples/data/rivers.shp b/examples/data/rivers.shp
deleted file mode 100644
index 877dd1e..0000000
Binary files a/examples/data/rivers.shp and /dev/null differ
diff --git a/examples/data/rivers.shx b/examples/data/rivers.shx
deleted file mode 100644
index c3b4cd1..0000000
Binary files a/examples/data/rivers.shx and /dev/null differ
diff --git a/examples/data/sampa.jpg b/examples/data/sampa.jpg
old mode 100644
new mode 100755
diff --git a/examples/data/samples.spr b/examples/data/samples.spr
new file mode 100644
index 0000000..773779b
--- /dev/null
+++ b/examples/data/samples.spr
@@ -0,0 +1,22878 @@
+
+SAMPLE
+INFO
+//Amostras de Modelagem Num�rica
+//Arquivo ASCII gerado pelo Sistema SPRING
+//Projeto: Brasilia - Plano de informa��o: Mapa Altimetrico
+//Categoria: Altimetria - Modelo: DIGITALMODEL
+PROJECTION	UTM/SAD69, HEMIS 1, ORIG.LAT n 0   0   0.00, ORIG.LONG o 45  0   0.00, LAT1 n 0   0   0.00, LAT2 n 0   0   0.00
+DATUM	SAD69, Prd 6378160.000000, Pflt 0.003353, Pdx 0.000000, Pdy 0.000000, Pdz 0.000000
+OFFSETX  500000.000000   OFFSETY  10000000.000000   SCALEFACTOR  0.999600
+BOX	183557.000000, 8246277.000000, 195017.000000, 8258937.000000
+UNITS Metros
+SCALE	25000.000000
+INFO_END
+POINT3D
+183763.136324     8246449.883481   1051.000000
+184772.200422     8246432.858473   1055.000000
+184933.756147     8246310.125748   1053.000000
+187045.291487     8246576.788397   1039.000000
+187629.400857     8246523.169623   1028.000000
+187935.089403     8246543.527406   1024.000000
+191516.337040     8246284.351177   1039.000000
+192200.352801     8246555.336354   1033.000000
+192350.927497     8246958.982785   1024.000000
+194569.636946     8246399.594222   1004.000000
+194856.376362     8246508.565860   1007.000000
+183581.777412     8247569.058595   1081.000000
+186808.168262     8247622.477620   1067.000000
+189137.849654     8247749.747966   1039.000000
+190013.552762     8247853.385130   1024.000000
+191642.101449     8247529.090454   1016.000000
+192648.485403     8247173.305625   1022.000000
+192592.347356     8247045.343808   1024.000000
+193243.309165     8247581.285668   1011.000000
+193560.350509     8247673.819406   1009.000000
+184395.125114     8248163.848770   1099.000000
+185523.431897     8248591.936516   1095.000000
+185290.544174     8248170.118365   1097.000000
+186627.238229     8248404.192659   1083.000000
+186142.892820     8248053.010047   1088.000000
+187695.841631     8248537.095232   1068.000000
+188722.987421     8248446.469126   1066.000000
+189372.130636     8248823.354853   1068.000000
+190981.520773     8248794.909293   1019.000000
+191753.958859     8248083.030257   1007.000000
+192191.650408     8248222.500210   1004.000000
+184643.833397     8249079.901098   1094.000000
+185279.791036     8249070.907225   1094.000000
+185776.928104     8249171.848138   1089.000000
+187173.053629     8249096.293056   1069.000000
+187525.819440     8249302.074228   1084.000000
+194835.865056     8249375.150502   1009.000000
+183696.646807     8250966.779061   1116.000000
+187994.714711     8250884.552777   1114.000000
+188157.974162     8250656.035656   1114.000000
+188341.115398     8250591.862557   1116.000000
+189221.750814     8250544.685928   1118.000000
+192360.864133     8250616.171156   1066.000000
+192344.580872     8250850.080348   1065.000000
+193238.690102     8250354.826261   1052.000000
+194099.246060     8250427.551725   1041.000000
+194626.234236     8250617.857655   1039.000000
+185708.103458     8251502.375029   1146.000000
+186267.110719     8251725.105398   1156.000000
+187786.399506     8251151.820053   1119.000000
+189638.414815     8251484.610618   1124.000000
+190924.509897     8251596.443768   1095.000000
+191262.884122     8251646.730943   1083.000000
+190854.921987     8251921.202739   1091.000000
+191983.029415     8251769.281982   1071.000000
+192770.408228     8251182.205617   1066.000000
+193668.766373     8251355.688547   1049.000000
+194043.497654     8251363.335240   1048.000000
+194340.156191     8251516.913088   1039.000000
+194508.921666     8251024.267138   1036.000000
+187520.769322     8252840.698960   1172.000000
+187638.190285     8252590.499903   1167.000000
+189963.770381     8252148.899609   1126.000000
+190940.785974     8252147.109632   1095.000000
+192092.326594     8252874.127279   1046.000000
+193629.280597     8252680.529512   1005.000000
+193950.865361     8252219.036945   1021.000000
+194765.073028     8252294.179475   1014.000000
+187865.316483     8253827.357148   1146.000000
+190029.123691     8253647.530356   1114.000000
+193159.419932     8253877.908770   1029.000000
+192316.432307     8253102.971933   1046.000000
+184327.119988     8254484.507995   1111.000000
+185276.553666     8254323.189033   1128.000000
+186617.762720     8254820.919697   1144.000000
+192226.024445     8254247.964593   1051.000000
+192697.220994     8254599.571137   1035.000000
+194163.203690     8254344.149789   1011.000000
+184437.453500     8255638.224856   1098.000000
+189652.770070     8255061.726606   1088.000000
+193001.067716     8255589.099723   1006.000000
+193216.822682     8255442.784077   1008.000000
+193387.790742     8255163.045163   1012.000000
+188573.581405     8256246.595460   1095.000000
+191259.137951     8256658.584110   1035.000000
+188066.824095     8258575.908150   1012.000000
+190559.364669     8258400.759301   1006.000000
+192364.754900     8258041.180620   1034.000000
+193023.369720     8258138.802827   1032.000000
+194515.894805     8257985.046612   1018.000000
+END
+LINE3D
+HEIGHT 1030.000000
+192017.710448     8246277.000000
+192028.960661     8246302.084291
+192038.021544     8246322.258334
+192047.778796     8246338.060362
+192052.581878     8246350.655890
+192058.646093     8246362.644458
+192064.053665     8246376.501522
+192077.362993     8246404.879874
+192088.805168     8246432.603627
+192093.556868     8246448.328815
+192104.535521     8246466.027785
+192109.923609     8246481.136806
+192118.974371     8246501.936631
+192127.954266     8246527.118074
+192135.743137     8246548.524465
+192146.045663     8246569.343887
+192152.694885     8246583.845948
+192159.374475     8246596.470282
+192163.439933     8246615.941323
+192167.546645     8246632.908867
+192168.585059     8246646.072542
+192175.769432     8246666.217779
+192178.685113     8246679.410654
+192180.288291     8246696.339385
+192186.745162     8246722.734353
+192190.872122     8246738.449952
+192194.403185     8246752.278210
+192194.170344     8246766.674626
+192193.897006     8246783.574933
+192193.684413     8246796.719404
+192178.628021     8246798.992791
+192164.823400     8246801.285392
+192154.065313     8246808.633021
+192146.355275     8246821.036464
+192154.922261     8246833.063834
+192166.678271     8246841.383388
+192180.310790     8246849.731749
+192185.053127     8246866.083113
+192179.229726     8246877.889198
+192162.154329     8246888.897002
+192149.509605     8246896.841989
+192129.911952     8246909.062949
+192108.457275     8246920.003146
+192090.242998     8246924.106249
+192077.659013     8246928.295782
+192063.268621     8246928.074879
+192046.285108     8246933.448750
+192036.142397     8246941.432144
+192025.324322     8246952.536003
+192001.316250     8246966.567453
+191971.001765     8246983.632544
+191943.865414     8246997.615973
+191919.333074     8247005.378476
+191896.123366     8247008.778959
+191865.929601     8247018.332749
+191833.213575     8247029.100076
+191806.208829     8247034.946433
+191781.182592     8247034.562263
+191756.277833     8247026.667185
+191722.644877     8247016.759547
+191692.109068     8247008.777646
+191670.332595     8247000.930207
+191646.073594     8246991.792403
+191623.681738     8246983.309581
+191607.495824     8246978.052473
+191590.129007     8246968.394532
+191574.649583     8246958.139627
+191561.662815     8246948.548923
+191543.156354     8246931.986269
+191520.421691     8246905.967744
+191488.434564     8246871.667714
+191461.935997     8246846.217347
+191439.252715     8246817.069161
+191418.939841     8246796.096455
+191401.776258     8246773.919836
+191385.772574     8246757.395603
+191362.351668     8246735.122930
+191345.146825     8246715.450190
+191331.615542     8246700.842485
+191321.212544     8246686.282419
+191307.710865     8246669.796975
+191296.743103     8246651.471852
+191282.707037     8246629.343243
+191268.106206     8246603.449578
+191243.444415     8246580.531920
+191227.369864     8246568.389304
+191213.242683     8246551.894258
+191197.844253     8246536.631571
+191184.464823     8246512.634849
+191169.268865     8246484.853473
+191155.767951     8246468.368041
+191142.276400     8246451.256433
+191117.574119     8246430.842283
+191095.374614     8246410.466553
+191083.215820     8246388.366761
+191065.577825     8246356.791512
+191045.951956     8246332.072965
+191019.514134     8246302.866763
+190997.960375     8246281.249071
+190994.928643     8246277.000000
+END
+LINE3D
+HEIGHT 1020.000000
+190762.652027     8246277.000000
+190763.339402     8246277.647474
+190784.933653     8246296.761657
+190796.023663     8246307.575501
+190804.580527     8246320.228653
+190815.629283     8246333.545993
+190825.941936     8246353.739252
+190835.618201     8246374.548679
+190845.274218     8246396.610051
+190862.448685     8246418.160900
+190886.514578     8246439.191218
+190906.837574     8246459.538142
+190920.328367     8246476.649356
+190936.302446     8246495.051329
+190950.983500     8246515.937583
+190970.004871     8246539.394976
+190985.947817     8246559.674664
+191000.771367     8246571.797694
+191016.785179     8246587.695764
+191030.901470     8246604.816962
+191041.900365     8246621.264369
+191050.951127     8246642.064194
+191064.360927     8246664.183189
+191074.764695     8246678.742885
+191083.351928     8246689.518309
+191094.400684     8246702.835650
+191105.419828     8246718.031111
+191116.326851     8246740.111687
+191130.806198     8246773.516642
+191143.630991     8246793.122145
+191150.240479     8246810.128108
+191157.535446     8246823.388208
+191167.181342     8246846.075362
+191178.653893     8246871.921006
+191195.998302     8246921.648507
+191218.086450     8246948.909364
+191247.087030     8246974.398138
+191272.909476     8247002.968575
+191295.007745     8247029.603650
+191308.518781     8247045.463301
+191318.922549     8247060.022997
+191338.074761     8247075.343307
+191360.909896     8247095.102475
+191381.797656     8247119.214456
+191395.299328     8247135.700282
+191413.734929     8247156.644171
+191436.448580     8247183.914629
+191464.248771     8247206.254527
+191490.252677     8247223.558209
+191514.440818     8247237.077248
+191525.561198     8247246.013365
+191538.537845     8247256.229850
+191550.828243     8247270.192570
+191561.271738     8247282.248746
+191583.583370     8247295.738979
+191604.057455     8247306.696875
+191627.630214     8247319.580531
+191646.873541     8247329.267278
+191660.526309     8247336.363693
+191677.318242     8247342.882360
+191696.642557     8247347.561707
+191716.027610     8247348.485601
+191738.530829     8247350.082915
+191762.931563     8247350.457483
+191782.326744     8247350.755213
+191798.614651     8247349.753370
+191814.326915     8247345.611858
+191833.813211     8247340.276025
+191855.237519     8247331.213555
+191878.467470     8247326.561508
+191899.225778     8247319.993327
+191914.948170     8247315.225652
+191930.054410     8247309.822964
+191945.807171     8247303.177562
+191960.934423     8247296.522940
+191976.041432     8247291.119882
+191995.507474     8247287.036376
+192023.127602     8247281.825402
+192049.495960     8247276.595213
+192076.480458     8247272.000802
+192105.977089     8247266.819016
+192136.715376     8247262.281846
+192154.950659     8247256.927191
+192171.913930     8247252.804883
+192191.411110     8247246.843280
+192217.184335     8247239.725762
+192247.942864     8247233.937028
+192275.491362     8247233.107661
+192298.722077     8247228.455626
+192323.809053     8247225.084342
+192347.644265     8247221.693461
+192373.357508     8247218.331791
+192394.023944     8247217.396779
+192414.691143     8247216.461779
+192434.711827     8247216.769110
+192452.230499     8247217.038034
+192475.369335     8247218.019551
+192507.843163     8247222.274433
+192528.438732     8247225.721039
+192550.941945     8247227.318735
+192573.445921     8247228.916443
+192597.200139     8247230.533343
+192623.468025     8247231.562511
+192642.863206     8247231.860241
+192656.617210     8247232.697311
+192669.735583     8247234.150944
+192692.188941     8247238.878324
+192707.173703     8247240.986544
+192719.636204     8247244.308301
+192733.905111     8247252.040494
+192752.593802     8247257.336021
+192765.096793     8247258.154270
+192783.744993     8247265.953306
+192796.146748     8247273.030899
+192808.619376     8247275.726493
+192822.272138     8247282.823290
+192837.873046     8247285.566905
+192865.402059     8247285.989495
+192879.278305     8247279.315669
+192885.929686     8247255.000115
+192891.319170     8247231.291508
+192892.177514     8247216.904694
+192893.793731     8247194.390421
+192887.840879     8247175.516345
+192878.022887     8247163.469771
+192863.290451     8247145.713178
+192852.765205     8247138.664390
+192837.689329     8247142.189733
+192823.843453     8247146.985832
+192809.009781     8247135.488583
+192799.888159     8247119.069994
+192790.232142     8247097.008622
+192785.450067     8247083.161542
+192780.051858     8247068.678303
+192773.422885     8247052.924297
+192766.309371     8247028.397824
+192755.452966     8247003.187575
+192750.690381     8246988.088156
+192729.812743     8246963.350394
+192719.369248     8246951.294219
+192703.385806     8246933.518422
+192692.911178     8246923.339961
+192674.949226     8246911.794692
+192653.809141     8246903.331084
+192635.059712     8246901.791011
+192613.161754     8246901.454862
+192589.366275     8246902.341841
+192572.957641     8246910.855368
+192554.671740     8246919.339696
+192540.776010     8246927.265479
+192528.807401     8246932.090777
+192516.243665     8246935.028364
+192497.433496     8246937.243745
+192485.616747     8246932.679644
+192472.136081     8246914.942266
+192466.132611     8246899.197862
+192462.610906     8246884.743811
+192462.874117     8246868.469667
+192463.218321     8246847.187742
+192467.225957     8246831.597016
+192475.128344     8246807.300665
+192479.780962     8246790.467965
+192480.710936     8246771.699544
+192488.562706     8246750.532866
+192492.599948     8246733.064400
+192492.832789     8246718.667984
+192493.096006     8246702.393459
+192487.920511     8246674.139967
+192483.209302     8246655.911269
+192478.477087     8246638.934124
+192472.433126     8246625.693228
+192466.368911     8246613.704660
+192453.564366     8246592.847211
+192439.325828     8246583.237292
+192430.739358     8246572.461879
+192420.325469     8246558.527965
+192409.388077     8246538.325116
+192396.007883     8246514.328382
+192391.831068     8246501.742467
+192382.719567     8246484.698096
+192366.170597     8246463.157232
+192360.732655     8246451.177895
+192344.345666     8246419.621849
+192338.443432     8246397.618100
+192330.664688     8246375.585546
+192318.576761     8246349.104136
+192304.692548     8246317.586510
+192293.703774     8246300.513322
+192285.773177     8246287.869784
+192277.890707     8246277.000000
+END
+LINE3D
+HEIGHT 1010.000000
+189554.337430     8246277.000000
+189562.967347     8246281.760004
+189587.215463     8246291.523578
+189605.833287     8246301.200722
+189630.102416     8246309.712362
+189654.966672     8246320.111714
+189679.810686     8246331.762628
+189700.921165     8246342.103974
+189720.870983     8246346.792923
+189753.334683     8246351.673969
+189789.551403     8246356.612627
+189823.901740     8246360.896315
+189850.704014     8246367.568647
+189885.679848     8246371.862319
+189923.148344     8246376.819810
+189952.534382     8246378.523163
+189983.109924     8246384.001161
+190018.712025     8246388.304447
+190045.594523     8246389.969369
+190078.078472     8246393.598469
+190112.418688     8246398.507939
+190153.025578     8246402.888052
+190181.119355     8246407.075698
+190208.587624     8246411.254123
+190237.922287     8246416.086754
+190278.519056     8246421.092649
+190302.859044     8246425.223053
+190321.557862     8246429.892417
+190338.359152     8246435.785290
+190358.259116     8246443.603923
+190382.517359     8246452.741333
+190409.218398     8246465.673010
+190432.185133     8246477.295489
+190452.024357     8246488.869577
+190470.561194     8246503.554121
+190491.035279     8246514.512017
+190510.319867     8246521.694884
+190527.766908     8246526.345414
+190539.512791     8246535.291133
+190551.268801     8246543.610688
+190563.024811     8246551.930243
+190575.396197     8246560.885563
+190590.239233     8246571.756636
+190605.113395     8246580.750376
+190620.683927     8246585.372100
+190633.701065     8246593.085078
+190651.551659     8246611.515474
+190659.493141     8246623.533241
+190668.675508     8246636.195995
+190697.584980     8246667.317950
+190734.547290     8246703.572547
+190772.185722     8246736.707073
+190791.277959     8246755.782848
+190807.281650     8246772.306700
+190815.889132     8246781.830179
+190831.852326     8246800.857921
+190844.727731     8246817.334134
+190860.711173     8246835.109931
+190887.138874     8246864.941915
+190917.198880     8246902.342431
+190941.052174     8246936.517602
+190960.134291     8246956.219159
+190971.768053     8246972.049992
+190981.566560     8246985.348523
+190994.966238     8247008.093300
+191012.634603     8247037.790822
+191029.132186     8247062.461729
+191039.414470     8247084.532715
+191047.253958     8247102.809434
+191052.550938     8247123.551636
+191056.596140     8247144.275004
+191063.750145     8247166.297969
+191071.427652     8247194.589868
+191078.500669     8247221.620232
+191086.117438     8247253.667585
+191096.166880     8247290.134988
+191100.969198     8247302.730504
+191103.239127     8247317.165722
+191106.790439     8247329.742034
+191115.003105     8247363.676729
+191121.156268     8247408.849731
+191122.134700     8247425.769254
+191126.683929     8247454.013132
+191131.264290     8247480.379295
+191142.554618     8247517.491683
+191150.888762     8247543.915469
+191157.386130     8247567.806547
+191161.512326     8247583.522134
+191165.679777     8247596.734224
+191174.104272     8247617.524435
+191186.747606     8247648.396693
+191198.381368     8247664.227527
+191212.630027     8247673.211665
+191230.581852     8247685.383098
+191251.712579     8247694.472499
+191270.300034     8247706.027371
+191283.932547     8247714.376113
+191298.978818     8247712.728509
+191312.742943     8247712.939798
+191337.012065     8247721.451820
+191377.416490     8247738.350240
+191405.872554     8247758.822013
+191422.048347     8247764.704902
+191439.374668     8247776.866734
+191468.557471     8247791.088764
+191500.859197     8247805.984609
+191513.291328     8247811.184093
+191528.256605     8247814.544270
+191559.377420     8247825.039664
+191585.593925     8247829.198492
+191617.441485     8247833.443761
+191639.319194     8247835.031855
+191657.392503     8247839.691999
+191671.106010     8247843.032960
+191691.732712     8247844.601850
+191712.329045     8247848.048468
+191729.211329     8247848.933560
+191746.709752     8247850.454429
+191770.413353     8247855.201002
+191791.614941     8247859.909166
+191804.077441     8247863.230924
+191817.841566     8247863.442213
+191832.928327     8247859.291100
+191863.020863     8247855.996273
+191880.670376     8247848.128113
+191892.649099     8247842.677415
+191908.936249     8247841.675178
+191930.471920     8247825.727200
+191938.304199     8247805.812861
+191940.403429     8247792.071032
+191933.169201     8247775.055478
+191921.413191     8247766.735923
+191908.345435     8247762.152619
+191889.565636     8247762.490272
+191873.227869     8247766.622182
+191849.533625     8247761.249816
+191844.196156     8247743.011123
+191860.604783     8247734.497978
+191876.246182     8247734.738084
+191889.385567     8247734.939783
+191914.523167     8247728.438445
+191925.885751     8247722.351970
+191940.367252     8247716.939692
+191957.472255     8247704.054149
+191975.788526     8247693.692094
+191994.720184     8247683.965041
+192012.995964     8247676.106495
+192029.414719     8247666.967187
+192043.330698     8247657.789458
+192062.373714     8247641.177279
+192083.929627     8247623.977737
+192109.783839     8247611.852820
+192138.110457     8247601.644049
+192160.221008     8247588.835727
+192186.741983     8247574.216533
+192214.453220     8247563.372379
+192243.415463     8247552.547428
+192269.895178     8247540.432113
+192287.616321     8247528.182347
+192307.163356     8247519.091060
+192322.179251     8247519.321564
+192337.195146     8247519.552069
+192355.954702     8247520.465978
+192378.951812     8247530.210348
+192398.901630     8247534.899298
+192419.427097     8247542.727533
+192442.474825     8247549.342230
+192466.814820     8247553.472253
+192493.647464     8247558.266858
+192513.032524     8247559.190369
+192533.618730     8247563.263151
+192551.055650     8247568.539462
+192566.636309     8247572.535023
+192582.903211     8247572.784731
+192599.796379     8247573.044053
+192618.505312     8247577.088017
+192635.962480     8247581.112383
+192652.169400     8247585.117939
+192672.028110     8247595.440069
+192696.922741     8247603.961311
+192716.236935     8247609.266440
+192739.265178     8247617.133095
+192767.348829     8247621.946904
+192787.924150     8247626.645455
+192811.588024     8247633.895548
+192841.598801     8247635.608491
+192870.954470     8247639.189570
+192899.744611     8247639.005582
+192919.917149     8247629.923897
+192941.916342     8247624.000701
+192958.315619     8247616.112967
+192976.621005     8247606.376683
+192996.087816     8247602.292806
+193013.172565     8247590.659591
+193032.094096     8247581.558701
+193048.583717     8247568.037775
+193064.397218     8247557.636919
+193078.445565     8247540.322131
+193096.882562     8247522.448393
+193110.981528     8247502.003932
+193126.886137     8247485.969895
+193135.282422     8247469.820218
+193139.915561     8247454.239093
+193143.902185     8247439.900300
+193147.293675     8247423.674178
+193148.878765     8247403.037239
+193150.454485     8247383.026857
+193154.471484     8247366.809955
+193154.815682     8247345.528412
+193158.197051     8247329.928071
+193158.440020     8247314.905491
+193155.162046     8247285.428872
+193154.799754     8247269.145126
+193150.067538     8247252.167980
+193146.647833     8247231.454596
+193142.460133     8247219.494451
+193129.726455     8247194.255386
+193119.313329     8247180.321483
+193107.567440     8247171.376147
+193089.544750     8247163.586331
+193069.564563     8247160.775108
+193052.045891     8247160.506185
+193023.448094     8247148.797647
+192998.685068     8247132.139333
+192988.897446     8247118.215033
+192984.104486     8247104.993723
+192967.576534     8247082.200543
+192956.628250     8247062.623846
+192941.574018     8247026.079616
+192934.924803     8247011.577173
+192923.925901     8246995.130149
+192911.020121     8246980.532045
+192901.131263     8246972.867089
+192881.817069     8246967.561960
+192863.743761     8246962.901817
+192844.419446     8246958.222469
+192832.159417     8246942.382023
+192822.926432     8246932.848942
+192812.059136     8246908.264845
+192807.943066     8246891.923095
+192799.406451     8246878.017998
+192794.643860     8246862.918961
+192789.882039     8246847.819554
+192785.765200     8246831.478174
+192782.264507     8246815.772189
+192780.701832     8246796.339185
+192774.738852     8246778.091272
+192768.028128     8246767.344654
+192753.043367     8246765.236434
+192734.283816     8246764.322143
+192716.684151     8246769.061000
+192700.346390     8246773.192527
+192675.269535     8246775.938029
+192660.990500     8246768.832000
+192651.142132     8246758.663536
+192633.876550     8246742.746250
+192627.873081     8246727.001846
+192627.470297     8246713.221609
+192618.520771     8246686.162440
+192614.343957     8246673.576525
+192613.294658     8246661.038620
+192604.355259     8246633.353287
+192598.412529     8246613.853429
+192585.012856     8246591.108269
+192575.336591     8246570.298843
+192568.152217     8246550.153605
+192562.310722     8246524.394402
+192558.306010     8246501.167525
+192558.044953     8246478.624435
+192554.524018     8246464.170013
+192553.656942     8246440.365364
+192552.740013     8246419.690399
+192551.791950     8246400.893150
+192547.675875     8246384.551781
+192543.488939     8246372.591648
+192533.862528     8246348.652538
+192529.110828     8246332.927349
+192523.097237     8246317.808726
+192518.334647     8246302.709689
+192514.904820     8246282.622087
+192514.154572     8246277.000000
+END
+LINE3D
+HEIGHT 1010.000000
+194093.713045     8246277.000000
+194095.101105     8246281.209294
+194102.981848     8246296.982516
+194112.759343     8246311.532980
+194120.689941     8246324.176518
+194134.363721     8246330.020999
+194145.513706     8246337.079377
+194162.255021     8246346.727716
+194178.349826     8246357.618005
+194193.839371     8246367.247129
+194211.831691     8246376.914671
+194223.001925     8246382.721104
+194244.031411     8246398.070231
+194263.193751     8246412.764377
+194284.233364     8246427.487341
+194297.290999     8246432.696427
+194313.416931     8246441.709383
+194330.319463     8246441.342529
+194349.311854     8246427.860404
+194367.668628     8246414.994077
+194389.163802     8246401.549989
+194401.182259     8246393.595389
+194411.960595     8246384.995815
+194416.572728     8246370.666242
+194419.933848     8246356.317847
+194426.605472     8246330.750729
+194427.544810     8246311.356133
+194429.059791     8246295.101205
+194432.471529     8246277.623138
+194432.709425     8246277.000000
+END
+LINE3D
+HEIGHT 1010.000000
+194985.449425     8246277.000000
+194992.473317     8246283.715046
+195009.174898     8246295.867287
+195017.000000     8246301.350941
+END
+LINE3D
+HEIGHT 1040.000000
+183655.558467     8246277.000000
+183659.717134     8246280.045811
+183677.083570     8246289.703746
+183694.480566     8246297.483957
+183714.975282     8246307.189913
+183739.940780     8246311.329537
+183762.454304     8246312.301455
+183785.603650     8246312.656814
+183806.875913     8246312.983358
+183825.019897     8246313.261881
+183841.902562     8246314.146978
+183866.908551     8246315.783094
+183892.550170     8246316.802648
+183913.822624     8246317.129195
+183929.545009     8246312.361902
+183941.574166     8246303.781147
+183964.875175     8246294.747486
+184004.514327     8246281.582303
+184012.826955     8246277.000000
+END
+LINE3D
+HEIGHT 1040.000000
+186145.811522     8246277.000000
+186152.231041     8246285.750898
+186169.960146     8246311.692966
+186187.698995     8246337.008865
+186205.519220     8246357.316988
+186220.292147     8246372.570073
+186235.105188     8246385.319261
+186249.282606     8246398.684628
+186268.364334     8246418.386562
+186278.717102     8246436.075924
+186285.386572     8246449.326040
+186292.722417     8246460.082254
+186304.992567     8246475.296919
+186320.391003     8246490.559224
+186340.239967     8246501.507524
+186360.108798     8246511.203872
+186386.264939     8246519.118542
+186403.096986     8246523.133313
+186419.939155     8246526.522301
+186434.954668     8246526.752800
+186449.345060     8246526.973702
+186467.488852     8246527.252222
+186484.926148     8246532.528922
+186511.062047     8246541.695155
+186522.131427     8246553.760938
+186529.477400     8246563.890989
+186543.725677     8246572.875121
+186564.876647     8246580.712958
+186572.848123     8246590.852611
+186576.944332     8246608.445931
+186579.183892     8246624.758876
+186592.745545     8246637.488854
+186615.692419     8246650.362902
+186642.463942     8246658.912956
+186666.168307     8246663.659540
+186687.339143     8246670.245426
+186704.171191     8246674.260196
+186720.417844     8246675.761850
+186736.685127     8246676.011564
+186750.449634     8246676.222859
+186764.920631     8246671.436356
+186788.140843     8246667.410097
+186811.925819     8246667.148894
+186825.710568     8246666.108626
+186843.854361     8246666.387146
+186851.190213     8246677.142978
+186860.795612     8246702.334023
+186861.077292     8246723.625555
+186854.587892     8246737.925929
+186846.857225     8246751.581312
+186842.779486     8246771.553668
+186863.253953     8246782.511570
+186876.372333     8246783.964820
+186894.324157     8246796.136254
+186905.846944     8246818.852219
+186910.639898     8246832.073911
+186917.944992     8246844.707847
+186930.739798     8246866.191082
+186946.249584     8246874.568643
+186959.943231     8246879.161173
+186976.764769     8246883.802101
+186989.227270     8246887.123859
+187011.629628     8246894.980905
+187032.104095     8246905.938807
+187045.161730     8246911.147893
+187054.404836     8246920.055193
+187071.024291     8246937.214434
+187081.407428     8246953.026069
+187092.476808     8246965.091852
+187101.669297     8246977.128824
+187113.384816     8246987.951888
+187125.120196     8246997.523382
+187138.066849     8247009.617983
+187149.731363     8247023.571095
+187160.770755     8247037.514611
+187175.442070     8247059.026652
+187189.992277     8247088.050372
+187202.948675     8247099.518803
+187212.171539     8247109.677665
+187223.240919     8247121.743449
+187235.007050     8247129.437222
+187251.061359     8247142.831401
+187268.347189     8247157.496742
+187277.570047     8247167.655986
+187286.075912     8247183.438804
+187289.506127     8247203.526030
+187301.644672     8247226.877767
+187320.513425     8247259.724166
+187339.554281     8247281.929602
+187350.603800     8247295.246954
+187363.529823     8247308.593494
+187373.933209     8247323.153184
+187384.285978     8247340.842547
+187397.171510     8247356.692596
+187413.256188     8247368.209048
+187426.233211     8247378.425922
+187436.727711     8247387.352049
+187455.224051     8247404.540483
+187467.565068     8247415.373531
+187486.828643     8247423.808332
+187504.851334     8247431.598148
+187517.807732     8247443.066579
+187529.533367     8247453.264243
+187540.623001     8247464.077699
+187552.964018     8247474.910747
+187564.709519     8247483.856459
+187575.193892     8247493.408750
+187589.411800     8247504.270609
+187607.454739     8247510.808480
+187622.399774     8247515.420220
+187637.395038     8247516.902664
+187655.478468     8247520.937026
+187674.772413     8247527.494100
+187690.403690     8247528.359988
+187703.481955     8247532.317135
+187720.313614     8247536.332281
+187748.407392     8247540.519927
+187773.413380     8247542.156042
+187791.496816     8247546.190022
+187815.210920     8247550.310819
+187842.719685     8247551.985354
+187870.197698     8247555.537610
+187894.578190     8247557.163742
+187923.297465     8247561.361371
+187957.062789     8247563.131949
+187986.418076     8247566.713023
+188010.828556     8247566.461421
+188024.613311     8247565.420771
+188050.295802     8247563.936822
+188070.316487     8247564.244153
+188092.850450     8247563.964129
+188126.020265     8247563.846989
+188151.682127     8247563.614980
+188179.221261     8247563.411788
+188209.273300     8247562.620852
+188243.058109     8247563.139472
+188274.351032     8247562.993521
+188297.561499     8247559.593432
+188320.155826     8247555.557565
+188340.247376     8247551.483279
+188369.714402     8247548.179232
+188391.632608     8247547.263436
+188414.156068     8247547.609187
+188436.054026     8247547.945336
+188464.834046     8247548.387129
+188496.671479     8247553.258562
+188519.760468     8247557.369380
+188543.443820     8247563.367898
+188563.949038     8247572.448079
+188585.079766     8247581.537479
+188610.004767     8247588.180994
+188626.150185     8247595.941992
+188639.147074     8247604.906915
+188655.241879     8247615.797204
+188674.475843     8247626.110126
+188688.118484     8247633.832705
+188709.803848     8247647.313325
+188723.456616     8247654.409740
+188739.592670     8247662.796914
+188759.532367     8247668.111645
+188779.451815     8247674.678321
+188797.545372     8247678.086519
+188819.392712     8247681.552341
+188842.461452     8247686.915104
+188867.467440     8247688.551220
+188886.781634     8247693.856349
+188901.676045     8247701.598144
+188919.092717     8247708.126400
+188937.751038     8247715.299655
+188956.378983     8247724.351018
+188970.073005     8247728.943936
+188986.854053     8247736.088373
+189006.712762     8247746.410503
+189029.751127     8247753.651376
+189052.203721     8247758.378745
+189073.445806     8247760.583019
+189088.400962     8247764.568977
+189103.233870     8247776.066214
+189112.446607     8247786.851240
+189123.506247     8247799.542811
+189133.293869     8247813.467111
+189145.442541     8247836.192685
+189159.417863     8247862.077130
+189172.333765     8247876.049452
+189192.717505     8247892.640540
+189226.127740     8247916.318813
+189258.963854     8247936.857822
+189277.439952     8247955.297820
+189295.280419     8247974.354380
+189314.916409     8247998.447145
+189340.325181     8248013.863498
+189376.945447     8248032.582404
+189399.225945     8248047.950353
+189417.864018     8248056.375552
+189434.000071     8248064.762726
+189449.560482     8248070.010232
+189471.982707     8248076.615327
+189500.621000     8248085.819974
+189522.952111     8248098.058633
+189547.755628     8248112.213438
+189569.380247     8248129.449894
+189586.070944     8248142.227905
+189610.894710     8248155.130765
+189633.215699     8248167.995205
+189656.767452     8248182.130413
+189675.890059     8248199.328461
+189694.457265     8248212.135278
+189711.086453     8248228.669114
+189734.588352     8248245.934006
+189754.305328     8248265.019371
+189775.365184     8248278.490771
+189792.660372     8248292.530318
+189810.602075     8248305.327534
+189829.723924     8248322.525188
+189857.584854     8248341.109632
+189879.077869     8248366.483160
+189898.139730     8248387.437045
+189920.450598     8248400.927267
+189942.135963     8248414.407887
+189967.534614     8248430.450021
+189994.840914     8248444.642863
+190010.905343     8248457.411261
+190026.334136     8248470.796602
+190041.086821     8248487.301250
+190064.506963     8248509.573911
+190091.076402     8248530.642278
+190115.768556     8248551.682592
+190132.448368     8248565.086373
+190149.693696     8248582.255986
+190171.903328     8248602.005553
+190192.811336     8248624.865588
+190213.780082     8248643.970169
+190235.435072     8248659.328898
+190248.411718     8248669.545384
+190263.800027     8248685.433852
+190280.419100     8248702.593087
+190299.521458     8248721.043081
+190321.054970     8248743.912718
+190347.552773     8248769.363073
+190371.680163     8248786.638331
+190383.385561     8248798.087176
+190405.666053     8248813.455507
+190422.345865     8248826.859288
+190437.179531     8248838.356919
+190454.928884     8248863.047042
+190465.240779     8248883.239907
+190473.777389     8248897.145386
+190485.422048     8248912.349685
+190500.850841     8248925.735026
+190520.598194     8248942.942283
+190533.030319     8248948.142150
+190552.244046     8248959.706253
+190578.339060     8248971.376753
+190594.555344     8248974.756134
+190612.063894     8248975.650839
+190632.013718     8248980.339407
+190651.257046     8248990.026153
+190673.578798     8249002.890605
+190690.884101     8249016.304753
+190714.487236     8249027.310299
+190739.290759     8249041.464722
+190764.729894     8249055.003730
+190785.789756     8249068.474748
+190801.259058     8249079.355435
+190827.343951     8249091.651717
+190858.393900     8249106.528728
+190882.551678     8249121.925112
+190903.500171     8249142.282021
+190927.668069     8249157.052624
+190949.444537     8249164.900445
+190969.363985     8249171.467121
+190991.110089     8249181.192287
+191013.501950     8249189.674728
+191027.135227     8249198.023482
+191041.464116     8249201.999827
+191055.743151     8249209.105856
+191075.016842     8249216.915258
+191109.255822     8249228.084072
+191138.468995     8249240.428375
+191161.446626     8249251.424320
+191190.710417     8249260.638951
+191225.554645     8249273.069695
+191256.685588     8249282.938925
+191277.150310     8249294.522996
+191297.049516     8249302.341236
+191311.369048     8249306.943374
+191339.351456     8249318.016910
+191364.185343     8249330.293988
+191385.275580     8249341.886897
+191398.231972     8249353.355710
+191413.721517     8249362.984834
+191433.519487     8249377.062418
+191467.677474     8249393.239014
+191490.584233     8249408.616958
+191502.400988     8249413.180677
+191521.059297     8249420.354695
+191532.875288     8249424.918403
+191540.745910     8249441.317406
+191553.005939     8249457.157853
+191576.457208     8249477.553181
+191601.754623     8249499.854660
+191617.788690     8249514.500402
+191636.325520     8249529.185328
+191648.081536     8249537.504501
+191662.299056     8249548.366737
+191677.788601     8249557.995860
+191700.664996     8249575.251150
+191727.355150     8249588.808597
+191744.691592     8249600.344647
+191757.617622     8249613.690805
+191770.533517     8249627.663509
+191784.650577     8249644.784336
+191792.551562     8249659.305995
+191803.549700     8249675.753008
+191818.282143     8249693.509219
+191839.331871     8249707.606783
+191852.903645     8249719.710980
+191862.691273     8249733.634898
+191873.095035     8249748.194976
+191885.859089     8249771.555933
+191900.480162     8249796.198035
+191910.852797     8249812.635446
+191918.148534     8249825.895175
+191927.239786     8249844.191491
+191947.914183     8249881.448313
+191964.250555     8249916.134031
+191969.062993     8249928.103766
+191981.807569     8249952.716298
+192000.615578     8249989.318532
+192011.654212     8250003.261654
+192024.631611     8250013.478916
+192037.648754     8250021.191511
+192053.895413     8250022.692783
+192067.639284     8250024.156399
+192092.554164     8250031.425696
+192113.715261     8250038.637369
+192131.788563     8250043.297895
+192146.733598     8250047.909635
+192167.298792     8250053.234350
+192191.013284     8250057.354770
+192221.589596     8250062.832398
+192242.164911     8250067.531332
+192259.673461     8250068.426037
+192278.422897     8250069.965728
+192300.300599     8250071.554205
+192335.337179     8250072.092041
+192364.743465     8250072.543448
+192389.244671     8250066.658660
+192409.357234     8250061.332440
+192430.700548     8250057.277751
+192452.124092     8250048.215270
+192472.277152     8250040.385159
+192493.085314     8250030.687294
+192516.427392     8250019.149751
+192539.122949     8250008.854921
+192568.044701     8250000.533479
+192603.233134     8249991.682299
+192633.416777     8249982.754291
+192662.953912     8249975.068232
+192694.418925     8249964.282083
+192722.079550     8249956.567219
+192740.990961     8249948.092111
+192762.425390     8249938.403860
+192790.721639     8249930.072816
+192824.043683     8249920.567047
+192853.590939     8249912.255207
+192873.743222     8249904.425849
+192896.378816     8249897.885722
+192925.280314     8249890.816607
+192957.895110     8249886.308242
+192983.567093     8249885.450451
+193001.772006     8249881.973523
+193017.413404     8249882.213630
+193032.439421     8249881.818352
+193048.726576     8249880.815733
+193070.039527     8249878.638390
+193084.440040     8249878.233511
+193105.106470     8249877.298881
+193123.260766     8249876.951625
+193147.610882     8249880.455866
+193169.427858     8249885.799032
+193182.505741     8249889.756173
+193199.327273     8249894.397483
+193222.970904     8249902.899139
+193242.173735     8249915.089777
+193265.161488     8249925.459940
+193286.907591     8249935.185106
+193308.805549     8249935.521255
+193333.205519     8249935.895812
+193363.862812     8249936.366423
+193390.140819     8249936.769808
+193413.915286     8249937.134763
+193440.132542     8249941.294367
+193465.703301     8249946.695157
+193491.889430     8249952.732094
+193513.080891     8249958.066422
+193530.498326     8249964.594691
+193550.417775     8249971.161367
+193567.875707     8249975.185745
+193584.636512     8249983.581745
+193596.422892     8249990.023573
+193616.281589     8250000.346467
+193626.776478     8250009.272218
+193641.619501     8250020.144055
+193658.198841     8250039.807193
+193676.008932     8250060.741862
+193694.566017     8250074.174461
+193710.015065     8250086.307475
+193726.099749     8250097.823545
+193742.184421     8250109.340380
+193751.417407     8250118.873460
+193767.451473     8250133.519203
+193778.470617     8250148.714665
+193788.318984     8250158.883129
+193796.906212     8250169.658935
+193815.947067     8250191.864372
+193846.341150     8250208.609126
+193866.703872     8250226.452530
+193885.281212     8250238.632802
+193897.006840     8250248.830848
+193918.742823     8250259.181795
+193934.242488     8250268.185137
+193949.187523     8250272.796877
+END
+LINE3D
+HEIGHT 1040.000000
+193961.761381     8250269.233508
+193981.528975     8250285.189202
+193990.126336     8250295.338462
+194003.143480     8250303.051057
+194016.242369     8250305.756647
+194031.156264     8250312.246484
+194046.162038     8250313.102771
+194066.798856     8250314.046262
+194094.267130     8250318.224305
+194123.611914     8250322.431155
+194144.752757     8250330.895155
+194162.836193     8250334.929135
+194175.863457     8250342.015949
+194195.823403     8250346.078734
+194215.703118     8250355.149313
+194239.386470     8250361.147831
+194256.198657     8250366.414170
+194277.379233     8250372.374268
+194299.660489     8250387.742611
+194328.731929     8250408.850150
+194353.413974     8250430.515481
+194366.259010     8250448.869420
+194384.170337     8250463.544744
+194403.917690     8250480.752001
+194425.633418     8250492.355276
+194442.445605     8250497.621615
+194454.150991     8250509.071225
+194473.908464     8250525.652700
+194491.667938     8250549.717041
+194507.570393     8250572.500237
+194516.026021     8250591.412733
+194526.267045     8250615.987598
+194536.004055     8250633.041189
+194546.830848     8250660.129558
+194551.007663     8250672.715473
+194552.006343     8250688.383050
+194556.626444     8250712.244929
+194560.168386     8250725.447799
+194559.844436     8250745.477396
+194559.571104     8250762.377321
+194543.727235     8250774.655904
+194532.293014     8250785.124367
+194517.186004     8250790.527426
+194501.534485     8250790.913101
+194484.571221     8250795.035026
+194458.151481     8250803.394876
+194428.462493     8250820.469951
+194410.085483     8250834.587460
+194395.594619     8250840.625914
+194384.059163     8250857.353721
+194372.009573     8250867.186037
+194367.326579     8250885.896846
+194367.002630     8250905.926443
+194365.447152     8250924.685262
+194365.133324     8250944.089078
+194373.538334     8250966.131246
+194380.116690     8250985.014925
+194384.737541     8251008.877579
+194393.102055     8251033.423638
+194402.011091     8251062.986316
+194409.587363     8251097.537560
+194418.022737     8251117.702384
+194431.524415     8251134.187828
+194446.286456     8251150.066682
+194459.010778     8251175.931542
+194473.519730     8251207.458758
+194483.822256     8251228.278181
+194491.692114     8251244.677172
+194497.665221     8251262.298922
+194497.815672     8251291.727914
+194498.580754     8251321.791514
+194499.497677     8251342.466861
+194502.312128     8251361.918698
+194502.069160     8251376.941278
+194489.625512     8251411.185202
+194484.275754     8251432.390288
+194477.695246     8251452.323843
+194463.001146     8251470.880974
+194443.826525     8251495.630226
+194416.860874     8251537.790701
+194391.166483     8251578.718053
+194371.325862     8251605.961593
+194353.442744     8251628.226157
+194333.128474     8251646.071078
+194312.208191     8251662.654058
+194283.073846     8251684.119971
+194259.005029     8251701.907257
+194242.576153     8251711.672347
+194228.054913     8251719.588910
+194207.276363     8251727.408654
+194187.194927     8251730.857541
+194161.522181     8251731.715320
+194138.352975     8251732.611531
+194113.942108     8251732.863508
+194076.402752     8251732.287253
+194035.109614     8251731.653374
+194001.949544     8251731.144344
+193980.677854     8251730.817808
+193947.598778     8251725.300997
+193916.326102     8251724.195002
+193878.786747     8251723.618747
+193848.765078     8251722.531956
+193818.108549     8251722.061357
+193787.431013     8251722.842309
+193762.969540     8251726.223195
+193737.862310     8251730.846806
+193722.150051     8251734.987935
+193705.802156     8251739.746008
+193684.428466     8251745.678806
+193656.213211     8251749.002068
+193636.050794     8251757.457972
+193615.282365     8251764.651935
+193590.124516     8251772.405218
+193561.828267     8251780.736262
+193522.744331     8251798.292291
+193486.798020     8251815.271312
+193462.154318     8251829.919324
+193441.275295     8251843.998425
+193419.235605     8251852.425511
+193389.677465     8251861.363121
+193368.152685     8251876.684948
+193349.190657     8251888.289728
+193331.439138     8251902.417602
+193316.745039     8251920.974734
+193292.575762     8251945.020612
+193269.687843     8251967.209113
+193251.148858     8251991.341420
+193235.930492     8252003.629605
+193223.204768     8252016.582755
+193205.352026     8252036.969210
+193183.705756     8252059.802709
+193150.948476     8252073.073533
+193129.453308     8252086.517239
+193113.670177     8252095.040368
+193095.970040     8252106.038582
+193078.833903     8252120.801840
+193059.216008     8252134.274363
+193028.881275     8252152.591400
+193004.660604     8252179.767703
+192984.971837     8252197.622226
+192963.446293     8252212.944040
+192950.084958     8252226.512606
+192937.863259     8252246.986266
+192919.445753     8252263.607665
+192890.734439     8252297.601869
+192856.503427     8252324.624506
+192834.948283     8252341.823678
+192817.166389     8252357.829661
+192792.532820     8252371.851127
+192770.997155     8252387.798724
+192755.072292     8252405.085088
+192741.115817     8252416.766707
+192728.995366     8252430.980258
+192713.625146     8252452.657460
+192691.362730     8252474.855563
+192668.484944     8252496.417519
+192643.709643     8252519.202220
+192620.155736     8252543.884246
+192601.626860     8252567.391536
+192586.327512     8252584.686738
+192571.130152     8252595.723371
+192554.670136     8252607.366559
+192529.996834     8252623.891927
+192505.998890     8252637.297213
+192490.780523     8252649.585398
+192477.953564     8252668.797893
+192464.571986     8252683.618022
+192455.630421     8252694.750686
+192442.783219     8252715.214744
+192434.366698     8252732.615602
+192429.612068     8252755.708399
+192428.077609     8252773.214902
+192423.383731     8252792.551481
+192422.322909     8252819.457367
+192430.748162     8252840.247972
+192439.143051     8252862.915922
+192453.026500     8252894.433537
+192471.815030     8252932.287346
+192485.285569     8252950.650888
+192494.457815     8252963.939423
+192508.019468     8252976.669401
+192537.767805     8252994.656117
+192558.766916     8253011.883353
+192574.165346     8253027.146039
+192584.044088     8253035.436395
+192593.922819     8253043.727514
+192604.346835     8253057.035265
+192614.749833     8253071.595331
+192624.577958     8253083.015359
+192634.759006     8253111.345689
+192635.605070     8253136.402272
+192635.260865     8253157.684197
+192629.275484     8253179.505463
+192623.381217     8253195.693165
+192615.045677     8253208.087006
+192609.232392     8253219.267692
+192605.901640     8253231.738360
+192595.739445     8253240.973711
+192583.639237     8253253.935699
+192566.412749     8253274.332532
+192548.671364     8253287.833861
+192526.641795     8253295.635165
+192502.674226     8253307.162343
+192490.069993     8253312.603821
+192466.234787     8253315.994320
+192446.142467     8253320.068976
+192425.405164     8253325.385606
+192400.368806     8253325.627217
+192375.251455     8253330.876610
+192349.518733     8253335.489855
+192328.084304     8253345.178107
+192309.768021     8253355.540925
+192292.754139     8253362.792523
+192269.462679     8253371.200394
+192241.761569     8253381.418385
+192225.968317     8253390.567295
+192213.283090     8253401.016555
+192201.122907     8253417.734008
+192192.806845     8253428.876274
+192185.702069     8253442.540882
+192173.591727     8253456.129416
+192165.275678     8253467.270918
+192169.392517     8253483.612298
+192172.227210     8253501.812572
+192181.358960     8253517.604997
+192193.023849     8253531.558497
+192204.667745     8253546.762785
+192223.820721     8253562.083106
+192250.964270     8253586.291500
+192286.272791     8253608.746656
+192303.527488     8253625.289712
+192312.043855     8253640.446754
+192321.195859     8253654.986852
+192332.144131     8253674.564313
+192342.506644     8253691.627506
+192352.365133     8253701.170189
+192364.736519     8253710.125509
+192379.620814     8253718.492703
+192402.568070     8253731.366757
+192419.832889     8253747.284031
+192436.371732     8253769.451060
+192447.914379     8253790.915456
+192457.621778     8253809.847168
+192464.876254     8253825.610776
+192485.280236     8253840.950301
+192512.021008     8253851.378076
+192539.993296     8253863.077393
+192565.432443     8253876.615637
+192574.655307     8253886.774499
+192589.357374     8253906.408819
+192597.298856     8253918.426587
+192609.477891     8253939.274816
+192622.272309     8253960.758427
+192634.965503     8253988.500620
+192645.146551     8254016.830950
+192652.732944     8254050.756413
+192657.847700     8254082.765359
+192663.577826     8254115.410452
+192669.419321     8254141.169655
+192669.842352     8254153.697947
+192677.148210     8254166.331894
+192679.407255     8254181.392882
+192679.164286     8254196.415462
+192677.528591     8254220.181309
+192673.410362     8254242.657174
+192673.096521     8254262.061754
+192673.306960     8254287.734517
+192672.952635     8254309.642223
+192672.659049     8254327.794475
+192672.335099     8254347.824073
+192668.206749     8254370.925719
+192667.237042     8254392.198042
+192663.229406     8254407.788769
+192663.016813     8254420.933240
+192654.559782     8254440.838753
+192649.321394     8254455.157949
+192640.298836     8254471.298395
+192628.723659     8254490.529341
+192615.200348     8254514.112705
+192599.133753     8254540.162305
+192584.872806     8254570.621946
+192576.557520     8254581.763460
+192561.903918     8254597.816700
+192541.549151     8254618.165512
+192526.956287     8254630.463299
+192516.743474     8254642.828322
+192497.054706     8254660.682845
+192478.485346     8254686.693262
+192463.236604     8254700.859555
+192437.876296     8254721.130764
+192418.167275     8254740.237614
+192392.262445     8254755.492204
+192360.059808     8254773.153866
+192338.545136     8254787.850675
+192318.896102     8254803.201295
+192296.765322     8254817.260416
+192279.075294     8254827.633613
+192267.045958     8254836.213601
+192248.719554     8254847.202201
+192229.040908     8254864.430942
+192208.767135     8254879.771972
+192195.374660     8254895.218635
+192187.654514     8254908.247096
+192173.041408     8254921.796446
+192161.567455     8254934.768812
+192146.359222     8254946.430451
+192131.796709     8254956.851657
+192120.363265     8254967.319367
+192104.377675     8254988.360422
+192092.186352     8255006.955973
+192079.914036     8255030.559305
+192070.073636     8255058.582292
+192064.744897     8255078.535062
+192060.142134     8255092.238078
+192048.556811     8255112.096334
+192029.361948     8255138.097149
+192011.397849     8255165.368730
+191993.605845     8255181.999731
+191974.552703     8255199.238074
+191956.176444     8255213.356359
+191944.045873     8255228.195692
+191931.884901     8255244.914662
+191913.386401     8255266.543842
+191893.444557     8255300.045963
+191879.981986     8255319.873873
+191872.250943     8255333.528868
+191858.183110     8255352.095613
+191846.546406     8255375.083529
+191841.974782     8255386.908448
+191832.820636     8255411.184819
+191827.593109     8255424.879773
+191823.020721     8255436.704680
+191819.013849     8255452.295418
+191818.710141     8255471.073452
+191821.514471     8255491.151071
+191826.206183     8255510.632490
+191836.173887     8255552.106515
+191839.725199     8255564.682828
+191855.728877     8255581.207444
+191872.389198     8255595.863564
+191888.403010     8255611.761634
+191906.152375     8255636.450993
+191918.875920     8255662.316605
+191922.427231     8255674.892917
+191927.240446     8255686.861900
+191934.464546     8255704.503617
+191938.530755     8255723.975434
+191939.538806     8255739.016454
+191942.413996     8255754.712837
+191942.624422     8255780.386363
+191944.924727     8255792.943472
+191931.421671     8255815.274509
+191921.188616     8255828.891096
+191911.581038     8255842.518813
+191899.490951     8255854.855019
+191881.800184     8255865.226675
+191858.499366     8255874.260340
+191837.639835     8255887.087101
+191821.745347     8255902.495357
+191808.171407     8255929.209157
+191790.318652     8255949.596377
+191780.781960     8255958.841330
+191768.692637     8255971.177548
+191758.438575     8255986.045686
+191726.277186     8256001.204233
+191702.148394     8256022.746985
+191689.987422     8256039.465955
+191674.062583     8256056.750791
+191650.609148     8256075.173461
+191622.777191     8256093.528917
+191585.004988     8256107.349460
+191561.673031     8256118.261221
+191532.065037     8256130.328515
+191513.183990     8256136.926278
+191484.897886     8256144.630012
+191472.828041     8256155.714655
+191463.845992     8256169.350446
+191442.279939     8256187.176915
+191432.107635     8256197.037284
+191423.196445     8256206.291839
+191418.533694     8256223.751085
+191405.101474     8256241.702414
+191395.524297     8256253.450494
+191380.688477     8256280.770097
+191364.712996     8256301.186134
+191337.729256     8256305.780939
+191315.002560     8256317.953866
+191301.177684     8256321.498795
+191288.028953     8256321.922125
+191260.317710     8256332.766662
+191235.785365     8256340.529547
+191206.995236     8256340.712771
+191181.242260     8256346.578344
+191156.104654     8256353.080064
+191142.319523     8256354.120326
+191113.549612     8256353.053515
+191087.414113     8256343.886142
+191073.730218     8256338.667060
+191060.067329     8256332.196426
+191033.921673     8256323.657126
+191016.463753     8256319.631984
+190998.945081     8256319.363060
+190983.919816     8256319.759113
+190951.385250     8256319.259685
+190928.236286     8256318.904332
+190900.152654     8256314.089377
+190875.853156     8256307.455464
+190852.775052     8256302.718875
+190824.711638     8256296.653885
+190798.545000     8256289.364608
+190778.655927     8256280.919823
+190758.826818     8256268.720336
+190732.701428     8256258.927945
+190699.713454     8256247.778334
+190674.839071     8256238.005147
+190663.678958     8256231.572933
+190643.758746     8256225.006245
+190618.742642     8256223.995529
+190586.269566     8256219.741422
+190561.263596     8256218.104160
+190542.564779     8256213.434797
+190529.527393     8256206.973765
+190514.582358     8256202.362025
+190495.288413     8256195.804951
+190468.476004     8256189.759164
+190443.510519     8256185.618775
+190425.427096     8256181.584032
+190404.165514     8256180.632479
+190381.651423     8256179.660170
+190355.999683     8256179.266398
+190327.845166     8256178.834206
+190309.055246     8256179.797642
+190284.603894     8256182.552746
+190270.839769     8256182.341457
+190253.886613     8256185.838365
+190237.598706     8256186.840208
+190224.419575     8256189.143176
+190231.068815     8256203.644091
+190232.097847     8256217.435087
+190237.757125     8256254.460652
+190237.240812     8256286.383921
+190232.395093     8256315.108753
+190226.501577     8256331.297232
+190221.574864     8256365.029845
+190212.976101     8256393.698594
+190205.113446     8256415.491042
+190201.147083     8256428.577126
+190196.423581     8256449.792589
+190191.709448     8256470.381496
+190192.071753     8256486.664477
+190195.502350     8256506.751709
+190198.729687     8256539.359147
+190202.179762     8256558.194805
+190211.987633     8256570.867160
+190225.408330     8256592.359621
+190238.071148     8256621.979923
+190251.298718     8256655.366044
+190264.648530     8256681.241270
+190271.267395     8256697.620293
+190274.132451     8256713.943222
+190273.859120     8256730.843147
+190273.555412     8256749.621181
+190273.251705     8256768.399215
+190272.897380     8256790.306922
+190267.648871     8256805.251899
+190266.780387     8256820.265641
+190262.117636     8256837.724887
+190257.484496     8256853.306012
+190257.241540     8256868.327828
+190256.281954     8256888.974369
+190254.787992     8256903.976981
+190254.494393     8256922.129998
+190252.252686     8256944.633904
+190250.708081     8256962.767717
+190248.608094     8256976.509152
+END
+LINE3D-MASTER
+HEIGHT 1050.000000
+183557.000000     8246655.540109
+183559.642744     8246663.554871
+183580.722657     8246675.774323
+183600.037041     8246681.079455
+183616.132031     8246691.970129
+183627.786615     8246706.549025
+183638.149504     8246723.612606
+183647.835896     8246743.795869
+183651.336781     8246759.501857
+183651.729628     8246773.908260
+183655.260888     8246787.736139
+183667.561407     8246801.073077
+183683.091449     8246808.198310
+183712.114622     8246793.617909
+183736.041324     8246784.593852
+183758.141753     8246772.411312
+183773.400425     8246757.619233
+183788.084213     8246739.687880
+183801.506293     8246722.363479
+183814.221883     8246710.036874
+183836.443797     8246690.343044
+183851.631788     8246679.932968
+183869.301931     8246670.812869
+183888.253838     8246659.833871
+183901.615364     8246646.265308
+183914.987024     8246632.070200
+183931.476639     8246618.549655
+183947.986700     8246603.776786
+183962.538876     8246593.982887
+183973.942339     8246585.392528
+183988.484202     8246576.224407
+184006.154536     8246567.104311
+184020.696400     8246557.936191
+184035.863958     8246548.777675
+184051.122821     8246533.985600
+184072.073098     8246515.524505
+184084.677325     8246510.083409
+184105.516244     8246498.507441
+184123.802145     8246490.023113
+184147.738975     8246480.372893
+184163.522100     8246471.850146
+184177.367600     8246467.053660
+184191.848719     8246461.641375
+184206.350092     8246454.976764
+184224.605623     8246448.370163
+184251.711223     8246436.264456
+184273.094843     8246429.705873
+184291.299572     8246426.228560
+184305.165315     8246420.180510
+184314.722256     8246409.683612
+184329.274241     8246399.889710
+184350.093103     8246389.565690
+184377.168333     8246379.337709
+184396.634565     8246375.254206
+184419.239211     8246370.592179
+184433.074386     8246366.422235
+184450.754848     8246356.675975
+184472.128347     8246350.743175
+184498.578074     8246340.505592
+184522.423783     8246336.489317
+184541.930518     8246329.901541
+184558.298846     8246323.891908
+184575.898123     8246319.153427
+184595.374483     8246314.443760
+184625.486878     8246309.897364
+184653.783128     8246301.566320
+184675.126257     8246297.511246
+184697.751145     8246291.597655
+184719.821204     8246281.292842
+184732.604514     8246277.000000
+END
+LINE3D-MASTER
+HEIGHT 1050.000000
+184977.156443     8246277.000000
+184989.489068     8246284.806496
+185010.548738     8246298.277511
+185024.130825     8246309.755929
+185034.645574     8246317.430111
+185047.652966     8246325.769257
+185059.469340     8246330.332970
+185069.973955     8246338.633698
+185091.689689     8246350.236591
+185107.895852     8246354.241753
+185127.825803     8246360.182653
+185151.438677     8246370.562413
+185171.398998     8246374.625586
+185190.067440     8246381.173059
+185212.530544     8246385.274269
+185238.101296     8246390.675441
+185262.451412     8246394.179682
+185278.627199     8246400.062953
+185291.039082     8246406.514383
+185304.035977     8246415.478923
+185318.294757     8246423.837280
+185331.866538     8246435.941094
+185349.787993     8246449.990255
+185361.473137     8246462.691428
+185379.252483     8246485.503436
+185395.155314     8246508.287020
+185406.113337     8246527.237930
+185415.255213     8246542.404191
+185429.815165     8246570.801741
+185443.871474     8246591.678787
+185456.131503     8246607.519234
+185462.790852     8246621.395131
+185471.942843     8246635.935993
+185484.152255     8246654.906113
+185500.791952     8246670.813791
+185518.632037     8246689.870345
+185538.379771     8246707.077607
+185560.680894     8246721.193999
+185580.509228     8246733.394238
+185604.697369     8246746.913277
+185631.317038     8246764.852348
+185651.034397     8246783.937719
+185666.412578     8246800.452351
+185680.569747     8246815.069664
+185696.705425     8246823.456450
+185714.737855     8246830.620479
+185735.323685     8246834.692872
+185765.294736     8246838.909335
+185787.131948     8246843.001320
+185800.250322     8246844.454953
+185818.323636     8246849.114714
+185848.101955     8246865.224079
+185873.682829     8246869.999469
+185895.570659     8246870.961782
+185915.541107     8246874.398791
+185931.808008     8246874.648500
+185949.326680     8246874.917424
+185966.855097     8246874.560178
+185985.695641     8246870.466688
+186007.684707     8246865.169656
+186022.155704     8246860.383153
+186041.783732     8246846.284084
+186054.468947     8246835.835589
+186072.744733     8246827.976661
+186090.828162     8246832.011023
+186100.696778     8246840.927542
+186111.857272     8246847.359762
+186131.746727     8246855.804554
+186149.739048     8246865.472096
+186164.673574     8246870.709995
+186185.865041     8246876.043941
+186198.357911     8246877.487971
+186217.651856     8246884.045046
+186231.960878     8246889.273342
+186256.260377     8246895.907255
+186276.765213     8246904.987430
+186292.890770     8246913.999997
+186305.292525     8246921.077591
+186317.068402     8246928.145195
+186334.465207     8246935.925403
+186346.897339     8246941.124887
+186376.191887     8246948.461415
+186391.782667     8246951.831193
+186407.373447     8246955.200972
+186422.974349     8246957.944969
+186437.939626     8246961.305146
+186450.422375     8246963.374958
+186463.520500     8246966.080536
+186479.484076     8246985.108284
+186479.886859     8246998.888521
+186475.264229     8247013.843488
+186462.538511     8247026.796256
+186450.448806     8247039.132468
+186440.891871     8247049.628985
+186431.264064     8247064.507501
+186412.846552     8247081.129282
+186396.972312     8247095.285592
+186387.919390     8247113.303383
+186382.620639     8247131.378420
+186382.993435     8247147.036390
+186397.322700     8247151.013123
+186409.957302     8247143.693918
+186420.745383     8247134.468174
+186431.522961     8247125.868206
+186441.120393     8247112.867799
+186456.490613     8247091.190597
+186464.170662     8247080.664887
+186476.926749     8247065.834392
+186492.154855     8247052.920420
+186516.071818     8247044.522151
+186530.168242     8247062.895300
+186534.325190     8247076.733166
+186529.601324     8247097.947478
+186518.712008     8247113.432566
+186509.134818     8247125.181410
+186500.819144     8247136.323300
+186488.688561     8247151.163396
+186478.384638     8247169.161601
+186472.368881     8247192.860976
+186472.761925     8247207.267000
+186483.871802     8247216.828893
+186500.754467     8247217.713990
+186518.566337     8247199.831038
+186526.922508     8247186.185257
+186534.037411     8247171.894485
+186541.778206     8247157.612939
+186550.134370     8247143.967541
+186558.450432     8247132.825275
+186566.150342     8247121.047995
+186575.747780     8247108.047206
+186590.330516     8247096.375583
+186603.056233     8247083.422815
+186615.024454     8247078.597893
+186626.427911     8247070.007915
+186637.831756     8247061.417561
+186657.852440     8247061.724893
+186672.746851     8247069.466687
+186686.873650     8247085.961727
+186701.697195     8247098.085140
+186713.412326     8247108.908579
+186723.856209     8247120.964379
+186737.438492     8247132.442418
+186750.486000     8247138.277668
+186763.432653     8247150.372268
+186777.004815     8247162.476089
+186796.177276     8247176.544453
+186814.683743     8247193.106724
+186829.547785     8247202.726246
+186842.615540     8247207.309551
+186861.243485     8247216.360914
+186886.158365     8247223.630211
+186902.344279     8247228.887318
+186917.874315     8247236.012933
+186940.256431     8247245.121543
+186961.972159     8247256.724818
+186985.595154     8247266.478796
+187008.501537     8247281.856353
+187027.623380     8247299.054389
+187047.310370     8247320.017488
+187068.218371     8247342.877905
+187088.087202     8247352.574254
+187107.976663     8247361.018663
+187126.039850     8247366.304588
+187135.867969     8247377.724998
+187149.369259     8247394.210818
+187161.629288     8247410.051265
+187171.467534     8247420.845511
+187182.496799     8247435.415191
+187198.348636     8247461.328060
+187218.671249     8247481.674978
+187244.665416     8247499.604447
+187260.729846     8247512.372845
+187282.303847     8247532.738973
+187298.277550     8247551.140558
+187310.486962     8247570.110677
+187321.485475     8247586.558078
+187340.093178     8247596.861005
+187365.593065     8247606.643794
+187388.550060     8247618.892060
+187410.235425     8247632.372680
+187426.310357     8247644.515302
+187444.241557     8247657.938293
+187465.825680     8247677.678640
+187483.080759     8247694.221702
+187495.401527     8247706.306694
+187509.548957     8247721.549795
+187529.982927     8247735.011588
+187549.842019     8247745.333724
+187570.992607     8247753.171555
+187604.616205     8247763.704986
+187640.066070     8247777.397283
+187671.176771     8247788.518076
+187704.204847     8247797.164554
+187742.843737     8247807.149036
+187778.394462     8247814.581601
+187817.164958     8247816.429011
+187863.413031     8247820.269401
+187909.589857     8247828.491403
+187948.228747     8247838.475885
+187998.735010     8247849.894413
+188031.208068     8247854.149666
+188064.317519     8247857.788369
+188098.102710     8247858.306995
+188141.273122     8247858.969691
+188175.684198     8247859.497925
+188214.999209     8247866.362337
+188263.679193     8247874.622764
+188294.769645     8247886.995503
+188334.669281     8247896.373401
+188379.020596     8247901.436930
+188411.412672     8247910.699201
+188443.845239     8247917.457962
+188486.248415     8247926.874291
+188521.102771     8247938.678872
+188554.040121     8247952.958537
+188591.870903     8247974.200155
+188633.990620     8248001.142573
+188664.353569     8248019.765043
+188689.197577     8248031.416339
+188717.149622     8248044.367220
+188743.850661     8248057.298898
+188762.478612     8248066.349879
+188778.684768     8248070.355423
+188795.517198     8248074.370199
+188817.898926     8248083.479185
+188849.655371     8248093.358017
+188881.421945     8248102.610685
+188909.394238     8248114.309621
+188939.899678     8248124.169249
+188981.636090     8248136.079856
+189019.578999     8248150.435977
+189051.890081     8248164.706029
+189083.545291     8248180.844205
+189120.831557     8248197.068823
+189137.572872     8248206.717162
+189147.411112     8248217.511790
+189162.001815     8248244.031618
+189170.578164     8248255.432813
+189190.245287     8248277.647862
+189211.244403     8248294.874717
+189240.406964     8248310.348310
+189259.498438     8248329.424074
+189279.317414     8248342.250107
+189294.715844     8248357.512793
+189308.216758     8248373.998225
+189323.080800     8248383.617747
+189338.539968     8248395.124980
+189360.911575     8248404.859747
+189379.519278     8248415.162674
+189395.634326     8248424.801399
+189415.524162     8248433.246196
+189434.233101     8248437.289778
+189457.311205     8248442.026367
+189474.829876     8248442.295290
+189492.953033     8248443.826132
+END
+LINE3D-MASTER
+HEIGHT 1050.000000
+189507.989182     8248442.804309
+189526.102981     8248444.960944
+189544.186417     8248448.994924
+189567.122788     8248462.494748
+189603.158048     8248478.700161
+189629.757087     8248497.891171
+189653.945228     8248511.410211
+189686.852208     8248527.567603
+189730.263422     8248552.025716
+189762.584632     8248565.669604
+189776.217909     8248574.018358
+189790.526556     8248579.246266
+189810.446768     8248585.812954
+189832.788000     8248597.425831
+189865.653719     8248616.087103
+189894.110553     8248636.558505
+189913.837651     8248655.018089
+189934.786156     8248675.374234
+189957.621279     8248695.134166
+189989.761036     8248720.044428
+190012.928088     8248757.965451
+190035.591879     8248788.365975
+190057.003899     8248818.747285
+190079.142671     8248842.878087
+190106.398341     8248860.201366
+190128.073585     8248874.307768
+190149.102307     8248889.656883
+190176.378231     8248905.727834
+190208.053695     8248920.613684
+190237.257511     8248933.583780
+190258.942863     8248947.065164
+190281.243610     8248961.181168
+190307.853534     8248979.746408
+190340.709133     8248999.033461
+190372.333979     8249017.048982
+190397.804254     8249028.709892
+190424.534905     8249039.763449
+190454.424962     8249048.987693
+190487.391917     8249061.389619
+190513.477574     8249073.685913
+190541.429619     8249086.636794
+190565.638003     8249098.904270
+190599.876983     8249110.073085
+190624.680506     8249124.227508
+190648.756514     8249144.632426
+190675.406935     8249160.693775
+190699.564701     8249176.090924
+190731.825172     8249193.490266
+190760.927751     8249212.719707
+190791.896719     8249232.603735
+190827.062743     8249263.822115
+190870.382855     8249293.913028
+190900.746562     8249312.535891
+190923.006812     8249329.155785
+190947.820444     8249342.685191
+190975.802865     8249353.757963
+190996.216969     8249368.471706
+191018.487340     8249384.465819
+191041.403469     8249399.217206
+191061.847948     8249412.052841
+191089.870854     8249420.622486
+191110.385442     8249429.076109
+191134.684940     8249435.710022
+191156.461407     8249443.557843
+191183.919560     8249448.361669
+191205.766900     8249451.827490
+191226.353112     8249455.899889
+191240.681989     8249459.876998
+191259.996188     8249465.181745
+191279.250401     8249474.242722
+191299.139473     8249482.687507
+191313.952897     8249495.436701
+191339.926433     8249514.618109
+191362.691472     8249538.758525
+191383.033952     8249557.853493
+191402.822552     8249572.557635
+191418.251358     8249585.942212
+191436.848940     8249596.870920
+191460.380438     8249612.258455
+191485.758835     8249629.552916
+191508.604855     8249648.686315
+191523.962800     8249666.452128
+191538.766102     8249679.827104
+191555.456035     8249692.605103
+191574.577872     8249709.803522
+191597.413771     8249729.562703
+191616.454627     8249751.768139
+191626.756389     8249772.587549
+191632.709241     8249791.461626
+191636.896953     8249803.421007
+191641.668895     8249817.894632
+191642.091926     8249830.422923
+191643.100728     8249845.464719
+191643.483263     8249860.496901
+191643.209931     8249877.396826
+191642.865727     8249898.678751
+191642.572141     8249916.831003
+191642.207694     8249939.364491
+191645.576789     8249963.207166
+191650.086284     8249993.954947
+191652.688130     8250026.552019
+191656.733345     8250047.274623
+191662.040439     8250067.391425
+191671.101329     8250087.565086
+191675.227525     8250103.280673
+191682.533383     8250115.914621
+191689.061120     8250137.927972
+191704.801600     8250170.725967
+191718.242527     8250190.967629
+191728.635404     8250206.153477
+191739.654560     8250221.348174
+191751.308565     8250235.927444
+191766.010631     8250255.561764
+191783.749862     8250280.877669
+191791.721720     8250291.017328
+191807.836768     8250300.656053
+191822.165645     8250304.633162
+191844.538015     8250314.367942
+191862.661184     8250315.898019
+191875.164181     8250316.715886
+191890.815701     8250316.330211
+191908.405232     8250312.217899
+191929.758680     8250307.536665
+191966.915501     8250293.080738
+191985.251262     8250281.466344
+192003.486539     8250276.112071
+192022.337211     8250271.392418
+192039.876124     8250270.409778
+192054.286007     8250269.378342
+192069.937526     8250268.992667
+192093.722878     8250268.731851
+192113.763817     8250267.786856
+192135.036271     8250268.113403
+192160.698132     8250267.881393
+192195.735475     8250268.419241
+192232.648564     8250268.985883
+192262.054851     8250269.437290
+192286.516324     8250266.056404
+192306.547129     8250265.737954
+192325.962564     8250264.783356
+192345.984012     8250265.090700
+192366.630200     8250265.407633
+192389.779927     8250265.762998
+192417.328419     8250264.934012
+192455.575035     8250260.512100
+192489.986111     8250261.040334
+192502.499230     8250261.232419
+192516.293718     8250259.566363
+192530.744849     8250256.031812
+192561.462130     8250252.746193
+192599.072345     8250248.941213
+192622.918436     8250244.924944
+192638.015325     8250240.147667
+192651.234940     8250235.341572
+192670.075478     8250231.248465
+192704.547293     8250228.021245
+192737.707363     8250228.530275
+192765.235612     8250228.952853
+192794.026517     8250228.768877
+192831.010478     8250224.953519
+192862.374256     8250220.426714
+192880.599424     8250215.697459
+192898.188956     8250211.585147
+192917.725869     8250203.119641
+192943.448482     8250199.131413
+192971.098973     8250192.043095
+192994.409912     8250182.383649
+193015.158099     8250176.441250
+193045.200010     8250176.276477
+193085.312251     8250172.509141
+193112.932379     8250167.298167
+193131.783038     8250162.579278
+193153.126365     8250158.523825
+193177.527099     8250158.898393
+193205.681615     8250159.330585
+193233.836132     8250159.762776
+193251.283167     8250164.413688
+193271.162883     8250173.484267
+193295.391521     8250184.499416
+193319.599140     8250196.766880
+193348.752338     8250212.866649
+193381.022930     8250229.640209
+193411.376515     8250248.888854
+193437.329809     8250269.321826
+193467.723880     8250286.067344
+193486.754614     8250308.898562
+193499.014643     8250324.739009
+193512.607436     8250335.590890
+193525.503089     8250350.815157
+193545.876709     8250368.032027
+193567.592437     8250379.635302
+193584.262128     8250393.664865
+193605.281492     8250409.639774
+193621.789196     8250433.684900
+193637.167384     8250450.199150
+193650.780418     8250459.799467
+193664.301575     8250475.033337
+193684.725812     8250489.120534
+193699.508096     8250503.747826
+193711.223616     8250514.570889
+193715.411315     8250526.531034
+193726.913466     8250550.499321
+193732.673967     8250581.266305
+193738.011449     8250599.504234
+193738.414226     8250613.284853
+193737.414156     8250636.434521
+193735.636716     8250668.964368
+193730.317334     8250688.291345
+193724.220596     8250716.997737
+193719.436367     8250741.967891
+193709.737700     8250761.227643
+193705.730827     8250776.818381
+193699.211058     8250792.996482
+193693.891664     8250812.324223
+193689.915167     8250826.036853
+193688.340211     8250846.047246
+193683.707072     8250861.628371
+193682.858843     8250875.389786
+193683.170517     8250894.803204
+193696.176138     8250941.959590
+193707.042664     8250966.544056
+193716.789796     8250982.971866
+193728.434443     8250998.176929
+193743.822751     8251014.065397
+193753.519265     8251033.622879
+193757.625983     8251050.590040
+193759.926288     8251063.147149
+193768.391274     8251081.433852
+193769.853483     8251107.125830
+193770.256260     8251120.906448
+193753.624912     8251143.190228
+193738.102838     8251174.256447
+193724.105866     8251188.441957
+193705.890831     8251192.544667
+193687.604924     8251201.029376
+193663.082712     8251208.165716
+193649.176854     8251216.717662
+193629.629820     8251225.808950
+193619.447382     8251236.295864
+193608.063779     8251243.634655
+193598.970373     8251264.155572
+193592.470845     8251279.082110
+193587.868833     8251292.785901
+193585.031986     8251313.402861
+193580.984617     8251331.497490
+193579.489878     8251346.500855
+193575.462764     8251363.343157
+193566.379466     8251383.239056
+193551.111246     8251398.656925
+193529.494599     8251419.611539
+193514.668889     8251446.306124
+193500.621299     8251463.621306
+193485.947454     8251480.926110
+193470.648094     8251498.222076
+193444.621786     8251520.987574
+193410.421149     8251546.132102
+193384.364466     8251570.775708
+193361.638534     8251582.948647
+193340.697996     8251600.783954
+193317.880949     8251618.590456
+193293.812896     8251636.377753
+193287.857891     8251656.320910
+193278.936580     8251666.201247
+193269.853282     8251686.097146
+193261.406385     8251705.376114
+193244.774274     8251727.659882
+193235.641122     8251750.685466
+193222.127169     8251773.643037
+193216.193169     8251792.334642
+193218.946881     8251815.541933
+193210.600444     8251828.562308
+193198.459739     8251844.028186
+193172.494170     8251863.038230
+193147.103487     8251885.187548
+193122.994173     8251905.478724
+193105.747443     8251927.127121
+193091.618872     8251949.449320
+193075.694021     8251966.734920
+193058.659120     8251975.238833
+193041.584486     8251986.246649
+193026.426859     8251994.779380
+193010.058722     8252000.789016
+193000.511908     8252010.659751
+192987.846936     8252019.856683
+192969.520544     8252030.844519
+192951.718407     8252048.102066
+192928.326475     8252062.769294
+192903.733391     8252074.287633
+192875.951288     8252089.513405
+192846.242057     8252107.840044
+192821.466756     8252130.624745
+192795.531551     8252147.757444
+192768.960733     8252165.505558
+192754.276755     8252183.436908
+192736.545491     8252196.312455
+192718.088239     8252215.438521
+192697.742842     8252235.160775
+192665.601695     8252249.067758
+192637.123229     8252268.665164
+192609.662922     8252302.678572
+192576.774794     8252324.086862
+192548.357066     8252339.928814
+192530.071159     8252348.413524
+192510.341895     8252368.771937
+192483.791320     8252385.268488
+192469.249075     8252394.436602
+192457.875606     8252401.148847
+192447.723531     8252409.758417
+192436.834596     8252425.243511
+192426.692643     8252433.227299
+192415.268556     8252443.069216
+192398.778941     8252456.589761
+192380.351301     8252473.837706
+192369.411748     8252492.452472
+192355.454509     8252504.134079
+192340.043804     8252528.314408
+192325.965839     8252547.507699
+192301.836283     8252569.050439
+192273.388192     8252586.769735
+192251.227012     8252602.708494
+192232.901384     8252613.696342
+192216.976520     8252630.982706
+192193.583825     8252645.649922
+192179.011979     8252656.695393
+192158.808302     8252667.655176
+192138.615522     8252677.988425
+192119.108984     8252684.575821
+192105.908847     8252688.130341
+192084.333450     8252706.581839
+192074.746139     8252718.956465
+192057.640378     8252731.841614
+192045.570546     8252742.925493
+192029.736797     8252754.578294
+192021.381002     8252768.224462
+192017.424748     8252780.685529
+192008.412323     8252796.199428
+192002.507935     8252813.012913
+191998.470687     8252830.481760
+191998.247973     8252844.252013
+191997.974641     8252861.151938
+191992.009502     8252881.721641
+191991.776655     8252896.118439
+191987.194897     8252908.569903
+191977.435491     8252931.585109
+191965.839296     8252952.068371
+191956.907864     8252962.574490
+191946.543197     8252984.328530
+191935.553026     8253006.072969
+191929.425912     8253036.657470
+191927.789454     8253060.423306
+191923.025467     8253084.141896
+191913.840946     8253110.296377
+191912.144499     8253137.818442
+191901.607724     8253170.213827
+191897.357132     8253200.826370
+191892.008138     8253222.031468
+191887.829158     8253248.263551
+191881.661560     8253281.351179
+191879.944107     8253310.124796
+191874.040471     8253326.939056
+191873.777260     8253343.213200
+191872.918146     8253357.600384
+191866.297141     8253380.037830
+191852.138194     8253404.238138
+191837.059406     8253446.580321
+191831.044413     8253470.279708
+191825.089407     8253490.222864
+191824.684464     8253515.260243
+191828.496832     8253550.379646
+191836.114352     8253582.427775
+191840.805313     8253601.908418
+191853.004603     8253621.504319
+191867.040669     8253643.632928
+191880.339112     8253672.637050
+191893.215287     8253689.112892
+191909.895086     8253702.517437
+191933.427361     8253717.904220
+191960.046642     8253735.843666
+191988.492579     8253756.941603
+192014.557994     8253770.489460
+192033.216315     8253777.662714
+192053.105387     8253786.107499
+192073.580243     8253797.065025
+192095.891111     8253810.555247
+192118.120985     8253829.053250
+192142.268629     8253845.076180
+192160.795339     8253860.386888
+192175.548023     8253876.891536
+192186.515785     8253895.216658
+192199.199610     8253923.585408
+192208.835384     8253946.898344
+192221.710796     8253963.374174
+192233.899952     8253983.596621
+192247.966394     8254003.847121
+192267.410027     8254039.833175
+192285.582424     8254077.050826
+192302.584783     8254109.243019
+192312.210436     8254133.181736
+192315.065372     8254150.130446
+192314.680683     8254173.915498
+192318.059886     8254197.133155
+192318.412058     8254214.042682
+192319.360120     8254232.839931
+192324.524731     8254261.719193
+192327.793340     8254291.821988
+192327.520009     8254308.721913
+192315.640361     8254346.730882
+192308.786508     8254383.565126
+192304.658145     8254406.667536
+192298.723382     8254425.359130
+192286.532059     8254443.954681
+192269.325826     8254463.099186
+192252.189689     8254477.862444
+192239.534851     8254486.432831
+192219.281319     8254500.522297
+192194.546502     8254520.803872
+192171.033092     8254542.982007
+192145.067523     8254561.992051
+192112.279867     8254577.140984
+192083.841886     8254594.235264
+192061.024851     8254612.041001
+192036.935780     8254631.080614
+192010.889230     8254655.097675
+191984.893285     8254675.985828
+191967.121524     8254691.365266
+191954.365437     8254706.195761
+191941.599229     8254721.652037
+191925.028621     8254740.180363
+191909.688776     8254759.979456
+191894.954932     8254781.041254
+191878.333705     8254802.699252
+191862.459484     8254816.854416
+191851.005009     8254828.575206
+191842.709214     8254838.464381
+191834.383783     8254850.233204
+191823.494084     8254865.718287
+191817.590460     8254882.531783
+191812.372302     8254895.600179
+191805.903163     8254908.647844
+191795.589113     8254927.272212
+191785.325682     8254942.766908
+191772.498722     8254961.979403
+191761.629266     8254976.212922
+191750.790949     8254988.568343
+191726.116883     8255005.093700
+191714.713051     8255013.683290
+191700.120951     8255025.981089
+191685.517955     8255038.905421
+191673.468377     8255048.736972
+191649.995439     8255068.412745
+191621.466355     8255091.139823
+191600.525830     8255108.974367
+191589.758373     8255116.948553
+191577.063025     8255128.023594
+191560.522792     8255144.673810
+191542.014159     8255166.929537
+191525.514435     8255181.075099
+191515.362348     8255189.685432
+191496.349714     8255204.419121
+191482.422838     8255214.223383
+191467.184229     8255227.763131
+191453.126530     8255245.703330
+191445.910385     8255266.253829
+191445.657295     8255281.902191
+191444.748327     8255299.419060
+191443.223225     8255316.299769
+191442.899276     8255336.329366
+191443.241314     8255353.865439
+191444.209619     8255371.411125
+191443.743924     8255400.204722
+191437.647198     8255428.910350
+191429.209658     8255447.563525
+191422.770870     8255458.734608
+191411.347534     8255468.577301
+191388.540633     8255485.756493
+191361.979161     8255502.879578
+191331.583676     8255524.952833
+191310.653260     8255542.162358
+191294.143402     8255556.934466
+191280.125424     8255572.371527
+191274.242042     8255587.933460
+191273.352553     8255604.198754
+191273.089354     8255620.472133
+191272.755271     8255641.128276
+191272.400946     8255663.035983
+191272.036487     8255685.570235
+191271.773289     8255701.843614
+191271.459448     8255721.248194
+191271.165874     8255739.399682
+191269.651645     8255755.655386
+191264.826931     8255783.128666
+191258.286907     8255800.559095
+191251.110507     8255818.604927
+191239.606178     8255833.455401
+191224.499180     8255838.857696
+191206.899515     8255843.596553
+191194.921562     8255849.046881
+191170.964101     8255859.949040
+191146.391272     8255870.215052
+191128.226830     8255871.189618
+191110.678571     8255872.797287
+191085.591583     8255876.169334
+191059.939843     8255875.775562
+191041.805802     8255874.870491
+191028.101640     8255870.904500
+191010.593865     8255870.009042
+190982.459591     8255868.325287
+190952.549279     8255860.353370
+190934.516474     8255853.188954
+190914.052516     8255841.604894
+190894.132303     8255835.038206
+190874.757365     8255833.488913
+190852.930267     8255828.771529
+190828.529533     8255828.396960
+190807.267976     8255827.443879
+190791.626578     8255827.203773
+190775.358913     8255826.954053
+190752.189682     8255827.851791
+190716.456740     8255831.685589
+190688.241497     8255835.008087
+190670.097322     8255834.729562
+190651.953147     8255834.451036
+190629.439795     8255833.480267
+190601.295412     8255832.421530
+190578.792194     8255830.824216
+190560.103510     8255825.528307
+190541.333832     8255825.240179
+190516.307595     8255824.856009
+190490.655091     8255824.462225
+190456.799422     8255828.324840
+190432.327803     8255832.333035
+190406.544476     8255840.075189
+190378.248214     8255848.406997
+190346.258157     8255852.924952
+190316.771665     8255857.479809
+190294.106460     8255865.898058
+190276.405559     8255876.896260
+190262.469338     8255887.325551
+190246.655844     8255897.726025
+190225.231536     8255906.788495
+190200.699191     8255914.551381
+190185.561818     8255921.831784
+190172.311827     8255928.515988
+190158.365497     8255939.570297
+190144.448755     8255948.748013
+190132.480910     8255953.573323
+190113.539136     8255963.925775
+190092.699822     8255975.502502
+190077.613067     8255979.653233
+190064.423828     8255982.581218
+190044.372768     8255984.151996
+190033.624814     8255990.873079
+190017.983416     8255990.632972
+190002.937145     8255992.280577
+189986.034607     8255992.647812
+189972.895986     8255992.446125
+189959.100721     8255994.112934
+189940.694112     8256010.107799
+189944.063194     8256033.951238
+189954.435816     8256050.389413
+189966.212087     8256057.456258
+189978.634079     8256063.282671
+189988.512834     8256071.572262
+189998.340947     8256082.993054
+190006.796575     8256101.905550
+190010.347886     8256114.481862
+190014.282484     8256142.091133
+190013.826923     8256170.258184
+190009.224159     8256183.961200
+190008.981203     8256198.983016
+190008.092477     8256215.248321
+190003.510720     8256227.699786
+189997.444345     8256254.528833
+189997.090019     8256276.436539
+189996.120324     8256297.708098
+189995.867235     8256313.356460
+189991.163236     8256333.318820
+189990.930388     8256347.715619
+189986.822280     8256369.565702
+189987.042840     8256394.612683
+190002.178060     8256426.149513
+190013.812585     8256441.980358
+190028.534907     8256460.362351
+190038.836669     8256481.181762
+190046.504807     8256510.100218
+190050.550010     8256530.823587
+190055.201237     8256552.808132
+190059.811981     8256577.295804
+190059.589267     8256591.066056
+190064.087877     8256622.439607
+190067.870621     8256659.437894
+190067.485945     8256683.222182
+190067.232855     8256698.870543
+190066.929148     8256717.648578
+190062.921512     8256733.239304
+190053.182348     8256755.002947
+190040.213668     8256782.977913
+190033.704019     8256798.530232
+190029.101995     8256812.234788
+190028.838796     8256828.508167
+190029.190968     8256845.417694
+190028.856885     8256866.073837
+190028.462051     8256890.486199
+190026.947846     8256906.740374
+190026.069253     8256922.379134
+190028.995061     8256934.945845
+190036.956034     8256945.711273
+190046.834765     8256954.002393
+190062.879716     8256968.022366
+190080.185019     8256981.436513
+190089.407871     8256991.596139
+END
+LINE3D
+HEIGHT 1060.000000
+183577.345605     8247000.662898
+183725.729241     8247151.324068
+183765.852361     8247146.931343
+183777.830900     8247141.480260
+183793.614025     8247132.957514
+183813.867747     8247118.868050
+183842.951665     8247100.531812
+183880.169034     8247082.320428
+183901.654081     8247069.502504
+183925.692140     8247053.593322
+183956.118371     8247029.642728
+183985.232658     8247009.428763
+184011.813991     8246991.054109
+184028.929306     8246977.542787
+184041.624648     8246966.468128
+184056.883511     8246951.676053
+184069.538356     8246943.105285
+184081.567513     8246934.524530
+184094.858180     8246925.337202
+184111.963368     8246912.452045
+184130.380689     8246895.830260
+184144.388164     8246881.018975
+184158.405761     8246865.581908
+184171.756975     8246852.639124
+184183.241616     8246839.041368
+184196.623397     8246824.220478
+184213.143388     8246808.821824
+184239.068651     8246792.315674
+184262.430596     8246779.526180
+184280.696063     8246772.293413
+184300.101556     8246771.965364
+184324.623584     8246764.828639
+184351.536833     8246764.615839
+184379.065847     8246765.038429
+184402.295989     8246760.386385
+184425.556698     8246753.856236
+184446.899827     8246749.801162
+184465.205786     8246740.064886
+184479.112025     8246731.512946
+184493.028195     8246722.335221
+184511.959847     8246712.608550
+184532.203633     8246699.145252
+184551.821725     8246685.672350
+184569.522238     8246674.674524
+184585.991802     8246662.405546
+184606.810473     8246652.081523
+184633.280443     8246640.592377
+184655.945827     8246632.174896
+184677.924771     8246627.503645
+184697.955768     8246627.185198
+184724.919832     8246623.842347
+184755.698419     8246616.801665
+184779.544128     8246612.785390
+184804.106843     8246603.144778
+184833.644162     8246595.459104
+184866.360570     8246584.691783
+184892.184603     8246574.444595
+184909.864867     8246564.698715
+184925.002055     8246557.417926
+184942.087192     8246545.784335
+184958.526387     8246535.393084
+184977.377052     8246530.673812
+184997.468793     8246526.599529
+185019.366751     8246526.935678
+185039.448365     8246523.487558
+185053.828635     8246524.334242
+185065.574136     8246533.279955
+185080.972566     8246548.542642
+185098.944645     8246559.461748
+185118.147475     8246571.652385
+185142.315368     8246586.423370
+185160.226320     8246601.098306
+185183.778831     8246615.233908
+185209.126864     8246634.405714
+185238.803946     8246656.774424
+185266.594011     8246679.740485
+185286.301248     8246699.451638
+185303.627187     8246711.613464
+185322.234890     8246721.916391
+185339.601326     8246731.574326
+185358.824787     8246742.513024
+185385.464705     8246759.200149
+185405.848057     8246775.791614
+185419.369602     8246791.025107
+185432.245007     8246807.501319
+185451.377359     8246824.073198
+185476.735513     8246842.619223
+185510.792264     8246865.055163
+185535.545169     8246882.339259
+185556.019636     8246893.297160
+185576.504606     8246903.629286
+185601.903257     8246919.671420
+185634.749117     8246939.584260
+185653.316323     8246952.391078
+185671.278274     8246963.936347
+185687.978710     8246976.088571
+185712.186718     8246988.355660
+185741.954909     8247005.091188
+185769.825967     8247023.049468
+185792.106841     8247038.417805
+185810.017793     8247053.092742
+185831.057406     8247067.815705
+185850.916497     8247078.137841
+185873.934231     8247086.630654
+185888.172388     8247096.240568
+185902.400423     8247106.476263
+185918.464853     8247119.244661
+185931.431754     8247130.087316
+185943.803146     8247139.042255
+185958.021054     8247149.904114
+185974.085484     8247162.672511
+185995.145339     8247176.143912
+186013.117418     8247187.063018
+186029.252708     8247195.450180
+186046.710258     8247199.474552
+186070.353502     8247207.976584
+186097.176025     8247213.396971
+186127.772191     8247217.623412
+186148.347894     8247222.321969
+186166.411081     8247227.607895
+186180.730225     8247232.210409
+186203.183207     8247236.937402
+186218.773988     8247240.307180
+186235.646144     8247241.818436
+186256.847732     8247246.526601
+186275.506053     8247253.699855
+186291.036088     8247260.825470
+186303.478340     8247265.399172
+186315.264720     8247271.841000
+186334.589040     8247276.519966
+186353.318221     8247279.311984
+186386.396922     8247284.828408
+186388.687099     8247298.011680
+186384.619106     8247317.357867
+186383.165628     8247329.857353
+186392.358117     8247341.894324
+186407.434375     8247338.368987
+186422.531257     8247333.592092
+186441.462910     8247323.865421
+186462.896963     8247314.176782
+186479.860616     8247310.054480
+186494.917002     8247307.781476
+186509.387999     8247302.994973
+186534.515472     8247297.119799
+186547.664221     8247296.695322
+186565.263880     8247291.956847
+186580.854660     8247295.326626
+186598.816230     8247306.871890
+186628.533803     8247326.737090
+186647.757270     8247337.675406
+186673.166042     8247353.091759
+186692.964388     8247367.169731
+186710.270085     8247380.583120
+186722.046337     8247387.651112
+186745.568096     8247403.664434
+186762.268539     8247415.816276
+186782.692388     8247429.903850
+186795.638659     8247441.998445
+186817.929660     8247456.740618
+186836.557612     8247465.791599
+186858.888722     8247478.030258
+186881.189845     8247492.146649
+186899.777299     8247503.701521
+186916.477353     8247515.853739
+186930.705770     8247526.089440
+186946.800570     8247536.980111
+186965.993279     8247549.796530
+186990.715809     8247568.958734
+187011.079301     8247586.801768
+187033.339551     8247603.421663
+187051.856139     8247619.358152
+187076.538172     8247641.024247
+187110.503808     8247669.093751
+187139.535146     8247692.704422
+187164.227300     8247713.744735
+187185.892416     8247728.477301
+187208.203284     8247741.967523
+187228.082617     8247751.038095
+187247.982199     8247758.856723
+187266.589902     8247769.159649
+187290.727044     8247785.808355
+187310.505141     8247801.138273
+187325.379304     8247810.132013
+187347.700293     8247822.996453
+187378.608522     8247846.635936
+187405.793331     8247868.340450
+187426.761696     8247887.445025
+187444.713520     8247899.616459
+187465.157618     8247912.452088
+187495.501083     8247932.326514
+187516.459326     8247952.056871
+187529.314865     8247969.785035
+187539.778996     8247980.588889
+187557.054317     8247995.880387
+187573.179486     8248004.893331
+187603.119786     8248010.987515
+187617.510178     8248011.208418
+187641.315396     8248009.695651
+187654.454018     8248009.897338
+187673.667357     8248021.461818
+187689.197392     8248028.587433
+187708.430599     8248038.899961
+187728.935435     8248047.980136
+187746.403107     8248051.378726
+187773.871381     8248055.556770
+187790.743919     8248057.068031
+187807.565840     8248061.708965
+187828.060555     8248071.414921
+187859.705644     8248088.178880
+187875.810952     8248098.443393
+187890.715102     8248105.559400
+187903.793367     8248109.516547
+187916.851001     8248114.725633
+187932.381036     8248121.851248
+187947.900950     8248129.602644
+187960.978833     8248133.559785
+187972.139710     8248139.992011
+187985.136599     8248148.956934
+187993.744081     8248158.480413
+188001.644690     8248173.001683
+188003.934492     8248186.184568
+188003.651033     8248203.710657
+188002.762313     8248219.975580
+187993.729640     8248236.741425
+187984.132208     8248249.741833
+187968.217472     8248266.402033
+187959.225677     8248280.663994
+187946.520208     8248292.364816
+187934.308643     8248312.211930
+187928.475497     8248324.644185
+187927.647141     8248337.153267
+187926.748294     8248354.044354
+187933.972788     8248371.685313
+187948.917429     8248376.297811
+187968.393985     8248371.587765
+187982.915607     8248363.671208
+187995.610942     8248352.596931
+188004.673604     8248333.953353
+188009.932246     8248318.381830
+188017.763767     8248298.467097
+188024.232925     8248285.418287
+188029.461192     8248271.724873
+188036.565975     8248258.059883
+188044.962642     8248241.910211
+188055.175838     8248229.545194
+188068.213223     8248236.006225
+188087.486920     8248243.815245
+188103.077701     8248247.185024
+188120.606493     8248246.828166
+188135.713121     8248241.425102
+188152.071513     8248236.041635
+188178.903781     8248240.835852
+188193.212797     8248246.064530
+188206.906062     8248250.657055
+188220.670951     8248250.868356
+188238.188858     8248251.137268
+188252.579250     8248251.358171
+188273.851705     8248251.684718
+188292.621382     8248251.972845
+188308.878156     8248252.848717
+188328.222720     8248256.276119
+188355.751733     8248256.698709
+188380.767849     8248257.708661
+188405.077468     8248263.716792
+188433.746131     8248271.043712
+188462.465406     8248275.241342
+188491.164438     8248280.690535
+188511.074529     8248287.883004
+188532.286239     8248291.965387
+188554.103209     8248297.308936
+188577.816937     8248301.429345
+188612.207764     8248303.209524
+188644.095815     8248304.951284
+188671.564090     8248309.129328
+188697.084225     8248317.660172
+188721.393844     8248323.668303
+188753.150290     8248333.547135
+188782.343984     8248347.143013
+188805.310718     8248358.765492
+188821.476384     8248365.274545
+188837.612450     8248373.660955
+188855.604007     8248383.328486
+188880.377155     8248399.361018
+188906.956703     8248419.804367
+188939.640969     8248449.732012
+188970.498568     8248476.501931
+188989.005035     8248493.064202
+189009.438630     8248506.525607
+189034.887899     8248519.438068
+189059.671167     8248534.844819
+189089.490365     8248548.450299
+189120.580811     8248560.823420
+189142.891678     8248574.313642
+189170.208099     8248587.880702
+189198.069030     8248606.465146
+189235.324920     8248624.567872
+189259.533316     8248636.834585
+189285.043324     8248645.991592
+189309.917707     8248655.764779
+189349.172361     8248666.384651
+189382.129195     8248679.412359
+189414.491654     8248690.553132
+189444.350584     8248701.654710
+189482.989856     8248711.639198
+189507.803500     8248725.167839
+189530.114356     8248738.658825
+189551.153975     8248753.381407
+189568.580768     8248759.283882
+189587.188471     8248769.586808
+189613.314625     8248779.379211
+189629.449915     8248787.766373
+189648.077860     8248796.817736
+189661.074762     8248805.781895
+189680.862598     8248820.486025
+189699.470301     8248830.788951
+189720.601023     8248839.878734
+189742.911891     8248853.368956
+189765.727536     8248874.380463
+189784.829130     8248892.830445
+189800.934057     8248903.094952
+189829.491363     8248917.306999
+189864.255362     8248934.745535
+189885.334714     8248946.964215
+189901.420150     8248958.481061
+189920.007598     8248970.036314
+189944.205097     8248982.929561
+189967.798111     8248994.560889
+189985.820795     8249002.351087
+190003.802995     8249012.644411
+190023.015959     8249024.208503
+190040.392134     8249033.240651
+190063.400129     8249042.359251
+190083.309456     8249049.551708
+190109.465973     8249057.466766
+190123.774620     8249062.694675
+190135.591363     8249067.259158
+190148.023500     8249072.458260
+190162.332898     8249077.686944
+190177.277169     8249082.298673
+190194.724968     8249086.949596
+190208.408112     8249092.167902
+190230.164337     8249101.267287
+190247.510912     8249112.176791
+190260.477426     8249123.019823
+190272.818449     8249133.852488
+190290.124527     8249147.265883
+190301.900773     8249154.334257
+190316.077809     8249167.699619
+190340.820593     8249185.609496
+190362.424964     8249204.097897
+190372.919841     8249213.024412
+190402.173510     8249222.864824
+190428.359639     8249228.901762
+190455.797538     8249234.957914
+190484.456080     8249242.910616
+190501.207515     8249251.933173
+190518.573569     8249261.591102
+190536.586145     8249270.006318
+190560.875509     8249277.266777
+190588.323542     8249282.696384
+190611.946155     8249292.450355
+190634.984526     8249299.690846
+190653.642834     8249306.864864
+190674.733071     8249318.457774
+190702.028474     8249333.277150
+190743.038923     8249351.436747
+190769.567090     8249375.009757
+190788.628200     8249395.962866
+190812.796087     8249410.734232
+190843.210412     8249426.227423
+190861.797873     8249437.781913
+190877.933163     8249446.169075
+190890.324803     8249453.872068
+190903.937838     8249463.472386
+190921.919262     8249473.766463
+190939.860965     8249486.563678
+190969.054659     8249500.159556
+190993.080062     8249523.693383
+191019.781100     8249536.625060
+191044.533993     8249553.909919
+191076.804586     8249570.683480
+191105.886923     8249591.164484
+191132.516325     8249608.478149
+191154.090333     8249628.843896
+191179.408754     8249649.893823
+191199.206725     8249663.971407
+191219.722064     8249672.425806
+191235.191366     8249683.306493
+191253.162681     8249694.225587
+191270.489002     8249706.387419
+191282.799649     8249719.098193
+191296.209449     8249741.217189
+191315.170075     8249768.430418
+191332.272918     8249794.362491
+191347.055966     8249808.989794
+191359.860517     8249829.846860
+191367.700763     8249848.123972
+191371.130597     8249868.211193
+191375.670455     8249897.081628
+191383.277103     8249929.754764
+191390.339992     8249957.411291
+191393.871061     8249971.239167
+191395.433742     8249990.671789
+191403.494549     8250033.995882
+191410.537196     8250062.903973
+191413.392131     8250079.852683
+191413.734182     8250097.387992
+191413.995226     8250119.931846
+191417.959448     8250145.662231
+191422.570179     8250170.150667
+191428.411674     8250195.909870
+191437.239716     8250230.480330
+191446.834994     8250256.297156
+191453.948501     8250280.824011
+191459.962092     8250295.942634
+191468.305600     8250321.740245
+191476.680247     8250345.659758
+191483.248468     8250365.169982
+191486.760059     8250380.249433
+191490.240498     8250397.207746
+191493.700694     8250415.417621
+191495.839024     8250437.989529
+191496.241814     8250451.769384
+191495.292349     8250471.790143
+191489.367719     8250489.855191
+191480.980797     8250505.378692
+191475.753281     8250519.072882
+191470.545257     8250531.514733
+191468.466276     8250544.004617
+191470.705078     8250560.317168
+191484.973992     8250568.048978
+191501.744906     8250575.819961
+191516.750680     8250576.676247
+191540.363936     8250587.056012
+191549.536182     8250600.344547
+191544.963782     8250612.170218
+191528.010638     8250615.666362
+191513.549374     8250619.827459
+191503.830464     8250640.338774
+191503.506502     8250660.369135
+191514.576264     8250672.434924
+191528.885675     8250677.662844
+191543.153812     8250685.395407
+191562.982922     8250697.594894
+191580.440078     8250701.620024
+191597.877769     8250706.895966
+191612.257276     8250707.742638
+191629.755693     8250709.263890
+191642.248569     8250710.707538
+191660.896756     8250718.507338
+191681.543707     8250718.824283
+191700.434876     8250711.600739
+191716.873873     8250701.209867
+191728.357947     8250687.611719
+191737.309621     8250675.854038
+191749.419963     8250662.265504
+191759.572037     8250653.655934
+191777.807314     8250648.301661
+191797.273368     8250644.217391
+191817.244198     8250647.654407
+191830.382819     8250647.856094
+191849.223357     8250643.762986
+191863.704100     8250638.350314
+191880.164116     8250626.707126
+191894.140833     8250613.773944
+191905.534557     8250605.809372
+191913.264836     8250592.154365
+191924.780038     8250576.678885
+191934.932113     8250568.069315
+191951.209135     8250567.693242
+191957.898847     8250579.691794
+191958.816547     8250600.366389
+191958.583699     8250614.763187
+191962.659278     8250633.608446
+191967.472480     8250645.578193
+191979.843866     8250654.533514
+191995.647252     8250644.758057
+192003.519264     8250622.339815
+192008.131384     8250608.011006
+192009.616002     8250593.633423
+192013.572256     8250581.172357
+192018.143893     8250569.346674
+192025.824318     8250558.821352
+192038.712016     8250535.853404
+192048.329690     8250521.601433
+192065.444821     8250508.089727
+192083.145709     8250497.092288
+192102.107738     8250485.487508
+192115.347595     8250479.429851
+192131.675235     8250475.924105
+192156.075969     8250476.298673
+192182.979480     8250476.711661
+192214.262276     8250477.191874
+192245.545072     8250477.672087
+192271.196813     8250478.065859
+192294.416649     8250474.039212
+192318.202001     8250473.778397
+192344.570359     8250468.548208
+192366.549297     8250463.877340
+192390.385267     8250460.486852
+192411.102327     8250456.421786
+192439.893232     8250456.237810
+192472.447277     8250455.485663
+192499.996545     8250454.655925
+192526.960030     8250451.313447
+192556.437177     8250447.383619
+192592.180253     8250442.923275
+192621.041267     8250438.357287
+192645.522982     8250433.724839
+192680.004930     8250429.871073
+192718.230528     8250426.701476
+192743.266886     8250426.459865
+192766.527971     8250419.930103
+192794.834341     8250410.973278
+192819.880833     8250410.105121
+192846.168197     8250409.882713
+192868.066155     8250410.218862
+192891.195628     8250411.826554
+192911.145452     8250416.515121
+192938.654223     8250418.189274
+192967.988873     8250423.022669
+192989.200589     8250427.104670
+193003.520120     8250431.706809
+193021.582538     8250436.993104
+193037.769209     8250442.250606
+193050.826850     8250447.459310
+193068.284018     8250451.483676
+193085.075951     8250458.002343
+193098.647725     8250470.106540
+193110.968493     8250482.191532
+193125.166535     8250494.305343
+193136.184915     8250509.500793
+193144.529186     8250535.298415
+193147.948898     8250556.011417
+193152.731725     8250569.859273
+193153.770139     8250583.022948
+193157.947717     8250595.608874
+193164.505830     8250615.744116
+193170.377688     8250639.625974
+193173.303496     8250652.192684
+193178.539730     8250676.690722
+193183.261067     8250694.293256
+193186.772645     8250709.373471
+193190.949459     8250721.959386
+193198.254553     8250734.593321
+193202.391635     8250749.683138
+193209.524633     8250772.957654
+193210.573931     8250785.495559
+193210.875473     8250805.535523
+END
+LINE3D
+HEIGHT 1060.000000
+193209.926020     8250825.555518
+193210.802446     8250848.734756
+193193.525353     8250872.260497
+193183.311776     8250884.625509
+193171.303434     8250891.954710
+193157.457564     8250896.750426
+193138.586651     8250902.721643
+193117.223082     8250908.028659
+193093.387876     8250911.419158
+193068.361639     8250911.034988
+193052.720240     8250910.794882
+193038.329849     8250910.573979
+193019.560171     8250910.285851
+193011.860255     8250922.063513
+193018.479107     8250938.443301
+193027.610856     8250954.235726
+193031.797791     8250966.195859
+193039.759528     8250976.961299
+193055.591111     8251004.126496
+193059.132301     8251017.328590
+193070.161566     8251031.898270
+193085.147097     8251034.006119
+193097.105573     8251029.807367
+193107.883151     8251021.207399
+193126.189300     8251011.471126
+193141.729462     8251017.970577
+193148.267321     8251039.358146
+193151.687033     8251060.071149
+193152.110064     8251072.599440
+193141.150257     8251092.466534
+193130.342316     8251102.943847
+193107.625741     8251114.490992
+193091.903350     8251119.258667
+193064.314361     8251122.591543
+193047.360453     8251126.087675
+193025.320763     8251134.514761
+193013.362288     8251138.713513
+192991.938744     8251147.775995
+192978.698123     8251153.833641
+192967.940787     8251161.182045
+192957.173343     8251169.155467
+192948.867402     8251179.671952
+192939.300346     8251190.794250
+192927.270998     8251199.375002
+192913.919784     8251212.317786
+192904.302097     8251226.570521
+192904.038887     8251242.844664
+192904.996307     8251261.016120
+192908.538261     8251274.218226
+192913.955960     8251287.449126
+192919.989794     8251301.316186
+192936.731108     8251310.964525
+192953.684264     8251307.467617
+192975.754317     8251297.163186
+192992.829715     8251286.155381
+193005.423815     8251281.340449
+193018.007806     8251277.150535
+193025.978887     8251287.290946
+193030.034988     8251307.387780
+193034.120687     8251325.607258
+193016.934697     8251343.500200
+192997.437516     8251349.461803
+192979.788009     8251357.329581
+192965.911764     8251364.003406
+192961.259134     8251380.836870
+192961.661923     8251394.616725
+192969.562908     8251409.138383
+192976.807263     8251425.527773
+192985.273013     8251443.814488
+192988.763585     8251460.146254
+192993.424934     8251481.505018
+192993.161723     8251497.779161
+192987.034609     8251528.363662
+192972.885796     8251551.937425
+192961.985964     8251568.049053
+192950.582895     8251576.638655
+192922.286646     8251584.969698
+192906.523757     8251592.241264
+192881.859813     8251608.140839
+192866.671822     8251618.550915
+192844.611890     8251628.229565
+192825.649862     8251639.834345
+192805.487445     8251648.290248
+192785.212907     8251663.631267
+192760.538842     8251680.156624
+192749.741009     8251690.008919
+192737.580062     8251706.726361
+192727.347007     8251720.342947
+192719.626836     8251733.372936
+192710.685283     8251744.504836
+192703.560252     8251759.421772
+192690.702930     8251780.511612
+192673.354200     8251808.419341
+192653.080427     8251823.760371
+192640.405333     8251833.583084
+192623.370433     8251842.086998
+192606.214817     8251858.101831
+192579.078460     8251872.085642
+192551.882139     8251889.824154
+192521.062859     8251899.369106
+192499.547449     8251914.064375
+192477.426765     8251927.499243
+192463.470290     8251939.180861
+192448.292420     8251948.965156
+192436.746855     8251966.317981
+192420.832113     8251982.978564
+192407.339166     8252004.684583
+192398.266002     8252023.953937
+192392.947384     8252043.280926
+192382.027310     8252060.644117
+192371.743636     8252077.390376
+192355.828894     8252094.050959
+192342.406819     8252111.374979
+192325.291689     8252124.886685
+192311.283844     8252139.697200
+192287.891912     8252154.364428
+192268.233520     8252170.340841
+192251.814002     8252179.480138
+192239.108533     8252191.180961
+192226.311949     8252208.515347
+192214.868383     8252219.608839
+192200.265387     8252232.533172
+192188.175300     8252244.869378
+192178.618365     8252255.365894
+192165.439246     8252257.668098
+192151.029376     8252258.698770
+192136.618730     8252259.730195
+192114.639791     8252264.401063
+192098.312151     8252267.906809
+192083.265880     8252269.554414
+192068.875488     8252269.333511
+192055.111363     8252269.122222
+192037.270896     8252250.065662
+192031.328165     8252230.565804
+192024.033192     8252217.306086
+192008.976813     8252219.578708
+191998.662763     8252238.203077
+191996.522267     8252254.449167
+191983.604205     8252279.294460
+191976.458932     8252295.462959
+191966.932361     8252304.082131
+191958.596057     8252316.475960
+191946.587727     8252323.804397
+191932.711482     8252330.478222
+191913.719078     8252343.961111
+191897.280081     8252354.351983
+191880.942319     8252358.483511
+191869.548595     8252366.448083
+191858.629285     8252383.811286
+191853.935407     8252403.147865
+191853.006196     8252421.916297
+191867.839874     8252433.413164
+191885.984049     8252433.691690
+191909.758516     8252434.056644
+191927.277187     8252434.325568
+191939.810548     8252433.266090
+191966.734301     8252432.427515
+191982.244100     8252440.804311
+191990.769824     8252455.335559
+191977.307253     8252475.163470
+191961.655734     8252475.549145
+191946.710699     8252470.937405
+191943.904979     8252489.677031
+191937.949973     8252509.620188
+191924.083849     8252515.668232
+191907.816947     8252515.418524
+191890.894167     8252517.037322
+191877.755545     8252516.835635
+191859.943288     8252534.718964
+191850.305359     8252550.223262
+191842.009552     8252560.113200
+191830.646968     8252566.199676
+191813.118175     8252566.556533
+191799.959299     8252567.607174
+191778.626106     8252571.036081
+191756.041906     8252574.445784
+191738.835673     8252593.590289
+191724.121319     8252613.399748
+191713.604798     8252644.542806
+191709.567563     8252662.010889
+191704.752194     8252688.859140
+191696.244558     8252711.893562
+191691.560801     8252730.604359
+191681.297369     8252746.099055
+191673.415224     8252769.143842
+191658.065258     8252789.568717
+191646.469063     8252810.051979
+191634.944504     8252826.153253
+191627.737728     8252846.077194
+191611.126623     8252867.109410
+191605.696636     8252893.322289
+191599.741630     8252913.265446
+191599.539158     8252925.784136
+191593.381681     8252958.245982
+191589.293815     8252978.844502
+191588.990108     8252997.622536
+191588.635783     8253019.530242
+191588.058744     8253055.208201
+191588.319788     8253077.752055
+191588.378373     8253112.813835
+191587.447009     8253170.399500
+191588.121728     8253206.097439
+191588.311924     8253233.021765
+191588.068956     8253248.044345
+191587.775370     8253266.196597
+191587.259070     8253298.119103
+191583.181337     8253318.091077
+191579.052211     8253341.193476
+191571.200441     8253362.360154
+191563.812200     8253393.551233
+191559.572493     8253423.538006
+191559.329524     8253438.560586
+191562.133854     8253458.638205
+191562.405032     8253480.555513
+191570.102782     8253507.595849
+191573.361271     8253538.324426
+191578.728353     8253554.684998
+191588.486369     8253570.487038
+191597.537125     8253591.287245
+191602.883964     8253608.899380
+191626.950615     8253629.930092
+191642.176949     8253655.833359
+191661.965550     8253670.537500
+191685.930214     8253697.826781
+191705.052814     8253715.025211
+191720.410760     8253732.791025
+191734.516923     8253750.538386
+191755.908701     8253782.171259
+191774.344308     8253803.114765
+191784.172421     8253814.535557
+191792.113903     8253826.553325
+191803.031811     8253848.008131
+191821.941068     8253878.350257
+191829.195544     8253894.113865
+191833.978371     8253907.961721
+191840.546605     8253927.471181
+191844.703177     8253941.308659
+191856.791098     8253967.790450
+191861.573937     8253981.637542
+191869.766354     8254016.824181
+191873.659704     8254046.936566
+191878.361549     8254065.791439
+191892.386731     8254088.545818
+191897.027837     8254111.156145
+191900.961684     8254138.764640
+191901.081772     8254170.070977
+191900.565471     8254201.993482
+191900.130153     8254228.908970
+191899.593610     8254262.083038
+191903.264246     8254305.965676
+191903.001023     8254322.240584
+191902.173048     8254334.749671
+191896.228164     8254354.067046
+191887.104382     8254376.466072
+191876.104090     8254398.836293
+191858.755361     8254426.744022
+191840.640159     8254463.405396
+191820.779296     8254491.900499
+191800.302287     8254519.760207
+191778.645132     8254543.219476
+191760.299249     8254555.459651
+191737.562432     8254568.258359
+191710.930864     8254589.762692
+191686.074569     8254617.555175
+191659.957146     8254645.954235
+191636.393118     8254671.262043
+191612.990301     8254686.555040
+191591.969534     8254709.398140
+191569.555277     8254740.984497
+191551.026401     8254764.491786
+191537.594206     8254782.441588
+191526.109380     8254796.038959
+191503.857097     8254817.610516
+191481.019795     8254836.669345
+191469.575454     8254847.763590
+191455.568373     8254862.574117
+191435.839109     8254882.932531
+191422.426392     8254899.630757
+191414.756839     8254909.531073
+191403.272013     8254923.128445
+191387.306665     8254942.917936
+191369.485050     8254961.427058
+191352.419786     8254971.808316
+191335.264159     8254987.823913
+191314.899283     8255008.797742
+191291.314236     8255035.357866
+191268.456693     8255055.668258
+191226.748478     8255080.698304
+191191.114617     8255117.089990
+191159.728431     8255161.686355
+191136.810136     8255185.752966
+191117.221853     8255197.347368
+191091.972903     8255210.733450
+191065.351443     8255231.612765
+191038.012638     8255258.113737
+191013.096356     8255289.662450
+190983.366119     8255309.240640
+190958.036175     8255327.634504
+190938.942547     8255347.375973
+190924.178327     8255370.315880
+190911.764291     8255402.681684
+190898.291586     8255423.136140
+190872.921157     8255444.033130
+190845.128920     8255459.885448
+190822.413122     8255471.431841
+190804.157578     8255478.039206
+190782.713028     8255488.353239
+190756.838574     8255501.729719
+190729.661732     8255518.216657
+190711.375812     8255526.702130
+190693.746560     8255533.317581
+190671.061112     8255542.987392
+190644.580633     8255555.102696
+190609.392200     8255563.953877
+190578.038544     8255567.854900
+190551.043931     8255573.074711
+190528.449586     8255577.111724
+190509.629290     8255579.953268
+190491.414255     8255584.055978
+190477.014519     8255584.460105
+190463.875897     8255584.258418
+190446.306608     8255587.119166
+190426.759573     8255596.210454
+190401.682718     8255598.955956
+190373.447208     8255603.531546
+190344.596328     8255607.470988
+190331.396191     8255611.025507
+190308.811979     8255614.435974
+190280.566360     8255619.636582
+190243.500654     8255628.458945
+190219.039932     8255631.840607
+190200.260146     8255632.177496
+190176.928189     8255643.089258
+190147.360679     8255652.653425
+190127.904771     8255656.110386
+190109.074342     8255659.578476
+190090.869440     8255663.054640
+190069.526101     8255667.110857
+190043.147622     8255672.966827
+190021.804308     8255677.021516
+190006.778304     8255677.416029
+189979.148055     8255683.252784
+189951.446921     8255693.472303
+189933.797426     8255701.339316
+189918.619544     8255711.124375
+189902.160305     8255722.766810
+189886.296168     8255736.298484
+189867.202540     8255756.039954
+189847.534028     8255772.642149
+189827.269624     8255787.356622
+189808.831851     8255805.231113
+189789.062102     8255828.092653
+189769.150609     8255859.718193
+189751.924146     8255880.113497
+189742.276084     8255896.244341
+189738.288690     8255910.583505
+189729.246653     8255927.975525
+189720.788871     8255947.880262
+189715.520120     8255964.076803
+189713.370254     8255980.949451
+189712.522037     8255994.710101
+189712.198087     8256014.739699
+189716.364768     8256027.952159
+189726.162530     8256041.249532
+189744.587991     8256062.820348
+189762.740146     8256101.289562
+189765.362246     8256132.634307
+189770.598468     8256157.133108
+189774.068811     8256174.715674
+189788.436782     8256215.006902
+189804.086160     8256253.437696
+189811.240164     8256275.460660
+189816.526239     8256296.829778
+189817.373066     8256321.886373
+189822.084282     8256340.114688
+189826.816503     8256357.091452
+189837.430691     8256397.325056
+189848.811364     8256428.804251
+189855.299380     8256453.320740
+189858.063201     8256475.903014
+189858.273653     8256501.575012
+189857.888952     8256525.360828
+189857.595353     8256543.513844
+189857.977900     8256558.545262
+189863.849759     8256582.427120
+189866.522477     8256610.642193
+189866.168152     8256632.549899
+189867.095209     8256652.598700
+189867.519004     8256665.127003
+189867.276048     8256680.148819
+189867.496608     8256705.195800
+189870.531607     8256749.695382
+189869.954568     8256785.373341
+189869.741963     8256798.518576
+189869.215542     8256831.066863
+189862.564173     8256855.381653
+189857.941906     8256870.337773
+189848.172366     8256893.979524
+189838.544571     8256908.857276
+189825.020485     8256932.441393
+189819.813224     8256944.883255
+189818.308364     8256960.512402
+189816.483269     8256995.441932
+END
+LINE3D
+HEIGHT 1070.000000
+183557.000000     8247312.202083
+183565.300327     8247319.783831
+183580.830362     8247326.909445
+183596.370524     8247333.408896
+183615.069342     8247338.078260
+183636.331478     8247339.030968
+183651.347182     8247339.261469
+183666.988580     8247339.501576
+183689.522359     8247339.221166
+183705.769203     8247340.722823
+183713.649564     8247356.496038
+183723.538613     8247364.160997
+183740.986036     8247368.811533
+183758.453899     8247372.210126
+183772.904654     8247368.675187
+183790.514243     8247363.310927
+183811.231678     8247359.246249
+183837.590291     8247354.642229
+183868.348629     8247348.853492
+183894.122045     8247341.735978
+183918.068995     8247331.459976
+183943.923398     8247319.335062
+183969.737304     8247309.714038
+183998.648929     8247302.018760
+184016.944958     8247292.908268
+184036.542610     8247280.687309
+184051.064423     8247272.770755
+184068.754808     8247262.399092
+184088.383027     8247248.300026
+184113.702844     8247230.532326
+184134.622751     8247213.948959
+184149.235672     8247200.399224
+184165.786224     8247183.122846
+184175.948419     8247173.887495
+184188.603270     8247165.316345
+184196.949505     8247152.296731
+184209.756210     8247134.336563
+184219.979335     8247121.345761
+184232.302072     8247094.613135
+184247.086904     8247070.422435
+184259.934100     8247049.958759
+184269.703633     8247026.317389
+184279.341562     8247010.813092
+184288.313305     8246997.802698
+184298.536431     8246984.811895
+184310.646575     8246971.223741
+184324.633802     8246957.664401
+184339.216156     8246945.992772
+184356.311414     8246933.733399
+184380.288735     8246921.579670
+184400.573018     8246905.612482
+184416.437130     8246892.082335
+184429.707554     8246884.146572
+184444.168424     8246879.986233
+184461.788140     8246873.995809
+184485.038531     8246868.091820
+184510.226749     8246858.460810
+184525.333561     8246853.058130
+184541.035705     8246849.542401
+184556.122466     8246845.391287
+184574.347437     8246840.662411
+184596.972324     8246834.748820
+184628.346229     8246829.595852
+184648.468340     8246823.643842
+184667.339254     8246817.672625
+184683.041397     8246814.156895
+184703.748896     8246810.718383
+184723.840637     8246806.644100
+184747.635926     8246805.757118
+184765.790030     8246805.409860
+184778.928843     8246805.611550
+184795.135005     8246809.616712
+184810.150900     8246809.847217
+184833.905501     8246811.464122
+184854.531822     8246813.033007
+184867.660513     8246813.860479
+184892.656381     8246816.122376
+184917.067045     8246815.871160
+184930.296972     8246810.439287
+184946.120594     8246799.412649
+184963.882036     8246784.659372
+184977.737467     8246779.237101
+184994.731489     8246773.237072
+185012.249779     8246773.505990
+185027.891368     8246773.746100
+185040.333620     8246778.319803
+185053.320388     8246787.910507
+185069.283582     8246806.938249
+185081.009222     8246817.135531
+185092.159590     8246824.193915
+185106.397746     8246833.803829
+185121.302284     8246840.919460
+185140.545611     8246850.606206
+185161.000212     8246862.816059
+185175.248496     8246871.799809
+185188.891518     8246879.522394
+185199.385631     8246888.448897
+185213.583678     8246900.562326
+185225.288689     8246912.011547
+185233.855674     8246924.038917
+185245.530315     8246937.365865
+185259.082223     8246950.722013
+185271.362500     8246965.310515
+185281.180874     8246977.357094
+185291.664865     8246986.909379
+185302.128996     8246997.713233
+185311.372103     8247006.620532
+185320.564591     8247018.657504
+185330.957856     8247033.842975
+185338.283580     8247045.224971
+185347.465948     8247057.887725
+185357.324436     8247067.430408
+185377.616680     8247089.655053
+185394.841765     8247108.076230
+185411.420341     8247127.739356
+185430.421082     8247152.448688
+185450.591842     8247182.184624
+185472.186092     8247201.298807
+185498.836131     8247217.360151
+185514.305427     8247228.241220
+185529.179596     8247237.234578
+185540.904848     8247247.432236
+185556.959539     8247260.826421
+185566.172276     8247271.611447
+185584.668615     8247288.799882
+185595.173237     8247297.100227
+185613.246164     8247301.760365
+185630.088332     8247305.149353
+185648.212265     8247306.679443
+185662.582026     8247308.152285
+185680.090189     8247309.047366
+185700.111255     8247309.354704
+185720.767951     8247309.045479
+185739.537629     8247309.333607
+185757.681803     8247309.612133
+185773.252335     8247314.233857
+185790.699759     8247318.884393
+185807.491309     8247325.403054
+185823.031472     8247331.902505
+185838.561513     8247339.027738
+185854.717051     8247346.162954
+185872.123984     8247353.316999
+185887.079140     8247357.302957
+185902.013659     8247362.541237
+185914.476160     8247365.862995
+185927.594921     8247367.316251
+185942.549689     8247371.302586
+185958.816973     8247371.552300
+185980.714930     8247371.888449
+186005.105161     8247372.888793
+186020.060311     8247376.875134
+186034.399703     8247380.225703
+186046.852082     8247384.173242
+186070.505447     8247392.049492
+186085.369488     8247401.669014
+186104.602695     8247411.981542
+186119.497105     8247419.723337
+186133.180625     8247424.942031
+186146.843896     8247431.412671
+186161.173160     8247435.389403
+186176.067196     8247443.130810
+186192.273734     8247447.136360
+186207.228508     8247451.122313
+186225.988058     8247452.036604
+186244.737494     8247453.576296
+186259.117758     8247454.423362
+186278.482570     8247456.598818
+186305.748373     8247473.295552
+186329.926005     8247487.440749
+186349.866083     8247492.755486
+186366.677876     8247498.022583
+186385.860465     8247511.464784
+186400.189736     8247515.441134
+186413.832758     8247523.163719
+186437.465874     8247532.291915
+186454.893437     8247538.194020
+186467.971314     8247542.151543
+186484.803361     8247546.166314
+186501.009517     8247550.171858
+186517.892183     8247551.056956
+186532.261944     8247552.529798
+186553.534399     8247552.856345
+186576.552139     8247561.348775
+186590.810544     8247569.706744
+186611.940883     8247578.796520
+186627.470925     8247585.921753
+186641.770202     8247591.776219
+186656.674358     8247598.891844
+186672.214520     8247605.391295
+186685.282658     8247609.974606
+186700.237432     8247613.960558
+186720.792886     8247619.911061
+186740.682347     8247628.355470
+186757.453649     8247636.126076
+186772.963442     8247644.503254
+186790.996254     8247651.667288
+186800.885118     8247659.331862
+186812.590504     8247670.781471
+186827.958570     8247687.921503
+186843.942007     8247705.697682
+186866.888881     8247718.571730
+186882.358183     8247729.452417
+186894.729569     8247738.407737
+186910.854738     8247747.420681
+186931.904478     8247761.517481
+186950.441309     8247776.202407
+186965.234108     8247790.203158
+186981.792811     8247811.118618
+187003.952207     8247833.997863
+187023.679305     8247852.457447
+187045.919689     8247870.329292
+187063.901507     8247880.622611
+187077.544529     8247888.345196
+187089.996909     8247892.292735
+187102.388543     8247899.996110
+187117.293075     8247907.112123
+187129.715085     8247912.937389
+187149.432444     8247932.022761
+187163.589613     8247946.640074
+187179.583176     8247963.790089
+187196.283612     8247975.942313
+187209.936762     8247983.038734
+187230.411229     8247993.996636
+187248.352932     8248006.793851
+187264.386993     8248021.439976
+187276.717888     8248032.898805
+187285.910376     8248044.935777
+187297.514533     8248062.644349
+187310.914205     8248085.389508
+187336.050027     8248117.705791
+187351.397839     8248136.098150
+187363.708486     8248148.808924
+187372.850363     8248163.975186
+187385.059774     8248182.945306
+187392.990753     8248195.588849
+187399.528611     8248216.976418
+187409.255876     8248234.656179
+187416.470238     8248252.923684
+187422.331981     8248277.430941
+187426.508795     8248290.016856
+187429.343495     8248308.216747
+187433.247347     8248337.703357
+187441.530880     8248367.256433
+187444.385815     8248384.205144
+187446.564260     8248404.273155
+187446.947177     8248419.305343
+187446.521992     8248445.594285
+187446.208163     8248464.998100
+187445.995558     8248478.143336
+187439.767221     8248514.986417
+187433.761967     8248538.060016
+187429.149464     8248552.388820
+187425.081458     8248571.735771
+187423.617859     8248584.861038
+187413.838198     8248609.128571
+187405.339919     8248631.537199
+187403.189696     8248648.408313
+187393.389793     8248673.927409
+187387.242807     8248705.764244
+187381.277680     8248726.333182
+187376.019419     8248741.904711
+187373.848942     8248760.028152
+187376.734253     8248775.098753
+187388.459512     8248785.296029
+187392.464612     8248808.522530
+187392.160905     8248827.300564
+187376.891920     8248842.718421
+187361.805535     8248846.869922
+187336.779297     8248846.485752
+187323.085663     8248841.892457
+187300.511585     8248844.676379
+187287.200473     8248855.116030
+187271.326240     8248869.271958
+187258.580274     8248883.476672
+187248.347218     8248897.093259
+187234.440979     8248905.645199
+187218.779326     8248906.657420
+187205.004698     8248907.071907
+187186.143906     8248912.417342
+187169.745405     8248920.304324
+187153.387007     8248925.688172
+187138.250016     8248932.968582
+187122.497249     8248939.614366
+187104.837239     8248948.107919
+187092.253248     8248952.297834
+187070.778322     8248964.489976
+187047.386008     8248979.157197
+187022.752821     8248993.178669
+187002.498908     8249007.268130
+186981.034103     8249018.834491
+186963.989463     8249027.964192
+186952.565758     8249037.806115
+186937.297155     8249053.223978
+186925.852826     8249064.317459
+186916.891401     8249076.701692
+186905.457562     8249087.170161
+186895.850009     8249100.796350
+186889.975985     8249115.732489
+186885.262234     8249136.321401
+186884.978781     8249153.847108
+186890.870894     8249176.476639
+186894.351715     8249193.434957
+186902.817082     8249211.721666
+186911.353704     8249225.626380
+186926.106007     8249242.131022
+186936.549884     8249254.187204
+186948.961766     8249260.638633
+186961.404025     8249265.211954
+186980.123085     8249268.629754
+186999.992297     8249278.326109
+187020.578115     8249282.399266
+187034.221144     8249290.121469
+187050.427306     8249294.126631
+187073.515913     8249298.237444
+187102.861066     8249302.445063
+187121.630744     8249302.733191
+187139.149034     8249303.002109
+187158.544596     8249303.299845
+187182.400439     8249298.657024
+187211.261452     8249294.091036
+187241.373842     8249289.545022
+187267.712206     8249286.192948
+187290.871685     8249285.921761
+187312.235242     8249280.615509
+187338.048969     8249270.993718
+187358.827137     8249263.173968
+187373.954389     8249256.519346
+187391.009163     8249246.763100
+187408.063542     8249237.007611
+187420.082757     8249229.053405
+187430.214589     8249221.695398
+187443.647179     8249203.744839
+187463.325813     8249186.516862
+187477.908173     8249174.844851
+187489.352515     8249163.750606
+187502.047850     8249152.676329
+187514.005956     8249148.476807
+187526.620310     8249142.409547
+187541.798180     8249132.625253
+187555.704420     8249124.073312
+187570.246283     8249114.905192
+187587.987287     8249101.403857
+187600.057131     8249090.319215
+187608.423417     8249076.048034
+187617.384842     8249063.663801
+187631.957464     8249052.617578
+187645.853188     8249044.692177
+187664.552005     8249049.361540
+187686.934115     8249058.470533
+187708.832073     8249058.806682
+187723.918458     8249054.655180
+187725.402681     8249040.278356
+187714.394040     8249024.457119
+187704.021024     8249008.019702
+187702.982241     8248994.855257
+187710.320246     8248966.793856
+187716.870379     8248948.738410
+187735.216644     8248936.498241
+187752.968162     8248922.370366
+187771.920069     8248911.391368
+187792.254582     8248892.294884
+187812.447744     8248881.961641
+187827.615493     8248872.803128
+187850.341425     8248860.630190
+187868.799428     8248841.504900
+187885.440909     8248818.594574
+187900.144748     8248799.411655
+187911.599210     8248787.691629
+187921.135903     8248778.446676
+187937.000015     8248764.916529
+187950.946369     8248753.860692
+187971.765416     8248743.537057
+187991.948075     8248733.829590
+188007.791945     8248721.551007
+188024.332572     8248704.900032
+188041.478448     8248689.510986
+188054.829662     8248676.568202
+188069.371526     8248667.400082
+188086.416166     8248658.270381
+188106.558710     8248651.066811
+188124.773375     8248646.963331
+188144.986792     8248635.377760
+188162.646801     8248626.884207
+188178.440053     8248617.735297
+188191.659669     8248612.929202
+188205.606787     8248601.873377
+188225.850185     8248588.410456
+188244.176589     8248577.421855
+188256.165440     8248571.344994
+188269.959928     8248569.678938
+188289.344988     8248570.602449
+188300.475489     8248578.912784
+188316.137141     8248577.900563
+188331.555813     8248591.911687
+188362.223240     8248591.755752
+188374.282951     8248581.297655
+188381.347243     8248570.136173
+188394.536483     8248567.208188
+188409.985530     8248579.341202
+188428.068966     8248583.375182
+188440.229913     8248566.657740
+188445.477671     8248551.711987
+188458.626413     8248551.287892
+188481.766020     8248552.269038
+188493.582763     8248556.833521
+188505.933906     8248567.040405
+188517.073777     8248574.724183
+188527.538278     8248585.528807
+188539.273276     8248595.100295
+188550.988795     8248605.923359
+188560.191405     8248617.334549
+188572.643784     8248621.282088
+188572.410949     8248635.678122
+188560.290487     8248649.892438
+188549.462291     8248661.622078
+188539.259598     8248673.361320
+188528.309161     8248692.601856
+188527.954836     8248714.509562
+188527.056001     8248731.399885
+188526.187529     8248746.412864
+188529.718598     8248760.240740
+188543.997621     8248767.347533
+188562.364521     8248753.855042
+188579.056608     8248727.815808
+188601.964770     8248704.375743
+188619.090009     8248690.239019
+188635.631018     8248673.588050
+188653.956646     8248662.600202
+188673.433585     8248657.890162
+188689.135722     8248654.374815
+188702.294598     8248653.324174
+188717.371232     8248649.799225
+188744.213240     8248653.967655
+188769.128107     8248661.237716
+188792.751484     8248670.991699
+188813.912582     8248678.203373
+188843.862627     8248683.671387
+188873.137302     8248692.260248
+188890.523598     8248700.666614
+188906.104258     8248704.662174
+188920.948057     8248715.533259
+188933.924704     8248725.749745
+188955.035171     8248736.091855
+188979.284051     8248745.855440
+188996.115716     8248749.870205
+189014.753795     8248758.295022
+189028.992333     8248767.904942
+189041.989222     8248776.869864
+189058.154888     8248783.378917
+189080.536616     8248792.487903
+189109.801170     8248801.702546
+189130.871153     8248814.547782
+189153.212397     8248826.159895
+189171.123724     8248840.835220
+189194.070216     8248853.709262
+189219.458746     8248870.377178
+189243.677250     8248882.018872
+189264.767488     8248893.611781
+189279.005262     8248903.221689
+189290.781508     8248910.290063
+189309.348714     8248923.096880
+189332.346588     8248932.841261
+189362.881640     8248940.822769
+189378.442044     8248946.070656
+189401.460173     8248954.562711
+189416.374832     8248961.052560
+189436.233541     8248971.374690
+189460.462167     8248982.390603
+189478.424124     8248993.935491
+189491.360275     8249006.655867
+189505.618291     8249015.014212
+189523.691606     8249019.673973
+189541.734545     8249026.211844
+189559.131726     8249033.992440
+189576.568652     8249039.268369
+189601.503775     8249045.286103
+189619.546713     8249051.823973
+189636.327761     8249058.968410
+189649.365911     8249065.429453
+189663.623927     8249073.787798
+189675.379931     8249082.107735
+189693.341889     8249093.652623
+189713.765350     8249107.740573
+189731.626072     8249125.544805
+189744.552101     8249138.890964
+189758.003149     8249158.506844
+189769.637675     8249174.337689
+189786.882251     8249191.506526
+189798.618012     8249201.078027
+189812.907168     8249207.558274
+189828.528324     8249209.049944
+189846.046232     8249209.318856
+189860.517605     8249204.532741
+189882.496556     8249199.861109
+189903.758889     8249200.813437
+189916.836759     8249204.771343
+189929.914642     8249208.728484
+189951.065618     8249216.565939
+189965.364132     8249222.420393
+189977.140390     8249229.488002
+189992.004432     8249239.107524
+190004.375818     8249248.062844
+190016.757325     8249256.392383
+190029.835207     8249260.349524
+190043.508981     8249266.194388
+190064.669315     8249273.406050
+190092.056596     8249282.591875
+190115.186081     8249284.198803
+190131.432740     8249285.700074
+190155.176832     8249287.943138
+190173.875649     8249292.612502
+190186.944162     8249297.196200
+190199.991669     8249303.031450
+190218.690487     8249307.700814
+190232.363497     8249313.545666
+190248.529163     8249320.054719
+190262.152319     8249329.029255
+190281.980665     8249341.228730
+190296.854827     8249350.222470
+190319.155562     8249364.339238
+190337.732902     8249376.519509
+190350.689294     8249387.988322
+190362.414934     8249398.185604
+190377.238479     8249410.309016
+190390.255623     8249418.021611
+190408.258065     8249427.063373
+190428.167392     8249434.255831
+190439.974014     8249439.446095
+190452.477011     8249440.263962
+190471.851938     8249441.814019
+190484.971081     8249443.267281
+190499.330333     8249445.366281
+190512.408216     8249449.323422
+190533.640173     8249452.153860
+190550.513100     8249453.664745
+190563.005976     8249455.108394
+190580.402393     8249462.888978
+190602.097879     8249475.743816
+190619.414079     8249488.531430
+190634.842884     8249501.916007
+190647.102913     8249517.756454
+190667.445393     8249536.851421
+190684.115848     8249550.880996
+190697.082361     8249561.724028
+190714.459300     8249570.756187
+190733.702628     8249580.442934
+190746.689396     8249590.033638
+190760.311800     8249599.007398
+190770.816798     8249607.308131
+190785.650463     8249618.805762
+190807.254847     8249637.293399
+190823.268659     8249653.191469
+190838.152942     8249661.559428
+190849.908183     8249669.879353
+190871.583426     8249683.985755
+190885.872582     8249690.466002
+190898.879592     8249698.805143
+190914.440009     8249704.052266
+190925.519892     8249715.492274
+190940.454806     8249720.729796
+190954.631829     8249734.095922
+190975.025691     8249750.061229
+190987.204738     8249770.908693
+190995.812221     8249780.432172
+191004.368321     8249793.085311
+191012.965682     8249803.234572
+191020.907164     8249815.252340
+191030.644162     8249832.306695
+191037.252893     8249849.312264
+191042.630859     8249865.047067
+191049.057361     8249893.319762
+191056.857110     8249914.100765
+191064.020484     8249935.497173
+191079.246806     8249961.401204
+191093.969127     8249979.783196
+191106.672430     8250006.900371
+191117.509356     8250033.362195
+191125.429820     8250046.632278
+191130.222780     8250059.853588
+191134.399595     8250072.439503
+191147.627941     8250105.824872
+191155.962079     8250132.249040
+191160.602422     8250154.859355
+191164.769879     8250168.071063
+191172.710597     8250180.088819
+191179.965837     8250195.852439
+191187.805320     8250214.129540
+191191.972777     8250227.341247
+191199.630042     8250256.884710
+191203.564652     8250284.493217
+191204.582811     8250298.909219
+191211.090306     8250322.174133
+191215.085655     8250346.027185
+191216.103827     8250360.442424
+191219.966800     8250392.432918
+191224.607907     8250415.043245
+191224.929703     8250433.830881
+191227.804893     8250449.527264
+191229.165866     8250481.478586
+191222.050956     8250495.769740
+191208.698978     8250508.712513
+191194.268853     8250510.995512
+191178.546474     8250515.762423
+191165.245877     8250525.575535
+191153.720542     8250541.677561
+191157.897357     8250554.263476
+191174.729786     8250558.278252
+191194.205960     8250553.568200
+191209.292716     8250549.417469
+191222.492076     8250545.863702
+191234.288589     8250551.678984
+191242.865696     8250563.080572
+191250.170790     8250575.714508
+191250.583700     8250588.868581
+191240.451868     8250596.226587
+191227.878010     8250599.789956
+191213.345886     8250608.332289
+191198.733544     8250621.881651
+191192.889895     8250634.939681
+191200.225353     8250645.696272
+191214.474024     8250654.679646
+191238.269497     8250653.793049
+191252.527514     8250662.151394
+191258.551238     8250676.643470
+191258.923652     8250692.301434
+191262.374491     8250711.137103
+191262.101147     8250728.037792
+191243.774755     8250739.025628
+191229.938994     8250743.196328
+191224.519141     8250768.782661
+191224.911809     8250783.188297
+191242.410226     8250784.709549
+191254.811988     8250791.786760
+191262.702088     8250806.934188
+191266.253399     8250819.510501
+191277.394033     8250827.194290
+191306.143678     8250829.514193
+191328.667138     8250829.859944
+191340.101359     8250819.391481
+191350.858682     8250812.043840
+191370.961123     8250807.343402
+191387.258388     8250805.715766
+191404.685945     8250811.618253
+191414.564688     8250819.908608
+191419.296133     8250836.886124
+191394.774685     8250844.022476
+191380.949057     8250847.566629
+191370.746365     8250859.305871
+191366.154486     8250872.383117
+191377.284223     8250880.693440
+191394.238130     8250877.197308
+191413.866158     8250863.098239
+191427.004780     8250863.299926
+191451.405514     8250863.674495
+191466.441651     8250862.653436
+191480.557948     8250879.774252
+191485.290169     8250896.751016
+191492.534512     8250913.141170
+191496.661472     8250928.856768
+191496.408382     8250944.505130
+191477.557723     8250949.224019
+191461.290058     8250948.974299
+191443.751896     8250949.957715
+191419.915926     8250953.348202
+191400.984274     8250963.074873
+191385.846901     8250970.355277
+191374.494437     8250975.815970
+191358.731549     8250983.087536
+191342.363412     8250989.097172
+191332.170089     8251000.209857
+191328.163217     8251015.800595
+191337.910348     8251032.228404
+191362.936585     8251032.612575
+191381.202238     8251025.380192
+191400.698655     8251019.418577
+191421.467084     8251012.224614
+191434.040954     8251008.660482
+191457.311395     8251001.504926
+191474.285557     8250996.756467
+191493.196955     8250988.282123
+191511.422124     8250983.552868
+191525.085013     8250990.023501
+191531.703865     8251006.403289
+191519.623899     8251018.113714
+191502.792233     8251014.098950
+191488.432217     8251011.999938
+191474.556735     8251018.673775
+191468.682711     8251033.609915
+191462.768190     8251051.049945
+191458.771438     8251066.014902
+191472.364231     8251076.866783
+191484.068853     8251088.316380
+191491.394966     8251099.698001
+191499.224327     8251118.600883
+191501.463893     8251134.913446
+191512.875693     8251164.515308
+191517.597793     8251182.117853
+191529.261918     8251196.071341
+191535.972649     8251206.817578
+191545.215755     8251215.724877
+191557.617517     8251222.802089
+191571.381642     8251223.013378
+191574.752890     8251208.038819
+191575.056597     8251189.260785
+191575.259068     8251176.742095
+191570.445854     8251164.773113
+191565.210383     8251140.275087
+191562.920200     8251127.092196
+191558.732500     8251115.132052
+191558.380341     8251098.221761
+191558.582813     8251085.703071
+191560.672679     8251072.587418
+191577.091434     8251063.448109
+191590.926419     8251059.278162
+191606.084046     8251050.745431
+191616.266484     8251040.258517
+191626.459819     8251029.145068
+191643.453460     8251023.145034
+191656.612324     8251022.095158
+191673.515625     8251021.727934
+191688.297909     8251036.355225
+191696.269767     8251046.494884
+191699.709722     8251065.956323
+191703.180039     8251083.540417
+191702.896574     8251101.066888
+191702.542249     8251122.974594
+191702.844566     8251143.013805
+191711.198195     8251168.185634
+191716.606537     8251182.042327
+191728.271426     8251195.995827
+191737.484169     8251206.780472
+191754.962344     8251209.553286
+191768.736590     8251209.138794
+191770.816335     8251196.648922
+191771.099800     8251179.122451
+191770.131483     8251161.577529
+191769.123445     8251146.535745
+191767.509382     8251130.232784
+191767.792847     8251112.706313
+191768.630943     8251099.571444
+191782.557807     8251089.767946
+191802.760720     8251078.808151
+191817.847475     8251074.657420
+191831.702715     8251069.235146
+191845.609336     8251060.683211
+191861.422830     8251050.282738
+191874.158675     8251036.703806
+191884.936253     8251028.103838
+191899.589855     8251012.050597
+191909.177165     8250999.675972
+191919.944610     8250991.702550
+191934.990881     8250990.054945
+191947.493878     8250990.872812
+191961.065652     8251002.977009
+191968.401886     8251013.732847
+191973.204203     8251026.328364
+191977.250170     8251047.051744
+191982.001870     8251062.776933
+191986.804951     8251075.372461
+191995.825344     8251098.050013
+191999.941419     8251114.391381
+192002.846973     8251128.210419
+192002.472405     8251151.369689
+191987.194063     8251167.413340
+191968.958774     8251172.768377
+191955.759413     8251176.322144
+191935.031469     8251181.012980
+191914.939924     8251185.086884
+191901.104163     8251189.257583
+191874.110302     8251194.478170
+191858.377801     8251199.870863
+191847.024575     8251205.331544
+191834.995227     8251213.912297
+191819.786981     8251225.574700
+191817.576401     8251246.201273
+191834.962697     8251254.607639
+191848.727586     8251254.818940
+191868.284742     8251245.101871
+191884.652879     8251239.092234
+191902.212047     8251236.857267
+191922.273228     8251234.660708
+191935.432092     8251233.610832
+191952.487235     8251223.855355
+191967.563881     8251220.329642
+191988.361922     8251211.257558
+192000.935780     8251207.694189
+192022.914718     8251203.023321
+192041.160129     8251197.042502
+192059.344800     8251194.817137
+192074.350574     8251195.673423
+192088.033706     8251200.892494
+192103.533383     8251209.895072
+192117.257012     8251212.610251
+192129.770130     8251212.802336
+192142.354109     8251208.613186
+192152.638559     8251191.866174
+192167.190162     8251182.072266
+192181.772904     8251170.400261
+192196.890035     8251164.371421
+192207.133212     8251150.129053
+192219.172681     8251140.922519
+192232.463156     8251131.735189
+192245.713135     8251125.051749
+192261.384908     8251123.413747
+192273.918269     8251122.354269
+192288.004954     8251141.353205
+192295.560983     8251177.156013
+192299.708186     8251191.620048
+192306.337159     8251207.374054
+192312.996508     8251221.249952
+192326.416428     8251242.743165
+192334.276929     8251259.767950
+192338.382871     8251276.735865
+192344.376220     8251293.106051
+192353.224516     8251326.424183
+192358.521489     8251347.166767
+192363.848838     8251366.031241
+192368.408951     8251393.649350
+192372.322555     8251422.509408
+192378.164050     8251448.268611
+192382.815278     8251470.253156
+192386.224856     8251491.592704
+192389.735671     8251506.672907
+192394.397020     8251528.031671
+192398.462477     8251547.502712
+192398.865266     8251561.282566
+192399.904444     8251574.446253
+192400.297100     8251588.852653
+192403.172290     8251604.549036
+192404.775468     8251621.477767
+192409.196517     8251636.302325
+END
+LINE3D
+HEIGHT 1010.000000
+188325.171102     8246277.000000
+188325.176649     8246277.785358
+188324.660349     8246309.707863
+188324.133922     8246342.256532
+188322.599457     8246359.763417
+188321.659355     8246379.158001
+188316.360986     8246397.233045
+188311.626611     8246419.073514
+188310.707522     8246437.216165
+188305.943541     8246460.934373
+188301.178796     8246484.652570
+188292.802759     8246499.550302
+188283.689098     8246521.323546
+188272.658437     8246545.571494
+188258.549344     8246566.642118
+188247.095645     8246578.362156
+188236.882068     8246590.727168
+188225.962764     8246608.089989
+188215.790447     8246617.951122
+188205.557003     8246631.568085
+188192.114674     8246650.144432
+188181.174739     8246668.759192
+188170.901187     8246684.879670
+188160.001743     8246700.990922
+188149.031439     8246721.483409
+188140.049383     8246735.119582
+188130.522818     8246743.738372
+188118.463482     8246754.196857
+188101.368224     8246766.456230
+188092.436786     8246776.962730
+188082.889973     8246786.833465
+188073.898172     8246801.095808
+188064.229874     8246818.477833
+188057.094340     8246834.020544
+188053.117837     8246847.733556
+188042.854406     8246863.228252
+188030.118573     8246876.806419
+188020.571753     8246886.677536
+188011.045188     8246895.296325
+188001.478120     8246906.419388
+187991.840191     8246921.923686
+187987.197313     8246938.130598
+187996.399929     8246949.541406
+188015.774861     8246951.091081
+188032.819501     8246941.961380
+188049.864142     8246932.831679
+188065.001139     8246925.550888
+188080.764021     8246918.279704
+188097.173031     8246909.766565
+188118.637454     8246898.200198
+188142.625277     8246885.420694
+188162.868681     8246871.957391
+188179.943691     8246860.949963
+188195.787561     8246848.671380
+188214.759710     8246836.440818
+188243.732462     8246824.989710
+188273.299960     8246815.426306
+188293.503631     8246804.466906
+188311.839392     8246792.852512
+188330.841911     8246778.744223
+188347.907182     8246768.362583
+188360.491166     8246764.173050
+188385.740124     8246750.786586
+188398.364599     8246744.093545
+188412.260329     8246736.167762
+188430.617103     8246723.301435
+188454.493569     8246717.407056
+188468.883197     8246717.627947
+188485.776365     8246717.887269
+188513.304615     8246718.309847
+188531.347554     8246724.847718
+188546.262213     8246731.337567
+188556.786695     8246738.386343
+188567.947572     8246744.818569
+188580.389824     8246749.392272
+188595.314611     8246755.255957
+188610.249518     8246760.493861
+188638.191436     8246774.070906
+188651.208574     8246781.783883
+188659.816056     8246791.307362
+188671.439697     8246807.763977
+188684.315872     8246824.239819
+188692.851724     8246838.144904
+188702.003721     8246852.685384
+188715.515521     8246868.545047
+188733.426848     8246883.220371
+188753.255188     8246895.420228
+188767.544344     8246901.900476
+188776.777329     8246911.433556
+188797.200796     8246925.521125
+188810.278679     8246929.478266
+188835.193553     8246936.747944
+188852.702103     8246937.642650
+188879.605614     8246938.055638
+188897.749025     8246938.334152
+188910.262143     8246938.526237
+188925.257790     8246940.008687
+188945.823754     8246945.333031
+188971.323640     8246955.115821
+188996.208145     8246964.263226
+189022.374031     8246971.551727
+189035.503289     8246972.379589
+189050.498178     8246973.861645
+189067.229366     8246984.136148
+189080.256630     8246991.222962
+189089.469367     8247002.007988
+189101.830632     8247011.589090
+189113.586642     8247019.908645
+189133.404855     8247032.734666
+189147.017890     8247042.334984
+189162.002651     8247044.443203
+189182.639475     8247045.386312
+189201.480019     8247041.292822
+189212.379075     8247025.181947
+189219.474500     8247012.142750
+189224.712131     8246997.823160
+189226.287856     8246977.812396
+189230.284601     8246962.847822
+189243.423223     8246963.049509
+189258.922895     8246972.052468
+189275.784930     8246974.189506
+189297.047257     8246975.142216
+189315.221801     8246973.543015
+189327.734920     8246973.735100
+189345.879094     8246974.013626
+189360.834250     8246977.999585
+189375.778515     8246982.611695
+189383.730124     8246994.003299
+189395.969905     8247011.095692
+189403.830400     8247028.120859
+189404.192692     8247044.404604
+189403.959851     8247058.801020
+189401.708004     8247081.931855
+189400.173539     8247099.438740
+189399.748348     8247125.728064
+189401.381889     8247140.779450
+189409.252511     8247157.178453
+189417.224368     8247167.318112
+189427.011991     8247181.242412
+189446.224948     8247192.806886
+189460.473608     8247201.791024
+189472.986726     8247201.983109
+189492.260423     8247209.792129
+189516.337201     8247230.196677
+189536.639190     8247251.795153
+189552.703620     8247264.563551
+189566.952279     8247273.547689
+189578.123283     8247279.353751
+189591.776045     8247286.450548
+189616.660556     8247295.597572
+189639.032163     8247305.332340
+189659.466515     8247318.794138
+189679.345473     8247327.864323
+189707.226651     8247345.196822
+189727.671131     8247358.032456
+189745.693821     8247365.822272
+189758.186691     8247367.266303
+189783.071202     8247376.413326
+189803.565536     8247386.119277
+189818.500437     8247391.357563
+189831.618817     8247392.810813
+189845.948463     8247396.787552
+189868.390937     8247402.140702
+189892.700556     8247408.148834
+189912.004628     8247414.079744
+189932.570592     8247419.404089
+189953.720798     8247427.241914
+189980.512946     8247434.540410
+190002.350164     8247438.632013
+190018.556326     8247442.637176
+190036.024380     8247446.035772
+190051.534167     8247454.413332
+190069.506245     8247465.332438
+190082.543631     8247471.793470
+190096.771278     8247482.029542
+190115.985000     8247493.594027
+190132.089927     8247503.858534
+190143.866179     8247510.926526
+190155.016170     8247517.984522
+190165.531295     8247525.659091
+190172.816141     8247539.544972
+190183.188775     8247555.982383
+190203.390287     8247583.840598
+190231.360420     8247634.357149
+190253.478938     8247659.740279
+190257.656516     8247672.326205
+190275.990881     8247699.529439
+190285.203618     8247710.314465
+190291.873088     8247723.564580
+190300.308468     8247743.729022
+190304.414416     8247760.696554
+190315.281712     8247785.280650
+190331.769173     8247810.577340
+190344.563591     8247832.060951
+190351.233824     8247845.311079
+190361.626701     8247860.496926
+190368.901426     8247875.008589
+190375.571653     8247888.259099
+190384.713530     8247903.425360
+190391.362751     8247917.927421
+190401.593653     8247943.128068
+190417.990764     8247974.058332
+190426.970660     8247999.239774
+190434.164397     8248018.758836
+190450.076973     8248040.916251
+190458.008334     8248053.559801
+190471.539611     8248068.167888
+190481.377858     8248078.962134
+190491.872734     8248087.888649
+190510.338704     8248106.954811
+190525.585281     8248131.606514
+190538.389825     8248152.463963
+190546.997307     8248161.987442
+190557.440808     8248174.043235
+190577.188919     8248191.250885
+190590.125069     8248203.971262
+190599.337805     8248214.756288
+190612.858962     8248229.990157
+190623.282978     8248243.297908
+190630.598193     8248255.306062
+190640.355446     8248271.108089
+190650.173444     8248283.154281
+190662.463842     8248297.117001
+190680.273940     8248318.051288
+190698.073911     8248339.611738
+190715.884008     8248360.546025
+190733.744718     8248378.351022
+190748.456142     8248397.359549
+190766.296609     8248416.416108
+190785.377962     8248436.117654
+190805.105823     8248454.577250
+190819.919247     8248467.326443
+190834.742040     8248479.449080
+190851.412482     8248493.479419
+190872.421726     8248510.080109
+190893.399830     8248528.558897
+190909.444781     8248542.578870
+190925.509211     8248555.347268
+190939.131603     8248564.321792
+190950.928104     8248570.137838
+190965.176763     8248579.121976
+190983.784466     8248589.424903
+190997.931126     8248604.668374
+191006.992015     8248624.842035
+191020.896470     8248655.108098
+191034.367021     8248673.470875
+191049.251305     8248681.838833
+191062.217831     8248692.681101
+191081.471279     8248701.742066
+191101.996740     8248709.570683
+191118.162405     8248716.079736
+191132.431319     8248723.811547
+191147.870246     8248736.570343
+191168.293719     8248750.657529
+191188.163313     8248760.353889
+191205.549610     8248768.760255
+191219.243638     8248773.352791
+191234.743304     8248782.356133
+191246.529683     8248788.797961
+191263.209495     8248802.201742
+191279.939913     8248812.476615
+191299.738647     8248826.554211
+191311.484530     8248835.499930
+191323.855916     8248844.455251
+191337.498562     8248852.177448
+191349.244445     8248861.123166
+191363.472098     8248871.358856
+191373.321230     8248881.527332
+191381.282190     8248892.293525
+191392.967334     8248904.994697
+191407.851630     8248913.361891
+191416.367997     8248928.518934
+191423.077964     8248939.265158
+191425.902536     8248958.091214
+191425.619071     8248975.617685
+191420.985932     8248991.198809
+191418.886708     8249004.940256
+191418.562746     8249024.970618
+191422.073561     8249040.050821
+191436.927481     8249050.296124
+191453.285497     8249044.912270
+191455.446235     8249027.414616
+191461.562452     8248997.456649
+191466.144973     8248985.005197
+191467.669324     8248968.123711
+191472.282208     8248953.794914
+191484.947181     8248944.597982
+191499.417802     8248939.811091
+191521.315760     8248940.147240
+191533.828878     8248940.339326
+191561.973274     8248941.397299
+191579.471691     8248942.918550
+191604.477686     8248944.554284
+191621.944975     8248947.952868
+191636.325246     8248948.799552
+191666.326660     8248951.138671
+191684.389078     8248956.424966
+191697.467724     8248960.382119
+191714.279148     8248965.648446
+191737.892391     8248976.028976
+191751.454044     8248988.758954
+191768.154111     8249000.910408
+191780.434382     8249015.499292
+191795.832812     8249030.761978
+191812.462770     8249047.295443
+191833.573249     8249057.636789
+191850.344163     8249065.407772
+191873.977674     8249074.535209
+191890.072467     8249085.426262
+191906.894011     8249090.066808
+191918.690512     8249095.882854
+191941.092495     8249103.739513
+191954.756147     8249110.210159
+191985.311441     8249116.940103
+192010.135207     8249129.842962
+192032.487323     8249140.830069
+192046.180587     8249145.422594
+192056.069439     8249153.087932
+192080.994440     8249159.731447
+192107.827091     8249164.525670
+192128.382163     8249170.476167
+192149.593879     8249174.558168
+192188.283769     8249181.412984
+192228.870410     8249187.045042
+192248.204852     8249191.098225
+192273.069114     8249201.497194
+192285.460755     8249209.200188
+192303.442942     8249219.494276
+192328.337580     8249228.015136
+192348.297526     8249232.077922
+192370.023375     8249243.055415
+192393.656873     8249252.183617
+192419.802517     8249260.723681
+192437.946692     8249261.002207
+192456.090866     8249261.280732
+192480.511079     8249260.403726
+192500.603399     8249256.329069
+192517.505925     8249255.962598
+192541.372270     8249250.694001
+192562.745960     8249244.761204
+192584.169505     8249235.698722
+192608.086455     8249227.301217
+192628.875139     8249218.854927
+192649.067932     8249208.520914
+192668.625087     8249198.803845
+192688.849007     8249186.592499
+192712.805691     8249175.691092
+192733.685489     8249161.611238
+192743.222182     8249152.366285
+192752.173868     8249140.607839
+192762.386682     8249128.242816
+192772.034731     8249112.112736
+192786.687570     8249096.059484
+192802.673172     8249075.017665
+192816.620290     8249063.961840
+192831.202256     8249052.290587
+192852.555704     8249047.609353
+192867.581720     8249047.214076
+192888.228671     8249047.531021
+192911.306775     8249052.267609
+192939.380298     8249057.707582
+192971.903980     8249058.832781
+192999.997757     8249063.020426
+193019.302587     8249068.951731
+193037.981150     8249074.873421
+193057.295350     8249080.178168
+193082.220352     8249086.821683
+193111.615741     8249087.899624
+193127.257139     8249088.139731
+193143.524041     8249088.389439
+193160.417209     8249088.648761
+193176.684110     8249088.898470
+193200.459341     8249089.263436
+193224.859311     8249089.637993
+193248.009039     8249089.993357
+193266.707856     8249094.662721
+193288.524820     8249100.006651
+193316.618598     8249104.194297
+193350.948693     8249109.729548
+193383.391381     8249115.862528
+193412.060044     8249123.189448
+193440.729458     8249130.517143
+193476.946183     8249135.455419
+193505.716082     8249136.522994
+193530.005459     8249143.782689
+193552.468169     8249147.884658
+193578.009316     8249155.163568
+193611.057265     8249162.557713
+193635.992387     8249168.575446
+193657.204102     8249172.657447
+193677.780193     8249177.355628
+193696.489120     8249181.399974
+193720.192727     8249186.146164
+193745.137970     8249191.538116
+193764.472412     8249195.591300
+193776.924792     8249199.538839
+193793.121597     8249204.169795
+193813.091663     8249207.606799
+193839.985040     8249208.646332
+193867.503168     8249209.694692
+193887.433502     8249215.635598
+193901.752270     8249220.237725
+193922.771634     8249236.212633
+193941.359083     8249247.767887
+193978.029979     8249263.356357
+194012.076596     8249286.418843
+194034.458337     8249295.527065
+194056.860307     8249303.384488
+194078.051780     8249308.718053
+194104.269036     8249312.877657
+194125.469866     8249317.585428
+194146.641085     8249324.171319
+194160.960617     8249328.773458
+194179.044040     8249332.808202
+194193.988311     8249337.419930
+194213.989517     8249338.978837
+194232.738940     8249340.519292
+194258.390680     8249340.913064
+194274.677836     8249339.910445
+194293.508253     8249336.443119
+194312.984415     8249331.733831
+194344.893478     8249332.223657
+194372.431862     8249332.019690
+194391.888545     8249328.561977
+194416.935025     8249327.694584
+194446.966051     8249328.155581
+194477.623344     8249328.626192
+194504.455994     8249333.420416
+194526.252716     8249340.015909
+194542.458878     8249344.021072
+194557.454519     8249345.503904
+194578.019725     8249350.827854
+194594.842021     8249355.469176
+194612.269577     8249361.371663
+194636.517694     8249371.135237
+194650.827104     8249376.363157
+194672.038056     8249380.445146
+194686.418314     8249381.292594
+194704.571859     8249380.944563
+194718.972372     8249380.539684
+194731.566471     8249375.724752
+194733.019949     8249363.225266
+194733.283172     8249346.950359
+194714.283565     8249322.241808
+194705.827173     8249303.329300
+194701.670613     8249289.491058
+194700.036308     8249274.439660
+194700.400754     8249251.906172
+194701.906377     8249236.277038
+194704.641225     8249221.919411
+194706.195939     8249203.160581
+194710.183333     8249188.821417
+194718.620873     8249170.168243
+194725.795758     8249152.121624
+194730.397757     8249138.418596
+194737.452692     8249127.882908
+194748.998257     8249110.530082
+194756.122524     8249095.613135
+194763.248318     8249080.696211
+194772.280222     8249063.930736
+194780.707641     8249045.903344
+194790.315194     8249032.277155
+194800.457911     8249024.293379
+194808.228687     8249008.134482
+194809.763159     8248990.627215
+194815.658189     8248974.439524
+194817.111667     8248961.940038
+194836.576944     8248957.856520
+194850.957215     8248958.703205
+194865.337486     8248959.549889
+194887.831334     8248961.773761
+194907.165013     8248965.826933
+194925.249212     8248969.860924
+194942.060623     8248975.128016
+194955.198481     8248975.329691
+194970.850012     8248974.943252
+194990.892466     8248973.999043
+195007.158604     8248974.248740
+195017.000000     8248976.963678
+END
+LINE3D
+HEIGHT 1010.000000
+195017.000000     8249037.008800
+195011.151799     8249036.919026
+194998.426088     8249049.871412
+194996.901737     8249066.752897
+195009.202263     8249080.089453
+195017.000000     8249086.533439
+END
+LINE3D
+HEIGHT 1010.000000
+195017.000000     8252434.473920
+194999.895687     8252441.423277
+194967.774031     8252454.077922
+194921.869536     8252467.772864
+194886.074314     8252475.362856
+194867.870165     8252478.839796
+194849.716633     8252479.187064
+194834.618980     8252483.964329
+194810.067156     8252492.978789
+194784.970059     8252496.975855
+194770.488553     8252502.388515
+194752.747155     8252515.890608
+194740.718583     8252524.470608
+194718.587779     8252538.531257
+194685.083505     8252559.304152
+194632.215190     8252577.901219
+194597.561145     8252592.395565
+194575.602449     8252595.814870
+194547.326454     8252602.893587
+194509.593984     8252614.210227
+194479.309868     8252629.397592
+194450.296238     8252643.352585
+194431.960476     8252654.966979
+194405.550870     8252662.700282
+194385.983581     8252673.043897
+194368.262438     8252685.293663
+194347.322676     8252703.128218
+194328.905158     8252719.750381
+194314.292052     8252733.299731
+194302.828232     8252745.645551
+194290.041770     8252762.354155
+194276.003549     8252779.042779
+194253.569037     8252811.881463
+194231.195277     8252840.963928
+194215.957431     8252854.503688
+194198.216034     8252868.005781
+194177.962515     8252882.094484
+194158.414716     8252891.185759
+194144.004834     8252892.217196
+194119.604100     8252891.842628
+194103.337199     8252891.592919
+194078.936465     8252891.218351
+194062.104799     8252887.203587
+194035.332900     8252878.653145
+194022.214521     8252877.199895
+194012.366166     8252867.030666
+194003.910537     8252848.118170
+193994.819272     8252829.822618
+193987.019523     8252809.041615
+193986.616734     8252795.261760
+193981.370378     8252771.389504
+193971.007865     8252754.326311
+193954.266550     8252744.677972
+193939.372909     8252736.935807
+193912.773106     8252717.744785
+193885.659157     8252691.659035
+193875.266280     8252676.473188
+193862.340251     8252663.127029
+193849.312223     8252656.040204
+193833.217429     8252645.149152
+193818.211656     8252644.292865
+193796.384558     8252639.575481
+193763.962112     8252632.190938
+193745.888810     8252627.530412
+193724.000974     8252626.568481
+193708.359576     8252626.328375
+193692.728299     8252625.462487
+193680.215180     8252625.270402
+193657.056095     8252625.540831
+193630.031107     8252632.638751
+193609.253308     8252640.459271
+193593.490432     8252647.730073
+193580.178938     8252658.169718
+193566.313578     8252664.217774
+193544.858906     8252675.157589
+193516.562657     8252683.488633
+193493.261840     8252692.522297
+193476.257314     8252699.148101
+193461.151068     8252704.551172
+193455.337783     8252715.731857
+193454.449069     8252731.996399
+193454.216222     8252746.393197
+193453.872030     8252767.674358
+193458.583233     8252785.903437
+193462.770932     8252797.863582
+193467.583371     8252809.833317
+193475.383133     8252830.613556
+193483.161876     8252852.646110
+193487.329321     8252865.858582
+193493.998791     8252879.108698
+193498.165484     8252892.320394
+193497.952892     8252905.464865
+193493.219280     8252927.305346
+193492.381184     8252940.440216
+193486.527402     8252954.124792
+193481.955766     8252965.950474
+193476.122238     8252978.382723
+193468.330456     8252995.793172
+193464.313463     8253012.009692
+193457.722820     8253032.569792
+193453.766566     8253045.030859
+193449.769815     8253059.995816
+193444.521293     8253074.941557
+193440.565039     8253087.402623
+193435.326651     8253101.721819
+193430.694276     8253117.302955
+193425.425512     8253133.500260
+193418.905730     8253149.679125
+193408.551196     8253170.806620
+193398.650045     8253202.585825
+193386.902772     8253232.457352
+193375.921959     8253253.575997
+193370.694456     8253267.269423
+193365.486431     8253279.711273
+193353.920612     8253298.316426
+193345.554696     8253312.588376
+193331.506342     8253329.903546
+193319.406898     8253342.865546
+193310.465345     8253353.997446
+193294.026335     8253364.389082
+193283.258127     8253372.362492
+193266.859614     8253380.250238
+193256.071916     8253389.475987
+193247.140484     8253399.982106
+193243.174096     8253413.069718
+193242.335236     8253426.204575
+193246.492572     8253440.042064
+193263.172384     8253453.445846
+193276.169273     8253462.410768
+193292.254709     8253473.927614
+193304.009962     8253482.246776
+193317.562245     8253495.603311
+193336.018095     8253515.295255
+193354.403084     8253539.368434
+193369.639539     8253564.645919
+193385.653351     8253580.543989
+193399.204870     8253593.900513
+193413.998052     8253607.901271
+193428.094857     8253626.274426
+193448.265241     8253656.009974
+193464.601613     8253690.695691
+193480.453450     8253716.608560
+193499.524669     8253736.936651
+193524.196581     8253759.228528
+193546.991983     8253781.491599
+193563.519941     8253804.284398
+193579.341403     8253832.075375
+193600.925532     8253851.815340
+193620.714132     8253866.519482
+193641.147727     8253879.980886
+193666.576753     8253894.144911
+193685.689233     8253911.969123
+193696.687371     8253928.416136
+193703.316344     8253944.170143
+193709.935959     8253960.549942
+193720.944218     8253976.371174
+193738.825182     8253992.923843
+193761.700802     8254010.179885
+193789.420012     8254037.526800
+193806.412250     8254070.344775
+193821.770196     8254088.110588
+193839.681523     8254102.785912
+193860.771748     8254114.379585
+193883.748616     8254125.375519
+193908.673617     8254132.019034
+193934.203879     8254139.923714
+193955.334601     8254149.013496
+193979.532863     8254161.906754
+194004.316132     8254177.313505
+194032.832941     8254194.029441
+194050.169383     8254205.565491
+194068.160941     8254215.233023
+194081.834715     8254221.077886
+194098.091495     8254221.953376
+194118.102058     8254222.886489
+194136.810997     8254226.930071
+194162.342010     8254234.835527
+194183.522599     8254240.794862
+194200.889416     8254250.452803
+194222.050501     8254257.665240
+194236.207294     8254272.282165
+194251.706960     8254281.285507
+194257.155787     8254292.639074
+194261.837390     8254312.745510
+194260.918301     8254330.888161
+194244.306431     8254351.920365
+194232.267726     8254361.126911
+194215.232838     8254369.630060
+194201.256108     8254382.564006
+194200.932158     8254402.593604
+194206.259507     8254421.458078
+194210.284468     8254443.433010
+194213.835779     8254456.009323
+194223.663892     8254467.430115
+194239.133194     8254478.310801
+194261.465068     8254490.549472
+194261.211978     8254506.197833
+194252.541603     8254539.247042
+194241.308465     8254576.014061
+194235.474937     8254588.446309
+194218.884074     8254608.226963
+194206.107745     8254624.309021
+194187.619366     8254645.312420
+194173.520406     8254665.756498
+194158.573982     8254699.962003
+194141.296112     8254723.488497
+194130.356560     8254742.103263
+194107.377538     8254769.924563
+194092.068057     8254787.846311
+194081.794504     8254803.966789
+194077.080384     8254824.554931
+194063.113787     8254836.862332
+194049.782803     8254848.554316
+194031.405805     8254862.671061
+194005.994867     8254886.072706
+193985.518622     8254913.932426
+193967.797479     8254926.182191
+193948.805088     8254939.664316
+193938.632758     8254949.526213
+193929.681085     8254961.283895
+193909.508547     8254970.365580
+193867.769192     8254997.273724
+193831.600931     8255028.023009
+193801.194574     8255050.721270
+193781.242596     8255084.849936
+193753.247888     8255113.220943
+193718.381251     8255140.859760
+193699.731661     8255171.877970
+193685.612447     8255193.574375
+193672.099258     8255216.531958
+193659.796590     8255242.011871
+193644.991886     8255267.454905
+193628.157290     8255302.258126
+193613.393095     8255325.196505
+193598.245588     8255333.103454
+193585.509756     8255346.681622
+193567.193486     8255357.043677
+193552.086488     8255362.445971
+193538.836497     8255369.130174
+193514.364903     8255373.136842
+193482.304750     8255382.036044
+193460.860200     8255392.350077
+193429.354665     8255405.641645
+193409.676044     8255422.868858
+193393.984028     8255425.758424
+193368.866663     8255431.008581
+193350.096986     8255430.720453
+193336.353103     8255429.257601
+193309.520477     8255424.461849
+193290.760908     8255423.548706
+193278.308541     8255419.600401
+193262.041640     8255419.350692
+193240.153791     8255418.389526
+193225.763399     8255418.168623
+193212.564051     8255421.721626
+193194.510979     8255415.810301
+193178.355447     8255408.674703
+193165.358545     8255399.710544
+193151.079523     8255392.603751
+193138.738500     8255381.771086
+193103.782914     8255376.225468
+193078.131174     8255375.831696
+193064.356916     8255376.246953
+193042.266620     8255387.802947
+193025.150738     8255401.313878
+193004.362806     8255409.760944
+192971.030640     8255419.892494
+192948.264224     8255434.568559
+192928.040304     8255446.779905
+192917.888217     8255455.390239
+192903.286009     8255468.313055
+192873.727868     8255477.250665
+192848.499160     8255489.385184
+192832.070271     8255499.151039
+192818.174535     8255507.077203
+192793.097680     8255509.822705
+192774.267275     8255513.289268
+192767.212329     8255523.825720
+192762.529335     8255542.536529
+192765.999678     8255560.119095
+192775.807548     8255572.791450
+192786.917807     8255582.353348
+192808.058649     8255590.817349
+192820.480641     8255596.643761
+192834.789300     8255601.870906
+192845.274055     8255611.423202
+192847.564227     8255624.606857
+192838.974833     8255652.649048
+192821.576250     8255683.686461
+192806.236405     8255703.485554
+192793.277834     8255730.835502
+192769.632061     8255761.150315
+192752.415707     8255780.920603
+192737.772226     8255796.348062
+192728.043171     8255817.486687
+192716.528733     8255832.962179
+192707.536574     8255847.222987
+192707.303727     8255861.619786
+192703.124759     8255887.851105
+192688.066201     8255928.942488
+192674.965910     8255965.054908
+192667.225497     8255979.336460
+192648.676379     8256004.095313
+192627.664994     8256026.311092
+192608.480240     8256051.686889
+192595.663414     8256070.272838
+192575.298538     8256091.246667
+192554.862777     8256116.603260
+192531.267622     8256143.788401
+192511.991765     8256174.796996
+192491.302915     8256215.801951
+192451.904375     8256252.762548
+192423.213303     8256285.505189
+192409.619121     8256313.470553
+192404.885509     8256335.311035
+192398.294892     8256355.869607
+192385.457799     8256375.708648
+192370.006610     8256402.392103
+192345.340499     8256457.109675
+192318.303987     8256503.651386
+192299.684009     8256532.791475
+192284.717318     8256568.250071
+192266.813970     8256591.765435
+192260.344806     8256604.814627
+192248.345821     8256611.518035
+192230.625442     8256623.767812
+192214.741088     8256638.549521
+192199.512587     8256651.464252
+192180.882501     8256681.229358
+192165.289542     8256716.678341
+192151.928207     8256730.246907
+192137.991986     8256740.676198
+192118.494805     8256746.637801
+192083.306372     8256755.488982
+192078.023025     8256785.514335
+END
+LINE3D-MASTER
+HEIGHT 1000.000000
+191770.932099     8248364.845893
+191795.857100     8248371.489408
+191810.852741     8248372.972240
+191830.318794     8248368.887970
+191853.548745     8248364.235923
+191871.067417     8248364.504847
+191884.841663     8248364.090354
+191896.800144     8248359.891220
+191909.374002     8248356.327851
+191931.271959     8248356.664000
+191946.287854     8248356.894505
+191964.442156     8248356.546867
+191978.852033     8248355.515812
+191997.621710     8248355.803940
+192011.396720     8248355.389459
+192029.480156     8248359.423439
+192039.994517     8248367.097997
+192059.359328     8248369.273453
+192074.950109     8248372.643232
+192091.217010     8248372.892940
+192103.730129     8248373.085025
+192118.120520     8248373.305928
+192133.085797     8248376.666105
+192146.102929     8248384.379464
+192161.602607     8248393.382042
+192180.129316     8248408.692750
+192195.124957     8248410.175582
+192213.208392     8248414.209561
+192230.726300     8248414.478474
+192252.806487     8248403.547496
+192262.363422     8248393.050980
+192272.515496     8248384.441410
+192286.563844     8248367.126622
+192291.771105     8248354.684760
+192305.890318     8248332.988354
+192314.256228     8248318.716786
+192325.054818     8248308.864885
+192335.862766     8248298.387190
+192343.533070     8248288.487649
+192354.895654     8248282.401174
+192370.719275     8248271.374537
+192376.028536     8248252.673341
+192377.542759     8248236.418020
+192379.027370     8248222.040819
+192379.260211     8248207.644403
+192375.708136     8248195.068078
+192360.976464     8248177.311497
+192349.250829     8248167.113833
+192333.176272     8248154.971599
+192318.937734     8248145.361679
+192308.453743     8248135.809394
+192303.025158     8248123.204264
+192291.289396     8248113.632764
+192284.014672     8248099.121101
+192274.276904     8248082.067116
+192274.540121     8248065.792591
+192316.107263     8247856.064631
+192323.776804     8247846.165079
+192332.758859     8247832.528906
+192340.458775     8247820.751245
+192351.862614     8247812.161273
+192375.102692     8247806.883062
+192387.061174     8247802.683928
+192402.097317     8247801.662487
+192420.877116     8247801.324833
+192437.133897     8247802.200323
+192460.828134     8247807.573071
+192486.419135     8247811.722297
+192514.442046     8247820.291560
+192533.715743     8247828.100580
+192547.944160     8247838.336281
+192566.511367     8247851.143099
+192589.498349     8247861.513632
+192609.973198     8247872.471540
+192634.817212     8247884.122454
+192652.667043     8247902.552839
+192671.779523     8247920.377051
+192685.956558     8247933.742413
+192702.687751     8247944.016533
+192718.782551     8247954.907204
+192745.492947     8247967.213088
+192761.649255     8247974.347934
+192777.804793     8247981.483151
+192795.150605     8247992.392644
+192819.429855     8248000.278502
+192839.441176     8248001.212009
+192863.841146     8248001.586566
+192882.610823     8248001.874693
+192905.124927     8248002.846238
+192925.155732     8248002.527787
+192943.945658     8248001.563970
+192965.278858     8247998.134681
+192982.857504     8247994.648139
+193006.693474     8247991.257652
+193024.272891     8247987.770739
+193046.191097     8247986.854943
+193060.600967     8247985.824271
+193079.390893     8247984.860453
+193110.048186     8247985.331064
+193137.577200     8247985.753654
+193163.228940     8247986.147426
+193181.312376     8247990.181406
+193196.943646     8247991.047676
+193211.323153     8247991.894348
+193230.032092     8247995.937930
+193258.075246     8248003.255630
+193286.764921     8248009.330616
+193312.335668     8248014.732170
+193334.162765     8248019.449555
+193367.867344     8248024.975968
+193399.028663     8248032.967089
+193430.815478     8248040.968194
+193473.803666     8248052.897634
+193514.228333     8248068.544491
+193538.486571     8248077.682283
+193554.673249     8248082.939402
+193571.494787     8248087.580330
+193587.126064     8248088.446218
+193600.224189     8248091.151796
+193620.810401     8248095.224195
+193644.524129     8248099.344604
+193659.469158     8248103.956726
+193679.944007     8248114.914634
+193693.021889     8248118.871775
+193720.973934     8248131.822656
+193740.923752     8248136.511605
+193755.939647     8248136.742110
+193780.965884     8248137.126280
+193797.313773     8248132.368589
+193812.955171     8248132.608695
+193830.494091     8248131.625674
+193846.771114     8248131.249601
+193864.289785     8248131.518525
+193888.135118     8248127.501862
+193915.664132     8248127.924451
+193939.500102     8248124.533964
+193962.084307     8248121.123879
+193983.427628     8248117.068808
+194009.775731     8248113.090946
+194029.262027     8248107.755113
+194041.795394     8248106.695253
+194055.096754     8248096.882153
+194062.847288     8248081.974819
+194067.439167     8248068.897573
+194075.815968     8248053.999853
+194084.233259     8248036.598624
+194088.855514     8248021.643269
+194096.727526     8247999.225028
+194097.647379     8247981.082389
+194097.991577     8247959.800846
+194098.305411     8247940.396648
+194092.494286     8247912.759718
+194082.120894     8247896.321914
+194071.031641     8247885.508464
+194059.235141     8247879.692417
+194045.541118     8247875.099499
+194025.056906     8247864.767767
+194005.742712     8247859.462638
+193987.709900     8247852.298604
+193968.486822     8247841.359912
+193942.411286     8247828.437836
+193923.945316     8247809.371674
+193911.766274     8247788.523828
+193900.111500     8247773.944929
+193884.057191     8247760.550749
+193856.105146     8247747.599868
+193834.450157     8247732.241139
+193817.780472     8247718.211194
+193803.643170     8247702.341930
+193788.870237     8247687.089227
+193777.266851     8247669.380285
+193765.622197     8247654.175604
+193753.291302     8247642.716774
+193740.980655     8247630.006000
+193730.495900     8247620.453703
+193720.617169     8247612.162584
+193704.562860     8247598.768404
+193688.640163     8247577.236771
+193672.020327     8247560.077524
+193653.574605     8247539.759417
+193637.016277     8247518.844346
+193613.504263     8247502.204854
+193597.520821     8247484.429057
+193584.615040     8247469.830953
+193569.862362     8247453.325923
+193557.703568     8247431.226132
+193546.786418     8247409.771719
+193538.925923     8247392.746552
+193529.118053     8247380.074197
+193518.673794     8247368.018010
+193497.059296     8247350.155772
+193484.072528     8247340.565068
+193467.362346     8247329.039014
+193450.147382     8247309.992056
+193433.558685     8247290.954711
+193421.954529     8247273.246139
+193409.028506     8247259.899599
+193394.911446     8247242.778772
+193376.425233     8247224.964173
+193362.258319     8247210.973029
+193347.556259     8247191.338327
+193337.839497     8247173.032791
+193330.665250     8247152.261390
+193320.312864     8247134.572033
+193312.482739     8247115.669139
+193302.130352     8247097.979783
+193290.516075     8247080.896992
+193278.982785     8247058.806803
+193266.259227     8247032.941955
+193249.034142     8247014.520779
+193233.736942     8246992.999130
+193217.158372     8246973.335622
+193202.980573     8246959.970248
+193197.562880     8246946.738966
+193180.358037     8246927.066226
+193167.502874     8246909.338450
+193152.246170     8246885.312911
+193135.616219     8246868.779063
+193120.763062     8246858.533772
+193107.220894     8246844.551836
+193088.754923     8246825.485674
+193069.703946     8246803.906020
+193055.042377     8246781.767809
+193044.003742     8246767.824687
+193034.225484     8246753.274211
+193018.908035     8246733.004507
+192997.919810     8246715.151501
+192981.884986     8246700.505364
+192967.728199     8246685.888057
+192952.350011     8246669.373807
+192937.759308     8246642.853978
+192925.539775     8246624.509641
+192913.269619     8246609.295358
+192900.343596     8246595.948818
+192884.289287     8246582.554638
+192870.121616     8246568.563101
+192856.004562     8246551.441891
+192844.451787     8246530.603658
+192837.872668     8246511.719968
+192829.397555     8246494.059429
+192818.429029     8246475.734295
+192809.973401     8246456.821799
+192800.912518     8246436.647756
+192792.487259     8246415.857533
+192784.749006     8246391.321470
+192775.092989     8246369.260097
+192763.509081     8246350.299580
+192754.962344     8246337.020265
+192750.149135     8246325.050901
+192739.766380     8246309.239271
+192730.705497     8246289.065228
+192725.509429     8246277.000000
+END
+LINE3D-MASTER
+HEIGHT 1000.000000
+193863.147324     8246277.000000
+193868.502602     8246284.618066
+193876.433200     8246297.261604
+193884.949573     8246312.418264
+193895.968717     8246327.613725
+193904.504569     8246341.518810
+193911.668700     8246362.915611
+193915.855636     8246374.875744
+193921.142488     8246396.244109
+193930.909868     8246411.419973
+193938.104362     8246430.939429
+193952.795544     8246451.199519
+193963.804567     8246467.020762
+193981.614658     8246487.955431
+194001.341762     8246506.414633
+194019.746988     8246529.236631
+194033.894417     8246544.479732
+194043.086906     8246556.516703
+194054.125534     8246570.460208
+194071.431613     8246583.873603
+194083.843496     8246590.325032
+194098.031416     8246603.064624
+194133.278434     8246629.275223
+194164.680555     8246661.061761
+194181.966379     8246675.727483
+194194.953147     8246685.318188
+194206.073533     8246694.253922
+194219.635186     8246706.983901
+194240.150532     8246715.437917
+194260.100350     8246720.126867
+194281.866702     8246728.600087
+194295.559960     8246733.192994
+194308.002213     8246737.766697
+194320.959375     8246749.235140
+194334.510901     8246762.591282
+194346.256790     8246771.536618
+194359.243558     8246781.127323
+194387.831227     8246793.462024
+194407.135300     8246799.392934
+194422.746322     8246801.511150
+194444.725273     8246796.839518
+194461.628563     8246796.473058
+194479.833476     8246792.996130
+194512.478642     8246786.610038
+194535.698472     8246782.583773
+194551.976258     8246782.207711
+194572.784421     8246772.509846
+194591.726200     8246762.157012
+194603.694803     8246757.332095
+194623.170978     8246752.622044
+194645.836165     8246744.204941
+194660.873072     8246743.183512
+194676.060305     8246732.773043
+194689.230060     8246731.097014
+194703.710039     8246725.684330
+194716.940533     8246720.252848
+194743.379757     8246710.641042
+194755.963736     8246706.451891
+194771.051261     8246702.300790
+194784.199246     8246701.876301
+194801.152390     8246698.380158
+194819.236589     8246702.414149
+194832.303581     8246706.997442
+194845.392349     8246710.328813
+194865.978554     8246714.401594
+194891.568792     8246718.550809
+194910.247355     8246724.472500
+194928.915797     8246731.019972
+194946.969627     8246736.931691
+194964.407311     8246742.208014
+194985.608135     8246746.916167
+195006.808960     8246751.624320
+195017.000000     8246753.760645
+END
+LINE3D-MASTER
+HEIGHT 1000.000000
+195017.000000     8255986.006361
+195009.298154     8256000.261844
+194999.096213     8256012.001862
+194989.498793     8256025.001505
+194976.045567     8256044.204386
+194960.019468     8256067.750095
+194937.574847     8256101.213796
+194919.610748     8256128.485378
+194907.521425     8256140.821596
+194902.878916     8256157.029278
+194887.004671     8256171.185970
+194872.884693     8256192.882364
+194846.879391     8256214.396310
+194829.107630     8256229.775748
+194815.141034     8256242.083148
+194803.767577     8256248.794629
+194792.414338     8256254.256075
+194781.010505     8256262.845665
+194766.439412     8256273.891912
+194742.481952     8256284.794072
+194707.838028     8256298.662636
+194678.753537     8256316.998865
+194650.366198     8256330.961943
+194618.799937     8256348.008201
+194575.829843     8256373.644049
+194547.452588     8256386.983639
+194526.584450     8256400.436970
+194502.586506     8256413.842256
+194480.445592     8256428.527923
+194456.356521     8256447.567536
+194430.461824     8256462.195580
+194414.043069     8256471.334889
+194402.608837     8256481.804116
+194391.205004     8256490.393706
+194379.791802     8256499.609853
+194368.962855     8256511.338718
+194348.739699     8256523.550075
+194328.425416     8256541.395760
+194306.808770     8256562.350374
+194287.775870     8256578.337154
+194275.029904     8256592.541867
+194256.673149     8256605.407048
+194228.921422     8256618.754711
+194211.251660     8256627.874816
+194197.355160     8256635.800969
+194183.530284     8256639.345898
+194170.824827     8256651.045957
+194152.437672     8256665.790775
+194135.958190     8256678.684774
+194113.837519     8256692.118878
+194098.619152     8256704.407062
+194076.589584     8256712.208367
+194060.867192     8256716.976042
+194048.908716     8256721.174794
+194021.833874     8256731.402399
+194002.962960     8256737.373616
+193982.860519     8256742.074054
+193960.891701     8256746.119141
+193933.281694     8256750.704332
+193898.164121     8256755.174278
+193876.830916     8256758.603949
+193859.867651     8256762.725874
+193826.011218     8256766.588477
+193806.595795     8256767.542311
+193780.257800     8256770.895155
+193763.243154     8256778.146741
+193742.455246     8256786.592279
+193729.810516     8256794.537648
+193714.663010     8256802.444597
+193698.890000     8256810.341944
+193689.353308     8256819.586897
+193671.006661     8256831.827061
+193656.454307     8256841.620193
+193636.907273     8256850.711480
+193616.078856     8256861.661673
+193587.014607     8256878.746338
+193556.145473     8256891.420974
+193537.859578     8256899.904920
+193524.619720     8256905.962578
+193511.985124     8256913.281400
+193501.206770     8256921.882120
+193479.258194     8256924.675644
+193454.140855     8256929.924272
+193435.976438     8256930.897310
+193423.463320     8256930.705225
+193410.334807     8256929.878520
+193387.811346     8256929.532769
+193369.667171     8256929.254243
+193352.764658     8256929.619951
+193335.185235     8256933.107245
+193315.113933     8256935.929586
+193289.452084     8256936.160831
+193276.181087     8256944.096586
+193259.914186     8256943.846878
+193242.315285     8256948.585747
+193229.115148     8256952.140266
+193205.945942     8256953.036477
+193188.992811     8256956.531856
+193176.348081     8256964.477225
+193163.743835     8256969.919467
+193158.962766     8256986.091834
+193153.438372     8257015.742421
+END
+LINE3D-MASTER
+HEIGHT 1000.000000
+191766.552813     8248364.778668
+191746.199442     8248346.309852
+191729.388025     8248341.043143
+191704.432654     8248336.277355
+191687.065836     8248326.619414
+191675.935329     8248318.309461
+191661.697555     8248308.699553
+191644.885380     8248303.432449
+191631.767001     8248301.979199
+191610.000655     8248293.505596
+191596.246651     8248292.668526
+191583.794271     8248288.720986
+191562.714168     8248276.501532
+191545.418216     8248262.461973
+191531.886932     8248247.854268
+191517.779999     8248230.107276
+191506.802110     8248212.408318
+191501.393774     8248198.551242
+191497.277705     8248182.209492
+191493.110248     8248168.997784
+191489.558936     8248156.421471
+191481.164047     8248133.753521
+191477.078347     8248115.534044
+191462.477517     8248089.640379
+191452.115009     8248072.576804
+191437.311713     8248059.201446
+191425.616442     8248047.126437
+191416.525189     8248028.830121
+191403.771262     8248004.843001
+191396.526144     8247988.453599
+191382.974617     8247975.097457
+191371.854232     8247966.161722
+191349.523122     8247953.923064
+191333.993080     8247946.797831
+191317.353765     8247930.890159
+191298.211674     8247914.944068
+191280.290219     8247900.894907
+191268.483591     8247895.705024
+191255.436084     8247889.869774
+191241.742062     8247885.276856
+191223.598651     8247884.998342
+191201.074426     8247884.652579
+191187.249556     8247888.197126
+191170.235674     8247895.448724
+191150.819481     8247896.402928
+191134.532331     8247897.405165
+191113.290246     8247895.200891
+191099.153708     8247879.331638
+191098.165154     8247863.037897
+191094.613843     8247850.461585
+191094.190811     8247837.933293
+191088.812845     8247822.198491
+191088.420183     8247807.792473
+191081.246694     8247787.021465
+191071.731646     8247756.196846
+191059.694331     8247726.586146
+191054.317128     8247710.851355
+191042.107717     8247691.881236
+191032.955725     8247677.340374
+191028.294370     8247655.981992
+191026.054810     8247639.669048
+191021.938735     8247623.327679
+191017.247011     8247603.847025
+191012.505438     8247587.495672
+191006.704440     8247559.232578
+191006.381880     8247540.444931
+191002.972295     8247519.105765
+190999.532347     8247499.643944
+190994.739387     8247486.422634
+190994.972228     8247472.026218
+190995.275936     8247453.248183
+190995.620140     8247431.966259
+190995.913726     8247413.814006
+190996.116198     8247401.295317
+190997.106911     8247378.771442
+190994.535428     8247344.297025
+190993.546869     8247328.003666
+190985.121616     8247307.213061
+190972.871708     8247290.746833
+190960.642048     8247273.028659
+190956.505731     8247257.938853
+190952.339037     8247244.727157
+190948.797090     8247231.524669
+190944.650645     8247217.061028
+190939.292927     8247200.074280
+190926.518751     8247177.339105
+190920.535530     8247160.342755
+190910.768150     8247145.166891
+190904.088559     8247132.542557
+190895.027676     8247112.368514
+190884.654284     8247095.930709
+190879.882336     8247081.457466
+190865.785524     8247063.084693
+190861.073557     8247044.855602
+190854.393966     8247032.231268
+190842.204803     8247012.009203
+190821.296796     8246989.149168
+190807.059021     8246979.539260
+190791.599846     8246968.032410
+190769.904360     8246955.177571
+190746.896365     8246946.058971
+190726.402032     8246936.353021
+190713.465882     8246923.632644
+190698.006707     8246912.125794
+190675.765941     8246894.253942
+190657.310098     8246874.561617
+190638.712522     8246863.632527
+190614.474527     8246853.243171
+190591.496902     8246842.246844
+190569.760919     8246831.895897
+190557.318667     8246827.322194
+190541.122632     8246822.690868
+190526.268711     8246812.445565
+190508.902657     8246802.787635
+190498.448272     8246791.357612
+190484.311733     8246775.488359
+190467.117017     8246755.189456
+190451.103205     8246739.291386
+190437.500298     8246729.064904
+190425.704555     8246723.249252
+190410.265628     8246710.490456
+190400.426624     8246699.695816
+190379.397902     8246684.346701
+190356.501264     8246668.342974
+190336.128408     8246651.126116
+190320.740100     8246635.237648
+190305.382167     8246617.471070
+190291.789374     8246606.619189
+190278.106243     8246601.400119
+190261.334552     8246593.629889
+190247.651421     8246588.410819
+190229.053839     8246577.482111
+190229.256311     8246564.963421
+190225.089623     8246551.751343
+190220.912045     8246539.165417
+190207.360513     8246525.809657
+190190.578708     8246518.664826
+190169.881903     8246521.477565
+190144.713933     8246529.856630
+190127.104147     8246535.221270
+190107.658348     8246538.053212
+190087.637664     8246537.745881
+190062.611427     8246537.361710
+190038.210693     8246536.987142
+190013.890953     8246531.604792
+189988.239212     8246531.211020
+189966.906013     8246534.640309
+189950.618863     8246535.642546
+189938.055127     8246538.580133
+189909.839871     8246541.903396
+189887.316410     8246541.557645
+189858.525506     8246541.741621
+189836.002045     8246541.395870
+189815.295113     8246544.834773
+189794.577295     8246548.899445
+189772.679338     8246548.563296
+189743.889197     8246548.747284
+189717.611190     8246548.343899
+189696.339499     8246548.017363
+189673.815275     8246547.671601
+189652.543584     8246547.345065
+189626.285825     8246545.689734
+189601.945830     8246541.559712
+189582.570898     8246540.010037
+189564.497590     8246535.349893
+189551.429834     8246530.766588
+189537.050327     8246529.919916
+189523.356305     8246525.326997
+189505.929506     8246519.424904
+189490.399471     8246512.299289
+189475.667034     8246494.542696
+189463.477872     8246474.320632
+189453.821855     8246452.259259
+189444.033469     8246438.334947
+189433.569720     8246427.531099
+189418.685436     8246419.163141
+189400.753854     8246405.740144
+189372.862548     8246389.033809
+189350.017292     8246369.900422
+189325.940514     8246349.495874
+189303.075009     8246331.614433
+189283.872178     8246319.423795
+189196.259589     8246277.000000
+END
+LINE3D-MASTER
+HEIGHT 1000.000000
+188457.180542     8246277.000000
+188457.230394     8246277.307964
+188457.612929     8246292.340146
+188457.400336     8246305.484617
+188457.137119     8246321.759142
+188456.732176     8246346.796521
+188451.342692     8246370.505127
+188444.762177     8246390.439064
+188438.242407     8246406.617165
+188431.107256     8246422.159882
+188424.557110     8246440.216092
+188419.207359     8246461.420796
+188407.580794     8246483.781785
+188401.081273     8246498.707940
+188390.898829     8246509.195237
+188380.070633     8246520.924877
+188365.447400     8246535.100391
+188355.900587     8246544.971126
+188346.313276     8246557.345751
+188334.839329     8246570.317735
+188322.749242     8246582.653941
+188314.352199     8246598.803224
+188309.155059     8246610.619305
+188305.773690     8246626.219645
+188300.474557     8246644.294677
+188295.781436     8246663.631650
+188295.568844     8246676.776121
+188310.675090     8246671.373051
+188320.292770     8246657.120698
+188329.849711     8246646.623800
+188347.672089     8246628.114689
+188360.942316     8246620.179305
+188379.157357     8246616.076213
+188396.211737     8246606.320724
+188412.015110     8246596.546032
+188435.962442     8246586.270036
+188458.062871     8246574.087496
+188471.262238     8246570.533347
+188485.037248     8246570.118866
+188501.314270     8246569.742793
+188527.510526     8246575.153566
+188549.347745     8246579.245169
+188564.242156     8246586.986964
+188584.696756     8246599.196816
+188598.883913     8246611.936397
+188617.491616     8246622.239323
+188639.187102     8246635.094162
+188657.744187     8246648.526760
+188673.172986     8246661.911720
+188691.699702     8246677.222046
+188709.651526     8246689.393479
+188728.198484     8246703.452242
+188745.453945     8246719.995309
+188763.980654     8246735.306017
+188778.803441     8246747.429035
+188793.596616     8246761.430175
+188810.922937     8246773.592006
+188829.540761     8246783.269151
+188846.886567     8246794.179026
+188864.909263     8246801.968459
+188889.198634     8246809.228536
+188909.703859     8246818.308335
+188930.864186     8246825.520378
+188950.743908     8246834.590575
+188971.915126     8246841.176467
+188994.296854     8246850.285453
+189023.601142     8246856.996193
+189047.850022     8246866.759779
+189070.938247     8246870.870586
+189089.637058     8246875.540331
+189110.233391     8246878.986949
+189129.567827     8246883.040514
+189147.066256     8246884.561001
+189163.938413     8246886.072257
+189179.579811     8246886.312363
+189195.846712     8246886.562072
+189212.114377     8246886.811792
+189231.509558     8246887.109521
+189257.786802     8246887.512896
+189274.760957     8246882.764818
+189290.412476     8246882.379143
+189304.257595     8246877.582651
+189323.098133     8246873.489543
+189350.001643     8246873.902530
+189380.648052     8246874.998911
+189404.362543     8246879.119332
+189423.676731     8246884.424843
+189442.980803     8246890.355753
+189464.131773     8246898.193591
+189482.790094     8246905.366845
+189497.735123     8246909.978967
+189515.727444     8246919.646510
+189524.909811     8246932.309263
+189530.953772     8246945.550159
+189537.017986     8246957.538727
+189547.208392     8246985.243264
+189554.382644     8247006.014283
+189563.473897     8247024.310600
+189571.313386     8247042.587318
+189579.860123     8247055.866633
+189592.008795     8247078.592207
+189607.921371     8247100.749621
+189622.613310     8247121.010105
+189639.889019     8247136.301227
+189651.532903     8247151.506279
+189662.643161     8247161.068177
+189681.785253     8247177.014269
+189695.993421     8247188.501915
+189709.585444     8247199.354167
+189721.966957     8247207.683324
+189741.220406     8247216.744289
+189767.265572     8247231.544091
+189789.556191     8247246.286258
+189805.671239     8247255.924984
+189821.251892     8247259.920926
+189839.325206     8247264.580688
+189861.787922     8247268.682275
+189881.112237     8247273.361622
+189897.298914     8247278.618741
+189909.710797     8247285.070171
+189932.728156     8247293.562596
+189953.294119     8247298.886940
+189980.751503     8247303.691136
+190011.963433     8247308.552966
+190030.672372     8247312.596548
+190049.381304     8247316.640512
+190066.203612     8247321.281070
+190094.186027     8247332.354224
+190127.142861     8247345.381932
+190148.899086     8247354.481316
+190165.599910     8247366.633164
+190184.116499     8247382.569653
+190197.133636     8247390.282630
+190209.484774     8247400.489896
+190233.067660     8247412.747388
+190258.547298     8247423.782123
+190269.666914     8247432.718228
+190289.445400     8247448.047769
+190299.929391     8247457.600054
+190310.424268     8247466.526569
+190320.232138     8247479.198924
+190330.574404     8247497.514062
+190343.399191     8247517.119947
+190355.013468     8247534.202737
+190369.150770     8247550.072002
+190374.488246     8247568.310313
+190379.229819     8247584.661665
+190383.911422     8247604.768101
+190392.810324     8247634.957325
+190403.585742     8247665.174973
+190413.283020     8247684.732466
+190422.878291     8247710.549675
+190433.714454     8247737.011486
+190447.578419     8247769.781058
+190463.521364     8247790.060745
+190487.588021     8247811.091075
+190508.384666     8247840.836619
+190525.406516     8247871.776473
+190546.122174     8247906.529416
+190566.928946     8247935.648795
+190588.381463     8247963.526214
+190617.250438     8247997.152060
+190647.905571     8248036.440286
+190671.154381     8248069.353540
+190686.461696     8248090.249789
+190698.055731     8248108.584143
+190713.927810     8248133.245448
+190737.267728     8248160.525520
+190753.261292     8248177.675536
+190766.782454     8248192.909023
+190782.201133     8248206.919764
+190798.174448     8248225.321725
+190809.778604     8248243.030297
+190815.207189     8248255.635427
+190829.364739     8248270.252746
+190852.764633     8248293.777353
+190874.358883     8248312.891536
+190887.284912     8248326.237694
+190898.354674     8248338.303483
+190914.297625     8248358.582789
+190930.189947     8248381.992531
+190944.912256     8248400.375288
+190963.418723     8248416.937559
+190989.403144     8248435.493197
+191009.079636     8248457.081689
+191034.265682     8248486.269058
+191056.293097     8248517.284987
+191073.508061     8248536.331945
+191093.265522     8248552.914184
+191112.479250     8248564.478288
+191127.352649     8248573.472016
+191142.186314     8248584.969646
+191160.128017     8248597.766862
+191175.587199     8248609.273330
+191193.528902     8248622.070545
+191217.676546     8248638.093475
+191241.177669     8248655.359119
+191264.074307     8248671.362846
+191282.045622     8248682.281940
+191299.392198     8248693.191444
+191314.871609     8248703.447113
+191332.863930     8248713.114656
+191352.783378     8248719.681333
+191367.032049     8248728.664706
+191384.993995     8248740.210358
+191404.176583     8248753.652559
+191416.466975     8248767.615661
+191430.725004     8248775.973242
+191454.953630     8248786.989154
+191474.894097     8248792.303515
+191489.888973     8248793.786335
+191510.465064     8248798.484516
+191530.364271     8248806.302756
+191545.863936     8248815.306097
+191562.625493     8248823.702873
+191579.366044     8248833.351200
+191605.512452     8248841.891276
+191624.745646     8248852.204568
+191646.471507     8248863.181298
+191665.018471     8248877.239678
+191689.186358     8248892.011045
+191710.861602     8248906.117447
+191736.361488     8248915.900236
+191754.394293     8248923.064652
+191773.052614     8248930.237906
+191786.745879     8248934.830431
+191801.116016     8248936.303661
+191816.070409     8248940.289608
+191839.139155     8248945.651990
+191860.320495     8248951.612100
+191873.438862     8248953.066114
+191902.824143     8248954.769073
+191920.322572     8248956.289560
+191942.210396     8248957.252255
+191963.482850     8248957.578802
+191989.760093     8248957.982176
+192015.411834     8248958.375948
+192036.583052     8248964.961840
+192063.385327     8248971.634172
+192088.330583     8248977.025360
+192115.777839     8248982.455719
+192141.369604     8248986.604957
+192161.370046     8248988.163852
+192183.883373     8248989.136149
+192197.021995     8248989.337836
+192223.915384     8248990.376605
+192238.911037     8248991.858673
+192253.785199     8249000.852413
+192269.163387     8249017.366663
+192275.863220     8249028.739433
+192283.178435     8249040.747588
+192296.124719     8249052.841418
+192317.346555     8249056.297638
+192331.192425     8249051.501921
+192344.442403     8249044.818482
+192357.046637     8249039.377004
+192377.864932     8249029.052593
+192396.019228     8249028.705337
+192412.983256     8249024.583423
+192429.885782     8249024.216952
+192448.726332     8249020.123080
+192477.587333     8249015.557856
+192502.170297     8249004.665299
+192520.496701     8248993.676698
+192537.530825     8248985.173537
+192558.299267     8248977.978810
+192579.087187     8248969.532508
+192604.881411     8248961.163821
+192625.598471     8248957.098755
+192648.889931     8248948.690884
+192665.227692     8248944.559357
+192681.626205     8248936.671611
+192698.660330     8248928.168450
+192714.514333     8248915.263321
+192729.086942     8248904.217862
+192748.654231     8248893.874247
+192761.187592     8248892.814769
+192774.952480     8248893.026070
+192796.052075     8248903.993185
+192811.551741     8248912.996527
+192828.918558     8248922.654468
+192849.484516     8248927.979195
+192868.183334     8248932.648558
+192886.326745     8248932.927072
+192899.466130     8248933.128771
+192921.364087     8248933.464920
+192944.583911     8248929.439037
+192962.748341     8248928.465236
+192985.907425     8248928.194807
+193004.677103     8248928.482935
+193020.944005     8248928.732643
+193039.663064     8248932.150443
+193057.171615     8248933.045148
+193080.936712     8248934.036661
+193105.336682     8248934.411217
+193120.372832     8248933.389394
+193143.613674     8248928.111196
+193157.438538     8248924.567031
+193173.079936     8248924.807137
+193187.470328     8248925.028040
+193214.271839     8248931.700361
+193233.031395     8248932.614270
+193247.361036     8248936.591391
+193269.198254     8248940.682994
+193294.718395     8248949.213456
+193312.771455     8248955.125545
+193332.711146     8248960.440657
+193351.420085     8248964.484239
+193373.882806     8248968.585444
+193396.396910     8248969.556988
+193415.771836     8248971.107045
+193435.772278     8248972.665940
+193457.649981     8248974.254417
+193484.533249     8248975.918968
+193505.128818     8248979.365574
+193523.837757     8248983.409155
+193540.730926     8248983.668477
+193561.326495     8248987.115083
+193582.578695     8248988.693958
+193603.164907     8248992.766357
+193618.130184     8248996.126534
+193632.469194     8248999.477097
+193646.808968     8249002.827672
+193661.764124     8249006.813630
+193674.882503     8249008.266881
+193688.596010     8249011.607842
+193707.960816     8249013.783681
+193726.104990     8249014.062207
+193744.874668     8249014.350334
+193765.531740     8249014.041498
+193780.547635     8249014.272002
+193793.686257     8249014.473689
+193810.588783     8249014.107218
+193836.240523     8249014.500990
+193866.786459     8249021.856727
+193887.957678     8249028.442619
+193911.540558     8249040.700493
+193925.162963     8249049.674254
+193939.431864     8249057.406828
+193953.135250     8249061.373571
+193978.100748     8249065.513196
+193991.804134     8249069.479939
+194005.498150     8249074.073239
+194023.561344     8249079.358782
+194045.993689     8249085.338096
+194072.825564     8249090.133072
+194103.381621     8249096.863028
+194125.824100     8249102.215796
+194150.769344     8249107.607748
+194170.770550     8249109.166654
+194183.222929     8249113.114193
+194211.286331     8249119.179948
+194238.168823     8249120.845251
+194254.416246     8249122.346535
+194278.795974     8249123.972655
+194296.294391     8249125.493906
+194318.807730     8249126.465439
+194345.075616     8249127.494606
+194364.551779     8249122.785318
+194379.658788     8249117.382260
+194394.765034     8249111.979190
+194408.015777     8249105.295762
+194425.029671     8249098.043400
+194443.254827     8249093.314909
+194468.432918     8249084.310062
+194491.662875     8249079.657633
+194516.901705     8249066.897333
+194540.768051     8249061.628736
+194563.504104     8249048.830016
+194591.205213     8249038.612025
+194615.788177     8249027.719468
+194635.374944     8249016.124278
+194653.681857     8249006.388017
+194680.716979     8248998.663551
+194707.115701     8248991.556017
+194727.904384     8248983.109726
+194744.312255     8248974.596188
+194756.956972     8248966.651583
+194767.775047     8248955.547725
+194778.604770     8248943.818108
+194792.611851     8248929.007581
+194807.174351     8248918.587139
+194826.690246     8248911.373949
+194848.054579     8248906.066945
+194861.818704     8248906.278234
+194875.027422     8248902.098674
+194887.540540     8248902.290759
+194903.808206     8248902.540479
+194923.204150     8248902.838220
+194940.650434     8248907.488356
+194964.364926     8248911.608777
+194991.884582     8248912.657160
+195011.783776     8248920.476163
+195017.000000     8248922.557037
+END
+LINE3D-MASTER
+HEIGHT 1000.000000
+195017.000000     8252581.206382
+195010.080383     8252585.580290
+194993.076621     8252592.206107
+194977.364363     8252596.347236
+194949.098489     8252602.800171
+194927.028424     8252613.105366
+194896.834659     8252622.659156
+194880.445516     8252629.920344
+194867.206422     8252635.978013
+194858.284335     8252645.859102
+194848.072285     8252658.224137
+194837.213726     8252671.831122
+194818.775202     8252689.704837
+194808.512534     8252705.199545
+194799.600581     8252714.454088
+194789.398652     8252726.193342
+194782.949755     8252737.989443
+194775.268553     8252748.515518
+194760.818950     8252752.050093
+194745.782049     8252753.071140
+194729.485536     8252754.699552
+194713.914998     8252750.078210
+194696.477320     8252744.801505
+194684.507947     8252749.626791
+194668.785568     8252754.393702
+194645.424011     8252767.182820
+194633.334688     8252779.519038
+194613.675520     8252795.496204
+194597.821530     8252808.400569
+194586.377200     8252819.494050
+194574.974883     8252828.084427
+194562.954893     8252836.039386
+194537.101444     8252848.164315
+194499.974236     8252860.742121
+194469.135477     8252871.538647
+194433.219541     8252886.639559
+194401.703910     8252900.555381
+194375.900316     8252909.550626
+194358.916797     8252914.924879
+194343.184284     8252920.318335
+194321.114231     8252930.622767
+194300.920675     8252940.956768
+194270.060910     8252953.004846
+194242.996188     8252962.606669
+194222.248002     8252968.549068
+194200.783197     8252980.115429
+194176.887252     8252987.261382
+194157.431332     8252990.719107
+194143.040940     8252990.498204
+194129.276815     8252990.286915
+194113.706277     8252985.665573
+194099.941388     8252985.454272
+194078.760049     8252979.494162
+194056.307448     8252974.767176
+194041.372547     8252969.528890
+194028.335161     8252963.067858
+194004.753044     8252950.809995
+193993.673149     8252939.370752
+193985.126419     8252926.091055
+193975.379287     8252909.663246
+193970.021563     8252892.676880
+193963.443208     8252873.793202
+193963.665934     8252860.022185
+193965.190272     8252843.141463
+193965.392743     8252830.622774
+193965.676209     8252813.096303
+193955.959440     8252794.791149
+193945.505824     8252783.360755
+193933.729566     8252776.293146
+193913.244590     8252765.961402
+193893.849409     8252765.663672
+193874.454228     8252765.365943
+193856.340429     8252763.209308
+193843.282801     8252757.999839
+193830.144179     8252757.798152
+193807.408113     8252770.597637
+193795.429396     8252776.047952
+193784.055914     8252782.760961
+193770.866675     8252785.688947
+193758.232078     8252793.007769
+193745.607603     8252799.700811
+193734.021528     8252819.558291
+193726.321625     8252831.335188
+193719.882836     8252842.506272
+193711.576908     8252853.021992
+193698.286432     8252862.209322
+193686.327944     8252866.408838
+193675.803456     8252859.360444
+193662.826821     8252849.143195
+193648.628768     8252837.030148
+193634.583344     8252815.527333
+193611.636088     8252802.653279
+193593.481792     8252803.000535
+193571.350987     8252817.061184
+193563.651084     8252828.838081
+193555.193289     8252848.743583
+193550.550793     8252864.950501
+193549.520346     8252889.978278
+193542.304201     8252910.528777
+193541.889137     8252936.191937
+193545.389830     8252951.897922
+193545.600269     8252977.570684
+193545.780332     8253005.121556
+193545.102057     8253047.058860
+193543.273999     8253082.718379
+193541.688159     8253103.354542
+193541.435069     8253119.002904
+193542.251521     8253145.937608
+193544.984978     8253170.397226
+193544.559793     8253196.686168
+193544.266206     8253214.838421
+193544.013117     8253230.486782
+193538.027736     8253252.308048
+193525.109674     8253277.153342
+193518.438050     8253302.720460
+193513.785433     8253319.553160
+193509.152294     8253335.134285
+193508.828332     8253355.164646
+193509.200745     8253370.822610
+193510.875547     8253383.370117
+193503.175631     8253395.147778
+193491.781920     8253403.111586
+193485.171035     8253424.923250
+193493.555791     8253448.217746
+193502.788776     8253457.750827
+193520.306684     8253458.019739
+193533.456203     8253457.594892
+193554.163129     8253454.156371
+193564.577012     8253468.090668
+193564.232820     8253489.371828
+193558.974178     8253504.943351
+193556.248675     8253518.675949
+193555.329586     8253536.818599
+193563.048354     8253562.606620
+193570.312951     8253577.744446
+193578.900191     8253588.519489
+193595.529385     8253605.052942
+193616.417138     8253629.165305
+193626.225009     8253641.837660
+193635.356758     8253657.630086
+193642.682871     8253669.011706
+193652.923894     8253693.586571
+193665.738554     8253713.818619
+193683.852365     8253715.974490
+193701.885183     8253723.138142
+193714.155333     8253738.352807
+193724.588707     8253751.034764
+193738.705754     8253768.156356
+193756.556355     8253786.586370
+193775.123561     8253799.393187
+193790.471373     8253817.785546
+193800.894626     8253831.093285
+193816.282935     8253846.981753
+193825.485544     8253858.392943
+193834.698287     8253869.177587
+193849.511711     8253881.926781
+193867.937184     8253903.496834
+193900.640929     8253932.172904
+193916.079856     8253944.931699
+193928.400624     8253957.016692
+193943.819308     8253971.027051
+193952.426790     8253980.550530
+193965.352807     8253993.897453
+193985.151541     8254007.975049
+194000.560092     8254022.611954
+194015.403891     8254033.483038
+194034.637097     8254043.795567
+194060.560015     8254066.106647
+194077.260833     8254078.258877
+194096.554778     8254084.815951
+194109.673158     8254086.269202
+194129.673587     8254087.828861
+194177.849552     8254088.568396
+194216.579175     8254092.919311
+194232.068719     8254102.548432
+194248.860652     8254109.067099
+194261.928414     8254113.650022
+194276.782321     8254123.896089
+194297.800922     8254139.870986
+194320.072057     8254155.865110
+194337.871276     8254177.424785
+194344.571873     8254188.797568
+194362.926487     8254214.748856
+194385.862858     8254228.248680
+194400.141880     8254235.355473
+194432.916498     8254259.649543
+194455.176748     8254276.269437
+194468.144025     8254287.112480
+194483.633569     8254296.741604
+194505.258195     8254313.977678
+194534.825693     8254304.414274
+194551.728219     8254304.047803
+194574.110710     8254313.156801
+194590.093395     8254330.932204
+194606.663365     8254351.221900
+194621.496280     8254362.718754
+194640.780867     8254369.901622
+194661.264304     8254380.234107
+194678.006382     8254389.882457
+194691.537672     8254404.489781
+194700.598549     8254424.664206
+194707.206516     8254441.669764
+194705.520191     8254468.566048
+194698.274446     8254490.993903
+194692.349040     8254509.059703
+194683.377875     8254522.069724
+194668.006891     8254543.746914
+194658.954733     8254561.764717
+194649.882333     8254581.034082
+194643.342320     8254598.463746
+194630.576112     8254613.920023
+194618.373893     8254633.142108
+194603.669672     8254652.325021
+194591.185527     8254689.072836
+194577.479224     8254723.923315
+194567.246931     8254737.539913
+194555.044724     8254756.761234
+194535.859969     8254782.137031
+194524.717945     8254813.270487
+194518.107061     8254835.082151
+194508.408406     8254854.341138
+194496.843350     8254872.946303
+194486.559651     8254889.694090
+194465.517891     8254913.787978
+194448.281294     8254934.809829
+194434.141814     8254957.759326
+194415.139313     8254971.866469
+194391.706884     8254989.037586
+194370.806844     8255004.369003
+194346.223880     8255015.261561
+194334.820812     8255023.851162
+194317.704905     8255037.363621
+194298.036392     8255053.965817
+194277.509529     8255084.955209
+194262.220303     8255101.624629
+194250.725343     8255115.848546
+194233.579849     8255131.237598
+194217.130718     8255142.255016
+194202.466995     8255158.934038
+194184.635271     8255178.068178
+194173.573452     8255204.195368
+194158.930734     8255219.622839
+194141.652890     8255243.147805
+194112.548896     8255262.737137
+194097.148325     8255286.290920
+194081.808455     8255306.091541
+194070.747425     8255332.217215
+194070.453851     8255350.368703
+194065.073730     8255373.451134
+194058.927126     8255405.287975
+194054.354738     8255417.112881
+194054.142133     8255430.258117
+194053.646087     8255460.928294
+194051.567106     8255473.418178
+194040.738134     8255485.148570
+194026.348506     8255484.927680
+194013.209121     8255484.725981
+193996.154754     8255494.480705
+193981.632751     8255502.397256
+193972.722325     8255511.651823
+193961.308359     8255520.867959
+193956.625366     8255539.578768
+193947.683801     8255550.711432
+193946.219425     8255563.837452
+193960.417479     8255575.950498
+193972.213992     8255581.765780
+193984.615741     8255588.843756
+193981.203997     8255606.322205
+193967.256879     8255617.378031
+193957.023823     8255630.994617
+193946.226015     8255640.845384
+193938.545565     8255651.372235
+193925.224739     8255662.436146
+193910.582021     8255677.863617
+193895.485133     8255682.640893
+193866.220566     8255673.427015
+193852.648804     8255661.322054
+193838.975781     8255655.477966
+193824.121874     8255645.231899
+193808.541202     8255641.237103
+193779.124806     8255641.410713
+193753.462933     8255641.643487
+193729.769459     8255636.270750
+193705.388968     8255634.644619
+193692.966951     8255628.819735
+193675.025248     8255616.022519
+193663.218627     8255610.832255
+193645.913324     8255597.418107
+193608.596682     8255583.071599
+193583.015038     8255578.296580
+193564.326354     8255573.000671
+193541.187524     8255572.018772
+193504.385016     8255564.567756
+193466.845660     8255563.991501
+193449.175899     8255573.111606
+193414.542109     8255586.353624
+193363.660896     8255598.094359
+193330.954998     8255608.235523
+193298.411062     8255608.362652
+193273.232971     8255617.367499
+193238.033666     8255626.843686
+193221.706013     8255630.350195
+193206.588882     8255636.379036
+193182.087676     8255642.263824
+193155.738809     8255646.241673
+193139.864563     8255660.398365
+193120.932898     8255670.125801
+193089.971898     8255688.433224
+193075.369690     8255701.356040
+193069.394417     8255722.552288
+193056.053324     8255734.869290
+193041.288364     8255757.807657
+193023.446507     8255777.568343
+193000.961377     8255813.536699
+192964.832861     8255841.781318
+192941.390299     8255859.578981
+192927.352079     8255876.267606
+192910.710610     8255899.177167
+192898.438293     8255922.780499
+192889.224160     8255950.813100
+192870.725660     8255972.442281
+192849.017887     8255999.031222
+192835.595801     8256016.356005
+192824.141350     8256028.075268
+192819.519108     8256043.029859
+192818.559522     8256063.676400
+192819.486579     8256083.725201
+192814.854203     8256099.306338
+192803.308626     8256116.659927
+192794.174723     8256139.684735
+192783.103559     8256166.436955
+192776.996699     8256195.769129
+192760.395715     8256216.175564
+192748.759035     8256239.161952
+192725.245613     8256261.340851
+192713.608933     8256284.327240
+192704.082349     8256292.947176
+192684.998855     8256312.062099
+192665.289834     8256331.168950
+192644.410035     8256345.248803
+192627.839427     8256363.777129
+192610.521837     8256389.806761
+192588.279687     8256410.751772
+192572.858849     8256435.558647
+192559.548132     8256445.997540
+192549.406178     8256453.981328
+192540.484855     8256463.862429
+192525.922367     8256474.282106
+192509.331517     8256494.061995
+192488.996992     8256513.159244
+192461.637920     8256540.913307
+192446.791967     8256568.859456
+192429.646473     8256584.248507
+192424.397964     8256599.193484
+192407.070241     8256625.849662
+192396.120555     8256645.090974
+192376.360176     8256667.325957
+192357.084319     8256698.334553
+192329.232120     8256717.941572
+192308.261195     8256737.655752
+192290.469192     8256754.286754
+192267.631915     8256773.344054
+192245.217645     8256804.931175
+192221.805458     8256820.850729
+192206.637710     8256830.009242
+192194.567890     8256841.092356
+192176.231352     8256852.707502
+192161.578526     8256868.759991
+192142.505141     8256887.249897
+192119.455234     8256919.453961
+192108.413682     8256944.328061
+192092.590079     8256955.353552
+192076.049821     8256972.005297
+192060.175601     8256986.160461
+192050.557915     8257000.413196
+192043.483489     8257012.201223
+192032.664676     8257023.303541
+192024.924263     8257037.585093
+191941.285119     8257101.415438
+191922.958740     8257112.402510
+191907.266724     8257115.292076
+191873.288788     8257126.667116
+191836.091470     8257143.626933
+191817.937187     8257143.973425
+191806.564469     8257150.686445
+191787.632829     8257160.412352
+191762.343369     8257176.303090
+191735.510603     8257221.552377
+END
+LINE3D
+HEIGHT 1020.000000
+187766.346848     8246277.000000
+187768.816524     8246278.636188
+187776.778255     8246289.402011
+187786.656991     8246297.692748
+187801.531160     8246306.686106
+187813.973412     8246311.259809
+187832.803829     8246307.792483
+187857.264926     8246304.411209
+187870.414051     8246303.987120
+187891.050499     8246304.929841
+187909.042438     8246314.597378
+187925.763122     8246325.497657
+187940.627164     8246335.117178
+187948.598633     8246345.257213
+187957.104880     8246361.040037
+187961.291821     8246372.999788
+187968.587170     8246386.259893
+187975.196283     8246403.265469
+187976.032219     8246428.948215
+187975.809499     8246442.718850
+187975.434931     8246465.878119
+187975.029988     8246490.915498
+187974.776898     8246506.563860
+187978.247598     8246524.147960
+187982.161584     8246553.008024
+187982.432762     8246574.925332
+187982.078436     8246596.833038
+187981.703863     8246619.992690
+187980.219633     8246634.369897
+187975.586876     8246649.951028
+187974.576678     8246673.726859
+187970.458443     8246696.203106
+187969.508608     8246716.223096
+187962.312711     8246735.521649
+187948.264745     8246752.836443
+187936.124040     8246768.302321
+187924.669960     8246780.022354
+187913.821140     8246793.003551
+187901.105550     8246805.330155
+187885.786329     8246823.877691
+187864.785435     8246845.468458
+187848.941565     8246857.747041
+187830.554422     8246872.491095
+187808.413502     8246887.177144
+187791.308117     8246900.062681
+187777.391757     8246909.240404
+187765.393166     8246915.943053
+187752.132679     8246923.252650
+187731.950020     8246932.960117
+187722.413327     8246942.205070
+187722.048875     8246964.738940
+187726.780714     8246981.715698
+187745.246684     8247000.781860
+187763.147509     8247016.082960
+187780.967728     8247036.391465
+187795.781151     8247049.140659
+187813.732599     8247061.311705
+187837.940983     8247073.579181
+187864.712506     8247082.129235
+187892.049169     8247094.444732
+187915.560807     8247111.083836
+187930.999734     8247123.842632
+187944.026993     8247130.929827
+187961.545282     8247131.198745
+187991.577072     8247131.659754
+188023.011722     8247122.750950
+188043.789903     8247114.930436
+188060.804167     8247107.678844
+188076.607546     8247097.903769
+188095.559447     8247086.925153
+188127.166200     8247067.375387
+188152.475896     8247050.233468
+188172.719300     8247036.770165
+188194.224595     8247022.700296
+188213.801999     8247011.731281
+188242.108370     8247002.774456
+188266.650836     8246994.385789
+188283.725464     8246983.378355
+188297.753563     8246967.315512
+188313.144032     8246944.386365
+188329.765258     8246922.728367
+188347.001867     8246901.705752
+188369.173162     8246885.141594
+188393.100247     8246876.117544
+188417.571841     8246872.110876
+188445.716236     8246873.168850
+188479.369440     8246881.824542
+188514.961420     8246886.753609
+188539.866173     8246894.649070
+188558.575112     8246898.692651
+188577.808312     8246909.005562
+188596.416015     8246919.308488
+188614.327348     8246933.983430
+188629.100275     8246949.236515
+188640.531565     8246977.586038
+188653.225517     8247005.328624
+188665.495667     8247020.543289
+188675.252920     8247036.345317
+188688.118204     8247053.447311
+188701.517882     8247076.192088
+188722.395514     8247100.930232
+188746.462171     8247121.960562
+188770.670555     8247134.228038
+188789.924009     8247143.288621
+188813.577756     8247151.164877
+188838.472388     8247159.686119
+188873.438101     8247164.605573
+188903.317273     8247174.455587
+188929.453548     8247183.622209
+188959.989363     8247191.603727
+188991.160796     8247198.969449
+189019.920568     8247200.663188
+189044.250441     8247205.418992
+189063.574756     8247210.098339
+189079.841658     8247210.348047
+189092.344649     8247211.166296
+189106.108774     8247211.377585
+189127.371107     8247212.329914
+189147.311567     8247217.644656
+189163.477233     8247224.153710
+189177.866861     8247224.374600
+189198.503685     8247225.317709
+189217.202502     8247229.987073
+189240.805631     8247240.993002
+189256.890309     8247252.509454
+189271.693605     8247265.884812
+189285.820023     8247282.379846
+189298.100300     8247296.968347
+189315.961010     8247314.773344
+189335.052483     8247333.849108
+189364.709706     8247357.469387
+189398.130826     8247380.521889
+189427.313629     8247394.743919
+189457.122705     8247408.975181
+189490.160527     8247416.995489
+189522.563488     8247425.631990
+189556.135699     8247439.295463
+189586.661386     8247447.903146
+189617.812577     8247456.520430
+189650.790424     8247468.296205
+189683.071137     8247484.443983
+189718.460645     8247501.891740
+189756.483772     8247511.240833
+189778.219754     8247521.591781
+189799.955731     8247531.943110
+189824.779496     8247544.845970
+189846.505358     8247555.822699
+189864.538169     8247562.986734
+189879.411574     8247571.980080
+189893.670354     8247580.338436
+189906.051868     8247588.667593
+189918.403011     8247598.874477
+189928.826258     8247612.182598
+189942.348184     8247627.416096
+189956.474596     8247643.911513
+189976.202463     8247662.370726
+189998.482956     8247677.739057
+190008.300953     8247689.785249
+190024.677816     8247721.967458
+190034.756864     8247756.557121
+190043.777256     8247779.234673
+190051.516267     8247803.771131
+190058.104749     8247822.028646
+190063.391601     8247843.397011
+190073.017249     8247867.336110
+190089.958111     8247903.283364
+190113.923532     8247930.573038
+190131.693133     8247954.011215
+190147.040945     8247972.403574
+190165.314571     8248003.362262
+190188.644362     8248031.268498
+190220.137597     8248057.421473
+190247.302158     8248080.377933
+190268.280269     8248098.856339
+190281.761698     8248116.593728
+190290.944066     8248129.256481
+190302.023185     8248140.696477
+190319.319143     8248154.735654
+190335.353197     8248169.382160
+190353.305027     8248181.553212
+190381.115340     8248203.267328
+190406.311519     8248231.828152
+190430.104838     8248269.758788
+190454.130998     8248293.293008
+190481.951438     8248314.380961
+190504.756204     8248336.017857
+190523.181677     8248357.587909
+190535.279732     8248383.443155
+190545.592379     8248403.636796
+190553.482492     8248418.783460
+190561.363235     8248434.556682
+190575.368162     8248458.563388
+190595.498813     8248490.802838
+190615.740821     8248516.157162
+190625.599309     8248525.699845
+190641.663739     8248538.468243
+190657.102666     8248551.227039
+190676.285254     8248564.669239
+190697.940243     8248580.027969
+190722.087887     8248596.050899
+190745.004004     8248610.803050
+190762.895089     8248626.729938
+190781.976442     8248646.431483
+190800.513272     8248661.116409
+190816.629084     8248670.755146
+190833.964774     8248682.290420
+190856.285763     8248695.154861
+190874.822594     8248709.839787
+190889.595520     8248725.092872
+190904.953466     8248742.858685
+190922.117812     8248765.035315
+190943.631069     8248789.157280
+190969.009477     8248806.450977
+190988.837811     8248818.651216
+191001.188955     8248828.858100
+191017.233893     8248842.878837
+191033.923826     8248855.656836
+191048.162365     8248865.266756
+191062.944661     8248879.893283
+191089.514088     8248900.962414
+191118.666522     8248917.062171
+191140.402504     8248927.413119
+191156.528437     8248936.426074
+191172.704224     8248942.309346
+191192.633805     8248948.249476
+191214.400151     8248956.723079
+191239.284656     8248965.870485
+191257.297231     8248974.285700
+191279.638463     8248985.898577
+191295.763631     8248994.911521
+191316.137251     8249012.128391
+191342.757296     8249030.067850
+191364.503400     8249039.793016
+191376.874786     8249048.748336
+191389.871687     8249057.712495
+191407.864008     8249067.380038
+191418.983624     8249076.316143
+191430.770004     8249082.757971
+191445.755523     8249084.866584
+191459.489285     8249086.955218
+191482.578261     8249091.066801
+191495.706761     8249091.894269
+191511.338038     8249092.760158
+191533.831123     8249094.984017
+191546.959624     8249095.811486
+191563.155665     8249100.442430
+191578.797063     8249100.682537
+191598.172754     8249102.232605
+191611.876139     8249106.199348
+191631.876581     8249107.758243
+191646.831737     8249111.744202
+191661.110760     8249118.850995
+191679.708342     8249129.779703
+191695.843632     8249138.166865
+191713.856207     8249146.582080
+191723.745059     8249154.247418
+191739.860107     8249163.886144
+191756.631797     8249171.656374
+191768.982941     8249181.863258
+191785.108109     8249190.876201
+191795.592101     8249200.428486
+191824.704802     8249219.032146
+191852.545490     8249238.868153
+191871.697702     8249254.188463
+191883.362604     8249268.141199
+191891.969322     8249277.664666
+191906.136988     8249291.656585
+191921.575915     8249304.415381
+191938.841496     8249320.332667
+191951.223016     8249328.661442
+191969.143701     8249342.710972
+191984.592761     8249354.843223
+191995.077516     8249364.395519
+192008.689787     8249373.995825
+192024.179332     8249383.624948
+192038.992755     8249396.374142
+192056.238083     8249413.543755
+192077.933568     8249426.398594
+192105.289722     8249437.461752
+192122.676782     8249445.868130
+192143.756886     8249458.087585
+192166.693257     8249471.587408
+192192.789047     8249483.257156
+192220.145189     8249494.321079
+192248.713380     8249507.907355
+192267.351446     8249516.332936
+192284.243851     8249516.592247
+192296.746848     8249517.410114
+192320.471461     8249520.904752
+192343.600183     8249522.511668
+192362.359739     8249523.425578
+192378.001137     8249523.665684
+192393.037275     8249522.644626
+192413.189570     8249514.814503
+192432.040229     8249510.095614
+192453.393677     8249505.414379
+192470.377196     8249500.040127
+192489.288594     8249491.565783
+192501.913082     8249484.871978
+192515.143570     8249479.440878
+192529.120300     8249466.506931
+192558.335626     8249440.034001
+192577.933279     8249427.813041
+192598.843440     8249411.855843
+192615.999068     8249395.840246
+192632.459071     8249384.197822
+192655.820640     8249371.407940
+192674.106535     8249362.923995
+192689.859302     8249356.278211
+192716.268145     8249348.544895
+192750.185329     8249340.926073
+192772.204764     8249333.751314
+192790.460296     8249327.144714
+192811.864362     8249319.333807
+192840.180853     8249309.751200
+192869.051988     8249304.559431
+192894.804964     8249298.693858
+192921.153067     8249294.715997
+192947.431075     8249295.119382
+192974.333821     8249295.532358
+192996.766943     8249301.510920
+193016.676258     8249308.704142
+193037.887973     8249312.786143
+193055.961288     8249317.445905
+193076.587221     8249319.015165
+193102.844986     8249320.670115
+193125.933210     8249324.780921
+193150.333944     8249325.155490
+193170.293889     8249329.218275
+193190.930707     8249330.161766
+193219.014364     8249334.975194
+193250.760688     8249345.479807
+193276.956938     8249350.890963
+193296.958144     8249352.449869
+193316.918089     8249356.512655
+193345.647491     8249360.084121
+193369.402467     8249361.701414
+193386.860400     8249365.725792
+193403.117180     8249366.601282
+193422.451622     8249370.654466
+193443.653204     8249375.363013
+193461.736639     8249379.396993
+193482.927336     8249384.731309
+193495.894626     8249395.573588
+193510.757903     8249405.193098
+193526.904090     8249412.953726
+193544.936132     8249420.118131
+193566.097229     8249427.329804
+193591.062728     8249431.469429
+193614.080844     8249439.962247
+193629.025115     8249444.573975
+193645.221920     8249449.204931
+193663.264095     8249455.742790
+193679.460887     8249460.374510
+193695.021304     8249465.621633
+193714.981237     8249469.685183
+193733.044431     8249474.970726
+193749.876096     8249478.985490
+193764.256355     8249479.832939
+193779.252007     8249481.315007
+193793.621393     8249482.787461
+193812.965956     8249486.214863
+193832.926653     8249490.278424
+193854.824610     8249490.614573
+193871.717015     8249490.873883
+193886.743043     8249490.477842
+193901.779180     8249489.456783
+193927.451163     8249488.598992
+193943.092561     8249488.839099
+193964.990518     8249489.175248
+193981.812063     8249493.815794
+193997.937995     8249502.828749
+194016.525456     8249514.383239
+194028.290817     8249522.077383
+194042.509113     8249532.938865
+194055.465506     8249544.407679
+194068.462395     8249553.372601
+194082.761684     8249559.226303
+194098.947592     8249564.483792
+194114.528251     8249568.479353
+194131.370802     8249571.868347
+194147.587085     8249575.247728
+194170.725928     8249576.228862
+194196.367535     8249577.249180
+194216.953747     8249581.321579
+194238.841583     8249582.283510
+194260.668680     8249587.000895
+194277.500334     8249591.016423
+194299.286934     8249598.237699
+194318.510783     8249609.176020
+194339.005117     8249618.881971
+194356.412431     8249626.036021
+194370.055066     8249633.758982
+194388.672890     8249643.436127
+194402.265683     8249654.288008
+194415.837457     8249666.392205
+194429.348492     8249682.251855
+194446.664692     8249695.039469
+194460.903230     8249704.649388
+194478.350278     8249709.299536
+194500.732006     8249718.408522
+194520.046957     8249723.714045
+194536.817884     8249731.484263
+194551.762906     8249736.096768
+194573.509010     8249745.821934
+194590.290821     8249752.966382
+194607.132608     8249756.355365
+194629.503451     8249766.090121
+194643.843225     8249769.440696
+194666.992189     8249769.796049
+194687.639140     8249770.112994
+194710.788104     8249770.468347
+194728.306775     8249770.737271
+194745.300416     8249764.737236
+194769.197137     8249757.590531
+194781.186752     8249751.513681
+194793.790972     8249746.072967
+194809.624721     8249734.420166
+194826.709476     8249722.786568
+194842.502728     8249713.637658
+194856.509821     8249698.826366
+194866.733520     8249685.835573
+194878.822843     8249673.499355
+194888.460771     8249657.995057
+194899.258591     8249648.143526
+194905.103004     8249635.085507
+194911.643028     8249617.655079
+194912.510736     8249602.642089
+194915.912347     8249585.790186
+194920.061716     8249561.436223
+194924.785206     8249540.221524
+194931.870504     8249527.808490
+194939.610904     8249513.527702
+194951.085622     8249500.555349
+194960.077028     8249486.293765
+194973.398643     8249475.228337
+194984.277457     8249460.369025
+194998.355410     8249441.176498
+195009.325326     8249420.684387
+195017.000000     8249411.761649
+END
+LINE3D
+HEIGHT 1020.000000
+195017.000000     8252107.484824
+194980.547385     8252128.707267
+194955.278180     8252143.345677
+194938.868795     8252151.858428
+194921.794161     8252162.866244
+194904.679042     8252176.377187
+194881.164092     8252198.556062
+194857.660803     8252220.108416
+194839.274436     8252234.851718
+194824.085670     8252245.262546
+194802.611507     8252257.454700
+194766.009330     8252276.301464
+194734.988354     8252298.364353
+194709.082760     8252313.618931
+194696.387413     8252324.693972
+194688.707751     8252335.219306
+194673.520511     8252345.630158
+194648.886179     8252359.651612
+194628.663023     8252371.862970
+194612.263747     8252379.750703
+194597.763525     8252386.414951
+194563.119602     8252400.283515
+194515.305930     8252415.827725
+194490.148094     8252423.580245
+194469.349289     8252432.652317
+194447.966229     8252439.211672
+194431.566965     8252447.098641
+194400.738328     8252457.269386
+194367.396041     8252468.026718
+194340.340677     8252477.002747
+194327.181801     8252478.053388
+194305.212983     8252482.098474
+194288.895464     8252484.978438
+194264.988622     8252492.750926
+194247.924121     8252503.132196
+194232.827233     8252507.909473
+194216.448974     8252514.544891
+194192.602884     8252518.561160
+194169.342563     8252525.090933
+194140.481549     8252529.656921
+194114.708331     8252536.774057
+194093.294144     8252545.210745
+194076.390855     8252545.577205
+194056.360037     8252545.896419
+194042.595912     8252545.685130
+194023.907228     8252540.389221
+194010.223333     8252535.170139
+193992.806661     8252528.641882
+193976.640232     8252522.132817
+193960.545427     8252511.242529
+193948.748926     8252505.426482
+193931.382872     8252495.768553
+193919.566117     8252491.204834
+193903.471323     8252480.313781
+193879.273061     8252467.420524
+193851.987004     8252451.976118
+193827.657142     8252447.219550
+193807.091936     8252441.895599
+193795.285314     8252436.705334
+193782.853189     8252431.505468
+193767.999269     8252421.260165
+193751.309336     8252408.482165
+193725.880310     8252394.318140
+193704.144327     8252383.967192
+193688.685158     8252372.459960
+193668.139443     8252365.883670
+193636.302004     8252361.012620
+193616.341307     8252356.949058
+193601.951679     8252356.728167
+193588.782682     8252358.404589
+193574.372047     8252359.435250
+193561.182808     8252362.363235
+193545.521155     8252363.375456
+193518.445549     8252373.603049
+193494.387617     8252390.764565
+193470.318800     8252408.551851
+193444.424104     8252423.179895
+193408.558786     8252435.151134
+193380.262537     8252443.482178
+193359.464496     8252452.554262
+193344.932371     8252461.096595
+193320.319045     8252473.866497
+193306.423308     8252481.792662
+193286.240649     8252491.500129
+193265.451966     8252499.946419
+193249.023089     8252509.711510
+193225.681011     8252521.249053
+193213.591688     8252533.585271
+193206.536766     8252544.120195
+193201.299130     8252558.440166
+193196.070863     8252572.133580
+193190.156342     8252589.573610
+193183.000948     8252606.367891
+193177.076305     8252624.433703
+193175.592452     8252638.811297
+193170.232574     8252660.642165
+193163.722925     8252676.194484
+193155.286149     8252694.847670
+193148.786633     8252709.773444
+193146.524659     8252733.530442
+193146.301945     8252747.300694
+193150.841804     8252776.171130
+193153.767612     8252788.737841
+193164.897361     8252797.047400
+193177.874772     8252807.263897
+193190.912158     8252813.724929
+193207.693193     8252820.870130
+193220.771076     8252824.827271
+193242.507058     8252835.178219
+193254.303559     8252840.994265
+193266.755939     8252844.941804
+193280.409470     8252852.038231
+193291.508844     8252862.225899
+193302.527988     8252877.421361
+193309.177203     8252891.923804
+193309.428139     8252915.092675
+193308.559667     8252930.105654
+193304.573037     8252944.444829
+193296.165873     8252961.219894
+193287.718976     8252980.498861
+193276.758405     8253000.365943
+193270.924877     8253012.798192
+193265.112368     8253023.978125
+193259.863846     8253038.923867
+193250.124682     8253060.687509
+193240.426015     8253079.947261
+193235.177494     8253094.893002
+193225.559807     8253109.145737
+193213.954267     8253130.254028
+193204.306205     8253146.384872
+193195.141926     8253171.287789
+193190.499430     8253187.494707
+193185.250909     8253202.440448
+193175.653477     8253215.440855
+193162.180785     8253235.894547
+193145.650660     8253251.919746
+193129.746052     8253267.953783
+193116.353577     8253283.400446
+193107.997794     8253297.045851
+193097.209331     8253306.271588
+193085.715136     8253320.495517
+193072.979303     8253334.073685
+193054.541542     8253351.947412
+193040.554704     8253365.506375
+193029.090120     8253377.852183
+193015.819887     8253385.787950
+193003.144794     8253395.610664
+192991.670089     8253408.582253
+192979.045601     8253415.276059
+192966.380629     8253424.472990
+192957.398579     8253438.108781
+192946.610880     8253447.334531
+192952.019222     8253461.191224
+192965.046475     8253468.278801
+192980.001631     8253472.264760
+192998.014206     8253480.679975
+193023.493838     8253491.715092
+193053.796806     8253514.093410
+193077.247324     8253534.487962
+193101.706643     8253569.924309
+193125.066797     8253595.953200
+193141.746609     8253609.356982
+193157.215911     8253620.237669
+193177.579397     8253638.081085
+193197.942132     8253655.923725
+193216.235994     8253685.631231
+193228.465660     8253703.349023
+193240.796549     8253714.808234
+193253.753705     8253726.277059
+193270.474013     8253737.176950
+193296.396932     8253759.488030
+193314.822405     8253781.058083
+193328.888847     8253801.308583
+193336.789833     8253815.830241
+193348.464092     8253829.157184
+193359.533853     8253841.222973
+193376.142805     8253859.007990
+193397.172291     8253874.357117
+193415.103873     8253887.780114
+193426.143259     8253901.724012
+193438.413409     8253916.938677
+193446.344006     8253929.582215
+193459.178921     8253948.561936
+193472.024732     8253966.915123
+193488.623551     8253985.326686
+193503.890369     8254008.726826
+193516.715162     8254028.332329
+193527.582452     8254052.916807
+193539.690628     8254078.146271
+193553.029567     8254104.646502
+193568.154665     8254136.809114
+193582.109738     8254163.945504
+193597.809722     8254199.247390
+193616.113717     8254228.328351
+193645.002940     8254260.702251
+193670.048030     8254298.652104
+193690.248777     8254326.510306
+193703.760576     8254342.369969
+193719.723770     8254361.397711
+193735.788200     8254374.166109
+193764.829277     8254397.150993
+193773.426625     8254407.301017
+193788.067953     8254430.690792
+193792.042296     8254455.795396
+193804.150471     8254481.024859
+193810.133699     8254498.020827
+193809.910972     8254511.791844
+193809.597144     8254531.195660
+193803.622647     8254552.391156
+193796.527229     8254565.429970
+193789.402198     8254580.346906
+193781.651664     8254595.254240
+193767.018316     8254610.055153
+193751.739198     8254626.099556
+193734.522844     8254645.869843
+193719.919859     8254658.793412
+193707.779918     8254674.259302
+193703.167021     8254688.588863
+193694.861857     8254699.104596
+193682.832509     8254707.685348
+193668.804410     8254723.748190
+193647.965872     8254735.324165
+193619.679744     8254743.029427
+193597.650187     8254750.829967
+193579.313662     8254762.444349
+193558.494615     8254772.767985
+193544.598879     8254780.694149
+193533.164670     8254791.161848
+193520.469323     8254802.236889
+193501.537658     8254811.964324
+193485.754539     8254820.486689
+193473.180669     8254824.050822
+193453.714628     8254828.134328
+193427.376658     8254831.485644
+193412.289878     8254835.637903
+193399.695791     8254840.452071
+193387.101679     8254845.267768
+193358.190047     8254852.963428
+193334.847982     8254864.500207
+193314.019565     8254875.450400
+193292.504130     8254890.147197
+193267.113459     8254912.295750
+193246.799176     8254930.141435
+193222.125111     8254946.666792
+193205.675980     8254957.684210
+193186.703831     8254969.914772
+193173.402483     8254979.727107
+193158.891377     8254987.017125
+193139.415202     8254991.727176
+193119.333003     8254995.176051
+193092.944415     8255001.657039
+193071.601076     8255005.713256
+193050.318513     8255006.011726
+193030.287695     8255006.330941
+193000.770064     8255012.763896
+192969.931305     8255023.560423
+192931.522702     8255037.997898
+192902.570586     8255048.196685
+192879.915514     8255055.988387
+192864.838892     8255059.512573
+192843.384209     8255070.453152
+192822.606410     8255078.273672
+192801.202344     8255086.084579
+192784.198595     8255092.709631
+192771.553865     8255100.654999
+192755.184964     8255106.664624
+192740.098973     8255110.815367
+192725.062836     8255111.836426
+192709.350553     8255115.979083
+192686.725856     8255121.892677
+192671.023731     8255125.407260
+192652.193302     8255128.875351
+192638.983057     8255133.054888
+192607.578782     8255140.085583
+192585.579589     8255146.008778
+192575.427502     8255154.619112
+192564.548701     8255169.477660
+192554.931015     8255183.730395
+192545.928723     8255198.617749
+192541.326723     8255212.320777
+192531.769764     8255222.818821
+192515.713314     8255248.241111
+192506.670513     8255265.633120
+192496.477941     8255276.746580
+192483.721867     8255291.576311
+192471.641888     8255303.287500
+192465.697016     8255322.604111
+192464.152411     8255340.737924
+192469.549881     8255355.219623
+192481.356503     8255360.409887
+192494.383755     8255367.497465
+192508.622293     8255377.107385
+192517.804661     8255389.770138
+192520.679851     8255405.466521
+192520.447004     8255419.863319
+192523.826219     8255443.080212
+192523.623747     8255455.598902
+192524.026537     8255469.378756
+192528.789134     8255484.477411
+192531.563088     8255506.433139
+192530.692450     8255560.264114
+192530.994004     8255580.303314
+192531.346176     8255597.212841
+192531.082953     8255613.487748
+192530.698252     8255637.273564
+192526.488908     8255665.382992
+192521.633819     8255694.734381
+192516.415661     8255707.802777
+192514.962183     8255720.302263
+192508.310814     8255744.617053
+192493.525612     8255768.806984
+192479.346411     8255794.259619
+192458.132529     8255828.995616
+192437.767653     8255849.969445
+192428.139858     8255864.847197
+192420.368306     8255881.006847
+192393.595017     8255911.273650
+192368.526117     8255952.211368
+192356.395546     8255967.050701
+192340.541543     8255979.955830
+192321.458024     8255999.072282
+192302.838810     8256028.212382
+192283.017680     8256054.203583
+192270.806879     8256074.050709
+192258.564938     8256095.775932
+192246.928258     8256118.762320
+192229.610644     8256144.793480
+192214.048085     8256178.362826
+192204.369673     8256196.370250
+192192.299828     8256207.454893
+192181.491887     8256217.932206
+192171.924818     8256229.055268
+192160.520961     8256237.646386
+192148.420766     8256250.607610
+192131.657794     8256281.029608
+192100.918117     8256324.384023
+192073.629931     8256347.755323
+192059.531723     8256368.200177
+192052.395807     8256383.742883
+192043.384146     8256399.256794
+192042.555407     8256411.765870
+192024.531321     8256442.793681
+192011.623368     8256467.013957
+191996.232905     8256489.942723
+191976.453023     8256513.430808
+191953.301906     8256551.892689
+191944.218620     8256571.787824
+191934.661686     8256582.284341
+191921.784108     8256604.626508
+191908.866047     8256629.471802
+191896.573488     8256654.326697
+191879.255898     8256680.356329
+191869.001836     8256695.224468
+191849.948693     8256712.462811
+191826.475780     8256732.137055
+191808.643268     8256751.272711
+191794.030926     8256764.822073
+191784.413240     8256779.074808
+191774.623458     8256803.968122
+191760.625722     8256818.153620
+191752.300315     8256829.920916
+191744.629998     8256839.821220
+191733.872675     8256847.168861
+191717.595640     8256847.545698
+191701.934000     8256848.557155
+191685.667099     8256848.307446
+191672.527713     8256848.105748
+191656.876206     8256848.490659
+191641.234808     8256848.250552
+191630.941001     8256865.623357
+191630.515815     8256891.912299
+191630.100739     8256917.576224
+191623.499988     8256938.761342
+191610.088010     8256955.461108
+191596.161922     8256965.263854
+191576.008863     8256973.093964
+191562.022024     8256986.652928
+191545.542518     8256999.548455
+191533.513182     8257008.128443
+191518.778574     8257029.190229
+191503.327385     8257055.873684
+191495.648687     8257091.413528
+END
+LINE3D
+HEIGHT 1080.000000
+183557.000000     8247520.567119
+183561.211203     8247524.915206
+183578.527564     8247537.703699
+183601.565616     8247544.945234
+183621.475436     8247552.139000
+183638.266926     8247558.658439
+183657.601475     8247562.712480
+183668.852931     8247563.511614
+183668.842846     8247564.137786
+183669.448365     8247565.399377
+183673.182116     8247566.708739
+183678.792720     8247568.047372
+183686.300537     8247568.162937
+183698.248239     8247564.590411
+183708.329167     8247560.362825
+183720.286954     8247556.164128
+183731.568652     8247555.085511
+183735.332639     8247554.517504
+183742.214773     8247554.623438
+183750.973765     8247554.758262
+183761.508995     8247561.181401
+183764.536408     8247567.488976
+183768.149177     8247576.310103
+183771.771841     8247584.505055
+183778.573326     8247589.618451
+183782.932754     8247590.937826
+183790.440380     8247591.053387
+183804.951306     8247583.763503
+183834.568211     8247571.071491
+183867.293374     8247559.679212
+183886.133295     8247555.586449
+183901.885312     8247548.941995
+183924.569874     8247539.273381
+183953.490717     8247530.953414
+183986.750640     8247525.204397
+184013.784354     8247517.481326
+184034.602137     8247507.158033
+184059.799320     8247496.902150
+184095.682760     8247483.680270
+184132.757267     8247474.233537
+184161.637598     8247468.417107
+184179.266670     8247461.801163
+184193.737078     8247457.015197
+184210.185347     8247445.998702
+184232.264384     8247435.068878
+184255.604872     8247423.532145
+184271.447622     8247411.254057
+184276.513191     8247407.575598
+184277.148959     8247406.959057
+184286.705010     8247396.462799
+184301.992646     8247379.793408
+184317.875724     8247365.011399
+184328.057464     8247354.524389
+184340.116057     8247344.066652
+184359.167687     8247326.828872
+184378.279795     8247305.835973
+184394.990180     8247278.544749
+184408.642903     8247246.824083
+184425.403502     8247216.403145
+184441.528525     8247186.598750
+184450.539738     8247171.085020
+184463.990646     8247151.883197
+184492.547921     8247127.278870
+184515.969057     8247110.734675
+184533.648345     8247100.989017
+184548.855518     8247089.327473
+184565.888958     8247080.824145
+184582.852020     8247076.702492
+184598.503225     8247076.317461
+184617.292740     8247075.354409
+184641.702937     8247075.104201
+184661.743818     8247074.160412
+184680.533333     8247073.197360
+184693.066397     8247072.138005
+184706.911122     8247067.342409
+184720.675389     8247067.554277
+184734.459629     8247066.514181
+184746.367195     8247065.445580
+184755.772034     8247064.338074
+184772.109222     8247060.206788
+184785.257884     8247059.783235
+184786.569742     8247056.046614
+184791.201172     8247040.465468
+184791.513687     8247021.061410
+184792.340995     8247008.552196
+184793.844391     8246992.922901
+184795.367760     8246976.041642
+184799.403941     8246958.573117
+184808.344394     8246947.441057
+184828.455845     8246942.115595
+184854.329117     8246928.739632
+184880.686743     8246924.136641
+184896.428681     8246918.117976
+184907.074801     8246917.655903
+184917.771334     8246914.063737
+184935.915002     8246914.343016
+184956.551127     8246915.286986
+184972.696967     8246923.048377
+184995.684606     8246933.420005
+185014.847583     8246948.115138
+185030.186273     8246967.134164
+185043.083096     8246982.359171
+185055.313725     8247000.078085
+185066.888236     8247019.665115
+185075.365147     8247037.326249
+185086.253676     8247060.659534
+185094.780992     8247075.190956
+185107.667355     8247091.041747
+185126.194755     8247106.353424
+185143.410304     8247125.401340
+185163.118506     8247145.113569
+185180.182837     8247173.550618
+185195.350145     8247203.210739
+185208.721242     8247227.834509
+185217.823645     8247245.505271
+185229.378375     8247266.344268
+185247.037956     8247296.668696
+185258.582601     8247318.133864
+185264.566857     8247335.130685
+185271.792402     8247352.772557
+185276.575698     8247366.620405
+185285.758749     8247379.283705
+185292.449153     8247391.282310
+185305.295570     8247409.637029
+185329.332577     8247432.546376
+185358.031823     8247437.997218
+185389.929488     8247439.114151
+185409.829230     8247446.933706
+185428.457448     8247455.985578
+185445.228965     8247463.756981
+185463.261545     8247470.921851
+185480.608154     8247481.832212
+185501.648365     8247496.556623
+185516.452296     8247509.932387
+185526.856089     8247524.492694
+185537.845812     8247541.566562
+185547.624113     8247556.117240
+185557.412493     8247570.042129
+185564.113357     8247581.414951
+185568.967223     8247590.881126
+185576.263331     8247604.141708
+185589.149694     8247619.992499
+185607.656936     8247636.555755
+185629.888029     8247655.054928
+185651.493254     8247673.544086
+185670.040818     8247687.603802
+185684.945179     8247694.720138
+185698.023462     8247698.678261
+185711.706699     8247703.897585
+185735.410947     8247708.645214
+185758.539344     8247710.253491
+185782.939653     8247710.629076
+185807.410532     8247706.622988
+185832.577472     8247698.244856
+185863.314499     8247693.709276
+185892.225454     8247686.015101
+185913.577804     8247681.335066
+185931.812396     8247675.980715
+185953.144583     8247672.552641
+185983.801343     8247673.024529
+186016.334961     8247673.525306
+186043.156973     8247678.946870
+186067.496797     8247683.077955
+186090.534461     8247690.319867
+186118.607839     8247695.760692
+186125.470000     8247697.118590
+186126.095492     8247697.128218
+186126.085414     8247697.754008
+186126.691124     8247699.015603
+186136.600480     8247705.429108
+186157.812079     8247709.512042
+186187.772395     8247714.355968
+186227.692472     8247722.483688
+186258.198014     8247732.344710
+186273.728249     8247739.470680
+186287.381619     8247746.568142
+186310.339023     8247758.817139
+186343.326751     8247769.968639
+186373.811747     8247781.081616
+186390.603428     8247787.601058
+186401.098336     8247796.527738
+186405.982445     8247804.116163
+186409.625647     8247811.059542
+186410.866553     8247811.704588
+186414.540004     8247816.769835
+186421.290892     8247825.012939
+186436.770715     8247835.269002
+186456.004643     8247845.582469
+186485.954880     8247851.052185
+186502.140844     8247856.310414
+186507.045116     8247862.646878
+186508.286404     8247863.291930
+186511.889285     8247872.738849
+186514.836050     8247884.053885
+186515.249833     8247897.208530
+186518.721278     8247914.792617
+186522.062050     8247940.513882
+186525.129784     8247944.317917
+186528.207604     8247947.495780
+186538.833567     8247948.285286
+186547.531884     8247952.175607
+186556.805662     8247959.205656
+186569.157266     8247969.413186
+186582.689667     8247984.021650
+186586.928119     8247992.852408
+186587.462878     8247998.495669
+186596.585445     8248014.914470
+186607.554622     8248033.240293
+186619.200085     8248048.445657
+186630.149098     8248068.023441
+186651.593020     8248096.527904
+186677.497188     8248120.091937
+186703.582811     8248132.389467
+186730.939582     8248143.454292
+186755.198758     8248152.592840
+186778.176319     8248163.590257
+186802.364537     8248177.110853
+186827.834752     8248188.772584
+186852.689172     8248199.798891
+186872.498186     8248213.251697
+186885.434955     8248225.972777
+186895.303984     8248234.890204
+186900.813972     8248242.487881
+186910.128078     8248247.014008
+186914.487506     8248248.333383
+186915.102920     8248248.968800
+186915.728794     8248248.978434
+186916.354286     8248248.988062
+186916.979779     8248248.997690
+186917.595568     8248249.633495
+186929.321298     8248259.831391
+186938.574919     8248268.113019
+186942.883941     8248272.562104
+186954.599967     8248283.386178
+186975.528906     8248304.995795
+187008.910643     8248330.553525
+187031.787398     8248347.809984
+187044.128911     8248358.644067
+187057.731881     8248368.870858
+187073.211710     8248379.126540
+187085.482659     8248394.341913
+187090.316368     8248405.059668
+187098.318616     8248413.322416
+187101.900958     8248424.020908
+187106.745127     8248434.112879
+187114.666721     8248447.383471
+187118.198657     8248461.211675
+187123.082771     8248468.799718
+187126.039609     8248479.489346
+187129.632411     8248489.562055
+187129.561848     8248493.943345
+187129.299727     8248510.218456
+187129.037618     8248526.492802
+187127.725767     8248530.229041
+187127.655203     8248534.610331
+187128.119386     8248544.635647
+187133.558811     8248556.614614
+187138.463083     8248562.951078
+187139.593468     8248570.482106
+187140.592804     8248586.149924
+187140.532319     8248589.905425
+187140.481913     8248593.035136
+187139.856039     8248593.025502
+187129.089318     8248600.999347
+187118.443198     8248601.461420
+187106.545711     8248601.904231
+187091.540538     8248601.047318
+187080.218137     8248604.629468
+187069.411101     8248615.106470
+187059.158600     8248629.975149
+187047.604708     8248647.954283
+187033.013325     8248660.251633
+187016.423731     8248680.031088
+186996.060632     8248701.005113
+186976.332722     8248721.362970
+186958.038027     8248730.472829
+186946.059885     8248735.923484
+186934.061586     8248742.625718
+186920.196889     8248748.673278
+186910.085527     8248754.778612
+186894.303262     8248763.301199
+186879.056150     8248777.466289
+186854.968818     8248796.504390
+186819.610243     8248815.995706
+186787.985228     8248836.796380
+186757.732561     8248850.104551
+186730.002402     8248862.199660
+186699.850548     8248869.248408
+186676.530217     8248879.533562
+186658.235522     8248888.643421
+186643.724411     8248895.932920
+186634.905125     8248899.553600
+186630.404552     8248906.997953
+186624.087616     8248910.657150
+186619.687867     8248911.841316
+186609.597045     8248916.695077
+186599.515932     8248920.922279
+186581.160740     8248933.788402
+186558.980897     8248950.977266
+186541.271367     8248962.600675
+186529.797748     8248975.571959
+186520.261855     8248984.816638
+186519.616192     8248986.059354
+186515.801990     8248989.757075
+186510.029893     8248998.433744
+186499.858428     8249008.294585
+186491.482786     8249023.192154
+186486.235763     8249038.137116
+186481.634377     8249051.840891
+186480.151533     8249066.217848
+186479.929739     8249079.989037
+186484.743277     8249091.959134
+186491.918422     8249112.730336
+186497.872436     8249131.604907
+186503.220733     8249149.218265
+186506.581663     8249173.687952
+186515.946644     8249213.901729
+186519.902818     8249240.259176
+186524.655871     8249255.984774
+186529.923909     8249278.605218
+186533.960355     8249299.954816
+186537.442267     8249316.912737
+186544.122585     8249329.537514
+186553.901262     8249344.088580
+186577.433746     8249359.477298
+186595.426005     8249369.145708
+186610.905834     8249379.401389
+186634.458869     8249393.537770
+186656.174979     8249405.142097
+186681.705303     8249413.047940
+186714.743432     8249421.070111
+186743.382206     8249430.275689
+186767.701478     8249435.659112
+186796.380567     8249442.361532
+186833.778130     8249451.702696
+186865.504420     8249463.460342
+186887.331420     8249468.179457
+186912.932308     8249471.704009
+186947.272221     8249476.614966
+186985.366222     8249481.584473
+187020.271143     8249490.260560
+187052.078457     8249497.011132
+187088.900551     8249503.212950
+187116.368601     8249507.392187
+187143.836269     8249511.571418
+187168.236578     8249511.947003
+187190.749555     8249512.920245
+187216.401231     8249513.315092
+187237.047441     8249513.632891
+187258.410258     8249508.326690
+187279.692039     8249508.028328
+187299.712756     8249508.336499
+187322.175340     8249512.438689
+187349.613141     8249518.496058
+187374.578458     8249522.636772
+187397.081369     8249524.235040
+187419.604819     8249524.581734
+187453.480155     8249519.468135
+187486.154901     8249511.206332
+187511.967885     8249501.585490
+187532.795549     8249490.636787
+187546.075082     8249482.075677
+187558.698873     8249475.383071
+187582.654775     8249464.481755
+187614.855258     8249446.820426
+187647.691312     8249428.542935
+187679.820838     8249415.263654
+187701.879711     8249405.585792
+187701.889790     8249404.960002
+187712.031018     8249396.976530
+187732.323923     8249380.384565
+187753.242333     8249363.801465
+187771.032887     8249347.170983
+187790.730167     8249328.691252
+187812.264359     8249312.744339
+187832.456083     8249302.411027
+187845.685591     8249296.979634
+187855.241642     8249286.483375
+187867.320214     8249274.773292
+187876.835938     8249266.780955
+187881.296184     8249261.840525
+187882.547551     8249261.859787
+187883.183122     8249261.243625
+187886.381923     8249256.909722
+187891.468031     8249251.979690
+187892.154008     8249248.233817
+187901.629417     8249242.744639
+187911.084668     8249238.507039
+187912.336034     8249238.526301
+187912.961527     8249238.535929
+187917.331027     8249239.229896
+187924.142406     8249243.717117
+187933.406112     8249251.372573
+187940.853432     8249255.244403
+187953.245363     8249262.948011
+187975.011879     8249271.422627
+187991.833808     8249276.063937
+188005.527511     8249280.657095
+188010.522504     8249281.360690
+188011.844447     8249276.997898
+188015.688897     8249271.422044
+188015.698976     8249270.796254
+188015.769540     8249266.414964
+188015.910679     8249257.651620
+188015.920758     8249257.025830
+188003.669966     8249240.558878
+187993.861422     8249227.885950
+187993.296045     8249224.120051
+187988.401852     8249217.157797
+187987.867093     8249211.514536
+187987.422673     8249200.238400
+187986.938320     8249191.465427
+187987.018975     8249186.457583
+187987.220599     8249173.938738
+187987.916654     8249169.567076
+187994.879633     8249164.665169
+188008.189402     8249154.226690
+188024.022073     8249142.574392
+188041.691276     8249133.454906
+188063.104499     8249125.018994
+188090.118050     8249118.547884
+188112.166845     8249109.495811
+188129.916689     8249095.369245
+188143.943078     8249079.306003
+188158.554619     8249065.757074
+188176.244361     8249055.386015
+188192.046796     8249045.611085
+188207.768564     8249040.844763
+188224.751408     8249035.471144
+188242.360508     8249030.107164
+188260.574930     8249026.005155
+188278.818837     8249020.025002
+188298.981076     8249011.569834
+188325.429237     8249001.333590
+188355.601644     8248993.032505
+188379.577321     8248980.879604
+188400.465864     8248966.174642
+188418.155606     8248955.803583
+188431.990067     8248951.633390
+188448.397825     8248943.120432
+188467.933795     8248934.656388
+188487.450384     8248927.443172
+188500.659341     8248923.264116
+188508.862844     8248919.007248
+188513.262975     8248917.823089
+188522.708135     8248914.212043
+188534.060021     8248908.751748
+188543.454775     8248908.270413
+188556.038251     8248904.080965
+188561.669209     8248904.167640
+188562.920958     8248904.186908
+188567.310246     8248903.628526
+188567.935739     8248903.638154
+188572.315712     8248903.705573
+188578.511678     8248907.557377
+188590.277340     8248915.252109
+188602.729756     8248919.200217
+188608.280060     8248924.294736
+188612.013620     8248925.604094
+188619.501661     8248926.971244
+188635.707782     8248930.977894
+188648.220683     8248931.170501
+188656.455186     8248925.036277
+188660.299637     8248919.460423
+188664.123930     8248915.136148
+188664.144087     8248913.884569
+188664.154166     8248913.258780
+188664.779658     8248913.268408
+188672.287857     8248913.383979
+188682.923517     8248913.547689
+188696.061910     8248913.749923
+188709.109570     8248919.585791
+188722.723001     8248929.186799
+188736.971252     8248938.170870
+188749.343013     8248947.126820
+188761.785338     8248951.701481
+188771.675300     8248959.366577
+188779.092001     8248965.115769
+188788.365786     8248972.145436
+188798.880477     8248979.820149
+188810.707388     8248983.759392
+188818.205508     8248984.500752
+188830.728488     8248984.067569
+188842.705866     8248978.616902
+188856.490684     8248977.576433
+188865.875360     8248977.720888
+188877.762768     8248977.903866
+188894.019295     8248978.780805
+188908.903881     8248987.148726
+188925.715337     8248992.416584
+188940.044993     8248996.393587
+188953.788721     8248997.857028
+188966.231046     8249002.431688
+188972.477418     8249003.153781
+188973.092831     8249003.789198
+188973.718323     8249003.798826
+188974.970072     8249003.818094
+188978.098297     8249003.866246
+188978.723789     8249003.875874
+188982.467428     8249004.559442
+188985.535156     8249008.363859
+188990.480137     8249012.196407
+188995.424354     8249016.028943
+189002.922474     8249016.770304
+189009.178925     8249016.866607
+189020.500562     8249013.284444
+189031.772557     8249012.832005
+189036.788101     8249012.283263
+189038.039086     8249012.302519
+189041.792803     8249012.360299
+189045.496115     8249015.547789
+189046.112292     8249016.183219
+189049.230438     8249016.857160
+189065.941082     8249028.384440
+189088.312933     8249038.120263
+189097.647202     8249041.394429
+189098.878793     8249042.665275
+189101.996940     8249043.339217
+189105.700251     8249046.526707
+189110.634377     8249050.985797
+189111.260633     8249050.995437
+189118.697505     8249055.492286
+189119.948489     8249055.511542
+189121.200238     8249055.530810
+189121.825730     8249055.540438
+189123.056557     8249056.811273
+189126.174691     8249057.485978
+189126.164612     8249058.111767
+189126.730384     8249061.876908
+189129.858609     8249061.925059
+189130.463944     8249063.186266
+189131.039030     8249066.325605
+189135.357743     8249070.149278
+189135.963841     8249071.410496
+189136.528849     8249075.175625
+189136.518770     8249075.801415
+189136.508679     8249076.427968
+189136.438115     8249080.809259
+189136.206243     8249095.206236
+189136.145758     8249098.961737
+189135.510187     8249099.577899
+189130.898341     8249113.907457
+189125.712184     8249125.096924
+189124.450357     8249125.703446
+189120.615985     8249130.653510
+189116.125885     8249137.471315
+189110.959122     8249147.409191
+189110.878468     8249152.417035
+189106.428694     8249156.730918
+189099.990777     8249167.901881
+189086.084989     8249176.453352
+189081.645295     8249180.141445
+189077.214915     8249183.203737
+189075.943773     8249184.436060
+189075.933682     8249185.062614
+189075.923603     8249185.688403
+189075.913524     8249186.314193
+189075.903446     8249186.939982
+189077.134261     8249188.211581
+189077.760517     8249188.221221
+189078.386009     8249188.230849
+189079.011501     8249188.240477
+189078.386009     8249188.230849
+189077.124182     8249188.837371
+189075.863118     8249189.443904
+189072.018668     8249195.019758
+189071.312533     8249200.017210
+189070.050694     8249200.624496
+189069.334481     8249206.247737
+189068.618255     8249211.871742
+189068.527522     8249217.505375
+189072.220754     8249221.318656
+189078.416720     8249225.170460
+189078.981715     8249228.936352
+189083.361689     8249229.003772
+189088.366391     8249229.080807
+189097.730909     8249230.476841
+189110.243809     8249230.669447
+189119.083647     8249225.796430
+189123.553578     8249220.230968
+189131.858657     8249209.714690
+189135.773671     8249199.757546
+189141.616332     8249186.699586
+189150.607388     8249172.437435
+189154.492154     8249164.358424
+189158.346683     8249158.156780
+189166.550950     8249153.899925
+189175.481509     8249143.394039
+189185.652973     8249133.533198
+189197.035108     8249126.194771
+189206.500425     8249121.332146
+189221.596714     8249116.555432
+189229.750562     8249115.429052
+189237.883489     8249115.554239
+189247.207680     8249119.454194
+189250.952082     8249120.137775
+189257.137969     8249124.615368
+189267.622411     8249134.168213
+189279.994173     8249143.124164
+189293.566513     8249155.229082
+189313.950995     8249171.821233
+189348.099364     8249188.625247
+189390.805279     8249218.083696
+189437.618228     8249264.508925
+189487.145601     8249297.828807
+189521.687601     8249329.038662
+189545.745147     8249350.696437
+189553.727620     8249360.210769
+189558.722243     8249360.913594
+189561.800062     8249364.091457
+189565.503374     8249367.278948
+189582.295436     8249373.798396
+189615.071074     8249398.094908
+189648.301592     8249433.041772
+189672.934224     8249457.838886
+189678.464370     8249464.184984
+189679.089862     8249464.194612
+189679.079784     8249464.820401
+189683.449678     8249465.513610
+189688.968982     8249472.485486
+189697.001861     8249478.870107
+189711.200457     8249490.984665
+189719.252730     8249496.117696
+189719.817737     8249499.882825
+189720.443993     8249499.892464
+189723.521812     8249503.070327
+189724.147305     8249503.079955
+189727.265451     8249503.753896
+189728.496266     8249505.025495
+189732.189499     8249508.838775
+189733.441247     8249508.858043
+189737.144558     8249512.045534
+189740.777306     8249519.614315
+189742.008885     8249520.885926
+189743.169148     8249526.538051
+189742.987682     8249537.805317
+189742.896948     8249543.438951
+189741.575400     8249547.800985
+189735.863788     8249552.722154
+189723.825161     8249561.928309
+189714.309437     8249569.920646
+189705.489757     8249573.542084
+189693.461222     8249582.121686
+189683.925328     8249591.366366
+189683.824516     8249597.625788
+189683.501910     8249617.656399
+189686.539402     8249623.338184
+189694.027443     8249624.705334
+189708.406742     8249625.552614
+189722.867447     8249621.392825
+189727.327311     8249616.452389
+189736.237712     8249607.198082
+189743.341437     8249593.533588
+189750.950447     8249587.389736
+189761.707089     8249580.041681
+189773.685219     8249574.591790
+189787.539837     8249569.170019
+189795.068206     8249568.033247
+189801.950148     8249568.139178
+189824.967649     8249576.633050
+189852.889803     8249591.463392
+189870.751395     8249609.268599
+189888.552491     8249630.830070
+189901.489259     8249643.551150
+189922.539562     8249657.649007
+189944.295999     8249666.749413
+189973.509465     8249679.095089
+189996.517650     8249688.214762
+190014.015095     8249689.735983
+190037.699179     8249695.735573
+190071.403509     8249701.263456
+190109.507219     8249705.606403
+190132.010130     8249707.204671
+190138.892072     8249707.310602
+190139.518328     8249707.320242
+190140.143821     8249707.329870
+190140.759234     8249707.965287
+190141.374635     8249708.601469
+190142.000128     8249708.611097
+190142.626384     8249708.620737
+190143.251876     8249708.630365
+190143.877368     8249708.639992
+190151.384803     8249708.755552
+190174.544219     8249708.485327
+190204.574722     8249708.947575
+190235.231482     8249709.419462
+190245.241650     8249709.573545
+190252.759927     8249709.063326
+190260.327847     8249705.423385
+190274.717988     8249705.644886
+190289.107366     8249705.866377
+190305.939755     8249709.881903
+190329.623075     8249715.881481
+190360.844842     8249720.118498
+190384.549083     8249724.866509
+190412.632546     8249729.681163
+190441.936745     8249736.393206
+190471.736140     8249751.252443
+190498.346837     8249769.818266
+190522.504431     8249785.216606
+190539.821173     8249798.005105
+190551.638006     8249802.570138
+190559.135362     8249803.311486
+190570.326715     8249807.866127
+190584.030115     8249811.833490
+190597.077775     8249817.669357
+190607.694029     8249819.085423
+190618.793885     8249829.273685
+190637.391860     8249840.203307
+190654.638027     8249857.373860
+190676.828423     8249878.376186
+190694.084680     8249894.920186
+190708.838193     8249911.426426
+190721.109155     8249926.641035
+190724.661248     8249939.217660
+190728.869070     8249949.926545
+190729.767976     8249971.853792
+190730.625791     8249996.284949
+190731.402964     8250025.723186
+190731.100528     8250044.501454
+190730.626716     8250073.920436
+190730.344438     8250091.447125
+190731.414719     8250102.733659
+190737.863178     8250129.754649
+190747.399521     8250159.328477
+190756.461603     8250179.502779
+190771.770045     8250200.399937
+190789.520746     8250225.090356
+190810.944499     8250254.847162
+190834.901232     8250282.764360
+190847.061291     8250304.864945
+190858.080504     8250320.060287
+190870.331284     8250336.528004
+190870.886976     8250340.918934
+190872.087555     8250344.067901
+190881.159715     8250363.616413
+190885.327222     8250376.828456
+190885.317131     8250377.455009
+190885.630873     8250396.868706
+190889.031748     8250418.834465
+190891.726489     8250445.797676
+190892.594383     8250469.603044
+190893.563852     8250487.149001
+190894.562807     8250502.816814
+190897.883040     8250529.789652
+190898.327065     8250541.066547
+190901.900092     8250552.390841
+190907.904513     8250568.135701
+190918.762417     8250593.346730
+190931.487471     8250619.213209
+190945.524770     8250641.342690
+190957.795731     8250656.557300
+190962.104365     8250661.006761
+190963.335956     8250662.277608
+190966.978783     8250669.220600
+190970.672003     8250673.034644
+190973.739744     8250676.838296
+190980.520874     8250683.203650
+190980.500717     8250684.455229
+190985.425528     8250689.540120
+190985.980457     8250693.931038
+190995.203836     8250704.090417
+191009.261292     8250724.968319
+191018.999272     8250742.022538
+191018.989181     8250742.649091
+191019.534031     8250747.665799
+191023.692211     8250761.504406
+191028.495289     8250774.100287
+191033.278973     8250787.947759
+191033.137834     8250796.711103
+191036.064435     8250809.278100
+191039.697183     8250816.846882
+191044.005817     8250821.296343
+191051.312391     8250833.930760
+191054.380132     8250837.734412
+191058.133849     8250837.792192
+191066.207056     8250841.672891
+191069.900288     8250845.486171
+191077.337147     8250849.983785
+191081.000144     8250855.674434
+191085.269214     8250862.627829
+191093.857022     8250873.403369
+191100.617995     8250881.020302
+191104.291058     8250886.085925
+191108.619862     8250889.283044
+191109.246118     8250889.292683
+191117.379045     8250889.417870
+191121.759018     8250889.485290
+191122.384511     8250889.494918
+191123.010003     8250889.504546
+191122.999924     8250890.130335
+191123.625417     8250890.139963
+191123.615338     8250890.765752
+191124.240830     8250890.775380
+191124.230739     8250891.401934
+191131.103367     8250892.133666
+191135.432170     8250895.330785
+191136.673076     8250895.975831
+191144.171196     8250896.717191
+191152.859804     8250901.234072
+191161.598066     8250902.620466
+191169.681351     8250905.875376
+191182.749180     8250910.458900
+191196.372690     8250919.434119
+191209.834139     8250938.424249
+191225.717666     8250962.460747
+191242.045996     8250997.773387
+191258.222343     8251042.475149
+191273.298924     8251077.768521
+191276.820769     8251092.223279
+191283.521245     8251103.596476
+191295.651067     8251127.574430
+191310.122313     8251161.606596
+191322.887707     8251184.968388
+191330.779446     8251200.116354
+191343.494421     8251226.608623
+191355.644401     8251249.334998
+191356.825586     8251253.735556
+191357.995916     8251258.762655
+191364.696404     8251270.135089
+191364.645998     8251273.264800
+191369.540561     8251280.227824
+191373.829050     8251285.928100
+191373.778644     8251289.057812
+191374.404136     8251289.067440
+191378.552237     8251303.531837
+191382.739901     8251315.492300
+191383.314988     8251318.631640
+191384.476003     8251324.284541
+191388.703994     8251333.741082
+191389.885179     8251338.141640
+191393.548163     8251343.833053
+191394.778990     8251345.103888
+191404.728674     8251349.013471
+191414.052852     8251352.914191
+191424.689276     8251353.077913
+191432.822203     8251353.203100
+191449.099676     8251352.826944
+191466.708000     8251347.463717
+191483.691607     8251342.090109
+191502.460958     8251342.379018
+191523.802854     8251338.324385
+191541.401863     8251333.586959
+191551.482607     8251329.358987
+191563.370015     8251329.541966
+191576.528566     8251328.492621
+191584.672335     8251327.992030
+191593.431519     8251328.126857
+191594.682503     8251328.146113
+191602.169781     8251329.513251
+191606.539675     8251330.206460
+191610.293393     8251330.264239
+191611.544378     8251330.283495
+191615.278689     8251331.593629
+191615.904181     8251331.603257
+191622.160632     8251331.699560
+191623.401537     8251332.344606
+191627.044364     8251339.287598
+191630.637548     8251349.360312
+191634.159393     8251363.815070
+191638.377306     8251373.897401
+191638.357136     8251375.149744
+191638.336979     8251376.401323
+191638.316822     8251377.652902
+191630.547265     8251393.812453
+191619.678981     8251408.044944
+191618.427997     8251408.025688
+191609.668813     8251407.890862
+191604.047934     8251407.178397
+191599.043232     8251407.101362
+191593.977282     8251410.779815
+191590.213485     8251411.347825
+191578.174859     8251420.553981
+191562.927353     8251434.719829
+191558.376767     8251445.293134
+191558.275955     8251451.552557
+191563.059627     8251465.400793
+191567.176728     8251481.742546
+191566.985183     8251493.635602
+191567.449378     8251503.660154
+191570.981314     8251517.488358
+191570.789769     8251529.381414
+191571.395855     8251530.643396
+191577.511178     8251539.502280
+191577.450681     8251543.258545
+191580.578906     8251543.306696
+191587.390286     8251547.793918
+191590.508432     8251548.467859
+191591.053270     8251553.485331
+191595.200619     8251567.948952
+191596.321307     8251576.105775
+191597.421073     8251585.514165
+191601.599423     8251598.100429
+191605.777009     8251610.686682
+191606.826369     8251623.224784
+191607.947057     8251631.381607
+191609.077072     8251638.911864
+191612.568680     8251655.243990
+191615.323894     8251678.452464
+191618.503751     8251714.188659
+191622.883423     8251753.073810
+191622.399521     8251783.119344
+191625.860881     8251801.329603
+191625.840723     8251802.581181
+191626.991660     8251808.859872
+191631.229730     8251817.690624
+191632.310103     8251828.350605
+191639.000500     8251840.349592
+191643.853984     8251849.815761
+191648.012164     8251863.654369
+191651.685239     8251868.719228
+191652.290561     8251869.981199
+191657.780392     8251878.830455
+191663.179478     8251893.314108
+191664.369978     8251897.088865
+191667.992635     8251905.284199
+191671.605976     8251914.105335
+191671.545492     8251917.860836
+191667.442116     8251929.328295
+191672.140748     8251919.747832
+191672.766240     8251919.757460
+191673.391732     8251919.767088
+191674.017225     8251919.776716
+191677.145450     8251919.824868
+191676.519958     8251919.815240
+191675.268973     8251919.795984
+191675.894465     8251919.805612
+END
+LINE3D
+HEIGHT 1090.000000
+183557.000000     8249326.432006
+183577.244018     8249327.070372
+183616.033895     8249327.667448
+183644.813605     8249328.110443
+183669.899891     8249324.740155
+183691.807546     8249324.451426
+183709.971384     8249323.478362
+183725.713322     8249317.459697
+183739.578401     8249311.412142
+183747.156590     8249307.146414
+183754.189942     8249297.863214
+183771.980318     8249281.231965
+183796.783684     8249256.569855
+183823.453818     8249232.563189
+183841.264351     8249214.680361
+183845.119071     8249208.478721
+183848.983680     8249201.651288
+183849.044177     8249197.895024
+183852.454668     8249180.417250
+183858.458638     8249157.343603
+183863.271523     8249130.495954
+183867.368195     8249109.271546
+183875.814019     8249089.992682
+183882.403154     8249069.432584
+183883.956957     8249050.673578
+183887.327133     8249035.698962
+183888.345974     8249011.297456
+183889.314420     8248990.024897
+183889.485808     8248979.383419
+183889.647105     8248969.368496
+183884.994672     8248947.383472
+183881.068926     8248919.148660
+183880.685194     8248904.116261
+183879.726172     8248885.945285
+183876.194058     8248872.116314
+183876.214215     8248870.864735
+183875.124337     8248860.830553
+183869.109838     8248845.711482
+183863.660537     8248834.357544
+183855.042493     8248825.459372
+183837.736211     8248812.045090
+183816.555052     8248806.084026
+183786.604618     8248800.614690
+183757.209494     8248799.536277
+183735.332088     8248797.946873
+183712.879392     8248793.218891
+183684.180337     8248787.768053
+183656.207764     8248776.068186
+183635.732942     8248765.108910
+183614.602189     8248756.018135
+183586.700192     8248739.936214
+183558.778026     8248725.106636
+183557.000000     8248724.288663
+END
+LINE3D
+HEIGHT 1090.000000
+183557.000000     8247743.984493
+183572.072541     8247744.216497
+183592.718942     8247744.534299
+183607.108701     8247744.755795
+183625.888137     8247744.418533
+183650.378983     8247739.160864
+183665.455107     8247735.636111
+183677.402809     8247732.063585
+183693.043935     8247732.304343
+183712.459133     8247731.350922
+183724.356430     8247730.908108
+183728.735830     8247730.975519
+183731.864055     8247731.023670
+183732.419169     8247735.414974
+183733.650378     8247736.685814
+183740.340966     8247748.684804
+183745.739867     8247763.168072
+183753.469928     8247788.330956
+183763.046796     8247815.400483
+183769.697057     8247829.903395
+183770.262255     8247833.668527
+183776.932495     8247846.919093
+183782.422314     8247855.769112
+183786.055056     8247863.338276
+183795.964602     8247869.751784
+183806.580481     8247871.167461
+183810.334389     8247871.225244
+183814.985984     8247854.392136
+183816.590192     8247832.503419
+183818.042992     8247820.003832
+183818.930790     8247803.738735
+183820.434187     8247788.109440
+183825.196672     8247764.391120
+183832.431648     8247742.589075
+183835.620357     8247738.881726
+183836.871724     8247738.900987
+183838.122899     8247738.920246
+183841.987705     8247732.092435
+183847.719284     8247725.919684
+183860.978837     8247718.610920
+183883.703721     8247706.438766
+183908.900904     8247696.182884
+183930.324015     8247687.121180
+183954.300265     8247674.968288
+183970.022040     8247670.201584
+183981.979827     8247666.002887
+183995.199059     8247661.197662
+184021.728066     8247645.953577
+184048.852705     8247632.596876
+184070.820851     8247628.552264
+184085.210610     8247628.773761
+184109.055615     8247624.758039
+184136.069357     8247618.286932
+184161.851896     8247610.544602
+184185.797713     8247600.269458
+184207.210745     8247591.833543
+184228.694341     8247579.016339
+184252.710918     8247564.359525
+184274.355817     8247541.527015
+184301.812943     8247507.514292
+184335.991091     8247483.622812
+184373.246874     8247462.908810
+184399.251200     8247441.395674
+184425.860856     8247421.144127
+184453.197197     8247394.642791
+184477.869509     8247378.117854
+184502.541821     8247361.592918
+184513.278675     8247355.497212
+184522.128395     8247349.998785
+184539.757276     8247343.382838
+184563.097758     8247331.846487
+184593.976115     8247318.547565
+184634.350037     8247298.507886
+184662.271550     8247274.519718
+184678.164706     8247259.111919
+184689.628055     8247246.766421
+184700.394961     8247238.792961
+184710.475889     8247234.565375
+184728.801018     8247223.577769
+184751.465416     8247215.161116
+184767.207354     8247209.142451
+184772.293278     8247204.212034
+184777.298361     8247204.289075
+184782.949292     8247203.123786
+184788.025137     8247198.819158
+184797.470297     8247195.208112
+184810.053767     8247191.019046
+184825.775542     8247186.252342
+184836.411393     8247186.416056
+184845.170385     8247186.550880
+184857.057793     8247186.733858
+184868.319328     8247186.907202
+184877.683840     8247188.303618
+184889.419839     8247197.875727
+184906.100629     8247211.280382
+184924.577622     8247229.721770
+184943.014295     8247250.666698
+184952.126777     8247267.711670
+184960.553090     8247288.502513
+184968.969319     8247309.919527
+184977.980995     8247333.223540
+184987.719160     8247350.278143
+185000.555308     8247369.258648
+185011.514597     8247388.210264
+185021.888142     8247404.648703
+185026.086273     8247415.983001
+185029.779888     8247419.796287
+185030.264241     8247428.569259
+185037.499864     8247445.585342
+185042.202512     8247464.440651
+185042.142027     8247468.196152
+185042.565895     8247480.724626
+185043.686207     8247488.881061
+185044.937574     8247488.900322
+185052.364742     8247494.023349
+185064.716340     8247504.231261
+185080.125599     8247518.868615
+185094.243165     8247535.990628
+185113.355736     8247553.815473
+185125.697255     8247564.649174
+185138.563836     8247581.751932
+185150.229081     8247595.705329
+185153.155682     8247608.272326
+185156.768642     8247617.093456
+185160.976852     8247627.801964
+185165.689585     8247646.031102
+185169.736492     8247666.754916
+185175.650185     8247688.133027
+185183.501221     8247705.784527
+185193.309765     8247718.457455
+185209.354978     8247732.478653
+185230.475462     8247742.195215
+185246.611407     8247750.582779
+185258.973090     8247760.164520
+185276.370099     8247767.945551
+185293.716702     8247778.856294
+185314.171366     8247791.067149
+185337.673614     8247808.333235
+185370.611318     8247822.614453
+185396.696559     8247834.911977
+185423.448383     8247844.715220
+185457.616915     8247860.267272
+185494.328119     8247873.354302
+185519.788249     8247885.642205
+185544.501535     8247905.431475
+185567.973534     8247924.575694
+185592.151674     8247938.722079
+185618.893413     8247949.151493
+185641.265263     8247958.887316
+185662.396214     8247967.977711
+185683.607425     8247972.061021
+185704.203229     8247975.508532
+185727.967967     8247976.500278
+185747.342647     8247978.050776
+185772.318042     8247981.565700
+185799.786092     8247985.744937
+185832.884712     8247990.011225
+185867.224625     8247994.922183
+185889.102038     8247996.511205
+185900.938658     8247999.823888
+185917.669848     8248010.099214
+185936.197253     8248025.410508
+185964.704960     8248042.754024
+185994.927847     8248070.141347
+186017.199268     8248086.136599
+186033.234020     8248100.783580
+186044.950046     8248111.607653
+186063.578258     8248120.659907
+186080.945025     8248130.318689
+186103.942749     8248140.064146
+186123.801788     8248150.387235
+186141.744023     8248163.185362
+186152.844254     8248173.374012
+186161.381656     8248187.279263
+186170.574786     8248199.316773
+186171.190199     8248199.952191
+186171.805989     8248200.587996
+186172.431481     8248200.597624
+186173.056973     8248200.607252
+186176.134792     8248203.785115
+186186.024366     8248211.450587
+186200.172181     8248226.694469
+186221.706830     8248249.565681
+186247.641241     8248271.251963
+186257.459869     8248283.298719
+186262.323814     8248292.139105
+186262.899282     8248295.278451
+186264.140570     8248295.923502
+186265.179839     8248309.088157
+186269.186431     8248332.315129
+186272.617937     8248352.402761
+186272.386064     8248366.799739
+186272.184440     8248379.318584
+186271.882004     8248398.096852
+186271.690459     8248409.989908
+186267.058837     8248425.571052
+186259.732937     8248453.006728
+186250.550730     8248479.161176
+186243.891031     8248504.102564
+186237.957637     8248522.794157
+186230.086899     8248545.212361
+186220.288897     8248570.731387
+186215.597160     8248590.068801
+186209.714172     8248605.630683
+186198.785785     8248623.618681
+186189.734626     8248641.636338
+186177.484297     8248663.987129
+186165.102907     8248694.475475
+186152.247243     8248715.565059
+186134.982133     8248738.464603
+186120.269385     8248758.273713
+186108.170656     8248771.235375
+186104.295587     8248778.688591
+186094.779851     8248786.681692
+186078.846368     8248804.593413
+186064.840531     8248819.404318
+186054.698933     8248827.387020
+186045.788914     8248836.641333
+186033.114716     8248846.463651
+186019.713820     8248862.536521
+186004.416302     8248879.831322
+185991.661450     8248894.661483
+185976.313132     8248915.086754
+185952.710535     8248942.897833
+185931.711483     8248964.488014
+185918.341230     8248978.681993
+185917.695186     8248979.924702
+185917.049536     8248981.166653
+185912.538884     8248989.236795
+185906.111058     8248999.781205
+185900.318803     8249009.709453
+185891.328129     8249023.971610
+185886.121421     8249036.413414
+185880.833689     8249053.862292
+185871.611142     8249082.521427
+185861.863546     8249104.910741
+185860.380319     8249119.287693
+185859.654015     8249125.537488
+185863.064969     8249146.877458
+185871.330170     8249177.683609
+185875.346459     8249200.284785
+185883.268447     8249213.554619
+185891.149726     8249229.328368
+185899.081411     8249241.972407
+185910.131231     8249255.291150
+185926.186528     8249268.686177
+185944.118302     8249282.110087
+185968.256502     8249298.760018
+185991.728501     8249317.904237
+186013.979370     8249335.151826
+186030.629923     8249350.433848
+186042.315707     8249363.135672
+186058.410938     8249374.027535
+186075.767625     8249384.312106
+186091.287782     8249392.063866
+186110.521698     8249402.378096
+186137.162249     8249419.066545
+186159.362724     8249439.443081
+186172.309954     8249451.538377
+186180.897380     8249462.313911
+186190.110667     8249473.099843
+186198.072983     8249483.865754
+186207.871448     8249497.164472
+186218.255460     8249512.976745
+186221.868038     8249521.797869
+186231.091416     8249531.957248
+186240.910421     8249544.004392
+186253.161213     8249560.471345
+186267.884107     8249578.854947
+186269.085067     8249582.003920
+186269.710560     8249582.013548
+186270.336434     8249582.023182
+186270.961926     8249582.032810
+186271.587800     8249582.042444
+186272.213293     8249582.052072
+186272.223371     8249581.426282
+186272.848864     8249581.435910
+186274.100230     8249581.455172
+186282.667868     8249593.483055
+186299.388985     8249604.383788
+186313.082294     8249608.977704
+186334.293893     8249613.060638
+186357.432757     8249614.042750
+186382.327498     8249622.565518
+186412.247493     8249629.912984
+186445.871181     8249640.447947
+186483.329228     8249646.033609
+186503.783905     8249658.243700
+186526.054944     8249674.238946
+186536.630488     8249678.158927
+186542.251368     8249678.871392
+186556.489909     8249688.482022
+186584.936756     8249709.580651
+186611.567216     8249726.895653
+186627.057124     8249736.525545
+186640.740749     8249741.744492
+186663.758631     8249750.238370
+186692.992648     8249761.331709
+186727.826994     8249774.389850
+186754.598593     8249782.941507
+186773.862758     8249791.377606
+186795.548631     8249804.859302
+186824.086199     8249820.325061
+186855.146669     8249834.577001
+186881.908190     8249843.754448
+186906.298420     8249844.755822
+186927.570504     8249845.083255
+186945.088489     8249845.352902
+186966.935659     8249848.819675
+186988.126707     8249854.154946
+187010.519109     8249862.638432
+187036.009106     8249873.048196
+187062.720220     8249885.355354
+187096.323739     8249897.142660
+187119.856222     8249912.531378
+187144.660242     8249926.687015
+187172.652972     8249937.135302
+187201.967632     8249943.221561
+187230.636260     8249950.549766
+187258.053903     8249957.858714
+187279.800261     8249967.584909
+187296.672584     8249969.097272
+187314.745497     8249973.757837
+187337.208463     8249977.860033
+187355.271285     8249983.147152
+187370.912411     8249983.387910
+187374.040636     8249983.436062
+187378.420228     8249983.503475
+187390.933129     8249983.696081
+187414.707564     8249984.062032
+187446.009973     8249983.291969
+187472.428280     8249974.933099
+187495.829253     8249959.640865
+187516.081843     8249945.552058
+187533.902264     8249927.043437
+187559.321235     8249903.016748
+187587.152205     8249884.662216
+187605.588027     8249866.789777
+187618.282395     8249855.715117
+187631.642951     8249842.146933
+187646.990887     8249821.721656
+187665.477510     8249800.718748
+187696.385917     8249785.542073
+187725.387600     8249772.214646
+187745.620020     8249759.378183
+187762.643191     8249751.500641
+187775.882778     8249745.443459
+187790.433834     8249735.650031
+187810.736830     8249718.431513
+187832.957000     8249698.738727
+187855.056201     8249686.556943
+187877.720409     8249678.140287
+187896.661135     8249667.788483
+187921.212662     8249658.774934
+187950.113163     8249651.706160
+187977.752588     8249645.244684
+187999.740898     8249639.948112
+188016.754360     8249632.697130
+188030.689633     8249622.267515
+188048.339048     8249614.400377
+188062.910274     8249603.354607
+188080.024547     8249589.844202
+188099.176989     8249566.347000
+188113.293717     8249544.650882
+188125.382749     8249532.315015
+188125.392828     8249531.689226
+188129.863153     8249526.123006
+188136.896314     8249516.839803
+188145.847042     8249505.081574
+188153.455671     8249498.937716
+188154.716734     8249498.331182
+188155.988258     8249497.098865
+188156.624211     8249496.482710
+188157.955850     8249491.494122
+188164.333270     8249484.079423
+188169.469797     8249476.018915
+188173.919570     8249471.705033
+188177.108292     8249467.996919
+188184.727382     8249461.227278
+188189.116670     8249460.668896
+188195.373120     8249460.765199
+188207.865864     8249462.209384
+188220.933681     8249466.793673
+188225.303576     8249467.486882
+188231.549947     8249468.208974
+188239.037212     8249469.576876
+188248.421888     8249469.721331
+188255.303830     8249469.827262
+188261.630857     8249465.541511
+188262.326912     8249461.169848
+188263.023744     8249456.797434
+188263.084229     8249453.041933
+188263.144714     8249449.286432
+188263.154793     8249448.660643
+188258.986522     8249435.448589
+188246.705494     8249420.859004
+188246.090080     8249420.223587
+188245.535164     8249415.831905
+188241.912495     8249407.637334
+188241.548347     8249391.353348
+188241.094243     8249380.702243
+188244.989100     8249371.996678
+188258.430693     8249353.420656
+188271.710213     8249344.860310
+188276.190234     8249338.668294
+188276.835897     8249337.425579
+188288.814038     8249331.974924
+188307.058709     8249325.994783
+188326.574522     8249318.782319
+188355.475010     8249311.714309
+188381.268207     8249303.345817
+188406.394821     8249297.471607
+188424.749619     8249284.606242
+188436.082111     8249280.397538
+188454.387266     8249270.661895
+188473.963576     8249259.693166
+188485.931627     8249254.869065
+188490.391491     8249249.928629
+188499.836651     8249246.317582
+188518.081322     8249240.337441
+188535.033917     8249236.841954
+188542.562286     8249235.705182
+188543.823349     8249235.098648
+188543.833428     8249234.472859
+188551.402111     8249230.832929
+188565.165997     8249231.044791
+188581.432615     8249231.295177
+188605.782518     8249234.800473
+188628.921000     8249235.782579
+188649.497028     8249240.481675
+188678.216050     8249244.680931
+188714.988133     8249254.011703
+188747.450793     8249258.894529
+188771.770460     8249264.277193
+188801.035096     8249273.493169
+188828.441885     8249281.428660
+188856.485021     8249288.747236
+188887.585818     8249300.495254
+188911.774412     8249314.016237
+188938.516157     8249324.445269
+188958.385275     8249334.142569
+188978.850412     8249345.726876
+188996.126064     8249361.019285
+189017.146118     8249376.995275
+189035.653360     8249393.558530
+189056.713729     8249407.031362
+189080.912414     8249419.925792
+189100.115724     8249432.116622
+189116.200876     8249443.634274
+189128.572637     8249452.590225
+189152.166000     8249464.222684
+189181.924303     8249481.585832
+189227.879425     8249503.580667
+189262.693613     8249517.890387
+189291.322677     8249527.722525
+189324.350345     8249536.370479
+189366.067397     8249549.534563
+189393.939157     8249567.493852
+189424.908894     8249587.379425
+189456.544438     8249604.771469
+189488.815566     8249621.546587
+189514.245078     8249635.711851
+189531.632384     8249644.119060
+189540.956575     8249648.019015
+189541.561897     8249649.280986
+189542.187390     8249649.290614
+189542.167232     8249650.542193
+189542.783409     8249651.177622
+189543.388732     8249652.439593
+189549.544370     8249658.795319
+189550.775197     8249660.066154
+189551.390611     8249660.701572
+189551.380532     8249661.327361
+189551.996697     8249661.963554
+189551.986618     8249662.589344
+189551.976540     8249663.215133
+189551.966461     8249663.840923
+189552.531468     8249667.606051
+189553.096464     8249671.371944
+189553.025900     8249675.753235
+189552.945245     8249680.761078
+189553.429611     8249689.533287
+189553.248144     8249700.800553
+189553.056599     8249712.693609
+189552.824738     8249727.089823
+189552.613023     8249740.235222
+189556.276020     8249745.925871
+189567.971883     8249758.001905
+189582.927032     8249761.988536
+189596.045255     8249763.443113
+189606.681679     8249763.606835
+189616.691847     8249763.760918
+189623.573789     8249763.866849
+189631.697402     8249764.617837
+189635.430961     8249765.927196
+189638.478532     8249770.983191
+189642.787178     8249775.431889
+189651.435459     8249782.452692
+189663.746735     8249795.164144
+189684.191703     8249808.000794
+189706.503068     8249821.492118
+189732.467340     8249841.300644
+189752.196082     8249859.761300
+189763.790369     8249878.096745
+189779.209713     8249892.107927
+189799.584117     8249909.325868
+189825.649188     8249922.875735
+189847.335062     8249936.357431
+189857.285508     8249940.267026
+189868.405522     8249949.203709
+189875.843157     8249953.700570
+189877.084063     8249954.345616
+189877.073971     8249954.972169
+189877.699464     8249954.981797
+189878.324956     8249954.991425
+189878.951212     8249955.001065
+189879.576704     8249955.010693
+189887.094230     8249954.499699
+189904.602506     8249955.395906
+189922.039466     8249960.672627
+189927.609940     8249964.514803
+189928.235432     8249964.524431
+189943.170411     8249969.763405
+189969.871829     8249982.696358
+189981.557613     8249995.398182
+189982.808598     8249995.417438
+189991.487127     8250000.560108
+190010.054853     8250013.367863
+190018.753552     8250017.258191
+190022.497191     8250017.941760
+190028.077743     8250021.158146
+190037.987099     8250027.571652
+190041.095166     8250028.871382
+190047.916612     8250032.733578
+190051.599766     8250037.172648
+190061.509122     8250043.586153
+190074.597872     8250046.918111
+190084.587883     8250048.323772
+190092.014663     8250053.447175
+190100.683113     8250059.215635
+190108.756319     8250063.096335
+190115.577777     8250066.957767
+190119.876332     8250072.033018
+190123.609892     8250073.342376
+190123.599813     8250073.968166
+190128.534703     8250078.427267
+190134.074928     8250084.147576
+190135.255349     8250088.548122
+190139.574838     8250092.371042
+190140.765338     8250096.145799
+190141.320254     8250100.537481
+190141.875183     8250104.928399
+190144.832020     8250115.618028
+190144.711051     8250123.129029
+190144.640487     8250127.510320
+190144.418693     8250141.281508
+190144.338051     8250146.288588
+190143.611747     8250152.538383
+190135.297353     8250163.680462
+190127.587530     8250176.083737
+190123.137757     8250180.397620
+190115.538825     8250185.915682
+190104.106285     8250196.383820
+190096.507365     8250201.901119
+190095.205975     8250205.011574
+190093.823929     8250213.129873
+190089.938388     8250221.209637
+190089.867824     8250225.590928
+190089.847667     8250226.842507
+190093.511415     8250232.533931
+190098.435462     8250237.618810
+190102.118616     8250242.057880
+190107.124082     8250242.134927
+190113.461174     8250237.224151
+190121.766253     8250226.707872
+190133.844443     8250214.997783
+190141.443363     8250209.480485
+190150.323528     8250202.103546
+190159.798937     8250196.614367
+190166.125951     8250192.329380
+190170.515239     8250191.770998
+190181.221475     8250187.552654
+190188.164666     8250183.903096
+190191.292891     8250183.951248
+190195.046609     8250184.009027
+190205.056777     8250184.163110
+190210.687735     8250184.249785
+190211.928641     8250184.894831
+190212.544042     8250185.531012
+190213.109813     8250189.296153
+190213.735305     8250189.305781
+190213.715148     8250190.557360
+190213.694978     8250191.809703
+190213.019080     8250194.929786
+190211.696768     8250199.291809
+190207.246995     8250203.605691
+190202.786367     8250208.546116
+190198.921758     8250215.373549
+190188.790609     8250222.731232
+190183.674252     8250229.539397
+190183.613767     8250233.294897
+190182.261971     8250239.535064
+190181.616321     8250240.777015
+190181.596151     8250242.029358
+190187.802196     8250245.255373
+190192.171327     8250245.948569
+190197.802285     8250246.035245
+190207.822531     8250245.563538
+190216.662369     8250240.690521
+190221.738398     8250236.386278
+190233.766182     8250227.805900
+190250.800196     8250219.302581
+190272.717930     8250218.388063
+190282.102605     8250218.532517
+190293.909371     8250223.722575
+190321.972665     8250229.789573
+190346.877484     8250237.686551
+190366.837335     8250241.750217
+190386.161615     8250246.430045
+190419.190047     8250255.078011
+190449.200393     8250256.791838
+190463.530049     8250260.768841
+190472.823992     8250266.546929
+190491.432046     8250276.850762
+190504.348645     8250290.824184
+190507.406307     8250295.253626
+190507.961223     8250299.645308
+190514.571742     8250316.651387
+190522.957162     8250339.945760
+190527.640022     8250360.053419
+190532.958465     8250379.544151
+190537.580076     8250403.407299
+190541.072449     8250419.739436
+190546.480861     8250433.596524
+190558.620750     8250456.949453
+190567.148073     8250471.480493
+190573.848549     8250482.853691
+190581.074481     8250500.495187
+190590.156721     8250519.417910
+190598.643704     8250536.453636
+190601.681196     8250542.135421
+190605.858782     8250554.721674
+190608.866037     8250562.280827
+190613.094029     8250571.737369
+190616.697292     8250581.184294
+190620.138495     8250600.646131
+190624.951652     8250612.616223
+190629.200564     8250620.821197
+190629.725245     8250627.090248
+190630.845181     8250635.246295
+190631.945711     8250644.654697
+190633.085805     8250651.559165
+190633.640722     8250655.950847
+190633.539910     8250662.210270
+190633.489503     8250665.339981
+190632.652308     8250678.474988
+190624.973498     8250689.000142
+190619.836972     8250697.060650
+190619.150994     8250700.806523
+190613.439382     8250705.727691
+190601.431004     8250713.055715
+190591.915268     8250721.048815
+190586.214510     8250725.343442
+190580.502897     8250730.264611
+190574.105308     8250738.931652
+190569.039357     8250742.610106
+190568.353380     8250746.355978
+190562.631689     8250751.902937
+190556.849513     8250761.205395
+190552.349333     8250768.648990
+190542.157699     8250779.762173
+190536.385601     8250788.438843
+190535.578655     8250799.695717
+190535.518170     8250803.451218
+190536.093256     8250806.590557
+190547.345081     8250807.390461
+190559.857982     8250807.583068
+190578.071653     8250803.480283
+190587.587377     8250795.487947
+190595.266963     8250784.962040
+190599.777221     8250776.892657
+190608.001646     8250771.384222
+190615.630062     8250763.988016
+190621.957076     8250759.703028
+190623.279388     8250755.341006
+190627.033106     8250755.398785
+190632.057977     8250754.223478
+190637.144085     8250749.293445
+190640.897803     8250749.351225
+190649.051664     8250748.224081
+190652.189968     8250747.646443
+190655.943685     8250747.704222
+190656.569177     8250747.713850
+190657.699956     8250755.244120
+190658.880365     8250759.645430
+190659.990210     8250768.428030
+190663.633801     8250775.371034
+190667.841635     8250786.079154
+190669.082541     8250786.724200
+190679.073302     8250788.130637
+190688.457978     8250788.275092
+190691.586203     8250788.323243
+190695.339921     8250788.381023
+190699.709052     8250789.074220
+190705.269446     8250793.542185
+190710.204336     8250798.001287
+190710.749186     8250803.017995
+190716.249084     8250811.242225
+190724.210635     8250822.008125
+190724.815958     8250823.270096
+190726.007221     8250827.044864
+190729.760939     8250827.102644
+190733.504578     8250827.786213
+190743.514745     8250827.940295
+190746.642971     8250827.988447
+190747.269227     8250827.998087
+190747.904798     8250827.381925
+190747.914876     8250826.756136
+190749.165861     8250826.775392
+190749.791353     8250826.785020
+190750.417609     8250826.794659
+190750.427688     8250826.168870
+190751.053180     8250826.178498
+190751.063271     8250825.551944
+190751.073350     8250824.926155
+190751.083429     8250824.300365
+190752.344492     8250823.693832
+190756.118379     8250822.499268
+190761.133924     8250821.950526
+190765.523212     8250821.392144
+190775.534144     8250821.546239
+190784.858335     8250825.446194
+190797.926152     8250830.030483
+190814.747699     8250834.671787
+190833.375911     8250843.724041
+190843.325594     8250847.633624
+190848.260496     8250852.091962
+190859.986595     8250862.290628
+190872.893128     8250876.889076
+190883.963499     8250888.955482
+190890.098980     8250896.562787
+190896.890189     8250902.302351
+190903.641071     8250910.545837
+190914.065028     8250923.854183
+190922.672994     8250933.378144
+190928.778226     8250942.863581
+190942.250517     8250961.227934
+190953.794399     8250982.693090
+190957.317020     8250997.147095
+190960.919519     8251006.594009
+190961.333309     8251019.748272
+190964.885402     8251032.324897
+190967.943051     8251036.755102
+190970.920058     8251046.192388
+190971.404411     8251054.965361
+190974.997596     8251065.038075
+190974.876626     8251072.549077
+190976.016720     8251079.453545
+190977.126565     8251088.236146
+190977.045911     8251093.243990
+190976.975347     8251097.625280
+190976.854365     8251105.137046
+190976.803959     8251108.266757
+190977.430215     8251108.276397
+190978.055708     8251108.286025
+190978.045629     8251108.911814
+190977.944817     8251115.171237
+190977.793599     8251124.560371
+190977.047137     8251132.061744
+190975.603843     8251143.935533
+190971.688829     8251153.892677
+190971.002852     8251157.638550
+190966.471660     8251166.960264
+190965.836077     8251167.577190
+190964.564935     8251168.809513
+190960.094228     8251174.375727
+190954.383392     8251179.296143
+190944.311963     8251182.898314
+190936.804528     8251182.782755
+190931.173570     8251182.696080
+190918.670760     8251181.876920
+190904.452758     8251171.014717
+190890.859485     8251160.162130
+190885.864874     8251159.458541
+190877.115769     8251158.697924
+190868.992157     8251157.946936
+190857.731005     8251157.773598
+190848.971821     8251157.638771
+190845.218104     8251157.580991
+190840.767567     8251161.894862
+190834.995470     8251170.571532
+190830.545684     8251174.886179
+190826.630670     8251184.843323
+190826.509700     8251192.354324
+190827.024302     8251199.249164
+190831.848301     8251210.593478
+190832.917819     8251221.880001
+190836.540488     8251230.074571
+190836.913950     8251245.732756
+190841.687543     8251260.206781
+190842.111412     8251272.735254
+190845.693754     8251283.433747
+190849.337344     8251290.376750
+190849.882182     8251295.394222
+190852.939843     8251299.823664
+190856.633064     8251303.637708
+190857.863891     8251304.908543
+190864.726440     8251306.266065
+190871.608382     8251306.371996
+190878.480234     8251307.104481
+190885.352098     8251307.836201
+190898.480412     8251308.664225
+190911.609490     8251309.492260
+190920.357831     8251310.252865
+190924.102221     8251310.937210
+190932.225070     8251311.688186
+190940.974174     8251312.448802
+190944.717813     8251313.132371
+190945.343305     8251313.141999
+190949.077617     8251314.452134
+190955.273582     8251318.303938
+190958.976894     8251321.491428
+190965.172859     8251325.343232
+190968.906419     8251326.652591
+190968.896328     8251327.279144
+190970.096907     8251330.428112
+190973.114241     8251337.361475
+190976.737674     8251345.556058
+190980.370410     8251353.125603
+190981.490346     8251361.281650
+190982.681597     8251365.057183
+190983.307089     8251365.066810
+190983.851939     8251370.083518
+190984.366541     8251376.978358
+190984.941627     8251380.117698
+190985.467071     8251386.386760
+190986.627323     8251392.039649
+190986.607153     8251393.291992
+190987.091518     8251402.064201
+190987.081427     8251402.690754
+190987.071348     8251403.316544
+190987.051191     8251404.568123
+190982.601405     8251408.882769
+190977.535455     8251412.561223
+190976.909962     8251412.551595
+190967.515208     8251413.032930
+190956.859390     8251414.120798
+190945.536977     8251417.703713
+190939.906019     8251417.617038
+190927.332634     8251421.179932
+190914.759248     8251424.742827
+190903.477938     8251425.821067
+190899.077795     8251427.005991
+190894.052935     8251428.180534
+190887.776315     8251429.336574
+190884.283519     8251428.051231
+END
+LINE3D-MASTER
+HEIGHT 1100.000000
+183557.000000     8249745.357085
+183566.735702     8249746.393910
+183603.628564     8249748.213676
+183629.845235     8249752.374416
+183656.112133     8249753.404676
+183677.384026     8249753.732107
+183710.553406     8249753.616725
+183742.531917     8249749.725818
+183779.515499     8249745.912715
+183830.293597     8249740.433349
+183872.393167     8249729.811311
+183895.703406     8249720.152711
+183914.573569     8249714.182197
+183928.963329     8249714.403693
+183966.037645     8249704.956958
+184003.767892     8249693.641720
+184036.361995     8249690.386997
+184067.785386     8249682.105168
+184101.015060     8249678.234283
+184121.812679     8249669.162951
+184138.785635     8249664.415124
+184148.281201     8249657.674367
+184156.616326     8249645.280717
+184172.580057     8249625.490864
+184190.420636     8249605.730664
+184203.044427     8249599.038058
+184213.872014     8249587.308719
+184230.390854     8249571.910551
+184248.867206     8249551.533429
+184271.188188     8249525.581220
+184295.335623     8249502.787612
+184318.726517     8249488.121168
+184345.790474     8249478.520347
+184371.088475     8249462.004659
+184393.883922     8249445.451216
+184428.556508     8249429.706537
+184475.852898     8249407.268488
+184512.533403     8249383.415143
+184542.806418     8249368.855397
+184589.295658     8249357.674983
+184622.535423     8249353.177545
+184657.026542     8249348.700132
+184697.209116     8249340.553130
+184731.710327     8249335.449164
+184757.532996     8249325.203292
+184778.260051     8249320.513250
+184796.423877     8249319.540950
+184814.567545     8249319.820228
+184841.470396     8249320.234333
+184864.508257     8249327.475865
+184891.915630     8249335.410600
+184919.323183     8249343.346102
+184949.283505     8249348.189646
+184975.560673     8249348.594120
+184998.709615     8249348.950443
+185025.602197     8249349.990335
+185053.695739     8249354.179200
+185078.085575     8249355.181332
+185091.799436     8249358.522912
+185096.784362     8249359.851532
+185102.344757     8249364.319497
+185107.905139     8249368.788227
+185118.530721     8249369.577727
+185127.895239     8249370.973760
+185138.480875     8249374.267188
+185145.363199     8249374.373125
+185150.368283     8249374.450167
+185158.491501     8249375.201913
+185161.619726     8249375.250065
+185162.891263     8249374.016983
+185167.976989     8249369.086945
+185172.497720     8249360.391014
+185176.342170     8249354.815160
+185180.923386     8249342.363728
+185182.356219     8249331.115723
+185186.897108     8249321.168213
+185192.103816     8249308.726409
+185195.988581     8249300.647397
+185203.052372     8249289.486068
+185213.869499     8249278.382512
+185218.955607     8249273.452479
+185222.709325     8249273.510259
+185227.088916     8249273.577672
+185230.792228     8249276.765163
+185235.030680     8249285.595921
+185236.040107     8249300.637186
+185237.099929     8249312.549504
+185237.453221     8249329.460032
+185237.786368     8249347.621374
+185237.655308     8249355.758930
+185237.564574     8249361.392563
+185244.275523     8249372.139213
+185252.197129     8249385.409041
+185263.206634     8249401.230942
+185280.230637     8249432.171913
+185300.039652     8249445.624720
+185331.857044     8249451.749502
+185368.043568     8249458.567482
+185403.644926     8249462.871912
+185444.221120     8249469.131515
+185488.571189     8249474.197320
+185524.101985     8249482.883040
+185565.323828     8249487.900693
+185604.638577     8249494.766824
+185628.968323     8249499.523699
+185648.837822     8249509.221004
+185679.938608     8249520.969786
+185723.491821     8249536.665911
+185753.815514     8249557.794194
+185784.744924     8249580.183689
+185822.627221     8249598.297831
+185859.813081     8249620.783629
+185887.543702     8249647.506263
+185916.616411     8249668.615289
+185938.191393     8249688.982197
+185957.394691     8249701.173791
+185975.276441     8249717.727418
+185991.301108     8249733.000571
+186003.592227     8249746.963602
+186014.056881     8249757.768796
+186029.486304     8249771.154188
+186049.900654     8249785.868201
+186079.619012     8249805.735277
+186105.654241     8249821.161754
+186123.000838     8249832.072879
+186144.162031     8249839.285524
+186170.338387     8249845.949421
+186210.329034     8249849.695469
+186243.427660     8249853.961375
+186269.704827     8249854.365850
+186298.404074     8249859.816691
+186342.713828     8249867.385653
+186373.865019     8249876.004724
+186400.606382     8249886.433750
+186429.870636     8249895.649721
+186467.288369     8249903.738541
+186492.193201     8249911.634755
+186518.984958     8249918.934834
+186549.490499     8249928.795856
+186586.867904     8249939.388598
+186612.327653     8249951.676494
+186635.930712     8249962.683158
+186658.948594     8249971.177036
+186676.365767     8249977.706106
+186701.270599     8249985.602320
+186723.693237     8249992.208438
+186746.680883     8250002.579684
+186774.047739     8250013.018338
+186810.749233     8250026.731928
+186851.174222     8250042.379901
+186879.711789     8250057.845661
+186904.505718     8250072.627851
+186927.453037     8250085.503019
+186954.830353     8250095.315890
+186974.719640     8250103.760846
+186992.671954     8250115.933183
+187008.626057     8250135.587627
+187029.504972     8250160.326961
+187051.695356     8250181.330051
+187082.655014     8250201.841413
+187108.084895     8250216.007448
+187131.001978     8250230.759985
+187153.293174     8250245.503652
+187182.446537     8250261.604834
+187210.429188     8250272.678911
+187227.170462     8250282.328065
+187248.866414     8250295.183971
+187273.054639     8250308.704185
+187299.705269     8250324.766844
+187333.944358     8250335.937988
+187358.173291     8250346.954286
+187375.005299     8250350.969806
+187393.704074     8250355.640770
+187413.028354     8250360.320598
+187443.039070     8250362.035195
+187468.054792     8250363.046197
+187488.146086     8250358.972313
+187507.016249     8250353.001800
+187527.168015     8250345.173180
+187549.993519     8250326.741601
+187579.085935     8250307.780541
+187596.341360     8250285.506028
+187611.719533     8250263.203383
+187624.665918     8250236.480930
+187638.177705     8250213.522848
+187651.114011     8250187.426184
+187662.031950     8250170.063206
+187671.638407     8250156.437236
+187685.543814     8250147.885759
+187699.328238     8250146.846048
+187718.097589     8250147.134958
+187736.866941     8250147.423867
+187753.698948     8250151.439388
+187764.334990     8250151.603104
+187776.857970     8250151.169921
+187789.471682     8250145.103105
+187806.454526     8250139.729485
+187820.975728     8250131.813432
+187836.778151     8250122.039266
+187846.324123     8250112.168797
+187858.978163     8250103.598059
+187871.682609     8250091.897609
+187886.970048     8250075.228598
+187907.212560     8250061.765580
+187928.080551     8250048.312955
+187956.395875     8250038.731396
+187977.233630     8250027.156139
+187999.968783     8250014.358199
+188018.939758     8250002.128263
+188037.900655     8249990.524116
+188055.125832     8249970.127735
+188073.107549     8249941.604191
+188093.460939     8249921.256726
+188108.223710     8249898.317899
+188126.064289     8249878.557700
+188138.879626     8249859.972038
+188156.104803     8249839.575657
+188177.093776     8249818.611266
+188206.165640     8249800.902544
+188227.709924     8249784.329077
+188242.977587     8249768.911650
+188256.297435     8249757.847382
+188268.416716     8249743.633382
+188284.148575     8249738.240507
+188301.222140     8249727.234018
+188327.064979     8249715.735803
+188346.682380     8249702.263163
+188362.474724     8249693.114787
+188374.542823     8249682.031251
+188387.813040     8249674.095942
+188399.154835     8249669.262201
+188407.379259     8249663.753767
+188414.281371     8249662.607355
+188425.603772     8249659.025204
+188436.864925     8249659.198543
+188440.628721     8249658.630533
+188444.383202     8249658.688324
+188451.265145     8249658.794255
+188458.762501     8249659.535604
+188463.747797     8249660.864994
+188471.870645     8249661.615970
+188479.984179     8249662.992748
+188484.343219     8249664.312499
+188489.964098     8249665.024963
+188498.077632     8249666.401741
+188499.318537     8249667.046786
+188502.446763     8249667.094938
+188503.698511     8249667.114205
+188504.959574     8249666.507672
+188505.595145     8249665.891510
+188505.615303     8249664.639932
+188506.361777     8249657.137794
+188506.381934     8249655.886215
+188506.452510     8249651.504161
+188500.458169     8249635.133511
+188495.655091     8249622.537630
+188495.120332     8249616.894369
+188493.939147     8249612.493811
+188489.781719     8249598.655979
+188490.023670     8249583.633212
+188493.353519     8249571.162518
+188498.549767     8249559.346498
+188499.176023     8249559.356137
+188502.929740     8249559.413917
+188508.500213     8249563.256093
+188520.306204     8249568.446903
+188532.052473     8249577.393226
+188546.311566     8249585.751519
+188562.346311     8249600.398883
+188578.370978     8249615.672036
+188593.881056     8249624.049585
+188601.903856     8249631.059996
+188615.556838     8249638.157834
+188631.742814     8249643.415300
+188644.185139     8249647.989960
+188659.765780     8249651.986219
+188680.412372     8249652.304024
+188700.563768     8249644.474634
+188723.238818     8249635.432201
+188740.877391     8249628.190841
+188754.722694     8249623.394871
+188769.303617     8249611.723305
+188786.357788     8249601.968407
+188799.516339     8249600.919062
+188816.418528     8249600.553287
+188845.016593     8249612.262781
+188871.647435     8249629.577789
+188892.031917     8249646.169940
+188908.692168     8249660.826168
+188929.742458     8249674.924789
+188954.506150     8249691.584348
+188974.899948     8249707.550698
+188982.902579     8249715.813452
+188983.507913     8249717.074659
+188984.699177     8249720.849428
+188996.454761     8249729.169949
+189022.399638     8249750.230066
+189054.065431     8249765.743977
+189091.422667     8249777.589062
+189120.515163     8249797.445740
+189146.490277     8249816.628488
+189174.331788     8249836.465910
+189207.794167     8249857.016560
+189234.444415     8249873.079214
+189254.929710     8249883.411942
+189274.173335     8249893.099614
+189296.555265     8249902.209647
+189322.085589     8249910.115489
+189350.118646     8249918.059855
+189371.895240     8249925.908682
+189389.887881     8249935.577097
+189412.168998     8249950.946553
+189444.935334     8249975.868102
+189477.671408     8250002.668547
+189503.000108     8250023.093235
+189522.778492     8250038.424167
+189545.645538     8250056.307185
+189579.056760     8250079.986771
+189601.843163     8250102.876869
+189625.224047     8250127.654715
+189650.543420     8250148.705968
+189683.319070     8250173.001715
+189719.808862     8250199.859940
+189749.497378     8250221.603626
+189777.389284     8250238.312100
+189805.200559     8250260.026890
+189836.745370     8250283.052567
+189867.694949     8250304.189719
+189889.350574     8250319.549547
+189895.546540     8250323.401351
+189896.172032     8250323.410979
+189902.357907     8250327.889336
+189906.041061     8250332.328406
+189910.360549     8250336.151326
+189910.895308     8250341.794588
+189914.548214     8250348.111790
+189921.874182     8250359.494615
+189929.816340     8250371.512106
+189931.006828     8250375.287627
+189932.258576     8250375.306895
+189953.591157     8250371.878063
+189978.111672     8250364.742634
+189997.598012     8250359.407550
+190012.612882     8250359.638668
+190024.500291     8250359.821646
+190028.819779     8250363.644566
+190039.899465     8250375.085171
+190044.148378     8250383.290146
+190047.266524     8250383.964087
+190047.206040     8250387.719588
+190060.243621     8250394.181244
+190072.595225     8250404.388774
+190084.351572     8250412.709308
+190096.046672     8250424.785330
+190111.455937     8250439.422302
+190124.312815     8250457.151237
+190130.407969     8250467.262464
+190134.040717     8250474.831245
+190142.588185     8250488.111471
+190152.810518     8250513.938661
+190158.239852     8250526.544182
+190159.390025     8250532.822861
+190165.505336     8250541.682508
+190170.278941     8250556.155769
+190176.999587     8250566.276624
+190183.245946     8250566.999481
+190192.640713     8250566.517382
+190212.802176     8250558.062967
+190229.896674     8250545.804147
+190243.186285     8250536.617247
+190253.357762     8250526.755642
+190264.074828     8250521.912285
+190268.544771     8250516.346059
+190271.683075     8250515.768421
+190277.929447     8250516.490514
+190287.132656     8250527.902235
+190297.011775     8250536.193109
+190301.290937     8250542.519950
+190302.481436     8250546.294707
+190306.154499     8250551.360331
+190307.355842     8250554.509310
+190311.109559     8250554.567089
+190314.722137     8250563.388213
+190319.596555     8250571.602052
+190318.970299     8250571.592412
+190317.719314     8250571.573156
+190308.758507     8250583.957175
+190304.248237     8250592.027322
+190297.901053     8250597.564652
+190293.430346     8250603.130866
+190284.470302     8250615.514897
+190278.667969     8250626.068935
+190274.106529     8250637.268782
+190273.995638     8250644.153994
+190273.783935     8250657.298629
+190279.596810     8250684.936545
+190294.804452     8250712.092362
+190309.991923     8250740.500522
+190313.615344     8250748.695868
+190317.137189     8250763.150626
+190323.666289     8250785.164536
+190333.878544     8250811.617517
+190347.825110     8250839.380631
+190353.093147     8250862.001076
+190356.049996     8250872.689940
+190357.280811     8250873.961539
+190358.522481     8250874.606596
+190359.147973     8250874.616224
+190359.682732     8250880.259485
+190360.177176     8250888.405904
+190360.752262     8250891.545244
+190365.495607     8250907.897401
+190366.676028     8250912.297947
+190367.302284     8250912.307587
+190367.806807     8250919.828217
+190370.874535     8250923.632633
+190371.449621     8250926.771972
+190372.014629     8250930.537101
+190366.929284     8250935.467146
+190358.674612     8250942.853712
+190353.598582     8250947.157956
+190352.277022     8250951.520754
+190347.766764     8250959.590138
+190341.308689     8250972.012680
+190337.372742     8250983.222155
+190337.352584     8250984.473734
+190340.309421     8250995.163363
+190340.844957     8251000.805871
+190343.963091     8251001.480577
+190350.794627     8251004.716219
+190362.146513     8250999.255924
+190366.011885     8250992.428503
+190369.896663     8250984.348728
+190379.412399     8250976.355627
+190383.186274     8250975.161828
+190391.955536     8250974.670865
+190407.041745     8250970.519941
+190418.948548     8250969.451328
+190422.076773     8250969.499480
+190426.981427     8250975.835950
+190436.820219     8250986.630746
+190437.445711     8250986.640374
+190446.003270     8250999.294046
+190450.887754     8251006.882859
+190459.384829     8251023.292032
+190466.700718     8251035.300647
+190473.996450     8251048.560841
+190473.976293     8251049.812419
+190475.046575     8251061.098954
+190478.094145     8251066.154949
+190478.023582     8251070.536239
+190477.963097     8251074.291740
+190477.811879     8251083.680874
+190476.418991     8251092.424951
+190475.006710     8251102.420619
+190470.567015     8251106.108712
+190470.546846     8251107.361055
+190469.870184     8251110.481127
+190461.616287     8251117.866941
+190456.459603     8251127.179028
+190455.834111     8251127.169400
+190437.881797     8251114.997063
+190416.357221     8251091.500443
+190415.741807     8251090.865026
+190407.002794     8251089.477856
+190399.505437     8251088.736508
+190389.485191     8251089.208215
+190377.496970     8251095.284659
+190376.770666     8251101.534454
+190375.297124     8251115.286374
+190371.251049     8251133.381074
+190365.993553     8251148.952583
+190365.933068     8251152.708084
+190370.837722     8251159.044554
+190381.201195     8251176.108400
+190384.955676     8251176.166191
+190385.560998     8251177.428162
+190392.422783     8251178.785672
+190401.181967     8251178.920499
+190411.192134     8251179.074582
+190425.602433     8251178.044505
+190435.683177     8251173.816533
+190447.661319     8251168.365878
+190458.417948     8251161.018587
+190462.171666     8251161.076367
+190465.925383     8251161.134146
+190475.330216     8251160.027022
+190487.288201     8251155.827946
+190491.112481     8251151.504435
+190492.374309     8251150.897913
+190496.824094     8251146.583267
+190501.930372     8251140.400891
+190510.083457     8251139.274499
+190515.774899     8251135.605674
+190521.405858     8251135.692349
+190525.764910     8251137.011335
+190528.832650     8251140.814988
+190534.917713     8251151.552768
+190538.460491     8251164.755194
+190542.022663     8251176.706029
+190546.018795     8251200.558785
+190549.701936     8251204.998619
+190561.397812     8251217.073889
+190567.593765     8251220.926457
+190575.051558     8251224.171739
+190583.184485     8251224.296926
+190588.169793     8251225.625552
+190596.232157     8251230.132029
+190604.204539     8251240.272916
+190605.334554     8251247.803173
+190608.968065     8251255.371966
+190608.867253     8251261.631389
+190609.371764     8251269.152783
+190609.997256     8251269.162411
+190610.622748     8251269.172039
+190610.612670     8251269.797828
+190611.238162     8251269.807456
+190611.177677     8251273.562957
+190611.006289     8251284.204434
+190606.385141     8251299.159030
+190606.233922     8251308.548164
+190604.982938     8251308.528908
+190603.620286     8251315.395616
+190599.685115     8251326.604339
+190598.172021     8251342.859430
+190597.323971     8251356.620978
+190597.172753     8251366.010112
+190597.456246     8251387.301942
+190602.087948     8251410.538536
+190605.145610     8251414.967978
+190605.135519     8251415.594531
+190606.296546     8251421.246668
+190610.524538     8251430.703210
+190613.531781     8251438.263127
+190617.769852     8251447.093879
+190620.817435     8251452.149110
+190620.666217     8251461.538244
+190623.612975     8251472.853663
+190623.542412     8251477.234953
+190623.532333     8251477.860742
+190622.906841     8251477.851114
+190619.153123     8251477.793335
+190619.143032     8251478.419888
+190615.379236     8251478.987898
+190611.625518     8251478.930119
+190597.517656     8251461.181928
+190596.367483     8251454.903249
+190592.713814     8251448.586035
+190592.804547     8251442.952402
+190592.885190     8251437.945322
+190588.586634     8251432.870071
+190583.026240     8251428.402105
+190582.410826     8251427.766688
+190576.265279     8251420.784408
+190571.279971     8251419.455782
+190567.596817     8251415.016712
+190566.345832     8251414.997457
+190553.843023     8251414.178297
+190549.473128     8251413.485088
+190548.625842     8251427.246649
+190547.637428     8251449.770790
+190547.526538     8251456.656002
+190547.435804     8251462.289635
+190551.078631     8251469.232627
+190554.015311     8251481.173834
+190553.208364     8251492.430709
+190548.071838     8251500.491217
+190547.335455     8251507.366801
+190545.963488     8251514.859311
+190545.862676     8251521.118733
+190545.802192     8251524.874234
+190546.427684     8251524.883862
+190547.053176     8251524.893490
+190547.043098     8251525.519279
+190551.937673     8251532.481539
+190555.630905     8251536.294819
+190561.211457     8251539.511206
+190569.900065     8251544.028087
+190578.648405     8251544.788691
+190591.777483     8251545.616727
+190601.162159     8251545.761181
+190611.182406     8251545.289475
+190623.140378     8251541.091163
+190632.585550     8251537.479352
+190640.153470     8251533.839411
+190643.997921     8251528.263557
+190652.857916     8251522.138961
+190662.383718     8251513.520835
+190670.598064     8251508.638190
+190673.736368     8251508.060552
+190678.135747     8251506.875617
+190683.161371     8251505.701085
+190692.566204     8251504.593961
+190701.385120     8251500.972511
+190705.139601     8251501.030302
+190705.765094     8251501.039930
+190707.016078     8251501.059186
+190713.908100     8251500.539328
+190714.534356     8251500.548967
+190715.775262     8251501.194013
+190718.802675     8251507.501587
+190720.003253     8251510.650554
+190720.609340     8251511.912537
+190721.184426     8251515.051876
+190721.174347     8251515.677666
+190724.090869     8251528.870452
+190724.655877     8251532.635581
+190725.261199     8251533.897552
+190726.321402     8251545.809876
+190727.421169     8251555.218266
+190730.983353     8251567.168337
+190730.852293     8251575.305892
+190733.829300     8251584.743178
+190737.896759     8251604.214655
+190741.872720     8251629.319753
+190742.821269     8251648.117277
+190742.599475     8251661.888466
+190745.576482     8251671.325751
+190745.395028     8251682.592254
+190745.223640     8251693.233731
+190745.072422     8251702.622865
+190745.011937     8251706.378366
+190744.890967     8251713.889367
+190740.370618     8251722.585304
+190740.300055     8251726.966595
+190739.049070     8251726.947339
+190732.782529     8251727.477589
+190723.276884     8251734.844136
+190715.082708     8251738.474438
+190706.242870     8251743.347455
+190700.541349     8251747.642070
+190694.901075     8251748.181196
+190689.078572     8251759.987577
+190687.665527     8251769.983233
+190686.878726     8251779.989292
+190690.622364     8251780.672861
+190696.192838     8251784.515037
+190700.562732     8251785.208246
+190709.937329     8251785.978490
+190716.879757     8251782.328921
+190725.022762     8251781.828318
+190731.976032     8251777.552971
+190738.232483     8251777.649274
+190741.986200     8251777.707053
+190745.739918     8251777.764833
+190749.483556     8251778.448402
+190753.813124     8251781.645533
+190758.101600     8251787.346573
+190759.271943     8251792.372909
+190760.362394     8251802.407100
+190760.796341     8251814.309784
+190760.584638     8251827.454419
+190760.988337     8251841.235235
+190764.025829     8251846.917020
+190765.156607     8251854.447289
+190769.374520     8251864.529620
+190777.286417     8251878.426008
+190786.429154     8251893.592466
+190792.514216     8251904.330246
+190800.415283     8251918.851647
+190808.307023     8251933.999613
+190811.334436     8251940.307187
+190812.575342     8251940.952232
+190815.693476     8251941.626937
+190816.308890     8251942.262355
+190816.925067     8251942.897784
+190817.540480     8251943.533201
+190817.530402     8251944.158991
+190817.520311     8251944.785544
+190818.145803     8251944.795172
+190818.135724     8251945.420962
+190818.761216     8251945.430590
+190819.386709     8251945.440218
+190819.376630     8251946.066007
+190819.275818     8251952.325430
+190819.215333     8251956.080931
+190820.446912     8251957.352541
+190820.356191     8251962.985411
+190820.981683     8251962.995039
+190820.759889     8251976.766227
+190820.699404     8251980.521728
+190819.993257     8251985.519944
+190814.977713     8251986.068686
+190808.015128     8251990.969835
+190792.928919     8251995.120759
+190774.028519     8252002.968641
+190760.163822     8252009.016201
+190754.512694     8252010.181869
+190744.431963     8252014.409077
+190733.724963     8252018.627409
+190719.870357     8252024.048416
+190714.794315     8252028.353423
+190700.304126     8252034.391355
+190687.740819     8252037.328460
+190683.249955     8252044.146253
+190683.118894     8252052.283808
+190683.098737     8252053.535387
+190683.674587     8252056.674738
+190693.604100     8252061.836665
+190701.101456     8252062.578013
+190708.589497     8252063.945163
+190718.599665     8252064.099246
+190728.619912     8252063.627539
+190742.484609     8252057.579978
+190761.385021     8252049.731333
+190785.311055     8252040.708155
+190800.397253     8252036.557995
+190801.022745     8252036.567623
+190804.150970     8252036.615774
+190812.274582     8252037.366763
+190827.865302     8252040.737232
+190833.485418     8252041.449685
+190839.005473     8252048.422336
+190846.392702     8252056.048909
+190853.718670     8252067.431734
+190862.245993     8252081.962775
+190869.582040     8252092.719811
+190877.574604     8252101.607590
+190884.204517     8252117.362078
+190888.907546     8252136.217393
+190888.625268     8252153.744083
+190877.121400     8252168.593499
+190865.849405     8252169.045939
+190849.643272     8252165.040052
+190835.324470     8252160.436507
+190812.195303     8252158.828600
+190783.274645     8252167.148953
+190751.810939     8252177.933939
+190733.465456     8252190.173503
+190721.962352     8252205.022932
+190706.724925     8252218.562991
+190693.758370     8252246.537786
+190685.261758     8252268.946357
+190672.406094     8252290.035940
+190658.329694     8252309.228136
+190653.828751     8252316.671718
+190653.193180     8252317.287880
+190653.173010     8252318.540223
+190653.112525     8252322.295724
+190653.727939     8252322.931141
+190657.976851     8252331.136115
+190660.903453     8252343.703112
+190660.842968     8252347.458613
+190647.916740     8252372.929487
+190643.073034     8252401.655260
+190637.775974     8252419.730703
+190627.332310     8252446.492443
+190613.699172     8252476.961522
+190601.096764     8252521.220303
+190596.343791     8252544.312443
+190583.488127     8252565.402026
+190573.740530     8252587.791341
+190564.759553     8252601.427702
+190560.259374     8252608.871296
+190560.188810     8252613.252587
+190551.248160     8252624.385027
+190544.759837     8252638.685701
+190535.123132     8252654.189803
+190519.088849     8252678.360183
+190503.024305     8252704.409459
+190492.661295     8252726.163356
+190484.325980     8252738.557002
+190473.942812     8252761.562478
+190464.215373     8252782.700213
+190452.651785     8252801.305143
+190439.210192     8252819.881165
+190428.847182     8252841.635062
+190427.939411     8252859.152123
+190427.092137     8252872.912920
+190426.910671     8252884.180186
+190426.618326     8252902.331901
+190426.396532     8252916.103089
+190426.053768     8252937.385279
+190425.731175     8252957.415126
+190426.114716     8252972.447522
+190427.234652     8252980.603569
+190428.435994     8252983.752548
+190429.051395     8252984.388729
+190430.302380     8252984.407985
+190430.928636     8252984.417625
+190430.918557     8252985.043414
+190431.533971     8252985.678832
+190431.513813     8252986.930410
+190432.129215     8252987.566592
+190438.163883     8253001.433319
+190438.143726     8253002.684898
+190438.123556     8253003.937241
+190438.103399     8253005.188820
+190438.093320     8253005.814610
+190437.730387     8253028.349143
+190437.367466     8253050.882912
+190437.226327     8253059.646256
+190437.054951     8253070.286969
+190436.671860     8253094.073081
+190439.094401     8253137.937192
+190443.110690     8253160.538368
+190446.158273     8253165.593599
+190446.582905     8253178.122085
+190447.692750     8253186.904685
+190452.466343     8253201.378710
+190458.390121     8253222.130650
+190465.050270     8253236.007769
+190472.335923     8253249.893753
+190483.779756     8253277.618344
+190497.039582     8253309.127320
+190516.062189     8253332.585427
+190533.731460     8253362.284442
+190550.130353     8253393.215792
+190566.518403     8253424.772919
+190581.655469     8253456.310790
+190598.750430     8253482.869714
+190611.495653     8253507.483849
+190628.741832     8253524.653638
+190647.188577     8253544.973159
+190670.629958     8253565.994740
+190690.762411     8253598.235448
+190712.145836     8253630.496176
+190727.898315     8253662.669465
+190740.825005     8253676.016334
+190753.650883     8253695.622626
+190773.298971     8253719.091126
+190790.322604     8253750.031327
+190796.417746     8253760.143318
+190799.930288     8253775.223113
+190811.494326     8253795.436690
+190824.058859     8253831.317340
+190835.421274     8253864.049763
+190841.012368     8253905.458104
+190841.961680     8253924.255639
+190842.950555     8253940.549241
+190845.665454     8253966.260873
+190845.917934     8253989.430824
+190845.544934     8254012.590382
+190840.772555     8254036.934876
+190834.879488     8254053.122547
+190828.946094     8254071.814140
+190823.023542     8254089.879955
+190816.555389     8254102.928287
+190809.895691     8254127.869675
+190798.856019     8254152.743643
+190794.234858     8254167.699003
+190792.771406     8254180.824370
+190787.534832     8254195.144313
+190781.712341     8254206.949930
+190776.555657     8254216.262016
+190770.854887     8254220.557407
+190769.593060     8254221.163929
+190764.527873     8254224.842394
+190763.901617     8254224.832755
+190753.084490     8254235.936311
+190734.708771     8254250.053243
+190719.491513     8254262.340959
+190706.131326     8254275.909913
+190684.072453     8254285.587775
+190664.627204     8254288.418949
+190650.802834     8254291.962588
+190626.927205     8254297.856054
+190599.852775     8254308.083423
+190575.261697     8254319.600142
+190548.207437     8254328.575168
+190529.902269     8254338.311574
+190506.582332     8254348.595970
+190475.078299     8254361.884879
+190454.754763     8254380.354970
+190438.195788     8254398.257063
+190425.440936     8254413.087224
+190413.907596     8254429.814021
+190400.617221     8254439.000909
+190385.451133     8254448.158925
+190350.253091     8254457.635306
+190321.261869     8254470.336948
+190290.383328     8254483.635485
+190250.816931     8254492.417916
+190219.393540     8254500.699745
+190189.301788     8254503.992986
+190158.584544     8254507.276600
+190116.525492     8254515.394718
+190073.930918     8254517.869563
+190043.214438     8254521.153188
+190002.476935     8254524.909272
+189966.703819     8254531.245549
+189928.458970     8254535.665946
+189893.362516     8254538.882152
+189841.312703     8254545.593833
+189815.641239     8254546.451335
+189796.185911     8254549.908299
+189781.160199     8254550.302959
+189766.709573     8254553.836957
+189737.244077     8254557.139838
+189715.901417     8254561.194460
+189692.682293     8254565.219433
+189675.002629     8254574.964703
+189656.677304     8254585.952688
+189641.965333     8254605.761045
+189611.682035     8254620.947342
+189583.790568     8254643.058139
+189552.215971     8254660.728338
+189516.302479     8254675.827971
+189484.233426     8254685.352515
+189455.857618     8254698.689576
+189438.702635     8254714.703896
+189428.480764     8254727.694449
+189424.525423     8254740.155515
+189418.571871     8254760.098686
+189410.025605     8254785.637744
+189399.026247     8254808.008554
+189389.198009     8254835.404948
+189368.784516     8254859.507920
+189350.116415     8254891.778860
+189325.988756     8254913.320882
+189306.210847     8254936.806929
+189280.842269     8254957.704670
+189257.320709     8254980.507912
+189224.585085     8254992.525974
+189200.599316     8255005.305428
+189166.653047     8255014.799548
+189131.405363     8255027.405652
+189078.114656     8255033.471524
+189040.515457     8255036.649970
+188992.946430     8255037.169647
+188947.132885     8255045.230738
+188903.287326     8255047.686328
+188875.133300     8255047.252964
+188852.135957     8255037.507513
+188822.225684     8255029.532723
+188795.463769     8255020.356034
+188764.272238     8255014.241650
+188733.060574     8255009.377315
+188713.201523     8254999.054991
+188695.148410     8254993.141312
+188676.449623     8254988.471112
+188656.530099     8254981.903524
+188626.589553     8254975.808395
+188594.792712     8254968.431275
+188570.462966     8254963.674401
+188547.949989     8254962.701158
+188529.886760     8254957.415561
+188510.502007     8254956.490470
+188473.649295     8254952.166014
+188447.372509     8254951.761546
+188431.731383     8254951.520788
+188412.951941     8254951.858432
+188388.541540     8254952.109401
+188366.573401     8254956.153631
+188347.783892     8254957.116300
+188333.959510     8254960.660703
+188318.197414     8254967.930947
+188304.241232     8254979.611365
+188292.859110     8254986.949028
+188292.849019     8254987.575581
+188292.838928     8254988.202135
+188292.828862     8254988.827160
+188292.818771     8254989.453714
+188292.808704     8254990.078739
+188292.182448     8254990.069099
+188280.840641     8254994.903604
+188263.887270     8254998.399844
+188241.747755     8255013.084786
+188209.547641     8255030.746885
+188182.302612     8255051.614215
+188151.353507     8255069.294042
+188127.831158     8255092.098800
+188111.887596     8255110.636310
+188105.419455     8255123.683878
+188100.929342     8255130.502446
+188100.142566     8255140.506978
+188091.060764     8255160.403526
+188078.013579     8255193.384638
+188062.433388     8255228.206886
+188051.959475     8255256.846760
+188050.466170     8255271.849501
+188049.628962     8255284.985272
+188050.042764     8255298.138771
+188058.176918     8255337.081713
+188066.028411     8255393.551338
+188076.190616     8255423.135564
+188086.958181     8255453.979468
+188098.301215     8255487.962718
+188117.302876     8255512.673921
+188130.088427     8255534.784134
+188136.092847     8255550.528994
+188148.303312     8255569.499869
+188160.110528     8255613.508434
+188172.685153     8255648.762530
+188187.135465     8255684.047027
+188199.619344     8255724.935520
+188215.946897     8255760.248913
+188229.832978     8255791.767528
+188242.608462     8255814.502767
+188252.245631     8255837.816408
+188257.594310     8255855.429773
+188258.744482     8255861.708451
+188258.734391     8255862.335005
+188259.309478     8255865.474344
+188265.424801     8255874.333228
+188269.068379     8255881.276995
+188269.058313     8255881.902021
+188269.048222     8255882.528574
+188269.028064     8255883.780153
+188270.218552     8255887.555674
+188273.800894     8255898.254167
+188279.169731     8255914.615952
+188286.314257     8255937.264516
+188291.057602     8255953.616674
+188291.531876     8255963.015436
+188298.101316     8255982.524660
+188302.673285     8256009.517531
+188309.807720     8256032.792648
+188317.417169     8256065.468068
+188322.624721     8256091.844012
+188322.513843     8256098.728461
+188322.312219     8256111.247306
+188322.050098     8256127.522416
+188321.737570     8256146.927238
+188315.894922     8256159.984434
+188315.178684     8256165.609203
+188310.778553     8256166.793363
+188310.758395     8256168.044942
+188310.748304     8256168.671495
+188304.481788     8256169.200217
+188303.836138     8256170.442168
+188292.504397     8256174.651648
+188286.732312     8256183.327553
+188276.661647     8256186.929736
+188265.934502     8256192.398883
+188235.702375     8256204.455480
+188197.992297     8256214.518374
+188178.546284     8256217.349536
+188178.536193     8256217.976090
+188174.782476     8256217.918310
+188173.531491     8256217.899054
+188168.536116     8256217.195454
+188162.965631     8256213.354042
+188149.292491     8256207.507782
+188123.762167     8256199.601940
+188087.635758     8256189.027690
+188047.089800     8256180.890718
+188017.189976     8256172.290909
+187974.726820     8256166.629733
+187934.080074     8256164.750655
+187896.561530     8256162.921258
+187859.032894     8256161.718414
+187817.114600     8256161.073181
+187770.181156     8256160.975933
+187723.207372     8256163.383371
+187666.899319     8256162.516643
+187625.677463     8256157.499754
+187560.670724     8256152.741935
+187504.372737     8256151.250181
+187448.155429     8256144.749055
+187398.790173     8256140.233528
+187344.358978     8256139.395689
+187300.634389     8256134.340277
+187254.962378     8256133.637265
+187201.227264     8256128.426236
+187152.517749     8256122.042204
+187114.454366     8256115.195334
+187053.231568     8256108.618690
+187011.555620     8256092.949932
+186972.957085     8256080.460560
+186939.242663     8256075.559230
+186904.206694     8256075.019935
+186870.320897     8256080.759318
+186832.651159     8256088.317527
+186802.569868     8256090.984984
+186773.164475     8256090.532358
+186742.618976     8256083.176028
+186696.512648     8256070.569563
+186662.213049     8256063.155447
+186631.132422     8256050.155086
+186588.729787     8256040.736117
+186546.306971     8256032.570256
+186511.371432     8256025.771532
+186470.805316     8256018.886139
+186428.271597     8256017.606253
+186392.064916     8256012.039853
+186349.591693     8256007.003702
+186305.231163     8256002.563682
+186270.195194     8256002.024386
+186225.219239     8255996.949712
+186177.044495     8255996.208177
+186140.706753     8255998.779331
+186106.286209     8255998.874690
+186067.435644     8256002.033874
+186035.527900     8256001.542730
+186001.823570     8255996.014847
+185949.340179     8255990.824614
+185910.741644     8255978.335242
+185883.384510     8255967.269264
+185860.396851     8255956.898782
+185827.439365     8255943.869531
+185793.280918     8255927.691307
+185756.610054     8255912.099591
+185716.154817     8255898.329750
+185681.935898     8255885.906262
+185642.025498     8255877.153893
+185595.899013     8255865.799006
+185552.870862     8255856.371938
+185527.915624     8255851.605435
+185504.312565     8255840.598771
+185465.673714     8255830.612557
+185436.449788     8255818.892664
+185410.404492     8255804.091212
+185384.995138     8255788.674368
+185350.776218     8255776.250881
+185314.104947     8255760.660687
+185279.310942     8255745.097860
+185240.793061     8255727.600644
+185209.752748     8255712.097125
+185187.481710     8255696.101879
+185164.766264     8255668.829733
+185139.427115     8255649.030065
+185105.329141     8255629.097104
+185067.992063     8255616.000440
+185047.487005     8255606.918532
+185016.961663     8255598.310624
+184976.466136     8255587.042412
+184929.774606     8255571.924689
+184899.289247     8255560.810560
+184863.728215     8255554.002208
+184823.222573     8255543.362078
+184787.661732     8255536.553730
+184762.736743     8255529.909094
+184725.319010     8255521.820274
+184690.353438     8255516.898157
+184665.973477     8255515.270997
+184657.214485     8255515.136173
+184653.460577     8255515.078391
+184635.942401     8255514.808740
+184595.880999     8255515.443980
+184563.287075     8255518.699470
+184533.175344     8255523.245057
+184505.495783     8255532.210458
+184480.863792     8255546.231854
+184451.892549     8255557.681151
+184429.177757     8255569.226751
+184413.385413     8255578.375127
+184393.839160     8255587.465721
+184373.596827     8255600.929505
+184361.528168     8255612.012268
+184352.647991     8255619.389971
+184348.248432     8255620.574140
+184348.187960     8255624.328876
+184342.446290     8255631.128180
+184337.350294     8255636.684005
+184333.455234     8255645.390332
+184323.263599     8255656.503515
+184311.729687     8255673.230304
+184306.643948     8255678.161106
+184292.233840     8255679.191186
+184264.634933     8255683.148743
+184225.088312     8255690.679590
+184177.448530     8255695.580555
+184144.148268     8255703.834258
+184116.458449     8255713.424681
+184073.147828     8255721.524299
+184043.661996     8255726.077992
+184025.397143     8255733.311240
+184012.188187     8255737.490296
+183991.451065     8255742.805363
+183960.068001     8255748.583270
+183929.946370     8255753.755414
+183905.384967     8255763.393991
+183879.572174     8255773.014836
+183850.590840     8255785.090686
+183817.835440     8255798.360333
+183791.336681     8255811.726286
+183762.355347     8255823.802136
+183723.959090     8255837.611664
+183681.809114     8255851.363413
+183652.837871     8255862.812710
+183630.143236     8255873.106731
+183601.817809     8255883.315608
+183563.461891     8255894.620450
+183557.000000     8255896.915596
+END
+LINE3D
+HEIGHT 1110.000000
+183557.000000     8255579.169455
+183557.906957     8255578.982443
+183600.551555     8255573.377881
+183643.327214     8255559.635763
+183675.557742     8255540.097062
+183704.690294     8255518.632078
+183733.086285     8255504.041911
+183752.622446     8255495.577870
+183769.070722     8255484.560993
+183783.682263     8255471.012064
+183808.425157     8255450.104692
+183841.967524     8255426.830516
+183878.002201     8255404.218356
+183905.237712     8255383.977589
+183932.442808     8255365.613423
+183962.100232     8255350.417492
+183994.270097     8255334.633525
+184010.708281     8255324.243201
+184019.608425     8255315.613916
+184025.360353     8255308.189590
+184036.167580     8255297.712590
+184053.352417     8255279.820895
+184066.712807     8255266.251180
+184075.612926     8255257.623423
+184091.445585     8255245.971889
+184122.374366     8255229.542110
+184143.333079     8255210.456616
+184152.374540     8255193.064753
+184164.554103     8255175.096014
+184181.940398     8255144.683943
+184200.547978     8255116.170796
+184223.514634     8255088.975108
+184252.162630     8255058.737913
+184270.245362     8255023.954185
+184282.495489     8255001.604155
+184286.430864     8254990.394671
+184287.742536     8254986.657665
+184292.233006     8254979.840630
+184301.849554     8254965.588107
+184317.823365     8254945.172464
+184335.643786     8254926.663844
+184350.911449     8254911.246417
+184359.771254     8254905.121818
+184367.430098     8254895.848246
+184376.280002     8254890.350204
+184384.473808     8254886.719132
+184394.484167     8254886.873217
+184414.524851     8254885.929806
+184440.176336     8254886.324650
+184471.398115     8254890.560902
+184494.486561     8254894.673490
+184514.436524     8254899.362948
+184528.110045     8254905.209214
+184540.471728     8254914.790954
+184552.207727     8254924.363064
+184567.637163     8254937.747692
+184594.217420     8254958.191645
+184635.066252     8254986.369620
+184655.935088     8255011.734744
+184668.841608     8255026.333956
+184676.723078     8255042.107708
+184685.734754     8255065.411721
+184693.535378     8255086.193315
+184705.614807     8255113.300216
+184714.485331     8255145.368338
+184727.765696     8255175.625741
+184740.561529     8255197.109404
+184745.465801     8255203.445868
+184748.573868     8255204.745598
+184749.189460     8255205.381783
+184755.395505     8255208.607797
+184762.166735     8255215.599708
+184777.051142     8255223.966862
+184790.734564     8255229.186571
+184801.350448     8255230.601866
+184805.730040     8255230.669279
+184812.622049     8255230.150185
+184827.778834     8255221.617206
+184857.325163     8255213.307249
+184888.062386     8255208.771290
+184910.040617     8255204.100507
+184935.692293     8255204.495353
+184963.159948     8255208.675348
+184989.366552     8255213.461113
+185008.650493     8255220.645626
+185019.730942     8255232.086243
+185038.177700     8255252.405000
+185057.108822     8255281.495965
+185076.080236     8255308.085300
+185091.348362     8255331.485616
+185108.019073     8255345.516060
+185123.448483     8255358.902217
+185146.355487     8255374.280543
+185168.586210     8255392.778947
+185192.754647     8255407.551509
+185216.317367     8255421.062859
+185251.656617     8255441.641635
+185278.912963     8255458.965507
+185303.686735     8255474.999276
+185321.638654     8255487.172372
+185342.093331     8255499.382463
+185371.902816     8255513.615147
+185397.312146     8255529.033519
+185420.874891     8255542.543340
+185451.985767     8255553.665569
+185479.998642     8255562.863041
+185503.631950     8255571.991573
+185525.418623     8255579.214610
+185549.072471     8255587.091568
+185573.957145     8255596.239361
+185598.851886     8255604.762129
+185626.935349     8255609.576783
+185643.141470     8255613.583434
+185652.465649     8255617.484154
+185659.953308     8255618.851297
+185669.267420     8255623.377042
+185681.154446     8255623.560015
+185703.677897     8255623.906710
+185725.565382     8255624.870324
+185738.683618     8255626.324137
+185738.673551     8255626.949163
+185746.090622     8255632.699125
+185759.703671     8255642.300127
+185777.655615     8255654.471694
+185793.236244     8255658.468717
+185806.324613     8255661.800669
+185821.955672     8255662.666452
+185838.787668     8255666.682736
+185847.415409     8255674.955112
+185857.345304     8255680.117045
+185862.279824     8255684.575376
+185881.432728     8255699.895917
+185895.106250     8255705.742182
+185903.734397     8255714.013036
+185904.339707     8255715.275771
+185907.962389     8255723.469578
+185917.831787     8255732.387775
+185921.514941     8255736.826845
+185935.793797     8255743.934317
+185946.985150     8255748.488958
+185951.313954     8255751.686076
+185961.829026     8255759.360795
+185977.934717     8255769.626874
+185988.459499     8255776.675033
+185995.856412     8255783.676574
+186006.946571     8255794.490631
+186019.853473     8255809.089849
+186024.717430     8255817.929471
+186033.900482     8255830.592771
+186036.867398     8255840.656610
+186037.492890     8255840.666238
+186038.118764     8255840.675872
+186041.872482     8255840.733652
+186052.518615     8255840.270815
+186076.111583     8255851.904032
+186104.063986     8255864.856241
+186109.069070     8255864.933283
+186112.197295     8255864.981434
+186121.581970     8255865.125889
+186139.655266     8255869.786461
+186154.670899     8255870.017591
+186158.364120     8255873.831635
+186162.723554     8255875.150627
+186167.032582     8255879.599331
+186167.597577     8255883.365224
+186176.296288     8255887.254787
+186186.245959     8255891.165135
+186196.861843     8255892.580430
+186204.319254     8255895.825706
+186214.309264     8255897.231368
+186214.299173     8255897.857922
+186219.364754     8255894.178698
+186237.094429     8255881.304475
+186256.055338     8255869.699564
+186271.212099     8255861.168113
+186284.451304     8255855.110925
+186298.296225     8255850.314949
+186310.809126     8255850.507556
+186325.198886     8255850.729052
+186335.209435     8255850.883140
+186338.963153     8255850.940920
+186347.177116     8255846.058269
+186365.421787     8255840.078127
+186378.630744     8255835.899071
+186393.646377     8255836.130201
+186405.523695     8255836.939733
+186426.694585     8255843.526583
+186454.788139     8255847.714684
+186488.472312     8255854.494146
+186512.761336     8255861.755701
+186540.108404     8255873.446703
+186561.844695     8255883.797924
+186582.359845     8255892.253278
+186601.684506     8255896.933112
+186622.250061     8255902.258755
+186644.036735     8255909.481792
+186659.041920     8255910.337941
+186671.534639     8255911.783654
+186676.540104     8255911.860702
+186677.165597     8255911.870330
+186680.919314     8255911.928109
+186707.196482     8255912.332583
+186747.933997     8255908.575735
+186775.573410     8255902.115023
+186800.043901     8255898.109312
+186830.771249     8255894.198381
+186865.807218     8255894.737676
+186891.438711     8255896.385630
+186902.064687     8255897.174372
+186910.823488     8255897.309193
+186936.979687     8255905.224668
+186983.166669     8255912.823290
+187024.933363     8255922.857651
+187059.273276     8255927.768608
+187094.299536     8255928.934463
+187132.413325     8255932.651621
+187160.567351     8255933.084985
+187186.834453     8255934.114485
+187205.533216     8255938.786212
+187213.656458     8255939.536431
+187226.098796     8255944.110327
+187247.814905     8255955.714655
+187272.013590     8255968.609085
+187291.883090     8255978.306390
+187325.566881     8255985.085846
+187371.127989     8255992.674834
+187396.022730     8256001.197602
+187409.776930     8256002.034495
+187419.777389     8256002.815137
+187435.973444     8256007.446813
+187460.363662     8256008.448951
+187490.999882     8256010.172412
+187503.502716     8256010.990044
+187503.492625     8256011.616597
+187507.872217     8256011.684011
+187522.362788     8256005.646084
+187534.946252     8256001.457400
+187547.459153     8256001.650006
+187564.977138     8256001.919654
+187590.002939     8256002.304866
+187626.290657     8256002.863429
+187651.941951     8256003.258270
+187680.721469     8256003.701262
+187701.993553     8256004.028695
+187713.880962     8256004.211673
+187737.655397     8256004.577624
+187762.610635     8256009.344127
+187784.447714     8256013.437453
+187808.787169     8256017.567768
+187825.588916     8256023.462185
+187850.534087     8256028.853713
+187869.848658     8256034.160100
+187882.280904     8256039.360550
+187894.733307     8256043.309421
+187907.861634     8256044.136681
+187934.764294     8256044.550783
+187954.895890     8256037.974506
+187977.509704     8256032.686798
+187988.953087     8256021.592882
+187998.579702     8256006.715333
+188006.601288     8255974.907225
+188015.894755     8255941.868334
+188024.532125     8255910.696413
+188024.945464     8255885.032169
+188020.948963     8255861.178644
+188013.864934     8255834.773815
+188000.382945     8255817.035258
+187980.846130     8255786.681552
+187960.128513     8255751.927294
+187945.526575     8255726.033454
+187934.728786     8255697.066153
+187921.952920     8255674.330908
+187907.381256     8255646.557408
+187896.452025     8255625.727657
+187890.447604     8255609.982797
+187880.790279     8255587.920735
+187866.894488     8255557.028679
+187855.359922     8255534.937721
+187843.159549     8255515.340293
+187832.341577     8255487.626100
+187820.534361     8255443.617534
+187808.565835     8255409.624657
+187798.333042     8255384.423249
+187786.465353     8255344.169421
+187774.042711     8255299.526202
+187765.717024     8255272.475552
+187762.094367     8255264.280218
+187758.511643     8255253.581719
+187752.497157     8255238.461885
+187741.870719     8255198.855400
+187733.070758     8255162.405988
+187729.094414     8255137.300883
+187729.356535     8255121.025773
+187734.694686     8255100.446420
+187739.396489     8255080.483980
+187740.728510     8255075.495398
+187743.947456     8255069.910680
+187754.785122     8255057.555552
+187770.738776     8255038.391488
+187790.395715     8255022.416443
+187808.166112     8255007.037540
+187826.591868     8254989.790126
+187851.355110     8254967.631177
+187877.904465     8254951.135516
+187901.264717     8254938.347962
+187922.123024     8254925.520368
+187946.068834     8254915.245606
+187979.409411     8254904.488745
+188014.606690     8254895.012353
+188039.218689     8254882.244066
+188060.127020     8254866.286755
+188084.324861     8254840.363436
+188108.422271     8254820.699546
+188135.616919     8254802.960399
+188159.633675     8254788.304353
+188181.107383     8254776.112940
+188203.801827     8254765.818916
+188220.764501     8254761.697640
+188234.024652     8254754.387356
+188249.786748     8254747.117112
+188262.390369     8254741.676849
+188269.988550     8254736.158011
+188283.247913     8254728.849244
+188304.600639     8254724.169597
+188334.803294     8254713.990379
+188380.555565     8254709.686306
+188411.948708     8254703.282609
+188440.173310     8254699.333919
+188467.711923     8254699.131865
+188497.116935     8254699.584486
+188515.886286     8254699.873395
+188534.574982     8254705.170148
+188548.329553     8254706.007812
+188570.741730     8254713.239713
+188587.512871     8254721.010728
+188613.679518     8254728.301184
+188638.624665     8254733.694241
+188661.712753     8254737.805294
+188684.791514     8254742.542913
+188719.141494     8254746.828845
+188752.905558     8254748.600452
+188773.491652     8254752.674522
+188797.185814     8254758.048322
+188853.221680     8254775.815186
+188894.453627     8254780.205521
+188921.982162     8254780.629257
+188944.595951     8254775.343077
+188969.097072     8254769.459239
+188989.278717     8254759.751717
+189012.003410     8254747.579560
+189035.485407     8254727.280252
+189060.298279     8254701.992345
+189096.918681     8254681.894507
+189135.476033     8254658.070816
+189162.045940     8254640.322818
+189177.343088     8254623.027247
+189184.477825     8254607.484633
+189192.156635     8254596.959479
+189197.353647     8254585.143470
+189205.022378     8254575.244106
+189213.357693     8254562.850459
+189224.194977     8254550.495324
+189248.847317     8254535.222352
+189271.047329     8254516.781145
+189282.469778     8254506.939560
+189287.616383     8254498.253263
+189296.012183     8254482.104115
+189314.427478     8254465.482485
+189337.848990     8254448.938678
+189371.805363     8254438.817240
+189401.301095     8254433.636991
+189418.283939     8254428.263372
+189435.307874     8254420.385842
+189451.705540     8254412.499437
+189478.759800     8254403.524411
+189517.771281     8254390.350297
+189546.247901     8254370.753814
+189585.319866     8254353.824200
+189618.126054     8254337.424847
+189657.742857     8254325.512704
+189688.601241     8254313.465747
+189715.070336     8254301.977171
+189752.134000     8254293.156216
+189779.137854     8254287.310901
+189786.080282     8254283.661332
+189786.705774     8254283.670960
+189790.460255     8254283.728751
+189802.983234     8254283.295568
+189802.993326     8254282.669014
+189807.443099     8254278.355131
+189808.764647     8254273.993097
+189809.411073     8254272.750394
+189813.245432     8254267.801094
+189822.014707     8254267.309367
+189832.761258     8254260.587865
+189840.369505     8254254.444002
+189873.054723     8254245.555651
+189909.038778     8254226.074727
+189956.789272     8254214.287783
+189988.323554     8254199.120742
+190023.440941     8254194.652205
+190053.067734     8254181.334401
+190071.927819     8254175.989677
+190088.365812     8254165.599350
+190102.251443     8254158.299458
+190144.340731     8254148.303971
+190179.013316     8254132.559292
+190209.962433     8254114.878701
+190230.749401     8254106.433150
+190259.660744     8254098.738599
+190277.884481     8254094.010789
+190286.724319     8254089.137772
+190297.451476     8254083.667861
+190320.902473     8254065.245909
+190340.609831     8254046.140389
+190349.641202     8254029.375080
+190355.352815     8254024.453912
+190361.962107     8254002.642235
+190370.468034     8253979.607864
+190374.434218     8253966.521020
+190382.133198     8253954.743523
+190396.896352     8253931.804703
+190410.458150     8253905.717667
+190418.399082     8253878.917403
+190423.051243     8253862.084687
+190427.803452     8253838.992536
+190431.889855     8253818.393915
+190432.141885     8253802.745358
+190432.928674     8253792.740062
+190433.261358     8253772.083662
+190433.180254     8253738.272998
+190428.770333     8253701.265980
+190424.753292     8253678.664028
+190415.620647     8253662.871016
+190409.051219     8253643.361028
+190401.179637     8253626.961483
+190389.029657     8253604.235107
+190368.222070     8253575.114494
+190351.258170     8253540.418016
+190342.992968     8253509.611865
+190332.215718     8253479.392992
+190324.021080     8253444.205551
+190308.924342     8253410.163758
+190293.918324     8253370.489095
+190280.536766     8253346.491109
+190267.610076     8253333.144240
+190249.768653     8253314.086690
+190237.558188     8253295.115816
+190221.583928     8253276.712952
+190204.519979     8253248.275908
+190188.665924     8253222.362030
+190175.113742     8253209.005533
+190162.772229     8253198.171449
+190144.819915     8253185.999112
+190126.938165     8253169.445484
+190103.516954     8253147.171560
+190083.172799     8253128.075487
+190065.937462     8253110.279920
+190053.626186     8253097.568468
+190030.123569     8253080.301612
+189992.241641     8253062.188240
+189961.947814     8253039.181819
+189940.372832     8253018.814911
+189928.172446     8252999.218247
+189911.633178     8252977.050254
+189888.281779     8252950.394264
+189870.500841     8252927.581213
+189858.835214     8252913.627811
+189854.022057     8252901.657719
+189849.177888     8252891.565749
+189845.726607     8252872.729701
+189840.629958     8252839.467780
+189840.952551     8252819.437933
+189841.013036     8252815.682432
+189841.023127     8252815.055878
+189841.819995     8252804.424793
+189850.800960     8252790.789196
+189861.669256     8252776.555940
+189880.700716     8252760.570503
+189915.403550     8252742.947692
+189946.291419     8252729.022590
+189973.951001     8252721.309535
+190006.009964     8252712.411545
+190048.190748     8252696.782436
+190076.031810     8252677.801351
+190098.887550     8252657.492403
+190124.972341     8252630.971420
+190150.461875     8252602.563441
+190175.780034     8252584.796175
+190189.755622     8252571.863402
+190205.043443     8252555.194397
+190218.494364     8252535.991809
+190231.976271     8252514.912629
+190248.726792     8252485.117480
+190264.085189     8252464.066420
+190283.146898     8252446.202851
+190303.479748     8252427.106959
+190315.740156     8252404.130379
+190330.563031     8252377.436045
+190344.710758     8252353.862571
+190356.254189     8252336.509221
+190366.486902     8252322.892891
+190377.979927     8252308.669252
+190386.860080     8252301.293077
+190393.873083     8252293.261453
+190400.845759     8252287.733750
+190421.038234     8252277.401215
+190440.715356     8252260.173063
+190455.347449     8252245.371797
+190469.968687     8252231.197074
+190482.733618     8252215.741123
+190495.528797     8252198.407040
+190512.784592     8252176.133297
+190518.797877     8252152.433848
+190519.766884     8252131.162062
+190519.644688     8252099.855309
+190509.573586     8252064.638220
+190503.770789     8252036.374514
+190500.056937     8251994.995070
+190499.985147     8251960.558605
+190496.564102     8251939.845189
+190492.426843     8251924.755014
+190492.658716     8251910.358036
+190491.608592     8251897.819923
+190491.880779     8251880.919788
+190490.992716     8251858.366763
+190490.810799     8251830.815522
+190491.173720     8251808.281753
+190487.136510     8251786.932144
+190481.949891     8251759.303868
+190475.561166     8251728.526601
+190467.781081     8251706.493434
+190463.632968     8251692.029801
+190458.174161     8251681.301661
+190447.164275     8251665.479753
+190426.416409     8251632.603628
+190405.002735     8251602.221032
+190397.696924     8251589.586628
+190393.953286     8251588.903059
+190394.023849     8251584.521769
+190390.410507     8251575.700633
+190378.765814     8251560.494899
+190372.751315     8251545.375828
+190364.940218     8251525.220783
+190357.906607     8251495.685478
+190349.651484     8251464.253538
+190344.403604     8251440.381515
+190338.399184     8251424.636655
+190329.932358     8251406.349350
+190323.423415     8251383.083860
+190317.550055     8251359.201445
+190307.922978     8251335.261250
+190300.626482     8251322.001045
+190292.664930     8251311.235145
+190281.624808     8251297.290606
+190271.231087     8251282.104892
+190258.455627     8251259.368125
+190249.322982     8251243.575113
+190239.483426     8251232.780306
+190227.858890     8251216.322993
+190214.336192     8251201.088352
+190199.552431     8251186.460244
+190179.118306     8251172.997816
+190155.656004     8251153.227802
+190137.370556     8251122.893358
+190120.911930     8251095.718285
+190106.218902     8251075.456544
+190099.568820     8251060.954399
+190090.325284     8251052.046600
+190081.071669     8251043.764590
+190068.750301     8251031.679692
+190047.700011     8251017.581070
+190030.544565     8250994.777648
+190017.194007     8250968.902305
+190001.280231     8250946.743940
+189989.745665     8250924.652982
+189980.007697     8250907.598000
+189972.146193     8250890.572665
+189962.014593     8250859.111841
+189948.633035     8250835.113855
+189932.113924     8250811.694283
+189914.282580     8250792.010944
+189902.112443     8250770.536148
+189890.557719     8250749.696769
+189877.872980     8250721.327132
+189860.688050     8250700.401854
+189842.876876     8250679.466172
+189821.826573     8250665.368315
+189800.181027     8250649.382697
+189774.842248     8250629.583799
+189752.086093     8250604.815569
+189737.373660     8250585.806183
+189712.630137     8250567.894281
+189687.270437     8250549.346950
+189661.275917     8250531.416556
+189642.708190     8250518.608802
+189629.791591     8250504.635379
+189616.289051     8250488.149159
+189607.105999     8250475.485859
+189599.830425     8250460.974086
+189590.717949     8250443.928731
+189574.753767     8250424.900077
+189553.774040     8250406.420166
+189537.093633     8250393.015517
+189517.849244     8250383.327834
+189499.261347     8250371.772422
+189485.598274     8250365.301137
+189473.276918     8250353.215475
+189447.817170     8250340.927578
+189411.125742     8250326.588963
+189378.258607     8250307.926073
+189354.050606     8250295.657445
+189337.944521     8250285.392123
+189318.710975     8250275.078663
+189299.527847     8250261.634726
+189280.465676     8250240.680552
+189266.468704     8250216.047149
+189254.258239     8250197.076275
+189245.034860     8250186.916896
+189235.216238     8250174.869758
+189224.772123     8250162.812991
+189216.789650     8250153.298658
+189216.184315     8250152.037452
+189215.568902     8250151.402034
+189214.962816     8250150.140051
+189210.028677     8250145.681726
+189206.285038     8250144.998157
+189200.099164     8250140.519799
+189199.482987     8250139.884370
+189198.242081     8250139.239325
+189194.498442     8250138.555756
+189188.302489     8250134.703188
+189187.050740     8250134.683920
+189182.732015     8250130.861012
+189178.988377     8250130.177443
+189178.423369     8250126.412314
+189172.187089     8250125.063668
+189167.877679     8250120.614958
+189167.887757     8250119.989169
+189163.599281     8250114.288128
+189158.684548     8250108.577448
+189154.385981     8250103.502960
+189153.154402     8250102.231350
+189148.220264     8250097.773024
+189140.247870     8250087.632902
+189132.831168     8250081.883709
+189126.665451     8250076.153773
+189122.356041     8250071.705063
+189121.740640     8250071.068882
+189120.489655     8250071.049626
+189115.484189     8250070.972579
+189109.873389     8250069.634325
+189106.119671     8250069.576545
+189100.488713     8250069.489870
+189091.679888     8250072.484766
+189087.229351     8250076.798637
+189079.419480     8250095.461347
+189077.673750     8250126.113403
+189085.181949     8250126.228974
+189093.304797     8250126.979950
+189097.674679     8250127.673923
+189097.654522     8250128.925502
+189104.415495     8250136.542435
+189104.395325     8250137.794778
+189104.839363     8250149.070908
+189104.738551     8250155.330331
+189103.981998     8250163.458258
+189098.189744     8250173.386506
+189091.287631     8250174.532918
+189081.227057     8250177.508547
+189066.312236     8250171.017994
+189053.335152     8250160.800072
+189046.018486     8250148.792210
+189046.109219     8250143.158577
+189045.554303     8250138.766894
+189041.961882     8250128.694191
+189033.969331     8250119.805648
+189029.045271     8250114.721533
+189020.497790     8250101.442071
+189003.261703     8250083.645728
+188990.345091     8250069.673070
+188982.898153     8250065.801246
+188982.918311     8250064.549667
+188978.548416     8250063.856458
+188967.367918     8250058.675276
+188942.473165     8250050.153272
+188921.342220     8250041.062495
+188902.663603     8250035.139952
+188887.718533     8250030.527532
+188870.291663     8250024.624257
+188853.489522     8250018.730598
+188838.564622     8250012.865835
+188832.378735     8250008.388241
+188824.871300     8250008.272682
+188812.358399     8250008.080076
+188791.146800     8250003.997142
+188778.028577     8250002.542565
+188768.088973     8249998.007192
+188753.698831     8249997.785690
+188740.550360     8249998.209246
+188740.540281     8249998.835035
+188739.894619     8250000.077750
+188727.200264     8250011.151646
+188711.922521     8250027.194863
+188696.069680     8250040.099504
+188680.842344     8250053.013009
+188661.831041     8250067.746867
+188639.015628     8250085.551892
+188621.235140     8250101.557349
+188604.787068     8250112.573466
+188589.075366     8250116.714762
+188566.481734     8250120.749364
+188547.016327     8250124.832117
+188530.042798     8250129.579935
+188514.230297     8250139.979890
+188502.182343     8250149.812611
+188490.103401     8250161.521925
+188469.759696     8250181.244359
+188436.167483     8250207.649018
+188401.898596     8250237.174514
+188373.462290     8250254.267839
+188352.674572     8250262.712614
+188324.995583     8250271.678024
+188285.448580     8250279.208865
+188253.470272     8250283.099011
+188229.685364     8250283.359608
+188217.111979     8250286.922503
+188206.990920     8250293.653632
+188189.371742     8250299.643402
+188169.250594     8250305.594659
+188155.365357     8250312.893793
+188141.459951     8250321.445269
+188126.898803     8250331.865250
+188108.553702     8250344.104820
+188088.906447     8250359.454834
+188064.274660     8250373.475469
+188047.251107     8250381.353004
+188046.605075     8250382.594949
+188045.898928     8250387.593165
+188044.566919     8250392.580983
+188039.491260     8250396.885996
+188029.339953     8250405.495258
+188017.200514     8250420.960836
+188003.164059     8250437.649104
+187994.183476     8250451.284708
+187984.566928     8250465.537231
+187971.721343     8250486.001025
+187959.026988     8250497.074921
+187957.715137     8250500.811160
+187957.634482     8250505.819004
+187953.103672     8250515.140725
+187952.407617     8250519.512387
+187951.731336     8250522.632465
+187947.261011     8250528.198684
+187936.453963     8250538.676451
+187930.691957     8250546.726567
+187929.995889     8250551.098993
+187928.552990     8250562.972023
+187927.675085     8250578.610946
+187927.231510     8250606.152559
+187927.484372     8250629.322515
+187930.905417     8250650.035931
+187930.663466     8250665.058699
+187923.469008     8250684.356825
+187912.298658     8250717.368355
+187896.193799     8250745.920788
+187884.124924     8250757.005077
+187873.489264     8250756.841366
+187860.410986     8250752.882861
+187843.538651     8250751.371263
+187826.101321     8250746.093771
+187802.397449     8250741.346530
+187773.123117     8250732.756349
+187740.690311     8250725.996149
+187706.915787     8250724.850326
+187663.877175     8250716.049041
+187637.105575     8250707.497384
+187607.276314     8250694.516284
+187571.866501     8250678.318798
+187538.919093     8250664.663758
+187522.187897     8250654.388815
+187508.564769     8250645.413602
+187485.587215     8250634.415802
+187462.640278     8250621.540640
+187448.330779     8250616.312059
+187432.750138     8250612.315800
+187409.672153     8250607.577429
+187378.460464     8250602.714623
+187352.263951     8250597.302305
+187322.333878     8250590.580628
+187279.305357     8250581.152789
+187240.767318     8250564.907152
+187200.352421     8250548.632625
+187144.346804     8250528.987629
+187108.301407     8250513.407068
+187071.529337     8250504.075533
+187033.455876     8250497.854453
+187007.814661     8250496.833823
+186982.173064     8250495.813187
+186959.114854     8250489.823231
+186931.737920     8250480.010367
+186904.996557     8250469.581341
+186885.298445     8250449.242559
+186874.995075     8250428.423206
+186867.678804     8250416.414585
+186852.885346     8250402.412272
+186831.239800     8250386.426655
+186800.845149     8250369.680421
+186772.267255     8250356.718583
+186747.372501     8250348.196580
+186728.108337     8250339.760481
+186708.915117     8250326.943098
+186676.028194     8250309.532557
+186646.895001     8250292.179032
+186625.209128     8250278.697336
+186599.153742     8250264.522437
+186566.862075     8250248.998892
+186535.196282     8250233.484981
+186511.633550     8250219.974396
+186494.316807     8250207.185897
+186482.641484     8250193.858289
+186467.847644     8250179.855971
+186438.109116     8250161.241239
+186401.488251     8250142.521333
+186371.083904     8250126.400895
+186352.385128     8250121.729931
+186348.005537     8250121.662518
+186347.380045     8250121.652890
+186346.754170     8250121.643256
+186342.394736     8250120.324263
+186318.176276     8250108.681418
+186282.695886     8250096.865987
+186252.250842     8250083.248700
+186224.914223     8250070.932678
+186200.049730     8250060.531778
+186182.612388     8250055.255050
+186168.282731     8250051.278048
+186146.496058     8250044.055011
+186114.093870     8250035.417448
+186058.552448     8250025.797003
+186015.574334     8250013.239453
+185988.227635     8250001.549220
+185963.948308     8249993.661870
+185932.756790     8249987.546721
+185903.492524     8249978.331515
+185881.050110     8249972.976982
+185863.663186     8249964.569779
+185846.871505     8249958.050337
+185841.240547     8249957.963662
+185836.871416     8249957.270465
+185832.491825     8249957.203051
+185810.614406     8249955.614412
+185795.134577     8249945.358730
+185780.865799     8249937.625469
+185775.315483     8249932.531714
+185770.401133     8249926.821039
+185766.778094     8249918.625698
+185760.642613     8249911.018394
+185753.851404     8249905.278829
+185747.756250     8249895.167603
+185743.396828     8249893.847846
+185739.107958     8249888.147564
+185738.553041     8249883.755881
+185732.922083     8249883.669206
+185721.660549     8249883.495862
+185720.409182     8249883.476600
+185716.029973     8249883.409193
+185712.215389     8249887.106908
+185707.200214     8249887.656420
+185697.644163     8249898.152678
+185676.049485     8249917.855093
+185656.251393     8249942.594246
+185647.330901     8249952.475107
+185635.988725     8249957.308842
+185625.928151     8249960.284471
+185619.671700     8249960.188168
+185598.540756     8249951.097390
+185558.660999     8249940.466130
+185527.509796     8249931.847823
+185510.223302     8249917.181192
+185489.889607     8249897.459335
+185465.812286     8249877.053145
+185446.689248     8249859.854466
+185440.543688     8249852.872951
+185435.013924     8249846.526859
+185428.838128     8249841.422712
+185417.222908     8249824.339598
+185408.150747     8249804.791086
+185398.463185     8249784.606392
+185386.898370     8249764.393567
+185377.069669     8249752.972218
+185367.180089     8249745.307127
+185362.255659     8249740.222242
+185350.438815     8249735.657974
+185336.210352     8249725.421554
+185318.218093     8249715.753145
+185307.016674     8249711.823529
+185306.391182     8249711.813901
+185305.139815     8249711.794640
+185303.888449     8249711.775378
+185303.262957     8249711.765750
+185298.883365     8249711.698336
+185295.129647     8249711.640557
+185273.857563     8249711.313124
+185258.842312     8249711.082000
+185258.832221     8249711.708553
+185250.062959     8249712.199516
+185231.919100     8249711.920235
+185225.662650     8249711.823932
+185221.283440     8249711.756524
+185212.534335     8249710.995908
+185203.775152     8249710.861081
+185199.395942     8249710.793674
+185193.775075     8249710.080445
+185189.405562     8249709.387242
+185183.845550     8249704.919283
+185179.536534     8249700.469815
+185174.602013     8249696.011483
+185174.612092     8249695.385694
+185174.733074     8249687.873928
+185174.914528     8249676.607426
+185175.035510     8249669.095660
+185175.267370     8249654.699446
+185176.699822     8249643.451436
+185181.291116     8249630.374214
+185184.610887     8249618.529310
+185184.741935     8249610.392519
+185185.519027     8249601.013018
+185185.700494     8249589.745752
+185185.781148     8249584.737908
+185185.225838     8249580.346984
+185180.906731     8249576.524070
+185174.024788     8249576.418139
+185167.768338     8249576.321836
+185161.511887     8249576.225532
+185160.260521     8249576.206271
+185155.870851     8249576.764647
+185155.164704     8249581.762863
+185150.078978     8249586.692901
+185150.018493     8249590.448402
+185144.882348     8249598.508916
+185144.105256     8249607.888416
+185138.303304     8249618.442459
+185129.978068     8249630.210317
+185116.527160     8249649.412140
+185093.711734     8249667.217930
+185077.354001     8249672.601171
+185067.969325     8249672.456717
+185046.707702     8249671.503500
+185021.146760     8249665.475020
+184996.201613     8249660.081964
+184973.133312     8249654.718562
+184936.916552     8249649.777950
+184906.330547     8249644.924775
+184875.744542     8249640.071600
+184848.286775     8249635.265813
+184818.265777     8249634.177766
+184800.747793     8249633.908119
+184784.480983     8249633.657730
+184762.502753     8249638.328513
+184745.499560     8249644.953708
+184736.014073     8249651.068676
+184729.666889     8249656.606007
+184717.608105     8249667.063741
+184689.847889     8249681.036986
+184660.795992     8249697.494127
+184633.681629     8249710.224659
+184615.396822     8249718.708725
+184599.634726     8249725.978969
+184573.862260     8249733.095891
+184551.228109     8249739.634412
+184539.885921     8249744.468911
+184539.240080     8249745.710859
+184524.678945     8249756.130076
+184520.864539     8249759.828558
+184516.404306     8249764.768225
+184511.268161     8249772.828739
+184506.141917     8249780.262696
+184501.621377     8249788.958630
+184496.454805     8249798.896509
+184492.610354     8249804.472363
+184491.298503     8249808.208602
+184491.248097     8249811.338313
+184489.895919     8249817.578474
+184489.774937     8249825.090240
+184489.664046     8249831.975452
+184489.563234     8249838.234875
+184489.512828     8249841.364586
+184492.620896     8249842.664317
+184498.806770     8249847.142674
+184511.299513     8249848.586859
+184520.664031     8249849.982893
+184526.284898     8249850.696122
+184536.870343     8249853.989547
+184553.127074     8249854.865725
+184569.959081     8249858.881245
+184588.657869     8249863.551445
+184601.665201     8249871.891234
+184613.451798     8249878.333635
+184617.145031     8249882.146916
+184617.084546     8249885.902417
+184617.064376     8249887.154760
+184608.739522     8249898.922623
+184593.572861     8249908.080630
+184584.743305     8249912.327096
+184580.353635     8249912.885472
+184561.523799     8249916.352064
+184528.193300     8249926.483135
+184502.370440     8249936.729005
+184480.896923     8249948.920420
+184454.387883     8249962.912924
+184422.237996     8249977.444545
+184396.263918     8249997.079548
+184369.755068     8250011.072055
+184343.114980     8250033.201349
+184315.748586     8250061.580439
+184289.148825     8250081.205811
+184271.348562     8250098.462853
+184259.784400     8250117.067774
+184250.198101     8250129.442164
+184249.411312     8250139.447460
+184248.785628     8250139.437829
+184244.295146     8250146.255628
+184243.377105     8250164.398476
+184236.031430     8250193.085736
+184227.504760     8250217.372442
+184221.571557     8250236.064038
+184216.243867     8250256.017608
+184215.356075     8250272.282323
+184213.560321     8250306.064097
+184209.241868     8250341.058928
+184207.718505     8250357.939805
+184207.698335     8250359.192148
+184206.205030     8250374.194890
+184200.826934     8250397.278171
+184192.996523     8250417.192453
+184186.598934     8250425.859494
+184180.958088     8250426.398612
+184165.861990     8250431.175329
+184147.597353     8250438.407052
+184135.064283     8250439.466788
+184133.792759     8250440.699106
+184132.541392     8250440.679844
+184122.470740     8250444.281262
+184101.703357     8250451.475225
+184081.602188     8250456.174137
+184072.711944     8250464.176865
+184071.965483     8250471.678239
+184070.441916     8250488.559877
+184068.948611     8250503.562618
+184068.101325     8250517.324179
+184067.597264     8250548.621292
+184067.284749     8250568.025350
+184062.673285     8250582.354915
+184062.663206     8250582.980704
+184061.966960     8250587.352363
+184049.888197     8250599.062444
+184044.146539     8250605.860984
+184039.625808     8250614.556915
+184026.376333     8250621.239890
+184008.777694     8250625.978086
+184004.398103     8250625.910673
+183994.529074     8250616.993246
+183980.835370     8250612.400087
+183967.858096     8250602.182163
+183958.564141     8250596.404839
+183936.192100     8250586.669013
+183903.234613     8250573.639762
+183882.850524     8250557.046852
+183859.317838     8250541.658896
+183838.388708     8250520.049275
+183817.419251     8250500.943577
+183795.097616     8250488.078040
+183782.735933     8250478.496300
+183769.829222     8250463.897085
+183750.736624     8250444.820276
+183734.297976     8250416.392857
+183715.467487     8250381.041703
+183700.239688     8250355.137464
+183678.028943     8250335.386715
+183658.936345     8250316.309907
+183639.854029     8250296.606547
+183620.922728     8250267.514816
+183601.981348     8250239.048873
+183588.418704     8250226.318160
+183575.471857     8250214.222869
+183557.000000     8250201.635035
+END
+LINE3D
+HEIGHT 1120.000000
+183557.000000     8255163.135756
+183566.649126     8255152.744035
+183582.592688     8255134.206525
+183602.380879     8255110.093928
+183628.576764     8255076.686972
+183644.893325     8255034.989903
+183656.103800     8254999.475213
+183665.326538     8254970.816081
+183679.665428     8254935.349545
+183693.418976     8254897.368692
+183707.021280     8254868.778502
+183719.927363     8254844.558443
+183733.428664     8254822.227672
+183749.644414     8254786.790026
+183764.649328     8254748.828435
+183777.161575     8254710.203295
+183787.151123     8254672.791214
+183795.576339     8254615.945421
+183807.533466     8254572.929360
+183824.768081     8254513.088679
+183844.818393     8254472.700972
+183858.370113     8254447.239726
+183868.602254     8254433.623387
+183875.040171     8254422.452424
+183884.828094     8254397.559187
+183897.814807     8254368.332813
+183908.268741     8254340.945285
+183914.978846     8254312.874186
+183919.216657     8254282.886434
+183919.640062     8254256.597164
+183920.164280     8254224.048472
+183920.708668     8254190.247437
+183916.298186     8254153.239645
+183912.008865     8254108.720856
+183912.613738     8254071.164319
+183918.042239     8254044.951327
+183924.742253     8254017.506781
+183930.705896     8253996.937056
+183935.196187     8253990.119254
+183935.206266     8253989.493465
+183935.892446     8253985.746831
+183937.153891     8253985.140303
+183944.762329     8253978.996442
+183952.370958     8253972.852585
+183961.230762     8253966.727986
+183961.927009     8253962.356326
+183962.693832     8253953.602613
+183967.950946     8253938.031097
+183976.356442     8253921.256154
+183977.193841     8253908.120386
+183978.707316     8253891.865302
+183978.969425     8253875.590956
+183979.060158     8253869.957322
+183979.070237     8253869.331533
+183978.757069     8253849.917844
+183975.063645     8253846.104561
+183968.504117     8253825.968016
+183960.774056     8253800.805132
+183960.450809     8253782.017233
+183955.869131     8253755.650922
+183949.480979     8253724.873664
+183945.625605     8253692.257558
+183941.770434     8253659.640691
+183931.053097     8253625.666308
+183926.360528     8253606.185209
+183916.057158     8253585.365856
+183903.432916     8253553.239955
+183897.347841     8253542.502939
+183896.843128     8253534.982306
+183888.366414     8253517.320793
+183882.341836     8253502.827512
+183881.090470     8253502.808250
+183871.301893     8253488.883741
+183856.074094     8253462.979502
+183851.250476     8253451.635195
+183851.431931     8253440.368692
+183850.301546     8253432.837665
+183846.073363     8253423.381120
+183837.001203     8253403.832608
+183832.076582     8253398.747720
+183820.350662     8253388.549821
+183815.547202     8253375.953934
+183811.389392     8253362.116096
+183810.440462     8253343.318566
+183815.122489     8253324.607712
+183821.570485     8253312.810959
+183825.465533     8253304.105397
+183833.871029     8253287.330454
+183843.648874     8253263.063007
+183848.996913     8253241.857861
+183853.688828     8253222.521214
+183860.429181     8253192.571983
+183869.217960     8253152.010931
+183881.669722     8253117.141292
+183893.919860     8253094.790498
+183907.996642     8253075.598309
+183920.206466     8253055.750673
+183929.974220     8253032.109780
+183935.342225     8253009.653052
+183941.981766     8252985.963244
+183951.961235     8252949.176951
+183964.029456     8252899.274917
+183973.423557     8252859.975836
+183978.246533     8252832.501634
+183982.554908     8252798.132591
+183983.906445     8252753.073920
+183988.890909     8252715.584797
+183997.487951     8252686.916799
+184007.316202     8252659.519641
+184011.947824     8252643.938497
+184015.207097     8252635.849858
+184018.476462     8252627.134665
+184021.826468     8252613.412392
+184022.724161     8252596.521120
+184022.966112     8252581.498353
+184018.707681     8252573.919941
+184013.177726     8252567.573846
+184003.580694     8252541.756280
+183997.051402     8252519.742366
+183992.217706     8252509.023848
+183991.692835     8252502.754794
+183972.055196     8252478.661275
+183966.636132     8252465.429968
+183956.231962     8252450.869274
+183943.426254     8252430.010639
+183928.339594     8252395.343056
+183901.819822     8252371.143603
+183883.231937     8252359.587427
+183864.543228     8252354.291438
+183849.083569     8252342.783414
+183834.855106     8252332.546994
+183816.862657     8252322.878582
+183800.050819     8252317.610718
+183781.352031     8252312.940519
+183752.087778     8252303.724548
+183733.499893     8252292.168372
+183732.389845     8252283.386533
+183727.697097     8252263.904667
+183727.928957     8252249.508453
+183728.362454     8252222.592630
+183732.600253     8252192.605642
+183733.810651     8252156.310315
+183735.515671     8252128.162175
+183736.998719     8252113.784456
+183737.230580     8252099.388242
+183737.401968     8252088.746765
+183726.543682     8252063.535730
+183710.952308     8252021.347514
+183696.077351     8251973.535297
+183680.284366     8251943.865163
+183657.679990     8251909.708572
+183644.248407     8251888.840303
+183643.642881     8251887.579093
+183627.648272     8251870.427805
+183604.186352     8251850.657796
+183578.382996     8251820.834341
+183557.000000     8251788.734878
+END
+LINE3D
+HEIGHT 1120.000000
+186007.222746     8255388.783431
+186007.232813     8255388.158405
+186007.858687     8255388.168039
+186018.494729     8255388.331756
+186019.745713     8255388.351012
+186020.987013     8255388.995299
+186021.612887     8255389.004933
+186025.881194     8255395.958316
+186031.381092     8255404.182547
+186035.680053     8255409.256276
+186041.825601     8255416.238555
+186051.583738     8255432.041194
+186070.050653     8255451.108372
+186081.786844     8255460.680484
+186097.902244     8255470.320004
+186125.188839     8255485.765744
+186126.440205     8255485.785005
+186139.467695     8255492.873216
+186167.399940     8255507.077004
+186207.138939     8255526.471615
+186227.714586     8255531.170704
+186253.820353     8255542.217420
+186281.772756     8255555.169629
+186304.860844     8255559.280683
+186316.122760     8255559.454033
+186327.364137     8255560.878957
+186347.364673     8255562.440235
+186373.500332     8255571.607284
+186389.636271     8255579.995231
+186401.362013     8255590.192363
+186418.052881     8255602.971228
+186437.216234     8255617.666749
+186442.786313     8255621.509683
+186455.763803     8255631.726082
+186475.501860     8255649.560937
+186500.901506     8255665.604340
+186513.323661     8255671.431344
+186529.539873     8255674.811441
+186557.058341     8255675.860202
+186592.094310     8255676.399498
+186629.067993     8255673.212952
+186654.547911     8255684.248505
+186678.130813     8255696.506748
+186702.420219     8255703.768309
+186734.802619     8255713.658220
+186771.554162     8255724.240565
+186806.449362     8255733.543974
+186838.357106     8255734.035118
+186870.900815     8255733.909342
+186897.874039     8255729.942154
+186929.247012     8255724.790800
+186960.670415     8255716.508207
+186998.855149     8255715.844081
+187025.192432     8255712.492285
+187053.972333     8255712.935283
+187087.070946     8255717.201953
+187117.707548     8255718.925419
+187139.544628     8255723.018745
+187163.258590     8255727.139433
+187190.090662     8255731.936354
+187220.646610     8255738.667664
+187241.212189     8255743.991779
+187257.973621     8255752.389354
+187276.591754     8255762.067397
+187289.629335     8255768.529054
+187309.629895     8255770.088804
+187332.768747     8255771.071680
+187364.141720     8255765.920327
+187390.509251     8255760.690398
+187411.216315     8255757.253466
+187436.877700     8255757.021753
+187460.722699     8255753.006414
+187478.866557     8255753.285695
+187490.067619     8255757.213776
+187510.027840     8255761.278212
+187526.910241     8255762.164786
+187538.171775     8255762.338130
+187558.878482     8255758.899664
+187586.517920     8255752.437424
+187606.618885     8255747.739274
+187607.870252     8255747.758536
+187614.813073     8255744.108208
+187624.369124     8255733.611949
+187635.983501     8255711.877314
+187648.122557     8255696.411730
+187652.078281     8255683.950670
+187652.320244     8255668.927139
+187646.416636     8255646.922856
+187637.990113     8255626.133157
+187629.069183     8255597.194746
+187617.837434     8255556.325526
+187602.881835     8255513.520388
+187584.182203     8255470.032440
+187569.377822     8255417.838168
+187555.058164     8255374.417638
+187549.295707     8255343.649247
+187548.669833     8255343.639613
+187543.351760     8255324.149650
+187538.658821     8255304.667782
+187532.573746     8255293.930765
+187528.910774     8255288.238589
+187520.989156     8255274.969525
+187511.987571     8255251.038958
+187495.599139     8255219.481825
+187471.612169     8255193.441996
+187459.200080     8255186.989967
+187443.074589     8255177.977001
+187436.202737     8255177.244516
+187420.753144     8255165.111466
+187400.873554     8255156.040715
+187393.436325     8255151.542331
+187384.878766     8255138.888659
+187379.510286     8255122.528408
+187378.510950     8255106.860589
+187379.338066     8255094.351372
+187390.882261     8255076.998033
+187397.360493     8255063.323912
+187405.725675     8255049.052127
+187421.679328     8255029.888063
+187446.987383     8255012.748114
+187466.039013     8254995.510334
+187479.368964     8254983.818749
+187493.395327     8254967.757034
+187511.215748     8254949.248414
+187523.324938     8254935.660968
+187527.795275     8254930.093984
+187537.865916     8254926.493330
+187562.508189     8254911.845383
+187590.934403     8254895.378611
+187609.219007     8254886.895306
+187619.935703     8254882.051179
+187640.733131     8254872.979844
+187663.488454     8254858.929561
+187681.964616     8254838.552436
+187697.232279     8254823.135009
+187715.587447     8254810.270414
+187733.307437     8254798.021222
+187747.363692     8254780.079841
+187756.405154     8254762.687979
+187760.986370     8254750.236547
+187768.140500     8254733.442342
+187772.943498     8254707.220486
+187779.018031     8254679.765548
+187787.463855     8254660.486684
+187794.557501     8254647.447980
+187795.808867     8254647.467242
+187801.550716     8254640.668705
+187812.983638     8254630.200572
+187823.780977     8254620.349365
+187831.369066     8254615.457080
+187846.566154     8254604.421708
+187859.775123     8254600.241888
+187875.517061     8254594.223223
+187903.842463     8254584.015874
+187933.459559     8254571.323865
+187955.498275     8254562.897581
+187976.245296     8254556.955958
+188001.896972     8254557.350804
+188028.809711     8254557.139117
+188056.418900     8254552.555009
+188084.673738     8254546.728951
+188123.574316     8254540.440813
+188164.967548     8254534.816989
+188200.115171     8254528.471084
+188221.457067     8254524.416450
+188247.179688     8254520.430012
+188270.328249     8254520.786329
+188287.917179     8254516.674692
+188298.623415     8254512.456349
+188312.528440     8254503.904866
+188338.331715     8254494.910585
+188362.741339     8254494.660368
+188385.265172     8254495.007069
+188404.024444     8254495.921767
+188422.773625     8254497.463020
+188428.343335     8254501.305184
+188431.471560     8254501.353336
+188432.097816     8254501.362975
+188442.107984     8254501.517058
+188455.185892     8254505.474793
+188458.939610     8254505.532573
+188459.565102     8254505.542200
+188469.515549     8254509.451796
+188489.455230     8254514.767805
+188521.907812     8254520.276420
+188564.351168     8254527.190709
+188611.829474     8254532.303901
+188653.111815     8254533.565288
+188683.122912     8254535.279891
+188705.010410     8254536.242742
+188723.154269     8254536.522023
+188748.290961     8254530.022023
+188784.033077     8254525.563103
+188815.527032     8254512.899984
+188846.335009     8254503.982737
+188878.948900     8254499.475665
+188912.814527     8254494.988625
+188938.546475     8254490.375621
+188959.969777     8254481.313920
+188991.968255     8254476.171430
+189026.620683     8254461.678330
+189043.160252     8254445.028592
+189062.100979     8254434.676789
+189086.066578     8254423.149678
+189110.678590     8254410.380627
+189137.753019     8254400.153258
+189151.607638     8254394.731487
+189167.410061     8254384.957322
+189182.112717     8254365.774766
+189200.568327     8254346.649978
+189219.024700     8254327.525202
+189238.812713     8254303.411838
+189268.591500     8254280.704147
+189288.500482     8254249.079781
+189298.974383     8254220.440672
+189309.236581     8254204.946198
+189320.185520     8254185.705863
+189330.488045     8254167.707467
+189343.212649     8254154.755438
+189361.679113     8254135.004109
+189373.848788     8254117.661162
+189389.691538     8254105.383074
+189409.943746     8254091.294262
+189424.555669     8254077.745339
+189437.229867     8254067.923022
+189449.257651     8254059.342644
+189470.186521     8254042.133760
+189489.288545     8254021.767033
+189507.654197     8254008.275126
+189512.134219     8254002.083111
+189517.280824     8253993.396813
+189535.706949     8253976.150169
+189556.140612     8253950.794854
+189570.196854     8253932.854238
+189579.672263     8253927.365059
+189586.726345     8253916.830289
+189593.799833     8253905.043164
+189606.595013     8253887.709081
+189616.917695     8253868.459106
+189628.522375     8253847.350267
+189640.731613     8253827.503386
+189656.029525     8253810.207827
+189668.239527     8253790.360958
+189677.270911     8253773.594885
+189688.168680     8253757.484250
+189698.592174     8253731.974852
+189702.022836     8253713.244735
+189706.019268     8253698.279759
+189706.190644     8253687.639046
+189706.513250     8253667.608435
+189707.390772     8253651.969506
+189707.481493     8253646.336637
+189707.794020     8253626.931815
+189709.649877     8253589.394535
+189715.774804     8253558.810650
+189720.022503     8253528.197106
+189720.345109     8253508.166495
+189720.647545     8253489.388226
+189718.457327     8253469.945645
+189717.831835     8253469.936017
+189713.674407     8253456.098185
+189713.603381     8253421.661733
+189707.830833     8253391.519895
+189698.424774     8253353.809264
+189697.415740     8253338.767241
+189696.235319     8253334.366695
+189687.132923     8253316.695551
+189672.490289     8253293.304862
+189659.775301     8253266.813358
+189646.514712     8253235.304371
+189636.272222     8253210.728759
+189631.024354     8253186.855972
+189622.628092     8253164.187376
+189609.933274     8253136.443529
+189603.111354     8253093.764354
+189594.755419     8253068.591836
+189590.082638     8253047.858389
+189584.834770     8253023.985602
+189580.374444     8252990.108295
+189575.852880     8252959.985713
+189572.381442     8252942.401244
+189571.352239     8252928.611564
+189559.192180     8252906.510978
+189549.069895     8252874.424353
+189540.734130     8252847.999492
+189529.815729     8252826.544728
+189517.615355     8252806.947300
+189506.595378     8252791.751946
+189502.286744     8252787.302484
+189498.613669     8252782.237625
+189488.088148     8252775.187926
+189483.103603     8252773.859312
+189473.253969     8252763.690294
+189459.076294     8252750.324169
+189452.365739     8252739.576761
+189442.495947     8252730.659322
+189441.951097     8252725.642614
+189435.845865     8252716.157177
+189426.703140     8252700.989955
+189423.140968     8252689.039119
+189419.447736     8252685.225839
+189419.457814     8252684.600050
+189420.264773     8252673.342411
+189424.280600     8252657.125844
+189425.137964     8252642.738494
+189429.073900     8252631.529783
+189438.094428     8252615.390252
+189454.623931     8252599.365539
+189471.687417     8252588.984840
+189479.831187     8252588.484249
+189488.034690     8252584.227382
+189510.164127     8252570.168229
+189534.211143     8252553.633286
+189554.493588     8252537.667105
+189570.416980     8252520.381938
+189588.883445     8252500.630608
+189603.666756     8252476.440209
+189615.220253     8252458.461833
+189619.236092     8252442.244502
+189620.053881     8252430.361850
+189620.295832     8252415.339082
+189630.759654     8252387.325763
+189645.158660     8252348.102956
+189654.321092     8252323.200092
+189661.444986     8252308.283256
+189674.300637     8252287.194436
+189688.468535     8252262.368619
+189699.527613     8252236.242296
+189708.569062     8252218.851198
+189720.031839     8252206.505691
+189730.748917     8252201.661569
+189741.455141     8252197.443990
+189755.239960     8252196.403521
+189773.999232     8252197.318220
+189808.339133     8252202.229941
+189836.321784     8252213.304018
+189851.084624     8252229.183693
+189860.772950     8252249.368399
+189869.895516     8252265.787200
+189888.372510     8252284.228588
+189905.718737     8252295.138942
+189926.254438     8252302.341960
+189932.510888     8252302.438263
+189941.905643     8252301.956928
+189953.914021     8252294.628905
+189972.884996     8252282.398969
+189993.843351     8252263.311940
+190014.983912     8252232.959185
+190019.514340     8252223.637459
+190020.836664     8252219.274672
+190025.447734     8252204.945866
+190031.461783     8252181.246429
+190039.382544     8252155.698508
+190043.539510     8252130.718596
+190047.576270     8252113.249698
+190049.028879     8252100.750109
+190049.089363     8252096.994608
+190049.099442     8252096.368819
+190049.391799     8252078.216340
+190054.285148     8252046.360844
+190054.839614     8252011.934020
+190051.014871     8251977.439787
+190047.028831     8251952.960478
+190042.981542     8251932.236658
+190038.935004     8251911.513614
+190029.913250     8251888.835391
+190026.148240     8251850.584882
+190020.375680     8251820.443808
+190015.663335     8251802.214294
+190015.178982     8251793.441321
+190010.940148     8251784.610557
+190009.709321     8251783.339723
+190009.719399     8251782.713933
+190005.530971     8251770.753458
+189995.419529     8251738.041055
+189981.604024     8251702.140385
+189964.600560     8251669.947840
+189950.694321     8251639.680804
+189942.348465     8251613.882497
+189935.173702     8251593.111301
+189924.224313     8251573.533129
+189917.564152     8251559.656774
+189913.326082     8251550.826022
+189907.866499     8251540.098633
+189899.349267     8251524.941039
+189889.137013     8251498.488059
+189875.240853     8251467.595233
+189870.972534     8251460.642613
+189870.457945     8251453.747009
+189864.917708     8251448.027465
+189858.277717     8251432.898766
+189852.858461     8251419.667456
+189844.411805     8251400.127808
+189831.706897     8251373.010514
+189820.293312     8251343.407791
+189803.774201     8251319.988219
+189785.993263     8251297.175168
+189775.043862     8251277.597760
+189761.027497     8251254.215948
+189749.573572     8251227.117910
+189741.147074     8251206.326683
+189733.901748     8251189.936778
+189732.649999     8251189.917510
+189727.240835     8251176.059646
+189715.586051     8251161.480466
+189711.982788     8251152.033541
+189705.262142     8251141.912686
+189697.361087     8251127.390521
+189686.916209     8251115.333743
+189677.087495     8251103.913158
+189661.103156     8251086.136083
+189638.276425     8251065.749907
+189617.347868     8251044.140296
+189600.061374     8251029.473664
+189590.232661     8251018.053079
+189585.297771     8251013.593978
+189573.521253     8251006.525787
+189552.461636     8250993.053731
+189530.290645     8250970.799051
+189510.522340     8250954.842329
+189495.143323     8250938.327225
+189483.397054     8250929.380902
+189472.912612     8250919.828057
+189453.699235     8250908.262253
+189420.196517     8250890.216289
+189392.920012     8250874.143996
+189377.995112     8250868.279233
+189372.980331     8250868.827987
+189365.451975     8250869.963995
+189339.185268     8250868.933737
+189298.074302     8250857.031636
+189261.282074     8250848.951680
+189230.695878     8250844.098502
+189207.072280     8250834.343411
+189173.984127     8250829.450957
+189140.441081     8250813.908915
+189121.237783     8250801.717321
+189104.566703     8250787.686107
+189099.027229     8250781.966575
+189091.700497     8250770.583737
+189086.927668     8250756.109724
+189075.322526     8250738.400821
+189063.747632     8250718.813785
+189054.534345     8250708.027853
+189054.544423     8250707.402064
+189042.929203     8250690.318950
+189023.907371     8250666.860090
+189007.347933     8250645.944440
+189000.545881     8250640.830653
+188995.611743     8250636.372327
+188989.990876     8250635.659098
+188976.489099     8250619.172890
+188964.904127     8250600.211644
+188951.937109     8250589.368696
+188940.786084     8250582.310134
+188932.097477     8250577.793253
+188918.343670     8250576.955601
+188901.531450     8250571.687732
+188882.832663     8250567.017532
+188876.596370     8250565.669650
+188867.848042     8250564.908282
+188859.714351     8250564.783083
+188845.253633     8250568.943635
+188830.188358     8250571.842228
+188824.547321     8250572.381343
+188816.242254     8250582.896857
+188800.107147     8250613.327423
+188794.800009     8250632.028656
+188802.580094     8250654.061822
+188823.933283     8250688.199919
+188836.618021     8250716.569555
+188836.426476     8250728.462611
+188836.881356     8250739.112964
+188844.490054     8250771.787608
+188854.561933     8250807.003944
+188864.178931     8250831.569928
+188871.817889     8250862.365675
+188878.932918     8250886.893148
+188887.309011     8250910.814086
+188899.458991     8250933.540462
+188918.339695     8250965.761902
+188937.099418     8251005.495108
+188949.794235     8251033.238955
+188957.070574     8251047.750740
+188960.662994     8251057.823443
+188964.971628     8251062.272904
+188969.866203     8251069.235164
+188981.572145     8251080.685409
+188988.746908     8251101.456604
+188993.369283     8251125.319763
+189000.039523     8251138.570329
+189006.629108     8251156.828739
+189014.520847     8251171.976705
+189018.183844     8251177.667354
+189023.067564     8251185.256155
+189034.702942     8251201.087690
+189053.623974     8251230.805209
+189066.339713     8251257.297488
+189076.723343     8251273.109756
+189085.775346     8251293.909847
+189091.124025     8251311.523211
+189094.060705     8251323.464419
+189095.059660     8251339.132232
+189095.342401     8251360.423286
+189094.212848     8251391.710771
+189089.016601     8251403.526792
+189083.890153     8251410.961510
+189073.153681     8251417.057222
+189061.881686     8251417.509661
+189037.430971     8251420.263788
+189018.651541     8251420.600668
+189002.384923     8251420.350282
+188984.251143     8251419.445212
+188955.542200     8251414.620165
+188911.898266     8251404.556909
+188879.546484     8251392.789635
+188849.575701     8251388.571875
+188817.143277     8251381.811680
+188779.069052     8251375.590589
+188749.139361     8251368.868918
+188722.952544     8251362.830804
+188695.495337     8251358.025790
+188643.647148     8251352.218625
+188599.317237     8251345.901242
+188551.939742     8251334.528628
+188512.715345     8251322.028857
+188479.081578     8251312.119684
+188447.335131     8251301.613617
+188408.030079     8251294.121690
+188380.057519     8251282.421060
+188350.198391     8251271.318099
+188319.733177     8251258.953155
+188280.397889     8251253.338597
+188252.334595     8251247.271599
+188225.502880     8251242.476213
+188196.723362     8251242.033221
+188163.584027     8251240.271230
+188144.824767     8251239.355767
+188132.937358     8251239.172789
+188115.419374     8251238.903142
+188094.147671     8251238.575714
+188065.367771     8251238.132716
+188024.135836     8251233.741617
+187990.421415     8251228.840288
+187959.946504     8251217.101139
+187932.569187     8251207.288269
+187903.163794     8251206.835643
+187882.447009     8251210.899899
+187866.099748     8251215.656592
+187849.752094     8251220.414045
+187831.558211     8251223.264480
+187814.029765     8251223.620616
+187790.235173     8251224.506245
+187770.779833     8251227.963972
+187752.010481     8251227.675063
+187726.358806     8251227.280216
+187694.572044     8251219.277307
+187662.189643     8251209.387395
+187638.586584     8251198.380732
+187624.973535     8251188.779730
+187607.072009     8251173.477687
+187586.031798     8251158.753276
+187561.177372     8251147.727350
+187524.506114     8251132.136392
+187490.953371     8251117.220145
+187456.754609     8251103.545079
+187431.334794     8251088.754019
+187406.480380     8251077.727329
+187387.256913     8251066.788079
+187364.299515     8251054.538700
+187340.746862     8251040.402325
+187322.148899     8251029.471938
+187302.279399     8251019.774633
+187281.138745     8251011.310415
+187263.196511     8250998.512288
+187245.264355     8250985.088372
+187234.779913     8250975.535527
+187228.089133     8250963.536534
+187218.966567     8250947.117733
+187211.640217     8250935.734902
+187203.103197     8250921.829657
+187187.057991     8250907.808077
+187166.623484     8250894.345642
+187142.485665     8250877.695718
+187120.789713     8250864.839811
+187102.857557     8250851.415895
+187079.950566     8250836.036805
+187057.790418     8250813.156347
+187034.933833     8250794.647545
+187017.718284     8250775.599630
+186992.944513     8250759.565860
+186969.452357     8250741.673220
+186942.781175     8250726.862898
+186921.115471     8250712.128860
+186900.105878     8250695.527086
+186879.731868     8250678.308387
+186867.440749     8250664.345357
+186851.991168     8250652.211543
+186837.177159     8250639.461568
+186822.373228     8250626.085803
+186803.775253     8250615.156181
+186782.765672     8250598.553643
+186760.625300     8250574.421600
+186734.135966     8250548.344018
+186711.329787     8250526.705505
+186697.757447     8250514.600587
+186684.134319     8250505.625374
+186664.910470     8250494.686118
+186640.076213     8250482.407849
+186622.104112     8250471.487861
+186610.307437     8250465.671249
+186599.136636     8250459.864272
+186578.722299     8250445.149495
+186552.737476     8250426.593306
+186529.194914     8250411.830377
+186508.730170     8250400.245311
+186486.337768     8250391.761825
+186462.694394     8250383.258320
+186440.917787     8250375.410257
+186422.884819     8250368.245763
+186409.887565     8250359.280185
+186399.412820     8250349.101545
+186398.787328     8250349.091917
+186394.478312     8250344.642449
+186384.548787     8250339.481286
+186378.988404     8250335.012557
+186372.802517     8250330.534964
+186364.053413     8250329.774347
+186358.483334     8250325.931413
+186347.352848     8250317.621278
+186339.855110     8250316.879923
+186335.556173     8250311.804666
+186334.930680     8250311.795038
+186329.299722     8250311.708363
+186317.967625     8250315.916309
+186308.562779     8250317.024197
+186302.911664     8250318.189101
+186299.107540     8250321.261033
+186299.097461     8250321.886822
+186294.576731     8250330.582753
+186288.834882     8250337.381290
+186283.769301     8250341.060514
+186278.078240     8250344.729345
+186272.447282     8250344.642670
+186267.442198     8250344.565629
+186263.062606     8250344.498216
+186252.436643     8250343.708710
+186246.826236     8250342.369697
+186241.286012     8250336.649389
+186222.032295     8250327.588271
+186202.889100     8250311.641171
+186179.275974     8250301.259533
+186169.336370     8250296.724160
+186155.087368     8250287.739313
+186133.936635     8250279.900884
+186110.343667     8250268.267667
+186083.612001     8250257.212846
+186043.096291     8250247.197742
+186009.503234     8250234.784652
+185982.671137     8250229.989260
+185967.726079     8250225.376075
+185953.437132     8250218.895157
+185922.911421     8250210.286478
+185896.180148     8250199.230899
+185876.916353     8250190.795570
+185858.832992     8250186.760024
+185843.887922     8250182.147604
+185827.681788     8250178.141717
+185803.927523     8250176.523423
+185784.542376     8250175.599091
+185763.896167     8250175.281291
+185735.116648     8250174.838299
+185685.145687     8250169.060795
+185642.056681     8250163.388457
+185612.116529     8250157.292570
+185597.121053     8250155.809861
+185581.550503     8250151.187049
+185557.221139     8250146.430180
+185527.916558     8250139.718131
+185506.079467     8250135.625569
+185484.333109     8250125.899374
+185465.049156     8250118.715625
+185435.088465     8250113.871311
+185407.701452     8250104.684236
+185384.733963     8250093.061411
+185356.741233     8250082.613123
+185320.726098     8250065.153666
+185290.391932     8250044.651932
+185266.203707     8250031.131718
+185243.296716     8250015.752628
+185220.995059     8250001.634745
+185196.736259     8249992.496586
+185173.698219     8249985.254286
+185153.788393     8249978.060903
+185135.755807     8249970.896415
+185122.697686     8249965.686331
+185118.964126     8249964.376973
+185114.029606     8249959.918641
+185100.345993     8249954.698930
+185081.071738     8249946.889385
+185063.624329     8249942.237683
+185042.352627     8249941.910256
+185022.957401     8249941.611712
+185004.188050     8249941.322803
+184984.167333     8249941.014632
+184966.649348     8249940.744984
+184950.382730     8249940.494598
+184931.603300     8249940.831478
+184905.184993     8249949.190349
+184876.869670     8249958.771908
+184851.117373     8249964.636487
+184829.058488     8249974.315114
+184810.107682     8249985.292707
+184808.745616     8249992.158660
+184803.609280     8250000.219171
+184794.012902     8250013.219352
+184778.604290     8250037.400126
+184771.359236     8250059.827961
+184766.758041     8250073.531739
+184761.490657     8250089.729041
+184756.849148     8250105.935977
+184745.254738     8250126.419030
+184740.582992     8250144.503334
+184729.644514     8250163.117886
+184718.120859     8250179.219652
+184708.544650     8250190.967489
+184700.249841     8250200.857980
+184686.274062     8250213.790750
+184674.215278     8250224.248485
+184665.335304     8250231.625427
+184653.296868     8250240.831586
+184639.956660     8250253.148194
+184634.790279     8250263.086076
+184630.350203     8250266.774163
+184620.753825     8250279.774344
+184600.884966     8250308.895549
+184580.491440     8250331.746939
+184561.449901     8250348.358165
+184546.838157     8250361.907854
+184531.530357     8250379.829206
+184516.061260     8250407.765481
+184502.398459     8250440.111937
+184496.455177     8250459.429322
+184490.602616     8250473.113838
+184484.629097     8250494.308592
+184474.599222     8250534.224595
+184465.094027     8250580.409650
+184457.677776     8250613.478965
+184452.753809     8250647.211823
+184447.668533     8250690.960368
+184447.214879     8250719.127770
+184450.807478     8250729.201240
+184451.947954     8250736.105714
+184459.092659     8250758.755045
+184468.488067     8250797.091457
+184476.157834     8250826.009844
+184485.179576     8250848.688832
+184496.138674     8250867.640445
+184505.816361     8250888.450167
+184512.436386     8250904.830447
+184513.526252     8250914.865393
+184514.565916     8250928.029290
+184514.243322     8250948.059137
+184510.186977     8250966.779623
+184504.284010     8250983.593850
+184498.502025     8250992.896312
+184492.659364     8251005.954272
+184485.454828     8251025.878188
+184476.837425     8251055.798527
+184465.303703     8251072.525318
+184458.199776     8251086.190572
+184453.033395     8251096.128454
+184445.818589     8251116.678157
+184438.523117     8251142.236467
+184433.831010     8251161.573111
+184429.926074     8251170.904466
+184430.481003     8251175.295384
+184436.555987     8251186.658954
+184442.479765     8251207.410894
+184450.906264     8251228.202121
+184458.696809     8251249.609504
+184466.457119     8251272.894255
+184474.591260     8251311.837961
+184485.429389     8251338.300575
+184494.441064     8251361.604588
+184500.909859     8251387.374767
+184509.114385     8251421.936416
+184517.288675     8251458.375433
+184526.239854     8251485.435711
+184533.304095     8251513.092888
+184536.453131     8251550.707207
+184543.426461     8251583.997251
+184552.882353     8251618.578162
+184557.091019     8251668.104795
+184563.348123     8251707.018844
+184571.068284     8251732.808285
+184578.293644     8251750.449772
+184589.787692     8251775.044648
+184605.994657     8251817.869048
+184620.385070     8251856.908290
+184633.170812     8251879.018507
+184641.667695     8251895.427677
+184658.822950     8251918.231096
+184674.736726     8251940.389462
+184682.678681     8251952.407714
+184682.608105     8251956.789768
+184688.683101     8251968.152573
+184695.202314     8251990.792276
+184702.811393     8252023.466926
+184713.337007     8252069.333598
+184719.129712     8252098.223857
+184724.438076     8252118.340379
+184727.294114     8252135.288666
+184734.428728     8252158.564551
+184741.432484     8252189.977229
+184748.557032     8252213.878139
+184752.583781     8252235.853532
+184762.866981     8252257.925228
+184775.521471     8252288.172997
+184789.397283     8252320.317399
+184799.085036     8252340.502095
+184803.202327     8252356.843852
+184812.375300     8252370.132942
+184819.631087     8252385.897063
+184823.818942     8252397.857530
+184827.220008     8252419.823292
+184838.603166     8252451.303381
+184846.838131     8252483.986900
+184853.882024     8252512.895653
+184857.848277     8252538.627311
+184861.198937     8252563.722785
+184864.650218     8252582.558832
+184865.084368     8252594.460755
+184867.980721     8252608.905884
+184870.826667     8252626.480725
+184874.338637     8252641.560511
+184874.651793     8252660.974964
+184877.336455     8252688.563964
+184880.777836     8252708.026568
+184885.561138     8252721.874034
+184892.907658     8252732.004522
+184902.050383     8252747.171744
+184909.951819     8252761.693915
+184916.592014     8252776.821852
+184917.046309     8252787.472960
+184921.234355     8252799.433429
+184925.311129     8252818.279105
+184928.328463     8252825.212469
+184934.423617     8252835.323695
+184951.134643     8252846.850982
+184964.687207     8252860.207485
+184965.918416     8252861.478325
+184965.847840     8252865.860380
+184965.736949     8252872.745592
+184960.711708     8252873.920129
+184951.760979     8252885.678359
+184941.589515     8252895.539199
+184930.862739     8252901.009116
+184925.777001     8252905.939919
+184915.554748     8252918.930465
+184897.724249     8252938.064875
+184879.934077     8252954.695363
+184869.752330     8252965.182755
+184860.166030     8252977.557145
+184852.991540     8252995.603690
+184847.492486     8253026.197209
+184839.399955     8253062.386601
+184831.519138     8253085.430595
+184825.656499     8253099.740900
+184819.753544     8253116.554364
+184814.556915     8253128.370378
+184814.405697     8253137.759512
+184814.163745     8253152.782280
+184813.064250     8253182.191630
+184808.110023     8253217.803384
+184807.535399     8253253.481788
+184806.738981     8253302.931381
+184806.820277     8253336.742047
+184810.796621     8253361.847151
+184814.046278     8253393.202044
+184818.951394     8253438.356257
+184828.730343     8253491.725064
+184833.363068     8253553.780174
+184832.899335     8253582.573365
+184835.523500     8253613.918631
+184842.275227     8253660.979866
+184854.456096     8253720.646619
+184860.541159     8253731.384399
+184860.521001     8253732.635978
+184860.268971     8253748.284535
+184860.693030     8253760.813011
+184860.945523     8253783.982197
+184864.740400     8253820.354568
+184872.268837     8253858.036297
+184877.002565     8253913.831987
+184891.827116     8253964.773916
+184897.115120     8253986.142779
+184902.272075     8254015.648432
+184910.870412     8254064.616690
+184920.871345     8254104.214311
+184926.593487     8254137.485860
+184929.399119     8254157.563858
+184929.792738     8254171.970464
+184932.578200     8254193.300806
+184935.939130     8254217.770493
+184944.123308     8254253.583717
+184950.461245     8254287.490690
+184954.235582     8254325.114634
+184958.262332     8254347.090026
+184962.551190     8254352.791073
+184962.531032     8254354.042652
+184963.621102     8254364.076837
+184971.906079     8254393.631403
+184976.377249     8254426.882932
+184976.639820     8254449.426329
+184977.659314     8254463.842569
+184977.528253     8254471.980124
+184978.143667     8254472.615542
+184978.123509     8254473.867121
+184977.407284     8254479.491126
+184972.957129     8254483.805003
+184972.271139     8254487.551640
+184968.446477     8254491.875145
+184968.375913     8254496.256435
+184968.305337     8254500.638489
+184969.415564     8254509.421096
+184970.545961     8254516.951359
+184974.723929     8254529.537618
+184979.527389     8254542.133505
+184980.052069     8254548.402555
+184987.297777     8254564.792466
+184998.943234     8254579.998212
+185013.060806     8254597.119844
+185022.223687     8254611.035487
+185035.705688     8254628.773280
+185043.566797     8254645.799373
+185053.284608     8254664.105934
+185064.637708     8254697.464158
+185078.593995     8254724.599950
+185085.334786     8254733.469989
+185085.324720     8254734.095015
+185085.314628     8254734.721568
+185085.940503     8254734.731202
+185090.178967     8254743.561196
+185108.444258     8254775.147219
+185124.408440     8254794.175873
+185132.955908     8254807.456099
+185148.203877     8254832.107994
+185157.336522     8254847.901005
+185164.642333     8254860.535410
+185172.523994     8254876.309165
+185190.930412     8254899.132608
+185214.644813     8254942.072566
+185238.480589     8254977.500001
+185271.256609     8255001.796519
+185287.261106     8255018.322015
+185292.155693     8255025.283510
+185305.082371     8255038.631143
+185316.071718     8255055.704623
+185325.244678     8255068.994477
+185337.555955     8255081.705929
+185357.960226     8255097.045731
+185367.284404     8255100.946451
+185377.184075     8255107.984987
+185395.146086     8255119.531529
+185408.819607     8255125.377795
+185422.442747     8255134.352243
+185438.558147     8255143.991763
+185461.586121     8255151.859088
+185488.317405     8255162.913903
+185508.843003     8255170.744238
+185522.496009     8255177.840548
+185549.177270     8255192.025081
+185586.484099     8255206.999877
+185621.833034     8255226.953622
+185653.973495     8255251.865537
+185678.545642     8255280.418152
+185706.205675     8255311.523604
+185727.780658     8255331.890512
+185747.630000     8255342.839396
+185751.373626     8255343.523729
+185756.358934     8255344.852355
+185772.444086     8255356.370008
+185795.956424     8255373.009540
+185802.162469     8255376.235555
+185806.491654     8255379.432680
+185813.898659     8255385.807667
+185826.875743     8255396.025589
+185836.805638     8255401.187522
+185849.227818     8255407.012997
+185854.807988     8255410.229378
+185859.177489     8255410.923345
+185872.871192     8255415.516503
+185882.195395     8255419.415694
+185882.820888     8255419.425322
+185883.446762     8255419.434956
+185892.205563     8255419.569777
+185902.216113     8255419.723865
+185903.467097     8255419.743121
+185907.846689     8255419.810535
+185911.600788     8255419.868320
+185914.729014     8255419.916472
+185917.857239     8255419.964623
+185925.374740     8255419.455157
+185930.450769     8255415.150914
+185934.224669     8255413.955586
+185943.064482     8255409.084097
+185955.658037     8255404.268860
+185962.550071     8255403.748238
+185966.939729     8255403.190626
+185971.399975     8255398.250195
+185987.182253     8255389.726844
+185992.812829     8255389.813513
+END
+LINE3D
+HEIGHT 1130.000000
+186208.529306     8255401.273527
+186214.150173     8255401.986755
+186222.212919     8255406.493239
+186245.936948     8255409.988901
+186266.522660     8255414.062965
+186274.656351     8255414.188164
+186289.116699     8255410.026841
+186316.079831     8255406.686207
+186348.613450     8255407.186984
+186385.526278     8255407.755169
+186413.125375     8255403.797615
+186438.151177     8255404.182828
+186462.541420     8255405.183437
+186501.179888     8255415.169646
+186538.981531     8255438.291632
+186573.624344     8255463.242064
+186602.232869     8255474.325775
+186629.115347     8255475.992985
+186658.500582     8255477.697189
+186693.516394     8255479.488064
+186739.067436     8255487.702077
+186772.791923     8255491.978381
+186803.387829     8255496.205000
+186837.112316     8255500.481304
+186880.191255     8255506.778667
+186914.541235     8255511.064599
+186947.619691     8255516.582848
+186986.984846     8255520.319268
+187018.892590     8255520.810412
+187047.732988     8255517.497145
+187080.952571     8255514.252814
+187121.074661     8255509.861312
+187148.047884     8255505.894124
+187166.282107     8255500.539002
+187181.408619     8255493.885684
+187190.248457     8255489.012667
+187200.964771     8255484.168534
+187216.686552     8255479.401448
+187227.504061     8255468.297898
+187238.987376     8255454.700818
+187251.732150     8255440.496446
+187263.286411     8255422.518082
+187264.638208     8255416.277915
+187269.169017     8255406.956195
+187275.001599     8255394.524024
+187276.484838     8255380.146308
+187277.997920     8255363.891982
+187278.280198     8255346.365293
+187273.759017     8255316.242717
+187268.451034     8255296.126201
+187263.172919     8255274.131546
+187257.622615     8255269.037027
+187242.728333     8255261.294901
+187233.979241     8255260.533521
+187222.798361     8255255.352333
+187210.497151     8255242.015856
+187199.437240     8255229.323666
+187191.576119     8255212.298337
+187184.905510     8255199.047001
+187175.823270     8255180.124279
+187166.710782     8255163.079688
+187158.879909     8255144.176227
+187147.415907     8255117.703979
+187138.374007     8255096.276570
+187133.086182     8255074.908475
+187128.383534     8255056.053165
+187128.625497     8255041.029634
+187128.231471     8255026.624551
+187127.787446     8255015.347656
+187127.564820     8254990.300331
+187128.078971     8254958.376664
+187131.801977     8254921.494833
+187133.506998     8254893.346693
+187135.141455     8254869.579843
+187139.479887     8254833.332665
+187147.027557     8254792.127329
+187158.813333     8254759.750452
+187173.686971     8254729.927942
+187190.669746     8254685.735821
+187203.060833     8254654.621680
+187212.021640     8254642.237661
+187226.703757     8254624.306679
+187253.323688     8254603.428963
+187275.089360     8254573.085830
+187284.040088     8254561.327601
+187287.864381     8254557.003326
+187301.800024     8254546.574481
+187323.293890     8254533.131490
+187334.636078     8254528.296990
+187342.839951     8254524.040893
+187347.290119     8254519.726252
+187354.878578     8254514.834737
+187361.770611     8254514.314115
+187364.979479     8254509.355187
+187370.741497     8254501.304307
+187379.126837     8254485.780943
+187379.197400     8254481.399653
+187382.396201     8254477.065750
+187382.557498     8254467.050826
+187385.947832     8254450.824632
+187389.186948     8254443.987571
+187389.247433     8254440.232070
+187393.627024     8254440.299484
+187400.508967     8254440.405415
+187414.898726     8254440.626911
+187441.175894     8254441.031385
+187466.827570     8254441.426231
+187492.468785     8254442.446861
+187513.064589     8254445.894372
+187534.316515     8254447.473384
+187555.527732     8254451.556312
+187577.990686     8254455.659271
+187606.064070     8254461.099715
+187647.296005     8254465.490814
+187682.897351     8254469.796008
+187715.501545     8254465.914731
+187751.294437     8254458.326869
+187787.147444     8254446.982737
+187817.259366     8254442.437152
+187850.549524     8254434.810767
+187889.460575     8254427.896082
+187918.411469     8254417.698361
+187946.101300     8254408.107173
+187981.207846     8254404.264414
+188024.448069     8254400.547618
+188052.672672     8254396.598928
+188079.020021     8254392.622106
+188107.880195     8254388.057254
+188144.853889     8254384.869944
+188176.842276     8254380.354008
+188203.836051     8254375.134483
+188228.397657     8254365.495144
+188258.700360     8254349.056492
+188290.214472     8254335.141794
+188321.082947     8254322.468283
+188343.777391     8254312.174259
+188370.266644     8254299.434104
+188396.048998     8254291.691389
+188418.017138     8254287.647160
+188438.784711     8254280.453199
+188458.260197     8254275.744657
+188481.479334     8254271.718920
+188515.274397     8254271.613169
+188541.561262     8254271.391848
+188562.217932     8254271.083864
+188587.374794     8254263.331521
+188617.496795     8254258.160148
+188649.404539     8254258.651292
+188663.178503     8254258.237364
+188675.691404     8254258.429971
+188702.604524     8254258.218289
+188724.572664     8254254.174060
+188752.222180     8254247.086030
+188776.066797     8254243.070685
+188803.211790     8254228.462026
+188830.235038     8254221.365121
+188845.381732     8254213.458695
+188863.051317     8254204.339215
+188886.270441     8254200.314241
+188907.068251     8254191.242912
+188931.114504     8254174.707957
+188948.925228     8254156.825132
+188968.007094     8254137.709984
+188995.908628     8254114.974162
+189025.767293     8254087.259380
+189044.263994     8254065.630681
+189059.632470     8254043.953832
+189080.731952     8254016.104223
+189104.405506     8253983.911095
+189120.601099     8253949.725028
+189125.988879     8253926.016716
+189131.942443     8253906.072780
+189140.045423     8253869.258368
+189151.336361     8253828.735831
+189158.782861     8253793.788383
+189164.827146     8253768.211578
+189168.903457     8253748.239511
+189170.376999     8253734.487590
+189174.312171     8253723.278867
+189182.797941     8253701.496074
+189190.023410     8253680.319827
+189194.089643     8253660.973549
+189195.017571     8253642.204909
+189196.742380     8253612.804420
+189201.121891     8253574.054096
+189202.967669     8253537.142605
+189203.461650     8253506.471281
+189203.905213     8253478.930432
+189204.298383     8253454.518531
+189206.154240     8253416.981250
+189211.028195     8253386.377346
+189214.862104     8253342.609538
+189215.396413     8253309.434292
+189215.264890     8253278.754104
+189214.527293     8253246.811169
+189211.257466     8253216.708619
+189210.510541     8253185.392250
+189206.705204     8253149.645663
+189202.961102     8253110.144351
+189202.819513     8253080.089188
+189198.842788     8253054.984078
+189195.492318     8253029.888607
+189194.614333     8253006.709793
+189190.657778     8252980.352340
+189190.435534     8252955.305021
+189185.853474     8252928.938704
+189176.902295     8252901.878426
+189167.840213     8252881.704124
+189164.227635     8252872.883000
+189164.328447     8252866.623578
+189153.954895     8252850.185521
+189140.149469     8252813.659061
+189125.173700     8252772.106267
+189115.859138     8252728.762014
+189115.465506     8252714.356173
+189115.606645     8252705.592828
+189116.635385     8252680.564765
+189127.109286     8252651.925656
+189137.179489     8252609.505731
+189149.893551     8252558.361748
+189164.272387     8252520.391285
+189176.129097     8252483.633888
+189186.683652     8252449.986936
+189202.263831     8252415.165451
+189216.622509     8252378.446566
+189227.187907     8252344.173836
+189235.028027     8252323.632994
+189242.141830     8252309.342712
+189253.060532     8252291.979745
+189262.181873     8252269.580791
+189271.515680     8252234.037214
+189283.513529     8252188.516473
+189293.321610     8252162.371658
+189299.224768     8252145.557433
+189300.737861     8252129.302343
+189306.973692     8252091.832482
+189308.022590     8252065.552840
+189302.704159     8252046.061343
+189292.370935     8252027.119364
+189276.467237     8252004.335209
+189258.706457     8251980.270580
+189243.367767     8251961.251554
+189228.594085     8251945.997657
+189208.179366     8251931.282874
+189170.408341     8251906.283526
+189129.751030     8251866.214023
+189094.563392     8251836.245355
+189069.183522     8251818.950367
+189049.869333     8251813.643986
+189027.447077     8251807.037874
+189026.821585     8251807.028246
+189023.067867     8251806.970466
+189012.027733     8251793.026692
+188992.945404     8251773.324097
+188978.837541     8251755.575906
+188955.850277     8251745.204665
+188935.375061     8251734.246147
+188902.932558     8251728.111742
+188875.535085     8251719.550451
+188836.886537     8251710.190032
+188785.169396     8251696.246076
+188726.529986     8251684.700111
+188676.004109     8251674.530924
+188619.786789     8251668.030563
+188577.979768     8251660.500124
+188511.751516     8251653.845669
+188453.647641     8251647.942213
+188403.031030     8251643.406659
+188362.354024     8251643.406478
+188331.626689     8251647.316645
+188305.975395     8251646.921804
+188282.200578     8251646.555847
+188277.821369     8251646.488440
+188269.667520     8251647.614820
+188247.709459     8251651.033260
+188227.062867     8251650.715455
+188213.359467     8251646.748092
+188187.173414     8251640.709990
+188136.657234     8251629.915008
+188097.382812     8251620.544955
+188058.693556     8251613.688451
+188013.667194     8251611.743489
+187968.741645     8251603.539103
+187917.569736     8251594.611861
+187876.438613     8251583.961339
+187843.481127     8251570.932089
+187808.626242     8251559.125521
+187755.668196     8251544.536520
+187715.919500     8251525.767705
+187686.241457     8251503.397471
+187657.108252     8251486.044710
+187636.178931     8251464.435087
+187611.001461     8251434.620501
+187582.594560     8251411.017945
+187555.954009     8251394.329496
+187537.981920     8251383.408744
+187528.728292     8251375.127498
+187516.386780     8251364.293415
+187502.793888     8251353.440833
+187494.751312     8251347.682007
+187483.580129     8251341.875024
+187467.384075     8251337.243348
+187445.567153     8251331.898443
+187421.903609     8251324.647280
+187397.644439     8251315.508351
+187370.237256     8251307.573619
+187330.952374     8251298.829349
+187291.617455     8251293.215561
+187260.425937     8251287.100412
+187236.086494     8251282.969333
+187216.792081     8251276.411367
+187192.452639     8251272.280287
+187167.507492     8251266.887231
+187140.150333     8251255.822782
+187120.876471     8251248.012479
+187120.250597     8251248.002845
+187114.700663     8251242.909096
+187106.698033     8251234.646342
+187096.334560     8251217.582496
+187086.081609     8251193.632667
+187081.318476     8251178.532858
+187070.439639     8251154.574160
+187055.807478     8251130.556924
+187033.061783     8251105.162911
+187011.163744     8251066.008107
+186987.822424     8251038.726327
+186971.767509     8251025.331306
+186953.209861     8251011.897762
+186919.021177     8250997.596906
+186887.365463     8250981.457206
+186866.274834     8250969.863270
+186854.558813     8250959.038815
+186840.370678     8250946.298473
+186818.139967     8250927.799306
+186785.253044     8250910.388765
+186762.991702     8250893.767724
+186741.376405     8250875.903973
+186710.416746     8250855.392611
+186675.269042     8250822.920779
+186635.772376     8250788.503407
+186603.117326     8250756.695888
+186564.831318     8250724.801694
+186525.970223     8250689.768160
+186492.588486     8250664.210430
+186465.988262     8250645.018060
+186440.538211     8250632.104368
+186415.068384     8250620.442261
+186389.598544     8250608.780918
+186367.296888     8250594.663035
+186342.472710     8250581.758977
+186323.239164     8250571.445516
+186297.718549     8250562.913114
+186265.962023     8250553.032837
+186242.288400     8250546.407463
+186228.614854     8250540.562726
+186213.740359     8250531.568251
+186186.958681     8250523.642383
+186149.631682     8250509.919930
+186118.561133     8250496.293779
+186082.495579     8250481.964798
+186042.000039     8250470.697350
+186007.175773     8250457.013420
+185971.160243     8250439.554722
+185932.077367     8250418.291613
+185891.722954     8250398.261585
+185870.703282     8250382.285601
+185870.087487     8250381.650177
+185865.142900     8250377.816871
+185861.409340     8250376.507513
+185861.419419     8250375.881723
+185852.125476     8250370.103635
+185844.072440     8250364.970593
+185844.082519     8250364.344803
+185843.457026     8250364.335175
+185834.778485     8250359.193269
+185817.270592     8250358.297068
+185803.566809     8250354.329699
+185796.059375     8250354.214140
+185778.541008     8250353.944486
+185760.397531     8250353.665211
+185742.273830     8250352.134351
+185723.564964     8250348.089940
+185716.036989     8250349.225954
+185711.637622     8250350.410126
+185701.526260     8250356.515460
+185672.585432     8250366.088155
+185637.256736     8250383.700569
+185602.574059     8250400.071801
+185564.127598     8250417.010280
+185518.748395     8250436.973297
+185487.456064     8250437.117571
+185461.986225     8250425.456228
+185422.721882     8250415.460385
+185392.922487     8250400.601147
+185368.784669     8250383.951222
+185355.191790     8250373.097877
+185339.046141     8250365.336490
+185315.372136     8250358.711111
+185287.843984     8250358.287380
+185277.207942     8250358.123664
+185267.197774     8250357.969581
+185247.318196     8250348.898065
+185217.599825     8250329.031754
+185188.517026     8250308.549281
+185174.944304     8250296.444357
+185163.066974     8250295.635589
+185140.624560     8250290.281056
+185118.787469     8250286.188495
+185103.721429     8250289.087076
+185094.175457     8250298.957545
+185080.744706     8250316.907789
+185058.020014     8250329.079946
+185050.966314     8250339.614722
+185049.654463     8250343.350961
+185045.699121     8250355.812027
+185040.906190     8250381.408858
+185039.867371     8250407.062710
+185038.353896     8250423.317795
+185036.971469     8250431.436088
+185032.400344     8250443.260966
+185024.499740     8250467.557309
+185008.425117     8250494.232374
+184986.114214     8250519.558794
+184963.056455     8250552.387345
+184944.620442     8250570.259781
+184931.300391     8250581.324810
+184926.154168     8250590.011114
+184922.188557     8250603.097966
+184916.285602     8250619.911429
+184911.674138     8250634.240994
+184895.549109     8250664.045771
+184885.095378     8250691.432537
+184873.490890     8250712.541379
+184859.858324     8250743.010466
+184847.376313     8250779.758238
+184835.288125     8250830.911854
+184830.192770     8250875.286189
+184823.896634     8250916.512318
+184818.286678     8250953.991813
+184807.641211     8250993.271632
+184798.842353     8251034.458473
+184793.343288     8251065.052756
+184793.141664     8251077.571601
+184792.808979     8251098.228002
+184792.446058     8251120.761771
+184803.294266     8251146.598596
+184812.861049     8251174.294294
+184821.771913     8251203.857730
+184831.833319     8251239.700614
+184847.424692     8251281.888830
+184864.146259     8251331.608069
+184877.184685     8251376.887475
+184889.546818     8251425.287723
+184908.286574     8251466.272511
+184932.647018     8251507.969761
+184952.941039     8251569.013285
+184973.396536     8251620.042654
+184988.856658     8251670.368421
+185005.023308     8251715.695979
+185026.891098     8251756.728915
+185051.716120     8251808.450722
+185066.086172     8251848.742304
+185076.167748     8251883.332846
+185089.347301     8251919.849671
+185104.272663     8251964.532177
+185122.477470     8251999.873701
+185139.017120     8252022.041700
+185154.910726     8252045.452409
+185177.626184     8252072.723791
+185194.730842     8252098.656918
+185216.285655     8252120.276169
+185237.235133     8252140.634214
+185253.239642     8252157.158946
+185274.854952     8252175.021932
+185298.226139     8252200.425573
+185309.145292     8252221.881114
+185313.242223     8252239.475210
+185315.967200     8252264.561053
+185319.822574     8252297.177159
+185328.511644     8252340.511783
+185339.864743     8252373.870007
+185353.730285     8252406.640196
+185363.993328     8252429.963471
+185375.537591     8252451.428633
+185387.172969     8252467.260168
+185401.926494     8252483.765644
+185419.817941     8252499.693477
+185436.387827     8252519.984107
+185446.075401     8252540.168037
+185455.107235     8252562.220471
+185470.425755     8252582.491840
+185488.095802     8252612.190103
+185509.630457     8252635.060933
+185519.418831     8252648.986204
+185524.959068     8252654.705748
+185535.322910     8252671.770364
+185547.361999     8252701.381952
+185553.265607     8252723.386234
+185556.242615     8252732.823520
+185556.676561     8252744.726204
+185562.570091     8252767.356276
+185568.100687     8252812.520881
+185578.787598     8252848.372629
+185589.575702     8252877.964961
+185596.054397     8252903.108583
+185599.465351     8252924.448552
+185603.643318     8252937.034811
+185610.253443     8252954.041648
+185619.285276     8252976.094082
+185627.055665     8252998.753044
+185642.101997     8253035.924549
+185662.688185     8253078.815592
+185676.685156     8253103.448995
+185686.423137     8253120.503213
+185699.905125     8253138.241771
+185717.635275     8253164.184527
+185732.782420     8253195.096609
+185746.819719     8253217.226090
+185765.811314     8253242.562318
+185786.639822     8253270.431364
+185803.058121     8253300.110359
+185813.290915     8253325.311766
+185823.624521     8253344.253751
+185837.631190     8253368.261359
+185856.532433     8253399.231226
+185875.513950     8253425.193244
+185886.543624     8253439.762802
+185889.621443     8253442.940665
+185896.382786     8253450.558368
+185908.694062     8253463.269819
+185921.540098     8253481.624532
+185934.386146     8253499.978481
+185943.538949     8253514.519914
+185952.096508     8253527.173586
+185962.520847     8253540.481937
+185971.734135     8253551.267869
+185988.384688     8253566.549892
+186005.721206     8253578.086806
+186021.826528     8253588.352115
+186034.208368     8253596.682277
+186043.441825     8253606.215865
+186051.464243     8253613.226270
+186062.019631     8253618.397831
+186070.637687     8253627.295238
+186078.034601     8253634.296779
+186090.436611     8253641.374598
+186100.931132     8253650.301653
+186109.609673     8253655.443559
+186115.724984     8253664.303207
+186121.255130     8253670.649305
+186124.867708     8253679.470429
+186125.241170     8253695.128614
+186124.999219     8253710.151381
+186121.154780     8253715.726471
+186116.664285     8253722.545034
+186105.080158     8253742.401536
+186091.124345     8253754.082724
+186086.724596     8253755.266890
+186079.196991     8253756.403674
+186070.982658     8253761.285555
+186061.507249     8253766.774733
+186053.949408     8253769.788886
+186039.498782     8253773.322884
+186004.341831     8253780.295355
+185965.360229     8253791.590566
+185938.306351     8253800.565598
+185918.204979     8253805.265271
+185893.805052     8253804.889692
+185862.522800     8253804.408176
+185835.064829     8253799.603150
+185806.920894     8253798.543232
+185780.643726     8253798.138758
+185747.474524     8253798.254906
+185715.425653     8253806.526343
+185678.926220     8253819.113179
+185642.992571     8253835.464392
+185613.405712     8253846.279032
+185598.844577     8253856.698249
+185592.537720     8253859.731657
+185582.456607     8253863.958859
+185568.440310     8253879.395548
+185550.589640     8253899.782301
+185529.580510     8253921.998271
+185500.317088     8253951.600813
+185479.347903     8253971.312855
+185462.849412     8253985.459447
+185453.959180     8253993.461412
+185448.812957     8254002.147715
+185441.113595     8254013.925206
+185430.246062     8254028.158473
+185421.719214     8254052.444412
+185412.547074     8254077.973835
+185402.254258     8254095.345672
+185391.306083     8254114.586019
+185386.734946     8254126.411661
+185386.018338     8254132.035661
+185386.331698     8254151.449352
+185393.900462     8254186.627159
+185397.200525     8254214.852341
+185398.149455     8254233.649871
+185402.912588     8254248.749680
+185407.019980     8254265.717993
+185407.444230     8254278.246472
+185414.538338     8254304.025512
+185426.577427     8254333.637099
+185441.209970     8254357.654341
+185459.686963     8254376.095729
+185467.588412     8254390.617136
+185472.391872     8254403.213022
+185480.818370     8254424.004250
+185496.550692     8254457.429117
+185508.700660     8254480.156257
+185513.484344     8254494.003728
+185520.669185     8254514.149134
+185525.321809     8254536.134161
+185528.167755     8254553.709002
+185529.328007     8254559.361891
+185529.943802     8254559.997314
+185530.508810     8254563.762443
+185531.498067     8254580.056051
+185532.557888     8254591.968369
+185533.728600     8254596.995474
+185537.280694     8254609.572099
+185540.056077     8254631.528230
+185540.974771     8254652.203129
+185544.971272     8254676.056654
+185550.602692     8254714.961072
+185551.470586     8254738.766440
+185554.942407     8254756.350915
+185562.026818     8254782.755750
+185574.509933     8254823.644231
+185575.670578     8254829.296362
+185578.798803     8254829.344514
+185586.175560     8254837.597634
+185590.474115     8254842.672885
+185591.099989     8254842.682519
+185597.285876     8254847.160113
+185604.622317     8254857.916391
+185604.612226     8254858.542944
+185609.556813     8254862.376250
+185640.617283     8254876.628190
+185662.353575     8254886.979411
+185678.610102     8254887.856350
+185691.002033     8254895.559958
+185707.773556     8254903.330979
+185726.956684     8254916.774916
+185754.192873     8254935.350366
+185766.463811     8254950.566504
+185779.895393     8254971.434773
+185797.121033     8254989.856135
+185803.175859     8255002.471283
+185806.869079     8255006.285328
+185817.323679     8255017.714783
+185830.775419     8255037.331472
+185843.681940     8255051.930684
+185859.616255     8255072.837477
+185875.570371     8255092.491156
+185878.638099     8255096.295572
+185891.030030     8255103.999180
+185912.080332     8255118.097038
+185922.019937     8255122.632411
+185928.225981     8255125.858425
+185938.236531     8255126.012514
+185957.550719     8255131.318895
+185973.121282     8255135.940943
+185986.239493     8255137.396284
+186000.609477     8255138.869365
+186013.112311     8255139.686997
+186020.559249     8255143.558821
+186024.938840     8255143.626234
+186037.381178     8255148.200131
+186052.285908     8255155.317237
+186060.923740     8255162.963059
+186070.772981     8255173.132835
+186086.676690     8255195.916226
+186111.814214     8255228.234739
+186127.798554     8255246.011814
+186127.748148     8255249.141526
+186131.451459     8255252.329017
+186131.956364     8255259.849652
+186139.888049     8255272.493690
+186144.066017     8255285.079949
+186147.739080     8255290.145573
+186147.678607     8255293.900309
+186148.243984     8255297.666208
+186153.662870     8255310.896748
+186160.141946     8255336.040376
+186163.714197     8255347.365422
+186163.663791     8255350.495133
+186163.583136     8255355.502977
+186164.693376     8255364.284819
+186165.853997     8255369.938479
+186169.466587     8255378.758839
+186169.456496     8255379.385392
+186169.385933     8255383.766682
+186173.058996     8255388.832306
+186173.624397     8255392.596676
+186174.239798     8255393.232858
+186174.865673     8255393.242492
+186175.481074     8255393.878673
+186180.476091     8255394.580740
+186181.101966     8255394.590374
+186184.855683     8255394.648153
+186189.850676     8255395.351748
+186193.604775     8255395.409534
+186196.733000     8255395.457685
+END
+LINE3D
+HEIGHT 1140.000000
+186422.928660     8255067.107781
+186423.554152     8255067.117409
+186427.308252     8255067.175194
+186431.051903     8255067.857999
+186435.411312     8255069.178519
+186440.406330     8255069.880586
+186454.785998     8255070.728636
+186472.293916     8255071.623309
+186492.244046     8255076.314298
+186506.522927     8255083.420242
+186515.282110     8255083.555069
+186525.918152     8255083.718786
+186537.684209     8255091.412760
+186551.913041     8255101.649949
+186571.701504     8255116.355092
+186597.666169     8255136.162860
+186633.651069     8255155.499685
+186664.661108     8255172.882865
+186695.751827     8255185.256672
+186731.908484     8255193.952791
+186762.312832     8255210.073229
+186775.895632     8255221.552364
+186784.503598     8255231.076325
+186791.869905     8255239.954464
+186805.482955     8255249.555466
+186818.551166     8255254.138997
+186822.869879     8255257.962669
+186833.495854     8255258.751411
+186850.327849     8255262.767695
+186883.305493     8255274.545367
+186903.174993     8255284.242673
+186910.672743     8255284.983263
+186918.806052     8255285.108456
+186926.394499     8255280.217705
+186934.759681     8255265.945920
+186943.145020     8255250.422556
+186944.688756     8255232.288575
+186945.707405     8255207.887066
+186941.842347     8255175.895991
+186937.855912     8255151.417441
+186931.901898     8255132.542869
+186926.533061     8255116.181084
+186922.950719     8255105.482591
+186913.272854     8255084.672102
+186901.243832     8255054.435490
+186889.234991     8255022.945770
+186877.902431     8254988.335972
+186874.127712     8254950.712023
+186874.500736     8254927.550936
+186875.024953     8254895.002244
+186875.438268     8254869.339527
+186870.735620     8254850.484218
+186866.164033     8254823.491353
+186862.682121     8254806.533432
+186857.979474     8254787.678123
+186857.616102     8254771.393384
+186857.676600     8254767.637120
+186862.317906     8254751.430945
+186875.910335     8254723.465783
+186880.309252     8254683.463104
+186883.679428     8254668.488488
+186883.840725     8254658.473565
+186884.062519     8254644.702376
+186879.824054     8254635.872383
+186871.256798     8254623.844506
+186866.382775     8254615.629909
+186865.212051     8254610.603568
+186854.767554     8254598.546795
+186845.594582     8254585.257706
+186831.436695     8254570.639232
+186817.127590     8254565.409892
+186798.368318     8254564.495193
+186782.878410     8254554.865301
+186753.684719     8254541.268040
+186718.103531     8254535.711268
+186691.816272     8254535.933347
+186676.750614     8254538.831934
+186649.222080     8254538.408198
+186612.550821     8254522.817240
+186588.160973     8254521.815872
+186570.208659     8254509.643534
+186549.733837     8254498.684258
+186531.872245     8254480.879052
+186509.026120     8254461.744466
+186476.996562     8254429.946575
+186453.080156     8254399.525456
+186440.173623     8254384.927008
+186424.834933     8254365.907982
+186399.526021     8254344.230946
+186375.509184     8254320.069255
+186347.687830     8254298.980255
+186325.376095     8254285.488161
+186303.710379     8254270.754886
+186283.871510     8254259.179454
+186250.893472     8254247.402540
+186220.448809     8254233.785260
+186203.082043     8254224.126478
+186192.516564     8254219.581471
+186172.626907     8254211.135745
+186148.307240     8254205.753081
+186110.768538     8254205.175262
+186093.725210     8254214.304382
+186077.306991     8254223.443125
+186060.808513     8254237.588953
+186049.365512     8254248.682875
+186044.854860     8254256.753016
+186035.763004     8254277.273826
+186024.078052     8254303.390516
+186019.971492     8254325.240716
+186019.628741     8254346.522141
+186019.124681     8254377.819255
+186018.781918     8254399.101445
+186019.528842     8254430.417815
+186022.708305     8254466.154768
+186025.978132     8254496.257318
+186028.894655     8254509.450104
+186029.238250     8254526.986427
+186032.013633     8254548.942559
+186032.346768     8254567.104665
+186036.393688     8254587.827715
+186039.744157     8254612.923185
+186042.539697     8254633.627738
+186048.453384     8254655.006231
+186052.470055     8254677.607413
+186052.843517     8254693.265598
+186055.739870     8254707.710727
+186060.432833     8254727.191068
+186067.557177     8254751.092739
+186071.160059     8254760.539658
+186074.802873     8254767.483414
+186078.546906     8254768.166225
+186085.983753     8254772.664603
+186097.175105     8254777.219243
+186110.172371     8254786.184058
+186125.712685     8254792.684238
+186140.516604     8254806.060767
+186155.976263     8254817.568792
+186168.953371     8254827.785185
+186178.126332     8254841.075039
+186184.816741     8254853.073262
+186192.668154     8254870.725150
+186197.976136     8254890.841666
+186205.282329     8254903.476077
+186211.357313     8254914.839646
+186214.404883     8254919.895642
+186219.975369     8254923.737054
+186236.806982     8254927.753332
+186257.352762     8254934.330560
+186266.606377     8254942.612570
+186274.033157     8254947.735973
+186285.194261     8254954.168746
+186300.007889     8254966.918715
+186312.995446     8254976.510089
+186324.731254     8254986.082196
+186335.185854     8254997.511651
+186346.891796     8255008.961895
+186364.813492     8255023.011595
+186382.755726     8255035.809722
+186387.064730     8255040.259954
+186390.112325     8255045.314421
+186396.298187     8255049.793543
+186399.365940     8255053.596431
+186408.003772     8255061.242254
+186409.245047     8255061.888069
+186409.870540     8255061.897697
+186411.121906     8255061.916959
+END
+LINE3D
+HEIGHT 1140.000000
+187767.546630     8254187.476533
+187768.172504     8254187.486167
+187769.423489     8254187.505422
+187773.803080     8254187.572836
+187785.700567     8254187.130025
+187809.575814     8254181.236553
+187832.169459     8254177.201187
+187855.399044     8254172.550430
+187875.429840     8254172.232812
+187903.684679     8254166.406753
+187923.775972     8254162.332870
+187938.871866     8254157.556915
+187955.976074     8254144.671535
+187972.424528     8254133.655424
+187988.226951     8254123.881259
+188020.346410     8254111.227003
+188054.534643     8254086.709352
+188072.173597     8254079.467998
+188095.453600     8254071.686765
+188138.117974     8254064.830618
+188180.107213     8254061.094566
+188202.085444     8254056.423783
+188227.121324     8254056.183206
+188258.464060     8254052.909221
+188289.140990     8254052.128766
+188316.113832     8254048.161572
+188343.642366     8254048.585308
+188348.021576     8254048.652715
+188348.647832     8254048.662355
+188367.427261     8254048.325475
+188408.174843     8254043.943602
+188450.233895     8254035.825483
+188494.210501     8254025.233103
+188530.639358     8254017.028321
+188558.348595     8254006.184779
+188587.996322     8253991.614643
+188616.533427     8253968.262660
+188634.393793     8253947.250111
+188652.224674     8253928.115707
+188667.552823     8253908.942779
+188682.264806     8253889.133658
+188698.945515     8253863.720576
+188711.275735     8253836.361929
+188729.247756     8253808.464181
+188750.348002     8253780.614584
+188769.641571     8253748.354801
+188783.364678     8253712.252077
+188792.557346     8253685.471845
+188799.913113     8253656.158031
+188804.140642     8253626.796829
+188808.196795     8253608.076341
+188808.983584     8253598.071045
+188810.487363     8253582.441756
+188815.955810     8253553.724836
+188819.537690     8253525.605585
+188819.991344     8253497.438183
+188820.606295     8253459.255857
+188822.483073     8253420.467010
+188823.642874     8253387.301391
+188824.146934     8253356.004278
+188824.085987     8253320.942036
+188819.715642     8253281.430320
+188815.366218     8253240.667037
+188811.470135     8253210.554847
+188803.134370     8253184.129986
+188794.223506     8253154.566550
+188784.697241     8253124.366933
+188775.191133     8253092.915737
+188769.307682     8253069.659875
+188764.019488     8253048.291010
+188756.854816     8253026.893261
+188752.767188     8253008.674127
+188742.504539     8252985.350094
+188738.639469     8252953.359784
+188733.522650     8252921.350205
+188729.101899     8252884.968201
+188724.166546     8252841.691356
+188717.869306     8252805.281232
+188713.328337     8252776.411005
+188707.666680     8252739.383955
+188701.005305     8252686.689080
+188697.170483     8252652.820637
+188692.598501     8252625.828531
+188691.881825     8252592.634029
+188688.904356     8252544.379000
+188680.961760     8252493.542238
+188677.468925     8252438.392357
+188672.292385     8252410.138292
+188663.109333     8252397.474992
+188659.021717     8252379.255094
+188648.849790     8252350.298191
+188641.704512     8252327.648852
+188636.941762     8252312.549049
+188632.168168     8252298.075024
+188624.236865     8252285.430991
+188613.287464     8252265.853583
+188591.107159     8252244.224705
+188569.572504     8252221.353875
+188538.017602     8252198.954751
+188503.283305     8252179.637176
+188467.964607     8252157.806063
+188418.901417     8252134.511497
+188374.288776     8252106.902296
+188343.399682     8252082.009643
+188311.319336     8252053.341457
+188286.505250     8252039.810846
+188263.497816     8252030.691949
+188237.533557     8252010.882658
+188204.595846     8251996.601823
+188171.607729     8251985.450699
+188136.087407     8251976.138431
+188088.053802     8251966.633551
+188025.115836     8251950.012335
+187978.959090     8251940.536345
+187934.124274     8251926.698326
+187875.525573     8251912.648445
+187837.007704     8251895.150465
+187797.298941     8251873.878486
+187753.352121     8251843.774991
+187710.232404     8251801.163042
+187655.659620     8251770.270041
+187609.764983     8251744.519705
+187576.222319     8251728.977668
+187534.020914     8251707.040612
+187491.789643     8251686.981695
+187451.465479     8251665.073534
+187398.023080     8251641.711561
+187346.457551     8251618.377713
+187289.230804     8251596.836086
+187238.936418     8251572.269915
+187201.074659     8251552.904201
+187155.765569     8251529.667420
+187111.737712     8251504.571763
+187062.775716     8251475.017780
+186988.353590     8251433.175895
+186928.795498     8251400.954267
+186869.833031     8251370.620407
+186820.800472     8251345.447714
+186765.813516     8251301.400444
+186711.987194     8251263.006069
+186664.407625     8251225.333793
+186623.346234     8251171.483468
+186599.419736     8251141.688902
+186569.267419     8251109.919907
+186529.265849     8251067.981899
+186488.618247     8251027.285837
+186455.438516     8250989.209267
+186415.275649     8250957.286184
+186385.112871     8250926.142972
+186360.570972     8250895.712225
+186341.589456     8250869.750207
+186312.667953     8250839.252810
+186274.412193     8250805.480484
+186241.171596     8250771.159409
+186210.252265     8250748.144124
+186170.483400     8250730.627652
+186133.176570     8250715.652856
+186105.264495     8250700.196724
+186077.998069     8250683.498642
+186031.922347     8250669.015578
+185988.328819     8250655.822610
+185944.069101     8250645.123167
+185892.907259     8250635.570900
+185852.310908     8250630.562875
+185801.109132     8250623.513771
+185754.205912     8250621.539919
+185722.923660     8250621.058403
+185690.914722     8250626.826676
+185648.915786     8250631.188524
+185613.103107     8250640.028735
+185581.740200     8250644.555063
+185558.530773     8250647.954241
+185528.984240     8250656.264960
+185496.148186     8250674.542450
+185464.503013     8250696.594704
+185440.405972     8250716.259364
+185411.273611     8250737.724352
+185389.739419     8250753.671265
+185375.158114     8250765.342825
+185367.499079     8250774.616394
+185355.914951     8250794.472896
+185337.953391     8250821.744862
+185324.481944     8250842.198258
+185304.108384     8250863.798066
+185290.697791     8250880.496732
+185290.617149     8250885.503812
+185289.840439     8250894.883318
+185289.477505     8250917.417851
+185294.765331     8250938.785946
+185300.184573     8250952.018020
+185308.166664     8250961.532347
+185314.110600     8250981.032708
+185317.461069     8251006.128178
+185312.143470     8251025.455194
+185301.376368     8251033.429033
+185279.166277     8251052.496030
+185265.170531     8251066.680381
+185256.835216     8251079.074028
+185245.766059     8251105.826141
+185240.256533     8251137.046207
+185235.131312     8251183.298680
+185229.925067     8251234.558228
+185233.013427     8251275.928044
+185239.079164     8251326.735916
+185247.748077     8251371.322120
+185257.002154     8251418.421873
+185266.962760     8251460.523416
+185286.398763     8251497.136544
+185315.683637     8251543.918679
+185338.701982     8251591.230300
+185358.117827     8251629.095008
+185379.874726     8251677.013156
+185399.895906     8251716.139071
+185424.347072     8251752.203451
+185449.373718     8251791.406413
+185465.661338     8251829.222968
+185480.353996     8251849.483940
+185493.240741     8251865.334736
+185511.697565     8251885.028467
+185534.392471     8251913.552187
+185556.986948     8251948.335334
+185562.436451     8251959.688512
+185569.237739     8251964.802287
+185576.564102     8251976.184354
+185587.593764     8251990.754676
+185601.650838     8252011.632573
+185618.099768     8252039.433441
+185638.797216     8252075.440042
+185655.135242     8252110.126887
+185671.563619     8252139.180092
+185680.413986     8252172.499793
+185683.159133     8252196.333292
+185684.087893     8252216.383165
+185687.519399     8252236.470798
+185697.085991     8252264.166493
+185707.238143     8252294.374980
+185719.711167     8252335.890016
+185740.277566     8252380.033408
+185760.278589     8252420.410901
+185778.503553     8252454.500846
+185793.166344     8252476.639955
+185808.434458     8252500.041035
+185815.599142     8252521.438020
+185816.003222     8252535.218843
+185819.424267     8252555.932259
+185823.895042     8252589.184546
+185827.306378     8252610.524522
+185828.416605     8252619.307128
+185833.795152     8252635.042354
+185837.902556     8252652.009903
+185838.376830     8252661.408665
+185839.517305     8252668.313139
+185843.049611     8252682.142113
+185844.250189     8252685.291080
+185844.865985     8252685.926504
+185854.079285     8252696.711671
+185862.131939     8252701.844708
+185870.790311     8252708.238957
+185879.498706     8252711.503490
+185890.114590     8252712.918785
+185907.582169     8252716.318144
+185923.213216     8252717.184691
+185935.595056     8252725.514853
+185944.768029     8252738.803942
+185949.561410     8252752.025618
+185952.518247     8252762.715247
+185953.628475     8252771.497853
+185954.668138     8252784.661750
+185960.420528     8252816.055167
+185971.107439     8252851.906915
+185986.415880     8252872.804074
+185996.860377     8252884.860846
+186013.460524     8252903.272580
+186037.982265     8252934.954906
+186060.122243     8252959.087707
+186076.752627     8252975.622073
+186092.666403     8252997.780438
+186116.502167     8253033.208637
+186148.178883     8253086.914508
+186173.225304     8253124.865885
+186192.762119     8253155.219590
+186207.314020     8253184.243912
+186224.913109     8253218.324223
+186242.603314     8253246.770907
+186262.906760     8253268.370896
+186282.373011     8253303.105892
+186305.391356     8253350.417513
+186328.016081     8253383.322528
+186352.588228     8253411.875143
+186391.590462     8253438.145332
+186421.197930     8253464.897620
+186441.541703     8253483.993687
+186466.941349     8253500.037090
+186492.825347     8253524.853466
+186519.839361     8253557.200099
+186544.381272     8253587.630082
+186572.707518     8253616.240482
+186595.432661     8253642.886833
+186628.209075     8253667.182592
+186665.213469     8253700.935657
+186690.421187     8253728.872110
+186719.352768     8253758.743717
+186744.661299     8253780.420748
+186780.605871     8253802.261495
+186808.366728     8253827.106760
+186834.765710     8253858.817982
+186860.094410     8253879.242670
+186887.905673     8253900.958224
+186913.244452     8253920.757122
+186931.650882     8253943.579800
+186950.723502     8253963.908955
+186964.326472     8253974.135746
+186968.070111     8253974.819315
+186968.695603     8253974.828943
+186976.072359     8253983.082063
+187000.210559     8253999.731994
+187025.609823     8254015.775391
+187045.993924     8254032.367537
+187067.084541     8254043.962236
+187090.667443     8254056.220479
+187123.524118     8254075.509152
+187158.258033     8254094.826722
+187186.815758     8254109.040902
+187204.818477     8254118.083528
+187225.283233     8254129.667830
+187257.645463     8254140.810084
+187279.987077     8254152.423276
+187292.944386     8254163.892782
+187304.004296     8254176.584972
+187321.240014     8254194.380545
+187344.076430     8254214.141689
+187359.475617     8254229.404450
+187377.467875     8254239.072860
+187397.973328     8254248.154010
+187408.538412     8254252.699775
+187409.103801     8254256.464909
+187414.108885     8254256.541951
+187430.375504     8254256.792336
+187445.391137     8254257.023466
+187461.032263     8254257.264224
+187472.929750     8254256.821413
+187488.631373     8254253.305906
+187507.531773     8254245.458024
+187525.776061     8254239.477877
+187548.995580     8254235.452145
+187572.255413     8254228.923256
+187586.110414     8254223.501491
+187599.329449     8254218.696645
+187614.435816     8254213.294142
+187641.429210     8254208.074611
+187665.304457     8254202.181139
+187679.068724     8254202.393007
+187682.822441     8254202.450787
+187691.581624     8254202.585613
+187695.335342     8254202.643393
+187701.662356     8254198.358406
+187709.180251     8254197.848181
+187712.994466     8254194.149696
+187718.635503     8254193.610582
+187724.286618     8254192.445678
+187731.188731     8254191.299266
+187736.880174     8254187.630440
+187738.131158     8254187.649696
+187741.885257     8254187.707482
+187745.013483     8254187.755633
+187748.141708     8254187.803785
+187748.767200     8254187.813413
+187753.146792     8254187.880826
+187753.156870     8254187.255037
+187754.408237     8254187.274298
+187755.659603     8254187.293560
+END
+LINE3D-MASTER
+HEIGHT 1150.000000
+187904.619647     8253779.684910
+187911.267046     8253773.333963
+187915.091327     8253769.010452
+187924.102541     8253753.496722
+187936.150876     8253743.664007
+187947.483356     8253739.456067
+187959.996257     8253739.648674
+187978.765608     8253739.937583
+188001.833514     8253745.301744
+188032.379383     8253752.658844
+188058.585987     8253757.444608
+188076.103972     8253757.714256
+188084.863155     8253757.849082
+188102.371061     8253758.744520
+188139.283889     8253759.312704
+188157.447905     8253758.340407
+188173.149516     8253754.825664
+188194.492176     8253750.771043
+188223.342258     8253746.832744
+188239.709688     8253740.823708
+188250.567894     8253727.217006
+188268.559320     8253698.066902
+188288.478381     8253665.816747
+188302.222410     8253628.462457
+188317.186424     8253593.004779
+188335.229008     8253560.725740
+188358.881629     8253529.784943
+188382.029728     8253491.323517
+188408.417718     8253446.024278
+188422.796554     8253408.053814
+188434.754076     8253365.036995
+188442.382030     8253318.823045
+188450.998848     8253288.903462
+188460.827099     8253261.506304
+188464.924343     8253240.281905
+188469.858019     8253205.922488
+188471.098463     8253167.749790
+188467.334204     8253129.500057
+188464.225686     8253089.381819
+188459.653717     8253062.388948
+188448.250199     8253032.161199
+188432.003288     8252991.840728
+188418.984650     8252945.308973
+188408.338449     8252906.953308
+188398.095195     8252882.377685
+188386.086354     8252850.887965
+188376.055566     8252813.167718
+188366.680519     8252773.578966
+188356.558234     8252741.492341
+188348.919289     8252710.695830
+188348.596232     8252691.907934
+188344.407792     8252679.948223
+188339.776102     8252656.710865
+188331.995253     8252634.677687
+188328.059619     8252607.068666
+188324.143378     8252578.208055
+188323.699340     8252566.931925
+188322.720555     8252550.011769
+188318.784157     8252522.402737
+188314.202861     8252496.036432
+188310.589519     8252487.215296
+188310.054760     8252481.572035
+188295.998055     8252460.694908
+188266.289394     8252440.202037
+188239.719024     8252419.132293
+188215.591678     8252401.855820
+188195.933500     8252379.013874
+188176.750359     8252365.570702
+188157.567219     8252352.127530
+188129.685392     8252334.793266
+188105.082996     8252308.118783
+188083.407202     8252294.011298
+188063.638514     8252278.054570
+188031.992509     8252261.288310
+187991.688503     8252238.128571
+187961.586592     8252203.229864
+187923.744609     8252182.612565
+187882.048491     8252168.196150
+187852.864879     8252153.973100
+187824.246275     8252143.515178
+187790.643139     8252131.727878
+187763.185168     8252126.922852
+187743.255184     8252120.981047
+187718.350352     8252113.084833
+187685.493678     8252093.796160
+187646.461208     8252069.403339
+187619.840826     8252051.462548
+187596.247845     8252039.830095
+187570.838121     8252024.412481
+187532.390816     8252002.533210
+187499.049789     8251974.471564
+187475.779414     8251942.808500
+187456.141775     8251918.714981
+187421.448187     8251896.893490
+187382.355220     8251876.256934
+187353.837822     8251859.538832
+187325.865250     8251847.838965
+187290.334467     8251839.152481
+187252.795765     8251838.574662
+187226.508518     8251838.795977
+187198.445212     8251832.729744
+187156.133299     8251817.677906
+187108.917114     8251796.289604
+187062.911573     8251777.425244
+187003.132081     8251758.974047
+186947.126464     8251739.329051
+186891.736261     8251720.319472
+186857.053134     8251697.872197
+186831.774458     8251674.317792
+186806.405443     8251656.396262
+186769.169177     8251637.040175
+186736.463720     8251608.362368
+186704.090554     8251559.028918
+186669.558645     8251527.192509
+186647.943348     8251509.328759
+186646.762545     8251504.928207
+186643.018918     8251504.243874
+186636.368454     8251489.741723
+186625.439604     8251468.911978
+186610.857837     8251441.765795
+186596.285779     8251413.993052
+186589.524818     8251406.375355
+186589.534897     8251405.749566
+186577.869270     8251391.796163
+186568.020399     8251381.627157
+186556.929871     8251370.812330
+186543.266798     8251364.341045
+186533.982934     8251357.937167
+186525.304393     8251352.795261
+186514.668351     8251352.631544
+186501.459395     8251356.810600
+186489.330035     8251371.650389
+186476.645758     8251382.098496
+186465.212836     8251392.566629
+186454.445746     8251400.539703
+186442.427659     8251408.494286
+186424.283800     8251408.215005
+186404.343737     8251402.898990
+186390.740767     8251392.672198
+186375.341592     8251377.408673
+186348.196518     8251353.199595
+186311.484482     8251301.294051
+186271.634130     8251249.966910
+186234.034099     8251214.326843
+186197.806797     8251171.194278
+186156.352237     8251141.755854
+186121.638861     8251121.186712
+186097.551079     8251101.406305
+186078.993431     8251087.972761
+186057.357963     8251071.361354
+186033.290339     8251050.329369
+186011.019300     8251034.334123
+185986.295935     8251015.170642
+185957.818852     8250995.949382
+185932.388958     8250981.784111
+185924.901299     8250980.416968
+185911.823403     8250976.458469
+185893.114537     8250972.414058
+185869.965594     8250972.057736
+185854.324468     8250971.816978
+185839.843975     8250977.229115
+185833.516962     8250981.514102
+185825.868005     8250990.161882
+185811.206046     8251006.841285
+185791.438203     8251029.702307
+185785.060783     8251037.117005
+185784.303848     8251045.244926
+185771.690980     8251090.129492
+185759.723380     8251133.772100
+185750.228645     8251179.331371
+185744.548126     8251221.192156
+185740.400857     8251245.546272
+185739.341868     8251272.452468
+185738.716838     8251311.260583
+185737.395359     8251354.441118
+185737.396203     8251393.258867
+185744.047117     8251446.579525
+185752.221204     8251483.019304
+185754.794963     8251517.494280
+185757.479613     8251545.084045
+185761.334987     8251577.700150
+185767.309158     8251595.323143
+185774.615351     8251607.957553
+185788.652268     8251630.087029
+185808.713776     8251666.709021
+185818.533230     8251717.574673
+185821.893791     8251742.043590
+185826.112073     8251752.126691
+185827.222313     8251760.908533
+185834.588990     8251769.787442
+185853.762040     8251783.857168
+185876.517825     8251808.624628
+185900.625777     8251827.152692
+185922.927052     8251841.270569
+185947.650417     8251860.434050
+185964.755075     8251886.367178
+185982.455358     8251914.188072
+185989.408709     8251948.730462
+185992.174013     8251971.312382
+185991.851419     8251991.342229
+185991.448171     8252016.379920
+185997.866381     8252045.279043
+186009.713912     8252086.784450
+186029.906468     8252115.269652
+186059.463541     8252145.150887
+186087.356291     8252200.677110
+186109.779392     8252246.100971
+186119.285500     8252277.552167
+186120.274757     8252293.845775
+186120.093291     8252305.113041
+186120.971658     8252328.291862
+186125.018183     8252349.015670
+186129.085260     8252368.487141
+186133.808065     8252386.090871
+186140.872318     8252413.747285
+186154.556394     8252457.784740
+186171.338827     8252503.748485
+186188.776620     8252547.843719
+186205.588920     8252591.929326
+186222.603227     8252623.496093
+186235.338371     8252648.736018
+186244.380283     8252670.162663
+186257.095271     8252696.654167
+186271.667329     8252724.426909
+186288.782065     8252749.734248
+186304.686145     8252772.518408
+186318.137515     8252792.134328
+186329.651912     8252815.477629
+186345.333827     8252852.032208
+186372.933388     8252886.892397
+186412.369950     8252925.065276
+186438.566926     8252969.295337
+186459.395435     8252997.164383
+186473.967111     8253024.937120
+186486.783292     8253045.169207
+186502.081655     8253066.692155
+186517.369939     8253088.840892
+186536.472425     8253107.291908
+186547.481929     8253123.113809
+186569.097226     8253140.977559
+186594.406151     8253162.653832
+186617.878150     8253181.798051
+186639.453120     8253202.165723
+186667.304711     8253221.377355
+186686.427366     8253238.576028
+186695.045410     8253247.474199
+186695.035331     8253248.099989
+186695.600339     8253251.865117
+186696.841614     8253252.510933
+186709.637638     8253273.994599
+186722.453425     8253294.227444
+186736.651639     8253306.341996
+186754.018406     8253316.000778
+186783.777486     8253333.363173
+186802.335134     8253346.796718
+186809.822399     8253348.164620
+186817.269731     8253352.035685
+186842.083830     8253365.565533
+186873.739925     8253381.705239
+186892.993630     8253390.767121
+186911.652090     8253397.941243
+186927.081513     8253411.326635
+186941.895522     8253424.076611
+186953.611161     8253434.901060
+186957.879862     8253441.853686
+186967.617842     8253458.907904
+186979.212893     8253477.243361
+186999.031987     8253490.070378
+187011.978834     8253502.165668
+187022.463658     8253511.718518
+187027.943398     8253521.194328
+187033.382429     8253533.174053
+187034.573311     8253536.948816
+187038.791606     8253547.031152
+187047.368940     8253558.433240
+187062.051902     8253579.320006
+187078.601631     8253600.862216
+187100.812184     8253620.612962
+187121.882644     8253633.459241
+187141.681568     8253647.538600
+187159.623421     8253660.336721
+187160.249295     8253660.346355
+187160.239216     8253660.972145
+187160.854630     8253661.607562
+187160.834472     8253662.859141
+187161.459964     8253662.868769
+187167.605512     8253669.851048
+187167.555106     8253672.980760
+187173.125579     8253676.822936
+187174.356788     8253678.093776
+187182.348958     8253686.982314
+187194.690483     8253697.815633
+187203.389169     8253701.706725
+187209.585135     8253705.558529
+187218.343936     8253705.693350
+187230.856837     8253705.885956
+187244.005690     8253705.462407
+187254.086434     8253701.234435
+187269.122225     8253700.213986
+187281.695611     8253696.651091
+187297.346827     8253696.265296
+187313.532791     8253701.523525
+187327.841896     8253706.752865
+187337.226572     8253706.897320
+187352.857619     8253707.763867
+187372.676712     8253720.590884
+187387.581455     8253727.707226
+187411.144187     8253741.217811
+187419.206920     8253745.725058
+187419.751770     8253750.741766
+187428.349657     8253760.891516
+187435.130787     8253767.256870
+187446.130582     8253783.705331
+187460.359045     8253793.941750
+187471.459283     8253804.130018
+187474.567350     8253805.429749
+187474.557259     8253806.056302
+187475.182751     8253806.065930
+187475.172673     8253806.691720
+187475.162594     8253807.317509
+187475.152515     8253807.943299
+187480.067248     8253813.653979
+187483.185394     8253814.327920
+187502.348365     8253829.023435
+187514.770532     8253834.849675
+187522.742545     8253844.989791
+187539.372928     8253861.524157
+187553.692124     8253866.126944
+187562.431138     8253867.514113
+187573.632187     8253871.442959
+187603.532012     8253880.042768
+187627.932321     8253880.418352
+187641.706679     8253880.003667
+187648.608779     8253878.858019
+187662.383125     8253878.444098
+187675.592094     8253874.264277
+187688.740948     8253873.840728
+187705.703622     8253869.719452
+187719.488059     8253868.678977
+187733.322889     8253864.509554
+187749.730647     8253855.996596
+187770.518378     8253847.551056
+187788.167411     8253839.683913
+187800.791202     8253832.991307
+187802.042569     8253833.010568
+187805.180885     8253832.432166
+187811.517977     8253827.521390
+187815.897187     8253827.588797
+187816.523061     8253827.598431
+187817.148554     8253827.608059
+187825.352439     8253823.351198
+187829.187180     8253818.401903
+187839.893798     8253814.183566
+187846.866462     8253808.656627
+187856.311634     8253805.044817
+187867.714295     8253796.455581
+187875.232203     8253795.944593
+187885.323013     8253791.091596
+187895.343642     8253790.619895
+187904.619647     8253779.684910
+END
+LINE3D
+HEIGHT 1160.000000
+187436.064830     8253476.135935
+187436.639916     8253479.275274
+187437.245621     8253480.537251
+187440.858199     8253489.358375
+187449.435928     8253500.759704
+187455.470584     8253514.627196
+187465.309376     8253525.421991
+187477.065724     8253533.742525
+187481.435237     8253534.435727
+187500.759517     8253539.115555
+187528.288051     8253539.539291
+187543.303303     8253539.770415
+187556.442078     8253539.972655
+187567.713691     8253539.520210
+187580.428216     8253527.193971
+187597.542490     8253513.683566
+187609.621062     8253501.973483
+187620.509134     8253486.488643
+187634.676649     8253461.662820
+187645.776424     8253433.033345
+187654.323072     8253407.494293
+187658.379226     8253388.773805
+187658.530444     8253379.384671
+187658.732068     8253366.865825
+187658.308200     8253354.337352
+187649.841362     8253336.050810
+187636.429937     8253313.930963
+187632.151539     8253307.604133
+187621.616309     8253301.180993
+187602.947770     8253294.632661
+187588.628586     8253290.029111
+187582.442699     8253285.551518
+187573.068103     8253284.781273
+187561.261349     8253279.590451
+187547.597894     8253273.119160
+187543.319114     8253266.792324
+187538.465248     8253257.326149
+187534.327608     8253242.235968
+187534.549390     8253228.465544
+187538.404301     8253222.263907
+187547.879710     8253216.774728
+187552.904951     8253215.600191
+187561.654056     8253216.360807
+187574.631152     8253226.577964
+187587.588078     8253238.047465
+187611.827091     8253248.437973
+187633.099175     8253248.765406
+187658.669826     8253254.167327
+187670.446331     8253261.236281
+187684.644558     8253273.350069
+187695.583486     8253293.554025
+187698.419354     8253311.754655
+187701.245143     8253330.581075
+187710.226570     8253355.763220
+187715.080436     8253365.229396
+187715.464371     8253380.261033
+187728.320486     8253397.989956
+187743.719660     8253413.253481
+187762.327714     8253423.557314
+187787.979008     8253423.952155
+187818.635768     8253424.424042
+187851.169386     8253424.924820
+187885.125364     8253414.804140
+187925.933431     8253406.666766
+187953.593026     8253398.952947
+187978.749876     8253391.201368
+188009.598180     8253379.780200
+188034.835685     8253367.020778
+188044.371578     8253357.776098
+188048.296684     8253347.192401
+188049.548050     8253347.211663
+188053.937720     8253346.653287
+188059.043616     8253340.470905
+188059.063774     8253339.219326
+188062.302902     8253332.381502
+188071.959765     8253315.625821
+188081.546065     8253303.251430
+188089.215178     8253293.352071
+188098.185683     8253280.342257
+188106.036263     8253259.175632
+188112.786695     8253228.600611
+188117.074721     8253195.483145
+188113.946033     8253156.617250
+188114.601311     8253115.931002
+188110.937483     8253071.421841
+188110.180098     8253040.731255
+188109.473501     8253006.910963
+188109.422250     8252971.222926
+188113.074706     8252938.721621
+188113.498111     8252912.432351
+188113.669487     8252901.791638
+188113.961844     8252883.639159
+188106.503983     8252841.575376
+188097.048282     8252806.994468
+188087.551871     8252774.917476
+188079.035021     8252759.759888
+188068.600603     8252747.077326
+188049.043618     8252717.975964
+188014.037053     8252676.740787
+187981.573548     8252633.040212
+187934.457330     8252566.574738
+187865.322555     8252507.283969
+187826.017434     8252460.973541
+187801.455366     8252431.795137
+187765.480545     8252411.832522
+187736.407837     8252390.723496
+187706.649139     8252373.361106
+187674.982964     8252357.847189
+187627.726452     8252338.962809
+187579.158076     8252323.815432
+187526.179872     8252310.478010
+187482.616592     8252295.406910
+187459.083726     8252280.018186
+187423.623889     8252266.950418
+187365.670455     8252251.658580
+187310.986780     8252227.650791
+187251.418991     8252196.054960
+187201.700061     8252174.628898
+187143.736943     8252159.962092
+187090.173179     8252144.111878
+187039.172646     8252124.543923
+186988.192665     8252103.723631
+186946.021496     8252079.909206
+186896.363063     8252054.726880
+186857.229781     8252036.593482
+186827.945357     8252028.629855
+186807.914943     8252028.947479
+186767.732368     8252037.094481
+186730.708268     8252043.411502
+186697.397939     8252052.290231
+186657.780754     8252064.202368
+186631.281793     8252077.569082
+186618.607595     8252087.391399
+186606.559272     8252097.223350
+186605.862834     8252101.595007
+186598.809503     8252112.130553
+186589.889023     8252122.010649
+186579.687310     8252133.749623
+186566.225942     8252153.577230
+186554.540990     8252179.693919
+186549.233469     8252198.395146
+186545.056346     8252224.626636
+186544.763989     8252242.779115
+186544.481723     8252260.305040
+186544.169195     8252279.709862
+186547.963703     8252316.081462
+186553.130928     8252344.961329
+186562.192997     8252365.136395
+186569.953307     8252388.421146
+186581.457625     8252412.390237
+186593.042215     8252431.351477
+186601.054937     8252438.987678
+186613.315807     8252454.828841
+186641.187555     8252472.788894
+186678.292773     8252500.281772
+186702.733860     8252536.971942
+186722.644137     8252582.983832
+186748.962094     8252619.702128
+186781.001731     8252650.874230
+186811.184297     8252680.765093
+186828.914817     8252706.708618
+186838.572142     8252728.770681
+186851.358075     8252750.880900
+186867.160960     8252779.924478
+186882.217384     8252816.469429
+186896.072834     8252849.866171
+186910.665062     8252876.386570
+186921.573754     8252898.467894
+186925.055654     8252915.426580
+186929.919598     8252924.266965
+186930.444279     8252930.536016
+186935.217502     8252945.009271
+186941.131189     8252966.387764
+186954.552693     8252987.881823
+186966.692594     8253011.233987
+186979.438200     8253035.848129
+186993.485196     8253057.351815
+187006.250589     8253080.713607
+187029.097096     8253099.848198
+187052.559016     8253119.618207
+187072.257127     8253139.956989
+187093.902673     8253155.942607
+187111.158549     8253172.486601
+187135.155610     8253197.899876
+187168.476480     8253227.213101
+187190.556355     8253255.101409
+187216.470602     8253278.039652
+187240.467281     8253303.452921
+187268.288623     8253324.542686
+187279.974407     8253337.244510
+187281.225774     8253337.263772
+187281.851266     8253337.273400
+187282.476758     8253337.283028
+187282.466680     8253337.908817
+187282.456601     8253338.534606
+187283.697889     8253339.179658
+187287.996826     8253344.254915
+187294.808205     8253348.742136
+187300.287945     8253358.217945
+187311.428497     8253365.903056
+187325.606554     8253379.269187
+187338.008564     8253386.347005
+187341.116619     8253387.647500
+187351.611534     8253396.573797
+187360.219499     8253406.097757
+187360.794586     8253409.237097
+187371.894811     8253419.426129
+187384.185930     8253433.389159
+187396.608097     8253439.215399
+187401.593406     8253440.544025
+187405.286638     8253444.357305
+187418.950093     8253450.828596
+187420.201460     8253450.847858
+187430.416348     8253466.975569
+187435.905179     8253476.055810
+END
+LINE3D
+HEIGHT 1170.000000
+187480.683822     8253143.025094
+187485.848670     8253143.818702
+187492.730995     8253143.924639
+187501.489796     8253144.059460
+187515.254064     8253144.271328
+187530.895189     8253144.512085
+187540.895660     8253145.291963
+187550.189603     8253151.070051
+187559.554121     8253152.466085
+187567.061556     8253152.581644
+187572.067021     8253152.658691
+187576.456310     8253152.100309
+187581.744042     8253134.651431
+187581.834775     8253129.017798
+187572.692051     8253113.850576
+187563.569484     8253097.431775
+187558.089744     8253087.955966
+187545.052163     8253081.494309
+187528.865818     8253076.236074
+187515.808067     8253071.026760
+187505.999142     8253058.353826
+187496.150283     8253048.184055
+187491.326653     8253036.840512
+187487.017637     8253032.391044
+187487.088201     8253028.009754
+187485.836835     8253027.990492
+187489.156605     8253016.145587
+187496.109493     8253011.870234
+187500.569357     8253006.929798
+187506.825808     8253007.026101
+187515.595070     8253006.535138
+187532.416999     8253011.176448
+187541.085067     8253016.944902
+187558.411888     8253029.107612
+187571.933822     8253044.342241
+187578.755661     8253048.203679
+187585.567041     8253052.690900
+187599.169999     8253062.918456
+187608.332893     8253076.833335
+187612.651999     8253080.656249
+187623.167060     8253088.331731
+187636.204641     8253094.793388
+187640.533826     8253097.990513
+187645.639722     8253091.808132
+187657.849737     8253071.960499
+187663.802906     8253052.017321
+187671.643408     8253031.476485
+187678.726975     8253019.063571
+187690.886571     8253002.346414
+187701.390720     8252971.829172
+187711.259298     8252941.928092
+187717.222929     8252921.359131
+187718.120621     8252904.467859
+187721.531112     8252886.990086
+187721.863797     8252866.333685
+187722.135984     8252849.433549
+187723.003810     8252834.420416
+187723.528028     8252801.871723
+187710.842907     8252773.502081
+187698.924800     8252736.378728
+187681.386195     8252698.542916
+187668.590184     8252677.058486
+187646.359473     8252658.559318
+187631.565620     8252644.557764
+187616.822569     8252627.425740
+187598.466544     8252601.473351
+187586.881572     8252582.512104
+187569.555133     8252570.349401
+187554.731032     8252558.225979
+187538.655959     8252546.082537
+187522.500232     8252538.946939
+187508.826698     8252533.101438
+187495.768578     8252527.891354
+187474.002050     8252519.417502
+187454.687861     8252514.111121
+187441.549468     8252513.908887
+187415.887714     8252514.139830
+187397.057878     8252517.606421
+187378.147388     8252526.080856
+187361.669067     8252538.975105
+187335.735112     8252556.106948
+187317.309357     8252573.354362
+187303.172090     8252596.302052
+187283.505059     8252612.903651
+187265.714493     8252629.534897
+187251.577608     8252652.482593
+187246.744362     8252680.582582
+187246.260459     8252710.628117
+187246.432297     8252738.805147
+187247.391306     8252756.976887
+187252.154451     8252772.075932
+187259.379989     8252789.718186
+187263.608363     8252799.174733
+187277.080273     8252817.539080
+187287.473981     8252832.725558
+187301.026546     8252846.082061
+187312.116704     8252856.896119
+187322.006272     8252864.561973
+187332.551593     8252870.358558
+187343.732473     8252875.539747
+187355.478360     8252884.486064
+187366.043839     8252889.031070
+187377.123906     8252900.471681
+187386.357364     8252910.005270
+187398.154039     8252915.821882
+187403.098638     8252919.654424
+187403.714434     8252920.289847
+187419.143857     8252933.675240
+187424.653451     8252941.273675
+187425.279325     8252941.283309
+187425.904817     8252941.292937
+187429.567814     8252946.983585
+187430.728447     8252952.636481
+187431.959644     8252953.908085
+187431.949565     8252954.533875
+187436.793352     8252964.625840
+187436.783273     8252965.251629
+187439.730032     8252976.567047
+187440.870508     8252983.471521
+187441.425436     8252987.862439
+187441.980735     8252992.254128
+187441.890001     8252997.887761
+187441.869844     8252999.139340
+187441.748874     8253006.650341
+187441.658141     8253012.283975
+187441.476674     8253023.551241
+187441.254893     8253037.321665
+187440.861723     8253061.733567
+187443.818573     8253072.422431
+187447.986450     8253085.635244
+187448.531300     8253090.651951
+187452.204363     8253095.717575
+187452.679019     8253105.116343
+187456.190785     8253120.196889
+187456.736017     8253125.213603
+187459.803757     8253129.017255
+187462.881576     8253132.195118
+187465.999710     8253132.869823
+187470.944310     8253136.702366
+187476.504322     8253141.170325
+187477.130196     8253141.179959
+187480.683822     8253143.025094
+END
+LINE3D
+HEIGHT 1130.000000
+183557.000000     8254093.718503
+183563.352666     8254075.179740
+183570.758839     8254042.736214
+183580.798792     8254002.194421
+183589.012293     8253958.494027
+183590.999580     8253912.819962
+183595.055284     8253855.280966
+183602.037576     8253810.309731
+183609.433657     8253778.492759
+183613.671469     8253748.505007
+183614.104953     8253721.589948
+183613.701064     8253707.809129
+183613.711142     8253707.183339
+183613.993421     8253689.656650
+183608.735654     8253666.410419
+183603.548462     8253638.782134
+183603.770243     8253625.011710
+183583.849888     8253579.625609
+183564.897775     8253512.967710
+183557.000000     8253483.900430
+END
+LINE3D
+HEIGHT 1090.000000
+183557.000000     8256156.845503
+183566.775917     8256155.128611
+183601.882665     8256151.285091
+183628.966767     8256140.433455
+183659.098465     8256134.636286
+183692.328354     8256130.763876
+183735.638951     8256122.665787
+183769.433835     8256122.559269
+183812.764589     8256113.209601
+183869.869701     8256103.445247
+183911.313530     8256094.691714
+183968.438824     8256083.674253
+184016.815001     8256071.896940
+184071.427662     8256061.467512
+184130.601166     8256039.839756
+184163.447312     8256020.935712
+184195.637525     8256003.900169
+184227.101219     8255993.115947
+184256.577009     8255989.185751
+184279.261553     8255979.518284
+184297.546373     8255971.033453
+184324.035231     8255958.294057
+184352.966159     8255949.347918
+184384.419786     8255939.188720
+184414.026613     8255927.122498
+184451.060626     8255920.178156
+184486.217755     8255913.206453
+184513.211327     8255907.987689
+184539.599207     8255901.506184
+184574.100405     8255896.402982
+184613.596812     8255892.001850
+184651.831570     8255888.208006
+184683.184385     8255884.308231
+184730.168260     8255881.274240
+184768.332645     8255881.861690
+184807.122714     8255882.458770
+184835.892333     8255883.528319
+184861.523469     8255885.174738
+184885.287837     8255886.165714
+184911.565005     8255886.570189
+184949.053301     8255890.277719
+184984.705054     8255891.453201
+185009.650201     8255896.846258
+185038.328907     8255903.548673
+185068.249296     8255910.895380
+185099.430736     8255917.636319
+185125.636934     8255922.423606
+185144.971687     8255926.476886
+185166.092171     8255936.193447
+185202.097610     8255954.278699
+185231.290906     8255967.876718
+185254.218067     8255982.003465
+185277.145228     8255996.130212
+185302.544491     8256012.173609
+185335.482202     8256026.454445
+185363.434605     8256039.406654
+185380.720717     8256054.073280
+185394.858446     8256069.943333
+185411.498908     8256085.851909
+185438.230193     8256096.906724
+185471.843802     8256108.067477
+185503.580146     8256119.200861
+185532.178223     8256130.909592
+185562.693831     8256140.145588
+185593.804707     8256151.267817
+185626.842848     8256159.289224
+185651.717432     8256169.063571
+185679.770646     8256175.756357
+185719.751584     8256180.128965
+185760.953283     8256186.397432
+185794.677770     8256190.673736
+185822.741076     8256196.739970
+185860.138626     8256206.081897
+185891.905243     8256215.335621
+185924.247329     8256227.728691
+185962.280463     8256236.453693
+185997.881809     8256240.758886
+186022.272052     8256241.759496
+186052.857841     8256246.614197
+186112.142901     8256256.918210
+186147.804745     8256257.467140
+186179.712871     8256257.958289
+186224.133516     8256258.642039
+186268.463439     8256264.958658
+186312.198095     8256269.389045
+186355.922684     8256274.444457
+186377.820260     8256274.781518
+186399.102435     8256274.482397
+186416.630486     8256274.127020
+186438.023564     8256266.941923
+186467.509587     8256262.388233
+186497.550564     8256262.223933
+186526.976114     8256261.424980
+186558.278524     8256260.654917
+186595.191352     8256261.223102
+186629.601829     8256261.752769
+186659.007222     8256262.205395
+186700.229078     8256267.222284
+186746.516897     8256268.559955
+186784.035417     8256270.390881
+186832.099282     8256278.016864
+186878.931914     8256284.373535
+186917.651420     8256289.351906
+186956.370543     8256294.330271
+186998.288837     8256294.975503
+187042.699772     8256296.285812
+187091.479851     8256298.288554
+187137.777355     8256299.001194
+187171.501867     8256303.275970
+187216.487889     8256307.725619
+187260.192320     8256314.032610
+187289.506968     8256320.119633
+187325.713649     8256325.686034
+187366.915347     8256331.954501
+187394.423724     8256333.629816
+187426.896845     8256337.886859
+187448.784355     8256338.848945
+187480.066607     8256339.330461
+187508.846126     8256339.773453
+187545.759336     8256340.341644
+187583.863033     8256344.685355
+187616.951580     8256349.577051
+187647.487370     8256357.559940
+187673.633477     8256366.101970
+187703.593799     8256370.945514
+187731.737735     8256372.005431
+187762.999829     8256373.738526
+187790.467485     8256377.918521
+187827.320222     8256382.241449
+187853.577208     8256383.899030
+187874.798504     8256387.356169
+187896.686014     8256388.318255
+187926.041001     8256391.900592
+187949.795278     8256393.518122
+187983.570172     8256394.664715
+188003.570732     8256396.224465
+188025.448151     8256397.813105
+188041.028779     8256401.810127
+188057.820460     8256408.329570
+188074.652073     8256412.345848
+188090.858219     8256416.350971
+188110.183262     8256421.030810
+188131.313431     8256430.122340
+188152.525043     8256434.204510
+188156.228354     8256437.392001
+188164.987537     8256437.526828
+188187.510606     8256437.873516
+188226.361529     8256434.715866
+188263.294896     8256434.032478
+188284.011312     8256429.967453
+188304.667970     8256429.660233
+188333.437423     8256430.728250
+188365.769035     8256443.747867
+188386.889901     8256453.464434
+188409.807353     8256468.217741
+188452.128975     8256482.643019
+188494.400931     8256500.199549
+188517.378117     8256511.196579
+188518.629865     8256511.215847
+188529.880951     8256512.014211
+188555.360844     8256523.051292
+188599.651217     8256531.871081
+188619.611055     8256535.935511
+188633.233814     8256544.909954
+188654.334498     8256555.879628
+188669.289659     8256559.865495
+188677.372944     8256563.120405
+188693.518592     8256570.881792
+188709.775119     8256571.758732
+188715.385920     8256573.096986
+188735.971251     8256577.171044
+188759.271794     8256568.138238
+188775.679563     8256559.624515
+188787.082607     8256551.035285
+188803.722224     8256528.126113
+188812.582220     8256522.001517
+188822.057641     8256516.511574
+188828.394721     8256511.601562
+188838.465386     8256507.999379
+188852.239362     8256507.584688
+188863.571842     8256503.376748
+188879.919115     8256498.619290
+188888.688364     8256498.129091
+188897.336669     8256505.148366
+188907.800929     8256515.954318
+188920.727632     8256529.300423
+188936.086479     8256547.067870
+188949.679752     8256557.920457
+188957.701776     8256564.931620
+188970.709109     8256573.271410
+188978.156835     8256577.141717
+188990.538675     8256585.471879
+189006.078989     8256591.972059
+189015.453574     8256592.743067
+189019.832783     8256592.810475
+189028.117692     8256583.546540
+189039.560311     8256572.452612
+189044.010848     8256568.138741
+189044.636341     8256568.148369
+189045.513863     8256552.509440
+189046.502289     8256529.984535
+189046.754319     8256514.335978
+189030.265456     8256489.038273
+189014.906609     8256471.270826
+188983.432362     8256443.863859
+188950.090940     8256415.802971
+188924.782398     8256394.126705
+188905.285540     8256361.268307
+188890.694076     8256334.747919
+188884.123872     8256315.238683
+188868.149624     8256296.835054
+188850.944524     8256277.162119
+188832.517948     8256255.590256
+188818.450401     8256235.338907
+188818.460492     8256234.712353
+188818.470558     8256234.087328
+188818.480649     8256233.460774
+188818.490716     8256232.835749
+188813.575995     8256227.124304
+188805.029266     8256213.845619
+188792.101825     8256200.497974
+188781.647631     8256189.066996
+188761.990204     8256166.225826
+188748.366707     8256157.249844
+188748.386864     8256155.998265
+188725.510491     8256138.741812
+188703.945600     8256117.748351
+188682.511769     8256088.617334
+188668.393815     8256071.495696
+188654.458091     8256043.106804
+188636.051649     8256020.284890
+188627.544496     8256004.501506
+188617.917419     8255980.561312
+188593.355362     8255951.382143
+188574.514222     8255916.656769
+188555.512535     8255891.947095
+188542.757233     8255867.958748
+188531.162170     8255849.624055
+188521.424214     8255832.568309
+188506.751332     8255811.055753
+188492.684548     8255790.804416
+188471.795554     8255766.690871
+188459.595181     8255747.093443
+188450.169703     8255710.635931
+188445.062987     8255677.999035
+188437.978194     8255651.594195
+188437.705544     8255629.676587
+188433.174654     8255600.180571
+188429.399553     8255562.556615
+188426.049083     8255537.461145
+188426.422083     8255514.301586
+188426.744676     8255494.271739
+188436.613255     8255464.370659
+188445.230848     8255434.450324
+188459.337485     8255413.380760
+188478.530266     8255387.378871
+188494.060026     8255355.687862
+188505.643772     8255335.831354
+188508.973622     8255323.360660
+188512.788600     8255319.662186
+188517.884023     8255314.106353
+188528.691847     8255303.627834
+188540.063878     8255296.916724
+188550.154700     8255292.062963
+188565.230831     8255288.537828
+188595.262098     8255289.000088
+188622.164376     8255289.414184
+188642.800877     8255290.358543
+188654.042636     8255291.783472
+188668.381607     8255295.134674
+188680.894508     8255295.327280
+188696.535634     8255295.568038
+188710.996339     8255291.408249
+188726.102693     8255286.006510
+188752.540788     8255276.395291
+188773.318441     8255268.575541
+188792.208761     8255261.353449
+188804.741820     8255260.294476
+188822.340077     8255255.556274
+188853.612238     8255256.664343
+188882.967606     8255260.246686
+188906.126258     8255259.976450
+188926.772850     8255260.294255
+188959.840858     8255266.437523
+188981.728343     8255267.401138
+189001.749442     8255267.709315
+189013.010595     8255267.882653
+189032.425596     8255266.929612
+189052.537441     8255261.603392
+189080.156696     8255256.394259
+189114.667985     8255250.664503
+189154.849783     8255242.518253
+189182.448906     8255238.559171
+189216.849292     8255239.715392
+189251.259769     8255240.245059
+189273.934055     8255231.202614
+189300.948000     8255224.730746
+189326.145177     8255214.475245
+189360.111629     8255203.728018
+189383.461813     8255191.565489
+189401.080992     8255185.575720
+189419.305481     8255180.848686
+189435.854378     8255163.572383
+189462.958280     8255151.467634
+189493.897318     8255134.412832
+189525.552570     8255111.734789
+189545.926511     8255090.134987
+189567.470019     8255073.562272
+189589.014315     8255056.988042
+189610.659399     8255034.155916
+189634.655997     8255020.751448
+189642.344899     8255009.599741
+189646.885393     8254999.652989
+189651.366178     8254993.460986
+189651.991671     8254993.470614
+189652.617163     8254993.480242
+189653.252746     8254992.863316
+189653.899160     8254991.621377
+189654.524652     8254991.631005
+189654.534743     8254991.004451
+189655.160235     8254991.014079
+189655.220708     8254987.259342
+189661.608219     8254979.218090
+189667.380329     8254970.540657
+189671.940980     8254959.342326
+189677.642526     8254955.046183
+189680.851382     8254950.088019
+189684.675687     8254945.762980
+189688.560441     8254937.684732
+189694.927794     8254930.895059
+189700.730128     8254920.341021
+189708.450041     8254907.311193
+189716.764435     8254896.169114
+189725.785715     8254880.030358
+189741.013064     8254867.116089
+189758.036235     8254859.238548
+189761.184618     8254858.035120
+189773.172838     8254851.958676
+189797.673959     8254846.074838
+189832.790583     8254841.606289
+189850.994914     8254838.130834
+189851.005005     8254837.504280
+189856.009707     8254837.581316
+189864.789048     8254836.464564
+189887.443177     8254828.673698
+189901.288481     8254823.877728
+189925.769420     8254819.246997
+189967.778077     8254814.257826
+189999.140984     8254809.731497
+190021.129281     8254804.435689
+190049.384120     8254798.609631
+190074.086865     8254780.206947
+190098.163354     8254761.794624
+190131.050196     8254740.387428
+190158.891246     8254721.407106
+190184.713927     8254711.160470
+190201.071266     8254705.777986
+190218.033953     8254701.655946
+190246.258543     8254697.708019
+190268.852951     8254693.672666
+190283.938384     8254689.522494
+190299.670243     8254684.129618
+190318.066132     8254668.760343
+190338.894178     8254657.811645
+190355.312015     8254648.672897
+190369.307772     8254634.487781
+190388.298905     8254621.006267
+190399.752367     8254609.286561
+190404.242467     8254602.468756
+190409.994407     8254595.043666
+190413.899343     8254585.712311
+190418.995542     8254580.155725
+190427.916022     8254570.275628
+190441.114899     8254566.722362
+190458.633266     8254566.992015
+190482.982405     8254570.497299
+190504.234332     8254572.076311
+190526.696903     8254576.179265
+190539.836060     8254576.381511
+190551.097212     8254576.554850
+190569.311647     8254572.452077
+190591.965764     8254564.661975
+190604.629883     8254555.465447
+190614.196025     8254544.342635
+190627.515884     8254533.277603
+190650.967645     8254514.855663
+190670.715331     8254493.246221
+190689.020486     8254483.510579
+190710.373212     8254478.830932
+190736.861714     8254466.090002
+190775.802618     8254457.297942
+190807.791768     8254452.782018
+190826.045754     8254446.176076
+190842.333306     8254445.174130
+190868.045084     8254441.813470
+190886.209101     8254440.841172
+190899.993156     8254439.800692
+190919.408157     8254438.847650
+190941.406545     8254432.925288
+190957.148483     8254426.906623
+190992.456652     8254410.545019
+191024.768408     8254385.998483
+191052.063843     8254362.001442
+191076.131018     8254344.214920
+191097.645053     8254329.519586
+191117.362490     8254309.788276
+191138.341003     8254289.449669
+191162.559395     8254262.274013
+191177.978277     8254237.467452
+191183.891501     8254220.028202
+191193.518128     8254205.149889
+191200.016530     8254190.223425
+191200.894052     8254174.584496
+191201.196488     8254155.806228
+191195.383613     8254128.168312
+191184.535024     8254102.331482
+191170.013372     8254071.429028
+191144.906466     8254037.233152
+191118.578811     8254001.140651
+191109.041691     8253971.567576
+191104.924603     8253955.225058
+191093.955032     8253936.899993
+191086.830687     8253912.998322
+191081.683632     8253882.866112
+191076.476080     8253856.490167
+191068.806885     8253827.571789
+191057.958296     8253801.734958
+191050.218538     8253777.197870
+191042.588908     8253745.775557
+191029.823526     8253722.413001
+191013.354058     8253695.863705
+190992.445659     8253673.002515
+190977.308593     8253641.464644
+190960.203553     8253615.531510
+190948.033416     8253594.056714
+190936.549256     8253568.836044
+190920.080563     8253542.285997
+190905.165279     8253496.977701
+190883.771763     8253465.343527
+190872.973580     8253436.376985
+190863.951825     8253413.698761
+190857.634440     8253378.539451
+190853.829854     8253342.793640
+190854.475053     8253302.733182
+190853.989474     8253255.142454
+190853.868042     8253223.835713
+190854.190636     8253203.805866
+190854.412429     8253190.034677
+190854.644290     8253175.638464
+190854.856005     8253162.493065
+190856.520316     8253136.848840
+190857.044534     8253104.300148
+190857.457861     8253078.636668
+190854.268701     8253043.525510
+190849.909186     8253003.388780
+190849.373213     8252958.927000
+190844.377363     8252919.406420
+190840.592947     8252882.408266
+190840.521921     8252847.971813
+190837.171452     8252822.876342
+190836.887959     8252801.584513
+190837.442425     8252767.157688
+190849.349541     8252727.270580
+190857.290460     8252700.471080
+190861.993040     8252680.507888
+190862.850392     8252666.121302
+190864.363486     8252649.866212
+190864.917952     8252615.439387
+190864.816690     8252582.880302
+190863.837893     8252565.960911
+190863.373697     8252555.936359
+190863.666055     8252537.783880
+190868.579573     8252504.676042
+190880.254816     8252479.185912
+190889.325751     8252459.916669
+190895.723340     8252451.249628
+190910.335263     8252437.700705
+190928.680746     8252425.461141
+190939.598685     8252408.098163
+190943.019267     8252389.993836
+190946.147493     8252390.041987
+190945.723624     8252377.513514
+190944.563373     8252371.860625
+190944.644015     8252366.853545
+190944.744827     8252360.594122
+190943.644297     8252351.185721
+190943.180102     8252341.161169
+190943.391817     8252328.015770
+190947.347158     8252315.554704
+190953.149492     8252305.000666
+190957.064506     8252295.043522
+190962.160705     8252289.486936
+190972.251528     8252284.633175
+190981.010711     8252284.768002
+190992.888028     8252285.577534
+191008.448512     8252290.825371
+191014.058537     8252292.164378
+191018.428431     8252292.857586
+191022.787484     8252294.176573
+191038.983526     8252298.809013
+191042.061345     8252301.986876
+191043.313093     8252302.006144
+191048.297638     8252303.334758
+191051.425863     8252303.382910
+191051.415784     8252304.008699
+191051.405706     8252304.634488
+191052.031962     8252304.644128
+191057.036664     8252304.721164
+191063.908515     8252305.453648
+191067.026662     8252306.127589
+191070.781143     8252306.185381
+191072.032128     8252306.204636
+191072.647541     8252306.840054
+191080.155740     8252306.955625
+191085.160442     8252307.032660
+191089.631149     8252301.466446
+191094.020437     8252300.908064
+191097.794312     8252299.714265
+191102.295267     8252292.269918
+191107.471345     8252281.706241
+191120.185870     8252269.380002
+191121.518273     8252264.391426
+191122.769257     8252264.410681
+191124.090805     8252260.048647
+191128.571591     8252253.856644
+191133.081861     8252245.786496
+191140.225913     8252229.618081
+191143.515435     8252219.651309
+191143.575919     8252215.895808
+191143.586011     8252215.269255
+191143.696901     8252208.384042
+191142.526559     8252203.357707
+191138.157440     8252202.663746
+191137.611826     8252197.647026
+191136.360842     8252197.627770
+191129.539384     8252193.766338
+191128.913892     8252193.756710
+191127.662143     8252193.737443
+191123.272855     8252194.295825
+191119.498980     8252195.489624
+191114.433029     8252199.168078
+191109.993323     8252202.856935
+191104.251474     8252209.655472
+191099.760609     8252216.473265
+191095.926237     8252221.423329
+191095.805268     8252228.934331
+191094.403065     8252238.304209
+191090.538457     8252245.131642
+191089.861795     8252248.251713
+191084.161025     8252252.547104
+191080.315823     8252258.122182
+191075.855958     8252263.062619
+191071.426343     8252266.124922
+191065.119486     8252269.158331
+191061.365005     8252269.100539
+191055.815465     8252264.006032
+191047.792665     8252256.995621
+191032.282587     8252248.618072
+191022.908003     8252247.847064
+191017.287124     8252247.134599
+191004.148731     8252246.932365
+190999.769521     8252246.864958
+190994.743885     8252248.040253
+190984.723639     8252248.511960
+190979.032196     8252252.180786
+190970.252855     8252253.297538
+190968.941373     8252257.034547
+190963.885502     8252260.087211
+190962.634517     8252260.067955
+190953.189357     8252263.679001
+190945.620673     8252267.318931
+190939.919915     8252271.613558
+190934.904359     8252272.163065
+190926.700104     8252276.419156
+190916.639530     8252279.394785
+190900.937920     8252282.909528
+190896.498225     8252286.597621
+190889.555785     8252290.247955
+190884.499914     8252293.300619
+190879.494448     8252293.223572
+190875.095081     8252294.407743
+190862.562022     8252295.466716
+190858.788135     8252296.661279
+190853.772591     8252297.210022
+190846.890648     8252297.104090
+190842.511438     8252297.036683
+190838.202028     8252292.587973
+190838.212119     8252291.961420
+190838.403652     8252280.069128
+190838.575040     8252269.427651
+190841.814156     8252262.590590
+190846.325190     8252254.520454
+190856.405922     8252250.293247
+190868.394142     8252244.216802
+190885.467719     8252233.209550
+190906.205032     8252227.894486
+190920.675064     8252223.108132
+190934.449792     8252222.694216
+190942.643204     8252219.063903
+190952.048049     8252217.956014
+190957.114000     8252214.277561
+190960.928202     8252210.579839
+190961.553694     8252210.589467
+190964.681919     8252210.637619
+190965.307412     8252210.647247
+190965.317490     8252210.021457
+190965.327581     8252209.394904
+190965.337660     8252208.769114
+190965.357818     8252207.517536
+190966.629736     8252206.284460
+190970.403611     8252205.090661
+190974.217813     8252201.392940
+190979.868941     8252200.227272
+190979.879019     8252199.601482
+190981.140083     8252198.994949
+190981.150162     8252198.369159
+190981.160240     8252197.743370
+190981.230816     8252193.361316
+190981.240895     8252192.735526
+190981.937714     8252188.363876
+190981.957884     8252187.111533
+190982.018369     8252183.356032
+190982.078854     8252179.600531
+190982.088932     8252178.974741
+190982.159508     8252174.592687
+190982.240150     8252169.585607
+190982.310726     8252165.203553
+190982.401460     8252159.569920
+190982.411538     8252158.944130
+190981.230354     8252154.543572
+190980.049945     8252150.142262
+190979.525264     8252143.873211
+190975.871595     8252137.555997
+190972.299332     8252126.231715
+190972.379987     8252121.223872
+190968.131825     8252113.019673
+190963.933318     8252101.684987
+190959.624672     8252097.236290
+190953.519440     8252087.750852
+190949.241042     8252081.424022
+190944.316231     8252076.339131
+190936.192619     8252075.588143
+190928.140346     8252070.455112
+190924.396707     8252069.771543
+190920.702711     8252065.958251
+190915.082595     8252065.245798
+190906.393988     8252060.728917
+190900.228271     8252054.998981
+190896.585444     8252048.055989
+190892.336519     8252039.851779
+190892.356689     8252038.599436
+190895.565556     8252033.640508
+190900.036263     8252028.074293
+190905.807596     8252019.397612
+190909.662890     8252013.195981
+190918.958315     8252001.104338
+END
+LINE3D
+HEIGHT 1090.000000
+190918.958315     8252001.104338
+190941.449202     8251982.380383
+190942.135179     8251978.634510
+190943.406333     8251977.401423
+190944.031825     8251977.411051
+190945.283574     8251977.430319
+190945.303731     8251976.178740
+190944.738724     8251972.413611
+190944.112468     8251972.403971
+190942.871562     8251971.758926
+190934.798368     8251967.877462
+190924.223193     8251963.958251
+190918.662798     8251959.490285
+190914.293667     8251958.797088
+190913.748829     8251953.779617
+190908.188435     8251949.311651
+190903.434999     8251933.586047
+190899.257413     8251920.999794
+190899.327989     8251916.617740
+190895.644835     8251912.178670
+190891.557219     8251893.958772
+190881.950299     8251868.766999
+190877.802962     8251854.302613
+190873.029357     8251839.829352
+190868.215436     8251827.859249
+190867.095512     8251819.702438
+190862.261422     8251808.984678
+190858.023352     8251800.153926
+190858.093915     8251795.772636
+190853.926408     8251782.560593
+190854.087717     8251772.544906
+190853.047672     8251759.381003
+190851.978142     8251748.095245
+190850.817127     8251742.442344
+190849.717360     8251733.033954
+190845.479290     8251724.203202
+190844.873191     8251722.941983
+190844.267869     8251721.680012
+190839.908816     8251720.361026
+190839.918895     8251719.735236
+190839.939065     8251718.482893
+190838.697395     8251717.837836
+190834.963835     8251716.528478
+190830.645123     8251712.704805
+190826.901484     8251712.021236
+190826.275228     8251712.011597
+190825.659814     8251711.376179
+190825.034322     8251711.366551
+190824.408830     8251711.356923
+190824.418909     8251710.731134
+190824.439078     8251709.478791
+190823.823665     8251708.843373
+190822.571917     8251708.824106
+190821.320932     8251708.804850
+190815.689974     8251708.718175
+190810.684508     8251708.641127
+190802.551581     8251708.515940
+190796.920623     8251708.429265
+190792.541413     8251708.361858
+190786.910455     8251708.275182
+190780.714489     8251704.423379
+190779.533305     8251700.022821
+190775.870320     8251694.331408
+190771.561686     8251689.881946
+190771.642329     8251684.874866
+190771.087412     8251680.483184
+190770.461156     8251680.473544
+190770.592204     8251672.336753
+190770.652689     8251668.581252
+190770.047367     8251667.319281
+190770.138100     8251661.685648
+190770.248991     8251654.800436
+190770.400209     8251645.411302
+190775.556893     8251636.099215
+190780.622080     8251632.420750
+190786.384098     8251624.369870
+190790.147894     8251623.801860
+190796.565642     8251613.883239
+190801.006100     8251610.195158
+190801.016179     8251609.569368
+190801.207724     8251597.676312
+190801.399269     8251585.783256
+190801.469833     8251581.401966
+190801.479924     8251580.775413
+190801.500081     8251579.523834
+190801.590815     8251573.890200
+190801.671457     8251568.883121
+190801.883172     8251555.737722
+190796.423589     8251545.010334
+190795.273417     8251538.731655
+190794.647161     8251538.722015
+190793.406255     8251538.076970
+190792.175440     8251536.805371
+190791.569342     8251535.544152
+190791.660075     8251529.910519
+190790.580466     8251519.250550
+190790.721605     8251510.487206
+190790.822417     8251504.227783
+190795.262112     8251500.539690
+190799.016593     8251500.597481
+190808.401269     8251500.741936
+190824.496511     8251511.633034
+190833.820702     8251515.532990
+190837.554250     8251516.843112
+190842.559716     8251516.920160
+190853.205454     8251516.458081
+190860.733059     8251515.321297
+190871.379562     8251514.859230
+190882.539902     8251521.291991
+190887.363901     8251532.636305
+190887.011059     8251554.544284
+190886.264597     8251562.045658
+190876.083054     8251572.532288
+190871.592177     8251579.350845
+190871.360317     8251593.747059
+190870.957069     8251618.784750
+190871.471670     8251625.679590
+190874.933794     8251643.889860
+190879.746951     8251655.859951
+190890.776994     8251670.430280
+190898.143302     8251679.308419
+190903.723854     8251682.524806
+190911.867624     8251682.024215
+190925.066502     8251678.470948
+190938.154489     8251681.802894
+190949.870522     8251692.626585
+190951.121506     8251692.645841
+190954.875224     8251692.703621
+190959.265276     8251692.145251
+190959.325761     8251688.389750
+190959.951253     8251688.399378
+190963.079478     8251688.447529
+190966.338764     8251680.358126
+190970.808695     8251674.792664
+190970.818786     8251674.166110
+190970.838943     8251672.914531
+190971.485357     8251671.672592
+190972.857323     8251664.180083
+190973.573549     8251658.556077
+190974.209120     8251657.939916
+190974.219199     8251657.314126
+190974.229277     8251656.688337
+190974.299853     8251652.306282
+190975.006751     8251647.308842
+190975.319266     8251627.904785
+190975.379763     8251624.148520
+190975.389842     8251623.522731
+190975.480575     8251617.889097
+190975.581387     8251611.629675
+190975.692278     8251604.744462
+190975.833417     8251595.981118
+190975.964466     8251587.844327
+190975.408786     8251583.452633
+190974.803451     8251582.191426
+190974.248522     8251577.800508
+190969.404365     8251567.707773
+190968.950249     8251557.057432
+190964.581118     8251556.364235
+190964.651693     8251551.982180
+190960.998788     8251545.664978
+190960.453174     8251540.648259
+190956.770032     8251536.208425
+190956.225182     8251531.191717
+190956.235261     8251530.565928
+190955.085089     8251524.287249
+190954.529408     8251519.895555
+190952.188736     8251509.842120
+190952.198815     8251509.216330
+190951.683450     8251502.321478
+190949.897706     8251496.658961
+190945.648793     8251488.453987
+190941.481286     8251475.241944
+190940.946527     8251469.598683
+190936.657287     8251463.897631
+190935.486945     8251458.871295
+190934.861452     8251458.861667
+190934.235960     8251458.852039
+190928.070243     8251453.122103
+190927.443987     8251453.112463
+190926.818495     8251453.102835
+190922.439285     8251453.035428
+190914.931086     8251452.919857
+190903.044442     8251452.736890
+190899.279882     8251453.304888
+190898.018818     8251453.911422
+190893.629518     8251454.470568
+190887.352910     8251455.625844
+190881.651388     8251459.920459
+190876.645922     8251459.843412
+190875.394938     8251459.824156
+190874.143189     8251459.804888
+190869.743810     8251460.989824
+190864.718187     8251462.164355
+190864.082616     8251462.780517
+190863.436954     8251464.023232
+190862.811461     8251464.013604
+190862.185969     8251464.003976
+190860.308728     8251463.975080
+190859.057744     8251463.955824
+190857.805995     8251463.936557
+190857.180503     8251463.926929
+190855.929519     8251463.907673
+190855.303263     8251463.898033
+190854.677770     8251463.888405
+190853.426786     8251463.869149
+190852.175037     8251463.849881
+190848.441490     8251462.539759
+190844.142922     8251457.465272
+190839.228190     8251451.754591
+190838.784164     8251440.477697
+190838.854728     8251436.096406
+190839.490299     8251435.480245
+190840.125870     8251434.864084
+190840.762217     8251434.247170
+190841.397788     8251433.631008
+190842.658851     8251433.024475
+190843.920678     8251432.417953
+190847.058982     8251431.840315
+190849.591200     8251430.000694
+190852.779910     8251426.293345
+190853.406166     8251426.302985
+190858.410868     8251426.380020
+190863.416333     8251426.457068
+190864.667318     8251426.476323
+190867.795543     8251426.524475
+190871.549261     8251426.582255
+190875.303742     8251426.640046
+190875.929234     8251426.649674
+190879.057459     8251426.697825
+190882.801098     8251427.381394
+190883.426590     8251427.391022
+END
+LINE3D
+HEIGHT 1080.000000
+183557.000000     8256388.595916
+183588.122079     8256383.982753
+183622.037933     8256376.365234
+183646.518706     8256371.732972
+183679.213633     8256362.218062
+183719.436319     8256351.568663
+183749.033270     8256340.127469
+183777.994256     8256329.303194
+183813.877881     8256316.081699
+183863.364273     8256313.087756
+183890.902707     8256312.884936
+183912.790192     8256313.848551
+183947.816286     8256315.012874
+183980.955430     8256316.774861
+184009.664361     8256321.600672
+184030.300695     8256322.543499
+184057.829039     8256322.967232
+184086.608748     8256323.410227
+184119.838422     8256319.539343
+184149.304313     8256316.235704
+184180.586564     8256316.717219
+184214.441922     8256312.855965
+184248.852399     8256313.385633
+184280.760334     8256313.876779
+184322.113417     8256310.757644
+184364.041610     8256310.776319
+184401.105847     8256301.955373
+184434.335712     8256298.084491
+184452.560035     8256293.355926
+184485.295277     8256281.337858
+184514.226014     8256272.391716
+184543.106536     8256266.575288
+184571.896337     8256266.391730
+184603.269310     8256261.240376
+184635.873491     8256257.359863
+184664.733665     8256252.795012
+184697.993778     8256247.045997
+184743.171167     8256239.601823
+184772.041598     8256234.411949
+184794.655603     8256229.124243
+184814.767041     8256223.799545
+184843.627215     8256219.234694
+184866.856812     8256214.583173
+184885.696727     8256210.490792
+184900.086486     8256210.712288
+184917.604471     8256210.981935
+184938.876555     8256211.309368
+184967.030581     8256211.742732
+184988.242168     8256215.826430
+185005.699680     8256219.850815
+185026.245078     8256226.428037
+185053.672800     8256233.111195
+185081.110207     8256239.169323
+185108.537930     8256245.852482
+185132.161147     8256255.607567
+185155.148805     8256265.978049
+185176.269289     8256275.694610
+185193.666661     8256283.476793
+185219.812411     8256292.017289
+185245.928270     8256302.437451
+185272.720027     8256309.737529
+185304.567680     8256313.983415
+185345.174111     8256318.365651
+185390.150066     8256323.440325
+185415.750954     8256326.964877
+185431.331583     8256330.961899
+185452.543194     8256335.044069
+185484.995776     8256340.552684
+185509.275116     8256348.439271
+185526.732603     8256352.465183
+185538.549448     8256357.029452
+185562.212980     8256364.281379
+185585.251044     8256371.522149
+185617.057976     8256378.272716
+185638.219157     8256385.486125
+185658.784712     8256390.811768
+185688.038887     8256400.653528
+185729.886618     8256405.680050
+185761.784295     8256406.796219
+185785.538548     8256408.415277
+185813.622011     8256413.229932
+185853.542477     8256421.357276
+185885.329251     8256429.359421
+185910.960769     8256431.005846
+185935.300200     8256435.137690
+185964.624938     8256440.598159
+185997.723576     8256444.863302
+186020.872519     8256445.219624
+186035.262278     8256445.441120
+186052.215243     8256441.946403
+186078.421848     8256446.732168
+186112.681107     8256456.650969
+186136.253917     8256469.535765
+186154.872050     8256479.213809
+186167.324454     8256483.162680
+186180.392284     8256487.746204
+186205.963305     8256493.148895
+186237.820643     8256496.769750
+186259.647655     8256501.488101
+186278.972317     8256506.167934
+186303.291590     8256511.551357
+186332.626419     8256516.385273
+186363.273088     8256517.483714
+186389.015127     8256512.244157
+186411.538196     8256512.590846
+186441.034310     8256507.410603
+186470.449794     8256507.236675
+186491.186725     8256501.921605
+186503.699625     8256502.114212
+186525.597202     8256502.451273
+186556.879453     8256502.932788
+186592.470733     8256507.863008
+186615.549113     8256512.600621
+186636.820815     8256512.928048
+186657.467406     8256513.245853
+186676.872316     8256512.919365
+186693.209522     8256508.786932
+186711.363448     8256508.441188
+186735.208446     8256504.425849
+186756.551118     8256500.370463
+186775.340627     8256499.407794
+186794.795943     8256495.951594
+186826.138691     8256492.676845
+186861.175043     8256493.216146
+186883.072619     8256493.553207
+186906.221180     8256493.909524
+186934.435703     8256490.586623
+186967.665759     8256486.715744
+187000.824870     8256487.226150
+187020.865745     8256486.282742
+187037.818352     8256482.786491
+187061.653642     8256479.397711
+187094.822843     8256479.281563
+187120.544700     8256475.295113
+187138.698650     8256474.947841
+187161.847593     8256475.304163
+187184.370662     8256475.650852
+187205.652812     8256475.353260
+187232.010253     8256470.749885
+187250.920731     8256462.276214
+187274.079764     8256462.005983
+187294.191203     8256456.681285
+187309.832329     8256456.922043
+187337.370954     8256456.719225
+187367.411931     8256456.554926
+187390.560873     8256456.911248
+187409.259636     8256461.582976
+187424.830199     8256466.205024
+187447.787226     8256478.453633
+187472.036317     8256488.218352
+187496.931058     8256496.741119
+187510.624762     8256501.334278
+187524.943958     8256505.937064
+187541.059358     8256515.576584
+187569.728356     8256522.905558
+187595.884554     8256530.821034
+187625.219002     8256535.654944
+187647.056081     8256539.748270
+187675.815824     8256541.442847
+187708.288945     8256545.699889
+187747.684349     8256547.558177
+187766.403294     8256550.976798
+187786.413920     8256551.911522
+187803.881499     8256555.310881
+187828.836737     8256560.077384
+187847.606088     8256560.366293
+187868.252298     8256560.684093
+187890.210371     8256557.264889
+187903.974638     8256557.476757
+187917.748972     8256557.063599
+187934.651173     8256556.697060
+187952.784941     8256557.602895
+187978.931073     8256566.143396
+187990.747511     8256570.709187
+188009.365644     8256580.387230
+188021.061520     8256592.462500
+188033.403045     8256603.295820
+188051.304940     8256618.598633
+188066.209695     8256625.714211
+188088.631952     8256632.320322
+188114.767586     8256641.488899
+188135.283142     8256649.942731
+188157.796119     8256650.915974
+188184.699161     8256651.330082
+188207.232321     8256651.050217
+188229.815862     8256647.642170
+188244.831496     8256647.873299
+188262.228129     8256655.653943
+188274.680532     8256659.602814
+188288.324212     8256667.325690
+188306.932279     8256677.628758
+188329.173068     8256695.502136
+188355.854329     8256709.686669
+188375.652858     8256723.766787
+188401.556645     8256747.330814
+188439.439324     8256765.444961
+188477.341422     8256782.305990
+188506.544809     8256795.277456
+188530.168408     8256805.032546
+188563.832423     8256813.063587
+188596.920564     8256817.956805
+188619.989258     8256823.319450
+188639.858376     8256833.016749
+188664.773274     8256840.287938
+188685.873983     8256851.256084
+188711.404307     8256859.161926
+188735.108536     8256863.910701
+188760.023459     8256871.180362
+188790.588709     8256877.286635
+188819.934011     8256881.494003
+188853.072582     8256883.255982
+188880.550711     8256886.809429
+188906.838327     8256886.588884
+188932.489621     8256886.983725
+188963.146380     8256887.455612
+188985.669449     8256887.802301
+189004.438800     8256888.091211
+189021.956403     8256888.360852
+189036.972036     8256888.591982
+189065.822119     8256884.653686
+189092.725161     8256885.067792
+189117.811459     8256881.696740
+189139.709035     8256882.033801
+189157.852894     8256882.313082
+189173.504111     8256881.927287
+189188.600375     8256877.152101
+189207.450380     8256872.433166
+189236.239990     8256872.249605
+189254.454412     8256868.147596
+189267.673460     8256863.341986
+189282.779815     8256857.940247
+189305.393629     8256852.652539
+189326.140269     8256846.710909
+189343.123864     8256841.338066
+189354.495919     8256834.625428
+189370.409233     8256817.966050
+189383.053194     8256810.021101
+189392.578997     8256801.402975
+189412.277040     8256782.923256
+189424.981474     8256771.223571
+189432.660309     8256760.696889
+189440.379434     8256747.668577
+189455.808407     8256722.235462
+189469.390363     8256694.896848
+189478.522546     8256671.872116
+189478.925794     8256646.834425
+189471.902262     8256616.673332
+189462.940992     8256590.239607
+189458.147242     8256577.017161
+189449.629997     8256561.860331
+189444.241767     8256546.750136
+189438.247413     8256530.380251
+189424.089144     8256515.761771
+189419.436521     8256493.776745
+189411.616121     8256474.246736
+189396.912990     8256454.612312
+189387.094379     8256442.564410
+189374.773012     8256430.479512
+189365.559712     8256419.694344
+189350.755793     8256406.317815
+189341.512245     8256397.410780
+189331.723883     8256383.484745
+189321.309241     8256369.550598
+189309.624220     8256356.848786
+189294.214967     8256342.211050
+189281.287501     8256328.864934
+189262.679459     8256318.560337
+189244.091574     8256307.004161
+189231.053993     8256300.542504
+189206.976278     8256280.137072
+189177.268368     8256259.644977
+189152.100977     8256229.204602
+189137.932617     8256215.212676
+189124.955533     8256204.994754
+189104.439978     8256196.540922
+189090.131254     8256191.311588
+189075.912489     8256180.449373
+189050.553565     8256161.901290
+189038.857689     8256149.826019
+189029.725044     8256134.033008
+189016.314001     8256111.913166
+189005.990104     8256092.344622
+188995.666946     8256072.777618
+188985.787839     8256064.485980
+188970.963763     8256052.361030
+188953.162656     8256030.800323
+188939.620552     8256016.818036
+188930.407252     8256006.032869
+188919.932137     8255995.853459
+188911.384669     8255982.573233
+188902.211684     8255969.284908
+188885.177984     8255938.969731
+188874.823839     8255921.279320
+188868.133429     8255909.281097
+188853.996082     8255893.411050
+188847.284751     8255882.664394
+188836.194999     8255871.848814
+188820.291289     8255849.065423
+188808.726474     8255828.852598
+188797.343126     8255797.372506
+188789.653023     8255769.704931
+188783.658669     8255753.335045
+188776.483919     8255732.563086
+188772.982231     8255716.856749
+188772.598703     8255701.823590
+188773.728255     8255670.536104
+188790.862305     8255655.774115
+188811.195931     8255636.677470
+188830.752059     8255626.961848
+188842.103957     8255621.500789
+188867.301134     8255611.245289
+188892.468063     8255602.867921
+188905.667716     8255599.313902
+188919.552571     8255592.014763
+188934.104022     8255582.220577
+188953.589586     8255576.886245
+188968.059618     8255572.099892
+188985.668706     8255566.736676
+188999.593900     8255556.932850
+189014.710346     8255550.904558
+189026.698566     8255544.828113
+189035.639216     8255533.695673
+189045.195267     8255523.199415
+189062.349474     8255507.185847
+189070.654565     8255496.668804
+189084.730953     8255477.477373
+189097.354757     8255470.784003
+189111.220218     8255464.736454
+189133.743287     8255465.083143
+189159.414738     8255464.226405
+189176.306848     8255464.486419
+189206.973699     8255464.331753
+189237.004966     8255464.794012
+189273.291920     8255465.352564
+189302.072202     8255465.795567
+189324.655743     8255462.387520
+189347.804304     8255462.743836
+189376.018828     8255459.420936
+189401.145441     8255453.546725
+189421.176607     8255453.229877
+189441.277597     8255448.530199
+189461.388679     8255443.203967
+189489.633426     8255438.004462
+189507.232447     8255433.266271
+189521.087054     8255427.845264
+189534.357271     8255419.909955
+189550.724701     8255413.900918
+189563.953815     8255408.470283
+189577.909258     8255396.788325
+189598.333606     8255372.058812
+189618.575723     8255358.596553
+189630.654664     8255346.887239
+189643.449844     8255329.553156
+189653.076483     8255314.674079
+189670.160126     8255303.041801
+189678.455127     8255293.151312
+189693.621978     8255283.993308
+189705.004100     8255276.655645
+189719.474896     8255271.869303
+189732.239827     8255256.413353
+189749.303313     8255246.032653
+189758.859364     8255235.536395
+189780.968655     8255222.728057
+189792.391856     8255212.887248
+189804.985411     8255208.072011
+189817.003880     8255200.117434
+189834.077457     8255189.110181
+189846.852455     8255173.029205
+189861.444220     8255160.731862
+189875.480293     8255144.043588
+189888.850558     8255129.848844
+189897.781117     8255119.342958
+189916.318158     8255095.209574
+189929.567429     8255088.527360
+189953.009124     8255070.730446
+189965.612745     8255065.290183
+189982.000333     8255058.029567
+190003.978564     8255053.358785
+190025.876140     8255053.695846
+190048.419366     8255052.790956
+190068.520356     8255048.091277
+190086.038723     8255048.360931
+190099.822766     8255047.321214
+190114.293561     8255042.534872
+190131.256235     8255038.413595
+190146.332366     8255034.888460
+190165.787707     8255031.430733
+190184.647779     8255026.086773
+190201.601150     8255022.590534
+190217.322906     8255017.824976
+190234.911097     8255013.711799
+190247.504627     8255008.898090
+190257.070769     8254997.775278
+190262.923509     8254984.091529
+190267.515198     8254971.013549
+190280.925778     8254954.315648
+190284.901277     8254940.603003
+190291.359352     8254928.180461
+190302.913638     8254910.200568
+190323.186003     8254894.860177
+190331.501161     8254883.718109
+190348.413429     8254882.726544
+190372.198312     8254882.467475
+190387.213182     8254882.698593
+190412.047450     8254894.976098
+190423.834047     8254901.418499
+190434.985060     8254908.477825
+190463.704106     8254912.675554
+190482.463366     8254913.591017
+190497.479000     8254913.822147
+190513.200780     8254909.055061
+190532.746842     8254899.964464
+190548.589592     8254887.686376
+190561.374680     8254870.978847
+190575.451093     8254851.785888
+190593.877230     8254834.538480
+190605.250025     8254827.827382
+190620.991963     8254821.808717
+190638.640626     8254813.940804
+190651.931001     8254804.753916
+190663.958772     8254796.174302
+190682.889433     8254786.447523
+190690.649661     8254770.914537
+190692.152676     8254755.285237
+190697.379923     8254741.591859
+190704.493739     8254727.300813
+190712.263282     8254711.142025
+190721.879831     8254696.889502
+190730.194976     8254685.748199
+190738.510133     8254674.606131
+190758.631281     8254668.654874
+190770.589253     8254664.456562
+190795.514242     8254671.101197
+190820.419074     8254678.997411
+190843.507150     8254683.109229
+190867.261797     8254684.727528
+190884.779400     8254684.997170
+190899.169542     8254685.218672
+190921.218336     8254676.166599
+190938.281834     8254665.785135
+190958.504558     8254653.574467
+190988.121272     8254640.882452
+191013.954032     8254630.010026
+191034.146507     8254619.677490
+191046.770298     8254612.984884
+191058.172590     8254604.394878
+191071.483122     8254593.956411
+191086.043888     8254583.536425
+191104.389371     8254571.296861
+191124.571003     8254561.590102
+191144.723163     8254553.760724
+191159.273838     8254543.967291
+191173.240111     8254531.660319
+191189.264315     8254508.115729
+191201.323111     8254497.657231
+191211.454249     8254490.300312
+191224.764029     8254479.861069
+191233.704667     8254468.729393
+191250.717759     8254461.477641
+191270.283978     8254451.135466
+191284.230094     8254440.080073
+191296.954697     8254427.128044
+191310.375357     8254409.804353
+191324.482005     8254388.734026
+191341.021587     8254372.083523
+191350.587717     8254360.961476
+191358.276619     8254349.809768
+191372.858305     8254338.138214
+191389.992355     8254323.376225
+191400.214238     8254310.384908
+191406.056899     8254297.326949
+191410.889763     8254269.226954
+191416.893720     8254246.154071
+191420.909547     8254229.937504
+191421.151498     8254214.914737
+191417.064646     8254196.694850
+191416.751668     8254177.281165
+191412.109123     8254154.670349
+191411.241229     8254130.864981
+191407.052801     8254118.904506
+191406.709575     8254101.368953
+191403.177652     8254087.539985
+191402.198855     8254070.620593
+191394.377679     8254051.091337
+191381.703031     8254022.095147
+191372.065863     8253998.781506
+191359.279548     8253976.671280
+191350.833643     8253957.132408
+191346.120535     8253938.902882
+191335.171134     8253919.325474
+191330.034921     8253888.567486
+191324.686241     8253870.954122
+191318.237783     8253843.933131
+191314.099761     8253828.842945
+191304.402108     8253809.284805
+191299.719248     8253789.177146
+191294.431805     8253767.809057
+191289.759024     8253747.075609
+191284.955182     8253734.479716
+191280.807845     8253720.015331
+191264.228249     8253700.351260
+191252.623107     8253682.642356
+191236.669016     8253662.987149
+191219.422837     8253645.817360
+191202.096016     8253633.654650
+191192.852480     8253624.746851
+191179.169237     8253619.527909
+191166.817633     8253609.320379
+191173.285799     8253596.271283
+191195.324502     8253587.845764
+191211.782665     8253576.203094
+191216.434839     8253559.369613
+191220.561556     8253536.267834
+191225.464983     8253503.786549
+191228.925893     8253483.178300
+191229.238408     8253463.774243
+191229.661826     8253437.484209
+191225.625367     8253416.135375
+191222.224492     8253394.169616
+191217.571868     8253372.184590
+191211.193986     8253340.781545
+191204.695134     8253316.889502
+191197.580105     8253292.362030
+191191.696654     8253269.106168
+191182.674899     8253246.427945
+191173.562424     8253229.382590
+191165.721854     8253211.104924
+191151.624058     8253192.731708
+191137.062078     8253164.333176
+191129.241678     8253144.803167
+191117.737348     8253120.834841
+191110.137966     8253087.534396
+191101.176696     8253061.100672
+191097.099922     8253042.254996
+191091.922619     8253014.000919
+191087.179262     8252997.649525
+191082.547572     8252974.412167
+191081.507526     8252961.248265
+191077.360189     8252946.783879
+191076.946399     8252933.629617
+191074.806587     8252911.057324
+191071.587179     8252877.824298
+191071.990427     8252852.786608
+191072.192051     8252840.267762
+191081.919478     8252819.130791
+191087.176210     8252803.559270
+191093.069289     8252787.370834
+191100.758942     8252776.219903
+191104.724362     8252763.133047
+191117.569948     8252742.669253
+191129.224269     8252718.430690
+191137.720881     8252696.022120
+191141.091058     8252681.047504
+191144.017196     8252654.796758
+191146.377576     8252624.780107
+191150.474821     8252603.555709
+191158.244364     8252587.396922
+191165.943345     8252575.619425
+191179.849121     8252567.068718
+191194.309074     8252562.908154
+191206.367858     8252552.450419
+191212.291174     8252534.384616
+191216.256594     8252521.297760
+191216.498545     8252506.274993
+191213.319451     8252470.538810
+191204.892953     8252449.747582
+191200.856507     8252428.397985
+191197.385055     8252410.814280
+191196.970515     8252397.659241
+191196.718022     8252374.490055
+191197.545138     8252361.980838
+191205.315446     8252345.822062
+191217.525460     8252325.974429
+191233.136337     8252328.093320
+191242.258904     8252344.512121
+191247.021655     8252359.611923
+191251.744842     8252377.215660
+191255.650240     8252406.702048
+191258.506278     8252423.650336
+191259.526153     8252438.066581
+191263.027841     8252453.772917
+191270.858332     8252472.676373
+191290.576995     8252491.762818
+191303.634733     8252496.972896
+191316.702563     8252501.556420
+191334.220929     8252501.826074
+191349.862055     8252502.066832
+191363.111339     8252495.383854
+191376.986115     8252488.710504
+191388.429498     8252477.616588
+191392.465494     8252460.147678
+191392.747760     8252442.621753
+191383.171089     8252415.551847
+191380.880059     8252402.368688
+191373.705309     8252381.596729
+191367.156039     8252360.835161
+191361.706547     8252349.481219
+191355.843266     8252324.973015
+191351.755638     8252306.753881
+191350.080785     8252294.206152
+191343.592012     8252269.688319
+191338.959558     8252246.450950
+191331.128303     8252227.547483
+191327.061608     8252208.076018
+191326.032405     8252194.286337
+191325.738834     8252173.620297
+191326.051349     8252154.216239
+191333.811578     8252138.683253
+191339.068310     8252123.111732
+191351.833241     8252107.655782
+191367.534851     8252104.141039
+191376.072253     8252118.046290
+191375.850459     8252131.817478
+191376.830020     8252148.736881
+191376.577990     8252164.385438
+191383.147417     8252183.895427
+191399.767328     8252201.056340
+191415.983540     8252204.436438
+191426.962727     8252183.317970
+191432.199302     8252168.998027
+191436.225971     8252152.155683
+191440.342609     8252129.679694
+191455.650600     8252111.758345
+191482.229822     8252093.384545
+191498.718234     8252079.863743
+191509.475628     8252072.516463
+191524.682043     8252060.854525
+191534.824023     8252052.871829
+191543.743751     8252042.990956
+191551.433404     8252031.840025
+191547.244976     8252019.879549
+191540.009729     8252002.863855
+191514.994019     8252001.852088
+191500.674441     8251997.249296
+191504.115181     8251977.893390
+191518.505322     8251978.114892
+191531.653794     8251977.691337
+191617.743328     8251957.571762
+191667.442116     8251929.328295
+END
+LINE3D
+HEIGHT 1070.000000
+183557.000000     8256623.276550
+183573.685428     8256619.798967
+183611.244287     8256619.125207
+183640.023997     8256619.568202
+183666.391911     8256614.338279
+183695.252084     8256609.773427
+183712.285704     8256601.270866
+183729.299165     8256594.019884
+183745.696844     8256586.132715
+183773.336282     8256579.670475
+183798.442713     8256575.049372
+183828.574410     8256569.252203
+183847.414350     8256565.158294
+183867.495540     8256561.711728
+183886.345545     8256556.992794
+183903.934093     8256552.881151
+183935.912592     8256548.991007
+183970.323069     8256549.520675
+184007.175615     8256553.843599
+184034.007712     8256558.638992
+184065.289964     8256559.120508
+184097.823582     8256559.621285
+184122.223700     8256559.996867
+184145.998326     8256560.362820
+184163.516311     8256560.632468
+184186.685411     8256559.737212
+184217.473040     8256552.071541
+184258.765651     8256552.707143
+184295.063053     8256552.640674
+184330.745054     8256551.938024
+184353.288304     8256551.031606
+184368.404750     8256545.003313
+184383.551229     8256537.098413
+184400.534276     8256531.724033
+184423.814279     8256523.942800
+184452.694801     8256518.126373
+184491.575399     8256513.090581
+184512.231891     8256512.781830
+184529.184665     8256509.287110
+184544.825791     8256509.527867
+184573.070563     8256504.326834
+184610.740301     8256496.768626
+184640.256597     8256490.335276
+184667.300385     8256481.986797
+184694.354454     8256473.011769
+184730.772850     8256465.432770
+184753.992356     8256461.407803
+184767.776615     8256460.366561
+184805.335474     8256459.692801
+184835.992234     8256460.164689
+184865.316972     8256465.625158
+184889.666494     8256469.130448
+184907.123981     8256473.156361
+184928.345659     8256476.613505
+184953.290831     8256482.005033
+184990.668224     8256492.598540
+185029.276826     8256504.462887
+185064.817699     8256512.522817
+185100.348100     8256521.209296
+185137.775924     8256528.671563
+185174.527825     8256539.255441
+185213.257396     8256543.608787
+185233.217641     8256547.671694
+185245.720451     8256548.490854
+185273.642605     8256563.321196
+185294.097282     8256575.531287
+185314.047436     8256580.220749
+185330.233399     8256585.478978
+185350.133147     8256593.298151
+185373.151030     8256601.792029
+185403.656189     8256611.653045
+185428.550930     8256620.175813
+185442.305131     8256621.012706
+185458.440688     8256629.400647
+185477.099136     8256636.575533
+185494.496533     8256644.356188
+185515.667423     8256650.943038
+185540.067733     8256651.318622
+185576.980561     8256651.886807
+185612.652495     8256651.809183
+185628.354093     8256648.295204
+185648.364744     8256649.228400
+185662.673849     8256654.457740
+185675.731970     8256659.667824
+185687.538342     8256664.858640
+185705.510825     8256675.778635
+185725.390415     8256684.849386
+185741.475567     8256696.367039
+185756.945317     8256707.248510
+185772.465449     8256715.001797
+185794.917954     8256719.729776
+185814.313179     8256720.028320
+185851.851881     8256720.606138
+185891.913092     8256719.970896
+185935.102934     8256719.382283
+185978.898087     8256720.056405
+186012.057197     8256720.566810
+186038.939676     8256722.234020
+186069.515805     8256727.712223
+186098.295324     8256728.155215
+186118.305950     8256729.089940
+186142.696169     8256730.092078
+186168.286990     8256734.241655
+186192.687299     8256734.617240
+186208.247770     8256739.865841
+186231.316058     8256745.230008
+186261.195726     8256755.081396
+186276.079917     8256763.450075
+186288.481939     8256770.527129
+186306.504828     8256778.317412
+186336.515532     8256780.032773
+186367.172291     8256780.504661
+186393.530114     8256775.901292
+186414.811907     8256775.602165
+186439.898181     8256772.232641
+186475.640679     8256767.773726
+186504.551258     8256760.079163
+186534.673246     8256754.908554
+186556.035694     8256749.601583
+186576.147133     8256744.276885
+186608.751314     8256740.396373
+186638.983824     8256728.339781
+186659.125535     8256721.135423
+186672.384898     8256713.826655
+186686.260044     8256707.154075
+186703.293688     8256698.649986
+186718.450066     8256690.118529
+186737.925946     8256685.409229
+186757.391353     8256681.326476
+186773.113133     8256676.559390
+186804.415543     8256675.789327
+186825.687627     8256676.116760
+186851.843825     8256684.032236
+186870.542613     8256688.702435
+186889.241400     8256693.372635
+186916.749370     8256695.049472
+186940.463333     8256699.170160
+186969.243234     8256699.613158
+187003.593214     8256703.899090
+187031.050803     8256708.704110
+187055.451112     8256709.079695
+187079.346516     8256701.934644
+187108.822473     8256698.005980
+187136.996682     8256697.186237
+187158.167953     8256703.773092
+187191.145597     8256715.550764
+187226.100912     8256721.097903
+187256.061234     8256725.941448
+187291.097585     8256726.480749
+187321.854775     8256720.693208
+187361.361438     8256715.667053
+187386.447737     8256712.296001
+187416.478622     8256712.758255
+187442.129916     8256713.153095
+187475.914901     8256713.673134
+187497.762071     8256717.139907
+187522.717309     8256721.906409
+187542.677529     8256725.970845
+187568.883752     8256730.756604
+187592.648478     8256731.749114
+187616.352349     8256736.496355
+187634.445420     8256739.905342
+187660.026532     8256744.681479
+187686.293609     8256745.712507
+187728.827329     8256746.992392
+187751.350397     8256747.339081
+187778.333687     8256742.746868
+187794.691433     8256737.362862
+187813.531347     8256733.270481
+187848.042636     8256727.540726
+187974.393224     8256770.181926
+187984.827642     8256782.864488
+188001.397541     8256803.154354
+188018.572750     8256824.706956
+188040.238478     8256839.439467
+188061.318622     8256851.660714
+188091.178514     8256862.763687
+188116.073255     8256871.286454
+188136.537616     8256882.871514
+188153.329678     8256889.390962
+188168.960738     8256890.256746
+188189.586408     8256891.826118
+188207.104775     8256892.095771
+188222.130475     8256891.701876
+188237.771601     8256891.942634
+188250.183689     8256898.394663
+188264.957384     8256913.647796
+188276.763374     8256918.838606
+188290.982140     8256929.700821
+188300.820932     8256940.495617
+188308.773157     8256951.888082
+188317.764650     8256976.445202
+188334.263604     8257001.116353
+188350.864133     8257019.528093
+188364.476800     8257029.129090
+188386.919214     8257034.483622
+188417.021045     8257030.564592
+188433.973652     8257027.068341
+188466.507652     8257027.569124
+188502.068302     8257034.377470
+188529.516182     8257039.809050
+188545.702145     8257045.067279
+188569.305587     8257056.073949
+188604.139932     8257069.132090
+188627.682112     8257083.895012
+188653.778195     8257095.566759
+188679.278271     8257105.350734
+188702.326020     8257111.966473
+188730.379234     8257118.659260
+188745.324305     8257123.271680
+188763.468163     8257123.550962
+188784.054258     8257127.625031
+188814.649781     8257131.851644
+188842.803808     8257132.285008
+188863.430242     8257133.854392
+188880.888111     8257137.880311
+188898.405714     8257138.149952
+188910.908524     8257138.969112
+188927.791332     8257139.854163
+188945.308934     8257140.123805
+188965.340100     8257139.806956
+188981.677307     8257135.674524
+188998.710544     8257127.171957
+189015.128380     8257118.033209
+189035.290607     8257109.578805
+189064.191120     8257102.509268
+189096.885641     8257092.995880
+189115.745737     8257087.650392
+189133.980317     8257082.296804
+189157.815631     8257078.906496
+189187.926764     8257074.362428
+189221.217317     8257066.735284
+189243.135051     8257065.820766
+189263.165478     8257065.502378
+189284.457719     8257064.578232
+189300.169409     8257060.437700
+189316.446118     8257060.061532
+189335.296124     8257055.342598
+189354.146129     8257050.623663
+189373.692954     8257041.533078
+189392.542935     8257036.815672
+189413.370230     8257025.866199
+189436.680864     8257016.206840
+189463.784766     8257004.102091
+189484.622891     8256992.527604
+189501.726716     8256979.642219
+189518.801057     8256968.634978
+189539.547697     8256962.693348
+189564.210103     8256946.795351
+189584.401814     8256936.462803
+189602.646485     8256930.482662
+189619.781323     8256915.719156
+189637.561022     8256899.715215
+189649.185871     8256877.354033
+189655.179763     8256854.906175
+189663.040040     8256833.113754
+189668.973434     8256814.422161
+189669.871114     8256797.531654
+189670.234022     8256774.998649
+189666.731897     8256720.473041
+189661.271852     8256670.927910
+189651.986762     8256625.706278
+189648.323328     8256581.196358
+189634.669119     8256535.280764
+189626.201819     8256478.176480
+189619.985245     8256436.757747
+189614.838190     8256406.625538
+189610.408112     8256370.870098
+189604.201605     8256328.826341
+189598.318154     8256305.570479
+189592.384297     8256285.444329
+189580.779167     8256267.734662
+189572.927755     8256250.082773
+189563.199866     8256232.402002
+189552.139574     8256219.709806
+189534.924407     8256200.661896
+189515.731188     8256187.844513
+189500.200941     8256180.719307
+189472.278787     8256165.888965
+189445.062779     8256146.060408
+189432.206665     8256128.331484
+189419.500980     8256101.214943
+189413.516742     8256084.216976
+189408.340202     8256055.962910
+189398.096935     8256031.388051
+189384.221709     8255999.242893
+189378.247513     8255981.621429
+189359.245087     8255956.910215
+189338.215706     8255941.560790
+189320.313811     8255926.257977
+189308.022692     8255912.294947
+189290.130863     8255896.367108
+189278.495485     8255880.535573
+189265.720000     8255857.800334
+189256.516792     8255846.388613
+189245.617809     8255823.680730
+189244.618854     8255808.012917
+189256.273927     8255783.775130
+189265.344874     8255764.505123
+189276.192988     8255751.524975
+189285.769222     8255739.775610
+189301.662378     8255724.367811
+189336.304727     8255710.500500
+189372.198037     8255696.653973
+189394.176268     8255691.983191
+189411.159887     8255686.608819
+189436.871654     8255683.248922
+189453.844419     8255678.501092
+189468.860052     8255678.732222
+189483.330848     8255673.945880
+189511.706656     8255660.608820
+189552.019515     8255644.325015
+189589.820338     8255628.627724
+189604.835972     8255628.858853
+189626.874675     8255620.433334
+189638.893144     8255612.478757
+189652.122258     8255607.048122
+189663.545484     8255597.205785
+189680.568655     8255589.328243
+189698.914138     8255577.088679
+189719.277224     8255556.115419
+189740.115374     8255544.539404
+189769.177147     8255527.457235
+189796.503619     8255501.580545
+189825.706543     8255475.734267
+189857.856227     8255461.203408
+189880.611168     8255447.153119
+189892.750606     8255431.687540
+189911.802236     8255414.449760
+189921.963622     8255405.214709
+189943.457487     8255391.771718
+189964.941286     8255378.953752
+189986.283934     8255374.899894
+190012.580877     8255374.052784
+190042.612145     8255374.515044
+190069.423702     8255380.562009
+190090.554634     8255389.653551
+190110.565667     8255390.586753
+190139.980745     8255390.414348
+190162.110194     8255376.354431
+190181.726819     8255362.882544
+190203.815953     8255351.325785
+190248.448288     8255338.865664
+190281.153664     8255328.725735
+190305.664876     8255322.215343
+190327.147911     8255309.397365
+190349.216863     8255299.093713
+190386.957189     8255287.152687
+190410.338386     8255273.112037
+190429.309362     8255260.882101
+190441.347988     8255251.675946
+190455.737366     8255251.897436
+190489.522350     8255252.417475
+190509.552752     8255252.100615
+190525.274533     8255247.333529
+190546.072343     8255238.262200
+190573.802501     8255226.167091
+190609.695835     8255212.319036
+190647.476476     8255197.874851
+190666.457543     8255185.018362
+190677.265342     8255174.541371
+190686.255634     8255160.279208
+190695.993152     8255138.515684
+190704.520000     8255114.229745
+190709.201646     8255095.518884
+190713.198091     8255080.553144
+190722.238764     8255063.162798
+190746.154733     8255054.764646
+190760.554940     8255054.361123
+190785.045231     8255049.102298
+190811.433660     8255042.622330
+190832.776332     8255038.566945
+190856.116426     8255027.030970
+190885.904527     8255003.697478
+190896.782890     8254988.839197
+190904.542355     8254973.306199
+190920.516166     8254952.890557
+190954.623744     8254933.380749
+190989.790774     8254925.782489
+191017.389872     8254921.824935
+191035.614385     8254917.096372
+191046.381106     8254909.122528
+191061.063592     8254891.192315
+191079.509887     8254872.693328
+191096.028536     8254857.295157
+191111.911625     8254842.512384
+191126.522784     8254828.963450
+191139.853474     8254817.273404
+191159.560845     8254798.167119
+191183.042090     8254777.867036
+191204.071760     8254754.399493
+191226.877095     8254737.220257
+191254.001931     8254723.863176
+191283.104043     8254704.276321
+191311.600833     8254683.427496
+191342.620514     8254661.365614
+191388.110226     8254634.517379
+191414.114362     8254613.004240
+191433.771314     8254597.028431
+191451.481226     8254585.405029
+191467.394540     8254568.745651
+191483.307866     8254552.085509
+191499.251428     8254533.547999
+191521.582488     8254506.970001
+191536.940885     8254485.918940
+191547.818497     8254471.059884
+191569.443423     8254449.479337
+191582.097463     8254440.908599
+191592.924668     8254429.179254
+191615.245650     8254403.227045
+191633.903648     8254371.583423
+191644.296907     8254347.951394
+191645.881327     8254327.315025
+191646.163606     8254309.788336
+191646.375309     8254296.643701
+191640.643088     8254263.997941
+191634.355927     8254226.962027
+191633.487269     8254203.156648
+191622.568880     8254181.701119
+191611.720291     8254155.864289
+191596.502571     8254129.334261
+191579.397544     8254103.400363
+191566.581744     8254083.168282
+191543.886837     8254054.644563
+191512.533560     8254019.726594
+191491.664724     8253994.361470
+191473.944271     8253967.792919
+191456.808995     8253943.737154
+191448.918019     8253928.589199
+191438.170242     8253896.492946
+191428.189860     8253855.642988
+191417.986933     8253828.563442
+191408.440498     8253799.616168
+191400.155126     8253770.062360
+191396.643360     8253754.981813
+191397.006281     8253732.448044
+191386.118141     8253709.114383
+191377.610988     8253693.331000
+191369.063507     8253680.051538
+191363.059087     8253664.306678
+191356.409005     8253649.804533
+191350.465081     8253630.303408
+191345.731803     8253613.326225
+191337.295214     8253593.161552
+191326.386903     8253571.080234
+191319.160983     8253553.437973
+191319.473498     8253534.033916
+191319.765856     8253515.881437
+191320.654220     8253499.616731
+191324.074803     8253481.512404
+191329.331535     8253465.940882
+191330.188900     8253451.553532
+191333.599392     8253434.075759
+191337.696636     8253412.851360
+191338.856437     8253379.685742
+191343.003312     8253355.332384
+191347.099793     8253334.107974
+191347.371993     8253317.207074
+191347.583695     8253304.062439
+191347.936538     8253282.154460
+191343.920249     8253259.553283
+191339.893117     8253237.577884
+191335.725610     8253224.365842
+191327.339439     8253201.070693
+191323.313071     8253179.095306
+191319.892026     8253158.381890
+191318.912478     8253141.461722
+191318.690234     8253116.414403
+191317.792091     8253094.487168
+191316.933500     8253070.056763
+191312.160671     8253055.582750
+191308.153697     8253032.355772
+191302.905830     8253008.482985
+191298.869383     8252987.133387
+191294.065541     8252974.537495
+191289.928283     8252959.447320
+191278.827664     8252949.259046
+191267.667323     8252942.826285
+191255.951290     8252932.002594
+191249.250814     8252920.629396
+191250.158573     8252903.113099
+191260.985779     8252891.383753
+191291.894568     8252876.207084
+191319.856599     8252849.714997
+191341.350465     8252836.272006
+191350.977092     8252821.393693
+191361.239290     8252805.899219
+191369.927447     8252771.597593
+191377.323528     8252739.780621
+191381.430088     8252717.930421
+191394.941493     8252694.972333
+191407.736660     8252677.639014
+191419.240527     8252662.789597
+191426.989914     8252647.882389
+191440.440822     8252628.680565
+191452.630666     8252610.085275
+191470.330499     8252599.087662
+191498.565168     8252594.513947
+191546.245099     8252587.108293
+191587.598003     8252583.988391
+191605.116370     8252584.258044
+191629.688054     8252573.992916
+191650.475022     8252565.547364
+191671.928572     8252554.607531
+191690.849141     8252545.507306
+191702.887768     8252536.301150
+191713.634319     8252529.579649
+191724.492524     8252515.972947
+191738.982714     8252509.935014
+191752.888502     8252501.383544
+191766.137786     8252494.700566
+191781.859566     8252489.933480
+191794.443030     8252485.744796
+191809.650209     8252474.082870
+191805.492030     8252460.244262
+191782.979040     8252459.271784
+191764.835181     8252458.992502
+191751.061217     8252459.406429
+191737.195756     8252465.453978
+191723.381465     8252468.371827
+191710.192666     8252471.299304
+191698.234682     8252475.498380
+191681.968063     8252475.247995
+191671.513106     8252463.817006
+191664.893272     8252447.436728
+191659.615156     8252425.442074
+191663.156708     8252399.826745
+191670.281366     8252384.909921
+191686.719360     8252374.519593
+191694.408261     8252363.367886
+191707.153035     8252349.163514
+191720.472882     8252338.099246
+191728.818276     8252325.079810
+191740.957714     8252309.614232
+191749.342672     8252294.090862
+191755.820916     8252280.415977
+191765.538264     8252259.904795
+191769.514539     8252246.191398
+191784.286995     8252222.627540
+191792.006909     8252209.597712
+191810.987963     8252196.741986
+191832.501234     8252182.046640
+191845.185510     8252171.598533
+191847.496248     8252144.711606
+191847.838999     8252123.430180
+191849.392420     8252104.671168
+191861.996054     8252099.230141
+191877.011687     8252099.461270
+191897.577637     8252104.786155
+191915.721495     8252105.065437
+191933.400395     8252095.320155
+191946.861382     8252075.492542
+191964.702354     8252055.731584
+191973.884943     8252029.577141
+191978.536340     8252012.744413
+191980.060288     8251995.862781
+191980.342555     8251978.336856
+191979.988499     8251961.426316
+191975.861319     8251945.710352
+191970.502549     8251928.723541
+191960.714175     8251914.798270
+191956.667637     8251894.075226
+191947.454350     8251883.289294
+191942.065331     8251868.180616
+191941.641462     8251855.652143
+191941.953990     8251836.247321
+191957.776570     8251825.221576
+191977.463770     8251807.367635
+191989.451991     8251801.291191
+192005.244335     8251792.142814
+192021.046758     8251782.368649
+192048.796322     8251769.021185
+192091.723568     8251745.890703
+192113.126713     8251738.080581
+192128.808166     8251735.817417
+192143.207622     8251735.413117
+192161.351481     8251735.692399
+192190.141079     8251735.509601
+192203.986382     8251730.713631
+192221.564470     8251727.227772
+192240.414463     8251722.509602
+192256.105995     8251719.620649
+192268.063979     8251715.421572
+192296.994716     8251706.475430
+192317.136785     8251699.272606
+192329.730341     8251694.457368
+192351.022582     8251693.533222
+192366.097937     8251690.008840
+192383.111793     8251682.757100
+192392.657765     8251672.886631
+192402.940120     8251656.140578
+192409.196517     8251636.302325
+END
+LINE3D
+HEIGHT 1060.000000
+183557.000000     8256823.953132
+183571.438661     8256824.084612
+183594.621542     8256823.042508
+183616.552034     8256821.989001
+183639.735106     8256820.946899
+183657.275915     8256820.480214
+183673.564336     8256820.002124
+183689.220627     8256820.144692
+183707.381886     8256820.310070
+183726.795724     8256820.486854
+183748.726216     8256819.433346
+183777.574725     8256815.310003
+183798.873083     8256814.877535
+183817.069398     8256811.283605
+183834.019164     8256807.051911
+183856.599313     8256803.498284
+183876.732725     8256793.656714
+183896.245883     8256783.182700
+183908.817653     8256778.284726
+183935.213776     8256768.499803
+183954.007165     8256768.044524
+183971.577190     8256764.444891
+183989.738449     8256764.610269
+184012.909835     8256764.821270
+184037.959900     8256765.049378
+184059.878706     8256765.248973
+184078.666255     8256765.420054
+184099.999665     8256761.228660
+184123.855573     8256755.180232
+184152.704082     8256751.056889
+184172.158817     8256746.848006
+184189.102740     8256743.243054
+184204.770715     8256742.132519
+184218.559821     8256741.004875
+184236.732765     8256739.917151
+184258.686624     8256736.357820
+184284.368823     8256735.964889
+184303.168054     8256734.883250
+184320.703214     8256735.042926
+184337.617737     8256734.570156
+184355.152897     8256734.729833
+184373.314156     8256734.895211
+184398.990511     8256735.129022
+184421.523731     8256736.587420
+184444.683432     8256738.051523
+184464.711875     8256739.487113
+184486.630682     8256739.686708
+184514.185523     8256739.937625
+184538.609489     8256740.160031
+184558.023137     8256740.336814
+184575.558488     8256740.496492
+184596.213033     8256741.937401
+184620.010518     8256742.154103
+184649.444421     8256742.422131
+184671.351542     8256743.874828
+184689.506766     8256744.666947
+184707.030435     8256746.079345
+184727.690818     8256746.894276
+184747.098624     8256747.697419
+184775.824635     8256756.731080
+184802.126897     8256756.970591
+184822.793506     8256757.158783
+184840.954574     8256757.324159
+184858.489543     8256757.483834
+184879.782251     8256757.677728
+184899.810694     8256759.113317
+184914.202723     8256760.497199
+184936.677520     8256768.220727
+184950.408395     8256773.358215
+184967.229631     8256782.909884
+184984.688647     8256791.214534
+185002.141827     8256800.145162
+185022.761698     8256805.345382
+185042.093553     8256814.293500
+185060.810993     8256821.982813
+185077.649755     8256829.655020
+185103.864766     8256839.292229
+185123.196623     8256848.239965
+185150.675899     8256856.635478
+185171.272018     8256864.341899
+185190.621398     8256871.410554
+185205.616537     8256875.306346
+185219.382464     8256876.684908
+185234.365536     8256881.833799
+185254.990867     8256886.407655
+185281.867414     8256892.291262
+185300.602381     8256898.101113
+185318.102297     8256902.019713
+185334.373001     8256903.421084
+185354.378074     8256907.362879
+185374.406520     8256908.798086
+185397.577907     8256909.009087
+185415.112876     8256909.168762
+185428.890488     8256909.294222
+185445.798976     8256909.448193
+185460.823323     8256910.211801
+185475.197822     8256913.475528
+185488.337650     8256914.848389
+185502.729680     8256916.232271
+185525.889381     8256917.696374
+185544.665244     8256919.120558
+185559.665842     8256922.389986
+185573.443454     8256922.515446
+185594.747848     8256921.456236
+185608.490022     8256925.341001
+185627.845628     8256931.782917
+185657.853051     8256937.695034
+185678.484223     8256941.642530
+185701.608872     8256946.865558
+185715.971686     8256951.382387
+185734.677445     8256960.324421
+185752.768787     8256968.008034
+185765.884865     8256971.886714
+185788.319149     8256983.995914
+185808.282946     8256992.322990
+185831.390065     8256999.425864
+185850.136721     8257003.982230
+185867.045591     8257004.136204
+185885.792243     8257008.692952
+185906.458470     8257008.881141
+185923.367340     8257009.035115
+185937.771051     8257009.166276
+185952.807083     8257008.676782
+185969.089472     8257008.825051
+185982.235145     8257009.571170
+185999.108577     8257013.484448
+186017.861074     8257017.414454
+186034.717362     8257023.207198
+186047.792926     8257031.471550
+186062.132374     8257038.494201
+186076.477662     8257044.890493
+186089.599581     8257048.142814
+186106.438344     8257055.815020
+186125.225892     8257055.986101
+186150.960861     8257049.954784
+186171.714722     8257040.745277
+186193.674425     8257036.559204
+186215.001803     8257032.994169
+186235.703468     8257029.423053
+186258.289266     8257025.243064
+186282.127648     8257021.074098
+186302.214514     8257016.244558
+186319.170125     8257011.386121
+186332.362149     8257007.120591
+186349.271019     8257007.274565
+186373.694985     8257007.496972
+186406.833667     8257013.437602
+186428.085096     8257018.017159
+186444.326971     8257022.551099
+186458.730681     8257022.682261
+186476.265650     8257022.841936
+186493.841516     8257018.615943
+186513.290597     8257015.033804
+186531.457510     8257014.572438
+186544.620708     8257013.439094
+186557.157422     8257012.300428
+186574.077978     8257011.201299
+186598.513247     8257010.170600
+186622.972265     8257006.634082
+186653.658365     8257006.913512
+186674.951073     8257007.107405
+186691.239307     8257006.628932
+186705.678452     8257003.001172
+186718.256066     8256997.476455
+186735.252188     8256988.232730
+186754.144897     8256977.126654
+186773.025920     8256967.273679
+186788.097009     8256963.024878
+186814.440550     8256958.878724
+186831.987204     8256957.785297
+186852.033173     8256957.341424
+186870.194241     8256957.506800
+186890.860850     8256957.694992
+186910.888911     8256959.130579
+186929.647248     8256962.434225
+186946.556118     8256962.588198
+186962.838890     8256962.736471
+186977.909596     8256958.487666
+186998.581667     8256958.049112
+187022.414587     8256954.506892
+187047.511389     8256949.722973
+187065.678301     8256949.261607
+187081.966913     8256948.783519
+187102.006659     8256948.966003
+187125.189731     8256947.923901
+187154.658686     8256944.433003
+187176.009816     8256938.361766
+187194.176728     8256937.900400
+187214.257750     8256933.697602
+187236.808500     8256933.276156
+187266.254087     8256932.291081
+187301.365300     8256928.225149
+187315.769011     8256928.356311
+187334.603301     8256923.514982
+187354.016948     8256923.691764
+187372.798652     8256924.489588
+187402.232555     8256924.757615
+187427.908718     8256924.991425
+187452.326844     8256925.840192
+187476.054221     8256933.575126
+187501.075074     8256936.935800
+187524.246461     8256937.146800
+187541.775589     8256937.932835
+187555.553201     8256938.058296
+187576.172687     8256943.258894
+187594.334137     8256943.424274
+187614.374265     8256943.606761
+187639.424330     8256943.834869
+187668.852009     8256944.729254
+187690.729919     8256949.314516
+187711.946678     8256957.653002
+187732.560706     8256963.479964
+187752.512818     8256973.060143
+187776.246421     8256980.168339
+187798.727063     8256987.265125
+187814.933500     8256995.558369
+187829.267489     8257003.207384
+187842.383564     8257007.086447
+187864.864206     8257014.183233
+187879.227402     8257018.700066
+187898.594312     8257023.888876
+187922.954011     8257031.003156
+187945.417127     8257039.979404
+187965.392606     8257047.053761
+187983.478107     8257055.363733
+188005.929537     8257065.593085
+188022.751156     8257075.144757
+188037.704634     8257083.426209
+188055.146507     8257093.610325
+188070.077379     8257104.397990
+188091.235716     8257119.001606
+188106.206720     8257125.403595
+188124.280536     8257134.966670
+188145.479769     8257145.184619
+188157.946379     8257151.563803
+188170.418829     8257157.316628
+188182.873754     8257164.948914
+188197.213583     8257171.971570
+188211.546804     8257179.620960
+188228.356737     8257190.425735
+188244.504754     8257204.983727
+188259.458997     8257213.265186
+188276.274010     8257223.443212
+188297.467399     8257234.287903
+188317.378614     8257248.253750
+188335.440745     8257259.069927
+188350.991875     8257270.489653
+188373.402409     8257285.104672
+188393.396182     8257290.299190
+188410.246247     8257296.718290
+188435.202834     8257306.970836
+188457.683476     8257314.067622
+188480.785136     8257321.796859
+188507.660915     8257327.680842
+188532.032303     8257333.541636
+188545.136697     8257338.673419
+188559.476523     8257345.696457
+188570.052386     8257353.311633
+188587.505948     8257362.242264
+188600.598656     8257368.627150
+188620.585820     8257374.448404
+188644.974734     8257378.429735
+188668.772602     8257378.646441
+188690.071150     8257378.213974
+188706.985483     8257377.741202
+188726.399130     8257377.917984
+188748.908980     8257381.882588
+188772.677636     8257385.231858
+188786.449025     8257385.983675
+188810.205995     8257390.586048
+188825.206976     8257393.855480
+188839.604463     8257394.612998
+188854.628811     8257395.376606
+188874.042458     8257395.553389
+188902.223781     8257395.810010
+188927.273846     8257396.038119
+188948.566554     8257396.232012
+188968.607064     8257396.414503
+188988.646810     8257396.596986
+189003.688687     8257395.480750
+189016.254616     8257391.209136
+189038.799522     8257391.414432
+189054.461653     8257390.930640
+189074.513084     8257389.860021
+189094.600332     8257385.030484
+189114.019824     8257384.580524
+189134.094622     8257381.004083
+189157.933386     8257376.835120
+189174.888612     8257371.977063
+189188.081404     8257367.711158
+189201.267587     8257364.071988
+189215.717653     8257359.191118
+189228.910445     8257354.925213
+189257.067799     8257340.040754
+END
+LINE3D
+HEIGHT 1060.000000
+189257.067799     8257340.040754
+189281.233567     8257318.434112
+189298.815655     8257313.581763
+189317.064739     8257304.349447
+189334.657749     8257298.243988
+189356.026405     8257290.293289
+189377.389221     8257282.968949
+189393.098094     8257277.472747
+189411.920694     8257273.884903
+189426.991783     8257269.636101
+189445.193365     8257265.415807
+189460.264450     8257261.167388
+189474.112552     8257253.774618
+189488.585988     8257246.387544
+189504.312387     8257239.011879
+189525.043260     8257232.308580
+189543.274817     8257224.955727
+189556.525268     8257214.424685
+189576.079128     8257199.565384
+189589.938151     8257190.919506
+189605.676234     8257182.290738
+189623.246638     8257178.691491
+189641.495722     8257169.459176
+189660.961951     8257163.997188
+189672.913463     8257158.467153
+189684.238115     8257152.931027
+189701.861100     8257143.693010
+189722.006007     8257132.598336
+189735.216325     8257126.452968
+189745.317991     8257117.772875
+189756.654325     8257110.984029
+189774.920935     8257099.872251
+189788.833301     8257085.587992
+189797.096803     8257072.505120
+189806.636634     8257056.927835
+189814.274799     8257043.839651
+189818.166527     8257029.464143
+189816.483269     8256995.441932
+END
+LINE3D
+HEIGHT 1060.000000
+183557.000000     8257203.155951
+183568.465922     8257210.022181
+183585.907604     8257220.206296
+183602.746178     8257227.878118
+183617.717948     8257234.280115
+183636.464599     8257238.836863
+183655.872402     8257239.640388
+183669.644174     8257240.392208
+183683.427627     8257239.891309
+183697.240103     8257236.257459
+183711.690743     8257231.376595
+183724.888611     8257226.484323
+183737.413644     8257226.598377
+183752.443835     8257226.735243
+183769.972963     8257227.521278
+183785.588357     8257232.049513
+183798.704627     8257235.928195
+183811.826738     8257239.180518
+183836.824221     8257245.047396
+183853.071558     8257248.954590
+183869.342453     8257250.355963
+183884.992899     8257251.125273
+183900.017059     8257251.888498
+183922.556315     8257252.720156
+183935.695952     8257254.093015
+183949.444352     8257257.351040
+183965.720897     8257258.126052
+183980.095588     8257261.389780
+183995.716826     8257265.291273
+184014.469323     8257269.221279
+184034.474204     8257273.163072
+184049.469343     8257277.058864
+184074.484352     8257281.046279
+184088.853011     8257284.936366
+184107.611348     8257288.240012
+184131.906593     8257302.245780
+184145.011177     8257307.377565
+184157.506998     8257310.624184
+184174.410028     8257311.404518
+184190.686572     8257312.179529
+184203.170708     8257316.679251
+184217.516187     8257323.075544
+184232.476084     8257330.730259
+184250.567234     8257338.413870
+184276.788086     8257347.424719
+184296.120134     8257356.372456
+184309.821603     8257364.642890
+184321.638556     8257373.522194
+184339.068556     8257384.959028
+184354.613842     8257397.005496
+184367.683371     8257405.896589
+184387.612307     8257417.982592
+184409.426144     8257429.459346
+184428.740472     8257440.286927
+184447.411176     8257452.988268
+184468.569512     8257467.591884
+184486.607890     8257480.914264
+184502.153179     8257492.960349
+184522.673349     8257508.811363
+184531.347547     8257518.915640
+184540.630320     8257530.904699
+184557.978335     8257551.112867
+184573.494410     8257566.291900
+184589.010488     8257581.470551
+184605.199781     8257591.643261
+184622.026479     8257600.568184
+184640.117821     8257608.251796
+184654.451424     8257615.901190
+184668.147243     8257624.797986
+184683.692532     8257636.844071
+184701.098970     8257650.787109
+184719.775514     8257662.862091
+184733.453811     8257673.637966
+184748.396368     8257683.172528
+184764.567753     8257695.224697
+184779.481099     8257707.891824
+184788.143233     8257719.248818
+184797.385106     8257735.623926
+184812.263400     8257752.049978
+184822.804594     8257763.424082
+184832.093208     8257774.786781
+184840.743656     8257787.396877
+184848.791372     8257797.495449
+184866.818450     8257812.070552
+184881.157897     8257819.093204
+184894.274355     8257822.972270
+184907.361222     8257829.983516
+184923.579344     8257837.023657
+184942.290944     8257845.339331
+184960.376445     8257853.649304
+184979.731670     8257860.091217
+185003.476955     8257865.946692
+185023.481649     8257869.888101
+185045.266084     8257884.497419
+185058.359175     8257890.882308
+185070.849152     8257894.755669
+185088.986852     8257897.426868
+185102.138366     8257897.546627
+185126.561949     8257897.769030
+185140.966042     8257897.900195
+185160.391375     8257896.823875
+185176.685446     8257895.719424
+185195.496365     8257893.384300
+185212.446132     8257889.152606
+185239.392401     8257887.518359
+185259.438370     8257887.074486
+185278.852400     8257887.251272
+185295.128948     8257888.025901
+185311.352915     8257894.439300
+185325.716111     8257898.956133
+185339.481656     8257900.334692
+185368.845454     8257908.120570
+185395.721615     8257914.004556
+185416.932530     8257922.969784
+185437.511123     8257932.555668
+185453.717945     8257940.848533
+185479.891677     8257954.871407
+185510.472999     8257966.427999
+185527.949545     8257972.852804
+185541.662894     8257979.869754
+185554.106133     8257988.755144
+185564.618115     8258003.261813
+185577.629031     8258018.418034
+185588.129328     8258034.177806
+185594.274999     8258046.765094
+185602.867406     8258065.640324
+185616.451842     8258086.440633
+185625.073460     8258102.183298
+185632.495081     8258112.275787
+185645.441733     8258134.323498
+185650.247190     8258156.297075
+185654.490812     8258171.373460
+185656.229278     8258186.426650
+185657.365012     8258198.968317
+185657.810380     8258218.396154
+185657.640957     8258236.564803
+185656.880101     8258250.969203
+185651.729952     8258265.959665
+185645.309693     8258282.818566
+185639.544745     8258296.550604
+185629.999073     8258312.754249
+185621.114935     8258325.204673
+185613.482993     8258337.666501
+185605.213268     8258351.375729
+185593.823970     8258363.803342
+185579.876930     8258381.846912
+185565.356374     8258394.246011
+185548.962602     8258406.001257
+185529.408739     8258420.860940
+185507.390612     8258431.312143
+185493.572107     8258435.571968
+185469.083874     8258442.241434
+185446.463020     8258450.180731
+185426.341098     8258458.769579
+185410.023657     8258462.380235
+185391.224423     8258463.462256
+185369.896663     8258467.027288
+185352.981948     8258467.500057
+185338.543185     8258471.127821
+185322.231585     8258474.112117
+185308.424761     8258477.119222
+185294.612097     8258480.752687
+185273.243819     8258488.703772
+185256.896784     8258495.446990
+185236.195505     8258499.017727
+185218.561217     8258509.508850
+185205.316225     8258519.413529
+185190.772298     8258534.318833
+185174.291277     8258555.471395
+185152.220566     8258571.561751
+185125.760183     8258588.237782
+185098.673701     8258604.908112
+185077.826358     8258624.142439
+185063.896848     8258640.306164
+185051.254971     8258652.722371
+185037.922348     8258672.024363
+185018.936161     8258693.154877
+184997.491938     8258709.250173
+184982.362430     8258719.763722
+184970.382085     8258728.426708
+184958.395518     8258737.716051
+184945.150912     8258747.620351
+184933.129285     8258760.669383
+184915.430736     8258778.051614
+184898.294016     8258802.331801
+184881.871411     8258817.219998
+184869.235374     8258829.009844
+184857.874905     8258838.304888
+184845.244716     8258849.467609
+184830.086372     8258863.114492
+184814.910124     8258878.640451
+184802.847993     8258896.074008
+184790.165215     8258912.876264
+184779.349441     8258930.947583
+184773.187197     8258937.000000
+END
+LINE3D-MASTER
+HEIGHT 1050.000000
+185209.482965     8258937.000000
+185227.247876     8258921.242035
+185237.987705     8258911.314926
+185254.381098     8258899.559295
+185269.493083     8258890.924826
+185279.594750     8258882.244733
+185299.142765     8258868.012174
+185316.133428     8258859.394813
+185330.653985     8258846.995714
+185343.858080     8258841.476703
+185357.044263     8258837.837533
+185372.080296     8258837.348039
+185385.266479     8258833.708869
+185409.081494     8258832.045726
+185424.158427     8258827.170182
+185443.583756     8258826.094245
+185460.574419     8258817.476883
+185476.938984     8258808.853820
+185493.303159     8258800.231519
+185509.667342     8258791.608452
+185522.900648     8258782.956876
+185534.880993     8258774.293890
+185548.746239     8258765.021655
+185561.985386     8258755.743718
+185575.212463     8258747.719263
+185587.784236     8258742.820907
+185600.993790     8258736.675532
+185617.949401     8258731.817096
+185639.294684     8258726.372984
+185654.997715     8258721.503141
+185672.602789     8258714.144966
+185689.587611     8258706.153965
+185702.779635     8258701.888435
+185719.109148     8258697.024297
+185741.033795     8258696.597531
+185763.619601     8258692.416777
+185779.316785     8258688.174060
+185793.135290     8258683.914235
+185806.959643     8258679.027285
+185822.030345     8258674.778862
+185838.991797     8258669.294066
+185859.078667     8258664.464143
+185882.940415     8258657.789355
+185903.665065     8258651.712413
+185922.505196     8258646.244724
+185940.736750     8258638.892253
+185957.071721     8258633.401752
+185972.195388     8258623.514563
+185989.800468     8258616.155623
+186015.575947     8258605.739017
+186034.451130     8258596.512403
+186048.937016     8258587.872232
+186062.164093     8258579.847777
+186074.103926     8258575.570080
+186087.342692     8258566.292140
+186101.810666     8258559.531811
+186116.881751     8258555.283392
+186142.604655     8258550.504792
+186160.209729     8258543.146616
+186173.402142     8258538.880325
+186187.846746     8258534.626201
+186204.170035     8258530.388420
+186219.896430     8258523.013137
+186243.752720     8258516.964713
+186263.213105     8258512.129467
+186278.284193     8258507.880666
+186291.505433     8258500.482189
+186303.462789     8258494.325411
+186316.666498     8258488.806779
+186332.363685     8258484.563679
+186351.794859     8258482.860999
+186364.360788     8258478.589385
+186379.390980     8258478.726251
+186393.806376     8258477.604310
+186413.232091     8258476.527994
+186432.025480     8258476.072715
+186448.945653     8258474.973582
+186464.613629     8258473.863047
+186477.173714     8258470.218176
+186493.491541     8258466.607141
+186507.310046     8258462.347316
+186521.204121     8258449.942512
+186525.745701     8258433.066504
+186525.880073     8258418.656781
+186526.026129     8258402.993955
+186520.518625     8258389.159270
+186509.386006     8258374.020153
+186497.604300     8258361.381543
+186487.718416     8258346.880575
+186483.445965     8258334.936759
+186474.806817     8258321.073939
+186464.423365     8258292.783906
+186463.293475     8258279.615497
+186452.758504     8258267.615036
+186447.268144     8258251.900885
+186435.462688     8258241.768094
+186426.788870     8258231.664203
+186408.633265     8258230.872081
+186393.562558     8258235.120886
+186383.460510     8258243.800976
+186372.094582     8258253.722383
+186362.578118     8258266.793846
+186353.716968     8258276.738062
+186343.574408     8258289.803440
+186332.840420     8258299.104189
+186315.211973     8258308.968952
+186301.405150     8258311.976057
+186284.537176     8258307.436415
+186266.469583     8258297.246984
+186250.877560     8258290.212543
+186234.664896     8258282.546038
+186223.474233     8258273.672438
+186212.968095     8258258.539025
+186198.698756     8258243.998141
+186188.801569     8258230.750279
+186177.042852     8258215.605460
+186168.386563     8258203.621724
+186157.857054     8258190.994517
+186146.742340     8258173.976324
+186138.068143     8258163.872047
+186118.783026     8258149.911901
+186108.241833     8258138.537797
+186097.671427     8258130.296257
+186078.357099     8258119.468677
+186061.541704     8258109.290648
+186039.084051     8258099.687653
+186022.854243     8258093.900614
+186009.708953     8258093.154499
+185992.208658     8258089.235513
+185969.663752     8258089.030217
+185950.841148     8258092.618443
+185927.634709     8258096.166368
+185910.070529     8258099.139258
+185893.747243     8258103.376657
+185874.936324     8258105.711781
+185861.129501     8258108.718886
+185841.071846     8258110.415861
+185827.973297     8258104.657335
+185817.432103     8258093.283231
+185808.184386     8258077.534865
+185801.406393     8258065.568233
+185787.932959     8258032.864405
+185778.673559     8258018.368759
+185761.957484     8257997.539932
+185740.208101     8257979.171689
+185731.528059     8257969.694155
+185714.127465     8257955.124374
+185700.455013     8257943.721756
+185684.283625     8257931.669969
+185665.718086     8257907.691087
+185654.544949     8257896.938024
+185640.843289     8257888.667589
+185628.985249     8257884.173951
+185610.308705     8257872.098969
+185595.395740     8257859.431846
+185579.844610     8257848.012121
+185568.624357     8257842.270699
+185555.525804     8257836.512556
+185539.927936     8257830.104858
+185521.859965     8257819.915041
+185507.491306     8257816.024954
+185486.889347     8257808.944893
+185463.191177     8257798.077775
+185443.812204     8257794.141682
+185431.322223     8257790.268703
+185416.924357     8257789.510799
+185393.793864     8257784.914513
+185362.528024     8257779.616968
+185343.775527     8257775.686961
+185316.273267     8257769.797274
+185293.142774     8257765.200988
+185266.840129     8257764.961474
+185241.801750     8257763.480263
+185223.049257     8257759.549875
+185202.418082     8257755.602761
+185179.914074     8257751.011798
+185152.405587     8257745.748850
+185126.143839     8257741.123668
+185105.489297     8257739.682377
+185087.415481     8257730.119302
+185072.449935     8257723.090949
+185052.497441     8257713.510766
+185026.340854     8257697.608426
+184992.698764     8257678.505092
+184970.287848     8257663.890069
+184955.351516     8257653.728769
+184943.540217     8257644.222721
+184929.867765     8257632.820103
+184918.091900     8257619.555133
+184893.228788     8257599.278532
+184867.048830     8257585.882397
+184846.540345     8257568.778280
+184828.501585     8257555.455898
+184809.280732     8257534.604262
+184787.519668     8257517.488740
+184758.892973     8257497.804662
+184734.609605     8257482.545794
+184720.902097     8257474.902483
+184699.082610     8257464.052091
+184684.760692     8257455.149594
+184671.064870     8257446.253181
+184656.748793     8257436.724324
+184639.939242     8257425.919553
+184619.413231     8257410.694899
+184600.168625     8257392.349465
+184579.660140     8257375.245348
+184559.754384     8257360.653138
+184535.453490     8257347.273732
+184498.006923     8257333.148207
+184468.063385     8257320.344214
+184446.876220     8257308.873166
+184429.446411     8257297.436333
+184411.395966     8257285.367053
+184389.582319     8257273.890300
+184367.739461     8257265.546113
+184347.757756     8257259.098496
+184329.666605     8257251.414885
+184303.480997     8257238.645112
+184263.511742     8257226.376619
+184233.539374     8257216.705195
+184211.690676     8257208.987368
+184186.710719     8257201.241027
+184156.738352     8257191.569603
+184113.579419     8257185.537345
+184086.709098     8257179.026999
+184064.257477     8257168.797646
+184049.906348     8257163.027714
+184024.300098     8257155.276053
+183990.552656     8257147.449874
+183966.198989     8257139.709236
+183948.716411     8257133.910790
+183930.590205     8257129.986486
+183910.555917     8257129.177639
+183888.051908     8257124.586676
+183868.638070     8257124.409891
+183850.488496     8257122.991411
+183831.712633     8257121.567227
+183812.960137     8257117.637221
+183797.935789     8257116.873612
+183784.790499     8257116.127497
+183769.134209     8257115.984929
+183749.099921     8257115.176082
+183734.069921     8257115.039218
+183710.898534     8257114.828217
+183698.373502     8257114.714163
+183685.848469     8257114.600109
+183667.060921     8257114.429028
+183652.025079     8257114.918523
+183626.975015     8257114.690415
+183609.445887     8257113.904380
+183594.456591     8257109.381846
+183575.744992     8257101.066172
+183557.000000     8257092.907279
+END
+LINE3D-MASTER
+HEIGHT 1050.000000
+183557.000000     8256961.170905
+183567.027948     8256961.262221
+183593.330401     8256961.501733
+183628.400530     8256961.821085
+183657.213984     8256961.457050
+183676.627822     8256961.633834
+183700.431148     8256961.224176
+183724.866608     8256960.193478
+183746.797100     8256959.139970
+183767.475204     8256958.075058
+183783.763434     8256957.596967
+183801.304438     8256957.129901
+183823.861216     8256956.082479
+183853.921218     8256956.356208
+183890.881710     8256955.439564
+183924.710945     8256954.494407
+183952.277854     8256953.492225
+183975.489946     8256949.317556
+184001.798431     8256948.930711
+184030.646941     8256944.807368
+184044.471099     8256939.920798
+184056.996132     8256940.034852
+184074.583873     8256934.555759
+184096.543573     8256930.370068
+184116.636092     8256924.913784
+184139.216241     8256921.360156
+184159.929209     8256916.535935
+184172.512664     8256910.384859
+184185.710724     8256905.492588
+184205.791749     8256901.289407
+184230.268102     8256895.873425
+184260.913496     8256900.538525
+184291.564735     8256904.576882
+184317.773905     8256914.840451
+184349.712776     8256915.131290
+184384.150770     8256916.071681
+184419.846998     8256916.396734
+184444.862011     8256920.383767
+184473.611392     8256926.911224
+184507.996808     8256933.490003
+184546.759836     8256940.735440
+184574.244955     8256948.504211
+184600.489177     8256955.008855
+184624.871864     8256959.616926
+184651.174509     8256959.856440
+184674.942782     8256963.205707
+184699.325852     8256967.813782
+184720.612719     8256968.634035
+184739.388582     8256970.058219
+184756.923551     8256970.217894
+184772.579842     8256970.360461
+184795.751228     8256970.571462
+184815.164875     8256970.748244
+184830.195067     8256970.885111
+184848.321079     8256974.809795
+184865.803470     8256980.607857
+184886.996858     8256991.452548
+184913.808756     8257004.228024
+184932.473618     8257017.555726
+184946.795536     8257026.458223
+184959.203723     8257039.102537
+184979.127006     8257051.815285
+184991.611142     8257056.315006
+185015.373574     8257060.290634
+185045.984108     8257068.714660
+185077.887732     8257072.764804
+185105.367007     8257081.160317
+185134.162743     8257082.675743
+185158.557498     8257086.030715
+185174.202103     8257087.426385
+185189.191402     8257091.948536
+185204.812637     8257095.850412
+185228.528332     8257104.838066
+185242.259203     8257109.975937
+185254.099332     8257116.349416
+185275.948034     8257124.066861
+185293.377839     8257135.504076
+185308.958181     8257143.791237
+185321.413106     8257151.423524
+185335.747094     8257159.072539
+185351.982742     8257164.233218
+185373.848971     8257170.071200
+185397.014513     8257170.908943
+185415.169739     8257171.700680
+185427.694772     8257171.814734
+185440.231490     8257170.675685
+185453.423899     8257166.409777
+185465.948932     8257166.523831
+185487.826842     8257171.109093
+185502.160445     8257178.758487
+185527.122875     8257188.384290
+185544.593581     8257195.435456
+185562.064283     8257202.487003
+185576.427479     8257207.003836
+185593.289229     8257212.169834
+185611.433153     8257214.214676
+185635.833749     8257216.943288
+185657.746715     8257217.769243
+185677.786461     8257217.951726
+185693.442751     8257218.094294
+185715.999724     8257217.046491
+185730.403435     8257217.177652
+185744.151836     8257220.435678
+185764.783007     8257224.383174
+185789.774649     8257230.876412
+185812.255291     8257237.973198
+185835.988895     8257245.081394
+185864.088424     8257254.109351
+185890.958745     8257260.619697
+185911.619131     8257261.434245
+185927.240366     8257265.336120
+185944.769494     8257266.122155
+185964.177679     8257266.925684
+185986.722584     8257267.130980
+186013.651327     8257267.376195
+186034.955721     8257266.316986
+186051.279006     8257262.079587
+186071.319135     8257262.262074
+186092.611843     8257262.455968
+186115.782847     8257262.666965
+186137.689968     8257264.119662
+186162.740033     8257264.347770
+186184.032741     8257264.541663
+186205.951548     8257264.741258
+186224.124683     8257263.653535
+186242.958969     8257258.812589
+186261.125881     8257258.351223
+186278.046433     8257257.252476
+186304.354922     8257256.865248
+186323.768569     8257257.042030
+186348.192535     8257257.264437
+186375.121278     8257257.509653
+186408.939018     8257257.817600
+186425.847506     8257257.971570
+186441.538849     8257254.355213
+186459.109256     8257250.755583
+186476.017744     8257250.909554
+186493.553095     8257251.069232
+186512.966742     8257251.246014
+186536.764227     8257251.462716
+186554.919833     8257252.254839
+186575.551008     8257256.201952
+186589.919663     8257260.092421
+186603.059494     8257261.464900
+186618.089304     8257261.601763
+186642.513270     8257261.824170
+186666.310755     8257262.040872
+186684.478046     8257261.579892
+186698.934338     8257256.072283
+186717.762780     8257251.858079
+186732.798434     8257251.368199
+186747.863678     8257247.746140
+186765.398647     8257247.905815
+186781.054937     8257248.048383
+186796.085129     8257248.185249
+186811.741420     8257248.327817
+186829.890802     8257249.746296
+186850.545730     8257251.187208
+186867.448373     8257251.967920
+186883.731145     8257252.116193
+186900.013534     8257252.264462
+186912.544411     8257251.751773
+186935.797587     8257243.191821
+186958.435970     8257233.372679
+186970.381642     8257228.469004
+186986.090510     8257222.973184
+187003.666376     8257218.747191
+187023.764927     8257212.664548
+187042.634269     8257204.064294
+187061.474396     8257198.596988
+187075.930688     8257193.089379
+187099.148812     8257188.288352
+187119.855936     8257184.090873
+187149.950989     8257180.605677
+187170.652654     8257177.034561
+187186.320630     8257175.924026
+187199.506813     8257172.284856
+187224.562719     8257171.886604
+187240.845108     8257172.034873
+187270.852913     8257177.946994
+187292.110183     8257181.900191
+187305.876114     8257183.278371
+187333.390441     8257187.914959
+187355.274192     8257191.873861
+187379.662724     8257195.855190
+187408.464687     8257196.743876
+187429.130914     8257196.932065
+187447.327034     8257193.338516
+187464.868226     8257192.871834
+187482.438250     8257189.272202
+187501.857738     8257188.822624
+187531.929425     8257187.843251
+187557.646867     8257183.691396
+187584.587296     8257182.683509
+187617.157915     8257182.353687
+187648.470496     8257182.638822
+187664.115101     8257184.034492
+187675.967297     8257189.154872
+187692.179579     8257196.821374
+187710.259239     8257205.757707
+187726.459835     8257214.677311
+187743.919237     8257222.981582
+187763.894716     8257230.055938
+187783.233179     8257238.377320
+187800.674291     8257248.561047
+187814.961538     8257261.222473
+187838.583373     8257280.234562
+187858.507038     8257292.947313
+187879.032667     8257308.171963
+187898.962176     8257320.257972
+187914.542515     8257328.545515
+187925.721110     8257338.672215
+187938.802898     8257346.310210
+187953.727165     8257357.724227
+187965.532624     8257367.856635
+187981.739060     8257376.149879
+188001.651044     8257390.115350
+188012.232748     8257397.104166
+188029.083578     8257403.523274
+188040.262174     8257413.649974
+188052.020891     8257428.794792
+188060.068993     8257438.892985
+188073.056542     8257456.555029
+188081.730739     8257466.659306
+188091.025194     8257477.395644
+188108.396197     8257495.097604
+188118.322595     8257505.212901
+188126.370694     8257515.311476
+188143.103914     8257534.260837
+188156.133123     8257547.537220
+188164.168775     8257558.888509
+188178.350863     8257582.827092
+188192.532182     8257606.766051
+188202.447659     8257618.134458
+188224.150301     8257641.515111
+188240.321689     8257653.566897
+188262.141177     8257664.417290
+188283.334565     8257675.261981
+188299.541006     8257683.554843
+188312.657085     8257687.433523
+188328.933629     8257688.208535
+188345.837041     8257688.988872
+188365.250688     8257689.165654
+188388.427533     8257688.750291
+188414.144593     8257684.598433
+188433.594057     8257681.016297
+188448.658540     8257677.393849
+188464.355728     8257673.150749
+188478.765661     8257672.655554
+188498.190994     8257671.579234
+188524.494021     8257671.818751
+188545.154021     8257672.633679
+188560.172531     8257674.023265
+188583.888605     8257683.011306
+188596.337689     8257691.269953
+188607.533811     8257699.517190
+188621.171589     8257714.679119
+188641.129542     8257723.632938
+188662.346301     8257731.971424
+188677.967539     8257735.872917
+188692.945149     8257741.648554
+188706.687327     8257745.532935
+188719.200674     8257746.900092
+188734.230866     8257747.036958
+188754.896710     8257747.225143
+188776.821358     8257746.798378
+188790.611037     8257745.670739
+188811.323620     8257740.846896
+188823.889549     8257736.575283
+188837.708440     8257732.315079
+188853.411468     8257727.445619
+188874.762598     8257721.374382
+188903.019870     8257713.486410
+188926.301879     8257701.793507
+188945.194587     8257690.687431
+188965.937145     8257682.731030
+188989.201628     8257672.917589
+189009.288112     8257668.088045
+189034.384914     8257663.304126
+189055.086579     8257659.733010
+189073.253869     8257659.272030
+189088.945212     8257655.655672
+189102.734127     8257654.528026
+189129.745046     8257646.001910
+189155.502999     8257637.464767
+189171.229398     8257630.089101
+189185.047524     8257625.828891
+189208.336138     8257613.509634
+189222.792049     8257608.002022
+189239.818146     8257595.625739
+189255.585438     8257583.864788
+189270.047189     8257577.730816
+189285.176700     8257567.216885
+189298.380413     8257561.697870
+189310.905446     8257561.811924
+189324.057341     8257561.931686
+189339.713632     8257562.074254
+189353.479176     8257563.452813
+189377.891457     8257564.928322
+189406.657982     8257569.576313
+189438.555765     8257574.252817
+189459.848473     8257574.446710
+189478.647707     8257573.364689
+189501.239350     8257568.557957
+189530.146091     8257558.169482
+189549.613084     8257552.707501
+189564.718461     8257544.699768
+189589.867845     8257534.277078
+189610.598717     8257527.573780
+189631.341275     8257519.617379
+189658.977528     8257511.096957
+189678.467889     8257503.129154
+189692.953011     8257494.488977
+189706.818639     8257485.216745
+189723.188662     8257475.967318
+189741.496169     8257460.469873
+189764.198817     8257443.759241
+189788.106920     8257432.072421
+189805.138863     8257419.069395
+189824.698567     8257403.583352
+189844.240741     8257389.977154
+189863.812131     8257373.238008
+189886.492172     8257359.033588
+189909.224031     8257339.190391
+189923.205740     8257317.387892
+189937.141477     8257300.597428
+189950.473717     8257281.295432
+189965.017261     8257266.390125
+189980.784556     8257254.628792
+189993.408904     8257244.092431
+190006.039101     8257232.928944
+190019.928096     8257221.150890
+190032.605029     8257204.975376
+190045.270274     8257190.053347
+190055.430363     8257175.108124
+190064.367463     8257157.019315
+190073.901453     8257142.068390
+190084.763589     8257118.984275
+190091.821628     8257100.878355
+190094.484529     8257083.985239
+190094.648112     8257066.442951
+190095.478690     8257044.520696
+190095.659803     8257025.098563
+190095.208972     8257006.297471
+END
+LINE3D
+HEIGHT 1040.000000
+186139.767052     8258937.000000
+186161.018099     8258926.612199
+186178.014603     8258917.368477
+186190.592218     8258911.843761
+186208.841301     8258902.611446
+186223.941215     8258895.230458
+186242.793028     8258888.510049
+186264.822839     8258876.805743
+186283.071923     8258867.573428
+186297.545745     8258860.185974
+186312.681093     8258849.046065
+186332.205745     8258837.318947
+186353.591928     8258827.488785
+186372.490481     8258815.755965
+186392.015133     8258804.028847
+186404.621959     8258795.371566
+186415.367629     8258784.818097
+186427.980295     8258775.534456
+186441.236590     8258764.376671
+186450.712150     8258755.691641
+186462.757141     8258740.137168
+186476.019277     8258728.353024
+186489.919575     8258715.321863
+186509.455916     8258702.341260
+186521.495058     8258687.413912
+186531.637625     8258674.347769
+186544.308714     8258658.798997
+186559.496644     8258642.020318
+186572.735409     8258632.742378
+186583.457716     8258624.694350
+186594.180015     8258616.647086
+186605.522579     8258609.231119
+186626.978866     8258591.883106
+186643.987059     8258581.385900
+186657.945398     8258562.089606
+186671.272180     8258543.413974
+186680.138789     8258532.843394
+186685.265953     8258520.358758
+186692.874145     8258510.402750
+186703.695767     8258491.704306
+186712.627026     8258474.241857
+186720.879225     8258462.412091
+186727.287798     8258446.806293
+186731.829374     8258429.930667
+186736.335902     8258416.813583
+186736.470273     8258402.403860
+186735.340380     8258389.235834
+186726.034240     8258379.752598
+186716.763155     8258366.510055
+186702.441234     8258357.607940
+186691.911726     8258344.980733
+186678.894587     8258330.450869
+186662.752410     8258315.266517
+186653.463796     8258303.903819
+186640.365247     8258298.145293
+186626.007892     8258293.002100
+186610.972241     8258293.491598
+186602.070194     8258307.821481
+186590.002215     8258325.882163
+186577.348652     8258339.551472
+186563.518462     8258345.064399
+186551.040167     8258339.938317
+186540.522344     8258326.058008
+186533.844049     8258303.440964
+186514.031771     8258278.824316
+186502.852793     8258268.697612
+186484.843241     8258252.243047
+186474.893476     8258244.633572
+186458.715864     8258233.208142
+186449.415569     8258223.098164
+186439.495015     8258212.356124
+186418.418468     8258188.981555
+186403.558086     8258170.675662
+186385.501796     8258159.233124
+186363.582990     8258159.033529
+186347.259704     8258163.270928
+186325.955314     8258164.329755
+186305.283243     8258164.768309
+186289.673690     8258159.613714
+186278.453819     8258153.872296
+186262.873477     8258145.585135
+186251.653224     8258139.843714
+186238.642305     8258124.687875
+186227.463331     8258114.560789
+186215.652032     8258105.054741
+186203.882011     8258091.163029
+186197.092329     8258080.449882
+186186.556980     8258068.449035
+186170.964953     8258061.414977
+186159.803505     8258049.408429
+186144.246534     8258038.615063
+186126.184786     8258027.798889
+186110.668707     8258012.620239
+186092.033060     8257996.159589
+186077.710757     8257987.257472
+186056.482698     8257980.171709
+186044.630502     8257975.051329
+186029.682482     8257966.143513
+186009.718306     8257957.816051
+185984.141076     8257946.931822
+185961.075236     8257935.443285
+185945.524105     8257924.023559
+185929.949605     8257915.110039
+185914.989521     8257907.454940
+185899.391653     8257901.047242
+185876.319586     8257890.185444
+185858.240312     8257881.248732
+185835.788499     8257871.019377
+185820.869694     8257858.978614
+185802.181461     8257848.157118
+185784.125175     8257836.714198
+185771.055834     8257827.823489
+185757.324959     8257822.686001
+185743.617455     8257815.042309
+185728.089695     8257801.116378
+185709.477415     8257782.149906
+185694.599121     8257765.723854
+185684.052468     8257754.976113
+185662.905817     8257739.119395
+185650.445052     8257732.113468
+185636.111445     8257724.464456
+185610.510852     8257716.085668
+185591.178994     8257707.137933
+185566.866033     8257695.011626
+185543.144497     8257686.650331
+185518.779335     8257680.162797
+185488.759848     8257675.503397
+185461.877843     8257670.246154
+185437.506841     8257664.384980
+185415.008291     8257659.167653
+185389.384705     8257653.295456
+185365.639802     8257647.439984
+185346.260825     8257643.504273
+185330.019332     8257638.970336
+185316.247565     8257638.218134
+185302.510846     8257633.707388
+185286.269353     8257629.173452
+185264.397284     8257623.961830
+185236.303595     8257614.307513
+185209.444960     8257606.544064
+185189.480780     8257598.216984
+185170.780866     8257588.648208
+185148.949693     8257579.050918
+185117.736431     8257568.114985
+185090.953745     8257552.206944
+185061.109526     8257528.752153
+185031.248164     8257507.176828
+184995.738695     8257486.803663
+184970.208588     8257470.907028
+184954.663302     8257458.860560
+184941.611490     8257448.090007
+184929.168248     8257439.205000
+184914.266587     8257425.284771
+184898.112728     8257411.353139
+184878.827229     8257397.392990
+184861.450002     8257380.317387
+184840.315033     8257363.207948
+184821.035761     8257348.621060
+184804.255418     8257334.684106
+184789.968552     8257322.022684
+184778.789578     8257311.895598
+184760.107190     8257300.447359
+184739.598705     8257283.343243
+184722.806680     8257270.659009
+184708.508129     8257259.250689
+184687.379004     8257241.514508
+184671.213460     8257228.835979
+184653.186382     8257214.260876
+184631.390265     8257200.904278
+184615.207195     8257190.105212
+184598.409326     8257178.047720
+184582.266771     8257162.862982
+184569.238326     8257149.586606
+184554.922249     8257140.057750
+184534.425449     8257121.700531
+184522.573253     8257116.580150
+184510.124170     8257108.321503
+184498.266133     8257103.827483
+184478.308180     8257094.873664
+184464.583146     8257089.109816
+184447.732699     8257082.690712
+184433.439992     8257070.655650
+184424.128008     8257061.799157
+184424.250698     8257048.642154
+184426.872320     8257036.134702
+184441.323151     8257031.253840
+184458.875646     8257029.534052
+184480.173816     8257029.101199
+184493.951428     8257029.226659
+184512.107033     8257030.018782
+184530.836159     8257036.454993
+184547.083496     8257040.362187
+184560.814371     8257045.499675
+184575.171341     8257050.643246
+184587.029381     8257055.136884
+184605.172919     8257057.182106
+184623.322687     8257058.600206
+184646.459018     8257062.570514
+184663.958935     8257066.489114
+184688.312793     8257074.229754
+184706.989337     8257086.304735
+184726.286139     8257099.011778
+184741.884006     8257105.419476
+184762.474285     8257113.752257
+184789.332920     8257121.515705
+184811.819785     8257127.986135
+184830.572281     8257131.916141
+184848.095565     8257133.328919
+184864.342902     8257137.236113
+184884.371345     8257138.671702
+184918.072240     8257151.509910
+184938.621621     8257164.228359
+184959.779958     8257178.831975
+184981.593604     8257190.308728
+185005.917869     8257201.181929
+185034.649724     8257209.588848
+185053.402217     8257213.519237
+185069.655394     8257216.800071
+185088.407891     8257220.730077
+185109.033221     8257225.303933
+185122.729040     8257234.200729
+185138.321067     8257241.234787
+185151.390405     8257250.125877
+185163.184178     8257261.511388
+185178.091684     8257274.804875
+185193.601917     8257290.610268
+185211.020041     8257303.300203
+185227.858803     8257310.972409
+185247.243239     8257314.281757
+185271.005672     8257318.257384
+185294.142003     8257322.227692
+185319.777269     8257326.847169
+185345.395393     8257333.346113
+185376.632025     8257341.775841
+185406.627762     8257348.941060
+185429.102560     8257356.664588
+185449.728272     8257361.238448
+185469.692070     8257369.565525
+185489.697146     8257373.506937
+185515.953049     8257378.758861
+185539.662900     8257388.373259
+185558.409556     8257392.929625
+185576.571006     8257393.095005
+185594.105975     8257393.254680
+185615.357786     8257397.834241
+185637.218170     8257404.298965
+185658.434547     8257412.637448
+185678.357830     8257425.350196
+185697.683843     8257434.924673
+185715.178297     8257439.470019
+185730.834588     8257439.612587
+185750.868489     8257440.421813
+185779.670452     8257441.310500
+185804.053140     8257445.918571
+185829.688789     8257450.538051
+185859.684526     8257457.703271
+185897.183675     8257466.190025
+185928.420307     8257474.619753
+185952.176895     8257479.222123
+185972.831437     8257480.663414
+185994.738559     8257482.116111
+186023.511310     8257486.137363
+186049.773058     8257490.762545
+186075.402484     8257496.008382
+186099.756342     8257503.749021
+186130.372334     8257511.546684
+186159.110030     8257519.327244
+186182.843252     8257526.435436
+186207.834894     8257532.928674
+186232.200055     8257539.416208
+186265.976899     8257544.109823
+186295.375749     8257548.136776
+186321.637497     8257552.761957
+186345.394085     8257557.364327
+186372.908031     8257562.000912
+186409.184193     8257567.343699
+186434.169994     8257574.463297
+186457.932423     8257578.439307
+186475.455711     8257579.851702
+186491.106157     8257580.621012
+186509.267607     8257580.786392
+186525.549996     8257580.934661
+186538.086713     8257579.795612
+186555.054006     8257573.684456
+186570.716138     8257573.200663
+186588.929787     8257567.727269
+186616.525908     8257563.592522
+186630.941304     8257562.470581
+186644.730598     8257561.343321
+186659.766634     8257560.853445
+186682.955164     8257559.184979
+186697.359257     8257559.316144
+186717.399003     8257559.498628
+186741.782073     8257564.106702
+186774.306337     8257568.788911
+186798.694868     8257572.770240
+186817.470732     8257574.194423
+186833.127022     8257574.336991
+186848.789157     8257573.852816
+186870.122758     8257569.661424
+186894.593465     8257564.871421
+186914.053850     8257560.036176
+186930.347924     8257558.931342
+186943.552016     8257553.412713
+186964.311722     8257543.576464
+186988.829163     8257533.774815
+187004.526350     8257529.531715
+187018.965113     8257525.903952
+187030.904561     8257521.626633
+187051.049849     8257510.531962
+187066.138464     8257504.403699
+187079.359703     8257497.005221
+187090.690578     8257490.842739
+187107.049298     8257482.846418
+187124.677746     8257472.981656
+187145.419922     8257465.025251
+187157.985851     8257460.753638
+187170.569306     8257454.602562
+187181.894337     8257449.066822
+187197.649947     8257438.558592
+187222.085598     8257437.527896
+187235.236729     8257437.647651
+187247.755917     8257438.388448
+187263.991951     8257443.548748
+187282.153019     8257443.714124
+187306.588670     8257442.683428
+187319.739801     8257442.803184
+187334.143894     8257442.934349
+187349.173704     8257443.071212
+187361.687051     8257444.438368
+187377.934770     8257448.345566
+187404.828457     8257452.350089
+187424.827693     8257456.917861
+187443.574345     8257461.474610
+187461.062576     8257466.646313
+187482.905430     8257474.990882
+187502.898821     8257480.185397
+187527.281508     8257484.793468
+187544.155326     8257488.706367
+187557.265561     8257493.211790
+187575.983001     8257500.901104
+187597.199761     8257509.239590
+187615.911360     8257517.555264
+187635.289955     8257521.490971
+187650.905349     8257526.019207
+187664.613236     8257533.662903
+187685.203132     8257541.995681
+187703.282788     8257550.932396
+187717.570036     8257563.593821
+187733.747265     8257575.019248
+187747.407649     8257587.674965
+187765.452254     8257600.370605
+187784.134642     8257611.818844
+187795.319843     8257621.319191
+187806.515965     8257629.566428
+187815.810420     8257640.302767
+187828.224447     8257652.320721
+187839.959798     8257669.971362
+187849.230886     8257683.213523
+187857.249773     8257696.444664
+187865.882313     8257710.934219
+187874.562354     8257720.411754
+187885.092245     8257733.038964
+187897.488747     8257746.936381
+187911.119920     8257762.724663
+187924.130839     8257777.880502
+187932.799195     8257788.611139
+187942.105335     8257798.094375
+187952.020048     8257809.462775
+187962.520727     8257825.222550
+187973.084906     8257834.090829
+187997.403712     8257845.590393
+188020.522134     8257851.440161
+188037.396334     8257855.353063
+188049.909681     8257856.720220
+188077.417403     8257861.983161
+188091.154501     8257866.494292
+188108.027937     8257870.407187
+188126.774589     8257874.963936
+188149.272757     8257880.181260
+188166.141113     8257884.720904
+188182.991178     8257891.140005
+188198.577360     8257898.800805
+188209.159833     8257905.789245
+188220.970368     8257915.295287
+188240.841451     8257933.646808
+188255.725586     8257949.446500
+188273.131642     8257963.389534
+188285.569041     8257972.901283
+188302.384818     8257983.079316
+188318.591258     8257991.372178
+188339.216207     8257995.946030
+188362.341238     8258001.169062
+188375.486524     8258001.915560
+188394.274073     8258002.086641
+188412.435523     8258002.252021
+188425.621710     8257998.612469
+188445.047039     8257997.536531
+188469.517746     8257992.746528
+188483.933521     8257991.624973
+188497.722436     8257990.497327
+188510.885252     8257989.363980
+188523.416125     8257988.851674
+188537.217490     8257986.470932
+188558.526960     8257984.785356
+188582.950926     8257985.007763
+188598.572164     8257988.909255
+188616.727770     8257989.701378
+188634.228068     8257993.619981
+188648.631397     8257993.751139
+188668.033359     8257995.181024
+188686.177283     8257997.225867
+188699.322573     8257997.971982
+188724.331741     8258002.585758
+188739.952976     8258006.487633
+188755.609267     8258006.630200
+188768.128458     8258007.370615
+188792.552424     8258007.593021
+188806.330418     8258007.718485
+188822.653704     8258003.481086
+188837.683896     8258003.617953
+188850.214769     8258003.105647
+188865.279252     8257999.483198
+188880.321126     8257998.367344
+188894.134176     8257994.733500
+188910.422406     8257994.255409
+188924.211321     8257993.127763
+188937.397504     8257989.488594
+188951.848338     8257984.607349
+188976.342409     8257977.311905
+188993.917892     8257973.085909
+189017.171454     8257964.525578
+189036.684421     8257954.051562
+189054.921819     8257946.072349
+189071.274316     8257938.702386
+189086.374613     8257931.321401
+189100.818838     8257927.066892
+189116.533551     8257920.944329
+189134.741738     8257916.097681
+189152.979141     8257908.118086
+189165.556751     8257902.593752
+189181.265624     8257897.097550
+189194.457651     8257892.831637
+189220.807416     8257888.059127
+189233.993599     8257884.419958
+189262.256715     8257875.905244
+189280.424006     8257875.444264
+189296.718080     8257874.339430
+189313.041366     8257870.102031
+189332.490066     8257866.519888
+189351.318511     8257862.305302
+189367.009853     8257858.688944
+189390.228363     8257853.887538
+189412.182222     8257850.328208
+189427.258387     8257845.453039
+189444.834634     8257841.227050
+189461.848283     8257830.103863
+189476.948582     8257822.722496
+189494.524830     8257818.496507
+189515.858435     8257814.304733
+189542.839374     8257808.911557
+189567.350974     8257799.736268
+189588.690419     8257794.918134
+189612.563475     8257786.989857
+189637.069230     8257778.441311
+189667.796609     8257774.335078
+189691.055247     8257765.148379
+189715.549321     8257757.852554
+189738.152650     8257751.792719
+189758.239898     8257746.963182
+189771.490348     8257736.432140
+189786.602329     8257727.798053
+189806.115296     8257717.324038
+189824.399436     8257704.332415
+189842.636834     8257696.353202
+189858.386600     8257686.471714
+189880.387200     8257677.899973
+189896.716326     8257673.036214
+189913.004557     8257672.558123
+189939.359401     8257667.158864
+189955.056588     8257662.915764
+189973.223878     8257662.454783
+189991.432066     8257657.608136
+190013.350872     8257657.807730
+190037.189636     8257653.638768
+190060.360641     8257653.849765
+190084.825503     8257649.686504
+190101.739832     8257649.214115
+190119.310239     8257645.614485
+190143.148238     8257641.445516
+190161.362267     8257635.972508
+190178.950200     8257630.493417
+190193.376895     8257628.118752
+190207.827729     8257623.237507
+190220.469607     8257610.821301
+190232.462016     8257600.905598
+190245.133105     8257585.356826
+190256.539547     8257571.049748
+190269.849184     8257554.253582
+190278.101001     8257542.423813
+190291.444927     8257521.868715
+190295.945992     8257509.378378
+190299.246674     8257491.238243
+190300.650773     8257474.960078
+190304.630135     8257451.186874
+190305.432266     8257432.397192
+190305.566638     8257417.987469
+190305.706854     8257402.951003
+190307.146005     8257382.913913
+190308.567626     8257364.756667
+190311.283109     8257342.224781
+190314.554580     8257327.217212
+190319.114068     8257308.461744
+190324.252153     8257294.723999
+190331.286825     8257279.123901
+190335.822942     8257262.874639
+190336.653520     8257240.952384
+190330.519535     8257227.111994
+190323.753610     8257213.892263
+190313.862264     8257200.018041
+190308.430326     8257178.038759
+190307.364317     8257157.978857
+190308.804233     8257137.941773
+190313.322060     8257123.571966
+190308.458562     8257107.863523
+190302.938990     8257095.281937
+190290.571700     8257078.251955
+190276.898866     8257066.849333
+190261.951232     8257057.941139
+190252.680144     8257044.698978
+190247.148887     8257033.370494
+190244.134474     8257020.811720
+190241.775371     8257005.126083
+END
+LINE3D
+HEIGHT 1020.000000
+191271.566073     8258937.000000
+191273.454688     8258936.198941
+191287.917204     8258930.064976
+191308.003684     8258925.235814
+191331.298146     8258912.289433
+191347.047912     8258902.407946
+191373.431967     8258893.876121
+191399.201605     8258884.085875
+191423.098789     8258873.652165
+191439.498023     8258861.270174
+191457.782159     8258848.278933
+191473.549454     8258836.517600
+191492.418796     8258827.917346
+191507.507411     8258821.789082
+191527.640632     8258811.947510
+191542.144048     8258801.427495
+191557.887972     8258792.172367
+191575.562768     8258777.296338
+191583.809508     8258766.092936
+191597.686054     8258755.567977
+191609.081582     8258742.513243
+191622.981498     8258729.482079
+191639.404103     8258714.593883
+191657.699921     8258700.349922
+191670.967898     8258687.939417
+191681.105381     8258675.500405
+191695.040356     8258658.709551
+191707.032765     8258648.793849
+191722.144750     8258640.159380
+191732.925090     8258625.846982
+191745.016821     8258605.280100
+191757.787226     8258579.080913
+191766.689277     8258564.750646
+191782.573414     8258540.459436
+191789.596400     8258526.112441
+191799.124549     8258511.787876
+191806.738579     8258501.205890
+191815.605574     8258490.634932
+191827.615512     8258478.839384
+191845.911333     8258464.595041
+191858.529841     8258454.685040
+191871.774450     8258444.780357
+191881.255859     8258435.468202
+191893.324216     8258417.407907
+191911.689381     8258395.645324
+191921.891131     8258376.314440
+191930.277320     8258350.074947
+191934.186574     8258333.819977
+191935.620645     8258314.409635
+191940.138476     8258300.039446
+191944.686278     8258282.537081
+191948.607218     8258265.029008
+191952.580740     8258241.882164
+191958.971787     8258228.155829
+191964.818524     8258205.652838
+191971.221257     8258190.673400
+191975.739084     8258176.303593
+191983.394774     8258161.335947
+191987.924287     8258145.713037
+192001.314953     8258120.145529
+192014.623826     8258103.349357
+192027.910093     8258089.059396
+192043.654018     8258079.804268
+192058.098243     8258075.549759
+192071.928816     8258070.036835
+192093.220759     8258070.230721
+192117.703148     8258064.187997
+192131.545409     8258057.421588
+192156.677264     8258048.878744
+192176.178545     8258039.657831
+192197.570572     8258029.200926
+192209.591428     8258016.152652
+192224.270108     8257986.837628
+192231.971775     8257966.857565
+192245.345677     8257943.169909
+192255.459028     8257933.236713
+192276.270930     8257917.762072
+192289.522141     8257907.231419
+192300.876005     8257898.562728
+192314.747474     8257888.664136
+192333.610975     8257880.690242
+192358.034177     8257880.912642
+192386.233026     8257879.289801
+192410.692044     8257875.753283
+192426.389231     8257871.510183
+192438.966845     8257865.985467
+192456.057207     8257846.717693
+192466.790812     8257837.416941
+192479.368427     8257831.892225
+192493.209920     8257825.126191
+192514.520154     8257823.440622
+192531.435251     8257822.967857
+192546.476360     8257821.851996
+192562.144336     8257820.741461
+192575.331287     8257817.101916
+192589.155254     8257812.215345
+192602.358964     8257806.696712
+192615.545151     8257803.057160
+192634.385278     8257797.589854
+192653.178671     8257797.134192
+192673.886176     8257792.936717
+192688.928050     8257791.820863
+192706.497692     8257788.221227
+192719.661273     8257787.087886
+192735.323404     8257786.604094
+192748.474536     8257786.723849
+192767.888183     8257786.900632
+192786.049633     8257787.066011
+192799.838548     8257785.938366
+192817.414796     8257781.712376
+192834.364177     8257777.481061
+192855.083368     8257772.030483
+192874.602175     8257760.930108
+192899.125461     8257750.501717
+192917.432967     8257735.004271
+192932.579240     8257722.610870
+192952.098812     8257711.510501
+192964.043719     8257706.606819
+192986.108582     8257691.143589
+192998.071783     8257684.360069
+193017.561379     8257676.392258
+193043.355152     8257664.095814
+193067.274941     8257651.155892
+193081.795880     8257638.756797
+193093.794133     8257628.214352
+193104.539424     8257617.660497
+193114.061729     8257603.962675
+193130.484331     8257589.074860
+193155.101094     8257568.622032
+193179.085912     8257548.790626
+193196.128775     8257534.534491
+193207.530137     8257520.854162
+193218.919053     8257508.426546
+193236.009418     8257489.158390
+193250.623067     8257466.735232
+193265.793474     8257451.835633
+193282.227761     8257435.694716
+193296.772070     8257420.789416
+193310.683671     8257406.505150
+193323.998385     8257389.082617
+193336.014165     8257376.660709
+193344.295957     8257361.698382
+193353.794892     8257350.506764
+193368.930244     8257339.366473
+193382.841845     8257325.082206
+193404.251399     8257312.745839
+193423.776050     8257301.018721
+193440.789699     8257289.895534
+193460.297589     8257280.047885
+193476.679294     8257269.545739
+193493.031791     8257262.175775
+193514.417977     8257252.345230
+193533.299001     8257242.492256
+193556.545954     8257234.558660
+193572.869240     8257230.321262
+193584.814911     8257225.417587
+193599.845103     8257225.554453
+193616.127492     8257225.702722
+193633.042589     8257225.229957
+193658.092653     8257225.458065
+193677.506301     8257225.634847
+193690.037174     8257225.122541
+193703.849456     8257221.489073
+193716.415385     8257217.217459
+193727.758328     8257209.801878
+193742.208394     8257204.921008
+193754.803534     8257197.516829
+193769.897990     8257190.762205
+193790.634707     8257183.432165
+193805.735007     8257176.050798
+193818.944560     8257169.905423
+193833.406312     8257163.771451
+193849.742047     8257158.280957
+193863.560170     8257154.021128
+193877.372456     8257150.387277
+193891.823286     8257145.506415
+193905.600516     8257145.631871
+193918.752412     8257145.751634
+193938.797999     8257145.307757
+193958.217490     8257144.857797
+193973.908833     8257141.241440
+193987.095020     8257137.601887
+194002.166105     8257133.353468
+194016.651991     8257124.713298
+194034.245000     8257118.607839
+194049.994766     8257108.726352
+194062.566539     8257103.827996
+194090.180951     8257097.813793
+194102.746876     8257093.542561
+194127.814470     8257091.890825
+194145.986837     8257090.803477
+194159.138733     8257090.923240
+194176.041380     8257091.703570
+194189.127483     8257098.714809
+194200.986285     8257103.208836
+194213.505473     8257103.949632
+194229.781257     8257104.724254
+194246.070251     8257104.246170
+194260.509400     8257100.618028
+194274.321682     8257096.984559
+194286.846714     8257097.098613
+194309.351488     8257101.689584
+194325.001937     8257102.458511
+194343.783645     8257103.255952
+194356.308677     8257103.370006
+194371.338105     8257103.506866
+194385.162072     8257098.620295
+194398.354864     8257094.354389
+194411.569494     8257087.582648
+194425.383305     8257083.949193
+194446.681093     8257083.516337
+194467.336017     8257084.957631
+194492.999731     8257086.444536
+194515.029542     8257074.740231
+194523.908983     8257062.916559
+194536.539180     8257051.753073
+194561.020804     8257045.710342
+194574.254489     8257037.059152
+194587.504175     8257026.528102
+194596.360249     8257017.210253
+194602.118589     8257004.104951
+194603.487631     8256991.586094
+194612.425499     8256973.496909
+194621.309255     8256961.046481
+194630.200382     8256947.969707
+194642.859789     8256933.673656
+194661.705760     8256927.579606
+194681.891563     8256912.099265
+194690.155826     8256899.016782
+194696.692930     8256869.627621
+194702.509692     8256850.257189
+194707.021678     8256836.513742
+194709.029270     8256822.747490
+194717.907182     8256810.923804
+194726.159763     8256799.094042
+194737.590340     8256782.280765
+194755.867871     8256769.915877
+194774.076823     8256765.069236
+194791.623859     8256763.975812
+194807.285990     8256763.492020
+194819.828549     8256761.726611
+194834.359644     8256748.074399
+194847.001522     8256735.658193
+194857.824290     8256716.959760
+194866.069498     8256705.756726
+194874.925573     8256696.438877
+194891.962591     8256682.809484
+194907.706516     8256673.554356
+194927.220247     8256663.080348
+194940.411510     8256658.814428
+194956.120379     8256653.318608
+194973.069764     8256649.086911
+194988.737739     8256647.976376
+195001.268612     8256647.464070
+195017.000000     8256647.607321
+END
+LINE3D
+HEIGHT 1020.000000
+195017.000000     8256981.784216
+194997.494296     8256985.148664
+194971.770631     8256989.926876
+194957.981715     8256991.054522
+194945.444998     8256992.193570
+194917.181882     8257000.708284
+194897.077872     8257007.417290
+194876.956333     8257016.006142
+194862.476291     8257024.019570
+194852.385545     8257031.446554
+194845.281534     8257054.564508
+194843.875906     8257070.842659
+194843.081148     8257089.005613
+194842.273172     8257108.422038
+194842.109590     8257125.964326
+194841.355725     8257139.741995
+194841.186301     8257157.910643
+194844.796836     8257173.607676
+194849.643569     8257191.195971
+194858.856234     8257210.703263
+194859.366252     8257223.239231
+194859.816318     8257242.040316
+194859.541730     8257271.486505
+194854.367829     8257288.983168
+194849.154559     8257310.865514
+194844.570936     8257332.127179
+194838.812597     8257345.232481
+194832.984150     8257365.856015
+194821.460098     8257392.693347
+194811.270033     8257410.771129
+194801.706831     8257428.854619
+194796.573826     8257441.965615
+194795.749854     8257463.261517
+194791.156078     8257485.775916
+194787.135054     8257513.934780
+194786.883837     8257540.874764
+194786.644302     8257566.562027
+194782.710912     8257585.323196
+194781.957051     8257599.100482
+194777.357431     8257622.241624
+194768.320244     8257650.981607
+194759.395595     8257667.817320
+194751.119643     8257682.153287
+194741.644079     8257690.838700
+194720.217764     8257705.054536
+194702.583093     8257715.545656
+194680.570808     8257725.370499
+194652.921344     8257735.143627
+194625.308462     8257741.157844
+194599.538059     8257750.948083
+194575.607346     8257765.141497
+194550.452121     8257776.190546
+194519.659714     8257787.188264
+194497.022098     8257797.007030
+194482.536212     8257805.647200
+194470.560565     8257813.683433
+194456.064522     8257823.576720
+194433.888658     8257850.943469
+194416.797528     8257870.211618
+194392.146480     8257894.422997
+194370.029035     8257915.524998
+194354.865236     8257929.797861
+194344.751124     8257939.730668
+194328.948776     8257955.250926
+194319.443997     8257967.069286
+194304.876321     8257984.480409
+194289.015551     8258006.265797
+194270.041049     8258026.143209
+194252.347956     8258042.899459
+194237.184157     8258057.172322
+194220.766632     8258071.433770
+194207.487735     8258085.097384
+194191.046839     8258101.865036
+194174.613317     8258118.005960
+194162.579247     8258132.307323
+194151.177881     8258145.988035
+194141.012716     8258161.559625
+194127.738131     8258174.596866
+194117.608021     8258186.409149
+194109.998300     8258196.365143
+194101.723881     8258210.700742
+194094.079107     8258224.415662
+194083.228656     8258246.246674
+194075.567886     8258261.841070
+194064.137312     8258278.653964
+194052.093086     8258294.208444
+194042.576622     8258307.279906
+194029.296196     8258320.943507
+194010.966087     8258338.946782
+193991.956532     8258362.583120
+193976.037340     8258390.633638
+193964.004031     8258404.935391
+193953.890683     8258414.868204
+193938.059124     8258433.521027
+193926.663603     8258446.574996
+193915.894942     8258459.635056
+193900.736219     8258473.281553
+193888.691229     8258488.836025
+193879.818393     8258500.033344
+193874.697838     8258511.891245
+193870.196772     8258524.381582
+193860.060054     8258536.820600
+193854.886149     8258554.317647
+193852.253227     8258568.077822
+193849.596166     8258584.344578
+193848.771432     8258605.640090
+193847.957612     8258625.683257
+193847.788192     8258643.851523
+193848.895097     8258659.525758
+193855.040768     8258672.113045
+193863.720809     8258681.590580
+193874.934457     8258687.958354
+193889.894537     8258695.613836
+193901.717526     8258703.866399
+193911.006136     8258715.229480
+193912.118118     8258730.277348
+193892.634366     8258737.618416
+193872.594620     8258737.435932
+193853.244472     8258730.367652
+193838.887884     8258725.224084
+193827.673472     8258718.856303
+193815.201014     8258713.104243
+193795.892531     8258701.649921
+193779.703616     8258691.477596
+193767.851424     8258686.356834
+193747.295819     8258674.264741
+193732.359867     8258664.103827
+193718.031719     8258655.828451
+193703.048268     8258650.679175
+193682.452528     8258642.973139
+193659.965281     8258636.502706
+193633.668866     8258635.636071
+193610.550437     8258629.787068
+193589.304470     8258624.580765
+193570.551974     8258620.650759
+193551.764425     8258620.479677
+193530.512617     8258615.899734
+193509.231591     8258614.453121
+193484.848518     8258609.845429
+193461.092315     8258605.242680
+193438.582462     8258601.278459
+193416.036792     8258601.073156
+193388.418069     8258607.713733
+193359.498878     8258619.355304
+193334.314439     8258633.537301
+193311.635165     8258647.741346
+193290.846634     8258660.709781
+193271.321218     8258672.436892
+193251.176308     8258683.531949
+193235.403172     8258695.919641
+193219.606666     8258710.813539
+193200.638008     8258730.064209
+193181.628457     8258753.700164
+193166.458050     8258768.599763
+193153.195914     8258780.383908
+193135.532036     8258794.007210
+193113.426272     8258813.856491
+193093.187887     8258834.975603
+193076.712707     8258855.501805
+193064.632665     8258874.815203
+193053.219614     8258889.749017
+193039.916585     8258905.918447
+193024.090867     8258923.944910
+193009.262954     8258937.000000
+END
+LINE3D
+HEIGHT 1020.000000
+186941.659145     8258937.000000
+186951.411983     8258926.917520
+186963.439451     8258913.242128
+186975.466529     8258899.567497
+186991.871987     8258886.559148
+187013.304529     8258871.716573
+187027.860137     8258855.558549
+187041.742913     8258844.406469
+187058.803681     8258828.271257
+187068.969611     8258812.699673
+187077.216351     8258801.496271
+187086.123853     8258786.540406
+187097.513152     8258774.112793
+187107.626889     8258764.179218
+187130.323692     8258748.095329
+187143.521939     8258743.203442
+187155.467232     8258738.299381
+187171.205315     8258729.670614
+187193.252649     8258716.087228
+187205.894527     8258703.671021
+187216.669415     8258689.984223
+187228.655983     8258680.694880
+187245.055218     8258668.312889
+187258.270612     8258661.541154
+187268.384342     8258651.608344
+187279.726900     8258644.193141
+187291.116198     8258631.765529
+187296.283880     8258614.894839
+187300.205198     8258597.387152
+187300.351255     8258581.724326
+187300.514841     8258564.181656
+187295.703544     8258542.834439
+187291.471603     8258526.505334
+187287.210452     8258513.308794
+187283.599152     8258497.611754
+187283.715997     8258485.081493
+187279.460690     8258471.258211
+187270.271395     8258449.244714
+187270.405767     8258434.834991
+187266.881719     8258409.740252
+187268.379675     8258383.438035
+187269.760785     8258369.666078
+187273.032259     8258354.658126
+187273.154945     8258341.501506
+187267.026801     8258327.034756
+187261.571496     8258307.561297
+187256.069832     8258293.100252
+187244.293585     8258279.835278
+187226.892987     8258265.265880
+187213.782753     8258260.760457
+187186.326848     8258249.858739
+187171.378449     8258240.950538
+187157.021476     8258235.807348
+187140.774139     8258231.900154
+187122.624374     8258230.481672
+187103.918619     8258221.539256
+187079.541773     8258216.304825
+187055.784802     8258211.702452
+187038.876314     8258211.548481
+187023.220024     8258211.405914
+187006.264412     8258216.264350
+186986.844542     8258216.713924
+186974.284457     8258220.358796
+186960.472172     8258223.992646
+186943.388033     8258242.634063
+186928.873322     8258254.406420
+186918.110122     8258266.839734
+186905.468244     8258279.255940
+186895.354511     8258289.189132
+186879.604745     8258299.070620
+186857.516511     8258317.040056
+186841.755061     8258328.174647
+186826.011136     8258337.429774
+186812.824953     8258341.068944
+186800.984442     8258334.695461
+186791.046358     8258325.833266
+186780.481798     8258316.964985
+186763.619665     8258311.798983
+186750.480219     8258310.426125
+186740.547980     8258300.937188
+186728.122267     8258290.172336
+186715.151863     8258270.630827
+186707.139199     8258256.773329
+186699.120690     8258243.542574
+186688.573656     8258232.794830
+186678.020777     8258222.673828
+186658.741505     8258208.086940
+186644.396216     8258201.690648
+186618.239629     8258185.788309
+186601.377496     8258180.622307
+186588.284788     8258174.237422
+186570.210972     8258164.674347
+186556.503468     8258157.030654
+186537.850291     8258142.449850
+186520.484746     8258124.121526
+186506.209565     8258110.207002
+186496.932637     8258097.591201
+186495.188330     8258083.164371
+186487.906925     8258058.035417
+186483.692514     8258039.826466
+186477.564370     8258025.359716
+186471.430384     8258011.519326
+186465.904971     8257999.564100
+186454.761046     8257985.678472
+186441.720919     8257973.654816
+186429.318573     8257960.384142
+186419.479430     8257940.870763
+186410.220028     8257926.375500
+186400.293629     8257916.260202
+186387.891287     8257902.989145
+186372.351842     8257890.316317
+186367.482118     8257875.234613
+186376.342889     8257865.290011
+186388.885448     8257863.524603
+186410.195682     8257861.839034
+186425.225874     8257861.975900
+186445.183830     8257870.929336
+186463.251802     8257881.119154
+186478.843828     8257888.153212
+186493.189117     8257894.549503
+186506.299733     8257899.054930
+186520.041911     8257902.939312
+186533.158369     8257906.818378
+186548.738710     8257915.105539
+186583.796963     8257916.677991
+186596.913424     8257920.556675
+186613.781015     8257925.096313
+186631.234573     8257934.027327
+186648.090483     8257939.819685
+186661.833039     8257943.704452
+186676.230909     8257944.461974
+186692.513680     8257944.610246
+186706.326345     8257940.976781
+186719.483320     8257940.469794
+186737.685667     8257936.249506
+186763.320934     8257940.868983
+186777.069334     8257944.127009
+186788.921148     8257949.247386
+186807.661956     8257954.430877
+186825.805880     8257956.475719
+186843.340849     8257956.635394
+186858.458674     8257947.374565
+186870.561705     8257925.554959
+186881.324905     8257913.121645
+186896.448575     8257903.234073
+186914.082860     8257892.743333
+186927.901368     8257888.483125
+186941.678980     8257888.608586
+186956.082691     8257888.739747
+186968.068877     8257879.450401
+186975.694977     8257867.614934
+186986.493229     8257851.422695
+187001.651951     8257837.776198
+187016.716813     8257834.154136
+187023.500650     8257845.494025
+187023.372119     8257859.277388
+187023.237748     8257873.687111
+187022.447684     8257891.223695
+187021.541157     8257921.290542
+187025.140772     8257938.240685
+187033.762390     8257953.983350
+187048.681195     8257966.024113
+187064.290748     8257971.178708
+187084.945672     8257972.620002
+187105.043841     8257966.537356
+187119.500516     8257961.029751
+187132.663332     8257959.896404
+187148.354675     8257956.280046
+187161.570073     8257949.507929
+187174.756639     8257945.868762
+187187.287512     8257945.356456
+187206.753741     8257939.894469
+187223.674297     8257938.795340
+187236.825428     8257938.915095
+187258.106451     8257940.362091
+187271.872377     8257941.740654
+187284.959245     8257948.751899
+187305.555364     8257956.458321
+187319.941931     8257958.468948
+187339.320522     8257962.405038
+187351.125981     8257972.537446
+187370.311778     8257997.148389
+187383.375276     8258006.665840
+187399.605469     8258012.452500
+187422.080266     8258020.176029
+187434.529350     8258028.434676
+187443.823805     8258039.171014
+187452.498005     8258049.274909
+187467.323335     8258071.339727
+187479.725678     8258084.610784
+187492.766190     8258096.634061
+187503.962690     8258104.881684
+187514.521410     8258114.376326
+187526.308961     8258126.388193
+187537.429895     8258142.780413
+187545.425032     8258158.517373
+187554.713646     8258169.880071
+187565.822516     8258187.525007
+187580.103541     8258200.812789
+187598.183197     8258209.749504
+187616.830148     8258224.957047
+187629.279231     8258233.215694
+187642.396075     8258237.094382
+187652.977779     8258244.083197
+187674.153642     8258256.807351
+187694.105754     8258266.387530
+187712.753090     8258281.594694
+187723.973343     8258287.336116
+187733.917267     8258295.571951
+187744.475605     8258305.066589
+187757.498970     8258318.969714
+187773.032574     8258332.268902
+187788.542808     8258348.074296
+187796.584301     8258358.799224
+187807.722764     8258373.311599
+187815.108947     8258387.163391
+187823.783148     8258397.267286
+187833.083444     8258407.377264
+187854.235939     8258422.607241
+187876.699051     8258431.583872
+187891.688347     8258436.106406
+187912.852524     8258450.083662
+187924.680589     8258457.709858
+187947.799775     8258463.559632
+187972.803103     8258468.799768
+187993.428051     8258473.373621
+188015.938669     8258477.337849
+188029.060588     8258480.590169
+188043.423020     8258485.106995
+188055.912997     8258488.980357
+188075.918455     8258492.921772
+188094.091590     8258491.834050
+188115.418586     8258488.269011
+188129.822679     8258488.400176
+188149.862425     8258488.582660
+188165.507030     8258489.978330
+188177.991170     8258494.477669
+188190.486991     8258497.724288
+188219.295177     8258497.986618
+188243.718378     8258498.209018
+188268.768443     8258498.437126
+188285.677696     8258498.591103
+188304.465244     8258498.762184
+188325.131089     8258498.950369
+188343.918637     8258499.121450
+188368.348444     8258498.717497
+188398.449725     8258494.605562
+188417.278170     8258490.390975
+188434.859494     8258485.538619
+188447.425423     8258481.267006
+188462.461455     8258480.777512
+188476.906445     8258476.523009
+188495.108792     8258472.302721
+188512.023120     8258471.830332
+188530.219622     8258468.236786
+188542.750499     8258467.724098
+188557.153828     8258467.855256
+188570.931822     8258467.980719
+188591.597667     8258468.168904
+188606.001760     8258468.300069
+188625.386196     8258471.609417
+188644.788158     8258473.039302
+188659.783298     8258476.935093
+188674.175705     8258478.319361
+188687.923724     8258481.577382
+188707.917497     8258486.771901
+188721.688882     8258487.524100
+188735.431060     8258491.408482
+188752.925514     8258495.953828
+188770.396602     8258503.004997
+188786.626409     8258508.792036
+188799.707432     8258516.430024
+188814.638305     8258527.217688
+188826.455449     8258536.096993
+188840.776984     8258544.999487
+188853.840485     8258554.516555
+188869.455875     8258559.045173
+188884.451015     8258562.940964
+188897.590464     8258564.313440
+188910.086285     8258567.560059
+188935.751524     8258569.047360
+188950.154853     8258569.178518
+188967.736945     8258564.325786
+188988.414472     8258563.261251
+189016.636695     8258559.131823
+189035.465136     8258554.917619
+189049.278183     8258551.284157
+189063.137206     8258542.638279
+189080.081510     8258539.033331
+189095.790383     8258533.537128
+189110.240449     8258528.656258
+189123.461688     8258521.257781
+189141.072988     8258513.272867
+189157.454696     8258502.770338
+189171.934738     8258494.756910
+189189.521907     8258489.277811
+189210.223568     8258485.707078
+189229.104595     8258475.853721
+189233.733423     8258449.580397
+189243.284940     8258432.750009
+189254.633724     8258424.708068
+189284.781741     8258415.584105
+189303.580975     8258414.502083
+189318.662984     8258409.000173
+189331.855776     8258404.734267
+189344.380809     8258404.848321
+189360.663198     8258404.996590
+189375.740127     8258400.121429
+189387.679193     8258395.844107
+189405.354756     8258380.967702
+189416.105888     8258369.787488
+189426.863629     8258357.980537
+189445.124398     8258347.495119
+189469.594337     8258342.705491
+189484.051012     8258337.197886
+189497.874980     8258332.311315
+189509.820651     8258327.407640
+189524.950162     8258316.893709
+189539.412678     8258310.759744
+189558.943170     8258298.406265
+189580.317668     8258289.829206
+189595.387992     8258285.580398
+189608.586625     8258280.688132
+189628.041169     8258276.479247
+189651.885009     8258271.683918
+189670.730980     8258265.589869
+189686.439853     8258260.093666
+189705.936058     8258251.499120
+189730.481946     8258238.564900
+189750.610090     8258229.349695
+189773.897940     8258217.030432
+189794.084507     8258201.550097
+189812.965531     8258191.697123
+189827.456493     8258182.430585
+189839.437220     8258173.767603
+189851.406262     8258166.357723
+189865.241914     8258160.218049
+189880.348055     8258152.210323
+189896.700552     8258144.840359
+189913.650701     8258140.608668
+189926.866096     8258133.836934
+189942.569124     8258128.967473
+189963.902728     8258124.775699
+189982.110151     8258119.929044
+189998.440042     8258115.065292
+190017.859534     8258114.615332
+190033.556721     8258110.372232
+190046.087594     8258109.859926
+190063.698130     8258101.875005
+190081.379538     8258086.371858
+190097.211097     8258067.719035
+190109.238561     8258054.044025
+190118.111397     8258042.846706
+190140.152893     8258029.889298
+190154.602959     8258025.008428
+190170.967138     8258016.385744
+190183.550593     8258010.234668
+190195.490423     8258005.957353
+190210.526460     8258005.467477
+190231.784112     8258009.420678
+190244.894346     8258013.926101
+190259.257546     8258018.442551
+190271.108974     8258023.563307
+190287.322024     8258031.229433
+190306.648037     8258040.803911
+190322.854474     8258049.097155
+190337.826243     8258055.499151
+190352.798012     8258061.901148
+190370.888593     8258069.584371
+190392.778188     8258072.916531
+190412.818699     8258073.099021
+190428.515882     8258068.856304
+190451.160107     8258058.410802
+190463.105778     8258053.507127
+190478.182711     8258048.631583
+190497.046208     8258040.658071
+190522.172222     8258032.741586
+190542.299602     8258023.526375
+190556.791329     8258014.259844
+190571.931761     8258002.492803
+190585.838282     8257988.835287
+190596.630311     8257973.269404
+190604.929630     8257956.427614
+190608.803832     8257943.931568
+190613.345030     8257927.055557
+190619.220979     8257901.420001
+190623.745415     8257886.423459
+190628.251557     8257873.306755
+190635.286228     8257857.706657
+190645.434632     8257844.014536
+190659.955571     8257831.615441
+190670.115660     8257816.670217
+190682.780904     8257801.748188
+190689.786365     8257789.280656
+190696.780908     8257778.065851
+190705.102829     8257758.718231
+190709.650632     8257741.215866
+190709.779163     8257727.432503
+190709.971957     8257706.757650
+190710.182281     8257684.202952
+190709.783264     8257659.763465
+190706.242072     8257636.548192
+190706.429026     8257616.499699
+190706.627661     8257595.198486
+190706.826299     8257573.896890
+190706.346257     8257558.228363
+190706.550737     8257536.300408
+190706.726005     8257517.505017
+190706.924644     8257496.203421
+190707.076541     8257479.914236
+190707.245969     8257461.745205
+190707.438763     8257441.070352
+190707.614031     8257422.274961
+190707.765929     8257405.985776
+190707.917830     8257389.696208
+190708.098939     8257370.274457
+190708.309259     8257347.720141
+190708.542950     8257322.659620
+190708.759115     8257299.478562
+190708.957754     8257278.176966
+190709.138863     8257258.755216
+190709.337501     8257237.453620
+190705.228633     8257207.967515
+190705.438953     8257185.413200
+190701.230002     8257166.577886
+190701.364373     8257152.168163
+190699.708083     8257128.343641
+190695.458238     8257113.893612
+190691.899516     8257092.558184
+190687.656276     8257077.481802
+190687.157944     8257063.692731
+190680.397856     8257049.847022
+190671.822978     8257029.091948
+190663.237176     8257009.590365
+190658.355388     8256995.761377
+190658.536497     8256976.339626
+190663.066009     8256960.716717
+190664.441661     8256947.571124
+190665.892494     8256926.281313
+190666.038551     8256910.618488
+190666.184607     8256894.955662
+190667.560259     8256881.810069
+190673.336125     8256866.825304
+190681.571180     8256856.875005
+190699.252588     8256841.371858
+190709.190668     8256850.234435
+190719.678897     8256867.247306
+190733.954460     8256881.161834
+190748.223417     8256895.702715
+190766.853223     8256912.789724
+190789.252836     8256928.657852
+190801.034160     8256941.296459
+190813.407295     8256957.699698
+190824.463965     8256980.983408
+190835.602428     8256995.495782
+190843.643921     8257006.220711
+190851.680338     8257017.572007
+190863.485797     8257027.704415
+190878.410060     8257039.118815
+190898.942298     8257053.716730
+190923.863832     8257067.728201
+190939.391596     8257081.653749
+190953.637947     8257098.700842
+190964.793172     8257111.333747
+190975.990058     8257119.580991
+190987.186176     8257127.828611
+191002.152104     8257134.856967
+191022.128351     8257141.930948
+191043.971205     8257150.275518
+191064.561101     8257158.608296
+191081.400246     8257166.280506
+191097.641742     8257170.814060
+191113.871549     8257176.601099
+191132.618201     8257181.157847
+191153.278969     8257181.972400
+191173.289504     8257185.287448
+191192.703151     8257185.464231
+191207.727499     8257186.227839
+191221.469676     8257190.112221
+191235.873769     8257190.243386
+191252.782257     8257190.397356
+191270.323449     8257189.930675
+191294.133002     8257188.894278
+191309.830189     8257184.651178
+191323.613260     8257184.150274
+191343.073648     8257179.314647
+191360.649892     8257175.089040
+191375.059065     8257174.593456
+191390.715356     8257174.736023
+191407.624608     8257174.890000
+191420.729002     8257180.021783
+191431.920044     8257188.895770
+191444.357442     8257198.407519
+191464.929812     8257208.619760
+191481.798167     8257213.159405
+191486.942093     8257198.795299
+191487.076465     8257184.385576
+191487.228366     8257168.096008
+191488.082311     8257143.667931
+191492.630114     8257126.165566
+191499.740738     8257102.420494
+191495.648687     8257091.413528
+END
+LINE3D
+HEIGHT 1030.000000
+186601.474090     8258937.000000
+186607.552957     8258928.798380
+186616.478371     8258911.962674
+186627.294152     8258893.890590
+186639.473129     8258863.926773
+186651.617442     8258837.721120
+186661.906058     8258808.992916
+186670.217062     8258790.898023
+186677.222522     8258778.430491
+186686.715613     8258767.865616
+186698.104911     8258755.438004
+186715.107256     8258745.567922
+186735.890328     8258733.225850
+186764.176815     8258722.204932
+186781.846159     8258707.954501
+186797.004878     8258694.308387
+186808.429228     8258678.121849
+186822.967314     8258663.842905
+186838.775502     8258647.696287
+186855.807059     8258634.693641
+186872.212516     8258621.685292
+186892.363267     8258609.963876
+186908.780413     8258595.702043
+186925.800288     8258583.952116
+186938.442166     8258571.535910
+186951.054832     8258562.252268
+186967.454067     8258549.870277
+186988.857773     8258538.161035
+187007.750485     8258527.054575
+187023.500250     8258517.173088
+187034.268912     8258504.113028
+187045.600170     8258497.950549
+187053.225884     8258486.115461
+187067.202135     8258464.939325
+187076.759492     8258447.482578
+187081.271861     8258433.739134
+187086.404483     8258420.628135
+187096.547428     8258407.562377
+187109.183462     8258395.772913
+187114.316088     8258382.661531
+187114.462145     8258366.998706
+187107.742572     8258348.767326
+187093.479077     8258333.599699
+187084.805258     8258323.495808
+187072.362019     8258314.610419
+187057.425302     8258304.449497
+187041.769012     8258304.306929
+187024.813404     8258309.164983
+187005.984959     8258313.379570
+186991.505299     8258321.393001
+186978.295746     8258327.538376
+186965.688923     8258336.195275
+186951.817833     8258346.094252
+186935.406531     8258359.729343
+186913.382564     8258370.806906
+186898.908745     8258378.193978
+186878.213307     8258381.138354
+186861.298596     8258381.610741
+186845.630620     8258382.721275
+186831.853008     8258382.595815
+186814.329724     8258381.183038
+186794.956974     8258376.620588
+186780.629212     8258368.344834
+186768.782860     8258362.597711
+186755.075352     8258354.954400
+186745.160643     8258343.585618
+186733.958295     8258335.965120
+186718.986526     8258329.563123
+186702.809300     8258318.137314
+186690.348531     8258311.131770
+186680.491859     8258293.498236
+186671.203245     8258282.135538
+186661.891264     8258273.278662
+186649.459706     8258263.140553
+186627.540900     8258262.940958
+186614.354716     8258266.580128
+186601.817999     8258267.719176
+186585.488490     8258272.582932
+186566.735993     8258268.652925
+186552.367338     8258264.762456
+186544.319619     8258254.664266
+186523.161282     8258240.060650
+186504.461368     8258230.491874
+186488.278298     8258219.692807
+186475.273223     8258203.910226
+186467.277703     8258188.173263
+186461.149559     8258173.706513
+186449.373697     8258160.441160
+186436.947984     8258149.676309
+186414.618858     8258126.290333
+186397.229946     8258110.467833
+186377.962355     8258094.628225
+186351.834979     8258075.593320
+186336.353956     8258056.655362
+186325.204193     8258043.395711
+186314.054427     8258030.136443
+186300.376134     8258019.360185
+186283.584110     8258006.675950
+186266.136775     8257997.118580
+186252.429271     8257989.474887
+186236.883981     8257977.428802
+186220.167909     8257956.599592
+186199.179378     8257923.827331
+186185.582879     8257904.279738
+186167.520748     8257893.463561
+186155.054139     8257887.084376
+186127.668720     8257868.664811
+186102.717975     8257857.785905
+186090.233839     8257853.286184
+186072.780278     8257844.355552
+186049.726119     8257831.614295
+186021.638275     8257821.333235
+185994.164840     8257812.311362
+185976.694138     8257805.259814
+185962.337165     8257800.116625
+185945.434136     8257799.336291
+185927.389531     8257786.640651
+185903.697210     8257775.146409
+185873.742369     8257763.595522
+185850.693669     8257750.227901
+185826.995503     8257739.360401
+185806.428595     8257728.521415
+185790.221773     8257720.228549
+185772.142498     8257711.291838
+185750.978317     8257697.314964
+185736.059130     8257685.274197
+185724.897682     8257673.267649
+185715.597383     8257663.158053
+185699.536999     8257639.202366
+185689.019176     8257625.322056
+185677.828516     8257616.448073
+185667.269796     8257606.953431
+185655.499390     8257593.062098
+185646.199094     8257582.952120
+185635.693335     8257567.819093
+185630.864129     8257548.351336
+185630.372401     8257533.935912
+185634.878925     8257520.819211
+185647.491592     8257511.535569
+185658.213898     8257503.487541
+185680.752959     8257504.319579
+185691.311679     8257513.814221
+185703.684814     8257530.217461
+185712.352788     8257540.948094
+185717.252102     8257552.897619
+185730.268862     8257567.427098
+185743.964684     8257576.323511
+185767.060118     8257584.679487
+185783.933554     8257588.592382
+185799.560633     8257591.867515
+185813.338245     8257591.992975
+185829.661913     8257587.755579
+185849.075560     8257587.932362
+185870.368268     8257588.126255
+185898.549591     8257588.382877
+185918.589337     8257588.565361
+185937.991682     8257589.995249
+185955.491598     8257593.913849
+185976.146140     8257595.355140
+186005.539146     8257600.008835
+186036.804989     8257605.305998
+186063.681151     8257611.189984
+186085.512323     8257620.787274
+186104.821193     8257632.241218
+186122.280213     8257640.545485
+186136.596290     8257650.074342
+186154.681791     8257658.384315
+186165.889976     8257665.378835
+186179.000211     8257669.884258
+186192.748611     8257673.142284
+186213.379786     8257677.089397
+186235.890022     8257681.053622
+186258.434927     8257681.258918
+186275.302901     8257685.798559
+186293.405546     8257692.229066
+186312.790364     8257695.538417
+186326.532920     8257699.423184
+186340.901579     8257703.313271
+186353.379874     8257708.439353
+186363.317953     8257717.301930
+186376.405203     8257724.313179
+186389.486226     8257731.951167
+186402.543883     8257742.094978
+186418.692279     8257756.653356
+186436.771557     8257765.589685
+186463.636415     8257772.726776
+186486.140427     8257777.317358
+186516.826910     8257777.596791
+186541.876975     8257777.824900
+186560.664523     8257777.995981
+186578.831432     8257777.534997
+186598.865719     8257778.343844
+186626.350835     8257786.112997
+186653.847254     8257792.629044
+186677.603843     8257797.231414
+186698.241241     8257800.552171
+186718.907468     8257800.740359
+186743.331052     8257800.962763
+186774.017534     8257801.242197
+186795.942181     8257800.815431
+186817.269945     8257797.250017
+186834.810755     8257796.783332
+186852.357409     8257795.689904
+186869.927430     8257792.090654
+186884.963466     8257791.600778
+186898.746919     8257791.099878
+186918.160566     8257791.276660
+186933.190758     8257791.413527
+186946.967988     8257791.538983
+186969.560013     8257786.732255
+186984.022147     8257780.598286
+187003.576010     8257765.738603
+187018.699677     8257755.851414
+187036.907868     8257751.004384
+187051.323260     8257749.882825
+187074.500491     8257749.467083
+187091.403134     8257750.247796
+187112.034691     8257754.194913
+187138.296057     8257758.820092
+187162.690812     8257762.175064
+187178.335417     8257763.570734
+187192.739128     8257763.701895
+187205.264160     8257763.815949
+187232.866125     8257759.054459
+187251.688726     8257755.466615
+187279.875890     8257755.096877
+187300.588858     8257750.272655
+187319.382247     8257749.817376
+187340.048474     8257750.005565
+187359.468345     8257749.555991
+187384.518409     8257749.784099
+187413.290779     8257753.805347
+187433.921954     8257757.752461
+187452.633550     8257766.068517
+187468.869584     8257771.228817
+187482.600076     8257776.366301
+187503.805150     8257785.957890
+187526.221525     8257799.946549
+187544.874702     8257814.527353
+187562.246470     8257832.229319
+187575.251544     8257848.011900
+187587.653887     8257861.282957
+187600.056233     8257874.553632
+187609.362373     8257884.036868
+187616.766082     8257896.009198
+187626.066382     8257906.118794
+187642.741943     8257931.333292
+187663.162412     8257957.835100
+187677.385396     8257977.388016
+187690.402156     8257991.917494
+187700.932046     8258004.544705
+187710.214816     8258016.534145
+187721.996140     8258029.172752
+187733.128759     8258044.311869
+187745.519420     8258058.835646
+187756.060231     8258070.209747
+187771.552939     8258087.894602
+187788.918863     8258106.223311
+187801.912252     8258123.258995
+187811.195025     8258135.248053
+187819.851696     8258147.231793
+187827.272935     8258157.324278
+187841.490074     8258177.503936
+187851.387261     8258190.751798
+187864.415702     8258204.028557
+187877.491649     8258212.292912
+187889.964100     8258218.045736
+187906.199751     8258223.206033
+187921.200732     8258226.475464
+187936.851181     8258227.244392
+187951.845553     8258231.140558
+187969.345852     8258235.059162
+187991.258818     8258235.885117
+188021.910244     8258239.923858
+188046.299158     8258243.905190
+188068.217965     8258244.104785
+188088.872124     8258245.546072
+188110.790931     8258245.745667
+188140.219375     8258246.640058
+188170.278994     8258246.913784
+188197.828374     8258247.791447
+188225.342701     8258252.428034
+188255.349742     8258258.340148
+188288.459590     8258267.413729
+188315.353664     8258271.417873
+188341.023983     8258272.278425
+188369.193624     8258273.787767
+188397.374947     8258274.044389
+188422.425012     8258274.272497
+188448.089490     8258275.759409
+188476.861856     8258279.781039
+188512.552816     8258280.732457
+188545.117594     8258281.028995
+188570.167659     8258281.257103
+188590.195720     8258282.692690
+188613.993587     8258282.909395
+188635.327192     8258278.717621
+188650.398280     8258274.468819
+188662.987576     8258267.691383
+188675.588557     8258259.660844
+188691.291589     8258254.791002
+188705.753340     8258248.657030
+188719.578072     8258243.770466
+188734.660077     8258238.268937
+188756.619781     8258234.082864
+188776.080930     8258229.247626
+188788.646859     8258224.976012
+188801.171891     8258225.090066
+188819.332577     8258225.255439
+188838.746989     8258225.432228
+188858.757523     8258228.747277
+188873.752663     8258232.643069
+188895.636414     8258236.601971
+188917.508483     8258241.813593
+188934.984647     8258248.238395
+188947.468783     8258252.738117
+188974.333644     8258259.874826
+189003.106014     8258263.896074
+189038.802815     8258264.221132
+189060.721622     8258264.420727
+189077.056589     8258258.930608
+189091.494973     8258255.302458
+189112.846104     8258249.231221
+189139.833652     8258243.211310
+189162.442821     8258236.525116
+189181.909050     8258231.063128
+189197.664657     8258220.555280
+189212.805853     8258208.788246
+189225.459416     8258195.118937
+189243.731867     8258183.380799
+189268.278523     8258170.446203
+189292.806885     8258159.391445
+189311.676226     8258150.791191
+189324.909912     8258142.140000
+189341.262409     8258134.770036
+189356.994648     8258126.768011
+189374.564291     8258123.168375
+189390.284845     8258116.419453
+189408.487191     8258112.199165
+189420.432862     8258107.295490
+189432.992947     8258103.650619
+189446.184975     8258099.384706
+189460.647490     8258093.250741
+189476.379730     8258085.248716
+189498.374489     8258077.303335
+189522.886089     8258068.128047
+189547.408606     8258057.700031
+189566.910652     8258048.479125
+189588.296074     8258038.648574
+189608.435904     8258028.180267
+189635.457740     8258018.401423
+189663.118124     8258007.375186
+189688.267508     8257996.952496
+189705.884653     8257988.340839
+189723.495188     8257980.355918
+189739.244953     8257970.474430
+189756.253525     8257959.977609
+189777.018689     8257949.514997
+189790.264060     8257939.610704
+189804.123083     8257930.964825
+189816.103806     8257922.302225
+189829.325045     8257914.903748
+189839.438397     8257904.970552
+189859.589908     8257893.249524
+189877.832387     8257884.643562
+189904.223048     8257875.485384
+189921.745949     8257876.898158
+189932.316737     8257885.139701
+189942.213920     8257898.387946
+189953.410806     8257906.635190
+189966.474303     8257916.152641
+189999.653495     8257917.707982
+190022.187483     8257919.166005
+190038.469872     8257919.314274
+190051.667741     8257914.422002
+190073.065609     8257903.338737
+190087.480623     8257902.216793
+190103.804673     8257897.979401
+190124.482199     8257896.914866
+190143.907532     8257895.838546
+190162.080667     8257894.750823
+190179.030816     8257890.519133
+190196.617981     8257885.040416
+190211.121394     8257874.520784
+190224.968731     8257867.128007
+190244.464172     8257858.533455
+190267.138369     8257844.955777
+190292.299438     8257833.279985
+190315.569762     8257822.840184
+190333.824687     8257812.981508
+190353.337653     8257802.507493
+190374.700469     8257795.183154
+190394.166695     8257789.721548
+190417.413651     8257781.787570
+190438.793993     8257772.583768
+190459.571604     8257760.868442
+190473.453994     8257749.716741
+190486.733655     8257736.053133
+190503.812335     8257718.038080
+190524.665133     8257698.177772
+190543.592894     8257683.312770
+190557.499419     8257669.654871
+190569.526884     8257655.979860
+190579.043344     8257642.908781
+190590.432260     8257630.481165
+190595.038486     8257606.713669
+190593.960792     8257587.906869
+190584.086976     8257572.152802
+190569.179474     8257558.858933
+190550.403610     8257557.434749
+190532.904076     8257553.516152
+190517.335420     8257543.975889
+190516.210988     8257530.181117
+190516.362886     8257513.891931
+190516.479731     8257501.361671
+190512.289070     8257480.646902
+190512.476023     8257460.598408
+190512.042719     8257439.917854
+190512.826560     8257423.007627
+190517.361917     8257406.757975
+190517.490444     8257392.974995
+190518.889462     8257377.323579
+190519.035519     8257361.660753
+190519.901153     8257335.979191
+190520.099788     8257314.677978
+190520.257530     8257297.762050
+190520.374376     8257285.231789
+190520.514592     8257270.195324
+190508.808452     8257249.412118
+190499.613317     8257228.024982
+190491.067647     8257204.137724
+190487.456347     8257188.440684
+190482.632981     8257168.346566
+190482.135410     8257154.557885
+190482.258100     8257141.400882
+190482.386630     8257127.617519
+190483.141256     8257113.840239
+190487.729956     8257091.952207
+190491.024800     8257074.438050
+190492.411369     8257060.039729
+190497.076017     8257030.007104
+190499.182164     8257005.590047
+190499.954319     8256989.932923
+190500.838240     8256962.372288
+190501.698030     8256937.317468
+190503.113810     8256919.786583
+190504.506988     8256904.761527
+190506.022088     8256876.579843
+190506.191515     8256858.410813
+190506.372624     8256838.989062
+190506.547892     8256820.193672
+190506.699790     8256803.904486
+190507.501157     8256785.114797
+190508.906020     8256768.836638
+190512.809433     8256753.208028
+190519.223847     8256736.975869
+190525.649946     8256719.490608
+190530.232041     8256698.228928
+190537.899416     8256682.008179
+190541.878782     8256658.234593
+190543.282877     8256641.956811
+190544.681896     8256626.305395
+190545.477422     8256608.142065
+190546.284630     8256588.726016
+190547.665358     8256574.954056
+190550.316574     8256559.314042
+190554.190776     8256546.817997
+190559.990777     8256529.327034
+190566.358453     8256518.106903
+190578.333336     8256510.070663
+190602.763146     8256509.666328
+190619.039691     8256510.441339
+190635.287028     8256514.348533
+190651.528520     8256518.882470
+190666.552871     8256519.645696
+190683.374490     8256529.197368
+190698.908090     8256542.496939
+190710.022422     8256559.515129
+190720.546469     8256572.769082
+190731.034698     8256589.781953
+190739.071115     8256601.133249
+190757.161693     8256608.816855
+190770.898794     8256613.327603
+190792.811756     8256614.153941
+190809.053249     8256618.687877
+190825.288900     8256623.848174
+190842.133889     8256630.893641
+190858.948899     8256641.072049
+190883.279390     8256651.318511
+190902.582033     8256663.399194
+190921.270265     8256674.220691
+190939.859175     8256695.693367
+190947.239517     8256710.171520
+190958.296188     8256733.455230
+190967.485482     8256755.468726
+190978.501256     8256783.138103
+190987.684710     8256805.777960
+190995.661939     8256823.394379
+191001.152300     8256839.108530
+191008.497586     8256857.345990
+191018.348800     8256875.605887
+191029.486496     8256890.118637
+191044.382316     8256904.665226
+191056.146878     8256919.183302
+191069.807262     8256931.839019
+191080.986622     8256941.965726
+191093.365598     8256957.742606
+191103.291992     8256967.858285
+191113.171653     8256982.985610
+191129.366408     8256992.531574
+191141.809647     8257001.416964
+191154.920646     8257005.922394
+191169.885810     8257012.950743
+191189.282696     8257015.006995
+191211.224869     8257012.700767
+191226.927897     8257007.831307
+191245.826451     8256996.098488
+191257.156944     8256989.936002
+191270.981675     8256985.049438
+191284.904962     8256969.512069
+191296.914900     8256957.716521
+191308.942365     8256944.041511
+191324.094478     8256931.021750
+191336.753882     8256916.726081
+191349.407445     8256903.056772
+191361.434910     8256889.381762
+191374.714571     8256875.718154
+191385.519046     8256858.899559
+191398.851290     8256839.597181
+191413.395595     8256824.692263
+191427.277989     8256813.540179
+191437.414707     8256801.101161
+191448.166604     8256789.920953
+191462.136628     8256769.371557
+191469.177140     8256753.145099
+191477.488144     8256735.050207
+191485.827596     8256713.822742
+191496.608703     8256699.509969
+191506.745422     8256687.070951
+191528.775229     8256675.367027
+191543.290327     8256663.594292
+191556.529092     8256654.316352
+191574.174683     8256642.572123
+191591.873618     8256625.189513
+191603.292509     8256609.629339
+191614.113749     8256590.930892
+191624.876566     8256578.497574
+191634.990679     8256568.564768
+191645.168294     8256551.740082
+191655.925270     8256539.933125
+191664.809791     8256527.482703
+191676.187786     8256516.308197
+191684.422074     8256506.358272
+191692.680496     8256493.902150
+191704.209628     8256466.438069
+191713.726088     8256453.366989
+191721.346727     8256442.158267
+191735.896112     8256426.626600
+191745.383365     8256416.687703
+191757.387459     8256405.518897
+191769.374026     8256396.229555
+191781.939955     8256391.957941
+191797.730617     8256377.690786
+191810.349125     8256367.780785
+191822.353222     8256356.611597
+191834.398212     8256341.057124
+191847.701241     8256324.887694
+191860.986744     8256310.597726
+191872.370583     8256298.796477
+191885.012461     8256286.380271
+191898.274593     8256274.596508
+191916.558733     8256261.604885
+191931.096433     8256247.326320
+191941.233152     8256234.887302
+191949.520785     8256219.298614
+191958.434518     8256203.715628
+191966.066077     8256191.253797
+191974.956439     8256178.177016
+191982.605527     8256163.835340
+191990.243692     8256150.747156
+191999.110687     8256140.176198
+END
+LINE3D
+HEIGHT 1030.000000
+192002.914781     8256135.198385
+192018.769710     8256114.039357
+192025.149072     8256101.566123
+192037.094743     8256096.662448
+192045.966814     8256085.465123
+192057.414917     8256066.772383
+192063.858542     8256047.407660
+192073.456796     8256025.565245
+192081.111726     8256010.597209
+192096.323026     8255991.312324
+192104.634031     8255973.217432
+192113.536078     8255958.887548
+192122.413993     8255947.063480
+192149.518387     8255928.513308
+192166.555406     8255914.883915
+192181.064659     8255903.737923
+192189.931654     8255893.166964
+192199.459800     8255878.842781
+192208.976260     8255865.771702
+192221.056306     8255846.457921
+192231.895072     8255825.880011
+192240.141809     8255814.676991
+192249.037251     8255800.973460
+192256.646204     8255791.017842
+192261.772604     8255778.533199
+192264.423820     8255762.893185
+192265.172609     8255749.741884
+192251.740071     8255712.652388
+192246.881653     8255696.317196
+192238.834316     8255686.219010
+192230.189326     8255672.982550
+192219.654359     8255660.981706
+192204.231760     8255635.778618
+192192.525620     8255614.995412
+192187.087841     8255593.642491
+192182.211894     8255579.187143
+192171.097566     8255562.168571
+192160.591042     8255547.035537
+192148.159488     8255536.897046
+192128.903583     8255519.804335
+192118.339401     8255510.936439
+192107.844566     8255494.549921
+192102.981068     8255478.841478
+192102.594501     8255453.148896
+192102.113695     8255437.480362
+192102.869089     8255423.702707
+192107.462865     8255401.188308
+192112.027433     8255381.806091
+192119.097921     8255362.447075
+192123.048072     8255341.806437
+192129.456645     8255326.200638
+192135.859377     8255311.221200
+192148.600573     8255288.154387
+192163.753452     8255275.134442
+192178.899725     8255262.741040
+192195.323093     8255247.853042
+192209.872478     8255232.321375
+192220.061777     8255214.243777
+192232.065873     8255203.074781
+192242.179222     8255193.141776
+192253.568903     8255180.714167
+192272.531719     8255162.089857
+192295.842938     8255147.264580
+192309.076625     8255138.613199
+192319.786862     8255131.818460
+192333.043153     8255120.661058
+192345.041406     8255110.118613
+192355.183967     8255097.053043
+192367.790791     8255088.395953
+192380.432669     8255075.979747
+192392.419237     8255066.690404
+192409.467939     8255051.808100
+192422.742522     8255038.771051
+192435.981288     8255029.493111
+192453.691142     8255010.857391
+192471.395919     8254992.848231
+192490.364578     8254973.597370
+192505.488247     8254963.709989
+192521.232171     8254954.454862
+192538.187397     8254949.596804
+192552.696650     8254938.450811
+192567.146718     8254933.569750
+192579.765227     8254923.659558
+192596.832220     8254906.897798
+192611.334867     8254896.378158
+192622.063395     8254887.703964
+192636.536832     8254880.316890
+192653.522033     8254872.326274
+192674.310566     8254859.357647
+192702.602891     8254847.710560
+192724.644386     8254834.753343
+192747.927158     8254823.060638
+192767.451808     8254811.333711
+192796.376075     8254799.065773
+192826.594200     8254782.423578
+192857.479319     8254761.401607
+192880.924911     8254732.166416
+192906.840606     8254706.713345
+192932.124362     8254681.880932
+192953.574812     8254665.158897
+192966.240058     8254650.236677
+192978.870253     8254639.073382
+192989.627227     8254627.266616
+193000.384966     8254615.459857
+193012.470853     8254595.519716
+193027.002711     8254581.867703
+193042.173117     8254566.968295
+193063.570987     8254555.884839
+193080.590478     8254544.135100
+193095.731672     8254532.368257
+193108.391078     8254518.072397
+193121.038796     8254505.029830
+193129.308904     8254491.320605
+193137.630827     8254471.972794
+193145.268993     8254458.884419
+193155.440764     8254442.686476
+193169.352367     8254428.402018
+193181.420726     8254410.341532
+193192.212755     8254394.775649
+193197.369130     8254379.158448
+193201.348493     8254355.385245
+193205.995615     8254327.232082
+193206.855405     8254302.177262
+193207.697668     8254279.001905
+193207.948885     8254252.061922
+193208.217630     8254223.242285
+193204.108762     8254193.756180
+193204.278187     8254175.587341
+193203.223862     8254154.274527
+193202.146933     8254135.467733
+193200.495721     8254111.016653
+193196.919475     8254091.560496
+193193.308175     8254075.863456
+193188.414701     8254063.287571
+193180.999307     8254052.568343
+193175.485578     8254039.360206
+193164.921397     8254030.492119
+193157.528607     8254017.266870
+193148.883618     8254004.030411
+193129.656924     8253983.805135
+193118.548436     8253966.160203
+193108.673856     8253950.406128
+193098.144729     8253937.778925
+193088.856117     8253926.416035
+193069.594369     8253909.949876
+193059.029424     8253901.081782
+193047.839145     8253892.207993
+193038.533005     8253882.724757
+193026.686652     8253876.977826
+193017.386354     8253866.868038
+193007.448272     8253858.005653
+192995.005032     8253849.120454
+192985.061109     8253840.884429
+192973.875908     8253831.384082
+192952.740941     8253814.274452
+192936.557871     8253803.475385
+192916.025633     8253788.877470
+192899.245676     8253774.940137
+192887.463587     8253762.301524
+192878.151605     8253753.444839
+192850.818387     8253729.386405
+192835.940859     8253712.960169
+192816.742611     8253689.602417
+192795.637620     8253669.360133
+192783.223592     8253657.342274
+192764.535361     8253646.520491
+192752.097963     8253637.008741
+192735.867389     8253631.221886
+192719.666793     8253622.302378
+192702.278263     8253606.479881
+192682.348755     8253594.393681
+192666.739203     8253589.238990
+192656.192550     8253578.491345
+192645.621763     8253570.249706
+192634.425642     8253562.002373
+192616.410249     8253546.174168
+192606.553959     8253528.540638
+192602.930975     8253514.096605
+192599.313068     8253499.026013
+192599.552601     8253473.339037
+192603.491833     8253453.951316
+192608.629917     8253440.213667
+192612.527488     8253425.211607
+192622.055635     8253410.887329
+192634.071414     8253398.465421
+192651.746980     8253383.588730
+192666.823909     8253378.713569
+192682.538623     8253372.591006
+192699.493849     8253367.732853
+192712.059777     8253363.461335
+192724.081399     8253350.412876
+192736.740804     8253336.117111
+192747.468567     8253327.442910
+192760.689805     8253320.044529
+192775.801789     8253311.410155
+192793.418932     8253302.798690
+192811.000257     8253297.946238
+192829.214287     8253292.473039
+192844.946527     8253284.470918
+192860.643713     8253280.227913
+192874.515184     8253270.329131
+192887.086955     8253265.431061
+192899.072758     8253256.141712
+192910.398173     8253250.605784
+192921.120095     8253242.558039
+192931.848622     8253233.883845
+192943.225854     8253222.709236
+192955.838520     8253213.425595
+192976.645345     8253198.577417
+192989.907478     8253186.793463
+193001.882362     8253178.757128
+193012.042449     8253163.812095
+193027.815585     8253151.424402
+193042.974306     8253137.778001
+193055.060194     8253117.837861
+193063.968083     8253102.881426
+193070.985228     8253089.160887
+193076.170050     8253070.411114
+193080.665274     8253058.547232
+193082.040159     8253045.401918
+193085.340843     8253027.261497
+193080.471503     8253012.179605
+193068.706942     8252997.661434
+193052.582294     8252980.597333
+193042.655133     8252970.481885
+193030.241103     8252958.464074
+193019.062509     8252948.337231
+193004.746050     8252938.808370
+192994.176028     8252930.566739
+192970.500849     8252917.193269
+192956.787884     8252910.176179
+192935.588652     8252899.958087
+192918.175989     8252886.641597
+192907.605966     8252878.400013
+192898.925925     8252868.922479
+192886.628741     8252844.374407
+192872.453261     8252819.809232
+192858.856377     8252800.261874
+192850.838253     8252787.030979
+192842.251687     8252767.529246
+192834.221114     8252755.551351
+192828.087128     8252741.711009
+192823.838044     8252727.261322
+192823.340476     8252713.472305
+192822.830458     8252700.936337
+192826.189564     8252676.530881
+192833.868626     8252659.056934
+192842.149653     8252644.094742
+192855.494343     8252623.539604
+192867.602835     8252601.093443
+192877.798740     8252582.389301
+192887.958828     8252567.444244
+192899.997976     8252552.516299
+192910.128852     8252540.703784
+192918.990004     8252530.759424
+192934.153804     8252516.486465
+192949.956151     8252500.966207
+192961.960245     8252489.797330
+192972.688773     8252481.123112
+192991.466875     8252461.571466
+193006.656920     8252439.510903
+END
+LINE3D
+HEIGHT 1070.000000
+184374.024909     8258937.000000
+184387.584827     8258923.679239
+184400.932600     8258902.496268
+184412.314657     8258890.694051
+184433.815035     8258868.331806
+184453.413254     8258848.458817
+184472.350638     8258832.338344
+184491.908291     8258816.850645
+184509.599321     8258800.093279
+184525.475133     8258776.426699
+184541.379915     8258749.628316
+184559.140114     8258725.352324
+184573.728624     8258705.434137
+184586.403776     8258689.257166
+184598.505013     8258667.436536
+184613.099317     8258646.891989
+184627.055963     8258627.594514
+184639.719520     8258612.671029
+184648.602325     8258600.219851
+184657.462329     8258590.274884
+184667.591863     8258578.461367
+184677.710191     8258567.900575
+184689.729906     8258554.851285
+184701.796371     8258536.789584
+184718.257680     8258517.514706
+184735.965717     8258498.877490
+184749.870202     8258485.218792
+184759.367872     8258474.025987
+184770.825266     8258454.079551
+184775.319021     8258442.215188
+184779.835956     8258427.845000
+184785.083283     8258402.202909
+184789.095853     8258374.670439
+184793.044290     8258354.029462
+184797.039095     8258328.376071
+184800.355669     8258308.355807
+184801.799443     8258287.692233
+184805.052264     8258274.563849
+184806.426494     8258261.418133
+184810.920246     8258249.554152
+184813.030660     8258224.510555
+184814.497618     8258201.340774
+184814.045031     8258182.539713
+184809.197597     8258164.952210
+184803.706706     8258149.238523
+184798.192253     8258136.030658
+184787.685473     8258120.898513
+184777.799352     8258106.398381
+184762.914732     8258090.599943
+184746.145724     8258075.410918
+184733.737172     8258062.767650
+184726.321325     8258052.049047
+184717.675752     8258038.813315
+184707.186362     8258021.801324
+184695.468012     8258002.272210
+184683.731896     8257984.622175
+184663.849156     8257967.525819
+184645.195761     8257952.946206
+184622.761993     8257940.839286
+184606.004578     8257924.397157
+184596.727141     8257911.782137
+184586.220361     8257896.649993
+184577.575175     8257883.413882
+184567.688672     8257868.913746
+184553.459481     8257849.988393
+184543.538588     8257839.247189
+184531.141624     8257825.351200
+184520.571099     8257817.110169
+184506.875248     8257808.214912
+184494.437718     8257798.704212
+184478.921234     8257783.526487
+184464.680452     8257765.854237
+184453.570785     8257748.210237
+184441.869442     8257726.801273
+184432.667346     8257706.041652
+184422.276481     8257678.378852
+184419.910908     8257663.320157
+184403.860698     8257638.112715
+184395.203729     8257626.129707
+184376.567716     8257609.671012
+184361.677493     8257594.498937
+184351.750611     8257584.384475
+184341.197663     8257574.263982
+184330.024053     8257563.511859
+184313.875513     8257548.954845
+184303.334153     8257537.581631
+184290.287747     8257526.185816
+184273.460784     8257517.261927
+184242.236560     8257507.581734
+184210.374673     8257499.148996
+184179.764927     8257490.727554
+184152.274896     8257483.587468
+184120.372252     8257479.540017
+184097.868941     8257474.950955
+184074.072346     8257474.736262
+184054.044908     8257473.302749
+184030.288883     8257468.702385
+184000.230248     8257468.431196
+183969.585922     8257463.768685
+183939.567665     8257459.111823
+183910.767156     8257458.225573
+183877.612181     8257454.166824
+183847.553546     8257453.895635
+183828.140590     8257453.720492
+183804.343995     8257453.505799
+183781.840681     8257448.917119
+183756.171291     8257448.058735
+183733.047321     8257442.837660
+183707.412703     8257438.220347
+183687.425835     8257432.401162
+183664.945516     8257425.305890
+183634.996994     8257413.131172
+183600.084939     8257395.898839
+183573.939971     8257378.745603
+183557.000000     8257369.222942
+END
+LINE3D
+HEIGHT 1080.000000
+184045.482525     8258937.000000
+184051.877018     8258926.289735
+184067.283045     8258885.701942
+184083.883639     8258851.390586
+184104.125700     8258829.643402
+184129.371675     8258808.567776
+184148.436558     8258778.664309
+184162.404601     8258758.114112
+184176.361253     8258738.815873
+184188.392748     8258724.513863
+184193.518367     8258712.028788
+184204.320721     8258695.208508
+184218.445438     8258657.741985
+184232.552575     8258622.155307
+184247.187643     8258597.224707
+184268.119524     8258568.591675
+184280.243753     8258544.264835
+184287.961350     8258522.404655
+184295.661371     8258502.423939
+184307.142140     8258479.971297
+184318.634310     8258456.265551
+184331.442755     8258425.679225
+184343.097390     8258384.431174
+184353.313857     8258363.219953
+184361.680899     8258338.859216
+184372.627943     8258306.376857
+184381.023963     8258278.883552
+184385.592868     8258258.874587
+184391.408689     8258239.503666
+184398.482449     8258219.517299
+184403.109500     8258193.243199
+184407.162257     8258161.325053
+184411.777716     8258136.304057
+184412.635990     8258111.249163
+184412.763492     8258097.465786
+184412.954744     8258076.790912
+184408.768155     8258055.449747
+184403.955492     8258034.103315
+184398.562744     8258007.738816
+184388.653251     8257995.744507
+184381.248801     8257983.773181
+184373.212108     8257972.422181
+184362.763475     8257951.024902
+184356.031462     8257934.046809
+184346.829366     8257913.287189
+184339.511661     8257891.917774
+184333.411704     8257874.318971
+184327.300155     8257857.973271
+184318.753302     8257834.086350
+184308.953922     8257810.188511
+184302.801804     8257798.228484
+184291.721119     8257777.451533
+184277.526509     8257754.767248
+184258.322382     8257732.037769
+184240.944499     8257714.963629
+184226.083253     8257696.658986
+184209.934710     8257682.102354
+184198.767088     8257670.723490
+184191.345064     8257660.631244
+184178.930714     8257648.614719
+184161.547228     8257632.166942
+184144.731854     8257621.990332
+184122.245737     8257615.521803
+184100.374291     8257610.312028
+184076.021173     8257602.573447
+184055.390657     8257598.628076
+184037.896864     8257594.084210
+184009.757391     8257589.444298
+183994.148176     8257584.291021
+183978.498395     8257583.523033
+183966.014498     8257579.024748
+183951.617239     8257578.268061
+183927.820836     8257578.053370
+183912.750758     8257582.303446
+183890.769198     8257588.997201
+183866.282781     8257595.668740
+183848.702245     8257600.522579
+183835.493566     8257606.669070
+183821.044146     8257611.551159
+183808.484908     8257615.197474
+183792.174090     8257618.183148
+183777.765049     8257618.679563
+183750.217062     8257617.804612
+183724.588242     8257612.560556
+183703.308281     8257611.115743
+183687.061216     8257607.209537
+183671.498365     8257597.044227
+183656.492231     8257594.402426
+183640.877221     8257589.875509
+183627.732291     8257589.130503
+183614.593349     8257587.758755
+183599.024704     8257578.219806
+183584.087922     8257568.060145
+183562.935467     8257552.831572
+183557.000000     8257547.261108
+END
+LINE3D
+HEIGHT 1090.000000
+183623.974043     8258937.000000
+183634.203489     8258920.641487
+183644.431735     8258898.177545
+183652.752410     8258878.829223
+183662.302241     8258861.997643
+183669.323836     8258847.650434
+183678.253390     8258830.186844
+183685.280786     8258815.212510
+183693.578278     8258798.370396
+183703.174469     8258776.527165
+183716.528037     8258754.717833
+183727.944866     8258739.156687
+183739.344312     8258725.474624
+183750.111886     8258712.414037
+183763.419087     8258695.617120
+183773.589378     8258679.418315
+183785.069963     8258656.964907
+183795.907081     8258636.386463
+183807.967561     8258618.951120
+183819.407573     8258600.883767
+183833.323645     8258585.972347
+183845.384125     8258568.537005
+183858.053476     8258552.987159
+183870.798172     8258529.292330
+183887.294444     8258506.258526
+183901.274082     8258484.454843
+183913.937639     8258469.531358
+183923.441099     8258457.712575
+183939.282136     8258437.805306
+183947.527470     8258426.601585
+183958.312243     8258411.661150
+183965.322441     8258398.566664
+183977.945428     8258388.028851
+183994.975235     8258375.024762
+184016.440649     8258356.421445
+184027.196636     8258344.613580
+184037.998795     8258327.793680
+184047.513847     8258314.721793
+184055.179287     8258298.500007
+184063.551932     8258273.512908
+184073.171303     8258249.163852
+184081.451413     8258234.200819
+184089.076089     8258222.365086
+184096.753121     8258204.890196
+184107.572666     8258186.190832
+184119.041843     8258164.991295
+184129.258501     8258143.780075
+184138.164677     8258128.823073
+184145.800949     8258115.733853
+184149.714806     8258098.851808
+184154.347651     8258071.951347
+184155.808620     8258049.408307
+184157.356717     8258017.467182
+184158.858447     8257990.538472
+184159.617814     8257976.134383
+184159.756908     8257961.097903
+184159.936568     8257941.676133
+184159.466977     8257924.754540
+184158.440478     8257900.309437
+184154.236503     8257880.847735
+184153.766913     8257863.926142
+184148.878718     8257850.724309
+184141.480065     8257838.126240
+184131.025447     8257817.355319
+184123.006330     8257804.124857
+184117.515057     8257788.411167
+184108.231823     8257776.422890
+184084.615083     8257756.786047
+184068.454948     8257743.482519
+184051.645562     8257732.679168
+184036.030552     8257728.152251
+184017.296016     8257722.344365
+183993.534196     8257718.370361
+183975.385351     8257716.953796
+183957.851180     8257716.795603
+183940.322614     8257716.010666
+183921.535920     8257715.841172
+183898.986051     8257716.264523
+183863.279857     8257717.195208
+183837.569895     8257720.722878
+183817.501700     8257723.674653
+183798.680233     8257727.264089
+183776.727648     8257730.825658
+183755.424511     8257731.886287
+183732.219593     8257735.436558
+183712.800843     8257735.887775
+183691.497703     8257736.948787
+183672.711008     8257736.779294
+183656.429168     8257736.632399
+183639.521066     8257736.479854
+183620.113904     8257735.678350
+183599.494984     8257730.479493
+183580.760447     8257724.671607
+183560.784983     8257717.598934
+183557.000000     8257715.774871
+END
+LINE3D-MASTER
+HEIGHT 1100.000000
+183557.000000     8258352.931453
+183566.876256     8258345.473027
+183582.641947     8258333.710742
+183598.413437     8258321.321713
+183613.564462     8258308.300292
+183629.353338     8258294.031799
+183643.286612     8258277.240148
+183655.353073     8258259.178829
+183666.155232     8258242.358929
+183676.308137     8258228.039589
+183684.553284     8258216.835484
+183694.683006     8258205.022351
+183702.916752     8258195.071351
+183712.472373     8258177.613792
+183722.062766     8258156.397304
+183732.911289     8258134.565372
+183741.145035     8258124.614372
+183755.147853     8258100.304864
+183759.026938     8258087.181747
+183759.780702     8258073.404020
+183761.241671     8258050.860981
+183756.985726     8258037.038057
+183752.114917     8258021.956760
+183746.606449     8258008.122535
+183731.095758     8257992.318450
+183721.163083     8257982.830348
+183708.696575     8257976.452217
+183683.821515     8257957.430816
+183665.092775     8257950.996187
+183646.990298     8257944.567207
+183622.016713     8257936.196615
+183598.289856     8257928.463684
+183581.433916     8257922.672364
+183564.578163     8257916.881427
+183557.000000     8257914.277799
+END
+LINE3D
+HEIGHT 1040.000000
+191856.529579     8258937.000000
+191859.574504     8258934.700483
+191875.328611     8258924.190536
+191888.572636     8258914.285122
+191903.044854     8258906.897205
+191914.386727     8258899.480281
+191931.445128     8258883.343620
+191951.536889     8258877.885641
+191979.734313     8258876.260799
+192002.278194     8258876.464190
+192029.832165     8258876.712781
+192049.871000     8258876.893571
+192066.790315     8258875.792626
+192086.870480     8258871.588134
+192111.293336     8258871.808476
+192143.242152     8258870.843892
+192164.574465     8258866.649932
+192179.614798     8258865.532799
+192192.766095     8258865.651450
+192207.162975     8258866.407751
+192218.342571     8258876.533516
+192239.506805     8258890.509368
+192253.208071     8258898.777879
+192261.859437     8258911.387250
+192275.410014     8258935.945728
+192275.491862     8258937.000000
+END
+LINE3D
+HEIGHT 1030.000000
+191546.312349     8258937.000000
+191555.241801     8258930.701207
+191572.289372     8258915.818039
+191593.690464     8258904.106214
+191615.747368     8258889.267476
+191645.922296     8258877.008395
+191666.767625     8258857.773070
+191686.331073     8258841.659010
+191707.779296     8258824.934777
+191726.693489     8258811.321276
+191751.243087     8258797.757852
+191775.799235     8258783.568840
+191800.338002     8258771.258910
+191818.631926     8258757.012635
+191835.667144     8258743.382182
+191859.632001     8258725.427828
+191883.607682     8258706.220745
+191913.811588     8258690.829096
+191934.633741     8258674.099214
+191952.909511     8258661.732779
+191974.317162     8258649.394600
+191993.869014     8258634.534026
+192020.912826     8258622.246697
+192042.384233     8258603.016256
+192061.947680     8258586.902196
+192083.992989     8258573.316943
+192102.901392     8258560.329421
+192128.634343     8258554.295924
+192153.178904     8258541.359633
+192172.046737     8258532.757782
+192190.914567     8258524.156314
+192204.789695     8258513.629798
+192223.043050     8258503.769195
+192236.930531     8258491.989964
+192248.300614     8258481.440848
+192260.291734     8258471.524130
+192272.323426     8258457.221357
+192281.206614     8258444.770182
+192285.815894     8258420.375926
+192286.598444     8258403.465629
+192282.957169     8258390.901459
+192276.202163     8258376.429575
+192270.815209     8258349.438716
+192267.249278     8258328.729563
+192268.031825     8258311.819649
+192269.423059     8258296.794465
+192277.767110     8258274.939937
+192288.012554     8258250.596147
+192293.810990     8258233.104691
+192294.593540     8258216.194395
+192301.713663     8258191.195995
+192302.508566     8258173.032984
+192302.630274     8258159.875968
+192302.746184     8258147.345696
+192301.626576     8258132.924655
+192297.376616     8258118.475372
+192297.527298     8258102.186170
+192297.133049     8258077.119976
+192297.359076     8258052.685791
+192298.159012     8258033.896030
+192308.369681     8258013.311551
+192312.926804     8257994.555687
+192326.194012     8257982.144065
+192342.579980     8257971.013789
+192360.189114     8257963.026995
+192382.112718     8257962.598377
+192396.516157     8257962.728325
+192414.636212     8257967.277841
+192427.647654     8257982.432583
+192436.919293     8257995.674346
+192448.707573     8258007.685223
+192457.353142     8258020.921337
+192467.929083     8258028.535621
+192486.014366     8258036.844066
+192498.504057     8258040.715991
+192514.148044     8258042.110339
+192531.055764     8258042.262880
+192546.091066     8258041.772115
+192562.419082     8258036.906593
+192575.575410     8258036.398876
+192588.105667     8258035.885511
+192605.640221     8258036.043708
+192623.174775     8258036.201904
+192645.718656     8258036.405295
+192665.757491     8258036.586085
+192685.135484     8258040.520155
+192704.520035     8258043.827872
+192729.603733     8258040.294934
+192744.690433     8258034.165387
+192762.891626     8258029.943560
+192789.877483     8258023.921366
+192808.710541     8258019.078827
+192825.038557     8258014.213305
+192840.763679     8258006.836691
+192852.841736     8257987.521886
+192866.751636     8257973.236441
+192886.872374     8257964.645894
+192913.219804     8257959.871149
+192936.395549     8257959.453828
+192961.496636     8257954.041043
+192981.571008     8257950.462911
+193002.276482     8257946.263677
+193027.998607     8257941.483291
+193054.351834     8257936.081803
+193073.196484     8257929.986160
+193089.524497     8257925.121020
+193106.467752     8257921.514639
+193118.998013     8257921.000892
+193144.087508     8257916.841211
+193166.712524     8257908.273640
+193183.063720     8257900.902292
+193200.029395     8257894.789697
+193218.903022     8257885.561486
+193236.570873     8257871.309945
+193256.771982     8257853.948430
+193283.844772     8257838.528532
+193304.643741     8257824.304857
+193326.056422     8257811.340311
+193342.472132     8257797.077473
+193357.634172     8257782.803325
+193374.049886     8257768.540105
+193391.757541     8257749.902885
+193404.484847     8257728.087903
+193417.148401     8257713.164801
+193427.916362     8257700.103835
+193440.562529     8257687.060197
+193450.709449     8257673.367215
+193461.459256     8257662.186090
+193472.238804     8257647.872403
+193487.383459     8257635.477719
+193500.679645     8257619.933529
+193515.824300     8257607.538845
+193534.083449     8257597.051881
+193557.352689     8257586.610119
+193576.220518     8257578.008651
+193595.059374     8257572.539368
+193614.524300     8257567.075734
+193637.734817     8257562.899483
+193660.325064     8257558.090459
+193681.042892     8257552.638511
+193700.513612     8257546.548516
+193721.863307     8257540.475474
+193741.936918     8257536.896952
+193762.614176     8257535.830676
+193786.422553     8257534.792267
+193805.209248     8257534.961760
+193822.116967     8257535.114301
+193835.273298     8257534.606202
+193849.676736     8257534.736150
+193862.827269     8257534.854794
+193886.624055     8257535.069488
+193903.525977     8257535.848772
+193917.267808     8257539.731993
+193932.911795     8257541.126341
+193947.274664     8257545.641961
+193959.103510     8257553.267548
+193974.057677     8257561.547745
+193987.787917     8257566.684070
+193997.714608     8257576.798531
+194010.070999     8257595.080575
+194016.136181     8257616.438689
+194019.644160     8257643.412597
+194019.528250     8257655.942869
+194004.916938     8257678.367267
+193990.948319     8257698.917841
+193986.420174     8257714.541137
+193981.915210     8257727.658607
+193981.660209     8257755.224978
+193980.239232     8257773.382723
+193980.007411     8257798.443269
+193979.665473     8257835.407726
+193975.119943     8257852.910486
+193974.354782     8257867.940936
+193972.858464     8257894.243282
+193968.359297     8257906.734009
+193968.191226     8257924.903057
+193966.781841     8257941.807699
+193962.195741     8257963.696130
+193960.816102     8257977.467828
+193959.377739     8257997.505037
+193957.812639     8258031.325630
+193952.593910     8258053.834767
+193944.308580     8258069.424165
+193942.939764     8258081.943135
+193930.844322     8258103.137404
+193921.880763     8258124.359547
+193901.655706     8258144.227263
+193889.050104     8258152.885612
+193865.109195     8258168.333766
+193843.695750     8258181.298305
+193822.346055     8258187.371348
+193800.393470     8258190.932917
+193774.660518     8258196.966414
+193752.076071     8258201.148313
+193733.869080     8258205.996883
+193717.500498     8258215.247695
+193705.428240     8258233.935757
+193699.566055     8258258.318711
+193693.187913     8258270.792486
+193684.327905     8258280.737835
+193674.192577     8258293.177713
+193664.063047     8258304.990848
+193653.306678     8258316.798710
+193644.447438     8258326.743684
+193633.685276     8258339.177906
+193617.252941     8258355.320597
+193597.005468     8258377.694146
+193579.378187     8258387.560014
+193564.939973     8258391.189378
+193547.997482     8258394.795766
+193531.089763     8258394.643225
+193509.171953     8258394.445482
+193490.460599     8258386.131388
+193478.620162     8258379.758905
+193461.792817     8258370.835013
+193446.247351     8258358.790239
+193434.459839     8258346.778986
+193425.176605     8258334.790710
+193412.773850     8258321.520698
+193391.632792     8258305.039403
+193369.801915     8258295.443956
+193354.818770     8258290.296327
+193332.999484     8258279.447777
+193321.147455     8258274.328397
+193306.158516     8258269.807129
+193293.645644     8258268.441030
+193271.095970     8258268.864000
+193252.888978     8258273.712570
+193235.279848     8258281.698981
+193218.928651     8258289.070329
+193206.334645     8258296.475191
+193198.065936     8258310.185118
+193191.079109     8258320.773780
+193179.006851     8258339.461842
+193162.615085     8258351.218862
+193147.516033     8258358.601123
+193129.929318     8258364.081703
+193112.395528     8258363.923513
+193093.608834     8258363.754020
+193078.567734     8258364.871528
+193048.404398     8258375.877505
+193021.378736     8258386.285377
+192997.506609     8258394.215283
+192981.155413     8258401.586631
+192969.749794     8258415.894669
+192960.890555     8258425.839643
+192950.099414     8258441.406434
+192947.321978     8258470.830051
+192942.759059     8258490.212658
+192941.964920     8258508.375676
+192940.561329     8258524.653956
+192936.038982     8258539.650509
+192934.526043     8258567.832326
+192929.973951     8258585.961822
+192925.411031     8258605.344428
+192920.864740     8258622.846799
+192913.848932     8258636.568412
+192903.702016     8258650.261011
+192885.413893     8258663.880160
+192868.401851     8258675.005171
+192853.308593     8258681.761072
+192831.982081     8258685.327907
+192814.413513     8258688.929411
+192784.922611     8258694.929004
+192756.075933     8258699.054405
+192737.277650     8258700.137633
+192717.186654     8258705.595619
+192705.201328     8258714.885976
+192685.678447     8258726.614747
+192667.987416     8258743.372113
+192653.450678     8258757.652285
+192638.978461     8258765.040202
+192625.114160     8258774.313608
+192608.716600     8258786.696988
+192588.544465     8258800.926317
+192573.387458     8258814.573715
+192563.246329     8258827.640719
+192553.713894     8258842.591688
+192549.179184     8258858.842102
+192543.984404     8258878.845038
+192539.449701     8258895.094687
+192534.266508     8258913.844903
+192529.781035     8258937.000000
+END
+LINE3D
+HEIGHT 1010.000000
+187460.099470     8258937.000000
+187463.152225     8258931.376393
+187477.050915     8258918.344055
+187490.960811     8258904.058992
+187503.554825     8258896.653365
+187519.906400     8258889.282404
+187529.995368     8258881.854176
+187538.234714     8258871.277196
+187542.734263     8258858.786473
+187544.125880     8258843.761293
+187544.311334     8258823.713162
+187544.531567     8258799.905338
+187543.400748     8258786.737404
+187539.133020     8258774.167582
+187533.682696     8258754.068605
+187528.823676     8258737.733441
+187523.413535     8258713.249172
+187511.161466     8258683.689576
+187501.941984     8258664.809420
+187493.940254     8258649.699493
+187489.666725     8258637.756797
+187481.636017     8258625.779438
+187476.127361     8258611.944830
+187469.998423     8258597.478977
+187465.162580     8258578.638370
+187461.521304     8258566.074200
+187454.829670     8258544.710434
+187442.490664     8258524.548925
+187435.729865     8258510.703403
+187425.252063     8258492.438690
+187416.623880     8258477.323111
+187407.387013     8258460.322419
+187402.551170     8258441.481813
+187397.674757     8258427.026878
+187390.919752     8258412.554994
+187381.653907     8258398.686871
+187377.397771     8258384.863945
+187368.786970     8258367.869285
+187366.404015     8258354.689672
+187355.897236     8258339.557527
+187350.371191     8258327.602765
+187344.880300     8258311.889078
+187342.531735     8258294.950533
+187338.896253     8258281.760002
+187334.645911     8258267.310716
+187329.810068     8258248.470109
+187333.717940     8258232.214422
+187345.082608     8258222.292052
+187361.335661     8258225.571517
+187373.807967     8258231.322905
+187387.509225     8258239.592181
+187399.969939     8258246.596674
+187414.900923     8258257.383078
+187429.222844     8258266.283984
+187439.167299     8258274.519366
+187454.706967     8258287.190883
+187476.990049     8258315.587387
+187494.907264     8258342.064499
+187509.814682     8258355.357108
+187523.498941     8258365.505469
+187534.052080     8258375.625963
+187545.190724     8258390.137396
+187558.799642     8258408.430358
+187573.028832     8258427.355711
+187585.901177     8258457.547316
+187594.488794     8258477.048184
+187603.128569     8258490.910659
+187611.153100     8258503.514375
+187621.063169     8258515.508307
+187628.479017     8258526.226909
+187639.008594     8258538.853226
+187648.889685     8258553.979726
+187656.920011     8258565.957081
+187666.869878     8258573.566098
+187681.806660     8258583.725760
+187693.658693     8258588.844757
+187706.130994     8258594.596528
+187718.597502     8258600.974660
+187732.321945     8258606.737728
+187747.931156     8258611.891388
+187764.173004     8258616.423577
+187776.651100     8258621.548988
+187795.959550     8258633.000916
+187816.491155     8258647.597474
+187838.293055     8258660.325489
+187850.127698     8258667.324333
+187865.742711     8258671.850867
+187880.725852     8258676.998878
+187893.209750     8258681.497164
+187906.882031     8258692.899007
+187921.215926     8258700.546813
+187934.325886     8258705.051511
+187951.188010     8258710.215709
+187967.429086     8258714.748656
+187983.699147     8258716.148271
+188006.805348     8258723.248807
+188028.039133     8258729.706037
+188039.879570     8258736.078520
+188053.609807     8258741.215228
+188066.053131     8258750.099567
+188089.142708     8258759.079957
+188102.217903     8258767.342819
+188115.293092     8258775.606447
+188128.995122     8258783.874964
+188140.817406     8258792.127288
+188156.293325     8258811.690302
+188163.054885     8258825.536214
+188170.424369     8258841.266850
+188177.811242     8258855.117639
+188183.343081     8258866.446039
+188199.497231     8258880.375926
+188219.415126     8258893.713357
+188233.783028     8258897.602227
+188250.030663     8258901.508820
+188271.315845     8258902.327267
+188286.936652     8258906.227441
+188311.318942     8258910.833073
+188326.922359     8258916.613093
+188345.610525     8258927.433777
+188369.952250     8258936.424699
+188371.018232     8258937.000000
+END
+LINE3D
+HEIGHT 1010.000000
+189073.089853     8258937.000000
+189085.824139     8258932.231969
+189104.651399     8258928.016173
+189120.353345     8258923.145002
+189138.571160     8258917.043704
+189156.186853     8258908.430557
+189166.913480     8258899.755256
+189177.043771     8258887.942511
+189189.678351     8258876.151594
+189202.967978     8258861.233757
+189216.889470     8258845.695209
+189231.449385     8258828.909594
+189250.392563     8258812.162760
+189268.692281     8258797.290124
+189281.958725     8258784.878495
+189291.433204     8258776.192663
+189303.441713     8258764.396098
+189313.037904     8258742.552867
+189323.306532     8258715.702870
+189327.243378     8258696.314997
+189334.914226     8258679.467229
+189340.057617     8258665.102310
+189350.876971     8258646.402944
+189362.323159     8258627.709234
+189377.503350     8258611.555628
+189391.413254     8258597.269801
+189401.594942     8258579.818273
+189409.846265     8258567.987810
+189420.607663     8258555.553581
+189440.166081     8258540.065888
+189451.512984     8258532.022597
+189463.480920     8258524.612086
+189476.672023     8258520.345058
+189491.747895     8258515.468621
+189508.667206     8258514.368059
+189529.344467     8258513.301401
+189542.506592     8258512.166941
+189555.668717     8258511.032481
+189568.831603     8258509.898410
+189583.900917     8258505.648327
+189596.436972     8258504.508219
+189623.956171     8258508.515740
+189644.592864     8258511.834753
+189659.622372     8258511.970349
+189684.682886     8258510.943619
+189709.249866     8258495.501113
+189723.740237     8258486.233356
+189745.756572     8258475.780290
+189765.917115     8258462.804064
+189782.941510     8258450.426340
+189794.938424     8258439.883261
+189805.699822     8258427.449031
+189816.438040     8258417.520627
+189832.807387     8258408.269822
+189854.759969     8258404.708635
+189869.782919     8258405.470585
+189887.891382     8258411.273206
+189901.639772     8258414.530073
+189919.109813     8258421.579760
+189940.349391     8258427.410629
+189963.484571     8258431.378597
+189977.888009     8258431.508545
+189996.094997     8258426.660357
+190011.165075     8258422.410281
+190026.861223     8258418.165853
+190048.239131     8258408.960236
+190059.598387     8258399.664230
+190070.951844     8258390.994967
+190083.534263     8258384.842826
+190094.284069     8258373.661700
+190104.378832     8258365.607112
+190114.485182     8258356.299802
+190125.241547     8258344.492323
+190135.997151     8258332.684454
+190150.504909     8258321.537233
+190165.000309     8258311.643108
+190178.232746     8258302.990415
+190191.447029     8258296.217562
+190205.310565     8258286.944149
+190218.507465     8258282.050378
+190232.325399     8258277.789388
+190248.647618     8258273.550609
+190271.197296     8258273.127256
+190286.232599     8258272.636491
+190301.888177     8258272.777736
+190313.711229     8258281.029684
+190328.026970     8258290.557329
+190337.948627     8258301.298540
+190351.615114     8258313.326744
+190364.075828     8258320.331237
+190375.916266     8258326.703720
+190388.411751     8258329.949284
+190405.945541     8258330.107473
+190429.116256     8258330.316519
+190452.326776     8258326.139886
+190464.920786     8258318.734642
+190476.894520     8258310.697388
+190490.103009     8258304.550895
+190509.596909     8258295.955075
+190526.545962     8258291.721952
+190537.869681     8258286.184868
+190552.302097     8258283.182247
+190570.468515     8258282.719731
+190593.018194     8258282.296379
+190617.493207     8258276.878328
+190631.269811     8258277.002620
+190648.850728     8258272.148784
+190664.506307     8258272.290029
+190680.196661     8258268.671962
+190695.904398     8258263.174813
+190711.623729     8258256.424178
+190729.853901     8258249.069782
+190747.451440     8258242.336475
+190764.400493     8258238.103351
+190779.516170     8258228.841235
+190799.642702     8258219.624328
+190810.972216     8258213.460883
+190823.560428     8258206.682381
+190848.099194     8258194.372451
+190861.301889     8258188.852319
+190876.400944     8258181.469675
+190892.746343     8258174.725071
+190907.828013     8258169.221891
+190926.063978     8258161.241135
+190943.023855     8258155.755283
+190963.179365     8258143.405807
+190975.170488     8258133.488706
+190988.396363     8258125.462749
+191002.248308     8258117.442441
+191019.881386     8258106.949829
+191037.542678     8258093.324642
+191048.919319     8258082.149172
+191066.598762     8258066.644527
+191079.239135     8258054.227250
+191086.231756     8258043.012227
+191091.380177     8258028.020940
+191095.932265     8258009.891827
+191096.709022     8257993.607891
+191098.790840     8257971.696866
+191099.538615     8257958.545881
+191099.666117     8257944.762504
+191099.793620     8257930.979127
+191094.968986     8257910.885413
+191085.703138     8257897.017672
+191076.402521     8257886.908478
+191060.799100     8257881.128840
+191045.775389     8257880.366501
+191034.428490     8257888.409410
+191024.954004     8257897.096008
+191014.847653     8257906.403317
+191007.825291     8257920.750901
+191002.676870     8257935.742188
+190998.182736     8257947.606165
+190992.419837     8257961.338699
+190987.276450     8257975.703235
+190978.346895     8257993.166825
+190968.808660     8258008.744920
+190952.370534     8258025.513589
+190941.005481     8258035.436338
+190930.899131     8258044.743648
+190918.287735     8258054.028357
+190899.373538     8258067.642240
+190883.636824     8258076.271957
+190869.205172     8258079.274585
+190868.097156     8258063.600440
+190869.523926     8258044.816335
+190879.665049     8258031.750096
+190891.064109     8258018.068411
+190901.843658     8258003.754724
+190908.842076     8257991.912958
+190915.915835     8257971.926591
+190923.593246     8257954.452087
+190929.988774     8257940.098848
+190938.337854     8257917.617953
+190944.084131     8257905.764890
+190949.210133     8257893.279818
+190961.293219     8257873.338645
+190969.608292     8257854.616686
+190977.894387     8257839.027294
+190984.910191     8257825.306064
+190993.160746     8257813.475977
+191001.412069     8257801.645515
+191010.973484     8257783.561595
+191016.760332     8257767.322860
+191010.666168     8257749.097697
+191000.147418     8257735.218270
+190989.681594     8257715.700074
+190981.662092     8257702.469990
+190973.631766     8257690.492635
+190963.118810     8257675.986848
+190953.221097     8257662.739819
+190939.525633     8257653.844183
+190927.070717     8257646.212947
+190912.058594     8257644.197887
+190888.261808     8257643.983192
+190866.965035     8257644.417849
+190845.597954     8257652.370356
+190826.104054     8257660.966176
+190809.131817     8257667.705507
+190783.393071     8257674.365365
+190765.916473     8257667.942032
+190761.075214     8257649.728172
+190766.212043     8257635.989989
+190766.362729     8257619.700405
+190757.096881     8257605.832664
+190757.241769     8257590.169823
+190757.375069     8257575.759703
+190774.329916     8257570.900219
+190790.727476     8257558.516839
+190808.980827     8257548.656618
+190821.586429     8257539.998270
+190841.723789     8257529.528251
+190859.356864     8257519.036022
+190870.761722     8257504.727594
+190880.259388     8257493.535172
+190884.260751     8257467.255426
+190885.078073     8257446.586201
+190884.689618     8257420.893646
+190883.552624     8257408.352070
+190878.693983     8257392.017291
+190871.961393     8257375.039576
+190869.573023     8257362.486710
+190863.490455     8257343.008059
+190859.848415     8257330.443882
+190855.604249     8257315.368239
+190851.412248     8257294.653437
+190846.512270     8257282.704706
+190837.901473     8257265.709663
+190832.410200     8257249.995973
+190827.586331     8257229.902266
+190823.324015     8257216.706079
+190818.482760     8257198.491837
+190809.234301     8257182.744249
+190804.398076     8257163.903639
+190800.177094     8257146.321788
+190797.851708     8257126.877417
+190809.813854     8257120.092885
+190826.709981     8257121.498530
+190836.654058     8257129.733526
+190846.535146     8257144.860408
+190859.540791     8257160.641893
+190870.650075     8257178.285890
+190881.748531     8257197.182998
+190889.733258     8257214.172393
+190901.480204     8257230.568935
+190910.137365     8257242.551945
+190920.069849     8257252.040045
+190928.089351     8257265.270128
+190936.734920     8257278.506243
+190946.638427     8257291.126911
+190955.944842     8257300.609362
+190967.721530     8257313.873342
+190977.648220     8257323.987803
+190994.463209     8257334.164794
+191005.016734     8257344.284907
+191024.313588     8257356.990322
+191037.429346     8257360.868277
+191050.504539     8257369.131522
+191062.333384     8257376.757109
+191083.532397     8257386.973268
+191095.384427     8257392.092648
+191109.746531     8257396.608261
+191130.377429     8257400.553635
+191144.142441     8257401.931031
+191158.505310     8257406.446651
+191170.995001     8257410.318575
+191194.112791     8257416.166390
+191219.788551     8257416.398036
+191233.565155     8257416.522328
+191247.335964     8257417.272981
+191261.733605     8257418.029672
+191284.903556     8257418.238711
+191303.064180     8257418.402556
+191317.467618     8257418.532503
+191332.543491     8257413.656067
+191345.734593     8257409.389039
+191360.172042     8257405.759668
+191372.116799     8257400.854983
+191394.701249     8257396.672701
+191407.852546     8257396.791352
+191426.645035     8257396.334485
+191441.673779     8257396.470074
+191458.570671     8257397.875725
+191471.089340     8257398.615082
+191485.532583     8257394.359350
+191492.607104     8257374.373373
+191493.488178     8257346.812268
+191494.891001     8257330.534363
+191500.028595     8257316.796187
+191510.123353     8257308.741982
+191525.268772     8257296.347305
+191542.814154     8257295.252391
+191554.793685     8257286.588394
+191570.536197     8257277.331933
+191580.642548     8257268.024624
+191600.206759     8257251.910571
+191618.552077     8257232.025896
+191625.557053     8257219.557776
+191631.401088     8257197.054280
+191641.641503     8257173.336858
+191653.730383     8257152.769324
+191662.601978     8257141.571253
+191677.747398     8257129.176576
+191689.750109     8257118.006754
+191702.361505     8257108.722045
+191720.649632     8257095.102514
+191731.364667     8257087.680317
+191743.993448     8257076.516143
+191766.009783     8257066.063077
+191778.569018     8257062.417144
+191801.188240     8257054.475933
+191813.127202     8257050.197608
+191824.457480     8257044.034171
+191837.689152     8257035.381471
+191847.163635     8257026.695256
+191854.173645     8257013.600386
+191866.814018     8257001.183109
+191878.144296     8256995.019671
+191893.300542     8256981.371883
+191906.509795     8256975.225398
+191919.132780     8256964.687967
+191929.876792     8256954.133202
+191969.787004     8256904.994410
+191985.599063     8256888.219710
+192003.289329     8256871.462337
+192033.000464     8256841.654920
+192046.887181     8256829.875682
+192058.287006     8256816.194004
+192078.023025     8256785.514335
+END
+LINE3D
+HEIGHT 1010.000000
+191160.220704     8258937.000000
+191165.047281     8258933.446537
+191178.916611     8258923.546764
+191192.756964     8258916.779559
+191204.081448     8258911.242482
+191219.777593     8258906.998437
+191234.870850     8258900.242536
+191256.249523     8258891.036925
+191276.369497     8258882.446371
+191293.985190     8258873.833224
+191310.336383     8258866.462259
+191326.125261     8258852.193383
+191344.413385     8258838.574234
+191362.080474     8258824.322304
+191382.850466     8258813.231198
+191398.621956     8258800.842169
+191413.755779     8258789.700979
+191424.534567     8258775.386902
+191439.053916     8258762.986577
+191451.102227     8258746.804716
+191464.404207     8258730.634165
+191478.389448     8258708.204119
+191494.213098     8258690.176315
+191508.105613     8258677.770334
+191521.361233     8258666.611433
+191536.546453     8258649.831460
+191544.177500     8258637.368989
+191552.468625     8258621.153230
+191558.904722     8258602.414318
+191567.185023     8258587.451288
+191576.068211     8258575.000113
+191585.589060     8258561.301483
+191602.015597     8258545.785535
+191621.555865     8258532.177300
+191639.264284     8258513.540087
+191657.558205     8258499.294195
+191668.418128     8258476.209157
+191678.617206     8258456.877782
+191686.868529     8258445.047320
+191699.508902     8258432.630042
+191712.126093     8258422.718972
+191722.267218     8258409.652352
+191733.051797     8258394.712297
+191743.257436     8258374.754186
+191754.818771     8258343.530196
+191763.777299     8258322.934420
+191772.747420     8258301.085541
+191781.665383     8258284.875055
+191789.962305     8258268.032553
+191798.236808     8258253.696266
+191805.942432     8258233.089186
+191810.477135     8258216.839537
+191818.124807     8258202.497212
+191823.285580     8258186.253211
+191827.158677     8258173.756836
+191831.686821     8258158.133540
+191826.833975     8258141.172401
+191815.005129     8258133.546814
+191801.262533     8258129.663586
+191797.006779     8258115.840664
+191797.145869     8258100.804566
+191802.300849     8258085.186926
+191811.792721     8258074.620864
+191828.161303     8258065.370052
+191842.639318     8258057.355392
+191855.802207     8258056.220939
+191874.600493     8258055.137328
+191902.118929     8258059.144842
+191917.142640     8258059.907181
+191939.727090     8258055.724900
+191953.579799     8258047.704598
+191980.640232     8258033.537797
+191993.872669     8258024.885104
+192012.102076     8258017.530702
+192029.074309     8258010.791752
+192041.024863     8258005.260324
+192052.360170     8257998.470519
+192063.696246     8257991.680338
+192076.313436     8257981.769268
+192088.275578     8257974.985118
+192097.767450     8257964.419056
+192103.559326     8257947.553954
+192104.365821     8257928.137839
+192111.404809     8257911.910401
+192112.175767     8257896.253209
+192112.981497     8257876.837087
+192113.132183     8257860.547503
+192113.311843     8257841.125733
+192121.574755     8257828.042549
+192144.159205     8257823.860268
+192159.826375     8257822.748408
+192177.360929     8257822.906605
+192194.888925     8257823.691155
+192215.687891     8257809.467863
+192235.233952     8257795.233268
+192247.219278     8257785.942910
+192258.606747     8257773.514329
+192274.976093     8257764.263524
+192291.941768     8257758.150929
+192317.709491     8257748.358503
+192330.326685     8257738.447051
+192344.202577     8257727.920542
+192358.066114     8257718.647129
+192370.057233     8257708.730411
+192387.022908     8257702.617816
+192404.603826     8257697.763980
+192424.723800     8257689.173426
+192444.188722     8257683.710174
+192460.540683     8257676.338833
+192476.862901     8257672.100054
+192493.845961     8257664.107995
+192515.833319     8257656.787497
+192539.676468     8257651.990158
+192559.181963     8257642.140852
+192574.889700     8257636.643703
+192593.716964     8257632.427524
+192616.979642     8257622.612498
+192638.358314     8257613.406887
+192665.367355     8257604.878486
+192682.327235     8257599.392252
+192701.171885     8257593.296609
+192718.144118     8257586.557660
+192741.992300     8257581.133571
+192763.353584     8257573.807807
+192792.206063     8257569.055280
+192811.050713     8257562.959637
+192831.756949     8257558.760793
+192845.579919     8257553.872670
+192860.649994     8257549.622977
+192875.725869     8257544.746158
+192900.224066     8257536.821899
+192920.349834     8257527.604985
+192937.982913     8257517.112373
+192951.875427     8257504.706392
+192966.417956     8257489.800242
+192981.608974     8257472.393526
+192994.272531     8257457.470041
+193011.337495     8257440.706644
+193027.735054     8257428.323264
+193044.758684     8257415.945532
+193057.393260     8257404.154998
+193069.407564     8257391.732072
+193081.445050     8257376.802939
+193094.085424     8257364.385662
+193102.962817     8257352.560848
+193114.303919     8257345.144682
+193127.559539     8257333.985781
+193147.708487     8257322.263041
+193166.616890     8257309.275519
+193179.245672     8257298.111345
+193192.529501     8257283.820252
+193200.166343     8257270.731420
+193208.451673     8257255.142022
+193213.021151     8257235.133061
+193214.447158     8257216.348949
+193218.355030     8257200.093262
+193225.997665     8257186.378069
+193232.410582     8257170.144983
+193243.166183     8257158.337496
+193253.324695     8257143.391411
+193267.217973     8257130.985437
+193278.657603     8257112.918080
+193293.176952     8257100.517755
+193300.175367     8257088.676372
+193312.862104     8257071.247062
+193329.294439     8257055.104370
+193348.782545     8257047.134911
+193364.438123     8257047.276155
+193380.720537     8257047.423055
+193397.002186     8257047.569948
+193410.778789     8257047.694240
+193425.808298     8257047.829836
+193442.089947     8257047.976729
+193456.493385     8257048.106677
+193470.890265     8257048.862978
+193484.656041     8257050.240381
+193500.908713     8257053.519842
+193518.443267     8257053.678038
+193538.482102     8257053.858829
+193560.434684     8257050.297642
+193574.211287     8257050.421934
+193589.246594     8257049.930787
+193613.136106     8257040.121416
+193628.264139     8257029.606203
+193642.707383     8257025.350472
+193664.677351     8257019.909821
+193682.304635     8257010.043570
+193697.374710     8257005.793876
+193713.082450     8257000.296345
+193725.032239     8256994.764909
+193740.073336     8256993.647784
+193752.597799     8256993.760779
+193774.446066     8257001.476379
+193800.051515     8257009.226259
+193816.925223     8257013.138118
+193831.293125     8257017.026988
+193844.444423     8257017.145639
+193856.968886     8257017.258634
+193879.663449     8257001.172823
+193892.883529     8256993.773227
+193907.327537     8256989.517502
+193923.620778     8256988.411292
+193938.035044     8256987.288128
+193958.121007     8256982.456893
+193970.651264     8256981.943528
+193983.216296     8256977.670851
+193995.792920     8256972.145071
+194012.167296     8256962.267898
+194029.161949     8256953.022735
+194048.668205     8256943.173818
+194061.916499     8256932.641647
+194077.670602     8256922.132083
+194089.668284     8256911.588628
+194100.394907     8256902.913710
+194121.182285     8256889.943140
+194142.571785     8256879.484418
+194157.021587     8256874.602333
+194171.465595     8256870.346609
+194190.287061     8256866.757173
+194207.206372     8256865.656610
+194225.360434     8256866.447192
+194242.848625     8256871.617421
+194269.706979     8256879.378604
+194282.858277     8256879.497255
+194296.008046     8256879.615892
+194319.799037     8256880.456947
+194341.159560     8256873.130793
+194363.164303     8256863.930831
+194377.666266     8256853.409970
+194400.332616     8256840.456734
+194420.440998     8256833.119284
+194433.673431     8256824.466973
+194443.767429     8256816.412378
+194453.874544     8256807.105075
+194464.595372     8256799.056518
+194474.069855     8256790.370303
+194482.940690     8256779.171843
+194498.781723     8256759.264957
+194503.322988     8256742.388571
+194508.476438     8256726.770917
+194519.320504     8256705.565358
+194529.455068     8256693.125473
+194537.694799     8256682.548114
+194545.313490     8256671.338740
+194552.330059     8256657.617516
+194556.231369     8256641.988566
+194557.612537     8256628.216882
+194558.423300     8256608.174010
+194557.948680     8256591.878785
+194553.060294     8256578.676950
+194541.932860     8256562.912411
+194530.162734     8256549.021694
+194524.051184     8256532.675994
+194519.776516     8256520.732523
+194518.646080     8256507.564592
+194528.172723     8256493.239602
+194545.730461     8256490.891591
+194561.391834     8256490.406474
+194583.234303     8256498.748817
+194600.768857     8256498.907014
+194627.174243     8256487.867132
+194643.572567     8256475.483759
+194661.186731     8256466.870598
+194673.751763     8256462.597922
+194686.949424     8256457.704540
+194700.749211     8256455.322625
+194723.317036     8256453.020197
+194750.957176     8256443.871077
+194767.899671     8256440.264307
+194787.992193     8256434.806717
+194807.450556     8256429.969819
+194824.393051     8256426.363049
+194846.386203     8256418.416190
+194859.543294     8256417.908481
+194876.503175     8256412.422246
+194894.084092     8256407.568410
+194908.539692     8256402.059582
+194926.126404     8256396.579385
+194941.874713     8256386.696182
+194960.138892     8256375.582850
+194975.277752     8256363.814527
+194989.785509     8256352.667306
+195004.322244     8256338.387516
+195017.000000     8256328.706466
+END
+LINE3D
+HEIGHT 1010.000000
+195017.000000     8257709.622469
+195016.678964     8257710.678384
+195012.787717     8257725.054218
+195003.203118     8257745.644345
+194993.595335     8257768.740679
+194984.602796     8257793.095773
+194980.103629     8257805.586500
+194973.081266     8257819.934084
+194962.366231     8257827.356281
+194952.264914     8257836.036841
+194939.670904     8257843.442085
+194906.395367     8257852.540363
+194875.628377     8257861.034860
+194854.331607     8257861.469134
+194839.266559     8257865.092842
+194824.232020     8257865.583613
+194811.045951     8257869.223892
+194794.695519     8257876.595246
+194773.942916     8257885.806505
+194759.469931     8257893.194798
+194740.642667     8257897.410976
+194728.083432     8257901.056910
+194711.100372     8257909.048970
+194693.473087     8257918.915221
+194675.834215     8257930.034193
+194662.603307     8257938.686900
+194639.977527     8257947.254464
+194625.516133     8257953.389653
+194612.262045     8257964.548185
+194598.375325     8257976.327805
+194591.968206     8257991.934148
+194583.676317     8258008.149900
+194572.247514     8258024.964147
+194559.554979     8258043.020200
+194547.518260     8258057.948957
+194536.112638     8258072.257378
+194520.317969     8258087.152232
+194502.609549     8258105.789445
+194482.941015     8258133.181049
+194464.566720     8258156.198293
+194450.674206     8258168.604273
+194439.918605     8258180.411760
+194429.765127     8258194.731095
+194416.474735     8258209.648924
+194400.048962     8258225.164880
+194386.764368     8258239.455966
+194370.946515     8258256.857027
+194360.185116     8258269.291257
+194351.314282     8258280.489717
+194339.281828     8258294.792100
+194327.864617     8258310.353242
+194314.575758     8258325.270703
+194300.039020     8258339.550876
+194284.284920     8258350.060057
+194262.268585     8258360.513123
+194241.440641     8258377.868984
+194224.376441     8258394.632387
+194212.988208     8258407.060961
+194200.359427     8258418.225135
+194188.982782     8258429.400988
+194176.336614     8258442.444626
+194160.541941     8258457.339862
+194142.277762     8258468.453193
+194128.373657     8258482.112277
+194123.241861     8258495.223710
+194107.377645     8258517.636803
+194092.771363     8258539.434833
+194076.953506     8258556.836277
+194065.559479     8258569.891212
+194061.681353     8258583.013955
+194059.042243     8258597.401467
+194050.653362     8258624.267659
+194050.514268     8258639.304139
+194047.869364     8258654.318012
+194038.296356     8258673.655036
+194033.779800     8258688.025610
+194024.218381     8258706.109911
+194009.617901     8258727.280816
+193998.862296     8258739.088685
+193993.110224     8258751.568108
+193976.057617     8258767.078408
+193962.239676     8258771.340163
+193936.547297     8258772.987606
+193921.506194     8258774.105496
+193907.103520     8258773.975555
+193890.195036     8258773.823007
+193874.539457     8258773.681763
+193855.752763     8258773.512270
+193838.213179     8258773.980441
+193822.546012     8258775.091918
+193807.504908     8258776.209808
+193791.194281     8258779.195483
+193772.355433     8258784.664001
+193744.702933     8258795.066600
+193718.854071     8258813.630370
+193694.222577     8258835.964366
+193672.125107     8258855.188393
+193651.256594     8258876.929925
+193624.799044     8258893.608965
+193598.364684     8258907.781032
+193574.446194     8258920.722971
+193554.291448     8258933.072454
+193544.093042     8258937.000000
+END
+LINE3D
+HEIGHT 1010.000000
+195017.000000     8258791.327309
+195015.471374     8258788.987302
+195005.545448     8258778.872848
+194996.337555     8258758.739971
+194990.920862     8258734.881290
+194989.252053     8258712.310014
+194989.431713     8258692.888244
+194992.701923     8258677.880012
+195006.019764     8258659.829601
+195012.397906     8258647.355826
+195017.000000     8258643.311692
+END
+LINE3D-MASTER
+HEIGHT 1000.000000
+191735.510603     8257221.552377
+191709.685698     8257264.802811
+191699.561193     8257275.989961
+191687.530269     8257290.292358
+191680.531090     8257302.133735
+191668.523345     8257313.930306
+191659.043065     8257323.243264
+191648.889586     8257337.562600
+191639.879661     8257363.797158
+191629.731976     8257377.490133
+191627.100193     8257391.250916
+191621.939420     8257407.494916
+191619.312670     8257420.628950
+191614.146863     8257437.499700
+191611.502723     8257452.513580
+191602.567378     8257470.603148
+191597.290691     8257499.377804
+191586.540884     8257510.558930
+191560.726794     8257525.363771
+191549.367538     8257534.659777
+191540.507534     8257544.604744
+191524.167930     8257550.722987
+191508.500759     8257551.834847
+191492.897342     8257546.054827
+191477.954766     8257536.521526
+191460.444157     8257533.857511
+191438.543736     8257531.779922
+191426.019273     8257531.666927
+191413.494810     8257531.553931
+191397.213161     8257531.407038
+191382.183652     8257531.271442
+191367.154144     8257531.135846
+191352.756499     8257530.379538
+191331.465524     8257530.187451
+191318.941061     8257530.074456
+191304.537622     8257529.944508
+191288.244382     8257531.050719
+191272.559825     8257534.042043
+191254.996294     8257537.016415
+191237.421935     8257541.243897
+191222.328677     8257547.999798
+191209.769442     8257551.645732
+191197.198612     8257556.545151
+191184.598808     8257564.576757
+191175.101141     8257575.769179
+191169.847638     8257602.037627
+191165.974541     8257614.534003
+191159.561627     8257630.766707
+191155.016097     8257648.269467
+191154.261760     8257662.047188
+191155.398754     8257674.588765
+191160.297964     8257686.537871
+191170.202236     8257699.158546
+191176.986219     8257710.497861
+191191.783906     8257735.694003
+191199.831621     8257745.791511
+191222.735740     8257774.820414
+191235.770363     8257787.469331
+191242.560140     8257798.182285
+191253.739736     8257808.308049
+191263.643243     8257820.928717
+191271.644591     8257836.038640
+191275.280837     8257849.229178
+191284.477134     8257870.615542
+191291.203162     8257888.219993
+191293.476387     8257913.303139
+191293.302521     8257932.098549
+191294.438751     8257944.640118
+191294.259091     8257964.061888
+191294.096817     8257981.604194
+191294.525838     8258002.911459
+191294.328788     8258024.213076
+191293.557830     8258039.870268
+191285.289124     8258053.579813
+191278.910982     8258066.053588
+191271.912564     8258077.895354
+191263.621439     8258094.111113
+191252.169453     8258113.431566
+191240.781220     8258125.860141
+191229.411137     8258136.409257
+191218.666364     8258146.963633
+191206.658619     8258158.760205
+191194.006654     8258172.430586
+191181.980759     8258186.106615
+191169.989639     8258196.023334
+191159.860105     8258207.836851
+191150.976917     8258220.288025
+191138.295978     8258237.090592
+191125.655604     8258249.507870
+191111.165233     8258258.775627
+191094.756082     8258272.412110
+191080.857770     8258285.444834
+191069.510106     8258293.487736
+191058.169001     8258300.904285
+191044.930771     8258310.183338
+191034.215739     8258317.605153
+191019.099298     8258326.867261
+191001.466984     8258337.359880
+190979.439057     8258349.066050
+190958.651682     8258362.036238
+190944.149719     8258372.557099
+190927.699999     8258390.579255
+190917.599446     8258399.259822
+190906.245985     8258407.929467
+190893.031702     8258414.702320
+190870.412480     8258422.643530
+190849.584533     8258439.999773
+190835.077540     8258451.147001
+190823.683513     8258464.201936
+190812.307636     8258475.377413
+190796.536147     8258487.766442
+190780.166800     8258497.017247
+190765.752535     8258498.140410
+190740.060152     8258499.788235
+190718.130750     8258500.843596
+190696.212940     8258500.645854
+190681.809502     8258500.515907
+190663.034399     8258499.093310
+190637.991267     8258498.240958
+190612.316271     8258498.009318
+190589.139761     8258498.426633
+190562.774942     8258505.081225
+190533.916672     8258510.459730
+190508.183720     8258516.493227
+190489.350659     8258521.336149
+190473.010290     8258527.454386
+190456.682277     8258532.319525
+190440.336879     8258539.064130
+190421.469046     8258547.665980
+190404.462802     8258558.164248
+190393.109340     8258566.833893
+190376.734964     8258576.711065
+190365.346731     8258589.139640
+190353.344023     8258600.309079
+190341.968143     8258611.484939
+190330.608887     8258620.780945
+190315.451880     8258634.428343
+190302.857866     8258641.833970
+190288.408833     8258646.715680
+190269.552587     8258654.064809
+190250.087661     8258659.528443
+190236.901592     8258663.168721
+190224.951802     8258668.700157
+190210.490409     8258674.835345
+190197.925380     8258679.107639
+190182.223434     8258683.978810
+190170.278681     8258688.883113
+190152.077484     8258693.105323
+190124.454734     8258700.374596
+190107.511478     8258703.980977
+190092.418220     8258710.736878
+190077.319925     8258718.119911
+190063.490396     8258723.634388
+190047.823229     8258724.745865
+190030.880738     8258728.352253
+190015.219365     8258728.837369
+189999.552191     8258729.949611
+189983.264748     8258730.429078
+189965.104124     8258730.265234
+189946.943499     8258730.101389
+189930.661850     8258729.954496
+189912.495432     8258730.417012
+189897.465923     8258730.281416
+189879.305299     8258730.117571
+189863.023650     8258729.970678
+189850.499187     8258729.857683
+189821.084387     8258727.713064
+189801.677423     8258726.910797
+189784.768940     8258726.758249
+189762.225059     8258726.554858
+189737.176133     8258726.328867
+189717.757567     8258726.780851
+189703.354129     8258726.650903
+189682.637069     8258732.102476
+189663.804008     8258736.945397
+189639.317402     8258743.616552
+189626.752366     8258747.889611
+189612.331546     8258749.638745
+189588.448592     8258758.821763
+189565.150371     8258772.396476
+189551.304224     8258779.790041
+189533.062461     8258788.397540
+189519.830788     8258797.050240
+189510.964990     8258807.621568
+189501.420961     8258823.826023
+189495.616728     8258841.944222
+189486.733540     8258854.395397
+189477.827933     8258869.352786
+189468.318676     8258881.798312
+189459.452877     8258892.369640
+189444.887162     8258909.782380
+189433.430149     8258929.728819
+189424.545129     8258937.000000
+END
+LINE3D-MASTER
+HEIGHT 1000.000000
+189706.757826     8258937.000000
+189708.411045     8258924.691207
+189709.182768     8258909.034022
+189711.814555     8258895.272856
+189715.700004     8258881.523766
+189728.856332     8258881.016049
+189741.299656     8258889.900389
+189749.951022     8258902.509760
+189757.934988     8258919.498765
+189765.242230     8258937.000000
+END
+LINE3D-MASTER
+HEIGHT 1000.000000
+189845.470104     8258937.000000
+189849.218527     8258935.986472
+189864.288602     8258931.736779
+189881.202887     8258931.262201
+189900.656217     8258927.052053
+189918.230573     8258922.824953
+189934.518787     8258922.344728
+189950.841002     8258918.106331
+189968.415358     8258913.879231
+189989.092623     8258912.812190
+190016.658183     8258911.808060
+190037.328882     8258911.368138
+190056.742411     8258911.543287
+190081.791337     8258911.769278
+190111.223520     8258912.034814
+190141.282537     8258912.306006
+190160.069231     8258912.475500
+190176.976951     8258912.628041
+190192.006459     8258912.763637
+190207.035968     8258912.899233
+190222.679958     8258914.293199
+190242.689816     8258917.606557
+190260.815668     8258921.529331
+190279.596569     8258922.325185
+190292.109436     8258923.691666
+190306.500522     8258925.074328
+190323.368433     8258929.612931
+190339.018218     8258930.380536
+190357.149864     8258933.676949
+190378.417656     8258936.375243
+190386.176854     8258937.000000
+END
+LINE3D-MASTER
+HEIGHT 1000.000000
+190972.433766     8258937.000000
+190987.211341     8258930.589278
+191006.050197     8258925.119995
+191024.889052     8258919.650713
+191039.970715     8258914.148298
+191056.913213     8258910.541146
+191072.609358     8258906.297100
+191086.397550     8258905.168671
+191106.512494     8258897.204485
+191122.846304     8258891.712602
+191142.293841     8258888.128815
+191157.381304     8258881.999274
+191176.892590     8258871.523990
+191194.502489     8258863.537203
+191209.647908     8258851.142526
+191227.900495     8258841.282299
+191241.770590     8258831.382533
+191258.747860     8258824.016452
+191273.835324     8258817.886911
+191292.743723     8258804.899771
+191314.168763     8258790.681745
+191324.269312     8258782.001561
+191336.243050     8258773.963925
+191347.572563     8258767.800480
+191370.841800     8258757.359100
+191384.085067     8258747.452914
+191396.661684     8258741.927898
+191405.521695     8258731.982166
+191414.381699     8258722.037199
+191431.463284     8258703.394331
+191442.839922     8258692.219243
+191455.567229     8258670.404261
+191463.811993     8258659.200153
+191474.643700     8258639.248072
+191484.808005     8258623.675626
+191496.259230     8258604.354783
+191501.379431     8258592.496837
+191510.297397     8258576.285969
+191520.455905     8258561.340266
+191528.782570     8258541.365203
+191537.085286     8258523.896340
+191542.205490     8258512.038011
+191551.123453     8258495.827525
+191564.540579     8258467.126695
+191569.051338     8258453.382864
+191584.272098     8258432.843586
+191593.769764     8258421.651163
+191612.086868     8258404.899064
+191630.977882     8258393.791388
+191644.197962     8258386.391791
+191652.449285     8258374.561329
+191668.214977     8258362.799044
+191679.660401     8258344.105326
+191686.682002     8258329.757353
+191694.365207     8258311.656488
+191698.910737     8258294.153728
+191702.824403     8258277.271681
+191704.888836     8258257.240120
+191708.906821     8258229.080903
+191710.293022     8258214.682469
+191714.206688     8258197.800422
+191715.580534     8258184.655085
+191723.252150     8258167.806942
+191730.273748     8258153.459351
+191736.651890     8258140.985575
+191745.564056     8258125.401833
+191751.350138     8258109.163091
+191760.842010     8258098.597029
+191770.380246     8258083.018935
+191781.113431     8258073.717280
+191791.863238     8258062.536155
+191796.983441     8258050.677826
+191804.602136     8258039.468069
+191812.865047     8258026.384885
+191817.375806     8258012.641054
+191828.833586     8257992.694240
+191833.953025     8257980.835904
+191839.693505     8257969.609585
+191844.819507     8257957.124513
+191855.604089     8257942.184076
+191870.732122     8257931.668863
+191887.715183     8257923.676804
+191905.325078     8257915.690399
+191928.008052     8257900.857310
+191945.015061     8257890.359049
+191954.501135     8257880.419731
+191967.738601     8257871.140670
+191987.313640     8257853.773506
+191998.063447     8257842.592380
+192012.565410     8257832.071519
+192027.687649     8257822.182668
+192038.425864     8257812.254646
+192046.659798     8257802.304030
+192055.519805     8257792.358681
+192065.029063     8257779.913155
+192078.324484     8257764.368958
+192088.442427     8257753.808544
+192098.647298     8257733.850809
+192106.289937     8257720.135233
+192117.683203     8257707.079909
+192126.560593     8257695.255478
+192137.919849     8257685.959472
+192153.023934     8257677.950460
+192166.250576     8257669.924128
+192177.591678     8257662.507962
+192190.191486     8257654.475974
+192208.456429     8257643.362650
+192224.193143     8257634.732932
+192239.263221     8257630.482857
+192251.799276     8257629.342748
+192273.085222     8257630.161203
+192288.694433     8257635.314862
+192303.097107     8257635.444803
+192321.924371     8257631.228624
+192337.759613     8257611.947716
+192348.608709     8257590.115789
+192365.609155     8257580.244265
+192391.324721     8257576.090232
+192404.521618     8257571.196844
+192418.988806     8257564.435294
+192430.939360     8257558.903865
+192442.884116     8257553.999180
+192454.822314     8257549.720848
+192467.398938     8257544.195068
+192491.908727     8257535.017706
+192507.599077     8257531.400021
+192524.548130     8257527.166898
+192543.334825     8257527.336391
+192570.261962     8257527.579327
+192584.050921     8257526.450522
+192609.157803     8257520.411377
+192621.688060     8257519.898012
+192639.262419     8257515.670530
+192667.494618     8257510.286376
+192685.145083     8257497.914300
+192701.513665     8257488.663488
+192714.733745     8257481.263892
+192731.723368     8257472.645096
+192746.166611     8257468.389364
+192763.799686     8257457.897135
+192779.501632     8257453.025964
+192796.449917     8257448.793216
+192811.560565     8257440.157468
+192826.653823     8257433.401567
+192840.482587     8257427.887083
+192853.720054     8257418.608023
+192870.072014     8257411.236682
+192884.567415     8257401.342557
+192902.797586     8257393.988162
+192919.171962     8257384.110990
+192934.282610     8257375.475242
+192943.165797     8257363.024067
+192953.886626     8257354.975510
+192963.378498     8257344.409448
+192979.781852     8257331.399707
+192989.900559     8257320.839301
+193000.621388     8257312.790743
+193015.105965     8257304.149347
+193028.360817     8257292.990822
+193039.725105     8257283.068066
+193052.353887     8257271.903892
+193071.256492     8257259.543113
+193082.656317     8257245.861435
+193092.803233     8257232.168836
+193100.434281     8257219.706364
+193104.985609     8257201.576861
+193107.606565     8257189.069189
+193112.140503     8257172.819533
+193116.652026     8257159.075709
+193121.858402     8257137.819286
+193129.582176     8257115.332749
+193134.133504     8257097.203246
+193134.892871     8257082.799157
+193135.692807     8257064.009397
+193140.221716     8257048.386108
+193146.594064     8257036.538694
+193153.438372     8257015.742421
+END
+LINE3D
+HEIGHT 1030.000000
+193006.656920     8252439.510903
+193031.973661     8252417.450339
+193052.227054     8252398.267240
+193105.168051     8252371.313464
+193120.106395     8252361.784889
+193129.406376     8252351.677366
+193142.510781     8252347.178398
+193155.576739     8252338.292426
+193169.236215     8252325.641337
+193191.042363     8252314.174225
+193207.270557     8252309.021155
+193220.336515     8252300.135183
+193233.353051     8252285.609979
+193250.169272     8252276.065296
+193260.105945     8252267.206164
+193279.457934     8252261.399758
+193303.734706     8252246.150664
+193333.610630     8252227.093520
+193350.997637     8252211.276977
+193361.499603     8252195.519488
+193377.662660     8252182.846926
+193388.839760     8252172.724068
+193398.787421     8252165.118694
+193409.965278     8252154.995064
+193428.027417     8252144.813152
+193436.696209     8252134.085264
+193457.233706     8252120.748638
+193476.596676     8252116.195225
+193491.535020     8252106.666649
+193511.480527     8252097.095126
+193524.590424     8252093.222655
+193540.192913     8252088.074952
+193552.704565     8252087.341094
+193571.452819     8252084.046806
+193593.983522     8252083.853556
+193615.894011     8252084.292170
+193628.427632     8252086.065063
+193647.872988     8252090.912155
+193662.300958     8252094.548430
+193682.953784     8252094.371287
+193721.170120     8252098.430069
+193736.816548     8252098.295868
+193760.598660     8252098.091885
+193781.866974     8252096.656376
+193796.854747     8252092.767798
+193812.495678     8252092.006335
+193842.525379     8252090.495679
+193859.380042     8252085.337236
+193871.864234     8252081.470131
+193894.444366     8252086.916879
+193910.101775     8252088.035670
+193937.013936     8252087.804841
+193953.906282     8252087.033409
+193970.161943     8252085.014351
+193987.016605     8252079.855909
+194000.741218     8252074.724313
+194018.254541     8252073.321011
+194030.771683     8252073.213650
+194043.980431     8252080.620408
+194057.200166     8252089.280924
+194068.537298     8252097.331044
+194085.517513     8252106.585849
+194103.157148     8252119.595024
+194119.561088     8252134.495193
+194132.791804     8252144.408702
+194147.236253     8252149.925231
+194158.556142     8252156.095103
+194171.759398     8252162.875365
+194197.513512     8252173.308002
+194208.844389     8252180.731632
+194229.563880     8252188.073970
+194242.130451     8252193.606606
+194252.830126     8252200.408341
+194267.263593     8252204.671877
+194281.065095     8252208.313526
+194298.035086     8252216.314567
+194320.631697     8252223.641569
+194336.305585     8252226.640614
+194352.583208     8252227.127542
+194367.609422     8252227.625203
+194385.759431     8252227.469528
+194400.779390     8252227.340699
+194413.296533     8252227.233338
+194435.806031     8252224.533331
+194450.189305     8252223.156877
+194463.914682     8252218.025275
+194485.121821     8252209.696783
+194498.813483     8252200.805444
+194518.072876     8252184.346298
+194529.809773     8252166.697821
+194540.954686     8252152.815213
+194552.753521     8252142.059714
+194568.301098     8252130.646283
+194588.223871     8252118.568016
+194605.000888     8252104.637101
+194614.300868     8252094.529578
+194623.611843     8252085.676578
+194632.900842     8252074.316062
+194643.314939     8252048.532336
+194654.415914     8252029.636227
+194661.750147     8252009.518575
+194675.331977     8251988.095013
+194681.447753     8251971.747837
+194692.543237     8251952.225232
+194707.942527     8251923.891809
+194725.868132     8251898.043656
+194740.091374     8251878.494223
+194753.702185     8251860.203130
+194761.727267     8251847.600369
+194772.866683     8251833.090499
+194780.250352     8251818.613609
+194785.153166     8251806.664171
+194796.303570     8251793.408059
+194815.530005     8251773.188405
+194827.931818     8251759.921560
+194839.751101     8251751.673589
+194848.430110     8251742.198701
+194859.596986     8251730.822078
+194863.823903     8251713.238016
+194872.449521     8251697.496621
+194879.195733     8251681.771346
+194882.825177     8251667.326656
+194895.150101     8251645.286567
+194904.395168     8251628.913315
+194924.873012     8251608.682928
+194935.396948     8251595.432189
+194950.285099     8251580.263623
+194958.916208     8251565.148724
+194968.150294     8251547.522480
+194972.987207     8251528.053556
+194976.587656     8251510.474867
+194976.362488     8251484.782396
+194976.236170     8251470.369154
+194976.670420     8251448.431053
+194980.869884     8251427.714509
+194983.878343     8251413.900924
+194988.116248     8251397.570620
+194997.960324     8251378.058748
+195010.937648     8251359.146545
+195017.000000     8251352.723160
+END
+LINE3D
+HEIGHT 1030.000000
+195017.000000     8250030.721394
+195014.952128     8250031.768681
+194992.488097     8250039.482175
+194968.787600     8250049.085905
+194935.057827     8250056.895262
+194888.803894     8250064.185497
+194851.329356     8250073.280826
+194806.976797     8250083.061691
+194758.866956     8250092.874784
+194727.031539     8250102.548288
+194690.170953     8250110.384499
+194654.502900     8250111.317737
+194627.601720     8250112.801560
+194611.324861     8250112.314625
+194599.394212     8250108.029622
+194585.614680     8250106.894724
+194569.935301     8250103.269183
+194545.516497     8250102.224775
+194528.607679     8250101.116717
+194516.057587     8250097.464335
+194497.917795     8250098.873010
+194479.686171     8250089.628938
+194462.024567     8250074.113013
+194452.477443     8250056.020549
+194440.493408     8250045.469804
+194432.889304     8250034.881492
+194422.155907     8250024.319255
+194410.770118     8250010.629896
+194398.746872     8249995.692153
+194389.276636     8249986.372934
+194379.164217     8249975.178827
+194365.944488     8249966.519076
+194349.633144     8249962.271646
+194333.350031     8249961.158222
+194312.708186     8249962.588357
+194293.377402     8249970.901521
+194275.305046     8249979.830433
+194254.064192     8249984.399189
+194235.947133     8249988.314607
+194220.300705     8249988.448809
+194206.532154     8249988.566904
+194185.252860     8249988.749420
+194160.185625     8249985.204399
+194137.605492     8249979.757651
+194119.993318     8249969.881723
+194108.063439     8249965.597478
+194091.643020     8249948.817055
+194083.385752     8249935.100862
+194073.223904     8249918.266758
+194063.078542     8249903.313673
+194045.444398     8249890.930995
+194026.652206     8249889.211783
+194007.881983     8249889.999321
+193990.358442     8249890.149623
+193981.513911     8249880.825037
+193961.903803     8249857.179229
+193949.254853     8249842.246853
+193935.436109     8249836.724957
+193919.712792     8249828.085915
+193902.771024     8249823.218114
+193890.758759     8249809.533364
+193868.716462     8249794.055012
+193854.887501     8249787.280117
+193840.410102     8249778.003845
+193822.820661     8249770.634660
+193799.542662     8249757.046538
+193775.062691     8249749.109911
+193760.629988     8249744.846368
+193736.858100     8249746.304115
+193718.093368     8249747.718150
+193700.575317     8249748.494949
+193664.906494     8249749.427429
+193634.865811     8249749.685093
+193600.443670     8249749.980336
+193566.016038     8249749.649084
+193532.170172     8249744.298964
+193495.815234     8249738.343821
+193461.343671     8249732.999833
+193437.501142     8249726.310060
+193420.564100     8249722.068763
+193396.644690     8249706.606511
+193382.172782     8249697.956735
+193367.656943     8249684.294224
+193355.018973     8249670.614840
+193337.369122     8249656.352666
+193318.505538     8249646.487471
+193299.010754     8249636.000382
+193280.772875     8249626.129820
+193266.937659     8249618.728435
+193250.616098     8249613.228006
+193237.412841     8249606.447745
+193221.727966     8249602.194942
+193202.233188     8249591.708617
+193184.044731     8249587.477288
+193165.850790     8249582.620228
+193148.266839     8249575.877540
+193126.938116     8249570.420058
+193106.284525     8249570.597207
+193086.872120     8249569.509858
+193069.968792     8249569.028297
+193052.444488     8249569.178606
+193033.043070     8249569.345015
+193016.770938     8249569.484583
+192997.984243     8249568.392633
+192977.945369     8249567.310657
+192956.040370     8249567.498540
+192934.761075     8249567.681055
+192914.761413     8249570.986078
+192894.745279     8249572.411611
+192876.628220     8249576.327030
+192857.259753     8249580.253182
+192839.795858     8249587.296481
+192821.689787     8249592.465657
+192799.839708     8249598.920033
+192780.498700     8249605.979432
+192764.297966     8249614.265748
+192743.726754     8249623.842638
+192722.540820     8249634.677887
+192699.483270     8249646.156497
+192668.300254     8249658.957888
+192640.246522     8249671.732439
+192614.701863     8249685.112012
+192591.056286     8249700.982235
+192565.500645     8249713.108816
+192536.799240     8249723.381983
+192517.469221     8249731.695139
+192493.154001     8249742.557229
+192472.571808     8249750.881125
+192450.101515     8249757.967365
+192418.237875     8249764.507628
+192388.256838     8249771.658289
+192359.500513     8249775.664962
+192332.632290     8249780.909292
+192300.746680     8249784.942806
+192273.208815     8249785.179002
+192250.052407     8249785.377618
+192235.026193     8249784.879957
+192220.593490     8249780.616414
+192206.198471     8249780.739882
+192191.754029     8249775.224118
+192176.058173     8249769.718323
+192160.988784     8249764.207154
+192142.750905     8249754.336592
+192126.434835     8249749.462660
+192113.857282     8249742.677031
+192099.994607     8249732.142400
+192083.662058     8249725.388213
+192070.442329     8249716.728462
+192059.736393     8249709.299472
+192046.412316     8249688.733230
+192040.038408     8249675.626662
+192033.033313     8249661.899730
+192023.541108     8249650.073760
+192016.557981     8249638.853578
+192001.959756     8249615.790560
+191991.161223     8249597.708830
+191982.256281     8249581.491254
+191970.814808     8249561.535408
+191958.764866     8249543.464412
+191947.378312     8249529.775060
+191936.013721     8249518.591693
+191923.392230     8249506.792564
+191912.033900     8249496.236452
+191897.523551     8249483.200436
+191886.785428     8249472.011696
+191874.163938     8249460.212567
+191863.397597     8249445.891351
+191851.408066     8249434.713345
+191840.669179     8249423.524612
+191826.823746     8249414.870227
+191811.100429     8249406.231185
+191786.609470     8249397.040801
+191769.640235     8249389.038988
+191755.783051     8249379.130853
+191740.685438     8249370.486444
+191726.203313     8249360.583669
+191707.970925     8249351.339603
+191689.085373     8249338.967658
+191667.685258     8249325.364194
+191650.079338     8249316.114756
+191635.629399     8249309.971730
+191622.415154     8249301.937711
+191609.826614     8249293.898324
+191594.729009     8249285.254680
+191576.491123     8249275.383354
+191558.242263     8249264.259799
+191536.254885     8249255.047941
+191513.005110     8249244.593059
+191501.036790     8249235.922575
+191479.038424     8249225.456959
+191467.674603     8249214.274351
+191455.069584     8249204.354710
+191436.831705     8249194.484149
+191416.095736     8249185.261557
+191387.229573     8249176.735243
+191367.142040     8249170.014029
+191346.450009     8249165.804938
+191323.260651     8249162.243811
+191303.199808     8249158.655085
+191283.765440     8249155.061751
+191266.202694     8249150.825820
+191249.881133     8249145.325391
+191229.173387     8249139.236040
+191210.951980     8249131.244968
+191182.069345     8249120.839164
+191155.700509     8249111.664887
+191132.478200     8249104.344016
+191112.988906     8249094.483423
+191087.212824     8249081.544036
+191062.634758     8249062.327408
+191031.221082     8249048.809832
+191012.341021     8249037.064383
+190993.482928     8249027.825684
+190977.743133     8249017.306388
+190961.997854     8249006.161360
+190948.146160     8248996.879721
+190933.620097     8248981.963445
+190907.168881     8248963.389427
+190886.960522     8248942.881468
+190865.554917     8248928.651507
+190842.930846     8248918.191258
+190824.050791     8248906.446574
+190796.430546     8248897.283030
+190775.112804     8248893.078541
+190762.535251     8248886.292913
+190749.299044     8248875.752908
+190737.978391     8248869.583042
+190724.758656     8248860.922526
+190708.985910     8248846.643486
+190701.388061     8248836.681664
+190687.475957     8248820.507035
+190667.898793     8248800.620205
+190654.031391     8248789.459070
+190642.030114     8248777.028078
+190629.408623     8248765.228948
+190616.155937     8248752.808689
+190605.417050     8248741.619956
+190590.896484     8248727.330941
+190573.816647     8248706.796148
+190551.082744     8248683.803676
+190534.700773     8248671.410258
+190517.660147     8248655.262462
+190497.489465     8248639.140749
+190477.917798     8248619.881181
+190460.217754     8248599.979016
+190445.647752     8248580.049239
+190434.870424     8248564.474266
+190417.846277     8248550.206724
+190399.569950     8248535.949158
+190381.277152     8248519.812103
+190366.745598     8248504.269331
+190353.487422     8248491.222575
+190338.960595     8248476.306306
+190318.081836     8248450.790984
+190295.375386     8248430.930994
+190272.701893     8248414.831513
+190260.052943     8248399.899137
+190246.147093     8248384.350998
+190233.509131     8248370.672379
+190223.390458     8248358.851782
+190216.989097     8248342.612733
+190205.542891     8248322.029619
+190196.006754     8248305.190913
+190187.134763     8248292.733080
+190171.976740     8248277.195681
+190152.432533     8248261.069359
+190133.514031     8248244.937671
+190119.591702     8248227.509278
+190106.255874     8248205.689285
+190092.959250     8248188.255525
+190079.014959     8248168.321146
+190063.851446     8248152.157250
+190039.925781     8248136.068509
+190016.615596     8248118.720637
+189998.300829     8248100.076831
+189983.120837     8248082.032682
+189969.840692     8248066.479176
+189957.806465     8248050.288440
+189945.135549     8248032.849696
+189929.978290     8248017.312290
+189904.784738     8247999.354028
+189884.564634     8247977.593083
+189868.083808     8247953.920052
+189849.758056     8247934.022871
+189835.199042     8247915.346852
+189820.699678     8247903.564211
+189806.178341     8247889.274438
+189787.924751     8247877.523999
+189767.172307     8247866.421536
+189752.700399     8247857.771760
+189735.714692     8247847.890458
+189718.685048     8247832.995656
+189696.027266     8247818.776053
+189675.259107     8247805.793329
+189648.270060     8247797.251297
+189629.428443     8247789.892470
+189614.363784     8247785.008187
+189598.009273     8247775.748015
+189587.271153     8247764.559657
+189575.319302     8247757.768279
+189562.659370     8247741.582910
+189544.344603     8247722.939105
+189522.225416     8247698.687509
+189499.540939     8247681.334652
+189479.414963     8247670.226816
+189463.037718     8247658.459900
+189444.817078     8247650.469204
+189428.472788     8247642.462414
+189409.631170     8247635.103587
+189394.550800     8247628.339425
+189376.966082     8247621.596361
+189359.353908     8247611.720433
+189336.060201     8247596.252815
+189312.145517     8247581.417067
+189283.279357     8247572.891135
+189251.267434     8247562.511790
+189227.402178     8247553.316038
+189202.280021     8247543.504142
+189177.795319     8247534.940630
+189143.285305     8247525.209254
+189109.400998     8247515.472895
+189077.998303     8247503.208311
+189049.077221     8247488.415503
+189003.817341     8247466.242784
+188968.599247     8247447.117417
+188939.678164     8247432.324609
+188911.410245     8247420.659682
+188881.264453     8247409.011243
+188856.751525     8247397.314108
+188836.631039     8247386.832768
+188814.616201     8247374.487664
+188789.488556     8247364.049653
+188759.364730     8247354.907583
+188738.047755     8247350.703470
+188717.383180     8247349.627244
+188696.724099     8247349.177896
+188670.438405     8247349.403353
+188642.867586     8247345.879423
+188619.019570     8247338.563537
+188596.411217     8247329.983931
+188573.155955     8247318.902935
+188546.754929     8247305.968525
+188515.955973     8247291.192207
+188493.315431     8247278.852469
+188475.072058     8247268.355029
+188466.227526     8247259.030442
+188454.215265     8247245.346075
+188444.695600     8247230.386858
+188426.424771     8247216.756553
+188402.538310     8247205.054045
+188386.227734     8247200.806991
+188371.832715     8247200.930460
+188351.860512     8247207.368729
+188336.933152     8247218.150680
+188326.990986     8247226.382933
+188311.437922     8247237.170250
+188293.381276     8247247.979041
+188265.250656     8247251.980348
+188240.896996     8247258.456198
+188220.880858     8247259.881348
+188200.260218     8247263.818241
+188179.008383     8247267.134003
+188157.756548     8247270.449766
+188139.013788     8247274.370933
+188124.026779     8247278.259505
+188110.910628     8247281.505487
+188092.173359     8247286.053151
+188075.281013     8247286.824583
+188050.883418     8247288.287314
+188016.488736     8247291.715805
+187988.956746     8247292.578877
+187960.798667     8247293.446936
+187938.899158     8247294.261315
+187908.858093     8247294.518982
+187878.185451     8247294.155522
+187852.487018     8247289.988990
+187832.454023     8247289.534272
+187811.136284     8247285.330166
+187776.039010     8247279.990779
+187745.311448     8247273.360826
+187726.497290     8247269.135246
+187707.051938     8247264.288537
+187688.852500     8247258.804215
+187659.283365     8247241.510409
+187646.716797     8247235.978156
+187627.282426     8247232.384439
+187605.273082     8247220.666213
+187581.358780     8247205.830461
+187563.098932     8247193.453149
+187542.352360     8247182.977179
+187516.593516     8247171.917657
+187498.361128     8247162.673592
+187484.493341     8247151.512078
+187474.358956     8247137.811603
+187472.936916     8247118.396363
+187468.896345     8247085.842726
+187468.786506     8247073.309739
+187468.594287     8247051.377011
+187468.473464     8247037.590648
+187468.347150     8247023.177790
+187465.728236     8247010.039397
+187464.943267     8246991.872162
+187462.236483     8246968.707532
+187458.322225     8246950.566755
+187456.949614     8246936.791511
+187446.842308     8246926.224287
+187433.688476     8246925.083640
+187416.751814     8246920.841956
+187394.144225     8246912.262344
+187382.796494     8246902.959228
+187373.929993     8246891.127891
+187369.428094     8246877.379106
+187372.365161     8246855.419538
+187376.586973     8246837.209359
+187382.082541     8246821.494811
+187381.939748     8246805.201698
+187377.964698     8246780.167933
+187371.568829     8246764.555380
+187367.066929     8246750.806595
+187363.125215     8246729.532953
+187361.758091     8246716.383823
+187356.624997     8246702.013908
+187352.106622     8246686.385251
+187351.316159     8246667.591137
+187347.434473     8246653.210489
+187346.693439     8246640.056372
+187346.561631     8246625.016634
+187346.418842     8246608.723903
+187350.673600     8246594.273085
+187357.415087     8246577.921307
+187367.231321     8246555.276192
+187375.252054     8246542.046541
+187398.227610     8246521.168569
+187414.389903     8246508.496014
+187423.058692     8246497.767744
+187432.929464     8246481.389125
+187449.618989     8246457.431587
+187462.553139     8246433.505877
+187470.590351     8246422.156481
+187471.682877     8246403.973142
+187471.556559     8246389.559901
+187465.792270     8246374.568856
+187465.034375     8246359.534488
+187460.505016     8246342.652456
+187454.751711     8246328.914787
+187445.215571     8246312.075698
+187435.102773     8246300.881977
+187423.079909     8246285.944231
+187413.990739     8246277.000000
+END
+END
\ No newline at end of file
diff --git a/examples/data/sp_589x703.raw b/examples/data/sp_589x703.raw
new file mode 100755
index 0000000..53e0159
--- /dev/null
+++ b/examples/data/sp_589x703.raw
@@ -0,0 +1 @@
+^|rgWG at BDINBD@;4>9 at DD9;>>GI>N�����``^n�ggi``[`wb@;>>;;@>@P^[rpINBB994;;;>DB at BBB9BIPPPT[TNNKIGDB^KIRPINTIN at GNnr��kbgrYWRPTTb[RPWRWegiiu^Wbnn^[YWPKIP^Y|�eWkp~|gNG^[YWYir��������������������������|~~~|�����|���������������|wp��|��������y��~�������������������������������������������������~���w�~|��|��������������y�ǣ�����������������������ʠ����|������������pTKDDGD at D>DID~�~y�p|y�|��~k�pYB;@>YYNDD;GDWTTG at BD>>GD>G>>BBNDPbe``rn^[`ekykR`[��gK>KKgy�rw~~kyy^NWDDNRy|yki~|^�w`NK^�g@>;;>B>IIg��i������ [...]
\ No newline at end of file
diff --git a/examples/data/states.dbf b/examples/data/states.dbf
deleted file mode 100644
index fea8e75..0000000
Binary files a/examples/data/states.dbf and /dev/null differ
diff --git a/examples/data/states.shp b/examples/data/states.shp
deleted file mode 100644
index aa19d09..0000000
Binary files a/examples/data/states.shp and /dev/null differ
diff --git a/examples/data/states.shx b/examples/data/states.shx
deleted file mode 100644
index 8555f79..0000000
Binary files a/examples/data/states.shx and /dev/null differ
diff --git a/examples/databaseQuery/.cdtproject b/examples/databaseQuery/.cdtproject
old mode 100644
new mode 100755
diff --git a/examples/databaseQuery/.project b/examples/databaseQuery/.project
old mode 100644
new mode 100755
diff --git a/examples/databaseQuery/Makefile b/examples/databaseQuery/Makefile
old mode 100644
new mode 100755
index 04b108b..47bd7e1
--- a/examples/databaseQuery/Makefile
+++ b/examples/databaseQuery/Makefile
@@ -1,23 +1,30 @@
 all: databaseQuery
 
-shapelib:
-	cd ../terralibx/shapelib; make
-
-tiff:
-	cd ../terralibx/tiff; make
+debug: databaseQuery_dbg
 
 terralib:
-	cd ../terralibx/terralib; make
+	cd ../../terralibx/terralib; make
 
-stat:
-	cd ../terralibx/stat; make
+terralib_dbg:
+	cd ../../terralibx/terralib; make debug
 
-databaseQuery: shapelib tiff terralib stat
+databaseQuery: terralib
 	qmake -o makeDatabaseQuery databaseQuery.pro; make -f makeDatabaseQuery
 
+databaseQuery_dbg: terralib_dbg
+	qmake -o makeDatabaseQuery.debug databaseQuery.pro TE_PROJECT_TYPE=DEBUG;\
+	make -f makeDatabaseQuery.debug
+
 clean:
 	if \
 		test -f makeDatabaseQuery; \
 	then \
 		make -f makeDatabaseQuery distclean; rm -f makeDatabaseQuery; \
+	fi
+	
+clean_debug:
+	if \
+		test -f makeDatabaseQuery.debug; \
+	then \
+		make -f makeDatabaseQuery.debug distclean; rm -f makeDatabaseQuery.debug; \
 	fi
\ No newline at end of file
diff --git a/examples/databaseQuery/databaseQuery.cpp b/examples/databaseQuery/databaseQuery.cpp
old mode 100644
new mode 100755
index 48347ad..6ca742a
--- a/examples/databaseQuery/databaseQuery.cpp
+++ b/examples/databaseQuery/databaseQuery.cpp
@@ -34,9 +34,9 @@ int main()
 	unsigned int i, j;
 	// Datatabase server parameters
 	string host = "localhost";
-	string dbname = "TerraTeste";
+	string dbname = "DB320RC1";
 	string user = "root";
-	string password = "";
+	string password = "vinhas";
 
 	// Open a connection to a MySQL database
 	TeDatabase* db = new TeMySQL();
diff --git a/examples/databaseQuery/databaseQuery.dsp b/examples/databaseQuery/databaseQuery.dsp
old mode 100644
new mode 100755
index 32198e4..84292d4
--- a/examples/databaseQuery/databaseQuery.dsp
+++ b/examples/databaseQuery/databaseQuery.dsp
@@ -42,7 +42,7 @@ RSC=rc.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drive [...]
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\terralibw\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\include" /I "..\..\src [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "NDEBUG"
 # ADD RSC /l 0x416 /d "NDEBUG"
@@ -51,7 +51,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\shapelib\Release\shapelib.lib ..\..\terralibw\freetype\Release\freetype.lib ..\..\terralibw\tiff\Release\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\Postg [...]
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib /nologo /subsystem:console /machine:I386 /out:"../Release/databaseQuery.exe"
 # SUBTRACT LINK32 /pdb:none
 
 !ELSEIF  "$(CFG)" == "databaseQuery - Win32 Debug"
@@ -68,7 +68,7 @@ LINK32=link.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terra [...]
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\terralibw\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\include" /I " [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "_DEBUG"
 # ADD RSC /l 0x416 /d "_DEBUG"
@@ -77,7 +77,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\shapelib\Debug\shapelib.lib ..\..\terralibw\freetype\Debug\freetype.lib ..\..\terralibw\tiff\Debug\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\li [...]
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\libpq.lib /nologo /subsystem:console /debug /machine:I386 /out:"../Debug/databaseQuery.exe" /pdbtype:sept
 # SUBTRACT LINK32 /pdb:none
 
 !ENDIF 
diff --git a/examples/databaseQuery/databaseQuery.dsw b/examples/databaseQuery/databaseQuery.dsw
old mode 100644
new mode 100755
index c87d2c5..b8b6c71
--- a/examples/databaseQuery/databaseQuery.dsw
+++ b/examples/databaseQuery/databaseQuery.dsw
@@ -3,7 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
 
 ###############################################################################
 
-Project: "databaseQuery"=".\databaseQuery.dsp" - Package Owner=<4>
+Project: "databaseQuery"=.\databaseQuery.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -18,31 +18,7 @@ Package=<4>
 
 ###############################################################################
 
-Project: "freetype"="..\..\terralibw\freetype\freetype.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "shapelib"="..\..\terralibw\shapelib\shapelib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "terralib"="..\..\terralibw\terralib\terralib.dsp" - Package Owner=<4>
+Project: "terralib"=..\..\terralibw\terralib\terralib.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -53,24 +29,6 @@ Package=<4>
     Begin Project Dependency
     Project_Dep_Name freetype
     End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name shapelib
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name tiff
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "tiff"="..\..\terralibw\tiff\tiff.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
 }}}
 
 ###############################################################################
diff --git a/examples/databaseQuery/databaseQuery.pro b/examples/databaseQuery/databaseQuery.pro
old mode 100644
new mode 100755
index 96e9016..11cdb19
--- a/examples/databaseQuery/databaseQuery.pro
+++ b/examples/databaseQuery/databaseQuery.pro
@@ -1,47 +1,9 @@
-TEMPLATE = app
-TARGET = databaseQuery
-CONFIG += qt warn_on thread debug rtti exceptions
-LANGUAGE = C++
-
-OBJECTS_DIR = .obj
+include( ../base/base.pro )
 
 SOURCES	+= \
 	databaseQuery.cpp \
-	../src/terralib/drivers/MySQL/TeMySQL.cpp
+	../../src/terralib/drivers/MySQL/TeMySQL.cpp
 
 HEADERS	+= \
-	../src/terralib/drivers/MySQL/TeMySQL.h
+	../../src/terralib/drivers/MySQL/TeMySQL.h
 	
-INCLUDEPATH += \
-	. \
-	.. \
-	../src/terralib/kernel \
-	../src/terralib/application \
-	../src/terralib/functions \
-	../src/terralib/stat \
-	../src/shapelib \
-	../src/zlib \
-	../src/terralib/application/qt \
-	../src/terralib/drivers/MySQL \
-	../src/terralib/drivers/MySQL/include \
-	../src/terralib/drivers/OracleSpatial \
-	../src/terralib/drivers/OracleSpatial/OCI/include \
-	../src/terralib/drivers/PostgreSQL \
-	../src/terralib/drivers/PostgreSQL/includepg 
-
-LIBS += \
-	-L../terralibx/shapelib \
-	-L../terralibx/stat \
-	-L../terralibx/terralib \
-	-L../terralibx/tiff \
-	-L../terralibx/PostgreSQL \
-	-L/usr/local/lib -L/usr/lib -L/usr/lib/mysql -L/usr/local/lib/mysql \
-	-L/usr/local/mysql -L/usr/local/mysql/lib -L. \
-    -lshapelib -lstat -lterralib -ltiff -lmysqlclient -lpq -lcrypt
-
-
-
-
-
-
-
diff --git a/examples/databaseQuery/databaseQuery.sln b/examples/databaseQuery/databaseQuery.sln
new file mode 100755
index 0000000..17adaf5
--- /dev/null
+++ b/examples/databaseQuery/databaseQuery.sln
@@ -0,0 +1,45 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "terralib", "..\..\terralibw\terralib\terralib.vcproj", "{99BC87CA-140D-4A99-803C-DF078430A6C8}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjpeg", "..\..\terralibw\libjpeg\libjpeg.vcproj", "{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "databaseQuery", "databaseQuery.vcproj", "{970FF570-5C7F-48A4-B8C7-C0539D3A45DA}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tiff", "..\..\terralibw\tiff\tiff.vcproj", "{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		Debug = Debug
+		Release = Release
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{99BC87CA-140D-4A99-803C-DF078430A6C8}.Debug.ActiveCfg = Debug|Win32
+		{99BC87CA-140D-4A99-803C-DF078430A6C8}.Debug.Build.0 = Debug|Win32
+		{99BC87CA-140D-4A99-803C-DF078430A6C8}.Release.ActiveCfg = Release|Win32
+		{99BC87CA-140D-4A99-803C-DF078430A6C8}.Release.Build.0 = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.ActiveCfg = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.Build.0 = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.ActiveCfg = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.Build.0 = Release|Win32
+		{970FF570-5C7F-48A4-B8C7-C0539D3A45DA}.Debug.ActiveCfg = Debug|Win32
+		{970FF570-5C7F-48A4-B8C7-C0539D3A45DA}.Debug.Build.0 = Debug|Win32
+		{970FF570-5C7F-48A4-B8C7-C0539D3A45DA}.Release.ActiveCfg = Release|Win32
+		{970FF570-5C7F-48A4-B8C7-C0539D3A45DA}.Release.Build.0 = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.ActiveCfg = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.Build.0 = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.ActiveCfg = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
diff --git a/examples/databaseQuery/databaseQuery.vcproj b/examples/databaseQuery/databaseQuery.vcproj
new file mode 100755
index 0000000..1f0f5e2
--- /dev/null
+++ b/examples/databaseQuery/databaseQuery.vcproj
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="databaseQuery"
+	ProjectGUID="{970FF570-5C7F-48A4-B8C7-C0539D3A45DA}">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="."
+			IntermediateDirectory="..\Debug\"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="-Zm200 -GX -w34100 -w34189"
+				Optimization="4"
+				AdditionalIncludeDirectories=".;..\..\src\terralib\kernel;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include"
+				PreprocessorDefinitions="UNICODE,WIN32"
+				GeneratePreprocessedFile="0"
+				MinimalRebuild="TRUE"
+				ExceptionHandling="TRUE"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				AssemblerListingLocation="..\Debug\"
+				ObjectFile="..\Debug\"
+				ProgramDataBaseFileName=".\"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Debug/terralib/terralib.lib ../../Debug/libjpeg/libjpeg.lib ../../Debug/tiff/tiff.lib ../../Debug/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
+				OutputFile="..\Debug\databaseQuery.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreDefaultLibraryNames="msvcrt.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				WarningLevel="0"
+				DefaultCharType="0"
+				EnableErrorChecks="1"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="."
+			IntermediateDirectory="..\Release\"
+			ConfigurationType="1">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories=".;..\..\src\terralib\kernel;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include"
+				PreprocessorDefinitions="UNICODE,WIN32"
+				RuntimeLibrary="2"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Release/terralib/terralib.lib ../../Release/libjpeg/libjpeg.lib ../../Release/tiff/tiff.lib ../../Release/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
+				OutputFile="..\Release\databaseQuery.exe"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath=".\databaseQuery.cpp">
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.h">
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/databaseSQLQuery/.cdtproject b/examples/databaseSQLQuery/.cdtproject
old mode 100644
new mode 100755
diff --git a/examples/databaseSQLQuery/.project b/examples/databaseSQLQuery/.project
old mode 100644
new mode 100755
diff --git a/examples/databaseSQLQuery/Makefile b/examples/databaseSQLQuery/Makefile
old mode 100644
new mode 100755
index 2311248..8a3522f
--- a/examples/databaseSQLQuery/Makefile
+++ b/examples/databaseSQLQuery/Makefile
@@ -1,23 +1,30 @@
 all: databaseSQLQuery
 
-shapelib:
-	cd ../terralibx/shapelib; make
-
-tiff:
-	cd ../terralibx/tiff; make
+debug: databaseSQLQuery_dbg
 
 terralib:
-	cd ../terralibx/terralib; make
-
-stat:
-	cd ../terralibx/stat; make
+	cd ../../terralibx/terralib; make
+	
+terralib_dbg:
+	cd ../../terralibx/terralib; make debug
 
-databaseSQLQuery: shapelib tiff terralib stat
+databaseSQLQuery: terralib
 	qmake -o makeDatabaseSQLQuery databaseSQLQuery.pro; make -f makeDatabaseSQLQuery
 
+databaseSQLQuery_dbg: terralib_dbg
+	qmake -o makeDatabaseSQLQuery.debug databaseSQLQuery.pro TE_PROJECT_TYPE=DEBUG; \
+	make -f makeDatabaseSQLQuery.debug
+
 clean:
 	if \
 		test -f makeDatabaseSQLQuery; \
 	then \
 		make -f makeDatabaseSQLQuery distclean; rm -f makeDatabaseSQLQuery; \
+	fi
+	
+clean_debug:
+	if \
+		test -f makeDatabaseSQLQuery.debug; \
+	then \
+		make -f makeDatabaseSQLQuery.debug distclean; rm -f makeDatabaseSQLQuery.debug; \
 	fi
\ No newline at end of file
diff --git a/examples/databaseSQLQuery/databaseSQLQuery.cpp b/examples/databaseSQLQuery/databaseSQLQuery.cpp
old mode 100644
new mode 100755
index 56554da..3078083
--- a/examples/databaseSQLQuery/databaseSQLQuery.cpp
+++ b/examples/databaseSQLQuery/databaseSQLQuery.cpp
@@ -33,9 +33,9 @@ int main()
 {
 	// Datatabase server parameters
 	string host = "localhost";
-	string dbname = "TerraTeste";
+	string dbname = "DB320RC1";
 	string user = "root";
-	string password = "";
+	string password = "vinhas";
 
 	// Open a connection to a MySQL database
 	TeDatabase* db = new TeMySQL();
diff --git a/examples/databaseSQLQuery/databaseSQLQuery.dsp b/examples/databaseSQLQuery/databaseSQLQuery.dsp
old mode 100644
new mode 100755
index a5e8388..cd0450d
--- a/examples/databaseSQLQuery/databaseSQLQuery.dsp
+++ b/examples/databaseSQLQuery/databaseSQLQuery.dsp
@@ -42,7 +42,7 @@ RSC=rc.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drive [...]
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\terralibw\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\include" /I "..\..\src [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "NDEBUG"
 # ADD RSC /l 0x416 /d "NDEBUG"
@@ -51,7 +51,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\shapelib\Release\shapelib.lib ..\..\terralibw\freetype\Release\freetype.lib ..\..\terralibw\tiff\Release\tiff.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\Postg [...]
+# ADD LINK32 ..\..\terralibw\terralib\Release\terralib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\libpq.lib /nologo /subsystem:console /machine:I386 /out:"../Release/databaseSQLQuery.exe"
 # SUBTRACT LINK32 /pdb:none
 
 !ELSEIF  "$(CFG)" == "databaseSQLQuery - Win32 Debug"
@@ -68,7 +68,7 @@ LINK32=link.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terra [...]
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\terralibw\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\include" /I " [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "_DEBUG"
 # ADD RSC /l 0x416 /d "_DEBUG"
@@ -77,7 +77,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\shapelib\Debug\shapelib.lib ..\..\terralibw\freetype\Debug\freetype.lib ..\..\terralibw\tiff\Debug\tiff.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\li [...]
+# ADD LINK32 ..\..\terralibw\terralib\Debug\terralib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\libpq.lib /nologo /subsystem:console /debug /machine:I386 /out:"../Debug/databaseSQLQuery.exe" /pdbtype:sept
 # SUBTRACT LINK32 /pdb:none
 
 !ENDIF 
diff --git a/examples/databaseSQLQuery/databaseSQLQuery.dsw b/examples/databaseSQLQuery/databaseSQLQuery.dsw
old mode 100644
new mode 100755
index 4b44c1e..e1c25b3
--- a/examples/databaseSQLQuery/databaseSQLQuery.dsw
+++ b/examples/databaseSQLQuery/databaseSQLQuery.dsw
@@ -3,7 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
 
 ###############################################################################
 
-Project: "databaseSQLQuery"=".\databaseSQLQuery.dsp" - Package Owner=<4>
+Project: "databaseSQLQuery"=.\databaseSQLQuery.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -18,31 +18,7 @@ Package=<4>
 
 ###############################################################################
 
-Project: "freetype"="..\..\terralibw\freetype\freetype.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "shapelib"="..\..\terralibw\shapelib\shapelib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "terralib"="..\..\terralibw\terralib\terralib.dsp" - Package Owner=<4>
+Project: "terralib"=..\..\terralibw\terralib\terralib.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -53,24 +29,6 @@ Package=<4>
     Begin Project Dependency
     Project_Dep_Name freetype
     End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name shapelib
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name tiff
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "tiff"="..\..\terralibw\tiff\tiff.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
 }}}
 
 ###############################################################################
diff --git a/examples/databaseSQLQuery/databaseSQLQuery.pro b/examples/databaseSQLQuery/databaseSQLQuery.pro
old mode 100644
new mode 100755
index e11c675..77fb7c9
--- a/examples/databaseSQLQuery/databaseSQLQuery.pro
+++ b/examples/databaseSQLQuery/databaseSQLQuery.pro
@@ -1,47 +1,9 @@
-TEMPLATE = app
-TARGET = databaseSQLQuery
-CONFIG += qt warn_on thread debug rtti exceptions
-LANGUAGE = C++
-
-OBJECTS_DIR = .obj
+include( ../base/base.pro )
 
 SOURCES	+= \
 	databaseSQLQuery.cpp \
-	../src/terralib/drivers/MySQL/TeMySQL.cpp
+	../../src/terralib/drivers/MySQL/TeMySQL.cpp
 
 HEADERS	+= \
-	../src/terralib/drivers/MySQL/TeMySQL.h
+	../../src/terralib/drivers/MySQL/TeMySQL.h
 	
-INCLUDEPATH += \
-	. \
-	.. \
-	../src/terralib/kernel \
-	../src/terralib/application \
-	../src/terralib/functions \
-	../src/terralib/stat \
-	../src/shapelib \
-	../src/zlib \
-	../src/terralib/application/qt \
-	../src/terralib/drivers/MySQL \
-	../src/terralib/drivers/MySQL/include \
-	../src/terralib/drivers/OracleSpatial \
-	../src/terralib/drivers/OracleSpatial/OCI/include \
-	../src/terralib/drivers/PostgreSQL \
-	../src/terralib/drivers/PostgreSQL/includepg 
-
-LIBS += \
-	-L../terralibx/shapelib \
-	-L../terralibx/stat \
-	-L../terralibx/terralib \
-	-L../terralibx/tiff \
-	-L../terralibx/PostgreSQL \
-	-L/usr/local/lib -L/usr/lib -L/usr/lib/mysql -L/usr/local/lib/mysql \
-	-L/usr/local/mysql -L/usr/local/mysql/lib -L. \
-    -lshapelib -lstat -lterralib -ltiff -lmysqlclient -lpq -lcrypt
-
-
-
-
-
-
-
diff --git a/examples/databaseSQLQuery/databaseSQLQuery.sln b/examples/databaseSQLQuery/databaseSQLQuery.sln
new file mode 100755
index 0000000..c572ee7
--- /dev/null
+++ b/examples/databaseSQLQuery/databaseSQLQuery.sln
@@ -0,0 +1,50 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "terralib", "..\..\terralibw\terralib\terralib.vcproj", "{99BC87CA-140D-4A99-803C-DF078430A6C8}"
+	ProjectSection(ProjectDependencies) = postProject
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C} = {BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E} = {5E26C3A1-28D3-40FA-A3F5-115180C98E0E}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjpeg", "..\..\terralibw\libjpeg\libjpeg.vcproj", "{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "databaseSQLQuery", "databaseSQLQuery.vcproj", "{970FF570-5C7F-48A4-B8C7-C0539D3A45DA}"
+	ProjectSection(ProjectDependencies) = postProject
+		{99BC87CA-140D-4A99-803C-DF078430A6C8} = {99BC87CA-140D-4A99-803C-DF078430A6C8}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tiff", "..\..\terralibw\tiff\tiff.vcproj", "{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		Debug = Debug
+		Release = Release
+	EndGlobalSection
+	GlobalSection(ProjectDependencies) = postSolution
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{99BC87CA-140D-4A99-803C-DF078430A6C8}.Debug.ActiveCfg = Debug|Win32
+		{99BC87CA-140D-4A99-803C-DF078430A6C8}.Debug.Build.0 = Debug|Win32
+		{99BC87CA-140D-4A99-803C-DF078430A6C8}.Release.ActiveCfg = Release|Win32
+		{99BC87CA-140D-4A99-803C-DF078430A6C8}.Release.Build.0 = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.ActiveCfg = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.Build.0 = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.ActiveCfg = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.Build.0 = Release|Win32
+		{970FF570-5C7F-48A4-B8C7-C0539D3A45DA}.Debug.ActiveCfg = Debug|Win32
+		{970FF570-5C7F-48A4-B8C7-C0539D3A45DA}.Debug.Build.0 = Debug|Win32
+		{970FF570-5C7F-48A4-B8C7-C0539D3A45DA}.Release.ActiveCfg = Release|Win32
+		{970FF570-5C7F-48A4-B8C7-C0539D3A45DA}.Release.Build.0 = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.ActiveCfg = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.Build.0 = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.ActiveCfg = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
diff --git a/examples/databaseSQLQuery/databaseSQLQuery.vcproj b/examples/databaseSQLQuery/databaseSQLQuery.vcproj
new file mode 100755
index 0000000..ce1f4c6
--- /dev/null
+++ b/examples/databaseSQLQuery/databaseSQLQuery.vcproj
@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="databaseSQLQuery"
+	ProjectGUID="{970FF570-5C7F-48A4-B8C7-C0539D3A45DA}">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="."
+			IntermediateDirectory="..\Debug\"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="-Zm200 -GX -w34100 -w34189"
+				Optimization="4"
+				AdditionalIncludeDirectories=".;..\..\src\terralib\kernel;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include"
+				PreprocessorDefinitions="UNICODE,WIN32"
+				GeneratePreprocessedFile="0"
+				MinimalRebuild="TRUE"
+				ExceptionHandling="TRUE"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				AssemblerListingLocation="..\Debug\"
+				ObjectFile="..\Debug\"
+				ProgramDataBaseFileName=".\"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Debug/terralib/terralib.lib ../../Debug/libjpeg/libjpeg.lib ../../Debug/tiff/tiff.lib ../../Debug/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
+				OutputFile="..\Debug\databaseSQLQuery.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreDefaultLibraryNames="msvcrt.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				WarningLevel="0"
+				DefaultCharType="0"
+				EnableErrorChecks="1"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="."
+			IntermediateDirectory="..\Release\"
+			ConfigurationType="1">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories=".;..\..\src\terralib\kernel;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include"
+				PreprocessorDefinitions="UNICODE,WIN32"
+				RuntimeLibrary="2"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Release/terralib/terralib.lib ../../Release/libjpeg/libjpeg.lib ../../Release/tiff/tiff.lib ../../Release/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
+				OutputFile="..\Release\databaseSQLQuery.exe"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath=".\databaseSQLQuery.cpp">
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.h">
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/examples.sln b/examples/examples.sln
new file mode 100755
index 0000000..cc2a6a1
--- /dev/null
+++ b/examples/examples.sln
@@ -0,0 +1,332 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "addGeomRepresentation", "addGeomRepresentation\addGeomRepresentation.vcproj", "{AC29CA10-2B75-494F-A370-6767C7AB5FC1}"
+	ProjectSection(ProjectDependencies) = postProject
+		{1CF4791C-050D-4C0F-BF5F-F51F22188FF4} = {1CF4791C-050D-4C0F-BF5F-F51F22188FF4}
+		{7781B164-814A-406B-B1C7-660D95BF3942} = {7781B164-814A-406B-B1C7-660D95BF3942}
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C} = {BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}
+		{70DF8CB8-3CDB-4040-A832-A2FDC05758C2} = {70DF8CB8-3CDB-4040-A832-A2FDC05758C2}
+		{6D2D23CE-3FC9-4AFA-AA25-8A5FF7D51703} = {6D2D23CE-3FC9-4AFA-AA25-8A5FF7D51703}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "convertCoordinates", "convertCoordinates\convertCoordinates.vcproj", "{7AF97D40-AC01-471B-AE4A-81D2542DFE5A}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "copyLayer", "copyLayer\copyLayer.vcproj", "{BA9A9F9F-CD6E-4203-97C6-EBF862BE6A4D}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "createDatabase", "createDatabase\createDatabase.vcproj", "{970FF570-5C7F-48A4-B8C7-C0539D3A45DA}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "createLayer", "createLayer\createLayer.vcproj", "{60593B0C-8CD8-4157-95EC-0185FBAD9268}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "createProximityMatrix", "createProximityMatrix\createProximityMatrix.vcproj", "{766E52C5-4D16-483C-A2B1-48388BC89232}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "createSTElementSet", "createSTElementSet\createSTElementSet.vcproj", "{AC29CA10-2B75-494F-A370-6767C7AB5FC1}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "createSTElementSetFromLayer", "createSTElementSetFromLayer\createSTElementSetFromLayer.vcproj", "{13B81AAF-DFE1-4E64-8B6D-1D4251DF8926}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "createSTElementSetFromTheme", "createSTElementSetFromTheme\createSTElementSetFromTheme.vcproj", "{1BB59FDE-040E-4273-A0E1-2826608FFB95}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "createTable", "createTable\createTable.vcproj", "{970FF570-5C7F-48A4-B8C7-C0539D3A45DA}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "databaseQuery", "databaseQuery\databaseQuery.vcproj", "{970FF570-5C7F-48A4-B8C7-C0539D3A45DA}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "databaseSQLQuery", "databaseSQLQuery\databaseSQLQuery.vcproj", "{970FF570-5C7F-48A4-B8C7-C0539D3A45DA}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "importCSV", "importCSV\importCSV.vcproj", "{AC29CA10-2B75-494F-A370-6767C7AB5FC1}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "importDBF", "importDBF\importDBF.vcproj", "{AC29CA10-2B75-494F-A370-6767C7AB5FC1}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "importGeoTab", "importGeoTab\importGeoTab.vcproj", "{AC29CA10-2B75-494F-A370-6767C7AB5FC1}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "importGridData", "importGridData\importGridData.vcproj", "{AC29CA10-2B75-494F-A370-6767C7AB5FC1}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "importJPEG", "importJPEG\importJPEG.vcproj", "{AC29CA10-2B75-494F-A370-6767C7AB5FC1}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "importMIDMIF", "importMIDMIF\importMIDMIF.vcproj", "{AC29CA10-2B75-494F-A370-6767C7AB5FC1}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "importShape", "importShape\importShape.vcproj", "{AC29CA10-2B75-494F-A370-6767C7AB5FC1}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mosaicTIFFImages", "mosaicTIFFImages\mosaicTIFFImages.vcproj", "{AC29CA10-2B75-494F-A370-6767C7AB5FC1}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "proxMatrixAndSpatialStatistics", "proxMatrixAndSpatialStatistics\proxMatrixAndSpatialStatistics.vcproj", "{38377F38-0982-4920-99D7-370934E022B2}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "querierFromLayer", "querierFromLayer\querierFromLayer.vcproj", "{80AAE397-DA79-440F-B1EF-F7A304FAA94F}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "querierFromTheme", "querierFromTheme\querierFromTheme.vcproj", "{E1FD316B-80D6-4CC0-89DE-FBDCAB9D8A65}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "querierGroupChronon", "querierGroupChronon\querierGroupChronon.vcproj", "{A9396A28-DC43-40CF-A747-54EE8D8D17BD}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "querierGroupElement", "querierGroupElement\querierGroupElement.vcproj", "{AF583813-177A-4F5C-B60B-C5AD0056474A}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "querierGroupSpatialRest", "querierGroupSpatialRest\querierGroupSpatialRest.vcproj", "{6123FB08-BEAA-4586-8BDB-F48974A55935}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "querierWithSpatialRestBox", "querierWithSpatialRestBox\querierWithSpatialRestBox.vcproj", "{B63260EA-95CD-4B78-8EC5-8909737A341D}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "querierWithSpatialRestGeometry", "querierWithSpatialRestGeometry\querierWithSpatialRestGeometry.vcproj", "{752259B0-62E3-49E0-9E87-DB9175684D0C}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rasterSlicing", "rasterSlicing\rasterSlicing.vcproj", "{AC29CA10-2B75-494F-A370-6767C7AB5FC1}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "spatialQuery", "spatialQuery\spatialQuery.vcproj", "{1175F29C-62AB-4584-99FC-34692ABCFF08}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "spatialQueryAndBuffer", "spatialQueryAndBuffer\spatialQueryAndBuffer.vcproj", "{F7A9F697-5308-42A0-A2A6-1D30BAEAC17B}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "themeGrouping", "themeGrouping\themeGrouping.vcproj", "{56B7D410-3CB8-445A-974E-ECCCF4C48232}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjpeg", "..\terralibw\libjpeg\libjpeg.vcproj", "{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shapelib", "..\terralibw\shapelib\shapelib.vcproj", "{7781B164-814A-406B-B1C7-660D95BF3942}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stat", "..\terralibw\stat\stat.vcproj", "{1CF4791C-050D-4C0F-BF5F-F51F22188FF4}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "terralib", "..\terralibw\terralib\terralib.vcproj", "{70DF8CB8-3CDB-4040-A832-A2FDC05758C2}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tiff", "..\terralibw\tiff\tiff.vcproj", "{6D2D23CE-3FC9-4AFA-AA25-8A5FF7D51703}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "createTheme", "createTheme\createTheme.vcproj", "{AC29CA10-2B75-494F-A370-6767C7AB5FC1}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "createTIN", "createTIN\createTIN.vcproj", "{AC29CA10-2B75-494F-A370-6767C7AB5FC1}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		Debug = Debug
+		Release = Release
+	EndGlobalSection
+	GlobalSection(ProjectDependencies) = postSolution
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.ActiveCfg = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.Build.0 = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.ActiveCfg = Release|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.Build.0 = Release|Win32
+		{7AF97D40-AC01-471B-AE4A-81D2542DFE5A}.Debug.ActiveCfg = Debug|Win32
+		{7AF97D40-AC01-471B-AE4A-81D2542DFE5A}.Debug.Build.0 = Debug|Win32
+		{7AF97D40-AC01-471B-AE4A-81D2542DFE5A}.Release.ActiveCfg = Release|Win32
+		{7AF97D40-AC01-471B-AE4A-81D2542DFE5A}.Release.Build.0 = Release|Win32
+		{BA9A9F9F-CD6E-4203-97C6-EBF862BE6A4D}.Debug.ActiveCfg = Debug|Win32
+		{BA9A9F9F-CD6E-4203-97C6-EBF862BE6A4D}.Debug.Build.0 = Debug|Win32
+		{BA9A9F9F-CD6E-4203-97C6-EBF862BE6A4D}.Release.ActiveCfg = Release|Win32
+		{BA9A9F9F-CD6E-4203-97C6-EBF862BE6A4D}.Release.Build.0 = Release|Win32
+		{970FF570-5C7F-48A4-B8C7-C0539D3A45DA}.Debug.ActiveCfg = Debug|Win32
+		{970FF570-5C7F-48A4-B8C7-C0539D3A45DA}.Debug.Build.0 = Debug|Win32
+		{970FF570-5C7F-48A4-B8C7-C0539D3A45DA}.Release.ActiveCfg = Release|Win32
+		{970FF570-5C7F-48A4-B8C7-C0539D3A45DA}.Release.Build.0 = Release|Win32
+		{60593B0C-8CD8-4157-95EC-0185FBAD9268}.Debug.ActiveCfg = Debug|Win32
+		{60593B0C-8CD8-4157-95EC-0185FBAD9268}.Debug.Build.0 = Debug|Win32
+		{60593B0C-8CD8-4157-95EC-0185FBAD9268}.Release.ActiveCfg = Release|Win32
+		{60593B0C-8CD8-4157-95EC-0185FBAD9268}.Release.Build.0 = Release|Win32
+		{766E52C5-4D16-483C-A2B1-48388BC89232}.Debug.ActiveCfg = Debug|Win32
+		{766E52C5-4D16-483C-A2B1-48388BC89232}.Debug.Build.0 = Debug|Win32
+		{766E52C5-4D16-483C-A2B1-48388BC89232}.Release.ActiveCfg = Release|Win32
+		{766E52C5-4D16-483C-A2B1-48388BC89232}.Release.Build.0 = Release|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.ActiveCfg = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.Build.0 = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.ActiveCfg = Release|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.Build.0 = Release|Win32
+		{13B81AAF-DFE1-4E64-8B6D-1D4251DF8926}.Debug.ActiveCfg = Debug|Win32
+		{13B81AAF-DFE1-4E64-8B6D-1D4251DF8926}.Debug.Build.0 = Debug|Win32
+		{13B81AAF-DFE1-4E64-8B6D-1D4251DF8926}.Release.ActiveCfg = Release|Win32
+		{13B81AAF-DFE1-4E64-8B6D-1D4251DF8926}.Release.Build.0 = Release|Win32
+		{1BB59FDE-040E-4273-A0E1-2826608FFB95}.Debug.ActiveCfg = Debug|Win32
+		{1BB59FDE-040E-4273-A0E1-2826608FFB95}.Debug.Build.0 = Debug|Win32
+		{1BB59FDE-040E-4273-A0E1-2826608FFB95}.Release.ActiveCfg = Release|Win32
+		{1BB59FDE-040E-4273-A0E1-2826608FFB95}.Release.Build.0 = Release|Win32
+		{970FF570-5C7F-48A4-B8C7-C0539D3A45DA}.Debug.ActiveCfg = Debug|Win32
+		{970FF570-5C7F-48A4-B8C7-C0539D3A45DA}.Debug.Build.0 = Debug|Win32
+		{970FF570-5C7F-48A4-B8C7-C0539D3A45DA}.Release.ActiveCfg = Release|Win32
+		{970FF570-5C7F-48A4-B8C7-C0539D3A45DA}.Release.Build.0 = Release|Win32
+		{970FF570-5C7F-48A4-B8C7-C0539D3A45DA}.Debug.ActiveCfg = Debug|Win32
+		{970FF570-5C7F-48A4-B8C7-C0539D3A45DA}.Debug.Build.0 = Debug|Win32
+		{970FF570-5C7F-48A4-B8C7-C0539D3A45DA}.Release.ActiveCfg = Release|Win32
+		{970FF570-5C7F-48A4-B8C7-C0539D3A45DA}.Release.Build.0 = Release|Win32
+		{970FF570-5C7F-48A4-B8C7-C0539D3A45DA}.Debug.ActiveCfg = Debug|Win32
+		{970FF570-5C7F-48A4-B8C7-C0539D3A45DA}.Debug.Build.0 = Debug|Win32
+		{970FF570-5C7F-48A4-B8C7-C0539D3A45DA}.Release.ActiveCfg = Release|Win32
+		{970FF570-5C7F-48A4-B8C7-C0539D3A45DA}.Release.Build.0 = Release|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.ActiveCfg = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.Build.0 = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.ActiveCfg = Release|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.Build.0 = Release|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.ActiveCfg = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.Build.0 = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.ActiveCfg = Release|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.Build.0 = Release|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.ActiveCfg = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.Build.0 = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.ActiveCfg = Release|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.Build.0 = Release|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.ActiveCfg = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.Build.0 = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.ActiveCfg = Release|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.Build.0 = Release|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.ActiveCfg = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.Build.0 = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.ActiveCfg = Release|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.Build.0 = Release|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.ActiveCfg = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.Build.0 = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.ActiveCfg = Release|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.Build.0 = Release|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.ActiveCfg = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.Build.0 = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.ActiveCfg = Release|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.Build.0 = Release|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.ActiveCfg = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.Build.0 = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.ActiveCfg = Release|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.Build.0 = Release|Win32
+		{38377F38-0982-4920-99D7-370934E022B2}.Debug.ActiveCfg = Debug|Win32
+		{38377F38-0982-4920-99D7-370934E022B2}.Debug.Build.0 = Debug|Win32
+		{38377F38-0982-4920-99D7-370934E022B2}.Release.ActiveCfg = Release|Win32
+		{38377F38-0982-4920-99D7-370934E022B2}.Release.Build.0 = Release|Win32
+		{80AAE397-DA79-440F-B1EF-F7A304FAA94F}.Debug.ActiveCfg = Debug|Win32
+		{80AAE397-DA79-440F-B1EF-F7A304FAA94F}.Debug.Build.0 = Debug|Win32
+		{80AAE397-DA79-440F-B1EF-F7A304FAA94F}.Release.ActiveCfg = Release|Win32
+		{80AAE397-DA79-440F-B1EF-F7A304FAA94F}.Release.Build.0 = Release|Win32
+		{E1FD316B-80D6-4CC0-89DE-FBDCAB9D8A65}.Debug.ActiveCfg = Debug|Win32
+		{E1FD316B-80D6-4CC0-89DE-FBDCAB9D8A65}.Debug.Build.0 = Debug|Win32
+		{E1FD316B-80D6-4CC0-89DE-FBDCAB9D8A65}.Release.ActiveCfg = Release|Win32
+		{E1FD316B-80D6-4CC0-89DE-FBDCAB9D8A65}.Release.Build.0 = Release|Win32
+		{A9396A28-DC43-40CF-A747-54EE8D8D17BD}.Debug.ActiveCfg = Debug|Win32
+		{A9396A28-DC43-40CF-A747-54EE8D8D17BD}.Debug.Build.0 = Debug|Win32
+		{A9396A28-DC43-40CF-A747-54EE8D8D17BD}.Release.ActiveCfg = Release|Win32
+		{A9396A28-DC43-40CF-A747-54EE8D8D17BD}.Release.Build.0 = Release|Win32
+		{AF583813-177A-4F5C-B60B-C5AD0056474A}.Debug.ActiveCfg = Debug|Win32
+		{AF583813-177A-4F5C-B60B-C5AD0056474A}.Debug.Build.0 = Debug|Win32
+		{AF583813-177A-4F5C-B60B-C5AD0056474A}.Release.ActiveCfg = Release|Win32
+		{AF583813-177A-4F5C-B60B-C5AD0056474A}.Release.Build.0 = Release|Win32
+		{6123FB08-BEAA-4586-8BDB-F48974A55935}.Debug.ActiveCfg = Debug|Win32
+		{6123FB08-BEAA-4586-8BDB-F48974A55935}.Debug.Build.0 = Debug|Win32
+		{6123FB08-BEAA-4586-8BDB-F48974A55935}.Release.ActiveCfg = Release|Win32
+		{6123FB08-BEAA-4586-8BDB-F48974A55935}.Release.Build.0 = Release|Win32
+		{B63260EA-95CD-4B78-8EC5-8909737A341D}.Debug.ActiveCfg = Debug|Win32
+		{B63260EA-95CD-4B78-8EC5-8909737A341D}.Debug.Build.0 = Debug|Win32
+		{B63260EA-95CD-4B78-8EC5-8909737A341D}.Release.ActiveCfg = Release|Win32
+		{B63260EA-95CD-4B78-8EC5-8909737A341D}.Release.Build.0 = Release|Win32
+		{752259B0-62E3-49E0-9E87-DB9175684D0C}.Debug.ActiveCfg = Debug|Win32
+		{752259B0-62E3-49E0-9E87-DB9175684D0C}.Debug.Build.0 = Debug|Win32
+		{752259B0-62E3-49E0-9E87-DB9175684D0C}.Release.ActiveCfg = Release|Win32
+		{752259B0-62E3-49E0-9E87-DB9175684D0C}.Release.Build.0 = Release|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.ActiveCfg = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.Build.0 = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.ActiveCfg = Release|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.Build.0 = Release|Win32
+		{1175F29C-62AB-4584-99FC-34692ABCFF08}.Debug.ActiveCfg = Debug|Win32
+		{1175F29C-62AB-4584-99FC-34692ABCFF08}.Debug.Build.0 = Debug|Win32
+		{1175F29C-62AB-4584-99FC-34692ABCFF08}.Release.ActiveCfg = Release|Win32
+		{1175F29C-62AB-4584-99FC-34692ABCFF08}.Release.Build.0 = Release|Win32
+		{F7A9F697-5308-42A0-A2A6-1D30BAEAC17B}.Debug.ActiveCfg = Debug|Win32
+		{F7A9F697-5308-42A0-A2A6-1D30BAEAC17B}.Debug.Build.0 = Debug|Win32
+		{F7A9F697-5308-42A0-A2A6-1D30BAEAC17B}.Release.ActiveCfg = Release|Win32
+		{F7A9F697-5308-42A0-A2A6-1D30BAEAC17B}.Release.Build.0 = Release|Win32
+		{56B7D410-3CB8-445A-974E-ECCCF4C48232}.Debug.ActiveCfg = Debug|Win32
+		{56B7D410-3CB8-445A-974E-ECCCF4C48232}.Debug.Build.0 = Debug|Win32
+		{56B7D410-3CB8-445A-974E-ECCCF4C48232}.Release.ActiveCfg = Release|Win32
+		{56B7D410-3CB8-445A-974E-ECCCF4C48232}.Release.Build.0 = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.ActiveCfg = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.Build.0 = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.ActiveCfg = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.Build.0 = Release|Win32
+		{7781B164-814A-406B-B1C7-660D95BF3942}.Debug.ActiveCfg = Debug|Win32
+		{7781B164-814A-406B-B1C7-660D95BF3942}.Debug.Build.0 = Debug|Win32
+		{7781B164-814A-406B-B1C7-660D95BF3942}.Release.ActiveCfg = Release|Win32
+		{7781B164-814A-406B-B1C7-660D95BF3942}.Release.Build.0 = Release|Win32
+		{1CF4791C-050D-4C0F-BF5F-F51F22188FF4}.Debug.ActiveCfg = Debug|Win32
+		{1CF4791C-050D-4C0F-BF5F-F51F22188FF4}.Debug.Build.0 = Debug|Win32
+		{1CF4791C-050D-4C0F-BF5F-F51F22188FF4}.Release.ActiveCfg = Release|Win32
+		{1CF4791C-050D-4C0F-BF5F-F51F22188FF4}.Release.Build.0 = Release|Win32
+		{70DF8CB8-3CDB-4040-A832-A2FDC05758C2}.Debug.ActiveCfg = Debug|Win32
+		{70DF8CB8-3CDB-4040-A832-A2FDC05758C2}.Debug.Build.0 = Debug|Win32
+		{70DF8CB8-3CDB-4040-A832-A2FDC05758C2}.Release.ActiveCfg = Release|Win32
+		{70DF8CB8-3CDB-4040-A832-A2FDC05758C2}.Release.Build.0 = Release|Win32
+		{6D2D23CE-3FC9-4AFA-AA25-8A5FF7D51703}.Debug.ActiveCfg = Debug|Win32
+		{6D2D23CE-3FC9-4AFA-AA25-8A5FF7D51703}.Debug.Build.0 = Debug|Win32
+		{6D2D23CE-3FC9-4AFA-AA25-8A5FF7D51703}.Release.ActiveCfg = Release|Win32
+		{6D2D23CE-3FC9-4AFA-AA25-8A5FF7D51703}.Release.Build.0 = Release|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.ActiveCfg = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.Build.0 = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.ActiveCfg = Release|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.Build.0 = Release|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.ActiveCfg = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.Build.0 = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.ActiveCfg = Release|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
diff --git a/examples/image_processing/Makefile b/examples/image_processing/Makefile
new file mode 100755
index 0000000..dc6db05
--- /dev/null
+++ b/examples/image_processing/Makefile
@@ -0,0 +1,21 @@
+buildtests: 
+	qmake -o Makefile_examples;
+	make -f Makefile_examples;
+  
+distclean: 
+	qmake -o Makefile_examples;
+	make -f Makefile_examples distclean;	
+
+clean : distclean	
+
+runalltests :	
+	./run_all_tests_unix.sh;	
+	
+check : distclean buildtests runalltests	
+
+distcheck : check	
+
+all : distclean buildtests
+	
+  
+
diff --git a/examples/image_processing/bin/run_all_tests_unix.sh b/examples/image_processing/bin/run_all_tests_unix.sh
new file mode 100755
index 0000000..064ba0f
--- /dev/null
+++ b/examples/image_processing/bin/run_all_tests_unix.sh
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+echo Starting test procedure...
+echo The current directory is:
+pwd
+
+echo Cleanning garbage files...
+find -name "*.tif" -exec rm -f {} \;
+find -name "*.ilk" -exec rm -f {} \;
+find -name "*.pdb" -exec rm -f {} \;
+find -name "*.exe" -exec rm -f {} \;
+echo Cleanning done.
+
+TEST_FAILED=0
+AT_LEAST_ONE_TEST_FAILED=0
+
+for i in $( ls TePDI* ); do
+  if [ -x $i ]; then
+    echo Now running $i test ...
+    
+    TEST_FAILED=0
+    /bin/nice -n +5 $i &> /tmp/terralibupdate.log
+    
+    if [ "$?" -ne "0" ]; then 
+      TEST_FAILED=1
+      AT_LEAST_ONE_TEST_FAILED=1
+      echo Test $i failed.
+    fi
+    
+    if [ -n "$1" ]; then
+      echo ----------------------------------------------------------------
+      cat /tmp/terralibupdate.log
+      echo ----------------------------------------------------------------    
+    else
+      if [ $TEST_FAILED -eq "1" ]; then
+        echo ----------------------------------------------------------------
+        cat /tmp/terralibupdate.log
+        echo ----------------------------------------------------------------    
+      fi      
+    fi
+  fi
+done
+if [ $AT_LEAST_ONE_TEST_FAILED -ne "0" ]; then
+  echo ----------------------------------------------------------------
+  echo Test procedure finished with errors.
+else
+  echo Test procedure finished with no errors.
+fi
diff --git a/examples/image_processing/image_processing.pro b/examples/image_processing/image_processing.pro
new file mode 100755
index 0000000..1bc3ccb
--- /dev/null
+++ b/examples/image_processing/image_processing.pro
@@ -0,0 +1,7 @@
+
+TEMPLATE = subdirs
+
+SUBDIRS = \
+          source
+
+
diff --git a/examples/image_processing/image_processing.sln b/examples/image_processing/image_processing.sln
new file mode 100755
index 0000000..a613455
--- /dev/null
+++ b/examples/image_processing/image_processing.sln
@@ -0,0 +1,348 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TePDIArithmetic_test", "source\TePDIArithmetic\TePDIArithmetic_test.vcproj", "{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	ProjectSection(ProjectDependencies) = postProject
+		{56D7AA1F-BA95-4B48-843A-D264BEFF4E83} = {56D7AA1F-BA95-4B48-843A-D264BEFF4E83}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TePDIBDFilter_test", "source\TePDIBDFilter\TePDIBDFilter_test.vcproj", "{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TePDIColorTransform_test", "source\TePDIColorTransform\TePDIColorTransform_test.vcproj", "{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TePDIContrast_test", "source\TePDIContrast\TePDIContrast_test.vcproj", "{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TePDIFilterMask_test", "source\TePDIFilterMask\TePDIFilterMask_test.vcproj", "{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TePDIHistogram_test", "source\TePDIHistogram\TePDIHistogram_test.vcproj", "{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TePDILinearFilter_test", "source\TePDILinearFilter\TePDILinearFilter_test.vcproj", "{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TePDIMatrix_test", "source\TePDIMatrix\TePDIMatrix_test.vcproj", "{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TePDIMorfFilter_test", "source\TePDIMorfFilter\TePDIMorfFilter_test.vcproj", "{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TePDIParameters_test", "source\TePDIParameters\TePDIParameters_test.vcproj", "{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TePDIPrincipalComponents_test", "source\TePDIPrincipalComponents\TePDIPrincipalComponents_test.vcproj", "{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TePDIRadarFilters_test", "source\TePDIRadarFilters\TePDIRadarFilters_test.vcproj", "{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TePDIRaster2Vector_test", "source\TePDIRaster2Vector\TePDIRaster2Vector_test.vcproj", "{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TePDIRgbPalette_test", "source\TePDIRgbPalette\TePDIRgbPalette_test.vcproj", "{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TePDIStatistic_test", "source\TePDIStatistic\TePDIStatistic_test.vcproj", "{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TePDIUtils_test", "source\TePDIUtils\TePDIUtils_test.vcproj", "{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TePDIMosaic_test", "source\TePDIMosaic\TePDIMosaic_test.vcproj", "{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TePDIFusion_test", "source\TePDIFusion\TePDIFusion_test.vcproj", "{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TePDIMathFunctions_test", "source\TePDIMathFunctions\TePDIMathFunctions_test.vcproj", "{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TePDIMatrixFunctions_test", "source\TePDIMatrixFunctions\TePDIMatrixFunctions_test.vcproj", "{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TePDIWavelets_test", "source\TePDIWavelets\TePDIWavelets_test.vcproj", "{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TePDISegmentation_test", "source\TePDISegmentation\TePDISegmentation_test.vcproj", "{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "terralib", "..\..\terralibw\terralib\terralib.vcproj", "{70DF8CB8-3CDB-4040-A832-A2FDC05758C2}"
+	ProjectSection(ProjectDependencies) = postProject
+		{5E88B863-2CFC-4076-B6B5-6AAD2E75EF07} = {5E88B863-2CFC-4076-B6B5-6AAD2E75EF07}
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C} = {BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}
+		{4CF0DECC-273D-438E-A073-8ADBE30F6F5C} = {4CF0DECC-273D-438E-A073-8ADBE30F6F5C}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "terralibpdi", "..\..\terralibw\image_processing\terralibpdi.vcproj", "{56D7AA1F-BA95-4B48-843A-D264BEFF4E83}"
+	ProjectSection(ProjectDependencies) = postProject
+		{70DF8CB8-3CDB-4040-A832-A2FDC05758C2} = {70DF8CB8-3CDB-4040-A832-A2FDC05758C2}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tiff", "..\..\terralibw\tiff\tiff.vcproj", "{5E88B863-2CFC-4076-B6B5-6AAD2E75EF07}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shapelib", "..\..\terralibw\shapelib\shapelib.vcproj", "{4CF0DECC-273D-438E-A073-8ADBE30F6F5C}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TePDIInterpolator_test", "source\TePDIInterpolator\TePDIInterpolator_test.vcproj", "{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TePDIRegister_test", "source\TePDIRegister\TePDIRegister_test.vcproj", "{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TePDIBlending_test", "source\TePDIBlending\TePDIBlending_test.vcproj", "{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TePDIHaralick_test", "source\TePDIHaralick\TePDIHaralick_test.vcproj", "{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TePDIClassification_test", "source\TePDIClassification\TePDIClassification_test.vcproj", "{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TePDIMixModel_test", "source\TePDIMixModel\TePDIMixModel_test.vcproj", "{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TePDISensorSimulator_test", "source\TePDISensorSimulator\TePDISensorSimulator_test.vcproj", "{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjpeg", "..\..\terralibw\libjpeg\libjpeg.vcproj", "{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TePDIPIManager_test", "source\TePDIPIManager\TePDIPIManager_test.vcproj", "{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TePDIDecorrelationEnhancement_test", "source\TePDIDecorrelationEnhancement\TePDIDecorrelationEnhancement_test.vcproj", "{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TePDIOFMatching_test", "source\TePDIOFMatching\TePDIOFMatching_test.vcproj", "{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TePDICorrelationMatching_test", "source\TePDICorrelationMatching\TePDICorrelationMatching_test.vcproj", "{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TePDIMIMatching_test", "source\TePDIMIMatching\TePDIMIMatching_test.vcproj", "{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TePDIJointHistogram_test", "source\TePDIJointHistogram\TePDIJointHistogram_test.vcproj", "{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TePDIMMIOMatching_test", "source\TePDIMMIOMatching\TePDIMMIOMatching_test.vcproj", "{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		Debug = Debug
+		Release = Release
+	EndGlobalSection
+	GlobalSection(ProjectDependencies) = postSolution
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.ActiveCfg = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.Build.0 = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.ActiveCfg = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.Build.0 = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.ActiveCfg = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.Build.0 = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.ActiveCfg = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.Build.0 = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.ActiveCfg = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.Build.0 = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.ActiveCfg = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.Build.0 = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.ActiveCfg = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.Build.0 = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.ActiveCfg = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.Build.0 = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.ActiveCfg = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.Build.0 = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.ActiveCfg = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.Build.0 = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.ActiveCfg = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.Build.0 = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.ActiveCfg = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.Build.0 = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.ActiveCfg = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.Build.0 = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.ActiveCfg = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.Build.0 = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.ActiveCfg = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.Build.0 = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.ActiveCfg = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.Build.0 = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.ActiveCfg = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.Build.0 = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.ActiveCfg = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.Build.0 = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.ActiveCfg = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.Build.0 = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.ActiveCfg = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.Build.0 = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.ActiveCfg = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.Build.0 = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.ActiveCfg = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.Build.0 = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.ActiveCfg = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.Build.0 = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.ActiveCfg = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.Build.0 = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.ActiveCfg = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.Build.0 = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.ActiveCfg = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.Build.0 = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.ActiveCfg = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.Build.0 = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.ActiveCfg = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.Build.0 = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.ActiveCfg = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.Build.0 = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.ActiveCfg = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.Build.0 = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.ActiveCfg = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.Build.0 = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.ActiveCfg = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.Build.0 = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.ActiveCfg = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.Build.0 = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.ActiveCfg = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.Build.0 = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.ActiveCfg = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.Build.0 = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.ActiveCfg = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.Build.0 = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.ActiveCfg = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.Build.0 = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.ActiveCfg = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.Build.0 = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.ActiveCfg = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.Build.0 = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.ActiveCfg = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.Build.0 = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.ActiveCfg = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.Build.0 = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.ActiveCfg = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.Build.0 = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.ActiveCfg = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.Build.0 = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.ActiveCfg = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.Build.0 = Release|Win32
+		{70DF8CB8-3CDB-4040-A832-A2FDC05758C2}.Debug.ActiveCfg = Debug|Win32
+		{70DF8CB8-3CDB-4040-A832-A2FDC05758C2}.Debug.Build.0 = Debug|Win32
+		{70DF8CB8-3CDB-4040-A832-A2FDC05758C2}.Release.ActiveCfg = Release|Win32
+		{70DF8CB8-3CDB-4040-A832-A2FDC05758C2}.Release.Build.0 = Release|Win32
+		{56D7AA1F-BA95-4B48-843A-D264BEFF4E83}.Debug.ActiveCfg = Debug|Win32
+		{56D7AA1F-BA95-4B48-843A-D264BEFF4E83}.Debug.Build.0 = Debug|Win32
+		{56D7AA1F-BA95-4B48-843A-D264BEFF4E83}.Release.ActiveCfg = Release|Win32
+		{56D7AA1F-BA95-4B48-843A-D264BEFF4E83}.Release.Build.0 = Release|Win32
+		{5E88B863-2CFC-4076-B6B5-6AAD2E75EF07}.Debug.ActiveCfg = Debug|Win32
+		{5E88B863-2CFC-4076-B6B5-6AAD2E75EF07}.Debug.Build.0 = Debug|Win32
+		{5E88B863-2CFC-4076-B6B5-6AAD2E75EF07}.Release.ActiveCfg = Release|Win32
+		{5E88B863-2CFC-4076-B6B5-6AAD2E75EF07}.Release.Build.0 = Release|Win32
+		{4CF0DECC-273D-438E-A073-8ADBE30F6F5C}.Debug.ActiveCfg = Debug|Win32
+		{4CF0DECC-273D-438E-A073-8ADBE30F6F5C}.Debug.Build.0 = Debug|Win32
+		{4CF0DECC-273D-438E-A073-8ADBE30F6F5C}.Release.ActiveCfg = Release|Win32
+		{4CF0DECC-273D-438E-A073-8ADBE30F6F5C}.Release.Build.0 = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.ActiveCfg = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.Build.0 = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.ActiveCfg = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.Build.0 = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.ActiveCfg = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.Build.0 = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.ActiveCfg = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.Build.0 = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.ActiveCfg = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.Build.0 = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.ActiveCfg = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.Build.0 = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.ActiveCfg = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.Build.0 = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.ActiveCfg = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.Build.0 = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.ActiveCfg = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.Build.0 = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.ActiveCfg = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.Build.0 = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.ActiveCfg = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.Build.0 = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.ActiveCfg = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.Build.0 = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.ActiveCfg = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.Build.0 = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.ActiveCfg = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.Build.0 = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.ActiveCfg = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.Build.0 = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.ActiveCfg = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.Build.0 = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.ActiveCfg = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.Build.0 = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.ActiveCfg = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.Build.0 = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.ActiveCfg = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.Build.0 = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.ActiveCfg = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.Build.0 = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.ActiveCfg = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.Build.0 = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.ActiveCfg = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.Build.0 = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.ActiveCfg = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.Build.0 = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.ActiveCfg = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.Build.0 = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.ActiveCfg = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.Build.0 = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.ActiveCfg = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.Build.0 = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.ActiveCfg = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.Build.0 = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.ActiveCfg = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.Build.0 = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.ActiveCfg = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Debug.Build.0 = Debug|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.ActiveCfg = Release|Win32
+		{D881CFAF-6E61-4842-8ACF-A33287EA5223}.Release.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
diff --git a/examples/image_processing/readme.txt b/examples/image_processing/readme.txt
new file mode 100755
index 0000000..eba8399
--- /dev/null
+++ b/examples/image_processing/readme.txt
@@ -0,0 +1,34 @@
+The examples/image_processing directory
+ 
+This directory intends to be a repository of image processing 
+algorithms tests, therefore all tests can be seen as examples 
+of how to use the algorithms classes.
+ 
+1 - Directory hierarchy:
+ 
+image_processing
+  |
+  |-- bin - A place for the compiled tests binaries.
+  |
+  |-- resources - A place of data used by all the tests ( test images, i.e. ).
+  |
+  |-- souce - The source of all testes, organized by directories.
+  
+  
+2 - Compiling all testes
+
+  Windows : 
+    Use the included solution project ( image_processing.sln ) at the top level 
+    directory. A recursive compilation will be performed and the compiled 
+    binaries will be generated inside the "bin"  directory, 
+    from where each one can be executed.
+
+  Linux: 
+    Just use make at the top level directory. A recursive compilation will be 
+    performed using the QT project files and the compiled binaries will be 
+    generated inside the "bin"  directory, from where each one can be executed.
+
+NOTE: Requirement : PDIAGN_DEBUG_MODE flag must be used when compiling
+libPDI for use with tests.
+
+
diff --git a/examples/image_processing/resources/cbers2b_hrc_crop.tif b/examples/image_processing/resources/cbers2b_hrc_crop.tif
new file mode 100644
index 0000000..fe28913
Binary files /dev/null and b/examples/image_processing/resources/cbers2b_hrc_crop.tif differ
diff --git a/examples/image_processing/resources/cbers2b_rgb342_crop.tif b/examples/image_processing/resources/cbers2b_rgb342_crop.tif
new file mode 100644
index 0000000..a593cbc
Binary files /dev/null and b/examples/image_processing/resources/cbers2b_rgb342_crop.tif differ
diff --git a/src/terralib/PDI/tests/resources/cbers_b2_crop.tif b/examples/image_processing/resources/cbers_b2_crop.tif
similarity index 100%
rename from src/terralib/PDI/tests/resources/cbers_b2_crop.tif
rename to examples/image_processing/resources/cbers_b2_crop.tif
diff --git a/examples/image_processing/resources/cbers_b2_crop_A.tif b/examples/image_processing/resources/cbers_b2_crop_A.tif
new file mode 100755
index 0000000..2a4dd5a
Binary files /dev/null and b/examples/image_processing/resources/cbers_b2_crop_A.tif differ
diff --git a/examples/image_processing/resources/cbers_b2_crop_B_contraste.tif b/examples/image_processing/resources/cbers_b2_crop_B_contraste.tif
new file mode 100755
index 0000000..17c113a
Binary files /dev/null and b/examples/image_processing/resources/cbers_b2_crop_B_contraste.tif differ
diff --git a/examples/image_processing/resources/cbers_b2_crop_C.tif b/examples/image_processing/resources/cbers_b2_crop_C.tif
new file mode 100755
index 0000000..aa1eff0
Binary files /dev/null and b/examples/image_processing/resources/cbers_b2_crop_C.tif differ
diff --git a/examples/image_processing/resources/cbers_b2_crop_contraste.tif b/examples/image_processing/resources/cbers_b2_crop_contraste.tif
new file mode 100755
index 0000000..b57002e
Binary files /dev/null and b/examples/image_processing/resources/cbers_b2_crop_contraste.tif differ
diff --git a/examples/image_processing/resources/cbers_b2_crop_contraste_halfsampled.tif b/examples/image_processing/resources/cbers_b2_crop_contraste_halfsampled.tif
new file mode 100755
index 0000000..ee86d2c
Binary files /dev/null and b/examples/image_processing/resources/cbers_b2_crop_contraste_halfsampled.tif differ
diff --git a/examples/image_processing/resources/cbers_rgb342_crop1.tif b/examples/image_processing/resources/cbers_rgb342_crop1.tif
new file mode 100755
index 0000000..db23913
Binary files /dev/null and b/examples/image_processing/resources/cbers_rgb342_crop1.tif differ
diff --git a/examples/image_processing/resources/cbers_rgb342_crop1_halfsampled.tif b/examples/image_processing/resources/cbers_rgb342_crop1_halfsampled.tif
new file mode 100644
index 0000000..b3cf9b5
Binary files /dev/null and b/examples/image_processing/resources/cbers_rgb342_crop1_halfsampled.tif differ
diff --git a/examples/image_processing/resources/cbers_rgb342_crop2.tif b/examples/image_processing/resources/cbers_rgb342_crop2.tif
new file mode 100755
index 0000000..bf79686
Binary files /dev/null and b/examples/image_processing/resources/cbers_rgb342_crop2.tif differ
diff --git a/examples/image_processing/resources/cbers_rgb342_crop3.tif b/examples/image_processing/resources/cbers_rgb342_crop3.tif
new file mode 100755
index 0000000..7f547e7
Binary files /dev/null and b/examples/image_processing/resources/cbers_rgb342_crop3.tif differ
diff --git a/examples/image_processing/run_all_tests_unix.sh b/examples/image_processing/run_all_tests_unix.sh
new file mode 100755
index 0000000..5d38e94
--- /dev/null
+++ b/examples/image_processing/run_all_tests_unix.sh
@@ -0,0 +1,51 @@
+#!/bin/bash
+
+echo Starting test procedure...
+
+cd bin
+echo The current directory is:
+pwd
+
+echo Cleanning garbage files...
+find -name "*.tif" -exec rm -f {} \;
+find -name "*.ilk" -exec rm -f {} \;
+find -name "*.pdb" -exec rm -f {} \;
+find -name "*.exe" -exec rm -f {} \;
+echo Cleanning done.
+
+AT_LEAST_ONE_TEST_FAILED=0
+LOGFILE=/tmp/pditestsunit.log
+
+for i in $( ls TePDI* ); do
+  if [ -x $i ]; then
+    echo Now running $i test ...
+    
+    TEST_FAILED=0
+    rm -f $LOGFILE
+    
+    ./$i &> $LOGFILE
+    
+    if [ "$?" -ne "0" ]; then 
+      TEST_FAILED=1
+      AT_LEAST_ONE_TEST_FAILED=1
+      echo Test $i failed.
+      
+      echo ----------------------------------------------------------------
+      cat $LOGFILE
+      echo ----------------------------------------------------------------       
+    else
+      echo Test $i OK.
+    fi
+  fi
+done
+
+if [ $AT_LEAST_ONE_TEST_FAILED -ne "0" ]; then
+  echo ----------------------------------------------------------------
+  echo Test procedure finished with errors.
+  cd ..
+  exit 1
+else
+  echo Test procedure finished with no errors.
+  cd ..
+  exit 0
+fi
diff --git a/examples/image_processing/source/TePDIArithmetic/TePDIArithmetic.pro b/examples/image_processing/source/TePDIArithmetic/TePDIArithmetic.pro
new file mode 100755
index 0000000..014d929
--- /dev/null
+++ b/examples/image_processing/source/TePDIArithmetic/TePDIArithmetic.pro
@@ -0,0 +1,9 @@
+include( ../base/base.pro )
+
+SOURCES += \
+  TePDIArithmetic_test.cpp
+
+
+QMAKE_CLEAN += \
+  ../../bin/TePDIArith*.tif
+
diff --git a/examples/image_processing/source/TePDIArithmetic/TePDIArithmetic_test.cpp b/examples/image_processing/source/TePDIArithmetic/TePDIArithmetic_test.cpp
new file mode 100755
index 0000000..26f95f7
--- /dev/null
+++ b/examples/image_processing/source/TePDIArithmetic/TePDIArithmetic_test.cpp
@@ -0,0 +1,512 @@
+#define TEAGN_ENABLE_STDOUT_LOG
+
+#include <TePDIExamplesBase.hpp>
+
+#include <TePDIArithmetic.hpp>
+#include <TePDIParameters.hpp>
+#include <TePDIUtils.hpp>
+
+#include <TeRaster.h>
+#include <TeInitRasterDecoders.h>
+#include <TeProgress.h>
+#include <TeStdIOProgress.h>
+
+#include <TeAgnostic.h>
+
+#include <string>
+
+void TePDIAType1_test()
+{
+  TePDIParameters params;
+
+  params.SetParameter( "arithmetic_type", TePDIArithmetic::TePDIAType1 );
+
+  TePDITypes::TePDIRasterPtrType inRaster1( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster1->init(), "Unable to init inRaster1" );
+  params.SetParameter( "input_image1", inRaster1 );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeUNSIGNEDCHAR, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  params.SetParameter( "img1_chan", (int)0 );
+  params.SetParameter( "gain", 2. );
+  params.SetParameter( "offset", 0. );
+
+  TePDIArithmetic arith;
+    
+  TEAGN_TRUE_OR_THROW( arith.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( arith.Apply(),
+    "Apply error" );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "TePDIArithTePDIAType1_test.tif" ), "GeoTIF generation error" );
+}
+
+
+void TePDIAType1_norm_test()
+{
+  TePDIParameters params;
+
+  params.SetParameter( "arithmetic_type", TePDIArithmetic::TePDIAType1 );
+
+  TePDITypes::TePDIRasterPtrType inRaster1( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster1->init(), "Unable to init inRaster1" );
+  params.SetParameter( "input_image1", inRaster1 );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeUNSIGNEDCHAR, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  params.SetParameter( "img1_chan", (int)0 );
+  params.SetParameter( "gain", 2. );
+  params.SetParameter( "offset", 0. );
+  params.SetParameter( "normalize_output", (int)1 );
+
+  TePDIArithmetic arith;
+    
+  TEAGN_TRUE_OR_THROW( arith.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( arith.Apply(),
+    "Apply error" );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "TePDIArithTePDIAType1_norm_test.tif" ), "GeoTIF generation error" );
+}
+
+
+void TePDIAType2_test()
+{
+  TePDIParameters params;
+
+  params.SetParameter( "arithmetic_type", TePDIArithmetic::TePDIAType2 );
+
+  TePDITypes::TePDIRasterPtrType inRaster1( new TeRaster(
+    std::string( TEPDIEXAMPLESBINPATH "TePDIArithTePDIAType1_test.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster1->init(), "Unable to init inRaster1" );
+  params.SetParameter( "input_image1", inRaster1 );
+
+  TePDITypes::TePDIRasterPtrType inRaster2( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster2->init(), "Unable to init inRaster2" );
+  params.SetParameter( "input_image2", inRaster2 );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeUNSIGNEDCHAR, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  params.SetParameter( "img1_chan", (int)0 );
+  params.SetParameter( "img2_chan", (int)0 );
+  params.SetParameter( "gain", 1. );
+  params.SetParameter( "offset", 0. );
+
+  TePDIArithmetic arith;
+    
+  TEAGN_TRUE_OR_THROW( arith.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( arith.Apply(),
+    "Apply error" );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "TePDIArithTePDIAType2_test.tif" ), "GeoTIF generation error" );
+}
+
+
+void TePDIAType2_norm_test()
+{
+  TePDIParameters params;
+
+  params.SetParameter( "arithmetic_type", TePDIArithmetic::TePDIAType2 );
+
+  TePDITypes::TePDIRasterPtrType inRaster1( new TeRaster(
+    std::string( TEPDIEXAMPLESBINPATH "TePDIArithTePDIAType1_test.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster1->init(), "Unable to init inRaster1" );
+  params.SetParameter( "input_image1", inRaster1 );
+
+  TePDITypes::TePDIRasterPtrType inRaster2( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster2->init(), "Unable to init inRaster2" );
+  params.SetParameter( "input_image2", inRaster2 );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeUNSIGNEDCHAR, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  params.SetParameter( "img1_chan", (int)0 );
+  params.SetParameter( "img2_chan", (int)0 );
+  params.SetParameter( "gain", 1. );
+  params.SetParameter( "offset", 0. );
+  params.SetParameter( "normalize_output", (int)1 );
+
+  TePDIArithmetic arith;
+    
+  TEAGN_TRUE_OR_THROW( arith.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( arith.Apply(),
+    "Apply error" );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "TePDIArithTePDIAType2_norm_test.tif" ), "GeoTIF generation error" );
+}
+
+void TePDIAType1_numeric_test()
+{
+  /* Creating images */
+  
+  TePDITypes::TePDIRasterPtrType input_image1;
+  TePDITypes::TePDIRasterPtrType input_image2;
+  TePDITypes::TePDIRasterPtrType output_image;
+  
+  TeRasterParams params;
+  params.nBands( 1 );
+  params.nlines_ = 1;
+  params.ncols_ = 1;
+  params.setDataType( TeDOUBLE, -1 );
+    
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( 
+    input_image1, params, false ), "Allocation error" );
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( 
+    input_image2, params, false ), "Allocation error" );
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( 
+    output_image, params, false ), "Allocation error" );
+        
+  TEAGN_TRUE_OR_THROW( input_image1->setElement( 0, 0, 2.0, 0 ), 
+    "error defining raster element");
+  TEAGN_TRUE_OR_THROW( input_image2->setElement( 0, 0, 3.0, 0 ), 
+    "error defining raster element");
+    
+  /* Calling algorithm */
+  
+  TePDIParameters algo_params;
+  algo_params.SetParameter( "arithmetic_type", 
+    TePDIArithmetic::TePDIAType1 );
+  algo_params.SetParameter( "input_image1", input_image1 );
+  algo_params.SetParameter( "input_image2", input_image2 );
+  algo_params.SetParameter( "img1_chan", (int)0 );
+  algo_params.SetParameter( "img2_chan", (int)0 );
+  algo_params.SetParameter( "gain", (double)2 );
+  algo_params.SetParameter( "offset", (double)1 );
+  algo_params.SetParameter( "output_image", output_image );
+
+  TePDIArithmetic arith_instance;
+    
+  TEAGN_TRUE_OR_THROW( arith_instance.Reset( algo_params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( arith_instance.Apply(),
+    "Apply error" ); 
+    
+  /* Checking values */
+  
+  TEAGN_TRUE_OR_THROW( 
+    ( output_image->params().nlines_ == 
+    input_image1->params().nlines_ ) &&
+    ( output_image->params().ncols_ == 
+    input_image1->params().ncols_ ) &&
+    ( output_image->params().nBands() == 1 ),
+    "Invalid output raster size" )
+  
+  double value = 0; 
+  
+  TEAGN_TRUE_OR_THROW( output_image->getElement( 0, 0, value, 0 ), 
+    "error getting raster element");  
+  TEAGN_CHECK_EPS( value, 5, 0, "Invalid value" );
+}
+
+void TePDIAType2_numeric_test()
+{
+  /* Creating images */
+  
+  TePDITypes::TePDIRasterPtrType input_image1;
+  TePDITypes::TePDIRasterPtrType input_image2;
+  TePDITypes::TePDIRasterPtrType output_image;
+  
+  TeRasterParams params;
+  params.nBands( 1 );
+  params.nlines_ = 1;
+  params.ncols_ = 1;
+  params.setDataType( TeDOUBLE, -1 );
+    
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( 
+    input_image1, params, false ), "Allocation error" );
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( 
+    input_image2, params, false ), "Allocation error" );
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( 
+    output_image, params, false ), "Allocation error" );
+        
+  TEAGN_TRUE_OR_THROW( input_image1->setElement( 0, 0, 2.0, 0 ), 
+    "error defining raster element");
+  TEAGN_TRUE_OR_THROW( input_image2->setElement( 0, 0, 3.0, 0 ), 
+    "error defining raster element");
+    
+  /* Calling algorithm */
+  
+  TePDIParameters algo_params;
+  algo_params.SetParameter( "arithmetic_type", 
+    TePDIArithmetic::TePDIAType2 );
+  algo_params.SetParameter( "input_image1", input_image1 );
+  algo_params.SetParameter( "input_image2", input_image2 );
+  algo_params.SetParameter( "img1_chan", (int)0 );
+  algo_params.SetParameter( "img2_chan", (int)0 );
+  algo_params.SetParameter( "gain", (double)2 );
+  algo_params.SetParameter( "offset", (double)1 );
+  algo_params.SetParameter( "output_image", output_image );
+
+  TePDIArithmetic arith_instance;
+    
+  TEAGN_TRUE_OR_THROW( arith_instance.Reset( algo_params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( arith_instance.Apply(),
+    "Apply error" ); 
+    
+  /* Checking values */
+  
+  TEAGN_TRUE_OR_THROW( 
+    ( output_image->params().nlines_ == 
+    input_image1->params().nlines_ ) &&
+    ( output_image->params().ncols_ == 
+    input_image1->params().ncols_ ) &&
+    ( output_image->params().nBands() == 1 ),
+    "Invalid output raster size" )  
+  
+  double value = 0; 
+  
+  TEAGN_TRUE_OR_THROW( output_image->getElement( 0, 0, value, 0 ), 
+    "error getting raster element");  
+  TEAGN_CHECK_EPS( value, -1, 0, "Invalid value" );
+}
+
+void TePDIAType3_numeric_test()
+{
+  /* Creating images */
+  
+  TePDITypes::TePDIRasterPtrType input_image1;
+  TePDITypes::TePDIRasterPtrType input_image2;
+  TePDITypes::TePDIRasterPtrType output_image;
+  
+  TeRasterParams params;
+  params.nBands( 1 );
+  params.nlines_ = 1;
+  params.ncols_ = 1;
+  params.setDataType( TeDOUBLE, -1 );
+    
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( 
+    input_image1, params, false ), "Allocation error" );
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( 
+    input_image2, params, false ), "Allocation error" );
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( 
+    output_image, params, false ), "Allocation error" );
+        
+  TEAGN_TRUE_OR_THROW( input_image1->setElement( 0, 0, 2.0, 0 ), 
+    "error defining raster element");
+  TEAGN_TRUE_OR_THROW( input_image2->setElement( 0, 0, 3.0, 0 ), 
+    "error defining raster element");
+    
+  /* Calling algorithm */
+  
+  TePDIParameters algo_params;
+  algo_params.SetParameter( "arithmetic_type", 
+    TePDIArithmetic::TePDIAType3 );
+  algo_params.SetParameter( "input_image1", input_image1 );
+  algo_params.SetParameter( "input_image2", input_image2 );
+  algo_params.SetParameter( "img1_chan", (int)0 );
+  algo_params.SetParameter( "img2_chan", (int)0 );
+  algo_params.SetParameter( "gain", (double)2 );
+  algo_params.SetParameter( "offset", (double)1 );
+  algo_params.SetParameter( "output_image", output_image );
+
+  TePDIArithmetic arith_instance;
+    
+  TEAGN_TRUE_OR_THROW( arith_instance.Reset( algo_params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( arith_instance.Apply(),
+    "Apply error" ); 
+    
+  /* Checking values */
+  
+  TEAGN_TRUE_OR_THROW( 
+    ( output_image->params().nlines_ == 
+    input_image1->params().nlines_ ) &&
+    ( output_image->params().ncols_ == 
+    input_image1->params().ncols_ ) &&
+    ( output_image->params().nBands() == 1 ),
+    "Invalid output raster size" )  
+  
+  double value = 0; 
+  
+  TEAGN_TRUE_OR_THROW( output_image->getElement( 0, 0, value, 0 ), 
+    "error getting raster element");  
+  TEAGN_CHECK_EPS( value, 11, 0, "Invalid value" );
+}
+
+void TePDIAType4_numeric_test()
+{
+  /* Creating images */
+  
+  TePDITypes::TePDIRasterPtrType input_image1;
+  TePDITypes::TePDIRasterPtrType input_image2;
+  TePDITypes::TePDIRasterPtrType output_image;
+  
+  TeRasterParams params;
+  params.nBands( 1 );
+  params.nlines_ = 1;
+  params.ncols_ = 1;
+  params.setDataType( TeDOUBLE, -1 );
+    
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( 
+    input_image1, params, false ), "Allocation error" );
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( 
+    input_image2, params, false ), "Allocation error" );
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( 
+    output_image, params, false ), "Allocation error" );
+        
+  TEAGN_TRUE_OR_THROW( input_image1->setElement( 0, 0, 2.0, 0 ), 
+    "error defining raster element");
+  TEAGN_TRUE_OR_THROW( input_image2->setElement( 0, 0, 3.0, 0 ), 
+    "error defining raster element");
+    
+  /* Calling algorithm */
+  
+  TePDIParameters algo_params;
+  algo_params.SetParameter( "arithmetic_type", 
+    TePDIArithmetic::TePDIAType4 );
+  algo_params.SetParameter( "input_image1", input_image1 );
+  algo_params.SetParameter( "input_image2", input_image2 );
+  algo_params.SetParameter( "img1_chan", (int)0 );
+  algo_params.SetParameter( "img2_chan", (int)0 );
+  algo_params.SetParameter( "gain", (double)2 );
+  algo_params.SetParameter( "offset", (double)1 );
+  algo_params.SetParameter( "output_image", output_image );
+
+  TePDIArithmetic arith_instance;
+    
+  TEAGN_TRUE_OR_THROW( arith_instance.Reset( algo_params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( arith_instance.Apply(),
+    "Apply error" ); 
+    
+  /* Checking values */
+  
+  TEAGN_TRUE_OR_THROW( 
+    ( output_image->params().nlines_ == 
+    input_image1->params().nlines_ ) &&
+    ( output_image->params().ncols_ == 
+    input_image1->params().ncols_ ) &&
+    ( output_image->params().nBands() == 1 ),
+    "Invalid output raster size" )  
+  
+  double value = 0; 
+  
+  TEAGN_TRUE_OR_THROW( output_image->getElement( 0, 0, value, 0 ), 
+    "error getting raster element");  
+  TEAGN_CHECK_EPS( value, 2.3333333, 0.00001, "Invalid value" );
+}
+
+void TePDIAType5_numeric_test()
+{
+  /* Creating images */
+  
+  TePDITypes::TePDIRasterPtrType input_image1;
+  TePDITypes::TePDIRasterPtrType input_image2;
+  TePDITypes::TePDIRasterPtrType output_image;
+  
+  TeRasterParams params;
+  params.nBands( 1 );
+  params.nlines_ = 1;
+  params.ncols_ = 1;
+  params.setDataType( TeDOUBLE, -1 );
+    
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( 
+    input_image1, params, false ), "Allocation error" );
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( 
+    input_image2, params, false ), "Allocation error" );
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( 
+    output_image, params, false ), "Allocation error" );
+        
+  TEAGN_TRUE_OR_THROW( input_image1->setElement( 0, 0, 2.0, 0 ), 
+    "error defining raster element");
+  TEAGN_TRUE_OR_THROW( input_image2->setElement( 0, 0, 3.0, 0 ), 
+    "error defining raster element");
+    
+  /* Calling algorithm */
+  
+  TePDIParameters algo_params;
+  algo_params.SetParameter( "arithmetic_type", 
+    TePDIArithmetic::TePDIAType5 );
+  algo_params.SetParameter( "input_image1", input_image1 );
+  algo_params.SetParameter( "input_image2", input_image2 );
+  algo_params.SetParameter( "img1_chan", (int)0 );
+  algo_params.SetParameter( "img2_chan", (int)0 );
+  algo_params.SetParameter( "gain", (double)2 );
+  algo_params.SetParameter( "offset", (double)1 );
+  algo_params.SetParameter( "output_image", output_image );
+
+  TePDIArithmetic arith_instance;
+    
+  TEAGN_TRUE_OR_THROW( arith_instance.Reset( algo_params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( arith_instance.Apply(),
+    "Apply error" ); 
+    
+  /* Checking values */
+  
+  double value = 0; 
+  
+  TEAGN_TRUE_OR_THROW( 
+    ( output_image->params().nlines_ == 
+    input_image1->params().nlines_ ) &&
+    ( output_image->params().ncols_ == 
+    input_image1->params().ncols_ ) &&
+    ( output_image->params().nBands() == 1 ),
+    "Invalid output raster size" )  
+  
+  TEAGN_TRUE_OR_THROW( output_image->getElement( 0, 0, value, 0 ), 
+    "error getting raster element");  
+  TEAGN_CHECK_EPS( value, 0.6, 0, "Invalid value" );
+}
+
+int main()
+{
+  TEAGN_LOGMSG( "Test started." );
+
+  try{
+    TeStdIOProgress pi;
+    TeProgress::setProgressInterf( dynamic_cast< TeProgressBase* >( &pi ) );
+      
+    TeInitRasterDecoders();
+    
+    TePDIAType1_numeric_test();
+    TePDIAType2_numeric_test();
+    TePDIAType3_numeric_test();
+    TePDIAType4_numeric_test();
+    TePDIAType5_numeric_test();
+
+    TePDIAType1_test();
+    TePDIAType1_norm_test();
+    TePDIAType2_test();
+    TePDIAType2_norm_test();
+
+  }
+  catch( const TeException& excpt ){
+    TEAGN_LOGERR( excpt.message() )
+    return EXIT_FAILURE;
+  }
+
+  TEAGN_LOGMSG( "Test OK." );
+  return EXIT_SUCCESS;
+}
diff --git a/examples/image_processing/source/TePDIArithmetic/TePDIArithmetic_test.vcproj b/examples/image_processing/source/TePDIArithmetic/TePDIArithmetic_test.vcproj
new file mode 100755
index 0000000..2c2e7f5
--- /dev/null
+++ b/examples/image_processing/source/TePDIArithmetic/TePDIArithmetic_test.vcproj
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="TePDIArithmetic_test"
+	ProjectGUID="{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	RootNamespace="TePDIArithmetic_test"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="0">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../../../../src/terralib/image_processing;../base;../../../../src/terralib/kernel"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PDIAGN_ENABLE_STDOUT_LOG"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Debug/terralibpdi/terralibpdi.lib ../../../../Debug/terralib/terralib.lib ../../../../Debug/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Debug/libjpeg/libjpeg.lib ../../../../Debug/shapelib/shapelib.lib user32.lib $(NOINHERIT)"
+				OutputFile="$(OutDir)/TePDIArithmetic_test.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreAllDefaultLibraries="FALSE"
+				IgnoreDefaultLibraryNames="msvcrt.lib,libcmt.lib;libc.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"
+				TargetMachine="0"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="../../../../src/terralib/image_processing;../base;../../../../src/terralib/kernel;../../../../src/shapelib"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Release/terralibpdi/terralibpdi.lib ../../../../Release/terralib/terralib.lib ../../../../Release/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Release/libjpeg/libjpeg.lib ../../../../Release/shapelib/shapelib.lib"
+				OutputFile="$(OutDir)/TePDIArithmetic_test.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\TePDIArithmetic_test.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/image_processing/source/TePDIBDFilter/TePDIBDFilter.pro b/examples/image_processing/source/TePDIBDFilter/TePDIBDFilter.pro
new file mode 100755
index 0000000..6192ab5
--- /dev/null
+++ b/examples/image_processing/source/TePDIBDFilter/TePDIBDFilter.pro
@@ -0,0 +1,8 @@
+include( ../base/base.pro )
+
+SOURCES += \
+  TePDIBDFilter_test.cpp
+
+QMAKE_CLEAN += \
+  ../../bin/Sobel_test.tif \
+  ../../bin/Roberts_test.tif
\ No newline at end of file
diff --git a/examples/image_processing/source/TePDIBDFilter/TePDIBDFilter_test.cpp b/examples/image_processing/source/TePDIBDFilter/TePDIBDFilter_test.cpp
new file mode 100755
index 0000000..c925c93
--- /dev/null
+++ b/examples/image_processing/source/TePDIBDFilter/TePDIBDFilter_test.cpp
@@ -0,0 +1,110 @@
+#define TEAGN_ENABLE_STDOUT_LOG
+
+#include <TePDIExamplesBase.hpp>
+
+#include <TePDIBDFilter.hpp>
+#include <TePDIParameters.hpp>
+#include <TeAgnostic.h>
+#include <TePDIUtils.hpp>
+
+#include <TeInitRasterDecoders.h>
+
+#include <TeProgress.h>
+#include <TeStdIOProgress.h>
+
+
+void Sobel_test()
+{
+  TePDIParameters params;
+
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_rgb342_crop1.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  params.SetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeDOUBLE, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  std::vector<int> channels;
+  channels.push_back( 0 );
+  channels.push_back( 1 );
+  channels.push_back( 2 );
+  params.SetParameter( "channels", channels );
+
+  params.SetParameter( "filter_type", TePDIBDFilter::TePDISobel );
+
+  params.SetParameter( "iterations", (int)2 );
+
+  TePDIBDFilter filter;
+
+  TEAGN_TRUE_OR_THROW( filter.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( filter.Apply(),
+    "Apply error" );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "Sobel_test.tif" ), "GeoTIF generation error" );
+}
+
+
+void Roberts_test()
+{
+  TePDIParameters params;
+
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_rgb342_crop1.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  params.SetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeDOUBLE, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  std::vector<int> channels;
+  channels.push_back( 0 );
+  channels.push_back( 1 );
+  channels.push_back( 2 );  
+  params.SetParameter( "channels", channels );
+
+  params.SetParameter( "filter_type", TePDIBDFilter::TePDIRoberts );
+
+  params.SetParameter( "iterations", (int)1 );
+
+  TePDIBDFilter filter;
+
+  TEAGN_TRUE_OR_THROW( filter.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( filter.Apply(),
+    "Apply error" );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "Roberts_test.tif" ), "GeoTIF generation error" );
+}
+
+
+int main()
+{
+  TEAGN_LOGMSG( "Test started." );
+  
+  try{
+    TeStdIOProgress pi;
+    TeProgress::setProgressInterf( dynamic_cast< TeProgressBase* >( &pi ) );
+    
+    TeInitRasterDecoders();
+
+    Sobel_test();
+    Roberts_test();
+  }
+  catch( const TeException& excpt ){
+    TEAGN_LOGERR( excpt.message() )
+    return EXIT_FAILURE;
+  }
+
+  TEAGN_LOGMSG( "Test OK." );
+  return EXIT_SUCCESS;
+}
diff --git a/examples/image_processing/source/TePDIBDFilter/TePDIBDFilter_test.vcproj b/examples/image_processing/source/TePDIBDFilter/TePDIBDFilter_test.vcproj
new file mode 100755
index 0000000..b625106
--- /dev/null
+++ b/examples/image_processing/source/TePDIBDFilter/TePDIBDFilter_test.vcproj
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="TePDIBDFilter_test"
+	ProjectGUID="{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	RootNamespace="TePDIBDFilter_test"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="0">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../../../../src/terralib/image_processing;../base;../../../../src/terralib/kernel"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PDIAGN_ENABLE_STDOUT_LOG"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Debug/terralibpdi/terralibpdi.lib ../../../../Debug/terralib/terralib.lib ../../../../Debug/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Debug/libjpeg/libjpeg.lib ../../../../Debug/shapelib/shapelib.lib user32.lib $(NOINHERIT)"
+				OutputFile="$(OutDir)/TePDIBDFilter_test.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreAllDefaultLibraries="FALSE"
+				IgnoreDefaultLibraryNames="msvcrt.lib,libcmt.lib;libc.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"
+				TargetMachine="0"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="../../../../src/terralib/image_processing;../base;../../../../src/terralib/kernel;../../../../src/shapelib"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Release/terralibpdi/terralibpdi.lib ../../../../Release/terralib/terralib.lib ../../../../Release/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Release/libjpeg/libjpeg.lib ../../../../Release/shapelib/shapelib.lib"
+				OutputFile="$(OutDir)/TePDIBDFilter_test.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\TePDIBDFilter_test.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/image_processing/source/TePDIBlending/TePDIBlending.pro b/examples/image_processing/source/TePDIBlending/TePDIBlending.pro
new file mode 100755
index 0000000..14a96a1
--- /dev/null
+++ b/examples/image_processing/source/TePDIBlending/TePDIBlending.pro
@@ -0,0 +1,7 @@
+include( ../base/base.pro )
+
+SOURCES += \
+  TePDIBlending_test.cpp
+
+QMAKE_CLEAN += \
+  ../../bin/Blending*.tif
\ No newline at end of file
diff --git a/examples/image_processing/source/TePDIBlending/TePDIBlending_test.cpp b/examples/image_processing/source/TePDIBlending/TePDIBlending_test.cpp
new file mode 100755
index 0000000..2205828
--- /dev/null
+++ b/examples/image_processing/source/TePDIBlending/TePDIBlending_test.cpp
@@ -0,0 +1,411 @@
+#define TEAGN_ENABLE_STDOUT_LOG
+
+#include <TePDIExamplesBase.hpp>
+
+#include <TePDIBlending.hpp>
+
+#include <TePDIParameters.hpp>
+#include <TeAgnostic.h>
+#include <TePDIUtils.hpp>
+
+#include <TeInitRasterDecoders.h>
+#include <TeProgress.h>
+#include <TeStdIOProgress.h>
+
+#include <vector>
+
+void Noblend_TeOVERPLAPS_RGB_test()
+{
+  TePDIParameters blend_params;
+
+  /* Building rasters */
+
+  TePDITypes::TePDIRasterPtrType input_raster1( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_rgb342_crop2.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_raster1->init(), 
+    "Unable to init input_raster1" );
+    
+  TePDITypes::TePDIRasterPtrType input_raster2( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_rgb342_crop1.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_raster2->init(), 
+    "Unable to init input_raster2" );
+    
+  TePDITypes::TePDIRasterPtrType output_raster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( output_raster,
+    1, 1, 1, false, TeUNSIGNEDCHAR, 0 ), "output_raster Alloc error" );
+    
+  blend_params.SetParameter( "blending_type" , std::string( "no_blending" ) );
+  blend_params.SetParameter( "input_raster1" , input_raster1 );
+  blend_params.SetParameter( "input_raster2" , input_raster2 );
+  blend_params.SetParameter( "output_raster" , output_raster );
+  
+  std::vector< int > channels1;
+  channels1.push_back( 0 );
+  channels1.push_back( 1 );
+  channels1.push_back( 2 );
+  blend_params.SetParameter( "channels1" , channels1 );
+  
+  std::vector< int > channels2;
+  channels2.push_back( 0 );
+  channels2.push_back( 1 );
+  channels2.push_back( 2 );
+  blend_params.SetParameter( "channels2" , channels2 );
+  
+  TeBox input_raster1_box = input_raster1->params().boundingBox();
+  TePDITypes::TePDIPolygonPtrType raster1_pol_ptr(
+    new TePolygon );
+  *raster1_pol_ptr = polygonFromBox( input_raster1_box );
+  blend_params.SetParameter( "raster1_pol_ptr" , raster1_pol_ptr );
+
+  TeBox input_raster2_box = input_raster2->params().boundingBox();
+  TePDITypes::TePDIPolygonPtrType raster2_pol_ptr(
+    new TePolygon );  
+  *raster2_pol_ptr = polygonFromBox( input_raster2_box );
+  blend_params.SetParameter( "raster2_pol_ptr" , raster2_pol_ptr );
+  
+  double raster2_pol_offset_x = 
+    input_raster1->coord2Index(
+      input_raster2->index2Coord( TeCoord2D( 0, 0 ) ) ).x();
+  blend_params.SetParameter( "raster2_pol_offset_x" , raster2_pol_offset_x );
+  
+  double raster2_pol_offset_y = 
+    input_raster1->coord2Index(
+      input_raster2->index2Coord( TeCoord2D( 0, 0 ) ) ).y();
+  blend_params.SetParameter( "raster2_pol_offset_y" , raster2_pol_offset_y );
+
+  blend_params.SetParameter( "auto_equalize" , (int)1 );
+  
+  blend_params.SetParameter( "dummy_value" , (double)0 );
+
+  blend_params.SetParameter( "enable_multi_thread" , (int)1 );
+
+  TePDIBlending blend_instance;
+  TEAGN_TRUE_OR_THROW( blend_instance.Reset(blend_params), "Reset error" );
+  TEAGN_TRUE_OR_THROW( blend_instance.Apply(), "Apply error" );
+  
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( output_raster,
+    TEPDIEXAMPLESBINPATH "Blending_noblend_TeOVERPLAPS_test.tif" ), "GeoTIF generation error" );
+}
+
+
+void Noblend_TeWITHIN_test()
+{
+  TePDIParameters blend_params;
+
+  /* Building rasters */
+
+  TePDITypes::TePDIRasterPtrType input_raster1( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_raster1->init(), 
+    "Unable to init input_raster1" );
+    
+  TePDITypes::TePDIRasterPtrType input_raster2_disk( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop_A.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_raster2_disk->init(), 
+    "Unable to init input_raster2" );
+    
+  /* Building a input_raster2 with 3 bands no projection */
+    
+  TePDITypes::TePDIRasterPtrType input_raster2( new TeRaster() );
+  {
+    TeRasterParams input_raster2_params;
+    input_raster2_params.nBands( 1 );
+    input_raster2_params.setDataType( TeUNSIGNEDCHAR, -1 );
+    input_raster2_params.boxResolution( 0, 0, 
+      (double)( input_raster2_disk->params().ncols_ - 1 ),
+      (double)( input_raster2_disk->params().nlines_ - 1 ), 1, 1 );
+      
+    TeProjectionParams projparams;
+    projparams.name = "NoProjection";
+    TeSharedPtr< TeProjection > proj( TeProjectionFactory::make( projparams ) );          
+    input_raster2_params.projection( proj.nakedPointer() );        
+      
+    TEAGN_TRUE_OR_THROW( 
+      ( input_raster2_params.nlines_ == input_raster2_disk->params().nlines_ ),
+      "Invalid box lines" )
+    TEAGN_TRUE_OR_THROW( 
+      ( input_raster2_params.ncols_ == input_raster2_disk->params().ncols_ ),
+      "Invalid box lines" )
+    
+    TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( input_raster2,
+      input_raster2_params, false ), "adjust_raster Alloc error" );   
+      
+    TEAGN_TRUE_OR_THROW( TePDIUtils::TeCopyRasterBands( input_raster2_disk,
+      input_raster2, false, false ), "Pixel copy error" );
+  }        
+    
+  TePDITypes::TePDIRasterPtrType output_raster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( output_raster,
+    1, 1, 1, false, TeDOUBLE, 0 ), "output_raster Alloc error" );
+    
+  blend_params.SetParameter( "blending_type" , std::string( "no_blending" ) );
+  blend_params.SetParameter( "input_raster1" , input_raster1 );
+  blend_params.SetParameter( "input_raster2" , input_raster2 );
+  blend_params.SetParameter( "output_raster" , output_raster );
+  
+  std::vector< int > channels1;
+  channels1.push_back( 0 );
+  blend_params.SetParameter( "channels1" , channels1 );
+  
+  std::vector< int > channels2;
+  channels2.push_back( 0 );
+  blend_params.SetParameter( "channels2" , channels2 );
+  
+  TeBox input_raster1_box = input_raster1->params().boundingBox();
+  TePDITypes::TePDIPolygonPtrType raster1_pol_ptr(
+    new TePolygon );
+  *raster1_pol_ptr = polygonFromBox( input_raster1_box );
+  blend_params.SetParameter( "raster1_pol_ptr" , raster1_pol_ptr );
+
+  TeBox input_raster2_box = input_raster2->params().boundingBox();
+  TePDITypes::TePDIPolygonPtrType raster2_pol_ptr(
+    new TePolygon );  
+  *raster2_pol_ptr = polygonFromBox( input_raster2_box );
+  blend_params.SetParameter( "raster2_pol_ptr" , raster2_pol_ptr );
+  
+  double raster2_pol_offset_x = input_raster1->coord2Index(
+    input_raster2_disk->index2Coord( TeCoord2D( 0, 0 ) ) ).x();
+  blend_params.SetParameter( "raster2_pol_offset_x" , raster2_pol_offset_x );
+  
+  double raster2_pol_offset_y = input_raster1->coord2Index(
+    input_raster2_disk->index2Coord( TeCoord2D( 0, 0 ) ) ).y();
+  blend_params.SetParameter( "raster2_pol_offset_y" , raster2_pol_offset_y );
+
+  blend_params.SetParameter( "auto_equalize" , (int)1 );
+  
+  blend_params.SetParameter( "dummy_value" , (double)0 );
+  
+  blend_params.SetParameter( "enable_multi_thread" , (int)1 );
+    
+  TePDIBlending blend_instance;
+  TEAGN_TRUE_OR_THROW( blend_instance.Reset(blend_params), "Reset error" );
+  TEAGN_TRUE_OR_THROW( blend_instance.Apply(), "Apply error" );
+  
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( output_raster,
+    TEPDIEXAMPLESBINPATH "Blending_no_blend_TeWITHIN_test.tif" ), "GeoTIF generation error" );
+}
+
+void Euclidian_TeOVERPLAPS_test()
+{
+  TePDIParameters blend_params;
+
+  /* Building rasters */
+
+  TePDITypes::TePDIRasterPtrType input_raster1( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop_A.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_raster1->init(), 
+    "Unable to init input_raster1" );
+    
+  TePDITypes::TePDIRasterPtrType input_raster2_disk( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop_B_contraste.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_raster2_disk->init(), 
+    "Unable to init input_raster2" );
+    
+  /* Building a input_raster2 with no projection */
+    
+  TePDITypes::TePDIRasterPtrType input_raster2( new TeRaster() );
+  {
+    TeRasterParams input_raster2_params;
+    input_raster2_params.nBands( 1 );
+    input_raster2_params.setDataType( TeUNSIGNEDCHAR, -1 );
+    input_raster2_params.boxResolution( 0, 0, 
+      (double)( input_raster2_disk->params().ncols_ - 1 ),
+      (double)( input_raster2_disk->params().nlines_ - 1 ), 1, 1 );
+      
+    TeProjectionParams projparams;
+    projparams.name = "NoProjection";
+    TeSharedPtr< TeProjection > proj( TeProjectionFactory::make( projparams ) );          
+    input_raster2_params.projection( proj.nakedPointer() );      
+      
+    TEAGN_TRUE_OR_THROW( 
+      ( input_raster2_params.nlines_ == input_raster2_disk->params().nlines_ ),
+      "Invalid box lines" )
+    TEAGN_TRUE_OR_THROW( 
+      ( input_raster2_params.ncols_ == input_raster2_disk->params().ncols_ ),
+      "Invalid box lines" )
+    
+    TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( input_raster2,
+      input_raster2_params, false ), "adjust_raster Alloc error" );   
+    TEAGN_TRUE_OR_THROW( TePDIUtils::TeCopyRasterBands( input_raster2_disk,
+      input_raster2, false, false ), "Pixel copy error" );
+  }        
+    
+  TePDITypes::TePDIRasterPtrType output_raster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( output_raster,
+    1, 1, 1, false, TeDOUBLE, 0 ), "output_raster Alloc error" );
+    
+  blend_params.SetParameter( "blending_type" , 
+    std::string( "euclidian_blending" ) );
+  blend_params.SetParameter( "input_raster1" , input_raster1 );
+  blend_params.SetParameter( "input_raster2" , input_raster2 );
+  blend_params.SetParameter( "output_raster" , output_raster );
+  
+  std::vector< int > channels1;
+  channels1.push_back( 0 );
+  blend_params.SetParameter( "channels1" , channels1 );
+  
+  std::vector< int > channels2;
+  channels2.push_back( 0 );
+  blend_params.SetParameter( "channels2" , channels2 );
+  
+  TeBox input_raster1_box = input_raster1->params().boundingBox();
+  TePDITypes::TePDIPolygonPtrType raster1_pol_ptr(
+    new TePolygon );
+  *raster1_pol_ptr = polygonFromBox( input_raster1_box );
+  blend_params.SetParameter( "raster1_pol_ptr" , raster1_pol_ptr );
+
+  TeBox input_raster2_box = input_raster2->params().boundingBox();
+  TePDITypes::TePDIPolygonPtrType raster2_pol_ptr(
+    new TePolygon );  
+  *raster2_pol_ptr = polygonFromBox( input_raster2_box );
+  blend_params.SetParameter( "raster2_pol_ptr" , raster2_pol_ptr );
+  
+  double raster2_pol_offset_x = input_raster1->coord2Index(
+    input_raster2_disk->index2Coord( TeCoord2D( 0, 0 ) ) ).x();
+  blend_params.SetParameter( "raster2_pol_offset_x" , raster2_pol_offset_x );
+  
+  double raster2_pol_offset_y = input_raster1->coord2Index(
+    input_raster2_disk->index2Coord( TeCoord2D( 0, 0 ) ) ).y();
+  blend_params.SetParameter( "raster2_pol_offset_y" , raster2_pol_offset_y );
+
+  blend_params.SetParameter( "auto_equalize" , (int)1 );
+  
+  blend_params.SetParameter( "dummy_value" , (double)0 );
+  
+//  blend_params.SetParameter( "draw_blend_lines" , (double)255 );
+
+  blend_params.SetParameter( "enable_multi_thread" , (int)1 );
+    
+  TePDIBlending blend_instance;
+  TEAGN_TRUE_OR_THROW( blend_instance.Reset(blend_params), "Reset error" );
+  TEAGN_TRUE_OR_THROW( blend_instance.Apply(), "Apply error" );
+  
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( output_raster,
+    TEPDIEXAMPLESBINPATH "Blending_euclidian_TeOVERPLAPS_test.tif" ), "GeoTIF generation error" );
+}
+
+
+void Euclidian_TeWITHIN_test()
+{
+  TePDIParameters blend_params;
+
+  /* Building rasters */
+
+  TePDITypes::TePDIRasterPtrType input_raster1( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_raster1->init(), 
+    "Unable to init input_raster1" );
+    
+  TePDITypes::TePDIRasterPtrType input_raster2_disk( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop_B_contraste.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_raster2_disk->init(), 
+    "Unable to init input_raster2" );
+    
+  /* Building a input_raster2 with no projection */
+    
+  TePDITypes::TePDIRasterPtrType input_raster2( new TeRaster() );
+  {
+    TeRasterParams input_raster2_params;
+    input_raster2_params.nBands( 1 );
+    input_raster2_params.setDataType( TeUNSIGNEDCHAR, -1 );
+    input_raster2_params.boxResolution( 0, 0, 
+      (double)( input_raster2_disk->params().ncols_ - 1 ),
+      (double)( input_raster2_disk->params().nlines_ - 1 ), 1, 1 );
+      
+    TeProjectionParams projparams;
+    projparams.name = "NoProjection";
+    TeSharedPtr< TeProjection > proj( TeProjectionFactory::make( projparams ) );          
+    input_raster2_params.projection( proj.nakedPointer() );      
+      
+    TEAGN_TRUE_OR_THROW( 
+      ( input_raster2_params.nlines_ == input_raster2_disk->params().nlines_ ),
+      "Invalid box lines" )
+    TEAGN_TRUE_OR_THROW( 
+      ( input_raster2_params.ncols_ == input_raster2_disk->params().ncols_ ),
+      "Invalid box lines" )
+    
+    TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( input_raster2,
+      input_raster2_params, false ), "adjust_raster Alloc error" );   
+    TEAGN_TRUE_OR_THROW( TePDIUtils::TeCopyRasterBands( input_raster2_disk,
+      input_raster2, false, false ), "Pixel copy error" );
+  }        
+    
+  TePDITypes::TePDIRasterPtrType output_raster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( output_raster,
+    1, 1, 1, false, TeDOUBLE, 0 ), "output_raster Alloc error" );
+    
+  blend_params.SetParameter( "blending_type" , 
+    std::string( "euclidian_blending" ) );
+  blend_params.SetParameter( "input_raster1" , input_raster1 );
+  blend_params.SetParameter( "input_raster2" , input_raster2 );
+  blend_params.SetParameter( "output_raster" , output_raster );
+  
+  std::vector< int > channels1;
+  channels1.push_back( 0 );
+  blend_params.SetParameter( "channels1" , channels1 );
+  
+  std::vector< int > channels2;
+  channels2.push_back( 0 );
+  blend_params.SetParameter( "channels2" , channels2 );
+  
+  TeBox input_raster1_box = input_raster1->params().boundingBox();
+  TePDITypes::TePDIPolygonPtrType raster1_pol_ptr(
+    new TePolygon );
+  *raster1_pol_ptr = polygonFromBox( input_raster1_box );
+  blend_params.SetParameter( "raster1_pol_ptr" , raster1_pol_ptr );
+
+  TeBox input_raster2_box = input_raster2->params().boundingBox();
+  TePDITypes::TePDIPolygonPtrType raster2_pol_ptr(
+    new TePolygon );  
+  *raster2_pol_ptr = polygonFromBox( input_raster2_box );
+  blend_params.SetParameter( "raster2_pol_ptr" , raster2_pol_ptr );
+  
+  double raster2_pol_offset_x = input_raster1->coord2Index(
+    input_raster2_disk->index2Coord( TeCoord2D( 0, 0 ) ) ).x();
+  blend_params.SetParameter( "raster2_pol_offset_x" , raster2_pol_offset_x );
+  
+  double raster2_pol_offset_y = input_raster1->coord2Index(
+    input_raster2_disk->index2Coord( TeCoord2D( 0, 0 ) ) ).y();
+  blend_params.SetParameter( "raster2_pol_offset_y" , raster2_pol_offset_y );
+
+  blend_params.SetParameter( "auto_equalize" , (int)1 );
+  
+  blend_params.SetParameter( "dummy_value" , (double)0 );
+  
+  blend_params.SetParameter( "draw_blend_lines" , (double)255 );
+  
+  blend_params.SetParameter( "enable_multi_thread" , (int)1 );
+    
+  TePDIBlending blend_instance;
+  TEAGN_TRUE_OR_THROW( blend_instance.Reset(blend_params), "Reset error" );
+  TEAGN_TRUE_OR_THROW( blend_instance.Apply(), "Apply error" );
+  
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( output_raster,
+    TEPDIEXAMPLESBINPATH "Blending_euclidian_TeWITHIN_test.tif" ), "GeoTIF generation error" );
+}
+
+
+int main()
+{
+  TEAGN_LOGMSG( "Test started." );
+
+  try{
+    TeInitRasterDecoders();
+    
+    TeStdIOProgress pi;
+    TeProgress::setProgressInterf( dynamic_cast< TeProgressBase* >( &pi ) );     
+
+    Noblend_TeOVERPLAPS_RGB_test();
+    Noblend_TeWITHIN_test();
+    Euclidian_TeOVERPLAPS_test();
+    Euclidian_TeWITHIN_test();
+  }
+  catch( const TeException& excpt ){
+    TEAGN_LOGERR( excpt.message() )
+    return EXIT_FAILURE;
+  }
+
+  TEAGN_LOGMSG( "Test OK." );
+  return EXIT_SUCCESS;
+}
+
diff --git a/examples/image_processing/source/TePDIBlending/TePDIBlending_test.vcproj b/examples/image_processing/source/TePDIBlending/TePDIBlending_test.vcproj
new file mode 100755
index 0000000..d952e49
--- /dev/null
+++ b/examples/image_processing/source/TePDIBlending/TePDIBlending_test.vcproj
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="TePDIBlending_test"
+	ProjectGUID="{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	RootNamespace="TePDIBlending_test"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="0">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../base;../../../../src/terralib/image_processing;../../../../src/terralib/kernel;../../../../src/tiff"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PDIAGN_ENABLE_STDOUT_LOG"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Debug/terralibpdi/terralibpdi.lib ../../../../Debug/terralib/terralib.lib ../../../../Debug/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Debug/libjpeg/libjpeg.lib ../../../../Debug/shapelib/shapelib.lib user32.lib $(NOINHERIT)"
+				OutputFile="$(OutDir)/TePDIBlending_test.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreAllDefaultLibraries="FALSE"
+				IgnoreDefaultLibraryNames="msvcrt.lib,libcmt.lib;libc.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"
+				TargetMachine="0"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="../../../../src/terralib/image_processing;../base;../../../../src/terralib/kernel;../../../../src/shapelib"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Release/terralibpdi/terralibpdi.lib ../../../../Release/terralib/terralib.lib ../../../../Release/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Release/libjpeg/libjpeg.lib ../../../../Release/shapelib/shapelib.lib"
+				OutputFile="$(OutDir)/TePDIBlending_test.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\TePDIBlending_test.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/image_processing/source/TePDIClassification/TePDIClassification.pro b/examples/image_processing/source/TePDIClassification/TePDIClassification.pro
new file mode 100755
index 0000000..2dff703
--- /dev/null
+++ b/examples/image_processing/source/TePDIClassification/TePDIClassification.pro
@@ -0,0 +1,8 @@
+include( ../base/base.pro )
+
+SOURCES += \
+  TePDIClassification_test.cpp \
+
+
+QMAKE_CLEAN += \
+  ../../bin/Classification*.tif
diff --git a/examples/image_processing/source/TePDIClassification/TePDIClassification_test.cpp b/examples/image_processing/source/TePDIClassification/TePDIClassification_test.cpp
new file mode 100644
index 0000000..2e74788
--- /dev/null
+++ b/examples/image_processing/source/TePDIClassification/TePDIClassification_test.cpp
@@ -0,0 +1,211 @@
+#define TEAGN_ENABLE_STDOUT_LOG
+
+#include <TePDIExamplesBase.hpp>
+#include <TePDIIsosegClas.hpp>
+#include <TePDIKMeansClas.hpp>
+#include <TePDIEMClas.hpp>
+#include <TePDIRegGrowSeg.hpp>
+#include <TePDIUtils.hpp>
+
+#include <TeInitRasterDecoders.h>
+#include <TeProgress.h>
+#include <TeStdIOProgress.h>
+#include <TeAgnostic.h>
+
+#include <vector>
+
+
+void buildData( TePolygonSet& polset, TePDITypes::TePDIRasterPtrType& raster )
+{
+  TePDIParameters params;
+
+  params.SetParameter( "input_image", raster );
+
+  TePDITypes::TePDIPolSetMapPtrType output_polsets( 
+    new TePDITypes::TePDIPolSetMapType );
+  params.SetParameter( "output_polsets", output_polsets );
+  
+  params.SetParameter( "euc_treshold", (double)20 );
+  params.SetParameter( "area_min", (int)15 );  
+  
+  TePDIRegGrowSeg segmenter;
+  
+  TEAGN_TRUE_OR_THROW( segmenter.Reset(params), "Reset failed" );
+  
+  TEAGN_TRUE_OR_THROW( segmenter.Apply(), "Apply error" );    
+  
+  TePDITypes::TePDIPolSetMapType::iterator psmap_it = 
+    output_polsets->begin();
+  TePDITypes::TePDIPolSetMapType::iterator psmap_it_end = 
+    output_polsets->end();
+    
+  polset.clear();
+    
+  while( psmap_it != psmap_it_end ) {
+    TePolygonSet::iterator ps_it = psmap_it->second.begin();
+    TePolygonSet::iterator ps_it_end = psmap_it->second.end();
+    
+    while( ps_it != ps_it_end ) {
+      polset.add( *ps_it );
+      ++ps_it;  
+    }
+    
+    ++psmap_it;
+  }
+}
+
+
+void IsosegClassification_test( TePolygonSet& polset, 
+  TePDITypes::TePDIRasterPtrType& raster)
+{
+  TePDIParameters params;
+
+  vector<int> bands;
+  bands.push_back(0);
+  bands.push_back(1);
+  bands.push_back(2);
+  params.SetParameter("bands", bands);
+
+  TePDITypes::TePDIRasterVectorType input_rasters;
+  input_rasters.push_back( raster );
+  input_rasters.push_back( raster );
+  input_rasters.push_back( raster );
+  params.SetParameter("input_rasters", input_rasters);
+
+  TePDITypes::TePDIPolygonSetPtrType input_polygonset(  &polset, true );
+  params.SetParameter("input_polygonset", input_polygonset);
+
+  TePDITypes::TePDIRasterPtrType output_raster;
+  TEAGN_TRUE_OR_THROW(TePDIUtils::TeAllocRAMRaster( output_raster, 1, 1, 1, 
+    false, TeDOUBLE, 0), "output_raster Alloc error");
+  params.SetParameter("output_raster", output_raster);
+  
+  params.SetParameter("acceptance_limiar", (double)90.0);
+
+  TePDIIsosegClas classification;
+  
+  TEAGN_TRUE_OR_THROW(classification.Reset(params), "Reset failed");
+  
+  TEAGN_TRUE_OR_THROW(classification.Apply(), "Apply error");
+  
+  TEAGN_TRUE_OR_THROW(TePDIUtils::TeRaster2Geotiff(output_raster, 
+    TEPDIEXAMPLESBINPATH "Classification_Isoseg_test.tif"), "GeoTIF generation error");
+}
+
+
+void KMeansClassification_test( TePDITypes::TePDIRasterPtrType& raster)
+{ 
+  TePDIParameters params;
+
+  params.SetParameter("input_raster", raster);
+
+  TePDITypes::TePDIRasterPtrType output_raster;
+  TEAGN_TRUE_OR_THROW(TePDIUtils::TeAllocRAMRaster( output_raster, 1, 1, 1, 
+    false, TeDOUBLE, 0), "output_raster Alloc error");
+  params.SetParameter("output_raster", output_raster);
+  
+  vector<int> bands;
+  bands.push_back(0);
+  bands.push_back(1);
+  bands.push_back(2);
+  params.SetParameter("bands", bands);  
+  
+  params.SetParameter("classes_number", (int)10);
+  params.SetParameter("sample", (int)1);
+  params.SetParameter("iterations_number", (int)10);
+  params.SetParameter("line_begin", (int)0);
+  params.SetParameter("line_end", (int)( raster->params().nlines_ - 1 ) );
+  params.SetParameter("column_begin", (int)0);
+  params.SetParameter("column_end", (int)( raster->params().ncols_ - 1 ) );
+
+  TePDIKMeansClas classification;
+  
+  TEAGN_TRUE_OR_THROW(classification.Reset(params), "Reset failed");
+  
+  TEAGN_TRUE_OR_THROW(classification.Apply(), "Apply error");
+  
+  TEAGN_TRUE_OR_THROW(TePDIUtils::TeRaster2Geotiff(output_raster, 
+    TEPDIEXAMPLESBINPATH "KMeansClassification_test.tif"), "GeoTIF generation error");
+}
+
+
+void EMClassification_test( TePDITypes::TePDIRasterPtrType& raster)
+{
+  TePDIParameters params;
+
+  TePDITypes::TePDIRasterVectorType input_rasters;
+  input_rasters.push_back( raster );
+  input_rasters.push_back( raster );
+  input_rasters.push_back( raster );
+  params.SetParameter("input_rasters", input_rasters);
+  
+  vector<int> bands;
+  bands.push_back(0);
+  bands.push_back(1);
+  bands.push_back(2);
+  params.SetParameter("bands", bands);
+  
+  params.SetParameter("classes_to_find", (int)5);
+
+  TePDITypes::TePDIRasterPtrType output_raster;
+  TEAGN_TRUE_OR_THROW(TePDIUtils::TeAllocRAMRaster( output_raster, 1, 1, 1, 
+    false, TeDOUBLE, 0), "output_raster Alloc error");
+  params.SetParameter("output_raster", output_raster);
+  
+  params.SetParameter("sx", (int)5);
+  params.SetParameter("sy", (int)5);
+  params.SetParameter("max_iterations", (int)3);
+  params.SetParameter("epsilon", (double)3.5);
+  params.SetParameter("shift_threshold", (double)35);
+
+  TePDIEMClas classification;
+  
+  TEAGN_TRUE_OR_THROW(classification.Reset(params), "Factory make failed");
+  
+  TEAGN_TRUE_OR_THROW(classification.Apply(), "Apply error");
+  
+  TEAGN_TRUE_OR_THROW(TePDIUtils::TeRaster2Geotiff(output_raster, 
+    TEPDIEXAMPLESBINPATH "EMClassification_test.tif"), "GeoTIF generation error");
+}
+
+int main()
+{
+  TEAGN_LOGMSG("Test started.");
+  
+  try
+  {
+    TeInitRasterDecoders();
+    
+    TeStdIOProgress pi;
+    TeProgress::setProgressInterf(dynamic_cast< TeProgressBase* >(&pi));
+    
+    /* Opening image */
+    
+    TePDITypes::TePDIRasterPtrType raster;
+    raster.reset( new TeRaster(
+      std::string( TEPDIEXAMPLESRESPATH "cbers_rgb342_crop1.tif" ), 'r' ) );
+    TEAGN_TRUE_OR_THROW( raster->init(), "Unable to init inRaster" );
+    
+    /* Polygons independent algorithms */
+    
+    EMClassification_test( raster );
+    KMeansClassification_test( raster );
+    
+    /* Generating polygons */
+    
+    TePolygonSet polset;
+    buildData( polset, raster );
+    
+    /* Polygons dependent algorithms */
+    
+    IsosegClassification_test( polset, raster );
+  }
+  catch( const TeException& excpt ){
+    TEAGN_LOGERR( excpt.message() )
+    return EXIT_FAILURE;
+  }
+  
+  TEAGN_LOGMSG("Test OK.");
+  return EXIT_SUCCESS;
+}
+
diff --git a/examples/image_processing/source/TePDIClassification/TePDIClassification_test.vcproj b/examples/image_processing/source/TePDIClassification/TePDIClassification_test.vcproj
new file mode 100755
index 0000000..3d6d42a
--- /dev/null
+++ b/examples/image_processing/source/TePDIClassification/TePDIClassification_test.vcproj
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="TePDIClassification_test"
+	ProjectGUID="{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	RootNamespace="TePDIClassification_test"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="0">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../base;../../../../src/terralib/image_processing;../../../../src/terralib/kernel;../../../../src/shapelib;../../../../src/tiff"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PDIAGN_ENABLE_STDOUT_LOG"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Debug/terralibpdi/terralibpdi.lib ../../../../Debug/terralib/terralib.lib ../../../../Debug/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Debug/libjpeg/libjpeg.lib ../../../../Debug/shapelib/shapelib.lib user32.lib $(NOINHERIT)"
+				OutputFile="$(OutDir)/TePDIClassification_test.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreAllDefaultLibraries="FALSE"
+				IgnoreDefaultLibraryNames="msvcrt.lib,libcmt.lib;libc.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"
+				TargetMachine="0"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="../../../../src/terralib/image_processing;../base;../../../../src/terralib/kernel;../../../../src/shapelib"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Release/terralibpdi/terralibpdi.lib ../../../../Release/terralib/terralib.lib ../../../../Release/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Release/libjpeg/libjpeg.lib ../../../../Release/shapelib/shapelib.lib"
+				OutputFile="$(OutDir)/TePDIClassification_test.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\TePDIClassification_test.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/image_processing/source/TePDIColorTransform/TePDIColorTransform.pro b/examples/image_processing/source/TePDIColorTransform/TePDIColorTransform.pro
new file mode 100755
index 0000000..815b961
--- /dev/null
+++ b/examples/image_processing/source/TePDIColorTransform/TePDIColorTransform.pro
@@ -0,0 +1,5 @@
+include( ../base/base.pro )
+
+SOURCES += \
+  TePDIColorTransform_test.cpp
+
diff --git a/examples/image_processing/source/TePDIColorTransform/TePDIColorTransform_test.cpp b/examples/image_processing/source/TePDIColorTransform/TePDIColorTransform_test.cpp
new file mode 100755
index 0000000..e7be42f
--- /dev/null
+++ b/examples/image_processing/source/TePDIColorTransform/TePDIColorTransform_test.cpp
@@ -0,0 +1,282 @@
+#define TEAGN_ENABLE_STDOUT_LOG
+
+#include <TePDIExamplesBase.hpp>
+
+#include <TePDIColorTransform.hpp>
+#include <TePDIParameters.hpp>
+#include <TeAgnostic.h>
+#include <TePDIUtils.hpp>
+
+#include <TeRaster.h>
+#include <TeInitRasterDecoders.h>
+#include <TeProgress.h>
+#include <TeStdIOProgress.h>
+
+
+void RGB2IHS_IHS2RGB_image_test()
+{
+  TePDITypes::TePDIRasterPtrType IHSRasterPtr;
+  
+  /* Testing RGB -> IHS */
+  {
+    TePDIParameters params;
+    
+    TePDITypes::TePDIRasterPtrType rgb_raster( new TeRaster(
+      std::string( TEPDIEXAMPLESRESPATH "cbers2b_rgb342_crop.tif" ), 'r' ) );
+    TEAGN_TRUE_OR_THROW( rgb_raster->init(), 
+      "Unable to init input_raster1" );  
+    
+    TePDITypes::TePDIRasterVectorType input_rasters;
+    input_rasters.push_back( rgb_raster );
+    input_rasters.push_back( rgb_raster );
+    input_rasters.push_back( rgb_raster );
+    params.SetParameter( "input_rasters", input_rasters );
+      
+    std::vector< int > input_channels;
+    input_channels.push_back( 0 );
+    input_channels.push_back( 1 );
+    input_channels.push_back( 2 );
+    params.SetParameter( "input_channels", input_channels );   
+    
+    TeRasterParams outRaster_params;
+    outRaster_params.nBands( 3 );
+    outRaster_params.setNLinesNColumns( 1, 1 );
+    outRaster_params.setDataType( TeFLOAT, -1 );
+    TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( IHSRasterPtr,
+      outRaster_params, false ), "output_raster Alloc error" );  
+      
+    TePDITypes::TePDIRasterVectorType output_rasters;
+    output_rasters.push_back( IHSRasterPtr );
+    params.SetParameter( "output_rasters", output_rasters );    
+      
+    params.SetParameter( "transf_type", TePDIColorTransform::Rgb2Ihs ); 
+    params.SetParameter( "rgb_channels_min", (double)0.0 );
+    params.SetParameter( "rgb_channels_max", (double)255.0 );    
+    
+    TePDIColorTransform ct;
+
+    TEAGN_TRUE_OR_THROW( ct.Reset( params ),
+      "Invalid Parameters" );
+
+    TEAGN_TRUE_OR_THROW( ct.Apply(),
+      "Apply error" );   
+
+    TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( IHSRasterPtr,
+      TEPDIEXAMPLESBINPATH 
+      "TePDIColorTransform_RGB2IHS_IHS2RGB_image_test_ihs.tif" ), 
+      "GeoTIF generation error" );
+  }
+  
+  TePDITypes::TePDIRasterPtrType RGBRasterPtr;
+
+  /* Testing IHS -> RGB */
+  {
+    TePDIParameters params;
+    
+    TePDITypes::TePDIRasterVectorType input_rasters;
+    input_rasters.push_back( IHSRasterPtr );
+    input_rasters.push_back( IHSRasterPtr );
+    input_rasters.push_back( IHSRasterPtr );
+    params.SetParameter( "input_rasters", input_rasters );
+      
+    std::vector< int > input_channels;
+    input_channels.push_back( 0 );
+    input_channels.push_back( 1 );
+    input_channels.push_back( 2 );
+    params.SetParameter( "input_channels", input_channels );   
+    
+    TeRasterParams outRaster_params;
+    outRaster_params.nBands( 3 );
+    outRaster_params.setNLinesNColumns( 1, 1 );
+    outRaster_params.setDataType( TeUNSIGNEDCHAR, -1 );
+    outRaster_params.setPhotometric( TeRasterParams::TeRGB, -1 );
+    
+    TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( RGBRasterPtr,
+      outRaster_params, false ), "output_raster Alloc error" );  
+      
+    TePDITypes::TePDIRasterVectorType output_rasters;
+    output_rasters.push_back( RGBRasterPtr );
+    params.SetParameter( "output_rasters", output_rasters );    
+      
+    params.SetParameter( "transf_type", TePDIColorTransform::Ihs2Rgb ); 
+    
+    params.SetParameter( "rgb_channels_min", (double)0.0 );
+    params.SetParameter( "rgb_channels_max", (double)255.0 );    
+    
+    TePDIColorTransform ct;
+
+    TEAGN_TRUE_OR_THROW( ct.Reset( params ),
+      "Invalid Parameters" );
+
+    TEAGN_TRUE_OR_THROW( ct.Apply(),
+      "Apply error" );   
+
+    TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( RGBRasterPtr,
+      TEPDIEXAMPLESBINPATH 
+      "TePDIColorTransform_RGB2IHS_IHS2RGB_image_test_rgb.tif" ), 
+      "GeoTIF generation error" );
+  }
+}
+
+void RGB2IHS_IHS2RGB_numeric_test()
+{
+  /* Testing RGB -> IHS */
+
+  TeRasterParams inRaster_params;
+  inRaster_params.mode_ = 'c';
+  inRaster_params.nBands( 3 );
+  inRaster_params.setNLinesNColumns( 1, 2 );
+  inRaster_params.setDataType( TeUNSIGNEDCHAR, -1 );
+  inRaster_params.decoderIdentifier_ = "SMARTMEM";
+  inRaster_params.setPhotometric( TeRasterParams::TeMultiBand, -1 );
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster( inRaster_params ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), 
+    "inRaster allocation error" );
+    
+  TEAGN_TRUE_OR_THROW( inRaster->setElement( 0, 0, 50., 0 ), "value set" );
+  TEAGN_TRUE_OR_THROW( inRaster->setElement( 0, 0, 100., 1 ), "value set" );
+  TEAGN_TRUE_OR_THROW( inRaster->setElement( 0, 0, 150., 2 ), "value set" );
+  TEAGN_TRUE_OR_THROW( inRaster->setElement( 1, 0, 0., 0 ), "value set" );
+  TEAGN_TRUE_OR_THROW( inRaster->setElement( 1, 0, 200., 1 ), "value set" );
+  TEAGN_TRUE_OR_THROW( inRaster->setElement( 1, 0, 255., 2 ), "value set" );
+
+  TeRasterParams outRaster_params;
+  outRaster_params.mode_ = 'c';
+  outRaster_params.nBands( 3 );
+  outRaster_params.setNLinesNColumns( 1, 1 );
+  outRaster_params.setDataType( TeDOUBLE, -1 );
+  outRaster_params.decoderIdentifier_ = "SMARTMEM";
+  TePDITypes::TePDIRasterPtrType outRaster( new TeRaster( outRaster_params ) );
+  TEAGN_TRUE_OR_THROW( outRaster->init(), 
+    "outRaster allocation error" );
+    
+  TePDIParameters params;
+  
+  TePDITypes::TePDIRasterVectorType input_rasters;
+  input_rasters.push_back( inRaster );
+  input_rasters.push_back( inRaster );
+  input_rasters.push_back( inRaster );
+  params.SetParameter( "input_rasters", input_rasters );
+  
+  std::vector< int > input_channels;
+  input_channels.push_back( 0 );
+  input_channels.push_back( 1 );
+  input_channels.push_back( 2 );
+  params.SetParameter( "input_channels", input_channels );
+  
+  TePDITypes::TePDIRasterVectorType output_rasters;
+  output_rasters.push_back( outRaster );
+  params.SetParameter( "output_rasters", output_rasters );
+  
+  params.SetParameter( "transf_type", TePDIColorTransform::Rgb2Ihs );
+  params.SetParameter( "rgb_channels_min", (double)0.0 );
+  params.SetParameter( "rgb_channels_max", (double)255.0 );   
+
+  TePDIColorTransform ct;
+
+  TEAGN_TRUE_OR_THROW( ct.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( ct.Apply(),
+    "Apply error" );
+
+  double value;
+  TEAGN_TRUE_OR_THROW( outRaster->getElement( 0, 0, value, 0 ), "Value get" );
+  TEAGN_CHECK_EPS( value, 0.392157, 0.0001,
+    "Invalid value" );
+  TEAGN_TRUE_OR_THROW( outRaster->getElement( 0, 0, value, 1 ), "Value get" );
+  TEAGN_CHECK_EPS( value, 3.665191, 0.00001,
+    "Invalid value" );
+  TEAGN_TRUE_OR_THROW( outRaster->getElement( 0, 0, value, 2 ), "Value get" );
+  TEAGN_CHECK_EPS( value, 0.50000, 0.0001,
+    "Invalid value" );
+    
+  TEAGN_TRUE_OR_THROW( outRaster->getElement( 1, 0, value, 0 ), "Value get" );
+  TEAGN_CHECK_EPS( value, 0.594771, 0.0001,
+    "Invalid value" );
+  TEAGN_TRUE_OR_THROW( outRaster->getElement( 1, 0, value, 1 ), "Value get" );
+  TEAGN_CHECK_EPS( value, 3.347980, 0.00001,
+    "Invalid value" );
+  TEAGN_TRUE_OR_THROW( outRaster->getElement( 1, 0, value, 2 ), "Value get" );
+  TEAGN_CHECK_EPS( value, 1.0, 0.0001,
+    "Invalid value" );    
+
+  /* Testing IHS -> RGB */
+  
+  params.Clear();
+
+  TeRasterParams outRaster2_params;
+  outRaster2_params.mode_ = 'c';
+  outRaster2_params.nBands( 3 );
+  outRaster2_params.setNLinesNColumns( 1, 1 );
+  outRaster2_params.setDataType( TeDOUBLE, -1 );
+  outRaster2_params.decoderIdentifier_ = "SMARTMEM";
+  outRaster2_params.setPhotometric( TeRasterParams::TeMultiBand, -1 );
+  TePDITypes::TePDIRasterPtrType outRaster2( new TeRaster( 
+    outRaster2_params ) );
+  TEAGN_TRUE_OR_THROW( outRaster2->init(), 
+    "outRaster2 allocation error" );  
+    
+  TePDITypes::TePDIRasterVectorType input_rasters2;
+  input_rasters2.push_back( outRaster );
+  input_rasters2.push_back( outRaster );
+  input_rasters2.push_back( outRaster );
+  params.SetParameter( "input_rasters", input_rasters2 );
+  
+  std::vector< int > input_channels2;
+  input_channels2.push_back( 0 );
+  input_channels2.push_back( 1 );
+  input_channels2.push_back( 2 );
+  params.SetParameter( "input_channels", input_channels2 );    
+  
+  TePDITypes::TePDIRasterVectorType output_rasters2;
+  output_rasters2.push_back( outRaster2 );
+  params.SetParameter( "output_rasters", output_rasters2 );  
+
+  params.SetParameter( "transf_type", TePDIColorTransform::Ihs2Rgb );
+  params.SetParameter( "rgb_channels_min", (double)0.0 );
+  params.SetParameter( "rgb_channels_max", (double)255.0 );
+
+  TEAGN_TRUE_OR_THROW( ct.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( ct.Apply(),
+    "Apply error" );
+
+  TEAGN_TRUE_OR_THROW( outRaster2->getElement( 0, 0, value, 0 ), "Value get" );
+  TEAGN_CHECK_EPS( value, 50.000000, 0.000001, "Invalid value" );
+  TEAGN_TRUE_OR_THROW( outRaster2->getElement( 0, 0, value, 1 ), "Value get" );
+  TEAGN_CHECK_EPS( value, 100., 0.000001, "Invalid value" );
+  TEAGN_TRUE_OR_THROW( outRaster2->getElement( 0, 0, value, 2 ), "Value get" );
+  TEAGN_CHECK_EPS( value, 150., 0.000001, "Invalid value" );
+  
+  TEAGN_TRUE_OR_THROW( outRaster2->getElement( 1, 0, value, 0 ), "Value get" );
+  TEAGN_CHECK_EPS( value, 0.0, 0.000001, "Invalid value" );
+  TEAGN_TRUE_OR_THROW( outRaster2->getElement( 1, 0, value, 1 ), "Value get" );
+  TEAGN_CHECK_EPS( value, 200.0, 0.000001, "Invalid value" );
+  TEAGN_TRUE_OR_THROW( outRaster2->getElement( 1, 0, value, 2 ), "Value get" );
+  TEAGN_CHECK_EPS( value, 255.0, 0.000001, "Invalid value" );  
+}
+
+
+int main()
+{
+  TEAGN_LOGMSG( "Test started." );
+
+  try{
+    TeStdIOProgress pi;
+    TeProgress::setProgressInterf( dynamic_cast< TeProgressBase* >( &pi ) );
+      
+    TeInitRasterDecoders();
+    
+    RGB2IHS_IHS2RGB_image_test();
+    RGB2IHS_IHS2RGB_numeric_test();
+  }
+  catch( const TeException& excpt ){
+    TEAGN_LOGERR( excpt.message() )
+    return EXIT_FAILURE;
+  }
+
+  TEAGN_LOGMSG( "Test OK." );
+  return EXIT_SUCCESS;
+}
diff --git a/examples/image_processing/source/TePDIColorTransform/TePDIColorTransform_test.vcproj b/examples/image_processing/source/TePDIColorTransform/TePDIColorTransform_test.vcproj
new file mode 100755
index 0000000..d0d51ff
--- /dev/null
+++ b/examples/image_processing/source/TePDIColorTransform/TePDIColorTransform_test.vcproj
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="TePDIColorTransform_test"
+	ProjectGUID="{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	RootNamespace="TePDIColorTransform_test"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="0">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../base;../../../../src/terralib/image_processing;../../../../src/terralib/kernel"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PDIAGN_ENABLE_STDOUT_LOG"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Debug/terralibpdi/terralibpdi.lib ../../../../Debug/terralib/terralib.lib ../../../../Debug/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Debug/libjpeg/libjpeg.lib ../../../../Debug/shapelib/shapelib.lib user32.lib $(NOINHERIT)"
+				OutputFile="$(OutDir)/TePDIColorTransform_test.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreAllDefaultLibraries="FALSE"
+				IgnoreDefaultLibraryNames="msvcrt.lib,libcmt.lib;libc.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"
+				TargetMachine="0"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="../../../../src/terralib/image_processing;../base;../../../../src/terralib/kernel;../../../../src/shapelib"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Release/terralibpdi/terralibpdi.lib ../../../../Release/terralib/terralib.lib ../../../../Release/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Release/libjpeg/libjpeg.lib ../../../../Release/shapelib/shapelib.lib"
+				OutputFile="$(OutDir)/TePDIColorTransform_test.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\TePDIColorTransform_test.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/image_processing/source/TePDIContrast/TePDIContrast.pro b/examples/image_processing/source/TePDIContrast/TePDIContrast.pro
new file mode 100755
index 0000000..5d04a9f
--- /dev/null
+++ b/examples/image_processing/source/TePDIContrast/TePDIContrast.pro
@@ -0,0 +1,7 @@
+include( ../base/base.pro )
+
+SOURCES += \
+  TePDIContrast_test.cpp
+
+QMAKE_CLEAN += \
+  ../../bin/TePDIContrast*
\ No newline at end of file
diff --git a/examples/image_processing/source/TePDIContrast/TePDIContrast_test.cpp b/examples/image_processing/source/TePDIContrast/TePDIContrast_test.cpp
new file mode 100755
index 0000000..cd01149
--- /dev/null
+++ b/examples/image_processing/source/TePDIContrast/TePDIContrast_test.cpp
@@ -0,0 +1,548 @@
+#define TEAGN_ENABLE_STDOUT_LOG
+
+#include <TePDIExamplesBase.hpp>
+
+#include <TePDIContrast.hpp>
+#include <TePDIParameters.hpp>
+#include <TePDIUtils.hpp>
+#include <TePDIRgbPaletteFunctions.hpp>
+
+#include <TeRaster.h>
+#include <TeDataTypes.h>
+#include <TeDecoderTIFF.h>
+#include <TeInitRasterDecoders.h>
+#include <TeProgress.h>
+#include <TeStdIOProgress.h>
+#include <TeTime.h>
+
+#include <TeAgnostic.h>
+
+#include <string>
+
+void TePDIContrastMinMax_autolevels_test()
+{
+  TePDIParameters params;
+
+  TePDIContrast::TePDIContrastType contrast_type = 
+    TePDIContrast::TePDIContrastMinMax;
+  params.SetParameter( "contrast_type", contrast_type );
+
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  params.SetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeUNSIGNEDCHAR, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  params.SetParameter( "input_band", (int)0 );
+  params.SetParameter( "output_band", (int)0 );
+  
+  TePDITypes::TePDILutPtrType outlut( new TePDITypes::TePDILutType );
+  params.SetParameter( "outlut", outlut );
+
+  TePDIContrast contra;
+
+  TEAGN_TRUE_OR_THROW( contra.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( contra.Apply(),
+    "Apply error" );
+    
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "TePDIContrastMinMax_autolevels_test.tif" ), "GeoTIF generation error" );
+    
+  /* Checking the generated lut */
+  
+  TEAGN_CHECK_EPS( outlut->size(), 256, 0, "Invalid lut size" );
+}
+
+
+void TePDIContrastMinMax_no_input_image_test()
+{
+  TePDIParameters params;
+
+  TePDIContrast::TePDIContrastType contrast_type = 
+    TePDIContrast::TePDIContrastMinMax;
+  params.SetParameter( "contrast_type", contrast_type );
+
+  TePDIHistogram::pointer input_histogram( new TePDIHistogram );
+  {
+    TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+      std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+    TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+    
+    input_histogram->reset( inRaster, 0, 0, true, TeBoxPixelIn );
+    params.SetParameter( "input_histogram", input_histogram );
+  }
+  
+  params.SetParameter( "output_channel_min_level", (double)0 );
+  params.SetParameter( "output_channel_max_level", (double)255 );
+  
+  TePDITypes::TePDILutPtrType outlut( new TePDITypes::TePDILutType );
+  params.SetParameter( "outlut", outlut );
+
+  TePDIContrast contra;
+  TEAGN_TRUE_OR_THROW( contra.Reset( params ),
+    "Invalid Parameters" );  
+  TEAGN_TRUE_OR_THROW( contra.Apply(),
+    "Apply error" );
+    
+  /* Checking the generated lut */
+
+  TEAGN_TRUE_OR_THROW( ( outlut->size() == 256 ), "Invalid lut size" );
+}
+
+
+void TePDIContrastLinear_plus_histo_test()
+{
+  TePDIParameters params;
+
+  TePDIContrast::TePDIContrastType contrast_type = 
+    TePDIContrast::TePDIContrastLinear;
+  params.SetParameter( "contrast_type", contrast_type );
+
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  params.SetParameter( "input_image", inRaster );
+  
+  /* Creating the histogram */
+  
+  TePDIHistogram::pointer input_histogram( new TePDIHistogram );
+  TEAGN_TRUE_OR_THROW( input_histogram->reset( inRaster, 0, 256, 
+    true, TeBoxPixelIn ),
+    "Histogram building error" );
+  TEAGN_TRUE_OR_THROW( ( input_histogram->size() == 256 ),
+    "Invalid Histogram" );    
+  params.SetParameter( "input_histogram", input_histogram );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeUNSIGNEDCHAR, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  params.SetParameter( "input_band", (int)0 );
+  params.SetParameter( "output_band", (int)0 );
+
+  params.SetParameter( "min_level", (double)46 );
+  params.SetParameter( "max_level", (double)102 );
+  
+  TePDITypes::TePDILutPtrType outlut( new TePDITypes::TePDILutType );
+  params.SetParameter( "outlut", outlut );  
+
+  TePDIContrast contra;
+
+  TEAGN_TRUE_OR_THROW( contra.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( contra.Apply(),
+    "Apply error" );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "TePDIContrastLinear_plus_histo_test.tif" ), "GeoTIF generation error" );
+    
+  /* Checking the generated lut */
+  
+  TEAGN_TRUE_OR_THROW( ( outlut->size() == 256 ), "Invalid lut size" );
+}
+
+void TePDIContrastSquareRoot_test()
+{
+  TePDIParameters params;
+
+  TePDIContrast::TePDIContrastType contrast_type = 
+    TePDIContrast::TePDIContrastSquareRoot;
+  params.SetParameter( "contrast_type", contrast_type );
+
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  params.SetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeUNSIGNEDCHAR, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  params.SetParameter( "input_band", (int)0 );
+  params.SetParameter( "output_band", (int)0 );
+
+  params.SetParameter( "histo_levels", (int)256 );
+
+  params.SetParameter( "min_level", (double)46 );
+  params.SetParameter( "max_level", (double)102 );
+  
+  TePDITypes::TePDILutPtrType outlut( new TePDITypes::TePDILutType );
+  params.SetParameter( "outlut", outlut );  
+
+  TePDIContrast contra;
+
+  TEAGN_TRUE_OR_THROW( contra.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( contra.Apply(),
+    "Apply error" );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "TePDIContrastSquareRoot_test.tif" ), "GeoTIF generation error" );
+    
+  /* Checking the generated lut */
+  
+  TEAGN_TRUE_OR_THROW( ( outlut->size() == 256 ), "Invalid lut size" );
+}
+
+void TePDIContrastSquare_test()
+{
+  TePDIParameters params;
+
+  TePDIContrast::TePDIContrastType contrast_type = 
+    TePDIContrast::TePDIContrastSquare;
+  params.SetParameter( "contrast_type", contrast_type );
+
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  params.SetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeUNSIGNEDCHAR, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  params.SetParameter( "input_band", (int)0 );
+  params.SetParameter( "output_band", (int)0 );
+
+  params.SetParameter( "histo_levels", (int)256 );
+
+  params.SetParameter( "min_level", (double)46 );
+  params.SetParameter( "max_level", (double)102 );
+  
+  TePDITypes::TePDILutPtrType outlut( new TePDITypes::TePDILutType );
+  params.SetParameter( "outlut", outlut );  
+
+  TePDIContrast contra;
+
+  TEAGN_TRUE_OR_THROW( contra.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( contra.Apply(),
+    "Apply error" );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "TePDIContrastSquare_test.tif" ), "GeoTIF generation error" );
+    
+  /* Checking the generated lut */
+  
+  TEAGN_TRUE_OR_THROW( ( outlut->size() == 256 ), "Invalid lut size" );
+}
+
+void TePDIContrastLog_test()
+{
+  TePDIParameters params;
+
+  TePDIContrast::TePDIContrastType contrast_type = 
+    TePDIContrast::TePDIContrastLog;
+  params.SetParameter( "contrast_type", contrast_type );
+
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  params.SetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeUNSIGNEDCHAR, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  params.SetParameter( "input_band", (int)0 );
+  params.SetParameter( "output_band", (int)0 );
+
+  params.SetParameter( "histo_levels", (int)256 );
+
+  params.SetParameter( "min_level", (double)46 );
+  params.SetParameter( "max_level", (double)102 );
+  
+  TePDITypes::TePDILutPtrType outlut( new TePDITypes::TePDILutType );
+  params.SetParameter( "outlut", outlut );  
+
+  TePDIContrast contra;
+
+  TEAGN_TRUE_OR_THROW( contra.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( contra.Apply(),
+    "Apply error" );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "TePDIContrastLog_test.tif" ), "GeoTIF generation error" );
+    
+  /* Checking the generated lut */
+  
+  TEAGN_TRUE_OR_THROW( ( outlut->size() == 256 ), "Invalid lut size" );
+}
+
+
+void TePDIContrastLog_with_use_dummy_test()
+{
+  TePDIParameters params;
+
+  TePDIContrast::TePDIContrastType contrast_type = 
+    TePDIContrast::TePDIContrastLog;
+  params.SetParameter( "contrast_type", contrast_type );
+
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  params.SetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeUNSIGNEDCHAR, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  params.SetParameter( "input_band", (int)0 );
+  params.SetParameter( "output_band", (int)0 );
+
+  params.SetParameter( "histo_levels", (int)256 );
+
+  params.SetParameter( "min_level", (double)46 );
+  params.SetParameter( "max_level", (double)102 );
+  
+  TePDITypes::TePDILutPtrType outlut( new TePDITypes::TePDILutType );
+  params.SetParameter( "outlut", outlut );  
+  
+  params.SetParameter( "dummy_value", (double)0 );  
+
+  TePDIContrast contra;
+
+  TEAGN_TRUE_OR_THROW( contra.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( contra.Apply(),
+    "Apply error" );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "TePDIContrastLog_with_use_dummy_test.tif" ), "GeoTIF generation error" );
+    
+  /* Checking the generated lut */
+  
+  TEAGN_TRUE_OR_THROW( ( outlut->size() == 256 ), "Invalid lut size" );
+}
+
+
+void TePDIContrastNegative_test()
+{
+  TePDIParameters params;
+
+  TePDIContrast::TePDIContrastType contrast_type = 
+    TePDIContrast::TePDIContrastNegative;
+  params.SetParameter( "contrast_type", contrast_type );
+
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  params.SetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeUNSIGNEDCHAR, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  params.SetParameter( "input_band", (int)0 );
+  params.SetParameter( "output_band", (int)0 );
+
+  params.SetParameter( "histo_levels", (int)256 );
+
+  params.SetParameter( "min_level", (double)46 );
+  params.SetParameter( "max_level", (double)102 );
+  
+  TePDITypes::TePDILutPtrType outlut( new TePDITypes::TePDILutType );
+  params.SetParameter( "outlut", outlut );  
+
+  TePDIContrast contra;
+
+  TEAGN_TRUE_OR_THROW( contra.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( contra.Apply(),
+    "Apply error" );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "TePDIContrastNegative_test.tif" ), "GeoTIF generation error" );
+    
+  /* Checking the generated lut */
+  
+  TEAGN_TRUE_OR_THROW( ( outlut->size() == 256 ), "Invalid lut size" );
+}
+
+void TePDIContrastHistEqualizer_test()
+{
+  TePDIParameters params;
+
+  TePDIContrast::TePDIContrastType contrast_type = 
+    TePDIContrast::TePDIContrastHistEqualizer;
+  params.SetParameter( "contrast_type", contrast_type );
+
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  params.SetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeUNSIGNEDCHAR, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  params.SetParameter( "input_band", (int)0 );
+  params.SetParameter( "output_band", (int)0 );
+
+  params.SetParameter( "histo_levels", (int)256 );
+
+  params.SetParameter( "min_level", (double)46 );
+  params.SetParameter( "max_level", (double)102 );
+  
+  TePDITypes::TePDILutPtrType outlut( new TePDITypes::TePDILutType );
+  params.SetParameter( "outlut", outlut );  
+
+  TePDIContrast contra;
+
+  TEAGN_TRUE_OR_THROW( contra.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( contra.Apply(),
+    "Apply error" );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "TePDIContrastHistEqualizer_test.tif" ), "GeoTIF generation error" );
+    
+  /* Checking the generated lut */
+  
+  TEAGN_TRUE_OR_THROW( ( outlut->size() == 256 ), "Invalid lut size" );
+}
+
+void TePDIContrastSimpleSlicer_test()
+{
+  TePDIParameters params;
+
+  TePDIContrast::TePDIContrastType contrast_type = 
+    TePDIContrast::TePDIContrastSimpleSlicer;
+  params.SetParameter( "contrast_type", contrast_type );
+
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  params.SetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeUNSIGNEDCHAR, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  params.SetParameter( "input_band", (int)0 );
+  params.SetParameter( "output_band", (int)0 );
+
+  params.SetParameter( "histo_levels", (int)( 102 - 47 + 1 ) );
+
+  params.SetParameter( "min_level", (double)47 );
+  params.SetParameter( "max_level", (double)102 );
+  
+  TePDITypes::TePDILutPtrType outlut( new TePDITypes::TePDILutType );
+  params.SetParameter( "outlut", outlut );  
+
+  TePDIRgbPalette::pointer pal =
+    TePDIRgbPaletteFunctions::createLSBPalette( 20 );
+  params.SetParameter( "rgb_palette", pal );
+
+  TePDIContrast contra;
+
+  TEAGN_TRUE_OR_THROW( contra.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( contra.Apply(),
+    "Apply error" );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "TePDIContrastSimpleSlicer_test.tif" ), "GeoTIF generation error" );
+    
+  /* Checking the generated lut */
+  
+  TEAGN_TRUE_OR_THROW( ( outlut->size() == 56 ), "Invalid lut size" );
+}
+
+
+void TePDIContrastStat_test()
+{
+  /* from "../resources/cbers_b2_crop_contraste.tif" */   
+  double target_mean = 121.809123;
+  double target_variance = 1561.214764;
+  
+  /* Building contrast parameters */
+
+  TePDIParameters params;
+
+  TePDIContrast::TePDIContrastType contrast_type = 
+    TePDIContrast::TePDIContrastStat;
+  params.SetParameter( "contrast_type", contrast_type );
+
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  params.SetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeUNSIGNEDCHAR, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  params.SetParameter( "input_band", (int)0 );
+  params.SetParameter( "output_band", (int)0 );
+  params.SetParameter( "target_mean", target_mean );
+  params.SetParameter( "target_variance", target_variance );
+
+  TePDIContrast contra;
+
+  TEAGN_TRUE_OR_THROW( contra.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( contra.Apply(),
+    "Apply error" );
+    
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "TePDIContrastStat_test.tif" ), "GeoTIF generation error" );
+}
+
+
+int main()
+{
+  TEAGN_LOGMSG( "Test started." );
+
+  try{
+    TeInitRasterDecoders();
+    
+    TeStdIOProgress pi;
+    TeProgress::setProgressInterf( dynamic_cast< TeProgressBase* >( &pi ) );    
+
+    TePDIContrastLinear_plus_histo_test();
+    TePDIContrastStat_test();
+    TePDIContrastMinMax_autolevels_test();
+    TePDIContrastMinMax_no_input_image_test();
+    TePDIContrastSquareRoot_test();
+    TePDIContrastSquare_test();
+    TePDIContrastLog_test();
+    TePDIContrastLog_with_use_dummy_test();
+    TePDIContrastNegative_test();
+    TePDIContrastHistEqualizer_test();
+    TePDIContrastSimpleSlicer_test();
+  }
+  catch( const TeException& excpt ){
+    TEAGN_LOGERR( excpt.message() )
+    return EXIT_FAILURE;
+  }
+
+  TEAGN_LOGMSG( "Test OK." );
+  return EXIT_SUCCESS;
+}
diff --git a/examples/image_processing/source/TePDIContrast/TePDIContrast_test.vcproj b/examples/image_processing/source/TePDIContrast/TePDIContrast_test.vcproj
new file mode 100755
index 0000000..ffb4f4b
--- /dev/null
+++ b/examples/image_processing/source/TePDIContrast/TePDIContrast_test.vcproj
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="TePDIContrast_test"
+	ProjectGUID="{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	RootNamespace="TePDIContrast_test"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="0">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../base;../../../../src/terralib/image_processing;../../../../src/terralib/kernel;../../../../src/tiff"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PDIAGN_ENABLE_STDOUT_LOG"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Debug/terralibpdi/terralibpdi.lib ../../../../Debug/terralib/terralib.lib ../../../../Debug/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Debug/libjpeg/libjpeg.lib ../../../../Debug/shapelib/shapelib.lib user32.lib $(NOINHERIT)"
+				OutputFile="$(OutDir)/TePDIContrast_test.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreAllDefaultLibraries="FALSE"
+				IgnoreDefaultLibraryNames="msvcrt.lib,libcmt.lib;libc.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"
+				TargetMachine="0"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="../../../../src/terralib/image_processing;../base;../../../../src/terralib/kernel;../../../../src/tiff;../../../../src/shapelib"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Release/terralibpdi/terralibpdi.lib ../../../../Release/terralib/terralib.lib ../../../../Release/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Release/libjpeg/libjpeg.lib ../../../../Release/shapelib/shapelib.lib"
+				OutputFile="$(OutDir)/TePDIContrast_test.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\TePDIContrast_test.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/image_processing/source/TePDICorrelationMatching/TePDICorrelationMatching.pro b/examples/image_processing/source/TePDICorrelationMatching/TePDICorrelationMatching.pro
new file mode 100644
index 0000000..67a1882
--- /dev/null
+++ b/examples/image_processing/source/TePDICorrelationMatching/TePDICorrelationMatching.pro
@@ -0,0 +1,7 @@
+include( ../base/base.pro )
+
+SOURCES += \
+  TePDICorrelationMatching_test.cpp
+
+QMAKE_CLEAN += \
+  ../../bin/TePDICorrelationMatching*.tif
diff --git a/examples/image_processing/source/TePDICorrelationMatching/TePDICorrelationMatching_test.cpp b/examples/image_processing/source/TePDICorrelationMatching/TePDICorrelationMatching_test.cpp
new file mode 100644
index 0000000..d8ae8b5
--- /dev/null
+++ b/examples/image_processing/source/TePDICorrelationMatching/TePDICorrelationMatching_test.cpp
@@ -0,0 +1,486 @@
+#define TEAGN_ENABLE_STDOUT_LOG
+
+#include <TePDIExamplesBase.hpp>
+
+#include <TePDICorrelationMatching.hpp>
+#include <TePDIUtils.hpp>
+
+#include <TeProgress.h>
+#include <TeStdIOProgress.h>
+#include <TeAgnostic.h>
+
+#include <math.h>
+
+
+void raster2Tiff( 
+  const TePDITypes::TePDIRasterPtrType& input_raster_ptr,
+  unsigned int raster_channel,
+  const std::string& out_file_name,
+  TeSharedPtr< TeCoordPairVect > out_tie_points_ptr,
+  unsigned int tie_points_space )
+{   
+  TEAGN_TRUE_OR_THROW( ( ! out_file_name.empty() ), 
+    "Invalid file name" )
+  TEAGN_TRUE_OR_THROW( ( input_raster_ptr->params().nlines_ > 0 ), 
+    "Invalid matrix lines" )
+  TEAGN_TRUE_OR_THROW( ( input_raster_ptr->params().ncols_ > 0 ), 
+    "Invalid matrix cols" )
+    
+  TeRasterParams params;
+  params.setNLinesNColumns( input_raster_ptr->params().nlines_,
+    input_raster_ptr->params().ncols_ );
+  params.nBands( 1 );
+  params.setDataType( TeUNSIGNEDCHAR, -1 );
+  params.nBands( 1 );
+  params.decoderIdentifier_ = "TIF";
+  params.mode_ = 'c';
+  params.fileName_ = out_file_name;
+  
+  TeRaster out_raster( params );
+  TEAGN_TRUE_OR_THROW( out_raster.init(), "Error init raster" );
+  double value = 0;
+  
+  for( int line = 0 ; 
+    line < input_raster_ptr->params().nlines_ ; ++line ) {
+    for( int col = 0 ; 
+      col < input_raster_ptr->params().ncols_ ; 
+      ++col ) {
+      
+      input_raster_ptr->getElement( col, line, value, 
+        raster_channel );
+      
+
+      TEAGN_TRUE_OR_THROW( out_raster.setElement( col, line, 
+        value, 0 ),
+        "Error writing raster" )
+    }  
+  }
+  
+  /* Draw tie-points */
+  
+  if( out_tie_points_ptr.isActive() ) {
+    TeCoordPairVect::iterator it = out_tie_points_ptr->begin();
+    TeCoordPairVect::iterator it_end = out_tie_points_ptr->end();
+    
+    while( it != it_end ) {
+      int x = 0;
+      int y = 0;
+      
+      if( tie_points_space == 0 ) {
+         x = TeRound( it->pt1.x() );
+         y = TeRound( it->pt1.y() );
+      } else {
+         x = TeRound( it->pt2.x() );
+         y = TeRound( it->pt2.y() );
+      }
+      
+      TEAGN_TRUE_OR_THROW( ( x < input_raster_ptr->params().ncols_ ),
+        "Invalid maxima column" )
+      TEAGN_TRUE_OR_THROW( ( x >= 0 ),
+        "Invalid maxima column" )      
+      TEAGN_TRUE_OR_THROW( ( y < input_raster_ptr->params().nlines_ ),
+        "Invalid maxima line" )
+      TEAGN_TRUE_OR_THROW( ( y >= 0 ),
+        "Invalid maxima line" )      
+      
+      TEAGN_TRUE_OR_THROW( out_raster.setElement( x, y, 
+        255.0, 0 ),
+        "Error writing raster" )    
+    
+      ++it;
+    }
+  
+  }
+}
+
+void sameImageTest()
+{
+  /* Creating parameters */
+
+  TePDIParameters params;
+  
+  TePDITypes::TePDIRasterPtrType input_image1_ptr( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_rgb342_crop1.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_image1_ptr->init(), 
+    "Unable to init input_image1_ptr" );    
+  params.SetParameter( "input_image1_ptr" , input_image1_ptr );
+  
+  params.SetParameter( "input_channel1" , (unsigned int)0 );
+    
+  TePDITypes::TePDIRasterPtrType input_image2_ptr( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_rgb342_crop1.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_image2_ptr->init(), 
+    "Unable to init input_image2_ptr" ); 
+  params.SetParameter( "input_image2_ptr" , input_image2_ptr ); 
+  
+  params.SetParameter( "input_channel2" , (unsigned int)0 );       
+    
+  TeSharedPtr< TeCoordPairVect > out_tie_points_ptr( new TeCoordPairVect );
+  params.SetParameter( "out_tie_points_ptr" , out_tie_points_ptr );        
+  
+  TeBox input_box1( TeCoord2D( 142, 826 ) , 
+    TeCoord2D( 542, 426 ) );
+  params.SetParameter( "input_box1" , input_box1 );
+  
+  TeBox input_box2( TeCoord2D( 238, 689 ) , 
+    TeCoord2D( 391, 473 ) );
+  params.SetParameter( "input_box2" , input_box2 );  
+  
+  params.SetParameter( "enable_multi_thread" , (int)1 ); 
+  
+  params.SetParameter( "pixel_x_relation" , (double)1 ); 
+  params.SetParameter( "pixel_y_relation" , (double)1 ); 
+  
+  double best_cor_value = 0;
+  params.SetParameter( "best_cor_value_ptr" , &best_cor_value ); 
+  
+  TePDICorrelationMatching corr_instance; 
+  corr_instance.ToggleProgInt( true );
+  TEAGN_TRUE_OR_THROW( corr_instance.Reset( params ),
+    "Algorithm reset error" )
+    
+  TEAGN_LOGMSG( "Algorithm started" )
+  
+  time_t init_time = clock() / CLOCKS_PER_SEC;
+    
+  TEAGN_TRUE_OR_THROW( corr_instance.Apply(),
+    "Algorithm apply error" )      
+    
+  time_t end_time = clock() / CLOCKS_PER_SEC;
+  
+  TEAGN_LOGMSG( "Time elapsed (sameImageDifBoxesTest): " + 
+    TeAgnostic::to_string( (long int)( end_time - init_time ) ) +
+    " seconds" );
+  TEAGN_WATCH( best_cor_value );
+    
+  /* Displaying tie-points */
+  {
+    TeCoordPairVect::iterator it = out_tie_points_ptr->begin();
+    TeCoordPairVect::iterator it_end = out_tie_points_ptr->end();
+    
+    while( it != it_end ) {
+      std::cout << "[" + Te2String( it->pt1.x(),1 ) + " , " +
+        Te2String( it->pt1.y(),1 ) + "] -> [" +
+        Te2String( it->pt2.x(),1 ) + " , " + 
+        Te2String( it->pt2.y(),1 ) + "]" << std::endl;
+      
+      ++it;
+    }
+  }
+  
+  /* Tie-points draw */
+  
+  raster2Tiff( input_image1_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TePDICorrelationMatching_test_sameImageTest_input_image1.tif",
+    out_tie_points_ptr, 0 );
+  raster2Tiff( input_image2_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TePDICorrelationMatching_test_sameImageTest_input_image2.tif",
+    out_tie_points_ptr, 1 );    
+    
+  TEAGN_WATCH( (unsigned int)out_tie_points_ptr->size() );
+  TEAGN_CHECK_EPS( 4, out_tie_points_ptr->size(),
+    0, "Invalid tie-points number" )    
+}
+
+
+void sameImageTest2()
+{
+  /* Creating parameters */
+
+  TePDIParameters params;
+  
+  TePDITypes::TePDIRasterPtrType input_image1_ptr( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_rgb342_crop1.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_image1_ptr->init(), 
+    "Unable to init input_image1_ptr" );    
+  params.SetParameter( "input_image1_ptr" , input_image1_ptr );
+  
+  params.SetParameter( "input_channel1" , (unsigned int)0 );
+    
+  TePDITypes::TePDIRasterPtrType input_image2_ptr( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_rgb342_crop1.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_image2_ptr->init(), 
+    "Unable to init input_image2_ptr" ); 
+  params.SetParameter( "input_image2_ptr" , input_image2_ptr ); 
+  
+  params.SetParameter( "input_channel2" , (unsigned int)0 );       
+    
+  TeSharedPtr< TeCoordPairVect > out_tie_points_ptr( new TeCoordPairVect );
+  params.SetParameter( "out_tie_points_ptr" , out_tie_points_ptr );        
+  
+  TeBox input_box2( TeCoord2D( 142, 826 ) , 
+    TeCoord2D( 542, 426 ) );
+  params.SetParameter( "input_box2" , input_box2 );
+  
+  TeBox input_box1( TeCoord2D( 238, 689 ) , 
+    TeCoord2D( 391, 473 ) );
+  params.SetParameter( "input_box1" , input_box1 );  
+  
+  params.SetParameter( "enable_multi_thread" , (int)1 ); 
+  
+  params.SetParameter( "pixel_x_relation" , (double)1 ); 
+  params.SetParameter( "pixel_y_relation" , (double)1 ); 
+  
+  double best_cor_value = 0;
+  params.SetParameter( "best_cor_value_ptr" , &best_cor_value );  
+  
+  TePDICorrelationMatching corr_instance; 
+  corr_instance.ToggleProgInt( true );
+  TEAGN_TRUE_OR_THROW( corr_instance.Reset( params ),
+    "Algorithm reset error" )
+    
+  TEAGN_LOGMSG( "Algorithm started" )
+  
+  time_t init_time = clock() / CLOCKS_PER_SEC;
+    
+  TEAGN_TRUE_OR_THROW( corr_instance.Apply(),
+    "Algorithm apply error" )      
+    
+  time_t end_time = clock() / CLOCKS_PER_SEC;
+  
+  TEAGN_LOGMSG( "Time elapsed (sameImageDifBoxesTest): " + 
+    TeAgnostic::to_string( (long int)( end_time - init_time ) ) +
+    " seconds" );
+    
+  TEAGN_WATCH( best_cor_value );    
+    
+  /* Displaying tie-points */
+  {
+    TeCoordPairVect::iterator it = out_tie_points_ptr->begin();
+    TeCoordPairVect::iterator it_end = out_tie_points_ptr->end();
+    
+    while( it != it_end ) {
+      std::cout << "[" + Te2String( it->pt1.x(),1 ) + " , " +
+        Te2String( it->pt1.y(),1 ) + "] -> [" +
+        Te2String( it->pt2.x(),1 ) + " , " + 
+        Te2String( it->pt2.y(),1 ) + "]" << std::endl;
+      
+      ++it;
+    }
+  }
+  
+  /* Tie-points draw */
+  
+  raster2Tiff( input_image1_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TePDICorrelationMatching_test_sameImageTest2_input_image1.tif",
+    out_tie_points_ptr, 0 );
+  raster2Tiff( input_image2_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TePDICorrelationMatching_test_sameImageTest2_input_image2.tif",
+    out_tie_points_ptr, 1 );    
+    
+  TEAGN_WATCH( (unsigned int)out_tie_points_ptr->size() );
+  TEAGN_CHECK_EPS( 4, out_tie_points_ptr->size(),
+    0, "Invalid tie-points number" )    
+}
+
+
+void halfsampledImageTest()
+{
+  /* Creating parameters */
+
+  TePDIParameters params;
+  
+  TePDITypes::TePDIRasterPtrType input_image1_ptr( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_image1_ptr->init(), 
+    "Unable to init input_image1_ptr" );    
+  params.SetParameter( "input_image1_ptr" , input_image1_ptr );
+  
+  params.SetParameter( "input_channel1" , (unsigned int)0 );
+    
+  TePDITypes::TePDIRasterPtrType input_image2_ptr( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop_contraste_halfsampled.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_image2_ptr->init(), 
+    "Unable to init input_image2_ptr" ); 
+  params.SetParameter( "input_image2_ptr" , input_image2_ptr ); 
+  
+  params.SetParameter( "input_channel2" , (unsigned int)0 );       
+    
+  TeSharedPtr< TeCoordPairVect > out_tie_points_ptr( new TeCoordPairVect );
+  params.SetParameter( "out_tie_points_ptr" , out_tie_points_ptr );        
+  
+  TeBox input_box1( TeCoord2D( 198, 486 ) , 
+    TeCoord2D( 577, 186 ) );
+  params.SetParameter( "input_box1" , input_box1 );
+  
+  TeBox input_box2( TeCoord2D( 143, 180 ) , 
+    TeCoord2D( 227, 113 ) );
+  params.SetParameter( "input_box2" , input_box2 );  
+  
+  params.SetParameter( "enable_multi_thread" , (int)1 ); 
+  
+  params.SetParameter( "pixel_x_relation" , (double)0.5 ); 
+  params.SetParameter( "pixel_y_relation" , (double)0.5 ); 
+  
+  double best_cor_value = 0;
+  params.SetParameter( "best_cor_value_ptr" , &best_cor_value );   
+  
+  TePDICorrelationMatching corr_instance; 
+  corr_instance.ToggleProgInt( true );
+  TEAGN_TRUE_OR_THROW( corr_instance.Reset( params ),
+    "Algorithm reset error" )
+    
+  TEAGN_LOGMSG( "Algorithm started" )
+  
+  time_t init_time = clock() / CLOCKS_PER_SEC;
+    
+  TEAGN_TRUE_OR_THROW( corr_instance.Apply(),
+    "Algorithm apply error" )      
+    
+  time_t end_time = clock() / CLOCKS_PER_SEC;
+  
+  TEAGN_LOGMSG( "Time elapsed (sameImageDifBoxesTest): " + 
+    TeAgnostic::to_string( (long int)( end_time - init_time ) ) +
+    " seconds" );
+  TEAGN_WATCH( best_cor_value );    
+    
+  /* Displaying tie-points */
+  {
+    TeCoordPairVect::iterator it = out_tie_points_ptr->begin();
+    TeCoordPairVect::iterator it_end = out_tie_points_ptr->end();
+    
+    while( it != it_end ) {
+      std::cout << "[" + Te2String( it->pt1.x(),1 ) + " , " +
+        Te2String( it->pt1.y(),1 ) + "] -> [" +
+        Te2String( it->pt2.x(),1 ) + " , " + 
+        Te2String( it->pt2.y(),1 ) + "]" << std::endl;
+      
+      ++it;
+    }
+  }
+  
+  /* Tie-points draw */
+  
+  raster2Tiff( input_image1_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TePDICorrelationMatching_test_halfsampledImageTest_input_image1.tif",
+    out_tie_points_ptr, 0 );
+  raster2Tiff( input_image2_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TePDICorrelationMatching_test_halfsampledImageTest_input_image2.tif",
+    out_tie_points_ptr, 1 );    
+    
+  TEAGN_WATCH( (unsigned int)out_tie_points_ptr->size() );
+  TEAGN_CHECK_EPS( 4, out_tie_points_ptr->size(),
+    0, "Invalid tie-points number" )    
+}
+
+
+void halfsampledImageTest2()
+{
+  /* Creating parameters */
+
+  TePDIParameters params;
+  
+  TePDITypes::TePDIRasterPtrType input_image1_ptr( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop_contraste_halfsampled.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_image1_ptr->init(), 
+    "Unable to init input_image1_ptr" );    
+  params.SetParameter( "input_image1_ptr" , input_image1_ptr );
+  
+  params.SetParameter( "input_channel1" , (unsigned int)0 );
+    
+  TePDITypes::TePDIRasterPtrType input_image2_ptr( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_image2_ptr->init(), 
+    "Unable to init input_image2_ptr" ); 
+  params.SetParameter( "input_image2_ptr" , input_image2_ptr ); 
+  
+  params.SetParameter( "input_channel2" , (unsigned int)0 );       
+    
+  TeSharedPtr< TeCoordPairVect > out_tie_points_ptr( new TeCoordPairVect );
+  params.SetParameter( "out_tie_points_ptr" , out_tie_points_ptr );        
+  
+  TeBox input_box2( TeCoord2D( 198, 486 ) , 
+    TeCoord2D( 577, 186 ) );
+  params.SetParameter( "input_box2" , input_box2 );
+  
+  TeBox input_box1( TeCoord2D( 143, 180 ) , 
+    TeCoord2D( 227, 113 ) );
+  params.SetParameter( "input_box1" , input_box1 );  
+  
+  params.SetParameter( "enable_multi_thread" , (int)1 ); 
+  
+  params.SetParameter( "pixel_x_relation" , (double)2 ); 
+  params.SetParameter( "pixel_y_relation" , (double)2 ); 
+  
+  double best_cor_value = 0;
+  params.SetParameter( "best_cor_value_ptr" , &best_cor_value );   
+  
+  TePDICorrelationMatching corr_instance; 
+  corr_instance.ToggleProgInt( true );
+  TEAGN_TRUE_OR_THROW( corr_instance.Reset( params ),
+    "Algorithm reset error" )
+    
+  TEAGN_LOGMSG( "Algorithm started" )
+  
+  time_t init_time = clock() / CLOCKS_PER_SEC;
+    
+  TEAGN_TRUE_OR_THROW( corr_instance.Apply(),
+    "Algorithm apply error" )      
+    
+  time_t end_time = clock() / CLOCKS_PER_SEC;
+  
+  TEAGN_LOGMSG( "Time elapsed (sameImageDifBoxesTest): " + 
+    TeAgnostic::to_string( (long int)( end_time - init_time ) ) +
+    " seconds" );
+  TEAGN_WATCH( best_cor_value );    
+    
+  /* Displaying tie-points */
+  {
+    TeCoordPairVect::iterator it = out_tie_points_ptr->begin();
+    TeCoordPairVect::iterator it_end = out_tie_points_ptr->end();
+    
+    while( it != it_end ) {
+      std::cout << "[" + Te2String( it->pt1.x(),1 ) + " , " +
+        Te2String( it->pt1.y(),1 ) + "] -> [" +
+        Te2String( it->pt2.x(),1 ) + " , " + 
+        Te2String( it->pt2.y(),1 ) + "]" << std::endl;
+      
+      ++it;
+    }
+  }
+  
+  /* Tie-points draw */
+  
+  raster2Tiff( input_image1_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TePDICorrelationMatching_test_halfsampledImageTest2_input_image1.tif",
+    out_tie_points_ptr, 0 );
+  raster2Tiff( input_image2_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TePDICorrelationMatching_test_halfsampledImageTest2_input_image2.tif",
+    out_tie_points_ptr, 1 );    
+    
+  TEAGN_WATCH( (unsigned int)out_tie_points_ptr->size() );
+  TEAGN_CHECK_EPS( 4, out_tie_points_ptr->size(),
+    0, "Invalid tie-points number" )    
+}
+
+
+int main()
+{
+  TEAGN_LOGMSG( "Test started." );
+
+  try{
+    TeStdIOProgress pi;
+    TeProgress::setProgressInterf( dynamic_cast< TeProgressBase* >( &pi ) );     
+    
+    time_t init_time = clock() / CLOCKS_PER_SEC;
+    
+    sameImageTest();
+    sameImageTest2();
+    halfsampledImageTest();
+    halfsampledImageTest2();
+    
+    time_t end_time = clock() / CLOCKS_PER_SEC;
+    
+    TEAGN_LOGMSG( "Total elapsed time: " + 
+      TeAgnostic::to_string( (long int)( end_time - init_time ) ) +
+      " seconds" );    
+  }
+  catch( const TeException& e ){
+    TEAGN_LOGERR( "Test Failed - " + e.message() );
+    return EXIT_FAILURE;
+  }  
+
+  TEAGN_LOGMSG( "Test OK." );
+  return EXIT_SUCCESS;
+}
+
diff --git a/examples/image_processing/source/TePDICorrelationMatching/TePDICorrelationMatching_test.vcproj b/examples/image_processing/source/TePDICorrelationMatching/TePDICorrelationMatching_test.vcproj
new file mode 100644
index 0000000..fc55142
--- /dev/null
+++ b/examples/image_processing/source/TePDICorrelationMatching/TePDICorrelationMatching_test.vcproj
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="TePDICorrelationMatching_test"
+	ProjectGUID="{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	RootNamespace="TePDICorrelationMatching_test"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="0">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;../base;../../../../src/terralib/image_processing;../../../../src/terralib/kernel;../../../../src/tiff"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PDIAGN_ENABLE_STDOUT_LOG"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Debug/terralibpdi/terralibpdi.lib ../../../../Debug/terralib/terralib.lib ../../../../Debug/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Debug/libjpeg/libjpeg.lib ../../../../Debug/shapelib/shapelib.lib user32.lib $(NOINHERIT)"
+				OutputFile="$(OutDir)/TePDICorrelationMatching_test.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreAllDefaultLibraries="FALSE"
+				IgnoreDefaultLibraryNames="msvcrt.lib,libcmt.lib;libc.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"
+				TargetMachine="0"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories=".;../../../../src/terralib/image_processing;../base;../../../../src/terralib/kernel;../../../../src/shapelib"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Release/terralibpdi/terralibpdi.lib ../../../../Release/terralib/terralib.lib ../../../../Release/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Release/libjpeg/libjpeg.lib ../../../../Release/shapelib/shapelib.lib"
+				OutputFile="$(OutDir)/TePDICorrelationMatching_test.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\TePDICorrelationMatching_test.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/image_processing/source/TePDIDecorrelationEnhancement/TePDIDecorrelationEnhancement.pro b/examples/image_processing/source/TePDIDecorrelationEnhancement/TePDIDecorrelationEnhancement.pro
new file mode 100644
index 0000000..9018eef
--- /dev/null
+++ b/examples/image_processing/source/TePDIDecorrelationEnhancement/TePDIDecorrelationEnhancement.pro
@@ -0,0 +1,6 @@
+include( ../base/base.pro )
+
+SOURCES += \
+  TePDIDecorrelationEnhancement_test.cpp
+
+QMAKE_CLEAN += 
\ No newline at end of file
diff --git a/examples/image_processing/source/TePDIDecorrelationEnhancement/TePDIDecorrelationEnhancement_test.cpp b/examples/image_processing/source/TePDIDecorrelationEnhancement/TePDIDecorrelationEnhancement_test.cpp
new file mode 100644
index 0000000..b7fe268
--- /dev/null
+++ b/examples/image_processing/source/TePDIDecorrelationEnhancement/TePDIDecorrelationEnhancement_test.cpp
@@ -0,0 +1,83 @@
+
+#define TEAGN_ENABLE_STDOUT_LOG
+#include <TePDIExamplesBase.hpp>
+
+#include <TePDIDecorrelationEnhancement.hpp>
+#include <TePDIParameters.hpp>
+#include <TeAgnostic.h>
+#include <TePDIUtils.hpp>
+
+#include <TeRaster.h>
+#include <TeInitRasterDecoders.h>
+
+#include <TeProgress.h>
+#include <TeStdIOProgress.h>
+
+void TePDIDecorrelationEnhancement_test()
+{
+	TePDIParameters params;
+
+	TePDITypes::TePDIRasterVectorType input_rasters;
+	TePDITypes::TePDIRasterPtrType inRaster(new TeRaster(
+	  TEPDIEXAMPLESRESPATH "cbers_rgb342_crop1.tif", 'r'));
+	TEAGN_TRUE_OR_THROW(inRaster->init(), "Unable to init inRaster");
+	input_rasters.push_back(inRaster);
+	input_rasters.push_back(inRaster);
+	input_rasters.push_back(inRaster);
+
+	std::vector<int> bands_direct;
+	bands_direct.push_back(0);
+	bands_direct.push_back(1);
+	bands_direct.push_back(2);
+	
+	TePDITypes::TePDIRasterVectorType output_rasters;
+	TePDITypes::TePDIRasterPtrType outRaster1;
+	TEAGN_TRUE_OR_THROW(TePDIUtils::TeAllocRAMRaster(outRaster1, 1, 1, 1, false, TeDOUBLE, 0), "RAM Raster 1 Alloc error");
+	TePDITypes::TePDIRasterPtrType outRaster2;
+	TEAGN_TRUE_OR_THROW(TePDIUtils::TeAllocRAMRaster(outRaster2, 1, 1, 1, false, TeDOUBLE, 0), "RAM Raster 2 Alloc error");
+	TePDITypes::TePDIRasterPtrType outRaster3;
+	TEAGN_TRUE_OR_THROW(TePDIUtils::TeAllocRAMRaster(outRaster3, 1, 1, 1, false, TeDOUBLE, 0 ), "RAM Raster 3 Alloc error");
+	output_rasters.push_back(outRaster1);
+	output_rasters.push_back(outRaster2);
+	output_rasters.push_back(outRaster3);
+	
+	params.SetParameter("input_rasters", input_rasters);
+	params.SetParameter("bands", bands_direct);
+	params.SetParameter("output_rasters", output_rasters);
+	
+	TePDIDecorrelationEnhancement de;
+	TEAGN_TRUE_OR_THROW(de.Reset(params), "Invalid Parameters");
+	TEAGN_TRUE_OR_THROW(de.Apply(), "Apply error");
+	
+	TEAGN_TRUE_OR_THROW(TePDIUtils::TeRaster2Geotiff(output_rasters[0], 
+	  TEPDIEXAMPLESBINPATH "TePDIDecorrelationEnhancement0.tif" ), 
+	  "GeoTIFF0 generation error");
+	TEAGN_TRUE_OR_THROW(TePDIUtils::TeRaster2Geotiff(output_rasters[1], 
+	  TEPDIEXAMPLESBINPATH "TePDIDecorrelationEnhancement1.tif" ), 
+	  "GeoTIFF1 generation error");
+	TEAGN_TRUE_OR_THROW(TePDIUtils::TeRaster2Geotiff(output_rasters[2], 
+	  TEPDIEXAMPLESBINPATH "TePDIDecorrelationEnhancement2.tif" ), 
+	  "GeoTIFF2 generation error");
+}
+
+int main()
+{
+	TEAGN_LOGMSG("Test started.");
+	
+	TEAGN_DEBUG_MODE_CHECK;
+	
+	try
+	{
+		TeStdIOProgress pi;
+		TeProgress::setProgressInterf(dynamic_cast<TeProgressBase*>(&pi));
+		TeInitRasterDecoders();
+		TePDIDecorrelationEnhancement_test();
+	}
+  catch( const TeException& excpt ){
+    TEAGN_LOGERR( excpt.message() )
+    return EXIT_FAILURE;
+  }
+	
+	TEAGN_LOGMSG("Test OK.");
+	return EXIT_SUCCESS;
+}
diff --git a/examples/image_processing/source/TePDIDecorrelationEnhancement/TePDIDecorrelationEnhancement_test.vcproj b/examples/image_processing/source/TePDIDecorrelationEnhancement/TePDIDecorrelationEnhancement_test.vcproj
new file mode 100644
index 0000000..7f827d8
--- /dev/null
+++ b/examples/image_processing/source/TePDIDecorrelationEnhancement/TePDIDecorrelationEnhancement_test.vcproj
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="TePDIDecorrelationEnhancement_test"
+	ProjectGUID="{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	RootNamespace="TePDIDecorrelationEnhancement_test"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="0">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../base;../../../../src/terralib/image_processing;../../../../src/terralib/kernel;../../../../src/tiff"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PDIAGN_ENABLE_STDOUT_LOG"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Debug/terralibpdi/terralibpdi.lib ../../../../Debug/terralib/terralib.lib ../../../../Debug/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Debug/libjpeg/libjpeg.lib ../../../../Debug/shapelib/shapelib.lib user32.lib $(NOINHERIT)"
+				OutputFile="$(OutDir)/TePDIDecorrelationEnhancement_test.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreAllDefaultLibraries="FALSE"
+				IgnoreDefaultLibraryNames="msvcrt.lib,libcmt.lib;libc.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"
+				TargetMachine="0"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="../../../../src/terralib/image_processing;../base;../../../../src/terralib/kernel;../../../../src/shapelib"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Release/terralibpdi/terralibpdi.lib ../../../../Release/terralib/terralib.lib ../../../../Release/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Release/libjpeg/libjpeg.lib ../../../../Release/shapelib/shapelib.lib"
+				OutputFile="$(OutDir)/TePDIDecorrelationEnhancement_test.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\TePDIDecorrelationEnhancement_test.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/image_processing/source/TePDIFilterMask/TePDIFilterMask.pro b/examples/image_processing/source/TePDIFilterMask/TePDIFilterMask.pro
new file mode 100755
index 0000000..edb357b
--- /dev/null
+++ b/examples/image_processing/source/TePDIFilterMask/TePDIFilterMask.pro
@@ -0,0 +1,4 @@
+include( ../base/base.pro )
+
+SOURCES += TePDIFilterMask_test.cpp
+
diff --git a/examples/image_processing/source/TePDIFilterMask/TePDIFilterMask_test.cpp b/examples/image_processing/source/TePDIFilterMask/TePDIFilterMask_test.cpp
new file mode 100755
index 0000000..af83a7c
--- /dev/null
+++ b/examples/image_processing/source/TePDIFilterMask/TePDIFilterMask_test.cpp
@@ -0,0 +1,169 @@
+#define TEAGN_ENABLE_STDOUT_LOG
+
+#include <TePDIFilterMask.hpp>
+
+#include <TeAgnostic.h>
+
+void printMask( TePDIFilterMask mask )
+{
+  std::cout << std::endl;
+
+  for( unsigned int line = 0 ; line < mask.lines() ; ++line ) {
+    std::cout << std::endl;
+
+    for( unsigned int column = 0 ; column < mask.columns() ; ++column ) {
+      std::cout << " " << mask.get( line, column );
+    }
+  }
+}
+
+int main()
+{
+  TEAGN_LOGMSG( "Test started." );
+
+  try{
+    /* Checking mask creation */
+
+    TePDIFilterMask mask1( 3, 0. );
+
+    mask1.set( 0, 0, 1 );
+    mask1.set( 0, 1, 1 );
+    mask1.set( 0, 2, 1 );
+    mask1.set( 1, 0, 1 );
+    mask1.set( 1, 1, 1 );
+    mask1.set( 1, 2, 1 );
+    mask1.set( 2, 0, 1 );
+    mask1.set( 2, 1, 1 );
+    mask1.set( 2, 2, 1 );
+
+    TEAGN_CHECK_EQUAL( mask1.get( 0, 0 ), 1., "Invalid value" );
+    TEAGN_CHECK_EQUAL( mask1.get( 0, 1 ), 1., "Invalid value" );
+    TEAGN_CHECK_EQUAL( mask1.get( 0, 2 ), 1., "Invalid value" );
+    TEAGN_CHECK_EQUAL( mask1.get( 1, 0 ), 1., "Invalid value" );
+    TEAGN_CHECK_EQUAL( mask1.get( 1, 1 ), 1., "Invalid value" );
+    TEAGN_CHECK_EQUAL( mask1.get( 1, 2 ), 1., "Invalid value" );
+    TEAGN_CHECK_EQUAL( mask1.get( 2, 0 ), 1., "Invalid value" );
+    TEAGN_CHECK_EQUAL( mask1.get( 2, 1 ), 1., "Invalid value" );
+    TEAGN_CHECK_EQUAL( mask1.get( 2, 2 ), 1., "Invalid value" );
+
+    unsigned int cols = mask1.columns();
+    TEAGN_CHECK_EQUAL( cols, 3, "Invalid columns number" );
+
+    /* Checking weights matrix creation */
+
+    double** wmatrix = mask1.getWeightsMatrix();
+
+    TEAGN_CHECK_EQUAL( wmatrix[ 0 ][ 0 ], 1., "Invalid value" );
+    TEAGN_CHECK_EQUAL( wmatrix[ 0 ][ 1 ], 1., "Invalid value" );
+    TEAGN_CHECK_EQUAL( wmatrix[ 0 ][ 2 ], 1., "Invalid value" );
+    TEAGN_CHECK_EQUAL( wmatrix[ 1 ][ 0 ], 1., "Invalid value" );
+    TEAGN_CHECK_EQUAL( wmatrix[ 1 ][ 1 ], 1., "Invalid value" );
+    TEAGN_CHECK_EQUAL( wmatrix[ 1 ][ 2 ], 1., "Invalid value" );
+    TEAGN_CHECK_EQUAL( wmatrix[ 2 ][ 0 ], 1., "Invalid value" );
+    TEAGN_CHECK_EQUAL( wmatrix[ 2 ][ 1 ], 1., "Invalid value" );
+    TEAGN_CHECK_EQUAL( wmatrix[ 2 ][ 2 ], 1., "Invalid value" );
+
+    TePDIFilterMask::deleteWeightsMatrix(
+      wmatrix, mask1.lines() );
+
+
+    /* Checking normalization procedure */
+
+    mask1.normalize();
+
+    TEAGN_CHECK_EPS(
+      mask1.get( 0, 0 ), 0.111111, 0.000001, "Invalid value" );
+    TEAGN_CHECK_EPS(
+      mask1.get( 0, 1 ), 0.111111, 0.000001, "Invalid value" );
+    TEAGN_CHECK_EPS(
+      mask1.get( 0, 2 ), 0.111111, 0.000001, "Invalid value" );
+    TEAGN_CHECK_EPS(
+      mask1.get( 1, 0 ), 0.111111, 0.000001, "Invalid value" );
+    TEAGN_CHECK_EPS(
+      mask1.get( 1, 1 ), 0.111111, 0.000001, "Invalid value" );
+    TEAGN_CHECK_EPS(
+      mask1.get( 1, 2 ), 0.111111, 0.000001, "Invalid value" );
+    TEAGN_CHECK_EPS(
+      mask1.get( 2, 0 ), 0.111111, 0.000001, "Invalid value" );
+    TEAGN_CHECK_EPS(
+      mask1.get( 2, 1 ), 0.111111, 0.000001, "Invalid value" );
+    TEAGN_CHECK_EPS(
+      mask1.get( 2, 2 ), 0.111111, 0.000001, "Invalid value" );
+
+    /* Checking pre-defined masks creation */
+
+    TePDIFilterMask::pointer Dummy_mask = TePDIFilterMask::create_Dummy();
+    //printMask( Dummy_mask );
+
+    TePDIFilterMask::pointer Avg3x3_mask = TePDIFilterMask::create_Avg3x3();
+    //printMask( Avg3x3_mask );
+
+    TePDIFilterMask::pointer Avg5x5_mask = TePDIFilterMask::create_Avg5x5();
+    //printMask( Avg5x5_mask );
+
+    TePDIFilterMask::pointer Avg7x7_mask = TePDIFilterMask::create_Avg7x7();
+    //printMask( Avg7x7_mask );
+
+    TePDIFilterMask::pointer S_mask = TePDIFilterMask::create_S();
+    //printMask( S_mask );
+
+    TePDIFilterMask::pointer N_mask = TePDIFilterMask::create_N();
+    //printMask( N_mask );
+
+    TePDIFilterMask::pointer E_mask = TePDIFilterMask::create_E();
+    //printMask( E_mask );
+
+    TePDIFilterMask::pointer W_mask = TePDIFilterMask::create_W();
+    //printMask( W_mask );
+
+    TePDIFilterMask::pointer NW_mask = TePDIFilterMask::create_NW();
+    //printMask( NW_mask );
+
+    TePDIFilterMask::pointer SW_mask = TePDIFilterMask::create_SW();
+    //printMask( SW_mask );
+
+    TePDIFilterMask::pointer NE_mask = TePDIFilterMask::create_NE();
+    //printMask( NE_mask );
+
+    TePDIFilterMask::pointer SE_mask = TePDIFilterMask::create_SE();
+    //printMask( SE_mask );
+
+    TePDIFilterMask::pointer SE_NDLow = TePDIFilterMask::create_NDLow();
+    //printMask( SE_NDLow );
+
+    TePDIFilterMask::pointer SE_NDMed = TePDIFilterMask::create_NDMed();
+    //printMask( SE_NDMed );
+
+    TePDIFilterMask::pointer SE_NDHigh = TePDIFilterMask::create_NDHigh();
+    //printMask( SE_NDHigh );
+
+    TePDIFilterMask::pointer SE_TMEnh = TePDIFilterMask::create_TMEnh();
+    //printMask( SE_TMEnh );
+
+    /* Checking morfological masks creation */
+
+    TePDIFilterMask::pointer MorfD = TePDIFilterMask::create_MorfD();
+    TEAGN_TRUE_OR_THROW( MorfD->isMorfMask(), "Invalid mask" );
+    TePDIFilterMask::pointer MorfE = TePDIFilterMask::create_MorfE();
+    TEAGN_TRUE_OR_THROW( MorfE->isMorfMask(), "Invalid mask" );
+    TePDIFilterMask::pointer MorfM = TePDIFilterMask::create_MorfM();
+    TEAGN_TRUE_OR_THROW( MorfM->isMorfMask(), "Invalid mask" );
+    TePDIFilterMask::pointer MorfM_ = TePDIFilterMask::create_MorfM_();
+    TEAGN_TRUE_OR_THROW( MorfM_->isMorfMask(), "Invalid mask" );
+    TePDIFilterMask::pointer MorfMPlus = TePDIFilterMask::create_MorfMPlus();
+    TEAGN_TRUE_OR_THROW( MorfMPlus->isMorfMask(), "Invalid mask" );
+    TePDIFilterMask::pointer MorfMtot = TePDIFilterMask::create_MorfMtot();
+    TEAGN_TRUE_OR_THROW( MorfMtot->isMorfMask(), "Invalid mask" );
+    TePDIFilterMask::pointer MorfMX = TePDIFilterMask::create_MorfMX();
+    TEAGN_TRUE_OR_THROW( MorfMX->isMorfMask(), "Invalid mask" );
+
+
+  }
+  catch( const TeException& excpt ){
+    TEAGN_LOGERR( excpt.message() )
+    return EXIT_FAILURE;
+  }
+
+  TEAGN_LOGMSG( "Test OK." );
+  return EXIT_SUCCESS;
+}
diff --git a/examples/image_processing/source/TePDIFilterMask/TePDIFilterMask_test.vcproj b/examples/image_processing/source/TePDIFilterMask/TePDIFilterMask_test.vcproj
new file mode 100755
index 0000000..6c4203e
--- /dev/null
+++ b/examples/image_processing/source/TePDIFilterMask/TePDIFilterMask_test.vcproj
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="TePDIFilterMask_test"
+	ProjectGUID="{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	RootNamespace="TePDIFilterMask_test"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="0">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../base;../../../../src/terralib/image_processing;../../../../src/terralib/kernel;../../../../src/tiff"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PDIAGN_ENABLE_STDOUT_LOG"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Debug/terralibpdi/terralibpdi.lib ../../../../Debug/terralib/terralib.lib ../../../../Debug/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Debug/libjpeg/libjpeg.lib ../../../../Debug/shapelib/shapelib.lib user32.lib $(NOINHERIT)"
+				OutputFile="$(OutDir)/TePDIFilterMask_test.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreAllDefaultLibraries="FALSE"
+				IgnoreDefaultLibraryNames="msvcrt.lib,libcmt.lib;libc.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"
+				TargetMachine="0"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="../../../../src/terralib/image_processing;../base;../../../../src/terralib/kernel;../../../../src/shapelib"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Release/terralibpdi/terralibpdi.lib ../../../../Release/terralib/terralib.lib ../../../../Release/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Release/libjpeg/libjpeg.lib ../../../../Release/shapelib/shapelib.lib"
+				OutputFile="$(OutDir)/TePDIFilterMask_test.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\TePDIFilterMask_test.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/image_processing/source/TePDIFusion/TePDIFusion.pro b/examples/image_processing/source/TePDIFusion/TePDIFusion.pro
new file mode 100755
index 0000000..b462247
--- /dev/null
+++ b/examples/image_processing/source/TePDIFusion/TePDIFusion.pro
@@ -0,0 +1,7 @@
+include( ../base/base.pro )
+
+SOURCES += \
+  TePDIFusion_test.cpp
+
+QMAKE_CLEAN += \
+  ../../bin/Fusion*.tif
\ No newline at end of file
diff --git a/examples/image_processing/source/TePDIFusion/TePDIFusion_test.cpp b/examples/image_processing/source/TePDIFusion/TePDIFusion_test.cpp
new file mode 100755
index 0000000..0626d37
--- /dev/null
+++ b/examples/image_processing/source/TePDIFusion/TePDIFusion_test.cpp
@@ -0,0 +1,215 @@
+#define TEAGN_ENABLE_STDOUT_LOG
+
+#include <TePDIExamplesBase.hpp>
+
+#include <TePDIFusion.hpp>
+
+#include <TePDIParameters.hpp>
+#include <TeAgnostic.h>
+#include <TePDIUtils.hpp>
+#include <TePDIPrincipalComponentsFusion.hpp>
+
+#include <TeInitRasterDecoders.h>
+#include <TeProgress.h>
+#include <TeStdIOProgress.h>
+#include <TeRasterParams.h> 
+
+#include <vector>
+
+void GarguetFusion_test()
+{
+  TePDIParameters params1;
+
+  /* Building rasters */
+
+  TePDITypes::TePDIRasterPtrType reference_raster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( reference_raster->init(), 
+    "Unable to init input_raster1" );
+    
+  TePDITypes::TePDIRasterPtrType lowres_raster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop_contraste_halfsampled.tif" ), 
+    'r' ) );
+  TEAGN_TRUE_OR_THROW( lowres_raster->init(), 
+    "Unable to init input_raster2" );    
+    
+  TePDITypes::TePDIRasterPtrType output_raster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( output_raster,
+    1, 1, 1, false, TeDOUBLE, 0 ), "output_raster Alloc error" );
+    
+  params1.SetParameter( "fusion_type" , std::string( "garguet" ) );
+  params1.SetParameter( "reference_raster" , reference_raster );
+  params1.SetParameter( "lowres_raster" , lowres_raster );
+  params1.SetParameter( "output_raster" , output_raster );
+  params1.SetParameter( "reference_raster_band" , 0 );
+  params1.SetParameter( "lowres_raster_band" , 0 );
+  
+  TePDIFusion fusion;
+  
+  TEAGN_TRUE_OR_THROW( fusion.Reset(params1), "Reset failed" );
+  
+  TEAGN_TRUE_OR_THROW( fusion.Apply(), "Apply error" );
+  
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( output_raster,
+    TEPDIEXAMPLESBINPATH "Fusion_Garguet_test.tif" ), "GeoTIF generation error" );
+}
+
+
+void VenturaFusion_test()
+{
+  TePDIParameters params1;
+
+  /* Building rasters */
+
+  TePDITypes::TePDIRasterPtrType reference_raster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( reference_raster->init(), 
+    "Unable to init input_raster1" );
+    
+  TePDITypes::TePDIRasterPtrType lowres_raster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop_contraste_halfsampled.tif" ), 
+    'r' ) );
+  TEAGN_TRUE_OR_THROW( lowres_raster->init(), 
+    "Unable to init input_raster2" );    
+    
+  TePDITypes::TePDIRasterPtrType output_raster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( output_raster,
+    1, 1, 1, false, TeDOUBLE, 0 ), "output_raster Alloc error" );
+    
+  params1.SetParameter( "fusion_type" , std::string( "ventura" ) );
+  params1.SetParameter( "reference_raster" , reference_raster );
+  params1.SetParameter( "lowres_raster" , lowres_raster );
+  params1.SetParameter( "output_raster" , output_raster );
+  params1.SetParameter( "reference_raster_band" , 0 );
+  params1.SetParameter( "lowres_raster_band" , 0 );
+  
+  TePDIFusion fusion;
+  
+  TEAGN_TRUE_OR_THROW( fusion.Reset(params1), "Reset failed" );
+  
+  TEAGN_TRUE_OR_THROW( fusion.Apply(), "Apply error" );
+  
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( output_raster,
+    TEPDIEXAMPLESBINPATH "Fusion_Ventura_test.tif" ), "GeoTIF generation error" );
+}
+
+
+void IHSFusion_test()
+{
+  /* Initializing the reference raster */
+
+  TePDITypes::TePDIRasterPtrType reference_raster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers2b_hrc_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( reference_raster->init(), 
+    "Unable to init input_raster1" );
+    
+  /* Initializing the rgb raster */
+  
+  TePDITypes::TePDIRasterPtrType rgb_raster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers2b_rgb342_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( rgb_raster->init(), 
+    "Unable to init input_raster1" );
+  
+  /* Building output raster */
+    
+  TePDITypes::TePDIRasterPtrType output_raster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( output_raster,
+    1, 1, 1, false, rgb_raster->params().dataType_[ 0 ], 0 ), "output_raster Alloc error" );
+    
+  /* Building algorithm parameters */
+    
+  TePDIParameters params1;
+    
+  params1.SetParameter( "fusion_type" , std::string( "ihs" ) );
+  params1.SetParameter( "reference_raster" , reference_raster );
+  params1.SetParameter( "lowres_raster" , rgb_raster );
+  params1.SetParameter( "output_raster" , output_raster );
+  params1.SetParameter( "reference_raster_band" , 0 );
+  
+  TePDIFusion fusion;
+  
+  TEAGN_TRUE_OR_THROW( fusion.Reset(params1), "Reset failed" );
+  
+  TEAGN_TRUE_OR_THROW( fusion.Apply(), "Apply error" );
+  
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( output_raster,
+    TEPDIEXAMPLESBINPATH "Fusion_IHS_test.tif" ), "GeoTIF generation error" );
+}
+
+
+void TePDIPrincipalComponentsFusion_test()
+{
+	TePDIParameters params;
+
+	TePDITypes::TePDIRasterVectorType input_rasters;
+	TePDITypes::TePDIRasterVectorType output_rasters;
+	std::vector<int> bands_direct;
+
+	for (unsigned int b = 0; b < 3; b++)
+	{
+		TePDITypes::TePDIRasterPtrType inRaster(new TeRaster(
+		  TEPDIEXAMPLESRESPATH "cbers_b2_crop_contraste_halfsampled.tif", 'r'));
+		TEAGN_TRUE_OR_THROW(inRaster->init(), "Unable to init inRaster " + 
+		  Te2String(b));
+		input_rasters.push_back(inRaster);
+
+		TePDITypes::TePDIRasterPtrType outRaster;
+		TEAGN_TRUE_OR_THROW(TePDIUtils::TeAllocRAMRaster(outRaster, 1, 1, 1, false, TeDOUBLE, 0), "RAM Raster " + Te2String(b+1) + " Alloc error");
+		output_rasters.push_back(outRaster);
+		
+		bands_direct.push_back(0);
+	}
+
+	TePDITypes::TePDIRasterPtrType reference_raster(new TeRaster(
+	  std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r'));
+	TEAGN_TRUE_OR_THROW(reference_raster->init(), "Unable to init reference_raster");
+
+	params.SetParameter("input_rasters", input_rasters);
+	params.SetParameter("bands", bands_direct);
+	params.SetParameter("output_rasters", output_rasters);
+	params.SetParameter("reference_raster", reference_raster);
+	params.SetParameter("reference_raster_band", 0);
+	params.SetParameter("resampling_type", 
+	  TePDIPrincipalComponentsFusion::NNMethod);
+	params.SetParameter("fit_histogram", false);
+	
+	TePDIPrincipalComponentsFusion pcf;
+	TEAGN_TRUE_OR_THROW(pcf.Reset(params), "Invalid Parameters");
+	TEAGN_TRUE_OR_THROW(pcf.Apply(), "Apply error");
+	
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( output_rasters[ 0 ],
+    TEPDIEXAMPLESBINPATH "Fusion_PC_test_output_b0.tif" ), 
+    "GeoTIF generation error" );
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( output_rasters[ 1 ],
+    TEPDIEXAMPLESBINPATH "Fusion_PC_test_output_b1.tif" ), 
+    "GeoTIF generation error" );
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( output_rasters[ 2 ],
+    TEPDIEXAMPLESBINPATH "Fusion_PC_test_output_b2.tif" ), 
+    "GeoTIF generation error" );        
+}
+
+
+int main()
+{
+  TEAGN_LOGMSG( "Test started." );
+
+  try{
+    TeInitRasterDecoders();
+    
+    TeStdIOProgress pi;
+    TeProgress::setProgressInterf( dynamic_cast< TeProgressBase* >( &pi ) );     
+
+    IHSFusion_test();
+    VenturaFusion_test();
+    GarguetFusion_test();
+    TePDIPrincipalComponentsFusion_test();
+  }
+  catch( const TeException& excpt ){
+    TEAGN_LOGERR( excpt.message() )
+    return EXIT_FAILURE;
+  }
+
+  TEAGN_LOGMSG( "Test OK." );
+  return EXIT_SUCCESS;
+}
+
diff --git a/examples/image_processing/source/TePDIFusion/TePDIFusion_test.vcproj b/examples/image_processing/source/TePDIFusion/TePDIFusion_test.vcproj
new file mode 100755
index 0000000..26de34b
--- /dev/null
+++ b/examples/image_processing/source/TePDIFusion/TePDIFusion_test.vcproj
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="TePDIFusion_test"
+	ProjectGUID="{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	RootNamespace="TePDIFusion_test"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="0">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../base;../../../../src/terralib/image_processing;../../../../src/terralib/kernel;../../../../src/tiff"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PDIAGN_ENABLE_STDOUT_LOG"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Debug/terralibpdi/terralibpdi.lib ../../../../Debug/terralib/terralib.lib ../../../../Debug/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Debug/libjpeg/libjpeg.lib ../../../../Debug/shapelib/shapelib.lib user32.lib $(NOINHERIT)"
+				OutputFile="$(OutDir)/TePDIFusion_test.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreAllDefaultLibraries="FALSE"
+				IgnoreDefaultLibraryNames="msvcrt.lib,libcmt.lib;libc.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"
+				TargetMachine="0"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="../../../../src/terralib/image_processing;../base;../../../../src/terralib/kernel;../../../../src/shapelib"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Release/terralibpdi/terralibpdi.lib ../../../../Release/terralib/terralib.lib ../../../../Release/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Release/libjpeg/libjpeg.lib ../../../../Release/shapelib/shapelib.lib"
+				OutputFile="$(OutDir)/TePDIFusion_test.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\TePDIFusion_test.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/image_processing/source/TePDIHaralick/TePDIHaralick.pro b/examples/image_processing/source/TePDIHaralick/TePDIHaralick.pro
new file mode 100755
index 0000000..1d41e9f
--- /dev/null
+++ b/examples/image_processing/source/TePDIHaralick/TePDIHaralick.pro
@@ -0,0 +1,5 @@
+include( ../base/base.pro )
+
+SOURCES += \
+  TePDIHaralick_test.cpp
+
diff --git a/examples/image_processing/source/TePDIHaralick/TePDIHaralick_test.cpp b/examples/image_processing/source/TePDIHaralick/TePDIHaralick_test.cpp
new file mode 100755
index 0000000..15196b0
--- /dev/null
+++ b/examples/image_processing/source/TePDIHaralick/TePDIHaralick_test.cpp
@@ -0,0 +1,106 @@
+#define TEAGN_ENABLE_STDOUT_LOG
+
+#include <TePDIExamplesBase.hpp>
+
+#include <TePDIHaralick.hpp>
+#include <TePDIParameters.hpp>
+#include <TeAgnostic.h>
+
+#include <TeInitRasterDecoders.h>
+#include <TeRaster.h>
+#include <TeProgress.h>
+#include <TeStdIOProgress.h>
+#include <TeBox.h>
+
+void numeric_test_with_polygonset()
+{
+  /* Building synthetic raster */
+  
+  TePDITypes::TePDIRasterPtrType input_raster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_raster->init(), "Unable to init inRaster" );
+  
+  TePDIParameters pars;
+  
+  pars.SetParameter( "input_raster", input_raster );
+  
+  /* Building a polygon set based on the raster bounding box */
+  
+  TeBox box = input_raster->params().boundingBox();
+  TePolygon pol = polygonFromBox( box );
+  TePDITypes::TePDIPolygonSetPtrType polset( new TePolygonSet );
+  polset->add( pol );
+  pars.SetParameter( "polygonset", polset );
+  
+  /* Starting algorithm */
+  
+  TePDIHaralick algoinstance( TePDIHaralick::East );    
+  double value = 0;
+
+  TEAGN_TRUE_OR_THROW( algoinstance.Reset( pars ), "Reset error" );
+  
+  TEAGN_TRUE_OR_THROW( algoinstance.getEntropy( 0, 0, value ), 
+    "Error generation value" )
+  TEAGN_CHECK_EPS( value, 5.314640, 0.00001, "Invalid value" );
+
+
+  TEAGN_TRUE_OR_THROW( algoinstance.getEnergy( 0, 0, value ), 
+    "Error generation value" )
+  TEAGN_CHECK_EPS( value, 0.007787, 0.00001, "Invalid value" );
+
+
+  TEAGN_TRUE_OR_THROW( algoinstance.getContrast( 0, 0, value ), 
+    "Error generation value" )
+  TEAGN_CHECK_EPS( value, 0.492876, 0.00001, "Invalid value" );
+
+
+  TEAGN_TRUE_OR_THROW( algoinstance.getHomogeneity( 0, 0, value ), 
+    "Error generation value" )
+  TEAGN_CHECK_EPS( value, 0.572850, 0.00001, "Invalid value" );
+
+
+  TEAGN_TRUE_OR_THROW( algoinstance.getQuiSquare( 0, 0, value ), 
+    "Error generation value" )
+  TEAGN_CHECK_EPS( value, 30.240689, 0.00001, "Invalid value" );
+  
+  TEAGN_TRUE_OR_THROW( algoinstance.getMean( 0, 0, value ), 
+    "Error generation value" )
+  TEAGN_CHECK_EPS( value, 0.000023, 0.00001, "Invalid value" );  
+  
+  TEAGN_TRUE_OR_THROW( algoinstance.getDissimilarity( 0, 0, value ), 
+    "Error generation value" )
+  TEAGN_CHECK_EPS( value, 1.163392, 0.00001, "Invalid value" );   
+  
+  TEAGN_TRUE_OR_THROW( algoinstance.getAngular2ndMoment( 0, 0, value ), 
+    "Error generation value" )
+  TEAGN_CHECK_EPS( value, 0.007787, 0.00001, "Invalid value" );   
+  
+  TEAGN_TRUE_OR_THROW( algoinstance.getStdDev( 0, 0, value ), 
+    "Error generation value" )
+  TEAGN_CHECK_EPS( value, 8.770714, 0.00001, "Invalid value" );   
+  
+}
+
+
+
+
+int main()
+{
+  TEAGN_LOGMSG( "Test started." );
+
+  try{
+    TeStdIOProgress pi;
+    TeProgress::setProgressInterf( dynamic_cast< TeProgressBase* >( &pi ) );
+      
+    TeInitRasterDecoders();
+
+    numeric_test_with_polygonset();
+  }
+  catch( const TeException& excpt ){
+    TEAGN_LOGERR( excpt.message() )
+    return EXIT_FAILURE;
+  }
+
+  TEAGN_LOGMSG( "Test OK." );
+  return EXIT_SUCCESS;
+}
diff --git a/examples/image_processing/source/TePDIHaralick/TePDIHaralick_test.vcproj b/examples/image_processing/source/TePDIHaralick/TePDIHaralick_test.vcproj
new file mode 100755
index 0000000..a15b55e
--- /dev/null
+++ b/examples/image_processing/source/TePDIHaralick/TePDIHaralick_test.vcproj
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="TePDIHaralick_test"
+	ProjectGUID="{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	RootNamespace="TePDIHaralick_test"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="0">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../base;../../../../src/terralib/image_processing;../../../../src/terralib/kernel;../../../../src/tiff"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PDIAGN_ENABLE_STDOUT_LOG"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Debug/terralibpdi/terralibpdi.lib ../../../../Debug/terralib/terralib.lib ../../../../Debug/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Debug/libjpeg/libjpeg.lib ../../../../Debug/shapelib/shapelib.lib user32.lib $(NOINHERIT)"
+				OutputFile="$(OutDir)/TePDIHaralick_test.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreAllDefaultLibraries="FALSE"
+				IgnoreDefaultLibraryNames="msvcrt.lib,libcmt.lib;libc.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"
+				TargetMachine="0"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="../../../../src/terralib/image_processing;../base;../../../../src/terralib/kernel;../../../../src/shapelib"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Release/terralibpdi/terralibpdi.lib ../../../../Release/terralib/terralib.lib ../../../../Release/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Release/libjpeg/libjpeg.lib ../../../../Release/shapelib/shapelib.lib"
+				OutputFile="$(OutDir)/TePDIHaralick_test.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\TePDIHaralick_test.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/image_processing/source/TePDIHistogram/TePDIHistogram.pro b/examples/image_processing/source/TePDIHistogram/TePDIHistogram.pro
new file mode 100755
index 0000000..aa8bb77
--- /dev/null
+++ b/examples/image_processing/source/TePDIHistogram/TePDIHistogram.pro
@@ -0,0 +1,4 @@
+include( ../base/base.pro )
+
+SOURCES += TePDIHistogram_test.cpp
+
diff --git a/examples/image_processing/source/TePDIHistogram/TePDIHistogram_test.cpp b/examples/image_processing/source/TePDIHistogram/TePDIHistogram_test.cpp
new file mode 100755
index 0000000..f3f2b12
--- /dev/null
+++ b/examples/image_processing/source/TePDIHistogram/TePDIHistogram_test.cpp
@@ -0,0 +1,1202 @@
+#define TEAGN_ENABLE_STDOUT_LOG
+
+#include <TePDIExamplesBase.hpp>
+
+#include <TePDIHistogram.hpp>
+
+#include <TePDIUtils.hpp>
+
+#include <TeAgnostic.h>
+
+#include <TeProgress.h>
+#include <TeStdIOProgress.h>
+
+
+
+#include <TeRaster.h>
+#include <TeDataTypes.h>
+#include <TeDecoderTIFF.h>
+#include <TeInitRasterDecoders.h>
+
+
+void display_histogram( TePDIHistogram& hist )
+{
+  TePDIHistogram::iterator it;
+  it = hist.begin();
+  
+  while( it != hist.end() ) {
+    TEAGN_LOGMSG( it->first );
+    TEAGN_LOGMSG( it->second );
+    ++it;
+  }
+}
+
+bool check_histogram_order( TePDIHistogram& hist )
+{
+  TePDIHistogram::iterator it1;
+  TePDIHistogram::iterator it2;
+  it1 = hist.begin();
+  it2 = it1;
+  ++it2;
+  
+  while( it2 != hist.end() ) {
+    if( (*it1) > (*it2) ) {
+      return false;
+    }
+    ++it1;
+    ++it2;
+  }
+  
+  return true;
+}
+
+void discrete_histogram_test_1()
+{
+    TePDITypes::TePDIRasterPtrType raster;
+    TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( raster, 1, 3, 1, false,
+      TeUNSIGNEDCHAR, 0 ), "Unable to create raster" );
+
+    raster->setElement( 0, 0, 1 );
+    raster->setElement( 0, 1, 2 );
+    raster->setElement( 0, 2, 3 );
+
+    TePDIHistogram hist;
+
+    TePDIHistogram::iterator it;
+
+    /* Test 1 */
+
+    TEAGN_TRUE_OR_THROW( hist.reset( raster, 0, 0, false, TeBoxPixelIn ),
+      "Unable to create histogram" );
+      
+    TEAGN_TRUE_OR_THROW( check_histogram_order( hist ),
+      "Histogram order error" );
+      
+    //display_histogram( hist );
+
+    TEAGN_TRUE_OR_THROW( ( hist.size() == 3 ), "Invalid histogram size" );
+    
+    TEAGN_CHECK_EPS( hist.getTotalCount(), 3, 0, "Invalid total count" );
+    
+    TEAGN_TRUE_OR_THROW( hist.IsDiscrete(), "Discrete verification error" );
+    TEAGN_TRUE_OR_THROW( hist.hasFixedStep(), "Step verification error" );
+
+    it = hist.begin();
+
+    TEAGN_CHECK_EQUAL( it->first, 1. , "" );
+    TEAGN_CHECK_EQUAL( it->second, 1 , "" );
+
+    ++it;
+    
+    TEAGN_CHECK_EQUAL( it->first, 2. , "" );
+    TEAGN_CHECK_EQUAL( it->second, 1 , "" );
+    
+    ++it;    
+
+    TEAGN_CHECK_EQUAL( it->first, 3. , "" );
+    TEAGN_CHECK_EQUAL( it->second, 1 , "" );
+    
+    TEAGN_CHECK_EQUAL( hist.GetMinLevel(), 1., "" );
+    TEAGN_CHECK_EQUAL( hist.GetMaxLevel(), 3., "" );
+
+    TEAGN_CHECK_EQUAL( hist.GetMinCount(), 1, "" );
+    TEAGN_CHECK_EQUAL( hist.GetMaxCount(), 1, "" );
+
+    it = hist.begin();
+    TePDIHistogram::iterator it_end = hist.end();
+    unsigned int pixelsnmb = 0;
+    while( it != it_end ) {
+      pixelsnmb += it->second;
+      ++it;
+    }
+    TEAGN_TRUE_OR_THROW( pixelsnmb == 3, "Invalid pixels number" );
+}
+
+void interpolated_histogram_test_1()
+{
+    TePDITypes::TePDIRasterPtrType raster;
+    TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( raster, 1, 3, 1, false,
+      TeDOUBLE, 0 ), "Unable to create raster" );
+
+    raster->setElement( 0, 0, 1 );
+    raster->setElement( 0, 1, 2 );
+    raster->setElement( 0, 2, 3 );
+
+    TePDIHistogram hist;
+
+    TePDIHistogram::iterator it;
+
+    /* Test 1 */
+
+    TEAGN_TRUE_OR_THROW( hist.reset( raster, 0, 0, false, TeBoxPixelIn ),
+      "Unable to create histogram" );
+      
+    TEAGN_TRUE_OR_THROW( check_histogram_order( hist ),
+      "Histogram order error" );
+      
+    //display_histogram( hist );
+
+    TEAGN_TRUE_OR_THROW( ( hist.size() == 3 ), "Invalid histogram size" );
+
+    TEAGN_CHECK_EPS( hist.getTotalCount(), 3, 0, "Invalid total count" );
+            
+    /* The histogram was generated from a float raster, but it
+       must be a discrete histogram since the step between levels
+       is an integer value ( 1.0 ) */
+    TEAGN_TRUE_OR_THROW( hist.IsDiscrete(), 
+      "Discrete verification error" );
+      
+    TEAGN_TRUE_OR_THROW( hist.hasFixedStep(), "Step verification error" );
+
+    it = hist.begin();
+
+    TEAGN_CHECK_EQUAL( it->first, 1. , "" );
+    TEAGN_CHECK_EQUAL( it->second, 1 , "" );
+
+    ++it;
+    
+    TEAGN_CHECK_EQUAL( it->first, 2. , "" );
+    TEAGN_CHECK_EQUAL( it->second, 1 , "" );
+    
+    ++it;    
+
+    TEAGN_CHECK_EQUAL( it->first, 3. , "" );
+    TEAGN_CHECK_EQUAL( it->second, 1 , "" );
+    
+    TEAGN_CHECK_EQUAL( hist.GetMinLevel(), 1., "" );
+    TEAGN_CHECK_EQUAL( hist.GetMaxLevel(), 3., "" );
+
+    TEAGN_CHECK_EQUAL( hist.GetMinCount(), 1, "" );
+    TEAGN_CHECK_EQUAL( hist.GetMaxCount(), 1, "" );
+
+    it = hist.begin();
+    TePDIHistogram::iterator it_end = hist.end();
+    unsigned int pixelsnmb = 0;
+    while( it != it_end ) {
+      pixelsnmb += it->second;
+      ++it;
+    }
+    TEAGN_TRUE_OR_THROW( pixelsnmb == 3, "Invalid pixels number" );
+}
+
+
+void discrete_histogram_test_2()
+{
+    TePDITypes::TePDIRasterPtrType raster;
+    TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( raster, 1, 3, 1, false,
+      TeUNSIGNEDCHAR, 0 ), "Unable to create raster" );
+
+    raster->setElement( 0, 0, 1 );
+    raster->setElement( 0, 1, 2 );
+    raster->setElement( 0, 2, 3 );
+
+    TePDIHistogram hist;
+
+    TePDIHistogram::iterator it;
+
+    /* Test 1 */
+
+    TEAGN_TRUE_OR_THROW( hist.reset( raster, 0, 0, true, TeBoxPixelIn ),
+      "Unable to create histogram" );
+      
+    TEAGN_TRUE_OR_THROW( check_histogram_order( hist ),
+      "Histogram order error" );
+      
+    //display_histogram( hist );
+
+    TEAGN_TRUE_OR_THROW( ( hist.size() == 4 ), "Invalid histogram size" );
+    
+    TEAGN_CHECK_EPS( hist.getTotalCount(), 3, 0, "Invalid total count" );    
+    
+    TEAGN_TRUE_OR_THROW( hist.IsDiscrete(), "Discrete verification error" );
+    TEAGN_TRUE_OR_THROW( hist.hasFixedStep(), "Step verification error" );
+
+    it = hist.begin();
+    
+    TEAGN_CHECK_EQUAL( it->first, 0. , "" );
+    TEAGN_CHECK_EQUAL( it->second, 0 , "" );
+
+    ++it;    
+
+    TEAGN_CHECK_EQUAL( it->first, 1. , "" );
+    TEAGN_CHECK_EQUAL( it->second, 1 , "" );
+
+    ++it;
+    
+    TEAGN_CHECK_EQUAL( it->first, 2. , "" );
+    TEAGN_CHECK_EQUAL( it->second, 1 , "" );
+    
+    ++it;    
+
+    TEAGN_CHECK_EQUAL( it->first, 3. , "" );
+    TEAGN_CHECK_EQUAL( it->second, 1 , "" );
+    
+    TEAGN_CHECK_EQUAL( hist.GetMinLevel(), 0., "" );
+    TEAGN_CHECK_EQUAL( hist.GetMaxLevel(), 3., "" );
+
+    TEAGN_CHECK_EQUAL( hist.GetMinCount(), 0, "" );
+    TEAGN_CHECK_EQUAL( hist.GetMaxCount(), 1, "" );
+    
+    it = hist.begin();
+    TePDIHistogram::iterator it_end = hist.end();
+    unsigned int pixelsnmb = 0;
+    while( it != it_end ) {
+      pixelsnmb += it->second;
+      ++it;
+    }
+    TEAGN_TRUE_OR_THROW( pixelsnmb == 3, "Invalid pixels number" );
+}
+
+
+void discrete_histogram_test_16bits()
+{
+    TePDITypes::TePDIRasterPtrType raster;
+    TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( raster, 1, 3, 1, false,
+      TeUNSIGNEDSHORT, 0 ), "Unable to create raster" );
+
+    raster->setElement( 0, 0, 1 );
+    raster->setElement( 0, 1, 2 );
+    raster->setElement( 0, 2, 3 );
+
+    TePDIHistogram hist;
+
+    TePDIHistogram::iterator it;
+
+    /* Test 1 */
+
+    TEAGN_TRUE_OR_THROW( hist.reset( raster, 0, 0, false, TeBoxPixelIn ),
+      "Unable to create histogram" );
+      
+    TEAGN_TRUE_OR_THROW( check_histogram_order( hist ),
+      "Histogram order error" );
+      
+    //display_histogram( hist );
+
+    TEAGN_TRUE_OR_THROW( ( hist.size() == 3 ), "Invalid histogram size" );
+    
+    TEAGN_CHECK_EPS( hist.getTotalCount(), 3, 0, "Invalid total count" );    
+    
+    TEAGN_TRUE_OR_THROW( hist.IsDiscrete(), "Discrete verification error" );
+    TEAGN_TRUE_OR_THROW( hist.hasFixedStep(), "Step verification error" );
+
+    it = hist.begin();
+
+    TEAGN_CHECK_EQUAL( it->first, 1. , "" );
+    TEAGN_CHECK_EQUAL( it->second, 1 , "" );
+
+    ++it;
+    
+    TEAGN_CHECK_EQUAL( it->first, 2. , "" );
+    TEAGN_CHECK_EQUAL( it->second, 1 , "" );
+    
+    ++it;    
+
+    TEAGN_CHECK_EQUAL( it->first, 3. , "" );
+    TEAGN_CHECK_EQUAL( it->second, 1 , "" );
+    
+    TEAGN_CHECK_EQUAL( hist.GetMinLevel(), 1., "" );
+    TEAGN_CHECK_EQUAL( hist.GetMaxLevel(), 3., "" );
+
+    TEAGN_CHECK_EQUAL( hist.GetMinCount(), 1, "" );
+    TEAGN_CHECK_EQUAL( hist.GetMaxCount(), 1, "" );
+
+    it = hist.begin();
+    TePDIHistogram::iterator it_end = hist.end();
+    unsigned int pixelsnmb = 0;
+    while( it != it_end ) {
+      pixelsnmb += it->second;
+      ++it;
+    }
+    TEAGN_TRUE_OR_THROW( pixelsnmb == 3, "Invalid pixels number" );
+}
+
+
+void normal_levels_test2()
+{
+    TePDITypes::TePDIRasterPtrType raster;
+    TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( raster, 1, 1, 2, false,
+      TeUNSIGNEDCHAR, 0 ), "Unable to create raster" );
+
+    raster->setElement( 0, 0, 1 );
+    raster->setElement( 1, 0, 2 );
+
+    TePDIHistogram hist;
+
+    TePDIHistogram::iterator it;
+
+    /* Test 1 */
+
+    TEAGN_TRUE_OR_THROW( hist.reset( raster, 0, 2, false, TeBoxPixelIn ),
+      "Unable to create histogram" );
+      
+    TEAGN_TRUE_OR_THROW( check_histogram_order( hist ),
+      "Histogram order error" );
+                
+    //display_histogram( hist );
+
+    TEAGN_TRUE_OR_THROW( ( hist.size() == 2 ), "Invalid histogram size" );
+    
+    TEAGN_CHECK_EPS( hist.getTotalCount(), 2, 0, "Invalid total count" );
+        
+    TEAGN_TRUE_OR_THROW( hist.hasFixedStep(), "Step verification error" );
+
+    it = hist.begin();
+
+    TEAGN_CHECK_EPS( it->first, 1., 0., "" );
+    TEAGN_CHECK_EPS( it->second, 1., 0., "" );
+
+    ++it;
+
+    TEAGN_CHECK_EPS( it->first, 2., 0., "" );
+    TEAGN_CHECK_EPS( it->second, 1., 0., "" );
+
+    TEAGN_CHECK_EPS( hist.GetMinLevel(), 1., 0, "" );
+    TEAGN_CHECK_EPS( hist.GetMaxLevel(), 2., 0, "" );
+
+    TEAGN_CHECK_EPS( hist.GetMinCount(), 1., 0, "" );
+    TEAGN_CHECK_EPS( hist.GetMaxCount(), 1., 0, "" );
+
+    it = hist.begin();
+    TePDIHistogram::iterator it_end = hist.end();
+    unsigned int pixelsnmb = 0;
+    while( it != it_end ) {
+      pixelsnmb += it->second;
+      ++it;
+    }
+    TEAGN_TRUE_OR_THROW( pixelsnmb == 2, "Invalid pixels number" );
+}
+
+
+void normal_levels_test3()
+{
+    TePDITypes::TePDIRasterPtrType raster;
+    TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( raster, 1, 1, 3, false,
+      TeUNSIGNEDCHAR, 0 ), "Unable to create raster" );
+
+    raster->setElement( 0, 0, 1 );
+    raster->setElement( 1, 0, 2 );
+    raster->setElement( 2, 0, 3 );
+
+    TePDIHistogram hist;
+
+    TePDIHistogram::iterator it;
+
+    /* Test 1 */
+
+    TEAGN_TRUE_OR_THROW( hist.reset( raster, 0, 3, false, TeBoxPixelIn ),
+      "Unable to create histogram" );
+      
+    TEAGN_TRUE_OR_THROW( check_histogram_order( hist ),
+      "Histogram order error" );      
+      
+    //display_histogram( hist );
+
+    TEAGN_TRUE_OR_THROW( ( hist.size() == 3 ), "Invalid histogram size" );
+    
+    TEAGN_CHECK_EPS( hist.getTotalCount(), 3, 0, "Invalid total count" );
+        
+    TEAGN_TRUE_OR_THROW( hist.hasFixedStep(), "Step verification error" );
+
+    it = hist.begin();
+
+    TEAGN_CHECK_EPS( it->first, 1., 0., "" );
+    TEAGN_CHECK_EPS( it->second, 1., 0., "" );
+
+    ++it;
+
+    TEAGN_CHECK_EPS( it->first, 2., 0., "" );
+    TEAGN_CHECK_EPS( it->second, 1., 0., "" );
+    
+    ++it;
+
+    TEAGN_CHECK_EPS( it->first, 3., 0., "" );
+    TEAGN_CHECK_EPS( it->second, 1., 0., "" );
+    
+
+    TEAGN_CHECK_EPS( hist.GetMinLevel(), 1., 0, "" );
+    TEAGN_CHECK_EPS( hist.GetMaxLevel(), 3., 0, "" );
+
+    TEAGN_CHECK_EPS( hist.GetMinCount(), 1., 0, "" );
+    TEAGN_CHECK_EPS( hist.GetMaxCount(), 1., 0, "" );
+
+    it = hist.begin();
+    TePDIHistogram::iterator it_end = hist.end();
+    unsigned int pixelsnmb = 0;
+    while( it != it_end ) {
+      pixelsnmb += it->second;
+      ++it;
+    }
+    TEAGN_TRUE_OR_THROW( pixelsnmb == 3, "Invalid pixels number" );
+}
+
+
+void normal_levels_test4()
+{
+    TePDITypes::TePDIRasterPtrType raster;
+    TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( raster, 1, 2, 2, false,
+      TeUNSIGNEDCHAR, 0 ), "Unable to create raster" );
+
+    raster->setElement( 0, 0, 1 );
+    raster->setElement( 1, 0, 2 );
+    raster->setElement( 0, 1, 3 );
+    raster->setElement( 1, 1, 4 );
+
+    TePDIHistogram hist;
+
+    TePDIHistogram::iterator it;
+
+    /* Test 1 */
+
+    TEAGN_TRUE_OR_THROW( hist.reset( raster, 0, 4, false, TeBoxPixelIn ),
+      "Unable to create histogram" );
+      
+    TEAGN_TRUE_OR_THROW( check_histogram_order( hist ),
+      "Histogram order error" );      
+      
+    //display_histogram( hist );
+
+    TEAGN_TRUE_OR_THROW( ( hist.size() == 4 ), "Invalid histogram size" );
+    
+    TEAGN_CHECK_EPS( hist.getTotalCount(), 4, 0, "Invalid total count" );
+        
+    TEAGN_TRUE_OR_THROW( hist.hasFixedStep(), "Step verification error" );
+
+    it = hist.begin();
+
+    TEAGN_CHECK_EPS( it->first, 1., 0., "" );
+    TEAGN_CHECK_EPS( it->second, 1., 0., "" );
+
+    ++it;
+
+    TEAGN_CHECK_EPS( it->first, 2., 0., "" );
+    TEAGN_CHECK_EPS( it->second, 1., 0., "" );
+
+    ++it;
+
+    TEAGN_CHECK_EPS( it->first, 3., 0., "" );
+    TEAGN_CHECK_EPS( it->second, 1., 0., "" );
+
+    ++it;
+
+    TEAGN_CHECK_EPS( it->first, 4., 0., "" );
+    TEAGN_CHECK_EPS( it->second, 1., 0., "" );
+
+    TEAGN_CHECK_EPS( hist.GetMinLevel(), 1., 0, "" );
+    TEAGN_CHECK_EPS( hist.GetMaxLevel(), 4., 0, "" );
+
+    TEAGN_CHECK_EPS( hist.GetMinCount(), 1., 0, "" );
+    TEAGN_CHECK_EPS( hist.GetMaxCount(), 1., 0, "" );
+
+    it = hist.begin();
+    TePDIHistogram::iterator it_end = hist.end();
+    unsigned int pixelsnmb = 0;
+    while( it != it_end ) {
+      pixelsnmb += it->second;
+      ++it;
+    }
+    TEAGN_TRUE_OR_THROW( pixelsnmb == 4, "Invalid pixels number" );
+}
+
+
+void auto_levels_test()
+{
+    TePDITypes::TePDIRasterPtrType raster;
+    TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( raster, 1, 2, 2, false,
+      TeUNSIGNEDCHAR, 0 ), "Unable to create raster" );
+
+    raster->setElement( 0, 0, 1 );
+    raster->setElement( 1, 0, 2 );
+    raster->setElement( 0, 1, 3 );
+    raster->setElement( 1, 1, 4 );
+
+    TePDIHistogram hist;
+
+    TePDIHistogram::iterator it;
+
+    TEAGN_TRUE_OR_THROW( hist.reset( raster, 0, 0, true, TeBoxPixelIn ),
+      "Unable to create histogram" );
+      
+    TEAGN_TRUE_OR_THROW( check_histogram_order( hist ),
+      "Histogram order error" );      
+
+    TEAGN_TRUE_OR_THROW( ( hist.size() == 5 ), "Invalid histogram size" );
+    
+    TEAGN_CHECK_EPS( hist.getTotalCount(), 4, 0, "Invalid total count" );
+        
+    TEAGN_TRUE_OR_THROW( hist.hasFixedStep(), "Step verification error" );
+
+    it = hist.begin();
+
+    TEAGN_CHECK_EPS( it->first, 0., 0., "" );
+    TEAGN_CHECK_EPS( it->second, 0., 0., "" );
+
+    ++it;
+
+    TEAGN_CHECK_EPS( it->first, 1., 0., "" );
+    TEAGN_CHECK_EPS( it->second, 1., 0., "" );
+
+    ++it;
+
+    TEAGN_CHECK_EPS( it->first, 2., 0., "" );
+    TEAGN_CHECK_EPS( it->second, 1., 0., "" );
+
+    ++it;
+
+    TEAGN_CHECK_EPS( it->first, 3., 0., "" );
+    TEAGN_CHECK_EPS( it->second, 1., 0., "" );
+
+    ++it;
+
+    TEAGN_CHECK_EPS( it->first, 4., 0., "" );
+    TEAGN_CHECK_EPS( it->second, 1., 0., "" );
+
+    TEAGN_CHECK_EPS( hist.GetMinLevel(), 0, 0, "" );
+    TEAGN_CHECK_EPS( hist.GetMaxLevel(), 4., 0, "" );
+
+    TEAGN_CHECK_EPS( hist.GetMinCount(), 0., 0, "" );
+    TEAGN_CHECK_EPS( hist.GetMaxCount(), 1., 0, "" );    
+
+    it = hist.begin();
+    TePDIHistogram::iterator it_end = hist.end();
+    unsigned int pixelsnmb = 0;
+    while( it != it_end ) {
+      pixelsnmb += it->second;
+      ++it;
+    }
+    TEAGN_TRUE_OR_THROW( pixelsnmb == 4, "Invalid pixels number" );
+}
+
+
+void zero_expansion_test()
+{
+    TePDITypes::TePDIRasterPtrType raster;
+    TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( raster, 1, 2, 2, false,
+      TeUNSIGNEDCHAR, 0 ), "Unable to create raster" );
+
+    raster->setElement( 0, 0, 1 );
+    raster->setElement( 1, 0, 2 );
+    raster->setElement( 0, 1, 3 );
+    raster->setElement( 1, 1, 4 );
+
+    TePDIHistogram hist;
+
+    TePDIHistogram::iterator it;
+    
+    /* Test 1 */
+
+    TEAGN_TRUE_OR_THROW( hist.reset( raster, 0, 4, true, TeBoxPixelIn ),
+      "Unable to create histogram" );
+      
+    TEAGN_TRUE_OR_THROW( check_histogram_order( hist ),
+      "Histogram order error" );
+      
+    //display_histogram( hist );
+    
+    TEAGN_TRUE_OR_THROW( ( hist.size() == 4 ), "Invalid histogram size" );
+    
+    TEAGN_CHECK_EPS( hist.getTotalCount(), 4, 0, "Invalid total count" );
+        
+    TEAGN_TRUE_OR_THROW( ( ! hist.hasFixedStep() ), 
+      "Step verification error" );
+
+    it = hist.begin();
+
+    TEAGN_CHECK_EPS( it->first, 0., 0., "" );
+    TEAGN_CHECK_EPS( it->second, 0., 0., "" );
+
+    ++it;
+
+    TEAGN_CHECK_EPS( it->first, 1.3333333, 0.000001, "" );
+    TEAGN_CHECK_EPS( it->second, 1., 0., "" );
+
+    ++it;
+
+    TEAGN_CHECK_EPS( it->first, 2.666666, 0.000001, "" );
+    TEAGN_CHECK_EPS( it->second, 2., 0., "" );
+
+    ++it;
+
+    TEAGN_CHECK_EPS( it->first, 4., 0., "" );
+    TEAGN_CHECK_EPS( it->second, 1., 0., "" );
+
+    TEAGN_CHECK_EPS( hist.GetMinLevel(), 0., 0, "" );
+    TEAGN_CHECK_EPS( hist.GetMaxLevel(), 4., 0, "" );
+
+    TEAGN_CHECK_EPS( hist.GetMinCount(), 0., 0, "" );
+    TEAGN_CHECK_EPS( hist.GetMaxCount(), 2., 0, "" );
+
+    it = hist.begin();
+    TePDIHistogram::iterator it_end = hist.end();
+    unsigned int pixelsnmb = 0;
+    while( it != it_end ) {
+      pixelsnmb += it->second;
+      ++it;
+    }
+    TEAGN_TRUE_OR_THROW( pixelsnmb == 4, "Invalid pixels number" );
+}
+
+
+
+void discretize_test()
+{
+    TePDITypes::TePDIRasterPtrType raster;
+    TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( raster, 1, 2, 2, false,
+      TeUNSIGNEDCHAR, 0 ), "Unable to create raster" );
+
+    raster->setElement( 0, 0, 1 );
+    raster->setElement( 1, 0, 2 );
+    raster->setElement( 0, 1, 3 );
+    raster->setElement( 1, 1, 4 );
+
+    TePDIHistogram hist;
+
+    TePDIHistogram::iterator it;
+
+    TEAGN_TRUE_OR_THROW( hist.reset( raster, 0, 6, false, TeBoxPixelIn ),
+      "Unable to create histogram" );
+      
+    TEAGN_TRUE_OR_THROW( check_histogram_order( hist ),
+      "Histogram order error" );            
+
+    TEAGN_TRUE_OR_THROW( ( hist.size() == 6 ), "Invalid histogram size" );
+    
+    TEAGN_CHECK_EPS( hist.getTotalCount(), 4, 0, "Invalid total count" );
+        
+    TEAGN_TRUE_OR_THROW( ( ! hist.hasFixedStep() ), 
+      "Step verification error" );
+    
+    //display_histogram( hist );
+
+    it = hist.begin();
+
+    TEAGN_CHECK_EPS( it->first, 1., 0., "" );
+    TEAGN_CHECK_EPS( it->second, 1., 0., "" );
+
+    ++it;
+
+    TEAGN_CHECK_EPS( it->first, 1.6, 0., "" );
+    TEAGN_CHECK_EPS( it->second, 0., 0., "" );
+
+    ++it;
+
+    TEAGN_CHECK_EPS( it->first, 2.2, 0., "" );
+    TEAGN_CHECK_EPS( it->second, 1., 0., "" );
+
+    ++it;
+
+    TEAGN_CHECK_EPS( it->first, 2.8, 0.0000001, "" );
+    TEAGN_CHECK_EPS( it->second, 1., 0., "" );
+
+    ++it;
+
+    TEAGN_CHECK_EPS( it->first, 3.4, 0.0000001, "" );
+    TEAGN_CHECK_EPS( it->second, 0., 0., "" );
+
+    ++it;
+
+    TEAGN_CHECK_EPS( it->first, 4.0, 0., "" );
+    TEAGN_CHECK_EPS( it->second, 1., 0., "" );
+
+
+    TEAGN_CHECK_EPS( hist.GetMinLevel(), 1., 0, "" );
+    TEAGN_CHECK_EPS( hist.GetMaxLevel(), 4., 0, "" );
+    
+    TEAGN_CHECK_EPS( hist.GetMinCount(), 0., 0, "" );
+    TEAGN_CHECK_EPS( hist.GetMaxCount(), 1., 0, "" );    
+
+    it = hist.begin();
+    TePDIHistogram::iterator it_end = hist.end();
+    unsigned int pixelsnmb = 0;
+    while( it != it_end ) {
+      pixelsnmb += it->second;
+      ++it;
+    }
+    TEAGN_TRUE_OR_THROW( pixelsnmb == 4, "Invalid pixels number" );
+
+
+    TEAGN_TRUE_OR_THROW( ! hist.IsDiscrete(),
+      "Discretize verification error" );
+    TEAGN_TRUE_OR_THROW( hist.Discretize(), "Unable to discretize" );
+    TEAGN_TRUE_OR_THROW( hist.IsDiscrete(), "Discretize verification error" );
+    
+    TEAGN_TRUE_OR_THROW( check_histogram_order( hist ),
+      "Histogram order error" );  
+    TEAGN_TRUE_OR_THROW( hist.hasFixedStep(), "Step verification error" );  
+    
+    //display_histogram( hist );
+
+    TEAGN_TRUE_OR_THROW( ( hist.size() == 4 ), "Invalid histogram size" );
+    
+    TEAGN_CHECK_EPS( hist.getTotalCount(), 4, 0, "Invalid total count" );
+
+    it = hist.begin();
+
+    TEAGN_CHECK_EPS( it->first, 1., 0., "" );
+    TEAGN_CHECK_EPS( it->second, 1., 0., "" );
+
+    ++it;
+
+    TEAGN_CHECK_EPS( it->first, 2., 0., "" );
+    TEAGN_CHECK_EPS( it->second, 1., 0., "" );
+
+    ++it;
+
+    TEAGN_CHECK_EPS( it->first, 3., 0., "" );
+    TEAGN_CHECK_EPS( it->second, 1., 0., "" );
+
+    ++it;
+
+    TEAGN_CHECK_EPS( it->first, 4., 0., "" );
+    TEAGN_CHECK_EPS( it->second, 1., 0., "" );
+
+    TEAGN_CHECK_EPS( hist.GetMinLevel(), 1., 0, "" );
+    TEAGN_CHECK_EPS( hist.GetMaxLevel(), 4., 0, "" );
+
+    TEAGN_CHECK_EPS( hist.GetMinCount(), 1., 0, "" );
+    TEAGN_CHECK_EPS( hist.GetMaxCount(), 1., 0, "" );
+
+    it = hist.begin();
+    it_end = hist.end();
+    pixelsnmb = 0;
+    while( it != it_end ) {
+      pixelsnmb += it->second;
+      ++it;
+    }
+    TEAGN_TRUE_OR_THROW( pixelsnmb == 4, "Invalid pixels number" );
+}
+
+
+void performance_test()
+{
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 
+    'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  
+  TePDIHistogram hist;
+
+  TEAGN_TRUE_OR_THROW( hist.reset( inRaster, 0, 0, true, TeBoxPixelIn ),
+    "Unable to create histogram" );
+    
+  TEAGN_TRUE_OR_THROW( check_histogram_order( hist ),
+    "Histogram order error" );    
+    
+  TEAGN_TRUE_OR_THROW( hist.size() == 256, "Invalid histogram size" );
+  
+  TEAGN_CHECK_EPS( hist.getTotalCount(), 720657, 0, "Invalid total count" );
+  
+  TEAGN_TRUE_OR_THROW( hist.hasFixedStep(), "Step verification error" );
+}
+
+
+void operator_equal_from_map_test()
+{
+  std::map< double, unsigned int > simple_map1;
+  simple_map1[ 0.0 ] = 1;
+  simple_map1[ 1.0 ] = 2;
+  simple_map1[ 2.0 ] = 3;
+  simple_map1[ 3.0 ] = 4;
+  
+  TePDIHistogram hist1;
+  hist1 = simple_map1;
+  
+  TEAGN_TRUE_OR_THROW( ( hist1.size() == 4 ), "Invalid histogram size" );
+  
+  TEAGN_CHECK_EPS( hist1.getTotalCount(), 10, 0, "Invalid total count" );
+  
+  TEAGN_TRUE_OR_THROW( check_histogram_order( hist1 ),
+    "Histogram order error" );
+  TEAGN_CHECK_EPS( hist1.GetMinLevel(), 0, 0, "" );
+  TEAGN_CHECK_EPS( hist1.GetMaxLevel(), 3, 0, "" );
+  TEAGN_CHECK_EPS( hist1.GetMinCount(), 1, 0, "" );
+  TEAGN_CHECK_EPS( hist1.GetMaxCount(), 4, 0, "" );  
+  TEAGN_TRUE_OR_THROW( hist1.hasFixedStep(), "Step verification error" );
+  
+  {
+    TePDIHistogram::iterator it = hist1.begin();
+
+    TEAGN_CHECK_EPS( it->first, 0., 0., "" );
+    TEAGN_CHECK_EPS( it->second, 1., 0., "" );
+
+    ++it;
+
+    TEAGN_CHECK_EPS( it->first, 1., 0., "" );
+    TEAGN_CHECK_EPS( it->second, 2., 0., "" );
+
+    ++it;
+
+    TEAGN_CHECK_EPS( it->first, 2., 0., "" );
+    TEAGN_CHECK_EPS( it->second, 3., 0., "" );
+
+    ++it;
+
+    TEAGN_CHECK_EPS( it->first, 3., 0., "" );
+    TEAGN_CHECK_EPS( it->second, 4., 0., "" );  
+  }
+  
+  /* Testing with external floating point levels map */
+  
+  std::map< double, unsigned int > simple_map2;
+  simple_map2[ 0.0 ] = 1;
+  simple_map2[ 1.1 ] = 2;
+  simple_map2[ 2.0 ] = 3;
+  simple_map2[ 3.0 ] = 4;
+  
+  TePDIHistogram hist2;
+  hist2 = simple_map2;
+  
+  //display_histogram( hist2 );
+  
+  TEAGN_TRUE_OR_THROW( ( hist2.size() == 4 ), "Invalid histogram size" );
+  
+  TEAGN_CHECK_EPS( hist2.getTotalCount(), 10, 0, "Invalid total count" );
+  
+  TEAGN_TRUE_OR_THROW( check_histogram_order( hist2 ),
+    "Histogram order error" );
+  TEAGN_CHECK_EPS( hist2.GetMinLevel(), 0, 0, "" );
+  TEAGN_CHECK_EPS( hist2.GetMaxLevel(), 3, 0, "" );
+  TEAGN_CHECK_EPS( hist2.GetMinCount(), 1, 0, "" );
+  TEAGN_CHECK_EPS( hist2.GetMaxCount(), 4, 0, "" );  
+  TEAGN_TRUE_OR_THROW( ( hist2.hasFixedStep() ), "Step verification error" );
+  
+  {
+    TePDIHistogram::iterator it = hist2.begin();
+
+    TEAGN_CHECK_EPS( it->first, 0., 0., "" );
+    TEAGN_CHECK_EPS( it->second, 1., 0., "" );
+
+    ++it;
+
+    TEAGN_CHECK_EPS( it->first, 1., 0., "" );
+    TEAGN_CHECK_EPS( it->second, 2., 0., "" );
+
+    ++it;
+
+    TEAGN_CHECK_EPS( it->first, 2., 0., "" );
+    TEAGN_CHECK_EPS( it->second, 3., 0., "" );
+
+    ++it;
+
+    TEAGN_CHECK_EPS( it->first, 3., 0., "" );
+    TEAGN_CHECK_EPS( it->second, 4., 0., "" );  
+  }  
+}
+
+
+void histogram_from_TeCHAR_test()
+{
+    TePDITypes::TePDIRasterPtrType raster;
+    TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( raster, 1, 3, 1, false,
+      TeCHAR, 0 ), "Unable to create raster" );
+
+    raster->setElement( 0, 0, -1 );
+    raster->setElement( 0, 1, 0 );
+    raster->setElement( 0, 2, 1 );
+
+    TePDIHistogram hist;
+
+    TePDIHistogram::iterator it;
+
+    /* Test 1 */
+
+    TEAGN_TRUE_OR_THROW( hist.reset( raster, 0, 0, false, TeBoxPixelIn ),
+      "Unable to create histogram" );
+      
+    TEAGN_TRUE_OR_THROW( check_histogram_order( hist ),
+      "Histogram order error" );
+      
+    //display_histogram( hist );
+      
+    TEAGN_TRUE_OR_THROW( ( hist.size() == 3 ), "Invalid histogram size" );
+    
+    TEAGN_CHECK_EPS( hist.getTotalCount(), 3, 0, "Invalid total count" );    
+    
+    it = hist.begin();
+
+    TEAGN_CHECK_EQUAL( it->first, -1. , "" );
+    TEAGN_CHECK_EQUAL( it->second, 1 , "" );
+
+    ++it;
+    
+    TEAGN_CHECK_EQUAL( it->first, 0. , "" );
+    TEAGN_CHECK_EQUAL( it->second, 1 , "" );
+    
+    ++it;    
+
+    TEAGN_CHECK_EQUAL( it->first, 1. , "" );
+    TEAGN_CHECK_EQUAL( it->second, 1 , "" );
+    
+    TEAGN_TRUE_OR_THROW( hist.IsDiscrete(), "Discrete verification error" );
+    TEAGN_TRUE_OR_THROW( hist.hasFixedStep(), "Step verification error" );    
+    
+    TEAGN_CHECK_EQUAL( hist.GetMinLevel(), -1., "" );
+    TEAGN_CHECK_EQUAL( hist.GetMaxLevel(), 1., "" );
+
+    TEAGN_CHECK_EQUAL( hist.GetMinCount(), 1, "" );
+    TEAGN_CHECK_EQUAL( hist.GetMaxCount(), 1, "" );
+
+    it = hist.begin();
+    TePDIHistogram::iterator it_end = hist.end();
+    unsigned int pixelsnmb = 0;
+    while( it != it_end ) {
+      pixelsnmb += it->second;
+      ++it;
+    }
+    TEAGN_TRUE_OR_THROW( pixelsnmb == 3, "Invalid pixels number" );
+}
+
+
+void histogram_from_TeSHORT_test()
+{
+    TePDITypes::TePDIRasterPtrType raster;
+    TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( raster, 1, 3, 1, false,
+      TeSHORT, 0 ), "Unable to create raster" );
+
+    raster->setElement( 0, 0, -1 );
+    raster->setElement( 0, 1, 0 );
+    raster->setElement( 0, 2, 1 );
+
+    TePDIHistogram hist;
+
+    TePDIHistogram::iterator it;
+
+    /* Test 1 */
+
+    TEAGN_TRUE_OR_THROW( hist.reset( raster, 0, 0, false, TeBoxPixelIn ),
+      "Unable to create histogram" );
+      
+    TEAGN_TRUE_OR_THROW( check_histogram_order( hist ),
+      "Histogram order error" );
+      
+    //display_histogram( hist );
+
+    TEAGN_TRUE_OR_THROW( ( hist.size() == 3 ), "Invalid histogram size" );
+    
+    TEAGN_CHECK_EPS( hist.getTotalCount(), 3, 0, "Invalid total count" );    
+    
+    it = hist.begin();
+
+    TEAGN_CHECK_EQUAL( it->first, -1. , "" );
+    TEAGN_CHECK_EQUAL( it->second, 1 , "" );
+
+    ++it;
+    
+    TEAGN_CHECK_EQUAL( it->first, 0. , "" );
+    TEAGN_CHECK_EQUAL( it->second, 1 , "" );
+    
+    ++it;    
+
+    TEAGN_CHECK_EQUAL( it->first, 1. , "" );
+    TEAGN_CHECK_EQUAL( it->second, 1 , "" );
+    
+    TEAGN_TRUE_OR_THROW( hist.IsDiscrete(), "Discrete verification error" );
+    TEAGN_TRUE_OR_THROW( hist.hasFixedStep(), "Step verification error" );    
+    
+    TEAGN_CHECK_EQUAL( hist.GetMinLevel(), -1., "" );
+    TEAGN_CHECK_EQUAL( hist.GetMaxLevel(), 1., "" );
+
+    TEAGN_CHECK_EQUAL( hist.GetMinCount(), 1, "" );
+    TEAGN_CHECK_EQUAL( hist.GetMaxCount(), 1, "" );
+
+    it = hist.begin();
+    TePDIHistogram::iterator it_end = hist.end();
+    unsigned int pixelsnmb = 0;
+    while( it != it_end ) {
+      pixelsnmb += it->second;
+      ++it;
+    }
+    TEAGN_TRUE_OR_THROW( pixelsnmb == 3, "Invalid pixels number" );
+}
+
+
+void discrete_histogram_with_external_polygonset_test()
+{
+    TePDITypes::TePDIRasterPtrType raster;
+    TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( raster, 1, 3, 1, false,
+      TeUNSIGNEDCHAR, 0 ), "Unable to create raster" );
+
+    raster->setElement( 0, 0, 1 );
+    raster->setElement( 0, 1, 2 );
+    raster->setElement( 0, 2, 3 );
+
+    TePDIHistogram hist;
+
+    TePDIHistogram::iterator it;
+    
+    /* Creating polygon set from raster box */
+    
+    TeSharedPtr< TePolygonSet > polsetptr( new TePolygonSet );
+    TeBox rasterbox( raster->params().boundingBox() );
+    polsetptr->add( polygonFromBox( rasterbox ) );    
+
+    /* Test 1 */
+
+    TEAGN_TRUE_OR_THROW( hist.reset( raster, 0, 0, false, 
+      TeBoxPixelIn, polsetptr ),
+      "Unable to create histogram" );
+      
+    TEAGN_TRUE_OR_THROW( check_histogram_order( hist ),
+      "Histogram order error" );
+      
+    //display_histogram( hist );
+
+    TEAGN_TRUE_OR_THROW( ( hist.size() == 3 ), "Invalid histogram size" );
+    
+    TEAGN_CHECK_EPS( hist.getTotalCount(), 3, 0, "Invalid total count" );    
+    
+    TEAGN_TRUE_OR_THROW( hist.IsDiscrete(), "Discrete verification error" );
+    TEAGN_TRUE_OR_THROW( hist.hasFixedStep(), "Step verification error" );
+
+    it = hist.begin();
+
+    TEAGN_CHECK_EQUAL( it->first, 1. , "" );
+    TEAGN_CHECK_EQUAL( it->second, 1 , "" );
+
+    ++it;
+    
+    TEAGN_CHECK_EQUAL( it->first, 2. , "" );
+    TEAGN_CHECK_EQUAL( it->second, 1 , "" );
+    
+    ++it;    
+
+    TEAGN_CHECK_EQUAL( it->first, 3. , "" );
+    TEAGN_CHECK_EQUAL( it->second, 1 , "" );
+    
+    TEAGN_CHECK_EQUAL( hist.GetMinLevel(), 1., "" );
+    TEAGN_CHECK_EQUAL( hist.GetMaxLevel(), 3., "" );
+
+    TEAGN_CHECK_EQUAL( hist.GetMinCount(), 1, "" );
+    TEAGN_CHECK_EQUAL( hist.GetMaxCount(), 1, "" );
+
+    it = hist.begin();
+    TePDIHistogram::iterator it_end = hist.end();
+    unsigned int pixelsnmb = 0;
+    while( it != it_end ) {
+      pixelsnmb += it->second;
+      ++it;
+    }
+    TEAGN_TRUE_OR_THROW( pixelsnmb == 3, "Invalid pixels number" );
+}
+
+void palette_based_histogram_test()
+{
+  /* Building palette based raster */
+  
+  TeRasterParams params;
+  params.setNLinesNColumns( 3, 1 );
+  params.nBands( 1 );
+  params.setDataType( TeUNSIGNEDCHAR );
+  params.setPhotometric( TeRasterParams::TePallete, -1 );
+  params.lutr_.push_back( 1 );
+  params.lutr_.push_back( 2 );
+  params.lutr_.push_back( 4 );
+
+  TePDITypes::TePDIRasterPtrType raster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( raster, params,
+    TePDIUtils::TePDIUtilsAutoMemPol ), "Unable to create raster" );
+
+  TEAGN_TRUE_OR_THROW( raster->setElement( 0, 0, 0 ), "setElement error" );
+  TEAGN_TRUE_OR_THROW( raster->setElement( 0, 1, 1 ), "setElement error" );
+  TEAGN_TRUE_OR_THROW( raster->setElement( 0, 2, 2 ), "setElement error" );
+
+  TePDIHistogram hist;
+
+  TePDIHistogram::iterator it;
+
+  /* Test 1 */
+
+  TEAGN_TRUE_OR_THROW( hist.reset( raster, 0, 0, true, 
+    TeBoxPixelIn ),
+    "Unable to create histogram" );
+    
+  TEAGN_TRUE_OR_THROW( check_histogram_order( hist ),
+    "Histogram order error" );
+    
+  //display_histogram( hist );
+
+  TEAGN_TRUE_OR_THROW( ( hist.size() == 5 ), "Invalid histogram size" );
+  
+  TEAGN_CHECK_EPS( hist.getTotalCount(), 3, 0, "Invalid total count" );
+  
+  TEAGN_TRUE_OR_THROW( hist.IsDiscrete(), "Discrete verification error" );
+  TEAGN_TRUE_OR_THROW( hist.hasFixedStep(), "Step verification error" );
+
+  it = hist.begin();
+
+  TEAGN_CHECK_EQUAL( it->first, 0. , "" );
+  TEAGN_CHECK_EQUAL( it->second, 0 , "" );
+
+  ++it;
+  
+  TEAGN_CHECK_EQUAL( it->first, 1. , "" );
+  TEAGN_CHECK_EQUAL( it->second, 1 , "" );
+  
+  ++it;    
+
+  TEAGN_CHECK_EQUAL( it->first, 2. , "" );
+  TEAGN_CHECK_EQUAL( it->second, 1 , "" );
+  
+  ++it;    
+
+  TEAGN_CHECK_EQUAL( it->first, 3. , "" );
+  TEAGN_CHECK_EQUAL( it->second, 0 , "" );
+
+  ++it;    
+
+  TEAGN_CHECK_EQUAL( it->first, 4. , "" );
+  TEAGN_CHECK_EQUAL( it->second, 1 , "" );
+    
+  
+  TEAGN_CHECK_EQUAL( hist.GetMinLevel(), 0., "" );
+  TEAGN_CHECK_EQUAL( hist.GetMaxLevel(), 4., "" );
+
+  TEAGN_CHECK_EQUAL( hist.GetMinCount(), 0, "" );
+  TEAGN_CHECK_EQUAL( hist.GetMaxCount(), 1, "" );
+
+  it = hist.begin();
+  TePDIHistogram::iterator it_end = hist.end();
+  unsigned int pixelsnmb = 0;
+  while( it != it_end ) {
+    pixelsnmb += it->second;
+    ++it;
+  }
+  TEAGN_TRUE_OR_THROW( pixelsnmb == 3, "Invalid pixels number" );
+}
+
+
+int main()
+{
+  TEAGN_LOGMSG( "Test started." );
+
+  try{
+    TeInitRasterDecoders();
+  
+    TeStdIOProgress pi;
+    TeProgress::setProgressInterf( dynamic_cast< TeProgressBase* >( &pi ) ); 
+    
+    discrete_histogram_test_1();
+    discrete_histogram_test_2();
+    discrete_histogram_test_16bits();
+    interpolated_histogram_test_1();
+    normal_levels_test2();
+    normal_levels_test3();
+    normal_levels_test4();
+    auto_levels_test();
+    zero_expansion_test();
+    discretize_test();
+    performance_test();
+    operator_equal_from_map_test();
+    histogram_from_TeCHAR_test();
+    histogram_from_TeSHORT_test();
+    discrete_histogram_with_external_polygonset_test();
+    palette_based_histogram_test();
+  }
+  catch( const TeException& excpt ){
+    TEAGN_LOGERR( excpt.message() )
+    return EXIT_FAILURE;
+  }
+
+  TEAGN_LOGMSG( "Test OK." );
+  return EXIT_SUCCESS;
+}
+
diff --git a/examples/image_processing/source/TePDIHistogram/TePDIHistogram_test.vcproj b/examples/image_processing/source/TePDIHistogram/TePDIHistogram_test.vcproj
new file mode 100755
index 0000000..067b715
--- /dev/null
+++ b/examples/image_processing/source/TePDIHistogram/TePDIHistogram_test.vcproj
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="TePDIHistogram_test"
+	ProjectGUID="{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	RootNamespace="TePDIHistogram_test"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="0">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../base;../../../../src/terralib/image_processing;../../../../src/terralib/kernel;../../../../src/tiff"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PDIAGN_ENABLE_STDOUT_LOG"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Debug/terralibpdi/terralibpdi.lib ../../../../Debug/terralib/terralib.lib ../../../../Debug/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Debug/libjpeg/libjpeg.lib ../../../../Debug/shapelib/shapelib.lib user32.lib $(NOINHERIT)"
+				OutputFile="$(OutDir)/TePDIHistogram_test.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreAllDefaultLibraries="FALSE"
+				IgnoreDefaultLibraryNames="msvcrt.lib,libcmt.lib;libc.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"
+				TargetMachine="0"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="../../../../src/terralib/image_processing;../base;../../../../src/terralib/kernel;../../../../src/tiff;../../../../src/shapelib"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Release/terralibpdi/terralibpdi.lib ../../../../Release/terralib/terralib.lib ../../../../Release/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Release/libjpeg/libjpeg.lib ../../../../Release/shapelib/shapelib.lib"
+				OutputFile="$(OutDir)/TePDIHistogram_test.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\TePDIHistogram_test.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/image_processing/source/TePDIInterpolator/TePDIInterpolator.pro b/examples/image_processing/source/TePDIInterpolator/TePDIInterpolator.pro
new file mode 100755
index 0000000..8aeef48
--- /dev/null
+++ b/examples/image_processing/source/TePDIInterpolator/TePDIInterpolator.pro
@@ -0,0 +1,6 @@
+include( ../base/base.pro )
+
+SOURCES += \
+  TePDIInterpolator_test.cpp
+
+QMAKE_CLEAN += 
\ No newline at end of file
diff --git a/examples/image_processing/source/TePDIInterpolator/TePDIInterpolator_test.cpp b/examples/image_processing/source/TePDIInterpolator/TePDIInterpolator_test.cpp
new file mode 100755
index 0000000..e1e4eaf
--- /dev/null
+++ b/examples/image_processing/source/TePDIInterpolator/TePDIInterpolator_test.cpp
@@ -0,0 +1,160 @@
+#define TEAGN_ENABLE_STDOUT_LOG
+
+#include <TePDIInterpolator.hpp>
+
+#include <TeAgnostic.h>
+#include <TePDITypes.hpp>
+#include <TePDIUtils.hpp>
+
+#include <TeInitRasterDecoders.h>
+
+void NN_test()
+{
+  TePDITypes::TePDIRasterPtrType input_raster;
+  
+  TeRasterParams params;
+  params.nBands( 1 );
+  params.nlines_ = 2;
+  params.ncols_ = 2;
+  params.setDataType( TeDOUBLE, -1 );
+    
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( input_raster,
+    params, false ), "Allocation error" );
+    
+  TEAGN_TRUE_OR_THROW( input_raster->setElement( 0, 0, 1.0, 0 ), 
+    "error defining raster element");
+  TEAGN_TRUE_OR_THROW( input_raster->setElement( 1, 0, 2.0, 0 ), 
+    "error defining raster element");
+  TEAGN_TRUE_OR_THROW( input_raster->setElement( 0, 1, 3.0, 0 ), 
+    "error defining raster element");
+  TEAGN_TRUE_OR_THROW( input_raster->setElement( 1, 1, 4.0, 0 ), 
+    "error defining raster element");
+    
+  TePDIInterpolator interp;
+  
+  TEAGN_TRUE_OR_THROW( interp.reset( input_raster, 
+    TePDIInterpolator::NNMethod, 0 ), "Reset error" );
+    
+  double value = 0;
+    
+  interp.interpolate( 0, 0, 0, value );
+  TEAGN_CHECK_EPS( 1.0, value , 0.000001, "");
+  interp.interpolate( 0, 1, 0, value );
+  TEAGN_CHECK_EPS( 2.0, value , 0.000001, "");
+  interp.interpolate( 1, 0, 0, value );
+  TEAGN_CHECK_EPS( 3.0, value , 0.000001, "");
+  interp.interpolate( 1, 1, 0, value );
+  TEAGN_CHECK_EPS( 4.0, value , 0.000001, "");
+  
+  interp.interpolate( 0.2, 0.2, 0, value );
+  TEAGN_CHECK_EPS( 1.0, value , 0.000001, "");  
+  interp.interpolate( 0.7, 0.7, 0, value );
+  TEAGN_CHECK_EPS( 4.0, value , 0.000001, "");  
+}
+
+
+void bilinear_test()
+{
+  TePDITypes::TePDIRasterPtrType input_raster;
+  
+  TeRasterParams params;
+  params.nBands( 1 );
+  params.nlines_ = 2;
+  params.ncols_ = 2;
+  params.setDataType( TeDOUBLE, -1 );
+    
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( input_raster,
+    params, false ), "Allocation error" );
+    
+  TEAGN_TRUE_OR_THROW( input_raster->setElement( 0, 0, 1.0, 0 ), 
+    "error defining raster element");
+  TEAGN_TRUE_OR_THROW( input_raster->setElement( 1, 0, 2.0, 0 ), 
+    "error defining raster element");
+  TEAGN_TRUE_OR_THROW( input_raster->setElement( 0, 1, 3.0, 0 ), 
+    "error defining raster element");
+  TEAGN_TRUE_OR_THROW( input_raster->setElement( 1, 1, 4.0, 0 ), 
+    "error defining raster element");
+    
+  TePDIInterpolator interp;
+  
+  TEAGN_TRUE_OR_THROW( interp.reset( input_raster, 
+    TePDIInterpolator::BilinearMethod, 0 ), "Reset error" );
+    
+  double value = 0;
+    
+  interp.interpolate( 0, 0, 0, value );
+  TEAGN_CHECK_EPS( 1.0, value , 0.000001, "");
+  interp.interpolate( 0, 1, 0, value );
+  TEAGN_CHECK_EPS( 2.0, value , 0.000001, "");
+  interp.interpolate( 1, 0, 0, value );
+  TEAGN_CHECK_EPS( 3.0, value , 0.000001, "");
+  interp.interpolate( 1, 1, 0, value );
+  TEAGN_CHECK_EPS( 4.0, value , 0.000001, "");
+  
+  interp.interpolate( 0.5, 0.5, 0, value );
+  TEAGN_CHECK_EPS( 2.5, value , 0.000001, "");  
+}
+
+
+void bicubic_test()
+{
+  TePDITypes::TePDIRasterPtrType input_raster;
+  
+  TeRasterParams params;
+  params.nBands( 1 );
+  params.nlines_ = 4;
+  params.ncols_ = 4;
+  params.setDataType( TeDOUBLE, -1 );
+    
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( input_raster,
+    params, false ), "Allocation error" );
+    
+  unsigned int line = 0;
+  unsigned int col = 0;  
+  
+  for( line = 0 ; line < 4 ; ++line ) {
+    for( col = 0 ; col < 4 ; ++col ) {
+      TEAGN_TRUE_OR_THROW( input_raster->setElement( col, line, 1.0, 0 ), 
+      "error defining raster element");  
+    }
+  }
+    
+  TePDIInterpolator interp;
+  
+  TEAGN_TRUE_OR_THROW( interp.reset( input_raster, 
+    TePDIInterpolator::BicubicMethod, 0 ), "Reset error" );
+    
+  double value = 0;
+  
+  for( line = 0 ; line < 4 ; ++line ) {
+    for( col = 0 ; col < 4 ; ++col ) {
+      interp.interpolate( (double)line, (double)col, 0, value );
+      TEAGN_CHECK_EPS( 1.0, value , 0.000001, "");
+    }
+  }  
+  
+  interp.interpolate( 1.5, 1.5, 0, value );
+  TEAGN_CHECK_EPS( 1.0, value , 0.000001, "");  
+}
+
+
+int main()
+{
+  TEAGN_LOGMSG( "Test started." );
+
+  try{
+    TeInitRasterDecoders();
+
+    NN_test();
+    bilinear_test();
+    bicubic_test();
+  }
+  catch( const TeException& excpt ){
+    TEAGN_LOGERR( excpt.message() )
+    return EXIT_FAILURE;
+  }
+
+  TEAGN_LOGMSG( "Test OK." );
+  return EXIT_SUCCESS;
+}
+
diff --git a/examples/image_processing/source/TePDIInterpolator/TePDIInterpolator_test.vcproj b/examples/image_processing/source/TePDIInterpolator/TePDIInterpolator_test.vcproj
new file mode 100755
index 0000000..0b1845e
--- /dev/null
+++ b/examples/image_processing/source/TePDIInterpolator/TePDIInterpolator_test.vcproj
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="TePDIInterpolator_test"
+	ProjectGUID="{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	RootNamespace="TePDIInterpolator_test"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="0">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../base;../../../../src/terralib/image_processing;../../../../src/terralib/kernel;../../../../src/tiff"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PDIAGN_ENABLE_STDOUT_LOG"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Debug/terralibpdi/terralibpdi.lib ../../../../Debug/terralib/terralib.lib ../../../../Debug/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Debug/libjpeg/libjpeg.lib ../../../../Debug/shapelib/shapelib.lib user32.lib $(NOINHERIT)"
+				OutputFile="$(OutDir)/TePDIInterpolator_test.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreAllDefaultLibraries="FALSE"
+				IgnoreDefaultLibraryNames="msvcrt.lib,libcmt.lib;libc.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"
+				TargetMachine="0"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="../../../../src/terralib/image_processing;../base;../../../../src/terralib/kernel;../../../../src/shapelib"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Release/terralibpdi/terralibpdi.lib ../../../../Release/terralib/terralib.lib ../../../../Release/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Release/libjpeg/libjpeg.lib ../../../../Release/shapelib/shapelib.lib"
+				OutputFile="$(OutDir)/TePDIInterpolator_test.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\TePDIInterpolator_test.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/image_processing/source/TePDIJointHistogram/TePDIJointHistogram.pro b/examples/image_processing/source/TePDIJointHistogram/TePDIJointHistogram.pro
new file mode 100755
index 0000000..d02b7a9
--- /dev/null
+++ b/examples/image_processing/source/TePDIJointHistogram/TePDIJointHistogram.pro
@@ -0,0 +1,4 @@
+include( ../base/base.pro )
+
+SOURCES += TePDIJointHistogram_test.cpp
+
diff --git a/examples/image_processing/source/TePDIJointHistogram/TePDIJointHistogram_test.cpp b/examples/image_processing/source/TePDIJointHistogram/TePDIJointHistogram_test.cpp
new file mode 100755
index 0000000..af18586
--- /dev/null
+++ b/examples/image_processing/source/TePDIJointHistogram/TePDIJointHistogram_test.cpp
@@ -0,0 +1,378 @@
+#define TEAGN_ENABLE_STDOUT_LOG
+
+#include <TePDIExamplesBase.hpp>
+
+#include <TePDIJointHistogram.hpp>
+#include <TePDIHistogram.hpp>
+
+#include <TePDIUtils.hpp>
+
+#include <TeAgnostic.h>
+
+#include <TeProgress.h>
+#include <TeStdIOProgress.h>
+
+void jointHistogram_8bits_test()
+{
+    // Generating test rasters
+
+    TePDITypes::TePDIRasterPtrType raster1;
+    TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( raster1, 1, 2, 2, 
+      false, TeUNSIGNEDCHAR, 0 ), "Unable to create raster" );
+    TEAGN_TRUE_OR_THROW( raster1->setElement( 0, 0, 1, 0 ), "error" )
+    TEAGN_TRUE_OR_THROW( raster1->setElement( 0, 1, 2, 0 ), "error" )
+    TEAGN_TRUE_OR_THROW( raster1->setElement( 1, 0, 1, 0 ), "error" );
+    TEAGN_TRUE_OR_THROW( raster1->setElement( 1, 1, 2, 0 ), "error" );
+    
+    TePDITypes::TePDIRasterPtrType raster2;
+    TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( raster2, 1, 2, 2, 
+      false, TeUNSIGNEDCHAR, 0 ), "Unable to create raster" );
+    TEAGN_TRUE_OR_THROW( raster2->setElement( 0, 0, 1, 0 ), "error" );
+    TEAGN_TRUE_OR_THROW( raster2->setElement( 0, 1, 3, 0 ), "error" );
+    TEAGN_TRUE_OR_THROW( raster2->setElement( 1, 0, 1, 0 ), "error" );
+    TEAGN_TRUE_OR_THROW( raster2->setElement( 1, 1, 3, 0 ), "error" );
+
+    // Generating joint histogram
+
+    TePDIJointHistogram hist;
+
+    TEAGN_TRUE_OR_THROW( hist.update( *raster1, 0, *raster2, 0,
+      TeBoxPixelIn, 0 ), "Unable to create histogram" );
+      
+    // Checking histogram
+    {
+      TEAGN_TRUE_OR_THROW( ( hist.size() == 6 ), "Invalid histogram size" );
+  
+      TePDIJointHistogram::const_iterator it = hist.begin();
+  
+      TEAGN_CHECK_EQUAL( it->first.first, 1 , "" );
+      TEAGN_CHECK_EQUAL( it->first.second, 1 , "" );
+      TEAGN_CHECK_EQUAL( it->second, 2 , "" );
+      ++it;
+  
+      TEAGN_CHECK_EQUAL( it->first.first, 1 , "" );
+      TEAGN_CHECK_EQUAL( it->first.second, 2 , "" );
+      TEAGN_CHECK_EQUAL( it->second, 0 , "" );
+      ++it;
+  
+      TEAGN_CHECK_EQUAL( it->first.first, 1 , "" );
+      TEAGN_CHECK_EQUAL( it->first.second, 3 , "" );
+      TEAGN_CHECK_EQUAL( it->second, 0 , "" );
+      ++it;
+  
+      TEAGN_CHECK_EQUAL( it->first.first, 2 , "" );
+      TEAGN_CHECK_EQUAL( it->first.second, 1 , "" );
+      TEAGN_CHECK_EQUAL( it->second, 0 , "" );
+      ++it;
+  
+      TEAGN_CHECK_EQUAL( it->first.first, 2 , "" );
+      TEAGN_CHECK_EQUAL( it->first.second, 2 , "" );
+      TEAGN_CHECK_EQUAL( it->second, 0 , "" );
+      ++it;
+  
+      TEAGN_CHECK_EQUAL( it->first.first, 2 , "" );
+      TEAGN_CHECK_EQUAL( it->first.second, 3 , "" );
+      TEAGN_CHECK_EQUAL( it->second, 2 , "" );
+      ++it;
+    }
+    // Checking raster 1 histogram
+    
+    {
+      const TePDIHistogram& r1hist = hist.getRaster1Hist();
+      TEAGN_TRUE_OR_THROW( ( r1hist.size() == 2 ), "Invalid histogram size" );
+  
+      TePDIHistogram::const_iterator it = r1hist.begin();
+  
+      TEAGN_CHECK_EQUAL( it->first, 1 , "" );
+      TEAGN_CHECK_EQUAL( it->second, 2 , "" );
+      ++it;
+  
+      TEAGN_CHECK_EQUAL( it->first, 2 , "" );
+      TEAGN_CHECK_EQUAL( it->second, 2 , "" );
+      ++it;      
+    }    
+    
+    // Checking raster 2 histogram
+ 
+    {
+      const TePDIHistogram& r2hist = hist.getRaster2Hist();
+      TEAGN_TRUE_OR_THROW( ( r2hist.size() == 3 ), "Invalid histogram size" );
+  
+      TePDIHistogram::const_iterator it = r2hist.begin();
+  
+      TEAGN_CHECK_EQUAL( it->first, 1 , "" );
+      TEAGN_CHECK_EQUAL( it->second, 2 , "" );
+      ++it;
+  
+      TEAGN_CHECK_EQUAL( it->first, 2 , "" );
+      TEAGN_CHECK_EQUAL( it->second, 0 , "" );
+      ++it;
+            
+      TEAGN_CHECK_EQUAL( it->first, 3 , "" );
+      TEAGN_CHECK_EQUAL( it->second, 2 , "" );
+      ++it;      
+    }     
+}
+
+void jointHistogram_8bits_images_test()
+{
+  // Initializing raster instances
+  
+  TePDITypes::TePDIRasterPtrType inRaster1( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_rgb342_crop1.tif" ), 
+    'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster1->init(), "Unable to init inRaster" );
+
+  TePDITypes::TePDIRasterPtrType inRaster2( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_rgb342_crop1.tif" ), 
+    'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster2->init(), "Unable to init inRaster" );
+
+
+  // Generating joint histogram
+
+  TePDIJointHistogram jhist;
+
+  TEAGN_TRUE_OR_THROW( jhist.update( *inRaster1, 0, *inRaster2, 1,
+    TeBoxPixelIn, 0 ), "Unable to create histogram" );  
+  
+  // Generating single histograms (just for comparison)
+  
+  TePDIHistogram hist1;
+  TEAGN_TRUE_OR_THROW( hist1.reset( inRaster1, 0, 0, 0, TeBoxPixelIn ),
+    "Unable to create histogram" );
+
+  TePDIHistogram hist2;
+  TEAGN_TRUE_OR_THROW( hist2.reset( inRaster2, 1, 0, 0, TeBoxPixelIn ),
+    "Unable to create histogram" );
+    
+  // Comparing single histograms with that ones created by the joint histogram.
+  
+  const TePDIHistogram& hist1b = jhist.getRaster1Hist();
+  const TePDIHistogram& hist2b = jhist.getRaster2Hist();
+  
+  TEAGN_TRUE_OR_THROW( hist1 == hist1b, "Histogram mismatch" )
+  TEAGN_TRUE_OR_THROW( hist2 == hist2b, "Histogram mismatch" )
+}
+
+void jointHistogram_float_test()
+{
+    // Generating test rasters
+
+    TePDITypes::TePDIRasterPtrType raster1;
+    TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( raster1, 1, 2, 2, 
+      false, TeDOUBLE, 0 ), "Unable to create raster" );
+    TEAGN_TRUE_OR_THROW( raster1->setElement( 0, 0, 1, 0 ), "error" )
+    TEAGN_TRUE_OR_THROW( raster1->setElement( 0, 1, 2, 0 ), "error" )
+    TEAGN_TRUE_OR_THROW( raster1->setElement( 1, 0, 1, 0 ), "error" );
+    TEAGN_TRUE_OR_THROW( raster1->setElement( 1, 1, 2, 0 ), "error" );
+    
+    TePDITypes::TePDIRasterPtrType raster2;
+    TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( raster2, 1, 2, 2, 
+      false, TeDOUBLE, 0 ), "Unable to create raster" );
+    TEAGN_TRUE_OR_THROW( raster2->setElement( 0, 0, 1, 0 ), "error" );
+    TEAGN_TRUE_OR_THROW( raster2->setElement( 0, 1, 3, 0 ), "error" );
+    TEAGN_TRUE_OR_THROW( raster2->setElement( 1, 0, 1, 0 ), "error" );
+    TEAGN_TRUE_OR_THROW( raster2->setElement( 1, 1, 3, 0 ), "error" );
+
+    // Generating joint histogram
+
+    TePDIJointHistogram hist;
+
+    TEAGN_TRUE_OR_THROW( hist.update( *raster1, 0, *raster2, 0,
+      TeBoxPixelIn, 3 ), "Unable to create histogram" );
+      
+    // Checking histogram
+    {
+      TEAGN_TRUE_OR_THROW( ( hist.size() == 9 ), "Invalid histogram size" );
+  
+      TePDIJointHistogram::const_iterator it = hist.begin();
+  
+      TEAGN_CHECK_EQUAL( it->first.first, 1 , "" );
+      TEAGN_CHECK_EQUAL( it->first.second, 1 , "" );
+      TEAGN_CHECK_EQUAL( it->second, 2 , "" );
+      ++it;
+  
+      TEAGN_CHECK_EQUAL( it->first.first, 1 , "" );
+      TEAGN_CHECK_EQUAL( it->first.second, 2 , "" );
+      TEAGN_CHECK_EQUAL( it->second, 0 , "" );
+      ++it;
+  
+      TEAGN_CHECK_EQUAL( it->first.first, 1 , "" );
+      TEAGN_CHECK_EQUAL( it->first.second, 3 , "" );
+      TEAGN_CHECK_EQUAL( it->second, 0 , "" );
+      ++it;
+      
+      TEAGN_CHECK_EQUAL( it->first.first, 1.5 , "" );
+      TEAGN_CHECK_EQUAL( it->first.second, 1 , "" );
+      TEAGN_CHECK_EQUAL( it->second, 0 , "" );
+      ++it;
+  
+      TEAGN_CHECK_EQUAL( it->first.first, 1.5 , "" );
+      TEAGN_CHECK_EQUAL( it->first.second, 2 , "" );
+      TEAGN_CHECK_EQUAL( it->second, 0 , "" );
+      ++it;
+  
+      TEAGN_CHECK_EQUAL( it->first.first, 1.5 , "" );
+      TEAGN_CHECK_EQUAL( it->first.second, 3 , "" );
+      TEAGN_CHECK_EQUAL( it->second, 0 , "" );
+      ++it;      
+  
+      TEAGN_CHECK_EQUAL( it->first.first, 2 , "" );
+      TEAGN_CHECK_EQUAL( it->first.second, 1 , "" );
+      TEAGN_CHECK_EQUAL( it->second, 0 , "" );
+      ++it;
+  
+      TEAGN_CHECK_EQUAL( it->first.first, 2 , "" );
+      TEAGN_CHECK_EQUAL( it->first.second, 2 , "" );
+      TEAGN_CHECK_EQUAL( it->second, 0 , "" );
+      ++it;
+  
+      TEAGN_CHECK_EQUAL( it->first.first, 2 , "" );
+      TEAGN_CHECK_EQUAL( it->first.second, 3 , "" );
+      TEAGN_CHECK_EQUAL( it->second, 2 , "" );
+      ++it;
+    }
+    // Checking raster 1 histogram
+    
+    {
+      const TePDIHistogram& r1hist = hist.getRaster1Hist();
+      TEAGN_TRUE_OR_THROW( ( r1hist.size() == 3 ), "Invalid histogram size" );
+  
+      TePDIHistogram::const_iterator it = r1hist.begin();
+  
+      TEAGN_CHECK_EQUAL( it->first, 1 , "" );
+      TEAGN_CHECK_EQUAL( it->second, 2 , "" );
+      ++it;
+      
+      TEAGN_CHECK_EQUAL( it->first, 1.5 , "" );
+      TEAGN_CHECK_EQUAL( it->second, 0 , "" );
+      ++it;      
+  
+      TEAGN_CHECK_EQUAL( it->first, 2 , "" );
+      TEAGN_CHECK_EQUAL( it->second, 2 , "" );
+      ++it;      
+    }    
+    
+    // Checking raster 2 histogram
+ 
+    {
+      const TePDIHistogram& r2hist = hist.getRaster2Hist();
+      TEAGN_TRUE_OR_THROW( ( r2hist.size() == 3 ), "Invalid histogram size" );
+  
+      TePDIHistogram::const_iterator it = r2hist.begin();
+  
+      TEAGN_CHECK_EQUAL( it->first, 1 , "" );
+      TEAGN_CHECK_EQUAL( it->second, 2 , "" );
+      ++it;
+  
+      TEAGN_CHECK_EQUAL( it->first, 2 , "" );
+      TEAGN_CHECK_EQUAL( it->second, 0 , "" );
+      ++it;
+            
+      TEAGN_CHECK_EQUAL( it->first, 3 , "" );
+      TEAGN_CHECK_EQUAL( it->second, 2 , "" );
+      ++it;      
+    }     
+}
+
+void jointHistogram_integer_test()
+{
+    // Generating test rasters
+
+    TePDITypes::TePDIRasterPtrType raster1;
+    TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( raster1, 1, 2, 2, 
+      false, TeINTEGER, 0 ), "Unable to create raster" );
+    TEAGN_TRUE_OR_THROW( raster1->setElement( 0, 0, 1, 0 ), "error" )
+    TEAGN_TRUE_OR_THROW( raster1->setElement( 0, 1, 2, 0 ), "error" )
+    TEAGN_TRUE_OR_THROW( raster1->setElement( 1, 0, 1, 0 ), "error" );
+    TEAGN_TRUE_OR_THROW( raster1->setElement( 1, 1, 2, 0 ), "error" );
+    
+    TePDITypes::TePDIRasterPtrType raster2;
+    TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( raster2, 1, 2, 2, 
+      false, TeINTEGER, 0 ), "Unable to create raster" );
+    TEAGN_TRUE_OR_THROW( raster2->setElement( 0, 0, 1, 0 ), "error" );
+    TEAGN_TRUE_OR_THROW( raster2->setElement( 0, 1, 3, 0 ), "error" );
+    TEAGN_TRUE_OR_THROW( raster2->setElement( 1, 0, 1, 0 ), "error" );
+    TEAGN_TRUE_OR_THROW( raster2->setElement( 1, 1, 3, 0 ), "error" );
+
+    // Generating joint histogram
+
+    TePDIJointHistogram hist;
+
+    TEAGN_TRUE_OR_THROW( hist.update( *raster1, 0, *raster2, 0,
+      TeBoxPixelIn, 0 ), "Unable to create histogram" );
+      
+    // Checking histogram
+    {
+      TEAGN_TRUE_OR_THROW( ( hist.size() == 2 ), "Invalid histogram size" );
+  
+      TePDIJointHistogram::const_iterator it = hist.begin();
+  
+      TEAGN_CHECK_EQUAL( it->first.first, 1 , "" );
+      TEAGN_CHECK_EQUAL( it->first.second, 1 , "" );
+      TEAGN_CHECK_EQUAL( it->second, 2 , "" );
+      ++it;
+  
+      TEAGN_CHECK_EQUAL( it->first.first, 2 , "" );
+      TEAGN_CHECK_EQUAL( it->first.second, 3 , "" );
+      TEAGN_CHECK_EQUAL( it->second, 2 , "" );
+      ++it;
+    }
+    // Checking raster 1 histogram
+    
+    {
+      const TePDIHistogram& r1hist = hist.getRaster1Hist();
+      TEAGN_TRUE_OR_THROW( ( r1hist.size() == 2 ), "Invalid histogram size" );
+  
+      TePDIHistogram::const_iterator it = r1hist.begin();
+  
+      TEAGN_CHECK_EQUAL( it->first, 1 , "" );
+      TEAGN_CHECK_EQUAL( it->second, 2 , "" );
+      ++it;
+  
+      TEAGN_CHECK_EQUAL( it->first, 2 , "" );
+      TEAGN_CHECK_EQUAL( it->second, 2 , "" );
+      ++it;      
+    }    
+    
+    // Checking raster 2 histogram
+ 
+    {
+      const TePDIHistogram& r2hist = hist.getRaster2Hist();
+      TEAGN_TRUE_OR_THROW( ( r2hist.size() == 2 ), "Invalid histogram size" );
+  
+      TePDIHistogram::const_iterator it = r2hist.begin();
+  
+      TEAGN_CHECK_EQUAL( it->first, 1 , "" );
+      TEAGN_CHECK_EQUAL( it->second, 2 , "" );
+      ++it;
+            
+      TEAGN_CHECK_EQUAL( it->first, 3 , "" );
+      TEAGN_CHECK_EQUAL( it->second, 2 , "" );
+      ++it;      
+    }     
+}
+
+int main()
+{
+  TEAGN_LOGMSG( "Test started." );
+
+  try{ 
+    TeStdIOProgress pi;
+    TeProgress::setProgressInterf( dynamic_cast< TeProgressBase* >( &pi ) ); 
+    
+    jointHistogram_8bits_images_test();
+    jointHistogram_8bits_test();
+    jointHistogram_float_test();
+    jointHistogram_integer_test();
+  }
+  catch( const TeException& excpt ){
+    TEAGN_LOGERR( excpt.message() )
+    return EXIT_FAILURE;
+  }
+
+  TEAGN_LOGMSG( "Test OK." );
+  return EXIT_SUCCESS;
+}
+
diff --git a/examples/image_processing/source/TePDIJointHistogram/TePDIJointHistogram_test.vcproj b/examples/image_processing/source/TePDIJointHistogram/TePDIJointHistogram_test.vcproj
new file mode 100755
index 0000000..f2ad72d
--- /dev/null
+++ b/examples/image_processing/source/TePDIJointHistogram/TePDIJointHistogram_test.vcproj
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="TePDIJointHistogram_test"
+	ProjectGUID="{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	RootNamespace="TePDIJointHistogram_test"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="0">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../base;../../../../src/terralib/image_processing;../../../../src/terralib/kernel;../../../../src/tiff"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PDIAGN_ENABLE_STDOUT_LOG"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Debug/terralibpdi/terralibpdi.lib ../../../../Debug/terralib/terralib.lib ../../../../Debug/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Debug/libjpeg/libjpeg.lib ../../../../Debug/shapelib/shapelib.lib user32.lib $(NOINHERIT)"
+				OutputFile="$(OutDir)/TePDIJointHistogram_test.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreAllDefaultLibraries="FALSE"
+				IgnoreDefaultLibraryNames="msvcrt.lib,libcmt.lib;libc.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"
+				TargetMachine="0"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="../../../../src/terralib/image_processing;../base;../../../../src/terralib/kernel;../../../../src/tiff;../../../../src/shapelib"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Release/terralibpdi/terralibpdi.lib ../../../../Release/terralib/terralib.lib ../../../../Release/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Release/libjpeg/libjpeg.lib ../../../../Release/shapelib/shapelib.lib"
+				OutputFile="$(OutDir)/TePDIJointHistogram_test.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\TePDIJointHistogram_test.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/image_processing/source/TePDILinearFilter/TePDILinearFilter.pro b/examples/image_processing/source/TePDILinearFilter/TePDILinearFilter.pro
new file mode 100755
index 0000000..368c914
--- /dev/null
+++ b/examples/image_processing/source/TePDILinearFilter/TePDILinearFilter.pro
@@ -0,0 +1,8 @@
+include( ../base/base.pro )
+
+SOURCES += \
+  TePDILinearFilter_test.cpp
+
+QMAKE_CLEAN += \
+  ../../bin/TePDILinearFilter*
+
diff --git a/examples/image_processing/source/TePDILinearFilter/TePDILinearFilter_test.cpp b/examples/image_processing/source/TePDILinearFilter/TePDILinearFilter_test.cpp
new file mode 100755
index 0000000..35c34f3
--- /dev/null
+++ b/examples/image_processing/source/TePDILinearFilter/TePDILinearFilter_test.cpp
@@ -0,0 +1,222 @@
+#define TEAGN_ENABLE_STDOUT_LOG
+
+#include <TePDIExamplesBase.hpp>
+
+#include <TePDILinearFilter.hpp>
+#include <TePDIFilterMask.hpp>
+#include <TePDIParameters.hpp>
+#include <TeAgnostic.h>
+#include <TePDIUtils.hpp>
+
+#include <TeInitRasterDecoders.h>
+#include <TeProgress.h>
+#include <TeStdIOProgress.h>
+#include <TeDecoderTIFF.h>
+
+
+void DummyMask_RGB_test()
+{
+  TePDIParameters params;
+
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_rgb342_crop1.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  params.SetParameter( "input_image", inRaster );
+  
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeUNSIGNEDCHAR, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );  
+  
+  std::vector<int> channels;
+  channels.push_back( 0 );
+  channels.push_back( 1 );
+  channels.push_back( 2 );
+  params.SetParameter( "channels", channels );
+
+  params.SetParameter( "filter_mask", TePDIFilterMask::create_Dummy() );
+
+  params.SetParameter( "iterations", (int)1 );
+
+  TePDILinearFilter filter;  
+
+  TEAGN_TRUE_OR_THROW( filter.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( filter.Apply(),
+    "Apply error" );
+  
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "TePDILinearFilter_DummyMask_RGB.tif" ), 
+    "GeoTIF generation error" );  
+    
+}
+
+
+void Avg3x3_test()
+{
+  TePDIParameters params;
+
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  params.SetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeUNSIGNEDCHAR, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  std::vector<int> channels;
+  channels.push_back( 0 );
+  params.SetParameter( "channels", channels );
+
+  params.SetParameter( "filter_mask", TePDIFilterMask::create_Avg3x3() );
+
+  params.SetParameter( "iterations", (int)3 );
+
+  TePDILinearFilter filter;  
+
+  TEAGN_TRUE_OR_THROW( filter.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( filter.Apply(),
+    "Apply error" );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "TePDILinearFilter_Avg3x3_test.tif" ), "GeoTIF generation error" );
+}
+
+
+void Avg7x7_test()
+{
+  TePDIParameters params;
+
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  params.SetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeUNSIGNEDCHAR, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  std::vector<int> channels;
+  channels.push_back( 0 );
+  params.SetParameter( "channels", channels );
+
+  params.SetParameter( "filter_mask", TePDIFilterMask::create_Avg7x7() );
+
+  params.SetParameter( "iterations", (int)2 );
+
+  TePDILinearFilter filter;
+
+  TEAGN_TRUE_OR_THROW( filter.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( filter.Apply(),
+    "Apply error" );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "TePDILinearFilter_Avg7x7_test.tif" ), "GeoTIF generation error" );
+}
+
+
+void NDHigh_test()
+{
+  TePDIParameters params;
+
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  params.SetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeUNSIGNEDCHAR, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  std::vector<int> channels;
+  channels.push_back( 0 );
+  params.SetParameter( "channels", channels );
+
+  params.SetParameter( "filter_mask", TePDIFilterMask::create_NDHigh() );
+
+  params.SetParameter( "iterations", (int)1 );
+
+  params.SetParameter( "level_offset", (double)20 );
+
+  TePDILinearFilter filter;
+
+  TEAGN_TRUE_OR_THROW( filter.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( filter.Apply(),
+    "Apply error" );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "TePDILinearFilter_NDHigh_test.tif" ), "GeoTIF generation error" );
+}
+
+
+void S_test()
+{
+  TePDIParameters params;
+
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  params.SetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeUNSIGNEDCHAR, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  std::vector<int> channels;
+  channels.push_back( 0 );
+  params.SetParameter( "channels", channels );
+
+  params.SetParameter( "filter_mask", TePDIFilterMask::create_S() );
+
+  params.SetParameter( "iterations", (int)1 );
+
+  TePDILinearFilter filter;
+
+  TEAGN_TRUE_OR_THROW( filter.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( filter.Apply(),
+    "Apply error" );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "TePDILinearFilter_S_test.tif" ), "GeoTIF generation error" );
+}
+
+
+
+int main()
+{
+  TEAGN_LOGMSG( "Test started." );
+
+  try{
+    TeInitRasterDecoders();
+    
+    TeStdIOProgress pi;
+    TeProgress::setProgressInterf( dynamic_cast< TeProgressBase* >( &pi ) );     
+
+    DummyMask_RGB_test();
+    Avg3x3_test();
+    Avg7x7_test();
+    NDHigh_test();
+    S_test();
+  }
+  catch( const TeException& excpt ){
+    TEAGN_LOGERR( excpt.message() )
+    return EXIT_FAILURE;
+  }
+
+  TEAGN_LOGMSG( "Test OK." );
+  return EXIT_SUCCESS;
+}
diff --git a/examples/image_processing/source/TePDILinearFilter/TePDILinearFilter_test.vcproj b/examples/image_processing/source/TePDILinearFilter/TePDILinearFilter_test.vcproj
new file mode 100755
index 0000000..4e86498
--- /dev/null
+++ b/examples/image_processing/source/TePDILinearFilter/TePDILinearFilter_test.vcproj
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="TePDILinearFilter_test"
+	ProjectGUID="{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	RootNamespace="TePDILinearFilter_test"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="0">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../base;../../../../src/terralib/image_processing;../../../../src/terralib/kernel;../../../../src/tiff"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PDIAGN_ENABLE_STDOUT_LOG"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Debug/terralibpdi/terralibpdi.lib ../../../../Debug/terralib/terralib.lib ../../../../Debug/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Debug/libjpeg/libjpeg.lib ../../../../Debug/shapelib/shapelib.lib user32.lib $(NOINHERIT)"
+				OutputFile="$(OutDir)/TePDILinearFilter_test.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreAllDefaultLibraries="FALSE"
+				IgnoreDefaultLibraryNames="msvcrt.lib,libcmt.lib;libc.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"
+				TargetMachine="0"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="../../../../src/terralib/image_processing;../base;../../../../src/terralib/kernel;../../../../src/tiff;../../../../src/shapelib"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Release/terralibpdi/terralibpdi.lib ../../../../Release/terralib/terralib.lib ../../../../Release/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Release/libjpeg/libjpeg.lib ../../../../Release/shapelib/shapelib.lib"
+				OutputFile="$(OutDir)/TePDILinearFilter_test.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\TePDILinearFilter_test.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/image_processing/source/TePDIMIMatching/TePDIMIMatching.pro b/examples/image_processing/source/TePDIMIMatching/TePDIMIMatching.pro
new file mode 100644
index 0000000..c58faf4
--- /dev/null
+++ b/examples/image_processing/source/TePDIMIMatching/TePDIMIMatching.pro
@@ -0,0 +1,7 @@
+include( ../base/base.pro )
+
+SOURCES += \
+  TePDIMIMatching_test.cpp
+
+QMAKE_CLEAN += \
+  ../../bin/TePDIMIMatching*.tif
diff --git a/examples/image_processing/source/TePDIMIMatching/TePDIMIMatching_test.cpp b/examples/image_processing/source/TePDIMIMatching/TePDIMIMatching_test.cpp
new file mode 100644
index 0000000..302013c
--- /dev/null
+++ b/examples/image_processing/source/TePDIMIMatching/TePDIMIMatching_test.cpp
@@ -0,0 +1,743 @@
+#define TEAGN_ENABLE_STDOUT_LOG
+
+#include <TePDIExamplesBase.hpp>
+
+#include <TePDIMIMatching.hpp>
+#include <TePDIUtils.hpp>
+
+#include <TeProgress.h>
+#include <TeStdIOProgress.h>
+#include <TeAgnostic.h>
+
+#include <math.h>
+
+
+void raster2Tiff( 
+  const TePDITypes::TePDIRasterPtrType& input_raster_ptr,
+  unsigned int raster_channel,
+  const std::string& out_file_name,
+  TeSharedPtr< TeCoordPairVect > out_tie_points_ptr,
+  unsigned int tie_points_space )
+{   
+  TEAGN_TRUE_OR_THROW( ( ! out_file_name.empty() ), 
+    "Invalid file name" )
+  TEAGN_TRUE_OR_THROW( ( input_raster_ptr->params().nlines_ > 0 ), 
+    "Invalid matrix lines" )
+  TEAGN_TRUE_OR_THROW( ( input_raster_ptr->params().ncols_ > 0 ), 
+    "Invalid matrix cols" )
+    
+  TeRasterParams params;
+  params.setNLinesNColumns( input_raster_ptr->params().nlines_,
+    input_raster_ptr->params().ncols_ );
+  params.nBands( 1 );
+  params.setDataType( TeUNSIGNEDCHAR, -1 );
+  params.nBands( 1 );
+  params.decoderIdentifier_ = "TIF";
+  params.mode_ = 'c';
+  params.fileName_ = out_file_name;
+  
+  TeRaster out_raster( params );
+  TEAGN_TRUE_OR_THROW( out_raster.init(), "Error init raster" );
+  double value = 0;
+  
+  for( int line = 0 ; 
+    line < input_raster_ptr->params().nlines_ ; ++line ) {
+    for( int col = 0 ; 
+      col < input_raster_ptr->params().ncols_ ; 
+      ++col ) {
+      
+      input_raster_ptr->getElement( col, line, value, 
+        raster_channel );
+      
+
+      TEAGN_TRUE_OR_THROW( out_raster.setElement( col, line, 
+        value, 0 ),
+        "Error writing raster" )
+    }  
+  }
+  
+  /* Draw tie-points */
+  
+  if( out_tie_points_ptr.isActive() ) {
+    TeCoordPairVect::iterator it = out_tie_points_ptr->begin();
+    TeCoordPairVect::iterator it_end = out_tie_points_ptr->end();
+    
+    while( it != it_end ) {
+      int x = 0;
+      int y = 0;
+      
+      if( tie_points_space == 0 ) {
+         x = TeRound( it->pt1.x() );
+         y = TeRound( it->pt1.y() );
+      } else {
+         x = TeRound( it->pt2.x() );
+         y = TeRound( it->pt2.y() );
+      }
+      
+      TEAGN_TRUE_OR_THROW( ( x < input_raster_ptr->params().ncols_ ),
+        "Invalid maxima column" )
+      TEAGN_TRUE_OR_THROW( ( x >= 0 ),
+        "Invalid maxima column" )      
+      TEAGN_TRUE_OR_THROW( ( y < input_raster_ptr->params().nlines_ ),
+        "Invalid maxima line" )
+      TEAGN_TRUE_OR_THROW( ( y >= 0 ),
+        "Invalid maxima line" )      
+      
+      TEAGN_TRUE_OR_THROW( out_raster.setElement( x, y, 
+        255.0, 0 ),
+        "Error writing raster" )    
+    
+      ++it;
+    }
+  
+  }
+}
+
+void sameImageTest()
+{
+  /* Creating parameters */
+
+  TePDIParameters params;
+  
+  TePDITypes::TePDIRasterPtrType input_image1_ptr( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_rgb342_crop1.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_image1_ptr->init(), 
+    "Unable to init input_image1_ptr" );    
+  params.SetParameter( "input_image1_ptr" , input_image1_ptr );
+  
+  params.SetParameter( "input_channel1" , (unsigned int)0 );
+    
+  TePDITypes::TePDIRasterPtrType input_image2_ptr( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_rgb342_crop1.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_image2_ptr->init(), 
+    "Unable to init input_image2_ptr" ); 
+  params.SetParameter( "input_image2_ptr" , input_image2_ptr ); 
+  
+  params.SetParameter( "input_channel2" , (unsigned int)0 );       
+    
+  TeSharedPtr< TeCoordPairVect > out_tie_points_ptr( new TeCoordPairVect );
+  params.SetParameter( "out_tie_points_ptr" , out_tie_points_ptr );        
+  
+  TeBox input_box1( TeCoord2D( 142, 826 ) , 
+    TeCoord2D( 542, 426 ) );
+  params.SetParameter( "input_box1" , input_box1 );
+  
+  TeBox input_box2( TeCoord2D( 238, 689 ) , 
+    TeCoord2D( 391, 473 ) );
+  params.SetParameter( "input_box2" , input_box2 );  
+  
+  params.SetParameter( "enable_multi_thread" , (int)1 ); 
+  
+  params.SetParameter( "pixel_x_relation" , (double)1 ); 
+  params.SetParameter( "pixel_y_relation" , (double)1 ); 
+  
+  TePDIMIMatching match_instance; 
+  match_instance.ToggleProgInt( true );
+  TEAGN_TRUE_OR_THROW( match_instance.Reset( params ),
+    "Algorithm reset error" )
+    
+  TEAGN_LOGMSG( "Algorithm started" )
+  
+  time_t init_time = clock() / CLOCKS_PER_SEC;
+    
+  TEAGN_TRUE_OR_THROW( match_instance.Apply(),
+    "Algorithm apply error" )      
+    
+  time_t end_time = clock() / CLOCKS_PER_SEC;
+  
+  TEAGN_LOGMSG( "Time elapsed (sameImageDifBoxesTest): " + 
+    TeAgnostic::to_string( (long int)( end_time - init_time ) ) +
+    " seconds" );
+    
+  /* Displaying tie-points */
+  {
+    TeCoordPairVect::iterator it = out_tie_points_ptr->begin();
+    TeCoordPairVect::iterator it_end = out_tie_points_ptr->end();
+    
+    while( it != it_end ) {
+      std::cout << "[" + Te2String( it->pt1.x(),1 ) + " , " +
+        Te2String( it->pt1.y(),1 ) + "] -> [" +
+        Te2String( it->pt2.x(),1 ) + " , " + 
+        Te2String( it->pt2.y(),1 ) + "]" << std::endl;
+      
+      ++it;
+    }
+  }
+  
+  /* Tie-points draw */
+  
+  raster2Tiff( input_image1_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TeMIMatching_test_sameImageTest_input_image1.tif",
+    out_tie_points_ptr, 0 );
+  raster2Tiff( input_image2_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TeMIMatching_test_sameImageTest_input_image2.tif",
+    out_tie_points_ptr, 1 );    
+    
+  TEAGN_WATCH( (unsigned int)out_tie_points_ptr->size() );
+  TEAGN_CHECK_EPS( 4, out_tie_points_ptr->size(),
+    0, "Invalid tie-points number" )    
+}
+
+/* inverted boxes test */
+void sameImageTest2()
+{
+  /* Creating parameters */
+
+  TePDIParameters params;
+  
+  TePDITypes::TePDIRasterPtrType input_image1_ptr( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_rgb342_crop1.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_image1_ptr->init(), 
+    "Unable to init input_image1_ptr" );    
+  params.SetParameter( "input_image1_ptr" , input_image1_ptr );
+  
+  params.SetParameter( "input_channel1" , (unsigned int)0 );
+    
+  TePDITypes::TePDIRasterPtrType input_image2_ptr( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_rgb342_crop1.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_image2_ptr->init(), 
+    "Unable to init input_image2_ptr" ); 
+  params.SetParameter( "input_image2_ptr" , input_image2_ptr ); 
+  
+  params.SetParameter( "input_channel2" , (unsigned int)0 );       
+    
+  TeSharedPtr< TeCoordPairVect > out_tie_points_ptr( new TeCoordPairVect );
+  params.SetParameter( "out_tie_points_ptr" , out_tie_points_ptr );        
+  
+  TeBox input_box2( TeCoord2D( 142, 826 ) , 
+    TeCoord2D( 542, 426 ) );
+  params.SetParameter( "input_box2" , input_box2 );
+  
+  TeBox input_box1( TeCoord2D( 238, 689 ) , 
+    TeCoord2D( 391, 473 ) );
+  params.SetParameter( "input_box1" , input_box1 );  
+  
+  params.SetParameter( "enable_multi_thread" , (int)1 ); 
+  
+  params.SetParameter( "pixel_x_relation" , (double)1 ); 
+  params.SetParameter( "pixel_y_relation" , (double)1 ); 
+  
+  TePDIMIMatching match_instance; 
+  match_instance.ToggleProgInt( true );
+  TEAGN_TRUE_OR_THROW( match_instance.Reset( params ),
+    "Algorithm reset error" )
+    
+  TEAGN_LOGMSG( "Algorithm started" )
+  
+  time_t init_time = clock() / CLOCKS_PER_SEC;
+    
+  TEAGN_TRUE_OR_THROW( match_instance.Apply(),
+    "Algorithm apply error" )      
+    
+  time_t end_time = clock() / CLOCKS_PER_SEC;
+  
+  TEAGN_LOGMSG( "Time elapsed (sameImageDifBoxesTest): " + 
+    TeAgnostic::to_string( (long int)( end_time - init_time ) ) +
+    " seconds" );
+    
+  /* Displaying tie-points */
+  {
+    TeCoordPairVect::iterator it = out_tie_points_ptr->begin();
+    TeCoordPairVect::iterator it_end = out_tie_points_ptr->end();
+    
+    while( it != it_end ) {
+      std::cout << "[" + Te2String( it->pt1.x(),1 ) + " , " +
+        Te2String( it->pt1.y(),1 ) + "] -> [" +
+        Te2String( it->pt2.x(),1 ) + " , " + 
+        Te2String( it->pt2.y(),1 ) + "]" << std::endl;
+      
+      ++it;
+    }
+  }
+  
+  /* Tie-points draw */
+  
+  raster2Tiff( input_image1_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TeMIMatching_test_sameImageTest2_input_image1.tif",
+    out_tie_points_ptr, 0 );
+  raster2Tiff( input_image2_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TeMIMatching_test_sameImageTest2_input_image2.tif",
+    out_tie_points_ptr, 1 );    
+    
+  TEAGN_WATCH( (unsigned int)out_tie_points_ptr->size() );
+  TEAGN_CHECK_EPS( 4, out_tie_points_ptr->size(),
+    0, "Invalid tie-points number" )    
+}
+
+
+void halfsampledImageTest()
+{
+  /* Creating parameters */
+
+  TePDIParameters params;
+  
+  TePDITypes::TePDIRasterPtrType input_image1_ptr( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_image1_ptr->init(), 
+    "Unable to init input_image1_ptr" );    
+  params.SetParameter( "input_image1_ptr" , input_image1_ptr );
+  
+  params.SetParameter( "input_channel1" , (unsigned int)0 );
+    
+  TePDITypes::TePDIRasterPtrType input_image2_ptr( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop_contraste_halfsampled.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_image2_ptr->init(), 
+    "Unable to init input_image2_ptr" ); 
+  params.SetParameter( "input_image2_ptr" , input_image2_ptr ); 
+  
+  params.SetParameter( "input_channel2" , (unsigned int)0 );       
+    
+  TeSharedPtr< TeCoordPairVect > out_tie_points_ptr( new TeCoordPairVect );
+  params.SetParameter( "out_tie_points_ptr" , out_tie_points_ptr );        
+  
+  TeBox input_box1( TeCoord2D( 198, 486 ) , 
+    TeCoord2D( 577, 186 ) );
+  params.SetParameter( "input_box1" , input_box1 );
+  
+  TeBox input_box2( TeCoord2D( 143, 180 ) , 
+    TeCoord2D( 227, 113 ) );
+  params.SetParameter( "input_box2" , input_box2 );  
+  
+  params.SetParameter( "enable_multi_thread" , (int)1 ); 
+  
+  params.SetParameter( "pixel_x_relation" , (double)0.5 ); 
+  params.SetParameter( "pixel_y_relation" , (double)0.5 ); 
+  
+  TePDIMIMatching match_instance; 
+  match_instance.ToggleProgInt( true );
+  TEAGN_TRUE_OR_THROW( match_instance.Reset( params ),
+    "Algorithm reset error" )
+    
+  TEAGN_LOGMSG( "Algorithm started" )
+  
+  time_t init_time = clock() / CLOCKS_PER_SEC;
+    
+  TEAGN_TRUE_OR_THROW( match_instance.Apply(),
+    "Algorithm apply error" )      
+    
+  time_t end_time = clock() / CLOCKS_PER_SEC;
+  
+  TEAGN_LOGMSG( "Time elapsed (sameImageDifBoxesTest): " + 
+    TeAgnostic::to_string( (long int)( end_time - init_time ) ) +
+    " seconds" );
+    
+  /* Displaying tie-points */
+  {
+    TeCoordPairVect::iterator it = out_tie_points_ptr->begin();
+    TeCoordPairVect::iterator it_end = out_tie_points_ptr->end();
+    
+    while( it != it_end ) {
+      std::cout << "[" + Te2String( it->pt1.x(),1 ) + " , " +
+        Te2String( it->pt1.y(),1 ) + "] -> [" +
+        Te2String( it->pt2.x(),1 ) + " , " + 
+        Te2String( it->pt2.y(),1 ) + "]" << std::endl;
+      
+      ++it;
+    }
+  }
+  
+  /* Tie-points draw */
+  
+  raster2Tiff( input_image1_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TeMIMatching_test_halfsampledImageTest_input_image1.tif",
+    out_tie_points_ptr, 0 );
+  raster2Tiff( input_image2_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TeMIMatching_test_halfsampledImageTest_input_image2.tif",
+    out_tie_points_ptr, 1 );    
+    
+  TEAGN_WATCH( (unsigned int)out_tie_points_ptr->size() );
+  TEAGN_CHECK_EPS( 4, out_tie_points_ptr->size(),
+    0, "Invalid tie-points number" )    
+}
+
+
+void halfsampledImageTest2()
+{
+  /* Creating parameters */
+
+  TePDIParameters params;
+  
+  TePDITypes::TePDIRasterPtrType input_image1_ptr( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop_contraste_halfsampled.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_image1_ptr->init(), 
+    "Unable to init input_image1_ptr" );    
+  params.SetParameter( "input_image1_ptr" , input_image1_ptr );
+  
+  params.SetParameter( "input_channel1" , (unsigned int)0 );
+    
+  TePDITypes::TePDIRasterPtrType input_image2_ptr( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_image2_ptr->init(), 
+    "Unable to init input_image2_ptr" ); 
+  params.SetParameter( "input_image2_ptr" , input_image2_ptr ); 
+  
+  params.SetParameter( "input_channel2" , (unsigned int)0 );       
+    
+  TeSharedPtr< TeCoordPairVect > out_tie_points_ptr( new TeCoordPairVect );
+  params.SetParameter( "out_tie_points_ptr" , out_tie_points_ptr );        
+  
+  TeBox input_box2( TeCoord2D( 198, 486 ) , 
+    TeCoord2D( 577, 186 ) );
+  params.SetParameter( "input_box2" , input_box2 );
+  
+  TeBox input_box1( TeCoord2D( 143, 180 ) , 
+    TeCoord2D( 227, 113 ) );
+  params.SetParameter( "input_box1" , input_box1 );  
+  
+  params.SetParameter( "enable_multi_thread" , (int)1 ); 
+  
+  params.SetParameter( "pixel_x_relation" , (double)2 ); 
+  params.SetParameter( "pixel_y_relation" , (double)2 ); 
+  
+  TePDIMIMatching match_instance; 
+  match_instance.ToggleProgInt( true );
+  TEAGN_TRUE_OR_THROW( match_instance.Reset( params ),
+    "Algorithm reset error" )
+    
+  TEAGN_LOGMSG( "Algorithm started" )
+  
+  time_t init_time = clock() / CLOCKS_PER_SEC;
+    
+  TEAGN_TRUE_OR_THROW( match_instance.Apply(),
+    "Algorithm apply error" )      
+    
+  time_t end_time = clock() / CLOCKS_PER_SEC;
+  
+  TEAGN_LOGMSG( "Time elapsed (sameImageDifBoxesTest): " + 
+    TeAgnostic::to_string( (long int)( end_time - init_time ) ) +
+    " seconds" );
+    
+  /* Displaying tie-points */
+  {
+    TeCoordPairVect::iterator it = out_tie_points_ptr->begin();
+    TeCoordPairVect::iterator it_end = out_tie_points_ptr->end();
+    
+    while( it != it_end ) {
+      std::cout << "[" + Te2String( it->pt1.x(),1 ) + " , " +
+        Te2String( it->pt1.y(),1 ) + "] -> [" +
+        Te2String( it->pt2.x(),1 ) + " , " + 
+        Te2String( it->pt2.y(),1 ) + "]" << std::endl;
+      
+      ++it;
+    }
+  }
+  
+  /* Tie-points draw */
+  
+  raster2Tiff( input_image1_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TeMIMatching_test_halfsampledImageTest2_input_image1.tif",
+    out_tie_points_ptr, 0 );
+  raster2Tiff( input_image2_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TeMIMatching_test_halfsampledImageTest2_input_image2.tif",
+    out_tie_points_ptr, 1 );    
+    
+  TEAGN_WATCH( (unsigned int)out_tie_points_ptr->size() );
+  TEAGN_CHECK_EPS( 4, out_tie_points_ptr->size(),
+    0, "Invalid tie-points number" )    
+}
+
+void sameImageGreenXRedTest()
+{
+  /* Creating parameters */
+
+  TePDIParameters params;
+  
+  TePDITypes::TePDIRasterPtrType input_image1_ptr( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_rgb342_crop1.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_image1_ptr->init(), 
+    "Unable to init input_image1_ptr" );    
+  params.SetParameter( "input_image1_ptr" , input_image1_ptr );
+  
+  params.SetParameter( "input_channel1" , (unsigned int)0 );
+    
+  TePDITypes::TePDIRasterPtrType input_image2_ptr( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_rgb342_crop1.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_image2_ptr->init(), 
+    "Unable to init input_image2_ptr" ); 
+  params.SetParameter( "input_image2_ptr" , input_image2_ptr ); 
+  
+  params.SetParameter( "input_channel2" , (unsigned int)1 );       
+    
+  TeSharedPtr< TeCoordPairVect > out_tie_points_ptr( new TeCoordPairVect );
+  params.SetParameter( "out_tie_points_ptr" , out_tie_points_ptr );        
+  
+  TeBox input_box1( TeCoord2D( 142, 826 ) , 
+    TeCoord2D( 542, 426 ) );
+  params.SetParameter( "input_box1" , input_box1 );
+  
+  TeBox input_box2( TeCoord2D( 238, 689 ) , 
+    TeCoord2D( 391, 473 ) );
+  params.SetParameter( "input_box2" , input_box2 );  
+  
+  params.SetParameter( "enable_multi_thread" , (int)1 ); 
+  
+  params.SetParameter( "pixel_x_relation" , (double)1 ); 
+  params.SetParameter( "pixel_y_relation" , (double)1 ); 
+  
+  TePDIMIMatching match_instance; 
+  match_instance.ToggleProgInt( true );
+  TEAGN_TRUE_OR_THROW( match_instance.Reset( params ),
+    "Algorithm reset error" )
+    
+  TEAGN_LOGMSG( "Algorithm started" )
+  
+  time_t init_time = clock() / CLOCKS_PER_SEC;
+    
+  TEAGN_TRUE_OR_THROW( match_instance.Apply(),
+    "Algorithm apply error" )      
+    
+  time_t end_time = clock() / CLOCKS_PER_SEC;
+  
+  TEAGN_LOGMSG( "Time elapsed (sameImageDifBoxesTest): " + 
+    TeAgnostic::to_string( (long int)( end_time - init_time ) ) +
+    " seconds" );
+    
+  /* Displaying tie-points */
+  {
+    TeCoordPairVect::iterator it = out_tie_points_ptr->begin();
+    TeCoordPairVect::iterator it_end = out_tie_points_ptr->end();
+    
+    while( it != it_end ) {
+      std::cout << "[" + Te2String( it->pt1.x(),1 ) + " , " +
+        Te2String( it->pt1.y(),1 ) + "] -> [" +
+        Te2String( it->pt2.x(),1 ) + " , " + 
+        Te2String( it->pt2.y(),1 ) + "]" << std::endl;
+      
+      ++it;
+    }
+  }
+  
+  /* Tie-points draw */
+  
+  raster2Tiff( input_image1_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TeMIMatching_test_sameImageGreenXRedTest_input_image1.tif",
+    out_tie_points_ptr, 0 );
+  raster2Tiff( input_image2_ptr, 1, TEPDIEXAMPLESBINPATH
+    "TeMIMatching_test_sameImageGreenXRedTest_input_image2.tif",
+    out_tie_points_ptr, 1 );    
+    
+  TEAGN_WATCH( (unsigned int)out_tie_points_ptr->size() );
+  TEAGN_CHECK_EPS( 4, out_tie_points_ptr->size(),
+    0, "Invalid tie-points number" )    
+}
+
+void sameImageGreenXBlueTest()
+{
+  /* Creating parameters */
+
+  TePDIParameters params;
+  
+  TePDITypes::TePDIRasterPtrType input_image1_ptr( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_rgb342_crop1.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_image1_ptr->init(), 
+    "Unable to init input_image1_ptr" );    
+  params.SetParameter( "input_image1_ptr" , input_image1_ptr );
+  
+  params.SetParameter( "input_channel1" , (unsigned int)1 );
+    
+  TePDITypes::TePDIRasterPtrType input_image2_ptr( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_rgb342_crop1.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_image2_ptr->init(), 
+    "Unable to init input_image2_ptr" ); 
+  params.SetParameter( "input_image2_ptr" , input_image2_ptr ); 
+  
+  params.SetParameter( "input_channel2" , (unsigned int)2 );       
+    
+  TeSharedPtr< TeCoordPairVect > out_tie_points_ptr( new TeCoordPairVect );
+  params.SetParameter( "out_tie_points_ptr" , out_tie_points_ptr );        
+  
+  TeBox input_box1( TeCoord2D( 142, 826 ) , 
+    TeCoord2D( 542, 426 ) );
+  params.SetParameter( "input_box1" , input_box1 );
+  
+  TeBox input_box2( TeCoord2D( 238, 689 ) , 
+    TeCoord2D( 391, 473 ) );
+  params.SetParameter( "input_box2" , input_box2 );  
+  
+  params.SetParameter( "enable_multi_thread" , (int)1 ); 
+  
+  params.SetParameter( "pixel_x_relation" , (double)1 ); 
+  params.SetParameter( "pixel_y_relation" , (double)1 ); 
+  
+  TePDIMIMatching match_instance; 
+  match_instance.ToggleProgInt( true );
+  TEAGN_TRUE_OR_THROW( match_instance.Reset( params ),
+    "Algorithm reset error" )
+    
+  TEAGN_LOGMSG( "Algorithm started" )
+  
+  time_t init_time = clock() / CLOCKS_PER_SEC;
+    
+  TEAGN_TRUE_OR_THROW( match_instance.Apply(),
+    "Algorithm apply error" )      
+    
+  time_t end_time = clock() / CLOCKS_PER_SEC;
+  
+  TEAGN_LOGMSG( "Time elapsed (sameImageDifBoxesTest): " + 
+    TeAgnostic::to_string( (long int)( end_time - init_time ) ) +
+    " seconds" );
+    
+  /* Displaying tie-points */
+  {
+    TeCoordPairVect::iterator it = out_tie_points_ptr->begin();
+    TeCoordPairVect::iterator it_end = out_tie_points_ptr->end();
+    
+    while( it != it_end ) {
+      std::cout << "[" + Te2String( it->pt1.x(),1 ) + " , " +
+        Te2String( it->pt1.y(),1 ) + "] -> [" +
+        Te2String( it->pt2.x(),1 ) + " , " + 
+        Te2String( it->pt2.y(),1 ) + "]" << std::endl;
+      
+      ++it;
+    }
+  }
+  
+  /* Tie-points draw */
+  
+  raster2Tiff( input_image1_ptr, 1, TEPDIEXAMPLESBINPATH
+    "TeMIMatching_test_sameImageGreenXBlueTest_input_image1.tif",
+    out_tie_points_ptr, 0 );
+  raster2Tiff( input_image2_ptr, 2, TEPDIEXAMPLESBINPATH
+    "TeMIMatching_test_sameImageGreenXBlueTest_input_image2.tif",
+    out_tie_points_ptr, 1 );    
+    
+  TEAGN_WATCH( (unsigned int)out_tie_points_ptr->size() );
+  TEAGN_CHECK_EPS( 4, out_tie_points_ptr->size(),
+    0, "Invalid tie-points number" )    
+}
+
+void sameInvertedImageTest()
+{
+  /* Creating parameters */
+
+  TePDIParameters params;
+  
+  TePDITypes::TePDIRasterPtrType input_image1_ptr( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_rgb342_crop1.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_image1_ptr->init(), 
+    "Unable to init input_image1_ptr" );    
+  params.SetParameter( "input_image1_ptr" , input_image1_ptr );
+  
+  params.SetParameter( "input_channel1" , (unsigned int)0 );
+    
+  TePDITypes::TePDIRasterPtrType input_image2_ptr;
+  {
+    TePDITypes::TePDIRasterPtrType di2_ptr( new TeRaster(
+      std::string( TEPDIEXAMPLESRESPATH "cbers_rgb342_crop1.tif" ), 'r' ) );
+    TEAGN_TRUE_OR_THROW( di2_ptr->init(), 
+      "Unable to init input_image2_ptr" ); 
+      
+    TeRasterParams input_image2_pars = di2_ptr->params();
+    input_image2_pars.nBands( 1 );
+    
+    TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( input_image2_ptr,
+      input_image2_pars, false ), "Raster alloc error" )
+      
+    double value = 0;
+    for( int lin = 0 ; lin < input_image2_pars.nlines_ ; ++lin )
+      for( int col = 0 ; col < input_image2_pars.ncols_ ; ++col )
+      {
+        di2_ptr->getElement( col, lin, value, 0 );
+        input_image2_ptr->setElement( col, lin, 255.0 - value, 0 );
+      }
+  }
+  params.SetParameter( "input_image2_ptr" , input_image2_ptr ); 
+  
+  params.SetParameter( "input_channel2" , (unsigned int)0 );       
+    
+  TeSharedPtr< TeCoordPairVect > out_tie_points_ptr( new TeCoordPairVect );
+  params.SetParameter( "out_tie_points_ptr" , out_tie_points_ptr );        
+  
+  TeBox input_box1( TeCoord2D( 142, 826 ) , 
+    TeCoord2D( 542, 426 ) );
+  params.SetParameter( "input_box1" , input_box1 );
+  
+  TeBox input_box2( TeCoord2D( 238, 689 ) , 
+    TeCoord2D( 391, 473 ) );
+  params.SetParameter( "input_box2" , input_box2 );  
+  
+  params.SetParameter( "enable_multi_thread" , (int)1 ); 
+  
+  params.SetParameter( "pixel_x_relation" , (double)1 ); 
+  params.SetParameter( "pixel_y_relation" , (double)1 ); 
+  
+  TePDIMIMatching match_instance; 
+  match_instance.ToggleProgInt( true );
+  TEAGN_TRUE_OR_THROW( match_instance.Reset( params ),
+    "Algorithm reset error" )
+    
+  TEAGN_LOGMSG( "Algorithm started" )
+  
+  time_t init_time = clock() / CLOCKS_PER_SEC;
+    
+  TEAGN_TRUE_OR_THROW( match_instance.Apply(),
+    "Algorithm apply error" )      
+    
+  time_t end_time = clock() / CLOCKS_PER_SEC;
+  
+  TEAGN_LOGMSG( "Time elapsed (sameImageDifBoxesTest): " + 
+    TeAgnostic::to_string( (long int)( end_time - init_time ) ) +
+    " seconds" );
+    
+  /* Displaying tie-points */
+  {
+    TeCoordPairVect::iterator it = out_tie_points_ptr->begin();
+    TeCoordPairVect::iterator it_end = out_tie_points_ptr->end();
+    
+    while( it != it_end ) {
+      std::cout << "[" + Te2String( it->pt1.x(),1 ) + " , " +
+        Te2String( it->pt1.y(),1 ) + "] -> [" +
+        Te2String( it->pt2.x(),1 ) + " , " + 
+        Te2String( it->pt2.y(),1 ) + "]" << std::endl;
+      
+      ++it;
+    }
+  }
+  
+  /* Tie-points draw */
+  
+  raster2Tiff( input_image1_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TeMIMatching_test_sameInvertedImageTest_input_image1.tif",
+    out_tie_points_ptr, 0 );
+  raster2Tiff( input_image2_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TeMIMatching_test_sameInvertedImageTest_input_image2.tif",
+    out_tie_points_ptr, 0 );    
+    
+  TEAGN_WATCH( (unsigned int)out_tie_points_ptr->size() );
+  TEAGN_CHECK_EPS( 4, out_tie_points_ptr->size(),
+    0, "Invalid tie-points number" )    
+}
+
+int main()
+{
+  TEAGN_LOGMSG( "Test started." );
+
+  try{
+    TeStdIOProgress pi;
+    TeProgress::setProgressInterf( dynamic_cast< TeProgressBase* >( &pi ) );     
+    
+    time_t init_time = clock() / CLOCKS_PER_SEC;
+    
+    sameImageTest();
+    sameImageTest2();
+    halfsampledImageTest();
+    halfsampledImageTest2();
+    sameImageGreenXRedTest();
+    sameImageGreenXBlueTest();
+    sameInvertedImageTest();
+    
+    time_t end_time = clock() / CLOCKS_PER_SEC;
+    
+    TEAGN_LOGMSG( "Total elapsed time: " + 
+      TeAgnostic::to_string( (long int)( end_time - init_time ) ) +
+      " seconds" );    
+  }
+  catch( const TeException& e ){
+    TEAGN_LOGERR( "Test Failed - " + e.message() );
+    return EXIT_FAILURE;
+  }  
+
+  TEAGN_LOGMSG( "Test OK." );
+  return EXIT_SUCCESS;
+}
+
diff --git a/examples/image_processing/source/TePDIMIMatching/TePDIMIMatching_test.vcproj b/examples/image_processing/source/TePDIMIMatching/TePDIMIMatching_test.vcproj
new file mode 100644
index 0000000..acf86db
--- /dev/null
+++ b/examples/image_processing/source/TePDIMIMatching/TePDIMIMatching_test.vcproj
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="TePDIMIMatching_test"
+	ProjectGUID="{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	RootNamespace="TePDIMIMatching_test"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="0">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;../base;../../../../src/terralib/image_processing;../../../../src/terralib/kernel;../../../../src/tiff"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PDIAGN_ENABLE_STDOUT_LOG"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Debug/terralibpdi/terralibpdi.lib ../../../../Debug/terralib/terralib.lib ../../../../Debug/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Debug/libjpeg/libjpeg.lib ../../../../Debug/shapelib/shapelib.lib user32.lib $(NOINHERIT)"
+				OutputFile="$(OutDir)/TePDIMIMatching_test.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreAllDefaultLibraries="FALSE"
+				IgnoreDefaultLibraryNames="msvcrt.lib,libcmt.lib;libc.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"
+				TargetMachine="0"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories=".;../../../../src/terralib/image_processing;../base;../../../../src/terralib/kernel;../../../../src/shapelib"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Release/terralibpdi/terralibpdi.lib ../../../../Release/terralib/terralib.lib ../../../../Release/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Release/libjpeg/libjpeg.lib ../../../../Release/shapelib/shapelib.lib"
+				OutputFile="$(OutDir)/TePDIMIMatching_test.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\TePDIMIMatching_test.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/image_processing/source/TePDIMMIOMatching/TePDIMMIOMatching.pro b/examples/image_processing/source/TePDIMMIOMatching/TePDIMMIOMatching.pro
new file mode 100644
index 0000000..f9309a8
--- /dev/null
+++ b/examples/image_processing/source/TePDIMMIOMatching/TePDIMMIOMatching.pro
@@ -0,0 +1,7 @@
+include( ../base/base.pro )
+
+SOURCES += \
+  TePDIMMIOMatching_test.cpp
+
+QMAKE_CLEAN += \
+  ../../bin/TePDIMMIOMatching*.tif
diff --git a/examples/image_processing/source/TePDIMMIOMatching/TePDIMMIOMatching_test.cpp b/examples/image_processing/source/TePDIMMIOMatching/TePDIMMIOMatching_test.cpp
new file mode 100644
index 0000000..3dd2566
--- /dev/null
+++ b/examples/image_processing/source/TePDIMMIOMatching/TePDIMMIOMatching_test.cpp
@@ -0,0 +1,937 @@
+#define TEAGN_ENABLE_STDOUT_LOG
+
+#include <TePDIExamplesBase.hpp>
+
+#include <TePDIMMIOMatching.hpp>
+#include <TePDIUtils.hpp>
+
+#include <TeGTParams.h>
+#include <TeProgress.h>
+#include <TeStdIOProgress.h>
+#include <TeAgnostic.h>
+#include <TeDefines.h>
+
+#include <math.h>
+
+#ifndef M_PI
+  #define M_PI       3.14159265358979323846
+#endif
+#ifndef M_PI_2
+  #define M_PI_2     1.57079632679489661923
+#endif
+#ifndef M_PI_4
+  #define M_PI_4     0.785398163397448309616
+#endif
+
+void raster2Tiff( 
+  const TePDITypes::TePDIRasterPtrType& input_raster_ptr,
+  unsigned int raster_channel,
+  const std::string& out_file_name,
+  TeSharedPtr< TeCoordPairVect > out_tie_points_ptr,
+  unsigned int tie_points_space )
+{   
+  TEAGN_TRUE_OR_THROW( ( ! out_file_name.empty() ), 
+    "Invalid file name" )
+  TEAGN_TRUE_OR_THROW( ( input_raster_ptr->params().nlines_ > 0 ), 
+    "Invalid matrix lines" )
+  TEAGN_TRUE_OR_THROW( ( input_raster_ptr->params().ncols_ > 0 ), 
+    "Invalid matrix cols" )
+    
+  TeRasterParams params;
+  params.setNLinesNColumns( input_raster_ptr->params().nlines_,
+    input_raster_ptr->params().ncols_ );
+  params.nBands( 1 );
+  params.setDataType( TeUNSIGNEDCHAR, -1 );
+  params.nBands( 1 );
+  params.decoderIdentifier_ = "TIF";
+  params.mode_ = 'c';
+  params.fileName_ = out_file_name;
+  
+  TeRaster out_raster( params );
+  TEAGN_TRUE_OR_THROW( out_raster.init(), "Error init raster" );
+  double value = 0;
+  
+  for( int line = 0 ; 
+    line < input_raster_ptr->params().nlines_ ; ++line ) {
+    for( int col = 0 ; 
+      col < input_raster_ptr->params().ncols_ ; 
+      ++col ) {
+      
+      input_raster_ptr->getElement( col, line, value, 
+        raster_channel );
+      
+
+      TEAGN_TRUE_OR_THROW( out_raster.setElement( col, line, 
+        MIN( 254.0, value ), 0 ),
+        "Error writing raster" )
+    }  
+  }
+  
+  /* Draw tie-points */
+  
+  if( out_tie_points_ptr.isActive() ) {
+    TeCoordPairVect::iterator it = out_tie_points_ptr->begin();
+    TeCoordPairVect::iterator it_end = out_tie_points_ptr->end();
+    
+    while( it != it_end ) {
+      int x = 0;
+      int y = 0;
+      
+      if( tie_points_space == 0 ) {
+         x = TeRound( it->pt1.x() );
+         y = TeRound( it->pt1.y() );
+      } else {
+         x = TeRound( it->pt2.x() );
+         y = TeRound( it->pt2.y() );
+      }
+      
+      TEAGN_TRUE_OR_THROW( ( x < input_raster_ptr->params().ncols_ ),
+        "Invalid maxima column" )
+      TEAGN_TRUE_OR_THROW( ( x >= 0 ),
+        "Invalid maxima column" )      
+      TEAGN_TRUE_OR_THROW( ( y < input_raster_ptr->params().nlines_ ),
+        "Invalid maxima line" )
+      TEAGN_TRUE_OR_THROW( ( y >= 0 ),
+        "Invalid maxima line" )      
+      
+      TEAGN_TRUE_OR_THROW( out_raster.setElement( x, y, 
+        255.0, 0 ),
+        "Error writing raster" )    
+    
+      ++it;
+    }
+  
+  }
+}
+
+
+void rotateRasterClockWize( 
+  const TePDITypes::TePDIRasterPtrType& input_raster_ptr,
+  const TePDITypes::TePDIRasterPtrType& output_raster_ptr,
+  double angle )
+{
+  TEAGN_TRUE_OR_THROW( input_raster_ptr.isActive(),
+    "Invalid input pointer" );
+  TEAGN_TRUE_OR_THROW( output_raster_ptr.isActive(),
+    "Invalid output pointer" );    
+    
+  const double input_raster_lines = 
+    (double)input_raster_ptr->params().nlines_;
+  const double input_raster_cols = 
+    (double)input_raster_ptr->params().ncols_;
+  const unsigned int input_raster_channels =
+    (unsigned int)input_raster_ptr->nBands();
+    
+  const double last_x_idx = input_raster_cols - 1.0;
+  const double last_y_idx = input_raster_lines - 1.0;
+    
+  const double angle_cos = cos( angle );
+  const double angle_sin = sin( angle );
+  
+  /* Calc new image geometry */
+    
+  double min_x = MIN( 0.0, ( angle_cos * last_x_idx ) - 
+    ( angle_sin * last_y_idx ) );
+  min_x = MIN( min_x, ( angle_cos * last_x_idx ) );
+  min_x = MIN( min_x, ( -1.0 * angle_sin * last_y_idx ) );
+  
+  double max_x = MAX( 0.0, ( angle_cos * last_x_idx ) - 
+    ( angle_sin * last_y_idx ) );
+  max_x = MAX( max_x, ( angle_cos * last_x_idx ) );
+  max_x = MAX( max_x, ( -1.0 * angle_sin * last_y_idx ) );
+  
+  double min_y = MIN( 0.0, ( angle_sin * last_x_idx ) + 
+    ( angle_cos * last_y_idx ) );
+  min_y = MIN( min_y, ( angle_sin * last_x_idx ) );
+  min_y = MIN( min_y, ( angle_cos * last_y_idx ) );
+  
+  double max_y = MAX( 0.0, ( angle_sin * last_x_idx ) + 
+    ( angle_cos * last_y_idx ) );
+  max_y = MAX( max_y, ( angle_sin * last_x_idx ) );
+  max_y = MAX( max_y, ( angle_cos * last_y_idx ) );
+  
+  const unsigned int out_lines = (unsigned int) ceil(
+    max_y - min_y );
+  const unsigned int out_cols = (unsigned int) ceil(
+    max_x - min_x );
+    
+  /* reseting output raster */
+  
+  TeCoord2D ll_point_input_ref_indexed( min_x,
+    max_y );
+  TeCoord2D ur_point_input_ref_indexed( max_x,
+    min_y );
+    
+  TeCoord2D ll_point_input_ref = 
+    input_raster_ptr->index2Coord( ll_point_input_ref_indexed );
+  TeCoord2D ur_point_input_ref = 
+    input_raster_ptr->index2Coord( ur_point_input_ref_indexed );    
+  
+  TeRasterParams new_out_params = output_raster_ptr->params();
+  
+  new_out_params.boundingBoxLinesColumns(
+    ll_point_input_ref.x(), ll_point_input_ref.y(),
+    ur_point_input_ref.x(), ur_point_input_ref.y(),
+    out_lines, out_cols );
+    
+  TEAGN_TRUE_OR_THROW( output_raster_ptr->init( new_out_params ),
+    "Error reseting output raster" )
+  
+  /* remapping pixels */
+    
+  unsigned int curr_out_x = 0;
+  unsigned int curr_out_y = 0;
+  double value = 0;
+  unsigned int curr_in_x = 0;
+  unsigned int curr_in_y = 0;
+  unsigned int curr_channel = 0;
+  
+  for( curr_channel = 0 ; curr_channel < input_raster_channels ;
+    ++curr_channel ) {
+    for( curr_out_y = 0 ; curr_out_y < out_lines ; ++curr_out_y ) {
+      for( curr_out_x = 0 ; curr_out_x < out_cols ; ++curr_out_x ) {
+        curr_in_x = 
+          TeRound( 
+            ( angle_cos * ( curr_out_x + min_x ) ) + 
+            ( angle_sin * ( curr_out_y + min_y ) )
+          );
+        curr_in_y = 
+          TeRound( 
+            ( -1.0 * angle_sin * ( curr_out_x + min_x ) ) + 
+            ( angle_cos * ( curr_out_y + min_y ) )
+          );
+        
+        if( input_raster_ptr->getElement( curr_in_x, curr_in_y,
+          value, curr_channel ) ) {
+        
+          output_raster_ptr->setElement( curr_out_x, curr_out_y,
+            value, curr_channel );
+        } else {
+          output_raster_ptr->setElement( curr_out_x, curr_out_y,
+            0, curr_channel );        
+        }
+      }
+    }
+  }
+  
+  return;
+}
+
+
+void sameImageAndBoxesTest()
+{
+  /* Creating parameters */
+
+  TePDIParameters params;
+  
+  TePDITypes::TePDIRasterPtrType input_image1_ptr;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::loadRaster( 
+    std::string( TEPDIEXAMPLESRESPATH "cbers_rgb342_crop1.tif" ), 
+    input_image1_ptr, true ), "Error loading raster" );
+  params.SetParameter( "input_image1_ptr" , input_image1_ptr );
+  
+  params.SetParameter( "input_channel1" , (unsigned int)0 );
+    
+  TePDITypes::TePDIRasterPtrType input_image2_ptr;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::loadRaster( 
+    std::string( TEPDIEXAMPLESRESPATH "cbers_rgb342_crop1.tif" ), 
+    input_image2_ptr, true ), "Error loading raster" );
+  params.SetParameter( "input_image2_ptr" , input_image2_ptr ); 
+  
+  params.SetParameter( "input_channel2" , (unsigned int)0 );       
+    
+  TeSharedPtr< TeCoordPairVect > out_tie_points_ptr( new TeCoordPairVect );
+  params.SetParameter( "out_tie_points_ptr" , out_tie_points_ptr );        
+  
+  params.SetParameter( "matching_method", 
+    TePDIMMIOMatching::NormCrossCorrMethod );
+  
+  TeGTParams gt_params;
+  gt_params.transformation_name_ = "affine";
+  gt_params.out_rem_strat_ = TeGTParams::LWAOutRemotion;
+  gt_params.max_dmap_error_ = 2.0;
+  gt_params.max_imap_error_ = 2.0;
+  params.SetParameter( "gt_params" , gt_params ); 
+  
+  TeBox input_box1_proj = input_image1_ptr->params().box();
+  TeBox input_box1;
+  TePDIUtils::MapCoords2RasterIndexes( input_box1_proj, 
+    input_image1_ptr, input_box1 );
+  params.SetParameter( "input_box1" , input_box1 );
+  
+  params.SetParameter( "input_box2" , input_box1 );
+  
+  params.SetParameter( "enable_multi_thread" , (int)1 ); 
+  
+  // We can skip the geometry filter for this case since the images
+  // are the same
+  params.SetParameter( "skip_geom_filter" , (int)1 );
+  
+  params.SetParameter( "pixel_x_relation" , (double)1 ); 
+  params.SetParameter( "pixel_y_relation" , (double)1 ); 
+  
+  params.SetParameter( "max_tie_points" , (unsigned int)1000 ); 
+  params.SetParameter( "corr_window_width" , (unsigned int)13 );
+  params.SetParameter( "moravec_window_width" , (unsigned int)11 );
+  
+  TeGTParams::pointer out_gt_params_ptr( new TeGTParams );
+  params.SetParameter( "out_gt_params_ptr" , out_gt_params_ptr );
+  
+  params.SetParameter( "variance_min_thrs" , (double)1 ); 
+  
+  TePDIMMIOMatching match_instance; 
+
+  TEAGN_TRUE_OR_THROW( match_instance.Reset( params ),
+    "Algorithm reset error" )
+    
+  TEAGN_LOGMSG( "Algorithm started" )
+  
+  time_t init_time = clock() / CLOCKS_PER_SEC ;
+  
+  TEAGN_TRUE_OR_THROW( match_instance.Apply(),
+    "Algorithm apply error" )      
+    
+  time_t end_time = clock() / CLOCKS_PER_SEC;
+  
+  TEAGN_LOGMSG( "Time elapsed (sameImageAndBoxesTest): " + 
+    TeAgnostic::to_string( (long int)( end_time - init_time ) ) +
+    " seconds" );
+    
+  /* Displaying tie-points */
+  {
+    TeCoordPairVect::iterator it = out_tie_points_ptr->begin();
+    TeCoordPairVect::iterator it_end = out_tie_points_ptr->end();
+    
+    while( it != it_end ) {
+      std::cout << "[" + Te2String( it->pt1.x(),1 ) + " , " +
+        Te2String( it->pt1.y(),1 ) + "] -> [" +
+        Te2String( it->pt2.x(),1 ) + " , " + 
+        Te2String( it->pt2.y(),1 ) + "]" << std::endl;
+      
+      ++it;
+    }
+  }
+  
+  /* Tie-points draw */
+  
+  raster2Tiff( input_image1_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TePDIMMIOMatching_test_sameImageAndBoxesTest_input_image1.tif",
+    out_tie_points_ptr, 0 );
+  raster2Tiff( input_image2_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TePDIMMIOMatching_test_sameImageAndBoxesTest_input_image2.tif",
+    out_tie_points_ptr, 1 );    
+    
+  /* Checking tie-points */
+  
+  {
+    TeCoordPairVect::iterator it = out_tie_points_ptr->begin();
+    TeCoordPairVect::iterator it_end = out_tie_points_ptr->end();
+    
+    while( it != it_end ) {
+      TEAGN_CHECK_EPS( it->pt1.x(), it->pt2.x(), 0, 
+        "Invalid tie-point" )
+      TEAGN_CHECK_EPS( it->pt1.y(), it->pt2.y(), 0, 
+        "Invalid tie-point" )
+      
+      ++it;
+    }
+  }
+      
+  TEAGN_CHECK_EPS( 775, out_tie_points_ptr->size(),
+    0, "Invalid tie-points number" )    
+}
+
+
+void sameImageDifBoxesTest()
+{
+  /* Creating parameters */
+
+  TePDIParameters params;
+  
+  
+  TePDITypes::TePDIRasterPtrType input_image1_ptr;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::loadRaster( 
+    std::string( TEPDIEXAMPLESRESPATH "cbers_rgb342_crop1.tif" ), 
+    input_image1_ptr, true ), "Error loading raster" );
+  params.SetParameter( "input_image1_ptr" , input_image1_ptr );
+  
+  params.SetParameter( "input_channel1" , (unsigned int)0 );
+    
+  TePDITypes::TePDIRasterPtrType input_image2_ptr;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::loadRaster( 
+    std::string( TEPDIEXAMPLESRESPATH "cbers_rgb342_crop1.tif" ), 
+    input_image2_ptr, true ), "Error loading raster" );
+  params.SetParameter( "input_image2_ptr" , input_image2_ptr ); 
+  
+  params.SetParameter( "input_channel2" , (unsigned int)0 );    
+    
+  TeSharedPtr< TeCoordPairVect > out_tie_points_ptr( new TeCoordPairVect );
+  params.SetParameter( "out_tie_points_ptr" , out_tie_points_ptr );        
+  
+  params.SetParameter( "matching_method", TePDIMMIOMatching::NormCrossCorrMethod );
+  
+  TeGTParams gt_params;
+  gt_params.transformation_name_ = "affine";
+  gt_params.out_rem_strat_ = TeGTParams::LWAOutRemotion;
+  gt_params.max_dmap_error_ = 0.5;
+  gt_params.max_imap_error_ = 0.5;
+  params.SetParameter( "gt_params" , gt_params ); 
+  
+  TeBox input_box1( TeCoord2D( 0, 760 ) , TeCoord2D( 680, 0 ) );
+  params.SetParameter( "input_box1" , input_box1 );
+  
+  TeBox input_box2( 
+    TeCoord2D( 190, input_image1_ptr->params().nlines_ - 1 ) , 
+    TeCoord2D( input_image1_ptr->params().ncols_ - 1, 227 ) );
+  params.SetParameter( "input_box2" , input_box2 );   
+  
+//  params.SetParameter( "skip_geom_filter" , (int)1 );
+  
+  params.SetParameter( "pixel_x_relation" , (double)1 ); 
+  params.SetParameter( "pixel_y_relation" , (double)1 ); 
+  
+  params.SetParameter( "max_tie_points" , (unsigned int)1000 ); 
+  params.SetParameter( "corr_window_width" , (unsigned int)13 );
+  params.SetParameter( "moravec_window_width" , (unsigned int)11 );
+  
+  params.SetParameter( "variance_min_thrs" , (double)1 );
+  
+  TePDIMMIOMatching match_instance; 
+
+  TEAGN_TRUE_OR_THROW( match_instance.Reset( params ),
+    "Algorithm reset error" )
+    
+  TEAGN_LOGMSG( "Algorithm started" )
+  
+  time_t init_time = clock() / CLOCKS_PER_SEC;
+    
+  TEAGN_TRUE_OR_THROW( match_instance.Apply(),
+    "Algorithm apply error" )      
+    
+  time_t end_time = clock() / CLOCKS_PER_SEC;
+  
+  TEAGN_LOGMSG( "Time elapsed (sameImageDifBoxesTest): " + 
+    TeAgnostic::to_string( (long int)( end_time - init_time ) ) +
+    " seconds" );
+    
+  /* Displaying tie-points */
+  {
+    TeCoordPairVect::iterator it = out_tie_points_ptr->begin();
+    TeCoordPairVect::iterator it_end = out_tie_points_ptr->end();
+    
+    while( it != it_end ) {
+      std::cout << "[" + Te2String( it->pt1.x(),1 ) + " , " +
+        Te2String( it->pt1.y(),1 ) + "] -> [" +
+        Te2String( it->pt2.x(),1 ) + " , " + 
+        Te2String( it->pt2.y(),1 ) + "]" << std::endl;
+      
+      ++it;
+    }
+  }
+  
+  /* Tie-points draw */
+  
+  raster2Tiff( input_image1_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TePDIMMIOMatching_test_sameImageDifBoxesTest_input_image1.tif",
+    out_tie_points_ptr, 0 );
+  raster2Tiff( input_image2_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TePDIMMIOMatching_test_sameImageDifBoxesTest_input_image2.tif",
+    out_tie_points_ptr, 1 );    
+    
+  /* Checking tie-points */
+  
+  {
+    TeCoordPairVect::iterator it = out_tie_points_ptr->begin();
+    TeCoordPairVect::iterator it_end = out_tie_points_ptr->end();
+    
+    while( it != it_end ) {
+      TEAGN_CHECK_EPS( it->pt1.x(), it->pt2.x(), 0, 
+        "Invalid tie-point" )
+      TEAGN_CHECK_EPS( it->pt1.y(), it->pt2.y(), 0, 
+        "Invalid tie-point" )
+      
+      ++it;
+    }
+  }
+      
+  TEAGN_CHECK_EPS( 158, out_tie_points_ptr->size(),
+    0, "Invalid tie-points number" )    
+}
+
+
+void halfsampledImageTest()
+{
+  /* Creating parameters */
+
+  TePDIParameters params;
+  
+  TePDITypes::TePDIRasterPtrType input_image1_ptr;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::loadRaster( 
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 
+    input_image1_ptr, true ), "Error loading raster" );
+  params.SetParameter( "input_image1_ptr" , input_image1_ptr );
+  
+  params.SetParameter( "input_channel1" , (unsigned int)0 );
+    
+  TePDITypes::TePDIRasterPtrType input_image2_ptr;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::loadRaster( 
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop_contraste_halfsampled.tif" ), 
+    input_image2_ptr, true ), "Error loading raster" );
+  params.SetParameter( "input_image2_ptr" , input_image2_ptr ); 
+  
+  params.SetParameter( "input_channel2" , (unsigned int)0 );    
+    
+  TeSharedPtr< TeCoordPairVect > out_tie_points_ptr( new TeCoordPairVect );
+  params.SetParameter( "out_tie_points_ptr" , out_tie_points_ptr );        
+  
+  params.SetParameter( "matching_method", TePDIMMIOMatching::NormCrossCorrMethod );
+  
+  TeGTParams gt_params;
+  gt_params.transformation_name_ = "affine";
+  gt_params.out_rem_strat_ = TeGTParams::LWAOutRemotion;
+  gt_params.max_dmap_error_ = 2.0;
+  gt_params.max_imap_error_ = 2.0;
+  params.SetParameter( "gt_params" , gt_params ); 
+  
+  TeBox input_box1( TeCoord2D( 122.0, 698.0 ), 
+    TeCoord2D( 730.0, 138.0 ) );
+  params.SetParameter( "input_box1" , input_box1 );
+  
+  TeBox input_box2( TeCoord2D( 110.0, 305.0 ), 
+    TeCoord2D( 385.0, 50.0 ) );
+  params.SetParameter( "input_box2" , input_box2 );   
+  
+  params.SetParameter( "enable_multi_thread" , (int)1 ); 
+//  params.SetParameter( "skip_geom_filter" , (int)1 );
+  params.SetParameter( "corr_window_width" , (unsigned int)13 );
+  params.SetParameter( "moravec_window_width" , (unsigned int)11 );
+  
+  params.SetParameter( "pixel_x_relation" , (double)0.5 ); 
+  params.SetParameter( "pixel_y_relation" , (double)0.5 ); 
+  
+  params.SetParameter( "max_tie_points" , (unsigned int)1000 ); 
+  
+  params.SetParameter( "variance_min_thrs" , (double)1 ); 
+  
+  TePDIMMIOMatching match_instance; 
+
+  TEAGN_TRUE_OR_THROW( match_instance.Reset( params ),
+    "Algorithm reset error" )
+    
+  TEAGN_LOGMSG( "Algorithm started" )
+  
+  time_t init_time = clock() / CLOCKS_PER_SEC;
+    
+  TEAGN_TRUE_OR_THROW( match_instance.Apply(),
+    "Algorithm apply error" )      
+    
+  time_t end_time = clock() / CLOCKS_PER_SEC;
+  
+  TEAGN_LOGMSG( "Time elapsed (halfsampledImageTest): " + 
+    TeAgnostic::to_string( (long int)( end_time - init_time ) ) +
+    " seconds" );
+    
+  /* Displaying tie-points */
+  
+  TeCoordPairVect::iterator it = out_tie_points_ptr->begin();
+  TeCoordPairVect::iterator it_end = out_tie_points_ptr->end();
+  
+  while( it != it_end ) {
+    std::cout << "[" + Te2String( it->pt1.x(),1 ) + " , " +
+      Te2String( it->pt1.y(),1 ) + "] -> [" +
+      Te2String( it->pt2.x(),1 ) + " , " + 
+      Te2String( it->pt2.y(),1 ) + "]" << std::endl;
+    
+    ++it;
+  }
+  
+  /* Tie-points draw */
+  
+  raster2Tiff( input_image1_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TePDIMMIOMatching_test_halfsampledImageTest_input_image1.tif",
+    out_tie_points_ptr, 0 );
+  raster2Tiff( input_image2_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TePDIMMIOMatching_test_halfsampledImageTest_input_image2.tif",
+    out_tie_points_ptr, 1 );  
+    
+  TEAGN_WATCH( (unsigned int)out_tie_points_ptr->size() );
+  TEAGN_CHECK_EPS( 44, out_tie_points_ptr->size(),
+    0, "Invalid tie-points number" )         
+}
+
+
+void halfsampledImageTest2()
+{
+  /* Creating parameters */
+
+  TePDIParameters params;
+  
+  TePDITypes::TePDIRasterPtrType input_image1_ptr;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::loadRaster( 
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop_contraste_halfsampled.tif" ), 
+    input_image1_ptr, true ), "Error loading raster" );
+  params.SetParameter( "input_image1_ptr" , input_image1_ptr );
+  
+  params.SetParameter( "input_channel1" , (unsigned int)0 );
+    
+  TePDITypes::TePDIRasterPtrType input_image2_ptr;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::loadRaster( 
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 
+    input_image2_ptr, true ), "Error loading raster" );
+  params.SetParameter( "input_image2_ptr" , input_image2_ptr ); 
+  
+  params.SetParameter( "input_channel2" , (unsigned int)0 );   
+   
+  TeSharedPtr< TeCoordPairVect > out_tie_points_ptr( new TeCoordPairVect );
+  params.SetParameter( "out_tie_points_ptr" , out_tie_points_ptr );        
+  
+  params.SetParameter( "matching_method", TePDIMMIOMatching::NormCrossCorrMethod );
+  
+  TeGTParams gt_params;
+  gt_params.transformation_name_ = "affine";
+  gt_params.out_rem_strat_ = TeGTParams::LWAOutRemotion;
+  gt_params.max_dmap_error_ = 2.0;
+  gt_params.max_imap_error_ = 2.0;
+  params.SetParameter( "gt_params" , gt_params ); 
+  
+  TeBox input_box1( TeCoord2D( 110.0, 305.0 ), 
+    TeCoord2D( 385.0, 50.0 ) );    
+  params.SetParameter( "input_box1" , input_box1 );
+  
+  TeBox input_box2( TeCoord2D( 122.0, 698.0 ), 
+    TeCoord2D( 730.0, 138.0 ) );    
+  params.SetParameter( "input_box2" , input_box2 );   
+  
+  params.SetParameter( "enable_multi_thread" , (int)1 ); 
+//  params.SetParameter( "skip_geom_filter" , (int)1 );
+  
+  params.SetParameter( "pixel_x_relation" , (double)2 ); 
+  params.SetParameter( "pixel_y_relation" , (double)2 ); 
+  
+  params.SetParameter( "max_tie_points" , (unsigned int)1000 );
+  params.SetParameter( "corr_window_width" , (unsigned int)13 );
+  params.SetParameter( "moravec_window_width" , (unsigned int)11 );
+  
+  params.SetParameter( "variance_min_thrs" , (double)1 );
+  
+  TePDIMMIOMatching match_instance; 
+
+  TEAGN_TRUE_OR_THROW( match_instance.Reset( params ),
+    "Algorithm reset error" )
+    
+  TEAGN_LOGMSG( "Algorithm started" )
+  
+  time_t init_time = clock() / CLOCKS_PER_SEC;
+    
+  TEAGN_TRUE_OR_THROW( match_instance.Apply(),
+    "Algorithm apply error" )      
+    
+  time_t end_time = clock() / CLOCKS_PER_SEC;
+  
+  TEAGN_LOGMSG( "Time elapsed (halfsampledImageTest2): " + 
+    TeAgnostic::to_string( (long int)( end_time - init_time ) ) +
+    " seconds" );
+    
+  /* Displaying tie-points */
+  
+  TeCoordPairVect::iterator it = out_tie_points_ptr->begin();
+  TeCoordPairVect::iterator it_end = out_tie_points_ptr->end();
+  
+  while( it != it_end ) {
+    std::cout << "[" + Te2String( it->pt1.x(),1 ) + " , " +
+      Te2String( it->pt1.y(),1 ) + "] -> [" +
+      Te2String( it->pt2.x(),1 ) + " , " + 
+      Te2String( it->pt2.y(),1 ) + "]" << std::endl;
+    
+    ++it;
+  }
+  
+  /* Tie-points draw */
+  
+  raster2Tiff( input_image1_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TePDIMMIOMatching_test_halfsampledImageTest2_input_image1.tif",
+    out_tie_points_ptr, 0 );
+  raster2Tiff( input_image2_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TePDIMMIOMatching_test_halfsampledImageTest2_input_image2.tif",
+    out_tie_points_ptr, 1 );    
+    
+  TEAGN_WATCH( (unsigned int)out_tie_points_ptr->size() );
+  TEAGN_CHECK_EPS( 44, out_tie_points_ptr->size(),
+    0, "Invalid tie-points number" )     
+}
+
+
+void halfsampledRotadedImageTest()
+{
+  /* Open image 1 */
+
+  TePDIParameters params;
+  
+  TePDITypes::TePDIRasterPtrType input_image1_ptr;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::loadRaster( 
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 
+    input_image1_ptr, true ), "Error loading raster" );
+  params.SetParameter( "input_image1_ptr" , input_image1_ptr );
+  
+  params.SetParameter( "input_channel1" , (unsigned int)0 );
+  
+  /* Creating the half-sampled-rotated image 2 */
+    
+  TePDITypes::TePDIRasterPtrType input_disk_image2_ptr( new TeRaster(
+    std::string( 
+    TEPDIEXAMPLESRESPATH "cbers_b2_crop_contraste_halfsampled.tif" ), 
+    'r' ) );
+  TEAGN_TRUE_OR_THROW( input_disk_image2_ptr->init(), 
+    "Unable to init input_image2_ptr" );
+      
+  TePDITypes::TePDIRasterPtrType input_image2_ptr;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( 
+    input_image2_ptr, input_disk_image2_ptr->params(), 
+    TePDIUtils::TePDIUtilsAutoMemPol ),
+    "Error allocating raster memory" );
+    
+  rotateRasterClockWize( input_disk_image2_ptr, input_image2_ptr, M_PI_4 );
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( input_image2_ptr, 
+    TEPDIEXAMPLESBINPATH "TePDIMMIOMatching_test_rotatedimage.tif", 
+    TeUNSIGNEDCHAR ),
+    "Error saving rotated image" );
+      
+  params.SetParameter( "input_image2_ptr" , input_image2_ptr ); 
+  
+  /* Set the other parameters */
+  
+  params.SetParameter( "input_channel2" , (unsigned int)0 );       
+    
+  TeSharedPtr< TeCoordPairVect > out_tie_points_ptr( new TeCoordPairVect );
+  params.SetParameter( "out_tie_points_ptr" , out_tie_points_ptr );        
+  
+  params.SetParameter( "matching_method", 
+    TePDIMMIOMatching::NormCrossCorrMethod );
+  
+  TeBox input_box1( TeCoord2D( 122.0, 698.0 ), 
+    TeCoord2D( 730.0, 138.0 ) );
+  params.SetParameter( "input_box1" , input_box1 );
+  
+  TeBox input_box2( TeCoord2D( 173.0, 447.0 ), 
+    TeCoord2D( 434.0, 153.0 ) );
+  params.SetParameter( "input_box2" , input_box2 );   
+  
+  params.SetParameter( "enable_multi_thread" , (int)1 ); 
+//  params.SetParameter( "skip_geom_filter" , (int)1 );
+  params.SetParameter( "corr_window_width" , (unsigned int)13 );
+  params.SetParameter( "moravec_window_width" , (unsigned int)11 );
+  
+  params.SetParameter( "pixel_x_relation" , (double)0.5 ); 
+  params.SetParameter( "pixel_y_relation" , (double)0.5 ); 
+  
+  params.SetParameter( "variance_min_thrs" , (double)1 );
+  
+  TePDIMMIOMatching match_instance; 
+
+  TEAGN_TRUE_OR_THROW( match_instance.Reset( params ),
+    "Algorithm reset error" )
+    
+  TEAGN_LOGMSG( "Algorithm started" )
+  
+  time_t init_time = clock() / CLOCKS_PER_SEC;
+    
+  TEAGN_TRUE_OR_THROW( match_instance.Apply(),
+    "Algorithm apply error" )      
+    
+  time_t end_time = clock() / CLOCKS_PER_SEC;
+  
+  TEAGN_LOGMSG( "Time elapsed (halfsampledRotadedImageTest): " + 
+    TeAgnostic::to_string( (long int)( end_time - init_time ) ) +
+    " seconds" );
+    
+  /* Displaying tie-points */
+  
+  TeCoordPairVect::iterator it = out_tie_points_ptr->begin();
+  TeCoordPairVect::iterator it_end = out_tie_points_ptr->end();
+  
+  while( it != it_end ) {
+    std::cout << "[" + Te2String( it->pt1.x(),1 ) + " , " +
+      Te2String( it->pt1.y(),1 ) + "] -> [" +
+      Te2String( it->pt2.x(),1 ) + " , " + 
+      Te2String( it->pt2.y(),1 ) + "]" << std::endl;
+    
+    ++it;
+  }
+  
+  /* Tie-points draw */
+  
+  raster2Tiff( input_image1_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TePDIMMIOMatching_test_halfsampledRotadedImageTest_input_image1.tif",
+    out_tie_points_ptr, 0 );
+  raster2Tiff( input_image2_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TePDIMMIOMatching_test_halfsampledRotadedImageTest_input_image2.tif",
+    out_tie_points_ptr, 1 );   
+    
+  TEAGN_WATCH( (unsigned int)out_tie_points_ptr->size() );
+  TEAGN_CHECK_EPS( 31, out_tie_points_ptr->size(),
+    0, "Invalid tie-points number" )
+}
+
+void internalCacheTest()
+{
+  /* Creating parameters */
+
+  TePDIParameters params;
+  
+  TePDITypes::TePDIRasterPtrType input_image1_ptr;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::loadRaster( 
+    std::string( TEPDIEXAMPLESRESPATH "cbers_rgb342_crop1.tif" ), 
+    input_image1_ptr, true ), "Error loading raster" );
+  params.SetParameter( "input_image1_ptr" , input_image1_ptr );
+  
+  params.SetParameter( "input_channel1" , (unsigned int)0 );
+    
+  TePDITypes::TePDIRasterPtrType input_image2_ptr;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::loadRaster( 
+    std::string( TEPDIEXAMPLESRESPATH "cbers_rgb342_crop1.tif" ), 
+    input_image2_ptr, true ), "Error loading raster" );
+  params.SetParameter( "input_image2_ptr" , input_image2_ptr ); 
+  
+  params.SetParameter( "input_channel2" , (unsigned int)0 );       
+
+  params.SetParameter( "matching_method", 
+    TePDIMMIOMatching::NormCrossCorrMethod );
+  
+  TeGTParams gt_params;
+  gt_params.transformation_name_ = "affine";
+  gt_params.out_rem_strat_ = TeGTParams::LWAOutRemotion;
+  gt_params.max_dmap_error_ = 2.0;
+  gt_params.max_imap_error_ = 2.0;
+  params.SetParameter( "gt_params" , gt_params ); 
+  
+  TeBox input_box1_proj = input_image1_ptr->params().box();
+  TeBox input_box1;
+  TePDIUtils::MapCoords2RasterIndexes( input_box1_proj, 
+    input_image1_ptr, input_box1 );
+  params.SetParameter( "input_box1" , input_box1 );
+  
+  params.SetParameter( "input_box2" , input_box1 );
+  
+  params.SetParameter( "enable_multi_thread" , (int)1 ); 
+//  params.SetParameter( "skip_geom_filter" , (int)1 );
+  
+  params.SetParameter( "pixel_x_relation" , (double)1 ); 
+  params.SetParameter( "pixel_y_relation" , (double)1 ); 
+  
+  params.SetParameter( "max_tie_points" , (unsigned int)1000 ); 
+  params.SetParameter( "corr_window_width" , (unsigned int)13 );
+  params.SetParameter( "moravec_window_width" , (unsigned int)11 );
+  
+  TeGTParams::pointer out_gt_params_ptr( new TeGTParams );
+  params.SetParameter( "out_gt_params_ptr" , out_gt_params_ptr );
+  
+  params.SetParameter( "variance_min_thrs" , (double)1 ); 
+  
+  TePDIMMIOMatching match_instance; 
+    
+  TEAGN_LOGMSG( "Algorithm started" )
+  
+  TeSharedPtr< TeCoordPairVect > out_tie_points_ptr( new TeCoordPairVect );
+  params.SetParameter( "out_tie_points_ptr" , out_tie_points_ptr ); 
+  TEAGN_TRUE_OR_THROW( match_instance.Apply( params ),
+    "Algorithm apply error" )     
+       
+  TEAGN_LOGMSG( "Algorithm started" )
+    
+  TeSharedPtr< TeCoordPairVect > out_tie_points2_ptr( new TeCoordPairVect );
+  params.SetParameter( "out_tie_points_ptr" , out_tie_points2_ptr ); 
+  TEAGN_TRUE_OR_THROW( match_instance.Apply( params ),
+    "Algorithm apply error" )   
+
+  /* Displaying tie-points */
+  {
+    TeCoordPairVect::iterator it = out_tie_points_ptr->begin();
+    TeCoordPairVect::iterator it_end = out_tie_points_ptr->end();
+    
+    while( it != it_end ) {
+      std::cout << "[" + Te2String( it->pt1.x(),1 ) + " , " +
+        Te2String( it->pt1.y(),1 ) + "] -> [" +
+        Te2String( it->pt2.x(),1 ) + " , " + 
+        Te2String( it->pt2.y(),1 ) + "]" << std::endl;
+      
+      ++it;
+    }
+  }
+  
+  /* Tie-points draw */
+  
+  raster2Tiff( input_image1_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TePDIMMIOMatching_test_internalCacheTest_input_image1.tif",
+    out_tie_points_ptr, 0 );
+  raster2Tiff( input_image2_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TePDIMMIOMatching_test_internalCacheTest_input_image2.tif",
+    out_tie_points_ptr, 1 );    
+    
+  /* Checking tie-points */
+  
+  {
+    TEAGN_TRUE_OR_THROW( out_tie_points_ptr->size() ==
+      out_tie_points2_ptr->size(), "Size mismatch" );
+    
+    TeCoordPairVect::iterator it = out_tie_points_ptr->begin();
+    TeCoordPairVect::iterator it_end = out_tie_points_ptr->end();
+    TeCoordPairVect::iterator it2 = out_tie_points2_ptr->begin();
+    TeCoordPairVect::iterator it2_end = out_tie_points2_ptr->end();    
+    
+    while( it != it_end ) {
+      TEAGN_CHECK_EPS( it->pt1.x(), it->pt2.x(), 0, 
+        "Invalid tie-point" )
+      TEAGN_CHECK_EPS( it->pt1.y(), it->pt2.y(), 0, 
+        "Invalid tie-point" )
+          
+      TEAGN_CHECK_EPS( it->pt1.x(), it2->pt1.x(), 0, 
+        "Invalid tie-point" )          
+      TEAGN_CHECK_EPS( it->pt1.y(), it2->pt1.y(), 0, 
+        "Invalid tie-point" )          
+      TEAGN_CHECK_EPS( it->pt2.x(), it2->pt2.x(), 0, 
+        "Invalid tie-point" )          
+      TEAGN_CHECK_EPS( it->pt2.y(), it2->pt2.y(), 0, 
+        "Invalid tie-point" )          
+      
+      ++it2;
+      ++it;
+    }
+  }
+      
+  TEAGN_CHECK_EPS( 775, out_tie_points_ptr->size(),
+    0, "Invalid tie-points number" )    
+}
+
+
+int main()
+{
+  TEAGN_LOGMSG( "Test started." );
+
+  try{
+    TeStdIOProgress pi;
+    TeProgress::setProgressInterf( dynamic_cast< TeProgressBase* >( &pi ) );     
+    
+    time_t init_time = clock() / CLOCKS_PER_SEC;
+    
+    sameImageAndBoxesTest();
+    sameImageDifBoxesTest();
+    halfsampledImageTest();
+    halfsampledImageTest2();
+    halfsampledRotadedImageTest();
+    internalCacheTest();
+    
+    time_t end_time = clock() / CLOCKS_PER_SEC;
+    
+    TEAGN_LOGMSG( "Total elapsed time: " + 
+      TeAgnostic::to_string( (long int)( end_time - init_time ) ) +
+      " seconds" );    
+  }
+  catch( const TeException& e ){
+    TEAGN_LOGERR( "Test Failed - " + e.message() );
+    return EXIT_FAILURE;
+  }  
+
+  TEAGN_LOGMSG( "Test OK." );
+  return EXIT_SUCCESS;
+}
+
diff --git a/examples/image_processing/source/TePDIMMIOMatching/TePDIMMIOMatching_test.vcproj b/examples/image_processing/source/TePDIMMIOMatching/TePDIMMIOMatching_test.vcproj
new file mode 100644
index 0000000..115fc2e
--- /dev/null
+++ b/examples/image_processing/source/TePDIMMIOMatching/TePDIMMIOMatching_test.vcproj
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="TePDIMMIOMatching_test"
+	ProjectGUID="{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	RootNamespace="TePDIMMIOMatching_test"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="0">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;../base;../../../../src/terralib/image_processing;../../../../src/terralib/kernel;../../../../src/tiff"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PDIAGN_ENABLE_STDOUT_LOG"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Debug/terralibpdi/terralibpdi.lib ../../../../Debug/terralib/terralib.lib ../../../../Debug/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Debug/libjpeg/libjpeg.lib ../../../../Debug/shapelib/shapelib.lib user32.lib $(NOINHERIT)"
+				OutputFile="$(OutDir)/TePDIMMIOMatching_test.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreAllDefaultLibraries="FALSE"
+				IgnoreDefaultLibraryNames="msvcrt.lib,libcmt.lib;libc.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"
+				TargetMachine="0"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories=".;../../../../src/terralib/image_processing;../base;../../../../src/terralib/kernel;../../../../src/shapelib"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Release/terralibpdi/terralibpdi.lib ../../../../Release/terralib/terralib.lib ../../../../Release/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Release/libjpeg/libjpeg.lib ../../../../Release/shapelib/shapelib.lib"
+				OutputFile="$(OutDir)/TePDIMMIOMatching_test.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\TePDIMMIOMatching_test.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/image_processing/source/TePDIMathFunctions/TePDIMathFunctions.pro b/examples/image_processing/source/TePDIMathFunctions/TePDIMathFunctions.pro
new file mode 100755
index 0000000..6a9fa84
--- /dev/null
+++ b/examples/image_processing/source/TePDIMathFunctions/TePDIMathFunctions.pro
@@ -0,0 +1,4 @@
+include( ../base/base.pro )
+
+SOURCES += TePDIMathFunctions_test.cpp
+
diff --git a/examples/image_processing/source/TePDIMathFunctions/TePDIMathFunctions_test.cpp b/examples/image_processing/source/TePDIMathFunctions/TePDIMathFunctions_test.cpp
new file mode 100755
index 0000000..ac3a1c7
--- /dev/null
+++ b/examples/image_processing/source/TePDIMathFunctions/TePDIMathFunctions_test.cpp
@@ -0,0 +1,117 @@
+#define TEAGN_ENABLE_STDOUT_LOG
+
+#include <TePDIMathFunctions.hpp>
+#include <TeAgnostic.h>
+
+
+void DecimLevels_test()
+{
+  TEAGN_TRUE_OR_THROW( 
+    ( TePDIMathFunctions::DecimLevels( 0 ) == 0 ),
+    "Invalid result" );
+  TEAGN_TRUE_OR_THROW( 
+    ( TePDIMathFunctions::DecimLevels( 1 ) == 0 ),
+    "Invalid result" );
+  TEAGN_TRUE_OR_THROW( 
+    ( TePDIMathFunctions::DecimLevels( 2 ) == 1 ),
+    "Invalid result" );
+  TEAGN_TRUE_OR_THROW( 
+    ( TePDIMathFunctions::DecimLevels( 3 ) == 2 ),
+    "Invalid result" );
+  TEAGN_TRUE_OR_THROW( 
+    ( TePDIMathFunctions::DecimLevels( 4 ) == 2 ),
+    "Invalid result" );
+}
+
+
+void DecimLevelSize_test()
+{
+  TEAGN_TRUE_OR_THROW( 
+    ( TePDIMathFunctions::DecimLevelSize( 1, 2 ) == 1 ),
+    "Invalid result" );
+    
+  TEAGN_TRUE_OR_THROW( 
+    ( TePDIMathFunctions::DecimLevelSize( 1, 3 ) == 2 ),
+    "Invalid result" );
+  TEAGN_TRUE_OR_THROW( 
+    ( TePDIMathFunctions::DecimLevelSize( 2, 3 ) == 1 ),
+    "Invalid result" );
+    
+  TEAGN_TRUE_OR_THROW( 
+    ( TePDIMathFunctions::DecimLevelSize( 1, 4 ) == 2 ),
+    "Invalid result" );
+  TEAGN_TRUE_OR_THROW( 
+    ( TePDIMathFunctions::DecimLevelSize( 2, 4 ) == 1 ),
+    "Invalid result" );
+
+  TEAGN_TRUE_OR_THROW( 
+    ( TePDIMathFunctions::DecimLevelSize( 1, 5 ) == 3 ),
+    "Invalid result" );
+  TEAGN_TRUE_OR_THROW( 
+    ( TePDIMathFunctions::DecimLevelSize( 2, 5 ) == 2 ),
+    "Invalid result" );
+  TEAGN_TRUE_OR_THROW( 
+    ( TePDIMathFunctions::DecimLevelSize( 3, 5 ) == 1 ),
+    "Invalid result" );
+    
+  TEAGN_TRUE_OR_THROW( 
+    ( TePDIMathFunctions::DecimLevelSize( 1, 6 ) == 3 ),
+    "Invalid result" );
+  TEAGN_TRUE_OR_THROW( 
+    ( TePDIMathFunctions::DecimLevelSize( 2, 6 ) == 2 ),
+    "Invalid result" );
+  TEAGN_TRUE_OR_THROW( 
+    ( TePDIMathFunctions::DecimLevelSize( 3, 6 ) == 1 ),
+    "Invalid result" );
+    
+  TEAGN_TRUE_OR_THROW( 
+    ( TePDIMathFunctions::DecimLevelSize( 1, 7 ) == 4 ),
+    "Invalid result" );
+  TEAGN_TRUE_OR_THROW( 
+    ( TePDIMathFunctions::DecimLevelSize( 2, 7 ) == 2 ),
+    "Invalid result" );
+  TEAGN_TRUE_OR_THROW( 
+    ( TePDIMathFunctions::DecimLevelSize( 3, 7 ) == 1 ),
+    "Invalid result" );
+    
+  TEAGN_TRUE_OR_THROW( 
+    ( TePDIMathFunctions::DecimLevelSize( 1, 8 ) == 4 ),
+    "Invalid result" );
+  TEAGN_TRUE_OR_THROW( 
+    ( TePDIMathFunctions::DecimLevelSize( 2, 8 ) == 2 ),
+    "Invalid result" );
+  TEAGN_TRUE_OR_THROW( 
+    ( TePDIMathFunctions::DecimLevelSize( 3, 8 ) == 1 ),
+    "Invalid result" );
+    
+  TEAGN_TRUE_OR_THROW( 
+    ( TePDIMathFunctions::DecimLevelSize( 1, 9 ) == 5 ),
+    "Invalid result" );
+  TEAGN_TRUE_OR_THROW( 
+    ( TePDIMathFunctions::DecimLevelSize( 2, 9 ) == 3 ),
+    "Invalid result" );
+  TEAGN_TRUE_OR_THROW( 
+    ( TePDIMathFunctions::DecimLevelSize( 3, 9 ) == 2 ),
+    "Invalid result" );
+  TEAGN_TRUE_OR_THROW( 
+    ( TePDIMathFunctions::DecimLevelSize( 4, 9 ) == 1 ),
+    "Invalid result" );
+}
+
+
+int main()
+{
+  TEAGN_LOGMSG( "Test started." );
+
+  try{
+    DecimLevels_test();
+    DecimLevelSize_test();
+  }
+  catch( const TeException& excpt ){
+    TEAGN_LOGERR( excpt.message() )
+    return EXIT_FAILURE;
+  }
+
+  TEAGN_LOGMSG( "Test OK." );
+  return EXIT_SUCCESS;
+}
diff --git a/examples/image_processing/source/TePDIMathFunctions/TePDIMathFunctions_test.vcproj b/examples/image_processing/source/TePDIMathFunctions/TePDIMathFunctions_test.vcproj
new file mode 100755
index 0000000..f6efff8
--- /dev/null
+++ b/examples/image_processing/source/TePDIMathFunctions/TePDIMathFunctions_test.vcproj
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="TePDIMathFunctions_test"
+	ProjectGUID="{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	RootNamespace="TePDIMathFunctions_test"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="0">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../base;../../../../src/terralib/image_processing;../../../../src/terralib/kernel;../../../../src/tiff"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PDIAGN_ENABLE_STDOUT_LOG"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Debug/terralibpdi/terralibpdi.lib ../../../../Debug/terralib/terralib.lib ../../../../Debug/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Debug/libjpeg/libjpeg.lib ../../../../Debug/shapelib/shapelib.lib user32.lib $(NOINHERIT)"
+				OutputFile="$(OutDir)/TePDIMathFunctions_test.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreAllDefaultLibraries="FALSE"
+				IgnoreDefaultLibraryNames="msvcrt.lib,libcmt.lib;libc.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"
+				TargetMachine="0"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="../../../../src/terralib/image_processing;../base;../../../../src/terralib/kernel;../../../../src/shapelib"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Release/terralibpdi/terralibpdi.lib ../../../../Release/terralib/terralib.lib ../../../../Release/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Release/libjpeg/libjpeg.lib ../../../../Release/shapelib/shapelib.lib"
+				OutputFile="$(OutDir)/TePDIMathFunctions_test.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\TePDIMathFunctions_test.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/image_processing/source/TePDIMatrix/TePDIMatrix.pro b/examples/image_processing/source/TePDIMatrix/TePDIMatrix.pro
new file mode 100755
index 0000000..0ce669e
--- /dev/null
+++ b/examples/image_processing/source/TePDIMatrix/TePDIMatrix.pro
@@ -0,0 +1,5 @@
+include( ../base/base.pro )
+
+SOURCES += \
+           TePDIMatrix_test.cpp
+
diff --git a/examples/image_processing/source/TePDIMatrix/TePDIMatrix_test.cpp b/examples/image_processing/source/TePDIMatrix/TePDIMatrix_test.cpp
new file mode 100755
index 0000000..fb77d6e
--- /dev/null
+++ b/examples/image_processing/source/TePDIMatrix/TePDIMatrix_test.cpp
@@ -0,0 +1,174 @@
+#define TEAGN_ENABLE_STDOUT_LOG
+
+#include <TeAgnostic.h>
+
+#include <TePDIMatrix.hpp>
+
+#include <string>
+
+void ram_numeric_test()
+{
+    /* Checking basic matrix creation and access */
+  
+    TePDIMatrix< double > m1( 2, 2 );
+    
+    TEAGN_TRUE_OR_THROW( ( ! m1.IsEmpty() ), "Empty verification failed." );
+    
+    m1( 0 , 0 ) = 0.0;
+    m1( 0 , 1 ) = 1.0;
+    m1( 1 , 0 ) = 2.0;
+    m1( 1 , 1 ) = 3.0;
+    
+    TEAGN_TRUE_OR_THROW( m1.GetLines() == 2, "Invalid lines number" );
+    TEAGN_TRUE_OR_THROW( m1.GetColumns() == 2, "Invalid columns number" );
+    
+    TEAGN_TRUE_OR_THROW( m1( 0 , 0 ) == 0.0, "Invalid value" );
+    TEAGN_TRUE_OR_THROW( m1( 0 , 1 ) == 1.0, "Invalid value" );
+    TEAGN_TRUE_OR_THROW( m1( 1 , 0 ) == 2.0, "Invalid value" );
+    TEAGN_TRUE_OR_THROW( m1( 1 , 1 ) == 3.0, "Invalid value" );
+    
+    TEAGN_TRUE_OR_THROW( m1[ 0 ][ 0 ] == 0.0, "Invalid value" );
+    TEAGN_TRUE_OR_THROW( m1[ 0 ][ 1 ] == 1.0, "Invalid value" );
+    TEAGN_TRUE_OR_THROW( m1[ 1 ][ 0 ] == 2.0, "Invalid value" );
+    TEAGN_TRUE_OR_THROW( m1[ 1 ][ 1 ] == 3.0, "Invalid value" );    
+    
+    /* Reset test */
+    
+    TEAGN_TRUE_OR_THROW( m1.Reset( 2, 2 ), "Reset error" );
+    
+    m1( 0 , 0 ) = 0.0;
+    m1( 0 , 1 ) = 1.0;
+    m1( 1 , 0 ) = 2.0;
+    m1( 1 , 1 ) = 3.0;
+    
+    TEAGN_TRUE_OR_THROW( m1.GetLines() == 2, "Invalid lines number" );
+    TEAGN_TRUE_OR_THROW( m1.GetColumns() == 2, "Invalid columns number" );
+    
+    TEAGN_TRUE_OR_THROW( m1( 0 , 0 ) == 0.0, "Invalid value" );
+    TEAGN_TRUE_OR_THROW( m1( 0 , 1 ) == 1.0, "Invalid value" );
+    TEAGN_TRUE_OR_THROW( m1( 1 , 0 ) == 2.0, "Invalid value" );
+    TEAGN_TRUE_OR_THROW( m1( 1 , 1 ) == 3.0, "Invalid value" );    
+    
+    /* Checking copy operator */
+    
+    TePDIMatrix< double > m2;
+    TEAGN_TRUE_OR_THROW( m2.IsEmpty(), "Empty verification failed." );
+    
+    TEAGN_TRUE_OR_THROW( m2.GetLines() == 0, "Invalid lines number" );
+    TEAGN_TRUE_OR_THROW( m2.GetColumns() == 0, "Invalid columns number" );
+    
+    m2 = m1;
+    
+    TEAGN_TRUE_OR_THROW( m2.GetLines() == 2, "Invalid lines number" );
+    TEAGN_TRUE_OR_THROW( m2.GetColumns() == 2, "Invalid columns number" );
+    
+    TEAGN_TRUE_OR_THROW( m2( 0 , 0 ) == 0.0, "Invalid value" );
+    TEAGN_TRUE_OR_THROW( m2( 0 , 1 ) == 1.0, "Invalid value" );
+    TEAGN_TRUE_OR_THROW( m2( 1 , 0 ) == 2.0, "Invalid value" );
+    TEAGN_TRUE_OR_THROW( m2( 1 , 1 ) == 3.0, "Invalid value" );
+    
+    /* Checking copy constructor */
+    
+    TePDIMatrix< double > m3;
+    TEAGN_TRUE_OR_THROW( m3.IsEmpty(), "Empty verification failed." );
+    
+    TEAGN_TRUE_OR_THROW( m3.GetLines() == 0, "Invalid lines number" );
+    TEAGN_TRUE_OR_THROW( m3.GetColumns() == 0, "Invalid columns number" );
+    
+    m3 = m1;
+    
+    TEAGN_TRUE_OR_THROW( m3.GetLines() == 2, "Invalid lines number" );
+    TEAGN_TRUE_OR_THROW( m3.GetColumns() == 2, "Invalid columns number" );
+    
+    TEAGN_TRUE_OR_THROW( m3( 0 , 0 ) == 0.0, "Invalid value" );
+    TEAGN_TRUE_OR_THROW( m3( 0 , 1 ) == 1.0, "Invalid value" );
+    TEAGN_TRUE_OR_THROW( m3( 1 , 0 ) == 2.0, "Invalid value" );
+    TEAGN_TRUE_OR_THROW( m3( 1 , 1 ) == 3.0, "Invalid value" );    
+}
+
+void AutoMemPol_test()
+{
+    const unsigned int max_ram  = (unsigned int)
+      ( 0.90 * ( (double)TeGetFreeVirtualMemory() ) );    
+
+    unsigned long int lines = (unsigned long int)(
+      ( (double)( max_ram + ( 256 * 1024 * 1024 ) ) ) /
+      ( ( (double)sizeof( double ) ) * 1000 ) );
+    unsigned long int cols = 1000;
+
+    TePDIMatrix< double > m1( lines, cols, 
+      TePDIMatrix< double >::AutoMemPol );
+      
+    double counter = 0.0;
+  
+    unsigned int line = 0;
+    unsigned int col = 0;
+      
+    for( line = 0 ; line < lines ; ++line ) {
+      for( col = 0 ; col < cols ; ++col ) {
+        m1( line , col ) = counter;
+        
+        ++counter;
+      }
+    }
+    
+    counter = 0.0;
+    
+    for( line = 0 ; line < lines ; ++line ) {
+      for( col = 0 ; col < cols ; ++col ) {
+        TEAGN_TRUE_OR_THROW( ( m1( line , col ) == counter ), 
+          "Element value check failed" );
+          
+        ++counter;          
+      }
+    }
+    
+    return;
+}
+
+void memory_mapped_big_matrix_test()
+{
+    unsigned long int lines = 3000;
+    unsigned long int cols = 4000;
+
+    TePDIMatrix< double > m1( lines, cols, 
+      TePDIMatrix< double >::DiskMemPol );
+      
+    TEAGN_TRUE_OR_THROW( m1.GetLines() == lines, "Invalid lines number" );
+    TEAGN_TRUE_OR_THROW( m1.GetColumns() == cols, "Invalid columns number" );      
+    
+    unsigned int line = 0;
+    unsigned int col = 0;
+      
+    for( line = 0 ; line < lines ; ++line ) {
+      for( col = 0 ; col < cols ; ++col ) {
+        m1( line , col ) = (double)( line + col );
+      }
+    }
+    
+    for( line = 0 ; line < lines ; ++line ) {
+      for( col = 0 ; col < cols ; ++col ) {
+        TEAGN_TRUE_OR_THROW( ( m1( line , col ) == 
+          ( (double)( line + col ) ) ), "Element value check failed" );
+      }
+    }
+}
+
+
+int main()
+{
+  TEAGN_LOGMSG( "Test started." );
+
+  try{
+    ram_numeric_test();
+    memory_mapped_big_matrix_test();
+    AutoMemPol_test();
+  }
+  catch( const TeException& e ){
+    TEAGN_LOGERR( "Test Failed - " + e.message() );
+    return EXIT_FAILURE;
+  }  
+
+  TEAGN_LOGMSG( "Test OK." );
+  return EXIT_SUCCESS;
+}
diff --git a/examples/image_processing/source/TePDIMatrix/TePDIMatrix_test.vcproj b/examples/image_processing/source/TePDIMatrix/TePDIMatrix_test.vcproj
new file mode 100755
index 0000000..c4a3326
--- /dev/null
+++ b/examples/image_processing/source/TePDIMatrix/TePDIMatrix_test.vcproj
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="TePDIMatrix_test"
+	ProjectGUID="{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	RootNamespace="TePDIMatrix_test"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="0">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../base;../../../../src/terralib/image_processing;../../../../src/terralib/kernel;../../../../src/tiff"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PDIAGN_ENABLE_STDOUT_LOG"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Debug/terralibpdi/terralibpdi.lib ../../../../Debug/terralib/terralib.lib ../../../../Debug/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Debug/libjpeg/libjpeg.lib ../../../../Debug/shapelib/shapelib.lib user32.lib $(NOINHERIT)"
+				OutputFile="$(OutDir)/TePDIMatrix_test.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreAllDefaultLibraries="FALSE"
+				IgnoreDefaultLibraryNames="msvcrt.lib,libcmt.lib;libc.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"
+				TargetMachine="0"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="../../../../src/terralib/image_processing;../base;../../../../src/terralib/kernel;../../../../src/shapelib"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Release/terralibpdi/terralibpdi.lib ../../../../Release/terralib/terralib.lib ../../../../Release/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Release/libjpeg/libjpeg.lib ../../../../Release/shapelib/shapelib.lib"
+				OutputFile="$(OutDir)/TePDIMatrix_test.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\TePDIMatrix_test.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/image_processing/source/TePDIMatrixFunctions/TePDIMatrixFunctions.pro b/examples/image_processing/source/TePDIMatrixFunctions/TePDIMatrixFunctions.pro
new file mode 100755
index 0000000..2dc003a
--- /dev/null
+++ b/examples/image_processing/source/TePDIMatrixFunctions/TePDIMatrixFunctions.pro
@@ -0,0 +1,5 @@
+include( ../base/base.pro )
+
+SOURCES += \
+           TePDIMatrixFunctions_test.cpp
+
diff --git a/examples/image_processing/source/TePDIMatrixFunctions/TePDIMatrixFunctions_test.cpp b/examples/image_processing/source/TePDIMatrixFunctions/TePDIMatrixFunctions_test.cpp
new file mode 100755
index 0000000..26876e2
--- /dev/null
+++ b/examples/image_processing/source/TePDIMatrixFunctions/TePDIMatrixFunctions_test.cpp
@@ -0,0 +1,116 @@
+#define TEAGN_ENABLE_STDOUT_LOG
+
+#include <TeAgnostic.h>
+
+#include <TePDIMatrixFunctions.hpp>
+
+#include <string>
+
+void GetCorrelation_test()
+{
+    TePDIMatrix< double > m1( 2, 2 );
+    TePDIMatrix< double > m2( 2, 2 );
+    
+    m1( 0 , 0 ) = 0;
+    m1( 0 , 1 ) = 1;
+    m1( 1 , 0 ) = 2;
+    m1( 1 , 1 ) = 3;
+    
+    m2( 0 , 0 ) = 0;
+    m2( 0 , 1 ) = 1;
+    m2( 1 , 0 ) = 2;
+    m2( 1 , 1 ) = 3;
+
+    TEAGN_CHECK_EPS( TePDIMatrixFunctions::GetCorrelation( m1, m2 ),
+      1.0, 0.000001 , "Invalid GetCorrelation return" );
+}
+
+
+void Abs_test()
+{
+    TePDIMatrix< double > m1( 2, 2 );
+    TePDIMatrix< double > m2;
+    
+    m1( 0 , 0 ) = 0;
+    m1( 0 , 1 ) = -1;
+    m1( 1 , 0 ) = 2;
+    m1( 1 , 1 ) = -3;
+    
+    TEAGN_TRUE_OR_THROW( TePDIMatrixFunctions::Abs( m1, m2 ),
+      "Abs calcule failed" );
+      
+    TEAGN_CHECK_EPS( m2( 0, 0 ), 0.0, 0.000001, "Invalid value" );
+    TEAGN_CHECK_EPS( m2( 0, 1 ), 1.0, 0.000001, "Invalid value" );
+    TEAGN_CHECK_EPS( m2( 1, 0 ), 2.0, 0.000001, "Invalid value" );
+    TEAGN_CHECK_EPS( m2( 1, 1 ), 3.0, 0.000001, "Invalid value" );
+}
+
+
+void WhereIsGreater_test()
+{
+    TePDIMatrix< double > m1( 2, 2 );
+    TePDIMatrix< double > m2( 2, 2 );
+    TePDIMatrix< double > gt;
+    
+    m1( 0 , 0 ) = 0;
+    m1( 0 , 1 ) = 1;
+    m1( 1 , 0 ) = 2;
+    m1( 1 , 1 ) = 3;
+    
+    m2( 0 , 0 ) = 0;
+    m2( 0 , 1 ) = 2;
+    m2( 1 , 0 ) = 2;
+    m2( 1 , 1 ) = 1;
+    
+    TEAGN_TRUE_OR_THROW( TePDIMatrixFunctions::WhereIsGreater( m1, m2, gt ),
+      "WhereIsGreater calcule failed" );    
+
+    TEAGN_CHECK_EPS( gt( 0, 0 ), 0.0, 0.000001 , 
+      "Invalid WhereIsGreater result" );
+    TEAGN_CHECK_EPS( gt( 0, 1 ), 0.0, 0.000001 , 
+      "Invalid WhereIsGreater result" );
+    TEAGN_CHECK_EPS( gt( 1, 0 ), 0.0, 0.000001 , 
+      "Invalid WhereIsGreater result" );
+    TEAGN_CHECK_EPS( gt( 1, 1 ), 1.0, 0.000001 , 
+      "Invalid WhereIsGreater result" );            
+}
+
+
+void Negate_test()
+{
+    TePDIMatrix< double > m1( 2, 2 );
+    TePDIMatrix< double > neg( 2, 2 );
+    
+    m1( 0 , 0 ) = 0;
+    m1( 0 , 1 ) = -1;
+    m1( 1 , 0 ) = 2;
+    m1( 1 , 1 ) = -3;
+    
+    TEAGN_TRUE_OR_THROW( TePDIMatrixFunctions::Negate( m1, neg ),
+      "Abs calcule failed" );
+      
+    TEAGN_CHECK_EPS( neg( 0, 0 ), 1.0, 0.000001, "Invalid value" );
+    TEAGN_CHECK_EPS( neg( 0, 1 ), 0.0, 0.000001, "Invalid value" );
+    TEAGN_CHECK_EPS( neg( 1, 0 ), 0.0, 0.000001, "Invalid value" );
+    TEAGN_CHECK_EPS( neg( 1, 1 ), 0.0, 0.000001, "Invalid value" );
+}
+
+
+int main()
+{
+  TEAGN_LOGMSG( "Test started." );
+
+  try{
+    GetCorrelation_test();
+    Abs_test();
+    WhereIsGreater_test();
+    Negate_test();
+  }
+  catch( const TeException& e ){
+    TEAGN_LOGERR( "Test Failed - " + e.message() );
+    return EXIT_FAILURE;
+  } 
+
+  TEAGN_LOGMSG( "Test OK." );
+  return EXIT_SUCCESS;
+}
diff --git a/examples/image_processing/source/TePDIMatrixFunctions/TePDIMatrixFunctions_test.vcproj b/examples/image_processing/source/TePDIMatrixFunctions/TePDIMatrixFunctions_test.vcproj
new file mode 100755
index 0000000..0078018
--- /dev/null
+++ b/examples/image_processing/source/TePDIMatrixFunctions/TePDIMatrixFunctions_test.vcproj
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="TePDIMatrixFunctions_test"
+	ProjectGUID="{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	RootNamespace="TePDIMatrixFunctions_test"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="0">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../base;../../../../src/terralib/image_processing;../../../../src/terralib/kernel;../../../../src/tiff"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PDIAGN_ENABLE_STDOUT_LOG"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Debug/terralibpdi/terralibpdi.lib ../../../../Debug/terralib/terralib.lib ../../../../Debug/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Debug/libjpeg/libjpeg.lib ../../../../Debug/shapelib/shapelib.lib user32.lib $(NOINHERIT)"
+				OutputFile="$(OutDir)/TePDIMatrixFunctions_test.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreAllDefaultLibraries="FALSE"
+				IgnoreDefaultLibraryNames="msvcrt.lib,libcmt.lib;libc.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"
+				TargetMachine="0"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="../../../../src/terralib/image_processing;../base;../../../../src/terralib/kernel;../../../../src/shapelib"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Release/terralibpdi/terralibpdi.lib ../../../../Release/terralib/terralib.lib ../../../../Release/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Release/libjpeg/libjpeg.lib ../../../../Release/shapelib/shapelib.lib"
+				OutputFile="$(OutDir)/TePDIMatrixFunctions_test.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\TePDIMatrixFunctions_test.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/image_processing/source/TePDIMixModel/TePDIMixModel.pro b/examples/image_processing/source/TePDIMixModel/TePDIMixModel.pro
new file mode 100644
index 0000000..764ddbd
--- /dev/null
+++ b/examples/image_processing/source/TePDIMixModel/TePDIMixModel.pro
@@ -0,0 +1,7 @@
+include( ../base/base.pro )
+
+SOURCES += TePDIMixModel_test.cpp
+
+QMAKE_CLEAN += \
+  ../../bin/TePDIPrincoMixModel*.tif
+
diff --git a/examples/image_processing/source/TePDIMixModel/TePDIMixModel_test.cpp b/examples/image_processing/source/TePDIMixModel/TePDIMixModel_test.cpp
new file mode 100644
index 0000000..bc55572
--- /dev/null
+++ b/examples/image_processing/source/TePDIMixModel/TePDIMixModel_test.cpp
@@ -0,0 +1,180 @@
+#define TEAGN_ENABLE_STDOUT_LOG
+
+#include <TePDIExamplesBase.hpp>
+
+#include <vector>
+
+#include <TeInitRasterDecoders.h>
+#include <TeProgress.h>
+#include <TeStdIOProgress.h>
+#include <TeRasterParams.h>
+#include <TePDITypes.hpp>
+#include <TePDIParameters.hpp>
+#include <TeAgnostic.h>
+#include <TePDIUtils.hpp>
+#include <TeRasterParams.h>
+#include <TePDIMixModel.hpp>
+#include <TePDIMixModelComponentList.hpp>
+#include <TePDIMixModelSpectralBandList.hpp>
+
+void PrincoMixModel_test()
+{
+  #define componentsNumber 3
+  #define spectralBandsNumber 3
+
+  TePDIParameters params;
+
+// ----- Setting spectralbands e components -----
+  TePDIMixModelComponentList componentList;
+  componentList.insertComponent(0, "nuvem");
+  componentList.insertPixel(0, 0, 1.000);
+  componentList.insertPixel(0, 1, 0.725);
+  componentList.insertPixel(0, 2, 1.000);
+  
+  componentList.insertComponent(1, "vegetacao");
+  componentList.insertPixel(1, 0, 0.392);
+  componentList.insertPixel(1, 1, 0.251);
+  componentList.insertPixel(1, 2, 0.604);
+  
+  componentList.insertComponent(2, "sombra");
+  componentList.insertPixel(2, 0, 0.165);
+  componentList.insertPixel(2, 1, 0.098);
+  componentList.insertPixel(2, 2, 0.196);
+  
+  TePDIMixModelSpectralBandList spectralBandList;
+  spectralBandList.insertSpectralBand(TePDIMixModelSpectralBand(250, 2, 0.450000, 0.520000, "CBERS2_CCD_BLUE"));
+  spectralBandList.insertSpectralBand(TePDIMixModelSpectralBand(250, 3, 0.520000, 0.590000, "CBERS2_CCD_GREEN"));
+  spectralBandList.insertSpectralBand(TePDIMixModelSpectralBand(250, 4, 0.630000, 0.690000, "CBERS2_CCD_RED"));
+
+// Setting input rasters parameter
+  TePDITypes::TePDIRasterVectorType input_rasters;
+  
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string(TEPDIEXAMPLESRESPATH "cbers_rgb342_crop1.tif" ), 'r'));
+  TEAGN_TRUE_OR_THROW(inRaster->init(), "Unable to init input_raster" );
+  
+  for(unsigned int i = 0; i < spectralBandsNumber; i++)
+  {
+    input_rasters.push_back(inRaster);
+  }
+  
+// Setting number of bands in each input raster
+  std::vector<int> bands;
+  bands.push_back(0);
+  bands.push_back(1);
+  bands.push_back(2);
+
+// Setting output rasters parameter
+  TePDITypes::TePDIRasterVectorType output_rasters;
+  for(unsigned int i = 0; i < componentsNumber; i++)
+  {
+    TePDITypes::TePDIRasterPtrType outRaster;
+    TEAGN_TRUE_OR_THROW(TePDIUtils::TeAllocRAMRaster(outRaster, 1, 1, 1, false, TeDOUBLE, 0), "RAM raster " + Te2String(i+1) + " alloc error" );
+    output_rasters.push_back(outRaster);
+  }
+
+  int  computeErrorRasters = 1,
+    computeAverageError = 1,
+    normalize = 0;
+
+// Setting the parameters created before
+  params.SetParameter("mixmodel_type", string("princo"));
+  params.SetParameter("component_list", componentList);
+  params.SetParameter("spectral_band_list", spectralBandList);
+  params.SetParameter("input_rasters", input_rasters);
+  params.SetParameter("bands", bands);
+  params.SetParameter("output_rasters", output_rasters);
+  params.SetParameter("compute_error_rasters", computeErrorRasters);
+  params.SetParameter("compute_average_error", computeAverageError);
+  params.SetParameter("normalize", normalize);
+
+// Checking if it's necessary to create error rasters
+  if (computeErrorRasters)
+  {
+    TePDITypes::TePDIRasterVectorType output_error_rasters;
+    for(unsigned int i = 0; i < componentsNumber; i++)
+    {
+      TePDITypes::TePDIRasterPtrType outRaster;
+      TEAGN_TRUE_OR_THROW(TePDIUtils::TeAllocRAMRaster(outRaster, 1, 1, 1, false, TeDOUBLE, 0), "RAM error raster " + Te2String(i+1) + " alloc error" );
+      output_error_rasters.push_back(outRaster);
+    }
+    params.SetParameter("output_error_rasters", output_error_rasters);
+  }
+
+// Checking if it's necessary to create average error double
+  double averageError = 0.0;
+  if (computeAverageError)
+    params.SetParameter("average_error", averageError);
+
+// Making the algorithm and calling its execution
+  TePDIMixModel mixmodel;
+  TEAGN_TRUE_OR_THROW(mixmodel.Reset(params), "Reset failed");
+  TEAGN_TRUE_OR_THROW(mixmodel.Apply(), "Apply error");
+
+// Write output rasters in disk
+  TEAGN_TRUE_OR_THROW(params.GetParameter("output_rasters", output_rasters), "Unable to retrive generated images");
+  TEAGN_TRUE_OR_THROW(output_rasters.size() == componentsNumber, "Invalid output rasters number");
+  for(unsigned int i = 0; i < componentsNumber; i++)
+    TEAGN_TRUE_OR_THROW(TePDIUtils::TeRaster2Geotiff(output_rasters[i], TEPDIEXAMPLESBINPATH "TePDIPrincoMixModel" + Te2String(i+1) + ".tif"), "GeoTIFF " + Te2String(i+1) + " generation error");
+
+// Write a color composite raster in disk  
+  TeRasterParams base_raster_params = input_rasters[0]->params();
+  base_raster_params.nBands( componentsNumber );
+  base_raster_params.setDataType( TeDOUBLE, -1 );
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW(TePDIUtils::TeAllocRAMRaster(outRaster, 
+    base_raster_params, false ),
+    "RAM Color Raster Alloc error" );
+  for(int k = 0; k < componentsNumber; k++)
+    for (int i = 0; i < base_raster_params.nlines_; i++)
+      for (int j = 0; j < base_raster_params.ncols_; j++)
+      {
+        double p;
+        output_rasters[k]->getElement(j, i, p);
+        outRaster->setElement(j, i, p, k);
+      }
+  TEAGN_TRUE_OR_THROW(TePDIUtils::TeRaster2Geotiff(outRaster, TEPDIEXAMPLESBINPATH "TePDIPrincoMixModelCOLOR.tif"), "GeoTIFF Color generation error");
+
+// Write output error rasters in disk
+  params.GetParameter("compute_error_rasters", computeErrorRasters);
+  if (computeErrorRasters)
+  {
+    TePDITypes::TePDIRasterVectorType output_error_rasters;
+    TEAGN_TRUE_OR_THROW(params.GetParameter("output_error_rasters", output_error_rasters), "Unable to retrive generated error rasters");
+    TEAGN_TRUE_OR_THROW(output_error_rasters.size() == componentsNumber, "Invalid output error rasters number");
+    for(unsigned int i = 0; i < componentsNumber; i++)
+      TEAGN_TRUE_OR_THROW(TePDIUtils::TeRaster2Geotiff(output_error_rasters[i], TEPDIEXAMPLESBINPATH "TePDIPrincoMixModelError" + Te2String(i+1) + ".tif"), "GeoTIFF error " + Te2String(i+1) + " generation error");
+  }
+
+// Parameter don't come back after the algorithm execution
+  params.GetParameter("compute_average_error", computeAverageError);
+  if (computeAverageError)
+  {
+    TEAGN_TRUE_OR_THROW(params.GetParameter("average_error", averageError), "Unable to retrive average error");
+    //cout << "Average Erro = " << averageError << endl;
+  }
+
+}
+
+int main()
+{
+  TEAGN_LOGMSG("Test started.");
+  
+  try
+  {
+    TeInitRasterDecoders();
+    
+    TeStdIOProgress pi;
+    TeProgress::setProgressInterf(dynamic_cast< TeProgressBase* >(&pi));
+    
+    PrincoMixModel_test();
+  }
+  catch( const TeException& e ){
+    TEAGN_LOGERR( "Test Failed - " + e.message() );
+    return EXIT_FAILURE;
+  } 
+  
+  TEAGN_LOGMSG("Test OK.");
+  return EXIT_SUCCESS;
+}
+
diff --git a/examples/image_processing/source/TePDIMixModel/TePDIMixModel_test.vcproj b/examples/image_processing/source/TePDIMixModel/TePDIMixModel_test.vcproj
new file mode 100755
index 0000000..555b9b2
--- /dev/null
+++ b/examples/image_processing/source/TePDIMixModel/TePDIMixModel_test.vcproj
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="TePDIMixModel_test"
+	ProjectGUID="{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	RootNamespace="TePDIMixModel_test"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="0">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../base;../../../../src/terralib/image_processing;../../../../src/terralib/kernel;../../../../src/tiff"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PDIAGN_ENABLE_STDOUT_LOG"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Debug/terralibpdi/terralibpdi.lib ../../../../Debug/terralib/terralib.lib ../../../../Debug/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Debug/libjpeg/libjpeg.lib ../../../../Debug/shapelib/shapelib.lib user32.lib $(NOINHERIT)"
+				OutputFile="$(OutDir)/TePDIMixModel_test.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreAllDefaultLibraries="FALSE"
+				IgnoreDefaultLibraryNames="msvcrt.lib,libcmt.lib;libc.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"
+				TargetMachine="0"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="../../../../src/terralib/image_processing;../base;../../../../src/terralib/kernel;../../../../src/shapelib"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Release/terralibpdi/terralibpdi.lib ../../../../Release/terralib/terralib.lib ../../../../Release/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Release/libjpeg/libjpeg.lib ../../../../Release/shapelib/shapelib.lib"
+				OutputFile="$(OutDir)/TePDIMixModel_test.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\TePDIMixModel_test.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/image_processing/source/TePDIMorfFilter/TePDIMorfFilter.pro b/examples/image_processing/source/TePDIMorfFilter/TePDIMorfFilter.pro
new file mode 100755
index 0000000..f170b22
--- /dev/null
+++ b/examples/image_processing/source/TePDIMorfFilter/TePDIMorfFilter.pro
@@ -0,0 +1,9 @@
+include( ../base/base.pro )
+
+SOURCES += \
+  TePDIMorfFilter_test.cpp
+
+QMAKE_CLEAN += \
+  ../../bin/Dilation*.tif \
+  ../../bin/Erosion*.tif \
+  ../../bin/Median*.tif
\ No newline at end of file
diff --git a/examples/image_processing/source/TePDIMorfFilter/TePDIMorfFilter_test.cpp b/examples/image_processing/source/TePDIMorfFilter/TePDIMorfFilter_test.cpp
new file mode 100755
index 0000000..a2efcb3
--- /dev/null
+++ b/examples/image_processing/source/TePDIMorfFilter/TePDIMorfFilter_test.cpp
@@ -0,0 +1,769 @@
+#define TEAGN_ENABLE_STDOUT_LOG
+
+#include <TePDIExamplesBase.hpp>
+#include <TePDIMorfFilter.hpp>
+#include <TePDIFilterMask.hpp>
+#include <TePDIParameters.hpp>
+#include <TeAgnostic.h>
+#include <TePDIUtils.hpp>
+#include <TeProgress.h>
+#include <TeStdIOProgress.h>
+
+void Dilation_1_iteration_test()
+{
+  TePDIParameters params;
+
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  params.SetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeDOUBLE, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  std::vector<int> channels;
+  channels.push_back( 0 );
+  params.SetParameter( "channels", channels );
+
+  params.SetParameter( "filter_mask", TePDIFilterMask::create_MorfMtot() );
+
+  params.SetParameter( "filter_type", TePDIMorfFilter::TePDIMDilationType );
+
+  params.SetParameter( "iterations", (int)1 );
+
+  TePDIMorfFilter filter;
+
+  TEAGN_TRUE_OR_THROW( filter.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( filter.Apply(),
+    "Apply error" );
+    
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "Dilation_test_1_iteration.tif" ), "GeoTIF generation error" );
+}
+
+
+void Dilation_2_iterations_test()
+{
+  TePDIParameters params;
+
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  params.SetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeDOUBLE, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  std::vector<int> channels;
+  channels.push_back( 0 );
+  params.SetParameter( "channels", channels );
+
+  params.SetParameter( "filter_mask", TePDIFilterMask::create_MorfMtot() );
+
+  params.SetParameter( "filter_type", TePDIMorfFilter::TePDIMDilationType );
+
+  params.SetParameter( "iterations", (int)2 );
+
+  TePDIMorfFilter filter;
+
+  TEAGN_TRUE_OR_THROW( filter.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( filter.Apply(),
+    "Apply error" );
+    
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "Dilation_test_2_iterations.tif" ), "GeoTIF generation error" );
+}
+
+
+void Dilation_3_iterations_test()
+{
+  TePDIParameters params;
+
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  params.SetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeDOUBLE, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  std::vector<int> channels;
+  channels.push_back( 0 );
+  params.SetParameter( "channels", channels );
+
+  params.SetParameter( "filter_mask", TePDIFilterMask::create_MorfMtot() );
+
+  params.SetParameter( "filter_type", TePDIMorfFilter::TePDIMDilationType );
+
+  params.SetParameter( "iterations", (int)3 );
+
+  TePDIMorfFilter filter;
+
+  TEAGN_TRUE_OR_THROW( filter.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( filter.Apply(),
+    "Apply error" );
+    
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "Dilation_test_3_iterations.tif" ), "GeoTIF generation error" );
+}
+
+
+void Dilation_4_iterations_test()
+{
+  TePDIParameters params;
+
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  params.SetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeDOUBLE, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  std::vector<int> channels;
+  channels.push_back( 0 );
+  params.SetParameter( "channels", channels );
+
+  params.SetParameter( "filter_mask", TePDIFilterMask::create_MorfMtot() );
+
+  params.SetParameter( "filter_type", TePDIMorfFilter::TePDIMDilationType );
+
+  params.SetParameter( "iterations", (int)4 );
+
+  TePDIMorfFilter filter;
+
+  TEAGN_TRUE_OR_THROW( filter.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( filter.Apply(),
+    "Apply error" );
+    
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "Dilation_test_4_iterations.tif" ), "GeoTIF generation error" );
+}
+
+
+void Dilation_with_dummy_test()
+{
+  TePDIParameters params;
+
+  TePDITypes::TePDIRasterPtrType diskRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( diskRaster->init(), "Unable to init diskRaster" );
+  
+  TePDITypes::TePDIRasterPtrType inRaster;
+  TeRasterParams inRaster_params = diskRaster->params();
+  inRaster_params.nBands( 3 );
+  inRaster_params.setDummy( 0, -1 );
+  inRaster_params.setPhotometric( TeRasterParams::TeMultiBand, -1 );
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( inRaster,
+    inRaster_params, TePDIUtils::TePDIUtilsAutoMemPol ), 
+    "Unable to alloc RAM Raster" );
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeCopyRasterPixels( diskRaster, 0,
+    inRaster, 0, false, false ), "Unable to copy raster pixels" );
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeCopyRasterPixels( diskRaster, 0,
+    inRaster, 1, false, false ), "Unable to copy raster pixels" );
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeCopyRasterPixels( diskRaster, 0,
+    inRaster, 2, false, false ), "Unable to copy raster pixels" );
+  params.SetParameter( "input_image", inRaster );  
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeDOUBLE, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  std::vector<int> channels;
+  channels.push_back( 0 );
+  channels.push_back( 1 );
+  channels.push_back( 2 );
+  params.SetParameter( "channels", channels );
+
+  params.SetParameter( "filter_mask", TePDIFilterMask::create_MorfMtot() );
+
+  params.SetParameter( "filter_type", TePDIMorfFilter::TePDIMDilationType );
+
+  params.SetParameter( "iterations", (int)3 );
+
+  TePDIMorfFilter filter;
+
+  TEAGN_TRUE_OR_THROW( filter.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( filter.Apply(),
+    "Apply error" );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "Dilation_with_dummy_test.tif" ), "GeoTIF generation error" );
+}
+
+
+void Erosion_1_iteration_test()
+{
+  TePDIParameters params;
+
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  params.SetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeDOUBLE, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  std::vector<int> channels;
+  channels.push_back( 0 );
+  params.SetParameter( "channels", channels );
+
+  params.SetParameter( "filter_mask", TePDIFilterMask::create_MorfMtot() );
+
+  params.SetParameter( "filter_type", TePDIMorfFilter::TePDIMErosionType );
+
+  params.SetParameter( "iterations", (int)1 );
+
+  TePDIMorfFilter filter;
+
+  TEAGN_TRUE_OR_THROW( filter.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( filter.Apply(),
+    "Apply error" );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "Erosion_1_iteration_test.tif" ), "GeoTIF generation error" );
+}
+
+
+void Erosion_2_iterations_test()
+{
+  TePDIParameters params;
+
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  params.SetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeDOUBLE, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  std::vector<int> channels;
+  channels.push_back( 0 );
+  params.SetParameter( "channels", channels );
+
+  params.SetParameter( "filter_mask", TePDIFilterMask::create_MorfMtot() );
+
+  params.SetParameter( "filter_type", TePDIMorfFilter::TePDIMErosionType );
+
+  params.SetParameter( "iterations", (int)2 );
+
+  TePDIMorfFilter filter;
+
+  TEAGN_TRUE_OR_THROW( filter.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( filter.Apply(),
+    "Apply error" );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "Erosion_2_iterations_test.tif" ), "GeoTIF generation error" );
+}
+
+
+void Erosion_3_iterations_test()
+{
+  TePDIParameters params;
+
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  params.SetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeDOUBLE, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  std::vector<int> channels;
+  channels.push_back( 0 );
+  params.SetParameter( "channels", channels );
+
+  params.SetParameter( "filter_mask", TePDIFilterMask::create_MorfMtot() );
+
+  params.SetParameter( "filter_type", TePDIMorfFilter::TePDIMErosionType );
+
+  params.SetParameter( "iterations", (int)3 );
+
+  TePDIMorfFilter filter;
+
+  TEAGN_TRUE_OR_THROW( filter.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( filter.Apply(),
+    "Apply error" );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "Erosion_3_iteration_test.tif" ), "GeoTIF generation error" );
+}
+
+
+void Erosion_4_iterations_test()
+{
+  TePDIParameters params;
+
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  params.SetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeDOUBLE, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  std::vector<int> channels;
+  channels.push_back( 0 );
+  params.SetParameter( "channels", channels );
+
+  params.SetParameter( "filter_mask", TePDIFilterMask::create_MorfMtot() );
+
+  params.SetParameter( "filter_type", TePDIMorfFilter::TePDIMErosionType );
+
+  params.SetParameter( "iterations", (int)4 );
+
+  TePDIMorfFilter filter;
+
+  TEAGN_TRUE_OR_THROW( filter.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( filter.Apply(),
+    "Apply error" );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "Erosion_4_iteration_test.tif" ), "GeoTIF generation error" );
+}
+
+
+void Erosion_with_dummy_test()
+{
+  TePDIParameters params;
+
+  TePDITypes::TePDIRasterPtrType diskRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( diskRaster->init(), "Unable to init diskRaster" );
+  
+  TePDITypes::TePDIRasterPtrType inRaster;
+  TeRasterParams inRaster_params = diskRaster->params();
+  inRaster_params.nBands( 3 );
+  inRaster_params.setDummy( 0, -1 );
+  inRaster_params.setPhotometric( TeRasterParams::TeMultiBand, -1 );
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( inRaster,
+    inRaster_params, TePDIUtils::TePDIUtilsAutoMemPol ), 
+    "Unable to alloc RAM Raster" );
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeCopyRasterPixels( diskRaster, 0,
+    inRaster, 0, false, false ), "Unable to copy raster pixels" );
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeCopyRasterPixels( diskRaster, 0,
+    inRaster, 1, false, false ), "Unable to copy raster pixels" );
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeCopyRasterPixels( diskRaster, 0,
+    inRaster, 2, false, false ), "Unable to copy raster pixels" );
+  params.SetParameter( "input_image", inRaster );  
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeDOUBLE, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  std::vector<int> channels;
+  channels.push_back( 0 );
+  channels.push_back( 1 );
+  channels.push_back( 2 );
+  params.SetParameter( "channels", channels );
+
+  params.SetParameter( "filter_mask", TePDIFilterMask::create_MorfMtot() );
+
+  params.SetParameter( "filter_type", TePDIMorfFilter::TePDIMErosionType );
+
+  params.SetParameter( "iterations", (int)3 );
+
+  TePDIMorfFilter filter;
+
+  TEAGN_TRUE_OR_THROW( filter.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( filter.Apply(),
+    "Apply error" );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "Erosion_with_dummy_test.tif" ), "GeoTIF generation error" );
+}
+
+
+void Median_1_iteration_test()
+{
+  TePDIParameters params;
+
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  params.SetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeDOUBLE, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  std::vector<int> channels;
+  channels.push_back( 0 );
+  params.SetParameter( "channels", channels );
+
+  params.SetParameter( "filter_mask", TePDIFilterMask::create_MorfMtot() );
+
+  params.SetParameter( "filter_type", TePDIMorfFilter::TePDIMMedianType );
+
+  params.SetParameter( "iterations", (int)1 );
+
+  TePDIMorfFilter filter;
+
+  TEAGN_TRUE_OR_THROW( filter.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( filter.Apply(),
+    "Apply error" );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "Median_1_iteration_test.tif" ), "GeoTIF generation error" );
+}
+
+
+void Median_2_iterations_test()
+{
+  TePDIParameters params;
+
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  params.SetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeDOUBLE, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  std::vector<int> channels;
+  channels.push_back( 0 );
+  params.SetParameter( "channels", channels );
+
+  params.SetParameter( "filter_mask", TePDIFilterMask::create_MorfMtot() );
+
+  params.SetParameter( "filter_type", TePDIMorfFilter::TePDIMMedianType );
+
+  params.SetParameter( "iterations", (int)2 );
+
+  TePDIMorfFilter filter;
+
+  TEAGN_TRUE_OR_THROW( filter.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( filter.Apply(),
+    "Apply error" );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "Median_2_iterations_test.tif" ), "GeoTIF generation error" );
+}
+
+
+void Median_3_iterations_test()
+{
+  TePDIParameters params;
+
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  params.SetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeDOUBLE, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  std::vector<int> channels;
+  channels.push_back( 0 );
+  params.SetParameter( "channels", channels );
+
+  params.SetParameter( "filter_mask", TePDIFilterMask::create_MorfMtot() );
+
+  params.SetParameter( "filter_type", TePDIMorfFilter::TePDIMMedianType );
+
+  params.SetParameter( "iterations", (int)3 );
+
+  TePDIMorfFilter filter;
+
+  TEAGN_TRUE_OR_THROW( filter.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( filter.Apply(),
+    "Apply error" );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "Median_3_iterations_test.tif" ), "GeoTIF generation error" );
+}
+
+
+void Median_4_iterations_test()
+{
+  TePDIParameters params;
+
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  params.SetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeDOUBLE, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  std::vector<int> channels;
+  channels.push_back( 0 );
+  params.SetParameter( "channels", channels );
+
+  params.SetParameter( "filter_mask", TePDIFilterMask::create_MorfMtot() );
+
+  params.SetParameter( "filter_type", TePDIMorfFilter::TePDIMMedianType );
+
+  params.SetParameter( "iterations", (int)4 );
+
+  TePDIMorfFilter filter;
+
+  TEAGN_TRUE_OR_THROW( filter.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( filter.Apply(),
+    "Apply error" );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "Median_4_iterations_test.tif" ), "GeoTIF generation error" );
+}
+
+
+void Median_with_dummy_test()
+{
+  TePDIParameters params;
+
+  TePDITypes::TePDIRasterPtrType diskRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( diskRaster->init(), "Unable to init diskRaster" );
+  
+  TePDITypes::TePDIRasterPtrType inRaster;
+  TeRasterParams inRaster_params = diskRaster->params();
+  inRaster_params.nBands( 3 );
+  inRaster_params.setDummy( 0, -1 );
+  inRaster_params.setPhotometric( TeRasterParams::TeMultiBand, -1 );
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( inRaster,
+    inRaster_params, TePDIUtils::TePDIUtilsAutoMemPol ), 
+    "Unable to alloc RAM Raster" );
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeCopyRasterPixels( diskRaster, 0,
+    inRaster, 0, false, false ), "Unable to copy raster pixels" );
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeCopyRasterPixels( diskRaster, 0,
+    inRaster, 1, false, false ), "Unable to copy raster pixels" );
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeCopyRasterPixels( diskRaster, 0,
+    inRaster, 2, false, false ), "Unable to copy raster pixels" );
+  params.SetParameter( "input_image", inRaster );   
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeDOUBLE, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  std::vector<int> channels;
+  channels.push_back( 0 );
+  channels.push_back( 1 );
+  channels.push_back( 2 );
+  params.SetParameter( "channels", channels );
+
+  params.SetParameter( "filter_mask", TePDIFilterMask::create_MorfMtot() );
+
+  params.SetParameter( "filter_type", TePDIMorfFilter::TePDIMMedianType );
+
+  params.SetParameter( "iterations", (int)3 );
+
+  TePDIMorfFilter filter;
+
+  TEAGN_TRUE_OR_THROW( filter.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( filter.Apply(),
+    "Apply error" );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "Median_with_dummy_test.tif" ), "GeoTIF generation error" );
+}
+
+
+void Mode_1_iteration_test()
+{
+  TePDIParameters params;
+
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  params.SetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeDOUBLE, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  std::vector<int> channels;
+  channels.push_back( 0 );
+  params.SetParameter( "channels", channels );
+
+  params.SetParameter( "filter_mask", 
+    TePDIFilterMask::create_MorfMtot() );
+
+  params.SetParameter( "filter_type", 
+    TePDIMorfFilter::TePDIMModeType );
+
+  params.SetParameter( "iterations", (int)1 );
+
+  TePDIMorfFilter filter;
+
+  TEAGN_TRUE_OR_THROW( filter.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( filter.Apply(),
+    "Apply error" );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "Mode_1_iteration_test.tif" ), 
+    "GeoTIF generation error" );
+}
+
+void Mode_2_iteration_test()
+{
+  TePDIParameters params;
+
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  params.SetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeDOUBLE, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  std::vector<int> channels;
+  channels.push_back( 0 );
+  params.SetParameter( "channels", channels );
+
+  params.SetParameter( "filter_mask", 
+    TePDIFilterMask::create_MorfMtot() );
+
+  params.SetParameter( "filter_type", 
+    TePDIMorfFilter::TePDIMModeType );
+
+  params.SetParameter( "iterations", (int)2 );
+
+  TePDIMorfFilter filter;
+
+  TEAGN_TRUE_OR_THROW( filter.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( filter.Apply(),
+    "Apply error" );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "Mode_2_iteration_test.tif" ), 
+    "GeoTIF generation error" );
+}
+
+void Mode_3_iteration_test()
+{
+  TePDIParameters params;
+
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  params.SetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeDOUBLE, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  std::vector<int> channels;
+  channels.push_back( 0 );
+  params.SetParameter( "channels", channels );
+
+  params.SetParameter( "filter_mask", 
+    TePDIFilterMask::create_MorfMtot() );
+
+  params.SetParameter( "filter_type", 
+    TePDIMorfFilter::TePDIMModeType );
+
+  params.SetParameter( "iterations", (int)3 );
+
+  TePDIMorfFilter filter;
+
+  TEAGN_TRUE_OR_THROW( filter.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( filter.Apply(),
+    "Apply error" );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "Mode_3_iteration_test.tif" ), 
+    "GeoTIF generation error" );
+}
+
+int main()
+{
+  TEAGN_LOGMSG( "Test started." );
+
+  try{
+    TeStdIOProgress pi;
+    TeProgress::setProgressInterf( dynamic_cast< TeProgressBase* >( &pi ) );
+
+    Mode_1_iteration_test();
+    Mode_2_iteration_test();
+    Mode_3_iteration_test();
+    Dilation_1_iteration_test();
+    Dilation_2_iterations_test();
+    Dilation_3_iterations_test();
+    Dilation_4_iterations_test();
+    Dilation_with_dummy_test();
+    Erosion_1_iteration_test();
+    Erosion_2_iterations_test();
+    Erosion_3_iterations_test();
+    Erosion_4_iterations_test();
+    Erosion_with_dummy_test();
+    Median_1_iteration_test();
+    Median_2_iterations_test();
+    Median_3_iterations_test();
+    Median_4_iterations_test();
+    Median_with_dummy_test();
+  }
+  catch( const TeException& e ){
+    TEAGN_LOGERR( "Test Failed - " + e.message() );
+    return EXIT_FAILURE;
+  } 
+
+  TEAGN_LOGMSG( "Test OK." );
+  return EXIT_SUCCESS;
+}
diff --git a/examples/image_processing/source/TePDIMorfFilter/TePDIMorfFilter_test.vcproj b/examples/image_processing/source/TePDIMorfFilter/TePDIMorfFilter_test.vcproj
new file mode 100755
index 0000000..0bd2e59
--- /dev/null
+++ b/examples/image_processing/source/TePDIMorfFilter/TePDIMorfFilter_test.vcproj
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="TePDIMorfFilter_test"
+	ProjectGUID="{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	RootNamespace="TePDIMorfFilter_test"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="0">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../base;../../../../src/terralib/image_processing;../../../../src/terralib/kernel;../../../../src/tiff"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PDIAGN_ENABLE_STDOUT_LOG"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Debug/terralibpdi/terralibpdi.lib ../../../../Debug/terralib/terralib.lib ../../../../Debug/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Debug/libjpeg/libjpeg.lib ../../../../Debug/shapelib/shapelib.lib user32.lib $(NOINHERIT)"
+				OutputFile="$(OutDir)/TePDIMorfFilter_test.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreAllDefaultLibraries="FALSE"
+				IgnoreDefaultLibraryNames="msvcrt.lib,libcmt.lib;libc.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"
+				TargetMachine="0"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="../../../../src/terralib/image_processing;../base;../../../../src/terralib/kernel;../../../../src/shapelib"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Release/terralibpdi/terralibpdi.lib ../../../../Release/terralib/terralib.lib ../../../../Release/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Release/libjpeg/libjpeg.lib ../../../../Release/shapelib/shapelib.lib"
+				OutputFile="$(OutDir)/TePDIMorfFilter_test.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\TePDIMorfFilter_test.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/image_processing/source/TePDIMosaic/TePDIMosaic.pro b/examples/image_processing/source/TePDIMosaic/TePDIMosaic.pro
new file mode 100755
index 0000000..4bd5f9f
--- /dev/null
+++ b/examples/image_processing/source/TePDIMosaic/TePDIMosaic.pro
@@ -0,0 +1,7 @@
+include( ../base/base.pro )
+
+SOURCES += \
+  TePDIMosaic_test.cpp
+
+QMAKE_CLEAN += \
+  ../../bin/Mosaic*.tif
\ No newline at end of file
diff --git a/examples/image_processing/source/TePDIMosaic/TePDIMosaic_test.cpp b/examples/image_processing/source/TePDIMosaic/TePDIMosaic_test.cpp
new file mode 100755
index 0000000..39b9695
--- /dev/null
+++ b/examples/image_processing/source/TePDIMosaic/TePDIMosaic_test.cpp
@@ -0,0 +1,233 @@
+#define TEAGN_ENABLE_STDOUT_LOG
+
+#include <TePDIExamplesBase.hpp>
+
+#include <TePDIParameters.hpp>
+#include <TeAgnostic.h>
+#include <TePDIUtils.hpp>
+#include <TePDIGeoMosaic.hpp>
+#include <TePDIBatchGeoMosaic.hpp>
+
+#include <TeInitRasterDecoders.h>
+#include <TeProgress.h>
+#include <TeStdIOProgress.h>
+
+#include <vector> 
+
+void GeoMosaic_noblend_test()
+{
+  TePDIParameters params1;
+
+  /* Building rasters */
+
+  TePDITypes::TePDIRasterPtrType input_raster1( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop_A.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_raster1->init(), 
+    "Unable to init input_raster1" );
+    
+  TePDITypes::TePDIRasterPtrType input_raster2( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop_B_contraste.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_raster2->init(), 
+    "Unable to init input_raster2" );    
+    
+  TePDITypes::TePDIRasterPtrType output_raster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( output_raster,
+    1, 1, 1, false, TeDOUBLE, 0 ), "output_raster Alloc error" );
+    
+  params1.SetParameter( "input_raster1" , input_raster1 );
+  params1.SetParameter( "input_raster2" , input_raster2 );
+  params1.SetParameter( "output_raster" , output_raster );
+  
+  std::vector< int > channels1;
+  channels1.push_back( 0 );
+  params1.SetParameter( "channels1" , channels1 );
+  
+  std::vector< int > channels2;
+  channels2.push_back( 0 );
+  params1.SetParameter( "channels2" , channels2 );
+  
+  params1.SetParameter( "blending_type" , std::string( "no_blending" ) );
+  params1.SetParameter( "dummy_value" , (double)0. );
+  params1.SetParameter( "keep_best_res" , (int)1 );
+  params1.SetParameter( "auto_equalize" , (int)1 );
+  
+  TePDIGeoMosaic mos;
+  TEAGN_TRUE_OR_THROW( mos.Reset(params1), "Reset failed" );
+  TEAGN_TRUE_OR_THROW( mos.Apply(), "Apply error" );
+  
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( output_raster,
+    TEPDIEXAMPLESBINPATH "Mosaic_geo_noblend_test.tif" ), "GeoTIF generation error" );
+}
+
+void GeoMosaic_euclidian_test()
+{
+  TePDIParameters params1;
+
+  /* Building rasters */
+
+  TePDITypes::TePDIRasterPtrType input_raster1( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop_A.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_raster1->init(), 
+    "Unable to init input_raster1" );
+    
+  TePDITypes::TePDIRasterPtrType input_raster2( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop_B_contraste.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_raster2->init(), 
+    "Unable to init input_raster2" );    
+    
+  TePDITypes::TePDIRasterPtrType output_raster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( output_raster,
+    1, 1, 1, false, TeDOUBLE, 0 ), "output_raster Alloc error" );
+    
+  params1.SetParameter( "input_raster1" , input_raster1 );
+  params1.SetParameter( "input_raster2" , input_raster2 );
+  params1.SetParameter( "output_raster" , output_raster );
+  
+  std::vector< int > channels1;
+  channels1.push_back( 0 );
+  params1.SetParameter( "channels1" , channels1 );
+  
+  std::vector< int > channels2;
+  channels2.push_back( 0 );
+  
+  params1.SetParameter( "channels2" , channels2 );
+  params1.SetParameter( "blending_type" , std::string( "euclidian_blending" ) );
+  params1.SetParameter( "dummy_value" , (double)0. );
+  params1.SetParameter( "auto_equalize" , (int)1 );  
+  
+  TePDIGeoMosaic mos;
+  TEAGN_TRUE_OR_THROW( mos.Reset(params1), "Reset failed" );
+  TEAGN_TRUE_OR_THROW( mos.Apply(), "Apply error" );
+  
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( output_raster,
+    TEPDIEXAMPLESBINPATH "Mosaic_geo_euclidianblend_test.tif" ), "GeoTIF generation error" );
+}
+
+
+void BatchGeoMosaic_noblend_test()
+{
+  TePDIParameters params1;
+
+  /* Building rasters */
+
+  TePDITypes::TePDIRasterPtrType input_raster1( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop_A.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_raster1->init(), 
+    "Unable to init input_raster1" );
+    
+  TePDITypes::TePDIRasterPtrType input_raster2( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop_B_contraste.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_raster2->init(), 
+    "Unable to init input_raster2" ); 
+    
+  TePDITypes::TePDIRasterPtrType input_raster3( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop_C.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_raster3->init(), 
+    "Unable to init input_raster2" );      
+    
+  std::vector< int > bands;
+  bands.push_back( 0 );   
+  bands.push_back( 0 );   
+  bands.push_back( 0 );   
+    
+  TePDITypes::TePDIRasterPtrType output_raster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( output_raster,
+    1, 1, 1, false, TeDOUBLE, 0 ), "output_raster Alloc error" );
+    
+  TePDITypes::TePDIRasterVectorType input_rasters;
+  input_rasters.push_back( input_raster1 );
+  input_rasters.push_back( input_raster2 );
+  input_rasters.push_back( input_raster3 );
+    
+  params1.SetParameter( "input_rasters" , input_rasters );
+  params1.SetParameter( "bands" , bands );
+  params1.SetParameter( "output_raster" , output_raster );
+  params1.SetParameter( "blending_type" , std::string( "no_blending" ) );
+  params1.SetParameter( "dummy_value" , (double)0. );
+  params1.SetParameter( "auto_equalize" , (int)1 );
+  
+  TePDIBatchGeoMosaic mos;
+  TEAGN_TRUE_OR_THROW( mos.Reset(params1), "Reset failed" );
+  TEAGN_TRUE_OR_THROW( mos.Apply(), "Apply error" );
+  
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( output_raster,
+    TEPDIEXAMPLESBINPATH "Mosaic_batchgeo_noblend_test.tif" ), "GeoTIF generation error" );
+}
+
+
+
+void BatchGeoMosaic_euclidian_test()
+{
+  TePDIParameters params1;
+
+  /* Building rasters */
+
+  TePDITypes::TePDIRasterPtrType input_raster1( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop_A.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_raster1->init(), 
+    "Unable to init input_raster1" );
+    
+  TePDITypes::TePDIRasterPtrType input_raster2( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop_B_contraste.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_raster2->init(), 
+    "Unable to init input_raster2" ); 
+    
+  TePDITypes::TePDIRasterPtrType input_raster3( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop_C.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_raster3->init(), 
+    "Unable to init input_raster2" );      
+    
+  std::vector< int > bands;
+  bands.push_back( 0 );   
+  bands.push_back( 0 );   
+  bands.push_back( 0 );   
+    
+  TePDITypes::TePDIRasterPtrType output_raster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( output_raster,
+    1, 1, 1, false, TeDOUBLE, 0 ), "output_raster Alloc error" );
+    
+  TePDITypes::TePDIRasterVectorType input_rasters;
+  input_rasters.push_back( input_raster1 );
+  input_rasters.push_back( input_raster2 );
+  input_rasters.push_back( input_raster3 );
+    
+  params1.SetParameter( "input_rasters" , input_rasters );
+  params1.SetParameter( "bands" , bands );
+  params1.SetParameter( "output_raster" , output_raster );
+  params1.SetParameter( "blending_type" , std::string( "euclidian_blending" ) );
+  params1.SetParameter( "dummy_value" , (double)0. );
+  params1.SetParameter( "auto_equalize" , (int)1 );
+  
+  TePDIBatchGeoMosaic mos;
+  TEAGN_TRUE_OR_THROW( mos.Reset(params1), "Reset failed" );
+  TEAGN_TRUE_OR_THROW( mos.Apply(), "Apply error" );
+  
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( output_raster,
+    TEPDIEXAMPLESBINPATH "Mosaic_batchgeo_euclidianblend_test.tif" ), "GeoTIF generation error" );
+}
+
+int main()
+{
+  TEAGN_LOGMSG( "Test started." );
+
+  try{
+    TeInitRasterDecoders();
+    
+    TeStdIOProgress pi;
+    TeProgress::setProgressInterf( dynamic_cast< TeProgressBase* >( &pi ) );     
+
+    GeoMosaic_noblend_test();
+    BatchGeoMosaic_noblend_test();
+    
+    GeoMosaic_euclidian_test();
+    BatchGeoMosaic_euclidian_test();
+  }
+  catch( const TeException& e ){
+    TEAGN_LOGERR( "Test Failed - " + e.message() );
+    return EXIT_FAILURE;
+  } 
+
+  TEAGN_LOGMSG( "Test OK." );
+  return EXIT_SUCCESS;
+}
+
diff --git a/examples/image_processing/source/TePDIMosaic/TePDIMosaic_test.vcproj b/examples/image_processing/source/TePDIMosaic/TePDIMosaic_test.vcproj
new file mode 100755
index 0000000..68cec50
--- /dev/null
+++ b/examples/image_processing/source/TePDIMosaic/TePDIMosaic_test.vcproj
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="TePDIMosaic_test"
+	ProjectGUID="{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	RootNamespace="TePDIMosaic_test"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="0">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../base;../../../../src/terralib/image_processing;../../../../src/terralib/kernel;../../../../src/tiff"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PDIAGN_ENABLE_STDOUT_LOG"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Debug/terralibpdi/terralibpdi.lib ../../../../Debug/terralib/terralib.lib ../../../../Debug/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Debug/libjpeg/libjpeg.lib ../../../../Debug/shapelib/shapelib.lib user32.lib $(NOINHERIT)"
+				OutputFile="$(OutDir)/TePDIMosaic_test.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreAllDefaultLibraries="FALSE"
+				IgnoreDefaultLibraryNames="msvcrt.lib,libcmt.lib;libc.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"
+				TargetMachine="0"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="../../../../src/terralib/image_processing;../base;../../../../src/terralib/kernel;../../../../src/shapelib"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Release/terralibpdi/terralibpdi.lib ../../../../Release/terralib/terralib.lib ../../../../Release/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Release/libjpeg/libjpeg.lib ../../../../Release/shapelib/shapelib.lib"
+				OutputFile="$(OutDir)/TePDIMosaic_test.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\TePDIMosaic_test.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/image_processing/source/TePDIOFMatching/TePDIOFMatching.pro b/examples/image_processing/source/TePDIOFMatching/TePDIOFMatching.pro
new file mode 100644
index 0000000..3f785d6
--- /dev/null
+++ b/examples/image_processing/source/TePDIOFMatching/TePDIOFMatching.pro
@@ -0,0 +1,7 @@
+include( ../base/base.pro )
+
+SOURCES += \
+  TePDIOFMatching_test.cpp
+
+QMAKE_CLEAN += \
+  ../../bin/TePDIOFMatching*.tif
diff --git a/examples/image_processing/source/TePDIOFMatching/TePDIOFMatching_test.cpp b/examples/image_processing/source/TePDIOFMatching/TePDIOFMatching_test.cpp
new file mode 100644
index 0000000..c439872
--- /dev/null
+++ b/examples/image_processing/source/TePDIOFMatching/TePDIOFMatching_test.cpp
@@ -0,0 +1,903 @@
+#define TEAGN_ENABLE_STDOUT_LOG
+
+#include <TePDIExamplesBase.hpp>
+
+#include <TePDIOFMatching.hpp>
+#include <TePDIUtils.hpp>
+
+#include <TeGTParams.h>
+#include <TeProgress.h>
+#include <TeStdIOProgress.h>
+#include <TeAgnostic.h>
+#include <TeDefines.h>
+
+#include <math.h>
+
+#ifndef M_PI
+  #define M_PI       3.14159265358979323846
+#endif
+#ifndef M_PI_2
+  #define M_PI_2     1.57079632679489661923
+#endif
+#ifndef M_PI_4
+  #define M_PI_4     0.785398163397448309616
+#endif
+
+void raster2Tiff( 
+  const TePDITypes::TePDIRasterPtrType& input_raster_ptr,
+  unsigned int raster_channel,
+  const std::string& out_file_name,
+  TeSharedPtr< TeCoordPairVect > out_tie_points_ptr,
+  unsigned int tie_points_space )
+{   
+  TEAGN_TRUE_OR_THROW( ( ! out_file_name.empty() ), 
+    "Invalid file name" )
+  TEAGN_TRUE_OR_THROW( ( input_raster_ptr->params().nlines_ > 0 ), 
+    "Invalid matrix lines" )
+  TEAGN_TRUE_OR_THROW( ( input_raster_ptr->params().ncols_ > 0 ), 
+    "Invalid matrix cols" )
+    
+  TeRasterParams params;
+  params.setNLinesNColumns( input_raster_ptr->params().nlines_,
+    input_raster_ptr->params().ncols_ );
+  params.nBands( 1 );
+  params.setDataType( TeUNSIGNEDCHAR, -1 );
+  params.nBands( 1 );
+  params.decoderIdentifier_ = "TIF";
+  params.mode_ = 'c';
+  params.fileName_ = out_file_name;
+  
+  TeRaster out_raster( params );
+  TEAGN_TRUE_OR_THROW( out_raster.init(), "Error init raster" );
+  double value = 0;
+  
+  for( int line = 0 ; 
+    line < input_raster_ptr->params().nlines_ ; ++line ) {
+    for( int col = 0 ; 
+      col < input_raster_ptr->params().ncols_ ; 
+      ++col ) {
+      
+      input_raster_ptr->getElement( col, line, value, 
+        raster_channel );
+      
+
+      TEAGN_TRUE_OR_THROW( out_raster.setElement( col, line, 
+        value, 0 ),
+        "Error writing raster" )
+    }  
+  }
+  
+  /* Draw tie-points */
+  
+  if( out_tie_points_ptr.isActive() ) {
+    TeCoordPairVect::iterator it = out_tie_points_ptr->begin();
+    TeCoordPairVect::iterator it_end = out_tie_points_ptr->end();
+    
+    while( it != it_end ) {
+      int x = 0;
+      int y = 0;
+      
+      if( tie_points_space == 0 ) {
+         x = TeRound( it->pt1.x() );
+         y = TeRound( it->pt1.y() );
+      } else {
+         x = TeRound( it->pt2.x() );
+         y = TeRound( it->pt2.y() );
+      }
+      
+      TEAGN_TRUE_OR_THROW( ( x < input_raster_ptr->params().ncols_ ),
+        "Invalid maxima column" )
+      TEAGN_TRUE_OR_THROW( ( x >= 0 ),
+        "Invalid maxima column" )      
+      TEAGN_TRUE_OR_THROW( ( y < input_raster_ptr->params().nlines_ ),
+        "Invalid maxima line" )
+      TEAGN_TRUE_OR_THROW( ( y >= 0 ),
+        "Invalid maxima line" )      
+      
+      TEAGN_TRUE_OR_THROW( out_raster.setElement( x, y, 
+        255.0, 0 ),
+        "Error writing raster" )    
+    
+      ++it;
+    }
+  
+  }
+}
+
+
+void rotateRasterClockWize( 
+  const TePDITypes::TePDIRasterPtrType& input_raster_ptr,
+  const TePDITypes::TePDIRasterPtrType& output_raster_ptr,
+  double angle )
+{
+  TEAGN_TRUE_OR_THROW( input_raster_ptr.isActive(),
+    "Invalid input pointer" );
+  TEAGN_TRUE_OR_THROW( output_raster_ptr.isActive(),
+    "Invalid output pointer" );    
+    
+  const double input_raster_lines = 
+    (double)input_raster_ptr->params().nlines_;
+  const double input_raster_cols = 
+    (double)input_raster_ptr->params().ncols_;
+  const unsigned int input_raster_channels =
+    (unsigned int)input_raster_ptr->nBands();
+    
+  const double last_x_idx = input_raster_cols - 1.0;
+  const double last_y_idx = input_raster_lines - 1.0;
+    
+  const double angle_cos = cos( angle );
+  const double angle_sin = sin( angle );
+  
+  /* Calc new image geometry */
+    
+  double min_x = MIN( 0.0, ( angle_cos * last_x_idx ) - 
+    ( angle_sin * last_y_idx ) );
+  min_x = MIN( min_x, ( angle_cos * last_x_idx ) );
+  min_x = MIN( min_x, ( -1.0 * angle_sin * last_y_idx ) );
+  
+  double max_x = MAX( 0.0, ( angle_cos * last_x_idx ) - 
+    ( angle_sin * last_y_idx ) );
+  max_x = MAX( max_x, ( angle_cos * last_x_idx ) );
+  max_x = MAX( max_x, ( -1.0 * angle_sin * last_y_idx ) );
+  
+  double min_y = MIN( 0.0, ( angle_sin * last_x_idx ) + 
+    ( angle_cos * last_y_idx ) );
+  min_y = MIN( min_y, ( angle_sin * last_x_idx ) );
+  min_y = MIN( min_y, ( angle_cos * last_y_idx ) );
+  
+  double max_y = MAX( 0.0, ( angle_sin * last_x_idx ) + 
+    ( angle_cos * last_y_idx ) );
+  max_y = MAX( max_y, ( angle_sin * last_x_idx ) );
+  max_y = MAX( max_y, ( angle_cos * last_y_idx ) );
+  
+  const unsigned int out_lines = (unsigned int) ceil(
+    max_y - min_y );
+  const unsigned int out_cols = (unsigned int) ceil(
+    max_x - min_x );
+    
+  /* reseting output raster */
+  
+  TeCoord2D ll_point_input_ref_indexed( min_x,
+    max_y );
+  TeCoord2D ur_point_input_ref_indexed( max_x,
+    min_y );
+    
+  TeCoord2D ll_point_input_ref = 
+    input_raster_ptr->index2Coord( ll_point_input_ref_indexed );
+  TeCoord2D ur_point_input_ref = 
+    input_raster_ptr->index2Coord( ur_point_input_ref_indexed );    
+  
+  TeRasterParams new_out_params = output_raster_ptr->params();
+  
+  new_out_params.boundingBoxLinesColumns(
+    ll_point_input_ref.x(), ll_point_input_ref.y(),
+    ur_point_input_ref.x(), ur_point_input_ref.y(),
+    out_lines, out_cols );
+    
+  TEAGN_TRUE_OR_THROW( output_raster_ptr->init( new_out_params ),
+    "Error reseting output raster" )
+  
+  /* remapping pixels */
+    
+  unsigned int curr_out_x = 0;
+  unsigned int curr_out_y = 0;
+  double value = 0;
+  unsigned int curr_in_x = 0;
+  unsigned int curr_in_y = 0;
+  unsigned int curr_channel = 0;
+  
+  for( curr_channel = 0 ; curr_channel < input_raster_channels ;
+    ++curr_channel ) {
+    for( curr_out_y = 0 ; curr_out_y < out_lines ; ++curr_out_y ) {
+      for( curr_out_x = 0 ; curr_out_x < out_cols ; ++curr_out_x ) {
+        curr_in_x = 
+          TeRound( 
+            ( angle_cos * ( curr_out_x + min_x ) ) + 
+            ( angle_sin * ( curr_out_y + min_y ) )
+          );
+        curr_in_y = 
+          TeRound( 
+            ( -1.0 * angle_sin * ( curr_out_x + min_x ) ) + 
+            ( angle_cos * ( curr_out_y + min_y ) )
+          );
+        
+        if( input_raster_ptr->getElement( curr_in_x, curr_in_y,
+          value, curr_channel ) ) {
+        
+          output_raster_ptr->setElement( curr_out_x, curr_out_y,
+            value, curr_channel );
+        } else {
+          output_raster_ptr->setElement( curr_out_x, curr_out_y,
+            0, curr_channel );        
+        }
+      }
+    }
+  }
+  
+  return;
+}
+
+
+void sameImageAndBoxesTest()
+{
+  /* Creating parameters */
+
+  TePDIParameters params;
+  
+  TePDITypes::TePDIRasterPtrType input_image1_ptr( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_rgb342_crop1.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_image1_ptr->init(), 
+    "Unable to init input_image1_ptr" );    
+  params.SetParameter( "input_image1_ptr" , input_image1_ptr );
+  
+  params.SetParameter( "input_channel1" , (unsigned int)0 );
+    
+  TePDITypes::TePDIRasterPtrType input_image2_ptr( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_rgb342_crop1.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_image2_ptr->init(), 
+    "Unable to init input_image2_ptr" ); 
+  params.SetParameter( "input_image2_ptr" , input_image2_ptr ); 
+  
+  params.SetParameter( "input_channel2" , (unsigned int)0 );       
+    
+  TeSharedPtr< TeCoordPairVect > out_tie_points_ptr( new TeCoordPairVect );
+  params.SetParameter( "out_tie_points_ptr" , out_tie_points_ptr );        
+  
+  TeGTParams gt_params;
+  gt_params.transformation_name_ = "affine";
+  gt_params.out_rem_strat_ = TeGTParams::LWAOutRemotion;
+  gt_params.max_dmap_error_ = 1.0;
+  gt_params.max_imap_error_ = 1.0;
+  params.SetParameter( "gt_params" , gt_params ); 
+  
+  TeBox input_box1_proj = input_image1_ptr->params().box();
+  TeBox input_box1;
+  TePDIUtils::MapCoords2RasterIndexes( input_box1_proj, 
+    input_image1_ptr, input_box1 );
+  params.SetParameter( "input_box1" , input_box1 );
+  
+  params.SetParameter( "input_box2" , input_box1 );
+  
+  params.SetParameter( "enable_multi_thread" , (int)1 ); 
+//  params.SetParameter( "skip_geom_filter" , (int)1 );
+  
+  params.SetParameter( "pixel_x_relation" , (double)1 ); 
+  params.SetParameter( "pixel_y_relation" , (double)1 ); 
+  
+  params.SetParameter( "max_tie_points" , (unsigned int)529 ); 
+  params.SetParameter( "corr_sens" , (double)0.5 );
+  params.SetParameter( "corr_window_width" , (unsigned int)21 );
+  params.SetParameter( "maximas_sens" , (double)0.02 );
+  
+  TeGTParams::pointer out_gt_params_ptr( new TeGTParams );
+  params.SetParameter( "out_gt_params_ptr" , out_gt_params_ptr );
+  
+  TePDIOFMatching match_instance; 
+  match_instance.ToggleProgInt( false );
+  TEAGN_TRUE_OR_THROW( match_instance.Reset( params ),
+    "Algorithm reset error" )
+    
+  TEAGN_LOGMSG( "Algorithm started" )
+  
+  time_t init_time = clock() / CLOCKS_PER_SEC ;
+  
+  TEAGN_TRUE_OR_THROW( match_instance.Apply(),
+    "Algorithm apply error" )      
+    
+  time_t end_time = clock() / CLOCKS_PER_SEC;
+  
+  TEAGN_LOGMSG( "Time elapsed (sameImageAndBoxesTest): " + 
+    TeAgnostic::to_string( (long int)( end_time - init_time ) ) +
+    " seconds" );
+    
+  /* Displaying tie-points */
+  {
+    TeCoordPairVect::iterator it = out_tie_points_ptr->begin();
+    TeCoordPairVect::iterator it_end = out_tie_points_ptr->end();
+    
+    while( it != it_end ) {
+      std::cout << "[" + Te2String( it->pt1.x(),1 ) + " , " +
+        Te2String( it->pt1.y(),1 ) + "] -> [" +
+        Te2String( it->pt2.x(),1 ) + " , " + 
+        Te2String( it->pt2.y(),1 ) + "]" << std::endl;
+      
+      ++it;
+    }
+  }
+  
+  /* Tie-points draw */
+  
+  raster2Tiff( input_image1_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TePDIOFMatching_test_sameImageAndBoxesTest_input_image1.tif",
+    out_tie_points_ptr, 0 );
+  raster2Tiff( input_image2_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TePDIOFMatching_test_sameImageAndBoxesTest_input_image2.tif",
+    out_tie_points_ptr, 1 );    
+    
+  /* Checking tie-points */
+  
+  TEAGN_WATCH( (unsigned int) out_tie_points_ptr->size() );
+  TEAGN_CHECK_EPS( 389, out_tie_points_ptr->size(),
+    0, "Invalid tie-points number" )      
+  
+  {
+    TeCoordPairVect::iterator it = out_tie_points_ptr->begin();
+    TeCoordPairVect::iterator it_end = out_tie_points_ptr->end();
+    
+    while( it != it_end ) {
+      TEAGN_CHECK_EPS( it->pt1.x(), it->pt2.x(), 0, 
+        "Invalid tie-point" )
+      TEAGN_CHECK_EPS( it->pt1.y(), it->pt2.y(), 0, 
+        "Invalid tie-point" )
+      
+      ++it;
+    }
+  }    
+}
+
+
+void sameImageDifBoxesTest()
+{
+  /* Creating parameters */
+
+  TePDIParameters params;
+  
+  TePDITypes::TePDIRasterPtrType input_image1_ptr( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_rgb342_crop1.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_image1_ptr->init(), 
+    "Unable to init input_image1_ptr" );    
+  params.SetParameter( "input_image1_ptr" , input_image1_ptr );
+  
+  params.SetParameter( "input_channel1" , (unsigned int)0 );
+    
+  TePDITypes::TePDIRasterPtrType input_image2_ptr( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_rgb342_crop1.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_image2_ptr->init(), 
+    "Unable to init input_image2_ptr" ); 
+  params.SetParameter( "input_image2_ptr" , input_image2_ptr ); 
+  
+  params.SetParameter( "input_channel2" , (unsigned int)0 );       
+    
+  TeSharedPtr< TeCoordPairVect > out_tie_points_ptr( new TeCoordPairVect );
+  params.SetParameter( "out_tie_points_ptr" , out_tie_points_ptr );        
+  
+  TeGTParams gt_params;
+  gt_params.transformation_name_ = "affine";
+  gt_params.out_rem_strat_ = TeGTParams::LWAOutRemotion;
+  gt_params.max_dmap_error_ = 1.0;
+  gt_params.max_imap_error_ = 1.0;
+  params.SetParameter( "gt_params" , gt_params ); 
+  
+  TeBox input_box1( TeCoord2D( 0, 760 ) , TeCoord2D( 680, 0 ) );
+  params.SetParameter( "input_box1" , input_box1 );
+  
+  TeBox input_box2( 
+    TeCoord2D( 190, input_image1_ptr->params().nlines_ - 1 ) , 
+    TeCoord2D( input_image1_ptr->params().ncols_ - 1, 227 ) );
+  params.SetParameter( "input_box2" , input_box2 );   
+  
+  params.SetParameter( "enable_multi_thread" , (int)1 ); 
+//  params.SetParameter( "skip_geom_filter" , (int)1 );
+  
+  params.SetParameter( "pixel_x_relation" , (double)1 ); 
+  params.SetParameter( "pixel_y_relation" , (double)1 ); 
+  
+  params.SetParameter( "max_tie_points" , (unsigned int)529 ); 
+  params.SetParameter( "corr_sens" , (double)0.5 );
+  params.SetParameter( "corr_window_width" , (unsigned int)21 );
+  params.SetParameter( "maximas_sens" , (double)0.02 );
+  
+  TePDIOFMatching match_instance; 
+  match_instance.ToggleProgInt( false );
+  TEAGN_TRUE_OR_THROW( match_instance.Reset( params ),
+    "Algorithm reset error" )
+    
+  TEAGN_LOGMSG( "Algorithm started" )
+  
+  time_t init_time = clock() / CLOCKS_PER_SEC;
+    
+  TEAGN_TRUE_OR_THROW( match_instance.Apply(),
+    "Algorithm apply error" )      
+    
+  time_t end_time = clock() / CLOCKS_PER_SEC;
+  
+  TEAGN_LOGMSG( "Time elapsed (sameImageDifBoxesTest): " + 
+    TeAgnostic::to_string( (long int)( end_time - init_time ) ) +
+    " seconds" );
+    
+  /* Displaying tie-points */
+  {
+    TeCoordPairVect::iterator it = out_tie_points_ptr->begin();
+    TeCoordPairVect::iterator it_end = out_tie_points_ptr->end();
+    
+    while( it != it_end ) {
+      std::cout << "[" + Te2String( it->pt1.x(),1 ) + " , " +
+        Te2String( it->pt1.y(),1 ) + "] -> [" +
+        Te2String( it->pt2.x(),1 ) + " , " + 
+        Te2String( it->pt2.y(),1 ) + "]" << std::endl;
+      
+      ++it;
+    }
+  }
+  
+  /* Tie-points draw */
+  
+  raster2Tiff( input_image1_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TePDIOFMatching_test_sameImageDifBoxesTest_input_image1.tif",
+    out_tie_points_ptr, 0 );
+  raster2Tiff( input_image2_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TePDIOFMatching_test_sameImageDifBoxesTest_input_image2.tif",
+    out_tie_points_ptr, 1 );    
+    
+  TEAGN_WATCH( (unsigned int)out_tie_points_ptr->size() );
+  TEAGN_CHECK_EPS( 98, out_tie_points_ptr->size(),
+    0, "Invalid tie-points number" )    
+}
+
+
+void halfsampledImageTest()
+{
+  /* Creating parameters */
+
+  TePDIParameters params;
+  
+  TePDITypes::TePDIRasterPtrType input_image1_ptr( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_image1_ptr->init(), 
+    "Unable to init input_image1_ptr" );    
+  params.SetParameter( "input_image1_ptr" , input_image1_ptr );
+  
+  params.SetParameter( "input_channel1" , (unsigned int)0 );
+    
+  TePDITypes::TePDIRasterPtrType input_image2_ptr( new TeRaster(
+    std::string( 
+    TEPDIEXAMPLESRESPATH "cbers_b2_crop_contraste_halfsampled.tif" ), 
+    'r' ) );
+  TEAGN_TRUE_OR_THROW( input_image2_ptr->init(), 
+    "Unable to init input_image2_ptr" ); 
+  params.SetParameter( "input_image2_ptr" , input_image2_ptr ); 
+  
+  params.SetParameter( "input_channel2" , (unsigned int)0 );       
+    
+  TeSharedPtr< TeCoordPairVect > out_tie_points_ptr( new TeCoordPairVect );
+  params.SetParameter( "out_tie_points_ptr" , out_tie_points_ptr );        
+  
+  TeGTParams gt_params;
+  gt_params.transformation_name_ = "affine";
+  gt_params.out_rem_strat_ = TeGTParams::LWAOutRemotion;
+  gt_params.max_dmap_error_ = 1.0;
+  gt_params.max_imap_error_ = 1.0;
+  params.SetParameter( "gt_params" , gt_params ); 
+  
+  TeBox input_box1( TeCoord2D( 122.0, 698.0 ), 
+    TeCoord2D( 730.0, 138.0 ) );
+  params.SetParameter( "input_box1" , input_box1 );
+  
+  TeBox input_box2( TeCoord2D( 110.0, 305.0 ), 
+    TeCoord2D( 385.0, 50.0 ) );
+  params.SetParameter( "input_box2" , input_box2 );   
+  
+  params.SetParameter( "enable_multi_thread" , (int)1 ); 
+//  params.SetParameter( "skip_geom_filter" , (int)1 );
+  params.SetParameter( "corr_window_width" , (unsigned int)21 );
+  
+  params.SetParameter( "pixel_x_relation" , (double)0.5 ); 
+  params.SetParameter( "pixel_y_relation" , (double)0.5 ); 
+  
+  params.SetParameter( "max_tie_points" , (unsigned int)529 ); 
+  params.SetParameter( "corr_sens" , (double)0.5 );
+  params.SetParameter( "maximas_sens" , (double)0.02 );
+  
+  TePDIOFMatching match_instance; 
+  match_instance.ToggleProgInt( false );
+  TEAGN_TRUE_OR_THROW( match_instance.Reset( params ),
+    "Algorithm reset error" )
+    
+  TEAGN_LOGMSG( "Algorithm started" )
+  
+  time_t init_time = clock() / CLOCKS_PER_SEC;
+    
+  TEAGN_TRUE_OR_THROW( match_instance.Apply(),
+    "Algorithm apply error" )      
+    
+  time_t end_time = clock() / CLOCKS_PER_SEC;
+  
+  TEAGN_LOGMSG( "Time elapsed (halfsampledImageTest): " + 
+    TeAgnostic::to_string( (long int)( end_time - init_time ) ) +
+    " seconds" );
+    
+  /* Displaying tie-points */
+  
+  TeCoordPairVect::iterator it = out_tie_points_ptr->begin();
+  TeCoordPairVect::iterator it_end = out_tie_points_ptr->end();
+  
+  while( it != it_end ) {
+    std::cout << "[" + Te2String( it->pt1.x(),1 ) + " , " +
+      Te2String( it->pt1.y(),1 ) + "] -> [" +
+      Te2String( it->pt2.x(),1 ) + " , " + 
+      Te2String( it->pt2.y(),1 ) + "]" << std::endl;
+    
+    ++it;
+  }
+  
+  /* Tie-points draw */
+  
+  raster2Tiff( input_image1_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TePDIOFMatching_test_halfsampledImageTest_input_image1.tif",
+    out_tie_points_ptr, 0 );
+  raster2Tiff( input_image2_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TePDIOFMatching_test_halfsampledImageTest_input_image2.tif",
+    out_tie_points_ptr, 1 );  
+    
+  TEAGN_WATCH( (unsigned int)out_tie_points_ptr->size() );
+  TEAGN_CHECK_EPS( 130, out_tie_points_ptr->size(),
+    0, "Invalid tie-points number" )         
+}
+
+
+void halfsampledImageTest2()
+{
+  /* Creating parameters */
+
+  TePDIParameters params;
+  
+  TePDITypes::TePDIRasterPtrType input_image1_ptr( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop_contraste_halfsampled.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_image1_ptr->init(), 
+    "Unable to init input_image1_ptr" );    
+  params.SetParameter( "input_image1_ptr" , input_image1_ptr );
+  
+  params.SetParameter( "input_channel1" , (unsigned int)0 );
+    
+  TePDITypes::TePDIRasterPtrType input_image2_ptr( new TeRaster(
+    std::string( 
+    TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 
+    'r' ) );
+  TEAGN_TRUE_OR_THROW( input_image2_ptr->init(), 
+    "Unable to init input_image2_ptr" ); 
+  params.SetParameter( "input_image2_ptr" , input_image2_ptr ); 
+  
+  params.SetParameter( "input_channel2" , (unsigned int)0 );       
+    
+  TeSharedPtr< TeCoordPairVect > out_tie_points_ptr( new TeCoordPairVect );
+  params.SetParameter( "out_tie_points_ptr" , out_tie_points_ptr );        
+  
+  TeGTParams gt_params;
+  gt_params.transformation_name_ = "affine";
+  gt_params.out_rem_strat_ = TeGTParams::LWAOutRemotion;
+  gt_params.max_dmap_error_ = 1.0;
+  gt_params.max_imap_error_ = 1.0;
+  params.SetParameter( "gt_params" , gt_params ); 
+  
+  TeBox input_box1( TeCoord2D( 110.0, 305.0 ), 
+    TeCoord2D( 385.0, 50.0 ) );    
+  params.SetParameter( "input_box1" , input_box1 );
+  
+  TeBox input_box2( TeCoord2D( 122.0, 698.0 ), 
+    TeCoord2D( 730.0, 138.0 ) );    
+  params.SetParameter( "input_box2" , input_box2 );   
+  
+  params.SetParameter( "enable_multi_thread" , (int)1 ); 
+//  params.SetParameter( "skip_geom_filter" , (int)1 );
+  
+  params.SetParameter( "pixel_x_relation" , (double)2 ); 
+  params.SetParameter( "pixel_y_relation" , (double)2 ); 
+  
+  params.SetParameter( "max_tie_points" , (unsigned int)529 );
+  params.SetParameter( "corr_sens" , (double)0.5 ); 
+  params.SetParameter( "corr_window_width" , (unsigned int)21 );
+  params.SetParameter( "maximas_sens" , (double)0.02 );
+  
+  TePDIOFMatching match_instance; 
+  match_instance.ToggleProgInt( false );
+  TEAGN_TRUE_OR_THROW( match_instance.Reset( params ),
+    "Algorithm reset error" )
+    
+  TEAGN_LOGMSG( "Algorithm started" )
+  
+  time_t init_time = clock() / CLOCKS_PER_SEC;
+    
+  TEAGN_TRUE_OR_THROW( match_instance.Apply(),
+    "Algorithm apply error" )      
+    
+  time_t end_time = clock() / CLOCKS_PER_SEC;
+  
+  TEAGN_LOGMSG( "Time elapsed (halfsampledImageTest): " + 
+    TeAgnostic::to_string( (long int)( end_time - init_time ) ) +
+    " seconds" );
+    
+  /* Displaying tie-points */
+  
+  TeCoordPairVect::iterator it = out_tie_points_ptr->begin();
+  TeCoordPairVect::iterator it_end = out_tie_points_ptr->end();
+  
+  while( it != it_end ) {
+    std::cout << "[" + Te2String( it->pt1.x(),1 ) + " , " +
+      Te2String( it->pt1.y(),1 ) + "] -> [" +
+      Te2String( it->pt2.x(),1 ) + " , " + 
+      Te2String( it->pt2.y(),1 ) + "]" << std::endl;
+    
+    ++it;
+  }
+  
+  /* Tie-points draw */
+  
+  raster2Tiff( input_image1_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TePDIOFMatching_test_halfsampledImageTest2_input_image1.tif",
+    out_tie_points_ptr, 0 );
+  raster2Tiff( input_image2_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TePDIOFMatching_test_halfsampledImageTest2_input_image2.tif",
+    out_tie_points_ptr, 1 );    
+    
+  TEAGN_WATCH( (unsigned int)out_tie_points_ptr->size() );
+  TEAGN_CHECK_EPS( 130, out_tie_points_ptr->size(),
+    0, "Invalid tie-points number" )     
+}
+
+
+void halfsampledRotadedImageTest()
+{
+  /* Open image 1 */
+
+  TePDIParameters params;
+  
+  TePDITypes::TePDIRasterPtrType input_image1_ptr( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_image1_ptr->init(), 
+    "Unable to init input_image1_ptr" );    
+  params.SetParameter( "input_image1_ptr" , input_image1_ptr );
+  
+  params.SetParameter( "input_channel1" , (unsigned int)0 );
+  
+  /* Creating the half-sampled-rotated image 2 */
+    
+  TePDITypes::TePDIRasterPtrType input_disk_image2_ptr( new TeRaster(
+    std::string( 
+    TEPDIEXAMPLESRESPATH "cbers_b2_crop_contraste_halfsampled.tif" ), 
+    'r' ) );
+  TEAGN_TRUE_OR_THROW( input_disk_image2_ptr->init(), 
+    "Unable to init input_image2_ptr" );
+      
+  TePDITypes::TePDIRasterPtrType input_image2_ptr;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( 
+    input_image2_ptr, input_disk_image2_ptr->params(), 
+    TePDIUtils::TePDIUtilsAutoMemPol ),
+    "Error allocating raster memory" );
+    
+  rotateRasterClockWize( input_disk_image2_ptr, input_image2_ptr, M_PI_4 );
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( input_image2_ptr, 
+    TEPDIEXAMPLESBINPATH "TePDIOFMatching_test_rotatedimage.tif", 
+    TeUNSIGNEDCHAR ),
+    "Error saving rotated image" );
+      
+  params.SetParameter( "input_image2_ptr" , input_image2_ptr ); 
+  
+  /* Set the other parameters */
+  
+  params.SetParameter( "input_channel2" , (unsigned int)0 );       
+    
+  TeSharedPtr< TeCoordPairVect > out_tie_points_ptr( new TeCoordPairVect );
+  params.SetParameter( "out_tie_points_ptr" , out_tie_points_ptr );        
+  
+  TeGTParams gt_params;
+  gt_params.transformation_name_ = "affine";
+  gt_params.out_rem_strat_ = TeGTParams::LWAOutRemotion;
+  gt_params.max_dmap_error_ = 1.0;
+  gt_params.max_imap_error_ = 1.0;
+  params.SetParameter( "gt_params" , gt_params ); 
+  
+  TeBox input_box1( TeCoord2D( 122.0, 698.0 ), 
+    TeCoord2D( 730.0, 138.0 ) );
+  params.SetParameter( "input_box1" , input_box1 );
+  
+  TeBox input_box2( TeCoord2D( 173.0, 447.0 ), 
+    TeCoord2D( 434.0, 153.0 ) );
+  params.SetParameter( "input_box2" , input_box2 );   
+  
+  params.SetParameter( "enable_multi_thread" , (int)1 ); 
+//  params.SetParameter( "skip_geom_filter" , (int)1 );
+  
+  params.SetParameter( "pixel_x_relation" , (double)0.5 ); 
+  params.SetParameter( "pixel_y_relation" , (double)0.5 ); 
+  
+  params.SetParameter( "max_tie_points" , (unsigned int)529 ); 
+  params.SetParameter( "corr_sens" , (double)0.5 );
+  params.SetParameter( "corr_window_width" , (unsigned int)21 );
+  params.SetParameter( "maximas_sens" , (double)0.02 );
+  
+  TePDIOFMatching match_instance; 
+  match_instance.ToggleProgInt( false );
+  TEAGN_TRUE_OR_THROW( match_instance.Reset( params ),
+    "Algorithm reset error" )
+    
+  TEAGN_LOGMSG( "Algorithm started" )
+  
+  time_t init_time = clock() / CLOCKS_PER_SEC;
+    
+  TEAGN_TRUE_OR_THROW( match_instance.Apply(),
+    "Algorithm apply error" )      
+    
+  time_t end_time = clock() / CLOCKS_PER_SEC;
+  
+  TEAGN_LOGMSG( "Time elapsed (halfsampledRotadedImageTest): " + 
+    TeAgnostic::to_string( (long int)( end_time - init_time ) ) +
+    " seconds" );
+    
+  /* Displaying tie-points */
+  
+  TeCoordPairVect::iterator it = out_tie_points_ptr->begin();
+  TeCoordPairVect::iterator it_end = out_tie_points_ptr->end();
+  
+  while( it != it_end ) {
+    std::cout << "[" + Te2String( it->pt1.x(),1 ) + " , " +
+      Te2String( it->pt1.y(),1 ) + "] -> [" +
+      Te2String( it->pt2.x(),1 ) + " , " + 
+      Te2String( it->pt2.y(),1 ) + "]" << std::endl;
+    
+    ++it;
+  }
+  
+  /* Tie-points draw */
+  
+  raster2Tiff( input_image1_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TePDIOFMatching_test_halfsampledRotadedImageTest_input_image1.tif",
+    out_tie_points_ptr, 0 );
+  raster2Tiff( input_image2_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TePDIOFMatching_test_halfsampledRotadedImageTest_input_image2.tif",
+    out_tie_points_ptr, 1 );   
+    
+  TEAGN_WATCH( (unsigned int)out_tie_points_ptr->size() );
+  TEAGN_CHECK_EPS( 28, out_tie_points_ptr->size(),
+    0, "Invalid tie-points number" )
+}
+
+void halfsampledRotadedImageWithDownsampleTest()
+{
+  /* Open image 1 */
+
+  TePDIParameters params;
+  
+  TePDITypes::TePDIRasterPtrType input_image1_ptr( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_image1_ptr->init(), 
+    "Unable to init input_image1_ptr" );    
+  params.SetParameter( "input_image1_ptr" , input_image1_ptr );
+  
+  params.SetParameter( "input_channel1" , (unsigned int)0 );
+  
+  /* Creating the half-sampled-rotated image 2 */
+    
+  TePDITypes::TePDIRasterPtrType input_disk_image2_ptr( new TeRaster(
+    std::string( 
+    TEPDIEXAMPLESRESPATH "cbers_b2_crop_contraste_halfsampled.tif" ), 
+    'r' ) );
+  TEAGN_TRUE_OR_THROW( input_disk_image2_ptr->init(), 
+    "Unable to init input_image2_ptr" );
+      
+  TePDITypes::TePDIRasterPtrType input_image2_ptr;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( 
+    input_image2_ptr, input_disk_image2_ptr->params(), 
+    TePDIUtils::TePDIUtilsAutoMemPol ),
+    "Error allocating raster memory" );
+    
+  rotateRasterClockWize( input_disk_image2_ptr, input_image2_ptr, M_PI_4 );
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( input_image2_ptr, 
+    TEPDIEXAMPLESBINPATH "TePDIOFMatching_test_rotatedimage.tif", 
+    TeUNSIGNEDCHAR ),
+    "Error saving rotated image" );
+      
+  params.SetParameter( "input_image2_ptr" , input_image2_ptr ); 
+  
+  /* Set the other parameters */
+  
+  params.SetParameter( "input_channel2" , (unsigned int)0 );       
+    
+  TeSharedPtr< TeCoordPairVect > out_tie_points_ptr( new TeCoordPairVect );
+  params.SetParameter( "out_tie_points_ptr" , out_tie_points_ptr );        
+  
+  TeGTParams gt_params;
+  gt_params.transformation_name_ = "affine";
+  gt_params.out_rem_strat_ = TeGTParams::LWAOutRemotion;
+  gt_params.max_dmap_rmse_ = 1.0;
+  gt_params.max_imap_rmse_ = 1.0;
+  params.SetParameter( "gt_params" , gt_params ); 
+  
+  TeBox input_box1( TeCoord2D( 122.0, 698.0 ), 
+    TeCoord2D( 730.0, 138.0 ) );
+  params.SetParameter( "input_box1" , input_box1 );
+  
+  TeBox input_box2( TeCoord2D( 173.0, 447.0 ), 
+    TeCoord2D( 434.0, 153.0 ) );
+  params.SetParameter( "input_box2" , input_box2 );   
+  
+  params.SetParameter( "enable_multi_thread" , (int)1 ); 
+//  params.SetParameter( "skip_geom_filter" , (int)1 );
+  params.SetParameter( "max_size_opt" , (unsigned int)( 200 * 200 ) );
+  
+  params.SetParameter( "pixel_x_relation" , (double)0.5 ); 
+  params.SetParameter( "pixel_y_relation" , (double)0.5 ); 
+  
+  params.SetParameter( "max_tie_points" , (unsigned int)529 ); 
+  params.SetParameter( "corr_sens" , (double)0.5 );
+  params.SetParameter( "corr_window_width" , (unsigned int)21 );
+  params.SetParameter( "maximas_sens" , (double)0.02 );
+  
+  TePDIOFMatching match_instance; 
+  match_instance.ToggleProgInt( false );
+  TEAGN_TRUE_OR_THROW( match_instance.Reset( params ),
+    "Algorithm reset error" )
+    
+  TEAGN_LOGMSG( "Algorithm started" )
+  
+  time_t init_time = clock() / CLOCKS_PER_SEC;
+    
+  TEAGN_TRUE_OR_THROW( match_instance.Apply(),
+    "Algorithm apply error" )      
+    
+  time_t end_time = clock() / CLOCKS_PER_SEC;
+  
+  TEAGN_LOGMSG( "Time elapsed (halfsampledRotadedImageWithDownsampleTest): " + 
+    TeAgnostic::to_string( (long int)( end_time - init_time ) ) +
+    " seconds" );
+    
+  /* Displaying tie-points */
+  
+  TeCoordPairVect::iterator it = out_tie_points_ptr->begin();
+  TeCoordPairVect::iterator it_end = out_tie_points_ptr->end();
+  
+  while( it != it_end ) {
+    std::cout << "[" + Te2String( it->pt1.x(),1 ) + " , " +
+      Te2String( it->pt1.y(),1 ) + "] -> [" +
+      Te2String( it->pt2.x(),1 ) + " , " + 
+      Te2String( it->pt2.y(),1 ) + "]" << std::endl;
+    
+    ++it;
+  }
+  
+  /* Tie-points draw */
+  
+  raster2Tiff( input_image1_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TePDIOFMatching_test_halfsampledRotadedImageWithDownsampleTest_input_image1.tif",
+    out_tie_points_ptr, 0 );
+  raster2Tiff( input_image2_ptr, 0, TEPDIEXAMPLESBINPATH
+    "TePDIOFMatching_test_halfsampledRotadedImageWithDownsampleTest_input_image2.tif",
+    out_tie_points_ptr, 1 );   
+    
+  TEAGN_WATCH( (unsigned int)out_tie_points_ptr->size() );
+  TEAGN_CHECK_EPS( 33, out_tie_points_ptr->size(),
+    0, "Invalid tie-points number" )       
+}
+
+
+int main()
+{
+  TEAGN_LOGMSG( "Test started." );
+
+  try{
+    TeStdIOProgress pi;
+    TeProgress::setProgressInterf( dynamic_cast< TeProgressBase* >( &pi ) );     
+    
+    time_t init_time = clock() / CLOCKS_PER_SEC;
+    
+    sameImageAndBoxesTest();
+    sameImageDifBoxesTest();
+    halfsampledImageTest();
+    halfsampledImageTest2();
+    halfsampledRotadedImageTest();
+    halfsampledRotadedImageWithDownsampleTest();
+    
+    time_t end_time = clock() / CLOCKS_PER_SEC;
+    
+    TEAGN_LOGMSG( "Total elapsed time: " + 
+      TeAgnostic::to_string( (long int)( end_time - init_time ) ) +
+      " seconds" );    
+  }
+  catch( const TeException& e ){
+    TEAGN_LOGERR( "Test Failed - " + e.message() );
+    return EXIT_FAILURE;
+  }  
+
+  TEAGN_LOGMSG( "Test OK." );
+  return EXIT_SUCCESS;
+}
+
diff --git a/examples/image_processing/source/TePDIOFMatching/TePDIOFMatching_test.vcproj b/examples/image_processing/source/TePDIOFMatching/TePDIOFMatching_test.vcproj
new file mode 100644
index 0000000..3e2ebfb
--- /dev/null
+++ b/examples/image_processing/source/TePDIOFMatching/TePDIOFMatching_test.vcproj
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="TePDIOFMatching_test"
+	ProjectGUID="{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	RootNamespace="TePDIOFMatching_test"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="0">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;../base;../../../../src/terralib/image_processing;../../../../src/terralib/kernel;../../../../src/tiff"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PDIAGN_ENABLE_STDOUT_LOG"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Debug/terralibpdi/terralibpdi.lib ../../../../Debug/terralib/terralib.lib ../../../../Debug/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Debug/libjpeg/libjpeg.lib ../../../../Debug/shapelib/shapelib.lib user32.lib $(NOINHERIT)"
+				OutputFile="$(OutDir)/TePDIOFMatching_test.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreAllDefaultLibraries="FALSE"
+				IgnoreDefaultLibraryNames="msvcrt.lib,libcmt.lib;libc.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"
+				TargetMachine="0"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories=".;../../../../src/terralib/image_processing;../base;../../../../src/terralib/kernel;../../../../src/shapelib"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Release/terralibpdi/terralibpdi.lib ../../../../Release/terralib/terralib.lib ../../../../Release/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Release/libjpeg/libjpeg.lib ../../../../Release/shapelib/shapelib.lib"
+				OutputFile="$(OutDir)/TePDIOFMatching_test.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\TePDIOFMatching_test.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/image_processing/source/TePDIPIManager/TePDIPIManager.pro b/examples/image_processing/source/TePDIPIManager/TePDIPIManager.pro
new file mode 100644
index 0000000..d93b3b6
--- /dev/null
+++ b/examples/image_processing/source/TePDIPIManager/TePDIPIManager.pro
@@ -0,0 +1,5 @@
+include( ../base/base.pro )
+
+SOURCES += TePDIPIManager_test.cpp
+
+QMAKE_CLEAN += 
diff --git a/examples/image_processing/source/TePDIPIManager/TePDIPIManager_test.cpp b/examples/image_processing/source/TePDIPIManager/TePDIPIManager_test.cpp
new file mode 100755
index 0000000..ae51bf5
--- /dev/null
+++ b/examples/image_processing/source/TePDIPIManager/TePDIPIManager_test.cpp
@@ -0,0 +1,64 @@
+#define TEAGN_ENABLE_STDOUT_LOG
+
+#include <TePDIPIManager.hpp>
+
+
+#include <TeProgress.h>
+#include <TeStdIOProgress.h>
+#include <TeAgnostic.h>
+
+
+int main()
+{
+  TEAGN_LOGMSG( "Test started." );
+
+  try{
+    TeStdIOProgress pi;
+    TeProgress::setProgressInterf( dynamic_cast< TeProgressBase* >( &pi ) );  
+    
+    /* Test 0 */
+    {
+      TePDIPIManager manager1( "Manager1", 100, true );
+      manager1.Update( 50 );
+      manager1.Update( 100 );
+    }    
+  
+    /* Test 1 */
+    {
+      TePDIPIManager manager1( "Manager1", 100, true );
+      manager1.Update( 25 );
+      
+      TePDIPIManager manager2( "Manager2", 100, true );
+      manager2.Update( 50 );
+      
+      TePDIPIManager manager3( "Manager3", 100, true );
+      manager3.Update( 75 );   
+      
+      manager1.Update( 100 );  
+      manager2.Update( 100 ); 
+      manager3.Update( 100 );  
+    }
+    
+    /* Test 2 */
+    {
+      TePDIPIManager manager1( "Manager1", 100, true );
+      TePDIPIManager manager2( "Manager2", 100, true );
+      TePDIPIManager manager3( "Manager3", 100, true );
+      
+      manager1.Update( 50 );
+      manager2.Update( 50 );
+      manager3.Update( 50 ); 
+      
+      manager1.Update( 100 );
+      manager2.Update( 100 );
+      manager3.Update( 100 );       
+    }    
+  }
+  catch( const TeException& e ){
+    TEAGN_LOGERR( "Test Failed - " + e.message() );
+    return EXIT_FAILURE;
+  }  
+
+  TEAGN_LOGMSG( "Test OK." );
+  return EXIT_SUCCESS;
+}
diff --git a/examples/image_processing/source/TePDIPIManager/TePDIPIManager_test.vcproj b/examples/image_processing/source/TePDIPIManager/TePDIPIManager_test.vcproj
new file mode 100644
index 0000000..9edec36
--- /dev/null
+++ b/examples/image_processing/source/TePDIPIManager/TePDIPIManager_test.vcproj
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="TePDIPIManager_test"
+	ProjectGUID="{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	RootNamespace="TePDIPIManager_test"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="0">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../base;../../../../src/terralib/image_processing;../../../../src/terralib/kernel;../../../../src/tiff"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PDIAGN_ENABLE_STDOUT_LOG"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Debug/terralibpdi/terralibpdi.lib ../../../../Debug/terralib/terralib.lib ../../../../Debug/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Debug/libjpeg/libjpeg.lib ../../../../Debug/shapelib/shapelib.lib user32.lib $(NOINHERIT)"
+				OutputFile="$(OutDir)/TePDIPIManager_test.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreAllDefaultLibraries="FALSE"
+				IgnoreDefaultLibraryNames="msvcrt.lib,libcmt.lib;libc.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"
+				TargetMachine="0"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="../../../../src/terralib/image_processing;../base;../../../../src/terralib/kernel;../../../../src/shapelib"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Release/terralibpdi/terralibpdi.lib ../../../../Release/terralib/terralib.lib ../../../../Release/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Release/libjpeg/libjpeg.lib ../../../../Release/shapelib/shapelib.lib"
+				OutputFile="$(OutDir)/TePDIPIManager_test.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\TePDIPIManager_test.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/image_processing/source/TePDIParameters/TePDIParameters.pro b/examples/image_processing/source/TePDIParameters/TePDIParameters.pro
new file mode 100755
index 0000000..ad61b18
--- /dev/null
+++ b/examples/image_processing/source/TePDIParameters/TePDIParameters.pro
@@ -0,0 +1,4 @@
+include( ../base/base.pro )
+
+SOURCES += TePDIParameters_test.cpp
+
diff --git a/examples/image_processing/source/TePDIParameters/TePDIParameters_test.cpp b/examples/image_processing/source/TePDIParameters/TePDIParameters_test.cpp
new file mode 100755
index 0000000..92fd5aa
--- /dev/null
+++ b/examples/image_processing/source/TePDIParameters/TePDIParameters_test.cpp
@@ -0,0 +1,69 @@
+#define TEAGN_ENABLE_STDOUT_LOG
+
+#include <TePDIParameters.hpp>
+#include <TeAgnostic.h>
+
+int main()
+{
+  TEAGN_LOGMSG( "Test started." );
+
+  try{
+    TePDIParameters params_copy;
+    
+    const int x1_int = 1;
+    const double x1_double = 1;
+    
+    {
+      TePDIParameters params;
+      
+      params.SetParameter( "int", x1_int );
+      params.SetParameter( "double", x1_double );    
+      
+      TEAGN_TRUE_OR_THROW( params.CheckParameter< int >( "int" ), "" )
+      TEAGN_TRUE_OR_THROW( params.CheckParameter< double >( "double" ), "" )
+      
+      int x2_int = 0;
+      TEAGN_TRUE_OR_THROW( params.GetParameter( "int", x2_int ),
+        "Missing parameter" );    
+      TEAGN_CHECK_EPS( x2_int, x1_int, 0, "" )
+      
+      double x2_double = 0;
+      TEAGN_TRUE_OR_THROW( params.GetParameter( "double", 
+        x2_double ), "Missing parameter" );
+      TEAGN_CHECK_EPS( x2_double, x1_double, 0, "" )      
+      
+      params_copy = params;
+      
+      TEAGN_TRUE_OR_THROW( ( params_copy == params ),
+        "Invalid ==operator result" )
+    }
+    
+    TEAGN_TRUE_OR_THROW( params_copy.CheckParameter< int >( "int" ), "" )
+    TEAGN_TRUE_OR_THROW( params_copy.CheckParameter< double >( "double" ), "" )
+    
+    int x2_int = 0;
+    TEAGN_TRUE_OR_THROW( params_copy.GetParameter( "int", x2_int ),
+      "Missing paramter" );    
+    TEAGN_CHECK_EPS( x2_int, x1_int, 0, "" )
+    
+    double x2_double = 0;
+    TEAGN_TRUE_OR_THROW( params_copy.GetParameter( "double", 
+      x2_double ), "Missing parameter" );
+    TEAGN_CHECK_EPS( x2_double, x1_double, 0, "" )
+    
+    /* Checking parameter remotion */
+    
+    TEAGN_TRUE_OR_THROW( params_copy.CheckParameter< double >( 
+      "double" ), "" )
+    params_copy.RemoveParameter( "double" );
+    TEAGN_TRUE_OR_THROW( ! params_copy.CheckParameter< double >( 
+      "double" ), "" )    
+  }
+  catch( const TeException& e ){
+    TEAGN_LOGERR( "Test Failed - " + e.message() );
+    return EXIT_FAILURE;
+  }  
+
+  TEAGN_LOGMSG( "Test OK." );
+  return EXIT_SUCCESS;
+}
diff --git a/examples/image_processing/source/TePDIParameters/TePDIParameters_test.vcproj b/examples/image_processing/source/TePDIParameters/TePDIParameters_test.vcproj
new file mode 100755
index 0000000..2801a6b
--- /dev/null
+++ b/examples/image_processing/source/TePDIParameters/TePDIParameters_test.vcproj
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="TePDIParameters_test"
+	ProjectGUID="{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	RootNamespace="TePDIParameters_test"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="0">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../base;../../../../src/terralib/image_processing;../../../../src/terralib/kernel;../../../../src/tiff"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PDIAGN_ENABLE_STDOUT_LOG"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Debug/terralibpdi/terralibpdi.lib ../../../../Debug/terralib/terralib.lib ../../../../Debug/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Debug/libjpeg/libjpeg.lib ../../../../Debug/shapelib/shapelib.lib user32.lib $(NOINHERIT)"
+				OutputFile="$(OutDir)/TePDIParameters_test.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreAllDefaultLibraries="FALSE"
+				IgnoreDefaultLibraryNames="msvcrt.lib,libcmt.lib;libc.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"
+				TargetMachine="0"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="../../../../src/terralib/image_processing;../base;../../../../src/terralib/kernel;../../../../src/shapelib"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Release/terralibpdi/terralibpdi.lib ../../../../Release/terralib/terralib.lib ../../../../Release/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Release/libjpeg/libjpeg.lib ../../../../Release/shapelib/shapelib.lib"
+				OutputFile="$(OutDir)/TePDIParameters_test.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\TePDIParameters_test.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/image_processing/source/TePDIPrincipalComponents/TePDIPrincipalComponents.pro b/examples/image_processing/source/TePDIPrincipalComponents/TePDIPrincipalComponents.pro
new file mode 100755
index 0000000..261534e
--- /dev/null
+++ b/examples/image_processing/source/TePDIPrincipalComponents/TePDIPrincipalComponents.pro
@@ -0,0 +1,7 @@
+include( ../base/base.pro )
+
+SOURCES += \
+  TePDIPrincipalComponents_test.cpp
+
+QMAKE_CLEAN += \
+  ../../bin/TePDIPrincipalComponents*.tif
\ No newline at end of file
diff --git a/examples/image_processing/source/TePDIPrincipalComponents/TePDIPrincipalComponents_test.cpp b/examples/image_processing/source/TePDIPrincipalComponents/TePDIPrincipalComponents_test.cpp
new file mode 100755
index 0000000..babb557
--- /dev/null
+++ b/examples/image_processing/source/TePDIPrincipalComponents/TePDIPrincipalComponents_test.cpp
@@ -0,0 +1,172 @@
+#include <TePDIPrincipalComponents.hpp>
+#include <TePDIParameters.hpp>
+#include <TeAgnostic.h>
+#include <TePDIUtils.hpp>
+
+#include <TeRaster.h>
+
+#include <TeProgress.h>
+#include <TeStdIOProgress.h>
+
+#include <TePDIExamplesBase.hpp>
+
+void pca_test()
+{
+/********* Direct analysis *********/
+
+	TePDIPrincipalComponents::TePDIPCAType analysis_type = 
+	  TePDIPrincipalComponents::TePDIPCADirect;
+
+	TePDIParameters params_direct;
+
+	TePDITypes::TePDIRasterPtrType inRaster1( new TeRaster(
+	  std::string( TEPDIEXAMPLESRESPATH "cbers_rgb342_crop1.tif" ), 
+	  'r') );
+	TEAGN_TRUE_OR_THROW(inRaster1->init(), 
+	  "Unable to init inRaster1");
+	  
+	TePDITypes::TePDIRasterPtrType inRaster2( new TeRaster(
+	  std::string( TEPDIEXAMPLESRESPATH "cbers_rgb342_crop1.tif" ),
+	  'r') );
+	TEAGN_TRUE_OR_THROW(inRaster2->init(), 
+	  "Unable to init inRaster2");
+	
+	TePDITypes::TePDIRasterPtrType inRaster3(new TeRaster(
+	  std::string( TEPDIEXAMPLESRESPATH "cbers_rgb342_crop1.tif" ),
+	  'r') );
+	TEAGN_TRUE_OR_THROW(inRaster3->init(), "Unable to init inRaster3");
+	
+	TePDITypes::TePDIRasterVectorType input_rasters;
+	input_rasters.push_back(inRaster1);
+	input_rasters.push_back(inRaster2);
+	input_rasters.push_back(inRaster3);
+
+	std::vector<int> bands_direct;
+	bands_direct.push_back(0);
+	bands_direct.push_back(1);
+	bands_direct.push_back(2);
+	
+	TePDITypes::TePDIRasterPtrType outRaster1_direct;
+	TEAGN_TRUE_OR_THROW(TePDIUtils::TeAllocRAMRaster(
+	  outRaster1_direct, 1, 1, 1, false, TeDOUBLE, 0), 
+	  "RAM Raster 1 Alloc error");
+	  
+	TePDITypes::TePDIRasterPtrType outRaster2_direct;
+	TEAGN_TRUE_OR_THROW(TePDIUtils::TeAllocRAMRaster(
+	  outRaster2_direct, 1, 1, 1, false, TeDOUBLE, 0), 
+	  "RAM Raster 2 Alloc error");
+	  
+	TePDITypes::TePDIRasterPtrType outRaster3_direct;
+	TEAGN_TRUE_OR_THROW(TePDIUtils::TeAllocRAMRaster(
+	  outRaster3_direct, 1, 1, 1, false, TeDOUBLE, 0 ), 
+	  "RAM Raster 3 Alloc error");
+	
+	TePDITypes::TePDIRasterVectorType output_rasters_direct;
+	output_rasters_direct.push_back(outRaster1_direct);
+	output_rasters_direct.push_back(outRaster2_direct);
+	output_rasters_direct.push_back(outRaster3_direct);
+	
+	TeSharedPtr<TeMatrix> covariance_matrix(new TeMatrix);
+	
+	params_direct.SetParameter("analysis_type", analysis_type);
+	params_direct.SetParameter("input_rasters", input_rasters);
+	params_direct.SetParameter("bands", bands_direct);
+	params_direct.SetParameter("output_rasters", output_rasters_direct);
+	params_direct.SetParameter("covariance_matrix", covariance_matrix);
+	
+	TePDIPrincipalComponents pc_direct;
+	TEAGN_TRUE_OR_THROW(pc_direct.Reset(params_direct), "Invalid Parameters");
+	TEAGN_TRUE_OR_THROW(pc_direct.Apply(), "Apply error");
+	
+	TEAGN_TRUE_OR_THROW(TePDIUtils::TeRaster2Geotiff(
+	  output_rasters_direct[0], 
+	  TEPDIEXAMPLESBINPATH "TePDIPrincipalComponents_pca0.tif" ), 
+	  "GeoTIFF0 generation error");
+	TEAGN_TRUE_OR_THROW(TePDIUtils::TeRaster2Geotiff(
+	  output_rasters_direct[1], 
+	  TEPDIEXAMPLESBINPATH "TePDIPrincipalComponents_pca1.tif" ), 
+	  "GeoTIFF1 generation error");
+	TEAGN_TRUE_OR_THROW(TePDIUtils::TeRaster2Geotiff(
+	  output_rasters_direct[2], 
+	  TEPDIEXAMPLESBINPATH "TePDIPrincipalComponents_pca2.tif" ), 
+	  "GeoTIFF2 generation error");
+
+/********* Inverse analysis *********/
+	
+	analysis_type = TePDIPrincipalComponents::TePDIPCAInverse;
+	
+	TePDIParameters params_inverse;
+
+	std::vector< int > bands_inverse;
+	bands_inverse.push_back(0);
+	bands_inverse.push_back(0);
+	bands_inverse.push_back(0);
+
+	TePDITypes::TePDIRasterPtrType outRaster1_inverse;
+	TEAGN_TRUE_OR_THROW(TePDIUtils::TeAllocRAMRaster(
+	  outRaster1_inverse, 1, 1, 1, false, TeDOUBLE, 0 ), 
+	  "RAM Raster 1 Alloc error");
+	  
+	TePDITypes::TePDIRasterPtrType outRaster2_inverse;
+	TEAGN_TRUE_OR_THROW(TePDIUtils::TeAllocRAMRaster(
+	  outRaster2_inverse, 1, 1, 1, false, TeDOUBLE, 0 ), 
+	  "RAM Raster 2 Alloc error");
+	  
+	TePDITypes::TePDIRasterPtrType outRaster3_inverse;
+	TEAGN_TRUE_OR_THROW(TePDIUtils::TeAllocRAMRaster(
+	  outRaster3_inverse, 1, 1, 1, false, TeDOUBLE, 0 ), 
+	  "RAM Raster 3 Alloc error");
+	
+	TePDITypes::TePDIRasterVectorType output_rasters_inverse;
+	output_rasters_inverse.push_back(outRaster1_inverse);
+	output_rasters_inverse.push_back(outRaster2_inverse);
+	output_rasters_inverse.push_back(outRaster3_inverse);
+	
+	params_inverse.SetParameter("analysis_type", analysis_type);
+	params_inverse.SetParameter("input_rasters", 
+	  output_rasters_direct);
+	params_inverse.SetParameter("bands", bands_inverse);
+	params_inverse.SetParameter("output_rasters", 
+	  output_rasters_inverse);
+	params_inverse.SetParameter("covariance_matrix", 
+	  covariance_matrix);
+	
+	TePDIPrincipalComponents pc_inverse;
+	TEAGN_TRUE_OR_THROW(pc_inverse.Reset(params_inverse), 
+	  "Invalid Parameters");
+	TEAGN_TRUE_OR_THROW(pc_inverse.Apply(), "Apply error");
+	
+	TEAGN_TRUE_OR_THROW(TePDIUtils::TeRaster2Geotiff(
+	  output_rasters_inverse[0], 
+	  TEPDIEXAMPLESBINPATH "TePDIPrincipalComponents_band0.tif"), 
+	  "GeoTIFF0 generation error");
+	TEAGN_TRUE_OR_THROW(TePDIUtils::TeRaster2Geotiff(
+	  output_rasters_inverse[1], 
+	  TEPDIEXAMPLESBINPATH "TePDIPrincipalComponents_band1.tif"), 
+	  "GeoTIFF1 generation error");
+	TEAGN_TRUE_OR_THROW(TePDIUtils::TeRaster2Geotiff(
+	  output_rasters_inverse[2], 
+	  TEPDIEXAMPLESBINPATH "TePDIPrincipalComponents_band2.tif"), 
+	  "GeoTIFF2 generation error");
+}
+
+int main()
+{
+  TEAGN_LOGMSG( "Test started." );
+
+  TEAGN_DEBUG_MODE_CHECK;
+
+  try{
+    TeStdIOProgress pi;
+    TeProgress::setProgressInterf( dynamic_cast< TeProgressBase* >( &pi ) );
+
+    pca_test();
+  }
+  catch( const TeException& e ){
+    TEAGN_LOGERR( "Test Failed - " + e.message() );
+    return EXIT_FAILURE;
+  }  
+
+  TEAGN_LOGMSG( "Test OK." );
+  return EXIT_SUCCESS;
+}
diff --git a/examples/image_processing/source/TePDIPrincipalComponents/TePDIPrincipalComponents_test.vcproj b/examples/image_processing/source/TePDIPrincipalComponents/TePDIPrincipalComponents_test.vcproj
new file mode 100755
index 0000000..02ccc1a
--- /dev/null
+++ b/examples/image_processing/source/TePDIPrincipalComponents/TePDIPrincipalComponents_test.vcproj
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="TePDIPrincipalComponents_test"
+	ProjectGUID="{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	RootNamespace="TePDIPrincipalComponents_test"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="0">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../base;../../../../src/terralib/image_processing;../../../../src/terralib/kernel;../../../../src/tiff"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PDIAGN_ENABLE_STDOUT_LOG"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Debug/terralibpdi/terralibpdi.lib ../../../../Debug/terralib/terralib.lib ../../../../Debug/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Debug/libjpeg/libjpeg.lib ../../../../Debug/shapelib/shapelib.lib user32.lib $(NOINHERIT)"
+				OutputFile="$(OutDir)/TePDIPrincipalComponents_test.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreAllDefaultLibraries="FALSE"
+				IgnoreDefaultLibraryNames="msvcrt.lib,libcmt.lib;libc.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"
+				TargetMachine="0"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="../../../../src/terralib/image_processing;../base;../../../../src/terralib/kernel;../../../../src/shapelib"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Release/terralibpdi/terralibpdi.lib ../../../../Release/terralib/terralib.lib ../../../../Release/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Release/libjpeg/libjpeg.lib ../../../../Release/shapelib/shapelib.lib"
+				OutputFile="$(OutDir)/TePDIPrincipalComponents_test.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\TePDIPrincipalComponents_test.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/image_processing/source/TePDIRadarFilters/TePDIRadarFilters.pro b/examples/image_processing/source/TePDIRadarFilters/TePDIRadarFilters.pro
new file mode 100755
index 0000000..ba1eff3
--- /dev/null
+++ b/examples/image_processing/source/TePDIRadarFilters/TePDIRadarFilters.pro
@@ -0,0 +1,7 @@
+include( ../base/base.pro )
+
+SOURCES += \
+  TePDIRadarFilters_test.cpp
+
+QMAKE_CLEAN += \
+  ../../bin/Radar*.tif
\ No newline at end of file
diff --git a/examples/image_processing/source/TePDIRadarFilters/TePDIRadarFilters_test.cpp b/examples/image_processing/source/TePDIRadarFilters/TePDIRadarFilters_test.cpp
new file mode 100755
index 0000000..a57eb7c
--- /dev/null
+++ b/examples/image_processing/source/TePDIRadarFilters/TePDIRadarFilters_test.cpp
@@ -0,0 +1,260 @@
+#define TEAGN_ENABLE_STDOUT_LOG
+
+#include <TePDIExamplesBase.hpp>
+
+#include <TePDIRadarLeeFilter.hpp>
+#include <TePDIRadarKuanFilter.hpp>
+#include <TePDIRadarFrostFilter.hpp>
+
+#include <TePDIParameters.hpp>
+#include <TeAgnostic.h>
+#include <TePDIUtils.hpp>
+
+#include <TeInitRasterDecoders.h>
+
+#include <TeProgress.h>
+#include <TeStdIOProgress.h>
+
+void LeeFixed_test()
+{
+  TePDIParameters params;
+
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  params.SetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeDOUBLE, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  std::vector<int> channels;
+  channels.push_back( 0 );
+  params.SetParameter( "channels", channels );
+
+  params.SetParameter( "filter_type", TePDIRadarLeeFilter::TePDILeeFixedType );
+
+  params.SetParameter( "det_type", TePDIRadarLeeFilter::TePDILeeDTLinear );
+
+  params.SetParameter( "iterations", (int)1 );
+
+  params.SetParameter( "mask_width", (int)3 );
+
+  params.SetParameter( "look_number", (double)1. );
+
+  params.SetParameter( "variance_threshold", (double)0.1 );
+
+  TePDIRadarLeeFilter filter;
+
+  TEAGN_TRUE_OR_THROW( filter.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( filter.Apply(),
+    "Apply error" );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "RadarLeeFixed_test.tif" ), "GeoTIF generation error" );
+  
+}
+
+
+void LeeAdaptative_test()
+{
+  TePDIParameters params;
+
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  params.SetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeDOUBLE, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  std::vector<int> channels;
+  channels.push_back( 0 );
+  params.SetParameter( "channels", channels );
+
+  params.SetParameter( "filter_type", TePDIRadarLeeFilter::TePDILeeAdaptType );
+
+  params.SetParameter( "det_type", TePDIRadarLeeFilter::TePDILeeDTLinear );
+
+  params.SetParameter( "iterations", (int)1 );
+
+  params.SetParameter( "mask_width", (int)3 );
+
+  params.SetParameter( "look_number", (double)1. );
+
+  params.SetParameter( "variance_threshold", (double)0.1 );
+
+  TePDIRadarLeeFilter filter;
+
+  TEAGN_TRUE_OR_THROW( filter.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( filter.Apply(),
+    "Apply error" );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "RadarLeeAdaptative_test.tif" ), "GeoTIF generation error" );
+
+}
+
+void KuanFixed_test()
+{
+  TePDIParameters params;
+
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  params.SetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeDOUBLE, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  std::vector<int> channels;
+  channels.push_back( 0 );
+  params.SetParameter( "channels", channels );
+
+  params.SetParameter( "filter_type", TePDIRadarKuanFilter::TePDIKuanFixedType );
+
+  params.SetParameter( "det_type", TePDIRadarKuanFilter::TePDIKuanDTLinear );
+
+  params.SetParameter( "iterations", (int)1 );
+
+  params.SetParameter( "mask_width", (int)3 );
+
+  params.SetParameter( "look_number", (double)1. );
+
+  params.SetParameter( "variance_threshold", (double)0.1 );
+
+  TePDIRadarKuanFilter filter;
+
+  TEAGN_TRUE_OR_THROW( filter.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( filter.Apply(),
+    "Apply error" );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "RadarKuanFixed_test.tif" ), "GeoTIF generation error" );
+    
+}
+
+
+void KuanAdaptative_test()
+{
+  TePDIParameters params;
+
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  params.SetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeDOUBLE, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  std::vector<int> channels;
+  channels.push_back( 0 );
+  params.SetParameter( "channels", channels );
+
+  params.SetParameter( "filter_type", TePDIRadarKuanFilter::TePDIKuanAdaptType );
+
+  params.SetParameter( "det_type", TePDIRadarKuanFilter::TePDIKuanDTLinear );
+
+  params.SetParameter( "iterations", (int)1 );
+
+  params.SetParameter( "mask_width", (int)3 );
+
+  params.SetParameter( "look_number", (double)1. );
+
+  params.SetParameter( "variance_threshold", (double)0.1 );
+
+  TePDIRadarKuanFilter filter;
+
+  TEAGN_TRUE_OR_THROW( filter.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( filter.Apply(),
+    "Apply error" );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "RadarKuanAdaptative_test.tif" ), "GeoTIF generation error" );
+
+}
+
+
+void Frost_test()
+{
+  TePDIParameters params;
+
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  params.SetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, false, TeDOUBLE, 0 ), "RAM Raster Alloc error" );
+  params.SetParameter( "output_image", outRaster );
+
+  std::vector<int> channels;
+  channels.push_back( 0 );
+  params.SetParameter( "channels", channels );
+
+  params.SetParameter( "det_type", TePDIRadarFrostFilter::TePDIFrostDTLinear );
+
+  params.SetParameter( "iterations", (int)1 );
+
+  params.SetParameter( "look_number", (double)1. );
+
+  params.SetParameter( "variance_threshold", (double)0.1 );
+
+  params.SetParameter( "corr_coef", (double)0.89 );
+
+  TePDIRadarFrostFilter filter;
+
+  TEAGN_TRUE_OR_THROW( filter.Reset( params ),
+    "Invalid Parameters" );
+
+  TEAGN_TRUE_OR_THROW( filter.Apply(),
+    "Apply error" );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "RadarFrost_test.tif" ), "GeoTIF generation error" );
+ 
+}
+
+
+int main()
+{
+  TEAGN_LOGMSG( "Test started." );
+
+  try{
+    TeStdIOProgress pi;
+    TeProgress::setProgressInterf( dynamic_cast< TeProgressBase* >( &pi ) );  
+  
+    TeInitRasterDecoders();
+
+    LeeFixed_test();
+    LeeAdaptative_test();
+
+    KuanFixed_test();
+    KuanAdaptative_test();
+
+    Frost_test();
+  }
+  catch( const TeException& e ){
+    TEAGN_LOGERR( "Test Failed - " + e.message() );
+    return EXIT_FAILURE;
+  }  
+
+  TEAGN_LOGMSG( "Test OK." );
+  return EXIT_SUCCESS;
+}
diff --git a/examples/image_processing/source/TePDIRadarFilters/TePDIRadarFilters_test.vcproj b/examples/image_processing/source/TePDIRadarFilters/TePDIRadarFilters_test.vcproj
new file mode 100755
index 0000000..5c0d30d
--- /dev/null
+++ b/examples/image_processing/source/TePDIRadarFilters/TePDIRadarFilters_test.vcproj
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="TePDIRadarFilters_test"
+	ProjectGUID="{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	RootNamespace="TePDIRadarFilters_test"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="0">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../base;../../../../src/terralib/image_processing;../../../../src/terralib/kernel;../../../../src/tiff"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PDIAGN_ENABLE_STDOUT_LOG"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Debug/terralibpdi/terralibpdi.lib ../../../../Debug/terralib/terralib.lib ../../../../Debug/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Debug/libjpeg/libjpeg.lib ../../../../Debug/shapelib/shapelib.lib user32.lib $(NOINHERIT)"
+				OutputFile="$(OutDir)/TePDIRadarFilters_test.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreAllDefaultLibraries="FALSE"
+				IgnoreDefaultLibraryNames="msvcrt.lib,libcmt.lib;libc.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"
+				TargetMachine="0"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="../../../../src/terralib/image_processing;../base;../../../../src/terralib/kernel;../../../../src/shapelib"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Release/terralibpdi/terralibpdi.lib ../../../../Release/terralib/terralib.lib ../../../../Release/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Release/libjpeg/libjpeg.lib ../../../../Release/shapelib/shapelib.lib"
+				OutputFile="$(OutDir)/TePDIRadarFilters_test.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\TePDIRadarFilters_test.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/image_processing/source/TePDIRaster2Vector/TePDIRaster2Vector.pro b/examples/image_processing/source/TePDIRaster2Vector/TePDIRaster2Vector.pro
new file mode 100755
index 0000000..499c9e0
--- /dev/null
+++ b/examples/image_processing/source/TePDIRaster2Vector/TePDIRaster2Vector.pro
@@ -0,0 +1,11 @@
+include( ../base/base.pro )
+
+
+SOURCES += \
+  TePDIRaster2Vector_test.cpp
+
+QMAKE_CLEAN += \
+  ../../bin/Raster2Vector*.dbf \
+  ../../bin/Raster2Vector*.shp \
+  ../../bin/Raster2Vector*.shx \
+  ../../bin/Raster2Vector*.tif
diff --git a/examples/image_processing/source/TePDIRaster2Vector/TePDIRaster2Vector_test.cpp b/examples/image_processing/source/TePDIRaster2Vector/TePDIRaster2Vector_test.cpp
new file mode 100755
index 0000000..1a53120
--- /dev/null
+++ b/examples/image_processing/source/TePDIRaster2Vector/TePDIRaster2Vector_test.cpp
@@ -0,0 +1,570 @@
+#define TEAGN_ENABLE_STDOUT_LOG
+
+#include <TePDIExamplesBase.hpp>
+
+#include <TePDIParameters.hpp>
+#include <TeAgnostic.h>
+#include <TePDIUtils.hpp>
+#include <TePDIRaster2Vector.hpp>
+#include <TeInitRasterDecoders.h>
+
+#include <TeProgress.h>
+#include <TeStdIOProgress.h>
+
+#include <shapefil.h> // Needed by exportPS2SHP
+
+bool exportPS2SHP( const TePolygonSet& ps, 
+    const std::string& base_file_name  )
+{
+    // creating files names
+    std::string dbfFilename = base_file_name + ".dbf";
+    std::string shpFilename = base_file_name + ".shp";
+
+    // creating polygons attribute list ( max attribute size == 12 )
+    TeAttributeList attList;
+    
+    TeAttribute at;
+    at.rep_.type_ = TeSTRING;               //the id of the cell
+    at.rep_.numChar_ = 10;
+    at.rep_.name_ = "object_id_";
+    at.rep_.isPrimaryKey_ = true;
+    
+    attList.push_back(at);
+    
+    /* DBF output file handle creation */
+
+    DBFHandle hDBF = DBFCreate( dbfFilename.c_str() );
+    TEAGN_TRUE_OR_RETURN( ( hDBF != 0 ), "DBF file creation error" );
+    
+    /* Writing attributes */
+
+    TeAttributeList::iterator it=attList.begin();
+    while ( it != attList.end() )
+    {
+      TeAttribute at = (*it);
+      string atName = at.rep_.name_;
+
+      // *OBS****atributos podem ter no maximo 12 caracteres
+      // max attribute size == 12
+      if (at.rep_.type_ == TeSTRING )
+      {
+        TEAGN_TRUE_OR_THROW( 
+          ( DBFAddField( hDBF, atName.c_str(), FTString, at.rep_.numChar_, 0 ) 
+           != -1 ), "Error writing TeSTRING attribute" );
+      }
+      else if (at.rep_.type_ == TeINT)
+      {
+        TEAGN_TRUE_OR_THROW( 
+          ( DBFAddField( hDBF, atName.c_str(), FTInteger, 10, 0 ) != -1 ), 
+          "Error writing TeINT attribute" );
+      }
+      else if (at.rep_.type_ == TeREAL)
+      {
+        TEAGN_TRUE_OR_THROW( 
+          ( DBFAddField( hDBF, atName.c_str(), FTDouble, 10, 5 ) != -1 ), 
+          "Error writing TeREAL attribute" );
+          
+      }
+      else if (at.rep_.type_ == TeDATETIME)
+      {
+        TEAGN_TRUE_OR_THROW( 
+          ( DBFAddField( hDBF, atName.c_str(), FTDate, 8, 0 ) != -1 ), 
+          "Error writing TeDATETIME attribute" );
+      }
+                
+      ++it;
+    }
+    
+    /* SHP output file handle creation */
+
+    SHPHandle hSHP = SHPCreate( shpFilename.c_str(), SHPT_POLYGON );
+    if( hSHP == 0 ) {
+      TEAGN_LOGERR( "DBF file creation error" );
+      DBFClose( hDBF );
+      return false;
+    }
+    
+    /* Writing polygons */
+
+    int iRecord = 0;
+    int totpoints = 0;
+    double  *padfX, *padfY;
+    SHPObject       *psObject;
+    int posXY, npoints, nelem;
+    int nVertices;
+    int* panParts;
+
+    TePolygonSet::iterator itps;
+    TePolygon poly;
+
+    for (itps = ps.begin() ; itps != ps.end() ; itps++ ) {
+      poly=(*itps);
+      totpoints = 0;
+      nVertices = poly.size();
+      for (unsigned int n=0; n<poly.size();n++) {
+        totpoints += poly[n].size();
+      }
+
+      panParts = (int *) malloc(sizeof(int) * nVertices);
+      padfX = (double *) malloc(sizeof(double) * totpoints);
+      padfY = (double *) malloc(sizeof(double) * totpoints);
+      posXY = 0;
+      nelem = 0;
+      
+      for (unsigned int l=0; l<poly.size(); ++l) {
+        if (l==0) {
+          if (TeOrientation(poly[l]) == TeCOUNTERCLOCKWISE) {
+            TeReverseLine(poly[l]);
+          }
+        } else {
+          if (TeOrientation(poly[l]) == TeCLOCKWISE) {
+            TeReverseLine(poly[l]);
+          }
+        }
+        
+        npoints = poly[l].size();
+        panParts[nelem]=posXY;
+        
+        for (int m=0; m<npoints; m++ ) {
+          padfX[posXY] = poly[l][m].x_;
+          padfY[posXY] = poly[l][m].y_;
+          posXY++;
+        }
+        
+        nelem++;
+      }
+                
+      psObject = SHPCreateObject( SHPT_POLYGON, -1, nelem, panParts, NULL,
+        posXY, padfX, padfY, NULL, NULL );
+        
+      int shpRes = SHPWriteObject( hSHP, -1, psObject );
+      TEAGN_TRUE_OR_THROW( ( shpRes != -1 ), 
+        "Unable to create a shape write object" )
+        
+      SHPDestroyObject( psObject );
+      free( panParts );
+      free( padfX );
+      free( padfY );
+
+      // writing attributes - same creation order
+      for (unsigned int j=0; j<attList.size();j++) {
+        if ( attList[j].rep_.type_ == TeSTRING ) {
+          DBFWriteStringAttribute(hDBF, iRecord, j, poly.objectId().c_str() );
+        } /*else if ( attList[j].rep_.type_ == TeINT) {
+          DBFWriteIntegerAttribute(hDBF, iRecord, j,  VALOR INT );        
+        } else if ( attList[j].rep_.type_ == TeREAL) {
+          DBFWriteDoubleAttribute(hDBF, iRecord, j,  VALOR DOUBLE);
+        } else if ( attList[j].rep_.type_ == TeDATETIME) {
+          TeTime time =  VALOR DATA;
+          char dd[8];
+          sprintf(dd,"%04d%02d%02d",time.year(),time.month(),time.day());
+          DBFWriteDateAttribute(hDBF, iRecord, j, dd );
+        }*/
+      }
+                
+      iRecord++;
+    }
+        
+    DBFClose( hDBF );
+    SHPClose( hSHP );
+
+    return true;  
+}
+
+TePDITypes::TePDIRasterPtrType generateTestRaster()
+{
+  TeRasterParams RAMRaster_params;
+  RAMRaster_params.nBands( 1 );
+  RAMRaster_params.setDataType( TeUNSIGNEDLONG );
+  RAMRaster_params.setDummy( 0, -1 );
+  RAMRaster_params.setNLinesNColumns( 100, 100 );
+  
+  TePDITypes::TePDIRasterPtrType RAMRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( RAMRaster,
+    RAMRaster_params, false ), "RAM Raster Alloc error" );
+    
+  int line = 0;
+  int col = 0;
+  
+  /* Area 1 */
+    
+  for( line = 10 ; line < 20; ++line ) {
+    for( col = 10 ; col < 20 ; ++col ) {
+      TEAGN_TRUE_OR_THROW( 
+        RAMRaster->setElement( col, line, 10.0, 0 ), "Raster fill error" );
+    }
+  }
+  
+  /* Area 1 dummy hole */
+    
+  for( line = 13 ; line < 18; ++line ) {
+    for( col = 13 ; col < 18 ; ++col ) {
+      TEAGN_TRUE_OR_THROW( 
+        RAMRaster->setElement( col, line, 0.0, 0 ), "Raster fill error" );
+    }
+  }  
+  
+  /* Area 2 */
+  
+  for( line = 10 ; line < 20; ++line ) {
+    for( col = 30 ; col < 40 ; ++col ) {
+      TEAGN_TRUE_OR_THROW( 
+        RAMRaster->setElement( col, line, 20.0, 0 ), "Raster fill error" );
+    }
+  }  
+  
+  /* Area 2 hole */
+    
+  for( line = 13 ; line < 18; ++line ) {
+    for( col = 33 ; col < 38 ; ++col ) {
+      TEAGN_TRUE_OR_THROW( 
+        RAMRaster->setElement( col, line, 10.0, 0 ), "Raster fill error" );
+    }
+  }  
+  
+  /* Area 3 */
+  
+  for( line = 10 ; line < 20; ++line ) {
+    for( col = 50 ; col < 60 ; ++col ) {
+      TEAGN_TRUE_OR_THROW( 
+        RAMRaster->setElement( col, line, 30.0, 0 ), "Raster fill error" );
+    }
+  } 
+  
+  /* Area 4 */
+  
+  for( line = 0 ; line < 9; ++line ) {
+    for( col = 70 ; col < 100 ; ++col ) {
+      TEAGN_TRUE_OR_THROW( 
+        RAMRaster->setElement( col, line, 40.0, 0 ), "Raster fill error" );
+    }
+  } 
+  
+  for( line = 0 ; line < 40; ++line ) {
+    for( col = 90 ; col < 100 ; ++col ) {
+      TEAGN_TRUE_OR_THROW( 
+        RAMRaster->setElement( col, line, 40.0, 0 ), "Raster fill error" );
+    }
+  } 
+  
+  for( line = 30 ; line < 40; ++line ) {
+    for( col = 70 ; col < 100 ; ++col ) {
+      TEAGN_TRUE_OR_THROW( 
+        RAMRaster->setElement( col, line, 40.0, 0 ), "Raster fill error" );
+    }
+  } 
+  
+  for( line = 20 ; line < 30; ++line ) {
+    for( col = 70 ; col < 80 ; ++col ) {
+      TEAGN_TRUE_OR_THROW( 
+        RAMRaster->setElement( col, line, 40.0, 0 ), "Raster fill error" );
+    }
+  }   
+  
+  /* Area 5 */
+  
+  for( line = 50 ; line < 90; ++line ) {
+    for( col = 10 ; col < 90 ; ++col ) {
+      TEAGN_TRUE_OR_THROW( 
+        RAMRaster->setElement( col, line, 50.0, 0 ), "Raster fill error" );
+    }
+  }
+  
+  /* Area 6 */
+    
+  for( line = 60 ; line < 70; ++line ) {
+    for( col = 20 ; col < 30 ; ++col ) {
+      TEAGN_TRUE_OR_THROW( 
+        RAMRaster->setElement( col, line, 10.0, 0 ), "Raster fill error" );
+    }
+  }    
+  
+  /* Area 7 */
+    
+  for( line = 60 ; line < 70; ++line ) {
+    for( col = 40 ; col < 50 ; ++col ) {
+      TEAGN_TRUE_OR_THROW( 
+        RAMRaster->setElement( col, line, 20.0, 0 ), "Raster fill error" );
+    }
+  }    
+
+  /* Area 8 */
+    
+  for( line = 60 ; line < 70; ++line ) {
+    for( col = 60 ; col < 70 ; ++col ) {
+      TEAGN_TRUE_OR_THROW( 
+        RAMRaster->setElement( col, line, 30.0, 0 ), "Raster fill error" );
+    }
+  }    
+
+  /* Area 9 */
+    
+  for( line = 70 ; line < 80; ++line ) {
+    for( col = 20 ; col < 70 ; ++col ) {
+      TEAGN_TRUE_OR_THROW( 
+        RAMRaster->setElement( col, line, 0.0, 0 ), "Raster fill error" );
+    }
+  }  
+  
+  /* Area 10 */
+    
+  for( line = 95 ; line < 100; ++line ) {
+    for( col = 95 ; col < 100 ; ++col ) {
+      TEAGN_TRUE_OR_THROW( 
+        RAMRaster->setElement( col, line, 60.0, 0 ), "Raster fill error" );
+    }
+  }     
+  
+  /* Area 11 */
+    
+  for( line = 0 ; line < 5; ++line ) {
+    for( col = 0 ; col < 5 ; ++col ) {
+      TEAGN_TRUE_OR_THROW( 
+        RAMRaster->setElement( col, line, 60.0, 0 ), "Raster fill error" );
+    }
+  }  
+  
+  /* Area 12 */
+    
+  for( line = 95 ; line < 100; ++line ) {
+    for( col = 0 ; col < 5 ; ++col ) {
+      TEAGN_TRUE_OR_THROW( 
+        RAMRaster->setElement( col, line, 60.0, 0 ), "Raster fill error" );
+    }
+  }      
+  
+  /* Area 13 */
+    
+  for( line = 40 ; line < 43; ++line ) {
+    for( col = 10 ; col < 13 ; ++col ) {
+      TEAGN_TRUE_OR_THROW( 
+        RAMRaster->setElement( col, line, 60.0, 0 ), "Raster fill error" );
+    }
+  }   
+  
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 11, 39, 60.0, 0 ), "Raster fill error" );   
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 13, 41, 60.0, 0 ), "Raster fill error" );   
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 11, 43, 60.0, 0 ), "Raster fill error" );   
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 9, 41, 60.0, 0 ), "Raster fill error" );   
+    
+  /* Area 14 */
+    
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 31, 39, 60.0, 0 ), "Raster fill error" );   
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 31, 40, 60.0, 0 ), "Raster fill error" );   
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 31, 41, 60.0, 0 ), "Raster fill error" );   
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 31, 42, 60.0, 0 ), "Raster fill error" );   
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 31, 43, 60.0, 0 ), "Raster fill error" );   
+
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 29, 41, 60.0, 0 ), "Raster fill error" );   
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 30, 41, 60.0, 0 ), "Raster fill error" );   
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 31, 41, 60.0, 0 ), "Raster fill error" );   
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 32, 41, 60.0, 0 ), "Raster fill error" );   
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 33, 41, 60.0, 0 ), "Raster fill error" );   
+        
+  /* Area 15 */
+  
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 42, 39, 60.0, 0 ), "Raster fill error" );  
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 46, 39, 60.0, 0 ), "Raster fill error" );  
+    
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 43, 40, 60.0, 0 ), "Raster fill error" );
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 45, 40, 60.0, 0 ), "Raster fill error" );
+    
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 44, 41, 60.0, 0 ), "Raster fill error" );
+    
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 43, 42, 60.0, 0 ), "Raster fill error" );
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 45, 42, 60.0, 0 ), "Raster fill error" );
+    
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 42, 43, 60.0, 0 ), "Raster fill error" );
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 46, 43, 60.0, 0 ), "Raster fill error" );
+    
+  /* Area 16 */
+    
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 55, 39, 60.0, 0 ), "Raster fill error" );  
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 56, 40, 60.0, 0 ), "Raster fill error" );      
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 57, 41, 60.0, 0 ), "Raster fill error" );      
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 58, 42, 60.0, 0 ), "Raster fill error" );      
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 59, 43, 60.0, 0 ), "Raster fill error" );      
+    
+  /* Area 17 */
+    
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 10, 30, 60.0, 0 ), "Raster fill error" ); 
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 11, 29, 60.0, 0 ), "Raster fill error" ); 
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 12, 28, 60.0, 0 ), "Raster fill error" ); 
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 13, 27, 60.0, 0 ), "Raster fill error" ); 
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 14, 26, 60.0, 0 ), "Raster fill error" );     
+    
+  /* Area 18 */
+    
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 10, 2, 60.0, 0 ), "Raster fill error" ); 
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 11, 2, 60.0, 0 ), "Raster fill error" ); 
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 9, 3, 60.0, 0 ), "Raster fill error" ); 
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 10, 3, 60.0, 0 ), "Raster fill error" ); 
+
+  /* Area 19 */
+    
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 15, 2, 60.0, 0 ), "Raster fill error" ); 
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 16, 2, 60.0, 0 ), "Raster fill error" ); 
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 16, 3, 60.0, 0 ), "Raster fill error" ); 
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 17, 3, 60.0, 0 ), "Raster fill error" ); 
+    
+  /* Area 20 */
+    
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 20, 2, 60.0, 0 ), "Raster fill error" ); 
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 20, 3, 60.0, 0 ), "Raster fill error" ); 
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 21, 3, 60.0, 0 ), "Raster fill error" ); 
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 21, 4, 60.0, 0 ), "Raster fill error" );    
+    
+  /* Area 20 */
+    
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 25, 3, 60.0, 0 ), "Raster fill error" ); 
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 25, 4, 60.0, 0 ), "Raster fill error" ); 
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 26, 3, 60.0, 0 ), "Raster fill error" ); 
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 26, 2, 60.0, 0 ), "Raster fill error" );     
+    
+                      
+  /* Line 1 */
+    
+  for( line = 35 ; line < 55; ++line ) {
+    TEAGN_TRUE_OR_THROW( 
+      RAMRaster->setElement( 85, line, 200.0, 0 ), "Raster fill error" );
+  } 
+  
+  /* Line 2 */
+    
+  for( col = 25 ; col < 45; ++col ) {
+    TEAGN_TRUE_OR_THROW( 
+      RAMRaster->setElement( col, 65, 10.0, 0 ), "Raster fill error" );
+  }      
+  
+  /* Points */
+
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 55, 15, 250.0, 0 ), "Raster fill error" );  
+    
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 55, 5, 251.0, 0 ), "Raster fill error" );      
+    
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 15, 15, 251.0, 0 ), "Raster fill error" );     
+
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->setElement( 35, 15, 0, 0 ), "Raster fill error" );     
+      
+  return RAMRaster; 
+}
+
+
+void Raster2Vector_test()
+{
+  TePDITypes::TePDIRasterPtrType RAMRaster = generateTestRaster();
+  
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( RAMRaster,
+    TEPDIEXAMPLESBINPATH "Raster2Vector_test.tif" ), "GeoTIF generation error" );
+    
+  TePDITypes::TePDIPolSetMapPtrType output_polsets( 
+    new TePDITypes::TePDIPolSetMapType );
+
+  TePDIParameters params2;
+  params2.SetParameter( "rotulated_image", RAMRaster );
+  params2.SetParameter( "channel", (unsigned int)0 );
+  params2.SetParameter( "output_polsets", output_polsets );
+  params2.SetParameter( "max_pols", (unsigned long int)200 );
+  
+  TePDIRaster2Vector raster2Vector;  
+
+  TEAGN_TRUE_OR_THROW( raster2Vector.Reset( params2 ),
+    "Invalid Parameters for raster2Vector" );
+
+  TEAGN_TRUE_OR_THROW( raster2Vector.Apply(),
+    "Apply error" );
+    
+  TePDITypes::TePDIPolSetMapType::iterator it = output_polsets->begin();
+  TePDITypes::TePDIPolSetMapType::iterator it_end = output_polsets->end();
+  
+  unsigned int pols_number = 0;
+    
+  while( it != it_end ) {
+    TEAGN_TRUE_OR_THROW( exportPS2SHP( it->second, TEPDIEXAMPLESBINPATH "Raster2Vector_test_ps" +
+      Te2String( (int)it->first ) ),  "Polygonset export error" )
+      
+    pols_number += it->second.size();
+      
+    ++it;
+  }
+  
+  TEAGN_CHECK_EPS( output_polsets->size(), 9, 0.0,
+    "Invalid generated polygon set size" );
+  TEAGN_CHECK_EPS( pols_number, 41, 0.0,
+    "Invalid generated polygon set size" );
+    
+}
+
+int main()
+{
+  TEAGN_LOGMSG( "Test started." );
+
+  try{
+    TeStdIOProgress pi;
+    TeProgress::setProgressInterf( dynamic_cast< TeProgressBase* >( &pi ) );  
+  
+    TeInitRasterDecoders();
+
+    Raster2Vector_test();
+  }
+  catch( const TeException& e ){
+    TEAGN_LOGERR( "Test Failed - " + e.message() );
+    return EXIT_FAILURE;
+  }
+
+  TEAGN_LOGMSG( "Test OK." );
+  return EXIT_SUCCESS;
+}
diff --git a/examples/image_processing/source/TePDIRaster2Vector/TePDIRaster2Vector_test.vcproj b/examples/image_processing/source/TePDIRaster2Vector/TePDIRaster2Vector_test.vcproj
new file mode 100755
index 0000000..15a6d1f
--- /dev/null
+++ b/examples/image_processing/source/TePDIRaster2Vector/TePDIRaster2Vector_test.vcproj
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="TePDIRaster2Vector_test"
+	ProjectGUID="{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	RootNamespace="TePDIRaster2Vector_test"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="0">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../base;../../../../src/terralib/image_processing;../../../../src/terralib/kernel;../../../../src/shapelib;../../../../src/tiff"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PDIAGN_ENABLE_STDOUT_LOG"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Debug/terralibpdi/terralibpdi.lib ../../../../Debug/terralib/terralib.lib ../../../../Debug/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Debug/libjpeg/libjpeg.lib ../../../../Debug/shapelib/shapelib.lib user32.lib $(NOINHERIT)"
+				OutputFile="$(OutDir)/TePDIRaster2Vector_test.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreAllDefaultLibraries="FALSE"
+				IgnoreDefaultLibraryNames="msvcrt.lib,libcmt.lib;libc.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"
+				TargetMachine="0"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="../../../../src/terralib/image_processing;../base;../../../../src/terralib/kernel;../../../../src/shapelib"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Release/terralibpdi/terralibpdi.lib ../../../../Release/terralib/terralib.lib ../../../../Release/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Release/libjpeg/libjpeg.lib ../../../../Release/shapelib/shapelib.lib"
+				OutputFile="$(OutDir)/TePDIRaster2Vector_test.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\TePDIRaster2Vector_test.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/image_processing/source/TePDIRegister/TePDIRegister.pro b/examples/image_processing/source/TePDIRegister/TePDIRegister.pro
new file mode 100755
index 0000000..d244568
--- /dev/null
+++ b/examples/image_processing/source/TePDIRegister/TePDIRegister.pro
@@ -0,0 +1,7 @@
+include( ../base/base.pro )
+
+SOURCES += \
+  TePDIRegister_test.cpp
+
+QMAKE_CLEAN += \
+  ../../bin/Register*.tif
\ No newline at end of file
diff --git a/examples/image_processing/source/TePDIRegister/TePDIRegister_test.cpp b/examples/image_processing/source/TePDIRegister/TePDIRegister_test.cpp
new file mode 100755
index 0000000..ca473e5
--- /dev/null
+++ b/examples/image_processing/source/TePDIRegister/TePDIRegister_test.cpp
@@ -0,0 +1,138 @@
+#define TEAGN_ENABLE_STDOUT_LOG
+
+#include <TePDIExamplesBase.hpp>
+
+#include <TePDIRegister.hpp>
+
+#include <TePDIParameters.hpp>
+#include <TeAgnostic.h>
+#include <TePDIUtils.hpp>
+
+#include <TeInitRasterDecoders.h>
+#include <TeProgress.h>
+#include <TeStdIOProgress.h>
+#include <TePrecision.h>
+
+
+void Register_test1()
+{
+  TePDIParameters params;
+
+  TePDITypes::TePDIRasterPtrType reference_raster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop_A.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( reference_raster->init(), 
+    "Unable to init reference_raster" );
+    
+  TePDITypes::TePDIRasterPtrType adjust_disk_raster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop_B_contraste.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( adjust_disk_raster->init(), 
+    "Unable to init adjust_disk_raster" );     
+    
+  TePDITypes::TePDIRasterPtrType adjust_raster( new TeRaster() );
+  {
+    TeRasterParams adjust_raster_params;
+    
+    adjust_raster_params.setDataType( TeUNSIGNEDCHAR, -1 );
+    adjust_raster_params.nBands( 1 );
+    adjust_raster_params.setNLinesNColumns( 
+      adjust_disk_raster->params().nlines_,
+      adjust_disk_raster->params().ncols_ );
+    
+    TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( adjust_raster,
+      adjust_raster_params, false ), "adjust_raster Alloc error" );   
+    TEAGN_TRUE_OR_THROW( TePDIUtils::TeCopyRasterBands( adjust_disk_raster,
+      adjust_raster, false, false ), "Pixel copy error" );
+  }
+    
+  TePDITypes::TePDIRasterPtrType output_raster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( output_raster,
+    1, 1, 1, false, TeUNSIGNEDCHAR, 0 ), "output_raster Alloc error" );   
+    
+  TePDITypes::TeProjParamsPtrType proj_params( new TeProjectionParams );
+  *proj_params = reference_raster->projection()->params();
+  params.SetParameter( "proj_params" , proj_params );  
+
+  params.SetParameter( "res_x" , reference_raster->params().resx_ );
+  params.SetParameter( "res_y" , reference_raster->params().resy_ );
+      
+  params.SetParameter( "adjust_raster" , adjust_raster );
+  params.SetParameter( "output_raster" , output_raster );
+  params.SetParameter( "gt_name" , std::string( "affine" ) );
+  params.SetParameter( "dummy_value" , (double)0.0 );
+  params.SetParameter( "interpolator" , TePDIInterpolator::NNMethod );
+  
+  std::vector< int > adjust_channels;
+  adjust_channels.push_back( 0 );
+  params.SetParameter( "adjust_channels" , adjust_channels );
+  
+  TePDITypes::TeCoordPairVectPtrType tie_points( new TeCoordPairVect );
+  
+  tie_points->push_back( 
+    TeCoordPair( TeCoord2D( 278, 269 ),
+    reference_raster->index2Coord( TeCoord2D( 492, 502 ) ) ) );
+  tie_points->push_back( 
+    TeCoordPair( TeCoord2D( 282, 88 ),
+    reference_raster->index2Coord( TeCoord2D( 495, 320 ) ) ) );  
+  tie_points->push_back( 
+    TeCoordPair( TeCoord2D( 66, 12 ),
+    reference_raster->index2Coord( TeCoord2D( 279, 245 ) ) ) );  
+    
+    
+  params.SetParameter( "tie_points" , tie_points );
+  
+  TePDIRegister algo; 
+  TEAGN_TRUE_OR_THROW( algo.Reset(params), "Apply error" );
+  TEAGN_TRUE_OR_THROW( algo.Apply(), "Apply error" );
+  
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( output_raster,
+    TEPDIEXAMPLESBINPATH "Register_test1.tif" ), "GeoTIF generation error" );  
+  
+  TEAGN_CHECK_EPS( output_raster->params().nlines_, 
+    adjust_disk_raster->params().nlines_, 7.0, "Invalid lines number" );
+  TEAGN_CHECK_EPS( output_raster->params().ncols_, 
+    adjust_disk_raster->params().ncols_, 2.0, "Invalid cols number" );
+  TEAGN_CHECK_EPS( output_raster->params().nBands(), 
+    adjust_disk_raster->params().nBands(), 0.0001, "Invalid bands number" );    
+  TEAGN_CHECK_EPS( output_raster->params().resx_, 
+    adjust_disk_raster->params().resx_, 0.0001, "Invalid x res" );
+  TEAGN_CHECK_EPS( output_raster->params().resy_, 
+    adjust_disk_raster->params().resy_, 0.0001, "Invalid y res" );
+  TEAGN_CHECK_EPS( output_raster->params().box().x1(), 
+    adjust_disk_raster->params().box().x1(), 29.0, "Invalid box x1" );    
+  TEAGN_CHECK_EPS( output_raster->params().box().x2(), 
+    adjust_disk_raster->params().box().x2(), 22.0, "Invalid box x2" );    
+  TEAGN_CHECK_EPS( output_raster->params().box().y1(), 
+    adjust_disk_raster->params().box().y1(), 100.0, "Invalid box y1" );    
+  TEAGN_CHECK_EPS( output_raster->params().box().y2(), 
+    adjust_disk_raster->params().box().y2(), 51.0, "Invalid box y2" );    
+
+  reference_raster.reset();
+  adjust_disk_raster.reset();
+  adjust_raster.reset();
+  output_raster.reset();
+  tie_points.reset();
+}
+
+int main()
+{
+  TEAGN_LOGMSG( "Test started." );
+
+  try{
+    TeInitRasterDecoders();
+    
+    TeStdIOProgress pi;
+    TeProgress::setProgressInterf( dynamic_cast< TeProgressBase* >( &pi ) );     
+    
+    TePrecision::instance().setPrecision( 0.000000000001 );
+
+    Register_test1();
+  }
+  catch( const TeException& e ){
+    TEAGN_LOGERR( "Test Failed - " + e.message() );
+    return EXIT_FAILURE;
+  }
+
+  TEAGN_LOGMSG( "Test OK." );
+  return EXIT_SUCCESS;
+}
+
diff --git a/examples/image_processing/source/TePDIRegister/TePDIRegister_test.vcproj b/examples/image_processing/source/TePDIRegister/TePDIRegister_test.vcproj
new file mode 100755
index 0000000..eaa4c42
--- /dev/null
+++ b/examples/image_processing/source/TePDIRegister/TePDIRegister_test.vcproj
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="TePDIRegister_test"
+	ProjectGUID="{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	RootNamespace="TePDIRegister_test"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="0">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../base;../../../../src/terralib/image_processing;../../../../src/terralib/kernel;../../../../src/tiff"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PDIAGN_ENABLE_STDOUT_LOG"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Debug/terralibpdi/terralibpdi.lib ../../../../Debug/terralib/terralib.lib ../../../../Debug/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Debug/libjpeg/libjpeg.lib ../../../../Debug/shapelib/shapelib.lib user32.lib $(NOINHERIT)"
+				OutputFile="$(OutDir)/TePDIRegister_test.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreAllDefaultLibraries="FALSE"
+				IgnoreDefaultLibraryNames="msvcrt.lib,libcmt.lib;libc.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"
+				TargetMachine="0"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="../../../../src/terralib/image_processing;../base;../../../../src/terralib/kernel;../../../../src/shapelib"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Release/terralibpdi/terralibpdi.lib ../../../../Release/terralib/terralib.lib ../../../../Release/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Release/libjpeg/libjpeg.lib ../../../../Release/shapelib/shapelib.lib"
+				OutputFile="$(OutDir)/TePDIRegister_test.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\TePDIRegister_test.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/image_processing/source/TePDIRgbPalette/TePDIRgbPalette.pro b/examples/image_processing/source/TePDIRgbPalette/TePDIRgbPalette.pro
new file mode 100755
index 0000000..a21913f
--- /dev/null
+++ b/examples/image_processing/source/TePDIRgbPalette/TePDIRgbPalette.pro
@@ -0,0 +1,4 @@
+include( ../base/base.pro )
+
+SOURCES += TePDIRgbPalette_test.cpp
+
diff --git a/examples/image_processing/source/TePDIRgbPalette/TePDIRgbPalette_test.cpp b/examples/image_processing/source/TePDIRgbPalette/TePDIRgbPalette_test.cpp
new file mode 100755
index 0000000..d50a5ae
--- /dev/null
+++ b/examples/image_processing/source/TePDIRgbPalette/TePDIRgbPalette_test.cpp
@@ -0,0 +1,34 @@
+#define TEAGN_ENABLE_STDOUT_LOG
+
+#include <TePDIUtils.hpp>
+
+#include <TeInitRasterDecoders.h>
+
+#include <TeAgnostic.h>
+#include <TePDIRgbPalette.hpp>
+
+int main()
+{
+  TEAGN_LOGMSG( "Test started." );
+
+  try{
+    TePDIRgbPalette pal;
+
+    pal[ 1.0 ] = TePDIRgbPaletteNode( 1, 1, 1 );
+
+    TePDIRgbPalette::iterator it = pal.begin();
+
+    TEAGN_TRUE_OR_THROW( ( it->first == 1. ), "Invalid value" );
+    TEAGN_TRUE_OR_THROW( ( it->second.red_ == 1 ), "Invalid value" );
+    TEAGN_TRUE_OR_THROW( ( it->second.green_ == 1 ), "Invalid value" );
+    TEAGN_TRUE_OR_THROW( ( it->second.blue_ == 1 ), "Invalid value" );
+
+  }
+  catch( const TeException& e ){
+    TEAGN_LOGERR( "Test Failed - " + e.message() );
+    return EXIT_FAILURE;
+  }
+
+  TEAGN_LOGMSG( "Test OK." );
+  return EXIT_SUCCESS;
+}
diff --git a/examples/image_processing/source/TePDIRgbPalette/TePDIRgbPalette_test.vcproj b/examples/image_processing/source/TePDIRgbPalette/TePDIRgbPalette_test.vcproj
new file mode 100755
index 0000000..10d07aa
--- /dev/null
+++ b/examples/image_processing/source/TePDIRgbPalette/TePDIRgbPalette_test.vcproj
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="TePDIRgbPalette_test"
+	ProjectGUID="{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	RootNamespace="TePDIRgbPalette_test"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="0">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../base;../../../../src/terralib/image_processing;../../../../src/terralib/kernel;../../../../src/tiff"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PDIAGN_ENABLE_STDOUT_LOG"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Debug/terralibpdi/terralibpdi.lib ../../../../Debug/terralib/terralib.lib ../../../../Debug/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Debug/libjpeg/libjpeg.lib ../../../../Debug/shapelib/shapelib.lib user32.lib $(NOINHERIT)"
+				OutputFile="$(OutDir)/TePDIRgbPalette_test.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreAllDefaultLibraries="FALSE"
+				IgnoreDefaultLibraryNames="msvcrt.lib,libcmt.lib;libc.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"
+				TargetMachine="0"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="../../../../src/terralib/image_processing;../base;../../../../src/terralib/kernel;../../../../src/shapelib"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Release/terralibpdi/terralibpdi.lib ../../../../Release/terralib/terralib.lib ../../../../Release/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Release/libjpeg/libjpeg.lib ../../../../Release/shapelib/shapelib.lib"
+				OutputFile="$(OutDir)/TePDIRgbPalette_test.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\TePDIRgbPalette_test.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/image_processing/source/TePDISegmentation/TePDISegmentation.pro b/examples/image_processing/source/TePDISegmentation/TePDISegmentation.pro
new file mode 100755
index 0000000..ffbd4bd
--- /dev/null
+++ b/examples/image_processing/source/TePDISegmentation/TePDISegmentation.pro
@@ -0,0 +1,8 @@
+include( ../base/base.pro )
+
+SOURCES += \
+  TePDISegmentation_test.cpp
+
+QMAKE_CLEAN += \
+  ../../bin/Segmentation*
+  
\ No newline at end of file
diff --git a/examples/image_processing/source/TePDISegmentation/TePDISegmentation_test.cpp b/examples/image_processing/source/TePDISegmentation/TePDISegmentation_test.cpp
new file mode 100755
index 0000000..98c3ec3
--- /dev/null
+++ b/examples/image_processing/source/TePDISegmentation/TePDISegmentation_test.cpp
@@ -0,0 +1,328 @@
+#define TEAGN_ENABLE_STDOUT_LOG
+
+#include <TePDIExamplesBase.hpp>
+
+#include <TeAgnostic.h>
+#include <TePDIUtils.hpp>
+#include <TePDIRegGrowSeg.hpp>
+#include <TePDIBaatz.hpp>
+#include <TeInitRasterDecoders.h>
+#include <TeProgress.h>
+#include <TeStdIOProgress.h>
+
+#include <shapefil.h> // Needed by exportPS2SHP
+
+bool exportPS2SHP( const TePolygonSet& ps, 
+    const std::string& base_file_name  )
+{
+    // creating files names
+    std::string dbfFilename = base_file_name + ".dbf";
+    std::string shpFilename = base_file_name + ".shp";
+
+    // creating polygons attribute list ( max attribute size == 12 )
+    TeAttributeList attList;
+    
+    TeAttribute at;
+    at.rep_.type_ = TeSTRING;               //the id of the cell
+    at.rep_.numChar_ = 10;
+    at.rep_.name_ = "object_id_";
+    at.rep_.isPrimaryKey_ = true;
+    
+    attList.push_back(at);
+    
+    /* DBF output file handle creation */
+
+    DBFHandle hDBF = DBFCreate( dbfFilename.c_str() );
+    TEAGN_TRUE_OR_RETURN( ( hDBF != 0 ), "DBF file creation error" );
+    
+    /* Writing attributes */
+
+    TeAttributeList::iterator it=attList.begin();
+    while ( it != attList.end() )
+    {
+      TeAttribute at = (*it);
+      string atName = at.rep_.name_;
+
+      // *OBS****atributos podem ter no maximo 12 caracteres
+      // max attribute size == 12
+      if (at.rep_.type_ == TeSTRING )
+      {
+        TEAGN_TRUE_OR_THROW( 
+          ( DBFAddField( hDBF, atName.c_str(), FTString, at.rep_.numChar_, 0 ) 
+           != -1 ), "Error writing TeSTRING attribute" );
+      }
+      else if (at.rep_.type_ == TeINT)
+      {
+        TEAGN_TRUE_OR_THROW( 
+          ( DBFAddField( hDBF, atName.c_str(), FTInteger, 10, 0 ) != -1 ), 
+          "Error writing TeINT attribute" );
+      }
+      else if (at.rep_.type_ == TeREAL)
+      {
+        TEAGN_TRUE_OR_THROW( 
+          ( DBFAddField( hDBF, atName.c_str(), FTDouble, 10, 5 ) != -1 ), 
+          "Error writing TeREAL attribute" );
+          
+      }
+      else if (at.rep_.type_ == TeDATETIME)
+      {
+        TEAGN_TRUE_OR_THROW( 
+          ( DBFAddField( hDBF, atName.c_str(), FTDate, 8, 0 ) != -1 ), 
+          "Error writing TeDATETIME attribute" );
+      }
+                
+      ++it;
+    }
+    
+    /* SHP output file handle creation */
+
+    SHPHandle hSHP = SHPCreate( shpFilename.c_str(), SHPT_POLYGON );
+    if( hSHP == 0 ) {
+      TEAGN_LOGERR( "DBF file creation error" );
+      DBFClose( hDBF );
+      return false;
+    }
+    
+    /* Writing polygons */
+
+    int iRecord = 0;
+    int totpoints = 0;
+    double  *padfX, *padfY;
+    SHPObject       *psObject;
+    int posXY, npoints, nelem;
+    int nVertices;
+    int* panParts;
+
+    TePolygonSet::iterator itps;
+    TePolygon poly;
+
+    for (itps = ps.begin() ; itps != ps.end() ; itps++ ) {
+      poly=(*itps);
+      totpoints = 0;
+      nVertices = poly.size();
+      for (unsigned int n=0; n<poly.size();n++) {
+        totpoints += poly[n].size();
+      }
+
+      panParts = (int *) malloc(sizeof(int) * nVertices);
+      padfX = (double *) malloc(sizeof(double) * totpoints);
+      padfY = (double *) malloc(sizeof(double) * totpoints);
+      posXY = 0;
+      nelem = 0;
+      
+      for (unsigned int l=0; l<poly.size(); ++l) {
+        if (l==0) {
+          if (TeOrientation(poly[l]) == TeCOUNTERCLOCKWISE) {
+            TeReverseLine(poly[l]);
+          }
+        } else {
+          if (TeOrientation(poly[l]) == TeCLOCKWISE) {
+            TeReverseLine(poly[l]);
+          }
+        }
+        
+        npoints = poly[l].size();
+        panParts[nelem]=posXY;
+        
+        for (int m=0; m<npoints; m++ ) {
+          padfX[posXY] = poly[l][m].x_;
+          padfY[posXY] = poly[l][m].y_;
+          posXY++;
+        }
+        
+        nelem++;
+      }
+                
+      psObject = SHPCreateObject( SHPT_POLYGON, -1, nelem, panParts, NULL,
+        posXY, padfX, padfY, NULL, NULL );
+        
+      int shpRes = SHPWriteObject( hSHP, -1, psObject );
+      TEAGN_TRUE_OR_THROW( ( shpRes != -1 ), 
+        "Unable to create a shape write object" )
+        
+      SHPDestroyObject( psObject );
+      free( panParts );
+      free( padfX );
+      free( padfY );
+
+      // writing attributes - same creation order
+      for (unsigned int j=0; j<attList.size();j++) {
+        if ( attList[j].rep_.type_ == TeSTRING ) {
+          DBFWriteStringAttribute(hDBF, iRecord, j, poly.objectId().c_str() );
+        } /*else if ( attList[j].rep_.type_ == TeINT) {
+          DBFWriteIntegerAttribute(hDBF, iRecord, j,  VALOR INT );        
+        } else if ( attList[j].rep_.type_ == TeREAL) {
+          DBFWriteDoubleAttribute(hDBF, iRecord, j,  VALOR DOUBLE);
+        } else if ( attList[j].rep_.type_ == TeDATETIME) {
+          TeTime time =  VALOR DATA;
+          char dd[8];
+          sprintf(dd,"%04d%02d%02d",time.year(),time.month(),time.day());
+          DBFWriteDateAttribute(hDBF, iRecord, j, dd );
+        }*/
+      }
+                
+      iRecord++;
+    }
+        
+    DBFClose( hDBF );
+    SHPClose( hSHP );
+
+    return true;  
+}
+
+
+bool checkNumberCells(TePDITypes::TePDIRasterPtrType outRaster, long nbCell)
+{
+        double val;
+        long max=0;
+        for (int i=0 ; i<outRaster->params().nlines_ ; i++)
+                for (int j=0 ; j<outRaster->params().ncols_ ; j++){
+                        outRaster->getElement(j,i,val,0);
+                        if (val>max)
+                                max=(long)val;
+                }
+        if (max!=nbCell)
+                return false;
+
+        return true;
+}
+
+
+void RegionGrowingStrategy_test()
+{
+  TePDIParameters params;
+  
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  params.SetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+    1, 1, 1, true, TeUNSIGNEDLONG, 0 ), "RAM Raster Alloc error" );    
+  params.SetParameter( "output_image", outRaster );
+
+  TePDITypes::TePDIRasterPtrType dummy_ptr;
+  params.SetParameter( "exclusion_image", dummy_ptr );
+  params.SetParameter( "euc_treshold", (double)20 );
+  params.SetParameter( "area_min", (int)15 );
+  
+  TePDITypes::TePDIPolSetMapPtrType output_polsets( 
+    new TePDITypes::TePDIPolSetMapType );
+  params.SetParameter( "output_polsets", output_polsets );
+  
+  TePDIRegGrowSeg segmenter;
+  
+  TEAGN_TRUE_OR_THROW( segmenter.Reset(params), "Reset failed" );
+  
+  TEAGN_TRUE_OR_THROW( segmenter.Apply(), "Apply error" );  
+  
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "Segmentation_RegionGrowing_test.tif", TeUNSIGNEDCHAR ), 
+    "GeoTIF generation error" );   
+  
+  TePDITypes::TePDIPolSetMapType::iterator it = output_polsets->begin();
+  TePDITypes::TePDIPolSetMapType::iterator it_end = output_polsets->end();  
+  
+  unsigned int pols_number = 0;
+    
+  while( it != it_end ) {
+    TEAGN_TRUE_OR_THROW( exportPS2SHP( it->second, 
+      TEPDIEXAMPLESBINPATH "Segmentation_RegionGrowingPols_ps" +
+      Te2String( (int)it->first ) ),  "Polygonset export error" )
+      
+    pols_number += it->second.size();
+      
+    ++it;
+  }
+  
+  TEAGN_CHECK_EPS( output_polsets->size(), 23, 0.0,
+    "Invalid generated polygon set size" );
+  TEAGN_CHECK_EPS( pols_number, 23, 0.0,
+    "Invalid generated polygon set size" );    
+
+  //with an euclidian treshold of 20 and an area min of 15
+  //you are suppose to find 23 cells
+  //(you can use the spring software to check that number with
+  // others images and/or paramaters)
+  TEAGN_TRUE_OR_THROW( checkNumberCells(outRaster, 23),
+    "Check number of cell Error" );
+}
+
+void Baatz_test()
+{
+  TePDIParameters params;
+
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_rgb342_crop1.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  params.SetParameter( "input_image", inRaster );
+
+  std::vector<unsigned> input_bands;
+  input_bands.push_back( 0 );
+  input_bands.push_back( 1 );
+  input_bands.push_back( 2 );
+  params.SetParameter( "input_bands", input_bands );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster,
+  1, 1, 1, true, TeUNSIGNEDLONG, 0 ), "RAM Raster Alloc error" );    
+  params.SetParameter( "output_image", outRaster );
+  params.SetParameter( "scale", (float) 30 );
+  params.SetParameter( "compactness", (float) 0.4 );
+  params.SetParameter( "color", (float) 0.5 );
+
+  vector<float> input_weights;
+  input_weights.push_back( (float) 0.7 );
+  input_weights.push_back( (float) 0.2 );
+  input_weights.push_back( (float) 0.1 );
+  params.SetParameter( "input_weights", input_weights );
+
+  TePDITypes::TePDIPolSetMapPtrType output_polsets( 
+  new TePDITypes::TePDIPolSetMapType );
+  params.SetParameter( "output_polsets", output_polsets );
+
+  TePDIBaatz segmenter;
+
+  TEAGN_TRUE_OR_THROW( segmenter.Reset(params), "Reset failed" );
+
+  TEAGN_TRUE_OR_THROW( segmenter.Apply(), "Apply error" );  
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "Segmentation_Baatz_test.tif", TeUNSIGNEDCHAR ), 
+    "GeoTIF generation error" );   
+
+  TePDITypes::TePDIPolSetMapType::iterator it = output_polsets->begin();
+  TePDITypes::TePDIPolSetMapType::iterator it_end = output_polsets->end();  
+  TePolygonSet pols;
+  while( it != it_end ) 
+  {
+    pols.copyElements(it->second);
+    ++it;
+  }
+  exportPS2SHP( pols, TEPDIEXAMPLESBINPATH "Segmentation_BaatzPols_ps");
+}
+
+
+int main()
+{
+  TEAGN_LOGMSG( "Test started." );
+
+  try{
+    TeStdIOProgress pi;
+    TeProgress::setProgressInterf( dynamic_cast< TeProgressBase* >( &pi ) );     
+  
+    TeInitRasterDecoders();
+    
+    Baatz_test();
+    RegionGrowingStrategy_test();
+  }
+  catch( const TeException& e ){
+    TEAGN_LOGERR( "Test Failed - " + e.message() );
+    return EXIT_FAILURE;
+  }
+
+  TEAGN_LOGMSG( "Test OK." );
+  return EXIT_SUCCESS;
+}
+
diff --git a/examples/image_processing/source/TePDISegmentation/TePDISegmentation_test.vcproj b/examples/image_processing/source/TePDISegmentation/TePDISegmentation_test.vcproj
new file mode 100755
index 0000000..1d2bed4
--- /dev/null
+++ b/examples/image_processing/source/TePDISegmentation/TePDISegmentation_test.vcproj
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="TePDISegmentation_test"
+	ProjectGUID="{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	RootNamespace="TePDISegmentation_test"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="0">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../base;../../../../src/terralib/image_processing;../../../../src/terralib/kernel;../../../../src/shapelib;../../../../src/tiff"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PDIAGN_ENABLE_STDOUT_LOG"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Debug/terralibpdi/terralibpdi.lib ../../../../Debug/terralib/terralib.lib ../../../../Debug/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Debug/libjpeg/libjpeg.lib ../../../../Debug/shapelib/shapelib.lib user32.lib $(NOINHERIT)"
+				OutputFile="$(OutDir)/TePDISegmentation_test.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreAllDefaultLibraries="FALSE"
+				IgnoreDefaultLibraryNames="msvcrt.lib,libcmt.lib;libc.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"
+				TargetMachine="0"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="../../../../src/terralib/image_processing;../base;../../../../src/terralib/kernel;../../../../src/shapelib"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Release/terralibpdi/terralibpdi.lib ../../../../Release/terralib/terralib.lib ../../../../Release/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Release/libjpeg/libjpeg.lib ../../../../Release/shapelib/shapelib.lib"
+				OutputFile="$(OutDir)/TePDISegmentation_test.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\TePDISegmentation_test.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/image_processing/source/TePDISensorSimulator/TePDISensorSimulator.pro b/examples/image_processing/source/TePDISensorSimulator/TePDISensorSimulator.pro
new file mode 100755
index 0000000..d872ff3
--- /dev/null
+++ b/examples/image_processing/source/TePDISensorSimulator/TePDISensorSimulator.pro
@@ -0,0 +1,7 @@
+include( ../base/base.pro )
+
+SOURCES += \
+  TePDISensorSimulator_test.cpp
+
+QMAKE_CLEAN += \
+  ../../bin/TePDISensorSimulator*.tif
\ No newline at end of file
diff --git a/examples/image_processing/source/TePDISensorSimulator/TePDISensorSimulator_test.cpp b/examples/image_processing/source/TePDISensorSimulator/TePDISensorSimulator_test.cpp
new file mode 100755
index 0000000..692aadd
--- /dev/null
+++ b/examples/image_processing/source/TePDISensorSimulator/TePDISensorSimulator_test.cpp
@@ -0,0 +1,67 @@
+#define TEAGN_ENABLE_STDOUT_LOG
+
+#include <TePDIExamplesBase.hpp>
+#include <TePDIUtils.hpp>
+#include <TePDISensorSimulator.hpp>
+#include <TeProgress.h>
+#include <TeStdIOProgress.h>
+#include <TeAgnostic.h>
+
+void TePDISensorSimulator_test()
+{
+  TePDIParameters params;
+
+  TePDITypes::TePDIRasterPtrType input_raster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_rgb342_crop1.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( input_raster->init(), 
+    "Unable to init input_raster" );
+  params.SetParameter( "input_raster" , input_raster );  
+    
+  std::vector<int> channels;
+  channels.push_back( 0 );
+  channels.push_back( 1 );
+  channels.push_back( 2 );
+  params.SetParameter( "channels" , channels );
+  
+  TePDITypes::TePDIRasterPtrType output_raster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( output_raster,
+    1, 1, 1, false, TeUNSIGNEDCHAR, 0 ), "output_raster Alloc error" );    
+  params.SetParameter( "output_raster" , output_raster ); 
+  
+  params.SetParameter( "ifov_in" , (double)20.0 );
+  params.SetParameter( "eifov_in_across" , (double)35.0 );
+  params.SetParameter( "eifov_in_long" , (double)64.0 );
+
+  params.SetParameter( "ifov_out" , (double)73.0 );
+  params.SetParameter( "eifov_out_across" , (double)108.0 );
+  params.SetParameter( "eifov_out_long" , (double)111.0 );
+    
+
+  TePDISensorSimulator algo;
+  
+  TEAGN_TRUE_OR_THROW( algo.Reset(params), "Reset failed" );
+  TEAGN_TRUE_OR_THROW( algo.Apply(), "Apply error" );
+  
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( output_raster,
+    TEPDIEXAMPLESBINPATH "TePDISensorSimulator_test.tif" ), "GeoTIF generation error" );  
+}
+
+int main()
+{
+  TEAGN_LOGMSG( "Test started." );
+
+  try{
+    TeStdIOProgress pi;
+    TeProgress::setProgressInterf( dynamic_cast< TeProgressBase* >( &pi ) );     
+    
+    TePDISensorSimulator_test();
+  }
+  catch( const TeException& e ){
+    TEAGN_LOGERR( "Test Failed - " + e.message() );
+    return EXIT_FAILURE;
+  }
+
+  TEAGN_LOGMSG( "Test OK." );
+  return EXIT_SUCCESS;
+}
+
diff --git a/examples/image_processing/source/TePDISensorSimulator/TePDISensorSimulator_test.vcproj b/examples/image_processing/source/TePDISensorSimulator/TePDISensorSimulator_test.vcproj
new file mode 100755
index 0000000..398f537
--- /dev/null
+++ b/examples/image_processing/source/TePDISensorSimulator/TePDISensorSimulator_test.vcproj
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="TePDISensorSimulator_test"
+	ProjectGUID="{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	RootNamespace="TePDISensorSimulator_test"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="0">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../base;../../../../src/terralib/image_processing;../../../../src/terralib/kernel;../../../../src/tiff"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PDIAGN_ENABLE_STDOUT_LOG"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Debug/terralibpdi/terralibpdi.lib ../../../../Debug/terralib/terralib.lib ../../../../Debug/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Debug/libjpeg/libjpeg.lib ../../../../Debug/shapelib/shapelib.lib user32.lib $(NOINHERIT)"
+				OutputFile="$(OutDir)/TePDISensorSimulator_test.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreAllDefaultLibraries="FALSE"
+				IgnoreDefaultLibraryNames="msvcrt.lib,libcmt.lib;libc.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"
+				TargetMachine="0"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="../../../../src/terralib/image_processing;../base;../../../../src/terralib/kernel;../../../../src/shapelib"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Release/terralibpdi/terralibpdi.lib ../../../../Release/terralib/terralib.lib ../../../../Release/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Release/libjpeg/libjpeg.lib ../../../../Release/shapelib/shapelib.lib"
+				OutputFile="$(OutDir)/TePDISensorSimulator_test.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\TePDISensorSimulator_test.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/image_processing/source/TePDIStatistic/TePDIStatistic.pro b/examples/image_processing/source/TePDIStatistic/TePDIStatistic.pro
new file mode 100755
index 0000000..c325843
--- /dev/null
+++ b/examples/image_processing/source/TePDIStatistic/TePDIStatistic.pro
@@ -0,0 +1,5 @@
+include( ../base/base.pro )
+
+SOURCES += \
+  TePDIStatistic_test.cpp
+
diff --git a/examples/image_processing/source/TePDIStatistic/TePDIStatistic_test.cpp b/examples/image_processing/source/TePDIStatistic/TePDIStatistic_test.cpp
new file mode 100755
index 0000000..d151a2c
--- /dev/null
+++ b/examples/image_processing/source/TePDIStatistic/TePDIStatistic_test.cpp
@@ -0,0 +1,360 @@
+#define TEAGN_ENABLE_STDOUT_LOG
+
+#include <TePDIExamplesBase.hpp>
+
+#include <TePDIStatistic.hpp>
+#include <TePDIParameters.hpp>
+#include <TeAgnostic.h>
+
+#include <TeInitRasterDecoders.h>
+#include <TeRaster.h>
+#include <TeProgress.h>
+#include <TeStdIOProgress.h>
+#include <TeGeometry.h>
+#include <TeBox.h>
+
+void numeric_test_with_polygonset()
+{
+  TePDITypes::TePDIRasterPtrType inRaster1( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+
+  TEAGN_TRUE_OR_THROW( inRaster1->init(), "Unable to init inRaster1" );
+
+  TePDITypes::TePDIRasterPtrType inRaster2( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop_contraste.tif" ), 'r' ) );
+
+  TEAGN_TRUE_OR_THROW( inRaster2->init(), "Unable to init inRaster2" );
+
+  TePDIParameters pars;
+  
+  TePDITypes::TePDIRasterVectorType rasters;
+  rasters.push_back( inRaster1 );
+  rasters.push_back( inRaster2 );
+  
+  pars.SetParameter( "rasters", rasters );
+  
+  std::vector< int > bands;
+  bands.push_back( 0 );
+  bands.push_back( 0 );
+  
+  pars.SetParameter( "bands", bands );
+  
+  TeBox box = inRaster1->params().boundingBox();
+  TePolygon pol = polygonFromBox( box );
+  TePDITypes::TePDIPolygonSetPtrType polset( new TePolygonSet );
+  polset->add( pol );
+  pars.SetParameter( "polygonset", polset );
+
+  TePDIStatistic stat;
+
+  TEAGN_TRUE_OR_THROW( stat.Reset( pars ), "Reset error" );
+  
+  // Checking generated histograms
+  
+  TePDIHistogram hist1a = stat.getHistogram( 0 );
+  TEAGN_CHECK_EPS( hist1a.size(), 209, 0, "Invalid histogram size" );
+  
+  TePDIHistogram hist2a = stat.getHistogram( 1 );
+  TEAGN_CHECK_EPS( hist2a.size(), 256, 0, "Invalid histogram size" ); 
+  
+  const TePDIJointHistogram& jhist01 = stat.getJointHistogram( 0, 1, 0 );
+  const TePDIJointHistogram& jhist10 = stat.getJointHistogram( 1, 0, 0 );
+  
+  // it is also possible to get histograms from joint histograms
+  const TePDIHistogram hist1b = jhist01.getRaster1Hist();
+  const TePDIHistogram hist2b = jhist01.getRaster2Hist();
+  
+  // Checking generated histograms consistency 
+  TEAGN_TRUE_OR_THROW( hist1a == hist1b, "Histograms inconsistency" )
+  TEAGN_TRUE_OR_THROW( hist2a == hist2b, "Histograms inconsistency" )
+  
+   // Checking single raster stat values 
+  
+  TEAGN_CHECK_EPS( stat.getSum( 0 ), 55438975.000000, 0.0001, "" );
+  TEAGN_CHECK_EPS( stat.getSum( 1 ), 87782597.000000, 0.0001, "" );
+  
+  TEAGN_CHECK_EPS( stat.getSum3( 0 ), 340982998465.000000, 0.0001, "" );
+  TEAGN_CHECK_EPS( stat.getSum3( 1 ), 1689469326995.000000, 0.0001, "" );
+
+  TEAGN_CHECK_EPS( stat.getSum4( 0 ), 27381030612693.000000, 0.0001, "" );
+  TEAGN_CHECK_EPS( stat.getSum4( 1 ), 252981440505241.000000, 0.0001, "" );  
+  
+  TEAGN_CHECK_EPS( stat.getMean( 0 ), 76.928379, 0.0001, "" );
+  TEAGN_CHECK_EPS( stat.getMean( 1 ), 121.809123, 0.0001, "" );
+
+  TEAGN_CHECK_EPS( stat.getVariance( 0 ), 75.432528, 0.0001, "" );
+  TEAGN_CHECK_EPS( stat.getVariance( 1 ), 1561.214764, 0.0001, "" );
+  
+  TEAGN_CHECK_EPS( stat.getStdDev( 0 ), 8.685190, 0.0001, "" );
+  TEAGN_CHECK_EPS( stat.getStdDev( 1 ), 39.512210, 0.0001, "" );
+  
+  TEAGN_CHECK_EPS( stat.getEntropy( 0 ), 5.004244, 0.0001, "" );
+  TEAGN_CHECK_EPS( stat.getEntropy( 1 ), 4.998273, 0.0001, "" );  
+  
+  TEAGN_CHECK_EPS( stat.getMin( 0 ), 47, 0.0001, "" );
+  TEAGN_CHECK_EPS( stat.getMin( 1 ), 0, 0.0001, "" );
+
+  TEAGN_CHECK_EPS( stat.getMax( 0 ), 255, 0.0001, "" );
+  TEAGN_CHECK_EPS( stat.getMax( 1 ), 255, 0.0001, "" );
+
+  TEAGN_CHECK_EPS( stat.getMode( 0 ), 81, 0.0001, "" );
+  TEAGN_CHECK_EPS( stat.getMode( 1 ), 141, 0.0001, "" );
+  
+  TEAGN_CHECK_EPS( stat.getPercentile( 0., 0, 0 ), 47, 0, 
+    "Invalid Percentile" );
+  TEAGN_CHECK_EPS( stat.getPercentile( 50., 0, 0 ), 78, 0, 
+    "Invalid Percentile" );
+  TEAGN_CHECK_EPS( stat.getPercentile( 51., 0, 0 ), 78, 0, 
+    "Invalid Percentile" );
+  TEAGN_CHECK_EPS( stat.getPercentile( 100., 0, 0 ), 255, 0, 
+    "Invalid Percentile" );
+          
+  TEAGN_CHECK_EPS( stat.getCovariance( 0, 0, 0 ),
+    75.432528, 0.001, "" );
+    
+  TEAGN_CHECK_EPS( stat.getCovariance( 0, 1, 0 ),
+    335.166257, 0.001, "" );
+
+  TEAGN_CHECK_EPS( stat.getCovariance( 1, 0, 0 ),
+    335.166257, 0.001, "" );
+        
+  TEAGN_CHECK_EPS( stat.getCovariance( 1, 1, 0 ),
+    1561.214764, 0.001, "" );
+    
+  TEAGN_CHECK_EPS( stat.getCorrelation( 0, 0, 0 ),
+     1.0, 0.000001, "" );
+
+  TEAGN_CHECK_EPS( stat.getCorrelation( 0, 1, 0 ),
+     0.976674, 0.000001, "" );
+
+  TEAGN_CHECK_EPS( stat.getCorrelation( 1, 0, 0 ),
+     0.976674, 0.000001, "" );
+     
+  TEAGN_CHECK_EPS( stat.getCorrelation( 1, 1, 0 ),
+     1.0000, 0.000001, "" );
+
+  // Checking functions generating a matrix       
+     
+  TeMatrix VarMatrix = stat.getVarMatrix();
+  TEAGN_CHECK_EPS( VarMatrix( 0, 0 ), 75.432528, 0.000001, "" );
+  TEAGN_CHECK_EPS( VarMatrix( 1, 0 ), 1561.214764, 0.000001, "" );  
+
+  TeMatrix StdDevMatrix = stat.getStdDevMatrix();
+  TEAGN_CHECK_EPS( StdDevMatrix( 0, 0 ), 8.685190, 0.000001, "" );
+  TEAGN_CHECK_EPS( StdDevMatrix( 1, 0 ), 39.512210, 0.000001, "" );  
+  
+  TeMatrix CMMatrix = stat.getCMMatrix();
+  TEAGN_CHECK_EPS( CMMatrix( 0, 0 ), 75.432528, 0.0001, "" );
+  TEAGN_CHECK_EPS( CMMatrix( 0, 1 ), 1561.214764, 0.000001, "" );
+  TEAGN_CHECK_EPS( CMMatrix( 1, 0 ), 486.770730, 0.00001, "" );
+  TEAGN_CHECK_EPS( CMMatrix( 1, 1 ), -33502.920720, 0.000001, "" );
+  TEAGN_CHECK_EPS( CMMatrix( 2, 0 ), 143871.693264, 0.00001, "" );
+  TEAGN_CHECK_EPS( CMMatrix( 2, 1 ), 8229548.372509, 0.000001, "" );
+
+  TeMatrix CovMatrix = stat.getCovMatrix();
+  TEAGN_CHECK_EPS( CovMatrix( 0, 0 ), 75.432528, 0.000001, "" );  
+  TEAGN_CHECK_EPS( CovMatrix( 0, 1 ), 335.166257, 0.000001, "" );  
+  TEAGN_CHECK_EPS( CovMatrix( 1, 0 ), 335.166257, 0.000001, "" );  
+  TEAGN_CHECK_EPS( CovMatrix( 1, 1 ), 1561.214764, 0.000001, "" );  
+
+  TeMatrix CorMatrix = stat.getCorMatrix();
+  TEAGN_CHECK_EPS( CorMatrix( 0, 0 ), 1.0, 0.000001, "" );  
+  TEAGN_CHECK_EPS( CorMatrix( 0, 1 ), 0.976674, 0.000001, "" );  
+  TEAGN_CHECK_EPS( CorMatrix( 1, 0 ), 0.976674, 0.000001, "" );  
+  TEAGN_CHECK_EPS( CorMatrix( 1, 1 ), 1.0, 0.000001, "" );  
+    
+  TeMatrix AssMatrix = stat.getAssimetryMatrix();
+  TEAGN_CHECK_EPS( AssMatrix( 0, 0 ), 0.742996, 0.000001, "" );
+  TEAGN_CHECK_EPS( AssMatrix( 0, 1 ), -0.543111, 0.000001, "" );
+
+  TeMatrix KurMatrix = stat.getKurtosisMatrix();
+  TEAGN_CHECK_EPS( KurMatrix( 0, 0 ), 22.284713, 0.000001, "" );
+  TEAGN_CHECK_EPS( KurMatrix( 0, 1 ), 0.376375, 0.000001, "" );
+
+  TeMatrix VarCoefMatrix = stat.getVarCoefMatrix();
+  TEAGN_CHECK_EPS( VarCoefMatrix( 0, 0 ), 0.112900, 0.000001, "" );
+  TEAGN_CHECK_EPS( VarCoefMatrix( 0, 1 ), 0.324378, 0.000001, "" );
+}
+
+
+void numeric_with_histograms_test()
+{
+  TePDITypes::TePDIRasterPtrType inRaster1( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+
+  TEAGN_TRUE_OR_THROW( inRaster1->init(), "Unable to init inRaster1" );
+
+  TePDITypes::TePDIRasterPtrType inRaster2( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop_contraste.tif" ), 'r' ) );
+
+  TEAGN_TRUE_OR_THROW( inRaster2->init(), "Unable to init inRaster2" );
+  
+  /* Building histograms */
+  
+  std::vector< TePDIHistogram::pointer > histograms;
+  
+  TePDIHistogram::pointer user_hist1_ptr( new TePDIHistogram );
+  TEAGN_TRUE_OR_THROW( user_hist1_ptr->reset( inRaster1, 0, 0, 
+    false, TeBoxPixelIn ),
+    "Histogram generation error" );
+  histograms.push_back( user_hist1_ptr );
+    
+  TePDIHistogram::pointer user_hist2_ptr( new TePDIHistogram );
+  TEAGN_TRUE_OR_THROW( user_hist2_ptr->reset( inRaster2, 0, 0, 
+    false, TeBoxPixelIn ),
+    "Histogram generation error" );
+  histograms.push_back( user_hist2_ptr );
+  
+  /* Building statistic parameters */
+
+  TePDIParameters pars;
+  
+  pars.SetParameter( "histograms", histograms );
+  
+  TePDITypes::TePDIRasterVectorType rasters;
+  rasters.push_back( inRaster1 );
+  rasters.push_back( inRaster2 );
+  
+  pars.SetParameter( "rasters", rasters );
+  
+  std::vector< int > bands;
+  bands.push_back( 0 );
+  bands.push_back( 0 );
+  
+  pars.SetParameter( "bands", bands );
+  
+  TePDIStatistic stat;
+
+  TEAGN_TRUE_OR_THROW( stat.Reset( pars ), "Reset error" );
+  
+  TePDIHistogram hist1 = stat.getHistogram( 0 );
+  TEAGN_TRUE_OR_THROW( ( hist1.size() == user_hist1_ptr->size() ), 
+    "Invalid histogram1 size" );
+
+  TePDIHistogram hist2 = stat.getHistogram( 1 );
+  TEAGN_TRUE_OR_THROW( ( hist2.size() == user_hist2_ptr->size() ), 
+    "Invalid histogram2 size" );
+      
+  TEAGN_CHECK_EPS( stat.getSum( 0 ), 55438975.000000, 0.0001, "" );
+  TEAGN_CHECK_EPS( stat.getSum( 1 ), 87782597.000000, 0.0001, "" );
+
+  TEAGN_CHECK_EPS( stat.getSum3( 0 ), 340982998465.000000, 0.0001, "" );
+  TEAGN_CHECK_EPS( stat.getSum3( 1 ), 1689469326995.000000, 0.0001, "" );
+
+  TEAGN_CHECK_EPS( stat.getSum4( 0 ), 27381030612693.000000, 0.0001, "" );
+  TEAGN_CHECK_EPS( stat.getSum4( 1 ), 252981440505241.000000, 0.0001, "" );  
+    
+  TEAGN_CHECK_EPS( stat.getMean( 0 ), 76.928379, 0.0001, "" );
+  TEAGN_CHECK_EPS( stat.getMean( 1 ), 121.809123, 0.0001, "" );
+
+  TEAGN_CHECK_EPS( stat.getVariance( 0 ), 75.432528, 0.0001, "" );
+  TEAGN_CHECK_EPS( stat.getVariance( 1 ), 1561.214764, 0.0001, "" );
+  
+  TEAGN_CHECK_EPS( stat.getStdDev( 0 ), 8.685190, 0.0001, "" );
+  TEAGN_CHECK_EPS( stat.getStdDev( 1 ), 39.512210, 0.0001, "" );
+  
+  TEAGN_CHECK_EPS( stat.getEntropy( 0 ), 5.004244, 0.0001, "" );
+  TEAGN_CHECK_EPS( stat.getEntropy( 1 ), 4.998273, 0.0001, "" );  
+  
+  TEAGN_CHECK_EPS( stat.getMin( 0 ), 47, 0.0001, "" );
+  TEAGN_CHECK_EPS( stat.getMin( 1 ), 0, 0.0001, "" );
+
+  TEAGN_CHECK_EPS( stat.getMax( 0 ), 255, 0.0001, "" );
+  TEAGN_CHECK_EPS( stat.getMax( 1 ), 255, 0.0001, "" );
+
+  TEAGN_CHECK_EPS( stat.getMode( 0 ), 81, 0.0001, "" );
+  TEAGN_CHECK_EPS( stat.getMode( 1 ), 141, 0.0001, "" );
+  
+  TEAGN_CHECK_EPS( stat.getPercentile( 0., 0, 0 ), 47, 0, 
+    "Invalid Percentile" );
+  TEAGN_CHECK_EPS( stat.getPercentile( 50., 0, 0 ), 78, 0, 
+    "Invalid Percentile" );
+  TEAGN_CHECK_EPS( stat.getPercentile( 51., 0, 0 ), 78, 0, 
+    "Invalid Percentile" );
+  TEAGN_CHECK_EPS( stat.getPercentile( 100., 0, 0 ), 255, 0, 
+    "Invalid Percentile" );  
+          
+  TEAGN_CHECK_EPS( stat.getCovariance( 0, 0 ),
+    75.432528, 0.001, "" );
+    
+  TEAGN_CHECK_EPS( stat.getCovariance( 0, 1 ),
+    335.166, 0.001, "" );
+
+  TEAGN_CHECK_EPS( stat.getCovariance( 1, 0 ),
+    335.166, 0.001, "" );
+        
+  TEAGN_CHECK_EPS( stat.getCovariance( 1, 1 ),
+    1561.214764, 0.001, "" );
+    
+  TEAGN_CHECK_EPS( stat.getCorrelation( 0, 0 ),
+     1.0, 0.000001, "" );
+
+  TEAGN_CHECK_EPS( stat.getCorrelation( 0, 1 ),
+     0.976674, 0.000001, "" );
+
+  TEAGN_CHECK_EPS( stat.getCorrelation( 1, 0 ),
+     0.976674, 0.000001, "" );
+     
+  TeMatrix VarMatrix = stat.getVarMatrix();
+  TEAGN_CHECK_EPS( VarMatrix( 0, 0 ), 75.432528, 0.000001, "" );
+  TEAGN_CHECK_EPS( VarMatrix( 1, 0 ), 1561.214764, 0.000001, "" );  
+
+  TeMatrix StdDevMatrix = stat.getStdDevMatrix();
+  TEAGN_CHECK_EPS( StdDevMatrix( 0, 0 ), 8.685190, 0.000001, "" );
+  TEAGN_CHECK_EPS( StdDevMatrix( 1, 0 ), 39.512210, 0.000001, "" );  
+  
+  TeMatrix CMMatrix = stat.getCMMatrix();
+  TEAGN_CHECK_EPS( CMMatrix( 0, 0 ), 75.432528, 0.0001, "" );
+  TEAGN_CHECK_EPS( CMMatrix( 0, 1 ), 1561.214764, 0.000001, "" );
+  TEAGN_CHECK_EPS( CMMatrix( 1, 0 ), 486.770730, 0.00001, "" );
+  TEAGN_CHECK_EPS( CMMatrix( 1, 1 ), -33502.920720, 0.000001, "" );
+  TEAGN_CHECK_EPS( CMMatrix( 2, 0 ), 143871.693264, 0.00001, "" );
+  TEAGN_CHECK_EPS( CMMatrix( 2, 1 ), 8229548.372509, 0.000001, "" );
+
+  TeMatrix CovMatrix = stat.getCovMatrix();
+  TEAGN_CHECK_EPS( CovMatrix( 0, 0 ), 75.432528, 0.000001, "" );  
+  TEAGN_CHECK_EPS( CovMatrix( 0, 1 ), 335.166257, 0.000001, "" );  
+  TEAGN_CHECK_EPS( CovMatrix( 1, 0 ), 335.166257, 0.000001, "" );  
+  TEAGN_CHECK_EPS( CovMatrix( 1, 1 ), 1561.214764, 0.000001, "" );  
+
+  TeMatrix CorMatrix = stat.getCorMatrix();
+  TEAGN_CHECK_EPS( CorMatrix( 0, 0 ), 1.0, 0.000001, "" );  
+  TEAGN_CHECK_EPS( CorMatrix( 0, 1 ), 0.976674, 0.000001, "" );  
+  TEAGN_CHECK_EPS( CorMatrix( 1, 0 ), 0.976674, 0.000001, "" );  
+  TEAGN_CHECK_EPS( CorMatrix( 1, 1 ), 1.0, 0.000001, "" );  
+    
+  TeMatrix AssMatrix = stat.getAssimetryMatrix();
+  TEAGN_CHECK_EPS( AssMatrix( 0, 0 ), 0.742996, 0.000001, "" );
+  TEAGN_CHECK_EPS( AssMatrix( 0, 1 ), -0.543111, 0.000001, "" );
+
+  TeMatrix KurMatrix = stat.getKurtosisMatrix();
+  TEAGN_CHECK_EPS( KurMatrix( 0, 0 ), 22.284713, 0.000001, "" );
+  TEAGN_CHECK_EPS( KurMatrix( 0, 1 ), 0.376375, 0.000001, "" );
+
+  TeMatrix VarCoefMatrix = stat.getVarCoefMatrix();
+  TEAGN_CHECK_EPS( VarCoefMatrix( 0, 0 ), 0.112900, 0.000001, "" );
+  TEAGN_CHECK_EPS( VarCoefMatrix( 0, 1 ), 0.324378, 0.000001, "" );
+}
+
+
+int main()
+{
+  TEAGN_LOGMSG( "Test started." );
+
+  try{
+    TeStdIOProgress pi;
+    TeProgress::setProgressInterf( dynamic_cast< TeProgressBase* >( &pi ) );
+      
+    TeInitRasterDecoders();
+
+    numeric_test_with_polygonset();
+    numeric_with_histograms_test();
+  }
+  catch( const TeException& e ){
+    TEAGN_LOGERR( "Test Failed - " + e.message() );
+    return EXIT_FAILURE;
+  }
+
+  TEAGN_LOGMSG( "Test OK." );
+  return EXIT_SUCCESS;
+}
diff --git a/examples/image_processing/source/TePDIStatistic/TePDIStatistic_test.vcproj b/examples/image_processing/source/TePDIStatistic/TePDIStatistic_test.vcproj
new file mode 100755
index 0000000..4e7968b
--- /dev/null
+++ b/examples/image_processing/source/TePDIStatistic/TePDIStatistic_test.vcproj
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="TePDIStatistic_test"
+	ProjectGUID="{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	RootNamespace="TePDIStatistic_test"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="0">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../base;../../../../src/terralib/image_processing;../../../../src/terralib/kernel;../../../../src/tiff"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PDIAGN_ENABLE_STDOUT_LOG"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Debug/terralibpdi/terralibpdi.lib ../../../../Debug/terralib/terralib.lib ../../../../Debug/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Debug/libjpeg/libjpeg.lib ../../../../Debug/shapelib/shapelib.lib user32.lib $(NOINHERIT)"
+				OutputFile="$(OutDir)/TePDIStatistic_test.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreAllDefaultLibraries="FALSE"
+				IgnoreDefaultLibraryNames="msvcrt.lib,libcmt.lib;libc.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"
+				TargetMachine="0"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="../../../../src/terralib/image_processing;../base;../../../../src/terralib/kernel;../../../../src/shapelib"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Release/terralibpdi/terralibpdi.lib ../../../../Release/terralib/terralib.lib ../../../../Release/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Release/libjpeg/libjpeg.lib ../../../../Release/shapelib/shapelib.lib"
+				OutputFile="$(OutDir)/TePDIStatistic_test.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\TePDIStatistic_test.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/image_processing/source/TePDIUtils/TePDIUtils.pro b/examples/image_processing/source/TePDIUtils/TePDIUtils.pro
new file mode 100755
index 0000000..e48f203
--- /dev/null
+++ b/examples/image_processing/source/TePDIUtils/TePDIUtils.pro
@@ -0,0 +1,13 @@
+include( ../base/base.pro )
+
+SOURCES += TePDIUtils_test.cpp
+
+QMAKE_CLEAN += \
+  ../../bin/TeAllocMemoryMappedRaster_test.tif \
+  ../../bin/TeAllocRAMRaster_test.tif \
+  ../../bin/TeRaster2Geotiff_test.tif \
+  ../../bin/TeResetRaster_test.tif \
+  ../../bin/TePDIUtils_TeAllocRAMRaster3_test.tif \
+  ../../bin/TePDIUtils_exportPS2SHP_test.dbf \
+  ../../bin/TePDIUtils_exportPS2SHP_test.shp \
+  ../../bin/TePDIUtils_exportPS2SHP_test.shx
\ No newline at end of file
diff --git a/examples/image_processing/source/TePDIUtils/TePDIUtils_test.cpp b/examples/image_processing/source/TePDIUtils/TePDIUtils_test.cpp
new file mode 100755
index 0000000..66b6cbf
--- /dev/null
+++ b/examples/image_processing/source/TePDIUtils/TePDIUtils_test.cpp
@@ -0,0 +1,1023 @@
+#define TEAGN_ENABLE_STDOUT_LOG
+
+#include <TePDIExamplesBase.hpp>
+
+#include <TePDIUtils.hpp>
+
+#include <TeInitRasterDecoders.h>
+
+#include <TeAgnostic.h>
+
+#include <string>
+
+#include <TeProgress.h>
+#include <TeStdIOProgress.h>
+#include <TePrecision.h>
+
+
+void raster_compare_test()
+{
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+
+  TEAGN_TRUE_OR_THROW(
+    TePDIUtils::rasterCompare( inRaster, inRaster ),
+    "Raster compare error" );
+}
+
+
+void TeGetRasterMinMaxBounds_test()
+{
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+
+  double min = 0;
+  double max = 0;
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeGetRasterMinMaxBounds( inRaster, 0, min, max ),
+    "Unable to get bounds" );
+
+  TEAGN_CHECK_EQUAL( min, 0, "Invalid min value" );
+  TEAGN_CHECK_EQUAL( max, 255, "Invalid max value" );
+
+}
+
+
+void TeRaster2Geotiff_deprecated_test()
+{
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  
+  double pixel_value = 0;
+  TEAGN_TRUE_OR_THROW( inRaster->getElement( 0, 0, pixel_value, 0 ),
+    "Unable to get element" );
+  TEAGN_CHECK_EPS( pixel_value, 88., 0.00001, 
+    "Pixel value inversion detected" );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( inRaster,
+    TEPDIEXAMPLESBINPATH "TeRaster2Geotiff_test.tif" ), "GeoTIF generation error" );
+
+  TePDITypes::TePDIRasterPtrType inRaster2( new TeRaster(
+    std::string( TEPDIEXAMPLESBINPATH "TeRaster2Geotiff_test.tif" ), 'r' ) );
+
+  TEAGN_TRUE_OR_THROW( inRaster2->init(), "Unable to init inRaster2" );
+  
+  TEAGN_TRUE_OR_THROW( inRaster2->getElement( 0, 0, pixel_value, 0 ),
+    "Unable to get element" );
+  TEAGN_CHECK_EPS( pixel_value, 88., 0.00001, 
+    "Pixel value inversion detected" );
+
+  TEAGN_TRUE_OR_THROW(
+    TePDIUtils::rasterCompare( inRaster, inRaster2 ),
+    "Raster compare error" );
+}
+
+
+void TeRaster2Geotiff_test()
+{
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  
+  double pixel_value = 0;
+  TEAGN_TRUE_OR_THROW( inRaster->getElement( 0, 0, pixel_value, 0 ),
+    "Unable to get element" );
+  TEAGN_CHECK_EPS( pixel_value, 88., 0.00001, 
+    "Pixel value inversion detected" );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( inRaster,
+    TEPDIEXAMPLESBINPATH "TeRaster2Geotiff_test.tif",
+    true ), "GeoTIF generation error" );
+
+  TePDITypes::TePDIRasterPtrType inRaster2( new TeRaster(
+    std::string( TEPDIEXAMPLESBINPATH "TeRaster2Geotiff_test.tif" ), 'r' ) );
+
+  TEAGN_TRUE_OR_THROW( inRaster2->init(), "Unable to init inRaster2" );
+  
+  TEAGN_TRUE_OR_THROW( inRaster2->getElement( 0, 0, pixel_value, 0 ),
+    "Unable to get element" );
+  TEAGN_CHECK_EPS( pixel_value, 88., 0.00001, 
+    "Pixel value inversion detected" );
+
+  TEAGN_TRUE_OR_THROW(
+    TePDIUtils::rasterCompare( inRaster, inRaster2 ),
+    "Raster compare error" );
+}
+
+
+void TeGetRasterReqMem_test()
+{
+  TePDITypes::TePDIRasterPtrType RAMRaster;
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( RAMRaster, 10,
+    10, 10, false, TeUNSIGNEDCHAR, 0 ), "RAM Raster Allocation error" );
+    
+  TEAGN_TRUE_OR_THROW( 
+    ( TePDIUtils::TeGetRasterReqMem( RAMRaster->params() ) == 1000 ),
+    "Invalid TeGetRasterReqMem result" );
+}
+
+
+void TeAllocRAMRaster1_test()
+{
+  TePDITypes::TePDIRasterPtrType RAMRaster;
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( RAMRaster, 10,
+    10, 10, false, TeUNSIGNEDCHAR, 0 ), "RAM Raster Allocation error" );
+
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->params().status_ == TeRasterParams::TeReadyToWrite, 
+    "Raster status error" );
+  TEAGN_TRUE_OR_THROW( RAMRaster->params().nlines_ == 10, "Lines error" );
+  TEAGN_TRUE_OR_THROW( RAMRaster->params().ncols_ == 10, "Columns error" );
+  TEAGN_TRUE_OR_THROW( RAMRaster->nBands() == 10, "Bands error" );
+  TEAGN_TRUE_OR_THROW( RAMRaster->params().dataType_[ 0 ] == TeUNSIGNEDCHAR,
+    "data type error" );
+}
+
+
+void TeAllocRAMRaster_templateraster_test()
+{
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+
+  TePDITypes::TePDIRasterPtrType RAMRaster( new TeRaster );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( inRaster, RAMRaster, 0,
+    true, false, TeUNSIGNEDCHAR ), "RAM Raster Allocation error" );
+
+  TEAGN_TRUE_OR_THROW( RAMRaster->params().dataType_[ 0 ] == TeUNSIGNEDCHAR,
+    "data type error" );
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->params().status_ == TeRasterParams::TeReadyToWrite, 
+    "Raster status error" );
+    
+  TEAGN_TRUE_OR_THROW( RAMRaster->params().nlines_ == 
+    inRaster->params().nlines_, "Checking error" );
+  TEAGN_TRUE_OR_THROW( RAMRaster->params().ncols_ == 
+    inRaster->params().ncols_, "Checking error" );
+  TEAGN_TRUE_OR_THROW( RAMRaster->params().dataType_[ 0 ] == 
+    inRaster->params().dataType_[ 0 ], "Checking error" );
+  TEAGN_TRUE_OR_THROW( ( *(RAMRaster->params().projection()) ) == 
+    ( *(inRaster->params().projection()) ), "Checking error" );
+  TEAGN_TRUE_OR_THROW( RAMRaster->params().box() == 
+    inRaster->params().box(), "Checking error" );
+  TEAGN_TRUE_OR_THROW( RAMRaster->params().resx_ == 
+    inRaster->params().resx_, "Checking error" );
+  TEAGN_TRUE_OR_THROW( RAMRaster->params().resy_ == 
+    inRaster->params().resy_, "Checking error" );
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->params().status_ == TeRasterParams::TeReadyToWrite, 
+    "Raster status error" );    
+}
+
+
+void TeAllocRAMRaster_usingparams_test()
+{
+  TePDITypes::TePDIRasterPtrType RAMRaster;
+  
+  TeRasterParams params;
+  params.nBands( 10 );
+  params.nlines_ = 10;
+  params.ncols_ = 10;
+  params.setDataType( TeUNSIGNEDCHAR, -1 );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( RAMRaster, params, 
+    TePDIUtils::TePDIUtilsAutoMemPol ), "RAM Raster Allocation error" );
+
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->params().status_ == TeRasterParams::TeReadyToWrite, 
+    "Raster status error" );
+  TEAGN_TRUE_OR_THROW( RAMRaster->params().nlines_ == 10, "Lines error" );
+  TEAGN_TRUE_OR_THROW( RAMRaster->params().ncols_ == 10, "Columns error" );
+  TEAGN_TRUE_OR_THROW( RAMRaster->nBands() == 10, "Bands error" );
+  TEAGN_TRUE_OR_THROW( RAMRaster->params().dataType_[ 0 ] == TeUNSIGNEDCHAR,
+    "data type error" );
+}
+
+
+void TeAllocMemoryMappedRaster_test()
+{
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+
+  TePDITypes::TePDIRasterPtrType RAMRaster;
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( inRaster, RAMRaster, 0,
+    true, true, TeUNSIGNEDCHAR ), "RAM Raster Allocation error" );
+
+  TEAGN_TRUE_OR_THROW( RAMRaster->params().dataType_[ 0 ] == TeUNSIGNEDCHAR,
+    "data type error" );
+  TEAGN_TRUE_OR_THROW( 
+    RAMRaster->params().status_ == TeRasterParams::TeReadyToWrite, 
+    "Raster status error" );    
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeCopyRasterBands( inRaster,
+    RAMRaster, false, false ), "Raster band copy error" );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( RAMRaster,
+    TEPDIEXAMPLESBINPATH "TeAllocMemoryMappedRaster_test.tif" ), "GeoTIF generation error" );
+}
+
+
+void IsFloatBand_test()
+{
+
+  TePDITypes::TePDIRasterPtrType RAMRaster_int;
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( RAMRaster_int, 10,
+    10, 10, false, TeINTEGER, 0 ), "RAM Raster Allocation error" );
+    
+  TEAGN_TRUE_OR_THROW( ( ! TePDIUtils::IsFloatBand( RAMRaster_int, 0 ) ),
+    "Invalid result" );
+  
+  TePDITypes::TePDIRasterPtrType RAMRaster_uchar;
+    
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( RAMRaster_uchar, 10,
+    10, 10, false, TeUNSIGNEDCHAR, 0 ), "RAM Raster Allocation error" );    
+    
+  TEAGN_TRUE_OR_THROW( ( ! TePDIUtils::IsFloatBand( RAMRaster_uchar, 0 ) ),
+    "Invalid result" );
+    
+  TePDITypes::TePDIRasterPtrType RAMRaster_float;
+    
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( RAMRaster_float, 10,
+    10, 10, false, TeFLOAT, 0 ), "RAM Raster Allocation error" );    
+    
+  TEAGN_TRUE_OR_THROW( ( TePDIUtils::IsFloatBand( RAMRaster_float, 0 ) ),
+    "Invalid result" );    
+    
+  TePDITypes::TePDIRasterPtrType RAMRaster_double;
+    
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( RAMRaster_double, 10,
+    10, 10, false, TeDOUBLE, 0 ), "RAM Raster Allocation error" );    
+    
+  TEAGN_TRUE_OR_THROW( ( TePDIUtils::IsFloatBand( RAMRaster_double, 0 ) ),
+    "Invalid result" );     
+};
+
+
+void buildDetailedBox_test()
+{
+  TeNoProjection proj;
+
+  TeRasterParams params;
+  params.nBands( 1 );
+  params.nlines_ = 3;
+  params.ncols_ = 3;
+  params.projection( &proj );
+  
+  TePDITypes::TePDIRasterPtrType ram_raster;
+  TEAGN_TRUE_OR_THROW( 
+    TePDIUtils::TeAllocRAMRaster( ram_raster, params, false ), 
+    "RAM Raster Allocation error" );
+    
+  TePolygon box_polygon;
+  
+  TEAGN_TRUE_OR_THROW( TePDIUtils::buildDetailedBox( ram_raster,
+    box_polygon), "detailed box building error" );
+    
+  TEAGN_TRUE_OR_THROW( ( box_polygon.size() == 1 ), 
+    "Invalid linear rings number" );
+  TEAGN_TRUE_OR_THROW( ( box_polygon[ 0 ].size() == 9 ), 
+    "Invalid points number" );
+    
+  TEAGN_TRUE_OR_THROW( ( box_polygon[ 0 ][ 0 ] == 
+    ram_raster->index2Coord( TeCoord2D( 0, 0 ) ) ), 
+    "Invalid point" );
+  TEAGN_TRUE_OR_THROW( ( box_polygon[ 0 ][ 1 ] == 
+    ram_raster->index2Coord( TeCoord2D( 1, 0 ) ) ), 
+    "Invalid point" );
+  TEAGN_TRUE_OR_THROW( ( box_polygon[ 0 ][ 2 ] == 
+    ram_raster->index2Coord( TeCoord2D( 2, 0 ) ) ), 
+    "Invalid point" );
+  
+  TEAGN_TRUE_OR_THROW( ( box_polygon[ 0 ][ 3 ] == 
+    ram_raster->index2Coord( TeCoord2D( 2, 1 ) ) ), 
+    "Invalid point" );
+  TEAGN_TRUE_OR_THROW( ( box_polygon[ 0 ][ 4 ] == 
+    ram_raster->index2Coord( TeCoord2D( 2, 2 ) ) ), 
+    "Invalid point" );
+    
+  TEAGN_TRUE_OR_THROW( ( box_polygon[ 0 ][ 5 ] == 
+    ram_raster->index2Coord( TeCoord2D( 1, 2 ) ) ), 
+    "Invalid point" );
+  TEAGN_TRUE_OR_THROW( ( box_polygon[ 0 ][ 6 ] == 
+    ram_raster->index2Coord( TeCoord2D( 0, 2 ) ) ), 
+    "Invalid point" );
+    
+  TEAGN_TRUE_OR_THROW( ( box_polygon[ 0 ][ 7 ] == 
+    ram_raster->index2Coord( TeCoord2D( 0, 1 ) ) ), 
+    "Invalid point" );
+  TEAGN_TRUE_OR_THROW( ( box_polygon[ 0 ][ 8 ] == 
+    ram_raster->index2Coord( TeCoord2D( 0, 0 ) ) ), 
+    "Invalid point" );
+            
+}
+
+
+void buildDetailedBBox_test()
+{
+  TeNoProjection proj;
+
+  TeRasterParams params;
+  params.nBands( 1 );
+  params.nlines_ = 2;
+  params.ncols_ = 2;
+  params.projection( &proj );
+  
+  TePDITypes::TePDIRasterPtrType ram_raster;
+  TEAGN_TRUE_OR_THROW( 
+    TePDIUtils::TeAllocRAMRaster( ram_raster, params, false ), 
+    "RAM Raster Allocation error" );
+    
+  TePolygon box_polygon;
+  
+  TEAGN_TRUE_OR_THROW( TePDIUtils::buildDetailedBBox( ram_raster,
+    box_polygon), "detailed box building error" );
+    
+  TEAGN_TRUE_OR_THROW( ( box_polygon.size() == 1 ), 
+    "Invalid linear rings number" );
+  TEAGN_TRUE_OR_THROW( ( box_polygon[ 0 ].size() == 9 ), 
+    "Invalid points number" );
+    
+  TEAGN_TRUE_OR_THROW( ( box_polygon[ 0 ][ 0 ] == 
+    ram_raster->index2Coord( TeCoord2D( -0.5, -0.5 ) ) ), 
+    "Invalid point" );
+  TEAGN_TRUE_OR_THROW( ( box_polygon[ 0 ][ 1 ] == 
+    ram_raster->index2Coord( TeCoord2D( 0.5, -0.5 ) ) ), 
+    "Invalid point" );
+  TEAGN_TRUE_OR_THROW( ( box_polygon[ 0 ][ 2 ] == 
+    ram_raster->index2Coord( TeCoord2D( 1.5, -0.5 ) ) ), 
+    "Invalid point" );
+  
+  TEAGN_TRUE_OR_THROW( ( box_polygon[ 0 ][ 3 ] == 
+    ram_raster->index2Coord( TeCoord2D( 1.5, 0.5 ) ) ), 
+    "Invalid point" );
+  TEAGN_TRUE_OR_THROW( ( box_polygon[ 0 ][ 4 ] == 
+    ram_raster->index2Coord( TeCoord2D( 1.5, 1.5 ) ) ), 
+    "Invalid point" );
+    
+  TEAGN_TRUE_OR_THROW( ( box_polygon[ 0 ][ 5 ] == 
+    ram_raster->index2Coord( TeCoord2D( 0.5, 1.5 ) ) ), 
+    "Invalid point" );
+  TEAGN_TRUE_OR_THROW( ( box_polygon[ 0 ][ 6 ] == 
+    ram_raster->index2Coord( TeCoord2D( -0.5, 1.5 ) ) ), 
+    "Invalid point" );
+    
+  TEAGN_TRUE_OR_THROW( ( box_polygon[ 0 ][ 7 ] == 
+    ram_raster->index2Coord( TeCoord2D( -0.5, 0.5 ) ) ), 
+    "Invalid point" );
+  TEAGN_TRUE_OR_THROW( ( box_polygon[ 0 ][ 8 ] == 
+    ram_raster->index2Coord( TeCoord2D( -0.5, -0.5 ) ) ), 
+    "Invalid point" );    
+}
+
+void getGeodeticPixelRes_test()
+{
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  
+  double x_res = 0;
+  double y_res = 0;
+  
+  TePDIUtils::getGeodeticPixelRes( inRaster->params(), x_res, y_res );
+  
+  TEAGN_CHECK_EPS( x_res, 0.000003, 0.000001, "Invalid x_res" );
+  TEAGN_CHECK_EPS( y_res, 0.000003, 0.000001, "Invalid y_res" );
+}
+
+
+void reprojectRaster_test()
+{
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+  
+  TePDITypes::TePDIRasterPtrType ram_raster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( ram_raster, 10,
+    10, 10, false, TeUNSIGNEDCHAR, 0 ), "RAM Raster Allocation error" ); 
+    
+  TEAGN_TRUE_OR_THROW( TePDIUtils::reprojectRaster( inRaster,
+     *(inRaster->projection()), inRaster->params().resx_,
+     inRaster->params().resy_, ram_raster ),
+    "Raster reprojection error" );
+    
+  TEAGN_TRUE_OR_THROW( ( inRaster->projection()->name() ==
+    ram_raster->projection()->name() ),
+    "Invalid projection name" );
+  TEAGN_CHECK_EPS( inRaster->params().box().x1(),
+    ram_raster->params().box().x1(), 0.000001, "Invalid box" );
+  TEAGN_CHECK_EPS( inRaster->params().box().x2(),
+    ram_raster->params().box().x2(), 0.000001, "Invalid box" );    
+  TEAGN_CHECK_EPS( inRaster->params().box().y1(),
+    ram_raster->params().box().y1(), 0.0001, "Invalid box" );
+  TEAGN_CHECK_EPS( inRaster->params().box().y2(),
+    ram_raster->params().box().y2(), 0.0001, "Invalid box" );    
+  TEAGN_CHECK_EPS( inRaster->params().resx_,
+    ram_raster->params().resx_, 0.0001, "Invalid box" );    
+  TEAGN_CHECK_EPS( inRaster->params().resy_,
+    ram_raster->params().resy_, 0.0001, "Invalid box" );    
+    
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( ram_raster,
+    TEPDIEXAMPLESBINPATH "TePDIUtils_reprojectRaster_test.tif" ), "GeoTIF generation error" );    
+}
+
+
+void TeRelation_test()
+{
+  TeLinearRing r1;
+  r1.add( TeCoord2D( 0, 0 ) );
+  r1.add( TeCoord2D( 3, 0 ) );
+  r1.add( TeCoord2D( 3, 3 ) );
+  r1.add( TeCoord2D( 0, 3.3 ) );
+  r1.add( TeCoord2D( 0, 0 ) );
+  
+  TeLinearRing r2;
+  r2.add( TeCoord2D( 1, 1 ) );
+  r2.add( TeCoord2D( 2, 1 ) );
+  r2.add( TeCoord2D( 2, 2 ) );
+  r2.add( TeCoord2D( 1, 2 ) );
+  r2.add( TeCoord2D( 1, 1 ) );
+  
+  TePolygon pol1;
+  pol1.add( r1 );
+  pol1.add( r2 );
+  
+  TeTileIndexer ti( pol1, 0.3 ); 
+  
+  TEAGN_TRUE_OR_THROW( 
+    ( TePDIUtils::TeRelation( TeCoord2D( 1.5, 0.5 ), ti ) == TeINSIDE ),
+    "Invalid relation" );   
+  TEAGN_TRUE_OR_THROW( 
+    ( TePDIUtils::TeRelation( TeCoord2D( 2.5, 1.5 ), ti ) == TeINSIDE ),
+    "Invalid relation" );   
+  TEAGN_TRUE_OR_THROW( 
+    ( TePDIUtils::TeRelation( TeCoord2D( 1.5, 2.5 ), ti ) == TeINSIDE ),
+    "Invalid relation" );   
+  TEAGN_TRUE_OR_THROW( 
+    ( TePDIUtils::TeRelation( TeCoord2D( 0.5, 1.5 ), ti ) == TeINSIDE ),
+    "Invalid relation" );   
+  TEAGN_TRUE_OR_THROW( 
+    ( TePDIUtils::TeRelation( TeCoord2D( 0.5, 1.5 ), ti ) == TeINSIDE ),
+    "Invalid relation" );   
+  TEAGN_TRUE_OR_THROW( 
+    ( TePDIUtils::TeRelation( TeCoord2D( 0.1, 3.1 ), ti ) == TeINSIDE ),
+    "Invalid relation" );     
+      
+  TEAGN_TRUE_OR_THROW( 
+    ( TePDIUtils::TeRelation( TeCoord2D( 1.5, 1.5 ), ti ) == TeOUTSIDE ),
+    "Invalid relation" );
+  TEAGN_TRUE_OR_THROW( 
+    ( TePDIUtils::TeRelation( TeCoord2D( 2.5, 3.5 ), ti ) == TeOUTSIDE ),
+    "Invalid relation" );
+  TEAGN_TRUE_OR_THROW( 
+    ( TePDIUtils::TeRelation( TeCoord2D( -1.0, 1.0 ), ti ) == TeOUTSIDE ),
+    "Invalid relation" );    
+  TEAGN_TRUE_OR_THROW( 
+    ( TePDIUtils::TeRelation( TeCoord2D( -1.0, -1.0 ), ti ) == TeOUTSIDE ),
+    "Invalid relation" );    
+  TEAGN_TRUE_OR_THROW( 
+    ( TePDIUtils::TeRelation( TeCoord2D( 1.0, -1.0 ), ti ) == TeOUTSIDE ),
+    "Invalid relation" );  
+  TEAGN_TRUE_OR_THROW( 
+    ( TePDIUtils::TeRelation( TeCoord2D( 4.0, 4.0 ), ti ) == TeOUTSIDE ),
+    "Invalid relation" );        
+}
+
+
+void makeSegmentSet_test()
+{
+  TeLine2D l1;
+  l1.add( TeCoord2D( 0,0 ) );
+  l1.add( TeCoord2D( 1,0 ) );
+  l1.add( TeCoord2D( 0,1 ) );
+  l1.add( TeCoord2D( 0,0 ) );
+  
+  TeLinearRing lr1( l1 );
+  
+  TePolygon p1;
+  p1.add( lr1 );
+  
+  TeLineSet ls1;
+  TePDIUtils::makeSegmentSet( p1, ls1 );
+  
+  TEAGN_TRUE_OR_THROW( ( ls1.size() == 3 ), "Invalid line set size" );
+  
+  TEAGN_TRUE_OR_THROW( ( ls1[ 0 ].size() == 2 ), "Invalid segment size" );
+  TEAGN_TRUE_OR_THROW( ( ls1[ 1 ].size() == 2 ), "Invalid segment size" );
+  TEAGN_TRUE_OR_THROW( ( ls1[ 2 ].size() == 2 ), "Invalid segment size" );
+  
+  TEAGN_TRUE_OR_THROW( ( ls1[ 0 ][ 0 ] == TeCoord2D( 0, 0 ) ), 
+    "Invalid point" );
+  TEAGN_TRUE_OR_THROW( ( ls1[ 0 ][ 1 ] == TeCoord2D( 1, 0 ) ), 
+    "Invalid point" );  
+    
+  TEAGN_TRUE_OR_THROW( ( ls1[ 1 ][ 0 ] == TeCoord2D( 1, 0 ) ), 
+    "Invalid point" );
+  TEAGN_TRUE_OR_THROW( ( ls1[ 1 ][ 1 ] == TeCoord2D( 0, 1 ) ), 
+    "Invalid point" );      
+
+  TEAGN_TRUE_OR_THROW( ( ls1[ 2 ][ 0 ] == TeCoord2D( 0, 1 ) ), 
+    "Invalid point" );
+  TEAGN_TRUE_OR_THROW( ( ls1[ 2 ][ 1 ] == TeCoord2D( 0, 0 ) ), 
+    "Invalid point" );      
+}
+
+
+void TeSegSetIntersection_test()
+{
+  {
+    /* X test */
+  
+    TeLine2D line1;
+    line1.add( TeCoord2D( -1, -1 ) );
+    line1.add( TeCoord2D( 1, 1 ) );
+    
+    TeLineSet ls1;
+    ls1.add( line1 );
+    
+    TeLine2D line2;
+    line2.add( TeCoord2D( -1, 1 ) );
+    line2.add( TeCoord2D( 1, -1 ) );
+    
+    TeLineSet ls2;
+    ls2.add( line2 );    
+    
+    TePointSet ps1;
+    TePDIUtils::TeSegSetIntersection( ls1, ls2, ps1 );
+    
+    TEAGN_TRUE_OR_THROW( ( ps1.size() == 1 ), "Invalid point set size" )
+    TEAGN_TRUE_OR_THROW( ( ps1[ 0 ].elem() == TeCoord2D( 0, 0 ) ), 
+      "Invalid intersection point" )
+  }
+  
+  {
+    /* + Test */
+  
+    TeLine2D line1;
+    line1.add( TeCoord2D( -1, 0 ) );
+    line1.add( TeCoord2D( 1, 0 ) );
+    
+    TeLineSet ls1;
+    ls1.add( line1 );
+    
+    TeLine2D line2;
+    line2.add( TeCoord2D( 0, 1 ) );
+    line2.add( TeCoord2D( 0, -1 ) );
+    
+    TeLineSet ls2;
+    ls2.add( line2 );    
+    
+    TePointSet ps1;
+    TePDIUtils::TeSegSetIntersection( ls1, ls2, ps1 );
+    
+    TEAGN_TRUE_OR_THROW( ( ps1.size() == 1 ), "Invalid point set size" )
+    TEAGN_TRUE_OR_THROW( ( ps1[ 0 ].elem() == TeCoord2D( 0, 0 ) ), 
+      "Invalid intersection point" )
+  }  
+  
+  {
+    /* Y Axis Parallel line 1 Test */
+  
+    TeLine2D line1;
+    line1.add( TeCoord2D( 0, 1 ) );
+    line1.add( TeCoord2D( 0, -1 ) );
+    
+    TeLineSet ls1;
+    ls1.add( line1 );
+    
+    TeLine2D line2;
+    line2.add( TeCoord2D( -1, -1 ) );
+    line2.add( TeCoord2D( 1, 1 ) );
+    
+    TeLineSet ls2;
+    ls2.add( line2 );    
+    
+    TePointSet ps1;
+    TePDIUtils::TeSegSetIntersection( ls1, ls2, ps1 );
+    
+    TEAGN_TRUE_OR_THROW( ( ps1.size() == 1 ), "Invalid point set size" )
+    TEAGN_TRUE_OR_THROW( ( ps1[ 0 ].elem() == TeCoord2D( 0, 0 ) ), 
+      "Invalid intersection point" )
+  }  
+  
+  {
+    /* Y Axis Parallel line 2 Test */
+  
+    TeLine2D line1;
+    line1.add( TeCoord2D( -1, -1 ) );
+    line1.add( TeCoord2D( 1, 1 ) );
+    
+    TeLineSet ls1;
+    ls1.add( line1 );
+    
+    TeLine2D line2;
+    line2.add( TeCoord2D( 0, 1 ) );
+    line2.add( TeCoord2D( 0, -1 ) );
+    
+    TeLineSet ls2;
+    ls2.add( line2 );    
+    
+    TePointSet ps1;
+    TePDIUtils::TeSegSetIntersection( ls1, ls2, ps1 );
+    
+    TEAGN_TRUE_OR_THROW( ( ps1.size() == 1 ), "Invalid point set size" )
+    TEAGN_TRUE_OR_THROW( ( ps1[ 0 ].elem() == TeCoord2D( 0, 0 ) ), 
+      "Invalid intersection point" )
+  }    
+  
+  {
+    /* Y Axis Parallel line 2 and line 2 Test */
+  
+    TeLine2D line1;
+    line1.add( TeCoord2D( 0, 1 ) );
+    line1.add( TeCoord2D( 0, 1 ) );
+    
+    TeLineSet ls1;
+    ls1.add( line1 );
+    
+    TeLine2D line2;
+    line2.add( TeCoord2D( 0, 1 ) );
+    line2.add( TeCoord2D( 0, 1 ) );
+    
+    TeLineSet ls2;
+    ls2.add( line2 );    
+    
+    TePointSet ps1;
+    TePDIUtils::TeSegSetIntersection( ls1, ls2, ps1 );
+    
+    TEAGN_TRUE_OR_THROW( ( ps1.size() == 0 ), "Invalid point set size" )
+  }
+  
+  {
+    /* Parallel lines Test */
+  
+    TeLine2D line1;
+    line1.add( TeCoord2D( -1, 1 ) );
+    line1.add( TeCoord2D( 1, 1 ) );
+    
+    TeLineSet ls1;
+    ls1.add( line1 );
+    
+    TeLine2D line2;
+    line2.add( TeCoord2D( -1, -1 ) );
+    line2.add( TeCoord2D( 1, -1 ) );
+    
+    TeLineSet ls2;
+    ls2.add( line2 );    
+    
+    TePointSet ps1;
+    TePDIUtils::TeSegSetIntersection( ls1, ls2, ps1 );
+    
+    TEAGN_TRUE_OR_THROW( ( ps1.size() == 0 ), "Invalid point set size" )
+  }  
+  
+  {
+    /* Non-intercepted segments Test */
+  
+    TeLine2D line1;
+    line1.add( TeCoord2D( 0, 0 ) );
+    line1.add( TeCoord2D( 2, 2 ) );
+    
+    TeLineSet ls1;
+    ls1.add( line1 );
+    
+    TeLine2D line2;
+    line2.add( TeCoord2D( 1, 0 ) );
+    line2.add( TeCoord2D( 2, 0 ) );
+    
+    TeLineSet ls2;
+    ls2.add( line2 );    
+    
+    TePointSet ps1;
+    TePDIUtils::TeSegSetIntersection( ls1, ls2, ps1 );
+    
+    TEAGN_TRUE_OR_THROW( ( ps1.size() == 0 ), "Invalid point set size" )
+  }  
+  
+}
+
+
+void getBandMinMaxValues_test()
+{
+  TePDITypes::TePDIRasterPtrType RAMRaster;
+  
+  TeRasterParams params;
+  params.nBands( 1 );
+  params.nlines_ = 1;
+  params.ncols_ = 3;
+  params.setDataType( TeUNSIGNEDCHAR, -1 );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( RAMRaster, params, 
+    TePDIUtils::TePDIUtilsAutoMemPol ), "RAM Raster Allocation error" );
+    
+  TEAGN_TRUE_OR_THROW( RAMRaster->setElement( 0, 0, 0.0, 0 ),
+    "setElement error" );
+  TEAGN_TRUE_OR_THROW( RAMRaster->setElement( 1, 0, 1.0, 0 ),
+    "setElement error" );
+  TEAGN_TRUE_OR_THROW( RAMRaster->setElement( 2, 0, 2.0, 0 ),
+    "setElement error" );
+   
+  double min = -1.0;
+  double max = 10.0;
+  TePDIUtils::getBandMinMaxValues( RAMRaster, 0, false, 0, min, max );
+  
+  TEAGN_CHECK_EPS( min, 0.0, 0.0, "invalid min value" )
+  TEAGN_CHECK_EPS( max, 2.0, 0.0, "invalid max value" )
+}
+
+
+void convert2MultiBand_test()
+{
+  TePDITypes::TePDIRasterPtrType RAMRaster;
+  
+  TeRasterParams params;
+  params.nBands( 1 );
+  params.setDataType( TeUNSIGNEDCHAR, -1 );
+  
+  TeProjectionParams projparams;
+  projparams.name = "NoProjection";
+  TeSharedPtr< TeProjection > proj( TeProjectionFactory::make( 
+    projparams ) );          
+  params.projection( proj.nakedPointer() );   
+  
+  params.setNLinesNColumns( 1, 3 );
+  
+  params.setPhotometric( TeRasterParams::TePallete );
+  
+  params.lutr_.push_back( 255 );
+  params.lutg_.push_back( 0 );
+  params.lutb_.push_back( 0 );
+
+  params.lutr_.push_back( 0 );
+  params.lutg_.push_back( 255 );
+  params.lutb_.push_back( 0 );
+  
+  params.lutr_.push_back( 0 );
+  params.lutg_.push_back( 0 );
+  params.lutb_.push_back( 255 );  
+  
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( RAMRaster, params, 
+    TePDIUtils::TePDIUtilsAutoMemPol ), "RAM Raster Allocation error" );
+    
+  TEAGN_TRUE_OR_THROW( RAMRaster->setElement( 0, 0, 0, 0), 
+    "setElement error" );
+  TEAGN_TRUE_OR_THROW( RAMRaster->setElement( 1, 0, 1, 0),
+    "setElement error" );
+  TEAGN_TRUE_OR_THROW( RAMRaster->setElement( 2, 0, 2, 0),
+    "setElement error" );
+    
+  TePDITypes::TePDIRasterPtrType RAMRaster2;
+  
+  TEAGN_TRUE_OR_THROW( TePDIUtils::convert2MultiBand( RAMRaster, true, 
+    RAMRaster2 ), "MultiBand conversion error" );
+    
+  TEAGN_TRUE_OR_THROW( RAMRaster2.isActive(), "Inactive pointer" )
+  TEAGN_TRUE_OR_THROW( ( RAMRaster2->params().nlines_ == 1 ), 
+    "Invalid lines" )
+  TEAGN_TRUE_OR_THROW( ( RAMRaster2->params().ncols_ == 3 ), 
+    "Invalid columns" )
+  TEAGN_TRUE_OR_THROW( ( RAMRaster2->params().nBands() == 3 ), 
+    "Invalid lines" )
+    
+  TEAGN_TRUE_OR_THROW( ( RAMRaster2->params().photometric_[ 0 ] == 
+    TeRasterParams::TeMultiBand ), "Invalid photometric interpretation" )
+  TEAGN_TRUE_OR_THROW( ( RAMRaster2->params().photometric_[ 1 ] == 
+    TeRasterParams::TeMultiBand ), "Invalid photometric interpretation" )
+  TEAGN_TRUE_OR_THROW( ( RAMRaster2->params().photometric_[ 2 ] == 
+    TeRasterParams::TeMultiBand ), "Invalid photometric interpretation" )
+    
+  double value = -1.0;
+  
+  TEAGN_TRUE_OR_THROW( RAMRaster2->getElement( 0,0, value, 0),
+    "getElement error" )
+  TEAGN_CHECK_EPS( value, 255, 0, "wrong value" );
+  
+  TEAGN_TRUE_OR_THROW( RAMRaster2->getElement( 0,0, value, 1),
+    "getElement error" )
+  TEAGN_CHECK_EPS( value, 0, 0, "wrong value" );
+  
+  TEAGN_TRUE_OR_THROW( RAMRaster2->getElement( 0,0, value, 2),
+    "getElement error" )
+  TEAGN_CHECK_EPS( value, 0, 0, "wrong value" );    
+  
+  
+  TEAGN_TRUE_OR_THROW( RAMRaster2->getElement( 1,0, value, 0),
+    "getElement error" )
+  TEAGN_CHECK_EPS( value, 0, 0, "wrong value" );
+  
+  TEAGN_TRUE_OR_THROW( RAMRaster2->getElement( 1,0, value, 1),
+    "getElement error" )
+  TEAGN_CHECK_EPS( value, 255, 0, "wrong value" );
+
+  TEAGN_TRUE_OR_THROW( RAMRaster2->getElement( 1,0, value, 2),
+    "getElement error" )
+  TEAGN_CHECK_EPS( value, 0, 0, "wrong value" );
+  
+  
+  TEAGN_TRUE_OR_THROW( RAMRaster2->getElement( 2,0, value, 0),
+    "getElement error" )
+  TEAGN_CHECK_EPS( value, 0, 0, "wrong value" );
+  
+  TEAGN_TRUE_OR_THROW( RAMRaster2->getElement( 2,0, value, 1),
+    "getElement error" )
+  TEAGN_CHECK_EPS( value, 0, 0, "wrong value" );
+
+  TEAGN_TRUE_OR_THROW( RAMRaster2->getElement( 2,0, value, 2),
+    "getElement error" )
+  TEAGN_CHECK_EPS( value, 255, 0, "wrong value" );
+}
+
+
+void compareGeometryPoints_tests()
+{
+  TePolygonSet ps1;
+  {
+    TeLinearRing lr;
+    lr.add( TeCoord2D( 0, 0 ) );
+    lr.add( TeCoord2D( 1, 0 ) );
+    lr.add( TeCoord2D( 1, 1 ) );
+    lr.add( TeCoord2D( 0, 1 ) );
+    lr.add( TeCoord2D( 0, 0 ) );
+    
+    TePolygon pol;
+    pol.add( lr );
+    
+    ps1.add( pol );
+  }
+  
+  TePolygonSet ps2;
+  {
+    TeLinearRing lr;
+    lr.add( TeCoord2D( 0, 0 ) );
+    lr.add( TeCoord2D( 1, 0 ) );
+    lr.add( TeCoord2D( 1, 1 ) );
+    lr.add( TeCoord2D( 0, 1 ) );
+    lr.add( TeCoord2D( 0, 0 ) );
+    
+    TePolygon pol;
+    pol.add( lr );
+    
+    ps2.add( pol );
+  }  
+  
+  TEAGN_TRUE_OR_THROW( TePDIUtils::compareGeometryPoints( ps1, ps2 ),
+    "Invalid compareGeometryPoints result" )
+}
+
+
+void resampleRaster_test()
+{
+  TePDITypes::TePDIRasterPtrType input_raster;
+  TePDITypes::TePDIRasterPtrType output_raster;
+
+  TeRasterParams input_raster_params;
+  input_raster_params.nBands( 1 );
+  input_raster_params.setDataType( TeDOUBLE, -1 );
+  input_raster_params.setNLinesNColumns( 4, 4 );
+    
+  TeRasterParams output_raster_params;
+  output_raster_params.nBands( 1 );
+  output_raster_params.setDataType( TeDOUBLE, -1 );
+  output_raster_params.setNLinesNColumns( 2, 2 );
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( input_raster, 
+    input_raster_params, TePDIUtils::TePDIUtilsAutoMemPol ), 
+    "RAM Raster Allocation error" );
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( output_raster, 
+    output_raster_params, TePDIUtils::TePDIUtilsAutoMemPol ), 
+    "RAM Raster Allocation error" );
+    
+  TEAGN_TRUE_OR_THROW( input_raster->setElement( 0, 0, 1.0, 0 ),
+    "setElement error" );
+  TEAGN_TRUE_OR_THROW( input_raster->setElement( 1, 0, 1.0, 0 ),
+    "setElement error" );
+  TEAGN_TRUE_OR_THROW( input_raster->setElement( 2, 0, 1.0, 0 ),
+    "setElement error" );
+  TEAGN_TRUE_OR_THROW( input_raster->setElement( 3, 0, 1.0, 0 ),
+    "setElement error" );
+        
+  TEAGN_TRUE_OR_THROW( input_raster->setElement( 0, 1, 1.0, 0 ),
+    "setElement error" );
+  TEAGN_TRUE_OR_THROW( input_raster->setElement( 1, 1, 1.0, 0 ),
+    "setElement error" );    
+  TEAGN_TRUE_OR_THROW( input_raster->setElement( 2, 1, 1.0, 0 ),
+    "setElement error" );  
+  TEAGN_TRUE_OR_THROW( input_raster->setElement( 3, 1, 1.0, 0 ),
+    "setElement error" );       
+
+  TEAGN_TRUE_OR_THROW( input_raster->setElement( 0, 2, 1.0, 0 ),
+    "setElement error" );
+  TEAGN_TRUE_OR_THROW( input_raster->setElement( 1, 2, 1.0, 0 ),
+    "setElement error" );    
+  TEAGN_TRUE_OR_THROW( input_raster->setElement( 2, 2, 1.0, 0 ),
+    "setElement error" );    
+  TEAGN_TRUE_OR_THROW( input_raster->setElement( 3, 2, 1.0, 0 ),
+    "setElement error" ); 
+    
+  TEAGN_TRUE_OR_THROW( input_raster->setElement( 0, 3, 1.0, 0 ),
+    "setElement error" );
+  TEAGN_TRUE_OR_THROW( input_raster->setElement( 1, 3, 1.0, 0 ),
+    "setElement error" );
+  TEAGN_TRUE_OR_THROW( input_raster->setElement( 2, 3, 1.0, 0 ),
+    "setElement error" );
+  TEAGN_TRUE_OR_THROW( input_raster->setElement( 3, 3, 1.0, 0 ),
+    "setElement error" );
+    
+  double resolution_ratio = 2.0;
+  
+  TEAGN_TRUE_OR_THROW( TePDIUtils::resampleRasterByRes( input_raster, 
+    output_raster,
+    resolution_ratio , resolution_ratio, 
+    TePDIInterpolator::NNMethod,
+    true ), 
+    "Raster resample error" )
+  
+  
+  TEAGN_CHECK_EPS( output_raster->params().nlines_, 
+    ( input_raster->params().nlines_ / resolution_ratio ), 0.0, 
+    "invalid number of lines" )
+  TEAGN_CHECK_EPS( output_raster->params().ncols_, 
+    ( input_raster->params().ncols_ / resolution_ratio ), 0.0, 
+    "invalid number of columns" )
+  TEAGN_CHECK_EPS( output_raster->params().resx_, 3, 0.0, 
+    "invalid X resolution" )
+  TEAGN_CHECK_EPS( output_raster->params().resy_, 3, 0.0, 
+    "invalid Y() resolution" )
+  TEAGN_CHECK_EPS( output_raster->params().nBands(), 
+    input_raster->params().nBands(), 0.0, 
+    "invalid bands number" )
+    
+  double value = 0;
+    
+  TEAGN_TRUE_OR_THROW( output_raster->getElement( 0, 0, value, 0 ),
+    "getElement error" )
+  TEAGN_CHECK_EPS( value, 1.0, 0.0, "Incorrect value" )
+  
+  TEAGN_TRUE_OR_THROW( output_raster->getElement( 0, 1, value, 0 ),
+    "getElement error" )
+  TEAGN_CHECK_EPS( value, 1.0, 0.0, "Incorrect value" )
+  
+  TEAGN_TRUE_OR_THROW( output_raster->getElement( 1, 0, value, 0 ),
+    "getElement error" )
+  TEAGN_CHECK_EPS( value, 1.0, 0.0, "Incorrect value" )  
+  
+  TEAGN_TRUE_OR_THROW( output_raster->getElement( 1, 1, value, 0 ),
+    "getElement error" )
+  TEAGN_CHECK_EPS( value, 1.0, 0.0, "Incorrect value" )  
+}
+
+
+int main()
+{
+  TEAGN_LOGMSG( "Test started." );
+
+  try{
+    TeStdIOProgress pi;
+    TeProgress::setProgressInterf( dynamic_cast< TeProgressBase* >( &pi ) );  
+  
+    TeInitRasterDecoders();
+    
+    buildDetailedBox_test();
+    buildDetailedBBox_test();
+    resampleRaster_test();
+    getBandMinMaxValues_test();
+    makeSegmentSet_test();
+    TeSegSetIntersection_test();
+    TeRelation_test();
+    TeAllocRAMRaster_usingparams_test();
+    TeAllocRAMRaster1_test();
+    TeAllocRAMRaster_templateraster_test();
+    raster_compare_test();
+    TeGetRasterMinMaxBounds_test();
+    TeGetRasterReqMem_test();    
+    IsFloatBand_test();
+    TeRaster2Geotiff_test();
+    TeRaster2Geotiff_deprecated_test();
+    TeAllocMemoryMappedRaster_test();
+    convert2MultiBand_test();
+    compareGeometryPoints_tests();
+    reprojectRaster_test();
+    getGeodeticPixelRes_test();
+  }
+  catch( const TeException& e ){
+    TEAGN_LOGERR( "Test Failed - " + e.message() );
+    return EXIT_FAILURE;
+  }
+
+  TEAGN_LOGMSG( "Test OK." );
+  return EXIT_SUCCESS;
+}
diff --git a/examples/image_processing/source/TePDIUtils/TePDIUtils_test.vcproj b/examples/image_processing/source/TePDIUtils/TePDIUtils_test.vcproj
new file mode 100755
index 0000000..13d9b55
--- /dev/null
+++ b/examples/image_processing/source/TePDIUtils/TePDIUtils_test.vcproj
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="TePDIUtils_test"
+	ProjectGUID="{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	RootNamespace="TePDIUtils_test"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="0">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../base;../../../../src/terralib/image_processing;../../../../src/terralib/kernel;../../../../src/tiff"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PDIAGN_ENABLE_STDOUT_LOG"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Debug/terralibpdi/terralibpdi.lib ../../../../Debug/terralib/terralib.lib ../../../../Debug/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Debug/libjpeg/libjpeg.lib ../../../../Debug/shapelib/shapelib.lib user32.lib $(NOINHERIT)"
+				OutputFile="$(OutDir)/TePDIUtils_test.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreAllDefaultLibraries="FALSE"
+				IgnoreDefaultLibraryNames="msvcrt.lib,libcmt.lib;libc.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"
+				TargetMachine="0"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="../../../../src/terralib/image_processing;../base;../../../../src/terralib/kernel;../../../../src/shapelib"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Release/terralibpdi/terralibpdi.lib ../../../../Release/terralib/terralib.lib ../../../../Release/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Release/libjpeg/libjpeg.lib ../../../../Release/shapelib/shapelib.lib"
+				OutputFile="$(OutDir)/TePDIUtils_test.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\TePDIUtils_test.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/image_processing/source/TePDIWavelets/TePDIWavelets.pro b/examples/image_processing/source/TePDIWavelets/TePDIWavelets.pro
new file mode 100755
index 0000000..7fd7ead
--- /dev/null
+++ b/examples/image_processing/source/TePDIWavelets/TePDIWavelets.pro
@@ -0,0 +1,7 @@
+include( ../base/base.pro )
+
+SOURCES += \
+  TePDIWavelets_test.cpp
+
+QMAKE_CLEAN += \
+  ../../bin/Wavelets*.tif
\ No newline at end of file
diff --git a/examples/image_processing/source/TePDIWavelets/TePDIWavelets_test.cpp b/examples/image_processing/source/TePDIWavelets/TePDIWavelets_test.cpp
new file mode 100755
index 0000000..f604e31
--- /dev/null
+++ b/examples/image_processing/source/TePDIWavelets/TePDIWavelets_test.cpp
@@ -0,0 +1,265 @@
+#define TEAGN_ENABLE_STDOUT_LOG
+
+#include <TePDIExamplesBase.hpp>
+
+#include <TePDIMallatWavelets.hpp>
+#include <TeAgnostic.h>
+#include <TePDIUtils.hpp>
+
+#include <TeInitRasterDecoders.h>
+#include <TeProgress.h>
+#include <TeStdIOProgress.h>
+
+
+void Mallat_low_low_swap_test()
+{
+  /* Building rasters */
+
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster, 1, 1, 1, false,
+    TeDOUBLE, 0 ), "RAM Raster Alloc error" );    
+    
+  TePDITypes::TePDIRasterPtrType lowlow;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( lowlow, 1, 1, 1, false,
+    TeDOUBLE, 0 ), "Unable to create temporary low-low raster" );
+    
+ /* Building filters  - Reference coef 07 */
+  
+  std::vector< double > a_filter_l;
+  a_filter_l.push_back( -0.05 );
+  a_filter_l.push_back( 0.25 );
+  a_filter_l.push_back( 0.6 );
+  a_filter_l.push_back( 0.25 );
+  a_filter_l.push_back( -0.05 );
+  
+  std::vector< double > a_filter_h;
+  a_filter_h.push_back( 0.0107143 );
+  a_filter_h.push_back( -0.0535714 );
+  a_filter_h.push_back( -0.2607143 );
+  a_filter_h.push_back( 0.6071429 );
+  a_filter_h.push_back( -0.2607143 );
+  a_filter_h.push_back( -0.0535714 );
+  a_filter_h.push_back( 0.0107143 );
+  
+  std::vector< double > s_filter_l;
+  s_filter_l.push_back( -0.0107143 );
+  s_filter_l.push_back( -0.0535714 );
+  s_filter_l.push_back( 0.2607143 );
+  s_filter_l.push_back( 0.6071429 );
+  s_filter_l.push_back( 0.2607143 );
+  s_filter_l.push_back( -0.0535714 );
+  s_filter_l.push_back( -0.0107143 );
+  
+  std::vector< double > s_filter_h;
+  s_filter_h.push_back( -0.05 );
+  s_filter_h.push_back( -0.25 );
+  s_filter_h.push_back( 0.6 );
+  s_filter_h.push_back( -0.25 );
+  s_filter_h.push_back( -0.05 );  
+  
+  /* Building parameters for the two filters */  
+  
+  TePDIParameters params1;
+  params1.SetParameter( "wavelets_type", std::string( "mallat" ) );
+  params1.SetParameter( "filter_task", std::string( "SBExtract" ) );
+  params1.SetParameter( "input_image", inRaster );
+  params1.SetParameter( "band", (int)0 );
+  params1.SetParameter( "a_filter_l", a_filter_l );
+  params1.SetParameter( "a_filter_h", a_filter_h );
+  params1.SetParameter( "s_filter_l", s_filter_l );
+  params1.SetParameter( "s_filter_h", s_filter_h );
+  params1.SetParameter( "filters_scale", (double)0.71 );         
+  params1.SetParameter( "levels", (int)3 );  
+  params1.SetParameter( "sub_band", lowlow );  
+  params1.SetParameter( "sub_band_index", (int)0 );  
+  
+  TePDIParameters params2;
+  params2.SetParameter( "wavelets_type", std::string( "mallat" ) );
+  params2.SetParameter( "filter_task", std::string( "SBSwap" ) );
+  params2.SetParameter( "input_image", inRaster );
+  params2.SetParameter( "band", (int)0 );
+  params2.SetParameter( "output_image", outRaster );
+  params2.SetParameter( "a_filter_l", a_filter_l );
+  params2.SetParameter( "a_filter_h", a_filter_h );
+  params2.SetParameter( "s_filter_l", s_filter_l );
+  params2.SetParameter( "s_filter_h", s_filter_h );    
+  params2.SetParameter( "filters_scale", (double)0.71 );         
+  params2.SetParameter( "levels", (int)3 );  
+  params2.SetParameter( "sub_band", lowlow ); 
+  params2.SetParameter( "sub_band_index", (int)0 );   
+  
+  /* starting filters */
+  
+  TePDIMallatWavelets filter1;  
+  TEAGN_TRUE_OR_THROW( filter1.Reset( params1 ),
+    "Invalid Parameters1" );
+  TEAGN_TRUE_OR_THROW( filter1.Apply(), "Filter1 apply error" );
+  
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( lowlow,
+    TEPDIEXAMPLESBINPATH "Wavelets_Mallat_llswap_test_lowlow.tif" ), "Low-low GeoTIF generation error" );  
+    
+  TePDIMallatWavelets filter2;  
+  TEAGN_TRUE_OR_THROW( filter2.Reset( params2 ),
+    "Invalid Parameters2" );  
+  TEAGN_TRUE_OR_THROW( filter2.Apply(), "Filter2 apply error" );
+  
+  TEAGN_TRUE_OR_THROW( ( ( outRaster->params().nlines_ ==
+    inRaster->params().nlines_ ) && ( outRaster->params().ncols_ ==
+    inRaster->params().ncols_ ) ), "Invalid output raster dimensions" );  
+  
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "Wavelets_Mallat_llswap_test_recomposed.tif" ), 
+    "Recomposition GeoTIF generation error" );   
+    
+}
+
+
+void Mallat_GetPyramid_and_RecomposePyramid_test()
+{
+  /* Building rasters */
+
+  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
+    std::string( TEPDIEXAMPLESRESPATH "cbers_b2_crop.tif" ), 'r' ) );
+  TEAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( outRaster, 1, 1, 1, false,
+    TeDOUBLE, 0 ), "RAM Raster Alloc error" );    
+    
+ /* Building filters  - Reference coef 07 */
+  
+  std::vector< double > a_filter_l;
+  a_filter_l.push_back( -0.05 );
+  a_filter_l.push_back( 0.25 );
+  a_filter_l.push_back( 0.6 );
+  a_filter_l.push_back( 0.25 );
+  a_filter_l.push_back( -0.05 );
+  
+  std::vector< double > a_filter_h;
+  a_filter_h.push_back( 0.0107143 );
+  a_filter_h.push_back( -0.0535714 );
+  a_filter_h.push_back( -0.2607143 );
+  a_filter_h.push_back( 0.6071429 );
+  a_filter_h.push_back( -0.2607143 );
+  a_filter_h.push_back( -0.0535714 );
+  a_filter_h.push_back( 0.0107143 );
+  
+  std::vector< double > s_filter_l;
+  s_filter_l.push_back( -0.0107143 );
+  s_filter_l.push_back( -0.0535714 );
+  s_filter_l.push_back( 0.2607143 );
+  s_filter_l.push_back( 0.6071429 );
+  s_filter_l.push_back( 0.2607143 );
+  s_filter_l.push_back( -0.0535714 );
+  s_filter_l.push_back( -0.0107143 );
+  
+  std::vector< double > s_filter_h;
+  s_filter_h.push_back( -0.05 );
+  s_filter_h.push_back( -0.25 );
+  s_filter_h.push_back( 0.6 );
+  s_filter_h.push_back( -0.25 );
+  s_filter_h.push_back( -0.05 );  
+  
+  /* Applying filter 1 - Pyramid Generation */
+  
+  TePDITypes::TePDIRasterVectorPtrType pyramid( 
+    new TePDITypes::TePDIRasterVectorType );
+  
+  TePDIParameters params1;
+  params1.SetParameter( "wavelets_type", std::string( "mallat" ) );
+  params1.SetParameter( "filter_task", std::string( "GetPyramid" ) );
+  params1.SetParameter( "input_image", inRaster );
+  params1.SetParameter( "band", (int)0 );
+  params1.SetParameter( "a_filter_l", a_filter_l );
+  params1.SetParameter( "a_filter_h", a_filter_h );
+  params1.SetParameter( "s_filter_l", s_filter_l );
+  params1.SetParameter( "s_filter_h", s_filter_h );
+  params1.SetParameter( "filters_scale", (double)0.71 );         
+  params1.SetParameter( "levels", (int)3 );  
+  params1.SetParameter( "pyramid", pyramid );  
+  
+  TePDIMallatWavelets filter1;  
+  
+  TEAGN_TRUE_OR_THROW( filter1.Reset( params1 ),
+    "Invalid Parameters1" );   
+  TEAGN_TRUE_OR_THROW( filter1.Apply(), "Filter1 apply error" );
+  
+  /* Checking the generated pyramid */
+  
+  TEAGN_TRUE_OR_THROW( pyramid.isActive(), "Inactive generated pyramid" );
+  TEAGN_TRUE_OR_THROW( ( pyramid->size() == 12 ), "Invalid pyramid size" );
+  
+  for( unsigned int py_index = 0 ; py_index < pyramid->size() ; ++py_index ) {
+    TEAGN_TRUE_OR_THROW( (*pyramid)[ py_index ].isActive(),
+      "Inactive pyramid raster found at " + Te2String( py_index ) );
+  
+    TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( 
+      (*pyramid)[ py_index ],
+      TEPDIEXAMPLESBINPATH "Wavelets_Mallat_OutPyramid_index" + Te2String( py_index ) + ".tif" ), 
+      "GeoTIF generation error" );      
+  }
+  
+  /* Applying the second filter - Pyramid Recomposition */
+  
+  TePDIParameters params2;
+  params2.SetParameter( "wavelets_type", std::string( "mallat" ) );
+  params2.SetParameter( "filter_task", std::string( "RecomposePyramid" ) );
+  params2.SetParameter( "input_image", inRaster );
+  params2.SetParameter( "band", (int)0 );
+  params2.SetParameter( "output_image", outRaster );
+  params2.SetParameter( "a_filter_l", a_filter_l );
+  params2.SetParameter( "a_filter_h", a_filter_h );
+  params2.SetParameter( "s_filter_l", s_filter_l );
+  params2.SetParameter( "s_filter_h", s_filter_h );    
+  params2.SetParameter( "filters_scale", (double)0.71 );
+  params2.SetParameter( "pyramid", pyramid );
+  
+  TePDIMallatWavelets filter2;  
+  TEAGN_TRUE_OR_THROW( filter2.Reset( params2 ),
+    "Invalid Parameters2" );  
+  TEAGN_TRUE_OR_THROW( filter2.Apply(), "Filter2 apply error" );
+  
+  TEAGN_TRUE_OR_THROW( ( ( outRaster->params().nlines_ ==
+    inRaster->params().nlines_ ) && ( outRaster->params().ncols_ ==
+    inRaster->params().ncols_ ) ), "Invalid output raster dimensions" );
+  
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
+    TEPDIEXAMPLESBINPATH "Wavelets_Mallat_GetPyramid_and_RecomposePyramid_test.tif" ), 
+    "GeoTIF generation error" );     
+}
+
+
+void TePDIWaveletAtrous_test()
+{
+
+
+};
+
+
+int main()
+{
+  TEAGN_LOGMSG( "Test started." );
+
+  try{
+    TeInitRasterDecoders();
+    
+    TeStdIOProgress pi;
+    TeProgress::setProgressInterf( dynamic_cast< TeProgressBase* >( &pi ) );     
+
+    Mallat_low_low_swap_test();
+    Mallat_GetPyramid_and_RecomposePyramid_test();
+    TePDIWaveletAtrous_test();
+  }
+  catch( const TeException& e ){
+    TEAGN_LOGERR( "Test Failed - " + e.message() );
+    return EXIT_FAILURE;
+  }
+
+  TEAGN_LOGMSG( "Test OK." );
+  return EXIT_SUCCESS;
+}
+
diff --git a/examples/image_processing/source/TePDIWavelets/TePDIWavelets_test.vcproj b/examples/image_processing/source/TePDIWavelets/TePDIWavelets_test.vcproj
new file mode 100755
index 0000000..1ae8224
--- /dev/null
+++ b/examples/image_processing/source/TePDIWavelets/TePDIWavelets_test.vcproj
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="TePDIWavelets_test"
+	ProjectGUID="{D881CFAF-6E61-4842-8ACF-A33287EA5223}"
+	RootNamespace="TePDIWavelets_test"
+	Keyword="Win32Proj">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Debug"
+			ConfigurationType="1"
+			CharacterSet="0">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="../base;../../../../src/terralib/image_processing;../../../../src/terralib/kernel;../../../../src/tiff"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;PDIAGN_ENABLE_STDOUT_LOG"
+				MinimalRebuild="TRUE"
+				BasicRuntimeChecks="0"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="FALSE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Debug/terralibpdi/terralibpdi.lib ../../../../Debug/terralib/terralib.lib ../../../../Debug/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Debug/libjpeg/libjpeg.lib ../../../../Debug/shapelib/shapelib.lib user32.lib $(NOINHERIT)"
+				OutputFile="$(OutDir)/TePDIWavelets_test.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreAllDefaultLibraries="FALSE"
+				IgnoreDefaultLibraryNames="msvcrt.lib,libcmt.lib;libc.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"
+				TargetMachine="0"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\..\bin"
+			IntermediateDirectory="Release"
+			ConfigurationType="1"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="../../../../src/terralib/image_processing;../base;../../../../src/terralib/kernel;../../../../src/shapelib"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				RuntimeLibrary="2"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				Detect64BitPortabilityProblems="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../../../Release/terralibpdi/terralibpdi.lib ../../../../Release/terralib/terralib.lib ../../../../Release/tiff/tiff.lib ../../../../terralibw/zlib/zlibstat.lib ../../../../Release/libjpeg/libjpeg.lib ../../../../Release/shapelib/shapelib.lib"
+				OutputFile="$(OutDir)/TePDIWavelets_test.exe"
+				LinkIncremental="1"
+				GenerateDebugInformation="TRUE"
+				SubSystem="1"
+				OptimizeReferences="2"
+				EnableCOMDATFolding="2"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
+			<File
+				RelativePath=".\TePDIWavelets_test.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/image_processing/source/base/TePDIExamplesBase.hpp b/examples/image_processing/source/base/TePDIExamplesBase.hpp
new file mode 100644
index 0000000..253289f
--- /dev/null
+++ b/examples/image_processing/source/base/TePDIExamplesBase.hpp
@@ -0,0 +1,16 @@
+#ifndef TEPDIEXAMPLESBASE_HPP
+  #define TEPDIEXAMPLESBASE_HPP
+
+  #include "TeDefines.h"
+
+  #if TePLATFORM == TePLATFORMCODE_MSWINDOWS
+    #define TEPDIEXAMPLESRESPATH "..\\..\\resources\\"
+    #define TEPDIEXAMPLESBINPATH "..\\..\\bin\\"
+  #elif TePLATFORM == TePLATFORMCODE_LINUX
+    #define TEPDIEXAMPLESRESPATH "../resources/"
+    #define TEPDIEXAMPLESBINPATH "../bin/"
+  #else
+    #error "ERROR: Unsupported platform"
+  #endif
+
+#endif
diff --git a/examples/image_processing/source/base/base.pro b/examples/image_processing/source/base/base.pro
new file mode 100755
index 0000000..46af4c0
--- /dev/null
+++ b/examples/image_processing/source/base/base.pro
@@ -0,0 +1,42 @@
+
+TERRALIB_PATH = ../../../../
+
+win32 {
+  error( "To compile LibPDI tests you must use the Visual Studio projects of each test" )
+}
+
+CONFIG = qt warn_on debug rtti exceptions
+
+TEMPLATE = app
+
+LANGUAGE = C++
+
+DESTDIR = ../../bin
+
+DEFINES += PDIAGN_DEBUG_MODE
+
+debug {
+  DEFINES += PDIAGN_ENABLE_STDOUT_LOG
+}
+
+INCLUDEPATH = \
+  ../base \
+  $$TERRALIB_PATH/src/tiff \
+  $$TERRALIB_PATH/src/shapelib \
+  $$TERRALIB_PATH/src/terralib/kernel \
+  $$TERRALIB_PATH/src/terralib/functions \
+  $$TERRALIB_PATH/src/terralib/image_processing \
+  $$TERRALIB_PATH/src/terralib/image_processing/data_structs \
+  $$INCLUDEPATH
+
+# Library depencencies
+
+LIBS = -L$$TERRALIB_PATH/terralibx/Debug \
+  -L$$TERRALIB_PATH/terralibx/Release
+LIBS += -ljpeg
+LIBS += -lz
+LIBS += -lterralibtiff 
+LIBS += -lshapelib
+LIBS += -lterralib
+LIBS += -lterralibpdi
+
diff --git a/examples/image_processing/source/source.pro b/examples/image_processing/source/source.pro
new file mode 100755
index 0000000..2958c28
--- /dev/null
+++ b/examples/image_processing/source/source.pro
@@ -0,0 +1,41 @@
+
+TEMPLATE = subdirs
+
+SUBDIRS = \
+          TePDIArithmetic \
+          TePDIBDFilter \
+          TePDIBlending \
+          TePDIClassification \
+          TePDIColorTransform \
+          TePDIContrast \
+          TePDICorrelationMatching \
+          TePDIDecorrelationEnhancement \
+          TePDIFilterMask \
+          TePDIFusion \
+          TePDIHaralick \
+          TePDIHistogram \
+          TePDIInterpolator \
+          TePDIJointHistogram \
+          TePDILinearFilter \
+          TePDIMathFunctions \
+          TePDIMatrix \
+          TePDIMatrixFunctions \
+          TePDIMIMatching \
+          TePDIMixModel \
+          TePDIMMIOMatching \
+          TePDIMorfFilter \
+          TePDIMosaic \
+          TePDIOFMatching \
+          TePDIParameters \
+          TePDIPIManager \
+          TePDIPrincipalComponents \
+          TePDIRadarFilters \
+          TePDIRaster2Vector \ 
+          TePDIRegister \
+          TePDIRgbPalette \
+          TePDISegmentation \
+          TePDISensorSimulator \
+          TePDIStatistic \
+          TePDIUtils \
+          TePDIWavelets
+
diff --git a/examples/importCSV/.cdtproject b/examples/importCSV/.cdtproject
old mode 100644
new mode 100755
diff --git a/examples/importCSV/.project b/examples/importCSV/.project
old mode 100644
new mode 100755
index cf757eb..c3f2cfa
--- a/examples/importCSV/.project
+++ b/examples/importCSV/.project
@@ -14,21 +14,21 @@
 				</dictionary>
 				<dictionary>
 					<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
-					<value>clean all</value>
+					<value>all</value>
 				</dictionary>
 				<dictionary>
 					<key>org.eclipse.cdt.make.core.incrementalBuildTarget</key>
 					<value>all</value>
 				</dictionary>
 				<dictionary>
-					<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
-					<value>false</value>
-				</dictionary>
-				<dictionary>
 					<key>org.eclipse.cdt.make.core.buildLocation</key>
 					<value></value>
 				</dictionary>
 				<dictionary>
+					<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
+					<value>false</value>
+				</dictionary>
+				<dictionary>
 					<key>org.eclipse.cdt.make.core.enableFullBuild</key>
 					<value>true</value>
 				</dictionary>
@@ -53,13 +53,13 @@
 					<value>make</value>
 				</dictionary>
 				<dictionary>
-					<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
-					<value>all</value>
-				</dictionary>
-				<dictionary>
 					<key>org.eclipse.cdt.make.core.stopOnError</key>
 					<value>false</value>
 				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
+					<value>all</value>
+				</dictionary>
 			</arguments>
 		</buildCommand>
 		<buildCommand>
diff --git a/examples/importCSV/Makefile b/examples/importCSV/Makefile
old mode 100644
new mode 100755
index 4276005..9a1bbbe
--- a/examples/importCSV/Makefile
+++ b/examples/importCSV/Makefile
@@ -1,23 +1,31 @@
 all: importCSV
 
-shapelib:
-	cd ../terralibx/shapelib; make
-
-tiff:
-	cd ../terralibx/tiff; make
+debug: importCSV_dbg
 
 terralib:
-	cd ../terralibx/terralib; make
+	cd ../../terralibx/terralib; make
 
-stat:
-	cd ../terralibx/stat; make
+terralib_dbg:
+	cd ../../terralibx/terralib; make debug
 
-importCSV: shapelib tiff terralib stat
+importCSV: terralib
 	qmake -o makeImportCSV importCSV.pro; make -f makeImportCSV
 
+importCSV_dbg: terralib_dbg
+	qmake -o makeImportCSV.debug importCSV.pro TE_PROJECT_TYPE=DEBUG; \
+	make -f makeImportCSV.debug
+
+
 clean:
 	if \
 		test -f makeImportCSV; \
 	then \
 		make -f makeImportCSV distclean; rm -f makeImportCSV; \
+	fi
+
+clean_debug:
+	if \
+		test -f makeImportCSV.debug; \
+	then \
+		make -f makeImportCSV.debug distclean; rm -f makeImportCSV.debug; \
 	fi
\ No newline at end of file
diff --git a/examples/importCSV/importCSV.cpp b/examples/importCSV/importCSV.cpp
old mode 100644
new mode 100755
index 406be61..36f87fa
--- a/examples/importCSV/importCSV.cpp
+++ b/examples/importCSV/importCSV.cpp
@@ -28,18 +28,17 @@ of this library and its documentation.
 	Author: Lubia Vinhas  
 */
 
-#include <TeDatabase.h>
 #include <TeAsciiFile.h>
-#include <TeImportExport.h>
+#include <TeDriverMIDMIF.h>
 #include <TeMySQL.h>
 
 int main()
 {
      // Database server parameters
      string host = "localhost";
-     string dbname = "TerraTeste";
+     string dbname = "DB320RC1";
      string user = "root";
-     string password = "";
+     string password = "vinhas";
 
      // Connect to the database
      TeDatabase* db = new TeMySQL();
@@ -47,134 +46,156 @@ int main()
      {
 		cout << "Error: " << db->errorMessage() << endl << endl;
 		cout << "Press Enter\n";
+		getchar();
 		return 1;
      }
 
-	string filename = "../data/BairrosRecife.MIF";
+	string filename = "../data/BairrosRecife.mif";
+	// Check whether there is a layer with the name BairrosRecife in the database
+	TeLayer *layer = 0;
 	if (db->layerExist("BairrosRecife"))
 	{
-		cout << "Error: layer \"BairrosRecife\" already exists in the database!\n" << endl;
-		db->close();
-		cout << "Press Enter\n";
-		getchar();
-		return 1;
+		cout << "The MID/MIF file was not imported because it was previously\n";
+		cout << "imported into the database!\n\n";
+		if (db->loadLayerSet() == true)
+		{
+			// Get the layer named "BairrosRecife" from the cache
+			TeLayerMap& layerMap = db->layerMap();
+			map<int, TeLayer*>::iterator it;
+			for (it = layerMap.begin(); it != layerMap.end(); ++it)
+			{
+				layer = it->second;
+				if (layer->name() == "BairrosRecife")
+					break;
+			}
+		}
 	}
-
-	// Import the MID/MIF file
-	TeLayer* newLayer = new TeLayer("BairrosRecife", db, 0);
-	// Select the filed ID_ to be the identifier of each neighbourhood
-	if (TeImportMIF(newLayer, filename,"BairrosRecife", "ID_")) 
-		cout << "MID/MIF file imported to the TerraLib database successfully!\n" << endl;
 	else
 	{
-		cout << "Fail to import the MID/MIF file!\n";
-		db->close();
-		cout << "Press Enter\n";
-		getchar();
-		return 1;
-	}
+		// Import the MID/MIF file
+		layer = new TeLayer("BairrosRecife", db, 0);
 
-	// Import the csv file
-	filename = "../data/BairrosRecife2.csv";
-	if (db->tableExist("BairrosRecife2"))
-	{
-		cout << "There is already a table named \"BairrosRecife2\" in the TerraLib database!\n\n";
-		cout << "Press Enter\n";
-		getchar();
-		return 1;
+		// Select the filed ID_ to be the identifier of each neighbourhood
+		if (TeImportMIF(layer, filename,"BairrosRecife", "ID_")) 
+			cout << "MID/MIF file imported to the TerraLib database successfully!\n" << endl;
+		else
+		{
+			cout << "Fail to import the MID/MIF file!\n";
+			db->close();
+			delete db;
+			cout << "Press Enter\n";
+			getchar();
+			return 1;
+		}
 	}
 
-	cout << "Importing a second attribute table from a CSV file...\n";
-
-	// Creates a definition of the columns contained in the CSV file
-	TeAttributeList attList;
-	TeAttribute column1;
-	column1.rep_.name_  = "BAIRRO_ID";
-	column1.rep_.type_ = TeSTRING;
-	column1.rep_.isPrimaryKey_ = true;
-	column1.rep_.numChar_ = 32;
-	attList.push_back(column1);
-
-	TeAttribute column2;
-	column2.rep_.name_  = "ORDEM";
-	column2.rep_.type_ = TeINT;
-	attList.push_back(column2);
-
-
-	TeAttribute column3;
-	column3.rep_.name_  = "NOME";
-	column3.rep_.type_ = TeSTRING;
-	column3.rep_.numChar_ = 32;
-	attList.push_back(column3);
-
-	TeAttribute column4;
-	column4.rep_.name_  = "NOME_PADRAO";
-	column4.rep_.type_ = TeSTRING;
-	column4.rep_.numChar_ = 32;
-	attList.push_back(column4);
-
-	TeTable attTable2("BairrosRecife2",attList, "BAIRRO_ID","BAIRRO_ID", TeAttrStatic);
-	if (!newLayer->createAttributeTable(attTable2))
-	{
-		cout << "Error creating table \"BairrosRecife2\" in the TerraLib database!\n\n";
-		cout << "Press Enter\n";
-		getchar();
-		return 1;
-	}
 
-	TeAsciiFile csvFile(filename);
-	while (csvFile.isNotAtEOF())
+	// Import the csv file as a second attribute table of the layer
+	filename = "../data/BairrosRecife2.csv";
+	if (db->tableExist("BairrosRecife2"))
 	{
-		TeTableRow trow;
-		csvFile.readNStringCSV (trow, 4, ';');
-		if (trow.empty())
-			break;
-
-		csvFile.findNewLine();
-		attTable2.add(trow);
+		cout << "The csv file was not imported because it was previously\n";
+		cout << "imported as an attribute table into the database!\n\n";
 	}
-	if (attTable2.size() > 0)
+	else
 	{
-		if (!newLayer->saveAttributeTable(attTable2))
+		cout << "Importing a second attribute table from a CSV file...\n";
+	
+		// Creates a definition of the columns contained in the CSV file
+		TeAttributeList attList;
+		TeAttribute column1;
+		column1.rep_.name_  = "BAIRRO_ID";
+		column1.rep_.type_ = TeSTRING;
+		column1.rep_.isPrimaryKey_ = true;
+		column1.rep_.numChar_ = 32;
+		attList.push_back(column1);
+	
+		TeAttribute column2;
+		column2.rep_.name_  = "ORDEM";
+		column2.rep_.type_ = TeINT;
+		attList.push_back(column2);
+	
+	
+		TeAttribute column3;
+		column3.rep_.name_  = "NOME";
+		column3.rep_.type_ = TeSTRING;
+		column3.rep_.numChar_ = 32;
+		attList.push_back(column3);
+	
+		TeAttribute column4;
+		column4.rep_.name_  = "NOME_PADRAO";
+		column4.rep_.type_ = TeSTRING;
+		column4.rep_.numChar_ = 32;
+		attList.push_back(column4);
+	
+		TeTable attTable2("BairrosRecife2",attList, "BAIRRO_ID","BAIRRO_ID", TeAttrStatic);
+		if (!layer->createAttributeTable(attTable2))
 		{
-			cout << "Error saving table \"BairrosRecife2\" in the TerraLib database!\n\n";
+			cout << "Fail to create the attribute table from the csv file in the TerraLib database!\n\n";
+			db->close();
+			delete db;
 			cout << "Press Enter\n";
 			getchar();
 			return 1;
 		}
-		attTable2.clear();
-	}
-	cout << "Table successfully imported...\n";
-
-
-/*	TeLayer* recife = new TeLayer("BairrosRecife",db);
-	TeTable attTable2;
-	recife->getAttrTablesByName("BairrosRecife2",attTable2);
+	
+		TeAsciiFile csvFile(filename);
+		while (csvFile.isNotAtEOF())
+		{
+			TeTableRow trow;
+			csvFile.readNStringCSV (trow, 4, ';');
+			if (trow.empty())
+				break;
+	
+			csvFile.findNewLine();
+			attTable2.add(trow);
+		}
 
-	TeView* viewrec = new TeView("Recife",user); 
-	viewrec->projection(recife->projection());
-	if (!db->insertView(viewrec))			// save the view in the database
-	{
-		cout << "Fail to insert the view \"Recide\" into the database: " << db->errorMessage() << endl;
-		db->close();
-		cout << endl << "Press Enter\n";
-		getchar();
-		return 1;
+		if (attTable2.size() > 0)
+		{
+			if (layer->saveAttributeTable(attTable2) == false)
+			{
+				cout << "Fail to save the attribute table generated\n";
+				cout << "through the csv file in the database!\n\n";
+				cout << "Press Enter\n";
+				db->close();
+				delete db;
+				getchar();
+				return 1;
+			}
+			attTable2.clear();
+		}
+		cout << "Table successfully imported!\n";
 	}
-	TeTheme* themerec = new TeTheme("Recife", recife);
-	viewrec->add(themerec);
-	themerec ->addThemeTable(attTable2);
-	themerec->visibleRep(recife->geomRep());
-	if (!themerec ->save() || !themerec ->buildCollection()) 
+
+	// Show some information about the layer associated to the MID/MIF file
+	cout << "Layer: " << layer->name() << ", id: " << layer->id() << endl;
+
+	// Geometries information
+	cout << "Projection: " << layer->projection()->name();              
+	cout << "/" << layer->projection()->datum().name();          
+	TeBox bb = layer->box();
+	char message[255];
+	sprintf(message,"[%.15f,%.15f,%.15f,%.15f]\n",bb.x1_, bb.y1_, bb.x2_, bb.y2_);
+	cout << "\nBounding box: " << message;
+	cout << "Number of polygons: " << layer->nGeometries(TePOLYGONS) << endl;
+	cout << "Number of lines: "    << layer->nGeometries(TeLINES) << endl;
+	cout << "Number of points: "   << layer->nGeometries(TePOINTS) << endl;
+
+	// Information of the Tables of Attributes of the Layer
+	TeAttrTableVector tableVec;
+	layer->getAttrTables(tableVec);
+	cout << "Number of Attribute Tables: " << tableVec.size() << endl;
+	
+	for (unsigned int i = 0; i < tableVec.size(); ++i)
 	{
-		cout << "Error saving theme \' Recife \': ";
-		cout << db->errorMessage() << endl;
-		db->close();
-		return 0;
+		cout << "Attribute Table " << "\"" << tableVec[i].name() << "\": ";
+		cout << layer->nObjects(tableVec[i].name()) << " objects" << endl << endl;
 	}
-	cout << "Theme created ..\n";
-*/
+	
 	db->close();
+	delete db;
+	cout << "Press Enter\n";
 	getchar();
 	return 0;
 }
diff --git a/examples/importCSV/importCSV.dsp b/examples/importCSV/importCSV.dsp
old mode 100644
new mode 100755
index 283ab2c..65302f5
--- a/examples/importCSV/importCSV.dsp
+++ b/examples/importCSV/importCSV.dsp
@@ -42,7 +42,7 @@ RSC=rc.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drive [...]
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\terralibw\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\include" /I "..\..\src [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "NDEBUG"
 # ADD RSC /l 0x416 /d "NDEBUG"
@@ -51,7 +51,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\shapelib\Release\shapelib.lib ..\..\terralibw\freetype\Release\freetype.lib ..\..\terralibw\tiff\Release\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\Postg [...]
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\libpq.lib /nologo /subsystem:console /machine:I386 /out:"../Release/importCSV.exe"
 # SUBTRACT LINK32 /pdb:none
 
 !ELSEIF  "$(CFG)" == "importCSV - Win32 Debug"
@@ -68,7 +68,7 @@ LINK32=link.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terra [...]
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\terralibw\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\include" /I " [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "_DEBUG"
 # ADD RSC /l 0x416 /d "_DEBUG"
@@ -77,7 +77,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\shapelib\Debug\shapelib.lib ..\..\terralibw\freetype\Debug\freetype.lib ..\..\terralibw\tiff\Debug\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\li [...]
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\libpq.lib /nologo /subsystem:console /debug /machine:I386 /out:"../Debug/importCSV.exe" /pdbtype:sept
 # SUBTRACT LINK32 /pdb:none
 
 !ENDIF 
diff --git a/examples/importCSV/importCSV.dsw b/examples/importCSV/importCSV.dsw
old mode 100644
new mode 100755
index 7dc5853..3b6bd0c
--- a/examples/importCSV/importCSV.dsw
+++ b/examples/importCSV/importCSV.dsw
@@ -3,19 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
 
 ###############################################################################
 
-Project: "freetype"="..\..\terralibw\freetype\freetype.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "importCSV"=".\importCSV.dsp" - Package Owner=<4>
+Project: "importCSV"=.\importCSV.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -30,19 +18,7 @@ Package=<4>
 
 ###############################################################################
 
-Project: "shapelib"="..\..\terralibw\shapelib\shapelib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "terralib"="..\..\terralibw\terralib\terralib.dsp" - Package Owner=<4>
+Project: "terralib"=..\..\terralibw\terralib\terralib.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -53,24 +29,6 @@ Package=<4>
     Begin Project Dependency
     Project_Dep_Name freetype
     End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name shapelib
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name tiff
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "tiff"="..\..\terralibw\tiff\tiff.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
 }}}
 
 ###############################################################################
diff --git a/examples/importCSV/importCSV.pro b/examples/importCSV/importCSV.pro
old mode 100644
new mode 100755
index 2b5ff7a..499ea76
--- a/examples/importCSV/importCSV.pro
+++ b/examples/importCSV/importCSV.pro
@@ -1,50 +1,12 @@
-TEMPLATE = app
-TARGET = importCSV
-CONFIG += qt warn_on thread debug rtti exceptions
-LANGUAGE = C++
-
-OBJECTS_DIR = .obj
+include( ../base/base.pro )
 
 SOURCES	+= \
 	importCSV.cpp \
-	../src/terralib/functions/TeImportMIF.cpp \
-	../src/terralib/functions/TeMIFProjection.cpp \
-	../src/terralib/drivers/MySQL/TeMySQL.cpp
+	../../src/terralib/functions/TeImportMIF.cpp \
+	../../src/terralib/functions/TeMIFProjection.cpp \
+	../../src/terralib/drivers/MySQL/TeMySQL.cpp
 
 HEADERS	+= \
-	../src/terralib/functions/TeImportExport.h \
-	../src/terralib/drivers/MySQL/TeMySQL.h
-	
-INCLUDEPATH += \
-	. \
-	.. \
-	../src/terralib/kernel \
-	../src/terralib/application \
-	../src/terralib/functions \
-	../src/terralib/stat \
-	../src/shapelib \
-	../src/zlib \
-	../src/terralib/application/qt \
-	../src/terralib/drivers/MySQL \
-	../src/terralib/drivers/MySQL/include \
-	../src/terralib/drivers/OracleSpatial \
-	../src/terralib/drivers/OracleSpatial/OCI/include \
-	../src/terralib/drivers/PostgreSQL \
-	../src/terralib/drivers/PostgreSQL/includepg 
-
-LIBS += \
-	-L../terralibx/shapelib \
-	-L../terralibx/stat \
-	-L../terralibx/terralib \
-	-L../terralibx/tiff \
-	-L../terralibx/PostgreSQL \
-	-L/usr/local/lib -L/usr/lib -L/usr/lib/mysql -L/usr/local/lib/mysql \
-	-L/usr/local/mysql -L/usr/local/mysql/lib -L. \
-    -lshapelib -lstat -lterralib -ltiff -lmysqlclient -lpq -lcrypt
-
-
-
-
-
-
+	../../src/terralib/functions/TeImportExport.h \
+	../../src/terralib/drivers/MySQL/TeMySQL.h
 
diff --git a/examples/importCSV/importCSV.sln b/examples/importCSV/importCSV.sln
new file mode 100755
index 0000000..8410099
--- /dev/null
+++ b/examples/importCSV/importCSV.sln
@@ -0,0 +1,47 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "importCSV", "importCSV.vcproj", "{AC29CA10-2B75-494F-A370-6767C7AB5FC1}"
+	ProjectSection(ProjectDependencies) = postProject
+		{40917057-E283-4760-B645-D2BA2D7E5A35} = {40917057-E283-4760-B645-D2BA2D7E5A35}
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C} = {BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "terralib", "..\..\terralibw\terralib\terralib.vcproj", "{40917057-E283-4760-B645-D2BA2D7E5A35}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjpeg", "..\..\terralibw\libjpeg\libjpeg.vcproj", "{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tiff", "..\..\terralibw\tiff\tiff.vcproj", "{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		Debug = Debug
+		Release = Release
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.ActiveCfg = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.Build.0 = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.ActiveCfg = Release|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.Build.0 = Release|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Debug.ActiveCfg = Debug|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Debug.Build.0 = Debug|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Release.ActiveCfg = Release|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Release.Build.0 = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.ActiveCfg = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.Build.0 = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.ActiveCfg = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.Build.0 = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.ActiveCfg = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.Build.0 = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.ActiveCfg = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
diff --git a/examples/importCSV/importCSV.vcproj b/examples/importCSV/importCSV.vcproj
new file mode 100755
index 0000000..3b2bf6d
--- /dev/null
+++ b/examples/importCSV/importCSV.vcproj
@@ -0,0 +1,173 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="importCSV"
+	ProjectGUID="{AC29CA10-2B75-494F-A370-6767C7AB5FC1}">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\Debug\"
+			IntermediateDirectory="..\Debug\"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="-Zm200 -GX -w34100 -w34189"
+				Optimization="4"
+				AdditionalIncludeDirectories=".;..;..\..\src\terralib\functions;..\..\src\terralib\kernel;..\..\src\zlib;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include"
+				PreprocessorDefinitions="UNICODE,WIN32"
+				GeneratePreprocessedFile="0"
+				MinimalRebuild="TRUE"
+				ExceptionHandling="TRUE"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				AssemblerListingLocation="..\Debug\"
+				ObjectFile="..\Debug\"
+				ProgramDataBaseFileName=".\"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Debug/terralib/terralib.lib ../../Debug/libjpeg/libjpeg.lib ../../Debug/tiff/tiff.lib ../../Debug/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
+				OutputFile="..\Debug\importCSV.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreDefaultLibraryNames="msvcrt.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				WarningLevel="0"
+				DefaultCharType="0"
+				EnableErrorChecks="1"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\Release\"
+			IntermediateDirectory="..\Release\"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="-Zm200 -GX -w34100 -w34189"
+				Optimization="4"
+				AdditionalIncludeDirectories=".;..;..\..\src\terralib\functions;..\..\src\terralib\kernel;..\..\src\zlib;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include"
+				PreprocessorDefinitions="UNICODE,WIN32"
+				GeneratePreprocessedFile="0"
+				MinimalRebuild="TRUE"
+				ExceptionHandling="TRUE"
+				RuntimeLibrary="2"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				AssemblerListingLocation="..\Debug\"
+				ObjectFile="..\Debug\"
+				ProgramDataBaseFileName=".\"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Release/terralib/terralib.lib ../../Release/libjpeg/libjpeg.lib ../../Release/tiff/tiff.lib ../../Release/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
+				OutputFile="..\Release\importCSV.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				WarningLevel="0"
+				DefaultCharType="0"
+				EnableErrorChecks="1"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath="importCSV.cpp">
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\functions\TeImportMIF.cpp">
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\functions\TeMIFProjection.cpp">
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+			<File
+				RelativePath="..\..\src\terralib\functions\TeMIDMIFDriver.h">
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.h">
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/importDBF/.cdtproject b/examples/importDBF/.cdtproject
old mode 100644
new mode 100755
diff --git a/examples/importDBF/.project b/examples/importDBF/.project
old mode 100644
new mode 100755
diff --git a/examples/importDBF/Makefile b/examples/importDBF/Makefile
old mode 100644
new mode 100755
index f162a62..ff80af4
--- a/examples/importDBF/Makefile
+++ b/examples/importDBF/Makefile
@@ -1,23 +1,37 @@
 all: importDBF
 
-shapelib:
-	cd ../terralibx/shapelib; make
+debug: importDBF_dbg
 
-tiff:
-	cd ../terralibx/tiff; make
+shapelib:
+	cd ../../terralibx/shapelib; make
+	
+shapelib_dbg:
+	cd ../../terralibx/shapelib; make debug
 
 terralib:
-	cd ../terralibx/terralib; make
+	cd ../../terralibx/terralib; make
+	
+terralib_dbg:
+	cd ../../terralibx/terralib; make debug
 
-stat:
-	cd ../terralibx/stat; make
-
-importDBF: shapelib tiff terralib stat
+importDBF: shapelib terralib 
 	qmake -o makeImportDBF importDBF.pro; make -f makeImportDBF
 
+importDBF_dbg: shapelib_dbg terralib_dbg 
+	qmake -o makeImportDBF.debug importDBF.pro TE_PROJECT_TYPE=DEBUG; \
+	make -f makeImportDBF.debug
+
+
 clean:
 	if \
 		test -f makeImportDBF; \
 	then \
 		make -f makeImportDBF distclean; rm -f makeImportDBF; \
+	fi
+	
+clean_debug:
+	if \
+		test -f makeImportDBF.debug; \
+	then \
+		make -f makeImportDBF.debug distclean; rm -f makeImportDBF.debug; \
 	fi
\ No newline at end of file
diff --git a/examples/importDBF/importDBF.cpp b/examples/importDBF/importDBF.cpp
old mode 100644
new mode 100755
index bc66813..bd035a8
--- a/examples/importDBF/importDBF.cpp
+++ b/examples/importDBF/importDBF.cpp
@@ -29,17 +29,16 @@ of this library and its documentation.
 	Author: Lubia Vinhas  
 */
 
-#include <TeDatabase.h>
-#include <TeImportExport.h>
+#include <TeDriverSHPDBF.h>
 #include <TeMySQL.h>
 
 int main()
 {
      // Database server parameters
      string host = "localhost";
-     string dbname = "TerraTeste";
+     string dbname = "DB320RC1";
      string user = "root";
-     string password = "";
+     string password = "vinhas";
 
      // Connect to the database
      TeDatabase* db = new TeMySQL();
@@ -47,28 +46,27 @@ int main()
      {
 		cout << "Error: " << db->errorMessage() << endl << endl;
 		cout << "Press Enter\n";
+		getchar();
 		return 1;
      }
 
 	// Import the dbf file
 	string filename = "../data/SOCEC.dbf";
 	if (db->tableExist("SOCEC"))
-	{
 		cout << "There is already a table named \"SOCEC\" in the TerraLib database!\n\n";
-		cout << "Press Enter\n";
-		getchar();
-		return 1;
-	}
-
-	if (TeImportDBFTable(filename,db)) 
-		cout << "The dbf file \"SOCEC.dbf\" was imported successfully as an external table in the TerraLib database!\n\n";
 	else
 	{
-		db->close();
-		cout << "Fail to import the dbf file!\n";
-		cout << "Press Enter\n";
-		getchar();
-		return 1;
+		if (TeImportDBFTable(filename,db)) 
+			cout << "The dbf file \"SOCEC.dbf\" was imported successfully as an external table in the TerraLib database!\n\n";
+		else
+		{
+			db->close();
+			delete db;
+			cout << "Fail to import the dbf file!\n";
+			cout << "Press Enter\n";
+			getchar();
+			return 1;
+		}
 	}
 
 	TeAttrTableVector tableVec;
@@ -84,6 +82,7 @@ int main()
 	}
 
 	db->close();
+	delete db;
 	cout << "Press Enter\n";
 	getchar();
 	return 0;
diff --git a/examples/importDBF/importDBF.dsp b/examples/importDBF/importDBF.dsp
old mode 100644
new mode 100755
index 08486a4..f687913
--- a/examples/importDBF/importDBF.dsp
+++ b/examples/importDBF/importDBF.dsp
@@ -42,7 +42,7 @@ RSC=rc.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drive [...]
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\terralibw\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\include" /I "..\..\src [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "NDEBUG"
 # ADD RSC /l 0x416 /d "NDEBUG"
@@ -51,7 +51,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\shapelib\Release\shapelib.lib ..\..\terralibw\freetype\Release\freetype.lib ..\..\terralibw\tiff\Release\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\Postg [...]
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\shapelib\Release\shapelib.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\libpq.lib /nologo /subsystem:console /machine:I386 /out:"../Release/importDBF.exe"
 # SUBTRACT LINK32 /pdb:none
 
 !ELSEIF  "$(CFG)" == "importDBF - Win32 Debug"
@@ -68,7 +68,7 @@ LINK32=link.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terra [...]
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\terralibw\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\include" /I " [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "_DEBUG"
 # ADD RSC /l 0x416 /d "_DEBUG"
@@ -77,7 +77,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\shapelib\Debug\shapelib.lib ..\..\terralibw\freetype\Debug\freetype.lib ..\..\terralibw\tiff\Debug\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\li [...]
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\shapelib\Debug\shapelib.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\libpq.lib /nologo /subsystem:console /debug /machine:I386 /out:"../Debug/importDBF [...]
 # SUBTRACT LINK32 /pdb:none
 
 !ENDIF 
diff --git a/examples/importDBF/importDBF.dsw b/examples/importDBF/importDBF.dsw
old mode 100644
new mode 100755
index a11bf9a..4d1a2b1
--- a/examples/importDBF/importDBF.dsw
+++ b/examples/importDBF/importDBF.dsw
@@ -3,19 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
 
 ###############################################################################
 
-Project: "freetype"="..\..\terralibw\freetype\freetype.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "importDBF"=".\importDBF.dsp" - Package Owner=<4>
+Project: "importDBF"=.\importDBF.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -30,7 +18,7 @@ Package=<4>
 
 ###############################################################################
 
-Project: "shapelib"="..\..\terralibw\shapelib\shapelib.dsp" - Package Owner=<4>
+Project: "shapelib"=..\..\terralibw\shapelib\shapelib.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -42,7 +30,7 @@ Package=<4>
 
 ###############################################################################
 
-Project: "terralib"="..\..\terralibw\terralib\terralib.dsp" - Package Owner=<4>
+Project: "terralib"=..\..\terralibw\terralib\terralib.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -56,21 +44,6 @@ Package=<4>
     Begin Project Dependency
     Project_Dep_Name shapelib
     End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name tiff
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "tiff"="..\..\terralibw\tiff\tiff.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
 }}}
 
 ###############################################################################
diff --git a/examples/importDBF/importDBF.pro b/examples/importDBF/importDBF.pro
old mode 100644
new mode 100755
index afdf158..b16bf62
--- a/examples/importDBF/importDBF.pro
+++ b/examples/importDBF/importDBF.pro
@@ -1,49 +1,11 @@
-TEMPLATE = app
-TARGET = importDBF
-CONFIG += qt warn_on thread debug rtti exceptions
-LANGUAGE = C++
-
-OBJECTS_DIR = .obj
+include( ../base/base.pro )
 
 SOURCES	+= \
 	importDBF.cpp \
-	../src/terralib/functions/TeImportDBF.cpp \
-	../src/terralib/drivers/MySQL/TeMySQL.cpp
+	../../src/terralib/drivers/shapelib/TeDriverSHPDBF.cpp \
+	../../src/terralib/drivers/MySQL/TeMySQL.cpp
 
 HEADERS	+= \
-	../src/terralib/functions/TeImportExport.h \
-	../src/terralib/drivers/MySQL/TeMySQL.h
-	
-INCLUDEPATH += \
-	. \
-	.. \
-	../src/terralib/kernel \
-	../src/terralib/application \
-	../src/terralib/functions \
-	../src/terralib/stat \
-	../src/shapelib \
-	../src/zlib \
-	../src/terralib/application/qt \
-	../src/terralib/drivers/MySQL \
-	../src/terralib/drivers/MySQL/include \
-	../src/terralib/drivers/OracleSpatial \
-	../src/terralib/drivers/OracleSpatial/OCI/include \
-	../src/terralib/drivers/PostgreSQL \
-	../src/terralib/drivers/PostgreSQL/includepg 
-
-LIBS += \
-	-L../terralibx/shapelib \
-	-L../terralibx/stat \
-	-L../terralibx/terralib \
-	-L../terralibx/tiff \
-	-L../terralibx/PostgreSQL \
-	-L/usr/local/lib -L/usr/lib -L/usr/lib/mysql -L/usr/local/lib/mysql \
-	-L/usr/local/mysql -L/usr/local/mysql/lib -L. \
-    -lshapelib -lstat -lterralib -ltiff -lmysqlclient -lpq -lcrypt
-
-
-
-
-
-
+	../../src/terralib/drivers/MySQL/TeMySQL.h \
+	../../src/terralib/drivers/shapelib/TeDriverSHPDBF.h 
 
diff --git a/examples/importDBF/importDBF.sln b/examples/importDBF/importDBF.sln
new file mode 100755
index 0000000..b8e123b
--- /dev/null
+++ b/examples/importDBF/importDBF.sln
@@ -0,0 +1,55 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "importDBF", "importDBF.vcproj", "{AC29CA10-2B75-494F-A370-6767C7AB5FC1}"
+	ProjectSection(ProjectDependencies) = postProject
+		{40917057-E283-4760-B645-D2BA2D7E5A35} = {40917057-E283-4760-B645-D2BA2D7E5A35}
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C} = {BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "terralib", "..\..\terralibw\terralib\terralib.vcproj", "{40917057-E283-4760-B645-D2BA2D7E5A35}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjpeg", "..\..\terralibw\libjpeg\libjpeg.vcproj", "{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shapelib", "..\..\terralibw\shapelib\shapelib.vcproj", "{B05EDA25-EDE8-42EA-8431-9C3D13C5072F}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tiff", "..\..\terralibw\tiff\tiff.vcproj", "{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		Debug = Debug
+		Release = Release
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.ActiveCfg = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.Build.0 = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.ActiveCfg = Release|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.Build.0 = Release|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Debug.ActiveCfg = Debug|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Debug.Build.0 = Debug|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Release.ActiveCfg = Release|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Release.Build.0 = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.ActiveCfg = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.Build.0 = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.ActiveCfg = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.Build.0 = Release|Win32
+		{B05EDA25-EDE8-42EA-8431-9C3D13C5072F}.Debug.ActiveCfg = Debug|Win32
+		{B05EDA25-EDE8-42EA-8431-9C3D13C5072F}.Debug.Build.0 = Debug|Win32
+		{B05EDA25-EDE8-42EA-8431-9C3D13C5072F}.Release.ActiveCfg = Release|Win32
+		{B05EDA25-EDE8-42EA-8431-9C3D13C5072F}.Release.Build.0 = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.ActiveCfg = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.Build.0 = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.ActiveCfg = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
diff --git a/examples/importDBF/importDBF.vcproj b/examples/importDBF/importDBF.vcproj
new file mode 100755
index 0000000..9054a97
--- /dev/null
+++ b/examples/importDBF/importDBF.vcproj
@@ -0,0 +1,170 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="importDBF"
+	ProjectGUID="{AC29CA10-2B75-494F-A370-6767C7AB5FC1}">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\Debug\"
+			IntermediateDirectory="..\Debug\"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="-Zm200 -GX -w34100 -w34189"
+				Optimization="4"
+				AdditionalIncludeDirectories=".;..;..\..\src\terralib\kernel;..\..\src\zlib;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include;..\..\src\shapelib;..\..\src\terralib\drivers\shapelib"
+				PreprocessorDefinitions="UNICODE,WIN32"
+				GeneratePreprocessedFile="0"
+				MinimalRebuild="TRUE"
+				ExceptionHandling="TRUE"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				AssemblerListingLocation="..\Debug\"
+				ObjectFile="..\Debug\"
+				ProgramDataBaseFileName=".\"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Debug/terralib/terralib.lib ../../Debug/libjpeg/libjpeg.lib ../../Debug/tiff/tiff.lib ../../Debug/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
+				OutputFile="..\Debug\importDBF.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreDefaultLibraryNames="msvcrt.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				WarningLevel="0"
+				DefaultCharType="0"
+				EnableErrorChecks="1"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\Release\"
+			IntermediateDirectory="..\Release\"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="-Zm200 -GX -w34100 -w34189"
+				Optimization="4"
+				AdditionalIncludeDirectories=".;..;..\..\src\terralib\kernel;..\..\src\zlib;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include;..\..\src\terralib\drivers\shapelib;..\..\src\shapelib"
+				PreprocessorDefinitions="UNICODE,WIN32"
+				GeneratePreprocessedFile="0"
+				MinimalRebuild="TRUE"
+				ExceptionHandling="TRUE"
+				RuntimeLibrary="2"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				AssemblerListingLocation="..\Debug\"
+				ObjectFile="..\Debug\"
+				ProgramDataBaseFileName=".\"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Release/terralib/terralib.lib ../../Release/libjpeg/libjpeg.lib ../../Release/tiff/tiff.lib ../../Release/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
+				OutputFile="..\Release\importDBF.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				WarningLevel="0"
+				DefaultCharType="0"
+				EnableErrorChecks="1"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath="importDBF.cpp">
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\drivers\shapelib\TeDriverSHPDBF.cpp">
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.h">
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\drivers\shapelib\TeSHPDBFDriver.h">
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/importGeoTab/.cdtproject b/examples/importGeoTab/.cdtproject
old mode 100644
new mode 100755
diff --git a/examples/importGeoTab/.project b/examples/importGeoTab/.project
old mode 100644
new mode 100755
index d7dfca9..2929acd
--- a/examples/importGeoTab/.project
+++ b/examples/importGeoTab/.project
@@ -14,21 +14,21 @@
 				</dictionary>
 				<dictionary>
 					<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
-					<value>clean all</value>
+					<value>all</value>
 				</dictionary>
 				<dictionary>
 					<key>org.eclipse.cdt.make.core.incrementalBuildTarget</key>
 					<value>all</value>
 				</dictionary>
 				<dictionary>
-					<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
-					<value>false</value>
-				</dictionary>
-				<dictionary>
 					<key>org.eclipse.cdt.make.core.buildLocation</key>
 					<value></value>
 				</dictionary>
 				<dictionary>
+					<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
+					<value>false</value>
+				</dictionary>
+				<dictionary>
 					<key>org.eclipse.cdt.make.core.enableFullBuild</key>
 					<value>true</value>
 				</dictionary>
@@ -49,17 +49,21 @@
 					<value>true</value>
 				</dictionary>
 				<dictionary>
-					<key>org.eclipse.cdt.make.core.buildCommand</key>
-					<value>make</value>
+					<key>org.eclipse.cdt.make.core.buildArguments</key>
+					<value>all</value>
 				</dictionary>
 				<dictionary>
-					<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
-					<value>all</value>
+					<key>org.eclipse.cdt.make.core.buildCommand</key>
+					<value>make</value>
 				</dictionary>
 				<dictionary>
 					<key>org.eclipse.cdt.make.core.stopOnError</key>
 					<value>false</value>
 				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
+					<value>all</value>
+				</dictionary>
 			</arguments>
 		</buildCommand>
 		<buildCommand>
diff --git a/examples/importGeoTab/Makefile b/examples/importGeoTab/Makefile
old mode 100644
new mode 100755
index 4815ebf..fe860cd
--- a/examples/importGeoTab/Makefile
+++ b/examples/importGeoTab/Makefile
@@ -1,23 +1,30 @@
 all: importGeoTab
 
-shapelib:
-	cd ../terralibx/shapelib; make
-
-tiff:
-	cd ../terralibx/tiff; make
+debug: importGeoTab_dbg
 
 terralib:
-	cd ../terralibx/terralib; make
-
-stat:
-	cd ../terralibx/stat; make
+	cd ../../terralibx/terralib; make
 
-importGeoTab: shapelib tiff terralib stat
+terralib_dbg:
+	cd ../../terralibx/terralib; make debug
+	
+importGeoTab: terralib
 	qmake -o makeImportGeoTab importGeoTab.pro; make -f makeImportGeoTab
 
+importGeoTab_dbg: terralib_dbg
+	qmake -o makeImportGeoTab.debug importGeoTab.pro TE_PROJECT_TYPE=DEBUG; \
+	make -f makeImportGeoTab.debug
+
 clean:
 	if \
 		test -f makeImportGeoTab; \
 	then \
 		make -f makeImportGeoTab distclean; rm -f makeImportGeoTab; \
+	fi
+	
+clean_debug:
+	if \
+		test -f makeImportGeoTab.debug; \
+	then \
+		make -f makeImportGeoTab.debug distclean; rm -f makeImportGeoTab.debug; \
 	fi
\ No newline at end of file
diff --git a/examples/importGeoTab/importGeoTab.cpp b/examples/importGeoTab/importGeoTab.cpp
old mode 100644
new mode 100755
index 912c89a..76431d2
--- a/examples/importGeoTab/importGeoTab.cpp
+++ b/examples/importGeoTab/importGeoTab.cpp
@@ -28,17 +28,16 @@ of this library and its documentation.
 	Author: Lubia Vinhas  
 */
 
-#include <TeDatabase.h>
-#include <TeImportExport.h>
+#include <TeDriverSPRING.h>
 #include <TeMySQL.h>
 
 int main()
 {
 	// Datatabase server parameters
 	string host = "localhost";
-	string dbname = "TerraTeste";
+	string dbname = "DB320RC1";
 	string user = "root";
-	string password = "";
+	string password = "vinhas";
 
 	// Connect to the database
 	TeDatabase* db = new TeMySQL();
@@ -53,45 +52,57 @@ int main()
 	// Import the SPRING geo file
 	string filename = "../data/Cadastro_Escolas.geo";
 	string layerName = "Cadastro_Escolas";
+	TeLayer* layer = 0;
 	if (db->layerExist(layerName))
 	{
 		cout << "There is already a layer named \"Cadastro_Escolas\" in the TerraLib database!\n\n";
-		db->close();
-		cout << "Press Enter\n";
-		getchar();
-		return 1;
+		if (db->loadLayerSet() == true)
+		{
+			// Get the layer named "Cadastro_Escolas" from the cache
+			TeLayerMap& layerMap = db->layerMap();
+			map<int, TeLayer*>::iterator it;
+			for (it = layerMap.begin(); it != layerMap.end(); ++it)
+			{
+				layer = it->second;
+				if (layer->name() == layerName)
+					break;
+			}
+		}
 	}
-
-	TeLayer* newLayer = new TeLayer(layerName, db);
-	if (TeImportGEO(newLayer, filename, layerName)) 
-		cout << "The SPRING GEO/TAB file was imported successfully to the TerraLib database!\n\n";
 	else
 	{
-		cout << "Fail to import the SPRING GEO/TAB file!\n\n";
-		db->close();
-		cout << "Press Enter\n";
-		getchar();
-		return 1;
+		layer = new TeLayer(layerName, db);
+		if (TeImportGEO(layer, filename, layerName)) 
+			cout << "The SPRING GEO/TAB file was imported successfully to the TerraLib database!\n\n";
+		else
+		{
+			cout << "Fail to import the SPRING GEO/TAB file!\n\n";
+			db->close();
+			delete db;
+			cout << "Press Enter\n";
+			getchar();
+			return 1;
+		}
 	}
 
 	// Show some information about the new layer created
-	cout << "Layer created: " << newLayer->name() << ", id: " << newLayer->id() << endl;
+	cout << "Layer created: " << layer->name() << ", id: " << layer->id() << endl;
 
 	// Geometries information
-	cout << "Projection: " << newLayer->projection()->name();              
-	cout << "/" << newLayer->projection()->datum().name();          
+	cout << "Projection: " << layer->projection()->name();              
+	cout << "/" << layer->projection()->datum().name();          
 
-	TeBox bb = newLayer->box();
+	TeBox bb = layer->box();
 	char message[255];
 	sprintf(message, "[%.15f,%.15f,%.15f,%.15f]\n",bb.x1_, bb.y1_, bb.x2_, bb.y2_);
 	cout << "\nBounding box: " << message;
-	cout << "Number of polygons: " << newLayer->nGeometries(TePOLYGONS) << endl;
-	cout << "Number of lines: "    << newLayer->nGeometries(TeLINES) << endl;
-	cout << "Number of points: "   << newLayer->nGeometries(TePOINTS) << endl;
+	cout << "Number of polygons: " << layer->nGeometries(TePOLYGONS) << endl;
+	cout << "Number of lines: "    << layer->nGeometries(TeLINES) << endl;
+	cout << "Number of points: "   << layer->nGeometries(TePOINTS) << endl;
 
 	// Attributes information
 	TeAttrTableVector tableVec;
-	newLayer->getAttrTables(tableVec);
+	layer->getAttrTables(tableVec);
 	cout << "Attribute tables: " << tableVec.size() << endl;
 	if (tableVec.size() > 0)
 	{
@@ -99,14 +110,16 @@ int main()
 		while (it != tableVec.end())
 		{
 			cout << (*it).name() << ": ";
-			cout << newLayer->nObjects((*it).name()) << " objects\n" << endl;
+			cout << layer->nObjects((*it).name()) << " objects\n" << endl;
 			++it;
 		}
 	}
 
 	db->close();
+	delete db;
 	cout << "\nPress Enter";
 	getchar();
 	return 0;
 }
+
  
diff --git a/examples/importGeoTab/importGeoTab.dsp b/examples/importGeoTab/importGeoTab.dsp
old mode 100644
new mode 100755
index 6b70154..7ef85ea
--- a/examples/importGeoTab/importGeoTab.dsp
+++ b/examples/importGeoTab/importGeoTab.dsp
@@ -42,7 +42,7 @@ RSC=rc.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drive [...]
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\terralibw\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\include" /I "..\..\src [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "NDEBUG"
 # ADD RSC /l 0x416 /d "NDEBUG"
@@ -51,7 +51,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\shapelib\Release\shapelib.lib ..\..\terralibw\freetype\Release\freetype.lib ..\..\terralibw\tiff\Release\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\Postg [...]
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\libpq.lib /nologo /subsystem:console /machine:I386 /out:"../Release/importGeoTab.exe"
 # SUBTRACT LINK32 /pdb:none
 
 !ELSEIF  "$(CFG)" == "importGeoTab - Win32 Debug"
@@ -68,7 +68,7 @@ LINK32=link.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terra [...]
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\terralibw\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\include" /I " [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "_DEBUG"
 # ADD RSC /l 0x416 /d "_DEBUG"
@@ -77,7 +77,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\shapelib\Debug\shapelib.lib ..\..\terralibw\freetype\Debug\freetype.lib ..\..\terralibw\tiff\Debug\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\li [...]
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\libpq.lib /nologo /subsystem:console /debug /machine:I386 /out:"../Debug/importGeoTab.exe" /pdbtype:sept
 # SUBTRACT LINK32 /pdb:none
 
 !ENDIF 
diff --git a/examples/importGeoTab/importGeoTab.dsw b/examples/importGeoTab/importGeoTab.dsw
old mode 100644
new mode 100755
index 455b992..06a1970
--- a/examples/importGeoTab/importGeoTab.dsw
+++ b/examples/importGeoTab/importGeoTab.dsw
@@ -3,19 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
 
 ###############################################################################
 
-Project: "freetype"="..\..\terralibw\freetype\freetype.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "importGeoTab"=".\importGeoTab.dsp" - Package Owner=<4>
+Project: "importGeoTab"=.\importGeoTab.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -30,19 +18,7 @@ Package=<4>
 
 ###############################################################################
 
-Project: "shapelib"="..\..\terralibw\shapelib\shapelib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "terralib"="..\..\terralibw\terralib\terralib.dsp" - Package Owner=<4>
+Project: "terralib"=..\..\terralibw\terralib\terralib.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -53,24 +29,6 @@ Package=<4>
     Begin Project Dependency
     Project_Dep_Name freetype
     End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name shapelib
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name tiff
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "tiff"="..\..\terralibw\tiff\tiff.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
 }}}
 
 ###############################################################################
diff --git a/examples/importGeoTab/importGeoTab.pro b/examples/importGeoTab/importGeoTab.pro
old mode 100644
new mode 100755
index 32f31f5..1b35640
--- a/examples/importGeoTab/importGeoTab.pro
+++ b/examples/importGeoTab/importGeoTab.pro
@@ -1,49 +1,11 @@
-TEMPLATE = app
-TARGET = importGeoTab
-CONFIG += qt warn_on thread debug rtti exceptions
-LANGUAGE = C++
-
-OBJECTS_DIR = .obj
+include( ../base/base.pro )
 
 SOURCES	+= \
 	importGeoTab.cpp \
-	../src/terralib/functions/TeImportGeo.cpp \
-	../src/terralib/drivers/MySQL/TeMySQL.cpp
+	../../src/terralib/functions/TeImportGeo.cpp \
+	../../src/terralib/drivers/MySQL/TeMySQL.cpp
 
 HEADERS	+= \
-	../src/terralib/functions/TeImportExport.h \
-	../src/terralib/drivers/MySQL/TeMySQL.h
+	../../src/terralib/functions/TeImportExport.h \
+	../../src/terralib/drivers/MySQL/TeMySQL.h
 	
-INCLUDEPATH += \
-	. \
-	.. \
-	../src/terralib/kernel \
-	../src/terralib/application \
-	../src/terralib/functions \
-	../src/terralib/stat \
-	../src/shapelib \
-	../src/zlib \
-	../src/terralib/application/qt \
-	../src/terralib/drivers/MySQL \
-	../src/terralib/drivers/MySQL/include \
-	../src/terralib/drivers/OracleSpatial \
-	../src/terralib/drivers/OracleSpatial/OCI/include \
-	../src/terralib/drivers/PostgreSQL \
-	../src/terralib/drivers/PostgreSQL/includepg 
-
-LIBS += \
-	-L../terralibx/shapelib \
-	-L../terralibx/stat \
-	-L../terralibx/terralib \
-	-L../terralibx/tiff \
-	-L../terralibx/PostgreSQL \
-	-L/usr/local/lib -L/usr/lib -L/usr/lib/mysql -L/usr/local/lib/mysql \
-	-L/usr/local/mysql -L/usr/local/mysql/lib -L. \
-    -lshapelib -lstat -lterralib -ltiff -lmysqlclient -lpq -lcrypt
-
-
-
-
-
-
-
diff --git a/examples/importGeoTab/importGeoTab.sln b/examples/importGeoTab/importGeoTab.sln
new file mode 100755
index 0000000..3142564
--- /dev/null
+++ b/examples/importGeoTab/importGeoTab.sln
@@ -0,0 +1,47 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "importGeoTab", "importGeoTab.vcproj", "{AC29CA10-2B75-494F-A370-6767C7AB5FC1}"
+	ProjectSection(ProjectDependencies) = postProject
+		{40917057-E283-4760-B645-D2BA2D7E5A35} = {40917057-E283-4760-B645-D2BA2D7E5A35}
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C} = {BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "terralib", "..\..\terralibw\terralib\terralib.vcproj", "{40917057-E283-4760-B645-D2BA2D7E5A35}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjpeg", "..\..\terralibw\libjpeg\libjpeg.vcproj", "{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tiff", "..\..\terralibw\tiff\tiff.vcproj", "{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		Debug = Debug
+		Release = Release
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.ActiveCfg = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.Build.0 = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.ActiveCfg = Release|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.Build.0 = Release|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Debug.ActiveCfg = Debug|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Debug.Build.0 = Debug|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Release.ActiveCfg = Release|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Release.Build.0 = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.ActiveCfg = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.Build.0 = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.ActiveCfg = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.Build.0 = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.ActiveCfg = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.Build.0 = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.ActiveCfg = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
diff --git a/examples/importGeoTab/importGeoTab.vcproj b/examples/importGeoTab/importGeoTab.vcproj
new file mode 100755
index 0000000..c25c884
--- /dev/null
+++ b/examples/importGeoTab/importGeoTab.vcproj
@@ -0,0 +1,170 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="importGeoTab"
+	ProjectGUID="{AC29CA10-2B75-494F-A370-6767C7AB5FC1}">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\Debug\"
+			IntermediateDirectory="..\Debug\"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="-Zm200 -GX -w34100 -w34189"
+				Optimization="4"
+				AdditionalIncludeDirectories=".;..;..\..\src\terralib\functions;..\..\src\terralib\kernel;..\..\src\zlib;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include"
+				PreprocessorDefinitions="UNICODE,WIN32"
+				GeneratePreprocessedFile="0"
+				MinimalRebuild="TRUE"
+				ExceptionHandling="TRUE"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				AssemblerListingLocation="..\Debug\"
+				ObjectFile="..\Debug\"
+				ProgramDataBaseFileName=".\"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Debug/terralib/terralib.lib ../../Debug/libjpeg/libjpeg.lib ../../Debug/tiff/tiff.lib ../../Debug/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
+				OutputFile="..\Debug\importGeoTab.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreDefaultLibraryNames="msvcrt.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				WarningLevel="0"
+				DefaultCharType="0"
+				EnableErrorChecks="1"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\Release\"
+			IntermediateDirectory="..\Release\"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="-Zm200 -GX -w34100 -w34189"
+				Optimization="4"
+				AdditionalIncludeDirectories=".;..;..\..\src\terralib\functions;..\..\src\terralib\kernel;..\..\src\zlib;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include"
+				PreprocessorDefinitions="UNICODE,WIN32"
+				GeneratePreprocessedFile="0"
+				MinimalRebuild="TRUE"
+				ExceptionHandling="TRUE"
+				RuntimeLibrary="2"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				AssemblerListingLocation="..\Debug\"
+				ObjectFile="..\Debug\"
+				ProgramDataBaseFileName=".\"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Release/terralib/terralib.lib ../../Release/libjpeg/libjpeg.lib ../../Release/tiff/tiff.lib ../../Release/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
+				OutputFile="..\Release\importGeoTab.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				WarningLevel="0"
+				DefaultCharType="0"
+				EnableErrorChecks="1"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath="importGeoTab.cpp">
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\functions\TeImportGeo.cpp">
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.h">
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\functions\TeSPRINGDriver.h">
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/importGridData/.cdtproject b/examples/importGridData/.cdtproject
old mode 100644
new mode 100755
diff --git a/examples/importGridData/.project b/examples/importGridData/.project
old mode 100644
new mode 100755
index 741d1e9..ba03547
--- a/examples/importGridData/.project
+++ b/examples/importGridData/.project
@@ -14,21 +14,21 @@
 				</dictionary>
 				<dictionary>
 					<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
-					<value>clean all</value>
+					<value>all</value>
 				</dictionary>
 				<dictionary>
 					<key>org.eclipse.cdt.make.core.incrementalBuildTarget</key>
 					<value>all</value>
 				</dictionary>
 				<dictionary>
-					<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
-					<value>false</value>
-				</dictionary>
-				<dictionary>
 					<key>org.eclipse.cdt.make.core.buildLocation</key>
 					<value></value>
 				</dictionary>
 				<dictionary>
+					<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
+					<value>false</value>
+				</dictionary>
+				<dictionary>
 					<key>org.eclipse.cdt.make.core.enableFullBuild</key>
 					<value>true</value>
 				</dictionary>
@@ -53,13 +53,13 @@
 					<value>make</value>
 				</dictionary>
 				<dictionary>
-					<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
-					<value>all</value>
-				</dictionary>
-				<dictionary>
 					<key>org.eclipse.cdt.make.core.stopOnError</key>
 					<value>false</value>
 				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
+					<value>all</value>
+				</dictionary>
 			</arguments>
 		</buildCommand>
 		<buildCommand>
diff --git a/examples/importGridData/Makefile b/examples/importGridData/Makefile
old mode 100644
new mode 100755
index 5ae7cbe..4922ebd
--- a/examples/importGridData/Makefile
+++ b/examples/importGridData/Makefile
@@ -1,23 +1,31 @@
 all: importGridData
 
-shapelib:
-	cd ../terralibx/shapelib; make
-
-tiff:
-	cd ../terralibx/tiff; make
+debug: importGridData_dbg
 
 terralib:
-	cd ../terralibx/terralib; make
+	cd ../../terralibx/terralib; make
 
-stat:
-	cd ../terralibx/stat; make
+terralib_dbg:
+	cd ../../terralibx/terralib; make debug
 
-importGridData: shapelib tiff terralib stat
+importGridData: terralib
 	qmake -o makeImportGridData importGridData.pro; make -f makeImportGridData
 
+importGridData_dbg: terralib_dbg
+	qmake -o makeImportGridData.debug importGridData.pro TE_PROJECT_TYPE=DEBUG; \
+	make -f makeImportGridData.debug
+
+
 clean:
 	if \
 		test -f makeImportGridData; \
 	then \
 		make -f makeImportGridData distclean; rm -f makeImportGridData; \
+	fi
+	
+clean_debug:
+	if \
+		test -f makeImportGridData.debug; \
+	then \
+		make -f makeImportGridData.debug distclean; rm -f makeImportGridData.debug; \
 	fi
\ No newline at end of file
diff --git a/examples/importGridData/importGridData.cpp b/examples/importGridData/importGridData.cpp
old mode 100644
new mode 100755
index f9d6245..24b51f2
--- a/examples/importGridData/importGridData.cpp
+++ b/examples/importGridData/importGridData.cpp
@@ -31,13 +31,15 @@ of this library and its documentation.
 
 #include <TeDatabase.h>
 #include <TeMySQL.h>
-#include <TeInitRasterDecoders.h>
+#include <TeDecoderMemoryMap.h>
 #include <TeImportRaster.h>
 
 int main()
 {
 	// Initialize the raster decoder tool
-	TeInitRasterDecoders();
+	static TeDecoderMemoryMapFactory theDecoderMemoryMapFactory("MEMMAP");
+	TeDecoderFactory::instanceName2Dec()["raw"]  = "MEMMAP";	
+	TeDecoderFactory::instanceName2Dec()["RAW"]  = "MEMMAP";	
 
 	TeRasterParams parRaw;
 	parRaw.nBands(1);
@@ -60,9 +62,9 @@ int main()
 
  	// Datatabase server parameters
 	string host = "localhost";
-	string dbname = "TerraTeste";
+	string dbname = "DB320RC1";
 	string user = "root";
-	string password = "";
+	string password = "vinhas";
 	TeDatabase* db = new TeMySQL();
 	if (!db->connect(host, user, password, dbname))
 	{
@@ -81,6 +83,7 @@ int main()
 		cout << "The database already has an infolayer with the name \"";
 		cout << layerName << "\"!" << endl << endl;
 		db->close();
+		delete db;
 		cout << "Press Enter\n";
 		getchar();
 		return 1;
@@ -92,6 +95,7 @@ int main()
 	{
 		elev.clear();
 		db->close();
+		delete db;
 		cout << "The destination layer could not be created!\n" << db->errorMessage() << endl << endl;
 		cout << "Press Enter\n";
 		getchar();
@@ -103,6 +107,7 @@ int main()
 	{
 		elev.clear();
 		db->close();
+		delete db;
 		cout << "Fail to import grid!\n" << endl;
 		cout << "Press Enter\n";
 		getchar();
@@ -111,6 +116,7 @@ int main()
 
 	// Close database
 	db->close();
+	delete db;
 	cout << "The GRID data was imported successfully into the TerraLib database!\n\n";
 	cout << "Press Enter\n";
 	getchar();
diff --git a/examples/importGridData/importGridData.dsp b/examples/importGridData/importGridData.dsp
old mode 100644
new mode 100755
index 1562c1e..548b67d
--- a/examples/importGridData/importGridData.dsp
+++ b/examples/importGridData/importGridData.dsp
@@ -42,7 +42,7 @@ RSC=rc.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drive [...]
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\include" /I [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "NDEBUG"
 # ADD RSC /l 0x416 /d "NDEBUG"
@@ -51,7 +51,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\shapelib\Release\shapelib.lib ..\..\terralibw\freetype\Release\freetype.lib ..\..\terralibw\tiff\Release\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\Postg [...]
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\libpq.lib ..\..\terralibw\tiff\Release\tiff.lib /nologo /subsystem:console /machine:I386 /out:"../Release/importGridData.exe"
 # SUBTRACT LINK32 /pdb:none
 
 !ELSEIF  "$(CFG)" == "importGridData - Win32 Debug"
@@ -68,7 +68,7 @@ LINK32=link.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terra [...]
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\terralibw\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\include" /I " [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "_DEBUG"
 # ADD RSC /l 0x416 /d "_DEBUG"
@@ -77,7 +77,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\shapelib\Debug\shapelib.lib ..\..\terralibw\freetype\Debug\freetype.lib ..\..\terralibw\tiff\Debug\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\li [...]
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\libpq.lib ..\..\terralibw\tiff\Debug\tiff.lib /nologo /subsystem:console /debug /machine:I386 /out:"../Debug/importGridData.ex [...]
 # SUBTRACT LINK32 /pdb:none
 
 !ENDIF 
diff --git a/examples/importGridData/importGridData.dsw b/examples/importGridData/importGridData.dsw
old mode 100644
new mode 100755
index 3ec0c83..87da046
--- a/examples/importGridData/importGridData.dsw
+++ b/examples/importGridData/importGridData.dsw
@@ -3,19 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
 
 ###############################################################################
 
-Project: "freetype"="..\..\terralibw\freetype\freetype.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "importGridData"=".\importGridData.dsp" - Package Owner=<4>
+Project: "importGridData"=.\importGridData.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -26,23 +14,14 @@ Package=<4>
     Begin Project Dependency
     Project_Dep_Name terralib
     End Project Dependency
+    Begin Project Dependency
+    Project_Dep_Name tiff
+    End Project Dependency
 }}}
 
 ###############################################################################
 
-Project: "shapelib"="..\..\terralibw\shapelib\shapelib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "terralib"="..\..\terralibw\terralib\terralib.dsp" - Package Owner=<4>
+Project: "terralib"=..\..\terralibw\terralib\terralib.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -53,17 +32,11 @@ Package=<4>
     Begin Project Dependency
     Project_Dep_Name freetype
     End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name shapelib
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name tiff
-    End Project Dependency
 }}}
 
 ###############################################################################
 
-Project: "tiff"="..\..\terralibw\tiff\tiff.dsp" - Package Owner=<4>
+Project: "tiff"=..\..\terralibw\tiff\tiff.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
diff --git a/examples/importGridData/importGridData.pro b/examples/importGridData/importGridData.pro
old mode 100644
new mode 100755
index ddaf9eb..2049cfa
--- a/examples/importGridData/importGridData.pro
+++ b/examples/importGridData/importGridData.pro
@@ -1,47 +1,9 @@
-TEMPLATE = app
-TARGET = importGridData
-CONFIG += qt warn_on thread debug rtti exceptions
-LANGUAGE = C++
-
-OBJECTS_DIR = .obj
+include( ../base/base.pro )
 
 SOURCES	+= \
 	importGridData.cpp \
-	../src/terralib/drivers/MySQL/TeMySQL.cpp
+	../../src/terralib/drivers/MySQL/TeMySQL.cpp
 
 HEADERS	+= \
-	../src/terralib/drivers/MySQL/TeMySQL.h
-	
-INCLUDEPATH += \
-	. \
-	.. \
-	../src/terralib/kernel \
-	../src/terralib/application \
-	../src/terralib/functions \
-	../src/terralib/stat \
-	../src/shapelib \
-	../src/zlib \
-	../src/terralib/application/qt \
-	../src/terralib/drivers/MySQL \
-	../src/terralib/drivers/MySQL/include \
-	../src/terralib/drivers/OracleSpatial \
-	../src/terralib/drivers/OracleSpatial/OCI/include \
-	../src/terralib/drivers/PostgreSQL \
-	../src/terralib/drivers/PostgreSQL/includepg 
-
-LIBS += \
-	-L../terralibx/shapelib \
-	-L../terralibx/stat \
-	-L../terralibx/terralib \
-	-L../terralibx/tiff \
-	-L../terralibx/PostgreSQL \
-	-L/usr/local/lib -L/usr/lib -L/usr/lib/mysql -L/usr/local/lib/mysql \
-	-L/usr/local/mysql -L/usr/local/mysql/lib -L. \
-    -lshapelib -lstat -lterralib -ltiff -lmysqlclient -lpq -lcrypt
-
-
-
-
-
-
+	../../src/terralib/drivers/MySQL/TeMySQL.h
 
diff --git a/examples/importGridData/importGridData.sln b/examples/importGridData/importGridData.sln
new file mode 100755
index 0000000..38e8f5e
--- /dev/null
+++ b/examples/importGridData/importGridData.sln
@@ -0,0 +1,47 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "importGridData", "importGridData.vcproj", "{AC29CA10-2B75-494F-A370-6767C7AB5FC1}"
+	ProjectSection(ProjectDependencies) = postProject
+		{40917057-E283-4760-B645-D2BA2D7E5A35} = {40917057-E283-4760-B645-D2BA2D7E5A35}
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C} = {BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "terralib", "..\..\terralibw\terralib\terralib.vcproj", "{40917057-E283-4760-B645-D2BA2D7E5A35}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjpeg", "..\..\terralibw\libjpeg\libjpeg.vcproj", "{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tiff", "..\..\terralibw\tiff\tiff.vcproj", "{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		Debug = Debug
+		Release = Release
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.ActiveCfg = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.Build.0 = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.ActiveCfg = Release|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.Build.0 = Release|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Debug.ActiveCfg = Debug|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Debug.Build.0 = Debug|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Release.ActiveCfg = Release|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Release.Build.0 = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.ActiveCfg = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.Build.0 = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.ActiveCfg = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.Build.0 = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.ActiveCfg = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.Build.0 = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.ActiveCfg = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
diff --git a/examples/importGridData/importGridData.vcproj b/examples/importGridData/importGridData.vcproj
new file mode 100755
index 0000000..90621ef
--- /dev/null
+++ b/examples/importGridData/importGridData.vcproj
@@ -0,0 +1,164 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="importGridData"
+	ProjectGUID="{AC29CA10-2B75-494F-A370-6767C7AB5FC1}">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\Debug\"
+			IntermediateDirectory="..\Debug\"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="-Zm200 -GX -w34100 -w34189"
+				Optimization="4"
+				AdditionalIncludeDirectories=".;..;..\..\src\terralib\functions;..\..\src\terralib\kernel;..\..\src\zlib;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include;..\..\src\shapelib"
+				PreprocessorDefinitions="UNICODE,WIN32"
+				GeneratePreprocessedFile="0"
+				MinimalRebuild="TRUE"
+				ExceptionHandling="TRUE"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				AssemblerListingLocation="..\Debug\"
+				ObjectFile="..\Debug\"
+				ProgramDataBaseFileName=".\"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Debug/terralib/terralib.lib ../../Debug/libjpeg/libjpeg.lib ../../Debug/tiff/tiff.lib ../../Debug/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
+				OutputFile="..\Debug\importGridData.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreDefaultLibraryNames="msvcrt.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				WarningLevel="0"
+				DefaultCharType="0"
+				EnableErrorChecks="1"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\Release\"
+			IntermediateDirectory="..\Release\"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="-Zm200 -GX -w34100 -w34189"
+				Optimization="4"
+				AdditionalIncludeDirectories=".;..;..\..\src\terralib\functions;..\..\src\terralib\kernel;..\..\src\zlib;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include;..\..\src\shapelib"
+				PreprocessorDefinitions="UNICODE,WIN32"
+				GeneratePreprocessedFile="0"
+				MinimalRebuild="TRUE"
+				ExceptionHandling="TRUE"
+				RuntimeLibrary="2"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				AssemblerListingLocation="..\Debug\"
+				ObjectFile="..\Debug\"
+				ProgramDataBaseFileName=".\"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Release/terralib/terralib.lib ../../Release/libjpeg/libjpeg.lib ../../Release/tiff/tiff.lib ../../Release/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
+				OutputFile="..\Release\importGridData.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				WarningLevel="0"
+				DefaultCharType="0"
+				EnableErrorChecks="1"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath="importGridData.cpp">
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.h">
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/importJPEG/.cdtproject b/examples/importJPEG/.cdtproject
old mode 100644
new mode 100755
diff --git a/examples/importJPEG/.project b/examples/importJPEG/.project
old mode 100644
new mode 100755
index 631421d..8b81ec9
--- a/examples/importJPEG/.project
+++ b/examples/importJPEG/.project
@@ -14,21 +14,21 @@
 				</dictionary>
 				<dictionary>
 					<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
-					<value>clean all</value>
+					<value>all</value>
 				</dictionary>
 				<dictionary>
 					<key>org.eclipse.cdt.make.core.incrementalBuildTarget</key>
 					<value>all</value>
 				</dictionary>
 				<dictionary>
-					<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
-					<value>false</value>
-				</dictionary>
-				<dictionary>
 					<key>org.eclipse.cdt.make.core.buildLocation</key>
 					<value></value>
 				</dictionary>
 				<dictionary>
+					<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
+					<value>false</value>
+				</dictionary>
+				<dictionary>
 					<key>org.eclipse.cdt.make.core.enableFullBuild</key>
 					<value>true</value>
 				</dictionary>
@@ -53,13 +53,13 @@
 					<value>make</value>
 				</dictionary>
 				<dictionary>
-					<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
-					<value>all</value>
-				</dictionary>
-				<dictionary>
 					<key>org.eclipse.cdt.make.core.stopOnError</key>
 					<value>false</value>
 				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
+					<value>all</value>
+				</dictionary>
 			</arguments>
 		</buildCommand>
 		<buildCommand>
diff --git a/examples/importJPEG/Makefile b/examples/importJPEG/Makefile
old mode 100644
new mode 100755
index 8b69fdc..c46d69d
--- a/examples/importJPEG/Makefile
+++ b/examples/importJPEG/Makefile
@@ -1,23 +1,30 @@
 all: importJPEG
 
-shapelib:
-	cd ../terralibx/shapelib; make
-
-tiff:
-	cd ../terralibx/tiff; make
+debug: importJPEG_dbg
 
 terralib:
-	cd ../terralibx/terralib; make
+	cd ../../terralibx/terralib; make
 
-stat:
-	cd ../terralibx/stat; make
+terralib_dbg:
+	cd ../../terralibx/terralib; make debug
 
-importJPEG: shapelib tiff terralib stat
+importJPEG: terralib
 	qmake -o makeImportJPEG importJPEG.pro; make -f makeImportJPEG
 
+importJPEG_dbg: terralib_dbg
+	qmake -o makeImportJPEG.debug importJPEG.pro TE_PROJECT_TYPE=DEBUG; \
+	make -f makeImportJPEG.debug
+
 clean:
 	if \
 		test -f makeImportJPEG; \
 	then \
 		make -f makeImportJPEG distclean; rm -f makeImportJPEG; \
+	fi
+	
+clean_debug:
+	if \
+		test -f makeImportJPEG.debug; \
+	then \
+		make -f makeImportJPEG.debug distclean; rm -f makeImportJPEG.debug; \
 	fi
\ No newline at end of file
diff --git a/examples/importJPEG/importJPEG.cpp b/examples/importJPEG/importJPEG.cpp
old mode 100644
new mode 100755
index c0a1411..eaf0019
--- a/examples/importJPEG/importJPEG.cpp
+++ b/examples/importJPEG/importJPEG.cpp
@@ -30,13 +30,18 @@ of this library and its documentation.
 
 #include <TeDatabase.h>
 #include <TeMySQL.h>
-#include <TeInitRasterDecoders.h>
 #include <TeImportRaster.h>
+#include <TeDecoderJPEG.h>
 
 int main()
 {
-	// Initialize the raster decoder tool
-	TeInitRasterDecoders();
+
+	// Creates an instance of the JPEG raster decoder
+	static TeDecoderJPEGFactory theDecoderJPEGFactory("JPEG");
+	TeDecoderFactory::instanceName2Dec()["jpg"]  = "JPEG";	
+	TeDecoderFactory::instanceName2Dec()["jpeg"] = "JPEG";
+	TeDecoderFactory::instanceName2Dec()["JPG"]  = "JPEG";	
+	TeDecoderFactory::instanceName2Dec()["JPEG"] = "JPEG";
 
 	// Acess input image
 	TeRaster image("../data/sampa.jpg");
@@ -50,9 +55,9 @@ int main()
 
  	// Datatabase server parameters
 	string host = "localhost";
-	string dbname = "TerraTeste";
+	string dbname = "DB320RC1";
 	string user = "root";
-	string password = "";
+	string password = "vinhas";
 	TeDatabase* db = new TeMySQL();
 	if (!db->connect(host, user, password, dbname))
 	{
@@ -71,6 +76,7 @@ int main()
 		cout << "The database already has an infolayer with the name \"";
 		cout << layerName << "\"!" << endl << endl;
 		db->close();
+		delete db;
 		cout << "Press Enter\n";
 		getchar();
 		return 1;
@@ -82,6 +88,7 @@ int main()
 	{
 		image.clear();
 		db->close();
+		delete db;
 		cout << "The destination layer could not be created!\n" << db->errorMessage() << endl << endl;
 		cout << "Press Enter\n";
 		getchar();
@@ -93,6 +100,7 @@ int main()
 	{
 		image.clear();
 		db->close();
+		delete db;
 		cout << "Fail to import image!\n" << endl;
 		cout << "Press Enter\n";
 		getchar();
@@ -101,6 +109,7 @@ int main()
 
 	// Close database
 	db->close();
+	delete db;
 	cout << "The JPEG image was imported successfully into the TerraLib database!\n\n";
 	cout << "Press Enter\n";
 	getchar();
diff --git a/examples/importJPEG/importJPEG.dsp b/examples/importJPEG/importJPEG.dsp
old mode 100644
new mode 100755
index 437b0a8..9dcb0bf
--- a/examples/importJPEG/importJPEG.dsp
+++ b/examples/importJPEG/importJPEG.dsp
@@ -42,7 +42,7 @@ RSC=rc.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drive [...]
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\terralibw\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\include" /I "..\..\src [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "NDEBUG"
 # ADD RSC /l 0x416 /d "NDEBUG"
@@ -51,7 +51,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\shapelib\Release\shapelib.lib ..\..\terralibw\freetype\Release\freetype.lib ..\..\terralibw\tiff\Release\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\Postg [...]
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\tiff\Release\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\libpq.lib /nologo /subsystem:console /machine:I386 /out:"../Release/importJPEG.exe"
 # SUBTRACT LINK32 /pdb:none
 
 !ELSEIF  "$(CFG)" == "importJPEG - Win32 Debug"
@@ -68,7 +68,7 @@ LINK32=link.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terra [...]
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\terralibw\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\include" /I " [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "_DEBUG"
 # ADD RSC /l 0x416 /d "_DEBUG"
@@ -77,7 +77,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\shapelib\Debug\shapelib.lib ..\..\terralibw\freetype\Debug\freetype.lib ..\..\terralibw\tiff\Debug\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\li [...]
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\tiff\Debug\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\libpq.lib /nologo /subsystem:console /debug /machine:I386 /out:"../Debug/importJPEG.exe" / [...]
 # SUBTRACT LINK32 /pdb:none
 
 !ENDIF 
diff --git a/examples/importJPEG/importJPEG.dsw b/examples/importJPEG/importJPEG.dsw
old mode 100644
new mode 100755
index 491946a..08b5347
--- a/examples/importJPEG/importJPEG.dsw
+++ b/examples/importJPEG/importJPEG.dsw
@@ -3,19 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
 
 ###############################################################################
 
-Project: "freetype"="..\..\terralibw\freetype\freetype.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "importJPEG"=".\importJPEG.dsp" - Package Owner=<4>
+Project: "importJPEG"=.\importJPEG.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -30,19 +18,7 @@ Package=<4>
 
 ###############################################################################
 
-Project: "shapelib"="..\..\terralibw\shapelib\shapelib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "terralib"="..\..\terralibw\terralib\terralib.dsp" - Package Owner=<4>
+Project: "terralib"=..\..\terralibw\terralib\terralib.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -54,16 +30,13 @@ Package=<4>
     Project_Dep_Name freetype
     End Project Dependency
     Begin Project Dependency
-    Project_Dep_Name shapelib
-    End Project Dependency
-    Begin Project Dependency
     Project_Dep_Name tiff
     End Project Dependency
 }}}
 
 ###############################################################################
 
-Project: "tiff"="..\..\terralibw\tiff\tiff.dsp" - Package Owner=<4>
+Project: "tiff"=..\..\terralibw\tiff\tiff.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
diff --git a/examples/importJPEG/importJPEG.pro b/examples/importJPEG/importJPEG.pro
old mode 100644
new mode 100755
index 1d4bf3b..4b14147
--- a/examples/importJPEG/importJPEG.pro
+++ b/examples/importJPEG/importJPEG.pro
@@ -1,47 +1,10 @@
-TEMPLATE = app
-TARGET = importJPEG
-CONFIG += qt warn_on thread debug rtti exceptions
-LANGUAGE = C++
-
-OBJECTS_DIR = .obj
+include( ../base/base.pro )
 
 SOURCES	+= \
 	importJPEG.cpp \
-	../src/terralib/drivers/MySQL/TeMySQL.cpp
+	../../src/terralib/drivers/MySQL/TeMySQL.cpp
 
 HEADERS	+= \
-	../src/terralib/drivers/MySQL/TeMySQL.h
-	
-INCLUDEPATH += \
-	. \
-	.. \
-	../src/terralib/kernel \
-	../src/terralib/application \
-	../src/terralib/functions \
-	../src/terralib/stat \
-	../src/shapelib \
-	../src/zlib \
-	../src/terralib/application/qt \
-	../src/terralib/drivers/MySQL \
-	../src/terralib/drivers/MySQL/include \
-	../src/terralib/drivers/OracleSpatial \
-	../src/terralib/drivers/OracleSpatial/OCI/include \
-	../src/terralib/drivers/PostgreSQL \
-	../src/terralib/drivers/PostgreSQL/includepg 
-
-LIBS += \
-	-L../terralibx/shapelib \
-	-L../terralibx/stat \
-	-L../terralibx/terralib \
-	-L../terralibx/tiff \
-	-L../terralibx/PostgreSQL \
-	-L/usr/local/lib -L/usr/lib -L/usr/lib/mysql -L/usr/local/lib/mysql \
-	-L/usr/local/mysql -L/usr/local/mysql/lib -L. \
-    -lshapelib -lstat -lterralib -ltiff -lmysqlclient -lpq -lcrypt
-
-
-
-
-
+	../../src/terralib/drivers/MySQL/TeMySQL.h
 
 
diff --git a/examples/importJPEG/importJPEG.sln b/examples/importJPEG/importJPEG.sln
new file mode 100755
index 0000000..1478948
--- /dev/null
+++ b/examples/importJPEG/importJPEG.sln
@@ -0,0 +1,47 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "importJPEG", "importJPEG.vcproj", "{AC29CA10-2B75-494F-A370-6767C7AB5FC1}"
+	ProjectSection(ProjectDependencies) = postProject
+		{40917057-E283-4760-B645-D2BA2D7E5A35} = {40917057-E283-4760-B645-D2BA2D7E5A35}
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C} = {BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "terralib", "..\..\terralibw\terralib\terralib.vcproj", "{40917057-E283-4760-B645-D2BA2D7E5A35}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjpeg", "..\..\terralibw\libjpeg\libjpeg.vcproj", "{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tiff", "..\..\terralibw\tiff\tiff.vcproj", "{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		Debug = Debug
+		Release = Release
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.ActiveCfg = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.Build.0 = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.ActiveCfg = Release|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.Build.0 = Release|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Debug.ActiveCfg = Debug|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Debug.Build.0 = Debug|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Release.ActiveCfg = Release|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Release.Build.0 = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.ActiveCfg = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.Build.0 = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.ActiveCfg = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.Build.0 = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.ActiveCfg = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.Build.0 = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.ActiveCfg = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
diff --git a/examples/importJPEG/importJPEG.vcproj b/examples/importJPEG/importJPEG.vcproj
new file mode 100755
index 0000000..d7bfa54
--- /dev/null
+++ b/examples/importJPEG/importJPEG.vcproj
@@ -0,0 +1,164 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="importJPEG"
+	ProjectGUID="{AC29CA10-2B75-494F-A370-6767C7AB5FC1}">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\Debug\"
+			IntermediateDirectory="..\Debug\"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="-Zm200 -GX -w34100 -w34189"
+				Optimization="4"
+				AdditionalIncludeDirectories=".;..;..\..\src\terralib\functions;..\..\src\terralib\kernel;..\..\src\zlib;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include"
+				PreprocessorDefinitions="UNICODE,WIN32"
+				GeneratePreprocessedFile="0"
+				MinimalRebuild="TRUE"
+				ExceptionHandling="TRUE"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				AssemblerListingLocation="..\Debug\"
+				ObjectFile="..\Debug\"
+				ProgramDataBaseFileName=".\"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Debug/terralib/terralib.lib ../../Debug/libjpeg/libjpeg.lib ../../Debug/tiff/tiff.lib ../../Debug/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
+				OutputFile="..\Debug\importJPEG.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreDefaultLibraryNames="msvcrt.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				WarningLevel="0"
+				DefaultCharType="0"
+				EnableErrorChecks="1"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\Release\"
+			IntermediateDirectory="..\Release\"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="-Zm200 -GX -w34100 -w34189"
+				Optimization="4"
+				AdditionalIncludeDirectories=".;..;..\..\src\terralib\functions;..\..\src\terralib\kernel;..\..\src\zlib;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include"
+				PreprocessorDefinitions="UNICODE,WIN32"
+				GeneratePreprocessedFile="0"
+				MinimalRebuild="TRUE"
+				ExceptionHandling="TRUE"
+				RuntimeLibrary="2"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				AssemblerListingLocation="..\Debug\"
+				ObjectFile="..\Debug\"
+				ProgramDataBaseFileName=".\"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Release/terralib/terralib.lib ../../Release/libjpeg/libjpeg.lib ../../Release/tiff/tiff.lib ../../Release/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
+				OutputFile="..\Release\importJPEG.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				WarningLevel="0"
+				DefaultCharType="0"
+				EnableErrorChecks="1"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath=".\importJPEG.cpp">
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.h">
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/importMIDMIF/.cdtproject b/examples/importMIDMIF/.cdtproject
old mode 100644
new mode 100755
diff --git a/examples/importMIDMIF/.project b/examples/importMIDMIF/.project
old mode 100644
new mode 100755
index c594722..86a8443
--- a/examples/importMIDMIF/.project
+++ b/examples/importMIDMIF/.project
@@ -14,21 +14,21 @@
 				</dictionary>
 				<dictionary>
 					<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
-					<value>clean all</value>
+					<value>all</value>
 				</dictionary>
 				<dictionary>
 					<key>org.eclipse.cdt.make.core.incrementalBuildTarget</key>
 					<value>all</value>
 				</dictionary>
 				<dictionary>
-					<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
-					<value>false</value>
-				</dictionary>
-				<dictionary>
 					<key>org.eclipse.cdt.make.core.buildLocation</key>
 					<value></value>
 				</dictionary>
 				<dictionary>
+					<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
+					<value>false</value>
+				</dictionary>
+				<dictionary>
 					<key>org.eclipse.cdt.make.core.enableFullBuild</key>
 					<value>true</value>
 				</dictionary>
@@ -53,13 +53,13 @@
 					<value>make</value>
 				</dictionary>
 				<dictionary>
-					<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
-					<value>all</value>
-				</dictionary>
-				<dictionary>
 					<key>org.eclipse.cdt.make.core.stopOnError</key>
 					<value>false</value>
 				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
+					<value>all</value>
+				</dictionary>
 			</arguments>
 		</buildCommand>
 		<buildCommand>
diff --git a/examples/importMIDMIF/Makefile b/examples/importMIDMIF/Makefile
old mode 100644
new mode 100755
index f528c94..50b8131
--- a/examples/importMIDMIF/Makefile
+++ b/examples/importMIDMIF/Makefile
@@ -1,23 +1,29 @@
 all: importMIDMIF
 
-shapelib:
-	cd ../terralibx/shapelib; make
-
-tiff:
-	cd ../terralibx/tiff; make
+debug: importMIDMIF_dbg
 
 terralib:
-	cd ../terralibx/terralib; make
+	cd ../../terralibx/terralib; make
 
-stat:
-	cd ../terralibx/stat; make
+terralib_dbg:
+	cd ../../terralibx/terralib; make debug
 
-importMIDMIF: shapelib tiff terralib stat
+importMIDMIF: terralib
 	qmake -o makeImportMIDMIF importMIDMIF.pro; make -f makeImportMIDMIF
 
+importMIDMIF_dbg: terralib_dbg
+	qmake -o makeImportMIDMIF.debug importMIDMIF.pro TE_PROJECT_TYPE=DEBUG; make -f makeImportMIDMIF.debug
+
 clean:
 	if \
 		test -f makeImportMIDMIF; \
 	then \
 		make -f makeImportMIDMIF distclean; rm -f makeImportMIDMIF; \
+	fi
+	
+clean_debug:
+	if \
+		test -f makeImportMIDMIF.debug; \
+	then \
+		make -f makeImportMIDMIF.debug distclean; rm -f makeImportMIDMIF.debug; \
 	fi
\ No newline at end of file
diff --git a/examples/importMIDMIF/importMIDMIF.cpp b/examples/importMIDMIF/importMIDMIF.cpp
old mode 100644
new mode 100755
index c75c9af..41569d4
--- a/examples/importMIDMIF/importMIDMIF.cpp
+++ b/examples/importMIDMIF/importMIDMIF.cpp
@@ -28,17 +28,16 @@ of this library and its documentation.
 	Author: Lubia Vinhas  
 */
 
-#include <TeDatabase.h>
-#include <TeImportExport.h>
+#include <TeDriverMIDMIF.h>
 #include <TeMySQL.h>
 
 int main()
 {
      // Datatabase server parameters
      string host = "localhost";
-     string dbname = "TerraTeste";
+     string dbname = "DB320RC1";
      string user = "root";
-     string password = "";
+     string password = "vinhas";
 
      // Connects to database
      TeDatabase* db = new TeMySQL();
@@ -47,65 +46,75 @@ int main()
 		cout << "Error: " << db->errorMessage() << endl;
 		cout << "Press Enter\n";
 		getchar();
+		delete db;
 		return 1;
      }
 
+	TeLayer *layer = 0;
 	string filename = "../data/Distritos.mif";
 	if (db->layerExist("Distritos"))
 	{
-		cout << "Error: layer \"Distritos\" already exists in the database!\n" << endl;
-		db->close();
-		cout << "Press Enter\n";
-		getchar();
-		return 1;
+		cout << "Warning: Layer \"Distritos\" already exists in the database!\n" << endl;
+		if (db->loadLayerSet() == true)
+		{
+			// Get layer named "Distritos" from the cache
+			TeLayerMap& layerMap = db->layerMap();
+			map<int, TeLayer*>::iterator it;
+			for (it = layerMap.begin(); it != layerMap.end(); ++it)
+			{
+				layer = it->second;
+				if (layer->name() == "Distritos")
+					break;
+			}
+		}
 	}
-
-	// Import the MID/MIF file
-	TeLayer* newLayer = TeImportMIF(filename, db);                          
-	if (newLayer) 
-		cout << "MID/MIF file imported to the TerraLib database successfully!\n" << endl;
 	else
 	{
-		cout << "Fail to import the MID/MIF file!\n";
-		db->close();
-		cout << "Press Enter\n";
-		getchar();
-		return 1;
+		// Import the MID/MIF file
+		layer = TeImportMIF(filename, db);                          
+		if (layer) 
+			cout << "MID/MIF file imported to the TerraLib database successfully!\n" << endl;
+		else
+		{
+			cout << "Fail to import the MID/MIF file!\n";
+			db->close();
+			delete db;
+			cout << "Press Enter\n";
+			getchar();
+			return 1;
+		}
 	}
 
-	// Show some information about the new layer created
-	cout << "Layer created: " << newLayer->name() << ", id: " << newLayer->id() << endl;
+	// Show some information about the layer associated to the MID/MIF file
+	cout << "Layer: " << layer->name() << ", id: " << layer->id() << endl;
 
 	// Geometries information
-	cout << "Projection: " << newLayer->projection()->name();              
-	cout << "/" << newLayer->projection()->datum().name();          
-	TeBox bb = newLayer->box();
+	cout << "Projection: " << layer->projection()->name();              
+	cout << "/" << layer->projection()->datum().name();          
+	TeBox bb = layer->box();
 	char message[255];
 	sprintf(message,"[%.15f,%.15f,%.15f,%.15f]\n",bb.x1_, bb.y1_, bb.x2_, bb.y2_);
 	cout << "\nBounding box: " << message;
-	cout << "Number of polygons: " << newLayer->nGeometries(TePOLYGONS) << endl;
-	cout << "Number of lines: "    << newLayer->nGeometries(TeLINES) << endl;
-	cout << "Number of points: "   << newLayer->nGeometries(TePOINTS) << endl;
+	cout << "Number of polygons: " << layer->nGeometries(TePOLYGONS) << endl;
+	cout << "Number of lines: "    << layer->nGeometries(TeLINES) << endl;
+	cout << "Number of points: "   << layer->nGeometries(TePOINTS) << endl;
 
-	// Attributes information
+	// Information of the Tables of Attributes of the Layer
 	TeAttrTableVector tableVec;
-	newLayer->getAttrTables(tableVec);
+	layer->getAttrTables(tableVec);
 	cout << "Number of Attribute Tables: " << tableVec.size() << endl;
-	if (tableVec.size() > 0)
+	
+	for (unsigned int i = 0; i < tableVec.size(); ++i)
 	{
-		TeAttrTableVector::iterator it = tableVec.begin();
-		while (it != tableVec.end())
-		{
-			cout << (*it).name() << ": ";
-			cout << newLayer->nObjects((*it).name()) << " objects" << endl << endl;
-			++it;
-		}
+		cout << "Attribute Table " << "\"" << tableVec[i].name() << "\": ";
+		cout << layer->nObjects(tableVec[i].name()) << " objects" << endl << endl;
 	}
+	
 	db->close();
+	delete db;
 	cout << "Press Enter\n";
-	cout.flush();
 	getchar();
-	return 1;
+	return 0;
 }
 
  
diff --git a/examples/importMIDMIF/importMIDMIF.dsp b/examples/importMIDMIF/importMIDMIF.dsp
old mode 100644
new mode 100755
index 212e9bc..e945dee
--- a/examples/importMIDMIF/importMIDMIF.dsp
+++ b/examples/importMIDMIF/importMIDMIF.dsp
@@ -42,7 +42,7 @@ RSC=rc.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drive [...]
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\teeralibw\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\include" /I "..\..\src [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "NDEBUG"
 # ADD RSC /l 0x416 /d "NDEBUG"
@@ -51,7 +51,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\shapelib\Release\shapelib.lib ..\..\terralibw\freetype\Release\freetype.lib ..\..\terralibw\tiff\Release\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\Postg [...]
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\libpq.lib /nologo /subsystem:console /machine:I386 /out:"../Release/importMIDMIF.exe"
 # SUBTRACT LINK32 /pdb:none
 
 !ELSEIF  "$(CFG)" == "importMIDMIF - Win32 Debug"
@@ -68,7 +68,7 @@ LINK32=link.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terra [...]
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\terralibw\ado" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\dri [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "_DEBUG"
 # ADD RSC /l 0x416 /d "_DEBUG"
@@ -77,7 +77,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\shapelib\Debug\shapelib.lib ..\..\terralibw\freetype\Debug\freetype.lib ..\..\terralibw\tiff\Debug\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\li [...]
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\libpq.lib /nologo /subsystem:console /debug /machine:I386 /out:"../Debug/importMIDMIF.exe" /pdbtype:sept
 # SUBTRACT LINK32 /pdb:none
 
 !ENDIF 
@@ -95,10 +95,6 @@ SOURCE=.\importMIDMIF.cpp
 # End Source File
 # Begin Source File
 
-SOURCE=..\..\src\terralib\functions\TeImportDBF.cpp
-# End Source File
-# Begin Source File
-
 SOURCE=..\..\src\terralib\functions\TeImportMIF.cpp
 # End Source File
 # Begin Source File
diff --git a/examples/importMIDMIF/importMIDMIF.dsw b/examples/importMIDMIF/importMIDMIF.dsw
old mode 100644
new mode 100755
index 1a6bbbe..35f8b53
--- a/examples/importMIDMIF/importMIDMIF.dsw
+++ b/examples/importMIDMIF/importMIDMIF.dsw
@@ -3,19 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
 
 ###############################################################################
 
-Project: "freetype"="..\..\terralibw\freetype\freetype.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "importMIDMIF"=".\importMIDMIF.dsp" - Package Owner=<4>
+Project: "importMIDMIF"=.\importMIDMIF.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -30,19 +18,7 @@ Package=<4>
 
 ###############################################################################
 
-Project: "shapelib"="..\..\terralibw\shapelib\shapelib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "terralib"="..\..\terralibw\terralib\terralib.dsp" - Package Owner=<4>
+Project: "terralib"=..\..\terralibw\terralib\terralib.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -53,24 +29,6 @@ Package=<4>
     Begin Project Dependency
     Project_Dep_Name freetype
     End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name shapelib
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name tiff
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "tiff"="..\..\terralibw\tiff\tiff.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
 }}}
 
 ###############################################################################
diff --git a/examples/importMIDMIF/importMIDMIF.pro b/examples/importMIDMIF/importMIDMIF.pro
old mode 100644
new mode 100755
index e6ae3ba..a5bf805
--- a/examples/importMIDMIF/importMIDMIF.pro
+++ b/examples/importMIDMIF/importMIDMIF.pro
@@ -1,52 +1,12 @@
-TEMPLATE = app
-TARGET = importMIDMIF
-CONFIG += qt warn_on thread debug rtti exceptions
-LANGUAGE = C++
-
-OBJECTS_DIR = .obj
+include( ../base/base.pro )
 
 SOURCES	+= \
 	importMIDMIF.cpp \
-	../src/terralib/functions/TeImportMIF.cpp \
-	../src/terralib/functions/TeImportDBF.cpp \
-	../src/terralib/functions/TeMIFProjection.cpp \
-	../src/terralib/drivers/MySQL/TeMySQL.cpp
+	../../src/terralib/functions/TeImportMIF.cpp \
+	../../src/terralib/functions/TeMIFProjection.cpp \
+	../../src/terralib/drivers/MySQL/TeMySQL.cpp
 
 HEADERS	+= \
-	../src/terralib/drivers/MySQL/TeMySQL.h \
-	../src/terralib/drivers/MySQL/TeImportExport.h \
-	../src/terralib/functions/TeMIFProjection.h
+	../../src/terralib/drivers/MySQL/TeMySQL.h \
+	../../src/terralib/functions/TeMIFProjection.h
 	
-INCLUDEPATH += \
-	. \
-	.. \
-	../src/terralib/kernel \
-	../src/terralib/application \
-	../src/terralib/functions \
-	../src/terralib/stat \
-	../src/shapelib \
-	../src/zlib \
-	../src/terralib/application/qt \
-	../src/terralib/drivers/MySQL \
-	../src/terralib/drivers/MySQL/include \
-	../src/terralib/drivers/OracleSpatial \
-	../src/terralib/drivers/OracleSpatial/OCI/include \
-	../src/terralib/drivers/PostgreSQL \
-	../src/terralib/drivers/PostgreSQL/includepg 
-
-LIBS += \
-	-L../terralibx/shapelib \
-	-L../terralibx/stat \
-	-L../terralibx/terralib \
-	-L../terralibx/tiff \
-	-L../terralibx/PostgreSQL \
-	-L/usr/local/lib -L/usr/lib -L/usr/lib/mysql -L/usr/local/lib/mysql \
-	-L/usr/local/mysql -L/usr/local/mysql/lib -L. \
-    -lshapelib -lstat -lterralib -ltiff -lmysqlclient -lpq -lcrypt
-
-
-
-
-
-
-
diff --git a/examples/importMIDMIF/importMIDMIF.sln b/examples/importMIDMIF/importMIDMIF.sln
new file mode 100755
index 0000000..fda3dee
--- /dev/null
+++ b/examples/importMIDMIF/importMIDMIF.sln
@@ -0,0 +1,47 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "importMIDMIF", "importMIDMIF.vcproj", "{AC29CA10-2B75-494F-A370-6767C7AB5FC1}"
+	ProjectSection(ProjectDependencies) = postProject
+		{40917057-E283-4760-B645-D2BA2D7E5A35} = {40917057-E283-4760-B645-D2BA2D7E5A35}
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C} = {BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "terralib", "..\..\terralibw\terralib\terralib.vcproj", "{40917057-E283-4760-B645-D2BA2D7E5A35}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjpeg", "..\..\terralibw\libjpeg\libjpeg.vcproj", "{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tiff", "..\..\terralibw\tiff\tiff.vcproj", "{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		Debug = Debug
+		Release = Release
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.ActiveCfg = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.Build.0 = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.ActiveCfg = Release|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.Build.0 = Release|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Debug.ActiveCfg = Debug|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Debug.Build.0 = Debug|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Release.ActiveCfg = Release|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Release.Build.0 = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.ActiveCfg = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.Build.0 = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.ActiveCfg = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.Build.0 = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.ActiveCfg = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.Build.0 = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.ActiveCfg = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
diff --git a/examples/importMIDMIF/importMIDMIF.vcproj b/examples/importMIDMIF/importMIDMIF.vcproj
new file mode 100755
index 0000000..65c83f0
--- /dev/null
+++ b/examples/importMIDMIF/importMIDMIF.vcproj
@@ -0,0 +1,176 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="importMIDMIF"
+	ProjectGUID="{AC29CA10-2B75-494F-A370-6767C7AB5FC1}">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\Debug\"
+			IntermediateDirectory="..\Debug\"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="-Zm200 -GX -w34100 -w34189"
+				Optimization="4"
+				AdditionalIncludeDirectories=".;..;..\..\src\terralib\functions;..\..\src\terralib\kernel;..\..\src\zlib;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include"
+				PreprocessorDefinitions="UNICODE,WIN32"
+				GeneratePreprocessedFile="0"
+				MinimalRebuild="TRUE"
+				ExceptionHandling="TRUE"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				AssemblerListingLocation="..\Debug\"
+				ObjectFile="..\Debug\"
+				ProgramDataBaseFileName=".\"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Debug/terralib/terralib.lib ../../Debug/libjpeg/libjpeg.lib ../../Debug/tiff/tiff.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
+				OutputFile="..\Debug\importMIDMIF.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreDefaultLibraryNames="msvcrt.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				WarningLevel="0"
+				DefaultCharType="0"
+				EnableErrorChecks="1"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\Release\"
+			IntermediateDirectory="..\Release\"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="-Zm200 -GX -w34100 -w34189"
+				Optimization="4"
+				AdditionalIncludeDirectories=".;..;..\..\src\terralib\functions;..\..\src\terralib\kernel;..\..\src\zlib;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include"
+				PreprocessorDefinitions="UNICODE,WIN32"
+				GeneratePreprocessedFile="0"
+				MinimalRebuild="TRUE"
+				ExceptionHandling="TRUE"
+				RuntimeLibrary="2"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				AssemblerListingLocation="..\Debug\"
+				ObjectFile="..\Debug\"
+				ProgramDataBaseFileName=".\"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Release/terralib/terralib.lib ../../Release/libjpeg/libjpeg.lib ../../Release/tiff/tiff.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
+				OutputFile="..\Release\importMIDMIF.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				WarningLevel="0"
+				DefaultCharType="0"
+				EnableErrorChecks="1"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath="importMIDMIF.cpp">
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\functions\TeImportMIF.cpp">
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\functions\TeMIFProjection.cpp">
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+			<File
+				RelativePath="..\..\src\terralib\functions\TeMIDMIFDriver.h">
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\functions\TeMIFProjection.h">
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.h">
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/importShape/.cdtproject b/examples/importShape/.cdtproject
old mode 100644
new mode 100755
diff --git a/examples/importShape/.project b/examples/importShape/.project
old mode 100644
new mode 100755
index d85b49a..18e927f
--- a/examples/importShape/.project
+++ b/examples/importShape/.project
@@ -14,21 +14,21 @@
 				</dictionary>
 				<dictionary>
 					<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
-					<value>clean all</value>
+					<value>all</value>
 				</dictionary>
 				<dictionary>
 					<key>org.eclipse.cdt.make.core.incrementalBuildTarget</key>
 					<value>all</value>
 				</dictionary>
 				<dictionary>
-					<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
-					<value>false</value>
-				</dictionary>
-				<dictionary>
 					<key>org.eclipse.cdt.make.core.buildLocation</key>
 					<value></value>
 				</dictionary>
 				<dictionary>
+					<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
+					<value>false</value>
+				</dictionary>
+				<dictionary>
 					<key>org.eclipse.cdt.make.core.enableFullBuild</key>
 					<value>true</value>
 				</dictionary>
@@ -53,13 +53,13 @@
 					<value>make</value>
 				</dictionary>
 				<dictionary>
-					<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
-					<value>all</value>
-				</dictionary>
-				<dictionary>
 					<key>org.eclipse.cdt.make.core.stopOnError</key>
 					<value>false</value>
 				</dictionary>
+				<dictionary>
+					<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
+					<value>all</value>
+				</dictionary>
 			</arguments>
 		</buildCommand>
 		<buildCommand>
diff --git a/examples/importShape/Makefile b/examples/importShape/Makefile
old mode 100644
new mode 100755
index f6fb303..8da1de0
--- a/examples/importShape/Makefile
+++ b/examples/importShape/Makefile
@@ -1,23 +1,32 @@
 all: importShape
 
-shapelib:
-	cd ../terralibx/shapelib; make
-
-tiff:
-	cd ../terralibx/tiff; make
+debug: importShape_dbg
 
 terralib:
-	cd ../terralibx/terralib; make
-
-stat:
-	cd ../terralibx/stat; make
+	cd ../../terralibx/terralib; make
 
-importShape: shapelib tiff terralib stat
-	qmake -o makeImportShape importShape.pro; make -f makeImportShape
+terralib_dbg:
+	cd ../../terralibx/terralib; make debug
+	
+importShape: terralib
+	qmake -o makeImportShape importShape.pro; \
+	make -f makeImportShape;
+	
+importShape_dbg: terralib_dbg
+	qmake -o makeImportShape.debug importShape.pro TE_PROJECT_TYPE=DEBUG; \
+	make -f makeImportShape.debug;	
 
 clean:
 	if \
 		test -f makeImportShape; \
 	then \
 		make -f makeImportShape distclean; rm -f makeImportShape; \
-	fi
\ No newline at end of file
+	fi
+	
+clean_debug:
+	if \
+		test -f makeImportShape.debug; \
+	then \
+		make -f makeImportShape.debug distclean; rm -f makeImportShape.debug; \
+	fi
+	
diff --git a/examples/importShape/importShape.cpp b/examples/importShape/importShape.cpp
old mode 100644
new mode 100755
index f5cebf8..460e3fd
--- a/examples/importShape/importShape.cpp
+++ b/examples/importShape/importShape.cpp
@@ -27,7 +27,7 @@ of this library and its documentation.
 	Author: Lubia Vinhas  
 */
 
-#include <TeImportExport.h>
+#include <TeDriverSHPDBF.h>
 #include <TeMySQL.h>
 
 using namespace std;
@@ -35,12 +35,12 @@ using namespace std;
 
 int main()
 {
-	// Open a connection to the "TerraTeste" TerraLib database
+	// Open a connection to the "DB320RC1" TerraLib database
 	// Datatabase server parameters
 	string host = "localhost";
-	string dbname = "TerraTeste";
+	string dbname = "DB320RC1";
 	string user = "root";
-	string password = "";
+	string password = "vinhas";
 
 	TeMySQL* db = new TeMySQL();
 	if (!db->connect(host, user, password, dbname))
@@ -51,40 +51,82 @@ int main()
 		return 1;
 	}
 
-	// Define a projection. It cannot be decoded from a shapefile
-	TeDatum sad69 = TeDatumFactory::make("SAD69");
-	TePolyconic* proj = new TePolyconic(sad69, -54.0*TeCDR);
-
 	string layerName = "Brasil";
 
-	// Check whether there is a layer with this name in the database
+	// Check whether there is a layer with the name Brasil in the database
+	TeLayer *layer = 0;
 	if (db->layerExist(layerName))
 	{
 		cout << "The database already has an infolayer with the name \"";
 		cout << layerName << "\" !" << endl << endl;
-		db->close();
-		cout << "Press Enter\n";
-		getchar();
-		return 1;
+		if (db->loadLayerSet() == true)
+		{
+			// Get the layer named "Brasil" from the cache
+			TeLayerMap& layerMap = db->layerMap();
+			map<int, TeLayer*>::iterator it;
+			for (it = layerMap.begin(); it != layerMap.end(); ++it)
+			{
+				layer = it->second;
+				if (layer->name() == layerName)
+					break;
+			}
+		}
+	}
+	else
+	{
+		// Import the shape file
+		// Define a projection. It cannot be decoded from a shapefile
+		TeDatum sad69 = TeDatumFactory::make("SAD69");
+		TePolyconic* proj = new TePolyconic(sad69, -54.0*TeCDR);
+		layer = new TeLayer(layerName, db, proj);
+	
+		string filename = "../data/EstadosBrasil.shp";	// Shapefile path
+		string tablename = "BrasilIBGE";	// Name of the attribute table
+		string linkcolumn = "SPRROTULO";	// Column that will link the attributes and geometry tables                 
+	
+		if (TeImportShape(layer, filename, tablename, linkcolumn))
+			cout << "The shapefile was imported successfully into the TerraLib database!\n" << endl;
+		else
+		{
+			cout << "Error: Fail to import the shapefile!\n" << endl;
+			db->close();
+			delete db;
+			cout << "Press Enter\n";
+			getchar();
+			return 1;		
+		}
 	}
 
-	// Create a new layer in the database
-	TeLayer* layer = new TeLayer(layerName, db, proj);
+	// Show some information about the layer associated to the shape file
+	cout << "Layer: " << layer->name() << ", id: " << layer->id() << endl;
 
-	string filename = "../data/EstadosBrasil.shp";	// Shapefile path
-	string tablename = "BrasilIBGE";	// Name of the attribute table
-	string linkcolumn = "SPRROTULO";	// Column that will link the attributes and geometry tables                 
+	// Geometries information
+	cout << "Projection: " << layer->projection()->name();              
+	cout << "/" << layer->projection()->datum().name();          
+	TeBox bb = layer->box();
+	char message[255];
+	sprintf(message,"[%.15f,%.15f,%.15f,%.15f]\n",bb.x1_, bb.y1_, bb.x2_, bb.y2_);
+	cout << "\nBounding box: " << message;
+	cout << "Number of polygons: " << layer->nGeometries(TePOLYGONS) << endl;
+	cout << "Number of lines: "    << layer->nGeometries(TeLINES) << endl;
+	cout << "Number of points: "   << layer->nGeometries(TePOINTS) << endl;
 
-	if (TeImportShape(layer, filename, tablename, linkcolumn))
-		cout << "The shapefile was imported successfully into the TerraLib database!\n" << endl;
-	else
-		cout << "Error: Fail to import the shapefile!\n" << endl;
-		
-	cout.flush();
+	// Information of the Tables of Attributes of the Layer
+	TeAttrTableVector tableVec;
+	layer->getAttrTables(tableVec);
+	cout << "Number of Attribute Tables: " << tableVec.size() << endl;
+	
+	for (unsigned int i = 0; i < tableVec.size(); ++i)
+	{
+		cout << "Attribute Table " << "\"" << tableVec[i].name() << "\": ";
+		cout << layer->nObjects(tableVec[i].name()) << " objects" << endl << endl;
+	}
+	
 	db->close();
+	delete db;
 	cout << "Press Enter\n";
 	getchar();
-	return 0;
+	return 0;	
 }
 
  
diff --git a/examples/importShape/importShape.dsp b/examples/importShape/importShape.dsp
old mode 100644
new mode 100755
index 0257b7e..41b02c7
--- a/examples/importShape/importShape.dsp
+++ b/examples/importShape/importShape.dsp
@@ -42,7 +42,7 @@ RSC=rc.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drive [...]
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include"  /I "..\..\terralibw\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\include" /I "..\..\sr [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "NDEBUG"
 # ADD RSC /l 0x416 /d "NDEBUG"
@@ -51,7 +51,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\shapelib\Release\shapelib.lib ..\..\terralibw\freetype\Release\freetype.lib ..\..\terralibw\tiff\Release\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\Postg [...]
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\shapelib\Release\shapelib.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\libpq.lib /nologo /subsystem:console /machine:I386 /out:"../Release/importShape.exe"
 # SUBTRACT LINK32 /pdb:none
 
 !ELSEIF  "$(CFG)" == "importShape - Win32 Debug"
@@ -68,7 +68,7 @@ LINK32=link.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terra [...]
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\terralibw\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\include" /I " [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "_DEBUG"
 # ADD RSC /l 0x416 /d "_DEBUG"
@@ -77,7 +77,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\shapelib\Debug\shapelib.lib ..\..\terralibw\freetype\Debug\freetype.lib ..\..\terralibw\tiff\Debug\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\li [...]
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\shapelib\Debug\shapelib.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\libpq.lib /nologo /subsystem:console /debug /machine:I386 /out:"../Debug/importSha [...]
 # SUBTRACT LINK32 /pdb:none
 
 !ENDIF 
diff --git a/examples/importShape/importShape.dsw b/examples/importShape/importShape.dsw
old mode 100644
new mode 100755
index 5c270a2..257c57a
--- a/examples/importShape/importShape.dsw
+++ b/examples/importShape/importShape.dsw
@@ -3,19 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
 
 ###############################################################################
 
-Project: "freetype"="..\..\terralibw\freetype\freetype.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "importShape"=".\importShape.dsp" - Package Owner=<4>
+Project: "importShape"=.\importShape.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -30,7 +18,7 @@ Package=<4>
 
 ###############################################################################
 
-Project: "shapelib"="..\..\terralibw\shapelib\shapelib.dsp" - Package Owner=<4>
+Project: "shapelib"=..\..\terralibw\shapelib\shapelib.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -42,7 +30,7 @@ Package=<4>
 
 ###############################################################################
 
-Project: "terralib"="..\..\terralibw\terralib\terralib.dsp" - Package Owner=<4>
+Project: "terralib"=..\..\terralibw\terralib\terralib.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -56,21 +44,6 @@ Package=<4>
     Begin Project Dependency
     Project_Dep_Name shapelib
     End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name tiff
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "tiff"="..\..\terralibw\tiff\tiff.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
 }}}
 
 ###############################################################################
diff --git a/examples/importShape/importShape.pro b/examples/importShape/importShape.pro
old mode 100644
new mode 100755
index 0a8612f..4d24dd8
--- a/examples/importShape/importShape.pro
+++ b/examples/importShape/importShape.pro
@@ -1,50 +1,12 @@
-TEMPLATE = app
-TARGET = importShape
-CONFIG += qt warn_on thread debug rtti exceptions
-LANGUAGE = C++
-
-OBJECTS_DIR = .obj
+include( ../base/base.pro )
 
 SOURCES	+= \
 	importShape.cpp \
-	../src/terralib/functions/TeImportDBF.cpp \
-	../src/terralib/functions/TeImportSHP.cpp \
-	../src/terralib/drivers/MySQL/TeMySQL.cpp
+	../../src/terralib/drivers/shapelib/TeDriverSHPDBF.cpp \
+	../../src/terralib/drivers/MySQL/TeMySQL.cpp
 
 HEADERS	+= \
-	../src/terralib/drivers/MySQL/TeImportExport.h \
-	../src/terralib/drivers/MySQL/TeMySQL.h
-	
-INCLUDEPATH += \
-	. \
-	.. \
-	../src/terralib/kernel \
-	../src/terralib/application \
-	../src/terralib/functions \
-	../src/terralib/stat \
-	../src/shapelib \
-	../src/zlib \
-	../src/terralib/application/qt \
-	../src/terralib/drivers/MySQL \
-	../src/terralib/drivers/MySQL/include \
-	../src/terralib/drivers/OracleSpatial \
-	../src/terralib/drivers/OracleSpatial/OCI/include \
-	../src/terralib/drivers/PostgreSQL \
-	../src/terralib/drivers/PostgreSQL/includepg 
-
-LIBS += \
-	-L../terralibx/shapelib \
-	-L../terralibx/stat \
-	-L../terralibx/terralib \
-	-L../terralibx/tiff \
-	-L../terralibx/PostgreSQL \
-	-L/usr/local/lib -L/usr/lib -L/usr/lib/mysql -L/usr/local/lib/mysql \
-	-L/usr/local/mysql -L/usr/local/mysql/lib -L. \
-    -lshapelib -lstat -lterralib -ltiff -lmysqlclient -lpq -lcrypt
-
-
-
-
-
-
+	../../src/terralib/drivers/MySQL/TeMySQL.h \
+	../../src/terralib/drivers/shapelib/TeDriverSHPDBF.h 
 
+	
diff --git a/examples/importShape/importShape.sln b/examples/importShape/importShape.sln
new file mode 100755
index 0000000..dbd6762
--- /dev/null
+++ b/examples/importShape/importShape.sln
@@ -0,0 +1,55 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "importShape", "importShape.vcproj", "{AC29CA10-2B75-494F-A370-6767C7AB5FC1}"
+	ProjectSection(ProjectDependencies) = postProject
+		{40917057-E283-4760-B645-D2BA2D7E5A35} = {40917057-E283-4760-B645-D2BA2D7E5A35}
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C} = {BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "terralib", "..\..\terralibw\terralib\terralib.vcproj", "{40917057-E283-4760-B645-D2BA2D7E5A35}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjpeg", "..\..\terralibw\libjpeg\libjpeg.vcproj", "{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shapelib", "..\..\terralibw\shapelib\shapelib.vcproj", "{B05EDA25-EDE8-42EA-8431-9C3D13C5072F}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tiff", "..\..\terralibw\tiff\tiff.vcproj", "{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		Debug = Debug
+		Release = Release
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.ActiveCfg = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.Build.0 = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.ActiveCfg = Release|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.Build.0 = Release|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Debug.ActiveCfg = Debug|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Debug.Build.0 = Debug|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Release.ActiveCfg = Release|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Release.Build.0 = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.ActiveCfg = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.Build.0 = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.ActiveCfg = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.Build.0 = Release|Win32
+		{B05EDA25-EDE8-42EA-8431-9C3D13C5072F}.Debug.ActiveCfg = Debug|Win32
+		{B05EDA25-EDE8-42EA-8431-9C3D13C5072F}.Debug.Build.0 = Debug|Win32
+		{B05EDA25-EDE8-42EA-8431-9C3D13C5072F}.Release.ActiveCfg = Release|Win32
+		{B05EDA25-EDE8-42EA-8431-9C3D13C5072F}.Release.Build.0 = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.ActiveCfg = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.Build.0 = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.ActiveCfg = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
diff --git a/examples/importShape/importShape.vcproj b/examples/importShape/importShape.vcproj
new file mode 100755
index 0000000..8555e5b
--- /dev/null
+++ b/examples/importShape/importShape.vcproj
@@ -0,0 +1,170 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="importShape"
+	ProjectGUID="{AC29CA10-2B75-494F-A370-6767C7AB5FC1}">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\Debug\"
+			IntermediateDirectory="..\Debug\"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="-Zm200 -GX -w34100 -w34189"
+				Optimization="4"
+				AdditionalIncludeDirectories=".;..;..\..\src\terralib\kernel;..\..\src\zlib;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include;..\..\src\shapelib;..\..\src\terralib\drivers\shapelib"
+				PreprocessorDefinitions="UNICODE,WIN32"
+				GeneratePreprocessedFile="0"
+				MinimalRebuild="TRUE"
+				ExceptionHandling="TRUE"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				AssemblerListingLocation="..\Debug\"
+				ObjectFile="..\Debug\"
+				ProgramDataBaseFileName=".\"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Debug/terralib/terralib.lib ../../Debug/libjpeg/libjpeg.lib ../../Debug/tiff/tiff.lib ../../Debug/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
+				OutputFile="..\Debug\importShape.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreDefaultLibraryNames="msvcrt.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				WarningLevel="0"
+				DefaultCharType="0"
+				EnableErrorChecks="1"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\Release\"
+			IntermediateDirectory="..\Release\"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="-Zm200 -GX -w34100 -w34189"
+				Optimization="4"
+				AdditionalIncludeDirectories=".;..;..\..\src\terralib\kernel;..\..\src\zlib;..\..\src\terralib\drivers\shapelib;..\..\src\shapelib;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include"
+				PreprocessorDefinitions="UNICODE,WIN32"
+				GeneratePreprocessedFile="0"
+				MinimalRebuild="TRUE"
+				ExceptionHandling="TRUE"
+				RuntimeLibrary="2"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				AssemblerListingLocation="..\Debug\"
+				ObjectFile="..\Debug\"
+				ProgramDataBaseFileName=".\"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Release/terralib/terralib.lib ../../Release/libjpeg/libjpeg.lib ../../Release/tiff/tiff.lib ../../Release/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
+				OutputFile="..\Release\importShape.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				WarningLevel="0"
+				DefaultCharType="0"
+				EnableErrorChecks="1"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath="importShape.cpp">
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\drivers\shapelib\TeDriverSHPDBF.cpp">
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+			<File
+				RelativePath="..\..\src\terralib\drivers\shapelib\TeDriverSHPDBF.h">
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.h">
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/mosaicTIFFImages/.cdtproject b/examples/mosaicTIFFImages/.cdtproject
old mode 100644
new mode 100755
diff --git a/examples/mosaicTIFFImages/.project b/examples/mosaicTIFFImages/.project
old mode 100644
new mode 100755
diff --git a/examples/mosaicTIFFImages/Makefile b/examples/mosaicTIFFImages/Makefile
old mode 100644
new mode 100755
index 2bf9070..a084456
--- a/examples/mosaicTIFFImages/Makefile
+++ b/examples/mosaicTIFFImages/Makefile
@@ -1,23 +1,33 @@
 all: mosaicTIFFImages
 
-shapelib:
-	cd ../terralibx/shapelib; make
+debug: mosaicTIFFImages_dbg
 
 tiff:
-	cd ../terralibx/tiff; make
+	cd ../../terralibx/tiff; make
 
 terralib:
-	cd ../terralibx/terralib; make
+	cd ../../terralibx/terralib; make
+	
+terralib_dbg:
+	cd ../../terralibx/terralib; make debug
 
-stat:
-	cd ../terralibx/stat; make
-
-mosaicTIFFImages: shapelib tiff terralib stat
+mosaicTIFFImages:  tiff terralib 
 	qmake -o makeMosaicTIFFImages mosaicTIFFImages.pro; make -f makeMosaicTIFFImages
 
+mosaicTIFFImages_dbg:  tiff terralib_dbg 
+	qmake -o makeMosaicTIFFImages.debug mosaicTIFFImages.pro TE_PROJECT_TYPE=DEBUG; \
+	make -f makeMosaicTIFFImages.debug
+
 clean:
 	if \
 		test -f makeMosaicTIFFImages; \
 	then \
 		make -f makeMosaicTIFFImages distclean; rm -f makeMosaicTIFFImages; \
+	fi
+	
+clean_debug:
+	if \
+		test -f makeMosaicTIFFImages.debug; \
+	then \
+		make -f makeMosaicTIFFImagesdebug distclean; rm -f makeMosaicTIFFImages.debug; \
 	fi
\ No newline at end of file
diff --git a/examples/mosaicTIFFImages/mosaicTIFFImages.cpp b/examples/mosaicTIFFImages/mosaicTIFFImages.cpp
old mode 100644
new mode 100755
index ebbcfed..3e97df8
--- a/examples/mosaicTIFFImages/mosaicTIFFImages.cpp
+++ b/examples/mosaicTIFFImages/mosaicTIFFImages.cpp
@@ -59,9 +59,9 @@ int main()
 
     // Database server parameters
      string host = "localhost";
-     string dbname = "TerraTeste";
+     string dbname = "DB320RC1";
      string user = "root";
-     string password = "";
+     string password = "vinhas";
 
      // Connect to the database
      TeDatabase* db = new TeMySQL();
@@ -97,7 +97,7 @@ int main()
 	}
 
 	// Import the first image to the layer
-	if (!TeImportRaster(layer,&img1,256,256,TeNoCompression,"",255,true,TeExpansible))
+	if (!TeImportRaster(layer,&img1,256,256,TeRasterParams::TeNoCompression,"",255,true,TeRasterParams::TeExpansible))
 	{
 		db->close();
 		cout << "Fail to import the first image\n\n!";
@@ -114,7 +114,7 @@ int main()
 	layer = new TeLayer(layerName, db);
 
 	// Mosaic the second raster to the same layer
-	if (!TeImportRaster(layer, &img2, 256, 256, TeNoCompression, "", 255, true, TeExpansible))
+	if (!TeImportRaster(layer, &img2, 256, 256, TeRasterParams::TeNoCompression, "", 255, true, TeRasterParams::TeExpansible))
 	{
 		db->close();
 		cout << "Fail to import the second image\n\n!";
@@ -127,6 +127,7 @@ int main()
 
 	// Close the database
 	db->close();
+	cout << "\nPress enter...";
 	getchar();
 	return 0;
 }
diff --git a/examples/mosaicTIFFImages/mosaicTIFFImages.dsp b/examples/mosaicTIFFImages/mosaicTIFFImages.dsp
old mode 100644
new mode 100755
diff --git a/examples/mosaicTIFFImages/mosaicTIFFImages.dsw b/examples/mosaicTIFFImages/mosaicTIFFImages.dsw
old mode 100644
new mode 100755
diff --git a/examples/mosaicTIFFImages/mosaicTIFFImages.pro b/examples/mosaicTIFFImages/mosaicTIFFImages.pro
old mode 100644
new mode 100755
index faa14d5..3d0dc15
--- a/examples/mosaicTIFFImages/mosaicTIFFImages.pro
+++ b/examples/mosaicTIFFImages/mosaicTIFFImages.pro
@@ -1,47 +1,10 @@
-TEMPLATE = app
-TARGET = mosaicTIFFImages
-CONFIG += qt warn_on thread debug rtti exceptions
-LANGUAGE = C++
-
-OBJECTS_DIR = .obj
+include( ../base/base.pro )
 
 SOURCES	+= \
 	mosaicTIFFImages.cpp \
-	../src/terralib/drivers/MySQL/TeMySQL.cpp
+	../../src/terralib/drivers/MySQL/TeMySQL.cpp
 
 HEADERS	+= \
-	../src/terralib/drivers/MySQL/TeMySQL.h
+	../../src/terralib/drivers/MySQL/TeMySQL.h
 	
-INCLUDEPATH += \
-	. \
-	.. \
-	../src/terralib/kernel \
-	../src/terralib/application \
-	../src/terralib/functions \
-	../src/terralib/stat \
-	../src/shapelib \
-	../src/zlib \
-	../src/terralib/application/qt \
-	../src/terralib/drivers/MySQL \
-	../src/terralib/drivers/MySQL/include \
-	../src/terralib/drivers/OracleSpatial \
-	../src/terralib/drivers/OracleSpatial/OCI/include \
-	../src/terralib/drivers/PostgreSQL \
-	../src/terralib/drivers/PostgreSQL/includepg 
-
-LIBS += \
-	-L../terralibx/shapelib \
-	-L../terralibx/stat \
-	-L../terralibx/terralib \
-	-L../terralibx/tiff \
-	-L../terralibx/PostgreSQL \
-	-L/usr/local/lib -L/usr/lib -L/usr/lib/mysql -L/usr/local/lib/mysql \
-	-L/usr/local/mysql -L/usr/local/mysql/lib -L. \
-    -lshapelib -lstat -lterralib -ltiff -lmysqlclient -lpq -lcrypt
-
-
-
-
-
-
 
diff --git a/examples/mosaicTIFFImages/mosaicTIFFImages.sln b/examples/mosaicTIFFImages/mosaicTIFFImages.sln
new file mode 100755
index 0000000..2eb0a48
--- /dev/null
+++ b/examples/mosaicTIFFImages/mosaicTIFFImages.sln
@@ -0,0 +1,47 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mosaicTIFFImages", "mosaicTIFFImages.vcproj", "{AC29CA10-2B75-494F-A370-6767C7AB5FC1}"
+	ProjectSection(ProjectDependencies) = postProject
+		{40917057-E283-4760-B645-D2BA2D7E5A35} = {40917057-E283-4760-B645-D2BA2D7E5A35}
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C} = {BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "terralib", "..\..\terralibw\terralib\terralib.vcproj", "{40917057-E283-4760-B645-D2BA2D7E5A35}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjpeg", "..\..\terralibw\libjpeg\libjpeg.vcproj", "{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tiff", "..\..\terralibw\tiff\tiff.vcproj", "{317A551C-8160-41C0-ACFC-A7C3C850D0F4}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		Debug = Debug
+		Release = Release
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.ActiveCfg = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.Build.0 = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.ActiveCfg = Release|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.Build.0 = Release|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Debug.ActiveCfg = Debug|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Debug.Build.0 = Debug|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Release.ActiveCfg = Release|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Release.Build.0 = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.ActiveCfg = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.Build.0 = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.ActiveCfg = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.Build.0 = Release|Win32
+		{317A551C-8160-41C0-ACFC-A7C3C850D0F4}.Debug.ActiveCfg = Debug|Win32
+		{317A551C-8160-41C0-ACFC-A7C3C850D0F4}.Debug.Build.0 = Debug|Win32
+		{317A551C-8160-41C0-ACFC-A7C3C850D0F4}.Release.ActiveCfg = Release|Win32
+		{317A551C-8160-41C0-ACFC-A7C3C850D0F4}.Release.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
diff --git a/examples/mosaicTIFFImages/mosaicTIFFImages.vcproj b/examples/mosaicTIFFImages/mosaicTIFFImages.vcproj
new file mode 100755
index 0000000..83b7123
--- /dev/null
+++ b/examples/mosaicTIFFImages/mosaicTIFFImages.vcproj
@@ -0,0 +1,167 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="mosaicTIFFImages"
+	ProjectGUID="{AC29CA10-2B75-494F-A370-6767C7AB5FC1}">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\Debug\"
+			IntermediateDirectory="..\Debug\"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="-Zm200 -GX -w34100 -w34189"
+				Optimization="4"
+				AdditionalIncludeDirectories=".;..;..\..\src\terralib\kernel;..\..\src\zlib;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include"
+				PreprocessorDefinitions="UNICODE,WIN32"
+				GeneratePreprocessedFile="0"
+				MinimalRebuild="TRUE"
+				ExceptionHandling="TRUE"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				AssemblerListingLocation="..\Debug\"
+				ObjectFile="..\Debug\"
+				ProgramDataBaseFileName=".\"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Debug/terralib/terralib.lib ../../Debug/libjpeg/libjpeg.lib ../../Debug/tiff/tiff.lib ../../Debug/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
+				OutputFile="..\Debug\mosaicTIFFImages.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreDefaultLibraryNames="msvcrt.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				WarningLevel="0"
+				DefaultCharType="0"
+				EnableErrorChecks="1"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\Release\"
+			IntermediateDirectory="..\Release\"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="-Zm200 -GX -w34100 -w34189"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories=".;..;..\..\src\terralib\kernel;..\..\src\zlib;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include"
+				PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE"
+				GeneratePreprocessedFile="0"
+				StringPooling="TRUE"
+				MinimalRebuild="FALSE"
+				ExceptionHandling="TRUE"
+				RuntimeLibrary="2"
+				BufferSecurityCheck="TRUE"
+				EnableFunctionLevelLinking="TRUE"
+				RuntimeTypeInfo="FALSE"
+				AssemblerListingLocation="..\Debug\"
+				ObjectFile="..\Debug\"
+				ProgramDataBaseFileName=".\"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Release/terralib/terralib.lib ../../Release/libjpeg/libjpeg.lib ../../Release/tiff/tiff.lib ../../Release/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
+				OutputFile="..\Release\mosaicTIFFImages.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				WarningLevel="0"
+				DefaultCharType="0"
+				EnableErrorChecks="1"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath="mosaicTIFFImages.cpp">
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.h">
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/proxMatrixAndSpatialStatistics/.cdtproject b/examples/proxMatrixAndSpatialStatistics/.cdtproject
old mode 100644
new mode 100755
diff --git a/examples/proxMatrixAndSpatialStatistics/.project b/examples/proxMatrixAndSpatialStatistics/.project
old mode 100644
new mode 100755
diff --git a/examples/proxMatrixAndSpatialStatistics/Makefile b/examples/proxMatrixAndSpatialStatistics/Makefile
old mode 100644
new mode 100755
index 5a09343..150ad4c
--- a/examples/proxMatrixAndSpatialStatistics/Makefile
+++ b/examples/proxMatrixAndSpatialStatistics/Makefile
@@ -1,23 +1,33 @@
 all: proxMatrixAndSpatialStatistics
 
-shapelib:
-	cd ../terralibx/shapelib; make
-
-tiff:
-	cd ../terralibx/tiff; make
+debug: proxMatrixAndSpatialStatistics_dbg
 
 terralib:
-	cd ../terralibx/terralib; make
+	cd ../../terralibx/terralib; make
 
+terralib_dbg:
+	cd ../../terralibx/terralib; make debug
+	
 stat:
-	cd ../terralibx/stat; make
+	cd ../../terralibx/stat; make
 
-proxMatrixAndSpatialStatistics: shapelib tiff terralib stat
+proxMatrixAndSpatialStatistics: terralib stat
 	qmake -o makeProxMatrixAndSpatialStatistics proxMatrixAndSpatialStatistics.pro; make -f makeProxMatrixAndSpatialStatistics
 
+proxMatrixAndSpatialStatistics_dbg: terralib_dbg stat
+	qmake -o makeProxMatrixAndSpatialStatistics.debug proxMatrixAndSpatialStatistics.pro TE_PROJECT_TYPE=DEBUG; \
+	make -f makeProxMatrixAndSpatialStatistics.debug
+
 clean:
 	if \
 		test -f makeProxMatrixAndSpatialStatistics; \
 	then \
 		make -f makeProxMatrixAndSpatialStatistics distclean; rm -f makeProxMatrixAndSpatialStatistics; \
+	fi
+	
+clean:
+	if \
+		test -f makeProxMatrixAndSpatialStatistics.debug; \
+	then \
+		make -f makeProxMatrixAndSpatialStatistics.debug distclean; rm -f makeProxMatrixAndSpatialStatistics.debug; \
 	fi
\ No newline at end of file
diff --git a/examples/proxMatrixAndSpatialStatistics/proxMatrixAndSpatialStatistics.cpp b/examples/proxMatrixAndSpatialStatistics/proxMatrixAndSpatialStatistics.cpp
old mode 100644
new mode 100755
index b0e5169..6ee730e
--- a/examples/proxMatrixAndSpatialStatistics/proxMatrixAndSpatialStatistics.cpp
+++ b/examples/proxMatrixAndSpatialStatistics/proxMatrixAndSpatialStatistics.cpp
@@ -31,7 +31,6 @@ of this library and its documentation.
 
 #include <TeSTElementSet.h>
 #include <TeSTEFunctionsDB.h>
-#include <TeInitQuerierStrategy.h>
 #include <TeGeneralizedProxMatrix.h>
 #include <TeSpatialStatistics.h>
 #include <TeMySQL.h>
@@ -40,11 +39,11 @@ int main()
 {	
  	// Datatabase server parameters
 	string host = "localhost";
-	string dbname = "Terralib";
+	string dbname = "DB320RC1";
 	string user = "root";
-	string password = "ferreira";
+	string password = "vinhas";
 
-	// Open a connection to the TerraTeste MySQL database 
+	// Open a connection to the DB320RC1 MySQL database 
 	TeDatabase* db = new TeMySQL();
 	if (!db->connect(host, user, password, dbname))
 	{
@@ -57,27 +56,24 @@ int main()
 		
 	
 	// Opens a connection to a TerraLib database 
-    // Loads a layer named DistritosSP 
-	TeLayer* DistritosSP =  new TeLayer("DistritosSP");
+    	// Loads a layer named DistritosSaoPaulo 
+	TeLayer* DistritosSP =  new TeLayer("Distritos");
 	if (!db->loadLayer(DistritosSP))
 	{
 	    cout << "Fail to load the layer!" << db->errorMessage() << endl;
 		db->close();
 		cout << endl << "Press Enter\n";
 		getchar();
-        return 1;
+        	return 1;
 	}
 
-	// Inits querier strategies
-	TeInitQuerierStrategies();
-
 	// Creates a STElementSet from DistritosSP layer 
 	TeSTElementSet steSet(DistritosSP);
 
 	// Fills the STElementSet only with the attribute "Populac" to calculate statistics 
 	//and without geometries
 	vector<string> attrs;
-	attrs.push_back ("DistritosSP.Populac");
+	attrs.push_back ("Distritos.Pop91");
 
 	if(!TeSTOSetBuildDB(&steSet, false, false, attrs))
 	{
@@ -91,17 +87,11 @@ int main()
 	cout << "Number of elements: " <<  steSet.numElements() << endl;
 
 	// Constructs the proximity matrix
-	TeGeneralizedProxMatrix				proxMat;
-	
-	TeProxMatrixLocalAdjacencyStrategy		sc_adj (&steSet, TePOLYGONS);
-	TeProxMatrixNoWeightsStrategy			sw_no;
-	TeProxMatrixNoSlicingStrategy			ss_no;
+	TeProxMatrixLocalAdjacencyStrategy			sc_adj (&steSet, TePOLYGONS);
+	TeGeneralizedProxMatrix<TeSTElementSet>		proxMat(&sc_adj);
 	
-	proxMat.setCurrentSlicingStrategy(&ss_no);
-	proxMat.setCurrentWeightsStrategy(&sw_no);
-	proxMat.setCurrentConstructionStrategy(&sc_adj);
-
-	if(!proxMat.ConstructMatrix())
+	cout << "Calculating the proximity matrix..." << endl;
+	if(!proxMat.constructMatrix())
 	{
 		cout << "Error building proximity matrix! " << endl;
 		return 1;
@@ -151,7 +141,7 @@ int main()
 
 	// Inserts the generated attributes (Z and WZ) in the DistritosSP 
 	// table 
-	if(!TeUpdateDBFromSet (&steSet, "DistritosSP"))
+	if(!TeUpdateDBFromSet (&steSet, "Distritos"))
 	{
 		cout << "Error updating database! " << endl;
 		return 1;
diff --git a/examples/proxMatrixAndSpatialStatistics/proxMatrixAndSpatialStatistics.dsp b/examples/proxMatrixAndSpatialStatistics/proxMatrixAndSpatialStatistics.dsp
old mode 100644
new mode 100755
index 890aab9..042244a
--- a/examples/proxMatrixAndSpatialStatistics/proxMatrixAndSpatialStatistics.dsp
+++ b/examples/proxMatrixAndSpatialStatistics/proxMatrixAndSpatialStatistics.dsp
@@ -42,7 +42,7 @@ RSC=rc.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drive [...]
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\terralibw\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\include" /I "..\..\src [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "NDEBUG"
 # ADD RSC /l 0x416 /d "NDEBUG"
@@ -51,7 +51,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\shapelib\Release\shapelib.lib ..\..\terralibw\freetype\Release\freetype.lib ..\..\terralibw\tiff\Release\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\Postg [...]
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib  /nologo /subsystem:console /machine:I386 /out:"../Release/proxMatrixAndSpatialStatistics.exe"
 # SUBTRACT LINK32 /pdb:none
 
 !ELSEIF  "$(CFG)" == "proxMatrixAndSpatialStatistics - Win32 Debug"
@@ -68,7 +68,7 @@ LINK32=link.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terra [...]
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\terralibw\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\include" /I " [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "_DEBUG"
 # ADD RSC /l 0x416 /d "_DEBUG"
@@ -77,7 +77,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\shapelib\Debug\shapelib.lib ..\..\terralibw\freetype\Debug\freetype.lib ..\..\terralibw\tiff\Debug\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\li [...]
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\libpq.lib /nologo /subsystem:console /debug /machine:I386 /out:"../Debug/proxMatrixAndSpatialStatistics.exe" /pdbtype:sept
 # SUBTRACT LINK32 /pdb:none
 
 !ENDIF 
@@ -99,7 +99,7 @@ SOURCE=..\..\src\terralib\drivers\MySQL\TeMySQL.cpp
 # End Source File
 # Begin Source File
 
-SOURCE=..\..\src\terralib\functions\TeSpatialStatistics.cpp
+SOURCE=..\..\src\terralib\stat\TeSpatialStatistics.cpp
 # End Source File
 # End Group
 # Begin Group "Header Files"
@@ -111,7 +111,7 @@ SOURCE=..\..\src\terralib\drivers\MySQL\TeMySQL.h
 # End Source File
 # Begin Source File
 
-SOURCE=..\..\src\terralib\functions\TeSpatialStatistics.h
+SOURCE=..\..\src\terralib\stat\TeSpatialStatistics.h
 # End Source File
 # End Group
 # Begin Group "Resource Files"
diff --git a/examples/proxMatrixAndSpatialStatistics/proxMatrixAndSpatialStatistics.dsw b/examples/proxMatrixAndSpatialStatistics/proxMatrixAndSpatialStatistics.dsw
old mode 100644
new mode 100755
index e828c1b..870c115
--- a/examples/proxMatrixAndSpatialStatistics/proxMatrixAndSpatialStatistics.dsw
+++ b/examples/proxMatrixAndSpatialStatistics/proxMatrixAndSpatialStatistics.dsw
@@ -3,7 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
 
 ###############################################################################
 
-Project: "proxMatrixAndSpatialStatistics"=".\proxMatrixAndSpatialStatistics.dsp" - Package Owner=<4>
+Project: "proxMatrixAndSpatialStatistics"=.\proxMatrixAndSpatialStatistics.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -18,52 +18,7 @@ Package=<4>
 
 ###############################################################################
 
-Project: "freetype"="..\..\terralibw\freetype\freetype.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "shapelib"="..\..\terralibw\shapelib\shapelib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "terralib"="..\..\terralibw\terralib\terralib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name freetype
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name shapelib
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name tiff
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "tiff"="..\..\terralibw\tiff\tiff.dsp" - Package Owner=<4>
+Project: "terralib"=..\..\terralibw\terralib\terralib.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
diff --git a/examples/proxMatrixAndSpatialStatistics/proxMatrixAndSpatialStatistics.pro b/examples/proxMatrixAndSpatialStatistics/proxMatrixAndSpatialStatistics.pro
old mode 100644
new mode 100755
index 4998f7f..a9e765d
--- a/examples/proxMatrixAndSpatialStatistics/proxMatrixAndSpatialStatistics.pro
+++ b/examples/proxMatrixAndSpatialStatistics/proxMatrixAndSpatialStatistics.pro
@@ -1,47 +1,9 @@
-TEMPLATE = app
-TARGET = proxMatrixAndSpatialStatistics
-CONFIG += qt warn_on thread debug rtti exceptions
-LANGUAGE = C++
-
-OBJECTS_DIR = .obj
+include( ../base/base.pro )
 
 SOURCES	+= \
 	proxMatrixAndSpatialStatistics.cpp \
-	../src/terralib/drivers/MySQL/TeMySQL.cpp
+	../../src/terralib/drivers/MySQL/TeMySQL.cpp
 
 HEADERS	+= \
-	../src/terralib/drivers/MySQL/TeMySQL.h
+	../../src/terralib/drivers/MySQL/TeMySQL.h
 	
-INCLUDEPATH += \
-	. \
-	.. \
-	../src/terralib/kernel \
-	../src/terralib/application \
-	../src/terralib/functions \
-	../src/terralib/stat \
-	../src/shapelib \
-	../src/zlib \
-	../src/terralib/application/qt \
-	../src/terralib/drivers/MySQL \
-	../src/terralib/drivers/MySQL/include \
-	../src/terralib/drivers/OracleSpatial \
-	../src/terralib/drivers/OracleSpatial/OCI/include \
-	../src/terralib/drivers/PostgreSQL \
-	../src/terralib/drivers/PostgreSQL/includepg 
-
-LIBS += \
-	-L../terralibx/shapelib \
-	-L../terralibx/stat \
-	-L../terralibx/terralib \
-	-L../terralibx/tiff \
-	-L../terralibx/PostgreSQL \
-	-L/usr/local/lib -L/usr/lib -L/usr/lib/mysql -L/usr/local/lib/mysql \
-	-L/usr/local/mysql -L/usr/local/mysql/lib -L. \
-    -lshapelib -lstat -lterralib -ltiff -lmysqlclient -lpq -lcrypt
-
-
-
-
-
-
-
diff --git a/examples/proxMatrixAndSpatialStatistics/proxMatrixAndSpatialStatistics.sln b/examples/proxMatrixAndSpatialStatistics/proxMatrixAndSpatialStatistics.sln
new file mode 100755
index 0000000..226f6f1
--- /dev/null
+++ b/examples/proxMatrixAndSpatialStatistics/proxMatrixAndSpatialStatistics.sln
@@ -0,0 +1,53 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "proxMatrixAndSpatialStatistics", "proxMatrixAndSpatialStatistics.vcproj", "{AD5F66F5-446F-477B-98C3-714590D564FE}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "terralib", "..\..\terralibw\terralib\terralib.vcproj", "{DE2477F4-EE7D-4C9E-B304-332EB49A364F}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "stat", "..\..\terralibw\stat\stat.vcproj", "{1CF4791C-050D-4C0F-BF5F-F51F22188FF4}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjpeg", "..\..\terralibw\libjpeg\libjpeg.vcproj", "{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tiff", "..\..\terralibw\tiff\tiff.vcproj", "{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		Debug = Debug
+		Release = Release
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{AD5F66F5-446F-477B-98C3-714590D564FE}.Debug.ActiveCfg = Debug|Win32
+		{AD5F66F5-446F-477B-98C3-714590D564FE}.Debug.Build.0 = Debug|Win32
+		{AD5F66F5-446F-477B-98C3-714590D564FE}.Release.ActiveCfg = Release|Win32
+		{AD5F66F5-446F-477B-98C3-714590D564FE}.Release.Build.0 = Release|Win32
+		{DE2477F4-EE7D-4C9E-B304-332EB49A364F}.Debug.ActiveCfg = Debug|Win32
+		{DE2477F4-EE7D-4C9E-B304-332EB49A364F}.Debug.Build.0 = Debug|Win32
+		{DE2477F4-EE7D-4C9E-B304-332EB49A364F}.Release.ActiveCfg = Release|Win32
+		{DE2477F4-EE7D-4C9E-B304-332EB49A364F}.Release.Build.0 = Release|Win32
+		{1CF4791C-050D-4C0F-BF5F-F51F22188FF4}.Debug.ActiveCfg = Debug|Win32
+		{1CF4791C-050D-4C0F-BF5F-F51F22188FF4}.Debug.Build.0 = Debug|Win32
+		{1CF4791C-050D-4C0F-BF5F-F51F22188FF4}.Release.ActiveCfg = Release|Win32
+		{1CF4791C-050D-4C0F-BF5F-F51F22188FF4}.Release.Build.0 = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.ActiveCfg = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.Build.0 = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.ActiveCfg = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.Build.0 = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.ActiveCfg = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.Build.0 = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.ActiveCfg = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
diff --git a/examples/proxMatrixAndSpatialStatistics/proxMatrixAndSpatialStatistics.vcproj b/examples/proxMatrixAndSpatialStatistics/proxMatrixAndSpatialStatistics.vcproj
new file mode 100755
index 0000000..f08c218
--- /dev/null
+++ b/examples/proxMatrixAndSpatialStatistics/proxMatrixAndSpatialStatistics.vcproj
@@ -0,0 +1,203 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="proxMatrixAndSpatialStatistics"
+	ProjectGUID="{38377F38-0982-4920-99D7-370934E022B2}"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Debug"
+			IntermediateDirectory=".\Debug"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;..;..\..\src\terralib\kernel;..\..\src\terralib\functions;..\..\src\terralib\stat;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				PrecompiledHeaderFile=".\Debug/proxMatrixAndSpatialStatistics.pch"
+				AssemblerListingLocation=".\Debug/"
+				ObjectFile=".\Debug/"
+				ProgramDataBaseFileName=".\Debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="4"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Debug/terralib/terralib.lib ../../Debug/libjpeg/libjpeg.lib ../../Debug/tiff/tiff.lib ../../Debug/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib"
+				OutputFile="../Debug/proxMatrixAndSpatialStatistics.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=".\Debug/proxMatrixAndSpatialStatistics.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\Debug/proxMatrixAndSpatialStatistics.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1046"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Release"
+			IntermediateDirectory=".\Release"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories=".;..;..\..\src\terralib\kernel;..\..\src\terralib\functions;..\..\src\terralib\stat;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="TRUE"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\Release/proxMatrixAndSpatialStatistics.pch"
+				AssemblerListingLocation=".\Release/"
+				ObjectFile=".\Release/"
+				ProgramDataBaseFileName=".\Release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Release/terralib/terralib.lib ../../Release/libjpeg/libjpeg.lib ../../Release/tiff/tiff.lib ../../Release/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib"
+				OutputFile="../Release/proxMatrixAndSpatialStatistics.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				ProgramDatabaseFile=".\Release/proxMatrixAndSpatialStatistics.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\Release/proxMatrixAndSpatialStatistics.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1046"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath="proxMatrixAndSpatialStatistics.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.h">
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\stat\TeSpatialStatistics.h">
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/querierFromLayer/.cdtproject b/examples/querierFromLayer/.cdtproject
old mode 100644
new mode 100755
diff --git a/examples/querierFromLayer/.project b/examples/querierFromLayer/.project
old mode 100644
new mode 100755
diff --git a/examples/querierFromLayer/Makefile b/examples/querierFromLayer/Makefile
old mode 100644
new mode 100755
index e129ab1..b1056f9
--- a/examples/querierFromLayer/Makefile
+++ b/examples/querierFromLayer/Makefile
@@ -1,23 +1,30 @@
 all: querierFromLayer
 
-shapelib:
-	cd ../terralibx/shapelib; make
-
-tiff:
-	cd ../terralibx/tiff; make
+debug: querierFromLayer_dbg
 
 terralib:
-	cd ../terralibx/terralib; make
-
-stat:
-	cd ../terralibx/stat; make
+	cd ../../terralibx/terralib; make
 
-querierFromLayer: shapelib tiff terralib stat
+terralib_dbg:
+	cd ../../terralibx/terralib; make debug
+	
+querierFromLayer: terralib
 	qmake -o makeQuerierFromLayer querierFromLayer.pro; make -f makeQuerierFromLayer
 
+querierFromLayer_dbg: terralib_dbg
+	qmake -o makeQuerierFromLayer.debug querierFromLayer.pro TE_PROJECT_TYPE=DEBUG; \
+	make -f makeQuerierFromLayer.debug
+
 clean:
 	if \
 		test -f makeQuerierFromLayer; \
 	then \
 		make -f makeQuerierFromLayer distclean; rm -f makeQuerierFromLayer; \
+	fi
+	
+clean_debug:
+	if \
+		test -f makeQuerierFromLayer.debug; \
+	then \
+		make -f makeQuerierFromLayer.debug distclean; rm -f makeQuerierFromLayer.debug; \
 	fi
\ No newline at end of file
diff --git a/examples/querierFromLayer/querierFromLayer.cpp b/examples/querierFromLayer/querierFromLayer.cpp
old mode 100644
new mode 100755
index 5916836..607ea51
--- a/examples/querierFromLayer/querierFromLayer.cpp
+++ b/examples/querierFromLayer/querierFromLayer.cpp
@@ -28,7 +28,6 @@ of this library and its documentation.
 
 #include "TeMySQL.h"
 #include "TeQuerier.h"
-#include "TeInitQuerierStrategy.h"
 #include "TeQuerierParams.h"
 
 #include <time.h>
@@ -42,41 +41,45 @@ main()
 	
 	// Datatabase server parameters
      string host = "localhost";
-     string dbname = "terralib";
+     string dbname = "DB320RC1";
      string user = "root";
-     string pass = "ferreira";
+     string pass = "vinhas";
 
 	 // Connects to database
      TeDatabase* db_ = new TeMySQL();
      if (!db_->connect(host,user,pass,dbname))
      {
          cout << "Error: " << db_->errorMessage() << endl;
+		 getchar();
          return 1;
      }
 
 	// Load the layer 
-	TeLayer* ocorrencias = new TeLayer("OcorrenciasPoA");
+	TeLayer* ocorrencias = new TeLayer("Cadastro_Escolas");
 	if (!db_->loadLayer(ocorrencias))
     {
         cout << "Error: " << db_->errorMessage() << endl; 
 		db_->close(); 
+		getchar();
         return 1;
     }
 		
 	bool loadAllAttributes = true;
 	bool loadGeometries = false;
 
-	// Init querier strategies
-	TeInitQuerierStrategies();
-
-	// Set querier parameters - load all attributes and no geometries of the layer "armadilhas"
+	// Set querier parameters - load all attributes and no geometries of the layer "ocorrencias"
 	TeQuerierParams querierParams(loadGeometries, loadAllAttributes);
 	querierParams.setParams(ocorrencias);
 
 	TeQuerier  querier(querierParams);
 
 	// Load instances from layer based in the querier parameters 
-	querier.loadInstances(); 
+	if(!querier.loadInstances())
+	{
+		cout << "Error loading instances... " << endl; 
+		db_->close(); 
+        return 1;
+	}
 
 	// Return a list of the loaded attributes  
 	TeAttributeList attrList = querier.getAttrList(); 
@@ -106,7 +109,7 @@ main()
 		}
 	}
 
-	cout << " End " << endl;
+	cout << endl << " Press enter! " << endl;
 	getchar(); 
 	db_->close ();
 	return 0;
diff --git a/examples/querierFromLayer/querierFromLayer.dsp b/examples/querierFromLayer/querierFromLayer.dsp
old mode 100644
new mode 100755
index c5a4cbf..76b375f
--- a/examples/querierFromLayer/querierFromLayer.dsp
+++ b/examples/querierFromLayer/querierFromLayer.dsp
@@ -42,7 +42,7 @@ RSC=rc.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drive [...]
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\terralibw\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\include" /I "..\..\src [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "NDEBUG"
 # ADD RSC /l 0x416 /d "NDEBUG"
@@ -51,7 +51,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\shapelib\Release\shapelib.lib ..\..\terralibw\freetype\Release\freetype.lib ..\..\terralibw\tiff\Release\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\Postg [...]
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib /nologo /subsystem:console /machine:I386 /out:"../Release/querierFromLayer.exe"
 # SUBTRACT LINK32 /pdb:none
 
 !ELSEIF  "$(CFG)" == "querierFromLayer - Win32 Debug"
@@ -68,7 +68,7 @@ LINK32=link.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terra [...]
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\terralibw\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\include" /I " [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "_DEBUG"
 # ADD RSC /l 0x416 /d "_DEBUG"
@@ -77,7 +77,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\shapelib\Debug\shapelib.lib ..\..\terralibw\freetype\Debug\freetype.lib ..\..\terralibw\tiff\Debug\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\li [...]
+# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\libpq.lib /nologo /subsystem:console /debug /machine:I386 /out:"../Debug/querierFromLayer.exe" /pdbtype:sept
 # SUBTRACT LINK32 /pdb:none
 
 !ENDIF 
diff --git a/examples/querierFromLayer/querierFromLayer.dsw b/examples/querierFromLayer/querierFromLayer.dsw
old mode 100644
new mode 100755
index cd9ca09..4285d67
--- a/examples/querierFromLayer/querierFromLayer.dsw
+++ b/examples/querierFromLayer/querierFromLayer.dsw
@@ -3,7 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
 
 ###############################################################################
 
-Project: "querierFromLayer"=".\querierFromLayer.dsp" - Package Owner=<4>
+Project: "querierFromLayer"=.\querierFromLayer.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -18,31 +18,7 @@ Package=<4>
 
 ###############################################################################
 
-Project: "freetype"="..\..\terralibw\freetype\freetype.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "shapelib"="..\..\terralibw\shapelib\shapelib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "terralib"="..\..\terralibw\terralib\terralib.dsp" - Package Owner=<4>
+Project: "terralib"=..\..\terralibw\terralib\terralib.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -53,24 +29,6 @@ Package=<4>
     Begin Project Dependency
     Project_Dep_Name freetype
     End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name shapelib
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name tiff
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "tiff"="..\..\terralibw\tiff\tiff.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
 }}}
 
 ###############################################################################
diff --git a/examples/querierFromLayer/querierFromLayer.pro b/examples/querierFromLayer/querierFromLayer.pro
old mode 100644
new mode 100755
index 34282ef..6dcf064
--- a/examples/querierFromLayer/querierFromLayer.pro
+++ b/examples/querierFromLayer/querierFromLayer.pro
@@ -1,47 +1,9 @@
-TEMPLATE = app
-TARGET = querierFromLayer
-CONFIG += qt warn_on thread debug rtti exceptions
-LANGUAGE = C++
-
-OBJECTS_DIR = .obj
+include( ../base/base.pro )
 
 SOURCES	+= \
 	querierFromLayer.cpp \
-	../src/terralib/drivers/MySQL/TeMySQL.cpp
+	../../src/terralib/drivers/MySQL/TeMySQL.cpp
 
 HEADERS	+= \
-	../src/terralib/drivers/MySQL/TeMySQL.h
-	
-INCLUDEPATH += \
-	. \
-	.. \
-	../src/terralib/kernel \
-	../src/terralib/application \
-	../src/terralib/functions \
-	../src/terralib/stat \
-	../src/shapelib \
-	../src/zlib \
-	../src/terralib/application/qt \
-	../src/terralib/drivers/MySQL \
-	../src/terralib/drivers/MySQL/include \
-	../src/terralib/drivers/OracleSpatial \
-	../src/terralib/drivers/OracleSpatial/OCI/include \
-	../src/terralib/drivers/PostgreSQL \
-	../src/terralib/drivers/PostgreSQL/includepg 
-
-LIBS += \
-	-L../terralibx/shapelib \
-	-L../terralibx/stat \
-	-L../terralibx/terralib \
-	-L../terralibx/tiff \
-	-L../terralibx/PostgreSQL \
-	-L/usr/local/lib -L/usr/lib -L/usr/lib/mysql -L/usr/local/lib/mysql \
-	-L/usr/local/mysql -L/usr/local/mysql/lib -L. \
-    -lshapelib -lstat -lterralib -ltiff -lmysqlclient -lpq -lcrypt
-
-
-
-
-
-
+	../../src/terralib/drivers/MySQL/TeMySQL.h
 
diff --git a/examples/querierFromLayer/querierFromLayer.sln b/examples/querierFromLayer/querierFromLayer.sln
new file mode 100755
index 0000000..cfb38df
--- /dev/null
+++ b/examples/querierFromLayer/querierFromLayer.sln
@@ -0,0 +1,45 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "querierFromLayer", "querierFromLayer.vcproj", "{E8067D9F-EB6E-4A09-A107-29A2B3255166}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "terralib", "..\..\terralibw\terralib\terralib.vcproj", "{99BC87CA-140D-4A99-803C-DF078430A6C8}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjpeg", "..\..\terralibw\libjpeg\libjpeg.vcproj", "{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tiff", "..\..\terralibw\tiff\tiff.vcproj", "{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		Debug = Debug
+		Release = Release
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{E8067D9F-EB6E-4A09-A107-29A2B3255166}.Debug.ActiveCfg = Debug|Win32
+		{E8067D9F-EB6E-4A09-A107-29A2B3255166}.Debug.Build.0 = Debug|Win32
+		{E8067D9F-EB6E-4A09-A107-29A2B3255166}.Release.ActiveCfg = Release|Win32
+		{E8067D9F-EB6E-4A09-A107-29A2B3255166}.Release.Build.0 = Release|Win32
+		{99BC87CA-140D-4A99-803C-DF078430A6C8}.Debug.ActiveCfg = Debug|Win32
+		{99BC87CA-140D-4A99-803C-DF078430A6C8}.Debug.Build.0 = Debug|Win32
+		{99BC87CA-140D-4A99-803C-DF078430A6C8}.Release.ActiveCfg = Release|Win32
+		{99BC87CA-140D-4A99-803C-DF078430A6C8}.Release.Build.0 = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.ActiveCfg = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.Build.0 = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.ActiveCfg = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.Build.0 = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.ActiveCfg = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.Build.0 = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.ActiveCfg = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
diff --git a/examples/querierFromLayer/querierFromLayer.vcproj b/examples/querierFromLayer/querierFromLayer.vcproj
new file mode 100755
index 0000000..1e94eea
--- /dev/null
+++ b/examples/querierFromLayer/querierFromLayer.vcproj
@@ -0,0 +1,201 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="querierFromLayer"
+	ProjectGUID="{80AAE397-DA79-440F-B1EF-F7A304FAA94F}"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Debug"
+			IntermediateDirectory=".\Debug"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;..;..\..\src\terralib\kernel;..\..\src\terralib\functions;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				PrecompiledHeaderFile=".\Debug/querierFromLayer.pch"
+				AssemblerListingLocation=".\Debug/"
+				ObjectFile=".\Debug/"
+				ProgramDataBaseFileName=".\Debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="4"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Debug/terralib/terralib.lib ../../Debug/libjpeg/libjpeg.lib ../../Debug/tiff/tiff.lib ../../Debug/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib"
+				OutputFile="../Debug/querierFromLayer.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=".\Debug/querierFromLayer.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\Debug/querierFromLayer.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1046"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Release"
+			IntermediateDirectory=".\Release"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories=".;..;..\..\src\terralib\kernel;..\..\src\terralib\functions;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="TRUE"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\Release/querierFromLayer.pch"
+				AssemblerListingLocation=".\Release/"
+				ObjectFile=".\Release/"
+				ProgramDataBaseFileName=".\Release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Release/terralib/terralib.lib ../../Release/libjpeg/libjpeg.lib ../../Release/tiff/tiff.lib ../../Release/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib"
+				OutputFile="../Release/querierFromLayer.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				IgnoreDefaultLibraryNames="libcmt.lib"
+				ProgramDatabaseFile=".\Release/querierFromLayer.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\Release/querierFromLayer.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1046"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath="querierFromLayer.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.h">
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/querierFromTheme/.cdtproject b/examples/querierFromTheme/.cdtproject
old mode 100644
new mode 100755
diff --git a/examples/querierFromTheme/.project b/examples/querierFromTheme/.project
old mode 100644
new mode 100755
diff --git a/examples/querierFromTheme/Makefile b/examples/querierFromTheme/Makefile
old mode 100644
new mode 100755
index 275b031..b257f36
--- a/examples/querierFromTheme/Makefile
+++ b/examples/querierFromTheme/Makefile
@@ -1,23 +1,30 @@
 all: querierFromTheme
 
-shapelib:
-	cd ../terralibx/shapelib; make
-
-tiff:
-	cd ../terralibx/tiff; make
+debug: querierFromTheme_dbg
 
 terralib:
-	cd ../terralibx/terralib; make
-
-stat:
-	cd ../terralibx/stat; make
+	cd ../../terralibx/terralib; make
 
-querierFromTheme: shapelib tiff terralib stat
+terralib_dbg:
+	cd ../../terralibx/terralib; make debug
+	
+querierFromTheme:  terralib 
 	qmake -o makeQuerierFromTheme querierFromTheme.pro; make -f makeQuerierFromTheme
 
+querierFromTheme_dbg:  terralib_dbg 
+	qmake -o makeQuerierFromTheme.debug querierFromTheme.pro TE_PROJECT_TYPE=DEBUG; \
+	make -f makeQuerierFromTheme.debug
+
 clean:
 	if \
 		test -f makeQuerierFromTheme; \
 	then \
 		make -f makeQuerierFromTheme distclean; rm -f makeQuerierFromTheme; \
+	fi
+	
+clean_debug:
+	if \
+		test -f makeQuerierFromTheme.debug; \
+	then \
+		make -f makeQuerierFromTheme.debug distclean; rm -f makeQuerierFromTheme.debug; \
 	fi
\ No newline at end of file
diff --git a/examples/querierFromTheme/querierFromTheme.cpp b/examples/querierFromTheme/querierFromTheme.cpp
old mode 100644
new mode 100755
index 924e8b6..0199cf1
--- a/examples/querierFromTheme/querierFromTheme.cpp
+++ b/examples/querierFromTheme/querierFromTheme.cpp
@@ -28,7 +28,6 @@ of this library and its documentation.
 
 #include "TeMySQL.h"
 #include "TeQuerier.h"
-#include "TeInitQuerierStrategy.h"
 #include "TeQuerierParams.h"
 
 #include <time.h>
@@ -42,9 +41,9 @@ main()
 	
 	// Datatabase server parameters
 	string host = "localhost";
-	string dbname = "TerraTeste303";
-	string user = "";
-	string password = "";
+	string dbname = "DB320RC1";
+	string user = "root";
+	string password = "vinhas";
 
 	 // Connects to database
      TeDatabase* db_ = new TeMySQL();
@@ -55,7 +54,7 @@ main()
      }
 
 	// Load the layer 
-	TeTheme* bairros = new TeTheme("T_dist");
+	TeTheme* bairros = new TeTheme("DistritosSaoPaulo");
 	if (!db_->loadTheme(bairros))
     {
         cout << "Error: " << db_->errorMessage() << endl; 
@@ -63,9 +62,6 @@ main()
         return 1;
     }
 		
-	//Init querier strategies
-	TeInitQuerierStrategies();
-
 	//All attributes and geometries
 	bool loadGeometries = true;
 	bool loadAllAttributes = true;
@@ -77,7 +73,8 @@ main()
 	TeQuerier  querier(querierParams);
 
 	// Load instances from layer based in the querier parameters 
-	querier.loadInstances();
+	if(!querier.loadInstances())
+		return 1;
 
 	// Traverse all the instances 
 	TeSTInstance sti;
@@ -105,7 +102,7 @@ main()
 			for(unsigned int i=0; i<polSet.size(); ++i)
 			{
 				TeCoord2D centroid = TeFindCentroid(polSet[i]);
-				string p = "( "+ Te2String(centroid.x()) +", "+  Te2String(centroid.y()) +")"; 
+				string p = "( "+ Te2String(centroid.x(), 7) +", "+  Te2String(centroid.y(), 7) +")"; 
 				cout << " Centroid of the Polygon : " << p << endl; 
 			}
 		}
@@ -117,7 +114,7 @@ main()
 
 			for(unsigned int i=0; i<ponSet.size(); ++i)
 			{
-				string p = "( "+ Te2String(ponSet[i].location().x()) +", "+  Te2String(ponSet[i].location().y()) +")"; 
+				string p = "( "+ Te2String(ponSet[i].location().x(), 7) +", "+  Te2String(ponSet[i].location().y(), 7) +")"; 
 				cout << " Point : " << p << endl; 
 			}
 		}
@@ -125,10 +122,9 @@ main()
 		cout << endl << endl;
 	}
 
-	cout << " End " << endl;
+	cout << " Press enter! " << endl;
 	getchar(); 
 	db_->close ();
-	delete(bairros);
 	return 0;
 }
 
diff --git a/examples/querierFromTheme/querierFromTheme.dsp b/examples/querierFromTheme/querierFromTheme.dsp
old mode 100644
new mode 100755
index 2e9348c..ed2a9e2
--- a/examples/querierFromTheme/querierFromTheme.dsp
+++ b/examples/querierFromTheme/querierFromTheme.dsp
@@ -42,7 +42,7 @@ RSC=rc.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drive [...]
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\terralibw\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\include" /I "..\..\src [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "NDEBUG"
 # ADD RSC /l 0x416 /d "NDEBUG"
@@ -51,7 +51,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\shapelib\Release\shapelib.lib ..\..\terralibw\freetype\Release\freetype.lib ..\..\terralibw\tiff\Release\tiff.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\Postg [...]
+# ADD LINK32 ..\..\terralibw\terralib\Release\terralib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\libpq.lib /nologo /subsystem:console /machine:I386 /out:"../Release/querierFromTheme.exe"
 # SUBTRACT LINK32 /pdb:none
 
 !ELSEIF  "$(CFG)" == "querierFromTheme - Win32 Debug"
@@ -68,7 +68,7 @@ LINK32=link.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terra [...]
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\terralibw\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\include" /I " [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "_DEBUG"
 # ADD RSC /l 0x416 /d "_DEBUG"
@@ -77,7 +77,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\shapelib\Debug\shapelib.lib ..\..\terralibw\freetype\Debug\freetype.lib ..\..\terralibw\tiff\Debug\tiff.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\li [...]
+# ADD LINK32 ..\..\terralibw\terralib\Debug\terralib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\libpq.lib /nologo /subsystem:console /debug /machine:I386 /out:"../Debug/querierFromTheme.exe" /pdbtype:sept
 # SUBTRACT LINK32 /pdb:none
 
 !ENDIF 
diff --git a/examples/querierFromTheme/querierFromTheme.dsw b/examples/querierFromTheme/querierFromTheme.dsw
old mode 100644
new mode 100755
index 2de6ba7..9aa0b3c
--- a/examples/querierFromTheme/querierFromTheme.dsw
+++ b/examples/querierFromTheme/querierFromTheme.dsw
@@ -3,7 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
 
 ###############################################################################
 
-Project: "querierFromTheme"=".\querierFromTheme.dsp" - Package Owner=<4>
+Project: "querierFromTheme"=.\querierFromTheme.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -18,31 +18,7 @@ Package=<4>
 
 ###############################################################################
 
-Project: "freetype"="..\..\terralibw\freetype\freetype.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "shapelib"="..\..\terralibw\shapelib\shapelib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "terralib"="..\..\terralibw\terralib\terralib.dsp" - Package Owner=<4>
+Project: "terralib"=..\..\terralibw\terralib\terralib.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -53,24 +29,6 @@ Package=<4>
     Begin Project Dependency
     Project_Dep_Name freetype
     End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name shapelib
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name tiff
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "tiff"="..\..\terralibw\tiff\tiff.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
 }}}
 
 ###############################################################################
diff --git a/examples/querierFromTheme/querierFromTheme.pro b/examples/querierFromTheme/querierFromTheme.pro
old mode 100644
new mode 100755
index 9e0e2f9..3598bc0
--- a/examples/querierFromTheme/querierFromTheme.pro
+++ b/examples/querierFromTheme/querierFromTheme.pro
@@ -1,47 +1,9 @@
-TEMPLATE = app
-TARGET = querierFromTheme
-CONFIG += qt warn_on thread debug rtti exceptions
-LANGUAGE = C++
-
-OBJECTS_DIR = .obj
+include( ../base/base.pro )
 
 SOURCES	+= \
 	querierFromTheme.cpp \
-	../src/terralib/drivers/MySQL/TeMySQL.cpp
+	../../src/terralib/drivers/MySQL/TeMySQL.cpp
 
 HEADERS	+= \
-	../src/terralib/drivers/MySQL/TeMySQL.h
-	
-INCLUDEPATH += \
-	. \
-	.. \
-	../src/terralib/kernel \
-	../src/terralib/application \
-	../src/terralib/functions \
-	../src/terralib/stat \
-	../src/shapelib \
-	../src/zlib \
-	../src/terralib/application/qt \
-	../src/terralib/drivers/MySQL \
-	../src/terralib/drivers/MySQL/include \
-	../src/terralib/drivers/OracleSpatial \
-	../src/terralib/drivers/OracleSpatial/OCI/include \
-	../src/terralib/drivers/PostgreSQL \
-	../src/terralib/drivers/PostgreSQL/includepg 
-
-LIBS += \
-	-L../terralibx/shapelib \
-	-L../terralibx/stat \
-	-L../terralibx/terralib \
-	-L../terralibx/tiff \
-	-L../terralibx/PostgreSQL \
-	-L/usr/local/lib -L/usr/lib -L/usr/lib/mysql -L/usr/local/lib/mysql \
-	-L/usr/local/mysql -L/usr/local/mysql/lib -L. \
-    -lshapelib -lstat -lterralib -ltiff -lmysqlclient -lpq -lcrypt
-
-
-
-
-
-
+	../../src/terralib/drivers/MySQL/TeMySQL.h
 
diff --git a/examples/querierFromTheme/querierFromTheme.sln b/examples/querierFromTheme/querierFromTheme.sln
new file mode 100755
index 0000000..c08725c
--- /dev/null
+++ b/examples/querierFromTheme/querierFromTheme.sln
@@ -0,0 +1,45 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "querierFromTheme", "querierFromTheme.vcproj", "{5A9FD2D9-E871-4456-B607-7D2609C5AC11}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "terralib", "..\..\terralibw\terralib\terralib.vcproj", "{99BC87CA-140D-4A99-803C-DF078430A6C8}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjpeg", "..\..\terralibw\libjpeg\libjpeg.vcproj", "{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tiff", "..\..\terralibw\tiff\tiff.vcproj", "{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		Debug = Debug
+		Release = Release
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{5A9FD2D9-E871-4456-B607-7D2609C5AC11}.Debug.ActiveCfg = Debug|Win32
+		{5A9FD2D9-E871-4456-B607-7D2609C5AC11}.Debug.Build.0 = Debug|Win32
+		{5A9FD2D9-E871-4456-B607-7D2609C5AC11}.Release.ActiveCfg = Release|Win32
+		{5A9FD2D9-E871-4456-B607-7D2609C5AC11}.Release.Build.0 = Release|Win32
+		{99BC87CA-140D-4A99-803C-DF078430A6C8}.Debug.ActiveCfg = Debug|Win32
+		{99BC87CA-140D-4A99-803C-DF078430A6C8}.Debug.Build.0 = Debug|Win32
+		{99BC87CA-140D-4A99-803C-DF078430A6C8}.Release.ActiveCfg = Release|Win32
+		{99BC87CA-140D-4A99-803C-DF078430A6C8}.Release.Build.0 = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.ActiveCfg = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.Build.0 = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.ActiveCfg = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.Build.0 = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.ActiveCfg = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.Build.0 = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.ActiveCfg = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
diff --git a/examples/querierFromTheme/querierFromTheme.vcproj b/examples/querierFromTheme/querierFromTheme.vcproj
new file mode 100755
index 0000000..8a12624
--- /dev/null
+++ b/examples/querierFromTheme/querierFromTheme.vcproj
@@ -0,0 +1,201 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="querierFromTheme"
+	ProjectGUID="{E1FD316B-80D6-4CC0-89DE-FBDCAB9D8A65}"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Debug"
+			IntermediateDirectory=".\Debug"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;..;..\..\src\terralib\kernel;..\..\src\terralib\functions;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				PrecompiledHeaderFile=".\Debug/querierFromTheme.pch"
+				AssemblerListingLocation=".\Debug/"
+				ObjectFile=".\Debug/"
+				ProgramDataBaseFileName=".\Debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="4"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Debug/terralib/terralib.lib ../../Debug/libjpeg/libjpeg.lib ../../Debug/tiff/tiff.lib ../../Debug/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib"
+				OutputFile="../Debug/querierFromTheme.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=".\Debug/querierFromTheme.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\Debug/querierFromTheme.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1046"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Release"
+			IntermediateDirectory=".\Release"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories=".;..;..\..\src\terralib\kernel;..\..\src\terralib\functions;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="TRUE"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\Release/querierFromTheme.pch"
+				AssemblerListingLocation=".\Release/"
+				ObjectFile=".\Release/"
+				ProgramDataBaseFileName=".\Release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Release/terralib/terralib.lib ../../Release/libjpeg/libjpeg.lib ../../Release/tiff/tiff.lib ../../Release/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib"
+				OutputFile="../Release/querierFromTheme.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				IgnoreDefaultLibraryNames="libcmt.lib"
+				ProgramDatabaseFile=".\Release/querierFromTheme.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\Release/querierFromTheme.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1046"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath="querierFromTheme.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.cpp">
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.h">
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/querierGroupChronon/.cdtproject b/examples/querierGroupChronon/.cdtproject
deleted file mode 100644
index fc69c6a..0000000
--- a/examples/querierGroupChronon/.cdtproject
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse-cdt version="2.0"?>
-
-<cdtproject id="org.eclipse.cdt.make.core.make">
-<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
-<data>
-<item id="org.eclipse.cdt.core.pathentry">
-<pathentry kind="src" path=""/>
-<pathentry kind="out" path=""/>
-<pathentry kind="con" path="org.eclipse.cdt.make.core.DISCOVERED_SCANNER_INFO"/>
-</item>
-<item id="cdt_indexer">
-<indexEnabled indexValue="false"/>
-<indexerProblemsEnabled indexProblemsValue="0"/>
-</item>
-</data>
-</cdtproject>
diff --git a/examples/querierGroupChronon/.project b/examples/querierGroupChronon/.project
deleted file mode 100644
index 046d95b..0000000
--- a/examples/querierGroupChronon/.project
+++ /dev/null
@@ -1,104 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>querierGroupChronon</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.cdt.make.core.makeBuilder</name>
-			<arguments>
-				<dictionary>
-					<key>org.eclipse.cdt.core.errorOutputParser</key>
-					<value>org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.VCErrorParser;</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
-					<value>clean all</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.incrementalBuildTarget</key>
-					<value>all</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
-					<value>false</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.buildLocation</key>
-					<value></value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.enableFullBuild</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.enabledIncrementalBuild</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
-					<value>clean</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.buildCommand</key>
-					<value>make</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
-					<value>all</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.stopOnError</key>
-					<value>false</value>
-				</dictionary>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.cdt.make.core.ScannerConfigBuilder</name>
-			<arguments>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.ScannerConfigDiscoveryEnabled</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.makeBuilderParserId</key>
-					<value>org.eclipse.cdt.make.core.GCCScannerInfoConsoleParser</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.esiProviderCommandEnabled</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.siProblemGenerationEnabled</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.useDefaultESIProviderCmd</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.makeBuilderParserEnabled</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.esiProviderParserId</key>
-					<value>org.eclipse.cdt.make.core.GCCSpecsConsoleParser</value>
-				</dictionary>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.cdt.core.cnature</nature>
-		<nature>org.eclipse.cdt.make.core.makeNature</nature>
-		<nature>org.eclipse.cdt.make.core.ScannerConfigNature</nature>
-	</natures>
-</projectDescription>
diff --git a/examples/querierGroupChronon/Makefile b/examples/querierGroupChronon/Makefile
deleted file mode 100644
index 1f0a32c..0000000
--- a/examples/querierGroupChronon/Makefile
+++ /dev/null
@@ -1,23 +0,0 @@
-all: querierGroupChronon
-
-shapelib:
-	cd ../terralibx/shapelib; make
-
-tiff:
-	cd ../terralibx/tiff; make
-
-terralib:
-	cd ../terralibx/terralib; make
-
-stat:
-	cd ../terralibx/stat; make
-
-querierGroupChronon: shapelib tiff terralib stat
-	qmake -o makeQuerierGroupChronon querierGroupChronon.pro; make -f makeQuerierGroupChronon
-
-clean:
-	if \
-		test -f makeQuerierGroupChronon; \
-	then \
-		make -f makeQuerierGroupChronon distclean; rm -f makeQuerierGroupChronon; \
-	fi
\ No newline at end of file
diff --git a/examples/querierGroupChronon/querierGroupChronon.cpp b/examples/querierGroupChronon/querierGroupChronon.cpp
deleted file mode 100644
index 4b704a2..0000000
--- a/examples/querierGroupChronon/querierGroupChronon.cpp
+++ /dev/null
@@ -1,141 +0,0 @@
-/************************************************************************************
-TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The library provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use
-of this library and its documentation.
-*************************************************************************************/
-/* 
-   This example shows how to use a querier from theme, grouping  
-   spatiotemporal instances by a chronon. 
-   	  
-   Author: Karine Reis 
-*/
-
-#include "TeMySQL.h"
-#include "TeQuerier.h"
-#include "TeInitQuerierStrategy.h"
-#include "TeQuerierParams.h"
-
-#include <time.h>
-#include <iostream>
-
-using std::cout;
-
-int 
-main()
-{	
-	
-	// Datatabase server parameters
-     string host = "localhost";
-     string dbname = "saudavel";
-     string user = "root";
-     string pass = "karine";
-
-	 // Connects to database
-     TeDatabase* db_ = new TeMySQL();
-     if (!db_->connect(host,user,pass,dbname))
-     {
-         cout << "Error: " << db_->errorMessage() << endl;
-         return 1;
-     }
-
-	// Load the layer 
-	TeTheme* coletas = new TeTheme("Coletas");
-	if (!db_->loadTheme(coletas))
-    {
-        cout << "Error: " << db_->errorMessage() << endl; 
-		db_->close(); 
-        return 1;
-    }
-		
-	//Init querier strategies
-	TeInitQuerierStrategies();
-
-	//Attributes to group 
-	bool loadGeometries = false;
-	TeGroupingAttr attributes;
-	
-	pair<TeAttributeRep, TeStatisticType> attr1(TeAttributeRep("Coletas.NRO_OVOS_PAL1"), TeSUM);
-	attributes.insert(attr1);
-
-	pair<TeAttributeRep, TeStatisticType> attr2(TeAttributeRep("Coletas.NRO_OVOS_PAL2"), TeSUM);
-	attributes.insert(attr2);
-
-	pair<TeAttributeRep, TeStatisticType> attr3(TeAttributeRep("Coletas.NRO_OVOS_PAL3"), TeSUM);
-	attributes.insert(attr3);
-
-	pair<TeAttributeRep, TeStatisticType> attr4(TeAttributeRep("Coletas.NRO_OVOS"), TeSUM);
-	attributes.insert(attr4);
-
-	// Set querier parameters - load only the grouped attributes 
-	TeQuerierParams querierParams(loadGeometries, attributes);
-	querierParams.setParams(coletas, TeMONTH);
-
-	TeQuerier  querier(querierParams);
-
-	// number of time frames generated by chronon TeMONTH
-	int numTimeFrames = querier.getNumTimeFrames();
-	
-	// Load instances from theme for each time frame or month 
-	for(int frame=0; frame < numTimeFrames; ++frame)
-	{
-		TeTSEntry ts;
-		querier.getTSEntry(ts, frame);
-		
-		cout << " Time frame: " << Te2String(frame) << " --------------------------- " << endl << endl;
-
-		string initialDate = ts.time_.getInitialDateTime("DDsMMsYYYY"); 
-		string finalDate = ts.time_.getFinalDateTime("DDsMMsYYYY");
-		
-		cout << " Time Interval: " << initialDate << " to " << finalDate << endl << endl;
-
-		
-		if(!querier.loadInstances(frame))
-			continue;
-
-		// Traverse all the elements 
-		TeSTInstance sti;
-		while(querier.fetchInstance(sti))
-		{
-			cout << " Object: " << sti.objectId() << endl;
-			
-			// Plot each attribute, its name and value
-			TePropertyVector vec = sti.getPropertyVector();
-			for(unsigned int i=0; i<vec.size(); ++i)
-			{
-				string  attrName = vec[i].attr_.rep_.name_;
-				string  attrValue = vec[i].value_;
-
-				cout << attrName  << " : " << attrValue << endl;
-
-			}
-		}
-
-		cout << endl << endl;
-	}
-
-	cout << " End " << endl;
-	getchar(); 
-	db_->close ();
-	return 0;
-}
-
-
-
-
diff --git a/examples/querierGroupChronon/querierGroupChronon.dsp b/examples/querierGroupChronon/querierGroupChronon.dsp
deleted file mode 100644
index 1feb58e..0000000
--- a/examples/querierGroupChronon/querierGroupChronon.dsp
+++ /dev/null
@@ -1,114 +0,0 @@
-# Microsoft Developer Studio Project File - Name="querierGroupChronon" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=querierGroupChronon - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "querierGroupChronon.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "querierGroupChronon.mak" CFG="querierGroupChronon - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "querierGroupChronon - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "querierGroupChronon - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "querierGroupChronon - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drive [...]
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x416 /d "NDEBUG"
-# ADD RSC /l 0x416 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\shapelib\Release\shapelib.lib ..\..\terralibw\freetype\Release\freetype.lib ..\..\terralibw\tiff\Release\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\Postg [...]
-# SUBTRACT LINK32 /pdb:none
-
-!ELSEIF  "$(CFG)" == "querierGroupChronon - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terra [...]
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x416 /d "_DEBUG"
-# ADD RSC /l 0x416 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\shapelib\Debug\shapelib.lib ..\..\terralibw\freetype\Debug\freetype.lib ..\..\terralibw\tiff\Debug\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\li [...]
-# SUBTRACT LINK32 /pdb:none
-
-!ENDIF 
-
-# Begin Target
-
-# Name "querierGroupChronon - Win32 Release"
-# Name "querierGroupChronon - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\querierGroupChronon.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\terralib\drivers\MySQL\TeMySQL.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\src\terralib\drivers\MySQL\TeMySQL.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/examples/querierGroupChronon/querierGroupChronon.dsw b/examples/querierGroupChronon/querierGroupChronon.dsw
deleted file mode 100644
index 78bd97e..0000000
--- a/examples/querierGroupChronon/querierGroupChronon.dsw
+++ /dev/null
@@ -1,89 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "querierGroupChronon"=".\querierGroupChronon.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name terralib
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "freetype"="..\..\terralibw\freetype\freetype.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "shapelib"="..\..\terralibw\shapelib\shapelib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "terralib"="..\..\terralibw\terralib\terralib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name freetype
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name shapelib
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name tiff
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "tiff"="..\..\terralibw\tiff\tiff.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/examples/querierGroupChronon/querierGroupChronon.pro b/examples/querierGroupChronon/querierGroupChronon.pro
deleted file mode 100644
index f56820c..0000000
--- a/examples/querierGroupChronon/querierGroupChronon.pro
+++ /dev/null
@@ -1,47 +0,0 @@
-TEMPLATE = app
-TARGET = querierGroupChronon
-CONFIG += qt warn_on thread debug rtti exceptions
-LANGUAGE = C++
-
-OBJECTS_DIR = .obj
-
-SOURCES	+= \
-	querierGroupChronon.cpp \
-	../src/terralib/drivers/MySQL/TeMySQL.cpp
-
-HEADERS	+= \
-	../src/terralib/drivers/MySQL/TeMySQL.h
-	
-INCLUDEPATH += \
-	. \
-	.. \
-	../src/terralib/kernel \
-	../src/terralib/application \
-	../src/terralib/functions \
-	../src/terralib/stat \
-	../src/shapelib \
-	../src/zlib \
-	../src/terralib/application/qt \
-	../src/terralib/drivers/MySQL \
-	../src/terralib/drivers/MySQL/include \
-	../src/terralib/drivers/OracleSpatial \
-	../src/terralib/drivers/OracleSpatial/OCI/include \
-	../src/terralib/drivers/PostgreSQL \
-	../src/terralib/drivers/PostgreSQL/includepg 
-
-LIBS += \
-	-L../terralibx/shapelib \
-	-L../terralibx/stat \
-	-L../terralibx/terralib \
-	-L../terralibx/tiff \
-	-L../terralibx/PostgreSQL \
-	-L/usr/local/lib -L/usr/lib -L/usr/lib/mysql -L/usr/local/lib/mysql \
-	-L/usr/local/mysql -L/usr/local/mysql/lib -L. \
-    -lshapelib -lstat -lterralib -ltiff -lmysqlclient -lpq -lcrypt
-
-
-
-
-
-
-
diff --git a/examples/querierGroupElement/.cdtproject b/examples/querierGroupElement/.cdtproject
deleted file mode 100644
index fc69c6a..0000000
--- a/examples/querierGroupElement/.cdtproject
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse-cdt version="2.0"?>
-
-<cdtproject id="org.eclipse.cdt.make.core.make">
-<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
-<data>
-<item id="org.eclipse.cdt.core.pathentry">
-<pathentry kind="src" path=""/>
-<pathentry kind="out" path=""/>
-<pathentry kind="con" path="org.eclipse.cdt.make.core.DISCOVERED_SCANNER_INFO"/>
-</item>
-<item id="cdt_indexer">
-<indexEnabled indexValue="false"/>
-<indexerProblemsEnabled indexProblemsValue="0"/>
-</item>
-</data>
-</cdtproject>
diff --git a/examples/querierGroupElement/.project b/examples/querierGroupElement/.project
deleted file mode 100644
index 5478a17..0000000
--- a/examples/querierGroupElement/.project
+++ /dev/null
@@ -1,104 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>querierGroupElement</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.cdt.make.core.makeBuilder</name>
-			<arguments>
-				<dictionary>
-					<key>org.eclipse.cdt.core.errorOutputParser</key>
-					<value>org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.VCErrorParser;</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
-					<value>clean all</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.incrementalBuildTarget</key>
-					<value>all</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
-					<value>false</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.buildLocation</key>
-					<value></value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.enableFullBuild</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.enabledIncrementalBuild</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
-					<value>clean</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.buildCommand</key>
-					<value>make</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
-					<value>all</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.stopOnError</key>
-					<value>false</value>
-				</dictionary>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.cdt.make.core.ScannerConfigBuilder</name>
-			<arguments>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.ScannerConfigDiscoveryEnabled</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.makeBuilderParserId</key>
-					<value>org.eclipse.cdt.make.core.GCCScannerInfoConsoleParser</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.esiProviderCommandEnabled</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.siProblemGenerationEnabled</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.useDefaultESIProviderCmd</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.makeBuilderParserEnabled</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.esiProviderParserId</key>
-					<value>org.eclipse.cdt.make.core.GCCSpecsConsoleParser</value>
-				</dictionary>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.cdt.core.cnature</nature>
-		<nature>org.eclipse.cdt.make.core.makeNature</nature>
-		<nature>org.eclipse.cdt.make.core.ScannerConfigNature</nature>
-	</natures>
-</projectDescription>
diff --git a/examples/querierGroupElement/Makefile b/examples/querierGroupElement/Makefile
deleted file mode 100644
index 008922d..0000000
--- a/examples/querierGroupElement/Makefile
+++ /dev/null
@@ -1,23 +0,0 @@
-all: querierGroupElement
-
-shapelib:
-	cd ../terralibx/shapelib; make
-
-tiff:
-	cd ../terralibx/tiff; make
-
-terralib:
-	cd ../terralibx/terralib; make
-
-stat:
-	cd ../terralibx/stat; make
-
-querierGroupElement: shapelib tiff terralib stat
-	qmake -o makeQuerierGroupElement querierGroupElement.pro; make -f makeQuerierGroupElement
-
-clean:
-	if \
-		test -f makeQuerierGroupElement; \
-	then \
-		make -f makeQuerierGroupElement distclean; rm -f makeQuerierGroupElement; \
-	fi
\ No newline at end of file
diff --git a/examples/querierGroupElement/querierGroupElement.cpp b/examples/querierGroupElement/querierGroupElement.cpp
deleted file mode 100644
index ccbfda9..0000000
--- a/examples/querierGroupElement/querierGroupElement.cpp
+++ /dev/null
@@ -1,123 +0,0 @@
-/************************************************************************************
-TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The library provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use
-of this library and its documentation.
-*************************************************************************************/
-/* 
-   This example shows how to use a querier from theme, grouping  
-   spatiotemporal instances by a element. 
-   
-   Author: Karine Reis 
-*/
-
-#include "TeMySQL.h"
-#include "TeQuerier.h"
-#include "TeInitQuerierStrategy.h"
-#include "TeQuerierParams.h"
-
-#include <time.h>
-#include <iostream>
-
-using std::cout;
-
-int 
-main()
-{	
-	
-	// Datatabase server parameters
-     string host = "localhost";
-     string dbname = "saudavel";
-     string user = "root";
-     string pass = "karine";
-
-	 // Connects to database
-     TeDatabase* db_ = new TeMySQL();
-     if (!db_->connect(host,user,pass,dbname))
-     {
-         cout << "Error: " << db_->errorMessage() << endl;
-         return 1;
-     }
-
-	// Load the layer 
-	TeTheme* coletas = new TeTheme("Coletas");
-	if (!db_->loadTheme(coletas))
-    {
-        cout << "Error: " << db_->errorMessage() << endl; 
-		db_->close(); 
-        return 1;
-    }
-		
-	//Init querier strategies
-	TeInitQuerierStrategies();
-
-	//Attributes to group 
-	bool loadGeometries = false;
-	TeGroupingAttr attributes;
-	
-	pair<TeAttributeRep, TeStatisticType> attr1(TeAttributeRep("Coletas.NRO_OVOS_PAL1"), TeSUM);
-	attributes.insert(attr1);
-
-	pair<TeAttributeRep, TeStatisticType> attr2(TeAttributeRep("Coletas.NRO_OVOS_PAL2"), TeSUM);
-	attributes.insert(attr2);
-
-	pair<TeAttributeRep, TeStatisticType> attr3(TeAttributeRep("Coletas.NRO_OVOS_PAL3"), TeSUM);
-	attributes.insert(attr3);
-
-	pair<TeAttributeRep, TeStatisticType> attr4(TeAttributeRep("Coletas.NRO_OVOS"), TeSUM);
-	attributes.insert(attr4);
-
-	// Set querier parameters - load only the grouped attributes 
-	TeQuerierParams querierParams(loadGeometries, attributes);
-	querierParams.setParams(coletas);
-
-	TeQuerier  querier(querierParams);
-
-	// Load instances from layer based in the querier parameters 
-	querier.loadInstances();
-
-	// Traverse all the instances 
-	TeSTInstance sti;
-	while(querier.fetchInstance(sti))
-	{
-		cout << " Object: " << sti.objectId() << " --------------------------- " << endl << endl;
-	
-		// Plot each attribute, its name and value
-		TePropertyVector vec = sti.getPropertyVector();
-		for(unsigned int i=0; i<vec.size(); ++i)
-		{
-			string  attrName = vec[i].attr_.rep_.name_;
-			string  attrValue = vec[i].value_;
-
-			cout << attrName  << " : " << attrValue << endl;
-
-		}
-
-		cout << endl << endl;
-	}
-
-	cout << " End " << endl;
-	getchar(); 
-	db_->close ();
-	return 0;
-}
-
-
-
-
diff --git a/examples/querierGroupElement/querierGroupElement.dsp b/examples/querierGroupElement/querierGroupElement.dsp
deleted file mode 100644
index 20a6e20..0000000
--- a/examples/querierGroupElement/querierGroupElement.dsp
+++ /dev/null
@@ -1,114 +0,0 @@
-# Microsoft Developer Studio Project File - Name="querierGroupElement" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=querierGroupElement - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "querierGroupElement.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "querierGroupElement.mak" CFG="querierGroupElement - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "querierGroupElement - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "querierGroupElement - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "querierGroupElement - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drive [...]
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x416 /d "NDEBUG"
-# ADD RSC /l 0x416 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\shapelib\Release\shapelib.lib ..\..\terralibw\freetype\Release\freetype.lib ..\..\terralibw\tiff\Release\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\Postg [...]
-# SUBTRACT LINK32 /pdb:none
-
-!ELSEIF  "$(CFG)" == "querierGroupElement - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terra [...]
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x416 /d "_DEBUG"
-# ADD RSC /l 0x416 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\shapelib\Debug\shapelib.lib ..\..\terralibw\freetype\Debug\freetype.lib ..\..\terralibw\tiff\Debug\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\li [...]
-# SUBTRACT LINK32 /pdb:none
-
-!ENDIF 
-
-# Begin Target
-
-# Name "querierGroupElement - Win32 Release"
-# Name "querierGroupElement - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\querierGroupElement.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\terralib\drivers\MySQL\TeMySQL.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\src\terralib\drivers\MySQL\TeMySQL.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/examples/querierGroupElement/querierGroupElement.dsw b/examples/querierGroupElement/querierGroupElement.dsw
deleted file mode 100644
index 7fdcd89..0000000
--- a/examples/querierGroupElement/querierGroupElement.dsw
+++ /dev/null
@@ -1,89 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "querierGroupElement"=".\querierGroupElement.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name terralib
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "freetype"="..\..\terralibw\freetype\freetype.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "shapelib"="..\..\terralibw\shapelib\shapelib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "terralib"="..\..\terralibw\terralib\terralib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name freetype
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name shapelib
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name tiff
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "tiff"="..\..\terralibw\tiff\tiff.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/examples/querierGroupElement/querierGroupElement.pro b/examples/querierGroupElement/querierGroupElement.pro
deleted file mode 100644
index 506fbee..0000000
--- a/examples/querierGroupElement/querierGroupElement.pro
+++ /dev/null
@@ -1,47 +0,0 @@
-TEMPLATE = app
-TARGET = querierGroupElement
-CONFIG += qt warn_on thread debug rtti exceptions
-LANGUAGE = C++
-
-OBJECTS_DIR = .obj
-
-SOURCES	+= \
-	querierGroupElement.cpp \
-	../src/terralib/drivers/MySQL/TeMySQL.cpp
-
-HEADERS	+= \
-	../src/terralib/drivers/MySQL/TeMySQL.h
-	
-INCLUDEPATH += \
-	. \
-	.. \
-	../src/terralib/kernel \
-	../src/terralib/application \
-	../src/terralib/functions \
-	../src/terralib/stat \
-	../src/shapelib \
-	../src/zlib \
-	../src/terralib/application/qt \
-	../src/terralib/drivers/MySQL \
-	../src/terralib/drivers/MySQL/include \
-	../src/terralib/drivers/OracleSpatial \
-	../src/terralib/drivers/OracleSpatial/OCI/include \
-	../src/terralib/drivers/PostgreSQL \
-	../src/terralib/drivers/PostgreSQL/includepg 
-
-LIBS += \
-	-L../terralibx/shapelib \
-	-L../terralibx/stat \
-	-L../terralibx/terralib \
-	-L../terralibx/tiff \
-	-L../terralibx/PostgreSQL \
-	-L/usr/local/lib -L/usr/lib -L/usr/lib/mysql -L/usr/local/lib/mysql \
-	-L/usr/local/mysql -L/usr/local/mysql/lib -L. \
-    -lshapelib -lstat -lterralib -ltiff -lmysqlclient -lpq -lcrypt
-
-
-
-
-
-
-
diff --git a/examples/querierGroupSpatialRest/.cdtproject b/examples/querierGroupSpatialRest/.cdtproject
deleted file mode 100644
index fc69c6a..0000000
--- a/examples/querierGroupSpatialRest/.cdtproject
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse-cdt version="2.0"?>
-
-<cdtproject id="org.eclipse.cdt.make.core.make">
-<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
-<data>
-<item id="org.eclipse.cdt.core.pathentry">
-<pathentry kind="src" path=""/>
-<pathentry kind="out" path=""/>
-<pathentry kind="con" path="org.eclipse.cdt.make.core.DISCOVERED_SCANNER_INFO"/>
-</item>
-<item id="cdt_indexer">
-<indexEnabled indexValue="false"/>
-<indexerProblemsEnabled indexProblemsValue="0"/>
-</item>
-</data>
-</cdtproject>
diff --git a/examples/querierGroupSpatialRest/.project b/examples/querierGroupSpatialRest/.project
deleted file mode 100644
index b84c70f..0000000
--- a/examples/querierGroupSpatialRest/.project
+++ /dev/null
@@ -1,104 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>querierGroupSpatialRest</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.cdt.make.core.makeBuilder</name>
-			<arguments>
-				<dictionary>
-					<key>org.eclipse.cdt.core.errorOutputParser</key>
-					<value>org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.VCErrorParser;</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
-					<value>clean all</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.incrementalBuildTarget</key>
-					<value>all</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
-					<value>false</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.buildLocation</key>
-					<value></value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.enableFullBuild</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.enabledIncrementalBuild</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
-					<value>clean</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.buildCommand</key>
-					<value>make</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
-					<value>all</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.stopOnError</key>
-					<value>false</value>
-				</dictionary>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.cdt.make.core.ScannerConfigBuilder</name>
-			<arguments>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.ScannerConfigDiscoveryEnabled</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.makeBuilderParserId</key>
-					<value>org.eclipse.cdt.make.core.GCCScannerInfoConsoleParser</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.esiProviderCommandEnabled</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.siProblemGenerationEnabled</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.useDefaultESIProviderCmd</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.makeBuilderParserEnabled</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.esiProviderParserId</key>
-					<value>org.eclipse.cdt.make.core.GCCSpecsConsoleParser</value>
-				</dictionary>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.cdt.core.cnature</nature>
-		<nature>org.eclipse.cdt.make.core.makeNature</nature>
-		<nature>org.eclipse.cdt.make.core.ScannerConfigNature</nature>
-	</natures>
-</projectDescription>
diff --git a/examples/querierGroupSpatialRest/Makefile b/examples/querierGroupSpatialRest/Makefile
deleted file mode 100644
index dc7e981..0000000
--- a/examples/querierGroupSpatialRest/Makefile
+++ /dev/null
@@ -1,23 +0,0 @@
-all: querierGroupSpatialRest
-
-shapelib:
-	cd ../terralibx/shapelib; make
-
-tiff:
-	cd ../terralibx/tiff; make
-
-terralib:
-	cd ../terralibx/terralib; make
-
-stat:
-	cd ../terralibx/stat; make
-
-querierGroupSpatialRest: shapelib tiff terralib stat
-	qmake -o makeQuerierGroupSpatialRest querierGroupSpatialRest.pro; make -f makeQuerierGroupSpatialRest
-
-clean:
-	if \
-		test -f makeQuerierGroupSpatialRest; \
-	then \
-		make -f makeQuerierGroupSpatialRest distclean; rm -f makeQuerierGroupSpatialRest; \
-	fi
\ No newline at end of file
diff --git a/examples/querierGroupSpatialRest/querierGroupSpatialRest.cpp b/examples/querierGroupSpatialRest/querierGroupSpatialRest.cpp
deleted file mode 100644
index be7988f..0000000
--- a/examples/querierGroupSpatialRest/querierGroupSpatialRest.cpp
+++ /dev/null
@@ -1,163 +0,0 @@
-/************************************************************************************
-TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The library provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use
-of this library and its documentation.
-*************************************************************************************/
-/* 
-   This example shows how to use a querier from theme, grouping all  
-   spatiotemporal instances that satisfy a spatial restriction. 
-   
-   Author: Karine Reis 
-*/
-
-#include "TeMySQL.h"
-#include "TeQuerier.h"
-#include "TeInitQuerierStrategy.h"
-#include "TeQuerierParams.h"
-
-#include <time.h>
-#include <iostream>
-
-using std::cout;
-
-int 
-main()
-{	
-	
-	// Datatabase server parameters
-     string host = "localhost";
-     string dbname = "saudavel";
-     string user = "root";
-     string pass = "karine";
-
-	 // Connects to database
-     TeDatabase* db_ = new TeMySQL();
-     if (!db_->connect(host,user,pass,dbname))
-     {
-         cout << "Error: " << db_->errorMessage() << endl;
-         return 1;
-     }
-
-	// Load the themes 
-	TeTheme* coletas = new TeTheme("Coletas");
-	if (!db_->loadTheme(coletas))
-    {
-        cout << "Error: " << db_->errorMessage() << endl; 
-		db_->close(); 
-        return 1;
-    }
-
-	TeTheme* bairros = new TeTheme("ibge_bairro");  
-	if (!db_->loadTheme(bairros))
-    {
-        cout << "Error: " << db_->errorMessage() << endl; 
-		db_->close(); 
-        return 1;
-    }
-		
-	//Init querier strategies
-	TeInitQuerierStrategies();
-
-	//statistics from coletas
-	TeGroupingAttr attributes;
-	
-	pair<TeAttributeRep, TeStatisticType> attr1(TeAttributeRep("Coletas.NRO_OVOS_PAL1"), TeSUM);
-	attributes.insert(attr1);
-
-	pair<TeAttributeRep, TeStatisticType> attr2(TeAttributeRep("Coletas.NRO_OVOS_PAL2"), TeSUM);
-	attributes.insert(attr2);
-
-	pair<TeAttributeRep, TeStatisticType> attr3(TeAttributeRep("Coletas.NRO_OVOS_PAL3"), TeSUM);
-	attributes.insert(attr3);
-
-	pair<TeAttributeRep, TeStatisticType> attr4(TeAttributeRep("Coletas.NRO_OVOS"), TeSUM);
-	attributes.insert(attr4);
-
-	
-	// ------------ querier to theme "bairros"
-	bool loadGeometries = true;
-	vector<string> attrs;
-	attrs.push_back ("BAIRRO2000_REC.NOME");
-
-	TeQuerierParams querParamsBair(loadGeometries, attrs);
-	querParamsBair.setParams(bairros);
-	
-	TeQuerier  querBairros(querParamsBair); 
-
-	if(!querBairros.loadInstances())
-	{
-		cout << " No data!!! " << endl; 
-		return 1;
-	}
-
-	//Load each element and pass as spatial restriction
-	TeSTInstance bairro;
-	while(querBairros.fetchInstance (bairro))
-	{
-		string name;
-		bairro.getPropertyValue(name, 0);
-
-		cout << " Bairro: " << name << endl;
-		
-		TePolygonSet setP;
-		if(!bairro.getGeometry (setP))  //get the polygon
-			continue;
-
-		// ------------ querier to theme coletas
-		loadGeometries = false;
-
-		TeQuerierParams querParamsCol(loadGeometries, attributes);
-		querParamsCol.setParams(coletas);
-		
-		//spatial restriction
-		querParamsCol.setSpatialRest(&setP);
-
-		TeQuerier  querColetas(querParamsCol);
-		
-		if(!querColetas.loadInstances())
-		{
-			cout << " No data!!! " << endl; 
-			continue;
-		}
-
-		TeSTInstance coleta;
-		while(querColetas.fetchInstance(coleta)) 
-		{
-			// Plot each attribute, its name and value
-			TePropertyVector vec = coleta.getPropertyVector();
-			for(unsigned int i=0; i<vec.size(); ++i)
-			{
-				string  attrName = vec[i].attr_.rep_.name_;
-				string  attrValue = vec[i].value_;
-
-				cout << attrName  << " : " << attrValue << endl;
-			}
-		}
-	}
-
-	cout << " End " << endl;
-	getchar(); 
-	db_->close ();
-	return 0;
-}
-
-
-
-
diff --git a/examples/querierGroupSpatialRest/querierGroupSpatialRest.dsp b/examples/querierGroupSpatialRest/querierGroupSpatialRest.dsp
deleted file mode 100644
index ce71950..0000000
--- a/examples/querierGroupSpatialRest/querierGroupSpatialRest.dsp
+++ /dev/null
@@ -1,114 +0,0 @@
-# Microsoft Developer Studio Project File - Name="querierGroupSpatialRest" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=querierGroupSpatialRest - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "querierGroupSpatialRest.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "querierGroupSpatialRest.mak" CFG="querierGroupSpatialRest - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "querierGroupSpatialRest - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "querierGroupSpatialRest - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "querierGroupSpatialRest - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drive [...]
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x416 /d "NDEBUG"
-# ADD RSC /l 0x416 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\shapelib\Release\shapelib.lib ..\..\terralibw\freetype\Release\freetype.lib ..\..\terralibw\tiff\Release\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\Postg [...]
-# SUBTRACT LINK32 /pdb:none
-
-!ELSEIF  "$(CFG)" == "querierGroupSpatialRest - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terra [...]
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x416 /d "_DEBUG"
-# ADD RSC /l 0x416 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\shapelib\Debug\shapelib.lib ..\..\terralibw\freetype\Debug\freetype.lib ..\..\terralibw\tiff\Debug\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\li [...]
-# SUBTRACT LINK32 /pdb:none
-
-!ENDIF 
-
-# Begin Target
-
-# Name "querierGroupSpatialRest - Win32 Release"
-# Name "querierGroupSpatialRest - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\querierGroupSpatialRest.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\terralib\drivers\MySQL\TeMySQL.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\src\terralib\drivers\MySQL\TeMySQL.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/examples/querierGroupSpatialRest/querierGroupSpatialRest.dsw b/examples/querierGroupSpatialRest/querierGroupSpatialRest.dsw
deleted file mode 100644
index 6047b28..0000000
--- a/examples/querierGroupSpatialRest/querierGroupSpatialRest.dsw
+++ /dev/null
@@ -1,89 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "querierGroupSpatialRest"=".\querierGroupSpatialRest.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name terralib
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "freetype"="..\..\terralibw\freetype\freetype.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "shapelib"="..\..\terralibw\shapelib\shapelib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "terralib"="..\..\terralibw\terralib\terralib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name freetype
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name shapelib
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name tiff
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "tiff"="..\..\terralibw\tiff\tiff.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/examples/querierGroupSpatialRest/querierGroupSpatialRest.pro b/examples/querierGroupSpatialRest/querierGroupSpatialRest.pro
deleted file mode 100644
index 751896f..0000000
--- a/examples/querierGroupSpatialRest/querierGroupSpatialRest.pro
+++ /dev/null
@@ -1,47 +0,0 @@
-TEMPLATE = app
-TARGET = querierGroupSpatialRest
-CONFIG += qt warn_on thread debug rtti exceptions
-LANGUAGE = C++
-
-OBJECTS_DIR = .obj
-
-SOURCES	+= \
-	querierGroupSpatialRest.cpp \
-	../src/terralib/drivers/MySQL/TeMySQL.cpp
-
-HEADERS	+= \
-	../src/terralib/drivers/MySQL/TeMySQL.h
-	
-INCLUDEPATH += \
-	. \
-	.. \
-	../src/terralib/kernel \
-	../src/terralib/application \
-	../src/terralib/functions \
-	../src/terralib/stat \
-	../src/shapelib \
-	../src/zlib \
-	../src/terralib/application/qt \
-	../src/terralib/drivers/MySQL \
-	../src/terralib/drivers/MySQL/include \
-	../src/terralib/drivers/OracleSpatial \
-	../src/terralib/drivers/OracleSpatial/OCI/include \
-	../src/terralib/drivers/PostgreSQL \
-	../src/terralib/drivers/PostgreSQL/includepg 
-
-LIBS += \
-	-L../terralibx/shapelib \
-	-L../terralibx/stat \
-	-L../terralibx/terralib \
-	-L../terralibx/tiff \
-	-L../terralibx/PostgreSQL \
-	-L/usr/local/lib -L/usr/lib -L/usr/lib/mysql -L/usr/local/lib/mysql \
-	-L/usr/local/mysql -L/usr/local/mysql/lib -L. \
-    -lshapelib -lstat -lterralib -ltiff -lmysqlclient -lpq -lcrypt
-
-
-
-
-
-
-
diff --git a/examples/querierWithSpatialRestBox/.cdtproject b/examples/querierWithSpatialRestBox/.cdtproject
deleted file mode 100644
index fc69c6a..0000000
--- a/examples/querierWithSpatialRestBox/.cdtproject
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse-cdt version="2.0"?>
-
-<cdtproject id="org.eclipse.cdt.make.core.make">
-<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
-<data>
-<item id="org.eclipse.cdt.core.pathentry">
-<pathentry kind="src" path=""/>
-<pathentry kind="out" path=""/>
-<pathentry kind="con" path="org.eclipse.cdt.make.core.DISCOVERED_SCANNER_INFO"/>
-</item>
-<item id="cdt_indexer">
-<indexEnabled indexValue="false"/>
-<indexerProblemsEnabled indexProblemsValue="0"/>
-</item>
-</data>
-</cdtproject>
diff --git a/examples/querierWithSpatialRestBox/.project b/examples/querierWithSpatialRestBox/.project
deleted file mode 100644
index 94f291d..0000000
--- a/examples/querierWithSpatialRestBox/.project
+++ /dev/null
@@ -1,104 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>querierWithSpatialRestBox</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.cdt.make.core.makeBuilder</name>
-			<arguments>
-				<dictionary>
-					<key>org.eclipse.cdt.core.errorOutputParser</key>
-					<value>org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.VCErrorParser;</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
-					<value>clean all</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.incrementalBuildTarget</key>
-					<value>all</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
-					<value>false</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.buildLocation</key>
-					<value></value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.enableFullBuild</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.enabledIncrementalBuild</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
-					<value>clean</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.buildCommand</key>
-					<value>make</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
-					<value>all</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.stopOnError</key>
-					<value>false</value>
-				</dictionary>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.cdt.make.core.ScannerConfigBuilder</name>
-			<arguments>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.ScannerConfigDiscoveryEnabled</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.makeBuilderParserId</key>
-					<value>org.eclipse.cdt.make.core.GCCScannerInfoConsoleParser</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.esiProviderCommandEnabled</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.siProblemGenerationEnabled</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.useDefaultESIProviderCmd</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.makeBuilderParserEnabled</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.esiProviderParserId</key>
-					<value>org.eclipse.cdt.make.core.GCCSpecsConsoleParser</value>
-				</dictionary>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.cdt.core.cnature</nature>
-		<nature>org.eclipse.cdt.make.core.makeNature</nature>
-		<nature>org.eclipse.cdt.make.core.ScannerConfigNature</nature>
-	</natures>
-</projectDescription>
diff --git a/examples/querierWithSpatialRestBox/Makefile b/examples/querierWithSpatialRestBox/Makefile
deleted file mode 100644
index d8f0d73..0000000
--- a/examples/querierWithSpatialRestBox/Makefile
+++ /dev/null
@@ -1,23 +0,0 @@
-all: querierWithSpatialRestBox
-
-shapelib:
-	cd ../terralibx/shapelib; make
-
-tiff:
-	cd ../terralibx/tiff; make
-
-terralib:
-	cd ../terralibx/terralib; make
-
-stat:
-	cd ../terralibx/stat; make
-
-querierWithSpatialRestBox: shapelib tiff terralib stat
-	qmake -o makeQuerierWithSpatialRestBox querierWithSpatialRestBox.pro; make -f makeQuerierWithSpatialRestBox
-
-clean:
-	if \
-		test -f makeQuerierWithSpatialRestBox; \
-	then \
-		make -f makeQuerierWithSpatialRestBox distclean; rm -f makeQuerierWithSpatialRestBox; \
-	fi
\ No newline at end of file
diff --git a/examples/querierWithSpatialRestBox/querierWithSpatialRestBox.cpp b/examples/querierWithSpatialRestBox/querierWithSpatialRestBox.cpp
deleted file mode 100644
index 57bac6d..0000000
--- a/examples/querierWithSpatialRestBox/querierWithSpatialRestBox.cpp
+++ /dev/null
@@ -1,117 +0,0 @@
-/************************************************************************************
-TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The library provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use
-of this library and its documentation.
-*************************************************************************************/
-/* 
-    This example shows how to use a querier from theme, using a spatial restriction 
-	defined by a rectangle (TeBOX). This spatial restriction is associated to querier. 
-   
-   Author: Karine Reis 
-*/
-
-
-#include "TeMySQL.h"
-#include "TeQuerier.h"
-#include "TeInitQuerierStrategy.h"
-#include "TeQuerierParams.h"
-
-#include <time.h>
-#include <iostream>
-
-using std::cout;
-
-int 
-main()
-{	
-	
-	// Datatabase server parameters
-     string host = "localhost";
-     string dbname = "saudavel";
-     string user = "root";
-     string pass = "karine";
-
-	 // Connects to database
-     TeDatabase* db_ = new TeMySQL();
-     if (!db_->connect(host,user,pass,dbname))
-     {
-         cout << "Error: " << db_->errorMessage() << endl;
-         return 1;
-     }
-
-	// Load the theme 
-	TeTheme* armadilhas = new TeTheme("Armadilhas");
-	if (!db_->loadTheme(armadilhas))
-    {
-        cout << "Error: " << db_->errorMessage() << endl; 
-		db_->close(); 
-        return 1;
-    }
-		
-	//Init querier strategies
-	TeInitQuerierStrategies();
-
-	//All attributes and geometries
-	bool loadGeometries = false;
-	bool loadAllAttributes = true;
-	
-	// Set querier parameters - load all attributes and geometries 
-	TeQuerierParams querierParams(loadGeometries, loadAllAttributes);
-	querierParams.setParams(armadilhas);
-
-	//Set spatial restriction
-	TeBox box(291174.0, 9104633.0, 294304.0, 9107663.0); 
-	querierParams.setSpatialRest(box, TeWITHIN); 		
-	
-	TeQuerier  querier(querierParams);
-
-	// Load instances from layer based in the querier parameters 
-	querier.loadInstances();
-
-	// Traverse all the instances 
-	TeSTInstance sti;
-	while(querier.fetchInstance(sti))
-	{
-		cout << " Object: " << sti.objectId() << " --------------------------- " << endl << endl;
-	
-		// Plot each attribute, its name and value
-		TePropertyVector vec = sti.getPropertyVector();
-		for(unsigned int i=0; i<vec.size(); ++i)
-		{
-			string  attrName = vec[i].attr_.rep_.name_;
-			string  attrValue = vec[i].value_;
-
-			cout << attrName  << " : " << attrValue << endl;
-
-		}
-		
-		cout << endl << endl;
-	}
-
-	cout << " End " << endl;
-	getchar(); 
-	db_->close ();
-	delete(armadilhas);
-	return 0;
-}
-
-
-
-
diff --git a/examples/querierWithSpatialRestBox/querierWithSpatialRestBox.dsp b/examples/querierWithSpatialRestBox/querierWithSpatialRestBox.dsp
deleted file mode 100644
index bf96a85..0000000
--- a/examples/querierWithSpatialRestBox/querierWithSpatialRestBox.dsp
+++ /dev/null
@@ -1,114 +0,0 @@
-# Microsoft Developer Studio Project File - Name="querierWithSpatialRestBox" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=querierWithSpatialRestBox - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "querierWithSpatialRestBox.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "querierWithSpatialRestBox.mak" CFG="querierWithSpatialRestBox - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "querierWithSpatialRestBox - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "querierWithSpatialRestBox - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "querierWithSpatialRestBox - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drive [...]
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x416 /d "NDEBUG"
-# ADD RSC /l 0x416 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\shapelib\Release\shapelib.lib ..\..\terralibw\freetype\Release\freetype.lib ..\..\terralibw\tiff\Release\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\Postg [...]
-# SUBTRACT LINK32 /pdb:none
-
-!ELSEIF  "$(CFG)" == "querierWithSpatialRestBox - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terra [...]
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x416 /d "_DEBUG"
-# ADD RSC /l 0x416 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\shapelib\Debug\shapelib.lib ..\..\terralibw\freetype\Debug\freetype.lib ..\..\terralibw\tiff\Debug\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\li [...]
-# SUBTRACT LINK32 /pdb:none
-
-!ENDIF 
-
-# Begin Target
-
-# Name "querierWithSpatialRestBox - Win32 Release"
-# Name "querierWithSpatialRestBox - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\querierWithSpatialRestBox.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\terralib\drivers\MySQL\TeMySQL.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\src\terralib\drivers\MySQL\TeMySQL.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/examples/querierWithSpatialRestBox/querierWithSpatialRestBox.dsw b/examples/querierWithSpatialRestBox/querierWithSpatialRestBox.dsw
deleted file mode 100644
index c3aa45e..0000000
--- a/examples/querierWithSpatialRestBox/querierWithSpatialRestBox.dsw
+++ /dev/null
@@ -1,89 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "querierWithSpatialRestBox"=".\querierWithSpatialRestBox.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name terralib
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "freetype"="..\..\terralibw\freetype\freetype.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "shapelib"="..\..\terralibw\shapelib\shapelib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "terralib"="..\..\terralibw\terralib\terralib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name freetype
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name shapelib
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name tiff
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "tiff"="..\..\terralibw\tiff\tiff.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/examples/querierWithSpatialRestBox/querierWithSpatialRestBox.pro b/examples/querierWithSpatialRestBox/querierWithSpatialRestBox.pro
deleted file mode 100644
index 8a9d1ed..0000000
--- a/examples/querierWithSpatialRestBox/querierWithSpatialRestBox.pro
+++ /dev/null
@@ -1,47 +0,0 @@
-TEMPLATE = app
-TARGET = querierWithSpatialRestBox
-CONFIG += qt warn_on thread debug rtti exceptions
-LANGUAGE = C++
-
-OBJECTS_DIR = .obj
-
-SOURCES	+= \
-	querierWithSpatialRestBox.cpp \
-	../src/terralib/drivers/MySQL/TeMySQL.cpp
-
-HEADERS	+= \
-	../src/terralib/drivers/MySQL/TeMySQL.h
-	
-INCLUDEPATH += \
-	. \
-	.. \
-	../src/terralib/kernel \
-	../src/terralib/application \
-	../src/terralib/functions \
-	../src/terralib/stat \
-	../src/shapelib \
-	../src/zlib \
-	../src/terralib/application/qt \
-	../src/terralib/drivers/MySQL \
-	../src/terralib/drivers/MySQL/include \
-	../src/terralib/drivers/OracleSpatial \
-	../src/terralib/drivers/OracleSpatial/OCI/include \
-	../src/terralib/drivers/PostgreSQL \
-	../src/terralib/drivers/PostgreSQL/includepg 
-
-LIBS += \
-	-L../terralibx/shapelib \
-	-L../terralibx/stat \
-	-L../terralibx/terralib \
-	-L../terralibx/tiff \
-	-L../terralibx/PostgreSQL \
-	-L/usr/local/lib -L/usr/lib -L/usr/lib/mysql -L/usr/local/lib/mysql \
-	-L/usr/local/mysql -L/usr/local/mysql/lib -L. \
-    -lshapelib -lstat -lterralib -ltiff -lmysqlclient -lpq -lcrypt
-
-
-
-
-
-
-
diff --git a/examples/querierWithSpatialRestGeometry/.cdtproject b/examples/querierWithSpatialRestGeometry/.cdtproject
deleted file mode 100644
index fc69c6a..0000000
--- a/examples/querierWithSpatialRestGeometry/.cdtproject
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse-cdt version="2.0"?>
-
-<cdtproject id="org.eclipse.cdt.make.core.make">
-<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
-<data>
-<item id="org.eclipse.cdt.core.pathentry">
-<pathentry kind="src" path=""/>
-<pathentry kind="out" path=""/>
-<pathentry kind="con" path="org.eclipse.cdt.make.core.DISCOVERED_SCANNER_INFO"/>
-</item>
-<item id="cdt_indexer">
-<indexEnabled indexValue="false"/>
-<indexerProblemsEnabled indexProblemsValue="0"/>
-</item>
-</data>
-</cdtproject>
diff --git a/examples/querierWithSpatialRestGeometry/.project b/examples/querierWithSpatialRestGeometry/.project
deleted file mode 100644
index 9380ec7..0000000
--- a/examples/querierWithSpatialRestGeometry/.project
+++ /dev/null
@@ -1,104 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>querierWithSpatialRestGeometry</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.cdt.make.core.makeBuilder</name>
-			<arguments>
-				<dictionary>
-					<key>org.eclipse.cdt.core.errorOutputParser</key>
-					<value>org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.VCErrorParser;</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.fullBuildTarget</key>
-					<value>clean all</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.incrementalBuildTarget</key>
-					<value>all</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
-					<value>false</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.buildLocation</key>
-					<value></value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.enableFullBuild</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.enabledIncrementalBuild</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
-					<value>clean</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.buildCommand</key>
-					<value>make</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.autoBuildTarget</key>
-					<value>all</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.stopOnError</key>
-					<value>false</value>
-				</dictionary>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.cdt.make.core.ScannerConfigBuilder</name>
-			<arguments>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.ScannerConfigDiscoveryEnabled</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.makeBuilderParserId</key>
-					<value>org.eclipse.cdt.make.core.GCCScannerInfoConsoleParser</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.esiProviderCommandEnabled</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.siProblemGenerationEnabled</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.useDefaultESIProviderCmd</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.makeBuilderParserEnabled</key>
-					<value>true</value>
-				</dictionary>
-				<dictionary>
-					<key>org.eclipse.cdt.make.core.esiProviderParserId</key>
-					<value>org.eclipse.cdt.make.core.GCCSpecsConsoleParser</value>
-				</dictionary>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.cdt.core.cnature</nature>
-		<nature>org.eclipse.cdt.make.core.makeNature</nature>
-		<nature>org.eclipse.cdt.make.core.ScannerConfigNature</nature>
-	</natures>
-</projectDescription>
diff --git a/examples/querierWithSpatialRestGeometry/Makefile b/examples/querierWithSpatialRestGeometry/Makefile
deleted file mode 100644
index 3f334c2..0000000
--- a/examples/querierWithSpatialRestGeometry/Makefile
+++ /dev/null
@@ -1,23 +0,0 @@
-all: querierWithSpatialRestGeometry
-
-shapelib:
-	cd ../terralibx/shapelib; make
-
-tiff:
-	cd ../terralibx/tiff; make
-
-terralib:
-	cd ../terralibx/terralib; make
-
-stat:
-	cd ../terralibx/stat; make
-
-querierWithSpatialRestGeometry: shapelib tiff terralib stat
-	qmake -o makeQuerierWithSpatialRestGeometry querierWithSpatialRestGeometry.pro; make -f makeQuerierWithSpatialRestGeometry
-
-clean:
-	if \
-		test -f makeQuerierWithSpatialRestGeometry; \
-	then \
-		make -f makeQuerierWithSpatialRestGeometry distclean; rm -f makeQuerierWithSpatialRestGeometry; \
-	fi
\ No newline at end of file
diff --git a/examples/querierWithSpatialRestGeometry/querierWithSpatialRestGeometry.cpp b/examples/querierWithSpatialRestGeometry/querierWithSpatialRestGeometry.cpp
deleted file mode 100644
index 17afae9..0000000
--- a/examples/querierWithSpatialRestGeometry/querierWithSpatialRestGeometry.cpp
+++ /dev/null
@@ -1,152 +0,0 @@
-/************************************************************************************
-TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The library provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use
-of this library and its documentation.
-*************************************************************************************/
-/* 
-   This example shows how to use a querier from theme, using a spatial restriction 
-	defined by a geometry (polygons, lines, cells and points) from another theme. 
-	This spatial restriction is associated to querier. 
-   
-   Author: Karine Reis 
-*/
-
-#include "TeMySQL.h"
-#include "TeQuerier.h"
-#include "TeInitQuerierStrategy.h"
-#include "TeQuerierParams.h"
-
-#include <time.h>
-#include <iostream>
-
-using std::cout;
-
-int 
-main()
-{	
-	
-	// Datatabase server parameters
-     string host = "localhost";
-     string dbname = "saudavel";
-     string user = "root";
-     string pass = "karine";
-
-	 // Connects to database
-     TeDatabase* db_ = new TeMySQL();
-     if (!db_->connect(host,user,pass,dbname))
-     {
-         cout << "Error: " << db_->errorMessage() << endl;
-         return 1;
-     }
-
-	// Load the themes 
-	TeTheme* coletas = new TeTheme("Coletas");
-	if (!db_->loadTheme(coletas))
-    {
-        cout << "Error: " << db_->errorMessage() << endl; 
-		db_->close(); 
-        return 1;
-    }
-
-	TeTheme* bairros = new TeTheme("ibge_bairro");  
-	if (!db_->loadTheme(bairros))
-    {
-        cout << "Error: " << db_->errorMessage() << endl; 
-		db_->close(); 
-        return 1;
-    }
-		
-	//Init querier strategies
-	TeInitQuerierStrategies();
-
-		
-	// ------------ querier to theme "bairros"
-	bool loadGeometries = true;
-	vector<string> attrs;
-	attrs.push_back ("BAIRRO2000_REC.NOME");
-
-	TeQuerierParams querParamsBair(loadGeometries, attrs);
-	querParamsBair.setParams(bairros);
-	
-	TeQuerier  querBairros(querParamsBair); 
-
-	if(!querBairros.loadInstances())
-	{
-		cout << " No data!!! " << endl; 
-		return 1;
-	}
-
-	//Load each element and pass to querier as spatial restriction
-	TeSTInstance bairro;
-	while(querBairros.fetchInstance (bairro))
-	{
-		string name;
-		bairro.getPropertyValue(name, 0);
-
-		cout << " Bairro: " << name << endl;
-		
-		TePolygonSet setP;
-		
-		if(!bairro.getGeometry (setP))  //get the polygon set
-			continue;
-
-		// ------------ querier to theme coletas
-		loadGeometries = false;
-		vector<string> attributes;
-		attributes.push_back ("COLETAS.COD_ARMADILHA");
-
-		TeQuerierParams querParamsCol(loadGeometries, attributes);
-		querParamsCol.setParams(coletas);
-		
-		//spatial restriction
-		querParamsCol.setSpatialRest(&setP);
-
-		TeQuerier  querColetas(querParamsCol);
-		
-		if(!querColetas.loadInstances())
-		{
-			cout << " No data!!! " << endl; 
-			continue;
-		}
-
-		TeSTInstance coleta;
-		while(querColetas.fetchInstance(coleta)) 
-		{
-			// Plot each attribute, its name and value
-			TePropertyVector vec = coleta.getPropertyVector();
-			for(unsigned int i=0; i<vec.size(); ++i)
-			{
-				string  attrName = vec[i].attr_.rep_.name_;
-				string  attrValue = vec[i].value_;
-
-				cout << attrName  << " : " << attrValue << endl;
-			}
-		}
-	}
-
-	cout << " End " << endl;
-	getchar(); 
-	db_->close ();
-	return 0;
-}
-
-
-
-
diff --git a/examples/querierWithSpatialRestGeometry/querierWithSpatialRestGeometry.dsp b/examples/querierWithSpatialRestGeometry/querierWithSpatialRestGeometry.dsp
deleted file mode 100644
index a9f4f3a..0000000
--- a/examples/querierWithSpatialRestGeometry/querierWithSpatialRestGeometry.dsp
+++ /dev/null
@@ -1,114 +0,0 @@
-# Microsoft Developer Studio Project File - Name="querierWithSpatialRestGeometry" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=querierWithSpatialRestGeometry - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "querierWithSpatialRestGeometry.mak".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "querierWithSpatialRestGeometry.mak" CFG="querierWithSpatialRestGeometry - Win32 Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "querierWithSpatialRestGeometry - Win32 Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "querierWithSpatialRestGeometry - Win32 Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "querierWithSpatialRestGeometry - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drive [...]
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x416 /d "NDEBUG"
-# ADD RSC /l 0x416 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\shapelib\Release\shapelib.lib ..\..\terralibw\freetype\Release\freetype.lib ..\..\terralibw\tiff\Release\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\Postg [...]
-# SUBTRACT LINK32 /pdb:none
-
-!ELSEIF  "$(CFG)" == "querierWithSpatialRestGeometry - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terra [...]
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x416 /d "_DEBUG"
-# ADD RSC /l 0x416 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\shapelib\Debug\shapelib.lib ..\..\terralibw\freetype\Debug\freetype.lib ..\..\terralibw\tiff\Debug\tiff.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\li [...]
-# SUBTRACT LINK32 /pdb:none
-
-!ENDIF 
-
-# Begin Target
-
-# Name "querierWithSpatialRestGeometry - Win32 Release"
-# Name "querierWithSpatialRestGeometry - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=.\querierWithSpatialRestGeometry.cpp
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\src\terralib\drivers\MySQL\TeMySQL.cpp
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\src\terralib\drivers\MySQL\TeMySQL.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/examples/querierWithSpatialRestGeometry/querierWithSpatialRestGeometry.dsw b/examples/querierWithSpatialRestGeometry/querierWithSpatialRestGeometry.dsw
deleted file mode 100644
index e5d3234..0000000
--- a/examples/querierWithSpatialRestGeometry/querierWithSpatialRestGeometry.dsw
+++ /dev/null
@@ -1,89 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "querierWithSpatialRestGeometry"=".\querierWithSpatialRestGeometry.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name terralib
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "freetype"="..\..\terralibw\freetype\freetype.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "shapelib"="..\..\terralibw\shapelib\shapelib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "terralib"="..\..\terralibw\terralib\terralib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name freetype
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name shapelib
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name tiff
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "tiff"="..\..\terralibw\tiff\tiff.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/examples/querierWithSpatialRestGeometry/querierWithSpatialRestGeometry.pro b/examples/querierWithSpatialRestGeometry/querierWithSpatialRestGeometry.pro
deleted file mode 100644
index ff5fa95..0000000
--- a/examples/querierWithSpatialRestGeometry/querierWithSpatialRestGeometry.pro
+++ /dev/null
@@ -1,47 +0,0 @@
-TEMPLATE = app
-TARGET = querierWithSpatialRestGeometry
-CONFIG += qt warn_on thread debug rtti exceptions
-LANGUAGE = C++
-
-OBJECTS_DIR = .obj
-
-SOURCES	+= \
-	querierWithSpatialRestGeometry.cpp \
-	../src/terralib/drivers/MySQL/TeMySQL.cpp
-
-HEADERS	+= \
-	../src/terralib/drivers/MySQL/TeMySQL.h
-	
-INCLUDEPATH += \
-	. \
-	.. \
-	../src/terralib/kernel \
-	../src/terralib/application \
-	../src/terralib/functions \
-	../src/terralib/stat \
-	../src/shapelib \
-	../src/zlib \
-	../src/terralib/application/qt \
-	../src/terralib/drivers/MySQL \
-	../src/terralib/drivers/MySQL/include \
-	../src/terralib/drivers/OracleSpatial \
-	../src/terralib/drivers/OracleSpatial/OCI/include \
-	../src/terralib/drivers/PostgreSQL \
-	../src/terralib/drivers/PostgreSQL/includepg 
-
-LIBS += \
-	-L../terralibx/shapelib \
-	-L../terralibx/stat \
-	-L../terralibx/terralib \
-	-L../terralibx/tiff \
-	-L../terralibx/PostgreSQL \
-	-L/usr/local/lib -L/usr/lib -L/usr/lib/mysql -L/usr/local/lib/mysql \
-	-L/usr/local/mysql -L/usr/local/mysql/lib -L. \
-    -lshapelib -lstat -lterralib -ltiff -lmysqlclient -lpq -lcrypt
-
-
-
-
-
-
-
diff --git a/examples/rasterSlicing/.cdtproject b/examples/rasterSlicing/.cdtproject
old mode 100644
new mode 100755
diff --git a/examples/rasterSlicing/.project b/examples/rasterSlicing/.project
old mode 100644
new mode 100755
diff --git a/examples/rasterSlicing/Makefile b/examples/rasterSlicing/Makefile
old mode 100644
new mode 100755
index 7904703..046ef3a
--- a/examples/rasterSlicing/Makefile
+++ b/examples/rasterSlicing/Makefile
@@ -1,23 +1,30 @@
 all: rasterSlicing
 
-shapelib:
-	cd ../terralibx/shapelib; make
-
-tiff:
-	cd ../terralibx/tiff; make
+debug: rasterSlicing_dbg
 
 terralib:
-	cd ../terralibx/terralib; make
-
-stat:
-	cd ../terralibx/stat; make
+	cd ../../terralibx/terralib; make
+	
+terralib_dbg:
+	cd ../../terralibx/terralib; make debug
 
-rasterSlicing: shapelib tiff terralib stat
+rasterSlicing: terralib
 	qmake -o makeRasterSlicing rasterSlicing.pro; make -f makeRasterSlicing
 
+rasterSlicing_dbg: terralib_dbg
+	qmake -o makeRasterSlicing.debug rasterSlicing.pro TE_PROJECT_TYPE=DEBUG; \
+	make -f makeRasterSlicing.debug
+
 clean:
 	if \
 		test -f makeRasterSlicing; \
 	then \
 		make -f makeRasterSlicing distclean; rm -f makeRasterSlicing; \
+	fi
+	
+clean_debug:
+	if \
+		test -f makeRasterSlicing.debug; \
+	then \
+		make -f makeRasterSlicing.debug distclean; rm -f makeRasterSlicing.debug; \
 	fi
\ No newline at end of file
diff --git a/examples/rasterSlicing/rasterSlicing.cpp b/examples/rasterSlicing/rasterSlicing.cpp
old mode 100644
new mode 100755
index 83020f8..515449f
--- a/examples/rasterSlicing/rasterSlicing.cpp
+++ b/examples/rasterSlicing/rasterSlicing.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -29,18 +29,15 @@ of this library and its documentation.
 */
 
 #include "TeRaster.h"
-#include "TeInitRasterDecoders.h"
 #include "TeMySQL.h"
 
 int main()
 {
-	TeInitRasterDecoders();
-
  	// Datatabase server parameters
 	string host = "localhost";
-	string dbname = "TerraTeste";
+	string dbname = "DB320RC1";
 	string user = "root";
-	string password = "";
+	string password = "vinhas";
 	TeDatabase* db = new TeMySQL();
 	if (!db->connect(host, user, password, dbname))
 	{
@@ -66,7 +63,7 @@ int main()
 	view->projection(layer->projection());
 	if (!db->insertView(view)) 
 	{
-		 cout << "Couldn�t insert view into the database: " << db->errorMessage() << endl;
+		 cout << "Couldn�t insert view into the database: " << db->errorMessage() << endl;
 		 db->close();
 		 cout << endl << "Press Enter\n";
 		 getchar();
@@ -74,7 +71,7 @@ int main()
 	}
 
 	// Create a new theme and a legend over it
-	TeTheme* rstTheme = new TeTheme("Elevation", layer);
+	TeAbstractTheme* rstTheme = new TeTheme("Elevation", layer);
 
 	rstTheme->visibleRep(TeRASTER | 0x40000000);	// make visible: the raster representation
 													// and the legend (0x4000000)
@@ -94,10 +91,10 @@ int main()
 	short blue[10]  = { 0, 0, 0, 0, 0, 46, 94, 142, 192, 242 };
 
 	// Define a slicing mode: 10 slices
-	TeGrouping* group1 = new TeGrouping();
-	group1->groupMode_ = TeRasterSlicing;
-	group1->groupNumSlices_ = 10;
-	group1->groupPrecision_ = 8;
+	TeGrouping group1;
+	group1.groupMode_ = TeRasterSlicing;
+	group1.groupNumSlices_ = 10;
+	group1.groupPrecision_ = 8;
 
 	
 	// Default way of slicing a raster representation: slices of equal size
@@ -112,15 +109,15 @@ int main()
 
 	// Assign to each slice one color of the pallete
 	int ng;
-	for (ng=0; ng<rstTheme->grouping()->groupNumSlices_; ng++)
+	for (ng=0; ng<rstTheme->grouping().groupNumSlices_; ng++)
 	{
 		TeColor color(red[ng],green[ng],blue[ng]);
-		TeVisual visual(TePOLYGONS);            
-		visual.color(color);
-		visual.transparency(rstTheme->defaultLegend().visual(TePOLYGONS).transparency());
-		visual.contourStyle(rstTheme->defaultLegend().visual(TePOLYGONS).contourStyle());
-		visual.contourWidth(rstTheme->defaultLegend().visual(TePOLYGONS).contourWidth());
-		visual.contourColor(rstTheme->defaultLegend().visual(TePOLYGONS).contourColor());	
+		TeVisual* visual = TeVisualFactory::make("tevisual");            
+		visual->color(color);
+		visual->transparency(rstTheme->defaultLegend().visual(TePOLYGONS)->transparency());
+		visual->contourStyle(rstTheme->defaultLegend().visual(TePOLYGONS)->contourStyle());
+		visual->contourWidth(rstTheme->defaultLegend().visual(TePOLYGONS)->contourWidth());
+		visual->contourColor(rstTheme->defaultLegend().visual(TePOLYGONS)->contourColor());	
 		rstTheme->setGroupingVisual(ng+1,visual,TePOLYGONS);
 	}
 
@@ -161,10 +158,10 @@ int main()
 	TeSlice sl4("1100","1200"); 
 	mySlices.push_back(sl4);
 	 
-	TeGrouping* group2 = new TeGrouping();
-	group2->groupMode_ = TeRasterSlicing;
-	group2->groupNumSlices_ = 4;
-	group2->groupPrecision_ = 8;
+	TeGrouping group2;
+	group2.groupMode_ = TeRasterSlicing;
+	group2.groupNumSlices_ = 4;
+	group2.groupPrecision_ = 8;
 
 	if (!rstTheme->buildGrouping(group2,mySlices)) 
 	{
@@ -175,16 +172,16 @@ int main()
 		 return 1;
 	}
 
-	for (ng=0; ng<rstTheme->grouping()->groupNumSlices_; ng++)
+	for (ng=0; ng<rstTheme->grouping().groupNumSlices_; ng++)
 	{
 		TeColor color(red[ng*2],green[ng*2],blue[ng*2]);
-		TeVisual visual(TePOLYGONS);            
-		visual.color(color);
-		visual.transparency(rstTheme->defaultLegend().visual(TePOLYGONS).transparency());
-		visual.contourStyle(rstTheme->defaultLegend().visual(TePOLYGONS).contourStyle());
-		visual.contourWidth(rstTheme->defaultLegend().visual(TePOLYGONS).contourWidth());
-		visual.contourColor(rstTheme->defaultLegend().visual(TePOLYGONS).contourColor());	
-		rstTheme->setGroupingVisual(ng+1,visual,TePOLYGONS);
+		TeVisual* visual2 = TeVisualFactory::make("tevisual");            
+		visual2->color(color);
+		visual2->transparency(rstTheme->defaultLegend().visual(TePOLYGONS)->transparency());
+		visual2->contourStyle(rstTheme->defaultLegend().visual(TePOLYGONS)->contourStyle());
+		visual2->contourWidth(rstTheme->defaultLegend().visual(TePOLYGONS)->contourWidth());
+		visual2->contourColor(rstTheme->defaultLegend().visual(TePOLYGONS)->contourColor());	
+		rstTheme->setGroupingVisual(ng+1,visual2,TePOLYGONS);
 	}
 
 	if (!rstTheme->saveGrouping())
diff --git a/examples/rasterSlicing/rasterSlicing.dsp b/examples/rasterSlicing/rasterSlicing.dsp
old mode 100644
new mode 100755
index e01f848..fa23a7b
--- a/examples/rasterSlicing/rasterSlicing.dsp
+++ b/examples/rasterSlicing/rasterSlicing.dsp
@@ -51,7 +51,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\shapelib\Release\shapelib.lib ..\..\terralibw\freetype\Release\freetype.lib ..\..\terralibw\tiff\Release\tiff.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\Postg [...]
+# ADD LINK32 ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\tiff\Release\tiff.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib /nologo /subsystem:console /machine:I386 /out:"../Release/rasterSlicing.exe"
 # SUBTRACT LINK32 /pdb:none
 
 !ELSEIF  "$(CFG)" == "rasterSlicing - Win32 Debug"
@@ -77,7 +77,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\shapelib\Debug\shapelib.lib ..\..\terralibw\freetype\Debug\freetype.lib ..\..\terralibw\tiff\Debug\tiff.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\li [...]
+# ADD LINK32 ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\tiff\Debug\tiff.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib /nologo /subsystem:console /debug /machine:I386 /out:"../Debug/rasterSlicing.exe" /pdbtype:sept
 # SUBTRACT LINK32 /pdb:none
 
 !ENDIF 
diff --git a/examples/rasterSlicing/rasterSlicing.dsw b/examples/rasterSlicing/rasterSlicing.dsw
old mode 100644
new mode 100755
diff --git a/examples/rasterSlicing/rasterSlicing.pro b/examples/rasterSlicing/rasterSlicing.pro
old mode 100644
new mode 100755
index c099927..510992f
--- a/examples/rasterSlicing/rasterSlicing.pro
+++ b/examples/rasterSlicing/rasterSlicing.pro
@@ -1,47 +1,10 @@
-TEMPLATE = app
-TARGET = rasterSlicing
-CONFIG += qt warn_on thread debug rtti exceptions
-LANGUAGE = C++
-
-OBJECTS_DIR = .obj
+include( ../base/base.pro )
 
 SOURCES	+= \
 	rasterSlicing.cpp \
-	../src/terralib/drivers/MySQL/TeMySQL.cpp
+	../../src/terralib/drivers/MySQL/TeMySQL.cpp
 
 HEADERS	+= \
-	../src/terralib/drivers/MySQL/TeMySQL.h
+	../../src/terralib/drivers/MySQL/TeMySQL.h
 	
-INCLUDEPATH += \
-	. \
-	.. \
-	../src/terralib/kernel \
-	../src/terralib/application \
-	../src/terralib/functions \
-	../src/terralib/stat \
-	../src/shapelib \
-	../src/zlib \
-	../src/terralib/application/qt \
-	../src/terralib/drivers/MySQL \
-	../src/terralib/drivers/MySQL/include \
-	../src/terralib/drivers/OracleSpatial \
-	../src/terralib/drivers/OracleSpatial/OCI/include \
-	../src/terralib/drivers/PostgreSQL \
-	../src/terralib/drivers/PostgreSQL/includepg 
-
-LIBS += \
-	-L../terralibx/shapelib \
-	-L../terralibx/stat \
-	-L../terralibx/terralib \
-	-L../terralibx/tiff \
-	-L../terralibx/PostgreSQL \
-	-L/usr/local/lib -L/usr/lib -L/usr/lib/mysql -L/usr/local/lib/mysql \
-	-L/usr/local/mysql -L/usr/local/mysql/lib -L. \
-    -lshapelib -lstat -lterralib -ltiff -lmysqlclient -lpq -lcrypt
-
-
-
-
-
-
 
diff --git a/examples/rasterSlicing/rasterSlicing.sln b/examples/rasterSlicing/rasterSlicing.sln
new file mode 100755
index 0000000..cff0cf7
--- /dev/null
+++ b/examples/rasterSlicing/rasterSlicing.sln
@@ -0,0 +1,39 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rasterSlicing", "rasterSlicing.vcproj", "{AC29CA10-2B75-494F-A370-6767C7AB5FC1}"
+	ProjectSection(ProjectDependencies) = postProject
+		{40917057-E283-4760-B645-D2BA2D7E5A35} = {40917057-E283-4760-B645-D2BA2D7E5A35}
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C} = {BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "terralib", "..\..\terralibw\terralib\terralib.vcproj", "{40917057-E283-4760-B645-D2BA2D7E5A35}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjpeg", "..\..\terralibw\libjpeg\libjpeg.vcproj", "{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		Debug = Debug
+		Release = Release
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.ActiveCfg = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.Build.0 = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.ActiveCfg = Release|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.Build.0 = Release|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Debug.ActiveCfg = Debug|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Debug.Build.0 = Debug|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Release.ActiveCfg = Release|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Release.Build.0 = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.ActiveCfg = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.Build.0 = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.ActiveCfg = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
diff --git a/examples/rasterSlicing/rasterSlicing.vcproj b/examples/rasterSlicing/rasterSlicing.vcproj
new file mode 100755
index 0000000..58dc76b
--- /dev/null
+++ b/examples/rasterSlicing/rasterSlicing.vcproj
@@ -0,0 +1,164 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="rasterSlicing"
+	ProjectGUID="{AC29CA10-2B75-494F-A370-6767C7AB5FC1}">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="..\Debug\"
+			IntermediateDirectory="..\Debug\"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="-Zm200 -GX -w34100 -w34189"
+				Optimization="4"
+				AdditionalIncludeDirectories=".;..;..\..\src\terralib\functions;..\..\src\terralib\kernel;..\..\src\zlib;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include;..\..\src\shapelib"
+				PreprocessorDefinitions="UNICODE,WIN32"
+				GeneratePreprocessedFile="0"
+				MinimalRebuild="TRUE"
+				ExceptionHandling="TRUE"
+				RuntimeLibrary="3"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				AssemblerListingLocation="..\Debug\"
+				ObjectFile="..\Debug\"
+				ProgramDataBaseFileName=".\"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Debug/terralib/terralib.lib ../../Debug/libjpeg/libjpeg.lib ../../Debug/tiff/tiff.lib ../../Debug/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
+				OutputFile="..\Debug\rasterSlicing.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreDefaultLibraryNames="msvcrt.lib"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				WarningLevel="0"
+				DefaultCharType="0"
+				EnableErrorChecks="1"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="..\Release\"
+			IntermediateDirectory="..\Release\"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE">
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="-Zm200 -GX -w34100 -w34189"
+				Optimization="4"
+				AdditionalIncludeDirectories=".;..;..\..\src\terralib\functions;..\..\src\terralib\kernel;..\..\src\zlib;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include;..\..\src\shapelib"
+				PreprocessorDefinitions="UNICODE,WIN32"
+				GeneratePreprocessedFile="0"
+				MinimalRebuild="TRUE"
+				ExceptionHandling="TRUE"
+				RuntimeLibrary="2"
+				BufferSecurityCheck="FALSE"
+				RuntimeTypeInfo="TRUE"
+				AssemblerListingLocation="..\Debug\"
+				ObjectFile="..\Debug\"
+				ProgramDataBaseFileName=".\"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="3"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Release/terralib/terralib.lib ../../Release/libjpeg/libjpeg.lib ../../Release/tiff/tiff.lib ../../Release/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32.lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
+				OutputFile="..\Release\rasterSlicing.exe"
+				LinkIncremental="2"
+				SuppressStartupBanner="TRUE"
+				IgnoreDefaultLibraryNames=""
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=""
+				SubSystem="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				WarningLevel="0"
+				DefaultCharType="0"
+				EnableErrorChecks="1"/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath="rasterSlicing.cpp">
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.cpp">
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.h">
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/spatialQuery/.cdtproject b/examples/spatialQuery/.cdtproject
old mode 100644
new mode 100755
diff --git a/examples/spatialQuery/.project b/examples/spatialQuery/.project
old mode 100644
new mode 100755
diff --git a/examples/spatialQuery/Makefile b/examples/spatialQuery/Makefile
old mode 100644
new mode 100755
index ef42ba2..91fa4a7
--- a/examples/spatialQuery/Makefile
+++ b/examples/spatialQuery/Makefile
@@ -1,23 +1,31 @@
 all: spatialQuery
 
-shapelib:
-	cd ../terralibx/shapelib; make
-
-tiff:
-	cd ../terralibx/tiff; make
+debug: spatialQuery_dbg
 
 terralib:
-	cd ../terralibx/terralib; make
-
-stat:
-	cd ../terralibx/stat; make
+	cd ../../terralibx/terralib; make
 
-spatialQuery: shapelib tiff terralib stat
+terralib_dbg:
+	cd ../../terralibx/terralib; make debug
+	
+spatialQuery: terralib 
 	qmake -o makeSpatialQuery spatialQuery.pro; make -f makeSpatialQuery
 
+spatialQuery_dbg: terralib_dbg 
+	qmake -o makeSpatialQuery.debug spatialQuery.pro TE_PROJECT_TYPE=DEBUG; \
+	make -f makeSpatialQuery.debug
+
+
 clean:
 	if \
 		test -f makeSpatialQuery; \
 	then \
 		make -f makeSpatialQuery distclean; rm -f makeSpatialQuery; \
-	fi
\ No newline at end of file
+	fi
+	
+clean_debug:
+	if \
+		test -f makeSpatialQuery.debug; \
+	then \
+		make -f makeSpatialQuery.debug distclean; rm -f makeSpatialQuery.debug; \
+	fi	
\ No newline at end of file
diff --git a/examples/spatialQuery/spatialQuery.cpp b/examples/spatialQuery/spatialQuery.cpp
old mode 100644
new mode 100755
index 2ee275b..5bee991
--- a/examples/spatialQuery/spatialQuery.cpp
+++ b/examples/spatialQuery/spatialQuery.cpp
@@ -31,19 +31,17 @@ of this library and its documentation.
 */
 
 #include <TeMySQL.h>
-#include <TeImportExport.h>
-
-
+#include <TeDriverSHPDBF.h>
 
 int main()
 {
  	// Datatabase server parameters
 	string host = "localhost";
-	string dbname = "TerraTeste";
+	string dbname = "DB320RC1";
 	string user = "root";
-	string password = "";
+	string password = "vinhas";
 
-	// Open a connection to the TerraTeste MySQL database 
+	// Open a connection to the DB320RC1 MySQL database 
 	TeDatabase* db = new TeMySQL();
 	if (!db->connect(host, user, password, dbname))
 	{
@@ -54,125 +52,128 @@ int main()
 	}
 	cout << "Connection successful to the database \"" << dbname << "\" on MySQL server \"" << host << "\" !\n";;
 
-	// Check whether there is a layer of polygons called "states".
-	// In negative case, import it from the states.shp file
-	string layerName = "states";
+	// Check whether there is a layer of polygons called "Mapa_Distritos_SP".
+	// In negative case, import it from the Mapa_Distritos_SP.shp file
+	string layerName = "Mapa_Distritos_SP";
 
-	TeDatum wgs84 = TeDatumFactory::make("WGS84");
-	TeLatLong* proj = new TeLatLong(wgs84);
+	TeDatum sad69 = TeDatumFactory::make("SAD69");
+	TePolyconic* proj = new TePolyconic(sad69, -54*TeCDR);
 
 	if (db->layerExist(layerName) == false)
 	{
 		// Create a new layer in the database
 		TeLayer* layer = new TeLayer(layerName, db, proj);
-		string filename = "../data/states.shp";	// Shapefile path
-		string tablename = "States";	// Name of the attribute table
+		string filename = "../data/Mapa_Distritos_SP.shp";	// Shapefile path
+		string tablename = "Mapa_Distritos_SP";	// Name of the attribute table
 
 		if (TeImportShape(layer, filename, tablename))
-			cout << "The shapefile \"states.shp\" was imported successfully into the TerraLib database!\n" << endl;
+			cout << "The shapefile \"Mapa_Distritos_SP.shp\" was imported successfully into the TerraLib database!\n" << endl;
 		else
-			cout << "Error: Fail to import the shapefile \"rivers.shp\"!\n" << endl;
+			cout << "Error: Fail to import the shapefile \"Mapa_Distritos_SP.shp\"!\n" << endl;
 	}	
 
-	// Check whether there is a layer of lines called "rivers".
-	// In negative case, import it from the states.shp file
-	layerName = "rivers";
+	// Check whether there is a layer of lines called "Mapa_Drenagem_SP".
+	// In negative case, import it from the Mapa_Drenagem_SP.shp file
+	layerName = "Mapa_Drenagem_SP";
 
 	if (db->layerExist(layerName) == false)
 	{
 		// Create a new layer in the database
 		TeLayer* layer = new TeLayer(layerName, db, proj);
-		string filename = "../data/rivers.shp";	// Shapefile path
-		string tablename = "Rivers";	// Name of the attribute table
+		string filename = "../data/Mapa_Drenagem_SP.shp";	// Shapefile path
+		string tablename = "Mapa_Drenagem_SP";	// Name of the attribute table
 
 		if (TeImportShape(layer, filename, tablename))
-			cout << "The shapefile \"rivers.shp\" was imported successfully into the TerraLib database!\n" << endl;
+			cout << "The shapefile \"Mapa_Drenagem_SP.shp\" was imported successfully into the TerraLib database!\n" << endl;
 		else
-			cout << "Error: Fail to import the shapefile \"rivers.shp\"!\n" << endl;
+			cout << "Error: Fail to import the shapefile \"Mapa_Drenagem_SP.shp\"!\n" << endl;
 	}
 
-	// Check whether there is a layer of points called "cities".
-	// In negative case, import it from the states.shp file
-	layerName = "cities";
+	// Check whether there is a layer of points called "Mapa_Bairros_SP".
+	// In negative case, import it from the Mapa_Bairros_SP.shp file
+	layerName = "Mapa_Industrias_SP";
 
 	if (db->layerExist(layerName) == false)
 	{
 		// Create a new layer in the database
 		TeLayer* layer = new TeLayer(layerName, db, proj);
-		string filename = "../data/cities.shp";	// Shapefile path
-		string tablename = "Cities";	// Name of the attribute table
+		string filename = "../data/Mapa_Industrias_SP.shp";	// Shapefile path
+		string tablename = "Mapa_Industrias_SP";	// Name of the attribute table
 
 		if (TeImportShape(layer, filename, tablename))
-			cout << "The shapefile \"cities.shp\" was imported successfully into the TerraLib database!\n" << endl;
+			cout << "The shapefile \"Mapa_Industrias_SP.shp\" was imported successfully into the TerraLib database!\n" << endl;
 		else
-			cout << "Error: Fail to import the shapefile \"cities.shp\"!\n" << endl;
+			cout << "Error: Fail to import the shapefile \"Mapa_Industrias_SP.shp\"!\n" << endl;
 	}
 
 	// Retrieve from the database a layer of polygons, a layer of lines and a layer of points
-    TeLayer* states = new TeLayer("states");		// states have polygons
-    if (!db->loadLayer(states))                
+    TeLayer* regions = new TeLayer("Mapa_Distritos_SP");		// regions have polygons
+    if (!db->loadLayer(regions))                
     {                                                                                               
-        cout << "Fail to load layer \"states\": " << db->errorMessage() << endl;
+        cout << "Fail to load layer \"Mapa_Distritos_SP\": " << db->errorMessage() << endl;
 		cout << endl << "Press Enter\n";
 		getchar();
 		return 1;
     }
 
-    TeLayer* rivers = new TeLayer("rivers");	// rivers have lines
+    TeLayer* rivers = new TeLayer("Mapa_Drenagem_SP");	// rivers have lines
     if (!db->loadLayer(rivers))                
     {                                                                                               
-        cout << "Fail to load layer \"rivers\": " << db->errorMessage() << endl;
+        cout << "Fail to load layer \"Mapa_Drenagem_SP\": " << db->errorMessage() << endl;
 		cout << endl << "Press Enter\n";
 		getchar();
 		return 1;
     }
 
-	TeLayer* cities = new TeLayer("cities");	// cities have points
-    if (!db->loadLayer(cities))                
+	TeLayer* industries = new TeLayer("Mapa_Industrias_SP");	// districts have points
+    if (!db->loadLayer(industries))                
     {                                                                                               
-        cout << "Fail to load layer \"cities\": " << db->errorMessage() << endl;
+        cout << "Fail to load layer \"Mapa_Industrias_SP\": " << db->errorMessage() << endl;
 		cout << endl << "Press Enter\n";
 		getchar();
 		return 1;
     }
 
+	//get precision from projection
+	TePrecision::instance().setPrecision(TeGetPrecision(proj));	
+	
 	vector<string> objsOut;	// holds the identification of the resulting objects
 	
 	vector<string> objsIn;  // objects to be queried		
-	objsIn.push_back("23");
+	objsIn.push_back("48");
 
-	// Retrieve the states that touches state 23
-	bool res = db->spatialRelation(states->tableName(TePOLYGONS), TePOLYGONS, objsIn,
+	// Retrieve the regions that are adjacent or touch the district 48
+	bool res = db->spatialRelation(regions->tableName(TePOLYGONS), TePOLYGONS, objsIn,
 		                      objsOut, TeTOUCHES);
 	if (res)
 	{
-		cout << "States that touch state \"23\": \n";
+		cout << "Regions that touch the region \"48\": \n";
 		unsigned int i;
 		for (i=0; i<objsOut.size(); i++)
-			cout << "State: " << objsOut[i] << endl;
+			cout << "Regions: " << objsOut[i] << endl;
 
 	}
 
-	// Retrieve the rivers that crosses state 23
-	res = db->spatialRelation(states->tableName(TePOLYGONS), TePOLYGONS, objsIn,
+	// Retrieve the rivers that cross the district 48
+	res = db->spatialRelation(regions->tableName(TePOLYGONS), TePOLYGONS, objsIn,
 		                            rivers->tableName(TeLINES), TeLINES, objsOut, TeCROSSES);
 	if (res)
 	{
-		cout << "\nRivers that cross state \"23\": \n";
+		cout << "\nRivers that cross the region \"48\": \n";
 		unsigned int i;
 		for (i=0; i<objsOut.size(); i++)
 			cout << "River: " << objsOut[i] << endl;
 	}
 
-	// Retrieve the cities that are within state 23
-	res = db->spatialRelation(states->tableName(TePOLYGONS), TePOLYGONS, objsIn,
-		                      cities->tableName(TePOINTS), TePOINTS, objsOut, TeWITHIN);
+	// Retrieve the industries that are within the district 48
+	res = db->spatialRelation(regions->tableName(TePOLYGONS), TePOLYGONS, objsIn,
+		                      industries->tableName(TePOINTS), TePOINTS, objsOut, TeWITHIN);
 	if (res)
 	{
-		cout << "\nCities that are within state \"23\": \n";
+		cout << "\nIndustries that are within the region \"48\": \n";
 		unsigned int i;
 		for (i=0; i<objsOut.size(); i++)
-			cout << "City: " << objsOut[i] << endl;
+			cout << "Industry: " << objsOut[i] << endl;
 
 	}
 
diff --git a/examples/spatialQuery/spatialQuery.dsp b/examples/spatialQuery/spatialQuery.dsp
old mode 100644
new mode 100755
index 7d0b65a..6f11365
--- a/examples/spatialQuery/spatialQuery.dsp
+++ b/examples/spatialQuery/spatialQuery.dsp
@@ -42,7 +42,7 @@ RSC=rc.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drive [...]
+# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\terralibw\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\include" /I "..\..\src [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "NDEBUG"
 # ADD RSC /l 0x416 /d "NDEBUG"
@@ -51,7 +51,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\shapelib\Release\shapelib.lib ..\..\terralibw\freetype\Release\freetype.lib ..\..\terralibw\tiff\Release\tiff.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\Postg [...]
+# ADD LINK32 ..\..\terralibw\terralib\Release\terralib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\shapelib\Release\shapelib.lib /nologo /subsystem:console /machine:I386 /out:"../Release/spatialQuery.exe"
 # SUBTRACT LINK32 /pdb:none
 
 !ELSEIF  "$(CFG)" == "spatialQuery - Win32 Debug"
@@ -68,7 +68,7 @@ LINK32=link.exe
 # PROP Ignore_Export_Lib 0
 # PROP Target_Dir ""
 # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\src\freetype\include" /I "..\..\src\terralib\drivers\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terra [...]
+# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\STLport" /I "." /I "..\..\src\terralib\kernel" /I "..\..\src\terralib\application" /I "..\..\src\terralib\functions" /I "..\..\src\terralib\stat" /I "..\..\src\shapelib" /I "..\..\src\zlib" /I "..\..\src\jpeg\include" /I "..\..\terralibw\ado" /I "..\..\src\terralib\drivers\MySQL" /I "..\..\src\terralib\drivers\MySQL\include" /I "..\..\src\terralib\drivers\OracleSpatial" /I "..\..\src\terralib\drivers\OracleSpatial\OCI\include" /I " [...]
 # SUBTRACT CPP /YX
 # ADD BASE RSC /l 0x416 /d "_DEBUG"
 # ADD RSC /l 0x416 /d "_DEBUG"
@@ -77,7 +77,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\shapelib\Debug\shapelib.lib ..\..\terralibw\freetype\Debug\freetype.lib ..\..\terralibw\tiff\Debug\tiff.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\li [...]
+# ADD LINK32 ..\..\terralibw\terralib\Debug\terralib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib  ..\..\terralibw\shapelib\Debug\shapelib.lib /nologo /subsystem:console /debug /machine:I386 /out:"../Debug/spatialQuery.exe" /pdbtype:sept
 # SUBTRACT LINK32 /pdb:none
 
 !ENDIF 
diff --git a/examples/spatialQuery/spatialQuery.dsw b/examples/spatialQuery/spatialQuery.dsw
old mode 100644
new mode 100755
index a8c7731..7405772
--- a/examples/spatialQuery/spatialQuery.dsw
+++ b/examples/spatialQuery/spatialQuery.dsw
@@ -3,34 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
 
 ###############################################################################
 
-Project: "spatialQuery"=".\spatialQuery.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name terralib
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "freetype"="..\..\terralibw\freetype\freetype.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "shapelib"="..\..\terralibw\shapelib\shapelib.dsp" - Package Owner=<4>
+Project: "shapelib"=..\..\terralibw\shapelib\shapelib.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -42,7 +15,7 @@ Package=<4>
 
 ###############################################################################
 
-Project: "terralib"="..\..\terralibw\terralib\terralib.dsp" - Package Owner=<4>
+Project: "spatialQuery"=.\spatialQuery.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -51,19 +24,16 @@ Package=<5>
 Package=<4>
 {{{
     Begin Project Dependency
-    Project_Dep_Name freetype
+    Project_Dep_Name terralib
     End Project Dependency
     Begin Project Dependency
     Project_Dep_Name shapelib
     End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name tiff
-    End Project Dependency
 }}}
 
 ###############################################################################
 
-Project: "tiff"="..\..\terralibw\tiff\tiff.dsp" - Package Owner=<4>
+Project: "terralib"=..\..\terralibw\terralib\terralib.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -71,6 +41,9 @@ Package=<5>
 
 Package=<4>
 {{{
+    Begin Project Dependency
+    Project_Dep_Name freetype
+    End Project Dependency
 }}}
 
 ###############################################################################
diff --git a/examples/spatialQuery/spatialQuery.pro b/examples/spatialQuery/spatialQuery.pro
old mode 100644
new mode 100755
index b99ec1c..bf8c18b
--- a/examples/spatialQuery/spatialQuery.pro
+++ b/examples/spatialQuery/spatialQuery.pro
@@ -1,50 +1,12 @@
-TEMPLATE = app
-TARGET = spatialQuery
-CONFIG += qt warn_on thread debug rtti exceptions
-LANGUAGE = C++
-
-OBJECTS_DIR = .obj
+include( ../base/base.pro )
 
 SOURCES	+= \
 	spatialQuery.cpp \
-	../src/terralib/functions/TeImportDBF.cpp \
-	../src/terralib/functions/TeImportSHP.cpp \
-	../src/terralib/drivers/MySQL/TeMySQL.cpp
+	../../src/terralib/drivers/shapelib/TeImportDBF.cpp \
+	../../src/terralib/drivers/shapelib/TeImportSHP.cpp \
+	../../src/terralib/drivers/MySQL/TeMySQL.cpp
 
 HEADERS	+= \
-	../src/terralib/functions/TeImportExport.h \
-	../src/terralib/drivers/MySQL/TeMySQL.h
+	../../src/terralib/functions/TeImportExport.h \
+	../../src/terralib/drivers/MySQL/TeMySQL.h
 	
-INCLUDEPATH += \
-	. \
-	.. \
-	../src/terralib/kernel \
-	../src/terralib/application \
-	../src/terralib/functions \
-	../src/terralib/stat \
-	../src/shapelib \
-	../src/zlib \
-	../src/terralib/application/qt \
-	../src/terralib/drivers/MySQL \
-	../src/terralib/drivers/MySQL/include \
-	../src/terralib/drivers/OracleSpatial \
-	../src/terralib/drivers/OracleSpatial/OCI/include \
-	../src/terralib/drivers/PostgreSQL \
-	../src/terralib/drivers/PostgreSQL/includepg 
-
-LIBS += \
-	-L../terralibx/shapelib \
-	-L../terralibx/stat \
-	-L../terralibx/terralib \
-	-L../terralibx/tiff \
-	-L../terralibx/PostgreSQL \
-	-L/usr/local/lib -L/usr/lib -L/usr/lib/mysql -L/usr/local/lib/mysql \
-	-L/usr/local/mysql -L/usr/local/mysql/lib -L. \
-    -lshapelib -lstat -lterralib -ltiff -lmysqlclient -lpq -lcrypt
-
-
-
-
-
-
-
diff --git a/examples/spatialQuery/spatialQuery.sln b/examples/spatialQuery/spatialQuery.sln
new file mode 100755
index 0000000..d475620
--- /dev/null
+++ b/examples/spatialQuery/spatialQuery.sln
@@ -0,0 +1,54 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "spatialQuery", "spatialQuery.vcproj", "{628E765D-AEFB-45FA-8526-E756DC2FB72B}"
+	ProjectSection(ProjectDependencies) = postProject
+		{5A5FE33F-1D64-45B1-B98C-60F02C1D2BA7} = {5A5FE33F-1D64-45B1-B98C-60F02C1D2BA7}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shapelib", "..\..\terralibw\shapelib\shapelib.vcproj", "{5A5FE33F-1D64-45B1-B98C-60F02C1D2BA7}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjpeg", "..\..\terralibw\libjpeg\libjpeg.vcproj", "{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "terralib", "..\..\terralibw\terralib\terralib.vcproj", "{99BC87CA-140D-4A99-803C-DF078430A6C8}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tiff", "..\..\terralibw\tiff\tiff.vcproj", "{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		Debug = Debug
+		Release = Release
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{628E765D-AEFB-45FA-8526-E756DC2FB72B}.Debug.ActiveCfg = Debug|Win32
+		{628E765D-AEFB-45FA-8526-E756DC2FB72B}.Debug.Build.0 = Debug|Win32
+		{628E765D-AEFB-45FA-8526-E756DC2FB72B}.Release.ActiveCfg = Release|Win32
+		{628E765D-AEFB-45FA-8526-E756DC2FB72B}.Release.Build.0 = Release|Win32
+		{5A5FE33F-1D64-45B1-B98C-60F02C1D2BA7}.Debug.ActiveCfg = Debug|Win32
+		{5A5FE33F-1D64-45B1-B98C-60F02C1D2BA7}.Debug.Build.0 = Debug|Win32
+		{5A5FE33F-1D64-45B1-B98C-60F02C1D2BA7}.Release.ActiveCfg = Release|Win32
+		{5A5FE33F-1D64-45B1-B98C-60F02C1D2BA7}.Release.Build.0 = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.ActiveCfg = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.Build.0 = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.ActiveCfg = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.Build.0 = Release|Win32
+		{99BC87CA-140D-4A99-803C-DF078430A6C8}.Debug.ActiveCfg = Debug|Win32
+		{99BC87CA-140D-4A99-803C-DF078430A6C8}.Debug.Build.0 = Debug|Win32
+		{99BC87CA-140D-4A99-803C-DF078430A6C8}.Release.ActiveCfg = Release|Win32
+		{99BC87CA-140D-4A99-803C-DF078430A6C8}.Release.Build.0 = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.ActiveCfg = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.Build.0 = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.ActiveCfg = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
diff --git a/examples/spatialQuery/spatialQuery.vcproj b/examples/spatialQuery/spatialQuery.vcproj
new file mode 100755
index 0000000..5539c6a
--- /dev/null
+++ b/examples/spatialQuery/spatialQuery.vcproj
@@ -0,0 +1,189 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="spatialQuery"
+	ProjectGUID="{1175F29C-62AB-4584-99FC-34692ABCFF08}"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Release"
+			IntermediateDirectory=".\Release"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories=".;..\..\src\terralib\kernel;..\..\src\shapelib;..\..\src\terralib\drivers\shapelib;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="TRUE"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\Release/spatialQuery.pch"
+				AssemblerListingLocation=".\Release/"
+				ObjectFile=".\Release/"
+				ProgramDataBaseFileName=".\Release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Release/terralib/terralib.lib ../../Release/libjpeg/libjpeg.lib ../../Release/tiff/tiff.lib ../../Release/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib"
+				OutputFile="../Release/spatialQuery.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				ProgramDatabaseFile=".\Release/spatialQuery.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\Release/spatialQuery.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1046"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Debug"
+			IntermediateDirectory=".\Debug"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;..;..\..\src\terralib\kernel;..\..\src\shapelib;..\..\src\terralib\drivers\shapelib;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				PrecompiledHeaderFile=".\Debug/spatialQuery.pch"
+				AssemblerListingLocation=".\Debug/"
+				ObjectFile=".\Debug/"
+				ProgramDataBaseFileName=".\Debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="4"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Debug/terralib/terralib.lib ../../Debug/libjpeg/libjpeg.lib ../../Debug/tiff/tiff.lib ../../Debug/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib"
+				OutputFile="../Debug/spatialQuery.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=".\Debug/spatialQuery.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\Debug/spatialQuery.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1046"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath=".\spatialQuery.cpp">
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\drivers\shapelib\TeDriverSHPDBF.cpp">
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.cpp">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+			<File
+				RelativePath="..\..\src\terralib\drivers\shapelib\TeDriverSHPDBF.h">
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.h">
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/spatialQueryAndBuffer/.cdtproject b/examples/spatialQueryAndBuffer/.cdtproject
old mode 100644
new mode 100755
diff --git a/examples/spatialQueryAndBuffer/.project b/examples/spatialQueryAndBuffer/.project
old mode 100644
new mode 100755
diff --git a/examples/spatialQueryAndBuffer/Makefile b/examples/spatialQueryAndBuffer/Makefile
old mode 100644
new mode 100755
index 994aff0..4c60522
--- a/examples/spatialQueryAndBuffer/Makefile
+++ b/examples/spatialQueryAndBuffer/Makefile
@@ -1,23 +1,30 @@
 all: spatialQueryAndBuffer
 
-shapelib:
-	cd ../terralibx/shapelib; make
-
-tiff:
-	cd ../terralibx/tiff; make
+debug: spatialQueryAndBuffer_dbg
 
 terralib:
-	cd ../terralibx/terralib; make
+	cd ../../terralibx/terralib; make
 
-stat:
-	cd ../terralibx/stat; make
+terralib_dbg:
+	cd ../../terralibx/terralib; make debug
 
-spatialQueryAndBuffer: shapelib tiff terralib stat
+spatialQueryAndBuffer: terralib 
 	qmake -o makeSpatialQueryAndBuffer spatialQueryAndBuffer.pro; make -f makeSpatialQueryAndBuffer
 
+spatialQueryAndBuffer_dbg: terralib_dbg 
+	qmake -o makeSpatialQueryAndBuffer.debug spatialQueryAndBuffer.pro TE_PROJECT_TYPE=DEBUG; \
+	make -f makeSpatialQueryAndBuffer.debug
+
 clean:
 	if \
 		test -f makeSpatialQueryAndBuffer; \
 	then \
 		make -f makeSpatialQueryAndBuffer distclean; rm -f makeSpatialQueryAndBuffer; \
+	fi
+	
+clean_dbg:
+	if \
+		test -f makeSpatialQueryAndBuffer.debug; \
+	then \
+		make -f makeSpatialQueryAndBuffer.debug distclean; rm -f makeSpatialQueryAndBuffer.debug; \
 	fi
\ No newline at end of file
diff --git a/examples/spatialQueryAndBuffer/spatialQueryAndBuffer.cpp b/examples/spatialQueryAndBuffer/spatialQueryAndBuffer.cpp
old mode 100644
new mode 100755
index af0cdd4..0082bd7
--- a/examples/spatialQueryAndBuffer/spatialQueryAndBuffer.cpp
+++ b/examples/spatialQueryAndBuffer/spatialQueryAndBuffer.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -23,11 +23,8 @@ of this library and its documentation.
 
 /* 
    This file shows an example of how to use the database interface to do some
-	spatial queries involving objects with points, lines and polygon geometries.
-
-  Esse exemplo requer que os arquivos BairrosPoa.shp e OcorrenciasPoA.shp tenham
-  sido importados. Usar o TerraView para importa-los.
-  Ambos os shapefiles est�o em proje��o UTM - Zona 22 , Datum SAD69
+   spatial queries involving objects with points, lines and polygon geometries,
+   and to generate a buffer operation.
 
    Author: Karine Reis   
 */
@@ -38,11 +35,11 @@ int main()
 {	
  	// Datatabase server parameters
 	string host = "localhost";
-	string dbname = "TerraTeste303";
+	string dbname = "DB320RC1";
 	string user = "root";
-	string password = "";
+	string password = "vinhas";
 
-	// Open a connection to the TerraTeste MySQL database 
+	// Open a connection to the DB320RC1 MySQL database 
 	TeDatabase* db = new TeMySQL();
 	if (!db->connect(host, user, password, dbname))
 	{
@@ -53,38 +50,37 @@ int main()
 	}
 	cout << "Connection successful to the database \"" << dbname << "\" on MySQL server \"" << host << "\" !\n";;
 		
-	
-	// Retrieve from the database the layer "BairrosPoA"
-    TeLayer* bairros = new TeLayer("BairrosPoA");		
-    if (!db->loadLayer(bairros))                
+	// Retrieve from the database the layer "Mapa_Distritos_SP"
+    TeLayer* regions = new TeLayer("Mapa_Distritos_SP");		
+    if (!db->loadLayer(regions))                
     {                                                                                               
-        cout << "Fail to load layer \"bairros\": " << db->errorMessage() << endl;
+        cout << "Fail to load layer \"Mapa_Distritos_SP\": " << db->errorMessage() << endl;
 		cout << endl << "Press Enter\n";
 		getchar();
 		return 1;
     }
 
-    // Retrieve from the database the layer "OcorrenciasPoA"
-	TeLayer* events = new TeLayer("OcorrenciasPoA");	
-    if (!db->loadLayer(events))                
+    // Retrieve from the database the layer "Mapa_Industrias_SP"
+	TeLayer* industries = new TeLayer("Mapa_Industrias_SP");	
+    if (!db->loadLayer(industries))                
     {                                                                                               
-        cout << "Fail to load layer \"events\": " << db->errorMessage() << endl;
+        cout << "Fail to load layer \"Mapa_Industrias_SP\": " << db->errorMessage() << endl;
 		cout << endl << "Press Enter\n";
 		getchar();
 		return 1;
     }
 
-	TePrecision::instance().setPrecision(TeGetPrecision(bairros->projection()));
+	TePrecision::instance().setPrecision(TeGetPrecision(regions->projection()));
 
 	// holds the identification of the resulting objects
 	vector<string> objsOut;	
 	vector<string> objsIn;  // objects to be queried		
-	objsIn.push_back("60");
+	objsIn.push_back("48");
 	
-	// Generate a buffer (polygon) around 500 meters distance from the element "60"
+	// Generate a buffer (polygon) around 1000 meters distance from the element "48"
 	TePolygonSet bufferPol;
-	if (!db->Buffer(bairros->tableName(TePOLYGONS), TePOLYGONS,
-                     objsIn, bufferPol, 500))
+	if (!db->buffer(regions->tableName(TePOLYGONS), TePOLYGONS,
+                     objsIn, bufferPol, 1000))
 	{
 		cout << "Fail to generate buffer!" << endl;
 		cout << endl << "Press Enter\n";
@@ -92,17 +88,17 @@ int main()
 		return 1;
 	}
 	
-	// Retrieve the events that are within buffer
-	if(!db->spatialRelation(events->tableName(TePOINTS), TePOINTS, &bufferPol, objsOut, TeWITHIN)) 
+	// Retrieve the industries that are within the buffer generated
+	if(!db->spatialRelation(industries->tableName(TePOINTS), TePOINTS, &bufferPol, objsOut, TeWITHIN)) 
 	{
-		cout << "Fail to retrieve events!" << endl;
+		cout << "Fail to retrieve districts!" << endl;
 		cout << endl << "Press Enter\n";
 		getchar();
 		return 1;
 	}
 
 	//Shows the result
-	cout << " Retrieved events:" << endl << endl;
+	cout << " Retrieved industries:" << endl << endl;
 	for(unsigned int i=0; i<objsOut.size(); i++)
 		cout << "      " << objsOut[i] << endl;
 
diff --git a/examples/spatialQueryAndBuffer/spatialQueryAndBuffer.dsp b/examples/spatialQueryAndBuffer/spatialQueryAndBuffer.dsp
old mode 100644
new mode 100755
index 94f4f9b..27416ac
--- a/examples/spatialQueryAndBuffer/spatialQueryAndBuffer.dsp
+++ b/examples/spatialQueryAndBuffer/spatialQueryAndBuffer.dsp
@@ -51,7 +51,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\shapelib\Release\shapelib.lib ..\..\terralibw\freetype\Release\freetype.lib ..\..\terralibw\tiff\Release\tiff.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\Postg [...]
+# ADD LINK32 ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\shapelib\Release\shapelib.lib ..\..\terralibw\tiff\Release\tiff.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib /nologo /subsystem:console /machine:I386 /out:"../Release/spatialQu [...]
 # SUBTRACT LINK32 /pdb:none
 
 !ELSEIF  "$(CFG)" == "spatialQueryAndBuffer - Win32 Debug"
@@ -77,7 +77,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\shapelib\Debug\shapelib.lib ..\..\terralibw\freetype\Debug\freetype.lib ..\..\terralibw\tiff\Debug\tiff.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\li [...]
+# ADD LINK32 ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\shapelib\Debug\shapelib.lib ..\..\terralibw\tiff\Debug\tiff.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib /nologo /subsystem:console /debug /machine:I386 /out:"../Debug/spatialQue [...]
 # SUBTRACT LINK32 /pdb:none
 
 !ENDIF 
diff --git a/examples/spatialQueryAndBuffer/spatialQueryAndBuffer.dsw b/examples/spatialQueryAndBuffer/spatialQueryAndBuffer.dsw
old mode 100644
new mode 100755
index 730b568..f3d66c5
--- a/examples/spatialQueryAndBuffer/spatialQueryAndBuffer.dsw
+++ b/examples/spatialQueryAndBuffer/spatialQueryAndBuffer.dsw
@@ -3,7 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
 
 ###############################################################################
 
-Project: "spatialQueryAndBuffer"=".\spatialQueryAndBuffer.dsp" - Package Owner=<4>
+Project: "shapelib"=..\..\terralibw\shapelib\shapelib.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -11,26 +11,11 @@ Package=<5>
 
 Package=<4>
 {{{
-    Begin Project Dependency
-    Project_Dep_Name terralib
-    End Project Dependency
 }}}
 
 ###############################################################################
 
-Project: "freetype"="..\..\terralibw\freetype\freetype.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "shapelib"="..\..\terralibw\shapelib\shapelib.dsp" - Package Owner=<4>
+Project: "spatialQueryAndBuffer"=.\spatialQueryAndBuffer.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -38,11 +23,14 @@ Package=<5>
 
 Package=<4>
 {{{
+    Begin Project Dependency
+    Project_Dep_Name terralib
+    End Project Dependency
 }}}
 
 ###############################################################################
 
-Project: "terralib"="..\..\terralibw\terralib\terralib.dsp" - Package Owner=<4>
+Project: "terralib"=..\..\terralibw\terralib\terralib.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -56,21 +44,6 @@ Package=<4>
     Begin Project Dependency
     Project_Dep_Name shapelib
     End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name tiff
-    End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "tiff"="..\..\terralibw\tiff\tiff.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
 }}}
 
 ###############################################################################
diff --git a/examples/spatialQueryAndBuffer/spatialQueryAndBuffer.pro b/examples/spatialQueryAndBuffer/spatialQueryAndBuffer.pro
old mode 100644
new mode 100755
index e0c631c..e7b4f7e
--- a/examples/spatialQueryAndBuffer/spatialQueryAndBuffer.pro
+++ b/examples/spatialQueryAndBuffer/spatialQueryAndBuffer.pro
@@ -1,50 +1,13 @@
-TEMPLATE = app
-TARGET = spatialQueryAndBuffer
-CONFIG += qt warn_on thread debug rtti exceptions
-LANGUAGE = C++
-
-OBJECTS_DIR = .obj
+include( ../base/base.pro )
 
 SOURCES	+= \
 	spatialQueryAndBuffer.cpp \
-	../src/terralib/functions/TeImportDBF.cpp \
-	../src/terralib/functions/TeImportSHP.cpp \
-	../src/terralib/drivers/MySQL/TeMySQL.cpp
+	../../src/terralib/drivers/shapelib/TeImportDBF.cpp \
+	../../src/terralib/drivers/shapelib/TeImportSHP.cpp \
+	../../src/terralib/drivers/MySQL/TeMySQL.cpp
 
 HEADERS	+= \
-	../src/terralib/functions/TeImportExport.h \
-	../src/terralib/drivers/MySQL/TeMySQL.h
+	../../src/terralib/functions/TeImportExport.h \
+	../../src/terralib/drivers/MySQL/TeMySQL.h
 	
-INCLUDEPATH += \
-	. \
-	.. \
-	../src/terralib/kernel \
-	../src/terralib/application \
-	../src/terralib/functions \
-	../src/terralib/stat \
-	../src/shapelib \
-	../src/zlib \
-	../src/terralib/application/qt \
-	../src/terralib/drivers/MySQL \
-	../src/terralib/drivers/MySQL/include \
-	../src/terralib/drivers/OracleSpatial \
-	../src/terralib/drivers/OracleSpatial/OCI/include \
-	../src/terralib/drivers/PostgreSQL \
-	../src/terralib/drivers/PostgreSQL/includepg 
-
-LIBS += \
-	-L../terralibx/shapelib \
-	-L../terralibx/stat \
-	-L../terralibx/terralib \
-	-L../terralibx/tiff \
-	-L../terralibx/PostgreSQL \
-	-L/usr/local/lib -L/usr/lib -L/usr/lib/mysql -L/usr/local/lib/mysql \
-	-L/usr/local/mysql -L/usr/local/mysql/lib -L. \
-    -lshapelib -lstat -lterralib -ltiff -lmysqlclient -lpq -lcrypt
-
-
-
-
-
-
 
diff --git a/examples/spatialQueryAndBuffer/spatialQueryAndBuffer.sln b/examples/spatialQueryAndBuffer/spatialQueryAndBuffer.sln
new file mode 100755
index 0000000..19ee526
--- /dev/null
+++ b/examples/spatialQueryAndBuffer/spatialQueryAndBuffer.sln
@@ -0,0 +1,45 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "spatialQueryAndBuffer", "spatialQueryAndBuffer.vcproj", "{628E765D-AEFB-45FA-8526-E756DC2FB72B}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjpeg", "..\..\terralibw\libjpeg\libjpeg.vcproj", "{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "terralib", "..\..\terralibw\terralib\terralib.vcproj", "{99BC87CA-140D-4A99-803C-DF078430A6C8}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tiff", "..\..\terralibw\tiff\tiff.vcproj", "{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		Debug = Debug
+		Release = Release
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{628E765D-AEFB-45FA-8526-E756DC2FB72B}.Debug.ActiveCfg = Debug|Win32
+		{628E765D-AEFB-45FA-8526-E756DC2FB72B}.Debug.Build.0 = Debug|Win32
+		{628E765D-AEFB-45FA-8526-E756DC2FB72B}.Release.ActiveCfg = Release|Win32
+		{628E765D-AEFB-45FA-8526-E756DC2FB72B}.Release.Build.0 = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.ActiveCfg = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.Build.0 = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.ActiveCfg = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.Build.0 = Release|Win32
+		{99BC87CA-140D-4A99-803C-DF078430A6C8}.Debug.ActiveCfg = Debug|Win32
+		{99BC87CA-140D-4A99-803C-DF078430A6C8}.Debug.Build.0 = Debug|Win32
+		{99BC87CA-140D-4A99-803C-DF078430A6C8}.Release.ActiveCfg = Release|Win32
+		{99BC87CA-140D-4A99-803C-DF078430A6C8}.Release.Build.0 = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.ActiveCfg = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.Build.0 = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.ActiveCfg = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
diff --git a/examples/spatialQueryAndBuffer/spatialQueryAndBuffer.vcproj b/examples/spatialQueryAndBuffer/spatialQueryAndBuffer.vcproj
new file mode 100755
index 0000000..39f2138
--- /dev/null
+++ b/examples/spatialQueryAndBuffer/spatialQueryAndBuffer.vcproj
@@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="spatialQueryAndBuffer"
+	ProjectGUID="{F7A9F697-5308-42A0-A2A6-1D30BAEAC17B}"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Release"
+			IntermediateDirectory=".\Release"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories=".;..\..\src\terralib\kernel;..\..\src\terralib\functions;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="TRUE"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\Release/spatialQueryAndBuffer.pch"
+				AssemblerListingLocation=".\Release/"
+				ObjectFile=".\Release/"
+				ProgramDataBaseFileName=".\Release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Release/terralib/terralib.lib ../../Release/libjpeg/libjpeg.lib ../../Release/tiff/tiff.lib ../../Release/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib"
+				OutputFile="../Release/spatialQueryAndBuffer.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				ProgramDatabaseFile=".\Release/spatialQueryAndBuffer.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\Release/spatialQueryAndBuffer.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1046"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Debug"
+			IntermediateDirectory=".\Debug"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;..;..\..\src\terralib\kernel;..\..\src\terralib\functions;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				PrecompiledHeaderFile=".\Debug/spatialQueryAndBuffer.pch"
+				AssemblerListingLocation=".\Debug/"
+				ObjectFile=".\Debug/"
+				ProgramDataBaseFileName=".\Debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="4"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Debug/terralib/terralib.lib ../../Debug/libjpeg/libjpeg.lib ../../Debug/tiff/tiff.lib ../../Debug/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib"
+				OutputFile="../Debug/spatialQueryAndBuffer.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=".\Debug/spatialQueryAndBuffer.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\Debug/spatialQueryAndBuffer.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1046"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath=".\spatialQueryAndBuffer.cpp">
+			</File>
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.cpp">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.h">
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/examples/themeGrouping/.cdtproject b/examples/themeGrouping/.cdtproject
old mode 100644
new mode 100755
diff --git a/examples/themeGrouping/.project b/examples/themeGrouping/.project
old mode 100644
new mode 100755
diff --git a/examples/themeGrouping/Makefile b/examples/themeGrouping/Makefile
old mode 100644
new mode 100755
index 3f33e69..6a8f21d
--- a/examples/themeGrouping/Makefile
+++ b/examples/themeGrouping/Makefile
@@ -1,23 +1,30 @@
 all: themeGrouping
 
-shapelib:
-	cd ../terralibx/shapelib; make
-
-tiff:
-	cd ../terralibx/tiff; make
+debug: themeGrouping_dbg
 
 terralib:
-	cd ../terralibx/terralib; make
-
-stat:
-	cd ../terralibx/stat; make
+	cd ../../terralibx/terralib; make
+	
+terralib_dbg:
+	cd ../../terralibx/terralib; make debug
 
-themeGrouping: shapelib tiff terralib stat
+themeGrouping:  terralib 
 	qmake -o makeThemeGrouping themeGrouping.pro; make -f makeThemeGrouping
 
+themeGrouping_dbg:  terralib_dbg 
+	qmake -o makeThemeGrouping.debug themeGrouping.pro TE_PROJECT_TYPE=DEBUG; \
+	make -f makeThemeGrouping.debug
+
 clean:
 	if \
 		test -f makeThemeGrouping; \
 	then \
 		make -f makeThemeGrouping distclean; rm -f makeThemeGrouping; \
+	fi
+	
+clean_debug:
+	if \
+		test -f makeThemeGrouping.debug; \
+	then \
+		make -f makeThemeGrouping.debug distclean; rm -f makeThemeGrouping.debug; \
 	fi
\ No newline at end of file
diff --git a/examples/themeGrouping/themeGrouping.cpp b/examples/themeGrouping/themeGrouping.cpp
old mode 100644
new mode 100755
index 2af6400..8abb486
--- a/examples/themeGrouping/themeGrouping.cpp
+++ b/examples/themeGrouping/themeGrouping.cpp
@@ -25,7 +25,7 @@ of this library and its documentation.
 	This file illustrates how to group objects of a theme. Each group of objects 
 	is associated to a legend.
 
-	Authors: Karine Reis Ferreira and Lubia Vinhas  
+	Authors: Karine Reis Ferreira 
 */
 
 #include <TeLegendEntry.h>
@@ -35,11 +35,11 @@ int main()
 {
  	// Datatabase server parameters
 	string host = "localhost";
-	string dbname = "TerraTeste";
+	string dbname = "DB320RC1";
 	string user = "root";
-	string password = "";
+	string password = "vinhas";
 
-	// Open a connection to the TerraTeste MySQL database 
+	// Open a connection to the DB320RC1 MySQL database 
 	TeDatabase* db = new TeMySQL();
 	if (!db->connect(host, user, password, dbname))
 	{
@@ -52,7 +52,7 @@ int main()
 	
 	// Load a previously created theme named T_dist.
 	// This theme was created on a layer of the metropolitan districts of Sao Paulo city
-	TeTheme* trmsp = new TeTheme("T_dist");
+	TeTheme* trmsp = new TeTheme("DistritosSaoPaulo");
 	if (!db->loadTheme(trmsp))
 	{
 	    cout << "Fail to load the theme \"T_dist\": " << db->errorMessage() << endl;
@@ -71,7 +71,7 @@ int main()
 	equalstep3.groupAttribute_ = rep;
 	equalstep3.groupMode_ = TeEqualSteps;	// equal steps in 3 groups
 	equalstep3.groupNumSlices_ = 3;
-	if (!trmsp->buildGrouping(&equalstep3))	// generate groups based on the grouping definition
+	if (!trmsp->buildGrouping(equalstep3))	// generate groups based on the grouping definition
 	{
 	    cout << "Fail to generate the groups: " << db->errorMessage() << endl;
 		db->close();
@@ -85,15 +85,15 @@ int main()
 	TeVisual visual(TePOLYGONS);		// group 1: dark green
 	TeColor color(0,200,0);
 	visual.color(color);
-	trmsp->setGroupingVisual(1,visual,TePOLYGONS);
+	trmsp->setGroupingVisual(1,&visual,TePOLYGONS);
 
 	color.init(0,150,0);
 	visual.color(color);		// group 2: medium green
-	trmsp->setGroupingVisual(2,visual,TePOLYGONS);
+	trmsp->setGroupingVisual(2,&visual,TePOLYGONS);
 
 	color.init(0,100,0);	
 	visual.color(color);		// group 3: light red
-	trmsp->setGroupingVisual(3,visual,TePOLYGONS);	
+	trmsp->setGroupingVisual(3,&visual,TePOLYGONS);	
 	
 	if (!trmsp->saveGrouping())			// save grouping definition
 	{
@@ -104,6 +104,14 @@ int main()
         return 1;
 	}
 		
+	if (!trmsp->saveLegendInCollection())			// save grouping definition
+	{
+	    cout << "Fail to save the grouping: " << db->errorMessage() << endl;
+		db->close();
+		cout << endl << "Press Enter\n";
+		getchar();
+        return 1;
+	}
 	db->close();
 	cout << "Theme was successfully grouped! " << endl;
 	cout << endl << "Press Enter\n";
diff --git a/examples/themeGrouping/themeGrouping.dsp b/examples/themeGrouping/themeGrouping.dsp
old mode 100644
new mode 100755
index d4d17fc..ec4f1e8
--- a/examples/themeGrouping/themeGrouping.dsp
+++ b/examples/themeGrouping/themeGrouping.dsp
@@ -51,7 +51,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 ..\..\terralibw\terralib\Release\terralib.lib ..\..\terralibw\shapelib\Release\shapelib.lib ..\..\terralibw\freetype\Release\freetype.lib ..\..\terralibw\tiff\Release\tiff.lib ..\..\terralibw\PostgreSQL\libpqdll.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\ [...]
+# ADD LINK32 ..\..\terralibw\terralib\Release\terralib.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib ..\..\terralibw\PostgreSQL\libpq.lib /nologo /subsystem:console /machine:I386 /out:"../Release/themeGrouping.exe"
 # SUBTRACT LINK32 /pdb:none
 
 !ELSEIF  "$(CFG)" == "themeGrouping - Win32 Debug"
@@ -77,7 +77,7 @@ BSC32=bscmake.exe
 # ADD BSC32 /nologo
 LINK32=link.exe
 # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\shapelib\Debug\shapelib.lib ..\..\terralibw\freetype\Debug\freetype.lib ..\..\terralibw\tiff\Debug\tiff.lib ..\..\terralibw\PostgreSQL\libpq.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMy [...]
+# ADD LINK32 ..\..\terralibw\terralib\Debug\terralib.lib ..\..\terralibw\PostgreSQL\libpq.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\..\terralibw\jpeg\ijl15.lib ..\..\terralibw\zlib\zlibdll.lib ..\..\terralibw\OracleSpatial\Oci\Oci.lib ..\..\terralibw\MySQL\libMySQL.lib /nologo /subsystem:console /debug /machine:I386 /out:"../Debug/themeGrouping.exe" /pdbtype:sept
 # SUBTRACT LINK32 /pdb:none
 
 !ENDIF 
diff --git a/examples/themeGrouping/themeGrouping.dsw b/examples/themeGrouping/themeGrouping.dsw
old mode 100644
new mode 100755
index a643b69..46ed566
--- a/examples/themeGrouping/themeGrouping.dsw
+++ b/examples/themeGrouping/themeGrouping.dsw
@@ -3,7 +3,7 @@ Microsoft Developer Studio Workspace File, Format Version 6.00
 
 ###############################################################################
 
-Project: "themeGrouping"=".\themeGrouping.dsp" - Package Owner=<4>
+Project: "terralib"=..\..\terralibw\terralib\terralib.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -12,13 +12,13 @@ Package=<5>
 Package=<4>
 {{{
     Begin Project Dependency
-    Project_Dep_Name terralib
+    Project_Dep_Name freetype
     End Project Dependency
 }}}
 
 ###############################################################################
 
-Project: "freetype"="..\..\terralibw\freetype\freetype.dsp" - Package Owner=<4>
+Project: "themeGrouping"=.\themeGrouping.dsp - Package Owner=<4>
 
 Package=<5>
 {{{
@@ -26,55 +26,13 @@ Package=<5>
 
 Package=<4>
 {{{
-}}}
-
-###############################################################################
-
-Project: "shapelib"="..\..\terralibw\shapelib\shapelib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "terralib"="..\..\terralibw\terralib\terralib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-    Begin Project Dependency
-    Project_Dep_Name freetype
-    End Project Dependency
-    Begin Project Dependency
-    Project_Dep_Name shapelib
-    End Project Dependency
     Begin Project Dependency
-    Project_Dep_Name tiff
+    Project_Dep_Name terralib
     End Project Dependency
 }}}
 
 ###############################################################################
 
-Project: "tiff"="..\..\terralibw\tiff\tiff.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
 Global:
 
 Package=<5>
diff --git a/examples/themeGrouping/themeGrouping.pro b/examples/themeGrouping/themeGrouping.pro
old mode 100644
new mode 100755
index 0ce8715..052d6e9
--- a/examples/themeGrouping/themeGrouping.pro
+++ b/examples/themeGrouping/themeGrouping.pro
@@ -1,47 +1,9 @@
-TEMPLATE = app
-TARGET = themeGrouping
-CONFIG += qt warn_on thread debug rtti exceptions
-LANGUAGE = C++
-
-OBJECTS_DIR = .obj
+include( ../base/base.pro )
 
 SOURCES	+= \
 	themeGrouping.cpp \
-	../src/terralib/drivers/MySQL/TeMySQL.cpp
+	../../src/terralib/drivers/MySQL/TeMySQL.cpp
 
 HEADERS	+= \
-	../src/terralib/drivers/MySQL/TeMySQL.h
+	../../src/terralib/drivers/MySQL/TeMySQL.h
 	
-INCLUDEPATH += \
-	. \
-	.. \
-	../src/terralib/kernel \
-	../src/terralib/application \
-	../src/terralib/functions \
-	../src/terralib/stat \
-	../src/shapelib \
-	../src/zlib \
-	../src/terralib/application/qt \
-	../src/terralib/drivers/MySQL \
-	../src/terralib/drivers/MySQL/include \
-	../src/terralib/drivers/OracleSpatial \
-	../src/terralib/drivers/OracleSpatial/OCI/include \
-	../src/terralib/drivers/PostgreSQL \
-	../src/terralib/drivers/PostgreSQL/includepg 
-
-LIBS += \
-	-L../terralibx/shapelib \
-	-L../terralibx/stat \
-	-L../terralibx/terralib \
-	-L../terralibx/tiff \
-	-L../terralibx/PostgreSQL \
-	-L/usr/local/lib -L/usr/lib -L/usr/lib/mysql -L/usr/local/lib/mysql \
-	-L/usr/local/mysql -L/usr/local/mysql/lib -L. \
-    -lshapelib -lstat -lterralib -ltiff -lmysqlclient -lpq -lcrypt
-
-
-
-
-
-
-
diff --git a/examples/themeGrouping/themeGrouping.sln b/examples/themeGrouping/themeGrouping.sln
new file mode 100755
index 0000000..1977169
--- /dev/null
+++ b/examples/themeGrouping/themeGrouping.sln
@@ -0,0 +1,47 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "themeGrouping", "themeGrouping.vcproj", "{AC29CA10-2B75-494F-A370-6767C7AB5FC1}"
+	ProjectSection(ProjectDependencies) = postProject
+		{40917057-E283-4760-B645-D2BA2D7E5A35} = {40917057-E283-4760-B645-D2BA2D7E5A35}
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C} = {BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "terralib", "..\..\terralibw\terralib\terralib.vcproj", "{40917057-E283-4760-B645-D2BA2D7E5A35}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libjpeg", "..\..\terralibw\libjpeg\libjpeg.vcproj", "{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "tiff", "..\..\terralibw\tiff\tiff.vcproj", "{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}"
+	ProjectSection(ProjectDependencies) = postProject
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfiguration) = preSolution
+		Debug = Debug
+		Release = Release
+	EndGlobalSection
+	GlobalSection(ProjectConfiguration) = postSolution
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.ActiveCfg = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Debug.Build.0 = Debug|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.ActiveCfg = Release|Win32
+		{AC29CA10-2B75-494F-A370-6767C7AB5FC1}.Release.Build.0 = Release|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Debug.ActiveCfg = Debug|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Debug.Build.0 = Debug|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Release.ActiveCfg = Release|Win32
+		{40917057-E283-4760-B645-D2BA2D7E5A35}.Release.Build.0 = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.ActiveCfg = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Debug.Build.0 = Debug|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.ActiveCfg = Release|Win32
+		{BEDDDA8D-9821-4B3F-AD36-2B1AACE3572C}.Release.Build.0 = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.ActiveCfg = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Debug.Build.0 = Debug|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.ActiveCfg = Release|Win32
+		{5E26C3A1-28D3-40FA-A3F5-115180C98E0E}.Release.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ExtensibilityGlobals) = postSolution
+	EndGlobalSection
+	GlobalSection(ExtensibilityAddIns) = postSolution
+	EndGlobalSection
+EndGlobal
diff --git a/examples/themeGrouping/themeGrouping.vcproj b/examples/themeGrouping/themeGrouping.vcproj
new file mode 100755
index 0000000..c6273ac
--- /dev/null
+++ b/examples/themeGrouping/themeGrouping.vcproj
@@ -0,0 +1,200 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="7.10"
+	Name="themeGrouping"
+	ProjectGUID="{56B7D410-3CB8-445A-974E-ECCCF4C48232}"
+	SccProjectName=""
+	SccLocalPath="">
+	<Platforms>
+		<Platform
+			Name="Win32"/>
+	</Platforms>
+	<Configurations>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory=".\Release"
+			IntermediateDirectory=".\Release"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="2"
+				InlineFunctionExpansion="1"
+				AdditionalIncludeDirectories=".;..\..\src\terralib\kernel;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include"
+				PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+				StringPooling="TRUE"
+				RuntimeLibrary="2"
+				EnableFunctionLevelLinking="TRUE"
+				PrecompiledHeaderFile=".\Release/themeGrouping.pch"
+				AssemblerListingLocation=".\Release/"
+				ObjectFile=".\Release/"
+				ProgramDataBaseFileName=".\Release/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Release/terralib/terralib.lib ../../Release/libjpeg/libjpeg.lib ../../Release/tiff/tiff.lib ../../Release/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib"
+				OutputFile="../Release/themeGrouping.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				ProgramDatabaseFile=".\Release/themeGrouping.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\Release/themeGrouping.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Release\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Release\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG"
+				Culture="1046"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory=".\Debug"
+			IntermediateDirectory=".\Debug"
+			ConfigurationType="1"
+			UseOfMFC="0"
+			ATLMinimizesCRunTimeLibraryUsage="FALSE"
+			CharacterSet="2">
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories=".;..\..\src\terralib\kernel;..\..\src\terralib\drivers\MySQL;..\..\src\terralib\drivers\MySQL\include"
+				PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+				BasicRuntimeChecks="3"
+				RuntimeLibrary="3"
+				PrecompiledHeaderFile=".\Debug/themeGrouping.pch"
+				AssemblerListingLocation=".\Debug/"
+				ObjectFile=".\Debug/"
+				ProgramDataBaseFileName=".\Debug/"
+				WarningLevel="3"
+				SuppressStartupBanner="TRUE"
+				DebugInformationFormat="4"
+				CompileAs="0"/>
+			<Tool
+				Name="VCCustomBuildTool"/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="../../Debug/terralib/terralib.lib ../../Debug/libjpeg/libjpeg.lib ../../Debug/tiff/tiff.lib ../../Debug/shapelib/shapelib.lib ../../terralibw/zlib/zlibdll.lib ../../terralibw/MySQL/libMySQL.lib"
+				OutputFile="../Debug/themeGrouping.exe"
+				LinkIncremental="1"
+				SuppressStartupBanner="TRUE"
+				GenerateDebugInformation="TRUE"
+				ProgramDatabaseFile=".\Debug/themeGrouping.pdb"
+				SubSystem="1"
+				TargetMachine="1"/>
+			<Tool
+				Name="VCMIDLTool"
+				TypeLibraryName=".\Debug/themeGrouping.tlb"
+				HeaderFileName=""/>
+			<Tool
+				Name="VCPostBuildEventTool"
+				Description="copy /y ..\..\Debug\*.dll $(OutDir)"
+				CommandLine="copy /y ..\..\Debug\*.dll $(OutDir)"/>
+			<Tool
+				Name="VCPreBuildEventTool"/>
+			<Tool
+				Name="VCPreLinkEventTool"/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG"
+				Culture="1046"/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"/>
+			<Tool
+				Name="VCWebDeploymentTool"/>
+			<Tool
+				Name="VCManagedWrapperGeneratorTool"/>
+			<Tool
+				Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.cpp">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="themeGrouping.cpp">
+				<FileConfiguration
+					Name="Release|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="2"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Debug|Win32">
+					<Tool
+						Name="VCCLCompilerTool"
+						Optimization="0"
+						AdditionalIncludeDirectories=""
+						PreprocessorDefinitions=""
+						BasicRuntimeChecks="3"/>
+				</FileConfiguration>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl">
+			<File
+				RelativePath="..\..\src\terralib\drivers\MySQL\TeMySQL.h">
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe">
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
diff --git a/src/STLport/BC50/README b/src/STLport/BC50/README
deleted file mode 100644
index a132ff1..0000000
--- a/src/STLport/BC50/README
+++ /dev/null
@@ -1,8 +0,0 @@
-
-This directory should be included in search path when compiling
-with Borland C++ 5.0x compiler (maybe later ones, too).
-
-It provides wrappers that force inclusion of STLport files without extensions.
-If you want to preserve old-style HP semantics, include ../old_hp BEFORE this directory
-to include HP-style STL headers (with "using" directives). If namespaces are disabled,
-this one should be enough.
diff --git a/src/STLport/BC50/algorith.h b/src/STLport/BC50/algorith.h
deleted file mode 100644
index 0644036..0000000
--- a/src/STLport/BC50/algorith.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_algorithm_H
-#  define  __STLPORT_BC_algorithm_H
-
-#  include  <..\algorithm.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/alloc.h b/src/STLport/BC50/alloc.h
deleted file mode 100644
index f25a7c6..0000000
--- a/src/STLport/BC50/alloc.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_memory_H
-#  define  __STLPORT_BC_memory_H
-
-#  include  <..\memory.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/bak/stddef.h b/src/STLport/BC50/bak/stddef.h
deleted file mode 100644
index c50fc97..0000000
--- a/src/STLport/BC50/bak/stddef.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_cstddef_H
-#  define  __STLPORT_BC_cstddef_H
-
-#  include  <..\cstddef.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/bak/stdlib.h b/src/STLport/BC50/bak/stdlib.h
deleted file mode 100644
index ad90a34..0000000
--- a/src/STLport/BC50/bak/stdlib.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#  include  <..\stdlib.h>
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/bitset.h b/src/STLport/BC50/bitset.h
deleted file mode 100644
index b516504..0000000
--- a/src/STLport/BC50/bitset.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_bitset_H
-#  define  __STLPORT_BC_bitset_H
-
-#  include  <..\bitset.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/cassert.h b/src/STLport/BC50/cassert.h
deleted file mode 100644
index 3f883e2..0000000
--- a/src/STLport/BC50/cassert.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_cassert_H
-#  define  __STLPORT_BC_cassert_H
-
-#  include  <..\cassert.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/cctype.h b/src/STLport/BC50/cctype.h
deleted file mode 100644
index 42279ad..0000000
--- a/src/STLport/BC50/cctype.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_cctype_H
-#  define  __STLPORT_BC_cctype_H
-
-#  include  <..\cctype.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/cerrno.h b/src/STLport/BC50/cerrno.h
deleted file mode 100644
index 4c0d5db..0000000
--- a/src/STLport/BC50/cerrno.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_cerrno_H
-#  define  __STLPORT_BC_cerrno_H
-
-#  include  <..\cerrno.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/cfloat.h b/src/STLport/BC50/cfloat.h
deleted file mode 100644
index c1ee3f3..0000000
--- a/src/STLport/BC50/cfloat.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_cfloat_H
-#  define  __STLPORT_BC_cfloat_H
-
-#  include  <..\cfloat.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/climits.h b/src/STLport/BC50/climits.h
deleted file mode 100644
index 28068c7..0000000
--- a/src/STLport/BC50/climits.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_climits_H
-#  define  __STLPORT_BC_climits_H
-
-#  include  <..\climits.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/clocale.h b/src/STLport/BC50/clocale.h
deleted file mode 100644
index a05c53d..0000000
--- a/src/STLport/BC50/clocale.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_clocale_H
-#  define  __STLPORT_BC_clocale_H
-
-#  include  <..\clocale.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/cmath.h b/src/STLport/BC50/cmath.h
deleted file mode 100644
index 3bb3072..0000000
--- a/src/STLport/BC50/cmath.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_cmath_H
-#  define  __STLPORT_BC_cmath_H
-
-#  include  <..\cmath.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/complex.h b/src/STLport/BC50/complex.h
deleted file mode 100644
index 5f5bd67..0000000
--- a/src/STLport/BC50/complex.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_complex_H
-#  define  __STLPORT_BC_complex_H
-
-#  include  <..\complex.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/csetjmp.h b/src/STLport/BC50/csetjmp.h
deleted file mode 100644
index 3249254..0000000
--- a/src/STLport/BC50/csetjmp.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_csetjmp_H
-#  define  __STLPORT_BC_csetjmp_H
-
-#  include  <..\csetjmp.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/csignal.h b/src/STLport/BC50/csignal.h
deleted file mode 100644
index ae8d5fe..0000000
--- a/src/STLport/BC50/csignal.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_csignal_H
-#  define  __STLPORT_BC_csignal_H
-
-#  include  <..\csignal.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/cstdarg.h b/src/STLport/BC50/cstdarg.h
deleted file mode 100644
index e5f566e..0000000
--- a/src/STLport/BC50/cstdarg.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_cstdarg_H
-#  define  __STLPORT_BC_cstdarg_H
-
-#  include  <..\cstdarg.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/cstddef.h b/src/STLport/BC50/cstddef.h
deleted file mode 100644
index c50fc97..0000000
--- a/src/STLport/BC50/cstddef.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_cstddef_H
-#  define  __STLPORT_BC_cstddef_H
-
-#  include  <..\cstddef.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/cstdio.h b/src/STLport/BC50/cstdio.h
deleted file mode 100644
index 6aefb42..0000000
--- a/src/STLport/BC50/cstdio.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_cstdio_H
-#  define  __STLPORT_BC_cstdio_H
-
-#  include  <..\cstdio.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/cstdlib.h b/src/STLport/BC50/cstdlib.h
deleted file mode 100644
index 461eebb..0000000
--- a/src/STLport/BC50/cstdlib.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#  include  <..\cstdlib.>
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/cstring.h b/src/STLport/BC50/cstring.h
deleted file mode 100644
index f41dbd7..0000000
--- a/src/STLport/BC50/cstring.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-#ifndef __STLPORT_BC_cstring_H
-#  define  __STLPORT_BC_cstring_H
-
-#  include  <..\cstring.>
-
-#endif
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/ctime.h b/src/STLport/BC50/ctime.h
deleted file mode 100644
index 01ad304..0000000
--- a/src/STLport/BC50/ctime.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_ctime_H
-#  define  __STLPORT_BC_ctime_H
-
-#  include  <..\ctime.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/cwchar.h b/src/STLport/BC50/cwchar.h
deleted file mode 100644
index 6d6a039..0000000
--- a/src/STLport/BC50/cwchar.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_cwchar_H
-#  define  __STLPORT_BC_cwchar_H
-
-#  include  <..\cwchar.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/cwctype.h b/src/STLport/BC50/cwctype.h
deleted file mode 100644
index 0fda315..0000000
--- a/src/STLport/BC50/cwctype.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_cwctype_H
-#  define  __STLPORT_BC_cwctype_H
-
-#  include  <..\cwctype.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/deque.h b/src/STLport/BC50/deque.h
deleted file mode 100644
index cd7166c..0000000
--- a/src/STLport/BC50/deque.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_deque_H
-#  define  __STLPORT_BC_deque_H
-
-#  include  <..\deque.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/exceptio.h b/src/STLport/BC50/exceptio.h
deleted file mode 100644
index 78a6ae4..0000000
--- a/src/STLport/BC50/exceptio.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_exceptio_H
-#  define  __STLPORT_BC_exceptio_H
-
-#  include  <..\exception.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/fstream.h b/src/STLport/BC50/fstream.h
deleted file mode 100644
index 511303f..0000000
--- a/src/STLport/BC50/fstream.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_fstream_H
-#  define  __STLPORT_BC_fstream_H
-
-#  include  <..\fstream.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/function.h b/src/STLport/BC50/function.h
deleted file mode 100644
index 615ac45..0000000
--- a/src/STLport/BC50/function.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_functional_H
-#  define  __STLPORT_BC_functional_H
-
-#  include  <..\functional.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/hash_map.h b/src/STLport/BC50/hash_map.h
deleted file mode 100644
index 9b307cf..0000000
--- a/src/STLport/BC50/hash_map.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_hash_map_H
-#  define  __STLPORT_BC_hash_map_H
-
-#  include  <..\hash_map.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/hash_set.h b/src/STLport/BC50/hash_set.h
deleted file mode 100644
index 7b49c28..0000000
--- a/src/STLport/BC50/hash_set.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_hash_set_H
-#  define  __STLPORT_BC_hash_set_H
-
-#  include  <..\hash_set.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/iomanip.h b/src/STLport/BC50/iomanip.h
deleted file mode 100644
index 4120153..0000000
--- a/src/STLport/BC50/iomanip.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_iomanip_H
-#  define  __STLPORT_BC_iomanip_H
-
-#  include  <..\iomanip.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/ios.h b/src/STLport/BC50/ios.h
deleted file mode 100644
index 0f1d41c..0000000
--- a/src/STLport/BC50/ios.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_ios_H
-#  define  __STLPORT_BC_ios_H
-
-#  include  <..\ios.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/iosfwd.h b/src/STLport/BC50/iosfwd.h
deleted file mode 100644
index 5570c04..0000000
--- a/src/STLport/BC50/iosfwd.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_iosfwd_H
-#  define  __STLPORT_BC_iosfwd_H
-
-#  include  <..\iosfwd.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/iostream.h b/src/STLport/BC50/iostream.h
deleted file mode 100644
index 326258e..0000000
--- a/src/STLport/BC50/iostream.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_iostream_H
-#  define  __STLPORT_BC_iostream_H
-
-#  include  <..\iostream.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/istream.h b/src/STLport/BC50/istream.h
deleted file mode 100644
index d0ff092..0000000
--- a/src/STLport/BC50/istream.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_istream_H
-#  define  __STLPORT_BC_istream_H
-
-#  include  <..\istream.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/iterator.h b/src/STLport/BC50/iterator.h
deleted file mode 100644
index be12a82..0000000
--- a/src/STLport/BC50/iterator.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_iterator_H
-#  define  __STLPORT_BC_iterator_H
-
-#  include  <..\iterator.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/limits.h b/src/STLport/BC50/limits.h
deleted file mode 100644
index 6d92905..0000000
--- a/src/STLport/BC50/limits.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-// include BC native <limits.h>
-
-#include  <..\climits.>
-
-#ifndef __IN_STLPORT_CLIMITS
-# include  <..\limits.>
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/list.h b/src/STLport/BC50/list.h
deleted file mode 100644
index 91b3bdb..0000000
--- a/src/STLport/BC50/list.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_list_H
-#  define  __STLPORT_BC_list_H
-
-#  include  <..\list.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/locale.h b/src/STLport/BC50/locale.h
deleted file mode 100644
index ae44bad..0000000
--- a/src/STLport/BC50/locale.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#  include  <..\clocale.>
-
-# ifndef __IN_STLPORT_CLOCALE
-#  include  <..\locale.>
-# endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/make_bc50.sh b/src/STLport/BC50/make_bc50.sh
deleted file mode 100644
index 959c5b7..0000000
--- a/src/STLport/BC50/make_bc50.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-for file in `cat ../export_names`
-do
-rm -fr $file.h
-cat stl_tmpl.h | sed -e "s/REPLACEME/$file/g" > $file.h
-done
-
-mv algorithm.h algorith.h
-mv functional.h function.h
-mv stdexcept.h stdexcep.h
-mv streambuf.h streambu.h
-mv strstream.h strstrea.h
diff --git a/src/STLport/BC50/map.h b/src/STLport/BC50/map.h
deleted file mode 100644
index 28650f6..0000000
--- a/src/STLport/BC50/map.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_map_H
-#  define  __STLPORT_BC_map_H
-
-#  include  <..\map.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/memory.h b/src/STLport/BC50/memory.h
deleted file mode 100644
index 9b97663..0000000
--- a/src/STLport/BC50/memory.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_memory_H
-#  define  __STLPORT_BC_memory_H
-
-#  include  <..\include\memory.h>
-
-#  include  <..\memory.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/numeric.h b/src/STLport/BC50/numeric.h
deleted file mode 100644
index e5e7ed1..0000000
--- a/src/STLport/BC50/numeric.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_numeric_H
-#  define  __STLPORT_BC_numeric_H
-
-#  include  <..\numeric.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/ostream.h b/src/STLport/BC50/ostream.h
deleted file mode 100644
index 8ee2157..0000000
--- a/src/STLport/BC50/ostream.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_ostream_H
-#  define  __STLPORT_BC_ostream_H
-
-#  include  <..\ostream.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/pthread_alloc.h b/src/STLport/BC50/pthread_alloc.h
deleted file mode 100644
index 07fb6ab..0000000
--- a/src/STLport/BC50/pthread_alloc.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_pthread_alloc_H
-#  define  __STLPORT_BC_pthread_alloc_H
-
-#  include  <..\pthread_alloc.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/queue.h b/src/STLport/BC50/queue.h
deleted file mode 100644
index dde1a75..0000000
--- a/src/STLport/BC50/queue.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_queue_H
-#  define  __STLPORT_BC_queue_H
-
-#  include  <..\queue.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/rope.h b/src/STLport/BC50/rope.h
deleted file mode 100644
index db2ab6d..0000000
--- a/src/STLport/BC50/rope.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_rope_H
-#  define  __STLPORT_BC_rope_H
-
-#  include  <..\rope.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/set.h b/src/STLport/BC50/set.h
deleted file mode 100644
index 2172ae7..0000000
--- a/src/STLport/BC50/set.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_set_H
-#  define  __STLPORT_BC_set_H
-
-#  include  <..\set.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/slist.h b/src/STLport/BC50/slist.h
deleted file mode 100644
index fe3babf..0000000
--- a/src/STLport/BC50/slist.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_slist_H
-#  define  __STLPORT_BC_slist_H
-
-#  include  <..\slist.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/sstream.h b/src/STLport/BC50/sstream.h
deleted file mode 100644
index b4a4561..0000000
--- a/src/STLport/BC50/sstream.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_sstream_H
-#  define  __STLPORT_BC_sstream_H
-
-#  include  <..\sstream.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/stack.h b/src/STLport/BC50/stack.h
deleted file mode 100644
index fdfba64..0000000
--- a/src/STLport/BC50/stack.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_stack_H
-#  define  __STLPORT_BC_stack_H
-
-#  include  <..\stack.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/stdexcep.h b/src/STLport/BC50/stdexcep.h
deleted file mode 100644
index 98173e2..0000000
--- a/src/STLport/BC50/stdexcep.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_stdexcept_H
-#  define  __STLPORT_BC_stdexcept_H
-
-#  include  <..\stdexcept.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/stl_tmpl.h b/src/STLport/BC50/stl_tmpl.h
deleted file mode 100644
index 8e60093..0000000
--- a/src/STLport/BC50/stl_tmpl.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_REPLACEME_H
-#  define  __STLPORT_BC_REPLACEME_H
-
-#  include  <..\REPLACEME.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/streambu.h b/src/STLport/BC50/streambu.h
deleted file mode 100644
index 5c314ea..0000000
--- a/src/STLport/BC50/streambu.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_streambuf_H
-#  define  __STLPORT_BC_streambuf_H
-
-#  include  <..\streambuf.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/streambuf.h b/src/STLport/BC50/streambuf.h
deleted file mode 100644
index 1daf096..0000000
--- a/src/STLport/BC50/streambuf.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_streambuf_H
-#  define  __STLPORT_BC_streambuf_H
-
-#  include  <..\streambuf.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/string.h b/src/STLport/BC50/string.h
deleted file mode 100644
index eaaf2a7..0000000
--- a/src/STLport/BC50/string.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-
-#  include <..\string.h>
-
-# ifndef __IN_STLPORT_CSTRING
-// okay, include STLPort header
-#  include  <..\string.>
-# endif /* __IN_STLPORT_CSTRING */
-
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/strstrea.h b/src/STLport/BC50/strstrea.h
deleted file mode 100644
index 64b66fb..0000000
--- a/src/STLport/BC50/strstrea.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_strstream_H
-#  define  __STLPORT_BC_strstream_H
-
-#  include  <..\strstream.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/typeinfo.h b/src/STLport/BC50/typeinfo.h
deleted file mode 100644
index b29354f..0000000
--- a/src/STLport/BC50/typeinfo.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_typeinfo_H
-#  define  __STLPORT_BC_typeinfo_H
-
-#  include  <..\typeinfo.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/using/cstring.h b/src/STLport/BC50/using/cstring.h
deleted file mode 100644
index 5142dda..0000000
--- a/src/STLport/BC50/using/cstring.h
+++ /dev/null
@@ -1,54 +0,0 @@
-using _STLP_VENDOR_CSTD::size_t;
-
-#  ifndef _STLP_NO_CSTD_FUNCTION_IMPORTS
-#   if defined(__MSL__) && __MC68K__ && !_No_BlockMove && __dest_os == __mac_os
-#    undef memcpy
-#    undef memmove
-inline void* memcpy(void* dst, const void* src, size_t len)
-{
-	return _STLP_VENDOR_CSTD::__memcpy(dst, src, len);
-}
-inline void* memmove(void* dst, const void* src, size_t len)
-{
-	return _STLP_VENDOR_CSTD::__memmove(dst, src, len);
-}
-#   else
-
- using _STLP_VENDOR_CSTD::memmove;
- using _STLP_VENDOR_CSTD::memcpy;
-
-#   endif
-
-# if ! defined (__BORLANDC__)
-using _STLP_VENDOR_CSTD::memchr;
-using _STLP_VENDOR_CSTD::strchr;
-using _STLP_VENDOR_CSTD::strpbrk;
-using _STLP_VENDOR_CSTD::strrchr;
-using _STLP_VENDOR_CSTD::strstr;
-# endif
-
-using _STLP_VENDOR_CSTD::memcmp;
-using _STLP_VENDOR_CSTD::memset;
-
-using _STLP_VENDOR_CSTD::strcat;
-
-# if !defined (strcmp)
-using _STLP_VENDOR_CSTD::strcmp;
-# endif
-
-using _STLP_VENDOR_CSTD::strcoll;
-# if !defined (strcpy)
-using _STLP_VENDOR_CSTD::strcpy;
-# endif
-using _STLP_VENDOR_CSTD::strcspn;
-using _STLP_VENDOR_CSTD::strerror;
-using _STLP_VENDOR_CSTD::strlen;
-using _STLP_VENDOR_CSTD::strncat;
-using _STLP_VENDOR_CSTD::strncmp;
-
-using _STLP_VENDOR_CSTD::strncpy;
-using _STLP_VENDOR_CSTD::strspn;
-
-using _STLP_VENDOR_CSTD::strtok;
-using _STLP_VENDOR_CSTD::strxfrm;
-#  endif /* _STLP_NO_CSTD_FUNCTION_IMPORTS */
diff --git a/src/STLport/BC50/using/fstream.h b/src/STLport/BC50/using/fstream.h
deleted file mode 100644
index e79e048..0000000
--- a/src/STLport/BC50/using/fstream.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifdef _STLP_BROKEN_USING_DIRECTIVE
-using namespace _STLP_STD;
-#else
-using _STLP_NEW_IO_NAMESPACE::basic_filebuf;
-using _STLP_NEW_IO_NAMESPACE::filebuf;
-using _STLP_NEW_IO_NAMESPACE::basic_ifstream;
-using _STLP_NEW_IO_NAMESPACE::basic_ofstream;
-using _STLP_NEW_IO_NAMESPACE::ifstream;
-using _STLP_NEW_IO_NAMESPACE::ofstream;
-using _STLP_NEW_IO_NAMESPACE::basic_fstream;
-using _STLP_NEW_IO_NAMESPACE::fstream;
-
-# ifndef _STLP_NO_WIDE_STREAMS
-using _STLP_NEW_IO_NAMESPACE::wofstream;
-using _STLP_NEW_IO_NAMESPACE::wfilebuf;
-using _STLP_NEW_IO_NAMESPACE::wifstream;
-using _STLP_NEW_IO_NAMESPACE::wfstream;
-# endif
-#endif
diff --git a/src/STLport/BC50/using/iomanip.h b/src/STLport/BC50/using/iomanip.h
deleted file mode 100644
index 8a7c792..0000000
--- a/src/STLport/BC50/using/iomanip.h
+++ /dev/null
@@ -1,6 +0,0 @@
-using _STLP_NEW_IO_NAMESPACE::setiosflags;
-using _STLP_NEW_IO_NAMESPACE::resetiosflags;
-using _STLP_NEW_IO_NAMESPACE::setbase;
-using _STLP_NEW_IO_NAMESPACE::setfill;
-using _STLP_NEW_IO_NAMESPACE::setprecision;
-using _STLP_NEW_IO_NAMESPACE::setw;
diff --git a/src/STLport/BC50/using/ios.h b/src/STLport/BC50/using/ios.h
deleted file mode 100644
index 22f23ae..0000000
--- a/src/STLport/BC50/using/ios.h
+++ /dev/null
@@ -1,41 +0,0 @@
-#  ifdef _STLP_BROKEN_USING_DIRECTIVE
-using namespace _STLP_NEW_IO_NAMESPACE;
-#  else
-
-using _STLP_NEW_IO_NAMESPACE::ios;
-using _STLP_NEW_IO_NAMESPACE::streamoff;
-using _STLP_NEW_IO_NAMESPACE::streamsize;
-
-using _STLP_NEW_IO_NAMESPACE::ios_base;
-using _STLP_NEW_IO_NAMESPACE::basic_ios;
-
-// _lib.std.ios.manip_, manipulators:	
-using _STLP_NEW_IO_NAMESPACE::boolalpha;
-using _STLP_NEW_IO_NAMESPACE::noboolalpha;
-using _STLP_NEW_IO_NAMESPACE::showbase;
-using _STLP_NEW_IO_NAMESPACE::noshowbase;
-using _STLP_NEW_IO_NAMESPACE::showpoint;
-using _STLP_NEW_IO_NAMESPACE::noshowpoint;
-using _STLP_NEW_IO_NAMESPACE::showpos;
-using _STLP_NEW_IO_NAMESPACE::noshowpos;
-using _STLP_NEW_IO_NAMESPACE::skipws;
-using _STLP_NEW_IO_NAMESPACE::noskipws;
-using _STLP_NEW_IO_NAMESPACE::uppercase;
-using _STLP_NEW_IO_NAMESPACE::nouppercase;
-
-// _lib.adjustfield.manip_ adjustfield:
-using _STLP_NEW_IO_NAMESPACE::internal;
-using _STLP_NEW_IO_NAMESPACE::left;
-using _STLP_NEW_IO_NAMESPACE::right;
-
-// _lib.basefield.manip_ basefield:
-using _STLP_NEW_IO_NAMESPACE::dec;
-using _STLP_NEW_IO_NAMESPACE::hex;
-using _STLP_NEW_IO_NAMESPACE::oct;
-
-// _lib.floatfield.manip_ floatfield:
-using _STLP_NEW_IO_NAMESPACE::fixed;
-using _STLP_NEW_IO_NAMESPACE::scientific;
-
-#  endif  /* _STLP_BROKEN_USING_DIRECTIVE */
-
diff --git a/src/STLport/BC50/using/iosfwd.h b/src/STLport/BC50/using/iosfwd.h
deleted file mode 100644
index b564e81..0000000
--- a/src/STLport/BC50/using/iosfwd.h
+++ /dev/null
@@ -1,54 +0,0 @@
-# if defined (_STLP_USE_NEW_IOSTREAMS)
-using _STLP_NEW_IO_NAMESPACE::char_traits;
-using _STLP_NEW_IO_NAMESPACE::basic_ios;
-using _STLP_NEW_IO_NAMESPACE::basic_streambuf;
-using _STLP_NEW_IO_NAMESPACE::basic_istream;
-using _STLP_NEW_IO_NAMESPACE::basic_ostream;
-using _STLP_NEW_IO_NAMESPACE::basic_iostream;
-using _STLP_NEW_IO_NAMESPACE::basic_stringbuf;
-using _STLP_NEW_IO_NAMESPACE::basic_istringstream;
-using _STLP_NEW_IO_NAMESPACE::basic_ostringstream;
-using _STLP_NEW_IO_NAMESPACE::basic_stringstream;
-using _STLP_NEW_IO_NAMESPACE::basic_filebuf;
-using _STLP_NEW_IO_NAMESPACE::basic_ifstream;
-using _STLP_NEW_IO_NAMESPACE::basic_ofstream;
-using _STLP_NEW_IO_NAMESPACE::basic_fstream;
-using _STLP_NEW_IO_NAMESPACE::fpos;
-using _STLP_NEW_IO_NAMESPACE::istreambuf_iterator;
-using _STLP_NEW_IO_NAMESPACE::ostreambuf_iterator;
-using _STLP_NEW_IO_NAMESPACE::stringbuf;
-using _STLP_NEW_IO_NAMESPACE::istringstream;
-using _STLP_NEW_IO_NAMESPACE::ostringstream;
-using _STLP_NEW_IO_NAMESPACE::stringstream;
-# endif
-
-using _STLP_NEW_IO_NAMESPACE::ios;
-using _STLP_NEW_IO_NAMESPACE::streambuf;
-using _STLP_NEW_IO_NAMESPACE::istream;
-using _STLP_NEW_IO_NAMESPACE::ostream;
-using _STLP_NEW_IO_NAMESPACE::iostream;
-
-using _STLP_NEW_IO_NAMESPACE::filebuf;
-using _STLP_NEW_IO_NAMESPACE::ifstream;
-using _STLP_NEW_IO_NAMESPACE::ofstream;
-using _STLP_NEW_IO_NAMESPACE::fstream;
-
-using _STLP_NEW_IO_NAMESPACE::streampos;
-using _STLP_NEW_IO_NAMESPACE::streamoff;
-
-# if !defined (_STLP_NO_WIDE_STREAMS)
-using _STLP_NEW_IO_NAMESPACE::wios;
-using _STLP_NEW_IO_NAMESPACE::wstreambuf;
-using _STLP_NEW_IO_NAMESPACE::wistream;
-using _STLP_NEW_IO_NAMESPACE::wostream;
-using _STLP_NEW_IO_NAMESPACE::wiostream;
-using _STLP_NEW_IO_NAMESPACE::wstringbuf;
-using _STLP_NEW_IO_NAMESPACE::wistringstream;
-using _STLP_NEW_IO_NAMESPACE::wostringstream;
-using _STLP_NEW_IO_NAMESPACE::wstringstream;
-using _STLP_NEW_IO_NAMESPACE::wfilebuf;
-using _STLP_NEW_IO_NAMESPACE::wifstream;
-using _STLP_NEW_IO_NAMESPACE::wofstream;
-using _STLP_NEW_IO_NAMESPACE::wfstream;
-using _STLP_NEW_IO_NAMESPACE::wstreampos;
-# endif
diff --git a/src/STLport/BC50/using/iostream.h b/src/STLport/BC50/using/iostream.h
deleted file mode 100644
index 3704c4d..0000000
--- a/src/STLport/BC50/using/iostream.h
+++ /dev/null
@@ -1,11 +0,0 @@
-using _STLP_VENDOR_STD::cin;
-using _STLP_VENDOR_STD::cout;
-using _STLP_VENDOR_STD::cerr;
-using _STLP_VENDOR_STD::clog;
-
-# if ! defined (_STLP_NO_WIDE_STREAMS)
-using _STLP_VENDOR_STD::wcin;
-using _STLP_VENDOR_STD::wcout;
-using _STLP_VENDOR_STD::wcerr;
-using _STLP_VENDOR_STD::wclog;
-# endif
diff --git a/src/STLport/BC50/using/istream.h b/src/STLport/BC50/using/istream.h
deleted file mode 100644
index 4d5b912..0000000
--- a/src/STLport/BC50/using/istream.h
+++ /dev/null
@@ -1,15 +0,0 @@
-
-using _STLP_NEW_IO_NAMESPACE::basic_istream;
-using _STLP_NEW_IO_NAMESPACE::basic_iostream;
-
-using _STLP_NEW_IO_NAMESPACE::istream;
-using _STLP_NEW_IO_NAMESPACE::iostream;
-
-# if !defined (_STLP_NO_NATIVE_WIDE_STREAMS)
-using _STLP_NEW_IO_NAMESPACE::wistream;
-using _STLP_NEW_IO_NAMESPACE::wiostream;
-# endif
-
-#if !(defined (_STLP_MSVC) && (_STLP_MSVC < 1200))
-using _STLP_NEW_IO_NAMESPACE::ws;
-#endif
diff --git a/src/STLport/BC50/using/locale.h b/src/STLport/BC50/using/locale.h
deleted file mode 100644
index f061cd6..0000000
--- a/src/STLport/BC50/using/locale.h
+++ /dev/null
@@ -1,62 +0,0 @@
-// from <cwchar>
-#if !defined (_STLP_NO_MBSTATE_T)
-using _STLP_VENDOR_MB_NAMESPACE::mbstate_t;
-#endif
-
-// _lib.locale_, locale:
-using _STLP_NEW_IO_NAMESPACE::locale;
-using _STLP_NEW_IO_NAMESPACE::use_facet;
-using _STLP_NEW_IO_NAMESPACE::has_facet;
-
-// _lib.locale.convenience_, convenience interfaces:
-using _STLP_NEW_IO_NAMESPACE::isspace;
-using _STLP_NEW_IO_NAMESPACE::isprint;
-using _STLP_NEW_IO_NAMESPACE::iscntrl;
-using _STLP_NEW_IO_NAMESPACE::isupper;
-using _STLP_NEW_IO_NAMESPACE::islower;
-using _STLP_NEW_IO_NAMESPACE::isalpha;
-using _STLP_NEW_IO_NAMESPACE::isdigit;
-using _STLP_NEW_IO_NAMESPACE::ispunct;
-using _STLP_NEW_IO_NAMESPACE::isxdigit;
-using _STLP_NEW_IO_NAMESPACE::isalnum;
-using _STLP_NEW_IO_NAMESPACE::isgraph;
-using _STLP_NEW_IO_NAMESPACE::toupper;
-using _STLP_NEW_IO_NAMESPACE::tolower;
-
-// _lib.category.ctype_ and _lib.facet.ctype.special_, ctype:
-using _STLP_NEW_IO_NAMESPACE::ctype_base;
-using _STLP_NEW_IO_NAMESPACE::ctype;
-using _STLP_NEW_IO_NAMESPACE::ctype_byname;
-using _STLP_NEW_IO_NAMESPACE::codecvt_base;
-using _STLP_NEW_IO_NAMESPACE::codecvt;
-using _STLP_NEW_IO_NAMESPACE::codecvt_byname;
-
-// _lib.category.numeric_ and _lib.facet.numpunct_, numeric:
-using _STLP_NEW_IO_NAMESPACE::num_get;
-using _STLP_NEW_IO_NAMESPACE::num_put;
-using _STLP_NEW_IO_NAMESPACE::numpunct;
-using _STLP_NEW_IO_NAMESPACE::numpunct_byname;
-
-// _lib.category.collate_, collation:
-using _STLP_NEW_IO_NAMESPACE::collate;
-using _STLP_NEW_IO_NAMESPACE::collate_byname;
-
-// _lib.category.time_, date and time:
-using _STLP_NEW_IO_NAMESPACE::time_base;
-using _STLP_NEW_IO_NAMESPACE::time_get;
-using _STLP_NEW_IO_NAMESPACE::time_get_byname;
-using _STLP_NEW_IO_NAMESPACE::time_put;
-using _STLP_NEW_IO_NAMESPACE::time_put_byname;
-
-// _lib.category.monetary_, money:
-using _STLP_NEW_IO_NAMESPACE::money_base;
-using _STLP_NEW_IO_NAMESPACE::money_get;
-using _STLP_NEW_IO_NAMESPACE::money_put;
-using _STLP_NEW_IO_NAMESPACE::moneypunct;
-using _STLP_NEW_IO_NAMESPACE::moneypunct_byname;
-
-#if !defined (_STLP_OWN_IOSTREAMS) && !defined (_STLP_NO_NATIVE_MESSAGE_FACET)
-using _STLP_NEW_IO_NAMESPACE::messages_base;
-using _STLP_NEW_IO_NAMESPACE::messages;
-using _STLP_NEW_IO_NAMESPACE::messages_byname;
-#endif // _MSL_NO_MESSAGE_FACET
diff --git a/src/STLport/BC50/using/ostream.h b/src/STLport/BC50/using/ostream.h
deleted file mode 100644
index 162b32d..0000000
--- a/src/STLport/BC50/using/ostream.h
+++ /dev/null
@@ -1,10 +0,0 @@
-using _STLP_NEW_IO_NAMESPACE::basic_ostream;
-using _STLP_NEW_IO_NAMESPACE::ostream;
-
-# ifndef _STLP_NO_WIDE_STREAMS
-using _STLP_NEW_IO_NAMESPACE::wostream;
-# endif
-
-using _STLP_NEW_IO_NAMESPACE::endl;
-using _STLP_NEW_IO_NAMESPACE::ends;
-using _STLP_NEW_IO_NAMESPACE::flush;
diff --git a/src/STLport/BC50/using/sstream.h b/src/STLport/BC50/using/sstream.h
deleted file mode 100644
index 925c37e..0000000
--- a/src/STLport/BC50/using/sstream.h
+++ /dev/null
@@ -1,16 +0,0 @@
-using _STLP_NEW_IO_NAMESPACE::basic_stringbuf;
-using _STLP_NEW_IO_NAMESPACE::stringbuf;
-
-using _STLP_NEW_IO_NAMESPACE::basic_istringstream;
-using _STLP_NEW_IO_NAMESPACE::basic_ostringstream;
-using _STLP_NEW_IO_NAMESPACE::basic_stringstream;
-using _STLP_NEW_IO_NAMESPACE::istringstream;
-using _STLP_NEW_IO_NAMESPACE::ostringstream;
-using _STLP_NEW_IO_NAMESPACE::stringstream;
-
-#ifndef _STLP_NO_WIDE_STREAMS
-using _STLP_NEW_IO_NAMESPACE::wstringbuf;
-using _STLP_NEW_IO_NAMESPACE::wistringstream;
-using _STLP_NEW_IO_NAMESPACE::wostringstream;
-using _STLP_NEW_IO_NAMESPACE::wstringstream;
-#endif
diff --git a/src/STLport/BC50/using/streambuf.h b/src/STLport/BC50/using/streambuf.h
deleted file mode 100644
index 308241d..0000000
--- a/src/STLport/BC50/using/streambuf.h
+++ /dev/null
@@ -1,5 +0,0 @@
-using _STLP_NEW_IO_NAMESPACE::basic_streambuf;
-using _STLP_NEW_IO_NAMESPACE::streambuf;
-#ifndef _STLP_NO_WIDE_STREAMS
-using _STLP_NEW_IO_NAMESPACE::wstreambuf;
-# endif
diff --git a/src/STLport/BC50/using/strstream.h b/src/STLport/BC50/using/strstream.h
deleted file mode 100644
index eb26ac1..0000000
--- a/src/STLport/BC50/using/strstream.h
+++ /dev/null
@@ -1,4 +0,0 @@
-using _STLP_NEW_IO_NAMESPACE::strstreambuf;
-using _STLP_NEW_IO_NAMESPACE::istrstream;
-using _STLP_NEW_IO_NAMESPACE::ostrstream;
-using _STLP_NEW_IO_NAMESPACE::strstream;
diff --git a/src/STLport/BC50/utility.h b/src/STLport/BC50/utility.h
deleted file mode 100644
index b6ed123..0000000
--- a/src/STLport/BC50/utility.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_utility_H
-#  define  __STLPORT_BC_utility_H
-
-#  include  <..\utility.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/valarray.h b/src/STLport/BC50/valarray.h
deleted file mode 100644
index 0ebc7f8..0000000
--- a/src/STLport/BC50/valarray.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_valarray_H
-#  define  __STLPORT_BC_valarray_H
-
-#  include  <..\valarray.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/BC50/vector.h b/src/STLport/BC50/vector.h
deleted file mode 100644
index 0492e6b..0000000
--- a/src/STLport/BC50/vector.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 1999 Boris Fomitchev
- * AUTOMATICALLY GENERATED - DO NOT EDIT !
- */
-
-/*
- *
- *  This wrapper is needed for Borland C++ 5.0 to get STLport 
- *  header properly included
- */
-
-#ifndef __STLPORT_BC_vector_H
-#  define  __STLPORT_BC_vector_H
-
-#  include  <..\vector.>
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/algorithm b/src/STLport/algorithm
deleted file mode 100644
index 131348d..0000000
--- a/src/STLport/algorithm
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_ALGORITHM
-#define _STLP_ALGORITHM
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x1
-#  include <stl/_prolog.h>
-# endif
-
-#ifdef _STLP_PRAGMA_ONCE
-# pragma once
-#endif
-
-# if ! defined (_STLP_USE_NAMESPACES)
-// remove() conflicts, <cstdio> should always go first
-#  include <cstdio>
-# endif
-
-# ifndef _STLP_INTERNAL_ALGO_H
-#  include <stl/_algo.h>
-# endif
-
-#if defined (_STLP_IMPORT_VENDOR_STD)
-# include _STLP_NATIVE_HEADER(algorithm)
-#endif /* _STLP_IMPORT_VENDOR_STD */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x1 )
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_ALGORITHM */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/bitset b/src/STLport/bitset
deleted file mode 100644
index 5ac41a8..0000000
--- a/src/STLport/bitset
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 1998
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_BITSET
-#define _STLP_BITSET
-
-// This implementation of bitset<> has a second template parameter,
-// _WordT, which defaults to unsigned long.  *YOU SHOULD NOT USE
-// THIS FEATURE*.  It is experimental, and it may be removed in
-// future releases.
-
-// A bitset of size N, using words of type _WordT, will have 
-// N % (sizeof(_WordT) * CHAR_BIT) unused bits.  (They are the high-
-// order bits in the highest word.)  It is a class invariant
-// of class bitset<> that those unused bits are always zero.
-
-// Most of the actual code isn't contained in bitset<> itself, but in the 
-// base class _Base_bitset.  The base class works with whole words, not with
-// individual bits.  This allows us to specialize _Base_bitset for the
-// important special case where the bitset is only a single word.
-
-// The C++ standard does not define the precise semantics of operator[].
-// In this implementation the const version of operator[] is equivalent
-// to test(), except that it does no range checking.  The non-const version
-// returns a reference to a bit, again without doing any range checking.
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x2
-#  include <stl/_prolog.h>
-# endif
-
-#ifdef _STLP_PRAGMA_ONCE
-# pragma once
-#endif
-
-# include <stl/_bitset.h>
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x2 )
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_BITSET */
-
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/cassert b/src/STLport/cassert
deleted file mode 100644
index 763fa79..0000000
--- a/src/STLport/cassert
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x103
-#  include <stl/_prolog.h>
-# endif
-
-# if defined (_STLP_USE_NEW_C_HEADERS) || defined (__IN_STLPORT_CASSERT)
-#  include _STLP_NATIVE_CPP_C_HEADER(cassert)
-# else
-#  include <assert.h>
-# endif
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x103 )
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/cctype b/src/STLport/cctype
deleted file mode 100644
index a71bab5..0000000
--- a/src/STLport/cctype
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_CCTYPE
-# define _STLP_CCTYPE
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x104
-#  include <stl/_prolog.h>
-# endif
-
-# if defined (_STLP_USE_NEW_C_HEADERS)
-
-#  include _STLP_NATIVE_CPP_C_HEADER(cctype)
-
-# else
-
-#  include <ctype.h>
-
-// Undef convenience interfaces
-#undef isspace
-#undef isprint
-#undef iscntrl
-#undef isupper
-#undef islower
-#undef isalpha
-#undef isdigit
-#undef ispunct
-#undef isxdigit
-#undef isalnum
-#undef isgraph
-#undef toupper
-#undef tolower
-
-# endif /* _STLP_USE_NEW_C_HEADERS */
-
-# if ! defined (_STLP_NO_CSTD_FUNCTION_IMPORTS)
-#  if defined ( _STLP_IMPORT_VENDOR_CSTD )
-_STLP_BEGIN_NAMESPACE
-using _STLP_VENDOR_CSTD::isalnum;
-using _STLP_VENDOR_CSTD::isalpha;
-using _STLP_VENDOR_CSTD::iscntrl;
-using _STLP_VENDOR_CSTD::isdigit;
-using _STLP_VENDOR_CSTD::isgraph;
-using _STLP_VENDOR_CSTD::islower;
-using _STLP_VENDOR_CSTD::isprint;
-using _STLP_VENDOR_CSTD::ispunct;
-using _STLP_VENDOR_CSTD::isspace;
-using _STLP_VENDOR_CSTD::isupper;
-using _STLP_VENDOR_CSTD::isxdigit;
-using _STLP_VENDOR_CSTD::tolower;
-using _STLP_VENDOR_CSTD::toupper;
-_STLP_END_NAMESPACE
-#   endif /* _STLP_IMPORT_VENDOR_CSTD*/
-#  endif /* _STLP_NO_CSTD_FUNCTION_IMPORTS */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x104 )
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_CCTYPE */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/cerrno b/src/STLport/cerrno
deleted file mode 100644
index e714f87..0000000
--- a/src/STLport/cerrno
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_CERRNO
-# define _STLP_CERRNO
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x105
-#  include <stl/_prolog.h>
-# endif
-
-# if defined (_STLP_USE_NEW_C_HEADERS)
-#  include _STLP_NATIVE_CPP_C_HEADER(cerrno)
-# else
-#  include <errno.h>
-# endif
-
-#ifndef errno
-
-# if defined (_STLP_IMPORT_VENDOR_CSTD) && ! defined (__IBMCPP__) && ! defined(__hpux)
-_STLP_BEGIN_NAMESPACE
-using _STLP_VENDOR_CSTD::errno;
-_STLP_END_NAMESPACE
-# endif /* _STLP_IMPORT_VENDOR_CSTD */
-
-#endif
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x105 )
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_CERRNO */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/cfloat b/src/STLport/cfloat
deleted file mode 100644
index 00734a6..0000000
--- a/src/STLport/cfloat
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_CFLOAT
-# define _STLP_CFLOAT
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x106
-#  include <stl/_prolog.h>
-# endif
-
-// Borland defines some implementation constants in std:: namespace,
-// we do not want to import them.
-# if defined  (_STLP_USE_NEW_C_HEADERS) && ! defined (__BORLANDC__)
-#  include _STLP_NATIVE_CPP_C_HEADER(cfloat)
-# else
-#  include _STLP_NATIVE_C_HEADER(float.h)
-# endif
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x106 )
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_CFLOAT */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/climits b/src/STLport/climits
deleted file mode 100644
index 3e2ee84..0000000
--- a/src/STLport/climits
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_CLIMITS
-# define _STLP_CLIMITS
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x107
-#  include <stl/_prolog.h>
-# endif
-
-# if defined (__SUNPRO_CC) && ((__SUNPRO_CC == 0x500) && (__SUNPRO_CC_COMPAT > 4))
-#  include </usr/include/limits.h>
-# elif defined (_STLP_USE_NEW_C_HEADERS)
-#  include _STLP_NATIVE_CPP_C_HEADER(climits)
-# else
-#  ifdef __BORLANDC__
-#   include _STLP_NATIVE_C_HEADER(limits.h)
-#  else
-#   include <limits.h>
-#  endif
-# endif
-
-# if (_STLP_OUTERMOST_HEADER_ID ==  0x107 )
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_CLIMITS */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/clocale b/src/STLport/clocale
deleted file mode 100644
index 1cae50d..0000000
--- a/src/STLport/clocale
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_CLOCALE
-#  define _STLP_CLOCALE
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID  0x108
-#  include <stl/_prolog.h>
-# endif
-
-# if defined (_STLP_USE_NEW_C_HEADERS)
-#  include _STLP_NATIVE_CPP_C_HEADER(clocale)
-# else
-#  include _STLP_NATIVE_C_HEADER(locale.h)
-# endif
-
-# ifdef _STLP_IMPORT_VENDOR_CSTD
-_STLP_BEGIN_NAMESPACE
-using _STLP_VENDOR_CSTD::lconv;
-#  if ! defined (_STLP_NO_CSTD_FUNCTION_IMPORTS)
-using _STLP_VENDOR_CSTD::localeconv;
-using _STLP_VENDOR_CSTD::setlocale;
-#  endif
-_STLP_END_NAMESPACE
-# endif /* _STLP_IMPORT_VENDOR_CSTD */
-
-# if (_STLP_OUTERMOST_HEADER_ID ==  0x108 )
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_CLOCALE */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/cmath b/src/STLport/cmath
deleted file mode 100644
index 8867483..0000000
--- a/src/STLport/cmath
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_CMATH
-# define _STLP_CMATH
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID  0x109
-#  include <stl/_prolog.h>
-# endif
-
-# if defined (_STLP_USE_NEW_C_HEADERS)
-#  if defined (_STLP_HAS_NO_NAMESPACES) && ! defined (exception)
-#   define exception __math_exception
-#  endif
-#  include _STLP_NATIVE_CPP_C_HEADER(cmath)
-#  if defined (_STLP_HAS_NO_NAMESPACES)
-#   undef exception
-#  endif
-# else
-#  include <math.h>
-# endif
-
-#  if (defined (__SUNPRO_CC) && (__SUNPRO_CC > 0x500)) || \
-     !( defined (__IBMCPP__) && (__IBMCPP__ >= 500) || ! ( defined (__HP_aCC) && (__HP_aCC >= 30000) ))
-# ifndef _STLP_HAS_NO_NAMESPACES
-namespace std {
-# endif
-  extern "C" double hypot(double x, double y);
-# ifndef _STLP_HAS_NO_NAMESPACES
-}
-# endif
-
-#  endif
-
-#  ifdef _STLP_IMPORT_VENDOR_CSTD
-_STLP_BEGIN_NAMESPACE
-# if ! defined (_STLP_NO_CSTD_FUNCTION_IMPORTS)
-# ifdef _STLP_HAS_NATIVE_FLOAT_ABS
-using _STLP_VENDOR_CSTD::abs;
-# endif
-using _STLP_VENDOR_CSTD::acos;
-using _STLP_VENDOR_CSTD::asin;
-using _STLP_VENDOR_CSTD::atan2;
-using _STLP_VENDOR_CSTD::atan;
-using _STLP_VENDOR_CSTD::ceil;
-using _STLP_VENDOR_CSTD::cos;
-using _STLP_VENDOR_CSTD::cosh;
-using _STLP_VENDOR_CSTD::exp;
-using _STLP_VENDOR_CSTD::fabs;
-using _STLP_VENDOR_CSTD::floor;
-using _STLP_VENDOR_CSTD::fmod;
-using _STLP_VENDOR_CSTD::frexp;
-using _STLP_VENDOR_CSTD::ldexp;
-using _STLP_VENDOR_CSTD::log10;
-using _STLP_VENDOR_CSTD::log;
-using _STLP_VENDOR_CSTD::modf;
-using _STLP_VENDOR_CSTD::pow;
-using _STLP_VENDOR_CSTD::sin;
-using _STLP_VENDOR_CSTD::sinh;
-using _STLP_VENDOR_CSTD::sqrt;
-using _STLP_VENDOR_CSTD::tan;
-using _STLP_VENDOR_CSTD::tanh;
-# endif /* BUG */
-_STLP_END_NAMESPACE
-#  endif /* _STLP_IMPORT_VENDOR_CSTD */
-
-#ifndef _STLP_CMATH_H_HEADER
-#  include <stl/_cmath.h>
-#endif
-
-# if (_STLP_OUTERMOST_HEADER_ID ==  0x109 )
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_CMATH */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/complex b/src/STLport/complex
deleted file mode 100644
index 905fe93..0000000
--- a/src/STLport/complex
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-
-#ifndef _STLP_template_complex
-# define _STLP_template_complex
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID  0x10
-#  include <stl/_prolog.h>
-# endif
-
-# ifdef _STLP_OWN_IOSTREAMS
-// This header declares the template class complex, as described in 
-// in the draft C++ standard.  Single-precision complex numbers
-// are complex<float>, double-precision are complex<double>, and
-// quad precision are complex<long double>.
-
-// Note that the template class complex is declared within namespace
-// std, as called for by the draft C++ standard
-  
-#  define _STLP_COMPLEX_NAMESPACE _STLP_STD
-#  include <stl/_complex.h>
-# else
-#  define _STLP_COMPLEX_NAMESPACE _STLP_VENDOR_STD
-#  include <wrap_std/complex>
-# endif
-
-# if (_STLP_OUTERMOST_HEADER_ID ==  0x10 )
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_template_complex */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/config/_epilog.h b/src/STLport/config/_epilog.h
deleted file mode 100644
index 3671284..0000000
--- a/src/STLport/config/_epilog.h
+++ /dev/null
@@ -1,33 +0,0 @@
-#if defined (_STLP_MSVC) || defined (__ICL) || defined (__BORLANDC__)
-
-# if defined (__BORLANDC__)
-#  pragma option pop
-#  pragma option -w-8062
-# else
-#  if !(defined (_STLP_MSVC) && (_STLP_MSVC < 1200))
-#   pragma warning (pop)
-#  endif
-#  pragma pack (pop)
-# endif
-
-
-#elif defined(__sgi) && !defined(__GNUC__) && (_MIPS_SIM != _MIPS_SIM_ABI32)
-
-# pragma reset woff 1174
-# pragma reset woff 1375
-# pragma reset woff 1209
-// from iterator_base.h
-# pragma reset woff 1183
-
-#elif defined(__DECCXX)
-
-# ifdef __PRAGMA_ENVIRONMENT
-#  pragma __environment __restore
-# endif
-
-#elif defined(__IBMCPP__)
-
-#pragma info(restore)
-
-#endif
-
diff --git a/src/STLport/config/_msvc_warnings_off.h b/src/STLport/config/_msvc_warnings_off.h
deleted file mode 100644
index b4ea8b1..0000000
--- a/src/STLport/config/_msvc_warnings_off.h
+++ /dev/null
@@ -1,20 +0,0 @@
-# if (_MSC_VER > 1000)
-// #pragma warning ( disable : 4251 )	// ignore template classes being exported in .dll's
-/* 
- * "this used in base member initializer list"
- * arrow operator warning
- * copy constr & assignment cannot be generated
- * "forcing value to bool 'true' or 'false'
- * typedef used instaead of full type
- * 4018 : signed/unsigned mismatch, 4146 - result still unsigned 
- * 4100: unreferenced formal parameter
- * 4663: C++ language change: to explicitly specialize class template 'identifier' use the following syntax
- */
-#  pragma warning ( disable : 4355 4284  4231 4511 4512 4097 4786 4800 4018 4146 4244 4514 4127 4100 4663)
-#  pragma warning ( disable : 4245 4514 4660) // conversion from enum to unsigned int signed/unsigned mismatch
-#  if (_MSC_VER > 1200)
-// multiple copy constructors/assignment operators specified,
-// with member templates are bogus...
-#   pragma warning ( disable : 4521 4522)
-#  endif  
-# endif
diff --git a/src/STLport/config/_prolog.h b/src/STLport/config/_prolog.h
deleted file mode 100644
index be32caa..0000000
--- a/src/STLport/config/_prolog.h
+++ /dev/null
@@ -1,46 +0,0 @@
-
-#if defined (_STLP_MSVC) || defined (__ICL) || defined (__BORLANDC__)
-
-# if defined (__BORLANDC__)
-#  if (__BORLANDC__ >= 0x510)
-#  pragma option push -Vx- -Ve- -a8 -b -pc -w-inl -w-aus -w-sig -w-8062 -w-8041 -w-8008 -w-8012 -w-8027 -w-8057 -w-8091 -w-8092 -w-8066  /* P_O_1 */
-#  endif
-# else
-# if !(defined (_STLP_MSVC) && (_STLP_MSVC < 1200))
-#  pragma warning(push)
-# endif
-# pragma pack(push,8)
-# include <config/_msvc_warnings_off.h>
-# endif
-
-
-#elif defined(__sgi) && !defined(__GNUC__) && (_MIPS_SIM != _MIPS_SIM_ABI32)
-
-#pragma set woff 1209
-#pragma set woff 1174
-#pragma set woff 1375
-// from iterator_base.h
-#pragma set woff 1183
-
-#elif defined(__DECCXX)
-
-# ifdef __PRAGMA_ENVIRONMENT
-#  pragma __environment __save
-#  pragma __environment __header_defaults
-# endif
-
-#elif defined(__IBMCPP__)
-// supress EDC3130: A constant is being used as a conditional expression
-#pragma info(nocnd)
-
-#elif defined (__HP_aCC)
-/* _REENTRANT selects Posix 1c threads unless draft4 selected.
- *  * This usage is obsolescent, "-D_POSIX_C_SOURCE=199506" is preferred */
-# if 0 /* defined (_REENTRANT) && ! defined (_POSIX_C_SOURCE) */
-#  define _POSIX_C_SOURCE 199506
-# endif
-#elif defined (__WATCOMCPLUSPLUS__)
-# pragma warning 604 10 // must lookahead to determine...
-# pragma warning 594 10 // resolved as declaration/type
-# pragma warning 595 10 // resolved as an expression
-#endif
diff --git a/src/STLport/config/new_compiler/README b/src/STLport/config/new_compiler/README
deleted file mode 100644
index fc7d92c..0000000
--- a/src/STLport/config/new_compiler/README
+++ /dev/null
@@ -1,12 +0,0 @@
-
-README file for "stlport/config/new_compiler"
-
-
-This directory contains "configure" script which will help you to 
-create config file for a new compiler. Please refer to HTML documentation
-at www.stlport.org/doc for details. 
-NOTE : stlconf.h produced by "configure" is NOT suitable for immediate use
-as platform-specific configuration file as it does not set several important
-macros. However, it is a good starting point.
-
-Boris Fomitchev.
\ No newline at end of file
diff --git a/src/STLport/config/new_compiler/configure b/src/STLport/config/new_compiler/configure
deleted file mode 100644
index 657e3fa..0000000
--- a/src/STLport/config/new_compiler/configure
+++ /dev/null
@@ -1,3644 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.12 
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_help="$ac_help
---enable-extension=<ext>"
-ac_help="$ac_help
---enable-namespaces Use namespaces (default if posssible)
---disable-namespaces Don't use namespaces support"
-ac_help="$ac_help
---enable-exceptions Use exceptions support (default if posssible)
- --disable-exceptions Don't use exceptions support"
-ac_help="$ac_help
---enable-relops Separate rel_ops namespace for relational operators (default if posssible)
---disable-relops No separate rel_ops namespace for relational operators"
-ac_help="$ac_help
---enable-new-style-headers Use new-style headers (default)
---disable-new-style-headers Don't use new-style headers"
-ac_help="$ac_help
---enable-new-iostreams Use new iostreams (default)
---disable-new-iostreams Don't use new iostreams"
-ac_help="$ac_help
---enable-sgi-allocators : set default parameter to SGI-style default alloc, not allocator<T>
- --disable-sgi-allocators : use allocator<T> if possible"
-ac_help="$ac_help
---enable-malloc : set default alloc to malloc-based allocator ( malloc_alloc_template<instance_no>, alloc.h )
---disable-malloc : choose (default) sgi node allocator (__alloc<threads,no>  alloc.h )"
-ac_help="$ac_help
---enable-newalloc : set default alloc to new-based allocator ( new_alloc, alloc.h )
---disable-newalloc : choose (default) sgi allocator (__alloc<threads,no>  alloc.h )"
-ac_help="$ac_help
---enable-defalloc : make HP-style defalloc.h included in alloc.h )
---disable-defalloc : leave defalloc.h alone"
-ac_help="$ac_help
---enable-debugalloc : use debug versions of allocators
---disable-debugalloc : not using debug allocators"
-ac_help="$ac_help
---enable-abbrevs : use abbreviated class names internally for linker benefit (don't affect interface)
---disable-abbrevs : don't use abbreviated names"
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval "$ac_prev=\$ac_option"
-    ac_prev=
-    continue
-  fi
-
-  case "$ac_option" in
-  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) ac_optarg= ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case "$ac_option" in
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir="$ac_optarg" ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build="$ac_optarg" ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file="$ac_optarg" ;;
-
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
-    datadir="$ac_optarg" ;;
-
-  -disable-* | --disable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    eval "enable_${ac_feature}=no" ;;
-
-  -enable-* | --enable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "enable_${ac_feature}='$ac_optarg'" ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix="$ac_optarg" ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he)
-    # Omit some internal or obsolete options to make the list less imposing.
-    # This message is too long to be a string in the A/UX 3.1 sh.
-    cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
-  --cache-file=FILE       cache test results in FILE
-  --help                  print this message
-  --no-create             do not create output files
-  --quiet, --silent       do not print \`checking...' messages
-  --version               print the version of autoconf that created configure
-Directory and file names:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [same as prefix]
-  --bindir=DIR            user executables in DIR [EPREFIX/bin]
-  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
-  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
-  --datadir=DIR           read-only architecture-independent data in DIR
-                          [PREFIX/share]
-  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
-                          [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
-  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
-  --includedir=DIR        C header files in DIR [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
-  --infodir=DIR           info documentation in DIR [PREFIX/info]
-  --mandir=DIR            man documentation in DIR [PREFIX/man]
-  --srcdir=DIR            find the sources in DIR [configure dir or ..]
-  --program-prefix=PREFIX prepend PREFIX to installed program names
-  --program-suffix=SUFFIX append SUFFIX to installed program names
-  --program-transform-name=PROGRAM
-                          run sed PROGRAM on installed program names
-EOF
-    cat << EOF
-Host type:
-  --build=BUILD           configure for building on BUILD [BUILD=HOST]
-  --host=HOST             configure for HOST [guessed]
-  --target=TARGET         configure for TARGET [TARGET=HOST]
-Features and packages:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --x-includes=DIR        X include files are in DIR
-  --x-libraries=DIR       X library files are in DIR
-EOF
-    if test -n "$ac_help"; then
-      echo "--enable and --with options recognized:$ac_help"
-    fi
-    exit 0 ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host="$ac_optarg" ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir="$ac_optarg" ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir="$ac_optarg" ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir="$ac_optarg" ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir="$ac_optarg" ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir="$ac_optarg" ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir="$ac_optarg" ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir="$ac_optarg" ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix="$ac_optarg" ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix="$ac_optarg" ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix="$ac_optarg" ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name="$ac_optarg" ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir="$ac_optarg" ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir="$ac_optarg" ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site="$ac_optarg" ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir="$ac_optarg" ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir="$ac_optarg" ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target="$ac_optarg" ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.12"
-    exit 0 ;;
-
-  -with-* | --with-*)
-    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "with_${ac_package}='$ac_optarg'" ;;
-
-  -without-* | --without-*)
-    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    eval "with_${ac_package}=no" ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes="$ac_optarg" ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries="$ac_optarg" ;;
-
-  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
-    ;;
-
-  *)
-    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
-      echo "configure: warning: $ac_option: invalid host type" 1>&2
-    fi
-    if test "x$nonopt" != xNONE; then
-      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
-    fi
-    nonopt="$ac_option"
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
-  exec 6>/dev/null
-else
-  exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
-  case "$ac_arg" in
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c) ;;
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
-  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
-  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
-  esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set.  These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=stlconf.h.in
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then its parent.
-  ac_prog=$0
-  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
-  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
-  srcdir=$ac_confdir
-  if test ! -r $srcdir/$ac_unique_file; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
-  else
-    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
-  fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
-  if test "x$prefix" != xNONE; then
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-  fi
-fi
-for ac_site_file in $CONFIG_SITE; do
-  if test -r "$ac_site_file"; then
-    echo "loading site script $ac_site_file"
-    . "$ac_site_file"
-  fi
-done
-
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-  # Stardent Vistra SVR4 grep lacks -e, says ghazi at caip.rutgers.edu.
-  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
-    ac_n= ac_c='
-' ac_t='	'
-  else
-    ac_n=-n ac_c= ac_t=
-  fi
-else
-  ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-
-echo "$ac_t""*** $0: STLport configuration utility ***" 1>&6
-if test "${CXXFLAGS}" = ""; then 
-echo "$ac_t""* Note: for best reliability - try \"CXXFLAGS=-treat_warnings_as_errors\" $0 " 1>&6
-echo "$ac_t""* Please don't forget specifying typical CXXFLAGS you'll be using - " 1>&6 
-echo "$ac_t""* such as that enabling exceptions handling" 1>&6
-fi
-echo "$ac_t""Please stand by while exploring compiler capabilities..." 1>&6
-echo "$ac_t""Be patient - that may take a while..." 1>&6
-echo "$ac_t""***" 1>&6
-
-# utility function
-check_warning () {
-    warn_str=`tail -1 config.log | egrep -i "arning|\(W\)"`
-    if test "$warn_str" = ""; then
-      return 0
-    else
-     return 1
-    fi
-}
-
-
-# Check whether --enable-extension or --disable-extension was given.
-if test "${enable_extension+set}" = set; then
-  enableval="$enable_extension"
-  
-case "$enableval" in
-	no) echo "$ac_t""Info :.cpp used as extension for tests" 1>&6 
-	    ac_ext=cpp 
-      	;;
-	 *) echo "$ac_t""Argument : .$enableval used as extension" 1>&6 
-	ac_ext=$enableval
-esac
-
-else
-  echo "$ac_t""Info : .cpp used as extension for tests" 1>&6 
-	ac_ext=cpp
-
-
-fi
-
-
-# Save that, as it is being redefined several times 
-use_ac_ext=$ac_ext
-
-for ac_prog in $CCC c++ g++ gcc CC cxx cc++
-do
-# Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:601: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CXX"; then
-  ac_cv_prog_CXX="$CXX" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CXX="$ac_prog"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CXX="$ac_cv_prog_CXX"
-if test -n "$CXX"; then
-  echo "$ac_t""$CXX" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-test -n "$CXX" && break
-done
-test -n "$CXX" || CXX="gcc"
-
-
-echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:632: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
-
-ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
-cat > conftest.$ac_ext <<EOF
-#line 642 "configure"
-#include "confdefs.h"
-main(){return(0);}
-EOF
-if { (eval echo configure:646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  ac_cv_prog_cxx_works=yes
-  # If we can't run a trivial program, we are probably using a cross compiler.
-  if (./conftest; exit) 2>/dev/null; then
-    ac_cv_prog_cxx_cross=no
-  else
-    ac_cv_prog_cxx_cross=yes
-  fi
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_cv_prog_cxx_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
-if test $ac_cv_prog_cxx_works = no; then
-  { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:672: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
-cross_compiling=$ac_cv_prog_cxx_cross
-
-echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
-echo "configure:677: checking whether we are using GNU C++" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.C <<EOF
-#ifdef __GNUC__
-  yes;
-#endif
-EOF
-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:686: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
-  ac_cv_prog_gxx=yes
-else
-  ac_cv_prog_gxx=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gxx" 1>&6
-
-if test $ac_cv_prog_gxx = yes; then
-  GXX=yes
-  ac_test_CXXFLAGS="${CXXFLAGS+set}"
-  ac_save_CXXFLAGS="$CXXFLAGS"
-  CXXFLAGS=
-  echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
-echo "configure:701: checking whether ${CXX-g++} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  echo 'void f(){}' > conftest.cc
-if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
-  ac_cv_prog_cxx_g=yes
-else
-  ac_cv_prog_cxx_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
-  if test "$ac_test_CXXFLAGS" = set; then
-    CXXFLAGS="$ac_save_CXXFLAGS"
-  elif test $ac_cv_prog_cxx_g = yes; then
-    CXXFLAGS="-g -O2"
-  else
-    CXXFLAGS="-O2"
-  fi
-else
-  GXX=
-  test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
-fi
-
-ac_ext=$use_ac_ext
-
-ac_ext=C
-# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cxx_cross
-
-ac_ext=$use_ac_ext
-
-echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:740: checking size of int" >&5
-if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$cross_compiling" = yes; then
-  ac_cv_sizeof_int=4
-else
-  cat > conftest.$ac_ext <<EOF
-#line 748 "configure"
-#include "confdefs.h"
-#ifdef __cplusplus
-extern "C" void exit(int);
-#endif
-#include <stdio.h>
-main()
-{
-  FILE *f=fopen("conftestval", "w");
-  if (!f) exit(1);
-  fprintf(f, "%d\n", sizeof(int));
-  exit(0);
-}
-EOF
-if { (eval echo configure:762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
-  ac_cv_sizeof_int=`cat conftestval`
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_sizeof_int=0
-fi
-rm -fr conftest*
-fi
-
-fi
-echo "$ac_t""$ac_cv_sizeof_int" 1>&6
-cat >> confdefs.h <<EOF
-#define SIZEOF_INT $ac_cv_sizeof_int
-EOF
-
-
-ac_ext=$use_ac_ext
-
-if test "$ac_cv_sizeof_int" = "4"; then
-  cat >> confdefs.h <<EOF
-#define _STLP_UINT32_T unsigned int
-EOF
-
-else
-  echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:790: checking size of long" >&5
-if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$cross_compiling" = yes; then
-  ac_cv_sizeof_long=4
-else
-  cat > conftest.$ac_ext <<EOF
-#line 798 "configure"
-#include "confdefs.h"
-#ifdef __cplusplus
-extern "C" void exit(int);
-#endif
-#include <stdio.h>
-main()
-{
-  FILE *f=fopen("conftestval", "w");
-  if (!f) exit(1);
-  fprintf(f, "%d\n", sizeof(long));
-  exit(0);
-}
-EOF
-if { (eval echo configure:812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
-  ac_cv_sizeof_long=`cat conftestval`
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_sizeof_long=0
-fi
-rm -fr conftest*
-fi
-
-fi
-echo "$ac_t""$ac_cv_sizeof_long" 1>&6
-cat >> confdefs.h <<EOF
-#define SIZEOF_LONG $ac_cv_sizeof_long
-EOF
-
-
-  ac_ext=$use_ac_ext
-  if test "$ac_cv_sizeof_long" = "4"; then
-    cat >> confdefs.h <<EOF
-#define _STLP_UINT32_T unsigned long
-EOF
-
-  else
-      echo $ac_n "checking size of short""... $ac_c" 1>&6
-echo "configure:839: checking size of short" >&5
-if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$cross_compiling" = yes; then
-  ac_cv_sizeof_short=4
-else
-  cat > conftest.$ac_ext <<EOF
-#line 847 "configure"
-#include "confdefs.h"
-#ifdef __cplusplus
-extern "C" void exit(int);
-#endif
-#include <stdio.h>
-main()
-{
-  FILE *f=fopen("conftestval", "w");
-  if (!f) exit(1);
-  fprintf(f, "%d\n", sizeof(short));
-  exit(0);
-}
-EOF
-if { (eval echo configure:861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
-  ac_cv_sizeof_short=`cat conftestval`
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_sizeof_short=0
-fi
-rm -fr conftest*
-fi
-
-fi
-echo "$ac_t""$ac_cv_sizeof_short" 1>&6
-cat >> confdefs.h <<EOF
-#define SIZEOF_SHORT $ac_cv_sizeof_short
-EOF
-
-
-    if test "$ac_cv_sizeof_short" = "4"; then
-      cat >> confdefs.h <<EOF
-#define _STLP_UINT32_T unsigned short
-EOF
-
-    else
-      { echo "configure: error: Cannot find any 32-bit integer type for your compiler" 1>&2; exit 1; }
-    fi
-  ac_ext=$use_ac_ext
-  fi
-fi
-ac_ext=$use_ac_ext
-
-
-if test "$ac_cv_c_cross" = "yes"; then
-  CXXFLAGS="${CXXFLAGS} -c"
-fi
-
-ac_ext=$use_ac_ext
-
-echo $ac_n "checking for basic STL compatibility""... $ac_c" 1>&6
-echo "configure:901: checking for basic STL compatibility" >&5
-cat > conftest.$ac_ext <<EOF
-#line 903 "configure"
-#include "confdefs.h"
-
-template <class Arg1, class Arg2, class Result>
-struct binary_function {
-    typedef Arg1 first_argument_type;
-    typedef Arg2 second_argument_type;
-    typedef Result result_type;
-};      
-template <class T>
-struct plus : public binary_function<T, T, T> {
-    T operator()(const T& x, const T& y) const;
-};
-
-template <class T>
-T plus<T>::operator()(const T& x, const T& y) const { return x + y; }
-plus<int> p;
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  ac_cv_compat="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  { echo "configure: error: Your compiler won't be able to compile this implementation. Sorry." 1>&2; exit 1; } 
- ac_cv_compat="no"
-
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_compat" 1>&6
-
-echo $ac_n "checking for partial specialization syntax""... $ac_c" 1>&6
-echo "configure:940: checking for partial specialization syntax" >&5
-cat > conftest.$ac_ext <<EOF
-#line 942 "configure"
-#include "confdefs.h"
-
-     template <class T> class fs_foo {};
-     template <> class fs_foo<int> {};
-int main() {
- fs_foo<int> i;
-; return 0; }
-EOF
-if { (eval echo configure:951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-    _FULL_SPEC="template <>" ac_cv_spec_syntax="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-    cat >> confdefs.h <<\EOF
-#define _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX 1
-EOF
- ac_cv_spec_syntax="no" _FULL_SPEC=""
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_spec_syntax" 1>&6
-
-echo $ac_n "checking for bool keyword""... $ac_c" 1>&6
-echo "configure:967: checking for bool keyword" >&5
-cat > conftest.$ac_ext <<EOF
-#line 969 "configure"
-#include "confdefs.h"
-bool b_foo() { return true; }
-int main() {
-(void)b_foo();
-; return 0; }
-EOF
-if { (eval echo configure:976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_bool="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_NO_BOOL 1
-EOF
- ac_cv_bool="no"
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_bool" 1>&6
-if test "$ac_cv_bool" = "no"; then
-  echo $ac_n "checking for yvals.h header""... $ac_c" 1>&6
-echo "configure:992: checking for yvals.h header" >&5
-  cat > conftest.$ac_ext <<EOF
-#line 994 "configure"
-#include "confdefs.h"
-#include <yvals.h> 
-    extern bool aaa=true;
-   
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:1003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_YVALS_H 1
-EOF
- echo "$ac_t""yes" 1>&6 
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  
-  echo "$ac_t""no" 1>&6
-  echo $ac_n "checking whether bool is reserved word""... $ac_c" 1>&6
-echo "configure:1016: checking whether bool is reserved word" >&5
-  cat > conftest.$ac_ext <<EOF
-#line 1018 "configure"
-#include "confdefs.h"
-typedef int bool;
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:1025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_bool_reserved="no"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_DONT_USE_BOOL_TYPEDEF 1
-EOF
- ac_cv_bool_reserved="yes"
-fi
-rm -f conftest*
-  echo "$ac_t""$ac_cv_bool_reserved" 1>&6
-  
-fi
-rm -f conftest*
-fi
-
-echo $ac_n "checking for wchar_t type""... $ac_c" 1>&6
-echo "configure:1045: checking for wchar_t type" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1047 "configure"
-#include "confdefs.h"
- #include <wchar.h>
-      wchar_t wc_foo() { return 'a'; }
-int main() {
-(void)wc_foo();
-; return 0; }
-EOF
-if { (eval echo configure:1055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_wchar="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_NO_WCHAR_T 1
-EOF
- ac_cv_wchar="no"
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_wchar" 1>&6
-
-echo $ac_n "checking if wchar_t is unsigned short""... $ac_c" 1>&6
-echo "configure:1071: checking if wchar_t is unsigned short" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1073 "configure"
-#include "confdefs.h"
-
-     # include <wchar.h>
-     template <class T> struct foo {};
-     $_FULL_SPEC struct foo <wchar_t> {};
-     typedef unsigned short u__short;
-     $_FULL_SPEC struct foo <u__short> {};
-     foo<wchar_t> f1;
-     foo<u__short> f2;
-	
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:1088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_wchar_short="no"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_WCHAR_T_IS_USHORT 1
-EOF
- ac_cv_wchar_short="yes"
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_wchar_short" 1>&6
-
-echo $ac_n "checking for long long type""... $ac_c" 1>&6
-echo "configure:1104: checking for long long type" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1106 "configure"
-#include "confdefs.h"
-long long ll_foo() { return 0; }
-int main() {
-(void)ll_foo();
-; return 0; }
-EOF
-if { (eval echo configure:1113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_LONG_LONG 1
-EOF
- ac_cv_long_long="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_long_long="no"
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_long_long" 1>&6
-
-echo $ac_n "checking for long double type""... $ac_c" 1>&6
-echo "configure:1129: checking for long double type" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1131 "configure"
-#include "confdefs.h"
-long double ld_foo() { return 0; }
-int main() {
-(void)ld_foo();
-; return 0; }
-EOF
-if { (eval echo configure:1138: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_long_double="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_NO_LONG_DOUBLE 1
-EOF
- ac_cv_long_double="no"
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_long_double" 1>&6
-
-echo $ac_n "checking for typename keyword""... $ac_c" 1>&6
-echo "configure:1154: checking for typename keyword" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1156 "configure"
-#include "confdefs.h"
-
-template <class T1, class T2>
-struct pair {
-    typedef T1 first_type;
-    typedef T2 second_type;
-};
-
-template <class Arg, class Result>
-struct unary_function {
-    typedef Arg argument_type;
-    typedef Result result_type;
-};
-
-template <class Pair>
-struct select2nd : public unary_function<Pair, typename Pair::second_type> {
-  typedef typename Pair::first_type ignored_type;
-  const typename Pair::second_type& operator()(const typename Pair::second_type& x,
-						const ignored_type& ) const
-  {
-    return x;
-  }
-  
-};
-    
-int main() {
- 
-	typedef pair<int,int> tn_p;
-	select2nd< tn_p > tn_s;
-	(void)tn_s(1,5);
-    
-; return 0; }
-EOF
-if { (eval echo configure:1190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  __TYPENAME="typename" 
-     ac_cv_typename="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  __TYPENAME="" 
-     cat >> confdefs.h <<\EOF
-#define _STLP_NEED_TYPENAME 1
-EOF
-
-     ac_cv_typename="no"
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_typename" 1>&6
-
-echo $ac_n "checking for explicit keyword""... $ac_c" 1>&6
-echo "configure:1209: checking for explicit keyword" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1211 "configure"
-#include "confdefs.h"
-struct expl_Class { int a; explicit expl_Class(int t): a(t) {} };
-    expl_Class c(1);
-    
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:1220: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_explicit="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_NO_EXPLICIT 1
-EOF
- ac_cv_explicit="no"
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_explicit" 1>&6
-
-echo $ac_n "checking for mutable keyword""... $ac_c" 1>&6
-echo "configure:1236: checking for mutable keyword" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1238 "configure"
-#include "confdefs.h"
-struct mut_Class { mutable int a; void update() const { a=0; }  };
-    mut_Class c;
-    
-int main() {
-c.update()
-; return 0; }
-EOF
-if { (eval echo configure:1247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_mutable="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_NEED_MUTABLE 1
-EOF
- ac_cv_mutable="no"
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_mutable" 1>&6
-
-echo $ac_n "checking for new style casts""... $ac_c" 1>&6
-echo "configure:1263: checking for new style casts" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1265 "configure"
-#include "confdefs.h"
-struct ncast_Class { 
-	int a; void update(int* i) { *i=a; }  };
-    ncast_Class c;
-    
-int main() {
-
-  const int a(5);
-  c.update(const_cast<int*>(&a))
-    
-; return 0; }
-EOF
-if { (eval echo configure:1278: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_new_cast="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_NO_NEW_STYLE_CASTS 1
-EOF
- ac_cv_new_cast="no"
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_new_cast" 1>&6
-
-echo $ac_n "checking for new-style C library headers""... $ac_c" 1>&6
-echo "configure:1294: checking for new-style C library headers" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1296 "configure"
-#include "confdefs.h"
-
-     #include <cctype>
-     #include <cstddef>
-     #include <cstdio>
-     #include <cstdlib>
-     #include <cstring>
-     #include <cassert>
-     #include <climits>
-     #ifndef _STLP_NO_WCHAR_T
-     #include <cwchar>
-     #endif
-       
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:1314: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_newheaders="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_HAS_NO_NEW_C_HEADERS 1
-EOF
- ac_cv_newheaders="no"
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_newheaders" 1>&6
-
-echo $ac_n "checking for new-style <new> header""... $ac_c" 1>&6
-echo "configure:1330: checking for new-style <new> header" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1332 "configure"
-#include "confdefs.h"
-
-     #include <new>
-       
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:1341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_new_new="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_NO_NEW_NEW_HEADER 1
-EOF
- ac_cv_new_new="no"
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_new_new" 1>&6
-
-
-echo $ac_n "checking for member template methods""... $ac_c" 1>&6
-echo "configure:1358: checking for member template methods" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1360 "configure"
-#include "confdefs.h"
-
-template <class Result>
-struct mt_foo {
-    typedef Result result_type;
-    template <class Arg> result_type operate(const Arg&) { return Result(); }
-};      
-mt_foo<int> p;
-
-int main() {
-
-(void)p.operate((char*)"aaa");
-
-; return 0; }
-EOF
-if { (eval echo configure:1376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  ac_cv_member_templates="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_NO_MEMBER_TEMPLATES 1
-EOF
- ac_cv_member_templates="no"
-
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_member_templates" 1>&6
-
-echo $ac_n "checking for friend templates""... $ac_c" 1>&6
-echo "configure:1393: checking for friend templates" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1395 "configure"
-#include "confdefs.h"
-
-
-template <class Result2> class foo;
-
-template <class Result>
-struct ft_foo {
-    typedef Result result_type;
-    template <class Result2> friend class foo;
-};      
-ft_foo<int> p;
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:1412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  ac_cv_friend_templates="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_NO_FRIEND_TEMPLATES 1
-EOF
- ac_cv_friend_templates="no"
-
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_friend_templates" 1>&6
-
-echo $ac_n "checking for qualified friend templates""... $ac_c" 1>&6
-echo "configure:1429: checking for qualified friend templates" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1431 "configure"
-#include "confdefs.h"
-
-
-${_TEST_STD_BEGIN}
-
-template <class Result2> class foo;
-
-template <class Result>
-struct ft_foo {
-    typedef Result result_type;
-    template <class Result2> friend class $_TEST_STD::foo;
-};      
-ft_foo<int> p;
-${_TEST_STD_END}
-
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:1452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  ac_cv_qual_friend_templates="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_NO_QUALIFIED_FRIENDS 1
-EOF
- ac_cv_qual_friend_templates="no"
-
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_qual_friend_templates" 1>&6
-
-echo $ac_n "checking for member template keyword""... $ac_c" 1>&6
-echo "configure:1469: checking for member template keyword" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1471 "configure"
-#include "confdefs.h"
-
-template <class Result>
-struct nt_foo {
-    typedef Result result_type;
-    template <class Arg> struct rebind {  typedef nt_foo<Arg> other; };
-};
-
-template <class _Tp, class _Allocator>
-struct _Traits
-{
-  typedef typename _Allocator:: template rebind<_Tp> my_rebind; 
-  typedef typename my_rebind::other allocator_type;
-};
-
-nt_foo<char> p;
-_Traits< int, nt_foo<short> > pp;
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:1494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  ac_cv_member_template_keyword="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_NO_MEMBER_TEMPLATE_KEYWORD 1
-EOF
- ac_cv_member_template_keyword="no"
-
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_member_template_keyword" 1>&6
-
-if test "$ac_cv_member_template_keyword" = "no"; then
-echo $ac_n "checking for member template classes""... $ac_c" 1>&6
-echo "configure:1512: checking for member template classes" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1514 "configure"
-#include "confdefs.h"
-
-template <class Result>
-struct nt_foo {
-    typedef Result result_type;
-    template <class Arg> struct rebind {  typedef nt_foo<Arg> other; };
-};
-
-template <class _Tp, class _Allocator>
-struct _Traits
-{
-  typedef typename _Allocator::rebind<_Tp> my_rebind; 
-  typedef typename my_rebind::other allocator_type;
-};
-
-nt_foo<char> p;
-_Traits< int, nt_foo<short> > pp;
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:1537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  ac_cv_member_template_classes="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1
-EOF
- ac_cv_member_template_classes="no"
-
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_member_template_classes" 1>&6
-fi
-
-echo $ac_n "checking for partial class specialization""... $ac_c" 1>&6
-echo "configure:1555: checking for partial class specialization" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1557 "configure"
-#include "confdefs.h"
-
-template <class Arg,class Result>
-struct ps_foo {
-    typedef Arg argument_type;
-    typedef Result result_type;
-};   
-
-template<class Result>
-struct ps_foo<Result*,Result*> {
-	void bar() {}
-};
-
-template<class Result>
-struct ps_foo<int*,Result> {
-	void foo() {}
-};
-
-ps_foo<char*, char*> p;
-ps_foo<int*, int> p1;
-
-int main() {
-p.bar();
- p1.foo();
-; return 0; }
-EOF
-if { (eval echo configure:1584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  ac_cv_partial_spec="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1
-EOF
- ac_cv_partial_spec="no"
-
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_partial_spec" 1>&6
-
-if test "$ac_cv_partial_spec" = yes; then
-
-echo $ac_n "checking if explicit args accepted on constructors of partial specialized classes""... $ac_c" 1>&6
-echo "configure:1603: checking if explicit args accepted on constructors of partial specialized classes" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1605 "configure"
-#include "confdefs.h"
-
-template <class Arg,class Result>
-struct ps_foo {
-    typedef Arg argument_type;
-    typedef Result result_type;
-};   
-
-template<class Result>
-struct ps_foo<Result*,Result*> {
-	ps_foo<Result*,Result*>() {}
-	void bar() {}
-};
-
-template<class Result>
-struct ps_foo<int*,Result> {
-	ps_foo<int*,Result*>() {}
-	void bar() {}
-
-};
-
-ps_foo<char*, char*> p;
-ps_foo<int*, int> p1;
-
-int main() {
-p.bar();
- p1.foo();
-; return 0; }
-EOF
-if { (eval echo configure:1635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_PARTIAL_SPEC_NEEDS_TEMPLATE_ARGS 1
-EOF
- ac_cv_partial_spec_needs_args="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_partial_spec_needs_args="no"
-
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_partial_spec_needs_args" 1>&6
-
-fi
-
-if test ac_cv_partial_spec_needs_args=="no"; then
-
-echo $ac_n "checking if explicit args accepted on constructors of explicitly specialized classes""... $ac_c" 1>&6
-echo "configure:1656: checking if explicit args accepted on constructors of explicitly specialized classes" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1658 "configure"
-#include "confdefs.h"
-
-template <class Arg,class Result>
-struct ps_foo {
-    typedef Arg argument_type;
-    typedef Result result_type;
-    void bar() {}	
-};   
-
-template<class Result>
-struct ps_foo<int*,int> {
-	ps_foo<Result*,Result*>() {}
-	void foo() {}
-};
-
-ps_foo<char*, char*> p;
-ps_foo<int*, int> p1;
-
-int main() {
-p.bar();
- p1.foo();
-; return 0; }
-EOF
-if { (eval echo configure:1682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_PARTIAL_SPEC_NEEDS_TEMPLATE_ARGS 1
-EOF
- ac_cv_partial_spec_needs_args="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_partial_spec_needs_args="no"
-
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_partial_spec_needs_args" 1>&6
-
-fi
-
-echo $ac_n "checking for partial template function ordering""... $ac_c" 1>&6
-echo "configure:1701: checking for partial template function ordering" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1703 "configure"
-#include "confdefs.h"
-
-
-template <class Arg,class Result>
-Result po_foo (const Arg& a,const Result&){ return (Result)a.nothing; }  
-
-template <class T>
-struct A {
-	T a;
-	A(int _a) : a(_a) {}
-};
-
-template<class T>
-T po_foo (const A<T>& a, const A<T>& b){ return a.a; }   
-
-int main() {
-
-  A<int> po_a(0); A<int> po_b(1); (void)po_foo(po_b, po_a)
-
-; return 0; }
-EOF
-if { (eval echo configure:1725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  ac_cv_partial_ord="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER 1
-EOF
- ac_cv_partial_ord="no"
-
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_partial_ord" 1>&6
-
-echo $ac_n "checking for method specialization""... $ac_c" 1>&6
-echo "configure:1742: checking for method specialization" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1744 "configure"
-#include "confdefs.h"
-
-template <class Arg,class Result>
-struct ms_foo {
-    typedef Arg argument_type;
-    typedef Result result_type;
-    inline void bar();
-};   
-
-template <class Arg,class Result>
-inline void ms_foo<Arg,Result>::bar() {}
-
-inline void ms_foo<int*,int>::bar() {}
-
-ms_foo<char*, char*> p;
-ms_foo<int*, int> p1;
-
-int main() {
-p.bar();
- p1.bar();
-; return 0; }
-EOF
-if { (eval echo configure:1767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  ac_cv_method_spec="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_NO_METHOD_SPECIALIZATION 1
-EOF
- ac_cv_method_spec="no"
-
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_method_spec" 1>&6
-
-echo $ac_n "checking for lrand48 function""... $ac_c" 1>&6
-echo "configure:1784: checking for lrand48 function" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1786 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-int main() {
-long i = lrand48();
-; return 0; }
-EOF
-if { (eval echo configure:1793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_RAND48 1
-EOF
- ac_cv_func_lrand48="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_func_lrand48="no"
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_func_lrand48" 1>&6
-
-
-echo $ac_n "checking for default template parameters""... $ac_c" 1>&6
-echo "configure:1810: checking for default template parameters" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1812 "configure"
-#include "confdefs.h"
-template <class T> struct less {}; 
-     template <class T, class T1=less<T> > struct Class { T1 t1; };
-     Class<int> cl;
-     Class<int,less<short> > cl2;
-    
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:1823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  ac_cv_default_template_param="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_LIMITED_DEFAULT_TEMPLATES 1
-EOF
- ac_cv_default_template_param="no"
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_default_template_param" 1>&6
-if test "$ac_cv_default_template_param" = "no"; then
-  echo $ac_n "checking for default type parameters""... $ac_c" 1>&6
-echo "configure:1839: checking for default type parameters" >&5
-  cat > conftest.$ac_ext <<EOF
-#line 1841 "configure"
-#include "confdefs.h"
-
-template <class T> struct less {
-	typedef int int_t;
-  }; 
-
-template <class T, class T1=less<int> > 
-struct Class { 
-private:
-       int a;
-public:
-       typedef Class<T,T1> self; 
-       typedef $__TYPENAME T1::int_t int_t;
-       self foo (const Class<T,T1>& t) { 
-         if ( t.a==a ) return *this;
-         else return t;
-         } 
-};
-
-Class<int> cl;
-Class<int,less<short> > cl2;
-    
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:1868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_DEFAULT_TYPE_PARAM 1
-EOF
- ac_cv_default_type_param="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_default_type_param="no"
-fi
-rm -f conftest*
-  echo "$ac_t""$ac_cv_default_type_param" 1>&6
-
-fi
-
-
-echo $ac_n "checking for default non-type parameters""... $ac_c" 1>&6
-echo "configure:1887: checking for default non-type parameters" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1889 "configure"
-#include "confdefs.h"
-
-template <class T, int N=0 > 
-struct Class { 
-private:
-       T* t;
-       enum { t1=N };
-public:
-       int get_n() { return N; }
-};
-
-Class<int> cl;
-Class<int, 2> cl2;
-    
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:1908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  ac_cv_default_nontype_param="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_NO_DEFAULT_NON_TYPE_PARAM 1
-EOF
- ac_cv_default_nontype_param="no"
-	
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_default_nontype_param" 1>&6
-
-echo $ac_n "checking for non-type parameter bug""... $ac_c" 1>&6
-echo "configure:1925: checking for non-type parameter bug" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1927 "configure"
-#include "confdefs.h"
-
-template <class T, int N> 
-struct Class { 
-private:
-       T* t;
-       enum { t1=N };
-public:
-       int get_n() { return N; }
-};
-
-template <class T, int N>
-int operator==(const Class<T,N>& , const Class<T,N>& ) { return 0; }
-
-Class<int, 1> cl;
-Class<int, 1> cl2;
-int i(cl==cl2);
-    
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:1950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  ac_cv_nontype_param_bug="no"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_NON_TYPE_TMPL_PARAM_BUG 1
-EOF
- ac_cv_nontype_param_bug="yes"
-	
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_nontype_param_bug" 1>&6
-
-echo $ac_n "checking for static data member templates""... $ac_c" 1>&6
-echo "configure:1967: checking for static data member templates" >&5
-cat > conftest.$ac_ext <<EOF
-#line 1969 "configure"
-#include "confdefs.h"
-template <class T> struct Class { static int a; };
-     template <class T> int Class<T>::a;
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:1977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  ac_cv_static_templates="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_NO_STATIC_TEMPLATE_DATA 1
-EOF
- ac_cv_static_templates="no"
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_static_templates" 1>&6
-
-if test "$ac_cv_static_templates" = no; then
- echo $ac_n "checking for weak attribute""... $ac_c" 1>&6
-echo "configure:1994: checking for weak attribute" >&5
- cat > conftest.$ac_ext <<EOF
-#line 1996 "configure"
-#include "confdefs.h"
-int a_w __attribute__((weak));
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_WEAK_ATTRIBUTE 1
-EOF
- ac_cv_weak_attribute="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_weak_attribute="no"
-fi
-rm -f conftest*
- echo "$ac_t""$ac_cv_weak_attribute" 1>&6
-fi
-
-if test "$ac_cv_static_templates" = yes; then
-echo $ac_n "checking for static array member size bug""... $ac_c" 1>&6
-echo "configure:2021: checking for static array member size bug" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2023 "configure"
-#include "confdefs.h"
-template <class T> struct Class { enum { sz=5 }; static int a[sz]; };
-     template <class T> int Class<T>::a[Class<T>::sz];
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  ac_cv_static_array_bug="no"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_STATIC_ARRAY_BUG 1
-EOF
- ac_cv_static_array_bug="yes"
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_static_array_bug" 1>&6
-fi
-
-echo $ac_n "checking for static data member const initializer bug""... $ac_c" 1>&6
-echo "configure:2048: checking for static data member const initializer bug" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2050 "configure"
-#include "confdefs.h"
-template <class T> struct Class { static const int a = 1; };
-     template <class T> const int Class<T>::a;
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  ac_cv_static_init_bug="no"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_STATIC_CONST_INIT_BUG 1
-EOF
- ac_cv_static_init_bug="yes"
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_static_init_bug" 1>&6
-
-echo $ac_n "checking for namespaces support""... $ac_c" 1>&6
-echo "configure:2074: checking for namespaces support" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2076 "configure"
-#include "confdefs.h"
-class test_class {};
-     namespace std { 
-      using ::test_class;
-      template <class T> struct Class { typedef T my_type; };
-      typedef Class<int>::my_type int_type;
-	}; 
-    inline int ns_foo (std::int_type t) { 
-      using namespace std; 
-      int_type i =2;
-      return i+t; 
-    } 
-     
-int main() {
-(void)ns_foo(1);
-; return 0; }
-EOF
-if { (eval echo configure:2094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  _TEST_STD="std"  _TEST_STD_BEGIN="namespace $_TEST_STD" _TEST_STD_END="namespace $_TEST_STD" ac_cv_namespaces="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_HAS_NO_NAMESPACES 1
-EOF
- _TEST_STD="" _TEST_STD_BEGIN="" _TEST_STD_END="" ac_cv_namespaces="no"
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_namespaces" 1>&6
-
-echo $ac_n "checking for broken "using" directive""... $ac_c" 1>&6
-echo "configure:2110: checking for broken "using" directive" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2112 "configure"
-#include "confdefs.h"
-namespace std { 
-      template <class T> struct Class { typedef T my_type; };
-      typedef Class<int>::my_type int_type;
-      template <class T> void foo(T,int) {}
-      template <class T> void foo(T,int,int) {}
-	}; 
-     using std::Class;
-     using std::foo;
-     
-int main() {
-(void)foo(1,1);
-; return 0; }
-EOF
-if { (eval echo configure:2127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_broken_using="no"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_broken_using="yes"
-fi
-rm -f conftest*
-if test "$ac_cv_broken_using" = no; then
-# check if no warnings have been issued
-  if `check_warning` ; then
-    ac_cv_broken_using=no
-  else
-   cat >> confdefs.h <<\EOF
-#define _STLP_BROKEN_USING_DIRECTIVE 1
-EOF
-
-  fi
-else
-   cat >> confdefs.h <<\EOF
-#define _STLP_BROKEN_USING_DIRECTIVE 1
-EOF
-
-fi
-echo "$ac_t""$ac_cv_broken_using" 1>&6
-
-
-if test "$ac_cv_namespaces" = yes; then
-# Check whether --enable-namespaces or --disable-namespaces was given.
-if test "${enable_namespaces+set}" = set; then
-  enableval="$enable_namespaces"
-  
-case "$enableval" in
-	no) cat >> confdefs.h <<\EOF
-#define _STLP_NO_NAMESPACES 1
-EOF
- 
-            _TEST_STD="" 
-            _TEST_STD_BEGIN=""
-            _TEST_STD_END=""
-            echo "$ac_t""Config arg --disable-namespaces : code not put into namespace by user request" 1>&6;;
-	 *) echo "$ac_t""Config default: code put into namespace" 1>&6
-esac
-
-else
-  echo "$ac_t""Config default: code put into namespace" 1>&6
-
-fi
-
-else
- echo "$ac_t""Compiler restriction : no namespaces support used" 1>&6
-fi
-
-
-echo $ac_n "checking for exceptions support""... $ac_c" 1>&6
-echo "configure:2184: checking for exceptions support" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2186 "configure"
-#include "confdefs.h"
-int ex_foo() { 
-       try { 
-         try { throw(1); } 
-         catch (int a) { throw; } 
-       } catch (...) {;} 
-      return 0;
-    }
-int main() {
-(void)ex_foo();
-; return 0; }
-EOF
-if { (eval echo configure:2199: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_exceptions="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_HAS_NO_EXCEPTIONS 1
-EOF
- ac_cv_exceptions="no"
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_exceptions" 1>&6
-
-if test "$ac_cv_exceptions" = yes; then
-
-echo $ac_n "checking if exceptions specification works""... $ac_c" 1>&6
-echo "configure:2217: checking if exceptions specification works" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2219 "configure"
-#include "confdefs.h"
-template <class T> inline int ex_spec_foo(const T&) throw () { return 0;} 
-int main() {
-(void)ex_spec_foo(5);
-; return 0; }
-EOF
-if { (eval echo configure:2226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_exception_spec="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_NO_EXCEPTION_SPEC 1
-EOF
- ac_cv_exception_spec="no"
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_exception_spec" 1>&6
-
-echo $ac_n "checking if return is required after throw""... $ac_c" 1>&6
-echo "configure:2242: checking if return is required after throw" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2244 "configure"
-#include "confdefs.h"
-int ex_foo() { 
-       try { 
-         try { throw(1); } 
-         catch (int a) { throw; } 
-       } catch (...) {;} 
-      return 0;
-    }
-int main() {
-(void)ex_foo();
-; return 0; }
-EOF
-if { (eval echo configure:2257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_throw_return_bug="no"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_THROW_RETURN_BUG 1
-EOF
- ac_cv_throw_return_bug="yes"
-fi
-rm -f conftest*
-
-    if test "$ac_cv_throw_return_bug" = no; then
-    # check if no warnings have been issued
-     if `check_warning` ; then
-       ac_cv_throw_return_bug="no"
-     else
-       cat >> confdefs.h <<\EOF
-#define _STLP_THROW_RETURN_BUG 1
-EOF
-
-       ac_cv_throw_return_bug="yes"
-     fi
-    fi
-echo "$ac_t""$ac_cv_throw_return_bug" 1>&6
-
-fi
-
-echo $ac_n "checking for native <string> header with basic_string defined ""... $ac_c" 1>&6
-echo "configure:2288: checking for native <string> header with basic_string defined " >&5
-cat > conftest.$ac_ext <<EOF
-#line 2290 "configure"
-#include "confdefs.h"
-
-     #include <string>
-     # if !defined (_STLP_HAS_NO_NAMESPACES)
-       using namespace $_TEST_STD;
-     # endif
-     basic_string<char, char_traits<char>, allocator<char> > bs;
-     string bd = bs;
-    
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-   ac_cv_string_header="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-   cat >> confdefs.h <<\EOF
-#define _STLP_NO_STRING_HEADER 1
-EOF
- ac_cv_string_header="no"
-
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_string_header" 1>&6
-
-if test "$ac_cv_string_header" = yes; then
-echo $ac_n "checking for native <stdexcept> header""... $ac_c" 1>&6
-echo "configure:2322: checking for native <stdexcept> header" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2324 "configure"
-#include "confdefs.h"
-
-     #include <stdexcept>
-     # if !defined (_STLP_HAS_NO_NAMESPACES)
-       using namespace $_TEST_STD;
-     # endif
-     string s;
-     logic_error le(s);
-     runtime_error re(s);
-     domain_error de(s);
-     invalid_argument ia(s);
-     length_error lne(s);
-     out_of_range or(s);
-     range_error rne(s);
-     overflow_error ove(s);
-     underflow_error ue(s);
-    
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_stdexcept_header="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_NO_STDEXCEPT_HEADER 1
-EOF
- ac_cv_stdexcept_header="no"
-
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_stdexcept_header" 1>&6
-
-echo $ac_n "checking for new iostreams""... $ac_c" 1>&6
-echo "configure:2363: checking for new iostreams" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2365 "configure"
-#include "confdefs.h"
-
-     #include <iosfwd>
-     #include <iostream>
-     # if !defined (_STLP_HAS_NO_NAMESPACES)
-       using namespace $_TEST_STD;
-     # endif
-
-     template <class _Tp, class _Traits>
-     void outp(basic_ostream<_Tp,_Traits>& o, char* str) {
-         o<<str; 
-        }
-       
-int main() {
-
-	outp(cout, "Hello World\n")
-    
-; return 0; }
-EOF
-if { (eval echo configure:2385: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_newstreams="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_HAS_NO_NEW_IOSTREAMS 1
-EOF
- ac_cv_newstreams="no"
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_newstreams" 1>&6
-
-
-fi
-
-echo $ac_n "checking for <exception> header with class "exception" defined""... $ac_c" 1>&6
-echo "configure:2404: checking for <exception> header with class "exception" defined" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2406 "configure"
-#include "confdefs.h"
-
-     #include <exception>
-     # if !defined (_STLP_HAS_NO_NAMESPACES)
-       using namespace $_TEST_STD;
-     # endif
-     class my_exception: public $_TEST_STD::exception {};
-     my_exception mm;
-    
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_exception_header="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_NO_EXCEPTION_HEADER 1
-EOF
- ac_cv_exception_header="no"
-
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_exception_header" 1>&6
-
-echo $ac_n "checking builtin constructor bug""... $ac_c" 1>&6
-echo "configure:2437: checking builtin constructor bug" >&5
-if test "$cross_compiling" = yes; then
-   cat >> confdefs.h <<\EOF
-#define _STLP_DEFAULT_CONSTRUCTOR_BUG 1
-EOF
- ac_cv_builtin_c_bug="yes"
-
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2446 "configure"
-#include "confdefs.h"
-#ifdef __cplusplus
-extern "C" void exit(int);
-#endif
-
-# ifdef _STLP_USE_NEW_STYLE_HEADERS
-#  include <cassert>
-#  include <cstdio>
-#  include <cstring>
-#  include <new>
-# else
-#  include <assert.h>
-#  include <stdio.h>
-#  include <string.h>
-#  include <new.h>
-# endif
-int main(int, char**) {
-	int i;
-	double buf[1000];
-	char* pc = (char*)buf;
-	short* ps = (short*)buf;
-	int* pi = (int*)buf;
-	long* pl = (long*)buf;
-	double* pd = (double*)buf;
-	float* pf = (float*)buf;
-	for (i=0; i<100; i++) {
-	   	new(pc) char();
-        	assert(char()==0 && *pc==0);
-		sprintf(pc,"lalala\n");
-	        new (ps) short();	
-		assert(short()==0 && *ps ==0);
-		sprintf(pc,"lalala\n");
-	        new (pi) int();
-		assert(int()==0 && *pi == 0);
-		sprintf(pc,"lalala\n");
-	        new (pl) long();	
-		assert(long()==0 && *pl == 0);
-		sprintf(pc,"lalala\n");
-	        new (pf) float();	
-		assert(float()==0.0 && *pf == 0.0);
-		sprintf(pc,"lalala\n");
-	        new (pd) double();	
-		assert(double()==0.0 && *pd == 0.0);
-		sprintf(pc,"lalala\n");
-	}
-  return 0;
-}
-
-EOF
-if { (eval echo configure:2496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
-   ac_cv_builtin_c_bug="no"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-   cat >> confdefs.h <<\EOF
-#define _STLP_DEFAULT_CONSTRUCTOR_BUG 1
-EOF
- ac_cv_builtin_c_bug="yes"
-fi
-rm -fr conftest*
-fi
-
-echo "$ac_t""$ac_cv_builtin_c_bug" 1>&6
-
-echo $ac_n "checking for trivial constructor bug""... $ac_c" 1>&6
-echo "configure:2514: checking for trivial constructor bug" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2516 "configure"
-#include "confdefs.h"
-struct output_iterator_tag {};
-     void tc_bug_foo(output_iterator_tag) {}
-     inline void tc_test_foo()  { tc_bug_foo(output_iterator_tag()); }
-int main() {
-tc_test_foo();
-; return 0; }
-EOF
-if { (eval echo configure:2525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  ac_cv_tc_bug="no"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_TRIVIAL_CONSTRUCTOR_BUG 1
-EOF
- ac_cv_tc_bug="yes"
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_tc_bug" 1>&6
-
-echo $ac_n "checking for trivial destructor bug""... $ac_c" 1>&6
-echo "configure:2541: checking for trivial destructor bug" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2543 "configure"
-#include "confdefs.h"
-struct output_iterator_tag {output_iterator_tag() {} };
-	output_iterator_tag* td_bug_bar ;
-	
-int main() {
- td_bug_bar->~output_iterator_tag();
-     
-; return 0; }
-EOF
-if { (eval echo configure:2553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  ac_cv_td_bug="no"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_TRIVIAL_DESTRUCTOR_BUG 1
-EOF
- ac_cv_td_bug="yes"
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_td_bug" 1>&6
-
-echo $ac_n "checking for explicit function template arguments""... $ac_c" 1>&6
-echo "configure:2569: checking for explicit function template arguments" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2571 "configure"
-#include "confdefs.h"
-  template <class T> class foo;
-       template<class T> bool operator==(const foo<T>& lhs,const foo<T>& rhs);
-      template <class T> class foo {
-	private:
-	  T bar;
-	friend bool operator== <> (const foo<T>&,const foo<T>&);
-     };
-     template<class T> bool operator==(const foo<T>& lhs,const foo<T>& rhs) {
-	return  lhs.bar==rhs.bar;
-     }
-int main() {
- foo<int> f1, f2;
-      int ret= (f1==f2) 
-; return 0; }
-EOF
-if { (eval echo configure:2588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-   _NULLARGS="<>" ac_cv_expl_fun_args="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-   cat >> confdefs.h <<\EOF
-#define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS 1
-EOF
- ac_cv_expl_fun_args="no" _NULLARGS=""
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_expl_fun_args" 1>&6
-
-echo $ac_n "checking for template parameter baseclass matching""... $ac_c" 1>&6
-echo "configure:2604: checking for template parameter baseclass matching" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2606 "configure"
-#include "confdefs.h"
-struct output_iterator_tag {};
-     struct derived1_tag : public output_iterator_tag {};
-     struct derived2_tag : public derived1_tag {};
-     template<class T> struct output_iterator { 
-	public:
-	output_iterator() {} 
-	~output_iterator() {} 
-	friend inline int operator== $_NULLARGS (const output_iterator<T>&, 
-                                      const output_iterator<T>&);
-	};
-     template<class T> inline int operator==(const output_iterator<T>&, 
-                              	        const output_iterator<T>&) {
-       return 0;
-     }
-     template<class T> inline output_iterator_tag
-     iterator_category(const output_iterator<T>&) {return output_iterator_tag();}
-     template <class T>
-     struct derived_iterator : public output_iterator<T> {
-	public:
-	derived_iterator() {} 
-	~derived_iterator() {}
-	};
-     template<class T> inline T select_foo(T t, output_iterator_tag) { return t;}     
-     template<class T> inline int select_foo_2(T, T,
-                                             output_iterator_tag) { return 0;}     
-     template<class T> inline T tbase_foo(T pm )  { 
-	derived_iterator<T> di1, di2; int i( di1==di2 && pm);
-	return select_foo((int)1,iterator_category(derived_iterator<T>())); 
-    }
-    
-int main() {
- (void)tbase_foo((int)1); 
-; return 0; }
-EOF
-if { (eval echo configure:2642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  ac_cv_base_match="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_BASE_MATCH_BUG 1
-EOF
- ac_cv_base_match="no"
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_base_match" 1>&6
-
-echo $ac_n "checking for non-template parameter baseclass matching ""... $ac_c" 1>&6
-echo "configure:2658: checking for non-template parameter baseclass matching " >&5
-cat > conftest.$ac_ext <<EOF
-#line 2660 "configure"
-#include "confdefs.h"
-struct output_iterator_tag {};
-     struct derived1_tag : public output_iterator_tag {};
-     struct derived2_tag : public derived1_tag {};
-     struct derived3_tag : public derived2_tag {};
-     template<class T> struct output_iterator { 
-	public:
-	output_iterator() {} 
-	~output_iterator() {} 
-	};
-     template<class T> inline output_iterator_tag
-     iterator_category(const output_iterator<T>&) {return output_iterator_tag();}
-     template <class T>
-     struct derived_iterator : public output_iterator<T> {
-	public:
-	derived_iterator() {} 
-	~derived_iterator() {}
-	};
-     template<class T> inline int select_foo_2(T, T,
-                                             output_iterator_tag) { return 0;}     
-     template<class T> inline int select_foo_2(T, T,
-                                             derived1_tag) { return 0;}     
-     template<class T> inline void nont_base_foo(T pm )  { 
-	derived_iterator<T> di1, di2; 
-	(void)select_foo_2(di1, (const derived_iterator<T>&)di2, derived3_tag());
-    }
-    
-int main() {
- nont_base_foo((int)1); 
-; return 0; }
-EOF
-if { (eval echo configure:2692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  ac_cv_nont_base_match="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_NONTEMPL_BASE_MATCH_BUG 1
-EOF
- ac_cv_nont_base_match="no"
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_nont_base_match" 1>&6
-
-echo $ac_n "checking for nested type parameters bug""... $ac_c" 1>&6
-echo "configure:2708: checking for nested type parameters bug" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2710 "configure"
-#include "confdefs.h"
-template<class T> struct nt_o { typedef int ii; inline ii foo(ii);};
-     template <class T> inline nt_o<T>::ii nt_o<T>::foo(ii) { return 0; }
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  ac_cv_nested_type_param_bug="no"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_NESTED_TYPE_PARAM_BUG 1
-EOF
- ac_cv_nested_type_param_bug="yes"
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_nested_type_param_bug" 1>&6
-
-
-echo $ac_n "checking if inherited template typedefs broken completely""... $ac_c" 1>&6
-echo "configure:2735: checking if inherited template typedefs broken completely" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2737 "configure"
-#include "confdefs.h"
-
-template <class Arg1, class Arg2, class Result>
-struct binary_function {
-    typedef Arg1 first_argument_type;
-    typedef Arg2 second_argument_type;
-    typedef Result result_type;
-};     
-
-template <class T>
-struct equal_to : public binary_function<T, T, int> {
-    int operator()(const T& x, const T& y) const { return x == y; }
-};
-
-template <class Predicate> 
-class binary_negate 
-    : public binary_function<$__TYPENAME Predicate::first_argument_type,
-			     $__TYPENAME Predicate::second_argument_type, 
-                             int> {
-protected:
-    Predicate pred;
-public:
-    binary_negate(const Predicate& x = Predicate()) : pred(x) {}
-    int operator() (const $__TYPENAME Predicate::first_argument_type& x, 
-		    const $__TYPENAME Predicate::second_argument_type& y) const {
-	return !pred(x, y); 
-    }
-};
-      typedef equal_to<int> eq_int;
-      typedef binary_negate<equal_to<int> > int_negate;
-      int_negate n;
- 
-int main() {
-
-      (void)n(1,2);
-    
-; return 0; }
-EOF
-if { (eval echo configure:2776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  ac_cv_typebug="no"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_BASE_TYPEDEF_BUG 1
-EOF
- 
-     cat >> confdefs.h <<\EOF
-#define _STLP_BASE_TYPEDEF_OUTSIDE_BUG 1
-EOF
- ac_cv_typebug="yes"
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_typebug" 1>&6
-
-echo $ac_n "checking if inherited typedefs visible from outside""... $ac_c" 1>&6
-echo "configure:2796: checking if inherited typedefs visible from outside" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2798 "configure"
-#include "confdefs.h"
-
-template <class Arg1, class Arg2, class Result>
-struct binary_function {
-    typedef Arg1 first_argument_type;
-    typedef Arg1 second_argument_type;
-    typedef Result result_type;
-};     
-
-
-template <class T>
-class plus : public binary_function<T, T, T> {
-public:
-    plus() {}
-    plus(const T&) {}
-    T operator()(const T& x, const T& y) const { return x + y; };
-};
-
-plus<int> p;
-plus<int>::first_argument_type a;
-
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_outside_typedef="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_BASE_TYPEDEF_OUTSIDE_BUG 1
-EOF
- ac_cv_outside_typedef="no"
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_outside_typedef" 1>&6
-
-# fi
-
-echo $ac_n "checking if private type static members initializable""... $ac_c" 1>&6
-echo "configure:2842: checking if private type static members initializable" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2844 "configure"
-#include "confdefs.h"
-struct p_Class { private: struct str_ { 
-	int a; str_(int i) : a(i) {}}; static str_ my_int; 
-     };
-     p_Class::str_ p_Class::my_int(0); 
-     
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2855: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_private="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_UNINITIALIZABLE_PRIVATE 1
-EOF
- ac_cv_private="no"
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_private" 1>&6
-
-
-echo $ac_n "checking for const member constructor bug""... $ac_c" 1>&6
-echo "configure:2872: checking for const member constructor bug" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2874 "configure"
-#include "confdefs.h"
-
-template <class T1, class T2>
-struct pair {
-    T1 first;
-    T2 second;
-    pair(): first(T1()), second(T2()) {}
-    pair(const pair<T1,T2>& o) : first(o.first), second(o.second) {}
-};
-pair< const int, const int > p;  
-     
-int main() {
-
-; return 0; }
-EOF
-if { (eval echo configure:2890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  ac_cv_const_constructor_bug="no"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_CONST_CONSTRUCTOR_BUG 1
-EOF
- ac_cv_const_constructor_bug="yes"
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_const_constructor_bug" 1>&6
-
-echo $ac_n "checking for loop inline problems""... $ac_c" 1>&6
-echo "configure:2906: checking for loop inline problems" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2908 "configure"
-#include "confdefs.h"
-inline int il_foo (int a) { 
-      int i; for (i=0; i<a; i++) a+=a;  while (i>0) a-=3; return a; }
-int main() {
-(void)il_foo(2);
-; return 0; }
-EOF
-if { (eval echo configure:2916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_inline_problems="no"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_LOOP_INLINE_PROBLEMS 1
-EOF
- ac_cv_inline_problems="yes"
-fi
-rm -f conftest*
-if test "$ac_cv_inline_problems" = no; then
-# check if no warnings have been issued
-  if `check_warning` ; then
-     ac_cv_inline_problems="no"
-  else
-   cat >> confdefs.h <<\EOF
-#define _STLP_LOOP_INLINE_PROBLEMS 1
-EOF
-
-   ac_cv_inline_problems="yes"
-  fi
-fi
-echo "$ac_t""$ac_cv_inline_problems" 1>&6
-
-
-echo $ac_n "checking if arrow operator always get instantiated""... $ac_c" 1>&6
-echo "configure:2945: checking if arrow operator always get instantiated" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2947 "configure"
-#include "confdefs.h"
-
-     template <class T> struct um_foo { T* ptr; 
-	T* operator ->() { return &(operator*());}
-	T  operator *()  { return *ptr; }
-     };
-     template <class T>
-	int operator == ( const um_foo<T>& x, const um_foo<T>& y)
-	{
-    		return *x == *y;
-	}
-     struct um_tag { int a ; };
-     um_foo<um_tag> f;
-     um_foo<int> a;
-     
-int main() {
- 
-     int b(5); a.ptr=&b;
-; return 0; }
-EOF
-if { (eval echo configure:2968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  ac_cv_unused_required="no"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_NO_ARROW_OPERATOR 1
-EOF
- ac_cv_unused_required="yes"
-    
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_unused_required" 1>&6
-
-echo $ac_n "checking for pointer-to-member parameter bug""... $ac_c" 1>&6
-echo "configure:2985: checking for pointer-to-member parameter bug" >&5
-cat > conftest.$ac_ext <<EOF
-#line 2987 "configure"
-#include "confdefs.h"
-
-struct pmf_foo {
-	int bar() { return 0; };
-};
-
-template <class Class, class Result> 
-class mem_fun_t {
-protected:
-    typedef Result (Class::*fun_type)(void);
-    fun_type ptr;
-public:
-    mem_fun_t() {}
-    mem_fun_t(fun_type p) : ptr(p) {}
-    Result operator()(Class* x) const { return (x->*ptr)();}
-};
-
-template <class Class, class Result>
-inline mem_fun_t <Class, Result> 
-mem_fun(Result (Class::*ptr)(void)) {
-    return mem_fun_t<Class, Result>(ptr);
-}
-
-int main() {
-pmf_foo pmf; (void)mem_fun(&pmf_foo::bar)(&pmf)
-; return 0; }
-EOF
-if { (eval echo configure:3015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_pmf_bug="no"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_MEMBER_POINTER_PARAM_BUG 1
-EOF
- ac_cv_pmf_bug="yes"
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_pmf_bug" 1>&6
-
-echo $ac_n "checking if bad_alloc defined in <new>""... $ac_c" 1>&6
-echo "configure:3031: checking if bad_alloc defined in <new>" >&5
-cat > conftest.$ac_ext <<EOF
-#line 3033 "configure"
-#include "confdefs.h"
-
-     #if !defined (_STLP_NO_NEW_STYLE_HEADERS)
-     #include <new>
-     #else
-     #include <new.h>
-     #endif
-
-     # if !defined (_STLP_HAS_NO_NAMESPACES)
-       using namespace $_TEST_STD;
-     # endif
-
-     bad_alloc badalloc_foo() { bad_alloc err; return err;}
-int main() {
-(void)badalloc_foo()
-; return 0; }
-EOF
-if { (eval echo configure:3051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_bad_alloc="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_NO_BAD_ALLOC 1
-EOF
- ac_cv_bad_alloc="no"
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_bad_alloc" 1>&6
-
-echo $ac_n "checking for __type_traits automatic specialization""... $ac_c" 1>&6
-echo "configure:3067: checking for __type_traits automatic specialization" >&5
-cat > conftest.$ac_ext <<EOF
-#line 3069 "configure"
-#include "confdefs.h"
-template <class T> int tt_foo(const T&) {
-	typedef __type_traits<T> traits;
-	return 0;
-     }
-int main() {
-(void)tt_foo(5)
-; return 0; }
-EOF
-if { (eval echo configure:3079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  cat >> confdefs.h <<\EOF
-#define _STLP_AUTOMATIC_TYPE_TRAITS 1
-EOF
- ac_cv_type_traits="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_type_traits="no"
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_type_traits" 1>&6
-
-
-# package options - exceptions
-echo "$ac_t""***" 1>&6
-echo "$ac_t""$0: Setting implementation options..." 1>&6
-echo "$ac_t""***" 1>&6
-
-if test "$ac_cv_exceptions" = yes; then
-# Check whether --enable-exceptions or --disable-exceptions was given.
-if test "${enable_exceptions+set}" = set; then
-  enableval="$enable_exceptions"
-  
-case "$enableval" in
-           no) cat >> confdefs.h <<\EOF
-#define _STLP_NO_EXCEPTIONS 1
-EOF
-
-               echo "$ac_t""Config arg --disable-exceptions : disabling exceptions by user request" 1>&6;;
-           *)  echo "$ac_t""Config default: exceptions enabled" 1>&6
-esac
-
-else
-  echo "$ac_t""Config default: exceptions enabled" 1>&6 
-
-fi
-
-else
- echo "$ac_t""Compiler restriction : no exceptions support used" 1>&6
-fi
-
-if test "$ac_cv_namespaces" = yes; then
-# Check whether --enable-relops or --disable-relops was given.
-if test "${enable_relops+set}" = set; then
-  enableval="$enable_relops"
-  
-case "$enableval" in
-	no) cat >> confdefs.h <<\EOF
-#define _STLP_NO_RELOPS_NAMESPACE 1
-EOF
- 
-            echo "$ac_t""Config arg --disable-relops : no std::rel_ops namespace by user request" 1>&6;;
-	 *) echo "$ac_t""Config default: Separate std::rel_ops namespace for relational operators" 1>&6
-esac
-
-else
-  echo "$ac_t""Config default: Separate std::rel_ops namespace for relational operators" 1>&6
-
-fi
-
-else
- cat >> confdefs.h <<\EOF
-#define _STLP_NO_RELOPS_NAMESPACE 1
-EOF
- 
-fi
-
-if test "$ac_cv_newheaders" = yes; then
-# Check whether --enable-new-style-headers or --disable-new-style-headers was given.
-if test "${enable_new_style_headers+set}" = set; then
-  enableval="$enable_new_style_headers"
-  
-case "$enableval" in
-	no) cat >> confdefs.h <<\EOF
-#define _STLP_NO_NEW_STYLE_HEADERS 1
-EOF
- 
-            echo "$ac_t""Config arg --disable-new-style-headers : not using new-style headers" 1>&6;;
-	 *) echo "$ac_t""Config default: using new-style headers" 1>&6
-esac
-
-else
-  echo "$ac_t""Config default: using new-style headers" 1>&6
-
-fi
-
-else
- cat >> confdefs.h <<\EOF
-#define _STLP_NO_NEW_STYLE_HEADERS 1
-EOF
-
-fi
-
-if test "$ac_cv_newstreams" = yes; then
-# Check whether --enable-new-iostreams or --disable-new-iostreams was given.
-if test "${enable_new_iostreams+set}" = set; then
-  enableval="$enable_new_iostreams"
-  
-case "$enableval" in
-	no) cat >> confdefs.h <<\EOF
-#define _STLP_NO_NEW_IOSTREAMS 1
-EOF
- 
-            echo "$ac_t""Config arg --disable-new-iostreams : not using new iostreams" 1>&6;;
-	 *) echo "$ac_t""Config default: using new iostreams" 1>&6
-esac
-
-else
-  echo "$ac_t""Config default: using new iostreams" 1>&6
-
-fi
-
-else
-  cat >> confdefs.h <<\EOF
-#define _STLP_NO_NEW_IOSTREAMS 1
-EOF
-
-fi
-
-# Check whether --enable-sgi-allocators or --disable-sgi-allocators was given.
-if test "${enable_sgi_allocators+set}" = set; then
-  enableval="$enable_sgi_allocators"
-  
-case "$enableval" in
-	  yes ) echo "$ac_t""Config arg  --enable-sgi-allocators : SGI-style alloc as default allocator" 1>&6 
-                cat >> confdefs.h <<\EOF
-#define _STLP_USE_RAW_SGI_ALLOCATORS 1
-EOF
-;;
-	    * ) echo "$ac_t""Config default: using allocator<T> as default allocator if possible " 1>&6
-esac
-
-else
-  
- echo "$ac_t""Config default: using allocator<T> as default allocator if possible" 1>&6
-
-
-fi
-
-
-# Check whether --enable-malloc or --disable-malloc was given.
-if test "${enable_malloc+set}" = set; then
-  enableval="$enable_malloc"
-  
-case "$enableval" in
-	  yes ) echo "$ac_t""Config arg  --enable-malloc : setting malloc_alloc as default alloc" 1>&6 
-                cat >> confdefs.h <<\EOF
-#define _STLP_USE_MALLOC 1
-EOF
-;;
-	    * ) echo "$ac_t""Config default: not using malloc_alloc as default alloc" 1>&6
-esac
-
-else
-  
- echo "$ac_t""Config default: not using malloc_alloc as default alloc" 1>&6
-
-
-fi
-
-
-# Check whether --enable-newalloc or --disable-newalloc was given.
-if test "${enable_newalloc+set}" = set; then
-  enableval="$enable_newalloc"
-  
-case "$enableval" in
-	  yes ) echo "$ac_t""Config arg  --enable-newalloc : setting new_alloc as default alloc" 1>&6 
-                cat >> confdefs.h <<\EOF
-#define _STLP_USE_NEWALLOC 1
-EOF
-;;
-	    * )
-                echo "$ac_t""Config default: not using new_alloc as default alloc" 1>&6
-esac
-
-else
-  
- echo "$ac_t""Config default: not using new_alloc as default alloc" 1>&6
-
-
-fi
-
-
-# Check whether --enable-defalloc or --disable-defalloc was given.
-if test "${enable_defalloc+set}" = set; then
-  enableval="$enable_defalloc"
-  
-case "$enableval" in
-	  no ) echo "$ac_t""Config arg --disable-defalloc : not including HP-style defalloc.h into alloc.h" 1>&6;;
-
-	  * ) echo "$ac_t""Config default : including HP-style defalloc.h into alloc.h" 1>&6 
-                cat >> confdefs.h <<\EOF
-#define _STLP_USE_DEFALLOC 1
-EOF
-
-esac
-
-else
-  
-          echo "$ac_t""Config default : not including HP-style defalloc.h into alloc.h" 1>&6
-
-
-fi
-
-
-
-# Check whether --enable-debugalloc or --disable-debugalloc was given.
-if test "${enable_debugalloc+set}" = set; then
-  enableval="$enable_debugalloc"
-  
-case "$enableval" in
-	  yes ) echo "$ac_t""Config arg --enable-debugalloc : use debug versions of allocators " 1>&6 
-                cat >> confdefs.h <<\EOF
-#define _STLP_DEBUG_ALLOC 1
-EOF
-;;
-	  * )
-          echo "$ac_t""Config default : not using debug allocators" 1>&6
-esac
-
-else
-  
-          echo "$ac_t""Config default : not using debug allocators" 1>&6
-
-
-fi
-
-
-
-# Check whether --enable-abbrevs or --disable-abbrevs was given.
-if test "${enable_abbrevs+set}" = set; then
-  enableval="$enable_abbrevs"
-  
-case "$enableval" in
-	  yes ) echo "$ac_t""Config arg --enable-abbrevs : using abbreviated class names internally" 1>&6 
-                cat >> confdefs.h <<\EOF
-#define _STLP_USE_ABBREVS 1
-EOF
-;;
-	  * )
-          echo "$ac_t""Config default : not using abbreviated class names internally" 1>&6
-esac
-
-else
-  
-          echo "$ac_t""Config default : not using abbreviated class names internally" 1>&6
-
-
-fi
-
-
-
-cat >> confdefs.h <<\EOF
-#define __AUTO_CONFIGURED 1
-EOF
-
-
-echo "$ac_t""***" 1>&6
-echo "$ac_t""$0: setting up headers..." 1>&6
-echo "$ac_t""***" 1>&6
-trap '' 1 2 15
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-DEFS=-DHAVE_CONFIG_H
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
-  case "\$ac_option" in
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
-    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.12"
-    exit 0 ;;
-  -help | --help | --hel | --he | --h)
-    echo "\$ac_cs_usage"; exit 0 ;;
-  *) echo "\$ac_cs_usage"; exit 1 ;;
-  esac
-done
-
-ac_given_srcdir=$srcdir
-
-trap 'rm -fr `echo "stlconf.h stlconf.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@CXX@%$CXX%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
-  if test $ac_beg -gt 1; then
-    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
-  else
-    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
-  fi
-  if test ! -s conftest.s$ac_file; then
-    ac_more_lines=false
-    rm -f conftest.s$ac_file
-  else
-    if test -z "$ac_sed_cmds"; then
-      ac_sed_cmds="sed -f conftest.s$ac_file"
-    else
-      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
-    fi
-    ac_file=`expr $ac_file + 1`
-    ac_beg=$ac_end
-    ac_end=`expr $ac_end + $ac_max_sed_cmds`
-  fi
-done
-if test -z "$ac_sed_cmds"; then
-  ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"stlconf.h"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
-  esac
-
-  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
-  # Remove last slash and all that follows it.  Not all systems have dirname.
-  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-    # The file is in a subdirectory.
-    test ! -d "$ac_dir" && mkdir "$ac_dir"
-    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
-    # A "../" for each directory in $ac_dir_suffix.
-    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
-  else
-    ac_dir_suffix= ac_dots=
-  fi
-
-  case "$ac_given_srcdir" in
-  .)  srcdir=.
-      if test -z "$ac_dots"; then top_srcdir=.
-      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
-  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
-  *) # Relative path.
-    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
-    top_srcdir="$ac_dots$ac_given_srcdir" ;;
-  esac
-
-
-  echo creating "$ac_file"
-  rm -f "$ac_file"
-  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
-  case "$ac_file" in
-  *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
-  *) ac_comsub= ;;
-  esac
-
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
-# NAME is the cpp macro being defined and VALUE is the value it is being given.
-#
-# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
-ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
-ac_dC='\3'
-ac_dD='%g'
-# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
-ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
-ac_uB='\([ 	]\)%\1#\2define\3'
-ac_uC=' '
-ac_uD='\4%g'
-# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
-ac_eB='$%\1#\2define\3'
-ac_eC=' '
-ac_eD='%g'
-
-if test "${CONFIG_HEADERS+set}" != set; then
-EOF
-cat >> $CONFIG_STATUS <<EOF
-  CONFIG_HEADERS="stlconf.h"
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-fi
-for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
-  esac
-
-  echo creating $ac_file
-
-  rm -f conftest.frag conftest.in conftest.out
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  cat $ac_file_inputs > conftest.in
-
-EOF
-
-# Transform confdefs.h into a sed script conftest.vals that substitutes
-# the proper values into config.h.in to produce config.h.  And first:
-# Protect against being on the right side of a sed subst in config.status.
-# Protect against being in an unquoted here document in config.status.
-rm -f conftest.vals
-cat > conftest.hdr <<\EOF
-s/[\\&%]/\\&/g
-s%[\\$`]%\\&%g
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
-s%ac_d%ac_u%gp
-s%ac_u%ac_e%gp
-EOF
-sed -n -f conftest.hdr confdefs.h > conftest.vals
-rm -f conftest.hdr
-
-# This sed command replaces #undef with comments.  This is necessary, for
-# example, in the case of _POSIX_SOURCE, which is predefined and required
-# on some systems where configure will not decide to define it.
-cat >> conftest.vals <<\EOF
-s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
-EOF
-
-# Break up conftest.vals because some shells have a limit on
-# the size of here documents, and old seds have small limits too.
-
-rm -f conftest.tail
-while :
-do
-  ac_lines=`grep -c . conftest.vals`
-  # grep -c gives empty output for an empty file on some AIX systems.
-  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
-  # Write a limited-size here document to conftest.frag.
-  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
-  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
-  echo 'CEOF
-  sed -f conftest.frag conftest.in > conftest.out
-  rm -f conftest.in
-  mv conftest.out conftest.in
-' >> $CONFIG_STATUS
-  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
-  rm -f conftest.vals
-  mv conftest.tail conftest.vals
-done
-rm -f conftest.vals
-
-cat >> $CONFIG_STATUS <<\EOF
-  rm -f conftest.frag conftest.h
-  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
-  cat conftest.in >> conftest.h
-  rm -f conftest.in
-  if cmp -s $ac_file conftest.h 2>/dev/null; then
-    echo "$ac_file is unchanged"
-    rm -f conftest.h
-  else
-    # Remove last slash and all that follows it.  Not all systems have dirname.
-      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-      # The file is in a subdirectory.
-      test ! -d "$ac_dir" && mkdir "$ac_dir"
-    fi
-    rm -f $ac_file
-    mv conftest.h $ac_file
-  fi
-fi; done
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
-echo "$ac_t""***" 1>&6
-echo "$ac_t""$0: STLport configured for use with \"${CXX}\" compiler" 1>&6
-echo "$ac_t""$0: To restore original settings - run \"./unconfigure\" or copy stlconf.h.in to stlconf.h." 1>&6
-echo "$ac_t""***" 1>&6
-
diff --git a/src/STLport/config/new_compiler/configure.in b/src/STLport/config/new_compiler/configure.in
deleted file mode 100644
index 3b7a5ef..0000000
--- a/src/STLport/config/new_compiler/configure.in
+++ /dev/null
@@ -1,1424 +0,0 @@
-dnl Disable any caching here 
-define([AC_CACHE_LOAD], )dnl
-define([AC_CACHE_SAVE], )dnl
-dnl Process this file with autoconf to produce a configure script.
-AC_INIT(stlconf.h.in)
-AC_CONFIG_HEADER(stlconf.h)
-
-AC_MSG_RESULT(*** $0: STLport configuration utility ***)
-if test "${CXXFLAGS}" = ""; then 
-AC_MSG_RESULT(* Note: for best reliability - try \"CXXFLAGS=-treat_warnings_as_errors\" $0 )
-AC_MSG_RESULT(* Please don't forget specifying typical CXXFLAGS you'll be using - ) 
-AC_MSG_RESULT(* such as that enabling exceptions handling, etc. )
-dnl AC_MSG_RESULT(* Add option forcing instantiation of all templates to CXXFLAGS if possible. )
-fi
-AC_MSG_RESULT(Please stand by while exploring compiler capabilities...)
-AC_MSG_RESULT(Be patient - that may take a while...)
-AC_MSG_RESULT(***)
-
-# utility function
-check_warning () {
-    warn_str=`tail -1 config.log | egrep -i "arning|\(W\)"`
-    if test "$warn_str" = ""; then
-      return 0
-    else
-     return 1
-    fi
-}
-
-dnl Checks for systems
-dnl AC_AIX
-dnl Checks for programs.
-dnl sets CXX
-
-AC_ARG_ENABLE(extension,[--enable-extension=<ext>],
-[
-case "$enableval" in
-	no) AC_MSG_RESULT(Info :.cpp used as extension for tests) 
-	    ac_ext=cpp 
-      	;;
-	 *) AC_MSG_RESULT(Argument : .$enableval used as extension) 
-	ac_ext=$enableval
-esac
-],
-[AC_MSG_RESULT(Info : .cpp used as extension for tests) 
-	ac_ext=cpp
-]
-)
-
-# Save that, as it is being redefined several times 
-use_ac_ext=$ac_ext
-
-AC_PROG_CXX
-ac_ext=$use_ac_ext
-
-AC_LANG_CPLUSPLUS
-ac_ext=$use_ac_ext
-
-AC_CHECK_SIZEOF(int,4)
-ac_ext=$use_ac_ext
-
-if test "$ac_cv_sizeof_int" = "4"; then
-  AC_DEFINE_UNQUOTED(_STLP_UINT32_T,unsigned int)
-else
-  AC_CHECK_SIZEOF(long,4)
-  ac_ext=$use_ac_ext
-  if test "$ac_cv_sizeof_long" = "4"; then
-    AC_DEFINE_UNQUOTED(_STLP_UINT32_T,unsigned long)
-  else
-  dnl ELBRUS ??? ;)
-    AC_CHECK_SIZEOF(short,4)
-    if test "$ac_cv_sizeof_short" = "4"; then
-      AC_DEFINE_UNQUOTED(_STLP_UINT32_T,unsigned short)
-    else
-      AC_MSG_ERROR(Cannot find any 32-bit integer type for your compiler)
-    fi
-  ac_ext=$use_ac_ext
-  fi
-fi
-ac_ext=$use_ac_ext
-
-
-dnl Exclude link stage for cross-compilation
-if test "$ac_cv_c_cross" = "yes"; then
-  CXXFLAGS="${CXXFLAGS} -c"
-fi
-
-ac_ext=$use_ac_ext
-
-dnl checking for compiler capabilities
-AC_MSG_CHECKING(for basic STL compatibility)
-AC_TRY_LINK( [
-template <class Arg1, class Arg2, class Result>
-struct binary_function {
-    typedef Arg1 first_argument_type;
-    typedef Arg2 second_argument_type;
-    typedef Result result_type;
-};      
-template <class T>
-struct plus : public binary_function<T, T, T> {
-    T operator()(const T& x, const T& y) const;
-};
-
-template <class T>
-T plus<T>::operator()(const T& x, const T& y) const { return x + y; }
-plus<int> p;
-],
-[], 
-[ac_cv_compat="yes"],
-[AC_MSG_ERROR(Your compiler won't be able to compile this implementation. Sorry.) 
- ac_cv_compat="no"]
-)
-AC_MSG_RESULT($ac_cv_compat)
-
-AC_MSG_CHECKING(for partial specialization syntax)
-AC_TRY_LINK(
-    [
-     template <class T> class fs_foo {};
-     template <> class fs_foo<int> {};],
-    [ fs_foo<int> i;],
-    [  _FULL_SPEC="template <>" ac_cv_spec_syntax="yes"],
-    [  AC_DEFINE(_STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX) ac_cv_spec_syntax="no" _FULL_SPEC=""])
-AC_MSG_RESULT($ac_cv_spec_syntax)
-
-AC_MSG_CHECKING(for bool keyword)
-AC_TRY_COMPILE(
-    [bool b_foo() { return true; }],
-    [(void)b_foo();],
-    [ac_cv_bool="yes"],
-    [AC_DEFINE(_STLP_NO_BOOL) ac_cv_bool="no"])
-AC_MSG_RESULT($ac_cv_bool)
-if test "$ac_cv_bool" = "no"; then
-  AC_MSG_CHECKING(for yvals.h header)
-  AC_TRY_COMPILE([#include <yvals.h> 
-    extern bool aaa=true;
-   ], [], 
-  [AC_DEFINE(_STLP_YVALS_H) AC_MSG_RESULT(yes) ], 
-  [
-  AC_MSG_RESULT(no)
-  AC_MSG_CHECKING(whether bool is reserved word)
-  AC_TRY_COMPILE(
-    [typedef int bool;],
-    [],
-    [ac_cv_bool_reserved="no"],
-    [AC_DEFINE(_STLP_DONT_USE_BOOL_TYPEDEF) ac_cv_bool_reserved="yes"])
-  AC_MSG_RESULT($ac_cv_bool_reserved)
-  ])
-fi
-
-AC_MSG_CHECKING(for wchar_t type)
-AC_TRY_COMPILE(
-    [ #include <wchar.h>
-      wchar_t wc_foo() { return 'a'; }],
-    [(void)wc_foo();],
-    [ac_cv_wchar="yes"],
-    [AC_DEFINE(_STLP_NO_WCHAR_T) ac_cv_wchar="no"])
-AC_MSG_RESULT($ac_cv_wchar)
-
-AC_MSG_CHECKING(if wchar_t is unsigned short)
-AC_TRY_COMPILE(
-    [
-     # include <wchar.h>
-     template <class T> struct foo {};
-     $_FULL_SPEC struct foo <wchar_t> {};
-     typedef unsigned short u__short;
-     $_FULL_SPEC struct foo <u__short> {};
-     foo<wchar_t> f1;
-     foo<u__short> f2;
-	],
-    [],
-    [ac_cv_wchar_short="no"],
-    [AC_DEFINE(_STLP_WCHAR_T_IS_USHORT) ac_cv_wchar_short="yes"])
-AC_MSG_RESULT($ac_cv_wchar_short)
-
-AC_MSG_CHECKING(for long long type)
-AC_TRY_COMPILE(
-    [long long ll_foo() { return 0; }],
-    [(void)ll_foo();],
-    [AC_DEFINE(_STLP_LONG_LONG) ac_cv_long_long="yes"],
-    [ac_cv_long_long="no"])
-AC_MSG_RESULT($ac_cv_long_long)
-
-AC_MSG_CHECKING(for long double type)
-AC_TRY_COMPILE(
-    [long double ld_foo() { return 0; }],
-    [(void)ld_foo();],
-    [ac_cv_long_double="yes"],
-    [AC_DEFINE(_STLP_NO_LONG_DOUBLE) ac_cv_long_double="no"])
-AC_MSG_RESULT($ac_cv_long_double)
-
-AC_MSG_CHECKING(for typename keyword)
-AC_TRY_LINK(
-    [
-template <class T1, class T2>
-struct pair {
-    typedef T1 first_type;
-    typedef T2 second_type;
-};
-
-template <class Arg, class Result>
-struct unary_function {
-    typedef Arg argument_type;
-    typedef Result result_type;
-};
-
-template <class Pair>
-struct select2nd : public unary_function<Pair, typename Pair::second_type> {
-  typedef typename Pair::first_type ignored_type;
-  const typename Pair::second_type& operator()(const typename Pair::second_type& x,
-						const ignored_type& ) const
-  {
-    return x;
-  }
-  
-};
-    ],
-    [ 
-	typedef pair<int,int> tn_p;
-	select2nd< tn_p > tn_s;
-	(void)tn_s(1,5);
-    ],
-    [__TYPENAME="typename" 
-     ac_cv_typename="yes"],
-    [__TYPENAME="" 
-     AC_DEFINE(_STLP_NEED_TYPENAME)
-     ac_cv_typename="no"])
-AC_MSG_RESULT($ac_cv_typename)
-
-AC_MSG_CHECKING(for explicit keyword)
-AC_TRY_COMPILE(    
-    [struct expl_Class { int a; explicit expl_Class(int t): a(t) {} };
-    expl_Class c(1);
-    ],
-    [],
-    [ac_cv_explicit="yes"],
-    [AC_DEFINE(_STLP_NO_EXPLICIT) ac_cv_explicit="no"])
-AC_MSG_RESULT($ac_cv_explicit)
-
-AC_MSG_CHECKING(for mutable keyword)
-AC_TRY_COMPILE(    
-    [struct mut_Class { mutable int a; void update() const { a=0; }  };
-    mut_Class c;
-    ],
-    [c.update()],
-    [ac_cv_mutable="yes"],
-    [AC_DEFINE(_STLP_NEED_MUTABLE) ac_cv_mutable="no"])
-AC_MSG_RESULT($ac_cv_mutable)
-
-AC_MSG_CHECKING(for new style casts)
-AC_TRY_COMPILE(    
-    [struct ncast_Class { 
-	int a; void update(int* i) { *i=a; }  };
-    ncast_Class c;
-    ],
-    [
-  const int a(5);
-  c.update(const_cast<int*>(&a))
-    ],
-    [ac_cv_new_cast="yes"],
-    [AC_DEFINE(_STLP_NO_NEW_STYLE_CASTS) ac_cv_new_cast="no"])
-AC_MSG_RESULT($ac_cv_new_cast)
-
-AC_MSG_CHECKING(for new-style C library headers)
-AC_TRY_COMPILE(
-    [
-     #include <cctype>
-     #include <cstddef>
-     #include <cstdio>
-     #include <cstdlib>
-     #include <cstring>
-     #include <cassert>
-     #include <climits>
-     #ifndef _STLP_NO_WCHAR_T
-     #include <cwchar>
-     #endif
-       ],
-    [],
-    [ac_cv_newheaders="yes"],
-    [AC_DEFINE(_STLP_HAS_NO_NEW_C_HEADERS) ac_cv_newheaders="no"])
-AC_MSG_RESULT($ac_cv_newheaders)
-
-AC_MSG_CHECKING(for new-style <new> header)
-AC_TRY_COMPILE(
-    [
-     #include <new>
-       ],
-    [],
-    [ac_cv_new_new="yes"],
-    [AC_DEFINE(_STLP_NO_NEW_NEW_HEADER) ac_cv_new_new="no"])
-AC_MSG_RESULT($ac_cv_new_new)
-
-
-AC_MSG_CHECKING(for member template methods)
-AC_TRY_LINK( [
-template <class Result>
-struct mt_foo {
-    typedef Result result_type;
-    template <class Arg> result_type operate(const Arg&) { return Result(); }
-};      
-mt_foo<int> p;
-],
-[
-(void)p.operate((char*)"aaa");
-], 
-[ac_cv_member_templates="yes"],
-[AC_DEFINE(_STLP_NO_MEMBER_TEMPLATES) ac_cv_member_templates="no"]
-)
-AC_MSG_RESULT($ac_cv_member_templates)
-
-AC_MSG_CHECKING(for friend templates)
-AC_TRY_LINK( [
-
-template <class Result2> class foo;
-
-template <class Result>
-struct ft_foo {
-    typedef Result result_type;
-    template <class Result2> friend class foo;
-};      
-ft_foo<int> p;
-],
-[], 
-[ac_cv_friend_templates="yes"],
-[AC_DEFINE(_STLP_NO_FRIEND_TEMPLATES) ac_cv_friend_templates="no"]
-)
-AC_MSG_RESULT($ac_cv_friend_templates)
-
-AC_MSG_CHECKING(for qualified friend templates)
-AC_TRY_LINK( [
-
-${_TEST_STD_BEGIN}
-
-template <class Result2> class foo;
-
-template <class Result>
-struct ft_foo {
-    typedef Result result_type;
-    template <class Result2> friend class $_TEST_STD::foo;
-};      
-ft_foo<int> p;
-${_TEST_STD_END}
-
-],
-[], 
-[ac_cv_qual_friend_templates="yes"],
-[AC_DEFINE(_STLP_NO_QUALIFIED_FRIENDS) ac_cv_qual_friend_templates="no"]
-)
-AC_MSG_RESULT($ac_cv_qual_friend_templates)
-
-AC_MSG_CHECKING(for member template keyword)
-AC_TRY_LINK( [
-template <class Result>
-struct nt_foo {
-    typedef Result result_type;
-    template <class Arg> struct rebind {  typedef nt_foo<Arg> other; };
-};
-
-template <class _Tp, class _Allocator>
-struct _Traits
-{
-  typedef typename _Allocator:: template rebind<_Tp> my_rebind; 
-  typedef typename my_rebind::other allocator_type;
-};
-
-nt_foo<char> p;
-_Traits< int, nt_foo<short> > pp;
-],
-[], 
-[ac_cv_member_template_keyword="yes"],
-[AC_DEFINE(_STLP_NO_MEMBER_TEMPLATE_KEYWORD) ac_cv_member_template_keyword="no"]
-)
-AC_MSG_RESULT($ac_cv_member_template_keyword)
-
-if test "$ac_cv_member_template_keyword" = "no"; then
-AC_MSG_CHECKING(for member template classes)
-AC_TRY_LINK( [
-template <class Result>
-struct nt_foo {
-    typedef Result result_type;
-    template <class Arg> struct rebind {  typedef nt_foo<Arg> other; };
-};
-
-template <class _Tp, class _Allocator>
-struct _Traits
-{
-  typedef typename _Allocator::rebind<_Tp> my_rebind; 
-  typedef typename my_rebind::other allocator_type;
-};
-
-nt_foo<char> p;
-_Traits< int, nt_foo<short> > pp;
-],
-[], 
-[ac_cv_member_template_classes="yes"],
-[AC_DEFINE(_STLP_NO_MEMBER_TEMPLATE_CLASSES) ac_cv_member_template_classes="no"]
-)
-AC_MSG_RESULT($ac_cv_member_template_classes)
-fi
-
-AC_MSG_CHECKING(for partial class specialization)
-AC_TRY_LINK( [
-template <class Arg,class Result>
-struct ps_foo {
-    typedef Arg argument_type;
-    typedef Result result_type;
-};   
-
-template<class Result>
-struct ps_foo<Result*,Result*> {
-	void bar() {}
-};
-
-template<class Result>
-struct ps_foo<int*,Result> {
-	void foo() {}
-};
-
-ps_foo<char*, char*> p;
-ps_foo<int*, int> p1;
-],
-[p.bar();
- p1.foo();], 
-[ac_cv_partial_spec="yes"],
-[AC_DEFINE(_STLP_NO_CLASS_PARTIAL_SPECIALIZATION) ac_cv_partial_spec="no"]
-)
-AC_MSG_RESULT($ac_cv_partial_spec)
-
-if test "$ac_cv_partial_spec" = yes; then
-
-AC_MSG_CHECKING(if explicit args accepted on constructors of partial specialized classes)
-AC_TRY_LINK( [
-template <class Arg,class Result>
-struct ps_foo {
-    typedef Arg argument_type;
-    typedef Result result_type;
-};   
-
-template<class Result>
-struct ps_foo<Result*,Result*> {
-	ps_foo<Result*,Result*>() {}
-	void bar() {}
-};
-
-template<class Result>
-struct ps_foo<int*,Result> {
-	ps_foo<int*,Result*>() {}
-	void bar() {}
-
-};
-
-ps_foo<char*, char*> p;
-ps_foo<int*, int> p1;
-],
-[p.bar();
- p1.foo();], 
-[AC_DEFINE(_STLP_PARTIAL_SPEC_NEEDS_TEMPLATE_ARGS) ac_cv_partial_spec_needs_args="yes"],
-[ac_cv_partial_spec_needs_args="no"]
-)
-AC_MSG_RESULT($ac_cv_partial_spec_needs_args)
-
-fi
-
-if test ac_cv_partial_spec_needs_args=="no"; then
-
-AC_MSG_CHECKING(if explicit args accepted on constructors of explicitly specialized classes)
-AC_TRY_LINK( [
-template <class Arg,class Result>
-struct ps_foo {
-    typedef Arg argument_type;
-    typedef Result result_type;
-    void bar() {}	
-};   
-
-template<class Result>
-struct ps_foo<int*,int> {
-	ps_foo<Result*,Result*>() {}
-	void foo() {}
-};
-
-ps_foo<char*, char*> p;
-ps_foo<int*, int> p1;
-],
-[p.bar();
- p1.foo();], 
-[AC_DEFINE(_STLP_PARTIAL_SPEC_NEEDS_TEMPLATE_ARGS) ac_cv_partial_spec_needs_args="yes"],
-[ac_cv_partial_spec_needs_args="no"]
-)
-AC_MSG_RESULT($ac_cv_partial_spec_needs_args)
-
-fi
-
-AC_MSG_CHECKING(for partial template function ordering)
-AC_TRY_LINK( [
-
-template <class Arg,class Result>
-Result po_foo (const Arg& a,const Result&){ return (Result)a.nothing; }  
-
-template <class T>
-struct A {
-	T a;
-	A(int _a) : a(_a) {}
-};
-
-template<class T>
-T po_foo (const A<T>& a, const A<T>& b){ return a.a; }   
-],
-[
-  A<int> po_a(0); A<int> po_b(1); (void)po_foo(po_b, po_a)
-],
-[ac_cv_partial_ord="yes"],
-[AC_DEFINE(_STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER) ac_cv_partial_ord="no"]
-)
-AC_MSG_RESULT($ac_cv_partial_ord)
-
-AC_MSG_CHECKING(for method specialization)
-AC_TRY_LINK( [
-template <class Arg,class Result>
-struct ms_foo {
-    typedef Arg argument_type;
-    typedef Result result_type;
-    inline void bar();
-};   
-
-template <class Arg,class Result>
-inline void ms_foo<Arg,Result>::bar() {}
-
-inline void ms_foo<int*,int>::bar() {}
-
-ms_foo<char*, char*> p;
-ms_foo<int*, int> p1;
-],
-[p.bar();
- p1.bar();], 
-[ac_cv_method_spec="yes"],
-[AC_DEFINE(_STLP_NO_METHOD_SPECIALIZATION) ac_cv_method_spec="no"]
-)
-AC_MSG_RESULT($ac_cv_method_spec)
-
-AC_MSG_CHECKING(for lrand48 function)
-AC_TRY_LINK(
-    [#include <stdlib.h>],
-    [long i = lrand48();],
-    [AC_DEFINE(_STLP_RAND48) ac_cv_func_lrand48="yes"],
-    [ac_cv_func_lrand48="no"])
-AC_MSG_RESULT($ac_cv_func_lrand48)
-
-
-AC_MSG_CHECKING(for default template parameters)
-AC_TRY_LINK(
-    [template <class T> struct less {}; 
-     template <class T, class T1=less<T> > struct Class { T1 t1; };
-     Class<int> cl;
-     Class<int,less<short> > cl2;
-    ],
-    [],
-    [ac_cv_default_template_param="yes"],
-    [AC_DEFINE(_STLP_LIMITED_DEFAULT_TEMPLATES) ac_cv_default_template_param="no"])
-AC_MSG_RESULT($ac_cv_default_template_param)
-if test "$ac_cv_default_template_param" = "no"; then
-  AC_MSG_CHECKING(for default type parameters)
-  AC_TRY_LINK(
-    [
-template <class T> struct less {
-	typedef int int_t;
-  }; 
-
-template <class T, class T1=less<int> > 
-struct Class { 
-private:
-       int a;
-public:
-       typedef Class<T,T1> self; 
-       typedef $__TYPENAME T1::int_t int_t;
-       self foo (const Class<T,T1>& t) { 
-         if ( t.a==a ) return *this;
-         else return t;
-         } 
-};
-
-Class<int> cl;
-Class<int,less<short> > cl2;
-    ],
-    [],
-    [AC_DEFINE(_STLP_DEFAULT_TYPE_PARAM) ac_cv_default_type_param="yes"],
-    [ac_cv_default_type_param="no"])
-  AC_MSG_RESULT($ac_cv_default_type_param)
-
-fi
-
-dnl let's check if non-type cannot be default
-
-AC_MSG_CHECKING(for default non-type parameters)
-AC_TRY_LINK(
-    [
-template <class T, int N=0 > 
-struct Class { 
-private:
-       T* t;
-       enum { t1=N };
-public:
-       int get_n() { return N; }
-};
-
-Class<int> cl;
-Class<int, 2> cl2;
-    ],
-    [],
-    [ac_cv_default_nontype_param="yes"],
-    [AC_DEFINE(_STLP_NO_DEFAULT_NON_TYPE_PARAM) ac_cv_default_nontype_param="no"]
-	)
-AC_MSG_RESULT($ac_cv_default_nontype_param)
-
-AC_MSG_CHECKING(for non-type parameter bug)
-AC_TRY_LINK(
-    [
-template <class T, int N> 
-struct Class { 
-private:
-       T* t;
-       enum { t1=N };
-public:
-       int get_n() { return N; }
-};
-
-template <class T, int N>
-int operator==(const Class<T,N>& , const Class<T,N>& ) { return 0; }
-
-Class<int, 1> cl;
-Class<int, 1> cl2;
-int i(cl==cl2);
-    ],
-    [],
-    [ac_cv_nontype_param_bug="no"],
-    [AC_DEFINE(_STLP_NON_TYPE_TMPL_PARAM_BUG) ac_cv_nontype_param_bug="yes"]
-	)
-AC_MSG_RESULT($ac_cv_nontype_param_bug)
-
-AC_MSG_CHECKING(for static data member templates)
-AC_TRY_LINK(
-    [template <class T> struct Class { static int a; };
-     template <class T> int Class<T>::a;],
-    [],
-    [ac_cv_static_templates="yes"],
-    [AC_DEFINE(_STLP_NO_STATIC_TEMPLATE_DATA) ac_cv_static_templates="no"])
-AC_MSG_RESULT($ac_cv_static_templates)
-
-if test "$ac_cv_static_templates" = no; then
- AC_MSG_CHECKING(for weak attribute)
- AC_TRY_COMPILE(
-    [int a_w __attribute__((weak));],
-    [],
-    [AC_DEFINE(_STLP_WEAK_ATTRIBUTE) ac_cv_weak_attribute="yes"],
-    [ac_cv_weak_attribute="no"])
- AC_MSG_RESULT($ac_cv_weak_attribute)
-fi
-
-if test "$ac_cv_static_templates" = yes; then
-AC_MSG_CHECKING(for static array member size bug)
-AC_TRY_LINK(
-    [template <class T> struct Class { enum { sz=5 }; static int a[sz]; };
-     template <class T> int Class<T>::a[Class<T>::sz];],
-    [],
-    [ac_cv_static_array_bug="no"],
-    [AC_DEFINE(_STLP_STATIC_ARRAY_BUG) ac_cv_static_array_bug="yes"])
-AC_MSG_RESULT($ac_cv_static_array_bug)
-fi
-
-AC_MSG_CHECKING(for static data member const initializer bug)
-AC_TRY_LINK(
-    [template <class T> struct Class { static const int a = 1; };
-     template <class T> const int Class<T>::a;],
-    [],
-    [ac_cv_static_init_bug="no"],
-    [AC_DEFINE(_STLP_STATIC_CONST_INIT_BUG) ac_cv_static_init_bug="yes"])
-AC_MSG_RESULT($ac_cv_static_init_bug)
-
-AC_MSG_CHECKING(for namespaces support)
-AC_TRY_COMPILE(
-    [class test_class {};
-     namespace std { 
-      using ::test_class;
-      template <class T> struct Class { typedef T my_type; };
-      typedef Class<int>::my_type int_type;
-	}; 
-    inline int ns_foo (std::int_type t) { 
-      using namespace std; 
-      int_type i =2;
-      return i+t; 
-    } 
-     ],
-    [(void)ns_foo(1);],
-    [_TEST_STD="std"  _TEST_STD_BEGIN="namespace $_TEST_STD" _TEST_STD_END="namespace $_TEST_STD" ac_cv_namespaces="yes"],
-    [AC_DEFINE(_STLP_HAS_NO_NAMESPACES) _TEST_STD="" _TEST_STD_BEGIN="" _TEST_STD_END="" ac_cv_namespaces="no"])
-AC_MSG_RESULT($ac_cv_namespaces)
-
-AC_MSG_CHECKING(for broken "using" directive)
-AC_TRY_COMPILE(
-    [namespace std { 
-      template <class T> struct Class { typedef T my_type; };
-      typedef Class<int>::my_type int_type;
-      template <class T> void foo(T,int) {}
-      template <class T> void foo(T,int,int) {}
-	}; 
-     using std::Class;
-     using std::foo;
-     ],
-    [(void)foo(1,1);],
-    [ac_cv_broken_using="no"],
-    [ac_cv_broken_using="yes"])
-if test "$ac_cv_broken_using" = no; then
-# check if no warnings have been issued
-  if `check_warning` ; then
-    ac_cv_broken_using=no
-  else
-   AC_DEFINE(_STLP_BROKEN_USING_DIRECTIVE)
-  fi
-else
-   AC_DEFINE(_STLP_BROKEN_USING_DIRECTIVE)
-fi
-AC_MSG_RESULT($ac_cv_broken_using)
-
-
-if test "$ac_cv_namespaces" = yes; then
-AC_ARG_ENABLE(namespaces,[--enable-namespaces Use namespaces (default if posssible)
---disable-namespaces Don't use namespaces support],
-[
-case "$enableval" in
-	no) AC_DEFINE(_STLP_NO_NAMESPACES) 
-            _TEST_STD="" 
-            _TEST_STD_BEGIN=""
-            _TEST_STD_END=""
-            AC_MSG_RESULT(Config arg --disable-namespaces : code not put into namespace by user request);;
-	 *) AC_MSG_RESULT(Config default: code put into namespace)
-esac
-],
-[AC_MSG_RESULT(Config default: code put into namespace)]
-)
-else
- AC_MSG_RESULT(Compiler restriction : no namespaces support used)
-fi
-
-
-AC_MSG_CHECKING(for exceptions support)
-AC_TRY_COMPILE(
-    [int ex_foo() { 
-       try { 
-         try { throw(1); } 
-         catch (int a) { throw; } 
-       } catch (...) {;} 
-      return 0;
-    }],
-    [(void)ex_foo();],
-    [ac_cv_exceptions="yes"],
-    [AC_DEFINE(_STLP_HAS_NO_EXCEPTIONS) ac_cv_exceptions="no"])
-AC_MSG_RESULT($ac_cv_exceptions)
-
-if test "$ac_cv_exceptions" = yes; then
-
-AC_MSG_CHECKING(if exceptions specification works)
-AC_TRY_COMPILE(
-    [template <class T> inline int ex_spec_foo(const T&) throw () { return 0;} ], 
-    [(void)ex_spec_foo(5);],
-    [ac_cv_exception_spec="yes"],
-    [AC_DEFINE(_STLP_NO_EXCEPTION_SPEC) ac_cv_exception_spec="no"])
-dnl    if test "$ac_cv_exception_spec" = yes; then
-dnl    # check if no warnings have been issued
-dnl     if `check_warning` ; then
-dnl       AC_DEFINE(_STLP_EXCEPTION_SPEC)
-dnl     else
-dnl      ac_cv_exception_spec=no
-dnl      fi
-dnl    fi
-AC_MSG_RESULT($ac_cv_exception_spec)
-
-AC_MSG_CHECKING(if return is required after throw)
-AC_TRY_COMPILE(
-    [int ex_foo() { 
-       try { 
-         try { throw(1); } 
-         catch (int a) { throw; } 
-       } catch (...) {;} 
-      return 0;
-    }],
-    [(void)ex_foo();],
-    [ac_cv_throw_return_bug="no"],
-    [AC_DEFINE(_STLP_THROW_RETURN_BUG) ac_cv_throw_return_bug="yes"])
-
-    if test "$ac_cv_throw_return_bug" = no; then
-    # check if no warnings have been issued
-     if `check_warning` ; then
-       ac_cv_throw_return_bug="no"
-     else
-       AC_DEFINE(_STLP_THROW_RETURN_BUG)
-       ac_cv_throw_return_bug="yes"
-     fi
-    fi
-AC_MSG_RESULT($ac_cv_throw_return_bug)
-
-fi
-
-AC_MSG_CHECKING(for native <string> header with basic_string defined )
-AC_TRY_COMPILE(
-    [
-     #include <string>
-     # if !defined (_STLP_HAS_NO_NAMESPACES)
-       using namespace $_TEST_STD;
-     # endif
-     basic_string<char, char_traits<char>, allocator<char> > bs;
-     string bd = bs;
-    ],
-    [],
-    [ ac_cv_string_header="yes"],
-    [ AC_DEFINE(_STLP_NO_STRING_HEADER) ac_cv_string_header="no"]
-)
-AC_MSG_RESULT($ac_cv_string_header)
-
-dnl there could be no correct stdexcept/iostream  without string
-if test "$ac_cv_string_header" = yes; then
-AC_MSG_CHECKING(for native <stdexcept> header)
-AC_TRY_COMPILE(
-    [
-     #include <stdexcept>
-     # if !defined (_STLP_HAS_NO_NAMESPACES)
-       using namespace $_TEST_STD;
-     # endif
-     string s;
-     logic_error le(s);
-     runtime_error re(s);
-     domain_error de(s);
-     invalid_argument ia(s);
-     length_error lne(s);
-     out_of_range or(s);
-     range_error rne(s);
-     overflow_error ove(s);
-     underflow_error ue(s);
-    ],
-    [],
-    [ac_cv_stdexcept_header="yes"],
-    [AC_DEFINE(_STLP_NO_STDEXCEPT_HEADER) ac_cv_stdexcept_header="no"]
-)
-AC_MSG_RESULT($ac_cv_stdexcept_header)
-
-AC_MSG_CHECKING(for new iostreams)
-AC_TRY_COMPILE(
-    [
-     #include <iosfwd>
-     #include <iostream>
-     # if !defined (_STLP_HAS_NO_NAMESPACES)
-       using namespace $_TEST_STD;
-     # endif
-
-     template <class _Tp, class _Traits>
-     void outp(basic_ostream<_Tp,_Traits>& o, char* str) {
-         o<<str; 
-        }
-       ],
-    [
-	outp(cout, "Hello World\n")
-    ],
-    [ac_cv_newstreams="yes"],
-    [AC_DEFINE(_STLP_HAS_NO_NEW_IOSTREAMS) ac_cv_newstreams="no"])
-AC_MSG_RESULT($ac_cv_newstreams)
-
-dnl end namespace-related tests
-
-fi
-
-AC_MSG_CHECKING(for <exception> header with class "exception" defined)
-AC_TRY_COMPILE(
-    [
-     #include <exception>
-     # if !defined (_STLP_HAS_NO_NAMESPACES)
-       using namespace $_TEST_STD;
-     # endif
-     class my_exception: public $_TEST_STD::exception {};
-     my_exception mm;
-    ],
-    [],
-    [ac_cv_exception_header="yes"],
-    [AC_DEFINE(_STLP_NO_EXCEPTION_HEADER) ac_cv_exception_header="no"]
-)
-AC_MSG_RESULT($ac_cv_exception_header)
-
-AC_MSG_CHECKING(builtin constructor bug)
-AC_TRY_RUN( [
-# ifdef _STLP_USE_NEW_STYLE_HEADERS
-#  include <cassert>
-#  include <cstdio>
-#  include <cstring>
-#  include <new>
-# else
-#  include <assert.h>
-#  include <stdio.h>
-#  include <string.h>
-#  include <new.h>
-# endif
-int main(int, char**) {
-	int i;
-	double buf[1000];
-	char* pc = (char*)buf;
-	short* ps = (short*)buf;
-	int* pi = (int*)buf;
-	long* pl = (long*)buf;
-	double* pd = (double*)buf;
-	float* pf = (float*)buf;
-	for (i=0; i<100; i++) {
-	   	new(pc) char();
-        	assert(char()==0 && *pc==0);
-		sprintf(pc,"lalala\n");
-	        new (ps) short();	
-		assert(short()==0 && *ps ==0);
-		sprintf(pc,"lalala\n");
-	        new (pi) int();
-		assert(int()==0 && *pi == 0);
-		sprintf(pc,"lalala\n");
-	        new (pl) long();	
-		assert(long()==0 && *pl == 0);
-		sprintf(pc,"lalala\n");
-	        new (pf) float();	
-		assert(float()==0.0 && *pf == 0.0);
-		sprintf(pc,"lalala\n");
-	        new (pd) double();	
-		assert(double()==0.0 && *pd == 0.0);
-		sprintf(pc,"lalala\n");
-	}
-  return 0;
-}
-], 
-[ ac_cv_builtin_c_bug="no"],
-[ AC_DEFINE(_STLP_DEFAULT_CONSTRUCTOR_BUG) ac_cv_builtin_c_bug="yes"],
-[ AC_DEFINE(_STLP_DEFAULT_CONSTRUCTOR_BUG) ac_cv_builtin_c_bug="yes"]
-)
-AC_MSG_RESULT($ac_cv_builtin_c_bug)
-
-AC_MSG_CHECKING(for trivial constructor bug)
-AC_TRY_LINK(
-    [struct output_iterator_tag {};
-     void tc_bug_foo(output_iterator_tag) {}
-     inline void tc_test_foo()  { tc_bug_foo(output_iterator_tag()); }],
-    [tc_test_foo();],
-    [ac_cv_tc_bug="no"],
-    [AC_DEFINE(_STLP_TRIVIAL_CONSTRUCTOR_BUG) ac_cv_tc_bug="yes"])
-AC_MSG_RESULT($ac_cv_tc_bug)
-
-AC_MSG_CHECKING(for trivial destructor bug)
-AC_TRY_LINK(
-    [struct output_iterator_tag {output_iterator_tag() {} };
-	output_iterator_tag* td_bug_bar ;
-	],
-    [ td_bug_bar->~output_iterator_tag();
-     ],
-    [ac_cv_td_bug="no"],
-    [AC_DEFINE(_STLP_TRIVIAL_DESTRUCTOR_BUG) ac_cv_td_bug="yes"])
-AC_MSG_RESULT($ac_cv_td_bug)
-
-AC_MSG_CHECKING(for explicit function template arguments)
-AC_TRY_LINK(
-    [  template <class T> class foo;
-       template<class T> bool operator==(const foo<T>& lhs,const foo<T>& rhs);
-      template <class T> class foo {
-	private:
-	  T bar;
-	friend bool operator== <> (const foo<T>&,const foo<T>&);
-     };
-     template<class T> bool operator==(const foo<T>& lhs,const foo<T>& rhs) {
-	return  lhs.bar==rhs.bar;
-     }],
-    [ foo<int> f1, f2;
-      int ret= (f1==f2) ],
-    [ _NULLARGS="<>" ac_cv_expl_fun_args="yes"],
-    [ AC_DEFINE(_STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS) ac_cv_expl_fun_args="no" _NULLARGS=""])
-AC_MSG_RESULT($ac_cv_expl_fun_args)
-
-AC_MSG_CHECKING(for template parameter baseclass matching)
-AC_TRY_LINK(
-    [struct output_iterator_tag {};
-     struct derived1_tag : public output_iterator_tag {};
-     struct derived2_tag : public derived1_tag {};
-     template<class T> struct output_iterator { 
-	public:
-	output_iterator() {} 
-	~output_iterator() {} 
-	friend inline int operator== $_NULLARGS (const output_iterator<T>&, 
-                                      const output_iterator<T>&);
-	};
-     template<class T> inline int operator==(const output_iterator<T>&, 
-                              	        const output_iterator<T>&) {
-       return 0;
-     }
-     template<class T> inline output_iterator_tag
-     iterator_category(const output_iterator<T>&) {return output_iterator_tag();}
-     template <class T>
-     struct derived_iterator : public output_iterator<T> {
-	public:
-	derived_iterator() {} 
-	~derived_iterator() {}
-	};
-     template<class T> inline T select_foo(T t, output_iterator_tag) { return t;}     
-     template<class T> inline int select_foo_2(T, T,
-                                             output_iterator_tag) { return 0;}     
-     template<class T> inline T tbase_foo(T pm )  { 
-	derived_iterator<T> di1, di2; int i( di1==di2 && pm);
-	return select_foo((int)1,iterator_category(derived_iterator<T>())); 
-    }
-    ],
-    [ (void)tbase_foo((int)1); ],
-    [ac_cv_base_match="yes"],
-    [AC_DEFINE(_STLP_BASE_MATCH_BUG) ac_cv_base_match="no"])
-AC_MSG_RESULT($ac_cv_base_match)
-
-AC_MSG_CHECKING(for non-template parameter baseclass matching )
-AC_TRY_LINK(
-    [struct output_iterator_tag {};
-     struct derived1_tag : public output_iterator_tag {};
-     struct derived2_tag : public derived1_tag {};
-     struct derived3_tag : public derived2_tag {};
-     template<class T> struct output_iterator { 
-	public:
-	output_iterator() {} 
-	~output_iterator() {} 
-	};
-     template<class T> inline output_iterator_tag
-     iterator_category(const output_iterator<T>&) {return output_iterator_tag();}
-     template <class T>
-     struct derived_iterator : public output_iterator<T> {
-	public:
-	derived_iterator() {} 
-	~derived_iterator() {}
-	};
-     template<class T> inline int select_foo_2(T, T,
-                                             output_iterator_tag) { return 0;}     
-     template<class T> inline int select_foo_2(T, T,
-                                             derived1_tag) { return 0;}     
-     template<class T> inline void nont_base_foo(T pm )  { 
-	derived_iterator<T> di1, di2; 
-	(void)select_foo_2(di1, (const derived_iterator<T>&)di2, derived3_tag());
-    }
-    ],
-    [ nont_base_foo((int)1); ],
-    [ac_cv_nont_base_match="yes"],
-    [AC_DEFINE(_STLP_NONTEMPL_BASE_MATCH_BUG) ac_cv_nont_base_match="no"])
-AC_MSG_RESULT($ac_cv_nont_base_match)
-
-AC_MSG_CHECKING(for nested type parameters bug)
-AC_TRY_LINK(
-    [template<class T> struct nt_o { typedef int ii; inline ii foo(ii);};
-     template <class T> inline nt_o<T>::ii nt_o<T>::foo(ii) { return 0; }],
-    [],
-    [ac_cv_nested_type_param_bug="no"],
-    [AC_DEFINE(_STLP_NESTED_TYPE_PARAM_BUG) ac_cv_nested_type_param_bug="yes"])
-AC_MSG_RESULT($ac_cv_nested_type_param_bug)
-
-
-AC_MSG_CHECKING(if inherited template typedefs broken completely)
-AC_TRY_LINK(
-    [
-template <class Arg1, class Arg2, class Result>
-struct binary_function {
-    typedef Arg1 first_argument_type;
-    typedef Arg2 second_argument_type;
-    typedef Result result_type;
-};     
-
-template <class T>
-struct equal_to : public binary_function<T, T, int> {
-    int operator()(const T& x, const T& y) const { return x == y; }
-};
-
-template <class Predicate> 
-class binary_negate 
-    : public binary_function<$__TYPENAME Predicate::first_argument_type,
-			     $__TYPENAME Predicate::second_argument_type, 
-                             int> {
-protected:
-    Predicate pred;
-public:
-    binary_negate(const Predicate& x = Predicate()) : pred(x) {}
-    int operator() (const $__TYPENAME Predicate::first_argument_type& x, 
-		    const $__TYPENAME Predicate::second_argument_type& y) const {
-	return !pred(x, y); 
-    }
-};
-      typedef equal_to<int> eq_int;
-      typedef binary_negate<equal_to<int> > int_negate;
-      int_negate n;
- ],
-    [
-      (void)n(1,2);
-    ],
-    [ac_cv_typebug="no"],
-    [AC_DEFINE(_STLP_BASE_TYPEDEF_BUG) 
-     AC_DEFINE(_STLP_BASE_TYPEDEF_OUTSIDE_BUG) ac_cv_typebug="yes"])
-AC_MSG_RESULT($ac_cv_typebug)
-
-AC_MSG_CHECKING(if inherited typedefs visible from outside)
-AC_TRY_COMPILE(
-    [
-template <class Arg1, class Arg2, class Result>
-struct binary_function {
-    typedef Arg1 first_argument_type;
-    typedef Arg1 second_argument_type;
-    typedef Result result_type;
-};     
-
-
-template <class T>
-class plus : public binary_function<T, T, T> {
-public:
-    plus() {}
-    plus(const T&) {}
-    T operator()(const T& x, const T& y) const { return x + y; };
-};
-
-plus<int> p;
-plus<int>::first_argument_type a;
-],
-    [],
-    [ac_cv_outside_typedef="yes"],
-    [AC_DEFINE(_STLP_BASE_TYPEDEF_OUTSIDE_BUG) ac_cv_outside_typedef="no"])
-AC_MSG_RESULT($ac_cv_outside_typedef)
-
-# fi
-
-AC_MSG_CHECKING(if private type static members initializable)
-AC_TRY_COMPILE(
-    [struct p_Class { private: struct str_ { 
-	int a; str_(int i) : a(i) {}}; static str_ my_int; 
-     };
-     p_Class::str_ p_Class::my_int(0); 
-     ],
-    [],
-    [ac_cv_private="yes"],
-    [AC_DEFINE(_STLP_UNINITIALIZABLE_PRIVATE) ac_cv_private="no"])
-AC_MSG_RESULT($ac_cv_private)
-
-
-AC_MSG_CHECKING(for const member constructor bug)
-AC_TRY_LINK([
-template <class T1, class T2>
-struct pair {
-    T1 first;
-    T2 second;
-    pair(): first(T1()), second(T2()) {}
-    pair(const pair<T1,T2>& o) : first(o.first), second(o.second) {}
-};
-pair< const int, const int > p;  
-     ],
-    [],
-    [ac_cv_const_constructor_bug="no"],
-    [AC_DEFINE(_STLP_CONST_CONSTRUCTOR_BUG) ac_cv_const_constructor_bug="yes"])
-AC_MSG_RESULT($ac_cv_const_constructor_bug)
-
-AC_MSG_CHECKING(for loop inline problems)
-AC_TRY_COMPILE(
-    [inline int il_foo (int a) { 
-      int i; for (i=0; i<a; i++) a+=a;  while (i>0) a-=3; return a; }],
-    [(void)il_foo(2);],
-    [ac_cv_inline_problems="no"],
-    [AC_DEFINE(_STLP_LOOP_INLINE_PROBLEMS) ac_cv_inline_problems="yes"])
-if test "$ac_cv_inline_problems" = no; then
-# check if no warnings have been issued
-  if `check_warning` ; then
-     ac_cv_inline_problems="no"
-  else
-   AC_DEFINE(_STLP_LOOP_INLINE_PROBLEMS)
-   ac_cv_inline_problems="yes"
-  fi
-fi
-AC_MSG_RESULT($ac_cv_inline_problems)
-
-
-AC_MSG_CHECKING(if arrow operator always get instantiated)
-AC_TRY_LINK(
-    [
-     template <class T> struct um_foo { T* ptr; 
-	T* operator ->() { return &(operator*());}
-	T  operator *()  { return *ptr; }
-     };
-     template <class T>
-	int operator == ( const um_foo<T>& x, const um_foo<T>& y)
-	{
-    		return *x == *y;
-	}
-     struct um_tag { int a ; };
-     um_foo<um_tag> f;
-     um_foo<int> a;
-     ],
-    [ 
-     int b(5); a.ptr=&b;],
-    [ac_cv_unused_required="no"],
-    [AC_DEFINE(_STPL_NO_ARROW_OPERATOR) ac_cv_unused_required="yes"]
-    )
-AC_MSG_RESULT($ac_cv_unused_required)
-
-AC_MSG_CHECKING(for pointer-to-member parameter bug)
-AC_TRY_COMPILE(
-    [
-struct pmf_foo {
-	int bar() { return 0; };
-};
-
-template <class Class, class Result> 
-class mem_fun_t {
-protected:
-    typedef Result (Class::*fun_type)(void);
-    fun_type ptr;
-public:
-    mem_fun_t() {}
-    mem_fun_t(fun_type p) : ptr(p) {}
-    Result operator()(Class* x) const { return (x->*ptr)();}
-};
-
-template <class Class, class Result>
-inline mem_fun_t <Class, Result> 
-mem_fun(Result (Class::*ptr)(void)) {
-    return mem_fun_t<Class, Result>(ptr);
-}
-],
-    [pmf_foo pmf; (void)mem_fun(&pmf_foo::bar)(&pmf)],
-    [ac_cv_pmf_bug="no"],
-    [AC_DEFINE( _STLP_MEMBER_POINTER_PARAM_BUG) ac_cv_pmf_bug="yes"])
-AC_MSG_RESULT($ac_cv_pmf_bug)
-
-AC_MSG_CHECKING(if bad_alloc defined in <new>)
-AC_TRY_COMPILE(
-    [
-     #if !defined (_STLP_NO_NEW_STYLE_HEADERS)
-     #include <new>
-     #else
-     #include <new.h>
-     #endif
-
-     # if !defined (_STLP_HAS_NO_NAMESPACES)
-       using namespace $_TEST_STD;
-     # endif
-
-     bad_alloc badalloc_foo() { bad_alloc err; return err;}],
-    [(void)badalloc_foo()],
-    [ac_cv_bad_alloc="yes"],
-    [AC_DEFINE(_STLP_NO_BAD_ALLOC) ac_cv_bad_alloc="no"])
-AC_MSG_RESULT($ac_cv_bad_alloc)
-
-AC_MSG_CHECKING(for __type_traits automatic specialization)
-AC_TRY_LINK(
-    [template <class T> int tt_foo(const T&) {
-	typedef __type_traits<T> traits;
-	return 0;
-     }],
-    [(void)tt_foo(5)],
-    [AC_DEFINE(_STLP_AUTOMATIC_TYPE_TRAITS) ac_cv_type_traits="yes"],
-    [ac_cv_type_traits="no"])
-AC_MSG_RESULT($ac_cv_type_traits)
-
-
-# package options - exceptions
-AC_MSG_RESULT(***)
-AC_MSG_RESULT($0: Setting implementation options...)
-AC_MSG_RESULT(***)
-
-if test "$ac_cv_exceptions" = yes; then
-AC_ARG_ENABLE(exceptions,[--enable-exceptions Use exceptions support (default if posssible)
- --disable-exceptions Don't use exceptions support],
-[
-case "$enableval" in
-           no) AC_DEFINE(_STLP_NO_EXCEPTIONS)
-               AC_MSG_RESULT(Config arg --disable-exceptions : disabling exceptions by user request);;
-           *)  AC_MSG_RESULT(Config default: exceptions enabled)
-esac
-],
-[AC_MSG_RESULT(Config default: exceptions enabled) ]
-)
-else
- AC_MSG_RESULT(Compiler restriction : no exceptions support used)
-fi
-
-if test "$ac_cv_namespaces" = yes; then
-AC_ARG_ENABLE(relops,[--enable-relops Separate rel_ops namespace for relational operators (default if posssible)
---disable-relops No separate rel_ops namespace for relational operators],
-[
-case "$enableval" in
-	no) AC_DEFINE(_STLP_NO_RELOPS_NAMESPACE) 
-            AC_MSG_RESULT(Config arg --disable-relops : no std::rel_ops namespace by user request);;
-	 *) AC_MSG_RESULT(Config default: Separate std::rel_ops namespace for relational operators)
-esac
-],
-[AC_MSG_RESULT(Config default: Separate std::rel_ops namespace for relational operators)]
-)
-else
- AC_DEFINE(_STLP_NO_RELOPS_NAMESPACE) 
-fi
-
-if test "$ac_cv_newheaders" = yes; then
-AC_ARG_ENABLE(new-style-headers,[--enable-new-style-headers Use new-style headers (default)
---disable-new-style-headers Don't use new-style headers],
-[
-case "$enableval" in
-	no) AC_DEFINE(_STLP_NO_NEW_STYLE_HEADERS) 
-            AC_MSG_RESULT(Config arg --disable-new-style-headers : not using new-style headers);;
-	 *) AC_MSG_RESULT(Config default: using new-style headers)
-esac
-],
-[AC_MSG_RESULT(Config default: using new-style headers)]
-)
-else
- AC_DEFINE(_STLP_NO_NEW_STYLE_HEADERS)
-fi
-
-if test "$ac_cv_newstreams" = yes; then
-AC_ARG_ENABLE(new-iostreams,[--enable-new-iostreams Use new iostreams (default)
---disable-new-iostreams Don't use new iostreams],
-[
-case "$enableval" in
-	no) AC_DEFINE(_STLP_NO_NEW_IOSTREAMS) 
-            AC_MSG_RESULT(Config arg --disable-new-iostreams : not using new iostreams);;
-	 *) AC_MSG_RESULT(Config default: using new iostreams)
-esac
-],
-[AC_MSG_RESULT(Config default: using new iostreams)]
-)
-else
-  AC_DEFINE(_STLP_NO_NEW_IOSTREAMS)
-fi
-
-AC_ARG_ENABLE(sgi-allocators,[--enable-sgi-allocators : set default parameter to SGI-style default alloc, not allocator<T>
- --disable-sgi-allocators : use allocator<T> if possible],
-[
-case "$enableval" in
-	  yes ) AC_MSG_RESULT(Config arg  --enable-sgi-allocators : SGI-style alloc as default allocator) 
-                AC_DEFINE(_STLP_USE_RAW_SGI_ALLOCATORS);;
-	    * ) AC_MSG_RESULT(Config default: using allocator<T> as default allocator if possible )
-esac
-],
-[
- AC_MSG_RESULT(Config default: using allocator<T> as default allocator if possible)
-]
-)
-
-AC_ARG_ENABLE(malloc,[--enable-malloc : set default alloc to malloc-based allocator ( malloc_alloc_template<instance_no>, alloc.h )
---disable-malloc : choose (default) sgi node allocator (__alloc<threads,no>  alloc.h )],
-[
-case "$enableval" in
-	  yes ) AC_MSG_RESULT(Config arg  --enable-malloc : setting malloc_alloc as default alloc) 
-                AC_DEFINE(_STLP_USE_MALLOC);;
-	    * ) AC_MSG_RESULT(Config default: not using malloc_alloc as default alloc)
-esac
-],
-[
- AC_MSG_RESULT(Config default: not using malloc_alloc as default alloc)
-]
-)
-
-AC_ARG_ENABLE(newalloc,[--enable-newalloc : set default alloc to new-based allocator ( new_alloc, alloc.h )
---disable-newalloc : choose (default) sgi allocator (__alloc<threads,no>  alloc.h )],
-[
-case "$enableval" in
-	  yes ) AC_MSG_RESULT(Config arg  --enable-newalloc : setting new_alloc as default alloc) 
-                AC_DEFINE(_STLP_USE_NEWALLOC);;
-	    * )
-                AC_MSG_RESULT(Config default: not using new_alloc as default alloc)
-esac
-],
-[
- AC_MSG_RESULT(Config default: not using new_alloc as default alloc)
-]
-)
-
-AC_ARG_ENABLE(defalloc,[--enable-defalloc : make HP-style defalloc.h included in alloc.h )
---disable-defalloc : leave defalloc.h alone],
-[
-case "$enableval" in
-	  no ) AC_MSG_RESULT(Config arg --disable-defalloc : not including HP-style defalloc.h into alloc.h);;
-
-	  * ) AC_MSG_RESULT(Config default : including HP-style defalloc.h into alloc.h) 
-                AC_DEFINE(_STLP_USE_DEFALLOC)
-esac
-],
-[
-          AC_MSG_RESULT(Config default : not including HP-style defalloc.h into alloc.h)
-]
-)
-
-
-AC_ARG_ENABLE(debugalloc,[--enable-debugalloc : use debug versions of allocators
---disable-debugalloc : not using debug allocators],
-[
-case "$enableval" in
-	  yes ) AC_MSG_RESULT(Config arg --enable-debugalloc : use debug versions of allocators ) 
-                AC_DEFINE(_STLP_DEBUG_ALLOC);;
-	  * )
-          AC_MSG_RESULT(Config default : not using debug allocators)
-esac
-],
-[
-          AC_MSG_RESULT(Config default : not using debug allocators)
-]
-)
-
-
-AC_ARG_ENABLE(abbrevs,[--enable-abbrevs : use abbreviated class names internally for linker benefit (don't affect interface)
---disable-abbrevs : don't use abbreviated names],
-[
-case "$enableval" in
-	  yes ) AC_MSG_RESULT(Config arg --enable-abbrevs : using abbreviated class names internally) 
-                AC_DEFINE(_STLP_USE_ABBREVS);;
-	  * )
-          AC_MSG_RESULT(Config default : not using abbreviated class names internally)
-esac
-],
-[
-          AC_MSG_RESULT(Config default : not using abbreviated class names internally)
-]
-)
-
-
-AC_DEFINE(__AUTO_CONFIGURED)
-
-AC_MSG_RESULT(***)
-AC_MSG_RESULT($0: setting up headers...)
-AC_MSG_RESULT(***)
-AC_OUTPUT(stlconf.h)
-AC_MSG_RESULT(***)
-AC_MSG_RESULT($0: STLport configured for use with \"${CXX}\" compiler, CXXFLAGS used: \"${CXXFLAGS}\".)
-AC_MSG_RESULT($0: To restore original settings - run \"./unconfigure\" or copy stlconf.h.in to stlconf.h.)
-AC_MSG_RESULT(***)
-
diff --git a/src/STLport/config/new_compiler/stlconf.h.in b/src/STLport/config/new_compiler/stlconf.h.in
deleted file mode 100644
index de7e9ed..0000000
--- a/src/STLport/config/new_compiler/stlconf.h.in
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_STLCONF_H
-# define _STLP_STLCONF_H
-
-# undef __AUTO_CONFIGURED
-
-//==========================================================
-// Getting proper values of autoconf flags
-// if you ran 'configure', __AUTO_CONFIGURED is set to 1 and
-// specific compiler features will be used.
-// Otherwise, the <stlcomp.h> header will be included for per-version
-// features recognition.
-//==========================================================
-# if defined (__AUTO_CONFIGURED)
-// auto-configured section
-
-# undef _STLP_NO_EXCEPTIONS
-# undef _STLP_NO_NAMESPACES
-# undef _STLP_NO_RELOPS_NAMESPACE
-# undef _STLP_NO_NEW_NEW_HEADER 
-
-# undef _STLP_NO_NEW_IOSTREAMS
-
-// select threads strategy
-# undef _PTHREADS
-# undef _NOTHREADS
-
-// select SGI-style alloc instead of allocator<T>
-# undef _STLP_USE_SGI_ALLOCATORS
-
-// select allocation method you like
-# undef _STLP_USE_MALLOC
-# undef _STLP_USE_NEWALLOC
-
-// this one is not mandatory, just enabled
-# undef _STLP_USE_DEFALLOC
-
-// define _STLP_USE_ABBREVS if your linker has trouble with long 
-// external symbols
-# undef _STLP_USE_ABBREVS
-
-
-// unsigned 32-bit integer type
-#  define _STLP_UINT32_T unsigned
-#  undef _STLP_NO_BOOL
-#  undef _STLP_DONT_USE_BOOL_TYPEDEF
-#  undef _STLP_YVALS_H
-#  undef _STLP_LIMITED_DEFAULT_TEMPLATES
-#  undef _STLP_DEFAULT_TYPE_PARAM
-#  undef _STLP_NO_STATIC_TEMPLATE_DATA
-#  undef _STLP_RAND48
-#  undef _STLP_LOOP_INLINE_PROBLEMS
-
-#  undef _STLP_HAS_NO_NAMESPACES
-
-#  undef _STLP_NEED_TYPENAME
-#  undef _STLP_NEED_EXPLICIT
-#  undef _STLP_HAS_NO_EXCEPTIONS
-#  undef _STLP_NO_EXCEPTION_SPEC
-#  undef _STLP_WEAK_ATTRIBUTE
-#  undef _STLP_BASE_MATCH_BUG
-#  undef _STLP_NONTEMPL_BASE_MATCH_BUG
-#  undef _STLP_NESTED_TYPE_PARAM_BUG
-#  undef _STLP_NO_ARROW_OPERATOR
-#  undef _STLP_UNINITIALIZABLE_PRIVATE
-#  undef _STLP_BASE_TYPEDEF_BUG
-#  undef _STLP_BASE_TYPEDEF_OUTSIDE_BUG
-#  undef _STLP_CONST_CONSTRUCTOR_BUG
-
-#  undef _STLP_NO_NEW_STYLE_CASTS
-#  undef _STLP_NO_WCHAR_T
-#  undef _STLP_WCHAR_T_IS_USHORT
-#  undef _STLP_LONG_LONG
-#  undef _STLP_NO_LONG_DOUBLE
-#  undef _STLP_NEED_MUTABLE
-#  undef _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX
-#  undef _STLP_NO_BAD_ALLOC
-#  undef _STLP_DEBUG_ALLOC
-#  undef _STLP_NO_MEMBER_TEMPLATES
-#  undef _STLP_NO_MEMBER_TEMPLATE_CLASSES
-#  undef _STLP_NO_MEMBER_TEMPLATE_KEYWORD
-#  undef _STLP_NO_FRIEND_TEMPLATES
-#  undef _STLP_NO_QUALIFIED_FRIENDS
-#  undef _STLP_NO_CLASS_PARTIAL_SPECIALIZATION
-#  undef _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER
-#  undef _STLP_AUTOMATIC_TYPE_TRAITS
-#  undef _STLP_MEMBER_POINTER_PARAM_BUG
-#  undef _STLP_NON_TYPE_TMPL_PARAM_BUG
-#  undef _STLP_NO_DEFAULT_NON_TYPE_PARAM
-#  undef _STLP_NO_METHOD_SPECIALIZATION
-#  undef _STLP_STATIC_ARRAY_BUG
-#  undef _STLP_STATIC_CONST_INIT_BUG
-#  undef _STLP_TRIVIAL_CONSTRUCTOR_BUG
-#  undef _STLP_TRIVIAL_DESTRUCTOR_BUG
-#  undef _STLP_BROKEN_USING_DIRECTIVE
-#  undef _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS
-#  undef _STLP_NO_EXCEPTION_HEADER
-#  undef _STLP_DEFAULT_CONSTRUCTOR_BUG
-
-#  undef _STLP_HAS_NO_NEW_IOSTREAMS
-#  undef _STLP_HAS_NO_NEW_C_HEADERS 
-#  undef _STLP_STATIC_CONST_INIT_BUG
-// new ones
-#  undef _STLP_THROW_RETURN_BUG
-// unimp
-#  undef _STLP_LINK_TIME_INSTANTIATION
-#  undef _STLP_PARTIAL_SPEC_NEEDS_TEMPLATE_ARGS
-// unimp
-#  undef _STLP_NO_TEMPLATE_CONVERSIONS
-# endif /* AUTO_CONFIGURED */
-
-//==========================================================
-
-
-#endif /* __STLCONF_H */
-
diff --git a/src/STLport/config/new_compiler/unconfigure b/src/STLport/config/new_compiler/unconfigure
deleted file mode 100644
index c91da28..0000000
--- a/src/STLport/config/new_compiler/unconfigure
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-cp stlconf.h.in stlconf.h
-echo "STLport unconfigured."
diff --git a/src/STLport/config/stl_apcc.h b/src/STLport/config/stl_apcc.h
deleted file mode 100644
index b979092..0000000
--- a/src/STLport/config/stl_apcc.h
+++ /dev/null
@@ -1,32 +0,0 @@
-// STLport config file for Apogee 4.x
-
-#  define _STLP_NO_NEW_NEW_HEADER 1
-#  define _STLP_HAS_NO_NEW_IOSTREAMS 1
-#  define _STLP_HAS_NO_NEW_C_HEADERS 1
-
-#if defined(_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 >= 4)
-# define _STLP_RAND48 1
-#endif
-// #  define _STLP_RAND48 1
-#  define _STLP_LONG_LONG long long
-#  define _STLP_NO_BAD_ALLOC 1
-#  define _STLP_NO_MEMBER_TEMPLATE_KEYWORD 1
-#  define _STLP_NON_TYPE_TMPL_PARAM_BUG 1
-// #  define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS 1
-#  define _STLP_NO_EXCEPTION_HEADER 1
-
-# undef  _STLP_LINK_TIME_INSTANTIATION
-# define _STLP_LINK_TIME_INSTANTIATION 1
-
-# ifdef __STDLIB
-#  undef _STLP_HAS_NO_NEW_IOSTREAMS
-#  undef _STLP_NO_NEW_C_HEADERS
-#  undef _STLP_NO_NEW_NEW_HEADER
-#  undef _STLP_NO_BAD_ALLOC
-#  undef _STLP_LONG_LONG
-# else
-#  undef  _STLP_NO_EXCEPTION_SPEC
-#  define _STLP_NO_EXCEPTION_SPEC 1
-# endif
-
-
diff --git a/src/STLport/config/stl_apple.h b/src/STLport/config/stl_apple.h
deleted file mode 100644
index eb7da79..0000000
--- a/src/STLport/config/stl_apple.h
+++ /dev/null
@@ -1,112 +0,0 @@
-// STLport configuration file
-// It is internal STLport header - DO NOT include it directly
-
-// common configuration settings for Apple MPW MrCpp / SCpp
-
-#if defined(__MRC__) && __MRC__ < 0x500
-# error Apple's MPW MrCpp v.5.0.0 or better compiler required
-#endif
-#if defined(__SC__) && __SC__ < 0x890
-# error Apple's MPW SCpp v.8.9.0 or better compiler required
-#endif
-
-#ifdef qMacApp
-# ifndef __CONDITIONALMACROS__ // skip including ConditionalMacros_AC.h if ConditionalMacros.h is already included
-# include <CoreSwitches_AC.h>
-# include <ConditionalMacros_AC.h>
-# include <Types_AC.h>
-# define _STLP_FILE__ _FILE_AC
-# define _STLP_DEBUG_MESSAGE      
-# define __stl_debug_message ProgramBreak_AC
-# include <ConditionalMacros.h>
-# endif
-# include <Types.h>
-#else
-# include <ConditionalMacros.h>
-# include <Types.h>
-#endif
-
-#define _STLP_UINT32_T UInt32
-typedef int wint_t;
-
-#ifndef TYPE_BOOL
-# error <ConditionalMacros.h> must be included. (TYPE_BOOL)
-#endif
-#if !TYPE_BOOL
-# define _STLP_NO_BOOL
-# define _STLP_DONT_USE_BOOL_TYPEDEF
-#endif
-
-#ifndef TYPE_LONGLONG
-# error <ConditionalMacros.h> must be included. (TYPE_LONGLONG)
-#endif
-#if TYPE_LONGLONG
-# define _STLP_LONG_LONG long long
-#endif
-
-#if !__option(exceptions)
-# define _STLP_HAS_NO_EXCEPTIONS
-#endif
-
-#define _STLP_DEBUG_MESSAGE_POST DebugStr("\pSTL diagnosis issued. See 'stderr' for detail.");
-#define _STLP_ASSERT_MSG_TRAILER " "
-
-#ifdef _STLP_DEBUG
-#   define _STLP_THROW(x) (DebugStr("\pSTL is about to throw exception: "#x),throw x)
-#endif
-
-#if defined(__MRC__)
-# ifndef __spillargs
-#  define __spillargs 1 // MrCpp requires this symbol to be defined as 1 to properly handle va_start; ref.[ file stdarg.h; line 26 ]
-# endif
-#endif
-
-#if defined(__SC__)
-#define _STLP_VENDOR_LONG_DOUBLE_MATH				//*TY 12/03/2000 - SCpp's native math type is long double
-#endif
-
-#ifndef _STLP_NATIVE_INCLUDE_PATH
-# if __option(unix_includes)
-#  define _STLP_NATIVE_INCLUDE_PATH ../CIncludes 	// expects the alias to {CIncludes} under the same folder as {STL}
-# else
-#  define _STLP_NATIVE_INCLUDE_PATH ::CIncludes 	// expects the alias to {CIncludes} under the same folder as {STL}
-# endif
-#endif
-#if !defined(_STLP_MAKE_HEADER)
-# if !__option(unix_includes)
-#  define _STLP_MAKE_HEADER(path, header) <path:header> // Mac uses ":" for directory delimiter
-# endif
-#endif
-
-# define _STLD _DBG	// to keep the length of generated symbols within the compiler limitation
-
-#define _STLP_OWN_IOSTREAMS
-#define _STLP_USE_STDIO_IO 1						//*TY 02/24/2000 - see also ; ref.[ file _fstream.h; line 36 ]
-#define _STLP_NO_THREADS							//*TY 12/17/2000 - multi-thread capability not explored, yet.
-#undef _REENTRANT									//*ty 11/24/2001 - to make sure no thread facility is activated
-#define _NOTHREADS									//*ty 12/07/2001 - 
-
-// native library limitations
-#define _STLP_VENDOR_GLOBAL_STD						// mpw's c++ libs do not utilize namespace std yet
-#define _STLP_NO_BAD_ALLOC							// known limitation
-#define _STLP_HAS_NO_NEW_C_HEADERS					// known limitation
-#define _STLP_NO_NEW_NEW_HEADER						// known limitation
-#define _STLP_HAS_NO_NEW_IOSTREAMS					// known limitation
-#define _STLP_NO_NATIVE_MBSTATE_T					// known limitation
-#define _STLP_NO_NATIVE_WIDE_FUNCTIONS				// known limitation
-#define _STLP_NO_NATIVE_WIDE_STREAMS				// known limitation
-#define _STLP_INCOMPLETE_EXCEPTION_HEADER			// known limitation
-#define _STLP_BROKEN_EXCEPTION_CLASS				// known limitation
-
-// compiler limitations
-# define _STLP_DONT_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS
-
-# define _STLP_MPWFIX_TRY try{											//*TY 06/01/2000 - exception handling bug workaround
-# define _STLP_MPWFIX_CATCH }catch(...){throw;}							//*TY 06/01/2000 - exception handling bug workaround
-# define _STLP_MPWFIX_CATCH_ACTION(action) }catch(...){action;throw;}	//*TY 06/01/2000 - exception handling bug workaround
-# define _STLP_THROW_RETURN_BUG						// known limitation 
-# define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION		// known limitation
-# define _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX		// known limitation
-# define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER		// known limitation
-# define _STLP_NO_RELOPS_NAMESPACE					// known limitation
-// end of stl_apple.h
diff --git a/src/STLport/config/stl_as400.h b/src/STLport/config/stl_as400.h
deleted file mode 100644
index c9595c2..0000000
--- a/src/STLport/config/stl_as400.h
+++ /dev/null
@@ -1,60 +0,0 @@
-// STLport configuration file
-// It is internal STLport header - DO NOT include it directly
-
-// AS/400 C++ config
-
-# ifdef _REENTRANT
-#  define _PTHREADS
-# endif
-
-#  define _STLP_NO_NEW_NEW_HEADER 1
-
-#  define _STLP_NO_BOOL
-#  define _STLP_LIMITED_DEFAULT_TEMPLATES
-
-#  define _STLP_HAS_NO_NAMESPACES
-#  define _STLP_NEED_TYPENAME
-#  define _STLP_NEED_EXPLICIT
-#  define _STLP_HAS_NO_EXCEPTIONS
-#  define _STLP_NO_EXCEPTION_SPEC
-#  define _STLP_NO_ARROW_OPERATOR
-#  define _STLP_NO_NEW_STYLE_CASTS
-
-#  define _STLP_NEED_MUTABLE
-#  define _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX
-#  define _STLP_NO_BAD_ALLOC
-#  define _STLP_NO_MEMBER_TEMPLATES
-#  define _STLP_NO_MEMBER_TEMPLATE_CLASSES
-#  define _STLP_NO_MEMBER_TEMPLATE_KEYWORD
-#  define _STLP_NO_FRIEND_TEMPLATES
-#  define _STLP_NO_QUALIFIED_FRIENDS
-#  define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION
-#  define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER
-
-#  define _STLP_NO_METHOD_SPECIALIZATION
-#  define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS
-
-// #  define _STLP_NO_EXCEPTION_HEADER
-
-#  define _STLP_HAS_NO_NEW_IOSTREAMS
-#  define _STLP_HAS_NO_NEW_C_HEADERS 
-
-#  define _STLP_STATIC_CONST_INIT_BUG
-#  define _STLP_THROW_RETURN_BUG
-#  define _STLP_LINK_TIME_INSTANTIATION
-#  define _STLP_NO_TEMPLATE_CONVERSIONS
-
-#  define _STLP_UNINITIALIZABLE_PRIVATE 1
-#  define _STLP_STATIC_ARRAY_BUG 1
-#  define _STLP_NON_TYPE_TMPL_PARAM_BUG 1
-#  define _STLP_TRIVIAL_DESTRUCTOR_BUG  1
-
-#  if defined(_LONG_LONG)
-#    define _STLP_LONG_LONG long long
-#  endif
-// #  define _STLP_LONG_DOUBLE 1
-#  if defined(_PTHREADS)
-#    define _MULTI_THREADED
-#  endif
-// fbp : to fix __partition() problem
-# define _STLP_NONTEMPL_BASE_MATCH_BUG 1
diff --git a/src/STLport/config/stl_bc.h b/src/STLport/config/stl_bc.h
deleted file mode 100644
index 95e7a00..0000000
--- a/src/STLport/config/stl_bc.h
+++ /dev/null
@@ -1,204 +0,0 @@
-// STLport configuration file
-// It is internal STLport header - DO NOT include it directly
-
-
-// versions ?
-# if defined(_STLP_DESIGNATED_DLL)
-#   define _STLP_CALL __cdecl __export
-# elif defined(_RTLDLL)
-#   define  _STLP_CALL __cdecl __import
-# else
-#   define  _STLP_CALL __cdecl
-# endif
-
-# define _USE_STLP
-# define _STLP_USE_OWN_MBSTATE_T
-// # define _STLP_USE_OWN_NAMESPACE
-# define _STLP_DLLEXPORT_NEEDS_PREDECLARATION
-# define _STLP_OPERATOR_SPEC_NEEDS_TEMPLATE_ARGS
-
-// most of <exception> contents is still in global namespace
-// # define _STLP_VENDOR_UNEXPECTED_STD
-
-// <limits> problem
-# define _STLP_STATIC_CONST_INIT_BUG
-
-// <bitset> problems
-# define _STLP_MEMBER_SPECIALIZATION_BUG
-# define  _STLP_HAS_SPECIFIC_PROLOG_EPILOG 1
-
-#if ( __BORLANDC__ < 0x540 )
-// Borland C++ Builder 3 (?)
-// those are assumptions, if some of them actually work, please let me know
-// #  define _STLP_STATIC_CONST_INIT_BUG 1
-// #  define _STLP_THROW_RETURN_BUG 1
-#  define _STLP_NO_TEMPLATE_CONVERSIONS 1
-#  define _STLP_DEFAULT_CONSTRUCTOR_BUG 1
-#  define _STLP_NO_TYPENAME_ON_RETURN_TYPE
-#else
-#  define _STLP_LONG_LONG  __int64
-#endif
-
-// BCB 2 or less (Borland 5.02)
-#if ( __BORLANDC__ < 0x530 )
-
-#  define _STLP_NO_OWN_IOSTREAMS
-#  undef  _STLP_OWN_IOSTREAMS
-
-#  define _STLP_GLOBAL_VENDOR_CSTD 1
-#  define _STLP_HAS_NO_NEW_IOSTREAMS 1
-#  define _STLP_HAS_NO_NEW_C_HEADERS 1
-
-#  define _STLP_NO_MEMBER_TEMPLATES 1
-#  define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1
-#  define _STLP_NO_MEMBER_TEMPLATE_KEYWORD 1
-#  define _STLP_NO_FRIEND_TEMPLATES 1
-#  define _STLP_NO_QUALIFIED_FRIENDS 1
-#  define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1
-#  define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER 1
-#  define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS 1
-
-#  define _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX 1
-
-#  define _STLP_NO_DEFAULT_NON_TYPE_PARAM 1
-#  define _STLP_NON_TYPE_TMPL_PARAM_BUG 1
-#  define _STLP_MEMBER_SPECIALIZATION_BUG
-#  define _STLP_NO_EXCEPTION_HEADER 1
-#  define _STLP_NO_EXCEPTION_SPEC 1
-
-#  define _STLP_NO_BAD_ALLOC 1
-#  define _STLP_NO_ARROW_OPERATOR 1
-
-typedef char    mbstate_t;
-
-#  define _STLP_LIMITED_DEFAULT_TEMPLATES 1
-#  define _STLP_NO_TYPEINFO
-#  define _STLP_NO_METHOD_SPECIALIZATION
-
-#endif
-
-// Borland 5.0x
-#if ( __BORLANDC__ < 0x520 )
-
-#  define _STLP_BROKEN_USING_DIRECTIVE 1
-#  define _STLP_EXPORT_KEYWORD _export
-#  define _STLP_IMPORT_KEYWORD _import
-#  define _STLP_EXPORT_TEMPLATE_KEYWORD _export
-#  define _STLP_IMPORT_TEMPLATE_KEYWORD _import
-#endif
-
-#if ( __BORLANDC__ < 0x501 )
-#   define  _STLP_NONTEMPL_BASE_MATCH_BUG 1
-#   define  _STLP_NO_WCHAR_T 1
-#endif
-
-// 4.x
-#if ( __BORLANDC__ < 0x500 )
-#   define _STLP_NESTED_TYPE_PARAM_BUG 1
-#   define _STLP_STATIC_ARRAY_BUG 1
-#   define _STLP_NO_BOOL 1
-#   define _STLP_HAS_NO_NAMESPACES 1
-#   define _STLP_NEED_TYPENAME 1
-#   define _STLP_NEED_EXPLICIT 1
-#   define _STLP_NEED_MUTABLE 1
-#   define _STLP_NO_WCHAR_T 1
-#endif
-
-// auto enable thread safety and exceptions:
-#   ifndef _CPPUNWIND
-#     define _STLP_HAS_NO_EXCEPTIONS
-#   endif
-
-#   if defined ( __MT__ ) && !defined (_NOTHREADS) && !defined (_REENTRANT)
-#     define _REENTRANT 1
-#   endif
-
-#  if defined ( __DEBUG ) && ( __DEBUG > 1 )
-#   define _STLP_DEBUG
-#  endif
-
-#  define _STLP_LIB_BASENAME "stlp"
-
-# if (__BORLANDC__ < 0x540)
-
-#  define _STLP_EXPORT_DECLSPEC __declspec(dllexport)
-#  define _STLP_IMPORT_DECLSPEC __declspec(dllimport)
-#  define _STLP_IMPORT_TEMPLATE_KEYWORD  extern
-#  define _STLP_EXPORT_TEMPLATE_KEYWORD
-
-#  define _STLP_CLASS_EXPORT_DECLSPEC __declspec(dllexport)
-#  define _STLP_CLASS_IMPORT_DECLSPEC __declspec(dllimport)
-
-#   if !defined (_STLP_NO_OWN_IOSTREAMS)
-
-#    if ( defined (__DLL) || defined (_DLL) || defined (_WINDLL) || defined (_RTLDLL) \
-     || defined (_STLP_USE_DYNAMIC_LIB) ) \
-       && ! defined (_STLP_USE_STATIC_LIB)
-#      undef  _STLP_USE_DECLSPEC
-#      define _STLP_USE_DECLSPEC
-#     endif
-#   endif
-
-# else
-
-# define _STLP_EXPORT_DECLSPEC __declspec(dllexport)
-# define _STLP_IMPORT_DECLSPEC __declspec(dllimport)
-
-# define _STLP_CLASS_EXPORT_DECLSPEC __declspec(dllexport)
-# define _STLP_CLASS_IMPORT_DECLSPEC __declspec(dllimport)
-
-#  if !defined (_STLP_NO_OWN_IOSTREAMS)
-
-#    if ( defined (__DLL) || defined (_DLL) || defined (_WINDLL) || defined (_RTLDLL) \
-     || defined(_AFXDLL) || defined (_STLP_USE_DYNAMIC_LIB) )
-#      undef  _STLP_USE_DECLSPEC
-#      define _STLP_USE_DECLSPEC 1
-#    endif
-
-#  ifndef _STLP_IMPORT_TEMPLATE_KEYWORD
-#   define _STLP_IMPORT_TEMPLATE_KEYWORD __declspec(dllimport)
-#  endif
-#  define _STLP_EXPORT_TEMPLATE_KEYWORD __declspec(dllexport)
-
-# if (__BORLANDC__ >= 0x560) && ! defined (_STLP_OWN_IOSTREAMS)
-// #  define _STLP_IS_NATIVE_LIB
-#  define _STLP_NATIVE_INCLUDE_PATH ../include/oldstl
-#  define _STLP_NATIVE_CPP_C_INCLUDE_PATH ../include/oldstl
-#  define _STLP_NATIVE_C_INCLUDE_PATH ../include/oldstl
-#  define _STLP_NATIVE_CPP_RUNTIME_PATH ../include/oldstl
-# endif
-
-# ifndef __BUILDING_STLPORT
-#  ifdef _STLP_DEBUG
-#   ifdef _MT
-#    ifdef _RTLDLL
-#      pragma comment(lib,"stlpmt_stldebug45.lib")
-#    else
-#     pragma comment(lib,"stlpmt_stldebugst.lib")
-#    endif
-#   else
-#    ifdef _RTLDLL
-#      pragma comment(lib,"stlp_stldebug45.lib")
-#    else
-#     pragma comment(lib,"stlp_stldebugst.lib")
-#    endif
-#   endif
-#  else
-#   ifdef _MT
-#    ifdef _RTLDLL
-#      pragma comment(lib,"stlpmt45.lib")
-#    else
-#     pragma comment(lib,"stlpmtst.lib")
-#    endif
-#  else
-#    ifdef _RTLDLL
-#      pragma comment(lib,"stlp45.lib")
-#    else
-#     pragma comment(lib,"stlpst.lib")
-#    endif
-#   endif
-#  endif
-# endif
-
-#  endif /* _STLP_OWN_IOSTREAMS */
-# endif
diff --git a/src/STLport/config/stl_como.h b/src/STLport/config/stl_como.h
deleted file mode 100644
index f2d7d83..0000000
--- a/src/STLport/config/stl_como.h
+++ /dev/null
@@ -1,209 +0,0 @@
-
-// STLport configuration file
-// It is internal STLport header - DO NOT include it directly
-
-
-# define _STLP_UINT32_T unsigned int
-
-# define _STLP_HAS_NO_NEW_C_HEADERS
-// # define _STLP_VENDOR_GLOBAL_EXCEPT_STD
-// # define _STLP_LONG_LONG
-
-
-//
-// ADDITIONS FOR COMEAU C++, made by Comeau Computing.
-// We can be reached through comeau at comeaucomputing.com
-// You shouldn't need to change anything below here for Comeau C++.
-// If you do, please tell us at comeau at comeaucomputing.com
-//
-// Changes made here, AND THROUGH ALL FILES, based upon the __COMO__ macro
-// (and SIMILAR NAMES INVOLVING COMO).... no doubt some of this will
-// change as SGI integrates the changes into their code base since
-// some changes are not really Comeau C++ specific, but required to
-// make the SGI code compliant with Standard C++).
-//
-// Testing was done with Comeau C++ 4.2.44 and 4.2.45.2.  Changes were made for
-// both Comeau relaxed mode and Comeau strict mode, especially for end user code
-// (that is, some of the .cxx files cannot compile in strict mode, because they
-// contain extensions to Standard C++, however their object code forms can
-// be used once compiled in relaxed mode, even if the end user code uses
-// strict mode).
-//
-// These changes may also work for some earlier versions of Comeau C++,
-// though we have not tested them.
-//
-// Actual mods made under RedHat 6.1 LINUX, should be ok with SuSE too and
-// other LINUX's, and older Caldera LINUX, Solaris/SPARC, SunOS, SCO UNIX,
-// and NetBSD. Other platforms may be added.  Comeau will also perform
-// custom ports for you.
-//
-// Check libcomo details at http://www.comeaucomputing.com/libcomo and
-// http://www.comeaucomputing.com
-//
-// History of Comeau changes (this is rough, as work was often going on in parallel):
-// BETA1 July 14, 2000, Initial port for RedHat 6.1 INTEL/ELF
-// BETA2 Aug   4, 2000, Stronger RedHat support
-//                      Support for Comeau strict mode for end user code
-// BETA3 Aug  22, 2000, Support for other LINUX/INTEL/ELF's, including older ones
-// BETA4 Sept  2, 2000, Initial support for SCO UNIX + other UNIX x86 SVR3's
-//                      Stronger support for end user Comeau strict mode
-// BETA5 Oct   5, 2000, Initial support for Solaris/SPARC
-//                      More SCO support (though still incomplete)
-// BETA6 Feb   5, 2001, Minor mods to accomodate Comeau C++ 4.2.45.1
-// BETA7 Mar  13, 2001, Verified with Comeau C++ 4.2.45.2
-//                      Minor NetBSD support
-// BETA8 Apr   1. 2001, Initial support for SunOS/SPARC
-// BETA9 Apr   7, 2001, Stronger SCO support + other UNIX x86 SVR3's
-//                      Mods for an fpos_t problem for some LINUXes
-//                      Mods since Destroy did not work in strict mode
-// BETA10 Apr  12. 2001, Stronger NetBSD support
-//
-// PLANNED:
-// BETAx TBA  TBA, 2001, NetBSD, UNIXWARE, and Windows support expected
-//
-
-
-#ifdef __linux__
-
-#   define _STLP_NO_NATIVE_MBSTATE_T      1
-#   define _STLP_NO_NATIVE_WIDE_FUNCTIONS 1
-#   define _STLP_NO_NATIVE_WIDE_STREAMS   1
-#   define _STLP_NO_LONG_DOUBLE   1
-
-// Comeau C++ under LINUX/INTEL/ELF
-// Preprocess away "long long" routines for now, even in relaxed mode
-# define __wcstoull_internal_defined	1
-# define __wcstoll_internal_defined	1
-
-#endif /* __COMO__ under __linux__ */
-
-#ifdef __USING_x86SVR3x_WITH_COMO /* SCO et al */
-/* UNIX 386+ SVR3 mods made with __USING_x86SVR3x_WITH_COMO
-   in other sources, not here */
-#    define atan2l atan2
-#    define cosl cos
-#    define sinl sin
-#    define sqrtl sqrt
-#    include <math.h>
-     inline long double expl(long double arg) { return exp(arg); }
-     inline long double logl(long double arg) { return log(arg); }
-#    define log10l log10
-
-#    define sinhl sinh
-#    define coshl cosh
-#    define fabsl fabs
-namespace std {
- inline int min(int a, int b) { return a>b ? b : a; }
-}
-#endif
-
-#ifdef sun
-// Comeau C++ under Solaris/SPARC or SunOS
-
-#ifdef solarissparc
-#define __USING_SOLARIS_SPARC_WITH_COMO /* show this in the source when grep'ing for COMO */
-// Note comowchar.h for Solaris/SPARC wchar stuff
-
-#include <math.h>
-#    define sinf sin
-#    define sinl sin
-#    define sinhf sinh
-#    define sinhl sinh
-#    define cosf cos
-#    define cosl cos
-#    define coshf cosh
-#    define coshl cosh
-#    define atan2l atan2
-#    define atan2f atan2
-     inline float logf(float arg) { return log(arg); }
-     inline long double logl(long double arg) { return log(arg); }
-#    define log10f log10
-#    define log10l log10
-#    define expf exp
-     inline long double expl(long double arg) { return exp(arg); }
-#    define sqrtf sqrt
-#    define sqrtl sqrt
-#    define fabsf fabs
-#    define fabsl fabs
-#else
-#define __USING_SUNOS_WITH_COMO
-
-#define __unix 1
-#define __EXTENSIONS__ /* This might create undue noise somewhere */
-#endif
-#endif /* sun */
-
-#if defined(__NetBSD__)
-// From non-como #ifdef __GNUC__ above
-#undef _STLP_NO_FUNCTION_PTR_IN_CLASS_TEMPLATE
-#define __unix 1
-
-#include <sys/cdefs.h>
-// Some joker #define'd __END_DECLS as };
-#undef __END_DECLS
-#define __END_DECLS }
-
-// <sys/stat.h> prob
-#include <sys/cdefs.h>
-#undef __RENAME
-#define __RENAME(x)
-
-#define wchar_t __COMO_WCHAR_T
-#include <stddef.h>
-#undef wchar_t
-
-#include <math.h>
-# ifdef BORIS_DISABLED
-#    define atan2l atan2
-#    define cosl cos
-#    define sinl sin
-#    define sqrtl sqrt
-     inline long double expl(long double arg) { return exp(arg); }
-     inline long double logl(long double arg) { return log(arg); }
-#    define log10l log10
-#    define sinhl sinh
-#    define coshl cosh
-#    define fabsl fabs
-# endif
-#endif /* __NetBSD__ under __COMO__ */
-
-// Shouldn't need to change anything below here for Comeau C++
-// If so, tell us at comeau at comeaucomputing.com
-
-#define _STLP_NO_DRAND48
-
-#define _STLP_PARTIAL_SPECIALIZATION_SYNTAX
-#define _STLP_NO_USING_CLAUSE_IN_CLASS
-
-
-#if __COMO_VERSION__ >= 4245
-#define _STLP_NO_EXCEPTION_HEADER /**/
-#endif
-#define _STLP_NO_BAD_ALLOC /**/
-#define _STLP_USE_AUTO_PTR_CONVERSIONS /**/
-
-#if __COMO_VERSION__ >= 4245
-// Is this needed?
-#include <stdexcept.stdh>
-//
-// ALSO: SEE THE END OF THIS FILE FOR #INCLUDE <IOSTREAM>
-//
-#endif
-
-// this one is true only with MS
-# if defined (_MSC_VER)
-#  define _STLP_WCHAR_T_IS_USHORT 1
-#  if _MSC_VER <= 1200
-#   define _STLP_VENDOR_GLOBAL_CSTD
-#  endif
-#  if _MSC_VER < 1100
-#   define _STLP_NO_BAD_ALLOC 1
-#   define _STLP_NO_EXCEPTION_HEADER 1
-#   define _STLP_NO_NEW_NEW_HEADER 1
-#   define _STLP_NO_NEW_IOSTREAMS 1
-#  endif
-# endif
-
-// # define __EDG_SWITCHES
-
-
diff --git a/src/STLport/config/stl_confix.h b/src/STLport/config/stl_confix.h
deleted file mode 100644
index 14ca839..0000000
--- a/src/STLport/config/stl_confix.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/*
- * STLport configuration file
- * It is internal STLport header - DO NOT include it directly
- * Purpose of this file : to define STLport settings that depend on
- * compiler flags or can be otherwise missed
- *
- */
-
-#ifndef _STLP_CONFIX_H
-# define _STLP_CONFIX_H
-
-/* If, by any chance, C compiler gets there, try to help it to pass smoothly */
-# if ! defined (__cplusplus) && ! defined (_STLP_HAS_NO_NAMESPACES)
-#  define _STLP_HAS_NO_NAMESPACES
-# endif
-
-# if defined(__MINGW32__)
-#   define _STLP_NO_DRAND48
-# endif
-
-/* Modena C++ library  */
-#if defined (__MWERKS__) && __MWERKS__ <= 0x2303 || (defined (__KCC) && __KCC_VERSION < 3400)
-# include <mcompile.h>
-# define _STLP_USE_MSIPL 1
-# if defined (__KCC) || (defined(__MSL_CPP__) && \
-       ( (__MSL_CPP__ >= 0x5000 && defined( _MSL_NO_MESSAGE_FACET )) || \
-	 (__MSL_CPP__ < 0x5000 && defined( MSIPL_NL_TYPES )))  \
-	 )
-#  define _STLP_NO_NATIVE_MESSAGE_FACET 1
-# endif
-#endif
-
-/* common switches for EDG front-end */
-# if defined (__EDG_SWITCHES)
-#   if !(defined(_TYPENAME) || defined (_TYPENAME_IS_KEYWORD))
-#     undef  _STLP_NEED_TYPENAME
-#     define _STLP_NEED_TYPENAME 1
-#   endif
-#   if !defined(_WCHAR_T_IS_KEYWORD)
-#     undef _STLP_NO_WCHAR_T 
-#     define _STLP_NO_WCHAR_T 1
-#   endif
-#   ifndef _PARTIAL_SPECIALIZATION_OF_CLASS_TEMPLATES
-#     undef _STLP_NO_CLASS_PARTIAL_SPECIALIZATION
-#     define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1
-#   endif
-#   ifndef _MEMBER_TEMPLATES
-#     undef _STLP_NO_MEMBER_TEMPLATES
-#     define _STLP_NO_MEMBER_TEMPLATES 1
-#     undef _STLP_NO_MEMBER_TEMPLATE_CLASSES
-#     define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1
-#   endif
-#   if !defined(_MEMBER_TEMPLATE_KEYWORD)
-#     undef  _STLP_NO_MEMBER_TEMPLATE_KEYWORD
-#     define _STLP_NO_MEMBER_TEMPLATE_KEYWORD 1
-#   endif
-#   if !defined (__EXCEPTIONS) && ! defined (_EXCEPTIONS)
-#     undef  _STLP_HAS_NO_EXCEPTIONS
-#     define _STLP_HAS_NO_EXCEPTIONS
-#   endif
-#   undef __EDG_SWITCHES
-# endif /* EDG */
-#endif
diff --git a/src/STLport/config/stl_cray.h b/src/STLport/config/stl_cray.h
deleted file mode 100644
index 3611261..0000000
--- a/src/STLport/config/stl_cray.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-// Mostly correct guess, change it for Alpha (and other environments
-// that has 64-bit "long")
-#  define _STLP_UINT32_T unsigned long
-
-// Uncomment if long long is available
-#  define _STLP_LONG_LONG long long
-
-// Uncomment this if your compiler can't inline while(), for()
-#  define _STLP_LOOP_INLINE_PROBLEMS 1
-
-// Uncomment if native new-style iostreams are not available
-#define    _STLP_HAS_NO_NEW_IOSTREAMS	1
-
-// Uncomment this if your compiler does not support exceptions
-// Cray C++ supports exceptions when '-h exceptions' option is user;
-// therefore '-D_STLP_HAS_NO_EXCEPTIONS' must be used when '-h exceptions'
-// is NOT used.
-//#  define _STLP_HAS_NO_EXCEPTIONS 1
-
-// Delete?
-// Define this if compiler lacks <exception> header
-//#  define _STLP_NO_EXCEPTION_HEADER 1
-
-// Uncomment this if your C library has lrand48() function
-#  define _STLP_RAND48 1
-
-// Uncomment if native new-style C library headers lile <cstddef>, etc are not available.
-#   define _STLP_HAS_NO_NEW_C_HEADERS 1
-
-// uncomment if new-style headers <new> is available
-#   define _STLP_NO_NEW_NEW_HEADER 1
-
-// uncomment this if <iostream> and other STD headers put their stuff in ::namespace,
-// not std::
-#  define _STLP_VENDOR_GLOBAL_STD
-
-// uncomment this if <cstdio> and the like put stuff in ::namespace,
-// not std::
-#  define _STLP_VENDOR_GLOBAL_CSTD
-
-# define _STLP_NATIVE_C_HEADER(__x) </usr/include/##__x>
-// WARNING: Following is hardcoded to the system default C++ include files
-# define _STLP_NATIVE_CPP_RUNTIME_HEADER(__x) </opt/ctl/CC/CC/include/##__x>
-
-
-# define _STLP_NO_NATIVE_MBSTATE_T
-# define _STLP_NO_CSTD_FUNCTION_IMPORTS
-//# define _STLP_VENDOR_GLOBAL_EXCEPT_STD
-
-
diff --git a/src/STLport/config/stl_dec.h b/src/STLport/config/stl_dec.h
deleted file mode 100644
index 8c265d2..0000000
--- a/src/STLport/config/stl_dec.h
+++ /dev/null
@@ -1,110 +0,0 @@
-# define _STLP_HAS_SPECIFIC_PROLOG_EPILOG
-
-# define _STLP_NATIVE_HEADER(header) <../cxx/##header>
-# define _STLP_NATIVE_C_HEADER(x) <../include/##x>
-
-#if (__DECCXX_VER < 60300000)
-# define _STLP_NATIVE_CPP_C_HEADER(header) <../cxx/##header>
-#else
-# define _STLP_NATIVE_CPP_C_HEADER(header) </usr/include/cxx_cname/##header>
-#endif
-
-# define _STLP_NATIVE_OLD_STREAMS_HEADER(header) <../cxx/##header>
-# define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) <../cxx/##header>
-
-// Alpha is little-endian
-# define _STLP_LITTLE_ENDIAN
-
-// collisions 
-# define _STLP_DONT_PUT_STLPORT_IN_STD
-
-#if (__DECCXX_VER < 60000000)
-
-// automatic template instantiation does not
-// work with namespaces ;(
-# define _STLP_HAS_NO_NAMESPACES 1
-
-# define _STLP_NO_NEW_NEW_HEADER 1 
-
-# define _STLP_NO_WCHAR_T  1
-# define _STLP_NEED_EXPLICIT  1
-
-# define _STLP_NO_BOOL  1
-# define _STLP_NEED_TYPENAME 1
-# define _STLP_NO_NEW_STYLE_CASTS 1
-# define _STLP_NEED_MUTABLE 1
-# define _STLP_NO_BAD_ALLOC 1
-
-
-# define _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX 1
-
-# define _STLP_NO_MEMBER_TEMPLATES 1
-# define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1
-# define _STLP_NO_MEMBER_TEMPLATE_KEYWORD 1
-# define _STLP_NO_FRIEND_TEMPLATES 1
-# define _STLP_NO_QUALIFIED_FRIENDS 1
-# define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1
-# define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER 1
-# define _STLP_NON_TYPE_TMPL_PARAM_BUG 1
-# define _STLP_BROKEN_USING_DIRECTIVE 1
-# define _STLP_NO_EXCEPTION_HEADER 1
-# define _STLP_DEFAULT_CONSTRUCTOR_BUG 1
-
-#endif
-
-
-#ifdef __NO_USE_STD_IOSTREAM
-#  define _STLP_HAS_NO_NEW_IOSTREAMS 1
-# else
-// default is to use new iostreams, anyway
-# ifndef __USE_STD_IOSTREAM
-#  define __USE_STD_IOSTREAM
-# endif
-#endif
-
-// # if !defined (_STLP_NEW_IOSTREAMS) && ! defined (_STLP_DONT_REDEFINE_STD) \
-//  && ! defined (_STLP_REDEFINE_STD)
-// # undef __PRAGMA_ENVIRONMENT
-//   #  define _STLP_DONT_REDEFINE_STD
-// # endif
-
-//# ifndef __STD_STRICT_ANSI_ERRORS
-//# endif
-
-#ifndef __EXCEPTIONS
-# define _STLP_HAS_NO_EXCEPTIONS 1
-#endif
-
-# ifdef __IMPLICIT_INCLUDE_ENABLED
-
-// but, works with ours ;).
-#  define _STLP_LINK_TIME_INSTANTIATION 1
-# else
-#  undef _STLP_LINK_TIME_INSTANTIATION
-# endif
-
-# if defined (__IMPLICIT_USING_STD) && !defined (__NO_USE_STD_IOSTREAM)
-// we should ban that !
-// #  error "STLport won't work with new iostreams and std:: being implicitly included. Please use -std strict_ansi[_errors] or specify __NO_USE_STD_IOSTREAM"
-# endif
-
-# if (defined (__STD_STRICT_ANSI) || defined (__STD_STRICT_ANSI_ERRORS))
-#  define _STLP_STRICT_ANSI 1
-# else
-// we want to enforce it
-#  define _STLP_LONG_LONG long long
-# endif
-
-// unsigned 32-bit integer type
-#  define _STLP_UINT32_T unsigned int
-#if defined(_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 >= 4)
-# define _STLP_RAND48 1
-#endif
-// #  define _STLP_RAND48 1
-
-#  define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS 1
-
-# if (__DECCXX_VER <= 60400000)
-#  define _STLP_HAS_NO_NEW_C_HEADERS 1 
-# endif
-
diff --git a/src/STLport/config/stl_dec_vms.h b/src/STLport/config/stl_dec_vms.h
deleted file mode 100644
index c4bd6dd..0000000
--- a/src/STLport/config/stl_dec_vms.h
+++ /dev/null
@@ -1,96 +0,0 @@
-// OpenVMS version
-
-# define _STLP_NATIVE_HEADER(header) <sys$library:##header>
-# define _STLP_NATIVE_C_HEADER(x) <sys$library:##x>
-# define _STLP_NATIVE_CPP_C_HEADER(header) <sys$library:##header>
-# define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) <sys$library:##header>
-
-#if (__DECCXX_VER < 60000000)
-
-// automatic template instantiation does not
-// work with namespaces ;(
-# define _STLP_HAS_NO_NAMESPACES 1
-
-# define _STLP_NO_WCHAR_T  1
-# define _STLP_NEED_EXPLICIT  1
-
-# define _STLP_NO_BOOL  1
-# define _STLP_NEED_TYPENAME 1
-# define _STLP_NO_NEW_STYLE_CASTS 1
-# define _STLP_NEED_MUTABLE 1
-# define _STLP_NO_BAD_ALLOC 1
-
-# define _STLP_NO_NEW_NEW_HEADER 1 
-# define _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX 1
-
-# define _STLP_NO_MEMBER_TEMPLATES 1
-# define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1
-# define _STLP_NO_MEMBER_TEMPLATE_KEYWORD 1
-# define _STLP_NO_FRIEND_TEMPLATES 1
-# define _STLP_NO_QUALIFIED_FRIENDS 1
-# define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1
-# define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER 1
-# define _STLP_NON_TYPE_TMPL_PARAM_BUG 1
-# define _STLP_BROKEN_USING_DIRECTIVE 1
-# define _STLP_NO_EXCEPTION_HEADER 1
-# define _STLP_DEFAULT_CONSTRUCTOR_BUG 1
-
-#endif
-
-
-#ifdef __NO_USE_STD_IOSTREAM
-#  define _STLP_HAS_NO_NEW_IOSTREAMS 1
-# else
-// default is to use new iostreams, anyway
-# ifndef __USE_STD_IOSTREAM
-#  define __USE_STD_IOSTREAM
-# endif
-#endif
-
-// # if !defined (_STLP_NEW_IOSTREAMS) && ! defined (_STLP_DONT_REDEFINE_STD) \
-//  && ! defined (_STLP_REDEFINE_STD)
-// # undef __PRAGMA_ENVIRONMENT
-//   #  define _STLP_DONT_REDEFINE_STD
-// # endif
-
-//# ifndef __STD_STRICT_ANSI_ERRORS
-//# endif
-
-#ifndef __EXCEPTIONS
-# define _STLP_HAS_NO_EXCEPTIONS 1
-#endif
-
-# ifdef __IMPLICIT_INCLUDE_ENABLED
-
-#ifndef _STLP_IOSTREAMS
-// implicit include introduces conflicts
-// between stlport and native lib.
-# undef __IMPLICIT_INCLUDE_ENABLED
-#endif
-
-// but, works with ours ;).
-#  define _STLP_LINK_TIME_INSTANTIATION 1
-
-# endif
-
-# if defined (__IMPLICIT_USING_STD) && !defined (__NO_USE_STD_IOSTREAM)
-// we should ban that !
-#  error "STLport won't work with new iostreams and std:: being implicitly included. Please use -std strict_ansi[_errors] or specify __NO_USE_STD_IOSTREAM"
-# endif
-
-# if !(defined (__STD_STRICT_ANSI) || defined (__STD_STRICT_ANSI_ERRORS))
-// we want to enforce it
-#  define _STLP_LONG_LONG long long
-# endif
-
-// unsigned 32-bit integer type
-#  define _STLP_UINT32_T unsigned int
-#if defined(_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 >= 4)
-# define _STLP_RAND48 1
-#endif
-// #  define _STLP_RAND48 1
-
-#  define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS 1
-
-#define _STLP_HAS_NO_NEW_C_HEADERS 1
-
diff --git a/src/STLport/config/stl_dm.h b/src/STLport/config/stl_dm.h
deleted file mode 100644
index 5866cc6..0000000
--- a/src/STLport/config/stl_dm.h
+++ /dev/null
@@ -1,225 +0,0 @@
-// STLport configuration file for Digital Mars C++
-
-#ifndef _STLP_DMC_H
-# define _STLP_DMC_H
-
-#if __DMC__ < 0x832
-#error "Digital Mars C++ versions prior to 8.32 are not supported!"
-#endif
-
-
-#ifndef _CPPUNWIND
-# define _STLP_NO_EXCEPTIONS
-#endif
-# undef _STLP_NO_NAMESPACES
-# define _STLP_NO_RELOPS_NAMESPACE
-# define _STLP_VENDOR_GLOBAL_CSTD
-# define _STLP_VENDOR_GLOBAL_STD
-# define _STLP_VENDOR_EXCEPT_STD std
-
-# if !defined(_WIN32)
-// it's not fully supported on non-Win32 platforms
-#  define _STLP_NO_NEW_IOSTREAMS
-#  define _STLP_NO_NATIVE_WIDE_FUNCTIONS
-# endif
-
-# if defined(_STLP_NO_NEW_IOSTREAMS) || defined(_STLP_NO_OWN_IOSTREAMS)
-#  define _STLP_OWN_NAMESPACE
-# else
-#  define _STLP_NO_OWN_NAMESPACE
-# endif
-
-
-// select threads strategy
-# if defined (_MT) && !defined (_NOTHREADS)
-#  define _REENTRANT
-# else
-#  define _NOTHREADS
-# endif
-
-// select SGI-style alloc instead of allocator<T>
-# define _STLP_USE_SGI_ALLOCATORS
-
-// select allocation method you like
-# undef _STLP_USE_MALLOC
-# define _STLP_USE_NEWALLOC
-
-// this one is not mandatory, just enabled
-# undef _STLP_USE_DEFALLOC
-
-// define _STLP_USE_ABBREVS if your linker has trouble with long 
-// external symbols
-# undef _STLP_USE_ABBREVS
-
-
-// unsigned 32-bit integer type
-#  define _STLP_UINT32_T unsigned
-
-#  ifndef _BOOL_DEFINED
-#   define _STLP_NO_BOOL
-#  else
-#   define _STLP_DONT_USE_BOOL_TYPEDEF
-#  endif
-
-#  undef _STLP_YVALS_H
-#  undef _STLP_LIMITED_DEFAULT_TEMPLATES
-#  define _STLP_DEFAULT_TYPE_PARAM
-#  undef _STLP_NO_STATIC_TEMPLATE_DATA
-#  undef _STLP_RAND48
-#  undef _STLP_LOOP_INLINE_PROBLEMS
-
-#  undef _STLP_HAS_NO_NAMESPACES
-
-#  undef _STLP_NEED_TYPENAME
-#  undef _STLP_NEED_EXPLICIT
-#  undef _STLP_HAS_NO_EXCEPTIONS
-#  undef _STLP_NO_EXCEPTION_SPEC
-#  undef _STLP_WEAK_ATTRIBUTE
-#  undef _STLP_BASE_MATCH_BUG
-#  undef _STLP_NONTEMPL_BASE_MATCH_BUG
-#  undef _STLP_NESTED_TYPE_PARAM_BUG
-#  undef _STLP_NO_ARROW_OPERATOR
-#  undef _STLP_UNINITIALIZABLE_PRIVATE
-#  undef _STLP_BASE_TYPEDEF_BUG
-#  undef _STLP_BASE_TYPEDEF_OUTSIDE_BUG
-#  undef _STLP_CONST_CONSTRUCTOR_BUG
-
-#  undef _STLP_NO_NEW_STYLE_CASTS
-
-#  ifndef _WCHAR_T_DEFINED
-#   define _STLP_NO_WCHAR_T
-#  endif
-#  define _STLP_HAS_NO_UNIX98_WCHAR_EXTENSIONS
-
-#  undef _STLP_WCHAR_T_IS_USHORT
-
-#  if _INTEGRAL_MAX_BITS >= 64
-#   define _STLP_LONG_LONG long long
-#  endif
-
-#  undef _STLP_NO_LONG_DOUBLE
-#  undef _STLP_NEED_MUTABLE
-#  undef _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX
-#  undef _STLP_NO_BAD_ALLOC
-#  undef _STLP_DEBUG_ALLOC
-#  undef _STLP_NO_MEMBER_TEMPLATES
-#  undef _STLP_NO_MEMBER_TEMPLATE_CLASSES
-#  define _STLP_NO_MEMBER_TEMPLATE_KEYWORD
-#  undef _STLP_NO_FRIEND_TEMPLATES
-#  undef _STLP_NO_QUALIFIED_FRIENDS
-#  undef _STLP_NO_CLASS_PARTIAL_SPECIALIZATION
-#  undef _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER
-#  undef _STLP_AUTOMATIC_TYPE_TRAITS
-#  undef _STLP_MEMBER_POINTER_PARAM_BUG
-#  undef _STLP_NON_TYPE_TMPL_PARAM_BUG
-#  undef _STLP_NO_DEFAULT_NON_TYPE_PARAM
-#  undef _STLP_NO_METHOD_SPECIALIZATION
-#  undef _STLP_STATIC_ARRAY_BUG
-#  undef _STLP_STATIC_CONST_INIT_BUG
-#  undef _STLP_TRIVIAL_CONSTRUCTOR_BUG
-#  undef _STLP_TRIVIAL_DESTRUCTOR_BUG
-#  undef _STLP_BROKEN_USING_DIRECTIVE
-#  undef _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS
-#  undef _STLP_NO_EXCEPTION_HEADER
-#  undef _STLP_DEFAULT_CONSTRUCTOR_BUG
-
-#  define _STLP_HAS_NO_NEW_IOSTREAMS
-#  define _STLP_HAS_NO_NEW_C_HEADERS
-#  define _STLP_THROW_RETURN_BUG
-#  undef _STLP_LINK_TIME_INSTANTIATION
-#  undef _STLP_PARTIAL_SPEC_NEEDS_TEMPLATE_ARGS
-#  undef _STLP_NO_TEMPLATE_CONVERSIONS
-#  undef _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS
-
-
-#  define _STLP_NO_NATIVE_MBSTATE_T
-
-
-#  define _STLP_EXPORT_DECLSPEC __declspec(dllexport)
-#  define _STLP_IMPORT_DECLSPEC __declspec(dllimport)
-
-#  define _STLP_CLASS_EXPORT_DECLSPEC __declspec(dllexport)
-#  define _STLP_CLASS_IMPORT_DECLSPEC __declspec(dllimport)
-
-#  define _STLP_IMPORT_TEMPLATE_KEYWORD __declspec(dllimport)
-#  define _STLP_EXPORT_TEMPLATE_KEYWORD __declspec(dllexport)
-
-#define _STLP_NATIVE_HEADER(header)    <../include/##header>
-#define _STLP_NATIVE_C_HEADER(header)    <../include/##header>
-#define _STLP_NATIVE_CPP_C_HEADER(header)    <../include/##header>
-#define _STLP_NATIVE_OLD_STREAMS_HEADER(header) <../include/##header>
-#define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) <../include/##header>
-
-
-# if defined(__BUILDING_STLPORT) && defined(_WINDLL)
-#  define _STLP_CALL __export
-
-#  undef _STLP_USE_DECLSPEC
-#  define _STLP_USE_DECLSPEC 1
-# endif
-
-# if !defined (__BUILDING_STLPORT) && !defined (_STLP_NO_OWN_IOSTREAMS)
-#  if (defined (_DLL) && !defined (_STLP_DONT_USE_DLL)) || defined (_STLP_USE_DLL)
-#   undef  _STLP_USE_DECLSPEC
-#   define _STLP_USE_DECLSPEC 1
-#  endif
-
-#  if defined (_STLP_DEBUG)
-#   if defined (_DLL)
-#    if !defined (_STLP_DONT_USE_DLL)
-#     pragma comment(lib,"stlp45dm_stldebug.lib")
-#    else
-#     pragma comment(lib,"stlp45dm_stldebug_staticx.lib")
-#    endif
-#   else
-#    if defined (_STLP_USE_DLL)
-#     pragma comment(lib,"stlp45dms_stldebug.lib")
-#    else
-#     pragma comment(lib,"stlp45dm_stldebug_static.lib")
-#    endif
-#   endif
-#  elif defined (DEBUG)
-#   if defined (_DLL)
-#    if !defined (_STLP_DONT_USE_DLL)
-#     pragma comment(lib,"stlp45dm_debug.lib")
-#    else
-#     pragma comment(lib,"stlp45dm_debug_staticx.lib")
-#    endif
-#   else
-#    if defined (_STLP_USE_DLL)
-#     pragma comment(lib,"stlp45dms_debug.lib")
-#    else
-#     pragma comment(lib,"stlp45dm_debug_static.lib")
-#    endif
-#   endif
-#  else
-#   if defined (_DLL)
-#    if !defined (_STLP_DONT_USE_DLL)
-#     pragma comment(lib,"stlp45dm.lib")
-#    else
-#     pragma comment(lib,"stlp45dm_staticx.lib")
-#    endif
-#   else
-#    if defined (_STLP_USE_DLL)
-#     pragma comment(lib,"stlp45dms.lib")
-#    else
-#     pragma comment(lib,"stlp45dm_static.lib")
-#    endif
-#   endif
-#  endif
-# endif
-
-
-#ifdef __BUILDING_STLPORT
-// still needed for building STLport itself, but isn't needed for
-// compiling applications anymore
-# undef __SC__
-#endif
-
-#undef __STLP_NO_KEYWORDS_WORKAROUND
-#if !defined (__STLP_NO_KEYWORDS_WORKAROUND)
-# define __in __stl_in
-# define __out __stl_out
-#endif
-
-#endif
diff --git a/src/STLport/config/stl_fujitsu.h b/src/STLport/config/stl_fujitsu.h
deleted file mode 100644
index cc77540..0000000
--- a/src/STLport/config/stl_fujitsu.h
+++ /dev/null
@@ -1,5 +0,0 @@
-/* STLport configuration for Fujitsu compiler : looks like a perfect one ! */
-# define _STLP_NATIVE_INCLUDE_PATH ../std
-# define _STLP_UINT32_T unsigned int
-# define _STLP_LONG_LONG long long
-# define _STLP_WCHAR_SUNPRO_EXCLUDE 1
diff --git a/src/STLport/config/stl_gcc.h b/src/STLport/config/stl_gcc.h
deleted file mode 100644
index 56d0359..0000000
--- a/src/STLport/config/stl_gcc.h
+++ /dev/null
@@ -1,376 +0,0 @@
-/* STLport configuration file
- * It is internal STLport header - DO NOT include it directly
- */
-
-/* Systems having GLIBC installed have different traits */
-#if ! defined (_STLP_USE_GLIBC) && ( defined (__linux__) || defined (__CYGWIN__) )
-# define _STLP_USE_GLIBC
-#endif
-
-#   define _STLP_NO_MEMBER_TEMPLATE_KEYWORD
-
-# if defined(__FreeBSD__) || defined (__hpux) || defined(__amigaos__) || ( defined(__OS2__) && defined(__EMX__) )
-#  define _STLP_NO_WCHAR_T
-# endif
-
-#ifdef __USLC__
-# include <config/stl_sco.h>
-#endif
-
-# if defined (__sun)
-
-// gcc does not support ELF64 yet ; however; it supports ultrasparc + v8plus.
-// limits.h contains invalid values for this combination
-# if (defined  (__sparc_v9__) || defined (__sparcv9)) && ! defined ( __WORD64 )
-#  define __LONG_MAX__ 2147483647L
-# endif
-
-#  include <config/stl_solaris.h>
-# endif
-
-// no thread support on AmigaOS
-#if defined (__amigaos__)
-# define _NOTHREADS
-# define _STLP_NO_THREADS
-#endif
-
-// azov: gcc on lynx have a bug that causes internal
-// compiler errors when compiling STLport with namespaces turned on. 
-// When the compiler gets better - comment out _STLP_HAS_NO_NAMESPACES
-# if defined (__Lynx__) && (__GNUC__ < 3)
-#   define _STLP_HAS_NO_NAMESPACES 1
-#   define _STLP_NO_STATIC_TEMPLATE_DATA 1
-//  turn off useless warning about including system headers
-#   define __NO_INCLUDE_WARN__ 1
-# endif
-
-
-/* Tru64 Unix, AIX, HP : gcc there by default uses uses native ld and hence cannot auto-instantiate 
-   static template data. If you are using GNU ld, please say so in stl_user_config.h header */    
-# if (__GNUC__ < 3) && ! (_STLP_GCC_USES_GNU_LD) && \
-   ((defined (__osf__) && defined (__alpha__)) || defined (_AIX) || defined (__hpux) || defined(__amigaos__) )
-#   define _STLP_NO_STATIC_TEMPLATE_DATA
-# endif
-
-# if defined(__DJGPP)
-#   define _STLP_RAND48		1
-#   define _NOTHREADS		1
-#   undef  _PTHREADS
-#   define _STLP_LITTLE_ENDIAN
-# endif 
-
-# if defined(__MINGW32__)
-/* Mingw32, egcs compiler using the Microsoft C runtime */
-#   undef  _STLP_NO_DRAND48
-#   define _STLP_NO_DRAND48
-#   ifdef _MT
-#     define _REENTRANT
-#   endif
-#  define _STLP_IMPORT_DECLSPEC __attribute__((dllimport))
-#  define _STLP_EXPORT_DECLSPEC __attribute__((dllexport))
-#  define _STLP_CLASS_IMPORT_DECLSPEC __attribute__((dllimport))
-#  define _STLP_CLASS_EXPORT_DECLSPEC __attribute__((dllexport))
-#  define _STLP_CALL
-
-#  if defined (_STLP_USE_DYNAMIC_LIB)
-#   define _STLP_USE_DECLSPEC 1
-// #   define _STLP_USE_TEMPLATE_EXPORT 1
-/* Using dynamic library in MinGW requires _STLP_NO_CUSTOM_IO */
-# define _STLP_NO_CUSTOM_IO
-#  endif
-
-# endif
-
-#if defined (__CYGWIN__) || defined (__MINGW32__) || !(defined (_STLP_USE_GLIBC) || defined (__sun)) 
-#ifndef __MINGW32__
-#   define _STLP_NO_NATIVE_MBSTATE_T      1
-#endif
-#   define _STLP_NO_NATIVE_WIDE_FUNCTIONS 1
-#   define _STLP_NO_NATIVE_WIDE_STREAMS   1
-# elif defined(__linux__)
-#   define _STLP_NO_NATIVE_WIDE_FUNCTIONS 1
-#   define _STLP_NO_NATIVE_WIDE_STREAMS   1
-# elif defined (__sun)
-#   define _STLP_WCHAR_BORLAND_EXCLUDE
-#   define _STLP_NO_NATIVE_WIDE_FUNCTIONS 1
-#endif
-
-/* Mac OS X is a little different with namespaces and cannot instantiate
- * static data members in template classes */
-# if defined (__APPLE__)
-/* Mac OS X is missing a required typedef and standard macro */
-typedef unsigned int wint_t;
-
-#  define __unix
-
-#   if (__GNUC__ < 3)
-
- /* Mac OS X needs one and only one source file to initialize all static data
-  * members in template classes. Only one source file in an executable or
-  * library can declare instances for such data members, otherwise duplicate
-  * symbols will be generated. */
-
-#   define _STLP_NO_STATIC_TEMPLATE_DATA
-#   define _STLP_STATIC_CONST_INIT_BUG 1
-#   define _STLP_STATIC_TEMPLATE_DATA 0
-#   define _STLP_WEAK_ATTRIBUTE 1
- /* Workaround for the broken Mac OS X C++ preprocessor which cannot handle
-  * parameterized macros in #include statements */
-#  define _STLP_NATIVE_HEADER(header) <../g++/##header##>
-#  define _STLP_NATIVE_C_HEADER(header) <../include/##header##>
-#  define _STLP_NATIVE_CPP_C_HEADER(header) <../g++/##header##>
-#  define _STLP_NATIVE_OLD_STREAMS_HEADER(header) <../g++/##header##>
-#  define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) <../g++/##header##> 
-# endif /* __GNUC__ < 3 */
-
-#   define _STLP_NO_LONG_DOUBLE
-
-/* Mac OS X needs all "::" scope references to be "std::" */
-#define _STLP_USE_NEW_C_HEADERS
-# endif
-
-
-# if defined(__BEOS__) && defined(__INTEL__)
-#  define _STLP_NATIVE_HEADER(header) <../stlport/beos/##header##>
-#  define _STLP_NATIVE_C_HEADER(header) <../stlport/beos/##header##>
-#  define _STLP_NATIVE_CPP_C_HEADER(header) <../stlport/beos/##header##>
-#  define _STLP_NATIVE_OLD_STREAMS_HEADER(header) <../stlport/beos/##header##>
-#  define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) <../stlport/beos/##header##>
-#  define _STLP_NO_NATIVE_WIDE_FUNCTIONS 1
-#  define _STLP_NO_NATIVE_WIDE_STREAMS   1
-//#  define _NOTHREADS 1
-#  ifdef _PTHREADS
-#    undef  _PTHREADS
-#  endif
-#  ifdef _STLP_PTHREADS
-#    undef _STLP_PTHREADS
-#  endif
-#  define _STLP_USE_STDIO_IO 1
-#  define _STLP_USE_GLIBC 1
-# endif
-
-
-/* g++ 2.7.x and above */
-#   define _STLP_LONG_LONG long long 
-
-#   if (__GNUC__ >= 3)
-#    ifndef _STLP_HAS_NO_NEW_C_HEADERS
-#     define _STLP_HAS_NATIVE_FLOAT_ABS
-#    else
-#     ifdef _STLP_USE_GLIBC
-#      define _STLP_VENDOR_LONG_DOUBLE_MATH  1 // - ptr: with new c headers no needs
-// #      define _STLP_REAL_LOCALE_IMPLEMENTED
-#     endif
-#    endif
-#   endif
-
-#   if (__GNUC__ < 3)
-#    define _STLP_HAS_NO_NEW_C_HEADERS     1
-#    define _STLP_VENDOR_GLOBAL_CSTD       1
-#    define _STLP_HAS_NO_NEW_IOSTREAMS     1
-#    ifndef __HONOR_STD
-#     define _STLP_VENDOR_GLOBAL_EXCEPT_STD 1
-#    endif
-#   endif
-
-#   if (__GNUC_MINOR__ < 95)  && (__GNUC__ < 3)
-/* egcs fails to initialize builtin types in expr. like this : new(p) char();  */
-#     define _STLP_DEFAULT_CONSTRUCTOR_BUG 1
-#     define _STLP_INCOMPLETE_EXCEPTION_HEADER
-#   endif
-
-#   if (__GNUC_MINOR__ < 9)  && (__GNUC__ < 3) /* gcc 2.8 */
-#     define _STLP_NO_TEMPLATE_CONVERSIONS
-#     define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1
-#     define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER 1
-#     define _STLP_NO_FRIEND_TEMPLATES 1
-#     define _STLP_HAS_NO_NAMESPACES 1
-#     define _STLP_NO_METHOD_SPECIALIZATION 1
-#     define _STLP_NO_MEMBER_TEMPLATES 1
-#     define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1
-#     define _STLP_DONT_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS
-/*  DJGPP doesn't seem to implement it in 2.8.x */
-#     ifdef DJGPP
-#      define  _STLP_NO_STATIC_TEMPLATE_DATA 1
-#     endif
-#   endif
-
-#  if __GNUC__ <= 2 && __GNUC_MINOR__ <= 7 && ! defined (__CYGWIN32__)
-/* Will it work with 2.6 ? I doubt it. */
-#   if ( __GNUC_MINOR__ < 6 )
-    __GIVE_UP_WITH_STL(GCC_272);
-#   endif
-
-# define  _STLP_NO_RELOPS_NAMESPACE
-# define  _STLP_NON_TYPE_TMPL_PARAM_BUG
-# define  _STLP_LIMITED_DEFAULT_TEMPLATES 1
-# define  _STLP_DEFAULT_TYPE_PARAM 1
-# define  _STLP_NO_BAD_ALLOC
-# define  _STLP_NO_ARROW_OPERATOR 1
-# ifndef _STLP_NO_STATIC_TEMPLATE_DATA
-#  define  _STLP_NO_STATIC_TEMPLATE_DATA
-# endif
-# define  _STLP_STATIC_CONST_INIT_BUG 1
-# define  _STLP_NO_METHOD_SPECIALIZATION 1
-
-#  if !defined (__CYGWIN32__) 
-#   define _STLP_NESTED_TYPE_PARAM_BUG   1
-#   define _STLP_BASE_MATCH_BUG       1
-/*  unused operators are required (forward) */
-#   define  _STLP_CONST_CONSTRUCTOR_BUG 
-#   define _STLP_NO_DEFAULT_NON_TYPE_PARAM
-#  endif
-#   define _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX 1
-#   define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS 1
-#   define _STLP_NO_EXCEPTION_HEADER 1
-#  else /* ! <= 2.7.* */
-#  endif /* ! <= 2.7.* */
-
-/* static template data members workaround strategy for gcc tries
- * to use weak symbols.
- * if you don't want to use that, #define _STLP_WEAK_ATTRIBUTE=0 ( you'll
- * have to put "#define __PUT_STATIC_DATA_MEMBERS_HERE" line in one of your
- * compilation unit ( or CFLAGS for it ) _before_ including any STL header ).
- */
-#   if defined (_STLP_NO_STATIC_TEMPLATE_DATA) && ! defined (_STLP_WEAK_ATTRIBUTE )
-/* systems using GNU ld or format that supports weak symbols
-   may use "weak" attribute
-   Linux & Solaris ( x86 & SPARC ) are being auto-recognized here */
-#    if defined(_STLP_GNU_LD) || defined(__ELF__) || defined (__CYGWIN__) || \
-     (( defined (__SVR4) || defined ( __svr4__ )) && \
-      ( defined (sun) || defined ( __sun__ )))
-#     define _STLP_WEAK_ATTRIBUTE 1
-#    endif
-#   endif /* _STLP_WEAK_ATTRIBUTE */
-
-
-/* strict ANSI prohibits "long long" ( gcc) */
-#  if defined ( __STRICT_ANSI__ )
-#    undef _STLP_LONG_LONG
-// #    define _STLP_STRICT_ANSI 1
-#  endif
-
-//# if !defined (__STRICT_ANSI__) || defined (__BUILDING_STLPORT)
-//#    define _STLP_USE_TEMPLATE_EXPORT
-//#    define _STLP_EXPORT_TEMPLATE_KEYWORD extern
-//#    define _STLP_IMPORT_TEMPLATE_KEYWORD extern
-//# endif
-
-#   ifndef __EXCEPTIONS
-#     undef  _STLP_HAS_NO_EXCEPTIONS
-#     define _STLP_HAS_NO_EXCEPTIONS  1
-#   endif
-
-# if (__GNUC__ >= 3)
-
-#  if ((__GNUC_MINOR__ == 0) || (__APPLE__))
-#   define _STLP_NATIVE_INCLUDE_PATH ../g++-v3
-#   define _STLP_NATIVE_OLD_STREAMS_INCLUDE_PATH ../g++-v3/backward
-#  else
-#   if defined(__GNUC_PATCHLEVEL__) && (__GNUC_PATCHLEVEL__ > 0)
-#     define _STLP_NATIVE_INCLUDE_PATH ../__GNUC__.__GNUC_MINOR__.__GNUC_PATCHLEVEL__
-#     define _STLP_NATIVE_OLD_STREAMS_INCLUDE_PATH ../__GNUC__.__GNUC_MINOR__.__GNUC_PATCHLEVEL__/backward
-#   else
-#     define _STLP_NATIVE_INCLUDE_PATH ../__GNUC__.__GNUC_MINOR__
-#     define _STLP_NATIVE_OLD_STREAMS_INCLUDE_PATH ../__GNUC__.__GNUC_MINOR__/backward
-#   endif
-#  endif
-
-# elif (__GNUC_MINOR__ < 8)
-
-#  define _STLP_NO_OWN_IOSTREAMS 1
-#  undef  _STLP_OWN_IOSTREAMS
-#  define _STLP_NATIVE_INCLUDE_PATH ../g++-include
-
-/* tuning of static template data members workaround */
-#  if ( _STLP_STATIC_TEMPLATE_DATA < 1 )
-#   if ( _STLP_WEAK_ATTRIBUTE > 0 )
-#    define _STLP_WEAK __attribute__ (( weak ))
-#   else
-#    define _STLP_WEAK
-#   endif /* _STLP_WEAK_ATTRIBUTE */
-
-#   ifdef __PUT_STATIC_DATA_MEMBERS_HERE
-#    define __DECLARE_INSTANCE(type,item,init) type item _STLP_WEAK init
-#   else
-#    define __DECLARE_INSTANCE(type,item,init)
-#   endif /* __PUT_STATIC_DATA_MEMBERS_HERE */
-#  endif /* _STLP_STATIC_TEMPLATE_DATA */
-
-# else
-
-// gcc-2.95.0 used to use "g++-3" directory which has been changed to "g++" in
-// system-dependent "include" for 2.95.2 except for Cygwin and Mingw packages.
-// I expect "g++-3" not being used in later releases.
-// If your installation use "g++-3" include directory for any reason (pre-2.95.2 or Win binary kit),
-// please change the macro below to point to your directory. 
-
-# if defined(__DJGPP)
-#   define _STLP_NATIVE_INCLUDE_PATH ../lang/cxx
-# elif (__GNUC__ >= 3) || (__GNUC_MINOR__ >= 97)
-#   define _STLP_NATIVE_INCLUDE_PATH ../include/g++-v3
-# elif ((__GNUC_MINOR__ >= 95 && __GNUC_MINOR__ < 97) && !( defined (__FreeBSD__) || defined (__NetBSD__) || defined(__sgi) || defined (__OS2__) ) )
-#   define _STLP_NATIVE_INCLUDE_PATH ../g++-3
-# elif (__GNUC_MINOR__ > 8) && (__GNUC_MINOR__ < 95) && (__GNUC__ < 3) && !defined( __Lynx__ )
-// this really sucks, as GNUpro does not really identifies itself, so we have to guess 
-// depending on a platform
-#   ifdef __hpux
-#    define _STLP_NATIVE_INCLUDE_PATH ../g++-3
-#   else
-#    define _STLP_NATIVE_INCLUDE_PATH ../g++-2
-#   endif
-# else
-#   define _STLP_NATIVE_INCLUDE_PATH g++
-# endif
-
-// <exception> et al
-# ifdef __FreeBSD__
-#   if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ > 95)
-#     define _STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH ../include
-#   endif
-# else
-// azov
-#   ifdef __Lynx__ 
-#     define _STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH _STLP_NATIVE_INCLUDE_PATH
-#   else
-#    if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)
-// #     define _STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH ../g++-v3
-#   else
-#     define _STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH ../include
-#   endif
-#  endif
-# endif
-
-#endif /* GNUC_MINOR < 8 */
-
-# define _STLP_NATIVE_CPP_C_INCLUDE_PATH _STLP_NATIVE_INCLUDE_PATH
-# define _STLP_NATIVE_C_INCLUDE_PATH ../include
-
-
-#ifdef _SCO_ELF
-# define _STLP_SCO_OPENSERVER
-#     if defined(_REENTRANT)
-#           define _UITHREADS     /* if      UnixWare < 7.0.1 */
-#           define _STLP_UITHREADS
-#     endif /* _REENTRANT */
-#endif
-
-// Tune settings for the case where static template data members are not 
-// instaniated by default
-# if defined ( _STLP_NO_STATIC_TEMPLATE_DATA )
-#   define _STLP_STATIC_TEMPLATE_DATA 0
-#   if !defined ( _STLP_WEAK_ATTRIBUTE )
-#    define _STLP_WEAK_ATTRIBUTE 0
-#   endif
-#  ifdef __PUT_STATIC_DATA_MEMBERS_HERE
-#   define __DECLARE_INSTANCE(type,item,init) type item init
-#  else
-#   define __DECLARE_INSTANCE(type,item,init)
-#  endif
-# else
-#   define _STLP_STATIC_TEMPLATE_DATA 1
-# endif
-
-
-
-
diff --git a/src/STLport/config/stl_hpacc.h b/src/STLport/config/stl_hpacc.h
deleted file mode 100644
index e25f101..0000000
--- a/src/STLport/config/stl_hpacc.h
+++ /dev/null
@@ -1,218 +0,0 @@
-// STLport configuration file
-// It is internal STLport header - DO NOT include it directly
-
-// system C-library dependent
-#if defined(_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 >= 4)
-# define _STLP_RAND48 1
-#endif
-// #  define _STLP_RAND48 1
-#  define _STLP_NO_NATIVE_MBSTATE_T      1
-#  define _STLP_HPACC_BROKEN_BUFEND       1
-#  define _STLP_WCHAR_HPACC_EXCLUDE      1
-
-// this was reported to help, just as with SUN CC 4.2
-# define _STLP_INLINE_STRING_LITERAL_BUG
-
-
-// specific prolog is needed to select correct threads impl
-#  define _STLP_HAS_SPECIFIC_PROLOG_EPILOG
-
-// HP aCC with +noeh
-#  ifdef __HPACC_NOEH
-#   define _STLP_HAS_NO_EXCEPTIONS 1
-#  endif
-
-// HP compilers
-// At that point, we only know we are on HP (and _not_ using gcc,
-// according to "stlcomp.h"
-
-// __HP_aCC indicate HP ANSI C++, but not always (03.xx does not
-// define it before 3.13, for example).
-//
-#  if defined(__HP_aCC)
-
-# if __HP_aCC < 33100
-#   define _STLP_NATIVE_OLD_STREAMS_INCLUDE_PATH ../iostream
-# else
-#   define _STLP_NATIVE_OLD_STREAMS_INCLUDE_PATH ../include/iostream
-# endif
-
-#   define _STLP_LONG_LONG long long
-
-#if (__HP_aCC <= 30000 && __HP_aCC >= 12100)
-
-//Special kludge to workaround bug in aCC A.01.23, CR JAGac40634
-#ifdef _STLP_DEBUG
-static void _STLP_dummy_literal() { const char *p = "x";}
-static void _STLP_dummy_literal_2() { const char *p = "123456789"; }
-static void _STLP_dummy_literal_3() { const char *p = "123456700000000000000089";}
-#endif
-
-#     define _STLP_HP_ACC                   0123
-#     define _STLP_NATIVE_INCLUDE_PATH       ../include
-#     define _STLP_NATIVE_C_INCLUDE_PATH     ../include
-#     define _STLP_NATIVE_CPP_C_INCLUDE_PATH ../include
-#     define _STLP_VENDOR_GLOBAL_STD         1
-#     define _STLP_VENDOR_GLOBAL_CSTD        1
-#     define _STLP_HAS_NO_NEW_IOSTREAMS      1
-#     define _STLP_DONT_THROW_RANGE_ERRORS   1
-#     define _STLP_STATIC_CONST_INIT_BUG 1
-#if (__HP_aCC  < 12700)
-//new flag: on most HP compilers cwchar is missing
-#     define _STLP_NO_CWCHAR
-#endif
-
-#     define _STLP_FORCE_ALLOCATORS(t,a) \
-  typedef typename _Alloc_traits<t,a>::_Orig _STLP_dummy_type1;\
-  typedef typename _STLP_dummy_type1:: _STLP_TEMPLATE rebind<t>::other _STLP_dummy_type2;
-
-#   endif /* 123 */
-
-// latest version and up
-#   if (__HP_aCC >= 32500 )
-#     define _STLP_HP_ACC                   0325
-
-#     define _STLP_FORCE_ALLOCATORS(t,a) \
-  typedef typename _Alloc_traits<t,a>::_Orig _STLP_dummy_type1;\
-  typedef typename _STLP_dummy_type1:: _STLP_TEMPLATE rebind<t>::other _STLP_dummy_type2;
-
-# if !defined( _INCLUDE__STDC_A1_SOURCE ) // HP-UX 11i only
-#  define _STLP_HAS_NO_UNIX98_WCHAR_EXTENSIONS
-# endif
-
-#    if defined(_HP_NAMESPACE_STD) // option -AA
-// from now, we have a full standard lib in namespace std
-//
-// -AA indicates that we are compiling against Rogue Wave 2.2.1
-// STL shipped with the HP aCC compiler. -AA tells the compiler
-// to use the STL defined in the include_std directory.
-//
-# define _STLP_NATIVE_INCLUDE_PATH ../include_std
-# define _STLP_NATIVE_C_INCLUDE_PATH ../include_std
-# define _STLP_NATIVE_CPP_C_INCLUDE_PATH ../include_std
-
-// #      define _STLP_HPACC_ONLY_NATIVE_STRING 1 // STLPort _string.c includes <locale>
-#     define _STLP_HP_ACC_COMPAT            -1
-#    else // option -Aa
-#     define _STLP_NATIVE_INCLUDE_PATH       ../include
-#     define _STLP_NATIVE_C_INCLUDE_PATH     ../include
-#     define _STLP_NATIVE_CPP_C_INCLUDE_PATH ../include
-#     define _STLP_VENDOR_GLOBAL_STD         1
-#     define _STLP_VENDOR_GLOBAL_CSTD        1
-#     define _STLP_HAS_NO_NEW_IOSTREAMS      1
-// Add the following in _site_config.h if "-Wc,-koenig_lookup,on" not used
-//#     define _STLP_NO_KOENIG_LOOKUP          1
-#     define _STLP_DONT_THROW_RANGE_ERRORS   1
-#    endif /* _NAMESPACE_STD */
-#   endif
-
-#   if (__HP_aCC >= 31400 && __HP_aCC < 32500)
-#     define _STLP_HP_ACC                   0314
-
-# define _STLP_FORCE_ALLOCATORS(t,a) \
-typedef typename _Alloc_traits<t,a>::_Orig _STLP_dummy_type1;\
-typedef typename _STLP_dummy_type1:: _STLP_TEMPLATE rebind<t>::other _STLP_dummy_type2;
-#     define _STLP_NO_CWCHAR
-#    if defined(_NAMESPACE_STD) // option -AA
-// from now, we have a full standard lib in namespace std
-#      define _STLP_NATIVE_INCLUDE_PATH       ../include_std
-#      define _STLP_NATIVE_C_INCLUDE_PATH     ../include_std
-#      define _STLP_NATIVE_CPP_C_INCLUDE_PATH ../include_std
-// #      define _STLP_HPACC_ONLY_NATIVE_STRING 1 // STLPort _string.c includes <locale>
-#     define _STLP_HP_ACC_COMPAT            -1
-#    else // kind of compatibility mode
-#     define _STLP_NATIVE_INCLUDE_PATH       ../include
-#     define _STLP_NATIVE_C_INCLUDE_PATH     ../include
-#     define _STLP_NATIVE_CPP_C_INCLUDE_PATH ../include
-#     define _STLP_VENDOR_GLOBAL_STD         1
-#     define _STLP_VENDOR_GLOBAL_CSTD        1
-#     define _STLP_HAS_NO_NEW_IOSTREAMS      1
-// comment if  "-Wc,-koenig_lookup,on" id used
-#     define _STLP_NO_KOENIG_LOOKUP          1
-#     define _STLP_DONT_THROW_RANGE_ERRORS   1
-#     define _STLP_NO_ROPE                   1
-#    endif /* _NAMESPACE_STD */
-#   endif /* 314 */
-
-#  if ((__HP_aCC >= 30000 && __HP_aCC < 31400) || (__HP_aCC == 1)) // A.03.13: __HP_aCC == 1
-
-#if (__HP_aCC != 1)
-#   define _STLP_HAS_NO_NEW_C_HEADERS 1
-#endif
-
-#   define _STLP_HAS_NO_NEW_IOSTREAMS
-#   define _STLP_NO_QUALIFIED_FRIENDS       1
-// aCC bug ? need explicit args on constructors of partial specialized
-// classes
-#   define _STLP_PARTIAL_SPEC_NEEDS_TEMPLATE_ARGS 1
-// ?? fbp: really needed ?
-#   define _STLP_STATIC_ARRAY_BUG 1
-// ?? fbp : maybe present in some versions ?
-#   define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1
-#   define _STLP_NO_MEMBER_TEMPLATE_KEYWORD 1
-// <exception> and stuff is in global namespace
-#   define _STLP_VENDOR_GLOBAL_EXCEPT_STD
-// fbp : moved here
-#     define _STLP_VENDOR_GLOBAL_CSTD        1
-// #     define _INCLUDE_HPUX_SOURCE
-#   define _XPG4
-#   define _INCLUDE_XOPEN_SOURCE
-#   define _INCLUDE_AES_SOURCE
-#  endif /* < 314 */
-#   if __HP_aCC == 1
-#     define _STLP_BROKEN_USING_IN_CLASS
-#     define _STLP_USING_BASE_MEMBER
-#     define _STLP_NO_CWCHAR
-// #     define _STLP_NO_WCHAR_T 1
-#   endif
-# endif /* HP_ACC */
-
-// 
-# ifndef __HP_aCC
-#  define _STLP_NATIVE_INCLUDE_PATH ../CC
-#  define _STLP_NATIVE_C_INCLUDE_PATH ../include
-// it is HP's old cfront-based compiler.
-#  define _STLP_NO_BOOL 1
-// #  define _STLP_DONT_USE_BOOL_TYPEDEF 1
-#  define _STLP_NO_NEW_NEW_HEADER 1 
-#  define _STLP_HAS_NO_NEW_IOSTREAMS 1
-#  define _STLP_LIMITED_DEFAULT_TEMPLATES 1
-#  define _STLP_NO_SIGNED_BUILTINS
-#  define _STLP_HAS_NO_NAMESPACES 1
-#  define _STLP_NEED_TYPENAME 1
-#  define _STLP_NEED_EXPLICIT 1
-#  define _STLP_NO_EXCEPTION_SPEC 1
-#  define _STLP_NONTEMPL_BASE_MATCH_BUG 1
-#  define _STLP_NO_ARROW_OPERATOR 1
-#  define _STLP_BASE_MATCH_BUG
-#  define _STLP_BASE_TYPEDEF_OUTSIDE_BUG 1
-#  define _STLP_NO_NEW_STYLE_CASTS 1
-// #  define _STLP_NO_WCHAR_T 1
-// #  define _STLP_LONG_LONG long long
-#  define _STLP_NEED_MUTABLE 1
-#  define _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX 1
-#  define _STLP_NO_BAD_ALLOC 1
-#  define _STLP_NO_MEMBER_TEMPLATES 1
-#  define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1
-#  define _STLP_NO_MEMBER_TEMPLATE_KEYWORD 1
-#  define _STLP_NO_FRIEND_TEMPLATES 1
-#  define _STLP_NO_QUALIFIED_FRIENDS 1
-#  define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1
-#  define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER 1
-#  define _STLP_MEMBER_POINTER_PARAM_BUG 1
-#  define _STLP_NON_TYPE_TMPL_PARAM_BUG 1
-#  define _STLP_NO_DEFAULT_NON_TYPE_PARAM 1
-// #  define _STLP_NO_METHOD_SPECIALIZATION 1
-#  define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS 1
-#  define _STLP_NO_EXCEPTION_HEADER 1
-#  define _STLP_DEFAULT_CONSTRUCTOR_BUG 1
-#  define _STLP_HAS_NO_NEW_C_HEADERS 1
-// #  define _STLP_STATIC_CONST_INIT_BUG 1
-// #  define _STLP_THROW_RETURN_BUG 1
-// #  define _STLP_LINK_TIME_INSTANTIATION 1
-// #  define _STLP_NO_TEMPLATE_CONVERSIONS 1
-#  define _STLP_NO_TYPEINFO 1
-#  define _STLP_WCHAR_T_IS_USHORT 1
-
-# endif /* cfront */
-
diff --git a/src/STLport/config/stl_ibm.h b/src/STLport/config/stl_ibm.h
deleted file mode 100644
index 7b00820..0000000
--- a/src/STLport/config/stl_ibm.h
+++ /dev/null
@@ -1,139 +0,0 @@
-// STLport configuration file
-// It is internal STLport header - DO NOT include it directly
-
-#if !defined(__IBMCPP__) || (__IBMCPP__ < 500)
-# define _STLP_HAS_NO_NEW_C_HEADERS 1
-#endif
-
-// string literal problem, same as with SUN and aCC
-# define _STLP_INLINE_STRING_LITERAL_BUG 1
-# define _STLP_HAS_NATIVE_FLOAT_ABS
-
-#  define _STLP_DEFAULT_CONSTRUCTOR_BUG 1
-
-
-# ifdef __IBMCPP__
-#  define _STLP_HAS_SPECIFIC_PROLOG_EPILOG
-# endif
-
-// #  if ( defined (__MULTI__) && defined (__WINDOWS__))
-// #   define  _STLP_WIN32THREADS 1          // Only Visual Age 3.5 for Windows
-// #  endif
-
-#  if ( defined (__MULTI__) && defined (__OS2__))
-#   define _STLP_OS2THREADS 1
-#  endif
-
-// __TEMPINC__ is set when /Ft+ option is used
-#  ifdef __TEMPINC__
-#    define _STLP_LINK_TIME_INSTANTIATION 1
-#  endif
-
-# if defined (__MVS__)
-// long long support is buggy - reported by Tinny Ng
-// #  if __EXTENDED__ && __COMPILER_VER__ >= 0x22060000
-// #   define _STLP_LONG_LONG long long
-// #  endif
-// boris : hstash reported it can be treated like UNIX
-#  define _STLP_UNIX 1
-#  define _STLP_NO_TYPEINFO 1
-#  undef _STLP_NATIVE_INCLUDE_PATH
-#  define _STLP_NATIVE_INCLUDE_PATH /usr/lpp/ioclib/include
-// same for C headers like <string.h>
-#  undef _STLP_NATIVE_C_INCLUDE_PATH
-#  define _STLP_NATIVE_C_INCLUDE_PATH /usr/include
-#  define _STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH /usr/include
-
-# elif (defined (__WINDOWS__) || defined (_AIX) || defined (__OS2__) ) && (__IBMCPP__ >= 350)
-
-#  define _STLP_LONG_LONG long long
-
-#endif
-
-#if !( defined( __xlC__ ) && __xlC__ >= 0x500 )
-
-// AIX xlC 3.1 , 3.0.1 ==0x301
-// Visual Age C++ 3.x
-// OS-390 C++
-// fbp : should be more version-specific!
-
-#  define _STLP_NO_BOOL 1
-#  define _STLP_DONT_USE_BOOL_TYPEDEF 1
-#  define _STLP_LIMITED_DEFAULT_TEMPLATES 1
-#  define _STLP_HAS_NO_NAMESPACES 1
-#  define _STLP_NEED_TYPENAME 1
-#  define _STLP_NEED_EXPLICIT 1
-#  define _STLP_NO_ARROW_OPERATOR 1
-#  define _STLP_NO_NEW_STYLE_CASTS 1
-#  define _STLP_NO_WCHAR_T 1
-#  define _STLP_NEED_MUTABLE 1
-#  define _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX 1
-#  define _STLP_NO_BAD_ALLOC 1
-
-#  define _STLP_NO_MEMBER_TEMPLATES 1
-#  define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1
-#  define _STLP_NO_MEMBER_TEMPLATE_KEYWORD 1
-#  define _STLP_NO_FRIEND_TEMPLATES 1
-#  define _STLP_NO_QUALIFIED_FRIENDS 1
-#  define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1
-#  define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER 1
-
-#  define _STLP_NO_DEFAULT_NON_TYPE_PARAM 1
-#  define _STLP_NO_METHOD_SPECIALIZATION 1
-#  define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS 1
-#  define _STLP_NO_EXCEPTION_HEADER 1
-
-#  define _STLP_HAS_NO_NEW_IOSTREAMS 1
-#  define _STLP_NO_NEW_NEW_HEADER 1
-
-#  if defined (__OS2__) && (__IBMCPP__ <= 350)
-#   define _STLP_NO_TYPEINFO 1
-#  endif
-#  define _STLP_NO_NEW_NEW_HEADER 1
-
-#  define _STLP_STATIC_CONST_INIT_BUG 1
-// #  define _STLP_THROW_RETURN_BUG 1
-
-
-#  define _STLP_NO_TEMPLATE_CONVERSIONS 1
-#  define _STLP_UNINITIALIZABLE_PRIVATE 1
-#  define _STLP_BASE_TYPEDEF_OUTSIDE_BUG 1
-#  define _STLP_STATIC_ARRAY_BUG 1
-
-// AIX xlC, Visual Age 3.0 for OS/2 and MS 
-#  define _STLP_TRIVIAL_DESTRUCTOR_BUG
-
-#  define _STLP_NON_TYPE_TMPL_PARAM_BUG 1
-#  define _STLP_NONTEMPL_BASE_MATCH_BUG 1
-
-#if __IBMCPP__ <= 350
-#  define _STLP_NEED_UNREACHABLE_RETURN 1
-#endif
-
-#if __IBMCPP__ < 350
-#  define _STLP_NO_LONG_DOUBLE 1
-#endif
-
-#if __IBMCPP__ >= 365
-// does not have new C headers, but has div()
-#  define _STLP_LDIV
-#endif
-
-#endif /* xlC 5 */
-
-/* detect xlC5 by: */
-#if defined(__IBMCPP__) && (500 <= __IBMCPP__) && (__IBMCPP__ < 700)
-// #define _STLP_USE_EXCEPTIONS 1
-# define _STLP_STATIC_CONST_INIT_BUG 1 
-//#pragma report(disable,CPPC1500029)
-// unsigned 32-bit integer type
-#  define _STLP_UINT32_T unsigned int
-#if defined(_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 >= 4)
-# define _STLP_RAND48 1
-#endif
-// #  define _STLP_RAND48 1
-# endif /* __IBMCPP__ == 500 */
-
-
-
-
diff --git a/src/STLport/config/stl_icc.h b/src/STLport/config/stl_icc.h
deleted file mode 100644
index bf0faff..0000000
--- a/src/STLport/config/stl_icc.h
+++ /dev/null
@@ -1,49 +0,0 @@
- /* stl_icc.h
-  * *
-  * * A list of Intel compiler for Linux portion of STLport settings.
-  * * This file is being included by stlcomp.h
-  * */
-# ifndef _STLP_ICC_H
-# define _STLP_ICC_H
-
-# define _STLP_UINT32_T unsigned long
-# define _STLP_LONG_LONG long long
-# define _STLP_TYPENAME_ON_RETURN_TYPE typename
-
-// Edit relative path below (or put full path) to get native
-// compiler headers included. Default is "../include".
-// C headers may reside in different directory, so separate macro is provided.
-# if (__INTEL_COMPILER < 800)
-# define _STLP_NATIVE_INCLUDE_PATH ../include
-# else
-// The header of files have moved to a new location on Linux Intel C++ compiler 
-// starting with version 8, which has GCC 3.2 compatability.
-# define _STLP_NATIVE_INCLUDE_PATH ../include/c++
-# define _STLP_NATIVE_OLD_STREAMS_INCLUDE_PATH _STLP_NATIVE_INCLUDE_PATH/backward
-#   ifndef __GNUC__ 
-//  If GCC compatability is diabled (-no-gcc is specified) STD needs to be redefined.
-#   define _STLP_REDEFINE_STD 1
-#   endif
-# endif
-# define _STLP_NATIVE_C_INCLUDE_PATH ../include
-# define _STLP_NATIVE_CPP_C_INCLUDE_PATH ../include
-
-// This macro constructs header path from directory and name.
-# define _STLP_MAKE_HEADER(path, header) <path/header>
-// This macro constructs native include header path from include path and name.
-# define _STLP_NATIVE_HEADER(header) _STLP_MAKE_HEADER(_STLP_NATIVE_INCLUDE_PATH,header)
-
-# define _STLP_NATIVE_CPP_C_HEADER(header) _STLP_MAKE_HEADER(_STLP_NATIVE_INCLUDE_PATH,header)
-
-// Same for C headers
-# define _STLP_NATIVE_C_HEADER(header) _STLP_MAKE_HEADER(_STLP_NATIVE_C_INCLUDE_PATH,header)
-
-# undef _STLP_WINCE
-
-# ifndef __GNUC__ 
-# define __GNUC__ 1
-# endif
-
-# define _STLP_NO_NATIVE_WIDE_FUNCTIONS 1
-# endif
-
diff --git a/src/STLport/config/stl_intel.h b/src/STLport/config/stl_intel.h
deleted file mode 100644
index 9ef13ca..0000000
--- a/src/STLport/config/stl_intel.h
+++ /dev/null
@@ -1,14 +0,0 @@
-// STLport configuration file
-// It is internal STLport header - DO NOT include it directly
-
-# if (__ICL >= 450)
-#  define _STLP_DLLEXPORT_NEEDS_PREDECLARATION 1
-# endif
-
-# define _STLP_IMPORT_TEMPLATE_KEYWORD extern
-
-# include <config/stl_msvc.h>
-
-# undef  _STLP_LONG_LONG
-# define _STLP_LONG_LONG long long
-
diff --git a/src/STLport/config/stl_kai.h b/src/STLport/config/stl_kai.h
deleted file mode 100644
index cb883c0..0000000
--- a/src/STLport/config/stl_kai.h
+++ /dev/null
@@ -1,58 +0,0 @@
-// STLport config file for KAI C++ compiler
-
-#if defined(_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 >= 4)
-# define _STLP_RAND48 1
-#endif
-
-#  ifndef __KAI_STRICT /* _NO_LONGLONG */
-#   define _STLP_LONG_LONG long long
-#  endif
-
-#  if !defined (__EXCEPTIONS) && ! defined (_EXCEPTIONS)
-#    define _STLP_HAS_NO_EXCEPTIONS
-#  endif
-
-# ifndef __BUILDING_STLPORT
-#  define _STLP_LINK_TIME_INSTANTIATION 1
-# endif
-
-// two levels of macros do not work good with kcc.
-#   define _STLP_NATIVE_HEADER(header)    <../include/##header> 
-#   define _STLP_NATIVE_C_HEADER(header)    <../include/##header> 
-#   define _STLP_NATIVE_CPP_C_HEADER(header)    <../include/##header> 
-#   define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) <../include/##header>
-
-# ifdef _WIN32
-#  define _STLP_MINIMUM_IMPORT_STD
-# endif
-
-// KAI C++ uses EDG front-end, but apparently different switches
-// #  define __EDG_SWITCHES 1
-
-
-#  define _STLP_VENDOR_GLOBAL_CSTD 1
-#  define _STLP_VENDOR_MB_NAMESPACE std
-
-// boris : some of those may also apply to KCC 3.4
-# if __KCC_VERSION < 4000
-#  define _STLP_VENDOR_GLOBAL_EXCEPT_STD 1
-
-# endif
-
-// this is multiplatform compiler, so here should go system-dependant section
-// This really should be in platform-specific files, like stl_solaris.h
-# ifdef __linux__
-#  define _STLP_NO_NATIVE_WIDE_STREAMS 1
-#  define _STLP_NO_NATIVE_WIDE_FUNCTIONS 1
-# elif defined (__sun) || defined (sun)
-// # define _STLP_VENDOR_MB_NAMESPACE
-#  include <config/stl_solaris.h>
-# elif defined (__hpux)
-#  define _STLP_NO_NATIVE_WIDE_FUNCTIONS
-# elif defined (__sgi)
-// this requires some discrimination on whether we are actually on 
-// a system officially supported by KAI. 
-#  define _STLP_HAS_NO_NEW_C_HEADERS 1
-#  include <standards.h>
-# endif
-
diff --git a/src/STLport/config/stl_mlc.h b/src/STLport/config/stl_mlc.h
deleted file mode 100644
index be6a5f7..0000000
--- a/src/STLport/config/stl_mlc.h
+++ /dev/null
@@ -1,8 +0,0 @@
-// STLport configuration file
-// It is internal STLport header - DO NOT include it directly
-
-#define _STLP_NO_MEMBER_TEMPLATES           	// Compiler does not support member templates
-#define _STLP_NO_MEMBER_TEMPLATE_CLASSES    	// Compiler does not support member template classes
-
-#define _STLP_HAS_NEW_NEW_HEADER
-#define _STLP_HAS_NO_NEW_IOSTREAMS              // Native C++ library does not provide new-style templatized iostreams
diff --git a/src/STLport/config/stl_msvc.h b/src/STLport/config/stl_msvc.h
deleted file mode 100644
index ebdfc1e..0000000
--- a/src/STLport/config/stl_msvc.h
+++ /dev/null
@@ -1,208 +0,0 @@
-// STLport configuration file
-// It is internal STLport header - DO NOT include it directly
-// Microsoft Visual C++ 4.0, 4.1, 4.2, 5.0, 6.0, 7.0, 7.1, ICL
-
-
-// Common features for VC++ 4.0 and higher
-# ifdef _M_IA64
-#  define _STLP_NATIVE_HEADER(x) <../crt/##x>
-#  define _STLP_NATIVE_C_HEADER(x) <../crt/##x>
-#  define _STLP_NATIVE_CPP_C_HEADER(x) <../crt/##x>
-#  define _STLP_NATIVE_OLD_STREAMS_HEADER(x) <../crt/##x>
-#  define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) <../crt/##header>
-#  define _STLP_GLOBAL_NEW_HANDLER
-# else
-#  define _STLP_NATIVE_HEADER(x) <../include/##x>
-#  define _STLP_NATIVE_C_HEADER(x) <../include/##x>
-#  define _STLP_NATIVE_CPP_C_HEADER(x) <../include/##x>
-#  define _STLP_NATIVE_OLD_STREAMS_HEADER(x) <../include/##x>
-#  define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) <../include/##header>
-# endif
-
-# define _STLP_CALL __cdecl
-
-# ifndef _STLP_LONG_LONG
-#  define _STLP_LONG_LONG  __int64
-# endif
-
-# define _STLP_PRAGMA_ONCE
-
-// these switches depend on compiler flags
-# ifndef _CPPUNWIND
-#  define _STLP_HAS_NO_EXCEPTIONS 1
-# endif
-
-# define _STLP_VENDOR_UNEXPECTED_STD
-
-# if defined ( _MT ) && !defined (_STLP_NO_THREADS)  && !defined (_REENTRANT)
-#   define _REENTRANT 1
-# endif
-
-# if !defined (_NATIVE_WCHAR_T_DEFINED)
-# define _STLP_WCHAR_T_IS_USHORT 1
-# endif
-
-# define _STLP_MINIMUM_IMPORT_STD
-
-# ifdef _STLP_MSVC
-
-# ifndef _STLP_MSVC50_COMPATIBILITY
-#  define _STLP_MSVC50_COMPATIBILITY   1
-# endif
-
-#  define _STLP_DLLEXPORT_NEEDS_PREDECLARATION 1
-#  define _STLP_HAS_SPECIFIC_PROLOG_EPILOG
-
-// # ifndef __BUILDING_STLPORT
-// #  define _STLP_USE_TEMPLATE_EXPORT 1
-// # endif
-
-# if (_STLP_MSVC >= 1310)
-# define _STLP_NO_METHOD_SPECIALIZATION 1
-# endif	//	(_STLP_MSVC >= 1310)
-
-#  if (_STLP_MSVC > 1100)
-     typedef char __stl_char;
-#   define _STLP_DEFAULTCHAR __stl_char
-#  endif /* (_STLP_MSVC < 1100 ) */
-
-# if (_STLP_MSVC <= 1310)
-# define _STLP_STATIC_CONST_INIT_BUG   1
-# endif	//	(_STLP_MSVC <= 1310)
-
-# if (_STLP_MSVC <= 1300) 
-#  define _STLP_DEFAULT_CONSTRUCTOR_BUG 1
-
-#  define _STLP_NO_TYPENAME_IN_TEMPLATE_HEADER
-// fails to properly resolve call to sin() from within sin()
-#  define _STLP_SAME_FUNCTION_NAME_RESOLUTION_BUG
-#  define _STLP_NO_TYPENAME_ON_RETURN_TYPE 1
-// boris : not defining this macro for SP5 causes other problems
-// #  if !defined (_MSC_FULL_VER) || (_MSC_FULL_VER < 12008804 )
-#  define _STLP_NO_USING_FOR_GLOBAL_FUNCTIONS 1
-//#  endif
-#  define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER 1
-#  define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1
-#  define _STLP_NO_FRIEND_TEMPLATES
-// VC++ cannot handle default allocator argument in template constructors
-#  define _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS
-// there is no partial spec, and MSVC breaks on simulating it for iterator_traits queries
-#  define _STLP_USE_OLD_HP_ITERATOR_QUERIES
-// #  define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS 1
-#  define _STLP_NO_QUALIFIED_FRIENDS    1
-#  define _STLP_DONT_USE_BOOL_TYPEDEF 1
-# endif /* _STLP_MSVC <= 1300 */
-
-# endif /* _STLP_MSVC */
-
-# if (_MSC_VER <= 1310) 
-#  define _STLP_VENDOR_GLOBAL_CSTD
-// They included the necessary coding,
-// but the beta still has an issue with template classes
-// ok:    class a { static const int v = 2; };
-// error: template <class _Tp> class a { static const int v = 2; };
-#  if !defined (_STLP_WHOLE_NATIVE_STD) && ! defined (_STLP_REDEFINE_STD)
-#    define _STLP_REDEFINE_STD
-#  endif
-# endif /* (_MSC_VER <= 1310) */
-
-# if (_MSC_VER <= 1200)  // including MSVC 6.0
-//  these work, as long they are inline
-#  define _STLP_INLINE_MEMBER_TEMPLATES 1
-#  define _STLP_NO_MEMBER_TEMPLATE_KEYWORD 1
-#  define _STLP_GLOBAL_NEW_HANDLER
-#  define _STLP_DONT_RETURN_VOID 1
-#  define _STLP_DONT_USE_NESTED_TCLASS_THROUGHT_TPARAM 1
-# endif /* (_MSC_VER <= 1200) */
-
-# if ( _MSC_VER<=1010 )
-// "bool" is reserved in MSVC 4.1 while <yvals.h> absent, so :
-// #    define _STLP_USE_ABBREVS           1
-#  define _STLP_NO_BAD_ALLOC
-#  define _STLP_HAS_NO_NEW_C_HEADERS 1
-#  define _STLP_NO_NEW_NEW_HEADER 1
-# elif (_MSC_VER < 1100)
-// VC++ 4.2 and higher
-#  define _STLP_YVALS_H 1
-#  define _STLP_HAS_NO_NEW_IOSTREAMS 1
-# endif /* 1010 */
-
-# if defined (_STLP_MSVC) && ( _STLP_MSVC < 1200 ) /* VC++ 6.0 */
-// #  define _STLP_NO_MEMBER_TEMPLATES 1
-// #  define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS 1
-#  define _STLP_NON_TYPE_TMPL_PARAM_BUG 1 
-#  define _STLP_THROW_RETURN_BUG 1
-#  define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1
-# endif
-
-# if defined (_STLP_MSVC) && ( _STLP_MSVC < 1100 )
-#  ifndef _STLP_NO_OWN_IOSTREAMS
-#   define _STLP_NO_OWN_IOSTREAMS
-#   undef  _STLP_OWN_IOSTREAMS
-#  endif
-// #  define _STLP_NESTED_TYPE_PARAM_BUG 1
-// Debug mode does not work for 4.2
-#  ifdef _STLP_DEBUG
-#   pragma message ("STLport debug mode does not work for VC++ 4.2, turning _STLP_DEBUG off ...")
-#    undef _STLP_DEBUG
-#  endif
-#  define _STLP_NO_BOOL            1
-#  define _STLP_NEED_TYPENAME      1
-#  define _STLP_NEED_EXPLICIT      1
-#   define _STLP_NEED_MUTABLE       1
-#   define _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX
-#   define _STLP_LIMITED_DEFAULT_TEMPLATES 1
-
-// up to 4.2, library is in global namespace
-#   define _STLP_VENDOR_GLOBAL_STD
-#   define _STLP_NONTEMPL_BASE_MATCH_BUG 1
-#   define _STLP_BROKEN_USING_DIRECTIVE  1
-#   define _STLP_NO_ARROW_OPERATOR
-#   define _STLP_NO_SIGNED_BUILTINS 1
-#   define _STLP_NO_EXCEPTION_SPEC 1
-#   undef  _STLP_DEFAULT_TYPE_PARAM
-#   undef  _STLP_HAS_NO_NAMESPACES
-#   undef  _STLP_NO_AT_MEMBER_FUNCTION
-#   undef  _STLP_NO_MEMBER_TEMPLATES
-#   undef  _STLP_NO_MEMBER_TEMPLATE_CLASSES
-#   define  _STLP_HAS_NO_NAMESPACES 1
-#   define  _STLP_NO_AT_MEMBER_FUNCTION 1
-#  define  _STLP_NO_MEMBER_TEMPLATES
-#  define  _STLP_NO_MEMBER_TEMPLATE_CLASSES
-# endif /* 1100 */
-
-// If we are under Windows CE, include appropriate config
-
-# ifdef UNDER_CE
-#   include <config/stl_wince.h>
-# endif
-
-# ifdef __ICL
-#  define _STLP_LIB_BASENAME "stlport_icl"
-# else
-# if (_MSC_VER >= 1310) 
-#   define _STLP_LIB_BASENAME "stlport_vc71"
-# elif (_MSC_VER >= 1300) 
-#   define _STLP_LIB_BASENAME "stlport_vc7"
-# elif (_MSC_VER >= 1200)
-#    define _STLP_LIB_BASENAME "stlport_vc6"
-//#   endif
-#  elif (_MSC_VER >= 1100)
-//#   ifdef _UNICODE
-//#    define _STLP_LIB_BASENAME "stlport_vc5_unicode"
-//#   else
-#    define _STLP_LIB_BASENAME "stlport_vc5"
-//#   endif
-#  endif /* (_MSC_VER >= 1200) */
-# endif /* __ICL */
-
-
-#    if (defined (__ICL) && (__ICL < 450)) || (_MSC_VER < 1200)
-//    only static STLport lib now works for ICL and VC 5.0
-#     undef  _STLP_USE_STATIC_LIB
-#     define _STLP_USE_STATIC_LIB
-//    disable hook which makes template symbols to be searched for in the library
-#     undef _STLP_NO_CUSTOM_IO
-#    endif
-
-#   include <config/vc_select_lib.h>
diff --git a/src/STLport/config/stl_mwerks.h b/src/STLport/config/stl_mwerks.h
deleted file mode 100644
index 5c9d5aa..0000000
--- a/src/STLport/config/stl_mwerks.h
+++ /dev/null
@@ -1,140 +0,0 @@
-// STLport configuration file
-// It is internal STLport header - DO NOT include it directly
-
-// Bring in definition of __MSL__ and related items
-#include <mslGlobals.h>
-#include <ansi_parms.h>
-
-//
-//  Compiler features
-//
-
-
-// *** CodeWarrior Compiler Common Features ***
-#  if __option(longlong)
-#   define _STLP_LONG_LONG	long long
-#  endif
-
-#  define _STLP_USE_UNIX_EMULATION_IO	1
-#  define _STLP_USE_AUTO_PTR_CONVERSIONS	1
-
-# ifdef __INTEL__
-#  define _STLP_LITTLE_ENDIAN
-# else
-#  define _STLP_BIG_ENDIAN
-# endif
-
-#if defined(_MSL_NO_LOCALE)
-#define _STLP_NO_IMPORT_LOCALE
-#endif
-#if !__option( wchar_type )
-# define _STLP_WCHAR_T_IS_USHORT
-#endif
-
-// *** CodeWarrior Compiler Common Bugs ***
-#  define __MSL_FIX_ITERATORS__(myType)		// Some MSL headers rely on this
-#  define _STLP_NO_FRIEND_TEMPLATES 1	// Bug mysteriously reintroduced in this version.
-#  define _STLP_THROW_RETURN_BUG	1
-
-//  *** Version-specific settings ***
-
-#  if __MWERKS__ >= 0x2405
-#   define _STLP_HAS_NATIVE_FLOAT_ABS
-#  endif
-
-#  if __MWERKS__ < 0x2405
-#   define _STLP_STATIC_CONST_INIT_BUG
-#  endif
-
-#  if __MWERKS__ <= 0x2303
-#   define _STLP_NO_TEMPLATE_CONVERSIONS	1
-#   define _STLP_NO_MEMBER_TEMPLATE_KEYWORD	1
-#  endif
-
-#  if __MWERKS__ < 0x2301
-#   define _STLP_MEMBER_SPECIALIZATION_BUG	1
-#  endif
-
-#  if __MWERKS__ < 0x2300		// CW Pro5 features
-#   define _STLP_INLINE_MEMBER_TEMPLATES 1
-#   define _STLP_RELOPS_IN_STD_BUG	 1
-#   define _STLP_DEFAULT_CONSTRUCTOR_BUG 1
-#   define _STLP_NO_TYPENAME_ON_RETURN_TYPE
-#  endif
-
-#  if __MWERKS__ < 0x2200		// CW Pro4 features
-#   define _STLP_BROKEN_USING_DIRECTIVE	1
-#   define _STLP_NO_MEMBER_TEMPLATES 1
-#   define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1
-#   define _STLP_NO_MEMBER_TEMPLATE_KEYWORD 1
-#   define _STLP_NO_FRIEND_TEMPLATES 1
-#   define _STLP_NO_QUALIFIED_FRIENDS 1
-#   define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER 1
-#  endif
-
-#  if __MWERKS__ < 0x2100			// CW Pro3 features
-#   define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1
-#   define _STLP_HAS_NO_NAMESPACES 1
-#   define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS 1
-
-#   define _STLP_NEED_TYPENAME				1
-#   define _STLP_NO_ARROW_OPERATOR 1
-#   define _STLP_TEMPLATE_PARAM_SUBTYPE_BUG	1
-#   define _STLP_FORCED_INLINE_INSTANTIATION_BUG	1
-#   define _STLP_MULTI_CONST_TEMPLATE_ARG_BUG	1
-#   define _STLP_INLINE_NAME_RESOLUTION_BUG	1
-// *** Metrowerks Standard Library Bug ***
-#   define _STLP_MSVC50_COMPATIBILITY 1
-#  endif
-
-#  if __MWERKS__ < 0x2000			// v. 2.0 features
-#   define _STLP_NO_WCHAR_T 1
-#   define _STLP_NO_DEFAULT_NON_TYPE_PARAM 1
-#   define _STLP_NON_TYPE_TMPL_PARAM_BUG	1	// dwa 8/21/97 - this bug fixed for CWPro2
-#   define _STLP_UNINITIALIZABLE_PRIVATE  1		// dwa 10/23/97 - this bug fixed for CWPro2
-#  endif
-
-#  if __MWERKS__ < 0x1900         				// dwa 8/19/97 - 1.9 Compiler feature defines
-#   define _STLP_LIMITED_DEFAULT_TEMPLATES 1
-#   define _STLP_BASE_TYPEDEF_BUG        1
-#   define _STLP_BASE_MATCH_BUG   1
-#   define _STLP_NONTEMPL_BASE_MATCH_BUG 1
-#   define _STLP_DEFAULT_TYPE_PARAM  1			// More limited template parameters
-
-#   if __MWERKS__ < 0x1800
-    __GIVE_UP_WITH_STL(CW_18)
-#   endif
-
-#  endif
-
-
-// fixes to native inclusion wrappers. 
-# if __MWERKS__ >= 0x2300	// CWPro5 changes paths - dwa 2/28/99
-
-#  define _STLP_NATIVE_INCLUDE_PATH  ../include
-#  define _STLP_NATIVE_C_INCLUDE_PATH  ../include
-#  define _STLP_NATIVE_HEADER(header)     <../include/##header>  
-#  define _STLP_NATIVE_CPP_C_HEADER(header)     <../include/##header>
-#  define _STLP_NATIVE_C_HEADER(header)     <../include/##header>
-#  define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) <../include/##header>
-
-# else
-
-#  define _STLP_NATIVE_INCLUDE_PATH  Macintosh HD:Codewarrior Pro 4:Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C++:Include
-#  define _STLP_NATIVE_C_INCLUDE_PATH  Macintosh HD:Codewarrior Pro 4:Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:MSL Common:Public Includes
-#  define _STLP_NATIVE_HEADER(header)     <Macintosh HD:Codewarrior Pro 4:Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C++:Include:##header>
-#  define _STLP_NATIVE_CPP_C_HEADER(header)     <Macintosh HD:Codewarrior Pro 4:Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C++:Include:##header>
-#  define _STLP_NATIVE_C_HEADER(header)     <Macintosh HD:Codewarrior Pro 4:Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:MSL Common:Public Includes:##header>
-#   define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) <Macintosh HD:Codewarrior Pro 4:Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:MSL Common:Public Includes:##header>
-
-# endif
-
-     // fbp
-# if !defined( __MSL_CPP__ ) || __MSL_CPP__ <= 0x4105
-#   define _STLP_NO_NATIVE_WIDE_STREAMS 1
-#  endif
-
-# define _STLP_LIB_BASENAME stlport_mwerks_x86
-# define _STLP_DLLEXPORT_NEEDS_PREDECLARATION 1
-
-// # include <config/vc_select_lib.h>
diff --git a/src/STLport/config/stl_mycomp.h b/src/STLport/config/stl_mycomp.h
deleted file mode 100644
index d887f5d..0000000
--- a/src/STLport/config/stl_mycomp.h
+++ /dev/null
@@ -1,268 +0,0 @@
-/*
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/*
- * Purpose of this file :
- *
- * A list of COMPILER-SPECIFIC portion of STLport settings.
- * This file is provided to help in manual configuration
- * of STLport. This file is being included by stlcomp.h 
- * when STLport is unable to identify your compiler.
- * Please remove the error diagnostic below before adjusting 
- * macros.
- * 
- */
-# ifndef _STLP_MYCOMP_H
-#  define  _STLP_MYCOMP_H
-
-# error "Your compiler version is not recognized by STLport. Please edit <config/stl_mycomp.h>"
-
-//==========================================================
-
-// the values choosen here as defaults try to give
-// maximum functionality on the most conservative settings
-
-// Mostly correct guess, change it for Alpha (and other environments
-// that has 64-bit "long")
-// #  define _STLP_UINT32_T unsigned long
-
-// Disables wchar_t functionality
-// #  define _STLP_NO_WCHAR_T  1
-
-// Define if wchar_t is not a unique type, and is actually a typedef to unsigned short. 
-// #  define _STLP_WCHAR_T_IS_USHORT 1
-
-// Uncomment if long long is available
-// #  define _STLP_LONG_LONG long long
-
-// Uncomment if long double is not available
-// #  define _STLP_NO_LONG_DOUBLE 1
-
-// Uncomment this if your compiler does not support "typename" keyword
-// #  define _STLP_NEED_TYPENAME 1
-
-// Uncomment this if your compiler does not support "mutable" keyword
-// #  define _STLP_NEED_MUTABLE 1
-
-// Uncomment this if your compiler does not support "explicit" keyword
-// #  define _STLP_NEED_EXPLICIT 1
-
-// Uncomment if new-style-casts like const_cast<> are not available
-// #  define _STLP_NO_NEW_STYLE_CASTS 1
-
-// Uncomment this if your compiler does not have "bool" type
-// #  define  _STLP_NO_BOOL 1
-
-// Uncomment this if your compiler does not have "bool" type, but has "bool" keyword reserved
-// #  define  _STLP_DONT_USE_BOOL_TYPEDEF 1
-
-// Uncomment this if your compiler does not have "bool" type, but defines "bool" in <yvals.h>
-// #  define  _STLP_YVALS_H 1
-
-// Uncomment this if your compiler has limited or no default template arguments for classes
-// #  define _STLP_LIMITED_DEFAULT_TEMPLATES 1
-
-// Uncomment this if your compiler support only complete (not dependent on other parameters)
-// types as default parameters for class templates
-// #  define _STLP_DEFAULT_TYPE_PARAM 1
-
-// Uncomment this if your compiler has problem with not-type
-// default template parameters
-// #  define _STLP_NO_DEFAULT_NON_TYPE_PARAM 1
-
-// Define if compiler has
-// trouble with functions getting non-type-parameterized classes as parameters
-// #  define _STLP_NON_TYPE_TMPL_PARAM_BUG 1
-
-// Uncomment this if your compiler lacks static data members.
-// Uncomment next line if your compiler supports __attribute__((weak))
-// #  define _STLP_NO_STATIC_TEMPLATE_DATA 1
-// #  define _STLP_WEAK_ATTRIBUTE 1
-
-// Uncomment this if your compiler does not support namespaces 
-// #  define _STLP_HAS_NO_NAMESPACES 1
-
-// Uncomment if "using" keyword does not work with template types 
-// # define _STLP_BROKEN_USING_DIRECTIVE 1
-
-// Uncomment this if your compiler does not support exceptions
-// #  define _STLP_HAS_NO_EXCEPTIONS 1
-
-// Uncomment this if your compiler does not support exception specifications
-// #  define _STLP_NO_EXCEPTION_SPEC
-
-// Define this if your compiler requires return statement after throw()
-// # define _STLP_THROW_RETURN_BUG 1
-
-// Define this if your compiler do not support return of void
-// # define _STLP_DONT_RETURN_VOID 1
-
-// Header <new> that comes with the compiler 
-// does not define bad_alloc exception
-// #  define _STLP_NO_BAD_ALLOC  1
-
-// Define this if your compiler do not throw bad_alloc from the new operator
-// #  define _STLP_NEW_DONT_THROW  1
-
-// Uncomment if member template methods are not available
-// #  define _STLP_NO_MEMBER_TEMPLATES   1
-
-// Uncomment if member template classes are not available
-// #  define _STLP_NO_MEMBER_TEMPLATE_CLASSES   1
-
-// Uncomment if you cannot access member template classe throught a class template parameter
-// # define _STLP_DONT_USE_NESTED_TCLASS_THROUGHT_TPARAM 1
-
-// Uncomment if no "template" keyword should be used with member template classes
-// #  define _STLP_NO_MEMBER_TEMPLATE_KEYWORD   1
-
-// Uncomment if friend member templates are not available
-// #  define _STLP_NO_FRIEND_TEMPLATES   1
-
-// Compiler does not accept friend declaration qualified with namespace name.
-// #  define _STLP_NO_QUALIFIED_FRIENDS 1
-
-// Uncomment if partial specialization is not available
-// #  define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1
-
-// Define if class being partially specialized require full name (template parameters)
-// of itself for method declarations
-// #  define _STLP_PARTIAL_SPEC_NEEDS_TEMPLATE_ARGS
-
-// Compiler has problems specializing members of partially 
-// specialized class
-// #  define _STLP_MEMBER_SPECIALIZATION_BUG
-
-// Uncomment if partial order of template functions is not available
-// #  define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER 1
-
-// Uncomment if specialization of methods is not allowed
-// #  define _STLP_NO_METHOD_SPECIALIZATION  1
-
-// Uncomment if full  specialization does not use partial spec. syntax : template <> struct ....
-// #  define _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX  1
-
-// Uncomment if compiler does not support explicit template arguments for functions
-// # define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS
-
-// Uncomment if "__typetraits is being instaniated automatically by the compiler (SGI only ?)
-// #  define _STLP_AUTOMATIC_TYPE_TRAITS 1
-
-// Uncomment this if your compiler can't inline while(), for()
-// #  define _STLP_LOOP_INLINE_PROBLEMS 1
-
-// Define if the compiler fails to match a template function argument of base
-// #  define _STLP_BASE_MATCH_BUG          1
-
-// Define if the compiler fails to match a template function argument of base
-// (non-template)
-//#  define  _STLP_NONTEMPL_BASE_MATCH_BUG 1
-
-// Define if the compiler rejects outline method definition 
-// explicitly taking nested types/typedefs
-// #  define _STLP_NESTED_TYPE_PARAM_BUG   1
-
-// Compiler requires typename keyword on outline method definition 
-// explicitly taking nested types/typedefs
-// #define  _STLP_TYPENAME_ON_RETURN_TYPE
-
-// Define if the baseclass typedefs not visible from outside
-// #  define _STLP_BASE_TYPEDEF_OUTSIDE_BUG 1
-
-// if your compiler have serious problems with typedefs, try this one
-// #  define _STLP_BASE_TYPEDEF_BUG          1
-
-// Uncomment if getting errors compiling mem_fun* adaptors
-// #  define _STLP_MEMBER_POINTER_PARAM_BUG 1
-
-// #  define _STLP_UNINITIALIZABLE_PRIVATE  1
-
-// Defined if the compiler
-// has trouble instantiating static array members with dimension defined as enum
-// # define _STLP_STATIC_ARRAY_BUG
-
-// * _STLP_STATIC_CONST_INIT_BUG: defined if the compiler can't handle a
-//   constant-initializer in the declaration of a static const data member
-//   of integer type.  (See section 9.4.2, paragraph 4, of the C++ standard.)
-// # define _STLP_STATIC_CONST_INIT_BUG
-
-// Define if default constructor for builtin integer type fails to initialize it to 0
-// #  define _STLP_DEFAULT_CONSTRUCTOR_BUG    1
-
-// Defined if constructor
-// required to explicitly call member's default constructors for const objects
-// #  define _STLP_CONST_CONSTRUCTOR_BUG    1
-
-// Defined if the compiler has trouble calling POD-types constructors/destructors
-// #  define _STLP_TRIVIAL_CONSTRUCTOR_BUG    1
-// #  define _STLP_TRIVIAL_DESTRUCTOR_BUG    1
-
-// Define if having problems specializing maps/sets with
-// key type being const 
-// #  define _STLP_MULTI_CONST_TEMPLATE_ARG_BUG
-
-// Uncomment this to disable -> operators on all iterators
-// #  define   _STLP_NO_ARROW_OPERATOR 1
-
-// Uncomment this to disble at() member functions for containers
-// #  define   _STLP_NO_AT_MEMBER_FUNCTION 1
-
-// Uncomment if native new-style iostreams are not available
-// #define    _STLP_HAS_NO_NEW_IOSTREAMS	1
-
-// Define this if compiler lacks <exception> header
-// #  define _STLP_NO_EXCEPTION_HEADER 1
-
-// Uncomment this if your C library has lrand48() function
-// #  define _STLP_RAND48 1
-
-// Uncomment if native new-style C library headers lile <cstddef>, etc are not available.
-// #   define _STLP_HAS_NO_NEW_C_HEADERS 1
-
-// uncomment if new-style headers <new> is available
-// #  define _STLP_HAS_NEW_NEW_HEADER 1
-
-// uncomment this if <iostream> and other STD headers put their stuff in ::namespace,
-// not std::
-// #  define _STLP_VENDOR_GLOBAL_STD
-
-// uncomment this if <cstdio> and the like put stuff in ::namespace,
-// not std::
-// #  define _STLP_VENDOR_GLOBAL_CSTD
-
-// Edit relative path below (or put full path) to get native 
-// compiler headers included. Default is "../include".
-// C headers may reside in different directory, so separate macro is provided.
-// Hint : never install STLport in the directory that ends with "include"
-// # define _STLP_NATIVE_INCLUDE_PATH ../include
-// # define _STLP_NATIVE_C_INCLUDE_PATH ../include
-// # define _STLP_NATIVE_CPP_C_INCLUDE_PATH ../include
-
-// This macro constructs header path from directory and name.
-// You may change it if your compiler does not understand "/". 
-// #  define _STLP_MAKE_HEADER(path, header) <path/header>
-
-// This macro constructs native include header path from include path and name.
-// You may have do define it if experirncing problems with preprocessor
-// # define _STLP_NATIVE_HEADER(header) _STLP_MAKE_HEADER(_STLP_NATIVE_INCLUDE_PATH,header)
-
-// Same for C headers
-// #define _STLP_NATIVE_C_HEADER(header)
-
-//==========================================================
-# endif
diff --git a/src/STLport/config/stl_sco.h b/src/STLport/config/stl_sco.h
deleted file mode 100644
index 05287ac..0000000
--- a/src/STLport/config/stl_sco.h
+++ /dev/null
@@ -1,35 +0,0 @@
-// SCO UDK 7 compiler (UnixWare 7x, OSR 5, UnixWare 2x)
-
-
-#  define _STLP_NO_BAD_ALLOC 1
-
-// allocator::rebind used not to work properly
-// #  define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1
-// #  define _STLP_NO_MEMBER_TEMPLATE_KEYWORD 1
-
-#  define _STLP_NO_FRIEND_TEMPLATES 1
-#  define _STLP_NO_QUALIFIED_FRIENDS 1
-
-
-// #  define _STLP_NO_DEFAULT_NON_TYPE_PARAM 1
-
-//#  define _STLP_HAS_NO_NEW_IOSTREAMS 1
-//#  define _STLP_HAS_NO_NEW_C_HEADERS 1
-
-// ???
-//#  define _STLP_STATIC_CONST_INIT_BUG 1
-
-// ???
-//#  define _STLP_LINK_TIME_INSTANTIATION 1
-
-// ???
-#  define _STLP_NO_TEMPLATE_CONVERSIONS 1
-
-#     define _STLP_LONG_LONG long long
-
-#     if defined(_REENTRANT)
-#           define _UITHREADS     /* if      UnixWare < 7.0.1 */
-#           define _STLP_UITHREADS
-#     endif /* _REENTRANT */
-
-# define _STLP_SCO_OPENSERVER
diff --git a/src/STLport/config/stl_select_lib.h b/src/STLport/config/stl_select_lib.h
deleted file mode 100644
index 4a6426b..0000000
--- a/src/STLport/config/stl_select_lib.h
+++ /dev/null
@@ -1,36 +0,0 @@
-# if !defined (_STLP_NO_OWN_IOSTREAMS)
-
-#  if ! defined (_STLP_LIB_STATIC_SUFFIX)
-#   define _STLP_LIB_STATIC_SUFFIX ""
-#  endif
-
-// Note : the code below is intended to make use of compiled
-// STLport iostreams easier. If you are with to change names used for
-// STLport libraries , please also change RELEASE_NAME and DEBUG_NAME
-// macros in makefile ../../src/vc6.mak (or whatever .mak you are using to build
-// STLport). If you are using binaries, you may just rename the binaries.
-#    if ! defined (__BUILDING_STLPORT) && ! defined (_STLP_DONT_FORCE_MSVC_LIB_NAME)
-#     if defined (_STLP_USE_DECLSPEC)
-#      ifdef _STLP_DEBUG
-#       pragma comment(lib, _STLP_LIB_BASENAME"_stldebug.lib")
-#      elif (defined (_DEBUG) || defined (__DEBUG)) && defined (_STLP_USE_DEBUG_LIB)
-#       pragma comment(lib, _STLP_LIB_BASENAME"_debug.lib")
-#      else
-#       pragma comment(lib, _STLP_LIB_BASENAME".lib")
-#      endif
-#     else /* _STLP_USE_DECLSPEC */
-// fbp : for static linking, debug setting _MUST_ correspond to what
-// has been compiled into binary lib
-#      ifdef _STLP_DEBUG
-#       if (! defined (_DEBUG))
-#        error "For static link with STLport library, _DEBUG setting MUST be on when _STLP_DEBUG is on. (/MTd forces _DEBUG)"
-#       endif
-#       pragma comment(lib, _STLP_LIB_BASENAME"_stldebug"_STLP_LIB_STATIC_SUFFIX".lib")
-#      elif (defined (_DEBUG) || defined (__DEBUG)) && defined (_STLP_USE_DEBUG_LIB)
-#       pragma comment(lib, _STLP_LIB_BASENAME"_debug"_STLP_LIB_STATIC_SUFFIX".lib")
-#      else
-#       pragma comment(lib, _STLP_LIB_BASENAME""_STLP_LIB_STATIC_SUFFIX".lib")
-#      endif
-#     endif /* _STLP_USE_DECLSPEC */
-#    endif /* __BUILDING_STLPORT */
-#   endif /* _STLP_OWN_IOSTREAMS */
diff --git a/src/STLport/config/stl_sgi.h b/src/STLport/config/stl_sgi.h
deleted file mode 100644
index b086981..0000000
--- a/src/STLport/config/stl_sgi.h
+++ /dev/null
@@ -1,94 +0,0 @@
-// STLport configuration file
-// It is internal STLport header - DO NOT include it directly
-
-# define _STLP_HAS_SPECIFIC_PROLOG_EPILOG
-
-// define native include path before trying to include anything
-
-# define _STLP_NATIVE_HEADER(__x) </usr/include/CC/##__x>
-# define _STLP_NATIVE_C_HEADER(__x) </usr/include/##__x>
-# define _STLP_NATIVE_OLD_STREAMS_HEADER(__x) </usr/include/CC/##__x> 
-# define _STLP_NATIVE_CPP_C_HEADER(__x) </usr/include/CC/##__x>
-# define _STLP_NATIVE_CPP_RUNTIME_HEADER(__x) </usr/include/CC/##__x>
-
-# define _STLP_NO_NATIVE_MBSTATE_T
-
-#define _STLP_NO_CSTD_FUNCTION_IMPORTS
-#define _STLP_NO_NATIVE_WIDE_FUNCTIONS
-#define _STLP_NO_MEMBER_TEMPLATE_CLASSES
-
-// #define _STLP_NO_BAD_ALLOC
-
-#define _STL_HAS_NAMESPACES
-
-#if ! defined (__EXCEPTIONS) && ! defined (_STLP_NO_EXCEPTIONS)
-# define _STLP_NO_EXCEPTIONS
-#endif
-
-// #define _STLP_NOTHROW throw()
-     
-#  define __EDG_SWITCHES
-
-// any version ???
-#  define _STLP_AUTOMATIC_TYPE_TRAITS 1
-
-#  define _STLP_USE_SGI_STRING         1
-
-#  define _STLP_HAS_NO_NEW_C_HEADERS 1
-// #  define _STLP_VENDOR_GLOBAL_EXCEPT_STD
-
-// # if ! defined (_STLP_NO_OWN_IOSTREAMS) && ! defined (_STLP_NO_NEW_IOSTREAMS)
-#  define _STLP_NO_POST_COMPATIBLE_SECTION
-// # endif
-
-#  include <standards.h>
-
-# if !(_COMPILER_VERSION >= 730)
-#   define _STLP_NO_NEW_NEW_HEADER 1
-# endif
-
-# if (_COMPILER_VERSION >= 730 && defined(_STANDARD_C_PLUS_PLUS))
-#  define _STLP_EXTERN_RANGE_ERRORS
-# endif
-
-#   if !defined(_BOOL)
-#     define _STLP_NO_BOOL
-#   endif
-#   if defined(_MIPS_SIM) && _MIPS_SIM == _ABIO32
-#     define _STLP_STATIC_CONST_INIT_BUG
-#   endif
-
-#   if (_COMPILER_VERSION < 720) || (defined(_MIPS_SIM) && _MIPS_SIM == _ABIO32)
-#     define _STLP_DEFAULT_CONSTRUCTOR_BUG
-#   endif
-#   if !((_COMPILER_VERSION >= 730) && defined(_MIPS_SIM) && _MIPS_SIM != _ABIO32)
-#     define _STLP_NO_MEMBER_TEMPLATE_KEYWORD
-#   endif
-#   if !defined(_STANDARD_C_PLUS_PLUS)
-#     define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS
-#   endif
-#   if !((_COMPILER_VERSION >= 721) && defined(_NAMESPACES))
-#     define _STLP_HAS_NO_NAMESPACES
-#   endif 
-#   if (_COMPILER_VERSION < 721) || !defined(_STL_HAS_NAMESPACES) || defined(_STLP_NO_NAMESPACES)
-#     define _STLP_NO_EXCEPTION_HEADER
-#   endif
-#   if _COMPILER_VERSION < 730 || !defined(_STANDARD_C_PLUS_PLUS) || !defined(_NAMESPACES)
-#     define _STLP_NO_BAD_ALLOC
-#   endif
-#   if defined(_LONGLONG) && defined(_SGIAPI) && _SGIAPI
-#     define _STLP_LONG_LONG long long
-#   endif
-#   if !(_COMPILER_VERSION >= 730 && defined(_STANDARD_C_PLUS_PLUS))
-#     define _STLP_HAS_NO_NEW_IOSTREAMS
-#   endif
-#   if !(_COMPILER_VERSION >= 730 && defined(_STANDARD_C_PLUS_PLUS))
-#     define _STLP_NO_AT_MEMBER_FUNCTION
-#   endif
-// #   if !(_COMPILER_VERSION >= 730 && defined(_STANDARD_C_PLUS_PLUS))
-#   if !(_COMPILER_VERSION >= 721 && defined(_STANDARD_C_PLUS_PLUS))
-#     define _STLP_NO_TEMPLATE_CONVERSIONS
-#   endif
-#   if !((_COMPILER_VERSION >= 730) && defined(_MIPS_SIM) && _MIPS_SIM != _ABIO32)
-#     define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER
-#   endif
diff --git a/src/STLport/config/stl_solaris.h b/src/STLport/config/stl_solaris.h
deleted file mode 100644
index 8ae18f7..0000000
--- a/src/STLport/config/stl_solaris.h
+++ /dev/null
@@ -1,35 +0,0 @@
-
-// include system features file
-# include <sys/feature_tests.h>
-
-// system-dependent defines 
-
-# if defined (__SunOS_5_8) && ! defined (_STLP_HAS_NO_NEW_C_HEADERS) && ( __cplusplus >= 199711L)
-#  define _STLP_HAS_NATIVE_FLOAT_ABS
-# endif
-
-#if defined(_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 >= 4)
-# define _STLP_RAND48 1
-#endif
-
-#if (defined(_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 == 4)) || defined (__SunOS_5_6)
-# define _STLP_WCHAR_SUNPRO_EXCLUDE 1
-# define _STLP_NO_NATIVE_WIDE_FUNCTIONS 1
-#endif
-
-// boris : this should always be defined for Solaris 5 & 6. Any ideas how to do it ?
-# if !(defined ( __KCC ) && __KCC_VERSION > 3400 ) && \
-  ((defined(__SunOS_5_5_1) || defined(__SunOS_5_6) ))
-#  ifndef _STLP_NO_NATIVE_MBSTATE_T
-#   define _STLP_NO_NATIVE_MBSTATE_T 1
-#  endif
-# endif /* KCC */
-
-// For SPARC we use lightweight synchronization
-# if defined (__sparc) /* && (defined (_REENTRANT) || defined (_PTHREADS)) */ && ((defined (__GNUC__) && defined (__sparc_v9__)) || \
-(defined (__sparcv9) && ! defined (_STLP_NO_OWN_IOSTREAMS)) ) \
-&& !defined(_NOTHREADS) && ! defined (_STLP_NO_SPARC_SOLARIS_THREADS)
-# define _STLP_SPARC_SOLARIS_THREADS
-# define _STLP_THREADS_DEFINED
-# endif
-
diff --git a/src/STLport/config/stl_sunpro.h b/src/STLport/config/stl_sunpro.h
deleted file mode 100644
index 3ff133f..0000000
--- a/src/STLport/config/stl_sunpro.h
+++ /dev/null
@@ -1,175 +0,0 @@
-// STLport configuration file
-// It is internal STLport header - DO NOT include it directly
-
-#  define _STLP_LONG_LONG  long long
-#  define _STLP_LINK_TIME_INSTANTIATION 1
-
-# if ! defined(_BOOL)
-#  define _STLP_NO_BOOL 1
-# endif
-
-#  if (__SUNPRO_CC >= 0x500 ) && (!defined (__SUNPRO_CC_COMPAT) || (__SUNPRO_CC_COMPAT == 5 )) \
-    && defined (_STLP_NO_OWN_IOSTREAMS) && ! defined (_STLP_HAS_NO_NEW_IOSTREAMS)
-#    error "The wrapper (_STLP_NO_OWN_IOSTREAMS) mode does not work well without _STLP_HAS_NO_NEW_IOSTREAMS. Please set this flag. You will also have to use -liostream option on link phase."
-// #   define _STLP_HAS_NO_NEW_IOSTREAMS
-#  endif
-
-// compatibility mode stuff
-# if (__SUNPRO_CC >= 0x510) && (!defined (__SUNPRO_CC_COMPAT) || (__SUNPRO_CC_COMPAT == 5 ))
-#  define _STLP_NATIVE_INCLUDE_PATH ../CC/Cstd
-#  define _STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH ../CC
-# elif (__SUNPRO_CC >= 0x500) && (!defined (__SUNPRO_CC_COMPAT) || (__SUNPRO_CC_COMPAT == 5 ))
-#  define _STLP_NATIVE_INCLUDE_PATH ../CC
-# elif (defined (__SUNPRO_CC_COMPAT) && __SUNPRO_CC_COMPAT == 4)
-#  define _STLP_NATIVE_INCLUDE_PATH ../CC4
-# else
-#  define _STLP_NATIVE_INCLUDE_PATH ../CC
-# endif
-
-#  if (__SUNPRO_CC >= 0x500 ) && ( defined (_STLP_NO_NEW_IOSTREAMS) || defined (_STLP_HAS_NO_NEW_IOSTREAMS) )
-// if the project is set up to use libiostream (_STLP_NO_NEW_IOSTREAMS should be defined then),
-// use classic iostreams
-#   define _STLP_NATIVE_OLD_STREAMS_INCLUDE_PATH ../CCios
-#  endif
-
-#  define _STLP_STATIC_CONST_INIT_BUG 1
-
-# if (__SUNPRO_CC < 0x530)
-// those are tested and proved not to work...
-#  define _STLP_STATIC_ARRAY_BUG 1
-#  define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1
-#  define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1
-#  define _STLP_USE_OLD_HP_ITERATOR_QUERIES
-# endif 
-
-
-# if defined (_STLP_OWN_IOSTREAMS)
-//#  if ! defined (_STLP_NO_OWN_NAMESPACE)
-//#   define _STLP_NO_OWN_NAMESPACE
-//#  endif
-# else
-#  define _STLP_HAS_NO_NEW_C_HEADERS 1
-# endif
-
-// those do not depend on compatibility
-# if (__SUNPRO_CC < 0x510)
-#  define _STLP_NO_TYPENAME_ON_RETURN_TYPE 1 
-#  define _STLP_NONTEMPL_BASE_MATCH_BUG 1
-# endif
-
-# if (__SUNPRO_CC < 0x510) || (defined (__SUNPRO_CC_COMPAT) && (__SUNPRO_CC_COMPAT < 5))
-
-#  define _STLP_NO_QUALIFIED_FRIENDS 1
-
-// no partial , just for explicit one
-#  define _STLP_PARTIAL_SPEC_NEEDS_TEMPLATE_ARGS
-#  define _STLP_NON_TYPE_TMPL_PARAM_BUG 1
-
-#  define _STLP_NO_MEMBER_TEMPLATES 1
-#  define _STLP_NO_FRIEND_TEMPLATES 1
-
-#  define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER 1
-#  define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS
-#  define _STLP_NO_MEMBER_TEMPLATE_KEYWORD 1
-# endif
-
-// Features that depend on compatibility switch
-# if ( __SUNPRO_CC < 0x500 ) || (defined (__SUNPRO_CC_COMPAT) && (__SUNPRO_CC_COMPAT < 5))
-
-#  ifndef _STLP_HAS_NO_NEW_IOSTREAMS
-#   define _STLP_HAS_NO_NEW_IOSTREAMS 1
-#  endif
-#  define _STLP_NO_NEW_NEW_HEADER 1
-// #  define _STLP_NO_RELOPS_NAMESPACE
-#  define _STLP_HAS_NO_NAMESPACES 1
-#  define _STLP_NEED_MUTABLE  1
-#  define _STLP_NO_BAD_ALLOC 1
-#  define _STLP_NO_EXCEPTION_HEADER 1
-#  define _STLP_NATIVE_C_INCLUDE_PATH ../include
-# elif (__SUNPRO_CC < 0x510)
-// #  define _STLP_NATIVE_C_HEADER(header) <../CC/##header##.SUNWCCh>
-#  define _STLP_NATIVE_CPP_C_HEADER(header) <../CC/##header##.SUNWCCh>
-#  define _STLP_NATIVE_C_INCLUDE_PATH /usr/include
-# elif defined( __SunOS_5_5_1 ) || defined( __SunOS_5_6 ) || defined( __SunOS_5_7 )
-#  define _STLP_NATIVE_C_INCLUDE_PATH ../CC/std
-#  define _STLP_NATIVE_CPP_C_INCLUDE_PATH ../CC/std
-# else
-#  define _STLP_NATIVE_C_INCLUDE_PATH /usr/include
-#  define _STLP_NATIVE_CPP_C_INCLUDE_PATH ../CC/std
-# endif
-
-
-
-#  if ( __SUNPRO_CC < 0x500 )
-
-# undef _STLP_NATIVE_C_HEADER
-# undef _STLP_NATIVE_CPP_C_HEADER
-
-#   define wint_t __wint_t 
-// famous CC 4.2 bug
-#   define _STLP_INLINE_STRING_LITERAL_BUG 1
-// /usr/include
-#   define _STLP_NATIVE_C_INCLUDE_PATH ../include
-
-// 4.2 cannot handle iterator_traits<_Tp>::iterator_category as a return type ;(
-#  define _STLP_USE_OLD_HP_ITERATOR_QUERIES
-
-// 4.2 does not like it
-#  undef  _STLP_PARTIAL_SPEC_NEEDS_TEMPLATE_ARGS
-
-#  define _STLP_LIMITED_DEFAULT_TEMPLATES 1
-
-#  define _STLP_NEED_TYPENAME 1
-#  define _STLP_NEED_EXPLICIT 1
-#  define _STLP_UNINITIALIZABLE_PRIVATE 1
-#  define _STLP_NO_BAD_ALLOC 1
-#  define _STLP_NO_ARROW_OPERATOR 1
-
-#  define _STLP_DEFAULT_CONSTRUCTOR_BUG 1
-#  define _STLP_GLOBAL_NESTED_RETURN_TYPE_PARAM_BUG 1
-#  undef  _STLP_HAS_NO_NEW_C_HEADERS
-#  define _STLP_HAS_NO_NEW_C_HEADERS 1
-// #  define _STLP_DONT_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS
-
-#   if ( __SUNPRO_CC < 0x420 )
-#    define _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX 1
-#    define _STLP_NO_NEW_STYLE_CASTS 1
-#    define _STLP_NO_METHOD_SPECIALIZATION 1
-#    if ( __SUNPRO_CC > 0x401 )
-#     if (__SUNPRO_CC==0x410)
-#      define _STLP_BASE_TYPEDEF_OUTSIDE_BUG  1
-#     endif
-#    else
-   // SUNPro C++ 4.0.1
-#     define _STLP_BASE_MATCH_BUG          1
-#     define _STLP_BASE_TYPEDEF_BUG        1
-#      if ( __SUNPRO_CC < 0x401 )
-        __GIVE_UP_WITH_STL(SUNPRO_401)
-#      endif
-#    endif /* 4.0.1 */
-#   endif /* 4.2 */
-
-#  endif /* <  5.0 */
-
-# include <config/stl_solaris.h>
-
-#ifndef _MBSTATET_H
-#   define _MBSTATET_H
-#   undef _MBSTATE_T
-#   define _MBSTATE_T
-    typedef struct __mbstate_t {
-      #if defined(_LP64)
-        long    __filler[4];
-      #else
-        int     __filler[6];
-      #endif
-    } __mbstate_t;
-# ifndef _STLP_HAS_NO_NAMESPACES
-    namespace std {
-        typedef __mbstate_t     mbstate_t;
-    }
-    using std::mbstate_t;
-#else
-typedef __mbstate_t mbstate_t;
-# endif
-#endif  /* __MBSTATET_H */
diff --git a/src/STLport/config/stl_symantec.h b/src/STLport/config/stl_symantec.h
deleted file mode 100644
index de6d83b..0000000
--- a/src/STLport/config/stl_symantec.h
+++ /dev/null
@@ -1,42 +0,0 @@
-// STLport configuration file
-// It is internal STLport header - DO NOT include it directly
-
-// if not using maximum ANSI compatibility ( -A -Ab -Aw),
-// uncomment the following two lines:
-//#  define _STLP_NO_BOOL 1
-//#  define _STLP_NO_WCHAR_T 1
-
-
-#  define _STLP_HAS_NO_NAMESPACES 1
-
-#  define _STLP_NEED_TYPENAME 1
-#  define _STLP_NEED_EXPLICIT 1
-#  define _STLP_NO_NEW_STYLE_CASTS 1
-#  define _STLP_NEED_MUTABLE 1
-#  define _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX 1
-// #  define _STLP_NO_BAD_ALLOC 1
-
-#  define _STLP_NO_MEMBER_TEMPLATES 1
-#  define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1
-#  define _STLP_NO_MEMBER_TEMPLATE_KEYWORD 1
-#  define _STLP_NO_FRIEND_TEMPLATES 1
-#  define _STLP_NO_QUALIFIED_FRIENDS 1
-#  define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1
-#  define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER 1
-
-// #  define _STLP_NO_DEFAULT_NON_TYPE_PARAM 1
-#  define _STLP_NO_METHOD_SPECIALIZATION 1
-#  define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS 1
-// #  define _STLP_NO_EXCEPTION_HEADER 1
-
-#  define _STLP_HAS_NO_NEW_IOSTREAMS 1
-#  define _STLP_HAS_NO_NEW_C_HEADERS 1
-
-#  define _STLP_STATIC_CONST_INIT_BUG 1
-#  define _STLP_THROW_RETURN_BUG 1
-// #  define _STLP_LINK_TIME_INSTANTIATION 1
-#  define _STLP_NO_TEMPLATE_CONVERSIONS 1
-
-#  define _STLP_NON_TYPE_TMPL_PARAM_BUG 1
-#  define _STLP_UNINITIALIZABLE_PRIVATE 1
-
diff --git a/src/STLport/config/stl_watcom.h b/src/STLport/config/stl_watcom.h
deleted file mode 100644
index c615ebe..0000000
--- a/src/STLport/config/stl_watcom.h
+++ /dev/null
@@ -1,152 +0,0 @@
-// STLport configuration file
-// It is internal STLport header - DO NOT include it directly
-
-# ifndef _STLP_NO_OWN_IOSTREAMS 
-#  define _STLP_NO_OWN_IOSTREAMS
-# endif
-
-# define _STLP_NO_RELOPS_NAMESPACE
-# define _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX
-
-#  define _STLP_HAS_SPECIFIC_PROLOG_EPILOG
-#  define _STLP_DONT_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS
-#  define _STLP_USE_OLD_HP_ITERATOR_QUERIES
-
-// On QNX, headers are supposed to be found in /usr/include,
-// so default "../include" should work.
-# ifndef __QNX__
-#  define _STLP_NATIVE_INCLUDE_PATH ../h
-# endif
-
-// Inline replacements for locking calls under Watcom
-// Define _STLP_NO_WATCOM_INLINE_INTERLOCK to keep using
-// standard WIN32 calls
-// Define _STL_MULTIPROCESSOR to enable lock
-#if !defined(_STLP_NO_WATCOM_INLINE_INTERLOCK)
-
-long    __stl_InterlockedIncrement( long *var );
-long    __stl_InterlockedDecrement( long *var );
-
-#ifdef _STL_MULTIPROCESSOR
-// Multiple Processors, add lock prefix
-#pragma aux __stl_InterlockedIncrement parm [ ecx ] = \
-        ".586"                  \
-        "mov eax, 1"            \
-        "lock xadd [ecx], eax"       \
-        "inc eax"               \
-        value [eax];
-
-        
-#pragma aux __stl_InterlockedDecrement parm [ ecx ] = \
-        ".586"                  \
-        "mov eax, 0FFFFFFFFh"   \
-        "lock xadd [ecx], eax"       \
-        "dec eax"               \
-        value [eax];
-#else 
-// Single Processor, lock prefix not needed
-#pragma aux __stl_InterlockedIncrement parm [ ecx ] = \
-        ".586"                  \
-        "mov eax, 1"            \
-        "xadd [ecx], eax"       \
-        "inc eax"               \
-        value [eax];
-        
-#pragma aux __stl_InterlockedDecrement parm [ ecx ] = \
-        ".586"                  \
-        "mov eax, 0FFFFFFFFh"   \
-        "xadd [ecx], eax"       \
-        "dec eax"               \
-        value [eax];
-#endif // _STL_MULTIPROCESSOR
-
-long    __stl_InterlockedExchange( long *Destination, long Value );
-                
-// xchg has auto-lock
-#pragma aux __stl_InterlockedExchange parm [ecx] [eax] = \
-        ".586"                  \
-        "xchg eax, [ecx]"       \
-        value [eax];
-#else
-
-#define __stl_InterlockedIncrement      InterlockedIncrement
-#define __stl_InterlockedDecrement      InterlockedDecrement
-#define __stl_InterlockedExchange       InterlockedExchange
-#endif /* INLINE INTERLOCK */
-
-#define _STLP_ATOMIC_INCREMENT(__x) __stl_InterlockedIncrement((long*)__x)
-#define _STLP_ATOMIC_DECREMENT(__x) __stl_InterlockedDecrement((long*)__x)
-#define _STLP_ATOMIC_EXCHANGE(__x, __y) __stl_InterlockedExchange((long*)__x, (long)__y)
-
-// boris : is this true or just the header is not in /usr/include ?
-# ifdef __QNX__
-#  define _STLP_NO_TYPEINFO 1
-# endif
-
-#  define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER 1
-#  define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1
-#  define _STLP_NO_MEMBER_TEMPLATE_KEYWORD 1
-#  define _STLP_NO_MEMBER_TEMPLATES 1
-#  define _STLP_NO_FRIEND_TEMPLATES 1
-#  define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1
-
-
-#  define _STLP_LIMITED_DEFAULT_TEMPLATES 1
-#  define _STLP_HAS_NO_NAMESPACES 1
-#  define _STLP_NEED_TYPENAME 1
-
-#  if __WATCOMC__ < 1100
-#  define _STLP_NO_WCHAR_T 1
-#  define _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX 1
-#  endif
-
-#  define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS 1
-
-#  define _STLP_STATIC_CONST_INIT_BUG 1
-// #  define _STLP_THROW_RETURN_BUG 1
-#  define _STLP_NO_TEMPLATE_CONVERSIONS 1
-
-#  define _STLP_BASE_TYPEDEF_OUTSIDE_BUG 1
-
-#  define _STLP_HAS_NO_NEW_IOSTREAMS 1
-#  define _STLP_HAS_NO_NEW_C_HEADERS 1
-#  define _STLP_NO_NEW_NEW_HEADER 1
-#  define _STLP_VENDOR_GLOBAL_STD
-
-#  define _STLP_NO_DEFAULT_NON_TYPE_PARAM 1
-#  define _STLP_NON_TYPE_TMPL_PARAM_BUG 1
-#  define _STLP_NONTEMPL_BASE_MATCH_BUG
-#  define _STLP_NO_EXCEPTION_HEADER 1
-#  define _STLP_NO_BAD_ALLOC 1
-
-#  define _STLP_NESTED_TYPE_PARAM_BUG 1
-
-#  define _STLP_NO_CSTD_FUNCTION_IMPORTS 1
-
-#  if (__WATCOM_CPLUSPLUS__ < 1100 )
-#   define _STLP_NO_BOOL 1
-#   define _STLP_NEED_EXPLICIT 1
-#   define _STLP_NEED_MUTABLE 1
-#   define _STLP_NO_ARROW_OPERATOR 1
-#  endif
-// This one is present in 11, but apparently has bugs (with auto_ptr).
-#   define _STLP_NO_NEW_STYLE_CASTS 1
-
-// Get rid of Watcom's min and max macros 
-#undef min 
-#undef max
-
-// for switches (-xs,  -xss,  -xst)
-//
-#if !(defined (__SW_XS) || defined (__SW_XSS) || defined(__SW_XST))
-#    define _STLP_HAS_NO_EXCEPTIONS 1
-# endif
-
-# if defined ( _MT ) && !defined (_NOTHREADS) && !defined (_REENTRANT)
-# define _REENTRANT 1
-# endif
-
-
-
-
-
diff --git a/src/STLport/config/stl_wince.h b/src/STLport/config/stl_wince.h
deleted file mode 100644
index bcd628b..0000000
--- a/src/STLport/config/stl_wince.h
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * File to have Windows CE Toolkit for VC++ 5.0 working with STLport
- * 09 - 03 - 1999
- * Origin : Giuseppe Govi - g.govi at iol.it
- */
-
-#ifndef _STLP_WINCE_H
-#define _STLP_WINCE_H
-
-// this flag is being used by STLport
-#   define _STLP_WINCE
-
-#ifndef _MT                            // Always threaded in CE
-  #define _MT
-#endif
-
-#define _STLP_NO_NATIVE_MBSTATE_T
-#define _STLP_NO_TYPEINFO
-#define _STLP_NO_BAD_ALLOC
-#define _STLP_NO_NEW_NEW_HEADER
-#define _STLP_OWN_IOSTREAMS
-
-// tell other parts no threads are there
-#   define _STLP_NO_THREADS 1
-
-// not all new-style headers are available...
-# define _STLP_HAS_NO_NEW_C_HEADERS
-
-#     undef _STLP_HAS_NO_EXCEPTIONS
-#     define _STLP_HAS_NO_EXCEPTIONS
-#     undef _STLP_NO_EXCEPTION_HEADER
-#     define _STLP_NO_EXCEPTION_HEADER
-
-// we have to use malloc instead of new
-# undef  _STLP_USE_NEWALLOC
-# define _STLP_USE_MALLOC
-
-//# ifdef _STLP_MSVC
-//#     pragma warning (disable: 4786)
-//# endif
-
-#ifdef _STLP_WINCE_USE_OUTPUTDEBUGSTRING
-#define _STLP_WINCE_TRACE(msg)   OutputDebugString(msg)
-#else
-#define _STLP_WINCE_TRACE(msg)   MessageBox(NULL,(msg),NULL,MB_OK)
-#endif
-
-#ifndef __THROW_BAD_ALLOC
-#define __THROW_BAD_ALLOC _STLP_WINCE_TRACE(L"out of memory"); ExitThread(1)
-#endif
-
-#ifndef _SIZE_T_DEFINED
-typedef unsigned int size_t;
-#define _SIZE_T_DEFINED
-#endif
-
-#ifndef _WCHAR_T_DEFINED
-typedef unsigned short wchar_t;
-#define _WCHAR_T_DEFINED
-#endif
-
-#ifndef _TIME_T_DEFINED
-typedef unsigned long time_t;
-#define _TIME_T_DEFINED
-#endif
-
-//ptrdiff_t is not defined in Windows CE SDK
-#ifndef _PTRDIFF_T_DEFINED
-typedef int ptrdiff_t;
-#define _PTRDIFF_T_DEFINED
-#endif
-
-//clock_t is not defined in Windows CE SDK
-#ifndef _CLOCK_T_DEFINED
-typedef long clock_t;
-#define _CLOCK_T_DEFINED
-#endif
-
-//struct tm is not defined in Windows CE SDK
-#ifndef _TM_DEFINED
-struct tm {
-        int tm_sec;     /* seconds after the minute - [0,59] */
-        int tm_min;     /* minutes after the hour - [0,59] */
-        int tm_hour;    /* hours since midnight - [0,23] */
-        int tm_mday;    /* day of the month - [1,31] */
-        int tm_mon;     /* months since January - [0,11] */
-        int tm_year;    /* years since 1900 */
-        int tm_wday;    /* days since Sunday - [0,6] */
-        int tm_yday;    /* days since January 1 - [0,365] */
-        int tm_isdst;   /* daylight savings time flag */
-        };
-#define _TM_DEFINED
-#endif
-
-// Some useful routines that are missing in Windows CE SDK
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-  char *      __cdecl getenv(const char *);
-  struct tm * __cdecl gmtime(const time_t *);
-  int         __cdecl remove(const char *);
-  int         __cdecl rename(const char *, const char *);
-  time_t      __cdecl time(time_t *);
-
-  #if (_WIN32_WCE < 300)
-    char * __cdecl strrchr(const char *, int);
-  #endif
-
-#ifdef __cplusplus
-}
-
-#ifndef __PLACEMENT_NEW_INLINE
-inline void *__cdecl operator new(size_t, void *_P) { return (_P); }
-#define __PLACEMENT_NEW_INLINE
-#endif
-
-// Only defined as macros in Windows CE SDK
-#include _STLP_NATIVE_C_HEADER(ctype.h)
-
-#if (_WIN32_WCE < 300)                  // Only wide chars for older versions
-#define _isctype iswctype
-#endif
-
-inline int (isalpha)(int c) { return _isctype(c, _ALPHA); }
-inline int (isupper)(int c) { return _isctype(c, _UPPER); }
-inline int (islower)(int c) { return _isctype(c, _LOWER); }
-inline int (isdigit)(int c) { return _isctype(c, _DIGIT); }
-inline int (isxdigit)(int c) { return _isctype(c, _HEX); }
-inline int (isspace)(int c) { return _isctype(c, _SPACE); }
-inline int (ispunct)(int c) { return _isctype(c, _PUNCT); }
-inline int (isalnum)(int c) { return _isctype(c, _ALPHA|_DIGIT); }
-inline int (isprint)(int c) { return _isctype(c, _BLANK|_PUNCT|_ALPHA|_DIGIT); }
-inline int (isgraph)(int c) { return _isctype(c, _PUNCT|_ALPHA|_DIGIT); }
-inline int (iscntrl)(int c) { return _isctype(c, _CONTROL); }
-inline int (isascii)(int c) { return ((unsigned)(c) < 0x80); }
-
-#undef _isctype
-
-inline int (iswalpha)(int c) { return iswctype(c, _ALPHA); }
-inline int (iswupper)(int c) { return iswctype(c, _UPPER); }
-inline int (iswlower)(int c) { return iswctype(c, _LOWER); }
-inline int (iswdigit)(int c) { return iswctype(c, _DIGIT); }
-inline int (iswxdigit)(int c) { return iswctype(c, _HEX); }
-inline int (iswspace)(int c) { return iswctype(c, _SPACE); }
-inline int (iswpunct)(int c) { return iswctype(c, _PUNCT); }
-inline int (iswalnum)(int c) { return iswctype(c, _ALPHA|_DIGIT); }
-inline int (iswprint)(int c) { return iswctype(c, _BLANK|_PUNCT|_ALPHA|_DIGIT); }
-inline int (iswgraph)(int c) { return iswctype(c, _PUNCT|_ALPHA|_DIGIT); }
-inline int (iswcntrl)(int c) { return iswctype(c, _CONTROL); }
-inline int (iswascii)(int c) { return ((unsigned)(c) < 0x80); }
-
-#endif /* __cplusplus */
-
-#if !defined(WIN32_LEAN_AND_MEAN)       // Minimise windows includes
-  #define WIN32_LEAN_AND_MEAN
-#endif
-#if !defined(VC_EXTRALEAN)
-  #define VC_EXTRALEAN
-#endif
-#if !defined(STRICT)
-  #define STRICT
-#endif
-#if !defined(NOMINMAX)
-  #define NOMINMAX
-#endif
-
-#ifndef __WINDOWS__
-#include <windows.h>
-#endif
-
-#ifndef _ABORT_DEFINED
-# define _STLP_ABORT() TerminateProcess(GetCurrentProcess(), 0)
-# define _ABORT_DEFINED
-#endif
-
-#ifndef _ASSERT_DEFINED
-# define assert(expr) _STLP_ASSERT(expr)
-# define _ASSERT_DEFINED
-#endif
-
-// they say it's needed 
-# include <windows.h>
-
-#endif /* _STLP_WCE_H */
-
-
diff --git a/src/STLport/config/stlcomp.h b/src/STLport/config/stlcomp.h
deleted file mode 100644
index cde65ce..0000000
--- a/src/STLport/config/stlcomp.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/*
- * Purpose of this file :
- *
- * To hold COMPILER-SPECIFIC portion of STLport settings.
- * In general, user should not edit this file unless 
- * using the compiler not recognized below.
- *
- * If your compiler is not being recognized yet, 
- * please look for definitions of macros in stl_mycomp.h,
- * copy stl_mycomp.h to stl_YOUR_COMPILER_NAME, 
- * adjust flags for your compiler, and add  <include config/stl_YOUR_COMPILER_NAME>
- * to the secton controlled by unique macro defined internaly by your compiler.
- *
- * To change user-definable settings, please edit <../stl_user_config.h> 
- *
- */
-
-#ifndef _STLP_COMP_H
-# define _STLP_COMP_H
-
-#  define __GIVE_UP_WITH_STL(message) void give_up() \
-   { upgrade_the_compiler_to_use_STL;}
-
-/* distinguish real MSC from Metrowerks and Intel */
-# if defined(_MSC_VER) && !defined(__MWERKS__) && !defined (__ICL) && !defined (__COMO__)
-#  define _STLP_MSVC _MSC_VER
-# endif
-
-# if defined (__xlC__)  || defined (__IBMC__) || defined ( __IBMCPP__ ) 
-/* AIX xlC, Visual Age C++ , OS-390 C++ */
-#  include <config/stl_ibm.h>
-# elif defined (__INTEL_COMPILER) && defined(__unix__)
-/* Check intel before gcc, since newer versions define GNUC */
-#  include <config/stl_icc.h>
-# elif defined (__GNUC__ )
-#  include <config/stl_gcc.h>
-# elif defined (__KCC)
-#  include <config/stl_kai.h>
-# elif defined(__sgi)
-#  include <config/stl_sgi.h>
-# elif (defined(__OS400__))
-/* AS/400 C++ */
-#  include <config/stl_as400.h>
-# elif defined(_STLP_MSVC)
-/* Microsoft Visual C++ 4.0, 4.1, 4.2, 5.0 */
-#  include <config/stl_msvc.h>
-# elif defined ( __BORLANDC__ )
-/* Borland C++ ( 4.x - 5.x ) */
-#  include <config/stl_bc.h>
-# elif defined(__SUNPRO_CC) || defined (__SUNPRO_C)
-/* SUN CC 4.0.1-5.0  */
-#  include <config/stl_sunpro.h>
-# elif defined (__WATCOM_CPLUSPLUS__) || defined (__WATCOMC__)
-/* Watcom C++ */
-#  include <config/stl_watcom.h>
-# elif defined(__COMO__) || defined (__COMO_VERSION_)
-#  include <config/stl_como.h>
-# elif defined (__DMC__)
-/* Digital Mars C++ */
-#  include <config/stl_dm.h>
-# elif defined (__SC__) && (__SC__ < 0x800)
-/* Symantec 7.5 */
-#  include <config/stl_symantec.h>
-# elif defined (__MRC__) || (defined (__SC__) && (__SC__ >= 0x882))
-/* Apple MPW SCpp 8.8.2  
- * Apple MPW MrCpp 4.1.0 */
-#  include <config/stl_apple.h>
-# elif defined (__MWERKS__)
-/* Metrowerks CodeWarrior */
-#  include <config/stl_mwerks.h>
-# elif defined(__hpux)
-/* HP compilers */
-#  include <config/stl_hpacc.h>
-# elif defined(__ICL)
-/* Intel reference compiler for Win */
-#  include <config/stl_intel.h>
-/* SCO UDK 7 compiler (UnixWare 7x, OSR 5, UnixWare 2x) */
-# elif defined(__USLC__)
-#  include <config/stl_sco.h>
-/* Apogee 4.x */
-# elif defined (__APOGEE__)
-#  include <config/stl_apcc.h>
-# elif defined (__DECCXX) || defined (__DECC)
-#  ifdef __vms
-#    include <config/stl_dec_vms.h>
-#  else
-#    include <config/stl_dec.h>
-#  endif
-# elif defined (__ISCPP__)
-#  include <config/stl_is.h>
-# elif defined (__FCC_VERSION)
-/* Fujutsu Compiler, v4.0 assumed */
-#  include <config/stl_fujitsu.h>
-# elif defined(_CRAY)
-/* Cray C++ 3.4 or 3.5 */
-#  include <config/stl_cray.h>
-# else
-/* Unable to identify the compiler, issue error diagnostic.
- * Edit <config/stl_mycomp.h> to set STLport up for your compiler. */
-#  include <config/stl_mycomp.h>
-# endif /* end of compiler choice */
-# undef __GIVE_UP_WITH_STL
-#endif
-
diff --git a/src/STLport/config/vc_select_lib.h b/src/STLport/config/vc_select_lib.h
deleted file mode 100644
index 35d8155..0000000
--- a/src/STLport/config/vc_select_lib.h
+++ /dev/null
@@ -1,35 +0,0 @@
-# if !( defined(_STLP_WINCE) )
-#  define _STLP_EXPORT_DECLSPEC __declspec(dllexport)
-#  define _STLP_IMPORT_DECLSPEC __declspec(dllimport)
-# endif
-
-#  if !( defined(_STLP_MSVC) && _STLP_MSVC < 1100)
-#   define _STLP_CLASS_EXPORT_DECLSPEC __declspec(dllexport)
-#   define _STLP_CLASS_IMPORT_DECLSPEC __declspec(dllimport)
-#  endif
-
-#  if !defined (_STLP_NO_OWN_IOSTREAMS)
-
-#    if ( defined (__DLL) || defined (_DLL) || defined (_WINDLL) || defined (_RTLDLL) \
-     || defined(_AFXDLL) || defined (_STLP_USE_DYNAMIC_LIB) ) \
-       && ! defined (_STLP_USE_STATIC_LIB)
-#      undef  _STLP_USE_DECLSPEC
-#      define _STLP_USE_DECLSPEC 1
-#    endif
-
-#  ifndef _STLP_IMPORT_TEMPLATE_KEYWORD
-#   define _STLP_IMPORT_TEMPLATE_KEYWORD  extern
-#  endif
-#  define _STLP_EXPORT_TEMPLATE_KEYWORD
-
-# if defined (_RTLDLL) && defined (_STLP_USE_STATIC_LIB)
-#    define _STLP_LIB_STATIC_SUFFIX "_staticx"
-# else
-#    define _STLP_LIB_STATIC_SUFFIX "_static"
-# endif
-
-#    include <config/stl_select_lib.h>
-
-#  endif /* _STLP_OWN_IOSTREAMS */
-
-
diff --git a/src/STLport/csetjmp b/src/STLport/csetjmp
deleted file mode 100644
index 25a9388..0000000
--- a/src/STLport/csetjmp
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_CSETJMP
-# define _STLP_CSETJMP
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x111
-#  include <stl/_prolog.h>
-# endif
-
-// if the macro is on, the header is already there
-# ifndef setjmp
-# if defined (_STLP_USE_NEW_C_HEADERS)
-#  include _STLP_NATIVE_CPP_C_HEADER(csetjmp)
-# else
-#  include _STLP_NATIVE_C_HEADER(setjmp.h)
-# endif
-# endif
-
-# ifdef _STLP_IMPORT_VENDOR_CSTD
-_STLP_BEGIN_NAMESPACE
-using _STLP_VENDOR_CSTD::jmp_buf;
-# ifndef _STLP_NO_CSTD_FUNCTION_IMPORTS
-#  ifndef setjmp
-using _STLP_VENDOR_CSTD::setjmp;
-#  endif
-using _STLP_VENDOR_CSTD::longjmp;
-# endif
-_STLP_END_NAMESPACE
-#endif /* _STLP_IMPORT_VENDOR_CSTD */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x111 )
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_CSETJMP */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/csignal b/src/STLport/csignal
deleted file mode 100644
index e3fe609..0000000
--- a/src/STLport/csignal
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_CSIGNAL
-# define _STLP_CSIGNAL
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x112
-#  include <stl/_prolog.h>
-# endif
-
-# if defined (_STLP_USE_NEW_C_HEADERS)
-#  include _STLP_NATIVE_CPP_C_HEADER(csignal)
-# else
-#  include _STLP_NATIVE_C_HEADER(signal.h)
-# endif
-
-#  ifdef _STLP_IMPORT_VENDOR_CSTD
-_STLP_BEGIN_NAMESPACE
-# ifndef _STLP_NO_CSTD_FUNCTION_IMPORTS
-using _STLP_VENDOR_CSTD::signal;
-using _STLP_VENDOR_CSTD::raise;
-# endif /* _STLP_NO_CSTD_FUNCTION_IMPORTS */
-using _STLP_VENDOR_CSTD::sig_atomic_t;
-_STLP_END_NAMESPACE
-#  endif /* _STLP_IMPORT_VENDOR_CSTD */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x112 )
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_CSIGNAL */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/cstdarg b/src/STLport/cstdarg
deleted file mode 100644
index 5b6196e..0000000
--- a/src/STLport/cstdarg
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_CSTDARG
-# define _STLP_CSTDARG
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x113
-#  include <stl/_prolog.h>
-# endif
-
-# if defined (_STLP_USE_NEW_C_HEADERS)
-#  include _STLP_NATIVE_CPP_C_HEADER(cstdarg)
-# else
-#  include _STLP_NATIVE_C_HEADER(stdarg.h)
-# endif
-
-# ifdef _STLP_IMPORT_VENDOR_CSTD
-_STLP_BEGIN_NAMESPACE
-using _STLP_VENDOR_CSTD::va_list;
-_STLP_END_NAMESPACE
-#endif /* _STLP_IMPORT_VENDOR_CSTD */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x113 )
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_CSTDARG */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/cstddef b/src/STLport/cstddef
deleted file mode 100644
index 845b317..0000000
--- a/src/STLport/cstddef
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_CSTDDEF
-# define _STLP_CSTDDEF
-
-# if ! defined (_STLP_WINCE)
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x114
-#  include <stl/_prolog.h>
-# endif
-
-# if (__GNUC__ >= 3) && defined(__CYGWIN__) // this total HACK is the only expedient way I could cygwin to work with GCC 3.0
-#  define __need_wint_t // mostly because wint_t didn't seem to get defined otherwise :(
-#  define __need_wchar_t
-#  define __need_size_t
-#  define __need_ptrdiff_t
-#  define __need_NULL
-# endif
-
-# if defined (_STLP_USE_NEW_C_HEADERS)
-#  include _STLP_NATIVE_CPP_C_HEADER(cstddef)
-# else
-#  include _STLP_NATIVE_C_HEADER(stddef.h)
-# endif
-
-# ifdef _STLP_IMPORT_VENDOR_CSTD
-_STLP_BEGIN_NAMESPACE  
-using _STLP_VENDOR_CSTD::ptrdiff_t;
-using _STLP_VENDOR_CSTD::size_t;
-_STLP_END_NAMESPACE
-#endif /* _STLP_IMPORT_VENDOR_CSTD */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x114 )
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_WINCE */
-
-#endif /* _STLP_CSTDDEF */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/cstdio b/src/STLport/cstdio
deleted file mode 100644
index 43f7248..0000000
--- a/src/STLport/cstdio
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_CSTDIO
-# define _STLP_CSTDIO
-
-# if ! defined (_STLP_WINCE)
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 15
-#  include <stl/_prolog.h>
-# endif
-
-#ifdef __Lynx__
-#  include _STLP_NATIVE_C_HEADER(stdarg.h)
-#endif
-
-# if defined (_STLP_USE_NEW_C_HEADERS)
-#  include _STLP_NATIVE_CPP_C_HEADER(cstdio)
-# else
-#  include _STLP_NATIVE_C_HEADER(stdio.h)
-# endif
-
-# ifdef __MWERKS__
-#  undef stdin
-#  undef stdout
-#  undef stderr
-#  define stdin  	(&_STLP_VENDOR_CSTD::__files[0])
-#  define stdout	(&_STLP_VENDOR_CSTD::__files[1])
-#  define stderr	(&_STLP_VENDOR_CSTD::__files[2])
-# endif
-
-#  if defined (_STLP_MSVC) || defined (__ICL)
-namespace _STLP_VENDOR_CSTD {
-inline
-int vsnprintf(char *s1, size_t n, const char *s2, va_list v)
-{
-return ::_vsnprintf(s1, n, s2, v);
-}
-}
-#  endif
-
-# ifdef _STLP_IMPORT_VENDOR_CSTD 
-_STLP_BEGIN_NAMESPACE
-using _STLP_VENDOR_CSTD::FILE;
-using _STLP_VENDOR_CSTD::fpos_t;
-using _STLP_VENDOR_CSTD::size_t;
-
-// undef obsolete macros
-# undef putc
-# undef getc
-# undef getchar
-# undef putchar
-# undef feof
-# undef ferror
-
-#  ifndef _STLP_NO_CSTD_FUNCTION_IMPORTS
-using _STLP_VENDOR_CSTD::clearerr;
-using _STLP_VENDOR_CSTD::fclose;
-using _STLP_VENDOR_CSTD::feof;
-using _STLP_VENDOR_CSTD::ferror;
-using _STLP_VENDOR_CSTD::fflush;
-using _STLP_VENDOR_CSTD::fgetc;
-using _STLP_VENDOR_CSTD::fgetpos;
-using _STLP_VENDOR_CSTD::fgets;
-using _STLP_VENDOR_CSTD::fopen;
-using _STLP_VENDOR_CSTD::fprintf;
-using _STLP_VENDOR_CSTD::fputc;
-using _STLP_VENDOR_CSTD::fputs;
-using _STLP_VENDOR_CSTD::fread;
-using _STLP_VENDOR_CSTD::freopen;
-using _STLP_VENDOR_CSTD::fscanf;
-using _STLP_VENDOR_CSTD::fseek;
-using _STLP_VENDOR_CSTD::fsetpos;
-using _STLP_VENDOR_CSTD::ftell;
-using _STLP_VENDOR_CSTD::fwrite;
-
-#   if  ( !( defined (__IBMCPP__) && (__IBMCPP__ >= 500) )  )
- using _STLP_VENDOR_CSTD::getc;
- using _STLP_VENDOR_CSTD::getchar;
- using _STLP_VENDOR_CSTD::putc;
- using _STLP_VENDOR_CSTD::putchar;
-#   endif
-
-using _STLP_VENDOR_CSTD::gets;
-using _STLP_VENDOR_CSTD::perror;
-using _STLP_VENDOR_CSTD::printf;
-using _STLP_VENDOR_CSTD::puts;
-using _STLP_VENDOR_CSTD::remove;
-using _STLP_VENDOR_CSTD::rename;
-using _STLP_VENDOR_CSTD::rewind;
-using _STLP_VENDOR_CSTD::scanf;
-using _STLP_VENDOR_CSTD::setbuf;
-using _STLP_VENDOR_CSTD::setvbuf;
-using _STLP_VENDOR_CSTD::sprintf;
-using _STLP_VENDOR_CSTD::sscanf;
-using _STLP_VENDOR_CSTD::tmpfile;
-using _STLP_VENDOR_CSTD::tmpnam;
-using _STLP_VENDOR_CSTD::ungetc;
-using _STLP_VENDOR_CSTD::vfprintf;
-using _STLP_VENDOR_CSTD::vprintf;
-using _STLP_VENDOR_CSTD::vsprintf;
-#   if (defined (__MWERKS__) || defined (_STLP_MSVC) || defined (__ICL) || \
-( defined (__BORLANDC__) && __BORLANDC__ > 0x530))
-using _STLP_VENDOR_CSTD::vsnprintf;
-#   endif
-#  endif /* _STLP_NO_CSTD_FUNCTION_IMPORTS */
-_STLP_END_NAMESPACE
-# endif /* _STLP_IMPORT_VENDOR_CSTD */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 15)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-# endif /* ! defined (_STLP_WINCE) */
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/cstdlib b/src/STLport/cstdlib
deleted file mode 100644
index 1908261..0000000
--- a/src/STLport/cstdlib
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_CSTDLIB
-# define _STLP_CSTDLIB
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x116
-#  include <stl/_prolog.h>
-# endif
-
-# if defined (_STLP_USE_NEW_C_HEADERS)
-#  include _STLP_NATIVE_CPP_C_HEADER(cstdlib)
-# else
-#  include _STLP_NATIVE_C_HEADER(stdlib.h)
-# endif
-
-# if defined( __MSL__ ) && __MSL__ <= 0x5003
-namespace std {
-	typedef ::div_t div_t;
-	typedef ::ldiv_t ldiv_t;
-#  ifdef __MSL_LONGLONG_SUPPORT__
-	typedef ::lldiv_t lldiv_t;
-#  endif
-}
-# endif
-
-# ifdef _STLP_IMPORT_VENDOR_CSTD 
-_STLP_BEGIN_NAMESPACE
-using _STLP_VENDOR_CSTD::div_t;
-using _STLP_VENDOR_CSTD::ldiv_t;
-using _STLP_VENDOR_CSTD::size_t;
-
-#  ifndef _STLP_NO_CSTD_FUNCTION_IMPORTS
-using _STLP_VENDOR_CSTD::abort;
-using _STLP_VENDOR_CSTD::atexit;
-using _STLP_VENDOR_CSTD::exit;
-using _STLP_VENDOR_CSTD::getenv;
-using _STLP_VENDOR_CSTD::calloc;
-using _STLP_VENDOR_CSTD::free;
-using _STLP_VENDOR_CSTD::malloc;
-using _STLP_VENDOR_CSTD::realloc;
-using _STLP_VENDOR_CSTD::atof;
-using _STLP_VENDOR_CSTD::atoi;
-using _STLP_VENDOR_CSTD::atol;
-using _STLP_VENDOR_CSTD::mblen;
-using _STLP_VENDOR_CSTD::mbstowcs;
-using _STLP_VENDOR_CSTD::mbtowc;
-using _STLP_VENDOR_CSTD::strtod;
-using _STLP_VENDOR_CSTD::strtol;
-using _STLP_VENDOR_CSTD::strtoul;
-using _STLP_VENDOR_CSTD::system;
-
-#if ! (defined (_STLP_NO_NATIVE_WIDE_STREAMS) || defined (_STLP_NO_MBSTATE_T) )
-using _STLP_VENDOR_CSTD::wcstombs;
-using _STLP_VENDOR_CSTD::wctomb;
-#endif
-using _STLP_VENDOR_CSTD::bsearch;
-using _STLP_VENDOR_CSTD::qsort;
-// boris : if we do not have native float abs, we define ours; then we cannot do "using" for "other" abs 
-# ifdef _STLP_HAS_NATIVE_FLOAT_ABS 
-using _STLP_VENDOR_CSTD::abs;
-# endif
-using _STLP_VENDOR_CSTD::div;
-using _STLP_VENDOR_CSTD::labs;
-using _STLP_VENDOR_CSTD::ldiv;
-using _STLP_VENDOR_CSTD::rand;
-using _STLP_VENDOR_CSTD::srand;
-#  endif /* _STLP_NO_CSTD_FUNCTION_IMPORTS */
-_STLP_END_NAMESPACE
-#endif /* _STLP_IMPORT_VENDOR_CSTD */
-
-_STLP_BEGIN_NAMESPACE
-
-# if defined(_STLP_HAS_NO_NEW_C_HEADERS) && defined(__cplusplus)
-# if !defined ( _STLP_LABS )
-inline long   abs(long __x) { return _STLP_VENDOR_CSTD::labs(__x); }
-# endif
-# if !defined ( _STLP_LDIV )
-inline ldiv_t div(long __x, long __y) { return _STLP_VENDOR_CSTD::ldiv(__x, __y); } 
-# endif
-# endif
-
-#  if defined ( _STLP_LLABS )
-_STLP_LONG_LONG   abs(_STLP_LONG_LONG __x) { return _STLP_VENDOR_CSTD::_STLP_LLABS(__x); }
-#  endif
-#  if defined ( _STLP_LLDIV )
-_STLP_LLDIV_T div(_STLP_LONG_LONG __x, _STLP_LONG_LONG __y) { return _STLP_VENDOR_CSTD::_STLP_LLDIV(__x, __y); } 
-#  endif
-
-_STLP_END_NAMESPACE
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x116)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_CSTDLIB */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/cstring b/src/STLport/cstring
deleted file mode 100644
index 55c65ce..0000000
--- a/src/STLport/cstring
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_CSTRING
-# define _STLP_CSTRING
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x117
-#  include <stl/_prolog.h>
-# endif
-
-# if defined (_STLP_USE_NEW_C_HEADERS)
-#  include _STLP_NATIVE_CPP_C_HEADER(cstring)
-# else
-#  include _STLP_NATIVE_C_HEADER(string.h)
-# endif
-
-# ifdef _STLP_IMPORT_VENDOR_CSTD
-_STLP_BEGIN_NAMESPACE
-#  include <using/cstring>
-_STLP_END_NAMESPACE
-#endif /* _STLP_IMPORT_VENDOR_CSTD */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x117)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_CSTRING */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/ctime b/src/STLport/ctime
deleted file mode 100644
index 3c63fc5..0000000
--- a/src/STLport/ctime
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_CTIME
-# define _STLP_CTIME
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x118
-#  include <stl/_prolog.h>
-# endif
-
-# if defined (_STLP_USE_NEW_C_HEADERS)
-#  include _STLP_NATIVE_CPP_C_HEADER(ctime)
-# else
-#  include _STLP_NATIVE_C_HEADER(time.h)
-# endif
-
-# ifdef _STLP_IMPORT_VENDOR_CSTD
-_STLP_BEGIN_NAMESPACE
-using _STLP_VENDOR_CSTD::size_t;
-using _STLP_VENDOR_CSTD::clock_t;
-using _STLP_VENDOR_CSTD::time_t;
-using _STLP_VENDOR_CSTD::tm;
-#  ifndef _STLP_NO_CSTD_FUNCTION_IMPORTS
-using _STLP_VENDOR_CSTD::clock;
-using _STLP_VENDOR_CSTD::asctime;
-using _STLP_VENDOR_CSTD::ctime;
-using _STLP_VENDOR_CSTD::gmtime;
-using _STLP_VENDOR_CSTD::difftime;
-using _STLP_VENDOR_CSTD::mktime;
-using _STLP_VENDOR_CSTD::localtime;
-using _STLP_VENDOR_CSTD::strftime;
-using _STLP_VENDOR_CSTD::time;
-#  endif /* _STLP_NO_CSTD_FUNCTION_IMPORTS */
-_STLP_END_NAMESPACE
-#endif /* _STLP_IMPORT_VENDOR_CSTD */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x118)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_CTIME */
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/ctype.h b/src/STLport/ctype.h
deleted file mode 100644
index fda6925..0000000
--- a/src/STLport/ctype.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-# if !defined (_STLP_OUTERMOST_HEADER_ID)
-#  define _STLP_OUTERMOST_HEADER_ID 0x219
-#  include <stl/_prolog.h>
-# elif (_STLP_OUTERMOST_HEADER_ID == 0x219) && ! defined (_STLP_DONT_POP_0x219)
-#  define _STLP_DONT_POP_0x219
-# endif
-
-# include _STLP_NATIVE_C_HEADER(ctype.h)
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x219)
-#  if ! defined (_STLP_DONT_POP_0x219)
-#   include <stl/_epilog.h>
-#   undef  _STLP_OUTERMOST_HEADER_ID
-#   endif
-#   undef  _STLP_DONT_POP_0x219
-# endif
-
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/cwchar b/src/STLport/cwchar
deleted file mode 100644
index 46943d9..0000000
--- a/src/STLport/cwchar
+++ /dev/null
@@ -1,250 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_CWCHAR
-# define _STLP_CWCHAR
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x120
-#  include <stl/_prolog.h>
-# endif
-
-# ifdef __GNUC__
-#  include <cstddef>
-# endif
-
-# if ! defined (_STLP_WINCE)
-
-# if defined (__BORLANDC__) &&  (__BORLANDC__ >= 0x530 ) && ! defined (_STLP_OWN_IOSTREAMS)
-/*  Borland defines this stuff here */
-#   include <iosfwd>
-# endif
-
-# if !  defined (_STLP_NO_CWCHAR) && defined  (_STLP_USE_NEW_C_HEADERS)
-#  include _STLP_NATIVE_CPP_C_HEADER(cwchar)
-
-# elif defined (__MRC__) || (defined (__SC__) && !defined (__DMC__)) || defined (__BORLANDC__) || defined(__FreeBSD__) || (defined (__GNUC__) && defined (__APPLE__) || defined( __Lynx__ )) || defined (_STLP_NO_WCHAR_T)
-
-#  include _STLP_NATIVE_C_HEADER(stddef.h)
-#  if defined (__FreeBSD__) || defined (__Lynx__)
-#   ifndef _WINT_T
-typedef long int wint_t;
-#    define _WINT_T
-#   endif /* _WINT_T */
-#  endif
-
-# else 
-#  include _STLP_NATIVE_C_HEADER(wchar.h)
-
-#  if defined(__sun) && (defined(_XOPEN_SOURCE) || (_XOPEN_VERSION - 0 == 4))
-extern wint_t   btowc();
-extern int      fwprintf();
-extern int      fwscanf();
-extern int      fwide();
-extern int      mbsinit();
-extern size_t   mbrlen();
-extern size_t   mbrtowc();
-extern size_t   mbsrtowcs();
-extern int      swprintf();
-extern int      swscanf();
-extern int      vfwprintf();
-extern int      vwprintf();
-extern int      vswprintf();
-extern size_t   wcrtomb();
-extern size_t   wcsrtombs();
-extern wchar_t  *wcsstr();
-extern int      wctob();
-extern wchar_t  *wmemchr();
-extern int      wmemcmp();
-extern wchar_t  *wmemcpy();
-extern wchar_t  *wmemmove();
-extern wchar_t  *wmemset();
-extern int      wprintf();
-extern int      wscanf();
-#  endif
-# endif
-
-#if defined(__MSL__) && __MSL__ <= 0x51FF	/* dwa 2/28/99 - not yet implemented by MSL  */
-#   define _STLP_WCHAR_MSL_EXCLUDE 1
-namespace std
-{ 
-  extern "C" size_t wcsftime(wchar_t * str, size_t max_size, const wchar_t * format_str, const struct tm * timeptr);
-}
-#  define _STLP_NO_MBSTATE_T 1
-#elif defined (__BORLANDC__)
-#  ifdef _STLP_OWN_IOSTREAMS
-#   define _STLP_NO_NATIVE_MBSTATE_T
-#  endif
-#  define _STLP_WCHAR_BORLAND_EXCLUDE 1
-#  if (__BORLANDC__ < 0x540 )
-#   define _STLP_NO_MBSTATE_T 1
-#   define _STLP_WCHAR_SUNPRO_EXCLUDE
-#  endif
-#endif
-
-#ifndef _STLP_CWCHAR_H
-# include <stl/_cwchar.h>
-#endif
-
-# ifdef _STLP_IMPORT_VENDOR_CSTD
-
-#if defined (__SUNPRO_CC) && defined (_STLP_NO_OWN_IOSTREAMS) && !defined (_STLP_HAS_NO_NEW_C_HEADERS)
-using _STLP_VENDOR_CSTD::wint_t; 
-#endif
-
-_STLP_BEGIN_NAMESPACE
-# ifdef _STLP_NO_WCHAR_T
-typedef int wint_t;
-# else
-// gcc 3.0 has a glitch : wint_t only sucked into the global namespace if _GLIBCPP_USE_WCHAR_T is defined
-#  if defined (__GNUC__) && ! defined (_GLIBCPP_USE_WCHAR_T)
-using ::wint_t;
-#  else
-using _STLP_VENDOR_CSTD::wint_t;
-#  endif
-# endif
-
-
-using _STLP_VENDOR_CSTD::size_t;
-
-#  if !defined (_STLP_NO_NATIVE_MBSTATE_T) && ! defined (_STLP_USE_OWN_MBSTATE_T)
-using _STLP_VENDOR_MB_NAMESPACE::mbstate_t;
-
-# if !defined (_STLP_NO_CSTD_FUNCTION_IMPORTS) && !defined(_STLP_WCHAR_BORLAND_EXCLUDE) \
-  && (!defined(__MSL__) || __MSL__ > 0x6001)
-#  if ! (defined (__KCC) || defined (__GNUC__))
-using _STLP_VENDOR_MB_NAMESPACE::btowc;
-#   if (!defined(__MSL__) || __MSL__ > 0x7001)
-using _STLP_VENDOR_MB_NAMESPACE::mbsinit;
-#   endif
-#  endif
-# if ! defined (__GNUC__)
-using _STLP_VENDOR_MB_NAMESPACE::mbrlen;
-using _STLP_VENDOR_MB_NAMESPACE::mbrtowc;
-using _STLP_VENDOR_MB_NAMESPACE::mbsrtowcs;
-using _STLP_VENDOR_MB_NAMESPACE::wcrtomb;
-using _STLP_VENDOR_MB_NAMESPACE::wcsrtombs;
-# endif
-#    endif /* BORLAND && !__MSL__ || __MSL__ > 0x6001 */
-
-#  endif /* _STLP_NO_NATIVE_MBSTATE_T */
-
-# if !defined (_STLP_NO_NATIVE_WIDE_FUNCTIONS) && ! defined (_STLP_NO_CSTD_FUNCTION_IMPORTS)
-
-# if !defined (_STLP_WCHAR_BORLAND_EXCLUDE) && ! defined (_STLP_NO_CSTD_FUNCTION_IMPORTS)
-using _STLP_VENDOR_CSTD::fgetwc;
-using _STLP_VENDOR_CSTD::fgetws;
-using _STLP_VENDOR_CSTD::fputwc;
-using _STLP_VENDOR_CSTD::fputws;
-# endif
-
-#  if !( defined (_STLP_WCHAR_SUNPRO_EXCLUDE) || defined (_STLP_WCHAR_BORLAND_EXCLUDE) \
-      || defined(_STLP_WCHAR_HPACC_EXCLUDE) )
-# ifndef __DECCXX
-using _STLP_VENDOR_CSTD::fwide;
-# endif
-using _STLP_VENDOR_CSTD::fwprintf;
-using _STLP_VENDOR_CSTD::fwscanf;
-using _STLP_VENDOR_CSTD::getwchar;
-#  endif
-
-# ifndef _STLP_WCHAR_BORLAND_EXCLUDE
-using _STLP_VENDOR_CSTD::getwc;
-using _STLP_VENDOR_CSTD::ungetwc;
-
-using _STLP_VENDOR_CSTD::putwc;
-using _STLP_VENDOR_CSTD::putwchar;
-# endif
-
-#  if !( defined (_STLP_WCHAR_SUNPRO_EXCLUDE) || defined (_STLP_WCHAR_BORLAND_EXCLUDE)\
-      || defined(_STLP_WCHAR_HPACC_EXCLUDE) ) 
-using _STLP_VENDOR_CSTD::swprintf;
-using _STLP_VENDOR_CSTD::swscanf;
-using _STLP_VENDOR_CSTD::vfwprintf;
-using _STLP_VENDOR_CSTD::vwprintf;
-using _STLP_VENDOR_CSTD::vswprintf;
-
-#   if !defined(__MSL__) || __MSL__ > 0x7001
-using _STLP_VENDOR_CSTD::wcsftime;
-#   endif
-using _STLP_VENDOR_CSTD::wcstok;
-
-#  endif
-
-# if !(defined (__BORLANDC__) && (__BORLANDC__ < 0x540))
-using _STLP_VENDOR_CSTD::wcscat;
-using _STLP_VENDOR_CSTD::wcsrchr;
-using _STLP_VENDOR_CSTD::wcscmp;
-using _STLP_VENDOR_CSTD::wcscoll;
-
-using _STLP_VENDOR_CSTD::wcscpy;
-using _STLP_VENDOR_CSTD::wcscspn;
-
-using _STLP_VENDOR_CSTD::wcslen;
-using _STLP_VENDOR_CSTD::wcsncat;
-using _STLP_VENDOR_CSTD::wcsncmp;
-using _STLP_VENDOR_CSTD::wcsncpy;
-using _STLP_VENDOR_CSTD::wcspbrk;
-using _STLP_VENDOR_CSTD::wcschr;
-
-using _STLP_VENDOR_CSTD::wcsspn;
-using _STLP_VENDOR_CSTD::wcsxfrm;
-
-# endif
-
-#  if !defined (_STLP_WCHAR_BORLAND_EXCLUDE)
-
-using _STLP_VENDOR_CSTD::wcstod;
-using _STLP_VENDOR_CSTD::wcstol;
-
-# endif
-
-#  if !( defined (_STLP_WCHAR_SUNPRO_EXCLUDE) || defined(_STLP_WCHAR_HPACC_EXCLUDE) )
-
-using _STLP_VENDOR_CSTD::wcsstr;
-using _STLP_VENDOR_CSTD::wmemchr;
-
-#  if !defined (_STLP_WCHAR_BORLAND_EXCLUDE)
-
-#ifndef __DMC__
-using _STLP_VENDOR_CSTD::wctob;
-using _STLP_VENDOR_CSTD::wmemcmp;
-#endif
-using _STLP_VENDOR_CSTD::wmemmove;
-using _STLP_VENDOR_CSTD::wprintf;
-using _STLP_VENDOR_CSTD::wscanf;
-
-#  endif
-
-using _STLP_VENDOR_CSTD::wmemcpy;
-using _STLP_VENDOR_CSTD::wmemset;
-#  endif
-
-# endif /* _STLP_NO_NATIVE_WIDE_FUNCTIONS */
-_STLP_END_NAMESPACE
-# endif /* _STLP_IMPORT_VENDOR_CSTD */
-
-# undef _STLP_WCHAR_SUNPRO_EXCLUDE
-# undef _STLP_WCHAR_MSL_EXCLUDE
-
-# endif /* WINCE */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x120)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_CWCHAR */
-
diff --git a/src/STLport/cwctype b/src/STLport/cwctype
deleted file mode 100644
index a24de63..0000000
--- a/src/STLport/cwctype
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_CWCTYPE
-# define _STLP_CWCTYPE
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x121
-#  include <stl/_prolog.h>
-# endif
-
-#ifdef __BORLANDC__
-# include <cctype>
-#endif
-
-# if defined (_STLP_USE_NEW_C_HEADERS)
-#  include _STLP_NATIVE_CPP_C_HEADER(cwctype)
-#  if defined  (__MSL__)
-namespace std {
-	typedef wchar_t wctrans_t;
-	wint_t 		towctrans(wint_t c, wctrans_t value);
-	wctrans_t 	wctrans(const char *name);
-}
-#  endif
-# else
-#  include _STLP_NATIVE_C_HEADER(wctype.h)
-# endif
-
-# ifdef _STLP_IMPORT_VENDOR_CSTD
-_STLP_BEGIN_NAMESPACE
-using _STLP_VENDOR_CSTD::wctype_t;
-using _STLP_VENDOR_CSTD::wint_t;
-# ifndef _STLP_NO_CSTD_FUNCTION_IMPORTS
-#  if ! defined (__BORLANDC__)
-using _STLP_VENDOR_CSTD::wctrans_t;
-using _STLP_VENDOR_CSTD::towctrans;
-using _STLP_VENDOR_CSTD::wctrans;
-using _STLP_VENDOR_CSTD::wctype;
-using _STLP_VENDOR_CSTD::iswctype;
-#  endif
-using _STLP_VENDOR_CSTD::iswalnum;
-using _STLP_VENDOR_CSTD::iswalpha;
-using _STLP_VENDOR_CSTD::iswcntrl;
-
-using _STLP_VENDOR_CSTD::iswdigit;
-using _STLP_VENDOR_CSTD::iswgraph;
-using _STLP_VENDOR_CSTD::iswlower;
-using _STLP_VENDOR_CSTD::iswprint;
-using _STLP_VENDOR_CSTD::iswpunct;
-using _STLP_VENDOR_CSTD::iswspace;
-using _STLP_VENDOR_CSTD::iswupper;
-using _STLP_VENDOR_CSTD::iswxdigit;
-
-using _STLP_VENDOR_CSTD::towlower;
-using _STLP_VENDOR_CSTD::towupper;
-#  endif /* _STLP_NO_CSTD_FUNCTION_IMPORTS */
-_STLP_END_NAMESPACE
-#endif /* _STLP_IMPORT_VENDOR_CSTD */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x121)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_CWCTYPE */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/deque b/src/STLport/deque
deleted file mode 100644
index 23c5c58..0000000
--- a/src/STLport/deque
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_DEQUE
-#define _STLP_DEQUE
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x22
-#  include <stl/_prolog.h>
-# endif
-
-#ifdef _STLP_PRAGMA_ONCE
-# pragma once
-#endif
-
-#ifndef _STLP_INTERNAL_DEQUE_H
-# include <stl/_deque.h>
-#endif
-
-#if defined (_STLP_WHOLE_VENDOR_STD)
-# include _STLP_NATIVE_HEADER(deque)
-#endif
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x22)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_DEQUE */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/exception b/src/STLport/exception
deleted file mode 100644
index 8254e18..0000000
--- a/src/STLport/exception
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-// This header exists solely for portability.  Normally it just includes
-// the native header <exception>.
-
-// The header <exception> contains low-level functions that interact
-// with a compiler's exception-handling mechanism.  It is assumed to
-// be supplied with the compiler, rather than with the library, because
-// it is inherently tied very closely to the compiler itself.
-
-// On platforms where <exception> does not exist, this header defines
-// an exception base class.  This is *not* a substitute for everything
-// in <exception>, but it suffices to support a bare minimum of STL
-// functionality.
-
-# if !defined (_STLP_OUTERMOST_HEADER_ID)
-#  define _STLP_OUTERMOST_HEADER_ID 0x423
-#  include <stl/_prolog.h>
-# elif (_STLP_OUTERMOST_HEADER_ID == 0x423) && ! defined (_STLP_DONT_POP_0x423)
-#  define _STLP_DONT_POP_0x423
-# endif
-
-# if   ! defined (_STLP_NO_EXCEPTION_HEADER)
-
-#  if defined ( _UNCAUGHT_EXCEPTION )
-#   undef _STLP_INCOMPLETE_EXCEPTION_HEADER
-#  endif
-
-# if defined(_STLP_BROKEN_EXCEPTION_CLASS)
-#  define exception     _STLP_NULLIFIED_BROKEN_EXCEPTION_CLASS
-#  define bad_exception _STLP_NULLIFIED_BROKEN_BAD_EXCEPTION_CLASS
-#  if defined (_STLP_NO_NEW_NEW_HEADER)
-#   include _STLP_NATIVE_CPP_RUNTIME_HEADER(Exception.h)
-#  else
-#   include _STLP_NATIVE_CPP_RUNTIME_HEADER(Exception)
-#  endif
-#  undef exception
-#  undef bad_exception
-# else
-
-# if defined (_STLP_NO_NEW_NEW_HEADER)
-#  include _STLP_NATIVE_CPP_RUNTIME_HEADER(exception.h)
-# else
-#   include _STLP_NATIVE_CPP_RUNTIME_HEADER(exception)
-# endif
-
-# endif
-
-#    if defined (_STLP_MSVC) || defined (__ICL)
-// dwa 02/04/00 - here I'm assuming that __ICL uses the same library headers as vc6.
-// the header <yvals.h> which ships with vc6 and is included by its native <exception>
-// actually turns on warnings, so we have to turn them back off.
-#      include <config/_msvc_warnings_off.h>
-#    endif
-
-
-#  ifdef _STLP_USE_OWN_NAMESPACE
-
-_STLP_BEGIN_NAMESPACE
-
-#if !defined(_STLP_BROKEN_EXCEPTION_CLASS)
-using _STLP_VENDOR_EXCEPT_STD::exception;
-using _STLP_VENDOR_EXCEPT_STD::bad_exception;
-#endif
-
-# if ! defined (_STLP_NO_USING_FOR_GLOBAL_FUNCTIONS)
-
-// fbp : many platforms present strange mix of
-// those in various namespaces
-#  if !defined(_STLP_VENDOR_UNEXPECTED_STD)
-#   define _STLP_VENDOR_UNEXPECTED_STD _STLP_VENDOR_EXCEPT_STD
-#  endif
-
-// weird errors
-# if (! defined (__BORLANDC__)) || (defined (__STD_EXCEPTION) && defined (__RWSTD_EXCEPTION_SEEN) && defined ( _STLP_DONT_POP_0x423))
-using _STLP_VENDOR_UNEXPECTED_STD::unexpected;
-using _STLP_VENDOR_UNEXPECTED_STD::unexpected_handler;
-using _STLP_VENDOR_UNEXPECTED_STD::set_unexpected;
-using _STLP_VENDOR_UNEXPECTED_STD::terminate;
-using _STLP_VENDOR_UNEXPECTED_STD::terminate_handler;
-using _STLP_VENDOR_UNEXPECTED_STD::set_terminate;
-# endif
-
-# if !defined (_STLP_INCOMPLETE_EXCEPTION_HEADER) 
-using _STLP_VENDOR_UNEXPECTED_STD::uncaught_exception;
-# endif
-
-#  endif
-
-_STLP_END_NAMESPACE
-
-#  endif /* _STLP_OWN_NAMESPACE */
-
-#else /* _STLP_NO_EXCEPTION_HEADER */
-
-// fbp : absence of <exception> usually means that those
-// functions are not going to be called by compiler.
-// Still, define them for the user.
-typedef void (*unexpected_handler)();
-unexpected_handler set_unexpected(unexpected_handler f) _STLP_NOTHROW_INHERENTLY;
-void unexpected();
-
-typedef void (*terminate_handler)();
-terminate_handler set_terminate(terminate_handler f) _STLP_NOTHROW_INHERENTLY;
-void terminate();
-
-bool uncaught_exception(); // not implemented under mpw as of Jan/1999
-
-#endif  /* _STLP_NO_EXCEPTION_HEADER */	
-
-# if   defined (_STLP_NO_EXCEPTION_HEADER) || defined(_STLP_BROKEN_EXCEPTION_CLASS)
-# ifndef _STLP_EXCEPTION_H
-#  define _STLP_EXCEPTION_H
-
-_STLP_BEGIN_NAMESPACE
-
-// section 18.6.1
-	class _STLP_CLASS_DECLSPEC exception 
-	{
-	public:
-# ifdef _STLP_OWN_IOSTREAMS
-	        exception() _STLP_NOTHROW;
-	        virtual ~exception() _STLP_NOTHROW;
-		virtual const char* what() const _STLP_NOTHROW;
-# else
-	        exception() _STLP_NOTHROW {}
-		virtual ~exception() _STLP_NOTHROW {}
-		virtual const char* what() const _STLP_NOTHROW {return "class exception";}
-# endif
-	};
-	
-	
-
-// section 18.6.2.1
-	class _STLP_CLASS_DECLSPEC bad_exception : public exception 
-	{
-	public:
-# ifdef _STLP_OWN_IOSTREAMS
-	  bad_exception() _STLP_NOTHROW;
-	  ~bad_exception() _STLP_NOTHROW;
-	  const char* what() const _STLP_NOTHROW;
-# else
-	  bad_exception() _STLP_NOTHROW {}
-	  ~bad_exception() _STLP_NOTHROW {}
-	  const char* what() const _STLP_NOTHROW {return "class bad_exception";}
-# endif
-	};
-
-_STLP_END_NAMESPACE
-
-#endif /* _STLP_NO_EXCEPTION_HEADER */
-
-_STLP_BEGIN_NAMESPACE
-// forward declaration
-class __Named_exception;
-_STLP_END_NAMESPACE
-#endif /* _STLP_EXCEPTION_H */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x423)
-#  if ! defined (_STLP_DONT_POP_0x423)
-#   include <stl/_epilog.h>
-#   undef  _STLP_OUTERMOST_HEADER_ID
-#   endif
-#   undef  _STLP_DONT_POP_0x423
-# endif
-
-// Local Variables:
-// mode:C++
-// End:
-
-
-
diff --git a/src/STLport/exception.h b/src/STLport/exception.h
deleted file mode 100644
index 7dbb34c..0000000
--- a/src/STLport/exception.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_OLDSTD_exception
-# define _STLP_OLDSTD_exception
-
-# if !defined (_STLP_OUTERMOST_HEADER_ID)
-#  define _STLP_OUTERMOST_HEADER_ID 0x824
-#  include <stl/_prolog.h>
-# elif (_STLP_OUTERMOST_HEADER_ID == 0x824) && ! defined (_STLP_DONT_POP_0x824)
-#  define _STLP_DONT_POP_0x824
-# endif
-
-# if defined (__BORLANDC__)
-#  include <exception.>
-# elif defined (_MSC_VER)
-#  include <exception>
-# else
-#  include _STLP_NATIVE_CPP_RUNTIME_HEADER(exception.h)
-# endif
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x824)
-#  if ! defined (_STLP_DONT_POP_0x824)
-#   include <stl/_epilog.h>
-#   undef  _STLP_OUTERMOST_HEADER_ID
-#   endif
-#   undef  _STLP_DONT_POP_0x824
-# endif
-
-#endif /* _STLP_OLDSTD_exception */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/export b/src/STLport/export
deleted file mode 100644
index 964628e..0000000
--- a/src/STLport/export
+++ /dev/null
@@ -1,85 +0,0 @@
-./algorithm
-./bitset
-./cassert
-./cctype
-./cerrno
-./cfloat
-./climits
-./clocale
-./cmath
-./complex
-./csetjmp
-./csignal
-./cstdarg
-./cstddef
-./cstdio
-./cstdlib
-./cstring
-./ctime
-./ctype.h
-./cwchar
-./cwctype
-./deque
-./exception
-./exception.h
-./export
-./fstream
-./fstream.h
-./functional
-./hash_map
-./hash_set
-./iomanip
-./iomanip.h
-./ios
-./ios.h
-./iosfwd
-./iostream
-./iostream.h
-./istream
-./istream.h
-./iterator
-./limits
-./list
-./locale
-./locale.h
-./map
-./math.h
-./mem.h
-./memory
-./mmemory.h
-./new
-./new.h
-./numeric
-./ostream
-./ostream.h
-./pthread.h
-./pthread_alloc
-./queue
-./rope
-./set
-./setjmp.h
-./signal.h
-./slist
-./sstream
-./stack
-./stdarg.h
-./stddef.h
-./stdexcept
-./stdio.h
-./stdio_streambuf
-./stdlib.h
-./stl_user_config.h
-./streambuf
-./streambuf.h
-./string
-./string.h
-./strstream
-./strstream.h
-./time.h
-./typeinfo
-./typeinfo.h
-./utility
-./valarray
-./vector
-./wchar.h
-./wctype.h
diff --git a/src/STLport/export.sun b/src/STLport/export.sun
deleted file mode 100644
index 1b310a2..0000000
--- a/src/STLport/export.sun
+++ /dev/null
@@ -1,48 +0,0 @@
-./algorithm.SUNWCCh
-./bitset.SUNWCCh
-./complex.SUNWCCh
-./deque.SUNWCCh
-./exception.SUNWCCh
-./fstream.SUNWCCh
-./fstream.h.SUNWCCh
-./functional.SUNWCCh
-./hash_map.SUNWCCh
-./hash_set.SUNWCCh
-./iomanip.SUNWCCh
-./iomanip.h.SUNWCCh
-./ios.SUNWCCh
-./ios.h.SUNWCCh
-./iosfwd.SUNWCCh
-./iostream.SUNWCCh
-./iostream.h.SUNWCCh
-./istream.SUNWCCh
-./istream.h.SUNWCCh
-./iterator.SUNWCCh
-./limits.SUNWCCh
-./list.SUNWCCh
-./locale.SUNWCCh
-./map.SUNWCCh
-./memory.SUNWCCh
-./new.SUNWCCh
-./numeric.SUNWCCh
-./ostream.SUNWCCh
-./ostream.h.SUNWCCh
-./pthread_alloc.SUNWCCh
-./queue.SUNWCCh
-./set.SUNWCCh
-./slist.SUNWCCh
-./sstream.SUNWCCh
-./stack.SUNWCCh
-./stdexcept.SUNWCCh
-./streambuf.SUNWCCh
-./streambuf.h.SUNWCCh
-./string.SUNWCCh
-./strstream.SUNWCCh
-./strstream.h.SUNWCCh
-./typeinfo.SUNWCCh
-./utility.SUNWCCh
-./valarray.SUNWCCh
-./vector.SUNWCCh
-
-
-
diff --git a/src/STLport/fstream b/src/STLport/fstream
deleted file mode 100644
index 5a3b486..0000000
--- a/src/STLport/fstream
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-
-
-// This header defines classes basic_filebuf, basic_ifstream,
-// basic_ofstream, and basic_fstream.  These classes represent
-// streambufs and streams whose sources or destinations are files.
-
-#ifndef _STLP_FSTREAM
-#define _STLP_FSTREAM
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x1025
-#  include <stl/_prolog.h>
-# endif
-
-#ifdef _STLP_PRAGMA_ONCE
-# pragma once
-#endif
-
-# if defined (_STLP_OWN_IOSTREAMS)
-#  include <stl/_fstream.h>
-
-# ifndef __LOCALE_INITIALIZED
-#  define __LOCALE_INITIALIZED
-_STLP_BEGIN_NAMESPACE
-// Global initializer object, to ensure construction of static objects.
-static ios_base::_Loc_init _LocInit;
-_STLP_END_NAMESPACE
-# endif
-
-# elif !defined(_STLP_USE_NO_IOSTREAMS)
-#  include <wrap_std/fstream>
-# endif
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x1025)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_FSTREAM */
-
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/fstream.h b/src/STLport/fstream.h
deleted file mode 100644
index e2ce711..0000000
--- a/src/STLport/fstream.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_FSTREAM_H
-# define _STLP_FSTREAM_H
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x2026
-#  include <stl/_prolog.h>
-# endif
-
-# if defined (_STLP_OWN_IOSTREAMS)
-#ifdef __BORLANDC__
-#  include <fstream.>
-#else
-#  include <fstream>
-#endif
-// get desired pollution
-#  include <iostream.h>
-
-# ifndef __LOCALE_INITIALIZED
-#  define __LOCALE_INITIALIZED
-// Global initializer object, to ensure initialization of locale subsystem.
-static ios_base::_Loc_init _LocInit;
-# endif
-
-#  ifndef _STLP_HAS_NO_NAMESPACES
-#   include <using/fstream>
-#  endif
-
-# elif ! defined (_STLP_USE_NO_IOSTREAMS)
-# include <wrap_std/h/fstream.h>
-# endif
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x2026)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_FSTREAM_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/functional b/src/STLport/functional
deleted file mode 100644
index 80cd905..0000000
--- a/src/STLport/functional
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_FUNCTIONAL
-#define _STLP_FUNCTIONAL
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x27
-#  include <stl/_prolog.h>
-# endif
-
-# ifdef _STLP_PRAGMA_ONCE
-#  pragma once
-# endif
-
-# if defined (_STLP_IMPORT_VENDOR_STD)
-#  include _STLP_NATIVE_HEADER(functional)
-# endif
-
-# ifndef _STLP_INTERNAL_FUNCTION_H
-#  include <stl/_function.h>
-# endif
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x27)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_FUNCTIONAL */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/hash_map b/src/STLport/hash_map
deleted file mode 100644
index 88964eb..0000000
--- a/src/STLport/hash_map
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_HASH_MAP
-#define _STLP_HASH_MAP
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x4028
-#  include <stl/_prolog.h>
-# endif
-
-# ifdef _STLP_PRAGMA_ONCE
-#  pragma once
-# endif
-
-#include <stl/_hash_map.h>
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x4028)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_HASH_MAP */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/hash_set b/src/STLport/hash_set
deleted file mode 100644
index 3e4ac56..0000000
--- a/src/STLport/hash_set
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_HASH_SET
-#define _STLP_HASH_SET
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x4029
-#  include <stl/_prolog.h>
-# endif
-
-# ifdef _STLP_PRAGMA_ONCE
-#  pragma once
-# endif
-
-#include <stl/_hash_set.h>
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x4029)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_HASH_SET */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/iomanip b/src/STLport/iomanip
deleted file mode 100644
index 39bf3fe..0000000
--- a/src/STLport/iomanip
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-
-#ifndef _STLP_IOMANIP
-#define _STLP_IOMANIP
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x1030
-#  include <stl/_prolog.h>
-# endif
-
-# ifdef _STLP_PRAGMA_ONCE
-#  pragma once
-# endif
-
-# if defined ( _STLP_OWN_IOSTREAMS )
-
-#  include <stl/_istream.h>              // Includes <ostream> and <ios>
-
-_STLP_BEGIN_NAMESPACE
-
-//----------------------------------------------------------------------
-// Machinery for defining manipulators.
-
-// Class that calls one of ios_base's single-argument member functions.
-template <class _Arg>
-struct _Ios_Manip_1 {
-   typedef _Arg (ios_base::*__f_ptr_type)(_Arg);
- 
-  _Ios_Manip_1(__f_ptr_type __f, const _Arg& __arg)  
-    : _M_f(__f), _M_arg(__arg)
-    {}
-  
-  void operator()(ios_base& __ios) const {
-    (__ios.*_M_f)(_M_arg);
-  }
-
-  __f_ptr_type _M_f;
-  _Arg _M_arg;
-};
-
-// Class that calls one of ios_base's two-argument member functions.
-struct _Ios_Setf_Manip {
-  ios_base::fmtflags _M_flag;
-  ios_base::fmtflags _M_mask;
-  bool _M_two_args;
-
-  _Ios_Setf_Manip(ios_base::fmtflags __f)
-    : _M_flag(__f), _M_mask(0), _M_two_args(false)
-    {}
-
-  _Ios_Setf_Manip(ios_base::fmtflags __f, ios_base::fmtflags __m)
-    : _M_flag(__f), _M_mask(__m), _M_two_args(true)
-    {}
-
-  void operator()(ios_base& __ios) const {
-    if (_M_two_args)
-      __ios.setf(_M_flag, _M_mask);
-    else
-      __ios.setf(_M_flag);
-  }
-};
-
-
-template <class _CharT, class _Traits, class _Arg>
-inline basic_istream<_CharT, _Traits>& _STLP_CALL
-operator>>(basic_istream<_CharT, _Traits>& __in,
-           const _Ios_Manip_1<_Arg>& __f)
-{
-  __f(__in);
-  return __in;
-}
-
-template <class _CharT, class _Traits, class _Arg>
-inline basic_ostream<_CharT, _Traits>& _STLP_CALL
-operator<<(basic_ostream<_CharT, _Traits>& __os,
-           const _Ios_Manip_1<_Arg>& __f)
-{
-  __f(__os);
-  return __os;
-}
-
-template <class _CharT, class _Traits>
-inline basic_istream<_CharT, _Traits>& _STLP_CALL
-operator>>(basic_istream<_CharT, _Traits>& __in, const _Ios_Setf_Manip& __f)
-{
-  __f(__in);
-  return __in;
-}
-
-template <class _CharT, class _Traits>
-inline basic_ostream<_CharT, _Traits>& _STLP_CALL
-operator<<(basic_ostream<_CharT, _Traits>& __os, const _Ios_Setf_Manip& __f)
-
-{
-  __f(__os);
-  return __os;
-}
-
-//----------------------------------------------------------------------
-// The ios_base manipulators.
-
-inline _Ios_Setf_Manip  _STLP_CALL resetiosflags(ios_base::fmtflags __mask) {
-  return _Ios_Setf_Manip(0, __mask);
-}
-
-inline _Ios_Setf_Manip _STLP_CALL setiosflags(ios_base::fmtflags __flag) {
-  return _Ios_Setf_Manip(__flag);
-}
-
-inline _Ios_Setf_Manip _STLP_CALL setbase(int __n) {
-  ios_base::fmtflags __base = __n == 8  ? ios_base::oct :
-                              __n == 10 ? ios_base::dec :
-                              __n == 16 ? ios_base::hex :
-                              ios_base::fmtflags(0);
-  return _Ios_Setf_Manip(__base, ios_base::basefield);
-}
-
-inline _Ios_Manip_1<streamsize> _STLP_CALL 
-setprecision(int __n) {
-  _Ios_Manip_1<streamsize>::__f_ptr_type __f = &ios_base::precision;
-  return _Ios_Manip_1<streamsize>(__f, __n);
-}
-
-inline _Ios_Manip_1<streamsize>  _STLP_CALL
-setw(int __n) {
-  _Ios_Manip_1<streamsize>::__f_ptr_type __f = &ios_base::width;	
-  return _Ios_Manip_1<streamsize>(__f, __n);
-}
-
-//----------------------------------------------------------------------
-// setfill, a manipulator that operates on basic_ios<> instead of ios_base.
-
-template <class _CharT>
-struct _Setfill_Manip {
-  _Setfill_Manip(_CharT __c) : _M_c(__c) {}
-  _CharT _M_c;
-};
-
-template <class _CharT, class _CharT2, class _Traits>
-inline basic_ostream<_CharT, _Traits>& _STLP_CALL 
-operator<<(basic_ostream<_CharT, _Traits>& __os, 
-           const _Setfill_Manip<_CharT2>& __m)
-{
-  __os.fill(__m._M_c);
-  return __os;
-}
-
-template <class _CharT, class _CharT2, class _Traits>
-inline basic_istream<_CharT, _Traits>& _STLP_CALL 
-operator>>(basic_istream<_CharT, _Traits>& __is, 
-           const _Setfill_Manip<_CharT2>& __m)
-{
-  __is.fill(__m._M_c);
-  return __is;
-}
-
-template <class _CharT>
-inline _Setfill_Manip<_CharT> _STLP_CALL 
-setfill(_CharT __c) {
-  return _Setfill_Manip<_CharT>(__c);
-}
-
-_STLP_END_NAMESPACE
-
-# elif !defined (_STLP_USE_NO_IOSTREAMS)
-#  include <wrap_std/iomanip>
-# endif
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x1030)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_IOMANIP */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/iomanip.h b/src/STLport/iomanip.h
deleted file mode 100644
index 4052ec5..0000000
--- a/src/STLport/iomanip.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_IOMANIP_H
-# define _STLP_IOMANIP_H
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x2031
-#  include <stl/_prolog.h>
-# endif
-
-# if defined ( _STLP_OWN_IOSTREAMS )
-
-#ifdef __BORLANDC__
-#  include <iomanip.>
-#else
-#  include <iomanip>
-#endif
-
-#  ifndef _STLP_HAS_NO_NAMESPACES
-#  ifdef _STLP_BROKEN_USING_DIRECTIVE
-using namespace _STLP_STD;
-#  else
-using _STLP_STD::setiosflags;
-using _STLP_STD::resetiosflags;
-using _STLP_STD::setbase;
-using _STLP_STD::setfill;
-using _STLP_STD::setprecision;
-using _STLP_STD::setw;
-#  endif
-#  endif /* _STLP_HAS_NO_NAMESPACES */
-
-// get all the pollution we want
-# include <iostream.h>
-
-# elif !defined (_STLP_USE_NO_IOSTREAMS)
-
-# include _STLP_NATIVE_OLD_STREAMS_HEADER(iomanip.h)
-
-# if defined  (_STLP_USE_NAMESPACES) && ! defined (_STLP_BROKEN_USING_DIRECTIVE)
-_STLP_BEGIN_NAMESPACE
-# include <using/h/iomanip.h>
-_STLP_END_NAMESPACE
-#  endif /* _STLP_USE_NAMESPACES */
-
-# endif
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x2031)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_IOMANIP_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/ios b/src/STLport/ios
deleted file mode 100644
index a10d7a9..0000000
--- a/src/STLport/ios
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-
-#ifndef _STLP_IOS
-#define _STLP_IOS
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x1032
-#  include <stl/_prolog.h>
-# endif
-
-# ifdef _STLP_PRAGMA_ONCE
-#  pragma once
-# endif
-
-# if defined ( _STLP_OWN_IOSTREAMS )
-#  include <stl/_ios.h>
-# elif !defined (_STLP_USE_NO_IOSTREAMS)
-#  include <wrap_std/ios>
-# endif
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x1032)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_IOS */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/ios.h b/src/STLport/ios.h
deleted file mode 100644
index 7c92cec..0000000
--- a/src/STLport/ios.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_IOS_H
-# define _STLP_IOS_H
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x1033
-#  include <stl/_prolog.h>
-# endif
-
-# if defined (_STLP_OWN_IOSTREAMS)
-
-#ifdef __BORLANDC__
-#  include <ios.>
-#else
-#  include <ios>
-#endif
-
-# if defined (_STLP_USE_NAMESPACES)
-# include <using/ios>
-# endif
-
-# elif !defined (_STLP_USE_NO_IOSTREAMS)
-
-# include _STLP_NATIVE_OLD_STREAMS_HEADER(ios.h)
-# if defined (_STLP_USE_NAMESPACES) && !defined (_STLP_BROKEN_USING_DIRECTIVE)
-_STLP_BEGIN_NAMESPACE
-using _STLP_OLD_IO_NAMESPACE::ios;
-_STLP_END_NAMESPACE
-# endif /* _STLP_USE_OWN_NAMESPACE */
-
-# endif
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x1033)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_IOS_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/iosfwd b/src/STLport/iosfwd
deleted file mode 100644
index cd958c8..0000000
--- a/src/STLport/iosfwd
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-
-#ifndef _STLP_IOSFWD
-#define _STLP_IOSFWD
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x1034
-#  include <stl/_prolog.h>
-# endif
-
-# ifdef _STLP_PRAGMA_ONCE
-#  pragma once
-# endif
-
-# if defined (_STLP_OWN_IOSTREAMS)
-
-#  if defined (_STLP_HAS_WCHAR_T) && !defined (_STLP_CWCHAR)
-#   include <cwchar>
-#  endif			
-
-#  include <stl/_iosfwd.h>
-
-# elif defined (_STLP_USE_NO_IOSTREAMS)
-
-#  include <stl/char_traits.h> 
-
-# else
-
-_STLP_BEGIN_NAMESPACE
-template <class _Tp> class allocator;
-_STLP_END_NAMESPACE
-
-#  include <wrap_std/iosfwd>
-
-# endif
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x1034)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_IOSFWD */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/iostream b/src/STLport/iostream
deleted file mode 100644
index 2e3259b..0000000
--- a/src/STLport/iostream
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-
-#ifndef _STLP_IOSTREAM
-#define _STLP_IOSTREAM
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x1037
-#  include <stl/_prolog.h>
-# endif
-
-# ifdef _STLP_PRAGMA_ONCE
-#  pragma once
-# endif
-
-# if defined (_STLP_OWN_IOSTREAMS)
-
-#include <stl/_iosfwd.h>
-#include <stl/_istream.h>
-
-_STLP_BEGIN_NAMESPACE
-
-#ifndef _STLP_USE_NAMESPACES
-// in case of SGI iostreams, we have to rename our streams not to clash with those
-// provided in native lib
-# define cin _STLP_cin
-# define cout _STLP_cout
-# define cerr _STLP_cerr
-# define clog _STLP_clog
-#endif
-
-// Note: cin and wcin are both associated with stdio.  The C standard
-// (Amendment 1, section 4.6.2.1) says that it is an error to mix
-// wide- and narrow-oriented I/O on the same stream.  This implies
-// that it is an error to use both cin and wcin in the same C++
-// program; the same applies to cout and wcout, and cerr/clog and
-// wcerr/wclog.
-
-extern _STLP_DECLSPEC istream cin;
-extern _STLP_DECLSPEC ostream cout;
-extern _STLP_DECLSPEC ostream cerr;
-extern _STLP_DECLSPEC ostream clog;
-
-# ifndef _STLP_NO_WCHAR_T
-extern _STLP_DECLSPEC wistream wcin;
-extern _STLP_DECLSPEC wostream wcout;
-extern _STLP_DECLSPEC wostream wcerr;
-extern _STLP_DECLSPEC wostream wclog;
-# endif
-
-# ifndef __LOCALE_INITIALIZED
-#  define __LOCALE_INITIALIZED
-// Global initializer object, to ensure initialization of locale subsystem.
-static ios_base::_Loc_init _LocInit;
-# endif
-
-# ifndef __IOS_BASE_INITIALIZED
-#  define __IOS_BASE_INITIALIZED
-// Global initializer object, to ensure construction of static objects.
-static ios_base::Init _IosInit;
-# endif
-
-_STLP_END_NAMESPACE
-
-# elif defined ( _STLP_USE_NO_IOSTREAMS )
-#  include <stl/_null_stream.h>
-# else
-
-#  include <wrap_std/iostream>
-
-# endif /* STL_USE_NO_IOSTREAMS */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x1037)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_IOSTREAM */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/iostream.h b/src/STLport/iostream.h
deleted file mode 100644
index 439a0b1..0000000
--- a/src/STLport/iostream.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_IOSTREAM_H
-# define _STLP_IOSTREAM_H
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x2035
-#  include <stl/_prolog.h>
-# endif
-
-# ifdef _STLP_OWN_IOSTREAMS
-
-#ifdef __BORLANDC__
-# include <iostream.>
-#else
-# include <iostream>
-#endif
-
-// Those should be included all separately, as they do contain using declarations
-# include <streambuf.h>
-# include <ostream.h>
-# include <istream.h>
-
-# ifndef _STLP_HAS_NO_NAMESPACES
-
-#  ifdef _STLP_BROKEN_USING_DIRECTIVE
-using namespace _STLP_STD;
-#  else
-using _STLP_STD::cin;
-using _STLP_STD::cout;
-using _STLP_STD::clog;
-using _STLP_STD::cerr;
-using _STLP_STD::iostream;
-
-#   ifndef _STLP_NO_WCHAR_T
-using _STLP_STD::wcin;
-using _STLP_STD::wcout;
-using _STLP_STD::wclog;
-using _STLP_STD::wcerr;
-#   endif
-
-#  endif
-
-# endif /* _STLP_HAS_NO_NAMESPACES */
-
-// Obsolete classes for old-style backwards compatibility
-
-
-class istream_withassign : public istream {
- public:
-  istream_withassign() : istream((streambuf*)0) {}
-  ~istream_withassign() {}
-  
-  istream_withassign& operator=(istream& __s) { 
-    ios::init(__s.rdbuf()); 
-    return *this; 
-  }
-  istream_withassign& operator=(streambuf* __s) {
-    ios::init(__s); 
-    return *this; 
-  }
-};
-
-class ostream_withassign : public ostream {
- public:
-  ostream_withassign() : ostream((streambuf*)0) {}
-  ~ostream_withassign() {}
-  
-  ostream_withassign& operator=(ostream& __s) { 
-    ios::init(__s.rdbuf()); 
-    return *this; 
-  }
-  ostream_withassign& operator=(streambuf* __s) { 
-    ios::init(__s); 
-    return *this; 
-  }
-};
-
-class iostream_withassign : public iostream {
- public:
-  iostream_withassign() : iostream((streambuf*)0) {}
-  ~iostream_withassign() {}
-  iostream_withassign & operator=(ios& __i) {
-    ios::init(__i.rdbuf());
-    return *this; 
-  }
-  iostream_withassign & operator=(streambuf* __s) {
-    ios::init(__s); 
-    return *this; 
-  }
-} ;
-
-# elif ! defined (_STLP_USE_NO_IOSTREAMS)
-#  include <wrap_std/h/iostream.h>
-# endif
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x2035)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_IOSTREAM_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/istream b/src/STLport/istream
deleted file mode 100644
index fec47d7..0000000
--- a/src/STLport/istream
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-
-#ifndef _STLP_ISTREAM
-#define _STLP_ISTREAM
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x1036
-#  include <stl/_prolog.h>
-# endif
-
-# ifdef _STLP_PRAGMA_ONCE
-#  pragma once
-# endif
-
-# if defined (_STLP_OWN_IOSTREAMS)
-
-// boris : apparently, needed to resolve some
-// circular dependancies
-// #  include <iterator>
-#  include <stl/_istream.h>
-
-# elif !defined(_STLP_USE_NO_IOSTREAMS)
-
-#  include <wrap_std/istream>
-
-# endif
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x1036)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_ISTREAM */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/istream.h b/src/STLport/istream.h
deleted file mode 100644
index 342aae8..0000000
--- a/src/STLport/istream.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_ISTREAM_H
-# define _STLP_ISTREAM_H
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x2037
-#  include <stl/_prolog.h>
-# endif
-
-# if defined (_STLP_OWN_IOSTREAMS)
-
-# include <istream>
-
-# ifndef _STLP_HAS_NO_NAMESPACES
-#  ifdef _STLP_BROKEN_USING_DIRECTIVE
-using namespace _STLP_STD;
-#  else
-using _STLP_STD::basic_istream;
-using _STLP_STD::basic_iostream;
-using _STLP_STD::istream;
-using _STLP_STD::iostream;
-using _STLP_STD::ios;
-#   ifndef _STLP_NO_WCHAR_T
-using _STLP_STD::wistream;
-using _STLP_STD::wiostream;
-#   endif
-using _STLP_STD::ws;
-#  endif
-# endif
-
-# elif !defined (_STLP_USE_NO_IOSTREAMS)
-
-# include _STLP_NATIVE_OLD_STREAMS_HEADER(istream.h)
-
-# if defined (_STLP_USE_NAMESPACES) && !defined (_STLP_BROKEN_USING_DIRECTIVE)
-_STLP_BEGIN_NAMESPACE
-using _STLP_OLD_IO_NAMESPACE::istream;
-_STLP_END_NAMESPACE
-# endif /* _STLP_USE_OWN_NAMESPACE */
-
-# endif /* _STLP_OWN_IOSTREAMS */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x2037)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_ISTREAM_H */
-
diff --git a/src/STLport/iterator b/src/STLport/iterator
deleted file mode 100644
index ee3cbd6..0000000
--- a/src/STLport/iterator
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_ITERATOR
-#define _STLP_ITERATOR
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x38
-#  include <stl/_prolog.h>
-# endif
-
-# ifdef _STLP_PRAGMA_ONCE
-#  pragma once
-# endif
-
-#if defined (_STLP_IMPORT_VENDOR_STD)
-# include _STLP_NATIVE_HEADER(iterator)
-#endif /* IMPORT */
-
-# ifndef _STLP_INTERNAL_ITERATOR_H
-#  include <stl/_iterator.h>
-# endif
-
-# ifndef _STLP_INTERNAL_STREAM_ITERATOR_H
-#  include <stl/_stream_iterator.h>
-# endif
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x38)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_ITERATOR */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/limits b/src/STLport/limits
deleted file mode 100644
index 2cd16b5..0000000
--- a/src/STLport/limits
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_LIMITS
-#define _STLP_LIMITS
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x39
-#  include <stl/_prolog.h>
-# endif
-
-# ifdef _STLP_PRAGMA_ONCE
-#  pragma once
-# endif
-
-# ifndef _STLP_LIMITS_H
-#  include <stl/_limits.h>
-# endif
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x39)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_LIMITS */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/list b/src/STLport/list
deleted file mode 100644
index 7cdc087..0000000
--- a/src/STLport/list
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_LIST
-#define _STLP_LIST
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x40
-#  include <stl/_prolog.h>
-# endif
-
-# ifdef _STLP_PRAGMA_ONCE
-#  pragma once
-# endif
-
-#ifndef _STLP_INTERNAL_LIST_H
-# include <stl/_list.h>
-#endif
-
-#if defined (_STLP_WHOLE_VENDOR_STD)
-# include _STLP_NATIVE_HEADER(list)
-#endif
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x40)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_LIST */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/locale b/src/STLport/locale
deleted file mode 100644
index cd7ae9e..0000000
--- a/src/STLport/locale
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-#ifndef _STLP_LOCALE
-#define _STLP_LOCALE
-
-// Basic framework: class locale and class locale::facet
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x1041
-#  include <stl/_prolog.h>
-# endif
-
-# ifdef _STLP_PRAGMA_ONCE
-#  pragma once
-# endif
-
-# if defined (_STLP_OWN_IOSTREAMS)
-
-// Individual facets
-#ifndef _STLP_INTERNAL_CTYPE_H
-#include <stl/_ctype.h>
-#endif
-#ifndef _STLP_INTERNAL_CODECVT_H
-#include <stl/_codecvt.h>
-#endif
-#ifndef _STLP_INTERNAL_COLLATE_H
-#include <stl/_collate.h>
-#endif
-#ifndef _STLP_INTERNAL_NUM_PUT_H
-# include <stl/_num_put.h>
-#endif
-
-#ifndef _STLP_INTERNAL_NUM_GET_H
-# include <stl/_num_get.h>
-#endif
-
-// those never included separately anyway
-#include <stl/_monetary.h>
-#include <stl/_time_facets.h>
-#include <stl/_messages_facets.h>
-
-// some stuff for streambuf iterators ended up defined there
-// Strictly speaking, _istream.h portion is only required for <iterator>, but it may break too many 
-// programs if we omit it
-#ifndef _STLP_ISTREAM_H
-# include <stl/_istream.h>
-#endif
-
-// Convenience interfaces
-#undef isspace
-#undef isprint
-#undef iscntrl
-#undef isupper
-#undef islower
-#undef isalpha
-#undef isdigit
-#undef ispunct
-#undef isxdigit
-#undef isalnum
-#undef isgraph
-#undef toupper
-#undef tolower
-
-_STLP_BEGIN_NAMESPACE
-
-template <class _CharT> 
-inline bool isspace (_CharT c, const locale& loc) {
-  return (use_facet<ctype<_CharT> >(loc)).is(ctype_base::space, c);
-}
-
-template <class _CharT> 
-inline bool isprint (_CharT c, const locale& loc) {
-  return (use_facet<ctype<_CharT> >(loc)).is(ctype_base::print, c);
-}
-
-template <class _CharT> 
-inline bool iscntrl (_CharT c, const locale& loc) {
-  return (use_facet<ctype<_CharT> >(loc)).is(ctype_base::cntrl, c);
-}
-
-template <class _CharT> 
-inline bool isupper (_CharT c, const locale& loc) {
-  return (use_facet<ctype<_CharT> >(loc)).is(ctype_base::upper, c);
-}
-
-template <class _CharT> 
-inline bool islower (_CharT c, const locale& loc) {
-  return (use_facet<ctype<_CharT> >(loc)).is(ctype_base::lower, c);
-}
-
-template <class _CharT> 
-inline bool isalpha (_CharT c, const locale& loc) {
-  return (use_facet<ctype<_CharT> >(loc)).is(ctype_base::alpha, c);
-}
-
-template <class _CharT> 
-inline bool isdigit (_CharT c, const locale& loc) {
-  return (use_facet<ctype<_CharT> >(loc)).is(ctype_base::digit, c);
-}
-
-template <class _CharT> 
-inline bool ispunct (_CharT c, const locale& loc) {
-  return (use_facet<ctype<_CharT> >(loc)).is(ctype_base::punct, c);
-}
-
-template <class _CharT> 
-inline bool isxdigit (_CharT c, const locale& loc) {
-  return (use_facet<ctype<_CharT> >(loc)).is(ctype_base::xdigit, c);
-}
-
-template <class _CharT> 
-inline bool isalnum (_CharT c, const locale& loc) {
-  return (use_facet<ctype<_CharT> >(loc)).is(ctype_base::alnum, c);
-}
-
-template <class _CharT> 
-inline bool isgraph (_CharT c, const locale& loc) {
-  return (use_facet<ctype<_CharT> >(loc)).is(ctype_base::graph, c);
-}
-
-template <class _CharT>
-inline _CharT toupper(_CharT c, const locale& loc) {
-  return (use_facet<ctype<_CharT> >(loc)).toupper(c);
-}
-
-template <class _CharT>
-inline _CharT tolower(_CharT c, const locale& loc) {
-  return (use_facet<ctype<_CharT> >(loc)).tolower(c);
-}
-
-# ifndef __LOCALE_INITIALIZED
-#  define __LOCALE_INITIALIZED
-// Global initializer object, to ensure initialization of locale subsystem.
-static ios_base::_Loc_init _LocInit;
-# endif
-
-_STLP_END_NAMESPACE
-
-# elif !defined (_STLP_USE_NO_IOSTREAMS)
-#  include <wrap_std/locale> 
-# endif
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x1041)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_LOCALE */
-
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/locale.h b/src/STLport/locale.h
deleted file mode 100644
index 0656975..0000000
--- a/src/STLport/locale.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-# if !defined (_STLP_OUTERMOST_HEADER_ID)
-#  define _STLP_OUTERMOST_HEADER_ID 0x242
-#  include <stl/_prolog.h>
-# elif (_STLP_OUTERMOST_HEADER_ID == 0x242) && ! defined (_STLP_DONT_POP_0x242)
-#  define _STLP_DONT_POP_0x242
-# endif
-
-# include _STLP_NATIVE_C_HEADER(locale.h)
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x242)
-#  if ! defined (_STLP_DONT_POP_0x242)
-#   include <stl/_epilog.h>
-#   undef  _STLP_OUTERMOST_HEADER_ID
-#   endif
-#   undef  _STLP_DONT_POP_0x242
-# endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/map b/src/STLport/map
deleted file mode 100644
index f0cf7b1..0000000
--- a/src/STLport/map
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_MAP
-#define _STLP_MAP
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x43
-#  include <stl/_prolog.h>
-# endif
-
-# ifdef _STLP_PRAGMA_ONCE
-#  pragma once
-# endif
-
-#include <stl/_map.h>
-
-#if defined (_STLP_WHOLE_VENDOR_STD)
-# include _STLP_NATIVE_HEADER(map)
-#endif
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x43)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_MAP */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/math.h b/src/STLport/math.h
deleted file mode 100644
index 7b02ff8..0000000
--- a/src/STLport/math.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-# if !defined (_STLP_OUTERMOST_HEADER_ID)
-#  define _STLP_OUTERMOST_HEADER_ID 0x244
-#  include <stl/_prolog.h>
-# elif (_STLP_OUTERMOST_HEADER_ID == 0x244) && ! defined (_STLP_DONT_POP_0x244)
-#  define _STLP_DONT_POP_0x244
-# endif
-
-# if ! defined (exception) && (! defined (__KCC) || (__KCC_VERSION < 4000)) && \
-   ! (defined(__IBMCPP__) && (500 <= __IBMCPP__))
-#  define __EXCEPTION_WAS_REDEFINED 1
-#  define exception __math_exception
-# endif
-
-# include _STLP_NATIVE_C_HEADER(math.h)
-
-# if defined (__EXCEPTION_WAS_REDEFINED)
-#  undef exception
-#  undef __EXCEPTION_WAS_REDEFINED
-# endif
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x244)
-#  if ! defined (_STLP_DONT_POP_0x244)
-#   include <stl/_epilog.h>
-#   undef  _STLP_OUTERMOST_HEADER_ID
-#   endif
-#   undef  _STLP_DONT_POP_0x244
-# endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/mem.h b/src/STLport/mem.h
deleted file mode 100644
index e80f14d..0000000
--- a/src/STLport/mem.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-// Boris : highly questionable header for BC++
-
-#ifndef _STLP_mem_h
-
-# if !defined (_STLP_OUTERMOST_HEADER_ID)
-#  define _STLP_OUTERMOST_HEADER_ID 0x245
-#  include <stl/_prolog.h>
-# elif (_STLP_OUTERMOST_HEADER_ID == 0x245) && ! defined (_STLP_DONT_POP_0x245)
-#  define _STLP_DONT_POP_0x245
-# endif
-
-# if (__BORLANDC__ > 0x530) && !defined(__linux__)
-#  include <rw/stddefs.h>
-# endif
-
-#   undef __USING_CNAME__
-
-#   include _STLP_NATIVE_C_HEADER(mem.h)
-
-# define _STLP_mem_h 1
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x245)
-#  if ! defined (_STLP_DONT_POP_0x245)
-#   include <stl/_epilog.h>
-#   undef  _STLP_OUTERMOST_HEADER_ID
-#   endif
-#   undef  _STLP_DONT_POP_0x245
-# endif
-
-#endif /* _STLP_mem_h */
-
-// #endif /* NATIVE */
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/memory b/src/STLport/memory
deleted file mode 100644
index 28f24e3..0000000
--- a/src/STLport/memory
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 1997-1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_MEMORY
-# define _STLP_MEMORY
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x46
-#  include <stl/_prolog.h>
-# endif
-
-# ifdef _STLP_PRAGMA_ONCE
-#  pragma once
-# endif
-
-# ifndef _STLP_INTERNAL_ALLOC_H
-#  include <stl/_alloc.h>
-# endif
-
-# ifndef _STLP_INTERNAL_TEMPBUF_H
-#  include <stl/_tempbuf.h>
-# endif
-
-# ifndef _STLP_INTERNAL_RAW_STORAGE_ITER_H
-#  include <stl/_raw_storage_iter.h>
-# endif
-
-# include <stl/_auto_ptr.h>
-
-# if defined (_STLP_IMPORT_VENDOR_STD)
-
-#  if defined (__MSL__)
-#   include _STLP_NATIVE_HEADER(limits)
-#  endif
-
-#  include _STLP_NATIVE_HEADER(memory)
-
-#  if defined (__MSL__) && (__MSL__ >= 0x2405	 && __MSL__ < 0x5201) 
-/*  980401 vss  MSL 2.4  Pro 3 Release  */	
-#   include <new_mem.h>
-#  endif
-
-# endif
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x46)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_MEMORY */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/mmemory.h b/src/STLport/mmemory.h
deleted file mode 100644
index 835dad5..0000000
--- a/src/STLport/mmemory.h
+++ /dev/null
@@ -1 +0,0 @@
-CAUUSE A SYNTAX ERROR
diff --git a/src/STLport/new b/src/STLport/new
deleted file mode 100644
index fcb3810..0000000
--- a/src/STLport/new
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_NEW_HEADER
-# define _STLP_NEW_HEADER
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x447
-#  include <stl/_prolog.h>
-# endif
-
-#ifndef _STLP_CSTDDEF
-// size_t
-# include <cstddef>
-#endif
-
-#if defined (__BORLANDC__) && (__BORLANDC__ > 0x520)
-// new.h uses ::malloc ;(
-# include <cstdlib>
-using _STLP_VENDOR_CSTD::malloc;
-#endif
-
-# if !defined (_STLP_NO_NEW_NEW_HEADER)
-#   include _STLP_NATIVE_CPP_RUNTIME_HEADER(new)
-#  else
-#   include  <new.h>
-# endif
-
-#ifndef _STLP_NEW_H_HEADER
-# include <stl/_new.h>
-#endif
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x447)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_NEW */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/new.h b/src/STLport/new.h
deleted file mode 100644
index b1bf7a4..0000000
--- a/src/STLport/new.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-
-# if !defined (_STLP_OUTERMOST_HEADER_ID)
-#  define _STLP_OUTERMOST_HEADER_ID 0x848
-#  include <stl/_prolog.h>
-# elif (_STLP_OUTERMOST_HEADER_ID == 0x848) && ! defined (_STLP_DONT_POP_0x848)
-#  define _STLP_DONT_POP_0x848
-# endif
-
-# ifndef _STLP_WINCE
-# if defined (__BORLANDC__)
-#  include <new.>
-# elif (__INTEL_COMPILER >= 800)
-#   include _STLP_NATIVE_OLD_STREAMS_HEADER(new.h)
-# else
-#  if defined (__GNUC__) && (__GNUC__ >=3)
-#   include _STLP_NATIVE_OLD_STREAMS_HEADER(new.h)
-#  else
-#   include _STLP_NATIVE_CPP_RUNTIME_HEADER(new.h)
-#  endif
-# endif
-# endif /* STL_WINCE */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x848)
-#  if ! defined (_STLP_DONT_POP_0x848)
-#   include <stl/_epilog.h>
-#   undef  _STLP_OUTERMOST_HEADER_ID
-#   endif
-#   undef  _STLP_DONT_POP_0x848
-# endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/numeric b/src/STLport/numeric
deleted file mode 100644
index c39f0e8..0000000
--- a/src/STLport/numeric
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_NUMERIC
-#define _STLP_NUMERIC
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x49
-#  include <stl/_prolog.h>
-# endif
-
-# ifdef _STLP_PRAGMA_ONCE
-#  pragma once
-# endif
-
-#ifndef _STLP_INTERNAL_FUNCTION_H
-# include <stl/_function.h>
-#endif
-
-#include <stl/_numeric.h>
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x49)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_NUMERIC */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/old_hp/algo.h b/src/STLport/old_hp/algo.h
deleted file mode 100644
index 9e62c34..0000000
--- a/src/STLport/old_hp/algo.h
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_ALGO_H
-#define _STLP_ALGO_H
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0xa001
-#  include <stl/_prolog.h>
-# endif
-
-# ifndef _STLP_ALGOBASE_H
-#  include <algobase.h>
-# endif
-
-# ifndef _STLP_TEMPBUF_H
-#  include <tempbuf.h>
-# endif
-
-# ifndef _STLP_INTERNAL_HEAP_H
-#  include <stl/_heap.h>
-# endif
-
-# ifndef _STLP_ITERATOR_H
-#  include <iterator.h>
-# endif
-
-# ifndef _STLP_INTERNAL_ALGO_H
-#  include <stl/_algo.h>
-# endif
-
-# ifndef _STLP_NUMERIC_H
-#  include <stl/_numeric.h>
-# endif
-
-#ifdef _STLP_USE_NAMESPACES
-
-# ifdef _STLP_BROKEN_USING_DIRECTIVE
-using namespace STLPORT;
-# else
-// Names from <stl/_algo.h>
-using STLPORT::for_each; 
-using STLPORT::find; 
-using STLPORT::find_if; 
-using STLPORT::adjacent_find; 
-using STLPORT::count; 
-using STLPORT::count_if; 
-using STLPORT::search; 
-using STLPORT::search_n; 
-using STLPORT::swap_ranges; 
-using STLPORT::transform; 
-using STLPORT::replace; 
-using STLPORT::replace_if; 
-using STLPORT::replace_copy; 
-using STLPORT::replace_copy_if; 
-using STLPORT::generate; 
-using STLPORT::generate_n; 
-// using STLPORT::remove; 
-using STLPORT::remove_if; 
-using STLPORT::remove_copy; 
-using STLPORT::remove_copy_if; 
-using STLPORT::unique; 
-using STLPORT::unique_copy; 
-using STLPORT::reverse; 
-using STLPORT::reverse_copy; 
-using STLPORT::rotate; 
-using STLPORT::rotate_copy; 
-using STLPORT::random_shuffle; 
-using STLPORT::random_sample; 
-using STLPORT::random_sample_n; 
-using STLPORT::partition; 
-using STLPORT::stable_partition; 
-using STLPORT::sort; 
-using STLPORT::stable_sort; 
-using STLPORT::partial_sort; 
-using STLPORT::partial_sort_copy; 
-using STLPORT::nth_element; 
-using STLPORT::lower_bound; 
-using STLPORT::upper_bound; 
-using STLPORT::equal_range; 
-using STLPORT::binary_search; 
-using STLPORT::merge; 
-using STLPORT::inplace_merge; 
-using STLPORT::includes; 
-using STLPORT::set_union; 
-using STLPORT::set_intersection; 
-using STLPORT::set_difference; 
-using STLPORT::set_symmetric_difference; 
-using STLPORT::min_element; 
-using STLPORT::max_element; 
-using STLPORT::next_permutation; 
-using STLPORT::prev_permutation; 
-using STLPORT::find_first_of; 
-using STLPORT::find_end; 
-using STLPORT::is_sorted; 
-using STLPORT::is_heap; 
-
-// Names from stl_heap.h
-using STLPORT::push_heap;
-using STLPORT::pop_heap;
-using STLPORT::make_heap;
-using STLPORT::sort_heap;
-
-// Names from <stl/_numeric.h>
-using STLPORT::accumulate; 
-using STLPORT::inner_product; 
-using STLPORT::partial_sum; 
-using STLPORT::adjacent_difference; 
-using STLPORT::power; 
-using STLPORT::iota; 
-
-# endif /* _STLP_BROKEN_USING_DIRECTIVE */
-#endif /* _STLP_USE_NAMESPACES */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0xa001)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_ALGO_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/old_hp/algobase.h b/src/STLport/old_hp/algobase.h
deleted file mode 100644
index 536c8d9..0000000
--- a/src/STLport/old_hp/algobase.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_ALGOBASE_H
-#define _STLP_ALGOBASE_H
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0xa002
-#  include <stl/_prolog.h>
-# endif
-
-#ifndef _STLP_PAIR_H
-#include <pair.h>
-#endif
-
-// memmove
-#ifndef _STLP_CSTRING
-# include <cstring>
-#endif
-
-// CHAR_MAX
-#ifndef _STLP_CLIMITS
-# include <climits>
-#endif
-
-#ifndef _STLP_ITERATOR_H
-#include <iterator.h>
-#endif
-
-#ifndef _STLP_INTERNAL_ALGOBASE_H
-#include <stl/_algobase.h>
-#endif
-
-#ifndef _STLP_INTERNAL_UNINITIALIZED_H
-#include <stl/_uninitialized.h>
-#endif
-
-#ifdef _STLP_USE_NAMESPACES
-
-# ifdef _STLP_BROKEN_USING_DIRECTIVE
-using namespace STLPORT;
-# else
-// Names from stl_algobase.h
-using STLPORT::iter_swap; 
-using STLPORT::swap; 
-using STLPORT::min; 
-using STLPORT::max; 
-using STLPORT::copy; 
-using STLPORT::copy_backward; 
-using STLPORT::copy_n; 
-using STLPORT::fill; 
-using STLPORT::fill_n; 
-using STLPORT::mismatch; 
-using STLPORT::equal; 
-using STLPORT::lexicographical_compare; 
-using STLPORT::lexicographical_compare_3way; 
-
-// Names from stl_uninitialized.h
-using STLPORT::uninitialized_copy;
-using STLPORT::uninitialized_copy_n;
-using STLPORT::uninitialized_fill;
-using STLPORT::uninitialized_fill_n;
-# endif /* _STLP_BROKEN_USING_DIRECTIVE */
-#endif /* _STLP_USE_NAMESPACES */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0xa002)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_ALGOBASE_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/old_hp/alloc.h b/src/STLport/old_hp/alloc.h
deleted file mode 100644
index 33be2f8..0000000
--- a/src/STLport/old_hp/alloc.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_ALLOC_H
-#define _STLP_ALLOC_H
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0xa003
-#  include <stl/_prolog.h>
-# endif
-
-#if defined  (_STLP_DEBUG) || defined (_STLP_ASSERTIONS) && !defined (_STLP_DEBUG_H)
-# include <stl/debug/_debug.h>
-#endif
-
-# ifndef _STLP_CSTDDEF
-#  include <cstddef>
-# endif
-# ifndef _STLP_CLIMITS
-#  include <climits>
-# endif
-# ifndef _STLP_CSTDLIB
-#  include <cstdlib>
-# endif
-# ifndef _STLP_CSTRING
-#  include <cstring>
-# endif
-# ifndef _STLP_CASSERT
-#  include <cassert>
-# endif
-
-#ifndef _STLP_INTERNAL_ALLOC_H
-#include <stl/_alloc.h>
-#endif
-
-// Old SGI names
-_STLP_BEGIN_NAMESPACE
-
-typedef __sgi_alloc alloc;
-typedef __malloc_alloc<0> malloc_alloc;
-#ifdef _STLP_USE_NEWALLOC
-typedef __new_alloc new_alloc;
-#endif
-
-#define simple_alloc __simple_alloc
-typedef __single_client_alloc  single_client_alloc; 
-typedef __multithreaded_alloc  multithreaded_alloc; 
-
-_STLP_END_NAMESPACE
-
-#ifdef _STLP_USE_NAMESPACES
-# ifdef _STLP_BROKEN_USING_DIRECTIVE
-
-using namespace STLPORT;
-
-# else
-
-# ifdef _STLP_USE_RAW_SGI_ALLOCATORS
-using _STLP_STD::simple_alloc;
-using _STLP_STD::alloc;
-# endif
-
-using _STLP_STD::malloc_alloc; 
-# ifdef _STLP_DEBUG_ALLOC
-using _STLP_STD::__debug_alloc;
-# endif 
-#ifdef _STLP_USE_NEWALLOC
-using _STLP_STD::new_alloc;
-#endif
-
-using _STLP_STD::single_client_alloc; 
-using _STLP_STD::multithreaded_alloc; 
-using _STLP_STD::allocator;
-
-# endif /* _STLP_BROKEN_USING_DIRECTIVE */
-#endif /* _STLP_USE_NAMESPACES */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0xa003)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_ALLOC_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/old_hp/bvector.h b/src/STLport/old_hp/bvector.h
deleted file mode 100644
index c0e7b7b..0000000
--- a/src/STLport/old_hp/bvector.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_BVECTOR_H
-#define _STLP_BVECTOR_H
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0xa004
-#  include <stl/_prolog.h>
-# endif
-
-#include <algobase.h>
-
-#include <stl/_range_errors.h>
-
-#ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION
-#include <vector.h>
-#else
-#include <alloc.h>
-#endif 
-
-#include <stl/_vector.h>
-#include <stl/_bvector.h>
-
-#ifdef _STLP_USE_NAMESPACES
-
-# ifdef _STLP_BROKEN_USING_DIRECTIVE
-using namespace STLPORT;
-# else
-using _STLP_STD::bit_vector;
-# endif
-
-#endif /* _STLP_USE_NAMESPACES */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0xa004)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_BVECTOR_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
-
diff --git a/src/STLport/old_hp/defalloc.h b/src/STLport/old_hp/defalloc.h
deleted file mode 100644
index 1eee36f..0000000
--- a/src/STLport/old_hp/defalloc.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- */
-
-// Inclusion of this file is DEPRECATED.  This is the original HP
-// default allocator.  It is provided only for backward compatibility.
-// This file WILL BE REMOVED in a future release.
-//
-// DO NOT USE THIS FILE unless you have an old container implementation
-// that requires an allocator with the HP-style interface.  
-//
-// Standard-conforming allocators have a very different interface.  The
-// standard default allocator is declared in the header <memory>.
-
-// Adaptation note: THIS version of allocator<T> is fully compatible with
-// SGI containers and works OK standalone. It is also as close to CD2 version
-// as possible w/o member templates.
-// However, explicit use of allocator<T>  is not recommended 
-// unless you have to do so ( for example, compiling third-party code).
-
-#ifndef _STLP_DEFALLOC_H
-#define _STLP_DEFALLOC_H
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0xa005
-#  include <stl/_prolog.h>
-# endif
-
-# if defined (_STLP_DEBUG) && ! defined ( _STLP_DEBUG_H )
-#  include <stl/debug/_debug.h>
-# endif
-
-#if defined (_STLP_USE_NEW_STYLE_HEADERS)
-# include <cstddef>
-# include <cstdlib>
-# include <cstring>
-# include <cassert>
-#else
-# include <stddef.h>
-# include <stdlib.h>
-# include <string.h>
-# include <assert.h>
-#endif
-
-# include <new>
-
-#ifdef _STLP_THREADS
-# include <stl/_threads.h>
-#endif
-
-# if !defined (__THROW_BAD_ALLOC) && !defined(_STLP_USE_EXCEPTIONS)
-#   if defined (_STLP_USE_NEW_STYLE_HEADERS)
-#    include <cstdio>
-#   else
-#    include <stdio.h>
-#   endif
-# endif
-#  include <stl/_alloc.h>
-
-// fbp: just for backwards compatibility,
-// hope this doesn't break anything.
-#ifdef _STLP_USE_NAMESPACES
-# ifdef _STLP_BROKEN_USING_DIRECTIVE
-using namespace STLPORT;
-# else
-using STLPORT::allocator;
-# endif /* _STLP_BROKEN_USING_DIRECTIVE */
-#endif /*  _STLP_USE_NAMESPACES */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0xa005)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_DEFALLOC_H */
-
diff --git a/src/STLport/old_hp/deque.h b/src/STLport/old_hp/deque.h
deleted file mode 100644
index 4171074..0000000
--- a/src/STLport/old_hp/deque.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_DEQUE_H
-#define _STLP_DEQUE_H
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0xa006
-#  include <stl/_prolog.h>
-# endif
-
-#ifndef _STLP_ALGOBASE_H
-# include <algobase.h>
-#endif
-
-#ifndef _STLP_RANGE_ERRORS_H
-# include <stl/_range_errors.h>
-#endif
-
-#ifndef _STLP_ALLOC_H
-# include <alloc.h>
-#endif
-
-#ifndef _STLP_INTERNAL_DEQUE_H
-# include <stl/_deque.h>
-#endif
-
-#ifdef _STLP_USE_NAMESPACES
-# ifdef _STLP_BROKEN_USING_DIRECTIVE
-using namespace STLPORT;
-# else
-using STLPORT::deque;
-using STLPORT::__deque__;
-# endif /*  _STLP_BROKEN_USING_DIRECTIVE */
-#endif /* _STLP_USE_NAMESPACES */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0xa006)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_DEQUE_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/old_hp/export b/src/STLport/old_hp/export
deleted file mode 100644
index 0c0e780..0000000
--- a/src/STLport/old_hp/export
+++ /dev/null
@@ -1,27 +0,0 @@
-./algo.h
-./algobase.h
-./alloc.h
-./bvector.h
-./defalloc.h
-./deque.h
-./function.h
-./hash_map.h
-./hash_set.h
-./hashtable.h
-./heap.h
-./iterator.h
-./list.h
-./map.h
-./multimap.h
-./multiset.h
-./numeric.h
-./pair.h
-./pthread_alloc.h
-./queue.h
-./rope.h
-./set.h
-./slist.h
-./stack.h
-./tempbuf.h
-./tree.h
-./vector.h
diff --git a/src/STLport/old_hp/function.h b/src/STLport/old_hp/function.h
deleted file mode 100644
index e707e36..0000000
--- a/src/STLport/old_hp/function.h
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_FUNCTION_H
-#define _STLP_FUNCTION_H
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0xa008
-#  include <stl/_prolog.h>
-# endif
-
-#ifndef _STLP_CSTDDEF
-# include <cstddef>
-#endif
-
-#ifndef _STLP_INTERNAL_ALGOBASE_H
-#include <stl/_algobase.h>
-#endif
-
-#ifndef _STLP_INTERNAL_FUNCTION_H
-#include <stl/_function.h>
-#endif
-
-#ifdef _STLP_USE_NAMESPACES
-
-# ifdef _STLP_BROKEN_USING_DIRECTIVE
-using namespace STLPORT;
-#ifndef _STLP_NO_RELOPS_NAMESPACE
-using namespace STLPORT_RELOPS;
-#endif /* _STLP_USE_NAMESPACE_FOR_RELOPS */
-
-# else /* _STLP_BROKEN_USING_DIRECTIVE */
-
-// Names from stl_function.h
-using _STLP_STD::unary_function; 
-using _STLP_STD::binary_function; 
-using _STLP_STD::plus; 
-using _STLP_STD::minus; 
-using _STLP_STD::multiplies; 
-using _STLP_STD::divides; 
-using _STLP_STD::identity_element; 
-using _STLP_STD::modulus; 
-using _STLP_STD::negate; 
-using _STLP_STD::equal_to; 
-using _STLP_STD::not_equal_to; 
-using _STLP_STD::greater; 
-using _STLP_STD::less; 
-using _STLP_STD::greater_equal; 
-using _STLP_STD::less_equal; 
-using _STLP_STD::logical_and; 
-using _STLP_STD::logical_or; 
-using _STLP_STD::logical_not; 
-using _STLP_STD::unary_negate; 
-using _STLP_STD::binary_negate; 
-using _STLP_STD::not1; 
-using _STLP_STD::not2; 
-using _STLP_STD::binder1st; 
-using _STLP_STD::binder2nd; 
-using _STLP_STD::bind1st; 
-using _STLP_STD::bind2nd; 
-using _STLP_STD::unary_compose; 
-using _STLP_STD::binary_compose; 
-using _STLP_STD::compose1; 
-using _STLP_STD::compose2; 
-using _STLP_STD::pointer_to_unary_function; 
-using _STLP_STD::pointer_to_binary_function; 
-using _STLP_STD::ptr_fun; 
-using _STLP_STD::identity; 
-using _STLP_STD::select1st; 
-using _STLP_STD::select2nd; 
-using _STLP_STD::project1st; 
-using _STLP_STD::project2nd; 
-using _STLP_STD::constant_void_fun; 
-using _STLP_STD::constant_unary_fun; 
-using _STLP_STD::constant_binary_fun; 
-using _STLP_STD::constant0; 
-using _STLP_STD::constant1; 
-using _STLP_STD::constant2; 
-using _STLP_STD::subtractive_rng; 
-using _STLP_STD::mem_fun_t; 
-using _STLP_STD::const_mem_fun_t; 
-using _STLP_STD::mem_fun_ref_t; 
-using _STLP_STD::const_mem_fun_ref_t; 
-using _STLP_STD::mem_fun1_t; 
-using _STLP_STD::const_mem_fun1_t; 
-using _STLP_STD::mem_fun1_ref_t; 
-using _STLP_STD::const_mem_fun1_ref_t; 
-using _STLP_STD::mem_fun; 
-using _STLP_STD::mem_fun_ref; 
-using _STLP_STD::mem_fun1; 
-using _STLP_STD::mem_fun1_ref; 
-# endif
-#endif /* _STLP_USE_NAMESPACES */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0xa008)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_FUNCTION_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/old_hp/hash_map.h b/src/STLport/old_hp/hash_map.h
deleted file mode 100644
index a0e8aec..0000000
--- a/src/STLport/old_hp/hash_map.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_HASH_MAP_H
-#define _STLP_HASH_MAP_H
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0xa009
-#  include <stl/_prolog.h>
-# endif
-
-#ifndef _STLP_HASHTABLE_H
-#include <hashtable.h>
-#endif 
-
-#include <stl/_hash_map.h>
-
-#ifdef _STLP_USE_NAMESPACES
-# ifdef _STLP_BROKEN_USING_DIRECTIVE
-using namespace STLPORT;
-# else
-using _STLP_STD::hash;
-using STLPORT::hashtable;
-using STLPORT::hash_map;
-using STLPORT::hash_multimap;
-using STLPORT::__hash_map__;
-using STLPORT::__hash_multimap__;
-# endif
-#endif /* _STLP_USE_NAMESPACES */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0xa009)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_HASH_MAP_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/old_hp/hash_set.h b/src/STLport/old_hp/hash_set.h
deleted file mode 100644
index a30bbad..0000000
--- a/src/STLport/old_hp/hash_set.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_HASH_SET_H
-#define _STLP_HASH_SET_H
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0xa010
-#  include <stl/_prolog.h>
-# endif
-
-#ifndef _STLP_HASHTABLE_H
-#include <hashtable.h>
-#endif 
-
-#include <stl/_hash_set.h>
-
-#ifdef _STLP_USE_NAMESPACES
-# ifdef _STLP_BROKEN_USING_DIRECTIVE
-using namespace STLPORT;
-# else
-using _STLP_STD::hash;
-using STLPORT::hashtable;
-using STLPORT::hash_set;
-using STLPORT::hash_multiset;
-using STLPORT::__hash_set__;
-using STLPORT::__hash_multiset__;
-# endif
-#endif /* _STLP_USE_NAMESPACES */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0xa010)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_HASH_SET_H */
diff --git a/src/STLport/old_hp/hashtable.h b/src/STLport/old_hp/hashtable.h
deleted file mode 100644
index 831c2ac..0000000
--- a/src/STLport/old_hp/hashtable.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_HASHTABLE_H
-#define _STLP_HASHTABLE_H
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0xa011
-#  include <stl/_prolog.h>
-# endif
-
-#ifndef _STLP_ALGO_H
-#include <algo.h>
-#endif
-#ifndef _STLP_ALLOC_H
-#include <alloc.h>
-#endif
-#ifndef _STLP_VECTOR_H
-#include <vector.h>
-#endif
-#ifndef _STLP_HASH_FUN_H
-#include <stl/_hash_fun.h>
-#endif
-#ifndef _STLP_INTERNAL_HASHTABLE_H
-#include <stl/_hashtable.h>
-#endif
-
-#ifdef _STLP_USE_NAMESPACES
-# ifdef _STLP_BROKEN_USING_DIRECTIVE
-using namespace STLPORT;
-# else
-using _STLP_STD::hash;
-using STLPORT::hashtable;
-# endif
-#endif /* _STLP_USE_NAMESPACES */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0xa011)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-#endif /* _STLP_HASHTABLE_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/old_hp/heap.h b/src/STLport/old_hp/heap.h
deleted file mode 100644
index e82f95c..0000000
--- a/src/STLport/old_hp/heap.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_HEAP_H
-#define _STLP_HEAP_H
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x12
-#  include <stl/_prolog.h>
-# endif
-
-#include <stl/_heap.h>
-
-#ifdef _STLP_USE_NAMESPACES
-
-# ifdef _STLP_BROKEN_USING_DIRECTIVE
-using namespace std;
-# else
-using STLPORT::push_heap;
-using STLPORT::pop_heap;
-using STLPORT::make_heap;
-using STLPORT::sort_heap;
-# endif
-
-#endif /* _STLP_USE_NAMESPACES */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x12)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_HEAP_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/old_hp/iterator.h b/src/STLport/old_hp/iterator.h
deleted file mode 100644
index a4d91d3..0000000
--- a/src/STLport/old_hp/iterator.h
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_ITERATOR_H
-#define _STLP_ITERATOR_H
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0xa013
-#  include <stl/_prolog.h>
-# endif
-
-#if defined  (_STLP_DEBUG) || defined (_STLP_ASSERTIONS) && !defined (_STLP_DEBUG_H)
-# include <stl/debug/_debug.h>
-#endif
-
-#if defined (_STLP_USE_NEW_STYLE_HEADERS)
-# include <cstddef>
-#else
-# include <stddef.h>
-#endif
-
-# ifndef _STLP_NEW
-#  include <new>
-# endif
-
-# ifndef __TYPE_TRAITS_H
-#  include <stl/type_traits.h>
-# endif
-
-#ifndef _STLP_FUNCTION_H
-#include <function.h>
-#endif
-
-# ifndef _STLP_IOSFWD
-#  include <iosfwd>
-# endif
-
-# ifndef _STLP_INTERNAL_ITERATOR_BASE_H
-#  include <stl/_iterator_base.h>
-# endif
-
-# ifndef _STLP_INTERNAL_ITERATOR_H
-#  include <stl/_iterator.h>
-# endif
-
-#ifndef _STLP_INTERNAL_CONSTRUCT_H
-#include <stl/_construct.h>
-#endif
-
-#ifndef _STLP_INTERNAL_RAW_STORAGE_ITERATOR_H
-#include <stl/_raw_storage_iter.h>
-#endif
-
-# ifndef _STLP_INTERNAL_STREAM_ITERATOR_H
-#  include <stl/_stream_iterator.h>
-# endif
-
-#ifdef _STLP_USE_NAMESPACES
-
-// Names from stl_iterator.h
-
-# ifdef _STLP_BROKEN_USING_DIRECTIVE
-using namespace STLPORT;
-# else
-
-using STLPORT::input_iterator_tag;
-using STLPORT::output_iterator_tag;
-using STLPORT::forward_iterator_tag;
-using STLPORT::bidirectional_iterator_tag;
-using STLPORT::random_access_iterator_tag;
-
-using STLPORT::input_iterator;
-using STLPORT::output_iterator;
-using STLPORT::forward_iterator;
-using STLPORT::bidirectional_iterator;
-using STLPORT::random_access_iterator;
-
-#ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION
-using STLPORT::iterator_traits;
-#endif
-
-# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES
-using STLPORT::iterator_category;
-using STLPORT::distance_type;
-using STLPORT::value_type;
-# endif
-
-using STLPORT::distance; 
-using STLPORT::advance; 
-
-using STLPORT::insert_iterator;
-using STLPORT::front_insert_iterator;
-using STLPORT::back_insert_iterator;
-using STLPORT::inserter;
-using STLPORT::front_inserter;
-using STLPORT::back_inserter;
-
-using STLPORT::reverse_iterator;
-# if ! defined ( _STLP_CLASS_PARTIAL_SPECIALIZATION ) || defined (_STLP_USE_OLD_HP_ITERATOR_QUERIES)
-using STLPORT::reverse_bidirectional_iterator;
-# endif
-using STLPORT::istream_iterator;
-using STLPORT::ostream_iterator;
-
-// Names from stl_construct.h
-using STLPORT::construct;
-using STLPORT::destroy;
-
-// Names from stl_raw_storage_iter.h
-using STLPORT::raw_storage_iterator;
-# endif
-
-#endif /* _STLP_USE_NAMESPACES */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0xa013)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_ITERATOR_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/old_hp/list.h b/src/STLport/old_hp/list.h
deleted file mode 100644
index 6f42e3f..0000000
--- a/src/STLport/old_hp/list.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_LIST_H
-#define _STLP_LIST_H
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0xa014
-#  include <stl/_prolog.h>
-# endif
-
-#ifndef _STLP_ALGOBASE_H
-# include <algobase.h>
-#endif
-
-#ifndef _STLP_ALLOC_H
-# include <alloc.h>
-#endif
-
-#include <stl/_list.h>
-
-#ifdef _STLP_USE_NAMESPACES
-# ifdef _STLP_BROKEN_USING_DIRECTIVE
-using namespace STLPORT;
-# else
-using STLPORT::list;
-using STLPORT::__list__;
-# endif
-#endif /* _STLP_USE_NAMESPACES */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0xa014)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_LIST_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/old_hp/map.h b/src/STLport/old_hp/map.h
deleted file mode 100644
index ac4a0b3..0000000
--- a/src/STLport/old_hp/map.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_MAP_H
-# define _STLP_MAP_H
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0xa015
-#  include <stl/_prolog.h>
-# endif
-
-#ifndef _STLP_TREE_H
-# include <tree.h>
-#endif
-
-# include <stl/_map.h>
-
-#ifdef _STLP_USE_NAMESPACES
-# ifdef _STLP_BROKEN_USING_DIRECTIVE
-using namespace STLPORT;
-# else
-using STLPORT::map;
-# ifdef _STLP_LIMITED_DEFAULT_TEMPLATES
-using STLPORT::__map;
-# endif
-# endif
-#endif /* _STLP_USE_NAMESPACES */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0xa015)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_MAP_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/old_hp/multimap.h b/src/STLport/old_hp/multimap.h
deleted file mode 100644
index cd00f43..0000000
--- a/src/STLport/old_hp/multimap.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_MULTIMAP_H
-#define _STLP_MULTIMAP_H
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0xa016
-#  include <stl/_prolog.h>
-# endif
-
-#ifndef _STLP_TREE_H
-# include <tree.h>
-#endif
-
-#include <stl/_map.h>
-
-#ifdef _STLP_USE_NAMESPACES
-# ifdef _STLP_BROKEN_USING_DIRECTIVE
-using namespace STLPORT;
-# else
-using STLPORT::multimap;
-using STLPORT::__multimap__;
-# endif
-#endif /* _STLP_USE_NAMESPACES */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0xa016)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_MULTIMAP_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/old_hp/multiset.h b/src/STLport/old_hp/multiset.h
deleted file mode 100644
index 7c32f25..0000000
--- a/src/STLport/old_hp/multiset.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_MULTISET_H
-#define _STLP_MULTISET_H
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0xa017
-#  include <stl/_prolog.h>
-# endif
-
-#ifndef _STLP_TREE_H
-# include <tree.h>
-#endif
-
-#include <stl/_set.h>
-
-#ifdef _STLP_USE_NAMESPACES
-# ifdef _STLP_BROKEN_USING_DIRECTIVE
-using namespace STLPORT;
-# else
-using STLPORT::multiset;
-using STLPORT::__multiset__;
-# endif
-#endif /* _STLP_USE_NAMESPACES */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0xa017)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_MULTISET_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/old_hp/numeric.h b/src/STLport/old_hp/numeric.h
deleted file mode 100644
index 8945a01..0000000
--- a/src/STLport/old_hp/numeric.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (c) 1997
- * Mark of the Unicorn, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Mark of the Unicorn, Inc. makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- */
-
-#ifndef _STLP_NUMERIC_H
-# define _STLP_NUMERIC_H
-
-#ifndef __MWERKS__
-# error This file should be removed from installations not using the Metrowerks Standard Library
-#else
-# include <numeric>
-//# include <algo.h>
-#endif
-
-# endif // _STLP_NUMERIC_H
diff --git a/src/STLport/old_hp/pair.h b/src/STLport/old_hp/pair.h
deleted file mode 100644
index df30a65..0000000
--- a/src/STLport/old_hp/pair.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_PAIR_H
-#define _STLP_PAIR_H
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0xa020
-#  include <stl/_prolog.h>
-# endif
-
-#ifndef _STLP_INTERNAL_ALGOBASE_H
-#  include <stl/_algobase.h>
-#endif
-
-#ifdef _STLP_USE_NAMESPACES
-
-# ifdef _STLP_BROKEN_USING_DIRECTIVE
-using namespace STLPORT;
-# else
-using _STLP_STD::pair;
-using _STLP_STD::make_pair;
-# endif
-
-#endif /* _STLP_USE_NAMESPACES */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0xa020)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_PAIR_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/old_hp/pthread_alloc.h b/src/STLport/old_hp/pthread_alloc.h
deleted file mode 100644
index 4a66d1e..0000000
--- a/src/STLport/old_hp/pthread_alloc.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_PTHREAD_ALLOC_H
-#define _STLP_PTHREAD_ALLOC_H
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0xa021
-#  include <stl/_prolog.h>
-# endif
-
-#if defined  (_STLP_DEBUG) || defined (_STLP_ASSERTIONS)
-# include <stl/debug/_debug.h>
-#endif
-
-#include <pthread_alloc>
-
-#ifdef _STLP_USE_NAMESPACES
-
-using STLPORT::_Pthread_alloc_template;
-using STLPORT::pthread_alloc;
-
-#endif /* _STLP_USE_NAMESPACES */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0xa021)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_PTHREAD_ALLOC_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/old_hp/queue.h b/src/STLport/old_hp/queue.h
deleted file mode 100644
index 36b6e93..0000000
--- a/src/STLport/old_hp/queue.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef __QUEUE__
-# define __QUEUE__
-# include <queue>
-#endif
diff --git a/src/STLport/old_hp/rope.h b/src/STLport/old_hp/rope.h
deleted file mode 100644
index 851a6bc..0000000
--- a/src/STLport/old_hp/rope.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_ROPE_H
-#define _STLP_ROPE_H
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0xa022
-#  include <stl/_prolog.h>
-# endif
-
-#include <stl/_rope.h>
-
-#ifdef _STLP_USE_NAMESPACES
-# ifdef _STLP_BROKEN_USING_DIRECTIVE
-using namespace STLPORT;
-# else
-using STLPORT::char_producer; 
-using STLPORT::sequence_buffer; 
-using STLPORT::rope; 
-using STLPORT::crope; 
-using STLPORT::wrope; 
-# endif
-#endif /* _STLP_USE_NAMESPACES */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0xa022)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_ROPE_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/old_hp/set.h b/src/STLport/old_hp/set.h
deleted file mode 100644
index 81d4949..0000000
--- a/src/STLport/old_hp/set.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_SET_H
-#define _STLP_SET_H
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0xa023
-#  include <stl/_prolog.h>
-# endif
-
-#ifndef _STLP_TREE_H
-# include <tree.h>
-#endif
-
-#include <stl/_set.h>
-
-#ifdef _STLP_USE_NAMESPACES
-# ifdef _STLP_BROKEN_USING_DIRECTIVE
-using namespace STLPORT;
-# else
-using STLPORT::set;
-using STLPORT::__set__;
-# endif
-#endif /* _STLP_USE_NAMESPACES */
-# if (_STLP_OUTERMOST_HEADER_ID == 0xa023)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_SET_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/old_hp/slist.h b/src/STLport/old_hp/slist.h
deleted file mode 100644
index bcd5d15..0000000
--- a/src/STLport/old_hp/slist.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_SLIST_H
-#define _STLP_SLIST_H
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0xa024
-#  include <stl/_prolog.h>
-# endif
-
-#ifndef _STLP_ALGOBASE_H
-# include <algobase.h>
-#endif
-
-#ifndef _STLP_ALLOC_H
-# include <alloc.h>
-#endif
-
-#include <stl/_slist.h>
-
-#ifdef _STLP_USE_NAMESPACES
-# ifdef _STLP_BROKEN_USING_DIRECTIVE
-using namespace STLPORT;
-# else
-using STLPORT::slist;
-#  ifdef _STLP_LIMITED_DEFAULT_TEMPLATES
-using STLPORT::__slist;
-#  endif
-# endif
-#endif /* _STLP_USE_NAMESPACES */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0xa024)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_SLIST_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/old_hp/stack.h b/src/STLport/old_hp/stack.h
deleted file mode 100644
index 2898e06..0000000
--- a/src/STLport/old_hp/stack.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_STACK_H
-#define _STLP_STACK_H
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0xa027
-#  include <stl/_prolog.h>
-# endif
-
-#ifndef _STLP_VECTOR_H
-#include <vector.h>
-#endif
-
-#ifndef _STLP_DEQUE_H
-#include <deque.h>
-#endif
-
-#ifndef _STLP_HEAP_H
-#include <heap.h>
-#endif
-
-#ifndef _STLP_INTERNAL_STACK_H
-#include <stl/_stack.h>
-#endif
-
-#ifndef _STLP_INTERNAL_QUEUE_H
-#include <stl/_queue.h>
-#endif
-
-#ifdef _STLP_USE_NAMESPACES
-# ifdef _STLP_BROKEN_USING_DIRECTIVE
-using namespace STLPORT;
-# else
-using _STLP_STD::stack;
-using _STLP_STD::queue;
-using _STLP_STD::priority_queue;
-# endif
-#endif /* _STLP_USE_NAMESPACES */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0xa027)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_STACK_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/old_hp/tempbuf.h b/src/STLport/old_hp/tempbuf.h
deleted file mode 100644
index a78d8f4..0000000
--- a/src/STLport/old_hp/tempbuf.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_TEMPBUF_H
-#define _STLP_TEMPBUF_H
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0xa028
-#  include <stl/_prolog.h>
-# endif
-
-# ifndef _STLP_CLIMITS
-#  include <climits>
-# endif
-
-#ifndef _STLP_CSTDDEF
-# include <cstddef>
-#endif
-
-#ifndef _STLP_CSTDLIB
-# include <cstdlib>
-#endif
-
-#if !defined (_STLP_NEW)
-# include <new>
-#endif
-
-#ifndef __TYPE_TRAITS_H
-#include <stl/type_traits.h>
-#endif
-
-#ifndef _STLP_PAIR_H
-#include <pair.h>
-#endif
-
-#ifndef _STLP_INTERNAL_TEMPBUF_H
-#include <stl/_tempbuf.h>
-#endif
-
-#ifdef _STLP_USE_NAMESPACES
-
-# ifdef _STLP_BROKEN_USING_DIRECTIVE
-using namespace STLPORT;
-# else
-using _STLP_STD::get_temporary_buffer;
-using _STLP_STD::return_temporary_buffer;
-using _STLP_STD::temporary_buffer;
-# endif
-#endif /* _STLP_USE_NAMESPACES */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0xa028)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_TEMPBUF_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/old_hp/tree.h b/src/STLport/old_hp/tree.h
deleted file mode 100644
index 8b6b813..0000000
--- a/src/STLport/old_hp/tree.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_TREE_H
-#define _STLP_TREE_H
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0xa030
-#  include <stl/_prolog.h>
-# endif
-
-#ifndef _STLP_ALGOBASE_H
-#include <algobase.h>
-#endif
-
-#ifndef _STLP_ALLOC_H
-#include <alloc.h>
-#endif
-
-#ifndef _STLP_INTERNAL_TREE_H
-#include <stl/_tree.h>
-#endif
-
-#ifdef _STLP_USE_NAMESPACES
-# ifdef _STLP_BROKEN_USING_DIRECTIVE
-using namespace STLPORT;
-# else
-using _STLP_STD::rb_tree;
-# endif
-#endif /* _STLP_USE_NAMESPACES */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0xa030)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_TREE_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/old_hp/vector.h b/src/STLport/old_hp/vector.h
deleted file mode 100644
index add0b6d..0000000
--- a/src/STLport/old_hp/vector.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_VECTOR_H
-#define _STLP_VECTOR_H
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0xa031
-#  include <stl/_prolog.h>
-# endif
-
-#ifndef _STLP_ALGOBASE_H
-# include <algobase.h>
-#endif
-
-#ifndef _STLP_ALLOC_H
-# include <alloc.h>
-#endif
-
-# ifndef _STLP_RANGE_ERRORS_H
-#  include <stl/_range_errors.h>
-# endif
-
-#ifndef _STLP_INTERNAL_VECTOR_H
-# include <stl/_vector.h>
-#endif
-
-#ifdef _STLP_USE_NAMESPACES
-# ifdef _STLP_BROKEN_USING_DIRECTIVE
-using namespace STLPORT;
-# else
-using STLPORT::vector;
-using STLPORT::__vector__;
-# endif
-#endif /* _STLP_USE_NAMESPACES */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0xa031)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_VECTOR_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/ostream b/src/STLport/ostream
deleted file mode 100644
index 627acbb..0000000
--- a/src/STLport/ostream
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-#ifndef _STLP_OSTREAM
-#define _STLP_OSTREAM
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x1050
-#  include <stl/_prolog.h>
-# endif
-
-# ifdef _STLP_PRAGMA_ONCE
-#  pragma once
-# endif
-
-# if defined (_STLP_OWN_IOSTREAMS)
-
-#  include <stl/_ostream.h>
-
-# elif !defined(_STLP_USE_NO_IOSTREAMS)
-
-#  include <wrap_std/ostream>
-
-# endif
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x1050)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_OSTREAM */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/ostream.h b/src/STLport/ostream.h
deleted file mode 100644
index 6b3ca2b..0000000
--- a/src/STLport/ostream.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_OSTREAM_H
-# define _STLP_OSTREAM_H
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x2051
-#  include <stl/_prolog.h>
-# endif
-
-# if defined (_STLP_OWN_IOSTREAMS)
-
-#ifdef __BORLANDC__
-#  include <ostream.>
-#else
-#  include <ostream>
-#endif
-
-#  ifdef _STLP_USE_NAMESPACES
-#   include <using/ostream>
-#  endif
-
-# elif !defined (_STLP_USE_NO_IOSTREAMS)
-
-#  include _STLP_NATIVE_OLD_STREAMS_HEADER(ostream.h)
-#  if defined (_STLP_USE_NAMESPACES) && !defined (_STLP_BROKEN_USING_DIRECTIVE)
-_STLP_BEGIN_NAMESPACE
-#   include <using/h/ostream.h>
-_STLP_END_NAMESPACE
-#  endif /* _STLP_USE_NAMESPACES */
-
-# endif /* _STLP_USE_NO_IOSTREAMS */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x2051)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_OSTREAM_H */
-
diff --git a/src/STLport/pthread.h b/src/STLport/pthread.h
deleted file mode 100644
index 86a0695..0000000
--- a/src/STLport/pthread.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-# if !defined (_STLP_OUTERMOST_HEADER_ID)
-#  define _STLP_OUTERMOST_HEADER_ID 0x280
-#  include <stl/_prolog.h>
-# elif (_STLP_OUTERMOST_HEADER_ID == 0x280) && ! defined (_STLP_DONT_POP_0x280)
-#  define _STLP_DONT_POP_0x280
-# endif
-
-# if defined (__SUNPRO_CC) || defined (__HP_aCC)
-# include "/usr/include/pthread.h"
-# else
-# include _STLP_NATIVE_C_HEADER(pthread.h)
-# endif
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x280)
-#  if ! defined (_STLP_DONT_POP_0x280)
-#   include <stl/_epilog.h>
-#   undef  _STLP_OUTERMOST_HEADER_ID
-#  endif
-#  undef  _STLP_DONT_POP_0x280
-# endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/pthread_alloc b/src/STLport/pthread_alloc
deleted file mode 100644
index e9218f5..0000000
--- a/src/STLport/pthread_alloc
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_PTHREAD_ALLOC
-#define _STLP_PTHREAD_ALLOC
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x52
-#  include <stl/_prolog.h>
-# endif
-
-# ifdef _STLP_PRAGMA_ONCE
-#  pragma once
-# endif
-
-# include <stl/_pthread_alloc.h>
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x52)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_PTHREAD_ALLOC */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/queue b/src/STLport/queue
deleted file mode 100644
index 45a8cc8..0000000
--- a/src/STLport/queue
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_QUEUE
-#define _STLP_QUEUE
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x53
-#  include <stl/_prolog.h>
-# endif
-
-# ifdef _STLP_PRAGMA_ONCE
-#  pragma once
-# endif
-
-#ifndef _STLP_INTERNAL_QUEUE_H
-# include <stl/_queue.h>
-#endif
-
-#ifndef _STLP_INTERNAL_FUNCTION_H
-# include <functional>
-#endif
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x53)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_QUEUE */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/rlocks.h b/src/STLport/rlocks.h
deleted file mode 100644
index 8f1fb5e..0000000
--- a/src/STLport/rlocks.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef _STLP_misc_rlocks_h
-# define _STLP_misc_rlocks_h
-# if (__SUNPRO_CC >= 0x500 )
-#  include <../CCios/rlocks.h>
-# elif defined (__SUNPRO_CC) 
-#  include <../CC/rlocks.h>
-# else 
-#  error "This file is for SUN CC only. Please remove it if it causes any harm for other compilers." 
-# endif
-#endif
-
diff --git a/src/STLport/rope b/src/STLport/rope
deleted file mode 100644
index c0bf103..0000000
--- a/src/STLport/rope
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- */
-
-#ifndef _STLP_ROPE
-#define _STLP_ROPE
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x54
-#  include <stl/_prolog.h>
-# endif
-
-# ifdef _STLP_PRAGMA_ONCE
-#  pragma once
-# endif
-
-# include <stl/_rope.h>
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x54)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_ROPE */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/set b/src/STLport/set
deleted file mode 100644
index deef6fb..0000000
--- a/src/STLport/set
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_SET
-#define _STLP_SET
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x55
-#  include <stl/_prolog.h>
-# endif
-
-# ifdef _STLP_PRAGMA_ONCE
-#  pragma once
-# endif
-
-#include <stl/_set.h>
-
-#if defined (_STLP_WHOLE_VENDOR_STD)
-# include _STLP_NATIVE_HEADER(set)
-#endif
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x55)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_SET */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/setjmp.h b/src/STLport/setjmp.h
deleted file mode 100644
index 0e0f0a5..0000000
--- a/src/STLport/setjmp.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-# if !defined (_STLP_OUTERMOST_HEADER_ID)
-#  define _STLP_OUTERMOST_HEADER_ID 0x256
-#  include <stl/_prolog.h>
-# elif (_STLP_OUTERMOST_HEADER_ID == 0x256) && ! defined (_STLP_DONT_POP_0x256)
-#  define _STLP_DONT_POP_0x256
-# endif
-
-
-# ifndef setjmp
-#  include _STLP_NATIVE_C_HEADER(setjmp.h)
-# endif
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x256)
-#  if ! defined (_STLP_DONT_POP_0x256)
-#   include <stl/_epilog.h>
-#   undef  _STLP_OUTERMOST_HEADER_ID
-#   endif
-#   undef  _STLP_DONT_POP_0x256
-# endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/signal.h b/src/STLport/signal.h
deleted file mode 100644
index 14148a5..0000000
--- a/src/STLport/signal.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-# if !defined (_STLP_OUTERMOST_HEADER_ID)
-#  define _STLP_OUTERMOST_HEADER_ID 0x257
-#  include <stl/_prolog.h>
-# elif (_STLP_OUTERMOST_HEADER_ID == 0x257) && ! defined (_STLP_DONT_POP_0x257)
-#  define _STLP_DONT_POP_0x257
-# endif
-
-# include _STLP_NATIVE_C_HEADER(signal.h)
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x257)
-#  if ! defined (_STLP_DONT_POP_0x257)
-#   include <stl/_epilog.h>
-#   undef  _STLP_OUTERMOST_HEADER_ID
-#   endif
-#   undef  _STLP_DONT_POP_0x257
-# endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/slist b/src/STLport/slist
deleted file mode 100644
index b55be37..0000000
--- a/src/STLport/slist
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- */
-
-#ifndef _STLP_SLIST
-#define _STLP_SLIST
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x58
-#  include <stl/_prolog.h>
-# endif
-
-# ifdef _STLP_PRAGMA_ONCE
-#  pragma once
-# endif
-
-#ifndef _STLP_INTERNAL_SLIST_H
-# include <stl/_slist.h>
-#endif
-
-#if defined (_STLP_WHOLE_VENDOR_STD)
-# include _STLP_NATIVE_HEADER(slist)
-#endif
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x58)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_SLIST */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/sstream b/src/STLport/sstream
deleted file mode 100644
index b3df768..0000000
--- a/src/STLport/sstream
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-// This header defines classes basic_stringbuf, basic_istringstream,
-// basic_ostringstream, and basic_stringstream.  These classes 
-// represent streamsbufs and streams whose sources or destinations are
-// C++ strings.
-
-#ifndef _STLP_SSTREAM
-#define _STLP_SSTREAM
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x1059
-#  include <stl/_prolog.h>
-# endif
-
-# ifdef _STLP_PRAGMA_ONCE
-#  pragma once
-# endif
-
-# if defined (_STLP_OWN_IOSTREAMS)
-
-# include <stl/_sstream.h>
-
-# elif !defined (_STLP_USE_NO_IOSTREAMS)
-
-# include <wrap_std/sstream>
-
-# endif
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x1059)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_SSTREAM */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stack b/src/STLport/stack
deleted file mode 100644
index 8b6128d..0000000
--- a/src/STLport/stack
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_STACK
-#define _STLP_STACK
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x60
-#  include <stl/_prolog.h>
-# endif
-
-# ifdef _STLP_PRAGMA_ONCE
-#  pragma once
-# endif
-
-#ifndef _STLP_INTERNAL_STACK_H
-#include <stl/_stack.h>
-#endif
-
-#if defined (_STLP_WHOLE_VENDOR_STD)
-# include _STLP_NATIVE_HEADER(stack)
-#endif
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x60)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_STACK */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stdarg.h b/src/STLport/stdarg.h
deleted file mode 100644
index b96922f..0000000
--- a/src/STLport/stdarg.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-# if !defined (_STLP_OUTERMOST_HEADER_ID)
-#  define _STLP_OUTERMOST_HEADER_ID 0x261
-#  include <stl/_prolog.h>
-# elif (_STLP_OUTERMOST_HEADER_ID == 0x261) && ! defined (_STLP_DONT_POP_0x261)
-#  define _STLP_DONT_POP_0x261
-# endif
-
-# include _STLP_NATIVE_C_HEADER(stdarg.h)
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x261)
-#  if ! defined (_STLP_DONT_POP_0x261)
-#   include <stl/_epilog.h>
-#   undef  _STLP_OUTERMOST_HEADER_ID
-#   endif
-#   undef  _STLP_DONT_POP_0x261
-# endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stddef.h b/src/STLport/stddef.h
deleted file mode 100644
index 13773cd..0000000
--- a/src/STLport/stddef.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x262
-#  include <stl/_prolog.h>
-# endif
-
-# ifndef _STLP_WINCE
-
-# include _STLP_NATIVE_C_HEADER(stddef.h)
-
-# endif /* WINCE */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x262)
-#  if ! defined (_STLP_DONT_POP_0x262)
-#   include <stl/_epilog.h>
-#   undef  _STLP_OUTERMOST_HEADER_ID
-#   endif
-#   undef  _STLP_DONT_POP_0x262
-# endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stdexcept b/src/STLport/stdexcept
deleted file mode 100644
index 1829a9c..0000000
--- a/src/STLport/stdexcept
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_STDEXCEPT
-
-# if !defined (_STLP_OUTERMOST_HEADER_ID)
-#  define _STLP_OUTERMOST_HEADER_ID 0x63
-#  include <stl/_prolog.h>
-# elif (_STLP_OUTERMOST_HEADER_ID == 0x63) && ! defined (_STLP_DONT_POP_0x63)
-#  define _STLP_DONT_POP_0x63
-# endif
-
-# ifdef _STLP_PRAGMA_ONCE
-#  pragma once
-# endif
-
-# if !defined(_STLP_STDEXCEPT_SEEN) && \
-   (!defined (_STLP_USE_NATIVE_STDEXCEPT) || defined (_STLP_USE_OWN_NAMESPACE))
-
-#  define _STLP_STDEXCEPT_SEEN 1
-
-#  include <exception>
-
-#if defined(_STLP_USE_EXCEPTIONS) || \
-    !(defined(_MIPS_SIM) && defined(_ABIO32) && _MIPS_SIM == _ABIO32)
-
-# include <cstring>
-
-#ifndef _STLP_INTERNAL_ALLOC_H
-# include <stl/_alloc.h>
-#endif
-
-#ifndef _STLP_STRING_FWD_H
-# include <stl/_string_fwd.h>
-#endif
-
-# define _STLP_OWN_STDEXCEPT 1
-
-_STLP_BEGIN_NAMESPACE
-
-# if   ! defined (_STLP_NO_EXCEPTION_HEADER)
-# if !defined(_STLP_EXCEPTION_BASE) && !defined(_STLP_BROKEN_EXCEPTION_CLASS) && defined (_STLP_USE_NAMESPACES) && defined (_STLP_USE_OWN_NAMESPACE)
-using _STLP_VENDOR_EXCEPT_STD::exception;
-# endif
-# endif
-#  define _STLP_EXCEPTION_BASE exception
-
-class _STLP_CLASS_DECLSPEC __Named_exception : public _STLP_EXCEPTION_BASE {
-public:
-  __Named_exception(const string& __str) 
-# ifdef _STLP_OWN_IOSTREAMS
-    ;
-  const char* what() const _STLP_NOTHROW_INHERENTLY;
-  ~__Named_exception() _STLP_NOTHROW_INHERENTLY;
-# else
-  {
-    strncpy(_M_name, __get_c_string(__str), _S_bufsize);
-    _M_name[_S_bufsize - 1] = '\0';
-  }
-  const char* what() const _STLP_NOTHROW_INHERENTLY { return _M_name; }
-# endif
-
-private:
-  enum { _S_bufsize = 256 };
-  char _M_name[_S_bufsize];
-};
-
-class _STLP_CLASS_DECLSPEC logic_error : public __Named_exception {
-public:
-  logic_error(const string& __s) : __Named_exception(__s) {}
-# ifdef _STLP_OWN_IOSTREAMS
-  ~logic_error() _STLP_NOTHROW_INHERENTLY;
-# endif
-};
-
-class _STLP_CLASS_DECLSPEC runtime_error : public __Named_exception {
-public:
-  runtime_error(const string& __s) : __Named_exception(__s) {}
-# ifdef _STLP_OWN_IOSTREAMS
-  ~runtime_error() _STLP_NOTHROW_INHERENTLY;
-# endif
-};
-
-class _STLP_CLASS_DECLSPEC domain_error : public logic_error {
-public:
-  domain_error(const string& __arg) : logic_error(__arg) {}
-# ifdef _STLP_OWN_IOSTREAMS
-  ~domain_error() _STLP_NOTHROW_INHERENTLY;
-# endif
-};
-
-class _STLP_CLASS_DECLSPEC invalid_argument : public logic_error {
-public:
-  invalid_argument(const string& __arg) : logic_error(__arg) {}
-# ifdef _STLP_OWN_IOSTREAMS
-  ~invalid_argument() _STLP_NOTHROW_INHERENTLY;
-# endif
-};
-
-class _STLP_CLASS_DECLSPEC length_error : public logic_error {
-public:
-  length_error(const string& __arg) : logic_error(__arg) {}
-# ifdef _STLP_OWN_IOSTREAMS
-  ~length_error() _STLP_NOTHROW_INHERENTLY;
-# endif
-};
-
-class _STLP_CLASS_DECLSPEC out_of_range : public logic_error {
-public:
-  out_of_range(const string& __arg) : logic_error(__arg) {}
-# ifdef _STLP_OWN_IOSTREAMS
-  ~out_of_range() _STLP_NOTHROW_INHERENTLY;
-# endif
-};
-
-class _STLP_CLASS_DECLSPEC range_error : public runtime_error {
-public:
-  range_error(const string& __arg) : runtime_error(__arg) {}
-# ifdef _STLP_OWN_IOSTREAMS
-  ~range_error() _STLP_NOTHROW_INHERENTLY;
-# endif
-};
-
-class _STLP_CLASS_DECLSPEC overflow_error : public runtime_error {
-public:
-  overflow_error(const string& __arg) : runtime_error(__arg) {}
-# ifdef _STLP_OWN_IOSTREAMS
-  ~overflow_error() _STLP_NOTHROW_INHERENTLY;
-# endif
-};
-
-class _STLP_CLASS_DECLSPEC underflow_error : public runtime_error {
-public:
-  underflow_error(const string& __arg) : runtime_error(__arg) {}
-# ifdef _STLP_OWN_IOSTREAMS
-  ~underflow_error() _STLP_NOTHROW_INHERENTLY;
-# endif
-};
-
-_STLP_END_NAMESPACE
-
-#endif /* Not o32, and no exceptions */
-# endif /* _STLP_STDEXCEPT_SEEN */
-
-
-#if defined (_STLP_USE_NATIVE_STDEXCEPT)
-#  include _STLP_NATIVE_HEADER(stdexcept)
-# endif
-
-#  define _STLP_STDEXCEPT 1
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x63)
-#  if ! defined (_STLP_DONT_POP_0x63)
-#   include <stl/_epilog.h>
-#   undef  _STLP_OUTERMOST_HEADER_ID
-#   endif
-#   undef  _STLP_DONT_POP_0x63
-# endif
-
-#endif /* _STLP_STDEXCEPT */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/stdio.h b/src/STLport/stdio.h
deleted file mode 100644
index 4e8faba..0000000
--- a/src/STLport/stdio.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x264
-#  include <stl/_prolog.h>
-# endif
-
-# if ! defined (_STLP_WINCE)
-# include _STLP_NATIVE_C_HEADER(stdio.h)
-
-#if defined (__SUNPRO_CC) && !defined (_STRUCT_FILE)
-# define _STRUCT_FILE
-#endif
-
-# ifdef __MWERKS__
-#  undef stdin
-#  undef stdout
-#  undef stderr
-
-#  define stdin  	(&_STLP_VENDOR_CSTD::__files[0])
-#  define stdout	(&_STLP_VENDOR_CSTD::__files[1])
-#  define stderr	(&_STLP_VENDOR_CSTD::__files[2])
-# endif
-
-# endif /* WINCE */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x264)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stdio_streambuf b/src/STLport/stdio_streambuf
deleted file mode 100644
index bd49264..0000000
--- a/src/STLport/stdio_streambuf
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-// This header is an extension.  It defines two streambufs:
-// stdio_istreambuf, a read-only streambuf synchronized with a C stdio
-// FILE object, and stdio_ostreambuf, a write-only streambuf
-// synchronized with a C stdio FILE object.  Note that neither 
-// stdio_istreambuf nor stdio_ostreambuf is a template; both classes
-// are derived from basic_streambuf<char, char_traits<char> >.
-
-// Note: the imbue() member function is a no-op.  In particular, these
-// classes assume that codecvt<char, char, mbstate_t> is always an identity
-// transformation.  This is true of the default locale, and of all locales
-// defined for the C I/O library.  If you need to use a locale where 
-// the codecvt<char, char, mbstate_t> facet performs a nontrivial 
-// conversion, then you should use basic_filebuf<> instead of stdio_istreambuf
-// or stdio_ostreambuf.  (If you don't understand what any of this means, 
-// then it's not a feature you need to worry about.  Locales where 
-// codecvt<char, char, mbstate_t> does something nontrivial are a rare
-// corner case.)
-
-
-#ifndef _STLP_STDIO_STREAMBUF
-#define _STLP_STDIO_STREAMBUF
-
-#if !defined(STLP_WINCE)
-
-#include <streambuf>            // For basic_streambuf<>
-#include <cstdio>              // For FILE.
-
-# ifndef _STLP_HAS_NO_NAMESPACES
-// This is an extension.  It is in namespace SGI, not namespace std
-namespace _SgI {
-
-# ifdef _STLP_USE_NAMESPACES
-using namespace _STLP_STD;
-  // MSVC needs this
-using _STLP_STD::streamsize;
-using _STLP_STD::streambuf;
-using _STLP_STD::basic_streambuf;
-using _STLP_STD::ios_base;
-  // using _STLP_STD::ios_base::openmode;
-# endif
-# endif
-
-// Base class for features common to stdio_istreambuf and stdio_ostreambuf
-class stdio_streambuf_base : public basic_streambuf<char, _STLP_STD::char_traits<char> >
-{
-public:                         // Constructor, destructor.
-  // The argument may not be null.  It must be an open file pointer.
-  stdio_streambuf_base(FILE*);
-
-  // The destructor flushes the stream, but does not close it.
-  ~stdio_streambuf_base();
-
-protected:                      // Virtual functions from basic_streambuf.
-  streambuf* setbuf(char*, streamsize);
-
-  pos_type seekoff(off_type, ios_base::seekdir,
-                   ios_base::openmode
-                          = ios_base::in | ios_base::out);
-  pos_type seekpos(pos_type,
-                   ios_base::openmode
-                          = ios_base::in | ios_base::out);
-  int sync();
-
-protected:
-  FILE* _M_file;
-};
-
-class stdio_istreambuf : public stdio_streambuf_base
-{
-public:                         // Constructor, destructor.
-  stdio_istreambuf(FILE* __f) : stdio_streambuf_base(__f) {}
-
-  ~stdio_istreambuf();
-
-protected:                      // Virtual functions from basic_streambuf.
-  streamsize showmanyc();
-  int_type underflow();
-  int_type uflow();
-  virtual int_type pbackfail(int_type c = traits_type::eof());
-};
-
-class stdio_ostreambuf : public stdio_streambuf_base
-{
-public:                         // Constructor, destructor.
-  stdio_ostreambuf(FILE* __f) : stdio_streambuf_base(__f) {}
-  ~stdio_ostreambuf();
-
-protected:                      // Virtual functions from basic_streambuf.
-  streamsize showmanyc();
-  int_type overflow(int_type c = traits_type::eof());
-};
-
-# ifndef _STLP_HAS_NO_NAMESPACES
-} // Close namespace _SgI.
-# endif
-
-#endif /* _STLP_STDIO_STREAMBUF */
-
-#endif /* _STLP_WINCE */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/stdiostream.h b/src/STLport/stdiostream.h
deleted file mode 100644
index 80a5c67..0000000
--- a/src/STLport/stdiostream.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef _STLP_misc_stdiostream_h
-# define _STLP_misc_stdiostream_h
-# if (__SUNPRO_CC >= 0x500 )
-#  include <../CCios/stdiostream.h>
-# else if defined (__SUNPRO_CC)
-#  include <../CC/stdiostream.h>
-# else
-#  error "This file is for SUN CC only. Please remove it if it causes any harm for other compilers."
-# endif
-#endif
diff --git a/src/STLport/stdlib.h b/src/STLport/stdlib.h
deleted file mode 100644
index 537df7d..0000000
--- a/src/STLport/stdlib.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-# if !defined (_STLP_OUTERMOST_HEADER_ID)
-#  define _STLP_OUTERMOST_HEADER_ID 0x265
-#  include <stl/_prolog.h>
-# elif (_STLP_OUTERMOST_HEADER_ID == 0x265) && ! defined (_STLP_DONT_POP_0x265)
-#  define _STLP_DONT_POP_0x265
-# endif
-
-# include _STLP_NATIVE_C_HEADER(stdlib.h)
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x265)
-#  if ! defined (_STLP_DONT_POP_0x265)
-#   include <stl/_epilog.h>
-#   undef  _STLP_OUTERMOST_HEADER_ID
-#  endif
-#  undef  _STLP_DONT_POP_0x265
-# endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_abbrevs.h b/src/STLport/stl/_abbrevs.h
deleted file mode 100644
index 57901ef..0000000
--- a/src/STLport/stl/_abbrevs.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_ABBREVS_H
-# define _STLP_INTERNAL_ABBREVS_H
-
-// ugliness is intentional - to reduce conflicts
-#  define input_iterator_tag             _In__ItT
-#  define output_iterator_tag            _Ou__ItT
-#  define bidirectional_iterator_tag     _Bd__ItT
-#  define random_access_iterator_tag     _Ra__ItT
-#  define input_iterator                 _In__It
-#  define output_iterator                _Ou__It
-#  define bidirectional_iterator         _Bd__It
-#  define random_access_iterator         _Ra__It
-#  define reverse_bidirectional_iterator _rBd__It
-#  define reverse_iterator               _r__It
-#  define back_insert_iterator           _bI__It
-#  define front_insert_iterator          _fI__It
-#  define raw_storage_iterator           _rS__It
-#  define _Const_traits _C_Tr
-#  define _Nonconst_traits _N_Tr
-
-// ugliness is intentional - to reduce conflicts probability
-#  define __malloc_alloc   M__A
-#  define __node_alloc     D__A
-#  define __new_alloc      N__A
-#  define __debug_alloc    G__A
-
-#  define __deque_iterator         _dQ__It
-#  define _Buf_traits              _dQ__BTr
-#  define _Deque_iterator          _Dq__It
-
-#  define _Select1st _S1st
-#  define _Select2nd _S2nd
-
-#  define _Hashtable_iterator         _hT__It
-#  define _Hashtable_const_iterator   _hT__cIt
-#  define _Hashtable_node             _hT__N
-#  define _Hashtable_base             _hT__B
-#  define _Ht_iterator _Ht_It
-
-#  define __list_iterator         _L__It
-#  define __slist_iterator         _SL__It
-
-#  define _Rb_tree_node_base       _rbT__NB
-#  define _Rb_tree_node            _rbT__N
-#  define _Rb_base_iterator        _rbTB__It
-#  define _Rb_tree_base_iterator   _rbT__It
-#  define _Rb_tree_base            _rbT__B
-
-#endif
-
diff --git a/src/STLport/stl/_algo.c b/src/STLport/stl/_algo.c
deleted file mode 100644
index 4e9aaf8..0000000
--- a/src/STLport/stl/_algo.c
+++ /dev/null
@@ -1,1765 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_ALGO_C
-# define _STLP_ALGO_C
-
-# if !defined (_STLP_INTERNAL_ALGO_H)
-#  include <stl/_algo.h>
-# endif
-
-_STLP_BEGIN_NAMESPACE
-
-template <class _BidirectionalIter, class _Distance, class _Compare>
-void __merge_without_buffer(_BidirectionalIter __first,
-                            _BidirectionalIter __middle,
-                            _BidirectionalIter __last,
-                            _Distance __len1, _Distance __len2,
-                            _Compare __comp);
-
-
-template <class _BidirectionalIter1, class _BidirectionalIter2,
-          class _BidirectionalIter3, class _Compare>
-_BidirectionalIter3 __merge_backward(_BidirectionalIter1 __first1,
-                                     _BidirectionalIter1 __last1,
-                                     _BidirectionalIter2 __first2,
-                                     _BidirectionalIter2 __last2,
-                                     _BidirectionalIter3 __result,
-                                     _Compare __comp);
-
-template <class _Tp>
-# if !(defined (__SUNPRO_CC) && (__SUNPRO_CC < 0x420 ))
-inline 
-# endif
-const _Tp& __median(const _Tp& __a, const _Tp& __b, const _Tp& __c) {
-  if (__a < __b)
-    if (__b < __c)
-      return __b;
-    else if (__a < __c)
-      return __c;
-    else
-      return __a;
-  else if (__a < __c)
-    return __a;
-  else if (__b < __c)
-    return __c;
-  else
-    return __b;
-}
-
-template <class _Tp, class _Compare>
-# if !(defined (__SUNPRO_CC) && (__SUNPRO_CC < 0x420 ))
-inline 
-# endif
-const _Tp&
-__median(const _Tp& __a, const _Tp& __b, const _Tp& __c, _Compare __comp) {
-  if (__comp(__a, __b))
-    if (__comp(__b, __c))
-      return __b;
-    else if (__comp(__a, __c))
-      return __c;
-    else
-      return __a;
-  else if (__comp(__a, __c))
-    return __a;
-  else if (__comp(__b, __c))
-    return __c;
-  else
-    return __b;
-}
-
-template <class _ForwardIter1, class _ForwardIter2>
-_ForwardIter1 search(_ForwardIter1 __first1, _ForwardIter1 __last1,
-                     _ForwardIter2 __first2, _ForwardIter2 __last2) 
-{
-  _STLP_DEBUG_CHECK(__check_range(__first1, __last1))
-  _STLP_DEBUG_CHECK(__check_range(__first2, __last2))
-  // Test for empty ranges
-  if (__first1 == __last1 || __first2 == __last2)
-    return __first1;
-
-  // Test for a pattern of length 1.
-  _ForwardIter2 __tmp(__first2);
-  ++__tmp;
-  if (__tmp == __last2)
-    return find(__first1, __last1, *__first2);
-
-  // General case.
-  _ForwardIter2 __p1 = __first2; 
-  ++__p1;
-
-  _ForwardIter1 __current = __first1;
-
-  while (__first1 != __last1) {
-    __first1 = find(__first1, __last1, *__first2);
-    if (__first1 == __last1)
-      return __last1;
-
-    _ForwardIter2 __p = __p1;
-    __current = __first1; 
-    if (++__current == __last1)
-      return __last1;
-
-    while (*__current == *__p) {
-      if (++__p == __last2)
-        return __first1;
-      if (++__current == __last1)
-        return __last1;
-    }
-
-    ++__first1;
-  }
-  return __first1;
-}
-
-// search_n.  Search for __count consecutive copies of __val.
-
-template <class _ForwardIter, class _Integer, class _Tp>
-_ForwardIter search_n(_ForwardIter __first, _ForwardIter __last,
-                      _Integer __count, const _Tp& __val) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  if (__count <= 0)
-    return __first;
-  else {
-    __first = find(__first, __last, __val);
-    while (__first != __last) {
-      _Integer __n = __count - 1;
-      _ForwardIter __i = __first;
-      ++__i;
-      while (__i != __last && __n != 0 && *__i == __val) {
-        ++__i;
-        --__n;
-      }
-      if (__n == 0)
-        return __first;
-      else
-        __first = find(__i, __last, __val);
-    }
-    return __last;
-  }
-}
-
-template <class _ForwardIter, class _Integer, class _Tp, class _BinaryPred>
-_ForwardIter search_n(_ForwardIter __first, _ForwardIter __last,
-                      _Integer __count, const _Tp& __val,
-                      _BinaryPred __binary_pred) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  if (__count <= 0)
-    return __first;
-  else {
-    while (__first != __last) {
-      if (__binary_pred(*__first, __val))
-        break;
-      ++__first;
-    }
-    while (__first != __last) {
-      _Integer __n = __count - 1;
-      _ForwardIter __i = __first;
-      ++__i;
-      while (__i != __last && __n != 0 && __binary_pred(*__i, __val)) {
-        ++__i;
-        --__n;
-      }
-      if (__n == 0)
-        return __first;
-      else {
-        while (__i != __last) {
-          if (__binary_pred(*__i, __val))
-            break;
-          ++__i;
-        }
-        __first = __i;
-      }
-    }
-    return __last;
-  }
-} 
-
-template <class _ForwardIter1, class _ForwardIter2>
-_ForwardIter1 
-find_end(_ForwardIter1 __first1, _ForwardIter1 __last1, 
-         _ForwardIter2 __first2, _ForwardIter2 __last2)
-{
-  _STLP_DEBUG_CHECK(__check_range(__first1, __last1))
-  _STLP_DEBUG_CHECK(__check_range(__first2, __last2))
-  return __find_end(__first1, __last1, __first2, __last2,
-# if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
-                    _STLP_ITERATOR_CATEGORY(__first1, _ForwardIter1),
-                    _STLP_ITERATOR_CATEGORY(__first2, _ForwardIter2),
-# else
-		    forward_iterator_tag(),
-                    forward_iterator_tag(),
-# endif
-                    __equal_to(_STLP_VALUE_TYPE(__first1, _ForwardIter1))
-    );
-}
-
-// unique and unique_copy
-template <class _InputIterator, class _OutputIterator, class _BinaryPredicate,
-					    class _Tp>
-_STLP_INLINE_LOOP _OutputIterator 
-__unique_copy(_InputIterator __first, _InputIterator __last,
-              _OutputIterator __result,
-              _BinaryPredicate __binary_pred, _Tp*) {
-  _Tp __val = *__first;
-  *__result = __val;
-  while (++__first != __last)
-    if (!__binary_pred(__val, *__first)) {
-      __val = *__first;
-      *++__result = __val;
-    }
-  return ++__result;
-}
-
-template <class _InputIter, class _OutputIter, class _BinaryPredicate>
-inline _OutputIter 
-__unique_copy(_InputIter __first, _InputIter __last,_OutputIter __result,
-              _BinaryPredicate __binary_pred, const output_iterator_tag &) {
-  return __unique_copy(__first, __last, __result, __binary_pred, _STLP_VALUE_TYPE(__first, _InputIter));
-}
-
-template <class _InputIter, class _ForwardIter, class _BinaryPredicate>
-_STLP_INLINE_LOOP _ForwardIter 
-__unique_copy(_InputIter __first, _InputIter __last, _ForwardIter __result, 
-              _BinaryPredicate __binary_pred, const forward_iterator_tag &) {
-  *__result = *__first;
-  while (++__first != __last)
-    if (!__binary_pred(*__result, *__first)) *++__result = *__first;
-  return ++__result;
-}
-
-# if defined (_STLP_NONTEMPL_BASE_MATCH_BUG)
-template <class _InputIterator, class _BidirectionalIterator, class _BinaryPredicate>
-inline _BidirectionalIterator 
-__unique_copy(_InputIterator __first, _InputIterator __last,
-              _BidirectionalIterator __result, _BinaryPredicate __binary_pred,
-              const bidirectional_iterator_tag &) {
-  return __unique_copy(__first, __last, __result, __binary_pred, forward_iterator_tag());
-}
-
-template <class _InputIterator, class _RandomAccessIterator, class _BinaryPredicate>
-inline _RandomAccessIterator 
-__unique_copy(_InputIterator __first, _InputIterator __last,
-              _RandomAccessIterator __result, _BinaryPredicate __binary_pred,
-              const random_access_iterator_tag &) {
-  return __unique_copy(__first, __last, __result, __binary_pred, forward_iterator_tag());
-}
-# endif /* _STLP_NONTEMPL_BASE_MATCH_BUG */
-
-
-template <class _InputIter, class _OutputIter>
-_OutputIter 
-unique_copy(_InputIter __first, _InputIter __last, _OutputIter __result) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  if (__first == __last) return __result;
-  return __unique_copy(__first, __last, __result, __equal_to(_STLP_VALUE_TYPE(__first, _InputIter)),
-                       _STLP_ITERATOR_CATEGORY(__result, _OutputIter));
-}
-
-template <class _InputIter, class _OutputIter, class _BinaryPredicate>
-_OutputIter 
-unique_copy(_InputIter __first, _InputIter __last,_OutputIter __result,
-            _BinaryPredicate __binary_pred) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  if (__first == __last) return __result;
-  return __unique_copy(__first, __last, __result, __binary_pred,
-                       _STLP_ITERATOR_CATEGORY(__result, _OutputIter));
-}
-
-// rotate and rotate_copy, and their auxiliary functions
-
-template <class _ForwardIter, class _Distance>
-_ForwardIter __rotate(_ForwardIter __first,
-                      _ForwardIter __middle,
-                      _ForwardIter __last,
-                      _Distance*,
-                      const forward_iterator_tag &) {
-  if (__first == __middle)
-    return __last;
-  if (__last  == __middle)
-    return __first;
-
-  _ForwardIter __first2 = __middle;
-  do {
-    swap(*__first++, *__first2++);
-    if (__first == __middle)
-      __middle = __first2;
-  } while (__first2 != __last);
-
-  _ForwardIter __new_middle = __first;
-
-  __first2 = __middle;
-
-  while (__first2 != __last) {
-    swap (*__first++, *__first2++);
-    if (__first == __middle)
-      __middle = __first2;
-    else if (__first2 == __last)
-      __first2 = __middle;
-  }
-
-  return __new_middle;
-}
-
-template <class _BidirectionalIter, class _Distance>
-_BidirectionalIter __rotate(_BidirectionalIter __first,
-                            _BidirectionalIter __middle,
-                            _BidirectionalIter __last,
-                            _Distance*,
-                            const bidirectional_iterator_tag &) {
-  if (__first == __middle)
-    return __last;
-  if (__last  == __middle)
-    return __first;
-
-  __reverse(__first,  __middle, bidirectional_iterator_tag());
-  __reverse(__middle, __last,   bidirectional_iterator_tag());
-
-  while (__first != __middle && __middle != __last)
-    swap (*__first++, *--__last);
-
-  if (__first == __middle) {
-    __reverse(__middle, __last,   bidirectional_iterator_tag());
-    return __last;
-  }
-  else {
-    __reverse(__first,  __middle, bidirectional_iterator_tag());
-    return __first;
-  }
-}
-
-template <class _RandomAccessIter, class _Distance, class _Tp>
-_RandomAccessIter __rotate(_RandomAccessIter __first,
-                           _RandomAccessIter __middle,
-                           _RandomAccessIter __last,
-                           _Distance *, _Tp *) {
-
-  _Distance __n = __last   - __first;
-  _Distance __k = __middle - __first;
-  _Distance __l = __n - __k;
-  _RandomAccessIter __result = __first + (__last - __middle);
-
-  if (__k==0)  /* __first == middle */
-    return __last;
-
-  if (__k == __l) {
-    swap_ranges(__first, __middle, __middle);
-    return __result;
-  }
-
-  _Distance __d = __gcd(__n, __k);
-
-  for (_Distance __i = 0; __i < __d; __i++) {
-    _Tp __tmp = *__first;
-    _RandomAccessIter __p = __first;
-
-    if (__k < __l) {
-      for (_Distance __j = 0; __j < __l/__d; __j++) {
-	if (__p > __first + __l) {
-          *__p = *(__p - __l);
-          __p -= __l;
-        }
-
-        *__p = *(__p + __k);
-        __p += __k;
-      }
-    }
-
-    else {
-      for (_Distance __j = 0; __j < __k/__d - 1; __j ++) {
-        if (__p < __last - __k) {
-          *__p = *(__p + __k);
-          __p += __k;
-        }
-
-        *__p = * (__p - __l);
-        __p -= __l;
-      }
-    }
-
-    *__p = __tmp;
-    ++__first;
-  }
-
-  return __result;
-}
-
-template <class _RandomAccessIter, class _Distance>
-inline _RandomAccessIter 
-__rotate(_RandomAccessIter __first, _RandomAccessIter __middle, _RandomAccessIter __last,
-         _Distance * __dis, const random_access_iterator_tag &) {
-  return __rotate(__first, __middle, __last,
-                  __dis, _STLP_VALUE_TYPE(__first, _RandomAccessIter));
-}
-
-template <class _ForwardIter>
-_ForwardIter 
-rotate(_ForwardIter __first, _ForwardIter __middle, _ForwardIter __last) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __middle))
-  _STLP_DEBUG_CHECK(__check_range(__middle, __last))
-  return __rotate(__first, __middle, __last,
-                  _STLP_DISTANCE_TYPE(__first, _ForwardIter),
-                  _STLP_ITERATOR_CATEGORY(__first, _ForwardIter));
-}
-
-// Return a random number in the range [0, __n).  This function encapsulates
-// whether we're using rand (part of the standard C library) or lrand48
-// (not standard, but a much better choice whenever it's available).
-
-template <class _Distance>
-inline _Distance __random_number(_Distance __n) {
-#ifdef _STLP_NO_DRAND48
-  return rand() % __n;
-#else
-  return lrand48() % __n;
-#endif
-}
-
-template <class _RandomAccessIter>
-void random_shuffle(_RandomAccessIter __first,
-		    _RandomAccessIter __last) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  if (__first == __last) return;
-  for (_RandomAccessIter __i = __first + 1; __i != __last; ++__i)
-    iter_swap(__i, __first + __random_number((__i - __first) + 1));
-}
-
-template <class _RandomAccessIter, class _RandomNumberGenerator>
-void random_shuffle(_RandomAccessIter __first, _RandomAccessIter __last,
-                    _RandomNumberGenerator& __rand) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  if (__first == __last) return;
-  for (_RandomAccessIter __i = __first + 1; __i != __last; ++__i)
-    iter_swap(__i, __first + __rand((__i - __first) + 1));
-}
-
-# ifndef _STLP_NO_EXTENSIONS
-
-// random_sample and random_sample_n (extensions, not part of the standard).
-
-template <class _ForwardIter, class _OutputIter, class _Distance>
-_OutputIter random_sample_n(_ForwardIter __first, _ForwardIter __last,
-                            _OutputIter __out, const _Distance __n)
-{
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  _Distance __remaining = distance(__first, __last);
-  _Distance __m = (min) (__n, __remaining);
-
-  while (__m > 0) {
-    if (__random_number(__remaining) < __m) {
-      *__out = *__first;
-      ++__out;
-      --__m;
-    }
-
-    --__remaining;
-    ++__first;
-  }
-  return __out;
-}
-
-
-template <class _ForwardIter, class _OutputIter, class _Distance,
-          class _RandomNumberGenerator>
-_OutputIter random_sample_n(_ForwardIter __first, _ForwardIter __last,
-                            _OutputIter __out, const _Distance __n,
-                            _RandomNumberGenerator& __rand)
-{
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  _Distance __remaining = distance(__first, __last);
-  _Distance __m = (min) (__n, __remaining);
-
-  while (__m > 0) {
-    if (__rand(__remaining) < __m) {
-      *__out = *__first;
-      ++__out;
-      --__m;
-    }
-
-    --__remaining;
-    ++__first;
-  }
-  return __out;
-}
-
-template <class _InputIter, class _RandomAccessIter, class _Distance>
-_RandomAccessIter __random_sample(_InputIter __first, _InputIter __last,
-                                  _RandomAccessIter __out,
-                                  const _Distance __n)
-{
-  _Distance __m = 0;
-  _Distance __t = __n;
-  for ( ; __first != __last && __m < __n; ++__m, ++__first) 
-    __out[__m] = *__first;
-
-  while (__first != __last) {
-    ++__t;
-    _Distance __M = __random_number(__t);
-    if (__M < __n)
-      __out[__M] = *__first;
-    ++__first;
-  }
-
-  return __out + __m;
-}
-
-template <class _InputIter, class _RandomAccessIter,
-          class _RandomNumberGenerator, class _Distance>
-_RandomAccessIter __random_sample(_InputIter __first, _InputIter __last,
-                                  _RandomAccessIter __out,
-                                  _RandomNumberGenerator& __rand,
-                                  const _Distance __n)
-{
-  _Distance __m = 0;
-  _Distance __t = __n;
-  for ( ; __first != __last && __m < __n; ++__m, ++__first)
-    __out[__m] = *__first;
-
-  while (__first != __last) {
-    ++__t;
-    _Distance __M = __rand(__t);
-    if (__M < __n)
-      __out[__M] = *__first;
-    ++__first;
-  }
-
-  return __out + __m;
-}
-
-template <class _InputIter, class _RandomAccessIter>
-_RandomAccessIter
-random_sample(_InputIter __first, _InputIter __last,
-              _RandomAccessIter __out_first, _RandomAccessIter __out_last) 
-{
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  _STLP_DEBUG_CHECK(__check_range(__out_first, __out_last))
-  return __random_sample(__first, __last,
-                         __out_first, __out_last - __out_first);
-}
-
-template <class _InputIter, class _RandomAccessIter, class _RandomNumberGenerator>
-_RandomAccessIter
-random_sample(_InputIter __first, _InputIter __last,
-              _RandomAccessIter __out_first, _RandomAccessIter __out_last,
-              _RandomNumberGenerator& __rand) 
-{
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  _STLP_DEBUG_CHECK(__check_range(__out_first, __out_last))
-  return __random_sample(__first, __last,
-                         __out_first, __rand,
-                         __out_last - __out_first);
-}
-
-# endif /* _STLP_NO_EXTENSIONS */
-
-// partition, stable_partition, and their auxiliary functions
-
-template <class _ForwardIter, class _Predicate>
-_STLP_INLINE_LOOP _ForwardIter __partition(_ForwardIter __first,
-                                           _ForwardIter __last,
-                                           _Predicate   __pred,
-                                           const forward_iterator_tag &) {
-  if (__first == __last) return __first;
-
-  while (__pred(*__first))
-    if (++__first == __last) return __first;
-
-  _ForwardIter __next = __first;
-
-  while (++__next != __last)
-    if (__pred(*__next)) {
-      swap(*__first, *__next);
-      ++__first;
-    }
-  return __first;
-}
-
-template <class _BidirectionalIter, class _Predicate>
-_STLP_INLINE_LOOP _BidirectionalIter __partition(_BidirectionalIter __first,
-                                                 _BidirectionalIter __last,
-                                                 _Predicate __pred,
-                                                 const bidirectional_iterator_tag &) {
-  while (true) {
-    while (true)
-      if (__first == __last)
-        return __first;
-      else if (__pred(*__first))
-        ++__first;
-      else
-        break;
-    --__last;
-    while (true)
-      if (__first == __last)
-        return __first;
-      else if (!__pred(*__last))
-        --__last;
-      else
-        break;
-    iter_swap(__first, __last);
-    ++__first;
-  }
-}
-
-# if defined (_STLP_NONTEMPL_BASE_MATCH_BUG)
-template <class _BidirectionalIter, class _Predicate>
-inline
-_BidirectionalIter __partition(_BidirectionalIter __first,
-                               _BidirectionalIter __last,
-			       _Predicate __pred,
-			       const random_access_iterator_tag &) {
-  return __partition(__first, __last, __pred, bidirectional_iterator_tag());
-}
-# endif
-
-template <class _ForwardIter, class _Predicate>
-_ForwardIter partition(_ForwardIter __first, _ForwardIter __last, _Predicate   __pred) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  return __partition(__first, __last, __pred, _STLP_ITERATOR_CATEGORY(__first, _ForwardIter));
-}
-
-
-template <class _ForwardIter, class _Predicate, class _Distance>
-_ForwardIter __inplace_stable_partition(_ForwardIter __first,
-                                        _ForwardIter __last,
-                                        _Predicate __pred, _Distance __len) {
-  if (__len == 1)
-    return __pred(*__first) ? __last : __first;
-  _ForwardIter __middle = __first;
-  advance(__middle, __len / 2);
-  return rotate(__inplace_stable_partition(__first, __middle, __pred, 
-                                           __len / 2),
-                __middle,
-                __inplace_stable_partition(__middle, __last, __pred,
-                                           __len - __len / 2));
-}
-
-template <class _ForwardIter, class _Pointer, class _Predicate, 
-          class _Distance>
-_ForwardIter __stable_partition_adaptive(_ForwardIter __first,
-                                         _ForwardIter __last,
-                                         _Predicate __pred, _Distance __len,
-                                         _Pointer __buffer,
-                                         _Distance __buffer_size) 
-{
-  if (__len <= __buffer_size) {
-    _ForwardIter __result1 = __first;
-    _Pointer __result2 = __buffer;
-    for ( ; __first != __last ; ++__first)
-      if (__pred(*__first)) {
-        *__result1 = *__first;
-        ++__result1;
-      }
-      else {
-        *__result2 = *__first;
-        ++__result2;
-      }
-    copy(__buffer, __result2, __result1);
-    return __result1;
-  }
-  else {
-    _ForwardIter __middle = __first;
-    advance(__middle, __len / 2);
-    return rotate(__stable_partition_adaptive(
-                          __first, __middle, __pred,
-                          __len / 2, __buffer, __buffer_size),
-                    __middle,
-                    __stable_partition_adaptive(
-                          __middle, __last, __pred,
-                          __len - __len / 2, __buffer, __buffer_size));
-  }
-}
-
-template <class _ForwardIter, class _Predicate, class _Tp, class _Distance>
-inline _ForwardIter
-__stable_partition_aux(_ForwardIter __first, _ForwardIter __last, 
-                       _Predicate __pred, _Tp*, _Distance*)
-{
-  _Temporary_buffer<_ForwardIter, _Tp> __buf(__first, __last);
-  _STLP_MPWFIX_TRY		//*TY 06/01/2000 - they forget to call dtor for _Temporary_buffer if no try/catch block is present
-  return (__buf.size() > 0) ?
-    __stable_partition_adaptive(__first, __last, __pred,
-				_Distance(__buf.requested_size()),
-				__buf.begin(), __buf.size())  :
-    __inplace_stable_partition(__first, __last, __pred, 
-			       _Distance(__buf.requested_size()));
-  _STLP_MPWFIX_CATCH	//*TY 06/01/2000 - they forget to call dtor for _Temporary_buffer if no try/catch block is present
-}
-
-template <class _ForwardIter, class _Predicate>
-_ForwardIter 
-stable_partition(_ForwardIter __first, _ForwardIter __last, _Predicate __pred) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  if (__first == __last)
-    return __first;
-  else
-    return __stable_partition_aux(__first, __last, __pred,
-                                  _STLP_VALUE_TYPE(__first, _ForwardIter),
-                                  _STLP_DISTANCE_TYPE(__first, _ForwardIter));
-}
-
-template <class _RandomAccessIter, class _Tp, class _Compare>
-_RandomAccessIter __unguarded_partition(_RandomAccessIter __first, 
-                                        _RandomAccessIter __last, 
-                                        _Tp __pivot, _Compare __comp) 
-{
-  while (true) {
-    while (__comp(*__first, __pivot))
-      ++__first;
-    --__last;
-    while (__comp(__pivot, *__last))
-      --__last;
-    if (!(__first < __last))
-      return __first;
-    iter_swap(__first, __last);
-    ++__first;
-  }
-}
-
-// sort() and its auxiliary functions. 
-
-# define  __stl_threshold  16
-
-template <class _RandomAccessIter, class _Tp, class _Compare>
-void __unguarded_linear_insert(_RandomAccessIter __last, _Tp __val, 
-                               _Compare __comp) {
-  _RandomAccessIter __next = __last;
-  --__next;  
-  while (__comp(__val, *__next)) {
-    *__last = *__next;
-    __last = __next;
-    --__next;
-  }
-  *__last = __val;
-}
-
-template <class _RandomAccessIter, class _Tp, class _Compare>
-inline void __linear_insert(_RandomAccessIter __first, 
-                            _RandomAccessIter __last, _Tp __val, _Compare __comp) {		
-  //*TY 12/26/1998 - added __val as a paramter
-  //  _Tp __val = *__last;		    //*TY 12/26/1998 - __val supplied by caller
-  if (__comp(__val, *__first)) {
-    copy_backward(__first, __last, __last + 1);
-    *__first = __val;
-  }
-  else
-    __unguarded_linear_insert(__last, __val, __comp);
-}
-
-template <class _RandomAccessIter, class _Compare>
-void __insertion_sort(_RandomAccessIter __first,
-                      _RandomAccessIter __last, _Compare __comp) {
-  if (__first == __last) return;
-  for (_RandomAccessIter __i = __first + 1; __i != __last; ++__i)
-    __linear_insert(__first, __i, *__i, __comp);	//*TY 12/26/1998 - supply *__i as __val
-}
-
-template <class _RandomAccessIter, class _Tp, class _Compare>
-void __unguarded_insertion_sort_aux(_RandomAccessIter __first, 
-                                    _RandomAccessIter __last,
-                                    _Tp*, _Compare __comp) {
-  for (_RandomAccessIter __i = __first; __i != __last; ++__i)
-    __unguarded_linear_insert(__i, _Tp(*__i), __comp);
-}
-
-template <class _RandomAccessIter, class _Compare>
-inline void __unguarded_insertion_sort(_RandomAccessIter __first, 
-                                       _RandomAccessIter __last,
-                                       _Compare __comp) {
-  __unguarded_insertion_sort_aux(__first, __last, _STLP_VALUE_TYPE(__first, _RandomAccessIter), __comp);
-}
-
-template <class _RandomAccessIter, class _Compare>
-void __final_insertion_sort(_RandomAccessIter __first, 
-                            _RandomAccessIter __last, _Compare __comp) {
-  if (__last - __first > __stl_threshold) {
-    __insertion_sort(__first, __first + __stl_threshold, __comp);
-    __unguarded_insertion_sort(__first + __stl_threshold, __last, __comp);
-  }
-  else
-    __insertion_sort(__first, __last, __comp);
-}
-
-template <class _RandomAccessIter, class _Tp, class _Size, class _Compare>
-void __introsort_loop(_RandomAccessIter __first,
-                      _RandomAccessIter __last, _Tp*,
-                      _Size __depth_limit, _Compare __comp)
-{
-  while (__last - __first > __stl_threshold) {
-    if (__depth_limit == 0) {
-      partial_sort(__first, __last, __last, __comp);
-      return;
-    }
-    --__depth_limit;
-    _RandomAccessIter __cut =
-      __unguarded_partition(__first, __last,
-                            _Tp(__median(*__first,
-                                         *(__first + (__last - __first)/2),
-                                         *(__last - 1), __comp)),
-       __comp);
-    __introsort_loop(__cut, __last, (_Tp*) 0, __depth_limit, __comp);
-    __last = __cut;
-  }
-}
-
-template <class _RandomAccessIter>
-void sort(_RandomAccessIter __first, _RandomAccessIter __last) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  if (__first != __last) {
-    __introsort_loop(__first, __last,
-                     _STLP_VALUE_TYPE(__first, _RandomAccessIter),
-                     __lg(__last - __first) * 2, __less(_STLP_VALUE_TYPE(__first, _RandomAccessIter)) );
-    __final_insertion_sort(__first, __last, __less(_STLP_VALUE_TYPE(__first, _RandomAccessIter)));
-  }
-}
-
-template <class _RandomAccessIter, class _Compare>
-void sort(_RandomAccessIter __first, _RandomAccessIter __last, _Compare __comp) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  if (__first != __last) {
-    __introsort_loop(__first, __last,
-                     _STLP_VALUE_TYPE(__first, _RandomAccessIter),
-                     __lg(__last - __first) * 2,
-                     __comp);
-    __final_insertion_sort(__first, __last, __comp);
-  }
-}
-
-// stable_sort() and its auxiliary functions.
-
-template <class _RandomAccessIter, class _Compare>
-void __inplace_stable_sort(_RandomAccessIter __first,
-                           _RandomAccessIter __last, _Compare __comp) {
-  if (__last - __first < 15) {
-    __insertion_sort(__first, __last, __comp);
-    return;
-  }
-  _RandomAccessIter __middle = __first + (__last - __first) / 2;
-  __inplace_stable_sort(__first, __middle, __comp);
-  __inplace_stable_sort(__middle, __last, __comp);
-  __merge_without_buffer(__first, __middle, __last,
-                         __middle - __first,
-                         __last - __middle,
-                         __comp);
-}
-
-template <class _RandomAccessIter1, class _RandomAccessIter2,
-          class _Distance, class _Compare>
-void __merge_sort_loop(_RandomAccessIter1 __first,
-                       _RandomAccessIter1 __last, 
-                       _RandomAccessIter2 __result, _Distance __step_size,
-                       _Compare __comp) {
-  _Distance __two_step = 2 * __step_size;
-
-  while (__last - __first >= __two_step) {
-    __result = merge(__first, __first + __step_size,
-                     __first + __step_size, __first + __two_step,
-                     __result,
-                     __comp);
-    __first += __two_step;
-  }
-  __step_size = (min) (_Distance(__last - __first), __step_size);
-
-  merge(__first, __first + __step_size,
-        __first + __step_size, __last,
-        __result,
-        __comp);
-}
-
-const int __stl_chunk_size = 7;
-        
-template <class _RandomAccessIter, class _Distance, class _Compare>
-void __chunk_insertion_sort(_RandomAccessIter __first, 
-                            _RandomAccessIter __last,
-                            _Distance __chunk_size, _Compare __comp)
-{
-  while (__last - __first >= __chunk_size) {
-    __insertion_sort(__first, __first + __chunk_size, __comp);
-    __first += __chunk_size;
-  }
-  __insertion_sort(__first, __last, __comp);
-}
-
-template <class _RandomAccessIter, class _Pointer, class _Distance,
-          class _Compare>
-void __merge_sort_with_buffer(_RandomAccessIter __first, 
-                              _RandomAccessIter __last, _Pointer __buffer,
-                              _Distance*, _Compare __comp) {
-  _Distance __len = __last - __first;
-  _Pointer __buffer_last = __buffer + __len;
-
-  _Distance __step_size = __stl_chunk_size;
-  __chunk_insertion_sort(__first, __last, __step_size, __comp);
-
-  while (__step_size < __len) {
-    __merge_sort_loop(__first, __last, __buffer, __step_size, __comp);
-    __step_size *= 2;
-    __merge_sort_loop(__buffer, __buffer_last, __first, __step_size, __comp);
-    __step_size *= 2;
-  }
-}
-
-template <class _BidirectionalIter1, class _BidirectionalIter2,
-          class _Distance>
-_BidirectionalIter1 __rotate_adaptive(_BidirectionalIter1 __first,
-                                      _BidirectionalIter1 __middle,
-                                      _BidirectionalIter1 __last,
-                                      _Distance __len1, _Distance __len2,
-                                      _BidirectionalIter2 __buffer,
-                                      _Distance __buffer_size) {
-  if (__len1 > __len2 && __len2 <= __buffer_size) {
-    _BidirectionalIter2 __buffer_end = copy(__middle, __last, __buffer);
-    copy_backward(__first, __middle, __last);
-    return copy(__buffer, __buffer_end, __first);
-  }
-  else if (__len1 <= __buffer_size) {
-    _BidirectionalIter2 __buffer_end = copy(__first, __middle, __buffer);
-    copy(__middle, __last, __first);
-    return copy_backward(__buffer, __buffer_end, __last);
-  }
-  else
-    return rotate(__first, __middle, __last);
-}
-
-template <class _BidirectionalIter, class _Distance, class _Pointer,
-          class _Compare>
-void __merge_adaptive(_BidirectionalIter __first, 
-                      _BidirectionalIter __middle, 
-                      _BidirectionalIter __last,
-                      _Distance __len1, _Distance __len2,
-                      _Pointer __buffer, _Distance __buffer_size,
-                      _Compare __comp) {
-  if (__len1 <= __len2 && __len1 <= __buffer_size) {
-    _Pointer __buffer_end = copy(__first, __middle, __buffer);
-    merge(__buffer, __buffer_end, __middle, __last, __first, __comp);
-  }
-  else if (__len2 <= __buffer_size) {
-    _Pointer __buffer_end = copy(__middle, __last, __buffer);
-    __merge_backward(__first, __middle, __buffer, __buffer_end, __last,
-                     __comp);
-  }
-  else {
-    _BidirectionalIter __first_cut = __first;
-    _BidirectionalIter __second_cut = __middle;
-    _Distance __len11 = 0;
-    _Distance __len22 = 0;
-    if (__len1 > __len2) {
-      __len11 = __len1 / 2;
-      advance(__first_cut, __len11);
-      __second_cut = lower_bound(__middle, __last, *__first_cut, __comp);
-      __len22 += distance(__middle, __second_cut);   
-    }
-    else {
-      __len22 = __len2 / 2;
-      advance(__second_cut, __len22);
-      __first_cut = upper_bound(__first, __middle, *__second_cut, __comp);
-      __len11 += distance(__first, __first_cut);
-    }
-    _BidirectionalIter __new_middle =
-      __rotate_adaptive(__first_cut, __middle, __second_cut, __len1 - __len11,
-                        __len22, __buffer, __buffer_size);
-    __merge_adaptive(__first, __first_cut, __new_middle, __len11,
-                     __len22, __buffer, __buffer_size, __comp);
-    __merge_adaptive(__new_middle, __second_cut, __last, __len1 - __len11,
-                     __len2 - __len22, __buffer, __buffer_size, __comp);
-  }
-}
-
-template <class _RandomAccessIter, class _Pointer, class _Distance, 
-          class _Compare>
-void __stable_sort_adaptive(_RandomAccessIter __first, 
-                            _RandomAccessIter __last, _Pointer __buffer,
-                            _Distance __buffer_size, _Compare __comp) {
-  _Distance __len = (__last - __first + 1) / 2;
-  _RandomAccessIter __middle = __first + __len;
-  if (__len > __buffer_size) {
-    __stable_sort_adaptive(__first, __middle, __buffer, __buffer_size, 
-                           __comp);
-    __stable_sort_adaptive(__middle, __last, __buffer, __buffer_size, 
-                           __comp);
-  }
-  else {
-    __merge_sort_with_buffer(__first, __middle, __buffer, (_Distance*)0,
-                               __comp);
-    __merge_sort_with_buffer(__middle, __last, __buffer, (_Distance*)0,
-                               __comp);
-  }
-  __merge_adaptive(__first, __middle, __last, _Distance(__middle - __first), 
-                   _Distance(__last - __middle), __buffer, __buffer_size,
-                   __comp);
-}
-
-template <class _RandomAccessIter, class _Tp, class _Distance, class _Compare>
-void __stable_sort_aux(_RandomAccessIter __first,
-			      _RandomAccessIter __last, _Tp*, _Distance*,
-			      _Compare __comp) {
-  _Temporary_buffer<_RandomAccessIter, _Tp> buf(__first, __last);
-  if (buf.begin() == 0)
-    __inplace_stable_sort(__first, __last, __comp);
-  else 
-    __stable_sort_adaptive(__first, __last, buf.begin(),
-                           _Distance(buf.size()),
-                           __comp);
-}
-
-template <class _RandomAccessIter>
-void stable_sort(_RandomAccessIter __first,
-		 _RandomAccessIter __last) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  __stable_sort_aux(__first, __last,
-                    _STLP_VALUE_TYPE(__first, _RandomAccessIter),
-                    _STLP_DISTANCE_TYPE(__first, _RandomAccessIter),
-                    __less(_STLP_VALUE_TYPE(__first, _RandomAccessIter)));
-}
-
-template <class _RandomAccessIter, class _Compare>
-void stable_sort(_RandomAccessIter __first,
-		 _RandomAccessIter __last, _Compare __comp) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  __stable_sort_aux(__first, __last,
-                    _STLP_VALUE_TYPE(__first, _RandomAccessIter),
-                    _STLP_DISTANCE_TYPE(__first, _RandomAccessIter), 
-                    __comp);
-}
-
-// partial_sort, partial_sort_copy, and auxiliary functions.
-
-template <class _RandomAccessIter, class _Tp, class _Compare>
-void __partial_sort(_RandomAccessIter __first, _RandomAccessIter __middle,
-                    _RandomAccessIter __last, _Tp*, _Compare __comp) {
-  make_heap(__first, __middle, __comp);
-  for (_RandomAccessIter __i = __middle; __i < __last; ++__i)
-    if (__comp(*__i, *__first))
-      __pop_heap(__first, __middle, __i, _Tp(*__i), __comp,
-                 _STLP_DISTANCE_TYPE(__first, _RandomAccessIter));
-  sort_heap(__first, __middle, __comp);
-}
-
-
-template <class _RandomAccessIter>
-void 
-partial_sort(_RandomAccessIter __first,_RandomAccessIter __middle, _RandomAccessIter __last) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __middle))
-  _STLP_DEBUG_CHECK(__check_range(__middle, __last))
-  __partial_sort(__first, __middle, __last, _STLP_VALUE_TYPE(__first, _RandomAccessIter), 
-                 __less(_STLP_VALUE_TYPE(__first, _RandomAccessIter)));
-}
-
-template <class _RandomAccessIter, class _Compare>
-void partial_sort(_RandomAccessIter __first,_RandomAccessIter __middle,
-                  _RandomAccessIter __last, _Compare __comp) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __middle))
-  _STLP_DEBUG_CHECK(__check_range(__middle, __last))
-  __partial_sort(__first, __middle, __last, _STLP_VALUE_TYPE(__first, _RandomAccessIter), __comp);
-}
-
-template <class _InputIter, class _RandomAccessIter, class _Compare,
-          class _Distance, class _Tp>
-_RandomAccessIter __partial_sort_copy(_InputIter __first,
-                                         _InputIter __last,
-                                         _RandomAccessIter __result_first,
-                                         _RandomAccessIter __result_last,
-                                         _Compare __comp, _Distance*, _Tp*) {
-  if (__result_first == __result_last) return __result_last;
-  _RandomAccessIter __result_real_last = __result_first;
-  while(__first != __last && __result_real_last != __result_last) {
-    *__result_real_last = *__first;
-    ++__result_real_last;
-    ++__first;
-  }
-  make_heap(__result_first, __result_real_last, __comp);
-  while (__first != __last) {
-    if (__comp(*__first, *__result_first))
-      __adjust_heap(__result_first, _Distance(0),
-                    _Distance(__result_real_last - __result_first),
-                    _Tp(*__first),
-                    __comp);
-    ++__first;
-  }
-  sort_heap(__result_first, __result_real_last, __comp);
-  return __result_real_last;
-}
-
-template <class _InputIter, class _RandomAccessIter>
-_RandomAccessIter
-partial_sort_copy(_InputIter __first, _InputIter __last,
-                  _RandomAccessIter __result_first, _RandomAccessIter __result_last) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  _STLP_DEBUG_CHECK(__check_range(__result_first, __result_last))
-  return __partial_sort_copy(__first, __last, __result_first, __result_last, 
-                             __less(_STLP_VALUE_TYPE(__first, _InputIter)),
-                             _STLP_DISTANCE_TYPE(__result_first, _RandomAccessIter),
-                             _STLP_VALUE_TYPE(__first, _InputIter));
-}
-
-template <class _InputIter, class _RandomAccessIter, class _Compare>
-_RandomAccessIter
-partial_sort_copy(_InputIter __first, _InputIter __last,
-                  _RandomAccessIter __result_first,
-                  _RandomAccessIter __result_last, _Compare __comp) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  _STLP_DEBUG_CHECK(__check_range(__result_first, __result_last))
-  return __partial_sort_copy(__first, __last, __result_first, __result_last,
-                             __comp,
-                             _STLP_DISTANCE_TYPE(__result_first, _RandomAccessIter),
-                             _STLP_VALUE_TYPE(__first, _InputIter));
-}
-
-// nth_element() and its auxiliary functions.  
-
-template <class _RandomAccessIter, class _Tp, class _Compare>
-void __nth_element(_RandomAccessIter __first, _RandomAccessIter __nth,
-                   _RandomAccessIter __last, _Tp*, _Compare __comp) {
-  while (__last - __first > 3) {
-    _RandomAccessIter __cut =
-      __unguarded_partition(__first, __last,
-                            _Tp(__median(*__first,
-                                         *(__first + (__last - __first)/2), 
-                                         *(__last - 1),
-                                         __comp)),
-                            __comp);
-    if (__cut <= __nth)
-      __first = __cut;
-    else 
-      __last = __cut;
-  }
-  __insertion_sort(__first, __last, __comp);
-}
-
-
-template <class _RandomAccessIter>
-void nth_element(_RandomAccessIter __first, _RandomAccessIter __nth,
-                 _RandomAccessIter __last) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __nth))
-  _STLP_DEBUG_CHECK(__check_range(__nth, __last))
-  __nth_element(__first, __nth, __last, _STLP_VALUE_TYPE(__first, _RandomAccessIter), 
-                __less(_STLP_VALUE_TYPE(__first, _RandomAccessIter)));
-}
-
-template <class _RandomAccessIter, class _Compare>
-void nth_element(_RandomAccessIter __first, _RandomAccessIter __nth,
-                 _RandomAccessIter __last, _Compare __comp) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __nth))
-  _STLP_DEBUG_CHECK(__check_range(__nth, __last))
-  __nth_element(__first, __nth, __last, _STLP_VALUE_TYPE(__first, _RandomAccessIter), __comp);
-}
-
-// Binary search (lower_bound, upper_bound, equal_range, binary_search).
-
-template <class _ForwardIter, class _Tp, class _Compare, class _Distance>
-_ForwardIter __upper_bound(_ForwardIter __first, _ForwardIter __last,
-                           const _Tp& __val, _Compare __comp, _Distance*)
-{
-  _Distance __len = distance(__first, __last);
-  _Distance __half;
-
-  while (__len > 0) {
-    __half = __len >> 1;
-    _ForwardIter __middle = __first;
-    advance(__middle, __half);
-    if (__comp(__val, *__middle))
-      __len = __half;
-    else {
-      __first = __middle;
-      ++__first;
-      __len = __len - __half - 1;
-    }
-  }
-  return __first;
-}
-
-template <class _ForwardIter, class _Tp, class _Compare, class _Distance>
-pair<_ForwardIter, _ForwardIter>
-__equal_range(_ForwardIter __first, _ForwardIter __last, const _Tp& __val,
-              _Compare __comp, _Distance*)
-{
-  _Distance __len = distance(__first, __last);
-  _Distance __half;
-
-  while (__len > 0) {
-    __half = __len >> 1;
-    _ForwardIter __middle = __first;
-    advance(__middle, __half);
-    if (__comp(*__middle, __val)) {
-      __first = __middle;
-      ++__first;
-      __len = __len - __half - 1;
-    }
-    else if (__comp(__val, *__middle))
-      __len = __half;
-    else {
-      _ForwardIter __left = lower_bound(__first, __middle, __val, __comp);
-      advance(__first, __len);
-      _ForwardIter __right = upper_bound(++__middle, __first, __val, __comp);
-      return pair<_ForwardIter, _ForwardIter>(__left, __right);
-    }
-  }
-  return pair<_ForwardIter, _ForwardIter>(__first, __first);
-}           
-
-template <class _InputIter1, class _InputIter2, class _OutputIter>
-_OutputIter merge(_InputIter1 __first1, _InputIter1 __last1,
-                  _InputIter2 __first2, _InputIter2 __last2,
-                  _OutputIter __result) {
-  _STLP_DEBUG_CHECK(__check_range(__first1, __last1))
-  _STLP_DEBUG_CHECK(__check_range(__first2, __last2))
-  while (__first1 != __last1 && __first2 != __last2) {
-    if (*__first2 < *__first1) {
-      *__result = *__first2;
-      ++__first2;
-    }
-    else {
-      *__result = *__first1;
-      ++__first1;
-    }
-    ++__result;
-  }
-  return copy(__first2, __last2, copy(__first1, __last1, __result));
-}
-
-template <class _InputIter1, class _InputIter2, class _OutputIter,
-          class _Compare>
-_OutputIter merge(_InputIter1 __first1, _InputIter1 __last1,
-                  _InputIter2 __first2, _InputIter2 __last2,
-                  _OutputIter __result, _Compare __comp) {
-  _STLP_DEBUG_CHECK(__check_range(__first1, __last1))
-  _STLP_DEBUG_CHECK(__check_range(__first2, __last2))
-  while (__first1 != __last1 && __first2 != __last2) {
-    if (__comp(*__first2, *__first1)) {
-      *__result = *__first2;
-      ++__first2;
-    }
-    else {
-      *__result = *__first1;
-      ++__first1;
-    }
-    ++__result;
-  }
-  return copy(__first2, __last2, copy(__first1, __last1, __result));
-}
-
-template <class _BidirectionalIter, class _Distance, class _Compare>
-void __merge_without_buffer(_BidirectionalIter __first,
-                            _BidirectionalIter __middle,
-                            _BidirectionalIter __last,
-                            _Distance __len1, _Distance __len2,
-                            _Compare __comp) {
-  if (__len1 == 0 || __len2 == 0)
-    return;
-  if (__len1 + __len2 == 2) {
-    if (__comp(*__middle, *__first))
-      iter_swap(__first, __middle);
-    return;
-  }
-  _BidirectionalIter __first_cut = __first;
-  _BidirectionalIter __second_cut = __middle;
-  _Distance __len11 = 0;
-  _Distance __len22 = 0;
-  if (__len1 > __len2) {
-    __len11 = __len1 / 2;
-    advance(__first_cut, __len11);
-    __second_cut = lower_bound(__middle, __last, *__first_cut, __comp);
-    __len22 += distance(__middle, __second_cut);
-  }
-  else {
-    __len22 = __len2 / 2;
-    advance(__second_cut, __len22);
-    __first_cut = upper_bound(__first, __middle, *__second_cut, __comp);
-    __len11 +=distance(__first, __first_cut);
-  }
-  _BidirectionalIter __new_middle
-    = rotate(__first_cut, __middle, __second_cut);
-  __merge_without_buffer(__first, __first_cut, __new_middle, __len11, __len22,
-                         __comp);
-  __merge_without_buffer(__new_middle, __second_cut, __last, __len1 - __len11,
-                         __len2 - __len22, __comp);
-}
-
-template <class _BidirectionalIter1, class _BidirectionalIter2,
-          class _BidirectionalIter3, class _Compare>
-_BidirectionalIter3 __merge_backward(_BidirectionalIter1 __first1,
-                                     _BidirectionalIter1 __last1,
-                                     _BidirectionalIter2 __first2,
-                                     _BidirectionalIter2 __last2,
-                                     _BidirectionalIter3 __result,
-                                     _Compare __comp) {
-  if (__first1 == __last1)
-    return copy_backward(__first2, __last2, __result);
-  if (__first2 == __last2)
-    return copy_backward(__first1, __last1, __result);
-  --__last1;
-  --__last2;
-  while (true) {
-    if (__comp(*__last2, *__last1)) {
-      *--__result = *__last1;
-      if (__first1 == __last1)
-        return copy_backward(__first2, ++__last2, __result);
-      --__last1;
-    }
-    else {
-      *--__result = *__last2;
-      if (__first2 == __last2)
-        return copy_backward(__first1, ++__last1, __result);
-      --__last2;
-    }
-  }
-}
-
-template <class _BidirectionalIter, class _Tp, 
-          class _Distance, class _Compare>
-inline void __inplace_merge_aux(_BidirectionalIter __first,
-                                _BidirectionalIter __middle,
-                                _BidirectionalIter __last, _Tp*, _Distance*,
-                                _Compare __comp) {
-  _Distance __len1 = distance(__first, __middle);
-  _Distance __len2 = distance(__middle, __last);
-
-  _Temporary_buffer<_BidirectionalIter, _Tp> __buf(__first, __last);
-  if (__buf.begin() == 0)
-    __merge_without_buffer(__first, __middle, __last, __len1, __len2, __comp);
-  else
-    __merge_adaptive(__first, __middle, __last, __len1, __len2,
-                     __buf.begin(), _Distance(__buf.size()),
-                     __comp);
-}
-
-template <class _BidirectionalIter>
-void inplace_merge(_BidirectionalIter __first,
-		   _BidirectionalIter __middle,
-		   _BidirectionalIter __last) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __middle))
-  _STLP_DEBUG_CHECK(__check_range(__middle, __last))
-  if (__first == __middle || __middle == __last)
-    return;
-  __inplace_merge_aux(__first, __middle, __last,
-                      _STLP_VALUE_TYPE(__first, _BidirectionalIter), _STLP_DISTANCE_TYPE(__first, _BidirectionalIter),
-                      __less(_STLP_VALUE_TYPE(__first, _BidirectionalIter)));
-}
-
-template <class _BidirectionalIter, class _Compare>
-void inplace_merge(_BidirectionalIter __first,
-		   _BidirectionalIter __middle,
-		   _BidirectionalIter __last, _Compare __comp) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __middle))
-  _STLP_DEBUG_CHECK(__check_range(__middle, __last))
-  if (__first == __middle || __middle == __last)
-    return;
-  __inplace_merge_aux(__first, __middle, __last,
-                      _STLP_VALUE_TYPE(__first, _BidirectionalIter), _STLP_DISTANCE_TYPE(__first, _BidirectionalIter),
-                      __comp);
-}
-
-
-template <class _InputIter1, class _InputIter2, class _Compare>
-bool __includes(_InputIter1 __first1, _InputIter1 __last1,
-                _InputIter2 __first2, _InputIter2 __last2, _Compare __comp) {
-  _STLP_DEBUG_CHECK(__check_range(__first1, __last1))
-  _STLP_DEBUG_CHECK(__check_range(__first2, __last2))
-  while (__first1 != __last1 && __first2 != __last2)
-    if (__comp(*__first2, *__first1))
-      return false;
-    else if(__comp(*__first1, *__first2)) 
-      ++__first1;
-    else
-      ++__first1, ++__first2;
-
-  return __first2 == __last2;
-}
-
-template <class _InputIter1, class _InputIter2, class _Compare>
-bool includes(_InputIter1 __first1, _InputIter1 __last1,
-              _InputIter2 __first2, _InputIter2 __last2, _Compare __comp) {
-  return __includes(__first1, __last1, __first2, __last2, __comp);
-}
-
-template <class _InputIter1, class _InputIter2>
-bool includes(_InputIter1 __first1, _InputIter1 __last1,
-              _InputIter2 __first2, _InputIter2 __last2) {
-  return __includes(__first1, __last1, __first2, __last2, __less(_STLP_VALUE_TYPE(__first1, _InputIter1)));
-}
-
-template <class _InputIter1, class _InputIter2, class _OutputIter,
-          class _Compare>
-_OutputIter __set_union(_InputIter1 __first1, _InputIter1 __last1,
-                        _InputIter2 __first2, _InputIter2 __last2,
-                        _OutputIter __result, _Compare __comp) {
-  _STLP_DEBUG_CHECK(__check_range(__first1, __last1))
-  _STLP_DEBUG_CHECK(__check_range(__first2, __last2))
-  while (__first1 != __last1 && __first2 != __last2) {
-    if (__comp(*__first1, *__first2)) {
-      *__result = *__first1;
-      ++__first1;
-    }
-    else if (__comp(*__first2, *__first1)) {
-      *__result = *__first2;
-      ++__first2;
-    }
-    else {
-      *__result = *__first1;
-      ++__first1;
-      ++__first2;
-    }
-    ++__result;
-  }
-  return copy(__first2, __last2, copy(__first1, __last1, __result));
-}
-
-template <class _InputIter1, class _InputIter2, class _OutputIter>
-_OutputIter set_union(_InputIter1 __first1, _InputIter1 __last1,
-                      _InputIter2 __first2, _InputIter2 __last2,
-                      _OutputIter __result) {
-  return __set_union(__first1, __last1, __first2, __last2, __result, __less(_STLP_VALUE_TYPE(__first1, _InputIter1)));  
-}
-
-template <class _InputIter1, class _InputIter2, class _OutputIter,
-          class _Compare>
-_OutputIter set_union(_InputIter1 __first1, _InputIter1 __last1,
-                      _InputIter2 __first2, _InputIter2 __last2,
-                      _OutputIter __result, _Compare __comp) {
-  return __set_union(__first1, __last1, __first2, __last2, __result, __comp);
-}
-
-template <class _InputIter1, class _InputIter2, class _OutputIter,
-          class _Compare>
-_OutputIter __set_intersection(_InputIter1 __first1, _InputIter1 __last1,
-                               _InputIter2 __first2, _InputIter2 __last2,
-                               _OutputIter __result, _Compare __comp) {
-  _STLP_DEBUG_CHECK(__check_range(__first1, __last1))
-  _STLP_DEBUG_CHECK(__check_range(__first2, __last2))
-  while (__first1 != __last1 && __first2 != __last2)
-    if (__comp(*__first1, *__first2))
-      ++__first1;
-    else if (__comp(*__first2, *__first1))
-      ++__first2;
-    else {
-      *__result = *__first1;
-      ++__first1;
-      ++__first2;
-      ++__result;
-    }
-  return __result;
-}
-
-template <class _InputIter1, class _InputIter2, class _OutputIter>
-_OutputIter set_intersection(_InputIter1 __first1, _InputIter1 __last1,
-                             _InputIter2 __first2, _InputIter2 __last2,
-                             _OutputIter __result) {
-  return __set_intersection(__first1, __last1, __first2, __last2, __result, __less(_STLP_VALUE_TYPE(__first1, _InputIter1)));  
-}
-
-template <class _InputIter1, class _InputIter2, class _OutputIter,
-          class _Compare>
-_OutputIter set_intersection(_InputIter1 __first1, _InputIter1 __last1,
-                             _InputIter2 __first2, _InputIter2 __last2,
-                             _OutputIter __result, _Compare __comp) {
-  return __set_intersection(__first1, __last1, __first2, __last2, __result, __comp);
-}
-
-template <class _InputIter1, class _InputIter2, class _OutputIter, 
-          class _Compare>
-_OutputIter __set_difference(_InputIter1 __first1, _InputIter1 __last1,
-                             _InputIter2 __first2, _InputIter2 __last2, 
-                             _OutputIter __result, _Compare __comp) {
-  _STLP_DEBUG_CHECK(__check_range(__first1, __last1))
-  _STLP_DEBUG_CHECK(__check_range(__first2, __last2))
-  while (__first1 != __last1 && __first2 != __last2)
-    if (__comp(*__first1, *__first2)) {
-      *__result = *__first1;
-      ++__first1;
-      ++__result;
-    }
-    else if (__comp(*__first2, *__first1))
-      ++__first2;
-    else {
-      ++__first1;
-      ++__first2;
-    }
-  return copy(__first1, __last1, __result);
-}
-
-template <class _InputIter1, class _InputIter2, class _OutputIter>
-_OutputIter set_difference(_InputIter1 __first1, _InputIter1 __last1,
-                           _InputIter2 __first2, _InputIter2 __last2,
-                           _OutputIter __result) {
-  return __set_difference(__first1, __last1, __first2, __last2, __result, 
-                          __less(_STLP_VALUE_TYPE(__first1, _InputIter1)));  
-}
-
-template <class _InputIter1, class _InputIter2, class _OutputIter, 
-          class _Compare>
-_OutputIter set_difference(_InputIter1 __first1, _InputIter1 __last1,
-                           _InputIter2 __first2, _InputIter2 __last2, 
-                           _OutputIter __result, _Compare __comp) {
-  return __set_difference(__first1, __last1, __first2, __last2, __result, __comp);
-}
-
-template <class _InputIter1, class _InputIter2, class _OutputIter, class _Compare>
-_OutputIter 
-__set_symmetric_difference(_InputIter1 __first1, _InputIter1 __last1,
-                           _InputIter2 __first2, _InputIter2 __last2,
-                           _OutputIter __result, _Compare __comp) {
-  _STLP_DEBUG_CHECK(__check_range(__first1, __last1))
-  _STLP_DEBUG_CHECK(__check_range(__first2, __last2))
-  while (__first1 != __last1 && __first2 != __last2)
-    if (__comp(*__first1, *__first2)) {
-      *__result = *__first1;
-      ++__first1;
-      ++__result;
-    }
-    else if (__comp(*__first2, *__first1)) {
-      *__result = *__first2;
-      ++__first2;
-      ++__result;
-    }
-    else {
-      ++__first1;
-      ++__first2;
-    }
-  return copy(__first2, __last2, copy(__first1, __last1, __result));
-}
-
-template <class _InputIter1, class _InputIter2, class _OutputIter>
-_OutputIter 
-set_symmetric_difference(_InputIter1 __first1, _InputIter1 __last1,
-                         _InputIter2 __first2, _InputIter2 __last2,
-                         _OutputIter __result) {
-  return __set_symmetric_difference(__first1, __last1, __first2, __last2, __result,
-                                    __less(_STLP_VALUE_TYPE(__first1, _InputIter1)));  
-}
-
-template <class _InputIter1, class _InputIter2, class _OutputIter, class _Compare>
-_OutputIter 
-set_symmetric_difference(_InputIter1 __first1, _InputIter1 __last1,
-                         _InputIter2 __first2, _InputIter2 __last2,
-                         _OutputIter __result,
-                         _Compare __comp) {
-  return __set_symmetric_difference(__first1, __last1, __first2, __last2, __result, __comp);
-}
-
-// min_element and max_element, with and without an explicitly supplied
-// comparison function.
-
-template <class _ForwardIter, class _Compare>
-_ForwardIter max_element(_ForwardIter __first, _ForwardIter __last,
-                            _Compare __comp) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  if (__first == __last) return __first;
-  _ForwardIter __result = __first;
-  while (++__first != __last) 
-    if (__comp(*__result, *__first)) __result = __first;
-  return __result;
-}
-
-template <class _ForwardIter>
-_ForwardIter max_element(_ForwardIter __first, _ForwardIter __last) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  if (__first == __last) return __first;
-  _ForwardIter __result = __first;
-  while (++__first != __last) 
-    if (*__result < *__first)
-      __result = __first;
-  return __result;
-}
-
-template <class _ForwardIter>
-_ForwardIter min_element(_ForwardIter __first, _ForwardIter __last) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  if (__first == __last) return __first;
-  _ForwardIter __result = __first;
-  while (++__first != __last) 
-    if (*__first < *__result)
-      __result = __first;
-  return __result;
-}
-
-template <class _ForwardIter, class _Compare>
-_ForwardIter min_element(_ForwardIter __first, _ForwardIter __last,
-                            _Compare __comp) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  if (__first == __last) return __first;
-  _ForwardIter __result = __first;
-  while (++__first != __last) 
-    if (__comp(*__first, *__result)) __result = __first;
-  return __result;
-}
-
-// next_permutation and prev_permutation, with and without an explicitly 
-// supplied comparison function.
-template <class _BidirectionalIter, class _Compare>
-bool __next_permutation(_BidirectionalIter __first, _BidirectionalIter __last,
-                        _Compare __comp) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  if (__first == __last)
-    return false;
-  _BidirectionalIter __i = __first;
-  ++__i;
-  if (__i == __last)
-    return false;
-  __i = __last;
-  --__i;
-
-  for(;;) {
-    _BidirectionalIter __ii = __i;
-    --__i;
-    if (__comp(*__i, *__ii)) {
-      _BidirectionalIter __j = __last;
-      while (!__comp(*__i, *--__j))
-        {}
-      iter_swap(__i, __j);
-      reverse(__ii, __last);
-      return true;
-    }
-    if (__i == __first) {
-      reverse(__first, __last);
-      return false;
-    }
-  }
-#if defined(_STLP_NEED_UNREACHABLE_RETURN)
-    return 0;
-#endif
-}
-
-template <class _BidirectionalIter>
-bool next_permutation(_BidirectionalIter __first, _BidirectionalIter __last) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  return __next_permutation(__first, __last, __less(_STLP_VALUE_TYPE(__first, _BidirectionalIter)));
-}
-
-template <class _BidirectionalIter, class _Compare>
-bool next_permutation(_BidirectionalIter __first, _BidirectionalIter __last,
-                      _Compare __comp) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  return __next_permutation(__first, __last, __comp);
-}
-
-template <class _BidirectionalIter, class _Compare>
-bool __prev_permutation(_BidirectionalIter __first, _BidirectionalIter __last,
-                      _Compare __comp) {
-  if (__first == __last)
-    return false;
-  _BidirectionalIter __i = __first;
-  ++__i;
-  if (__i == __last)
-    return false;
-  __i = __last;
-  --__i;
-
-  for(;;) {
-    _BidirectionalIter __ii = __i;
-    --__i;
-    if (__comp(*__ii, *__i)) {
-      _BidirectionalIter __j = __last;
-      while (!__comp(*--__j, *__i))
-        {}
-      iter_swap(__i, __j);
-      reverse(__ii, __last);
-      return true;
-    }
-    if (__i == __first) {
-      reverse(__first, __last);
-      return false;
-    }
-  }
-#if defined(_STLP_NEED_UNREACHABLE_RETURN)
-    return 0;
-#endif
-}
-
-template <class _BidirectionalIter>
-bool prev_permutation(_BidirectionalIter __first, _BidirectionalIter __last) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  return __prev_permutation(__first, __last, __less(_STLP_VALUE_TYPE(__first, _BidirectionalIter)));
-}
-
-template <class _BidirectionalIter, class _Compare>
-bool prev_permutation(_BidirectionalIter __first, _BidirectionalIter __last,
-                      _Compare __comp) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  return __prev_permutation(__first, __last, __comp);
-}
-
-# ifndef _STLP_NO_EXTENSIONS
-
-// is_heap, a predicate testing whether or not a range is
-// a heap.  This function is an extension, not part of the C++
-// standard.
-
-
-template <class _RandomAccessIter, class _Distance, class _StrictWeakOrdering>
-bool __is_heap(_RandomAccessIter __first, _StrictWeakOrdering __comp,
-               _Distance __n)
-{
-  _Distance __parent = 0;
-  for (_Distance __child = 1; __child < __n; ++__child) {
-    if (__comp(__first[__parent], __first[__child]))
-      return false;
-    if ((__child & 1) == 0)
-      ++__parent;
-  }
-  return true;
-}
-
-template <class _RandomAccessIter>
-bool is_heap(_RandomAccessIter __first, _RandomAccessIter __last)
-{
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  return __is_heap(__first, __less(_STLP_VALUE_TYPE(__first, _RandomAccessIter)), __last - __first);
-}
-
-template <class _RandomAccessIter, class _StrictWeakOrdering>
-bool is_heap(_RandomAccessIter __first, _RandomAccessIter __last,
-	     _StrictWeakOrdering __comp)
-{
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  return __is_heap(__first, __comp, __last - __first);
-}
-
-
-template <class _ForwardIter, class _StrictWeakOrdering>
-bool __is_sorted(_ForwardIter __first, _ForwardIter __last,
-                 _StrictWeakOrdering __comp)
-{
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  if (__first == __last)
-    return true;
-
-  _ForwardIter __next = __first;
-  for (++__next; __next != __last; __first = __next, ++__next) {
-    if (__comp(*__next, *__first))
-      return false;
-  }
-
-  return true;
-}
-
-# endif /* _STLP_NO_EXTENSIONS */
-
-_STLP_END_NAMESPACE
-
-# undef __stl_threshold
-
-#endif /* _STLP_ALGO_C */
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_algo.h b/src/STLport/stl/_algo.h
deleted file mode 100644
index c6e07cf..0000000
--- a/src/STLport/stl/_algo.h
+++ /dev/null
@@ -1,740 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_ALGO_H
-#define _STLP_INTERNAL_ALGO_H
-
-# ifndef _STLP_INTERNAL_ALGOBASE_H
-#  include <stl/_algobase.h>
-# endif
-
-# ifndef _STLP_INTERNAL_TEMPBUF_H
-#  include <stl/_tempbuf.h>
-# endif
-
-# ifndef _STLP_INTERNAL_HEAP_H
-#  include <stl/_heap.h>
-# endif
-
-# ifndef _STLP_INTERNAL_ITERATOR_H
-#  include <stl/_iterator.h>
-# endif
-
-# ifndef _STLP_INTERNAL_FUNCTION_BASE_H
-#  include <stl/_function_base.h>
-# endif
-
-# ifdef __SUNPRO_CC
-// remove() conflict
-#  include <cstdio>
-# endif
-
-_STLP_BEGIN_NAMESPACE
-
-// for_each.  Apply a function to every element of a range.
-template <class _InputIter, class _Function>
-_STLP_INLINE_LOOP _Function 
-for_each(_InputIter __first, _InputIter __last, _Function __f) {
-  for ( ; __first != __last; ++__first)
-    __f(*__first);
-  return __f;
-}
-
-// count_if
-template <class _InputIter, class _Predicate>
-_STLP_INLINE_LOOP _STLP_DIFFERENCE_TYPE(_InputIter)
-count_if(_InputIter __first, _InputIter __last, _Predicate __pred) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-_STLP_DIFFERENCE_TYPE(_InputIter) __n = 0;
-  for ( ; __first != __last; ++__first)
-    if (__pred(*__first))
-      ++__n;
-  return __n;
-}
-
-// adjacent_find.
-
-template <class _ForwardIter, class _BinaryPredicate>
-_STLP_INLINE_LOOP _ForwardIter 
-adjacent_find(_ForwardIter __first, _ForwardIter __last,
-              _BinaryPredicate __binary_pred) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  if (__first == __last)
-    return __last;
-  _ForwardIter __next = __first;
-  while(++__next != __last) {
-    if (__binary_pred(*__first, *__next))
-      return __first;
-    __first = __next;
-  }
-  return __last;
-}
-
-template <class _ForwardIter>
-_STLP_INLINE_LOOP _ForwardIter 
-adjacent_find(_ForwardIter __first, _ForwardIter __last) {
-  return adjacent_find(__first, __last,
-		       __equal_to(_STLP_VALUE_TYPE(__first, _ForwardIter)));
-}
-
-# ifndef _STLP_NO_ANACHRONISMS
-template <class _InputIter, class _Tp, class _Size>
-_STLP_INLINE_LOOP void 
-count(_InputIter __first, _InputIter __last, const _Tp& __val, _Size& __n) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-    for ( ; __first != __last; ++__first)
-      if (*__first == __val)
-        ++__n;
-}
-
-template <class _InputIter, class _Predicate, class _Size>
-_STLP_INLINE_LOOP void 
-count_if(_InputIter __first, _InputIter __last, _Predicate __pred, _Size& __n) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  for ( ; __first != __last; ++__first)
-    if (__pred(*__first))
-      ++__n;
-}
-# endif
-
-template <class _ForwardIter1, class _ForwardIter2>
-_ForwardIter1 search(_ForwardIter1 __first1, _ForwardIter1 __last1,
-                     _ForwardIter2 __first2, _ForwardIter2 __last2);
-
-// search_n.  Search for __count consecutive copies of __val.
-template <class _ForwardIter, class _Integer, class _Tp>
-_ForwardIter search_n(_ForwardIter __first, _ForwardIter __last,
-                      _Integer __count, const _Tp& __val);
-template <class _ForwardIter, class _Integer, class _Tp, class _BinaryPred>
-_ForwardIter search_n(_ForwardIter __first, _ForwardIter __last,
-                      _Integer __count, const _Tp& __val, _BinaryPred __binary_pred);
-
-template <class _InputIter, class _ForwardIter>
-inline _InputIter find_first_of(_InputIter __first1, _InputIter __last1,
-                                _ForwardIter __first2, _ForwardIter __last2) {
-  _STLP_DEBUG_CHECK(__check_range(__first1, __last1))
-  _STLP_DEBUG_CHECK(__check_range(__first2, __last2))
-  return __find_first_of(__first1, __last1, __first2, __last2,__equal_to(_STLP_VALUE_TYPE(__first1, _InputIter)));
-}
-
-template <class _InputIter, class _ForwardIter, class _BinaryPredicate>
-inline _InputIter 
-find_first_of(_InputIter __first1, _InputIter __last1,
-              _ForwardIter __first2, _ForwardIter __last2,_BinaryPredicate __comp) {
-  _STLP_DEBUG_CHECK(__check_range(__first1, __last1))
-  _STLP_DEBUG_CHECK(__check_range(__first2, __last2))
-  return __find_first_of(__first1, __last1, __first2, __last2,__comp);
-}
-
-template <class _ForwardIter1, class _ForwardIter2>
-_ForwardIter1 
-find_end(_ForwardIter1 __first1, _ForwardIter1 __last1, 
-         _ForwardIter2 __first2, _ForwardIter2 __last2);
-
-// swap_ranges
-template <class _ForwardIter1, class _ForwardIter2>
-_STLP_INLINE_LOOP _ForwardIter2 
-swap_ranges(_ForwardIter1 __first1, _ForwardIter1 __last1, _ForwardIter2 __first2) {
-  _STLP_DEBUG_CHECK(__check_range(__first1, __last1))
-  for ( ; __first1 != __last1; ++__first1, ++__first2)
-    iter_swap(__first1, __first2);
-  return __first2;
-}
-
-// transform
-template <class _InputIter, class _OutputIter, class _UnaryOperation>
-_STLP_INLINE_LOOP _OutputIter 
-transform(_InputIter __first, _InputIter __last, _OutputIter __result, _UnaryOperation __opr) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  for ( ; __first != __last; ++__first, ++__result)
-    *__result = __opr(*__first);
-  return __result;
-}
-template <class _InputIter1, class _InputIter2, class _OutputIter, class _BinaryOperation>
-_STLP_INLINE_LOOP _OutputIter 
-transform(_InputIter1 __first1, _InputIter1 __last1, 
-          _InputIter2 __first2, _OutputIter __result,_BinaryOperation __binary_op) {
-  _STLP_DEBUG_CHECK(__check_range(__first1, __last1))
-  for ( ; __first1 != __last1; ++__first1, ++__first2, ++__result)
-    *__result = __binary_op(*__first1, *__first2);
-  return __result;
-}
-
-// replace_if, replace_copy, replace_copy_if
-
-template <class _ForwardIter, class _Predicate, class _Tp>
-_STLP_INLINE_LOOP void 
-replace_if(_ForwardIter __first, _ForwardIter __last, _Predicate __pred, const _Tp& __new_value) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  for ( ; __first != __last; ++__first)
-    if (__pred(*__first))
-      *__first = __new_value;
-}
-
-template <class _InputIter, class _OutputIter, class _Tp>
-_STLP_INLINE_LOOP  _OutputIter 
-replace_copy(_InputIter __first, _InputIter __last,_OutputIter __result,
-             const _Tp& __old_value, const _Tp& __new_value) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  for ( ; __first != __last; ++__first, ++__result)
-    *__result = *__first == __old_value ? __new_value : *__first;
-  return __result;
-}
-
-template <class _Iterator, class _OutputIter, class _Predicate, class _Tp>
-_STLP_INLINE_LOOP _OutputIter 
-replace_copy_if(_Iterator __first, _Iterator __last,
-                _OutputIter __result,
-                _Predicate __pred, const _Tp& __new_value) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  for ( ; __first != __last; ++__first, ++__result)
-    *__result = __pred(*__first) ? __new_value : *__first;
-  return __result;
-}
-
-// generate and generate_n
-
-template <class _ForwardIter, class _Generator>
-_STLP_INLINE_LOOP void 
-generate(_ForwardIter __first, _ForwardIter __last, _Generator __gen) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  for ( ; __first != __last; ++__first)
-    *__first = __gen();
-}
-
-template <class _OutputIter, class _Size, class _Generator>
-_STLP_INLINE_LOOP _OutputIter 
-generate_n(_OutputIter __first, _Size __n, _Generator __gen) {
-  for ( ; __n > 0; --__n, ++__first)
-    *__first = __gen();
-  return __first;
-}
-
-// remove, remove_if, remove_copy, remove_copy_if
-
-template <class _InputIter, class _OutputIter, class _Tp>
-_STLP_INLINE_LOOP _OutputIter 
-remove_copy(_InputIter __first, _InputIter __last,_OutputIter __result, const _Tp& __val) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  for ( ; __first != __last; ++__first)
-    if (!(*__first == __val)) {
-      *__result = *__first;
-      ++__result;
-    }
-  return __result;
-}
-
-template <class _InputIter, class _OutputIter, class _Predicate>
-_STLP_INLINE_LOOP _OutputIter 
-remove_copy_if(_InputIter __first, _InputIter __last, _OutputIter __result, _Predicate __pred) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  for ( ; __first != __last; ++__first)
-    if (!__pred(*__first)) {
-      *__result = *__first;
-      ++__result;
-    }
-  return __result;
-}
-
-template <class _ForwardIter, class _Tp>
-_STLP_INLINE_LOOP _ForwardIter 
-remove(_ForwardIter __first, _ForwardIter __last, const _Tp& __val) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  __first = find(__first, __last, __val);
-  if (__first == __last)
-    return __first;
-  else { 
-    _ForwardIter __next = __first;
-    return remove_copy(++__next, __last, __first, __val);
-  }
-}
-
-template <class _ForwardIter, class _Predicate>
-_STLP_INLINE_LOOP _ForwardIter 
-remove_if(_ForwardIter __first, _ForwardIter __last, _Predicate __pred) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  __first = find_if(__first, __last, __pred);
-  if ( __first == __last )
-    return __first;
-  else {
-    _ForwardIter __next = __first;
-    return remove_copy_if(++__next, __last, __first, __pred);
-  }
-}
-
-// unique and unique_copy
-template <class _InputIter, class _OutputIter>
-_OutputIter unique_copy(_InputIter __first, _InputIter __last, _OutputIter __result);
-
-template <class _InputIter, class _OutputIter, class _BinaryPredicate>
-_OutputIter unique_copy(_InputIter __first, _InputIter __last,_OutputIter __result,
-                        _BinaryPredicate __binary_pred);
-
-template <class _ForwardIter>
-inline _ForwardIter unique(_ForwardIter __first, _ForwardIter __last) {
-  __first = adjacent_find(__first, __last);
-  return unique_copy(__first, __last, __first);
-}
-
-template <class _ForwardIter, class _BinaryPredicate>
-inline _ForwardIter unique(_ForwardIter __first, _ForwardIter __last,
-                    _BinaryPredicate __binary_pred) {
-  __first = adjacent_find(__first, __last, __binary_pred);
-  return unique_copy(__first, __last, __first, __binary_pred);
-}
-
-// reverse and reverse_copy, and their auxiliary functions
-
-template <class _BidirectionalIter>
-_STLP_INLINE_LOOP void 
-__reverse(_BidirectionalIter __first, _BidirectionalIter __last, const bidirectional_iterator_tag &) {
-  for(; __first != __last && __first != --__last; ++__first)
-    iter_swap(__first,__last);
-}
-
-
-template <class _RandomAccessIter>
-_STLP_INLINE_LOOP void 
-__reverse(_RandomAccessIter __first, _RandomAccessIter __last, const random_access_iterator_tag &) {
-  for (; __first < __last; ++__first) iter_swap(__first, --__last);
-}
-
-template <class _BidirectionalIter>
-inline void 
-reverse(_BidirectionalIter __first, _BidirectionalIter __last) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  __reverse(__first, __last, _STLP_ITERATOR_CATEGORY(__first, _BidirectionalIter));
-}
-
-template <class _BidirectionalIter, class _OutputIter>
-_STLP_INLINE_LOOP
-_OutputIter reverse_copy(_BidirectionalIter __first,
-                            _BidirectionalIter __last,
-                            _OutputIter __result) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  while (__first != __last) {
-    --__last;
-    *__result = *__last;
-    ++__result;
-  }
-  return __result;
-}
-
-// rotate and rotate_copy, and their auxiliary functions
-
-template <class _EuclideanRingElement>
-_STLP_INLINE_LOOP
-_EuclideanRingElement __gcd(_EuclideanRingElement __m,
-                            _EuclideanRingElement __n)
-{
-  while (__n != 0) {
-    _EuclideanRingElement __t = __m % __n;
-    __m = __n;
-    __n = __t;
-  }
-  return __m;
-}
-
-template <class _ForwardIter>
-_ForwardIter 
-rotate(_ForwardIter __first, _ForwardIter __middle, _ForwardIter __last);
-
-template <class _ForwardIter, class _OutputIter>
-inline _OutputIter rotate_copy(_ForwardIter __first, _ForwardIter __middle,
-                               _ForwardIter __last, _OutputIter __result) {
-  return copy(__first, __middle, copy(__middle, __last, __result));
-}
-
-// random_shuffle
-
-template <class _RandomAccessIter>
-void random_shuffle(_RandomAccessIter __first, _RandomAccessIter __last);
-
-template <class _RandomAccessIter, class _RandomNumberGenerator>
-void random_shuffle(_RandomAccessIter __first, _RandomAccessIter __last,
-                    _RandomNumberGenerator& __rand);
-
-# ifndef _STLP_NO_EXTENSIONS
-// random_sample and random_sample_n (extensions, not part of the standard).
-
-template <class _ForwardIter, class _OutputIter, class _Distance>
-_OutputIter random_sample_n(_ForwardIter __first, _ForwardIter __last,
-                            _OutputIter __out, const _Distance __n);
-
-template <class _ForwardIter, class _OutputIter, class _Distance,
-          class _RandomNumberGenerator>
-_OutputIter random_sample_n(_ForwardIter __first, _ForwardIter __last,
-                            _OutputIter __out, const _Distance __n,
-                            _RandomNumberGenerator& __rand);
-
-template <class _InputIter, class _RandomAccessIter>
-_RandomAccessIter
-random_sample(_InputIter __first, _InputIter __last,
-              _RandomAccessIter __out_first, _RandomAccessIter __out_last);
-
-template <class _InputIter, class _RandomAccessIter, 
-          class _RandomNumberGenerator>
-_RandomAccessIter
-random_sample(_InputIter __first, _InputIter __last,
-              _RandomAccessIter __out_first, _RandomAccessIter __out_last,
-              _RandomNumberGenerator& __rand);
-
-# endif /* _STLP_NO_EXTENSIONS */
-
-// partition, stable_partition, and their auxiliary functions
-
-template <class _ForwardIter, class _Predicate>
-_ForwardIter partition(_ForwardIter __first, _ForwardIter __last, _Predicate   __pred);
-
-
-template <class _ForwardIter, class _Predicate>
-_ForwardIter 
-stable_partition(_ForwardIter __first, _ForwardIter __last, _Predicate __pred);
-
-// sort() and its auxiliary functions. 
-
-template <class _Size>
-inline _Size __lg(_Size __n) {
-  _Size __k;
-  for (__k = 0; __n != 1; __n >>= 1) ++__k;
-  return __k;
-}
-
-template <class _RandomAccessIter>
-void sort(_RandomAccessIter __first, _RandomAccessIter __last);
-template <class _RandomAccessIter, class _Compare>
-void sort(_RandomAccessIter __first, _RandomAccessIter __last, _Compare __comp);
-
-// stable_sort() and its auxiliary functions.
-template <class _RandomAccessIter>
-void stable_sort(_RandomAccessIter __first,
-		 _RandomAccessIter __last);
-
-template <class _RandomAccessIter, class _Compare>
-void stable_sort(_RandomAccessIter __first,
-		 _RandomAccessIter __last, _Compare __comp);
-
-// partial_sort, partial_sort_copy, and auxiliary functions.
-
-template <class _RandomAccessIter>
-void 
-partial_sort(_RandomAccessIter __first,_RandomAccessIter __middle, _RandomAccessIter __last);
-
-template <class _RandomAccessIter, class _Compare>
-void 
-partial_sort(_RandomAccessIter __first,_RandomAccessIter __middle, 
-             _RandomAccessIter __last, _Compare __comp);
-
-template <class _InputIter, class _RandomAccessIter>
-_RandomAccessIter
-partial_sort_copy(_InputIter __first, _InputIter __last,
-                  _RandomAccessIter __result_first, _RandomAccessIter __result_last);
-
-template <class _InputIter, class _RandomAccessIter, class _Compare>
-_RandomAccessIter
-partial_sort_copy(_InputIter __first, _InputIter __last,
-                  _RandomAccessIter __result_first,
-                  _RandomAccessIter __result_last, _Compare __comp);
-
-// nth_element() and its auxiliary functions.  
-
-template <class _RandomAccessIter>
-void nth_element(_RandomAccessIter __first, _RandomAccessIter __nth,
-                 _RandomAccessIter __last);
-
-template <class _RandomAccessIter, class _Compare>
-void nth_element(_RandomAccessIter __first, _RandomAccessIter __nth,
-                 _RandomAccessIter __last, _Compare __comp);
-
-// auxiliary class for lower_bound, etc.
-template <class _T1, class _T2>
-struct __less_2 {
-  bool operator() (const _T1& __x, const _T2 __y) const { return __x < __y ; } 
-};
-
-template <class _T1, class _T2>
-__less_2<_T1,_T2> __less2(_T1*, _T2* ) { return __less_2<_T1, _T2>(); }
-
-#ifdef _STLP_FUNCTION_PARTIAL_ORDER
-template <class _Tp>
-less<_Tp> __less2(_Tp*, _Tp* ) { return less<_Tp>(); }
-#endif
-
-// Binary search (lower_bound, upper_bound, equal_range, binary_search).
-
-template <class _ForwardIter, class _Tp>
-inline _ForwardIter lower_bound(_ForwardIter __first, _ForwardIter __last,
-                                   const _Tp& __val) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-    return __lower_bound(__first, __last, __val, 
-			 __less2(_STLP_VALUE_TYPE(__first, _ForwardIter), (_Tp*)0),
-			 _STLP_DISTANCE_TYPE(__first, _ForwardIter));
-}
-
-template <class _ForwardIter, class _Tp, class _Compare>
-inline _ForwardIter lower_bound(_ForwardIter __first, _ForwardIter __last,
-                                const _Tp& __val, _Compare __comp) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  return __lower_bound(__first, __last, __val, __comp, _STLP_DISTANCE_TYPE(__first, _ForwardIter));
-}
-
-template <class _ForwardIter, class _Tp, class _Compare, class _Distance>
-_ForwardIter __upper_bound(_ForwardIter __first, _ForwardIter __last,
-                           const _Tp& __val, _Compare __comp, _Distance*);
-
-template <class _ForwardIter, class _Tp>
-inline _ForwardIter upper_bound(_ForwardIter __first, _ForwardIter __last,
-                                const _Tp& __val) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  return __upper_bound(__first, __last, __val, 
-		       __less2(_STLP_VALUE_TYPE(__first, _ForwardIter), (_Tp*)0),
-                       _STLP_DISTANCE_TYPE(__first, _ForwardIter));
-}
-
-template <class _ForwardIter, class _Tp, class _Compare>
-inline _ForwardIter upper_bound(_ForwardIter __first, _ForwardIter __last,
-                                const _Tp& __val, _Compare __comp) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  return __upper_bound(__first, __last, __val, __comp,
-                       _STLP_DISTANCE_TYPE(__first, _ForwardIter));
-}
-
-template <class _ForwardIter, class _Tp, class _Compare, class _Distance>
-pair<_ForwardIter, _ForwardIter>
-__equal_range(_ForwardIter __first, _ForwardIter __last, const _Tp& __val,
-              _Compare __comp, _Distance*);
-
-template <class _ForwardIter, class _Tp>
-inline pair<_ForwardIter, _ForwardIter>
-equal_range(_ForwardIter __first, _ForwardIter __last, const _Tp& __val) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  return __equal_range(__first, __last, __val,  
-		       __less2(_STLP_VALUE_TYPE(__first, _ForwardIter), (_Tp*)0),
-                       _STLP_DISTANCE_TYPE(__first, _ForwardIter));
-}
-
-template <class _ForwardIter, class _Tp, class _Compare>
-inline pair<_ForwardIter, _ForwardIter>
-equal_range(_ForwardIter __first, _ForwardIter __last, const _Tp& __val,
-            _Compare __comp) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  return __equal_range(__first, __last, __val, __comp,
-                       _STLP_DISTANCE_TYPE(__first, _ForwardIter));
-} 
-
-template <class _ForwardIter, class _Tp>
-inline bool binary_search(_ForwardIter __first, _ForwardIter __last,
-                   const _Tp& __val) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  _ForwardIter __i = __lower_bound(__first, __last, __val, 
-                                   __less2(_STLP_VALUE_TYPE(__first, _ForwardIter), (_Tp*)0),
-                                   _STLP_DISTANCE_TYPE(__first, _ForwardIter));
-  return __i != __last && !(__val < *__i);
-}
-
-template <class _ForwardIter, class _Tp, class _Compare>
-inline bool binary_search(_ForwardIter __first, _ForwardIter __last,
-                   const _Tp& __val,
-                   _Compare __comp) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  _ForwardIter __i = __lower_bound(__first, __last, __val, __comp, _STLP_DISTANCE_TYPE(__first, _ForwardIter));
-  return __i != __last && !__comp(__val, *__i);
-}
-
-// merge, with and without an explicitly supplied comparison function.
-
-template <class _InputIter1, class _InputIter2, class _OutputIter>
-_OutputIter merge(_InputIter1 __first1, _InputIter1 __last1,
-                  _InputIter2 __first2, _InputIter2 __last2,
-                  _OutputIter __result);
- 
-template <class _InputIter1, class _InputIter2, class _OutputIter,
-          class _Compare>
-_OutputIter merge(_InputIter1 __first1, _InputIter1 __last1,
-                  _InputIter2 __first2, _InputIter2 __last2,
-                  _OutputIter __result, _Compare __comp);
-
-
-// inplace_merge and its auxiliary functions. 
-
-
-template <class _BidirectionalIter>
-void inplace_merge(_BidirectionalIter __first,
-		   _BidirectionalIter __middle,
-		   _BidirectionalIter __last) ;
-
-template <class _BidirectionalIter, class _Compare>
-void inplace_merge(_BidirectionalIter __first,
-		   _BidirectionalIter __middle,
-		   _BidirectionalIter __last, _Compare __comp);
-
-// Set algorithms: includes, set_union, set_intersection, set_difference,
-// set_symmetric_difference.  All of these algorithms have the precondition
-// that their input ranges are sorted and the postcondition that their output
-// ranges are sorted.
-
-template <class _InputIter1, class _InputIter2>
-bool includes(_InputIter1 __first1, _InputIter1 __last1,
-              _InputIter2 __first2, _InputIter2 __last2);
-
-template <class _InputIter1, class _InputIter2, class _Compare>
-bool includes(_InputIter1 __first1, _InputIter1 __last1,
-              _InputIter2 __first2, _InputIter2 __last2, _Compare __comp);
- 
-template <class _InputIter1, class _InputIter2, class _OutputIter>
-_OutputIter set_union(_InputIter1 __first1, _InputIter1 __last1,
-                      _InputIter2 __first2, _InputIter2 __last2,
-                      _OutputIter __result);
-
-template <class _InputIter1, class _InputIter2, class _OutputIter,
-          class _Compare>
-_OutputIter set_union(_InputIter1 __first1, _InputIter1 __last1,
-                      _InputIter2 __first2, _InputIter2 __last2,
-                      _OutputIter __result, _Compare __comp);
-
-template <class _InputIter1, class _InputIter2, class _OutputIter>
-_OutputIter set_intersection(_InputIter1 __first1, _InputIter1 __last1,
-                             _InputIter2 __first2, _InputIter2 __last2,
-                             _OutputIter __result);
-
-template <class _InputIter1, class _InputIter2, class _OutputIter,
-          class _Compare>
-_OutputIter set_intersection(_InputIter1 __first1, _InputIter1 __last1,
-                             _InputIter2 __first2, _InputIter2 __last2,
-                             _OutputIter __result, _Compare __comp);
-
-
-
-template <class _InputIter1, class _InputIter2, class _OutputIter>
-_OutputIter set_difference(_InputIter1 __first1, _InputIter1 __last1,
-                           _InputIter2 __first2, _InputIter2 __last2,
-                           _OutputIter __result);
-
-template <class _InputIter1, class _InputIter2, class _OutputIter, 
-          class _Compare>
-_OutputIter set_difference(_InputIter1 __first1, _InputIter1 __last1,
-                           _InputIter2 __first2, _InputIter2 __last2, 
-                           _OutputIter __result, _Compare __comp);
-
-template <class _InputIter1, class _InputIter2, class _OutputIter>
-_OutputIter 
-set_symmetric_difference(_InputIter1 __first1, _InputIter1 __last1,
-                         _InputIter2 __first2, _InputIter2 __last2,
-                         _OutputIter __result);
-
-
-template <class _InputIter1, class _InputIter2, class _OutputIter,
-          class _Compare>
-_OutputIter 
-set_symmetric_difference(_InputIter1 __first1, _InputIter1 __last1,
-                         _InputIter2 __first2, _InputIter2 __last2,
-                         _OutputIter __result,
-                         _Compare __comp);
-
-
-// min_element and max_element, with and without an explicitly supplied
-// comparison function.
-
-template <class _ForwardIter>
-_ForwardIter max_element(_ForwardIter __first, _ForwardIter __last);
-template <class _ForwardIter, class _Compare>
-_ForwardIter max_element(_ForwardIter __first, _ForwardIter __last,
-                            _Compare __comp);
-
-template <class _ForwardIter>
-_ForwardIter min_element(_ForwardIter __first, _ForwardIter __last);
-
-template <class _ForwardIter, class _Compare>
-_ForwardIter min_element(_ForwardIter __first, _ForwardIter __last,
-                            _Compare __comp);
-
-// next_permutation and prev_permutation, with and without an explicitly 
-// supplied comparison function.
-
-template <class _BidirectionalIter>
-bool next_permutation(_BidirectionalIter __first, _BidirectionalIter __last);
-
-template <class _BidirectionalIter, class _Compare>
-bool next_permutation(_BidirectionalIter __first, _BidirectionalIter __last,
-                      _Compare __comp);
-
-
-template <class _BidirectionalIter>
-bool prev_permutation(_BidirectionalIter __first, _BidirectionalIter __last);
-
-
-template <class _BidirectionalIter, class _Compare>
-bool prev_permutation(_BidirectionalIter __first, _BidirectionalIter __last,
-                      _Compare __comp);
-
-# ifndef _STLP_NO_EXTENSIONS
-
-// is_heap, a predicate testing whether or not a range is
-// a heap.  This function is an extension, not part of the C++
-// standard.
-
-template <class _RandomAccessIter>
-bool is_heap(_RandomAccessIter __first, _RandomAccessIter __last);
-
-template <class _RandomAccessIter, class _StrictWeakOrdering>
-bool is_heap(_RandomAccessIter __first, _RandomAccessIter __last,
-	     _StrictWeakOrdering __comp);
-
-
-// is_sorted, a predicated testing whether a range is sorted in
-// nondescending order.  This is an extension, not part of the C++
-// standard.
-template <class _ForwardIter, class _StrictWeakOrdering>
-bool __is_sorted(_ForwardIter __first, _ForwardIter __last,
-                 _StrictWeakOrdering __comp);
-
-template <class _ForwardIter>
-inline bool is_sorted(_ForwardIter __first, _ForwardIter __last) {
-  return __is_sorted(__first, __last, __less(_STLP_VALUE_TYPE(__first, _ForwardIter)));
-}
-
-template <class _ForwardIter, class _StrictWeakOrdering>
-inline bool is_sorted(_ForwardIter __first, _ForwardIter __last,
-                      _StrictWeakOrdering __comp) {
-  return __is_sorted(__first, __last, __comp);
-}
-# endif
-
-_STLP_END_NAMESPACE
-
-# if !defined (_STLP_LINK_TIME_INSTANTIATION)
-#  include <stl/_algo.c>
-# endif
-
-#endif /* _STLP_INTERNAL_ALGO_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/stl/_algobase.c b/src/STLport/stl/_algobase.c
deleted file mode 100644
index d5b51a1..0000000
--- a/src/STLport/stl/_algobase.c
+++ /dev/null
@@ -1,392 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-#ifndef _STLP_ALGOBASE_C
-#define _STLP_ALGOBASE_C
-
-# if !defined (_STLP_INTERNAL_ALGOBASE_H)
-#  include <stl/_algobase.h>
-# endif
-
-_STLP_BEGIN_NAMESPACE
-
-template <class _InputIter1, class _InputIter2>
-bool lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1,
-                             _InputIter2 __first2, _InputIter2 __last2) {
-  _STLP_DEBUG_CHECK(__check_range(__first1, __last1))
-    _STLP_DEBUG_CHECK(__check_range(__first2, __last2))
-    for ( ; __first1 != __last1 && __first2 != __last2
-	    ; ++__first1, ++__first2) {
-      if (*__first1 < *__first2)
-	return true;
-      if (*__first2 < *__first1)
-	return false;
-    }
-  return __first1 == __last1 && __first2 != __last2;
-}
-
-template <class _InputIter1, class _InputIter2, class _Compare>
-bool lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1,
-                             _InputIter2 __first2, _InputIter2 __last2,
-                             _Compare __comp) {
-  _STLP_DEBUG_CHECK(__check_range(__first1, __last1))
-    _STLP_DEBUG_CHECK(__check_range(__first2, __last2))
-    for ( ; __first1 != __last1 && __first2 != __last2
-	    ; ++__first1, ++__first2) {
-      if (__comp(*__first1, *__first2))
-	return true;
-      if (__comp(*__first2, *__first1))
-	return false;
-    }
-  return __first1 == __last1 && __first2 != __last2;
-}
-
-# ifndef _STLP_NO_EXTENSIONS
-
-template <class _InputIter1, class _InputIter2>
-int __lexicographical_compare_3way(_InputIter1 __first1, _InputIter1 __last1,
-                                   _InputIter2 __first2, _InputIter2 __last2)
-{
-  while (__first1 != __last1 && __first2 != __last2) {
-    if (*__first1 < *__first2)
-      return -1;
-    if (*__first2 < *__first1)
-      return 1;
-    ++__first1;
-    ++__first2;
-  }
-  if (__first2 == __last2) {
-    return !(__first1 == __last1);
-  }
-  else {
-    return -1;
-  }
-}
-
-
-template <class _InputIter1, class _InputIter2>
-int lexicographical_compare_3way(_InputIter1 __first1, _InputIter1 __last1,
-                                 _InputIter2 __first2, _InputIter2 __last2)
-{
-  _STLP_DEBUG_CHECK(__check_range(__first1, __last1))
-    _STLP_DEBUG_CHECK(__check_range(__first2, __last2))
-    return __lexicographical_compare_3way(__first1, __last1, __first2, __last2);
-}
-# endif
-
-template <class _RandomAccessIter, class _Tp>
-_STLP_INLINE_LOOP _RandomAccessIter __find(_RandomAccessIter __first, _RandomAccessIter __last,
-                                           const _Tp& __val,
-                                           const random_access_iterator_tag &)
-{
-  _STLP_DIFFERENCE_TYPE(_RandomAccessIter) __trip_count = (__last - __first) >> 2;
-
-  for ( ; __trip_count > 0 ; --__trip_count) {
-    if (*__first == __val) return __first;
-    ++__first;
-
-    if (*__first == __val) return __first;
-    ++__first;
-
-    if (*__first == __val) return __first;
-    ++__first;
-
-    if (*__first == __val) return __first;
-    ++__first;
-  }
-
-  switch(__last - __first) {
-  case 3:
-    if (*__first == __val) return __first;
-    ++__first;
-  case 2:
-    if (*__first == __val) return __first;
-    ++__first;
-  case 1:
-    if (*__first == __val) return __first;
-    ++__first;
-  case 0:
-  default:
-    return __last;
-  }
-}
-
-template <class _RandomAccessIter, class _Predicate>
-_STLP_INLINE_LOOP _RandomAccessIter __find_if(_RandomAccessIter __first, _RandomAccessIter __last,
-                                              _Predicate __pred,
-                                              const random_access_iterator_tag &)
-{
-  _STLP_DIFFERENCE_TYPE(_RandomAccessIter) __trip_count = (__last - __first) >> 2;
-
-  for ( ; __trip_count > 0 ; --__trip_count) {
-    if (__pred(*__first)) return __first;
-    ++__first;
-
-    if (__pred(*__first)) return __first;
-    ++__first;
-
-    if (__pred(*__first)) return __first;
-    ++__first;
-
-    if (__pred(*__first)) return __first;
-    ++__first;
-  }
-
-  switch(__last - __first) {
-  case 3:
-    if (__pred(*__first)) return __first;
-    ++__first;
-  case 2:
-    if (__pred(*__first)) return __first;
-    ++__first;
-  case 1:
-    if (__pred(*__first)) return __first;
-    //    ++__first;
-  case 0:
-  default:
-    return __last;
-  }
-}
-
-template <class _InputIter, class _Tp>
-inline _InputIter __find(_InputIter __first, _InputIter __last,
-			 const _Tp& __val,
-			 const input_iterator_tag &)
-{
-  while (__first != __last && !(*__first == __val))
-    ++__first;
-  return __first;
-}
-
-template <class _InputIter, class _Predicate>
-inline _InputIter __find_if(_InputIter __first, _STLP_MPW_EXTRA_CONST _InputIter __last,
-                            _Predicate __pred,
-                            const input_iterator_tag &)
-{
-  while (__first != __last && !__pred(*__first))
-    ++__first;
-  return __first;
-}
-
-template <class _InputIter, class _Predicate>
-_InputIter find_if(_InputIter __first, _InputIter __last,
-                   _Predicate __pred) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-    return __find_if(__first, __last, __pred, _STLP_ITERATOR_CATEGORY(__first, _InputIter));
-}
-
-template <class _InputIter, class _Tp>
-_InputIter find(_InputIter __first, _InputIter __last, const _Tp& __val)
-{
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-    return __find(__first, __last, __val, _STLP_ITERATOR_CATEGORY(__first, _InputIter));
-}
-
-template <class _ForwardIter1, class _ForwardIter2, class _BinaryPred>
-_ForwardIter1 search(_ForwardIter1 __first1, _ForwardIter1 __last1,
-                     _ForwardIter2 __first2, _ForwardIter2 __last2,
-                     _BinaryPred  __predicate) 
-{
-  _STLP_DEBUG_CHECK(__check_range(__first1, __last1))
-    _STLP_DEBUG_CHECK(__check_range(__first2, __last2))
-    // Test for empty ranges
-    if (__first1 == __last1 || __first2 == __last2)
-      return __first1;
-
-  // Test for a pattern of length 1.
-  _ForwardIter2 __tmp(__first2);
-  ++__tmp;
-  if (__tmp == __last2) {
-    while (__first1 != __last1 && !__predicate(*__first1, *__first2))
-      ++__first1;
-    return __first1;    
-  }
-  
-  // General case.
-
-  _ForwardIter2 __p1, __p;
-
-  __p1 = __first2; ++__p1;
-
-  //  _ForwardIter1 __current = __first1;
-
-  while (__first1 != __last1) {
-    while (__first1 != __last1) {
-      if (__predicate(*__first1, *__first2))
-        break;
-      ++__first1;
-    }
-    while (__first1 != __last1 && !__predicate(*__first1, *__first2))
-      ++__first1;
-    if (__first1 == __last1)
-      return __last1;
-
-    __p = __p1;
-    _ForwardIter1 __current = __first1; 
-    if (++__current == __last1) return __last1;
-
-    while (__predicate(*__current, *__p)) {
-      if (++__p == __last2)
-        return __first1;
-      if (++__current == __last1)
-        return __last1;
-    }
-
-    ++__first1;
-  }
-  return __first1;
-}
-
-// find_first_of, with and without an explicitly supplied comparison function.
-
-template <class _InputIter, class _ForwardIter, class _BinaryPredicate>
-_InputIter __find_first_of(_InputIter __first1, _InputIter __last1,
-                           _ForwardIter __first2, _ForwardIter __last2,
-                           _BinaryPredicate __comp) {
-  for ( ; __first1 != __last1; ++__first1) 
-    for (_ForwardIter __iter = __first2; __iter != __last2; ++__iter)
-      if (__comp(*__first1, *__iter))
-        return __first1;
-  return __last1;
-}
-
-
-// find_end, with and without an explicitly supplied comparison function.
-// Search [first2, last2) as a subsequence in [first1, last1), and return
-// the *last* possible match.  Note that find_end for bidirectional iterators
-// is much faster than for forward iterators.
-
-// find_end for forward iterators. 
-
-template <class _ForwardIter1, class _ForwardIter2,
-  class _BinaryPredicate>
-_ForwardIter1 __find_end(_ForwardIter1 __first1, _ForwardIter1 __last1,
-                         _ForwardIter2 __first2, _ForwardIter2 __last2,
-                         const forward_iterator_tag &, const forward_iterator_tag &,
-                         _BinaryPredicate __comp)
-{
-  if (__first2 == __last2)
-    return __last1;
-  else {
-    _ForwardIter1 __result = __last1;
-    while (1) {
-      _ForwardIter1 __new_result
-        = search(__first1, __last1, __first2, __last2, __comp);
-      if (__new_result == __last1)
-        return __result;
-      else {
-        __result = __new_result;
-        __first1 = __new_result;
-        ++__first1;
-      }
-    }
-  }
-}
-
-// find_end for bidirectional iterators.  Requires partial specialization.
-#if defined ( _STLP_CLASS_PARTIAL_SPECIALIZATION )
-
-#if ! defined (_STLP_INTERNAL_ITERATOR_H)
-_STLP_END_NAMESPACE
-# include <stl/_iterator.h>
-_STLP_BEGIN_NAMESPACE 
-#endif
-
-template <class _BidirectionalIter1, class _BidirectionalIter2,
-  class _BinaryPredicate>
-_BidirectionalIter1
-__find_end(_BidirectionalIter1 __first1, _BidirectionalIter1 __last1,
-           _BidirectionalIter2 __first2, _BidirectionalIter2 __last2,
-           const bidirectional_iterator_tag &, const bidirectional_iterator_tag &, 
-           _BinaryPredicate __comp)
-{
-  typedef reverse_iterator<_BidirectionalIter1> _RevIter1;
-  typedef reverse_iterator<_BidirectionalIter2> _RevIter2;
-
-  _RevIter1 __rlast1(__first1);
-  _RevIter2 __rlast2(__first2);
-  _RevIter1 __rresult = search(_RevIter1(__last1), __rlast1,
-                               _RevIter2(__last2), __rlast2,
-                               __comp);
-
-  if (__rresult == __rlast1)
-    return __last1;
-  else {
-    _BidirectionalIter1 __result = __rresult.base();
-    advance(__result, -distance(__first2, __last2));
-    return __result;
-  }
-}
-#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
-
-template <class _ForwardIter1, class _ForwardIter2, 
-  class _BinaryPredicate>
-_ForwardIter1 
-find_end(_ForwardIter1 __first1, _ForwardIter1 __last1, 
-         _ForwardIter2 __first2, _ForwardIter2 __last2,
-         _BinaryPredicate __comp)
-{
-  _STLP_DEBUG_CHECK(__check_range(__first1, __last1))
-    _STLP_DEBUG_CHECK(__check_range(__first2, __last2))
-    return __find_end(__first1, __last1, __first2, __last2,
-# if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
-		      _STLP_ITERATOR_CATEGORY(__first1, _ForwardIter1),
-		      _STLP_ITERATOR_CATEGORY(__first2, _ForwardIter2),
-# else
-		      forward_iterator_tag(),
-		      forward_iterator_tag(),
-# endif
-		      __comp);
-}
-
-template <class _ForwardIter, class _Tp, class _Compare, class _Distance>
-_ForwardIter __lower_bound(_ForwardIter __first, _ForwardIter __last,
-			   const _Tp& __val, _Compare __comp, _Distance*)
-{
-  _Distance __len = distance(__first, __last);
-  _Distance __half;
-  _ForwardIter __middle;
-
-  while (__len > 0) {
-    __half = __len >> 1;
-    __middle = __first;
-    advance(__middle, __half);
-    if (__comp(*__middle, __val)) {
-      __first = __middle;
-      ++__first;
-      __len = __len - __half - 1;
-    }
-    else
-      __len = __half;
-  }
-  return __first;
-}
-
-_STLP_END_NAMESPACE
-
-#endif /* _STLP_ALGOBASE_C */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_algobase.h b/src/STLport/stl/_algobase.h
deleted file mode 100644
index 822c0df..0000000
--- a/src/STLport/stl/_algobase.h
+++ /dev/null
@@ -1,583 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-
-#ifndef _STLP_INTERNAL_ALGOBASE_H
-#define _STLP_INTERNAL_ALGOBASE_H
-
-# if ! defined (_STLP_CSTDDEF)
-#  include <cstddef>
-# endif
-
-#ifndef _STLP_CSTRING
-# include <cstring>
-#endif
-
-#ifndef _STLP_CLIMITS
-# include <climits>
-#endif
-
-# if ! defined (_STLP_CSTDLIB)
-#  include <cstdlib>
-# endif
-
-# ifndef _STLP_INTERNAL_PAIR_H
-#  include <stl/_pair.h>
-# endif
-
-#ifndef _STLP_INTERNAL_ITERATOR_BASE_H
-# include <stl/_iterator_base.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-// swap and iter_swap
-template <class _Tp>
-inline void swap(_Tp& __a, _Tp& __b) {
-  _Tp __tmp = __a;
-  __a = __b;
-  __b = __tmp;
-}
-
-template <class _ForwardIter1, class _ForwardIter2>
-inline void iter_swap(_ForwardIter1 __i1, _ForwardIter2 __i2) {
-  swap(*__i1, *__i2);
-}
-
-//--------------------------------------------------
-// min and max
-
-# if !defined (__BORLANDC__) || defined (_STLP_USE_OWN_NAMESPACE)
-template <class _Tp>
-inline const _Tp& (min)(const _Tp& __a, const _Tp& __b) { return __b < __a ? __b : __a; }
-template <class _Tp>
-inline const _Tp& (max)(const _Tp& __a, const _Tp& __b) {  return  __a < __b ? __b : __a; }
-#endif /* __BORLANDC__ */
-
-# if defined (__BORLANDC__) && ( __BORLANDC__ < 0x530 || defined (_STLP_USE_OWN_NAMESPACE))
-inline unsigned long (min) (unsigned long __a, unsigned long __b) { return __b < __a ? __b : __a; }
-inline unsigned long (max) (unsigned long __a, unsigned long __b) {  return  __a < __b ? __b : __a; }
-# endif
-
-template <class _Tp, class _Compare>
-inline const _Tp& (min)(const _Tp& __a, const _Tp& __b, _Compare __comp) { 
-  return __comp(__b, __a) ? __b : __a;
-}
-
-template <class _Tp, class _Compare>
-inline const _Tp& (max)(const _Tp& __a, const _Tp& __b, _Compare __comp) {
-  return __comp(__a, __b) ? __b : __a;
-}
-
-//--------------------------------------------------
-// copy
-
-// All of these auxiliary functions serve two purposes.  (1) Replace
-// calls to copy with memmove whenever possible.  (Memmove, not memcpy,
-// because the input and output ranges are permitted to overlap.)
-// (2) If we're using random access iterators, then write the loop as
-// a for loop with an explicit count.
-
-template <class _InputIter, class _OutputIter, class _Distance>
-inline _OutputIter __copy(_InputIter __first, _InputIter __last,
-                          _OutputIter __result,
-                          const input_iterator_tag &, _Distance*) {
-  for ( ; __first != __last; ++__result, ++__first)
-    *__result = *__first;
-  return __result;
-}
-
-# if defined (_STLP_NONTEMPL_BASE_MATCH_BUG) 
-template <class _InputIter, class _OutputIter, class _Distance>
-inline _OutputIter __copy(_InputIter __first, _InputIter __last,
-			  _OutputIter __result, const forward_iterator_tag &, _Distance* ) {
-  for ( ; __first != __last; ++__result, ++__first)
-    *__result = *__first;
-  return __result;
-}
-
-
-template <class _InputIter, class _OutputIter, class _Distance>
-inline _OutputIter __copy(_InputIter __first, _InputIter __last,
-			  _OutputIter __result, const bidirectional_iterator_tag &, _Distance* __dis) {
-  for ( ; __first != __last; ++__result, ++__first)
-    *__result = *__first;
-  return __result;
-}
-# endif 
-
-template <class _RandomAccessIter, class _OutputIter, class _Distance>
-inline _OutputIter
-__copy(_RandomAccessIter __first, _RandomAccessIter __last,
-       _OutputIter __result, const random_access_iterator_tag &, _Distance*) {
-  for (_Distance __n = __last - __first; __n > 0; --__n) {
-    *__result = *__first;
-    ++__first;
-    ++__result;
-  }
-  return __result;
-}
-
-inline void*
-__copy_trivial(const void* __first, const void* __last, void* __result) {
-  return (__last == __first) ? __result : 
-    ((char*)memmove(__result, __first, ((const char*)__last - (const char*)__first))) + 
-    ((const char*)__last - (const char*)__first);
-}
-
-//--------------------------------------------------
-// copy_backward auxiliary functions
-
-template <class _BidirectionalIter1, class _BidirectionalIter2, 
-          class _Distance>
-inline _BidirectionalIter2 __copy_backward(_BidirectionalIter1 __first, 
-                                           _BidirectionalIter1 __last, 
-                                           _BidirectionalIter2 __result,
-                                           const bidirectional_iterator_tag &,
-                                           _Distance*) 
-{
-  while (__first != __last)
-    *--__result = *--__last;
-  return __result;
-}
-
-template <class _RandomAccessIter, class _BidirectionalIter, class _Distance>
-inline _BidirectionalIter __copy_backward(_RandomAccessIter __first, 
-                                          _RandomAccessIter __last, 
-                                          _BidirectionalIter __result,
-                                          const random_access_iterator_tag &,
-                                          _Distance*)
-{
-  for (_Distance __n = __last - __first; __n > 0; --__n)
-    *--__result = *--__last;
-  return __result;
-}
-
-inline void*
-__copy_trivial_backward(const void* __first, const void* __last, void* __result) {
-  const ptrdiff_t _Num = (const char*)__last - (const char*)__first;
-  return (_Num > 0) ? memmove((char*)__result - _Num, __first, _Num) : __result ;
-}
-
-template <class _InputIter, class _OutputIter>
-inline _OutputIter __copy_ptrs(_InputIter __first, _InputIter __last, _OutputIter __result, const __false_type&) {
-  return __copy(__first, __last, __result, 
-                _STLP_ITERATOR_CATEGORY(__first, _InputIter), 
-                _STLP_DISTANCE_TYPE(__first, _InputIter));
-}
-template <class _InputIter, class _OutputIter>
-inline _OutputIter __copy_ptrs(_InputIter __first, _InputIter __last, _OutputIter __result, const __true_type&) {
-// we know they all pointers, so this cast is OK 
-  //  return (_OutputIter)__copy_trivial(&(*__first), &(*__last), &(*__result));
-  return (_OutputIter)__copy_trivial(__first, __last, __result);
-}
-
-template <class _InputIter, class _OutputIter>
-inline _OutputIter __copy_aux(_InputIter __first, _InputIter __last, _OutputIter __result, const __true_type&) {
-  return __copy_ptrs(__first, __last, __result, 
-                     _IsOKToMemCpy(_STLP_VALUE_TYPE(__first, _InputIter), 
-                                   _STLP_VALUE_TYPE(__result, _OutputIter))._Ret());
-}
-
-template <class _InputIter, class _OutputIter>
-inline _OutputIter __copy_aux(_InputIter __first, _InputIter __last, _OutputIter __result, const __false_type&) {
-  return __copy(__first, __last, __result, 
-		_STLP_ITERATOR_CATEGORY(__first, _InputIter), _STLP_DISTANCE_TYPE(__first, _InputIter));
-}
-
-template <class _InputIter, class _OutputIter>
-inline _OutputIter copy(_InputIter __first, _InputIter __last, _OutputIter __result) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-    return __copy_aux(__first, __last, __result, _BothPtrType< _InputIter, _OutputIter> :: _Ret());
-}
-
-template <class _InputIter, class _OutputIter>
-inline _OutputIter __copy_backward_ptrs(_InputIter __first, _InputIter __last, _OutputIter __result, const __false_type&) {
-  return __copy_backward(__first, __last, __result, _STLP_ITERATOR_CATEGORY(__first, _InputIter), _STLP_DISTANCE_TYPE(__first, _InputIter));
-}
-template <class _InputIter, class _OutputIter>
-inline _OutputIter __copy_backward_ptrs(_InputIter __first, _InputIter __last, _OutputIter __result, const __true_type&) {
-  return (_OutputIter)__copy_trivial_backward(__first, __last, __result);  
-}
-
-template <class _InputIter, class _OutputIter>
-inline _OutputIter __copy_backward_aux(_InputIter __first, _InputIter __last, _OutputIter __result, const __false_type&) {
-  return __copy_backward(__first, __last, __result, _STLP_ITERATOR_CATEGORY(__first,_InputIter), _STLP_DISTANCE_TYPE(__first, _InputIter));
-}
-
-template <class _InputIter, class _OutputIter>
-inline _OutputIter __copy_backward_aux(_InputIter __first, _InputIter __last, _OutputIter __result, const __true_type&) {
-  return __copy_backward_ptrs(__first, __last, __result,  
-                              _IsOKToMemCpy(_STLP_VALUE_TYPE(__first, _InputIter), 
-                                            _STLP_VALUE_TYPE(__result, _OutputIter))._Ret());
-}
-
-template <class _InputIter, class _OutputIter>
-inline _OutputIter copy_backward(_InputIter __first, _InputIter __last, _OutputIter __result) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-    return __copy_backward_aux(__first, __last, __result, _BothPtrType< _InputIter, _OutputIter> :: _Ret() );
-}
-
-#if ! defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && ! defined ( _STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS )
-#define _STLP_DECLARE_COPY_TRIVIAL(_Tp)                                \
-inline _Tp* copy(const _Tp* __first, const _Tp* __last, _Tp* __result) \
-{ return (_Tp*)__copy_trivial(__first, __last, __result); } \
-inline _Tp* copy_backward(const _Tp* __first, const _Tp* __last, _Tp* __result) \
-{ return (_Tp*)__copy_trivial_backward(__first, __last, __result); }
-
-_STLP_DECLARE_COPY_TRIVIAL(char)
-# ifndef _STLP_NO_SIGNED_BUILTINS
-_STLP_DECLARE_COPY_TRIVIAL(signed char)
-# endif
-_STLP_DECLARE_COPY_TRIVIAL(unsigned char)
-_STLP_DECLARE_COPY_TRIVIAL(short)
-_STLP_DECLARE_COPY_TRIVIAL(unsigned short)
-_STLP_DECLARE_COPY_TRIVIAL(int)
-_STLP_DECLARE_COPY_TRIVIAL(unsigned int)
-_STLP_DECLARE_COPY_TRIVIAL(long)
-_STLP_DECLARE_COPY_TRIVIAL(unsigned long)
-#if !defined(_STLP_NO_WCHAR_T) && !defined (_STLP_WCHAR_T_IS_USHORT) 
-_STLP_DECLARE_COPY_TRIVIAL(wchar_t)
-#endif
-#ifdef _STLP_LONG_LONG
-_STLP_DECLARE_COPY_TRIVIAL(long long)
-_STLP_DECLARE_COPY_TRIVIAL(unsigned long long)
-#endif 
-_STLP_DECLARE_COPY_TRIVIAL(float)
-_STLP_DECLARE_COPY_TRIVIAL(double)
-# ifndef _STLP_NO_LONG_DOUBLE
-_STLP_DECLARE_COPY_TRIVIAL(long double)
-# endif
-#undef _STLP_DECLARE_COPY_TRIVIAL
-#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
-
-//--------------------------------------------------
-// copy_n (not part of the C++ standard)
-
-template <class _InputIter, class _Size, class _OutputIter>
-_STLP_INLINE_LOOP 
-pair<_InputIter, _OutputIter> __copy_n(_InputIter __first, _Size __count,
-                                       _OutputIter __result,
-                                       const input_iterator_tag &) {
-  for ( ; __count > 0; --__count) {
-    *__result = *__first;
-    ++__first;
-    ++__result;
-  }
-  return pair<_InputIter, _OutputIter>(__first, __result);
-}
-
-template <class _RAIter, class _Size, class _OutputIter>
-inline pair<_RAIter, _OutputIter>
-__copy_n(_RAIter __first, _Size __count,
-         _OutputIter __result,
-         const random_access_iterator_tag &) {
-  _RAIter __last = __first + __count;
-  return pair<_RAIter, _OutputIter>(__last, copy(__first, __last, __result));
-}
-
-template <class _InputIter, class _Size, class _OutputIter>
-inline pair<_InputIter, _OutputIter>
-__copy_n(_InputIter __first, _Size __count, _OutputIter __result) {
-  _STLP_FIX_LITERAL_BUG(__first)
-  return __copy_n(__first, __count, __result, _STLP_ITERATOR_CATEGORY(__first, _InputIter));
-}
-
-template <class _InputIter, class _Size, class _OutputIter>
-inline pair<_InputIter, _OutputIter>
-copy_n(_InputIter __first, _Size __count, _OutputIter __result) {
-  _STLP_FIX_LITERAL_BUG(__first)
-  return __copy_n(__first, __count, __result, _STLP_ITERATOR_CATEGORY(__first, _InputIter));
-}
-
-//--------------------------------------------------
-// fill and fill_n
-
-
-template <class _ForwardIter, class _Tp>
-_STLP_INLINE_LOOP
-void fill(_ForwardIter __first, _ForwardIter __last, const _Tp& __val) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  for ( ; __first != __last; ++__first)
-    *__first = __val;
-}
-
-template <class _OutputIter, class _Size, class _Tp>
-_STLP_INLINE_LOOP
-_OutputIter fill_n(_OutputIter __first, _Size __n, const _Tp& __val) {
-  _STLP_FIX_LITERAL_BUG(__first)
-  for ( ; __n > 0; --__n, ++__first)
-    *__first = __val;
-  return __first;
-}
-
-
-// Specialization: for one-byte types we can use memset.
-
-inline void fill(unsigned char* __first, unsigned char* __last,
-                 const unsigned char& __val) {
-  unsigned char __tmp = __val;
-  memset(__first, __tmp, __last - __first);
-}
-# ifndef _STLP_NO_SIGNED_BUILTINS
-inline void fill(signed char* __first, signed char* __last,
-                 const signed char& __val) {
-  signed char __tmp = __val;
-  memset(__first, __STATIC_CAST(unsigned char,__tmp), __last - __first);
-}
-# endif
-inline void fill(char* __first, char* __last, const char& __val) {
-  char __tmp = __val;
-  memset(__first, __STATIC_CAST(unsigned char,__tmp), __last - __first);
-}
-
-#ifdef _STLP_FUNCTION_TMPL_PARTIAL_ORDER
-
-template <class _Size>
-inline unsigned char* fill_n(unsigned char* __first, _Size __n,
-                             const unsigned char& __val) {
-  fill(__first, __first + __n, __val);
-  return __first + __n;
-}
-
-template <class _Size>
-inline signed char* fill_n(char* __first, _Size __n,
-                           const signed char& __val) {
-  fill(__first, __first + __n, __val);
-  return __first + __n;
-}
-
-template <class _Size>
-inline char* fill_n(char* __first, _Size __n, const char& __val) {
-  fill(__first, __first + __n, __val);
-  return __first + __n;
-}
-
-#endif /* _STLP_FUNCTION_TMPL_PARTIAL_ORDER */
-
-
-//--------------------------------------------------
-// equal and mismatch
-
-template <class _InputIter1, class _InputIter2>
-_STLP_INLINE_LOOP
-pair<_InputIter1, _InputIter2> mismatch(_InputIter1 __first1,
-                                        _InputIter1 __last1,
-                                        _InputIter2 __first2) {
-  _STLP_FIX_LITERAL_BUG(__first2)
-  _STLP_DEBUG_CHECK(__check_range(__first1, __last1))
-  while (__first1 != __last1 && *__first1 == *__first2) {
-    ++__first1;
-    ++__first2;
-  }
-  return pair<_InputIter1, _InputIter2>(__first1, __first2);
-}
-
-template <class _InputIter1, class _InputIter2, class _BinaryPredicate>
-_STLP_INLINE_LOOP
-pair<_InputIter1, _InputIter2> mismatch(_InputIter1 __first1,
-                                        _InputIter1 __last1,
-                                        _InputIter2 __first2,
-                                        _BinaryPredicate __binary_pred) {
-  _STLP_FIX_LITERAL_BUG(__first2)
-  _STLP_DEBUG_CHECK(__check_range(__first1, __last1))
-  while (__first1 != __last1 && __binary_pred(*__first1, *__first2)) {
-    ++__first1;
-    ++__first2;
-  }
-  return pair<_InputIter1, _InputIter2>(__first1, __first2);
-}
-
-template <class _InputIter1, class _InputIter2>
-_STLP_INLINE_LOOP
-bool equal(_InputIter1 __first1, _InputIter1 __last1,
-                  _InputIter2 __first2) {
-  _STLP_FIX_LITERAL_BUG(__first1) _STLP_FIX_LITERAL_BUG(__last1)  _STLP_FIX_LITERAL_BUG(__first2)
-  _STLP_DEBUG_CHECK(__check_range(__first1, __last1))
-  for ( ; __first1 != __last1; ++__first1, ++__first2)
-    if (!(*__first1 == *__first2))
-      return false;
-  return true;
-}
-
-template <class _InputIter1, class _InputIter2, class _BinaryPredicate>
-_STLP_INLINE_LOOP
-bool equal(_InputIter1 __first1, _InputIter1 __last1,
-                  _InputIter2 __first2, _BinaryPredicate __binary_pred) {
-  _STLP_FIX_LITERAL_BUG(__first2)
-  _STLP_DEBUG_CHECK(__check_range(__first1, __last1))
-  for ( ; __first1 != __last1; ++__first1, ++__first2)
-    if (!__binary_pred(*__first1, *__first2))
-      return false;
-  return true;
-}
-
-//--------------------------------------------------
-// lexicographical_compare and lexicographical_compare_3way.
-// (the latter is not part of the C++ standard.)
-
-template <class _InputIter1, class _InputIter2>
-bool lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1,
-                             _InputIter2 __first2, _InputIter2 __last2);
-
-template <class _InputIter1, class _InputIter2, class _Compare>
-bool lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1,
-                             _InputIter2 __first2, _InputIter2 __last2,
-                             _Compare __comp);
-
-inline bool 
-lexicographical_compare(const unsigned char* __first1,
-                        const unsigned char* __last1,
-                        const unsigned char* __first2,
-                        const unsigned char* __last2)
-{
-  const size_t __len1 = __last1 - __first1;
-  const size_t __len2 = __last2 - __first2;
-  _STLP_DEBUG_CHECK(__check_range(__first1, __last1))
-  _STLP_DEBUG_CHECK(__check_range(__first2, __last2))
-
-  const int __result = memcmp(__first1, __first2, (min) (__len1, __len2));
-  return __result != 0 ? (__result < 0) : (__len1 < __len2);
-}
-
-
-# if !(CHAR_MAX == SCHAR_MAX)
-inline bool lexicographical_compare(const char* __first1, const char* __last1,
-                                    const char* __first2, const char* __last2)
-{
-  _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) 
-  _STLP_DEBUG_CHECK(__check_range(__first2, __last2))
-
-  return lexicographical_compare((const unsigned char*) __first1,
-                                 (const unsigned char*) __last1,
-                                 (const unsigned char*) __first2,
-                                 (const unsigned char*) __last2);
-}
-#endif /* CHAR_MAX == SCHAR_MAX */
-
-template <class _InputIter1, class _InputIter2>
-int __lexicographical_compare_3way(_InputIter1 __first1, _InputIter1 __last1,
-                                   _InputIter2 __first2, _InputIter2 __last2);
-
-inline int
-__lexicographical_compare_3way(const unsigned char* __first1,
-                               const unsigned char* __last1,
-                               const unsigned char* __first2,
-                               const unsigned char* __last2)
-{
-  const ptrdiff_t __len1 = __last1 - __first1;
-  const ptrdiff_t __len2 = __last2 - __first2;
-  const int __result = memcmp(__first1, __first2, (min) (__len1, __len2));
-  return __result != 0 ? __result 
-                       : (__len1 == __len2 ? 0 : (__len1 < __len2 ? -1 : 1));
-}
-
-
-# if !(CHAR_MAX == SCHAR_MAX)
-inline int 
-__lexicographical_compare_3way(const char* __first1, const char* __last1,
-                               const char* __first2, const char* __last2)
-{
-  return __lexicographical_compare_3way((const unsigned char*) __first1,
-                                        (const unsigned char*) __last1,
-                                        (const unsigned char*) __first2,
-                                        (const unsigned char*) __last2);
-}
-# endif
-
-# ifndef _STLP_NO_EXTENSIONS
-
-template <class _InputIter1, class _InputIter2>
-int lexicographical_compare_3way(_InputIter1 __first1, _InputIter1 __last1,
-                                 _InputIter2 __first2, _InputIter2 __last2);
-
-# endif /* EXTENSIONS */
-
-// count
-template <class _InputIter, class _Tp>
-_STLP_INLINE_LOOP _STLP_DIFFERENCE_TYPE(_InputIter)
-count(_InputIter __first, _InputIter __last, const _Tp& __val) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  _STLP_DIFFERENCE_TYPE(_InputIter) __n = 0;
-  for ( ; __first != __last; ++__first)
-    if (*__first == __val)
-      ++__n;
-  return __n;
-}
-
-// find and find_if. Note find may be expressed in terms of find_if if appropriate binder was available.
-template <class _InputIter, class _Tp>
-_InputIter find(_InputIter __first, _InputIter __last, const _Tp& __val);
-template <class _InputIter, class _Predicate>
-_InputIter find_if(_InputIter __first, _InputIter __last, _Predicate __pred);
-
-// search.
-template <class _ForwardIter1, class _ForwardIter2, class _BinaryPred>
-_ForwardIter1 search(_ForwardIter1 __first1, _ForwardIter1 __last1,
-                     _ForwardIter2 __first2, _ForwardIter2 __last2, _BinaryPred  __predicate);
-
-// find_first_of
-template <class _InputIter, class _ForwardIter, class _BinaryPredicate>
-_InputIter __find_first_of(_InputIter __first1, _InputIter __last1,
-                           _ForwardIter __first2, _ForwardIter __last2,
-                           _BinaryPredicate __comp);
-
-template <class _ForwardIter1, class _ForwardIter2, 
-          class _BinaryPredicate>
-_ForwardIter1 
-find_end(_ForwardIter1 __first1, _ForwardIter1 __last1, 
-         _ForwardIter2 __first2, _ForwardIter2 __last2,
-         _BinaryPredicate __comp);
-
-// replace
-template <class _ForwardIter, class _Tp>
-_STLP_INLINE_LOOP void 
-replace(_ForwardIter __first, _ForwardIter __last,
-        const _Tp& __old_value, const _Tp& __new_value) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  for ( ; __first != __last; ++__first)
-    if (*__first == __old_value)
-      *__first = __new_value;
-}
-
-template <class _ForwardIter, class _Tp, class _Compare, class _Distance>
-_ForwardIter __lower_bound(_ForwardIter __first, _ForwardIter __last,
-                              const _Tp& __val, _Compare __comp, _Distance*);
-
-_STLP_END_NAMESPACE
-
-# if !defined (_STLP_LINK_TIME_INSTANTIATION)
-#  include <stl/_algobase.c>
-# endif
-
-#endif /* _STLP_INTERNAL_ALGOBASE_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/stl/_alloc.c b/src/STLport/stl/_alloc.c
deleted file mode 100644
index c444034..0000000
--- a/src/STLport/stl/_alloc.c
+++ /dev/null
@@ -1,370 +0,0 @@
-/*
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-#ifndef _STLP_ALLOC_C
-#define _STLP_ALLOC_C
-
-#ifdef __WATCOMC__
-#pragma warning 13 9
-#pragma warning 367 9
-#pragma warning 368 9
-#endif
-
-#ifndef _STLP_INTERNAL_ALLOC_H
-#  include <stl/_alloc.h>
-#endif
-
-# if defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION)
-
-# ifdef _STLP_SGI_THREADS
-  // We test whether threads are in use before locking.
-  // Perhaps this should be moved into stl_threads.h, but that
-  // probably makes it harder to avoid the procedure call when
-  // it isn't needed.
-    extern "C" {
-      extern int __us_rsthread_malloc;
-    }
-# endif
-
-
-// Specialised debug form of malloc which does not provide "false"
-// memory leaks when run with debug CRT libraries.
-#if defined(_STLP_MSVC) && (_STLP_MSVC>=1020 && defined(_STLP_DEBUG_ALLOC)) && ! defined (_STLP_WINCE)
-#  include <crtdbg.h>
-inline void* __stlp_chunk_malloc(size_t __bytes) { _STLP_CHECK_NULL_ALLOC(_malloc_dbg(__bytes, _CRT_BLOCK, __FILE__, __LINE__)); }
-#else	// !_DEBUG
-# ifdef _STLP_NODE_ALLOC_USE_MALLOC
-#  include <cstdlib>
-inline void* __stlp_chunk_malloc(size_t __bytes) { _STLP_CHECK_NULL_ALLOC(_STLP_VENDOR_CSTD::malloc(__bytes)); }
-# else
-inline void* __stlp_chunk_malloc(size_t __bytes) { return _STLP_STD::__stl_new(__bytes); }
-# endif
-#endif	// !_DEBUG
-
-
-#define _S_FREELIST_INDEX(__bytes) ((__bytes-size_t(1))>>(int)_ALIGN_SHIFT)
-
-_STLP_BEGIN_NAMESPACE
-
-template <int __inst>
-void *  _STLP_CALL __malloc_alloc<__inst>::_S_oom_malloc(size_t __n)
-{
-  __oom_handler_type __my_malloc_handler;
-  void * __result;
-
-  for (;;) {
-    __my_malloc_handler = __oom_handler;
-    if (0 == __my_malloc_handler) { __THROW_BAD_ALLOC; }
-    (*__my_malloc_handler)();
-    __result = malloc(__n);
-    if (__result) return(__result);
-  }
-#if defined(_STLP_NEED_UNREACHABLE_RETURN)
-  return 0;
-#endif
-
-}
-
-template <class _Alloc>
-void *  _STLP_CALL __debug_alloc<_Alloc>::allocate(size_t __n) {
-  size_t __real_n = __n + __extra_before_chunk() + __extra_after_chunk();
-  __alloc_header *__result = (__alloc_header *)__allocator_type::allocate(__real_n);
-  memset((char*)__result, __shred_byte, __real_n*sizeof(value_type));
-  __result->__magic = __magic;
-  __result->__type_size = sizeof(value_type);
-  __result->_M_size = (_STLP_UINT32_T)__n;
-  return ((char*)__result) + (long)__extra_before;
-}
-
-template <class _Alloc>
-void  _STLP_CALL
-__debug_alloc<_Alloc>::deallocate(void *__p, size_t __n) {
-  __alloc_header * __real_p = (__alloc_header*)((char *)__p -(long)__extra_before);
-  // check integrity
-  _STLP_VERBOSE_ASSERT(__real_p->__magic != __deleted_magic, _StlMsg_DBA_DELETED_TWICE)
-  _STLP_VERBOSE_ASSERT(__real_p->__magic == __magic, _StlMsg_DBA_NEVER_ALLOCATED)
-  _STLP_VERBOSE_ASSERT(__real_p->__type_size == 1,_StlMsg_DBA_TYPE_MISMATCH)
-  _STLP_VERBOSE_ASSERT(__real_p->_M_size == __n, _StlMsg_DBA_SIZE_MISMATCH)
-  // check pads on both sides
-  unsigned char* __tmp;
-  for (__tmp= (unsigned char*)(__real_p+1); __tmp < (unsigned char*)__p; __tmp++) {  
-    _STLP_VERBOSE_ASSERT(*__tmp==__shred_byte, _StlMsg_DBA_UNDERRUN)
-      }
-  
-  size_t __real_n= __n + __extra_before_chunk() + __extra_after_chunk();
-  
-  for (__tmp= ((unsigned char*)__p)+__n*sizeof(value_type); 
-       __tmp < ((unsigned char*)__real_p)+__real_n ; __tmp++) {
-    _STLP_VERBOSE_ASSERT(*__tmp==__shred_byte, _StlMsg_DBA_OVERRUN)
-      }
-  
-  // that may be unfortunate, just in case
-  __real_p->__magic=__deleted_magic;
-  memset((char*)__p, __shred_byte, __n*sizeof(value_type));
-  __allocator_type::deallocate(__real_p, __real_n);
-}
-
-// # ifdef _STLP_THREADS
-
-template <bool __threads, int __inst>
-class _Node_Alloc_Lock {
-public:
-  _Node_Alloc_Lock() { 
-    
-#  ifdef _STLP_SGI_THREADS
-    if (__threads && __us_rsthread_malloc)
-#  else /* !_STLP_SGI_THREADS */
-      if (__threads) 
-#  endif
-    	_S_lock._M_acquire_lock(); 
-  }
-  
-  ~_Node_Alloc_Lock() {
-#  ifdef _STLP_SGI_THREADS
-    if (__threads && __us_rsthread_malloc)
-#  else /* !_STLP_SGI_THREADS */
-      if (__threads)
-#  endif
-        _S_lock._M_release_lock(); 
-  }
-  
-  static _STLP_STATIC_MUTEX _S_lock;
-};
-
-// # endif  /* _STLP_THREADS */
-
-
-template <bool __threads, int __inst>
-void* _STLP_CALL
-__node_alloc<__threads, __inst>::_M_allocate(size_t __n) {
-  void*  __r;
-  _Obj * _STLP_VOLATILE * __my_free_list = _S_free_list + _S_FREELIST_INDEX(__n);
-  // #       ifdef _STLP_THREADS
-  /*REFERENCED*/
-  _Node_Alloc_Lock<__threads, __inst> __lock_instance;
-  // #       endif
-  // Acquire the lock here with a constructor call.
-  // This ensures that it is released in exit or during stack
-  // unwinding.
-  if ( (__r  = *__my_free_list) != 0 ) {
-    *__my_free_list = ((_Obj*)__r) -> _M_free_list_link;
-  } else {
-    __r = _S_refill(__n);
-  }
-  // lock is released here
-  return __r;
-}
-
-template <bool __threads, int __inst>
-void _STLP_CALL
-__node_alloc<__threads, __inst>::_M_deallocate(void *__p, size_t __n) {
-  _Obj * _STLP_VOLATILE * __my_free_list = _S_free_list + _S_FREELIST_INDEX(__n);
-  // #       ifdef _STLP_THREADS
-  /*REFERENCED*/
-  _Node_Alloc_Lock<__threads, __inst> __lock_instance;
-  // #       endif /* _STLP_THREADS */
-  // acquire lock
-  ((_Obj *)__p) -> _M_free_list_link = *__my_free_list;
-  *__my_free_list = (_Obj *)__p;
-  // lock is released here
-}
-
-/* We allocate memory in large chunks in order to avoid fragmenting     */
-/* the malloc heap too much.                                            */
-/* We assume that size is properly aligned.                             */
-/* We hold the allocation lock.                                         */
-template <bool __threads, int __inst>
-char* _STLP_CALL
-__node_alloc<__threads, __inst>::_S_chunk_alloc(size_t _p_size, 
-						int& __nobjs)
-{
-  char* __result;
-  size_t __total_bytes = _p_size * __nobjs;
-  size_t __bytes_left = _S_end_free - _S_start_free;
-
-  if (__bytes_left >= __total_bytes) {
-    __result = _S_start_free;
-    _S_start_free += __total_bytes;
-    return(__result);
-  } else if (__bytes_left >= _p_size) {
-    __nobjs = (int)(__bytes_left/_p_size);
-    __total_bytes = _p_size * __nobjs;
-    __result = _S_start_free;
-    _S_start_free += __total_bytes;
-    return(__result);
-  } else {
-    size_t __bytes_to_get = 
-      2 * __total_bytes + _S_round_up(_S_heap_size >> 4);
-    // Try to make use of the left-over piece.
-    if (__bytes_left > 0) {
-      _Obj* _STLP_VOLATILE* __my_free_list =
-	_S_free_list + _S_FREELIST_INDEX(__bytes_left);
-
-      ((_Obj*)_S_start_free) -> _M_free_list_link = *__my_free_list;
-      *__my_free_list = (_Obj*)_S_start_free;
-    }
-    _S_start_free = (char*)__stlp_chunk_malloc(__bytes_to_get);
-    if (0 == _S_start_free) {
-      size_t __i;
-      _Obj* _STLP_VOLATILE* __my_free_list;
-      _Obj* __p;
-      // Try to make do with what we have.  That can't
-      // hurt.  We do not try smaller requests, since that tends
-      // to result in disaster on multi-process machines.
-      for (__i = _p_size; __i <= (size_t)_MAX_BYTES; __i += (size_t)_ALIGN) {
-	__my_free_list = _S_free_list + _S_FREELIST_INDEX(__i);
-	__p = *__my_free_list;
-	if (0 != __p) {
-	  *__my_free_list = __p -> _M_free_list_link;
-	  _S_start_free = (char*)__p;
-	  _S_end_free = _S_start_free + __i;
-	  return(_S_chunk_alloc(_p_size, __nobjs));
-	  // Any leftover piece will eventually make it to the
-	  // right free list.
-	}
-      }
-      _S_end_free = 0;	// In case of exception.
-      _S_start_free = (char*)__stlp_chunk_malloc(__bytes_to_get);
-    /*
-      (char*)malloc_alloc::allocate(__bytes_to_get);
-      */
-
-      // This should either throw an
-      // exception or remedy the situation.  Thus we assume it
-      // succeeded.
-    }
-    _S_heap_size += __bytes_to_get;
-    _S_end_free = _S_start_free + __bytes_to_get;
-    return(_S_chunk_alloc(_p_size, __nobjs));
-  }
-}
-
-
-/* Returns an object of size __n, and optionally adds to size __n free list.*/
-/* We assume that __n is properly aligned.                                */
-/* We hold the allocation lock.                                         */
-template <bool __threads, int __inst>
-void* _STLP_CALL
-__node_alloc<__threads, __inst>::_S_refill(size_t __n)
-{
-  int __nobjs = 20;
-  __n = _S_round_up(__n);
-  char* __chunk = _S_chunk_alloc(__n, __nobjs);
-  _Obj* _STLP_VOLATILE* __my_free_list;
-  _Obj* __result;
-  _Obj* __current_obj;
-  _Obj* __next_obj;
-  int __i;
-
-  if (1 == __nobjs) return(__chunk);
-  __my_free_list = _S_free_list + _S_FREELIST_INDEX(__n);
-
-  /* Build free list in chunk */
-  __result = (_Obj*)__chunk;
-  *__my_free_list = __next_obj = (_Obj*)(__chunk + __n);
-  for (__i = 1; ; __i++) {
-    __current_obj = __next_obj;
-    __next_obj = (_Obj*)((char*)__next_obj + __n);
-    if (__nobjs - 1 == __i) {
-      __current_obj -> _M_free_list_link = 0;
-      break;
-    } else {
-      __current_obj -> _M_free_list_link = __next_obj;
-    }
-  }
-  return(__result);
-}
-
-# if ( _STLP_STATIC_TEMPLATE_DATA > 0 )
-// malloc_alloc out-of-memory handling
-template <int __inst>
-__oom_handler_type __malloc_alloc<__inst>::__oom_handler=(__oom_handler_type)0 ;
-
-// #ifdef _STLP_THREADS
-    template <bool __threads, int __inst>
-    _STLP_STATIC_MUTEX
-    _Node_Alloc_Lock<__threads, __inst>::_S_lock _STLP_MUTEX_INITIALIZER;
-// #endif
-
-template <bool __threads, int __inst>
-_Node_alloc_obj * _STLP_VOLATILE
-__node_alloc<__threads, __inst>::_S_free_list[_STLP_NFREELISTS]
-= {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
-// The 16 zeros are necessary to make version 4.1 of the SunPro
-// compiler happy.  Otherwise it appears to allocate too little
-// space for the array.
-
-template <bool __threads, int __inst>
-char *__node_alloc<__threads, __inst>::_S_start_free = 0;
-
-template <bool __threads, int __inst>
-char *__node_alloc<__threads, __inst>::_S_end_free = 0;
-
-template <bool __threads, int __inst>
-size_t __node_alloc<__threads, __inst>::_S_heap_size = 0;
-
-
-# else /* ( _STLP_STATIC_TEMPLATE_DATA > 0 ) */
-
-__DECLARE_INSTANCE(__oom_handler_type, __malloc_alloc<0>::__oom_handler, =0);
-
-# define _STLP_ALLOC_NOTHREADS __node_alloc<false, 0>
-# define _STLP_ALLOC_THREADS   __node_alloc<true, 0>
-# define _STLP_ALLOC_NOTHREADS_LOCK _Node_Alloc_Lock<false, 0>
-# define _STLP_ALLOC_THREADS_LOCK   _Node_Alloc_Lock<true, 0>
-
-__DECLARE_INSTANCE(char *, _STLP_ALLOC_NOTHREADS::_S_start_free,=0);
-__DECLARE_INSTANCE(char *, _STLP_ALLOC_NOTHREADS::_S_end_free,=0);
-__DECLARE_INSTANCE(size_t, _STLP_ALLOC_NOTHREADS::_S_heap_size,=0);
-__DECLARE_INSTANCE(_Node_alloc_obj * _STLP_VOLATILE,
-                   _STLP_ALLOC_NOTHREADS::_S_free_list[_STLP_NFREELISTS],
-                   ={0});
-__DECLARE_INSTANCE(char *, _STLP_ALLOC_THREADS::_S_start_free,=0);
-__DECLARE_INSTANCE(char *, _STLP_ALLOC_THREADS::_S_end_free,=0);
-__DECLARE_INSTANCE(size_t, _STLP_ALLOC_THREADS::_S_heap_size,=0);
-__DECLARE_INSTANCE(_Node_alloc_obj * _STLP_VOLATILE,
-                   _STLP_ALLOC_THREADS::_S_free_list[_STLP_NFREELISTS],
-                   ={0});
-// #   ifdef _STLP_THREADS
-__DECLARE_INSTANCE(_STLP_STATIC_MUTEX,
-                   _STLP_ALLOC_NOTHREADS_LOCK::_S_lock,
-                   _STLP_MUTEX_INITIALIZER);
-__DECLARE_INSTANCE(_STLP_STATIC_MUTEX,
-                   _STLP_ALLOC_THREADS_LOCK::_S_lock,
-                   _STLP_MUTEX_INITIALIZER);
-// #   endif
-
-# undef _STLP_ALLOC_THREADS
-# undef _STLP_ALLOC_NOTHREADS
-
-#  endif /* _STLP_STATIC_TEMPLATE_DATA */
-
-_STLP_END_NAMESPACE
-
-# undef _S_FREELIST_INDEX
-
-# endif /* _STLP_EXPOSE_GLOBALS_IMPLEMENTATION */
-
-#endif /*  _STLP_ALLOC_C */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_alloc.h b/src/STLport/stl/_alloc.h
deleted file mode 100644
index 5018754..0000000
--- a/src/STLport/stl/_alloc.h
+++ /dev/null
@@ -1,531 +0,0 @@
-/*
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_ALLOC_H
-#define _STLP_INTERNAL_ALLOC_H
-
-# ifndef _STLP_CSTDDEF
-#  include <cstddef>
-# endif
-
-#if !defined (_STLP_DEBUG_H) && (defined  (_STLP_DEBUG) || defined (_STLP_ASSERTIONS))
-# include <stl/debug/_debug.h>
-#endif
-
-# ifndef _STLP_CSTDLIB
-#  include <cstdlib>
-# endif
-# ifndef _STLP_CSTRING
-#  include <cstring>
-# endif
-
-# ifndef __THROW_BAD_ALLOC
-#  if !defined(_STLP_USE_EXCEPTIONS)
-#   if !defined (_STLP_CSTDIO)
-#    include <cstdio>
-#   endif
-#   if !defined (_STLP_CSTDLIB)
-#    include <cstdlib>
-#   endif
-#   define __THROW_BAD_ALLOC puts("out of memory\n"); exit(1)
-#  else /* !defined(_STLP_USE_EXCEPTIONS) */
-#   define __THROW_BAD_ALLOC throw _STLP_STD::bad_alloc()
-#  endif /* !defined(_STLP_USE_EXCEPTIONS) */
-# endif   /* __THROW_BAD_ALLOC */
-
-# ifndef _STLP_INTERNAL_NEW_HEADER
-#  include <stl/_new.h>
-# endif
-
-#if /* defined (_STLP_THREADS) && */ ! defined (_STLP_INTERNAL_THREADS_H)
-# include <stl/_threads.h>
-#endif
-
-#ifndef _STLP_INTERNAL_CONSTRUCT_H
-# include <stl/_construct.h>
-#endif
-
-#ifndef __ALLOC
-#   define __ALLOC __sgi_alloc
-#endif
-
-# ifndef __RESTRICT
-#  define __RESTRICT
-# endif
-
-#if defined (_STLP_THREADS) || (defined(_STLP_OWN_IOSTREAMS) && ! defined (_STLP_NO_THREADS) && ! defined (_NOTHREADS) )
-# define _STLP_NODE_ALLOCATOR_THREADS true
-#else
-# define _STLP_NODE_ALLOCATOR_THREADS false
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-# if defined (_STLP_USE_RAW_SGI_ALLOCATORS)
-template <class _Tp, class _Alloc> struct __allocator;
-# endif
-
-// Malloc-based allocator.  Typically slower than default alloc below.
-// Typically thread-safe and more storage efficient.
-
-typedef void (* __oom_handler_type)();
-
-template <int __inst>
-class __malloc_alloc {
-private:
-  static void* _STLP_CALL _S_oom_malloc(size_t);
-  static __oom_handler_type __oom_handler;
-public:
-  // this one is needed for proper simple_alloc wrapping
-  typedef char value_type;
-# if defined (_STLP_MEMBER_TEMPLATE_CLASSES) && defined (_STLP_USE_RAW_SGI_ALLOCATORS)
-  template <class _Tp1> struct rebind {
-    typedef __allocator<_Tp1, __malloc_alloc<__inst> > other;
-  };
-# endif
-  static void* _STLP_CALL allocate(size_t __n)    {
-    void* __result = malloc(__n);
-    if (0 == __result) __result = _S_oom_malloc(__n);
-    return __result;
-  }
-  static void _STLP_CALL deallocate(void* __p, size_t /* __n */) { free((char*)__p); }
-  static __oom_handler_type _STLP_CALL set_malloc_handler(__oom_handler_type __f) {
-    __oom_handler_type __old = __oom_handler;
-    __oom_handler = __f;
-    return(__old);
-  }
-};
-
-
-// New-based allocator.  Typically slower than default alloc below.
-// Typically thread-safe and more storage efficient.
-class _STLP_CLASS_DECLSPEC __new_alloc {
-public:
-  // this one is needed for proper simple_alloc wrapping
-  typedef char value_type;
-# if defined (_STLP_MEMBER_TEMPLATE_CLASSES) &&  defined(_STLP_USE_RAW_SGI_ALLOCATORS)
-  template <class _Tp1> struct rebind {
-    typedef __allocator<_Tp1, __new_alloc > other;
-  };
-# endif
-  static void* _STLP_CALL  allocate(size_t __n) {  return __stl_new(__n); }
-  static void _STLP_CALL deallocate(void* __p, size_t) { __stl_delete(__p); }
-};
-
-
-// Allocator adaptor to check size arguments for debugging.
-// Reports errors using assert.  Checking can be disabled with
-// NDEBUG, but it's far better to just use the underlying allocator
-// instead when no checking is desired.
-// There is some evidence that this can confuse Purify.
-// This adaptor can only be applied to raw allocators
-
-template <class _Alloc>
-class __debug_alloc : public _Alloc {
-public:
-  typedef _Alloc __allocator_type;
-  typedef typename _Alloc::value_type value_type;
-private:
-  struct __alloc_header {
-    size_t __magic: 16;
-    size_t __type_size:16;
-    _STLP_UINT32_T _M_size;
-  }; // that is 8 bytes for sure
-  // Sunpro CC has bug on enums, so extra_before/after set explicitly
-  enum { __pad=8, __magic=0xdeba, __deleted_magic = 0xdebd,
-	 __shred_byte= _STLP_SHRED_BYTE
-  };
-
-  enum { __extra_before = 16, __extra_after = 8 };
-  // Size of space used to store size.  Note
-  // that this must be large enough to preserve
-  // alignment.
-  static size_t _STLP_CALL __extra_before_chunk() {
-    return (long)__extra_before/sizeof(value_type)+
-      (size_t)((long)__extra_before%sizeof(value_type)>0);
-  }
-  static size_t _STLP_CALL __extra_after_chunk() {
-    return (long)__extra_after/sizeof(value_type)+
-      (size_t)((long)__extra_after%sizeof(value_type)>0);
-  }
-public:
-# if defined (_STLP_MEMBER_TEMPLATE_CLASSES) && defined (_STLP_USE_RAW_SGI_ALLOCATORS)
-  template <class _Tp1> struct rebind {
-    typedef __allocator< _Tp1, __debug_alloc<_Alloc> > other;
-  };
-# endif
-  __debug_alloc() {}
-  ~__debug_alloc() {}
-  static void * _STLP_CALL allocate(size_t);
-  static void _STLP_CALL deallocate(void *, size_t);
-};
-
-
-// Default node allocator.
-// With a reasonable compiler, this should be roughly as fast as the
-// original STL class-specific allocators, but with less fragmentation.
-// Default_alloc_template parameters are experimental and MAY
-// DISAPPEAR in the future.  Clients should just use alloc for now.
-//
-// Important implementation properties:
-// 1. If the client request an object of size > _MAX_BYTES, the resulting
-//    object will be obtained directly from malloc.
-// 2. In all other cases, we allocate an object of size exactly
-//    _S_round_up(requested_size).  Thus the client has enough size
-//    information that we can return the object to the proper free list
-//    without permanently losing part of the object.
-//
-
-// The first template parameter specifies whether more than one thread
-// may use this allocator.  It is safe to allocate an object from
-// one instance of a default_alloc and deallocate it with another
-// one.  This effectively transfers its ownership to the second one.
-// This may have undesirable effects on reference locality.
-// The second parameter is unreferenced and serves only to allow the
-// creation of multiple default_alloc instances.
-
-# if defined(__OS400__)
-enum {_ALIGN = 16, _ALIGN_SHIFT=4, _MAX_BYTES = 256};
-#  define  _STLP_NFREELISTS 16
-# else
-enum {_ALIGN = 8, _ALIGN_SHIFT=3, _MAX_BYTES = 128};
-#  define  _STLP_NFREELISTS 16
-# endif /* __OS400__ */
-
-class _STLP_CLASS_DECLSPEC _Node_alloc_obj {
-public:
-    _Node_alloc_obj * _M_free_list_link;
-};
-
-template <bool __threads, int __inst>
-class __node_alloc {
-  _STLP_PRIVATE:
-  static inline size_t _STLP_CALL _S_round_up(size_t __bytes) { return (((__bytes) + (size_t)_ALIGN-1) & ~((size_t)_ALIGN - 1)); }
-  typedef _Node_alloc_obj _Obj;
-private:
-  // Returns an object of size __n, and optionally adds to size __n free list.
-  static void*  _STLP_CALL _S_refill(size_t __n);
-  // Allocates a chunk for nobjs of size size.  nobjs may be reduced
-  // if it is inconvenient to allocate the requested number.
-  static char*  _STLP_CALL _S_chunk_alloc(size_t __p_size, int& __nobjs);
-  // Chunk allocation state.
-  static _Node_alloc_obj * _STLP_VOLATILE _S_free_list[_STLP_NFREELISTS]; 
-  static char* _S_start_free;
-  static char* _S_end_free;
-  static size_t _S_heap_size;
-  static void * _STLP_CALL _M_allocate(size_t __n);
-  /* __p may not be 0 */
-  static void _STLP_CALL _M_deallocate(void *__p, size_t __n);
-public:
-  // this one is needed for proper simple_alloc wrapping
-  typedef char value_type;
-# if defined (_STLP_MEMBER_TEMPLATE_CLASSES) && defined (_STLP_USE_RAW_SGI_ALLOCATORS)
-  template <class _Tp1> struct rebind {
-    typedef __allocator<_Tp1, __node_alloc<__threads, __inst> > other;
-  };
-# endif
-  /* __n must be > 0      */
-  static void * _STLP_CALL allocate(size_t __n) { return (__n > (size_t)_MAX_BYTES) ?  __stl_new(__n) : _M_allocate(__n); }
-  /* __p may not be 0 */
-  static void _STLP_CALL deallocate(void *__p, size_t __n) { if (__n > (size_t)_MAX_BYTES) __stl_delete(__p); else _M_deallocate(__p, __n); }
-};
-
-# if defined (_STLP_USE_TEMPLATE_EXPORT)
-_STLP_EXPORT_TEMPLATE_CLASS __malloc_alloc<0>;
-_STLP_EXPORT_TEMPLATE_CLASS __node_alloc<_STLP_NODE_ALLOCATOR_THREADS, 0>;
-# endif /* _STLP_USE_TEMPLATE_EXPORT */
-typedef __node_alloc<_STLP_NODE_ALLOCATOR_THREADS, 0> _Node_alloc;
-# if defined (_STLP_USE_TEMPLATE_EXPORT)
-_STLP_EXPORT_TEMPLATE_CLASS __debug_alloc<_Node_alloc>;
-_STLP_EXPORT_TEMPLATE_CLASS __debug_alloc<__new_alloc>;
-_STLP_EXPORT_TEMPLATE_CLASS __debug_alloc<__malloc_alloc<0> >;
-# endif
-
-# if defined (_STLP_USE_PERTHREAD_ALLOC)
-
-_STLP_END_NAMESPACE
-// include additional header here
-# include <stl/_pthread_alloc.h>
-_STLP_BEGIN_NAMESPACE
-
-#  if defined ( _STLP_DEBUG_ALLOC )
-typedef __debug_alloc<__pthread_alloc> __sgi_alloc;
-#  else
-typedef __pthread_alloc __sgi_alloc;
-#  endif /* _STLP_DEBUG_ALLOC */
-
-typedef __pthread_alloc __single_client_alloc;
-typedef __pthread_alloc __multithreaded_alloc;
-
-# else
-
-# if defined ( _STLP_USE_NEWALLOC )
-
-#  if defined ( _STLP_DEBUG_ALLOC )
-typedef __debug_alloc<__new_alloc> __sgi_alloc;
-#  else
-typedef __new_alloc __sgi_alloc;
-#  endif /* _STLP_DEBUG_ALLOC */
-
-typedef __new_alloc __single_client_alloc;
-typedef __new_alloc __multithreaded_alloc;
-
-#  elif defined (_STLP_USE_MALLOC)
-
-#   if defined ( _STLP_DEBUG_ALLOC )
-typedef __debug_alloc<__malloc_alloc<0> > __sgi_alloc;
-#   else
-typedef __malloc_alloc<0> __sgi_alloc;
-#   endif /* _STLP_DEBUG_ALLOC */
-
-typedef __malloc_alloc<0> __single_client_alloc;
-typedef __malloc_alloc<0> __multithreaded_alloc;
-
-# else
-
-#   if defined ( _STLP_DEBUG_ALLOC )
-typedef __debug_alloc<_Node_alloc> __sgi_alloc;
-#   else
-typedef _Node_alloc __sgi_alloc;
-#   endif
-
-typedef __node_alloc<false, 0> __single_client_alloc;
-typedef __node_alloc<true, 0>  __multithreaded_alloc;
-
-#  endif /* _STLP_USE_NEWALLOC */
-# endif /* PTHREAD_ALLOC */
-
-// This implements allocators as specified in the C++ standard.  
-//
-// Note that standard-conforming allocators use many language features
-// that are not yet widely implemented.  In particular, they rely on
-// member templates, partial specialization, partial ordering of function
-// templates, the typename keyword, and the use of the template keyword
-// to refer to a template member of a dependent type.
-
-template <class _Tp>
-class allocator {
-public:
-
-  typedef _Tp        value_type;
-  typedef value_type *       pointer;
-  typedef const _Tp* const_pointer;
-  typedef _Tp&       reference;
-  typedef const _Tp& const_reference;
-  typedef size_t     size_type;
-  typedef ptrdiff_t  difference_type;
-# if defined (_STLP_MEMBER_TEMPLATE_CLASSES)
-  template <class _Tp1> struct rebind {
-    typedef allocator<_Tp1> other;
-  };
-# endif
-  allocator() _STLP_NOTHROW {}
- # if defined (_STLP_MEMBER_TEMPLATES)
-  template <class _Tp1> allocator(const allocator<_Tp1>&) _STLP_NOTHROW {}
- # endif    
-  allocator(const allocator<_Tp>&) _STLP_NOTHROW {}
-  ~allocator() _STLP_NOTHROW {}
-  pointer address(reference __x) const { return &__x; }
-  const_pointer address(const_reference __x) const { return &__x; }
-  // __n is permitted to be 0.  The C++ standard says nothing about what the return value is when __n == 0.
-  _Tp* allocate(size_type __n, const void* = 0) { 
-    return __n != 0 ? __REINTERPRET_CAST(value_type*,__sgi_alloc::allocate(__n * sizeof(value_type))) : 0;
-  }
-  // __p is permitted to be a null pointer, only if n==0.
-  void deallocate(pointer __p, size_type __n) {
-    _STLP_ASSERT( (__p == 0) == (__n == 0) )
-      if (__p != 0) __sgi_alloc::deallocate((void*)__p, __n * sizeof(value_type));
-  }
-  // backwards compatibility
-  void deallocate(pointer __p) const {  if (__p != 0) __sgi_alloc::deallocate((void*)__p, sizeof(value_type)); }
-  size_type max_size() const _STLP_NOTHROW  { return size_t(-1) / sizeof(value_type); }
-  void construct(pointer __p, const _Tp& __val) { _STLP_STD::_Construct(__p, __val); }
-  void destroy(pointer __p) { _STLP_STD::_Destroy(__p); }
-# if defined(__MRC__)||(defined(__SC__) && !defined(__DMC__))
-  template <class _T2> bool operator==(const allocator<_T2>&) const  _STLP_NOTHROW { return true; }
-  template <class _T2> bool operator!=(const allocator<_T2>&) const _STLP_NOTHROW { return false; }
-# endif
-};
-
-_STLP_TEMPLATE_NULL
-class _STLP_CLASS_DECLSPEC allocator<void> {
-public:
-  typedef size_t      size_type;
-  typedef ptrdiff_t   difference_type;
-  typedef void*       pointer;
-  typedef const void* const_pointer;
-# if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
-  typedef void        value_type;
-# endif
-# if defined (_STLP_MEMBER_TEMPLATE_CLASSES)
-  template <class _Tp1> struct rebind {
-    typedef allocator<_Tp1> other;
-  };
-# endif
-# if defined(__MRC__)||(defined(__SC__)&&!defined(__DMC__))		//*ty 03/24/2001 - MPW compilers get confused on these operator definitions
-  template <class _T2> bool operator==(const allocator<_T2>&) const _STLP_NOTHROW { return true; }
-  template <class _T2> bool operator!=(const allocator<_T2>&) const _STLP_NOTHROW { return false; }
-# endif
-};
-
-#if !(defined(__MRC__)||(defined(__SC__)&&!defined(__DMC__)))		//*ty 03/24/2001 - MPW compilers get confused on these operator definitions
-template <class _T1, class _T2> inline bool  _STLP_CALL operator==(const allocator<_T1>&, const allocator<_T2>&) _STLP_NOTHROW { return true; }
-template <class _T1, class _T2> inline bool  _STLP_CALL operator!=(const allocator<_T1>&, const allocator<_T2>&) _STLP_NOTHROW { return false; }
-#endif
-
-# if defined (_STLP_USE_TEMPLATE_EXPORT)
-_STLP_EXPORT_TEMPLATE_CLASS allocator<char>;
-#  if defined (_STLP_HAS_WCHAR_T)
-_STLP_EXPORT_TEMPLATE_CLASS allocator<wchar_t>;
-#  endif
-# endif /* _STLP_USE_TEMPLATE_EXPORT */
-
-// Another allocator adaptor: _Alloc_traits.  This serves two
-// purposes.  First, make it possible to write containers that can use
-// either SGI-style allocators or standard-conforming allocator.
-
-// The fully general version.
-template <class _Tp, class _Allocator>
-struct _Alloc_traits
-{
-  typedef _Allocator _Orig;
-# if defined (_STLP_USE_NESTED_TCLASS_THROUGHT_TPARAM) 
-  typedef typename _Allocator::_STLP_TEMPLATE rebind<_Tp> _Rebind_type;
-  typedef typename _Rebind_type::other  allocator_type;
-  static allocator_type create_allocator(const _Orig& __a) { return allocator_type(__a); }
-# else
-  // this is not actually true, used only to pass this type through
-  // to dynamic overload selection in _STLP_alloc_proxy methods
-  typedef _Allocator allocator_type;
-# endif /* _STLP_USE_NESTED_TCLASS_THROUGHT_TPARAM */
-};
-
-#ifndef _STLP_FORCE_ALLOCATORS
-#define _STLP_FORCE_ALLOCATORS(a,y) 
-#endif
-
-#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && ! defined (_STLP_MEMBER_TEMPLATE_CLASSES)
-// The version for the default allocator, for rare occasion when we have partial spec w/o member template classes
-template <class _Tp, class _Tp1>
-struct _Alloc_traits<_Tp, allocator<_Tp1> > {
-  typedef allocator<_Tp1> _Orig;
-  typedef allocator<_Tp> allocator_type;
-  static allocator_type create_allocator(const allocator<_Tp1 >& __a) { return allocator_type(__a); }
-};
-#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
-
-/* macro to convert the allocator for initialization
- * not using MEMBER_TEMPLATE_CLASSES as it should work given template constructor  */
-#if defined (_STLP_MEMBER_TEMPLATES) || ! defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
-/* if _STLP_NO_TEMPLATE_CONVERSIONS is set, the member template constructor is
- * not used implicitly to convert allocator parameter, so let us do it explicitly */
-# if defined (_STLP_MEMBER_TEMPLATE_CLASSES) && defined (_STLP_NO_TEMPLATE_CONVERSIONS)
-#  define _STLP_CONVERT_ALLOCATOR(__a, _Tp) __stl_alloc_create(__a,(_Tp*)0)
-# else
-#  define _STLP_CONVERT_ALLOCATOR(__a, _Tp) __a
-# endif
-/* else convert, but only if partial specialization works, since else
- * Container::allocator_type won't be different */
-#else 
-#  define _STLP_CONVERT_ALLOCATOR(__a, _Tp) __stl_alloc_create(__a,(_Tp*)0)
-#endif
-
-# if defined (_STLP_USE_NESTED_TCLASS_THROUGHT_TPARAM) 
-template <class _Tp, class _Alloc>
-inline _STLP_TYPENAME_ON_RETURN_TYPE _Alloc_traits<_Tp, _Alloc>::allocator_type  _STLP_CALL
-__stl_alloc_create(const _Alloc& __a, const _Tp*) {
-  typedef typename _Alloc::_STLP_TEMPLATE rebind<_Tp>::other _Rebound_type;
-  return _Rebound_type(__a);
-}
-#else
-// If custom allocators are being used without member template classes support :
-// user (on purpose) is forced to define rebind/get operations !!!
-template <class _Tp1, class _Tp2>
-inline allocator<_Tp2>& _STLP_CALL
-__stl_alloc_rebind(allocator<_Tp1>& __a, const _Tp2*) {  return (allocator<_Tp2>&)(__a); }
-template <class _Tp1, class _Tp2>
-inline allocator<_Tp2> _STLP_CALL
-__stl_alloc_create(const allocator<_Tp1>&, const _Tp2*) { return allocator<_Tp2>(); }
-#endif /* _STLP_USE_NESTED_TCLASS_THROUGHT_TPARAM */
-
-# ifdef _STLP_USE_RAW_SGI_ALLOCATORS
-// move obsolete stuff out of the way
-# include <stl/_alloc_old.h>
-# endif
-
-// inheritance is being used for EBO optimization
-template <class _Value, class _Tp, class _MaybeReboundAlloc>
-class _STLP_alloc_proxy : public _MaybeReboundAlloc {
-private:
-  typedef _MaybeReboundAlloc _Base;
-  typedef _STLP_alloc_proxy<_Value, _Tp, _MaybeReboundAlloc> _Self;
-public:
-  _Value _M_data;
-  inline _STLP_alloc_proxy(const _MaybeReboundAlloc& __a, _Value __p) : _MaybeReboundAlloc(__a), _M_data(__p) {}
-
-# if 0
-  inline _STLP_alloc_proxy(const _Self& __x) : _MaybeReboundAlloc(__x), _M_data(__x._M_data) {} 
-  // construction/destruction
-  inline _Self& operator = (const _Self& __x) { 
-    *(_MaybeReboundAlloc*)this = *(_MaybeReboundAlloc*)__x;
-    _M_data = __x._M_data; return *this; 
-  } 
-  inline _Self& operator = (const _Base& __x) { ((_Base&)*this) = __x; return *this; } 
-# endif
-  // Unified interface to perform allocate()/deallocate() with limited
-  // language support
-#if ! defined (_STLP_USE_NESTED_TCLASS_THROUGHT_TPARAM)
-  // else it is rebound already, and allocate() member is accessible
-  inline _Tp* allocate(size_t __n) { 
-    return __stl_alloc_rebind(__STATIC_CAST(_Base&,*this),(_Tp*)0).allocate(__n,0); 
-  }
-  inline void deallocate(_Tp* __p, size_t __n) { 
-    __stl_alloc_rebind(__STATIC_CAST(_Base&, *this),(_Tp*)0).deallocate(__p, __n); 
-  }
-#endif /* !_STLP_USE_NESTED_TCLASS_THROUGHT_TPARAM */
-};
-
-# if defined (_STLP_USE_TEMPLATE_EXPORT)
-_STLP_EXPORT_TEMPLATE_CLASS _STLP_alloc_proxy<char *,char,allocator<char> >;
-#  if defined (_STLP_HAS_WCHAR_T)
-_STLP_EXPORT_TEMPLATE_CLASS _STLP_alloc_proxy<wchar_t *,wchar_t,allocator<wchar_t> >;
-#  endif
-# endif /* _STLP_USE_TEMPLATE_EXPORT */
-
-# undef _STLP_NODE_ALLOCATOR_THREADS
-
-_STLP_END_NAMESPACE
-
-# if defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION)
-#  include <stl/_alloc.c>
-# endif
-
-#endif /* _STLP_INTERNAL_ALLOC_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/stl/_alloc_old.h b/src/STLport/stl/_alloc_old.h
deleted file mode 100644
index da8c84c..0000000
--- a/src/STLport/stl/_alloc_old.h
+++ /dev/null
@@ -1,303 +0,0 @@
-template<class _Tp, class _Alloc>
-class __simple_alloc {
-  typedef _Alloc __alloc_type;
-public:
-  typedef typename _Alloc::value_type __alloc_value_type;
-  typedef _Tp value_type;
-  static size_t  _STLP_CALL __chunk(size_t __n) { 
-    return (sizeof(__alloc_value_type)==sizeof(value_type)) ? __n : 
-	    ((__n*sizeof(value_type)+sizeof(__alloc_value_type)-1)/sizeof(__alloc_value_type));
-  }
-  static _Tp*  _STLP_CALL allocate(size_t __n) { return 0 == __n ? 0 : (_Tp*) __alloc_type::allocate(__chunk(__n)); }
-  static void  _STLP_CALL deallocate(_Tp * __p, size_t __n) { 
-    __alloc_type::deallocate((__alloc_value_type*)__p, __chunk(__n)); }
-};
-
-// Allocator adaptor to turn an SGI-style allocator (e.g. alloc, malloc_alloc)
-// into a standard-conforming allocator.   Note that this adaptor does
-// *not* assume that all objects of the underlying alloc class are
-// identical, nor does it assume that all of the underlying alloc's
-// member functions are static member functions.  Note, also, that 
-// __allocator<_Tp, alloc> is essentially the same thing as allocator<_Tp>.
-
-template <class _Tp, class _Alloc>
-struct __allocator : public _Alloc {
-  typedef _Alloc __underlying_alloc;
-
-  typedef size_t    size_type;
-  typedef ptrdiff_t difference_type;
-  typedef _Tp*       pointer;
-  typedef const _Tp* const_pointer;
-  typedef _Tp&       reference;
-  typedef const _Tp& const_reference;
-  typedef _Tp        value_type;
-
-# if defined (_STLP_MEMBER_TEMPLATE_CLASSES)
-  template <class _Tp1> struct rebind {
-    typedef __allocator<_Tp1, _Alloc> other;
-  };
-# endif
-  __allocator() _STLP_NOTHROW {}
-  __allocator(const _Alloc& ) _STLP_NOTHROW {}
-  __allocator(const __allocator<_Tp, _Alloc>& __a) _STLP_NOTHROW
-    : _Alloc(__a) {}
-# if defined (_STLP_MEMBER_TEMPLATES) && defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
-  template <class _Tp1> 
-  __allocator(const __allocator<_Tp1, _Alloc>& __a) _STLP_NOTHROW
-    : _Alloc(__a) {}
-# endif
-# ifdef _STLP_TRIVIAL_DESTRUCTOR_BUG
-  ~__allocator() _STLP_NOTHROW {}
-# endif
-  pointer address(reference __x) const { return &__x; }
-
-# if !defined (__WATCOM_CPLUSPLUS__)
-  const_pointer address(const_reference __x) const { return &__x; }
-# endif
-
-  // __n is permitted to be 0.
-  _Tp* allocate(size_type __n, const void* = 0) {
-    return __n != 0 
-        ? __STATIC_CAST(_Tp*,__underlying_alloc::allocate(__n * sizeof(_Tp))) 
-        : 0;
-  }
-
-  // __p is not permitted to be a null pointer.
-  void deallocate(pointer __p, size_type __n)
-    { if (__p) __underlying_alloc::deallocate(__p, __n * sizeof(_Tp)); }
-
-  size_type max_size() const _STLP_NOTHROW 
-    { return size_t(-1) / sizeof(_Tp); }
-
-  void construct(pointer __p, const _Tp& __val) { _STLP_STD::_Construct(__p, __val); }
-  void destroy(pointer __p) { _STLP_STD::_Destroy(__p); }
-
-  const __underlying_alloc& __get_underlying_alloc() const { return *this; }
-};
-
-#ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION
-template <class _Alloc>
-class __allocator<void, _Alloc> {
-  typedef size_t      size_type;
-  typedef ptrdiff_t   difference_type;
-  typedef void*       pointer;
-  typedef const void* const_pointer;
-  typedef void        value_type;
-#ifdef _STLP_MEMBER_TEMPLATE_CLASSES
-  template <class _Tp1> struct rebind {
-    typedef __allocator<_Tp1, _Alloc> other;
-  };
-#endif
-};
-#endif
-
-template <class _Tp, class _Alloc>
-inline bool  _STLP_CALL operator==(const __allocator<_Tp, _Alloc>& __a1,
-                                   const __allocator<_Tp, _Alloc>& __a2)
-{
-  return __a1.__get_underlying_alloc() == __a2.__get_underlying_alloc();
-}
-
-#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE
-template <class _Tp, class _Alloc>
-inline bool  _STLP_CALL operator!=(const __allocator<_Tp, _Alloc>& __a1,
-                                   const __allocator<_Tp, _Alloc>& __a2)
-{
-  return __a1.__get_underlying_alloc() != __a2.__get_underlying_alloc();
-}
-#endif /* _STLP_FUNCTION_TMPL_PARTIAL_ORDER */
-
-
-// Comparison operators for all of the predifined SGI-style allocators.
-// This ensures that __allocator<malloc_alloc> (for example) will
-// work correctly.
-
-#ifndef _STLP_NON_TYPE_TMPL_PARAM_BUG
-template <int inst>
-inline bool  _STLP_CALL operator==(const __malloc_alloc<inst>&,
-                                   const __malloc_alloc<inst>&)
-{
-  return true;
-}
-
-#ifdef _STLP_FUNCTION_TMPL_PARTIAL_ORDER
-template <int __inst>
-inline bool  _STLP_CALL operator!=(const __malloc_alloc<__inst>&,
-                                   const __malloc_alloc<__inst>&)
-{
-  return false;
-}
-#endif /* _STLP_FUNCTION_TMPL_PARTIAL_ORDER */
-
-inline bool _STLP_CALL operator==(const __new_alloc&, const __new_alloc&) { return true; }
-
-# ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE
-inline bool _STLP_CALL operator!=(const __new_alloc&, const __new_alloc&) { return false; }
-# endif
-
-
-template <bool __threads, int __inst>
-inline bool  _STLP_CALL operator==(const __node_alloc<__threads, __inst>&,
-                                   const __node_alloc<__threads, __inst>&)
-{
-  return true;
-}
-
-#if defined( _STLP_FUNCTION_TMPL_PARTIAL_ORDER )
-
-template <bool __threads, int __inst>
-inline bool  _STLP_CALL operator!=(const __node_alloc<__threads, __inst>&,
-                                   const __node_alloc<__threads, __inst>&)
-{
-  return false;
-}
-#endif /* _STLP_FUNCTION_TMPL_PARTIAL_ORDER */
-
-#endif /* _STLP_NON_TYPE_TMPL_PARAM_BUG */
-
-template <class _Alloc>
-inline bool  _STLP_CALL operator==(const __debug_alloc<_Alloc>&, const __debug_alloc<_Alloc>&) {  return true; }
-# ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE
-template <class _Alloc>
-inline bool  _STLP_CALL operator!=(const __debug_alloc<_Alloc>&, const __debug_alloc<_Alloc>&) {  return false; }
-# endif
-
-#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
-
-// Versions for the predefined SGI-style allocators.
-template <class _Tp, int __inst>
-struct _Alloc_traits<_Tp, __malloc_alloc<__inst> > {
-  typedef __allocator<_Tp, __malloc_alloc<__inst> > allocator_type;
-};
-
-
-template <class _Tp, bool __threads, int __inst>
-struct _Alloc_traits<_Tp, __node_alloc<__threads, __inst> > {
-  typedef __allocator<_Tp, __node_alloc<__threads, __inst> > 
-          allocator_type;
-};
-
-template <class _Tp, class _Alloc>
-struct _Alloc_traits<_Tp, __debug_alloc<_Alloc> > {
-  typedef __allocator<_Tp, __debug_alloc<_Alloc> > allocator_type;
-};
-
-// Versions for the __allocator adaptor used with the predefined
-// SGI-style allocators.
-
-template <class _Tp, class _Tp1, class _Alloc>
-struct _Alloc_traits<_Tp, __allocator<_Tp1, _Alloc > > {
-  typedef __allocator<_Tp, _Alloc > allocator_type;
-};
-
-#endif
-
-#if !defined (_STLP_USE_NESTED_TCLASS_THROUGHT_TPARAM) 
-
-// Versions for the predefined SGI-style allocators.
-
-
-#  if defined (_STLP_NON_TYPE_TMPL_PARAM_BUG)
-
-typedef __malloc_alloc<0> __malloc_alloc_dfl;
-typedef __node_alloc<false, 0> __single_client_node_alloc;
-typedef __node_alloc<true, 0>  __multithreaded_node_alloc;
-
-template <class _Tp>
-inline __allocator<_Tp, __malloc_alloc_dfl >& _STLP_CALL
-__stl_alloc_rebind(__malloc_alloc_dfl& __a, const _Tp*) {
-  return (__allocator<_Tp, __malloc_alloc_dfl >&)__a;
-}
-
-template <class _Tp>
-inline __allocator<_Tp, __single_client_node_alloc >& _STLP_CALL
-__stl_alloc_rebind(__single_client_node_alloc& __a, const _Tp*) {
-  return (__allocator<_Tp, __single_client_node_alloc >&)__a;
-}
-
-template <class _Tp>
-inline __allocator<_Tp, __multithreaded_node_alloc >& _STLP_CALL
-__stl_alloc_rebind(__multithreaded_node_alloc& __a, const _Tp*) {
-  return (__allocator<_Tp, __multithreaded_node_alloc >&)__a;
-}
-
-template <class _Tp>
-inline __allocator<_Tp, __malloc_alloc_dfl > _STLP_CALL
-__stl_alloc_create(const __malloc_alloc_dfl&, const _Tp*) {
-  return __allocator<_Tp, __malloc_alloc_dfl > ();
-}
-
-template <class _Tp>
-inline __allocator<_Tp, __single_client_node_alloc > _STLP_CALL
-__stl_alloc_create(const __single_client_node_alloc&, const _Tp*) {
-  return __allocator<_Tp, __single_client_node_alloc >();
-}
-
-template <class _Tp>
-inline __allocator<_Tp, __multithreaded_node_alloc > _STLP_CALL
-__stl_alloc_create(const __multithreaded_node_alloc&, const _Tp*) {
-  return __allocator<_Tp, __multithreaded_node_alloc >();
-}
-
-#  else
-
-template <class _Tp, int __inst>
-inline __allocator<_Tp, __malloc_alloc<__inst> >& _STLP_CALL
-__stl_alloc_rebind(__malloc_alloc<__inst>& __a, const _Tp*) {
-  return (__allocator<_Tp, __malloc_alloc<__inst> >&)__a;
-}
-
-template <class _Tp, bool __threads, int __inst>
-inline __allocator<_Tp, __node_alloc<__threads, __inst> >& _STLP_CALL
-__stl_alloc_rebind(__node_alloc<__threads, __inst>& __a, const _Tp*) {
-  return (__allocator<_Tp, __node_alloc<__threads, __inst> >&)__a;
-}
-
-template <class _Tp, int __inst>
-inline __allocator<_Tp, __malloc_alloc<__inst> > _STLP_CALL
-__stl_alloc_create(const __malloc_alloc<__inst>&, const _Tp*) {
-  return __allocator<_Tp, __malloc_alloc<__inst> >();
-}
-
-template <class _Tp, bool __threads, int __inst>
-inline __allocator<_Tp, __node_alloc<__threads, __inst> > _STLP_CALL
-__stl_alloc_create(const __node_alloc<__threads, __inst>&, const _Tp*) {
-  return __allocator<_Tp, __node_alloc<__threads, __inst> >();
-}
-
-#  endif
-
-template <class _Tp, class _Alloc>
-inline __allocator<_Tp, __debug_alloc<_Alloc> > _STLP_CALL
-__stl_alloc_create(const __debug_alloc<_Alloc>&, const _Tp*) {
-  return __allocator<_Tp, __debug_alloc<_Alloc> >();
-}
-template <class _Tp, class _Alloc>
-inline __allocator<_Tp, __debug_alloc<_Alloc> >& _STLP_CALL
-__stl_alloc_rebind(__debug_alloc<_Alloc>& __a, const _Tp*) {
-  return (__allocator<_Tp, __debug_alloc<_Alloc> >&)__a;
-}
-
-template <class _Tp>
-inline __allocator<_Tp, __new_alloc > _STLP_CALL
-__stl_alloc_create(const __new_alloc&, const _Tp*) {
-  return __allocator<_Tp, __new_alloc >();
-}
-template <class _Tp>
-inline __allocator<_Tp, __new_alloc >&  _STLP_CALL
-__stl_alloc_rebind(__new_alloc& __a, const _Tp*) {
-  return (__allocator<_Tp, __new_alloc >&)__a;
-}
-
-template <class _Tp1, class _Alloc, class _Tp2>
-inline __allocator<_Tp2, _Alloc>& _STLP_CALL
-__stl_alloc_rebind(__allocator<_Tp1, _Alloc>& __a, const _Tp2*) {
-  return (__allocator<_Tp2, _Alloc>&)__a;
-}
-
-template <class _Tp1, class _Alloc, class _Tp2>
-inline __allocator<_Tp2, _Alloc> _STLP_CALL
-__stl_alloc_create(const __allocator<_Tp1, _Alloc>&, const _Tp2*) {
-  return __allocator<_Tp2, _Alloc>();
-}
-#endif
diff --git a/src/STLport/stl/_auto_ptr.h b/src/STLport/stl/_auto_ptr.h
deleted file mode 100644
index 98d4ef2..0000000
--- a/src/STLport/stl/_auto_ptr.h
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Copyright (c) 1997-1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_AUTO_PTR_H
-# define _STLP_AUTO_PTR_H
-
-_STLP_BEGIN_NAMESPACE
-// implementation primitive
-class __ptr_base {
-public:
-  void* _M_p;
-  void  __set(const void* p) { _M_p = __CONST_CAST(void*,p); }
-  void  __set(void* p) { _M_p = p; }
-};
-
-template <class _Tp> class auto_ptr_ref {
-public:
-  __ptr_base& _M_r;
-  _Tp* const _M_p;
-
-  auto_ptr_ref(__ptr_base& __r, _Tp* __p) : _M_r(__r), _M_p(__p) {  }
-
-  _Tp* release() const { _M_r.__set((void*)0); return _M_p; }
-
-};
-
-template<class _Tp> class auto_ptr :  public __ptr_base {
-public:	
-  typedef _Tp element_type;
-  typedef auto_ptr<_Tp>           _Self;
-  
-  _Tp* release() {  
-    _Tp* __px = this->get(); 
-    this->_M_p = 0; 
-    return __px; 
-  }
-  
-  void reset(_Tp* __px=0) {
-    _Tp* __pt = this->get();
-    if (__px != __pt) 
-      delete __pt; 
-    this->__set(__px); 
-  }
-
-  _Tp* get() const { return __REINTERPRET_CAST(_Tp*,__CONST_CAST(void*,_M_p)); } 
-
-# if !defined (_STLP_NO_ARROW_OPERATOR)
-  _Tp* operator->() const { 
-    _STLP_VERBOSE_ASSERT(get()!=0, _StlMsg_AUTO_PTR_NULL)
-    return get(); 
-  }
-# endif
-  _Tp& operator*() const  { 
-    _STLP_VERBOSE_ASSERT(get()!=0, _StlMsg_AUTO_PTR_NULL)
-    return *get(); 
-  }
-  
-  auto_ptr() { this->_M_p = 0; }
-  
-  explicit auto_ptr(_Tp* __px) { this->__set(__px); }
-  
-#if defined (_STLP_MEMBER_TEMPLATES)
-# if !defined (_STLP_NO_TEMPLATE_CONVERSIONS)
-  template<class _Tp1> auto_ptr(auto_ptr<_Tp1>& __r) {
-    _Tp* __conversionCheck = __r.release();
-    this->__set(__conversionCheck);
-  }
-# endif	
-  template<class _Tp1> auto_ptr<_Tp>& operator=(auto_ptr<_Tp1>& __r) {
-    _Tp* __conversionCheck = __r.release();
-    reset(__conversionCheck);
-    return *this;
-  }
-#endif /* _STLP_MEMBER_TEMPLATES */
-  
-  auto_ptr(_Self& __r) { this->__set(__r.release()); }
-
-  _Self& operator=(_Self& __r)  {
-    reset(__r.release());
-    return *this;
-  }
-
-  ~auto_ptr() { /* boris : reset(0) might be better */ delete this->get(); }
-	
-  auto_ptr(auto_ptr_ref<_Tp> __r) {
-    this->__set(__r.release());
-  }
-	
-  _Self& operator=(auto_ptr_ref<_Tp> __r) {
-    reset(__r.release());
-    return *this;
-  }
-  
-# if defined(_STLP_MEMBER_TEMPLATES) && !defined(_STLP_NO_TEMPLATE_CONVERSIONS)
-  template<class _Tp1> operator auto_ptr_ref<_Tp1>() {
-    return auto_ptr_ref<_Tp1>(*this, this->get());
-  }
-  template<class _Tp1> operator auto_ptr<_Tp1>() {
-    return auto_ptr<_Tp1>(release());
-  }
-# else
-  operator auto_ptr_ref<_Tp>()
-  { return auto_ptr_ref<_Tp>(*this, this->get()); }
-# endif
-	
-};
-_STLP_END_NAMESPACE
-
-#endif /* _STLP_AUTO_PTR_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/stl/_bitset.c b/src/STLport/stl/_bitset.c
deleted file mode 100644
index 11990a8..0000000
--- a/src/STLport/stl/_bitset.c
+++ /dev/null
@@ -1,407 +0,0 @@
-/*
- * Copyright (c) 1998
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_BITSET_C
-# define  _STLP_BITSET_C
-
-# ifndef _STLP_BITSET_H
-#  include <stl/_bitset.h>
-# endif
-
-# define __BITS_PER_WORD (CHAR_BIT*sizeof(unsigned long))
-
-_STLP_BEGIN_NAMESPACE
-
-//
-// Definitions of non-inline functions from _Base_bitset.
-// 
-
-
-template<size_t _Nw>
-void _Base_bitset<_Nw>::_M_do_left_shift(size_t __shift) 
-{
-
-  if (__shift != 0) {
-    const size_t __wshift = __shift / __BITS_PER_WORD;
-    const size_t __offset = __shift % __BITS_PER_WORD;
-
-    if (__offset == 0)
-      for (size_t __n = _Nw - 1; __n >= __wshift; --__n)
-        _M_w[__n] = _M_w[__n - __wshift];
-
-    else {
-      const size_t __sub_offset = __BITS_PER_WORD - __offset;
-      for (size_t __n = _Nw - 1; __n > __wshift; --__n)
-        _M_w[__n] = (_M_w[__n - __wshift] << __offset) | 
-                    (_M_w[__n - __wshift - 1] >> __sub_offset);
-      _M_w[__wshift] = _M_w[0] << __offset;
-    }
-
-    fill(_M_w + 0, _M_w + __wshift, __STATIC_CAST(_WordT,0));
-  }
-}
-
-template<size_t _Nw>
-void _Base_bitset<_Nw>::_M_do_right_shift(size_t __shift) 
-{
-
-  if (__shift != 0) {
-    const size_t __wshift = __shift / __BITS_PER_WORD;
-    const size_t __offset = __shift % __BITS_PER_WORD;
-    const size_t __limit = _Nw - __wshift - 1;
-
-    if (__offset == 0)
-      for (size_t __n = 0; __n <= __limit; ++__n)
-        _M_w[__n] = _M_w[__n + __wshift];
-
-    else {
-      const size_t __sub_offset = __BITS_PER_WORD - __offset;
-      for (size_t __n = 0; __n < __limit; ++__n)
-        _M_w[__n] = (_M_w[__n + __wshift] >> __offset) |
-                    (_M_w[__n + __wshift + 1] << __sub_offset);
-      _M_w[__limit] = _M_w[_Nw-1] >> __offset;
-    }
-
-    fill(_M_w + __limit + 1, _M_w + _Nw, __STATIC_CAST(_WordT,0));
-  }
-}
-
-template<size_t _Nw>
-unsigned long _Base_bitset<_Nw>::_M_do_to_ulong() const
-{
-  for (size_t __i = 1; __i < _Nw; ++__i) 
-    if (_M_w[__i]) 
-      __stl_throw_overflow_error("bitset");
-  return _M_w[0];
-} // End _M_do_to_ulong
-
-template<size_t _Nw>
-size_t _Base_bitset<_Nw>::_M_do_find_first(size_t __not_found) const 
-{
-  for ( size_t __i = 0; __i < _Nw; __i++ ) {
-    _WordT __thisword = _M_w[__i];
-    if ( __thisword != __STATIC_CAST(_WordT,0) ) {
-      // find byte within word
-      for ( size_t __j = 0; __j < sizeof(_WordT); __j++ ) {
-        unsigned char __this_byte
-          = __STATIC_CAST(unsigned char,(__thisword & (~(unsigned char)0)));
-        if ( __this_byte )
-          return __i*__BITS_PER_WORD + __j*CHAR_BIT +
-            _Bs_G<bool>::_S_first_one[__this_byte];
-
-        __thisword >>= CHAR_BIT;
-      }
-    }
-  }
-  // not found, so return an indication of failure.
-  return __not_found;
-}
-
-template<size_t _Nw>
-size_t
-_Base_bitset<_Nw>::_M_do_find_next(size_t __prev, 
-                                   size_t __not_found) const
-{
-  // make bound inclusive
-  ++__prev;
-
-  // check out of bounds
-  if ( __prev >= _Nw * __BITS_PER_WORD )
-    return __not_found;
-
-    // search first word
-  size_t __i = _S_whichword(__prev);
-  _WordT __thisword = _M_w[__i];
-
-    // mask off bits below bound
-  __thisword &= (~__STATIC_CAST(_WordT,0)) << _S_whichbit(__prev);
-
-  if ( __thisword != __STATIC_CAST(_WordT,0) ) {
-    // find byte within word
-    // get first byte into place
-    __thisword >>= _S_whichbyte(__prev) * CHAR_BIT;
-    for ( size_t __j = _S_whichbyte(__prev); __j < sizeof(_WordT); __j++ ) {
-      unsigned char __this_byte
-        = __STATIC_CAST(unsigned char,(__thisword & (~(unsigned char)0)));
-      if ( __this_byte )
-        return __i*__BITS_PER_WORD + __j*CHAR_BIT +
-          _Bs_G<bool>::_S_first_one[__this_byte];
-
-      __thisword >>= CHAR_BIT;
-    }
-  }
-
-  // check subsequent words
-  __i++;
-  for ( ; __i < _Nw; __i++ ) {
-    /* _WordT */ __thisword = _M_w[__i];
-    if ( __thisword != __STATIC_CAST(_WordT,0) ) {
-      // find byte within word
-      for ( size_t __j = 0; __j < sizeof(_WordT); __j++ ) {
-        unsigned char __this_byte
-          = __STATIC_CAST(unsigned char,(__thisword & (~(unsigned char)0)));
-        if ( __this_byte )
-          return __i*__BITS_PER_WORD + __j*CHAR_BIT +
-            _Bs_G<bool>::_S_first_one[__this_byte];
-
-        __thisword >>= CHAR_BIT;
-      }
-    }
-  }
-
-  // not found, so return an indication of failure.
-  return __not_found;
-} // end _M_do_find_next
-
-
-
-# if ! defined (_STLP_NON_TYPE_TMPL_PARAM_BUG)
-
-#if defined ( _STLP_USE_NEW_IOSTREAMS)
-
-template <class _CharT, class _Traits, size_t _Nb>
-basic_istream<_CharT, _Traits>& _STLP_CALL
-operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x)
-{
-  basic_string<_CharT, _Traits> __tmp;
-  __tmp.reserve(_Nb);
-
-  // Skip whitespace
-  typename basic_istream<_CharT, _Traits>::sentry __sentry(__is);
-  if (__sentry) {
-    basic_streambuf<_CharT, _Traits>* __buf = __is.rdbuf();
-    for (size_t __i = 0; __i < _Nb; ++__i) {
-      static typename _Traits::int_type __eof = _Traits::eof();
-
-      typename _Traits::int_type __c1 = __buf->sbumpc();
-      if (_Traits::eq_int_type(__c1, __eof)) {
-        __is.setstate(ios_base::eofbit);
-        break;
-      }
-      else {
-        char __c2 = _Traits::to_char_type(__c1);
-        char __c  = __is.narrow(__c2, '*');
-
-        if (__c == '0' || __c == '1')
-          __tmp.push_back(__c);
-        else if (_Traits::eq_int_type(__buf->sputbackc(__c2), __eof)) {
-          __is.setstate(ios_base::failbit);
-          break;
-        }
-      }
-    }
-
-    if (__tmp.empty())
-      __is.setstate(ios_base::failbit);
-    else
-      __x._M_copy_from_string(__tmp, __STATIC_CAST(size_t,0), _Nb);
-  }
-
-  return __is;
-}
-
-template <class _CharT, class _Traits, size_t _Nb>
-basic_ostream<_CharT, _Traits>& _STLP_CALL
-operator<<(basic_ostream<_CharT, _Traits>& __os,
-           const bitset<_Nb>& __x)
-{
-  basic_string<_CharT, _Traits> __tmp;
-  __x._M_copy_to_string(__tmp);
-  return __os << __tmp;
-}
-
-#elif ! defined ( _STLP_USE_NO_IOSTREAMS )
-
-// (reg) For Watcom IO, this tells if ostream class is in .exe or in .dll
-template <size_t _Nb>
-_ISTREAM_DLL& _STLP_CALL
-operator>>(_ISTREAM_DLL& __is, bitset<_Nb>& __x) {
-  string __tmp;
-  __tmp.reserve(_Nb);
-
-  // In new templatized iostreams, use istream::sentry
-  if (__is.flags() & ios::skipws) {
-    char __c;
-    do 
-      __is.get(__c);
-    while (__is && isspace(__c));
-    if (__is)
-      __is.putback(__c);
-  }
-
-  for (size_t __i = 0; __i < _Nb; ++__i) {
-    char __c;
-    __is.get(__c);
-
-    if (!__is)
-      break;
-    else if (__c != '0' && __c != '1') {
-      __is.putback(__c);
-      break;
-    }
-    else
-      __tmp.push_back(__c);
-  }
-
-  if (__tmp.empty()) 
-    __is.clear(__is.rdstate() | ios::failbit);
-  else
-    __x._M_copy_from_string(__tmp, __STATIC_CAST(size_t,0), _Nb);
-
-  return __is;
-}
-
-# endif /* _STLP_USE_NEW_IOSTREAMS */
-
-# endif /* _STLP_NON_TYPE_TMPL_PARAM_BUG */
-
-
-# if defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION)
-
-// ------------------------------------------------------------
-// Lookup tables for find and count operations.
-
-# if ( _STLP_STATIC_TEMPLATE_DATA > 0 )
-template<class _Dummy>
-unsigned char _Bs_G<_Dummy>::_S_bit_count[256] = {
-# else
-unsigned char _Bs_G<bool>::_S_bit_count[256] _STLP_WEAK = {
-# endif
-  0, /*   0 */ 1, /*   1 */ 1, /*   2 */ 2, /*   3 */ 1, /*   4 */
-  2, /*   5 */ 2, /*   6 */ 3, /*   7 */ 1, /*   8 */ 2, /*   9 */
-  2, /*  10 */ 3, /*  11 */ 2, /*  12 */ 3, /*  13 */ 3, /*  14 */
-  4, /*  15 */ 1, /*  16 */ 2, /*  17 */ 2, /*  18 */ 3, /*  19 */
-  2, /*  20 */ 3, /*  21 */ 3, /*  22 */ 4, /*  23 */ 2, /*  24 */
-  3, /*  25 */ 3, /*  26 */ 4, /*  27 */ 3, /*  28 */ 4, /*  29 */
-  4, /*  30 */ 5, /*  31 */ 1, /*  32 */ 2, /*  33 */ 2, /*  34 */
-  3, /*  35 */ 2, /*  36 */ 3, /*  37 */ 3, /*  38 */ 4, /*  39 */
-  2, /*  40 */ 3, /*  41 */ 3, /*  42 */ 4, /*  43 */ 3, /*  44 */
-  4, /*  45 */ 4, /*  46 */ 5, /*  47 */ 2, /*  48 */ 3, /*  49 */
-  3, /*  50 */ 4, /*  51 */ 3, /*  52 */ 4, /*  53 */ 4, /*  54 */
-  5, /*  55 */ 3, /*  56 */ 4, /*  57 */ 4, /*  58 */ 5, /*  59 */
-  4, /*  60 */ 5, /*  61 */ 5, /*  62 */ 6, /*  63 */ 1, /*  64 */
-  2, /*  65 */ 2, /*  66 */ 3, /*  67 */ 2, /*  68 */ 3, /*  69 */
-  3, /*  70 */ 4, /*  71 */ 2, /*  72 */ 3, /*  73 */ 3, /*  74 */
-  4, /*  75 */ 3, /*  76 */ 4, /*  77 */ 4, /*  78 */ 5, /*  79 */
-  2, /*  80 */ 3, /*  81 */ 3, /*  82 */ 4, /*  83 */ 3, /*  84 */
-  4, /*  85 */ 4, /*  86 */ 5, /*  87 */ 3, /*  88 */ 4, /*  89 */
-  4, /*  90 */ 5, /*  91 */ 4, /*  92 */ 5, /*  93 */ 5, /*  94 */
-  6, /*  95 */ 2, /*  96 */ 3, /*  97 */ 3, /*  98 */ 4, /*  99 */
-  3, /* 100 */ 4, /* 101 */ 4, /* 102 */ 5, /* 103 */ 3, /* 104 */
-  4, /* 105 */ 4, /* 106 */ 5, /* 107 */ 4, /* 108 */ 5, /* 109 */
-  5, /* 110 */ 6, /* 111 */ 3, /* 112 */ 4, /* 113 */ 4, /* 114 */
-  5, /* 115 */ 4, /* 116 */ 5, /* 117 */ 5, /* 118 */ 6, /* 119 */
-  4, /* 120 */ 5, /* 121 */ 5, /* 122 */ 6, /* 123 */ 5, /* 124 */
-  6, /* 125 */ 6, /* 126 */ 7, /* 127 */ 1, /* 128 */ 2, /* 129 */
-  2, /* 130 */ 3, /* 131 */ 2, /* 132 */ 3, /* 133 */ 3, /* 134 */
-  4, /* 135 */ 2, /* 136 */ 3, /* 137 */ 3, /* 138 */ 4, /* 139 */
-  3, /* 140 */ 4, /* 141 */ 4, /* 142 */ 5, /* 143 */ 2, /* 144 */
-  3, /* 145 */ 3, /* 146 */ 4, /* 147 */ 3, /* 148 */ 4, /* 149 */
-  4, /* 150 */ 5, /* 151 */ 3, /* 152 */ 4, /* 153 */ 4, /* 154 */
-  5, /* 155 */ 4, /* 156 */ 5, /* 157 */ 5, /* 158 */ 6, /* 159 */
-  2, /* 160 */ 3, /* 161 */ 3, /* 162 */ 4, /* 163 */ 3, /* 164 */
-  4, /* 165 */ 4, /* 166 */ 5, /* 167 */ 3, /* 168 */ 4, /* 169 */
-  4, /* 170 */ 5, /* 171 */ 4, /* 172 */ 5, /* 173 */ 5, /* 174 */
-  6, /* 175 */ 3, /* 176 */ 4, /* 177 */ 4, /* 178 */ 5, /* 179 */
-  4, /* 180 */ 5, /* 181 */ 5, /* 182 */ 6, /* 183 */ 4, /* 184 */
-  5, /* 185 */ 5, /* 186 */ 6, /* 187 */ 5, /* 188 */ 6, /* 189 */
-  6, /* 190 */ 7, /* 191 */ 2, /* 192 */ 3, /* 193 */ 3, /* 194 */
-  4, /* 195 */ 3, /* 196 */ 4, /* 197 */ 4, /* 198 */ 5, /* 199 */
-  3, /* 200 */ 4, /* 201 */ 4, /* 202 */ 5, /* 203 */ 4, /* 204 */
-  5, /* 205 */ 5, /* 206 */ 6, /* 207 */ 3, /* 208 */ 4, /* 209 */
-  4, /* 210 */ 5, /* 211 */ 4, /* 212 */ 5, /* 213 */ 5, /* 214 */
-  6, /* 215 */ 4, /* 216 */ 5, /* 217 */ 5, /* 218 */ 6, /* 219 */
-  5, /* 220 */ 6, /* 221 */ 6, /* 222 */ 7, /* 223 */ 3, /* 224 */
-  4, /* 225 */ 4, /* 226 */ 5, /* 227 */ 4, /* 228 */ 5, /* 229 */
-  5, /* 230 */ 6, /* 231 */ 4, /* 232 */ 5, /* 233 */ 5, /* 234 */
-  6, /* 235 */ 5, /* 236 */ 6, /* 237 */ 6, /* 238 */ 7, /* 239 */
-  4, /* 240 */ 5, /* 241 */ 5, /* 242 */ 6, /* 243 */ 5, /* 244 */
-  6, /* 245 */ 6, /* 246 */ 7, /* 247 */ 5, /* 248 */ 6, /* 249 */
-  6, /* 250 */ 7, /* 251 */ 6, /* 252 */ 7, /* 253 */ 7, /* 254 */
-  8  /* 255 */
-}; // end _Bitset_global
-
-# if ( _STLP_STATIC_TEMPLATE_DATA > 0 )
-template<class _Dummy>
-unsigned char _Bs_G<_Dummy>::_S_first_one[256] = {
-# else
-unsigned char _Bs_G<bool>::_S_first_one[256] _STLP_WEAK = {
-# endif
-
-  0, /*   0 */ 0, /*   1 */ 1, /*   2 */ 0, /*   3 */ 2, /*   4 */
-  0, /*   5 */ 1, /*   6 */ 0, /*   7 */ 3, /*   8 */ 0, /*   9 */
-  1, /*  10 */ 0, /*  11 */ 2, /*  12 */ 0, /*  13 */ 1, /*  14 */
-  0, /*  15 */ 4, /*  16 */ 0, /*  17 */ 1, /*  18 */ 0, /*  19 */
-  2, /*  20 */ 0, /*  21 */ 1, /*  22 */ 0, /*  23 */ 3, /*  24 */
-  0, /*  25 */ 1, /*  26 */ 0, /*  27 */ 2, /*  28 */ 0, /*  29 */
-  1, /*  30 */ 0, /*  31 */ 5, /*  32 */ 0, /*  33 */ 1, /*  34 */
-  0, /*  35 */ 2, /*  36 */ 0, /*  37 */ 1, /*  38 */ 0, /*  39 */
-  3, /*  40 */ 0, /*  41 */ 1, /*  42 */ 0, /*  43 */ 2, /*  44 */
-  0, /*  45 */ 1, /*  46 */ 0, /*  47 */ 4, /*  48 */ 0, /*  49 */
-  1, /*  50 */ 0, /*  51 */ 2, /*  52 */ 0, /*  53 */ 1, /*  54 */
-  0, /*  55 */ 3, /*  56 */ 0, /*  57 */ 1, /*  58 */ 0, /*  59 */
-  2, /*  60 */ 0, /*  61 */ 1, /*  62 */ 0, /*  63 */ 6, /*  64 */
-  0, /*  65 */ 1, /*  66 */ 0, /*  67 */ 2, /*  68 */ 0, /*  69 */
-  1, /*  70 */ 0, /*  71 */ 3, /*  72 */ 0, /*  73 */ 1, /*  74 */
-  0, /*  75 */ 2, /*  76 */ 0, /*  77 */ 1, /*  78 */ 0, /*  79 */
-  4, /*  80 */ 0, /*  81 */ 1, /*  82 */ 0, /*  83 */ 2, /*  84 */
-  0, /*  85 */ 1, /*  86 */ 0, /*  87 */ 3, /*  88 */ 0, /*  89 */
-  1, /*  90 */ 0, /*  91 */ 2, /*  92 */ 0, /*  93 */ 1, /*  94 */
-  0, /*  95 */ 5, /*  96 */ 0, /*  97 */ 1, /*  98 */ 0, /*  99 */
-  2, /* 100 */ 0, /* 101 */ 1, /* 102 */ 0, /* 103 */ 3, /* 104 */
-  0, /* 105 */ 1, /* 106 */ 0, /* 107 */ 2, /* 108 */ 0, /* 109 */
-  1, /* 110 */ 0, /* 111 */ 4, /* 112 */ 0, /* 113 */ 1, /* 114 */
-  0, /* 115 */ 2, /* 116 */ 0, /* 117 */ 1, /* 118 */ 0, /* 119 */
-  3, /* 120 */ 0, /* 121 */ 1, /* 122 */ 0, /* 123 */ 2, /* 124 */
-  0, /* 125 */ 1, /* 126 */ 0, /* 127 */ 7, /* 128 */ 0, /* 129 */
-  1, /* 130 */ 0, /* 131 */ 2, /* 132 */ 0, /* 133 */ 1, /* 134 */
-  0, /* 135 */ 3, /* 136 */ 0, /* 137 */ 1, /* 138 */ 0, /* 139 */
-  2, /* 140 */ 0, /* 141 */ 1, /* 142 */ 0, /* 143 */ 4, /* 144 */
-  0, /* 145 */ 1, /* 146 */ 0, /* 147 */ 2, /* 148 */ 0, /* 149 */
-  1, /* 150 */ 0, /* 151 */ 3, /* 152 */ 0, /* 153 */ 1, /* 154 */
-  0, /* 155 */ 2, /* 156 */ 0, /* 157 */ 1, /* 158 */ 0, /* 159 */
-  5, /* 160 */ 0, /* 161 */ 1, /* 162 */ 0, /* 163 */ 2, /* 164 */
-  0, /* 165 */ 1, /* 166 */ 0, /* 167 */ 3, /* 168 */ 0, /* 169 */
-  1, /* 170 */ 0, /* 171 */ 2, /* 172 */ 0, /* 173 */ 1, /* 174 */
-  0, /* 175 */ 4, /* 176 */ 0, /* 177 */ 1, /* 178 */ 0, /* 179 */
-  2, /* 180 */ 0, /* 181 */ 1, /* 182 */ 0, /* 183 */ 3, /* 184 */
-  0, /* 185 */ 1, /* 186 */ 0, /* 187 */ 2, /* 188 */ 0, /* 189 */
-  1, /* 190 */ 0, /* 191 */ 6, /* 192 */ 0, /* 193 */ 1, /* 194 */
-  0, /* 195 */ 2, /* 196 */ 0, /* 197 */ 1, /* 198 */ 0, /* 199 */
-  3, /* 200 */ 0, /* 201 */ 1, /* 202 */ 0, /* 203 */ 2, /* 204 */
-  0, /* 205 */ 1, /* 206 */ 0, /* 207 */ 4, /* 208 */ 0, /* 209 */
-  1, /* 210 */ 0, /* 211 */ 2, /* 212 */ 0, /* 213 */ 1, /* 214 */
-  0, /* 215 */ 3, /* 216 */ 0, /* 217 */ 1, /* 218 */ 0, /* 219 */
-  2, /* 220 */ 0, /* 221 */ 1, /* 222 */ 0, /* 223 */ 5, /* 224 */
-  0, /* 225 */ 1, /* 226 */ 0, /* 227 */ 2, /* 228 */ 0, /* 229 */
-  1, /* 230 */ 0, /* 231 */ 3, /* 232 */ 0, /* 233 */ 1, /* 234 */
-  0, /* 235 */ 2, /* 236 */ 0, /* 237 */ 1, /* 238 */ 0, /* 239 */
-  4, /* 240 */ 0, /* 241 */ 1, /* 242 */ 0, /* 243 */ 2, /* 244 */
-  0, /* 245 */ 1, /* 246 */ 0, /* 247 */ 3, /* 248 */ 0, /* 249 */
-  1, /* 250 */ 0, /* 251 */ 2, /* 252 */ 0, /* 253 */ 1, /* 254 */
-  0, /* 255 */
-}; // end _Bitset_global
-
-# endif /* defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION) */
-
-_STLP_END_NAMESPACE
-
-#  undef __BITS_PER_WORD
-#  undef bitset
-
-#endif /*  _STLP_BITSET_C */
diff --git a/src/STLport/stl/_bitset.h b/src/STLport/stl/_bitset.h
deleted file mode 100644
index a2372fc..0000000
--- a/src/STLport/stl/_bitset.h
+++ /dev/null
@@ -1,768 +0,0 @@
-/*
- * Copyright (c) 1998
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_BITSET_H
-#define _STLP_BITSET_H
-
-// A bitset of size N has N % (sizeof(unsigned long) * CHAR_BIT) unused 
-// bits.  (They are the high- order bits in the highest word.)  It is
-// a class invariant of class bitset<> that those unused bits are
-// always zero.
-
-// Most of the actual code isn't contained in bitset<> itself, but in the 
-// base class _Base_bitset.  The base class works with whole words, not with
-// individual bits.  This allows us to specialize _Base_bitset for the
-// important special case where the bitset is only a single word.
-
-// The C++ standard does not define the precise semantics of operator[].
-// In this implementation the const version of operator[] is equivalent
-// to test(), except that it does no range checking.  The non-const version
-// returns a reference to a bit, again without doing any range checking.
-
-
-# ifndef _STLP_INTERNAL_ALGOBASE_H
-#  include <stl/_algobase.h>
-# endif
-
-# ifndef _STLP_INTERNAL_ALLOC_H
-#  include <stl/_alloc.h>
-# endif
-
-# ifndef _STLP_INTERNAL_ITERATOR_H
-#  include <stl/_iterator.h>
-# endif
-
-# ifndef _STLP_INTERNAL_UNINITIALIZED_H
-#  include <stl/_uninitialized.h>
-# endif
-
-# ifndef _STLP_RANGE_ERRORS_H
-#  include <stl/_range_errors.h>
-# endif
-
-# ifndef _STLP_STRING
-#  include <string>
-# endif
-
-# ifndef _STLP_ISTREAM
-#  include <istream>
-# endif
-
-#define __BITS_PER_WORD (CHAR_BIT*sizeof(unsigned long))
-#define __BITSET_WORDS(__n) ((__n + __BITS_PER_WORD - 1)/__BITS_PER_WORD)
-
-_STLP_BEGIN_NAMESPACE
-
-// structure to aid in counting bits
-template<class _Dummy> 
-class _Bs_G {
-public:
-  static unsigned char _S_bit_count[256];
-  // Mapping from 8 bit unsigned integers to the index of the first one
-  // bit:
-  static unsigned char _S_first_one[256];
-};
-
-//
-// Base class: general case.
-//
-
-template<size_t _Nw>
-struct _Base_bitset {
-  typedef unsigned long _WordT;
-
-  _WordT _M_w[_Nw];                // 0 is the least significant word.
-
-  _Base_bitset( void ) { _M_do_reset(); }
-
-  _Base_bitset(unsigned long __val) {
-    _M_do_reset();
-    _M_w[0] = __val;
-  }
-  
-  static size_t _STLP_CALL _S_whichword( size_t __pos ) {
-    return __pos / __BITS_PER_WORD;
-  }
-  static size_t _STLP_CALL _S_whichbyte( size_t __pos ) {
-    return (__pos % __BITS_PER_WORD) / CHAR_BIT;
-  }
-  static size_t _STLP_CALL _S_whichbit( size_t __pos ) {
-    return __pos % __BITS_PER_WORD;
-  }
-  static _WordT _STLP_CALL _S_maskbit( size_t __pos ) {
-    return __STATIC_CAST(_WordT,1) << _S_whichbit(__pos);
-  }
-
-  _WordT& _M_getword(size_t __pos)       { return _M_w[_S_whichword(__pos)]; }
-  _WordT  _M_getword(size_t __pos) const { return _M_w[_S_whichword(__pos)]; }
-
-  _WordT& _M_hiword()       { return _M_w[_Nw - 1]; }
-  _WordT  _M_hiword() const { return _M_w[_Nw - 1]; }
-
-  void _M_do_and(const _Base_bitset<_Nw>& __x) {
-    for ( size_t __i = 0; __i < _Nw; __i++ ) {
-      _M_w[__i] &= __x._M_w[__i];
-    }
-  }
-
-  void _M_do_or(const _Base_bitset<_Nw>& __x) {
-    for ( size_t __i = 0; __i < _Nw; __i++ ) {
-      _M_w[__i] |= __x._M_w[__i];
-    }
-  }
-
-  void _M_do_xor(const _Base_bitset<_Nw>& __x) {
-    for ( size_t __i = 0; __i < _Nw; __i++ ) {
-      _M_w[__i] ^= __x._M_w[__i];
-    }
-  }
-
-  void _M_do_left_shift(size_t __shift);
-
-  void _M_do_right_shift(size_t __shift);
-
-  void _M_do_flip() {
-    for ( size_t __i = 0; __i < _Nw; __i++ ) {
-      _M_w[__i] = ~_M_w[__i];
-    }
-  }
-
-  void _M_do_set() {
-    for ( size_t __i = 0; __i < _Nw; __i++ ) {
-      _M_w[__i] = ~__STATIC_CAST(_WordT,0);
-    }
-  }
-
-
-  void _M_do_reset() { memset(_M_w, 0, _Nw * sizeof(_WordT)); }
-
-  bool _M_is_equal(const _Base_bitset<_Nw>& __x) const {
-    for (size_t __i = 0; __i < _Nw; ++__i) {
-      if (_M_w[__i] != __x._M_w[__i])
-        return false;
-    }
-    return true;
-  }
-
-  bool _M_is_any() const {
-    for ( size_t __i = 0; __i < _Nw ; __i++ ) {
-      if ( _M_w[__i] != __STATIC_CAST(_WordT,0) )
-        return true;
-    }
-    return false;
-  }
-
-  size_t _M_do_count() const {
-    size_t __result = 0;
-    const unsigned char* __byte_ptr = (const unsigned char*)_M_w;
-    const unsigned char* __end_ptr = (const unsigned char*)(_M_w+_Nw);
-
-    while ( __byte_ptr < __end_ptr ) {
-      __result += _Bs_G<bool>::_S_bit_count[*__byte_ptr];
-      __byte_ptr++;
-    }
-    return __result;
-  }
-
-  unsigned long _M_do_to_ulong() const; 
-
-  // find first "on" bit
-  size_t _M_do_find_first(size_t __not_found) const;
-
-  // find the next "on" bit that follows "prev"
-  size_t _M_do_find_next(size_t __prev, size_t __not_found) const;
-};
-
-//
-// Base class: specialization for a single word.
-//
-
-_STLP_TEMPLATE_NULL
-struct _Base_bitset<1UL> {
-  typedef unsigned long _WordT;
-  typedef _Base_bitset<1UL> _Self;
-
-  _WordT _M_w;
-
-  _Base_bitset( void ) : _M_w(0) {}
-  _Base_bitset(unsigned long __val) : _M_w(__val) {}
-  
-  static size_t _STLP_CALL _S_whichword( size_t __pos ) {
-    return __pos / __BITS_PER_WORD ;
-  }
-  static size_t _STLP_CALL _S_whichbyte( size_t __pos ) {
-    return (__pos % __BITS_PER_WORD) / CHAR_BIT;
-  }
-  static size_t _STLP_CALL _S_whichbit( size_t __pos ) {
-    return __pos % __BITS_PER_WORD;
-  }
-  static _WordT _STLP_CALL _S_maskbit( size_t __pos ) {
-    return (__STATIC_CAST(_WordT,1)) << _S_whichbit(__pos);
-  }
-
-  _WordT& _M_getword(size_t)       { return _M_w; }
-  _WordT  _M_getword(size_t) const { return _M_w; }
-
-  _WordT& _M_hiword()       { return _M_w; }
-  _WordT  _M_hiword() const { return _M_w; }
-
-
-  void _M_do_and(const _Self& __x) { _M_w &= __x._M_w; }
-  void _M_do_or(const _Self& __x)  { _M_w |= __x._M_w; }
-  void _M_do_xor(const _Self& __x) { _M_w ^= __x._M_w; }
-  void _M_do_left_shift(size_t __shift)     { _M_w <<= __shift; }
-  void _M_do_right_shift(size_t __shift)    { _M_w >>= __shift; }
-  void _M_do_flip()                       { _M_w = ~_M_w; }
-  void _M_do_set()                        { _M_w = ~__STATIC_CAST(_WordT,0); }
-  void _M_do_reset()                      { _M_w = 0; }
-
-  bool _M_is_equal(const _Self& __x) const {
-    return _M_w == __x._M_w;
-  }
-  bool _M_is_any() const {
-    return _M_w != 0;
-  }
-
-  size_t _M_do_count() const {
-    size_t __result = 0;
-    const unsigned char* __byte_ptr = (const unsigned char*)&_M_w;
-    const unsigned char* __end_ptr = ((const unsigned char*)&_M_w)+sizeof(_M_w);
-    while ( __byte_ptr < __end_ptr ) {
-      __result += _Bs_G<bool>::_S_bit_count[*__byte_ptr];
-      __byte_ptr++;
-    }
-    return __result;
-  }
-
-  unsigned long _M_do_to_ulong() const { return _M_w; }
-
-  inline size_t _M_do_find_first(size_t __not_found) const;
-
-  // find the next "on" bit that follows "prev"
-  inline size_t _M_do_find_next(size_t __prev, size_t __not_found) const; 
-
-};
-
-
-// ------------------------------------------------------------
-//
-// Definitions of should-be-non-inline functions from the single-word version of
-//  _Base_bitset.
-//
-
-inline size_t 
-_Base_bitset<1UL>::_M_do_find_first(size_t __not_found) const
-{
-  //  typedef unsigned long _WordT;
-  _WordT __thisword = _M_w;
-
-  if ( __thisword != __STATIC_CAST(_WordT,0) ) {
-    // find byte within word
-    for ( size_t __j = 0; __j < sizeof(_WordT); __j++ ) {
-      unsigned char __this_byte
-        = __STATIC_CAST(unsigned char,(__thisword & (~(unsigned char)0)));
-      if ( __this_byte )
-        return __j*CHAR_BIT + _Bs_G<bool>::_S_first_one[__this_byte];
-
-      __thisword >>= CHAR_BIT;
-    }
-  }
-  // not found, so return a value that indicates failure.
-  return __not_found;
-}
-
-inline size_t 
-_Base_bitset<1UL>::_M_do_find_next(size_t __prev, 
-                                   size_t __not_found ) const
-{
-  // make bound inclusive
-  ++__prev;
-
-  // check out of bounds
-  if ( __prev >= __BITS_PER_WORD )
-    return __not_found;
-
-    // search first (and only) word
-  _WordT __thisword = _M_w;
-
-  // mask off bits below bound
-  __thisword &= (~__STATIC_CAST(_WordT,0)) << _S_whichbit(__prev);
-
-  if ( __thisword != __STATIC_CAST(_WordT,0) ) {
-    // find byte within word
-    // get first byte into place
-    __thisword >>= _S_whichbyte(__prev) * CHAR_BIT;
-    for ( size_t __j = _S_whichbyte(__prev); __j < sizeof(_WordT); __j++ ) {
-      unsigned char __this_byte
-        = __STATIC_CAST(unsigned char,(__thisword & (~(unsigned char)0)));
-      if ( __this_byte )
-        return __j*CHAR_BIT + _Bs_G<bool>::_S_first_one[__this_byte];
-
-      __thisword >>= CHAR_BIT;
-    }
-  }
-
-  // not found, so return a value that indicates failure.
-  return __not_found;
-} // end _M_do_find_next
-
-
-// ------------------------------------------------------------
-// Helper class to zero out the unused high-order bits in the highest word.
-
-template <size_t _Extrabits> struct _Sanitize {
-  static void _STLP_CALL _M_do_sanitize(unsigned long& __val)
-    { __val &= ~((~__STATIC_CAST(unsigned long,0)) << _Extrabits); }
-};
-
-_STLP_TEMPLATE_NULL struct _Sanitize<0UL> {
-  static void _STLP_CALL _M_do_sanitize(unsigned long) {}
-};
-
-// ------------------------------------------------------------
-// Class bitset.
-//   _Nb may be any nonzero number of type size_t.
-
-
-template<size_t _Nb>
-class bitset : public _Base_bitset<__BITSET_WORDS(_Nb) > 
-{
-public:
-  enum { _Words = __BITSET_WORDS(_Nb) } ;
-
-private:
-  typedef _Base_bitset< _Words > _Base;
-
-  void _M_do_sanitize() {
-    _Sanitize<_Nb%__BITS_PER_WORD >::_M_do_sanitize(this->_M_hiword());
-  }
-public:
-  typedef unsigned long _WordT;
-  struct reference;
-  friend struct reference;
-
-  // bit reference:
-  struct reference {
-  typedef _Base_bitset<_Words > _Bitset_base;
-  typedef bitset<_Nb> _Bitset;
-    //    friend _Bitset;
-    _WordT *_M_wp;
-    size_t _M_bpos;
-
-    // should be left undefined
-    reference() {}
-
-    reference( _Bitset& __b, size_t __pos ) {
-      _M_wp = &__b._M_getword(__pos);
-      _M_bpos = _Bitset_base::_S_whichbit(__pos);
-    }
-
-  public:
-    ~reference() {}
-
-    // for b[i] = __x;
-    reference& operator=(bool __x) {
-      if ( __x )
-        *_M_wp |= _Bitset_base::_S_maskbit(_M_bpos);
-      else
-        *_M_wp &= ~_Bitset_base::_S_maskbit(_M_bpos);
-
-      return *this;
-    }
-
-    // for b[i] = b[__j];
-    reference& operator=(const reference& __j) {
-      if ( (*(__j._M_wp) & _Bitset_base::_S_maskbit(__j._M_bpos)) )
-        *_M_wp |= _Bitset_base::_S_maskbit(_M_bpos);
-      else
-        *_M_wp &= ~_Bitset_base::_S_maskbit(_M_bpos);
-
-      return *this;
-    }
-
-    // flips the bit
-    bool operator~() const { return (*(_M_wp) & _Bitset_base::_S_maskbit(_M_bpos)) == 0; }
-
-    // for __x = b[i];
-    operator bool() const { return (*(_M_wp) & _Bitset_base::_S_maskbit(_M_bpos)) != 0; }
-
-    // for b[i].flip();
-    reference& flip() {
-      *_M_wp ^= _Bitset_base::_S_maskbit(_M_bpos);
-      return *this;
-    }
-  };
-
-  // 23.3.5.1 constructors:
-  bitset() {}
-
-  bitset(unsigned long __val) : _Base_bitset<_Words>(__val) { _M_do_sanitize(); }
-
-# ifdef _STLP_MEMBER_TEMPLATES
-  template<class _CharT, class _Traits, class _Alloc>
-  explicit bitset(const basic_string<_CharT,_Traits,_Alloc>& __s,
-                  size_t __pos = 0)
-    : _Base_bitset<_Words >() 
-  {
-    if (__pos > __s.size()) 
-      __stl_throw_out_of_range("bitset");
-    _M_copy_from_string(__s, __pos,
-                        basic_string<_CharT, _Traits, _Alloc>::npos);
-  }
-  template<class _CharT, class _Traits, class _Alloc>
-  bitset(const basic_string<_CharT, _Traits, _Alloc>& __s,
-          size_t __pos,
-          size_t __n)
-  : _Base_bitset<_Words >() 
-  {
-    if (__pos > __s.size()) 
-      __stl_throw_out_of_range("bitset");
-    _M_copy_from_string(__s, __pos, __n);
-  }
-#else /* _STLP_MEMBER_TEMPLATES */
-  explicit bitset(const string& __s,
-                  size_t __pos = 0,
-                  size_t __n = (size_t)-1) 
-    : _Base_bitset<_Words >() 
-  {
-    if (__pos > __s.size()) 
-      __stl_throw_out_of_range("bitset");
-    _M_copy_from_string(__s, __pos, __n);
-  }
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-  // 23.3.5.2 bitset operations:
-  bitset<_Nb>& operator&=(const bitset<_Nb>& __rhs) {
-    this->_M_do_and(__rhs);
-    return *this;
-  }
-
-  bitset<_Nb>& operator|=(const bitset<_Nb>& __rhs) {
-    this->_M_do_or(__rhs);
-    return *this;
-  }
-
-  bitset<_Nb>& operator^=(const bitset<_Nb>& __rhs) {
-    this->_M_do_xor(__rhs);
-    return *this;
-  }
-
-  bitset<_Nb>& operator<<=(size_t __pos) {
-    this->_M_do_left_shift(__pos);
-    this->_M_do_sanitize();
-    return *this;
-  }
-
-  bitset<_Nb>& operator>>=(size_t __pos) {
-    this->_M_do_right_shift(__pos);
-    this->_M_do_sanitize();
-    return *this;
-  }
-
-  //
-  // Extension:
-  // Versions of single-bit set, reset, flip, test with no range checking.
-  //
-
-  bitset<_Nb>& _Unchecked_set(size_t __pos) {
-    this->_M_getword(__pos) |= _Base_bitset<_Words > ::_S_maskbit(__pos);
-    return *this;
-  }
-
-  bitset<_Nb>& _Unchecked_set(size_t __pos, int __val) {
-    if (__val)
-      this->_M_getword(__pos) |= this->_S_maskbit(__pos);
-    else
-      this->_M_getword(__pos) &= ~ this->_S_maskbit(__pos);
-
-    return *this;
-  }
-
-  bitset<_Nb>& _Unchecked_reset(size_t __pos) {
-    this->_M_getword(__pos) &= ~ this->_S_maskbit(__pos);
-    return *this;
-  }
-
-  bitset<_Nb>& _Unchecked_flip(size_t __pos) {
-    this->_M_getword(__pos) ^= this->_S_maskbit(__pos);
-    return *this;
-  }
-
-  bool _Unchecked_test(size_t __pos) const {
-    return (this->_M_getword(__pos) & this->_S_maskbit(__pos)) != __STATIC_CAST(_WordT,0);
-  }
-
-  // Set, reset, and flip.
-
-  bitset<_Nb>& set() {
-    this->_M_do_set();
-    this->_M_do_sanitize();
-    return *this;
-  }
-
-  bitset<_Nb>& set(size_t __pos) {
-    if (__pos >= _Nb)
-      __stl_throw_out_of_range("bitset");
-    return _Unchecked_set(__pos);
-  }
-
-  bitset<_Nb>& set(size_t __pos, int __val) {
-    if (__pos >= _Nb)
-      __stl_throw_out_of_range("bitset");
-    return _Unchecked_set(__pos, __val);
-  }
-
-  bitset<_Nb>& reset() {
-    this->_M_do_reset();
-    return *this;
-  }
-
-  bitset<_Nb>& reset(size_t __pos) {
-    if (__pos >= _Nb)
-      __stl_throw_out_of_range("bitset");
-
-    return _Unchecked_reset(__pos);
-  }
-
-  bitset<_Nb>& flip() {
-    this->_M_do_flip();
-    this->_M_do_sanitize();
-    return *this;
-  }
-
-  bitset<_Nb>& flip(size_t __pos) {
-    if (__pos >= _Nb)
-      __stl_throw_out_of_range("bitset");
-
-    return _Unchecked_flip(__pos);
-  }
-
-  bitset<_Nb> operator~() const { 
-    return bitset<_Nb>(*this).flip();
-  }
-
-  // element access:
-  //for b[i];
-  reference operator[](size_t __pos) { return reference(*this,__pos); }
-  bool operator[](size_t __pos) const { return _Unchecked_test(__pos); }
-
-  unsigned long to_ulong() const { return this->_M_do_to_ulong(); }
-
-#if defined (_STLP_MEMBER_TEMPLATES) && !  defined (_STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS)
-  template <class _CharT, class _Traits, class _Alloc>
-  basic_string<_CharT, _Traits, _Alloc> to_string() const {
-    basic_string<_CharT, _Traits, _Alloc> __result;
-    _M_copy_to_string(__result);
-    return __result;
-  }
-#else
-  string to_string() const {
-    string __result;
-    _M_copy_to_string(__result);
-    return __result;
-  }
-#endif /* _STLP_EXPLICIT_FUNCTION_TMPL_ARGS */
-
-  size_t count() const { return this->_M_do_count(); }
-
-  size_t size() const { return _Nb; }
-
-  bool operator==(const bitset<_Nb>& __rhs) const {
-    return this->_M_is_equal(__rhs);
-  }
-  bool operator!=(const bitset<_Nb>& __rhs) const {
-    return !this->_M_is_equal(__rhs);
-  }
-
-  bool test(size_t __pos) const {
-    if (__pos >= _Nb)
-      __stl_throw_out_of_range("bitset");
-    
-    return _Unchecked_test(__pos);
-  }
-
-  bool any() const { return this->_M_is_any(); }
-  bool none() const { return !this->_M_is_any(); }
-
-  bitset<_Nb> operator<<(size_t __pos) const { 
-    bitset<_Nb> __result(*this);
-    __result <<= __pos ;  return __result; 
-  }
-  bitset<_Nb> operator>>(size_t __pos) const { 
-    bitset<_Nb> __result(*this);
-    __result >>= __pos ;  return __result; 
-  }
-
-  //
-  // EXTENSIONS: bit-find operations.  These operations are
-  // experimental, and are subject to change or removal in future
-  // versions.
-  // 
-
-  // find the index of the first "on" bit
-  size_t _Find_first() const 
-    { return this->_M_do_find_first(_Nb); }
-
-  // find the index of the next "on" bit after prev
-  size_t _Find_next( size_t __prev ) const 
-    { return this->_M_do_find_next(__prev, _Nb); }
-
-//
-// Definitions of should-be non-inline member functions.
-//
-# if defined (_STLP_MEMBER_TEMPLATES)
-  template<class _CharT, class _Traits, class _Alloc>
-    void _M_copy_from_string(const basic_string<_CharT,_Traits,_Alloc>& __s,
-			     size_t __pos,
-			     size_t __n) {
-#else
-    void _M_copy_from_string(const string& __s,
-			     size_t __pos,
-			     size_t __n) {
-      typedef char_traits<char> _Traits;
-#endif
-      reset();
-      size_t __tmp = _Nb;
-      const size_t __Nbits = (min) (__tmp, (min) (__n, __s.size() - __pos));
-      for ( size_t __i= 0; __i < __Nbits; ++__i) {
-        typename _Traits::int_type __k = _Traits::to_int_type(__s[__pos + __Nbits - __i - 1]);
-        // boris : widen() ?
-        if (__k == '1')
-          set(__i);
-        else if (__k !='0')
-          __stl_throw_invalid_argument("bitset");
-      }
-    }
-  
-# if defined (_STLP_MEMBER_TEMPLATES)
-  template <class _CharT, class _Traits, class _Alloc>
-    void _M_copy_to_string(basic_string<_CharT, _Traits, _Alloc>& __s) const
-# else
-    void _M_copy_to_string(string& __s) const
-# endif
-    {
-      __s.assign(_Nb, '0');
-      
-      for (size_t __i = 0; __i < _Nb; ++__i) 
-	if (_Unchecked_test(__i))
-	  __s[_Nb - 1 - __i] = '1';
-    }
-
-# if defined (_STLP_NON_TYPE_TMPL_PARAM_BUG)
-  bitset<_Nb> operator&(const bitset<_Nb>& __y) const {
-    bitset<_Nb> __result(*this);
-    __result &= __y;
-    return __result;
-  }
-  bitset<_Nb> operator|(const bitset<_Nb>& __y) const {
-    bitset<_Nb> __result(*this);
-    __result |= __y;
-    return __result;
-  }
-  bitset<_Nb> operator^(const bitset<_Nb>& __y) const {
-    bitset<_Nb> __result(*this);
-    __result ^= __y;
-    return __result;
-  }
-# endif 
-
-};
-
-// ------------------------------------------------------------
-//
-// 23.3.5.3 bitset operations:
-//
-
-# if ! defined (_STLP_NON_TYPE_TMPL_PARAM_BUG)
-
-template <size_t _Nb>
-inline bitset<_Nb>  _STLP_CALL
-operator&(const bitset<_Nb>& __x,
-          const bitset<_Nb>& __y) {
-  bitset<_Nb> __result(__x);
-  __result &= __y;
-  return __result;
-}
-
-
-template <size_t _Nb>
-inline bitset<_Nb>  _STLP_CALL
-operator|(const bitset<_Nb>& __x,
-          const bitset<_Nb>& __y) {
-  bitset<_Nb> __result(__x);
-  __result |= __y;
-  return __result;
-}
-
-template <size_t _Nb>
-inline bitset<_Nb>  _STLP_CALL
-operator^(const bitset<_Nb>& __x,
-          const bitset<_Nb>& __y) {
-  bitset<_Nb> __result(__x);
-  __result ^= __y;
-  return __result;
-}
-
-#if defined ( _STLP_USE_NEW_IOSTREAMS )
-
-template <class _CharT, class _Traits, size_t _Nb>
-basic_istream<_CharT, _Traits>&  _STLP_CALL
-operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x);
-
-
-template <class _CharT, class _Traits, size_t _Nb>
-basic_ostream<_CharT, _Traits>& _STLP_CALL
-operator<<(basic_ostream<_CharT, _Traits>& __os, const bitset<_Nb>& __x);
-
-#elif ! defined ( _STLP_USE_NO_IOSTREAMS )
-
-// (reg) For Watcom IO, this tells if ostream class is in .exe or in .dll
-template <size_t _Nb>
-_ISTREAM_DLL& _STLP_CALL
-operator>>(_ISTREAM_DLL& __is, bitset<_Nb>& __x);
-
-template <size_t _Nb>
-inline _OSTREAM_DLL&  _STLP_CALL operator<<(_OSTREAM_DLL& __os, const bitset<_Nb>& __x) {
-  string __tmp;
-  __x._M_copy_to_string(__tmp);
-  return __os << __tmp;
-}
-
-#endif
-
-# endif /* _STLP_NON_TYPE_TMPL_PARAM_BUG */
-
-#  undef  bitset
-
-
-_STLP_END_NAMESPACE
-
-#  undef __BITS_PER_WORD
-#  undef __BITSET_WORDS
-
-# if !defined (_STLP_LINK_TIME_INSTANTIATION)
-#  include <stl/_bitset.c>
-# endif
-
-#endif /* _STLP_BITSET_H */
-
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/stl/_bvector.h b/src/STLport/stl/_bvector.h
deleted file mode 100644
index 8aed5cd..0000000
--- a/src/STLport/stl/_bvector.h
+++ /dev/null
@@ -1,807 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_BVECTOR_H
-#define _STLP_INTERNAL_BVECTOR_H
-
-#ifndef _STLP_INTERNAL_VECTOR_H
-# include <stl/_vector.h>
-# endif
-
-#define __WORD_BIT (int(CHAR_BIT*sizeof(unsigned int)))
-
-_STLP_BEGIN_NAMESPACE 
-
-struct _Bit_reference {
-  unsigned int* _M_p;
-  unsigned int _M_mask;
-  _Bit_reference(unsigned int* __x, unsigned int __y) 
-    : _M_p(__x), _M_mask(__y) {}
-
-public:
-  _Bit_reference() : _M_p(0), _M_mask(0) {}
-
-  operator bool() const { 
-	  return !(!(*_M_p & _M_mask)); 
-  }
-  _Bit_reference& operator=(bool __x) {
-    if (__x)  *_M_p |= _M_mask;
-    else      *_M_p &= ~_M_mask;
-    return *this;
-  }
-  _Bit_reference& operator=(const _Bit_reference& __x) {
-	  return *this = bool(__x); 
-  }
-  bool operator==(const _Bit_reference& __x) const {
-	  return bool(*this) == bool(__x); 
-  }
-  bool operator<(const _Bit_reference& __x) const {
-    return !bool(*this) && bool(__x);
-  }
-
-  _Bit_reference& operator |= (bool __x) {
-	  if (__x)
-		  *_M_p |= _M_mask;
-	  return *this;
-  }
-  _Bit_reference& operator &= (bool __x) {
-	  if (!__x)
-		  *_M_p &= ~_M_mask;
-	  return *this;
-  }
-  void flip() { *_M_p ^= _M_mask; }
-};
-
-
-inline void swap(_Bit_reference& __x, _Bit_reference& __y)
-{
-  bool __tmp = (bool)__x;
-  __x = __y;
-  __y = __tmp;
-}
-
-struct _Bit_iterator_base;
-
-struct _Bit_iterator_base
-{
-  typedef ptrdiff_t difference_type;
-
-  unsigned int* _M_p;
-  unsigned int  _M_offset;
-
-  void _M_bump_up() {
-    if (_M_offset++ == __WORD_BIT - 1) {
-      _M_offset = 0;
-      ++_M_p;
-    }
-  }
-
-  void _M_bump_down() {
-    if (_M_offset-- == 0) {
-      _M_offset = __WORD_BIT - 1;
-      --_M_p;
-    }
-  }
-
-  _Bit_iterator_base() : _M_p(0), _M_offset(0) {}
-  _Bit_iterator_base(unsigned int* __x, unsigned int __y) : _M_p(__x), _M_offset(__y) {}
-  //  _Bit_iterator_base( const _Bit_iterator_base& __x) : _M_p(__x._M_p), _M_offset(__x._M_offset) {}
-  //  _Bit_iterator_base& operator = ( const _Bit_iterator_base& __x) { _M_p = __x._M_p ; _M_offset = __x._M_offset ; return *this; }
-
-  void _M_advance (difference_type __i) {
-    difference_type __n = __i + _M_offset;
-    _M_p += __n / __WORD_BIT;
-    __n = __n % __WORD_BIT;
-    if (__n < 0) {
-      _M_offset = (unsigned int) __n + __WORD_BIT;
-      --_M_p;
-    } else
-      _M_offset = (unsigned int) __n;
-  }
-
-  difference_type _M_subtract(const _Bit_iterator_base& __x) const {
-    return __WORD_BIT * (_M_p - __x._M_p) + _M_offset - __x._M_offset;
-  }
-};
-
-inline bool  _STLP_CALL operator==(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) {
-  return __y._M_p == __x._M_p && __y._M_offset == __x._M_offset;
-}
-inline bool  _STLP_CALL operator!=(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) {
-  return __y._M_p != __x._M_p || __y._M_offset != __x._M_offset;
-}
-
-inline bool _STLP_CALL operator<(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) {
-  return __x._M_p < __y._M_p || (__x._M_p == __y._M_p && __x._M_offset < __y._M_offset);
-}
-
-inline bool _STLP_CALL operator>(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y)  { 
-  return operator <(__y , __x); 
-}
-inline bool _STLP_CALL operator<=(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) { 
-  return !(__y < __x); 
-}
-inline bool _STLP_CALL operator>=(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) { 
-  return !(__x < __y); 
-}
-
-template <class _Ref, class _Ptr>
-struct _Bit_iter : public _Bit_iterator_base
-{
-  typedef _Ref  reference;
-  typedef _Ptr  pointer;
-  typedef _Bit_iter<_Ref, _Ptr> _Self;
-  typedef random_access_iterator_tag iterator_category;
-  typedef bool value_type;
-  typedef ptrdiff_t difference_type;
-  typedef size_t size_type;
-
-  _Bit_iter(unsigned int* __x, unsigned int __y) : _Bit_iterator_base(__x, __y) {}
-  _Bit_iter() {}
-
-  _Bit_iter(const _Bit_iter<_Bit_reference, _Bit_reference*>& __x): 
-    _Bit_iterator_base((const _Bit_iterator_base&)__x) {}
-
-  //  _Self& operator = (const _Bit_iter<_Bit_reference, _Bit_reference*>& __x)
-  //   { (_Bit_iterator_base&)*this = (const _Bit_iterator_base&)__x; return *this; }
-
-  reference operator*() const { 
-    return _Bit_reference(_M_p, 1UL << _M_offset); 
-  }
-  _Self& operator++() {
-    _M_bump_up();
-    return *this;
-  }
-  _Self operator++(int) {
-    _Self __tmp = *this;
-    _M_bump_up();
-    return __tmp;
-  }
-  _Self& operator--() {
-    _M_bump_down();
-    return *this;
-  }
-  _Self operator--(int) {
-    _Self __tmp = *this;
-    _M_bump_down();
-    return __tmp;
-  }
-  _Self& operator+=(difference_type __i) {
-    _M_advance(__i);
-    return *this;
-  }
-  _Self& operator-=(difference_type __i) {
-    *this += -__i;
-    return *this;
-  }
-  _Self operator+(difference_type __i) const {
-    _Self __tmp = *this;
-    return __tmp += __i;
-  }
-  _Self operator-(difference_type __i) const {
-    _Self __tmp = *this;
-    return __tmp -= __i;
-  }
-  difference_type operator-(const _Self& __x) const {
-    return _M_subtract(__x);
-  }
-  reference operator[](difference_type __i) { return *(*this + __i); }
-};
-
-template <class _Ref, class _Ptr>
-inline _Bit_iter<_Ref,_Ptr>  _STLP_CALL
-operator+(ptrdiff_t __n, const _Bit_iter<_Ref, _Ptr>& __x) {
-   return __x + __n;
-}
-
-# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES
-inline random_access_iterator_tag  iterator_category(const _Bit_iterator_base&) {return random_access_iterator_tag();}
-inline ptrdiff_t* distance_type(const _Bit_iterator_base&) {return (ptrdiff_t*)0;}
-inline bool* value_type(const _Bit_iter<_Bit_reference, _Bit_reference*>&) {return (bool*)0;}
-inline bool* value_type(const _Bit_iter<bool, const bool*>&) {return (bool*)0;}
-# endif
-
-typedef _Bit_iter<bool, const bool*> _Bit_const_iterator;
-typedef _Bit_iter<_Bit_reference, _Bit_reference*> _Bit_iterator;
-
-// Bit-vector base class, which encapsulates the difference between
-//  old SGI-style allocators and standard-conforming allocators.
-
-
-template <class _Alloc>
-class _Bvector_base
-{
-public:
-  _STLP_FORCE_ALLOCATORS(bool, _Alloc)
-  typedef typename _Alloc_traits<bool, _Alloc>::allocator_type allocator_type;
-  typedef unsigned int __chunk_type;
-  typedef typename _Alloc_traits<__chunk_type, 
-          _Alloc>::allocator_type __chunk_allocator_type;
-  allocator_type get_allocator() const { 
-    return _STLP_CONVERT_ALLOCATOR((const __chunk_allocator_type&)_M_end_of_storage, bool); 
-  }
-  static allocator_type __get_dfl_allocator() { return allocator_type(); }
-   
-  _Bvector_base(const allocator_type& __a)
-    : _M_start(), _M_finish(), _M_end_of_storage(_STLP_CONVERT_ALLOCATOR(__a, __chunk_type),
-						 (__chunk_type*)0) {
-  }
-  ~_Bvector_base() { _M_deallocate();
-  }
-
-protected:
-
-  unsigned int* _M_bit_alloc(size_t __n) 
-    { return _M_end_of_storage.allocate((__n + __WORD_BIT - 1)/__WORD_BIT); }
-  void _M_deallocate() {
-    if (_M_start._M_p)
-      _M_end_of_storage.deallocate(_M_start._M_p,
-				   _M_end_of_storage._M_data - _M_start._M_p);
-  }
-
-  _Bit_iterator _M_start;
-  _Bit_iterator _M_finish;
-  _STLP_alloc_proxy<__chunk_type*, __chunk_type, __chunk_allocator_type> _M_end_of_storage;  
-};
-
-
-// The next few lines are confusing.  What we're doing is declaring a
-//  partial specialization of vector<T, Alloc> if we have the necessary
-//  compiler support.  Otherwise, we define a class bit_vector which uses
-//  the default allocator. 
-
-#if defined(_STLP_CLASS_PARTIAL_SPECIALIZATION) && ! defined(_STLP_NO_BOOL) && ! defined (__SUNPRO_CC)
-# define _STLP_VECBOOL_TEMPLATE
-# define __BVEC_TMPL_HEADER template <class _Alloc>
-#else
-# undef _STLP_VECBOOL_TEMPLATE
-# ifdef _STLP_NO_BOOL
-#  define __BVEC_TMPL_HEADER
-# else
-#  define __BVEC_TMPL_HEADER _STLP_TEMPLATE_NULL
-# endif
-# if !(defined(__MRC__)||(defined(__SC__)&&!defined(__DMC__)))			//*TY 12/17/2000 - 
-#  define _Alloc _STLP_DEFAULT_ALLOCATOR(bool)
-# else
-#  define _Alloc allocator<bool>
-# endif
-#endif
-
-#ifdef _STLP_NO_BOOL
-# define __BVECTOR_QUALIFIED bit_vector
-# define __BVECTOR           bit_vector
-#else
-# ifdef _STLP_VECBOOL_TEMPLATE
-#  define __BVECTOR_QUALIFIED __WORKAROUND_DBG_RENAME(vector) <bool, _Alloc>
-# else
-#  define __BVECTOR_QUALIFIED __WORKAROUND_DBG_RENAME(vector) <bool, allocator<bool> >
-# endif
-#if defined (_STLP_PARTIAL_SPEC_NEEDS_TEMPLATE_ARGS)
-# define __BVECTOR __BVECTOR_QUALIFIED
-#else
-# define __BVECTOR __WORKAROUND_DBG_RENAME(vector)
-#endif
-#endif
-
-
-__BVEC_TMPL_HEADER
-class __BVECTOR_QUALIFIED : public _Bvector_base<_Alloc >
-{
-  typedef _Bvector_base<_Alloc > _Base;
-  typedef __BVECTOR_QUALIFIED _Self;
-public:
-  typedef bool value_type;
-  typedef size_t size_type;
-  typedef ptrdiff_t difference_type; 
-  typedef _Bit_reference reference;
-  typedef bool const_reference;
-  typedef _Bit_reference* pointer;
-  typedef const bool* const_pointer;
-  typedef random_access_iterator_tag _Iterator_category;
-
-  typedef _Bit_iterator                iterator;
-  typedef _Bit_const_iterator          const_iterator;
-
-#if defined ( _STLP_CLASS_PARTIAL_SPECIALIZATION )
-  typedef _STLP_STD::reverse_iterator<const_iterator> const_reverse_iterator;
-  typedef _STLP_STD::reverse_iterator<iterator> reverse_iterator;
-#else /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
-# if defined (_STLP_MSVC50_COMPATIBILITY)
-  typedef _STLP_STD::reverse_iterator<const_iterator, value_type, const_reference, 
-  const_pointer, difference_type> const_reverse_iterator;
-  typedef _STLP_STD::reverse_iterator<iterator, value_type, reference, reference*, 
-  difference_type> reverse_iterator;
-# else
-  typedef _STLP_STD::reverse_iterator<const_iterator, value_type, const_reference, 
-                                  difference_type> const_reverse_iterator;
-  typedef _STLP_STD::reverse_iterator<iterator, value_type, reference, difference_type>
-          reverse_iterator;
-# endif
-#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
-
-# ifdef _STLP_VECBOOL_TEMPLATE
-  typedef typename _Bvector_base<_Alloc >::allocator_type allocator_type;
-  typedef typename _Bvector_base<_Alloc >::__chunk_type __chunk_type ;
-# else
-  typedef _Bvector_base<_Alloc >::allocator_type allocator_type;
-  typedef _Bvector_base<_Alloc >::__chunk_type __chunk_type ;
-# endif
-
-protected:
-
-  void _M_initialize(size_type __n) {
-    unsigned int* __q = this->_M_bit_alloc(__n);
-    this->_M_end_of_storage._M_data = __q + (__n + __WORD_BIT - 1)/__WORD_BIT;
-    this->_M_start = iterator(__q, 0);
-    this->_M_finish = this->_M_start + difference_type(__n);
-  }
-  void _M_insert_aux(iterator __position, bool __x) {
-    if (this->_M_finish._M_p != this->_M_end_of_storage._M_data) {
-      __copy_backward(__position, this->_M_finish, this->_M_finish + 1, random_access_iterator_tag(), (difference_type*)0 );
-      *__position = __x;
-      ++this->_M_finish;
-    }
-    else {
-      size_type __len = size() ? 2 * size() : __WORD_BIT;
-      unsigned int* __q = this->_M_bit_alloc(__len);
-      iterator __i = copy(begin(), __position, iterator(__q, 0));
-      *__i++ = __x;
-      this->_M_finish = copy(__position, end(), __i);
-      this->_M_deallocate();
-      this->_M_end_of_storage._M_data = __q + (__len + __WORD_BIT - 1)/__WORD_BIT;
-      this->_M_start = iterator(__q, 0);
-    }
-  }
-
-#ifdef _STLP_MEMBER_TEMPLATES
-  template <class _InputIterator>
-  void _M_initialize_range(_InputIterator __first, _InputIterator __last,
-			const input_iterator_tag &) {
-    this->_M_start = iterator();
-    this->_M_finish = iterator();
-    this->_M_end_of_storage._M_data = 0;
-    for ( ; __first != __last; ++__first) 
-      push_back(*__first);
-  }
-
-  template <class _ForwardIterator>
-  void _M_initialize_range(_ForwardIterator __first, _ForwardIterator __last,
-                           const forward_iterator_tag &) {
-    size_type __n = distance(__first, __last);
-    _M_initialize(__n);
-    //    copy(__first, __last, _M_start);
-    copy(__first, __last, this->_M_start); // dwa 12/22/99 -- resolving ambiguous reference.
-  }
-
-  template <class _InputIterator>
-  void _M_insert_range(iterator __pos,
-                       _InputIterator __first, _InputIterator __last,
-                       const input_iterator_tag &) {
-    for ( ; __first != __last; ++__first) {
-      __pos = insert(__pos, *__first);
-      ++__pos;
-    }
-  }
-
-  template <class _ForwardIterator>
-  void _M_insert_range(iterator __position,
-                       _ForwardIterator __first, _ForwardIterator __last,
-                       const forward_iterator_tag &) {
-    if (__first != __last) {
-      size_type __n = distance(__first, __last);
-      if (capacity() - size() >= __n) {
-        __copy_backward(__position, end(), this->_M_finish + difference_type(__n), random_access_iterator_tag(), (difference_type*)0 );
-        copy(__first, __last, __position);
-        this->_M_finish += difference_type(__n);
-      }
-      else {
-        size_type __len = size() + (max)(size(), __n);
-        unsigned int* __q = this->_M_bit_alloc(__len);
-        iterator __i = copy(begin(), __position, iterator(__q, 0));
-        __i = copy(__first, __last, __i);
-        this->_M_finish = copy(__position, end(), __i);
-        this->_M_deallocate();
-        this->_M_end_of_storage._M_data = __q + (__len + __WORD_BIT - 1)/__WORD_BIT;
-        this->_M_start = iterator(__q, 0);
-      }
-    }
-  }      
-
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-public:
-  iterator begin() { return this->_M_start; }
-  const_iterator begin() const { return this->_M_start; }
-  iterator end() { return this->_M_finish; }
-  const_iterator end() const { return this->_M_finish; }
-
-  reverse_iterator rbegin() { return reverse_iterator(end()); }
-  const_reverse_iterator rbegin() const { 
-    return const_reverse_iterator(end()); 
-  }
-  reverse_iterator rend() { return reverse_iterator(begin()); }
-  const_reverse_iterator rend() const { 
-    return const_reverse_iterator(begin()); 
-  }
-
-  size_type size() const { return size_type(end() - begin()); }
-  size_type max_size() const { return size_type(-1); }
-  size_type capacity() const {
-    return size_type(const_iterator(this->_M_end_of_storage._M_data, 0) - begin());
-  }
-  bool empty() const { return begin() == end(); }
-  reference operator[](size_type __n) 
-  { return *(begin() + difference_type(__n)); }
-  const_reference operator[](size_type __n) const 
-  { return *(begin() + difference_type(__n)); }
-
-  void _M_range_check(size_type __n) const {
-    if (__n >= this->size())
-      __stl_throw_range_error("vector<bool>");
-  }
-
-  reference at(size_type __n)
-    { _M_range_check(__n); return (*this)[__n]; }
-  const_reference at(size_type __n) const
-    { _M_range_check(__n); return (*this)[__n]; }
-
-  explicit __BVECTOR(const allocator_type& __a = allocator_type())
-    : _Bvector_base<_Alloc >(__a) {}
-
-  __BVECTOR(size_type __n, bool __val,
-            const allocator_type& __a = 
-	    allocator_type())
-    : _Bvector_base<_Alloc >(__a)
-  {
-    _M_initialize(__n);
-    fill(this->_M_start._M_p, (__chunk_type*)(this->_M_end_of_storage._M_data), __val ? ~0 : 0);
-  }
-
-  explicit __BVECTOR(size_type __n)
-    : _Bvector_base<_Alloc >(allocator_type())
-  {
-    _M_initialize(__n);
-    fill(this->_M_start._M_p, (__chunk_type*)(this->_M_end_of_storage._M_data), 0);
-  }
-
-  __BVECTOR(const _Self& __x) : _Bvector_base<_Alloc >(__x.get_allocator()) {
-    _M_initialize(__x.size());
-    copy(__x.begin(), __x.end(), this->_M_start);
-  }
-
-#if defined (_STLP_MEMBER_TEMPLATES)
-  template <class _Integer>
-  void _M_initialize_dispatch(_Integer __n, _Integer __x, const __true_type&) {
-    _M_initialize(__n);
-    fill(this->_M_start._M_p, this->_M_end_of_storage._M_data, __x ? ~0 : 0);
-  }
-    
-  template <class _InputIterator>
-  void _M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
-                              const __false_type&) {
-    _M_initialize_range(__first, __last, _STLP_ITERATOR_CATEGORY(__first, _InputIterator));
-  }
-# ifdef _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS
-  // Check whether it's an integral type.  If so, it's not an iterator.
-  template <class _InputIterator>
-  __BVECTOR(_InputIterator __first, _InputIterator __last)
-    : _Base(allocator_type())
-  {
-    typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
-    _M_initialize_dispatch(__first, __last, _Integral());
-  }
-# endif
-  template <class _InputIterator>
-  __BVECTOR(_InputIterator __first, _InputIterator __last,
-            const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL)
-    : _Base(__a)
-  {
-    typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
-    _M_initialize_dispatch(__first, __last, _Integral());
-  }
-#else /* _STLP_MEMBER_TEMPLATES */
-  __BVECTOR(const_iterator __first, const_iterator __last,
-            const allocator_type& __a = allocator_type())
-    : _Bvector_base<_Alloc >(__a)
-  {
-    size_type __n = distance(__first, __last);
-    _M_initialize(__n);
-    copy(__first, __last, this->_M_start);
-  }
-  __BVECTOR(const bool* __first, const bool* __last,
-            const allocator_type& __a = allocator_type())
-    : _Bvector_base<_Alloc >(__a)
-  {
-    size_type __n = distance(__first, __last);
-    _M_initialize(__n);
-    copy(__first, __last, this->_M_start);
-  }
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-  ~__BVECTOR() { }
-
-  __BVECTOR_QUALIFIED& operator=(const __BVECTOR_QUALIFIED& __x) {
-    if (&__x == this) return *this;
-    if (__x.size() > capacity()) {
-      this->_M_deallocate();
-      _M_initialize(__x.size());
-    }
-    copy(__x.begin(), __x.end(), begin());
-    this->_M_finish = begin() + difference_type(__x.size());
-    return *this;
-  }
-
-  // assign(), a generalized assignment member function.  Two
-  // versions: one that takes a count, and one that takes a range.
-  // The range version is a member template, so we dispatch on whether
-  // or not the type is an integer.
-
-  void _M_fill_assign(size_t __n, bool __x) {
-    if (__n > size()) {
-      fill(this->_M_start._M_p, (__chunk_type*)(this->_M_end_of_storage._M_data), __x ? ~0 : 0);
-      insert(end(), __n - size(), __x);
-    }
-    else {
-      erase(begin() + __n, end());
-      fill(this->_M_start._M_p, (__chunk_type*)(this->_M_end_of_storage._M_data), __x ? ~0 : 0);
-    }
-  }
-  void assign(size_t __n, bool __x) { _M_fill_assign(__n, __x); }
-
-#ifdef _STLP_MEMBER_TEMPLATES
-
-  template <class _InputIterator>
-  void assign(_InputIterator __first, _InputIterator __last) {
-    typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
-    _M_assign_dispatch(__first, __last, _Integral());
-  }
-
-  template <class _Integer>
-  void _M_assign_dispatch(_Integer __n, _Integer __val, const __true_type&)
-    { _M_fill_assign((size_t) __n, (bool) __val); }
-
-  template <class _InputIter>
-  void _M_assign_dispatch(_InputIter __first, _InputIter __last, const __false_type&)
-    { _M_assign_aux(__first, __last, _STLP_ITERATOR_CATEGORY(__first, _InputIter)); }
-
-  template <class _InputIterator>
-  void _M_assign_aux(_InputIterator __first, _InputIterator __last,
-                     const input_iterator_tag &) {
-    iterator __cur = begin();
-    for ( ; __first != __last && __cur != end(); ++__cur, ++__first)
-      *__cur = *__first;
-    if (__first == __last)
-      erase(__cur, end());
-    else
-      insert(end(), __first, __last);
-  }
-
-  template <class _ForwardIterator>
-  void _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
-                     const forward_iterator_tag &) {
-    size_type __len = distance(__first, __last);
-    if (__len < size())
-      erase(copy(__first, __last, begin()), end());
-    else {
-      _ForwardIterator __mid = __first;
-      advance(__mid, size());
-      copy(__first, __mid, begin());
-      insert(end(), __mid, __last);
-    }
-  }    
-
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-  void reserve(size_type __n) {
-    if (capacity() < __n) {
-      unsigned int* __q = this->_M_bit_alloc(__n);
-      _Bit_iterator __z(__q, 0);
-      this->_M_finish = copy(begin(), end(), __z);
-      this->_M_deallocate();
-      this->_M_start = iterator(__q, 0);
-      this->_M_end_of_storage._M_data = __q + (__n + __WORD_BIT - 1)/__WORD_BIT;
-    }
-  }
-
-  reference front() { return *begin(); }
-  const_reference front() const { return *begin(); }
-  reference back() { return *(end() - 1); }
-  const_reference back() const { return *(end() - 1); }
-  void push_back(bool __x) {
-    if (this->_M_finish._M_p != this->_M_end_of_storage._M_data) {
-      *(this->_M_finish) = __x;
-      ++this->_M_finish;
-    }
-    else
-      _M_insert_aux(end(), __x);
-  }
-  void swap(__BVECTOR_QUALIFIED& __x) {
-    _STLP_STD::swap(this->_M_start, __x._M_start);
-    _STLP_STD::swap(this->_M_finish, __x._M_finish);
-    _STLP_STD::swap(this->_M_end_of_storage, __x._M_end_of_storage);
-  }
-  iterator insert(iterator __position, bool __x = bool()) {
-    difference_type __n = __position - begin();
-    if (this->_M_finish._M_p != this->_M_end_of_storage._M_data && __position == end()) {
-      *(this->_M_finish) = __x;
-      ++this->_M_finish;
-    }
-    else
-      _M_insert_aux(__position, __x);
-    return begin() + __n;
-  }
-
-#if defined ( _STLP_MEMBER_TEMPLATES )
-
-  template <class _Integer>
-  void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x,
-                          const __true_type&) {
-    _M_fill_insert(__pos, (size_type) __n, (bool) __x);
-  }
-
-  template <class _InputIterator>
-  void _M_insert_dispatch(iterator __pos,
-                          _InputIterator __first, _InputIterator __last,
-                          const __false_type&) {
-    _M_insert_range(__pos, __first, __last, _STLP_ITERATOR_CATEGORY(__first, _InputIterator));
-  }
-
-  // Check whether it's an integral type.  If so, it's not an iterator.
-  template <class _InputIterator>
-  void insert(iterator __position,
-              _InputIterator __first, _InputIterator __last) {
-    typedef typename _Is_integer<_InputIterator>::_Integral _Is_Integral;
-    _M_insert_dispatch(__position, __first, __last, _Is_Integral());
-  }
-#else /* _STLP_MEMBER_TEMPLATES */
-  void insert(iterator __position,
-              const_iterator __first, const_iterator __last) {
-    if (__first == __last) return;
-    size_type __n = distance(__first, __last);
-    if (capacity() - size() >= __n) {
-      __copy_backward(__position, end(), this->_M_finish + __n,
-                      random_access_iterator_tag(), (difference_type*)0 );
-      copy(__first, __last, __position);
-      this->_M_finish += __n;
-    }
-    else {
-      size_type __len = size() + (max)(size(), __n);
-      unsigned int* __q = this->_M_bit_alloc(__len);
-      iterator __i = copy(begin(), __position, iterator(__q, 0));
-      __i = copy(__first, __last, __i);
-      this->_M_finish = copy(__position, end(), __i);
-      this->_M_deallocate();
-      this->_M_end_of_storage._M_data = __q + (__len + __WORD_BIT - 1)/__WORD_BIT;
-      this->_M_start = iterator(__q, 0);
-    }
-  }
-
-  void insert(iterator __position, const bool* __first, const bool* __last) {
-    if (__first == __last) return;
-    size_type __n = distance(__first, __last);
-    if (capacity() - size() >= __n) {
-      __copy_backward(__position, end(), this->_M_finish + __n, 
-                      random_access_iterator_tag(), (difference_type*)0 );
-      copy(__first, __last, __position);
-      this->_M_finish += __n;
-    }
-    else {
-      size_type __len = size() + (max)(size(), __n);
-      unsigned int* __q = this->_M_bit_alloc(__len);
-      iterator __i = copy(begin(), __position, iterator(__q, 0));
-      __i = copy(__first, __last, __i);
-      this->_M_finish = copy(__position, end(), __i);
-      this->_M_deallocate();
-      this->_M_end_of_storage._M_data = __q + (__len + __WORD_BIT - 1)/__WORD_BIT;
-      this->_M_start = iterator(__q, 0);
-    }
-  }
-#endif /* _STLP_MEMBER_TEMPLATES */
-  
-  void _M_fill_insert(iterator __position, size_type __n, bool __x) {
-    if (__n == 0) return;
-    if (capacity() - size() >= __n) {
-      __copy_backward(__position, end(), this->_M_finish + difference_type(__n), random_access_iterator_tag(), (difference_type*)0 );
-      fill(__position, __position + difference_type(__n), __x);
-      this->_M_finish += difference_type(__n);
-    }
-    else {
-      size_type __len = size() + (max)(size(), __n);
-      unsigned int* __q = this->_M_bit_alloc(__len);
-      iterator __i = copy(begin(), __position, iterator(__q, 0));
-      fill_n(__i, __n, __x);
-      this->_M_finish = copy(__position, end(), __i + difference_type(__n));
-      this->_M_deallocate();
-      this->_M_end_of_storage._M_data = __q + (__len + __WORD_BIT - 1)/__WORD_BIT;
-      this->_M_start = iterator(__q, 0);
-    }
-  }
-
-  void insert(iterator __position, size_type __n, bool __x) {
-    _M_fill_insert(__position, __n, __x);
-  }
-
-  void pop_back() {
-      --this->_M_finish; 
-  }
-  iterator erase(iterator __position) {
-    if (__position + 1 != end())
-      copy(__position + 1, end(), __position);
-      --this->_M_finish;
-    return __position;
-  }
-  iterator erase(iterator __first, iterator __last) {
-    this->_M_finish = copy(__last, end(), __first);
-    return __first;
-  }
-  void resize(size_type __new_size, bool __x = bool()) {
-    if (__new_size < size()) 
-      erase(begin() + difference_type(__new_size), end());
-    else
-      insert(end(), __new_size - size(), __x);
-  }
-  void flip() {
-    for (unsigned int* __p = this->_M_start._M_p; __p != this->_M_end_of_storage._M_data; ++__p)
-      *__p = ~*__p;
-  }
-
-  void clear() { erase(begin(), end()); }
-};
-
-# if defined  ( _STLP_NO_BOOL ) || defined (__HP_aCC) // fixed soon (03/17/2000)
- 
-#define _STLP_TEMPLATE_HEADER __BVEC_TMPL_HEADER
-#define _STLP_TEMPLATE_CONTAINER __BVECTOR_QUALIFIED
-#include <stl/_relops_cont.h>
-#undef _STLP_TEMPLATE_CONTAINER
-#undef _STLP_TEMPLATE_HEADER
-  
-# endif /* NO_BOOL */
-  
-#if !defined (_STLP_NO_BOOL)
-// This typedef is non-standard.  It is provided for backward compatibility.
-  typedef __WORKAROUND_DBG_RENAME(vector) <bool, allocator<bool> > bit_vector;
-#endif
-
-_STLP_END_NAMESPACE
-
-#undef _Alloc
-#undef _STLP_VECBOOL_TEMPLATE
-#undef __BVECTOR
-#undef __BVECTOR_QUALIFIED
-#undef __BVEC_TMPL_HEADER
-
-# undef __WORD_BIT
-
-#endif /* _STLP_INTERNAL_BVECTOR_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/stl/_check_config.h b/src/STLport/stl/_check_config.h
deleted file mode 100644
index 923c4ba..0000000
--- a/src/STLport/stl/_check_config.h
+++ /dev/null
@@ -1,37 +0,0 @@
-// This file is reserved to site configuration purpose
-// and should NEVER be overridden by user
-
-# if defined ( _STLP_NO_OWN_IOSTREAMS )
-
-// User choose not to use SGI iostreams, which means no
-// precompiled library will be used and he is free to override
-// any STLport configuration flags
-
-# else
-
-// The following will be defined in stl_config.h :
-// # define _STLP_OWN_IOSTREAMS 1
-# endif
-
-/*
- *  Consistency check : if we use SGI iostreams, we have to use consistent
- *  thread model (single-threaded or multi-threaded) with the compiled library
- *  
- *  Default is multithreaded build. If you want to build and use single-threaded
- *  STLport, please change _STLP_NOTHREADS configuration setting above and rebuild the library
- *
- */
-
-# if defined (_STLP_OWN_IOSTREAMS) \
-  && !defined (_STLP_NO_THREADS) && !defined (_REENTRANT)
-
-#  if defined(_MSC_VER) && !defined(__MWERKS__) && !defined (__COMO__) && !defined(_MT)
-#   error "Only multi-threaded runtime library may be linked with STLport!"  
-#  endif
-
-// boris : you may change that to build non-threadsafe STLport library
-#  if defined (__BUILDING_STLPORT) /* || defined (_STLP_DEBUG) */
-#   define _REENTRANT 1
-#  endif
-
-# endif
diff --git a/src/STLport/stl/_cmath.h b/src/STLport/stl/_cmath.h
deleted file mode 100644
index b9a5ab4..0000000
--- a/src/STLport/stl/_cmath.h
+++ /dev/null
@@ -1,208 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_CMATH_H_HEADER
-# define _STLP_CMATH_H_HEADER
-
-# include <cmath>
-
-_STLP_BEGIN_NAMESPACE
-
-# ifdef _STLP_SAME_FUNCTION_NAME_RESOLUTION_BUG
-
-// this proxy is needed for some compilers to resolve problems
-// calling sqrt() from within sqrt(), etc.
-template <class _Tp>
-struct _STL_math_proxy {
-  static inline _Tp _do_abs(const _Tp& __x)     { return _STLP_VENDOR_CSTD::fabs(__x); } 
-  static inline _Tp _do_acos(const _Tp& __x)    { return _STLP_VENDOR_CSTD::acos(__x); } 
-  static inline _Tp _do_asin(const _Tp& __x)    { return _STLP_VENDOR_CSTD::asin(__x); } 
-  static inline _Tp _do_atan(const _Tp& __x)    { return _STLP_VENDOR_CSTD::atan(__x); } 
-  static inline _Tp _do_atan2(const _Tp& __x, const _Tp& __y)  { return _STLP_VENDOR_CSTD::atan2(__x, __y); } 
-  static inline _Tp _do_cos(const _Tp& __x)     { return _STLP_VENDOR_CSTD::cos(__x); } 
-  static inline _Tp _do_cosh(const _Tp& __x)    { return _STLP_VENDOR_CSTD::cosh(__x); } 
-  static inline _Tp _do_floor(const _Tp& __x)    { return _STLP_VENDOR_CSTD::floor(__x); } 
-  static inline _Tp _do_ceil(const _Tp& __x)    { return _STLP_VENDOR_CSTD::ceil(__x); } 
-  static inline _Tp _do_fmod(const _Tp& __x, const _Tp& __y)    { return _STLP_VENDOR_CSTD::fmod(__x, __y); } 
-  static inline _Tp _do_frexp(const _Tp& __x, int* __y)    { return _STLP_VENDOR_CSTD::frexp(__x, __y); } 
-  static inline _Tp _do_ldexp(const _Tp& __x, int __y)    { return _STLP_VENDOR_CSTD::ldexp(__x, __y); } 
-  static inline _Tp _do_modf(const _Tp& __x, double* __y) { return _STLP_VENDOR_CSTD::modf(__x, __y); }
-  static inline _Tp _do_log(const _Tp& __x)     { return _STLP_VENDOR_CSTD::log(__x); } 
-  static inline _Tp _do_log10(const _Tp& __x)   { return _STLP_VENDOR_CSTD::log10(__x); } 
-  static inline _Tp _do_pow(const _Tp& __x, const _Tp& __y)    { return _STLP_VENDOR_CSTD::pow(__x, __y); } 
-  static inline _Tp _do_pow(const _Tp& __x, int __y)    { return _STLP_VENDOR_CSTD::pow(__x, __y); } 
-  static inline _Tp _do_sin(const _Tp& __x)     { return _STLP_VENDOR_CSTD::sin(__x); } 
-  static inline _Tp _do_sinh(const _Tp& __x)    { return _STLP_VENDOR_CSTD::sinh(__x); } 
-
-  static inline _Tp _do_sqrt(const _Tp& __x)    { return _STLP_VENDOR_CSTD::sqrt(__x); } 
-  static inline _Tp _do_tan(const _Tp& __x)     { return _STLP_VENDOR_CSTD::tan(__x); } 
-  static inline _Tp _do_tanh(const _Tp& __x)    { return _STLP_VENDOR_CSTD::tanh(__x); } 
-  static inline _Tp _do_exp(const _Tp& __x)     { return _STLP_VENDOR_CSTD::exp(__x); } 
-  static inline _Tp _do_hypot(const _Tp& __x, const _Tp& __y)   { return _STLP_VENDOR_CSTD::hypot(__x, __y); } 
-};
-
-#  define _STLP_DO_ABS(_Tp)   _STL_math_proxy<_Tp>::_do_abs
-#  define _STLP_DO_ACOS(_Tp)  _STL_math_proxy<_Tp>::_do_acos
-#  define _STLP_DO_ASIN(_Tp)  _STL_math_proxy<_Tp>::_do_asin
-#  define _STLP_DO_ATAN(_Tp)  _STL_math_proxy<_Tp>::_do_atan
-#  define _STLP_DO_ATAN2(_Tp) _STL_math_proxy<_Tp>::_do_atan2
-#  define _STLP_DO_COS(_Tp)   _STL_math_proxy<_Tp>::_do_cos
-#  define _STLP_DO_COSH(_Tp)  _STL_math_proxy<_Tp>::_do_cosh
-#  define _STLP_DO_FLOOR(_Tp) _STL_math_proxy<_Tp>::_do_floor
-#  define _STLP_DO_CEIL(_Tp) _STL_math_proxy<_Tp>::_do_ceil
-#  define _STLP_DO_FMOD(_Tp) _STL_math_proxy<_Tp>::_do_fmod
-#  define _STLP_DO_FREXP(_Tp) _STL_math_proxy<_Tp>::_do_frexp
-#  define _STLP_DO_LDEXP(_Tp) _STL_math_proxy<_Tp>::_do_ldexp
-#  define _STLP_DO_MODF(_Tp) _STL_math_proxy<_Tp>::_do_modf
-#  define _STLP_DO_LOG(_Tp)   _STL_math_proxy<_Tp>::_do_log
-#  define _STLP_DO_LOG10(_Tp) _STL_math_proxy<_Tp>::_do_log10
-#  define _STLP_DO_POW(_Tp)   _STL_math_proxy<_Tp>::_do_pow
-#  define _STLP_DO_SIN(_Tp)   _STL_math_proxy<_Tp>::_do_sin
-#  define _STLP_DO_SINH(_Tp)  _STL_math_proxy<_Tp>::_do_sinh
-#  define _STLP_DO_SQRT(_Tp)  _STL_math_proxy<_Tp>::_do_sqrt
-#  define _STLP_DO_TAN(_Tp)   _STL_math_proxy<_Tp>::_do_tan
-#  define _STLP_DO_TANH(_Tp)  _STL_math_proxy<_Tp>::_do_tanh
-#  define _STLP_DO_EXP(_Tp)   _STL_math_proxy<_Tp>::_do_exp
-#  define _STLP_DO_HYPOT(_Tp) _STL_math_proxy<_Tp>::_do_hypot
-# else
-
-#  define _STLP_DO_ABS(_Tp)   _STLP_VENDOR_CSTD::fabs
-#  define _STLP_DO_ACOS(_Tp)  _STLP_VENDOR_CSTD::acos
-#  define _STLP_DO_ASIN(_Tp)  _STLP_VENDOR_CSTD::asin
-#  define _STLP_DO_ATAN(_Tp)  _STLP_VENDOR_CSTD::atan
-#  define _STLP_DO_ATAN2(_Tp) _STLP_VENDOR_CSTD::atan2
-#  define _STLP_DO_COS(_Tp)   _STLP_VENDOR_CSTD::cos
-#  define _STLP_DO_COSH(_Tp)  _STLP_VENDOR_CSTD::cosh
-#  define _STLP_DO_FLOOR(_Tp)  _STLP_VENDOR_CSTD::floor
-#  define _STLP_DO_CEIL(_Tp)   _STLP_VENDOR_CSTD::ceil
-#  define _STLP_DO_FMOD(_Tp)   _STLP_VENDOR_CSTD::fmod
-#  define _STLP_DO_FREXP(_Tp) _STLP_VENDOR_CSTD::frexp
-#  define _STLP_DO_LDEXP(_Tp) _STLP_VENDOR_CSTD::ldexp
-#  define _STLP_DO_MODF(_Tp) _STLP_VENDOR_CSTD::modf
-#  define _STLP_DO_LOG(_Tp)   _STLP_VENDOR_CSTD::log
-#  define _STLP_DO_LOG10(_Tp) _STLP_VENDOR_CSTD::log10
-#  define _STLP_DO_POW(_Tp)   _STLP_VENDOR_CSTD::pow
-#  define _STLP_DO_SIN(_Tp)   _STLP_VENDOR_CSTD::sin
-#  define _STLP_DO_SINH(_Tp)  _STLP_VENDOR_CSTD::sinh
-#  define _STLP_DO_SQRT(_Tp)  _STLP_VENDOR_CSTD::sqrt
-#  define _STLP_DO_TAN(_Tp)   _STLP_VENDOR_CSTD::tan
-#  define _STLP_DO_TANH(_Tp)  _STLP_VENDOR_CSTD::tanh
-#  define _STLP_DO_EXP(_Tp)   _STLP_VENDOR_CSTD::exp
-//# if defined (__GNUC__) || defined ( __IBMCPP__ ) || defined (__SUNPRO_CC) || defined (__HP_aCC) || (_MSC_VER >= 1310)
-#  define _STLP_DO_HYPOT(_Tp) ::hypot
-// # else
-// #  define _STLP_DO_HYPOT(_Tp) _STLP_VENDOR_CSTD::hypot
-// # endif
-
-# endif
-
-_STLP_END_NAMESPACE
-
-# if (defined (_STLP_HAS_NO_NEW_C_HEADERS) || defined(_STLP_MSVC) || defined (__ICL)) && !defined (_STLP_HAS_NO_NAMESPACES)
-
-#if ! defined (_STLP_USE_NEW_C_HEADERS) 
-
-_STLP_BEGIN_NAMESPACE
-
-#  ifndef _STLP_HAS_NATIVE_FLOAT_ABS
-inline double abs(double __x)                 { return _STLP_DO_ABS(double)(__x); }
-inline float abs (float __x)                  { return _STLP_DO_ABS(float)(__x); }
-#  endif
-
-inline double pow(double __x, int __y)        { return _STLP_DO_POW(double)(__x, __y); }
-inline float acos (float __x)                 { return _STLP_DO_ACOS(float)(__x); }
-inline float asin (float __x)                 { return _STLP_DO_ASIN(float)(__x); }
-inline float atan (float __x)                 { return _STLP_DO_ATAN(float)(__x); }
-inline float atan2(float __x, float __y)      { return _STLP_DO_ATAN2(float)(__x, __y); }
-inline float ceil (float __x)                 { return _STLP_DO_CEIL(float)(__x); }
-inline float cos (float __x)                  { return _STLP_DO_COS(float)(__x); }
-inline float cosh (float __x)                 { return _STLP_DO_COSH(float)(__x); }
-inline float exp (float __x)                  { return _STLP_DO_EXP(float)(__x); }
-# ifdef _STLP_USE_NAMESPACES
-inline float fabs (float __x)                 { return _STLP_DO_ABS(float)(__x); }
-# endif
-inline float floor(float __x)                 { return _STLP_DO_FLOOR(float)(__x); }
-inline float fmod (float __x, float __y)      { return _STLP_DO_FMOD(float)(__x, __y); }
-inline float frexp(float __x, int* __y)       { return _STLP_DO_FREXP(float)(__x, __y); }
-inline float ldexp(float __x, int __y)        { return _STLP_DO_LDEXP(float)(__x, __y); }
-// fbp : float versions are not always available
-#if !defined(_STLP_VENDOR_LONG_DOUBLE_MATH)		//*ty 11/25/2001 - 
-inline float modf (float __x, float* __y)     { 
-  double __dd[2]; 
-  double __res = _STLP_DO_MODF(double)((double)__x, __dd); 
-  __y[0] = (float)__dd[0] ; __y[1] = (float)__dd[1]; 
-  return (float)__res; 
-}
-#else		//*ty 11/25/2001 - i.e. for apple SCpp
-inline float modf (float __x, float* __y)     { 
-  long double __dd[2]; 
-  long double __res = _STLP_DO_MODF(long double)((long double)__x, __dd); 
-  __y[0] = (float)__dd[0] ; __y[1] = (float)__dd[1]; 
-  return (float)__res; 
-}
-#endif		//*ty 11/25/2001 - 
-
-inline float log (float __x)                  { return _STLP_DO_LOG(float)(__x); }
-inline float log10(float __x)                 { return _STLP_DO_LOG10(float)(__x); }
-inline float pow (float __x, float __y)       { return _STLP_DO_POW(float)(__x, __y); }
-inline float pow (float __x, int __y)         { return _STLP_DO_POW(float)(__x, __y); }
-inline float sin (float __x)                  { return _STLP_DO_SIN(float)(__x); }
-inline float sinh (float __x)                 { return _STLP_DO_SINH(float)(__x); }
-inline float sqrt (float __x)                 { return _STLP_DO_SQRT(float)(__x); }
-inline float tan (float __x)                  { return _STLP_DO_TAN(float)(__x); }
-inline float tanh (float __x)                 { return _STLP_DO_TANH(float)(__x); }
-
-#  if ! (defined  (_STLP_NO_LONG_DOUBLE) || defined(_STLP_VENDOR_LONG_DOUBLE_MATH))
-
-#if !defined (__MVS__)
-inline long double abs (long double __x)                  { return _STLP_DO_ABS(long double)((double)__x); }
-#endif
-inline long double acos (long double __x)                 { return _STLP_DO_ACOS(long double)(__x); }
-inline long double asin (long double __x)                 { return _STLP_DO_ASIN(long double)(__x); }
-inline long double atan (long double __x)                 { return _STLP_DO_ATAN(long double)(__x); }
-inline long double atan2(long double __x, long double __y)      { return _STLP_DO_ATAN2(long double)(__x, __y); }
-inline long double ceil (long double __x)                 { return _STLP_DO_CEIL(long double)(__x); }
-inline long double cos (long double __x)                  { return _STLP_DO_COS(long double)(__x); }
-inline long double cosh (long double __x)                 { return _STLP_DO_COSH(long double)(__x); }
-inline long double exp (long double __x)                  { return _STLP_DO_EXP(long double)(__x); }
-inline long double fabs (long double __x)                 { return _STLP_DO_ABS(long double)(__x); }
-inline long double floor(long double __x)                 { return _STLP_DO_FLOOR(long double)(__x); }
-inline long double fmod (long double __x, long double __y)      { return _STLP_DO_FMOD(long double)(__x, __y); }
-inline long double frexp(long double __x, int* __y)       { return _STLP_DO_FREXP(long double)(__x, __y); }
-inline long double ldexp(long double __x, int __y)        { return _STLP_DO_LDEXP(long double)(__x, __y); }
-// fbp : long double versions are not available
-inline long double modf (long double __x, long double* __y)     { 
-  double __dd[2]; 
-  double __res = _STLP_DO_MODF(double)((double)__x, __dd); 
-  __y[0] = (long double)__dd[0] ; __y[1] = (long double)__dd[1]; 
-  return (long double)__res; 
-}
-inline long double log (long double __x)                  { return _STLP_DO_LOG(long double)(__x); }
-inline long double log10(long double __x)                 { return _STLP_DO_LOG10(long double)(__x); }
-inline long double pow (long double __x, long double __y)       { return _STLP_DO_POW(long double)(__x, __y); }
-inline long double pow (long double __x, int __y)         { return _STLP_DO_POW(long double)(__x, __y); }
-inline long double sin (long double __x)                  { return _STLP_DO_SIN(long double)(__x); }
-inline long double sinh (long double __x)                 { return _STLP_DO_SINH(long double)(__x); }
-inline long double sqrt (long double __x)                 { return _STLP_DO_SQRT(long double)(__x); }
-inline long double tan (long double __x)                  { return _STLP_DO_TAN(long double)(__x); }
-inline long double tanh (long double __x)                 { return _STLP_DO_TANH(long double)(__x); }
-#  endif
-
-_STLP_END_NAMESPACE
-
-# endif /* NEW_C_HEADERS */
-# endif /* NEW_C_HEADERS */
-
-#endif /* CMATH_H */
diff --git a/src/STLport/stl/_codecvt.h b/src/STLport/stl/_codecvt.h
deleted file mode 100644
index 48e2702..0000000
--- a/src/STLport/stl/_codecvt.h
+++ /dev/null
@@ -1,307 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-// WARNING: This is an internal header file, included by other C++
-// standard library headers.  You should not attempt to use this header
-// file directly.
-
-
-#ifndef _STLP_INTERNAL_CODECVT_H
-#define _STLP_INTERNAL_CODECVT_H
-
-# ifndef _STLP_C_LOCALE_H
-#  include <stl/c_locale.h>
-# endif
-# ifndef _STLP_INTERNAL_LOCALE_H
-#  include <stl/_locale.h>
-# endif
-
-_STLP_BEGIN_NAMESPACE
-
-class _STLP_CLASS_DECLSPEC codecvt_base {
-public:
-  enum result {ok, partial, error, noconv};
-};
-
-template <class _InternT, class _ExternT, class _StateT>
-class codecvt : public locale::facet, public codecvt_base {
-  typedef _InternT intern_type;
-  typedef _ExternT extern_type;
-  typedef _StateT state_type;
-};
- 
-template <class _InternT, class _ExternT, class _StateT>
-class codecvt_byname : public codecvt<_InternT, _ExternT, _StateT> {};
-
-_STLP_TEMPLATE_NULL
-class _STLP_CLASS_DECLSPEC codecvt<char, char, mbstate_t>
-  : public locale::facet, public codecvt_base 
-{
-  friend class _Locale;
-public:
-  typedef char       intern_type;
-  typedef char       extern_type;
-  typedef mbstate_t  state_type;
-
-  explicit codecvt(size_t __refs = 0) : _BaseFacet(__refs) {}
-
-  result out(state_type&  __state,
-             const char*  __from,
-             const char*  __from_end,
-             const char*& __from_next,
-             char*        __to,
-             char*        __to_limit, 
-             char*&       __to_next) const {
-    return do_out(__state, 
-                  __from, __from_end, __from_next,
-                  __to,   __to_limit, __to_next);
-  }
-
-  result unshift(mbstate_t& __state,
-                 char* __to, char* __to_limit, char*& __to_next) const
-    { return do_unshift(__state, __to, __to_limit, __to_next); }
-    
-  result in(state_type&   __state,
-            const char*  __from,
-            const char*  __from_end,  
-            const char*& __from_next,
-            char*        __to, 
-            char*        __to_limit, 
-            char*&       __to_next) const {
-    return do_in(__state,
-                 __from, __from_end, __from_next,
-                 __to,   __to_limit, __to_next);
-  }
-
-  int encoding() const _STLP_NOTHROW { return do_encoding(); }
-
-  bool always_noconv() const _STLP_NOTHROW { return do_always_noconv(); }
-
-  int length(const state_type& __state,
-             const char* __from, const char* __end,
-             size_t __max) const
-    { return do_length(__state, __from, __end, __max); }
-  
-  int max_length() const _STLP_NOTHROW { return do_max_length(); }
-
-  _STLP_STATIC_MEMBER_DECLSPEC static locale::id id;
-
-protected:
-  ~codecvt();
-
-  virtual result do_out(mbstate_t&   /* __state */,
-                        const char*  __from,
-                        const char*  /* __from_end */,
-                        const char*& __from_next,
-                        char*        __to,
-                        char*        /* __to_limit */,
-                        char*&       __to_next) const;
-
-  virtual result do_in (mbstate_t&   /* __state */ , 
-                        const char*  __from,
-                        const char*  /* __from_end */,
-                        const char*& __from_next,
-                        char*        __to,
-                        char*        /* __to_end */,
-                        char*&       __to_next) const;
-
-  virtual result do_unshift(mbstate_t& /* __state */,
-                            char*      __to,
-                            char*      /* __to_limit */,
-                            char*&     __to_next) const;
-
-  virtual int do_encoding() const _STLP_NOTHROW;
-  virtual bool do_always_noconv() const _STLP_NOTHROW;
-  virtual int do_length(const mbstate_t&         __state,
-                        const  char* __from, 
-                        const  char* __end,
-                        size_t __max) const;
-  virtual int do_max_length() const _STLP_NOTHROW;
-private:
-  codecvt(const codecvt<char, char, mbstate_t>&);
-  codecvt<char, char, mbstate_t>& operator =(const codecvt<char, char, mbstate_t>&); 
-};
-
-# ifndef _STLP_NO_WCHAR_T
- 
-_STLP_TEMPLATE_NULL
-class _STLP_CLASS_DECLSPEC codecvt<wchar_t, char, mbstate_t>
-  : public locale::facet, public codecvt_base
-{
-  friend class _Locale;
-public:
-  typedef wchar_t    intern_type;
-  typedef char       extern_type;
-  typedef mbstate_t  state_type;
-
-  explicit codecvt(size_t __refs = 0) : _BaseFacet(__refs) {}
-
-  result out(mbstate_t       __state,
-             const wchar_t*  __from,
-             const wchar_t*  __from_end,
-             const wchar_t*& __from_next,
-             char*           __to,
-             char*           __to_limit,
-             char*&          __to_next) const {
-    return do_out(__state,
-                  __from, __from_end, __from_next, 
-                  __to,   __to_limit, __to_next);
-  }
-
-  result unshift(mbstate_t& __state,
-                 char*  __to, char*  __to_limit, char*& __to_next) const {
-    return do_unshift(__state, __to, __to_limit, __to_next);
-  }
-    
-  result in(mbstate_t    __state,
-            const char*  __from,
-            const char*  __from_end,  
-            const char*& __from_next,
-            wchar_t*     __to, 
-            wchar_t*     __to_limit, 
-            wchar_t*&    __to_next) const {
-    return do_in(__state, 
-                 __from, __from_end, __from_next,
-                 __to,  __to_limit, __to_next);
-  }
-
-  int encoding() const _STLP_NOTHROW { return do_encoding(); }
-
-  bool always_noconv() const _STLP_NOTHROW { return do_always_noconv(); }
-
-  int length(const mbstate_t&        __state,
-             const char* __from,
-             const char* __end,
-             size_t             __max) const
-    { return do_length(__state, __from, __end, __max); }
-  
-  int max_length() const _STLP_NOTHROW { return do_max_length(); }
-
-  _STLP_STATIC_MEMBER_DECLSPEC static locale::id id;
-
-protected:
-  ~codecvt();
-
-  virtual result do_out(mbstate_t&         __state,
-                        const wchar_t*  __from,
-                        const wchar_t*  __from_end,
-                        const wchar_t*& __from_next,
-                        char*        __to,
-                        char*        __to_limit,
-                        char*&       __to_next) const;
-
-  virtual result do_in (mbstate_t&         __state,
-                        const char*  __from,
-                        const char*  __from_end,
-                        const char*& __from_next,
-                        wchar_t*        __to,
-                        wchar_t*        __to_limit,
-                        wchar_t*&       __to_next) const;
-
-  virtual result do_unshift(mbstate_t&   __state,
-                            char*  __to, 
-                            char*  __to_limit,
-                            char*& __to_next) const;
-
-  virtual int do_encoding() const _STLP_NOTHROW;
-
-  virtual bool do_always_noconv() const _STLP_NOTHROW;
-  
-  virtual int do_length(const mbstate_t& __state,
-                        const  char* __from, 
-                        const  char* __end,
-                        size_t __max) const;
-
-  virtual int do_max_length() const _STLP_NOTHROW;
-
-private:
-  codecvt(const codecvt<wchar_t, char, mbstate_t>&);
-  codecvt<wchar_t, char, mbstate_t>& operator = (const codecvt<wchar_t, char, mbstate_t>&);  
-};
-
-# endif
-
-_STLP_TEMPLATE_NULL
-class _STLP_CLASS_DECLSPEC codecvt_byname<char, char, mbstate_t>
-  : public codecvt<char, char, mbstate_t> {
-public:
-  explicit codecvt_byname(const char* __name, size_t __refs = 0);
-  ~codecvt_byname();
-private:
-  codecvt_byname(const codecvt_byname<char, char, mbstate_t>&);
-  codecvt_byname<char, char, mbstate_t>& operator =(const codecvt_byname<char, char, mbstate_t>&);  
-};
-
-# ifndef _STLP_NO_WCHAR_T
-_STLP_TEMPLATE_NULL
-class codecvt_byname<wchar_t, char, mbstate_t>
-  : public codecvt<wchar_t, char, mbstate_t> 
-{
-public:
-  explicit codecvt_byname(const char * __name, size_t __refs = 0);    
-
-protected:
-  ~codecvt_byname();
-
-  virtual result do_out(mbstate_t&         __state,
-                        const wchar_t*  __from,
-                        const wchar_t*  __from_end,
-                        const wchar_t*& __from_next,
-                        char*        __to,
-                        char*        __to_limit,
-                        char*&       __to_next) const;
-
-  virtual result do_in (mbstate_t&         __state,
-                        const char*  __from,
-                        const char*  __from_end,
-                        const char*& __from_next,
-                        wchar_t*        __to,
-                        wchar_t*        __to_limit,
-                        wchar_t*&       __to_next) const;
-
-  virtual result do_unshift(mbstate_t&   __state,
-                            char*  __to, 
-                            char*  __to_limit,
-                            char*& __to_next) const;
-
-  virtual int do_encoding() const _STLP_NOTHROW;
-
-  virtual bool do_always_noconv() const _STLP_NOTHROW;
-  
-  virtual int do_length(const mbstate_t&         __state,
-                        const  char* __from, 
-                        const  char* __end,
-                        size_t __max) const;
-
-  virtual int do_max_length() const _STLP_NOTHROW;
-
-private:
-  _Locale_ctype* _M_ctype;
-  codecvt_byname(const codecvt_byname<wchar_t, char, mbstate_t>&);
-  codecvt_byname<wchar_t, char, mbstate_t>& operator =(const codecvt_byname<wchar_t, char, mbstate_t>&);  
-};
-
-# endif
-
-_STLP_END_NAMESPACE
-
-#endif /* _STLP_INTERNAL_CODECVT_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/stl/_collate.h b/src/STLport/stl/_collate.h
deleted file mode 100644
index 6ad23c3..0000000
--- a/src/STLport/stl/_collate.h
+++ /dev/null
@@ -1,182 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-// WARNING: This is an internal header file, included by other C++
-// standard library headers.  You should not attempt to use this header
-// file directly.
-
-#ifndef _STLP_INTERNAL_COLLATE_H
-#define _STLP_INTERNAL_COLLATE_H
-
-#ifndef _STLP_C_LOCALE_H
-# include <stl/c_locale.h>
-#endif
-
-#ifndef _STLP_INTERNAL_LOCALE_H
-# include <stl/_locale.h>
-#endif
-
-#ifndef _STLP_STRING_H
-# include <stl/_string.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-
-template <class _CharT> class collate {};
-template <class _CharT> class collate_byname {};
-
-_STLP_TEMPLATE_NULL
-class _STLP_CLASS_DECLSPEC collate<char> : public locale::facet 
-{
-  friend class _Locale;
-public:
-  typedef char   char_type;
-  typedef string string_type;
-
-  explicit collate(size_t __refs = 0) : _BaseFacet(__refs) {}
-
-  int compare(const char* __low1, const char* __high1,
-              const char* __low2, const char* __high2) const {
-    return do_compare( __low1, __high1, __low2, __high2);
-  }
-
-  string_type transform(const char* __low, const char* __high) const {
-    return do_transform(__low, __high);
-  }
-
-  long hash(const char* __low, const char* __high) const
-    { return do_hash(__low, __high); }
-
-  _STLP_STATIC_MEMBER_DECLSPEC static locale::id id;
-
-protected:
-  ~collate();
-
-  virtual int do_compare(const char*, const char*,
-                         const char*, const char*) const;
-  virtual string_type do_transform(const char*, const char*) const;
-  virtual long do_hash(const char*, const char*) const;
-private:
-  collate(const collate<char>&);
-  collate<char>& operator =(const collate<char>&);  
-};
-
-# ifndef _STLP_NO_WCHAR_T
-
-_STLP_TEMPLATE_NULL
-class _STLP_CLASS_DECLSPEC collate<wchar_t> : public locale::facet 
-{
-  friend class _Locale;
-public:
-  typedef wchar_t char_type;
-  typedef wstring string_type;
-
-  explicit collate(size_t __refs = 0) : _BaseFacet(__refs) {}
-
-  int compare(const wchar_t* __low1, const wchar_t* __high1,
-              const wchar_t* __low2, const wchar_t* __high2) const {
-    return do_compare( __low1, __high1, __low2, __high2);
-  }
-
-  string_type transform(const wchar_t* __low, const wchar_t* __high) const {
-    return do_transform(__low, __high);
-  }
-
-  long hash(const wchar_t* __low, const wchar_t* __high) const
-    { return do_hash(__low, __high); }
-
-  _STLP_STATIC_MEMBER_DECLSPEC static locale::id id;
-
-protected:
-  ~collate();
-
-  virtual int do_compare(const wchar_t*, const wchar_t*,
-                         const wchar_t*, const wchar_t*) const;
-  virtual string_type do_transform(const wchar_t*, const wchar_t*) const;
-  virtual long do_hash(const wchar_t* __low, const wchar_t* __high) const;
-private:
-  collate(const collate<wchar_t>&);
-  collate<wchar_t>& operator = (const collate<wchar_t>&);  
-};
-
-# endif /* NO_WCHAR_T */
-
-_STLP_TEMPLATE_NULL
-class _STLP_CLASS_DECLSPEC collate_byname<char>: public collate<char> 
-{
-public:
-  explicit collate_byname(const char* __name, size_t __refs = 0);
-
-protected:
-  ~collate_byname();
-
-  virtual int do_compare(const char*, const char*,
-                         const char*, const char*) const;
-  virtual string_type do_transform(const char*, const char*) const;
-
-private:
-  _Locale_collate* _M_collate;
-  collate_byname(const collate_byname<char>&);
-  collate_byname<char>& operator =(const collate_byname<char>&);  
-};
-
-# ifndef _STLP_NO_WCHAR_T
-
-_STLP_TEMPLATE_NULL
-class _STLP_CLASS_DECLSPEC collate_byname<wchar_t>: public collate<wchar_t> 
-{
-public:
-  explicit collate_byname(const char * __name, size_t __refs = 0);
-
-protected:
-  ~collate_byname();
-
-  virtual int do_compare(const wchar_t*, const wchar_t*,
-                         const wchar_t*, const wchar_t*) const;
-  virtual string_type do_transform(const wchar_t*, const wchar_t*) const;
-
-private:
-  _Locale_collate* _M_collate;
-  collate_byname(const collate_byname<wchar_t>&);
-  collate_byname<wchar_t>& operator =(const collate_byname<wchar_t>&);  
-};
-
-# endif /* NO_WCHAR_T */
-
-
-template <class _CharT>
-bool 
-__locale_do_operator_call (const locale* __that, 
-                           const basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> >& __x,
-                           const basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> >& __y) 
-{
-  collate<_CharT>* __f = (collate<_CharT>*)__that->_M_get_facet(collate<_CharT>::id);
-  if (!__f)
-    __that->_M_throw_runtime_error();
-  return __f->compare(__x.data(), __x.data() + __x.size(),
-                      __y.data(), __y.data() + __y.size()) < 0;
-  
-}
-
-_STLP_END_NAMESPACE
-
-#endif /* _STLP_INTERNAL_COLLATE_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_complex.c b/src/STLport/stl/_complex.c
deleted file mode 100644
index 804766e..0000000
--- a/src/STLport/stl/_complex.c
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-#ifndef _STLP_COMPLEX_C
-#define _STLP_COMPLEX_C
-
-# ifndef _STLP_internal_complex_h
-#  include <stl/_complex.h>
-# endif
-
-#include <istream>
-
-#ifdef _STLP_USE_NEW_IOSTREAMS
-# include <sstream>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-// Non-inline member functions.
-
-template <class _Tp>
-void complex<_Tp>::_div(const _Tp& __z1_r, const _Tp& __z1_i,
-                        const _Tp& __z2_r, const _Tp& __z2_i,
-                        _Tp& __res_r, _Tp& __res_i) {
-  _Tp __ar = __z2_r >= 0 ? __z2_r : -__z2_r;
-  _Tp __ai = __z2_i >= 0 ? __z2_i : -__z2_i;
-
-  if (__ar <= __ai) {
-    _Tp __ratio = __z2_r / __z2_i;
-    _Tp __denom = __z2_i * (1 + __ratio * __ratio);
-    __res_r = (__z1_r * __ratio + __z1_i) / __denom;
-    __res_i = (__z1_i * __ratio - __z1_r) / __denom;
-  }
-  else {
-    _Tp __ratio = __z2_i / __z2_r;
-    _Tp __denom = __z2_r * (1 + __ratio * __ratio);
-    __res_r = (__z1_r + __z1_i * __ratio) / __denom;
-    __res_i = (__z1_i - __z1_r * __ratio) / __denom;
-  }
-}
-
-template <class _Tp>
-void complex<_Tp>::_div(const _Tp& __z1_r,
-                        const _Tp& __z2_r, const _Tp& __z2_i,
-                        _Tp& __res_r, _Tp& __res_i) {
-  _Tp __ar = __z2_r >= 0 ? __z2_r : -__z2_r;
-  _Tp __ai = __z2_i >= 0 ? __z2_i : -__z2_i;
-
-  if (__ar <= __ai) {
-    _Tp __ratio = __z2_r / __z2_i;
-    _Tp __denom = __z2_i * (1 + __ratio * __ratio);
-    __res_r = (__z1_r * __ratio) / __denom;
-    __res_i = - __z1_r / __denom;
-  }
-  else {
-    _Tp __ratio = __z2_i / __z2_r;
-    _Tp __denom = __z2_r * (1 + __ratio * __ratio);
-    __res_r = __z1_r / __denom;
-    __res_i = - (__z1_r * __ratio) / __denom;
-  }
-}
-
-// I/O.
-
-#ifdef _STLP_USE_NEW_IOSTREAMS
-
-// Complex output, in the form (re,im).  We use a two-step process 
-// involving stringstream so that we get the padding right.  
-template <class _Tp, class _CharT, class _Traits>
-basic_ostream<_CharT, _Traits>& _STLP_CALL
-operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __z)
-{
-  basic_ostringstream<_CharT, _Traits, allocator<_CharT> > __tmp;
-  __tmp.flags(__os.flags());
-  __tmp.imbue(__os.getloc());
-  __tmp.precision(__os.precision());
-  __tmp << '(' << __z.real() << ',' << __z.imag() << ')';
-  return __os << __tmp.str();
-}
-
-// Complex input from arbitrary streams.  Note that results in some
-// locales may be confusing, since the decimal character varies with
-// locale and the separator between real and imaginary parts does not.
-
-template <class _Tp, class _CharT, class _Traits>
-basic_istream<_CharT, _Traits>& _STLP_CALL
-operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __z)
-{
-  _Tp  __re = 0;
-  _Tp  __im = 0;
-
-  // typedef ctype<_CharT> _Ctype;
-  //  locale __loc = __is.getloc();
-  //const _Ctype&  __c_type  = use_facet<_Ctype>(__loc);
-  const ctype<_CharT>& __c_type = *(const ctype<_CharT>*)__is._M_ctype_facet();
-
-  char   __punct[4] = "(,)";
-  _CharT __wpunct[3];
-  __c_type.widen(__punct, __punct + 3, __wpunct);
-
-  _CharT __c;
-
-  __is >> __c;
-  if (_Traits::eq(__c, __wpunct[0])) {  // Left paren
-    __is >> __re >> __c;
-    if (_Traits::eq(__c, __wpunct[1]))  // Comma
-      __is >> __im >> __c;
-    if (!_Traits::eq(__c, __wpunct[2])) // Right paren
-      __is.setstate(ios_base::failbit);
-  }
-  else {
-    __is.putback(__c);
-    __is >> __re;
-  }
-
-  if (__is)
-    __z = complex<_Tp>(__re, __im);
-  return __is;
-}
-
-
-#else /* _STLP_USE_NEW_IOSTREAMS */
-
-template <class _Tp>
-ostream& _STLP_CALL operator<<(ostream& s, const complex<_Tp>& __z)
-{
-  return s << "( " << __z._M_re <<", " << __z._M_im <<")";
-}
-
-template <class _Tp>
-istream& _STLP_CALL operator>>(istream& s, complex<_Tp>& a)
-{
-  _Tp re = 0, im = 0;
-  char 	c = 0;
-
-  s >> c;
-  if (c == '(') {
-    s >> re >> c;
-    if (c == ',') s >> im >> c;
-    if (c != ')') s.clear(ios::badbit);
-  }
-  else {
-    s.putback(c);
-    s >> re;
-  }
-
-  if (s) a = complex<_Tp>(re, im);
-  return s;
-}
-
-#endif /* _STLP_USE_NEW_IOSTREAMS */
-
-_STLP_END_NAMESPACE
-
-#endif /* _STLP_COMPLEX_C */
diff --git a/src/STLport/stl/_complex.h b/src/STLport/stl/_complex.h
deleted file mode 100644
index d019116..0000000
--- a/src/STLport/stl/_complex.h
+++ /dev/null
@@ -1,969 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-#ifndef _STLP_internal_complex_h
-#define _STLP_internal_complex_h
-
-// This header declares the template class complex, as described in 
-// in the draft C++ standard.  Single-precision complex numbers
-// are complex<float>, double-precision are complex<double>, and
-// quad precision are complex<long double>.
-
-// Note that the template class complex is declared within namespace
-// std, as called for by the draft C++ standard.  
-
-#include <stl/_cmath.h>
-#include <iosfwd>
-
-_STLP_BEGIN_NAMESPACE
-
-#if !defined(_STLP_NO_COMPLEX_SPECIALIZATIONS)		//*TY 02/25/2000 - added for MPW compiler workaround
-
-template <class _Tp> struct complex;
-
-_STLP_TEMPLATE_NULL  struct _STLP_CLASS_DECLSPEC complex<float>;
-_STLP_TEMPLATE_NULL  struct _STLP_CLASS_DECLSPEC complex<double>;
-# ifndef _STLP_NO_LONG_DOUBLE
-_STLP_TEMPLATE_NULL  struct _STLP_CLASS_DECLSPEC complex<long double>;
-# endif
-# endif
-
-template <class _Tp>
-struct complex {
-  typedef _Tp value_type;
-  typedef complex<_Tp> _Self;
-
-  // Constructors, destructor, assignment operator.
-  complex() : _M_re(0), _M_im(0) {}
-  complex(const value_type& __x)
-    : _M_re(__x), _M_im(0) {}
-  complex(const value_type& __x, const value_type& __y)
-    : _M_re(__x), _M_im(__y) {}
-  complex(const _Self& __z)
-    : _M_re(__z._M_re), _M_im(__z._M_im) {}
-
-  _Self& operator=(const _Self& __z) {
-    _M_re = __z._M_re;
-    _M_im = __z._M_im;
-    return *this;
-  }
-
-#if defined (_STLP_MEMBER_TEMPLATES) && ( defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER) || defined(_STLP_NO_COMPLEX_SPECIALIZATIONS))
-  template <class _Tp2>
-  explicit complex(const complex<_Tp2>& __z)
-    : _M_re(__z._M_re), _M_im(__z._M_im) {}
-
-  template <class _Tp2>
-  _Self& operator=(const complex<_Tp2>& __z) {
-    _M_re = __z._M_re;
-    _M_im = __z._M_im;
-    return *this;
-  }
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-  // Element access.
-  value_type real() const { return _M_re; }
-  value_type imag() const { return _M_im; }
-
-  // Arithmetic op= operations involving one real argument.
-
-  _Self& operator= (const value_type& __x) {
-    _M_re = __x;
-    _M_im = 0;
-    return *this;
-  }
-  _Self& operator+= (const value_type& __x) {
-    _M_re += __x;
-    return *this;
-  }
-  _Self& operator-= (const value_type& __x) {
-    _M_re -= __x;
-    return *this;
-  }
-  _Self& operator*= (const value_type& __x) {
-    _M_re *= __x;
-    _M_im *= __x;
-    return *this;
-  }
-  _Self& operator/= (const value_type& __x) {
-    _M_re /= __x;
-    _M_im /= __x;
-    return *this;
-  }
-
-  // Arithmetic op= operations involving two complex arguments.
-
-  static void  _STLP_CALL _div(const value_type& __z1_r, const value_type& __z1_i,
-                   const value_type& __z2_r, const value_type& __z2_i,
-                   value_type& __res_r, value_type& __res_i);
-
-  static void _STLP_CALL _div(const value_type& __z1_r, 
-                   const value_type& __z2_r, const value_type& __z2_i,
-                   value_type& __res_r, value_type& __res_i);
-
-#if defined ( _STLP_MEMBER_TEMPLATES ) // && defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
-
-  template <class _Tp2> _Self& operator+= (const complex<_Tp2>& __z) {
-    _M_re += __z._M_re;
-    _M_im += __z._M_im;
-    return *this;
-  }
-
-  template <class _Tp2> _Self& operator-= (const complex<_Tp2>& __z) {
-    _M_re -= __z._M_re;
-    _M_im -= __z._M_im;
-    return *this;
-  }
-
-  template <class _Tp2> _Self& operator*= (const complex<_Tp2>& __z) {
-    value_type __r = _M_re * __z._M_re - _M_im * __z._M_im;
-    value_type __i = _M_re * __z._M_im + _M_im * __z._M_re;
-    _M_re = __r;
-    _M_im = __i;
-    return *this;
-  }
-
-  template <class _Tp2> _Self& operator/= (const complex<_Tp2>& __z) {
-    value_type __r;
-    value_type __i;
-    _div(_M_re, _M_im, __z._M_re, __z._M_im, __r, __i);
-    _M_re = __r;
-    _M_im = __i;
-    return *this;
-  }
-
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-  _Self& operator+= (const _Self& __z) {
-    _M_re += __z._M_re;
-    _M_im += __z._M_im;
-    return *this;
-  }
-
-  _Self& operator-= (const _Self& __z) {
-    _M_re -= __z._M_re;
-    _M_im -= __z._M_im;
-    return *this;
-  }
-  
-  _Self& operator*= (const _Self& __z) {
-    value_type __r = _M_re * __z._M_re - _M_im * __z._M_im;
-    value_type __i = _M_re * __z._M_im + _M_im * __z._M_re;
-    _M_re = __r;
-    _M_im = __i;
-    return *this;
-  }
-
-  _Self& operator/= (const _Self& __z) {
-    value_type __r;
-    value_type __i;
-    _div(_M_re, _M_im, __z._M_re, __z._M_im, __r, __i);
-    _M_re = __r;
-    _M_im = __i;
-    return *this;
-  }
-
-  // Data members.
-  value_type _M_re;
-  value_type _M_im;
-};
-
-#if !defined(_STLP_NO_COMPLEX_SPECIALIZATIONS)		//*TY 02/25/2000 - added for MPW compiler workaround
-// Explicit specializations for float, double, long double.  The only
-// reason for these specializations is to enable automatic conversions
-// from complex<float> to complex<double>, and complex<double> to
-// complex<long double>.
-
-
-_STLP_TEMPLATE_NULL
-struct _STLP_CLASS_DECLSPEC complex<float> {
-  typedef float value_type;
-  typedef complex<float> _Self;
-  // Constructors, destructor, assignment operator.
-
-  complex(value_type __x = 0.0, value_type __y = 0.0)
-    : _M_re(__x), _M_im(__y) {}
-
-  complex(const complex<float>& __z)    : _M_re(__z._M_re), _M_im(__z._M_im) {} 
-
-  inline explicit complex(const complex<double>& __z);
-# ifndef _STLP_NO_LONG_DOUBLE
-  inline explicit complex(const complex<long double>& __z);
-# endif
-  // Element access.
-  value_type real() const { return _M_re; }
-  value_type imag() const { return _M_im; }
-
-  // Arithmetic op= operations involving one real argument.
-
-  _Self& operator= (value_type __x) {
-    _M_re = __x;
-    _M_im = 0;
-    return *this;
-  }
-  _Self& operator+= (value_type __x) {
-    _M_re += __x;
-    return *this;
-  }
-  _Self& operator-= (value_type __x) {
-    _M_re -= __x;
-    return *this;
-  }
-  _Self& operator*= (value_type __x) {
-    _M_re *= __x;
-    _M_im *= __x;
-    return *this;
-  }
-  _Self& operator/= (value_type __x) {
-    _M_re /= __x;
-    _M_im /= __x;
-    return *this;
-  }
-
-  // Arithmetic op= operations involving two complex arguments.
-
-  static void _STLP_CALL _div(const float& __z1_r, const float& __z1_i,
-                              const float& __z2_r, const float& __z2_i,
-                              float& __res_r, float& __res_i);
-    
-  static void _STLP_CALL _div(const float& __z1_r, 
-                              const float& __z2_r, const float& __z2_i,
-                              float& __res_r, float& __res_i);
-    
-#if defined (_STLP_MEMBER_TEMPLATES)
-
-  template <class _Tp2>
-  complex<float>& operator=(const complex<_Tp2>& __z) {
-    _M_re = __z._M_re;
-    _M_im = __z._M_im;
-    return *this;
-  }
-
-  template <class _Tp2>
-  complex<float>& operator+= (const complex<_Tp2>& __z) {
-    _M_re += __z._M_re;
-    _M_im += __z._M_im;
-    return *this;
-  }
-
-  template <class _Tp2>
-  complex<float>& operator-= (const complex<_Tp2>& __z) {
-    _M_re -= __z._M_re;
-    _M_im -= __z._M_im;
-    return *this;
-  }
-
-  template <class _Tp2>
-  complex<float>& operator*= (const complex<_Tp2>& __z) {
-    float __r = _M_re * __z._M_re - _M_im * __z._M_im;
-    float __i = _M_re * __z._M_im + _M_im * __z._M_re;
-    _M_re = __r;
-    _M_im = __i;
-    return *this;
-  }
-
-  template <class _Tp2>
-  complex<float>& operator/= (const complex<_Tp2>& __z) {
-    float __r;
-    float __i;
-    _div(_M_re, _M_im, __z._M_re, __z._M_im, __r, __i);
-    _M_re = __r;
-    _M_im = __i;
-    return *this;
-  }
-
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-  _Self& operator=(const _Self& __z) {
-    _M_re = __z._M_re;
-    _M_im = __z._M_im;
-    return *this;
-  }
-
-  _Self& operator+= (const _Self& __z) {
-    _M_re += __z._M_re;
-    _M_im += __z._M_im;
-    return *this;
-  }
-
-  _Self& operator-= (const _Self& __z) {
-    _M_re -= __z._M_re;
-    _M_im -= __z._M_im;
-    return *this;
-  }
-  
-  _Self& operator*= (const _Self& __z) {
-    value_type __r = _M_re * __z._M_re - _M_im * __z._M_im;
-    value_type __i = _M_re * __z._M_im + _M_im * __z._M_re;
-    _M_re = __r;
-    _M_im = __i;
-    return *this;
-  }
-
-  _Self& operator/= (const _Self& __z) {
-    value_type __r;
-    value_type __i;
-    _div(_M_re, _M_im, __z._M_re, __z._M_im, __r, __i);
-    _M_re = __r;
-    _M_im = __i;
-    return *this;
-  }
-
-  // Data members.
-  value_type _M_re;
-  value_type _M_im;
-};
-
-_STLP_TEMPLATE_NULL struct _STLP_CLASS_DECLSPEC complex<double> {
-  typedef double value_type;
-  typedef complex<double> _Self;
-
-  // Constructors, destructor, assignment operator.
-
-  complex(value_type __x = 0.0, value_type __y = 0.0)
-    : _M_re(__x), _M_im(__y) {}
-
-  complex(const complex<double>& __z)
-    : _M_re(__z._M_re), _M_im(__z._M_im) {}
-  inline complex(const complex<float>& __z);
-# ifndef _STLP_NO_LONG_DOUBLE
-  explicit inline complex(const complex<long double>& __z);
-# endif
-  // Element access.
-  value_type real() const { return _M_re; }
-  value_type imag() const { return _M_im; }
-
-  // Arithmetic op= operations involving one real argument.
-
-  _Self& operator= (value_type __x) {
-    _M_re = __x;
-    _M_im = 0;
-    return *this;
-  }
-  _Self& operator+= (value_type __x) {
-    _M_re += __x;
-    return *this;
-  }
-  _Self& operator-= (value_type __x) {
-    _M_re -= __x;
-    return *this;
-  }
-  _Self& operator*= (value_type __x) {
-    _M_re *= __x;
-    _M_im *= __x;
-    return *this;
-  }
-  _Self& operator/= (value_type __x) {
-    _M_re /= __x;
-    _M_im /= __x;
-    return *this;
-  }
-
-  // Arithmetic op= operations involving two complex arguments.
-
-  static void _STLP_CALL _div(const double& __z1_r, const double& __z1_i,
-                              const double& __z2_r, const double& __z2_i,
-                              double& __res_r, double& __res_i);
-  static void _STLP_CALL _div(const double& __z1_r, 
-                              const double& __z2_r, const double& __z2_i,
-                              double& __res_r, double& __res_i);
-    
-#if defined (_STLP_MEMBER_TEMPLATES) && defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
-
-  template <class _Tp2>
-  complex<double>& operator=(const complex<_Tp2>& __z) {
-    _M_re = __z._M_re;
-    _M_im = __z._M_im;
-    return *this;
-  }
-
-  template <class _Tp2>
-  complex<double>& operator+= (const complex<_Tp2>& __z) {
-    _M_re += __z._M_re;
-    _M_im += __z._M_im;
-    return *this;
-  }
-
-  template <class _Tp2>
-  complex<double>& operator-= (const complex<_Tp2>& __z) {
-    _M_re -= __z._M_re;
-    _M_im -= __z._M_im;
-    return *this;
-  }
-
-  template <class _Tp2>
-  complex<double>& operator*= (const complex<_Tp2>& __z) {
-    double __r = _M_re * __z._M_re - _M_im * __z._M_im;
-    double __i = _M_re * __z._M_im + _M_im * __z._M_re;
-    _M_re = __r;
-    _M_im = __i;
-    return *this;
-  }
-
-  template <class _Tp2>
-  complex<double>& operator/= (const complex<_Tp2>& __z) {
-    double __r;
-    double __i;
-    _div(_M_re, _M_im, __z._M_re, __z._M_im, __r, __i);
-    _M_re = __r;
-    _M_im = __i;
-    return *this;
-  }
-
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-  _Self& operator=(const _Self& __z) {
-    _M_re = __z._M_re;
-    _M_im = __z._M_im;
-    return *this;
-  }
-
-  _Self& operator+= (const _Self& __z) {
-    _M_re += __z._M_re;
-    _M_im += __z._M_im;
-    return *this;
-  }
-
-  _Self& operator-= (const _Self& __z) {
-    _M_re -= __z._M_re;
-    _M_im -= __z._M_im;
-    return *this;
-  }
-  
-  _Self& operator*= (const _Self& __z) {
-    value_type __r = _M_re * __z._M_re - _M_im * __z._M_im;
-    value_type __i = _M_re * __z._M_im + _M_im * __z._M_re;
-    _M_re = __r;
-    _M_im = __i;
-    return *this;
-  }
-
-  _Self& operator/= (const _Self& __z) {
-    value_type __r;
-    value_type __i;
-    _div(_M_re, _M_im, __z._M_re, __z._M_im, __r, __i);
-    _M_re = __r;
-    _M_im = __i;
-    return *this;
-  }
-
-  // Data members.
-  value_type _M_re;
-  value_type _M_im;
-};
-
-# ifndef _STLP_NO_LONG_DOUBLE
-
-_STLP_TEMPLATE_NULL struct _STLP_CLASS_DECLSPEC complex<long double> {
-  typedef long double value_type;
-  typedef complex<long double> _Self;
-
-  // Constructors, destructor, assignment operator.
-  complex(value_type __x = 0.0, value_type __y = 0.0)
-    : _M_re(__x), _M_im(__y) {}
-
-  complex(const complex<long double>& __z)
-    : _M_re(__z._M_re), _M_im(__z._M_im) {}
-  inline complex(const complex<float>& __z);
-  inline complex(const complex<double>& __z);
-
-  // Element access.
-  value_type real() const { return _M_re; }
-  value_type imag() const { return _M_im; }
-
-  // Arithmetic op= operations involving one real argument.
-
-  _Self& operator= (value_type __x) {
-    _M_re = __x;
-    _M_im = 0;
-    return *this;
-  }
-  _Self& operator+= (value_type __x) {
-    _M_re += __x;
-    return *this;
-  }
-  _Self& operator-= (value_type __x) {
-    _M_re -= __x;
-    return *this;
-  }
-  _Self& operator*= (value_type __x) {
-    _M_re *= __x;
-    _M_im *= __x;
-    return *this;
-  }
-  _Self& operator/= (value_type __x) {
-    _M_re /= __x;
-    _M_im /= __x;
-    return *this;
-  }
-
-  // Arithmetic op= operations involving two complex arguments.
-
-  static void _STLP_CALL _div(const long double& __z1_r, const long double& __z1_i,
-                              const long double& __z2_r, const long double& __z2_i,
-                              long double& __res_r, long double& __res_i);
-
-  static void _STLP_CALL _div(const long double& __z1_r, 
-                              const long double& __z2_r, const long double& __z2_i,
-                              long double& __res_r, long double& __res_i);
-
-#if defined (_STLP_MEMBER_TEMPLATES) && defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER)
-
-  template <class _Tp2>
-  complex<long double>& operator=(const complex<_Tp2>& __z) {
-    _M_re = __z._M_re;
-    _M_im = __z._M_im;
-    return *this;
-  }
-
-  template <class _Tp2>
-  complex<long double>& operator+= (const complex<_Tp2>& __z) {
-    _M_re += __z._M_re;
-    _M_im += __z._M_im;
-    return *this;
-  }
-
-  template <class _Tp2>
-  complex<long double>& operator-= (const complex<_Tp2>& __z) {
-    _M_re -= __z._M_re;
-    _M_im -= __z._M_im;
-    return *this;
-  }
-
-  template <class _Tp2>
-  complex<long double>& operator*= (const complex<_Tp2>& __z) {
-    long double __r = _M_re * __z._M_re - _M_im * __z._M_im;
-    long double __i = _M_re * __z._M_im + _M_im * __z._M_re;
-    _M_re = __r;
-    _M_im = __i;
-    return *this;
-  }
-
-  template <class _Tp2>
-  complex<long double>& operator/= (const complex<_Tp2>& __z) {
-    long double __r;
-    long double __i;
-    _div(_M_re, _M_im, __z._M_re, __z._M_im, __r, __i);
-    _M_re = __r;
-    _M_im = __i;
-    return *this;
-  }
-
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-  _Self& operator=(const _Self& __z) {
-    _M_re = __z._M_re;
-    _M_im = __z._M_im;
-    return *this;
-  }
-
-  _Self& operator+= (const _Self& __z) {
-    _M_re += __z._M_re;
-    _M_im += __z._M_im;
-    return *this;
-  }
-
-  _Self& operator-= (const _Self& __z) {
-    _M_re -= __z._M_re;
-    _M_im -= __z._M_im;
-    return *this;
-  }
-  
-  _Self& operator*= (const _Self& __z) {
-    value_type __r = _M_re * __z._M_re - _M_im * __z._M_im;
-    value_type __i = _M_re * __z._M_im + _M_im * __z._M_re;
-    _M_re = __r;
-    _M_im = __i;
-    return *this;
-  }
-
-  _Self& operator/= (const _Self& __z) {
-    value_type __r;
-    value_type __i;
-    _div(_M_re, _M_im, __z._M_re, __z._M_im, __r, __i);
-    _M_re = __r;
-    _M_im = __i;
-    return *this;
-  }
-
-  // Data members.
-  value_type _M_re;
-  value_type _M_im;
-};
-
-# endif /* _STLP_NO_LONG_DOUBLE */
-
-// Converting constructors from one of these three specialized types
-// to another.
-
-inline complex<float>::complex(const complex<double>& __z)
-  : _M_re(__z._M_re), _M_im(__z._M_im) {}
-inline complex<double>::complex(const complex<float>& __z)
-  : _M_re(__z._M_re), _M_im(__z._M_im) {}
-# ifndef _STLP_NO_LONG_DOUBLE
-inline complex<float>::complex(const complex<long double>& __z)
-  : _M_re(__z._M_re), _M_im(__z._M_im) {}
-inline complex<double>::complex(const complex<long double>& __z)
-  : _M_re(__z._M_re), _M_im(__z._M_im) {}
-inline complex<long double>::complex(const complex<float>& __z)
-  : _M_re(__z._M_re), _M_im(__z._M_im) {}
-inline complex<long double>::complex(const complex<double>& __z)
-  : _M_re(__z._M_re), _M_im(__z._M_im) {}
-# endif
-
-# endif /* SPECIALIZATIONS */
-
-// Unary non-member arithmetic operators.
-
-template <class _Tp>
-inline complex<_Tp> _STLP_CALL operator+(const complex<_Tp>& __z) {
-  return __z;
-}
-
-template <class _Tp>
-inline complex<_Tp> _STLP_CALL  operator-(const complex<_Tp>& __z) {
-  return complex<_Tp>(-__z._M_re, -__z._M_im);
-}
-
-// Non-member arithmetic operations involving one real argument.
-
-template <class _Tp> 
-inline complex<_Tp> _STLP_CALL operator+(const _Tp& __x, const complex<_Tp>& __z) {
-  return complex<_Tp>(__x + __z._M_re, __z._M_im);
-}
-
-template <class _Tp> 
-inline complex<_Tp> _STLP_CALL operator+(const complex<_Tp>& __z, const _Tp& __x) {
-  return complex<_Tp>(__z._M_re + __x, __z._M_im);
-}
-
-template <class _Tp> 
-inline complex<_Tp> _STLP_CALL operator-(const _Tp& __x, const complex<_Tp>& __z) {
-  return complex<_Tp>(__x - __z._M_re, -__z._M_im);
-}
-
-template <class _Tp> 
-inline complex<_Tp> _STLP_CALL operator-(const complex<_Tp>& __z, const _Tp& __x) {
-  return complex<_Tp>(__z._M_re - __x, __z._M_im);
-}
-
-template <class _Tp> 
-inline complex<_Tp> _STLP_CALL operator*(const _Tp& __x, const complex<_Tp>& __z) {
-  return complex<_Tp>(__x * __z._M_re, __x * __z._M_im);
-}
-
-template <class _Tp> 
-inline complex<_Tp> _STLP_CALL operator*(const complex<_Tp>& __z, const _Tp& __x) {
-  return complex<_Tp>(__z._M_re * __x, __z._M_im * __x);
-}
-
-template <class _Tp> 
-inline complex<_Tp> _STLP_CALL operator/(const _Tp& __x, const complex<_Tp>& __z) {
-  complex<_Tp> __result;
-  complex<_Tp>::_div(__x,
-                     __z._M_re, __z._M_im,
-                     __result._M_re, __result._M_im);
-  return __result;
-}
-
-template <class _Tp> 
-inline complex<_Tp> _STLP_CALL operator/(const complex<_Tp>& __z, const _Tp& __x) {
-  return complex<_Tp>(__z._M_re / __x, __z._M_im / __x);
-}
-
-// Non-member arithmetic operations involving two complex arguments
-
-template <class _Tp> 
-inline complex<_Tp> _STLP_CALL 
-operator+(const complex<_Tp>& __z1, const complex<_Tp>& __z2) {
-  return complex<_Tp>(__z1._M_re + __z2._M_re, __z1._M_im + __z2._M_im);
-}
-
-template <class _Tp> 
-inline complex<_Tp> _STLP_CALL 
-operator-(const complex<_Tp>& __z1, const complex<_Tp>& __z2) {
-  return complex<_Tp>(__z1._M_re - __z2._M_re, __z1._M_im - __z2._M_im);
-}
-
-template <class _Tp> 
-inline complex<_Tp> _STLP_CALL 
-operator*(const complex<_Tp>& __z1, const complex<_Tp>& __z2) {
-  return complex<_Tp>(__z1._M_re * __z2._M_re - __z1._M_im * __z2._M_im,
-                      __z1._M_re * __z2._M_im + __z1._M_im * __z2._M_re);
-}
-
-template <class _Tp> 
-inline complex<_Tp> _STLP_CALL 
-operator/(const complex<_Tp>& __z1, const complex<_Tp>& __z2) {
-  complex<_Tp> __result;
-  complex<_Tp>::_div(__z1._M_re, __z1._M_im,
-                     __z2._M_re, __z2._M_im,
-                     __result._M_re, __result._M_im);
-  return __result;
-}
-
-// Comparison operators.
-
-template <class _Tp> 
-inline bool _STLP_CALL operator==(const complex<_Tp>& __z1, const complex<_Tp>& __z2) {
-  return __z1._M_re == __z2._M_re && __z1._M_im == __z2._M_im;
-}
-
-template <class _Tp> 
-inline bool _STLP_CALL operator==(const complex<_Tp>& __z, const _Tp& __x) {
-  return __z._M_re == __x && __z._M_im == 0;
-}
-
-template <class _Tp> 
-inline bool _STLP_CALL operator==(const _Tp& __x, const complex<_Tp>& __z) {
-  return __x == __z._M_re && 0 == __z._M_im;
-}
-
-#ifdef _STLP_FUNCTION_TMPL_PARTIAL_ORDER
-
-template <class _Tp> 
-inline bool _STLP_CALL operator!=(const complex<_Tp>& __z1, const complex<_Tp>& __z2) {
-  return __z1._M_re != __z2._M_re || __z1._M_im != __z2._M_im;
-}
-
-#endif /* _STLP_FUNCTION_TMPL_PARTIAL_ORDER */
-
-template <class _Tp> 
-inline bool _STLP_CALL operator!=(const complex<_Tp>& __z, const _Tp& __x) {
-  return __z._M_re != __x || __z._M_im != 0;
-}
-
-template <class _Tp> 
-inline bool _STLP_CALL operator!=(const _Tp& __x, const complex<_Tp>& __z) {
-  return __x != __z._M_re || 0 != __z._M_im;
-}
-
-// Other basic arithmetic operations
-
-template <class _Tp> 
-inline _Tp _STLP_CALL real(const complex<_Tp>& __z) {
-  return __z._M_re;
-}
-
-template <class _Tp> 
-inline _Tp _STLP_CALL imag(const complex<_Tp>& __z) {
-  return __z._M_im;
-}
-
-template <class _Tp>
-_Tp _STLP_CALL abs(const complex<_Tp>& __z) {
-  return _Tp(abs(complex<double>(double(__z.real()), double(__z.imag()))));
-}
-
-template <class _Tp>
-_Tp _STLP_CALL arg(const complex<_Tp>& __z) {
-  return _Tp(arg(complex<double>(double(__z.real()), double(__z.imag()))));
-}
-
-template <class _Tp>
-inline _Tp _STLP_CALL norm(const complex<_Tp>& __z) {
-  return __z._M_re * __z._M_re + __z._M_im * __z._M_im;
-}
-
-template <class _Tp>
-inline complex<_Tp> _STLP_CALL conj(const complex<_Tp>& __z) {
-  return complex<_Tp>(__z._M_re, -__z._M_im);
-}
-
-template <class _Tp>
-complex<_Tp> _STLP_CALL polar(const _Tp& __rho) {
-  return complex<_Tp>(__rho, 0);
-}
-
-template <class _Tp>
-complex<_Tp> _STLP_CALL polar(const _Tp& __rho, const _Tp& __phi) {
-  complex<double> __tmp = polar(double(__rho), double(__phi));
-  return complex<_Tp>(_Tp(__tmp.real()), _Tp(__tmp.imag()));
-}
-
-
-_STLP_TEMPLATE_NULL
-_STLP_DECLSPEC float  _STLP_CALL abs(const complex<float>&);
-_STLP_TEMPLATE_NULL
-_STLP_DECLSPEC double  _STLP_CALL abs(const complex<double>&);
-_STLP_TEMPLATE_NULL
-_STLP_DECLSPEC float  _STLP_CALL arg(const complex<float>&);
-_STLP_TEMPLATE_NULL
-_STLP_DECLSPEC double  _STLP_CALL arg(const complex<double>&);
-_STLP_TEMPLATE_NULL
-_STLP_DECLSPEC complex<float> _STLP_CALL polar(const float& __rho, const float& __phi);
-_STLP_TEMPLATE_NULL
-_STLP_DECLSPEC complex<double> _STLP_CALL polar(const double& __rho, const double& __phi);
-
-
-# ifndef _STLP_NO_LONG_DOUBLE
-_STLP_TEMPLATE_NULL
-_STLP_DECLSPEC long double  _STLP_CALL arg(const complex<long double>&);
-_STLP_TEMPLATE_NULL
-_STLP_DECLSPEC long double  _STLP_CALL abs(const complex<long double>&);
-_STLP_TEMPLATE_NULL
-_STLP_DECLSPEC complex<long double> _STLP_CALL polar(const long double&, const long double&);
-# endif
-
-
-#ifdef _STLP_USE_NEW_IOSTREAMS
-
-// Complex output, in the form (re,im).  We use a two-step process 
-// involving stringstream so that we get the padding right.  
-template <class _Tp, class _CharT, class _Traits>
-basic_ostream<_CharT, _Traits>&  _STLP_CALL 
-operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __z);
-
-template <class _Tp, class _CharT, class _Traits>
-basic_istream<_CharT, _Traits>& _STLP_CALL 
-operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __z);
-
-// Specializations for narrow characters; lets us avoid widen.
-
-_STLP_OPERATOR_TEMPLATE
-_STLP_DECLSPEC basic_istream<char, char_traits<char> >& _STLP_CALL 
-operator>>(basic_istream<char, char_traits<char> >& __is, complex<float>& __z);
-
-_STLP_OPERATOR_TEMPLATE
-_STLP_DECLSPEC basic_istream<char, char_traits<char> >& _STLP_CALL 
-operator>>(basic_istream<char, char_traits<char> >& __is, complex<double>& __z);
-
-
-_STLP_OPERATOR_TEMPLATE
-_STLP_DECLSPEC basic_ostream<char, char_traits<char> >& _STLP_CALL 
-operator<<(basic_ostream<char, char_traits<char> >& __is, const complex<float>& __z);
-
-_STLP_OPERATOR_TEMPLATE
-_STLP_DECLSPEC basic_ostream<char, char_traits<char> >& _STLP_CALL 
-operator<<(basic_ostream<char, char_traits<char> >& __is, const complex<double>& __z);
-
-#  if ! defined (_STLP_NO_LONG_DOUBLE)
-_STLP_OPERATOR_TEMPLATE
-_STLP_DECLSPEC basic_istream<char, char_traits<char> >& _STLP_CALL 
-operator>>(basic_istream<char, char_traits<char> >& __is, complex<long double>& __z);
-
-_STLP_OPERATOR_TEMPLATE
-_STLP_DECLSPEC basic_ostream<char, char_traits<char> >& _STLP_CALL 
-operator<<(basic_ostream<char, char_traits<char> >& __is, const complex<long double>& __z);
-
-# endif
-
-# if defined (_STLP_USE_TEMPLATE_EXPORT) && ! defined (_STLP_NO_WCHAR_T)
-
-_STLP_EXPORT_TEMPLATE basic_istream<wchar_t, char_traits<wchar_t> >& _STLP_CALL operator>>(
-        basic_istream<wchar_t, char_traits<wchar_t> >&, complex<double>&);
-_STLP_EXPORT_TEMPLATE basic_ostream<wchar_t, char_traits<wchar_t> >& _STLP_CALL operator<<(
-        basic_ostream<wchar_t, char_traits<wchar_t> >&, const complex<double>&);
-_STLP_EXPORT_TEMPLATE basic_istream<wchar_t, char_traits<wchar_t> >& _STLP_CALL operator>>(
-        basic_istream<wchar_t, char_traits<wchar_t> >&, complex<float>&);
-_STLP_EXPORT_TEMPLATE basic_ostream<wchar_t, char_traits<wchar_t> >& _STLP_CALL operator<<(
-        basic_ostream<wchar_t, char_traits<wchar_t> >&, const complex<float>&);
-
-#  ifndef _STLP_NO_LONG_DOUBLE
-_STLP_EXPORT_TEMPLATE basic_istream<wchar_t, char_traits<wchar_t> >& _STLP_CALL operator>>(
-        basic_istream<wchar_t, char_traits<wchar_t> >&, complex<long double>&);
-_STLP_EXPORT_TEMPLATE basic_ostream<wchar_t, char_traits<wchar_t> >& _STLP_CALL operator<<(
-        basic_ostream<wchar_t, char_traits<wchar_t> >&, const complex<long double>&);
-#  endif
-
-# endif /* USE_TEMPLATE_EXPORT */
-
-#else /* _STLP_USE_NEW_IOSTREAMS */
-
-template <class _Tp>
-ostream& _STLP_CALL operator<<(ostream& s, const complex<_Tp>& __z);
-
-template <class _Tp>
-istream& _STLP_CALL  operator>>(istream& s, complex<_Tp>& a);
-
-#endif /* _STLP_USE_NEW_IOSTREAMS */
-
-
-// Transcendental functions.  These are defined only for float, 
-//  double, and long double.  (Sqrt isn't transcendental, of course,
-//  but it's included in this section anyway.)
-
-_STLP_DECLSPEC complex<float> _STLP_CALL sqrt(const complex<float>&);
-
-_STLP_DECLSPEC complex<float> _STLP_CALL exp(const complex<float>&);
-_STLP_DECLSPEC complex<float> _STLP_CALL  log(const complex<float>&);
-_STLP_DECLSPEC complex<float> _STLP_CALL log10(const complex<float>&);
-
-_STLP_DECLSPEC complex<float> _STLP_CALL pow(const complex<float>&, int);
-_STLP_DECLSPEC complex<float> _STLP_CALL pow(const complex<float>&, const float&);
-_STLP_DECLSPEC complex<float> _STLP_CALL pow(const float&, const complex<float>&);
-_STLP_DECLSPEC complex<float> _STLP_CALL pow(const complex<float>&, const complex<float>&);
-
-_STLP_DECLSPEC complex<float> _STLP_CALL sin(const complex<float>&);
-_STLP_DECLSPEC complex<float> _STLP_CALL cos(const complex<float>&);
-_STLP_DECLSPEC complex<float> _STLP_CALL tan(const complex<float>&);
-
-_STLP_DECLSPEC complex<float> _STLP_CALL sinh(const complex<float>&);
-_STLP_DECLSPEC complex<float> _STLP_CALL cosh(const complex<float>&);
-_STLP_DECLSPEC complex<float> _STLP_CALL tanh(const complex<float>&);
-
-_STLP_DECLSPEC complex<double> _STLP_CALL sqrt(const complex<double>&);
-
-_STLP_DECLSPEC complex<double> _STLP_CALL exp(const complex<double>&);
-_STLP_DECLSPEC complex<double> _STLP_CALL log(const complex<double>&);
-_STLP_DECLSPEC complex<double> _STLP_CALL log10(const complex<double>&);
-
-_STLP_DECLSPEC complex<double> _STLP_CALL pow(const complex<double>&, int);
-_STLP_DECLSPEC complex<double> _STLP_CALL pow(const complex<double>&, const double&);
-_STLP_DECLSPEC complex<double> _STLP_CALL pow(const double&, const complex<double>&);
-_STLP_DECLSPEC complex<double> _STLP_CALL pow(const complex<double>&, const complex<double>&);
-
-_STLP_DECLSPEC complex<double> _STLP_CALL sin(const complex<double>&);
-_STLP_DECLSPEC complex<double> _STLP_CALL cos(const complex<double>&);
-_STLP_DECLSPEC complex<double> _STLP_CALL tan(const complex<double>&);
-
-_STLP_DECLSPEC complex<double> _STLP_CALL sinh(const complex<double>&);
-_STLP_DECLSPEC complex<double> _STLP_CALL cosh(const complex<double>&);
-_STLP_DECLSPEC complex<double> _STLP_CALL tanh(const complex<double>&);
-
-# ifndef _STLP_NO_LONG_DOUBLE
-_STLP_DECLSPEC complex<long double> _STLP_CALL sqrt(const complex<long double>&);
-_STLP_DECLSPEC complex<long double> _STLP_CALL exp(const complex<long double>&);
-_STLP_DECLSPEC complex<long double> _STLP_CALL log(const complex<long double>&);
-_STLP_DECLSPEC complex<long double> _STLP_CALL log10(const complex<long double>&);
-
-_STLP_DECLSPEC complex<long double> _STLP_CALL pow(const complex<long double>&, int);
-_STLP_DECLSPEC complex<long double> _STLP_CALL pow(const complex<long double>&, const long double&);
-_STLP_DECLSPEC complex<long double> _STLP_CALL pow(const long double&, const complex<long double>&);
-_STLP_DECLSPEC complex<long double> _STLP_CALL pow(const complex<long double>&,
-                                                   const complex<long double>&);
-
-_STLP_DECLSPEC complex<long double> _STLP_CALL sin(const complex<long double>&);
-_STLP_DECLSPEC complex<long double> _STLP_CALL cos(const complex<long double>&);
-_STLP_DECLSPEC complex<long double> _STLP_CALL tan(const complex<long double>&);
-
-_STLP_DECLSPEC complex<long double> _STLP_CALL sinh(const complex<long double>&);
-_STLP_DECLSPEC complex<long double> _STLP_CALL cosh(const complex<long double>&);
-_STLP_DECLSPEC complex<long double> _STLP_CALL tanh(const complex<long double>&);
-# endif
-
-_STLP_END_NAMESPACE
-
-# ifndef _STLP_LINK_TIME_INSTANTIATION
-#  include <stl/_complex.c>
-# endif
-
-#endif /* _STLP_template_complex */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_config.h b/src/STLport/stl/_config.h
deleted file mode 100644
index c7b582c..0000000
--- a/src/STLport/stl/_config.h
+++ /dev/null
@@ -1,1064 +0,0 @@
- /*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_CONFIG_H
-# define _STLP_CONFIG_H
-
-/*
- * Purpose of this file :
- *
- * Defines all STLport settings.
- * This file is actually a wrapper : it includes compiler-specific
- * settings from <config/stlcomp.h>
- * and user-defined settings from <stl_user_config.h>.
- * See <config/stl_mycomp.h> and <stl_user_config.h> for the description
- * of those macros
- * 
- */
-
-/* Other macros defined by this file:
-
- * bool, true, and false, if _STLP_NO_BOOL is defined.
- * typename, as a null macro if it's not already a keyword.
- * explicit, as a null macro if it's not already a keyword.
- * namespace-related macros (_STLP_STD, _STLP_BEGIN_NAMESPACE, etc.)
- * exception-related macros (_STLP_TRY, _STLP_UNWIND, etc.)
- * _STLP_ASSERT, either as a test or as a null macro, depending on
-   whether or not _STLP_ASSERTIONS is defined.
-*/
-
-/* The last SGI STL release we merged with */
-#   define __SGI_STL                                      0x330
-
-/* STLport version */
-#   define _STLPORT_VERSION                               0x461
-
-/* Placeholder for user to override settings.
- * It could be also used to mask settings from 
- * different directories.
- */
-# include <stl_user_config.h>
-
-/* ========================================================= */
-/* This file is used for compatibility; it accepts old-style config
-   switches */
-#  include <stl/_config_compat.h>
-
-/* Common configuration file for this particular installation. */
-
-# include <stl/_site_config.h>
-
-/* Use per-version compiler recognition */
-#  include <config/stlcomp.h>
-
-/* ========================================================= */
-
-/* some fixes to configuration. This also includes modifications
- * of STLport switches depending on compiler flags,
- * or settings applicable to a group of compilers, such as
- * to all who use EDG front-end.
- */
-# include <config/stl_confix.h>
-
-
-/*
- * Performs integrity check on user-specified parameters
- * and site-specific settings.
- */
-// # include <stl/_check_config.h>
-
-/* SGI terms */
-
-# if !defined (_STLP_NO_MEMBER_TEMPLATES) && !defined (_STLP_MEMBER_TEMPLATES)
-#  define _STLP_MEMBER_TEMPLATES 1
-# endif
-
-# if !defined (_STLP_NO_FRIEND_TEMPLATES) && !defined (_STLP_FRIEND_TEMPLATES)
-#  define _STLP_FRIEND_TEMPLATES 1
-# endif
-
-# if !defined (_STLP_NO_MEMBER_TEMPLATE_CLASSES) && !defined (_STLP_MEMBER_TEMPLATE_CLASSES)
-#  define _STLP_MEMBER_TEMPLATE_CLASSES 1
-# endif
-
-# if !defined (_STLP_NO_MEMBER_TEMPLATE_CLASSES) && !defined (_STLP_DONT_USE_NESTED_TCLASS_THROUGHT_TPARAM) && !defined (_STLP_USE_NESTED_TCLASS_THROUGHT_TPARAM)
-#  define _STLP_USE_NESTED_TCLASS_THROUGHT_TPARAM 1
-# endif
-
-#if !defined (_STLP_NO_CLASS_PARTIAL_SPECIALIZATION) && !defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
-#  define _STLP_CLASS_PARTIAL_SPECIALIZATION 1
-#endif
-
-#if !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER) && !defined (_STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER)
-#  define _STLP_FUNCTION_TMPL_PARTIAL_ORDER 1
-#endif
-
-# if !defined (_STLP_BIG_ENDIAN) && ! defined (_STLP_LITTLE_ENDIAN)
-#  if defined(_MIPSEB) || defined (__sparc) || \
-      defined (_AIX) || defined (__hpux) || defined(macintosh) || defined (_MAC)
-#   define _STLP_BIG_ENDIAN 1
-#  elif defined(__i386) || defined(_M_IX86) 
-#   define _STLP_LITTLE_ENDIAN 1
-#  else
-#   define _STLP_UNKNOWN_ENDIAN 1
-#  endif
-# endif /* _STLP_BIG_ENDIAN */
-
-/* ==========================================================
- * final workaround tuning based on given flags
- * ========================================================== */
-
-#ifndef _STLP_UINT32_T
-# define _STLP_UINT32_T unsigned long
-#endif
-#ifndef _STLP_ABORT
-# define _STLP_ABORT() abort()
-#endif
-
-# if !defined (_STLP_HAS_NO_NAMESPACES)
-# if defined _STLP_NO_NAMESPACES
-#  undef _STLP_USE_NAMESPACES
-# else
-/* assume it as the default, turn it off later if NO_NAMESPACES selected */
-#  undef _STLP_USE_NAMESPACES
-#  define _STLP_USE_NAMESPACES 1
-# endif
-# endif
-
-# if defined (_STLP_NO_IOSTREAMS)
-#  define _STLP_USE_NO_IOSTREAMS
-# endif
-
-# if defined (_STLP_USE_NO_IOSTREAMS)
-#  undef _STLP_USE_NEW_IOSTREAMS
-# endif
-
-# if ( defined (_STLP_OWN_IOSTREAMS) || ! defined (_STLP_HAS_NO_NEW_IOSTREAMS)) \
-   && ! defined (_STLP_USE_NO_IOSTREAMS) && !defined (_STLP_USE_NEW_IOSTREAMS)
-#  define _STLP_USE_NEW_IOSTREAMS
-# endif
-
-# if defined (_STLP_NO_NEW_IOSTREAMS)
-#  undef _STLP_USE_NEW_IOSTREAMS
-#  undef _STLP_OWN_IOSTREAMS
-# endif
-
-/* Operating system recognition (basic) */
-# if defined (__unix) || defined (__linux__) || defined (__QNX__) || defined (_AIX)  || defined (__NetBSD__) || defined (__Lynx__)
-#  define _STLP_UNIX 1
-#  if defined (__linux__) && ! defined (_STLP_USE_GLIBC)
-#   define _STLP_USE_GLIBC 1
-#  endif
-# elif defined(macintosh) || defined (_MAC)
-#  define _STLP_MAC  1
-# elif defined (_WIN32) || defined (__WIN32) || defined (WIN32) || defined (__WIN32__)
-#  define _STLP_WIN32 1
-# elif defined (__WIN16) || defined (WIN16) || defined (_WIN16)
-#  define _STLP_WIN16
-# endif /* __unix */
-
-# if !defined(_STLP_MAKE_HEADER)
-#  define _STLP_MAKE_HEADER(path, header) <path/header>
-# endif
-
-#if !defined (_STLP_NATIVE_HEADER)
-# if !defined (_STLP_NATIVE_INCLUDE_PATH)
-#  define _STLP_NATIVE_INCLUDE_PATH ../include
-# endif
-# define _STLP_NATIVE_HEADER(header) _STLP_MAKE_HEADER(_STLP_NATIVE_INCLUDE_PATH,header)
-#endif
-
-/* For some compilers, C headers like <stdio.h> are located in separate directory */
-#if !defined (_STLP_NATIVE_C_HEADER)
-# if !defined (_STLP_NATIVE_C_INCLUDE_PATH)
-#  define _STLP_NATIVE_C_INCLUDE_PATH _STLP_NATIVE_INCLUDE_PATH
-# endif
-# define _STLP_NATIVE_C_HEADER(header)  _STLP_MAKE_HEADER(_STLP_NATIVE_C_INCLUDE_PATH,header)
-#endif
-
-/* For some compilers, C-library headers like <cstdio> are located in separate directory */
-#if !defined (_STLP_NATIVE_CPP_C_HEADER)
-# if !defined (_STLP_NATIVE_CPP_C_INCLUDE_PATH)
-#  define _STLP_NATIVE_CPP_C_INCLUDE_PATH _STLP_NATIVE_INCLUDE_PATH
-# endif
-# define _STLP_NATIVE_CPP_C_HEADER(header)  _STLP_MAKE_HEADER(_STLP_NATIVE_CPP_C_INCLUDE_PATH,header)
-#endif
-
-/* Some compilers have weird placement of old-style iostream headers */
-#if !defined ( _STLP_NATIVE_OLD_STREAMS_HEADER )
-# if !defined (_STLP_NATIVE_OLD_STREAMS_INCLUDE_PATH)
-#  define _STLP_NATIVE_OLD_STREAMS_INCLUDE_PATH _STLP_NATIVE_INCLUDE_PATH
-# endif
-# define _STLP_NATIVE_OLD_STREAMS_HEADER(header)  _STLP_MAKE_HEADER(_STLP_NATIVE_OLD_STREAMS_INCLUDE_PATH,header)
-#endif
-
-/* Some compilers locate basic C++ runtime support headers (<new>, <typeinfo>, <exception>) in separate directory */
-#if !defined ( _STLP_NATIVE_CPP_RUNTIME_HEADER )
-# if !defined (_STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH)
-#  define _STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH _STLP_NATIVE_INCLUDE_PATH
-# endif
-# define _STLP_NATIVE_CPP_RUNTIME_HEADER(header)  _STLP_MAKE_HEADER(_STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH,header)
-#endif
-
-/*  shared library tune-up */
-
-#if defined (__BUILDING_STLPORT)
-/*  if we are rebuilding right now as a DLL, place everything here */
-#  undef  _STLP_DESIGNATED_DLL
-#  define _STLP_DESIGNATED_DLL 1
-#endif
-
-/* Use own namespace always if possible and not explicitly instructed otherwise */
-# if defined (_STLP_USE_NAMESPACES) && !defined (_STLP_BROKEN_USING_DIRECTIVE) && \
-     /* !defined (_STLP_OWN_IOSTREAMS) && */ !defined(_STLP_NO_OWN_NAMESPACE)
-#  undef  _STLP_USE_OWN_NAMESPACE
-#  define _STLP_USE_OWN_NAMESPACE  1
-# else
-#  undef _STLP_WHOLE_NATIVE_STD
-# endif
-
-#  undef _STLP_NAMESPACE
-
-# if !defined(_NOTHREADS) && ! defined (_STLP_THREADS_DEFINED)
-
-#  ifndef _REENTRANT
-#     define _REENTRANT
-#  endif
-
-#  if defined(_PTHREADS)
-#     define _STLP_PTHREADS
-#     define _STLP_THREADS
-#  endif
-#  if defined(_UITHREADS)
-#     define _STLP_UITHREADS
-#     define _STLP_THREADS
-#  endif
-
-#   if defined (__sgi) && ! defined (__KCC) && ! defined (__GNUC__)  
-#    define _STLP_SGI_THREADS
-#   elif defined(__DECC) || defined(__DECCXX)
-#    define _STLP_DEC_THREADS
-#   elif defined (_STLP_WIN32) && ! defined (_STLP_PTHREADS)
-#    define _STLP_WIN32THREADS 1
-#   elif ((defined (__sun) && !defined (__linux__)) \
-     || defined(_UITHREADS) ) && !defined(_STLP_PTHREADS)
-#     define _STLP_UITHREADS
-#   elif defined (__OS2__)
-#     define _STLP_OS2THREADS
-#   elif defined(__BEOS__)
-#     define _STLP_BETHREADS
-#   else
-#     define _STLP_PTHREADS
-#   endif /* __sgi */
-#   define _STLP_THREADS_DEFINED
-# endif
-
-#  if defined (_REENTRANT) && ! defined (_STLP_THREADS)
-#   define _STLP_THREADS
-#  endif /* _REENTRANT */
-
-// warning : pthread_spinlock code was reported not to work on RedHat 3
-# if defined(__linux__) && defined(_STLP_USE_PTHREAD_SPINLOCK)
-#  include <features.h>
-#  ifndef __USE_XOPEN2K
-#   undef _STLP_USE_PTHREAD_SPINLOCK
-#  endif /* __USE_XOPEN2K */
-# endif /* __linux__ && _STLP_PTHREADS */
-
-# ifndef _STLP_STATIC_MUTEX
-#  define _STLP_STATIC_MUTEX _STLP_mutex_base
-# endif
-
-
-# if defined (_MFC_VER) && !defined (_STLP_USE_MFC)
-#  define _STLP_USE_MFC 1
-# endif
-
-#if defined (_STLP_THREADS)
-#   define _STLP_VOLATILE volatile
-/* windows.h _MUST be included before bool definition ;( */
-# if defined  (_STLP_WIN32THREADS) && defined (_STLP_NO_BOOL)
-#   undef  NOMINMAX
-#   define NOMINMAX
-#   ifdef _STLP_USE_MFC
-#    include <afx.h>
-#   else
-#    include <windows.h>
-#   endif
-#   define _STLP_WINDOWS_H_INCLUDED
-# endif
-#else
-#   define _STLP_VOLATILE
-#endif
-
-# if !defined ( _STLP_USE_NEW_C_HEADERS ) && !defined ( _STLP_HAS_NO_NEW_C_HEADERS )
-#  define _STLP_USE_NEW_C_HEADERS
-# endif
-/* disable new-style headers if requested */
-# if defined ( _STLP_NO_NEW_C_HEADERS )
-#  undef _STLP_USE_NEW_C_HEADERS
-# endif
-
-# if !defined ( _STLP_STATIC_TEMPLATE_DATA )
-# define _STLP_STATIC_TEMPLATE_DATA 1
-# endif
-
-# if defined (_STLP_BASE_TYPEDEF_BUG)
-#  undef  _STLP_BASE_TYPEDEF_OUTSIDE_BUG
-#  define _STLP_BASE_TYPEDEF_OUTSIDE_BUG 1
-# endif
-
-# if defined ( _STLP_NESTED_TYPE_PARAM_BUG ) || (defined (_STLP_MSVC) && (_STLP_MSVC < 1100))
-#  define _STLP_GLOBAL_NESTED_RETURN_TYPE_PARAM_BUG
-# endif
-
-/* SUNpro 4.2 inline string literal bug */
-#ifdef _STLP_INLINE_STRING_LITERAL_BUG
-# define _STLP_FIX_LITERAL_BUG(__x) __x=__x;
-#else
-# define _STLP_FIX_LITERAL_BUG(__x)
-#endif
-
-# if defined (_STLP_NON_TYPE_TMPL_PARAM_BUG)
-#  undef  _STLP_NO_DEFAULT_NON_TYPE_PARAM
-#  define _STLP_NO_DEFAULT_NON_TYPE_PARAM 1
-# endif
-
-# define _STLP_NEW new
-# define _STLP_PLACEMENT_NEW new
-
-# ifdef _STLP_DEBUG
-#  define _STLP_ASSERTIONS 1
-# endif
-
-/* apple mpw exception handling bug */
-#ifndef _STLP_MPWFIX_TRY
-# define _STLP_MPWFIX_TRY
-#endif
-#ifndef _STLP_MPWFIX_CATCH
-# define _STLP_MPWFIX_CATCH
-#endif
-#ifndef _STLP_MPWFIX_CATCH_ACTION
-# define _STLP_MPWFIX_CATCH_ACTION(action)
-#endif
-
-/* if _STLP_DEBUG or _STLP_ASSERTIONS are set, stl/debug/_debug.h defines those */
-
-# if !defined( _STLP_ASSERTIONS ) && !defined(_STLP_DEBUG) && !defined(_STLP_DEBUG_ALLOC)
-#  define _STLP_ASSERT(expr)
-# endif
-
-# ifndef _STLP_DEBUG
-#  define _STLP_VERBOSE_ASSERT(expr,diagnostic)
-#  define _STLP_DEBUG_CHECK(expr)
-#  define _STLP_DEBUG_DO(expr)
-# endif
-
-#  if !defined (_STLP_WEAK)
-#   define _STLP_WEAK 
-#  endif
-
-/* default parameters as template types derived from arguments ( not always supported ) */
-#  if defined (_STLP_LIMITED_DEFAULT_TEMPLATES)
-#   define __DFL_TMPL_PARAM( classname, defval ) class classname
-#   define __DFL_TMPL_ARG(classname) , classname
-#  else
-#   define _STLP_DEFAULT_TYPE_PARAM 1
-#   define __DFL_TMPL_PARAM( classname, defval ) class classname = defval
-#   define __DFL_TMPL_ARG(classname)  
-#  endif
-
-/* default parameters as complete types */
-# if defined ( _STLP_DEFAULT_TYPE_PARAM )
-#   define __DFL_TYPE_PARAM( classname, defval ) class classname = defval
-#   define __DFL_NON_TYPE_PARAM(type,name,val) type name = val
-#   define __DFL_TYPE_ARG(classname)
-# else
-#   define __DFL_TYPE_PARAM( classname, defval ) class classname
-#   define __DFL_NON_TYPE_PARAM(type,name,val) type name
-#   define __DFL_TYPE_ARG(classname) , classname
-# endif
-
-/* SGI compatibility */
-
-#ifdef _STLP_NO_WCHAR_T
-# ifndef _STLP_NO_NATIVE_WIDE_STREAMS
-#  define  _STLP_NO_NATIVE_WIDE_STREAMS 1
-# endif
-#else
-# define _STLP_HAS_WCHAR_T 1
-#endif
-
-#if !defined (_STLP_NO_AT_MEMBER_FUNCTION)
-# define _STLP_CAN_THROW_RANGE_ERRORS 1
-#endif
-
-# if !defined (_STLP_USE_RAW_SGI_ALLOCATORS)
-#   define _STLP_DEFAULT_ALLOCATOR(_Tp) allocator< _Tp >
-#   define _STLP_DEFAULT_ALLOCATOR_SELECT( _Tp ) __DFL_TMPL_PARAM(_Alloc, allocator< _Tp >)
-#   define _STLP_DEFAULT_PAIR_ALLOCATOR(_Key, _Tp) allocator< pair < _Key, _Tp > >
-#   if defined (_STLP_LIMITED_DEFAULT_TEMPLATES)
-#     define _STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(_Key, _Tp ) class _Alloc
-#     define _STLP_USE_WRAPPER_FOR_ALLOC_PARAM 1
-#   else
-#     define _STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(_Key, _Tp ) \
-             class _Alloc = allocator< pair < _Key, _Tp > >
-#   endif
-# else
-#   define _STLP_DEFAULT_ALLOCATOR( _Tp ) __sgi_alloc
-#   define _STLP_DEFAULT_ALLOCATOR_SELECT( _Tp ) __DFL_TYPE_PARAM(_Alloc,__sgi_alloc)
-#   define _STLP_DEFAULT_PAIR_ALLOCATOR( _Key, _Tp ) __sgi_alloc
-#   define _STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(_Key, _Tp ) __DFL_TYPE_PARAM(_Alloc,__sgi_alloc)
-#   if defined (_STLP_LIMITED_DEFAULT_TEMPLATES) && !defined (_STLP_DEFAULT_TYPE_PARAM)
-#    define _STLP_USE_WRAPPER_FOR_ALLOC_PARAM 1
-#   endif
-# endif
-
-/* default parameters workaround tuning */
-#  if defined ( _STLP_USE_WRAPPER_FOR_ALLOC_PARAM )
-#    define __WORKAROUND_RENAME(X) __##X
-#  else
-#    define __WORKAROUND_RENAME(X) X
-#  endif
-#  if defined ( _STLP_DEBUG )
-#    define __WORKAROUND_DBG_RENAME(X) __##X
-#  else
-#    define __WORKAROUND_DBG_RENAME(X) __WORKAROUND_RENAME(X)
-#  endif
-#  define __FULL_NAME(X) __WORKAROUND_RENAME(X)
-
-/* this always mean the C library is in global namespace */
-# if defined (_STLP_HAS_NO_NEW_C_HEADERS) && ! defined (_STLP_VENDOR_GLOBAL_CSTD)
-#  define _STLP_VENDOR_GLOBAL_CSTD 1
-# endif
-
-/* Depending of whether compiler supports namespaces,
- * tune the parameters for vendor-supplied libraries.
- * This section is guarded by _STLP_HAS_NO_NAMESPACES, not by _STLP_USE_NAMESPACES,
- * since it depends only on the native features, not on user's preference whether
- * to use namespace for STLport or not.
- */
-# if !defined (_STLP_HAS_NO_NAMESPACES)
-/* Import some vendor's headers into corresponding STLport ones if they might be needed
- * (if we wrap native iostreams and use namepace other than std::) */
-#  if defined (_STLP_WHOLE_NATIVE_STD)
-#    define  _STLP_IMPORT_VENDOR_STD 1
-#    undef   _STLP_MINIMUM_IMPORT_STD
-#  elif (defined (_STLP_USE_OWN_NAMESPACE) || ( defined (_STLP_DEBUG) && defined (_STLP_USE_NAMESPACES))) \
-       && defined (_STLP_USE_NEW_IOSTREAMS) && ! defined (_STLP_OWN_IOSTREAMS)
-#    define  _STLP_IMPORT_VENDOR_STD 1
-#  endif
-
-/* if using stlport:: namespace or if C library stuff is not in vendor's std::,
- * try importing 'em.
- * MSVC has ambiguity problem when we try to import C-style std:: stuff back into global namespace */
-#  if defined (_STLP_USE_NAMESPACES) && /* ! defined (_STLP_OWN_IOSTREAMS) && */ \
-   ( defined(_STLP_USE_OWN_NAMESPACE) || defined (_STLP_VENDOR_GLOBAL_CSTD))
-#    define  _STLP_IMPORT_VENDOR_CSTD 1
-#  endif
-
-# if defined (_STLP_NO_USING_FOR_GLOBAL_FUNCTIONS) && ! defined (_STLP_DO_IMPORT_CSTD_FUNCTIONS)
-#  define _STLP_NO_CSTD_FUNCTION_IMPORTS
-# endif
-
-#  define  _STLP_USING_NAMESPACE(x) using namespace x ;
-
-namespace std { }
-namespace __std_alias = std;
-
-/* assume std:: namespace for C++ std library if not being told otherwise */
-#  ifdef _STLP_VENDOR_GLOBAL_STD
-#   define _STLP_VENDOR_STD
-#   define _STLP_USING_VENDOR_STD
-#  else
-#   define _STLP_VENDOR_STD __std_alias
-#   define _STLP_USING_VENDOR_STD _STLP_USING_NAMESPACE(_STLP_VENDOR_STD)
-// #   define _STLP_USING_VENDOR_STD
-#  endif
-
-/* tune things that come from C library */
-#  if  defined (_STLP_VENDOR_GLOBAL_CSTD) || !defined(_STLP_USE_NEW_C_HEADERS)
-/*  in old-style headers, C functions go to global scope. */
-#   define _STLP_VENDOR_CSTD
-#   define _STLP_USING_VENDOR_CSTD
-#  else
-#   define _STLP_VENDOR_CSTD  _STLP_VENDOR_STD
-#   define _STLP_USING_VENDOR_CSTD _STLP_USING_NAMESPACE(_STLP_VENDOR_CSTD)
-#  endif /* _STLP_VENDOR_CSTD */
-/* exception, typeinfo, new - always come from the vendor */
-#  ifndef _STLP_VENDOR_EXCEPT_STD
-#   ifdef _STLP_VENDOR_GLOBAL_EXCEPT_STD
-#    define _STLP_VENDOR_EXCEPT_STD
-#   else
-#    define _STLP_VENDOR_EXCEPT_STD _STLP_VENDOR_STD
-#   endif
-#  endif
-# define _STLP_OLD_IO_NAMESPACE
-# ifndef _STLP_VENDOR_MB_NAMESPACE
-#  define _STLP_VENDOR_MB_NAMESPACE _STLP_VENDOR_CSTD
-# endif
-# else 
-/* compiler has no namespace support */
-#  define _STLP_VENDOR_STD 
-#  define _STLP_VENDOR_CSTD
-#  define _STLP_USING_NAMESPACE(x)
-#  define _STLP_USING_VENDOR_CSTD
-#  define _STLP_USING_VENDOR_STD 
-#  define _STLP_VENDOR_EXCEPT_STD
-# endif
-
-# if defined (_STLP_USE_NAMESPACES)
-
-#  if defined (_STLP_USE_OWN_NAMESPACE)
-#   define _STLP_STD      _STL
-#  else
-#   ifdef _STLP_DEBUG
-namespace stdD = std;
-#   endif
-#   define _STLP_STD      std
-#  endif /* _STLP_USE_OWN_NAMESPACE */
-
-#  define _STLP_BEGIN_NAMESPACE namespace _STLP_STD {
-#  define _STLP_END_NAMESPACE }
-
-_STLP_BEGIN_NAMESPACE _STLP_END_NAMESPACE
-
-namespace stlport = _STLP_STD;
-// backward compatibility 
-# undef __STLPORT_NAMESPACE
-# define __STLPORT_NAMESPACE _STLP_STD
-
-/* decide whether or not we use separate namespace for rel ops */
-#   if defined(_STLP_NO_RELOPS_NAMESPACE)
-#     define _STLP_BEGIN_RELOPS_NAMESPACE _STLP_BEGIN_NAMESPACE namespace rel_ops {}
-#     define _STLP_END_RELOPS_NAMESPACE }
-#   else
-/* Use std::rel_ops namespace */
-#     define _STLP_BEGIN_RELOPS_NAMESPACE _STLP_BEGIN_NAMESPACE namespace rel_ops {
-#     define _STLP_END_RELOPS_NAMESPACE } }
-#     define _STLP_USE_SEPARATE_RELOPS_NAMESPACE
-#   endif /* Use std::rel_ops namespace */
-
-# else /* _STLP_USE_NAMESPACES */
-/* STLport is being put into global namespace */
-#  define _STLP_STD
-#  define _STLP_BEGIN_NAMESPACE
-#  define _STLP_END_NAMESPACE
-
-/* boris : it was found out that _STLP_USE_SEPARATE_RELOPS_NAMESPACE 
-   causes less problems than having relational operator templates in global namespace
-   Please define _STLP_NO_RELOPS_NAMESPACE in stl_user_config.h if your code rely on them. */
-#  ifndef _STLP_NO_RELOPS_NAMESPACE
-#   define _STLP_USE_SEPARATE_RELOPS_NAMESPACE
-#  endif
-#  define _STLP_BEGIN_RELOPS_NAMESPACE 
-#  define _STLP_END_RELOPS_NAMESPACE 
-#  undef  _STLP_USE_OWN_NAMESPACE
-# endif  /* _STLP_USE_NAMESPACES */
-
-# define STLPORT_CSTD _STLP_VENDOR_CSTD
-# define STLPORT      _STLP_STD
-
-#if defined(_STLP_BOGUS_TEMPLATE_TYPE_MATCHING_BUG)
-#  define _STLP_SIMPLE_TYPE(T) _stl_trivial_proxy<T>
-#else
-#  define _STLP_SIMPLE_TYPE(T) T
-#endif
-
-/* if we are going to use native new iostreams, use native <string> and <stdexcept> */
-#  if defined (_STLP_USE_NEW_IOSTREAMS) && !defined (_STLP_OWN_IOSTREAMS)
-#   define _STLP_USE_NATIVE_STRING      1
-#   define _STLP_USE_NATIVE_STDEXCEPT   1
-# endif
-
-# ifndef _STLP_RAND48
-# define _STLP_NO_DRAND48
-# endif
-
-/* backwards compatibility */
-# define __STL_NAMESPACE _STLP_STD
-# define __STL_NAME(name) _STLP_STD::name
-
-/* advanced keywords usage */
-#  ifndef  _STLP_NO_NEW_STYLE_CASTS
-#   define __CONST_CAST(__x,__y) const_cast<__x>(__y)
-#   define __STATIC_CAST(__x,__y) static_cast<__x>(__y)
-#   define __REINTERPRET_CAST(__x,__y) reinterpret_cast<__x>(__y)
-#   define __DYNAMIC_CAST(__x,__y) dynamic_cast<__x>(__y)
-#  else
-#   define __STATIC_CAST(__x,__y) ((__x)(__y))
-#   define __CONST_CAST(__x,__y) ((__x)(__y))
-#   define __REINTERPRET_CAST(__x,__y) ((__x)(__y))
-#   define __DYNAMIC_CAST(__x,__y) ((__x)(__y))
-#  endif
-#  if defined (_STLP_NEED_TYPENAME) && ! defined (typename)
-#   define typename
-#  endif
-#  if defined (_STLP_NEED_TYPENAME) || defined (_STLP_NO_TYPENAME_ON_RETURN_TYPE )
-#    define _STLP_TYPENAME_ON_RETURN_TYPE
-#  else
-#    define _STLP_TYPENAME_ON_RETURN_TYPE typename
-#  endif
-# ifdef _STLP_NO_TYPENAME_IN_TEMPLATE_HEADER
-#  define _STLP_HEADER_TYPENAME
-# else
-#  define _STLP_HEADER_TYPENAME typename
-# endif
-# ifndef _STLP_NO_MEMBER_TEMPLATE_KEYWORD
-#   define _STLP_TEMPLATE template
-# else
-#   define _STLP_TEMPLATE
-# endif
-#  if defined (_STLP_NEED_EXPLICIT) && ! defined (explicit)
-#   define explicit
-#  endif
-#  ifndef _STLP_NEED_MUTABLE
-#   define __ASSIGN_MUTABLE(type,x,y) x=y
-#  else
-#   define __ASSIGN_MUTABLE(type,x,y) __CONST_CAST(type,x)=y
-#   define mutable
-#  endif
-# if defined (_STLP_NO_SIGNED_BUILTINS)
-/* old HP-UX doesn't understand "signed" keyword */
-#  define signed
-# endif
-
-#  if defined (_STLP_LOOP_INLINE_PROBLEMS)
-#   define _STLP_INLINE_LOOP
-#  else
-#   define _STLP_INLINE_LOOP inline 
-#  endif
-
-#  define _STLP_PRIVATE public
-#  define _STLP_PROTECTED public
-
-#  ifndef _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX
-#   define _STLP_TEMPLATE_NULL template<>
-#  else
-#   define _STLP_TEMPLATE_NULL
-#  endif
-
-#ifdef _STLP_FUNCTION_TMPL_PARTIAL_ORDER
-#  define _STLP_OPERATOR_TEMPLATE
-# else 
-#  define _STLP_OPERATOR_TEMPLATE _STLP_TEMPLATE_NULL
-#endif
-
-# ifndef _STLP_CLASS_PARTIAL_SPECIALIZATION
-/* unless we have other compiler problem, try simulating partial spec here */
-# if ! defined (_STLP_DONT_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS)
-#  define  _STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS
-# endif
-/* For your own iterators, please use inheritance from iterator<> instead of these obsolete queries. */
-#  if  ( defined (_STLP_NESTED_TYPE_PARAM_BUG) || !defined (_STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS))
-#   if ! defined ( _STLP_USE_OLD_HP_ITERATOR_QUERIES )
-#    define _STLP_USE_OLD_HP_ITERATOR_QUERIES
-#   endif
-#  elif defined ( _STLP_NO_ANACHRONISMS )
-#   undef _STLP_USE_OLD_HP_ITERATOR_QUERIES
-#  endif
-# endif
-
-# ifndef _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS
-#   define _STLP_NULL_TMPL_ARGS <>
-# else
-#   define _STLP_NULL_TMPL_ARGS
-# endif
-
-# ifndef _STLP_ALLOCATOR_TYPE_DFL
-#  ifdef _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS 
-#   define _STLP_ALLOCATOR_TYPE_DFL 
-#  else
-#   define _STLP_ALLOCATOR_TYPE_DFL = allocator_type()
-#  endif
-# endif
-
-//When the compiler do not correctly initialized the basic types value in default parameters we prefer
-//to avoid them to be able to correct this bug.
-# if defined (_STLP_DEF_CONST_DEF_PARAM_BUG)
-#  define _STLP_DONT_SUP_DFLT_PARAM 1
-# endif
-
-# if defined (__SGI_STL_NO_ARROW_OPERATOR) && ! defined (_STLP_NO_ARROW_OPERATOR)
-# define _STLP_NO_ARROW_OPERATOR
-# endif
-
-# if !defined (_STLP_CLASS_PARTIAL_SPECIALIZATION)
-#  if !( defined (_STLP_NO_ARROW_OPERATOR)) \
-      && !defined (_STLP_NO_MSVC50_COMPATIBILITY) && !defined (_STLP_MSVC50_COMPATIBILITY)
-/* this one is needed for proper reverse_iterator<> operator ->() handling */
-#   define _STLP_MSVC50_COMPATIBILITY 1
-#  endif
-# endif
-
-#if defined ( _STLP_CLASS_PARTIAL_SPECIALIZATION )
-# if (defined(__IBMCPP__) && (500 <= __IBMCPP__) && (__IBMCPP__ < 600) )
-# define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \
-   typedef typename _STLP_STD :: reverse_iterator<const_iterator> const_reverse_iterator; \
-   typedef typename _STLP_STD :: reverse_iterator<iterator> reverse_iterator
-# elif (defined (__sgi) && ! defined (__GNUC__)) || defined (__SUNPRO_CC) || defined (__xlC__)
-#  define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \
-   typedef _STLP_STD:: _STLP_TEMPLATE reverse_iterator<const_iterator> const_reverse_iterator; \
-   typedef _STLP_STD:: _STLP_TEMPLATE reverse_iterator<iterator> reverse_iterator
-# else
-#  define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \
-   typedef _STLP_STD::reverse_iterator<const_iterator> const_reverse_iterator; \
-   typedef _STLP_STD::reverse_iterator<iterator> reverse_iterator
-# endif
-#else /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
-# if defined (_STLP_MSVC50_COMPATIBILITY)
-# define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \
-  typedef _STLP_STD::__reverse_iterator<const_iterator, value_type, const_reference, \
-    const_pointer, difference_type>  const_reverse_iterator; \
-  typedef _STLP_STD::__reverse_iterator<iterator, value_type, reference, pointer, difference_type> \
-    reverse_iterator
-# else
-# define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \
-  typedef _STLP_STD::__reverse_iterator<const_iterator, value_type, const_reference, \
-    difference_type>  const_reverse_iterator; \
-  typedef _STLP_STD::__reverse_iterator<iterator, value_type, \
-    reference, difference_type> \
-    reverse_iterator
-# endif
-#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
-
-# define _STLP_DECLARE_BIDIRECTIONAL_REVERSE_ITERATORS \
-         _STLP_DECLARE_REVERSE_ITERATORS(reverse_bidirectional_iterator)
-# define _STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS \
-         _STLP_DECLARE_REVERSE_ITERATORS(reverse_iterator)
-
-#  define __IMPORT_CONTAINER_TYPEDEFS(_Super)                            \
-    typedef typename _Super::value_type value_type;                      \
-    typedef typename _Super::size_type size_type;                        \
-    typedef typename _Super::difference_type difference_type;            \
-    typedef typename _Super::reference reference;                        \
-    typedef typename _Super::const_reference const_reference;            \
-    typedef typename _Super::pointer pointer;                            \
-    typedef typename _Super::const_pointer const_pointer;                \
-    typedef typename _Super::allocator_type allocator_type;
-
-
-#  define __IMPORT_ITERATORS(_Super)                                     \
-    typedef typename _Super::iterator iterator;                                   \
-    typedef typename _Super::const_iterator const_iterator; 
-
-#  define __IMPORT_REVERSE_ITERATORS(_Super)                             \
-    typedef typename _Super::const_reverse_iterator  const_reverse_iterator;      \
-    typedef typename _Super::reverse_iterator reverse_iterator;
-
-#  define  __IMPORT_SUPER_COPY_ASSIGNMENT(__derived_name, _Self, _SUPER)         \
-    __derived_name(const _Super& __x) : _SUPER(__x) {}          \
-    _Self& operator=(const _Super& __x) {                       \
-        *(_Super*)this = __x;                                   \
-        return *this;                                           \
-    }  \
-    __derived_name(const _Self& __x) : _SUPER(__x) {}          \
-    _Self& operator=(const _Self& __x) {                       \
-        *(_Super*)this = __x;                                   \
-        return *this;                                           \
-    }
-
-# define __IMPORT_WITH_ITERATORS(_Super) \
-__IMPORT_CONTAINER_TYPEDEFS(_Super) __IMPORT_ITERATORS(_Super)
-
-# define __IMPORT_WITH_REVERSE_ITERATORS(_Super) \
-__IMPORT_WITH_ITERATORS(_Super) __IMPORT_REVERSE_ITERATORS(_Super)
-
-# if defined (_STLP_TRIVIAL_CONSTRUCTOR_BUG) 
-#  define __TRIVIAL_CONSTRUCTOR(__type) __type() {}  
-# else
-#  define __TRIVIAL_CONSTRUCTOR(__type)
-# endif
-# if defined (_STLP_TRIVIAL_DESTRUCTOR_BUG)
-#  define __TRIVIAL_DESTRUCTOR(__type) ~__type() {}  
-# else
-#  define __TRIVIAL_DESTRUCTOR(__type) 
-# endif
-
-#  define __TRIVIAL_STUFF(__type)  \
-  __TRIVIAL_CONSTRUCTOR(__type) __TRIVIAL_DESTRUCTOR(__type)
-
-# if ! (defined ( _STLP_NO_EXCEPTIONS ) || defined (_STLP_HAS_NO_EXCEPTIONS) \
-	|| defined ( _STLP_USE_EXCEPTIONS ))
-#  define _STLP_USE_EXCEPTIONS
-# endif 
-
-# ifdef _STLP_USE_EXCEPTIONS
-#   define _STLP_TRY try
-#   define _STLP_CATCH_ALL catch(...)
-#   ifndef _STLP_THROW
-#    define _STLP_THROW(x) throw x
-#   endif
-#   define _STLP_RETHROW throw
-#   define _STLP_UNWIND(action) catch(...) { action; throw; }
-
-#   ifdef _STLP_THROW_RETURN_BUG
-#     define _STLP_RET_AFTER_THROW(data) return data
-#   else
-#     define _STLP_RET_AFTER_THROW(data)
-#   endif
-
-#   if !defined ( _STLP_NO_EXCEPTION_SPEC )
-#    define _STLP_THROWS_INHERENTLY(x) throw x
-#    define _STLP_NOTHROW_INHERENTLY throw()
-#   else
-#    define _STLP_THROWS_INHERENTLY(x)
-#    define _STLP_NOTHROW_INHERENTLY 
-#   endif
-/* We do not use exception throw specifications unless we are forced to */
-#   define _STLP_THROWS(x)
-#   define _STLP_NOTHROW 
-# else
-#   define _STLP_TRY 
-#   define _STLP_CATCH_ALL if (false)
-#   ifndef _STLP_THROW
-#    define _STLP_THROW(x)
-#   endif
-#   define _STLP_RETHROW {}
-#   define _STLP_UNWIND(action) 
-#   define _STLP_THROWS(x)
-#   define _STLP_NOTHROW
-#   define _STLP_RET_AFTER_THROW(data)
-#   define _STLP_THROWS_INHERENTLY(x)
-#   define _STLP_NOTHROW_INHERENTLY 
-# endif
-
-#if defined(_STLP_NO_BOOL)
-# if (defined (__IBMCPP__) && (__IBMCPP__ < 400)) && ! defined (_AIX)
-#  include <isynonym.hpp>
-#  if defined (__OS400__)
-    typedef int bool;
-#  elif !( defined (__xlC__) || defined (_AIX))
-    typedef Boolean bool;
-#  endif
-# else
-#  if defined(_STLP_YVALS_H)
-#   include <yvals.h>
-#  else
-#    if defined (_STLP_DONT_USE_BOOL_TYPEDEF)
-#     define bool int
-#    else
-      typedef int bool;
-#    endif
-#    define true 1
-#    define false 0
-#  endif
-# endif /* __IBMCPP__ */
-#else
-#    define _STLP_BOOL_KEYWORD 1
-#endif /* _STLP_NO_BOOL */
-
-# ifndef _STLP_MPW_EXTRA_CONST
-#  define _STLP_MPW_EXTRA_CONST
-# endif
-
-# ifndef _STLP_DEFAULTCHAR
-#  define _STLP_DEFAULTCHAR char
-# endif
-
-# if defined (_STLP_DEBUG_ALLOC) && ! defined (_STLP_ASSERTIONS)
-#  define _STLP_ASSERTIONS 1
-# endif
-
-/* uninitialized value filler */
-# ifndef _STLP_SHRED_BYTE
-/* This value is designed to cause problems if an error occurs */
-#   define _STLP_SHRED_BYTE 0xA3
-# endif /* _STLP_SHRED_BYTE */
-
-/* shared library tune-up */
-# ifndef _STLP_IMPORT_DECLSPEC
-#  define _STLP_IMPORT_DECLSPEC
-# endif
-
-/* a keyword used to instantiate export template */
-#  ifndef _STLP_EXPORT_TEMPLATE_KEYWORD
-#   define _STLP_EXPORT_TEMPLATE_KEYWORD
-#  endif
-# ifndef _STLP_IMPORT_TEMPLATE_KEYWORD
-#  define _STLP_IMPORT_TEMPLATE_KEYWORD
-# endif
-
-
-# if  defined (_STLP_DLLEXPORT_NEEDS_PREDECLARATION) && defined (_STLP_USE_DECLSPEC)
-#  if ! defined (_STLP_USE_TEMPLATE_EXPORT)
-/* this setting turns on "extern template" extension use */
-#   define _STLP_USE_TEMPLATE_EXPORT
-#  endif
-#  if defined (_STLP_DESIGNATED_DLL) && ! defined (_STLP_NO_FORCE_INSTANTIATE)
-#   define _STLP_NO_FORCE_INSTANTIATE
-#  endif
-# endif
-
-#   if defined (_STLP_DESIGNATED_DLL) /* This is a lib which will contain STLport exports */
-#    define  _STLP_EXPORT          _STLP_EXPORT_TEMPLATE_KEYWORD
-#   else
-#    define  _STLP_EXPORT          _STLP_IMPORT_TEMPLATE_KEYWORD
-#  endif
-
-# ifndef _STLP_EXPORT_TEMPLATE
-#  define  _STLP_EXPORT_TEMPLATE _STLP_EXPORT template
-# endif
-
-# if defined (_STLP_USE_DECLSPEC) /* using export/import technique */
-
-#  ifndef _STLP_EXPORT_DECLSPEC
-#   define _STLP_EXPORT_DECLSPEC
-#  endif
-#  ifndef _STLP_IMPORT_DECLSPEC
-#   define _STLP_IMPORT_DECLSPEC
-#  endif
-#  ifndef _STLP_CLASS_EXPORT_DECLSPEC
-#   define _STLP_CLASS_EXPORT_DECLSPEC
-#  endif
-#  ifndef _STLP_CLASS_IMPORT_DECLSPEC
-#   define _STLP_CLASS_IMPORT_DECLSPEC
-#  endif
-#  if defined (_STLP_DESIGNATED_DLL) /* This is a lib which will contain STLport exports */
-#   define  _STLP_DECLSPEC        _STLP_EXPORT_DECLSPEC 
-#   define  _STLP_CLASS_DECLSPEC  _STLP_CLASS_EXPORT_DECLSPEC 
-#  else
-#   define  _STLP_DECLSPEC        _STLP_IMPORT_DECLSPEC   /* Other modules, importing STLport exports */
-#   define  _STLP_CLASS_DECLSPEC  _STLP_CLASS_IMPORT_DECLSPEC
-#  endif
-
-#  ifndef _STLP_STATIC_CONST_INIT_BUG
-// constant data members cannot be exported; using workaround here
-#   define _STLP_STATIC_CONST_INIT_BUG
-#  endif
-# else /* Not using DLL export/import specifications */
-
-#  define _STLP_DECLSPEC
-#  define _STLP_CLASS_DECLSPEC
-
-# endif
-
-#  define _STLP_EXPORT_TEMPLATE_CLASS _STLP_EXPORT template class _STLP_CLASS_DECLSPEC
-
-#  if defined (_STLP_MSVC) || defined (__ICL) 
-#   define _STLP_STATIC_MEMBER_DECLSPEC
-#  else
-#   define _STLP_STATIC_MEMBER_DECLSPEC _STLP_DECLSPEC
-#  endif
-
-# if !defined (_STLP_CALL)
-#   define _STLP_CALL
-# endif
-
-#ifdef _STLP_OWN_IOSTREAMS
-
-#  if defined (__DECCXX) && ! defined (__USE_STD_IOSTREAM)
-#   define __USE_STD_IOSTREAM
-#  endif
-
-/* We only need to expose details of streams implementation 
-   if we use non-standard i/o or are building STLport*/
-# if defined (__BUILDING_STLPORT) ||  defined (_STLP_NO_FORCE_INSTANTIATE) || !defined(_STLP_NO_CUSTOM_IO)
-#  define _STLP_EXPOSE_STREAM_IMPLEMENTATION 1
-# endif
-
-/* We only need to expose details of global implementation if we are building STLport 
-   or have not instantiated everything in the lib */
-# if defined (__BUILDING_STLPORT) || defined (_STLP_NO_FORCE_INSTANTIATE)
-#   undef  _STLP_EXPOSE_GLOBALS_IMPLEMENTATION
-#   define _STLP_EXPOSE_GLOBALS_IMPLEMENTATION 1
-# endif
-
-#else
-/* when we are not using SGI iostreams, we must expose globals, but not streams implementation */
-#  define _STLP_EXPOSE_GLOBALS_IMPLEMENTATION
-#endif
-
-# ifdef _STLP_PARTIAL_SPEC_NEEDS_TEMPLATE_ARGS
-#  define _STLP_PSPEC2(t1,t2) < t1,t2 >
-#  define _STLP_PSPEC3(t1,t2,t3) < t1,t2,t3 >
-# else
-#  define _STLP_PSPEC2(t1,t2)	/* nothing */
-#  define _STLP_PSPEC3(t1,t2,t3)	/* nothing */
-# endif
-
-# ifdef _STLP_OPERATOR_SPEC_NEEDS_TEMPLATE_ARGS
-#  define _STLP_OPSPEC2(t1,t2) < t1,t2 >
-# else
-#  define _STLP_OPSPEC2(t1,t2)	/* nothing */
-# endif
-
-//Activation of the partial template workaround:
-# if !defined(_STLP_DONT_USE_PARTIAL_SPEC_WRKD) \
-    && (!defined(_STLP_CLASS_PARTIAL_SPECIALIZATION) || !defined(_STLP_FUNCTION_TMPL_PARTIAL_ORDER))
-#  define _STLP_USE_PARTIAL_SPEC_WORKAROUND
-# endif
-
-# if defined (_STLP_OWN_IOSTREAMS)
-#  define _STLP_NEW_IO_NAMESPACE _STLP_STD
-#  define _STLP_NO_WIDE_STREAMS  _STLP_NO_WCHAR_T
-# else
-#  ifdef _STLP_USE_NEW_IOSTREAMS
-#   define _STLP_NEW_IO_NAMESPACE _STLP_VENDOR_STD
-#   ifdef _STLP_NO_NATIVE_WIDE_STREAMS
-#    define _STLP_NO_WIDE_STREAMS _STLP_NO_NATIVE_WIDE_STREAMS
-#   endif /* _STLP_NO_NATIVE_WIDE_STREAMS */
-#  else
-#   define _STLP_NO_WIDE_STREAMS
-#   define _STLP_NEW_IO_NAMESPACE
-#  endif
-# endif
-
-#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE
-# define _STLP_RELOPS_OPERATORS(_TMPL, _TP) \
-_TMPL inline bool _STLP_CALL operator!=(const _TP& __x, const _TP& __y) {return !(__x == __y);}\
-_TMPL inline bool _STLP_CALL operator>(const _TP& __x, const _TP& __y)  {return __y < __x;}\
-_TMPL inline bool _STLP_CALL operator<=(const _TP& __x, const _TP& __y) { return !(__y < __x);}\
-_TMPL inline bool _STLP_CALL operator>=(const _TP& __x, const _TP& __y) { return !(__x < __y);}
-# else
-#  define _STLP_RELOPS_OPERATORS(_TMPL, _TP)
-# endif
-
-# if defined (_STLP_FULL_ADL_IMPLEMENTED) && defined (_STLP_NO_OWN_IOSTREAMS)
-#  error "Invalid configuration, STLport wrapper iostream mode can't be used with compiler"\
-         "implementing full Argument Dependent Lookup. Please remove _STLP_NO_OWN_IOSTREAMS switch"\
-         "and build STLport library."
-# endif /* _STLP_FULL_ADL_IMPLEMENTED && _STLP_NO_OWN_IOSTREAMS */
-
-# if defined ( _STLP_USE_ABBREVS )
-#  include <stl/_abbrevs.h>
-# endif
-
-/* some cleanup */
-# undef _STLP_DONT_USE_BOOL_TYPEDEF
-# undef _STLP_YVALS_H
-# undef _STLP_LOOP_INLINE_PROBLEMS
-# undef _STLP_NEED_EXPLICIT
-# undef _STLP_NEED_TYPENAME
-# undef _STLP_NO_NEW_STYLE_CASTS
-# undef __AUTO_CONFIGURED
-
-#endif /* _STLP_CONFIG_H */
-
-/*
- Local Variables:
- mode:C++
- End:
-*/
diff --git a/src/STLport/stl/_config_compat.h b/src/STLport/stl/_config_compat.h
deleted file mode 100644
index 5d9110c..0000000
--- a/src/STLport/stl/_config_compat.h
+++ /dev/null
@@ -1,89 +0,0 @@
-
-/*
- * Compatibility section
- * This section sets new-style macros based on old-style ones, for compatibility
- */
-
-# if (defined (__STL_NO_SGI_IOSTREAMS) || defined (_STLP_NO_SGI_IOSTREAMS)) \
-  && ! defined ( _STLP_NO_OWN_IOSTREAMS )
-#  define _STLP_NO_OWN_IOSTREAMS
-# endif
-
-# if defined (__STL_NO_NEW_IOSTREAMS) && ! defined ( _STLP_NO_NEW_IOSTREAMS )
-#  define _STLP_NO_NEW_IOSTREAMS __STL_NO_NEW_IOSTREAMS
-# endif
-# if defined (__STL_NO_IOSTREAMS) && ! defined ( _STLP_NO_IOSTREAMS )
-#  define _STLP_NO_IOSTREAMS __STL_NO_IOSTREAMS
-# endif
-# if defined (__STL_DEBUG) && ! defined ( _STLP_DEBUG )
-#  define _STLP_DEBUG __STL_DEBUG
-# endif
-# if defined (__STL_NO_ANACHRONISMS) && ! defined ( _STLP_NO_ANACHRONISMS )
-#  define _STLP_NO_ANACHRONISMS __STL_NO_ANACHRONISMS
-# endif
-# if defined (__STL_NO_EXTENSIONS) && ! defined ( _STLP_NO_EXTENSIONS )
-#  define _STLP_NO_EXTENSIONS __STL_NO_EXTENSIONS
-# endif
-# if defined (__STL_NO_EXCEPTIONS) && ! defined ( _STLP_NO_EXCEPTIONS )
-#  define _STLP_NO_EXCEPTIONS __STL_NO_EXCEPTIONS
-# endif
-# if defined (__STL_NO_NAMESPACES) && ! defined ( _STLP_NO_NAMESPACES )
-#  define _STLP_NO_NAMESPACES __STL_NO_NAMESPACES
-# endif
-# if defined (__STL_MINIMUM_DEFAULT_TEMPLATE_PARAMS) && ! defined ( _STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS )
-#  define _STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS __STL_MINIMUM_DEFAULT_TEMPLATE_PARAMS
-# endif
-# if defined (__STL_NO_OWN_NAMESPACE) && ! defined ( _STLP_NO_OWN_NAMESPACE )
-#  define _STLP_NO_OWN_NAMESPACE __STL_NO_OWN_NAMESPACE
-# endif
-
-# if defined (__STL_NO_RELOPS_NAMESPACE) && ! defined ( _STLP_NO_RELOPS_NAMESPACE )
-#  define _STLP_NO_RELOPS_NAMESPACE __STL_NO_RELOPS_NAMESPACE
-# endif
-
-# if defined (__STL_DEBUG_UNINITIALIZED) && ! defined ( _STLP_DEBUG_UNINITIALIZED )
-#  define _STLP_DEBUG_UNINITIALIZED __STL_DEBUG_UNINITIALIZED
-# endif
-# if defined (__STL_SHRED_BYTE) && ! defined ( _STLP_SHRED_BYTE )
-#  define _STLP_SHRED_BYTE __STL_SHRED_BYTE
-# endif
-# if defined (__STL_USE_MFC) && ! defined ( _STLP_USE_MFC )
-#  define _STLP_USE_MFC __STL_USE_MFC
-# endif
-
-# if defined (__STL_USE_NEWALLOC) && ! defined ( _STLP_USE_NEWALLOC )
-#  define _STLP_USE_NEWALLOC __STL_USE_NEWALLOC
-# endif
-# if defined (__STL_USE_MALLOC) && ! defined ( _STLP_USE_MALLOC )
-#  define _STLP_USE_MALLOC __STL_USE_MALLOC
-# endif
-
-# if defined (__STL_DEBUG_ALLOC) && ! defined ( _STLP_DEBUG_ALLOC )
-#  define _STLP_DEBUG_ALLOC __STL_DEBUG_ALLOC
-# endif
-
-# if defined (__STL_DEBUG_MESSAGE) && ! defined ( _STLP_DEBUG_MESSAGE )
-#  define _STLP_DEBUG_MESSAGE __STL_DEBUG_MESSAGE
-# endif
-
-# if defined (__STL_DEBUG_TERMINATE) && ! defined ( _STLP_DEBUG_TERMINATE )
-#  define _STLP_DEBUG_TERMINATE __STL_DEBUG_TERMINATE
-# endif
-
-# if defined (__STL_NO_DEBUG_EXCEPTIONS) && ! defined ( _STLP_NO_DEBUG_EXCEPTIONS )
-#  define _STLP_NO_DEBUG_EXCEPTIONS __STL_NO_DEBUG_EXCEPTIONS
-# endif
-
-# if defined (__STL_USE_ABBREVS) && ! defined ( _STLP_USE_ABBREVS )
-#  define _STLP_USE_ABBREVS __STL_USE_ABBREVS
-# endif
-
-# if defined (__STL_NO_MSVC50_COMPATIBILITY) && ! defined ( _STLP_NO_MSVC50_COMPATIBILITY )
-#  define _STLP_NO_MSVC50_COMPATIBILITY __STL_NO_MSVC50_COMPATIBILITY
-# endif
-
-# if defined (__STL_USE_RAW_SGI_ALLOCATORS) && ! defined ( _STLP_USE_RAW_SGI_ALLOCATORS )
-#  define _STLP_USE_RAW_SGI_ALLOCATORS __STL_USE_RAW_SGI_ALLOCATORS
-# endif
-
-
diff --git a/src/STLport/stl/_config_compat_post.h b/src/STLport/stl/_config_compat_post.h
deleted file mode 100644
index 298c49e..0000000
--- a/src/STLport/stl/_config_compat_post.h
+++ /dev/null
@@ -1,35 +0,0 @@
-//==========================================
-
-# define __SGI_STL_PORT  _STLPORT_VERSION
-
-# if defined (_STLP_DEBUG) && ! defined ( __STL_DEBUG )
-#  define __STL_DEBUG _STLP_DEBUG
-# endif
-
-# if defined (_STLP_USE_NAMESPACES)
-#  undef  __STL_USE_NAMESPACES 
-#  define __STL_USE_NAMESPACES _STLP_USE_NAMESPACES
-# endif
-
-# if defined (_STLP_USE_EXCEPTIONS)
-#  undef  __STL_USE_EXCEPTIONS 
-#  define __STL_USE_EXCEPTIONS _STLP_USE_EXCEPTIONS
-# endif
-
-# if defined (_STLP_USE_NEW_IOSTREAMS) && ! defined ( __STL_USE_NEW_IOSTREAMS )
-#  define __STL_USE_NEW_IOSTREAMS _STLP_USE_NEW_IOSTREAMS
-# endif
-
-# if defined (_STLP_BEGIN_NAMESPACE) && ! defined ( __STL_BEGIN_NAMESPACE )
-#  define __STL_BEGIN_NAMESPACE _STLP_BEGIN_NAMESPACE
-#  define __STL_END_NAMESPACE _STLP_END_NAMESPACE
-#  define __STL_VENDOR_STD _STLP_VENDOR_STD
-#  define __STL_VENDOR_CSTD _STLP_VENDOR_CSTD
-# endif
-
-/*
-# if defined (_STLP_XXX) && ! defined ( __STL_XXX )
-#  define __STL_XXX _STLP_XXX
-# endif
-*/
-
diff --git a/src/STLport/stl/_construct.h b/src/STLport/stl/_construct.h
deleted file mode 100644
index 12eb16d..0000000
--- a/src/STLport/stl/_construct.h
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_CONSTRUCT_H
-#define _STLP_INTERNAL_CONSTRUCT_H
-
-# if defined (_STLP_DEBUG_UNINITIALIZED) && ! defined (_STLP_CSTRING)
-# include <cstring>
-# endif
-
-# ifndef _STLP_INTERNAL_NEW_HEADER
-#  include <stl/_new.h>
-# endif
-
-
-#ifndef _STLP_INTERNAL_ITERATOR_BASE_H
-# include <stl/_iterator_base.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-# ifdef _STLP_TRIVIAL_DESTRUCTOR_BUG
-template <class _Tp>
-inline void __destroy_aux(_Tp* __pointer, const __false_type&) { __pointer->~_Tp(); }
-template <class _Tp>
-inline void __destroy_aux(_Tp* __pointer, const __true_type&) {}
-# endif
-
-template <class _Tp>
-inline void _Destroy(_Tp* __pointer) {
-# if _MSC_VER >= 1010
-  __pointer;
-# endif	// _MSC_VER >= 1000
-# ifdef _STLP_TRIVIAL_DESTRUCTOR_BUG
-  typedef typename __type_traits<_Tp>::has_trivial_destructor _Trivial_destructor;
-  __destroy_aux(__pointer, _Trivial_destructor());
-# else
-#  if ( defined (__BORLANDC__) && ( __BORLANDC__ < 0x500 ) )
-    __pointer->_Tp::~_Tp();
-#  else
-    __pointer->~_Tp();
-#  endif
-# endif
-# ifdef _STLP_DEBUG_UNINITIALIZED
-	memset((char*)__pointer, _STLP_SHRED_BYTE, sizeof(_Tp));
-# endif
-}
-
-# if defined (new)
-#   define _STLP_NEW_REDEFINE new
-#   undef new
-# endif 
-
-# ifdef _STLP_DEFAULT_CONSTRUCTOR_BUG
-template <class _T1>
-inline void _Construct_aux (_T1* __p, const __false_type&) {
-_STLP_PLACEMENT_NEW (__p) _T1();
-}
-
-template <class _T1>
-inline void _Construct_aux (_T1* __p, const __true_type&) {
-_STLP_PLACEMENT_NEW (__p) _T1(0);
-}
-# endif
-
-template <class _T1, class _T2>
-inline void _Construct(_T1* __p, const _T2& __val) {
-# ifdef _STLP_DEBUG_UNINITIALIZED
-	memset((char*)__p, _STLP_SHRED_BYTE, sizeof(_T1));
-# endif
-    _STLP_PLACEMENT_NEW (__p) _T1(__val);
-}
-
-template <class _T1>
-inline void _Construct(_T1* __p) {
-# ifdef _STLP_DEBUG_UNINITIALIZED
-  memset((char*)__p, _STLP_SHRED_BYTE, sizeof(_T1));
-# endif
-# ifdef _STLP_DEFAULT_CONSTRUCTOR_BUG
-typedef typename _Is_integer<_T1>::_Integral _Is_Integral;
-_Construct_aux (__p, _Is_Integral() );
-# else
-  _STLP_PLACEMENT_NEW (__p) _T1();
-# endif
-}
-
-# if defined(_STLP_NEW_REDEFINE)
-# ifdef DEBUG_NEW
-#  define new DEBUG_NEW
-# endif
-#  undef _STLP_NEW_REDEFINE
-# endif 
-
-template <class _ForwardIterator>
-_STLP_INLINE_LOOP void
-__destroy_aux(_ForwardIterator __first, _ForwardIterator __last, const __false_type&) {
-  for ( ; __first != __last; ++__first)
-    _STLP_STD::_Destroy(&*__first);
-}
-
-template <class _ForwardIterator> 
-inline void __destroy_aux(_ForwardIterator, _ForwardIterator, const __true_type&) {}
-
-template <class _ForwardIterator, class _Tp>
-inline void 
-__destroy(_ForwardIterator __first, _ForwardIterator __last, _Tp*) {
-  typedef typename __type_traits<_Tp>::has_trivial_destructor _Trivial_destructor;
-  __destroy_aux(__first, __last, _Trivial_destructor());
-}
-
-template <class _ForwardIterator>
-inline void _Destroy(_ForwardIterator __first, _ForwardIterator __last) {
-  __destroy(__first, __last, _STLP_VALUE_TYPE(__first, _ForwardIterator));
-}
-
-inline void _Destroy(char*, char*) {}
-# ifdef _STLP_HAS_WCHAR_T // dwa 8/15/97
-inline void _Destroy(wchar_t*, wchar_t*) {}
-inline void _Destroy(const wchar_t*, const wchar_t*) {}
-# endif
-
-# ifndef _STLP_NO_ANACHRONISMS
-// --------------------------------------------------
-// Old names from the HP STL.
-
-template <class _T1, class _T2>
-inline void construct(_T1* __p, const _T2& __val) {_Construct(__p, __val); }
-template <class _T1>
-inline void construct(_T1* __p) { _Construct(__p); }
-template <class _Tp>
-inline void destroy(_Tp* __pointer) {  _STLP_STD::_Destroy(__pointer); }
-template <class _ForwardIterator>
-inline void destroy(_ForwardIterator __first, _ForwardIterator __last) { _STLP_STD::_Destroy(__first, __last); }
-# endif
-_STLP_END_NAMESPACE
-
-#endif /* _STLP_INTERNAL_CONSTRUCT_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_ctraits_fns.h b/src/STLport/stl/_ctraits_fns.h
deleted file mode 100644
index 09501b0..0000000
--- a/src/STLport/stl/_ctraits_fns.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- */ 
-
-// WARNING: This is an internal header file, included by other C++
-// standard library headers.  You should not attempt to use this header
-// file directly.
-
-#ifndef _STLP_INTERNAL_CTRAITS_FUNCTIONS_H
-#define _STLP_INTERNAL_CTRAITS_FUNCTIONS_H
-
-# ifndef _STLP_INTERNAL_FUNCTION_H 
-#  include <stl/_function_base.h>
-# endif
-
-// This file contains a few small adapters that allow a character
-// traits class to be used as a function object.
-
-_STLP_BEGIN_NAMESPACE
-
-template <class _Traits>
-struct _Eq_traits
-  : public binary_function<typename _Traits::char_type,
-                           typename _Traits::char_type,
-                           bool>
-{
-  bool operator()(const typename _Traits::char_type& __x,
-                  const typename _Traits::char_type& __y) const
-    { return _Traits::eq(__x, __y); }
-};
-
-template <class _Traits>
-struct _Eq_char_bound
-  : public unary_function<typename _Traits::char_type, bool>
-{
-  typename _Traits::char_type __val;
-  _Eq_char_bound(typename _Traits::char_type __c) : __val(__c) {}
-  bool operator()(const typename _Traits::char_type& __x) const
-    { return _Traits::eq(__x, __val); }
-};
-
-template <class _Traits>
-struct _Neq_char_bound
-  : public unary_function<typename _Traits::char_type, bool>
-{
-  typename _Traits::char_type __val;
-  _Neq_char_bound(typename _Traits::char_type __c) : __val(__c) {}
-  bool operator()(const typename _Traits::char_type& __x) const
-    { return !_Traits::eq(__x, __val); }
-};
-
-template <class _Traits>
-struct _Eq_int_bound
-  : public unary_function<typename _Traits::char_type, bool>
-{
-  typename _Traits::int_type __val;
-
-  _Eq_int_bound(typename _Traits::int_type __c) : __val(__c) {}
-  bool operator()(const typename _Traits::char_type& __x) const
-    { return _Traits::eq_int_type(_Traits::to_int_type(__x), __val); }
-};
-
-# if 0
-template <class _Traits>
-struct _Lt_traits
-  : public binary_function<typename _Traits::char_type,
-                           typename _Traits::char_type,
-                           bool>
-{
-  bool operator()(const typename _Traits::char_type& __x,
-                  const typename _Traits::char_type& __y) const
-    { return _Traits::lt(__x, __y); }
-};
-# endif
-
-_STLP_END_NAMESPACE
-
-#endif /* _STLP_INTERNAL_CTRAITS_FUNCTIONS_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
-
-
-
diff --git a/src/STLport/stl/_ctype.h b/src/STLport/stl/_ctype.h
deleted file mode 100644
index 5de2126..0000000
--- a/src/STLport/stl/_ctype.h
+++ /dev/null
@@ -1,269 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-// WARNING: This is an internal header file, included by other C++
-// standard library headers.  You should not attempt to use this header
-// file directly.
-
-#ifndef _STLP_INTERNAL_CTYPE_H
-#define _STLP_INTERNAL_CTYPE_H
-
-# ifndef _STLP_C_LOCALE_H
-#  include <stl/c_locale.h>
-# endif
-# ifndef _STLP_INTERNAL_LOCALE_H
-#  include <stl/_locale.h>
-# endif
-# ifndef _STLP_INTERNAL_ALGOBASE_H
-#  include <stl/_algobase.h>
-# endif
-
-_STLP_BEGIN_NAMESPACE
-
-class _STLP_CLASS_DECLSPEC ctype_base {
-public:
-  enum mask {
-    space   = _Locale_SPACE,
-    print   = _Locale_PRINT,
-    cntrl   = _Locale_CNTRL,
-    upper   = _Locale_UPPER,
-    lower   = _Locale_LOWER,
-    alpha   = _Locale_ALPHA,
-    digit   = _Locale_DIGIT,
-    punct   = _Locale_PUNCT,
-    xdigit  = _Locale_XDIGIT,
-    alnum   = alpha | digit,
-    graph   = alnum | punct
-  };
-};
-
-// ctype<> template
-
-template <class charT> class ctype {};
-template <class charT> class ctype_byname {};
-
-//ctype specializations
-
-_STLP_TEMPLATE_NULL
-class _STLP_CLASS_DECLSPEC ctype<char> :   public locale::facet, public ctype_base 
-{
-
-# ifndef _STLP_NO_WCHAR_T
-#  ifdef _STLP_MSVC
-    typedef ctype<wchar_t> _Wctype;
-    friend _Wctype;
-#  else
-    friend class ctype<wchar_t>;
-#  endif
-# endif
-  friend class _Locale;
-public:
-
-  typedef char char_type;
-
-  explicit ctype(const mask* __tab = 0, bool __del = false, size_t __refs = 0);
-  bool is(mask __m, char __c) const
-    { return ((*(_M_ctype_table+(unsigned char)__c)) & __m) != 0; }
-
-  const char* is(const char* __low, const char* __high, mask* __vec) const {
-    for (const char* __p = __low;__p != __high; ++__p, ++__vec) {
-      *__vec = _M_ctype_table[(unsigned char)*__p];
-    }
-    return __high;
-  }
-
-  const char* scan_is(mask __m, const char* __low, const char* __high) const;
-  const char* scan_not(mask __m, const char* __low, const char* __high) const;
-
-  char        (toupper)(char __c) const { return do_toupper(__c); }
-  const char* (toupper)(char* __low, const char* __high) const { 
-    return do_toupper(__low, __high); 
-  }
-
-  char        (tolower)(char __c) const { return do_tolower(__c); }
-  const char* (tolower)(char* __low, const char* __high) const { 
-    return do_tolower(__low, __high); 
-  }
-  
-  char        widen(char __c) const { return do_widen(__c); }
-  const char* widen(const char* __low, const char* __high, char* __to) const { 
-    return do_widen(__low, __high, __to); 
-  }
-
-  char        narrow(char __c, char __dfault) const { 
-    return do_narrow(__c, __dfault); 
-  }
-  const char* narrow(const char* __low, const char* __high,
-                     char __dfault, char* __to) const { 
-    return do_narrow(__low, __high, __dfault, __to); 
-  }
-
-  _STLP_STATIC_MEMBER_DECLSPEC static locale::id id;
-# if defined(_STLP_STATIC_CONST_INIT_BUG)
-  enum __TableSize { table_size = 256 };
-# else
-  static const size_t table_size = 256;
-# endif
-
-protected:
-  const mask* table() const _STLP_NOTHROW {return _M_ctype_table;}
-  static const mask* _STLP_CALL classic_table() _STLP_NOTHROW { return & _S_classic_table [1]; }
-
-  ~ctype();
-
-  virtual char        do_toupper(char __c) const;
-  virtual char        do_tolower(char __c) const;
-  virtual const char* do_toupper(char* __low, const char* __high) const;
-  virtual const char* do_tolower(char* __low, const char* __high) const;
-  virtual char        do_widen(char __c) const;
-  virtual const char* do_widen(const char* __low, const char* __high,
-                               char* __to) const;
-  virtual char        do_narrow(char __c, char /* dfault */ ) const;
-  virtual const char* do_narrow(const char* __low, const char* __high,
-                                char /* dfault */, char* __to) const;
-private:
-  struct _Is_mask {
-    mask __m;
-    _Is_mask(mask __x): __m(__x) {}
-   bool operator()(char __c) {return (__m & (unsigned char) __c) != 0;}
-  };
-
-  static const mask _S_classic_table[257 /* table_size + 1 */];
-  const mask* _M_ctype_table;
-  bool _M_delete;
-
-  static const unsigned char _S_upper[256 /* table_size */];
-  static const unsigned char _S_lower[256 /* table_size */];
-};
-
-_STLP_TEMPLATE_NULL
-class _STLP_CLASS_DECLSPEC ctype_byname<char>: public ctype<char> {
-public:
-  explicit ctype_byname(const char*, size_t = 0);
-  ~ctype_byname();
-
-  virtual char        do_toupper(char __c) const;
-  virtual char        do_tolower(char __c) const;
-
-  virtual const char* do_toupper(char*, const char*) const;
-  virtual const char* do_tolower(char*, const char*) const;
-
-private:
-  mask _M_byname_table[table_size + 1];
-  _Locale_ctype* _M_ctype;
-};
-
-
-# ifndef _STLP_NO_WCHAR_T
-_STLP_TEMPLATE_NULL
-class _STLP_CLASS_DECLSPEC ctype<wchar_t> : public locale::facet, public ctype_base 
-{
-  friend class _Locale;
-public:
-  typedef wchar_t char_type;
-
-  explicit ctype(size_t __refs = 0) : _BaseFacet(__refs) {}
-
-  bool is(mask __m, wchar_t __c) const
-    { return do_is(__m, __c); }
-
-  const wchar_t* is(const wchar_t* __low, const wchar_t* __high,
-                    mask* __vec) const
-    { return do_is(__low, __high, __vec); }
-
-  const wchar_t* scan_is(mask __m, 
-                         const wchar_t* __low, const wchar_t* __high) const
-    { return do_scan_is(__m, __low, __high); }
-
-  const wchar_t* scan_not (mask __m, 
-                           const wchar_t* __low, const wchar_t* __high) const
-    { return do_scan_not(__m, __low, __high); }
-
-  wchar_t (toupper)(wchar_t __c) const { return do_toupper(__c); }
-  const wchar_t* (toupper)(wchar_t* __low, const wchar_t* __high) const
-    { return do_toupper(__low, __high); }
-
-  wchar_t (tolower)(wchar_t __c) const { return do_tolower(__c); }
-  const wchar_t* (tolower)(wchar_t* __low, const wchar_t* __high) const
-    { return do_tolower(__low, __high); }
-
-  wchar_t widen(char __c) const { return do_widen(__c); }
-  const char* widen(const char* __low, const char* __high,
-                    wchar_t* __to) const
-    { return do_widen(__low, __high, __to); }
-
-  char narrow(wchar_t __c, char __dfault) const
-    { return do_narrow(__c, __dfault); }
-  const wchar_t* narrow(const wchar_t* __low, const wchar_t* __high,
-                        char __dfault, char* __to) const
-    { return do_narrow(__low, __high, __dfault, __to); }
-
-  _STLP_STATIC_MEMBER_DECLSPEC static locale::id id;
-
-protected:
-  ~ctype();
-
-  virtual bool           do_is(mask __m, wchar_t __c) const;
-  virtual const wchar_t* do_is(const wchar_t*, const wchar_t*, mask*) const;
-  virtual const wchar_t* do_scan_is(mask,
-                                    const wchar_t*, const wchar_t*) const;
-  virtual const wchar_t* do_scan_not(mask,
-                                     const wchar_t*, const wchar_t*) const;
-  virtual wchar_t do_toupper(wchar_t __c) const;
-  virtual const wchar_t* do_toupper(wchar_t*, const wchar_t*) const;
-  virtual wchar_t do_tolower(wchar_t c) const;
-  virtual const wchar_t* do_tolower(wchar_t*, const wchar_t*) const;
-  virtual wchar_t do_widen(char c) const;
-  virtual const char* do_widen(const char*, const char*, wchar_t*) const;
-  virtual char  do_narrow(wchar_t __c, char __dfault) const;
-  virtual const wchar_t* do_narrow(const wchar_t*, const wchar_t*,
-                                   char, char*) const;
-};
-
-_STLP_TEMPLATE_NULL
-class _STLP_CLASS_DECLSPEC ctype_byname<wchar_t>: public ctype<wchar_t> {
-public:
-  explicit ctype_byname(const char* __name, size_t __refs = 0);
-
-protected:
-  ~ctype_byname();
-
-  virtual bool           do_is(mask __m, wchar_t __c) const;
-  virtual const wchar_t* do_is(const wchar_t*, const wchar_t*, mask*) const;
-  virtual const wchar_t* do_scan_is(mask,
-                                    const wchar_t*, const wchar_t*) const;
-  virtual const wchar_t* do_scan_not(mask,
-                                     const wchar_t*, const wchar_t*) const;
-  virtual wchar_t do_toupper(wchar_t __c) const;
-  virtual const wchar_t* do_toupper(wchar_t*, const wchar_t*) const;
-  virtual wchar_t do_tolower(wchar_t c) const;
-  virtual const wchar_t* do_tolower(wchar_t*, const wchar_t*) const;
-
-private:
-  _Locale_ctype* _M_ctype;
-};
-
-# endif /* WCHAR_T */
-
-_STLP_END_NAMESPACE
-
-#endif /* _STLP_INTERNAL_CTYPE_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/stl/_cwchar.h b/src/STLport/stl/_cwchar.h
deleted file mode 100644
index 45c7668..0000000
--- a/src/STLport/stl/_cwchar.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_CWCHAR_H
-# define _STLP_CWCHAR_H
-
-#ifndef _STLP_NO_WCHAR_T
-#ifdef __cplusplus
-# include <cwchar>
-#else
-# include <wchar.h>
-#endif
-#endif
-
-# if defined (__MRC__) || defined (__SC__) || defined (__BORLANDC__) || defined(__FreeBSD__) || (defined (__GNUC__) && defined (__APPLE__) || defined( __Lynx__ )) || defined (_STLP_NO_WCHAR_T)
-
-#  include _STLP_NATIVE_C_HEADER(stddef.h)
-#  if defined (__FreeBSD__) || defined (__Lynx__)
-#   ifndef _WINT_T
-typedef long int wint_t;
-#    define _WINT_T
-#   endif /* _WINT_T */
-#  endif
-# endif
-
-# if defined ( _STLP_OWN_IOSTREAMS ) && defined (_STLP_NO_NATIVE_MBSTATE_T) && ! defined (_STLP_NO_MBSTATE_T) && ! defined (_MBSTATE_T) && ! defined (__mbstate_t_defined)
-#  define _STLP_USE_OWN_MBSTATE_T
-#  define _MBSTATE_T
-# endif
-
-# ifdef _STLP_USE_OWN_MBSTATE_T
-
-// to be compatible across different SUN platforms
-#ifdef __sun
-# define __stl_mbstate_t __mbstate_t
-#endif
-
-struct __stl_mbstate_t;
-
-# ifdef __cplusplus
-struct __stl_mbstate_t { 
-  __stl_mbstate_t( long __st = 0 ) { _M_state[0] = __st ; }
-  __stl_mbstate_t& operator=(const long __st) {
-    _M_state[0] = __st;              
-    return *this;
-  } 
-  __stl_mbstate_t(const __stl_mbstate_t& __x) {_M_state[0]= __x._M_state[0]; }         
-  __stl_mbstate_t& operator=(const __stl_mbstate_t& __x) {
-    _M_state[0]= __x._M_state[0];              
-    return *this;
-  }
-# if defined (__sun)
-#  ifdef _LP64
-  long _M_state[4];
-#  else
-  int _M_state[6];
-#  endif
-# else       
-  long _M_state[1];
-# endif
-};          
-
-inline bool operator==(const __stl_mbstate_t& __x, const __stl_mbstate_t& __y) {
-  return ( __x._M_state[0] == __y._M_state[0] );
-}
-
-inline bool operator!=(const __stl_mbstate_t& __x, const __stl_mbstate_t& __y) {
-  return ( __x._M_state[0] == __y._M_state[0] );
-}
-# endif
-
-
-_STLP_BEGIN_NAMESPACE
-
-typedef __stl_mbstate_t mbstate_t;
-
-_STLP_END_NAMESPACE
-
-# endif /* _STLP_USE_OWN_MBSTATE_T */
-
-#if !defined (_STLP_NO_WCHAR_T)
-# ifndef WCHAR_MIN
-#  define WCHAR_MIN 0
-// SUNpro has some bugs with casts. wchar_t is size of int there anyway.
-#  if defined (__SUNPRO_CC) || defined (__DJGPP)
-#   define WCHAR_MAX (~0)
-#  else
-#   define WCHAR_MAX ((wchar_t)~0)
-#  endif
-# endif
-#endif
-
-# if defined  (_STLP_IMPORT_VENDOR_CSTD) && ! defined (_STLP_VENDOR_GLOBAL_CSTD)
-_STLP_BEGIN_NAMESPACE  
-using namespace _STLP_VENDOR_CSTD;
-_STLP_END_NAMESPACE
-#endif /* _STLP_IMPORT_VENDOR_CSTD */
-
-#endif /* _STLP_CWCHAR_H */
-
diff --git a/src/STLport/stl/_deque.c b/src/STLport/stl/_deque.c
deleted file mode 100644
index f72e525..0000000
--- a/src/STLport/stl/_deque.c
+++ /dev/null
@@ -1,676 +0,0 @@
-/*
- *
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-#ifndef _STLP_DEQUE_C
-# define _STLP_DEQUE_C
-
-# ifndef _STLP_INTERNAL_DEQUE_H
-#  include <stl/_deque.h>
-# endif
-
-_STLP_BEGIN_NAMESPACE
-
-// Non-inline member functions from _Deque_base.
-
-template <class _Tp, class _Alloc >
-_Deque_base<_Tp,_Alloc >::~_Deque_base() {
-  if (_M_map._M_data) {
-    _M_destroy_nodes(_M_start._M_node, this->_M_finish._M_node + 1);
-    _M_map.deallocate(_M_map._M_data, _M_map_size._M_data);
-  }
-}
-
-template <class _Tp, class _Alloc >
-void
-_Deque_base<_Tp,_Alloc>::_M_initialize_map(size_t __num_elements)
-{
-  size_t __num_nodes = 
-    __num_elements / this->buffer_size() + 1 ;
-
-  _M_map_size._M_data = (max)((size_t) _S_initial_map_size, __num_nodes + 2);
-  _M_map._M_data = _M_map.allocate(_M_map_size._M_data);
-
-  _Tp** __nstart = _M_map._M_data + (_M_map_size._M_data - __num_nodes) / 2;
-  _Tp** __nfinish = __nstart + __num_nodes;
-    
-  _STLP_TRY {
-    _M_create_nodes(__nstart, __nfinish);
-  }
-  _STLP_UNWIND((_M_map.deallocate(_M_map._M_data, _M_map_size._M_data), 
-                _M_map._M_data = 0, _M_map_size._M_data = 0));
-  _M_start._M_set_node(__nstart);
-  this->_M_finish._M_set_node(__nfinish - 1);
-  _M_start._M_cur = _M_start._M_first;
-  this->_M_finish._M_cur = this->_M_finish._M_first +
-               __num_elements % this->buffer_size();
-}
-
-template <class _Tp, class _Alloc >
-void
-_Deque_base<_Tp,_Alloc>::_M_create_nodes(_Tp** __nstart,
-                                                  _Tp** __nfinish)
-{
-  _Tp** __cur;
-  _STLP_TRY {
-    for (__cur = __nstart; __cur < __nfinish; ++__cur)
-      *__cur = _M_map_size.allocate(this->buffer_size());
-  }
-  _STLP_UNWIND(_M_destroy_nodes(__nstart, __cur));
-}
-
-template <class _Tp, class _Alloc >
-void 
-_Deque_base<_Tp,_Alloc>::_M_destroy_nodes(_Tp** __nstart,
-                                                   _Tp** __nfinish)
-{
-  for (_Tp** __n = __nstart; __n < __nfinish; ++__n)
-    _M_map_size.deallocate(*__n, this->buffer_size());
-}
-
-
-
-// Non-inline member functions
-
-# if defined ( _STLP_NESTED_TYPE_PARAM_BUG )
-// qualified references 
-#   define __iterator__           _Deque_iterator<_Tp, _Nonconst_traits<_Tp> >
-#   define const_iterator         _Deque_iterator<_Tp, _Const_traits<_Tp>  > 
-#   define iterator               __iterator__
-#   define size_type              size_t
-#   define value_type             _Tp
-# else
-#  define __iterator__           _STLP_TYPENAME_ON_RETURN_TYPE __deque__<_Tp, _Alloc>::iterator
-# endif
-
-template <class _Tp, class _Alloc >
-__deque__<_Tp, _Alloc >&  
-__deque__<_Tp, _Alloc >::operator= (const __deque__<_Tp, _Alloc >& __x) {
-  const size_type __len = size();
-  if (&__x != this) {
-    if (__len >= __x.size())
-      erase(copy(__x.begin(), __x.end(), this->_M_start), this->_M_finish);
-    else {
-      const_iterator __mid = __x.begin() + difference_type(__len);
-      copy(__x.begin(), __mid, this->_M_start);
-      insert(this->_M_finish, __mid, __x.end());
-    }
-  }
-  return *this;
-}        
-
-template <class _Tp, class _Alloc >
-void 
-__deque__<_Tp, _Alloc >::_M_fill_insert(iterator __pos,
-					     size_type __n, const value_type& __x)
-{
-  if (__pos._M_cur == this->_M_start._M_cur) {
-    iterator __new_start = _M_reserve_elements_at_front(__n);
-    _STLP_TRY {
-      uninitialized_fill(__new_start, this->_M_start, __x);
-    }
-    _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node));
-    this->_M_start = __new_start;
-  }
-  else if (__pos._M_cur == this->_M_finish._M_cur) {
-    iterator __new_finish = _M_reserve_elements_at_back(__n);
-    _STLP_TRY {
-      uninitialized_fill(this->_M_finish, __new_finish, __x);
-    }
-    _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node+1, __new_finish._M_node+1));
-    this->_M_finish = __new_finish;
-  }
-  else 
-    _M_insert_aux(__pos, __n, __x);
-}
-
-#ifndef _STLP_MEMBER_TEMPLATES  
-
-template <class _Tp, class _Alloc >
-void __deque__<_Tp, _Alloc>::insert(iterator __pos,
-                                           const value_type* __first,
-                                           const value_type* __last) {
-  size_type __n = __last - __first;
-  if (__pos._M_cur == this->_M_start._M_cur) {
-    iterator __new_start = _M_reserve_elements_at_front(__n);
-    _STLP_TRY {
-      uninitialized_copy(__first, __last, __new_start);
-    }
-    _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node));
-    this->_M_start = __new_start;
-  }
-  else if (__pos._M_cur == this->_M_finish._M_cur) {
-    iterator __new_finish = _M_reserve_elements_at_back(__n);
-    _STLP_TRY {
-      uninitialized_copy(__first, __last, this->_M_finish);
-    }
-    _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1, 
-                                  __new_finish._M_node + 1));
-    this->_M_finish = __new_finish;
-  }
-  else
-    _M_insert_aux(__pos, __first, __last, __n);
-}
-
-template <class _Tp, class _Alloc >
-void __deque__<_Tp,_Alloc>::insert(iterator __pos,
-                                         const_iterator __first,
-                                         const_iterator __last)
-{
-  size_type __n = __last - __first;
-  if (__pos._M_cur == this->_M_start._M_cur) {
-    iterator __new_start = _M_reserve_elements_at_front(__n);
-    _STLP_TRY {
-      uninitialized_copy(__first, __last, __new_start);
-    }
-    _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node));
-    this->_M_start = __new_start;
-  }
-  else if (__pos._M_cur == this->_M_finish._M_cur) {
-    iterator __new_finish = _M_reserve_elements_at_back(__n);
-    _STLP_TRY {
-      uninitialized_copy(__first, __last, this->_M_finish);
-    }
-    _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1,__new_finish._M_node + 1));
-    this->_M_finish = __new_finish;
-  }
-  else
-    _M_insert_aux(__pos, __first, __last, __n);
-}
-
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-template <class _Tp, class _Alloc >
-__iterator__ 
-__deque__<_Tp,_Alloc>::erase(iterator __first, iterator __last)
-{
-  if (__first == this->_M_start && __last == this->_M_finish) {
-    clear();
-    return this->_M_finish;
-  }
-  else {
-    difference_type __n = __last - __first;
-    difference_type __elems_before = __first - this->_M_start;
-    if (__elems_before < difference_type(this->size() - __n) / 2) {
-      copy_backward(this->_M_start, __first, __last);
-      iterator __new_start = this->_M_start + __n;
-      _STLP_STD::_Destroy(this->_M_start, __new_start);
-      this->_M_destroy_nodes(this->_M_start._M_node, __new_start._M_node);
-      this->_M_start = __new_start;
-    }
-    else {
-      copy(__last, this->_M_finish, __first);
-      iterator __new_finish = this->_M_finish - __n;
-      _STLP_STD::_Destroy(__new_finish, this->_M_finish);
-      this->_M_destroy_nodes(__new_finish._M_node + 1, this->_M_finish._M_node + 1);
-      this->_M_finish = __new_finish;
-    }
-    return this->_M_start + __elems_before;
-  }
-}
-
-template <class _Tp, class _Alloc >
-void __deque__<_Tp,_Alloc>::clear()
-{
-  for (_Map_pointer __node = this->_M_start._M_node + 1;
-       __node < this->_M_finish._M_node;
-       ++__node) {
-    _STLP_STD::_Destroy(*__node, *__node + this->buffer_size());
-    this->_M_map_size.deallocate(*__node, this->buffer_size());
-  }
-
-  if (this->_M_start._M_node != this->_M_finish._M_node) {
-    _STLP_STD::_Destroy(this->_M_start._M_cur, this->_M_start._M_last);
-    _STLP_STD::_Destroy(this->_M_finish._M_first, this->_M_finish._M_cur);
-    this->_M_map_size.deallocate(this->_M_finish._M_first, this->buffer_size());
-  }
-  else
-    _STLP_STD::_Destroy(this->_M_start._M_cur, this->_M_finish._M_cur);
-
-  this->_M_finish = this->_M_start;
-}
-
-// Precondition: this->_M_start and this->_M_finish have already been initialized,
-// but none of the deque's elements have yet been constructed.
-template <class _Tp, class _Alloc >
-void 
-__deque__<_Tp,_Alloc>::_M_fill_initialize(const value_type& __val) {
-  _Map_pointer __cur;
-  _STLP_TRY {
-    for (__cur = this->_M_start._M_node; __cur < this->_M_finish._M_node; ++__cur)
-      uninitialized_fill(*__cur, *__cur + this->buffer_size(), __val);
-    uninitialized_fill(this->_M_finish._M_first, this->_M_finish._M_cur, __val);
-  }
-  _STLP_UNWIND(_STLP_STD::_Destroy(this->_M_start, iterator(*__cur, __cur)));
-}
-
-
-// Called only if this->_M_finish._M_cur == this->_M_finish._M_last - 1.
-template <class _Tp, class _Alloc >
-void
-__deque__<_Tp,_Alloc>::_M_push_back_aux_v(const value_type& __t)
-{
-  value_type __t_copy = __t;
-  _M_reserve_map_at_back();
-  *(this->_M_finish._M_node + 1) = this->_M_map_size.allocate(this->buffer_size());
-  _STLP_TRY {
-    _Construct(this->_M_finish._M_cur, __t_copy);
-    this->_M_finish._M_set_node(this->_M_finish._M_node + 1);
-    this->_M_finish._M_cur = this->_M_finish._M_first;
-  }
-  _STLP_UNWIND(this->_M_map_size.deallocate(*(this->_M_finish._M_node + 1), 
-				      this->buffer_size()));
-}
-
-# ifndef _STLP_NO_ANACHRONISMS
-// Called only if this->_M_finish._M_cur == this->_M_finish._M_last - 1.
-template <class _Tp, class _Alloc >
-void
-__deque__<_Tp,_Alloc>::_M_push_back_aux()
-{
-  _M_reserve_map_at_back();
-  *(this->_M_finish._M_node + 1) = this->_M_map_size.allocate(this->buffer_size());
-  _STLP_TRY {
-    _Construct(this->_M_finish._M_cur);
-    this->_M_finish._M_set_node(this->_M_finish._M_node + 1);
-    this->_M_finish._M_cur = this->_M_finish._M_first;
-  }
-  _STLP_UNWIND(this->_M_map_size.deallocate(*(this->_M_finish._M_node + 1), 
-				      this->buffer_size()));
-}
-# endif
-
-// Called only if this->_M_start._M_cur == this->_M_start._M_first.
-template <class _Tp, class _Alloc >
-void 
-__deque__<_Tp,_Alloc>::_M_push_front_aux_v(const value_type& __t)
-{
-  value_type __t_copy = __t;
-  _M_reserve_map_at_front();
-  *(this->_M_start._M_node - 1) = this->_M_map_size.allocate(this->buffer_size());
-  _STLP_TRY {
-    this->_M_start._M_set_node(this->_M_start._M_node - 1);
-    this->_M_start._M_cur = this->_M_start._M_last - 1;
-    _Construct(this->_M_start._M_cur, __t_copy);
-  }
-  _STLP_UNWIND((++this->_M_start, 
-		this->_M_map_size.deallocate(*(this->_M_start._M_node - 1), this->buffer_size())));
-} 
-
-
-# ifndef _STLP_NO_ANACHRONISMS
-// Called only if this->_M_start._M_cur == this->_M_start._M_first.
-template <class _Tp, class _Alloc >
-void 
-__deque__<_Tp,_Alloc>::_M_push_front_aux()
-{
-  _M_reserve_map_at_front();
-  *(this->_M_start._M_node - 1) = this->_M_map_size.allocate(this->buffer_size());
-  _STLP_TRY {
-    this->_M_start._M_set_node(this->_M_start._M_node - 1);
-    this->_M_start._M_cur = this->_M_start._M_last - 1;
-    _Construct(this->_M_start._M_cur);
-  }
-  _STLP_UNWIND((++this->_M_start, this->_M_map_size.deallocate(*(this->_M_start._M_node - 1), 
-						   this->buffer_size() )));
-} 
-# endif
-
-// Called only if this->_M_finish._M_cur == this->_M_finish._M_first.
-template <class _Tp, class _Alloc >
-void 
-__deque__<_Tp,_Alloc>::_M_pop_back_aux()
-{
-  this->_M_map_size.deallocate(this->_M_finish._M_first, this->buffer_size());
-  this->_M_finish._M_set_node(this->_M_finish._M_node - 1);
-  this->_M_finish._M_cur = this->_M_finish._M_last - 1;
-  _STLP_STD::_Destroy(this->_M_finish._M_cur);
-}
-
-// Called only if this->_M_start._M_cur == this->_M_start._M_last - 1.  Note that 
-// if the deque has at least one element (a precondition for this member 
-// function), and if this->_M_start._M_cur == this->_M_start._M_last, then the deque 
-// must have at least two nodes.
-template <class _Tp, class _Alloc >
-void 
-__deque__<_Tp,_Alloc>::_M_pop_front_aux()
-{
-  _STLP_STD::_Destroy(this->_M_start._M_cur);
-  this->_M_map_size.deallocate(this->_M_start._M_first, this->buffer_size());
-  this->_M_start._M_set_node(this->_M_start._M_node + 1);
-  this->_M_start._M_cur = this->_M_start._M_first;
-}      
-
-
-
-template <class _Tp, class _Alloc >
-__iterator__
-__deque__<_Tp,_Alloc>::_M_insert_aux_prepare(iterator __pos) {
-  difference_type __index = __pos - this->_M_start;
-  if (__index < difference_type(size() / 2)) {
-    push_front(front());
-    iterator __front1 = this->_M_start;
-    ++__front1;
-    iterator __front2 = __front1;
-    ++__front2;
-    __pos = this->_M_start + __index;
-    iterator __pos1 = __pos;
-    ++__pos1;
-    copy(__front2, __pos1, __front1);
-  }
-  else {
-    push_back(back());
-    iterator __back1 = this->_M_finish;
-    --__back1;
-    iterator __back2 = __back1;
-    --__back2;
-    __pos = this->_M_start + __index;
-    copy_backward(__pos, __back2, __back1);
-  }
-  return __pos;
-}
-
-template <class _Tp, class _Alloc >
-__iterator__
-__deque__<_Tp,_Alloc>::_M_insert_aux(iterator __pos,
-				     const value_type& __x) {
-  value_type __x_copy = __x;
-  _STLP_MPWFIX_TRY		//*TY 06/01/2000 - mpw forget to call dtor on __x_copy without this try block
-  __pos = _M_insert_aux_prepare(__pos);
-  *__pos = __x_copy;
-  return __pos;
-  _STLP_MPWFIX_CATCH		//*TY 06/01/2000 - 
-}
-
-template <class _Tp, class _Alloc >
-__iterator__
-__deque__<_Tp,_Alloc>::_M_insert_aux(iterator __pos)
-{
-  __pos = _M_insert_aux_prepare(__pos);
-  *__pos = value_type();
-  return __pos;
-}
-
-template <class _Tp, class _Alloc >
-void
-__deque__<_Tp,_Alloc>::_M_insert_aux(iterator __pos,
-                                           size_type __n,
-                                           const value_type& __x)
-{
-  const difference_type __elems_before = __pos - this->_M_start;
-  size_type __length = this->size();
-  value_type __x_copy = __x;
-  if (__elems_before < difference_type(__length / 2)) {
-    iterator __new_start = _M_reserve_elements_at_front(__n);
-    iterator __old_start = this->_M_start;
-    __pos = this->_M_start + __elems_before;
-    _STLP_TRY {
-      if (__elems_before >= difference_type(__n)) {
-        iterator __start_n = this->_M_start + difference_type(__n);
-        uninitialized_copy(this->_M_start, __start_n, __new_start);
-        this->_M_start = __new_start;
-        copy(__start_n, __pos, __old_start);
-        fill(__pos - difference_type(__n), __pos, __x_copy);
-      }
-      else {
-        __uninitialized_copy_fill(this->_M_start, __pos, __new_start, 
-	                          this->_M_start, __x_copy);
-        this->_M_start = __new_start;
-        fill(__old_start, __pos, __x_copy);
-      }
-    }
-    _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node));
-  }
-  else {
-    iterator __new_finish = _M_reserve_elements_at_back(__n);
-    iterator __old_finish = this->_M_finish;
-    const difference_type __elems_after = 
-      difference_type(__length) - __elems_before;
-    __pos = this->_M_finish - __elems_after;
-    _STLP_TRY {
-      if (__elems_after > difference_type(__n)) {
-        iterator __finish_n = this->_M_finish - difference_type(__n);
-        uninitialized_copy(__finish_n, this->_M_finish, this->_M_finish);
-        this->_M_finish = __new_finish;
-        copy_backward(__pos, __finish_n, __old_finish);
-        fill(__pos, __pos + difference_type(__n), __x_copy);
-      }
-      else {
-        __uninitialized_fill_copy(this->_M_finish, __pos + difference_type(__n),
-                                  __x_copy, __pos, this->_M_finish);
-        this->_M_finish = __new_finish;
-        fill(__pos, __old_finish, __x_copy);
-      }
-    }
-    _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1, __new_finish._M_node + 1));
-  }
-}
-
-#ifndef _STLP_MEMBER_TEMPLATES 
-template <class _Tp, class _Alloc >
-void 
-__deque__<_Tp,_Alloc>::_M_insert_aux(iterator __pos,
-                                           const value_type* __first,
-                                           const value_type* __last,
-                                           size_type __n)
-{
-
-  const difference_type __elemsbefore = __pos - this->_M_start;
-  size_type __length = size();
-  if (__elemsbefore < difference_type(__length / 2)) {
-    iterator __new_start = _M_reserve_elements_at_front(__n);
-    iterator __old_start = this->_M_start;
-    __pos = this->_M_start + __elemsbefore;
-    _STLP_TRY {
-      if (__elemsbefore >= difference_type(__n)) {
-        iterator __start_n = this->_M_start + difference_type(__n);
-        uninitialized_copy(this->_M_start, __start_n, __new_start);
-        this->_M_start = __new_start;
-        copy(__start_n, __pos, __old_start);
-        copy(__first, __last, __pos - difference_type(__n));
-      }
-      else {
-        const value_type* __mid = 
-	  __first + (difference_type(__n) - __elemsbefore);
-        __uninitialized_copy_copy(this->_M_start, __pos, __first, __mid,
-                                  __new_start, _IsPODType());
-        this->_M_start = __new_start;
-        copy(__mid, __last, __old_start);
-      }
-    }
-    _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node));
-  }
-  else {
-    iterator __new_finish = _M_reserve_elements_at_back(__n);
-    iterator __old_finish = this->_M_finish;
-    const difference_type __elemsafter = 
-      difference_type(__length) - __elemsbefore;
-    __pos = this->_M_finish - __elemsafter;
-    _STLP_TRY {
-      if (__elemsafter > difference_type(__n)) {
-        iterator __finish_n = this->_M_finish - difference_type(__n);
-        uninitialized_copy(__finish_n, this->_M_finish, this->_M_finish);
-        this->_M_finish = __new_finish;
-        copy_backward(__pos, __finish_n, __old_finish);
-        copy(__first, __last, __pos);
-      }
-      else {
-        const value_type* __mid = __first + __elemsafter;
-        __uninitialized_copy_copy(__mid, __last, __pos, this->_M_finish, this->_M_finish, _IsPODType());
-        this->_M_finish = __new_finish;
-        copy(__first, __mid, __pos);
-      }
-    }
-    _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1, __new_finish._M_node + 1));
-  }
-}
-
-template <class _Tp, class _Alloc >
-void
-__deque__<_Tp,_Alloc>::_M_insert_aux(iterator __pos,
-                                           const_iterator __first,
-                                           const_iterator __last,
-                                           size_type __n)
-{
-  const difference_type __elemsbefore = __pos - this->_M_start;
-  size_type __length = size();
-  if (__elemsbefore < difference_type(__length / 2)) {
-    iterator __new_start = _M_reserve_elements_at_front(__n);
-    iterator __old_start = this->_M_start;
-    __pos = this->_M_start + __elemsbefore;
-    _STLP_TRY {
-      if (__elemsbefore >= difference_type(__n)) {
-        iterator __start_n = this->_M_start + __n;
-        uninitialized_copy(this->_M_start, __start_n, __new_start);
-        this->_M_start = __new_start;
-        copy(__start_n, __pos, __old_start);
-        copy(__first, __last, __pos - difference_type(__n));
-      }
-      else {
-        const_iterator __mid = __first + (__n - __elemsbefore);
-        __uninitialized_copy_copy(this->_M_start, __pos, __first, __mid,
-                                  __new_start, _IsPODType());
-        this->_M_start = __new_start;
-        copy(__mid, __last, __old_start);
-      }
-    }
-    _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node));
-  }
-  else {
-    iterator __new_finish = _M_reserve_elements_at_back(__n);
-    iterator __old_finish = this->_M_finish;
-    const difference_type __elemsafter = __length - __elemsbefore;
-    __pos = this->_M_finish - __elemsafter;
-    _STLP_TRY {
-      if (__elemsafter > difference_type(__n)) {
-        iterator __finish_n = this->_M_finish - difference_type(__n);
-        uninitialized_copy(__finish_n, this->_M_finish, this->_M_finish);
-        this->_M_finish = __new_finish;
-        copy_backward(__pos, __finish_n, __old_finish);
-        copy(__first, __last, __pos);
-      }
-      else {
-        const_iterator __mid = __first + __elemsafter;
-        __uninitialized_copy_copy(__mid, __last, __pos, this->_M_finish, this->_M_finish, _IsPODType());
-        this->_M_finish = __new_finish;
-        copy(__first, __mid, __pos);
-      }
-    }
-    _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1, __new_finish._M_node + 1));
-  }
-}
-
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-template <class _Tp, class _Alloc >
-void 
-__deque__<_Tp,_Alloc>::_M_new_elements_at_front(size_type __new_elems)
-{
-  size_type __new_nodes
-      = (__new_elems + this->buffer_size() - 1) / this->buffer_size();
-  _M_reserve_map_at_front(__new_nodes);
-  size_type __i =1;
-  _STLP_TRY {
-    for (; __i <= __new_nodes; ++__i)
-      *(this->_M_start._M_node - __i) = this->_M_map_size.allocate(this->buffer_size());
-  }
-#       ifdef _STLP_USE_EXCEPTIONS
-  catch(...) {
-    for (size_type __j = 1; __j < __i; ++__j)
-      this->_M_map_size.deallocate(*(this->_M_start._M_node - __j), this->buffer_size());
-    throw;
-  }
-#       endif /* _STLP_USE_EXCEPTIONS */
-}
-
-template <class _Tp, class _Alloc >
-void 
-__deque__<_Tp,_Alloc>::_M_new_elements_at_back(size_type __new_elems)
-{
-  size_type __new_nodes
-      = (__new_elems + this->buffer_size() - 1) / this->buffer_size();
-  _M_reserve_map_at_back(__new_nodes);
-  size_type __i = 1;
-  _STLP_TRY {
-    for (; __i <= __new_nodes; ++__i)
-      *(this->_M_finish._M_node + __i) = this->_M_map_size.allocate(this->buffer_size());
-  }
-#       ifdef _STLP_USE_EXCEPTIONS
-  catch(...) {
-    for (size_type __j = 1; __j < __i; ++__j)
-      this->_M_map_size.deallocate(*(this->_M_finish._M_node + __j), this->buffer_size());
-    throw;
-  }
-#       endif /* _STLP_USE_EXCEPTIONS */
-}
-
-template <class _Tp, class _Alloc >
-void 
-__deque__<_Tp,_Alloc>::_M_reallocate_map(size_type __nodes_to_add,
-                                              bool __add_at_front)
-{
-  size_type __old_num_nodes = this->_M_finish._M_node - this->_M_start._M_node + 1;
-  size_type __new_num_nodes = __old_num_nodes + __nodes_to_add;
-
-  _Map_pointer __new_nstart;
-  if (this->_M_map_size._M_data > 2 * __new_num_nodes) {
-    __new_nstart = this->_M_map._M_data + (this->_M_map_size._M_data - __new_num_nodes) / 2 
-                     + (__add_at_front ? __nodes_to_add : 0);
-    if (__new_nstart < this->_M_start._M_node)
-      copy(this->_M_start._M_node, this->_M_finish._M_node + 1, __new_nstart);
-    else
-      copy_backward(this->_M_start._M_node, this->_M_finish._M_node + 1, 
-                    __new_nstart + __old_num_nodes);
-  }
-  else {
-    size_type __new_map_size = 
-      this->_M_map_size._M_data + (max)((size_t)this->_M_map_size._M_data, __nodes_to_add) + 2;
-
-    _Map_pointer __new_map = this->_M_map.allocate(__new_map_size);
-    __new_nstart = __new_map + (__new_map_size - __new_num_nodes) / 2
-                         + (__add_at_front ? __nodes_to_add : 0);
-    copy(this->_M_start._M_node, this->_M_finish._M_node + 1, __new_nstart);
-    this->_M_map.deallocate(this->_M_map._M_data, this->_M_map_size._M_data);
-
-    this->_M_map._M_data = __new_map;
-    this->_M_map_size._M_data = __new_map_size;
-  }
-
-  this->_M_start._M_set_node(__new_nstart);
-  this->_M_finish._M_set_node(__new_nstart + __old_num_nodes - 1);
-}
-
-_STLP_END_NAMESPACE
-
-# undef __iterator__
-# undef iterator
-# undef const_iterator
-# undef size_type
-# undef value_type
-
-#endif /*  _STLP_DEQUE_C */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_deque.h b/src/STLport/stl/_deque.h
deleted file mode 100644
index 02eb070..0000000
--- a/src/STLport/stl/_deque.h
+++ /dev/null
@@ -1,953 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_DEQUE_H
-#define _STLP_INTERNAL_DEQUE_H
-
-# ifndef _STLP_INTERNAL_ALGOBASE_H
-#  include <stl/_algobase.h>
-# endif
-
-# ifndef _STLP_INTERNAL_ALLOC_H
-#  include <stl/_alloc.h>
-# endif
-
-# ifndef _STLP_INTERNAL_ITERATOR_H
-#  include <stl/_iterator.h>
-# endif
-
-# ifndef _STLP_INTERNAL_UNINITIALIZED_H
-#  include <stl/_uninitialized.h>
-# endif
-
-# ifndef _STLP_RANGE_ERRORS_H
-#  include <stl/_range_errors.h>
-# endif
-
-/* Class invariants:
- *  For any nonsingular iterator i:
- *    i.node is the address of an element in the map array.  The
- *      contents of i.node is a pointer to the beginning of a node.
- *    i.first == *(i.node) 
- *    i.last  == i.first + node_size
- *    i.cur is a pointer in the range [i.first, i.last).  NOTE:
- *      the implication of this is that i.cur is always a dereferenceable
- *      pointer, even if i is a past-the-end iterator.
- *  Start and Finish are always nonsingular iterators.  NOTE: this means
- *    that an empty deque must have one node, and that a deque
- *    with N elements, where N is the buffer size, must have two nodes.
- *  For every node other than start.node and finish.node, every element
- *    in the node is an initialized object.  If start.node == finish.node,
- *    then [start.cur, finish.cur) are initialized objects, and
- *    the elements outside that range are uninitialized storage.  Otherwise,
- *    [start.cur, start.last) and [finish.first, finish.cur) are initialized
- *    objects, and [start.first, start.cur) and [finish.cur, finish.last)
- *    are uninitialized storage.
- *  [map, map + map_size) is a valid, non-empty range.  
- *  [start.node, finish.node] is a valid range contained within 
- *    [map, map + map_size).  
- *  A pointer in the range [map, map + map_size) points to an allocated node
- *    if and only if the pointer is in the range [start.node, finish.node].
- */
-
-# undef deque
-# define deque __WORKAROUND_DBG_RENAME(deque)
-
-_STLP_BEGIN_NAMESPACE
-
-template <class _Tp>
-struct _Deque_iterator_base {
-
-  enum _Constants { 
-    _blocksize = _MAX_BYTES, 
-    __buffer_size = (sizeof(_Tp) < (size_t)_blocksize ?
-   		    ( (size_t)_blocksize / sizeof(_Tp)) : size_t(1))
-  };
-
-  typedef random_access_iterator_tag iterator_category;
-
-  typedef _Tp value_type;
-  typedef size_t size_type;
-  typedef ptrdiff_t difference_type;
-
-  typedef value_type** _Map_pointer;
-
-  typedef _Deque_iterator_base< _Tp > _Self;
-
-  value_type* _M_cur;
-  value_type* _M_first;
-  value_type* _M_last;
-  _Map_pointer _M_node;
-
-  _Deque_iterator_base(value_type* __x, _Map_pointer __y) 
-    : _M_cur(__x), _M_first(*__y),
-      _M_last(*__y + __buffer_size), _M_node(__y) {}
-  _Deque_iterator_base() : _M_cur(0), _M_first(0), _M_last(0), _M_node(0) {}
-
-  difference_type _M_subtract(const _Self& __x) const {
-    return difference_type(__buffer_size) * (_M_node - __x._M_node - 1) +
-      (_M_cur - _M_first) + (__x._M_last - __x._M_cur);
-  }
-
-  void _M_increment() {
-    if (++_M_cur == _M_last) {
-      _M_set_node(_M_node + 1);
-      _M_cur = _M_first;
-    }
-  }
-
-  void _M_decrement() {
-    if (_M_cur == _M_first) {
-      _M_set_node(_M_node - 1);
-      _M_cur = _M_last;
-    }
-    --_M_cur;
-  }
-
-  void _M_advance(difference_type __n)
-  {
-    difference_type __offset = __n + (_M_cur - _M_first);
-    if (__offset >= 0 && __offset < difference_type(__buffer_size))
-      _M_cur += __n;
-    else {
-      difference_type __node_offset =
-        __offset > 0 ? __offset / __buffer_size
-                   : -difference_type((-__offset - 1) / __buffer_size) - 1;
-      _M_set_node(_M_node + __node_offset);
-      _M_cur = _M_first + 
-        (__offset - __node_offset * difference_type(__buffer_size));
-    }
-  }
-
-  void _M_set_node(_Map_pointer __new_node) {
-    _M_last = (_M_first = *(_M_node = __new_node)) + difference_type(__buffer_size);
-  }
-};
-
-
-
-template <class _Tp, class _Traits>
-struct _Deque_iterator : public _Deque_iterator_base< _Tp> {
-
-  typedef random_access_iterator_tag iterator_category;
-  typedef _Tp value_type;
-  typedef typename _Traits::reference  reference;
-  typedef typename _Traits::pointer    pointer;
-  typedef size_t size_type;
-  typedef ptrdiff_t difference_type;
-  typedef value_type** _Map_pointer;
-
-  typedef _Deque_iterator_base< _Tp > _Base;
-  typedef _Deque_iterator<_Tp, _Traits> _Self;
-  typedef _Deque_iterator<_Tp, _Nonconst_traits<_Tp> > _Nonconst_self;
-  typedef _Deque_iterator<_Tp, _Const_traits<_Tp> > _Const_self;
-
-  _Deque_iterator(value_type* __x, _Map_pointer __y) :
-    _Deque_iterator_base<value_type>(__x,__y) {}
-
-  _Deque_iterator() {}
-  _Deque_iterator(const _Nonconst_self& __x) : 
-    _Deque_iterator_base<value_type>(__x) {}
-
-  reference operator*() const { 
-      return *this->_M_cur; 
-  }
-
-  _STLP_DEFINE_ARROW_OPERATOR
-
-  difference_type operator-(const _Self& __x) const { return this->_M_subtract(__x); }
-
-  _Self& operator++() { this->_M_increment(); return *this; }
-  _Self operator++(int)  {
-    _Self __tmp = *this;
-    ++*this;
-    return __tmp;
-  }
-
-  _Self& operator--() { this->_M_decrement(); return *this; }
-  _Self operator--(int) {
-    _Self __tmp = *this;
-    --*this;
-    return __tmp;
-  }
-
-  _Self& operator+=(difference_type __n) { this->_M_advance(__n); return *this; }
-  _Self operator+(difference_type __n) const
-  {
-    _Self __tmp = *this;
-    return __tmp += __n;
-  }
-
-  _Self& operator-=(difference_type __n) { return *this += -__n; }
-  _Self operator-(difference_type __n) const {
-    _Self __tmp = *this;
-    return __tmp -= __n;
-  }
-
-  reference operator[](difference_type __n) const { return *(*this + __n); }
-};
-
-template <class _Tp, class _Traits>
-inline _Deque_iterator<_Tp, _Traits> _STLP_CALL
-operator+(ptrdiff_t __n, const _Deque_iterator<_Tp, _Traits>& __x)
-{
-   return __x + __n;
-}
-
-
-#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE
-
-template <class _Tp>
-inline bool _STLP_CALL 
-operator==(const _Deque_iterator_base<_Tp >& __x,
-	   const _Deque_iterator_base<_Tp >& __y) { 
-    return __x._M_cur == __y._M_cur; 
-}
-
-template <class _Tp>
-inline bool _STLP_CALL 
-operator < (const _Deque_iterator_base<_Tp >& __x,
-	    const _Deque_iterator_base<_Tp >& __y) { 
-  return (__x._M_node == __y._M_node) ? 
-    (__x._M_cur < __y._M_cur) : (__x._M_node < __y._M_node);
-}
-
-template <class _Tp>
-inline bool _STLP_CALL 
-operator!=(const _Deque_iterator_base<_Tp >& __x,
-	   const _Deque_iterator_base<_Tp >& __y) { 
-    return __x._M_cur != __y._M_cur; 
-}
-template <class _Tp>
-inline bool _STLP_CALL 
-operator>(const _Deque_iterator_base<_Tp >& __x,
-	  const _Deque_iterator_base<_Tp >& __y) { 
-    return __y < __x;
-}
-template <class _Tp>
-inline bool  _STLP_CALL operator>=(const _Deque_iterator_base<_Tp >& __x,
-                                   const _Deque_iterator_base<_Tp >& __y) { 
-    return !(__x < __y);
-}
-template <class _Tp>
-inline bool  _STLP_CALL operator<=(const _Deque_iterator_base<_Tp >& __x,
-                                   const _Deque_iterator_base<_Tp >& __y) { 
-    return !(__y < __x);
-}
-
-# else
-
-template <class _Tp, class _Traits1, class _Traits2>
-inline bool  _STLP_CALL
-operator==(const _Deque_iterator<_Tp, _Traits1 >& __x,
-	   const _Deque_iterator<_Tp, _Traits2 >& __y) { 
-    return __x._M_cur == __y._M_cur; 
-}
-
-template <class _Tp, class _Traits1, class _Traits2>
-inline bool _STLP_CALL 
-operator < (const _Deque_iterator<_Tp, _Traits1 >& __x,
-	    const _Deque_iterator<_Tp, _Traits2 >& __y) { 
-  return (__x._M_node == __y._M_node) ? 
-    (__x._M_cur < __y._M_cur) : (__x._M_node < __y._M_node);
-}
-
-template <class _Tp>
-inline bool _STLP_CALL 
-operator!=(const _Deque_iterator<_Tp, _Nonconst_traits<_Tp> >& __x,
-	   const _Deque_iterator<_Tp, _Const_traits<_Tp> >& __y) { 
-    return __x._M_cur != __y._M_cur; 
-}
-template <class _Tp>
-inline bool _STLP_CALL 
-operator>(const _Deque_iterator<_Tp, _Nonconst_traits<_Tp> >& __x,
-	  const _Deque_iterator<_Tp, _Const_traits<_Tp> >& __y) { 
-    return __y < __x;
-}
-template <class _Tp>
-inline bool  _STLP_CALL
-operator>=(const _Deque_iterator<_Tp, _Nonconst_traits<_Tp> >& __x,
-           const _Deque_iterator<_Tp, _Const_traits<_Tp> >& __y) { 
-    return !(__x < __y);
-}
-template <class _Tp>
-inline bool _STLP_CALL
-operator<=(const _Deque_iterator<_Tp, _Nonconst_traits<_Tp> >& __x,
-           const _Deque_iterator<_Tp, _Const_traits<_Tp> >& __y) { 
-    return !(__y < __x);
-}
-# endif
-
-# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES
-template <class _Tp, class _Traits> inline _Tp*  _STLP_CALL value_type(const _Deque_iterator<_Tp, _Traits  >&) { return (_Tp*)0; }
-template <class _Tp, class _Traits> inline random_access_iterator_tag _STLP_CALL 
-iterator_category(const _Deque_iterator<_Tp, _Traits  >&) { return random_access_iterator_tag(); }
-template <class _Tp, class _Traits> inline ptrdiff_t* _STLP_CALL 
-distance_type(const _Deque_iterator<_Tp, _Traits  >&) { return 0; }
-#endif
-
-// Deque base class.  It has two purposes.  First, its constructor
-//  and destructor allocate (but don't initialize) storage.  This makes
-//  exception safety easier.  Second, the base class encapsulates all of
-//  the differences between SGI-style allocators and standard-conforming
-//  allocators.
-
-template <class _Tp, class _Alloc>
-class _Deque_base {
-public:
-  typedef _Tp value_type;
-  _STLP_FORCE_ALLOCATORS(_Tp, _Alloc)
-  typedef typename _Alloc_traits<_Tp,_Alloc>::allocator_type  allocator_type;
-  typedef typename _Alloc_traits<_Tp*, _Alloc>::allocator_type _Map_alloc_type;
-
-  typedef _Deque_iterator<_Tp, _Nonconst_traits<_Tp> > iterator;
-  typedef _Deque_iterator<_Tp, _Const_traits<_Tp> >   const_iterator;
-
-  static size_t  _STLP_CALL buffer_size() { return (size_t)_Deque_iterator_base<_Tp>::__buffer_size; } 
-
-  _Deque_base(const allocator_type& __a, size_t __num_elements)
-    : _M_start(), _M_finish(), _M_map(_STLP_CONVERT_ALLOCATOR(__a, _Tp*), 0),
-      _M_map_size(__a, (size_t)0) {
-	_M_initialize_map(__num_elements);
-  }
-  _Deque_base(const allocator_type& __a)
-    : _M_start(), _M_finish(), _M_map(_STLP_CONVERT_ALLOCATOR(__a, _Tp*), 0), 
-      _M_map_size(__a, (size_t)0) {
-  }
-  ~_Deque_base();    
-
-protected:
-  void _M_initialize_map(size_t);
-  void _M_create_nodes(_Tp** __nstart, _Tp** __nfinish);
-  void _M_destroy_nodes(_Tp** __nstart, _Tp** __nfinish);
-  enum { _S_initial_map_size = 8 };
-
-protected:
-  iterator _M_start;
-  iterator _M_finish;
-  _STLP_alloc_proxy<value_type**, value_type*, _Map_alloc_type>  _M_map;
-  _STLP_alloc_proxy<size_t, value_type,  allocator_type>   _M_map_size;  
-};
-
-
-template <class _Tp, _STLP_DEFAULT_ALLOCATOR_SELECT(_Tp) >
-class deque : protected _Deque_base<_Tp, _Alloc> {
-  typedef _Deque_base<_Tp, _Alloc> _Base;
-  typedef deque<_Tp, _Alloc> _Self;
-public:                         // Basic types
-  typedef _Tp value_type;
-  typedef value_type* pointer;
-  typedef const value_type* const_pointer;
-  typedef value_type& reference;
-  typedef const value_type& const_reference;
-  typedef size_t size_type;
-  typedef ptrdiff_t difference_type;
-  typedef random_access_iterator_tag _Iterator_category;
-  _STLP_FORCE_ALLOCATORS(_Tp, _Alloc)
-  typedef typename _Base::allocator_type allocator_type;
-
-public:                         // Iterators
-  typedef typename _Base::iterator       iterator;
-  typedef typename _Base::const_iterator const_iterator;
-
-  _STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS;
-
-protected:                      // Internal typedefs
-  typedef pointer* _Map_pointer;
-  typedef typename  __type_traits<_Tp>::has_trivial_assignment_operator _TrivialAss;
-  typedef typename  __type_traits<_Tp>::has_trivial_assignment_operator _IsPODType;
-
-public:                         // Basic accessors
-  iterator begin() { return this->_M_start; }
-  iterator end() { return this->_M_finish; }
-  const_iterator begin() const { return const_iterator(this->_M_start); }
-  const_iterator end() const { return const_iterator(this->_M_finish); }
-
-  reverse_iterator rbegin() { return reverse_iterator(this->_M_finish); }
-  reverse_iterator rend() { return reverse_iterator(this->_M_start); }
-  const_reverse_iterator rbegin() const 
-    { return const_reverse_iterator(this->_M_finish); }
-  const_reverse_iterator rend() const 
-    { return const_reverse_iterator(this->_M_start); }
-
-  reference operator[](size_type __n)
-    { return this->_M_start[difference_type(__n)]; }
-  const_reference operator[](size_type __n) const 
-    { return this->_M_start[difference_type(__n)]; }
-
-  void _M_range_check(size_type __n) const {
-    if (__n >= this->size())
-      __stl_throw_out_of_range("deque");
-  }
-  reference at(size_type __n)
-    { _M_range_check(__n); return (*this)[__n]; }
-  const_reference at(size_type __n) const
-    { _M_range_check(__n); return (*this)[__n]; }
-
-  reference front() { return *this->_M_start; }
-  reference back() {
-    iterator __tmp = this->_M_finish;
-    --__tmp;
-    return *__tmp;
-  }
-  const_reference front() const { return *this->_M_start; }
-  const_reference back() const {
-    const_iterator __tmp = this->_M_finish;
-    --__tmp;
-    return *__tmp;
-  }
-
-  size_type size() const { return this->_M_finish - this->_M_start; }
-  size_type max_size() const { return size_type(-1); }
-  bool empty() const { return this->_M_finish == this->_M_start; }
-  allocator_type get_allocator() const { return this->_M_map_size; }
-
-public:                         // Constructor, destructor.
-  explicit deque(const allocator_type& __a = allocator_type()) 
-    : _Deque_base<_Tp, _Alloc>(__a, 0) {}
-
-  deque(const _Self& __x) : 
-    _Deque_base<_Tp, _Alloc>(__x.get_allocator(), __x.size()) { 
-      __uninitialized_copy(__x.begin(), __x.end(), this->_M_start, _IsPODType()); 
-  }
-
-  deque(size_type __n, const value_type& __val,
-        const allocator_type& __a = allocator_type()) : 
-    _Deque_base<_Tp, _Alloc>(__a, __n)
-    { _M_fill_initialize(__val); }
-  // int,long variants may be needed 
-  explicit deque(size_type __n) : _Deque_base<_Tp, _Alloc>(allocator_type(), __n)
-    { _M_fill_initialize(value_type()); }
-
-#ifdef _STLP_MEMBER_TEMPLATES
-
-  template <class _Integer>
-  void _M_initialize_dispatch(_Integer __n, _Integer __x, const __true_type&) {
-    this->_M_initialize_map(__n);
-    _M_fill_initialize(__x);
-  }
-
-  template <class _InputIter>
-  void _M_initialize_dispatch(_InputIter __first, _InputIter __last,
-                              const __false_type&) {
-    _M_range_initialize(__first, __last, _STLP_ITERATOR_CATEGORY(__first, _InputIter));
-  }
-
-# ifdef _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS
-  // VC++ needs this
-  template <class _InputIterator>
-  deque(_InputIterator __first, _InputIterator __last) : 
-    _Deque_base<_Tp, _Alloc>(allocator_type()) {
-    typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
-    _M_initialize_dispatch(__first, __last, _Integral());
-  }
-# endif
-
-  // Check whether it's an integral type.  If so, it's not an iterator.
-  template <class _InputIterator>
-  deque(_InputIterator __first, _InputIterator __last,
-        const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL) : 
-    _Deque_base<_Tp, _Alloc>(__a) {
-    typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
-    _M_initialize_dispatch(__first, __last, _Integral());
-  }
-
-# else
-  deque(const value_type* __first, const value_type* __last,
-        const allocator_type& __a = allocator_type() ) 
-    : _Deque_base<_Tp, _Alloc>(__a, __last - __first) { 
-    __uninitialized_copy(__first, __last, this->_M_start, _IsPODType()); 
-  }
-
-  deque(const_iterator __first, const_iterator __last,
-        const allocator_type& __a = allocator_type() ) 
-    : _Deque_base<_Tp, _Alloc>(__a, __last - __first) { 
-    __uninitialized_copy(__first, __last, this->_M_start, _IsPODType()); 
-  }
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-  ~deque() { 
-    _STLP_STD::_Destroy(this->_M_start, this->_M_finish); 
-  }
-
-  _Self& operator= (const _Self& __x);
-
-  void swap(_Self& __x) {
-    _STLP_STD::swap(this->_M_start, __x._M_start);
-    _STLP_STD::swap(this->_M_finish, __x._M_finish);
-    _STLP_STD::swap(this->_M_map, __x._M_map);
-    _STLP_STD::swap(this->_M_map_size, __x._M_map_size);
-  }
-
-public: 
-  // assign(), a generalized assignment member function.  Two
-  // versions: one that takes a count, and one that takes a range.
-  // The range version is a member template, so we dispatch on whether
-  // or not the type is an integer.
-
-  void _M_fill_assign(size_type __n, const _Tp& __val) {
-    if (__n > size()) {
-      _STLP_STD::fill(begin(), end(), __val);
-      insert(end(), __n - size(), __val);
-    }
-    else {
-      erase(begin() + __n, end());
-      _STLP_STD::fill(begin(), end(), __val);
-    }
-  }
-
-  void assign(size_type __n, const _Tp& __val) {
-    _M_fill_assign(__n, __val);
-  }
-
-#ifdef _STLP_MEMBER_TEMPLATES
-
-  template <class _InputIterator>
-  void assign(_InputIterator __first, _InputIterator __last) {
-    typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
-    _M_assign_dispatch(__first, __last, _Integral());
-  }
-
-private:                        // helper functions for assign() 
-
-  template <class _Integer>
-  void _M_assign_dispatch(_Integer __n, _Integer __val, const __true_type&)
-    { _M_fill_assign((size_type) __n, (_Tp) __val); }
-
-  template <class _InputIterator>
-  void _M_assign_dispatch(_InputIterator __first, _InputIterator __last,
-                          const __false_type&) {
-    _M_assign_aux(__first, __last, _STLP_ITERATOR_CATEGORY(__first, _InputIterator));
-  }
-
-  template <class _InputIter>
-  void _M_assign_aux(_InputIter __first, _InputIter __last, const input_iterator_tag &) {
-    iterator __cur = begin();
-    for ( ; __first != __last && __cur != end(); ++__cur, ++__first)
-      *__cur = *__first;
-    if (__first == __last)
-      erase(__cur, end());
-    else
-      insert(end(), __first, __last);
-  }
-
-  template <class _ForwardIterator>
-  void _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
-                     const forward_iterator_tag &) {
-    size_type __len = distance(__first, __last);
-    if (__len > size()) {
-      _ForwardIterator __mid = __first;
-      advance(__mid, size());
-      copy(__first, __mid, begin());
-      insert(end(), __mid, __last);
-    }
-    else
-      erase(copy(__first, __last, begin()), end());
-  }
-
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-public:                         // push_* and pop_*
-  
-  void push_back(const value_type& __t) {
-    if (this->_M_finish._M_cur != this->_M_finish._M_last - 1) {
-      _Construct(this->_M_finish._M_cur, __t);
-      ++this->_M_finish._M_cur;
-    }
-    else
-      _M_push_back_aux_v(__t);
-  }
-  void push_front(const value_type& __t) {
-    if (this->_M_start._M_cur != this->_M_start._M_first) {
-      _Construct(this->_M_start._M_cur - 1, __t);
-      --this->_M_start._M_cur;
-    }
-    else
-      _M_push_front_aux_v(__t);
-  }
-
-# ifndef _STLP_NO_ANACHRONISMS
-  void push_back() {
-    if (this->_M_finish._M_cur != this->_M_finish._M_last - 1) {
-      _Construct(this->_M_finish._M_cur);
-      ++this->_M_finish._M_cur;
-    }
-    else
-      _M_push_back_aux();
-  }
-  void push_front() {
-    if (this->_M_start._M_cur != this->_M_start._M_first) {
-      _Construct(this->_M_start._M_cur - 1);
-      --this->_M_start._M_cur;
-    }
-    else
-      _M_push_front_aux();
-  }
-# endif
-
-  void pop_back() {
-    if (this->_M_finish._M_cur != this->_M_finish._M_first) {
-      --this->_M_finish._M_cur;
-      _STLP_STD::_Destroy(this->_M_finish._M_cur);
-    }
-    else
-      _M_pop_back_aux();
-  }
-
-  void pop_front() {
-    if (this->_M_start._M_cur != this->_M_start._M_last - 1) {
-      _STLP_STD::_Destroy(this->_M_start._M_cur);
-      ++this->_M_start._M_cur;
-    }
-    else 
-      _M_pop_front_aux();
-  }
-
-public:                         // Insert
-
-  iterator insert(iterator __position, const value_type& __x) {
-    if (__position._M_cur == this->_M_start._M_cur) {
-      push_front(__x);
-      return this->_M_start;
-    }
-    else if (__position._M_cur == this->_M_finish._M_cur) {
-      push_back(__x);
-      iterator __tmp = this->_M_finish;
-      --__tmp;
-      return __tmp;
-    }
-    else {
-      return _M_insert_aux(__position, __x);
-    }
-  }
-
-  iterator insert(iterator __position)
-    { return insert(__position, value_type()); }
-
-  void insert(iterator __pos, size_type __n, const value_type& __x) {
-    _M_fill_insert(__pos, __n, __x);
-  }
-
-  void _M_fill_insert(iterator __pos, size_type __n, const value_type& __x);
-
-#ifdef _STLP_MEMBER_TEMPLATES  
-
-  // Check whether it's an integral type.  If so, it's not an iterator.
-  template <class _InputIterator>
-  void insert(iterator __pos, _InputIterator __first, _InputIterator __last) {
-    typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
-    _M_insert_dispatch(__pos, __first, __last, _Integral());
-  }
-
-  template <class _Integer>
-  void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x,
-                          const __true_type&) {
-    _M_fill_insert(__pos, (size_type) __n, (value_type) __x);
-  }
-
-  template <class _InputIterator>
-  void _M_insert_dispatch(iterator __pos,
-                          _InputIterator __first, _InputIterator __last,
-                          const __false_type&) {
-    insert(__pos, __first, __last, _STLP_ITERATOR_CATEGORY(__first, _InputIterator));
-  }
-
-#else /* _STLP_MEMBER_TEMPLATES */
-
-  void insert(iterator __pos,
-              const value_type* __first, const value_type* __last);
-  void insert(iterator __pos,
-              const_iterator __first, const_iterator __last);
-
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-  void resize(size_type __new_size, value_type __x) {
-    const size_type __len = size();
-    if (__new_size < __len) 
-      erase(this->_M_start + __new_size, this->_M_finish);
-    else
-      insert(this->_M_finish, __new_size - __len, __x);
-  }
-
-  void resize(size_type new_size) { resize(new_size, value_type()); }
-
-public:                         // Erase
-  iterator erase(iterator __pos) {
-    iterator __next = __pos;
-    ++__next;
-    difference_type __index = __pos - this->_M_start;
-    if (size_type(__index) < this->size() >> 1) {
-      copy_backward(this->_M_start, __pos, __next);
-      pop_front();
-    }
-    else {
-      copy(__next, this->_M_finish, __pos);
-      pop_back();
-    }
-    return this->_M_start + __index;
-  }
-
-  iterator erase(iterator __first, iterator __last);
-  void clear(); 
-
-protected:                        // Internal construction/destruction
-
-  void _M_fill_initialize(const value_type& __val);
-
-#ifdef _STLP_MEMBER_TEMPLATES 
-
-  template <class _InputIterator>
-  void _M_range_initialize(_InputIterator __first,
-			   _InputIterator __last,
-			   const input_iterator_tag &) {
-    this->_M_initialize_map(0);
-    _STLP_TRY {
-      for ( ; __first != __last; ++__first)
-        push_back(*__first);
-    }
-    _STLP_UNWIND(clear());
-  }
- template <class _ForwardIterator>
- void  _M_range_initialize(_ForwardIterator __first,
-                           _ForwardIterator __last,
-                           const forward_iterator_tag &)  {
-   size_type __n = distance(__first, __last);
-   this->_M_initialize_map(__n);
-   _Map_pointer __cur_node;
-   _STLP_TRY {
-    for (__cur_node = this->_M_start._M_node; 
-         __cur_node < this->_M_finish._M_node; 
-	 ++__cur_node) {
-      _ForwardIterator __mid = __first;
-      advance(__mid, this->buffer_size());
-      uninitialized_copy(__first, __mid, *__cur_node);
-      __first = __mid;
-    }
-    uninitialized_copy(__first, __last, this->_M_finish._M_first);
-   }
-  _STLP_UNWIND(_STLP_STD::_Destroy(this->_M_start, iterator(*__cur_node, __cur_node)));
- }
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-protected:                        // Internal push_* and pop_*
-
-  void _M_push_back_aux_v(const value_type&);
-  void _M_push_front_aux_v(const value_type&);
-# ifndef _STLP_NO_ANACHRONISMS
-  void _M_push_back_aux();
-  void _M_push_front_aux();
-# endif
-  void _M_pop_back_aux();
-  void _M_pop_front_aux();
-
-protected:                        // Internal insert functions
-
-#ifdef _STLP_MEMBER_TEMPLATES
-
-template <class _InputIterator>
-void 
-insert(iterator __pos,
-       _InputIterator __first,
-       _InputIterator __last,
-       const input_iterator_tag &)
-{
-  copy(__first, __last, inserter(*this, __pos));
-}
-
-template <class _ForwardIterator>
-void  insert(iterator __pos,
-	     _ForwardIterator __first,
-	     _ForwardIterator __last,
-	     const forward_iterator_tag &)
- {
-  size_type __n = distance(__first, __last);
-  if (__pos._M_cur == this->_M_start._M_cur) {
-    iterator __new_start = _M_reserve_elements_at_front(__n);
-    _STLP_TRY {
-      uninitialized_copy(__first, __last, __new_start);
-      this->_M_start = __new_start;
-    }
-    _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node));
-  }
-  else if (__pos._M_cur == this->_M_finish._M_cur) {
-    iterator __new_finish = _M_reserve_elements_at_back(__n);
-    _STLP_TRY {
-      uninitialized_copy(__first, __last, this->_M_finish);
-      this->_M_finish = __new_finish;
-    }
-    _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1, __new_finish._M_node + 1));
-  }
-  else
-    _M_insert_aux(__pos, __first, __last, __n);
-}
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-  iterator _M_insert_aux(iterator __pos, const value_type& __x);
-  iterator _M_insert_aux(iterator __pos);
-  iterator _M_insert_aux_prepare(iterator __pos);
-
-  void _M_insert_aux(iterator __pos, size_type __n, const value_type& __x);
-
-#ifdef _STLP_MEMBER_TEMPLATES  
-  template <class _ForwardIterator>
-  void _M_insert_aux(iterator __pos,
-                     _ForwardIterator __first,
-                     _ForwardIterator __last,
-                     size_type __n) {
-    
-    const difference_type __elemsbefore = __pos - this->_M_start;
-    size_type __length = size();
-    if (__elemsbefore < difference_type(__length / 2)) {
-      iterator __new_start = _M_reserve_elements_at_front(__n);
-      iterator __old_start = this->_M_start;
-      __pos = this->_M_start + __elemsbefore;
-      _STLP_TRY {
-	if (__elemsbefore >= difference_type(__n)) {
-	  iterator __start_n = this->_M_start + difference_type(__n); 
-	  uninitialized_copy(this->_M_start, __start_n, __new_start);
-	  this->_M_start = __new_start;
-	  copy(__start_n, __pos, __old_start);
-	  copy(__first, __last, __pos - difference_type(__n));
-	}
-	else {
-	  _ForwardIterator __mid = __first;
-	  advance(__mid, difference_type(__n) - __elemsbefore);
-	  __uninitialized_copy_copy(this->_M_start, __pos, __first, __mid,
-				    __new_start, _IsPODType());
-	  this->_M_start = __new_start;
-	  copy(__mid, __last, __old_start);
-	}
-      }
-      _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node));
-    }
-    else {
-      iterator __new_finish = _M_reserve_elements_at_back(__n);
-      iterator __old_finish = this->_M_finish;
-      const difference_type __elemsafter = 
-	difference_type(__length) - __elemsbefore;
-      __pos = this->_M_finish - __elemsafter;
-      _STLP_TRY {
-      if (__elemsafter > difference_type(__n)) {
-        iterator __finish_n = this->_M_finish - difference_type(__n);
-        uninitialized_copy(__finish_n, this->_M_finish, this->_M_finish);
-        this->_M_finish = __new_finish;
-        copy_backward(__pos, __finish_n, __old_finish);
-        copy(__first, __last, __pos);
-      }
-      else {
-        _ForwardIterator __mid = __first;
-        advance(__mid, __elemsafter);
-        __uninitialized_copy_copy(__mid, __last, __pos, this->_M_finish, this->_M_finish, _IsPODType());
-        this->_M_finish = __new_finish;
-        copy(__first, __mid, __pos);
-      }
-      }
-      _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1, __new_finish._M_node + 1));
-    }
-  }
-#else /* _STLP_MEMBER_TEMPLATES */
-  
-  void _M_insert_aux(iterator __pos,
-                     const value_type* __first, const value_type* __last,
-                     size_type __n);
-
-  void _M_insert_aux(iterator __pos, 
-                     const_iterator __first, const_iterator __last,
-                     size_type __n);
- 
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-  iterator _M_reserve_elements_at_front(size_type __n) {
-    size_type __vacancies = this->_M_start._M_cur - this->_M_start._M_first;
-    if (__n > __vacancies) 
-      _M_new_elements_at_front(__n - __vacancies);
-    return this->_M_start - difference_type(__n);
-  }
-
-  iterator _M_reserve_elements_at_back(size_type __n) {
-    size_type __vacancies = (this->_M_finish._M_last - this->_M_finish._M_cur) - 1;
-    if (__n > __vacancies)
-      _M_new_elements_at_back(__n - __vacancies);
-    return this->_M_finish + difference_type(__n);
-  }
-
-  void _M_new_elements_at_front(size_type __new_elements);
-  void _M_new_elements_at_back(size_type __new_elements);
-
-protected:                      // Allocation of _M_map and nodes
-
-  // Makes sure the _M_map has space for new nodes.  Does not actually
-  //  add the nodes.  Can invalidate _M_map pointers.  (And consequently, 
-  //  deque iterators.)
-
-  void _M_reserve_map_at_back (size_type __nodes_to_add = 1) {
-    if (__nodes_to_add + 1 > this->_M_map_size._M_data - (this->_M_finish._M_node - this->_M_map._M_data))
-      _M_reallocate_map(__nodes_to_add, false);
-  }
-
-  void _M_reserve_map_at_front (size_type __nodes_to_add = 1) {
-    if (__nodes_to_add > size_type(this->_M_start._M_node - this->_M_map._M_data))
-      _M_reallocate_map(__nodes_to_add, true);
-  }
-
-  void _M_reallocate_map(size_type __nodes_to_add, bool __add_at_front);
- 
-};
-
-# define _STLP_TEMPLATE_CONTAINER deque<_Tp, _Alloc>
-# define _STLP_TEMPLATE_HEADER    template <class _Tp, class _Alloc>
-# include <stl/_relops_cont.h>
-# undef _STLP_TEMPLATE_CONTAINER
-# undef _STLP_TEMPLATE_HEADER
-
-_STLP_END_NAMESPACE 
-
-// do a cleanup
-# undef deque
-# undef __deque__
-# define __deque__ __WORKAROUND_DBG_RENAME(deque)
-
-# if !defined (_STLP_LINK_TIME_INSTANTIATION)
-#  include <stl/_deque.c>
-# endif
-
-#if defined (_STLP_DEBUG)
-# include <stl/debug/_deque.h>
-#endif
-
-# if defined (_STLP_USE_WRAPPER_FOR_ALLOC_PARAM)
-#  include <stl/wrappers/_deque.h>
-# endif
-  
-#endif /* _STLP_INTERNAL_DEQUE_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/stl/_epilog.h b/src/STLport/stl/_epilog.h
deleted file mode 100644
index 0393b92..0000000
--- a/src/STLport/stl/_epilog.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* NOTE : this header has no guards and is MEANT for multiple inclusion !
- * If you are using "header protection" option with your compiler,
- * please also find #pragma which disables it and put it here, to
- * allow reentrancy of this header.
- */
-
-/* If the platform provides any specific epilog actions,
-   like #pragmas, do include platform-specific prolog file */
-# if defined (_STLP_HAS_SPECIFIC_PROLOG_EPILOG)
-#  include <config/_epilog.h>
-# endif
-
-# ifndef _STLP_NO_POST_COMPATIBLE_SECTION
-#  include <stl/_config_compat_post.h>
-# endif
-
-/* provide a mechanism to redefine std:: namespace in a way that is transparent to the 
- * user. _STLP_REDEFINE_STD is being used for wrapper files that include native headers
- * to temporary undef the std macro. */
-#  if defined ( _STLP_USE_NAMESPACES ) && (defined ( _STLP_USE_OWN_NAMESPACE ) && !defined ( _STLP_REDEFINE_STD ) )
-#   undef _STLP_REDEFINE_STD
-#   define _STLP_REDEFINE_STD 1
-#  endif
-
-# if defined (_STLP_REDEFINE_STD)
-/*  We redefine "std" to "stlport", so that user code may use std:: transparently */
-#   undef  std
-#   define std STLPORT
-# else
-# if defined(__cplusplus)
-#  ifndef _STLP_CONFIG_H
-#   include <stl/_config.h>
-#  endif
-
-# endif /* __cplusplus */
-# endif
-
-
-
-
-
-
-
-
diff --git a/src/STLport/stl/_exception.h b/src/STLport/stl/_exception.h
deleted file mode 100644
index e69de29..0000000
diff --git a/src/STLport/stl/_fstream.c b/src/STLport/stl/_fstream.c
deleted file mode 100644
index b01789b..0000000
--- a/src/STLport/stl/_fstream.c
+++ /dev/null
@@ -1,749 +0,0 @@
-/*
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-#ifndef _STLP_FSTREAM_C
-#define _STLP_FSTREAM_C
-
-# ifndef _STLP_INTERNAL_FSTREAM_H
-#  include <stl/_fstream.h>
-# endif
-
-# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION)
-
-_STLP_BEGIN_NAMESPACE
-
-# if defined ( _STLP_NESTED_TYPE_PARAM_BUG )
-// no wchar_t is supported for this mode
-# define __BF_int_type__ int
-# define __BF_pos_type__ streampos
-# define __BF_off_type__ streamoff
-# else
-# define __BF_int_type__ _STLP_TYPENAME_ON_RETURN_TYPE basic_filebuf<_CharT, _Traits>::int_type
-# define __BF_pos_type__ _STLP_TYPENAME_ON_RETURN_TYPE basic_filebuf<_CharT, _Traits>::pos_type
-# define __BF_off_type__ _STLP_TYPENAME_ON_RETURN_TYPE basic_filebuf<_CharT, _Traits>::off_type
-# endif
-
-
-//----------------------------------------------------------------------
-// Public basic_filebuf<> member functions
-
-template <class _CharT, class _Traits>
-basic_filebuf<_CharT, _Traits>::basic_filebuf()
-     :  basic_streambuf<_CharT, _Traits>(), _M_base(),
-    _M_constant_width(false), _M_always_noconv(false),
-    _M_int_buf_dynamic(false),
-    _M_in_input_mode(false), _M_in_output_mode(false),
-    _M_in_error_mode(false), _M_in_putback_mode(false),
-    _M_int_buf(0), _M_int_buf_EOS(0),
-    _M_ext_buf(0), _M_ext_buf_EOS(0),
-    _M_ext_buf_converted(0), _M_ext_buf_end(0),
-    _M_state(_STLP_DEFAULT_CONSTRUCTED(_State_type)),
-    _M_end_state(_STLP_DEFAULT_CONSTRUCTED(_State_type)),
-    _M_mmap_base(0), _M_mmap_len(0),
-    _M_saved_eback(0), _M_saved_gptr(0), _M_saved_egptr(0),
-    _M_codecvt(0),
-    _M_width(1), _M_max_width(1)
-{
-  this->_M_setup_codecvt(locale());
-}
-
-template <class _CharT, class _Traits>
-basic_filebuf<_CharT, _Traits>::~basic_filebuf() {
-  this->close();
-  _M_deallocate_buffers();
-}
-
-
-template <class _CharT, class _Traits>
-_STLP_TYPENAME_ON_RETURN_TYPE basic_filebuf<_CharT, _Traits>::int_type 
-basic_filebuf<_CharT, _Traits>::underflow() 
-{
-  return _Underflow<_CharT, _Traits>::_M_doit(this);
-}
-
-template <class _CharT, class _Traits>
-basic_filebuf<_CharT, _Traits>* 
-basic_filebuf<_CharT, _Traits>::close()
-{
-  bool __ok = this->is_open();
-
-  if (_M_in_output_mode) {
-    __ok = __ok && !_Traits::eq_int_type(this->overflow(traits_type::eof()),
-                                         traits_type::eof());
-    __ok == __ok && this->_M_unshift();
-  }
-  else if (_M_in_input_mode)
-      this->_M_exit_input_mode();
-
-  // Note order of arguments.  We close the file even if __ok is false.
-  __ok = _M_base._M_close() && __ok;
-
-  // Restore the initial state, except that we don't deallocate the buffer
-  // or mess with the cached codecvt information.
-  _M_state = _M_end_state = _State_type();
-  _M_ext_buf_converted = _M_ext_buf_end = 0;
-
-  _M_mmap_base = 0;
-  _M_mmap_len = 0;
-
-  this->setg(0, 0, 0);
-  this->setp(0, 0);
-
-  _M_saved_eback = _M_saved_gptr = _M_saved_egptr = 0;
-
-  _M_in_input_mode = _M_in_output_mode = _M_in_error_mode = _M_in_putback_mode
-    = false;
-
-  return __ok ? this : 0;
-}
-
-// This member function is called whenever we exit input mode.
-// It unmaps the memory-mapped file, if any, and sets
-// _M_in_input_mode to false.  
-template <class _CharT, class _Traits>
-void basic_filebuf<_CharT, _Traits>::_M_exit_input_mode()
-{
-   if (_M_mmap_base != 0)
-     _M_base._M_unmap(_M_mmap_base, _M_mmap_len); 
-   _M_in_input_mode = false;
-   _M_mmap_base = 0;
-}
-
-
-//----------------------------------------------------------------------
-// basic_filebuf<> overridden protected virtual member functions
-
-template <class _CharT, class _Traits>
-streamsize basic_filebuf<_CharT, _Traits>::showmanyc()
-{
-  // Is there any possibility that reads can succeed?
-  if (!this->is_open() || _M_in_output_mode || _M_in_error_mode)
-    return -1;
-
-  else if (_M_in_putback_mode)
-    return this->egptr() - this->gptr();
-
-  else if (_M_constant_width) {
-    streamoff __pos  = _M_base._M_seek(0, ios_base::cur);
-    streamoff __size = _M_base._M_file_size();
-    return __pos >= 0 && __size > __pos ? __size - __pos : 0;
-  }
-
-  else 
-    return 0;
-}
-
-
-// Make a putback position available, if necessary, by switching to a 
-// special internal buffer used only for putback.  The buffer is
-// [_M_pback_buf, _M_pback_buf + _S_pback_buf_size), but the base
-// class only sees a piece of it at a time.  (We want to make sure
-// that we don't try to read a character that hasn't been initialized.)
-// The end of the putback buffer is always _M_pback_buf + _S_pback_buf_size,
-// but the beginning is usually not _M_pback_buf.
-template <class _CharT, class _Traits>
-__BF_int_type__ 
-basic_filebuf<_CharT, _Traits>::pbackfail(int_type __c)
-{
-  const int_type __eof = traits_type::eof();
-
-  // If we aren't already in input mode, pushback is impossible.
-  if (!_M_in_input_mode)
-    return __eof;
-
-  // We can use the ordinary get buffer if there's enough space, and
-  // if it's a buffer that we're allowed to write to.
-  if (this->gptr() != this->eback() &&
-      (traits_type::eq_int_type(__c, __eof) ||
-       traits_type::eq(traits_type::to_char_type(__c), this->gptr()[-1]) ||
-       !_M_mmap_base)) {
-    this->gbump(-1);
-    if (traits_type::eq_int_type(__c, __eof) ||
-        traits_type::eq(traits_type::to_char_type(__c), *this->gptr()))
-      return traits_type::to_int_type(*this->gptr());
-  }
-  else if (!traits_type::eq_int_type(__c, __eof)) {
-    // Are we in the putback buffer already?
-    _CharT* __pback_end = _M_pback_buf + __STATIC_CAST(int,_S_pback_buf_size);
-    if (_M_in_putback_mode) {
-      // Do we have more room in the putback buffer?
-      if (this->eback() != _M_pback_buf) 
-        this->setg(this->egptr() - 1, this->egptr() - 1, __pback_end);
-      else
-        return __eof;           // No more room in the buffer, so fail.
-    }
-    else {                      // We're not yet in the putback buffer.
-      _M_saved_eback = this->eback();
-      _M_saved_gptr  = this->gptr();
-      _M_saved_egptr = this->egptr();
-      this->setg(__pback_end - 1, __pback_end - 1, __pback_end);
-      _M_in_putback_mode = true;
-    }
-  }
-  else
-    return __eof;
-
-  // We have made a putback position available.  Assign to it, and return.
-  *this->gptr() = traits_type::to_char_type(__c);
-  return __c;
-}
-
-// This member function flushes the put area, and also outputs the
-// character __c (unless __c is eof).  Invariant: we always leave room
-// in the internal buffer for one character more than the base class knows
-// about.  We see the internal buffer as [_M_int_buf, _M_int_buf_EOS), but
-// the base class only sees [_M_int_buf, _M_int_buf_EOS - 1).
-template <class _CharT, class _Traits>
-__BF_int_type__
-basic_filebuf<_CharT, _Traits>::overflow(int_type __c)
-{
-  // Switch to output mode, if necessary.
-  if (!_M_in_output_mode)
-    if (!_M_switch_to_output_mode())
-      return traits_type::eof();
-
-  _CharT* __ibegin = this->_M_int_buf;
-  _CharT* __iend   = this->pptr();
-  this->setp(_M_int_buf, _M_int_buf_EOS - 1);
-
-  // Put __c at the end of the internal buffer.
-  if (!traits_type::eq_int_type(__c, traits_type::eof()))
-    *__iend++ = __c;
-
-  // For variable-width encodings, output may take more than one pass.
-  while (__ibegin != __iend) {
-    const _CharT* __inext = __ibegin;
-    char* __enext         = _M_ext_buf;
-    typename _Codecvt::result __status
-      = _M_codecvt->out(_M_state, __ibegin, __iend, __inext,
-                                  _M_ext_buf, _M_ext_buf_EOS, __enext);
-    if (__status == _Codecvt::noconv)
-      return _Noconv_output<_Traits>::_M_doit(this, __ibegin, __iend)
-        ? traits_type::not_eof(__c)
-        : _M_output_error();
-
-    // For a constant-width encoding we know that the external buffer
-    // is large enough, so failure to consume the entire internal buffer
-    // or to produce the correct number of external characters, is an error.
-    // For a variable-width encoding, however, we require only that we 
-    // consume at least one internal character
-    else if (__status != _Codecvt::error && 
-             ((__inext == __iend && (__enext - _M_ext_buf == 
-                                     _M_width * (__iend - __ibegin))) ||
-              (!_M_constant_width && __inext != __ibegin))) {
-        // We successfully converted part or all of the internal buffer.
-      ptrdiff_t __n = __enext - _M_ext_buf;
-      if (_M_write(_M_ext_buf, __n))
-        __ibegin += __inext - __ibegin;
-      else
-        return _M_output_error();
-    }
-    else
-      return _M_output_error();
-  }
-
-  return traits_type::not_eof(__c);
-}
-
-// This member function must be called before any I/O has been
-// performed on the stream, otherwise it has no effect.
-//
-// __buf == 0 && __n == 0 means to make ths stream unbuffered.
-// __buf != 0 && __n > 0 means to use __buf as the stream's internal
-// buffer, rather than the buffer that would otherwise be allocated
-// automatically.  __buf must be a pointer to an array of _CharT whose
-// size is at least __n.
-template <class _CharT, class _Traits>
-basic_streambuf<_CharT, _Traits>*
-basic_filebuf<_CharT, _Traits>::setbuf(_CharT* __buf, streamsize __n)
-{
-  if (!_M_in_input_mode &&! _M_in_output_mode && !_M_in_error_mode &&
-      _M_int_buf == 0) {
-    if (__buf == 0 && __n == 0)
-      _M_allocate_buffers(0, 1);
-    else if (__buf != 0 && __n > 0)
-      _M_allocate_buffers(__buf, __n);
-  }
-  return this;
-}
-
-template <class _CharT, class _Traits>
-__BF_pos_type__
-basic_filebuf<_CharT, _Traits>::seekoff(off_type __off,
-                                        ios_base::seekdir __whence,
-                                        ios_base::openmode /* dummy */)
-{
-  if (this->is_open() &&
-      (__off == 0 || (_M_constant_width && this->_M_base._M_in_binary_mode()))) {
-
-    if (!_M_seek_init(__off != 0 || __whence != ios_base::cur))
-      return pos_type(-1);
-
-    // Seek to beginning or end, regardless of whether we're in input mode.
-    if (__whence == ios_base::beg || __whence == ios_base::end)
-      return _M_seek_return(_M_base._M_seek(_M_width * __off, __whence),
-                            _State_type());
-
-    // Seek relative to current position.  Complicated if we're in input mode.
-    else if (__whence == ios_base::cur) {
-
-      if (!_M_in_input_mode)
-        return _M_seek_return(_M_base._M_seek(_M_width * __off, __whence),
-                              _State_type());
-      else if (_M_mmap_base != 0) {
-        // __off is relative to gptr().  We need to do a bit of arithmetic
-        // to get an offset relative to the external file pointer.
-        streamoff __adjust = _M_mmap_len - (this->gptr() - (_CharT*) _M_mmap_base);
-
-        // if __off == 0, we do not need to exit input mode and to shift file pointer
-        if (__off == 0) {
-          return pos_type(_M_base._M_seek(0, ios_base::cur) - __adjust);
-        }
-        else
-          return _M_seek_return(_M_base._M_seek(__off - __adjust, ios_base::cur), _State_type());
-      }
-      else if (_M_constant_width) { // Get or set the position.  
-
-        streamoff __iadj = _M_width * (this->gptr() - this->eback());
-        
-        // Compensate for offset relative to gptr versus offset relative
-        // to external pointer.  For a text-oriented stream, where the 
-        // compensation is more than just pointer arithmetic, we may get
-        // but not set the current position.
-        
-        if (__iadj <= _M_ext_buf_end - _M_ext_buf) {
-          
-          streamoff __eadj =  _M_base._M_get_offset(_M_ext_buf + __iadj, _M_ext_buf_end);
-
-          if (__off == 0) {
-            return pos_type(_M_base._M_seek(0, ios_base::cur) - __eadj);
-          }  else {
-            return _M_seek_return(_M_base._M_seek(__off - __eadj, ios_base::cur), _State_type());
-          }
-        }
-        else
-          return pos_type(-1);
-      }
-      else {                    // Get the position.  Encoding is var width.
-        // Get position in internal buffer.
-        ptrdiff_t __ipos = this->gptr() - this->eback();
-        
-        // Get corresponding position in external buffer.
-        _State_type __state = _M_state;
-        int __epos = _M_codecvt->length(__state, _M_ext_buf, _M_ext_buf_end,
-                                        __ipos);
-
-        // Sanity check (expensive): make sure __epos is the right answer.
-        _State_type __tmp_state = _M_state;
-        _Filebuf_Tmp_Buf<_CharT> __buf(__ipos);
-        _CharT* __ibegin = __buf._M_ptr;
-        _CharT* __inext  = __ibegin;
-
-        const char* __dummy;
-        typename _Codecvt::result __status
-          = _M_codecvt->in(__tmp_state,
-                           _M_ext_buf, _M_ext_buf + __epos, __dummy,
-                           __ibegin, __ibegin + __ipos, __inext);
-        if (__status != _Codecvt::error &&
-            (__status == _Codecvt::noconv ||
-             (__inext == __ibegin + __ipos &&
-              equal(this->gptr(), this->eback(), __ibegin,
-                    _Eq_traits<traits_type>())))) {
-          // Get the current position (at the end of the external buffer),
-          // then adjust it.  Again, it might be a text-oriented stream.
-          streamoff __cur = _M_base._M_seek(0, ios_base::cur);
-          streamoff __adj =
-            _M_base._M_get_offset(_M_ext_buf, _M_ext_buf + __epos) -
-            _M_base._M_get_offset(_M_ext_buf, _M_ext_buf_end);
-          if (__cur != -1 && __cur + __adj >= 0)
-            return _M_seek_return(__cur + __adj, __state);
-          else
-            return pos_type(-1);
-        }
-        else                    // We failed the sanity check.
-          return pos_type(-1);
-      }
-    }
-    else                        // Unrecognized value for __whence.
-      return pos_type(-1);
-  }
-  else
-    return pos_type(-1);
-}
-
-
-template <class _CharT, class _Traits>
-__BF_pos_type__
-basic_filebuf<_CharT, _Traits>::seekpos(pos_type __pos,
-                                        ios_base::openmode /* dummy */)
-{
-  if (this->is_open()) {
-    if (!_M_seek_init(true))
-      return pos_type(-1);
-
-    streamoff __off = off_type(__pos);
-    if (__off != -1 && _M_base._M_seek(__off, ios_base::beg) != -1) {
-      _M_state = __pos.state();
-      return _M_seek_return(__off, __pos.state());
-    }
-    else
-      return pos_type(-1);
-  }
-  else
-    return pos_type(-1);
-}
-
-
-template <class _CharT, class _Traits>
-int basic_filebuf<_CharT, _Traits>::sync()
-{
-  if (_M_in_output_mode)
-    return traits_type::eq_int_type(this->overflow(traits_type::eof()),
-                                    traits_type::eof())
-      ? -1
-      : 0;
-  else
-    return 0;
-}
-
-
-// Change the filebuf's locale.  This member function has no effect
-// unless it is called before any I/O is performed on the stream.
-template <class _CharT, class _Traits>
-void basic_filebuf<_CharT, _Traits>::imbue(const locale& __loc)
-{
-  if (!_M_in_input_mode &&! _M_in_output_mode && !_M_in_error_mode) {
-    this->_M_setup_codecvt(__loc);
-  }
-}
-
-//----------------------------------------------------------------------
-// basic_filebuf<> helper functions.
-
-//----------------------------------------
-// Helper functions for switching between modes.
-
-// This member function is called if we're performing the first I/O
-// operation on a filebuf, or if we're performing an input operation 
-// immediately after a seek.
-template <class _CharT, class _Traits>
-bool basic_filebuf<_CharT, _Traits>::_M_switch_to_input_mode()
-{
-
-  if (this->is_open() && (((int)_M_base.__o_mode() & (int)ios_base::in) !=0)
-      && (_M_in_output_mode == 0) && (_M_in_error_mode == 0)) {
-    if (!_M_int_buf && !_M_allocate_buffers())
-      return false;
-
-    _M_ext_buf_converted = _M_ext_buf;
-    _M_ext_buf_end       = _M_ext_buf;
-
-    _M_end_state    = _M_state;
-
-    _M_in_input_mode = true;
-    return true;
-  }
-  else
-
-    return false;
-}
-
-
-// This member function is called if we're performing the first I/O
-// operation on a filebuf, or if we're performing an output operation 
-// immediately after a seek.
-template <class _CharT, class _Traits>
-bool basic_filebuf<_CharT, _Traits>::_M_switch_to_output_mode()
-{
-  if (this->is_open() && (_M_base.__o_mode() & (int)ios_base::out) &&
-      _M_in_input_mode == 0 && _M_in_error_mode == 0) {
-
-    if (!_M_int_buf && !_M_allocate_buffers())
-      return false;
-
-    // In append mode, every write does an implicit seek to the end
-    // of the file.  Whenever leaving output mode, the end of file
-    // get put in the initial shift state.
-    if (_M_base.__o_mode() & ios_base::app)
-      _M_state = _State_type();
-
-    this->setp(_M_int_buf, _M_int_buf_EOS - 1);
-    _M_in_output_mode = true;
-
-    return true;
-  }
-  else
-    return false;
-}
-
-
-//----------------------------------------
-// Helper functions for input
-
-// This member function is called if there is an error during input.
-// It puts the filebuf in error mode, clear the get area buffer, and
-// returns eof.
-// returns eof.  Error mode is sticky; it is cleared only by close or
-// seek.
-
-template <class _CharT, class _Traits>
-__BF_int_type__
-basic_filebuf<_CharT, _Traits>::_M_input_error()
-{
-   this->_M_exit_input_mode();   
-  _M_in_output_mode = false;
-  _M_in_error_mode = true;
-  this->setg(0, 0, 0);
-  return traits_type::eof();
-}
-
-template <class _CharT, class _Traits>
-__BF_int_type__ 
-basic_filebuf<_CharT, _Traits>::_M_underflow_aux() 
-{
-  // We have the state and file position from the end of the internal
-  // buffer.  This round, they become the beginning of the internal buffer.
-  _M_state    = _M_end_state;
-
-  // Fill the external buffer.  Start with any leftover characters that
-  // didn't get converted last time.
-  if (_M_ext_buf_end > _M_ext_buf_converted)
-
-    _M_ext_buf_end = copy(_M_ext_buf_converted, _M_ext_buf_end, _M_ext_buf);
-    // boris : copy_backward did not work
-    //_M_ext_buf_end = copy_backward(_M_ext_buf_converted, _M_ext_buf_end, 
-    //_M_ext_buf+ (_M_ext_buf_end - _M_ext_buf_converted));
-  else
-    _M_ext_buf_end = _M_ext_buf;
-
-  // Now fill the external buffer with characters from the file.  This is
-  // a loop because occasonally we don't get enough external characters
-  // to make progress.
-  while (true) {
-    ptrdiff_t __n = _M_base._M_read(_M_ext_buf_end, _M_ext_buf_EOS - _M_ext_buf_end);
- 
-    // Don't enter error mode for a failed read.  Error mode is sticky,
-    // and we might succeed if we try again.
-    if (__n <= 0)
-      return traits_type::eof();
-
-    // Convert the external buffer to internal characters.  
-    _M_ext_buf_end += __n;
-    const char*   __enext;
-    _CharT* __inext;
-
-    typename _Codecvt::result __status
-      = _M_codecvt->in(_M_end_state,
-                       _M_ext_buf, _M_ext_buf_end, __enext,
-                       _M_int_buf, _M_int_buf_EOS, __inext);
-
-    // Error conditions: (1) Return value of error.  (2) Producing internal
-    // characters without consuming external characters.  (3) In fixed-width
-    // encodings, producing an internal sequence whose length is inconsistent
-    // with that of the internal sequence.  (4) Failure to produce any 
-    // characters if we have enough characters in the external buffer, where
-    // "enough" means the largest possible width of a single character.
-    if (__status == _Codecvt::noconv)
-      return _Noconv_input<_Traits>::_M_doit(this);
-
-    else if (__status == _Codecvt::error ||
-             (__inext != _M_int_buf && __enext == _M_ext_buf) ||
-             (_M_constant_width &&
-              //         __inext - _M_int_buf != _M_width * (__enext - _M_ext_buf)) ||
-              (__inext - _M_int_buf) *  _M_width != (__enext - _M_ext_buf)) ||
-             (__inext == _M_int_buf && __enext - _M_ext_buf >= _M_max_width))
-      return _M_input_error();
-    
-    else if (__inext != _M_int_buf) {
-      _M_ext_buf_converted = _M_ext_buf + (__enext - _M_ext_buf);
-      this->setg(_M_int_buf, _M_int_buf, __inext);
-      return traits_type::to_int_type(*_M_int_buf);
-    }
-    // We need to go around the loop again to get more external characters.
-  } 
-}
-
-//----------------------------------------
-// Helper functions for output
-
-// This member function is called if there is an error during output.
-// It puts the filebuf in error mode, clear the put area buffer, and
-// returns eof.  Error mode is sticky; it is cleared only by close or
-// seek.
-template <class _CharT, class _Traits>
-__BF_int_type__
-basic_filebuf<_CharT, _Traits>::_M_output_error()
-{
-  _M_in_output_mode = false;
-  _M_in_input_mode = false;
-  _M_in_error_mode = true;
-  this->setp(0, 0);
-  return traits_type::eof();
-}
-
-
-// Write whatever sequence of characters is necessary to get back to
-// the initial shift state.  This function overwrites the external
-// buffer, changes the external file position, and changes the state.
-// Precondition: the internal buffer is empty.
-template <class _CharT, class _Traits>
-bool basic_filebuf<_CharT, _Traits>::_M_unshift()
-{
-  if (_M_in_output_mode && !_M_constant_width) {
-    typename _Codecvt::result __status;
-    do {
-      char* __enext = _M_ext_buf;
-      __status = _M_codecvt->unshift(_M_state,
-                                     _M_ext_buf, _M_ext_buf_EOS, __enext);
-      if (__status == _Codecvt::noconv ||
-          (__enext == _M_ext_buf && __status == _Codecvt::ok))
-        return true;
-      else if (__status == _Codecvt::error)
-        return false;
-      else if (!_M_write(_M_ext_buf, __enext - _M_ext_buf))
-        return false;
-    } while(__status == _Codecvt::partial);
-  }
-
-  return true;
-}
-
-
-//----------------------------------------
-// Helper functions for buffer allocation and deallocation
-
-// This member function is called when we're initializing a filebuf's
-// internal and external buffers.  The argument is the size of the
-// internal buffer; the external buffer is sized using the character
-// width in the current encoding.  Preconditions: the buffers are currently
-// null.  __n >= 1.  __buf is either a null pointer or a pointer to an 
-// array show size is at least __n.
-
-// We need __n >= 1 for two different reasons.  For input, the base
-// class always needs a buffer because of the sementics of underflow().
-// For output, we want to have an internal buffer that's larger by one
-// element than the buffer that the base class knows about.  (See 
-// basic_filebuf<>::overflow() for the reason.)
-template <class _CharT, class _Traits>
-bool 
-basic_filebuf<_CharT, _Traits>::_M_allocate_buffers(_CharT* __buf, streamsize __n)
-{
-
-  if (__buf == 0) {
-    _M_int_buf = __STATIC_CAST(_CharT*,malloc(__n * sizeof(_CharT)));
-    if (! _M_int_buf)
-      return false;
-    _M_int_buf_dynamic = true;
-  }
-  else {
-    _M_int_buf = __buf;
-    _M_int_buf_dynamic = false;
-  }
-  
-  size_t __ebufsiz = (max)(__n * (max)(_M_codecvt->encoding(), 1),
-                      streamsize(_M_codecvt->max_length()));
-
-  _M_ext_buf = __STATIC_CAST(char*,malloc(__ebufsiz));
-  if (!_M_ext_buf) {
-    _M_deallocate_buffers();
-    return false;
-  }
-
-  _M_int_buf_EOS = _M_int_buf + __n;
-  _M_ext_buf_EOS = _M_ext_buf + __ebufsiz;
-  return true;
-}
-
-// Abbreviation for the most common case.
-template <class _CharT, class _Traits>
-bool basic_filebuf<_CharT, _Traits>::_M_allocate_buffers()
-{
-  // Choose a buffer that's at least 4096 characters long and that's a
-  // multiple of the page size.
-  streamsize __default_bufsiz =
-    ((_M_base.__page_size() + 4095UL) / _M_base.__page_size()) * _M_base.__page_size();
-  return _M_allocate_buffers(0, __default_bufsiz);
-}
-
-template <class _CharT, class _Traits>
-void basic_filebuf<_CharT, _Traits>::_M_deallocate_buffers()
-{
-  if (_M_int_buf_dynamic)
-    free(_M_int_buf);
-  free(_M_ext_buf);
-  _M_int_buf     = 0;
-  _M_int_buf_EOS = 0;
-  _M_ext_buf     = 0;
-  _M_ext_buf_EOS = 0;
-}
-
-
-//----------------------------------------
-// Helper functiosn for seek and imbue
-
-template <class _CharT, class _Traits>
-bool basic_filebuf<_CharT, _Traits>::_M_seek_init(bool __do_unshift) {
-  // If we're in error mode, leave it.
-   _M_in_error_mode = false;
-   
-  // Flush the output buffer if we're in output mode, and (conditionally)
-  // emit an unshift sequence.
-  if (_M_in_output_mode) {
-    bool __ok = !traits_type::eq_int_type(this->overflow(traits_type::eof()),
-                                          traits_type::eof());
-    if (__do_unshift)
-      __ok = __ok && this->_M_unshift();
-    if (!__ok) {
-      _M_in_output_mode = false;
-      _M_in_error_mode = true;
-      this->setp(0, 0);
-      return false;
-    }
-  }
-
-  // Discard putback characters, if any.
-  if (_M_in_input_mode && _M_in_putback_mode)
-    _M_exit_putback_mode();
-
-  return true;
-}
-
-
-// Change the filebuf's locale.  This member function has no effect
-// unless it is called before any I/O is performed on the stream.
-template <class _CharT, class _Traits>
-void basic_filebuf<_CharT, _Traits>::_M_setup_codecvt(const locale& __loc)
-{
-  _M_codecvt = &use_facet<_Codecvt>(__loc) ;
-  int __encoding    = _M_codecvt->encoding();
-
-  _M_width          = (max)(__encoding, 1);
-  _M_max_width      = _M_codecvt->max_length();
-  _M_constant_width = __encoding > 0;
-  _M_always_noconv  = _M_codecvt->always_noconv();
-}
-
-_STLP_END_NAMESPACE
-
-# undef __BF_int_type__
-# undef __BF_pos_type__
-# undef __BF_off_type__
-
-# endif /* defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) */
-
-#endif /* _STLP_FSTREAM_C */
-
diff --git a/src/STLport/stl/_fstream.h b/src/STLport/stl/_fstream.h
deleted file mode 100644
index 58f9c52..0000000
--- a/src/STLport/stl/_fstream.h
+++ /dev/null
@@ -1,741 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-// This header defines classes basic_filebuf, basic_ifstream,
-// basic_ofstream, and basic_fstream.  These classes represent
-// streambufs and streams whose sources or destinations are files.
-
-#ifndef _STLP_INTERNAL_FSTREAM_H
-#define _STLP_INTERNAL_FSTREAM_H
-
-#if defined(__sgi) && !defined(__GNUC__) && !defined(_STANDARD_C_PLUS_PLUS)
-#error This header file requires the -LANG:std option
-#endif
-
-#ifndef _STLP_INTERNAL_STREAMBUF
-# include <stl/_streambuf.h>
-#endif
-
-#ifndef _STLP_INTERNAL_ISTREAM_H
-#include <stl/_istream.h>
-#endif
-
-#ifndef _STLP_INTERNAL_CODECVT_H
-#include <stl/_codecvt.h>
-#endif
-
-#ifndef _STLP_STDIO_FILE_H
-#include <stl/_stdio_file.h>
-#endif
-
-#if !defined (_STLP_USE_UNIX_IO) && !defined(_STLP_USE_WIN32_IO) \
-    && ! defined (_STLP_USE_UNIX_EMULATION_IO) && !defined (_STLP_USE_STDIO_IO)
-
-# if defined (_STLP_UNIX)  || defined (__CYGWIN__) || defined (__amigaos__) || defined (__EMX__)
-// open/close/read/write
-#  define _STLP_USE_UNIX_IO
-# elif defined (_STLP_WIN32)  && ! defined (__CYGWIN__)
-// CreateFile/ReadFile/WriteFile
-#  define _STLP_USE_WIN32_IO
-# elif defined (_STLP_WIN16) || defined (_STLP_WIN32) || defined (_STLP_MAC)
-// _open/_read/_write
-#  define _STLP_USE_UNIX_EMULATION_IO
-# else
-// fopen/fread/fwrite
-#  define _STLP_USE_STDIO_IO
-# endif /* _STLP_UNIX */
-
-#endif /* mode selection */
-
-
-#if defined (_STLP_USE_WIN32_IO)
-typedef void* _STLP_fd;
-#elif defined (_STLP_USE_UNIX_EMULATION_IO) || defined (_STLP_USE_STDIO_IO) || defined (_STLP_USE_UNIX_IO)
-typedef int _STLP_fd;
-#else
-#error "Configure i/o !"
-#endif
-
-
-_STLP_BEGIN_NAMESPACE
-
-//----------------------------------------------------------------------
-// Class _Filebuf_base, a private base class to factor out the system-
-// dependent code from basic_filebuf<>.
-
-class _STLP_CLASS_DECLSPEC _Filebuf_base {
-public:                      // Opening and closing files.
-  _Filebuf_base();
-
-  bool _M_open(const char*, ios_base::openmode, long __protection);
-  bool _M_open(const char*, ios_base::openmode);
-  bool _M_open(int __id, ios_base::openmode = ios_base::__default_mode);
-  bool _M_close();
-
-public:                      // Low-level I/O, like Unix read/write
-  ptrdiff_t _M_read(char* __buf,  ptrdiff_t __n);
-  streamoff _M_seek(streamoff __offset, ios_base::seekdir __dir);
-  streamoff _M_file_size();
-  bool _M_write(char* __buf,  ptrdiff_t __n);
-
-public:                      // Memory-mapped I/O.
-  void* _M_mmap(streamoff __offset, streamoff __len);
-  void _M_unmap(void* __mmap_base, streamoff __len);
-
-public:
-  // Returns a value n such that, if pos is the file pointer at the
-  // beginning of the range [first, last), pos + n is the file pointer at
-  // the end.  On many operating systems n == __last - __first.
-  // In Unix, writing n characters always bumps the file position by n.
-  // In Windows text mode, however, it bumps the file position by n + m,
-  // where m is the number of newlines in the range.  That's because an
-  // internal \n corresponds to an external two-character sequence.
-  streamoff _M_get_offset(char* __first, char* __last) {
-#if defined (_STLP_UNIX) || defined (_STLP_MAC)
-    return __last - __first;
-#else // defined (_STLP_WIN32) || defined (_STLP_WIN16) || defined (_STLP_DOS)
-    return ( (_M_openmode & ios_base::binary) != 0 )
-      ? (__last - __first)
-      : count(__first, __last, '\n') + (__last - __first);
-#endif
-  }
-
-  // Returns true if we're in binary mode or if we're using an OS or file 
-  // system where there is no distinction between text and binary mode.
-  bool _M_in_binary_mode() const {
-# if defined (_STLP_UNIX) || defined (_STLP_MAC)  || defined(__BEOS__) || defined (__amigaos__) 
-    return true;
-# elif defined (_STLP_WIN32) || defined (_STLP_WIN16) || defined (_STLP_DOS) || defined (_STLP_VM) || defined (__EMX__)
-    return (_M_openmode & ios_base::binary) != 0;
-# else 
-#   error "Port!"
-# endif
-  }
-
-protected:                      // Static data members.
-  static size_t _M_page_size;
-
-protected:                      // Data members.
-  _STLP_fd _M_file_id;
-# ifdef _STLP_USE_STDIO_IO
-  // for stdio, the whole FILE* is being kept here
-  FILE* _M_file;
-# endif
-# ifdef _STLP_USE_WIN32_IO
-  void* _M_view_id; 
-# endif
-
-  ios_base::openmode _M_openmode     ;
-  unsigned char      _M_is_open      ;
-  unsigned char      _M_should_close ;
-  unsigned char      _M_regular_file ;
-
-public :
-  static size_t  _STLP_CALL __page_size() { return _M_page_size; } 
-  int  __o_mode() const { return (int)_M_openmode; } 
-  bool __is_open()      const { return (_M_is_open !=0 ); } 
-  bool __should_close() const { return (_M_should_close != 0); } 
-  bool __regular_file() const { return (_M_regular_file != 0); }
-  _STLP_fd __get_fd() const { return _M_file_id; }
-};
-
-
-
-
-//----------------------------------------------------------------------
-// Class basic_filebuf<>.
-
-// Forward declaration of two helper classes.
-template <class _Traits> class _Noconv_input;
-_STLP_TEMPLATE_NULL
-class _Noconv_input<char_traits<char> >;
-
-template <class _Traits> class _Noconv_output;
-_STLP_TEMPLATE_NULL
-class _Noconv_output< char_traits<char> >;
-
-// There is a specialized version of underflow, for basic_filebuf<char>,
-// in fstream.cxx.
-
-template <class _CharT, class _Traits>
-class _Underflow;
-
- _STLP_TEMPLATE_NULL class _Underflow< char, char_traits<char> >;
-
-template <class _CharT, class _Traits>
-class basic_filebuf : public basic_streambuf<_CharT, _Traits>
-{
-public:                         // Types.
-  typedef _CharT                     char_type;
-  typedef typename _Traits::int_type int_type;
-  typedef typename _Traits::pos_type pos_type;
-  typedef typename _Traits::off_type off_type;
-  typedef _Traits                    traits_type;
-
-  typedef typename _Traits::state_type _State_type;
-  typedef basic_streambuf<_CharT, _Traits> _Base;
-  typedef basic_filebuf<_CharT, _Traits> _Self;
-
-public:                         // Constructors, destructor.
-  basic_filebuf();  
-  ~basic_filebuf();
-  
-public:                         // Opening and closing files.
-  bool is_open() const { return _M_base.__is_open(); }
-
-  _Self* open(const char* __s, ios_base::openmode __m) {
-    return _M_base._M_open(__s, __m) ? this : 0;
-  }
-
-# ifndef _STLP_NO_EXTENSIONS
-  // These two version of open() and file descriptor getter are extensions.
-  _Self* open(const char* __s, ios_base::openmode __m,
-		      long __protection) {
-    return _M_base._M_open(__s, __m, __protection) ? this : 0;
-  }
-  
-  _STLP_fd fd() const { return _M_base.__get_fd(); }
-
-  _Self* open(int __id, ios_base::openmode _Init_mode = ios_base::__default_mode) {
-    return this->_M_open(__id, _Init_mode);
-  }
-# endif
-
-  _Self* _M_open(int __id, ios_base::openmode _Init_mode = ios_base::__default_mode) {
-    return _M_base._M_open(__id, _Init_mode) ? this : 0;
-  }
-
-  _Self* close();
-
-protected:                      // Virtual functions from basic_streambuf.
-  virtual streamsize showmanyc();
-  virtual int_type underflow();
-
-  virtual int_type pbackfail(int_type = traits_type::eof());
-  virtual int_type overflow(int_type = traits_type::eof());
-
-  virtual basic_streambuf<_CharT, _Traits>* setbuf(char_type*, streamsize);
-  virtual pos_type seekoff(off_type, ios_base::seekdir,
-                           ios_base::openmode = ios_base::in | ios_base::out);
-  virtual pos_type seekpos(pos_type,
-                           ios_base::openmode = ios_base::in | ios_base::out);
-
-  virtual int sync();
-  virtual void imbue(const locale&);
-
-private:                        // Helper functions.
-
-  // Precondition: we are currently in putback input mode.  Effect:
-  // switches back to ordinary input mode.
-  void _M_exit_putback_mode() {
-    this->setg(_M_saved_eback, _M_saved_gptr, _M_saved_egptr);
-    _M_in_putback_mode = false;
-  }
-  bool _M_switch_to_input_mode();
-  void _M_exit_input_mode();
-  bool _M_switch_to_output_mode();
-
-  int_type _M_input_error();
-  int_type _M_underflow_aux();
-  //  friend class _Noconv_input<_Traits>;
-  //  friend class _Noconv_output<_Traits>;
-  friend class _Underflow<_CharT, _Traits>;
-
-  int_type _M_output_error();
-  bool _M_unshift();
-
-  bool _M_allocate_buffers(_CharT* __buf, streamsize __n);
-  bool _M_allocate_buffers();
-  void _M_deallocate_buffers();
-
-  pos_type _M_seek_return(off_type __off, _State_type __state) {
-    if (__off != -1) {
-      if (_M_in_input_mode)
-        _M_exit_input_mode();
-      _M_in_input_mode = false;
-      _M_in_output_mode = false;
-      _M_in_putback_mode = false;
-      _M_in_error_mode = false;
-      this->setg(0, 0, 0);
-      this->setp(0, 0);
-    }
-    
-    pos_type __result(__off);
-    __result.state(__state);
-    return __result;
-  }
-  
-  bool _M_seek_init(bool __do_unshift);
-
-  void _M_setup_codecvt(const locale&);
-
-private:                        // Data members used in all modes.
-
-  _Filebuf_base _M_base;
-
-private:                        // Locale-related information.
-
-  unsigned char _M_constant_width;
-  unsigned char _M_always_noconv;
-  
-  // private:                        // Mode flags.
-  unsigned char _M_int_buf_dynamic;  // True if internal buffer is heap allocated,
-  // false if it was supplied by the user.
-  unsigned char _M_in_input_mode;
-  unsigned char _M_in_output_mode;
-  unsigned char _M_in_error_mode;
-  unsigned char _M_in_putback_mode;
-  
-  // Internal buffer: characters seen by the filebuf's clients.
-  _CharT* _M_int_buf;
-  _CharT* _M_int_buf_EOS;
-  
-  // External buffer: characters corresponding to the external file.
-  char* _M_ext_buf;
-  char* _M_ext_buf_EOS;
-
-  // The range [_M_ext_buf, _M_ext_buf_converted) contains the external
-  // characters corresponding to the sequence in the internal buffer.  The
-  // range [_M_ext_buf_converted, _M_ext_buf_end) contains characters that
-  // have been read into the external buffer but have not been converted
-  // to an internal sequence.
-  char* _M_ext_buf_converted;
-  char* _M_ext_buf_end;
-
-  // State corresponding to beginning of internal buffer.
-  _State_type _M_state;
-
-private:                        // Data members used only in input mode.
-
-  // Similar to _M_state except that it corresponds to
-  // the end of the internal buffer instead of the beginning.
-  _State_type _M_end_state;
-
-  // This is a null pointer unless we are in mmap input mode.
-  void*     _M_mmap_base;
-  streamoff _M_mmap_len;
-
-private:                        // Data members used only in putback mode.
-  _CharT* _M_saved_eback;
-  _CharT* _M_saved_gptr;
-  _CharT* _M_saved_egptr;
-
-  typedef codecvt<_CharT, char, _State_type> _Codecvt;
-  const _Codecvt* _M_codecvt;
-
-  int _M_width;                 // Width of the encoding (if constant), else 1
-  int _M_max_width;             // Largest possible width of single character.
-
-
-  enum { _S_pback_buf_size = 8 };
-  _CharT _M_pback_buf[_S_pback_buf_size];
-
-  // for _Noconv_output
-public:
-  bool _M_write(char* __buf,  ptrdiff_t __n) {return _M_base._M_write(__buf, __n); }
-
-public:
-  int_type
-  _M_do_noconv_input() {
-    _M_ext_buf_converted = _M_ext_buf_end;
-    this->setg((char_type*)_M_ext_buf, (char_type*)_M_ext_buf, (char_type*)_M_ext_buf_end);
-    return traits_type::to_int_type(*_M_ext_buf);
-  }
-};
-
-# if defined (_STLP_USE_TEMPLATE_EXPORT)
-_STLP_EXPORT_TEMPLATE_CLASS basic_filebuf<char, char_traits<char> >;
-#  if ! defined (_STLP_NO_WCHAR_T)
-_STLP_EXPORT_TEMPLATE_CLASS basic_filebuf<wchar_t, char_traits<wchar_t> >;
-#  endif
-# endif /* _STLP_USE_TEMPLATE_EXPORT */
-
-// public:
-// helper class.
-template <class _CharT>
-struct _Filebuf_Tmp_Buf
-{
-  _CharT* _M_ptr;
-  _Filebuf_Tmp_Buf(ptrdiff_t __n) : _M_ptr(0) { _M_ptr = new _CharT[__n]; }
-  ~_Filebuf_Tmp_Buf() { delete[] _M_ptr; }
-};
-
-
-//
-// This class had to be designed very carefully to work
-// with Visual C++.
-//
-template <class _Traits>
-class _Noconv_output {
-public:
-  typedef typename _Traits::char_type char_type;
-  static bool  _STLP_CALL _M_doit(basic_filebuf<char_type, _Traits >*, 
-                                  char_type*, char_type*)
-  {
-      return false; 
-  }
-};
-
-_STLP_TEMPLATE_NULL
-class _STLP_CLASS_DECLSPEC _Noconv_output< char_traits<char> > {
-public:
-  static bool  _STLP_CALL
-  _M_doit(basic_filebuf<char, char_traits<char> >* __buf, 
-          char* __first, char* __last)
-  {
-    ptrdiff_t __n = __last - __first;
-    if (__buf->_M_write(__first, __n)) {
-      return true;
-    }
-    else
-      return false; 
-  }
-};
-
-//----------------------------------------------------------------------
-// basic_filebuf<> helper functions.
-
-
-//----------------------------------------
-// Helper functions for switching between modes.
-
-//
-// This class had to be designed very carefully to work
-// with Visual C++.
-//
-template <class _Traits>
-class _Noconv_input {
-public:
-  typedef typename _Traits::int_type int_type;
-  typedef typename _Traits::char_type char_type;
-
-  static inline int_type _STLP_CALL
-  _M_doit(basic_filebuf<char_type, _Traits>*) 
-  {
-    return 0;
-  }
-};
-
-_STLP_TEMPLATE_NULL
-class _Noconv_input<char_traits<char> > {
-public:
-  static inline int _STLP_CALL
-  _M_doit(basic_filebuf<char, char_traits<char> >* __buf)  {
-    return __buf->_M_do_noconv_input();
-  }
-};
-
-// underflow() may be called for one of two reasons.  (1) We've
-// been going through the special putback buffer, and we need to move back
-// to the regular internal buffer.  (2) We've exhausted the internal buffer,
-// and we need to replentish it.  
-template <class _CharT, class _Traits>
-class _Underflow {
-public:
-  typedef typename _Traits::int_type int_type;
-  typedef _Traits                    traits_type;
-  
-  static int_type _STLP_CALL _M_doit(basic_filebuf<_CharT, _Traits>* __this);
-};
-
-
-// Specialization of underflow: if the character type is char, maybe
-// we can use mmap instead of read.
-_STLP_TEMPLATE_NULL
-class _STLP_CLASS_DECLSPEC _Underflow< char, char_traits<char> > {
-public:
-  typedef char_traits<char>::int_type int_type;
-  typedef char_traits<char> traits_type;
-  static  int _STLP_CALL _M_doit(basic_filebuf<char, traits_type >* __this);
-};
-
-// There is a specialized version of underflow, for basic_filebuf<char>,
-// in fstream.cxx.
-
-template <class _CharT, class _Traits>
-_STLP_TYPENAME_ON_RETURN_TYPE _Underflow<_CharT, _Traits>::int_type // _STLP_CALL
- _Underflow<_CharT, _Traits>::_M_doit(basic_filebuf<_CharT, _Traits>* __this)
-{
-  if (!__this->_M_in_input_mode) {
-    if (!__this->_M_switch_to_input_mode())
-      return traits_type::eof();
-  }
-  
-  else if (__this->_M_in_putback_mode) {
-    __this->_M_exit_putback_mode();
-    if (__this->gptr() != __this->egptr()) {
-      int_type __c = traits_type::to_int_type(*__this->gptr());
-      return __c;
-    }
-  }
-  
-  return __this->_M_underflow_aux();
-}
-
-#if defined( _STLP_USE_TEMPLATE_EXPORT ) && ! defined (_STLP_NO_WCHAR_T)
-_STLP_EXPORT_TEMPLATE_CLASS _Underflow<wchar_t, char_traits<wchar_t> >;
-#endif
-
-
-//----------------------------------------------------------------------
-// Class basic_ifstream<>
-
-template <class _CharT, class _Traits>
-class basic_ifstream : public basic_istream<_CharT, _Traits>
-{
-public:                         // Types
-  typedef _CharT                     char_type;
-  typedef typename _Traits::int_type int_type;
-  typedef typename _Traits::pos_type pos_type;
-  typedef typename _Traits::off_type off_type;
-  typedef _Traits                    traits_type;
-
-  typedef basic_ios<_CharT, _Traits>                _Basic_ios;
-  typedef basic_istream<_CharT, _Traits>            _Base;
-  typedef basic_filebuf<_CharT, _Traits>            _Buf;
-
-public:                         // Constructors, destructor.
-
-  basic_ifstream() : 
-    basic_ios<_CharT, _Traits>(),  basic_istream<_CharT, _Traits>(0), _M_buf() {
-      this->init(&_M_buf);
-  }
-
-  explicit basic_ifstream(const char* __s, ios_base::openmode __mod = ios_base::in) : 
-    basic_ios<_CharT, _Traits>(),  basic_istream<_CharT, _Traits>(0),
-    _M_buf() {
-      this->init(&_M_buf);
-      if (!_M_buf.open(__s, __mod | ios_base::in))
-	this->setstate(ios_base::failbit);
-  }
-
-# ifndef _STLP_NO_EXTENSIONS
-  explicit basic_ifstream(int __id, ios_base::openmode __mod = ios_base::in) : 
-    basic_ios<_CharT, _Traits>(),  basic_istream<_CharT, _Traits>(0), _M_buf() {
-    this->init(&_M_buf);
-    if (!_M_buf.open(__id, __mod | ios_base::in))
-      this->setstate(ios_base::failbit);
-  }
-  basic_ifstream(const char* __s, ios_base::openmode __m,
-		 long __protection) : 
-    basic_ios<_CharT, _Traits>(),  basic_istream<_CharT, _Traits>(0), _M_buf() {
-    this->init(&_M_buf);
-    if (!_M_buf.open(__s, __m | ios_base::in, __protection))
-      this->setstate(ios_base::failbit);  
-  }
-  
-# endif
-
-  ~basic_ifstream() {}
-
-public:                         // File and buffer operations.
-  basic_filebuf<_CharT, _Traits>* rdbuf() const
-    { return __CONST_CAST(_Buf*,&_M_buf); }
-
-  bool is_open() {
-    return this->rdbuf()->is_open();
-  }
-
-  void open(const char* __s, ios_base::openmode __mod = ios_base::in) {
-    if (!this->rdbuf()->open(__s, __mod | ios_base::in))
-      this->setstate(ios_base::failbit);
-  }
-
-  void close() {
-    if (!this->rdbuf()->close())
-      this->setstate(ios_base::failbit);
-  }
-
-
-private:
-  basic_filebuf<_CharT, _Traits> _M_buf;
-};
-
-
-//----------------------------------------------------------------------
-// Class basic_ofstream<>
-
-template <class _CharT, class _Traits>
-class basic_ofstream : public basic_ostream<_CharT, _Traits>
-{
-public:                         // Types
-  typedef _CharT                     char_type;
-  typedef typename _Traits::int_type int_type;
-  typedef typename _Traits::pos_type pos_type;
-  typedef typename _Traits::off_type off_type;
-  typedef _Traits                    traits_type;
-
-  typedef basic_ios<_CharT, _Traits>                _Basic_ios;
-  typedef basic_ostream<_CharT, _Traits>            _Base;
-  typedef basic_filebuf<_CharT, _Traits>            _Buf;
-
-public:                         // Constructors, destructor.
-  basic_ofstream() : 
-    basic_ios<_CharT, _Traits>(), 
-    basic_ostream<_CharT, _Traits>(0), _M_buf() {
-      this->init(&_M_buf);
-  }
-  explicit basic_ofstream(const char* __s, ios_base::openmode __mod = ios_base::out) 
-    : basic_ios<_CharT, _Traits>(), basic_ostream<_CharT, _Traits>(0),
-      _M_buf() {
-	this->init(&_M_buf);
-	if (!_M_buf.open(__s, __mod | ios_base::out))
-	  this->setstate(ios_base::failbit);
-  }
-
-# ifndef _STLP_NO_EXTENSIONS
-  explicit basic_ofstream(int __id, ios_base::openmode __mod = ios_base::out) 
-    : basic_ios<_CharT, _Traits>(), basic_ostream<_CharT, _Traits>(0),
-    _M_buf() {
- 	this->init(&_M_buf);
- 	if (!_M_buf.open(__id, __mod | ios_base::out))
- 	  this->setstate(ios_base::failbit);
-  }
-  basic_ofstream(const char* __s, ios_base::openmode __m, long __protection) : 
-    basic_ios<_CharT, _Traits>(),  basic_ostream<_CharT, _Traits>(0), _M_buf() {
-    this->init(&_M_buf);
-    if (!_M_buf.open(__s, __m | ios_base::out, __protection))
-      this->setstate(ios_base::failbit);  
-  }
-# endif
-  
-  ~basic_ofstream() {}
-
-public:                         // File and buffer operations.
-  basic_filebuf<_CharT, _Traits>* rdbuf() const
-    { return __CONST_CAST(_Buf*,&_M_buf); } 
-
-  bool is_open() {
-    return this->rdbuf()->is_open();
-  }
-
-  void open(const char* __s, ios_base::openmode __mod= ios_base::out) {
-    if (!this->rdbuf()->open(__s, __mod | ios_base::out))
-      this->setstate(ios_base::failbit);
-  }
-
-  void close() {
-    if (!this->rdbuf()->close())
-      this->setstate(ios_base::failbit);
-  }
-
-private:
-  basic_filebuf<_CharT, _Traits> _M_buf;
-};
-
-
-//----------------------------------------------------------------------
-// Class basic_fstream<>
-
-template <class _CharT, class _Traits>
-class basic_fstream : public basic_iostream<_CharT, _Traits>
-{
-public:                         // Types
-  typedef _CharT                     char_type;
-  typedef typename _Traits::int_type int_type;
-  typedef typename _Traits::pos_type pos_type;
-  typedef typename _Traits::off_type off_type;
-  typedef _Traits                    traits_type;
-
-  typedef basic_ios<_CharT, _Traits>                _Basic_ios;
-  typedef basic_iostream<_CharT, _Traits>           _Base;
-  typedef basic_filebuf<_CharT, _Traits>            _Buf;
-
-public:                         // Constructors, destructor.
-  
-  basic_fstream()   
-    : basic_ios<_CharT, _Traits>(), basic_iostream<_CharT, _Traits>(0), _M_buf() {
-      this->init(&_M_buf);
-  }
-
-  explicit basic_fstream(const char* __s,
-                         ios_base::openmode __mod = ios_base::in | ios_base::out) :
-    basic_ios<_CharT, _Traits>(), basic_iostream<_CharT, _Traits>(0), _M_buf() {
-      this->init(&_M_buf);
-      if (!_M_buf.open(__s, __mod))
-	this->setstate(ios_base::failbit);
-  }
-
-# ifndef _STLP_NO_EXTENSIONS
-  explicit basic_fstream(int __id,
-                         ios_base::openmode __mod = ios_base::in | ios_base::out) :
-    basic_ios<_CharT, _Traits>(), basic_iostream<_CharT, _Traits>(0), _M_buf() {
-    this->init(&_M_buf);
-    if (!_M_buf.open(__id, __mod))
-      this->setstate(ios_base::failbit);
-  }
-  basic_fstream(const char* __s, ios_base::openmode __m, long __protection) : 
-    basic_ios<_CharT, _Traits>(),  basic_iostream<_CharT, _Traits>(0), _M_buf() {
-    this->init(&_M_buf);
-    if (!_M_buf.open(__s, __m, __protection))
-      this->setstate(ios_base::failbit);  
-  }
-# endif    
-  ~basic_fstream() {}
-
-public:                         // File and buffer operations.
-
-  basic_filebuf<_CharT, _Traits>* rdbuf() const
-    { return __CONST_CAST(_Buf*,&_M_buf); } 
-
-  bool is_open() {
-    return this->rdbuf()->is_open();
-  }
-
-  void open(const char* __s, 
-	    ios_base::openmode __mod = 
-	    ios_base::in | ios_base::out) {
-    if (!this->rdbuf()->open(__s, __mod))
-      this->setstate(ios_base::failbit);
-  }
-
-  void close() {
-    if (!this->rdbuf()->close())
-      this->setstate(ios_base::failbit);
-  }
-
-private:
-  basic_filebuf<_CharT, _Traits> _M_buf;
-};
-
-_STLP_END_NAMESPACE
-
-# if !defined (_STLP_LINK_TIME_INSTANTIATION)
-#  include <stl/_fstream.c>
-# endif
-
-_STLP_BEGIN_NAMESPACE
-
-# if defined (_STLP_USE_TEMPLATE_EXPORT)
-_STLP_EXPORT_TEMPLATE_CLASS basic_ifstream<char, char_traits<char> >;
-_STLP_EXPORT_TEMPLATE_CLASS basic_ofstream<char, char_traits<char> >;
-_STLP_EXPORT_TEMPLATE_CLASS basic_fstream<char, char_traits<char> >;
-#  if ! defined (_STLP_NO_WCHAR_T)
-_STLP_EXPORT_TEMPLATE_CLASS basic_ifstream<wchar_t, char_traits<wchar_t> >;
-_STLP_EXPORT_TEMPLATE_CLASS basic_ofstream<wchar_t, char_traits<wchar_t> >;
-_STLP_EXPORT_TEMPLATE_CLASS basic_fstream<wchar_t, char_traits<wchar_t> >;
-#  endif
-# endif /* _STLP_USE_TEMPLATE_EXPORT */
-
-_STLP_END_NAMESPACE
-
-#endif /* _STLP_FSTREAM */
-
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_function.h b/src/STLport/stl/_function.h
deleted file mode 100644
index b97e2f2..0000000
--- a/src/STLport/stl/_function.h
+++ /dev/null
@@ -1,371 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996-1998
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_FUNCTION_H
-#define _STLP_INTERNAL_FUNCTION_H
-
-#ifndef _STLP_INTERNAL_FUNCTION_BASE_H
-#include <stl/_function_base.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-# ifndef _STLP_NO_EXTENSIONS
-// identity_element (not part of the C++ standard).
-template <class _Tp> inline _Tp identity_element(plus<_Tp>) {  return _Tp(0); }
-template <class _Tp> inline _Tp identity_element(multiplies<_Tp>) { return _Tp(1); }
-# endif
-
-#  if defined (_STLP_BASE_TYPEDEF_BUG)
-// this workaround is needed for SunPro 4.0.1
-// suggested by "Martin Abernethy" <gma at paston.co.uk>:
-
-// We have to introduce the XXary_predicate_aux structures in order to
-// access the argument and return types of predicate functions supplied
-// as type parameters. SUN C++ 4.0.1 compiler gives errors for template type parameters
-// of the form 'name1::name2', where name1 is itself a type parameter.
-template <class _Pair>
-struct __pair_aux : private _Pair
-{
-	typedef typename _Pair::first_type first_type;
-	typedef typename _Pair::second_type second_type;
-};
-
-template <class _Operation>
-struct __unary_fun_aux : private _Operation
-{
-	typedef typename _Operation::argument_type argument_type;
-	typedef typename _Operation::result_type result_type;
-};
-
-template <class _Operation>
-struct __binary_fun_aux  : private _Operation
-{
-	typedef typename _Operation::first_argument_type first_argument_type;
-	typedef typename _Operation::second_argument_type second_argument_type;
-	typedef typename _Operation::result_type result_type;
-};
-
-#  define __UNARY_ARG(__Operation,__type)  __unary_fun_aux<__Operation>::__type
-#  define __BINARY_ARG(__Operation,__type)  __binary_fun_aux<__Operation>::__type
-#  define __PAIR_ARG(__Pair,__type)  __pair_aux<__Pair>::__type
-# else
-#  define __UNARY_ARG(__Operation,__type)  __Operation::__type
-#  define __BINARY_ARG(__Operation,__type) __Operation::__type
-#  define __PAIR_ARG(__Pair,__type) __Pair::__type
-# endif
-
-template <class _Predicate>
-class unary_negate : 
-    public unary_function<typename __UNARY_ARG(_Predicate,argument_type), bool> {
-protected:
-  _Predicate _M_pred;
-public:
-  explicit unary_negate(const _Predicate& __x) : _M_pred(__x) {}
-  bool operator()(const typename _Predicate::argument_type& __x) const {
-    return !_M_pred(__x);
-  }
-};
-
-template <class _Predicate>
-inline unary_negate<_Predicate> 
-not1(const _Predicate& __pred)
-{
-  return unary_negate<_Predicate>(__pred);
-}
-
-template <class _Predicate> 
-class binary_negate 
-    : public binary_function<typename __BINARY_ARG(_Predicate,first_argument_type),
-			     typename __BINARY_ARG(_Predicate,second_argument_type), 
-                             bool> {
-protected:
-  _Predicate _M_pred;
-public:
-  explicit binary_negate(const _Predicate& __x) : _M_pred(__x) {}
-  bool operator()(const typename _Predicate::first_argument_type& __x, 
-                  const typename _Predicate::second_argument_type& __y) const
-  {
-    return !_M_pred(__x, __y); 
-  }
-};
-
-template <class _Predicate>
-inline binary_negate<_Predicate> 
-not2(const _Predicate& __pred)
-{
-  return binary_negate<_Predicate>(__pred);
-}
-
-template <class _Operation> 
-class binder1st : 
-    public unary_function<typename __BINARY_ARG(_Operation,second_argument_type),
-                          typename __BINARY_ARG(_Operation,result_type) > {
-protected:
-  _Operation _M_op;
-  typename _Operation::first_argument_type _M_value;
-public:
-  binder1st(const _Operation& __x,
-            const typename _Operation::first_argument_type& __y)
-      : _M_op(__x), _M_value(__y) {}
-
-  typename _Operation::result_type
-  operator()(const typename _Operation::second_argument_type& __x) const {
-    return _M_op(_M_value, __x); 
-  }
-
-  typename _Operation::result_type
-  operator()(typename _Operation::second_argument_type& __x) const {
-    return _M_op(_M_value, __x); 
-  }
-};
-
-template <class _Operation, class _Tp>
-inline binder1st<_Operation> 
-bind1st(const _Operation& __fn, const _Tp& __x) 
-{
-  typedef typename _Operation::first_argument_type _Arg1_type;
-  return binder1st<_Operation>(__fn, _Arg1_type(__x));
-}
-
-template <class _Operation> 
-class binder2nd
-  : public unary_function<typename __BINARY_ARG(_Operation,first_argument_type),
-                          typename __BINARY_ARG(_Operation,result_type)> {
-protected:
-  _Operation _M_op;
-  typename _Operation::second_argument_type value;
-public:
-  binder2nd(const _Operation& __x,
-            const typename _Operation::second_argument_type& __y) 
-      : _M_op(__x), value(__y) {}
-
-  typename _Operation::result_type
-  operator()(const typename _Operation::first_argument_type& __x) const {
-    return _M_op(__x, value); 
-  }
-
-  typename _Operation::result_type
-  operator()(typename _Operation::first_argument_type& __x) const {
-    return _M_op(__x, value); 
-  }
-};
-
-template <class _Operation, class _Tp>
-inline binder2nd<_Operation> 
-bind2nd(const _Operation& __fn, const _Tp& __x) 
-{
-  typedef typename _Operation::second_argument_type _Arg2_type;
-  return binder2nd<_Operation>(__fn, _Arg2_type(__x));
-}
-
-# ifndef _STLP_NO_EXTENSIONS
-// unary_compose and binary_compose (extensions, not part of the standard).
-
-template <class _Operation1, class _Operation2>
-class unary_compose : 
-  public unary_function<typename __UNARY_ARG(_Operation2,argument_type),
-                        typename __UNARY_ARG(_Operation1,result_type)> {
-protected:
-  _Operation1 _M_fn1;
-  _Operation2 _M_fn2;
-public:
-  unary_compose(const _Operation1& __x, const _Operation2& __y) 
-    : _M_fn1(__x), _M_fn2(__y) {}
-
-  typename _Operation1::result_type
-  operator()(const typename _Operation2::argument_type& __x) const {
-    return _M_fn1(_M_fn2(__x));
-  }
-
-  typename _Operation1::result_type
-  operator()(typename _Operation2::argument_type& __x) const {
-    return _M_fn1(_M_fn2(__x));
-  }
-};
-
-template <class _Operation1, class _Operation2>
-inline unary_compose<_Operation1,_Operation2> 
-compose1(const _Operation1& __fn1, const _Operation2& __fn2)
-{
-  return unary_compose<_Operation1,_Operation2>(__fn1, __fn2);
-}
-
-template <class _Operation1, class _Operation2, class _Operation3>
-class binary_compose : 
-    public unary_function<typename __UNARY_ARG(_Operation2,argument_type),
-                          typename __BINARY_ARG(_Operation1,result_type)> {
-protected:
-  _Operation1 _M_fn1;
-  _Operation2 _M_fn2;
-  _Operation3 _M_fn3;
-public:
-  binary_compose(const _Operation1& __x, const _Operation2& __y, 
-                 const _Operation3& __z) 
-    : _M_fn1(__x), _M_fn2(__y), _M_fn3(__z) { }
-
-  typename _Operation1::result_type
-  operator()(const typename _Operation2::argument_type& __x) const {
-    return _M_fn1(_M_fn2(__x), _M_fn3(__x));
-  }
-
-  typename _Operation1::result_type
-  operator()(typename _Operation2::argument_type& __x) const {
-    return _M_fn1(_M_fn2(__x), _M_fn3(__x));
-  }
-};
-
-template <class _Operation1, class _Operation2, class _Operation3>
-inline binary_compose<_Operation1, _Operation2, _Operation3> 
-compose2(const _Operation1& __fn1, const _Operation2& __fn2, 
-         const _Operation3& __fn3)
-{
-  return binary_compose<_Operation1,_Operation2,_Operation3>
-    (__fn1, __fn2, __fn3);
-}
-
-# endif /* _STLP_NO_EXTENSIONS */
-
-# ifndef _STLP_NO_EXTENSIONS
-
-// identity is an extension: it is not part of the standard.
-template <class _Tp> struct identity : public _Identity<_Tp> {};
-// select1st and select2nd are extensions: they are not part of the standard.
-template <class _Pair> struct select1st : public _Select1st<_Pair> {};
-template <class _Pair> struct select2nd : public _Select2nd<_Pair> {};
-
-template <class _Arg1, class _Arg2> 
-struct project1st : public _Project1st<_Arg1, _Arg2> {};
-
-template <class _Arg1, class _Arg2>
-struct project2nd : public _Project2nd<_Arg1, _Arg2> {};
-
-
-// constant_void_fun, constant_unary_fun, and constant_binary_fun are
-// extensions: they are not part of the standard.  (The same, of course,
-// is true of the helper functions constant0, constant1, and constant2.)
-
-template <class _Result>
-struct _Constant_void_fun {
-  typedef _Result result_type;
-  result_type _M_val;
-
-  _Constant_void_fun(const result_type& __v) : _M_val(__v) {}
-  const result_type& operator()() const { return _M_val; }
-};  
-
-
-template <class _Result>
-struct constant_void_fun : public _Constant_void_fun<_Result> {
-  constant_void_fun(const _Result& __v) : _Constant_void_fun<_Result>(__v) {}
-};  
-
-template <class _Result, __DFL_TMPL_PARAM( _Argument , _Result) >
-struct constant_unary_fun : public _Constant_unary_fun<_Result, _Argument>
-{
-  constant_unary_fun(const _Result& __v)
-    : _Constant_unary_fun<_Result, _Argument>(__v) {}
-};
-
-template <class _Result, __DFL_TMPL_PARAM( _Arg1 , _Result), __DFL_TMPL_PARAM( _Arg2 , _Arg1) >
-struct constant_binary_fun
-  : public _Constant_binary_fun<_Result, _Arg1, _Arg2>
-{
-  constant_binary_fun(const _Result& __v)
-    : _Constant_binary_fun<_Result, _Arg1, _Arg2>(__v) {}
-};
-
-template <class _Result>
-inline constant_void_fun<_Result> constant0(const _Result& __val)
-{
-  return constant_void_fun<_Result>(__val);
-}
-
-template <class _Result>
-inline constant_unary_fun<_Result,_Result> constant1(const _Result& __val)
-{
-  return constant_unary_fun<_Result,_Result>(__val);
-}
-
-template <class _Result>
-inline constant_binary_fun<_Result,_Result,_Result> 
-constant2(const _Result& __val)
-{
-  return constant_binary_fun<_Result,_Result,_Result>(__val);
-}
-
-// subtractive_rng is an extension: it is not part of the standard.
-// Note: this code assumes that int is 32 bits.
-class subtractive_rng : public unary_function<_STLP_UINT32_T, _STLP_UINT32_T> {
-private:
-  _STLP_UINT32_T _M_table[55];
-  _STLP_UINT32_T _M_index1;
-  _STLP_UINT32_T _M_index2;
-public:
-  _STLP_UINT32_T operator()(_STLP_UINT32_T __limit) {
-    _M_index1 = (_M_index1 + 1) % 55;
-    _M_index2 = (_M_index2 + 1) % 55;
-    _M_table[_M_index1] = _M_table[_M_index1] - _M_table[_M_index2];
-    return _M_table[_M_index1] % __limit;
-  }
-
-  void _M_initialize(_STLP_UINT32_T __seed)
-  {
-    _STLP_UINT32_T __k = 1;
-    _M_table[54] = __seed;
-    _STLP_UINT32_T __i;
-    for (__i = 0; __i < 54; __i++) {
-        _STLP_UINT32_T __ii = (21 * (__i + 1) % 55) - 1;
-        _M_table[__ii] = __k;
-        __k = __seed - __k;
-        __seed = _M_table[__ii];
-    }
-    for (int __loop = 0; __loop < 4; __loop++) {
-        for (__i = 0; __i < 55; __i++)
-            _M_table[__i] = _M_table[__i] - _M_table[(1 + __i + 30) % 55];
-    }
-    _M_index1 = 0;
-    _M_index2 = 31;
-  }
-
-  subtractive_rng(unsigned int __seed) { _M_initialize(__seed); }
-  subtractive_rng() { _M_initialize(161803398ul); }
-};
-
-# endif /* _STLP_NO_EXTENSIONS */
-
-_STLP_END_NAMESPACE
-
-#include <stl/_function_adaptors.h>
-
-#endif /* _STLP_INTERNAL_FUNCTION_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_function_adaptors.h b/src/STLport/stl/_function_adaptors.h
deleted file mode 100644
index 4ea584b..0000000
--- a/src/STLport/stl/_function_adaptors.h
+++ /dev/null
@@ -1,802 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996-1998
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * Copyright (c) 2000
- * Pavel Kuznetsov
- *
- * Copyright (c) 2001
- * Meridian'93
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-// This file has noo macro protection as it is meant to be included several times
-// from other header.
-// Adaptor function objects: pointers to member functions.
-
-// There are a total of 16 = 2^4 function objects in this family.
-//  (1) Member functions taking no arguments vs member functions taking
-//       one argument.
-//  (2) Call through pointer vs call through reference.
-//  (3) Member function with void return type vs member function with
-//      non-void return type.
-//  (4) Const vs non-const member function.
-
-// Note that choice (3) is nothing more than a workaround: according
-//  to the draft, compilers should handle void and non-void the same way.
-//  This feature is not yet widely implemented, though.  You can only use
-//  member functions returning void if your compiler supports partial
-//  specialization.
-
-// All of this complexity is in the function objects themselves.  You can
-//  ignore it by using the helper function mem_fun and mem_fun_ref,
-//  which create whichever type of adaptor is appropriate.
-
-_STLP_BEGIN_NAMESPACE
-
-//This implementation will only be used if needed, that is to say when there is the return void bug
-//and when there is no partial template specialization
-#if defined(_STLP_DONT_RETURN_VOID) && defined (_STLP_NO_CLASS_PARTIAL_SPECIALIZATION) && defined(_STLP_MEMBER_TEMPLATE_CLASSES)
-
-template<class _Result, class _Tp>
-class _Mem_fun0_ptr : public unary_function<_Tp*, _Result> {
-protected:
-  typedef _Result (_Tp::*__fun_type) ();
-  explicit _Mem_fun0_ptr(__fun_type __f) : _M_f(__f) {}
-
-public:
-  _Result operator ()(_Tp* __p) const { return (__p->*_M_f)(); }
-
-private:
-  __fun_type _M_f;
-};
-
-template<class _Result, class _Tp, class _Arg>
-class _Mem_fun1_ptr : public binary_function<_Tp*,_Arg,_Result> {
-protected:
-  typedef _Result (_Tp::*__fun_type) (_Arg);
-  explicit _Mem_fun1_ptr(__fun_type __f) : _M_f(__f) {}
-
-public:
-  _Result operator ()(_Tp* __p, _Arg __x) const { return (__p->*_M_f)(__x); }
-
-private:
-  __fun_type _M_f;
-};
-
-template<class _Result, class _Tp>
-class _Const_mem_fun0_ptr : public unary_function<const _Tp*,_Result> {
-protected:
-  typedef _Result (_Tp::*__fun_type) () const;
-  explicit _Const_mem_fun0_ptr(__fun_type __f) : _M_f(__f) {}
-
-public:
-  _Result operator ()(const _Tp* __p) const { return (__p->*_M_f)(); }
-
-private:
-  __fun_type _M_f;
-};
-
-template<class _Result, class _Tp, class _Arg>
-class _Const_mem_fun1_ptr : public binary_function<const _Tp*,_Arg,_Result> {
-protected:
-  typedef _Result (_Tp::*__fun_type) (_Arg) const;
-  explicit _Const_mem_fun1_ptr(__fun_type __f) : _M_f(__f) {}
-
-public:
-  _Result operator ()(const _Tp* __p, _Arg __x) const {
-    return (__p->*_M_f)(__x); }
-
-private:
-  __fun_type _M_f;
-};
-
-template<class _Result, class _Tp>
-class _Mem_fun0_ref : public unary_function<_Tp&,_Result> {
-protected:
-  typedef _Result (_Tp::*__fun_type) ();
-  explicit _Mem_fun0_ref(__fun_type __f) : _M_f(__f) {}
-
-public:
-  _Result operator ()(_Tp& __p) const { return (__p.*_M_f)(); }
-
-private:
-  __fun_type _M_f;
-};
-
-template<class _Result, class _Tp, class _Arg>
-class _Mem_fun1_ref : public binary_function<_Tp&,_Arg,_Result> {
-protected:
-  typedef _Result (_Tp::*__fun_type) (_Arg);
-  explicit _Mem_fun1_ref(__fun_type __f) : _M_f(__f) {}
-
-public:
-  _Result operator ()(_Tp& __p, _Arg __x) const { return (__p.*_M_f)(__x); }
-
-private:
-  __fun_type _M_f;
-};
-
-template<class _Result, class _Tp>
-class _Const_mem_fun0_ref : public unary_function<const _Tp&,_Result> {
-protected:
-  typedef _Result (_Tp::*__fun_type) () const;
-  explicit _Const_mem_fun0_ref(__fun_type __f) : _M_f(__f) {}
-
-public:
-  _Result operator ()(const _Tp& __p) const { return (__p.*_M_f)(); }
-
-private:
-  __fun_type _M_f;
-};
-
-template<class _Result, class _Tp, class _Arg>
-class _Const_mem_fun1_ref : public binary_function<const _Tp&,_Arg,_Result> {
-protected:
-  typedef _Result (_Tp::*__fun_type) (_Arg) const;
-  explicit _Const_mem_fun1_ref(__fun_type __f) : _M_f(__f) {}
-
-public:
-  _Result operator ()(const _Tp& __p, _Arg __x) const { return (__p.*_M_f)(__x); }
-
-private:
-  __fun_type _M_f;
-};
-
-template<class _Result> 
-struct _Mem_fun_traits {
-  template<class _Tp> 
-  struct _Args0 {
-    typedef _Mem_fun0_ptr<_Result,_Tp>            _Ptr;
-    typedef _Const_mem_fun0_ptr<_Result,_Tp>      _Ptr_const;
-    typedef _Mem_fun0_ref<_Result,_Tp>            _Ref;
-    typedef _Const_mem_fun0_ref<_Result,_Tp>      _Ref_const;
-  };
-
-  template<class _Tp, class _Arg>
-  struct _Args1 {
-    typedef _Mem_fun1_ptr<_Result,_Tp,_Arg>       _Ptr;
-    typedef _Const_mem_fun1_ptr<_Result,_Tp,_Arg> _Ptr_const;
-    typedef _Mem_fun1_ref<_Result,_Tp,_Arg>       _Ref;
-    typedef _Const_mem_fun1_ref<_Result,_Tp,_Arg> _Ref_const;
-  };
-};
-
-template<class _Arg, class _Result>
-class _Ptr_fun1_base : public unary_function<_Arg, _Result> {
-protected:
-  typedef _Result (*__fun_type) (_Arg);
-  explicit _Ptr_fun1_base(__fun_type __f) : _M_f(__f) {}
-
-public:
-  _Result operator()(_Arg __x) const { return _M_f(__x); }
-
-private:
-  __fun_type _M_f;
-};
-
-template <class _Arg1, class _Arg2, class _Result>
-class _Ptr_fun2_base : public binary_function<_Arg1,_Arg2,_Result> {
-protected:
-  typedef _Result (*__fun_type) (_Arg1, _Arg2);
-  explicit _Ptr_fun2_base(__fun_type __f) : _M_f(__f) {}
-
-public:
-  _Result operator()(_Arg1 __x, _Arg2 __y) const { return _M_f(__x, __y); }
-
-private:
-  __fun_type _M_f;
-};
-
-template<class _Result> 
-struct _Ptr_fun_traits {
-  template<class _Arg> struct _Args1 {
-    typedef _Ptr_fun1_base<_Arg,_Result> _Fun;
-  };
-
-  template<class _Arg1, class _Arg2> struct _Args2 {
-    typedef _Ptr_fun2_base<_Arg1,_Arg2,_Result> _Fun;
-  };
-};
-
-/*Specialization for void return type
-*/
-template<class _Tp>
-class _Void_mem_fun0_ptr : public unary_function<_Tp*,void> {
-protected:
-  typedef void (_Tp::*__fun_type) ();
-  explicit _Void_mem_fun0_ptr(__fun_type __f) : _M_f(__f) {}
-
-public:
-  void operator ()(_Tp* __p) const { (__p->*_M_f)(); }
-
-private:
-  __fun_type _M_f;
-};
-
-template<class _Tp, class _Arg>
-class _Void_mem_fun1_ptr : public binary_function<_Tp*,_Arg,void> {
-protected:
-  typedef void (_Tp::*__fun_type) (_Arg);
-  explicit _Void_mem_fun1_ptr(__fun_type __f) : _M_f(__f) {}
-
-public:
-  void operator ()(_Tp* __p, _Arg __x) const { (__p->*_M_f)(__x); }
-
-private:
-  __fun_type _M_f;
-};
-
-template<class _Tp>
-class _Void_const_mem_fun0_ptr : public unary_function<const _Tp*,void> {
-protected:
-  typedef void (_Tp::*__fun_type) () const;
-  explicit _Void_const_mem_fun0_ptr(__fun_type __f) : _M_f(__f) {}
-
-public:
-  void operator ()(const _Tp* __p) const { (__p->*_M_f)(); }
-
-private:
-  __fun_type _M_f;
-};
-
-template<class _Tp, class _Arg>
-class _Void_const_mem_fun1_ptr : public binary_function<const _Tp*,_Arg,void> {
-protected:
-  typedef void (_Tp::*__fun_type) (_Arg) const;
-  explicit _Void_const_mem_fun1_ptr(__fun_type __f) : _M_f(__f) {}
-
-public:
-  void operator ()(const _Tp* __p, _Arg __x) const { (__p->*_M_f)(__x); }
-
-private:
-  __fun_type _M_f;
-};
-
-template<class _Tp>
-class _Void_mem_fun0_ref : public unary_function<_Tp&,void> {
-protected:
-  typedef void (_Tp::*__fun_type) ();
-  explicit _Void_mem_fun0_ref(__fun_type __f) : _M_f(__f) {}
-
-public:
-  void operator ()(_Tp& __p) const { (__p.*_M_f)(); }
-
-private:
-  __fun_type _M_f;
-};
-
-template<class _Tp, class _Arg>
-class _Void_mem_fun1_ref : public binary_function<_Tp&,_Arg,void> {
-protected:
-  typedef void (_Tp::*__fun_type) (_Arg);
-  explicit _Void_mem_fun1_ref(__fun_type __f) : _M_f(__f) {}
-
-public:
-  void operator ()(_Tp& __p, _Arg __x) const { (__p.*_M_f)(__x); }
-
-private:
-  __fun_type _M_f;
-};
-
-template<class _Tp>
-class _Void_const_mem_fun0_ref : public unary_function<const _Tp&,void> {
-protected:
-  typedef void (_Tp::*__fun_type) () const;
-  explicit _Void_const_mem_fun0_ref(__fun_type __f) : _M_f(__f) {}
-
-public:
-  void operator ()(const _Tp& __p) const { (__p.*_M_f)(); }
-
-private:
-  __fun_type _M_f;
-};
-
-template<class _Tp, class _Arg>
-class _Void_const_mem_fun1_ref : public binary_function<const _Tp&,_Arg,void> {
-protected:
-  typedef void (_Tp::*__fun_type) (_Arg) const;
-  explicit _Void_const_mem_fun1_ref(__fun_type __f) : _M_f(__f) {}
-
-public:
-  void operator ()(const _Tp& __p, _Arg __x) const { (__p.*_M_f)(__x); }
-
-private:
-  __fun_type _M_f;
-};
-
-_STLP_TEMPLATE_NULL
-struct _Mem_fun_traits<void> {
-  template<class _Tp> struct _Args0 {
-    typedef _Void_mem_fun0_ptr<_Tp>             _Ptr;
-    typedef _Void_const_mem_fun0_ptr<_Tp>       _Ptr_const;
-    typedef _Void_mem_fun0_ref<_Tp>             _Ref;
-    typedef _Void_const_mem_fun0_ref<_Tp>       _Ref_const;
-  };
-
-  template<class _Tp, class _Arg> struct _Args1 {
-    typedef _Void_mem_fun1_ptr<_Tp,_Arg>        _Ptr;
-    typedef _Void_const_mem_fun1_ptr<_Tp,_Arg>  _Ptr_const;
-    typedef _Void_mem_fun1_ref<_Tp,_Arg>        _Ref;
-    typedef _Void_const_mem_fun1_ref<_Tp,_Arg>  _Ref_const;
-  };
-};
-
-template<class _Arg>
-class _Ptr_void_fun1_base : public unary_function<_Arg, void> {
-protected:
-  typedef void (*__fun_type) (_Arg);
-  explicit _Ptr_void_fun1_base(__fun_type __f) : _M_f(__f) {}
-
-public:
-  void operator()(_Arg __x) const { _M_f(__x); }
-
-private:
-  __fun_type _M_f;
-};
-
-template <class _Arg1, class _Arg2>
-class _Ptr_void_fun2_base : public binary_function<_Arg1,_Arg2,void> {
-protected:
-  typedef void (*__fun_type) (_Arg1, _Arg2);
-  explicit _Ptr_void_fun2_base(__fun_type __f) : _M_f(__f) {}
-
-public:
-  void operator()(_Arg1 __x, _Arg2 __y) const { _M_f(__x, __y); }
-
-private:
-  __fun_type _M_f;
-};
-
-_STLP_TEMPLATE_NULL
-struct _Ptr_fun_traits<void> {
-  template<class _Arg> struct _Args1 {
-    typedef _Ptr_void_fun1_base<_Arg> _Fun;
-  };
-  
-  template<class _Arg1, class _Arg2> struct _Args2 {
-    typedef _Ptr_void_fun2_base<_Arg1,_Arg2> _Fun;
-  };
-};
-
-// pavel: need extra level of inheritance here since MSVC++ does not
-// accept traits-based fake partial specialization for template
-// arguments other than first
-
-template<class _Result, class _Arg>
-class _Ptr_fun1 : 
-  public _Ptr_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Arg>::_Fun {
-protected:
-  typedef typename _Ptr_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Arg>::_Fun _Base;
-  explicit _Ptr_fun1(typename _Base::__fun_type __f) : _Base(__f) {}
-};
-
-template<class _Result, class _Arg1, class _Arg2>
-class _Ptr_fun2 : 
-  public _Ptr_fun_traits<_Result>::_STLP_TEMPLATE _Args2<_Arg1,_Arg2>::_Fun {
-protected:
-  typedef typename _Ptr_fun_traits<_Result>::_STLP_TEMPLATE _Args2<_Arg1,_Arg2>::_Fun _Base;
-  explicit _Ptr_fun2(typename _Base::__fun_type __f) : _Base(__f) {}
-};
-
-
-#endif /*_STLP_DONT_RETURN_VOID && _STLP_NO_CLASS_PARTIAL_SPECIALIZATION && _STLP_MEMBER_TEMPLATE_CLASSES*/
-
-
-#if !defined(_STLP_DONT_RETURN_VOID) || !defined(_STLP_NO_CLASS_PARTIAL_SPECIALIZATION) || !defined (_STLP_MEMBER_TEMPLATE_CLASSES)
-
-template <class _Ret, class _Tp>
-class mem_fun_t : public unary_function<_Tp*,_Ret> {
-  typedef _Ret (_Tp::*__fun_type)(void);
-public:
-  explicit mem_fun_t(__fun_type __pf) : _M_f(__pf) {}
-  _Ret operator()(_Tp* __p) const { return (__p->*_M_f)(); }
-private:
-  __fun_type _M_f;
-};
-
-template <class _Ret, class _Tp>
-class const_mem_fun_t : public unary_function<const _Tp*,_Ret> {
-  typedef _Ret (_Tp::*__fun_type)(void) const;
-public:
-  explicit const_mem_fun_t(__fun_type __pf) : _M_f(__pf) {}
-  _Ret operator()(const _Tp* __p) const { return (__p->*_M_f)(); }
-private:
-  __fun_type _M_f;
-};
-
-
-template <class _Ret, class _Tp>
-class mem_fun_ref_t : public unary_function<_Tp,_Ret> {
-  typedef _Ret (_Tp::*__fun_type)(void);
-public:
-  explicit mem_fun_ref_t(__fun_type __pf) : _M_f(__pf) {}
-  _Ret operator()(_Tp& __r) const { return (__r.*_M_f)(); }
-private:
-  __fun_type _M_f;
-};
-
-template <class _Ret, class _Tp>
-class const_mem_fun_ref_t : public unary_function<_Tp,_Ret> {
-  typedef _Ret (_Tp::*__fun_type)(void) const;
-public:
-  explicit const_mem_fun_ref_t(__fun_type __pf) : _M_f(__pf) {}
-  _Ret operator()(const _Tp& __r) const { return (__r.*_M_f)(); }
-private:
-  __fun_type _M_f;
-};
-
-template <class _Ret, class _Tp, class _Arg>
-class mem_fun1_t : public binary_function<_Tp*,_Arg,_Ret> {
-  typedef _Ret (_Tp::*__fun_type)(_Arg);
-public:
-  explicit mem_fun1_t(__fun_type __pf) : _M_f(__pf) {}
-  _Ret operator()(_Tp* __p, _Arg __x) const { return (__p->*_M_f)(__x); }
-private:
-  __fun_type _M_f;
-};
-
-template <class _Ret, class _Tp, class _Arg>
-class const_mem_fun1_t : public binary_function<const _Tp*,_Arg,_Ret> {
-  typedef _Ret (_Tp::*__fun_type)(_Arg) const;
-public:
-  explicit const_mem_fun1_t(__fun_type __pf) : _M_f(__pf) {}
-  _Ret operator()(const _Tp* __p, _Arg __x) const
-    { return (__p->*_M_f)(__x); }
-private:
-  __fun_type _M_f;
-};
-
-template <class _Ret, class _Tp, class _Arg>
-class mem_fun1_ref_t : public binary_function<_Tp,_Arg,_Ret> {
-  typedef _Ret (_Tp::*__fun_type)(_Arg);
-public:
-  explicit mem_fun1_ref_t(__fun_type __pf) : _M_f(__pf) {}
-  _Ret operator()(_Tp& __r, _Arg __x) const { return (__r.*_M_f)(__x); }
-private:
-  __fun_type _M_f;
-};
-
-template <class _Ret, class _Tp, class _Arg>
-class const_mem_fun1_ref_t : public binary_function<_Tp,_Arg,_Ret> {
-  typedef _Ret (_Tp::*__fun_type)(_Arg) const;
-public:
-  explicit const_mem_fun1_ref_t(__fun_type __pf) : _M_f(__pf) {}
-  _Ret operator()(const _Tp& __r, _Arg __x) const { return (__r.*_M_f)(__x); }
-private:
-  __fun_type _M_f;
-};
-
-template <class _Arg, class _Result>
-class pointer_to_unary_function : public unary_function<_Arg, _Result> {
-protected:
-  _Result (*_M_ptr)(_Arg);
-public:
-  pointer_to_unary_function() {}
-  explicit pointer_to_unary_function(_Result (*__x)(_Arg)) : _M_ptr(__x) {}
-  _Result operator()(_Arg __x) const { return _M_ptr(__x); }
-};
-
-template <class _Arg1, class _Arg2, class _Result>
-class pointer_to_binary_function : 
-  public binary_function<_Arg1,_Arg2,_Result> {
-protected:
-    _Result (*_M_ptr)(_Arg1, _Arg2);
-public:
-    pointer_to_binary_function() {}
-    explicit pointer_to_binary_function(_Result (*__x)(_Arg1, _Arg2)) 
-      : _M_ptr(__x) {}
-    _Result operator()(_Arg1 __x, _Arg2 __y) const {
-      return _M_ptr(__x, __y);
-    }
-};
-
-
-#if defined(_STLP_DONT_RETURN_VOID) && !defined(_STLP_NO_CLASS_PARTIAL_SPECIALIZATION)
-//Partial specialization for the void type
-template <class _Tp>
-class mem_fun_t<void, _Tp> : public unary_function<_Tp*,void> {
-  typedef void (_Tp::*__fun_type)(void);
-public:
-  explicit mem_fun_t _STLP_PSPEC2(void,_Tp) (__fun_type __pf) : _M_f(__pf) {}
-  void operator()(_Tp* __p) const { (__p->*_M_f)(); }
-private:
-  __fun_type _M_f;
-};
-
-template <class _Tp>
-class const_mem_fun_t<void, _Tp> : public unary_function<const _Tp*,void> {
-  typedef void (_Tp::*__fun_type)(void) const;
-public:
-  explicit const_mem_fun_t _STLP_PSPEC2(void,_Tp) (__fun_type __pf) : _M_f(__pf) {}
-  void operator()(const _Tp* __p) const { (__p->*_M_f)(); }
-private:
-  __fun_type _M_f;
-};
-
-template <class _Tp>
-class mem_fun_ref_t<void, _Tp> : public unary_function<_Tp,void> {
-  typedef void (_Tp::*__fun_type)(void);
-public:
-  explicit mem_fun_ref_t _STLP_PSPEC2(void,_Tp) (__fun_type __pf) : _M_f(__pf) {}
-  void operator()(_Tp& __r) const { (__r.*_M_f)(); }
-private:
-  __fun_type _M_f;
-};
-
-template <class _Tp>
-class const_mem_fun_ref_t<void, _Tp> : public unary_function<_Tp,void> {
-  typedef void (_Tp::*__fun_type)(void) const;
-public:
-  explicit const_mem_fun_ref_t _STLP_PSPEC2(void,_Tp) (__fun_type __pf) : _M_f(__pf) {}
-  void operator()(const _Tp& __r) const { (__r.*_M_f)(); }
-private:
-  __fun_type _M_f;
-};
-
-template <class _Tp, class _Arg>
-class mem_fun1_t<void, _Tp, _Arg> : public binary_function<_Tp*,_Arg,void> {
-  typedef void (_Tp::*__fun_type)(_Arg);
-public:
-  explicit mem_fun1_t _STLP_PSPEC3(void,_Tp,_Arg) (__fun_type __pf) : _M_f(__pf) {}
-  void operator()(_Tp* __p, _Arg __x) const { (__p->*_M_f)(__x); }
-private:
-  __fun_type _M_f;
-};
-
-template <class _Tp, class _Arg>
-class const_mem_fun1_t<void, _Tp, _Arg> 
-  : public binary_function<const _Tp*,_Arg,void> {
-  typedef void (_Tp::*__fun_type)(_Arg) const;
-public:
-  explicit const_mem_fun1_t _STLP_PSPEC3(void,_Tp,_Arg) (__fun_type __pf) : _M_f(__pf) {}
-  void operator()(const _Tp* __p, _Arg __x) const { (__p->*_M_f)(__x); }
-private:
-  __fun_type _M_f;
-};
-
-template <class _Tp, class _Arg>
-class mem_fun1_ref_t<void, _Tp, _Arg>
-  : public binary_function<_Tp,_Arg,void> {
-  typedef void (_Tp::*__fun_type)(_Arg);
-public:
-  explicit mem_fun1_ref_t _STLP_PSPEC3(void,_Tp,_Arg) (__fun_type __pf) : _M_f(__pf) {}
-  void operator()(_Tp& __r, _Arg __x) const { (__r.*_M_f)(__x); }
-private:
-  __fun_type _M_f;
-};
-
-template <class _Tp, class _Arg>
-class const_mem_fun1_ref_t<void, _Tp, _Arg>
-  : public binary_function<_Tp,_Arg,void> {
-  typedef void (_Tp::*__fun_type)(_Arg) const;
-public:
-  explicit const_mem_fun1_ref_t _STLP_PSPEC3(void,_Tp,_Arg) (__fun_type __pf) : _M_f(__pf) {}
-  void operator()(const _Tp& __r, _Arg __x) const { (__r.*_M_f)(__x); }
-private:
-  __fun_type _M_f;
-};
-
-template <class _Arg>
-class pointer_to_unary_function : public unary_function<_Arg, void> {
-  typedef void (*__fun_type)(_Arg);
-  __fun_type _M_ptr;
-public:
-  pointer_to_unary_function() {}
-  explicit pointer_to_unary_function(__fun_type __x) : _M_ptr(__x) {}
-  void operator()(_Arg __x) const { _M_ptr(__x); }
-};
-
-template <class _Arg1, class _Arg2>
-class pointer_to_binary_function : public binary_function<_Arg1,_Arg2,void> {
-  typedef void (*__fun_type)(_Arg1, _Arg2);
-  __fun_type _M_ptr;
-public:
-  pointer_to_binary_function() {}
-  explicit pointer_to_binary_function(__fun_type __x) : _M_ptr(__x) {}
-  void operator()(_Arg1 __x, _Arg2 __y) const { _M_ptr(__x, __y); }
-};
-
-#endif /*_STLP_DONT_RETURN_VOID && !_STLP_NO_CLASS_PARTIAL_SPECIALIZATION*/
-
-#else /*!_STLP_DONT_RETURN_VOID || !_STLP_NO_CLASS_PARTIAL_SPECIALIZATION || !_STLP_MEMBER_TEMPLATE_CLASSES*/
-
-//mem_fun_t
-template <class _Result, class _Tp>
-class mem_fun_t : 
-  public _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args0<_Tp>::_Ptr {
-  typedef typename
-    _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args0<_Tp>::_Ptr _Base;
-public:
-  explicit mem_fun_t(typename _Base::__fun_type __f) : _Base(__f) {}
-};
-
-//const_mem_fun_t
-template <class _Result, class _Tp>
-class const_mem_fun_t : 
-  public _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args0<_Tp>::_Ptr_const {
-  typedef typename
-    _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args0<_Tp>::_Ptr_const _Base;
-public:
-  explicit const_mem_fun_t(typename _Base::__fun_type __f) : _Base(__f) {}
-};
-
-//mem_fun_ref_t
-template <class _Result, class _Tp>
-class mem_fun_ref_t :
-  public _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args0<_Tp>::_Ref {
-  typedef typename
-    _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args0<_Tp>::_Ref _Base;
-public:
-  explicit mem_fun_ref_t(typename _Base::__fun_type __f) : _Base(__f) {}
-};
-
-//const_mem_fun_ref_t
-template <class _Result, class _Tp>
-class const_mem_fun_ref_t :
-  public _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args0<_Tp>::_Ref_const {
-  typedef typename
-    _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args0<_Tp>::_Ref_const _Base;
-public:
-  explicit const_mem_fun_ref_t(typename _Base::__fun_type __f) : _Base(__f) {}
-};
-
-//mem_fun1_t
-template <class _Result, class _Tp, class _Arg>
-class mem_fun1_t :
-  public _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Tp,_Arg>::_Ptr {
-  typedef typename
-    _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Tp,_Arg>::_Ptr _Base;
-public:
-  explicit mem_fun1_t(typename _Base::__fun_type __f) : _Base(__f) {}
-};
-
-//const_mem_fun1_t
-template <class _Result, class _Tp, class _Arg>
-class const_mem_fun1_t :
-  public _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Tp,_Arg>::_Ptr_const {
-  typedef typename
-    _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Tp,_Arg>::_Ptr_const _Base;
-public:
-  explicit const_mem_fun1_t(typename _Base::__fun_type __f) : _Base(__f) {}
-};
-
-//mem_fun1_ref_t
-template <class _Result, class _Tp, class _Arg>
-class mem_fun1_ref_t :
-  public _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Tp,_Arg>::_Ref {
-  typedef typename
-    _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Tp,_Arg>::_Ref _Base;
-public:
-  explicit mem_fun1_ref_t(typename _Base::__fun_type __f) : _Base(__f) {}
-};
-
-//const_mem_fun1_t
-template <class _Result, class _Tp, class _Arg>
-class const_mem_fun1_ref_t :
-  public _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Tp,_Arg>::_Ref_const {
-  typedef typename
-    _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Tp,_Arg>::_Ref_const _Base;
-public:
-  explicit const_mem_fun1_ref_t(typename _Base::__fun_type __f) : _Base(__f) {}
-};
-
-
-template <class _Arg, class _Result>
-class pointer_to_unary_function :
-public _Ptr_fun1<_Result,_Arg> {
-  typedef typename 
-    _Ptr_fun1<_Result,_Arg>::__fun_type __fun_type;
-public:
-  explicit pointer_to_unary_function(__fun_type __f)
-    : _Ptr_fun1<_Result,_Arg>(__f) {}
-};
-
-template <class _Arg1, class _Arg2, class _Result>
-class pointer_to_binary_function :
-public _Ptr_fun2<_Result,_Arg1,_Arg2> {
-  typedef typename
-    _Ptr_fun2<_Result,_Arg1,_Arg2>::__fun_type __fun_type;
-public:
-  explicit pointer_to_binary_function(__fun_type __f)
-    : _Ptr_fun2<_Result,_Arg1,_Arg2>(__f) {}
-};
-
-#endif /*!_STLP_DONT_RETURN_VOID || !_STLP_NO_CLASS_PARTIAL_SPECIALIZATION || !_STLP_MEMBER_TEMPLATE_CLASSES*/
-
-
-# if !defined (_STLP_MEMBER_POINTER_PARAM_BUG)
-// Mem_fun adaptor helper functions.  There are only two:
-//  mem_fun and mem_fun_ref.  (mem_fun1 and mem_fun1_ref 
-//  are provided for backward compatibility, but they are no longer
-//  part of the C++ standard.)
-
-template <class _Result, class _Tp>
-inline mem_fun_t<_Result,_Tp> 
-mem_fun(_Result (_Tp::*__f)()) { return mem_fun_t<_Result,_Tp>(__f); }
-
-template <class _Result, class _Tp>
-inline const_mem_fun_t<_Result,_Tp> 
-mem_fun(_Result (_Tp::*__f)() const)  { return const_mem_fun_t<_Result,_Tp>(__f); }
-
-template <class _Result, class _Tp>
-inline mem_fun_ref_t<_Result,_Tp> 
-mem_fun_ref(_Result (_Tp::*__f)())  { return mem_fun_ref_t<_Result,_Tp>(__f); }
-
-template <class _Result, class _Tp>
-inline const_mem_fun_ref_t<_Result,_Tp> 
-mem_fun_ref(_Result (_Tp::*__f)() const)  { return const_mem_fun_ref_t<_Result,_Tp>(__f); }
-
-template <class _Result, class _Tp, class _Arg>
-inline mem_fun1_t<_Result,_Tp,_Arg> 
-mem_fun(_Result (_Tp::*__f)(_Arg)) { return mem_fun1_t<_Result,_Tp,_Arg>(__f); }
-
-template <class _Result, class _Tp, class _Arg>
-inline const_mem_fun1_t<_Result,_Tp,_Arg> 
-mem_fun(_Result (_Tp::*__f)(_Arg) const) { return const_mem_fun1_t<_Result,_Tp,_Arg>(__f); }
-
-template <class _Result, class _Tp, class _Arg>
-inline mem_fun1_ref_t<_Result,_Tp,_Arg> 
-mem_fun_ref(_Result (_Tp::*__f)(_Arg)) { return mem_fun1_ref_t<_Result,_Tp,_Arg>(__f); }
-
-template <class _Result, class _Tp, class _Arg>
-inline const_mem_fun1_ref_t<_Result,_Tp,_Arg>
-mem_fun_ref(_Result (_Tp::*__f)(_Arg) const) { return const_mem_fun1_ref_t<_Result,_Tp,_Arg>(__f); }
-
-# if !(defined (_STLP_NO_EXTENSIONS) || defined (_STLP_NO_ANACHRONISMS))
-//  mem_fun1 and mem_fun1_ref are no longer part of the C++ standard,
-//  but they are provided for backward compatibility.
-template <class _Result, class _Tp, class _Arg>
-inline mem_fun1_t<_Result,_Tp,_Arg> 
-mem_fun1(_Result (_Tp::*__f)(_Arg)) { return mem_fun1_t<_Result,_Tp,_Arg>(__f); }
-
-template <class _Result, class _Tp, class _Arg>
-inline const_mem_fun1_t<_Result,_Tp,_Arg> 
-mem_fun1(_Result (_Tp::*__f)(_Arg) const) { return const_mem_fun1_t<_Result,_Tp,_Arg>(__f); }
-
-template <class _Result, class _Tp, class _Arg>
-inline mem_fun1_ref_t<_Result,_Tp,_Arg> 
-mem_fun1_ref(_Result (_Tp::*__f)(_Arg)) { return mem_fun1_ref_t<_Result,_Tp,_Arg>(__f); }
-
-template <class _Result, class _Tp, class _Arg>
-inline const_mem_fun1_ref_t<_Result,_Tp,_Arg>
-mem_fun1_ref(_Result (_Tp::*__f)(_Arg) const) { return const_mem_fun1_ref_t<_Result,_Tp,_Arg>(__f); }
-
-# endif /* _STLP_NO_EXTENSIONS */
-
-# endif /* _STLP_MEMBER_POINTER_PARAM_BUG */
-
-template <class _Arg, class _Result>
-inline pointer_to_unary_function<_Arg, _Result>
-ptr_fun(_Result (*__f)(_Arg)) 
-{ return pointer_to_unary_function<_Arg, _Result>(__f); }
-
-template <class _Arg1, class _Arg2, class _Result>
-inline pointer_to_binary_function<_Arg1,_Arg2,_Result> 
-ptr_fun(_Result (*__f)(_Arg1, _Arg2)) 
-{ return pointer_to_binary_function<_Arg1,_Arg2,_Result>(__f); }
-
-_STLP_END_NAMESPACE
diff --git a/src/STLport/stl/_function_base.h b/src/STLport/stl/_function_base.h
deleted file mode 100644
index e310427..0000000
--- a/src/STLport/stl/_function_base.h
+++ /dev/null
@@ -1,226 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996-1998
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_FUNCTION_BASE_H
-#define _STLP_INTERNAL_FUNCTION_BASE_H
-
-#ifndef _STLP_CONFIG_H
-#include <stl/_config.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-template <class _Arg, class _Result>
-struct unary_function {
-  typedef _Arg argument_type;
-  typedef _Result result_type;
-};
-
-template <class _Arg1, class _Arg2, class _Result>
-struct binary_function {
-  typedef _Arg1 first_argument_type;
-  typedef _Arg2 second_argument_type;
-  typedef _Result result_type;
-};      
-
-template <class _Tp>
-struct equal_to : public binary_function<_Tp,_Tp,bool> 
-{
-  bool operator()(const _Tp& __x, const _Tp& __y) const { return __x == __y; }
-};
-
-template <class _Tp>
-struct not_equal_to : public binary_function<_Tp,_Tp,bool> 
-{
-  bool operator()(const _Tp& __x, const _Tp& __y) const { return __x != __y; }
-};
-
-template <class _Tp>
-struct greater : public binary_function<_Tp,_Tp,bool> 
-{
-  bool operator()(const _Tp& __x, const _Tp& __y) const { return __x > __y; }
-};
-
-template <class _Tp>
-struct less : public binary_function<_Tp,_Tp,bool> 
-{
-  bool operator()(const _Tp& __x, const _Tp& __y) const { return __x < __y; }
-};
-
-template <class _Tp>
-struct greater_equal : public binary_function<_Tp,_Tp,bool>
-{
-  bool operator()(const _Tp& __x, const _Tp& __y) const { return __x >= __y; }
-};
-
-template <class _Tp>
-struct less_equal : public binary_function<_Tp,_Tp,bool> 
-{
-  bool operator()(const _Tp& __x, const _Tp& __y) const { return __x <= __y; }
-};
-
-template <class _Tp>
-less<_Tp> __less(_Tp* ) { return less<_Tp>(); }
-
-template <class _Tp>
-equal_to<_Tp> __equal_to(_Tp* ) { return equal_to<_Tp>(); }
-
-template <class _Tp>
-struct plus : public binary_function<_Tp,_Tp,_Tp> {
-  _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x + __y; }
-};
-
-template <class _Tp>
-struct minus : public binary_function<_Tp,_Tp,_Tp> {
-  _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x - __y; }
-};
-
-template <class _Tp>
-plus<_Tp> __plus(_Tp* ) { return plus<_Tp>(); }
-
-template <class _Tp>
-minus<_Tp> __minus(_Tp* ) { return minus<_Tp>(); }
-
-template <class _Tp>
-struct multiplies : public binary_function<_Tp,_Tp,_Tp> {
-  _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x * __y; }
-};
-
-template <class _Tp>
-struct divides : public binary_function<_Tp,_Tp,_Tp> {
-  _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x / __y; }
-};
-
-template <class _Tp>
-struct modulus : public binary_function<_Tp,_Tp,_Tp> 
-{
-  _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x % __y; }
-};
-
-template <class _Tp>
-struct negate : public unary_function<_Tp,_Tp> 
-{
-  _Tp operator()(const _Tp& __x) const { return -__x; }
-};
-
-template <class _Tp>
-struct logical_and : public binary_function<_Tp,_Tp,bool>
-{
-  bool operator()(const _Tp& __x, const _Tp& __y) const { return __x && __y; }
-};
-
-template <class _Tp>
-struct logical_or : public binary_function<_Tp,_Tp,bool>
-{
-  bool operator()(const _Tp& __x, const _Tp& __y) const { return __x || __y; }
-};
-
-template <class _Tp>
-struct logical_not : public unary_function<_Tp,bool>
-{
-  bool operator()(const _Tp& __x) const { return !__x; }
-};
-
-template <class _Pair>
-struct _Select1st : public unary_function<_Pair, typename _Pair::first_type> {
-  const typename _Pair::first_type& operator()(const _Pair& __x) const {
-    return __x.first;
-  }
-};
-
-template <class _Pair>
-struct _Select2nd : public unary_function<_Pair, typename _Pair::second_type>
-{
-  const typename _Pair::second_type& operator()(const _Pair& __x) const {
-    return __x.second;
-  }
-};
-
-// project1st and project2nd are extensions: they are not part of the standard
-template <class _Arg1, class _Arg2>
-struct _Project1st : public binary_function<_Arg1, _Arg2, _Arg1> {
-  _Arg1 operator()(const _Arg1& __x, const _Arg2&) const { return __x; }
-};
-
-template <class _Arg1, class _Arg2>
-struct _Project2nd : public binary_function<_Arg1, _Arg2, _Arg2> {
-  _Arg2 operator()(const _Arg1&, const _Arg2& __y) const { return __y; }
-};
-
-#ifdef _STLP_MULTI_CONST_TEMPLATE_ARG_BUG
-// fbp : sort of select1st just for maps
-template <class _Pair, class _Whatever>		
-// JDJ (CW Pro1 doesn't like const when first_type is also const)
-struct __Select1st_hint : public unary_function<_Pair, _Whatever> {
-    const _Whatever& operator () (const _Pair& __x) const { return __x.first; }
-};
-# define  _STLP_SELECT1ST(__x,__y) __Select1st_hint< __x, __y >
-# else
-# define  _STLP_SELECT1ST(__x, __y) _Select1st< __x >
-# endif
-
-template <class _Tp>
-struct _Identity : public unary_function<_Tp,_Tp> {
-  const _Tp& operator()(const _Tp& __x) const { return __x; }
-};
-
-template <class _Result, class _Argument>
-struct _Constant_unary_fun {
-  typedef _Argument argument_type;
-  typedef  _Result  result_type;
-  result_type _M_val;
-
-  _Constant_unary_fun(const result_type& __v) : _M_val(__v) {}
-  const result_type& operator()(const _Argument&) const { return _M_val; }
-};
-
-template <class _Result, class _Arg1, class _Arg2>
-struct _Constant_binary_fun {
-  typedef  _Arg1   first_argument_type;
-  typedef  _Arg2   second_argument_type;
-  typedef  _Result result_type;
-  _Result _M_val;
-
-  _Constant_binary_fun(const _Result& __v) : _M_val(__v) {}
-  const result_type& operator()(const _Arg1&, const _Arg2&) const {
-    return _M_val;
-  }
-};
-
-// identity_element (not part of the C++ standard).
-template <class _Tp> inline _Tp __identity_element(plus<_Tp>) {  return _Tp(0); }
-template <class _Tp> inline _Tp __identity_element(multiplies<_Tp>) { return _Tp(1); }
-
-_STLP_END_NAMESPACE
-
-#endif /* _STLP_INTERNAL_FUNCTION_BASE_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_hash_fun.h b/src/STLport/stl/_hash_fun.h
deleted file mode 100644
index 414ea8b..0000000
--- a/src/STLport/stl/_hash_fun.h
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Copyright (c) 1996-1998
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_HASH_FUN_H
-#define _STLP_HASH_FUN_H
-
-# ifndef _STLP_CSTDDEF
-#  include <cstddef>
-# endif
-
-_STLP_BEGIN_NAMESPACE
-
-template <class _Key> struct hash { };
-
-inline size_t __stl_hash_string(const char* __s)
-{
-  _STLP_FIX_LITERAL_BUG(__s)
-  unsigned long __h = 0; 
-  for ( ; *__s; ++__s)
-    __h = 5*__h + *__s;
-  
-  return size_t(__h);
-}
-
-_STLP_TEMPLATE_NULL struct hash<char*>
-{
-  size_t operator()(const char* __s) const { _STLP_FIX_LITERAL_BUG(__s) return __stl_hash_string(__s); }
-};
-
-_STLP_TEMPLATE_NULL struct hash<const char*>
-{
-  size_t operator()(const char* __s) const { _STLP_FIX_LITERAL_BUG(__s) return __stl_hash_string(__s); }
-};
-
-_STLP_TEMPLATE_NULL struct hash<char> {
-  size_t operator()(char __x) const { return __x; }
-};
-_STLP_TEMPLATE_NULL struct hash<unsigned char> {
-  size_t operator()(unsigned char __x) const { return __x; }
-};
-#ifndef _STLP_NO_SIGNED_BUILTINS
-_STLP_TEMPLATE_NULL struct hash<signed char> {
-  size_t operator()(unsigned char __x) const { return __x; }
-};
-#endif
-_STLP_TEMPLATE_NULL struct hash<short> {
-  size_t operator()(short __x) const { return __x; }
-};
-_STLP_TEMPLATE_NULL struct hash<unsigned short> {
-  size_t operator()(unsigned short __x) const { return __x; }
-};
-_STLP_TEMPLATE_NULL struct hash<int> {
-  size_t operator()(int __x) const { return __x; }
-};
-_STLP_TEMPLATE_NULL struct hash<unsigned int> {
-  size_t operator()(unsigned int __x) const { return __x; }
-};
-_STLP_TEMPLATE_NULL struct hash<long> {
-  size_t operator()(long __x) const { return __x; }
-};
-_STLP_TEMPLATE_NULL struct hash<unsigned long> {
-  size_t operator()(unsigned long __x) const { return __x; }
-};
-
-# if defined (_STLP_LONG_LONG)
-_STLP_TEMPLATE_NULL struct hash<_STLP_LONG_LONG> {
-  size_t operator()(long x) const { return x; }
-};
-_STLP_TEMPLATE_NULL struct hash<unsigned _STLP_LONG_LONG> {
-  size_t operator()(unsigned long x) const { return x; }
-};
-# endif
-
-_STLP_END_NAMESPACE
-
-#endif /* _STLP_HASH_FUN_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_hash_map.h b/src/STLport/stl/_hash_map.h
deleted file mode 100644
index 6962264..0000000
--- a/src/STLport/stl/_hash_map.h
+++ /dev/null
@@ -1,468 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_HASH_MAP_H
-#define _STLP_INTERNAL_HASH_MAP_H
-
-#ifndef _STLP_INTERNAL_HASHTABLE_H
-# include <stl/_hashtable.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-# define  hash_map      __WORKAROUND_RENAME(hash_map)
-# define  hash_multimap __WORKAROUND_RENAME(hash_multimap)
-
-#  define _STLP_KEY_PAIR pair< const _Key, _Tp >
-#  define _STLP_HASHTABLE hashtable \
-      < pair < const _Key, _Tp >, _Key, _HashFcn, \
-      _STLP_SELECT1ST( _STLP_KEY_PAIR,  _Key ), _EqualKey, _Alloc >
-
-template <class _Key, class _Tp, __DFL_TMPL_PARAM(_HashFcn,hash<_Key>),
-          __DFL_TMPL_PARAM(_EqualKey,equal_to<_Key>),
-          _STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(const _Key, _Tp) >
-class hash_map
-{
-private:
-  typedef _STLP_HASHTABLE _Ht;
-  typedef hash_map<_Key, _Tp, _HashFcn, _EqualKey, _Alloc> _Self;
-public:
-  typedef typename _Ht::key_type key_type;
-  typedef _Tp data_type;
-  typedef _Tp mapped_type;
-  typedef typename _Ht::value_type _value_type;
-  typedef typename _Ht::value_type value_type;
-  typedef typename _Ht::hasher hasher;
-  typedef typename _Ht::key_equal key_equal;
-  
-  typedef typename _Ht::size_type size_type;
-  typedef typename _Ht::difference_type difference_type;
-  typedef typename _Ht::pointer pointer;
-  typedef typename _Ht::const_pointer const_pointer;
-  typedef typename _Ht::reference reference;
-  typedef typename _Ht::const_reference const_reference;
-
-  typedef typename _Ht::iterator iterator;
-  typedef typename _Ht::const_iterator const_iterator;
-
-  typedef typename _Ht::allocator_type allocator_type;
-
-  hasher hash_funct() const { return _M_ht.hash_funct(); }
-  key_equal key_eq() const { return _M_ht.key_eq(); }
-  allocator_type get_allocator() const { return _M_ht.get_allocator(); }
-
-private:
-  _Ht _M_ht;
-public:
-  hash_map() : _M_ht(100, hasher(), key_equal(), allocator_type()) {}
-  explicit hash_map(size_type __n)
-    : _M_ht(__n, hasher(), key_equal(), allocator_type()) {}
-  hash_map(size_type __n, const hasher& __hf)
-    : _M_ht(__n, __hf, key_equal(), allocator_type()) {}
-  hash_map(size_type __n, const hasher& __hf, const key_equal& __eql,
-           const allocator_type& __a = allocator_type())
-    : _M_ht(__n, __hf, __eql, __a) {}
-
-#ifdef _STLP_MEMBER_TEMPLATES
-  template <class _InputIterator>
-  hash_map(_InputIterator __f, _InputIterator __l)
-    : _M_ht(100, hasher(), key_equal(), allocator_type())
-    { _M_ht.insert_unique(__f, __l); }
-  template <class _InputIterator>
-  hash_map(_InputIterator __f, _InputIterator __l, size_type __n)
-    : _M_ht(__n, hasher(), key_equal(), allocator_type())
-    { _M_ht.insert_unique(__f, __l); }
-  template <class _InputIterator>
-  hash_map(_InputIterator __f, _InputIterator __l, size_type __n,
-           const hasher& __hf)
-    : _M_ht(__n, __hf, key_equal(), allocator_type())
-    { _M_ht.insert_unique(__f, __l); }
-# ifdef _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS
-  template <class _InputIterator>
-  hash_map(_InputIterator __f, _InputIterator __l, size_type __n,
-           const hasher& __hf, const key_equal& __eql)
-    : _M_ht(__n, __hf, __eql, allocator_type())
-    { _M_ht.insert_unique(__f, __l); }
-# endif
-  template <class _InputIterator>
-  hash_map(_InputIterator __f, _InputIterator __l, size_type __n,
-           const hasher& __hf, const key_equal& __eql,
-           const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL)
-    : _M_ht(__n, __hf, __eql, __a)
-    { _M_ht.insert_unique(__f, __l); }
-
-#else
-  hash_map(const value_type* __f, const value_type* __l)
-    : _M_ht(100, hasher(), key_equal(), allocator_type())
-    { _M_ht.insert_unique(__f, __l); }
-  hash_map(const value_type* __f, const value_type* __l, size_type __n)
-    : _M_ht(__n, hasher(), key_equal(), allocator_type())
-    { _M_ht.insert_unique(__f, __l); }
-  hash_map(const value_type* __f, const value_type* __l, size_type __n,
-           const hasher& __hf)
-    : _M_ht(__n, __hf, key_equal(), allocator_type())
-    { _M_ht.insert_unique(__f, __l); }
-  hash_map(const value_type* __f, const value_type* __l, size_type __n,
-           const hasher& __hf, const key_equal& __eql,
-           const allocator_type& __a = allocator_type())
-    : _M_ht(__n, __hf, __eql, __a)
-    { _M_ht.insert_unique(__f, __l); }
-
-  hash_map(const_iterator __f, const_iterator __l)
-    : _M_ht(100, hasher(), key_equal(), allocator_type())
-    { _M_ht.insert_unique(__f, __l); }
-  hash_map(const_iterator __f, const_iterator __l, size_type __n)
-    : _M_ht(__n, hasher(), key_equal(), allocator_type())
-    { _M_ht.insert_unique(__f, __l); }
-  hash_map(const_iterator __f, const_iterator __l, size_type __n,
-           const hasher& __hf)
-    : _M_ht(__n, __hf, key_equal(), allocator_type())
-    { _M_ht.insert_unique(__f, __l); }
-  hash_map(const_iterator __f, const_iterator __l, size_type __n,
-           const hasher& __hf, const key_equal& __eql,
-           const allocator_type& __a = allocator_type())
-    : _M_ht(__n, __hf, __eql, __a)
-    { _M_ht.insert_unique(__f, __l); }
-#endif /*_STLP_MEMBER_TEMPLATES */
-
-public:
-  size_type size() const { return _M_ht.size(); }
-  size_type max_size() const { return _M_ht.max_size(); }
-  bool empty() const { return _M_ht.empty(); }
-  void swap(_Self& __hs) { _M_ht.swap(__hs._M_ht); }
-  iterator begin() { return _M_ht.begin(); }
-  iterator end() { return _M_ht.end(); }
-  const_iterator begin() const { return _M_ht.begin(); }
-  const_iterator end() const { return _M_ht.end(); }
-
-public:
-  pair<iterator,bool> insert(const value_type& __obj)
-    { return _M_ht.insert_unique(__obj); }
-#ifdef _STLP_MEMBER_TEMPLATES
-  template <class _InputIterator>
-  void insert(_InputIterator __f, _InputIterator __l)
-    { _M_ht.insert_unique(__f,__l); }
-#else
-  void insert(const value_type* __f, const value_type* __l) {
-    _M_ht.insert_unique(__f,__l);
-  }
-  void insert(const_iterator __f, const_iterator __l)
-    { _M_ht.insert_unique(__f, __l); }
-#endif /*_STLP_MEMBER_TEMPLATES */
-  pair<iterator,bool> insert_noresize(const value_type& __obj)
-    { return _M_ht.insert_unique_noresize(__obj); }    
-
-  iterator find(const key_type& __key) { return _M_ht.find(__key); }
-  const_iterator find(const key_type& __key) const { return _M_ht.find(__key); }
-
-  _Tp& operator[](const key_type& __key) {
-    iterator __it = _M_ht.find(__key);
-    return (__it == _M_ht.end() ? 
-	    _M_ht._M_insert(_value_type(__key, _Tp())).second : 
-	    (*__it).second );
-  }
-
-  size_type count(const key_type& __key) const { return _M_ht.count(__key); }
-  
-  pair<iterator, iterator> equal_range(const key_type& __key)
-    { return _M_ht.equal_range(__key); }
-  pair<const_iterator, const_iterator>
-  equal_range(const key_type& __key) const
-    { return _M_ht.equal_range(__key); }
-
-  size_type erase(const key_type& __key) {return _M_ht.erase(__key); }
-  void erase(iterator __it) { _M_ht.erase(__it); }
-  void erase(iterator __f, iterator __l) { _M_ht.erase(__f, __l); }
-  void clear() { _M_ht.clear(); }
-
-  void resize(size_type __hint) { _M_ht.resize(__hint); }
-  size_type bucket_count() const { return _M_ht.bucket_count(); }
-  size_type max_bucket_count() const { return _M_ht.max_bucket_count(); }
-  size_type elems_in_bucket(size_type __n) const
-    { return _M_ht.elems_in_bucket(__n); }
-  static bool _STLP_CALL _M_equal (const _Self& __x, const _Self& __y) {
-    return _Ht::_M_equal(__x._M_ht,__y._M_ht);
-  }
-};
-
-template <class _Key, class _Tp, __DFL_TMPL_PARAM(_HashFcn,hash<_Key>),
-          __DFL_TMPL_PARAM(_EqualKey,equal_to<_Key>),
-          _STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(const _Key, _Tp) >
-class hash_multimap
-{
-private:
-  typedef _STLP_HASHTABLE _Ht;
-  typedef hash_multimap<_Key, _Tp, _HashFcn, _EqualKey, _Alloc> _Self;
-public:
-  typedef typename _Ht::key_type key_type;
-  typedef _Tp data_type;
-  typedef _Tp mapped_type;
-  typedef typename _Ht::value_type _value_type;
-  typedef _value_type value_type;
-  typedef typename _Ht::hasher hasher;
-  typedef typename _Ht::key_equal key_equal;
-
-  typedef typename _Ht::size_type size_type;
-  typedef typename _Ht::difference_type difference_type;
-  typedef typename _Ht::pointer pointer;
-  typedef typename _Ht::const_pointer const_pointer;
-  typedef typename _Ht::reference reference;
-  typedef typename _Ht::const_reference const_reference;
-
-  typedef typename _Ht::iterator iterator;
-  typedef typename _Ht::const_iterator const_iterator;
-
-  typedef typename _Ht::allocator_type allocator_type;
-
-  hasher hash_funct() const { return _M_ht.hash_funct(); }
-  key_equal key_eq() const { return _M_ht.key_eq(); }
-  allocator_type get_allocator() const { return _M_ht.get_allocator(); }
-
-private:
-  _Ht _M_ht;
-public:
-  hash_multimap() : _M_ht(100, hasher(), key_equal(), allocator_type()) {}
-  explicit hash_multimap(size_type __n)
-    : _M_ht(__n, hasher(), key_equal(), allocator_type()) {}
-  hash_multimap(size_type __n, const hasher& __hf)
-    : _M_ht(__n, __hf, key_equal(), allocator_type()) {}
-  hash_multimap(size_type __n, const hasher& __hf, const key_equal& __eql,
-                const allocator_type& __a = allocator_type())
-    : _M_ht(__n, __hf, __eql, __a) {}
-
-#ifdef _STLP_MEMBER_TEMPLATES
-  template <class _InputIterator>
-  hash_multimap(_InputIterator __f, _InputIterator __l)
-    : _M_ht(100, hasher(), key_equal(), allocator_type())
-    { _M_ht.insert_equal(__f, __l); }
-  template <class _InputIterator>
-  hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n)
-    : _M_ht(__n, hasher(), key_equal(), allocator_type())
-    { _M_ht.insert_equal(__f, __l); }
-  template <class _InputIterator>
-  hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n,
-                const hasher& __hf)
-    : _M_ht(__n, __hf, key_equal(), allocator_type())
-    { _M_ht.insert_equal(__f, __l); }
-# ifdef _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS
-  template <class _InputIterator>
-  hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n,
-                const hasher& __hf, const key_equal& __eql)
-    : _M_ht(__n, __hf, __eql, allocator_type())
-    { _M_ht.insert_equal(__f, __l); }
-#  endif
-  template <class _InputIterator>
-  hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n,
-                const hasher& __hf, const key_equal& __eql,
-                const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL)
-    : _M_ht(__n, __hf, __eql, __a)
-    { _M_ht.insert_equal(__f, __l); }
-
-#else
-  hash_multimap(const value_type* __f, const value_type* __l)
-    : _M_ht(100, hasher(), key_equal(), allocator_type())
-    { _M_ht.insert_equal(__f, __l); }
-  hash_multimap(const value_type* __f, const value_type* __l, size_type __n)
-    : _M_ht(__n, hasher(), key_equal(), allocator_type())
-    { _M_ht.insert_equal(__f, __l); }
-  hash_multimap(const value_type* __f, const value_type* __l, size_type __n,
-                const hasher& __hf)
-    : _M_ht(__n, __hf, key_equal(), allocator_type())
-    { _M_ht.insert_equal(__f, __l); }
-  hash_multimap(const value_type* __f, const value_type* __l, size_type __n,
-                const hasher& __hf, const key_equal& __eql,
-                const allocator_type& __a = allocator_type())
-    : _M_ht(__n, __hf, __eql, __a)
-    { _M_ht.insert_equal(__f, __l); }
-
-  hash_multimap(const_iterator __f, const_iterator __l)
-    : _M_ht(100, hasher(), key_equal(), allocator_type())
-    { _M_ht.insert_equal(__f, __l); }
-  hash_multimap(const_iterator __f, const_iterator __l, size_type __n)
-    : _M_ht(__n, hasher(), key_equal(), allocator_type())
-    { _M_ht.insert_equal(__f, __l); }
-  hash_multimap(const_iterator __f, const_iterator __l, size_type __n,
-                const hasher& __hf)
-    : _M_ht(__n, __hf, key_equal(), allocator_type())
-    { _M_ht.insert_equal(__f, __l); }
-  hash_multimap(const_iterator __f, const_iterator __l, size_type __n,
-                const hasher& __hf, const key_equal& __eql,
-                const allocator_type& __a = allocator_type())
-    : _M_ht(__n, __hf, __eql, __a)
-    { _M_ht.insert_equal(__f, __l); }
-#endif /*_STLP_MEMBER_TEMPLATES */
-
-public:
-  size_type size() const { return _M_ht.size(); }
-  size_type max_size() const { return _M_ht.max_size(); }
-  bool empty() const { return _M_ht.empty(); }
-  void swap(_Self& __hs) { _M_ht.swap(__hs._M_ht); }
-
-  iterator begin() { return _M_ht.begin(); }
-  iterator end() { return _M_ht.end(); }
-  const_iterator begin() const { return _M_ht.begin(); }
-  const_iterator end() const { return _M_ht.end(); }
-
-public:
-  iterator insert(const value_type& __obj) 
-    { return _M_ht.insert_equal(__obj); }
-#ifdef _STLP_MEMBER_TEMPLATES
-  template <class _InputIterator>
-  void insert(_InputIterator __f, _InputIterator __l) 
-    { _M_ht.insert_equal(__f,__l); }
-#else
-  void insert(const value_type* __f, const value_type* __l) {
-    _M_ht.insert_equal(__f,__l);
-  }
-  void insert(const_iterator __f, const_iterator __l) 
-    { _M_ht.insert_equal(__f, __l); }
-#endif /*_STLP_MEMBER_TEMPLATES */
-  iterator insert_noresize(const value_type& __obj)
-    { return _M_ht.insert_equal_noresize(__obj); }    
-
-  iterator find(const key_type& __key) { return _M_ht.find(__key); }
-  const_iterator find(const key_type& __key) const 
-    { return _M_ht.find(__key); }
-
-  size_type count(const key_type& __key) const { return _M_ht.count(__key); }
-  
-  pair<iterator, iterator> equal_range(const key_type& __key)
-    { return _M_ht.equal_range(__key); }
-  pair<const_iterator, const_iterator>
-  equal_range(const key_type& __key) const
-    { return _M_ht.equal_range(__key); }
-
-  size_type erase(const key_type& __key) {return _M_ht.erase(__key); }
-  void erase(iterator __it) { _M_ht.erase(__it); }
-  void erase(iterator __f, iterator __l) { _M_ht.erase(__f, __l); }
-  void clear() { _M_ht.clear(); }
-
-public:
-  void resize(size_type __hint) { _M_ht.resize(__hint); }
-  size_type bucket_count() const { return _M_ht.bucket_count(); }
-  size_type max_bucket_count() const { return _M_ht.max_bucket_count(); }
-  size_type elems_in_bucket(size_type __n) const
-    { return _M_ht.elems_in_bucket(__n); }
-  static bool _STLP_CALL _M_equal (const _Self& __x, const _Self& __y) {
-    return _Ht::_M_equal(__x._M_ht,__y._M_ht);
-  }
-};
-
-#define _STLP_TEMPLATE_HEADER template <class _Key, class _Tp, class _HashFcn, class _EqlKey, class _Alloc>
-#define _STLP_TEMPLATE_CONTAINER hash_map<_Key,_Tp,_HashFcn,_EqlKey,_Alloc>
-
-#include <stl/_relops_hash_cont.h>
-
-#undef _STLP_TEMPLATE_CONTAINER
-#define _STLP_TEMPLATE_CONTAINER hash_multimap<_Key,_Tp,_HashFcn,_EqlKey,_Alloc>
-#include <stl/_relops_hash_cont.h>
-
-#undef _STLP_TEMPLATE_CONTAINER
-#undef _STLP_TEMPLATE_HEADER
-
-// Specialization of insert_iterator so that it will work for hash_map
-// and hash_multimap.
-
-#ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION
-
-template <class _Key, class _Tp, class _HashFn,  class _EqKey, class _Alloc>
-class insert_iterator<hash_map<_Key, _Tp, _HashFn, _EqKey, _Alloc> > {
-protected:
-  typedef hash_map<_Key, _Tp, _HashFn, _EqKey, _Alloc> _Container;
-  _Container* container;
-public:
-  typedef _Container          container_type;
-  typedef output_iterator_tag iterator_category;
-  typedef void                value_type;
-  typedef void                difference_type;
-  typedef void                pointer;
-  typedef void                reference;
-
-  insert_iterator(_Container& __x) : container(&__x) {}
-  insert_iterator(_Container& __x, typename _Container::iterator)
-    : container(&__x) {}
-  insert_iterator<_Container>&
-  operator=(const typename _Container::value_type& __val) { 
-    container->insert(__val);
-    return *this;
-  }
-  insert_iterator<_Container>& operator*() { return *this; }
-  insert_iterator<_Container>& operator++() { return *this; }
-  insert_iterator<_Container>& operator++(int) { return *this; }
-};
-
-template <class _Key, class _Tp, class _HashFn,  class _EqKey, class _Alloc>
-class insert_iterator<hash_multimap<_Key, _Tp, _HashFn, _EqKey, _Alloc> > {
-protected:
-  typedef hash_multimap<_Key, _Tp, _HashFn, _EqKey, _Alloc> _Container;
-  _Container* container;
-  typename _Container::iterator iter;
-public:
-  typedef _Container          container_type;
-  typedef output_iterator_tag iterator_category;
-  typedef void                value_type;
-  typedef void                difference_type;
-  typedef void                pointer;
-  typedef void                reference;
-
-  insert_iterator(_Container& __x) : container(&__x) {}
-  insert_iterator(_Container& __x, typename _Container::iterator)
-    : container(&__x) {}
-  insert_iterator<_Container>&
-  operator=(const typename _Container::value_type& __val) { 
-    container->insert(__val);
-    return *this;
-  }
-  insert_iterator<_Container>& operator*() { return *this; }
-  insert_iterator<_Container>& operator++() { return *this; }
-  insert_iterator<_Container>& operator++(int) { return *this; }
-};
-
-#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
-
-// do a cleanup
-# undef hash_map
-# undef hash_multimap
-
-# define __hash_map__ __FULL_NAME(hash_map)
-# define __hash_multimap__ __FULL_NAME(hash_multimap)
-
-
-_STLP_END_NAMESPACE
-
-# if defined (_STLP_USE_WRAPPER_FOR_ALLOC_PARAM) 
-#  include <stl/wrappers/_hash_map.h>
-# endif /*  WRAPPER */
-
-#endif /* _STLP_INTERNAL_HASH_MAP_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/stl/_hash_set.h b/src/STLport/stl/_hash_set.h
deleted file mode 100644
index eb5279b..0000000
--- a/src/STLport/stl/_hash_set.h
+++ /dev/null
@@ -1,470 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_HASH_SET_H
-#define _STLP_INTERNAL_HASH_SET_H
-
-#ifndef _STLP_INTERNAL_HASHTABLE_H
-# include <stl/_hashtable.h>
-#endif
-
-# define  hash_set      __WORKAROUND_RENAME(hash_set)
-# define  hash_multiset __WORKAROUND_RENAME(hash_multiset)
-
-_STLP_BEGIN_NAMESPACE
-
-template <class _Value, __DFL_TMPL_PARAM(_HashFcn,hash<_Value>),
-          __DFL_TMPL_PARAM(_EqualKey,equal_to<_Value>),
-          _STLP_DEFAULT_ALLOCATOR_SELECT(_Value) >
-class hash_set
-{
-private:
-  typedef hashtable<_Value, _Value, _HashFcn, _Identity<_Value>, 
-                    _EqualKey, _Alloc> _Ht;
-  typedef hash_set<_Value, _HashFcn, _EqualKey, _Alloc> _Self;
-  typedef typename _Ht::iterator _ht_iterator;
-public:
-  typedef typename _Ht::key_type key_type;
-  typedef typename _Ht::value_type value_type;
-  typedef typename _Ht::hasher hasher;
-  typedef typename _Ht::key_equal key_equal;
-
-  typedef typename _Ht::size_type size_type;
-  typedef typename _Ht::difference_type difference_type;
-  typedef typename _Ht::pointer         pointer;
-  typedef typename _Ht::const_pointer   const_pointer;
-  typedef typename _Ht::reference       reference;
-  typedef typename _Ht::const_reference const_reference;
-
-  // SunPro bug
-  typedef typename _Ht::const_iterator const_iterator;
-  typedef const_iterator iterator;
-
-  typedef typename _Ht::allocator_type allocator_type;
-
-  hasher hash_funct() const { return _M_ht.hash_funct(); }
-  key_equal key_eq() const { return _M_ht.key_eq(); }
-  allocator_type get_allocator() const { return _M_ht.get_allocator(); }
-
-private:
-  _Ht _M_ht;
-
-public:
-  hash_set()
-    : _M_ht(100, hasher(), key_equal(), allocator_type()) {}
-  explicit hash_set(size_type __n)
-    : _M_ht(__n, hasher(), key_equal(), allocator_type()) {}
-  hash_set(size_type __n, const hasher& __hf)
-    : _M_ht(__n, __hf, key_equal(), allocator_type()) {}
-  hash_set(size_type __n, const hasher& __hf, const key_equal& __eql,
-           const allocator_type& __a = allocator_type())
-    : _M_ht(__n, __hf, __eql, __a) {}
-
-#ifdef _STLP_MEMBER_TEMPLATES
-  template <class _InputIterator>
-  hash_set(_InputIterator __f, _InputIterator __l)
-    : _M_ht(100, hasher(), key_equal(), allocator_type())
-    { _M_ht.insert_unique(__f, __l); }
-  template <class _InputIterator>
-  hash_set(_InputIterator __f, _InputIterator __l, size_type __n)
-    : _M_ht(__n, hasher(), key_equal(), allocator_type())
-    { _M_ht.insert_unique(__f, __l); }
-  template <class _InputIterator>
-  hash_set(_InputIterator __f, _InputIterator __l, size_type __n,
-           const hasher& __hf)
-    : _M_ht(__n, __hf, key_equal(), allocator_type())
-    { _M_ht.insert_unique(__f, __l); }
-# ifdef _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS
-  template <class _InputIterator>
-  hash_set(_InputIterator __f, _InputIterator __l, size_type __n,
-           const hasher& __hf, const key_equal& __eql)
-    : _M_ht(__n, __hf, __eql, allocator_type())
-    { _M_ht.insert_unique(__f, __l); }
-#  endif
-  template <class _InputIterator>
-  hash_set(_InputIterator __f, _InputIterator __l, size_type __n,
-           const hasher& __hf, const key_equal& __eql,
-           const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL)
-    : _M_ht(__n, __hf, __eql, __a)
-    { _M_ht.insert_unique(__f, __l); }
-#else
-
-  hash_set(const value_type* __f, const value_type* __l)
-    : _M_ht(100, hasher(), key_equal(), allocator_type())
-    { _M_ht.insert_unique(__f, __l); }
-  hash_set(const value_type* __f, const value_type* __l, size_type __n)
-    : _M_ht(__n, hasher(), key_equal(), allocator_type())
-    { _M_ht.insert_unique(__f, __l); }
-  hash_set(const value_type* __f, const value_type* __l, size_type __n,
-           const hasher& __hf)
-    : _M_ht(__n, __hf, key_equal(), allocator_type())
-    { _M_ht.insert_unique(__f, __l); }
-  hash_set(const value_type* __f, const value_type* __l, size_type __n,
-           const hasher& __hf, const key_equal& __eql,
-           const allocator_type& __a = allocator_type())
-    : _M_ht(__n, __hf, __eql, __a)
-    { _M_ht.insert_unique(__f, __l); }
-
-  hash_set(const_iterator __f, const_iterator __l)
-    : _M_ht(100, hasher(), key_equal(), allocator_type())
-    { _M_ht.insert_unique(__f, __l); }
-  hash_set(const_iterator __f, const_iterator __l, size_type __n)
-    : _M_ht(__n, hasher(), key_equal(), allocator_type())
-    { _M_ht.insert_unique(__f, __l); }
-  hash_set(const_iterator __f, const_iterator __l, size_type __n,
-           const hasher& __hf)
-    : _M_ht(__n, __hf, key_equal(), allocator_type())
-    { _M_ht.insert_unique(__f, __l); }
-  hash_set(const_iterator __f, const_iterator __l, size_type __n,
-           const hasher& __hf, const key_equal& __eql,
-           const allocator_type& __a = allocator_type())
-    : _M_ht(__n, __hf, __eql, __a)
-    { _M_ht.insert_unique(__f, __l); }
-#endif /*_STLP_MEMBER_TEMPLATES */
-
-public:
-  size_type size() const { return _M_ht.size(); }
-  size_type max_size() const { return _M_ht.max_size(); }
-  bool empty() const { return _M_ht.empty(); }
-  void swap(_Self& __hs) { _M_ht.swap(__hs._M_ht); }
-
-  iterator begin() const { return _M_ht.begin(); }
-  iterator end() const { return _M_ht.end(); }
-
-public:
-  pair<iterator, bool> insert(const value_type& __obj)
-    {
-      pair<_ht_iterator, bool> __p = _M_ht.insert_unique(__obj);
-      return pair<iterator,bool>(__REINTERPRET_CAST(const iterator&, __p.first), __p.second);
-    }
-#ifdef _STLP_MEMBER_TEMPLATES
-  template <class _InputIterator>
-  void insert(_InputIterator __f, _InputIterator __l) 
-    { _M_ht.insert_unique(__f,__l); }
-#else
-  void insert(const value_type* __f, const value_type* __l) {
-    _M_ht.insert_unique(__f,__l);
-  }
-  void insert(const_iterator __f, const_iterator __l) 
-    {_M_ht.insert_unique(__f, __l); }
-
-#endif /*_STLP_MEMBER_TEMPLATES */
-  pair<iterator, bool> insert_noresize(const value_type& __obj)
-  {
-    pair<_ht_iterator, bool> __p = 
-      _M_ht.insert_unique_noresize(__obj);
-    return pair<iterator, bool>(__p.first, __p.second);
-  }
-
-# if defined(_STLP_MEMBER_TEMPLATES) && ! defined ( _STLP_NO_EXTENSIONS )
-  template <class _KT>
-  iterator find(const _KT& __key) const { return _M_ht.find(__key); }
-# else
-  iterator find(const key_type& __key) const { return _M_ht.find(__key); }
-# endif
-  size_type count(const key_type& __key) const { return _M_ht.count(__key); }
-  
-  pair<iterator, iterator> equal_range(const key_type& __key) const
-    { return _M_ht.equal_range(__key); }
-
-  size_type erase(const key_type& __key) {return _M_ht.erase(__key); }
-  void erase(iterator __it) { _M_ht.erase(__it); }
-  void erase(iterator __f, iterator __l) { _M_ht.erase(__f, __l); }
-  void clear() { _M_ht.clear(); }
-
-public:
-  void resize(size_type __hint) { _M_ht.resize(__hint); }
-  size_type bucket_count() const { return _M_ht.bucket_count(); }
-  size_type max_bucket_count() const { return _M_ht.max_bucket_count(); }
-  size_type elems_in_bucket(size_type __n) const
-    { return _M_ht.elems_in_bucket(__n); }
-
-  static bool _STLP_CALL _M_equal (const _Self& __x, const _Self& __y) {
-    return _Ht::_M_equal(__x._M_ht,__y._M_ht);
-  }
-
-};
-
-template <class _Value, __DFL_TMPL_PARAM(_HashFcn,hash<_Value>),
-          __DFL_TMPL_PARAM(_EqualKey,equal_to<_Value>),
-          _STLP_DEFAULT_ALLOCATOR_SELECT(_Value) >
-class hash_multiset
-{
-private:
-  typedef hashtable<_Value, _Value, _HashFcn, _Identity<_Value>, 
-                    _EqualKey, _Alloc> _Ht;
-  typedef hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc> _Self;
-
-public:
-  typedef typename _Ht::key_type key_type;
-  typedef typename _Ht::value_type value_type;
-  typedef typename _Ht::hasher hasher;
-  typedef typename _Ht::key_equal key_equal;
-
-  typedef typename _Ht::size_type size_type;
-  typedef typename _Ht::difference_type difference_type;
-  typedef typename _Ht::pointer       pointer;
-  typedef typename _Ht::const_pointer const_pointer;
-  typedef typename _Ht::reference reference;
-  typedef typename _Ht::const_reference const_reference;
-
-  typedef typename _Ht::const_iterator const_iterator;
-  // SunPro bug
-  typedef const_iterator iterator;
-
-  typedef typename _Ht::allocator_type allocator_type;
-
-  hasher hash_funct() const { return _M_ht.hash_funct(); }
-  key_equal key_eq() const { return _M_ht.key_eq(); }
-  allocator_type get_allocator() const { return _M_ht.get_allocator(); }
-
-private:
-  _Ht _M_ht;
-
-public:
-  hash_multiset()
-    : _M_ht(100, hasher(), key_equal(), allocator_type()) {}
-  explicit hash_multiset(size_type __n)
-    : _M_ht(__n, hasher(), key_equal(), allocator_type()) {}
-  hash_multiset(size_type __n, const hasher& __hf)
-    : _M_ht(__n, __hf, key_equal(), allocator_type()) {}
-  hash_multiset(size_type __n, const hasher& __hf, const key_equal& __eql)
-    : _M_ht(__n, __hf, __eql, allocator_type()) {}
-  hash_multiset(size_type __n, const hasher& __hf, const key_equal& __eql,
-                const allocator_type& __a)
-    : _M_ht(__n, __hf, __eql, __a) {}
-
-#ifdef _STLP_MEMBER_TEMPLATES
-  template <class _InputIterator>
-  hash_multiset(_InputIterator __f, _InputIterator __l)
-    : _M_ht(100, hasher(), key_equal(), allocator_type())
-    { _M_ht.insert_equal(__f, __l); }
-  template <class _InputIterator>
-  hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n)
-    : _M_ht(__n, hasher(), key_equal(), allocator_type())
-    { _M_ht.insert_equal(__f, __l); }
-  template <class _InputIterator>
-  hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n,
-                const hasher& __hf)
-    : _M_ht(__n, __hf, key_equal(), allocator_type())
-    { _M_ht.insert_equal(__f, __l); }
-
-# ifdef _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS
-  template <class _InputIterator>
-  hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n,
-                const hasher& __hf, const key_equal& __eql)
-    : _M_ht(__n, __hf, __eql, allocator_type())
-    { _M_ht.insert_equal(__f, __l); }
-# endif
-  template <class _InputIterator>
-  hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n,
-                const hasher& __hf, const key_equal& __eql,
-                const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL)
-    : _M_ht(__n, __hf, __eql, __a)
-    { _M_ht.insert_equal(__f, __l); }
-#else
-
-  hash_multiset(const value_type* __f, const value_type* __l)
-    : _M_ht(100, hasher(), key_equal(), allocator_type())
-    { _M_ht.insert_equal(__f, __l); }
-  hash_multiset(const value_type* __f, const value_type* __l, size_type __n)
-    : _M_ht(__n, hasher(), key_equal(), allocator_type())
-    { _M_ht.insert_equal(__f, __l); }
-  hash_multiset(const value_type* __f, const value_type* __l, size_type __n,
-                const hasher& __hf)
-    : _M_ht(__n, __hf, key_equal(), allocator_type())
-    { _M_ht.insert_equal(__f, __l); }
-  hash_multiset(const value_type* __f, const value_type* __l, size_type __n,
-                const hasher& __hf, const key_equal& __eql,
-                const allocator_type& __a = allocator_type())
-    : _M_ht(__n, __hf, __eql, __a)
-    { _M_ht.insert_equal(__f, __l); }
-
-  hash_multiset(const_iterator __f, const_iterator __l)
-    : _M_ht(100, hasher(), key_equal(), allocator_type())
-    { _M_ht.insert_equal(__f, __l); }
-  hash_multiset(const_iterator __f, const_iterator __l, size_type __n)
-    : _M_ht(__n, hasher(), key_equal(), allocator_type())
-    { _M_ht.insert_equal(__f, __l); }
-  hash_multiset(const_iterator __f, const_iterator __l, size_type __n,
-                const hasher& __hf)
-    : _M_ht(__n, __hf, key_equal(), allocator_type())
-    { _M_ht.insert_equal(__f, __l); }
-  hash_multiset(const_iterator __f, const_iterator __l, size_type __n,
-                const hasher& __hf, const key_equal& __eql,
-                const allocator_type& __a = allocator_type())
-    : _M_ht(__n, __hf, __eql, __a)
-    { _M_ht.insert_equal(__f, __l); }
-#endif /*_STLP_MEMBER_TEMPLATES */
-
-public:
-  size_type size() const { return _M_ht.size(); }
-  size_type max_size() const { return _M_ht.max_size(); }
-  bool empty() const { return _M_ht.empty(); }
-  void swap(_Self& hs) { _M_ht.swap(hs._M_ht); }
-
-  iterator begin() const { return _M_ht.begin(); }
-  iterator end() const { return _M_ht.end(); }
-
-public:
-  iterator insert(const value_type& __obj)
-    { return _M_ht.insert_equal(__obj); }
-#ifdef _STLP_MEMBER_TEMPLATES
-  template <class _InputIterator>
-  void insert(_InputIterator __f, _InputIterator __l) 
-    { _M_ht.insert_equal(__f,__l); }
-#else
-  void insert(const value_type* __f, const value_type* __l) {
-    _M_ht.insert_equal(__f,__l);
-  }
-  void insert(const_iterator __f, const_iterator __l) 
-    { _M_ht.insert_equal(__f, __l); }
-#endif /*_STLP_MEMBER_TEMPLATES */
-  iterator insert_noresize(const value_type& __obj)
-    { return _M_ht.insert_equal_noresize(__obj); }    
-
-# if defined(_STLP_MEMBER_TEMPLATES) && ! defined ( _STLP_NO_EXTENSIONS )
-  template <class _KT>
-  iterator find(const _KT& __key) const { return _M_ht.find(__key); }
-# else
-  iterator find(const key_type& __key) const { return _M_ht.find(__key); }
-# endif
-
-  size_type count(const key_type& __key) const { return _M_ht.count(__key); }
-  
-  pair<iterator, iterator> equal_range(const key_type& __key) const
-    { return _M_ht.equal_range(__key); }
-
-  size_type erase(const key_type& __key) {return _M_ht.erase(__key); }
-  void erase(iterator __it) { _M_ht.erase(__it); }
-  void erase(iterator __f, iterator __l) { _M_ht.erase(__f, __l); }
-  void clear() { _M_ht.clear(); }
-
-public:
-  void resize(size_type __hint) { _M_ht.resize(__hint); }
-  size_type bucket_count() const { return _M_ht.bucket_count(); }
-  size_type max_bucket_count() const { return _M_ht.max_bucket_count(); }
-  size_type elems_in_bucket(size_type __n) const
-    { return _M_ht.elems_in_bucket(__n); }
-  static bool _STLP_CALL _M_equal (const _Self& __x, const _Self& __y) {
-    return _Ht::_M_equal(__x._M_ht,__y._M_ht);
-  }
-};
-
-#define _STLP_TEMPLATE_HEADER template <class _Value, class _HashFcn, class _EqualKey, class _Alloc>
-#define _STLP_TEMPLATE_CONTAINER hash_set<_Value,_HashFcn,_EqualKey,_Alloc>
-
-#include <stl/_relops_hash_cont.h>
-
-#undef _STLP_TEMPLATE_CONTAINER
-#define _STLP_TEMPLATE_CONTAINER hash_multiset<_Value,_HashFcn,_EqualKey,_Alloc>
-#include <stl/_relops_hash_cont.h>
-
-#undef _STLP_TEMPLATE_CONTAINER
-#undef _STLP_TEMPLATE_HEADER
-
-// Specialization of insert_iterator so that it will work for hash_set
-// and hash_multiset.
-
-#ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION
-
-template <class _Value, class _HashFcn, class _EqualKey, class _Alloc>
-class insert_iterator<hash_set<_Value, _HashFcn, _EqualKey, _Alloc> > {
-protected:
-  typedef hash_set<_Value, _HashFcn, _EqualKey, _Alloc> _Container;
-  _Container* container;
-public:
-  typedef _Container          container_type;
-  typedef output_iterator_tag iterator_category;
-  typedef void                value_type;
-  typedef void                difference_type;
-  typedef void                pointer;
-  typedef void                reference;
-
-  insert_iterator(_Container& __x) : container(&__x) {}
-  insert_iterator(_Container& __x, typename _Container::iterator)
-    : container(&__x) {}
-  insert_iterator<_Container>&
-  operator=(const typename _Container::value_type& __val) { 
-    container->insert(__val);
-    return *this;
-  }
-  insert_iterator<_Container>& operator*() { return *this; }
-  insert_iterator<_Container>& operator++() { return *this; }
-  insert_iterator<_Container>& operator++(int) { return *this; }
-};
-
-template <class _Value, class _HashFcn, class _EqualKey, class _Alloc>
-class insert_iterator<hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc> > {
-protected:
-  typedef hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc> _Container;
-  _Container* container;
-  typename _Container::iterator iter;
-public:
-  typedef _Container          container_type;
-  typedef output_iterator_tag iterator_category;
-  typedef void                value_type;
-  typedef void                difference_type;
-  typedef void                pointer;
-  typedef void                reference;
-
-  insert_iterator(_Container& __x) : container(&__x) {}
-  insert_iterator(_Container& __x, typename _Container::iterator)
-    : container(&__x) {}
-  insert_iterator<_Container>&
-  operator=(const typename _Container::value_type& __val) { 
-    container->insert(__val);
-    return *this;
-  }
-  insert_iterator<_Container>& operator*() { return *this; }
-  insert_iterator<_Container>& operator++() { return *this; }
-  insert_iterator<_Container>& operator++(int) { return *this; }
-};
-
-#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
-_STLP_END_NAMESPACE
-
-// do a cleanup
-#  undef hash_set
-#  undef hash_multiset
-
-// provide a uniform way to access full funclionality 
-#  define __hash_set__       __FULL_NAME(hash_set)
-#  define __hash_multiset__  __FULL_NAME(hash_multiset)
-
-# if defined ( _STLP_USE_WRAPPER_FOR_ALLOC_PARAM )
-#  include <stl/wrappers/_hash_set.h>
-# endif /*  WRAPPER */
-
-#endif /* _STLP_INTERNAL_HASH_SET_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/stl/_hashtable.c b/src/STLport/stl/_hashtable.c
deleted file mode 100644
index 2e636f0..0000000
--- a/src/STLport/stl/_hashtable.c
+++ /dev/null
@@ -1,468 +0,0 @@
-/*
- *
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-#ifndef _STLP_HASHTABLE_C
-#define _STLP_HASHTABLE_C
-
-#ifndef _STLP_INTERNAL_HASHTABLE_H
-# include <stl/_hashtable.h>
-#endif
-
-#ifdef _STLP_DEBUG
-#  define hashtable __WORKAROUND_DBG_RENAME(hashtable)
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-# define __PRIME_LIST_BODY { \
-  53ul,         97ul,         193ul,       389ul,       769ul,      \
-  1543ul,       3079ul,       6151ul,      12289ul,     24593ul,    \
-  49157ul,      98317ul,      196613ul,    393241ul,    786433ul,   \
-  1572869ul,    3145739ul,    6291469ul,   12582917ul,  25165843ul, \
-  50331653ul,   100663319ul,  201326611ul, 402653189ul, 805306457ul,\
-  1610612741ul, 3221225473ul, 4294967291ul  \
-}
-
-#if ( _STLP_STATIC_TEMPLATE_DATA > 0 )
-template <class _Tp>
-const size_t _Stl_prime<_Tp>::_M_list[__stl_num_primes] = __PRIME_LIST_BODY;
-#else
-__DECLARE_INSTANCE(const size_t, 
-		   _Stl_prime_type::_M_list[], =__PRIME_LIST_BODY);
-#endif /* _STLP_STATIC_TEMPLATE_DATA */
-
-# undef __PRIME_LIST_BODY
-
-// fbp: these defines are for outline methods definitions.
-// needed to definitions to be portable. Should not be used in method bodies.
-
-# if defined ( _STLP_NESTED_TYPE_PARAM_BUG )
-#  define __size_type__       size_t
-#  define size_type           size_t
-#  define value_type      _Val
-#  define key_type        _Key
-#  define _Node           _Hashtable_node<_Val>
-#  define __reference__       _Val&
-
-#  define __iterator__        _Ht_iterator<_Val, _Nonconst_traits<_Val>, _Key, _HF, _ExK, _EqK, _All>
-#  define __const_iterator__  _Ht_iterator<_Val, _Const_traits<_Val>, _Key, _HF, _ExK, _EqK, _All>
-# else
-#  define __size_type__        _STLP_TYPENAME_ON_RETURN_TYPE hashtable<_Val, _Key, _HF, _ExK, _EqK, _All>::size_type
-#  define __reference__        _STLP_TYPENAME_ON_RETURN_TYPE  hashtable<_Val, _Key, _HF, _ExK, _EqK, _All>::reference
-#  define __iterator__         _STLP_TYPENAME_ON_RETURN_TYPE hashtable<_Val, _Key, _HF, _ExK, _EqK, _All>::iterator
-# endif
-
-template <class _Val, class _Key, class _HF, class _ExK, class _EqK, 
-          class _All>
-_Hashtable_node<_Val>*
-_Hashtable_iterator<_Val,_Key,_HF,_ExK,_EqK,_All>::_M_skip_to_next() {
-  size_t __bucket = _M_ht->_M_bkt_num(_M_cur->_M_val);
-  size_t __h_sz;
-  __h_sz = this->_M_ht->bucket_count();
-
-  _Node* __i=0;
-  while (__i==0 && ++__bucket < __h_sz)
-    __i = (_Node*)_M_ht->_M_buckets[__bucket];
-  return __i;
-}
-
-template <class _Val, class _Key, class _HF, class _ExK, class _EqK, 
-          class _All>
-__size_type__
-hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>::_M_next_size(size_type __n) const    { 
-  const size_type* __first = (const size_type*)_Stl_prime_type::_M_list;
-  const size_type* __last =  (const size_type*)_Stl_prime_type::_M_list + (int)__stl_num_primes;
-  const size_type* pos = __lower_bound(__first, __last, __n, __less((size_type*)0), (ptrdiff_t*)0);
-  return (pos == __last ? *(__last - 1) : *pos);
-}
-
-template <class _Val, class _Key, class _HF, class _ExK, class _EqK, class _All>
-bool 
-hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>::_M_equal(
-						  const hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>& __ht1,
-						  const hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>& __ht2)
-{
-  //  typedef _Hashtable_node<_Val> _Node;
-  if (__ht1.bucket_count() != __ht2.bucket_count())
-    return false;
-  for (size_t __n = 0; __n < __ht1.bucket_count(); ++__n) {
-    const _Node* __cur1 = __ht1._M_get_bucket(__n);
-    const _Node* __cur2 = __ht2._M_get_bucket(__n);
-    for ( ; __cur1 && __cur2 && __cur1->_M_val == __cur2->_M_val;
-          __cur1 = __cur1->_M_next, __cur2 = __cur2->_M_next)
-      {}
-    if (__cur1 || __cur2)
-      return false;
-  }
-  return true;
-}  
-
-template <class _Val, class _Key, class _HF, class _ExK, class _EqK, class _All>
-pair< _Ht_iterator<_Val, _Nonconst_traits<_Val>, _Key, _HF, _ExK, _EqK, _All> , bool> 
-hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>
-  ::insert_unique_noresize(const value_type& __obj)
-{
-  const size_type __n = _M_bkt_num(__obj);
-  _Node* __first = (_Node*)_M_buckets[__n];
-
-  for (_Node* __cur = __first; __cur; __cur = __cur->_M_next) 
-    if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj)))
-      return pair<iterator, bool>(iterator(__cur, this), false);
-
-  _Node* __tmp = _M_new_node(__obj);
-  __tmp->_M_next = __first;
-  _M_buckets[__n] = __tmp;
-  ++_M_num_elements._M_data;
-  return pair<iterator, bool>(iterator(__tmp, this), true);
-}
-
-template <class _Val, class _Key, class _HF, class _ExK, class _EqK, class _All>
-__iterator__ 
-hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>
-  ::insert_equal_noresize(const value_type& __obj)
-{
-  const size_type __n = _M_bkt_num(__obj);
-  _Node* __first = (_Node*)_M_buckets[__n];
-
-  for (_Node* __cur = __first; __cur; __cur = __cur->_M_next) 
-    if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj))) {
-      _Node* __tmp = _M_new_node(__obj);
-      __tmp->_M_next = __cur->_M_next;
-      __cur->_M_next = __tmp;
-      ++_M_num_elements._M_data;
-      return iterator(__tmp, this);
-    }
-
-  _Node* __tmp = _M_new_node(__obj);
-  __tmp->_M_next = __first;
-  _M_buckets[__n] = __tmp;
-  ++_M_num_elements._M_data;
-  return iterator(__tmp, this);
-}
-
-template <class _Val, class _Key, class _HF, class _ExK, class _EqK, class _All>
-__reference__ 
-hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>::_M_insert(const value_type& __obj)
-{
-  resize(_M_num_elements._M_data + 1);
-
-  size_type __n = _M_bkt_num(__obj);
-  _Node* __first = (_Node*)_M_buckets[__n];
-
-  _Node* __tmp = _M_new_node(__obj);
-  __tmp->_M_next = __first;
-  _M_buckets[__n] = __tmp;
-  ++_M_num_elements._M_data;
-  return __tmp->_M_val;
-}
-
-template <class _Val, class _Key, class _HF, class _ExK, class _EqK, class _All>
-__reference__ 
-hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>::find_or_insert(const value_type& __obj)
-{
-
-  _Node* __first = _M_find(_M_get_key(__obj));
-  if (__first)
-    return __first->_M_val;
-  else
-    return _M_insert(__obj);
-}
-
-template <class _Val, class _Key, class _HF, class _ExK, class _EqK, class _All>
-pair< _Ht_iterator<_Val, _Nonconst_traits<_Val>, _Key, _HF, _ExK, _EqK, _All>,
-      _Ht_iterator<_Val, _Nonconst_traits<_Val>, _Key, _HF, _ExK, _EqK, _All> > 
-hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>::equal_range(const key_type& __key)
-{
-  typedef pair<iterator, iterator> _Pii;
-  const size_type __n = _M_bkt_num_key(__key);
-
-  for (_Node* __first = (_Node*)_M_buckets[__n]; __first; __first = __first->_M_next)
-    if (_M_equals(_M_get_key(__first->_M_val), __key)) {
-      for (_Node* __cur = __first->_M_next; __cur; __cur = __cur->_M_next)
-        if (!_M_equals(_M_get_key(__cur->_M_val), __key))
-          return _Pii(iterator(__first, this), iterator(__cur, this));
-      for (size_type __m = __n + 1; __m < _M_buckets.size(); ++__m)
-        if (_M_buckets[__m])
-          return _Pii(iterator(__first, this),
-                     iterator((_Node*)_M_buckets[__m], this));
-      return _Pii(iterator(__first, this), end());
-    }
-  return _Pii(end(), end());
-}
-
-template <class _Val, class _Key, class _HF, class _ExK, class _EqK, class _All>
-pair< _Ht_iterator<_Val, _Const_traits<_Val>, _Key, _HF, _ExK, _EqK, _All>, 
-     _Ht_iterator<_Val, _Const_traits<_Val>, _Key, _HF, _ExK, _EqK, _All> > 
-hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>
-  ::equal_range(const key_type& __key) const
-{
-  typedef pair<const_iterator, const_iterator> _Pii;
-  const size_type __n = _M_bkt_num_key(__key);
-
-  for (const _Node* __first = (_Node*)_M_buckets[__n] ;
-       __first; 
-       __first = __first->_M_next) {
-    if (_M_equals(_M_get_key(__first->_M_val), __key)) {
-      for (const _Node* __cur = __first->_M_next;
-           __cur;
-           __cur = __cur->_M_next)
-        if (!_M_equals(_M_get_key(__cur->_M_val), __key))
-          return _Pii(const_iterator(__first, this),
-                      const_iterator(__cur, this));
-      for (size_type __m = __n + 1; __m < _M_buckets.size(); ++__m)
-        if (_M_buckets[__m])
-          return _Pii(const_iterator(__first, this),
-                      const_iterator((_Node*)_M_buckets[__m], this));
-      return _Pii(const_iterator(__first, this), end());
-    }
-  }
-  return _Pii(end(), end());
-}
-
-template <class _Val, class _Key, class _HF, class _ExK, class _EqK, class _All>
-__size_type__ 
-hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>::erase(const key_type& __key)
-{
-  const size_type __n = _M_bkt_num_key(__key);
-  _Node* __first = (_Node*)_M_buckets[__n];
-  size_type __erased = 0;
-
-  if (__first) {
-    _Node* __cur = __first;
-    _Node* __next = __cur->_M_next;
-    while (__next) {
-      if (_M_equals(_M_get_key(__next->_M_val), __key)) {
-        __cur->_M_next = __next->_M_next;
-        _M_delete_node(__next);
-        __next = __cur->_M_next;
-        ++__erased;
-        --_M_num_elements._M_data;
-      }
-      else {
-        __cur = __next;
-        __next = __cur->_M_next;
-      }
-    }
-    if (_M_equals(_M_get_key(__first->_M_val), __key)) {
-      _M_buckets[__n] = __first->_M_next;
-      _M_delete_node(__first);
-      ++__erased;
-      --_M_num_elements._M_data;
-    }
-  }
-  return __erased;
-}
-
-template <class _Val, class _Key, class _HF, class _ExK, class _EqK, class _All>
-void hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>::erase(const const_iterator& __it)
-{
-  // const iterator& __it = __REINTERPRET_CAST(const iterator&,_c_it);
-  const _Node* __p = __it._M_cur;
-  if (__p) {
-    const size_type __n = _M_bkt_num(__p->_M_val);
-    _Node* __cur = (_Node*)_M_buckets[__n];
-
-    if (__cur == __p) {
-      _M_buckets[__n] = __cur->_M_next;
-      _M_delete_node(__cur);
-      --_M_num_elements._M_data;
-    }
-    else {
-      _Node* __next = __cur->_M_next;
-      while (__next) {
-        if (__next == __p) {
-          __cur->_M_next = __next->_M_next;
-          _M_delete_node(__next);
-          --_M_num_elements._M_data;
-          break;
-        }
-        else {
-          __cur = __next;
-          __next = __cur->_M_next;
-        }
-      }
-    }
-  }
-}
-
-template <class _Val, class _Key, class _HF, class _ExK, class _EqK, class _All>
-void hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>
-  ::erase(const_iterator _c_first, const_iterator _c_last)
-{
-  iterator& __first = (iterator&)_c_first;
-  iterator& __last = (iterator&)_c_last;
-  size_type __f_bucket = __first._M_cur ? 
-    _M_bkt_num(__first._M_cur->_M_val) : _M_buckets.size();
-  size_type __l_bucket = __last._M_cur ? 
-    _M_bkt_num(__last._M_cur->_M_val) : _M_buckets.size();
-  if (__first._M_cur == __last._M_cur)
-    return;
-  else if (__f_bucket == __l_bucket)
-    _M_erase_bucket(__f_bucket, __first._M_cur, __last._M_cur);
-  else {
-    _M_erase_bucket(__f_bucket, __first._M_cur, 0);
-    for (size_type __n = __f_bucket + 1; __n < __l_bucket; ++__n)
-      _M_erase_bucket(__n, 0);
-    if (__l_bucket != _M_buckets.size())
-      _M_erase_bucket(__l_bucket, __last._M_cur);
-  }
-}
-
-template <class _Val, class _Key, class _HF, class _ExK, class _EqK, class _All>
-void hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>
-  ::resize(size_type __num_elements_hint)
-{
-  const size_type __old_n = _M_buckets.size();
-  if (__num_elements_hint > __old_n) {
-    const size_type __n = _M_next_size(__num_elements_hint);
-    if (__n > __old_n) {
-      _BucketVector __tmp(__n, (void*)(0),
-			  _M_buckets.get_allocator());
-      _STLP_TRY {
-        for (size_type __bucket = 0; __bucket < __old_n; ++__bucket) {
-          _Node* __first = (_Node*)_M_buckets[__bucket];
-          while (__first) {
-            size_type __new_bucket = _M_bkt_num(__first->_M_val, __n);
-            _M_buckets[__bucket] = __first->_M_next;
-            __first->_M_next = (_Node*)__tmp[__new_bucket];
-            __tmp[__new_bucket] = __first;
-            __first = (_Node*)_M_buckets[__bucket];          
-          }
-        }
-        _M_buckets.swap(__tmp);
-      }
-#         ifdef _STLP_USE_EXCEPTIONS
-      catch(...) {
-        for (size_type __bucket = 0; __bucket < __tmp.size(); ++__bucket) {
-          while (__tmp[__bucket]) {
-            _Node* __next = ((_Node*)__tmp[__bucket])->_M_next;
-            _M_delete_node((_Node*)__tmp[__bucket]);
-            __tmp[__bucket] = __next;
-          }
-        }
-        throw;
-      }
-#         endif /* _STLP_USE_EXCEPTIONS */
-    }
-  }
-}
-
-template <class _Val, class _Key, class _HF, class _ExK, class _EqK, class _All>
-void hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>
-  ::_M_erase_bucket(const size_type __n, _Node* __first, _Node* __last)
-{
-  _Node* __cur = (_Node*)_M_buckets[__n];
-  if (__cur == __first)
-    _M_erase_bucket(__n, __last);
-  else {
-    _Node* __next;
-    for (__next = __cur->_M_next; 
-         __next != __first; 
-         __cur = __next, __next = __cur->_M_next)
-      ;
-    while (__next != __last) {
-      __cur->_M_next = __next->_M_next;
-      _M_delete_node(__next);
-      __next = __cur->_M_next;
-      --_M_num_elements._M_data;
-    }
-  }
-}
-
-template <class _Val, class _Key, class _HF, class _ExK, class _EqK, class _All>
-void hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>
-  ::_M_erase_bucket(const size_type __n, _Node* __last)
-{
-  _Node* __cur = (_Node*)_M_buckets[__n];
-  while (__cur && __cur != __last) {
-    _Node* __next = __cur->_M_next;
-    _M_delete_node(__cur);
-    __cur = __next;
-    _M_buckets[__n] = __cur;
-    --_M_num_elements._M_data;
-  }
-}
-
-template <class _Val, class _Key, class _HF, class _ExK, class _EqK, class _All>
-void hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>::clear()
-{
-  for (size_type __i = 0; __i < _M_buckets.size(); ++__i) {
-    _Node* __cur = (_Node*)_M_buckets[__i];
-    while (__cur != 0) {
-      _Node* __next = __cur->_M_next;
-      _M_delete_node(__cur);
-      __cur = __next;
-    }
-    _M_buckets[__i] = 0;
-  }
-  _M_num_elements._M_data = 0;
-}
-
-    
-template <class _Val, class _Key, class _HF, class _ExK, class _EqK, class _All>
-void hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>
-  ::_M_copy_from(const hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>& __ht)
-{
-  _M_buckets.clear();
-  _M_buckets.reserve(__ht._M_buckets.size());
-  _M_buckets.insert(_M_buckets.end(), __ht._M_buckets.size(), (void*) 0);
-  _STLP_TRY {
-    for (size_type __i = 0; __i < __ht._M_buckets.size(); ++__i) {
-      const _Node* __cur = (_Node*)__ht._M_buckets[__i];
-      if (__cur) {
-        _Node* __xcopy = _M_new_node(__cur->_M_val);
-        _M_buckets[__i] = __xcopy;
-
-        for (_Node* __next = __cur->_M_next; 
-             __next; 
-             __cur = __next, __next = __cur->_M_next) {
-          __xcopy->_M_next = _M_new_node(__next->_M_val);
-          __xcopy = __xcopy->_M_next;
-        }
-      }
-    }
-    _M_num_elements._M_data = __ht._M_num_elements._M_data;
-  }
-  _STLP_UNWIND(clear());
-}
-
-# undef __iterator__ 
-# undef const_iterator
-# undef __size_type__
-# undef __reference__
-# undef size_type       
-# undef value_type      
-# undef key_type        
-# undef _Node            
-# undef __stl_num_primes
-# undef hashtable
-
-_STLP_END_NAMESPACE
-
-#endif /*  _STLP_HASHTABLE_C */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_hashtable.h b/src/STLport/stl/_hashtable.h
deleted file mode 100644
index 9efe721..0000000
--- a/src/STLport/stl/_hashtable.h
+++ /dev/null
@@ -1,613 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_HASHTABLE_H
-#define _STLP_INTERNAL_HASHTABLE_H
-
-# ifndef _STLP_INTERNAL_VECTOR_H
-#  include <stl/_vector.h>
-# endif
-
-# ifndef _STLP_INTERNAL_ITERATOR_H
-#  include <stl/_iterator.h>
-# endif
-
-# ifndef _STLP_INTERNAL_FUNCTION_H
-#  include <stl/_function_base.h>
-# endif
-
-# ifndef _STLP_INTERNAL_ALGOBASE_H
-#  include <stl/_algobase.h>
-# endif
-
-# ifndef _STLP_HASH_FUN_H
-#  include <stl/_hash_fun.h>
-# endif
-
-// Hashtable class, used to implement the hashed associative containers
-// hash_set, hash_map, hash_multiset, and hash_multimap.
-
-#ifdef _STLP_DEBUG
-#  define hashtable __WORKAROUND_DBG_RENAME(hashtable)
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-template <class _Val>
-struct _Hashtable_node
-{
-  typedef _Hashtable_node<_Val> _Self;
-  _Self* _M_next;
-  _Val _M_val;
-  __TRIVIAL_STUFF(_Hashtable_node)
-};  
-
-// some compilers require the names of template parameters to be the same
-template <class _Val, class _Key, class _HF,
-          class _ExK, class _EqK, class _All>
-class hashtable;
-
-template <class _Val, class _Key, class _HF,
-          class _ExK, class _EqK, class _All>
-struct _Hashtable_iterator
-{
-  typedef hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>
-          _Hashtable;
-  typedef _Hashtable_node<_Val> _Node;
-
-  _Node* _M_cur;
-  _Hashtable* _M_ht;
-
-  _Hashtable_iterator(_Node* __n, _Hashtable* __tab) 
-    : _M_cur(__n), _M_ht(__tab) {}
-  _Hashtable_iterator() {}
-
-  _Node* _M_skip_to_next();
-};
-
-
-template <class _Val, class _Traits, class _Key, class _HF,
-          class _ExK, class _EqK, class _All>
-struct _Ht_iterator : public _Hashtable_iterator< _Val, _Key,_HF, _ExK,_EqK,_All>
-{
-  
-  typedef _Hashtable_iterator<_Val,_Key,_HF,_ExK,_EqK,_All> _Base;
-
-  //  typedef _Ht_iterator<_Val, _Nonconst_traits<_Val>,_Key,_HF,_ExK,_EqK,_All> iterator;
-  //  typedef _Ht_iterator<_Val, _Const_traits<_Val>,_Key,_HF,_ExK,_EqK,_All> const_iterator;
-  typedef _Ht_iterator<_Val, _Traits,_Key,_HF,_ExK,_EqK,_All> _Self;
-
-  typedef hashtable<_Val,_Key,_HF,_ExK,_EqK,_All> _Hashtable;
-  typedef _Hashtable_node<_Val> _Node;
-
-  typedef _Val value_type;
-  typedef forward_iterator_tag iterator_category;
-  typedef ptrdiff_t difference_type;
-  typedef size_t size_type;
-  typedef typename _Traits::reference reference;
-  typedef typename _Traits::pointer   pointer;
-
-  _Ht_iterator(const _Node* __n, const _Hashtable* __tab) :
-    _Hashtable_iterator<_Val,_Key,_HF,_ExK,_EqK,_All>((_Node*)__n, (_Hashtable*)__tab) {}
-  _Ht_iterator() {}
-  _Ht_iterator(const _Ht_iterator<_Val, _Nonconst_traits<_Val>,_Key,_HF,_ExK,_EqK,_All>& __it) : 
-    _Hashtable_iterator<_Val,_Key,_HF,_ExK,_EqK,_All>(__it) {}
-
-  reference operator*() const { 
-      return this->_M_cur->_M_val; 
-  }
-  _STLP_DEFINE_ARROW_OPERATOR
-
-  _Self& operator++() {
-    _Node* __n = this->_M_cur->_M_next;
-    this->_M_cur =  (__n !=0 ? __n : this->_M_skip_to_next());
-    return *this;
-  }
-  inline  _Self operator++(int) {
-     _Self __tmp = *this;
-    ++*this;
-    return __tmp;
-  }
-};
-
-template <class _Val, class _Traits, class _Traits1, class _Key, class _HF,
-          class _ExK, class _EqK, class _All>
-inline bool 
-operator==(const _Ht_iterator<_Val, _Traits,_Key,_HF,_ExK,_EqK,_All>& __x, 
-	   const _Ht_iterator<_Val, _Traits1,_Key,_HF,_ExK,_EqK,_All>& __y) { 
-  return __x._M_cur == __y._M_cur; 
-}
-
-#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE
-template <class _Val, class _Key, class _HF,
-          class _ExK, class _EqK, class _All>
-inline bool 
-operator!=(const _Hashtable_iterator<_Val,_Key,_HF,_ExK,_EqK,_All>& __x, 
-	   const _Hashtable_iterator<_Val,_Key,_HF,_ExK,_EqK,_All>& __y) { 
-  return __x._M_cur != __y._M_cur; 
-}
-#else
-
-# if (defined (__GNUC__) && (__GNUC_MINOR__ < 8))
-template <class _Val, class _Key, class _HF,
-          class _ExK, class _EqK, class _All>
-inline bool
-operator!=(const _Ht_iterator<_Val, _Const_traits<_Val>,_Key,_HF,_ExK,_EqK,_All>& __x,
-           const _Ht_iterator<_Val, _Nonconst_traits<_Val>,_Key,_HF,_ExK,_EqK,_All>& __y) {
-  return __x._M_cur != __y._M_cur;
-}
-# endif
-
-template <class _Val, class _Key, class _HF,
-          class _ExK, class _EqK, class _All>
-inline bool 
-operator!=(const _Ht_iterator<_Val, _Nonconst_traits<_Val>,_Key,_HF,_ExK,_EqK,_All>& __x, 
-	   const _Ht_iterator<_Val, _Const_traits<_Val>,_Key,_HF,_ExK,_EqK,_All>& __y) { 
-  return __x._M_cur != __y._M_cur; 
-}
-#endif
-
-# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES
-template <class _Val, class _Traits, class _Key, class _HF, class _ExK, class _EqK, class _All>
-inline _Val* value_type(const _Ht_iterator<_Val, _Traits,_Key,_HF,_ExK,_EqK,_All>&) { return (_Val*) 0; }
-template <class _Val, class _Traits, class _Key, class _HF, class _ExK, class _EqK, class _All>
-inline forward_iterator_tag iterator_category(const _Ht_iterator<_Val, _Traits,_Key,_HF,_ExK,_EqK,_All>&) { return forward_iterator_tag(); }
-template <class _Val, class _Traits, class _Key, class _HF, class _ExK, class _EqK, class _All>
-inline ptrdiff_t* distance_type(const _Ht_iterator<_Val,_Traits,_Key,_HF,_ExK,_EqK,_All>&) { return (ptrdiff_t*) 0; }
-#endif
-
-#define __stl_num_primes  28
-template <class _Tp>
-class _Stl_prime {
-public:
-  static const size_t _M_list[__stl_num_primes];
-};
-
-# if defined (_STLP_USE_TEMPLATE_EXPORT) 
-_STLP_EXPORT_TEMPLATE_CLASS _Stl_prime<bool>;
-# endif
-
-typedef _Stl_prime<bool> _Stl_prime_type;
-
-
-// Hashtables handle allocators a bit differently than other containers
-//  do.  If we're using standard-conforming allocators, then a hashtable
-//  unconditionally has a member variable to hold its allocator, even if
-//  it so happens that all instances of the allocator type are identical.
-// This is because, for hashtables, this extra storage is negligible.  
-//  Additionally, a base class wouldn't serve any other purposes; it 
-//  wouldn't, for example, simplify the exception-handling code.
-template <class _Val, class _Key, class _HF,
-          class _ExK, class _EqK, class _All>
-class hashtable {
-  typedef hashtable<_Val, _Key, _HF, _ExK, _EqK, _All> _Self;
-public:
-  typedef _Key key_type;
-  typedef _Val value_type;
-  typedef _HF hasher;
-  typedef _EqK key_equal;
-
-  typedef size_t            size_type;
-  typedef ptrdiff_t         difference_type;
-  typedef value_type*       pointer;
-  typedef const value_type* const_pointer;
-  typedef value_type&       reference;
-  typedef const value_type& const_reference;
-  typedef forward_iterator_tag _Iterator_category;
-
-  hasher hash_funct() const { return _M_hash; }
-  key_equal key_eq() const { return _M_equals; }
-
-private:
-  typedef _Hashtable_node<_Val> _Node;
-
-private:
-  _STLP_FORCE_ALLOCATORS(_Val, _All)
-  typedef typename _Alloc_traits<_Node, _All>::allocator_type _M_node_allocator_type;
-  typedef typename _Alloc_traits<void*, _All>::allocator_type _M_node_ptr_allocator_type;
-  typedef __vector__<void*, _M_node_ptr_allocator_type> _BucketVector;
-public:
-  typedef typename _Alloc_traits<_Val,_All>::allocator_type allocator_type;
-  allocator_type get_allocator() const { 
-    return _STLP_CONVERT_ALLOCATOR((const _M_node_allocator_type&)_M_num_elements, _Val); 
-  }
-private:
-  hasher                _M_hash;
-  key_equal             _M_equals;
-  _ExK                  _M_get_key;
-  _BucketVector         _M_buckets;
-  _STLP_alloc_proxy<size_type, _Node, _M_node_allocator_type>  _M_num_elements;
-  const _Node* _M_get_bucket(size_t __n) const { return (_Node*)_M_buckets[__n]; }
-
-public:
-  typedef _Const_traits<_Val> __const_val_traits;
-  typedef _Nonconst_traits<_Val> __nonconst_val_traits;
-  typedef _Ht_iterator<_Val, __const_val_traits,_Key,_HF,_ExK,_EqK, _All> const_iterator;
-  typedef _Ht_iterator<_Val, __nonconst_val_traits,_Key,_HF,_ExK,_EqK,_All> iterator;
-  friend struct _Hashtable_iterator<_Val,_Key,_HF,_ExK,_EqK,_All>;
-  friend struct _Ht_iterator<_Val, _Nonconst_traits<_Val>,_Key,_HF,_ExK,_EqK,_All>;
-  friend struct _Ht_iterator<_Val, _Const_traits<_Val>,_Key,_HF,_ExK,_EqK, _All>;
-
-public:
-  hashtable(size_type __n,
-            const _HF&  __hf,
-            const _EqK& __eql,
-            const _ExK& __ext,
-            const allocator_type& __a = allocator_type())
-    :
-      _M_hash(__hf),
-      _M_equals(__eql),
-      _M_get_key(__ext),
-      _M_buckets(_STLP_CONVERT_ALLOCATOR(__a,void*)),
-      _M_num_elements(_STLP_CONVERT_ALLOCATOR(__a,_Node), (size_type)0)
-  {
-    _M_initialize_buckets(__n);
-  }
-
-  hashtable(size_type __n,
-            const _HF&    __hf,
-            const _EqK&   __eql,
-            const allocator_type& __a = allocator_type())
-    :
-      _M_hash(__hf),
-      _M_equals(__eql),
-      _M_get_key(_ExK()),
-      _M_buckets(_STLP_CONVERT_ALLOCATOR(__a,void*)),
-      _M_num_elements(_STLP_CONVERT_ALLOCATOR(__a,_Node), (size_type)0)
-  {
-    _M_initialize_buckets(__n);
-  }
-
-  hashtable(const _Self& __ht)
-    :
-      _M_hash(__ht._M_hash),
-      _M_equals(__ht._M_equals),
-      _M_get_key(__ht._M_get_key),
-      _M_buckets(_STLP_CONVERT_ALLOCATOR(__ht.get_allocator(),void*)),
-      _M_num_elements((const _M_node_allocator_type&)__ht._M_num_elements, (size_type)0)
-  {
-    _M_copy_from(__ht);
-  }
-
-  _Self& operator= (const _Self& __ht)
-  {
-    if (&__ht != this) {
-      clear();
-      _M_hash = __ht._M_hash;
-      _M_equals = __ht._M_equals;
-      _M_get_key = __ht._M_get_key;
-      _M_copy_from(__ht);
-    }
-    return *this;
-  }
-
-  ~hashtable() { clear(); }
-
-  size_type size() const { return _M_num_elements._M_data; }
-  size_type max_size() const { return size_type(-1); }
-  bool empty() const { return size() == 0; }
-
-  void swap(_Self& __ht)
-  {
-    _STLP_STD::swap(_M_hash, __ht._M_hash);
-    _STLP_STD::swap(_M_equals, __ht._M_equals);
-    _STLP_STD::swap(_M_get_key, __ht._M_get_key);
-    _M_buckets.swap(__ht._M_buckets);
-    _STLP_STD::swap(_M_num_elements, __ht._M_num_elements);
-  }
-
-  iterator begin()
-  { 
-    for (size_type __n = 0; __n < _M_buckets.size(); ++__n)
-      if (_M_buckets[__n])
-        return iterator((_Node*)_M_buckets[__n], this);
-    return end();
-  }
-
-  iterator end() { return iterator((_Node*)0, this); }
-
-  const_iterator begin() const
-  {
-    for (size_type __n = 0; __n < _M_buckets.size(); ++__n)
-      if (_M_buckets[__n])
-        return const_iterator((_Node*)_M_buckets[__n], this);
-    return end();
-  }
-
-  const_iterator end() const { return const_iterator((_Node*)0, this); }
-
-  static bool _STLP_CALL _M_equal (const hashtable<_Val, _Key, _HF, _ExK, _EqK, _All>&,
-			const hashtable<_Val, _Key, _HF, _ExK, _EqK, _All>&);
-
-public:
-
-  size_type bucket_count() const { return _M_buckets.size(); }
-
-  size_type max_bucket_count() const
-    { return _Stl_prime_type::_M_list[(int)__stl_num_primes - 1]; } 
-
-  size_type elems_in_bucket(size_type __bucket) const
-  {
-    size_type __result = 0;
-    for (_Node* __cur = (_Node*)_M_buckets[__bucket]; __cur; __cur = __cur->_M_next)
-      __result += 1;
-    return __result;
-  }
-
-  pair<iterator, bool> insert_unique(const value_type& __obj)
-  {
-    resize(_M_num_elements._M_data + 1);
-    return insert_unique_noresize(__obj);
-  }
-
-  iterator insert_equal(const value_type& __obj)
-  {
-    resize(_M_num_elements._M_data + 1);
-    return insert_equal_noresize(__obj);
-  }
-
-  pair<iterator, bool> insert_unique_noresize(const value_type& __obj);
-  iterator insert_equal_noresize(const value_type& __obj);
- 
-#ifdef _STLP_MEMBER_TEMPLATES
-  template <class _InputIterator>
-  void insert_unique(_InputIterator __f, _InputIterator __l)
-  {
-    insert_unique(__f, __l, _STLP_ITERATOR_CATEGORY(__f, _InputIterator));
-  }
-
-  template <class _InputIterator>
-  void insert_equal(_InputIterator __f, _InputIterator __l)
-  {
-    insert_equal(__f, __l, _STLP_ITERATOR_CATEGORY(__f, _InputIterator));
-  }
-
-  template <class _InputIterator>
-  void insert_unique(_InputIterator __f, _InputIterator __l,
-                     const input_iterator_tag &)
-  {
-    for ( ; __f != __l; ++__f)
-      insert_unique(*__f);
-  }
-
-  template <class _InputIterator>
-  void insert_equal(_InputIterator __f, _InputIterator __l,
-                    const input_iterator_tag &)
-  {
-    for ( ; __f != __l; ++__f)
-      insert_equal(*__f);
-  }
-
-  template <class _ForwardIterator>
-  void insert_unique(_ForwardIterator __f, _ForwardIterator __l,
-                     const forward_iterator_tag &)
-  {
-    size_type __n = distance(__f, __l);
-    resize(_M_num_elements._M_data + __n);
-    for ( ; __n > 0; --__n, ++__f)
-      insert_unique_noresize(*__f);
-  }
-
-  template <class _ForwardIterator>
-  void insert_equal(_ForwardIterator __f, _ForwardIterator __l,
-                    const forward_iterator_tag &)
-  {
-    size_type __n = distance(__f, __l);
-    resize(_M_num_elements._M_data + __n);
-    for ( ; __n > 0; --__n, ++__f)
-      insert_equal_noresize(*__f);
-  }
-
-#else /* _STLP_MEMBER_TEMPLATES */
-  void insert_unique(const value_type* __f, const value_type* __l)
-  {
-    size_type __n = __l - __f;
-    resize(_M_num_elements._M_data + __n);
-    for ( ; __n > 0; --__n, ++__f)
-      insert_unique_noresize(*__f);
-  }
-
-  void insert_equal(const value_type* __f, const value_type* __l)
-  {
-    size_type __n = __l - __f;
-    resize(_M_num_elements._M_data + __n);
-    for ( ; __n > 0; --__n, ++__f)
-      insert_equal_noresize(*__f);
-  }
-
-  void insert_unique(const_iterator __f, const_iterator __l)
-  {
-    size_type __n = distance(__f, __l);
-    resize(_M_num_elements._M_data + __n);
-    for ( ; __n > 0; --__n, ++__f)
-      insert_unique_noresize(*__f);
-  }
-
-  void insert_equal(const_iterator __f, const_iterator __l)
-  {
-    size_type __n = distance(__f, __l);
-    resize(_M_num_elements._M_data + __n);
-    for ( ; __n > 0; --__n, ++__f)
-      insert_equal_noresize(*__f);
-  }
-#endif /*_STLP_MEMBER_TEMPLATES */
-
-  reference find_or_insert(const value_type& __obj);
-
-private:
-# if defined(_STLP_MEMBER_TEMPLATES) && ! defined ( _STLP_NO_EXTENSIONS )  && !(defined(__MRC__)||(defined(__SC__)&&!defined(__DMC_)))
-  template <class _KT> 
-   _Node* _M_find(const _KT& __key) const
-# else
-   _Node* _M_find(const key_type& __key) const
-# endif
-  {
-    size_type __n = _M_hash(__key)% _M_buckets.size();
-    _Node* __first;
-    for ( __first = (_Node*)_M_buckets[__n];
-          __first && !_M_equals(_M_get_key(__first->_M_val), __key);
-          __first = __first->_M_next)
-      {}
-    return __first;
-  } 
-
-public:
-# if defined(_STLP_MEMBER_TEMPLATES) && ! defined ( _STLP_NO_EXTENSIONS )  && !(defined(__MRC__)||(defined(__SC__)&&!defined(__DMC__)))
-  template <class _KT> 
-  iterator find(const _KT& __key) 
-# else
-  iterator find(const key_type& __key) 
-# endif
-  {
-    return iterator(_M_find(__key), this);
-  } 
-
-# if defined(_STLP_MEMBER_TEMPLATES) && ! defined ( _STLP_NO_EXTENSIONS )  && !(defined(__MRC__)||(defined(__SC__)&&!defined(__DMC__)))
-  template <class _KT> 
-  const_iterator find(const _KT& __key) const
-# else
-  const_iterator find(const key_type& __key) const
-# endif
-  {
-    return const_iterator(_M_find(__key), this);
-  } 
-
-  size_type count(const key_type& __key) const
-  {
-    const size_type __n = _M_bkt_num_key(__key);
-    size_type __result = 0;
-
-    for (const _Node* __cur = (_Node*)_M_buckets[__n]; __cur; __cur = __cur->_M_next)
-      if (_M_equals(_M_get_key(__cur->_M_val), __key))
-        ++__result;
-    return __result;
-  }
-
-  pair<iterator, iterator> 
-  equal_range(const key_type& __key);
-
-  pair<const_iterator, const_iterator> 
-  equal_range(const key_type& __key) const;
-
-  size_type erase(const key_type& __key);
-  //   void erase(const iterator& __it); `
-  void erase(const const_iterator& __it) ;
-
-  //  void erase(const const_iterator& __first, const const_iterator __last) {
-  //     erase((const iterator&)__first, (const iterator&)__last);
-  //  }
-  void erase(const_iterator __first, const_iterator __last);
-  void resize(size_type __num_elements_hint);
-  void clear();
-
-public:
-  // this is for hash_map::operator[]
-  reference _M_insert(const value_type& __obj);
-
-private:
-
-  size_type _M_next_size(size_type __n) const;
-
-  void _M_initialize_buckets(size_type __n)
-  {
-    const size_type __n_buckets = _M_next_size(__n);
-    _M_buckets.reserve(__n_buckets);
-    _M_buckets.insert(_M_buckets.end(), __n_buckets, (void*) 0);
-    _M_num_elements._M_data = 0;
-  }
-
-  size_type _M_bkt_num_key(const key_type& __key) const
-  {
-    return _M_bkt_num_key(__key, _M_buckets.size());
-  }
-
-  size_type _M_bkt_num(const value_type& __obj) const
-  {
-    return _M_bkt_num_key(_M_get_key(__obj));
-  }
-
-  size_type _M_bkt_num_key(const key_type& __key, size_t __n) const
-  {
-    return _M_hash(__key) % __n;
-  }
-
-  size_type _M_bkt_num(const value_type& __obj, size_t __n) const
-  {
-    return _M_bkt_num_key(_M_get_key(__obj), __n);
-  }
-
-  _Node* _M_new_node(const value_type& __obj)
-  {
-    _Node* __n = _M_num_elements.allocate(1);
-    __n->_M_next = 0;
-    _STLP_TRY {
-      _Construct(&__n->_M_val, __obj);
-      //      return __n;
-    }
-    _STLP_UNWIND(_M_num_elements.deallocate(__n, 1));
-    return __n;
-  }
-  
-  void _M_delete_node(_Node* __n)
-  {
-    _STLP_STD::_Destroy(&__n->_M_val);
-    _M_num_elements.deallocate(__n, 1);
-  }
-
-  void _M_erase_bucket(const size_type __n, _Node* __first, _Node* __last);
-  void _M_erase_bucket(const size_type __n, _Node* __last);
-
-  void _M_copy_from(const _Self& __ht);
-};
-
-#define _STLP_TEMPLATE_HEADER template <class _Val, class _Key, class _HF, class _ExK, class _EqK, class _All>
-#define _STLP_TEMPLATE_CONTAINER hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>
-#include <stl/_relops_hash_cont.h>
-#undef _STLP_TEMPLATE_CONTAINER
-#undef _STLP_TEMPLATE_HEADER
-
-_STLP_END_NAMESPACE
-
-# undef hashtable
-
-# if !defined (_STLP_LINK_TIME_INSTANTIATION)
-#  include <stl/_hashtable.c>
-# endif
-
-# if defined (_STLP_DEBUG)
-#  include <stl/debug/_hashtable.h>
-# endif
-
-#endif /* _STLP_INTERNAL_HASHTABLE_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
-
diff --git a/src/STLport/stl/_heap.c b/src/STLport/stl/_heap.c
deleted file mode 100644
index 21e087c..0000000
--- a/src/STLport/stl/_heap.c
+++ /dev/null
@@ -1,242 +0,0 @@
-/*
- *
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-#ifndef _STLP_HEAP_C
-#define _STLP_HEAP_C
-
-#ifndef _STLP_INTERNAL_HEAP_H
-# include <stl/_heap.h>
-#endif
-
-#ifndef _STLP_INTERNAL_ITERATOR_BASE_H
-# include <stl/_iterator_base.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-template <class _RandomAccessIterator, class _Distance, class _Tp>
-_STLP_INLINE_LOOP
-void 
-__push_heap(_RandomAccessIterator __first,
-            _Distance __holeIndex, _Distance __topIndex, _Tp __val)
-{
-  _Distance __parent = (__holeIndex - 1) / 2;
-  while (__holeIndex > __topIndex && *(__first + __parent) < __val) {
-    *(__first + __holeIndex) = *(__first + __parent);
-    __holeIndex = __parent;
-    __parent = (__holeIndex - 1) / 2;
-  }    
-  *(__first + __holeIndex) = __val;
-}
-
-template <class _RandomAccessIterator, class _Distance, class _Tp>
-inline void 
-__push_heap_aux(_RandomAccessIterator __first,
-                _RandomAccessIterator __last, _Distance*, _Tp*)
-{
-  __push_heap(__first, _Distance((__last - __first) - 1), _Distance(0), 
-              _Tp(*(__last - 1)));
-}
-
-template <class _RandomAccessIterator>
-void 
-push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
-{
-  __push_heap_aux(__first, __last,
-                  _STLP_DISTANCE_TYPE(__first, _RandomAccessIterator), _STLP_VALUE_TYPE(__first, _RandomAccessIterator));
-}
-
-
-template <class _RandomAccessIterator, class _Distance, class _Tp, 
-          class _Compare>
-_STLP_INLINE_LOOP
-void
-__push_heap(_RandomAccessIterator __first, _Distance __holeIndex,
-            _Distance __topIndex, _Tp __val, _Compare __comp)
-{
-  _Distance __parent = (__holeIndex - 1) / 2;
-  while (__holeIndex > __topIndex && __comp(*(__first + __parent), __val)) {
-    *(__first + __holeIndex) = *(__first + __parent);
-    __holeIndex = __parent;
-    __parent = (__holeIndex - 1) / 2;
-  }
-  *(__first + __holeIndex) = __val;
-}
-
-template <class _RandomAccessIterator, class _Compare,
-          class _Distance, class _Tp>
-inline void 
-__push_heap_aux(_RandomAccessIterator __first,
-                _RandomAccessIterator __last, _Compare __comp,
-                _Distance*, _Tp*) 
-{
-  __push_heap(__first, _Distance((__last - __first) - 1), _Distance(0), 
-              _Tp(*(__last - 1)), __comp);
-}
-
-template <class _RandomAccessIterator, class _Compare>
-void 
-push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
-          _Compare __comp) 
-{
-  __push_heap_aux(__first, __last, __comp,
-                  _STLP_DISTANCE_TYPE(__first, _RandomAccessIterator), _STLP_VALUE_TYPE(__first, _RandomAccessIterator));
-}
-
-template <class _RandomAccessIterator, class _Distance, class _Tp>
-void 
-__adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex,
-              _Distance __len, _Tp __val) {
-  _Distance __topIndex = __holeIndex;
-  _Distance __secondChild = 2 * __holeIndex + 2;
-  while (__secondChild < __len) {
-    if (*(__first + __secondChild) < *(__first + (__secondChild - 1)))
-      __secondChild--;
-    *(__first + __holeIndex) = *(__first + __secondChild);
-    __holeIndex = __secondChild;
-    __secondChild = 2 * (__secondChild + 1);
-  }
-  if (__secondChild == __len) {
-    *(__first + __holeIndex) = *(__first + (__secondChild - 1));
-    __holeIndex = __secondChild - 1;
-  }
-  __push_heap(__first, __holeIndex, __topIndex, __val);
-}
-
-
-template <class _RandomAccessIterator, class _Tp>
-inline void 
-__pop_heap_aux(_RandomAccessIterator __first, _RandomAccessIterator __last, _Tp*) {
-  __pop_heap(__first, __last - 1, __last - 1, 
-             _Tp(*(__last - 1)), _STLP_DISTANCE_TYPE(__first, _RandomAccessIterator));
-}
-
-template <class _RandomAccessIterator>
-void pop_heap(_RandomAccessIterator __first, 
-	      _RandomAccessIterator __last) {
-  __pop_heap_aux(__first, __last, _STLP_VALUE_TYPE(__first, _RandomAccessIterator));
-}
-
-template <class _RandomAccessIterator, class _Distance,
-          class _Tp, class _Compare>
-void
-__adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex,
-              _Distance __len, _Tp __val, _Compare __comp)
-{
-  _Distance __topIndex = __holeIndex;
-  _Distance __secondChild = 2 * __holeIndex + 2;
-  while (__secondChild < __len) {
-    if (__comp(*(__first + __secondChild), *(__first + (__secondChild - 1))))
-      __secondChild--;
-    *(__first + __holeIndex) = *(__first + __secondChild);
-    __holeIndex = __secondChild;
-    __secondChild = 2 * (__secondChild + 1);
-  }
-  if (__secondChild == __len) {
-    *(__first + __holeIndex) = *(__first + (__secondChild - 1));
-    __holeIndex = __secondChild - 1;
-  }
-  __push_heap(__first, __holeIndex, __topIndex, __val, __comp);
-}
-
-
-template <class _RandomAccessIterator, class _Tp, class _Compare>
-inline void 
-__pop_heap_aux(_RandomAccessIterator __first,
-               _RandomAccessIterator __last, _Tp*, _Compare __comp)
-{
-  __pop_heap(__first, __last - 1, __last - 1, _Tp(*(__last - 1)), __comp,
-             _STLP_DISTANCE_TYPE(__first, _RandomAccessIterator));
-}
-
-
-template <class _RandomAccessIterator, class _Compare>
-void 
-pop_heap(_RandomAccessIterator __first,
-         _RandomAccessIterator __last, _Compare __comp)
-{
-    __pop_heap_aux(__first, __last, _STLP_VALUE_TYPE(__first, _RandomAccessIterator), __comp);
-}
-
-template <class _RandomAccessIterator, class _Tp, class _Distance>
-_STLP_INLINE_LOOP
-void 
-__make_heap(_RandomAccessIterator __first,
-            _RandomAccessIterator __last, _Tp*, _Distance*)
-{
-  if (__last - __first < 2) return;
-  _Distance __len = __last - __first;
-  _Distance __parent = (__len - 2)/2;
-    
-  while (true) {
-    __adjust_heap(__first, __parent, __len, _Tp(*(__first + __parent)));
-    if (__parent == 0) return;
-    __parent--;
-  }
-}
-
-template <class _RandomAccessIterator>
-void 
-make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
-{
-  __make_heap(__first, __last,
-              _STLP_VALUE_TYPE(__first, _RandomAccessIterator), _STLP_DISTANCE_TYPE(__first, _RandomAccessIterator));
-}
-
-template <class _RandomAccessIterator, class _Compare,
-          class _Tp, class _Distance>
-_STLP_INLINE_LOOP
-void
-__make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
-            _Compare __comp, _Tp*, _Distance*)
-{
-  if (__last - __first < 2) return;
-  _Distance __len = __last - __first;
-  _Distance __parent = (__len - 2)/2;
-    
-  while (true) {
-    __adjust_heap(__first, __parent, __len, _Tp(*(__first + __parent)),
-                  __comp);
-    if (__parent == 0) return;
-    __parent--;
-  }
-}
-
-template <class _RandomAccessIterator, class _Compare>
-void 
-make_heap(_RandomAccessIterator __first, 
-          _RandomAccessIterator __last, _Compare __comp)
-{
-  __make_heap(__first, __last, __comp,
-              _STLP_VALUE_TYPE(__first, _RandomAccessIterator), _STLP_DISTANCE_TYPE(__first, _RandomAccessIterator));
-}
-
-_STLP_END_NAMESPACE
-
-#endif /*  _STLP_HEAP_C */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_heap.h b/src/STLport/stl/_heap.h
deleted file mode 100644
index fbf6337..0000000
--- a/src/STLport/stl/_heap.h
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- * Copyright (c) 1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_HEAP_H
-#define _STLP_INTERNAL_HEAP_H
-
-#ifndef _STLP_CONFIG_H
-#include <stl/_config.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-// Heap-manipulation functions: push_heap, pop_heap, make_heap, sort_heap.
-
-template <class _RandomAccessIterator>
-void 
-push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last);
-
-
-template <class _RandomAccessIterator, class _Compare>
-void 
-push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
-          _Compare __comp);
-
-template <class _RandomAccessIterator, class _Distance, class _Tp>
-void 
-__adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex,
-              _Distance __len, _Tp __val);
-
-template <class _RandomAccessIterator, class _Tp, class _Distance>
-inline void 
-__pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
-           _RandomAccessIterator __result, _Tp __val, _Distance*)
-{
-  *__result = *__first;
-  __adjust_heap(__first, _Distance(0), _Distance(__last - __first), __val);
-}
-
-template <class _RandomAccessIterator>
-void pop_heap(_RandomAccessIterator __first, 
-	      _RandomAccessIterator __last);
-
-template <class _RandomAccessIterator, class _Distance,
-          class _Tp, class _Compare>
-void
-__adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex,
-              _Distance __len, _Tp __val, _Compare __comp);
-
-template <class _RandomAccessIterator, class _Tp, class _Compare, 
-          class _Distance>
-inline void 
-__pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
-           _RandomAccessIterator __result, _Tp __val, _Compare __comp,
-           _Distance*)
-{
-  *__result = *__first;
-  __adjust_heap(__first, _Distance(0), _Distance(__last - __first), 
-                __val, __comp);
-}
-
-template <class _RandomAccessIterator, class _Compare>
-void 
-pop_heap(_RandomAccessIterator __first,
-         _RandomAccessIterator __last, _Compare __comp);
-
-template <class _RandomAccessIterator>
-void 
-make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last);
-
-template <class _RandomAccessIterator, class _Compare>
-void 
-make_heap(_RandomAccessIterator __first, 
-          _RandomAccessIterator __last, _Compare __comp);
-
-template <class _RandomAccessIterator>
-_STLP_INLINE_LOOP
-void sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
-{
-  while (__last - __first > 1)
-    pop_heap(__first, __last--);
-}
-
-template <class _RandomAccessIterator, class _Compare>
-_STLP_INLINE_LOOP
-void 
-sort_heap(_RandomAccessIterator __first,
-          _RandomAccessIterator __last, _Compare __comp)
-{
-  while (__last - __first > 1)
-    pop_heap(__first, __last--, __comp);
-}
-
-_STLP_END_NAMESPACE
-
-# if !defined (_STLP_LINK_TIME_INSTANTIATION)
-#  include <stl/_heap.c>
-# endif
-
-#endif /* _STLP_INTERNAL_HEAP_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_ios.c b/src/STLport/stl/_ios.c
deleted file mode 100644
index 04076f0..0000000
--- a/src/STLport/stl/_ios.c
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-#ifndef _STLP_IOS_C
-#define _STLP_IOS_C
-
-#ifndef _STLP_INTERNAL_IOS_H
-# include <stl/_ios.h>
-#endif
-
-#if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION)
-
-#ifndef _STLP_INTERNAL_STREAMBUF
-# include <stl/_streambuf.h>
-#endif
-
-#ifndef _STLP_INTERNAL_NUMPUNCT_H
-# include <stl/_numpunct.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-// basic_ios<>'s non-inline member functions
-
-// Public constructor, taking a streambuf.
-template <class _CharT, class _Traits>
-basic_ios<_CharT, _Traits>
-  ::basic_ios(basic_streambuf<_CharT, _Traits>* __streambuf)
-    : ios_base(),
-      _M_fill(_STLP_NULL_CHAR_INIT(_CharT)), _M_streambuf(0), _M_tied_ostream(0)
-{
-  init(__streambuf);
-}
-
-template <class _CharT, class _Traits>
-basic_streambuf<_CharT, _Traits>*
-basic_ios<_CharT, _Traits>::rdbuf(basic_streambuf<_CharT, _Traits>* __buf)
-{
-  basic_streambuf<_CharT, _Traits>* __tmp = _M_streambuf;
-  _M_streambuf = __buf;
-  this->clear();
-  return __tmp;
-}
-
-template <class _CharT, class _Traits>
-basic_ios<_CharT, _Traits>&
-basic_ios<_CharT, _Traits>::copyfmt(const basic_ios<_CharT, _Traits>& __x)
-{
-  _M_invoke_callbacks(erase_event);
-  _M_copy_state(__x);           // Inherited from ios_base.
-  _M_fill = __x._M_fill;
-  _M_tied_ostream = __x._M_tied_ostream;
-  _M_invoke_callbacks(copyfmt_event);
-  this->_M_set_exception_mask(__x.exceptions());
-  return *this;
-}
-
-template <class _CharT, class _Traits>
-locale basic_ios<_CharT, _Traits>::imbue(const locale& __loc)
-{
-  locale __tmp = ios_base::imbue(__loc);
-
-  if (_M_streambuf)
-    _M_streambuf->pubimbue(__loc);
-
-  // no throwing here
-  this->_M_cached_ctype = __loc._M_get_facet(ctype<char_type>::id) ;
-  this->_M_cached_numpunct = __loc._M_get_facet(numpunct<char_type>::id) ;
-  this->_M_cached_grouping = ((numpunct<char_type>*)_M_cached_numpunct)->grouping() ;
-  return __tmp;
-}
-
-// Protected constructor and initialization functions. The default
-// constructor creates an uninitialized basic_ios, and init() initializes
-// all of the members to the values in Table 89 of the C++ standard.
-
-template <class _CharT, class _Traits>
-basic_ios<_CharT, _Traits>::basic_ios()
-  : ios_base(),
-    _M_fill(_STLP_NULL_CHAR_INIT(_CharT)), _M_streambuf(0), _M_tied_ostream(0)
-{}
-
-template <class _CharT, class _Traits>
-void
-basic_ios<_CharT, _Traits>::init(basic_streambuf<_CharT, _Traits>* __sb)
-{
-  this->rdbuf(__sb);
-  this->imbue(locale());
-  this->tie(0);
-  this->_M_set_exception_mask(ios_base::goodbit);
-  this->_M_clear_nothrow(__sb != 0 ? ios_base::goodbit : ios_base::badbit);
-  ios_base::flags(ios_base::skipws | ios_base::dec);
-  ios_base::width(0);
-  ios_base::precision(6);
-  this->fill(widen(' '));
-  // We don't need to worry about any of the three arrays: they are
-  // initialized correctly in ios_base's constructor.
-}
-
-// This is never called except from within a catch clause.
-template <class _CharT, class _Traits>
-void basic_ios<_CharT, _Traits>::_M_handle_exception(ios_base::iostate __flag)
-{
-  this->_M_setstate_nothrow(__flag);
-  if (this->_M_get_exception_mask() & __flag)
-    _STLP_RETHROW;
-}
-
-_STLP_END_NAMESPACE
-
-#endif /* defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) */
-
-#endif /* _STLP_IOS_C */
diff --git a/src/STLport/stl/_ios.h b/src/STLport/stl/_ios.h
deleted file mode 100644
index af0e5e9..0000000
--- a/src/STLport/stl/_ios.h
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-#ifndef _STLP_INTERNAL_IOS_H
-#define _STLP_INTERNAL_IOS_H
-
-
-#ifndef _STLP_IOS_BASE_H
-# include <stl/_ios_base.h>
-#endif
-
-#ifndef _STLP_INTERNAL_CTYPE_H
-# include <stl/_ctype.h>
-#endif
-#ifndef _STLP_INTERNAL_NUMPUNCT_H
-# include <stl/_numpunct.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-// ----------------------------------------------------------------------
-
-// Class basic_ios, a subclass of ios_base.  The only important difference
-// between the two is that basic_ios is a class template, parameterized
-// by the character type.  ios_base exists to factor out all of the
-// common properties that don't depend on the character type.
-
-// The second template parameter, _Traits, defaults to char_traits<_CharT>.
-// The default is declared in header <iosfwd>, and it isn't declared here
-// because C++ language rules do not allow it to be declared twice.
-
-template <class _CharT, class _Traits>
-class basic_ios : public ios_base {
-  friend class ios_base;
-public:                         // Synonyms for types.
-  typedef _CharT                     char_type;
-  typedef typename _Traits::int_type int_type;
-  typedef typename _Traits::pos_type pos_type;
-  typedef typename _Traits::off_type off_type;
-  typedef _Traits                    traits_type;
-
-public:                         // Constructor, destructor.
-  explicit basic_ios(basic_streambuf<_CharT, _Traits>* __streambuf);
-  virtual ~basic_ios() {}
-
-public:                         // Members from clause 27.4.4.2
-  basic_ostream<_CharT, _Traits>* tie() const {
-    return _M_tied_ostream;
-  }
-  basic_ostream<_CharT, _Traits>*
-  tie(basic_ostream<char_type, traits_type>* __new_tied_ostream) {
-    basic_ostream<char_type, traits_type>* __tmp = _M_tied_ostream;
-    _M_tied_ostream = __new_tied_ostream;
-    return __tmp;
-  }
-
-  basic_streambuf<_CharT, _Traits>* rdbuf() const
-    { return _M_streambuf; }
-
-  basic_streambuf<_CharT, _Traits>*
-  rdbuf(basic_streambuf<char_type, traits_type>*);
-
-  // Copies __x's state to *this.
-  basic_ios<_CharT, _Traits>& copyfmt(const basic_ios<_CharT, _Traits>& __x);
-
-  char_type fill() const { return _M_fill; }
-  char_type fill(char_type __fill) {
-    char_type __tmp(_M_fill);
-    _M_fill = __fill;
-    return __tmp;
-  }
-
-public:                         // Members from 27.4.4.3.  These four functions
-                                // can almost be defined in ios_base.
-
-  void clear(iostate __state = goodbit) {
-    _M_clear_nothrow(this->rdbuf() ? __state : iostate(__state|ios_base::badbit));
-    _M_check_exception_mask();
-  }
-  void setstate(iostate __state) { this->clear(rdstate() | __state); }
-
-  iostate exceptions() const { return this->_M_get_exception_mask(); }
-  void exceptions(iostate __mask) {
-    this->_M_set_exception_mask(__mask);
-    this->clear(this->rdstate());
-  }
-
-public:                         // Locale-related member functions.
-  locale imbue(const locale&);
-
-  inline char narrow(_CharT, char) const ;
-  inline _CharT widen(char) const; 
-
-  // Helper function that makes testing for EOF more convenient.
-  static bool _STLP_CALL _S_eof(int_type __c) {
-    const int_type __eof = _Traits::eof();
-    return _Traits::eq_int_type(__c, __eof);
-  }
-
-protected:
-  basic_ios();
-
-  void init(basic_streambuf<_CharT, _Traits>* __streambuf);
-
-public:
-  
-  // Helper function used in istream and ostream.  It is called only from
-  // a catch clause.
-  void _M_handle_exception(ios_base::iostate __flag);
-  
-private:                        // Data members
-  char_type _M_fill;            // The fill character, used for padding.
-
-  basic_streambuf<_CharT, _Traits>* _M_streambuf;
-  basic_ostream<_CharT, _Traits>*   _M_tied_ostream;
-
-};
-
-
-template <class _CharT, class _Traits>
-inline char 
-basic_ios<_CharT, _Traits>::narrow(_CharT __c, char __default) const
-{ return ((const ctype<_CharT>*)this->_M_ctype_facet())->narrow(__c, __default); }
-
-template <class _CharT, class _Traits>
-inline _CharT 
-basic_ios<_CharT, _Traits>::widen(char __c) const
-{ 
-  return ((const ctype<_CharT>*)this->_M_ctype_facet())->widen(__c); }
-
-# if defined (_STLP_USE_TEMPLATE_EXPORT)
-_STLP_EXPORT_TEMPLATE_CLASS basic_ios<char, char_traits<char> >;
-#  if ! defined (_STLP_NO_WCHAR_T)
-_STLP_EXPORT_TEMPLATE_CLASS basic_ios<wchar_t, char_traits<wchar_t> >;
-#  endif
-# endif /* _STLP_USE_TEMPLATE_EXPORT */
-
-# if !defined (_STLP_NO_METHOD_SPECIALIZATION)
-_STLP_TEMPLATE_NULL
-inline char
-basic_ios<char, char_traits<char> >::narrow(char __c, char) const
-{
-  return __c;
-}
-
-_STLP_TEMPLATE_NULL
-inline char
-basic_ios<char, char_traits<char> >::widen(char __c) const
-{
-  return __c;
-}
-# endif /* _STLP_NO_METHOD_SPECIALIZATION */
-
-
-_STLP_END_NAMESPACE
-
-#if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION)
-#  include <stl/_ios.c>
-# endif
-
-// The following is needed to ensure that the inlined _Stl_loc_init functions
-// that ios_base::_Loc_init::_Loc_init() calls are found eventually.
-// Otherwise, undefined externs may be caused.
-
-#if defined(__BORLANDC__) && defined(_RTLDLL)
-# ifndef _STLP_INTERNAL_NUM_PUT_H
-#  include <stl/_num_put.h>
-# endif
-# ifndef _STLP_INTERNAL_NUM_GET_H
-#   include <stl/_num_get.h>
-# endif
-# ifndef _STLP_INTERNAL_MONETARY_H
-#  include <stl/_monetary.h>
-# endif
-# ifndef _STLP_INTERNAL_TIME_FACETS_H
-#  include <stl/_time_facets.h>
-# endif
-#endif
-
-#endif /* _STLP_IOS */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/stl/_ios_base.h b/src/STLport/stl/_ios_base.h
deleted file mode 100644
index e7ef38e..0000000
--- a/src/STLport/stl/_ios_base.h
+++ /dev/null
@@ -1,403 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-#ifndef _STLP_IOS_BASE_H
-#define _STLP_IOS_BASE_H
-
-#ifndef _STLP_STDEXCEPT
-#include <stdexcept>
-#endif
-#ifndef _STLP_UTILITY
-#include <utility>
-#endif
-#ifndef _STLP_INTERNAL_LOCALE_H
-#include <stl/_locale.h>
-#endif
-#ifndef _STLP_STRING_H
-# include <stl/_string.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-// ----------------------------------------------------------------------
-
-// Class ios_base.  This is the base class of the ios hierarchy, which
-// includes basic_istream and basic_ostream.  Classes in the ios
-// hierarchy are actually quite simple: they are just glorified
-// wrapper classes.  They delegate buffering and physical character
-// manipulation to the streambuf classes, and they delegate most
-// formatting tasks to a locale.
-
-class _STLP_CLASS_DECLSPEC ios_base {
-public:
-  
-  class _STLP_CLASS_DECLSPEC failure : public __Named_exception {
-  public:
-    explicit failure(const string&);
-    virtual ~failure() _STLP_NOTHROW_INHERENTLY;
-  };
-
-  typedef int fmtflags;
-  typedef int iostate;
-  typedef int openmode;
-  typedef int seekdir;
-
-# ifndef _STLP_NO_ANACHRONISMS
-  typedef fmtflags fmt_flags;
-# endif
-
-  // Formatting flags.
-# ifdef _STLP_STATIC_CONST_INIT_BUG
-  enum  {
-# else
-  // boris : type for all those constants is int   
-  static const int
-# endif
-    left       = 0x0001,
-    right      = 0x0002,
-    internal   = 0x0004,
-    dec        = 0x0008,
-    hex        = 0x0010,
-    oct        = 0x0020,
-    fixed      = 0x0040,
-    scientific = 0x0080,
-    boolalpha  = 0x0100,
-    showbase   = 0x0200,
-    showpoint  = 0x0400,
-    showpos    = 0x0800,
-    skipws     = 0x1000,
-    unitbuf    = 0x2000,
-    uppercase  = 0x4000,
-    adjustfield = left | right | internal,
-    basefield   = dec | hex | oct,
-    floatfield  = scientific | fixed,
-    
-    // State flags.
-    goodbit = 0x00,
-    badbit  = 0x01,
-    eofbit  = 0x02,
-    failbit = 0x04,
-    
-    // Openmode flags.
-    __default_mode = 0x0, /* implementation detail */
-    app    = 0x01,
-    ate    = 0x02,
-    binary = 0x04,
-    in     = 0x08,
-    out    = 0x10,
-    trunc  = 0x20,
-    
-    // Seekdir flags
-    
-    beg = 0x01,
-    cur = 0x02,
-    end = 0x04
-# ifdef _STLP_STATIC_CONST_INIT_BUG
-  }
-# endif
-  ;
-
-public:                         // Flag-manipulation functions.
-  fmtflags flags() const { return _M_fmtflags; }
-  fmtflags flags(fmtflags __flags) {
-    fmtflags __tmp = _M_fmtflags;
-    _M_fmtflags = __flags;
-    return __tmp;
-  }
-
-  fmtflags setf(fmtflags __flag) {
-    fmtflags __tmp = _M_fmtflags;
-    _M_fmtflags |= __flag;
-    return __tmp;
-  }
-  fmtflags setf(fmtflags __flag, fmtflags __mask) {
-    fmtflags __tmp = _M_fmtflags;
-    _M_fmtflags &= ~__mask;
-    _M_fmtflags |= __flag & __mask;
-    return __tmp;
-  }
-  void unsetf(fmtflags __mask) { _M_fmtflags &= ~__mask; }
-
-  streamsize precision() const { return _M_precision; }
-  streamsize precision(streamsize __newprecision) {
-    streamsize __tmp = _M_precision;
-    _M_precision = __newprecision;
-    return __tmp;
-  }
-
-  streamsize width() const { return _M_width; }
-  streamsize width(streamsize __newwidth) {
-    streamsize __tmp = _M_width;
-    _M_width = __newwidth;
-    return __tmp;
-  }
-
-public:                         // Locales
-  locale imbue(const locale&);
-  locale getloc() const { return _M_locale; }
-
-public:                         // Auxiliary storage.
-  static int _STLP_CALL xalloc();
-  long&  iword(int __index);
-  void*& pword(int __index);
-
-public:                         // Destructor.
-  virtual ~ios_base();
-
-public:                         // Callbacks.
-  enum event { erase_event, imbue_event, copyfmt_event };
-  typedef void (*event_callback)(event, ios_base&, int __index);
-  void register_callback(event_callback __fn, int __index);
-
-public:                         // This member function affects only
-                                // the eight predefined ios objects:
-                                // cin, cout, etc.
-  static bool _STLP_CALL sync_with_stdio(bool __sync = true);
-
-public:                         // The C++ standard requires only that these
-                                // member functions be defined in basic_ios.
-                                // We define them in the non-template
-                                // base class to avoid code duplication.
-  operator void*() const { return !fail() ? (void*) __CONST_CAST(ios_base*,this) : (void*) 0; }
-  bool operator!() const { return fail(); }
-
-  iostate rdstate() const { return _M_iostate; }
-
-  bool good() const { return _M_iostate == 0; }
-  bool eof() const { return (_M_iostate & eofbit) != 0; }
-  bool fail() const { return (_M_iostate & (failbit | badbit)) != 0; }
-  bool bad() const { return (_M_iostate & badbit) != 0; }
-
-protected:                      // The functional protected interface.
-
-  // Copies the state of __x to *this.  This member function makes it
-  // possible to implement basic_ios::copyfmt without having to expose
-  // ios_base's private data members.  Does not copy _M_exception_mask
-  // or _M_iostate.
-  void _M_copy_state(const ios_base& __x);
-
-  void _M_setstate_nothrow(iostate __state) { _M_iostate |= __state; }
-  void _M_clear_nothrow(iostate __state) { _M_iostate = __state; }
-  iostate _M_get_exception_mask() const { return _M_exception_mask; }
-  void _M_set_exception_mask(iostate __mask) { _M_exception_mask = __mask; }
-  void _M_check_exception_mask() { 
-    if (_M_iostate & _M_exception_mask)
-      _M_throw_failure(); 
-  }
-
-  void _M_invoke_callbacks(event);
-  void _M_throw_failure();
-
-  ios_base();                   // Default constructor.
-
-protected:                        // Initialization of the I/O system
-  static void _STLP_CALL _S_initialize();
-  static void _STLP_CALL _S_uninitialize();
-  static bool _S_was_synced;
-  
-private:                        // Invalidate the copy constructor and
-                                // assignment operator.
-  ios_base(const ios_base&);
-  void operator=(const ios_base&);
-
-private:                        // Data members.
-
-  fmtflags _M_fmtflags;         // Flags
-  iostate _M_iostate;
-  openmode _M_openmode;
-  seekdir _M_seekdir;
-  iostate _M_exception_mask;
-
-  streamsize _M_precision;
-  streamsize _M_width;
-
-  locale _M_locale;
-
-  pair<event_callback, int>* _M_callbacks;
-  size_t _M_num_callbacks;      // Size of the callback array.
-  size_t _M_callback_index;     // Index of the next available callback;
-                                // initially zero.
-
-  long* _M_iwords;              // Auxiliary storage.  The count is zero
-  size_t _M_num_iwords;         // if and only if the pointer is null.
-
-  void** _M_pwords;
-  size_t _M_num_pwords;
-
-  static int _S_index;
-
-protected:
-  // Cached copies of the curent locale's facets.  Set by init() and imbue().
-  locale::facet* _M_cached_ctype;
-  locale::facet* _M_cached_numpunct;
-  string         _M_cached_grouping;
-public:
-  // Equivalent to &use_facet< Facet >(getloc()), but faster.
-  const locale::facet* _M_ctype_facet() const { return _M_cached_ctype; }
-  const locale::facet* _M_numpunct_facet() const { return _M_cached_numpunct; }
-  const string&  _M_grouping() const { return _M_cached_grouping; }
-public:
-
-  // ----------------------------------------------------------------------
-  // Nested initializer class.  This is an implementation detail, but it's
-  // prescribed by the standard.  The static initializer object (on 
-  // implementations where such a thing is required) is declared in
-  // <iostream>
-  
-  class _STLP_CLASS_DECLSPEC Init {
-  public:
-    Init();
-    ~Init();
-  private:
-    static long _S_count;
-    friend class ios_base;
-  };
-
-  // this class is needed to ensure locale initialization w/o <iostream> inclusion
-  class _STLP_CLASS_DECLSPEC _Loc_init {
-  public:
-    _Loc_init();
-    ~_Loc_init();
-  private:
-    static long _S_count;
-    friend class locale;
-    friend class ios_base;
-  };
-
-  friend class Init;
-
-public:
-# ifndef _STLP_NO_ANACHRONISMS
-  //  31.6  Old iostreams members                         [depr.ios.members]
-  typedef iostate  io_state;
-  typedef openmode open_mode;
-  typedef seekdir  seek_dir;
-  typedef _STLP_STD::streamoff  streamoff;
-  typedef _STLP_STD::streampos  streampos;
-# endif  
-};
-
-// ----------------------------------------------------------------------
-// ios_base manipulator functions, from section 27.4.5 of the C++ standard.
-// All of them are trivial one-line wrapper functions.
-
-// fmtflag manipulators, section 27.4.5.1
-inline ios_base& _STLP_CALL boolalpha(ios_base& __s)
-  { __s.setf(ios_base::boolalpha); return __s;}
-
-inline ios_base& _STLP_CALL noboolalpha(ios_base& __s)
-  { __s.unsetf(ios_base::boolalpha); return __s;}
-
-inline ios_base& _STLP_CALL showbase(ios_base& __s)
-  { __s.setf(ios_base::showbase); return __s;}
-
-inline ios_base& _STLP_CALL noshowbase(ios_base& __s)
-  { __s.unsetf(ios_base::showbase); return __s;}
-
-inline ios_base& _STLP_CALL showpoint(ios_base& __s)
-  { __s.setf(ios_base::showpoint); return __s;}
-
-inline ios_base& _STLP_CALL noshowpoint(ios_base& __s)
-  { __s.unsetf(ios_base::showpoint); return __s;}
-
-inline ios_base& _STLP_CALL showpos(ios_base& __s)
-  { __s.setf(ios_base::showpos); return __s;}
-
-inline ios_base& _STLP_CALL noshowpos(ios_base& __s) 
-  { __s.unsetf(ios_base::showpos); return __s;}
-
-inline ios_base& _STLP_CALL skipws(ios_base& __s)
-  { __s.setf(ios_base::skipws); return __s;}
-
-inline ios_base& _STLP_CALL noskipws(ios_base& __s)
-  { __s.unsetf(ios_base::skipws); return __s;}
-
-inline ios_base& _STLP_CALL uppercase(ios_base& __s)
-  { __s.setf(ios_base::uppercase); return __s;}
-
-inline ios_base& _STLP_CALL nouppercase(ios_base& __s)
-  { __s.unsetf(ios_base::uppercase); return __s;}
-
-inline ios_base& _STLP_CALL unitbuf(ios_base& __s)
-  { __s.setf(ios_base::unitbuf); return __s;}
-
-inline ios_base& _STLP_CALL nounitbuf(ios_base& __s)
-  { __s.unsetf(ios_base::unitbuf); return __s;}
-
-
-// adjustfield manipulators, section 27.4.5.2
-inline ios_base& _STLP_CALL internal(ios_base& __s)
-  { __s.setf(ios_base::internal, ios_base::adjustfield); return __s; }
-
-inline ios_base& _STLP_CALL left(ios_base& __s)
-  { __s.setf(ios_base::left, ios_base::adjustfield); return __s; }
-
-inline ios_base& _STLP_CALL right(ios_base& __s)
-  { __s.setf(ios_base::right, ios_base::adjustfield); return __s; }
-
-// basefield manipulators, section 27.4.5.3
-inline ios_base& _STLP_CALL dec(ios_base& __s)
-  { __s.setf(ios_base::dec, ios_base::basefield); return __s; }
-
-inline ios_base& _STLP_CALL hex(ios_base& __s) 
-  { __s.setf(ios_base::hex, ios_base::basefield); return __s; }
-
-inline ios_base& _STLP_CALL oct(ios_base& __s)
-  { __s.setf(ios_base::oct, ios_base::basefield); return __s; }
-
-
-// floatfield manipulators, section 27.4.5.3
-inline ios_base& _STLP_CALL fixed(ios_base& __s)
-  { __s.setf(ios_base::fixed, ios_base::floatfield); return __s; }
-
-inline ios_base& _STLP_CALL scientific(ios_base& __s)
-  { __s.setf(ios_base::scientific, ios_base::floatfield); return __s; }
-
-#if defined(__BORLANDC__) && defined(_RTLDLL)
-
-long ios_base::_Loc_init::_S_count = 0;
-
-void _STLP_CALL _Stl_loc_init_num_put();
-void _STLP_CALL _Stl_loc_init_num_get();
-void _STLP_CALL _Stl_loc_init_monetary();
-void _STLP_CALL _Stl_loc_init_time_facets();
-
-inline ios_base::_Loc_init::_Loc_init() {
-  if (_S_count++ == 0) {
-      _Stl_loc_init_num_put();
-      _Stl_loc_init_num_get();
-      _Stl_loc_init_monetary();
-      _Stl_loc_init_time_facets();
-      locale::_S_initialize();
-  }
-}
-
-inline ios_base::_Loc_init::~_Loc_init() {
-    if (--_S_count == 0)
-      locale::_S_uninitialize();
-}
-
-#endif /* __BORLANDC__ */
-
-_STLP_END_NAMESPACE
-
-#endif /* _STLP_IOS_BASE */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/stl/_iosfwd.h b/src/STLport/stl/_iosfwd.h
deleted file mode 100644
index 848fa4b..0000000
--- a/src/STLport/stl/_iosfwd.h
+++ /dev/null
@@ -1,159 +0,0 @@
-# ifndef _STLP_INTERNAL_IOSFWD
-#  define _STLP_INTERNAL_IOSFWD
-
-#if defined(__sgi) && !defined(__GNUC__) && !defined(_STANDARD_C_PLUS_PLUS)
-#error This header file requires the -LANG:std option
-#endif
-
-// This file provides forward declarations of the most important I/O
-// classes.  Note that almost all of those classes are class templates,
-// with default template arguments.  According to the C++ standard, 
-// if a class template is declared more than once in the same scope
-// then only one of those declarations may have default arguments.  
-
-// <iosfwd> contains the same declarations as other headers, and including
-// both <iosfwd> and (say) <iostream> is permitted.  This means that only
-// one header may contain those default template arguments.
-
-// In this implementation, the declarations in <iosfwd> contain default
-// template arguments.  All of the other I/O headers include <iosfwd>.
-
-#ifndef _STLP_CHAR_TRAITS_H
-# include <stl/char_traits.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-class _STLP_CLASS_DECLSPEC ios_base;
-
-template <class _CharT, __DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
-class basic_ios;
-
-template <class _CharT, __DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
-class basic_streambuf;
-
-template <class _CharT, __DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
-class basic_istream;
-
-template <class _CharT, __DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
-class basic_ostream;
-
-template <class _CharT, __DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
-class basic_iostream;
-
-template <class _CharT, __DFL_TMPL_PARAM( _Traits , char_traits<_CharT>),
-          __DFL_TMPL_PARAM(_Allocator , allocator<_CharT>) >
-class basic_stringbuf;
-
-template <class _CharT, __DFL_TMPL_PARAM(_Traits , char_traits<_CharT>),
-          __DFL_TMPL_PARAM(_Allocator , allocator<_CharT>) >
-class basic_istringstream;
-
-template <class _CharT, __DFL_TMPL_PARAM(_Traits , char_traits<_CharT>),
-          __DFL_TMPL_PARAM(_Allocator , allocator<_CharT>) >
-class basic_ostringstream;
-
-template <class _CharT, __DFL_TMPL_PARAM(_Traits , char_traits<_CharT>),
-          __DFL_TMPL_PARAM(_Allocator , allocator<_CharT>) >
-class basic_stringstream;
-
-template <class _CharT, __DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
-class basic_filebuf;
-
-template <class _CharT, __DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
-class basic_ifstream;
-
-template <class _CharT, __DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
-class basic_ofstream;
-
-template <class _CharT, __DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
-class basic_fstream;
-
-template <class _CharT, __DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
-class istreambuf_iterator;
-
-template <class _CharT, __DFL_TMPL_PARAM(_Traits , char_traits<_CharT>) >
-class ostreambuf_iterator;
-
-typedef basic_ios<char, char_traits<char> >    ios;
-
-# ifndef _STLP_NO_WCHAR_T
-typedef basic_ios<wchar_t, char_traits<wchar_t> > wios;
-# endif
-
-// Forward declaration of class locale, and of the most important facets.
-class locale;
-# ifdef _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS
-template <class _Facet>
-struct _Use_facet {
-  const locale& __loc;
-  _Use_facet(const locale& __p_loc) : __loc(__p_loc) {}
-  inline const _Facet& operator *() const;
-};
-# define use_facet *_Use_facet
-# else
-template <class _Facet> inline const _Facet& use_facet(const locale&);
-# endif
-
-template <class _CharT> class ctype;
-template <class _CharT> class ctype_byname;
-template <class _CharT> class collate;
-template <class _CharT> class collate_byname;
-
-_STLP_TEMPLATE_NULL class _STLP_CLASS_DECLSPEC ctype<char>;
-_STLP_TEMPLATE_NULL class _STLP_CLASS_DECLSPEC ctype_byname<char>;
-_STLP_TEMPLATE_NULL class _STLP_CLASS_DECLSPEC collate<char>;
-_STLP_TEMPLATE_NULL class _STLP_CLASS_DECLSPEC collate_byname<char>;
-
-#  ifndef _STLP_NO_WCHAR_T
-_STLP_TEMPLATE_NULL class _STLP_CLASS_DECLSPEC ctype<wchar_t>;
-_STLP_TEMPLATE_NULL class _STLP_CLASS_DECLSPEC ctype_byname<wchar_t>;
-_STLP_TEMPLATE_NULL class _STLP_CLASS_DECLSPEC collate<wchar_t>;
-_STLP_TEMPLATE_NULL class _STLP_CLASS_DECLSPEC collate_byname<wchar_t>;
-#  endif
-
-# if !(defined (__SUNPRO_CC) && __SUNPRO_CC < 0x500 ) && !defined(_STLP_WINCE)
-// Typedefs for ordinary (narrow-character) streams.
-_STLP_TEMPLATE_NULL class _STLP_CLASS_DECLSPEC basic_streambuf<char, char_traits<char> >;
-# endif
-
-typedef basic_istream<char, char_traits<char> >   istream;
-typedef basic_ostream<char, char_traits<char> >   ostream;
-typedef basic_iostream<char, char_traits<char> >  iostream;
-typedef basic_streambuf<char,char_traits<char> > streambuf;
-
-typedef basic_stringbuf<char, char_traits<char>, allocator<char> >     stringbuf;
-typedef basic_istringstream<char, char_traits<char>, allocator<char> > istringstream;
-typedef basic_ostringstream<char, char_traits<char>, allocator<char> > ostringstream;
-typedef basic_stringstream<char, char_traits<char>, allocator<char> >  stringstream;
-
-typedef basic_filebuf<char, char_traits<char> >  filebuf;
-typedef basic_ifstream<char, char_traits<char> > ifstream;
-typedef basic_ofstream<char, char_traits<char> > ofstream;
-typedef basic_fstream<char, char_traits<char> >  fstream;
-
-# ifndef _STLP_NO_WCHAR_T
-// Typedefs for wide-character streams.
-typedef basic_streambuf<wchar_t, char_traits<wchar_t> > wstreambuf;
-typedef basic_istream<wchar_t, char_traits<wchar_t> >   wistream;
-typedef basic_ostream<wchar_t, char_traits<wchar_t> >   wostream;
-typedef basic_iostream<wchar_t, char_traits<wchar_t> >  wiostream;
-
-typedef basic_stringbuf<wchar_t, char_traits<wchar_t>, allocator<wchar_t> >     wstringbuf;
-typedef basic_istringstream<wchar_t, char_traits<wchar_t>, allocator<wchar_t> > wistringstream;
-typedef basic_ostringstream<wchar_t, char_traits<wchar_t>, allocator<wchar_t> > wostringstream;
-typedef basic_stringstream<wchar_t, char_traits<wchar_t>, allocator<wchar_t> >  wstringstream;
-
-typedef basic_filebuf<wchar_t, char_traits<wchar_t> >  wfilebuf;
-typedef basic_ifstream<wchar_t, char_traits<wchar_t> > wifstream;
-typedef basic_ofstream<wchar_t, char_traits<wchar_t> > wofstream;
-typedef basic_fstream<wchar_t, char_traits<wchar_t> >  wfstream;
-# endif
-
-_STLP_END_NAMESPACE
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_istream.c b/src/STLport/stl/_istream.c
deleted file mode 100644
index 234bba7..0000000
--- a/src/STLport/stl/_istream.c
+++ /dev/null
@@ -1,1430 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-#ifndef _STLP_ISTREAM_C
-#define _STLP_ISTREAM_C
-
-#ifndef _STLP_INTERNAL_ISTREAM_H
-# include <stl/_istream.h>
-#endif
-
-# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION)
-
-#ifndef _STLP_LIMITS_H
-# include <stl/_limits.h>
-#endif
-
-#ifndef _STLP_INTERNAL_NUM_GET_H
-# include <stl/_num_get.h>
-#endif
-
-# if defined ( _STLP_NESTED_TYPE_PARAM_BUG )
-// no wchar_t is supported for this mode
-# define __BIS_int_type__ int
-# define __BIS_pos_type__ streampos
-# define __BIS_off_type__ streamoff
-# else
-# define __BIS_int_type__ _STLP_TYPENAME_ON_RETURN_TYPE basic_istream<_CharT, _Traits>::int_type
-# define __BIS_pos_type__ _STLP_TYPENAME_ON_RETURN_TYPE basic_istream<_CharT, _Traits>::pos_type
-# define __BIS_off_type__ _STLP_TYPENAME_ON_RETURN_TYPE basic_istream<_CharT, _Traits>::off_type
-# endif
-
-_STLP_BEGIN_NAMESPACE
-
-//----------------------------------------------------------------------
-// Function object structs used by some member functions.
-
-template <class _Traits>
-struct _Is_not_wspace {
-  typedef typename _Traits::char_type argument_type;
-  typedef bool                        result_type;
-
-  const ctype<argument_type>* _M_ctype;
-
-  _Is_not_wspace(const ctype<argument_type>* __c_type) : _M_ctype(__c_type) {}
-  bool operator()(argument_type __c) const
-    { return !_M_ctype->is(ctype_base::space, __c); }
-};
-
-template <class _Traits>
-struct _Is_wspace_null {
-  typedef typename _Traits::char_type argument_type;
-  typedef bool                        result_type;
-
-  const ctype<argument_type>* _M_ctype;
-
-  _Is_wspace_null(const ctype<argument_type>* __c_type) : _M_ctype(__c_type) {}
-  bool operator()(argument_type __c) const {
-    return _Traits::eq(__c, argument_type()) || 
-           _M_ctype->is(ctype_base::space, __c);
-  }
-};
-
-template <class _Traits>
-struct _Scan_for_wspace {
-  typedef typename _Traits::char_type  char_type;
-  typedef char_type*                   first_argument_type;
-  typedef char_type*                   second_argument_type;
-  typedef char_type*                   result_type;
-
-  const ctype<char_type>* _M_ctype;
-
-  _Scan_for_wspace(const ctype<char_type>* __ctype) : _M_ctype(__ctype) {}
-  const char_type*
-  operator()(const char_type* __first, const char_type* __last) const {
-    return _M_ctype->scan_is(ctype_base::space, __first, __last);
-  }
-};
-
-template <class _Traits>
-struct _Scan_wspace_null {
-  typedef typename _Traits::char_type  char_type;
-  typedef char_type*                   first_argument_type;
-  typedef char_type*                   second_argument_type;
-  typedef char_type*                   result_type;
-
-  const ctype<char_type>* _M_ctype;
-
-  _Scan_wspace_null(const ctype<char_type>* __c_type) : _M_ctype(__c_type) {}
-  const char_type*
-  operator()(const char_type* __first, const char_type* __last) const {
-    __last = find_if(__first, __last,
-                     _Eq_char_bound<_Traits>(char_type()));
-    return _M_ctype->scan_is(ctype_base::space, __first, __last);
-  }
-};
-
-template <class _Traits>
-struct _Scan_for_not_wspace {
-  typedef typename _Traits::char_type  char_type;
-  typedef char_type*                   first_argument_type;
-  typedef char_type*                   second_argument_type;
-  typedef char_type*                   result_type;
-
-  const ctype<char_type>* _M_ctype;
-
-  _Scan_for_not_wspace(const ctype<char_type>* __c_type) : _M_ctype(__c_type) {}
-  const char_type*
-  operator()(const char_type* __first, const char_type* __last) const {
-    return _M_ctype->scan_not(ctype_base::space, __first, __last);
-  }
-};
-
-template <class _Traits>
-struct _Scan_for_char_val
-{
-  typedef typename _Traits::char_type char_type;
-  typedef char_type*                  first_argument_type;
-  typedef char_type*                  second_argument_type;
-  typedef char_type*                  result_type;
-
-  char_type _M_val;
-
-  _Scan_for_char_val(char_type __val) : _M_val(__val) {}
-
-  const char_type*
-  operator()(const char_type* __first, const char_type* __last) const {
-    return find_if(__first, __last, _Eq_char_bound<_Traits>(_M_val)); 
-  }
-};
-
-template <class _Traits>
-struct _Scan_for_int_val
-{
-  typedef typename _Traits::char_type char_type;
-  typedef typename _Traits::int_type  int_type;
-  typedef char_type*                  first_argument_type;
-  typedef char_type*                  second_argument_type;
-  typedef char_type*                  result_type;
-
-  int_type _M_val;
-
-  _Scan_for_int_val(int_type __val) : _M_val(__val) {}
-
-  const char_type*
-  operator()(const char_type* __first, const char_type* __last) const {
-    return find_if(__first, __last,
-                   _Eq_int_bound<_Traits>(_M_val));
-  }
-};
-
-// Helper function: try to push back a character to a streambuf, 
-// return true if the pushback succeeded.  Does not throw.
-
-template <class _CharT, class _Traits> 
-bool _STLP_CALL
-__pushback(basic_streambuf<_CharT, _Traits>* __buf, _CharT __c)
-{
-  bool ret;
-  _STLP_TRY {
-    const typename _Traits::int_type __eof = _Traits::eof();
-    ret = !_Traits::eq_int_type(__buf->sputbackc(__c), __eof);
-  }
-  _STLP_CATCH_ALL {
-    ret = false;
-  }
-  return ret;
-}
-
-template <class _CharT, class _Traits>
-basic_istream<_CharT, _Traits>& _STLP_CALL
-ws(basic_istream<_CharT, _Traits>& __is)
-{
-  typedef typename basic_istream<_CharT, _Traits>::sentry      _Sentry;
-  _Sentry __sentry(__is, _No_Skip_WS()); // Don't skip whitespace.
-  if (__sentry)
-    __is._M_skip_whitespace(false);
-  return __is;
-}
-
-// Helper functions for istream<>::sentry constructor.
-template <class _CharT, class _Traits>
-bool
-_M_init_skip(basic_istream<_CharT, _Traits>& __is) {
-  if (__is.good()) {
-    if (__is.tie())
-      __is.tie()->flush();
-    
-    __is._M_skip_whitespace(true);
-  }
-  
-  if (!__is.good()) {
-    __is.setstate(ios_base::failbit);
-    return false;
-  } else
-    return true;
-}
-
-template <class _CharT, class _Traits>
-bool
-_M_init_noskip(basic_istream<_CharT, _Traits>& __is){
-  if (__is.good()) {
-    if (__is.tie())
-      __is.tie()->flush();
-    
-    if (!__is.rdbuf())
-      __is.setstate(ios_base::badbit);
-  }
-  else
-    __is.setstate(ios_base::failbit);
-  return __is.good();
-}
-
-//----------------------------------------------------------------------
-// Definitions of basic_istream<>'s noninline member functions.
-
-// Helper function for formatted input of numbers.
-template <class _CharT, class _Traits, class _Number> 
-ios_base::iostate _STLP_CALL 
-_M_get_num(basic_istream<_CharT, _Traits>& __that, _Number& __val)
-{
-  typedef typename basic_istream<_CharT, _Traits>::sentry _Sentry;
-  ios_base::iostate __err = 0;
-  _Sentry __sentry( __that );     // Skip whitespace.
-  if (__sentry) {
-    typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> > _Num_get;
-    _STLP_TRY {
-      ((const _Num_get&)use_facet<_Num_get>(__that.getloc())).get(istreambuf_iterator<_CharT, _Traits>(__that.rdbuf()),
-					0, __that, __err, __val);
-    }
-    _STLP_CATCH_ALL {
-      __that._M_handle_exception(ios_base::badbit);
-    }
-    if (__err) __that.setstate(__err);
-  }
-  return __err;
-}
-
-
-// Unformatted input
-
-template <class _CharT, class _Traits>
-__BIS_int_type__
-basic_istream<_CharT, _Traits>::peek()
-{
-  typename _Traits::int_type __tmp = _Traits::eof();
-
-  this->_M_gcount = 0;
-  sentry __sentry(*this, _No_Skip_WS());
-
-  if (__sentry) {
-    _STLP_TRY {
-      __tmp = this->rdbuf()->sgetc();
-    }
-    _STLP_CATCH_ALL {
-      this->_M_handle_exception(ios_base::badbit);
-    }
-    if (this->_S_eof(__tmp))
-      this->setstate(ios_base::eofbit);
-  }
-
-  return __tmp;
-}
-
-
-template <class _CharT, class _Traits>
-__BIS_int_type__
-basic_istream<_CharT, _Traits>::get()
-{
-  typename _Traits::int_type __tmp = _Traits::eof();
-  sentry __sentry(*this, _No_Skip_WS());
-  this->_M_gcount = 0;
-
-  if (__sentry) {
-    _STLP_TRY {
-      __tmp = this->rdbuf()->sbumpc();
-    }
-    _STLP_CATCH_ALL {
-      this->_M_handle_exception(ios_base::badbit);
-    }
-
-    if (!this->_S_eof(__tmp))
-      this->_M_gcount = 1;
-  }
-
-  if (_M_gcount == 0)
-    this->setstate(ios_base::eofbit | ios_base::failbit);
-
-  return __tmp;
-}
-
-template <class _CharT, class _Traits>
-basic_istream<_CharT, _Traits>& 
-basic_istream<_CharT, _Traits>::get(_CharT& __c)
-{
-  sentry __sentry(*this, _No_Skip_WS());
-  this->_M_gcount = 0;
-
-  if (__sentry) {
-    typename _Traits::int_type __tmp = _Traits::eof();
-    _STLP_TRY {
-      __tmp = this->rdbuf()->sbumpc();
-    }
-    _STLP_CATCH_ALL {
-      this->_M_handle_exception(ios_base::badbit);
-    }
-
-    if (!this->_S_eof(__tmp)) {
-      this->_M_gcount = 1;
-      __c = _Traits::to_char_type(__tmp);
-    }
-  }
-
-  if (this->_M_gcount == 0)
-    this->setstate(ios_base::eofbit | ios_base::failbit);
-
-  return *this;
-}
-
-
-
-// Read characters and discard them.  The standard specifies a single
-// function with two arguments, each with a default.  We instead use
-// three overloded functions, because it's possible to implement the
-// first two more efficiently than the fully general third version.
-template <class _CharT, class _Traits>
-basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::ignore()
-{
-  sentry __sentry(*this, _No_Skip_WS());
-  this->_M_gcount = 0;
-
-  if (__sentry) {
-    int_type __c;
-    _STLP_TRY {
-      __c = this->rdbuf()->sbumpc();
-    }
-    _STLP_CATCH_ALL {
-      this->_M_handle_exception(ios_base::badbit);
-      return *this;
-    }
-
-    if (!this->_S_eof(__c))
-      this->_M_gcount = 1;
-    else
-      this->setstate(ios_base::eofbit);
-  }
-
-  return *this;
-}
-
-// Putback
-
-template <class _CharT, class _Traits>
-basic_istream<_CharT, _Traits>& 
-basic_istream<_CharT, _Traits>::putback(_CharT __c) {
-  this->_M_gcount = 0;
-  sentry __sentry(*this, _No_Skip_WS());
-
-  if (__sentry) {
-    typename _Traits::int_type __tmp = _Traits::eof();
-    basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf();
-//    if (!__buf || this->_S_eof(__buf->sputbackc(__c)))
-    if (__buf) {
-      _STLP_TRY {
-        __tmp = __buf->sputbackc(__c);
-      }
-      _STLP_CATCH_ALL {
-        this->_M_handle_exception(ios_base::badbit);
-      }
-    }
-    if (this->_S_eof(__tmp))
-      this->setstate(ios_base::badbit);
-  }
-  else
-    this->setstate(ios_base::failbit);
-
-  return *this;
-}
-
-template <class _CharT, class _Traits>
-basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::unget() {
-  this->_M_gcount = 0;
-
-  sentry __sentry(*this, _No_Skip_WS());
-
-  if (__sentry) {
-    basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf();
-    //     if (!__buf || _Traits::eq_int_type(__buf->sungetc(), _Traits::eof()))
-    if (__buf) {
-      _STLP_TRY {
-        _CharT __tmp;
-        __tmp = __buf->sungetc();
-        if (this->_S_eof(__tmp))
-          this->setstate(ios_base::badbit);
-      }
-      _STLP_CATCH_ALL {
-        this->_M_handle_exception(ios_base::badbit);
-      }
-    } else
-      this->setstate(ios_base::badbit);    
-  }
-  else
-    this->setstate(ios_base::failbit);
-
-  return *this;
-}
-
-// Positioning and buffer control.
-
-template <class _CharT, class _Traits>
-int basic_istream<_CharT, _Traits>::sync() {
-  sentry __sentry(*this, _No_Skip_WS());
-
-  basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf();
-  if (__buf) {
-    if (__buf->pubsync() == -1) {
-      this->setstate(ios_base::badbit);
-      return -1;
-    }
-    else
-      return 0;
-  }
-  else
-    return -1;
-}
-
-template <class _CharT, class _Traits>
-__BIS_pos_type__
-basic_istream<_CharT, _Traits>::tellg() {
-  //   sentry __sentry(*this, _No_Skip_WS());
-  basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf();
-  return (__buf && !this->fail()) ? __buf->pubseekoff(0, ios_base::cur, ios_base::in)
-    : pos_type(-1);
-}
-
-template <class _CharT, class _Traits>
-basic_istream<_CharT, _Traits>&
-basic_istream<_CharT, _Traits>::seekg(pos_type __pos) {
-  sentry __sentry(*this, _No_Skip_WS());
-
-  basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf();
-  if (!this->fail() && __buf)
-    __buf->pubseekpos(__pos, ios_base::in);
-  return *this;
-}
-
-template <class _CharT, class _Traits>
-basic_istream<_CharT, _Traits>&
-basic_istream<_CharT, _Traits>::seekg(off_type __off, ios_base::seekdir __dir)
-{
-  sentry __sentry(*this, _No_Skip_WS());
-
-  basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf();
-  if (!this->fail() && __buf)
-    __buf->pubseekoff(__off, __dir, ios_base::in);
-  return *this;
-}
-
-// Formatted input of characters and character arrays.
-
-template <class _CharT, class _Traits>
-void basic_istream<_CharT, _Traits>::_M_formatted_get(_CharT& __c)
-{
-//  typename _Traits::int_type __tmp = _Traits::eof();
-
-  sentry __sentry(*this); // Skip whitespace.
-
-  if (__sentry) {
-    typename _Traits::int_type __tmp = _Traits::eof();
-    
-    _STLP_TRY {
-      __tmp = this->rdbuf()->sbumpc();
-    }
-    _STLP_CATCH_ALL {
-      this->_M_handle_exception(ios_base::badbit);
-      return;
-    }
-
-    if (!this->_S_eof(__tmp))
-      __c = _Traits::to_char_type(__tmp);
-    else 
-      this->setstate(ios_base::eofbit | ios_base::failbit);
-  }
-}
-
-
-//---------------------------------------------------------------------------
-// istream's helper functions.
-
-// A generic function for unbuffered input.  We stop when we reach EOF,
-// or when we have extracted _Num characters, or when the function object
-// __is_delim return true.  In the last case, it extracts the character
-// for which __is_delim is true, if and only if __extract_delim is true. 
-// It appends a null character to the end of the string; this means that
-// it may store up to _Num + 1 characters.  
-//
-// __is_getline governs two corner cases: reading _Num characters without
-// encountering delim or eof (in which case failbit is set if __is_getline
-// is true); and reading _Num characters where the _Num+1'st character is
-// eof (in which case eofbit is set if __is_getline is true).
-//
-// It is assumed that __is_delim never throws.
-//
-// Return value is the number of characters extracted, including the
-// delimiter if it is extracted.  Note that the number of characaters
-// extracted isn't necessarily the same as the number stored.
-
-template < class _CharT, class _Traits, class _Is_Delim>
-streamsize _STLP_CALL 
-_M_read_unbuffered(basic_istream<_CharT, _Traits>* __that, basic_streambuf<_CharT, _Traits>* __buf,
-                       streamsize _Num, _CharT* __s,
-                       _Is_Delim __is_delim,
-                       bool __extract_delim, bool __append_null,
-                       bool __is_getline)
-{
-  streamsize __n = 0;
-  ios_base::iostate __status = 0;
-  
-  typedef typename basic_istream<_CharT, _Traits>::int_type int_type;
-  // The operations that can potentially throw are sbumpc, snextc, and sgetc.
-  _STLP_TRY {
-# if 0
-    int_type __c = __buf->sgetc();
-    while (true) {
-      if (__that->_S_eof(__c)) {
-        if (__n < _Num || __is_getline)
-          __status |= ios_base::eofbit;
-        break;
-      }
-
-      else if (__is_delim(__c)) {
-        if (__extract_delim) {  // Extract and discard current character.
-          __buf->sbumpc();
-          ++__n;
-        }
-        break;
-      }
-
-      else if (__n == _Num) {
-        if (__is_getline)
-          __status |= ios_base::failbit;
-        break;
-      }
-        
-      *__s++ = _Traits::to_char_type(__c);
-      ++__n;
-      __c = __buf->snextc();
-    }
-# else
-// int_type __c = __buf->sbumpc(); // __buf->sgetc();
-while (true) {
-
-int_type __c = __buf->sbumpc(); // sschwarz
-
-if (__that->_S_eof(__c)) {
-if (__n < _Num || __is_getline)
-__status |= ios_base::eofbit;
-break;
-}
-
-else if (__is_delim(__c)) {
-if (__extract_delim) { // Extract and discard current character.
-// __buf->sbumpc();
-++__n;
-}
-break;
-}
-
-else { // regular character
-
-*__s++ = _Traits::to_char_type(__c);
-++__n;
-
-}
-
-if (__n == _Num) {
-if (__is_getline) // didn't find delimiter as one of the _Num chars
-__status |= ios_base::failbit;
-break;
-}
-
-// *__s++ = _Traits::to_char_type(__c);
-// ++__n;
-
-}
-
-# endif
-
-  }
-  _STLP_CATCH_ALL {
-    __that->_M_handle_exception(ios_base::badbit);
-    *__s = _STLP_DEFAULT_CONSTRUCTED(_CharT);
-    return __n;
-  }
-
-  if (__append_null)
-    *__s =  _STLP_DEFAULT_CONSTRUCTED(_CharT);
-  if (__status)
-    __that->setstate(__status);    // This might throw.
-  return __n;
-}
-
-// Much like _M_read_unbuffered, but with one additional function object:
-// __scan_delim(first, last) returns the first pointer p in [first, last)
-// such that __is_delim(p) is true.  
-
-template < class _CharT, class _Traits, class _Is_Delim, class _Scan_Delim>
-streamsize _STLP_CALL 
-_M_read_buffered(basic_istream<_CharT, _Traits>* __that, basic_streambuf<_CharT, _Traits>* __buf,
-                     streamsize _Num, _CharT* __s,
-                     _Is_Delim __is_delim, _Scan_Delim __scan_delim,
-                     bool __extract_delim, bool __append_null,
-                     bool __is_getline)
-{
-  streamsize __n = 0;
-  ios_base::iostate __status = 0;
-  bool __done    = false;
-
-  _STLP_TRY {
-    while (__buf->_M_egptr() != __buf->_M_gptr() && !__done) {
-      const _CharT* __first = __buf->_M_gptr();
-      const _CharT* __last  = __buf->_M_egptr();
-      ptrdiff_t __request = _Num - __n;
-
-      const _CharT* __p  = __scan_delim(__first, __last);
-      ptrdiff_t __chunk = (min) (ptrdiff_t(__p - __first), __request);
-      _Traits::copy(__s, __first, __chunk);
-      __s += __chunk;
-      __n += __chunk;
-      __buf->_M_gbump((int)__chunk);
-
-      // We terminated by finding delim.
-      if (__p != __last && __p - __first <= __request) {
-        if (__extract_delim) {
-          __n += 1;
-          __buf->_M_gbump(1);
-        }
-        __done = true;
-      }
-
-      // We terminated by reading all the characters we were asked for.
-      else if(__n == _Num) {
-
-        // Find out if we have reached eof.  This matters for getline.
-        if (__is_getline) {
-          if (__chunk == __last - __first) {
-            if (__that->_S_eof(__buf->sgetc()))
-              __status |= ios_base::eofbit;            
-          }
-          else
-            __status |= ios_base::failbit;
-        }
-        __done   = true;
-      }
-
-      // The buffer contained fewer than _Num - __n characters.  Either we're
-      // at eof, or we should refill the buffer and try again.
-      else {
-	if (__that->_S_eof(__buf->sgetc())) {
-          __status |= ios_base::eofbit;
-          __done = true;
-        }
-      }
-    } // Close the while loop.
-  }
-  _STLP_CATCH_ALL {
-    __that->_M_handle_exception(ios_base::badbit);
-    __done = true;
-  }
-
-  if (__done) {
-    if (__append_null)
-        *__s =  _STLP_DEFAULT_CONSTRUCTED(_CharT);
-    if (__status != 0)
-      __that->setstate(__status);   // This might throw.
-    return __n;
-  }
-
-  // If execution has reached this point, then we have an empty buffer but
-  // we have not reached eof.  What that means is that the streambuf has
-  // decided to switch from buffered to unbuffered input.  We switch to
-  // to _M_read_unbuffered.
-
-  return __n + _M_read_unbuffered(__that,  __buf, _Num - __n, __s, __is_delim,
-                                  __extract_delim,__append_null,__is_getline);
-}
-
-
-
-
-template <class _CharT, class _Traits>
-basic_istream<_CharT, _Traits>&
-basic_istream<_CharT, _Traits>::get(_CharT* __s, streamsize __n,
-                                    _CharT __delim) {
-  sentry __sentry(*this, _No_Skip_WS());
-  this->_M_gcount = 0;
-
-  if (__sentry) {
-    if (__n > 0) {
-      basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf();
-
-      if (__buf->egptr() != __buf->gptr())
-        this->_M_gcount =
-          _M_read_buffered(this,  __buf, __n - 1, __s,
-                           _Eq_char_bound<_Traits>(__delim),
-                           _Scan_for_char_val<_Traits>(__delim),
-                           false, true, false);
-      else
-        this->_M_gcount =
-          _M_read_unbuffered(this,  __buf, __n - 1, __s,
-                             _Eq_char_bound<_Traits>(__delim),
-                             false, true, false);
-    }
-  }
-
-  if (this->_M_gcount == 0)
-    this->setstate(ios_base::failbit);
-
-  return *this;
-}
-
-// Getline is essentially identical to get, except that it extracts
-// the delimiter.
-template <class _CharT, class _Traits>
-basic_istream<_CharT, _Traits>&
-basic_istream<_CharT, _Traits>::getline(_CharT* __s, streamsize __n,
-                                        _CharT __delim) {
-  sentry __sentry(*this, _No_Skip_WS());
-  this->_M_gcount = 0;
-
-  if (__sentry) {
-    if (__n > 0) {
-      basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf();
-      this->_M_gcount = __buf->egptr() != __buf->gptr()
-        ? _M_read_buffered(this,  __buf, __n - 1, __s,
-                           _Eq_char_bound<_Traits>(__delim),
-                           _Scan_for_char_val<_Traits>(__delim),
-                           true, true, true)
-        : _M_read_unbuffered(this,  __buf, __n - 1, __s,
-                             _Eq_char_bound<_Traits>(__delim),
-                             true, true, true);
-    }
-  }
-
-  if (this->_M_gcount == 0)
-    this->setstate(ios_base::failbit);
-
-  return *this;
-}
-
-// Read n characters.  We don't look for any delimiter, and we don't
-// put in a terminating null character.
-template <class _CharT, class _Traits>
-basic_istream<_CharT, _Traits>&
-basic_istream<_CharT, _Traits>::read(char_type* __s, streamsize __n)
-{
-  sentry __sentry(*this, _No_Skip_WS());
-  this->_M_gcount = 0;
-
-  if (__sentry && !this->eof()) {
-    basic_streambuf<_CharT, _Traits>*__buf = this->rdbuf();
-    if (__buf->gptr() != __buf->egptr()) 
-      _M_gcount
-        = _M_read_buffered(this,  __buf, __n, __s,
-                           _Constant_unary_fun<bool, int_type>(false),
-                           _Project2nd<const _CharT*, const _CharT*>(),
-                           false, false, false);
-    else
-      _M_gcount
-        = _M_read_unbuffered(this,  __buf, __n, __s,
-                             _Constant_unary_fun<bool, int_type>(false),
-                             false, false, false);
-  }
-  else
-    this->setstate(ios_base::failbit);
-
-  if (this->eof())
-    this->setstate(ios_base::eofbit | ios_base::failbit);
-
-  return *this;
-}
-
-
-// Read n or fewer characters.  We don't look for any delimiter, and
-// we don't put in a terminating null character.
-template <class _CharT, class _Traits>
-streamsize
-basic_istream<_CharT, _Traits>::readsome(char_type* __s, streamsize __nmax)
-{
-  sentry __sentry(*this, _No_Skip_WS());
-  this->_M_gcount = 0;
-
-  if (__sentry && !this->eof() && __nmax >= 0) {
-
-    basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf();
-    streamsize __avail = __buf->in_avail();
-
-    // fbp : isn't full-blown setstate required here ?
-    if (__avail == -1)
-      this->_M_setstate_nothrow(ios_base::eofbit);
-
-    else if (__avail != 0) {
-
-      if (__buf->gptr() != __buf->egptr()) 
-        _M_gcount
-          = _M_read_buffered(this,  __buf, (min) (__avail, __nmax), __s,
-                             _Constant_unary_fun<bool, int_type>(false),
-                             _Project2nd<const _CharT*, const _CharT*>(),
-                             false, false, false);
-      else
-        _M_gcount
-          = _M_read_unbuffered(this,  __buf, (min) (__avail, __nmax), __s,
-                               _Constant_unary_fun<bool, int_type>(false),
-                               false, false, false);
-    }
-  }
-  else {
-    // fbp : changed so that failbit is set only there, to pass Dietmar's test
-    if (this->eof())
-      this->setstate(ios_base::eofbit | ios_base::failbit);
-    else
-      this->setstate(ios_base::failbit);
-  }
-
-  //  if (this->eof())
-  //    this->setstate(ios_base::eofbit | ios_base::failbit);
-  
-  return _M_gcount;
-}
-
-template <class _CharT, class _Traits>
-void basic_istream<_CharT, _Traits>::_M_formatted_get(_CharT* __s)
-{
-  sentry __sentry(*this); // Skip whitespace.
-
-  if (__sentry) {
-    basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf();
-    streamsize __nmax = this->width() > 0
-      ? this->width() - 1
-      : (numeric_limits<streamsize>::max)() / sizeof(_CharT) - 1;
-
-    streamsize __n = __buf->gptr() != __buf->egptr()
-      ? _M_read_buffered(this,  __buf, __nmax, __s,
-                         _Is_wspace_null<_Traits>((const ctype<_CharT>*)this->_M_ctype_facet()),
-                         _Scan_wspace_null<_Traits>((const ctype<_CharT>*)this->_M_ctype_facet()),
-			 false, true, false)
-      : _M_read_unbuffered(this,  __buf, __nmax, __s,
-                           _Is_wspace_null<_Traits>((const ctype<_CharT>*)this->_M_ctype_facet()),
-			   false, true, false);
-    if (__n == 0)
-      this->setstate(ios_base::failbit);
-  }
-  this->width(0);
-}
-
-// A generic unbuffered function for ignoring characters.  We stop
-// when we reach EOF, or when the function object __is_delim returns
-// true.  In the last case, it extracts the character for which
-// __is_delim is true, if and only if __extract_delim is true.
-
-template < class _CharT, class _Traits, class _Is_Delim>
-void _STLP_CALL 
-_M_ignore_unbuffered(basic_istream<_CharT, _Traits>* __that, 
-		     basic_streambuf<_CharT, _Traits>* __buf,
-		     _Is_Delim __is_delim,
-		     bool __extract_delim, bool __set_failbit)
-{
-  bool __done = false;
-  ios_base::iostate __status = 0;
-  typedef typename basic_istream<_CharT, _Traits>::int_type int_type;
-
-  _STLP_TRY {
-    while (!__done) {
-      int_type __c = __buf->sbumpc();
-
-      if (__that->_S_eof(__c)) {
-        __done = true;
-        __status |= __set_failbit ? ios_base::eofbit | ios_base::failbit
-                                  : ios_base::eofbit;
-      }
-
-      else if (__is_delim(__c)) {
-        __done = true;
-        if (!__extract_delim)
-          if (__that->_S_eof(__buf->sputbackc(_Traits::to_char_type(__c))))
-            __status |= ios_base::failbit;
-      }
-    }
-  }
-  _STLP_CATCH_ALL {
-    __that->_M_handle_exception(ios_base::badbit);
-  }
-
-  __that->setstate(__status);
-}
-
-// A generic buffered function for ignoring characters.  Much like
-// _M_ignore_unbuffered, but with one additional function object:
-// __scan_delim(first, last) returns the first pointer p in [first,
-// last) such that __is_delim(p) is true.
-
-template < class _CharT, class _Traits, class _Is_Delim, class _Scan_Delim>
-void _STLP_CALL 
-_M_ignore_buffered(basic_istream<_CharT, _Traits>* __that, 
-		   basic_streambuf<_CharT, _Traits>* __buf,
-		   _Is_Delim __is_delim, _Scan_Delim __scan_delim,
-		   bool __extract_delim, bool __set_failbit)
-{
-  bool __at_eof      = false;
-  bool __found_delim = false;
-
-  _STLP_TRY {
-    while (__buf->_M_egptr() != __buf->_M_gptr() && !__at_eof && !__found_delim) {
-      const _CharT* __p = __scan_delim(__buf->_M_gptr(), __buf->_M_egptr());
-      __buf->_M_gbump((int)(__p - __buf->_M_gptr()));
-    
-      if (__p != __buf->_M_egptr()) { // We found delim, so we're done.
-        if (__extract_delim)
-          __buf->_M_gbump(1);
-        __found_delim = true;
-      }
-
-      else                         // No delim.  Try to refil the buffer.
-        __at_eof = __that->_S_eof(__buf->sgetc());
-    }                              // Close the while loop.
-  }
-  _STLP_CATCH_ALL {
-    __that->_M_handle_exception(ios_base::badbit);
-    return;
-  }
-
-  if (__at_eof) {
-    __that->setstate(__set_failbit ? ios_base::eofbit | ios_base::failbit
-                                   : ios_base::eofbit);
-    return;
-  }
-  if (__found_delim)
-    return;
-
-  // If execution has reached this point, then we have an empty buffer but
-  // we have not reached eof.  What that means is that the streambuf has
-  // decided to switch from a buffered to an unbuffered mode.  We switch 
-  // to _M_ignore_unbuffered.
-  _M_ignore_unbuffered(__that,  __buf, __is_delim, __extract_delim, __set_failbit);
-}
-
-// Overloaded versions of _M_ignore_unbuffered and _M_ignore_unbuffered 
-// with an explicit count _Num.  Return value is the number of
-// characters extracted.
-//
-// The function object __max_chars takes two arguments, _Num and __n
-// (the latter being the number of characters we have already read), 
-// and returns the maximum number of characters to read from the buffer.
-// We parameterize _M_ignore_buffered so that we can use it for both
-// bounded and unbounded input; for the former the function object should
-// be minus<>, and for the latter it should return a constant maximum value.
-
-template < class _CharT, class _Traits, class _Max_Chars, class _Is_Delim>
-streamsize _STLP_CALL 
-_M_ignore_unbuffered(basic_istream<_CharT, _Traits>* __that,
-		     basic_streambuf<_CharT, _Traits>* __buf,
-		     streamsize _Num, _Max_Chars __max_chars,
-		     _Is_Delim __is_delim,
-		     bool __extract_delim, bool __set_failbit)
-{
-  streamsize __n = 0;
-  ios_base::iostate __status = 0;
-  typedef typename basic_istream<_CharT, _Traits>::int_type int_type;
-  
-  _STLP_TRY {
-    while (__max_chars(_Num, __n) > 0) {
-      int_type __c = __buf->sbumpc();
-      
-      if (__that->_S_eof(__c)) {
-        __status |= __set_failbit ? ios_base::eofbit | ios_base::failbit
-                                  : ios_base::eofbit;
-        break;
-      }
-
-      else if (__is_delim(__c)) {
-        if (__extract_delim)
-          ++__n;
-        else if (__that->_S_eof(__buf->sputbackc(_Traits::to_char_type(__c))))
-          __status |= ios_base::failbit;
-
-        break;
-      }
-      // fbp : added counter increment to pass Dietmar's test
-      ++__n;
-    }
-  }
-  _STLP_CATCH_ALL {
-    __that->_M_handle_exception(ios_base::badbit);
-  }
-
-  if (__status)
-    __that->setstate(__status);   // This might throw.
-  return __n;
-}
-
-template < class _CharT, class _Traits, class _Max_Chars, class _Is_Delim, class _Scan_Delim>
-streamsize _STLP_CALL 
-_M_ignore_buffered(basic_istream<_CharT, _Traits>* __that,
-		   basic_streambuf<_CharT, _Traits>* __buf,
-		   streamsize _Num,
-		   _Max_Chars __max_chars,
-		   _Is_Delim __is_delim, _Scan_Delim __scan_delim,
-		   bool __extract_delim, bool __set_failbit)
-{
-  streamsize __n = 0;
-  bool __at_eof = false;
-  bool __done   = false;
-
-  _STLP_TRY {
-    while (__buf->_M_egptr() != __buf->_M_gptr() && !__done) {
-      ptrdiff_t __avail = __buf->_M_egptr() - __buf->_M_gptr();
-      streamsize __m = __max_chars(_Num, __n);
-    
-      if (__avail >= __m) {       // We have more characters than we need.
-        const _CharT* __last = __buf->_M_gptr() + __m;
-        const _CharT* __p = __scan_delim(__buf->_M_gptr(), __last);
-        ptrdiff_t __chunk = __p - __buf->_M_gptr();
-        __n += __chunk;
-        __buf->_M_gbump((int)__chunk);
-
-        if (__extract_delim && __p != __last) {
-          __n += 1;
-          __buf->_M_gbump(1);
-        }
-
-        __done = true;
-      }
-
-      else {
-        const _CharT* __p = __scan_delim(__buf->_M_gptr(), __buf->_M_egptr());
-        ptrdiff_t __chunk = __p - __buf->_M_gptr();
-        __n += __chunk;
-        __buf->_M_gbump((int)__chunk);
-
-        if (__p != __buf->_M_egptr()) { // We found delim.
-          if (__extract_delim) {
-            __n += 1;
-            __buf->_M_gbump(1);
-          }
-
-          __done = true;
-        }
-
-        // We didn't find delim.  Try to refill the buffer.
-        else if (__that->_S_eof(__buf->sgetc())) {
-          __done   = true;
-          __at_eof = true;
-        } 
-      }
-    } // Close the while loop.
-  }
-  _STLP_CATCH_ALL {
-    __that->_M_handle_exception(ios_base::badbit);
-    return __n;
-  }
-
-  if (__at_eof)
-    __that->setstate(__set_failbit ? ios_base::eofbit | ios_base::failbit
-                                   : ios_base::eofbit);
-
-  if (__done)
-    return __n;
-
-  // If execution has reached this point, then we have an empty buffer but
-  // we have not reached eof.  What that means is that the streambuf has
-  // decided to switch from buffered to unbuffered input.  We switch to
-  // to _M_ignore_unbuffered.
-
-  return __n + _M_ignore_unbuffered( __that,  __buf, _Num, __max_chars,
-                                    __is_delim, __extract_delim, __set_failbit);
-}
-
-
-template <class _CharT, class _Traits>
-basic_istream<_CharT, _Traits>&
-basic_istream<_CharT, _Traits>::ignore(streamsize __n)
-{
-  sentry __sentry(*this, _No_Skip_WS());
-  this->_M_gcount = 0;
-
-  if (__sentry) {
-    basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf();
-    typedef _Constant_unary_fun<bool, int_type> _Const_bool;
-    typedef _Constant_binary_fun<streamsize, streamsize, streamsize>
-      _Const_streamsize;
-    const streamsize __maxss = (numeric_limits<streamsize>::max)();
-
-    if (__n == (numeric_limits<int>::max)()) {
-      if (__buf->gptr() != __buf->egptr())
-        _M_gcount
-          = _M_ignore_buffered(this,  __buf,
-                               __maxss, _Const_streamsize(__maxss),
-                               _Const_bool(false),
-                               _Project2nd<const _CharT*, const _CharT*>(),
-                               false, false);
-      else
-        _M_gcount = _M_ignore_unbuffered(this,  __buf,
-                                         __maxss, _Const_streamsize(__maxss),
-                                         _Const_bool(false), false, false);
-    }
-    else {
-      if (__buf->gptr() != __buf->egptr())
-        _M_gcount
-          = _M_ignore_buffered(this,  __buf,
-                               __n, minus<streamsize>(),
-                               _Const_bool(false),
-                               _Project2nd<const _CharT*, const _CharT*>(),
-                               false, false);
-      else
-        _M_gcount = _M_ignore_unbuffered(this,  __buf, __n, minus<streamsize>(),
-                                         _Const_bool(false), false, false);
-    }
-  }
-
-  return *this;
-}
-
-template <class _CharT, class _Traits>
-basic_istream<_CharT, _Traits>&
-basic_istream<_CharT, _Traits>::ignore(streamsize __n, int_type __delim)
-{
-  sentry __sentry(*this, _No_Skip_WS());
-  this->_M_gcount = 0;
-
-  if (__sentry) {
-    basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf();
-    typedef _Constant_unary_fun<bool, int_type> _Const_bool;
-    typedef _Constant_binary_fun<streamsize, streamsize, streamsize>
-      _Const_streamsize;
-    const streamsize __maxss = (numeric_limits<streamsize>::max)();
-
-    if (__n == (numeric_limits<int>::max)()) {
-      if (__buf->gptr() != __buf->egptr())
-        _M_gcount = _M_ignore_buffered(this,  __buf,
-                                       __maxss, _Const_streamsize(__maxss),
-                                       _Eq_int_bound<_Traits>(__delim),
-                                       _Scan_for_int_val<_Traits>(__delim),
-                                       true, false);
-      else
-        _M_gcount = _M_ignore_unbuffered(this,  __buf,
-                                         __maxss, _Const_streamsize(__maxss),
-                                         _Eq_int_bound<_Traits>(__delim),
-                                         true, false);
-    }
-    else {
-      if (__buf->gptr() != __buf->egptr())
-        _M_gcount = _M_ignore_buffered(this,  __buf,
-                                       __n, minus<streamsize>(),
-                                       _Eq_int_bound<_Traits>(
-                                               __delim),
-                                       _Scan_for_int_val<_Traits>(__delim),
-                                       true, false);
-      else
-        _M_gcount = _M_ignore_unbuffered(this,  __buf, __n, minus<streamsize>(),
-                                         _Eq_int_bound<_Traits>(__delim),
-                                         true, false);
-    }
-  }
-
-  return *this;
-}
-
-// This member function does not construct a sentry object, because
-// it is called from sentry's constructor.  
-template <class _CharT, class _Traits>
-void basic_istream<_CharT, _Traits>::_M_skip_whitespace(bool __set_failbit)
-{
-  basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf();
-  if (!__buf)
-    this->setstate(ios_base::badbit);
-  else if (__buf->gptr() != __buf->egptr())
-    _M_ignore_buffered(this,  __buf,
-                       _Is_not_wspace<_Traits>((const ctype<_CharT>*)this->_M_ctype_facet()),
-                       _Scan_for_not_wspace<_Traits>((const ctype<_CharT>*)this->_M_ctype_facet()),
-                       false, __set_failbit);
-  else
-    _M_ignore_unbuffered(this,  __buf,
-                         _Is_not_wspace<_Traits>((const ctype<_CharT>*)this->_M_ctype_facet()),
-                         false, __set_failbit);
-}
-
-
-// This is a very simple loop that reads characters from __src and puts
-// them into __dest.  It looks complicated because of the (standard-
-// mandated) exception handling policy.
-//
-// We stop when we get an exception, when we fail to insert into the 
-// output streambuf, or when __is_delim is true.
-
-template < class _CharT, class _Traits, class _Is_Delim>
-streamsize _STLP_CALL 
-_M_copy_unbuffered( basic_istream<_CharT, _Traits>* __that, basic_streambuf<_CharT, _Traits>* __src,
-		    basic_streambuf<_CharT, _Traits>* __dest,
-		    _Is_Delim __is_delim,
-		    bool __extract_delim, bool __rethrow)
-{
-  streamsize __extracted = 0;
-  ios_base::iostate __status = 0;
-  typedef typename basic_istream<_CharT, _Traits>::int_type int_type;
-  int_type __c;
-
-  _STLP_TRY {
-  
-    while (true) {
-  
-      // Get a character. If there's an exception, catch and (maybe) rethrow it.
-      __c = __src->sbumpc();
-      
-      // If we failed to get a character, then quit.
-      if (__that->_S_eof(__c)) {
-        __status |= ios_base::eofbit;
-        break;
-      }  
-      // If it's the delimiter, then quit.
-      else if (__is_delim(__c)) {
-        if (!__extract_delim && !__pushback(__src, _Traits::to_char_type(__c)))
-          __status |= ios_base::failbit;
-        break;
-      }
-      
-      else {
-      
-        // Try to put the character in the output streambuf.
-        bool __failed = false;
-        _STLP_TRY {
-          if (!__that->_S_eof(__dest->sputc(__c)))
-            ++__extracted;
-          else
-            __failed = true;
-        }
-        _STLP_CATCH_ALL {
-          __failed = true;
-        }
-        
-        // If we failed to put the character in the output streambuf, then
-        // try to push it back to the input streambuf.
-        if (__failed && !__pushback(__src, _Traits::to_char_type(__c)))
-          __status |= ios_base::failbit;
-
-        // fbp : avoiding infinite loop in io-27-6-1-2-3.exp 
-        if (__failed)
-          break;
-      }
-
-    } /* while (true) */
-    
-  }
-  // fbp : this try/catch moved here in reasonable assumption
-  // __is_delim never throw (__pushback is guaranteed not to)
-  _STLP_CATCH_ALL {
-    // See 27.6.1.2.3, paragraph 13.
-    if (__rethrow && __extracted == 0)
-      __that->_M_handle_exception(ios_base::failbit);
-  }
-  __that->setstate(__status);
-  return __extracted;
-}
-      
-// Buffered copying from one streambuf to another.  We copy the characters
-// in chunks, rather than one at a time.  We still have to worry about all
-// of the error conditions we checked in _M_copy_unbuffered, plus one more:
-// the streambuf might decide to switch from a buffered to an unbuffered mode.
-
-template < class _CharT, class _Traits, class _Is_Delim, class _Scan_Delim>
-streamsize _STLP_CALL 
-_M_copy_buffered(basic_istream<_CharT, _Traits>* __that, basic_streambuf<_CharT, _Traits>* __src,
-                     basic_streambuf<_CharT, _Traits>* __dest,
-                     _Scan_Delim __scan_delim, _Is_Delim __is_delim,
-                     bool __extract_delim, bool __rethrow)
-{
-  streamsize __extracted = 0;
-  ios_base::iostate __status = 0;
-  typedef typename basic_istream<_CharT, _Traits>::int_type int_type;
-  int_type __c = _Traits::eof();
-  _CharT* __first = __src->_M_gptr();
-  ptrdiff_t __avail = __src->_M_egptr() - __first;
-  // fbp : introduced to move catch/try blocks out of the loop
-  bool __do_handle_exceptions;
-
-  _STLP_TRY {
-    while (true) {
-      __do_handle_exceptions = false ;
-      const _CharT* __last = __scan_delim(__first, __src->_M_egptr());
-      
-      // Try to copy the entire input buffer to the output buffer.
-      streamsize __n = __dest->sputn(__first, __extract_delim && __last != __src->_M_egptr()
-                                     ? (__last - __first) + 1
-                                     : (__last - __first));
-      __src->_M_gbump((int)__n);
-      __extracted += __n;
-      
-      // from this on, catch() will call _M_handle_exceptions()
-      __do_handle_exceptions = true;
-      
-      if (__n < __avail)          // We found the delimiter, or else failed to
-        break;                    // copy some characters.
-      
-      __c = __src->sgetc();
-
-      // Three possibilities: we succeeded in refilling the buffer, or 
-      // we got EOF, or the streambuf has switched to unbuffered mode.
-      __first = __src->_M_gptr();
-      __avail = __src->_M_egptr() - __first;
-      
-      if (__avail > 0)
-        {}	// dwa 1/16/00 -- suppress a Metrowerks warning
-      else if (__that->_S_eof(__c)) {
-        __status |= ios_base::eofbit;
-        break;
-      }
-      else 
-        return __extracted + _M_copy_unbuffered(__that,  __src, __dest, __is_delim,
-                                                __extract_delim, __rethrow);
-    } /* while */
-  }
-  
-  _STLP_CATCH_ALL {
-    // See 27.6.1.2.3, paragraph 13.
-    if (__rethrow && __do_handle_exceptions &&  __extracted == 0)
-      __that->_M_handle_exception(ios_base::failbit);
-  }
-  
-  if (__status)
-    __that->setstate(__status);   // This might throw.
-  return __extracted;
-} 
-
-
-
-template <class _CharT, class _Traits>
-basic_istream<_CharT, _Traits>& 
-basic_istream<_CharT, _Traits>
-  ::get(basic_streambuf<_CharT, _Traits>& __dest, _CharT __delim)
-{
-  sentry __sentry(*this, _No_Skip_WS());
-  this->_M_gcount = 0;
-
-  if (__sentry) {
-    basic_streambuf<_CharT, _Traits>* __src = this->rdbuf();
-
-    if (__src)
-      this->_M_gcount = __src->egptr() != __src->gptr()
-        ? _M_copy_buffered(this,  __src, &__dest,
-                           _Scan_for_char_val<_Traits>(__delim),
-                           _Eq_char_bound<_Traits>(__delim),
-                           false, false)
-        : _M_copy_unbuffered(this,  __src, &__dest,
-                             _Eq_char_bound<_Traits>(__delim),
-                             false, false);
-  }
-
-  if (this->_M_gcount == 0)
-    this->setstate(ios_base::failbit);
-
-  return *this;
-}
-
-// Copying characters into a streambuf.
-template <class _CharT, class _Traits> 
-basic_istream<_CharT, _Traits>& 
-basic_istream<_CharT, _Traits>
-  ::operator>>(basic_streambuf<_CharT, _Traits>* __dest)
-{
-  streamsize __n = 0;
-  typedef typename basic_istream<_CharT, _Traits>::sentry _Sentry;
-  _Sentry __sentry(*this);
-  if (__sentry) {
-    basic_streambuf<_CharT, _Traits>* __src = this->rdbuf();
-    if (__src && __dest)
-      __n = __src->egptr() != __src->gptr()
-        ? _M_copy_buffered(this,  __src, __dest,
-                           _Project2nd<const _CharT*, const _CharT*>(),
-                           _Constant_unary_fun<bool, int_type>(false),
-                           false, true)
-        : _M_copy_unbuffered(this,  __src, __dest,
-                             _Constant_unary_fun<bool, int_type>(false),
-                             false, true);
-  }
-
-  if (__n == 0)
-    this->setstate(ios_base::failbit);
-  
-  return *this;
-}
-
-// ----------------------------------------------------------------
-// basic_iostream<> class 
-// ----------------------------------------------------------------
-
-template <class _CharT, class _Traits>
-basic_iostream<_CharT, _Traits>
-  ::basic_iostream(basic_streambuf<_CharT, _Traits>* __buf)
-    : basic_ios<_CharT, _Traits>(),
-      basic_istream<_CharT, _Traits>(__buf),
-      basic_ostream<_CharT, _Traits>(__buf)
-{
-  this->init(__buf);
-}
-
-template <class _CharT, class _Traits>
-basic_iostream<_CharT, _Traits>::~basic_iostream()
-{}
-
-_STLP_END_NAMESPACE
-
-# undef __BIS_int_type__
-# undef __BIS_pos_type__
-# undef __BIS_off_type__
-
-# endif /* defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) */
-
-#endif /* _STLP_ISTREAM_C */
diff --git a/src/STLport/stl/_istream.h b/src/STLport/stl/_istream.h
deleted file mode 100644
index 646bb31..0000000
--- a/src/STLport/stl/_istream.h
+++ /dev/null
@@ -1,344 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-#ifndef _STLP_INTERNAL_ISTREAM_H
-#define _STLP_INTERNAL_ISTREAM_H
-
-// this block is included by _ostream.h, we include it here to lower #include level
-# if defined (_STLP_HAS_WCHAR_T) && !defined (_STLP_CWCHAR_H)
-#  include <stl/_cwchar.h>
-# endif
-
-# ifndef _STLP_INTERNAL_IOS_H
-#  include <stl/_ios.h>                  // For basic_ios<>.  Includes <iosfwd>.
-# endif
-
-#ifndef _STLP_INTERNAL_OSTREAM_H
-# include <stl/_ostream.h>              // Needed as a base class of basic_iostream.
-#endif
-
-#ifndef _STLP_INTERNAL_ISTREAMBUF_ITERATOR_H
-# include <stl/_istreambuf_iterator.h>
-#endif
-
-#include <stl/_ctraits_fns.h>    // Helper functions that allow char traits
-                                // to be used as function objects.
-_STLP_BEGIN_NAMESPACE
-
-template <class _CharT, class _Traits, class _Number> 
-ios_base::iostate _STLP_CALL
-_M_get_num(basic_istream<_CharT, _Traits>& __that, _Number& __val);
-
-#if defined (_STLP_USE_TEMPLATE_EXPORT)
-template <class _CharT, class _Traits>
-class _Isentry;
-#endif
-
-struct _No_Skip_WS {};        // Dummy class used by sentry.
-
-template <class _CharT, class _Traits>
-bool _M_init_skip(basic_istream<_CharT, _Traits>& __is);
-template <class _CharT, class _Traits>
-bool _M_init_noskip(basic_istream<_CharT, _Traits>& __is);
-
-//----------------------------------------------------------------------
-// Class basic_istream, a class that performs formatted input through
-// a stream buffer.
-
-// The second template parameter, _Traits, defaults to char_traits<_CharT>.
-// The default is declared in header <iosfwd>, and it isn't declared here
-// because C++ language rules do not allow it to be declared twice. 
-
-template <class _CharT, class _Traits>
-class basic_istream : virtual public basic_ios<_CharT, _Traits> {
-public:
-                         // Types
-  typedef _CharT                     char_type;
-  typedef typename _Traits::int_type int_type;
-  typedef typename _Traits::pos_type pos_type;
-  typedef typename _Traits::off_type off_type;
-  typedef _Traits                    traits_type;
-  typedef basic_ios<_CharT, _Traits>     _Basic_ios;
-  typedef basic_istream<_CharT, _Traits> _Self;
-
-  typedef basic_ios<_CharT, _Traits>& (_STLP_CALL *__ios_fn)(basic_ios<_CharT, _Traits>&);
-  typedef ios_base& (_STLP_CALL *__ios_base_fn)(ios_base&);
-  typedef _Self& (_STLP_CALL *__istream_fn)(_Self&);
-
-public:                         // Constructor and destructor.
-  explicit basic_istream(basic_streambuf<_CharT, _Traits>* __buf) :
-    basic_ios<_CharT, _Traits>(), _M_gcount(0) {
-    this->init(__buf);
-  }
-  ~basic_istream() {};
-
-public:                         // Nested sentry class.
-
-public:                         // Hooks for manipulators.  The arguments are
-                                // function pointers.
-  _Self& operator>> (__istream_fn __f) { return __f(*this); }
-  _Self& operator>> (__ios_fn __f) {  __f(*this); return *this; }
-  _Self& operator>> (__ios_base_fn __f) { __f(*this); return *this; }
-
-public:                         // Formatted input of numbers.
-  _Self& operator>> (short& __val) {
-    long __lval;
-    unsigned short __uval;
-   _M_get_num(*this, __lval);
-    __val = __STATIC_CAST(short, __lval);
-    __uval = __lval;
-    // check if we lose digits
-    //    if ((__val != __lval) && ((unsigned short)__val != __lval))
-    if ((__val != __lval) && ((long)__uval != __lval))
-      this->setstate(ios_base::failbit); 
-    return *this; 
-  }
-  _Self& operator>> (int& __val) { 
-    long __lval;
-    unsigned int __uval;
-    _M_get_num(*this, __lval);
-    __val = __lval;
-    __uval = __lval;
-    // check if we lose digits
-    //    if ((__val != __lval) && ((unsigned int)__val != __lval))
-    if ((__val != __lval) && ((long)__uval != __lval))
-      this->setstate(ios_base::failbit); 
-    return *this;
-  }
-  _Self& operator>> (unsigned short& __val) { _M_get_num(*this, __val); return *this; }
-  _Self& operator>> (unsigned int& __val) { _M_get_num(*this, __val); return *this; }
-  _Self& operator>> (long& __val) { _M_get_num(*this, __val); return *this; }
-  _Self& operator>> (unsigned long& __val) { _M_get_num(*this, __val); return *this; }
-#ifdef _STLP_LONG_LONG
-  _Self& operator>> (_STLP_LONG_LONG& __val) { _M_get_num(*this, __val); return *this; }
-  _Self& operator>> (unsigned _STLP_LONG_LONG& __val) { _M_get_num(*this, __val); return *this; }
-#endif 
-  _Self& operator>> (float& __val)  { _M_get_num(*this, __val); return *this; }
-  _Self& operator>> (double& __val) { _M_get_num(*this, __val); return *this; }
-# ifndef _STLP_NO_LONG_DOUBLE
-  _Self& operator>> (long double& __val) { _M_get_num(*this, __val); return *this; }
-# endif
-# ifndef _STLP_NO_BOOL
-  _Self& operator>> (bool& __val) { _M_get_num(*this, __val); return *this; }
-# endif
-  _Self& operator>> (void*& __val) { _M_get_num(*this, __val); return *this; }
-
-public:                         // Copying characters into a streambuf.
-  _Self& operator>>(basic_streambuf<_CharT, _Traits>*);
-
-public:                         // Unformatted input.
-  streamsize gcount() const { return _M_gcount; }
-  int_type peek();
-
-public:                         // get() for single characters
-  int_type get();
-  _Self& get(char_type& __c);
-
-public:                         // get() for character arrays.
-  _Self& get(char_type* __s, streamsize __n, char_type __delim);
-  _Self& get(char_type* __s, streamsize __n)
-    { return get(__s, __n, this->widen('\n')); }
-
-public:                         // get() for streambufs
-  _Self& get(basic_streambuf<_CharT, _Traits>& __buf,
-                     char_type __delim);
-  _Self& get(basic_streambuf<_CharT, _Traits>& __buf)
-    { return get(__buf, this->widen('\n')); }
-
-public:                         // getline()
-  _Self& getline(char_type* __s, streamsize __n, char_type delim);
-  _Self& getline(char_type* __s, streamsize __n)
-    { return getline(__s, __n, this->widen('\n')); }
-
-public:                         // read(), readsome(), ignore()
-  _Self& ignore();
-  _Self& ignore(streamsize __n);
-#if (defined (_STLP_MSVC) && _STLP_MSVC < 1200)
-  inline
-#endif
-  _Self& ignore(streamsize __n, int_type __delim);
-
-  _Self& read(char_type* __s, streamsize __n);
-  streamsize readsome(char_type* __s, streamsize __n);
-
-public:                         // putback
-  _Self& putback(char_type __c);
-  _Self& unget();
-
-public:                         // Positioning and buffer control.
-  int sync();
-
-  pos_type tellg();
-  _Self& seekg(pos_type __pos);
-  _Self& seekg(off_type, ios_base::seekdir);
-
-public:                         // Helper functions for non-member extractors.
-  void _M_formatted_get(_CharT& __c);
-  void _M_formatted_get(_CharT* __s);
-  void _M_skip_whitespace(bool __set_failbit);
-
-private:                        // Number of characters extracted by the
-  streamsize _M_gcount;         // most recent unformatted input function.
-
-public:
-
-#if defined (_STLP_USE_TEMPLATE_EXPORT)
-  // If we are using DLL specs, we have not to use inner classes
-  // end class declaration here
-  typedef _Isentry<_CharT, _Traits>      sentry;
-};
-#  define sentry _Isentry
-template <class _CharT, class _Traits>
-class _Isentry {
-  typedef _Isentry<_CharT, _Traits> _Self;
-# else
-  class sentry {
-    typedef sentry _Self;
-#endif
-    
-  private:
-    const bool _M_ok;
-    //    basic_streambuf<_CharT, _Traits>* _M_buf;
-        
-  public:
-    typedef _Traits traits_type;
-    
-    explicit sentry(basic_istream<_CharT, _Traits>& __is,
-                    bool __noskipws = false) : 
-      _M_ok((__noskipws || !(__is.flags() & ios_base::skipws)) ? _M_init_noskip(__is) :  _M_init_skip(__is) )
-      /* , _M_buf(__is.rdbuf()) */
-      {}
-    
-    // Calling this constructor is the same as calling the previous one with 
-    // __noskipws = true, except that it doesn't require a runtime test.
-    sentry(basic_istream<_CharT, _Traits>& __is, _No_Skip_WS) : /* _M_buf(__is.rdbuf()), */
-      _M_ok(_M_init_noskip(__is)) {}
-    
-    ~sentry() {}
-    
-    operator bool() const { return _M_ok; }
-    
-  private:                        // Disable assignment and copy constructor.
-    sentry(const _Self&) : _M_ok(false) {}
-    void operator=(const _Self&) {}
-  };
-  
-# if defined (_STLP_USE_TEMPLATE_EXPORT)
-#  undef sentry
-# else
-  // close basic_istream class definition here
-};
-# endif
-
-# if defined (_STLP_USE_TEMPLATE_EXPORT)
-_STLP_EXPORT_TEMPLATE_CLASS _Isentry<char, char_traits<char> >;
-_STLP_EXPORT_TEMPLATE_CLASS basic_istream<char, char_traits<char> >;
-#  if ! defined (_STLP_NO_WCHAR_T)
-_STLP_EXPORT_TEMPLATE_CLASS _Isentry<wchar_t, char_traits<wchar_t> >;
-_STLP_EXPORT_TEMPLATE_CLASS basic_istream<wchar_t, char_traits<wchar_t> >;
-#  endif
-# endif /* _STLP_USE_TEMPLATE_EXPORT */
-
-// Non-member character and string extractor functions.
-
-template <class _CharT, class _Traits>
-inline basic_istream<_CharT, _Traits>& _STLP_CALL  
-operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) {
-  __in._M_formatted_get(__c);
-  return __in;
-}
-
-template <class _Traits>
-inline basic_istream<char, _Traits>& _STLP_CALL  
-operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) {
-  __in._M_formatted_get(__REINTERPRET_CAST(char&,__c));
-  return __in;
-}
-
-template <class _Traits>
-inline basic_istream<char, _Traits>& _STLP_CALL 
-operator>>(basic_istream<char, _Traits>& __in, signed char& __c) {
-  __in._M_formatted_get(__REINTERPRET_CAST(char&,__c));
-  return __in;
-}
-
-template <class _CharT, class _Traits>
-inline basic_istream<_CharT, _Traits>& _STLP_CALL 
-operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) {
-  __in._M_formatted_get(__s);
-  return __in;
-}
-
-template <class _Traits>
-inline basic_istream<char, _Traits>& _STLP_CALL 
-operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s) {
-  __in._M_formatted_get(__REINTERPRET_CAST(char*,__s));
-  return __in;
-}
-
-template <class _Traits>
-inline basic_istream<char, _Traits>& _STLP_CALL 
-operator>>(basic_istream<char, _Traits>& __in, signed char* __s) {
-  __in._M_formatted_get(__REINTERPRET_CAST(char*,__s));
-  return __in;
-}
-
-//----------------------------------------------------------------------
-// istream manipulator.
-template <class _CharT, class _Traits>
-basic_istream<_CharT, _Traits>& _STLP_CALL
-ws(basic_istream<_CharT, _Traits>& __is);
-
-//----------------------------------------------------------------------
-// Class iostream.
-
-template <class _CharT, class _Traits>
-class basic_iostream 
-  : public basic_istream<_CharT, _Traits>,
-    public basic_ostream<_CharT, _Traits>
-{
-public:
-  typedef basic_ios<_CharT, _Traits> _Basic_ios;
-
-  explicit basic_iostream(basic_streambuf<_CharT, _Traits>* __buf);
-  virtual ~basic_iostream();
-};
-
-# if defined (_STLP_USE_TEMPLATE_EXPORT)
-_STLP_EXPORT_TEMPLATE_CLASS basic_iostream<char, char_traits<char> >;
-#  if ! defined (_STLP_NO_WCHAR_T)
-_STLP_EXPORT_TEMPLATE_CLASS basic_iostream<wchar_t, char_traits<wchar_t> >;
-#  endif
-# endif /* _STLP_USE_TEMPLATE_EXPORT */
-
-template <class _CharT, class _Traits>
-basic_streambuf<_CharT, _Traits>* _STLP_CALL _M_get_istreambuf(basic_istream<_CharT, _Traits>& __is) 
-{
-  return __is.rdbuf();
-}
-
-_STLP_END_NAMESPACE
-
-# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION)
-#  include <stl/_istream.c>
-# endif
-
-#endif /* _STLP_INTERNAL_ISTREAM_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_istreambuf_iterator.h b/src/STLport/stl/_istreambuf_iterator.h
deleted file mode 100644
index c3ef8a2..0000000
--- a/src/STLport/stl/_istreambuf_iterator.h
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-// WARNING: This is an internal header file, included by other C++
-// standard library headers.  You should not attempt to use this header
-// file directly.
-
-
-#ifndef _STLP_INTERNAL_ISTREAMBUF_ITERATOR_H
-#define _STLP_INTERNAL_ISTREAMBUF_ITERATOR_H
-
-#ifndef _STLP_INTERNAL_ITERATOR_BASE_H
-# include <stl/_iterator_base.h>
-#endif
-
-#ifndef _STLP_INTERNAL_STREAMBUF
-# include <stl/_streambuf.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-// defined in _istream.h
-template <class _CharT, class _Traits>
-extern basic_streambuf<_CharT, _Traits>* _STLP_CALL _M_get_istreambuf(basic_istream<_CharT, _Traits>& ) ;
-
-// We do not read any characters until operator* is called. operator* calls sgetc 
-// unless the iterator is unchanged from the last call in which case a cached value is
-// used. Calls to operator++ use sbumpc.
-
-template<class _CharT, class _Traits>
-class istreambuf_iterator
-{
-public:
-  typedef _CharT                           char_type;
-  typedef _Traits                          traits_type;
-  typedef typename _Traits::int_type       int_type;
-  typedef basic_streambuf<_CharT, _Traits> streambuf_type;
-  typedef basic_istream<_CharT, _Traits>   istream_type;
-
-  typedef input_iterator_tag               iterator_category;
-  typedef _CharT                           value_type;
-  typedef typename _Traits::off_type       difference_type;
-  typedef const _CharT*                    pointer;
-  typedef const _CharT&                    reference;
-
-public:
-  istreambuf_iterator(streambuf_type* __p = 0) { this->_M_init(__p); }
-  //  istreambuf_iterator(basic_istream<_CharT, _Traits>& __is) { this->_M_init(_M_get_istreambuf(__is)); }
-  inline istreambuf_iterator(basic_istream<_CharT, _Traits>& __is);
-
-  char_type operator*() const { this->_M_getc(); return _M_c; }
-  istreambuf_iterator<_CharT, _Traits>& operator++() { this->_M_bumpc(); return *this; }
-  istreambuf_iterator<_CharT, _Traits>  operator++(int);
-
-  bool equal(const istreambuf_iterator<_CharT, _Traits>& __i) const {
-    if (this->_M_buf)
-      this->_M_getc();
-    if (__i._M_buf)
-      __i._M_getc(); 
-    return this->_M_eof == __i._M_eof;
-  }
-
-private:
-  void _M_init(streambuf_type* __p) {
-    _M_buf = __p;
-    _M_eof = !__p;
-    //    _M_is_initialized = _M_eof;
-    _M_have_c = false;
-  }
-
-  void _M_getc() const {
-    if (_M_have_c)
-      return;
-    int_type __c = _M_buf->sgetc();
-# if !defined (_STLP_NEED_MUTABLE) /* && ! defined (__SUNPRO_CC) */
-    _M_c = traits_type::to_char_type(__c);
-    _M_eof = traits_type::eq_int_type(__c, traits_type::eof());
-    _M_have_c = true;
-# else
-    typedef istreambuf_iterator<_CharT,_Traits> _Self;
-    _Self* __that = __CONST_CAST(_Self*, this);
-    __that->_M_c = __STATIC_CAST(_CharT, traits_type::to_char_type(__c));
-    __that->_M_eof = traits_type::eq_int_type(__c, traits_type::eof());
-    __that->_M_have_c = true;
-# endif
-  }
-
-  void _M_bumpc() {
-    _M_buf->sbumpc();
-    _M_have_c = false;
-  }
-
-private:
-  streambuf_type* _M_buf;
-  mutable _CharT _M_c;
-  mutable unsigned char _M_eof;
-  mutable unsigned char _M_have_c;
-};
-
-template<class _CharT, class _Traits>
-inline istreambuf_iterator<_CharT, _Traits>::istreambuf_iterator(basic_istream<_CharT, _Traits>& __is) 
-{ this->_M_init(_M_get_istreambuf(__is)); }
-
-template<class _CharT, class _Traits>
-inline bool _STLP_CALL operator==(const istreambuf_iterator<_CharT, _Traits>& __x,
-                                  const istreambuf_iterator<_CharT, _Traits>& __y) {
-  return __x.equal(__y);
-}
-
-#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE
-
-template<class _CharT, class _Traits>
-inline bool _STLP_CALL operator!=(const istreambuf_iterator<_CharT, _Traits>& __x,
-                                  const istreambuf_iterator<_CharT, _Traits>& __y) {
-  return !__x.equal(__y);
-}
-
-#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */
-
-# if defined (_STLP_USE_TEMPLATE_EXPORT)
-_STLP_EXPORT_TEMPLATE_CLASS istreambuf_iterator<char, char_traits<char> >;
-#  if defined (INSTANTIATE_WIDE_STREAMS)
-_STLP_EXPORT_TEMPLATE_CLASS istreambuf_iterator<wchar_t, char_traits<wchar_t> >;
-#  endif
-# endif /* _STLP_USE_TEMPLATE_EXPORT */
-
-# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES
-template <class _CharT, class _Traits>
-inline input_iterator_tag _STLP_CALL iterator_category(const istreambuf_iterator<_CharT, _Traits>&) { return input_iterator_tag(); }
-template <class _CharT, class _Traits>
-inline streamoff* _STLP_CALL 
-distance_type(const istreambuf_iterator<_CharT, _Traits>&) { return (streamoff*)0; }
-template <class _CharT, class _Traits>
-inline _CharT* _STLP_CALL value_type(const istreambuf_iterator<_CharT, _Traits>&) { return (_CharT*)0; }
-# endif
-
-template <class _CharT, class _Traits>
-istreambuf_iterator<_CharT, _Traits>
-istreambuf_iterator<_CharT, _Traits>::operator++(int) {
-  istreambuf_iterator<_CharT, _Traits> __tmp = *this;
-  this->_M_bumpc();
-  this->_M_have_c = false;
-  return __tmp;
-}
-
-_STLP_END_NAMESPACE
-
-#endif /* _STLP_INTERNAL_ISTREAMBUF_ITERATOR_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/stl/_iterator.h b/src/STLport/stl/_iterator.h
deleted file mode 100644
index 34baef7..0000000
--- a/src/STLport/stl/_iterator.h
+++ /dev/null
@@ -1,269 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996-1998
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_ITERATOR_H
-#define _STLP_INTERNAL_ITERATOR_H
-
-#ifndef _STLP_INTERNAL_ITERATOR_BASE_H
-# include <stl/_iterator_base.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-#if defined ( _STLP_CLASS_PARTIAL_SPECIALIZATION )
-// This is the new version of reverse_iterator, as defined in the
-//  draft C++ standard.  It relies on the iterator_traits template,
-//  which in turn relies on partial specialization.  The class
-//  reverse_bidirectional_iterator is no longer part of the draft
-//  standard, but it is retained for backward compatibility.
-
-template <class _Iterator>
-class reverse_iterator : 
-  public iterator<typename iterator_traits<_Iterator>::iterator_category,
-                  typename iterator_traits<_Iterator>::value_type,
-                  typename iterator_traits<_Iterator>::difference_type,
-                  typename iterator_traits<_Iterator>::pointer,
-                  typename iterator_traits<_Iterator>::reference>
-{
-protected:
-  _Iterator current;
-  typedef reverse_iterator<_Iterator> _Self;
-public:
-  typedef typename iterator_traits<_Iterator>::iterator_category  iterator_category;
-  typedef typename iterator_traits<_Iterator>::value_type value_type;
-  typedef typename iterator_traits<_Iterator>::difference_type difference_type;
-  typedef typename iterator_traits<_Iterator>::pointer pointer;
-  typedef typename iterator_traits<_Iterator>::reference reference;
-  typedef _Iterator iterator_type;
-public:
-  reverse_iterator() {}
-  explicit reverse_iterator(iterator_type __x) : current(__x) {}
-  reverse_iterator(const _Self& __x) : current(__x.current) {}
-  _Self& operator = (const _Self& __x) { current = __x.base(); return *this; } 
-#ifdef _STLP_MEMBER_TEMPLATES
-  template <class _Iter>
-  reverse_iterator(const reverse_iterator<_Iter>& __x) : current(__x.base()) {}
-  template <class _Iter>
-  _Self& operator = (const reverse_iterator<_Iter>& __x) { current = __x.base(); return *this; } 
-#endif /* _STLP_MEMBER_TEMPLATES */
-    
-  iterator_type base() const { return current; }
-  reference operator*() const {
-    _Iterator __tmp = current;
-    return *--__tmp;
-  }
-  _STLP_DEFINE_ARROW_OPERATOR
-  _Self& operator++() {
-    --current;
-    return *this;
-  }
-  _Self operator++(int) {
-    _Self __tmp = *this;
-    --current;
-    return __tmp;
-  }
-  _Self& operator--() {
-    ++current;
-    return *this;
-  }
-  _Self operator--(int) {
-    _Self __tmp = *this;
-    ++current;
-    return __tmp;
-  }
-
-  _Self operator+(difference_type __n) const {
-    return _Self(current - __n);
-  }
-  _Self& operator+=(difference_type __n) {
-    current -= __n;
-    return *this;
-  }
-  _Self operator-(difference_type __n) const {
-    return _Self(current + __n);
-  }
-  _Self& operator-=(difference_type __n) {
-    current += __n;
-    return *this;
-  }
-  reference operator[](difference_type __n) const { return *(*this + __n); }  
-}; 
- 
-template <class _Iterator>
-inline bool  _STLP_CALL operator==(const reverse_iterator<_Iterator>& __x, 
-                       const reverse_iterator<_Iterator>& __y) {
-  return __x.base() == __y.base();
-}
-
-template <class _Iterator>
-inline bool _STLP_CALL operator<(const reverse_iterator<_Iterator>& __x, 
-                      const reverse_iterator<_Iterator>& __y) {
-  return __y.base() < __x.base();
-}
-
-#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE
-
-template <class _Iterator>
-inline bool _STLP_CALL operator!=(const reverse_iterator<_Iterator>& __x, 
-                       const reverse_iterator<_Iterator>& __y) {
-  return !(__x == __y);
-}
-
-template <class _Iterator>
-inline bool _STLP_CALL operator>(const reverse_iterator<_Iterator>& __x, 
-                      const reverse_iterator<_Iterator>& __y) {
-  return __y < __x;
-}
-
-template <class _Iterator>
-inline bool _STLP_CALL operator<=(const reverse_iterator<_Iterator>& __x, 
-                       const reverse_iterator<_Iterator>& __y) {
-  return !(__y < __x);
-}
-
-template <class _Iterator>
-inline bool _STLP_CALL operator>=(const reverse_iterator<_Iterator>& __x, 
-                      const reverse_iterator<_Iterator>& __y) {
-  return !(__x < __y);
-}
-
-#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */
-
-template <class _Iterator>
-# ifdef __SUNPRO_CC
-inline ptrdiff_t _STLP_CALL
-# else
-inline typename reverse_iterator<_Iterator>::difference_type _STLP_CALL
-# endif
-operator-(const reverse_iterator<_Iterator>& __x, 
-          const reverse_iterator<_Iterator>& __y) {
-  return __y.base() - __x.base();
-}
-
-template <class _Iterator, class _DifferenceType>
-inline reverse_iterator<_Iterator>  _STLP_CALL
-operator+(_DifferenceType n,const reverse_iterator<_Iterator>& x) {
-  return x.operator+(n);
-}
-
-# endif
-
-template <class _Container>
-class back_insert_iterator 
-  : public iterator<output_iterator_tag,void,void,void,void>
-{
-protected:
-  _Container* container;
-public:
-  typedef _Container          container_type;
-  typedef output_iterator_tag iterator_category;
-
-  explicit back_insert_iterator(_Container& __x) : container(&__x) {}
-  back_insert_iterator<_Container>&
-  operator=(const typename _Container::value_type& __val) { 
-    container->push_back(__val);
-    return *this;
-  }
-  back_insert_iterator<_Container>& operator*() { return *this; }
-  back_insert_iterator<_Container>& operator++() { return *this; }
-  back_insert_iterator<_Container>  operator++(int) { return *this; }
-};
-
-template <class _Container>
-inline back_insert_iterator<_Container>  _STLP_CALL back_inserter(_Container& __x) {
-  return back_insert_iterator<_Container>(__x);
-}
-
-template <class _Container>
-class front_insert_iterator 
-  : public iterator<output_iterator_tag,void,void,void,void>
-{
-protected:
-  _Container* container;
-public:
-  typedef _Container          container_type;
-  typedef output_iterator_tag iterator_category;
-  explicit front_insert_iterator(_Container& __x) : container(&__x) {}
-  front_insert_iterator<_Container>&
-  operator=(const typename _Container::value_type& __val) { 
-    container->push_front(__val);
-    return *this;
-  }
-  front_insert_iterator<_Container>& operator*() { return *this; }
-  front_insert_iterator<_Container>& operator++() { return *this; }
-  front_insert_iterator<_Container>& operator++(int) { return *this; }
-};
-
-template <class _Container>
-inline front_insert_iterator<_Container>  _STLP_CALL front_inserter(_Container& __x) {
-  return front_insert_iterator<_Container>(__x);
-}
-
-template <class _Container>
-class insert_iterator 
-  : public iterator<output_iterator_tag,void,void,void,void>
-{
-protected:
-  _Container* container;
-  typename _Container::iterator iter;
-public:
-  typedef _Container          container_type;
-  typedef output_iterator_tag iterator_category;
-  insert_iterator(_Container& __x, typename _Container::iterator __i) 
-    : container(&__x), iter(__i) {}
-  insert_iterator<_Container>&
-  operator=(const typename _Container::value_type& __val) { 
-    iter = container->insert(iter, __val);
-    ++iter;
-    return *this;
-  }
-  insert_iterator<_Container>& operator*() { return *this; }
-  insert_iterator<_Container>& operator++() { return *this; }
-  insert_iterator<_Container>& operator++(int) { return *this; }
-};
-
-template <class _Container, class _Iterator>
-inline insert_iterator<_Container>  _STLP_CALL
-inserter(_Container& __x, _Iterator __i)
-{
-  typedef typename _Container::iterator __iter;
-  return insert_iterator<_Container>(__x, __iter(__i));
-}
-
-_STLP_END_NAMESPACE
-
-#if ! defined ( _STLP_CLASS_PARTIAL_SPECIALIZATION ) || defined (_STLP_USE_OLD_HP_ITERATOR_QUERIES)
-# include <stl/_iterator_old.h>
-#endif /* __NO_PARTIAL_SPEC || ANACHRONISMS */
-
-#endif /* _STLP_INTERNAL_ITERATOR_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_iterator_base.h b/src/STLport/stl/_iterator_base.h
deleted file mode 100644
index 26b5161..0000000
--- a/src/STLport/stl/_iterator_base.h
+++ /dev/null
@@ -1,463 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996-1998
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_ITERATOR_BASE_H
-#define _STLP_INTERNAL_ITERATOR_BASE_H
-
-#ifndef _STLP_CSTDDEF
-# include <cstddef>
-#endif
-
-# if defined  (_STLP_IMPORT_VENDOR_CSTD) && ! defined (_STLP_VENDOR_GLOBAL_CSTD)
-_STLP_BEGIN_NAMESPACE  
-using namespace _STLP_VENDOR_CSTD;
-_STLP_END_NAMESPACE
-#endif /* _STLP_IMPORT_VENDOR_CSTD */
-
-#ifndef __TYPE_TRAITS_H
-# include <stl/type_traits.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-struct input_iterator_tag {};
-struct output_iterator_tag {};
-struct forward_iterator_tag : public input_iterator_tag {};
-struct bidirectional_iterator_tag : public forward_iterator_tag {};
-struct random_access_iterator_tag : public bidirectional_iterator_tag {};
-
-
-template <class _Category, class _Tp, __DFL_TMPL_PARAM(_Distance,ptrdiff_t),
-          __DFL_TMPL_PARAM(_Pointer,_Tp*), __DFL_TMPL_PARAM(_Reference,_Tp&) >
-struct iterator {
-  typedef _Category  iterator_category;
-  typedef _Tp        value_type;
-  typedef _Distance  difference_type;
-  typedef _Pointer   pointer;
-  typedef _Reference reference;
-};
-_STLP_TEMPLATE_NULL
-struct iterator<output_iterator_tag, void, void, void, void> {
-  typedef output_iterator_tag  iterator_category;
-#ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION
-  typedef void                value_type;
-  typedef void                difference_type;
-  typedef void                pointer;
-  typedef void                reference;
-#endif
-};
-
-# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES
-#  define _STLP_ITERATOR_CATEGORY(_It, _Tp) iterator_category(_It)
-#  define _STLP_DISTANCE_TYPE(_It, _Tp)     distance_type(_It)
-#  define _STLP_VALUE_TYPE(_It, _Tp)        value_type(_It)
-# else
-#  ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION
-#   define _STLP_VALUE_TYPE(_It, _Tp)        (typename iterator_traits< _Tp >::value_type*)0
-#   define _STLP_DISTANCE_TYPE(_It, _Tp)     (typename iterator_traits< _Tp >::difference_type*)0
-#   if defined (__BORLANDC__) || defined (__SUNPRO_CC) || ( defined (__MWERKS__) && (__MWERKS__ <= 0x2303)) || ( defined (__sgi) && defined (_COMPILER_VERSION)) || defined (__DMC__)
-#    define _STLP_ITERATOR_CATEGORY(_It, _Tp) iterator_traits< _Tp >::iterator_category()
-#   else
-#    define _STLP_ITERATOR_CATEGORY(_It, _Tp) typename iterator_traits< _Tp >::iterator_category()
-#   endif
-#  else
-#   define _STLP_ITERATOR_CATEGORY(_It, _Tp) __iterator_category(_It, _IsPtrType<_Tp>::_Ret())
-#   define _STLP_DISTANCE_TYPE(_It, _Tp)     (ptrdiff_t*)0
-#   define _STLP_VALUE_TYPE(_It, _Tp)        __value_type(_It, _IsPtrType<_Tp>::_Ret() )
-#  endif
-# endif
-
-template <class _Iterator>
-struct iterator_traits {
-  typedef typename _Iterator::iterator_category iterator_category;
-  typedef typename _Iterator::value_type        value_type;
-  typedef typename _Iterator::difference_type   difference_type;
-  typedef typename _Iterator::pointer           pointer;
-  typedef typename _Iterator::reference         reference;
-};
-
-
-# if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && ! defined (__SUNPRO_CC)
-#  define _STLP_DIFFERENCE_TYPE(_Iterator) typename iterator_traits<_Iterator>::difference_type
-# else
-#  define _STLP_DIFFERENCE_TYPE(_Iterator) ptrdiff_t
-# endif
-
-# ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION
-
-// fbp : this order keeps gcc happy
-template <class _Tp>
-struct iterator_traits<const _Tp*> {
-  typedef random_access_iterator_tag iterator_category;
-  typedef _Tp                         value_type;
-  typedef ptrdiff_t                   difference_type;
-  typedef const _Tp*                  pointer;
-  typedef const _Tp&                  reference;
-};
-
-template <class _Tp>
-struct iterator_traits<_Tp*> {
-  typedef random_access_iterator_tag iterator_category;
-  typedef _Tp                         value_type;
-  typedef ptrdiff_t                   difference_type;
-  typedef _Tp*                        pointer;
-  typedef _Tp&                        reference;
-};
-
-#  if defined (__BORLANDC__)
-template <class _Tp>
-struct iterator_traits<_Tp* const> {
-  typedef random_access_iterator_tag iterator_category;
-  typedef _Tp                         value_type;
-  typedef ptrdiff_t                   difference_type;
-  typedef const _Tp*                  pointer;
-  typedef const _Tp&                  reference;
-};
-#  endif
-
-# endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
-
-
-# if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) \
-  || (defined (_STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS) && ! defined (_STLP_NO_ARROW_OPERATOR))
-#  define _STLP_POINTERS_SPECIALIZE( _TpP )
-#  define _STLP_DEFINE_ARROW_OPERATOR  pointer operator->() const { return &(operator*()); }
-# else 
-#  include <stl/_ptrs_specialize.h>
-# endif
-
-# ifndef _STLP_USE_OLD_HP_ITERATOR_QUERIES
-// The overloaded functions iterator_category, distance_type, and
-// value_type are not part of the C++ standard.  (They have been
-// replaced by struct iterator_traits.)  They are included for
-// backward compatibility with the HP STL.
-// We introduce internal names for these functions.
-
-#  ifdef  _STLP_CLASS_PARTIAL_SPECIALIZATION
-
-template <class _Iter>
-inline typename iterator_traits<_Iter>::iterator_category __iterator_category(const _Iter&) {
-  typedef typename iterator_traits<_Iter>::iterator_category _Category;
-  return _Category();
-}
-
-template <class _Iter>
-inline typename iterator_traits<_Iter>::difference_type* __distance_type(const _Iter&) {
-  typedef typename iterator_traits<_Iter>::difference_type _diff_type;
-  return __STATIC_CAST(_diff_type*,0);
-}
-
-template <class _Iter>
-inline typename iterator_traits<_Iter>::value_type* __value_type(const _Iter&) {
-  typedef typename iterator_traits<_Iter>::value_type _value_type;
-  return __STATIC_CAST(_value_type*,0);
-}
-
-# else
-
-template <class _Iter>
-inline random_access_iterator_tag 
-__iterator_category(const _Iter&, const __true_type&) {
-  return random_access_iterator_tag();
-}
-
-template <class _Iter>
-inline _STLP_TYPENAME_ON_RETURN_TYPE iterator_traits<_Iter>::iterator_category
-__iterator_category(const _Iter&, const __false_type&) {
-  typedef typename iterator_traits<_Iter>::iterator_category _Category;
-  return _Category();
-}
-
-
-template <class _Iter>
-inline ptrdiff_t* _STLP_CALL __distance_type(const _Iter&) { return (ptrdiff_t*)(0); }
-
-template <class _Iter>
-inline _STLP_TYPENAME_ON_RETURN_TYPE iterator_traits<_Iter>::value_type* 
-__value_type(const _Iter&, const __false_type&) {
-  typedef typename iterator_traits<_Iter>::value_type _value_type;
-  return __STATIC_CAST(_value_type*,0);
-}
-
-template <class _Tp>
-inline _Tp*  
-__value_type(const _Tp*, const __true_type&) {
-  return __STATIC_CAST(_Tp*, 0);
-}
-
-# endif
-
-#else /* old queries */
-template <class _Category, class _Tp, class _Distance, class _Pointer, class _Reference>
-inline _Category _STLP_CALL iterator_category(const iterator<_Category,_Tp,_Distance,_Pointer,_Reference>&) { return _Category(); }
-template <class _Category, class _Tp, class _Distance, class _Pointer, class _Reference>
-inline _Tp* _STLP_CALL value_type(const iterator<_Category,_Tp,_Distance,_Pointer,_Reference>&) { return (_Tp*)(0); }
-template <class _Category, class _Tp, class _Distance, class _Pointer, class _Reference>
-inline _Distance* _STLP_CALL distance_type(const iterator<_Category,_Tp,_Distance,_Pointer,_Reference>&) { return (_Distance*)(0); }
-template <class _Tp>
-inline random_access_iterator_tag _STLP_CALL iterator_category(const _Tp*) { return random_access_iterator_tag(); }
-template <class _Tp>
-inline _Tp* _STLP_CALL value_type(const _Tp*) { return (_Tp*)(0); }
-template <class _Tp>
-inline ptrdiff_t* _STLP_CALL distance_type(const _Tp*) { return (ptrdiff_t*)(0); }
-#endif /* _STLP_USE_OLD_HP_ITERATOR_QUERIES */
-
-# if ! defined (_STLP_NO_ANACHRONISMS)
-// The base classes input_iterator, output_iterator, forward_iterator,
-// bidirectional_iterator, and random_access_iterator are not part of
-// the C++ standard.  (They have been replaced by struct iterator.)
-// They are included for backward compatibility with the HP STL.
-template <class _Tp, class _Distance> struct input_iterator : 
-  public iterator <input_iterator_tag, _Tp, _Distance, _Tp*, _Tp&> {};
-struct output_iterator : public iterator <output_iterator_tag, void, void, void, void> {};
-template <class _Tp, class _Distance> struct forward_iterator :
-  public iterator<forward_iterator_tag, _Tp, _Distance, _Tp*, _Tp&> {};
-template <class _Tp, class _Distance> struct bidirectional_iterator :
-  public iterator<bidirectional_iterator_tag, _Tp, _Distance, _Tp*, _Tp&> {};
-template <class _Tp, class _Distance> struct random_access_iterator :
-  public iterator<random_access_iterator_tag, _Tp, _Distance, _Tp*, _Tp&> {};
-
-# if defined (_STLP_BASE_MATCH_BUG) && defined (_STLP_USE_OLD_HP_ITERATOR_QUERIES)
-template <class _Tp, class _Distance> 
-inline input_iterator_tag _STLP_CALL 
-iterator_category(const input_iterator<_Tp, _Distance>&) { return input_iterator_tag(); }
-inline output_iterator_tag _STLP_CALL
-iterator_category(const output_iterator&) { return output_iterator_tag(); }
-template <class _Tp, class _Distance> 
-inline forward_iterator_tag _STLP_CALL
-iterator_category(const forward_iterator<_Tp, _Distance>&) { return forward_iterator_tag(); }
-template <class _Tp, class _Distance> 
-inline bidirectional_iterator_tag _STLP_CALL 
-iterator_category(const bidirectional_iterator<_Tp, _Distance>&) { return bidirectional_iterator_tag(); }
-template <class _Tp, class _Distance> 
-inline random_access_iterator_tag _STLP_CALL
-iterator_category(const random_access_iterator<_Tp, _Distance>&) { return random_access_iterator_tag(); }
-template <class _Tp, class _Distance> 
-inline _Tp*  _STLP_CALL value_type(const input_iterator<_Tp, _Distance>&) { return (_Tp*)(0); }
-template <class _Tp, class _Distance> 
-inline _Tp* _STLP_CALL value_type(const forward_iterator<_Tp, _Distance>&) { return (_Tp*)(0); }
-template <class _Tp, class _Distance> 
-inline _Tp* _STLP_CALL value_type(const bidirectional_iterator<_Tp, _Distance>&) { return (_Tp*)(0); }
-template <class _Tp, class _Distance> 
-inline _Tp* _STLP_CALL value_type(const random_access_iterator<_Tp, _Distance>&) { return (_Tp*)(0); }
-template <class _Tp, class _Distance> 
-inline _Distance* _STLP_CALL distance_type(const input_iterator<_Tp, _Distance>&) { return (_Distance*)(0); }
-template <class _Tp, class _Distance> 
-inline _Distance* _STLP_CALL distance_type(const forward_iterator<_Tp, _Distance>&) { return (_Distance*)(0); }
-template <class _Tp, class _Distance> 
-inline _Distance* _STLP_CALL distance_type(const bidirectional_iterator<_Tp, _Distance>&) { return (_Distance*)(0);}
-template <class _Tp, class _Distance> 
-inline _Distance* _STLP_CALL distance_type(const random_access_iterator<_Tp, _Distance>&) { return (_Distance*)(0); }
-# endif /* BASE_MATCH */
-
-#endif /* _STLP_NO_ANACHRONISMS */
-
-template <class _InputIterator, class _Distance>
-inline void _STLP_CALL __distance(const _InputIterator& __first, const _InputIterator& __last,
-				  _Distance& __n, const input_iterator_tag &) {
-  _InputIterator __it(__first);
-  while (__it != __last) { ++__it; ++__n; }
-}
-
-# if defined (_STLP_NONTEMPL_BASE_MATCH_BUG) 
-template <class _ForwardIterator, class _Distance>
-inline void _STLP_CALL __distance(const _ForwardIterator& __first, const _ForwardIterator& __last,
-				  _Distance& __n, const forward_iterator_tag &) {
-  _ForwardIterator __it(__first);
-  while (__it != __last) { ++__first; ++__n; }
-}
-
-template <class _BidirectionalIterator, class _Distance>
-_STLP_INLINE_LOOP void _STLP_CALL __distance(const _BidirectionalIterator& __first, 
-					     const _BidirectionalIterator& __last,
-					     _Distance& __n, const bidirectional_iterator_tag &) {
-  _BidirectionalIterator __it(__first);
-  while (__it != __last) { ++__it; ++__n; }
-}
-# endif
-
-template <class _RandomAccessIterator, class _Distance>
-inline void _STLP_CALL __distance(const _RandomAccessIterator& __first, 
-				  const _RandomAccessIterator& __last, 
-				  _Distance& __n, const random_access_iterator_tag &) {
-  __n += __last - __first;
-}
-
-#ifndef _STLP_NO_ANACHRONISMS 
-template <class _InputIterator, class _Distance>
-inline void _STLP_CALL distance(const _InputIterator& __first, 
-				const _InputIterator& __last, _Distance& __n) {
-  __distance(__first, __last, __n, _STLP_ITERATOR_CATEGORY(__first, _InputIterator));
-}
-#endif
-
-template <class _InputIterator>
-inline _STLP_DIFFERENCE_TYPE(_InputIterator) _STLP_CALL
-__distance(const _InputIterator& __first, const _InputIterator& __last, const input_iterator_tag &) {
-  _STLP_DIFFERENCE_TYPE(_InputIterator) __n = 0;
-  _InputIterator __it(__first);  
-  while (__it != __last) {
-    ++__it; ++__n;
-  }
-  return __n;
-}
-
-# if defined (_STLP_NONTEMPL_BASE_MATCH_BUG) 
-template <class _ForwardIterator>
-inline _STLP_DIFFERENCE_TYPE(_ForwardIterator) _STLP_CALL 
-__distance(const _ForwardIterator& __first, const _ForwardIterator& __last,
-           const forward_iterator_tag &)
-{
-  _STLP_DIFFERENCE_TYPE(_ForwardIterator) __n = 0;
-  _ForwardIterator __it(__first);
-  while (__it != __last) {
-    ++__it; ++__n;
-  }
-  return __n;
-}
-
-template <class _BidirectionalIterator>
-_STLP_INLINE_LOOP _STLP_DIFFERENCE_TYPE(_BidirectionalIterator) _STLP_CALL 
-__distance(const _BidirectionalIterator& __first, 
-           const _BidirectionalIterator& __last,
-           const bidirectional_iterator_tag &) {
-  _STLP_DIFFERENCE_TYPE(_BidirectionalIterator) __n = 0;
-  _BidirectionalIterator __it(__first);
-  while (__it != __last) {
-    ++__it; ++__n;
-  }
-  return __n;
-}
-# endif
-
-template <class _RandomAccessIterator>
-inline _STLP_DIFFERENCE_TYPE(_RandomAccessIterator) _STLP_CALL
-__distance(const _RandomAccessIterator& __first, const _RandomAccessIterator& __last,
-           const random_access_iterator_tag &) {
-  return __last - __first;
-}
-
-template <class _InputIterator>
-inline _STLP_DIFFERENCE_TYPE(_InputIterator) _STLP_CALL
-distance(const _InputIterator& __first, const _InputIterator& __last) {
-  return __distance(__first, __last, _STLP_ITERATOR_CATEGORY(__first, _InputIterator));  
-}
-
-
-// fbp: those are being used for iterator/const_iterator definitions everywhere
-template <class _Tp>
-struct _Nonconst_traits;
-
-template <class _Tp>
-struct _Const_traits {
-  typedef _Tp value_type;
-  typedef const _Tp&  reference;
-  typedef const _Tp*  pointer;
-  typedef _Nonconst_traits<_Tp> _Non_const_traits;
-};
-
-template <class _Tp>
-struct _Nonconst_traits {
-  typedef _Tp value_type;
-  typedef _Tp& reference;
-  typedef _Tp* pointer;
-  typedef _Nonconst_traits<_Tp> _Non_const_traits;
-};
-
-#  if defined (_STLP_BASE_TYPEDEF_BUG)
-// this workaround is needed for SunPro 4.0.1
-template <class _Traits>
-struct __cnst_traits_aux : private _Traits
-{
-  typedef typename _Traits::value_type value_type;
-};
-#  define __TRAITS_VALUE_TYPE(_Traits) __cnst_traits_aux<_Traits>::value_type
-#  else
-#  define __TRAITS_VALUE_TYPE(_Traits) _Traits::value_type
-#  endif
-
-# if defined (_STLP_MSVC)
-// MSVC specific
-template <class _InputIterator, class _Dist>
-inline void  _STLP_CALL _Distance(_InputIterator __first, 
-		      _InputIterator __last, _Dist& __n) {
-  __distance(__first, __last, __n, _STLP_ITERATOR_CATEGORY(__first, _InputIterator));
-}
-# endif
-
-template <class _InputIter, class _Distance>
-_STLP_INLINE_LOOP void  _STLP_CALL __advance(_InputIter& __i, _Distance __n, const input_iterator_tag &) {
-  while (__n--) ++__i;
-}
-
-// fbp : added output iterator tag variant
-template <class _InputIter, class _Distance>
-_STLP_INLINE_LOOP void  _STLP_CALL __advance(_InputIter& __i, _Distance __n, const output_iterator_tag &) {
-  while (__n--) ++__i;
-}
-
-# if defined (_STLP_NONTEMPL_BASE_MATCH_BUG)
-template <class _ForwardIterator, class _Distance>
-_STLP_INLINE_LOOP void _STLP_CALL __advance(_ForwardIterator& i, _Distance n, const forward_iterator_tag &) {
-    while (n--) ++i;
-}
-# endif
-
-template <class _BidirectionalIterator, class _Distance>
-_STLP_INLINE_LOOP void _STLP_CALL __advance(_BidirectionalIterator& __i, _Distance __n, 
-                      const bidirectional_iterator_tag &) {
-  if (__n > 0)
-    while (__n--) ++__i;
-  else
-    while (__n++) --__i;
-}
-
-template <class _RandomAccessIterator, class _Distance>
-inline void _STLP_CALL __advance(_RandomAccessIterator& __i, _Distance __n, 
-                      const random_access_iterator_tag &) {
-  __i += __n;
-}
-
-template <class _InputIterator, class _Distance>
-inline void _STLP_CALL advance(_InputIterator& __i, _Distance __n) {
-  __advance(__i, __n, _STLP_ITERATOR_CATEGORY(__i, _InputIterator));
-}
-
-_STLP_END_NAMESPACE
-
-# if defined (_STLP_DEBUG) && ! defined (_STLP_DEBUG_H)
-#  include <stl/debug/_debug.h>
-# endif
-
-#endif /* _STLP_INTERNAL_ITERATOR_BASE_H */
-
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_iterator_old.h b/src/STLport/stl/_iterator_old.h
deleted file mode 100644
index 3b3b038..0000000
--- a/src/STLport/stl/_iterator_old.h
+++ /dev/null
@@ -1,351 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996-1998
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_ITERATOR_OLD_H
-#define _STLP_INTERNAL_ITERATOR_OLD_H
-
-#ifndef _STLP_INTERNAL_ITERATOR_BASE_H
-# include <stl/_iterator_base.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES
-
-template <class _Container>
-inline output_iterator_tag _STLP_CALL
-iterator_category(const back_insert_iterator<_Container>&) { return output_iterator_tag(); }
-template <class _Container>
-inline output_iterator_tag _STLP_CALL
-iterator_category(const front_insert_iterator<_Container>&) { return output_iterator_tag(); }
-template <class _Container>
-inline output_iterator_tag _STLP_CALL
-iterator_category(const insert_iterator<_Container>&) { return output_iterator_tag(); }
-
-# endif
-
-# if defined (_STLP_MSVC50_COMPATIBILITY)
-# define __Reference _Reference, class _Pointer
-# define Reference__ _Reference, _Pointer
-template <class _BidirectionalIterator, class _Tp, 
-    __DFL_TMPL_PARAM(_Reference, _Tp& ),
-    __DFL_TMPL_PARAM(_Pointer, _Tp*),
-    __DFL_TYPE_PARAM(_Distance, ptrdiff_t)> 
-# else
-# define __Reference _Reference
-# define Reference__ _Reference
-template <class _BidirectionalIterator, class _Tp, __DFL_TMPL_PARAM(_Reference, _Tp& ),
-    __DFL_TYPE_PARAM(_Distance, ptrdiff_t)> 
-# endif
-class reverse_bidirectional_iterator {
-  typedef reverse_bidirectional_iterator<_BidirectionalIterator, _Tp, 
-                                         Reference__, _Distance> _Self;
-  //  friend inline bool operator== _STLP_NULL_TMPL_ARGS (const _Self& x, const _Self& y);
-protected:
-  _BidirectionalIterator current;
-public:
-  typedef bidirectional_iterator_tag iterator_category;
-  typedef _Tp                        value_type;
-  typedef _Distance                  difference_type;
-# if defined (_STLP_MSVC50_COMPATIBILITY)
-  typedef _Pointer                   pointer;
-# else
-  typedef _Tp*                       pointer;
-# endif
-  typedef _Reference                 reference;
-
-  reverse_bidirectional_iterator() {}
-  explicit reverse_bidirectional_iterator(_BidirectionalIterator __x)
-    : current(__x) {}
-  _BidirectionalIterator base() const { return current; }
-  _Reference operator*() const {
-    _BidirectionalIterator __tmp = current;
-    return *--__tmp;
-  }
-# if !(defined _STLP_NO_ARROW_OPERATOR)
-  _STLP_DEFINE_ARROW_OPERATOR
-# endif
-  _Self& operator++() {
-    --current;
-    return *this;
-  }
-  _Self operator++(int) {
-    _Self __tmp = *this;
-    --current;
-    return __tmp;
-  }
-  _Self& operator--() {
-    ++current;
-    return *this;
-  }
-  _Self operator--(int) {
-    _Self __tmp = *this;
-    ++current;
-    return __tmp;
-  }
-};
-
-# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES
-template <class _BidirectionalIterator, class _Tp, class __Reference, 
-          class _Distance>
-inline bidirectional_iterator_tag _STLP_CALL
-iterator_category(const reverse_bidirectional_iterator<_BidirectionalIterator, _Tp, Reference__, _Distance>&) 
-{ return bidirectional_iterator_tag(); }
-template <class _BidirectionalIterator, class _Tp, class __Reference, 
-  class _Distance>
-inline _Tp* _STLP_CALL
-value_type(const reverse_bidirectional_iterator<_BidirectionalIterator, _Tp, Reference__, _Distance>&)
-{ return (_Tp*) 0; }
-template <class _BidirectionalIterator, class _Tp, class __Reference, 
-          class _Distance>
-inline _Distance* _STLP_CALL
-distance_type(const reverse_bidirectional_iterator<_BidirectionalIterator, _Tp, Reference__, _Distance>&)
-{ return (_Distance*) 0; }
-#endif
-
-template <class _BidirectionalIterator, class _Tp, class __Reference, 
-          class _Distance>
-inline bool  _STLP_CALL operator==(
-    const reverse_bidirectional_iterator<_BidirectionalIterator, _Tp,
-                                               Reference__, _Distance>& __x,
-    const reverse_bidirectional_iterator<_BidirectionalIterator, _Tp,
-                                               Reference__, _Distance>& __y)
-{
-  return __x.base() == __y.base();
-}
-
-#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE
-
-template <class _BiIter, class _Tp, class __Reference, class _Distance>
-inline bool  _STLP_CALL operator!=(
-    const reverse_bidirectional_iterator<_BiIter, _Tp, Reference__, _Distance>& __x, 
-    const reverse_bidirectional_iterator<_BiIter, _Tp, Reference__, _Distance>& __y)
-{
-  return !(__x == __y);
-}
-
-#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */
-
-#if ! defined ( _STLP_CLASS_PARTIAL_SPECIALIZATION )
-
-// This is the old version of reverse_iterator, as found in the original
-//  HP STL.  It does not use partial specialization.
-
-template <class _RandomAccessIterator, 
-# if defined (__MSL__) && (__MSL__ >= 0x2405) \
-	|| defined(__MRC__) || (defined(__SC__) && !defined(__DMC__))		//*ty 03/22/2001 - give the default to the secont param under MPW. 
-												// I believe giving the default will cause any harm even though the 2nd type parameter 
-												// still have to be provided for T* type iterators.
-	__DFL_TMPL_PARAM(_Tp,iterator_traits<_RandomAccessIterator>::value_type),
-# else
-	class _Tp,
-#endif
- __DFL_TMPL_PARAM(_Reference,_Tp&),
-# if defined (_STLP_MSVC50_COMPATIBILITY)
-        __DFL_TMPL_PARAM(_Pointer, _Tp*),
-# endif
-        __DFL_TYPE_PARAM(_Distance,ptrdiff_t)> 
-class reverse_iterator {
-  typedef reverse_iterator<_RandomAccessIterator, _Tp, Reference__, _Distance>
-          _Self;
-protected:
-  _RandomAccessIterator __current;
-public:
-  typedef random_access_iterator_tag iterator_category;
-  typedef _Tp                        value_type;
-  typedef _Distance                  difference_type;
-# if defined (_STLP_MSVC50_COMPATIBILITY)
-  typedef _Pointer                   pointer;
-# else
-  typedef _Tp*                       pointer;
-# endif
-  typedef _Reference                 reference;
-
-  reverse_iterator() {}
-  reverse_iterator(const _Self& __x) : __current(__x.base()) {}
-  explicit reverse_iterator(_RandomAccessIterator __x) : __current(__x) {}
-  _Self& operator=(const _Self& __x) {__current = __x.base(); return *this; }  
-       
-  _RandomAccessIterator base() const { return __current; }
-  _Reference operator*() const { return *(__current - (difference_type)1); }
-
-# if !(defined _STLP_NO_ARROW_OPERATOR)
-  _STLP_DEFINE_ARROW_OPERATOR
-# endif
-
-  _Self& operator++() {
-    --__current;
-    return *this;
-  }
-  _Self operator++(int) {
-    _Self __tmp = *this;
-    --__current;
-    return __tmp;
-  }
-  _Self& operator--() {
-    ++__current;
-    return *this;
-  }
-  _Self operator--(int) {
-    _Self __tmp = *this;
-    ++__current;
-    return __tmp;
-  }
-  _Self operator+(_Distance __n) const {
-    return _Self(__current - __n);
-  }
-  _Self& operator+=(_Distance __n) {
-    __current -= __n;
-    return *this;
-  }
-  _Self operator-(_Distance __n) const {
-    return _Self(__current + __n);
-  }
-  _Self& operator-=(_Distance __n) {
-    __current += __n;
-    return *this;
-  }
-  _Reference operator[](_Distance __n) const { return *(*this + __n); }
-};
-
-# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES
-template <class _RandomAccessIterator, class _Tp, 
-          class __Reference, class _Distance>
-inline random_access_iterator_tag _STLP_CALL
-iterator_category(const reverse_iterator<_RandomAccessIterator, _Tp, Reference__, _Distance>&)
-{ return random_access_iterator_tag(); }
-template <class _RandomAccessIterator, class _Tp,
-  class __Reference, class _Distance>
-inline _Tp*  _STLP_CALL value_type(const reverse_iterator<_RandomAccessIterator, _Tp, Reference__, _Distance>&)
-{ return (_Tp*) 0; }
-template <class _RandomAccessIterator, class _Tp,
-          class __Reference, class _Distance>
-inline _Distance*  _STLP_CALL
-distance_type(const reverse_iterator<_RandomAccessIterator, _Tp, Reference__, _Distance>&)
-{ return (_Distance*) 0; }
-#endif
-
-template <class _RandomAccessIterator, class _Tp,
-          class __Reference, class _Distance>
-inline bool  _STLP_CALL
-operator==(const reverse_iterator<_RandomAccessIterator, _Tp,
-                                  Reference__, _Distance>& __x, 
-           const reverse_iterator<_RandomAccessIterator, _Tp,
-                                  Reference__, _Distance>& __y)
-{
-  return __x.base() == __y.base();
-}
-
-template <class _RandomAccessIterator, class _Tp,
-          class __Reference, class _Distance>
-inline bool _STLP_CALL 
-operator<(const reverse_iterator<_RandomAccessIterator, _Tp,
-                                 Reference__, _Distance>& __x, 
-          const reverse_iterator<_RandomAccessIterator, _Tp,
-                                 Reference__, _Distance>& __y)
-{
-  return __y.base() < __x.base();
-}
-
-#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE
-
-template <class _RandomAccessIterator, class _Tp,
-          class __Reference, class _Distance>
-inline bool _STLP_CALL 
-operator!=(const reverse_iterator<_RandomAccessIterator, _Tp,
-                                  Reference__, _Distance>& __x, 
-           const reverse_iterator<_RandomAccessIterator, _Tp,
-                                  Reference__, _Distance>& __y) {
-  return !(__x == __y);
-}
-
-template <class _RandomAccessIterator, class _Tp,
-          class __Reference, class _Distance>
-inline bool _STLP_CALL 
-operator>(const reverse_iterator<_RandomAccessIterator, _Tp,
-                                 Reference__, _Distance>& __x, 
-          const reverse_iterator<_RandomAccessIterator, _Tp,
-                                 Reference__, _Distance>& __y) {
-  return __y < __x;
-}
-
-template <class _RandomAccessIterator, class _Tp,
-          class __Reference, class _Distance>
-inline bool _STLP_CALL 
-operator<=(const reverse_iterator<_RandomAccessIterator, _Tp,
-                                  Reference__, _Distance>& __x, 
-           const reverse_iterator<_RandomAccessIterator, _Tp,
-                                  Reference__, _Distance>& __y) {
-  return !(__y < __x);
-}
-
-template <class _RandomAccessIterator, class _Tp,
-          class __Reference, class _Distance>
-inline bool _STLP_CALL 
-operator>=(const reverse_iterator<_RandomAccessIterator, _Tp,
-                                  Reference__, _Distance>& __x, 
-           const reverse_iterator<_RandomAccessIterator, _Tp,
-                                  Reference__, _Distance>& __y) {
-  return !(__x < __y);
-}
-
-#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */
-
-template <class _RandomAccessIterator, class _Tp,
-          class __Reference, class _Distance>
-inline _Distance  _STLP_CALL
-operator-(const reverse_iterator<_RandomAccessIterator, _Tp,
-                                 Reference__, _Distance>& __x, 
-          const reverse_iterator<_RandomAccessIterator, _Tp,
-                                 Reference__, _Distance>& __y)
-{
-  return __y.base() - __x.base();
-}
-
-template <class _RandomAccessIterator, class _Tp,
-          class __Reference, class _Distance>
-inline reverse_iterator<_RandomAccessIterator, _Tp,
-                        Reference__, _Distance>  _STLP_CALL
-operator+(_Distance __n,
-          const reverse_iterator<_RandomAccessIterator, _Tp,
-                                 Reference__, _Distance>& __x)
-{
-  return reverse_iterator<_RandomAccessIterator, _Tp,
-                          Reference__, _Distance>(__x.base() - __n);
-}
-
-#endif /* ! defined ( _STLP_CLASS_PARTIAL_SPECIALIZATION ) */
-
-_STLP_END_NAMESPACE
-
-#endif /* _STLP_INTERNAL_ITERATOR_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_limits.c b/src/STLport/stl/_limits.c
deleted file mode 100644
index 5048d3f..0000000
--- a/src/STLport/stl/_limits.c
+++ /dev/null
@@ -1,293 +0,0 @@
-/*
- * Copyright (c) 1998,1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-# if !defined (_STLP_LIMITS_C)
-#  define _STLP_LIMITS_C
-
-#ifndef _STLP_INTERNAL_LIMITS_H
-# include <stl/_limits.h>
-#endif
-
-//==========================================================
-//  numeric_limits static members
-//==========================================================
-
-_STLP_BEGIN_NAMESPACE
-
-# if ! defined ( _STLP_STATIC_CONST_INIT_BUG)
-
-#   define __declare_numeric_base_member(__type, __mem, _Init) \
-template <class __number> \
-  const __type _Numeric_limits_base<__number>:: __mem
-
-__declare_numeric_base_member(bool, is_specialized, false);
-__declare_numeric_base_member(int, digits, 0);
-__declare_numeric_base_member(int, digits10, 0);
-__declare_numeric_base_member(bool, is_signed, false);
-__declare_numeric_base_member(bool, is_integer, false);
-__declare_numeric_base_member(bool, is_exact, false);
-__declare_numeric_base_member(int, radix, 0);
-__declare_numeric_base_member(int, min_exponent, 0);
-__declare_numeric_base_member(int, max_exponent, 0);
-__declare_numeric_base_member(int, min_exponent10, 0);
-__declare_numeric_base_member(int, max_exponent10, 0);
-__declare_numeric_base_member(bool, has_infinity, false);
-__declare_numeric_base_member(bool, has_quiet_NaN, false);
-__declare_numeric_base_member(bool, has_signaling_NaN, false);
-__declare_numeric_base_member(float_denorm_style, has_denorm, denorm_absent);
-__declare_numeric_base_member(bool, has_denorm_loss, false);
-__declare_numeric_base_member(bool, is_iec559, false);
-__declare_numeric_base_member(bool, is_bounded, false);
-__declare_numeric_base_member(bool, is_modulo, false);
-__declare_numeric_base_member(bool, traps, false);
-__declare_numeric_base_member(bool, tinyness_before, false);
-__declare_numeric_base_member(float_round_style, round_style, round_toward_zero);
-
-# undef __declare_numeric_base_member
-
-#   define __declare_integer_limits_member(__type, __mem, _Init) \
-template <class _Int, _STLP_LIMITS_MIN_TYPE __imin, _STLP_LIMITS_MAX_TYPE __imax, int __idigits, bool __ismod> \
-  const __type _Integer_limits<_Int, __imin, __imax, __idigits, __ismod>:: __mem
-
-__declare_integer_limits_member(bool, is_specialized, true);
-__declare_integer_limits_member(int, digits, (__idigits < 0) ? \
-			    ((int)((sizeof(_Int) * (CHAR_BIT))) - ((__imin == 0) ? 0 : 1)) \
-                            : (__idigits) );
-__declare_integer_limits_member(int, digits10, (int)(301UL * digits) /1000);
-__declare_integer_limits_member(bool, is_signed, __imin != 0);
-__declare_integer_limits_member(bool, is_integer, true);
-__declare_integer_limits_member(bool, is_exact, true);
-__declare_integer_limits_member(int, radix, 2);
-__declare_integer_limits_member(bool, is_bounded, true);
-__declare_integer_limits_member(bool, is_modulo, true);
-
-#   define __declare_float_limits_member(__type, __mem, _Init) \
-template <class __number,  \
-         int __Digits, int __Digits10,    \
-         int __MinExp, int __MaxExp,      \
-         int __MinExp10, int __MaxExp10,  \
-         bool __IsIEC559, \
-         float_round_style __RoundStyle> \
-const __type _Floating_limits< __number, __Digits, __Digits10,    \
-         __MinExp, __MaxExp, __MinExp10, __MaxExp10,  \
-         __IsIEC559, __RoundStyle>::\
-         __mem
-
-__declare_float_limits_member(bool, is_specialized, true);  
-__declare_float_limits_member(int, digits, __Digits);  
-__declare_float_limits_member(int, digits10, __Digits10);  
-__declare_float_limits_member(bool, is_signed, true);  
-__declare_float_limits_member(int, radix, FLT_RADIX);  
-__declare_float_limits_member(int, min_exponent, __MinExp);  
-__declare_float_limits_member(int, max_exponent, __MaxExp);  
-__declare_float_limits_member(int, min_exponent10, __MinExp10);  
-__declare_float_limits_member(int, max_exponent10, __MaxExp10);  
-__declare_float_limits_member(bool, has_infinity, true);
-__declare_float_limits_member(bool, has_quiet_NaN, true);
-__declare_float_limits_member(bool, has_signaling_NaN, true);
-__declare_float_limits_member(float_denorm_style, has_denorm, denorm_indeterminate);
-__declare_float_limits_member(bool, has_denorm_loss, false);
-__declare_float_limits_member(bool, is_iec559, __IsIEC559);
-__declare_float_limits_member(bool, is_bounded, true);
-__declare_float_limits_member(bool, traps, true);
-__declare_float_limits_member(bool, tinyness_before, false);
-__declare_float_limits_member(float_round_style, round_style, __RoundStyle);
-
-# endif /* _STLP_STATIC_CONST_INIT_BUG */
-
-
-# ifdef _STLP_EXPOSE_GLOBALS_IMPLEMENTATION
-
-# if defined(_STLP_BIG_ENDIAN)
-# if defined(__OS400__)
-#  define _STLP_FLOAT_INF_REP { 0x7f80, 0 }
-#  define _STLP_FLOAT_QNAN_REP { 0xffc0, 0 }
-#  define _STLP_FLOAT_SNAN_REP { 0xff80, 0 }
-#  define _STLP_DOUBLE_INF_REP { 0x7ff0, 0, 0, 0 }
-#  define _STLP_DOUBLE_QNAN_REP { 0xfff8, 0, 0, 0 }
-#  define _STLP_DOUBLE_SNAN_REP { 0xfff0, 0, 0, 0 }
-#  define _STLP_LDOUBLE_INF_REP { 0x7ff0, 0, 0, 0, 0, 0, 0, 0 }
-#  define _STLP_LDOUBLE_QNAN_REP { 0xfff8, 0, 0, 0, 0, 0, 0, 0 }
-#  define _STLP_LDOUBLE_SNAN_REP { 0xfff0, 0, 0, 0, 0, 0, 0, 0 }
-# else
-#  define _STLP_FLOAT_INF_REP   { 0x7f80, 0 }
-#  define _STLP_FLOAT_SNAN_REP  { 0x7f81, 0 }
-#  define _STLP_FLOAT_QNAN_REP  { 0x7fc1, 0 }
-#  define _STLP_DOUBLE_INF_REP  { 0x7ff0, 0, 0, 0 }
-#  define _STLP_DOUBLE_QNAN_REP { 0x7ff1, 0, 0, 0 }
-#  define _STLP_DOUBLE_SNAN_REP { 0x7ff9, 0, 0, 0 }
-#  define _STLP_LDOUBLE_INF_REP { 0x7ff0, 0, 0, 0, 0, 0, 0, 0 }
-#  define _STLP_LDOUBLE_SNAN_REP { 0x7ff1, 0, 0, 0, 0, 0, 0, 0 }
-#  define _STLP_LDOUBLE_QNAN_REP { 0x7ff9, 0, 0, 0, 0, 0, 0, 0 }
-# endif
-
-# elif defined (_STLP_LITTLE_ENDIAN)
-
-# if 0 /* defined(_STLP_MSVC) || defined(__linux__) */
-// some IA-32 platform ?? 
-#  define _STLP_FLOAT_INF_REP { 0, 0x7f80 }
-#  define _STLP_FLOAT_QNAN_REP { 0, 0xffc0 }
-#  define _STLP_FLOAT_SNAN_REP { 0, 0xff80 }
-
-#  define _STLP_DOUBLE_INF_REP { 0, 0, 0, 0x7ff0 }
-#  define _STLP_DOUBLE_QNAN_REP { 0, 0, 0, 0xfff8 }
-#  define _STLP_DOUBLE_SNAN_REP { 0, 0, 0, 0xfff0 }
-#  define _STLP_LDOUBLE_INF_REP { 0, 0, 0, 0x7FF0, 0 } // ????
-#  define _STLP_LDOUBLE_QNAN_REP { 0, 0, 0, 0xFFF8, 0 } // ????
-#  define _STLP_LDOUBLE_SNAN_REP { 0, 0, 0, 0xFFF0, 0 } // ????
-
-# elif defined(__DECCXX)
-
-#  define _STLP_FLOAT_INF_REP { 0, 0x7f80 }
-#  define _STLP_FLOAT_QNAN_REP { 0, 0xffc0 }
-#  define _STLP_FLOAT_SNAN_REP { 0x5555, 0x7f85 }
-
-#  define _STLP_DOUBLE_INF_REP { 0, 0, 0, 0x7ff0 }
-#  define _STLP_DOUBLE_QNAN_REP { 0, 0, 0, 0xfff8 }
-#  define _STLP_DOUBLE_SNAN_REP { 0x5555, 0x5555, 0x5555, 0x7ff5 }
-
-#  define _STLP_LDOUBLE_INF_REP { 0, 0, 0, 0, 0, 0, 0, 0x7fff }
-#  define _STLP_LDOUBLE_QNAN_REP { 0, 0, 0, 0, 0, 0, 0x8000, 0xffff }
-#  define _STLP_LDOUBLE_SNAN_REP { 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x7fff}
-# else
-#  define _STLP_FLOAT_INF_REP { 0, 0x7f80 }
-#  define _STLP_FLOAT_QNAN_REP { 0, 0x7fa0 }
-#  define _STLP_FLOAT_SNAN_REP { 0, 0x7fc0 }
-#  define _STLP_DOUBLE_INF_REP { 0, 0, 0, 0x7ff0 }
-#  define _STLP_DOUBLE_QNAN_REP { 0, 0, 0, 0x7ff4 }
-#  define _STLP_DOUBLE_SNAN_REP { 0, 0, 0, 0x7ff8 }
-#  if defined (_STLP_MSVC) || defined (__ICL) || defined (__BORLANDC__)
-#   define _STLP_LDOUBLE_INF_REP { 0, 0, 0, 0x7FF0, 0 } // ????
-#   define _STLP_LDOUBLE_QNAN_REP { 0, 0, 0, 0xFFF8, 0 } // ????
-#   define _STLP_LDOUBLE_SNAN_REP { 0, 0, 0, 0xFFF8, 0 }
-#  else
-#   define _STLP_LDOUBLE_INF_REP { 0, 0, 0, 0x8000, 0x7fff }
-#   define _STLP_LDOUBLE_QNAN_REP { 0, 0, 0, 0xa000, 0x7fff }
-#   define _STLP_LDOUBLE_SNAN_REP { 0, 0, 0, 0xc000, 0x7fff }
-#  endif
-# endif
-#else
-/* This is an architecture we don't know how to handle. Return some
-obviously wrong values. */
-# define _STLP_FLOAT_INF_REP { 0, 0 }
-# define _STLP_FLOAT_QNAN_REP { 0, 0 }
-# define _STLP_FLOAT_SNAN_REP { 0, 0 }
-# define _STLP_DOUBLE_INF_REP { 0, 0 }
-# define _STLP_DOUBLE_QNAN_REP { 0, 0 }
-# define _STLP_DOUBLE_SNAN_REP { 0, 0 }
-# define _STLP_LDOUBLE_INF_REP { 0 }
-# define _STLP_LDOUBLE_QNAN_REP { 0 }
-# define _STLP_LDOUBLE_SNAN_REP { 0 }
-
-#endif
-
-
-# if 0
-# if defined(_STLP_BIG_ENDIAN)
-
-# elif defined (_STLP_LITTLE_ENDIAN)
-#else 
-
-/* This is an architecture we don't know how to handle.  Return some 
-   obviously wrong values. */
-# define _STLP_FLOAT_INF_REP  { 0, 0 }
-# define _STLP_FLOAT_QNAN_REP { 0, 0 }
-# define _STLP_FLOAT_SNAN_REP { 0, 0 }
-# define _STLP_DOUBLE_INF_REP  { 0, 0 }
-# define _STLP_DOUBLE_QNAN_REP { 0, 0 }
-# define _STLP_DOUBLE_SNAN_REP { 0, 0 }
-# define _STLP_LDOUBLE_INF_REP  { 0 }
-# define _STLP_LDOUBLE_QNAN_REP { 0 }
-# define _STLP_LDOUBLE_SNAN_REP { 0 }
-
-#endif
-# endif
-
-#if ( _STLP_STATIC_TEMPLATE_DATA > 0 )
-
-# ifndef _STLP_NO_LONG_DOUBLE
-template <class __dummy>
-const _L_rep _LimG<__dummy>::_L_inf  = {_STLP_LDOUBLE_INF_REP}; 
-template <class __dummy>
-const _L_rep _LimG<__dummy>::_L_qNaN  = {_STLP_LDOUBLE_QNAN_REP}; 
-template <class __dummy>
-const _L_rep _LimG<__dummy>::_L_sNaN  = {_STLP_LDOUBLE_SNAN_REP}; 
-# endif
-template <class __dummy>
-const _D_rep _LimG<__dummy>::_D_inf  = {_STLP_DOUBLE_INF_REP}; 
-template <class __dummy>
-const _D_rep _LimG<__dummy>::_D_qNaN  = {_STLP_DOUBLE_QNAN_REP}; 
-template <class __dummy>
-const _D_rep _LimG<__dummy>::_D_sNaN  = {_STLP_DOUBLE_SNAN_REP}; 
-template <class __dummy>
-const _F_rep _LimG<__dummy>::_F_inf  = {_STLP_FLOAT_INF_REP}; 
-template <class __dummy>
-const _F_rep _LimG<__dummy>::_F_qNaN  = {_STLP_FLOAT_QNAN_REP}; 
-template <class __dummy>
-const _F_rep _LimG<__dummy>::_F_sNaN  = {_STLP_FLOAT_SNAN_REP}; 
-
-#else
-
-__DECLARE_INSTANCE( const _F_rep,
-                   _LimG<bool>::_F_inf,  = _STLP_FLOAT_INF_REP);
-__DECLARE_INSTANCE( const _F_rep,
-                   _LimG<bool>::_F_qNaN,  = _STLP_FLOAT_QNAN_REP);
-__DECLARE_INSTANCE( const _F_rep,
-                   _LimG<bool>::_F_sNaN,  = _STLP_FLOAT_SNAN_REP);
-__DECLARE_INSTANCE( const _D_rep,
-                   _LimG<bool>::_D_inf,  = _STLP_DOUBLE_INF_REP);
-__DECLARE_INSTANCE( const _D_rep,
-                   _LimG<bool>::_D_qNaN,  = _STLP_DOUBLE_QNAN_REP);
-__DECLARE_INSTANCE( const _D_rep,
-                   _LimG<bool>::_D_sNaN,  = _STLP_DOUBLE_SNAN_REP);
-# ifndef _STLP_NO_LONG_DOUBLE
-__DECLARE_INSTANCE( const _L_rep,
-                   _LimG<bool>::_L_inf,  = _STLP_LDOUBLE_INF_REP);
-__DECLARE_INSTANCE( const _L_rep,
-                   _LimG<bool>::_L_qNaN,  = _STLP_LDOUBLE_QNAN_REP);
-__DECLARE_INSTANCE( const _L_rep,
-                   _LimG<bool>::_L_sNaN,  = _STLP_LDOUBLE_SNAN_REP);
-# endif
-
-#endif /* STATIC_DATA */   
-
-# endif /* _STLP_EXPOSE_GLOBALS_IMPLEMENTATION */
-    
-# undef __declare_integer_limits_member
-# undef __declare_float_limits_member
-# undef __HACK_ILIMITS
-# undef __HACK_NOTHING
-# undef __declare_int_members
-# undef __declare_float_members
-# undef _STLP_LIMITS_MIN_TYPE
-# undef _STLP_LIMITS_MAX_TYPE
-
-# undef _STLP_FLOAT_INF_REP
-# undef _STLP_FLOAT_QNAN_REP
-# undef _STLP_FLOAT_SNAN_REP
-# undef _STLP_DOUBLE_INF_REP
-# undef _STLP_DOUBLE_QNAN_REP
-# undef _STLP_DOUBLE_SNAN_REP
-# undef _STLP_LDOUBLE_INF_REP
-# undef _STLP_LDOUBLE_QNAN_REP
-# undef _STLP_LDOUBLE_SNAN_REP
-
-_STLP_END_NAMESPACE
-
-
-#endif /* _STLP_LIMITS_C_INCLUDED */
diff --git a/src/STLport/stl/_limits.h b/src/STLport/stl/_limits.h
deleted file mode 100644
index 67987ee..0000000
--- a/src/STLport/stl/_limits.h
+++ /dev/null
@@ -1,557 +0,0 @@
-/*
- * Copyright (c) 1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This may be not portable code. Parts of numeric_limits<> are
- * inherently machine-dependent.  At present this file is suitable
- * for the MIPS, SPARC, Alpha and ia32 architectures.
- */
-
-#ifndef _STLP_INTERNAL_LIMITS_H
-# define _STLP_INTERNAL_LIMITS_H
-
-#ifndef _STLP_CLIMITS
-# include <climits>
-#endif
-
-#ifndef _STLP_CFLOAT
-# include <cfloat>
-#endif
-
-#if !defined (_STLP_NO_WCHAR_T) && !defined (_STLP_CWCHAR_H)
-# include <stl/_cwchar.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-enum float_round_style {
-  round_indeterminate       = -1,
-  round_toward_zero         =  0,
-  round_to_nearest          =  1,
-  round_toward_infinity     =  2,
-  round_toward_neg_infinity =  3
-};
-
-enum float_denorm_style {
-  denorm_indeterminate = -1,
-  denorm_absent        =  0,
-  denorm_present       =  1
-};
-
-// Base class for all specializations of numeric_limits.
-
-template <class __number>
-class _Numeric_limits_base {
-public:
-
-  static __number (_STLP_CALL min)() _STLP_NOTHROW { return __number(); }
-  static __number (_STLP_CALL max)() _STLP_NOTHROW { return __number(); }
-
-# if defined ( _STLP_STATIC_CONST_INIT_BUG)
-  enum {
-# else
-  static const int 
-# endif
-  
-  digits = 0,
-  digits10 = 0,
-  radix = 0,
-  min_exponent = 0,
-  min_exponent10 = 0,
-  max_exponent = 0,
-  max_exponent10 = 0
-
-# if defined ( _STLP_STATIC_CONST_INIT_BUG)
-  ,  
-  has_denorm = denorm_absent,
-  round_style = round_toward_zero,
-# else
-  ;
-  static const float_denorm_style has_denorm =  denorm_absent;
-  static const float_round_style round_style = round_toward_zero;
-  static const bool 
-# endif
-
-    is_specialized = false,
-    is_signed  = false,
-    is_integer = false,
-    is_exact = false,
-    has_infinity = false,
-    has_quiet_NaN = false,
-    has_signaling_NaN = false,
-    has_denorm_loss = false,
-    is_iec559 = false,
-    is_bounded = false,
-    is_modulo = false,
-    traps = false,
-    tinyness_before = false
-# if defined ( _STLP_STATIC_CONST_INIT_BUG)
-  }
-# endif
-  ;
-    
-  static __number _STLP_CALL epsilon() _STLP_NOTHROW     { return __number(); }
-  static __number _STLP_CALL round_error() _STLP_NOTHROW { return __number(); }
-
-  static __number _STLP_CALL infinity() _STLP_NOTHROW      { return __number(); }
-  static __number _STLP_CALL quiet_NaN() _STLP_NOTHROW     { return __number(); }
-  static __number _STLP_CALL signaling_NaN() _STLP_NOTHROW { return __number(); }
-  static __number _STLP_CALL denorm_min() _STLP_NOTHROW    { return __number(); }
-
-
-};
-
-// Base class for integers.
-
-# ifdef _STLP_LIMITED_DEFAULT_TEMPLATES
-#  ifdef _STLP_LONG_LONG
-#   define _STLP_LIMITS_MIN_TYPE _STLP_LONG_LONG
-#   define _STLP_LIMITS_MAX_TYPE unsigned _STLP_LONG_LONG
-#  else
-#   define _STLP_LIMITS_MIN_TYPE long
-#   define _STLP_LIMITS_MAX_TYPE unsigned long
-#  endif
-# else
-#   define _STLP_LIMITS_MIN_TYPE _Int
-#   define _STLP_LIMITS_MAX_TYPE _Int
-# endif /* _STLP_LIMITED_DEFAULT_TEMPLATES */
-
-template <class _Int,
-          _STLP_LIMITS_MIN_TYPE __imin,
-          _STLP_LIMITS_MAX_TYPE __imax,
-          int __idigits, bool __ismod>
-class _Integer_limits : public _Numeric_limits_base<_Int> 
-{
-public:
-
-  static _Int (_STLP_CALL min) () _STLP_NOTHROW { return (_Int)__imin; }
-  static _Int (_STLP_CALL max) () _STLP_NOTHROW { return (_Int)__imax; }
-
-# if defined ( _STLP_STATIC_CONST_INIT_BUG)
-  enum {
-# else
-  static const int 
-# endif  
-  digits = (__idigits < 0) ?
-  ((int)((sizeof(_Int) * (CHAR_BIT))) - ((__imin == 0) ? 0 : 1))
-  : (__idigits),
-  digits10 = (digits * 301UL) / 1000,
-  radix = 2
-# if ! defined ( _STLP_STATIC_CONST_INIT_BUG)
-  ;
-  static const bool
-# else
-  ,
-# endif
-  is_specialized = true,
-  is_signed = (__imin != 0),
-  is_integer = true,
-  is_exact = true,
-  is_bounded = true,
-  is_modulo = __ismod
-# if defined ( _STLP_STATIC_CONST_INIT_BUG)
-  }
-# endif
-  ;
-};
-
-// Base class for floating-point numbers.
-template <class __number,
-         int __Digits, int __Digits10,
-         int __MinExp, int __MaxExp,
-         int __MinExp10, int __MaxExp10,
-         bool __IsIEC559,
-         float_round_style __RoundStyle>
-class _Floating_limits : public _Numeric_limits_base<__number>
-{
-public:
-
-# if defined ( _STLP_STATIC_CONST_INIT_BUG)
-  enum {
-# else
-  static const int 
-# endif  
-
-  digits = __Digits,
-  digits10 = __Digits10,
-
-  radix = (  FLT_RADIX /* 2 */ ),
-  min_exponent = __MinExp, 
-  max_exponent = __MaxExp,
-  min_exponent10 = __MinExp10,
-  max_exponent10 = __MaxExp10
-
-# if defined (_STLP_STATIC_CONST_INIT_BUG)
-  ,  
-  has_denorm = denorm_indeterminate,
-  round_style = __RoundStyle,
-# else
-  ;
-  static const float_denorm_style has_denorm = denorm_indeterminate;
-  static const float_round_style round_style = __RoundStyle;
-  static const bool 
-# endif
-
-  is_specialized = true,
-  is_signed = true, 
-
-#if (!defined(_CRAY) || !defined(_CRAYIEEE))
-   has_infinity     =  true,
-   has_quiet_NaN    =  true,
-   has_signaling_NaN=  true,
-#else
-  has_infinity     =  false,
-  has_quiet_NaN    =  false,
-  has_signaling_NaN=  false,
-#endif
-
-  has_denorm_loss  =  false,
-  is_iec559      =  __IsIEC559,
-  is_bounded     =  true,
-  traps          =  true,
-  tinyness_before=  false
-
-# if defined ( _STLP_STATIC_CONST_INIT_BUG)
-  }
-# endif
-  ;
-
-};
-
-// Class numeric_limits
-
-// The unspecialized class.
-
-template<class _Tp> 
-class numeric_limits : public _Numeric_limits_base<_Tp> {};
-
-// Specializations for all built-in integral types.
-
-#ifndef _STLP_NO_BOOL
-
-_STLP_TEMPLATE_NULL
-class   numeric_limits<bool>
-  : public _Integer_limits<bool, false, true, 1, false>
-{};
-
-#endif /* _STLP_NO_BOOL */
-
-_STLP_TEMPLATE_NULL
-class   numeric_limits<char>
-  : public _Integer_limits<char, CHAR_MIN, CHAR_MAX, -1, true>
-{};
-
-# ifndef _STLP_NO_SIGNED_BUILTINS
-_STLP_TEMPLATE_NULL
-class   numeric_limits<signed char>
-  : public _Integer_limits<signed char, SCHAR_MIN, SCHAR_MAX, -1, true>
-{};
-# endif
-
-_STLP_TEMPLATE_NULL
-class   numeric_limits<unsigned char>
-  : public _Integer_limits<unsigned char, 0, UCHAR_MAX, -1, true>
-{};
-
-#if !(defined ( _STLP_NO_WCHAR_T ) || defined (_STLP_WCHAR_T_IS_USHORT))
-
-_STLP_TEMPLATE_NULL
-class   numeric_limits<wchar_t>
-  : public _Integer_limits<wchar_t, WCHAR_MIN, WCHAR_MAX, -1, true>
-{};
-
-#endif
-
-_STLP_TEMPLATE_NULL
-class   numeric_limits<short>
-  : public _Integer_limits<short, SHRT_MIN, SHRT_MAX, -1, true>
-{};
-
-_STLP_TEMPLATE_NULL
-class   numeric_limits<unsigned short>
-  : public _Integer_limits<unsigned short, 0, USHRT_MAX, -1, true>
-{};
-
-# if defined (__xlC__) && (__xlC__ == 0x500)
-#  undef INT_MIN
-#  define INT_MIN -2147483648
-# endif
-
-
-_STLP_TEMPLATE_NULL
-class   numeric_limits<int>
-  : public _Integer_limits<int, INT_MIN, INT_MAX, -1, true>
-{};
-
-_STLP_TEMPLATE_NULL
-class   numeric_limits<unsigned int>
-  : public _Integer_limits<unsigned int, 0, UINT_MAX, -1, true>
-{};
-
-_STLP_TEMPLATE_NULL
-class   numeric_limits<long>
-  : public _Integer_limits<long, LONG_MIN, LONG_MAX, -1, true>
-{};
-
-_STLP_TEMPLATE_NULL
-class   numeric_limits<unsigned long>
-  : public _Integer_limits<unsigned long, 0, ULONG_MAX, -1, true>
-{};
-
-#ifdef _STLP_LONG_LONG
-
-# if defined (_STLP_MSVC) || defined (__BORLANDC__)
-
-#    define LONGLONG_MAX     0x7fffffffffffffffi64
-#    define LONGLONG_MIN     (-LONGLONG_MAX-1i64)
-#    define ULONGLONG_MAX    0xffffffffffffffffUi64
-
-# else
-
-#  ifndef   LONGLONG_MAX
-#    define LONGLONG_MAX     0x7fffffffffffffffLL
-#  endif
-#  ifndef   LONGLONG_MIN
-#    define LONGLONG_MIN     (-LONGLONG_MAX-1LL)
-#  endif
-#  ifndef   ULONGLONG_MAX
-#    define ULONGLONG_MAX    0xffffffffffffffffULL
-#  endif
-
-# endif
-
-#if !defined(__GNUC__) || (__GNUC__ == 2 && __GNUC_MINOR__ <= 96)
-
-_STLP_TEMPLATE_NULL
-class   numeric_limits<_STLP_LONG_LONG>
-  : public _Integer_limits<_STLP_LONG_LONG, LONGLONG_MIN, LONGLONG_MAX, -1, true>
-{};
-
-_STLP_TEMPLATE_NULL
-class   numeric_limits<unsigned _STLP_LONG_LONG>
-  : public _Integer_limits<unsigned _STLP_LONG_LONG, 0, ULONGLONG_MAX, -1, true>
-{};
-#else /* gcc 2.97 (after 2000-11-01), 2.98, 3.0 */
-/*
- newest gcc has new mangling scheme, that has problem
- with generating name [instantiated] of template specialization like
- _Integer_limits<_STLP_LONG_LONG, LONGLONG_MIN, LONGLONG_MAX, -1, true>
-                                  ~~~~~~~~~~~~  ~~~~~~~~~~~~
- Below is code that solve this problem.
-   - ptr
- */
-_STLP_TEMPLATE_NULL
-class   numeric_limits<_STLP_LONG_LONG>
-  : public _Numeric_limits_base<_STLP_LONG_LONG> 
-{
-public:
-
-  static _STLP_LONG_LONG (_STLP_CALL min) () _STLP_NOTHROW { return LONGLONG_MIN; }
-  static _STLP_LONG_LONG (_STLP_CALL max) () _STLP_NOTHROW { return LONGLONG_MAX; }
-
-# if defined ( _STLP_STATIC_CONST_INIT_BUG)
-  enum {
-# else
-  static const int 
-# endif  
-  digits = ((int)((sizeof(_STLP_LONG_LONG) * (CHAR_BIT))) - 1),
-  digits10 = (digits * 301UL) / 1000,
-  radix = 2
-# if ! defined ( _STLP_STATIC_CONST_INIT_BUG)
-  ;
-  static const bool
-# else
-  ,
-# endif
-  is_specialized = true,
-  is_signed = true,
-  is_integer = true,
-  is_exact = true,
-  is_bounded = true,
-  is_modulo = true
-# if defined ( _STLP_STATIC_CONST_INIT_BUG)
-  }
-# endif
-  ;
-};
-
-_STLP_TEMPLATE_NULL
-class   numeric_limits<unsigned _STLP_LONG_LONG>
-  : public _Numeric_limits_base<unsigned _STLP_LONG_LONG> 
-{
-public:
-
-  static unsigned _STLP_LONG_LONG (_STLP_CALL min) () _STLP_NOTHROW { return 0ULL; }
-  static unsigned _STLP_LONG_LONG (_STLP_CALL max) () _STLP_NOTHROW { return ULONGLONG_MAX; }
-
-# if defined ( _STLP_STATIC_CONST_INIT_BUG)
-  enum {
-# else
-  static const int 
-# endif  
-  digits = ((int)((sizeof(unsigned _STLP_LONG_LONG) * (CHAR_BIT)))),
-  digits10 = (digits * 301UL) / 1000,
-  radix = 2
-# if ! defined ( _STLP_STATIC_CONST_INIT_BUG)
-  ;
-  static const bool
-# else
-  ,
-# endif
-  is_specialized = true,
-  is_signed = false,
-  is_integer = true,
-  is_exact = true,
-  is_bounded = true,
-  is_modulo = true
-# if defined ( _STLP_STATIC_CONST_INIT_BUG)
-  }
-# endif
-  ;
-};
-
-# endif /* __GNUC__ > 2000-11-01 */
-
-#endif /* _STLP_LONG_LONG */
-
-// Specializations for all built-in floating-point types.
-
-union _F_rep
-{
-  unsigned short rep[2];
-  float val;
-};
-union _D_rep
-{
-  unsigned short rep[4];
-  double val;
-};
-
-# ifndef _STLP_NO_LONG_DOUBLE
-union _L_rep
-{
-  unsigned short rep[8];
-  long double val;
-};
-# endif
-
-template <class __dummy>
-class _LimG 
-{
-public:  
-  static const _F_rep _F_inf;
-  static const _F_rep _F_qNaN;
-  static const _F_rep _F_sNaN;
-  static const _D_rep _D_inf;
-  static const _D_rep _D_qNaN;
-  static const _D_rep _D_sNaN;
-  
-# ifndef _STLP_NO_LONG_DOUBLE
-  static const _L_rep _L_inf;
-  static const _L_rep _L_qNaN;
-  static const _L_rep _L_sNaN;
-# endif
-};
-
-# if defined (_STLP_USE_TEMPLATE_EXPORT) 
-_STLP_EXPORT_TEMPLATE_CLASS _LimG<bool>;
-# endif
-
-_STLP_TEMPLATE_NULL class   numeric_limits<float>
-  : public _Floating_limits<float, 
-                            FLT_MANT_DIG,   // Binary digits of precision
-                            FLT_DIG,        // Decimal digits of precision
-                            FLT_MIN_EXP,    // Minimum exponent
-                            FLT_MAX_EXP,    // Maximum exponent
-                            FLT_MIN_10_EXP, // Minimum base 10 exponent
-                            FLT_MAX_10_EXP, // Maximum base 10 exponent
-                            true,           // conforms to iec559
-                            round_to_nearest>
-{
-public:
-  static float (_STLP_CALL min) () _STLP_NOTHROW { return FLT_MIN; }
-  static float _STLP_CALL denorm_min() _STLP_NOTHROW { return FLT_MIN; }
-  static float (_STLP_CALL max) () _STLP_NOTHROW { _STLP_USING_VENDOR_CSTD return FLT_MAX; }
-  static float _STLP_CALL epsilon() _STLP_NOTHROW { return FLT_EPSILON; }
-  static float _STLP_CALL round_error() _STLP_NOTHROW { return 0.5f; } // Units: ulps.
-  static  float _STLP_CALL infinity() { return _LimG<bool>::_F_inf.val; }
-  static  float _STLP_CALL quiet_NaN() { return _LimG<bool>::_F_qNaN.val; }
-  static  float _STLP_CALL signaling_NaN() { return _LimG<bool>::_F_sNaN.val; }
-};
-
-_STLP_TEMPLATE_NULL class   numeric_limits<double>
-  : public _Floating_limits<double, 
-                            DBL_MANT_DIG,   // Binary digits of precision
-                            DBL_DIG,        // Decimal digits of precision
-                            DBL_MIN_EXP,    // Minimum exponent
-                            DBL_MAX_EXP,    // Maximum exponent
-                            DBL_MIN_10_EXP, // Minimum base 10 exponent
-                            DBL_MAX_10_EXP, // Maximum base 10 exponent
-                            true,           // conforms to iec559
-                            round_to_nearest>
-{
-public:
-  static double (_STLP_CALL min)() _STLP_NOTHROW { return DBL_MIN; }
-  static double _STLP_CALL denorm_min() _STLP_NOTHROW { return DBL_MIN; }
-  static double (_STLP_CALL max)() _STLP_NOTHROW { _STLP_USING_VENDOR_CSTD return DBL_MAX; }
-  static double _STLP_CALL epsilon() _STLP_NOTHROW { return DBL_EPSILON; }
-  static double _STLP_CALL round_error() _STLP_NOTHROW { return 0.5; } // Units: ulps.
-  static  double _STLP_CALL infinity() { return _LimG<bool>::_D_inf.val; }
-  static  double _STLP_CALL quiet_NaN(){ return _LimG<bool>::_D_qNaN.val; }
-  static  double _STLP_CALL signaling_NaN() { return _LimG<bool>::_D_sNaN.val; }
-};
-
-# ifndef _STLP_NO_LONG_DOUBLE
-
-_STLP_TEMPLATE_NULL 
-class   numeric_limits<long double>
-  : public _Floating_limits<long double, 
-                            LDBL_MANT_DIG,  // Binary digits of precision
-                            LDBL_DIG,       // Decimal digits of precision
-                            LDBL_MIN_EXP,   // Minimum exponent
-                            LDBL_MAX_EXP,   // Maximum exponent
-                            LDBL_MIN_10_EXP,// Minimum base 10 exponent
-                            LDBL_MAX_10_EXP,// Maximum base 10 exponent
-                            false,          // Doesn't conform to iec559
-                            round_to_nearest>
-{
-public:
-  static long double (_STLP_CALL min) () _STLP_NOTHROW { _STLP_USING_VENDOR_CSTD return LDBL_MIN; }
-  static long double _STLP_CALL denorm_min() _STLP_NOTHROW { _STLP_USING_VENDOR_CSTD return LDBL_MIN; }
-  static long double (_STLP_CALL max) () _STLP_NOTHROW { _STLP_USING_VENDOR_CSTD return LDBL_MAX; }
-  static long double _STLP_CALL epsilon() _STLP_NOTHROW { return LDBL_EPSILON; }
-  static long double _STLP_CALL round_error() _STLP_NOTHROW { return 4; } // Units: ulps.
-  static long double _STLP_CALL infinity() { return _LimG<bool>::_L_inf.val; } 
-  static long double _STLP_CALL quiet_NaN() { return _LimG<bool>::_L_qNaN.val; }
-  static long double _STLP_CALL signaling_NaN() { return _LimG<bool>::_L_sNaN.val; }
-};
-
-# endif
-
-// We write special values (Inf and NaN) as bit patterns and 
-// cast the the appropriate floating-point types. 
-_STLP_END_NAMESPACE
-
-# if !defined (_STLP_LINK_TIME_INSTANTIATION)
-#  include <stl/_limits.c>
-# endif
-
-#endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_list.c b/src/STLport/stl/_list.c
deleted file mode 100644
index 21bb044..0000000
--- a/src/STLport/stl/_list.c
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
- *
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-#ifndef _STLP_LIST_C
-#define _STLP_LIST_C
-
-#ifndef _STLP_INTERNAL_LIST_H
-# include <stl/_list.h>
-#endif
-
-#if defined (__WATCOMC__)
-#include <vector>
-#endif
-
-# undef list
-# define  list  __WORKAROUND_DBG_RENAME(list)
-
-_STLP_BEGIN_NAMESPACE
-
-# if defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION)
-
-template <class _Dummy>
-void _STLP_CALL
-_List_global<_Dummy>::_Transfer(_List_node_base* __position, 
-				_List_node_base* __first, _List_node_base* __last) {
-  if (__position != __last) {
-    // Remove [first, last) from its old position.
-    ((_Node*) (__last->_M_prev))->_M_next = __position;
-    ((_Node*) (__first->_M_prev))->_M_next    = __last;
-    ((_Node*) (__position->_M_prev))->_M_next = __first; 
-    
-    // Splice [first, last) into its new position.
-    _Node* __tmp = (_Node*) (__position->_M_prev);
-    __position->_M_prev = __last->_M_prev;
-    __last->_M_prev      = __first->_M_prev; 
-    __first->_M_prev    = __tmp;
-  }
-}
-
-#endif /* defined (__BUILDING_STLPORT) || ! defined (_STLP_OWN_IOSTREAMS) */
-
-
-template <class _Tp, class _Alloc>
-void 
-_List_base<_Tp,_Alloc>::clear() 
-{
-  _List_node<_Tp>* __cur = (_List_node<_Tp>*) this->_M_node._M_data->_M_next;
-  while (__cur != this->_M_node._M_data) {
-    _List_node<_Tp>* __tmp = __cur;
-    __cur = (_List_node<_Tp>*) __cur->_M_next;
-    _STLP_STD::_Destroy(&__tmp->_M_data);
-    this->_M_node.deallocate(__tmp, 1);
-  }
-  this->_M_node._M_data->_M_next = this->_M_node._M_data;
-  this->_M_node._M_data->_M_prev = this->_M_node._M_data;
-}
-
-# if defined (_STLP_NESTED_TYPE_PARAM_BUG) 
-#  define size_type      size_t
-# endif
-
-template <class _Tp, class _Alloc>
-void list<_Tp, _Alloc>::resize(size_type __new_size, _Tp __x)
-{
-  iterator __i = begin();
-  size_type __len = 0;
-  for ( ; __i != end() && __len < __new_size; ++__i, ++__len);
-
-  if (__len == __new_size)
-    erase(__i, end());
-  else                          // __i == end()
-    insert(end(), __new_size - __len, __x);
-}
-
-template <class _Tp, class _Alloc>
-list<_Tp, _Alloc>& list<_Tp, _Alloc>::operator=(const list<_Tp, _Alloc>& __x)
-{
-  if (this != &__x) {
-    iterator __first1 = begin();
-    iterator __last1 = end();
-    const_iterator __first2 = __x.begin();
-    const_iterator __last2 = __x.end();
-    while (__first1 != __last1 && __first2 != __last2) 
-      *__first1++ = *__first2++;
-    if (__first2 == __last2)
-      erase(__first1, __last1);
-    else
-      insert(__last1, __first2, __last2);
-  }
-  return *this;
-}
-
-template <class _Tp, class _Alloc>
-void list<_Tp, _Alloc>::_M_fill_assign(size_type __n, const _Tp& __val) {
-  iterator __i = begin();
-  for ( ; __i != end() && __n > 0; ++__i, --__n)
-    *__i = __val;
-  if (__n > 0)
-    insert(end(), __n, __val);
-  else
-    erase(__i, end());
-}
-
-template <class _Tp, class _Alloc, class _Predicate> 
-void _S_remove_if(list<_Tp, _Alloc>& __that, _Predicate __pred)  {
-  typename list<_Tp, _Alloc>::iterator __first = __that.begin();
-  typename list<_Tp, _Alloc>::iterator __last = __that.end();
-  while (__first != __last) {
-    typename list<_Tp, _Alloc>::iterator __next = __first;
-    ++__next;
-    if (__pred(*__first)) __that.erase(__first);
-    __first = __next;
-  }
-}
-
-template <class _Tp, class _Alloc, class _BinaryPredicate>
-void _S_unique(list<_Tp, _Alloc>& __that, _BinaryPredicate __binary_pred) {
-  typename list<_Tp, _Alloc>::iterator __first = __that.begin();
-  typename list<_Tp, _Alloc>::iterator __last = __that.end();
-  if (__first == __last) return;
-  typename list<_Tp, _Alloc>::iterator __next = __first;
-  while (++__next != __last) {
-    if (__binary_pred(*__first, *__next))
-      __that.erase(__next);
-    else
-      __first = __next;
-    __next = __first;
-  }
-}
-
-template <class _Tp, class _Alloc, class _StrictWeakOrdering>
-void _S_merge(list<_Tp, _Alloc>& __that, list<_Tp, _Alloc>& __x,
-	      _StrictWeakOrdering __comp) {
-  typedef typename list<_Tp, _Alloc>::iterator _Literator;
-  _Literator __first1 = __that.begin();
-  _Literator __last1 = __that.end();
-  _Literator __first2 = __x.begin();
-  _Literator __last2 = __x.end();
-  while (__first1 != __last1 && __first2 != __last2)
-    if (__comp(*__first2, *__first1)) {
-      _Literator __next = __first2;
-      _List_global_inst::_Transfer(__first1._M_node, __first2._M_node, (++__next)._M_node);
-      __first2 = __next;
-    }
-    else
-      ++__first1;
-  if (__first2 != __last2) _List_global_inst::_Transfer(__last1._M_node, __first2._M_node, __last2._M_node);
-}
-
-template <class _Tp, class _Alloc, class _StrictWeakOrdering>
-void _S_sort(list<_Tp, _Alloc>& __that, _StrictWeakOrdering __comp) {
-  // Do nothing if the list has length 0 or 1.
-  if (__that._M_node._M_data->_M_next != __that._M_node._M_data &&
-      (__that._M_node._M_data->_M_next)->_M_next != __that._M_node._M_data) {
-    list<_Tp, _Alloc> __carry;
-#if !defined (__WATCOMC__)
-    list<_Tp, _Alloc> __counter[64];
-#else
-    __vector__<list<_Tp, _Alloc>, _Alloc> __counter(64);		
-#endif		//*TY 05/25/2000 - 
-    int __fill = 0;
-    while (!__that.empty()) {
-      __carry.splice(__carry.begin(), __that, __that.begin());
-      int __i = 0;
-      while(__i < __fill && !__counter[__i].empty()) {
-	_S_merge(__counter[__i], __carry, __comp);
-	__carry.swap(__counter[__i++]);
-      }
-      __carry.swap(__counter[__i]);         
-      if (__i == __fill) ++__fill;
-    } 
-    
-    for (int __i = 1; __i < __fill; ++__i) 
-      _S_merge(__counter[__i], __counter[__i-1], __comp);
-    __that.swap(__counter[__fill-1]);
-  }
-}
-
-# undef  list
-# undef  size_type
-
-_STLP_END_NAMESPACE
-
-#endif /*  _STLP_LIST_C */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_list.h b/src/STLport/stl/_list.h
deleted file mode 100644
index ee7d293..0000000
--- a/src/STLport/stl/_list.h
+++ /dev/null
@@ -1,575 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_LIST_H
-#define _STLP_INTERNAL_LIST_H
-
-# ifndef _STLP_INTERNAL_ALGOBASE_H
-#  include <stl/_algobase.h>
-# endif
-
-# ifndef _STLP_INTERNAL_ALLOC_H
-#  include <stl/_alloc.h>
-# endif
-
-# ifndef _STLP_INTERNAL_ITERATOR_H
-#  include <stl/_iterator.h>
-# endif
-
-# ifndef _STLP_INTERNAL_CONSTRUCT_H
-#  include <stl/_construct.h>
-# endif
-
-# ifndef _STLP_INTERNAL_FUNCTION_BASE_H
-#  include <stl/_function_base.h>
-# endif
-
-_STLP_BEGIN_NAMESPACE
-
-# undef list
-# define  list  __WORKAROUND_DBG_RENAME(list)
-
-struct _List_node_base {
-  _List_node_base* _M_next;
-  _List_node_base* _M_prev;
-};
-
-template <class _Dummy>
-class _List_global {
-public:
-  typedef _List_node_base _Node;
-  static void  _STLP_CALL _Transfer(_List_node_base* __position, 
-                                    _List_node_base* __first, _List_node_base* __last);
-};
-
-# if defined (_STLP_USE_TEMPLATE_EXPORT) 
-_STLP_EXPORT_TEMPLATE_CLASS _List_global<bool>;
-# endif
-typedef _List_global<bool> _List_global_inst;
-
-template <class _Tp>
-struct _List_node : public _List_node_base {
-  _Tp _M_data;
-  __TRIVIAL_STUFF(_List_node)
-
-#ifdef __DMC__
-  // for some reason, Digital Mars C++ needs a constructor...
- private:
-  _List_node();
-#endif
-};
-
-struct _List_iterator_base {
-  typedef size_t                     size_type;
-  typedef ptrdiff_t                  difference_type;
-  typedef bidirectional_iterator_tag iterator_category;
-
-  _List_node_base* _M_node;
-
-  _List_iterator_base(_List_node_base* __x) : _M_node(__x) {}
-  _List_iterator_base() {}
-
-  void _M_incr() { _M_node = _M_node->_M_next; }
-  void _M_decr() { _M_node = _M_node->_M_prev; }
-  bool operator==(const _List_iterator_base& __y ) const { 
-    return _M_node == __y._M_node; 
-  }
-  bool operator!=(const _List_iterator_base& __y ) const { 
-    return _M_node != __y._M_node; 
-  }
-};  
-
-
-
-
-template<class _Tp, class _Traits>
-struct _List_iterator : public _List_iterator_base {
-  typedef _Tp value_type;
-  typedef typename _Traits::pointer    pointer;
-  typedef typename _Traits::reference  reference;
-
-  typedef _List_iterator<_Tp, _Nonconst_traits<_Tp> > iterator;
-  typedef _List_iterator<_Tp, _Const_traits<_Tp> >    const_iterator;
-  typedef _List_iterator<_Tp, _Traits>                       _Self;
-
-  typedef bidirectional_iterator_tag iterator_category;
-  typedef _List_node<_Tp> _Node;
-  typedef size_t size_type;
-  typedef ptrdiff_t difference_type;
-
-  _List_iterator(_Node* __x) : _List_iterator_base(__x) {}
-  _List_iterator() {}
-  _List_iterator(const iterator& __x) :  _List_iterator_base(__x._M_node) {}
-
-  reference operator*() const { return ((_Node*)_M_node)->_M_data; }
-
-  _STLP_DEFINE_ARROW_OPERATOR
-
-  _Self& operator++() { 
-    this->_M_incr();
-    return *this;
-  }
-  _Self operator++(int) { 
-    _Self __tmp = *this;
-    this->_M_incr();
-    return __tmp;
-  }
-  _Self& operator--() { 
-    this->_M_decr();
-    return *this;
-  }
-  _Self operator--(int) { 
-    _Self __tmp = *this;
-    this->_M_decr();
-    return __tmp;
-  }
-};
-
-
-#ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES
-template <class _Tp, class _Traits>
-inline _Tp* value_type(const _List_iterator<_Tp, _Traits>&) { return 0; }
-inline bidirectional_iterator_tag iterator_category(const _List_iterator_base&) { return bidirectional_iterator_tag();}
-inline ptrdiff_t* distance_type(const _List_iterator_base&) { return 0; }
-#endif
-
-
-// Base class that encapsulates details of allocators and helps 
-// to simplify EH
-
-template <class _Tp, class _Alloc>
-class _List_base 
-{
-protected:
-  _STLP_FORCE_ALLOCATORS(_Tp, _Alloc)
-  typedef _List_node<_Tp> _Node;
-  typedef typename _Alloc_traits<_Node, _Alloc>::allocator_type
-           _Node_allocator_type;
-public:
-  typedef typename _Alloc_traits<_Tp, _Alloc>::allocator_type
-          allocator_type;
-
-  allocator_type get_allocator() const { 
-    return _STLP_CONVERT_ALLOCATOR((const _Node_allocator_type&)_M_node, _Tp);
-  }
-
-  _List_base(const allocator_type& __a) : _M_node(_STLP_CONVERT_ALLOCATOR(__a, _Node), (_Node*)0) {
-    _Node* __n = _M_node.allocate(1);
-    __n->_M_next = __n;
-    __n->_M_prev = __n;
-    _M_node._M_data = __n;
-  }
-  ~_List_base() {
-    clear();
-    _M_node.deallocate(_M_node._M_data, 1);
-  }
-
-  void clear();
-
-public:
-  _STLP_alloc_proxy<_Node*, _Node, _Node_allocator_type>  _M_node;
-};
-
-template <class _Tp, _STLP_DEFAULT_ALLOCATOR_SELECT(_Tp) >
-class list;
-
-// helper functions to reduce code duplication
-template <class _Tp, class _Alloc, class _Predicate> 
-void _S_remove_if(list<_Tp, _Alloc>& __that, _Predicate __pred);
-
-template <class _Tp, class _Alloc, class _BinaryPredicate>
-void _S_unique(list<_Tp, _Alloc>& __that, _BinaryPredicate __binary_pred);
-
-template <class _Tp, class _Alloc, class _StrictWeakOrdering>
-void _S_merge(list<_Tp, _Alloc>& __that, list<_Tp, _Alloc>& __x,
-	      _StrictWeakOrdering __comp);
-
-template <class _Tp, class _Alloc, class _StrictWeakOrdering>
-void _S_sort(list<_Tp, _Alloc>& __that, _StrictWeakOrdering __comp);
-
-template <class _Tp, class _Alloc>
-class list : public _List_base<_Tp, _Alloc> {
-  typedef _List_base<_Tp, _Alloc> _Base;
-  typedef list<_Tp, _Alloc> _Self;
-public:      
-  typedef _Tp value_type;
-  typedef value_type* pointer;
-  typedef const value_type* const_pointer;
-  typedef value_type& reference;
-  typedef const value_type& const_reference;
-  typedef _List_node<_Tp> _Node;
-  typedef size_t size_type;
-  typedef ptrdiff_t difference_type;
-  _STLP_FORCE_ALLOCATORS(_Tp, _Alloc)
-  typedef typename _Base::allocator_type allocator_type;
-  typedef bidirectional_iterator_tag _Iterator_category;
-
-public:
-  typedef _List_iterator<_Tp, _Nonconst_traits<_Tp> > iterator;
-  typedef _List_iterator<_Tp, _Const_traits<_Tp> >    const_iterator;
-  _STLP_DECLARE_BIDIRECTIONAL_REVERSE_ITERATORS;
-
-protected:
-  _Node* _M_create_node(const _Tp& __x)
-  {
-    _Node* __p = this->_M_node.allocate(1);
-    _STLP_TRY {
-      _Construct(&__p->_M_data, __x);
-    }
-    _STLP_UNWIND(this->_M_node.deallocate(__p, 1));
-    return __p;
-  }
-
-  _Node* _M_create_node()
-  {
-    _Node* __p = this->_M_node.allocate(1);
-    _STLP_TRY {
-      _Construct(&__p->_M_data);
-    }
-    _STLP_UNWIND(this->_M_node.deallocate(__p, 1));
-    return __p;
-  }
-
-public:
-# if !(defined(__MRC__)||(defined(__SC__) && !defined(__DMC__)))
-  explicit
-# endif
-  list(const allocator_type& __a = allocator_type()) :
-    _List_base<_Tp, _Alloc>(__a) {}
-
-  iterator begin()             { return iterator((_Node*)(this->_M_node._M_data->_M_next)); }
-  const_iterator begin() const { return const_iterator((_Node*)(this->_M_node._M_data->_M_next)); }
-
-  iterator end()             { return this->_M_node._M_data; }
-  const_iterator end() const { return this->_M_node._M_data; }
-
-  reverse_iterator rbegin() 
-    { return reverse_iterator(end()); }
-  const_reverse_iterator rbegin() const 
-    { return const_reverse_iterator(end()); }
-
-  reverse_iterator rend()
-    { return reverse_iterator(begin()); }
-  const_reverse_iterator rend() const
-    { return const_reverse_iterator(begin()); }
-
-  bool empty() const { return this->_M_node._M_data->_M_next == this->_M_node._M_data; }
-  size_type size() const {
-    size_type __result = distance(begin(), end());
-    return __result;
-  }
-  size_type max_size() const { return size_type(-1); }
-
-  reference front() { return *begin(); }
-  const_reference front() const { return *begin(); }
-  reference back() { return *(--end()); }
-  const_reference back() const { return *(--end()); }
-
-  void swap(list<_Tp, _Alloc>& __x) {
-    _STLP_STD::swap(this->_M_node, __x._M_node); 
-  }
-
-  iterator insert(iterator __position, const _Tp& __x) {
-
-    _Node* __tmp = _M_create_node(__x);
-    _List_node_base* __n = __position._M_node;
-    _List_node_base* __p = __n->_M_prev;
-    __tmp->_M_next = __n;
-    __tmp->_M_prev = __p;
-    __p->_M_next = __tmp;
-    __n->_M_prev = __tmp;
-    return __tmp;
-  }
-
-#ifdef _STLP_MEMBER_TEMPLATES
-  template <class _InputIterator>
-  void insert(iterator __pos, _InputIterator __first, _InputIterator __last) {
-    typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
-    _M_insert_dispatch(__pos, __first, __last, _Integral());
-  }
-  // Check whether it's an integral type.  If so, it's not an iterator.
-  template<class _Integer>
-  void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x,
-                          const __true_type&) {
-    _M_fill_insert(__pos, (size_type) __n, (_Tp) __x);
-  }
-  template <class _InputIter>
-  void 
-  _M_insert_dispatch(iterator __position,
-		     _InputIter __first, _InputIter __last,
-		     const __false_type&) 
-#else /* _STLP_MEMBER_TEMPLATES */
-  void insert(iterator __position, const _Tp* __first, const _Tp* __last) {
-    for ( ; __first != __last; ++__first)
-      insert(__position, *__first);
-  }
-  void insert(iterator __position, const_iterator __first, const_iterator __last)
-#endif /* _STLP_MEMBER_TEMPLATES */
-  {
-    for ( ; __first != __last; ++__first)
-      insert(__position, *__first);
-  }
-  void insert(iterator __pos, size_type __n, const _Tp& __x) { _M_fill_insert(__pos, __n, __x); }
-  
-  void _M_fill_insert(iterator __pos, size_type __n, const _Tp& __x) {
-    for ( ; __n > 0; --__n)
-      insert(__pos, __x);
-  } 
-  void push_front(const _Tp& __x) { insert(begin(), __x); }
-  void push_back(const _Tp& __x) { insert(end(), __x); }
-
-# ifndef _STLP_NO_ANACHRONISMS
-  iterator insert(iterator __position) { return insert(__position, _Tp()); }
-  void push_front() {insert(begin());}
-  void push_back() {insert(end());}
-# endif
-
-  iterator erase(iterator __position) {
-    _List_node_base* __next_node = __position._M_node->_M_next;
-    _List_node_base* __prev_node = __position._M_node->_M_prev;
-    _Node* __n = (_Node*) __position._M_node;
-    __prev_node->_M_next = __next_node;
-    __next_node->_M_prev = __prev_node;
-    _STLP_STD::_Destroy(&__n->_M_data);
-    this->_M_node.deallocate(__n, 1);
-    return iterator((_Node*)__next_node);
-    }
-  
-  iterator erase(iterator __first, iterator __last) {
-    while (__first != __last)
-      erase(__first++);
-    return __last;
-  }
-
-  void resize(size_type __new_size, _Tp __x);
-  void resize(size_type __new_size) { this->resize(__new_size, _Tp()); }
-
-  void pop_front() { erase(begin()); }
-  void pop_back() { 
-    iterator __tmp = end();
-    erase(--__tmp);
-  }
-  list(size_type __n, const _Tp& __val,
-       const allocator_type& __a = allocator_type())
-    : _List_base<_Tp, _Alloc>(__a)
-    { this->insert(begin(), __n, __val); }
-  explicit list(size_type __n)
-    : _List_base<_Tp, _Alloc>(allocator_type())
-    { this->insert(begin(), __n, _Tp()); }
-
-#ifdef _STLP_MEMBER_TEMPLATES
-  // We don't need any dispatching tricks here, because insert does all of
-  // that anyway.
-# ifdef _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS
-  template <class _InputIterator>
-  list(_InputIterator __first, _InputIterator __last)
-    : _List_base<_Tp, _Alloc>(allocator_type())
-  { insert(begin(), __first, __last); }
-# endif  
-  template <class _InputIterator>
-  list(_InputIterator __first, _InputIterator __last,
-       const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL)
-    : _List_base<_Tp, _Alloc>(__a)
-  { insert(begin(), __first, __last); }
-  
-#else /* _STLP_MEMBER_TEMPLATES */
-
-  list(const _Tp* __first, const _Tp* __last,
-       const allocator_type& __a = allocator_type())
-    : _List_base<_Tp, _Alloc>(__a)
-    { insert(begin(), __first, __last); }
-  list(const_iterator __first, const_iterator __last,
-       const allocator_type& __a = allocator_type())
-    : _List_base<_Tp, _Alloc>(__a)
-    { insert(begin(), __first, __last); }
-
-#endif /* _STLP_MEMBER_TEMPLATES */
-  list(const list<_Tp, _Alloc>& __x) : _List_base<_Tp, _Alloc>(__x.get_allocator())
-    { insert(begin(), __x.begin(), __x.end()); }
-
-  ~list() { }
-
-  list<_Tp, _Alloc>& operator=(const list<_Tp, _Alloc>& __x);
-
-public:
-  // assign(), a generalized assignment member function.  Two
-  // versions: one that takes a count, and one that takes a range.
-  // The range version is a member template, so we dispatch on whether
-  // or not the type is an integer.
-
-  void assign(size_type __n, const _Tp& __val) { _M_fill_assign(__n, __val); }
-
-  void _M_fill_assign(size_type __n, const _Tp& __val);
-
-#ifdef _STLP_MEMBER_TEMPLATES
-
-  template <class _InputIterator>
-  void assign(_InputIterator __first, _InputIterator __last) {
-    typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
-    _M_assign_dispatch(__first, __last, _Integral());
-  }
-
-  template <class _Integer>
-  void _M_assign_dispatch(_Integer __n, _Integer __val, const __true_type&)
-    { assign((size_type) __n, (_Tp) __val); }
-
-  template <class _InputIterator>
-  void _M_assign_dispatch(_InputIterator __first2, _InputIterator __last2,
-                          const __false_type&) {
-    iterator __first1 = begin();
-    iterator __last1 = end();
-    for ( ; __first1 != __last1 && __first2 != __last2; ++__first1, ++__first2)
-      *__first1 = *__first2;
-    if (__first2 == __last2)
-      erase(__first1, __last1);
-    else
-      insert(__last1, __first2, __last2);
-  }
-
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-public:
-  void splice(iterator __position, _Self& __x) {
-    if (!__x.empty()) 
-      _List_global_inst::_Transfer(__position._M_node, __x.begin()._M_node, __x.end()._M_node);
-  }
-  void splice(iterator __position, _Self&, iterator __i) {
-    iterator __j = __i;
-    ++__j;
-    if (__position == __i || __position == __j) return;
-    _List_global_inst::_Transfer(__position._M_node, __i._M_node, __j._M_node);
-  }
-  void splice(iterator __position, _Self&, iterator __first, iterator __last) {
-    if (__first != __last) 
-      _List_global_inst::_Transfer(__position._M_node, __first._M_node, __last._M_node);
-  }
-
-  void remove(const _Tp& __val) {
-    iterator __first = begin();
-    iterator __last = end();
-    while (__first != __last) {
-      iterator __next = __first;
-      ++__next;
-      if (__val == *__first) erase(__first);
-      __first = __next;
-    }
-  }
-  
-  void unique() {
-    _S_unique(*this, equal_to<_Tp>());
-  }
-  
-  void merge(_Self& __x) {
-    _S_merge(*this, __x, less<_Tp>());
-  }
-
-  void reverse() {
-    _List_node_base* __p = this->_M_node._M_data;
-    _List_node_base* __tmp = __p;
-    do {
-      _STLP_STD::swap(__tmp->_M_next, __tmp->_M_prev);
-      __tmp = __tmp->_M_prev;     // Old next node is now prev.
-    } while (__tmp != __p);
-  }    
-  
-  void sort() {
-    _S_sort(*this, less<_Tp>());
-  }
-
-#ifdef _STLP_MEMBER_TEMPLATES
-  template <class _Predicate> void remove_if(_Predicate __pred)  {
-    _S_remove_if(*this, __pred);
-  }
-  template <class _BinaryPredicate>
-    void unique(_BinaryPredicate __binary_pred) {
-    _S_unique(*this, __binary_pred);
-  }
-
-  template <class _StrictWeakOrdering>
-    void merge(list<_Tp, _Alloc>& __x,
-	  _StrictWeakOrdering __comp) {
-    _S_merge(*this, __x, __comp);
-  }
-
-  template <class _StrictWeakOrdering>
-    void sort(_StrictWeakOrdering __comp) {
-    _S_sort(*this, __comp);
-  }
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-};
-
-template <class _Tp, class _Alloc>
-_STLP_INLINE_LOOP bool  _STLP_CALL
-operator==(const list<_Tp,_Alloc>& __x, const list<_Tp,_Alloc>& __y)
-{
-  typedef typename list<_Tp,_Alloc>::const_iterator const_iterator;
-  const_iterator __end1 = __x.end();
-  const_iterator __end2 = __y.end();
-
-  const_iterator __i1 = __x.begin();
-  const_iterator __i2 = __y.begin();
-  while (__i1 != __end1 && __i2 != __end2 && *__i1 == *__i2) {
-    ++__i1;
-    ++__i2;
-  }
-  return __i1 == __end1 && __i2 == __end2;
-}
-
-# define _STLP_EQUAL_OPERATOR_SPECIALIZED
-# define _STLP_TEMPLATE_HEADER    template <class _Tp, class _Alloc>
-# define _STLP_TEMPLATE_CONTAINER list<_Tp, _Alloc>
-# include <stl/_relops_cont.h>
-# undef _STLP_TEMPLATE_CONTAINER
-# undef _STLP_TEMPLATE_HEADER
-# undef _STLP_EQUAL_OPERATOR_SPECIALIZED
-
-_STLP_END_NAMESPACE 
-
-# if !defined (_STLP_LINK_TIME_INSTANTIATION)
-#  include <stl/_list.c>
-# endif
-
-// do a cleanup
-# undef list
-# define __list__ __FULL_NAME(list)
-
-#if defined (_STLP_DEBUG)
-# include <stl/debug/_list.h>
-#endif
-
-#if defined (_STLP_USE_WRAPPER_FOR_ALLOC_PARAM)
-# include <stl/wrappers/_list.h>
-#endif
-
-#endif /* _STLP_INTERNAL_LIST_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_locale.h b/src/STLport/stl/_locale.h
deleted file mode 100644
index 3270a0a..0000000
--- a/src/STLport/stl/_locale.h
+++ /dev/null
@@ -1,233 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-// WARNING: This is an internal header file, included by other C++
-// standard library headers.  You should not attempt to use this header
-// file directly.
-
-
-#ifndef _STLP_INTERNAL_LOCALE_H
-#define _STLP_INTERNAL_LOCALE_H
-
-#ifndef _STLP_CSTDLIB
-# include <cstdlib>
-#endif
-
-#ifndef _STLP_CWCHAR_H
-# include <stl/_cwchar.h>
-#endif
-
-#ifndef _STLP_INTERNAL_THREADS_H
-# include <stl/_threads.h>
-#endif
-
-#ifndef _STLP_STRING_FWD_H
-# include <stl/_string_fwd.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-class _STLP_CLASS_DECLSPEC _Locale_impl;             // Forward declaration of opaque type.
-class _STLP_CLASS_DECLSPEC _Locale;             // Forward declaration of opaque type.
-class _STLP_CLASS_DECLSPEC locale;
-class _STLP_CLASS_DECLSPEC ios_base;
-
-
-template <class _CharT>
-bool 
-__locale_do_operator_call (const locale* __that, 
-                           const basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> >& __x,
-                           const basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> >& __y);
-
-#  define _BaseFacet locale::facet
-
-class _STLP_CLASS_DECLSPEC locale {
-public:
-  // types:
-
-  class _STLP_DECLSPEC facet : private _Refcount_Base {
-  protected:
-    explicit facet(size_t __no_del = 0) : _Refcount_Base(1), _M_delete(__no_del == 0) {}
-    virtual ~facet();
-    friend class locale;
-    friend class _Locale_impl;
-    friend class _Locale;
-    
-  private:                        // Invalidate assignment and copying.
-    facet(const facet& __f) : _Refcount_Base(1), _M_delete(__f._M_delete == 0)  {};       
-    void operator=(const facet&); 
-    
-  private:                        // Data members.
-    const bool _M_delete;
-  };
-  
-#if defined(__MVS__) || defined(__OS400__)
-  struct
-#else
-  class
-#endif
-  _STLP_DECLSPEC id {
-    friend class locale;
-    friend class _Locale_impl;
-  public:
-    size_t _M_index;
-    static size_t _S_max;
-  };
-
-  typedef int category;
-# if defined (_STLP_STATIC_CONST_INIT_BUG)
-  enum _Category {
-# else
-  static const category
-# endif
-    none      = 0x000,
-    collate   = 0x010,
-    ctype     = 0x020,
-    monetary  = 0x040,
-    numeric   = 0x100,
-    time      = 0x200,
-    messages  = 0x400,
-    all       = collate | ctype | monetary | numeric | time | messages
-# if defined (_STLP_STATIC_CONST_INIT_BUG)
-  }
-# endif
-  ;
-
-  // construct/copy/destroy:
-  locale();
-  locale(const locale&) _STLP_NOTHROW;
-  explicit locale(const char *);
-  locale(const locale&, const char*, category);
-
-  // those are for internal use
-  locale(_Locale_impl*);
-  locale(_Locale_impl*, bool);
-
-public:
-
-# if defined ( _STLP_MEMBER_TEMPLATES ) /* && defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER) */
-  template <class _Facet> 
-  locale(const locale& __loc, _Facet* __f) : _M_impl(0)
-    {
-      //      _M_impl = this->_S_copy_impl(__loc._M_impl, __f != 0);
-      new(this) locale(__loc._M_impl, __f != 0);
-      if (__f != 0)
-        this->_M_insert(__f, _Facet::id);
-    }
-# endif
-
-  locale(const locale&, const locale&, category);
-  ~locale() _STLP_NOTHROW;
-  const locale& operator=(const locale&) _STLP_NOTHROW;
-
-# if !(defined (_STLP_NO_MEMBER_TEMPLATES) || defined (_STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS))
-  template <class _Facet> locale combine(const locale& __loc) {
-    locale __result(__loc._M_impl, true);
-    if (facet* __f = __loc._M_get_facet(_Facet::id)) {
-      __result._M_insert(__f, _Facet::id);
-      __f->_M_incr();
-    }
-    else
-      _M_throw_runtime_error();    
-    return __result;
-  }
-# endif
-  // locale operations:
-  string name() const;
-
-  bool operator==(const locale&) const;
-  bool operator!=(const locale&) const;
-
-# if ! defined ( _STLP_MEMBER_TEMPLATES ) || defined (_STLP_INLINE_MEMBER_TEMPLATES) || (defined(__MWERKS__) && __MWERKS__ <= 0x2301)
-  bool operator()(const string& __x, const string& __y) const;
-#  ifndef _STLP_NO_WCHAR_T
-  bool operator()(const wstring& __x, const wstring& __y) const;
-#  endif
-# else
-  template <class _CharT, class _Traits, class _Alloc>
-  bool operator()(const basic_string<_CharT, _Traits, _Alloc>& __x,
-                  const basic_string<_CharT, _Traits, _Alloc>& __y) const  {
-    return __locale_do_operator_call(this, __x, __y);
-  }              
-# endif
-
-  // global locale objects:
-  static locale _STLP_CALL global(const locale&);
-  static const locale& _STLP_CALL classic();
-
-public:                         // Helper functions for locale globals.
-  facet* _M_get_facet(const id&) const;
-  // same, but throws
-  facet* _M_use_facet(const id&) const;
-  static void _STLP_CALL _M_throw_runtime_error(const char* = 0);
-  static void _STLP_CALL _S_initialize();
-  static void _STLP_CALL _S_uninitialize();
-
-private:                        // More helper functions.
-  //  static _Locale_impl* _STLP_CALL _S_copy_impl(_Locale_impl*, bool);
-  void _M_insert(facet* __f, id& __id);
-
-  // friends:
-  friend class _Locale_impl;
-  friend class _Locale;
-  friend class ios_base;
-
-private:                        // Data members
-  _Locale_impl* _M_impl;
-};
-
-//----------------------------------------------------------------------
-// locale globals
-
-# ifdef _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS
-template <class _Facet>
-inline const _Facet& 
-_Use_facet<_Facet>::operator *() const
-# else
-template <class _Facet> inline const _Facet& use_facet(const locale& __loc)
-# endif
-{
-  return *__STATIC_CAST(const _Facet*,__loc._M_use_facet(_Facet::id));
-}
-
- 
-# ifdef _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS
-template <class _Facet> 
-struct has_facet {
-  const locale& __loc;
-  has_facet(const locale& __p_loc) : __loc(__p_loc) {}
-  operator bool() const _STLP_NOTHROW
-# else
-template <class _Facet> inline bool has_facet(const locale& __loc) _STLP_NOTHROW 
-# endif
-{
-  return (__loc._M_get_facet(_Facet::id) != 0);
-}
-
-# ifdef _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS
-  // close class definition
-};
-# endif
-
-_STLP_END_NAMESPACE
-
-#endif /* _STLP_INTERNAL_LOCALE_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/stl/_map.h b/src/STLport/stl/_map.h
deleted file mode 100644
index a14edeb..0000000
--- a/src/STLport/stl/_map.h
+++ /dev/null
@@ -1,411 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_MAP_H
-#define _STLP_INTERNAL_MAP_H
-
-#ifndef _STLP_INTERNAL_TREE_H
-# include <stl/_tree.h>
-#endif
-
-#define map __WORKAROUND_RENAME(map)
-#define multimap __WORKAROUND_RENAME(multimap)
-
-_STLP_BEGIN_NAMESPACE
-
-template <class _Key, class _Tp, __DFL_TMPL_PARAM(_Compare, less<_Key> ), 
-          _STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(const _Key, _Tp) >
-class map {
-public:
-
-// typedefs:
-
-  typedef _Key                  key_type;
-  typedef _Tp                   data_type;
-  typedef _Tp                   mapped_type;
-  typedef pair<const _Key, _Tp> value_type;
-  typedef _Compare              key_compare;
-    
-  class value_compare
-    : public binary_function<value_type, value_type, bool> {
-  friend class map<_Key,_Tp,_Compare,_Alloc>;
-  protected :
-    _Compare _M_comp;
-    value_compare(_Compare __c) : _M_comp(__c) {}
-  public:
-    bool operator()(const value_type& __x, const value_type& __y) const {
-      return _M_comp(__x.first, __y.first);
-    }
-  };
-
-private:
-# ifdef _STLP_MULTI_CONST_TEMPLATE_ARG_BUG
-  typedef _Rb_tree<key_type, value_type, 
-                   _Select1st_hint<value_type, _Key>, key_compare, _Alloc> _Rep_type;
-# else
-  typedef _Rb_tree<key_type, value_type, 
-                   _Select1st<value_type>, key_compare, _Alloc> _Rep_type;
-# endif
-  _Rep_type _M_t;  // red-black tree representing map
-public:
-  typedef typename _Rep_type::pointer pointer;
-  typedef typename _Rep_type::const_pointer const_pointer;
-  typedef typename _Rep_type::reference reference;
-  typedef typename _Rep_type::const_reference const_reference;
-  typedef typename _Rep_type::iterator iterator;
-  typedef typename _Rep_type::const_iterator const_iterator;
-  typedef typename _Rep_type::reverse_iterator reverse_iterator;
-  typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
-  typedef typename _Rep_type::size_type size_type;
-  typedef typename _Rep_type::difference_type difference_type;
-  typedef typename _Rep_type::allocator_type allocator_type;
-
-  // allocation/deallocation
-
-  map() : _M_t(_Compare(), allocator_type()) {}
-  explicit map(const _Compare& __comp,
-               const allocator_type& __a = allocator_type())
-    : _M_t(__comp, __a) {}
-
-#ifdef _STLP_MEMBER_TEMPLATES
-  template <class _InputIterator>
-  map(_InputIterator __first, _InputIterator __last)
-    : _M_t(_Compare(), allocator_type())
-    { _M_t.insert_unique(__first, __last); }
-
-  template <class _InputIterator>
-  map(_InputIterator __first, _InputIterator __last, const _Compare& __comp,
-      const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL)
-    : _M_t(__comp, __a) { _M_t.insert_unique(__first, __last); }
-
-# ifdef _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS
-  template <class _InputIterator>
-  map(_InputIterator __first, _InputIterator __last, const _Compare& __comp)
-    : _M_t(__comp, allocator_type()) { _M_t.insert_unique(__first, __last); }
-# endif
-
-#else
-  map(const value_type* __first, const value_type* __last)
-    : _M_t(_Compare(), allocator_type())
-    { _M_t.insert_unique(__first, __last); }
-
-  map(const value_type* __first,
-      const value_type* __last, const _Compare& __comp,
-      const allocator_type& __a = allocator_type())
-    : _M_t(__comp, __a) { _M_t.insert_unique(__first, __last); }
-
-  map(const_iterator __first, const_iterator __last)
-    : _M_t(_Compare(), allocator_type()) 
-    { _M_t.insert_unique(__first, __last); }
-
-  map(const_iterator __first, const_iterator __last, const _Compare& __comp,
-      const allocator_type& __a = allocator_type())
-    : _M_t(__comp, __a) { _M_t.insert_unique(__first, __last); }
-
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-  map(const map<_Key,_Tp,_Compare,_Alloc>& __x) : _M_t(__x._M_t) {}
-  map<_Key,_Tp,_Compare,_Alloc>&
-  operator=(const map<_Key, _Tp, _Compare, _Alloc>& __x)
-  {
-    _M_t = __x._M_t;
-    return *this; 
-  }
-
-  // accessors:
-
-  key_compare key_comp() const { return _M_t.key_comp(); }
-  value_compare value_comp() const { return value_compare(_M_t.key_comp()); }
-  allocator_type get_allocator() const { return _M_t.get_allocator(); }
-
-  iterator begin() { return _M_t.begin(); }
-  const_iterator begin() const { return _M_t.begin(); }
-  iterator end() { return _M_t.end(); }
-  const_iterator end() const { return _M_t.end(); }
-  reverse_iterator rbegin() { return _M_t.rbegin(); }
-  const_reverse_iterator rbegin() const { return _M_t.rbegin(); }
-  reverse_iterator rend() { return _M_t.rend(); }
-  const_reverse_iterator rend() const { return _M_t.rend(); }
-  bool empty() const { return _M_t.empty(); }
-  size_type size() const { return _M_t.size(); }
-  size_type max_size() const { return _M_t.max_size(); }
-  _Tp& operator[](const key_type& __k) {
-    iterator __i = lower_bound(__k);
-    // __i->first is greater than or equivalent to __k.
-    if (__i == end() || key_comp()(__k, (*__i).first))
-      __i = insert(__i, value_type(__k, _STLP_DEFAULT_CONSTRUCTED(_Tp)));
-    return (*__i).second;
-  }
-  void swap(map<_Key,_Tp,_Compare,_Alloc>& __x) { _M_t.swap(__x._M_t); }
-
-  // insert/erase
-
-  pair<iterator,bool> insert(const value_type& __x) 
-    { return _M_t.insert_unique(__x); }
-  iterator insert(iterator position, const value_type& __x)
-    { return _M_t.insert_unique(position, __x); }
-#ifdef _STLP_MEMBER_TEMPLATES
-  template <class _InputIterator>
-  void insert(_InputIterator __first, _InputIterator __last) {
-    _M_t.insert_unique(__first, __last);
-  }
-#else
-  void insert(const value_type* __first, const value_type* __last) {
-    _M_t.insert_unique(__first, __last);
-  }
-  void insert(const_iterator __first, const_iterator __last) {
-    _M_t.insert_unique(__first, __last);
-  }
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-  void erase(iterator __position) { _M_t.erase(__position); }
-  size_type erase(const key_type& __x) { return _M_t.erase(__x); }
-  void erase(iterator __first, iterator __last)
-    { _M_t.erase(__first, __last); }
-  void clear() { _M_t.clear(); }
-
-  // map operations:
-
-  iterator find(const key_type& __x) { return _M_t.find(__x); }
-  const_iterator find(const key_type& __x) const { return _M_t.find(__x); }
-  size_type count(const key_type& __x) const { 
-    return _M_t.find(__x) == _M_t.end() ? 0 : 1;
-  }
-  iterator lower_bound(const key_type& __x) {return _M_t.lower_bound(__x); }
-  const_iterator lower_bound(const key_type& __x) const {
-    return _M_t.lower_bound(__x); 
-  }
-  iterator upper_bound(const key_type& __x) {return _M_t.upper_bound(__x); }
-  const_iterator upper_bound(const key_type& __x) const {
-    return _M_t.upper_bound(__x); 
-  }
-  
-  pair<iterator,iterator> equal_range(const key_type& __x) {
-    return _M_t.equal_range(__x);
-  }
-  pair<const_iterator,const_iterator> equal_range(const key_type& __x) const {
-    return _M_t.equal_range(__x);
-  }
-};
-
-
-template <class _Key, class _Tp, __DFL_TMPL_PARAM(_Compare, less<_Key> ), 
-          _STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(const _Key, _Tp) >
-class multimap {
-public:
-
-// typedefs:
-
-  typedef _Key                  key_type;
-  typedef _Tp                   data_type;
-  typedef _Tp                   mapped_type;
-  typedef pair<const _Key, _Tp> value_type;
-  typedef _Compare              key_compare;
-
-  class value_compare : public binary_function<value_type, value_type, bool> {
-  friend class multimap<_Key,_Tp,_Compare,_Alloc>;
-  protected:
-    _Compare _M_comp;
-    value_compare(_Compare __c) : _M_comp(__c) {}
-  public:
-    bool operator()(const value_type& __x, const value_type& __y) const {
-      return _M_comp(__x.first, __y.first);
-    }
-  };
-
-private:
-# ifdef _STLP_MULTI_CONST_TEMPLATE_ARG_BUG
-  typedef _Rb_tree<key_type, value_type, 
-                  _Select1st_hint<value_type, _Key>, key_compare, _Alloc> _Rep_type;
-# else
-  typedef _Rb_tree<key_type, value_type, 
-                  _Select1st<value_type>, key_compare, _Alloc> _Rep_type;
-# endif
-  _Rep_type _M_t;  // red-black tree representing multimap
-public:
-  typedef typename _Rep_type::pointer pointer;
-  typedef typename _Rep_type::const_pointer const_pointer;
-  typedef typename _Rep_type::reference reference;
-  typedef typename _Rep_type::const_reference const_reference;
-  typedef typename _Rep_type::iterator iterator;
-  typedef typename _Rep_type::const_iterator const_iterator; 
-  typedef typename _Rep_type::reverse_iterator reverse_iterator;
-  typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
-  typedef typename _Rep_type::size_type size_type;
-  typedef typename _Rep_type::difference_type difference_type;
-  typedef typename _Rep_type::allocator_type allocator_type;
-
-// allocation/deallocation
-
-  multimap() : _M_t(_Compare(), allocator_type()) { }
-  explicit multimap(const _Compare& __comp,
-                    const allocator_type& __a = allocator_type())
-    : _M_t(__comp, __a) { }
-
-#ifdef _STLP_MEMBER_TEMPLATES  
-  template <class _InputIterator>
-  multimap(_InputIterator __first, _InputIterator __last)
-    : _M_t(_Compare(), allocator_type())
-    { _M_t.insert_equal(__first, __last); }
-# ifdef _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS
-  template <class _InputIterator>
-  multimap(_InputIterator __first, _InputIterator __last,
-           const _Compare& __comp)
-    : _M_t(__comp, allocator_type()) { _M_t.insert_equal(__first, __last); }
-#  endif
-  template <class _InputIterator>
-  multimap(_InputIterator __first, _InputIterator __last,
-           const _Compare& __comp,
-           const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL)
-    : _M_t(__comp, __a) { _M_t.insert_equal(__first, __last); }
-#else
-  multimap(const value_type* __first, const value_type* __last)
-    : _M_t(_Compare(), allocator_type())
-    { _M_t.insert_equal(__first, __last); }
-  multimap(const value_type* __first, const value_type* __last,
-           const _Compare& __comp,
-           const allocator_type& __a = allocator_type())
-    : _M_t(__comp, __a) { _M_t.insert_equal(__first, __last); }
-
-  multimap(const_iterator __first, const_iterator __last)
-    : _M_t(_Compare(), allocator_type())
-    { _M_t.insert_equal(__first, __last); }
-  multimap(const_iterator __first, const_iterator __last,
-           const _Compare& __comp,
-           const allocator_type& __a = allocator_type())
-    : _M_t(__comp, __a) { _M_t.insert_equal(__first, __last); }
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-  multimap(const multimap<_Key,_Tp,_Compare,_Alloc>& __x) : _M_t(__x._M_t) { }
-  multimap<_Key,_Tp,_Compare,_Alloc>&
-  operator=(const multimap<_Key,_Tp,_Compare,_Alloc>& __x) {
-    _M_t = __x._M_t;
-    return *this; 
-  }
-
-  // accessors:
-
-  key_compare key_comp() const { return _M_t.key_comp(); }
-  value_compare value_comp() const { return value_compare(_M_t.key_comp()); }
-  allocator_type get_allocator() const { return _M_t.get_allocator(); }
-
-  iterator begin() { return _M_t.begin(); }
-  const_iterator begin() const { return _M_t.begin(); }
-  iterator end() { return _M_t.end(); }
-  const_iterator end() const { return _M_t.end(); }
-  reverse_iterator rbegin() { return _M_t.rbegin(); }
-  const_reverse_iterator rbegin() const { return _M_t.rbegin(); }
-  reverse_iterator rend() { return _M_t.rend(); }
-  const_reverse_iterator rend() const { return _M_t.rend(); }
-  bool empty() const { return _M_t.empty(); }
-  size_type size() const { return _M_t.size(); }
-  size_type max_size() const { return _M_t.max_size(); }
-  void swap(multimap<_Key,_Tp,_Compare,_Alloc>& __x) { _M_t.swap(__x._M_t); }
-
-  // insert/erase
-
-  iterator insert(const value_type& __x) { return _M_t.insert_equal(__x); }
-  iterator insert(iterator __position, const value_type& __x) {
-    return _M_t.insert_equal(__position, __x);
-  }
-#ifdef _STLP_MEMBER_TEMPLATES  
-  template <class _InputIterator>
-  void insert(_InputIterator __first, _InputIterator __last) {
-    _M_t.insert_equal(__first, __last);
-  }
-#else
-  void insert(const value_type* __first, const value_type* __last) {
-    _M_t.insert_equal(__first, __last);
-  }
-  void insert(const_iterator __first, const_iterator __last) {
-    _M_t.insert_equal(__first, __last);
-  }
-#endif /* _STLP_MEMBER_TEMPLATES */
-  void erase(iterator __position) { _M_t.erase(__position); }
-  size_type erase(const key_type& __x) { return _M_t.erase(__x); }
-  void erase(iterator __first, iterator __last)
-    { _M_t.erase(__first, __last); }
-  void clear() { _M_t.clear(); }
-
-  // multimap operations:
-
-  iterator find(const key_type& __x) { return _M_t.find(__x); }
-  const_iterator find(const key_type& __x) const { return _M_t.find(__x); }
-  size_type count(const key_type& __x) const { return _M_t.count(__x); }
-  iterator lower_bound(const key_type& __x) {return _M_t.lower_bound(__x); }
-  const_iterator lower_bound(const key_type& __x) const {
-    return _M_t.lower_bound(__x); 
-  }
-  iterator upper_bound(const key_type& __x) {return _M_t.upper_bound(__x); }
-  const_iterator upper_bound(const key_type& __x) const {
-    return _M_t.upper_bound(__x); 
-  }
-   pair<iterator,iterator> equal_range(const key_type& __x) {
-    return _M_t.equal_range(__x);
-  }
-  pair<const_iterator,const_iterator> equal_range(const key_type& __x) const {
-    return _M_t.equal_range(__x);
-  }
-};
-
-# define _STLP_TEMPLATE_HEADER template <class _Key, class _Tp, class _Compare, class _Alloc>
-
-# define _STLP_TEMPLATE_CONTAINER map<_Key,_Tp,_Compare,_Alloc>
-
-// fbp : if this template header gets protected against your will, report it !
-# include <stl/_relops_cont.h>
-
-# undef  _STLP_TEMPLATE_CONTAINER
-# define _STLP_TEMPLATE_CONTAINER multimap<_Key,_Tp,_Compare,_Alloc>
-
-// fbp : if this template header gets protected against your will, report it !
-# include <stl/_relops_cont.h>
-
-# undef  _STLP_TEMPLATE_CONTAINER
-# undef  _STLP_TEMPLATE_HEADER
-
-_STLP_END_NAMESPACE
-
-// do a cleanup
-#  undef map
-#  undef multimap
-// provide a way to access full funclionality 
-# define __map__  __FULL_NAME(map)
-# define __multimap__  __FULL_NAME(multimap)
-
-# ifdef _STLP_USE_WRAPPER_FOR_ALLOC_PARAM
-# include <stl/wrappers/_map.h>
-# endif
-
-#endif /* _STLP_INTERNAL_MAP_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/stl/_messages_facets.h b/src/STLport/stl/_messages_facets.h
deleted file mode 100644
index 564136b..0000000
--- a/src/STLport/stl/_messages_facets.h
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-
-// WARNING: This is an internal header file, included by other C++
-// standard library headers.  You should not attempt to use this header
-// file directly.
-
-
-#ifndef _STLP_INTERNAL_MESSAGES_H
-#define _STLP_INTERNAL_MESSAGES_H
-
-#ifndef _STLP_IOS_BASE_H
-# include <stl/_ios_base.h>
-#endif
-
-# ifndef _STLP_C_LOCALE_H
-#  include <stl/c_locale.h>
-# endif
-
-#ifndef _STLP_STRING_H
-# include <stl/_string.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-// messages facets
-
-class messages_base {
-public:
-  typedef int catalog;
-};
-
-template <class _CharT> class messages {};
-
-class _Messages;
-
-_STLP_TEMPLATE_NULL
-class _STLP_CLASS_DECLSPEC messages<char> : public locale::facet, public messages_base 
-{
-  friend class _Locale;
-public:
-  typedef messages_base::catalog catalog;
-  typedef char                   char_type;
-  typedef string    string_type;
-
-  explicit messages(size_t __refs = 0);
-
-  catalog open(const string& __fn, const locale& __loc) const
-    { return do_open(__fn, __loc); }
-  string_type get(catalog __c, int __set, int __msgid,
-		  const string_type& __dfault) const
-    { return do_get(__c, __set, __msgid, __dfault); }
-  inline void close(catalog __c) const
-    { do_close(__c); }
-
-  _STLP_STATIC_MEMBER_DECLSPEC static locale::id id;
-
-  messages(_Messages*);
-
-protected:
-   messages(size_t, _Locale_messages*);
-  ~messages();
-
-  virtual catalog     do_open(const string& __fn, const locale& __loc) const;
-  virtual string_type do_get(catalog __c, int __set, int __msgid,
-                             const string_type& __dfault) const;
-  virtual void        do_close(catalog __c) const;
-
-  void _M_initialize(const char* __name);
-
-private:
-  _Messages* _M_impl;
-};
-
-# if !defined (_STLP_NO_WCHAR_T)
-
-_STLP_TEMPLATE_NULL
-class _STLP_CLASS_DECLSPEC messages<wchar_t> : public locale::facet, public messages_base 
-{
-  friend class _Locale;
-public:
-  typedef messages_base::catalog catalog;
-  typedef wchar_t                char_type;
-  typedef wstring  string_type;
-
-  explicit messages(size_t __refs = 0);
-  
-  inline catalog open(const string& __fn, const locale& __loc) const
-    { return do_open(__fn, __loc); }
-  inline string_type get(catalog __c, int __set, int __msgid,
-                         const string_type& __dfault) const
-    { return do_get(__c, __set, __msgid, __dfault); }
-  inline void close(catalog __c) const
-    { do_close(__c); }
-
-  _STLP_STATIC_MEMBER_DECLSPEC static locale::id id;
-
-  messages(_Messages*);
-
-protected:
-
-  messages(size_t, _Locale_messages*);
-  ~messages();
-
-  virtual catalog     do_open(const string& __fn, const locale& __loc) const;
-  virtual string_type do_get(catalog __c, int __set, int __msgid,
-                             const string_type& __dfault) const;
-  virtual void        do_close(catalog __c) const;
-
-  void _M_initialize(const char* __name);
-
-private:
-  _Messages* _M_impl;
-};
-
-# endif /* WCHAR_T */
-
-template <class _CharT> class messages_byname {};
-
-_STLP_TEMPLATE_NULL
-class _STLP_CLASS_DECLSPEC messages_byname<char> : public messages<char> {
-public:
-  typedef messages_base::catalog catalog;
-  typedef string     string_type;
-
-  explicit messages_byname(const char* __name, size_t __refs = 0);
-
-protected:
-  ~messages_byname();
-};
-
-# ifndef _STLP_NO_WCHAR_T
-_STLP_TEMPLATE_NULL
-class _STLP_CLASS_DECLSPEC messages_byname<wchar_t> : public messages<wchar_t> {
-public:
-  typedef messages_base::catalog catalog;
-  typedef wstring                string_type;
-
-  explicit messages_byname(const char* __name, size_t __refs = 0);
-
-protected:
-  ~messages_byname();
-};
-# endif /* WCHAR_T */
-
-_STLP_END_NAMESPACE
-
-#endif /* _STLP_INTERNAL_MESSAGES_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/stl/_monetary.c b/src/STLport/stl/_monetary.c
deleted file mode 100644
index 5430532..0000000
--- a/src/STLport/stl/_monetary.c
+++ /dev/null
@@ -1,527 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-#ifndef _STLP_MONETARY_C
-#define _STLP_MONETARY_C
-
-# ifndef _STLP_INTERNAL_MONETARY_H
-#  include <stl/_monetary.h>
-# endif
-
-# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION)
-
-#ifndef _STLP_INTERNAL_IOS_H
-# include <stl/_ios.h>
-#endif
-
-#ifndef _STLP_INTERNAL_NUM_PUT_H
-# include <stl/_num_put.h>
-#endif
-
-#ifndef _STLP_INTERNAL_NUM_GET_H
-# include <stl/_num_get.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-# if ( _STLP_STATIC_TEMPLATE_DATA > 0 )
-
-template <class _CharT, class _InputIterator>
-locale::id money_get<_CharT, _InputIterator>::id;
-
-template <class _CharT, class _OutputIterator>
-locale::id money_put<_CharT, _OutputIterator>::id;
-
-# else /* ( _STLP_STATIC_TEMPLATE_DATA > 0 ) */
-
-typedef money_get<char, const char*> money_get_char;
-typedef money_put<char, char*> money_put_char;
-typedef money_get<char, istreambuf_iterator<char, char_traits<char> > > money_get_char_2;
-typedef money_put<char, ostreambuf_iterator<char, char_traits<char> > > money_put_char_2;
-
-__DECLARE_INSTANCE(locale::id, money_get_char::id, );
-__DECLARE_INSTANCE(locale::id, money_put_char::id, );
-__DECLARE_INSTANCE(locale::id, money_get_char_2::id, );
-__DECLARE_INSTANCE(locale::id, money_put_char_2::id, );
-
-# ifndef _STLP_NO_WCHAR_T
-
-typedef money_get<wchar_t, const wchar_t*> money_get_wchar_t;
-typedef money_get<wchar_t, istreambuf_iterator<wchar_t, char_traits<wchar_t> > > money_get_wchar_t_2;
-typedef money_put<wchar_t, wchar_t*> money_put_wchar_t;
-typedef money_put<wchar_t, ostreambuf_iterator<wchar_t, char_traits<wchar_t> > > money_put_wchar_t_2;
-
-__DECLARE_INSTANCE(locale::id, money_get_wchar_t::id, );
-__DECLARE_INSTANCE(locale::id, money_put_wchar_t::id, );
-__DECLARE_INSTANCE(locale::id, money_get_wchar_t_2::id, );
-__DECLARE_INSTANCE(locale::id, money_put_wchar_t_2::id, );
-
-# endif
-# endif /* ( _STLP_STATIC_TEMPLATE_DATA > 0 ) */
-
-// money_get facets
-
-
-// helper functions for do_get
-template <class _InIt1, class _InIt2>
-pair<_InIt1, bool> __get_string(_InIt1 __first,     _InIt1 __last,
-                               _InIt2 __str_first, _InIt2 __str_last) {
-  pair<_InIt1, _InIt2> __pr = mismatch(__first, __last, __str_first);
-  return make_pair(__pr.first, __pr.second == __str_last);
-}
-
-template <class _InIt, class _OuIt, class _CharT>
-bool
-__get_monetary_value(_InIt& __first, _InIt __last, _OuIt __out,
-                     const ctype<_CharT>& _c_type,
-                     _CharT   __point,
-                     int      __frac_digits,
-                     _CharT __sep,
-                     const string& __grouping,
-                     bool&         __syntax_ok)
-{
-  if (__first == __last || !_c_type.is(ctype_base::digit, *__first))
-    return false;
-
-  char __group_sizes[128];
-  char* __group_sizes_end = __grouping.size() == 0 ? 0 : __group_sizes;
-  char   __current_group_size = 0;
-
-  while (__first != __last) {
-    if (_c_type.is(ctype_base::digit, *__first)) {
-      ++__current_group_size;
-      *__out++ = *__first++;
-    }
-    else if (__group_sizes_end) {
-      if (*__first == __sep) {
-	*__group_sizes_end++ = __current_group_size;
-	__current_group_size = 0;
-	++__first;
-      }
-      else break;
-    }
-    else
-      break;
-  }
-
-  if (__grouping.size() == 0)
-    __syntax_ok = true;
-  else {
-    if (__group_sizes_end != __group_sizes)
-      *__group_sizes_end++ = __current_group_size;
-    
-    __syntax_ok = __valid_grouping(__group_sizes, __group_sizes_end,
-                                   __grouping.data(), __grouping.data()+ __grouping.size());  
-    
-    if (__first == __last || *__first != __point) {
-      for (int __digits = 0; __digits != __frac_digits; ++__digits)
-        *__out++ = _CharT('0');
-      return true; // OK not to have decimal point
-    }
-  }
-
-  ++__first;
-
-  size_t __digits = 0;
-
-  while (__first != __last && _c_type.is(ctype_base::digit, *__first)) {
-      *__out++ = *__first++;
-     ++__digits;
-  }
-
-  __syntax_ok = __syntax_ok && (__digits == __frac_digits);
-
-  return true;
-}
-
-# ifndef _STLP_NO_LONG_DOUBLE
-
-//===== methods ======
-template <class _CharT, class _InputIter>
-_InputIter 
-money_get<_CharT, _InputIter>::do_get(_InputIter __s, _InputIter  __end, bool  __intl,
-				      ios_base&  __str, ios_base::iostate& __err,
-				      long double& __units) const {
-  string_type __buf;
-  __s = do_get(__s, __end, __intl, __str, __err, __buf);
-
-  if (__err == ios_base::goodbit || __err == ios_base::eofbit) {
-    __buf.push_back(0);
-    typename string_type::iterator __b = __buf.begin(), __e = __buf.end();
-    // Can't use atold, since it might be wchar_t. Don't get confused by name below :
-    // it's perfectly capable of reading long double.
-    __get_decimal_integer(__b, __e, __units);
-  }
-  if (__s == __end)
-    __err |= ios_base::eofbit;
-  return __s;
-}
-# endif
-
-template <class _CharT, class _InputIter>
-_InputIter 
-money_get<_CharT, _InputIter>::do_get(iter_type __s, 
-				      iter_type  __end, bool  __intl,
-				      ios_base&  __str, ios_base::iostate&  __err,
-				      string_type& __digits) const {
-  if (__s == __end) {
-    __err |= ios_base::eofbit;
-    return __s;
-  }
-
-  typedef moneypunct<_CharT, false> _Punct;
-  typedef moneypunct<_CharT, true>  _Punct_intl;
-  typedef ctype<_CharT>             _Ctype;
-
-  locale __loc = __str.getloc();
-  const _Punct&      __punct      = use_facet<_Punct>(__loc) ;
-  const _Punct_intl& __punct_intl = use_facet<_Punct_intl>(__loc) ;
-  const _Ctype&      __c_type      = use_facet<_Ctype>(__loc) ;
-                   
-  money_base::pattern __format = __intl ? __punct_intl.neg_format()
-                                        : __punct.neg_format();
-  string_type __ns = __intl ? __punct_intl.negative_sign()
-                            : __punct.negative_sign();
-  string_type __ps = __intl ? __punct_intl.positive_sign()
-                            : __punct.positive_sign();
-  int __i;
-  bool __is_positive = true;
-  bool __symbol_required = (__str.flags() & ios_base::showbase) !=0;
-  string_type __buf;
-  back_insert_iterator<string_type> __out(__buf);
-//  pair<iter_type, bool> __result;
-
-  for (__i = 0; __i < 4; ++__i) {
-    switch (__format.field[__i]) {
-    case (char) money_base::none:
-      if (__i == 3) {
-        if (__c_type.is(ctype_base::space, *__s)) {
-          __err = ios_base::failbit;
-          return __s;
-        }
-        break;
-      }
-      while (__s != __end && __c_type.is(ctype_base::space, *__s))
-        ++__s;
-      break;
-    case (char) money_base::space:
-      if (!__c_type.is(ctype_base::space, *__s)) {
-        __err = ios_base::failbit;
-        return __s;
-      }
-      ++__s;
-      while (__s != __end && __c_type.is(ctype_base::space, *__s))
-        ++__s;
-      break;
-    case money_base::symbol: {
-      string_type __curs = __intl ? __punct_intl.curr_symbol()
-                                : __punct.curr_symbol();
-      pair<iter_type, bool>
-      __result  = __get_string(__s, __end, __curs.begin(), __curs.end());
-      if (!__result.second && __symbol_required)
-        __err = ios_base::failbit;
-      __s = __result.first;
-      break;
-    }
-    case money_base::sign: {
-      if (__s == __end) {
-        if (__ps.size() == 0)
-          break;
-        if (__ns.size() == 0) {
-          __is_positive = false;
-          break;
-        }
-        __err = ios_base::failbit;
-        return __s;
-      }
-      else {
-        if (__ps.size() == 0) {
-          if (__ns.size() == 0)
-            break;
-          if (*__s == ++__ns[0]) {
-            ++__s;
-            __is_positive = false;
-            break;
-          }
-          __err = ios_base::failbit;
-	  //          return __s;
-        } 
-        else {
-          if (*__s == __ps[0]) {
-            ++__s;
-            break;
-          }
-          if (__ns.size() == 0)
-            break;
-          if (*__s == __ns[0]) {
-            ++__s;
-            __is_positive = false;
-            break;
-          }
-          __err = ios_base::failbit;
-	  //          return __s;
-        }
-      }
-      return __s;
-      //      break;
-    }
-    case money_base::value: {
-      _CharT __point = __intl ? __punct_intl.decimal_point()
-                              : __punct.decimal_point();
-      int __frac_digits = __intl ? __punct_intl.frac_digits()
-                                 : __punct.frac_digits();
-      string __grouping = __intl ? __punct_intl.grouping()
-                                 : __punct.grouping();
-      bool __syntax_ok = true;
-
-      bool __result;
-
-      _CharT __sep = __grouping.size() == 0 ? _CharT() : 
-	__intl ? __punct_intl.thousands_sep() : __punct.thousands_sep();
-
-      __result = __get_monetary_value(__s, __end, __out, __c_type,
-                                      __point, __frac_digits,
-                                      __sep,
-                                      __grouping, __syntax_ok);      
-
-      if (!__syntax_ok)
-        __err |= ios_base::failbit;
-      if (!__result) {
-        __err = ios_base::failbit;
-        return __s;
-      }
-      break;
-      
-    }                           // Close money_base::value case
-
-
-    }                           // Close switch statement
-  }                             // Close for loop
-
-  if (__is_positive) {
-    if (__ps.size() > 1) {
-      pair<_InputIter, bool>
-        __result = __get_string(__s, __end, __ps.begin() + 1, __ps.end());
-      __s = __result.first;
-      if (!__result.second)
-	__err |= ios::failbit;
-    }
-    if (!(__err & ios_base::failbit))
-      __digits = __buf;
-  }
-  else {
-    if (__ns.size() > 1) {
-      pair<_InputIter, bool>
-        __result = __get_string(__s, __end, __ns.begin() + 1, __ns.end());
-      __s = __result.first;
-      if (!__result.second)
-	__err |= ios::failbit;
-    }
-    if (!(__err & ios::failbit)) {
-      __buf.insert(__buf.begin(),__c_type.widen('-'));
-      __digits = __buf;
-    }
-  }
-  if (__s == __end)
-    __err |= ios::eofbit;
-
-  return __s;
-}
-
-// money_put facets
-
-template <class _CharT, class _OutputIter>
-_OutputIter
-money_put<_CharT, _OutputIter>
- ::do_put(_OutputIter __s, bool __intl, ios_base& __str,
-          char_type __fill,
-          const string_type& __digits) const { 
-  typedef ctype<_CharT>             _Ctype;
-  typedef moneypunct<_CharT, false> _Punct;
-  typedef moneypunct<_CharT, true>  _Punct_intl;
-
-  locale __loc = __str.getloc();
-  const _Ctype&      __c_type      = use_facet<_Ctype>(__loc) ;
-  const _Punct&      __punct      = use_facet<_Punct>(__loc) ;
-  const _Punct_intl& __punct_intl = use_facet<_Punct_intl>(__loc) ;
-
-  // some special characters
-
-  char_type __minus = __c_type.widen('-');
-  char_type __plus  = __c_type.widen('+');
-  char_type __space = __c_type.widen(' ');
-  char_type __zero  = __c_type.widen('0');
-  char_type __point = __intl ? __c_type.widen(__punct_intl.decimal_point())
-			     : __c_type.widen(__punct.decimal_point());
-
-  char_type __sep = __intl ? __punct_intl.thousands_sep()
-			   : __punct     .thousands_sep();
-
-  string __grouping = __intl ? __punct_intl.grouping()
-		             : __punct     .grouping();
-				
-  int __frac_digits      = __intl ? __punct_intl.frac_digits() 
-                                  : __punct.frac_digits();
-
-  string_type __curr_sym = __intl ? __punct_intl.curr_symbol() 
-                                  : __punct.curr_symbol();
-
-    // if there are no digits we are going to return __s.  If there
-    // are digits, but not enough to fill the frac_digits, we are
-    // going to add zeros.  I don't know whether this is right or
-    // not.
-
-  if (__digits.size() == 0) 
-    return __s;
-
-  typename string_type::const_iterator __digits_first = __digits.begin();
-  typename string_type::const_iterator __digits_last  = __digits.end();
-
-  bool __is_negative = *__digits_first == __minus;
-  if (__is_negative)
-    ++__digits_first;
-
-  string_type __sign = __intl ?
-			 __is_negative ? __punct_intl.negative_sign()
-				       : __punct_intl.positive_sign()
-			      :
-			 __is_negative ? __punct.negative_sign()
-				       : __punct.positive_sign();
-  typename string_type::const_iterator __cp = __digits_first;
-  while (__cp != __digits_last && __c_type.is(ctype_base::digit, *__cp))
-    ++__cp;
-  if (__cp == __digits_first)
-    return __s;
-  __digits_last = __cp;
-
-  // If grouping is required, we make a copy of __digits and
-  // insert the grouping.
-
-  // To handle the fractional digits, we augment the first group
-  // by frac_digits.  If there is only one group, we need first
-  // to duplicate it.
-
-  string_type __new_digits(__digits_first, __digits_last);
-
-  if (__grouping.size() != 0) {
-    if (__grouping.size() == 1)
-      __grouping.push_back(__grouping[0]);
-    __grouping[0] += __frac_digits;
-    _CharT* __data_ptr = __CONST_CAST(_CharT*,__new_digits.data());
-    _CharT* __data_end = __data_ptr + __new_digits.size();
-    
-    ptrdiff_t __value_length = __insert_grouping(__data_ptr,
-	  				         __data_end,
-					         __grouping,
-					         __sep,
-					         __plus, __minus, 0);
-    __digits_first = __new_digits.begin();
-    __digits_last  = __digits_first + __value_length;
-  }
-
-  // Determine the amount of padding required, if any.  
-    
-  size_t __width        = __str.width();
-
-#if defined(_STLP_DEBUG) && (defined(__HP_aCC) || (__HP_aCC <= 1))
-  size_t __value_length = operator -(__digits_last, __digits_first);
-#else
-  size_t __value_length = __digits_last - __digits_first;
-#endif
-
-  size_t __length       = __value_length;
-      
-  __length += __sign.size();
-  if (__frac_digits != 0)
-    ++__length;
-
-  bool __generate_curr = (__str.flags() & ios_base::showbase) !=0;
-  if (__generate_curr)
-    __length += __curr_sym.size();
-  money_base::pattern __format =
-    __intl ? (__is_negative ? __punct_intl.neg_format() 
-                            : __punct_intl.pos_format())
-           : (__is_negative ? __punct.neg_format() 
-                            : __punct.pos_format());
-  {
-    for (int __i = 0; __i < 4; ++__i)
-      if (__format.field[__i] == (char) money_base::space)
-        ++__length;
-  }
-
-  size_t __fill_amt = __length < __width ? __width - __length : 0;
-
-  ios_base::fmtflags __fill_pos = __str.flags() & ios_base::adjustfield;
-
-  if (__fill_amt != 0 &&
-      !(__fill_pos & (ios_base::left | ios_base::internal)))
-    __s = fill_n(__s, __fill_amt, __fill);
-    
-  for (int __i = 0; __i < 4; ++__i) {
-    char __ffield = __format.field[__i];
-    if (__ffield == money_base::none) {
-      if (__fill_amt != 0 && __fill_pos == ios_base::internal)
-        __s = fill_n(__s, __fill_amt, __fill);
-    }
-    else if (__ffield == money_base::space) {
-      *__s++ = __space;
-      if (__fill_amt != 0 && __fill_pos == ios_base::internal)
-        __s = fill_n(__s, __fill_amt, __fill);
-    }
-    else if (__ffield == money_base::symbol) {
-      if (__generate_curr)
-        __s = copy(__curr_sym.begin(), __curr_sym.end(), __s);
-    }
-    else if (__ffield == money_base::sign) {
-      if (__sign.size() != 0)
-        *__s++ = __sign[0];
-    }
-    else if (__ffield == money_base::value) {
-      if (__frac_digits == 0)
-        __s = copy(__digits_first, __digits_last, __s);
-      else {
-        if ((int)__value_length <= __frac_digits) {
-          *__s++ = __point;
-          __s = copy(__digits_first, __digits_last, __s);
-          __s =  fill_n(__s, __frac_digits - __value_length, __zero);
-        }
-        else {
-          __s = copy(__digits_first, __digits_last - __frac_digits, __s);
-          if (__frac_digits != 0) {
-            *__s++ = __point;
-            __s = copy(__digits_last - __frac_digits, __digits_last, __s);
-          }
-        }
-      }
-    }
-  } // Close for loop
-
-  // Ouput rest of sign if necessary.
-
-  if (__sign.size() > 1)
-    __s = copy(__sign.begin() + 1, __sign.end(), __s);
-  if (!(__fill_pos & (ios_base::right | ios_base::internal)))
-    __s = fill_n(__s, __fill_amt, __fill);
-  
-  return __s;
-}
-
-_STLP_END_NAMESPACE
-
-# endif /* EXPOSE */
-
-#endif /* _STLP_MONETARY_C */
diff --git a/src/STLport/stl/_monetary.h b/src/STLport/stl/_monetary.h
deleted file mode 100644
index 3343c14..0000000
--- a/src/STLport/stl/_monetary.h
+++ /dev/null
@@ -1,463 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-// WARNING: This is an internal header file, included by other C++
-// standard library headers.  You should not attempt to use this header
-// file directly.
-
-
-#ifndef _STLP_INTERNAL_MONETARY_H
-#define _STLP_INTERNAL_MONETARY_H
-
-#ifndef _STLP_INTERNAL_CTYPE_H
-# include <stl/_ctype.h>
-#endif
-
-#ifndef _STLP_INTERNAL_OSTREAMBUF_ITERATOR_H
-# include <stl/_ostreambuf_iterator.h>
-#endif
-
-#ifndef _STLP_INTERNAL_ISTREAMBUF_ITERATOR_H
-# include <stl/_istreambuf_iterator.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-class money_base {
-public:
-  enum part {none, space, symbol, sign, value};
-  struct pattern {
-    char field[4];
-  };
-};
-
-// moneypunct facets: forward declaration
-template <class _charT, __DFL_NON_TYPE_PARAM(bool, _International, false) > class moneypunct {};
-
-// money_get facets
-
-template <class _CharT, __DFL_TMPL_PARAM(_InputIter , istreambuf_iterator<_CharT>) >
-class money_get : public locale::facet 
-{
-  friend class _Locale;
-public:
-  typedef _CharT               char_type;
-  typedef _InputIter           iter_type;
-  typedef basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> > string_type;
-
-  money_get(size_t __refs = 0) : _BaseFacet(__refs) {}
-# ifndef _STLP_NO_LONG_DOUBLE
-  iter_type get(iter_type __s, iter_type  __end, bool __intl,
-                ios_base&  __str, ios_base::iostate&  __err,
-                long double& __units) const
-    { return do_get(__s,  __end, __intl,  __str,  __err, __units); }
-# endif  
-  iter_type get(iter_type __s, iter_type  __end, bool __intl,
-                ios_base&  __str, ios_base::iostate& __err,
-                string_type& __digits) const
-    { return do_get(__s,  __end, __intl,  __str,  __err, __digits); }
-
-  _STLP_STATIC_MEMBER_DECLSPEC static locale::id id;
-
-protected:
-  ~money_get() {}
-# ifndef _STLP_NO_LONG_DOUBLE
-  virtual iter_type do_get(iter_type __s, iter_type  __end, bool  __intl,
-                           ios_base&  __str, ios_base::iostate& __err,
-                           long double& __units) const;
-# endif
-  virtual iter_type do_get(iter_type __s, iter_type __end, bool __intl,
-                           ios_base&  __str, ios_base::iostate& __err,
-                           string_type& __digits) const;
-};
-
-
-// moneypunct facets: definition of specializations
-
-_STLP_TEMPLATE_NULL
-class _STLP_CLASS_DECLSPEC moneypunct<char, true> : public locale::facet, public money_base 
-{
-
-public:
-  typedef char                 char_type;
-  typedef string               string_type;
-  explicit moneypunct _STLP_PSPEC2(char, true) (size_t __refs = 0);
-
-  char        decimal_point() const { return do_decimal_point(); }
-  char        thousands_sep() const { return do_thousands_sep(); }
-  string      grouping()      const { return do_grouping(); }
-  string_type curr_symbol()   const { return do_curr_symbol(); }
-  string_type positive_sign() const { return do_positive_sign(); }
-  string_type negative_sign() const { return do_negative_sign(); }
-  int         frac_digits()   const { return do_frac_digits(); }
-  pattern     pos_format()    const { return do_pos_format(); }
-  pattern     neg_format()    const { return do_neg_format(); }
-
-  _STLP_STATIC_MEMBER_DECLSPEC static locale::id id;
-# if defined (_STLP_STATIC_CONST_INIT_BUG)
-  enum _IntlVal { intl = 1 } ;
-# else
-  static const bool intl = true;
-# endif
-
-protected:
-  pattern _M_pos_format;
-  pattern _M_neg_format;
-
-  ~moneypunct _STLP_PSPEC2(char, true) ();
-
-  virtual char        do_decimal_point() const;
-  virtual char        do_thousands_sep() const;
-  virtual string      do_grouping()      const;
-
-  virtual string      do_curr_symbol()   const;
-
-  virtual string      do_positive_sign() const;
-  virtual string      do_negative_sign() const;
-  virtual int         do_frac_digits()   const;
-  virtual pattern     do_pos_format()    const;
-  virtual pattern     do_neg_format()    const;
-
-  friend class _Locale;
-
-};
-
-_STLP_TEMPLATE_NULL
-class _STLP_CLASS_DECLSPEC moneypunct<char, false> : public locale::facet, public money_base 
-{
-public:
-  typedef char                 char_type;
-  typedef string               string_type;
-
-  explicit moneypunct _STLP_PSPEC2(char, false) (size_t __refs = 0);
-
-  char        decimal_point() const { return do_decimal_point(); }
-  char        thousands_sep() const { return do_thousands_sep(); }
-  string      grouping()      const { return do_grouping(); }
-  string_type curr_symbol()   const { return do_curr_symbol(); }
-  string_type positive_sign() const { return do_positive_sign(); }
-  string_type negative_sign() const { return do_negative_sign(); }
-  int         frac_digits()   const { return do_frac_digits(); }
-  pattern     pos_format()    const { return do_pos_format(); }
-  pattern     neg_format()    const { return do_neg_format(); }
-
-  _STLP_STATIC_MEMBER_DECLSPEC static locale::id id;
-# if defined (_STLP_STATIC_CONST_INIT_BUG)
-  enum _IntlVal { intl = 0 } ;
-# else
-  static const bool intl = false;
-# endif
-
-protected:
-  pattern _M_pos_format;
-  pattern _M_neg_format;
-
-  ~moneypunct _STLP_PSPEC2(char, false) ();
-
-  virtual char        do_decimal_point() const;
-  virtual char        do_thousands_sep() const;
-  virtual string      do_grouping()      const;
-
-  virtual string      do_curr_symbol()   const;
-
-  virtual string      do_positive_sign() const;
-  virtual string      do_negative_sign() const;
-  virtual int         do_frac_digits()   const;
-  virtual pattern     do_pos_format()    const;
-  virtual pattern     do_neg_format()    const;
-
-  friend class _Locale;
-};
-
-
-# ifndef _STLP_NO_WCHAR_T
-
-_STLP_TEMPLATE_NULL
-class _STLP_CLASS_DECLSPEC moneypunct<wchar_t, true> : public locale::facet, public money_base 
-{
-  friend class _Locale;
-public:
-  typedef wchar_t                 char_type;
-  typedef wstring                 string_type;
-  explicit moneypunct _STLP_PSPEC2(wchar_t, true) (size_t __refs = 0);
-  wchar_t     decimal_point() const { return do_decimal_point(); }
-  wchar_t     thousands_sep() const { return do_thousands_sep(); }
-  string      grouping()      const { return do_grouping(); }
-  string_type curr_symbol()   const { return do_curr_symbol(); }
-  string_type positive_sign() const { return do_positive_sign(); }
-  string_type negative_sign() const { return do_negative_sign(); }
-  int         frac_digits()   const { return do_frac_digits(); }
-  pattern     pos_format()    const { return do_pos_format(); }
-  pattern     neg_format()    const { return do_neg_format(); }
-
-  _STLP_STATIC_MEMBER_DECLSPEC static locale::id id;
-# if defined (_STLP_STATIC_CONST_INIT_BUG)
-  enum _IntlVal { intl = 1 } ;
-# else
-  static const bool intl = true;
-# endif
-
-protected:
-  pattern _M_pos_format;
-  pattern _M_neg_format;
-
-  ~moneypunct _STLP_PSPEC2(wchar_t, true) ();
-
-  virtual wchar_t     do_decimal_point() const;
-  virtual wchar_t     do_thousands_sep() const;
-  virtual string      do_grouping()      const;
-
-  virtual string_type do_curr_symbol()   const;
-
-  virtual string_type do_positive_sign() const;
-  virtual string_type do_negative_sign() const;
-  virtual int         do_frac_digits()   const;
-  virtual pattern     do_pos_format()    const;
-  virtual pattern     do_neg_format()    const;
-};
-
-
-_STLP_TEMPLATE_NULL
-class _STLP_CLASS_DECLSPEC moneypunct<wchar_t, false> : public locale::facet, public money_base 
-{
-  friend class _Locale;
-public:
-  typedef wchar_t                 char_type;
-  typedef wstring                 string_type;
-  explicit moneypunct _STLP_PSPEC2(wchar_t, false) (size_t __refs = 0);
-  wchar_t     decimal_point() const { return do_decimal_point(); }
-  wchar_t     thousands_sep() const { return do_thousands_sep(); }
-  string      grouping()      const { return do_grouping(); }
-  string_type curr_symbol()   const { return do_curr_symbol(); }
-  string_type positive_sign() const { return do_positive_sign(); }
-  string_type negative_sign() const { return do_negative_sign(); }
-  int         frac_digits()   const { return do_frac_digits(); }
-  pattern     pos_format()    const { return do_pos_format(); }
-  pattern     neg_format()    const { return do_neg_format(); }
-
-  _STLP_STATIC_MEMBER_DECLSPEC static locale::id id;
-# if defined (_STLP_STATIC_CONST_INIT_BUG)
-  enum _IntlVal { intl = 0 } ;
-# else
-  static const bool intl = false;
-# endif
-
-protected:
-  pattern _M_pos_format;
-  pattern _M_neg_format;
-
-  ~moneypunct _STLP_PSPEC2(wchar_t, false) ();
-
-  virtual wchar_t     do_decimal_point() const;
-  virtual wchar_t     do_thousands_sep() const;
-  virtual string      do_grouping()      const;
-
-  virtual string_type do_curr_symbol()   const;
-
-  virtual string_type do_positive_sign() const;
-  virtual string_type do_negative_sign() const;
-  virtual int         do_frac_digits()   const;
-  virtual pattern     do_pos_format()    const;
-  virtual pattern     do_neg_format()    const;
-};
-
-# endif
-
-template <class _charT, __DFL_NON_TYPE_PARAM(bool , _International , false) > class moneypunct_byname {};
-
-_STLP_TEMPLATE_NULL
-class _STLP_CLASS_DECLSPEC moneypunct_byname<char, true> : public moneypunct<char, true> 
-{
-public:
-  typedef money_base::pattern   pattern;
-  typedef char                  char_type;
-  typedef string                string_type;
-
-  explicit moneypunct_byname _STLP_PSPEC2(char, true) (const char * __name, size_t __refs = 0);
-
-protected:
-  _Locale_monetary* _M_monetary;
-  ~moneypunct_byname _STLP_PSPEC2(char, true) ();
-  virtual char        do_decimal_point() const;
-  virtual char        do_thousands_sep() const;
-  virtual string      do_grouping()      const;
-
-  virtual string_type do_curr_symbol()   const;
-
-  virtual string_type do_positive_sign() const;
-  virtual string_type do_negative_sign() const;
-  virtual int         do_frac_digits()   const;
-};
-
-_STLP_TEMPLATE_NULL
-class _STLP_CLASS_DECLSPEC moneypunct_byname<char, false> : public moneypunct<char, false> 
-{
-public:
-  typedef money_base::pattern   pattern;
-  typedef char                  char_type;
-  typedef string                string_type;
-
-  explicit moneypunct_byname _STLP_PSPEC2(char, false) (const char * __name, size_t __refs = 0);
-
-protected:
-  _Locale_monetary* _M_monetary;
-  ~moneypunct_byname _STLP_PSPEC2(char, false) ();
-  virtual char        do_decimal_point() const;
-  virtual char        do_thousands_sep() const;
-  virtual string      do_grouping()      const;
-
-  virtual string_type do_curr_symbol()   const;
-
-  virtual string_type do_positive_sign() const;
-  virtual string_type do_negative_sign() const;
-  virtual int         do_frac_digits()   const;
-};
-
-# ifndef _STLP_NO_WCHAR_T
-_STLP_TEMPLATE_NULL
-class _STLP_CLASS_DECLSPEC moneypunct_byname<wchar_t, true> : public moneypunct<wchar_t, true> 
-{
-public:
-  typedef money_base::pattern   pattern;
-  typedef wchar_t               char_type;
-  typedef wstring               string_type;
-
-  explicit moneypunct_byname _STLP_PSPEC2(wchar_t, true) (const char * __name, size_t __refs = 0);
-
-protected:
-  _Locale_monetary* _M_monetary;
-  ~moneypunct_byname _STLP_PSPEC2(wchar_t, true) ();
-  virtual wchar_t     do_decimal_point() const;
-  virtual wchar_t     do_thousands_sep() const;
-  virtual string      do_grouping()      const;
-
-  virtual string_type do_curr_symbol()   const;
-
-  virtual string_type do_positive_sign() const;
-  virtual string_type do_negative_sign() const;
-  virtual int         do_frac_digits()   const;
-};
-
-_STLP_TEMPLATE_NULL
-class _STLP_CLASS_DECLSPEC moneypunct_byname<wchar_t, false> : public moneypunct<wchar_t, false> 
-{
-public:
-  typedef money_base::pattern   pattern;
-  typedef wchar_t               char_type;
-  typedef wstring               string_type;
-
-  explicit moneypunct_byname _STLP_PSPEC2(wchar_t, false) (const char * __name, size_t __refs = 0);
-
-protected:
-  _Locale_monetary* _M_monetary;
-  ~moneypunct_byname _STLP_PSPEC2(wchar_t, false) ();
-  virtual wchar_t     do_decimal_point() const;
-  virtual wchar_t     do_thousands_sep() const;
-  virtual string      do_grouping()      const;
-
-  virtual string_type do_curr_symbol()   const;
-
-  virtual string_type do_positive_sign() const;
-  virtual string_type do_negative_sign() const;
-  virtual int         do_frac_digits()   const;
-};
-# endif
-
-//===== methods ======
-
-
-// money_put facets
-
-template <class _CharT, __DFL_TMPL_PARAM( _OutputIter , ostreambuf_iterator<_CharT>) >
-class money_put : public locale::facet {
-  friend class _Locale;
-
-public:
-  typedef _CharT               char_type;
-  typedef _OutputIter          iter_type;
-  typedef basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> > string_type;
-
-  money_put(size_t __refs = 0) : _BaseFacet(__refs) {}
-# ifndef _STLP_NO_LONG_DOUBLE
-  iter_type put(iter_type __s, bool __intl, ios_base& __str,
-                char_type  __fill, long double __units) const
-    { return do_put(__s, __intl, __str, __fill, __units); }
-# endif
-  iter_type put(iter_type __s, bool __intl, ios_base& __str,
-                char_type  __fill, 
-                const string_type& __digits) const
-    { return do_put(__s, __intl, __str, __fill, __digits); }
-
-  _STLP_STATIC_MEMBER_DECLSPEC static locale::id id;
-
-protected:
-  ~money_put() {}
-# ifndef _STLP_NO_LONG_DOUBLE
-  virtual iter_type do_put(iter_type __s, bool  __intl, ios_base&  __str,
-                           char_type __fill, long double /*  __units */ ) const {
-
-    locale __loc = __str.getloc();
-    _CharT  __buf[64];
-    return do_put(__s, __intl, __str, __fill, __buf + 0);
-  }
-# endif    
-  virtual iter_type do_put(iter_type __s, bool  __intl, ios_base&  __str,
-                           char_type __fill,
-                           const string_type& __digits) const;
-};
-
-# if defined (_STLP_USE_TEMPLATE_EXPORT)
-_STLP_EXPORT_TEMPLATE_CLASS money_get<char, istreambuf_iterator<char, char_traits<char> > >;
-_STLP_EXPORT_TEMPLATE_CLASS money_put<char, ostreambuf_iterator<char, char_traits<char> > >;
-// _STLP_EXPORT_TEMPLATE_CLASS money_get<char, const char* >;
-// _STLP_EXPORT_TEMPLATE_CLASS money_put<char, char* >;
-#  if ! defined (_STLP_NO_WCHAR_T)
-_STLP_EXPORT_TEMPLATE_CLASS money_get<wchar_t, istreambuf_iterator<wchar_t, char_traits<wchar_t> > >;
-_STLP_EXPORT_TEMPLATE_CLASS money_put<wchar_t, ostreambuf_iterator<wchar_t, char_traits<wchar_t> > >;
-// _STLP_EXPORT_TEMPLATE_CLASS money_get<wchar_t, const wchar_t* >;
-// _STLP_EXPORT_TEMPLATE_CLASS money_put<wchar_t, wchar_t* >;
-#  endif
-# endif /* _STLP_USE_TEMPLATE_EXPORT */
-
-# if defined (__BORLANDC__) && defined (_RTLDLL)
-inline void _Stl_loc_init_monetary() {
-  money_get<char, istreambuf_iterator<char, char_traits<char> > >::id._M_index                     = 8;
-  money_get<char, const char*>::id._M_index        = 9;
-  money_put<char, ostreambuf_iterator<char, char_traits<char> > >::id._M_index                     = 10;
-  money_put<char, char*>::id._M_index              = 11;
-# ifndef _STLP_NO_WCHAR_T
-  money_get<wchar_t, istreambuf_iterator<wchar_t, char_traits<wchar_t> > >::id._M_index                  = 27;
-  money_get<wchar_t, const wchar_t*>::id._M_index  = 28;
-  money_put<wchar_t, ostreambuf_iterator<wchar_t, char_traits<wchar_t> > >::id._M_index                  = 29;
-  money_put<wchar_t, wchar_t*>::id._M_index        = 30;
-# endif  
-}
-#endif
-
-_STLP_END_NAMESPACE
-
-# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION)
-#  include <stl/_monetary.c>
-# endif
-
-#endif /* _STLP_INTERNAL_MONETARY_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
-
diff --git a/src/STLport/stl/_new.h b/src/STLport/stl/_new.h
deleted file mode 100644
index 9c9dc35..0000000
--- a/src/STLport/stl/_new.h
+++ /dev/null
@@ -1,93 +0,0 @@
-
-#ifndef _STLP_NEW_H_HEADER
-# define _STLP_NEW_H_HEADER
-
-# ifdef _STLP_NO_BAD_ALLOC
-
-# ifndef _STLP_NEW_DONT_THROW
-#   define _STLP_NEW_DONT_THROW 1
-# endif /* _STLP_NEW_DONT_THROW */
-
-#  include <exception>
-
-_STLP_BEGIN_NAMESPACE
-
-struct nothrow_t {};
-
-# ifdef _STLP_OWN_IOSTREAMS
-extern _STLP_DECLSPEC const nothrow_t nothrow;
-# else
-#  define nothrow nothrow_t()
-# endif
-
-class bad_alloc : public _STLP_EXCEPTION_BASE { 
-public:
-  bad_alloc () _STLP_NOTHROW_INHERENTLY { }
-  bad_alloc(const bad_alloc&) _STLP_NOTHROW_INHERENTLY { }
-  bad_alloc& operator=(const bad_alloc&) _STLP_NOTHROW_INHERENTLY {return *this;}
-  ~bad_alloc () _STLP_NOTHROW_INHERENTLY { }
-  const char* what() const _STLP_NOTHROW_INHERENTLY { return "bad alloc"; }
-};
-
-_STLP_END_NAMESPACE
-
-#endif /* _STLP_NO_BAD_ALLOC */
-
-#ifdef _STLP_WINCE
-_STLP_BEGIN_NAMESPACE
-
-inline void* _STLP_CALL __stl_new(size_t __n) {
-  return ::malloc(__n);
-}
-
-inline void _STLP_CALL __stl_delete(void* __p) {
-  free(__p);
-}
-_STLP_END_NAMESPACE
-
-#else /* _STLP_WINCE */
-
-#include <new>
-
-# ifndef _STLP_NO_BAD_ALLOC
-#  ifdef _STLP_USE_OWN_NAMESPACE
-
-    _STLP_BEGIN_NAMESPACE
-    using _STLP_VENDOR_EXCEPT_STD::bad_alloc;
-    using _STLP_VENDOR_EXCEPT_STD::nothrow_t;
-    using _STLP_VENDOR_EXCEPT_STD::nothrow;
-
-#  if defined (_STLP_GLOBAL_NEW_HANDLER)
-    using ::new_handler;
-    using ::set_new_handler;
-#  else
-    using _STLP_VENDOR_EXCEPT_STD::new_handler;
-    using _STLP_VENDOR_EXCEPT_STD::set_new_handler;
-#  endif
-    
-    _STLP_END_NAMESPACE
-
-#  endif /* _STLP_OWN_NAMESPACE */
-
-# endif /* _STLP_NO_BAD_ALLOC */
-
-# if defined (_STLP_NO_NEW_NEW_HEADER) || defined (_STLP_NEW_DONT_THROW) && ! defined (_STLP_CHECK_NULL_ALLOC)
-#  define _STLP_CHECK_NULL_ALLOC(__x) void* __y = __x;if (__y == 0){_STLP_THROW(bad_alloc());}return __y
-# else
-#  define _STLP_CHECK_NULL_ALLOC(__x) return __x
-# endif
-
-_STLP_BEGIN_NAMESPACE
-
-#if (( defined(__IBMCPP__)|| defined(__OS400__) || defined (__xlC__) || defined (qTidyHeap)) && defined(__DEBUG_ALLOC__) )
-inline void*  _STLP_CALL __stl_new(size_t __n) {  _STLP_CHECK_NULL_ALLOC(::operator _STLP_NEW(__n, __FILE__, __LINE__)); }
-inline void _STLP_CALL __stl_delete(void* __p) { ::operator delete(__p, __FILE__, __LINE__); }
-#else
-inline void*  _STLP_CALL __stl_new(size_t __n)   { _STLP_CHECK_NULL_ALLOC(::operator _STLP_NEW(__n)); }
-inline void   _STLP_CALL __stl_delete(void* __p) { ::operator delete(__p); }
-#endif
-_STLP_END_NAMESPACE
-
-# endif /* _STLP_WINCE */
-
-#endif /* _STLP_NEW_H_HEADER */
diff --git a/src/STLport/stl/_null_stream.h b/src/STLport/stl/_null_stream.h
deleted file mode 100644
index 1628783..0000000
--- a/src/STLport/stl/_null_stream.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2000
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_NULL_STREAM_H
-# define _STLP_NULL_STREAM_H
-
-_STLP_BEGIN_NAMESPACE
-
-struct __null_stream 
-{
-    void flush() { }
-};
-
-template <class _Tp>
-__null_stream& operator <<(__null_stream& __x, const _Tp& ) 
-{
-    return __x;
-}
-
-template <class _Tp>
-__null_stream& operator >>(const _Tp&, __null_stream& __x ) 
-{
-    return __x;
-}
-
-extern __null_stream cin, cout, cerr, endl, ws, hex, dec;
-
-_STLP_END_NAMESPACE
-
-# endif
diff --git a/src/STLport/stl/_num_get.c b/src/STLport/stl/_num_get.c
deleted file mode 100644
index 5f50bb2..0000000
--- a/src/STLport/stl/_num_get.c
+++ /dev/null
@@ -1,671 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-#ifndef _STLP_NUM_GET_C
-#define _STLP_NUM_GET_C
-
-#ifndef _STLP_INTERNAL_NUM_GET_H
-# include <stl/_num_get.h>
-#endif
-
-# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION)
-
-#ifndef _STLP_LIMITS_H
-# include <stl/_limits.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-extern const unsigned char __digit_val_table[];
-
-template < class _InputIter, class _Integer, class _CharT>
-_InputIter _STLP_CALL
-_M_do_get_integer(_InputIter&, _InputIter&, ios_base&, ios_base::iostate&, _Integer&, _CharT*);
-
-// _M_do_get_integer and its helper functions.  
-
-inline bool _STLP_CALL __get_fdigit(char& __c, const char*)
-  { return __c >= '0' && __c <= '9'; }
-
-inline bool _STLP_CALL __get_fdigit_or_sep(char& __c, char __sep, const char *)
-{ 
-  if (__c == __sep) { 
-    __c = ',' ; 
-    return true ;
-  } else
-    return  ( __c >= '0' && __c <= '9');
-}
-
-inline int _STLP_CALL
-__get_digit_from_table(unsigned __index)
-{
-  return (__index > 127 ? 0xFF : __digit_val_table[__index]);
-}
-
-extern const char __narrow_atoms[];
-
-template <class _InputIter, class _CharT>
-int 
-_M_get_base_or_zero(_InputIter& __in, _InputIter& __end, ios_base& __str, _CharT*)
-{
-  _CharT __atoms[5];
-  const ctype<_CharT>& __c_type = use_facet< ctype<_CharT> >(__str.getloc());
-  // const ctype<_CharT>& __c_type = *(const ctype<_CharT>*)__str._M_ctype_facet();
-
-  __c_type.widen(__narrow_atoms, __narrow_atoms + 5, __atoms);
-
-  bool __negative = false;
-  _CharT __c = *__in;
-
-  if (__c == __atoms[1] /* __xminus_char */ ) {
-    __negative = true;
-    ++__in;
-  }
-  else if (__c == __atoms[0] /* __xplus_char */ ) 
-    ++__in;
-
-
-  int __base;
-  int __valid_zero = 0;
-  
-  ios_base::fmtflags __basefield = __str.flags() & ios_base::basefield; 
-
-  switch (__basefield) {
-  case ios_base::oct:
-    __base = 8;
-    break;
-  case ios_base::dec:
-    __base = 10;
-    break;
-  case ios_base::hex:
-    __base = 16;
-    if (__in != __end && *__in == __atoms[2] /* __zero_char */ ) {
-      ++__in;
-      if (__in != __end &&
-          (*__in == __atoms[3] /* __x_char */ || *__in == __atoms[4] /* __X_char */ ))
-        ++__in;
-      else
-        __valid_zero = 1; // That zero is valid by itself.
-    }
-    break;
-  default:
-    if (__in != __end && *__in == __atoms[2] /* __zero_char */ ) {
-      ++__in;
-      if (__in != __end &&
-          (*__in == __atoms[3] /* __x_char */ || *__in == __atoms[4] /* __X_char */ )) {
-        ++__in;
-        __base = 16;
-      }
-      else
-        {
-          __base = 8;
-          __valid_zero = 1; // That zero is still valid by itself.
-        }
-    }
-    else
-      __base = 10;
-    break;
-  }
-  return (__base << 2) | ((int)__negative << 1) | __valid_zero;
-}
-
-
-template <class _InputIter, class _Integer>
-bool _STLP_CALL
-__get_integer(_InputIter& __first, _InputIter& __last,
-	      int __base, _Integer& __val, 
-	      int __got, bool __is_negative, char __separator, const string& __grouping, const __true_type&) 
-{
-  bool __ovflow = false;
-  _Integer __result = 0;
-  bool __is_group = !__grouping.empty();
-  char __group_sizes[64];
-  int __current_group_size = 0;
-  char* __group_sizes_end = __group_sizes;
-  
-  _Integer __over_base = (numeric_limits<_Integer>::min)() / __STATIC_CAST(_Integer, __base);
-
-   for ( ; __first != __last ; ++__first) {
-  
-     const char __c = *__first;
-     
-     if (__is_group && __c == __separator) {
-       *__group_sizes_end++ = __current_group_size;
-       __current_group_size = 0;
-       continue;
-     }
-     
-     int __n = __get_digit_from_table(__c);
-     
-     if (__n >= __base)
-       break;
-     
-     ++__got;
-     ++__current_group_size;
-     
-     if (__result < __over_base)
-       __ovflow = true;  // don't need to keep accumulating
-     else {
-       _Integer __next = __STATIC_CAST(_Integer, __base * __result - __n);
-       if (__result != 0)
-	 __ovflow = __ovflow || __next >= __result;
-       __result = __next;
-     }
-   }
-
-   if (__is_group && __group_sizes_end != __group_sizes) {
-     *__group_sizes_end++ = __current_group_size;
-   }
-
-   // fbp : added to not modify value if nothing was read
-   if (__got > 0) {
-       __val = __ovflow
-	 ? __is_negative ? (numeric_limits<_Integer>::min)()
-	 : (numeric_limits<_Integer>::max)()
-	 : (__is_negative ? __result : __STATIC_CAST(_Integer, -__result));
-   }
-  // overflow is being treated as failure
-  return ((__got > 0) && !__ovflow) && (__is_group == 0 || __valid_grouping(__group_sizes, __group_sizes_end,
-									    __grouping.data(), __grouping.data()+ __grouping.size())) ;
-}
-
-template <class _InputIter, class _Integer>
-bool _STLP_CALL
-__get_integer(_InputIter& __first, _InputIter& __last,
-	      int __base, _Integer& __val, 
-	      int __got, bool __is_negative, char __separator, const string& __grouping, const __false_type&) 
-{
-  bool __ovflow = false;
-  _Integer __result = 0;
-  bool __is_group = !__grouping.empty();
-  char __group_sizes[64];
-  int __current_group_size = 0;
-  char* __group_sizes_end = __group_sizes;
-
-  _Integer  __over_base = (numeric_limits<_Integer>::max)() / __STATIC_CAST(_Integer, __base);
-
-  for ( ; __first != __last ; ++__first) {
-
-    const char __c = *__first;
-    
-    if (__is_group && __c == __separator) {
-      *__group_sizes_end++ = __current_group_size;
-      __current_group_size = 0;
-      continue;
-    }
-    
-    int __n = __get_digit_from_table(__c);
-    
-    if (__n >= __base)
-      break;
-    
-    ++__got;
-    ++__current_group_size;
-
-    if (__result > __over_base)
-      __ovflow = true;  //don't need to keep accumulating
-    else {
-      _Integer __next = __STATIC_CAST(_Integer, __base * __result + __n);
-	if (__result != 0)
-	  __ovflow = __ovflow || __next <= __result;
-	__result = __next;
-      }      
-  }
-
-  if (__is_group && __group_sizes_end != __group_sizes) {
-      *__group_sizes_end++ = __current_group_size;
-  }
-
-  // fbp : added to not modify value if nothing was read
-  if (__got > 0) {
-      __val = __ovflow
-	? (numeric_limits<_Integer>::max)()
-	: (__is_negative ? __STATIC_CAST(_Integer, -__result) : __result);      
-  }
-  // overflow is being treated as failure
-  return ((__got > 0) && !__ovflow) && 
-    (__is_group == 0 || __valid_grouping(__group_sizes, __group_sizes_end,
-					 __grouping.data(), __grouping.data()+ __grouping.size())) ;
-}
-
-
-template <class _InputIter, class _Integer>
-bool _STLP_CALL
-__get_decimal_integer(_InputIter& __first, _InputIter& __last, _Integer& __val)
-{
-  string __grp;
-  return __get_integer(__first, __last, 10, __val, 0, false, ' ', __grp, __false_type());
-}
-
-template <class _InputIter, class _Integer, class _CharT>
-_InputIter _STLP_CALL
-_M_do_get_integer(_InputIter& __in, _InputIter& __end, ios_base& __str,
-                  ios_base::iostate& __err, _Integer& __val, _CharT* __pc) 
-{
-
-#if defined(__HP_aCC) && (__HP_aCC == 1)
-  bool _IsSigned = !((_Integer)(-1) > 0);
-#else
-  typedef typename __bool2type<numeric_limits<_Integer>::is_signed>::_Ret _IsSigned;
-#endif
-
-  const numpunct<_CharT>& __numpunct = *(const numpunct<_CharT>*)__str._M_numpunct_facet();
-  const string& __grouping = __str._M_grouping(); // cached copy
-
-  const int __base_or_zero = _M_get_base_or_zero(__in, __end, __str, __pc);
-  int  __got = __base_or_zero & 1;
-
-  bool __result;
-
-  if (__in == __end) {      // We may have already read a 0.  If so,
-
-    if (__got > 0) {       // the result is 0 even if we're at eof.
-      __val = 0;
-      __result = true;
-    }
-    else
-      __result = false;    
-  } else {
-
-    const bool __negative = __base_or_zero & 2;
-    const int __base = __base_or_zero >> 2;
-
-#if defined(__HP_aCC) && (__HP_aCC == 1)
-     if (_IsSigned)
-       __result = __get_integer(__in, __end, __base,  __val, __got, __negative, __numpunct.thousands_sep(), __grouping, __true_type() );
-     else
-      __result = __get_integer(__in, __end, __base,  __val, __got, __negative, __numpunct.thousands_sep(), __grouping, __false_type() );
-#else
-    __result = __get_integer(__in, __end, __base,  __val, __got, __negative, __numpunct.thousands_sep(), __grouping, _IsSigned());
-# endif
-  }
-
-  __err = __STATIC_CAST(ios_base::iostate, __result ? ios_base::goodbit : ios_base::failbit);
-
-  if (__in == __end)
-    __err |= ios_base::eofbit;
-  return __in;
-}
-
-// _M_read_float and its helper functions.
-template <class _InputIter, class _CharT>
-_InputIter  _STLP_CALL
-__copy_sign(_InputIter __first, _InputIter __last, string& __v,
-            _CharT __xplus, _CharT __xminus) {
-    if (__first != __last) {
-    _CharT __c = *__first;
-    if (__c == __xplus)
-      ++__first;
-    else if (__c == __xminus) {
-      __v.push_back('-');
-      ++__first;
-    }
-  }
-  return __first;
-}
-
-
-template <class _InputIter, class _CharT>
-bool _STLP_CALL
-__copy_digits(_InputIter& __first, _InputIter& __last,
-              string& __v, const _CharT* __digits)
-{
-  bool __ok = false;
-
-  for ( ; __first != __last; ++__first) {
-    _CharT __c = *__first;
-    if (__get_fdigit(__c, __digits)) {
-      __v.push_back((char)__c);
-      __ok = true;
-    }
-    else
-      break;
-  }
-  return __ok;
-}
-
-template <class _InputIter, class _CharT>
-bool _STLP_CALL
-__copy_grouped_digits(_InputIter& __first, _InputIter& __last,
-		      string& __v, const _CharT * __digits,
-		      _CharT __sep, const string& __grouping,
-		      bool& __grouping_ok)
-{
-  bool __ok = false;
-  char __group_sizes[64];
-  char*__group_sizes_end = __group_sizes;
-  char __current_group_size = 0;
-
-  for ( ; __first != __last; ++__first) {
-    _CharT __c = *__first;
-    bool __tmp = __get_fdigit_or_sep(__c, __sep, __digits);
-    if (__tmp) {
-      if (__c == ',') {
-        *__group_sizes_end++ = __current_group_size;
-        __current_group_size = 0;
-      }
-      else {
-        __ok = true;
-        __v.push_back((char)__c);
-        ++__current_group_size;
-      }
-    }
-    else
-      break;
-  }
-  
-  if (__group_sizes_end != __group_sizes)
-    *__group_sizes_end++ = __current_group_size;
-  __grouping_ok = __valid_grouping(__group_sizes, __group_sizes_end, __grouping.data(), __grouping.data() + __grouping.size());
-  return __ok;	
-}
-
-
-template <class _InputIter, class _CharT>
-bool _STLP_CALL
-_M_read_float(string& __buf, _InputIter& __in, _InputIter& __end, ios_base& __s, _CharT*)
-{
-  // Create a string, copying characters of the form 
-  // [+-]? [0-9]* .? [0-9]* ([eE] [+-]? [0-9]+)?
-
-  bool __digits_before_dot /* = false */;
-  bool __digits_after_dot = false;
-  bool __ok;
-
-  bool   __grouping_ok = true;
-
-  const ctype<_CharT>& __ct = use_facet< ctype<_CharT> >(__s.getloc());
-  // const ctype<_CharT>& __ct = *(const ctype<_CharT>*)__s._M_ctype_facet();
-  const numpunct<_CharT>& __numpunct = *(const numpunct<_CharT>*)__s._M_numpunct_facet();
-  const string& __grouping = __s._M_grouping(); // cached copy
-
-  _CharT __dot = __numpunct.decimal_point();
-  _CharT __sep = __numpunct.thousands_sep();
-
-  _CharT __digits[10];
-  _CharT __xplus;
-  _CharT __xminus;
-
-  _CharT __pow_e;
-  _CharT __pow_E;
-
-  _Initialize_get_float(__ct, __xplus, __xminus, __pow_e, __pow_E, __digits);
-
-  // Get an optional sign
-  __in = __copy_sign(__in, __end, __buf, __xplus, __xminus);
-
-  // Get an optional string of digits.
-  if (__grouping.size() != 0)
-    __digits_before_dot = __copy_grouped_digits(__in, __end, __buf, __digits,
-						__sep, __grouping, __grouping_ok);
-  else
-    __digits_before_dot = __copy_digits(__in, __end, __buf, __digits);
-
-  // Get an optional decimal point, and an optional string of digits.
-  if (__in != __end && *__in == __dot) {
-    __buf.push_back('.');
-    ++__in;
-    __digits_after_dot = __copy_digits(__in, __end, __buf, __digits);
-  }
-
-  // There have to be some digits, somewhere.
-  __ok = __digits_before_dot || __digits_after_dot;
-  
-  // Get an optional exponent.
-  if (__ok && __in != __end && (*__in == __pow_e || *__in == __pow_E)) {
-    __buf.push_back('e');
-    ++__in;
-    __in = __copy_sign(__in, __end, __buf, __xplus, __xminus);
-    __ok = __copy_digits(__in, __end, __buf, __digits);
-    // If we have an exponent then the sign 
-    // is optional but the digits aren't.
-  }
-  
-  return __ok;
-}
-
-//
-// num_get<>, num_put<>
-//
-
-# if ( _STLP_STATIC_TEMPLATE_DATA > 0 ) 
-template <class _CharT, class _InputIterator>
-locale::id num_get<_CharT, _InputIterator>::id;
-# else
-
-typedef num_get<char, const char*> num_get_char;
-typedef num_get<char, istreambuf_iterator<char, char_traits<char> > > num_get_char_2;
-
-__DECLARE_INSTANCE(locale::id, num_get_char::id, );
-__DECLARE_INSTANCE(locale::id, num_get_char_2::id, );
-
-# ifndef _STLP_NO_WCHAR_T
-
-typedef num_get<wchar_t, const wchar_t*> num_get_wchar_t;
-typedef num_get<wchar_t, istreambuf_iterator<wchar_t, char_traits<wchar_t> > > num_get_wchar_t_2;
-
-__DECLARE_INSTANCE(locale::id, num_get_wchar_t::id, );
-__DECLARE_INSTANCE(locale::id, num_get_wchar_t_2::id, );
-
-# endif
-
-# endif /* ( _STLP_STATIC_TEMPLATE_DATA > 0 ) */
-
-# ifndef _STLP_NO_BOOL
-template <class _CharT, class _InputIter>
-_InputIter
-num_get<_CharT, _InputIter>::do_get(_InputIter __in, _InputIter __end,
-                                    ios_base& __s,
-                                    ios_base::iostate& __err, bool& __x) const
-{
-  if (__s.flags() & ios_base::boolalpha) {
-    locale __loc = __s.getloc();
-    const _Numpunct& __np = *(const _Numpunct*)__s._M_numpunct_facet();
-    //    const numpunct<_CharT>& __np = use_facet<numpunct<_CharT> >(__loc) ;
-//    const ctype<_CharT>& __ct =    use_facet<ctype<_CharT> >(__loc) ;
-
-    const basic_string<_CharT> __truename  = __np.truename();
-    const basic_string<_CharT> __falsename = __np.falsename();
-    bool __true_ok  = true;
-    bool __false_ok = true;
-
-    size_t __n = 0;
-    for ( ; __in != __end; ++__in) {
-      _CharT __c = *__in;
-      __true_ok  = __true_ok  && (__c == __truename[__n]);
-      __false_ok = __false_ok && (__c == __falsename[__n]);
-      ++__n;
-
-      if ((!__true_ok && !__false_ok) ||
-          (__true_ok  && __n >= __truename.size()) ||
-          (__false_ok && __n >= __falsename.size())) {
-	++__in;
-        break;
-      }
-    }
-    if (__true_ok  && __n < __truename.size())  __true_ok  = false;
-    if (__false_ok && __n < __falsename.size()) __false_ok = false;
-    
-    if (__true_ok || __false_ok) {
-      __err = ios_base::goodbit;
-      __x = __true_ok;
-    }
-    else
-      __err = ios_base::failbit;
-
-    if (__in == __end)
-      __err |= ios_base::eofbit;
-
-    return __in;
-  }
-
-  else {
-    long __lx;
-    _InputIter __tmp = this->do_get(__in, __end, __s, __err, __lx);
-    if (!(__err & ios_base::failbit)) {
-      if (__lx == 0)
-        __x = false;
-      else if (__lx == 1)
-        __x = true;
-      else
-        __err |= ios_base::failbit;
-    }
-    return __tmp;
-  }
-}
-
-# endif /* _STLP_NO_BOOL */
-
-# ifdef _STLP_FIX_LIBRARY_ISSUES
-template <class _CharT, class _InputIter>  
-_InputIter 
-num_get<_CharT, _InputIter>::do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-                                    ios_base::iostate& __err, short& __val) const {
-  return _M_do_get_integer(__in, __end, __str, __err, __val, (_CharT*)0 );
-}
-
-template <class _CharT, class _InputIter>  
-_InputIter 
-num_get<_CharT, _InputIter>::do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-                                    ios_base::iostate& __err, int& __val) const {
-  return _M_do_get_integer(__in, __end, __str, __err, __val, (_CharT*)0 );
-}
-
-# endif
-
-template <class _CharT, class _InputIter>  
-_InputIter 
-num_get<_CharT, _InputIter>::do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-                                    ios_base::iostate& __err, long& __val) const {
-  return _M_do_get_integer(__in, __end, __str, __err, __val, (_CharT*)0 );
-}
-
-template <class _CharT, class _InputIter>  
-_InputIter 
-num_get<_CharT, _InputIter>::do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-                                    ios_base::iostate& __err,
-                                    unsigned short& __val) const {
-  return _M_do_get_integer(__in, __end, __str, __err, __val, (_CharT*)0 );
-}
-
-template <class _CharT, class _InputIter>  
-_InputIter 
-num_get<_CharT, _InputIter>::do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-                                    ios_base::iostate& __err, 
-                                    unsigned int& __val) const {
-  return _M_do_get_integer(__in, __end, __str, __err, __val, (_CharT*)0 );
-}
-
-template <class _CharT, class _InputIter>  
-_InputIter 
-num_get<_CharT, _InputIter>::do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-                                    ios_base::iostate& __err,
-                                    unsigned long& __val) const {
-  return _M_do_get_integer(__in, __end, __str, __err, __val, (_CharT*)0 );
-}
-
-
-template <class _CharT, class _InputIter>  
-_InputIter 
-num_get<_CharT, _InputIter>::do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-                                    ios_base::iostate& __err,
-                                    float& __val) const {
-  string __buf ;
-  bool __ok = _M_read_float(__buf, __in, __end, __str, (_CharT*)0 );
-  __string_to_float(__buf, __val);  
-  __err = __STATIC_CAST(ios_base::iostate, __ok ? ios_base::goodbit : ios_base::failbit);
-  if (__in == __end)
-    __err |= ios_base::eofbit;
-  return __in;
-}
-
-template <class _CharT, class _InputIter>  
-_InputIter 
-num_get<_CharT, _InputIter>::do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-                                    ios_base::iostate& __err, 
-                                    double& __val) const {
-  string __buf ;
-  bool __ok = _M_read_float(__buf, __in, __end, __str, (_CharT*)0 );
-  __string_to_float(__buf, __val);
-  __err = __STATIC_CAST(ios_base::iostate, __ok ? ios_base::goodbit : ios_base::failbit);
-  if (__in == __end)
-    __err |= ios_base::eofbit;
-  return __in;
-}
-
-#ifndef _STLP_NO_LONG_DOUBLE
-template <class _CharT, class _InputIter>  
-_InputIter 
-num_get<_CharT, _InputIter>::do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-				    ios_base::iostate& __err,
-                                    long double& __val) const {
-  string __buf ;
-  bool __ok = _M_read_float(__buf, __in, __end, __str, (_CharT*)0 );
-  __string_to_float(__buf, __val);
-  __err = __STATIC_CAST(ios_base::iostate, __ok ? ios_base::goodbit : ios_base::failbit);
-  if (__in == __end)
-    __err |= ios_base::eofbit;
-  return __in;
-}
-#endif /* _STLP_NO_LONG_DOUBLE */
-
-template <class _CharT, class _InputIter>  
-_InputIter 
-num_get<_CharT, _InputIter>::do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-                           ios_base::iostate& __err,
-                           void*& __p) const {
-# if defined(_STLP_LONG_LONG)&&!defined(__MRC__)		//*ty 12/07/2001 - MrCpp can not cast from long long to void*
-  unsigned _STLP_LONG_LONG __val;
-# else
-  unsigned long __val;
-# endif
-    iter_type __tmp = _M_do_get_integer(__in, __end, __str, __err, __val, (_CharT*)0 );
-    if (!(__err & ios_base::failbit))
-      __p = __REINTERPRET_CAST(void*,__val);
-    return __tmp;
-  }
-
-
-#ifdef _STLP_LONG_LONG
-
-template <class _CharT, class _InputIter>  
-_InputIter 
-num_get<_CharT, _InputIter>::do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-                                    ios_base::iostate& __err,
-                                    _STLP_LONG_LONG& __val) const {
-  return _M_do_get_integer(__in, __end, __str, __err, __val, (_CharT*)0 );
-}
-
-template <class _CharT, class _InputIter>  
-_InputIter 
-num_get<_CharT, _InputIter>::do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-                                    ios_base::iostate& __err,
-                                    unsigned _STLP_LONG_LONG& __val) const {
-  return _M_do_get_integer(__in, __end, __str, __err, __val, (_CharT*)0 );
-}
-
-#endif /* _STLP_LONG_LONG */
-
-_STLP_END_NAMESPACE
-
-# endif /* _STLP_EXPOSE_STREAM_IMPLEMENTATION */
-
-#endif /* _STLP_NUMERIC_FACETS_C */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_num_get.h b/src/STLport/stl/_num_get.h
deleted file mode 100644
index b396d4a..0000000
--- a/src/STLport/stl/_num_get.h
+++ /dev/null
@@ -1,259 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-// WARNING: This is an internal header file, included by other C++
-// standard library headers.  You should not attempt to use this header
-// file directly.
-
-
-#ifndef _STLP_INTERNAL_NUM_GET_H
-#define _STLP_INTERNAL_NUM_GET_H
-
-#ifndef _STLP_INTERNAL_ISTREAMBUF_ITERATOR_H
-# include <stl/_istreambuf_iterator.h>
-#endif
-
-# ifndef _STLP_C_LOCALE_H
-#  include <stl/c_locale.h>
-# endif
-
-#ifndef _STLP_INTERNAL_NUMPUNCT_H
-# include <stl/_numpunct.h>
-#endif
-#ifndef _STLP_INTERNAL_CTYPE_H
-# include <stl/_ctype.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-//----------------------------------------------------------------------
-// num_get facets
-
-# ifdef _STLP_LIMITED_DEFAULT_TEMPLATES
-template <class _CharT, class _InputIter>  
-# else
-template <class _CharT, class _InputIter = istreambuf_iterator<_CharT> >  
-# endif
-class num_get: public locale::facet
-{
-  friend class _Locale;
-public:
-  typedef _CharT     char_type;
-  typedef _InputIter iter_type;
-
-  explicit num_get(size_t __refs = 0): locale::facet(__refs) {}
-    
-# ifndef _STLP_NO_BOOL
-  _InputIter get(_InputIter __in, _InputIter __end, ios_base& __str,
-                ios_base::iostate& __err, bool& __val) const {
-    return do_get(__in, __end, __str, __err, __val);
-  }
-# endif
-
-# ifdef _STLP_FIX_LIBRARY_ISSUES
-  _InputIter get(_InputIter __in, _InputIter __end, ios_base& __str,
-                ios_base::iostate& __err, short& __val) const {
-    return do_get(__in, __end, __str, __err, __val);
-  }
-
-  _InputIter get(_InputIter __in, _InputIter __end, ios_base& __str,
-                ios_base::iostate& __err, int& __val) const {
-    return do_get(__in, __end, __str, __err, __val);
-  }
-# endif
-
-  _InputIter get(_InputIter __in, _InputIter __end, ios_base& __str,
-                ios_base::iostate& __err, long& __val) const {
-    return do_get(__in, __end, __str, __err, __val);
-  }
-
-  _InputIter get(_InputIter __in, _InputIter __end, ios_base& __str,
-                ios_base::iostate& __err, unsigned short& __val) const {
-    return do_get(__in, __end, __str, __err, __val);
-  }
-
-  _InputIter get(_InputIter __in, _InputIter __end, ios_base& __str,
-                ios_base::iostate& __err, unsigned int& __val) const {
-    return do_get(__in, __end, __str, __err, __val);
-  }
-
-  _InputIter get(_InputIter __in, _InputIter __end, ios_base& __str,
-                ios_base::iostate& __err, unsigned long& __val) const {
-    return do_get(__in, __end, __str, __err, __val);
-  }
-
-#ifdef _STLP_LONG_LONG
-
-  _InputIter get(_InputIter __in, _InputIter __end, ios_base& __str,
-                ios_base::iostate& __err, _STLP_LONG_LONG& __val) const {
-    return do_get(__in, __end, __str, __err, __val);
-  }
-
-  _InputIter get(_InputIter __in, _InputIter __end, ios_base& __str,
-                ios_base::iostate& __err, unsigned _STLP_LONG_LONG& __val) const {
-    return do_get(__in, __end, __str, __err, __val);
-  }
-
-#endif /* _STLP_LONG_LONG */
-
-  _InputIter get(_InputIter __in, _InputIter __end, ios_base& __str,
-                 ios_base::iostate& __err, float& __val) const {
-    return do_get(__in, __end, __str, __err, __val);
-  }
-
-  _InputIter get(_InputIter __in, _InputIter __end, ios_base& __str,
-                ios_base::iostate& __err, double& __val) const {
-    return do_get(__in, __end, __str, __err, __val);
-  }
-
-# ifndef _STLP_NO_LONG_DOUBLE
-
-  _InputIter get(_InputIter __in, _InputIter __end, ios_base& __str,
-                ios_base::iostate& __err, long double& __val) const {
-    return do_get(__in, __end, __str, __err, __val);
-  }
-# endif
-
-  _InputIter get(_InputIter __in, _InputIter __end, ios_base& __str,
-                ios_base::iostate& __err, void*& __val) const {
-    return do_get(__in, __end, __str, __err, __val);
-  }
-
-  _STLP_STATIC_MEMBER_DECLSPEC static locale::id id;
-
-protected:
-  ~num_get() {}
-
-  typedef string               string_type; 
-  typedef ctype<_CharT>        _Ctype;
-  typedef numpunct<_CharT>     _Numpunct;
-
-# ifndef _STLP_NO_BOOL
-  virtual _InputIter do_get(_InputIter __in, _InputIter __end,
-                           ios_base& __str, ios_base::iostate& __err, bool& __val) const;
-# endif
-
-  virtual _InputIter do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-                           ios_base::iostate& __err, long& __val) const;
-  virtual _InputIter do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-                           ios_base::iostate& __err, unsigned short& __val) const;
-  virtual _InputIter do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-                           ios_base::iostate& __err, unsigned int& __val) const;
-  virtual _InputIter do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-                           ios_base::iostate& __err, unsigned long& __val) const;
-# ifdef _STLP_FIX_LIBRARY_ISSUES
-  // issue 118 : those are actually not supposed to be here
-  virtual _InputIter do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-                           ios_base::iostate& __err, short& __val) const;
-  virtual _InputIter do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-                           ios_base::iostate& __err, int& __val) const;
-# endif
-  virtual _InputIter do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-                          ios_base::iostate& __err, float& __val) const;
-  virtual _InputIter do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-                           ios_base::iostate& __err, double& __val) const;
-  virtual _InputIter do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-                           ios_base::iostate& __err,
-                           void*& __p) const;
-
-#ifndef _STLP_NO_LONG_DOUBLE
-  virtual _InputIter do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-                           ios_base::iostate& __err, long double& __val) const;
-#endif /* _STLP_NO_LONG_DOUBLE */
-
-#ifdef _STLP_LONG_LONG
-
-  virtual _InputIter do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-                            ios_base::iostate& __err, _STLP_LONG_LONG& __val) const;
-  virtual _InputIter do_get(_InputIter __in, _InputIter __end, ios_base& __str,
-                           ios_base::iostate& __err, unsigned _STLP_LONG_LONG& __val) const;
-#endif /* _STLP_LONG_LONG */
-
-};
-
-
-# ifdef _STLP_USE_TEMPLATE_EXPORT
-_STLP_EXPORT_TEMPLATE_CLASS num_get<char, istreambuf_iterator<char, char_traits<char> > >;
-// _STLP_EXPORT_TEMPLATE_CLASS num_get<char, const char*>;
-#  ifndef _STLP_NO_WCHAR_T
-_STLP_EXPORT_TEMPLATE_CLASS num_get<wchar_t, istreambuf_iterator<wchar_t, char_traits<wchar_t> > >;
-// _STLP_EXPORT_TEMPLATE_CLASS num_get<wchar_t, const wchar_t*>;
-#  endif /* _STLP_NO_WCHAR_T */
-# endif
-
-# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION)
-
-extern bool  _STLP_CALL __valid_grouping(const char*, const char*, const char*, const char*);
-
-template <class _InputIter, class _Integer>
-bool _STLP_CALL
-__get_decimal_integer(_InputIter& __first, _InputIter& __last, _Integer& __val);
-
-inline bool _STLP_CALL __get_fdigit(char& __c, const char*);
-inline bool _STLP_CALL __get_fdigit_or_sep(char& __c, char __sep, const char *);
-# ifndef _STLP_NO_WCHAR_T
-bool _STLP_CALL __get_fdigit(wchar_t&, const wchar_t*);
-bool _STLP_CALL __get_fdigit_or_sep(wchar_t&, wchar_t, const wchar_t*);
-# endif
-
-inline void  _STLP_CALL
-_Initialize_get_float(const ctype<char>&,
-                       char& Plus, char& Minus,
-                       char& pow_e, char& pow_E,
-                       char*)
-{
-  Plus = '+';
-  Minus = '-';
-  pow_e = 'e';
-  pow_E = 'E';
-}
-
-# ifndef _STLP_NO_WCHAR_T
-void  _STLP_CALL _Initialize_get_float(const ctype<wchar_t>&,
-                                        wchar_t&, wchar_t&, wchar_t&, wchar_t&, wchar_t*);
-# endif
-void  _STLP_CALL __string_to_float(const string&, float&);
-void  _STLP_CALL __string_to_float(const string&, double&);
-# ifndef _STLP_NO_LONG_DOUBLE
-void  _STLP_CALL __string_to_float(const string&, long double&);
-# endif
-# endif
-
-# if defined (__BORLANDC__) && defined (_RTLDLL)
-inline void _Stl_loc_init_num_get() {  
-  num_get<char, istreambuf_iterator<char, char_traits<char> > >::id._M_index = 12;
-  num_get<char, const char*>::id._M_index = 13;
-  
-# ifndef _STLP_NO_WCHAR_T
-  num_get<wchar_t, istreambuf_iterator<wchar_t, char_traits<wchar_t> > >::id._M_index = 31;
-  num_get<wchar_t, const wchar_t*>::id._M_index = 32;
-# endif
-} 
-# endif
-
-_STLP_END_NAMESPACE
-
-#  if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && ! defined (_STLP_LINK_TIME_INSTANTIATION)
-#   include <stl/_num_get.c>
-#  endif
-
-#endif /* _STLP_INTERNAL_NUM_GET_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/stl/_num_put.c b/src/STLport/stl/_num_put.c
deleted file mode 100644
index 2c191ea..0000000
--- a/src/STLport/stl/_num_put.c
+++ /dev/null
@@ -1,553 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-#ifndef _STLP_NUM_PUT_C
-#define _STLP_NUM_PUT_C
-
-#ifndef _STLP_INTERNAL_NUM_PUT_H
-# include <stl/_num_put.h>
-#endif
-
-# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION)
-
-#ifndef _STLP_LIMITS_H
-# include <stl/_limits.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-// _M_do_put_float and its helper functions.  Strategy: write the output
-// to a buffer of char, transform the buffer to _CharT, and then copy
-// it to the output.
-
-template <class _CharT, class _OutputIter,class _Float>
-_OutputIter _STLP_CALL
-_M_do_put_float(_OutputIter __s, ios_base& __f, _CharT __fill,_Float    __x);
-
-
-//----------------------------------------------------------------------
-// num_put facet
-
-template <class _CharT, class _OutputIter>
-_OutputIter  _STLP_CALL
-__copy_float_and_fill(const _CharT* __first, const _CharT* __last,
-                      _OutputIter __out,
-                      ios_base::fmtflags __flags,
-                      streamsize __width, _CharT __fill,
-                      _CharT __xplus, _CharT __xminus) {
-  if (__width <= __last - __first)
-    return copy(__first, __last, __out);
-  else {
-    streamsize __pad = __width - (__last - __first);
-    ios_base::fmtflags __dir = __flags & ios_base::adjustfield;
-
-    if (__dir == ios_base::left) {
-      __out = copy(__first, __last, __out);
-      return fill_n(__out, __pad, __fill);
-    }
-    else if (__dir == ios_base::internal && __first != __last &&
-             (*__first == __xplus || *__first == __xminus)) {
-      *__out++ = *__first++;
-      __out = fill_n(__out, __pad, __fill);
-      return copy(__first, __last, __out);
-    }
-    else {
-      __out = fill_n(__out, __pad, __fill);
-      return copy(__first, __last, __out);
-    }
-  }
-}
-
-#ifndef _STLP_NO_WCHAR_T
-// Helper routine for wchar_t
-template <class _OutputIter>
-_OutputIter  _STLP_CALL
-__put_float(char* __ibuf, char* __iend, _OutputIter __out,
-            ios_base& __f, wchar_t __fill,
-            wchar_t __decimal_point,
-            wchar_t __sep, const string& __grouping)
-{
-  const ctype<wchar_t>& __ct = *(ctype<wchar_t>*)__f._M_ctype_facet() ;
-
-  wchar_t __wbuf[128];
-  wchar_t* __eend = __convert_float_buffer(__ibuf, __iend, __wbuf,
-                                           __ct, __decimal_point);
-  if (!__grouping.empty()) {
-    // In order to do separator-insertion only to the left of the
-    // decimal point, we adjust the size of the first (right-most)
-    // group.  We need to be careful if there is only one entry in
-    // grouping:  in this case we need to duplicate the first entry.
-
-    string __new_grouping = __grouping;
-    wchar_t* __decimal_pos = find(__wbuf, __eend, __decimal_point);
-    if (__grouping.size() == 1)
-      __new_grouping.push_back(__grouping[0]);
-
-	// dwa 1/24/00 - try as I might, there doesn't seem to be a way
-    // to suppress the warning
-    __new_grouping[0] += __STATIC_CAST(char, __eend - __decimal_pos);
-    ptrdiff_t __len = __insert_grouping(__wbuf, __eend, __new_grouping,
-					__sep,
-					__ct.widen('+'), __ct.widen('-'),
-					0);
-    __eend = __wbuf + __len;
-  }
-
-  return __copy_float_and_fill(__wbuf, __eend, __out,
-                               __f.flags(), __f.width(0), __fill,
-                               __ct.widen('+'), __ct.widen('-')); 
-}
-# endif /* WCHAR_T */
-
-// Helper routine for char
-template <class _OutputIter>
-_OutputIter  _STLP_CALL
-__put_float(char* __ibuf, char* __iend, _OutputIter __out,
-            ios_base& __f, char __fill,
-            char __decimal_point,
-            char __sep, const string& __grouping)
-{
-  __adjust_float_buffer(__ibuf, __iend, __decimal_point);
-  if (!__grouping.empty()) {
-    string __new_grouping = __grouping;
-    const char * __decimal_pos = find(__ibuf, __iend, __decimal_point);
-    if (__grouping.size() == 1)
-      __new_grouping.push_back(__grouping[0]);
-    __new_grouping[0] += __STATIC_CAST(char, (__iend - __decimal_pos));
-    ptrdiff_t __len = __insert_grouping(__ibuf, __iend, __new_grouping,
-					__sep, '+', '-', 0);
-    __iend = __ibuf + __len;
-  }
-
-  return __copy_float_and_fill(__ibuf, __iend, __out,
-                               __f.flags(), __f.width(0), __fill, '+', '-');
-}
-
-template <class _CharT, class _OutputIter, class _Float>
-_OutputIter _STLP_CALL
-_M_do_put_float(_OutputIter __s, ios_base& __f,
-                _CharT __fill, _Float __x)
-{
-  string __buf;
-  __buf.reserve(128);
-  __write_float(__buf, __f.flags(), (int)__f.precision(), __x);
-
-  const numpunct<_CharT>& __np = *(const numpunct<_CharT>*)__f._M_numpunct_facet();
-  
-  return __put_float(__CONST_CAST(char*, __buf.c_str()), 
-                     __CONST_CAST(char*, __buf.c_str()) + __buf.size(),
-                     __s, __f, __fill,
-                     __np.decimal_point(),
-		                 __np.thousands_sep(), __f._M_grouping());
-}
-
-// _M_do_put_integer and its helper functions.
-
-template <class _CharT, class _OutputIter>
-_OutputIter _STLP_CALL
-__copy_integer_and_fill(const _CharT* __buf, ptrdiff_t __len,
-                        _OutputIter __out,
-                        ios_base::fmtflags __flg, streamsize __wid, _CharT __fill,
-                        _CharT __xplus, _CharT __xminus)
-{
-  if (__len >= __wid)
-    return copy(__buf, __buf + __len, __out);
-  else {
-    ptrdiff_t __pad = __wid - __len;
-    ios_base::fmtflags __dir = __flg & ios_base::adjustfield;
-
-    if (__dir == ios_base::left) {
-      __out = copy(__buf, __buf + __len, __out);
-      return fill_n(__out, __pad, __fill);
-    }
-    else if (__dir == ios_base::internal && __len != 0 &&
-             (__buf[0] == __xplus || __buf[0] == __xminus)) {
-      *__out++ = __buf[0];
-      __out = fill_n(__out, __pad, __fill);
-      return copy(__buf + 1, __buf + __len, __out);
-    }
-    else if (__dir == ios_base::internal && __len >= 2 &&
-             (__flg & ios_base::showbase) &&
-             (__flg & ios_base::basefield) == ios_base::hex) {
-      *__out++ = __buf[0];
-      *__out++ = __buf[1];
-      __out = fill_n(__out, __pad, __fill);
-      return copy(__buf + 2, __buf + __len, __out);
-    }
-    else {
-      __out = fill_n(__out, __pad, __fill);
-      return copy(__buf, __buf + __len, __out);
-    }
-  }
-}
-
-#ifndef _STLP_NO_WCHAR_T
-// Helper function for wchar_t
-template <class _OutputIter>
-_OutputIter _STLP_CALL
-__put_integer(char* __buf, char* __iend, _OutputIter __s,
-              ios_base& __f,
-              ios_base::fmtflags __flags, wchar_t __fill)
-{
-  locale __loc = __f.getloc();
-  //  const ctype<wchar_t>& __ct = use_facet<ctype<wchar_t> >(__loc);
-  const ctype<wchar_t>& __ct = *(const ctype<wchar_t>*)__f._M_ctype_facet();
-
-  wchar_t __xplus  = __ct.widen('+');
-  wchar_t __xminus = __ct.widen('-');
-
-  wchar_t __wbuf[64];
-  __ct.widen(__buf, __iend, __wbuf);
-  ptrdiff_t __len = __iend - __buf;
-  wchar_t* __eend = __wbuf + __len;
-
-  //  const numpunct<wchar_t>& __np = use_facet<numpunct<wchar_t> >(__loc);
-  //  const string& __grouping = __np.grouping();
-
-  const numpunct<wchar_t>& __np = *(const numpunct<wchar_t>*)__f._M_numpunct_facet();
-  const string& __grouping = __f._M_grouping();
-
-  if (!__grouping.empty()) {
-    int __basechars;
-    if (__flags & ios_base::showbase)
-      switch (__flags & ios_base::basefield) {
-	case ios_base::hex: __basechars = 2; break;
-	case ios_base::oct: __basechars = 1; break;
-	default: __basechars = 0;
-      }
-    else
-      __basechars = 0;
-
-    __len = __insert_grouping(__wbuf, __eend, __grouping, __np.thousands_sep(),
-			      __xplus, __xminus, __basechars);
-  }
-
-  return __copy_integer_and_fill((wchar_t*)__wbuf, __len, __s,
-                                 __flags, __f.width(0), __fill, __xplus, __xminus);
-}
-#endif
-
-// Helper function for char
-template <class _OutputIter>
-_OutputIter _STLP_CALL
-__put_integer(char* __buf, char* __iend, _OutputIter __s,
-              ios_base& __f, ios_base::fmtflags __flags, char __fill)
-{
-  ptrdiff_t __len = __iend - __buf;
-  char __grpbuf[64];
-
-  //  const numpunct<char>& __np = use_facet<numpunct<char> >(__f.getloc());
-  //  const string& __grouping = __np.grouping();
-
-  const numpunct<char>& __np = *(const numpunct<char>*)__f._M_numpunct_facet();
-  const string& __grouping = __f._M_grouping();
-
-  if (!__grouping.empty()) {
-    int __basechars;
-    if (__flags & ios_base::showbase)
-      switch (__flags & ios_base::basefield) {
-	case ios_base::hex: __basechars = 2; break;
-	case ios_base::oct: __basechars = 1; break;
-	default: __basechars = 0;
-      }
-    else
-      __basechars = 0;
- 
-     // make sure there is room at the end of the buffer
-     // we pass to __insert_grouping
-
-    copy(__buf, __iend, (char *) __grpbuf);
-    __buf = __grpbuf;
-    __iend = __grpbuf + __len; 
-    __len = __insert_grouping(__buf, __iend, __grouping, __np.thousands_sep(), 
-                              '+', '-', __basechars);
-  }
-  
-  return __copy_integer_and_fill(__buf, __len, __s, __flags, __f.width(0), __fill, '+', '-');
-}
-
-#ifdef _STLP_LONG_LONG
-typedef _STLP_LONG_LONG __max_int_t;
-typedef unsigned _STLP_LONG_LONG __umax_int_t;
-#else
-typedef long __max_int_t;
-typedef unsigned long __umax_int_t;
-#endif
-
-extern const char __hex_char_table_lo[];
-extern const char __hex_char_table_hi[];
-
-template <class _Integer>
-inline char* _STLP_CALL
-__write_decimal_backward(char* __ptr, _Integer __x, ios_base::fmtflags __flags, const __true_type& /* is_signed */)
-{
-  const bool __negative = __x < 0 ;
-  __max_int_t __temp = __x;
-  __umax_int_t __utemp = __negative?-__temp:__temp;
-
-  for (; __utemp != 0; __utemp /= 10)
-    *--__ptr = (int)(__utemp % 10) + '0';	  
-  // put sign if needed or requested
-  if (__negative)
-    *--__ptr = '-';
-  else if (__flags & ios_base::showpos)
-    *--__ptr = '+';
-  return __ptr;
-}
-
-template <class _Integer>
-inline char* _STLP_CALL
-__write_decimal_backward(char* __ptr, _Integer __x, ios_base::fmtflags __flags, const __false_type& /* is_signed */)
-{
-  for (; __x != 0; __x /= 10)
-    *--__ptr = (int)(__x % 10) + '0';
-  // put sign if requested
-  if (__flags & ios_base::showpos)
-    *--__ptr = '+';
-  return __ptr;
-}
-
-template <class _Integer>
-char* _STLP_CALL
-__write_integer_backward(char* __buf, ios_base::fmtflags __flags, _Integer __x)
-{
-  char* __ptr = __buf;
-  __umax_int_t __temp;
-
-  if (__x == 0) {
-    *--__ptr = '0';
-    if ((__flags & ios_base::showpos) && ( (__flags & (ios_base::hex | ios_base::oct)) == 0 ))
-      *--__ptr = '+';
-  }
-  else {
-    
-    switch (__flags & ios_base::basefield) {
-    case ios_base::oct:
-      __temp = __x;
-      // if the size of integer is less than 8, clear upper part
-      if ( sizeof(__x) < 8  && sizeof(__umax_int_t) >= 8 )
-        __temp &= 0xFFFFFFFF;
-
-      for (; __temp != 0; __temp >>=3)
-        *--__ptr = (((unsigned)__temp)& 0x7) + '0';
-      
-      // put leading '0' is showbase is set
-      if (__flags & ios_base::showbase)
-        *--__ptr = '0';
-      break;
-    case ios_base::hex: 
-      {
-        const char* __table_ptr = (__flags & ios_base::uppercase) ? 
-          __hex_char_table_hi : __hex_char_table_lo;
-      __temp = __x;
-      // if the size of integer is less than 8, clear upper part
-      if ( sizeof(__x) < 8  && sizeof(__umax_int_t) >= 8 )
-        __temp &= 0xFFFFFFFF;
-
-        for (; __temp != 0; __temp >>=4)
-          *--__ptr = __table_ptr[((unsigned)__temp & 0xF)];
-        
-        if (__flags & ios_base::showbase) {
-          *--__ptr = __table_ptr[16];
-          *--__ptr = '0';
-        }
-      }
-      break;
-    default: 
-      {
-#if defined(__HP_aCC) && (__HP_aCC == 1)
-        bool _IsSigned = !((_Integer)-1 > 0);
-	if (_IsSigned)
-	  __ptr = __write_decimal_backward(__ptr, __x, __flags, __true_type() );
-        else
-	  __ptr = __write_decimal_backward(__ptr, __x, __flags, __false_type() );
-#else
-	typedef typename __bool2type<numeric_limits<_Integer>::is_signed>::_Ret _IsSigned;
-	__ptr = __write_decimal_backward(__ptr, __x, __flags, _IsSigned());
-# endif
-      }
-      break;
-    }  
-  }
-  // return pointer to beginning of the string
-  return __ptr;
-}
-
-//
-// num_put<>
-//
-
-# if ( _STLP_STATIC_TEMPLATE_DATA > 0 )
-
-template <class _CharT, class _OutputIterator>
-locale::id num_put<_CharT, _OutputIterator>::id;
-# else /* ( _STLP_STATIC_TEMPLATE_DATA > 0 ) */
-
-typedef num_put<char, const char*> num_put_char;
-typedef num_put<char, char*> num_put_char_2;
-typedef num_put<char, ostreambuf_iterator<char, char_traits<char> > > num_put_char_3;
-
-__DECLARE_INSTANCE(locale::id, num_put_char::id, );
-__DECLARE_INSTANCE(locale::id, num_put_char_2::id, );
-__DECLARE_INSTANCE(locale::id, num_put_char_3::id, );
-
-# ifndef _STLP_NO_WCHAR_T
-
-typedef num_put<wchar_t, const wchar_t*> num_put_wchar_t;
-typedef num_put<wchar_t, wchar_t*> num_put_wchar_t_2;
-typedef num_put<wchar_t, ostreambuf_iterator<wchar_t, char_traits<wchar_t> > > num_put_wchar_t_3;
-
-__DECLARE_INSTANCE(locale::id, num_put_wchar_t::id, );
-__DECLARE_INSTANCE(locale::id, num_put_wchar_t_2::id, );
-__DECLARE_INSTANCE(locale::id, num_put_wchar_t_3::id, );
-
-# endif
-
-# endif /* ( _STLP_STATIC_TEMPLATE_DATA > 0 ) */
-
-// issue 118
-
-# ifndef _STLP_NO_BOOL
-
-template <class _CharT, class _OutputIter>  
-_OutputIter 
-num_put<_CharT, _OutputIter>::do_put(_OutputIter __s, ios_base& __f, 
-                                     char_type __fill,  bool __val) const {
-  if (!(__f.flags() & ios_base::boolalpha))
-    return this->do_put(__s, __f, __fill, __STATIC_CAST(long,__val));
-
-  locale __loc = __f.getloc();
-  //  typedef numpunct<_CharT> _Punct;
-  //  const _Punct& __np = use_facet<_Punct>(__loc);
-
-  const numpunct<_CharT>& __np = *(const numpunct<_CharT>*)__f._M_numpunct_facet();
-
-  basic_string<_CharT> __str = __val ? __np.truename() : __np.falsename();
-
-  // Reuse __copy_integer_and_fill.  Since internal padding makes no
-  // sense for bool, though, make sure we use something else instead.
-  // The last two argument to __copy_integer_and_fill are dummies.
-  ios_base::fmtflags __flags = __f.flags();
-  if ((__flags & ios_base::adjustfield) == ios_base::internal)
-    __flags = (__flags & ~ios_base::adjustfield) | ios_base::right;
-
-  return __copy_integer_and_fill(__str.c_str(), __str.size(), __s,
-                                 __flags, __f.width(0), __fill,
-                                 (_CharT) 0, (_CharT) 0);
-}
-
-# endif
-
-template <class _CharT, class _OutputIter>
-_OutputIter 
-num_put<_CharT, _OutputIter>::do_put(_OutputIter __s, ios_base& __f, _CharT __fill,
-                                     long __val) const {
-
-  char __buf[64];               // Large enough for a base 8 64-bit integer,
-                                // plus any necessary grouping.  
-  ios_base::fmtflags __flags = __f.flags();
-  char* __ibeg = __write_integer_backward((char*)__buf+64, __flags, __val);  
-  return __put_integer(__ibeg, (char*)__buf+64, __s, __f, __flags, __fill);
-}
-
-
-template <class _CharT, class _OutputIter>  
-_OutputIter 
-num_put<_CharT, _OutputIter>::do_put(_OutputIter __s, ios_base& __f, _CharT __fill,
-				     unsigned long __val) const {
-  char __buf[64];               // Large enough for a base 8 64-bit integer,
-                                // plus any necessary grouping.
-  
-  ios_base::fmtflags __flags = __f.flags();
-  char* __ibeg = __write_integer_backward((char*)__buf+64, __flags, __val);
-  return __put_integer(__ibeg, (char*)__buf+64, __s, __f, __flags, __fill);
-}
-
-template <class _CharT, class _OutputIter>  
-_OutputIter 
-num_put<_CharT, _OutputIter>::do_put(_OutputIter __s, ios_base& __f, _CharT __fill,
-                                     double __val) const {
-  return _M_do_put_float(__s, __f, __fill, __val);
-}
-
-#ifndef _STLP_NO_LONG_DOUBLE
-template <class _CharT, class _OutputIter>  
-_OutputIter 
-num_put<_CharT, _OutputIter>::do_put(_OutputIter __s, ios_base& __f, _CharT __fill,
-                                     long double __val) const {
-  return _M_do_put_float(__s, __f, __fill, __val);
-}
-#endif
-
-#ifdef _STLP_LONG_LONG
-template <class _CharT, class _OutputIter>  
-_OutputIter 
-num_put<_CharT, _OutputIter>::do_put(_OutputIter __s, ios_base& __f, _CharT __fill,
-                                     _STLP_LONG_LONG __val) const {
-  char __buf[64];               // Large enough for a base 8 64-bit integer,
-                                // plus any necessary grouping.
-  
-  ios_base::fmtflags __flags = __f.flags();
-  char* __ibeg = __write_integer_backward((char*)__buf+64, __flags, __val);
-  return __put_integer(__ibeg, (char*)__buf+64, __s, __f, __flags, __fill);
-}
-
-template <class _CharT, class _OutputIter>  
-_OutputIter 
-num_put<_CharT, _OutputIter>::do_put(_OutputIter __s, ios_base& __f, _CharT __fill,
-                                     unsigned _STLP_LONG_LONG __val) const {
-  char __buf[64];               // Large enough for a base 8 64-bit integer,
-                                // plus any necessary grouping.
-  
-  ios_base::fmtflags __flags = __f.flags();
-  char* __ibeg = __write_integer_backward((char*)__buf+64, __flags, __val);  
-  return __put_integer(__ibeg, (char*)__buf+64, __s, __f, __flags, __fill);
-}
-
-#endif /* _STLP_LONG_LONG */
-
-
-// lib.facet.num.put.virtuals "12 For conversion from void* the specifier is %p."
-template <class _CharT, class _OutputIter>
-_OutputIter
-num_put<_CharT, _OutputIter>::do_put(_OutputIter __s, ios_base& __f, _CharT /*__fill*/,
-				     const void* __val) const {
-  const ctype<_CharT>& __c_type = *(const ctype<_CharT>*)__f._M_ctype_facet();
-  ios_base::fmtflags __save_flags = __f.flags();
-
-  __f.setf(ios_base::hex, ios_base::basefield);
-  __f.setf(ios_base::showbase);
-  __f.setf(ios_base::internal, ios_base::adjustfield);
-  __f.width((sizeof(void*) * 2) + 2); // digits in pointer type plus '0x' prefix
-# if defined(_STLP_LONG_LONG) && !defined(__MRC__) //*ty 11/24/2001 - MrCpp can not cast from void* to long long
-  _OutputIter result = this->do_put(__s, __f, __c_type.widen('0'), __REINTERPRET_CAST(unsigned _STLP_LONG_LONG,__val));
-# else
-  _OutputIter result = this->do_put(__s, __f, __c_type.widen('0'), __REINTERPRET_CAST(unsigned long,__val));
-# endif
-  __f.flags(__save_flags);
-  return result;
-}
-
-_STLP_END_NAMESPACE
-
-# endif /* _STLP_EXPOSE_STREAM_IMPLEMENTATION */
-
-#endif /* _STLP_NUM_PUT_C */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_num_put.h b/src/STLport/stl/_num_put.h
deleted file mode 100644
index 8fccfaf..0000000
--- a/src/STLport/stl/_num_put.h
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-// WARNING: This is an internal header file, included by other C++
-// standard library headers.  You should not attempt to use this header
-// file directly.
-
-
-#ifndef _STLP_INTERNAL_NUM_PUT_H
-#define _STLP_INTERNAL_NUM_PUT_H
-
-#ifndef _STLP_INTERNAL_NUMPUNCT_H
-# include <stl/_numpunct.h>
-#endif
-#ifndef _STLP_INTERNAL_CTYPE_H
-# include <stl/_ctype.h>
-#endif
-#ifndef _STLP_INTERNAL_OSTREAMBUF_ITERATOR_H
-# include <stl/_ostreambuf_iterator.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-//----------------------------------------------------------------------
-// num_put facet
-
-# ifdef _STLP_LIMITED_DEFAULT_TEMPLATES
-template <class _CharT, class _OutputIter>  
-# else
-template <class _CharT, class _OutputIter = ostreambuf_iterator<_CharT, char_traits<_CharT> > >  
-# endif
-class num_put: public locale::facet
-{
-  friend class _Locale;
-public:
-  typedef _CharT      char_type;
-  typedef _OutputIter iter_type;
-
-  explicit num_put(size_t __refs = 0) : _BaseFacet(__refs) {}
-
-# ifndef _STLP_NO_BOOL
-  iter_type put(iter_type __s, ios_base& __f, char_type __fill,
-                bool __val) const {
-    return do_put(__s, __f, __fill, __val);
-  }
-# endif
-  iter_type put(iter_type __s, ios_base& __f, char_type __fill,
-               long __val) const {
-    return do_put(__s, __f, __fill, __val);
-  }
-
-  iter_type put(iter_type __s, ios_base& __f, char_type __fill,
-                unsigned long __val) const {
-    return do_put(__s, __f, __fill, __val);
-  }
-
-#ifdef _STLP_LONG_LONG
-  iter_type put(iter_type __s, ios_base& __f, char_type __fill,
-                _STLP_LONG_LONG __val) const {
-    return do_put(__s, __f, __fill, __val);
-  }
-
-  iter_type put(iter_type __s, ios_base& __f, char_type __fill,
-                unsigned _STLP_LONG_LONG __val) const {
-    return do_put(__s, __f, __fill, __val);
-  }
-#endif
-
-  iter_type put(iter_type __s, ios_base& __f, char_type __fill,
-                double __val) const {
-    return do_put(__s, __f, __fill, (double)__val);
-  }
-
-#ifndef _STLP_NO_LONG_DOUBLE
-  iter_type put(iter_type __s, ios_base& __f, char_type __fill,
-                long double __val) const {
-    return do_put(__s, __f, __fill, __val);
-  }
-# endif
-
-  iter_type put(iter_type __s, ios_base& __f, char_type __fill,
-                const void * __val) const {
-    return do_put(__s, __f, __fill, __val);
-  }
-
-  _STLP_STATIC_MEMBER_DECLSPEC static locale::id id;
-
-protected:
-  ~num_put() {}   
-# ifndef _STLP_NO_BOOL
-  virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, bool __val) const;
-# endif
-  virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, long __val) const;
-  virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, unsigned long __val) const;
-  virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, double __val) const;
-#ifndef _STLP_NO_LONG_DOUBLE
-  virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, long double __val) const;
-#endif
-
-#ifdef _STLP_LONG_LONG
-  virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, _STLP_LONG_LONG __val) const;
-  virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, 
-                           unsigned _STLP_LONG_LONG __val) const ;
-#endif /* _STLP_LONG_LONG  */
-  virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, const void* __val) const;
-};
-
-# ifdef _STLP_USE_TEMPLATE_EXPORT
-_STLP_EXPORT_TEMPLATE_CLASS num_put<char, ostreambuf_iterator<char, char_traits<char> > >;
-// _STLP_EXPORT_TEMPLATE_CLASS num_put<char, char*>;
-#  ifndef _STLP_NO_WCHAR_T
-_STLP_EXPORT_TEMPLATE_CLASS num_put<wchar_t, ostreambuf_iterator<wchar_t, char_traits<wchar_t> > >;
-// _STLP_EXPORT_TEMPLATE_CLASS num_put<wchar_t, wchar_t*>;
-#  endif /* _STLP_NO_WCHAR_T */
-# endif
-
-# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION)
-
-template <class _Integer>
-char* _STLP_CALL
-__write_integer_backward(char* __buf, ios_base::fmtflags __flags, _Integer __x);
-
-void  _STLP_CALL __string_to_float(const string&, float&);
-void  _STLP_CALL __string_to_float(const string&, double&);
-extern void _STLP_CALL __write_float(string&, ios_base::fmtflags, int, double);
-# ifndef _STLP_NO_LONG_DOUBLE
-void  _STLP_CALL __string_to_float(const string&, long double&);
-extern void _STLP_CALL __write_float(string&, ios_base::fmtflags, int, long double);
-# endif
-
-#ifndef _STLP_NO_WCHAR_T
-extern wchar_t* _STLP_CALL __convert_float_buffer(const char*, const char*, wchar_t*, const ctype<wchar_t>&, wchar_t);
-#endif
-extern void _STLP_CALL __adjust_float_buffer(char*, char*, char);
-
-extern char* _STLP_CALL
-__write_integer(char* buf, ios_base::fmtflags flags, long x);
-
-extern ptrdiff_t _STLP_CALL __insert_grouping(char* first, char* last, const string&, char, char, char, int);
-#  ifndef _STLP_NO_WCHAR_T
-extern ptrdiff_t _STLP_CALL __insert_grouping(wchar_t*, wchar_t*, const string&, wchar_t, wchar_t, wchar_t, int);
-#  endif
-
-# endif
-
-# if defined (__BORLANDC__) && defined (_RTLDLL)
-inline void _Stl_loc_init_num_put() {
-  
-  num_put<char, ostreambuf_iterator<char, char_traits<char> > >::id._M_index = 14;
-  num_put<char, char*>::id._M_index = 15;
-  
-# ifndef _STLP_NO_WCHAR_T
-  num_put<wchar_t, ostreambuf_iterator<wchar_t, char_traits<wchar_t> > > ::id._M_index = 33;
-  num_put<wchar_t, wchar_t*>::id._M_index = 34;
-# endif
-  
-}
- 
-# endif
-
-_STLP_END_NAMESPACE
-
-#  if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && ! defined (_STLP_LINK_TIME_INSTANTIATION)
-#   include <stl/_num_put.c>
-#  endif
-
-#endif /* _STLP_INTERNAL_NUMERIC_FACETS_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/stl/_numeric.c b/src/STLport/stl/_numeric.c
deleted file mode 100644
index f050112..0000000
--- a/src/STLport/stl/_numeric.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- *
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-#ifndef _STLP_NUMERIC_C
-#define _STLP_NUMERIC_C
-
-#ifndef _STLP_INTERNAL_NUMERIC_H
-# include <stl/_numeric.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-template <class _InputIterator, class _OutputIterator, class _Tp,
-          class _BinaryOperation>
-_OutputIterator 
-__partial_sum(_InputIterator __first, _InputIterator __last, 
-              _OutputIterator __result, _Tp*, _BinaryOperation __binary_op)
-{
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  if (__first == __last) return __result;
-  *__result = *__first;
-
-  _Tp __val = *__first;
-  while (++__first != __last) {
-    __val = __binary_op(__val, *__first);
-    *++__result = __val;
-  }
-  return ++__result;
-}
-
-template <class _InputIterator, class _OutputIterator, class _Tp, 
-          class _BinaryOperation>
-_OutputIterator
-__adjacent_difference(_InputIterator __first, _InputIterator __last, 
-                      _OutputIterator __result, _Tp*,
-                      _BinaryOperation __binary_op) {
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  if (__first == __last) return __result;
-  *__result = *__first;
-  _Tp __val = *__first;
-  while (++__first != __last) {
-    _Tp __tmp = *__first;
-    *++__result = __binary_op(__tmp, __val);
-    __val = __tmp;
-  }
-  return ++__result;
-}
-
-
-template <class _Tp, class _Integer, class _MonoidOperation>
-_Tp __power(_Tp __x, _Integer __n, _MonoidOperation __opr) 
-{
-  _STLP_MPWFIX_TRY
-  if (__n == 0)
-    return __identity_element(__opr);
-  else {
-    while ((__n & 1) == 0) {
-      __n >>= 1;
-      __x = __opr(__x, __x);
-    }
-    _Tp __result = __x;
-	_STLP_MPWFIX_TRY
-    __n >>= 1;
-    while (__n != 0) {
-      __x = __opr(__x, __x);
-      if ((__n & 1) != 0)
-        __result = __opr(__result, __x);
-      __n >>= 1;
-    }
-    return __result;
-	_STLP_MPWFIX_CATCH
-  }
-  _STLP_MPWFIX_CATCH_ACTION(__x = _Tp())
-}
-
-_STLP_END_NAMESPACE
-
-#endif /*  _STLP_NUMERIC_C */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_numeric.h b/src/STLport/stl/_numeric.h
deleted file mode 100644
index d58ac16..0000000
--- a/src/STLport/stl/_numeric.h
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-
-#ifndef _STLP_INTERNAL_NUMERIC_H
-#define _STLP_INTERNAL_NUMERIC_H
-
-#ifndef _STLP_INTERNAL_FUNCTION_H
-# include <stl/_function_base.h>
-#endif
-
-#ifndef _STLP_INTERNAL_ITERATOR_BASE_H
-# include <stl/_iterator_base.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-template <class _InputIterator, class _Tp>
-_STLP_INLINE_LOOP
-_Tp accumulate(_InputIterator __first, _InputIterator __last, _Tp _Init)
-{
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  for ( ; __first != __last; ++__first)
-    _Init = _Init + *__first;
-  return _Init;
-}
-
-template <class _InputIterator, class _Tp, class _BinaryOperation>
-_STLP_INLINE_LOOP
-_Tp accumulate(_InputIterator __first, _InputIterator __last, _Tp _Init,
-               _BinaryOperation __binary_op)
-{
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  for ( ; __first != __last; ++__first)
-    _Init = __binary_op(_Init, *__first);
-  return _Init;
-}
-
-template <class _InputIterator1, class _InputIterator2, class _Tp>
-_STLP_INLINE_LOOP
-_Tp inner_product(_InputIterator1 __first1, _InputIterator1 __last1,
-                  _InputIterator2 __first2, _Tp _Init)
-{
-  _STLP_DEBUG_CHECK(__check_range(__first1, __last1))
-  for ( ; __first1 != __last1; ++__first1, ++__first2)
-    _Init = _Init + (*__first1 * *__first2);
-  return _Init;
-}
-
-template <class _InputIterator1, class _InputIterator2, class _Tp,
-          class _BinaryOperation1, class _BinaryOperation2>
-_STLP_INLINE_LOOP
-_Tp inner_product(_InputIterator1 __first1, _InputIterator1 __last1,
-                  _InputIterator2 __first2, _Tp _Init, 
-                  _BinaryOperation1 __binary_op1,
-                  _BinaryOperation2 __binary_op2)
-{
-  _STLP_DEBUG_CHECK(__check_range(__first1, __last1))
-  for ( ; __first1 != __last1; ++__first1, ++__first2)
-    _Init = __binary_op1(_Init, __binary_op2(*__first1, *__first2));
-  return _Init;
-}
-
-template <class _InputIterator, class _OutputIterator, class _Tp,
-          class _BinaryOperation>
-_OutputIterator 
-__partial_sum(_InputIterator __first, _InputIterator __last, 
-              _OutputIterator __result, _Tp*, _BinaryOperation __binary_op);
-
-
-template <class _InputIterator, class _OutputIterator>
-inline _OutputIterator 
-partial_sum(_InputIterator __first, _InputIterator __last,
-            _OutputIterator __result) {
-  return __partial_sum(__first, __last, __result, _STLP_VALUE_TYPE(__first, _InputIterator),
-                       __plus(_STLP_VALUE_TYPE(__first, _InputIterator)));
-}
-
-template <class _InputIterator, class _OutputIterator, class _BinaryOperation>
-inline _OutputIterator 
-partial_sum(_InputIterator __first, _InputIterator __last,
-            _OutputIterator __result, _BinaryOperation __binary_op) {
-  return __partial_sum(__first, __last, __result, _STLP_VALUE_TYPE(__first, _InputIterator), 
-                       __binary_op);
-}
-
-
-template <class _InputIterator, class _OutputIterator, class _Tp, 
-          class _BinaryOperation>
-_OutputIterator
-__adjacent_difference(_InputIterator __first, _InputIterator __last, 
-                      _OutputIterator __result, _Tp*,
-                      _BinaryOperation __binary_op);
-
-template <class _InputIterator, class _OutputIterator>
-inline _OutputIterator
-adjacent_difference(_InputIterator __first,
-                    _InputIterator __last, _OutputIterator __result) {
-  return __adjacent_difference(__first, __last, __result,
-                               _STLP_VALUE_TYPE(__first, _InputIterator),
-                               __minus(_STLP_VALUE_TYPE(__first, _InputIterator)));
-}
-
-template <class _InputIterator, class _OutputIterator, class _BinaryOperation>
-_OutputIterator 
-adjacent_difference(_InputIterator __first, _InputIterator __last,
-                    _OutputIterator __result, _BinaryOperation __binary_op) {
-  return __adjacent_difference(__first, __last, __result,
-                               _STLP_VALUE_TYPE(__first, _InputIterator),
-                               __binary_op);
-}
-
-template <class _Tp, class _Integer, class _MonoidOperation>
-_Tp __power(_Tp __x, _Integer __n, _MonoidOperation __opr);
-
-# ifndef _STLP_NO_EXTENSIONS
-
-// Returns __x ** __n, where __n >= 0.  _Note that "multiplication"
-// is required to be associative, but not necessarily commutative.
-
-template <class _Tp, class _Integer>
-inline _Tp __power(_Tp __x, _Integer __n)
-{
-  return __power(__x, __n, multiplies<_Tp>());
-}
-
-// Alias for the internal name __power.  Note that power is an extension,
-// not part of the C++ standard.
-template <class _Tp, class _Integer, class _MonoidOperation>
-inline _Tp power(_Tp __x, _Integer __n, _MonoidOperation __opr) {
-  return __power(__x, __n, __opr);
-}
-
-
-template <class _Tp, class _Integer>
-inline _Tp power(_Tp __x, _Integer __n) {
-  return __power(__x, __n, multiplies<_Tp>());
-}
-
-// iota is not part of the C++ standard.  It is an extension.
-
-template <class _ForwardIterator, class _Tp>
-_STLP_INLINE_LOOP
-void 
-iota(_ForwardIterator __first, _ForwardIterator __last, _Tp __val)
-{
-  _STLP_DEBUG_CHECK(__check_range(__first, __last))
-  while (__first != __last)
-    *__first++ = __val++;
-}
-# endif
-
-_STLP_END_NAMESPACE
-
-# if !defined (_STLP_LINK_TIME_INSTANTIATION)
-#  include <stl/_numeric.c>
-# endif
-
-#endif /* _STLP_INTERNAL_NUMERIC_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_numpunct.h b/src/STLport/stl/_numpunct.h
deleted file mode 100644
index 7f8ed50..0000000
--- a/src/STLport/stl/_numpunct.h
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-// WARNING: This is an internal header file, included by other C++
-// standard library headers.  You should not attempt to use this header
-// file directly.
-
-
-#ifndef _STLP_INTERNAL_NUMPUNCT_H
-#define _STLP_INTERNAL_NUMPUNCT_H
-
-#ifndef _STLP_IOS_BASE_H
-# include <stl/_ios_base.h>
-#endif
-
-# ifndef _STLP_C_LOCALE_H
-#  include <stl/c_locale.h>
-# endif
-
-#ifndef _STLP_STRING_H
-# include <stl/_string.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-//----------------------------------------------------------------------
-// numpunct facets
-
-template <class _CharT> class numpunct {};
-template <class _CharT> class numpunct_byname {};
-template <class _Ch, class _InIt> class num_get;
-
-_STLP_TEMPLATE_NULL
-class _STLP_CLASS_DECLSPEC numpunct<char> : public locale::facet
-{
-  friend class _Locale;
-# ifndef _STLP_NO_FRIEND_TEMPLATES
-  template <class _Ch, class _InIt> friend class num_get;
-# endif
-public:
-  typedef char               char_type;
-  typedef string             string_type;
-
-  explicit numpunct(size_t __refs = 0) : _BaseFacet(__refs) {}
-
-  char decimal_point() const { return do_decimal_point(); }
-  char thousands_sep() const { return do_thousands_sep(); }
-  string grouping() const { return do_grouping(); }
-  string truename() const { return do_truename(); }
-  string falsename() const { return do_falsename(); }
-
-  _STLP_STATIC_MEMBER_DECLSPEC static locale::id id;
-
-# ifndef _STLP_NO_FRIEND_TEMPLATES
-protected:
-# endif
-  ~numpunct();
-
-  _STLP_STATIC_MEMBER_DECLSPEC static string  _M_truename;
-  _STLP_STATIC_MEMBER_DECLSPEC static string  _M_falsename;
-  _STLP_STATIC_MEMBER_DECLSPEC static string  _M_grouping;
-
-  virtual char do_decimal_point() const;
-  virtual char do_thousands_sep() const;
-  virtual string do_grouping() const;
-  virtual string do_truename() const;
-  virtual string do_falsename()  const;
-};
-
-# if ! defined (_STLP_NO_WCHAR_T)
-
-_STLP_TEMPLATE_NULL
-class _STLP_CLASS_DECLSPEC numpunct<wchar_t> : public locale::facet
-{
-  friend class _Locale;
-public:
-  typedef wchar_t               char_type;
-  typedef wstring               string_type;
-
-  explicit numpunct(size_t __refs = 0) : _BaseFacet(__refs) {}
-
-  wchar_t decimal_point() const { return do_decimal_point(); }
-  wchar_t thousands_sep() const { return do_thousands_sep(); }
-  string grouping() const { return do_grouping(); }
-  wstring truename() const { return do_truename(); }
-  wstring falsename() const { return do_falsename(); }
-
-  _STLP_STATIC_MEMBER_DECLSPEC static locale::id id;
-
-protected:
-  _STLP_STATIC_MEMBER_DECLSPEC static wstring _M_truename;
-  _STLP_STATIC_MEMBER_DECLSPEC static wstring _M_falsename;
-  _STLP_STATIC_MEMBER_DECLSPEC static string _M_grouping;
-
-  ~numpunct();
-
-  virtual wchar_t do_decimal_point() const;
-  virtual wchar_t do_thousands_sep() const;
-  virtual string do_grouping() const;
-  virtual wstring do_truename() const;
-  virtual wstring do_falsename()  const;
-};
-
-# endif /* WCHAR_T */
-
-_STLP_TEMPLATE_NULL
-class _STLP_CLASS_DECLSPEC numpunct_byname<char> : public numpunct<char> {
-public:
-  typedef char                char_type;
-  typedef string              string_type;
-
-  explicit numpunct_byname(const char* __name, size_t __refs = 0);
-
-protected:
-
-  ~numpunct_byname();
-
-  virtual char   do_decimal_point() const;
-  virtual char   do_thousands_sep() const;
-  virtual string do_grouping()      const;
-
-private:
-  _Locale_numeric* _M_numeric;
-};
-
-# ifndef _STLP_NO_WCHAR_T
-_STLP_TEMPLATE_NULL
-class _STLP_CLASS_DECLSPEC numpunct_byname<wchar_t>: public numpunct<wchar_t> {
-public:
-  typedef wchar_t               char_type;
-  typedef wstring               string_type;
-
-  explicit numpunct_byname(const char* __name, size_t __refs = 0);
-
-protected:
-
-  ~numpunct_byname();
-
-  virtual wchar_t   do_decimal_point() const;
-  virtual wchar_t   do_thousands_sep() const;
-  virtual string do_grouping() const;
-
-private:
-  _Locale_numeric* _M_numeric;
-};
-
-# endif /* WCHAR_T */
-
-_STLP_END_NAMESPACE
-
-#endif /* _STLP_NUMPUNCT_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/stl/_ostream.c b/src/STLport/stl/_ostream.c
deleted file mode 100644
index da75a0b..0000000
--- a/src/STLport/stl/_ostream.c
+++ /dev/null
@@ -1,382 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-#ifndef _STLP_OSTREAM_C
-#define _STLP_OSTREAM_C
-
-
-#ifndef _STLP_INTERNAL_OSTREAM_H
-# include <stl/_ostream.h>
-#endif
-
-#if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION)
-
-#if !defined (_STLP_INTERNAL_NUM_PUT_H)
-# include <stl/_num_put.h>            // For basic_streambuf and iterators
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-// Helper functions for istream<>::sentry constructor.
-template <class _CharT, class _Traits>
-bool
-_M_init(basic_ostream<_CharT, _Traits>& __str) {
-  if (__str.good()) {
-    // boris : check if this is needed !
-    if (!__str.rdbuf())
-      __str.setstate(ios_base::badbit);
-    if (__str.tie())
-      __str.tie()->flush();
-    return __str.good();
-  } else
-    return false;
-}
-
-//----------------------------------------------------------------------
-// Definitions of non-inline member functions.
-
-// Constructor, destructor
-
-template <class _CharT, class _Traits>
-basic_ostream<_CharT, _Traits>
-  ::basic_ostream(basic_streambuf<_CharT, _Traits>* __buf)
-    : basic_ios<_CharT, _Traits>() 
-{
-  this->init(__buf);
-}
-
-template <class _CharT, class _Traits>
-basic_ostream<_CharT, _Traits>::~basic_ostream()
-{}
-
-// Output directly from a streambuf.
-template <class _CharT, class _Traits>
-basic_ostream<_CharT, _Traits>& 
-basic_ostream<_CharT, _Traits>::operator<<(basic_streambuf<_CharT, _Traits>* __from)
-{
-  sentry __sentry(*this);
-  if (__sentry) {
-    if (__from) {
-      bool __any_inserted = __from->gptr() != __from->egptr()
-        ? this->_M_copy_buffered(__from, this->rdbuf())
-        : this->_M_copy_unbuffered(__from, this->rdbuf());
-      if (!__any_inserted)
-        this->setstate(ios_base::failbit);
-    }
-    else
-      this->setstate(ios_base::badbit);
-  }
-
-  return *this;
-}
-
-// Helper functions for the streambuf version of operator<<.  The
-// exception-handling code is complicated because exceptions thrown
-// while extracting characters are treated differently than exceptions
-// thrown while inserting characters.
-
-template <class _CharT, class _Traits>
-bool basic_ostream<_CharT, _Traits>
-  ::_M_copy_buffered(basic_streambuf<_CharT, _Traits>* __from,
-                     basic_streambuf<_CharT, _Traits>* __to)
-{
-  bool __any_inserted = false;
-
-  while (__from->egptr() != __from->gptr()) {
-    const ptrdiff_t __avail = __from->egptr() - __from->gptr();
-
-    streamsize __nwritten;
-    _STLP_TRY {
-      __nwritten = __to->sputn(__from->gptr(), __avail);
-      __from->gbump((int)__nwritten);
-    }
-    _STLP_CATCH_ALL {
-      this->_M_handle_exception(ios_base::badbit);
-      return __any_inserted;
-    }
-
-    if (__nwritten == __avail) {
-      _STLP_TRY {
-        if (this->_S_eof(__from->sgetc()))
-          return true;
-        else
-          __any_inserted = true;
-      }
-      _STLP_CATCH_ALL {
-        this->_M_handle_exception(ios_base::failbit);
-        return false;
-      }
-    }
-
-    else if (__nwritten != 0)
-      return true;
-
-    else
-      return __any_inserted;
-  }
-
-  // No characters are in the buffer, but we aren't at EOF.  Switch to
-  // unbuffered mode.
-  return __any_inserted || this->_M_copy_unbuffered(__from, __to);
-}
-
-template <class _CharT, class _Traits>
-bool basic_ostream<_CharT, _Traits>
-  ::_M_copy_unbuffered(basic_streambuf<_CharT, _Traits>* __from,
-                       basic_streambuf<_CharT, _Traits>* __to)
-{
-  bool __any_inserted = false;
-
-  while (true) {
-    int_type __c;
-    _STLP_TRY {
-      __c = __from->sbumpc();
-    }
-    _STLP_CATCH_ALL {
-      this->_M_handle_exception(ios_base::failbit);
-      return __any_inserted;
-    }
-
-    if (this->_S_eof(__c))
-      return __any_inserted;
-
-    else {
-      int_type __tmp;
-      _STLP_TRY {
-        __tmp = __to->sputc(__c);
-      }
-      _STLP_CATCH_ALL {
-        this->_M_handle_exception(ios_base::badbit);
-        return __any_inserted;
-      }
-
-      if (this->_S_eof(__tmp)) {
-        _STLP_TRY {
-          /* __tmp = */ __from->sputbackc(__c);
-        }
-        _STLP_CATCH_ALL {
-          this->_M_handle_exception(ios_base::badbit);
-          return __any_inserted;
-        }
-      }
-      else
-        __any_inserted = true;
-    }
-  }
-}
-
-// Helper function for numeric output.
-
-template <class _CharT, class _Traits, class _Number>
-basic_ostream<_CharT, _Traits>&  _STLP_CALL
-_M_put_num(basic_ostream<_CharT, _Traits>& __os, _Number __x)
-{
-  typedef typename basic_ostream<_CharT, _Traits>::sentry _Sentry;
-  _Sentry __sentry(__os);
-  bool __failed = true;
-
-  if (__sentry) {
-    _STLP_TRY {
-      typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> > _NumPut;      
-      __failed = (use_facet<_NumPut>(__os.getloc())).put(
-                                                         ostreambuf_iterator<_CharT, _Traits>(__os.rdbuf()), 
-                                                         __os, __os.fill(),
-                                                         __x).failed();
-    }
-    _STLP_CATCH_ALL {
-      __os._M_handle_exception(ios_base::badbit);
-    }
-  }
-  if (__failed)
-    __os.setstate(ios_base::badbit); 
-  return __os;
-}
-
-# if defined (_STLP_USE_TEMPLATE_EXPORT)  && defined (__BUILDING_STLPORT)
-_STLP_EXPORT_TEMPLATE _STLP_DECLSPEC basic_ostream<char, char_traits<char> >& _STLP_CALL
-_M_put_num(basic_ostream<char, char_traits<char> >&, unsigned long);
-_STLP_EXPORT_TEMPLATE _STLP_DECLSPEC basic_ostream<char, char_traits<char> >&  _STLP_CALL
-_M_put_num(basic_ostream<char, char_traits<char> >&, long);
-#  if defined (_STLP_LONG_LONG)
-_STLP_EXPORT_TEMPLATE _STLP_DECLSPEC basic_ostream<char, char_traits<char> >&  _STLP_CALL
-_M_put_num(basic_ostream<char, char_traits<char> >&, unsigned _STLP_LONG_LONG);
-_STLP_EXPORT_TEMPLATE _STLP_DECLSPEC basic_ostream<char, char_traits<char> >&  _STLP_CALL
-_M_put_num(basic_ostream<char, char_traits<char> >&, _STLP_LONG_LONG );
-#  endif
-# endif
-
-template <class _CharT, class _Traits>
-void basic_ostream<_CharT, _Traits>::_M_put_char(_CharT __c)
-{
-  sentry __sentry(*this);
-  if (__sentry) {
-    bool __failed = true;
-    _STLP_TRY {
-      streamsize __npad = this->width() > 0 ? this->width() - 1 : 0;
-      //      if (__npad <= 1)
-      if (__npad == 0)
-        __failed = this->_S_eof(this->rdbuf()->sputc(__c));
-      else if ((this->flags() & ios_base::adjustfield) == ios_base::left) {
-        __failed = this->_S_eof(this->rdbuf()->sputc(__c));
-        __failed = __failed || 
-                   this->rdbuf()->_M_sputnc(this->fill(), __npad) != __npad;
-      }
-      else {
-        __failed = this->rdbuf()->_M_sputnc(this->fill(), __npad) != __npad;
-        __failed = __failed || this->_S_eof(this->rdbuf()->sputc(__c));
-      }
-
-      this->width(0);
-    }
-    _STLP_CATCH_ALL {
-      this->_M_handle_exception(ios_base::badbit);
-    }
-
-    if (__failed)
-      this->setstate(ios_base::badbit);
-  }
-}
-
-template <class _CharT, class _Traits>
-void basic_ostream<_CharT, _Traits>::_M_put_nowiden(const _CharT* __s)
-{
-  sentry __sentry(*this);
-  if (__sentry) {
-    bool __failed = true;
-    streamsize __n = _Traits::length(__s);
-    streamsize __npad = this->width() > __n ? this->width() - __n : 0;
-
-    _STLP_TRY {
-      if (__npad == 0)
-        __failed = this->rdbuf()->sputn(__s, __n) != __n;
-      else if ((this->flags() & ios_base::adjustfield) == ios_base::left) {
-        __failed = this->rdbuf()->sputn(__s, __n) != __n;
-        __failed = __failed || 
-                   this->rdbuf()->_M_sputnc(this->fill(), __npad) != __npad;
-      }
-      else {
-        __failed = this->rdbuf()->_M_sputnc(this->fill(), __npad) != __npad;
-        __failed = __failed || this->rdbuf()->sputn(__s, __n) != __n;
-      }
-
-      this->width(0);
-    }
-    _STLP_CATCH_ALL {
-      this->_M_handle_exception(ios_base::badbit);
-    }
-
-    if (__failed)
-      this->setstate(ios_base::failbit);
-  }
-}
-
-template <class _CharT, class _Traits>
-void basic_ostream<_CharT, _Traits>::_M_put_widen(const char* __s)
-{
-  sentry __sentry(*this);
-  if (__sentry) {
-    bool __failed = true;
-    streamsize __n = char_traits<char>::length(__s);
-    streamsize __npad = this->width() > __n ? this->width() - __n : 0;
-
-    _STLP_TRY {
-      if (__npad == 0)
-        __failed = !this->_M_put_widen_aux(__s, __n);
-      else if ((this->flags() & ios_base::adjustfield) == ios_base::left) {
-        __failed = !this->_M_put_widen_aux(__s, __n);
-        __failed = __failed || 
-                   this->rdbuf()->_M_sputnc(this->fill(), __npad) != __npad;
-      }
-      else {
-        __failed = this->rdbuf()->_M_sputnc(this->fill(), __npad) != __npad;
-        __failed = __failed || !this->_M_put_widen_aux(__s, __n);
-      }
-
-      this->width(0);
-    }
-    _STLP_CATCH_ALL {
-      this->_M_handle_exception(ios_base::badbit);
-    }
-
-    if (__failed)
-      this->setstate(ios_base::failbit);
-  }
-}
-
-template <class _CharT, class _Traits>
-bool basic_ostream<_CharT, _Traits>::_M_put_widen_aux(const char* __s,
-                                                      streamsize __n)
-{
-  basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf();
-
-  for ( ; __n > 0 ; --__n)
-    if (this->_S_eof(__buf->sputc(this->widen(*__s++))))
-      return false;
-  return true;
-}
-
-// Unformatted output of a single character.
-template <class _CharT, class _Traits>
-basic_ostream<_CharT, _Traits>&
-basic_ostream<_CharT, _Traits>::put(char_type __c)
-{
-  sentry __sentry(*this);
-  bool __failed = true;
-
-  if (__sentry) {
-    _STLP_TRY {
-      __failed = this->_S_eof(this->rdbuf()->sputc(__c));
-    }
-    _STLP_CATCH_ALL {
-      this->_M_handle_exception(ios_base::badbit);
-    }
-  }
-
-  if (__failed)
-    this->setstate(ios_base::badbit);
-
-  return *this;
-}
-
-// Unformatted output of a single character.
-template <class _CharT, class _Traits>
-basic_ostream<_CharT, _Traits>&
-basic_ostream<_CharT, _Traits>::write(const char_type* __s, streamsize __n)
-{
-  sentry __sentry(*this);
-  bool __failed = true;
-
-  if (__sentry) {
-    _STLP_TRY {
-      __failed = this->rdbuf()->sputn(__s, __n) != __n;
-    }
-    _STLP_CATCH_ALL {
-      this->_M_handle_exception(ios_base::badbit);
-    }
-  }
-
-  if (__failed)
-    this->setstate(ios_base::badbit);
-
-  return *this;
-}
-
-_STLP_END_NAMESPACE
-
-#endif /* defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) */
-
-#endif /* _STLP_OSTREAM_C */
diff --git a/src/STLport/stl/_ostream.h b/src/STLport/stl/_ostream.h
deleted file mode 100644
index 91e2541..0000000
--- a/src/STLport/stl/_ostream.h
+++ /dev/null
@@ -1,356 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-
-
-#ifndef _STLP_INTERNAL_OSTREAM_H
-#define _STLP_INTERNAL_OSTREAM_H
-
-#ifndef _STLP_INTERNAL_IOS_H
-# include <stl/_ios.h>                  // For basic_ios<>.  Includes <iosfwd>.
-#endif
-
-#ifndef _STLP_INTERNAL_OSTREAMBUF_ITERATOR_H
-# include <stl/_ostreambuf_iterator.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-template <class _CharT, class _Traits, class _Number> 
-basic_ostream<_CharT, _Traits>& _STLP_CALL
-_M_put_num(basic_ostream<_CharT, _Traits>& __os, _Number __x);
-
-# if defined (_STLP_USE_TEMPLATE_EXPORT)
-template <class _CharT, class _Traits>
-class _Osentry;
-# endif
-
-template <class _CharT, class _Traits>
-bool
-_M_init(basic_ostream<_CharT, _Traits>& __str);
-
-//----------------------------------------------------------------------
-// class basic_ostream<>
-
-template <class _CharT, class _Traits>
-class basic_ostream : virtual public basic_ios<_CharT, _Traits>
-{
-  typedef basic_ostream<_CharT, _Traits> _Self;
-  
-public:                         // Types
-  typedef _CharT                     char_type;
-  typedef typename _Traits::int_type int_type;
-  typedef typename _Traits::pos_type pos_type;
-  typedef typename _Traits::off_type off_type;
-  typedef _Traits                    traits_type;
-  typedef basic_ios<_CharT, _Traits> _Basic_ios;
-
-public:                         // Constructor and destructor.
-  explicit basic_ostream(basic_streambuf<_CharT, _Traits>* __buf);
-  ~basic_ostream();
-
-public:                         // Hooks for manipulators.
-  typedef basic_ios<_CharT, _Traits>& (_STLP_CALL *__ios_fn)(basic_ios<_CharT, _Traits>&);
-  typedef ios_base& (_STLP_CALL *__ios_base_fn)(ios_base&);
-  typedef _Self& (_STLP_CALL *__ostream_fn)(_Self&);
-  _Self& operator<< (__ostream_fn __f) { return __f(*this); }
-  _Self & operator<< (__ios_base_fn __f) { __f(*this); return *this; }
-  _Self& operator<< (__ios_fn __ff) { __ff(*this); return *this; }
-
-private:
-  bool _M_copy_buffered(basic_streambuf<_CharT, _Traits>* __from,
-                        basic_streambuf<_CharT, _Traits>* __to);
-  bool _M_copy_unbuffered(basic_streambuf<_CharT, _Traits>* __from,
-                          basic_streambuf<_CharT, _Traits>* __to);
-
-public:
-  void _M_put_char(_CharT __c);
-
-  void _M_put_nowiden(const _CharT* __s);
-  void _M_put_widen(const char* __s);
-  bool _M_put_widen_aux(const char* __s, streamsize __n);
-
-public:                         // Unformatted output.
-  _Self& put(char_type __c);
-  _Self& write(const char_type* __s, streamsize __n);
-
-public:                         // Formatted output.
-  // Formatted output from a streambuf.
-  _Self& operator<<(basic_streambuf<_CharT, _Traits>* __buf);
-# ifndef _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER
-  // this is needed for compiling with option char = unsigned
-  _Self& operator<<(unsigned char __x) { _M_put_char(__x); return *this; }
-# endif
-  _Self& operator<<(short __x) { return _M_put_num(*this,  __STATIC_CAST(long,__x)); }
-  _Self& operator<<(unsigned short __x) { return _M_put_num(*this,  __STATIC_CAST(unsigned long,__x)); }
-  _Self& operator<<(int __x) { return _M_put_num(*this,  __STATIC_CAST(long,__x)); }
-  _Self& operator<<(unsigned int __x) { return _M_put_num(*this,  __STATIC_CAST(unsigned long,__x)); }
-  _Self& operator<<(long __x) { return _M_put_num(*this,  __x); }
-  _Self& operator<<(unsigned long __x) { return _M_put_num(*this,  __x); }
-#ifdef _STLP_LONG_LONG
-  _Self& operator<< (_STLP_LONG_LONG __x)     { return _M_put_num(*this,  __x); }
-  _Self& operator<< (unsigned _STLP_LONG_LONG __x) { return _M_put_num(*this,  __x); }
-#endif 
-  _Self& operator<<(float __x)
-    { return _M_put_num(*this,  __STATIC_CAST(double,__x)); }
-  _Self& operator<<(double __x) { return _M_put_num(*this,  __x); }
-# ifndef _STLP_NO_LONG_DOUBLE
-  _Self& operator<<(long double __x) { return _M_put_num(*this,  __x); }
-# endif
-  _Self& operator<<(const void* __x) { return _M_put_num(*this,  __x); }
-# ifndef _STLP_NO_BOOL
-  _Self& operator<<(bool __x) { return _M_put_num(*this,  __x); }
-# endif
-
-public:                         // Buffer positioning and manipulation.
-  _Self& flush() {
-    if (this->rdbuf())
-      if (this->rdbuf()->pubsync() == -1)
-        this->setstate(ios_base::badbit);
-    return *this;
-  }
-
-  pos_type tellp() {
-    return this->rdbuf() && !this->fail()
-      ? this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::out)
-      : pos_type(-1);
-  }
-
-  _Self& seekp(pos_type __pos) {
-    if (this->rdbuf() && !this->fail())
-      this->rdbuf()->pubseekpos(__pos, ios_base::out);
-    return *this;
-  }
-
-  _Self& seekp(off_type __off, ios_base::seekdir __dir) {
-    if (this->rdbuf() && !this->fail())
-      this->rdbuf()->pubseekoff(__off, __dir, ios_base::out);
-    return *this;
-  }
-
-#if defined (_STLP_USE_TEMPLATE_EXPORT)
-  // If we are using DLL specs, we have not to use inner classes
-  // end class declaration here
-  typedef _Osentry<_CharT, _Traits>  sentry;
-};
-#  define sentry _Osentry
-  template <class _CharT, class _Traits>
-  class _Osentry {
-    typedef _Osentry<_CharT, _Traits> _Self;
-# else
-    class sentry {
-      typedef sentry _Self;
-# endif
-    private:
-      basic_ostream<_CharT, _Traits>& _M_str;
-      //      basic_streambuf<_CharT, _Traits>* _M_buf;
-      bool _M_ok;
-    public:
-      explicit sentry(basic_ostream<_CharT, _Traits>& __str)
-        : _M_str(__str), /* _M_buf(__str.rdbuf()), */ _M_ok(_M_init(__str))
-      {
-      }
-      
-      ~sentry() {
-        if (_M_str.flags() & ios_base::unitbuf)
-# ifndef _STLP_INCOMPLETE_EXCEPTION_HEADER 
-          if (!_STLP_VENDOR_EXCEPT_STD::uncaught_exception())
-# endif
-            _M_str.flush();
-      }
-
-      operator bool() const { return _M_ok; }
-    private:                        // Disable assignment and copy constructor.
-      sentry(const _Self& __s) : _M_str (__s._M_str) {};
-      void operator=(const _Self&) {};
-    };
-# if defined (_STLP_USE_TEMPLATE_EXPORT)
-#  undef sentry
-# else
-  // close basic_ostream class definition here    
-};
-# endif
-  
-# if defined (_STLP_USE_TEMPLATE_EXPORT)
-_STLP_EXPORT_TEMPLATE_CLASS basic_ostream<char, char_traits<char> >;
-_STLP_EXPORT_TEMPLATE_CLASS _Osentry<char, char_traits<char> >;
-#  if !defined (_STLP_NO_WCHAR_T)
-_STLP_EXPORT_TEMPLATE_CLASS basic_ostream<wchar_t, char_traits<wchar_t> >;
-_STLP_EXPORT_TEMPLATE_CLASS _Osentry<wchar_t, char_traits<wchar_t> >;
-#  endif
-# endif /* _STLP_USE_TEMPLATE_EXPORT */
-
-template <class _CharT, class _Traits>
-inline basic_streambuf<_CharT, _Traits>* _STLP_CALL 
-_M_get_ostreambuf(basic_ostream<_CharT, _Traits>& __St) 
-{
-  return __St.rdbuf();
-}
-
-// Non-member functions.
-
-template <class _CharT, class _Traits>
-inline basic_ostream<_CharT, _Traits>& _STLP_CALL
-operator<<(basic_ostream<_CharT, _Traits>& __os, _CharT __c) {
-  __os._M_put_char(__c);
-  return __os;
-}
-
-template <class _CharT, class _Traits>
-inline basic_ostream<_CharT, _Traits>& _STLP_CALL
-operator<<(basic_ostream<_CharT, _Traits>& __os, const _CharT* __s) {
-  __os._M_put_nowiden(__s);
-  return __os;
-}
-
-# ifdef _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER
-// some specializations
-
-inline basic_ostream<char, char_traits<char> >& _STLP_CALL
-operator<<(basic_ostream<char, char_traits<char> >& __os, char __c) {
-  __os._M_put_char(__c);
-  return __os;
-}
-
-inline basic_ostream<char, char_traits<char> >& _STLP_CALL
-operator<<(basic_ostream<char, char_traits<char> >& __os, signed char __c) {
-  __os._M_put_char(__c);
-  return __os;
-}
-
-inline basic_ostream<char, char_traits<char> >& _STLP_CALL
-operator<<(basic_ostream<char, char_traits<char> >& __os, unsigned char __c) {
-  __os._M_put_char(__c);
-  return __os;
-}
-
-inline basic_ostream<char, char_traits<char> >& _STLP_CALL
-operator<<(basic_ostream<char, char_traits<char> >& __os, const char* __s) {
-  __os._M_put_nowiden(__s);
-  return __os;
-}
-
-inline basic_ostream<char, char_traits<char> >& _STLP_CALL
-operator<<(basic_ostream<char, char_traits<char> >& __os, const signed char* __s) {
-  __os._M_put_nowiden(__REINTERPRET_CAST(const char*,__s));
-  return __os;
-}
-
-inline basic_ostream<char, char_traits<char> >&
-operator<<(basic_ostream<char, char_traits<char> >& __os, const unsigned char* __s) {
-  __os._M_put_nowiden(__REINTERPRET_CAST(const char*,__s));
-  return __os;
-}
-
-# else
-
-// also for compilers who might use that
-template <class _CharT, class _Traits>
-inline basic_ostream<_CharT, _Traits>& _STLP_CALL
-operator<<(basic_ostream<_CharT, _Traits>& __os, char __c) {
-  __os._M_put_char(__os.widen(__c));
-  return __os;
-}
-
-template <class _Traits>
-inline basic_ostream<char, _Traits>& _STLP_CALL
-operator<<(basic_ostream<char, _Traits>& __os, char __c) {
-  __os._M_put_char(__c);
-  return __os;
-}
-
-template <class _Traits>
-inline basic_ostream<char, _Traits>& _STLP_CALL
-operator<<(basic_ostream<char, _Traits>& __os, signed char __c) {
-  __os._M_put_char(__c);
-  return __os;
-}
-
-template <class _Traits>
-inline basic_ostream<char, _Traits>& _STLP_CALL
-operator<<(basic_ostream<char, _Traits>& __os, unsigned char __c) {
-  __os._M_put_char(__c);
-  return __os;
-}
-
-template <class _CharT, class _Traits>
-inline basic_ostream<_CharT, _Traits>& _STLP_CALL
-operator<<(basic_ostream<_CharT, _Traits>& __os, const char* __s) {
-  __os._M_put_widen(__s);
-  return __os;
-}
-
-template <class _Traits>
-inline basic_ostream<char, _Traits>& _STLP_CALL
-operator<<(basic_ostream<char, _Traits>& __os, const char* __s) {
-  __os._M_put_nowiden(__s);
-  return __os;
-}
-
-template <class _Traits>
-inline basic_ostream<char, _Traits>& _STLP_CALL
-operator<<(basic_ostream<char, _Traits>& __os, const signed char* __s) {
-  __os._M_put_nowiden(__REINTERPRET_CAST(const char*,__s));
-  return __os;
-}
-
-template <class _Traits>
-inline basic_ostream<char, _Traits>&
-operator<<(basic_ostream<char, _Traits>& __os, const unsigned char* __s) {
-  __os._M_put_nowiden(__REINTERPRET_CAST(const char*,__s));
-  return __os;
-}
-# endif /* _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER */
-
-//----------------------------------------------------------------------
-// basic_ostream manipulators.
-
-template <class _CharT, class _Traits>
-inline basic_ostream<_CharT, _Traits>& _STLP_CALL
-endl(basic_ostream<_CharT, _Traits>& __os) {
-  __os.put(__os.widen('\n'));
-  __os.flush();
-  return __os;
-}
-
-template <class _CharT, class _Traits>
-inline basic_ostream<_CharT, _Traits>& _STLP_CALL
-ends(basic_ostream<_CharT, _Traits>& __os) {
-  __os.put(_STLP_DEFAULT_CONSTRUCTED(_CharT));
-  return __os;
-}
-
-template <class _CharT, class _Traits>
-inline basic_ostream<_CharT, _Traits>& _STLP_CALL
-flush(basic_ostream<_CharT, _Traits>& __os) {
-  __os.flush();
-  return __os;
-}
-
-_STLP_END_NAMESPACE
-
-#  undef _STLP_MANIP_INLINE
-
-#if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION)
-#  include <stl/_ostream.c>
-# endif
-
-#endif /* _STLP_INTERNAL_OSTREAM_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_ostreambuf_iterator.h b/src/STLport/stl/_ostreambuf_iterator.h
deleted file mode 100644
index 096f428..0000000
--- a/src/STLport/stl/_ostreambuf_iterator.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-// WARNING: This is an internal header file, included by other C++
-// standard library headers.  You should not attempt to use this header
-// file directly.
-
-
-#ifndef _STLP_INTERNAL_OSTREAMBUF_ITERATOR_H
-#define _STLP_INTERNAL_OSTREAMBUF_ITERATOR_H
-
-#ifndef _STLP_INTERNAL_STREAMBUF
-# include <stl/_streambuf.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-template <class _CharT, class _Traits>
-extern basic_streambuf<_CharT, _Traits>* _STLP_CALL _M_get_ostreambuf(basic_ostream<_CharT, _Traits>& ) ;
-
-// The default template argument is declared in iosfwd
-template<class _CharT, class _Traits>
-class ostreambuf_iterator
-{
-public:
-  typedef _CharT                           char_type;
-  typedef _Traits                          traits_type;
-  typedef typename _Traits::int_type       int_type;
-  typedef basic_streambuf<_CharT, _Traits> streambuf_type;
-  typedef basic_ostream<_CharT, _Traits>   ostream_type;
-
-  typedef output_iterator_tag              iterator_category;
-  typedef void                             value_type;
-  typedef void                             difference_type;
-  typedef void                             pointer;
-  typedef void                             reference;
-
-public:
-  ostreambuf_iterator(streambuf_type* __buf) _STLP_NOTHROW : _M_buf(__buf), _M_ok(__buf!=0) {}
-  //  ostreambuf_iterator(ostream_type& __o) _STLP_NOTHROW : _M_buf(_M_get_ostreambuf(__o)), _M_ok(_M_buf != 0) {}
-  inline ostreambuf_iterator(ostream_type& __o) _STLP_NOTHROW;
-
-  ostreambuf_iterator<_CharT, _Traits>& operator=(char_type __c) {
-    _M_ok = _M_ok && !traits_type::eq_int_type(_M_buf->sputc(__c),
-                                               traits_type::eof());
-    return *this;
-  }    
-  
-  ostreambuf_iterator<_CharT, _Traits>& operator*()     { return *this; }
-  ostreambuf_iterator<_CharT, _Traits>& operator++()    { return *this; }
-  ostreambuf_iterator<_CharT, _Traits>& operator++(int) { return *this; }
-
-  bool failed() const { return !_M_ok; }
-
-private:
-  streambuf_type* _M_buf;
-  bool _M_ok;
-};
-
-template <class _CharT, class _Traits>
-inline ostreambuf_iterator<_CharT, _Traits>::ostreambuf_iterator(basic_ostream<_CharT, _Traits>& __o) _STLP_NOTHROW : _M_buf(_M_get_ostreambuf(__o)), _M_ok(_M_buf != 0) {}
-
-# if defined (_STLP_USE_TEMPLATE_EXPORT)
-_STLP_EXPORT_TEMPLATE_CLASS ostreambuf_iterator<char, char_traits<char> >;
-#  if defined (INSTANTIATE_WIDE_STREAMS)
-_STLP_EXPORT_TEMPLATE_CLASS ostreambuf_iterator<wchar_t, char_traits<wchar_t> >;
-#  endif
-# endif /* _STLP_USE_TEMPLATE_EXPORT */
-
-# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES
-template <class _CharT, class _Traits>
-inline output_iterator_tag _STLP_CALL 
-iterator_category(const ostreambuf_iterator<_CharT, _Traits>&) { return output_iterator_tag(); }
-# endif
-
-_STLP_END_NAMESPACE
-
-#endif /* _STLP_INTERNAL_OSTREAMBUF_ITERATOR_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/stl/_pair.h b/src/STLport/stl/_pair.h
deleted file mode 100644
index 5888a18..0000000
--- a/src/STLport/stl/_pair.h
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_PAIR_H
-#define _STLP_INTERNAL_PAIR_H
-
-_STLP_BEGIN_NAMESPACE
-
-template <class _T1, class _T2>
-struct pair {
-  typedef _T1 first_type;
-  typedef _T2 second_type;
-
-  _T1 first;
-  _T2 second;
-# if defined (_STLP_CONST_CONSTRUCTOR_BUG)
-  pair() {}
-# else
-  pair() : first(_T1()), second(_T2()) {}
-# endif
-  pair(const _T1& __a, const _T2& __b) : first(__a), second(__b) {}
-
-#if defined (_STLP_MEMBER_TEMPLATES) && !(defined (_STLP_MSVC) && (_STLP_MSVC < 1200))
-  template <class _U1, class _U2>
-  pair(const pair<_U1, _U2>& __p) : first(__p.first), second(__p.second) {}
-
-  pair(const pair<_T1,_T2>& __o) : first(__o.first), second(__o.second) {}
-#endif
-  __TRIVIAL_DESTRUCTOR(pair)
-};
-
-template <class _T1, class _T2>
-inline bool _STLP_CALL operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
-{ 
-  return __x.first == __y.first && __x.second == __y.second; 
-}
-
-template <class _T1, class _T2>
-inline bool _STLP_CALL operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
-{ 
-  return __x.first < __y.first || 
-         (!(__y.first < __x.first) && __x.second < __y.second); 
-}
-
-#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE
-
-template <class _T1, class _T2>
-inline bool _STLP_CALL operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) {
-  return !(__x == __y);
-}
-
-template <class _T1, class _T2>
-inline bool _STLP_CALL operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) {
-  return __y < __x;
-}
-
-template <class _T1, class _T2>
-inline bool _STLP_CALL operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) {
-  return !(__y < __x);
-}
-
-template <class _T1, class _T2>
-inline bool _STLP_CALL operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) {
-  return !(__x < __y);
-}
-
-#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */
-
-
-#if defined(_STLP_FUNCTION_TMPL_PARTIAL_ORDER) && ! defined (_STLP_NO_EXTENSIONS) && ! defined (__BORLANDC__) && ! defined (__DMC__)
-template <class _T1, class _T2, int _Sz>
-inline pair<_T1, _T2 const*> make_pair(_T1 const& __x,
-                                       _T2 const (&__y)[_Sz])
-{
-  return pair<_T1, _T2 const*>(__x, static_cast<_T2 const*>(__y));
-}
-
-template <class _T1, class _T2, int _Sz>
-inline pair<_T1 const*, _T2> make_pair(_T1 const (&__x)[_Sz],
-                                       _T2 const& __y)
-{
-  return pair<_T1 const*, _T2>(static_cast<_T1 const*>(__x), __y);
-}
-
-template <class _T1, class _T2, int _Sz1, int _Sz2>
-inline pair<_T1 const*, _T2 const*> make_pair(_T1 const (&__x)[_Sz1],
-                                              _T2 const (&__y)[_Sz2])
-{
-  return pair<_T1 const*, _T2 const*>(static_cast<_T1 const*>(__x),
-                                      static_cast<_T2 const*>(__y));
-}
-#endif
-
-template <class _T1, class _T2>
-inline pair<_T1, _T2> _STLP_CALL make_pair(const _T1& __x, const _T2& __y)
-{
-  return pair<_T1, _T2>(__x, __y);
-}
-
-
-_STLP_END_NAMESPACE
-
-# if defined (_STLP_USE_NAMESPACES) || ! defined (_STLP_USE_SEPARATE_RELOPS_NAMESPACE) 
-_STLP_BEGIN_RELOPS_NAMESPACE
-
-template <class _Tp>
-inline bool _STLP_CALL operator!=(const _Tp& __x, const _Tp& __y) {
-  return !(__x == __y);
-}
-
-template <class _Tp>
-inline bool _STLP_CALL operator>(const _Tp& __x, const _Tp& __y) {
-  return __y < __x;
-}
-
-template <class _Tp>
-inline bool _STLP_CALL operator<=(const _Tp& __x, const _Tp& __y) {
-  return !(__y < __x);
-}
-
-template <class _Tp>
-inline bool _STLP_CALL  operator>=(const _Tp& __x, const _Tp& __y) {
-  return !(__x < __y);
-}
-
-_STLP_END_RELOPS_NAMESPACE
-
-# endif
-
-#endif /* _STLP_INTERNAL_PAIR_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_prolog.h b/src/STLport/stl/_prolog.h
deleted file mode 100644
index c545322..0000000
--- a/src/STLport/stl/_prolog.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/* NOTE : this header has no guards and is MEANT for multiple inclusion !
- * If you are using "header protection" option with your compiler,
- * please also find #pragma which disables it and put it here, to
- * allow reentrancy of this header.
- */
-/* We undef "std" on entry , as STLport headers may include native ones. */
-# undef std
-
-# ifndef _STLP_CONFIG_H
-#  include <stl/_config.h>
-# endif
-
-/* If the platform provides any specific prolog actions,
- * like #pragmas, do include platform-specific prolog file */
-# if defined (_STLP_HAS_SPECIFIC_PROLOG_EPILOG)
-#  include <config/_prolog.h>
-# endif
diff --git a/src/STLport/stl/_pthread_alloc.c b/src/STLport/stl/_pthread_alloc.c
deleted file mode 100644
index 5d64b6b..0000000
--- a/src/STLport/stl/_pthread_alloc.c
+++ /dev/null
@@ -1,262 +0,0 @@
-/*
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-#ifndef _STLP_PTHREAD_ALLOC_C
-#define _STLP_PTHREAD_ALLOC_C
-
-#ifdef __WATCOMC__
-#pragma warning 13 9
-#pragma warning 367 9
-#pragma warning 368 9
-#endif
-
-#ifndef _STLP_PTHREAD_ALLOC_H
-# include <stl/_pthread_alloc.h>
-#endif
-
-# if defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION)
-
-# include <cerrno>
-
-_STLP_BEGIN_NAMESPACE
-
-template <size_t _Max_size>
-void _Pthread_alloc<_Max_size>::_S_destructor(void * __instance)
-{
-    _M_lock __lock_instance;	// Need to acquire lock here.
-    _Pthread_alloc_per_thread_state<_Max_size>* __s =
-        (_Pthread_alloc_per_thread_state<_Max_size> *)__instance;
-    __s -> __next = _S_free_per_thread_states;
-    _S_free_per_thread_states = __s;
-}
-
-template <size_t _Max_size>
-_Pthread_alloc_per_thread_state<_Max_size> *
-_Pthread_alloc<_Max_size>::_S_new_per_thread_state()
-{    
-    /* lock already held here.	*/
-    if (0 != _S_free_per_thread_states) {
-        _Pthread_alloc_per_thread_state<_Max_size> *__result =
-					_S_free_per_thread_states;
-        _S_free_per_thread_states = _S_free_per_thread_states -> __next;
-        return __result;
-    } else {
-        return _STLP_NEW _Pthread_alloc_per_thread_state<_Max_size>;
-    }
-}
-
-template <size_t _Max_size>
-_Pthread_alloc_per_thread_state<_Max_size> *
-_Pthread_alloc<_Max_size>::_S_get_per_thread_state()
-{
-
-    int __ret_code;
-    __state_type* __result;
-    
-    if (_S_key_initialized && (__result = (__state_type*) pthread_getspecific(_S_key)))
-      return __result;
-    
-    /*REFERENCED*/
-    _M_lock __lock_instance;	// Need to acquire lock here.
-    if (!_S_key_initialized) {
-      if (pthread_key_create(&_S_key, _S_destructor)) {
-	__THROW_BAD_ALLOC;  // failed
-      }
-      _S_key_initialized = true;
-    }
-
-    __result = _S_new_per_thread_state();
-    __ret_code = pthread_setspecific(_S_key, __result);
-    if (__ret_code) {
-      if (__ret_code == ENOMEM) {
-	__THROW_BAD_ALLOC;
-      } else {
-	// EINVAL
-	_STLP_ABORT();
-      }
-    }
-    return __result;
-}
-
-/* We allocate memory in large chunks in order to avoid fragmenting     */
-/* the malloc heap too much.                                            */
-/* We assume that size is properly aligned.                             */
-template <size_t _Max_size>
-char *_Pthread_alloc<_Max_size>
-::_S_chunk_alloc(size_t __p_size, size_t &__nobjs)
-{
-  {
-    char * __result;
-    size_t __total_bytes;
-    size_t __bytes_left;
-    /*REFERENCED*/
-    _M_lock __lock_instance;         // Acquire lock for this routine
-
-    __total_bytes = __p_size * __nobjs;
-    __bytes_left = _S_end_free - _S_start_free;
-    if (__bytes_left >= __total_bytes) {
-        __result = _S_start_free;
-        _S_start_free += __total_bytes;
-        return(__result);
-    } else if (__bytes_left >= __p_size) {
-        __nobjs = __bytes_left/__p_size;
-        __total_bytes = __p_size * __nobjs;
-        __result = _S_start_free;
-        _S_start_free += __total_bytes;
-        return(__result);
-    } else {
-        size_t __bytes_to_get =
-		2 * __total_bytes + _S_round_up(_S_heap_size >> 4);
-        // Try to make use of the left-over piece.
-        if (__bytes_left > 0) {
-            _Pthread_alloc_per_thread_state<_Max_size>* __a = 
-                (_Pthread_alloc_per_thread_state<_Max_size>*)
-			pthread_getspecific(_S_key);
-            __obj * volatile * __my_free_list =
-                        __a->__free_list + _S_freelist_index(__bytes_left);
-
-            ((__obj *)_S_start_free) -> __free_list_link = *__my_free_list;
-            *__my_free_list = (__obj *)_S_start_free;
-        }
-#       ifdef _SGI_SOURCE
-          // Try to get memory that's aligned on something like a
-          // cache line boundary, so as to avoid parceling out
-          // parts of the same line to different threads and thus
-          // possibly different processors.
-          {
-            const int __cache_line_size = 128;  // probable upper bound
-            __bytes_to_get &= ~(__cache_line_size-1);
-            _S_start_free = (char *)memalign(__cache_line_size, __bytes_to_get); 
-            if (0 == _S_start_free) {
-              _S_start_free = (char *)__malloc_alloc<0>::allocate(__bytes_to_get);
-            }
-          }
-#       else  /* !SGI_SOURCE */
-          _S_start_free = (char *)__malloc_alloc<0>::allocate(__bytes_to_get);
-#       endif
-        _S_heap_size += __bytes_to_get;
-        _S_end_free = _S_start_free + __bytes_to_get;
-    }
-  }
-  // lock is released here
-  return(_S_chunk_alloc(__p_size, __nobjs));
-}
-
-
-/* Returns an object of size n, and optionally adds to size n free list.*/
-/* We assume that n is properly aligned.                                */
-/* We hold the allocation lock.                                         */
-template <size_t _Max_size>
-void *_Pthread_alloc_per_thread_state<_Max_size>
-::_M_refill(size_t __n)
-{
-    size_t __nobjs = 128;
-    char * __chunk =
-	_Pthread_alloc<_Max_size>::_S_chunk_alloc(__n, __nobjs);
-    __obj * volatile * __my_free_list;
-    __obj * __result;
-    __obj * __current_obj, * __next_obj;
-    int __i;
-
-    if (1 == __nobjs)  {
-        return(__chunk);
-    }
-    __my_free_list = __free_list
-		 + _Pthread_alloc<_Max_size>::_S_freelist_index(__n);
-
-    /* Build free list in chunk */
-      __result = (__obj *)__chunk;
-      *__my_free_list = __next_obj = (__obj *)(__chunk + __n);
-      for (__i = 1; ; __i++) {
-        __current_obj = __next_obj;
-        __next_obj = (__obj *)((char *)__next_obj + __n);
-        if (__nobjs - 1 == __i) {
-            __current_obj -> __free_list_link = 0;
-            break;
-        } else {
-            __current_obj -> __free_list_link = __next_obj;
-        }
-      }
-    return(__result);
-}
-
-template <size_t _Max_size>
-void *_Pthread_alloc<_Max_size>
-::reallocate(void *__p, size_t __old_sz, size_t __new_sz)
-{
-    void * __result;
-    size_t __copy_sz;
-
-    if (__old_sz > _Max_size
-	&& __new_sz > _Max_size) {
-        return(realloc(__p, __new_sz));
-    }
-    if (_S_round_up(__old_sz) == _S_round_up(__new_sz)) return(__p);
-    __result = allocate(__new_sz);
-    __copy_sz = __new_sz > __old_sz? __old_sz : __new_sz;
-    memcpy(__result, __p, __copy_sz);
-    deallocate(__p, __old_sz);
-    return(__result);
-}
-
-#if defined (_STLP_STATIC_TEMPLATE_DATA) && (_STLP_STATIC_TEMPLATE_DATA > 0)
-
-template <size_t _Max_size>
-_Pthread_alloc_per_thread_state<_Max_size> * _Pthread_alloc<_Max_size>::_S_free_per_thread_states = 0;
-
-template <size_t _Max_size>
-pthread_key_t _Pthread_alloc<_Max_size>::_S_key =0;
-
-template <size_t _Max_size>
-bool _Pthread_alloc<_Max_size>::_S_key_initialized = false;
-
-template <size_t _Max_size>
-_STLP_mutex_base _Pthread_alloc<_Max_size>::_S_chunk_allocator_lock _STLP_MUTEX_INITIALIZER;
-
-template <size_t _Max_size>
-char *_Pthread_alloc<_Max_size>::_S_start_free = 0;
-
-template <size_t _Max_size>
-char *_Pthread_alloc<_Max_size>::_S_end_free = 0;
-
-template <size_t _Max_size>
-size_t _Pthread_alloc<_Max_size>::_S_heap_size = 0;
-
- # else
- 
- __DECLARE_INSTANCE(template <size_t _Max_size> _Pthread_alloc_per_thread_state<_Max_size> *, _Pthread_alloc<_Max_size>::_S_free_per_thread_states, = 0);
- __DECLARE_INSTANCE(template <size_t _Max_size> pthread_key_t, _Pthread_alloc<_Max_size>::_S_key, = 0);
- __DECLARE_INSTANCE(template <size_t _Max_size> bool, _Pthread_alloc<_Max_size>::_S_key_initialized, = false);
- __DECLARE_INSTANCE(template <size_t _Max_size> char *, _Pthread_alloc<_Max_size>::_S_start_free, = 0);
- __DECLARE_INSTANCE(template <size_t _Max_size> char *, _Pthread_alloc<_Max_size>::_S_end_free, = 0);
- __DECLARE_INSTANCE(template <size_t _Max_size> size_t, _Pthread_alloc<_Max_size>::_S_heap_size, = 0);
-
-# endif
-
-_STLP_END_NAMESPACE
-
-# endif /* _STLP_EXPOSE_GLOBALS_IMPLEMENTATION */
-
-#endif /*  _STLP_PTHREAD_ALLOC_C */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_pthread_alloc.h b/src/STLport/stl/_pthread_alloc.h
deleted file mode 100644
index 3d6be7e..0000000
--- a/src/STLport/stl/_pthread_alloc.h
+++ /dev/null
@@ -1,489 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_PTHREAD_ALLOC_H
-#define _STLP_PTHREAD_ALLOC_H
-
-// Pthread-specific node allocator.
-// This is similar to the default allocator, except that free-list
-// information is kept separately for each thread, avoiding locking.
-// This should be reasonably fast even in the presence of threads.
-// The down side is that storage may not be well-utilized.
-// It is not an error to allocate memory in thread A and deallocate
-// it in thread B.  But this effectively transfers ownership of the memory,
-// so that it can only be reallocated by thread B.  Thus this can effectively
-// result in a storage leak if it's done on a regular basis.
-// It can also result in frequent sharing of
-// cache lines among processors, with potentially serious performance
-// consequences.
-
-#include <pthread.h>
-
-#ifndef _STLP_INTERNAL_ALLOC_H
-#include <stl/_alloc.h>
-#endif
-
-#ifndef __RESTRICT
-#  define __RESTRICT
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-#define _STLP_DATA_ALIGNMENT 8
-
-union _Pthread_alloc_obj {
-    union _Pthread_alloc_obj * __free_list_link;
-    char __client_data[_STLP_DATA_ALIGNMENT];    /* The client sees this.    */
-};
-
-// Pthread allocators don't appear to the client to have meaningful
-// instances.  We do in fact need to associate some state with each
-// thread.  That state is represented by
-// _Pthread_alloc_per_thread_state<_Max_size>.
-
-template<size_t _Max_size>
-struct _Pthread_alloc_per_thread_state {
-  typedef _Pthread_alloc_obj __obj;
-  enum { _S_NFREELISTS = _Max_size/_STLP_DATA_ALIGNMENT };
-
-  // Free list link for list of available per thread structures.
-  // When one of these becomes available for reuse due to thread
-  // termination, any objects in its free list remain associated
-  // with it.  The whole structure may then be used by a newly
-  // created thread.
-  _Pthread_alloc_per_thread_state() : __next(0)
-  {
-    memset((void *)__free_list, 0, (size_t)_S_NFREELISTS * sizeof(__obj *));
-  }
-  // Returns an object of size __n, and possibly adds to size n free list.
-  void *_M_refill(size_t __n);
-  
-  _Pthread_alloc_obj* volatile __free_list[_S_NFREELISTS]; 
-  _Pthread_alloc_per_thread_state<_Max_size> * __next; 
-  // this data member is only to be used by per_thread_allocator, which returns memory to the originating thread.
-  _STLP_mutex _M_lock;
-
- };
-
-// Pthread-specific allocator.
-// The argument specifies the largest object size allocated from per-thread
-// free lists.  Larger objects are allocated using malloc_alloc.
-// Max_size must be a power of 2.
-template < __DFL_NON_TYPE_PARAM(size_t, _Max_size, _MAX_BYTES) >
-class _Pthread_alloc {
-
-public: // but only for internal use:
-
-  typedef _Pthread_alloc_obj __obj;
-  typedef _Pthread_alloc_per_thread_state<_Max_size> __state_type;
-  typedef char value_type;
-
-  // Allocates a chunk for nobjs of size size.  nobjs may be reduced
-  // if it is inconvenient to allocate the requested number.
-  static char *_S_chunk_alloc(size_t __size, size_t &__nobjs);
-
-  enum {_S_ALIGN = _STLP_DATA_ALIGNMENT};
-
-  static size_t _S_round_up(size_t __bytes) {
-        return (((__bytes) + (int)_S_ALIGN-1) & ~((int)_S_ALIGN - 1));
-  }
-  static size_t _S_freelist_index(size_t __bytes) {
-        return (((__bytes) + (int)_S_ALIGN-1)/(int)_S_ALIGN - 1);
-  }
-
-private:
-  // Chunk allocation state. And other shared state.
-  // Protected by _S_chunk_allocator_lock.
-  static _STLP_mutex_base _S_chunk_allocator_lock;
-  static char *_S_start_free;
-  static char *_S_end_free;
-  static size_t _S_heap_size;
-  static _Pthread_alloc_per_thread_state<_Max_size>* _S_free_per_thread_states;
-  static pthread_key_t _S_key;
-  static bool _S_key_initialized;
-        // Pthread key under which per thread state is stored. 
-        // Allocator instances that are currently unclaimed by any thread.
-  static void _S_destructor(void *instance);
-        // Function to be called on thread exit to reclaim per thread
-        // state.
-  static _Pthread_alloc_per_thread_state<_Max_size> *_S_new_per_thread_state();
-public:
-        // Return a recycled or new per thread state.
-  static _Pthread_alloc_per_thread_state<_Max_size> *_S_get_per_thread_state();
-private:
-        // ensure that the current thread has an associated
-        // per thread state.
-  class _M_lock;
-  friend class _M_lock;
-  class _M_lock {
-      public:
-        _M_lock () { _S_chunk_allocator_lock._M_acquire_lock(); }
-        ~_M_lock () { _S_chunk_allocator_lock._M_release_lock(); }
-  };
-
-public:
-
-  /* n must be > 0      */
-  static void * allocate(size_t __n)
-  {
-    __obj * volatile * __my_free_list;
-    __obj * __RESTRICT __result;
-    __state_type* __a;
-
-    if (__n > _Max_size) {
-        return(__malloc_alloc<0>::allocate(__n));
-    }
-
-    __a = _S_get_per_thread_state();
-
-    __my_free_list = __a -> __free_list + _S_freelist_index(__n);
-    __result = *__my_free_list;
-    if (__result == 0) {
-        void *__r = __a -> _M_refill(_S_round_up(__n));
-        return __r;
-    }
-    *__my_free_list = __result -> __free_list_link;
-    return (__result);
-  };
-
-  /* p may not be 0 */
-  static void deallocate(void *__p, size_t __n)
-  {
-    __obj *__q = (__obj *)__p;
-    __obj * volatile * __my_free_list;
-    __state_type* __a;
-
-    if (__n > _Max_size) {
-        __malloc_alloc<0>::deallocate(__p, __n);
-        return;
-    }
-
-    __a = _S_get_per_thread_state();
-    
-    __my_free_list = __a->__free_list + _S_freelist_index(__n);
-    __q -> __free_list_link = *__my_free_list;
-    *__my_free_list = __q;
-  }
-
-  // boris : versions for per_thread_allocator
-  /* n must be > 0      */
-  static void * allocate(size_t __n, __state_type* __a)
-  {
-    __obj * volatile * __my_free_list;
-    __obj * __RESTRICT __result;
-
-    if (__n > _Max_size) {
-        return(__malloc_alloc<0>::allocate(__n));
-    }
-
-    // boris : here, we have to lock per thread state, as we may be getting memory from
-    // different thread pool.
-    _STLP_mutex_lock __lock(__a->_M_lock);
-
-    __my_free_list = __a -> __free_list + _S_freelist_index(__n);
-    __result = *__my_free_list;
-    if (__result == 0) {
-        void *__r = __a -> _M_refill(_S_round_up(__n));
-        return __r;
-    }
-    *__my_free_list = __result -> __free_list_link;
-    return (__result);
-  };
-
-  /* p may not be 0 */
-  static void deallocate(void *__p, size_t __n, __state_type* __a)
-  {
-    __obj *__q = (__obj *)__p;
-    __obj * volatile * __my_free_list;
-
-    if (__n > _Max_size) {
-        __malloc_alloc<0>::deallocate(__p, __n);
-        return;
-    }
-
-    // boris : here, we have to lock per thread state, as we may be returning memory from
-    // different thread.
-    _STLP_mutex_lock __lock(__a->_M_lock);
-
-    __my_free_list = __a->__free_list + _S_freelist_index(__n);
-    __q -> __free_list_link = *__my_free_list;
-    *__my_free_list = __q;
-  }
-
-  static void * reallocate(void *__p, size_t __old_sz, size_t __new_sz);
-
-} ;
-
-# if defined (_STLP_USE_TEMPLATE_EXPORT)
-_STLP_EXPORT_TEMPLATE_CLASS _Pthread_alloc<_MAX_BYTES>;
-# endif
-
-typedef _Pthread_alloc<_MAX_BYTES> __pthread_alloc;
-typedef __pthread_alloc pthread_alloc;
-
-template <class _Tp>
-class pthread_allocator {
-  typedef pthread_alloc _S_Alloc;          // The underlying allocator.
-public:
-  typedef size_t     size_type;
-  typedef ptrdiff_t  difference_type;
-  typedef _Tp*       pointer;
-  typedef const _Tp* const_pointer;
-  typedef _Tp&       reference;
-  typedef const _Tp& const_reference;
-  typedef _Tp        value_type;
-
-#ifdef _STLP_MEMBER_TEMPLATE_CLASSES
-  template <class _NewType> struct rebind {
-    typedef pthread_allocator<_NewType> other;
-  };
-#endif
-
-  pthread_allocator() _STLP_NOTHROW {}
-  pthread_allocator(const pthread_allocator<_Tp>& a) _STLP_NOTHROW {}
-
-#if defined (_STLP_MEMBER_TEMPLATES) /* && defined (_STLP_FUNCTION_PARTIAL_ORDER) */
-  template <class _OtherType> pthread_allocator(const pthread_allocator<_OtherType>&)
-		_STLP_NOTHROW {}
-#endif
-
-  ~pthread_allocator() _STLP_NOTHROW {}
-
-  pointer address(reference __x) const { return &__x; }
-  const_pointer address(const_reference __x) const { return &__x; }
-
-  // __n is permitted to be 0.  The C++ standard says nothing about what
-  // the return value is when __n == 0.
-  _Tp* allocate(size_type __n, const void* = 0) {
-    return __n != 0 ? __STATIC_CAST(_Tp*,_S_Alloc::allocate(__n * sizeof(_Tp)))
-                    : 0;
-  }
-
-  // p is not permitted to be a null pointer.
-  void deallocate(pointer __p, size_type __n)
-    { _S_Alloc::deallocate(__p, __n * sizeof(_Tp)); }
-
-  size_type max_size() const _STLP_NOTHROW 
-    { return size_t(-1) / sizeof(_Tp); }
-
-  void construct(pointer __p, const _Tp& __val) { _STLP_PLACEMENT_NEW (__p) _Tp(__val); }
-  void destroy(pointer _p) { _p->~_Tp(); }
-};
-
-_STLP_TEMPLATE_NULL
-class _STLP_CLASS_DECLSPEC pthread_allocator<void> {
-public:
-  typedef size_t      size_type;
-  typedef ptrdiff_t   difference_type;
-  typedef void*       pointer;
-  typedef const void* const_pointer;
-  typedef void        value_type;
-#ifdef _STLP_MEMBER_TEMPLATE_CLASSES
-  template <class _NewType> struct rebind {
-    typedef pthread_allocator<_NewType> other;
-  };
-#endif
-};
-
-template <class _T1, class _T2>
-inline bool operator==(const pthread_allocator<_T1>&,
-                       const pthread_allocator<_T2>& a2) 
-{
-  return true;
-}
-
-#ifdef _STLP_FUNCTION_TMPL_PARTIAL_ORDER
-template <class _T1, class _T2>
-inline bool operator!=(const pthread_allocator<_T1>&,
-                       const pthread_allocator<_T2>&)
-{
-  return false;
-}
-#endif
-
-
-#ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION
-
-# ifdef _STLP_USE_RAW_SGI_ALLOCATORS
-template <class _Tp, size_t _Max_size>
-struct _Alloc_traits<_Tp, _Pthread_alloc<_Max_size> >
-{
-  typedef __allocator<_Tp, _Pthread_alloc<_Max_size> > 
-          allocator_type;
-};
-# endif
-
-template <class _Tp, class _Atype>
-struct _Alloc_traits<_Tp, pthread_allocator<_Atype> >
-{
-  typedef pthread_allocator<_Tp> allocator_type;
-};
-
-#endif
-
-#if !defined (_STLP_USE_NESTED_TCLASS_THROUGHT_TPARAM)
-
-template <class _Tp1, class _Tp2>
-inline pthread_allocator<_Tp2>&
-__stl_alloc_rebind(pthread_allocator<_Tp1>& __x, const _Tp2*) {
-  return (pthread_allocator<_Tp2>&)__x;
-}
-
-template <class _Tp1, class _Tp2>
-inline pthread_allocator<_Tp2>
-__stl_alloc_create(pthread_allocator<_Tp1>&, const _Tp2*) {
-  return pthread_allocator<_Tp2>();
-}
-
-#endif /* _STLP_USE_NESTED_TCLASS_THROUGHT_TPARAM */
-
-//
-// per_thread_allocator<> : this allocator always return memory to the same thread 
-// it was allocated from.
-//
-
-template <class _Tp>
-class per_thread_allocator {
-  typedef pthread_alloc _S_Alloc;          // The underlying allocator.
-  typedef pthread_alloc::__state_type __state_type;
-public:
-  typedef size_t     size_type;
-  typedef ptrdiff_t  difference_type;
-  typedef _Tp*       pointer;
-  typedef const _Tp* const_pointer;
-  typedef _Tp&       reference;
-  typedef const _Tp& const_reference;
-  typedef _Tp        value_type;
-
-#ifdef _STLP_MEMBER_TEMPLATE_CLASSES
-  template <class _NewType> struct rebind {
-    typedef per_thread_allocator<_NewType> other;
-  };
-#endif
-
-  per_thread_allocator() _STLP_NOTHROW { 
-    _M_state = _S_Alloc::_S_get_per_thread_state();
-  }
-  per_thread_allocator(const per_thread_allocator<_Tp>& __a) _STLP_NOTHROW : _M_state(__a._M_state){}
-
-#if defined (_STLP_MEMBER_TEMPLATES) /* && defined (_STLP_FUNCTION_PARTIAL_ORDER) */
-  template <class _OtherType> per_thread_allocator(const per_thread_allocator<_OtherType>& __a)
-		_STLP_NOTHROW : _M_state(__a._M_state) {}
-#endif
-
-  ~per_thread_allocator() _STLP_NOTHROW {}
-
-  pointer address(reference __x) const { return &__x; }
-  const_pointer address(const_reference __x) const { return &__x; }
-
-  // __n is permitted to be 0.  The C++ standard says nothing about what
-  // the return value is when __n == 0.
-  _Tp* allocate(size_type __n, const void* = 0) {
-    return __n != 0 ? __STATIC_CAST(_Tp*,_S_Alloc::allocate(__n * sizeof(_Tp), _M_state)): 0;
-  }
-
-  // p is not permitted to be a null pointer.
-  void deallocate(pointer __p, size_type __n)
-    { _S_Alloc::deallocate(__p, __n * sizeof(_Tp), _M_state); }
-
-  size_type max_size() const _STLP_NOTHROW 
-    { return size_t(-1) / sizeof(_Tp); }
-
-  void construct(pointer __p, const _Tp& __val) { _STLP_PLACEMENT_NEW (__p) _Tp(__val); }
-  void destroy(pointer _p) { _p->~_Tp(); }
-
-  // state is being kept here
-  __state_type* _M_state;
-};
-
-_STLP_TEMPLATE_NULL
-class _STLP_CLASS_DECLSPEC per_thread_allocator<void> {
-public:
-  typedef size_t      size_type;
-  typedef ptrdiff_t   difference_type;
-  typedef void*       pointer;
-  typedef const void* const_pointer;
-  typedef void        value_type;
-#ifdef _STLP_MEMBER_TEMPLATE_CLASSES
-  template <class _NewType> struct rebind {
-    typedef per_thread_allocator<_NewType> other;
-  };
-#endif
-};
-
-template <class _T1, class _T2>
-inline bool operator==(const per_thread_allocator<_T1>& __a1,
-                       const per_thread_allocator<_T2>& __a2) 
-{
-  return __a1._M_state == __a2._M_state;
-}
-
-#ifdef _STLP_FUNCTION_TMPL_PARTIAL_ORDER
-template <class _T1, class _T2>
-inline bool operator!=(const per_thread_allocator<_T1>& __a1,
-                       const per_thread_allocator<_T2>& __a2)
-{
-  return __a1._M_state != __a2._M_state;
-}
-#endif
-
-
-#ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION
-
-template <class _Tp, class _Atype>
-struct _Alloc_traits<_Tp, per_thread_allocator<_Atype> >
-{
-  typedef per_thread_allocator<_Tp> allocator_type;
-};
-
-#endif
-
-#if !defined (_STLP_USE_NESTED_TCLASS_THROUGHT_TPARAM)
-
-template <class _Tp1, class _Tp2>
-inline per_thread_allocator<_Tp2>&
-__stl_alloc_rebind(per_thread_allocator<_Tp1>& __x, const _Tp2*) {
-  return (per_thread_allocator<_Tp2>&)__x;
-}
-
-template <class _Tp1, class _Tp2>
-inline per_thread_allocator<_Tp2>
-__stl_alloc_create(per_thread_allocator<_Tp1>&, const _Tp2*) {
-  return per_thread_allocator<_Tp2>();
-}
-
-#endif /* _STLP_USE_NESTED_TCLASS_THROUGHT_TPARAM */
-
-_STLP_END_NAMESPACE
-
-# if defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION)
-#  include <stl/_pthread_alloc.c>
-# endif
-
-#endif /* _STLP_PTHREAD_ALLOC */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_ptrs_specialize.h b/src/STLport/stl/_ptrs_specialize.h
deleted file mode 100644
index cc5d259..0000000
--- a/src/STLport/stl/_ptrs_specialize.h
+++ /dev/null
@@ -1,72 +0,0 @@
-#ifndef _STLP_PTRS_SPECIALIZE_H
-# define _STLP_PTRS_SPECIALIZE_H
-
-// the following is a workaround for arrow operator problems
-#  if defined  ( _STLP_NO_ARROW_OPERATOR ) 
-// User wants to disable proxy -> operators
-#    define _STLP_DEFINE_ARROW_OPERATOR
-#    define _STLP_ARROW_SPECIALIZE_WITH_PTRS(_Tp)
-# else
-// Compiler can handle generic -> operator.
-#  define _STLP_ARROW_SPECIALIZE_WITH_PTRS(_Tp)
-#  ifdef __BORLANDC__
-#   define _STLP_DEFINE_ARROW_OPERATOR  pointer operator->() const { return &(*(*this)); }
-#  elif defined ( _STLP_WINCE ) || defined(__WATCOMC__)
-#   define _STLP_DEFINE_ARROW_OPERATOR pointer operator->() const { reference x = operator*(); return &x; }
-#  else
-#   define _STLP_DEFINE_ARROW_OPERATOR  pointer operator->() const { return &(operator*()); }
-#  endif
-# endif /* _STLP_NO_ARROW_OPERATOR */
-
-// Important pointers specializations
-
-# ifdef _STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS
-#  define _STLP_TYPE_TRAITS_POD_SPECIALIZE_V(_Type)
-#  define _STLP_TYPE_TRAITS_POD_SPECIALIZE(_Type)
-# else
-#  define _STLP_TYPE_TRAITS_POD_SPECIALIZE(_Type) _STLP_TEMPLATE_NULL struct __type_traits<_Type> : __type_traits_aux<true> {};
-#  define _STLP_TYPE_TRAITS_POD_SPECIALIZE_V(_Type) \
-_STLP_TYPE_TRAITS_POD_SPECIALIZE(_Type*) \
-_STLP_TYPE_TRAITS_POD_SPECIALIZE(const _Type*) \
-_STLP_TYPE_TRAITS_POD_SPECIALIZE(_Type**) \
-_STLP_TYPE_TRAITS_POD_SPECIALIZE(_Type* const *) \
-_STLP_TYPE_TRAITS_POD_SPECIALIZE(const _Type**) \
-_STLP_TYPE_TRAITS_POD_SPECIALIZE(_Type***) \
-_STLP_TYPE_TRAITS_POD_SPECIALIZE(const _Type***)
-# endif
-
-# define _STLP_POINTERS_SPECIALIZE(_Type) _STLP_TYPE_TRAITS_POD_SPECIALIZE_V(_Type) _STLP_ARROW_SPECIALIZE_WITH_PTRS(_Type)
-
-#  if !defined ( _STLP_NO_BOOL )
-_STLP_POINTERS_SPECIALIZE( bool )
-#  endif
-_STLP_TYPE_TRAITS_POD_SPECIALIZE_V(void)
-# ifndef _STLP_NO_SIGNED_BUILTINS
-  _STLP_POINTERS_SPECIALIZE( signed char )
-# endif
-  _STLP_POINTERS_SPECIALIZE( char )
-  _STLP_POINTERS_SPECIALIZE( unsigned char )
-  _STLP_POINTERS_SPECIALIZE( short )
-  _STLP_POINTERS_SPECIALIZE( unsigned short )
-  _STLP_POINTERS_SPECIALIZE( int )
-  _STLP_POINTERS_SPECIALIZE( unsigned int )
-  _STLP_POINTERS_SPECIALIZE( long )
-  _STLP_POINTERS_SPECIALIZE( unsigned long )
-  _STLP_POINTERS_SPECIALIZE( float )
-  _STLP_POINTERS_SPECIALIZE( double )
-#  if !defined ( _STLP_NO_LONG_DOUBLE )
-  _STLP_POINTERS_SPECIALIZE( long double )
-#  endif
-#  if defined ( _STLP_LONG_LONG)
-  _STLP_POINTERS_SPECIALIZE( _STLP_LONG_LONG )
-  _STLP_POINTERS_SPECIALIZE( unsigned _STLP_LONG_LONG )
-#  endif
-#if defined ( _STLP_HAS_WCHAR_T ) && ! defined (_STLP_WCHAR_T_IS_USHORT)
-  _STLP_POINTERS_SPECIALIZE( wchar_t )
-#  endif
-
-# undef _STLP_ARROW_SPECIALIZE
-# undef _STLP_ARROW_SPECIALIZE_WITH_PTRS
-# undef _STLP_TYPE_TRAITS_POD_SPECIALIZE_V
-
-#endif
diff --git a/src/STLport/stl/_queue.h b/src/STLport/stl/_queue.h
deleted file mode 100644
index d95e42f..0000000
--- a/src/STLport/stl/_queue.h
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_QUEUE_H
-#define _STLP_INTERNAL_QUEUE_H
-
-#ifndef _STLP_INTERNAL_DEQUE_H
-# include <stl/_deque.h>
-#endif
-
-#ifndef _STLP_INTERNAL_VECTOR_H
-# include <stl/_vector.h>
-#endif
-
-#ifndef _STLP_INTERNAL_HEAP_H
-# include <stl/_heap.h>
-#endif
-
-#ifndef _STLP_INTERNAL_FUNCTION_H
-# include <stl/_function.h>
-#endif
-
-#if defined(__SC__) && !defined(__DMC__)		//*ty 12/07/2001 - since "comp" is a built-in type and reserved under SCpp
-#define comp _Comp
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-# if ! defined ( _STLP_LIMITED_DEFAULT_TEMPLATES )
-template <class _Tp, class _Sequence = deque<_Tp> >
-# elif defined ( _STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS )
-#  define _STLP_QUEUE_ARGS _Tp
-template <class _Tp>
-# else
-template <class _Tp, class _Sequence>
-# endif
-
-class queue {
-# if defined ( _STLP_QUEUE_ARGS )
-  typedef deque<_Tp> _Sequence;
-# endif
-public:
-  typedef typename _Sequence::value_type      value_type;
-  typedef typename _Sequence::size_type       size_type;
-  typedef          _Sequence                  container_type;
-
-  typedef typename _Sequence::reference       reference;
-  typedef typename _Sequence::const_reference const_reference;
-
-protected:
-  _Sequence c;
-public:
-  queue() : c() {}
-  explicit queue(const _Sequence& __c) : c(__c) {}
-
-  bool empty() const { return c.empty(); }
-  size_type size() const { return c.size(); }
-  reference front() { return c.front(); }
-  const_reference front() const { return c.front(); }
-  reference back() { return c.back(); }
-  const_reference back() const { return c.back(); }
-  void push(const value_type& __x) { c.push_back(__x); }
-  void pop() { c.pop_front(); }
-  const _Sequence& _Get_c() const { return c; }
-};
-
-# ifndef _STLP_QUEUE_ARGS
-#  define _STLP_QUEUE_ARGS _Tp, _Sequence
-#  define _STLP_QUEUE_HEADER_ARGS class _Tp, class _Sequence
-# else
-#  define _STLP_QUEUE_HEADER_ARGS class _Tp
-# endif
-
-template < _STLP_QUEUE_HEADER_ARGS >
-inline bool _STLP_CALL 
-operator==(const queue<_STLP_QUEUE_ARGS >& __x, const queue<_STLP_QUEUE_ARGS >& __y)
-{
-  return __x._Get_c() == __y._Get_c();
-}
-
-template < _STLP_QUEUE_HEADER_ARGS >
-inline bool _STLP_CALL
-operator<(const queue<_STLP_QUEUE_ARGS >& __x, const queue<_STLP_QUEUE_ARGS >& __y)
-{
-  return __x._Get_c() < __y._Get_c();
-}
-
-_STLP_RELOPS_OPERATORS( template < _STLP_QUEUE_HEADER_ARGS >, queue<_STLP_QUEUE_ARGS > )
-
-# if !(defined ( _STLP_LIMITED_DEFAULT_TEMPLATES ) || defined ( _STLP_TEMPLATE_PARAM_SUBTYPE_BUG ))
-template <class _Tp, class _Sequence = vector<_Tp>, 
-          class _Compare = less<_STLP_HEADER_TYPENAME _Sequence::value_type> >
-# elif defined ( _STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS )
-template <class _Tp>
-# else
-template <class _Tp, class _Sequence, class _Compare>
-# endif
-class  priority_queue {
-# ifdef _STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS
-  typedef vector<_Tp> _Sequence;
-  typedef less< typename vector<_Tp>::value_type> _Compare; 
-# endif
-public:
-  typedef typename _Sequence::value_type      value_type;
-  typedef typename _Sequence::size_type       size_type;
-  typedef          _Sequence                  container_type;
-
-  typedef typename _Sequence::reference       reference;
-  typedef typename _Sequence::const_reference const_reference;
-protected:
-  _Sequence c;
-  _Compare comp;
-public:
-  priority_queue() : c() {}
-  explicit priority_queue(const _Compare& __x) :  c(), comp(__x) {}
-  priority_queue(const _Compare& __x, const _Sequence& __s) 
-    : c(__s), comp(__x)
-    { make_heap(c.begin(), c.end(), comp); }
-
-#ifdef _STLP_MEMBER_TEMPLATES
-  template <class _InputIterator>
-  priority_queue(_InputIterator __first, _InputIterator __last) 
-    : c(__first, __last) { make_heap(c.begin(), c.end(), comp); }
-
-  template <class _InputIterator>
-  priority_queue(_InputIterator __first, 
-                 _InputIterator __last, const _Compare& __x)
-    : c(__first, __last), comp(__x)
-    { make_heap(c.begin(), c.end(), comp); }
-
-  template <class _InputIterator>
-  priority_queue(_InputIterator __first, _InputIterator __last,
-                 const _Compare& __x, const _Sequence& __s)
-  : c(__s), comp(__x)
-  { 
-    c.insert(c.end(), __first, __last);
-    make_heap(c.begin(), c.end(), comp);
-  }
-
-#else /* _STLP_MEMBER_TEMPLATES */
-  priority_queue(const value_type* __first, const value_type* __last) 
-    : c(__first, __last) { make_heap(c.begin(), c.end(), comp); }
-
-  priority_queue(const value_type* __first, const value_type* __last, 
-                 const _Compare& __x) 
-    : c(__first, __last), comp(__x)
-    { make_heap(c.begin(), c.end(), comp); }
-
-  priority_queue(const value_type* __first, const value_type* __last, 
-                 const _Compare& __x, const _Sequence& __c)
-    : c(__c), comp(__x)
-  { 
-    c.insert(c.end(), __first, __last);
-    make_heap(c.begin(), c.end(), comp);
-  }
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-  bool empty() const { return c.empty(); }
-  size_type size() const { return c.size(); }
-  const_reference top() const { return c.front(); }
-  void push(const value_type& __x) {
-    _STLP_TRY {
-      c.push_back(__x); 
-      push_heap(c.begin(), c.end(), comp);
-    }
-    _STLP_UNWIND(c.clear());
-  }
-  void pop() {
-    _STLP_TRY {
-      pop_heap(c.begin(), c.end(), comp);
-      c.pop_back();
-    }
-    _STLP_UNWIND(c.clear());
-  }
-};
-
-_STLP_END_NAMESPACE
-
-#  undef _STLP_QUEUE_ARGS
-#  undef _STLP_QUEUE_HEADER_ARGS
-
-#endif /* _STLP_INTERNAL_QUEUE_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_range_errors.h b/src/STLport/stl/_range_errors.h
deleted file mode 100644
index 0f7fa03..0000000
--- a/src/STLport/stl/_range_errors.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- */
-
-#ifndef _STLP_RANGE_ERRORS_H
-#define _STLP_RANGE_ERRORS_H
-
-// A few places in the STL throw range errors, using standard exception
-// classes defined in <stdexcept>.  This header file provides functions
-// to throw those exception objects.
-
-// _STLP_DONT_THROW_RANGE_ERRORS is a hook so that users can disable
-// this exception throwing.
-#if defined(_STLP_CAN_THROW_RANGE_ERRORS) && defined(_STLP_USE_EXCEPTIONS) \
-    && !defined(_STLP_DONT_THROW_RANGE_ERRORS)
-# define _STLP_THROW_RANGE_ERRORS
-#endif
-
-// For the STLport iostreams, only declaration here, definition is in the lib
-
-#if defined ( _STLP_OWN_IOSTREAMS  ) && ! defined (_STLP_EXTERN_RANGE_ERRORS) 
-#  define _STLP_EXTERN_RANGE_ERRORS
-# endif
-
-#if defined (_STLP_EXTERN_RANGE_ERRORS)
-_STLP_BEGIN_NAMESPACE
-void  _STLP_DECLSPEC _STLP_CALL __stl_throw_range_error(const char* __msg);
-void  _STLP_DECLSPEC _STLP_CALL __stl_throw_out_of_range(const char* __msg);
-void  _STLP_DECLSPEC _STLP_CALL __stl_throw_length_error(const char* __msg);
-void  _STLP_DECLSPEC _STLP_CALL __stl_throw_invalid_argument(const char* __msg);
-void  _STLP_DECLSPEC _STLP_CALL __stl_throw_overflow_error(const char* __msg);
-_STLP_END_NAMESPACE
-#else
-
-#if defined(_STLP_THROW_RANGE_ERRORS)
-# ifndef _STLP_STDEXCEPT
-#  include <stdexcept>
-# endif
-# ifndef _STLP_STRING
-#  include <string>
-# endif
-# define _STLP_THROW_MSG(ex,msg)  throw ex(string(msg))
-#else
-# if defined (_STLP_WINCE)
-#  define _STLP_THROW_MSG(ex,msg)  TerminateProcess(GetCurrentProcess(), 0)
-# else
-#  include <cstdlib>
-#  include <cstdio>
-#  define _STLP_THROW_MSG(ex,msg)  puts(msg),_STLP_ABORT()
-# endif
-#endif
-
-// For wrapper mode and throwing range errors, include the
-// stdexcept header and throw the appropriate exceptions directly.
-
-_STLP_BEGIN_NAMESPACE
-inline void _STLP_DECLSPEC _STLP_CALL __stl_throw_range_error(const char* __msg) { 
-  _STLP_THROW_MSG(range_error, __msg); 
-}
-
-inline void _STLP_DECLSPEC _STLP_CALL __stl_throw_out_of_range(const char* __msg) { 
-  _STLP_THROW_MSG(out_of_range, __msg); 
-}
-
-inline void _STLP_DECLSPEC _STLP_CALL __stl_throw_length_error(const char* __msg) { 
-  _STLP_THROW_MSG(length_error, __msg); 
-}
-
-inline void _STLP_DECLSPEC _STLP_CALL __stl_throw_invalid_argument(const char* __msg) { 
-  _STLP_THROW_MSG(invalid_argument, __msg); 
-}
-
-inline void _STLP_DECLSPEC _STLP_CALL __stl_throw_overflow_error(const char* __msg) { 
-  _STLP_THROW_MSG(overflow_error, __msg); 
-}
-_STLP_END_NAMESPACE
-
-# undef _STLP_THROW_MSG
-
-# endif /* EXTERN_RANGE_ERRORS */
-
-
-#endif /* _STLP_RANGE_ERRORS_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_raw_storage_iter.h b/src/STLport/stl/_raw_storage_iter.h
deleted file mode 100644
index 7d253f3..0000000
--- a/src/STLport/stl/_raw_storage_iter.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- * You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_RAW_STORAGE_ITERATOR_H
-#define _STLP_INTERNAL_RAW_STORAGE_ITERATOR_H
-
-#ifndef _STLP_INTERNAL_ITERATOR_BASE_H
-#  include <stl/_iterator_base.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-template <class _ForwardIterator, class _Tp>
-class raw_storage_iterator 
-# ifdef _STLP_HAS_VOID_SPECIALIZATION
-      : public iterator<output_iterator_tag,void,void,void,void>
-# endif
-{
-protected:
-  _ForwardIterator _M_iter;
-public:
-  typedef output_iterator_tag iterator_category;
-# ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION
-  typedef void                value_type;
-  typedef void                difference_type;
-  typedef void                pointer;
-  typedef void                reference;
-# endif
-  explicit raw_storage_iterator(_ForwardIterator __x) : _M_iter(__x) {}
-  raw_storage_iterator<_ForwardIterator, _Tp>& operator*() { return *this; }
-  raw_storage_iterator<_ForwardIterator, _Tp>& operator=(const _Tp& __element) {
-    _Construct(&*_M_iter, __element);
-    return *this;
-  }        
-  raw_storage_iterator<_ForwardIterator, _Tp>& operator++() {
-    ++_M_iter;
-    return *this;
-  }
-  raw_storage_iterator<_ForwardIterator, _Tp> operator++(int) {
-    raw_storage_iterator<_ForwardIterator, _Tp> __tmp = *this;
-    ++_M_iter;
-    return __tmp;
-  }
-};
-
-# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES
-template <class _ForwardIterator, class _Tp>
-inline output_iterator_tag iterator_category(const raw_storage_iterator<_ForwardIterator, _Tp>&) { return output_iterator_tag(); }
-#endif
-_STLP_END_NAMESPACE
-
-#endif /* _STLP_INTERNAL_RAW_STORAGE_ITERATOR_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_relops.h b/src/STLport/stl/_relops.h
deleted file mode 100644
index e186cd3..0000000
--- a/src/STLport/stl/_relops.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Hewlett-Packard Company makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_relops_cont.h b/src/STLport/stl/_relops_cont.h
deleted file mode 100644
index bbbf513..0000000
--- a/src/STLport/stl/_relops_cont.h
+++ /dev/null
@@ -1,29 +0,0 @@
-// This is an implementation file which
-// is intended to be included multiple times with different _STLP_ASSOCIATIVE_CONTAINER
-// setting
-
-#ifndef _STLP_EQUAL_OPERATOR_SPECIALIZED
-_STLP_TEMPLATE_HEADER
-inline bool  _STLP_CALL operator==(const _STLP_TEMPLATE_CONTAINER& __x, 
-                                   const _STLP_TEMPLATE_CONTAINER& __y) {
-  return __x.size() == __y.size() &&
-    equal(__x.begin(), __x.end(), __y.begin());
-}
-#endif /* _STLP_EQUAL_OPERATOR_SPECIALIZED */
-
-_STLP_TEMPLATE_HEADER
-inline bool  _STLP_CALL operator<(const _STLP_TEMPLATE_CONTAINER& __x, 
-                                  const _STLP_TEMPLATE_CONTAINER& __y) {
-  return lexicographical_compare(__x.begin(), __x.end(), 
-				 __y.begin(), __y.end());
-}
-
-_STLP_RELOPS_OPERATORS( _STLP_TEMPLATE_HEADER , _STLP_TEMPLATE_CONTAINER )
-    
-#ifdef _STLP_FUNCTION_TMPL_PARTIAL_ORDER
-_STLP_TEMPLATE_HEADER
-inline void  _STLP_CALL swap(_STLP_TEMPLATE_CONTAINER& __x, 
-                             _STLP_TEMPLATE_CONTAINER& __y) {
-  __x.swap(__y);
-}
-#endif /* _STLP_FUNCTION_TMPL_PARTIAL_ORDER */
diff --git a/src/STLport/stl/_relops_hash_cont.h b/src/STLport/stl/_relops_hash_cont.h
deleted file mode 100644
index 8739567..0000000
--- a/src/STLport/stl/_relops_hash_cont.h
+++ /dev/null
@@ -1,32 +0,0 @@
-// This is an implementation file which
-// is intended to be included multiple times with different _STLP_ASSOCIATIVE_CONTAINER
-// setting
-
-_STLP_TEMPLATE_HEADER
-inline bool _STLP_CALL 
-operator==(const _STLP_TEMPLATE_CONTAINER& __hm1, const _STLP_TEMPLATE_CONTAINER& __hm2)
-{
-  return _STLP_TEMPLATE_CONTAINER::_M_equal(__hm1, __hm2);
-}
-
-#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE
-
-_STLP_TEMPLATE_HEADER
-inline bool _STLP_CALL 
-operator!=(const _STLP_TEMPLATE_CONTAINER& __hm1, const _STLP_TEMPLATE_CONTAINER& __hm2) {
-  return !(__hm1 == __hm2);
-}
-
-#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */
-
-#ifdef _STLP_FUNCTION_TMPL_PARTIAL_ORDER
-
-_STLP_TEMPLATE_HEADER
-inline void _STLP_CALL 
-swap(_STLP_TEMPLATE_CONTAINER& __hm1, _STLP_TEMPLATE_CONTAINER& __hm2)
-{
-  __hm1.swap(__hm2);
-}
-
-#endif /* _STLP_FUNCTION_TMPL_PARTIAL_ORDER */
-
diff --git a/src/STLport/stl/_relops_template.h b/src/STLport/stl/_relops_template.h
deleted file mode 100644
index 8b13789..0000000
--- a/src/STLport/stl/_relops_template.h
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/src/STLport/stl/_rope.c b/src/STLport/stl/_rope.c
deleted file mode 100644
index 1820e7c..0000000
--- a/src/STLport/stl/_rope.c
+++ /dev/null
@@ -1,1540 +0,0 @@
-/*
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-// Set buf_start, buf_end, and buf_ptr appropriately, filling tmp_buf
-// if necessary.  Assumes path_end[leaf_index] and leaf_pos are correct.
-// Results in a valid buf_ptr if the iterator can be legitimately
-// dereferenced.
-# ifndef _STLP_ROPEIMPL_H
-# define _STLP_ROPEIMPL_H
-
-#ifndef _STLP_INTERNAL_ROPE_H
-# include <stl/_rope.h>
-#endif
-
-# ifndef _STLP_CSTDIO
-#  include <cstdio>
-# endif
-
-#ifndef _STLP_IOSTREAM
-# include <iostream>
-#endif
-
-# include <stl/_range_errors.h>
-
-_STLP_BEGIN_NAMESPACE
-
-# if defined ( _STLP_NESTED_TYPE_PARAM_BUG )
-# define __allocator__ _Alloc
-# else
-# define __allocator__ allocator_type
-# endif
-
-template<class _CharT, class _Alloc>
-_Rope_iterator<_CharT, _Alloc>::_Rope_iterator(rope<_CharT,_Alloc>* __r, size_t __pos)
-  : _Rope_iterator_base<_CharT,_Alloc>(__r->_M_tree_ptr._M_data, __pos),
-  _M_root_rope(__r) { _RopeRep::_S_ref(this->_M_root); }
-
-template<class _CharT, class _Alloc>
-_Rope_iterator<_CharT, _Alloc>::_Rope_iterator(rope<_CharT,_Alloc>& __r, size_t __pos): 
-  _Rope_iterator_base<_CharT,_Alloc>(__r._M_tree_ptr._M_data, __pos), 
-  _M_root_rope(&__r) {
-  _RopeRep::_S_ref(this->_M_root); if (!(__r.empty()))_S_setcache(*this);
-}
-
-template<class _CharT, class _Alloc>
-void 
-_Rope_RopeRep<_CharT, _Alloc>::_M_free_c_string()
-{
-  _CharT* __cstr = _M_c_string;
-  if (0 != __cstr) {
-    size_t _p_size = _M_size._M_data + 1;
-    _STLP_STD::_Destroy(__cstr, __cstr + _p_size);
-    _M_size.deallocate(__cstr, _p_size);
-  }
-}
-
-
-// Set buf_start, buf_end, and buf_ptr appropriately, filling tmp_buf
-// if necessary.  Assumes _M_path_end[leaf_index] and leaf_pos are correct.
-// Results in a valid buf_ptr if the iterator can be legitimately
-// dereferenced.
-template <class _CharT, class _Alloc>
-void _Rope_iterator_base<_CharT,_Alloc>::_S_setbuf( 
-  _Rope_iterator_base<_CharT,_Alloc>& __x)
-{
-    const _RopeRep* __leaf = __x._M_path_end[__x._M_leaf_index];
-    size_t __leaf_pos = __x._M_leaf_pos;
-    size_t __pos = __x._M_current_pos;
-
-    switch(__leaf->_M_tag) {
-	case _RopeRep::_S_leaf:
-	    __x._M_buf_start = 
-	      ((_Rope_RopeLeaf<_CharT,_Alloc>*)__leaf)->_M_data;
-	    __x._M_buf_ptr = __x._M_buf_start + (__pos - __leaf_pos);
-	    __x._M_buf_end = __x._M_buf_start + __leaf->_M_size._M_data;
-	    break;
-	case _RopeRep::_S_function:
-	case _RopeRep::_S_substringfn:
-	    {
-		size_t __len = _S_iterator_buf_len;
-		size_t __buf_start_pos = __leaf_pos;
-		size_t __leaf_end = __leaf_pos + __leaf->_M_size._M_data;
-		char_producer<_CharT>* __fn =
-			((_Rope_RopeFunction<_CharT,_Alloc>*)__leaf)->_M_fn;
-
-		if (__buf_start_pos + __len <= __pos) {
-		    __buf_start_pos = __pos - __len/4;
-		    if (__buf_start_pos + __len > __leaf_end) {
-			__buf_start_pos = __leaf_end - __len;
-		    }
-		}
-		if (__buf_start_pos + __len > __leaf_end) {
-		    __len = __leaf_end - __buf_start_pos;
-		}
-		(*__fn)(__buf_start_pos - __leaf_pos, __len, __x._M_tmp_buf);
-		__x._M_buf_ptr = __x._M_tmp_buf + (__pos - __buf_start_pos);
-		__x._M_buf_start = __x._M_tmp_buf;
-		__x._M_buf_end = __x._M_tmp_buf + __len;
-	    }
-	    break;
-	default:
-      _STLP_ASSERT(0)
-        ;
-    }
-}
-
-// Set path and buffer inside a rope iterator.  We assume that 
-// pos and root are already set.
-template <class _CharT, class _Alloc>
-void _Rope_iterator_base<_CharT,_Alloc>::_S_setcache
-(_Rope_iterator_base<_CharT,_Alloc>& __x)
-{
-    const _RopeRep* __path[_RopeRep::_S_max_rope_depth+1];
-    const _RopeRep* __curr_rope;
-    int __curr_depth = -1;  /* index into path    */
-    size_t __curr_start_pos = 0;
-    size_t __pos = __x._M_current_pos;
-    unsigned char __dirns = 0; // Bit vector marking right turns in the path
-
-    _STLP_ASSERT(__pos <= __x._M_root->_M_size._M_data)
-    if (__pos >= __x._M_root->_M_size._M_data) {
-	__x._M_buf_ptr = 0;
-	return;
-    }
-    __curr_rope = __x._M_root;
-    if (0 != __curr_rope->_M_c_string) {
-	/* Treat the root as a leaf. */
-	__x._M_buf_start = __curr_rope->_M_c_string;
-	__x._M_buf_end = __curr_rope->_M_c_string + __curr_rope->_M_size._M_data;
-	__x._M_buf_ptr = __curr_rope->_M_c_string + __pos;
-	__x._M_path_end[0] = __curr_rope;
-	__x._M_leaf_index = 0;
-	__x._M_leaf_pos = 0;
-	return;
-    }
-    for(;;) {
-	++__curr_depth;
-	_STLP_ASSERT(__curr_depth <= _RopeRep::_S_max_rope_depth)
-	__path[__curr_depth] = __curr_rope;
-	switch(__curr_rope->_M_tag) {
-	  case _RopeRep::_S_leaf:
-	  case _RopeRep::_S_function:
-	  case _RopeRep::_S_substringfn:
-	    __x._M_leaf_pos = __curr_start_pos;
-	    goto done;
-	  case _RopeRep::_S_concat:
-	    {
-		_Rope_RopeConcatenation<_CharT,_Alloc>* __c =
-			(_Rope_RopeConcatenation<_CharT,_Alloc>*)__curr_rope;
-		_RopeRep* __left = __c->_M_left;
-		size_t __left_len = __left->_M_size._M_data;
-		
-		__dirns <<= 1;
-		if (__pos >= __curr_start_pos + __left_len) {
-		    __dirns |= 1;
-		    __curr_rope = __c->_M_right;
-		    __curr_start_pos += __left_len;
-		} else {
-		    __curr_rope = __left;
-		}
-	    }
-	    break;
-	}
-    }
-  done:
-    // Copy last section of path into _M_path_end.
-      {
-	int __i = -1;
-	int __j = __curr_depth + 1 - _S_path_cache_len;
-
-	if (__j < 0) __j = 0;
-	while (__j <= __curr_depth) {
-	    __x._M_path_end[++__i] = __path[__j++];
-	}
-	__x._M_leaf_index = __i;
-      }
-      __x._M_path_directions = __dirns;
-      _S_setbuf(__x);
-}
-
-// Specialized version of the above.  Assumes that
-// the path cache is valid for the previous position.
-template <class _CharT, class _Alloc>
-void _Rope_iterator_base<_CharT,_Alloc>::_S_setcache_for_incr
-(_Rope_iterator_base<_CharT,_Alloc>& __x)
-{
-    int __current_index = __x._M_leaf_index;
-    const _RopeRep* __current_node = __x._M_path_end[__current_index];
-    size_t __len = __current_node->_M_size._M_data;
-    size_t __node_start_pos = __x._M_leaf_pos;
-    unsigned char __dirns = __x._M_path_directions;
-    _Rope_RopeConcatenation<_CharT,_Alloc>* __c;
-
-    _STLP_ASSERT(__x._M_current_pos <= __x._M_root->_M_size._M_data)
-    if (__x._M_current_pos - __node_start_pos < __len) {
-	/* More stuff in this leaf, we just didn't cache it. */
-	_S_setbuf(__x);
-	return;
-    }
-    _STLP_ASSERT(__node_start_pos + __len == __x._M_current_pos)
-    //  node_start_pos is starting position of last_node.
-    while (--__current_index >= 0) {
-	if (!(__dirns & 1) /* Path turned left */) 
-	  break;
-	__current_node = __x._M_path_end[__current_index];
-	__c = (_Rope_RopeConcatenation<_CharT,_Alloc>*)__current_node;
-	// Otherwise we were in the right child.  Thus we should pop
-	// the concatenation node.
-	__node_start_pos -= __c->_M_left->_M_size._M_data;
-	__dirns >>= 1;
-    }
-    if (__current_index < 0) {
-	// We underflowed the cache. Punt.
-	_S_setcache(__x);
-	return;
-    }
-    __current_node = __x._M_path_end[__current_index];
-    __c = (_Rope_RopeConcatenation<_CharT,_Alloc>*)__current_node;
-    // current_node is a concatenation node.  We are positioned on the first
-    // character in its right child.
-    // node_start_pos is starting position of current_node.
-    __node_start_pos += __c->_M_left->_M_size._M_data;
-    __current_node = __c->_M_right;
-    __x._M_path_end[++__current_index] = __current_node;
-    __dirns |= 1;
-    while (_RopeRep::_S_concat == __current_node->_M_tag) {
-	++__current_index;
-	if (_S_path_cache_len == __current_index) {
-	    int __i;
-	    for (__i = 0; __i < _S_path_cache_len-1; __i++) {
-		__x._M_path_end[__i] = __x._M_path_end[__i+1];
-	    }
-	    --__current_index;
-	}
-	__current_node =
-	    ((_Rope_RopeConcatenation<_CharT,_Alloc>*)__current_node)->_M_left;
-	__x._M_path_end[__current_index] = __current_node;
-	__dirns <<= 1;
-	// node_start_pos is unchanged.
-    }
-    __x._M_leaf_index = __current_index;
-    __x._M_leaf_pos = __node_start_pos;
-    __x._M_path_directions = __dirns;
-    _S_setbuf(__x);
-}
-
-template <class _CharT, class _Alloc>
-void _Rope_iterator_base<_CharT,_Alloc>::_M_incr(size_t __n) {
-    _M_current_pos += __n;
-    if (0 != _M_buf_ptr) {
-        size_t __chars_left = _M_buf_end - _M_buf_ptr;
-        if (__chars_left > __n) {
-            _M_buf_ptr += __n;
-        } else if (__chars_left == __n) {
-            _M_buf_ptr += __n;
-            _S_setcache_for_incr(*this);
-        } else {
-            _M_buf_ptr = 0;
-        }
-    }
-}
-
-template <class _CharT, class _Alloc>
-void _Rope_iterator_base<_CharT,_Alloc>::_M_decr(size_t __n) {
-    if (0 != _M_buf_ptr) {
-        size_t __chars_left = _M_buf_ptr - _M_buf_start;
-        if (__chars_left >= __n) {
-            _M_buf_ptr -= __n;
-        } else {
-            _M_buf_ptr = 0;
-        }
-    }
-    _M_current_pos -= __n;
-}
-
-template <class _CharT, class _Alloc>
-void _Rope_iterator<_CharT,_Alloc>::_M_check() {
-    if (_M_root_rope->_M_tree_ptr._M_data != this->_M_root) {
-        // _Rope was modified.  Get things fixed up.
-        _RopeRep::_S_unref(this->_M_root);
-        this->_M_root = _M_root_rope->_M_tree_ptr._M_data;
-        _RopeRep::_S_ref(this->_M_root);
-        this->_M_buf_ptr = 0;
-    }
-}
-
-# ifndef _GC
-//  There are several reasons for not doing this with virtual destructors
-//  and a class specific delete operator:
-//  - A class specific delete operator can't easily get access to
-//    allocator instances if we need them.
-//  - Any virtual function would need a 4 or byte vtable pointer;
-//    this only requires a one byte tag per object.
-template <class _CharT, class _Alloc>
-void _Rope_RopeRep<_CharT,_Alloc>::_M_free_tree()
-{
-    switch(_M_tag) {
-	case _S_leaf:
-	    {
-	      typedef _Rope_RopeLeaf<_CharT,_Alloc> _Rope_RopeLeaf_T;
-          _Rope_RopeLeaf_T* __l = (_Rope_RopeLeaf_T*)this;
-          _STLP_STD::_Destroy(__l); // ->_Rope_RopeLeaf<_CharT,_Alloc>::~_Rope_RopeLeaf();
-	      _STLP_CREATE_ALLOCATOR(allocator_type,(const allocator_type&)_M_size, _Rope_RopeLeaf_T).deallocate(__l, 1);
-	        break;
-	    }
-	case _S_concat:
-	    {
-               typedef _Rope_RopeConcatenation<_CharT,_Alloc> _Rope_RopeConcatenation_T;
-               _Rope_RopeConcatenation_T* __c  = (_Rope_RopeConcatenation_T*)this;
-               _STLP_STD::_Destroy(__c);
-               _STLP_CREATE_ALLOCATOR(allocator_type,(const allocator_type&)_M_size, 
-                               _Rope_RopeConcatenation_T).deallocate(__c, 1);
-	        break;
-	    }
-	case _S_function:
-	    {
-            typedef _Rope_RopeFunction<_CharT,_Alloc> _Rope_RopeFunctionT;
-              _Rope_RopeFunctionT* __f = (_Rope_RopeFunctionT*)this;
-              _STLP_STD::_Destroy(__f);
-              _STLP_CREATE_ALLOCATOR(allocator_type,(const allocator_type&)_M_size, 
-                                 _Rope_RopeFunctionT).deallocate(__f, 1);
-	        break;
-	    }
-	case _S_substringfn:
-	    {
-            typedef _Rope_RopeSubstring<_CharT,_Alloc> _Rope_RopeSubstring_T;
-              _Rope_RopeSubstring_T* __ss = (_Rope_RopeSubstring_T*)this;
-              _STLP_STD::_Destroy(__ss);
-              _STLP_CREATE_ALLOCATOR(allocator_type,(const allocator_type&)_M_size, 
-                              _Rope_RopeSubstring_T).deallocate(__ss, 1);
-		break;
-	    }
-    }
-}
-#endif
-
-# if defined ( _STLP_NESTED_TYPE_PARAM_BUG )
-#   define __RopeLeaf__ _Rope_RopeLeaf<_CharT,_Alloc>
-#   define __RopeRep__ _Rope_RopeRep<_CharT,_Alloc>
-#   define _RopeLeaf _Rope_RopeLeaf<_CharT,_Alloc>
-#   define _RopeRep _Rope_RopeRep<_CharT,_Alloc>
-#   define size_type size_t
-# else
-#   define __RopeLeaf__ _STLP_TYPENAME_ON_RETURN_TYPE rope<_CharT,_Alloc>::_RopeLeaf
-#   define __RopeRep__ _STLP_TYPENAME_ON_RETURN_TYPE rope<_CharT,_Alloc>::_RopeRep
-# endif
-
-// Concatenate a C string onto a leaf rope by copying the rope data.
-// Used for short ropes.
-template <class _CharT, class _Alloc>
-__RopeLeaf__*
-rope<_CharT,_Alloc>::_S_leaf_concat_char_iter
-		(_RopeLeaf* __r, const _CharT* __iter, size_t __len)
-{
-    size_t __old_len = __r->_M_size._M_data;
-    _CharT* __new_data = __r->_M_size.allocate(_S_rounded_up_size(__old_len + __len));
-    _RopeLeaf* __result;
-    
-    uninitialized_copy_n(__r->_M_data, __old_len, __new_data);
-    uninitialized_copy_n(__iter, __len, __new_data + __old_len);
-    _S_cond_store_eos(__new_data[__old_len + __len]);
-    _STLP_TRY {
-	__result = _S_new_RopeLeaf(__new_data, __old_len + __len,
-				   __r->get_allocator());
-    }
-    _STLP_UNWIND(_RopeRep::_S_free_string(__new_data, __old_len + __len,
-					     __r->get_allocator()));
-    return __result;
-}
-
-#ifndef __GC
-// As above, but it's OK to clobber original if refcount is 1
-template <class _CharT, class _Alloc>
-__RopeLeaf__*
-rope<_CharT,_Alloc>::_S_destr_leaf_concat_char_iter
-		(_RopeLeaf* __r, const _CharT* __iter, size_t __len)
-{
-    _STLP_ASSERT(__r->_M_ref_count >= 1)
-    if (__r->_M_ref_count > 1)
-      return _S_leaf_concat_char_iter(__r, __iter, __len);
-    size_t __old_len = __r->_M_size._M_data;
-    if (_S_allocated_capacity(__old_len) >= __old_len + __len) {
-	// The space has been partially initialized for the standard
-	// character types.  But that doesn't matter for those types.
-	uninitialized_copy_n(__iter, __len, __r->_M_data + __old_len);
-	if (_S_is_basic_char_type((_CharT*)0)) {
-	    _S_cond_store_eos(__r->_M_data[__old_len + __len]);
-	    _STLP_ASSERT(__r->_M_c_string == __r->_M_data)
-	} else if (__r->_M_c_string != __r->_M_data && 0 != __r->_M_c_string) {
-	    __r->_M_free_c_string();
-	    __r->_M_c_string = 0;
-	}
-	__r->_M_size._M_data = __old_len + __len;
-	_STLP_ASSERT(__r->_M_ref_count == 1)
-	__r->_M_ref_count = 2;
-	return __r;
-    } else {
-	_RopeLeaf* __result = _S_leaf_concat_char_iter(__r, __iter, __len);
-	_STLP_ASSERT(__result->_M_ref_count == 1)
-	return __result;
-    }
-}
-#endif
-
-// Assumes left and right are not 0.
-// Does not increment (nor decrement on exception) child reference counts.
-// Result has ref count 1.
-template <class _CharT, class _Alloc>
-__RopeRep__*
-rope<_CharT,_Alloc>::_S_tree_concat (_RopeRep* __left, _RopeRep* __right)
-{
-    _RopeConcatenation* __result =
-      _S_new_RopeConcatenation(__left, __right, __left->get_allocator());
-    size_t __depth = __result->_M_depth;
-    
-    _STLP_ASSERT(__left->get_allocator() == __right->get_allocator())
-    if (__depth > 20 && (__result->_M_size._M_data < 1000 ||
-			 __depth > _RopeRep::_S_max_rope_depth)) {
-        _RopeRep* __balanced;
-      
-	_STLP_TRY {
-	   __balanced = _S_balance(__result);
-#          ifndef __GC
-	     if (__result != __balanced) {
-		_STLP_ASSERT(1 == __result->_M_ref_count
-			     && 1 == __balanced->_M_ref_count)
-	     }
-#          endif
-	   __result->_M_unref_nonnil();
-        }
-      _STLP_UNWIND((_STLP_CREATE_ALLOCATOR(allocator_type,(allocator_type&)__left->_M_size,
-                                    _RopeConcatenation).deallocate(__result,1)));
-		// In case of exception, we need to deallocate
-		// otherwise dangling result node.  But caller
-		// still owns its children.  Thus unref is
-		// inappropriate.
-	return __balanced;
-    } else {
-	return __result;
-    }
-}
-
-template <class _CharT, class _Alloc>
-__RopeRep__*
-rope<_CharT,_Alloc>::_S_concat_char_iter
-		(_RopeRep* __r, const _CharT*__s, size_t __slen)
-{
-    _RopeRep* __result;
-    if (0 == __slen) {
-	_S_ref(__r);
-	return __r;
-    }
-    if (0 == __r)
-      return _STLP_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen,
-					      /* __r->get_allocator()*/ allocator_type() );
-    if (_RopeRep::_S_leaf == __r->_M_tag && 
-          __r->_M_size._M_data + __slen <= _S_copy_max) {
-	__result = _S_leaf_concat_char_iter((_RopeLeaf*)__r, __s, __slen);
-#       ifndef __GC
-	  _STLP_ASSERT(1 == __result->_M_ref_count)
-#       endif
-	return __result;
-    }
-    if (_RopeRep::_S_concat == __r->_M_tag
-	&& _RopeRep::_S_leaf == ((_RopeConcatenation*)__r)->_M_right->_M_tag) {
-	_RopeLeaf* __right = 
-	  (_RopeLeaf* )(((_RopeConcatenation* )__r)->_M_right);
-	if (__right->_M_size._M_data + __slen <= _S_copy_max) {
-	  _RopeRep* __left = ((_RopeConcatenation*)__r)->_M_left;
-	  _RopeRep* __nright = 
-	    _S_leaf_concat_char_iter((_RopeLeaf*)__right, __s, __slen);
-	  __left->_M_ref_nonnil();
-	  _STLP_TRY {
-	    __result = _S_tree_concat(__left, __nright);
-          }
-	  _STLP_UNWIND(_S_unref(__left); _S_unref(__nright));
-#         ifndef __GC
-	    _STLP_ASSERT(1 == __result->_M_ref_count)
-#         endif
-	  return __result;
-	}
-    }
-    _RopeRep* __nright =
-      _STLP_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen, __r->get_allocator());
-    _STLP_TRY {
-      __r->_M_ref_nonnil();
-      __result = _S_tree_concat(__r, __nright);
-    }
-    _STLP_UNWIND(_S_unref(__r); _S_unref(__nright));
-#   ifndef __GC
-      _STLP_ASSERT(1 == __result->_M_ref_count)
-#   endif
-    return __result;
-}
-
-#ifndef __GC
-template <class _CharT, class _Alloc>
-__RopeRep__* 
-rope<_CharT,_Alloc>::_S_destr_concat_char_iter(
-  _RopeRep* __r, const _CharT* __s, size_t __slen)
-{
-    _RopeRep* __result;
-    if (0 == __r)
-      return _STLP_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen,
-					      /* __r-> */allocator_type());
-    size_t __count = __r->_M_ref_count;
-    size_t __orig_size = __r->_M_size._M_data;
-    _STLP_ASSERT(__count >= 1)
-    if (__count > 1) return _S_concat_char_iter(__r, __s, __slen);
-    if (0 == __slen) {
-	__r->_M_ref_count = 2;      // One more than before
-	return __r;
-    }
-    if (__orig_size + __slen <= _S_copy_max && 
-          _RopeRep::_S_leaf == __r->_M_tag) {
-	__result = _S_destr_leaf_concat_char_iter((_RopeLeaf*)__r, __s, __slen);
-	return __result;
-    }
-    if (_RopeRep::_S_concat == __r->_M_tag) {
-	_RopeLeaf* __right = (_RopeLeaf*)(((_RopeConcatenation*)__r)->_M_right);
-	if (_RopeRep::_S_leaf == __right->_M_tag
-	    && __right->_M_size._M_data + __slen <= _S_copy_max) {
-	  _RopeRep* __new_right = 
-	    _S_destr_leaf_concat_char_iter(__right, __s, __slen);
-	  if (__right == __new_right) {
-	      _STLP_ASSERT(__new_right->_M_ref_count == 2)
-	      __new_right->_M_ref_count = 1;
-	  } else {
-	      _STLP_ASSERT(__new_right->_M_ref_count >= 1)
-	      __right->_M_unref_nonnil();
-	  }
-	  _STLP_ASSERT(__r->_M_ref_count == 1)
-	  __r->_M_ref_count = 2;    // One more than before.
-      ((_RopeConcatenation*)__r)->_M_right = __new_right;
-      // E.Musser : moved below
-      //	  __r->_M_size._M_data = __orig_size + __slen;
-	  if (0 != __r->_M_c_string) {
-	      __r->_M_free_c_string();
-	      __r->_M_c_string = 0;
-	  }
-	  __r->_M_size._M_data = __orig_size + __slen;
-	  return __r;
-	}
-    }
-    _RopeRep* __right =
-      _STLP_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen, __r->get_allocator());
-    __r->_M_ref_nonnil();
-    _STLP_TRY {
-      __result = _S_tree_concat(__r, __right);
-    }
-    _STLP_UNWIND(_S_unref(__r); _S_unref(__right))
-    _STLP_ASSERT(1 == __result->_M_ref_count)
-    return __result;
-}
-#endif /* !__GC */
-
-template <class _CharT, class _Alloc>
-__RopeRep__*
-rope<_CharT,_Alloc>::_S_concat_rep(_RopeRep* __left, _RopeRep* __right)
-{
-    if (0 == __left) {
-	_S_ref(__right);
-	return __right;
-    }
-    if (0 == __right) {
-	__left->_M_ref_nonnil();
-	return __left;
-    }
-    if (_RopeRep::_S_leaf == __right->_M_tag) {
-	if (_RopeRep::_S_leaf == __left->_M_tag) {
-	  if (__right->_M_size._M_data + __left->_M_size._M_data <= _S_copy_max) {
-	    return _S_leaf_concat_char_iter((_RopeLeaf*)__left,
-					 ((_RopeLeaf*)__right)->_M_data,
-					 __right->_M_size._M_data);
-	  }
-	} else if (_RopeRep::_S_concat == __left->_M_tag
-		   && _RopeRep::_S_leaf ==
-		      ((_RopeConcatenation*)__left)->_M_right->_M_tag) {
-	  _RopeLeaf* __leftright =
-		    (_RopeLeaf*)(((_RopeConcatenation*)__left)->_M_right); 
-	  if (__leftright->_M_size._M_data + __right->_M_size._M_data <= _S_copy_max) {
-	    _RopeRep* __leftleft = ((_RopeConcatenation*)__left)->_M_left;
-	    _RopeRep* __rest = _S_leaf_concat_char_iter(__leftright,
-					   ((_RopeLeaf*)__right)->_M_data,
-					   __right->_M_size._M_data);
-	    __leftleft->_M_ref_nonnil();
-	    _STLP_TRY {
-	      return(_S_tree_concat(__leftleft, __rest));
-            }
-	    _STLP_UNWIND(_S_unref(__leftleft); _S_unref(__rest))
-	  }
-	}
-    }
-    __left->_M_ref_nonnil();
-    __right->_M_ref_nonnil();
-    _STLP_TRY {
-      return(_S_tree_concat(__left, __right));
-    }
-    _STLP_UNWIND(_S_unref(__left); _S_unref(__right));
-#ifdef _STLP_THROW_RETURN_BUG
-	return 0;
-#endif
-}
-
-template <class _CharT, class _Alloc>
-__RopeRep__*
-rope<_CharT,_Alloc>::_S_substring(_RopeRep* __base, 
-                               size_t __start, size_t __endp1)
-{
-    if (0 == __base) return 0;
-    size_t __len = __base->_M_size._M_data;
-    size_t __adj_endp1;
-    const size_t __lazy_threshold = 128;
-    
-    if (__endp1 >= __len) {
-	if (0 == __start) {
-	    __base->_M_ref_nonnil();
-	    return __base;
-	} else {
-	    __adj_endp1 = __len;
-	}
-    } else {
-	__adj_endp1 = __endp1;
-    }
-    switch(__base->_M_tag) {
-	case _RopeRep::_S_concat:
-	    {
-		_RopeConcatenation* __c = (_RopeConcatenation*)__base;
-		_RopeRep* __left = __c->_M_left;
-		_RopeRep* __right = __c->_M_right;
-		size_t __left_len = __left->_M_size._M_data;
-		_RopeRep* __result;
-
-		if (__adj_endp1 <= __left_len) {
-		    return _S_substring(__left, __start, __endp1);
-		} else if (__start >= __left_len) {
-		    return _S_substring(__right, __start - __left_len,
-				  __adj_endp1 - __left_len);
-		}
-		_Self_destruct_ptr __left_result(
-		  _S_substring(__left, __start, __left_len));
-		_Self_destruct_ptr __right_result(
-		  _S_substring(__right, 0, __endp1 - __left_len));
-		_STLP_MPWFIX_TRY		//*TY 06/01/2000 - mpw forgets to call dtor on __left_result and __right_result without this try block
-		__result = _S_concat_rep(__left_result, __right_result);
-#               ifndef __GC
-		  _STLP_ASSERT(1 == __result->_M_ref_count)
-#               endif
-		return __result;
-		_STLP_MPWFIX_CATCH		//*TY 06/01/2000 - 
-	    }
-	case _RopeRep::_S_leaf:
-	    {
-		_RopeLeaf* __l = (_RopeLeaf*)__base;
-		_RopeLeaf* __result;
-		size_t __result_len;
-		if (__start >= __adj_endp1) return 0;
-		__result_len = __adj_endp1 - __start;
-		if (__result_len > __lazy_threshold) goto lazy;
-#               ifdef __GC
-		    const _CharT* __section = __l->_M_data + __start;
-		    __result = _S_new_RopeLeaf(__section, __result_len,
-					  __base->get_allocator());
-		    __result->_M_c_string = 0;  // Not eos terminated.
-#               else
-		    // We should sometimes create substring node instead.
-		    __result = _STLP_ROPE_FROM_UNOWNED_CHAR_PTR(
-					__l->_M_data + __start, __result_len,
-					__base->get_allocator());
-#               endif
-		return __result;
-	    }
-	case _RopeRep::_S_substringfn:
-	    // Avoid introducing multiple layers of substring nodes.
-	    {
-		_RopeSubstring* __old = (_RopeSubstring*)__base;
-		size_t __result_len;
-		if (__start >= __adj_endp1) return 0;
-		__result_len = __adj_endp1 - __start;
-		if (__result_len > __lazy_threshold) {
-		    _RopeSubstring* __result =
-			_S_new_RopeSubstring(__old->_M_base,
-					  __start + __old->_M_start,
-					  __adj_endp1 - __start,
-					  __base->get_allocator());
-		    return __result;
-
-		} // *** else fall through: ***
-	    }
-	case _RopeRep::_S_function:
-	    {
-		_RopeFunction* __f = (_RopeFunction*)__base;
-		if (__start >= __adj_endp1) return 0;
-		size_t __result_len = __adj_endp1 - __start;
-
-		if (__result_len > __lazy_threshold) goto lazy;
-		_CharT* __section = __base->_M_size.allocate(_S_rounded_up_size(__result_len));
-		_STLP_TRY {
-		  (*(__f->_M_fn))(__start, __result_len, __section);
-                }
-		_STLP_UNWIND(_RopeRep::_S_free_string(
-	               __section, __result_len, __base->get_allocator()));
-		_S_cond_store_eos(__section[__result_len]);
-		return _S_new_RopeLeaf(__section, __result_len,
-				       __base->get_allocator());
-	    }
-    }
-    /*NOTREACHED*/
-    _STLP_ASSERT(false)
-  lazy:
-    {
-	// Create substring node.
-	return _S_new_RopeSubstring(__base, __start, __adj_endp1 - __start,
-			       __base->get_allocator());
-    }
-}
-
-template<class _CharT>
-class _Rope_flatten_char_consumer : public _Rope_char_consumer<_CharT> {
-    private:
-	_CharT* _M_buf_ptr;
-    public:
-	//  _CharT* _M_buffer;  // XXX not used
-
-	_Rope_flatten_char_consumer(_CharT* __buffer) {
-	    _M_buf_ptr = __buffer;
-	};
-	~_Rope_flatten_char_consumer() {}
-	bool operator() (const _CharT* __leaf, size_t __n) {
-	    uninitialized_copy_n(__leaf, __n, _M_buf_ptr);
-	    _M_buf_ptr += __n;
-	    return true;
-	}
-};
-	    
-template<class _CharT>
-class _Rope_find_char_char_consumer : public _Rope_char_consumer<_CharT> {
-    private:
-	_CharT _M_pattern;
-    public:
-	size_t _M_count;  // Number of nonmatching characters
-	_Rope_find_char_char_consumer(_CharT __p) 
-	  : _M_pattern(__p), _M_count(0) {}
-	~_Rope_find_char_char_consumer() {}
-	bool operator() (const _CharT* __leaf, size_t __n) {
-	    size_t __i;
-	    for (__i = 0; __i < __n; __i++) {
-		if (__leaf[__i] == _M_pattern) {
-		    _M_count += __i; return false;
-		}
-	    }
-	    _M_count += __n; return true;
-	}
-};
-
-#if !defined (_STLP_USE_NO_IOSTREAMS)	    
-#if defined (_STLP_USE_NEW_IOSTREAMS)
-  template<class _CharT, class _Traits>
-  // Here _CharT is both the stream and rope character type.
-#else
- template<class _CharT>
-  // Here _CharT is the rope character type.  Unlike in the
-  // above case, we somewhat handle the case in which it doesn't
-  // match the stream character type, i.e. char.
-#endif
-class _Rope_insert_char_consumer : public _Rope_char_consumer<_CharT> {
-    private:
-#       if defined (_STLP_USE_NEW_IOSTREAMS)
-	  typedef basic_ostream<_CharT,_Traits> _Insert_ostream;
-#	else
- 	typedef ostream _Insert_ostream;
-#	endif
-	_Insert_ostream& _M_o;
-    public:
-	// _CharT* buffer;    // XXX not used
-	_Rope_insert_char_consumer(_Insert_ostream& __writer) 
-	  : _M_o(__writer) {};
-#if defined(__MRC__)||(defined(__SC__) && !defined(__DMC__))		//*TY 05/23/2000 - added support for mpw compiler's trigger function approach to generate vtable
-  ~_Rope_insert_char_consumer();		//*TY 05/23/2000 - 
-#else		//*TY 05/23/2000 - 
-  ~_Rope_insert_char_consumer() {}
-#endif		//*TY 05/23/2000 - 
-		// Caller is presumed to own the ostream
-	bool operator() (const _CharT* __leaf, size_t __n);
-		// Returns true to continue traversal.
-};
-	    
-# if defined ( _STLP_USE_NEW_IOSTREAMS )
-#  if defined(__MRC__)||(defined(__SC__) && !defined(__DMC__))		//*TY 05/23/2000 - added support for mpw compiler's trigger function approach to generate vtable
-  template<class _CharT, class _Traits>
-  _Rope_insert_char_consumer<_CharT, _Traits>::  ~_Rope_insert_char_consumer() {}
-#  endif		//*TY 05/23/2000 - 
-
-  template<class _CharT, class _Traits>
-  bool _Rope_insert_char_consumer<_CharT, _Traits>::operator()
-					(const _CharT* __leaf, size_t __n)
-{
-    size_t __i;
-    //  We assume that formatting is set up correctly for each element.
-    for (__i = 0; __i < __n; __i++) _M_o.put(__leaf[__i]);
-    return true;
-}
-# else
-#  if defined(__MRC__)||(defined(__SC__) && !defined(__DMC__))		//*TY 05/23/2000 - added support for mpw compiler's trigger function approach to generate vtable
-  template<class _CharT>
-  _Rope_insert_char_consumer<_CharT>::  ~_Rope_insert_char_consumer() {}
-#  endif		//*TY 05/23/2000 - 
-
-  template<class _CharT>
-  bool _Rope_insert_char_consumer<_CharT>::operator()
-					(const _CharT* __leaf, size_t __n)
-  {
-    size_t __i;
-    //  We assume that formatting is set up correctly for each element.
-    for (__i = 0; __i < __n; __i++) _M_o << __leaf[__i];
-    return true;
-  }
-
-# if !defined (_STLP_NO_METHOD_SPECIALIZATION)
-_STLP_TEMPLATE_NULL
-inline bool 
-_Rope_insert_char_consumer<char>::operator()
-					(const char* __leaf, size_t __n)
-{
-    size_t __i;
-    for (__i = 0; __i < __n; __i++) _M_o.put(__leaf[__i]);
-    return true;
-}
-
-#endif /* _STLP_METHOD_SPECIALIZATION */
-#endif /* _STLP_USE_NEW_IOSTREAM */
-#endif /* if !defined (_STLP_USE_NO_IOSTREAMS) */
-
-template <class _CharT, class _Alloc>
-bool rope<_CharT, _Alloc>::_S_apply_to_pieces(
-				_Rope_char_consumer<_CharT>& __c,
-				const _RopeRep* __r,
-				size_t __begin, size_t __end)
-{
-    if (0 == __r) return true;
-    switch(__r->_M_tag) {
-	case _RopeRep::_S_concat:
-	    {
-		_RopeConcatenation* __conc = (_RopeConcatenation*)__r;
-		_RopeRep* __left =  __conc->_M_left;
-		size_t __left_len = __left->_M_size._M_data;
-		if (__begin < __left_len) {
-		    size_t __left_end = (min) (__left_len, __end);
-		    if (!_S_apply_to_pieces(__c, __left, __begin, __left_end))
-			return false;
-		}
-		if (__end > __left_len) {
-		    _RopeRep* __right =  __conc->_M_right;
-		    size_t __right_start = (max)(__left_len, __begin);
-		    if (!_S_apply_to_pieces(__c, __right,
-					 __right_start - __left_len,
-					 __end - __left_len)) {
-			return false;
-		    }
-		}
-	    }
-	    return true;
-	case _RopeRep::_S_leaf:
-	    {
-		_RopeLeaf* __l = (_RopeLeaf*)__r;
-		return __c.operator()(__l->_M_data + __begin, __end - __begin);
-	    }
-	case _RopeRep::_S_function:
-	case _RopeRep::_S_substringfn:
-	    {
-		_RopeFunction* __f = (_RopeFunction*)__r;
-		size_t __len = __end - __begin;
-		bool __result;
-		_CharT* __buffer =
-		  (_CharT*)__sgi_alloc::allocate(__len * sizeof(_CharT));
-		_STLP_TRY {
-		  (*(__f->_M_fn))(__begin, __len, __buffer);
-		  __result = __c.operator()(__buffer, __len);
-                  __sgi_alloc::deallocate(__buffer, __len * sizeof(_CharT));
-                }
-		_STLP_UNWIND((__sgi_alloc::deallocate(__buffer,
-						      __len * sizeof(_CharT))))
-		return __result;
-	    }
-	default:
-	    _STLP_ASSERT(false)
-	    /*NOTREACHED*/
-	    return false;
-    }
-}
-
-template <class _CharT> inline bool _Rope_is_simple(_CharT*) { return false; }
-inline bool _Rope_is_simple(char*) { return true; }
-# ifdef _STLP_HAS_WCHAR_T
-inline bool _Rope_is_simple(wchar_t*) { return true; }
-# endif
-
-#if !defined (_STLP_USE_NO_IOSTREAMS)
-#if defined (_STLP_USE_NEW_IOSTREAMS)
-  template<class _CharT, class _Traits>
-  inline void _Rope_fill(basic_ostream<_CharT, _Traits>& __o, size_t __n)
-#else
-inline void _Rope_fill(ostream& __o, size_t __n)
-#endif
-{
-    char __f = __o.fill();
-    size_t __i;
-
-    for (__i = 0; __i < __n; __i++) __o.put(__f);
-}
-    
-#if defined (_STLP_USE_NEW_IOSTREAMS)
-  template<class _CharT, class _Traits, class _Alloc>
-  basic_ostream<_CharT, _Traits>& operator<<
-					(basic_ostream<_CharT, _Traits>& __o,
-					 const rope<_CharT, _Alloc>& __r)
-# else
-template<class _CharT, class _Alloc>
-ostream& operator<< (ostream& __o, const rope<_CharT, _Alloc>& __r)
-#endif
-{
-    size_t __w = __o.width();
-    bool __left = bool(__o.flags() & ios::left);
-    size_t __pad_len;
-    size_t __rope_len = __r.size();
-#   if defined (_STLP_USE_NEW_IOSTREAMS)
-      _Rope_insert_char_consumer<_CharT, _Traits> __c(__o);
-#   else
-    _Rope_insert_char_consumer<_CharT> __c(__o);
-#   endif
-    bool __is_simple = _Rope_is_simple((_CharT*)0);
-    
-    if (__rope_len < __w) {
-	__pad_len = __w - __rope_len;
-    } else {
-	__pad_len = 0;
-    }
-    if (!__is_simple) __o.width(__w/__rope_len);
-    _STLP_TRY {
-      if (__is_simple && !__left && __pad_len > 0) {
-	_Rope_fill(__o, __pad_len);
-      }
-      __r.apply_to_pieces(0, __r.size(), __c);
-      if (__is_simple && __left && __pad_len > 0) {
-	_Rope_fill(__o, __pad_len);
-      }
-      if (!__is_simple)
-        __o.width(__w);
-    }
-    _STLP_UNWIND(if (!__is_simple) __o.width(__w))
-    return __o;
-}
-
-#endif /* NO_IOSTREAMS */
-
-template <class _CharT, class _Alloc>
-_CharT*
-rope<_CharT,_Alloc>::_S_flatten(_RopeRep* __r,
-				 size_t __start, size_t __len,
-				 _CharT* __buffer)
-{
-    _Rope_flatten_char_consumer<_CharT> __c(__buffer);
-    _S_apply_to_pieces(__c, __r, __start, __start + __len);
-    return(__buffer + __len);
-}
-
-template <class _CharT, class _Alloc>
-size_t
-rope<_CharT,_Alloc>::find(_CharT __pattern, size_t __start) const
-{
-    _Rope_find_char_char_consumer<_CharT> __c(__pattern);
-    _S_apply_to_pieces(__c, _M_tree_ptr._M_data, __start, size());
-    size_type __result_pos = __start + __c._M_count;
-#   ifndef _STLP_OLD_ROPE_SEMANTICS
-	if (__result_pos == size()) __result_pos = npos;
-#   endif
-    return __result_pos;
-}
-
-template <class _CharT, class _Alloc>
-_CharT*
-rope<_CharT,_Alloc>::_S_flatten(_Rope_RopeRep<_CharT, _Alloc>* __r, _CharT* __buffer)
-{
-    if (0 == __r) return __buffer;
-    switch(__r->_M_tag) {
-	case _RopeRep::_S_concat:
-	    {
-		_RopeConcatenation* __c = (_RopeConcatenation*)__r;
-		_RopeRep* __left = __c->_M_left;
-		_RopeRep* __right = __c->_M_right;
-		_CharT* __rest = _S_flatten(__left, __buffer);
-		return _S_flatten(__right, __rest);
-	    }
-	case _RopeRep::_S_leaf:
-	    {
-		_RopeLeaf* __l = (_RopeLeaf*)__r;
-		return copy_n(__l->_M_data, __l->_M_size._M_data, __buffer).second;
-	    }
-	case _RopeRep::_S_function:
-	case _RopeRep::_S_substringfn:
-	    // We dont yet do anything with substring nodes.
-	    // This needs to be fixed before ropefiles will work well.
-	    {
-		_RopeFunction* __f = (_RopeFunction*)__r;
-		(*(__f->_M_fn))(0, __f->_M_size._M_data, __buffer);
-		return __buffer + __f->_M_size._M_data;
-	    }
-	default:
-	    _STLP_ASSERT(false)
-	    /*NOTREACHED*/
-	    return 0;
-    }
-}
-
-
-// This needs work for _CharT != char
-template <class _CharT, class _Alloc>
-void
-rope<_CharT,_Alloc>::_S_dump(_RopeRep* __r, int __indent)
-{
-    for (int __i = 0; __i < __indent; __i++) putchar(' ');
-    if (0 == __r) {
-      printf("NULL\n"); return;
-    }
-    if (_RopeRep::_S_concat == __r->_M_tag) {
-	_RopeConcatenation* __c = (_RopeConcatenation*)__r;
-	_RopeRep* __left = __c->_M_left;
-	_RopeRep* __right = __c->_M_right;
-
-#       ifdef __GC
-	  printf("Concatenation %p (depth = %d, len = %ld, %s balanced)\n",
-	    __r, __r->_M_depth, __r->_M_size._M_data, __r->_M_is_balanced? "" : "not");
-#       else
-	  printf("Concatenation %p (rc = %ld, depth = %d, "
-	           "len = %ld, %s balanced)\n",
-		 __r, __r->_M_ref_count, __r->_M_depth, __r->_M_size._M_data,
-		 __r->_M_is_balanced? "" : "not");
-#       endif
-	_S_dump(__left, __indent + 2);
-	_S_dump(__right, __indent + 2);
-	return;
-    } else {
-	const char* __kind;
-
-	switch (__r->_M_tag) {
-	    case _RopeRep::_S_leaf:
-		__kind = "Leaf";
-		break;
-	    case _RopeRep::_S_function:
-		__kind = "Function";
-		break;
-	    case _RopeRep::_S_substringfn:
-		__kind = "Function representing substring";
-		break;
-	    default:
-		__kind = "(corrupted kind field!)";
-	}
-#       ifdef __GC
-	  printf("%s %p (depth = %d, len = %ld) ",
-		 __kind, __r, __r->_M_depth, __r->_M_size._M_data);
-#       else
-	  printf("%s %p (rc = %ld, depth = %d, len = %ld) ",
-		 __kind, __r, __r->_M_ref_count, __r->_M_depth, __r->_M_size._M_data);
-#       endif
-	if (_S_is_one_byte_char_type((_CharT*)0)) {
-	    const int __max_len = 40;
-	    _Self_destruct_ptr __prefix(_S_substring(__r, 0, __max_len));
-	    _CharT __buffer[__max_len + 1];
-	    bool __too_big = __r->_M_size._M_data > __prefix->_M_size._M_data;
-
-	    _S_flatten(__prefix, __buffer);
-	    __buffer[__prefix->_M_size._M_data] = _S_eos((_CharT*)0); 
-	    printf("%s%s\n", 
-	           (char*)__buffer, __too_big? "...\n" : "\n");
-	} else {
-	    printf("\n");
-	}
-    }
-}
-
-# define __ROPE_TABLE_BODY  = { \
-/* 0 */1, /* 1 */2, /* 2 */3, /* 3 */5, /* 4 */8, /* 5 */13, /* 6 */21,         \
-/* 7 */34, /* 8 */55, /* 9 */89, /* 10 */144, /* 11 */233, /* 12 */377,         \
-/* 13 */610, /* 14 */987, /* 15 */1597, /* 16 */2584, /* 17 */4181,             \
-/* 18 */6765ul, /* 19 */10946ul, /* 20 */17711ul, /* 21 */28657ul, /* 22 */46368ul,   \
-/* 23 */75025ul, /* 24 */121393ul, /* 25 */196418ul, /* 26 */317811ul,                \
-/* 27 */514229ul, /* 28 */832040ul, /* 29 */1346269ul, /* 30 */2178309ul,             \
-/* 31 */3524578ul, /* 32 */5702887ul, /* 33 */9227465ul, /* 34 */14930352ul,          \
-/* 35 */24157817ul, /* 36 */39088169ul, /* 37 */63245986ul, /* 38 */102334155ul,      \
-/* 39 */165580141ul, /* 40 */267914296ul, /* 41 */433494437ul,                        \
-/* 42 */701408733ul, /* 43 */1134903170ul, /* 44 */1836311903ul,                      \
-/* 45 */2971215073ul }
-
-# if ( _STLP_STATIC_TEMPLATE_DATA > 0 )
-template <class _CharT, class _Alloc>
-const unsigned long
-rope<_CharT,_Alloc>::_S_min_len[__ROPE_DEPTH_SIZE] __ROPE_TABLE_BODY ;
-# else 
-__DECLARE_INSTANCE(const unsigned long, 
-                   crope::_S_min_len[__ROPE_DEPTH_SIZE],
-                   __ROPE_TABLE_BODY);
-#  ifndef _STLP_NO_WCHAR_T
-__DECLARE_INSTANCE(const unsigned long, 
-                   wrope::_S_min_len[__ROPE_DEPTH_SIZE],
-                   __ROPE_TABLE_BODY);
-#  endif
-# endif
-# undef __ROPE_DEPTH_SIZE
-# undef __ROPE_MAX_DEPTH
-# undef __ROPE_TABLE_BODY
-
-// These are Fibonacci numbers < 2**32.
-
-template <class _CharT, class _Alloc>
-__RopeRep__*
-rope<_CharT,_Alloc>::_S_balance(_RopeRep* __r)
-{
-    _RopeRep* __forest[_RopeRep::_S_max_rope_depth + 1];
-    _RopeRep* __result = 0;
-    int __i;
-    // Invariant:
-    // The concatenation of forest in descending order is equal to __r.
-    // __forest[__i]._M_size._M_data >= _S_min_len[__i]
-    // __forest[__i]._M_depth = __i
-    // References from forest are included in refcount.
-
-    for (__i = 0; __i <= _RopeRep::_S_max_rope_depth; ++__i) 
-      __forest[__i] = 0;
-    _STLP_TRY {
-      _S_add_to_forest(__r, __forest);
-      for (__i = 0; __i <= _RopeRep::_S_max_rope_depth; ++__i) 
-        if (0 != __forest[__i]) {
-#	ifndef __GC
-	  _Self_destruct_ptr __old(__result);
-#	endif
-	  __result = _S_concat_rep(__forest[__i], __result);
-	__forest[__i]->_M_unref_nonnil();
-#	if !defined(__GC) && defined(_STLP_USE_EXCEPTIONS)
-	  __forest[__i] = 0;
-#	endif
-      }
-    }
-    _STLP_UNWIND(for(__i = 0; __i <= _RopeRep::_S_max_rope_depth; __i++)
-		 _S_unref(__forest[__i]))
-    if (__result->_M_depth > _RopeRep::_S_max_rope_depth) {
-	__stl_throw_range_error("rope too long");
-    }
-    return(__result);
-}
-
-
-template <class _CharT, class _Alloc>
-void
-rope<_CharT,_Alloc>::_S_add_to_forest(_RopeRep* __r, _RopeRep** __forest)
-{
-    if (__r -> _M_is_balanced) {
-	_S_add_leaf_to_forest(__r, __forest);
-	return;
-    }
-    _STLP_ASSERT(__r->_M_tag == _RopeRep::_S_concat)
-    {
-	_RopeConcatenation* __c = (_RopeConcatenation*)__r;
-
-	_S_add_to_forest(__c->_M_left, __forest);
-	_S_add_to_forest(__c->_M_right, __forest);
-    }
-}
-
-
-template <class _CharT, class _Alloc>
-void
-rope<_CharT,_Alloc>::_S_add_leaf_to_forest(_RopeRep* __r, _RopeRep** __forest)
-{
-    _RopeRep* __insertee;   		// included in refcount
-    _RopeRep* __too_tiny = 0;    	// included in refcount
-    int __i;  				// forest[0..__i-1] is empty
-    size_t __s = __r->_M_size._M_data;
-
-    for (__i = 0; __s >= _S_min_len[__i+1]/* not this bucket */; ++__i) {
-	if (0 != __forest[__i]) {
-#	    ifndef __GC
-	      _Self_destruct_ptr __old(__too_tiny);
-#	    endif
-	    __too_tiny = _S_concat_and_set_balanced(__forest[__i], __too_tiny);
-	    __forest[__i]->_M_unref_nonnil();
-	    __forest[__i] = 0;
-	}
-    }
-    {
-#	ifndef __GC
-	  _Self_destruct_ptr __old(__too_tiny);
-#	endif
-	__insertee = _S_concat_and_set_balanced(__too_tiny, __r);
-    }
-    // Too_tiny dead, and no longer included in refcount.
-    // Insertee is live and included.
-    _STLP_ASSERT(_S_is_almost_balanced(__insertee))
-    _STLP_ASSERT(__insertee->_M_depth <= __r->_M_depth + 1)
-    for (;; ++__i) {
-	if (0 != __forest[__i]) {
-#	    ifndef __GC
-	      _Self_destruct_ptr __old(__insertee);
-#	    endif
-	    __insertee = _S_concat_and_set_balanced(__forest[__i], __insertee);
-	    __forest[__i]->_M_unref_nonnil();
-	    __forest[__i] = 0;
-	    _STLP_ASSERT(_S_is_almost_balanced(__insertee))
-	}
-	_STLP_ASSERT(_S_min_len[__i] <= __insertee->_M_size._M_data)
-	_STLP_ASSERT(__forest[__i] == 0)
-	if (__i == _RopeRep::_S_max_rope_depth || 
-	      __insertee->_M_size._M_data < _S_min_len[__i+1]) {
-	    __forest[__i] = __insertee;
-	    // refcount is OK since __insertee is now dead.
-	    return;
-	}
-    }
-}
-
-template <class _CharT, class _Alloc>
-_CharT
-rope<_CharT,_Alloc>::_S_fetch(_RopeRep* __r, size_type __i)
-{
-    __GC_CONST _CharT* __cstr = __r->_M_c_string;
-
-    _STLP_ASSERT(__i < __r->_M_size._M_data)
-    if (0 != __cstr) return __cstr[__i]; 
-    for(;;) {
-      switch(__r->_M_tag) {
-	case _RopeRep::_S_concat:
-	    {
-		_RopeConcatenation* __c = (_RopeConcatenation*)__r;
-		_RopeRep* __left = __c->_M_left;
-		size_t __left_len = __left->_M_size._M_data;
-
-		if (__i >= __left_len) {
-		    __i -= __left_len;
-		    __r = __c->_M_right;
-		} else {
-		    __r = __left;
-		}
-	    }
-	    break;
-	case _RopeRep::_S_leaf:
-	    {
-		_RopeLeaf* __l = (_RopeLeaf*)__r;
-		return __l->_M_data[__i];
-	    }
-	case _RopeRep::_S_function:
-	case _RopeRep::_S_substringfn:
-	    {
-		_RopeFunction* __f = (_RopeFunction*)__r;
-		_CharT __result;
-
-		(*(__f->_M_fn))(__i, 1, &__result);
-		return __result;
-	    }
-      }
-    }
-#if defined(_STLP_NEED_UNREACHABLE_RETURN)
-    return 0;
-#endif
-}
-
-# ifndef __GC
-// Return a uniquely referenced character slot for the given
-// position, or 0 if that's not possible.
-template <class _CharT, class _Alloc>
-_CharT*
-rope<_CharT,_Alloc>::_S_fetch_ptr(_RopeRep* __r, size_type __i)
-{
-    _RopeRep* __clrstack[_RopeRep::_S_max_rope_depth];
-    size_t __csptr = 0;
-
-    for(;;) {
-      if (__r->_M_ref_count > 1) return 0;
-      switch(__r->_M_tag) {
-	case _RopeRep::_S_concat:
-	    {
-		_RopeConcatenation* __c = (_RopeConcatenation*)__r;
-		_RopeRep* __left = __c->_M_left;
-		size_t __left_len = __left->_M_size._M_data;
-
-		if (__c->_M_c_string != 0) __clrstack[__csptr++] = __c;
-		if (__i >= __left_len) {
-		    __i -= __left_len;
-		    __r = __c->_M_right;
-		} else {
-		    __r = __left;
-		}
-	    }
-	    break;
-	case _RopeRep::_S_leaf:
-	    {
-		_RopeLeaf* __l = (_RopeLeaf*)__r;
-		if (__l->_M_c_string != __l->_M_data && __l->_M_c_string != 0)
-		    __clrstack[__csptr++] = __l;
-		while (__csptr > 0) {
-		    -- __csptr;
-		    _RopeRep* __d = __clrstack[__csptr];
-		    __d->_M_free_c_string();
-		    __d->_M_c_string = 0;
-		}
-		return __l->_M_data + __i;
-	    }
-	case _RopeRep::_S_function:
-	case _RopeRep::_S_substringfn:
-	    return 0;
-      }
-    }
-#if defined(_STLP_NEED_UNREACHABLE_RETURN)
-    return 0;
-#endif
-
-}
-# endif /* __GC */
-
-// The following could be implemented trivially using
-// lexicographical_compare_3way.
-// We do a little more work to avoid dealing with rope iterators for
-// flat strings.
-template <class _CharT, class _Alloc>
-int
-rope<_CharT,_Alloc>::_S_compare (const _RopeRep* __left, 
-                                 const _RopeRep* __right)
-{
-    size_t __left_len;
-    size_t __right_len;
-
-    if (0 == __right) return 0 != __left;
-    if (0 == __left) return -1;
-    __left_len = __left->_M_size._M_data;
-    __right_len = __right->_M_size._M_data;
-    if (_RopeRep::_S_leaf == __left->_M_tag) {
-	_RopeLeaf* __l = (_RopeLeaf*) __left;
-	if (_RopeRep::_S_leaf == __right->_M_tag) {
-	    _RopeLeaf* __r = (_RopeLeaf*) __right;
-	    return lexicographical_compare_3way(
-			__l->_M_data, __l->_M_data + __left_len,
-			__r->_M_data, __r->_M_data + __right_len);
-	} else {
-	    const_iterator __rstart(__right, 0);
-	    const_iterator __rend(__right, __right_len);
-	    return lexicographical_compare_3way(
-			__l->_M_data, __l->_M_data + __left_len,
-			__rstart, __rend);
-	}
-    } else {
-	const_iterator __lstart(__left, 0);
-	const_iterator __lend(__left, __left_len);
-	if (_RopeRep::_S_leaf == __right->_M_tag) {
-	    _RopeLeaf* __r = (_RopeLeaf*) __right;
-	    return lexicographical_compare_3way(
-				   __lstart, __lend,
-				   __r->_M_data, __r->_M_data + __right_len);
-	} else {
-	    const_iterator __rstart(__right, 0);
-	    const_iterator __rend(__right, __right_len);
-	    return lexicographical_compare_3way(
-				   __lstart, __lend,
-				   __rstart, __rend);
-	}
-    }
-}
-
-// Assignment to reference proxies.
-template <class _CharT, class _Alloc>
-_Rope_char_ref_proxy<_CharT, _Alloc>&
-_Rope_char_ref_proxy<_CharT, _Alloc>::operator= (_CharT __c) {
-    _RopeRep* __old = _M_root->_M_tree_ptr._M_data;
-#   ifndef __GC
-	// First check for the case in which everything is uniquely
-	// referenced.  In that case we can do this destructively.
-	_CharT* __ptr = _My_rope::_S_fetch_ptr(__old, _M_pos);
-	if (0 != __ptr) {
-	    *__ptr = __c;
-	    return *this;
-	}
-#   endif
-    _Self_destruct_ptr __left(
-      _My_rope::_S_substring(__old, 0, _M_pos));
-    _Self_destruct_ptr __right(
-      _My_rope::_S_substring(__old, _M_pos+1, __old->_M_size._M_data));
-    _Self_destruct_ptr __result_left(
-      _My_rope::_S_destr_concat_char_iter(__left, &__c, 1));
-
-#   ifndef __GC
-      _STLP_ASSERT(__left == __result_left || 1 == __result_left->_M_ref_count)
-#   endif
-    _RopeRep* __result =
-      _My_rope::_S_concat_rep(__result_left, __right);
-#   ifndef __GC
-      _STLP_ASSERT(1 <= __result->_M_ref_count)
-      _RopeRep::_S_unref(__old);
-#   endif
-    _M_root->_M_tree_ptr._M_data = __result;
-    return *this;
-}
-
-template <class _CharT, class _Alloc>
-_Rope_char_ptr_proxy<_CharT, _Alloc>
-_Rope_char_ref_proxy<_CharT, _Alloc>::operator& () const {
-    return _Rope_char_ptr_proxy<_CharT, _Alloc>(*this);
-}
-
-# if ( _STLP_STATIC_TEMPLATE_DATA > 0 )
-template<class _CharT, class _Alloc>
-_CharT rope<_CharT,_Alloc>::_S_empty_c_str[1] = { _CharT() };
-# else
-__DECLARE_INSTANCE(char, crope::_S_empty_c_str[1], ={0});
-# ifdef _STLP_HAS_WCHAR_T
-__DECLARE_INSTANCE(wchar_t, wrope::_S_empty_c_str[1], ={0});
-# endif /* _STLP_HAS_WCHAR_T */
-# endif /* _STLP_STATIC_TEMPLATE_DATA */
-// # endif
-
-template<class _CharT, class _Alloc>
-const _CharT* rope<_CharT,_Alloc>::c_str() const {
-    if (0 == _M_tree_ptr._M_data) {
-        _S_empty_c_str[0] = _S_eos((_CharT*)0);  // Possibly redundant,
-					     // but probably fast.
-        return _S_empty_c_str;
-    }
-    __GC_CONST _CharT* __old_c_string = _M_tree_ptr._M_data->_M_c_string;
-    if (0 != __old_c_string) return(__old_c_string);
-    size_t __s = size();
-   _CharT* __result = _STLP_CREATE_ALLOCATOR(allocator_type,(const allocator_type&)_M_tree_ptr, _CharT).allocate(__s + 1);
-    _S_flatten(_M_tree_ptr._M_data, __result);
-    __result[__s] = _S_eos((_CharT*)0);
-#   ifdef __GC
-	_M_tree_ptr._M_data->_M_c_string = __result;
-#   else
-      if ((__old_c_string = (__GC_CONST _CharT*)
-	   _Atomic_swap((__stl_atomic_t *)(&(_M_tree_ptr._M_data->_M_c_string)),
-			(__stl_atomic_t)__result)) != 0) {
-	// It must have been added in the interim.  Hence it had to have been
-	// separately allocated.  Deallocate the old copy, since we just
-	// replaced it.
-	_STLP_STD::_Destroy(__old_c_string, __old_c_string + __s + 1);
-      _STLP_CREATE_ALLOCATOR(allocator_type,(const allocator_type&)_M_tree_ptr, _CharT).deallocate(__old_c_string, __s + 1);
-      }
-#   endif
-    return(__result);
-}
-
-template<class _CharT, class _Alloc>
-const _CharT* rope<_CharT,_Alloc>::replace_with_c_str() {
-    if (0 == _M_tree_ptr._M_data) {
-        _S_empty_c_str[0] = _S_eos((_CharT*)0);
-        return _S_empty_c_str;
-    }
-    __GC_CONST _CharT* __old_c_string = _M_tree_ptr._M_data->_M_c_string;
-    if (_RopeRep::_S_leaf == _M_tree_ptr._M_data->_M_tag && 0 != __old_c_string) {
-	return(__old_c_string);
-    }
-    size_t __s = size();
-    _CharT* __result = _M_tree_ptr.allocate(_S_rounded_up_size(__s));
-    _S_flatten(_M_tree_ptr._M_data, __result);
-    __result[__s] = _S_eos((_CharT*)0);
-    _M_tree_ptr._M_data->_M_unref_nonnil();
-    _M_tree_ptr._M_data = _S_new_RopeLeaf(__result, __s, get_allocator());
-    return(__result);
-}
-
-// Algorithm specializations.  More should be added.
-
-#ifndef _STLP_MSVC
-// I couldn't get this to work with VC++
-template<class _CharT,class _Alloc>
-void
-_Rope_rotate(_Rope_iterator<_CharT,_Alloc> __first,
-              _Rope_iterator<_CharT,_Alloc> __middle,
-              _Rope_iterator<_CharT,_Alloc> __last)
-{
-    _STLP_ASSERT(__first.container() == __middle.container()
-                 && __middle.container() == __last.container())
-    rope<_CharT,_Alloc>& __r(__first.container());
-    rope<_CharT,_Alloc> __prefix = __r.substr(0, __first.index());
-    rope<_CharT,_Alloc> __suffix = 
-      __r.substr(__last.index(), __r.size() - __last.index());
-    rope<_CharT,_Alloc> __part1 = 
-      __r.substr(__middle.index(), __last.index() - __middle.index());
-    rope<_CharT,_Alloc> __part2 = 
-      __r.substr(__first.index(), __middle.index() - __first.index());
-    __r = __prefix;
-    __r += __part1;
-    __r += __part2;
-    __r += __suffix;
-}
-
-
-# if 0
-// Probably not useful for several reasons:
-// - for SGIs 7.1 compiler and probably some others,
-//   this forces lots of rope<wchar_t, ...> instantiations, creating a
-//   code bloat and compile time problem.  (Fixed in 7.2.)
-// - wchar_t is 4 bytes wide on most UNIX platforms, making it unattractive
-//   for unicode strings.  Unsigned short may be a better character
-//   type.
-inline void rotate(
-		_Rope_iterator<wchar_t,_STLP_DEFAULT_ALLOCATOR(char) > __first,
-                _Rope_iterator<wchar_t,_STLP_DEFAULT_ALLOCATOR(char) > __middle,
-                _Rope_iterator<wchar_t,_STLP_DEFAULT_ALLOCATOR(char) > __last) {
-    _Rope_rotate(__first, __middle, __last);
-}
-# endif
-#endif /* _STLP_MSVC */
-
-#   undef __RopeLeaf__ 
-#   undef __RopeRep__ 
-#   undef __RopeLeaf 
-#   undef __RopeRep 
-#   undef size_type
-
-_STLP_END_NAMESPACE
-
-# endif /* ROPEIMPL_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_rope.h b/src/STLport/stl/_rope.h
deleted file mode 100644
index d6a09ed..0000000
--- a/src/STLport/stl/_rope.h
+++ /dev/null
@@ -1,2518 +0,0 @@
-/*
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-// rope<_CharT,_Alloc> is a sequence of _CharT.
-// Ropes appear to be mutable, but update operations
-// really copy enough of the data structure to leave the original
-// valid.  Thus ropes can be logically copied by just copying
-// a pointer value.
-
-#ifndef _STLP_INTERNAL_ROPE_H
-# define _STLP_INTERNAL_ROPE_H
-
-# ifndef _STLP_INTERNAL_ALGOBASE_H
-#  include <stl/_algobase.h>
-# endif
-
-# ifndef _STLP_IOSFWD
-#  include <iosfwd>
-# endif
-
-# ifndef _STLP_INTERNAL_ALLOC_H
-#  include <stl/_alloc.h>
-# endif
-
-# ifndef _STLP_INTERNAL_ITERATOR_H
-#  include <stl/_iterator.h>
-# endif
-
-# ifndef _STLP_INTERNAL_ALGO_H
-#  include <stl/_algo.h>
-# endif
-
-# ifndef _STLP_INTERNAL_FUNCTION_H
-#  include <stl/_function.h>
-# endif
-
-# ifndef _STLP_INTERNAL_NUMERIC_H
-#  include <stl/_numeric.h>
-# endif
-
-# ifndef _STLP_INTERNAL_HASH_FUN_H
-#  include <stl/_hash_fun.h>
-# endif
-
-# ifdef __GC
-#   define __GC_CONST const
-# else
-# include <stl/_threads.h>
-#   define __GC_CONST   // constant except for deallocation
-# endif
-# ifdef _STLP_SGI_THREADS
-#    include <mutex.h>
-# endif
-
-#ifdef _STLP_USE_NESTED_TCLASS_THROUGHT_TPARAM 
-#  define _STLP_CREATE_ALLOCATOR(__atype,__a, _Tp) (_Alloc_traits<_Tp,__atype>::create_allocator(__a)) 
-#elif defined(__MRC__)||defined(__SC__) 
-#  define _STLP_CREATE_ALLOCATOR(__atype,__a, _Tp) __stl_alloc_create<_Tp,__atype>(__a,(_Tp*)0) 
-#else 
-#  define _STLP_CREATE_ALLOCATOR(__atype,__a, _Tp) __stl_alloc_create(__a,(_Tp*)0) 
-#endif 
-
-_STLP_BEGIN_NAMESPACE
-
-// First a lot of forward declarations.  The standard seems to require
-// much stricter "declaration before use" than many of the implementations
-// that preceded it.
-template<class _CharT, _STLP_DEFAULT_ALLOCATOR_SELECT(_CharT) > class rope;
-template<class _CharT, class _Alloc> struct _Rope_RopeConcatenation;
-template<class _CharT, class _Alloc> struct _Rope_RopeRep;
-template<class _CharT, class _Alloc> struct _Rope_RopeLeaf;
-template<class _CharT, class _Alloc> struct _Rope_RopeFunction;
-template<class _CharT, class _Alloc> struct _Rope_RopeSubstring;
-template<class _CharT, class _Alloc> class _Rope_iterator;
-template<class _CharT, class _Alloc> class _Rope_const_iterator;
-template<class _CharT, class _Alloc> class _Rope_char_ref_proxy;
-template<class _CharT, class _Alloc> class _Rope_char_ptr_proxy;
-
-// Some helpers, so we can use power on ropes.
-// See below for why this isn't local to the implementation.
-
-// This uses a nonstandard refcount convention.
-// The result has refcount 0.
-template<class _CharT, class _Alloc>
-struct _Rope_Concat_fn
-  : public binary_function<rope<_CharT,_Alloc>, rope<_CharT,_Alloc>,
-  rope<_CharT,_Alloc> > {
-  rope<_CharT,_Alloc> operator() (const rope<_CharT,_Alloc>& __x,
-                                  const rope<_CharT,_Alloc>& __y) {
-    return __x + __y;
-  }
-};
-
-template <class _CharT, class _Alloc>
-inline
-rope<_CharT,_Alloc>
-__identity_element(_Rope_Concat_fn<_CharT, _Alloc>)
-{
-  return rope<_CharT,_Alloc>();
-}
-
-// The _S_eos function is used for those functions that
-// convert to/from C-like strings to detect the end of the string.
-
-// The end-of-C-string character.
-// This is what the draft standard says it should be.
-template <class _CharT>
-inline _CharT _S_eos(_CharT*) { return _CharT(); }
-
-// fbp : some compilers fail to zero-initialize builtins ;(
-inline const char _S_eos(const char*) { return 0; }
-# ifdef _STLP_HAS_WCHAR_T
-inline const wchar_t _S_eos(const wchar_t*) { return 0; }
-# endif
-
-// Test for basic character types.
-// For basic character types leaves having a trailing eos.
-template <class _CharT>
-inline bool _S_is_basic_char_type(_CharT*) { return false; }
-template <class _CharT>
-inline bool _S_is_one_byte_char_type(_CharT*) { return false; }
-
-inline bool _S_is_basic_char_type(char*) { return true; }
-inline bool _S_is_one_byte_char_type(char*) { return true; }
-# ifdef _STLP_HAS_WCHAR_T
-inline bool _S_is_basic_char_type(wchar_t*) { return true; }
-# endif
-
-// Store an eos iff _CharT is a basic character type.
-// Do not reference _S_eos if it isn't.
-template <class _CharT>
-inline void _S_cond_store_eos(_CharT&) {}
-
-inline void _S_cond_store_eos(char& __c) { __c = 0; }
-# ifdef _STLP_HAS_WCHAR_T
-inline void _S_cond_store_eos(wchar_t& __c) { __c = 0; }
-# endif
-
-// char_producers are logically functions that generate a section of
-// a string.  These can be convereted to ropes.  The resulting rope
-// invokes the char_producer on demand.  This allows, for example,
-// files to be viewed as ropes without reading the entire file.
-template <class _CharT>
-class char_producer {
-public:
-  virtual ~char_producer() {};
-  virtual void operator()(size_t __start_pos, size_t __len, 
-                          _CharT* __buffer) = 0;
-  // Buffer should really be an arbitrary output iterator.
-  // That way we could flatten directly into an ostream, etc.
-  // This is thoroughly impossible, since iterator types don't
-  // have runtime descriptions.
-};
-
-// Sequence buffers:
-//
-// Sequence must provide an append operation that appends an
-// array to the sequence.  Sequence buffers are useful only if
-// appending an entire array is cheaper than appending element by element.
-// This is true for many string representations.
-// This should  perhaps inherit from ostream<sequence::value_type>
-// and be implemented correspondingly, so that they can be used
-// for formatted.  For the sake of portability, we don't do this yet.
-//
-// For now, sequence buffers behave as output iterators.  But they also
-// behave a little like basic_ostringstream<sequence::value_type> and a
-// little like containers.
-
-template<class _Sequence
-# if !(defined (_STLP_NON_TYPE_TMPL_PARAM_BUG) || \
-       defined ( _STLP_NO_DEFAULT_NON_TYPE_PARAM ))
-, size_t _Buf_sz = 100
-#   if defined(__sgi) && !defined(__GNUC__)
-#	 define __TYPEDEF_WORKAROUND
-,class _V = typename _Sequence::value_type
-#   endif /* __sgi */
-# endif /* _STLP_NON_TYPE_TMPL_PARAM_BUG */
->
-// The 3rd parameter works around a common compiler bug.
-class sequence_buffer : public iterator <output_iterator_tag, void, void, void, void> {
-public:
-#       ifndef __TYPEDEF_WORKAROUND
-  typedef typename _Sequence::value_type value_type;
-  typedef sequence_buffer<_Sequence
-# if !(defined (_STLP_NON_TYPE_TMPL_PARAM_BUG) || \
-       defined ( _STLP_NO_DEFAULT_NON_TYPE_PARAM ))
-  , _Buf_sz
-  > _Self;
-# else /* _STLP_NON_TYPE_TMPL_PARAM_BUG */
-  > _Self;
-  enum { _Buf_sz = 100}; 
-# endif /* _STLP_NON_TYPE_TMPL_PARAM_BUG */
-  // # endif
-#	else /* __TYPEDEF_WORKAROUND */
-  typedef _V value_type;
-  typedef sequence_buffer<_Sequence, _Buf_sz, _V> _Self;
-#	endif /* __TYPEDEF_WORKAROUND */
-protected:
-  _Sequence* _M_prefix;
-  value_type _M_buffer[_Buf_sz];
-  size_t     _M_buf_count;
-public:
-  void flush() {
-    _M_prefix->append(_M_buffer, _M_buffer + _M_buf_count);
-    _M_buf_count = 0;
-  }
-  ~sequence_buffer() { flush(); }
-  sequence_buffer() : _M_prefix(0), _M_buf_count(0) {}
-  sequence_buffer(const _Self& __x) {
-    _M_prefix = __x._M_prefix;
-    _M_buf_count = __x._M_buf_count;
-    copy(__x._M_buffer, __x._M_buffer + __x._M_buf_count, _M_buffer);
-  }
-  sequence_buffer(_Self& __x) {
-    __x.flush();
-    _M_prefix = __x._M_prefix;
-    _M_buf_count = 0;
-  }
-  sequence_buffer(_Sequence& __s) : _M_prefix(&__s), _M_buf_count(0) {}
-  _Self& operator= (_Self& __x) {
-    __x.flush();
-    _M_prefix = __x._M_prefix;
-    _M_buf_count = 0;
-    return *this;
-  }
-  _Self& operator= (const _Self& __x) {
-    _M_prefix = __x._M_prefix;
-    _M_buf_count = __x._M_buf_count;
-    copy(__x._M_buffer, __x._M_buffer + __x._M_buf_count, _M_buffer);
-    return *this;
-  }
-  void push_back(value_type __x)
-  {
-    if (_M_buf_count < _Buf_sz) {
-      _M_buffer[_M_buf_count] = __x;
-      ++_M_buf_count;
-    } else {
-      flush();
-      _M_buffer[0] = __x;
-      _M_buf_count = 1;
-    }
-  }
-  void append(value_type* __s, size_t __len)
-  {
-    if (__len + _M_buf_count <= _Buf_sz) {
-      size_t __i = _M_buf_count;
-      size_t __j = 0;
-      for (; __j < __len; __i++, __j++) {
-        _M_buffer[__i] = __s[__j];
-      }
-      _M_buf_count += __len;
-    } else if (0 == _M_buf_count) {
-      _M_prefix->append(__s, __s + __len);
-    } else {
-      flush();
-      append(__s, __len);
-    }
-  }
-  _Self& write(value_type* __s, size_t __len)
-  {
-    append(__s, __len);
-    return *this;
-  }
-  _Self& put(value_type __x)
-  {
-    push_back(__x);
-    return *this;
-  }
-  _Self& operator=(const value_type& __rhs)
-  {
-    push_back(__rhs);
-    return *this;
-  }
-  _Self& operator*() { return *this; }
-  _Self& operator++() { return *this; }
-  _Self& operator++(int) { return *this; }
-};
-
-// The following should be treated as private, at least for now.
-template<class _CharT>
-class _Rope_char_consumer {
-public:
-  // If we had member templates, these should not be virtual.
-  // For now we need to use run-time parametrization where
-  // compile-time would do.  _Hence this should all be private
-  // for now.
-  // The symmetry with char_producer is accidental and temporary.
-  virtual ~_Rope_char_consumer() {};
-  virtual bool operator()(const _CharT* __buffer, size_t __len) = 0;
-};
-
-//
-// What follows should really be local to rope.  Unfortunately,
-// that doesn't work, since it makes it impossible to define generic
-// equality on rope iterators.  According to the draft standard, the
-// template parameters for such an equality operator cannot be inferred
-// from the occurence of a member class as a parameter.
-// (SGI compilers in fact allow this, but the __result wouldn't be
-// portable.)
-// Similarly, some of the static member functions are member functions
-// only to avoid polluting the global namespace, and to circumvent
-// restrictions on type inference for template functions.
-//
-
-//
-// The internal data structure for representing a rope.  This is
-// private to the implementation.  A rope is really just a pointer
-// to one of these.
-//
-// A few basic functions for manipulating this data structure
-// are members of _RopeRep.  Most of the more complex algorithms
-// are implemented as rope members.
-//
-// Some of the static member functions of _RopeRep have identically
-// named functions in rope that simply invoke the _RopeRep versions.
-//
-// A macro to introduce various allocation and deallocation functions
-// These need to be defined differently depending on whether or not
-// we are using standard conforming allocators, and whether the allocator
-// instances have real state.  Thus this macro is invoked repeatedly
-// with different definitions of __ROPE_DEFINE_ALLOC.
-
-#if defined (_STLP_MEMBER_TEMPLATE_CLASSES)
-# define __ROPE_DEFINE_ALLOC(_Tp, __name, _M_proxy) \
-        typedef typename \
-          _Alloc_traits<_Tp,_Alloc>::allocator_type __name##Allocator;
-
-#define __ROPE_DEFINE_ALLOCS(__a, _M_proxy) \
-        __ROPE_DEFINE_ALLOC(_CharT,_Data, _M_proxy) /* character data */ \
-        typedef _Rope_RopeConcatenation<_CharT,__a> __C; \
-        __ROPE_DEFINE_ALLOC(__C,_C, _M_proxy) \
-        typedef _Rope_RopeLeaf<_CharT,__a> __L; \
-        __ROPE_DEFINE_ALLOC(__L,_L, _M_proxy) \
-        typedef _Rope_RopeFunction<_CharT,__a> __F; \
-        __ROPE_DEFINE_ALLOC(__F,_F, _M_proxy) \
-        typedef _Rope_RopeSubstring<_CharT,__a> __S; \
-        __ROPE_DEFINE_ALLOC(__S,_S,_M_proxy)
-#else
-#define __ROPE_DEFINE_ALLOC(_Tp, __name, _M_proxy) 
-#define __ROPE_DEFINE_ALLOCS(__a, _M_proxy)
-#endif
-
-
-template<class _CharT, class _Alloc>
-struct _Rope_RopeRep
-# ifndef __GC
-  : public _Refcount_Base
-# endif
-{
-  typedef _Rope_RopeRep<_CharT, _Alloc> _Self;
-public:
-#  define __ROPE_MAX_DEPTH  45
-#  define __ROPE_DEPTH_SIZE 46
-  enum { _S_max_rope_depth = __ROPE_MAX_DEPTH };
-  enum _Tag {_S_leaf, _S_concat, _S_substringfn, _S_function};
-  // Apparently needed by VC++
-  // The data fields of leaves are allocated with some
-  // extra space, to accomodate future growth and for basic
-  // character types, to hold a trailing eos character.
-  enum { _S_alloc_granularity = 8 };
-
-  
-  _Tag _M_tag:8;
-  bool _M_is_balanced:8;
-
-  _STLP_FORCE_ALLOCATORS(_CharT, _Alloc)
-  typedef typename _Alloc_traits<_CharT,_Alloc>::allocator_type
-  allocator_type;
-  
-  allocator_type get_allocator() const { return allocator_type(_M_size);  }
-
-  unsigned char _M_depth;
-  __GC_CONST _CharT* _M_c_string;
-  _STLP_alloc_proxy<size_t, _CharT, allocator_type> _M_size;
-
-# ifdef _STLP_NO_ARROW_OPERATOR
-  _Rope_RopeRep() : _Refcount_Base(1), _M_size(allocator_type(), 0) {}
-# endif
-
-  /* Flattened version of string, if needed.  */
-  /* typically 0.                             */
-  /* If it's not 0, then the memory is owned  */
-  /* by this node.                            */
-  /* In the case of a leaf, this may point to */
-  /* the same memory as the data field.       */
-  _Rope_RopeRep(_Tag __t, int __d, bool __b, size_t _p_size,
-                allocator_type __a) :
-#         ifndef __GC
-    _Refcount_Base(1),
-#	  endif
-    _M_tag(__t), _M_is_balanced(__b), _M_depth(__d), _M_c_string(0), _M_size(__a, _p_size)
-  { }
-#   ifdef __GC
-  void _M_incr () {}
-#   endif
-
-  // fbp : moved from RopeLeaf
-  static size_t _S_rounded_up_size(size_t __n) {
-    size_t __size_with_eos;
-    
-    if (_S_is_basic_char_type((_CharT*)0)) {
-      __size_with_eos = __n + 1;
-    } else {
-      __size_with_eos = __n;
-    }
-#       ifdef __GC
-    return __size_with_eos;
-#       else
-    // Allow slop for in-place expansion.
-    return (__size_with_eos + _S_alloc_granularity-1)
-      &~ (_S_alloc_granularity-1);
-#       endif
-  }
-
-  static void _S_free_string(__GC_CONST _CharT* __s, size_t __len,
-                             allocator_type __a) {
-
-    if (!_S_is_basic_char_type((_CharT*)0)) {
-      _STLP_STD::_Destroy(__s, __s + __len);
-    }
-    //  This has to be a static member, so this gets a bit messy
-#   ifdef _STLP_USE_NESTED_TCLASS_THROUGHT_TPARAM
-    __a.deallocate(__s, _S_rounded_up_size(__len));		//*ty 03/24/2001 - restored not to use __stl_alloc_rebind() since it is not defined under _STLP_MEMBER_TEMPLATE_CLASSES
-#   else
-    __stl_alloc_rebind (__a, (_CharT*)0).deallocate(__s, _S_rounded_up_size(__len));
-#   endif
-  }
-  
-  // Deallocate data section of a leaf.
-  // This shouldn't be a member function.
-  // But its hard to do anything else at the
-  // moment, because it's templatized w.r.t.
-  // an allocator.
-  // Does nothing if __GC is defined.
-#   ifndef __GC
-  void _M_free_c_string();
-  void _M_free_tree();
-  // Deallocate t. Assumes t is not 0.
-  void _M_unref_nonnil()
-  {
-    _M_decr(); if (!_M_ref_count) _M_free_tree();
-  }
-  void _M_ref_nonnil()
-  {
-    _M_incr();
-  }
-  static void _S_unref(_Self* __t)
-  {
-    if (0 != __t) {
-      __t->_M_unref_nonnil();
-    }
-  }
-  static void _S_ref(_Self* __t)
-  {
-    if (0 != __t) __t->_M_incr();
-  }
-  static void _S_free_if_unref(_Self* __t)
-  {
-    if (0 != __t && 0 == __t->_M_ref_count) __t->_M_free_tree();
-  }
-#   else /* __GC */
-  void _M_unref_nonnil() {}
-  void _M_ref_nonnil() {}
-  static void _S_unref(_Self*) {}
-  static void _S_ref(_Self*) {}
-  static void _S_free_if_unref(_Self*) {}
-#   endif
-
-  __ROPE_DEFINE_ALLOCS(_Alloc, _M_size)
-    };
-
-template<class _CharT, class _Alloc>
-struct _Rope_RopeLeaf : public _Rope_RopeRep<_CharT,_Alloc> {
-public:
-  __GC_CONST _CharT* _M_data; /* Not necessarily 0 terminated. */
-                                /* The allocated size is         */
-                                /* _S_rounded_up_size(size), except */
-                                /* in the GC case, in which it   */
-                                /* doesn't matter.               */
-  _STLP_FORCE_ALLOCATORS(_CharT, _Alloc)
-  typedef typename _Rope_RopeRep<_CharT,_Alloc>::allocator_type allocator_type;
-  _Rope_RopeLeaf(__GC_CONST _CharT* __d, size_t _p_size, allocator_type __a)
-    : _Rope_RopeRep<_CharT,_Alloc>(_Rope_RopeRep<_CharT,_Alloc>::_S_leaf, 0, true, _p_size, __a), 
-    _M_data(__d)
-  {
-    _STLP_ASSERT(_p_size > 0)
-    if (_S_is_basic_char_type((_CharT *)0)) {
-      // already eos terminated.
-      this->_M_c_string = __d;
-    }
-  }
-
-# ifdef _STLP_NO_ARROW_OPERATOR
-  _Rope_RopeLeaf() {}
-  _Rope_RopeLeaf(const _Rope_RopeLeaf<_CharT, _Alloc>& ) {}
-# endif
-  
-// The constructor assumes that d has been allocated with
-  // the proper allocator and the properly padded size.
-  // In contrast, the destructor deallocates the data:
-# ifndef __GC
-  ~_Rope_RopeLeaf() {
-    if (_M_data != this->_M_c_string) {
-      this->_M_free_c_string();
-    }
-    _S_free_string(_M_data, this->_M_size._M_data, this->get_allocator());
-  }
-# endif
-};
-
-template<class _CharT, class _Alloc>
-struct _Rope_RopeConcatenation : public _Rope_RopeRep<_CharT,_Alloc> {
-public:
-  _Rope_RopeRep<_CharT,_Alloc>* _M_left;
-  _Rope_RopeRep<_CharT,_Alloc>* _M_right;
-  _STLP_FORCE_ALLOCATORS(_CharT, _Alloc)
-  typedef typename _Rope_RopeRep<_CharT,_Alloc>::allocator_type allocator_type;
-  _Rope_RopeConcatenation(_Rope_RopeRep<_CharT,_Alloc>* __l,
-                          _Rope_RopeRep<_CharT,_Alloc>* __r,
-                          allocator_type __a)
-    :   _Rope_RopeRep<_CharT,_Alloc>(
-                                     _Rope_RopeRep<_CharT,_Alloc>::_S_concat, 
-				     (max)(__l->_M_depth, __r->_M_depth) + 1, false,
-                                     __l->_M_size._M_data + __r->_M_size._M_data, __a), _M_left(__l), _M_right(__r)
-  {}
-# ifdef _STLP_NO_ARROW_OPERATOR
-  _Rope_RopeConcatenation() {}
-  _Rope_RopeConcatenation(const _Rope_RopeConcatenation<_CharT, _Alloc>&) {}
-# endif
-
-# ifndef __GC
-  ~_Rope_RopeConcatenation() {
-    this->_M_free_c_string();
-    _M_left->_M_unref_nonnil();
-    _M_right->_M_unref_nonnil();
-  }
-# endif
-};
-
-template<class _CharT, class _Alloc>
-struct _Rope_RopeFunction : public _Rope_RopeRep<_CharT,_Alloc> {
-public:
-  char_producer<_CharT>* _M_fn;
-#   ifndef __GC
-  bool _M_delete_when_done; // Char_producer is owned by the
-                                // rope and should be explicitly
-                                // deleted when the rope becomes
-                                // inaccessible.
-#   else
-  // In the GC case, we either register the rope for
-  // finalization, or not.  Thus the field is unnecessary;
-  // the information is stored in the collector data structures.
-  // We do need a finalization procedure to be invoked by the
-  // collector.
-  static void _S_fn_finalization_proc(void * __tree, void *) {
-    delete ((_Rope_RopeFunction *)__tree) -> _M_fn;
-  }
-#   endif
-  _STLP_FORCE_ALLOCATORS(_CharT, _Alloc)
-  typedef typename _Rope_RopeRep<_CharT,_Alloc>::allocator_type allocator_type;
-# ifdef _STLP_NO_ARROW_OPERATOR
-  _Rope_RopeFunction() {}
-  _Rope_RopeFunction(const _Rope_RopeFunction<_CharT, _Alloc>& ) {}
-# endif
-
-  _Rope_RopeFunction(char_producer<_CharT>* __f, size_t _p_size,
-                     bool __d, allocator_type __a)
-    :
-    _Rope_RopeRep<_CharT,_Alloc>(_Rope_RopeRep<_CharT,_Alloc>::_S_function, 0, true, _p_size, __a),
-    _M_fn(__f)
-#       ifndef __GC
-    , _M_delete_when_done(__d)
-#       endif
-  {
-    _STLP_ASSERT(_p_size > 0)
-#       ifdef __GC
-    if (__d) {
-      GC_REGISTER_FINALIZER(
-                            this, _Rope_RopeFunction::_S_fn_finalization_proc, 0, 0, 0);
-    }
-#       endif
-  }
-# ifndef __GC
-  ~_Rope_RopeFunction() {
-    this->_M_free_c_string();
-    if (_M_delete_when_done) {
-      delete _M_fn;
-    }
-  }
-# endif
-};
-// Substring results are usually represented using just
-// concatenation nodes.  But in the case of very long flat ropes
-// or ropes with a functional representation that isn't practical.
-// In that case, we represent the __result as a special case of
-// RopeFunction, whose char_producer points back to the rope itself.
-// In all cases except repeated substring operations and
-// deallocation, we treat the __result as a RopeFunction.
-template<class _CharT, class _Alloc>
-# if  ( defined (__IBMCPP__) && (__IBMCPP__ == 500) )  // JFA 10-Aug-2000 for some reason xlC cares about the order
-struct _Rope_RopeSubstring : public char_producer<_CharT> , public _Rope_RopeFunction<_CharT,_Alloc>
-# else
-struct _Rope_RopeSubstring : public _Rope_RopeFunction<_CharT,_Alloc>,
-                             public char_producer<_CharT>
-# endif
-{
-public:
-  // XXX this whole class should be rewritten.
-  typedef _Rope_RopeRep<_CharT,_Alloc> _Base;
-  _Rope_RopeRep<_CharT,_Alloc>* _M_base;      // not 0
-  size_t _M_start;
-  virtual void operator()(size_t __start_pos, size_t __req_len,
-                          _CharT* __buffer) {
-    switch(_M_base->_M_tag) {
-    case _Base::_S_function:
-    case _Base::_S_substringfn:
-      {
-        char_producer<_CharT>* __fn =
-          ((_Rope_RopeFunction<_CharT,_Alloc>*)_M_base)->_M_fn;
-        _STLP_ASSERT(__start_pos + __req_len <= this->_M_size._M_data)
-        _STLP_ASSERT(_M_start + this->_M_size._M_data <= _M_base->_M_size._M_data)
-        (*__fn)(__start_pos + _M_start, __req_len, __buffer);
-      }
-      break;
-    case _Base::_S_leaf:
-      {
-        __GC_CONST _CharT* __s =
-          ((_Rope_RopeLeaf<_CharT,_Alloc>*)_M_base)->_M_data;
-        uninitialized_copy_n(__s + __start_pos + _M_start, __req_len,
-                             __buffer);
-      }
-      break;
-    default:
-      _STLP_ASSERT(false)
-        ;
-    }
-  }
-
-  _STLP_FORCE_ALLOCATORS(_CharT, _Alloc)
-  typedef typename _Rope_RopeRep<_CharT,_Alloc>::allocator_type allocator_type;
-
-  _Rope_RopeSubstring(_Rope_RopeRep<_CharT,_Alloc>* __b, size_t __s,
-                      size_t __l, allocator_type __a)
-    : _Rope_RopeFunction<_CharT,_Alloc>(this, __l, false, __a),
-	_M_base(__b),
-    _M_start(__s)
-       
-  {
-    _STLP_ASSERT(__l > 0)
-    _STLP_ASSERT(__s + __l <= __b->_M_size._M_data)
-#       ifndef __GC
-    _M_base->_M_ref_nonnil();
-#       endif
-    this->_M_tag = _Base::_S_substringfn;
-  }
-  virtual ~_Rope_RopeSubstring()
-  { 
-#       ifndef __GC
-    _M_base->_M_unref_nonnil();
-#       endif
-  }
-};
-
-// Self-destructing pointers to Rope_rep.
-// These are not conventional smart pointers.  Their
-// only purpose in life is to ensure that unref is called
-// on the pointer either at normal exit or if an exception
-// is raised.  It is the caller's responsibility to
-// adjust reference counts when these pointers are initialized
-// or assigned to.  (This convention significantly reduces
-// the number of potentially expensive reference count
-// updates.)
-#ifndef __GC
-template<class _CharT, class _Alloc>
-struct _Rope_self_destruct_ptr {
-  _Rope_RopeRep<_CharT,_Alloc>* _M_ptr;
-  ~_Rope_self_destruct_ptr() 
-  { _Rope_RopeRep<_CharT,_Alloc>::_S_unref(_M_ptr); }
-#   ifdef _STLP_USE_EXCEPTIONS
-  _Rope_self_destruct_ptr() : _M_ptr(0) {};
-#   else
-  _Rope_self_destruct_ptr() {};
-#   endif
-  _Rope_self_destruct_ptr(_Rope_RopeRep<_CharT,_Alloc>* __p) : _M_ptr(__p) {}
-  _Rope_RopeRep<_CharT,_Alloc>& operator*() { return *_M_ptr; }
-  _Rope_RopeRep<_CharT,_Alloc>* operator->() { return _M_ptr; }
-  operator _Rope_RopeRep<_CharT,_Alloc>*() { return _M_ptr; }
-  _Rope_self_destruct_ptr<_CharT, _Alloc>& 
-  operator= (_Rope_RopeRep<_CharT,_Alloc>* __x)
-  { _M_ptr = __x; return *this; }
-};
-#endif
-
-// Dereferencing a nonconst iterator has to return something
-// that behaves almost like a reference.  It's not possible to
-// return an actual reference since assignment requires extra
-// work.  And we would get into the same problems as with the
-// CD2 version of basic_string.
-template<class _CharT, class _Alloc>
-class _Rope_char_ref_proxy {
-  typedef _Rope_char_ref_proxy<_CharT, _Alloc> _Self;
-  friend class rope<_CharT,_Alloc>;
-  friend class _Rope_iterator<_CharT,_Alloc>;
-  friend class _Rope_char_ptr_proxy<_CharT,_Alloc>;
-#   ifdef __GC
-  typedef _Rope_RopeRep<_CharT,_Alloc>* _Self_destruct_ptr;
-#   else
-  typedef _Rope_self_destruct_ptr<_CharT,_Alloc> _Self_destruct_ptr;
-#   endif
-  typedef _Rope_RopeRep<_CharT,_Alloc> _RopeRep;
-  typedef rope<_CharT,_Alloc> _My_rope;
-  size_t _M_pos;
-  _CharT _M_current;
-  bool _M_current_valid;
-  _My_rope* _M_root;     // The whole rope.
-public:
-  _Rope_char_ref_proxy(_My_rope* __r, size_t __p) :
-    _M_pos(__p), _M_current_valid(false), _M_root(__r) {}
-  _Rope_char_ref_proxy(const _Self& __x) :
-    _M_pos(__x._M_pos), _M_current_valid(false), _M_root(__x._M_root) {}
-  // Don't preserve cache if the reference can outlive the
-  // expression.  We claim that's not possible without calling
-  // a copy constructor or generating reference to a proxy
-  // reference.  We declare the latter to have undefined semantics.
-  _Rope_char_ref_proxy(_My_rope* __r, size_t __p,
-                       _CharT __c) :
-    _M_pos(__p), _M_current(__c), _M_current_valid(true), _M_root(__r) {}
-  inline operator _CharT () const;
-  _Self& operator= (_CharT __c);
-  _Rope_char_ptr_proxy<_CharT, _Alloc> operator& () const;
-  _Self& operator= (const _Self& __c) {
-    return operator=((_CharT)__c); 
-  }
-};
-
-#ifdef _STLP_FUNCTION_TMPL_PARTIAL_ORDER
-template<class _CharT, class __Alloc>
-inline void swap(_Rope_char_ref_proxy <_CharT, __Alloc > __a,
-                 _Rope_char_ref_proxy <_CharT, __Alloc > __b) {
-  _CharT __tmp = __a;
-  __a = __b;
-  __b = __tmp;
-}
-#else
-// There is no really acceptable way to handle this.  The default
-// definition of swap doesn't work for proxy references.
-// It can't really be made to work, even with ugly hacks, since
-// the only unusual operation it uses is the copy constructor, which
-// is needed for other purposes.  We provide a macro for
-// full specializations, and instantiate the most common case.
-# define _ROPE_SWAP_SPECIALIZATION(_CharT, __Alloc) \
-    inline void swap(_Rope_char_ref_proxy <_CharT, __Alloc > __a, \
-                     _Rope_char_ref_proxy <_CharT, __Alloc > __b) { \
-        _CharT __tmp = __a; \
-        __a = __b; \
-        __b = __tmp; \
-    }
-
-_ROPE_SWAP_SPECIALIZATION(char,_STLP_DEFAULT_ALLOCATOR(char) )
-
-#endif /* !_STLP_FUNCTION_TMPL_PARTIAL_ORDER */
-
-  template<class _CharT, class _Alloc>
-class _Rope_char_ptr_proxy {
-  // XXX this class should be rewritten.
-public:
-  typedef _Rope_char_ptr_proxy<_CharT, _Alloc> _Self;
-  friend class _Rope_char_ref_proxy<_CharT,_Alloc>;
-  size_t _M_pos;
-  rope<_CharT,_Alloc>* _M_root;     // The whole rope.
-
-  _Rope_char_ptr_proxy(const _Rope_char_ref_proxy<_CharT,_Alloc>& __x) 
-    : _M_pos(__x._M_pos), _M_root(__x._M_root) {}
-  _Rope_char_ptr_proxy(const _Self& __x)
-    : _M_pos(__x._M_pos), _M_root(__x._M_root) {}
-  _Rope_char_ptr_proxy() {}
-  _Rope_char_ptr_proxy(_CharT* __x) : _M_pos(0), _M_root(0) {
-    _STLP_ASSERT(0 == __x)
-  }
-  _Self& 
-  operator= (const _Self& __x) {
-    _M_pos = __x._M_pos;
-    _M_root = __x._M_root;
-    return *this;
-  }
-
-  _Rope_char_ref_proxy<_CharT,_Alloc> operator*() const {
-    return _Rope_char_ref_proxy<_CharT,_Alloc>(_M_root, _M_pos);
-  }
-};
-
-
-// Rope iterators:
-// Unlike in the C version, we cache only part of the stack
-// for rope iterators, since they must be efficiently copyable.
-// When we run out of cache, we have to reconstruct the iterator
-// value.
-// Pointers from iterators are not included in reference counts.
-// Iterators are assumed to be thread private.  Ropes can
-// be shared.
-
-template<class _CharT, class _Alloc>
-class _Rope_iterator_base
-/*   : public random_access_iterator<_CharT, ptrdiff_t>  */
-{
-  friend class rope<_CharT,_Alloc>;
-  typedef _Rope_iterator_base<_CharT, _Alloc> _Self;
-public:
-  typedef _Rope_RopeRep<_CharT,_Alloc> _RopeRep;
-  // Borland doesnt want this to be protected.
-  //  protected:
-  enum { _S_path_cache_len = 4 }; // Must be <= 9.
-  enum { _S_iterator_buf_len = 15 };
-  size_t _M_current_pos;
-  _RopeRep* _M_root;     // The whole rope.
-  size_t _M_leaf_pos;    // Starting position for current leaf
-  __GC_CONST _CharT* _M_buf_start;
-  // Buffer possibly
-  // containing current char.
-  __GC_CONST _CharT* _M_buf_ptr;
-  // Pointer to current char in buffer.
-  // != 0 ==> buffer valid.
-  __GC_CONST _CharT* _M_buf_end;
-  // One past __last valid char in buffer.
-  // What follows is the path cache.  We go out of our
-  // way to make this compact.
-  // Path_end contains the bottom section of the path from
-  // the root to the current leaf.
-  const _RopeRep* _M_path_end[_S_path_cache_len];
-  int _M_leaf_index;     // Last valid __pos in path_end;
-  // _M_path_end[0] ... _M_path_end[leaf_index-1]
-  // point to concatenation nodes.
-  unsigned char _M_path_directions;
-  // (path_directions >> __i) & 1 is 1
-  // iff we got from _M_path_end[leaf_index - __i - 1]
-  // to _M_path_end[leaf_index - __i] by going to the
-  // __right. Assumes path_cache_len <= 9.
-  _CharT _M_tmp_buf[_S_iterator_buf_len];
-  // Short buffer for surrounding chars.
-  // This is useful primarily for 
-  // RopeFunctions.  We put the buffer
-  // here to avoid locking in the
-  // multithreaded case.
-  // The cached path is generally assumed to be valid
-  // only if the buffer is valid.
-  static void _S_setbuf(_Rope_iterator_base<_CharT, _Alloc>& __x);
-  // Set buffer contents given
-  // path cache.
-  static void _S_setcache(_Rope_iterator_base<_CharT, _Alloc>& __x);
-  // Set buffer contents and
-  // path cache.
-  static void _S_setcache_for_incr(_Rope_iterator_base<_CharT, _Alloc>& __x);
-  // As above, but assumes path
-  // cache is valid for previous posn.
-  _Rope_iterator_base() {}
-  _Rope_iterator_base(_RopeRep* __root, size_t __pos)
-    : _M_current_pos(__pos),_M_root(__root),  _M_buf_ptr(0) {}
-  void _M_incr(size_t __n);
-  void _M_decr(size_t __n);
-public:
-  size_t index() const { return _M_current_pos; }
-  _Rope_iterator_base(const _Self& __x) {
-    if (0 != __x._M_buf_ptr) {
-      *this = __x;
-    } else {
-      _M_current_pos = __x._M_current_pos;
-      _M_root = __x._M_root;
-      _M_buf_ptr = 0;
-    }
-  }
-};
-
-template<class _CharT, class _Alloc> class _Rope_iterator;
-
-template<class _CharT, class _Alloc>
-class _Rope_const_iterator : public _Rope_iterator_base<_CharT,_Alloc> {
-  friend class rope<_CharT,_Alloc>;
-  typedef  _Rope_const_iterator<_CharT, _Alloc> _Self;
-  typedef _Rope_iterator_base<_CharT,_Alloc> _Base;
-  //  protected:
-public:
-#   ifndef _STLP_HAS_NO_NAMESPACES
-  typedef _Rope_RopeRep<_CharT,_Alloc> _RopeRep;
-  // The one from the base class may not be directly visible.
-#   endif
-  _Rope_const_iterator(const _RopeRep* __root, size_t __pos):
-    _Rope_iterator_base<_CharT,_Alloc>(
-                                       __CONST_CAST(_RopeRep*,__root), __pos)
-    // Only nonconst iterators modify root ref count
-  {}
-public:
-  typedef _CharT reference;   // Really a value.  Returning a reference
-                                // Would be a mess, since it would have
-                                // to be included in refcount.
-  typedef const _CharT* pointer;
-  typedef _CharT value_type;
-  typedef ptrdiff_t difference_type;
-  typedef random_access_iterator_tag iterator_category;
-
-public:
-  _Rope_const_iterator() {};
-  _Rope_const_iterator(const _Self& __x) :
-    _Rope_iterator_base<_CharT,_Alloc>(__x) { }
-  _Rope_const_iterator(const _Rope_iterator<_CharT,_Alloc>& __x): 
-    _Rope_iterator_base<_CharT,_Alloc>(__x) {}
-  _Rope_const_iterator(const rope<_CharT,_Alloc>& __r, size_t __pos) :
-    _Rope_iterator_base<_CharT,_Alloc>(__r._M_tree_ptr._M_data, __pos) {}
-  _Self& operator= (const _Self& __x) {
-    if (0 != __x._M_buf_ptr) {
-      *(__STATIC_CAST(_Base*,this)) = __x;
-    } else {
-      this->_M_current_pos = __x._M_current_pos;
-      this->_M_root = __x._M_root;
-      this->_M_buf_ptr = 0;
-    }
-    return(*this);
-  }
-  reference operator*() {
-    if (0 == this->_M_buf_ptr) _S_setcache(*this);
-    return *(this->_M_buf_ptr);
-  }
-  _Self& operator++() {
-    __GC_CONST _CharT* __next;
-    if (0 != this->_M_buf_ptr && (__next = this->_M_buf_ptr + 1) < this->_M_buf_end) {
-      this->_M_buf_ptr = __next;
-      ++this->_M_current_pos;
-    } else {
-      this->_M_incr(1);
-    }
-    return *this;
-  }
-  _Self& operator+=(ptrdiff_t __n) {
-    if (__n >= 0) {
-      this->_M_incr(__n);
-    } else {
-      this->_M_decr(-__n);
-    }
-    return *this;
-  }
-  _Self& operator--() {
-    this->_M_decr(1);
-    return *this;
-  }
-  _Self& operator-=(ptrdiff_t __n) {
-    if (__n >= 0) {
-      this->_M_decr(__n);
-    } else {
-      this->_M_incr(-__n);
-    }
-    return *this;
-  }
-  _Self operator++(int) {
-    size_t __old_pos = this->_M_current_pos;
-    this->_M_incr(1);
-    return _Rope_const_iterator<_CharT,_Alloc>(this->_M_root, __old_pos);
-    // This makes a subsequent dereference expensive.
-    // Perhaps we should instead copy the iterator
-    // if it has a valid cache?
-  }
-  _Self operator--(int) {
-    size_t __old_pos = this->_M_current_pos;
-    this->_M_decr(1);
-    return _Rope_const_iterator<_CharT,_Alloc>(this->_M_root, __old_pos);
-  }
-  inline reference operator[](size_t __n);
-};
-
-template<class _CharT, class _Alloc>
-class _Rope_iterator : public _Rope_iterator_base<_CharT,_Alloc> {
-  friend class rope<_CharT,_Alloc>;
-  typedef _Rope_iterator<_CharT, _Alloc> _Self;
-  typedef _Rope_iterator_base<_CharT,_Alloc> _Base;
-  typedef _Rope_RopeRep<_CharT,_Alloc> _RopeRep;
-  //  protected:
-public:
-  rope<_CharT,_Alloc>* _M_root_rope;
-  // root is treated as a cached version of this,
-  // and is used to detect changes to the underlying
-  // rope.
-  // Root is included in the reference count.
-  // This is necessary so that we can detect changes reliably.
-  // Unfortunately, it requires careful bookkeeping for the
-  // nonGC case.
-  _Rope_iterator(rope<_CharT,_Alloc>* __r, size_t __pos);
-  
-  void _M_check();
-public:
-  typedef _Rope_char_ref_proxy<_CharT,_Alloc>  reference;
-  typedef _Rope_char_ref_proxy<_CharT,_Alloc>* pointer;
-  typedef _CharT value_type;
-  typedef ptrdiff_t difference_type;
-  typedef random_access_iterator_tag iterator_category;
-public:
-  ~_Rope_iterator() 		//*TY 5/6/00 - added dtor to balance reference count
-  {
-    _RopeRep::_S_unref(this->_M_root);
-  }
-  
-  rope<_CharT,_Alloc>& container() { return *_M_root_rope; }
-  _Rope_iterator() {
-    this->_M_root = 0;  // Needed for reference counting.
-  };
-  _Rope_iterator(const  _Self& __x) :
-    _Rope_iterator_base<_CharT,_Alloc>(__x) {
-    _M_root_rope = __x._M_root_rope;
-    _RopeRep::_S_ref(this->_M_root);
-  }
-  _Rope_iterator(rope<_CharT,_Alloc>& __r, size_t __pos);
-  _Self& operator= (const  _Self& __x) {
-    _RopeRep* __old = this->_M_root;
-    
-    _RopeRep::_S_ref(__x._M_root);
-    if (0 != __x._M_buf_ptr) {
-      _M_root_rope = __x._M_root_rope;
-      *(__STATIC_CAST(_Base*,this)) = __x;
-    } else {
-      this->_M_current_pos = __x._M_current_pos;
-      this->_M_root = __x._M_root;
-      _M_root_rope = __x._M_root_rope;
-      this->_M_buf_ptr = 0;
-    }
-    _RopeRep::_S_unref(__old);
-    return(*this);
-  }
-  reference operator*() {
-    _M_check();
-    if (0 == this->_M_buf_ptr) {
-      return _Rope_char_ref_proxy<_CharT,_Alloc>(
-                                                 _M_root_rope, this->_M_current_pos);
-    } else {
-      return _Rope_char_ref_proxy<_CharT,_Alloc>(
-                                                 _M_root_rope, this->_M_current_pos, *(this->_M_buf_ptr));
-    }
-  }
-  _Self& operator++() {
-    this->_M_incr(1);
-    return *this;
-  }
-  _Self& operator+=(ptrdiff_t __n) {
-    if (__n >= 0) {
-      this->_M_incr(__n);
-    } else {
-      this->_M_decr(-__n);
-    }
-    return *this;
-  }
-  _Self& operator--() {
-    this->_M_decr(1);
-    return *this;
-  }
-  _Self& operator-=(ptrdiff_t __n) {
-    if (__n >= 0) {
-      this->_M_decr(__n);
-    } else {
-      this->_M_incr(-__n);
-    }
-    return *this;
-  }
-  _Self operator++(int) {
-    size_t __old_pos = this->_M_current_pos;
-    this->_M_incr(1);
-    return _Rope_iterator<_CharT,_Alloc>(_M_root_rope, __old_pos);
-  }
-  _Self operator--(int) {
-    size_t __old_pos = this->_M_current_pos;
-    this->_M_decr(1);
-    return _Rope_iterator<_CharT,_Alloc>(_M_root_rope, __old_pos);
-  }
-  reference operator[](ptrdiff_t __n) {
-    return _Rope_char_ref_proxy<_CharT,_Alloc>(
-                                               _M_root_rope, this->_M_current_pos + __n);
-  }
-};
-
-# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES
-template <class _CharT, class _Alloc>
-inline random_access_iterator_tag
-iterator_category(const _Rope_iterator<_CharT,_Alloc>&) {  return random_access_iterator_tag();}
-template <class _CharT, class _Alloc>
-inline _CharT* value_type(const _Rope_iterator<_CharT,_Alloc>&) { return 0; }
-template <class _CharT, class _Alloc>
-inline ptrdiff_t* distance_type(const _Rope_iterator<_CharT,_Alloc>&) { return 0; }
-template <class _CharT, class _Alloc>
-inline random_access_iterator_tag
-iterator_category(const _Rope_const_iterator<_CharT,_Alloc>&) { return random_access_iterator_tag(); }
-template <class _CharT, class _Alloc>
-inline _CharT* value_type(const _Rope_const_iterator<_CharT,_Alloc>&) { return 0; }
-template <class _CharT, class _Alloc>
-inline ptrdiff_t* distance_type(const _Rope_const_iterator<_CharT,_Alloc>&) { return 0; }
-#endif
-
-template <class _CharT, class _Alloc>
-class rope {
-  typedef rope<_CharT,_Alloc> _Self;
-public:
-  typedef _CharT value_type;
-  typedef ptrdiff_t difference_type;
-  typedef size_t size_type;
-  typedef _CharT const_reference;
-  typedef const _CharT* const_pointer;
-  typedef _Rope_iterator<_CharT,_Alloc> iterator;
-  typedef _Rope_const_iterator<_CharT,_Alloc> const_iterator;
-  typedef _Rope_char_ref_proxy<_CharT,_Alloc> reference;
-  typedef _Rope_char_ptr_proxy<_CharT,_Alloc> pointer;
-  
-  friend class _Rope_iterator<_CharT,_Alloc>;
-  friend class _Rope_const_iterator<_CharT,_Alloc>;
-  friend struct _Rope_RopeRep<_CharT,_Alloc>;
-  friend class _Rope_iterator_base<_CharT,_Alloc>;
-  friend class _Rope_char_ptr_proxy<_CharT,_Alloc>;
-  friend class _Rope_char_ref_proxy<_CharT,_Alloc>;
-  friend struct _Rope_RopeSubstring<_CharT,_Alloc>;
-
-  _STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS;
-  
-protected:
-  typedef __GC_CONST _CharT* _Cstrptr;
-  
-  static _CharT _S_empty_c_str[1];
-  
-  static bool _S_is0(_CharT __c) { return __c == _S_eos((_CharT*)0); }
-  enum { _S_copy_max = 23 };
-  // For strings shorter than _S_copy_max, we copy to
-  // concatenate.
-  
-public:
-  typedef _Rope_RopeRep<_CharT, _Alloc> _RopeRep;
-  _STLP_FORCE_ALLOCATORS(_CharT, _Alloc)
-  typedef typename _Alloc_traits<_CharT,_Alloc>::allocator_type  allocator_type;
-  allocator_type get_allocator() const { return allocator_type(_M_tree_ptr); }
-public:
-  // The only data member of a rope:
-  _STLP_alloc_proxy<_RopeRep*, _CharT, allocator_type> _M_tree_ptr;
-
-  typedef _Rope_RopeConcatenation<_CharT,_Alloc> _RopeConcatenation;
-  typedef _Rope_RopeLeaf<_CharT,_Alloc> _RopeLeaf;
-  typedef _Rope_RopeFunction<_CharT,_Alloc> _RopeFunction;
-  typedef _Rope_RopeSubstring<_CharT,_Alloc> _RopeSubstring;
-
-
-
-  // Retrieve a character at the indicated position.
-  static _CharT _S_fetch(_RopeRep* __r, size_type __pos);
-
-#       ifndef __GC
-  // Obtain a pointer to the character at the indicated position.
-  // The pointer can be used to change the character.
-  // If such a pointer cannot be produced, as is frequently the
-  // case, 0 is returned instead.
-  // (Returns nonzero only if all nodes in the path have a refcount
-  // of 1.)
-  static _CharT* _S_fetch_ptr(_RopeRep* __r, size_type __pos);
-#       endif
-
-  static bool _S_apply_to_pieces(
-                                // should be template parameter
-                                 _Rope_char_consumer<_CharT>& __c,
-                                 const _RopeRep* __r,
-                                 size_t __begin, size_t __end);
-                                // begin and end are assumed to be in range.
-
-#       ifndef __GC
-  static void _S_unref(_RopeRep* __t)
-  {
-    _RopeRep::_S_unref(__t);
-  }
-  static void _S_ref(_RopeRep* __t)
-  {
-    _RopeRep::_S_ref(__t);
-  }
-#       else /* __GC */
-  static void _S_unref(_RopeRep*) {}
-  static void _S_ref(_RopeRep*) {}
-#       endif
-
-
-#       ifdef __GC
-  typedef _Rope_RopeRep<_CharT,_Alloc>* _Self_destruct_ptr;
-#       else
-  typedef _Rope_self_destruct_ptr<_CharT,_Alloc> _Self_destruct_ptr;
-#       endif
-
-  // _Result is counted in refcount.
-  static _RopeRep* _S_substring(_RopeRep* __base,
-                                size_t __start, size_t __endp1);
-
-  static _RopeRep* _S_concat_char_iter(_RopeRep* __r,
-                                       const _CharT* __iter, size_t __slen);
-  // Concatenate rope and char ptr, copying __s.
-  // Should really take an arbitrary iterator.
-  // Result is counted in refcount.
-  static _RopeRep* _S_destr_concat_char_iter(_RopeRep* __r,
-                                             const _CharT* __iter, size_t __slen)
-    // As above, but one reference to __r is about to be
-    // destroyed.  Thus the pieces may be recycled if all
-    // relevent reference counts are 1.
-#           ifdef __GC
-    // We can't really do anything since refcounts are unavailable.
-  { return _S_concat_char_iter(__r, __iter, __slen); }
-#           else
-  ;
-#           endif
-
-  static _RopeRep* _S_concat_rep(_RopeRep* __left, _RopeRep* __right);
-  // General concatenation on _RopeRep.  _Result
-  // has refcount of 1.  Adjusts argument refcounts.
-
-public:
-  void apply_to_pieces( size_t __begin, size_t __end,
-                        _Rope_char_consumer<_CharT>& __c) const {
-    _S_apply_to_pieces(__c, _M_tree_ptr._M_data, __begin, __end);
-  }
-
-
-protected:
-
-  static size_t _S_rounded_up_size(size_t __n) {
-    return _RopeRep::_S_rounded_up_size(__n);
-  }
-
-  static size_t _S_allocated_capacity(size_t __n) {
-    if (_S_is_basic_char_type((_CharT*)0)) {
-      return _S_rounded_up_size(__n) - 1;
-    } else {
-      return _S_rounded_up_size(__n);
-    }
-  }
-                
-  // Allocate and construct a RopeLeaf using the supplied allocator
-  // Takes ownership of s instead of copying.
-  static _RopeLeaf* _S_new_RopeLeaf(__GC_CONST _CharT *__s,
-                                    size_t _p_size, allocator_type __a)
-  {
-   _RopeLeaf* __space = _STLP_CREATE_ALLOCATOR(allocator_type,__a, _RopeLeaf).allocate(1,(const void*)0);
-    _STLP_TRY {
-      _STLP_PLACEMENT_NEW(__space) _RopeLeaf(__s, _p_size, __a);
-    }
-   _STLP_UNWIND(_STLP_CREATE_ALLOCATOR(allocator_type,__a, 
-                                   _RopeLeaf).deallocate(__space, 1))
-	  return __space;
-  }
-
-  static _RopeConcatenation* _S_new_RopeConcatenation(
-                                                      _RopeRep* __left, _RopeRep* __right,
-                                                      allocator_type __a)
-  {
-   _RopeConcatenation* __space = _STLP_CREATE_ALLOCATOR(allocator_type,__a,
-                                                    _RopeConcatenation).allocate(1,(const void*)0);
-    return _STLP_PLACEMENT_NEW(__space) _RopeConcatenation(__left, __right, __a);
-  }
-
-  static _RopeFunction* _S_new_RopeFunction(char_producer<_CharT>* __f,
-                                            size_t _p_size, bool __d, allocator_type __a)
-  {
-   _RopeFunction* __space = _STLP_CREATE_ALLOCATOR(allocator_type,__a, 
-                                               _RopeFunction).allocate(1,(const void*)0);
-    return _STLP_PLACEMENT_NEW(__space) _RopeFunction(__f, _p_size, __d, __a);
-  }
-
-  static _RopeSubstring* _S_new_RopeSubstring(
-                                              _Rope_RopeRep<_CharT,_Alloc>* __b, size_t __s,
-                                              size_t __l, allocator_type __a)
-  {
-   _RopeSubstring* __space = _STLP_CREATE_ALLOCATOR(allocator_type,__a, 
-                                                _RopeSubstring).allocate(1,(const void*)0);
-    return _STLP_PLACEMENT_NEW(__space) _RopeSubstring(__b, __s, __l, __a);
-  }
-
-#         define _STLP_ROPE_FROM_UNOWNED_CHAR_PTR(__s, _p_size, __a) \
-                _S_RopeLeaf_from_unowned_char_ptr(__s, _p_size, __a)     
-
-  static
-  _RopeLeaf* _S_RopeLeaf_from_unowned_char_ptr(const _CharT *__s,
-                                               size_t _p_size, allocator_type __a)
-  {
-    if (0 == _p_size) return 0;
-
-   _CharT* __buf = _STLP_CREATE_ALLOCATOR(allocator_type,__a, _CharT).allocate(_S_rounded_up_size(_p_size));
-
-    uninitialized_copy_n(__s, _p_size, __buf);
-    _S_cond_store_eos(__buf[_p_size]);
-
-    _STLP_TRY {
-      return _S_new_RopeLeaf(__buf, _p_size, __a);
-    }
-    _STLP_UNWIND(_RopeRep::_S_free_string(__buf, _p_size, __a))
-            
-# if defined (_STLP_THROW_RETURN_BUG)
-      return 0;
-# endif
-  }
-            
-
-  // Concatenation of nonempty strings.
-  // Always builds a concatenation node.
-  // Rebalances if the result is too deep.
-  // Result has refcount 1.
-  // Does not increment left and right ref counts even though
-  // they are referenced.
-  static _RopeRep*
-  _S_tree_concat(_RopeRep* __left, _RopeRep* __right);
-
-  // Concatenation helper functions
-  static _RopeLeaf*
-  _S_leaf_concat_char_iter(_RopeLeaf* __r,
-                           const _CharT* __iter, size_t __slen);
-  // Concatenate by copying leaf.
-  // should take an arbitrary iterator
-  // result has refcount 1.
-#       ifndef __GC
-  static _RopeLeaf* _S_destr_leaf_concat_char_iter
-  (_RopeLeaf* __r, const _CharT* __iter, size_t __slen);
-  // A version that potentially clobbers __r if __r->_M_ref_count == 1.
-#       endif
-
-
-  // A helper function for exponentiating strings.
-  // This uses a nonstandard refcount convention.
-  // The result has refcount 0.
-  friend struct _Rope_Concat_fn<_CharT,_Alloc>;
-  typedef _Rope_Concat_fn<_CharT,_Alloc> _Concat_fn;
-
-public:
-  static size_t _S_char_ptr_len(const _CharT* __s) {
-    const _CharT* __p = __s;
-	  
-    while (!_S_is0(*__p)) { ++__p; }
-    return (__p - __s);
-  }
-
-public: /* for operators */
-  rope(_RopeRep* __t, const allocator_type& __a = allocator_type())
-    : _M_tree_ptr(__a, __t) { }
-private:
-  // Copy __r to the _CharT buffer.
-  // Returns __buffer + __r->_M_size._M_data.
-  // Assumes that buffer is uninitialized.
-  static _CharT* _S_flatten(_RopeRep* __r, _CharT* __buffer);
-
-  // Again, with explicit starting position and length.
-  // Assumes that buffer is uninitialized.
-  static _CharT* _S_flatten(_RopeRep* __r,
-                            size_t __start, size_t __len,
-                            _CharT* __buffer);
-
-  // fbp : HP aCC prohibits access to protected min_len from within static methods ( ?? )
-public:
-  static const unsigned long _S_min_len[46];
-protected:
-  static bool _S_is_balanced(_RopeRep* __r)
-  { return (__r->_M_size._M_data >= _S_min_len[__r->_M_depth]); }
-
-  static bool _S_is_almost_balanced(_RopeRep* __r)
-  { return (__r->_M_depth == 0 ||
-            __r->_M_size._M_data >= _S_min_len[__r->_M_depth - 1]); }
-
-  static bool _S_is_roughly_balanced(_RopeRep* __r)
-  { return (__r->_M_depth <= 1 ||
-            __r->_M_size._M_data >= _S_min_len[__r->_M_depth - 2]); }
-
-  // Assumes the result is not empty.
-  static _RopeRep* _S_concat_and_set_balanced(_RopeRep* __left,
-                                              _RopeRep* __right)
-  {
-    _RopeRep* __result = _S_concat_rep(__left, __right);
-    if (_S_is_balanced(__result)) __result->_M_is_balanced = true;
-    return __result;
-  }
-
-  // The basic rebalancing operation.  Logically copies the
-  // rope.  The result has refcount of 1.  The client will
-  // usually decrement the reference count of __r.
-  // The result is within height 2 of balanced by the above
-  // definition.
-  static _RopeRep* _S_balance(_RopeRep* __r);
-
-  // Add all unbalanced subtrees to the forest of balanceed trees.
-  // Used only by balance.
-  static void _S_add_to_forest(_RopeRep*__r, _RopeRep** __forest);
-        
-  // Add __r to forest, assuming __r is already balanced.
-  static void _S_add_leaf_to_forest(_RopeRep* __r, _RopeRep** __forest);
-
-  // Print to stdout, exposing structure
-  static void _S_dump(_RopeRep* __r, int __indent = 0);
-
-  // Return -1, 0, or 1 if __x < __y, __x == __y, or __x > __y resp.
-  static int _S_compare(const _RopeRep* __x, const _RopeRep* __y);
-
-public:
-  bool empty() const { return 0 == _M_tree_ptr._M_data; }
-
-  // Comparison member function.  This is public only for those
-  // clients that need a ternary comparison.  Others
-  // should use the comparison operators below.
-  int compare(const _Self& __y) const {
-    return _S_compare(_M_tree_ptr._M_data, __y._M_tree_ptr._M_data);
-  }
-
-  rope(const _CharT* __s, const allocator_type& __a = allocator_type())
-    : _M_tree_ptr(__a, _STLP_ROPE_FROM_UNOWNED_CHAR_PTR(__s, _S_char_ptr_len(__s),__a))
-  { }
-
-  rope(const _CharT* __s, size_t __len,
-       const allocator_type& __a = allocator_type())
-    : _M_tree_ptr(__a, (_STLP_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __len, __a)))
-  { }
-
-  // Should perhaps be templatized with respect to the iterator type
-  // and use Sequence_buffer.  (It should perhaps use sequence_buffer
-  // even now.)
-  rope(const _CharT *__s, const _CharT *__e,
-       const allocator_type& __a = allocator_type())
-    : _M_tree_ptr(__a, _STLP_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __e - __s, __a))
-  { }
-
-  rope(const const_iterator& __s, const const_iterator& __e,
-       const allocator_type& __a = allocator_type())
-    : _M_tree_ptr(__a, _S_substring(__s._M_root, __s._M_current_pos,
-                                    __e._M_current_pos))
-  { }
-
-  rope(const iterator& __s, const iterator& __e,
-       const allocator_type& __a = allocator_type())
-    : _M_tree_ptr(__a, _S_substring(__s._M_root, __s._M_current_pos,
-                                    __e._M_current_pos))
-  { }
-
-  rope(_CharT __c, const allocator_type& __a = allocator_type())
-    : _M_tree_ptr(__a, (_RopeRep*)0)
-  {
-    _CharT* __buf = _M_tree_ptr.allocate(_S_rounded_up_size(1));
-
-    _Construct(__buf, __c);
-    _STLP_TRY {
-      _M_tree_ptr._M_data = _S_new_RopeLeaf(__buf, 1, __a);
-    }
-    _STLP_UNWIND(_RopeRep::_S_free_string(__buf, 1, __a))
-      }
-
-  rope(size_t __n, _CharT __c,     
-       const allocator_type& __a = allocator_type()):
-    _M_tree_ptr(__a, (_RopeRep*)0) {
-    rope<_CharT,_Alloc> __result;
-# define  __exponentiate_threshold size_t(32)
-    _RopeRep* __remainder;
-    rope<_CharT,_Alloc> __remainder_rope;
-	    
-    // gcc-2.7.2 bugs
-    typedef _Rope_Concat_fn<_CharT,_Alloc> _Concat_fn;
-	    
-    if (0 == __n)
-      return;
-	    
-    size_t __exponent = __n / __exponentiate_threshold;
-    size_t __rest = __n % __exponentiate_threshold;
-    if (0 == __rest) {
-      __remainder = 0;
-    } else {
-      _CharT* __rest_buffer = _M_tree_ptr.allocate(_S_rounded_up_size(__rest));
-      uninitialized_fill_n(__rest_buffer, __rest, __c);
-      _S_cond_store_eos(__rest_buffer[__rest]);
-      _STLP_TRY {
-		__remainder = _S_new_RopeLeaf(__rest_buffer, __rest, __a);
-      }
-      _STLP_UNWIND(_RopeRep::_S_free_string(__rest_buffer, __rest, __a))
-		}
-    __remainder_rope._M_tree_ptr._M_data = __remainder;
-    if (__exponent != 0) {
-      _CharT* __base_buffer =
-		_M_tree_ptr.allocate(_S_rounded_up_size(__exponentiate_threshold));
-      _RopeLeaf* __base_leaf;
-      rope<_CharT,_Alloc> __base_rope;
-      uninitialized_fill_n(__base_buffer, __exponentiate_threshold, __c);
-      _S_cond_store_eos(__base_buffer[__exponentiate_threshold]);
-      _STLP_TRY {
-		__base_leaf = _S_new_RopeLeaf(__base_buffer,
-                                      __exponentiate_threshold, __a);
-      }
-      _STLP_UNWIND(_RopeRep::_S_free_string(__base_buffer, 
-                                            __exponentiate_threshold, __a))
-		__base_rope._M_tree_ptr._M_data = __base_leaf;
-      if (1 == __exponent) {
-		__result = __base_rope;
-#         ifndef __GC
-		_STLP_ASSERT(2 == __result._M_tree_ptr._M_data->_M_ref_count)
-		// One each for base_rope and __result
-#         endif
-      } else {
-		__result = power(__base_rope, __exponent, _Concat_fn());
-      }
-      if (0 != __remainder) {
-		__result += __remainder_rope;
-      }
-    } else {
-      __result = __remainder_rope;
-    }
-    _M_tree_ptr._M_data = __result._M_tree_ptr._M_data;
-    _M_tree_ptr._M_data->_M_ref_nonnil();
-# undef __exponentiate_threshold
-  }
-
-  rope(const allocator_type& __a = allocator_type())
-    : _M_tree_ptr(__a, (_RopeRep*)0) {}
-
-  // Construct a rope from a function that can compute its members
-  rope(char_producer<_CharT> *__fn, size_t __len, bool __delete_fn,
-       const allocator_type& __a = allocator_type())
-    : _M_tree_ptr(__a, (_RopeRep*)0)
-  {
-    _M_tree_ptr._M_data = (0 == __len) ?
-      0 : _S_new_RopeFunction(__fn, __len, __delete_fn, __a);
-  }
-
-  rope(const _Self& __x)
-    : _M_tree_ptr(__x.get_allocator(), __x._M_tree_ptr._M_data)
-  {
-    _S_ref(_M_tree_ptr._M_data);
-  }
-
-  ~rope()
-  {
-    _S_unref(_M_tree_ptr._M_data);
-  }
-
-  _Self& operator=(const _Self& __x)
-  {
-    _RopeRep* __old = _M_tree_ptr._M_data;
-    _STLP_ASSERT(get_allocator() == __x.get_allocator())
-    _M_tree_ptr._M_data = __x._M_tree_ptr._M_data;
-    _S_ref(_M_tree_ptr._M_data);
-    _S_unref(__old);
-    return(*this);
-  }
-  void clear()
-  {
-    _S_unref(_M_tree_ptr._M_data);
-    _M_tree_ptr._M_data = 0;
-  }
-  void push_back(_CharT __x)
-  {
-    _RopeRep* __old = _M_tree_ptr._M_data;
-    _M_tree_ptr._M_data = _S_destr_concat_char_iter(_M_tree_ptr._M_data, &__x, 1);
-    _S_unref(__old);
-  }
-
-  void pop_back()
-  {
-    _RopeRep* __old = _M_tree_ptr._M_data;
-    _M_tree_ptr._M_data = 
-      _S_substring(_M_tree_ptr._M_data, 0, _M_tree_ptr._M_data->_M_size._M_data - 1);
-    _S_unref(__old);
-  }
-
-  _CharT back() const
-  {
-    return _S_fetch(_M_tree_ptr._M_data, _M_tree_ptr._M_data->_M_size._M_data - 1);
-  }
-
-  void push_front(_CharT __x)
-  {
-    _RopeRep* __old = _M_tree_ptr._M_data;
-    _RopeRep* __left =
-      _STLP_ROPE_FROM_UNOWNED_CHAR_PTR(&__x, 1, get_allocator());
-    _STLP_TRY {
-      _M_tree_ptr._M_data = _S_concat_rep(__left, _M_tree_ptr._M_data);
-      _S_unref(__old);
-      _S_unref(__left);
-    }
-    _STLP_UNWIND(_S_unref(__left))
-      }
-
-  void pop_front()
-  {
-    _RopeRep* __old = _M_tree_ptr._M_data;
-    _M_tree_ptr._M_data = _S_substring(_M_tree_ptr._M_data, 1, _M_tree_ptr._M_data->_M_size._M_data);
-    _S_unref(__old);
-  }
-
-  _CharT front() const
-  {
-    return _S_fetch(_M_tree_ptr._M_data, 0);
-  }
-
-  void balance()
-  {
-    _RopeRep* __old = _M_tree_ptr._M_data;
-    _M_tree_ptr._M_data = _S_balance(_M_tree_ptr._M_data);
-    _S_unref(__old);
-  }
-
-  void copy(_CharT* __buffer) const {
-    _STLP_STD::_Destroy(__buffer, __buffer + size());
-    _S_flatten(_M_tree_ptr._M_data, __buffer);
-  }
-
-  // This is the copy function from the standard, but
-  // with the arguments reordered to make it consistent with the
-  // rest of the interface.
-  // Note that this guaranteed not to compile if the draft standard
-  // order is assumed.
-  size_type copy(size_type __pos, size_type __n, _CharT* __buffer) const 
-  {
-    size_t _p_size = size();
-    size_t __len = (__pos + __n > _p_size? _p_size - __pos : __n);
-
-    _STLP_STD::_Destroy(__buffer, __buffer + __len);
-    _S_flatten(_M_tree_ptr._M_data, __pos, __len, __buffer);
-    return __len;
-  }
-
-  // Print to stdout, exposing structure.  May be useful for
-  // performance debugging.
-  void dump() {
-    _S_dump(_M_tree_ptr._M_data);
-  }
-
-  // Convert to 0 terminated string in new allocated memory.
-  // Embedded 0s in the input do not terminate the copy.
-  const _CharT* c_str() const;
-
-  // As above, but lso use the flattened representation as the
-  // the new rope representation.
-  const _CharT* replace_with_c_str();
-
-  // Reclaim memory for the c_str generated flattened string.
-  // Intentionally undocumented, since it's hard to say when this
-  // is safe for multiple threads.
-  void delete_c_str () {
-    if (0 == _M_tree_ptr._M_data) return;
-    if (_RopeRep::_S_leaf == _M_tree_ptr._M_data->_M_tag && 
-        ((_RopeLeaf*)_M_tree_ptr._M_data)->_M_data == 
-        _M_tree_ptr._M_data->_M_c_string) {
-      // Representation shared
-      return;
-    }
-#           ifndef __GC
-    _M_tree_ptr._M_data->_M_free_c_string();
-#           endif
-    _M_tree_ptr._M_data->_M_c_string = 0;
-  }
-
-  _CharT operator[] (size_type __pos) const {
-    return _S_fetch(_M_tree_ptr._M_data, __pos);
-  }
-
-  _CharT at(size_type __pos) const {
-    // if (__pos >= size()) throw out_of_range;  // XXX
-    return (*this)[__pos];
-  }
-
-  const_iterator begin() const {
-    return(const_iterator(_M_tree_ptr._M_data, 0));
-  }
-
-  // An easy way to get a const iterator from a non-const container.
-  const_iterator const_begin() const {
-    return(const_iterator(_M_tree_ptr._M_data, 0));
-  }
-
-  const_iterator end() const {
-    return(const_iterator(_M_tree_ptr._M_data, size()));
-  }
-
-  const_iterator const_end() const {
-    return(const_iterator(_M_tree_ptr._M_data, size()));
-  }
-
-  size_type size() const { 
-    return(0 == _M_tree_ptr._M_data? 0 : _M_tree_ptr._M_data->_M_size._M_data);
-  }
-
-  size_type length() const {
-    return size();
-  }
-
-  size_type max_size() const {
-    return _S_min_len[__ROPE_MAX_DEPTH-1] - 1;
-    //  Guarantees that the result can be sufficirntly
-    //  balanced.  Longer ropes will probably still work,
-    //  but it's harder to make guarantees.
-  }
-
-  const_reverse_iterator rbegin() const {
-    return const_reverse_iterator(end());
-  }
-
-  const_reverse_iterator const_rbegin() const {
-    return const_reverse_iterator(end());
-  }
-
-  const_reverse_iterator rend() const {
-    return const_reverse_iterator(begin());
-  }
-
-  const_reverse_iterator const_rend() const {
-    return const_reverse_iterator(begin());
-  }
-  // The symmetric cases are intentionally omitted, since they're presumed
-  // to be less common, and we don't handle them as well.
-
-  // The following should really be templatized.
-  // The first argument should be an input iterator or
-  // forward iterator with value_type _CharT.
-  _Self& append(const _CharT* __iter, size_t __n) {
-    _RopeRep* __result = 
-      _S_destr_concat_char_iter(_M_tree_ptr._M_data, __iter, __n);
-    _S_unref(_M_tree_ptr._M_data);
-    _M_tree_ptr._M_data = __result;
-    return *this;
-  }
-
-  _Self& append(const _CharT* __c_string) {
-    size_t __len = _S_char_ptr_len(__c_string);
-    append(__c_string, __len);
-    return(*this);
-  }
-
-  _Self& append(const _CharT* __s, const _CharT* __e) {
-    _RopeRep* __result =
-      _S_destr_concat_char_iter(_M_tree_ptr._M_data, __s, __e - __s);
-    _S_unref(_M_tree_ptr._M_data);
-    _M_tree_ptr._M_data = __result;
-    return *this;
-  }
-
-  _Self& append(const_iterator __s, const_iterator __e) {
-    _STLP_ASSERT(__s._M_root == __e._M_root)
-    _STLP_ASSERT(get_allocator() == __s._M_root->get_allocator())
-    _Self_destruct_ptr __appendee(_S_substring(
-                                               __s._M_root, __s._M_current_pos, __e._M_current_pos));
-    _RopeRep* __result = 
-      _S_concat_rep(_M_tree_ptr._M_data, (_RopeRep*)__appendee);
-    _S_unref(_M_tree_ptr._M_data);
-    _M_tree_ptr._M_data = __result;
-    return *this;
-  }
-
-  _Self& append(_CharT __c) {
-    _RopeRep* __result = 
-      _S_destr_concat_char_iter(_M_tree_ptr._M_data, &__c, 1);
-    _S_unref(_M_tree_ptr._M_data);
-    _M_tree_ptr._M_data = __result;
-    return *this;
-  }
-
-  _Self& append() { return append(_CharT()); }  // XXX why?
-
-  _Self& append(const _Self& __y) {
-    _STLP_ASSERT(__y.get_allocator() == get_allocator())
-    _RopeRep* __result = _S_concat_rep(_M_tree_ptr._M_data, __y._M_tree_ptr._M_data);
-    _S_unref(_M_tree_ptr._M_data);
-    _M_tree_ptr._M_data = __result;
-    return *this;
-  }
-
-  _Self& append(size_t __n, _CharT __c) {
-    rope<_CharT,_Alloc> __last(__n, __c);
-    return append(__last);
-  }
-
-  void swap(_Self& __b) {
-    _STLP_ASSERT(get_allocator() == __b.get_allocator())
-    _RopeRep* __tmp = _M_tree_ptr._M_data;
-    _M_tree_ptr._M_data = __b._M_tree_ptr._M_data;
-    __b._M_tree_ptr._M_data = __tmp;
-  }
-
-
-protected:
-  // Result is included in refcount.
-  static _RopeRep* replace(_RopeRep* __old, size_t __pos1,
-                           size_t __pos2, _RopeRep* __r) {
-    if (0 == __old) { _S_ref(__r); return __r; }
-    _Self_destruct_ptr __left(
-                              _S_substring(__old, 0, __pos1));
-    _Self_destruct_ptr __right(
-                               _S_substring(__old, __pos2, __old->_M_size._M_data));
-	_STLP_MPWFIX_TRY	//*TY 06/01/2000 - 
-    _RopeRep* __result;
-
-    if (0 == __r) {
-      __result = _S_concat_rep(__left, __right);
-    } else {
-      _STLP_ASSERT(__old->get_allocator() == __r->get_allocator())
-      _Self_destruct_ptr __left_result(_S_concat_rep(__left, __r));
-      __result = _S_concat_rep(__left_result, __right);
-    }
-    return __result;
-	_STLP_MPWFIX_CATCH	//*TY 06/01/2000 - 
-  }
-
-public:
-  void insert(size_t __p, const _Self& __r) {
-    _RopeRep* __result = 
-      replace(_M_tree_ptr._M_data, __p, __p, __r._M_tree_ptr._M_data);
-    _STLP_ASSERT(get_allocator() == __r.get_allocator())
-    _S_unref(_M_tree_ptr._M_data);
-    _M_tree_ptr._M_data = __result;
-  }
-
-  void insert(size_t __p, size_t __n, _CharT __c) {
-    rope<_CharT,_Alloc> __r(__n,__c);
-    insert(__p, __r);
-  }
-
-  void insert(size_t __p, const _CharT* __i, size_t __n) {
-    _Self_destruct_ptr __left(_S_substring(_M_tree_ptr._M_data, 0, __p));
-    _Self_destruct_ptr __right(_S_substring(_M_tree_ptr._M_data, __p, size()));
-    _Self_destruct_ptr __left_result(
-                                     _S_concat_char_iter(__left, __i, __n));
-    // _S_ destr_concat_char_iter should be safe here.
-    // But as it stands it's probably not a win, since __left
-    // is likely to have additional references.
-    _RopeRep* __result = _S_concat_rep(__left_result, __right);
-    _S_unref(_M_tree_ptr._M_data);
-    _M_tree_ptr._M_data = __result;
-  }
-
-  void insert(size_t __p, const _CharT* __c_string) {
-    insert(__p, __c_string, _S_char_ptr_len(__c_string));
-  }
-
-  void insert(size_t __p, _CharT __c) {
-    insert(__p, &__c, 1);
-  }
-
-  void insert(size_t __p) {
-    _CharT __c = _CharT();
-    insert(__p, &__c, 1);
-  }
-
-  void insert(size_t __p, const _CharT* __i, const _CharT* __j) {
-    _Self __r(__i, __j);
-    insert(__p, __r);
-  }
-
-  void insert(size_t __p, const const_iterator& __i,
-              const const_iterator& __j) {
-    _Self __r(__i, __j);
-    insert(__p, __r);
-  }
-
-  void insert(size_t __p, const iterator& __i,
-              const iterator& __j) {
-    _Self __r(__i, __j);
-    insert(__p, __r);
-  }
-
-  // (position, length) versions of replace operations:
-
-  void replace(size_t __p, size_t __n, const _Self& __r) {
-    _RopeRep* __result = 
-      replace(_M_tree_ptr._M_data, __p, __p + __n, __r._M_tree_ptr._M_data);
-    _S_unref(_M_tree_ptr._M_data);
-    _M_tree_ptr._M_data = __result;
-  }
-
-  void replace(size_t __p, size_t __n, 
-               const _CharT* __i, size_t __i_len) {
-    _Self __r(__i, __i_len);
-    replace(__p, __n, __r);
-  }
-
-  void replace(size_t __p, size_t __n, _CharT __c) {
-    _Self __r(__c);
-    replace(__p, __n, __r);
-  }
-
-  void replace(size_t __p, size_t __n, const _CharT* __c_string) {
-    _Self __r(__c_string);
-    replace(__p, __n, __r);
-  }
-
-  void replace(size_t __p, size_t __n, 
-               const _CharT* __i, const _CharT* __j) {
-    _Self __r(__i, __j);
-    replace(__p, __n, __r);
-  }
-
-  void replace(size_t __p, size_t __n,
-               const const_iterator& __i, const const_iterator& __j) {
-    _Self __r(__i, __j);
-    replace(__p, __n, __r);
-  }
-
-  void replace(size_t __p, size_t __n,
-               const iterator& __i, const iterator& __j) {
-    _Self __r(__i, __j);
-    replace(__p, __n, __r);
-  }
-
-  // Single character variants:
-  void replace(size_t __p, _CharT __c) {
-    iterator __i(this, __p);
-    *__i = __c;
-  }
-
-  void replace(size_t __p, const _Self& __r) {
-    replace(__p, 1, __r);
-  }
-
-  void replace(size_t __p, const _CharT* __i, size_t __i_len) {
-    replace(__p, 1, __i, __i_len);
-  }
-
-  void replace(size_t __p, const _CharT* __c_string) {
-    replace(__p, 1, __c_string);
-  }
-
-  void replace(size_t __p, const _CharT* __i, const _CharT* __j) {
-    replace(__p, 1, __i, __j);
-  }
-
-  void replace(size_t __p, const const_iterator& __i,
-               const const_iterator& __j) {
-    replace(__p, 1, __i, __j);
-  }
-
-  void replace(size_t __p, const iterator& __i,
-               const iterator& __j) {
-    replace(__p, 1, __i, __j);
-  }
-
-  // Erase, (position, size) variant.
-  void erase(size_t __p, size_t __n) {
-    _RopeRep* __result = replace(_M_tree_ptr._M_data, __p, __p + __n, 0);
-    _S_unref(_M_tree_ptr._M_data);
-    _M_tree_ptr._M_data = __result;
-  }
-
-  // Erase, single character
-  void erase(size_t __p) {
-    erase(__p, __p + 1);
-  }
-
-  // Insert, iterator variants.  
-  iterator insert(const iterator& __p, const _Self& __r)
-  { insert(__p.index(), __r); return __p; }
-  iterator insert(const iterator& __p, size_t __n, _CharT __c)
-  { insert(__p.index(), __n, __c); return __p; }
-  iterator insert(const iterator& __p, _CharT __c) 
-  { insert(__p.index(), __c); return __p; }
-  iterator insert(const iterator& __p ) 
-  { insert(__p.index()); return __p; }
-  iterator insert(const iterator& __p, const _CharT* c_string) 
-  { insert(__p.index(), c_string); return __p; }
-  iterator insert(const iterator& __p, const _CharT* __i, size_t __n)
-  { insert(__p.index(), __i, __n); return __p; }
-  iterator insert(const iterator& __p, const _CharT* __i, 
-                  const _CharT* __j)
-  { insert(__p.index(), __i, __j);  return __p; }
-  iterator insert(const iterator& __p,
-                  const const_iterator& __i, const const_iterator& __j)
-  { insert(__p.index(), __i, __j); return __p; }
-  iterator insert(const iterator& __p,
-                  const iterator& __i, const iterator& __j)
-  { insert(__p.index(), __i, __j); return __p; }
-
-  // Replace, range variants.
-  void replace(const iterator& __p, const iterator& __q,
-               const _Self& __r)
-  { replace(__p.index(), __q.index() - __p.index(), __r); }
-  void replace(const iterator& __p, const iterator& __q, _CharT __c)
-  { replace(__p.index(), __q.index() - __p.index(), __c); }
-  void replace(const iterator& __p, const iterator& __q,
-               const _CharT* __c_string)
-  { replace(__p.index(), __q.index() - __p.index(), __c_string); }
-  void replace(const iterator& __p, const iterator& __q,
-               const _CharT* __i, size_t __n)
-  { replace(__p.index(), __q.index() - __p.index(), __i, __n); }
-  void replace(const iterator& __p, const iterator& __q,
-               const _CharT* __i, const _CharT* __j)
-  { replace(__p.index(), __q.index() - __p.index(), __i, __j); }
-  void replace(const iterator& __p, const iterator& __q,
-               const const_iterator& __i, const const_iterator& __j)
-  { replace(__p.index(), __q.index() - __p.index(), __i, __j); }
-  void replace(const iterator& __p, const iterator& __q,
-               const iterator& __i, const iterator& __j)
-  { replace(__p.index(), __q.index() - __p.index(), __i, __j); }
-
-  // Replace, iterator variants.
-  void replace(const iterator& __p, const _Self& __r)
-  { replace(__p.index(), __r); }
-  void replace(const iterator& __p, _CharT __c)
-  { replace(__p.index(), __c); }
-  void replace(const iterator& __p, const _CharT* __c_string)
-  { replace(__p.index(), __c_string); }
-  void replace(const iterator& __p, const _CharT* __i, size_t __n)
-  { replace(__p.index(), __i, __n); }
-  void replace(const iterator& __p, const _CharT* __i, const _CharT* __j)
-  { replace(__p.index(), __i, __j); }
-  void replace(const iterator& __p, const_iterator __i, 
-               const_iterator __j)
-  { replace(__p.index(), __i, __j); }
-  void replace(const iterator& __p, iterator __i, iterator __j)
-  { replace(__p.index(), __i, __j); }
-
-  // Iterator and range variants of erase
-  iterator erase(const iterator& __p, const iterator& __q) {
-    size_t __p_index = __p.index();
-    erase(__p_index, __q.index() - __p_index);
-    return iterator(this, __p_index);
-  }
-  iterator erase(const iterator& __p) {
-    size_t __p_index = __p.index();
-    erase(__p_index, 1);
-    return iterator(this, __p_index);
-  }
-
-  _Self substr(size_t __start, size_t __len = 1) const {
-    return rope<_CharT,_Alloc>(
-                               _S_substring(_M_tree_ptr._M_data, __start, __start + __len));
-  }
-
-  _Self substr(iterator __start, iterator __end) const {
-    return rope<_CharT,_Alloc>(
-                               _S_substring(_M_tree_ptr._M_data, __start.index(), __end.index()));
-  }
-        
-  _Self substr(iterator __start) const {
-    size_t __pos = __start.index();
-    return rope<_CharT,_Alloc>(
-                               _S_substring(_M_tree_ptr._M_data, __pos, __pos + 1));
-  }
-        
-  _Self substr(const_iterator __start, const_iterator __end) const {
-    // This might eventually take advantage of the cache in the
-    // iterator.
-    return rope<_CharT,_Alloc>(
-                               _S_substring(_M_tree_ptr._M_data, __start.index(), __end.index()));
-  }
-
-  rope<_CharT,_Alloc> substr(const_iterator __start) {
-    size_t __pos = __start.index();
-    return rope<_CharT,_Alloc>(
-                               _S_substring(_M_tree_ptr._M_data, __pos, __pos + 1));
-  }
-
-  enum { npos = -1 };
-
-  //         static const size_type npos;
-
-  size_type find(_CharT __c, size_type __pos = 0) const;
-  size_type find(const _CharT* __s, size_type __pos = 0) const {
-    size_type __result_pos;
-    const_iterator __result = search(const_begin() + (ptrdiff_t)__pos, const_end(),
-                                     __s, __s + _S_char_ptr_len(__s));
-    __result_pos = __result.index();
-#           ifndef _STLP_OLD_ROPE_SEMANTICS
-    if (__result_pos == size()) __result_pos = npos;
-#           endif
-    return __result_pos;
-  }
-
-  iterator mutable_begin() {
-    return(iterator(this, 0));
-  }
-
-  iterator mutable_end() {
-    return(iterator(this, size()));
-  }
-
-  reverse_iterator mutable_rbegin() {
-    return reverse_iterator(mutable_end());
-  }
-
-  reverse_iterator mutable_rend() {
-    return reverse_iterator(mutable_begin());
-  }
-
-  reference mutable_reference_at(size_type __pos) {
-    return reference(this, __pos);
-  }
-
-#       ifdef __STD_STUFF
-  reference operator[] (size_type __pos) {
-    return reference(this, __pos);
-  }
-
-  reference at(size_type __pos) {
-    // if (__pos >= size()) throw out_of_range;  // XXX
-    return (*this)[__pos];
-  }
-
-  void resize(size_type, _CharT) {}
-  void resize(size_type) {}
-  void reserve(size_type = 0) {}
-  size_type capacity() const {
-    return max_size();
-  }
-
-  // Stuff below this line is dangerous because it's error prone.
-  // I would really like to get rid of it.
-  // copy function with funny arg ordering.
-  size_type copy(_CharT* __buffer, size_type __n, 
-                 size_type __pos = 0) const {
-    return copy(__pos, __n, __buffer);
-  }
-
-  iterator end() { return mutable_end(); }
-
-  iterator begin() { return mutable_begin(); }
-
-  reverse_iterator rend() { return mutable_rend(); }
-
-  reverse_iterator rbegin() { return mutable_rbegin(); }
-
-#       else
-
-  const_iterator end() { return const_end(); }
-
-  const_iterator begin() { return const_begin(); }
-
-  const_reverse_iterator rend() { return const_rend(); }
-  
-  const_reverse_iterator rbegin() { return const_rbegin(); }
-
-#	endif
-
-  __ROPE_DEFINE_ALLOCS(_Alloc, _M_tree_ptr)
-    };
-
-# undef __ROPE_DEFINE_ALLOC
-# undef __ROPE_DEFINE_ALLOCS
-
-template <class _CharT, class _Alloc>
-inline _CharT 
-_Rope_const_iterator< _CharT, _Alloc>::operator[](size_t __n)
-{
-  return rope<_CharT,_Alloc>::_S_fetch(this->_M_root, this->_M_current_pos + __n);
-}
-
-template <class _CharT, class _Alloc>
-inline bool operator== (const _Rope_const_iterator<_CharT,_Alloc>& __x,
-                        const _Rope_const_iterator<_CharT,_Alloc>& __y) {
-  return (__x._M_current_pos == __y._M_current_pos && 
-          __x._M_root == __y._M_root);
-}
-
-template <class _CharT, class _Alloc>
-inline bool operator< (const _Rope_const_iterator<_CharT,_Alloc>& __x,
-                       const _Rope_const_iterator<_CharT,_Alloc>& __y) {
-  return (__x._M_current_pos < __y._M_current_pos);
-}
-
-#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE
-
-template <class _CharT, class _Alloc>
-inline bool operator!= (const _Rope_const_iterator<_CharT,_Alloc>& __x,
-                        const _Rope_const_iterator<_CharT,_Alloc>& __y) {
-  return !(__x == __y);
-}
-
-template <class _CharT, class _Alloc>
-inline bool operator> (const _Rope_const_iterator<_CharT,_Alloc>& __x,
-                       const _Rope_const_iterator<_CharT,_Alloc>& __y) {
-  return __y < __x;
-}
-
-template <class _CharT, class _Alloc>
-inline bool operator<= (const _Rope_const_iterator<_CharT,_Alloc>& __x,
-                        const _Rope_const_iterator<_CharT,_Alloc>& __y) {
-  return !(__y < __x);
-}
-
-template <class _CharT, class _Alloc>
-inline bool operator>= (const _Rope_const_iterator<_CharT,_Alloc>& __x,
-                        const _Rope_const_iterator<_CharT,_Alloc>& __y) {
-  return !(__x < __y);
-}
-
-#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */
-
-template <class _CharT, class _Alloc>
-inline ptrdiff_t operator-(const _Rope_const_iterator<_CharT,_Alloc>& __x,
-                           const _Rope_const_iterator<_CharT,_Alloc>& __y) {
-  return (ptrdiff_t)__x._M_current_pos - (ptrdiff_t)__y._M_current_pos;
-}
-
-#if !defined( __MWERKS__ ) || __MWERKS__ >= 0x2000		// dwa 8/21/97  - "ambiguous access to overloaded function" bug.
-template <class _CharT, class _Alloc>
-inline _Rope_const_iterator<_CharT,_Alloc>
-operator-(const _Rope_const_iterator<_CharT,_Alloc>& __x, ptrdiff_t __n) {
-  return _Rope_const_iterator<_CharT,_Alloc>(
-                                             __x._M_root, __x._M_current_pos - __n);
-}
-# endif
-
-template <class _CharT, class _Alloc>
-inline _Rope_const_iterator<_CharT,_Alloc>
-operator+(const _Rope_const_iterator<_CharT,_Alloc>& __x, ptrdiff_t __n) {
-  return _Rope_const_iterator<_CharT,_Alloc>(
-                                             __x._M_root, __x._M_current_pos + __n);
-}
-
-template <class _CharT, class _Alloc>
-inline _Rope_const_iterator<_CharT,_Alloc>
-operator+(ptrdiff_t __n, const _Rope_const_iterator<_CharT,_Alloc>& __x) {
-  return _Rope_const_iterator<_CharT,_Alloc>(
-                                             __x._M_root, __x._M_current_pos + __n);
-}
-
-template <class _CharT, class _Alloc>
-inline bool operator== (const _Rope_iterator<_CharT,_Alloc>& __x,
-                        const _Rope_iterator<_CharT,_Alloc>& __y) {
-  return (__x._M_current_pos == __y._M_current_pos && 
-          __x._M_root_rope == __y._M_root_rope);
-}
-
-template <class _CharT, class _Alloc>
-inline bool operator< (const _Rope_iterator<_CharT,_Alloc>& __x,
-                       const _Rope_iterator<_CharT,_Alloc>& __y) {
-  return (__x._M_current_pos < __y._M_current_pos);
-}
-
-#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE
-
-template <class _CharT, class _Alloc>
-inline bool operator!= (const _Rope_iterator<_CharT,_Alloc>& __x,
-                        const _Rope_iterator<_CharT,_Alloc>& __y) {
-  return !(__x == __y);
-}
-
-template <class _CharT, class _Alloc>
-inline bool operator> (const _Rope_iterator<_CharT,_Alloc>& __x,
-                       const _Rope_iterator<_CharT,_Alloc>& __y) {
-  return __y < __x;
-}
-
-template <class _CharT, class _Alloc>
-inline bool operator<= (const _Rope_iterator<_CharT,_Alloc>& __x,
-                        const _Rope_iterator<_CharT,_Alloc>& __y) {
-  return !(__y < __x);
-}
-
-template <class _CharT, class _Alloc>
-inline bool operator>= (const _Rope_iterator<_CharT,_Alloc>& __x,
-                        const _Rope_iterator<_CharT,_Alloc>& __y) {
-  return !(__x < __y);
-}
-
-#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */
-
-template <class _CharT, class _Alloc>
-inline ptrdiff_t operator-(const _Rope_iterator<_CharT,_Alloc>& __x,
-                           const _Rope_iterator<_CharT,_Alloc>& __y) {
-  return (ptrdiff_t)__x._M_current_pos - (ptrdiff_t)__y._M_current_pos;
-}
-
-#if !defined( __MWERKS__ ) || __MWERKS__ >= 0x2000		// dwa 8/21/97  - "ambiguous access to overloaded function" bug.
-template <class _CharT, class _Alloc>
-inline _Rope_iterator<_CharT,_Alloc>
-operator-(const _Rope_iterator<_CharT,_Alloc>& __x,
-          ptrdiff_t __n) {
-  return _Rope_iterator<_CharT,_Alloc>(
-                                       __x._M_root_rope, __x._M_current_pos - __n);
-}
-# endif
-
-template <class _CharT, class _Alloc>
-inline _Rope_iterator<_CharT,_Alloc>
-operator+(const _Rope_iterator<_CharT,_Alloc>& __x,
-          ptrdiff_t __n) {
-  return _Rope_iterator<_CharT,_Alloc>(
-                                       __x._M_root_rope, __x._M_current_pos + __n);
-}
-
-template <class _CharT, class _Alloc>
-inline _Rope_iterator<_CharT,_Alloc>
-operator+(ptrdiff_t __n, const _Rope_iterator<_CharT,_Alloc>& __x) {
-  return _Rope_iterator<_CharT,_Alloc>(
-                                       __x._M_root_rope, __x._M_current_pos + __n);
-}
-
-template <class _CharT, class _Alloc>
-inline
-rope<_CharT,_Alloc>
-operator+ (const rope<_CharT,_Alloc>& __left,
-           const rope<_CharT,_Alloc>& __right)
-{
-  _STLP_ASSERT(__left.get_allocator() == __right.get_allocator())
-  return rope<_CharT,_Alloc>(rope<_CharT,_Alloc>::_S_concat_rep(__left._M_tree_ptr._M_data, __right._M_tree_ptr._M_data));
-  // Inlining this should make it possible to keep __left and
-  // __right in registers.
-}
-
-template <class _CharT, class _Alloc>
-inline
-rope<_CharT,_Alloc>&
-operator+= (rope<_CharT,_Alloc>& __left, 
-            const rope<_CharT,_Alloc>& __right)
-{
-  __left.append(__right);
-  return __left;
-}
-
-template <class _CharT, class _Alloc>
-inline
-rope<_CharT,_Alloc>
-operator+ (const rope<_CharT,_Alloc>& __left,
-           const _CharT* __right) {
-  size_t __rlen = rope<_CharT,_Alloc>::_S_char_ptr_len(__right);
-  return rope<_CharT,_Alloc>(
-                             rope<_CharT,_Alloc>::_S_concat_char_iter(
-                                                                      __left._M_tree_ptr._M_data, __right, __rlen)); 
-}
-
-template <class _CharT, class _Alloc>
-inline
-rope<_CharT,_Alloc>&
-operator+= (rope<_CharT,_Alloc>& __left,
-            const _CharT* __right) {
-  __left.append(__right);
-  return __left;
-}
-
-template <class _CharT, class _Alloc>
-inline
-rope<_CharT,_Alloc>
-operator+ (const rope<_CharT,_Alloc>& __left, _STLP_SIMPLE_TYPE(_CharT) __right) {
-  return rope<_CharT,_Alloc>(
-                             rope<_CharT,_Alloc>::_S_concat_char_iter(
-                                                                      __left._M_tree_ptr._M_data, &__right, 1));
-}
-
-template <class _CharT, class _Alloc>
-inline
-rope<_CharT,_Alloc>&
-operator+= (rope<_CharT,_Alloc>& __left, _STLP_SIMPLE_TYPE(_CharT) __right) {
-  __left.append(__right);
-  return __left;
-}
-
-template <class _CharT, class _Alloc>
-inline bool
-operator< (const rope<_CharT,_Alloc>& __left, 
-           const rope<_CharT,_Alloc>& __right) {
-  return __left.compare(__right) < 0;
-}
-        
-template <class _CharT, class _Alloc>
-inline bool
-operator== (const rope<_CharT,_Alloc>& __left, 
-            const rope<_CharT,_Alloc>& __right) {
-  return __left.compare(__right) == 0;
-}
-
-#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE
-
-template <class _CharT, class _Alloc>
-inline bool
-operator!= (const rope<_CharT,_Alloc>& __x, const rope<_CharT,_Alloc>& __y) {
-  return !(__x == __y);
-}
-
-template <class _CharT, class _Alloc>
-inline bool
-operator> (const rope<_CharT,_Alloc>& __x, const rope<_CharT,_Alloc>& __y) {
-  return __y < __x;
-}
-
-template <class _CharT, class _Alloc>
-inline bool
-operator<= (const rope<_CharT,_Alloc>& __x, const rope<_CharT,_Alloc>& __y) {
-  return !(__y < __x);
-}
-
-template <class _CharT, class _Alloc>
-inline bool
-operator>= (const rope<_CharT,_Alloc>& __x, const rope<_CharT,_Alloc>& __y) {
-  return !(__x < __y);
-}
-
-template <class _CharT, class _Alloc>
-inline bool operator!= (const _Rope_char_ptr_proxy<_CharT,_Alloc>& __x,
-                        const _Rope_char_ptr_proxy<_CharT,_Alloc>& __y) {
-  return !(__x == __y);
-}
-
-#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */
-
-template <class _CharT, class _Alloc>
-inline bool operator== (const _Rope_char_ptr_proxy<_CharT,_Alloc>& __x,
-                        const _Rope_char_ptr_proxy<_CharT,_Alloc>& __y) {
-  return (__x._M_pos == __y._M_pos && __x._M_root == __y._M_root);
-}
-
-#ifdef _STLP_USE_NEW_IOSTREAMS
-template<class _CharT, class _Traits, class _Alloc>
-basic_ostream<_CharT, _Traits>& operator<< (
-                                            basic_ostream<_CharT, _Traits>& __o,
-                                            const rope<_CharT, _Alloc>& __r);
-#elif ! defined (_STLP_USE_NO_IOSTREAMS)
-template<class _CharT, class _Alloc>
-ostream& operator<< (ostream& __o, const rope<_CharT,_Alloc>& __r);        
-#endif
-        
-typedef rope<char, _STLP_DEFAULT_ALLOCATOR(char) > crope;
-# ifdef _STLP_HAS_WCHAR_T
-typedef rope<wchar_t, _STLP_DEFAULT_ALLOCATOR(wchar_t) > wrope;
-# endif
-
-inline crope::reference __mutable_reference_at(crope& __c, size_t __i)
-{
-  return __c.mutable_reference_at(__i);
-}
-
-# ifdef _STLP_HAS_WCHAR_T
-inline wrope::reference __mutable_reference_at(wrope& __c, size_t __i)
-{
-  return __c.mutable_reference_at(__i);
-}
-# endif
-
-#ifdef _STLP_FUNCTION_TMPL_PARTIAL_ORDER
-
-template <class _CharT, class _Alloc>
-inline void swap(rope<_CharT,_Alloc>& __x, rope<_CharT,_Alloc>& __y) {
-  __x.swap(__y);
-}
-#else
-
-inline void swap(crope& __x, crope& __y) { __x.swap(__y); }
-# ifdef _STLP_HAS_WCHAR_T	// dwa 8/21/97
-inline void swap(wrope& __x, wrope& __y) { __x.swap(__y); }
-# endif
-
-#endif /* _STLP_FUNCTION_TMPL_PARTIAL_ORDER */
-
-
-// Hash functions should probably be revisited later:
-_STLP_TEMPLATE_NULL struct hash<crope>
-{
-  size_t operator()(const crope& __str) const
-  {
-    size_t _p_size = __str.size();
-
-    if (0 == _p_size) return 0;
-    return 13*__str[0] + 5*__str[_p_size - 1] + _p_size;
-  }
-};
-
-# ifdef _STLP_HAS_WCHAR_T	// dwa 8/21/97
-_STLP_TEMPLATE_NULL struct hash<wrope>
-{
-  size_t operator()(const wrope& __str) const
-  {
-    size_t _p_size = __str.size();
-
-    if (0 == _p_size) return 0;
-    return 13*__str[0] + 5*__str[_p_size - 1] + _p_size;
-  }
-};
-#endif
-
-#ifndef _STLP_MSVC
-// I couldn't get this to work with VC++
-template<class _CharT,class _Alloc>
-void
-_Rope_rotate(_Rope_iterator<_CharT,_Alloc> __first,
-             _Rope_iterator<_CharT,_Alloc> __middle,
-             _Rope_iterator<_CharT,_Alloc> __last);
-
-#if !defined(__GNUC__)
-// Appears to confuse g++
-inline void rotate(_Rope_iterator<char,_STLP_DEFAULT_ALLOCATOR(char) > __first,
-                   _Rope_iterator<char,_STLP_DEFAULT_ALLOCATOR(char) > __middle,
-                   _Rope_iterator<char,_STLP_DEFAULT_ALLOCATOR(char) > __last) {
-  _Rope_rotate(__first, __middle, __last);
-}
-#endif
-
-#endif
-
-template <class _CharT, class _Alloc>
-inline _Rope_char_ref_proxy<_CharT, _Alloc>::operator _CharT () const
-{
-  if (_M_current_valid) {
-	return _M_current;
-  } else {
-    return _My_rope::_S_fetch(_M_root->_M_tree_ptr._M_data, _M_pos);
-  }
-}
-_STLP_END_NAMESPACE
-
-# if !defined (_STLP_LINK_TIME_INSTANTIATION)
-#  include <stl/_rope.c>
-# endif
-
-# endif /* _STLP_INTERNAL_ROPE_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_set.h b/src/STLport/stl/_set.h
deleted file mode 100644
index 3f795a4..0000000
--- a/src/STLport/stl/_set.h
+++ /dev/null
@@ -1,372 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_SET_H
-#define _STLP_INTERNAL_SET_H
-
-#ifndef _STLP_INTERNAL_TREE_H
-#include <stl/_tree.h>
-#endif
-
-#define set __WORKAROUND_RENAME(set)
-#define multiset __WORKAROUND_RENAME(multiset)
-
-_STLP_BEGIN_NAMESPACE
-
-template <class _Key, __DFL_TMPL_PARAM(_Compare,less<_Key>), 
-                     _STLP_DEFAULT_ALLOCATOR_SELECT(_Key) >
-class set {
-public:
-// typedefs:
-  typedef _Key     key_type;
-  typedef _Key     value_type;
-  typedef _Compare key_compare;
-  typedef _Compare value_compare;
-private:
-  typedef _Rb_tree<key_type, value_type, 
-    _Identity<value_type>, key_compare, _Alloc> _Rep_type;
-public:
-  typedef typename _Rep_type::pointer pointer;
-  typedef typename _Rep_type::const_pointer const_pointer;
-  typedef typename _Rep_type::reference reference;
-  typedef typename _Rep_type::const_reference const_reference;
-  typedef typename _Rep_type::const_iterator const_iterator;
-  typedef const_iterator iterator;
-  typedef typename _Rep_type::const_reverse_iterator reverse_iterator;
-  typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
-  typedef typename _Rep_type::size_type size_type;
-  typedef typename _Rep_type::difference_type difference_type;
-  typedef typename _Rep_type::allocator_type allocator_type;
-
-private:
-  _Rep_type _M_t;  // red-black tree representing set
-public:
-
-  // allocation/deallocation
-
-  set() : _M_t(_Compare(), allocator_type()) {}
-  explicit set(const _Compare& __comp,
-	       const allocator_type& __a = allocator_type())
-    : _M_t(__comp, __a) {}
-
-#ifdef _STLP_MEMBER_TEMPLATES
-  template <class _InputIterator>
-  set(_InputIterator __first, _InputIterator __last)
-    : _M_t(_Compare(), allocator_type())
-    { _M_t.insert_unique(__first, __last); }
-
-# ifdef _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS
-  template <class _InputIterator>
-  set(_InputIterator __first, _InputIterator __last, const _Compare& __comp)
-    : _M_t(__comp, allocator_type()) { _M_t.insert_unique(__first, __last); }
-# endif
-  template <class _InputIterator>
-  set(_InputIterator __first, _InputIterator __last, const _Compare& __comp,
-      const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL)
-    : _M_t(__comp, __a) { _M_t.insert_unique(__first, __last); }
-#else
-  set(const value_type* __first, const value_type* __last) 
-    : _M_t(_Compare(), allocator_type()) 
-    { _M_t.insert_unique(__first, __last); }
-
-  set(const value_type* __first, 
-      const value_type* __last, const _Compare& __comp,
-      const allocator_type& __a = allocator_type())
-    : _M_t(__comp, __a) { _M_t.insert_unique(__first, __last); }
-
-  set(const_iterator __first, const_iterator __last)
-    : _M_t(_Compare(), allocator_type()) 
-    { _M_t.insert_unique(__first, __last); }
-
-  set(const_iterator __first, const_iterator __last, const _Compare& __comp,
-      const allocator_type& __a = allocator_type())
-    : _M_t(__comp, __a) { _M_t.insert_unique(__first, __last); }
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-  set(const set<_Key,_Compare,_Alloc>& __x) : _M_t(__x._M_t) {}
-  set<_Key,_Compare,_Alloc>& operator=(const set<_Key, _Compare, _Alloc>& __x)
-  { 
-    _M_t = __x._M_t; 
-    return *this;
-  }
-
-  // accessors:
-
-  key_compare key_comp() const { return _M_t.key_comp(); }
-  value_compare value_comp() const { return _M_t.key_comp(); }
-  allocator_type get_allocator() const { return _M_t.get_allocator(); }
-
-  iterator begin() const { return _M_t.begin(); }
-  iterator end() const { return _M_t.end(); }
-  reverse_iterator rbegin() const { return _M_t.rbegin(); } 
-  reverse_iterator rend() const { return _M_t.rend(); }
-  bool empty() const { return _M_t.empty(); }
-  size_type size() const { return _M_t.size(); }
-  size_type max_size() const { return _M_t.max_size(); }
-  void swap(set<_Key,_Compare,_Alloc>& __x) { _M_t.swap(__x._M_t); }
-
-  // insert/erase
-  pair<iterator,bool> insert(const value_type& __x) { 
-    typedef typename _Rep_type::iterator _Rep_iterator;
-    pair<_Rep_iterator, bool> __p = _M_t.insert_unique(__x); 
-    return pair<iterator, bool>(__REINTERPRET_CAST(const iterator&,__p.first), __p.second);
-  }
-  iterator insert(iterator __position, const value_type& __x) {
-    typedef typename _Rep_type::iterator _Rep_iterator;
-    return _M_t.insert_unique((_Rep_iterator&)__position, __x);
-  }
-#ifdef _STLP_MEMBER_TEMPLATES
-  template <class _InputIterator>
-  void insert(_InputIterator __first, _InputIterator __last) {
-    _M_t.insert_unique(__first, __last);
-  }
-#else
-  void insert(const_iterator __first, const_iterator __last) {
-    _M_t.insert_unique(__first, __last);
-  }
-  void insert(const value_type* __first, const value_type* __last) {
-    _M_t.insert_unique(__first, __last);
-  }
-#endif /* _STLP_MEMBER_TEMPLATES */
-  void erase(iterator __position) { 
-    typedef typename _Rep_type::iterator _Rep_iterator;
-    _M_t.erase((_Rep_iterator&)__position); 
-  }
-  size_type erase(const key_type& __x) { 
-    return _M_t.erase(__x); 
-  }
-  void erase(iterator __first, iterator __last) { 
-    typedef typename _Rep_type::iterator _Rep_iterator;
-    _M_t.erase((_Rep_iterator&)__first, (_Rep_iterator&)__last); 
-  }
-  void clear() { _M_t.clear(); }
-
-  // set operations:
-# if defined(_STLP_MEMBER_TEMPLATES) && ! defined ( _STLP_NO_EXTENSIONS )
-  template <class _KT>
-  iterator find(const _KT& __x) const { return _M_t.find(__x); }
-# else
-  iterator find(const key_type& __x) const { return _M_t.find(__x); }
-# endif
-  size_type count(const key_type& __x) const { 
-    return _M_t.find(__x) == _M_t.end() ? 0 : 1 ; 
-  }
-  iterator lower_bound(const key_type& __x) const {
-    return _M_t.lower_bound(__x);
-  }
-  iterator upper_bound(const key_type& __x) const {
-    return _M_t.upper_bound(__x); 
-  }
-  pair<iterator,iterator> equal_range(const key_type& __x) const {
-    return _M_t.equal_range(__x);
-  }
-};
-
-template <class _Key, __DFL_TMPL_PARAM(_Compare,less<_Key>), 
-                     _STLP_DEFAULT_ALLOCATOR_SELECT(_Key) >
-class multiset {
-public:
-  // typedefs:
-
-  typedef _Key     key_type;
-  typedef _Key     value_type;
-  typedef _Compare key_compare;
-  typedef _Compare value_compare;
-private:
-  typedef _Rb_tree<key_type, value_type, 
-                  _Identity<value_type>, key_compare, _Alloc> _Rep_type;
-public:
-  typedef typename _Rep_type::pointer pointer;
-  typedef typename _Rep_type::const_pointer const_pointer;
-  typedef typename _Rep_type::reference reference;
-  typedef typename _Rep_type::const_reference const_reference;
-  typedef typename _Rep_type::const_iterator const_iterator;
-  typedef const_iterator iterator;
-  typedef typename _Rep_type::const_reverse_iterator reverse_iterator;
-  typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
-  typedef typename _Rep_type::size_type size_type;
-  typedef typename _Rep_type::difference_type difference_type;
-  typedef typename _Rep_type::allocator_type allocator_type;
-
-private:
-  _Rep_type _M_t;  // red-black tree representing multiset
-public:
-  // allocation/deallocation
-
-  multiset() : _M_t(_Compare(), allocator_type()) {}
-  explicit multiset(const _Compare& __comp,
-                    const allocator_type& __a = allocator_type())
-    : _M_t(__comp, __a) {}
-
-#ifdef _STLP_MEMBER_TEMPLATES
-
-  template <class _InputIterator>
-  multiset(_InputIterator __first, _InputIterator __last)
-    : _M_t(_Compare(), allocator_type())
-    { _M_t.insert_equal(__first, __last); }
-
-# ifdef _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS
-  template <class _InputIterator>
-  multiset(_InputIterator __first, _InputIterator __last,
-           const _Compare& __comp)
-    : _M_t(__comp, allocator_type()) { _M_t.insert_equal(__first, __last); }
-# endif
-  template <class _InputIterator>
-  multiset(_InputIterator __first, _InputIterator __last,
-           const _Compare& __comp,
-           const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL)
-    : _M_t(__comp, __a) { _M_t.insert_equal(__first, __last); }
-
-#else
-
-  multiset(const value_type* __first, const value_type* __last)
-    : _M_t(_Compare(), allocator_type())
-    { _M_t.insert_equal(__first, __last); }
-
-  multiset(const value_type* __first, const value_type* __last,
-           const _Compare& __comp,
-           const allocator_type& __a = allocator_type())
-    : _M_t(__comp, __a) { _M_t.insert_equal(__first, __last); }
-
-  multiset(const_iterator __first, const_iterator __last)
-    : _M_t(_Compare(), allocator_type())
-    { _M_t.insert_equal(__first, __last); }
-
-  multiset(const_iterator __first, const_iterator __last,
-           const _Compare& __comp,
-           const allocator_type& __a = allocator_type())
-    : _M_t(__comp, __a) { _M_t.insert_equal(__first, __last); }
-   
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-  multiset(const multiset<_Key,_Compare,_Alloc>& __x) : _M_t(__x._M_t) {}
-  multiset<_Key,_Compare,_Alloc>&
-  operator=(const multiset<_Key,_Compare,_Alloc>& __x) {
-    _M_t = __x._M_t; 
-    return *this;
-  }
-
-  // accessors:
-
-  key_compare key_comp() const { return _M_t.key_comp(); }
-  value_compare value_comp() const { return _M_t.key_comp(); }
-  allocator_type get_allocator() const { return _M_t.get_allocator(); }
-
-  iterator begin() const { return _M_t.begin(); }
-  iterator end() const { return _M_t.end(); }
-  reverse_iterator rbegin() const { return _M_t.rbegin(); } 
-  reverse_iterator rend() const { return _M_t.rend(); }
-  bool empty() const { return _M_t.empty(); }
-  size_type size() const { return _M_t.size(); }
-  size_type max_size() const { return _M_t.max_size(); }
-  void swap(multiset<_Key,_Compare,_Alloc>& __x) { _M_t.swap(__x._M_t); }
-
-  // insert/erase
-  iterator insert(const value_type& __x) { 
-    return _M_t.insert_equal(__x);
-  }
-  iterator insert(iterator __position, const value_type& __x) {
-    typedef typename _Rep_type::iterator _Rep_iterator;
-    return _M_t.insert_equal((_Rep_iterator&)__position, __x);
-  }
-
-#ifdef _STLP_MEMBER_TEMPLATES  
-  template <class _InputIterator>
-  void insert(_InputIterator __first, _InputIterator __last) {
-    _M_t.insert_equal(__first, __last);
-  }
-#else
-  void insert(const value_type* __first, const value_type* __last) {
-    _M_t.insert_equal(__first, __last);
-  }
-  void insert(const_iterator __first, const_iterator __last) {
-    _M_t.insert_equal(__first, __last);
-  }
-#endif /* _STLP_MEMBER_TEMPLATES */
-  void erase(iterator __position) { 
-    typedef typename _Rep_type::iterator _Rep_iterator;
-    _M_t.erase((_Rep_iterator&)__position); 
-  }
-  size_type erase(const key_type& __x) { 
-    return _M_t.erase(__x); 
-  }
-  void erase(iterator __first, iterator __last) { 
-    typedef typename _Rep_type::iterator _Rep_iterator;
-    _M_t.erase((_Rep_iterator&)__first, (_Rep_iterator&)__last); 
-  }
-  void clear() { _M_t.clear(); }
-
-  // multiset operations:
-
-# if defined(_STLP_MEMBER_TEMPLATES) && ! defined ( _STLP_NO_EXTENSIONS )
-  template <class _KT>
-  iterator find(const _KT& __x) const { return _M_t.find(__x); }
-# else
-  iterator find(const key_type& __x) const { return _M_t.find(__x); }
-# endif
-  size_type count(const key_type& __x) const { return _M_t.count(__x); }
-  iterator lower_bound(const key_type& __x) const {
-    return _M_t.lower_bound(__x);
-  }
-  iterator upper_bound(const key_type& __x) const {
-    return _M_t.upper_bound(__x); 
-  }
-  pair<iterator,iterator> equal_range(const key_type& __x) const {
-    return _M_t.equal_range(__x);
-  }
-};
-
-# define _STLP_TEMPLATE_HEADER template <class _Key, class _Compare, class _Alloc>
-# define _STLP_TEMPLATE_CONTAINER set<_Key,_Compare,_Alloc>
-# include <stl/_relops_cont.h>
-# undef  _STLP_TEMPLATE_CONTAINER
-# define _STLP_TEMPLATE_CONTAINER multiset<_Key,_Compare,_Alloc>
-# include <stl/_relops_cont.h>
-# undef  _STLP_TEMPLATE_CONTAINER
-# undef  _STLP_TEMPLATE_HEADER
-
-_STLP_END_NAMESPACE
-
-// do a cleanup
-# undef set
-# undef multiset
-// provide a way to access full funclionality 
-# define __set__  __FULL_NAME(set)
-# define __multiset__  __FULL_NAME(multiset)
-
-# ifdef _STLP_USE_WRAPPER_FOR_ALLOC_PARAM
-# include <stl/wrappers/_set.h>
-# endif
-
-#endif /* _STLP_INTERNAL_SET_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/stl/_site_config.h b/src/STLport/stl/_site_config.h
deleted file mode 100644
index 0ef8aa9..0000000
--- a/src/STLport/stl/_site_config.h
+++ /dev/null
@@ -1,194 +0,0 @@
-// 
-// This file defines site configuration.
-//
-//
-
-/* 
- * _STLP_NO_THREADS: if defined, STLport don't use any 
- * multithreading support. Synonym is _NOTHREADS
- */
-// #define _NOTHREADS
-// #define _STLP_NO_THREADS
-
-/* _PTHREADS: if defined, use Posix threads for multithreading support. */
-// #define _PTHREADS
-
-// compatibility section
-
-# if defined (_STLP_NO_IOSTREAMS) || defined (_STLP_NO_NEW_IOSTREAMS) && ! defined ( _STLP_NO_OWN_IOSTREAMS )
-#  define _STLP_NO_OWN_IOSTREAMS
-# endif
-
-# if !defined (_STLP_NO_OWN_IOSTREAMS) &&  ! defined (_STLP_OWN_IOSTREAMS)
-#  define _STLP_OWN_IOSTREAMS
-# endif
-
-# if (defined (_STLP_NOTHREADS) || defined (_STLP_NO_THREADS) || defined (NOTHREADS))
-#  if ! defined (_NOTHREADS)
-#   define _NOTHREADS
-#  endif
-#  if ! defined (_STLP_NO_THREADS)
-#   define _STLP_NO_THREADS
-#  endif
-# endif
-
-/*
- * Turn _STLP_USE_DYNAMIC_LIB to enforce use of .dll version of STLport library.
- * NOTE : please do that only if you know what you are doing !
- * Changing default will require you to change makefile in "src" accordingly
- * and to rebuild STLPort library !
- * On UNIX, this has no effect. 
- *
- */
-// # define _STLP_USE_DYNAMIC_LIB
-
-/*
- * Turn _STLP_USE_STATIC_LIB to enforce use of static version of STLport library.
- * NOTE : please do that only if you know what you are doing !
- * Changing default will require you to change makefile in "src" accordingly
- * and to rebuild STLPort library !
- * On UNIX, this has no effect. 
- *
- */
-// # define _STLP_USE_STATIC_LIB
-
-
-/* 
- * Edit relative path below (or put full path) to get native 
- * compiler vendor's headers included. Default is "../include"
- * Hint : never install STLport in the directory that ends with "include"
- */
-// #  undef _STLP_NATIVE_INCLUDE_PATH
-// #  define _STLP_NATIVE_INCLUDE_PATH ../include
-// same for C library headers like <cstring>
-// #  undef _STLP_NATIVE_CPP_C_INCLUDE_PATH
-// #  define _STLP_NATIVE_CPP_C_INCLUDE_PATH ../include
-// same for C headers like <string.h>
-// #  undef _STLP_NATIVE_C_INCLUDE_PATH
-// #  define _STLP_NATIVE_C_INCLUDE_PATH ../include
-
-
-/* 
- * _STLP_USE_OWN_NAMESPACE/_STLP_NO_OWN_NAMESPACE
- * If defined, STLport uses _STL:: namespace, else std::
- * The reason you have to use separate namespace in wrapper mode is that new-style IO
- * compiled library may have its own idea about STL stuff (string, vector, etc.),
- * so redefining them in the same namespace would break ODR and may cause
- * undefined behaviour. Rule of thumb is - if new-style iostreams are
- * available, there WILL be a conflict. Otherwise you should be OK.
- * In STLport iostreams mode, there is no need for this flag other than to facilitate
- * link with third-part libraries compiled with different standard library implementation.
- */
-// #  define _STLP_USE_OWN_NAMESPACE 1
-// #  define _STLP_NO_OWN_NAMESPACE  1
-
-
-/* 
- * Uncomment _STLP_USE_NEWALLOC to force allocator<T> to use plain "new"
- * instead of STLport optimized node allocator engine.
- */
-// #define   _STLP_USE_NEWALLOC   1
-
-/* 
- * Uncomment _STLP_USE_MALLOC to force allocator<T> to use plain "malloc" 
- * instead of STLport optimized node allocator engine.
- */
-// #define   _STLP_USE_MALLOC 1
-
-/*
- * Set _STLP_DEBUG_ALLOC to use allocators that perform memory debugging,
- * such as padding/checking for memory consistency 
- */
-// #define   _STLP_DEBUG_ALLOC 1
-
-
-/*
- * Uncomment this to force all debug diagnostic to be directed through a
- * user-defined global function:
- *	void __stl_debug_message(const char * format_str, ...)
- * instead of predefined STLport routine. 
- * This allows you to take control of debug message output.
- * Default routine calls fprintf(stderr,...)
- * Note : If you set this macro, you must supply __stl_debug_message 
- * function definition somewhere.
- */
-//#define _STLP_DEBUG_MESSAGE 1
-
-/*
- * Uncomment this to force all failed assertions to be executed through
- * user-defined global function:
- *	void __stl_debug_terminate(void). This allows
- * you to take control of assertion behaviour for debugging purposes.
- * Default routine throws unique exception if _STLP_USE_EXCEPTIONS is set,
- * calls _STLP_ABORT() otherwise.
- * Note : If you set this macro, you must supply __stl_debug_terminate 
- * function definition somewhere.
- */
-//#define _STLP_DEBUG_TERMINATE 1
-
-/*
- * Comment this out to enable throwing exceptions from default __stl_debug_terminate()
- * instead of calling _STLP_ABORT().
- */
-#define   _STLP_NO_DEBUG_EXCEPTIONS 1
-
-/* 
- * Uncomment that to disable exception handling code 
- */
-// #define   _STLP_NO_EXCEPTIONS 1
-
-/*
- * _STLP_NO_NAMESPACES: if defined, don't put the library in namespace
- * stlport:: or std::, even if the compiler supports namespaces
- */
-
-// #define   _STLP_NO_NAMESPACES 1
-
-//==========================================================
-// Compatibility section
-//==========================================================
-
-/* 
- * Use abbreviated class names for linker benefit (don't affect interface).
- * This option is obsolete, but should work in this release.
- *
- */
-// # define _STLP_USE_ABBREVS
-
-/* 
- * This definition precludes STLport reverse_iterator to be compatible with
- * other parts of MSVC library. (With partial specialization, it just
- * has no effect).
- * Use it _ONLY_ if you use SGI-style reverse_iterator<> template explicitly
- */
-// #    define _STLP_NO_MSVC50_COMPATIBILITY 1
-
-/*
- * _STLP_USE_RAW_SGI_ALLOCATORS is a hook so that users can disable use of
- * allocator<T> as default parameter for containers, and use SGI
- * raw allocators as default ones, without having to edit library headers.
- * Use of this macro is strongly discouraged.
- */
-// #define   _STLP_USE_RAW_SGI_ALLOCATORS 1
-
-/*
- * Use obsolete overloaded template functions iterator_category(), value_type(), distance_type()
- * for querying iterator properties. Please note those names are non-standard and are not guaranteed
- * to be used by every implementation. However, this setting is on by default when partial specialization
- * is not implemented in the compiler and cannot be sumulated (only if _STLP_NO_ANACHRONISMS is not set). 
- * Use of those interfaces for user-defined iterators is strongly discouraged: 
- * please use public inheritance from iterator<> template to achieve desired effect. 
- * Second form is to disable old-style queries in any case.
- */
-// # define _STLP_USE_OLD_HP_ITERATOR_QUERIES
-// # define _STLP_NO_OLD_HP_ITERATOR_QUERIES
-
-
-//==========================================================================
-
-// This section contains swithes which should be off by default,
-// but so few compilers would have it undefined, so that we set them here,
-// with the option to be turned off later in compiler-specific file
-
-# define _STLP_INCOMPLETE_EXCEPTION_HEADER
-
diff --git a/src/STLport/stl/_slist.c b/src/STLport/stl/_slist.c
deleted file mode 100644
index 11e67d4..0000000
--- a/src/STLport/stl/_slist.c
+++ /dev/null
@@ -1,179 +0,0 @@
-/*
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-#ifndef _STLP_SLIST_C
-#define _STLP_SLIST_C
-
-#ifndef _STLP_INTERNAL_SLIST_H
-# include <stl/_slist.h>
-#endif
-
-# undef slist
-# define  slist  __WORKAROUND_DBG_RENAME(slist)
-# if defined (_STLP_NESTED_TYPE_PARAM_BUG) 
-#  define size_type          size_t
-# endif
-
-_STLP_BEGIN_NAMESPACE
-
-template <class _Tp, class _Alloc> 
-_Slist_node_base*
-_Slist_base<_Tp,_Alloc>::_M_erase_after(_Slist_node_base* __before_first,
-                                        _Slist_node_base* __last_node) {
-  _Slist_node<_Tp>* __cur = (_Slist_node<_Tp>*) (__before_first->_M_next);
-  while (__cur != __last_node) {
-    _Slist_node<_Tp>* __tmp = __cur;
-    __cur = (_Slist_node<_Tp>*) __cur->_M_next;
-    _STLP_STD::_Destroy(&__tmp->_M_data);
-    _M_head.deallocate(__tmp,1);
-  }
-  __before_first->_M_next = __last_node;
-  return __last_node;
-}
-
-template <class _Tp, class _Alloc>
-slist<_Tp,_Alloc>& slist<_Tp,_Alloc>::operator=(const slist<_Tp,_Alloc>& __x)
-{
-  if (&__x != this) {
-    _Node_base* __p1 = &this->_M_head._M_data;
-    _Node* __n1 = (_Node*) this->_M_head._M_data._M_next;
-    const _Node* __n2 = (const _Node*) __x._M_head._M_data._M_next;
-    while (__n1 && __n2) {
-      __n1->_M_data = __n2->_M_data;
-      __p1 = __n1;
-      __n1 = (_Node*) __n1->_M_next;
-      __n2 = (const _Node*) __n2->_M_next;
-    }
-    if (__n2 == 0)
-      this->_M_erase_after(__p1, 0);
-    else
-      _M_insert_after_range(__p1, const_iterator((_Node*)__n2), 
-                                  const_iterator(0));
-  }
-  return *this;
-}
-
-template <class _Tp, class _Alloc>
-void slist<_Tp, _Alloc>::_M_fill_assign(size_type __n, const _Tp& __val) {
-  _Node_base* __prev = &this->_M_head._M_data;
-  _Node* __node = (_Node*) this->_M_head._M_data._M_next;
-  for ( ; __node != 0 && __n > 0 ; --__n) {
-    __node->_M_data = __val;
-    __prev = __node;
-    __node = (_Node*) __node->_M_next;
-  }
-  if (__n > 0)
-    _M_insert_after_fill(__prev, __n, __val);
-  else
-    this->_M_erase_after(__prev, 0);
-}
-
-
-template <class _Tp, class _Alloc>
-void slist<_Tp,_Alloc>::resize(size_type __len, const _Tp& __x)
-{
-  _Node_base* __cur = &this->_M_head._M_data;
-  while (__cur->_M_next != 0 && __len > 0) {
-    --__len;
-    __cur = __cur->_M_next;
-  }
-  if (__cur->_M_next) 
-    this->_M_erase_after(__cur, 0);
-  else
-    _M_insert_after_fill(__cur, __len, __x);
-}
-
-template <class _Tp, class _Alloc>
-void slist<_Tp,_Alloc>::remove(const _Tp& __val)
-{
-  _Node_base* __cur = &this->_M_head._M_data;
-  while (__cur && __cur->_M_next) {
-    if (((_Node*) __cur->_M_next)->_M_data == __val)
-      this->_M_erase_after(__cur);
-    else
-      __cur = __cur->_M_next;
-  }
-}
-
-template <class _Tp, class _Alloc> 
-void slist<_Tp,_Alloc>::unique()
-{
-  _Node_base* __cur = this->_M_head._M_data._M_next;
-  if (__cur) {
-    while (__cur->_M_next) {
-      if (((_Node*)__cur)->_M_data == 
-          ((_Node*)(__cur->_M_next))->_M_data)
-        this->_M_erase_after(__cur);
-      else
-        __cur = __cur->_M_next;
-    }
-  }
-}
-
-template <class _Tp, class _Alloc>
-void slist<_Tp,_Alloc>::merge(slist<_Tp,_Alloc>& __x)
-{
-  _Node_base* __n1 = &this->_M_head._M_data;
-  while (__n1->_M_next && __x._M_head._M_data._M_next) {
-    if (((_Node*) __x._M_head._M_data._M_next)->_M_data < 
-        ((_Node*)       __n1->_M_next)->_M_data) 
-      _Sl_global_inst::__splice_after(__n1, &__x._M_head._M_data, __x._M_head._M_data._M_next);
-    __n1 = __n1->_M_next;
-  }
-  if (__x._M_head._M_data._M_next) {
-    __n1->_M_next = __x._M_head._M_data._M_next;
-    __x._M_head._M_data._M_next = 0;
-  }
-}
-
-template <class _Tp, class _Alloc>
-void slist<_Tp,_Alloc>::sort()
-{
-  if (this->_M_head._M_data._M_next && this->_M_head._M_data._M_next->_M_next) {
-    _Self __carry;
-    _Self __counter[64];
-    int __fill = 0;
-    while (!empty()) {
-      _Sl_global_inst::__splice_after(&__carry._M_head._M_data, &this->_M_head._M_data, this->_M_head._M_data._M_next);
-      int __i = 0;
-      while (__i < __fill && !__counter[__i].empty()) {
-        __counter[__i].merge(__carry);
-        __carry.swap(__counter[__i]);
-        ++__i;
-      }
-      __carry.swap(__counter[__i]);
-      if (__i == __fill)
-        ++__fill;
-    }
-
-    for (int __i = 1; __i < __fill; ++__i)
-      __counter[__i].merge(__counter[__i-1]);
-    this->swap(__counter[__fill-1]);
-  }
-}
-
-# undef slist
-# undef size_type
-
-_STLP_END_NAMESPACE
-
-#endif /*  _STLP_SLIST_C */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_slist.h b/src/STLport/stl/_slist.h
deleted file mode 100644
index e2f84e4..0000000
--- a/src/STLport/stl/_slist.h
+++ /dev/null
@@ -1,741 +0,0 @@
-/*
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_SLIST_H
-#define _STLP_INTERNAL_SLIST_H
-
-
-# ifndef _STLP_INTERNAL_ALGOBASE_H
-#  include <stl/_algobase.h>
-# endif
-
-# ifndef _STLP_INTERNAL_ALLOC_H
-#  include <stl/_alloc.h>
-# endif
-
-# ifndef _STLP_INTERNAL_ITERATOR_H
-#  include <stl/_iterator.h>
-# endif
-
-# ifndef _STLP_INTERNAL_CONSTRUCT_H
-#  include <stl/_construct.h>
-# endif
-
-# ifndef _STLP_INTERNAL_SLIST_BASE_H
-#  include <stl/_slist_base.h>
-# endif
-
-# undef slist
-# define  slist  __WORKAROUND_DBG_RENAME(slist)
-
-_STLP_BEGIN_NAMESPACE 
-
-template <class _Tp>
-struct _Slist_node : public _Slist_node_base
-{
-  _Tp _M_data;
-  __TRIVIAL_STUFF(_Slist_node)
-};
-
-struct _Slist_iterator_base {
-
-  typedef size_t               size_type;
-  typedef ptrdiff_t            difference_type;
-  typedef forward_iterator_tag iterator_category;
-
-  _Slist_node_base* _M_node;
-
-  _Slist_iterator_base(_Slist_node_base* __x) : _M_node(__x) {}
-
-  void _M_incr() { 
-//    _STLP_VERBOSE_ASSERT(_M_node != 0, _StlMsg_INVALID_ADVANCE)
-    _M_node = _M_node->_M_next; 
-  }
-  bool operator==(const _Slist_iterator_base& __y ) const { 
-    return _M_node == __y._M_node; 
-  }
-  bool operator!=(const _Slist_iterator_base& __y ) const { 
-    return _M_node != __y._M_node; 
-  }
-};
-
-# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES
-inline ptrdiff_t* _STLP_CALL distance_type(const _Slist_iterator_base&) { return 0; }
-inline forward_iterator_tag _STLP_CALL iterator_category(const _Slist_iterator_base&) { return forward_iterator_tag(); }
-#endif
-
-template <class _Tp, class _Traits>
-struct _Slist_iterator : public _Slist_iterator_base
-{
-  typedef _Tp value_type;
-  typedef typename _Traits::pointer    pointer;
-  typedef typename _Traits::reference  reference;
-  typedef forward_iterator_tag iterator_category;
-  typedef size_t size_type;
-  typedef ptrdiff_t difference_type;
-  
-  typedef _Slist_iterator<_Tp, _Nonconst_traits<_Tp> > iterator;
-  typedef _Slist_iterator<_Tp, _Const_traits<_Tp> >    const_iterator;
-  typedef _Slist_iterator<_Tp, _Traits>                       _Self;
-
-  typedef _Slist_node<value_type> _Node;
-
-  _Slist_iterator(_Node* __x) : _Slist_iterator_base(__x) {}
-  _Slist_iterator() : _Slist_iterator_base(0) {}
-  _Slist_iterator(const iterator& __x) : _Slist_iterator_base(__x._M_node) {}
-
-  reference operator*() const { return ((_Node*) _M_node)->_M_data; }
-
-  _STLP_DEFINE_ARROW_OPERATOR
-
-  _Self& operator++()
-  {
-    _M_incr();
-    return *this;
-  }
-  _Self operator++(int)
-  {
-    _Self __tmp = *this;
-    _M_incr();
-    return __tmp;
-  }
-};
-
-#ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES
-template <class _Tp, class _Traits>
-inline _Tp* _STLP_CALL value_type(const _Slist_iterator<_Tp, _Traits>&) { return (_Tp*)0; }
-#endif /* OLD_QUERIES */
-
-// Base class that encapsulates details of allocators and simplifies EH
-
-template <class _Tp, class _Alloc> 
-struct _Slist_base {
-  _STLP_FORCE_ALLOCATORS(_Tp, _Alloc)
-  typedef typename _Alloc_traits<_Tp,_Alloc>::allocator_type allocator_type;
-  typedef _Slist_node<_Tp> _Node;
-
-  _Slist_base(const allocator_type& __a) : 
-    _M_head(_STLP_CONVERT_ALLOCATOR(__a, _Node), _Slist_node_base() ) { 
-    _M_head._M_data._M_next = 0; 
-  }
-  ~_Slist_base() { _M_erase_after(&_M_head._M_data, 0); }
-
-protected:
-  typedef typename _Alloc_traits<_Node,_Alloc>::allocator_type _M_node_allocator_type;
-
-  _Slist_node_base* _M_erase_after(_Slist_node_base* __pos)
-  {
-    _Node* __next = (_Node*) (__pos->_M_next);
-    _Slist_node_base* __next_next = __next->_M_next;
-    __pos->_M_next = __next_next;
-    _STLP_STD::_Destroy(&__next->_M_data);
-    _M_head.deallocate(__next,1);
-    return __next_next;
-  }
-  _Slist_node_base* _M_erase_after(_Slist_node_base*, _Slist_node_base*);
-
-public:
-  allocator_type get_allocator() const { 
-    return _STLP_CONVERT_ALLOCATOR((const _M_node_allocator_type&)_M_head, _Tp); 
-  }
-  _STLP_alloc_proxy<_Slist_node_base, _Node, _M_node_allocator_type> _M_head;
-};  
-
-template <class _Tp, _STLP_DEFAULT_ALLOCATOR_SELECT(_Tp) >
-class slist : protected _Slist_base<_Tp,_Alloc>
-{
-private:
-  typedef _Slist_base<_Tp,_Alloc> _Base;
-  typedef slist<_Tp,_Alloc> _Self;
-public:
-  typedef _Tp                value_type;
-  typedef value_type*       pointer;
-  typedef const value_type* const_pointer;
-  typedef value_type&       reference;
-  typedef const value_type& const_reference;
-  typedef size_t            size_type;
-  typedef ptrdiff_t         difference_type;
-  typedef forward_iterator_tag _Iterator_category;
-
-  typedef _Slist_iterator<_Tp, _Nonconst_traits<_Tp> >  iterator;
-  typedef _Slist_iterator<_Tp, _Const_traits<_Tp> >     const_iterator;
-
-  _STLP_FORCE_ALLOCATORS(_Tp, _Alloc)
-  typedef typename _Base::allocator_type allocator_type;
-
-
-private:
-  typedef _Slist_node<_Tp>      _Node;
-  typedef _Slist_node_base      _Node_base;
-  typedef _Slist_iterator_base  _Iterator_base;
-
-  _Node* _M_create_node(const value_type& __x) {
-    _Node* __node = this->_M_head.allocate(1);
-    _STLP_TRY {
-      _Construct(&__node->_M_data, __x);
-      __node->_M_next = 0;
-    }
-    _STLP_UNWIND(this->_M_head.deallocate(__node, 1));
-    return __node;
-  }
-  
-  _Node* _M_create_node() {
-    _Node* __node = this->_M_head.allocate(1);
-    _STLP_TRY {
-      _Construct(&__node->_M_data);
-      __node->_M_next = 0;
-    }
-    _STLP_UNWIND(this->_M_head.deallocate(__node, 1));
-    return __node;
-  }
-
-public:
-  allocator_type get_allocator() const { return _Base::get_allocator(); }
-
-  explicit slist(const allocator_type& __a = allocator_type()) : _Slist_base<_Tp,_Alloc>(__a) {}
-
-  slist(size_type __n, const value_type& __x,
-        const allocator_type& __a =  allocator_type()) : _Slist_base<_Tp,_Alloc>(__a)
-    { _M_insert_after_fill(&this->_M_head._M_data, __n, __x); }
-
-  explicit slist(size_type __n) : _Slist_base<_Tp,_Alloc>(allocator_type())
-    { _M_insert_after_fill(&this->_M_head._M_data, __n, value_type()); }
-
-#ifdef _STLP_MEMBER_TEMPLATES
-  // We don't need any dispatching tricks here, because _M_insert_after_range
-  // already does them.
-  template <class _InputIterator>
-  slist(_InputIterator __first, _InputIterator __last,
-        const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL) : 
-    _Slist_base<_Tp,_Alloc>(__a)
-  { _M_insert_after_range(&this->_M_head._M_data, __first, __last); }
-# ifdef _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS
-  // VC++ needs this crazyness
-  template <class _InputIterator>
-  slist(_InputIterator __first, _InputIterator __last) :
-    _Slist_base<_Tp,_Alloc>(allocator_type())
-  { _M_insert_after_range(&this->_M_head._M_data, __first, __last); }
-# endif  
-#else /* _STLP_MEMBER_TEMPLATES */
-  slist(const_iterator __first, const_iterator __last,
-        const allocator_type& __a =  allocator_type() ) :
-    _Slist_base<_Tp,_Alloc>(__a)
-    { _M_insert_after_range(&this->_M_head._M_data, __first, __last); }
-  slist(const value_type* __first, const value_type* __last,
-        const allocator_type& __a =  allocator_type()) : 
-    _Slist_base<_Tp,_Alloc>(__a)
-    { _M_insert_after_range(&this->_M_head._M_data, __first, __last); }
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-  slist(const _Self& __x) : _Slist_base<_Tp,_Alloc>(__x.get_allocator())
-    { _M_insert_after_range(&this->_M_head._M_data, __x.begin(), __x.end()); }
-
-  _Self& operator= (const _Self& __x);
-
-  ~slist() {}
-
-public:
-  // assign(), a generalized assignment member function.  Two
-  // versions: one that takes a count, and one that takes a range.
-  // The range version is a member template, so we dispatch on whether
-  // or not the type is an integer.
-
-  void assign(size_type __n, const _Tp& __val)
-    { _M_fill_assign(__n, __val); }
-
-  void _M_fill_assign(size_type __n, const _Tp& __val);
-
-#ifdef _STLP_MEMBER_TEMPLATES
-
-  template <class _InputIterator>
-  void assign(_InputIterator __first, _InputIterator __last) {
-    typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
-    _M_assign_dispatch(__first, __last, _Integral());
-  }
-
-  template <class _Integer>
-  void _M_assign_dispatch(_Integer __n, _Integer __val, const __true_type&)
-    { _M_fill_assign((size_type) __n, (_Tp) __val); }
-
-  template <class _InputIter>
-  void
-  _M_assign_dispatch(_InputIter __first, _InputIter __last,
-		     const __false_type&) {
-    _Node_base* __prev = &this->_M_head._M_data;
-    _Node* __node = (_Node*) this->_M_head._M_data._M_next;
-    while (__node != 0 && __first != __last) {
-      __node->_M_data = *__first;
-      __prev = __node;
-      __node = (_Node*) __node->_M_next;
-      ++__first;
-    }
-    if (__first != __last)
-      _M_insert_after_range(__prev, __first, __last);
-    else
-      this->_M_erase_after(__prev, 0);
-  }
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-public:
-
-  // Experimental new feature: before_begin() returns a
-  // non-dereferenceable iterator that, when incremented, yields
-  // begin().  This iterator may be used as the argument to
-  // insert_after, erase_after, etc.  Note that even for an empty 
-  // slist, before_begin() is not the same iterator as end().  It 
-  // is always necessary to increment before_begin() at least once to
-  // obtain end().
-  iterator before_begin() { return iterator((_Node*) &this->_M_head._M_data); }
-  const_iterator before_begin() const
-    { return const_iterator((_Node*) &this->_M_head._M_data); }
-
-  iterator begin() { return iterator((_Node*)this->_M_head._M_data._M_next); }
-  const_iterator begin() const 
-    { return const_iterator((_Node*)this->_M_head._M_data._M_next);}
-
-  iterator end() { return iterator(0); }
-  const_iterator end() const { return const_iterator(0); }
-
-  size_type size() const { return _Sl_global_inst::size(this->_M_head._M_data._M_next); }
-  
-  size_type max_size() const { return size_type(-1); }
-
-  bool empty() const { return this->_M_head._M_data._M_next == 0; }
-
-  void swap(_Self& __x) { 
-    _STLP_STD::swap(this->_M_head, __x._M_head); 
-  }
-
-public:
-  reference front() { return ((_Node*) this->_M_head._M_data._M_next)->_M_data; }
-  const_reference front() const 
-    { return ((_Node*) this->_M_head._M_data._M_next)->_M_data; }
-  void push_front(const value_type& __x)   {
-    __slist_make_link(&this->_M_head._M_data, _M_create_node(__x));
-  }
-
-# ifndef _STLP_NO_ANACHRONISMS
-  void push_front() { __slist_make_link(&this->_M_head._M_data, _M_create_node());}
-# endif
-
-  void pop_front() {
-    _Node* __node = (_Node*) this->_M_head._M_data._M_next;
-    this->_M_head._M_data._M_next = __node->_M_next;
-    _STLP_STD::_Destroy(&__node->_M_data);
-    this->_M_head.deallocate(__node, 1);
-  }
-
-  iterator previous(const_iterator __pos) {
-    return iterator((_Node*) _Sl_global_inst::__previous(&this->_M_head._M_data, __pos._M_node));
-  }
-  const_iterator previous(const_iterator __pos) const {
-    return const_iterator((_Node*) _Sl_global_inst::__previous(&this->_M_head._M_data, __pos._M_node));
-  }
-
-private:
-  _Node* _M_insert_after(_Node_base* __pos, const value_type& __x) {
-    return (_Node*) (__slist_make_link(__pos, _M_create_node(__x)));
-  }
-
-  _Node* _M_insert_after(_Node_base* __pos) {
-    return (_Node*) (__slist_make_link(__pos, _M_create_node()));
-  }
-
-  void _M_insert_after_fill(_Node_base* __pos,
-                            size_type __n, const value_type& __x) {
-    for (size_type __i = 0; __i < __n; ++__i)
-      __pos = __slist_make_link(__pos, _M_create_node(__x));
-  }
-
-#ifdef _STLP_MEMBER_TEMPLATES
-
-  // Check whether it's an integral type.  If so, it's not an iterator.
-  template <class _InIter>
-  void _M_insert_after_range(_Node_base* __pos, 
-                             _InIter __first, _InIter __last) {
-    typedef typename _Is_integer<_InIter>::_Integral _Integral;
-    _M_insert_after_range(__pos, __first, __last, _Integral());
-  }
-
-  template <class _Integer>
-  void _M_insert_after_range(_Node_base* __pos, _Integer __n, _Integer __x,
-                             const __true_type&) {
-    _M_insert_after_fill(__pos, __n, __x);
-  }
-
-  template <class _InIter>
-  void _M_insert_after_range(_Node_base* __pos,
-                             _InIter __first, _InIter __last,
-                             const __false_type&) {
-    while (__first != __last) {
-      __pos = __slist_make_link(__pos, _M_create_node(*__first));
-      ++__first;
-    }
-  }
-
-#else /* _STLP_MEMBER_TEMPLATES */
-
-  void _M_insert_after_range(_Node_base* __pos,
-                             const_iterator __first, const_iterator __last) {
-    while (__first != __last) {
-      __pos = __slist_make_link(__pos, _M_create_node(*__first));
-      ++__first;
-    }
-  }
-  void _M_insert_after_range(_Node_base* __pos,
-                             const value_type* __first,
-                             const value_type* __last) {
-    while (__first != __last) {
-      __pos = __slist_make_link(__pos, _M_create_node(*__first));
-      ++__first;
-    }
-  }
-
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-public:
-
-  iterator insert_after(iterator __pos, const value_type& __x) {
-    return iterator(_M_insert_after(__pos._M_node, __x));
-  }
-
-  iterator insert_after(iterator __pos) {
-    return insert_after(__pos, value_type());
-  }
-
-  void insert_after(iterator __pos, size_type __n, const value_type& __x) {
-    _M_insert_after_fill(__pos._M_node, __n, __x);
-  }
-
-#ifdef _STLP_MEMBER_TEMPLATES
-
-  // We don't need any dispatching tricks here, because _M_insert_after_range
-  // already does them.
-  template <class _InIter>
-  void insert_after(iterator __pos, _InIter __first, _InIter __last) {
-    _M_insert_after_range(__pos._M_node, __first, __last);
-  }
-
-#else /* _STLP_MEMBER_TEMPLATES */
-
-  void insert_after(iterator __pos,
-                    const_iterator __first, const_iterator __last) {
-    _M_insert_after_range(__pos._M_node, __first, __last);
-  }
-  void insert_after(iterator __pos,
-                    const value_type* __first, const value_type* __last) {
-    _M_insert_after_range(__pos._M_node, __first, __last);
-  }
-
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-  iterator insert(iterator __pos, const value_type& __x) {
-    return iterator(_M_insert_after(_Sl_global_inst::__previous(&this->_M_head._M_data, __pos._M_node),
-                    __x));
-  }
-
-  iterator insert(iterator __pos) {
-    return iterator(_M_insert_after(_Sl_global_inst::__previous(&this->_M_head._M_data, __pos._M_node),
-                                    value_type()));
-  }
-
-  void insert(iterator __pos, size_type __n, const value_type& __x) {
-    _M_insert_after_fill(_Sl_global_inst::__previous(&this->_M_head._M_data, __pos._M_node), __n, __x);
-  } 
-    
-#ifdef _STLP_MEMBER_TEMPLATES
-
-  // We don't need any dispatching tricks here, because _M_insert_after_range
-  // already does them.
-  template <class _InIter>
-  void insert(iterator __pos, _InIter __first, _InIter __last) {
-    _M_insert_after_range(_Sl_global_inst::__previous(&this->_M_head._M_data, __pos._M_node), 
-                          __first, __last);
-  }
-
-#else /* _STLP_MEMBER_TEMPLATES */
-
-  void insert(iterator __pos, const_iterator __first, const_iterator __last) {
-    _M_insert_after_range(_Sl_global_inst::__previous(&this->_M_head._M_data, __pos._M_node), 
-                          __first, __last);
-  }
-  void insert(iterator __pos, const value_type* __first, 
-                              const value_type* __last) {
-    _M_insert_after_range(_Sl_global_inst::__previous(&this->_M_head._M_data, __pos._M_node), 
-                          __first, __last);
-  }
-
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-
-public:
-  iterator erase_after(iterator __pos) {
-    return iterator((_Node*) this->_M_erase_after(__pos._M_node));
-  }
-  iterator erase_after(iterator __before_first, iterator __last) {
-    return iterator((_Node*) this->_M_erase_after(__before_first._M_node, 
-                                            __last._M_node));
-  } 
-
-  iterator erase(iterator __pos) {
-    return iterator((_Node*) this->_M_erase_after(_Sl_global_inst::__previous(&this->_M_head._M_data, 
-                                                    __pos._M_node)));
-  }
-  iterator erase(iterator __first, iterator __last) {
-    return iterator((_Node*) this->_M_erase_after(
-      _Sl_global_inst::__previous(&this->_M_head._M_data, __first._M_node), __last._M_node));
-  }
-
-  void resize(size_type new_size, const _Tp& __x);
-  void resize(size_type new_size) { resize(new_size, _Tp()); }
-  void clear() {
-    this->_M_erase_after(&this->_M_head._M_data, 0); 
-  }
-
-public:
-  // Moves the range [__before_first + 1, __before_last + 1) to *this,
-  //  inserting it immediately after __pos.  This is constant time.
-  void splice_after(iterator __pos, 
-                    iterator __before_first, iterator __before_last)
-  {
-    if (__before_first != __before_last) {
-      _Sl_global_inst::__splice_after(__pos._M_node, __before_first._M_node, 
-                           __before_last._M_node);
-    }
-  }
-
-  // Moves the element that follows __prev to *this, inserting it immediately
-  //  after __pos.  This is constant time.
-  void splice_after(iterator __pos, iterator __prev)
-  {
-    _Sl_global_inst::__splice_after(__pos._M_node,
-                         __prev._M_node, __prev._M_node->_M_next);
-  }
-
-  // Removes all of the elements from the list __x to *this, inserting
-  // them immediately after __pos.  __x must not be *this.  Complexity:
-  // linear in __x.size().
-  void splice_after(iterator __pos, _Self& __x)
-  {
-    _Sl_global_inst::__splice_after(__pos._M_node, &__x._M_head._M_data);
-  }
-
-  // Linear in distance(begin(), __pos), and linear in __x.size().
-  void splice(iterator __pos, _Self& __x) {
-    if (__x._M_head._M_data._M_next)
-      _Sl_global_inst::__splice_after(_Sl_global_inst::__previous(&this->_M_head._M_data, __pos._M_node),
-                           &__x._M_head._M_data, _Sl_global_inst::__previous(&__x._M_head._M_data, 0));
-  }
-
-  // Linear in distance(begin(), __pos), and in distance(__x.begin(), __i).
-  void splice(iterator __pos, _Self& __x, iterator __i) {
-    _Sl_global_inst::__splice_after(_Sl_global_inst::__previous(&this->_M_head._M_data, __pos._M_node),
-                         _Sl_global_inst::__previous(&__x._M_head._M_data, __i._M_node),
-                         __i._M_node);
-  }
-
-  // Linear in distance(begin(), __pos), in distance(__x.begin(), __first),
-  // and in distance(__first, __last).
-  void splice(iterator __pos, _Self& __x, iterator __first, iterator __last)
-  {
-    if (__first != __last)
-      _Sl_global_inst::__splice_after(_Sl_global_inst::__previous(&this->_M_head._M_data, __pos._M_node),
-                           _Sl_global_inst::__previous(&__x._M_head._M_data, __first._M_node),
-                           _Sl_global_inst::__previous(__first._M_node, __last._M_node));
-  }
-
-public:
-  void reverse() { 
-    if (this->_M_head._M_data._M_next)
-      this->_M_head._M_data._M_next = _Sl_global_inst::__reverse(this->_M_head._M_data._M_next);
-  }
-
-  void remove(const _Tp& __val); 
-  void unique(); 
-  void merge(_Self& __x);
-  void sort();     
-
-#ifdef _STLP_MEMBER_TEMPLATES
-  template <class _Predicate>
-  void remove_if(_Predicate __pred) {
-    _Node_base* __cur = &this->_M_head._M_data;
-    while (__cur->_M_next) {
-      if (__pred(((_Node*) __cur->_M_next)->_M_data))
-	this->_M_erase_after(__cur);
-      else
-	__cur = __cur->_M_next;
-    }
-  }
-
-  template <class _BinaryPredicate> 
-  void unique(_BinaryPredicate __pred) {
-    _Node* __cur = (_Node*) this->_M_head._M_data._M_next;
-    if (__cur) {
-      while (__cur->_M_next) {
-	if (__pred(((_Node*)__cur)->_M_data, 
-		   ((_Node*)(__cur->_M_next))->_M_data))
-	  this->_M_erase_after(__cur);
-	else
-	  __cur = (_Node*) __cur->_M_next;
-      }
-    }
-  }
-
-  template <class _StrictWeakOrdering>
-  void merge(slist<_Tp,_Alloc>& __x,
-	     _StrictWeakOrdering __comp) {
-    _Node_base* __n1 = &this->_M_head._M_data;
-    while (__n1->_M_next && __x._M_head._M_data._M_next) {
-      if (__comp(((_Node*) __x._M_head._M_data._M_next)->_M_data,
-		 ((_Node*)       __n1->_M_next)->_M_data))
-	_Sl_global_inst::__splice_after(__n1, &__x._M_head._M_data, __x._M_head._M_data._M_next);
-      __n1 = __n1->_M_next;
-    }
-    if (__x._M_head._M_data._M_next) {
-      __n1->_M_next = __x._M_head._M_data._M_next;
-      __x._M_head._M_data._M_next = 0;
-    }
-  }
-
-  template <class _StrictWeakOrdering> 
-  void sort(_StrictWeakOrdering __comp) {
-    if (this->_M_head._M_data._M_next && this->_M_head._M_data._M_next->_M_next) {
-      slist __carry;
-      slist __counter[64];
-      int __fill = 0;
-      while (!empty()) {
-	_Sl_global_inst::__splice_after(&__carry._M_head._M_data, &this->_M_head._M_data, this->_M_head._M_data._M_next);
-	int __i = 0;
-	while (__i < __fill && !__counter[__i].empty()) {
-	  __counter[__i].merge(__carry, __comp);
-	  __carry.swap(__counter[__i]);
-	  ++__i;
-	}
-	__carry.swap(__counter[__i]);
-	if (__i == __fill)
-	  ++__fill;
-      }
-      
-      for (int __i = 1; __i < __fill; ++__i)
-	__counter[__i].merge(__counter[__i-1], __comp);
-      this->swap(__counter[__fill-1]);
-    }
-  }
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-};
-
-template <class _Tp, class _Alloc>
-inline bool  _STLP_CALL
-operator==(const slist<_Tp,_Alloc>& _SL1, const slist<_Tp,_Alloc>& _SL2)
-{
-  typedef typename slist<_Tp,_Alloc>::const_iterator const_iterator;
-  const_iterator __end1 = _SL1.end();
-  const_iterator __end2 = _SL2.end();
-
-  const_iterator __i1 = _SL1.begin();
-  const_iterator __i2 = _SL2.begin();
-  while (__i1 != __end1 && __i2 != __end2 && *__i1 == *__i2) {
-    ++__i1;
-    ++__i2;
-   }
-  return __i1 == __end1 && __i2 == __end2;
-}
-
-# define _STLP_EQUAL_OPERATOR_SPECIALIZED
-# define _STLP_TEMPLATE_HEADER    template <class _Tp, class _Alloc>
-# define _STLP_TEMPLATE_CONTAINER slist<_Tp, _Alloc>
-# include <stl/_relops_cont.h>
-# undef _STLP_TEMPLATE_CONTAINER
-# undef _STLP_TEMPLATE_HEADER
-# undef _STLP_EQUAL_OPERATOR_SPECIALIZED
-
-_STLP_END_NAMESPACE
-
-# if !defined (_STLP_LINK_TIME_INSTANTIATION)
-#  include <stl/_slist.c>
-# endif
-
-#  undef  slist
-#  define __slist__ __FULL_NAME(slist)
-
-#if defined (_STLP_DEBUG) && !defined (_STLP_INTERNAL_DBG_SLIST_H)
-# include <stl/debug/_slist.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-// Specialization of insert_iterator so that insertions will be constant
-// time rather than linear time.
-
-#ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION
-
-template <class _Tp, class _Alloc>
-class insert_iterator<slist<_Tp, _Alloc> > {
-protected:
-  typedef slist<_Tp, _Alloc> _Container;
-  _Container* container;
-  typename _Container::iterator iter;
-public:
-  typedef _Container          container_type;
-  typedef output_iterator_tag iterator_category;
-  typedef void                value_type;
-  typedef void                difference_type;
-  typedef void                pointer;
-  typedef void                reference;
-
-  insert_iterator(_Container& __x, typename _Container::iterator __i) 
-    : container(&__x) {
-    if (__i == __x.begin())
-      iter = __x.before_begin();
-    else
-      iter = __x.previous(__i);
-  }
-
-  insert_iterator<_Container>&
-  operator=(const typename _Container::value_type& __val) { 
-    iter = container->insert_after(iter, __val);
-    return *this;
-  }
-  insert_iterator<_Container>& operator*() { return *this; }
-  insert_iterator<_Container>& operator++() { return *this; }
-  insert_iterator<_Container>& operator++(int) { return *this; }
-};
-
-#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
-
-_STLP_END_NAMESPACE
-
-
-# if defined ( _STLP_USE_WRAPPER_FOR_ALLOC_PARAM )
-# include <stl/wrappers/_slist.h>
-# endif
-
-#endif /* _STLP_INTERNAL_SLIST_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/stl/_slist_base.c b/src/STLport/stl/_slist_base.c
deleted file mode 100644
index 26fb6ea..0000000
--- a/src/STLport/stl/_slist_base.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- *
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-#ifndef _STLP_SLIST_BASE_C
-#define _STLP_SLIST_BASE_C
-
-#ifndef _STLP_INTERNAL_SLIST_BASE_H
-# include <stl/_slist_base.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-# if defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION)
-
-template <class _Dummy>
-_Slist_node_base*  _STLP_CALL
-_Sl_global<_Dummy>::__previous(_Slist_node_base* __head,
-			       const _Slist_node_base* __node)
-{
-  while (__head && __head->_M_next != __node)
-    __head = __head->_M_next;
-  return __head;
-}
-
-template <class _Dummy>
-void _STLP_CALL
-_Sl_global<_Dummy>::__splice_after(_Slist_node_base* __pos, _Slist_node_base* __head)
-{
-  _Slist_node_base* __before_last = __previous(__head, 0);
-  if (__before_last != __head) {
-    _Slist_node_base* __after = __pos->_M_next;
-    __pos->_M_next = __head->_M_next;
-    __head->_M_next = 0;
-    __before_last->_M_next = __after;
-  }
-}
-
-template <class _Dummy>
-void _STLP_CALL
-_Sl_global<_Dummy>::__splice_after(_Slist_node_base* __pos,
-				   _Slist_node_base* __before_first,
-				   _Slist_node_base* __before_last)
-{
-  if (__pos != __before_first && __pos != __before_last) {
-    _Slist_node_base* __first = __before_first->_M_next;
-    _Slist_node_base* __after = __pos->_M_next;
-    __before_first->_M_next = __before_last->_M_next;
-    __pos->_M_next = __first;
-    __before_last->_M_next = __after;
-  }
-}
-
-template <class _Dummy>
-_Slist_node_base* _STLP_CALL
-_Sl_global<_Dummy>::__reverse(_Slist_node_base* __node)
-{
-  _Slist_node_base* __result = __node;
-  __node = __node->_M_next;
-  __result->_M_next = 0;
-  while(__node) {
-    _Slist_node_base* __next = __node->_M_next;
-    __node->_M_next = __result;
-    __result = __node;
-    __node = __next;
-  }
-  return __result;
-}
-
-template <class _Dummy> 
-size_t _STLP_CALL
-_Sl_global<_Dummy>::size(_Slist_node_base* __node)
-{
-  size_t __result = 0;
-  for ( ; __node != 0; __node = __node->_M_next)
-    ++__result;
-  return __result;
-}
-
-#endif /* defined (__BUILDING_STLPORT) || ! defined (_STLP_OWN_IOSTREAMS) */
-
-_STLP_END_NAMESPACE
-
-#endif /*  _STLP_SLIST_BASE_C */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_slist_base.h b/src/STLport/stl/_slist_base.h
deleted file mode 100644
index e090e81..0000000
--- a/src/STLport/stl/_slist_base.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_SLIST_BASE_H
-#define _STLP_INTERNAL_SLIST_BASE_H
-
-#ifndef _STLP_CSTDDEF
-#include <cstddef>
-#endif
-
-_STLP_BEGIN_NAMESPACE 
-
-struct _Slist_node_base
-{
-  _Slist_node_base* _M_next;
-};
-
-inline _Slist_node_base*
-__slist_make_link(_Slist_node_base* __prev_node,
-                  _Slist_node_base* __new_node)
-{
-  __new_node->_M_next = __prev_node->_M_next;
-  __prev_node->_M_next = __new_node;
-  return __new_node;
-}
-
-
-template <class _Dummy>
-class _Sl_global {
-public:
-  // those used to be global functions 
-  // moved here to reduce code bloat without templatizing _Slist_iterator_base
-  static size_t _STLP_CALL size(_Slist_node_base* __node);
-  static _Slist_node_base* _STLP_CALL __reverse(_Slist_node_base* __node);
-  static void _STLP_CALL __splice_after(_Slist_node_base* __pos,
-                                        _Slist_node_base* __before_first,
-                                        _Slist_node_base* __before_last);
-  
-  static void _STLP_CALL __splice_after(_Slist_node_base* __pos, _Slist_node_base* __head);
-
-  static _Slist_node_base* _STLP_CALL __previous(_Slist_node_base* __head,
-                                                 const _Slist_node_base* __node);
-  static const _Slist_node_base* _STLP_CALL __previous(const _Slist_node_base* __head,
-					    const _Slist_node_base* __node) {
-    return _Sl_global<_Dummy>::__previous((_Slist_node_base*)__head, __node);
-  }
-};
-
-# if defined (_STLP_USE_TEMPLATE_EXPORT) 
-_STLP_EXPORT_TEMPLATE_CLASS _Sl_global<bool>;
-# endif
-typedef _Sl_global<bool> _Sl_global_inst;
-
-_STLP_END_NAMESPACE
-
-# if !defined (_STLP_LINK_TIME_INSTANTIATION)
-#  include <stl/_slist_base.c>
-# endif
-
-#endif /* _STLP_INTERNAL_SLIST_BASE_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_sparc_atomic.h b/src/STLport/stl/_sparc_atomic.h
deleted file mode 100644
index 320dd19..0000000
--- a/src/STLport/stl/_sparc_atomic.h
+++ /dev/null
@@ -1,60 +0,0 @@
-
-// Currently, SUN CC requires object file
-
-#if defined (__GNUC__)
-
-/*
-**  int _STLP_atomic_exchange (__stl_atomic_t *pvalue, __stl_atomic_t value)
-*/
- 
-# ifdef __sparc_v9__
-
-#  ifdef __arch64__
-
-#   define _STLP_EXCH_ASM  asm volatile ("casx [%3], %4, %0 ;  membar  #LoadLoad | #LoadStore " : \
-                   "=r" (_L_value2), "=m" (*_L_pvalue1) : \
-                   "m" (*_L_pvalue1), "r" (_L_pvalue1), "r" (_L_value1), "0" (_L_value2) )
-
-#  else /* __arch64__ */
-
-#   define _STLP_EXCH_ASM  asm volatile ("cas [%3], %4, %0" : \
-                   "=r" (_L_value2), "=m" (*_L_pvalue1) : \
-                   "m" (*_L_pvalue1), "r" (_L_pvalue1), "r" (_L_value1), "0" (_L_value2) )
-#  endif
-
-# else /* __sparc_v9__ */
-
-#  define _STLP_EXCH_ASM asm volatile ("swap [%3], %0 " : \
-                                       "=r" (_L_value2), "=m" (*_L_pvalue1) : \
-                                       "m" (*_L_pvalue1), "r" (_L_pvalue1),  "0" (_L_value2) )
-# endif
-
-
-#  define _STLP_ATOMIC_EXCHANGE(__pvalue1, __value2) \
- ({  register volatile __stl_atomic_t *_L_pvalue1 = __pvalue1; \
-     register __stl_atomic_t _L_value1, _L_value2 =  __value2 ; \
-     do { _L_value1 = *_L_pvalue1; _STLP_EXCH_ASM; } while ( _L_value1 != _L_value2 ) ; \
-     _L_value1; })
-
-#  define _STLP_ATOMIC_INCREMENT(__pvalue1) \
- {  register volatile __stl_atomic_t *_L_pvalue1 = __pvalue1; \
-    register __stl_atomic_t _L_value1, _L_value2; \
-    do { _L_value1 = *_L_pvalue1;  _L_value2 = _L_value1+1; _STLP_EXCH_ASM; } while ( _L_value1 != _L_value2 ) ; }
-
-#  define _STLP_ATOMIC_DECREMENT(__pvalue1) \
- {  register volatile __stl_atomic_t *_L_pvalue1 = __pvalue1; \
-    register __stl_atomic_t _L_value1, _L_value2; \
-    do { _L_value1 = *_L_pvalue1;  _L_value2 = _L_value1-1; _STLP_EXCH_ASM; } while ( _L_value1 != _L_value2 ) ; }
-
-# elif ! defined (_STLP_NO_EXTERN_INLINE) 
-
-extern "C" __stl_atomic_t _STLP_atomic_exchange(__stl_atomic_t * __x, __stl_atomic_t __v);
-extern "C" void _STLP_atomic_decrement(__stl_atomic_t* i);
-extern "C" void _STLP_atomic_increment(__stl_atomic_t* i);
-
-#  define _STLP_ATOMIC_INCREMENT(__x)           _STLP_atomic_increment((__stl_atomic_t*)__x)
-#  define _STLP_ATOMIC_DECREMENT(__x)           _STLP_atomic_decrement((__stl_atomic_t*)__x)
-#  define _STLP_ATOMIC_EXCHANGE(__x, __y)       _STLP_atomic_exchange((__stl_atomic_t*)__x, (__stl_atomic_t)__y)
-
-# endif
-
diff --git a/src/STLport/stl/_sstream.c b/src/STLport/stl/_sstream.c
deleted file mode 100644
index 411e2b1..0000000
--- a/src/STLport/stl/_sstream.c
+++ /dev/null
@@ -1,543 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-
-#ifndef _STLP_SSTREAM_C
-#define _STLP_SSTREAM_C
-
-#ifndef _STLP_SSTREAM_H
-# include <stl/_sstream.h>
-#endif
-
-# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION)
-
-# if defined ( _STLP_NESTED_TYPE_PARAM_BUG )
-// no wint_t is supported for this mode
-# define __BSB_int_type__ int
-# define __BSB_pos_type__ streampos
-# else
-# define __BSB_int_type__ _STLP_TYPENAME_ON_RETURN_TYPE basic_stringbuf<_CharT, _Traits, _Alloc>::int_type
-# define __BSB_pos_type__ _STLP_TYPENAME_ON_RETURN_TYPE basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type
-# endif
-
-_STLP_BEGIN_NAMESPACE
-
-//----------------------------------------------------------------------
-// Non-inline stringbuf member functions.
-
-// Constructors.  Note that the base class constructor sets all of the
-// get and area pointers to null.
-
-template <class _CharT, class _Traits, class _Alloc>
-basic_stringbuf<_CharT, _Traits, _Alloc>
-  ::basic_stringbuf(ios_base::openmode __mode)
-    : basic_streambuf<_CharT, _Traits>(), _M_mode(__mode), _M_str()
-{}
-
-template <class _CharT, class _Traits, class _Alloc>
-basic_stringbuf<_CharT, _Traits, _Alloc>
-  ::basic_stringbuf(const basic_string<_CharT, _Traits, _Alloc>& __s, ios_base::openmode __mode)
-    : basic_streambuf<_CharT, _Traits>(), _M_mode(__mode), _M_str(__s)
-{
-  _M_set_ptrs();
-}
-
-template <class _CharT, class _Traits, class _Alloc>
-basic_stringbuf<_CharT, _Traits, _Alloc>::~basic_stringbuf()
-{}
-
-// Set the underlying string to a new value.
-template <class _CharT, class _Traits, class _Alloc>
-void 
-basic_stringbuf<_CharT, _Traits, _Alloc>::str(const basic_string<_CharT, _Traits, _Alloc>& __s)
-{
-  _M_str = __s;
-  _M_set_ptrs();
-}
-
-template <class _CharT, class _Traits, class _Alloc>
-void 
-basic_stringbuf<_CharT, _Traits, _Alloc>::_M_set_ptrs() {
-  _CharT* __data_ptr = __CONST_CAST(_CharT*,_M_str.data());
-  _CharT* __data_end = __data_ptr + _M_str.size();
-  // The initial read position is the beginning of the string.
-  if (_M_mode & ios_base::in)
-    this->setg(__data_ptr, __data_ptr, __data_end);
-  
-  // The initial write position is the beginning of the string.
-  if (_M_mode & ios_base::out) {
-    if (_M_mode & ios_base::app)
-      this->setp(__data_end, __data_end);
-    else
-      this->setp(__data_ptr, __data_end);
-  }
-}
-
-// Precondition: gptr() >= egptr().  Returns a character, if one is available.
-template <class _CharT, class _Traits, class _Alloc>
-__BSB_int_type__
-basic_stringbuf<_CharT, _Traits, _Alloc>::underflow()
-{
-  return this->gptr() != this->egptr()
-    ? _Traits::to_int_type(*this->gptr())
-    : _Traits::eof();
-}
-
-// Precondition: gptr() >= egptr().
-template <class _CharT, class _Traits, class _Alloc>
-__BSB_int_type__
-basic_stringbuf<_CharT, _Traits, _Alloc>::uflow()
-{
-  if (this->gptr() != this->egptr()) {
-    int_type __c = _Traits::to_int_type(*this->gptr());
-    this->gbump(1);
-    return __c;
-  }
-  else
-    return _Traits::eof();
-}
-
-template <class _CharT, class _Traits, class _Alloc>
-__BSB_int_type__
-basic_stringbuf<_CharT, _Traits, _Alloc>::pbackfail(int_type __c)
-{
-  if (this->gptr() != this->eback()) {
-    if (!_Traits::eq_int_type(__c, _Traits::eof())) {
-      if (_Traits::eq(_Traits::to_char_type(__c), this->gptr()[-1])) {
-        this->gbump(-1);
-        return __c;
-      }
-      else if (_M_mode & ios_base::out) {
-        this->gbump(-1);
-        *this->gptr() = __c;
-        return __c;
-      }
-      else
-        return _Traits::eof();
-    }
-    else {
-      this->gbump(-1);
-      return _Traits::not_eof(__c);
-    }
-  }
-  else
-    return _Traits::eof();
-}
-
-template <class _CharT, class _Traits, class _Alloc>
-__BSB_int_type__
-basic_stringbuf<_CharT, _Traits, _Alloc>::overflow(int_type __c)
-{
-  // fbp : reverse order of "ifs" to pass Dietmar's test.
-  // Apparently, standard allows overflow with eof even for read-only streams.
-  if (!_Traits::eq_int_type(__c, _Traits::eof())) {
-    if (_M_mode & ios_base::out) {
-      if (!(_M_mode & ios_base::in)) {
-        // It's a write-only streambuf, so we can use special append buffer.
-        if (this->pptr() == this->epptr())
-          this->_M_append_buffer();
-      
-        if (this->pptr() != this->epptr()) {
-          *this->pptr() = _Traits::to_char_type(__c);
-          this->pbump(1);
-          return __c;
-        }
-        else
-          return _Traits::eof();
-      }
-
-      else {
-        // We're not using a special append buffer, just the string itself.
-        if (this->pptr() == this->epptr()) {
-          ptrdiff_t __offset = this->gptr() - this->eback();
-          _M_str.push_back(_Traits::to_char_type(__c));
-
-	  _CharT* __data_ptr = __CONST_CAST(_CharT*,_M_str.data());
-	  size_t __data_size = _M_str.size();
-
-          this->setg(__data_ptr, __data_ptr + __offset, __data_ptr+__data_size);
-          this->setp(__data_ptr, __data_ptr + __data_size);
-          this->pbump((int)__data_size);
-          return __c;
-        }
-        else {
-          *this->pptr() = _Traits::to_char_type(__c);
-          this->pbump(1);
-          return __c;
-        }
-      }
-    }
-    else                          // Overflow always fails if it's read-only 
-      return _Traits::eof();
-  }
-  else                        // __c is EOF, so we don't have to do anything
-    return _Traits::not_eof(__c);
-}
-
-template <class _CharT, class _Traits, class _Alloc>
-streamsize 
-basic_stringbuf<_CharT, _Traits, _Alloc>::xsputn(const char_type* __s,
-                                                 streamsize __n)
-{
-  streamsize __nwritten = 0;
-
-  if ((_M_mode & ios_base::out) && __n > 0) {
-    // If the put pointer is somewhere in the middle of the string,
-    // then overwrite instead of append.
-    if (this->pbase() == _M_str.data() ) {
-      ptrdiff_t __avail = _M_str.data() + _M_str.size() - this->pptr();
-      if (__avail > __n) {
-        _Traits::copy(this->pptr(), __s, __n);
-        this->pbump((int)__n);
-        return __n;
-      }
-      else {
-        _Traits::copy(this->pptr(), __s, __avail);
-        __nwritten += __avail;
-        __n -= __avail;
-        __s += __avail;
-        this->setp(_M_Buf, _M_Buf + __STATIC_CAST(int,_S_BufSiz));
-      }
-    }
-
-    // At this point we know we're appending.
-    if (_M_mode & ios_base::in) {
-      ptrdiff_t __get_offset = this->gptr() - this->eback();
-      _M_str.append(__s, __s + __n);
-      
-      _CharT* __data_ptr = __CONST_CAST(_CharT*,_M_str.data());
-      size_t __data_size = _M_str.size();
-
-      this->setg(__data_ptr, __data_ptr + __get_offset, __data_ptr+__data_size);
-      this->setp(__data_ptr, __data_ptr + __data_size);
-      this->pbump((int)__data_size);
-    }
-    else {
-      _M_append_buffer();
-      _M_str.append(__s, __s + __n);
-    }
-
-    __nwritten += __n;
-  }
-
-  return __nwritten;
-}
-
-template <class _CharT, class _Traits, class _Alloc>
-streamsize 
-basic_stringbuf<_CharT, _Traits, _Alloc>::_M_xsputnc(char_type __c,
-                                                     streamsize __n)
-{
-  streamsize __nwritten = 0;
-
-  if ((_M_mode & ios_base::out) && __n > 0) {
-    // If the put pointer is somewhere in the middle of the string,
-    // then overwrite instead of append.
-    if (this->pbase() == _M_str.data()) {
-      ptrdiff_t __avail = _M_str.data() + _M_str.size() - this->pptr();
-      if (__avail > __n) {
-        _Traits::assign(this->pptr(), __n, __c);
-        this->pbump((int)__n);
-        return __n;
-      }
-      else {
-        _Traits::assign(this->pptr(), __avail, __c);
-        __nwritten += __avail;
-        __n -= __avail;
-        this->setp(_M_Buf, _M_Buf + __STATIC_CAST(int,_S_BufSiz));
-      }
-    }
-
-    // At this point we know we're appending.
-    if (this->_M_mode & ios_base::in) {
-      ptrdiff_t __get_offset = this->gptr() - this->eback();
-      _M_str.append(__n, __c);
-
-      _CharT* __data_ptr = __CONST_CAST(_CharT*,_M_str.data());
-      size_t __data_size = _M_str.size();
-
-      this->setg(__data_ptr, __data_ptr + __get_offset, __data_ptr+__data_size);
-      this->setp(__data_ptr, __data_ptr + __data_size);
-      this->pbump((int)__data_size);
-
-    }
-    else {
-      _M_append_buffer();
-      _M_str.append(__n, __c);      
-    }
-
-    __nwritten += __n;
-  }
-
-  return __nwritten;
-}
-
-// According to the C++ standard the effects of setbuf are implementation
-// defined, except that setbuf(0, 0) has no effect.  In this implementation,
-// setbuf(<anything>, n), for n > 0, calls reserve(n) on the underlying
-// string.
-template <class _CharT, class _Traits, class _Alloc>
-basic_streambuf<_CharT, _Traits>*
-basic_stringbuf<_CharT, _Traits, _Alloc>::setbuf(_CharT*, streamsize __n)
-{
-  if (__n > 0) {
-    bool __do_get_area = false;
-    bool __do_put_area = false;
-    ptrdiff_t __offg = 0;
-    ptrdiff_t __offp = 0;
-
-    if (this->pbase() == _M_str.data()) {
-      __do_put_area = true;
-      __offp = this->pptr() - this->pbase();
-    }
-
-    if (this->eback() == _M_str.data()) {
-      __do_get_area = true;
-      __offg = this->gptr() - this->eback();
-    }
-
-    if ((_M_mode & ios_base::out) && !(_M_mode & ios_base::in))
-      _M_append_buffer();
-
-    _M_str.reserve(__n);
-
-    _CharT* __data_ptr = __CONST_CAST(_CharT*,_M_str.data());
-    size_t __data_size = _M_str.size();
-
-    if (__do_get_area) {
-      this->setg(__data_ptr, __data_ptr + __offg, __data_ptr+__data_size);
-    }
-
-    if (__do_put_area) {
-      this->setp(__data_ptr, __data_ptr+__data_size);
-      this->pbump((int)__offp);
-    }
-  }
-
-  return this;
-}
-
-template <class _CharT, class _Traits, class _Alloc>
-__BSB_pos_type__
-basic_stringbuf<_CharT, _Traits, _Alloc>::seekoff(off_type __off, 
-            ios_base::seekdir __dir,
-            ios_base::openmode __mode)
-{
-  bool __in  = false;
-  bool __out = false;
-  
-  if ((__mode & (ios_base::in | ios_base::out)) == (ios_base::in | ios_base::out) ) {
-    if (__dir == ios_base::beg || __dir == ios_base::end)
-      __in = __out = true;
-  }
-  else if (__mode & ios_base::in)
-    __in = true;
-  else if (__mode & ios_base::out)
-    __out = true;
-
-  if (!__in && !__out)
-    return pos_type(off_type(-1));
-  else if ((__in  && (!(_M_mode & ios_base::in) || this->gptr() == 0)) ||
-           (__out && (!(_M_mode & ios_base::out) || this->pptr() == 0)))
-    return pos_type(off_type(-1));
-
-  if ((_M_mode & ios_base::out) && !(_M_mode & ios_base::in))
-    _M_append_buffer();
-
-  streamoff __newoff;
-  switch(__dir) {
-  case ios_base::beg:
-    __newoff = 0;
-    break;
-  case ios_base::end:
-    __newoff = _M_str.size();
-    break;
-  case ios_base::cur:
-    __newoff = __in ? this->gptr() - this->eback() 
-                    : this->pptr() - this->pbase();
-    break;
-  default:
-    return pos_type(off_type(-1));
-  }
-
-  __off += __newoff;
-
-  if (__in) {
-    ptrdiff_t __n = this->egptr() - this->eback();
-
-    if (__off < 0 || __off > __n)
-      return pos_type(off_type(-1));
-    else
-      this->setg(this->eback(), this->eback() + __off, this->eback() + __n);
-  }
-
-  if (__out) {
-    ptrdiff_t __n = this->epptr() - this->pbase();
-
-    if (__off < 0 || __off > __n)
-      return pos_type(off_type(-1));
-    else {
-      this->setp(this->pbase(), this->pbase() + __n);
-      this->pbump((int)__off);
-    }
-  }
-
-  return pos_type(__off);
-}
-
-template <class _CharT, class _Traits, class _Alloc>
-__BSB_pos_type__
-basic_stringbuf<_CharT, _Traits, _Alloc>
-  ::seekpos(pos_type __pos, ios_base::openmode __mode)
-{
-  bool __in  = (__mode & ios_base::in) != 0;
-  bool __out = (__mode & ios_base::out) != 0;
-
-  if ((__in  && (!(_M_mode & ios_base::in) || this->gptr() == 0)) ||
-      (__out && (!(_M_mode & ios_base::out) || this->pptr() == 0)))
-    return pos_type(off_type(-1));
-
-  const off_type __n = __pos - pos_type(off_type(0));
-  if ((_M_mode & ios_base::out) && !(_M_mode & ios_base::in))
-    _M_append_buffer();
-
-  if (__in) {
-    if (__n < 0 || __n > this->egptr() - this->eback())
-      return pos_type(off_type(-1));
-    this->setg(this->eback(), this->eback() + __n, this->egptr());
-  }
-
-  if (__out) {
-    if (__n < 0 || size_t(__n) > _M_str.size())
-      return pos_type(off_type(-1));
-
-    _CharT* __data_ptr = __CONST_CAST(_CharT*,_M_str.data());
-    size_t __data_size = _M_str.size();
-    
-    this->setp(__data_ptr, __data_ptr+__data_size);
-    this->pbump((int)__n);
-  }
-
-  return __pos;
-}
-
-// This is declared as a const member function because it is 
-// called by basic_stringbuf<>::str().  Precondition: this is a
-// write-only stringbuf.  We can't use an output buffer for read-
-// write stringbufs.  Postcondition: pptr is reset to the beginning
-// of the buffer.
-template <class _CharT, class _Traits, class _Alloc>
-void basic_stringbuf<_CharT, _Traits, _Alloc>::_M_append_buffer() const
-
-{
-  // Do we have a buffer to append?
-  if (this->pbase() == this->_M_Buf && this->pptr() != this->_M_Buf) {
-    basic_stringbuf<_CharT, _Traits, _Alloc>* __this = __CONST_CAST(_Self*,this);
-    __this->_M_str.append((const _CharT*)this->pbase(), (const _CharT*)this->pptr());
-    __this->setp(__CONST_CAST(_CharT*,_M_Buf),
-                 __CONST_CAST(_CharT*,_M_Buf + __STATIC_CAST(int,_S_BufSiz)));
-  }
-
-  // Have we run off the end of the string?
-  else if (this->pptr() == this->epptr()) {
-    basic_stringbuf<_CharT, _Traits, _Alloc>* __this = __CONST_CAST(_Self*,this);
-    __this->setp(__CONST_CAST(_CharT*,_M_Buf),
-                 __CONST_CAST(_CharT*,_M_Buf + __STATIC_CAST(int,_S_BufSiz)));
-  }
-}
-
-//----------------------------------------------------------------------
-// Non-inline istringstream member functions.
-
-template <class _CharT, class _Traits, class _Alloc>
-basic_istringstream<_CharT, _Traits, _Alloc>
-  ::basic_istringstream(ios_base::openmode __mode)
-    : basic_istream<_CharT, _Traits>(0),
-      _M_buf(__mode | ios_base::in)
-{
-  this->init(&_M_buf);
-}
-
-template <class _CharT, class _Traits, class _Alloc>
-basic_istringstream<_CharT, _Traits, _Alloc>
-  ::basic_istringstream(const _String& __str,ios_base::openmode __mode)
-    : basic_istream<_CharT, _Traits>(0),
-      _M_buf(__str, __mode | ios_base::in)
-{
-  this->init(&_M_buf);
-}
-
-template <class _CharT, class _Traits, class _Alloc>
-basic_istringstream<_CharT, _Traits, _Alloc>::~basic_istringstream()
-{}
-
-//----------------------------------------------------------------------
-// Non-inline ostringstream member functions.
-
-template <class _CharT, class _Traits, class _Alloc>
-basic_ostringstream<_CharT, _Traits, _Alloc>
-  ::basic_ostringstream(ios_base::openmode __mode)
-    : basic_ostream<_CharT, _Traits>(0),
-      _M_buf(__mode | ios_base::out)
-{
-  this->init(&_M_buf);
-}
-  
-template <class _CharT, class _Traits, class _Alloc>
-basic_ostringstream<_CharT, _Traits, _Alloc>
-  ::basic_ostringstream(const _String& __str, ios_base::openmode __mode)
-    : basic_ostream<_CharT, _Traits>(0),
-      _M_buf(__str, __mode | ios_base::out)
-{
-  this->init(&_M_buf);
-}
-
-template <class _CharT, class _Traits, class _Alloc>
-basic_ostringstream<_CharT, _Traits, _Alloc>::~basic_ostringstream()
-{}
-
-//----------------------------------------------------------------------
-// Non-inline stringstream member functions.
-
-template <class _CharT, class _Traits, class _Alloc>
-basic_stringstream<_CharT, _Traits, _Alloc>
-  ::basic_stringstream(ios_base::openmode __mode)
-    : basic_iostream<_CharT, _Traits>(0), _M_buf(__mode)
-{
-   this->init(&_M_buf);
-}
-
-template <class _CharT, class _Traits, class _Alloc>
-basic_stringstream<_CharT, _Traits, _Alloc>
-  ::basic_stringstream(const _String& __str, ios_base::openmode __mode)
-    : basic_iostream<_CharT, _Traits>(0), _M_buf(__str, __mode)
-{
-  this->init(&_M_buf);
-}
-
-template <class _CharT, class _Traits, class _Alloc>
-basic_stringstream<_CharT, _Traits, _Alloc>::~basic_stringstream()
-{}
-
-_STLP_END_NAMESPACE
-
-# undef __BSB_int_type__
-# undef __BSB_pos_type__
-
-# endif /* EXPOSE */
-
-#endif /* _STLP_SSTREAM_C */
diff --git a/src/STLport/stl/_sstream.h b/src/STLport/stl/_sstream.h
deleted file mode 100644
index 985f929..0000000
--- a/src/STLport/stl/_sstream.h
+++ /dev/null
@@ -1,252 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-
-
-// This header defines classes basic_stringbuf, basic_istringstream,
-// basic_ostringstream, and basic_stringstream.  These classes 
-// represent streamsbufs and streams whose sources or destinations are
-// C++ strings.
-
-#ifndef _STLP_SSTREAM_H
-#define _STLP_SSTREAM_H
-
-#ifndef _STLP_INTERNAL_STREAMBUF
-# include <stl/_streambuf.h>
-#endif
-
-#ifndef _STLP_INTERNAL_ISTREAM_H
-# include <stl/_istream.h> // Includes <ostream>, <ios>, <iosfwd>
-#endif
-
-#ifndef _STLP_STRING_H
-# include <stl/_string.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-//----------------------------------------------------------------------
-// This version of basic_stringbuf relies on the internal details of
-// basic_string.  It relies on the fact that, in this implementation,
-// basic_string's iterators are pointers.  It also assumes (as allowed
-// by the standard) that _CharT is a POD type.
-
-// We have a very small buffer for the put area, just so that we don't
-// have to use append() for every sputc.  Conceptually, the buffer
-// immediately follows the end of the underlying string.  We use this
-// buffer when appending to write-only streambufs, but we don't use it
-// for read-write streambufs.
-
-template <class _CharT, class _Traits, class _Alloc>
-class basic_stringbuf : public basic_streambuf<_CharT, _Traits>
-{
-public:                         // Typedefs.
-  typedef _CharT                     char_type;
-  typedef typename _Traits::int_type int_type;
-  typedef typename _Traits::pos_type pos_type;
-  typedef typename _Traits::off_type off_type;
-  typedef _Traits                    traits_type;
-
-  typedef basic_streambuf<_CharT, _Traits>          _Base;
-  typedef basic_stringbuf<_CharT, _Traits, _Alloc>  _Self;
-  typedef basic_string<_CharT, _Traits, _Alloc>     _String;
-
-public:                         // Constructors, destructor.
-  explicit basic_stringbuf(ios_base::openmode __mode
-                                      = ios_base::in | ios_base::out);
-  explicit basic_stringbuf(const _String& __s, ios_base::openmode __mode
-                                      = ios_base::in | ios_base::out);
-  virtual ~basic_stringbuf();
-
-public:                         // Get or set the string.
-  _String str() const { _M_append_buffer(); return _M_str; }
-  void str(const _String& __s);
-
-protected:                      // Overridden virtual member functions.
-  virtual int_type underflow();
-  virtual int_type uflow();
-  virtual int_type pbackfail(int_type __c);
-  virtual int_type overflow(int_type __c);
-  int_type pbackfail() {return pbackfail(_Traits::eof());}
-  int_type overflow() {return overflow(_Traits::eof());}
-
-  virtual streamsize xsputn(const char_type* __s, streamsize __n);
-  virtual streamsize _M_xsputnc(char_type __c, streamsize __n);
-
-  virtual _Base* setbuf(_CharT* __buf, streamsize __n);
-  virtual pos_type seekoff(off_type __off, ios_base::seekdir __dir,
-                           ios_base::openmode __mode 
-                                      = ios_base::in | ios_base::out);
-  virtual pos_type seekpos(pos_type __pos, ios_base::openmode __mode 
-                                      = ios_base::in | ios_base::out);
-
-private:                        // Helper functions.
-  // Append the internal buffer to the string if necessary.
-  void _M_append_buffer() const;
-  void _M_set_ptrs();
-
-private:
-  ios_base::openmode _M_mode;
-  mutable basic_string<_CharT, _Traits, _Alloc> _M_str;
-
-  enum _JustName { _S_BufSiz = 8 };
-  _CharT _M_Buf[ 8 /* _S_BufSiz */];
-};
-
-# if defined (_STLP_USE_TEMPLATE_EXPORT)
-_STLP_EXPORT_TEMPLATE_CLASS basic_stringbuf<char, char_traits<char>, allocator<char> >;
-#  if !defined (_STLP_NO_WCHAR_T)
-_STLP_EXPORT_TEMPLATE_CLASS basic_stringbuf<wchar_t, char_traits<wchar_t>, allocator<wchar_t>  >;
-#  endif
-# endif /* _STLP_USE_TEMPLATE_EXPORT */
-
-//----------------------------------------------------------------------
-// Class basic_istringstream, an input stream that uses a stringbuf.
-
-template <class _CharT, class _Traits, class _Alloc>
-class basic_istringstream : public basic_istream<_CharT, _Traits>
-{
-public:                         // Typedefs
-  typedef typename _Traits::char_type   char_type;
-  typedef typename _Traits::int_type    int_type;
-  typedef typename _Traits::pos_type    pos_type;
-  typedef typename _Traits::off_type    off_type;
-  typedef _Traits traits_type;
-
-  typedef basic_ios<_CharT, _Traits>                _Basic_ios;
-  typedef basic_istream<_CharT, _Traits>            _Base;
-  typedef basic_string<_CharT, _Traits, _Alloc>     _String;
-  typedef basic_stringbuf<_CharT, _Traits, _Alloc>  _Buf;
-
-public:                         // Constructors, destructor.
-  basic_istringstream(ios_base::openmode __mode = ios_base::in);
-  basic_istringstream(const _String& __str,
-                      ios_base::openmode __mode = ios_base::in);
-  ~basic_istringstream();
-
-public:                         // Member functions
-
-  basic_stringbuf<_CharT, _Traits, _Alloc>* rdbuf() const
-    { return __CONST_CAST(_Buf*,&_M_buf); }
-
-  _String str() const { return _M_buf.str(); }
-  void str(const _String& __s) { _M_buf.str(__s); }
-  
-private:
-  basic_stringbuf<_CharT, _Traits, _Alloc> _M_buf;
-};
-
-
-//----------------------------------------------------------------------
-// Class basic_ostringstream, an output stream that uses a stringbuf.
-
-template <class _CharT, class _Traits, class _Alloc>
-class basic_ostringstream : public basic_ostream<_CharT, _Traits>
-{
-public:                         // Typedefs
-  typedef typename _Traits::char_type   char_type;
-  typedef typename _Traits::int_type    int_type;
-  typedef typename _Traits::pos_type    pos_type;
-  typedef typename _Traits::off_type    off_type;
-  typedef _Traits traits_type;
-
-  typedef basic_ios<_CharT, _Traits>                _Basic_ios;
-  typedef basic_ostream<_CharT, _Traits>            _Base;
-  typedef basic_string<_CharT, _Traits, _Alloc>     _String;
-  typedef basic_stringbuf<_CharT, _Traits, _Alloc>  _Buf;
-
-public:                         // Constructors, destructor.
-  basic_ostringstream(ios_base::openmode __mode = ios_base::out);
-  basic_ostringstream(const _String& __str,
-                      ios_base::openmode __mode = ios_base::out);
-  ~basic_ostringstream();
-
-public:                         // Member functions.
-
-  basic_stringbuf<_CharT, _Traits, _Alloc>* rdbuf() const
-    { return __CONST_CAST(_Buf*,&_M_buf); }
-
-  _String str() const { return _M_buf.str(); }
-    void str(const _String& __s) { _M_buf.str(__s); } // dwa 02/07/00 - BUG STOMPER DAVE
-
-
-private:
-  basic_stringbuf<_CharT, _Traits, _Alloc> _M_buf;
-};
-
-
-//----------------------------------------------------------------------
-// Class basic_stringstream, a bidirectional stream that uses a stringbuf.
-
-template <class _CharT, class _Traits, class _Alloc>
-class basic_stringstream : public basic_iostream<_CharT, _Traits>
-{
-public:                         // Typedefs
-  typedef typename _Traits::char_type char_type;
-  typedef typename _Traits::int_type  int_type;
-  typedef typename _Traits::pos_type  pos_type;
-  typedef typename _Traits::off_type  off_type;
-  typedef _Traits  traits_type;
-
-  typedef basic_ios<_CharT, _Traits>                 _Basic_ios;
-  typedef basic_iostream<_CharT, _Traits>            _Base;
-  typedef basic_string<_CharT, _Traits, _Alloc>      _String;
-  typedef basic_stringbuf<_CharT, _Traits, _Alloc>  _Buf;
-  
-  typedef ios_base::openmode openmode;
-
-public:                         // Constructors, destructor.
-  basic_stringstream(openmode __mod = ios_base::in | ios_base::out);
-  basic_stringstream(const _String& __str,
-                     openmode __mod = ios_base::in | ios_base::out);
-  ~basic_stringstream();
-
-public:                         // Member functions.
-
-  basic_stringbuf<_CharT, _Traits, _Alloc>* rdbuf() const
-    { return __CONST_CAST(_Buf*,&_M_buf); }
-
-  _String str() const { return _M_buf.str(); }
-    void str(const _String& __s) { _M_buf.str(__s); }
-
-private:
-  basic_stringbuf<_CharT, _Traits, _Alloc> _M_buf;
-};
-
-
-# if defined (_STLP_USE_TEMPLATE_EXPORT)
-_STLP_EXPORT_TEMPLATE_CLASS basic_istringstream<char, char_traits<char>, allocator<char> >;
-_STLP_EXPORT_TEMPLATE_CLASS basic_ostringstream<char, char_traits<char>, allocator<char> >;
-_STLP_EXPORT_TEMPLATE_CLASS basic_stringstream<char, char_traits<char>, allocator<char> >;
-#  if !defined (_STLP_NO_WCHAR_T)
-_STLP_EXPORT_TEMPLATE_CLASS basic_istringstream<wchar_t, char_traits<wchar_t>, allocator<wchar_t>  >;
-_STLP_EXPORT_TEMPLATE_CLASS basic_ostringstream<wchar_t, char_traits<wchar_t>, allocator<wchar_t>  >;
-_STLP_EXPORT_TEMPLATE_CLASS basic_stringstream<wchar_t, char_traits<wchar_t>, allocator<wchar_t>  >;
-#  endif
-# endif /* _STLP_USE_TEMPLATE_EXPORT */
-
-_STLP_END_NAMESPACE
-
-# if  defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION)
-#  include <stl/_sstream.c>
-# endif
-
-#endif /* _STLP_SSTREAM_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_stack.h b/src/STLport/stl/_stack.h
deleted file mode 100644
index 8bfca5b..0000000
--- a/src/STLport/stl/_stack.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_STACK_H
-#define _STLP_INTERNAL_STACK_H
-
-#ifndef _STLP_INTERNAL_DEQUE_H
-# include <stl/_deque.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-# if !defined ( _STLP_LIMITED_DEFAULT_TEMPLATES )
-template <class _Tp, class _Sequence = deque<_Tp> >
-# elif defined ( _STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS )
-# define _STLP_STACK_ARGS _Tp
-template <class _Tp>
-# else
-template <class _Tp, class _Sequence>
-# endif
-class stack {
-
-# ifdef _STLP_STACK_ARGS 
-  typedef deque<_Tp> _Sequence;
-# endif
-
-public:
-  typedef typename _Sequence::value_type      value_type;
-  typedef typename _Sequence::size_type       size_type;
-  typedef          _Sequence                  container_type;
-
-  typedef typename _Sequence::reference       reference;
-  typedef typename _Sequence::const_reference const_reference;
-protected:
-  _Sequence c;
-public:
-  stack() : c() {}
-  explicit stack(const _Sequence& __s) : c(__s) {}
-
-  bool empty() const { return c.empty(); }
-  size_type size() const { return c.size(); }
-  reference top() { return c.back(); }
-  const_reference top() const { return c.back(); }
-  void push(const value_type& __x) { c.push_back(__x); }
-  void pop() { c.pop_back(); }
-  const _Sequence& _Get_c() const { return c; }
-};
-
-# ifndef _STLP_STACK_ARGS
-#  define _STLP_STACK_ARGS _Tp, _Sequence
-#  define _STLP_STACK_HEADER_ARGS class _Tp, class _Sequence
-# else
-#  define _STLP_STACK_HEADER_ARGS class _Tp
-# endif
-
-template < _STLP_STACK_HEADER_ARGS >
-inline bool _STLP_CALL  operator==(const stack< _STLP_STACK_ARGS >& __x, const stack< _STLP_STACK_ARGS >& __y)
-{
-  return __x._Get_c() == __y._Get_c();
-}
-
-template < _STLP_STACK_HEADER_ARGS >
-inline bool _STLP_CALL  operator<(const stack< _STLP_STACK_ARGS >& __x, const stack< _STLP_STACK_ARGS >& __y)
-{
-  return __x._Get_c() < __y._Get_c();
-}
-
-_STLP_RELOPS_OPERATORS(template < _STLP_STACK_HEADER_ARGS >, stack< _STLP_STACK_ARGS >)
-    
-_STLP_END_NAMESPACE
-
-#  undef _STLP_STACK_ARGS
-#  undef _STLP_STACK_HEADER_ARGS
-
-#endif /* _STLP_INTERNAL_STACK_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_stdio_file.h b/src/STLport/stl/_stdio_file.h
deleted file mode 100644
index 1bd2e72..0000000
--- a/src/STLport/stl/_stdio_file.h
+++ /dev/null
@@ -1,758 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-
-
-// WARNING: This is an internal header file, included by other C++
-// standard library headers.  You should not attempt to use this header
-// file directly.
-
-
-#ifndef _STLP_STDIO_FILE_H
-#define _STLP_STDIO_FILE_H
-
-// This file provides a low-level interface between the internal 
-// representation of struct FILE, from the C stdio library, and 
-// the C++ I/O library.  The C++ I/O library views a FILE object as
-// a collection of three pointers: the beginning of the buffer, the
-// current read/write position, and the end of the buffer.
-
-// The interface:
-// - char* _FILE_[IO]_begin(const FILE *__f);
-//       Returns a pointer to the beginning of the buffer.
-// - char* _FILE_[IO]_next(const FILE *__f);
-//       Returns the current read/write position within the buffer.
-// - char* _FILE_[IO]_end(const FILE *__f);
-//       Returns a pointer immediately past the end of the buffer.
-// - char* _FILE_[IO]_avail(const FILE *__f);
-//       Returns the number of characters remaining in the buffer, i.e.
-//       _FILE_[IO]_end(__f) - _FILE_[IO]_next(__f).
-// - char& _FILE_[IO]_preincr(FILE *__f)
-//       Increments the current read/write position by 1, returning the 
-//       character at the old position.
-// - char& _FILE_[IO]_postincr(FILE *__f)
-//       Increments the current read/write position by 1, returning the 
-//       character at the old position.
-// - char& _FILE_[IO]_predecr(FILE *__f)
-//       Decrements the current read/write position by 1, returning the 
-//       character at the old position.
-// - char& _FILE_[IO]_postdecr(FILE *__f)
-//       Decrements the current read/write position by 1, returning the 
-//       character at the old position.
-// - void _FILE_[IO]_bump(FILE *__f, int __n)
-//       Increments the current read/write position by __n.
-// - void _FILE_[IO]_set(FILE *__f, char* __begin, char* __next, char* __end);
-//       Sets the beginning of the bufer to __begin, the current read/write
-//       position to __next, and the buffer's past-the-end pointer to __end.
-//       If any of those pointers is null, then all of them must be null.
-
-// Each function comes in two versions, one for a FILE used as an input
-// buffer and one for a FILE used as an output buffer.  In some stdio
-// implementations the two functions are identical, but in others they are
-// not.
-
-#ifndef _STLP_CSTDIO
-# include <cstdio>
-#endif
-#ifndef _STLP_CSTDDEF
-# include <cstddef>
-#endif
-
-#if defined(__MSL__)
-# include <unix.h>	// get the definition of fileno
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-#if !defined(_STLP_WINCE)
-//----------------------------------------------------------------------
-// Implementation for the IRIX C library.
-// Solaris interface looks to be identical.
-#if !defined(_STLP_USE_GLIBC) && \
-    ( defined(__sgi) || \
-      ( defined(__sun) && ! defined (_LP64) )  || \
-      defined (__osf__) || defined(__DECCXX) || \
-      defined (_STLP_MSVC) || defined (__ICL) || defined (__MINGW32__) || defined(__DJGPP) || defined (_AIX) || defined (_CRAY))
-
-#if defined ( _MSC_VER ) || defined (__ICL) || defined (__MINGW32__) || defined(__DJGPP)
-typedef  char* _File_ptr_type;
-#else
-typedef  unsigned char* _File_ptr_type;
-#endif
-
-inline int   _FILE_fd(const FILE *__f) { return __f->_file; }
-inline char* _FILE_I_begin(const FILE *__f) { return (char*) __f->_base; }
-inline char* _FILE_I_next(const FILE *__f) { return (char*) __f->_ptr; }  
-inline char* _FILE_I_end(const FILE *__f)
-  { return (char*) __f->_ptr + __f->_cnt; }
-
-inline ptrdiff_t _FILE_I_avail(const FILE *__f) { return __f->_cnt; }
-
-inline char& _FILE_I_preincr(FILE *__f)
-  { --__f->_cnt; return *(char*) (++__f->_ptr); }
-inline char& _FILE_I_postincr(FILE *__f)
-  { --__f->_cnt; return *(char*) (__f->_ptr++); }
-inline char& _FILE_I_predecr(FILE *__f)
-  { ++__f->_cnt; return *(char*) (--__f->_ptr); }
-inline char& _FILE_I_postdecr(FILE *__f)
-  { ++__f->_cnt; return *(char*) (__f->_ptr--); }
-inline void  _FILE_I_bump(FILE *__f, int __n)
-  { __f->_ptr += __n; __f->_cnt -= __n; }
-
-inline void _FILE_I_set(FILE *__f, char* __begin, char* __next, char* __end) {
-  __f->_base = (_File_ptr_type) __begin;
-  __f->_ptr  = (_File_ptr_type) __next;
-  __f->_cnt  = __end - __next;
-}
-
-# define _STLP_FILE_I_O_IDENTICAL 1
-
-#elif defined(__EMX__)
-
-inline int   _FILE_fd(const FILE* __f) { return __f->_handle; }
-inline char* _FILE_I_begin(const FILE* __f) { return (char*) __f->_buffer; }
-inline char* _FILE_I_next(const FILE* __f) { return (char*) __f->_ptr; }
-inline char* _FILE_I_end(const FILE* __f) { return (char *) __f->_ptr + __f->_rcount; }
-inline ptrdiff_t _FILE_I_avail(const FILE* __f) { return __f->_rcount; }
-inline char& _FILE_I_preincr(FILE* __f) { --__f->_rcount; return *(char*) (++__f->_ptr); }
-inline char& _FILE_I_postincr(FILE* __f) { --__f->_rcount; return *(char*) (__f->_ptr++); }
-inline char& _FILE_I_predecr(FILE* __f) { ++__f->_rcount; return *(char*) (--__f->_ptr); }
-inline char& _FILE_I_postdecr(FILE* __f) { ++__f->_rcount; return *(char*) (__f->_ptr--); }
-inline void  _FILE_I_bump(FILE* __f, int __n) { __f->_ptr += __n; __f->_rcount -= __n; }
-inline void _FILE_I_set(FILE* __f, char* __begin, char* __next, char* __end) {
-  __f->_buffer = __begin;
-  __f->_ptr  = __next;
-  __f->_rcount  = __end - __next;
-}
-
-inline char* _FILE_O_begin(const FILE* __f) { return (char*) __f->_buffer; }
-inline char* _FILE_O_next(const FILE* __f) { return (char*) __f->_ptr; }
-inline char* _FILE_O_end(const FILE* __f) { return (char*) __f->_ptr + __f->_wcount; }
-inline ptrdiff_t _FILE_O_avail(const FILE* __f) { return __f->_wcount; }
-inline char& _FILE_O_preincr(FILE* __f) { --__f->_wcount; return *(char*) (++__f->_ptr); }
-inline char& _FILE_O_postincr(FILE* __f) { --__f->_wcount; return *(char*) (__f->_ptr++); }
-inline char& _FILE_O_predecr(FILE* __f) { ++__f->_wcount; return *(char*) (--__f->_ptr); }
-inline char& _FILE_O_postdecr(FILE* __f) { ++__f->_wcount; return *(char*) (__f->_ptr--); }
-inline void _FILE_O_bump(FILE* __f, int __n) { __f->_ptr += __n; __f->_wcount -= __n; }
-inline void _FILE_O_set(FILE* __f, char* __begin, char* __next, char* __end) {
-  __f->_buffer = __begin;
-  __f->_ptr  = __next;
-  __f->_wcount  = __end - __next;
-}
-
-
-# undef _STLP_FILE_I_O_IDENTICAL
-
-# elif defined(_STLP_SCO_OPENSERVER) || defined(__NCR_SVR)
-
-typedef  unsigned char* _File_ptr_type;
-
-inline int   _FILE_fd(const FILE *__f) { return __f->__file; }
-inline char* _FILE_I_begin(const FILE *__f) { return (char*) __f->__base; }
-inline char* _FILE_I_next(const FILE *__f) { return (char*) __f->__ptr; }
-inline char* _FILE_I_end(const FILE *__f)
-  { return (char*) __f->__ptr + __f->__cnt; }
-
-inline ptrdiff_t _FILE_I_avail(const FILE *__f) { return __f->__cnt; }
-
-inline char& _FILE_I_preincr(FILE *__f)
-  { --__f->__cnt; return *(char*) (++__f->__ptr); }
-inline char& _FILE_I_postincr(FILE *__f)
-  { --__f->__cnt; return *(char*) (__f->__ptr++); }
-inline char& _FILE_I_predecr(FILE *__f)
-  { ++__f->__cnt; return *(char*) (--__f->__ptr); }
-inline char& _FILE_I_postdecr(FILE *__f)
-  { ++__f->__cnt; return *(char*) (__f->__ptr--); }
-inline void  _FILE_I_bump(FILE *__f, int __n)
-  { __f->__ptr += __n; __f->__cnt -= __n; }
-
-inline void _FILE_I_set(FILE *__f, char* __begin, char* __next, char* __end) {
-  __f->__base = (_File_ptr_type) __begin;
-  __f->__ptr  = (_File_ptr_type) __next;
-  __f->__cnt  = __end - __next;
-}
-
-# define _STLP_FILE_I_O_IDENTICAL 1
-
-# elif defined(__sun) && defined( _LP64)
-
-typedef long _File_ptr_type;
-
-inline int _FILE_fd(const FILE *__f) { return (int) __f->__pad[2]; }
-inline char* _FILE_I_begin(const FILE *__f) { return (char*)
-__f->__pad[1]; }
-inline char* _FILE_I_next(const FILE *__f) { return (char*)
-__f->__pad[0]; }
-inline char* _FILE_I_end(const FILE *__f)
-{ return (char*) __f->__pad[0] + __f->__pad[3]; }
-
-inline ptrdiff_t _FILE_I_avail(const FILE *__f) { return __f->__pad[3]; }
-
-inline char& _FILE_I_preincr(FILE *__f)
-{ --__f->__pad[3]; return *(char*) (++__f->__pad[0]); }
-inline char& _FILE_I_postincr(FILE *__f)
-{ --__f->__pad[3]; return *(char*) (__f->__pad[0]++); }
-inline char& _FILE_I_predecr(FILE *__f)
-{ ++__f->__pad[3]; return *(char*) (--__f->__pad[0]); }
-inline char& _FILE_I_postdecr(FILE *__f)
-{ ++__f->__pad[3]; return *(char*) (__f->__pad[0]--); }
-inline void _FILE_I_bump(FILE *__f, long __n)
-{ __f->__pad[0] += __n; __f->__pad[3] -= __n; }
-
-inline void _FILE_I_set(FILE *__f, char* __begin, char* __next, char*
-__end) {
-__f->__pad[1] = (_File_ptr_type) __begin;
-__f->__pad[0] = (_File_ptr_type) __next;
-__f->__pad[3] = __end - __next;
-}
-
-# define _STLP_FILE_I_O_IDENTICAL
-
-#elif defined (__CYGWIN__) || defined(__FreeBSD__)  || defined(__NetBSD__) \
-  || defined(__amigaos__) || ( defined(__GNUC__) && defined(__APPLE__) )
-
-inline int _FILE_fd(const FILE *__f) { return __f->_file; }
-inline char* _FILE_I_begin(const FILE *__f) { return (char*)
-						__f->_bf._base; }
-inline char* _FILE_I_next(const FILE *__f) { return (char*) __f->_p; } 
-inline char* _FILE_I_end(const FILE *__f)
-{ return (char*) __f->_p + __f->_r; }
-
-inline ptrdiff_t _FILE_I_avail(const FILE *__f) { return __f->_r; }
-
-inline char& _FILE_I_preincr(FILE *__f)
-{ --__f->_r; --__f->_bf._size; return *(char*) (++__f->_p); }
-inline char& _FILE_I_postincr(FILE *__f)
-{ --__f->_r; --__f->_bf._size; return *(char*) (__f->_p++); }
-inline char& _FILE_I_predecr(FILE *__f)
-{ ++__f->_r; ++ __f->_bf._size; return *(char*) (--__f->_p); }
-inline char& _FILE_I_postdecr(FILE *__f)
-{ ++__f->_r; ++__f->_bf._size; return *(char*) (__f->_p--); }
-inline void _FILE_I_bump(FILE *__f, int __n)
-{ __f->_p += __n; __f->_bf._size+=__n; __f->_r -= __n; }
-
-inline void _FILE_I_set(FILE *__f, char* __begin, char* __next, char*
-			__end) {
-  __f->_bf._base = (unsigned char*) __begin;
-  __f->_p = (unsigned char*) __next;
-  __f->_r = __f->_bf._size = __end - __next;
-}
-inline char* _FILE_O_begin(const FILE *__f) { return (char*)
-						__f->_bf._base; }
-inline char* _FILE_O_next(const FILE *__f) { return (char*) __f->_p; } 
-inline char* _FILE_O_end(const FILE *__f)
-{ return (char*) __f->_p + __f->_w; }
-
-inline ptrdiff_t _FILE_O_avail(const FILE *__f) { return __f->_w; }
-
-inline char& _FILE_O_preincr(FILE *__f)
-{ --__f->_w; --__f->_bf._size; return *(char*) (++__f->_p); }
-inline char& _FILE_O_postincr(FILE *__f)
-{ --__f->_w; --__f->_bf._size; return *(char*) (__f->_p++); }
-inline char& _FILE_O_predecr(FILE *__f)
-{ ++__f->_w; ++__f->_bf._size; return *(char*) (--__f->_p); }
-inline char& _FILE_O_postdecr(FILE *__f)
-{ ++__f->_w; ++__f->_bf._size; return *(char*) (__f->_p--); }
-inline void _FILE_O_bump(FILE *__f, int __n)
-{ __f->_p += __n; __f->_bf._size+=__n; __f->_w -= __n; }
-
-inline void _FILE_O_set(FILE *__f, char* __begin, char* __next, char*
-			__end) {
-  __f->_bf._base = (unsigned char*) __begin;
-  __f->_p = (unsigned char*) __next;
-  __f->_w = __f->_bf._size = __end - __next;
-}
-
-# undef _STLP_FILE_I_O_IDENTICAL
-
-#elif defined(_STLP_USE_GLIBC)
-
-inline int   _FILE_fd(const FILE *__f) { return __f->_fileno; }
-inline char* _FILE_I_begin(const FILE *__f) { return __f->_IO_read_base; }
-inline char* _FILE_I_next(const FILE *__f)  { return __f->_IO_read_ptr; }
-inline char* _FILE_I_end(const FILE *__f)   { return __f->_IO_read_end; }
-
-inline ptrdiff_t _FILE_I_avail(const FILE *__f) 
-  { return __f->_IO_read_end - __f->_IO_read_ptr; }
-
-inline char& _FILE_I_preincr(FILE *__f)  { return *++__f->_IO_read_ptr; }
-inline char& _FILE_I_postincr(FILE *__f) { return *__f->_IO_read_ptr++; }
-inline char& _FILE_I_predecr(FILE *__f)  { return *--__f->_IO_read_ptr; }
-inline char& _FILE_I_postdecr(FILE *__f) { return *__f->_IO_read_ptr--; }
-inline void  _FILE_I_bump(FILE *__f, int __n) { __f->_IO_read_ptr += __n; }
-
-inline void _FILE_I_set(FILE *__f, char* __begin, char* __next, char* __end) {
-  __f->_IO_read_base = __begin; 
-  __f->_IO_read_ptr  = __next; 
-  __f->_IO_read_end  = __end; 
-}
-
-inline char* _FILE_O_begin(const FILE *__f) { return __f->_IO_write_base; }
-inline char* _FILE_O_next(const FILE *__f)  { return __f->_IO_write_ptr; }
-inline char* _FILE_O_end(const FILE *__f)   { return __f->_IO_write_end; }
-
-inline ptrdiff_t _FILE_O_avail(const FILE *__f) 
-  { return __f->_IO_write_end - __f->_IO_write_ptr; }
-
-inline char& _FILE_O_preincr(FILE *__f)  { return *++__f->_IO_write_ptr; }
-inline char& _FILE_O_postincr(FILE *__f) { return *__f->_IO_write_ptr++; }
-inline char& _FILE_O_predecr(FILE *__f)  { return *--__f->_IO_write_ptr; }
-inline char& _FILE_O_postdecr(FILE *__f) { return *__f->_IO_write_ptr--; }
-inline void  _FILE_O_bump(FILE *__f, int __n) { __f->_IO_write_ptr += __n; }
-
-inline void _FILE_O_set(FILE *__f, char* __begin, char* __next, char* __end) {
-  __f->_IO_write_base = __begin; 
-  __f->_IO_write_ptr  = __next; 
-  __f->_IO_write_end  = __end; 
-
-}
-
-#elif defined(__hpux) /* && defined(__hppa) && defined(__HP_aCC)) */
-
-#ifndef _INCLUDE_HPUX_SOURCE
-extern "C" unsigned char *__bufendtab[];
-#  undef  _bufend
-#  define _bufend(__p) \
-     (*(((__p)->__flag & _IOEXT)  ? &(((_FILEX *)(__p))->__bufendp)      \
- 				    : &(__bufendtab[(__p) - __iob])))
- 
-#  define _bufsiz(__p)  (_bufend(__p) - (__p)->__base)
-#endif /* _INCLUDE_HPUX_SOURCE */
-
-#if defined(_STLP_HPACC_BROKEN_BUFEND)
-#  undef  _bufend
-#  define _bufend(__p) \
-     (*(((__p)->__flag & _IOEXT)  ? &((__REINTERPRET_CAST(_FILEX*,(__p)))->__bufendp)  \
-                               : &(__bufendtab[__REINTERPRET_CAST(FILE*,(__p)) - __iob])))
-#endif
-
-inline int   _FILE_fd(const FILE *__f) { return fileno(__CONST_CAST(FILE *,__f)); }
-inline char* _FILE_I_begin(const FILE *__f) { return (__REINTERPRET_CAST(char*, __f->__base)); }
-inline char* _FILE_I_next(const FILE *__f)  { return (__REINTERPRET_CAST(char*, __f->__ptr)); }
-inline char* _FILE_I_end(const FILE *__f)   { return (__REINTERPRET_CAST(char*, __f->__ptr +__f->__cnt)); }
-
-inline ptrdiff_t _FILE_I_avail(const FILE *__f)  { return __f->__cnt; }
-
-inline char& _FILE_I_preincr(FILE *__f)  { --__f->__cnt; return *__REINTERPRET_CAST(char*, ++__f->__ptr); }
-inline char& _FILE_I_postincr(FILE *__f) { --__f->__cnt; return *__REINTERPRET_CAST(char*, __f->__ptr++); }
-inline char& _FILE_I_predecr(FILE *__f)  { ++__f->__cnt; return *__REINTERPRET_CAST(char*,--__f->__ptr); }
-inline char& _FILE_I_postdecr(FILE *__f) { ++__f->__cnt; return *__REINTERPRET_CAST(char*,__f->__ptr--); }
-inline void  _FILE_I_bump(FILE *__f, int __n) { __f->__cnt -= __n; __f->__ptr += __n; }
- 
-inline void _FILE_I_set(FILE *__f, char* __begin, char* __next, char* __end) {
-# if defined(__hpux)
-   if( (unsigned long) (__f - &__iob[0]) > _NFILE)
-        __f->__flag |= _IOEXT;  // used by stdio's _bufend macro and goodness knows what else...
-# endif
-  __f->__cnt  = __end - __next; 
-  __f->__base = __REINTERPRET_CAST(unsigned char*, __begin); 
-  __f->__ptr  = __REINTERPRET_CAST(unsigned char*, __next);
-  _bufend(__f) = __REINTERPRET_CAST(unsigned char*, __end); 
-}
-
-// For HPUX stdio, input and output FILE manipulation is identical.
-
-# define _STLP_FILE_I_O_IDENTICAL
-
-#elif defined (__BORLANDC__)
-
-typedef unsigned char* _File_ptr_type;
-
-inline int _FILE_fd(const FILE *__f) { return __f->fd; }
-inline char* _FILE_I_begin(const FILE *__f) { return (char*) __f->buffer;
-}
-inline char* _FILE_I_next(const FILE *__f) 
-{ return (char*)__f->curp; } 
-inline char* _FILE_I_end(const FILE *__f)
-{ return (char*) __f->curp + __f->level; }
-
-inline ptrdiff_t _FILE_I_avail(const FILE *__f) { return __f->level; }
-
-inline char& _FILE_I_preincr(FILE *__f)
-{ --__f->level; return *(char*) (++__f->curp); }
-inline char& _FILE_I_postincr(FILE *__f)
-{ --__f->level; return *(char*) (__f->curp++); }
-inline char& _FILE_I_predecr(FILE *__f)
-{ ++__f->level; return *(char*) (--__f->curp); }
-inline char& _FILE_I_postdecr(FILE *__f)
-{ ++__f->level; return *(char*) (__f->curp--); }
-inline void _FILE_I_bump(FILE *__f, int __n)
-{ __f->curp += __n; __f->level -= __n; }
-
-inline void _FILE_I_set(FILE *__f, char* __begin, char* __next, char*
-			__end) {
-  __f->buffer = (_File_ptr_type) __begin;
-  __f->curp = (_File_ptr_type) __next;
-  __f->level = __end - __next;
-}
-
-# define _STLP_FILE_I_O_IDENTICAL
-
-#elif defined( __MWERKS__ )
-
-// using MWERKS-specific defines here to detect other OS targets
-// dwa: I'm not sure they provide fileno for all OS's, but this should
-// work for Win32 and WinCE
-# if __dest_os == __mac_os
-inline int   _FILE_fd(const FILE *__f) { return ::fileno(__CONST_CAST(FILE*, __f)); }
-# else
-inline int   _FILE_fd(const FILE *__f) { return ::_fileno(__CONST_CAST(FILE*, __f)); }
-# endif
-
-//       Returns a pointer to the beginning of the buffer.
-inline char* _FILE_I_begin(const FILE *__f) { return __REINTERPRET_CAST(char*, __f->buffer); }
-//       Returns the current read/write position within the buffer.
-inline char* _FILE_I_next(const FILE *__f) { return __REINTERPRET_CAST(char*, __f->buffer_ptr); }
-
-//       Returns a pointer immediately past the end of the buffer.
-inline char* _FILE_I_end(const FILE *__f) { return __REINTERPRET_CAST(char*, __f->buffer_ptr + __f->buffer_len); }
-
-//       Returns the number of characters remaining in the buffer, i.e.
-//       _FILE_[IO]_end(__f) - _FILE_[IO]_next(__f).
-inline ptrdiff_t _FILE_I_avail(const FILE *__f) { return __f->buffer_len; }
-
-//       Increments the current read/write position by 1, returning the 
-//       character at the old position.
-inline char& _FILE_I_preincr(FILE *__f)
-  { --__f->buffer_len; return *(char*) (++__f->buffer_ptr); }
-inline char& _FILE_I_postincr(FILE *__f)
-  { --__f->buffer_len; return *(char*) (__f->buffer_ptr++); }
-inline char& _FILE_I_predecr(FILE *__f)
-  { ++__f->buffer_len; return *(char*) (--__f->buffer_ptr); }
-inline char& _FILE_I_postdecr(FILE *__f)
-  { ++__f->buffer_len; return *(char*) (__f->buffer_ptr--); }
-inline void  _FILE_I_bump(FILE *__f, int __n)
-  { __f->buffer_ptr += __n; __f->buffer_len -= __n; }
-
-inline void _FILE_I_set(FILE *__f, char* __begin, char* __next, char* __end) {
-  __f->buffer = __REINTERPRET_CAST(unsigned char*, __begin);
-  __f->buffer_ptr   = __REINTERPRET_CAST(unsigned char*, __next);
-  __f->buffer_len  = __end - __next;
-  __f->buffer_size = __end - __begin;
-}
-
-# define _STLP_FILE_I_O_IDENTICAL
-
-#elif defined(__DMC__)
-
-inline int   _FILE_fd(const FILE *__f) { return __f->_file; }
-
-//       Returns a pointer to the beginning of the buffer.
-inline char* _FILE_I_begin(const FILE *__f) { return __f->_base; }
-
-//       Returns the current read/write position within the buffer.
-inline char* _FILE_I_next(const FILE *__f) { return __f->_ptr; }
-
-//       Returns a pointer immediately past the end of the buffer.
-inline char* _FILE_I_end(const FILE *__f) { return __f->_ptr + __f->_cnt; }
-
-//       Returns the number of characters remaining in the buffer, i.e.
-//       _FILE_[IO]_end(__f) - _FILE_[IO]_next(__f).
-inline ptrdiff_t _FILE_I_avail(const FILE *__f) { return __f->_cnt; }
-
-//       Increments the current read/write position by 1, returning the 
-//       character at the NEW position.
-inline char& _FILE_I_preincr(FILE *__f) { --__f->_cnt; return *(++__f->_ptr); }
-
-
-//       Increments the current read/write position by 1, returning the 
-//       character at the old position.
-inline char& _FILE_I_postincr(FILE *__f) { --__f->_cnt; return *(__f->_ptr++); }
-
-//       Decrements the current read/write position by 1, returning the 
-//       character at the NEW position.
-inline char& _FILE_I_predecr(FILE *__f) { ++__f->_cnt; return *(--__f->_ptr); }
-
-//       Decrements the current read/write position by 1, returning the 
-//       character at the old position.
-inline char& _FILE_I_postdecr(FILE *__f) { ++__f->_cnt; return *(__f->_ptr--); }
-
-//       Increments the current read/write position by __n.
-inline void _FILE_I_bump(FILE *__f, int __n) { __f->_cnt -= __n; __f->_ptr += __n; }
-
-//       Sets the beginning of the bufer to __begin, the current read/write
-//       position to __next, and the buffer's past-the-end pointer to __end.
-//       If any of those pointers is null, then all of them must be null.
-inline void _FILE_I_set(FILE *__f, char* __begin, char* __next, char* __end)
-{
-	__f->_base = __begin;
-	__f->_ptr = __next;
-	__f->_cnt = __end - __next;
-	__f->_bufsiz = __end - __begin;
-}
-
-# define _STLP_FILE_I_O_IDENTICAL
-
-#elif defined(__MRC__) || defined(__SC__)		//*TY 02/24/2000 - added support for MPW
-
-inline int   _FILE_fd(const FILE *__f) { return __f->_file; }
-
-//       Returns a pointer to the beginning of the buffer.
-inline char* _FILE_I_begin(const FILE *__f) { return (char*) __f->_base; }
-
-//       Returns the current read/write position within the buffer.
-inline char* _FILE_I_next(const FILE *__f) { return (char*) __f->_ptr; }
-
-//       Returns a pointer immediately past the end of the buffer.
-inline char* _FILE_I_end(const FILE *__f) { return (char*)__f->_end; }
-
-//       Returns the number of characters remaining in the buffer, i.e.
-//       _FILE_[IO]_end(__f) - _FILE_[IO]_next(__f).
-inline ptrdiff_t _FILE_I_avail(const FILE *__f) { return __f->_cnt; }
-
-//       Increments the current read/write position by 1, returning the 
-//       character at the NEW position.
-inline char& _FILE_I_preincr(FILE *__f) { --__f->_cnt; return*(char*) (++__f->_ptr); }
-
-
-//       Increments the current read/write position by 1, returning the 
-//       character at the old position.
-inline char& _FILE_I_postincr(FILE *__f) { --__f->_cnt; return*(char*) (__f->_ptr++); }
-
-//       Decrements the current read/write position by 1, returning the 
-//       character at the NEW position.
-inline char& _FILE_I_predecr(FILE *__f) { ++__f->_cnt; return*(char*) (--__f->_ptr); }
-
-//       Decrements the current read/write position by 1, returning the 
-//       character at the old position.
-inline char& _FILE_I_postdecr(FILE *__f) { ++__f->_cnt; return*(char*) (__f->_ptr--); }
-
-//       Increments the current read/write position by __n.
-inline void _FILE_I_bump(FILE *__f, int __n) { __f->_cnt -= __n; __f->_ptr += __n; }
-
-//       Sets the beginning of the bufer to __begin, the current read/write
-//       position to __next, and the buffer's past-the-end pointer to __end.
-//       If any of those pointers is null, then all of them must be null.
-inline void _FILE_I_set(FILE *__f, char* __begin, char* __next, char* __end)
-{
-	__f->_base = (unsigned char*)__begin;
-	__f->_ptr  = (unsigned char*)__next;
-	__f->_end  = (unsigned char*)__end;
-	__f->_cnt  = __end - __next;
-	__f->_size = __end - __begin;
-}
-
-# define _STLP_FILE_I_O_IDENTICAL
-
-#elif defined (__MVS__)
-
-typedef unsigned char* _File_ptr_type;
-
-inline int _FILE_fd(const FILE *__f) { return fileno(__CONST_CAST(FILE
-								  *,__f)); }
-inline char* _FILE_I_begin(const FILE *__f) { return (char*)
-						__f->__fp->__bufPtr; }
-inline char* _FILE_I_next(const FILE *__f) { return (char*)
-					       __f->__fp->__bufPtr; }
-inline char* _FILE_I_end(const FILE *__f)
-{ return (char*) __f->__fp->__bufPtr + __f->__fp->__countIn; }
-
-inline ptrdiff_t _FILE_I_avail(const FILE *__f) { return
-						    __f->__fp->__countIn; }
-
-inline char& _FILE_I_preincr(FILE *__f)
-{ --__f->__fp->__countIn; return *(char*) (++__f->__fp->__bufPtr); }
-inline char& _FILE_I_postincr(FILE *__f)
-{ --__f->__fp->__countIn; return *(char*) (__f->__fp->__bufPtr++); }
-inline char& _FILE_I_predecr(FILE *__f)
-{ ++__f->__fp->__countIn; return *(char*) (--__f->__fp->__bufPtr); }
-inline char& _FILE_I_postdecr(FILE *__f)
-{ ++__f->__fp->__countIn; return *(char*) (__f->__fp->__bufPtr--); }
-inline void _FILE_I_bump(FILE *__f, int __n)
-{ __f->__fp->__bufPtr += __n; __f->__fp->__countIn -= __n; }
-
-inline void _FILE_I_set(FILE *__f, char* __begin, char* __next, char*
-			__end) {
-  // __f->_base = (_File_ptr_type) __begin;
-  if(__f->__fp) {
-    __f->__fp->__bufPtr = (_File_ptr_type) __next;
-    __f->__fp->__countIn = __end - __next;
-  }
-}
-
-inline char* _FILE_O_begin(const FILE *__f) { return (char*)__f->__fp->__bufPtr;}
-inline char* _FILE_O_next(const FILE *__f) { return (char*) __f->__fp->__bufPtr;}
-inline char* _FILE_O_end(const FILE *__f) { return (char*) __f->__fp->__bufPtr + __f->__fp->__countOut; }
-inline ptrdiff_t _FILE_O_avail(const FILE *__f) { return __f->__fp->__countOut; }
-
-inline char& _FILE_O_preincr(FILE *__f)
-{ --__f->__fp->__countOut; return *(char*) (++__f->__fp->__bufPtr); }
-inline char& _FILE_O_postincr(FILE *__f)
-{ --__f->__fp->__countOut; return *(char*) (__f->__fp->__bufPtr++); }
-inline char& _FILE_O_predecr(FILE *__f)
-{ ++__f->__fp->__countOut; return *(char*) (--__f->__fp->__bufPtr); }
-inline char& _FILE_O_postdecr(FILE *__f)
-{ ++__f->__fp->__countOut; return *(char*) (__f->__fp->__bufPtr--); }
-inline void _FILE_O_bump(FILE *__f, int __n)
-{ __f->__fp->__bufPtr += __n; __f->__fp->__countOut -= __n; }
-
-inline void _FILE_O_set(FILE *__f, char* __begin, char* __next, char*
-			__end) {
-  // __f->_base = (_File_ptr_type) __begin;
-  if(__f->__fp) {
-    __f->__fp->__bufPtr = (_File_ptr_type) __next;
-    __f->__fp->__countOut = __end - __next;
-  }
-}
-
-#elif defined(__QNXNTO__)
-
-inline int _FILE_fd(const FILE *__f) { return __f->_handle;
-}
-inline char* _FILE_I_begin(const FILE *__f) { return
-                                                (char*) __f->_base; }
-inline char* _FILE_I_next(const FILE *__f) { return
-                                               (char*) __f->_ptr; }
-inline char* _FILE_I_end(const FILE *__f)
-{ return (char*) __f->_ptr + __f->_cnt; }
-
-inline ptrdiff_t _FILE_I_avail(const FILE *__f) { return
-                                                    __f->_cnt; }
-
-inline char& _FILE_I_preincr(FILE *__f)
-{ --__f->_cnt; return *(char*) (++__f->_ptr); }
-inline char& _FILE_I_postincr(FILE *__f)
-{ --__f->_cnt; return *(char*) (__f->_ptr++); }
-inline char& _FILE_I_predecr(FILE *__f)
-{ ++__f->_cnt; return *(char*) (--__f->_ptr); }
-inline char& _FILE_I_postdecr(FILE *__f)
-{ ++__f->_cnt; return *(char*) (__f->_ptr--); }
-inline void _FILE_I_bump(FILE *__f, int __n)
-{ __f->_ptr += __n; __f->_cnt -= __n; }
-
-inline void _FILE_I_set(FILE *__f, char* __begin, char*
-                        __next, char*
-                        __end) {
-  __f->_base = (unsigned char*) __begin;
-  __f->_ptr = (unsigned char*) __next;
-  __f->_cnt = __end - __next;
-}
-
-# define _STLP_FILE_I_O_IDENTICAL
- 
-#elif defined(__WATCOMC__)                   // Nikolaev
- 
-inline int       _FILE_fd      (const FILE *__f) { return __f->_handle;}
-inline char*     _FILE_I_begin (const FILE *__f) { return __REINTERPRET_CAST(char*, __f->_link); }
-inline char*     _FILE_I_next  (const FILE *__f) { return __REINTERPRET_CAST(char*, __f->_ptr); }
-inline char*     _FILE_I_end   (const FILE *__f) { return __REINTERPRET_CAST(char*, __f->_ptr + __f->_cnt); }
-inline ptrdiff_t _FILE_I_avail (const FILE *__f) { return __f->_cnt; }
- 
-inline char& _FILE_I_preincr(FILE *__f)
-{
-  --__f->_cnt;
-  return *__REINTERPRET_CAST(char*, ++__f->_ptr);
-}
- 
-inline char& _FILE_I_postincr(FILE *__f)
-{
-  --__f->_cnt;
-  return *__REINTERPRET_CAST(char*, __f->_ptr++);
-}
-
-inline char& _FILE_I_predecr(FILE *__f)
-{
-  ++__f->_cnt;
-  return *__REINTERPRET_CAST(char*, --__f->_ptr);
-}
- 
-inline char& _FILE_I_postdecr(FILE *__f)
-{
-  ++__f->_cnt;
-  return *__REINTERPRET_CAST(char*, __f->_ptr--);
-}
- 
-inline void _FILE_I_bump(FILE *__f, int __n)
-{
-  __f->_ptr += __n;
-  __f->_cnt -= __n;
-}
- 
-inline void _FILE_I_set(FILE *__f, char* __begin, char* __next, char* __end)
-{
-  __f->_link = __REINTERPRET_CAST(__stream_link*, __begin);
-  __f->_ptr  = __REINTERPRET_CAST(unsigned char*, __next);
-  __f->_cnt  = __end - __next;
-}
- 
-# define _STLP_FILE_I_O_IDENTICAL
-
-#elif defined (__Lynx__)
-
-// the prototypes are taken from LynxOS patch for STLport 4.0
-inline int   _FILE_fd(const FILE *__f) { return __f->_fd; }
-inline char* _FILE_I_begin(const FILE *__f) { return (char*) __f->_base; }
-inline char* _FILE_I_next(const FILE *__f) { return (char*) __f->_ptr; }  
-inline char* _FILE_I_end(const FILE *__f)
-  { return (char*) __f->_ptr + __f->_cnt; }
- 
-inline ptrdiff_t _FILE_I_avail(const FILE *__f) { return __f->_cnt; }
- 
-inline char& _FILE_I_preincr(FILE *__f)
-  { --__f->_cnt; return *(char*) (++__f->_ptr); }
-inline char& _FILE_I_postincr(FILE *__f)
-  { --__f->_cnt; return *(char*) (__f->_ptr++); }
-inline char& _FILE_I_predecr(FILE *__f)
-   { ++__f->_cnt; return *(char*) (--__f->_ptr); }
-inline char& _FILE_I_postdecr(FILE *__f)
-  { ++__f->_cnt; return *(char*) (__f->_ptr--); }
-inline void  _FILE_I_bump(FILE *__f, int __n)
-  { __f->_ptr += __n; __f->_cnt -= __n; }
-
-inline void _FILE_I_set(FILE *__f, char* __begin, char* __next, char* __end) {
-  __f->_base = __begin;
-  __f->_ptr  = __next;
-  __f->_cnt  = __end - __next;
-}
-# define _STLP_FILE_I_O_IDENTICAL
-
-#else  /* A C library that we don't have an implementation for. */
-
-# error The C++ I/O library is not configured for this compiler
-
-#endif
-
-
-// For most stdio's , input and output FILE manipulation is identical.
-# ifdef _STLP_FILE_I_O_IDENTICAL
-inline char* _FILE_O_begin(const FILE *__f) { return _FILE_I_begin(__f); }
-inline char* _FILE_O_next(const FILE *__f)  { return _FILE_I_next(__f); }
-inline char* _FILE_O_end(const FILE *__f)   { return _FILE_I_end(__f); }
-
-inline ptrdiff_t _FILE_O_avail(const FILE *__f) { return _FILE_I_avail(__f); }
-
-inline char& _FILE_O_preincr(FILE *__f)  { return _FILE_I_preincr(__f); }
-inline char& _FILE_O_postincr(FILE *__f) { return _FILE_I_postincr(__f); }
-inline char& _FILE_O_predecr(FILE *__f)  { return _FILE_I_predecr(__f); }
-inline char& _FILE_O_postdecr(FILE *__f) { return _FILE_I_postdecr(__f); }
-
-inline void  _FILE_O_bump(FILE *__f, int __n) { _FILE_I_bump(__f, __n); }
-inline void _FILE_O_set(FILE *__f, char* __begin, char* __next, char* __end)
-  { _FILE_I_set(__f, __begin, __next, __end); }
-# endif
-
-#else
-inline int _FILE_fd(const FILE *__f) { return (int)::_fileno(__CONST_CAST(FILE *, __f)); }
-#endif /* _STLP_WINCE */
-
-_STLP_END_NAMESPACE
-
-#endif /* _STLP_STDIO_FILE_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_stream_iterator.h b/src/STLport/stl/_stream_iterator.h
deleted file mode 100644
index 2979e3a..0000000
--- a/src/STLport/stl/_stream_iterator.h
+++ /dev/null
@@ -1,343 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996-1998
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#if !defined (_STLP_INTERNAL_STREAM_ITERATOR_H) && ! defined (_STLP_USE_NO_IOSTREAMS)
-#define _STLP_INTERNAL_STREAM_ITERATOR_H
-
-#ifndef _STLP_INTERNAL_ITERATOR_BASE_H
-# include <stl/_iterator_base.h>
-#endif
-
-// streambuf_iterators predeclarations must appear first
-#ifndef _STLP_IOSFWD
-# include <iosfwd>
-#endif
-
-#ifndef _STLP_INTERNAL_ALGOBASE_H
-#include <stl/_algobase.h>
-#endif
-
-#if defined (_STLP_OWN_IOSTREAMS)
-
-#ifndef _STLP_INTERNAL_OSTREAMBUF_ITERATOR_H
-# include <stl/_ostreambuf_iterator.h>
-#endif
-
-#ifndef _STLP_INTERNAL_ISTREAMBUF_ITERATOR_H
-# include <stl/_istreambuf_iterator.h>
-#endif
-
-#ifndef _STLP_INTERNAL_ISTREAM_H
-# include <stl/_istream.h>
-#endif
-#endif /* _STLP_OWN_IOSTREAMS */
-
-// istream_iterator and ostream_iterator look very different if we're
-// using new, templatized iostreams than if we're using the old cfront
-// version.
-
-# if defined (_STLP_USE_NEW_IOSTREAMS) 
-
-_STLP_BEGIN_NAMESPACE
-
-#  ifndef _STLP_LIMITED_DEFAULT_TEMPLATES
-template <class _Tp, 
-          class _CharT = _STLP_DEFAULTCHAR, class _Traits = char_traits<_CharT>,
-          class _Dist = ptrdiff_t> 
-#   define __ISI_TMPL_HEADER_ARGUMENTS class _Tp, class _CharT, class _Traits, class _Dist
-#   define __ISI_TMPL_ARGUMENTS _Tp, _CharT, _Traits, _Dist
-class istream_iterator : public iterator<input_iterator_tag, _Tp , _Dist,
-                         const _Tp*, const _Tp& > {
-#  else
-
-#   if defined (_STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS) && ! defined (_STLP_DEFAULT_TYPE_PARAM)
-#    define __ISI_TMPL_HEADER_ARGUMENTS class _Tp
-#    define __ISI_TMPL_ARGUMENTS        _Tp
-template <class _Tp>
-class istream_iterator : public iterator<input_iterator_tag, _Tp , ptrdiff_t, 
-                         const _Tp*, const _Tp& > {
-#   else
-#    define __ISI_TMPL_HEADER_ARGUMENTS class _Tp, class _Dist
-#    define __ISI_TMPL_ARGUMENTS        _Tp, _Dist
-template <class _Tp,__DFL_TYPE_PARAM(_Dist, ptrdiff_t)>
-class istream_iterator : public iterator<input_iterator_tag, _Tp, _Dist , 
-                                         const _Tp*, const _Tp& > {
-#   endif /* _STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS */
-
-#  endif /* _STLP_LIMITED_DEFAULT_TEMPLATES */
-
-# ifdef _STLP_LIMITED_DEFAULT_TEMPLATES
-  typedef char _CharT;
-  typedef char_traits<char> _Traits;
-#  if defined (_STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS) && ! defined (_STLP_DEFAULT_TYPE_PARAM)
-  typedef ptrdiff_t _Dist;
-#  endif
-# endif
-
-  typedef istream_iterator< __ISI_TMPL_ARGUMENTS > _Self;
-public:
-  typedef _CharT                         char_type;
-  typedef _Traits                        traits_type;
-  typedef basic_istream<_CharT, _Traits> istream_type;
-
-  typedef input_iterator_tag             iterator_category;
-  typedef _Tp                            value_type;
-  typedef _Dist                          difference_type;
-  typedef const _Tp*                     pointer;
-  typedef const _Tp&                     reference;
-
-  istream_iterator() : _M_stream(0), _M_ok(false) {}
-  istream_iterator(istream_type& __s) : _M_stream(&__s) { _M_read(); }
-
-  reference operator*() const { return _M_value; }
-
-  _STLP_DEFINE_ARROW_OPERATOR
-
-  _Self& operator++() { 
-    _M_read(); 
-    return *this;
-  }
-  _Self operator++(int)  {
-    _Self __tmp = *this;
-    _M_read();
-    return __tmp;
-  }
-
-  bool _M_equal(const _Self& __x) const
-    { return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream); }
-
-private:
-  istream_type* _M_stream;
-  _Tp _M_value;
-  bool _M_ok;
-
-  void _M_read() {
-    _M_ok = (_M_stream && *_M_stream) ? true : false;
-    if (_M_ok) {
-      *_M_stream >> _M_value;
-      _M_ok = *_M_stream ? true : false;
-    }
-  }
-};
-
-#ifndef _STLP_LIMITED_DEFAULT_TEMPLATES
-template <class _TpP,
-          class _CharT = _STLP_DEFAULTCHAR, class _Traits = char_traits<_CharT> >
-#else
-template <class _TpP>
-#endif
-class ostream_iterator: public iterator<output_iterator_tag, void, void, void, void> {
-# ifdef _STLP_LIMITED_DEFAULT_TEMPLATES
-  typedef char _CharT;
-  typedef char_traits<char> _Traits;
-  typedef ostream_iterator<_TpP> _Self;
-# else
-  typedef ostream_iterator<_TpP, _CharT, _Traits> _Self;
-# endif
-public:
-  typedef _CharT                         char_type;
-  typedef _Traits                        traits_type;
-  typedef basic_ostream<_CharT, _Traits> ostream_type;
-
-  typedef output_iterator_tag            iterator_category;
-
-  ostream_iterator(ostream_type& __s) : _M_stream(&__s), _M_string(0) {}
-  ostream_iterator(ostream_type& __s, const _CharT* __c) 
-    : _M_stream(&__s), _M_string(__c)  {}
-  _Self& operator=(const _TpP& __val) { 
-    *_M_stream << __val;
-    if (_M_string) *_M_stream << _M_string;
-    return *this;
-  }
-  _Self& operator*() { return *this; }
-  _Self& operator++() { return *this; } 
-  _Self& operator++(int) { return *this; } 
-private:
-  ostream_type* _M_stream;
-  const _CharT* _M_string;
-};
-
-# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES
-#  ifdef _STLP_LIMITED_DEFAULT_TEMPLATES
-template <class _TpP>
-inline output_iterator_tag _STLP_CALL 
-iterator_category(const ostream_iterator<_TpP>&) { return output_iterator_tag(); }
-# else
-template <class _TpP, class _CharT, class _Traits>
-inline output_iterator_tag _STLP_CALL 
-iterator_category(const ostream_iterator<_TpP, _CharT, _Traits>&) { return output_iterator_tag(); }
-#  endif
-# endif
-
-_STLP_END_NAMESPACE
-
-# elif ! defined(_STLP_USE_NO_IOSTREAMS)
-
-_STLP_BEGIN_NAMESPACE
-
-#  if defined (_STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS) && ! defined (_STLP_DEFAULT_TYPE_PARAM)
-#  define __ISI_TMPL_HEADER_ARGUMENTS class _Tp
-#  define __ISI_TMPL_ARGUMENTS        _Tp
-template <class _Tp>
-class istream_iterator : public iterator<input_iterator_tag, _Tp, ptrdiff_t, 
-                         const _Tp*, const _Tp& > {
-#  else
-#  define __ISI_TMPL_HEADER_ARGUMENTS class _Tp, class _Dist
-#  define __ISI_TMPL_ARGUMENTS        _Tp, _Dist
-template <class _Tp, __DFL_TYPE_PARAM(_Dist, ptrdiff_t)>
-class istream_iterator : public iterator<input_iterator_tag, _Tp, _Dist, 
-                         const _Tp*, const _Tp& > {
-#  endif
-
-protected:
-  istream* _M_stream;
-  _Tp _M_value;
-  bool _M_end_marker;
-  void _M_read() {
-    _M_end_marker = (*_M_stream) ? true : false;
-    if (_M_end_marker) *_M_stream >> _M_value;
-    _M_end_marker = (*_M_stream) ? true : false;
-}
-public:
-  typedef input_iterator_tag  iterator_category;
-  typedef _Tp                 value_type;
-  typedef _Dist               difference_type;
-  typedef const _Tp*          pointer;
-  typedef const _Tp&          reference;
-
-  istream_iterator() : _M_stream(&cin), _M_end_marker(false) {}
-  istream_iterator(istream& __s) : _M_stream(&__s) { _M_read(); }
-  reference operator*() const { return _M_value; }
-
-  _STLP_DEFINE_ARROW_OPERATOR
-
-  istream_iterator< __ISI_TMPL_ARGUMENTS >& operator++() { 
-    _M_read(); 
-    return *this;
-  }
-  istream_iterator< __ISI_TMPL_ARGUMENTS > operator++(int)  {
-    istream_iterator< __ISI_TMPL_ARGUMENTS > __tmp = *this;
-    _M_read();
-    return __tmp;
-  }
-  inline bool _M_equal(const istream_iterator< __ISI_TMPL_ARGUMENTS >& __y) const {
-    return (_M_stream == __y._M_stream &&
-	    _M_end_marker == __y._M_end_marker) ||
-      _M_end_marker == false && __y._M_end_marker == false;
-  }
-};
-
-template <class _Tp>
-class ostream_iterator {
-protected:
-  ostream* _M_stream;
-  const char* _M_string;
-public:
-  typedef output_iterator_tag iterator_category;
-# ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION
-  typedef void                value_type;
-  typedef void                difference_type;
-  typedef void                pointer;
-  typedef void                reference;
-# endif
-  ostream_iterator(ostream& __s) : _M_stream(&__s), _M_string(0) {}
-  ostream_iterator(ostream& __s, const char* __c) 
-    : _M_stream(&__s), _M_string(__c)  {}
-  ostream_iterator<_Tp>& operator=(const _Tp& __val) { 
-    *_M_stream << __val;
-    if (_M_string) *_M_stream << _M_string;
-    return *this;
-  }
-  ostream_iterator<_Tp>& operator*() { return *this; }
-  ostream_iterator<_Tp>& operator++() { return *this; } 
-  ostream_iterator<_Tp>& operator++(int) { return *this; } 
-};
-
-# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES
-template <class _Tp> inline output_iterator_tag 
-iterator_category(const ostream_iterator<_Tp>&) { return output_iterator_tag(); }
-#endif
-
-_STLP_END_NAMESPACE
-
-#endif /* _STLP_USE_NEW_IOSTREAMS */
-
-// form-independent definiotion of stream iterators
-_STLP_BEGIN_NAMESPACE
-
-template < __ISI_TMPL_HEADER_ARGUMENTS >
-inline bool _STLP_CALL 
-operator==(const istream_iterator< __ISI_TMPL_ARGUMENTS >& __x,
-           const istream_iterator< __ISI_TMPL_ARGUMENTS >& __y) {
-  return __x._M_equal(__y);
-}
-
-#  ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE
-
-template < __ISI_TMPL_HEADER_ARGUMENTS >
-inline bool _STLP_CALL 
-operator!=(const istream_iterator< __ISI_TMPL_ARGUMENTS >& __x,
-           const istream_iterator< __ISI_TMPL_ARGUMENTS >& __y) {
-  return !__x._M_equal(__y);
-}
-
-#  endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */
-
-# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES
-template < __ISI_TMPL_HEADER_ARGUMENTS >
-inline input_iterator_tag _STLP_CALL 
-iterator_category(const istream_iterator< __ISI_TMPL_ARGUMENTS >&)
-{ return input_iterator_tag(); }
-template < __ISI_TMPL_HEADER_ARGUMENTS >
-inline _Tp* _STLP_CALL 
-value_type(const istream_iterator< __ISI_TMPL_ARGUMENTS >&) { return (_Tp*) 0; }
-
-#  if defined (_STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS) && ! defined (_STLP_DEFAULT_TYPE_PARAM)
-template < __ISI_TMPL_HEADER_ARGUMENTS >
-inline ptrdiff_t* _STLP_CALL 
-distance_type(const istream_iterator< __ISI_TMPL_ARGUMENTS >&) { return (ptrdiff_t*)0; }
-#  else
-template < __ISI_TMPL_HEADER_ARGUMENTS >
-inline _Dist* _STLP_CALL 
-distance_type(const istream_iterator< __ISI_TMPL_ARGUMENTS >&) { return (_Dist*)0; }
-#  endif /* _STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS */
-
-# endif 
-
-_STLP_END_NAMESPACE
-
-#  undef __ISI_TMPL_HEADER_ARGUMENTS
-#  undef __ISI_TMPL_ARGUMENTS
-
-
-#endif /* _STLP_INTERNAL_STREAM_ITERATOR_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_streambuf.c b/src/STLport/stl/_streambuf.c
deleted file mode 100644
index 59a1e4b..0000000
--- a/src/STLport/stl/_streambuf.c
+++ /dev/null
@@ -1,216 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-#ifndef _STLP_STREAMBUF_C
-#define _STLP_STREAMBUF_C
-
-#ifndef _STLP_INTERNAL_STREAMBUF
-# include <stl/_streambuf.h>
-#endif
-
-# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION)
-
-_STLP_BEGIN_NAMESPACE
-//----------------------------------------------------------------------
-// Non-inline basic_streambuf<> member functions.
-
-template <class _CharT, class _Traits>
-basic_streambuf<_CharT, _Traits>::basic_streambuf()
-  : _M_gbegin(0), _M_gnext(0), _M_gend(0),
-    _M_pbegin(0), _M_pnext(0), _M_pend(0),
-    _M_locale()
-{
-  //  _M_lock._M_initialize();
-}
-
-template <class _CharT, class _Traits>
-basic_streambuf<_CharT, _Traits>::~basic_streambuf() 
-{}
-
-
-template <class _CharT, class _Traits>
-locale 
-basic_streambuf<_CharT, _Traits>::pubimbue(const locale& __loc) {
-  this->imbue(__loc);
-  locale __tmp = _M_locale;
-  _M_locale = __loc;
-  return __tmp;
-}
-
-template <class _CharT, class _Traits>
-streamsize
-basic_streambuf<_CharT, _Traits>::xsgetn(_CharT* __s, streamsize __n)
-{
-  streamsize __result = 0;
-  const int_type __eof = _Traits::eof();
-
-  while (__result < __n) {
-    if (_M_gnext < _M_gend) {
-      size_t __chunk = (min) (__STATIC_CAST(size_t,_M_gend - _M_gnext),
-                           __STATIC_CAST(size_t,__n - __result));
-      _Traits::copy(__s, _M_gnext, __chunk);
-      __result += __chunk;
-      __s += __chunk;
-      _M_gnext += __chunk;
-    }
-    else {
-      int_type __c = this->sbumpc();
-      if (!_Traits::eq_int_type(__c, __eof)) {
-        *__s = __c;
-        ++__result;
-	++__s;
-      }
-      else
-        break; 
-    }
-  }
-  
-  return __result;
-}
-
-template <class _CharT, class _Traits>
-streamsize
-basic_streambuf<_CharT, _Traits>::xsputn(const _CharT* __s, streamsize __n)
-{
-  streamsize __result = 0;
-  const int_type __eof = _Traits::eof();
-
-  while (__result < __n) {
-    if (_M_pnext < _M_pend) {
-      size_t __chunk = (min) (__STATIC_CAST(size_t,_M_pend - _M_pnext),
-                           __STATIC_CAST(size_t,__n - __result));
-      _Traits::copy(_M_pnext, __s, __chunk);
-      __result += __chunk;
-      __s += __chunk;
-      _M_pnext += __chunk;
-    }
-
-    else if (!_Traits::eq_int_type(this->overflow(_Traits::to_int_type(*__s)),
-                                   __eof)) {
-      ++__result;
-      ++__s;
-    }
-    else
-      break;
-  }
-  return __result;
-}
-
-template <class _CharT, class _Traits>
-streamsize
-basic_streambuf<_CharT, _Traits>::_M_xsputnc(_CharT __c, streamsize __n)
-{
-  streamsize __result = 0;
-  const int_type __eof = _Traits::eof();
-
-  while (__result < __n) {
-    if (_M_pnext < _M_pend) {
-      size_t __chunk = (min) (__STATIC_CAST(size_t,_M_pend - _M_pnext),
-                           __STATIC_CAST(size_t,__n - __result));
-      _Traits::assign(_M_pnext, __chunk, __c);
-      __result += __chunk;
-      _M_pnext += __chunk;
-    }
-
-    else if (!_Traits::eq_int_type(this->overflow(_Traits::to_int_type(__c)),
-                                   __eof))
-      ++__result;
-    else
-      break;
-  }
-  return __result;
-}
-
-template <class _CharT, class _Traits>
-_STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::int_type 
-basic_streambuf<_CharT, _Traits>::_M_snextc_aux()  
-{
-  int_type __eof = _Traits::eof();
-  if (_M_gend == _M_gnext)
-    return _Traits::eq_int_type(this->uflow(), __eof) ? __eof : this->sgetc();
-  else {
-    _M_gnext = _M_gend;
-    return this->underflow();
-  }
-}
-
-template <class _CharT, class _Traits>
-_STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::int_type 
-basic_streambuf<_CharT, _Traits>::pbackfail(int_type) { 
- return _Traits::eof(); 
-}
-
-template <class _CharT, class _Traits>
-_STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::int_type 
-basic_streambuf<_CharT, _Traits>::overflow(int_type) { 
-  return _Traits::eof(); 
-}
-
-template <class _CharT, class _Traits>
-_STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::int_type 
-basic_streambuf<_CharT, _Traits>::uflow() {
-    return ( _Traits::eq_int_type(this->underflow(),_Traits::eof()) ?
-             _Traits::eof() :
-             _Traits::to_int_type(*_M_gnext++));
-}
-
-template <class _CharT, class _Traits>
-_STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::int_type 
-basic_streambuf<_CharT, _Traits>::underflow()
-{ return _Traits::eof(); }
-
-template <class _CharT, class _Traits>
-streamsize 
-basic_streambuf<_CharT, _Traits>::showmanyc()
-{ return 0; }
-
-template <class _CharT, class _Traits>
-void 
-basic_streambuf<_CharT, _Traits>::imbue(const locale&) {}
-
-template <class _CharT, class _Traits>
-int
-basic_streambuf<_CharT, _Traits>::sync() { return 0; }
-
-template <class _CharT, class _Traits>
-_STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::pos_type 
-basic_streambuf<_CharT, _Traits>::seekpos(pos_type, ios_base::openmode)
-{ return pos_type(-1); }
-
-template <class _CharT, class _Traits>
-_STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::pos_type 
-basic_streambuf<_CharT, _Traits>::seekoff(off_type, ios_base::seekdir,
-					  ios_base::openmode)
-{ return pos_type(-1); }
-
-template <class _CharT, class _Traits>
-basic_streambuf<_CharT, _Traits>* 
-basic_streambuf<_CharT, _Traits>:: setbuf(char_type*, streamsize)
-{ return this; }
-
-
-# if defined (_STLP_USE_TEMPLATE_EXPORT)
-#  if !defined (_STLP_NO_WCHAR_T)
-_STLP_EXPORT_TEMPLATE_CLASS basic_streambuf<wchar_t, char_traits<wchar_t> >;
-#  endif
-# endif /* _STLP_USE_TEMPLATE_EXPORT */
-
-_STLP_END_NAMESPACE
-
-# endif /* EXPOSE */
-
-#endif
diff --git a/src/STLport/stl/_streambuf.h b/src/STLport/stl/_streambuf.h
deleted file mode 100644
index b2f5cb2..0000000
--- a/src/STLport/stl/_streambuf.h
+++ /dev/null
@@ -1,526 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-#ifndef _STLP_INTERNAL_STREAMBUF
-#define _STLP_INTERNAL_STREAMBUF
-
-#ifndef _STLP_IOS_BASE_H
-#include <stl/_ios_base.h>      // Needed for ios_base bitfield members.
-                                // <ios_base> includes <iosfwd>.
-#endif
-
-#ifndef _STLP_STDIO_FILE_H
-#include <stl/_stdio_file.h>     // Declaration of struct FILE, and of
-                                // functions to manipulate it.
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-//----------------------------------------------------------------------
-// Class basic_streambuf<>, the base class of the streambuf hierarchy.
-
-// A basic_streambuf<> manages an input (get) area and an output (put)
-// area.  Each is described by three pointers: a beginning, an end, and a
-// current position.  basic_streambuf<> contains some very simple member
-// functions that manipulate those six pointers, but almost all of the real
-// functionality gets delegated to protected virtual member functions.
-// All of the public member functions are inline, and most of the protected
-// member functions are virtual.
-
-// Although basic_streambuf<> is not abstract, it is useful only as a base
-// class.  Its virtual member functions have default definitions such that
-// reading from a basic_streambuf<> will always yield EOF, and writing to a
-// basic_streambuf<> will always fail.
-
-// The second template parameter, _Traits, defaults to char_traits<_CharT>.
-// The default is declared in header <iosfwd>, and it isn't declared here
-// because C++ language rules do not allow it to be declared twice. 
-
-template <class _CharT, class _Traits>
-class basic_streambuf
-{
-  friend class basic_istream<_CharT, _Traits>;
-  friend class basic_ostream<_CharT, _Traits>;
-
-public:                         // Typedefs.
-  typedef _CharT                     char_type;
-  typedef typename _Traits::int_type int_type;
-  typedef typename _Traits::pos_type pos_type;
-  typedef typename _Traits::off_type off_type;
-  typedef _Traits                    traits_type;
-
-private:                        // Data members.
-
-  char_type* _M_gbegin;         // Beginning of get area
-  char_type* _M_gnext;          // Current position within the get area
-  char_type* _M_gend;           // End of get area
-
-  char_type* _M_pbegin;         // Beginning of put area
-  char_type* _M_pnext;          // Current position within the put area
-  char_type* _M_pend;           // End of put area
-
-  locale _M_locale;             // The streambuf's locale object
-
-public:                         // Extension: locking, for thread safety.
-  _STLP_mutex _M_lock;
-
-public:                         // Destructor.
-  virtual ~basic_streambuf();
-
-protected:                      // The default constructor.
-  basic_streambuf();
-
-protected:                      // Protected interface to the get area.
-  char_type* eback() const { return _M_gbegin; } // Beginning
-  char_type* gptr()  const { return _M_gnext; }  // Current position
-  char_type* egptr() const { return _M_gend; }   // End
-  
-  void gbump(int __n) { _M_gnext += __n; }
-  void setg(char_type* __gbegin, char_type* __gnext, char_type* __gend) {
-    _M_gbegin = __gbegin;
-    _M_gnext  = __gnext;
-    _M_gend   = __gend;
-  }
-
-public:
-  // An alternate public interface to the above functions
-  // which allows us to avoid using templated friends which
-  // are not supported on some compilers.
-
-  char_type* _M_eback() const { return eback(); }
-  char_type* _M_gptr()  const { return gptr(); }
-  char_type* _M_egptr() const { return egptr(); }
-  void _M_gbump(int __n)      { gbump(__n); }
-  void _M_setg(char_type* __gbegin, char_type* __gnext, char_type* __gend)
-    { setg(__gbegin, __gnext, __gend); }
-
-protected:                      // Protected interface to the put area
-
-  char_type* pbase() const { return _M_pbegin; } // Beginning
-  char_type* pptr()  const { return _M_pnext; }  // Current position
-  char_type* epptr() const { return _M_pend; }   // End
-
-  void pbump(int __n) { _M_pnext += __n; }
-  void setp(char_type* __pbegin, char_type* __pend) {
-    _M_pbegin = __pbegin;
-    _M_pnext  = __pbegin;
-    _M_pend   = __pend;
-  }
-
-protected:                      // Virtual buffer management functions.
-
-  virtual basic_streambuf<_CharT, _Traits>* setbuf(char_type*, streamsize);
-
-  // Alters the stream position, using an integer offset.  In this
-  // class seekoff does nothing; subclasses are expected to override it.
-  virtual pos_type seekoff(off_type, ios_base::seekdir,
-                           ios_base::openmode = ios_base::in | ios_base::out);
-
-  // Alters the stream position, using a previously obtained streampos.  In
-  // this class seekpos does nothing; subclasses are expected to override it.
-  virtual pos_type
-  seekpos(pos_type, ios_base::openmode = ios_base::in | ios_base::out);
-
-  // Synchronizes (i.e. flushes) the buffer.  All subclasses are expected to 
-  // override this virtual member function.
-  virtual int sync();
-
-
-public:                         // Buffer management.
-  basic_streambuf<_CharT, _Traits>* pubsetbuf(char_type* __s, streamsize __n) 
-    { return this->setbuf(__s, __n); }
-
-  pos_type pubseekoff(off_type __offset, ios_base::seekdir __way,
-                      ios_base::openmode __mod = ios_base::in | ios_base::out)
-    { return this->seekoff(__offset, __way, __mod); }
-
-  pos_type pubseekpos(pos_type __sp,
-                      ios_base::openmode __mod = ios_base::in | ios_base::out)
-    { return this->seekpos(__sp, __mod); }
-
-  int pubsync() { return this->sync(); }
-
-protected:                      // Virtual get area functions, as defined in
-                                // 17.5.2.4.3 and 17.5.2.4.4 of the standard.
-  // Returns a lower bound on the number of characters that we can read,
-  // with underflow, before reaching end of file.  (-1 is a special value:
-  // it means that underflow will fail.)  Most subclasses should probably
-  // override this virtual member function.
-  virtual streamsize showmanyc();
-
-  // Reads up to __n characters.  Return value is the number of 
-  // characters read.
-  virtual streamsize xsgetn(char_type* __s, streamsize __n);
-
-  // Called when there is no read position, i.e. when gptr() is null
-  // or when gptr() >= egptr().  Subclasses are expected to override
-  // this virtual member function.
-  virtual int_type underflow();
-
-  // Similar to underflow(), but used for unbuffered input.  Most 
-  // subclasses should probably override this virtual member function.
-  virtual int_type uflow();
-
-  // Called when there is no putback position, i.e. when gptr() is null
-  // or when gptr() == eback().  All subclasses are expected to override
-  // this virtual member function.
-  virtual int_type pbackfail(int_type = traits_type::eof());
-
-protected:                      // Virtual put area functions, as defined in
-                                // 27.5.2.4.5 of the standard.
-
-  // Writes up to __n characters.  Return value is the number of characters
-  // written.
-  virtual streamsize xsputn(const char_type* __s, streamsize __n);
-
-  // Extension: writes up to __n copies of __c.  Return value is the number
-  // of characters written.
-  virtual streamsize _M_xsputnc(char_type __c, streamsize __n);
-
-  // Called when there is no write position.  All subclasses are expected to
-  // override this virtual member function.
-  virtual int_type overflow(int_type = traits_type::eof());
-
-public:                         // Public members for writing characters.
-  // Write a single character.
-  int_type sputc(char_type __c) {
-    return ((_M_pnext < _M_pend) ? _Traits::to_int_type(*_M_pnext++ = __c)
-      : this->overflow(_Traits::to_int_type(__c)));
-  }
-
-  // Write __n characters.
-  streamsize sputn(const char_type* __s, streamsize __n)
-    { return this->xsputn(__s, __n); }
-
-  // Extension: write __n copies of __c.
-  streamsize _M_sputnc(char_type __c, streamsize __n)
-    { return this->_M_xsputnc(__c, __n); }
-
-private:                        // Helper functions.
-  int_type _M_snextc_aux();
-
-
-public:                         // Public members for reading characters.
-  streamsize in_avail() {
-    return (_M_gnext < _M_gend) ? (_M_gend - _M_gnext) : this->showmanyc();
-  }
-  
-  // Advance to the next character and return it.
-  int_type snextc() {
-	return ( _M_gend - _M_gnext > 1 ?
-             _Traits::to_int_type(*++_M_gnext) :
-             this->_M_snextc_aux());
-  }
-
-  // Return the current character and advance to the next.
-  int_type sbumpc() {
-    return _M_gnext < _M_gend ? _Traits::to_int_type(*_M_gnext++) 
-      : this->uflow();
-  }
-  
-  // Return the current character without advancing to the next.
-  int_type sgetc() {
-    return _M_gnext < _M_gend ? _Traits::to_int_type(*_M_gnext) 
-      : this->underflow();
-  }
-  
-  streamsize sgetn(char_type* __s, streamsize __n)
-  { return this->xsgetn(__s, __n); }
-  
-  int_type sputbackc(char_type __c) {
-    return ((_M_gbegin < _M_gnext) && _Traits::eq(__c, *(_M_gnext - 1)))
-      ? _Traits::to_int_type(*--_M_gnext)
-      : this->pbackfail(_Traits::to_int_type(__c));
-  }
-  
-  int_type sungetc() {
-    return (_M_gbegin < _M_gnext)
-      ? _Traits::to_int_type(*--_M_gnext)
-      : this->pbackfail();
-  }
-
-protected:                      // Virtual locale functions.
-
-  // This is a hook, called by pubimbue() just before pubimbue()
-  // sets the streambuf's locale to __loc.  Note that imbue should
-  // not (and cannot, since it has no access to streambuf's private
-  // members) set the streambuf's locale itself.
-  virtual void imbue(const locale&);
-
-public:                         // Locale-related functions.
-  locale pubimbue(const locale&);
-  locale getloc() const { return _M_locale; }
-
-# ifndef _STLP_NO_ANACHRONISMS
-  void stossc() { this->sbumpc(); }
-# endif
-#if defined(__MVS__) || defined(__OS400__)
-private: // Data members.
-
-  char_type* _M_gbegin; // Beginning of get area
-  char_type* _M_gnext; // Current position within the get area
-  char_type* _M_gend; // End of get area
-
-  char_type* _M_pbegin; // Beginning of put area
-  char_type* _M_pnext; // Current position within the put area
-  char_type* _M_pend; // End of put area
-#endif
-};
-
-
-//----------------------------------------------------------------------
-// Specialization: basic_streambuf<char, char_traits<char> >
-
-// We implement basic_streambuf<char, char_traits<char> > very differently
-// than the general basic_streambuf<> template.  The main reason for this
-// difference is a requirement in the C++ standard: the standard input
-// and output streams cin and cout are required by default to be synchronized
-// with the C library components stdin and stdout.  This means it must be
-// possible to synchronize a basic_streambuf<char> with a C buffer.
-//
-// There are two basic ways to do that.  First, the streambuf could be
-// unbuffered and delegate all buffering to stdio operations.  This
-// would be correct, but slow: it would require at least one virtual
-// function call for every character.  Second, the streambuf could use 
-// a C stdio FILE as its buffer.  
-//
-// We choose the latter option.  Every streambuf has pointers to two
-// FILE objects, one for the get area and one for the put area.  Ordinarily
-// it just uses a FILE object as a convenient way to package the three
-// get/put area pointers.  If a basic_streambuf<char> is synchronized with
-// a stdio stream, though, then the pointers are to a FILE object that's
-// also used by the C library.
-//
-// The header <stl/_stdio_file.h> encapsulates the implementation details
-// of struct FILE.  It contains low-level inline functions that convert
-// between whe FILE's internal representation and the three-pointer 
-// representation that basic_streambuf<> needs.
-
-_STLP_TEMPLATE_NULL 
-class _STLP_CLASS_DECLSPEC basic_streambuf<char, char_traits<char> >
-{
-  friend class basic_istream<char, char_traits<char> >;
-  friend class basic_ostream<char, char_traits<char> >;
-public:                         // Typedefs.
-  typedef char                        char_type;
-  typedef char_traits<char>::int_type int_type;
-  typedef char_traits<char>::pos_type pos_type;
-  typedef char_traits<char>::off_type off_type;
-  typedef char_traits<char>           traits_type;
-
-private:                        // Data members.
-
-  FILE* _M_get;                 // Reference to the get area
-  FILE* _M_put;                 // Reference to the put area
-
-#if defined(__hpux)
-  _FILEX  _M_default_get;          // Get area, unless we're syncing with stdio.
-  _FILEX  _M_default_put;          // Put area, unless we're syncing with stdio.
-#else
-  FILE  _M_default_get;          // Get area, unless we're syncing with stdio.
-  FILE  _M_default_put;          // Put area, unless we're syncing with stdio.
-#endif
-
-  locale _M_locale;
-
-public:                         // Extension: locking, for thread safety.
-  _STLP_mutex _M_lock;
-
-public:                         // Destructor.
-  virtual ~basic_streambuf _STLP_PSPEC2(char, char_traits<char>) ();
-
-protected:                      // Constructors.
-
-  // The default constructor; defined here inline as some compilers require it
-  basic_streambuf _STLP_PSPEC2(char, char_traits<char>) ()
-    : _M_get(__REINTERPRET_CAST(FILE*,&_M_default_get)),
-      _M_put(__REINTERPRET_CAST(FILE*,&_M_default_put)), _M_locale()
-  {
-    // _M_lock._M_initialize();
-    _FILE_I_set(_M_get, 0, 0, 0);
-    _FILE_O_set(_M_put, 0, 0, 0);
-  }
-  
-  // Extension: a constructor for streambufs synchronized with C stdio files.
-  basic_streambuf _STLP_PSPEC2(char, char_traits<char>) (FILE* __get, FILE* __put);
-
-protected:                      // Protected interface to the get area.
-  char_type* eback() const { return _FILE_I_begin(_M_get); }
-  char_type* gptr()  const { return _FILE_I_next(_M_get); }
-  char_type* egptr() const { return _FILE_I_end(_M_get); }
-  void gbump(int __n) { _FILE_I_bump(_M_get, __n); }
-  void setg(char_type* __gbegin, char_type* __gnext, char_type* __gend)
-    { _FILE_I_set(_M_get, __gbegin, __gnext, __gend); }
-
-public:
-  // An alternate public interface to the above functions
-  // which allows us to avoid using templated friends which
-  // are not supported on some compilers.
-
-  char_type* _M_eback() const { return _FILE_I_begin(_M_get); }
-  char_type* _M_gptr()  const { return _FILE_I_next(_M_get); }
-  char_type* _M_egptr() const { return _FILE_I_end(_M_get); }
-
-  void _M_gbump(int __n) { _FILE_I_bump(_M_get, __n); }
-  void _M_setg(char_type* __gbegin, char_type* __gnext, char_type* __gend)
-    { _FILE_I_set(_M_get, __gbegin, __gnext, __gend); }
-
-protected:                      // Protected interface to the put area
-  char_type* pbase() const { return _FILE_O_begin(_M_put); }
-  char_type* pptr()  const { return _FILE_O_next(_M_put); }
-  char_type* epptr() const { return _FILE_O_end(_M_put); }
-
-  void pbump(int __n) { _FILE_O_bump(_M_put, __n); }
-  void setp(char_type* __pbegin, char_type* __pend)
-    { _FILE_O_set(_M_put, __pbegin, __pbegin, __pend); }
-
-protected:                      // Virtual buffer-management functions.
-  virtual basic_streambuf<char, char_traits<char> >* setbuf(char_type*, streamsize);
-  virtual pos_type seekoff(off_type, ios_base::seekdir,
-                           ios_base::openmode = ios_base::in | ios_base::out);
-  virtual pos_type
-  seekpos(pos_type, ios_base::openmode = ios_base::in | ios_base::out);
-  virtual int sync();
-
-public:                         // Buffer management.
-  basic_streambuf<char, char_traits<char> >* pubsetbuf(char_type* __s, streamsize __n) 
-    { return this->setbuf(__s, __n); }
-
-  pos_type pubseekoff(off_type __offset, ios_base::seekdir __way,
-                      ios_base::openmode __mod = ios_base::in | ios_base::out)
-    { return this->seekoff(__offset, __way, __mod); }
-
-  pos_type pubseekpos(pos_type __sp,
-                      ios_base::openmode __mod = ios_base::in | ios_base::out)
-    { return this->seekpos(__sp, __mod); }
-
-  int pubsync() { return this->sync(); }
-
-protected:                      // Virtual get area functions.
-  virtual streamsize showmanyc();
-  virtual streamsize xsgetn(char_type* __s, streamsize __n);
-  virtual int_type underflow();
-  virtual int_type uflow();
-  virtual int_type pbackfail(int_type __c = traits_type::eof());
-
-protected:                      // Virtual put area functions.
-  virtual streamsize xsputn(const char_type* __s, streamsize __n);
-  virtual streamsize _M_xsputnc(char_type __c, streamsize __n);
-  virtual int_type overflow(int_type = traits_type::eof());
-
-public:                         // Public members for writing characters.
-  // Write a single character.
-  int_type sputc(char_type __c) {
-    int_type __res;
-	if( _FILE_O_avail(_M_put) > 0 )
-	{
-		_FILE_O_postincr(_M_put) = __c;
-		__res = traits_type::to_int_type(__c);
-	}
-	else
-      __res = this->overflow(traits_type::to_int_type(__c));
-    return __res;
-  }
-
-  // Write __n characters.
-  streamsize sputn(const char_type* __s, streamsize __n)
-    { return this->xsputn(__s, __n); }
-
-  // Extension: write __n copies of __c.
-  streamsize _M_sputnc(char_type __c, streamsize __n)
-    { return this->_M_xsputnc(__c, __n); }
-
-private:                        // Helper functions.
-  int_type _M_snextc_aux();
-
-public:                         // Public members for reading characters.
-  streamsize in_avail()
-    { return _FILE_I_avail(_M_get) > 0 ? _FILE_I_avail(_M_get) 
-                                     : this->showmanyc(); }
-  
-  // Advance to the next character and return it.
-  int_type snextc() {
-    return _FILE_I_avail(_M_get) > 1
-      ? traits_type::to_int_type(_FILE_I_preincr(_M_get))
-      : this->_M_snextc_aux();
-  }
-
-  // Return the current character and advance to the next.
-  int_type sbumpc() {
-    return _FILE_I_avail(_M_get) > 0
-      ? traits_type::to_int_type(_FILE_I_postincr(_M_get))
-      : this->uflow();
-  }
-
-  // Return the current character without advancing to the next.
-  int_type sgetc() {
-    return _FILE_I_avail(_M_get) > 0
-      ? traits_type::to_int_type(*_FILE_I_next(_M_get))
-      : this->underflow();
-  }
-    
-  streamsize sgetn(char_type* __s, streamsize __n)
-    { return this->xsgetn(__s, __n); }
-
-  int_type sputbackc(char_type __c) {
-    return _FILE_I_begin(_M_get) < _FILE_I_next(_M_get) &&
-           __c == *(_FILE_I_next(_M_get) - 1)
-      ? traits_type::to_int_type(_FILE_I_predecr(_M_get))
-      : this->pbackfail(traits_type::to_int_type(__c));
-  }
-
-  int_type sungetc() {
-    return _FILE_I_begin(_M_get) < _FILE_I_next(_M_get)
-      ? traits_type::to_int_type(_FILE_I_predecr(_M_get))
-      : this->pbackfail();
-  }
-
-protected:                      // Virtual locale functions.
-  virtual void imbue(const locale&);
-
-public:                         // Locale-related functions.
-  locale pubimbue(const locale&);
-  locale getloc() const { return _M_locale; }
-
-# ifndef _STLP_NO_ANACHRONISMS
-public:
-  void stossc() { this->sbumpc(); }
-# endif
-
-#if defined(__MVS__) || defined(__OS400__)
-private: // Data members.
-
-  char_type* _M_gbegin; // Beginning of get area
-  char_type* _M_gnext; // Current position within the get area
-  char_type* _M_gend; // End of get area
-
-  char_type* _M_pbegin; // Beginning of put area
-  char_type* _M_pnext; // Current position within the put area
-  char_type* _M_pend; // End of put area
-#endif
-
-};
-_STLP_END_NAMESPACE
-
-# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION)
-#  include <stl/_streambuf.c>
-# endif
-
-#endif
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_streambuf_iterator.h b/src/STLport/stl/_streambuf_iterator.h
deleted file mode 100644
index dd685f7..0000000
--- a/src/STLport/stl/_streambuf_iterator.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996-1998
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#if !defined (_STLP_INTERNAL_STREAMBUF_ITERATOR_H)
-#define _STLP_INTERNAL_STREAMBUF_ITERATOR_H
-
-_STLP_BEGIN_NAMESPACE
-
-template <class _CharT, class _Traits>
-basic_streambuf<_CharT, _Traits>* _STLP_CALL _M_get_ostreambuf(basic_ostream<_CharT, _Traits>& ) ;
-
-// The default template argument is declared in iosfwd
-template<class _CharT, class _Traits>
-class ostreambuf_iterator
-{
-public:
-  typedef _CharT                           char_type;
-  typedef _Traits                          traits_type;
-  typedef typename _Traits::int_type       int_type;
-  typedef basic_streambuf<_CharT, _Traits> streambuf_type;
-  typedef basic_ostream<_CharT, _Traits>   ostream_type;
-
-  typedef output_iterator_tag              iterator_category;
-  typedef void                             value_type;
-  typedef void                             difference_type;
-  typedef void                             pointer;
-  typedef void                             reference;
-
-public:
-  ostreambuf_iterator(streambuf_type* __buf) _STLP_NOTHROW : _M_buf(__buf), _M_ok(__buf!=0) {}
-  ostreambuf_iterator(ostream_type& __o) _STLP_NOTHROW : _M_buf(_M_get_ostreambuf(__o)), _M_ok(_M_buf != 0) {}
-
-  ostreambuf_iterator<_CharT, _Traits>& operator=(char_type __c) {
-    _M_ok = _M_ok && !traits_type::eq_int_type(_M_buf->sputc(__c),
-                                               traits_type::eof());
-    return *this;
-  }    
-  
-  ostreambuf_iterator<_CharT, _Traits>& operator*()     { return *this; }
-  ostreambuf_iterator<_CharT, _Traits>& operator++()    { return *this; }
-  ostreambuf_iterator<_CharT, _Traits>& operator++(int) { return *this; }
-
-  bool failed() const { return !_M_ok; }
-
-private:
-  streambuf_type* _M_buf;
-  bool _M_ok;
-};
-
-_STLP_END_NAMESPACE
-
-#endif /* _STLP_INTERNAL_STREAMBUF_ITERATOR_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/stl/_string.c b/src/STLport/stl/_string.c
deleted file mode 100644
index 3457990..0000000
--- a/src/STLport/stl/_string.c
+++ /dev/null
@@ -1,580 +0,0 @@
-/*
- *
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-#ifndef _STLP_STRING_C
-#define _STLP_STRING_C
-
-#ifndef _STLP_STRING_H
-# include <stl/_string.h>
-#endif
-
-# ifdef _STLP_DEBUG
-#  define basic_string _Nondebug_string
-# endif
-
-# if defined (_STLP_USE_OWN_NAMESPACE) || !defined (_STLP_USE_NATIVE_STRING)
-
-# if defined (_STLP_NESTED_TYPE_PARAM_BUG)
-#  define __size_type__ size_t
-#  define size_type size_t
-#  define iterator   _CharT*
-# else
-#  define __size_type__ _STLP_TYPENAME_ON_RETURN_TYPE basic_string<_CharT,_Traits,_Alloc>::size_type
-# endif
-
-_STLP_BEGIN_NAMESPACE
-
-// ------------------------------------------------------------
-// Non-inline declarations.
-
-
-// Change the string's capacity so that it is large enough to hold
-//  at least __res_arg elements, plus the terminating _CharT().  Note that,
-//  if __res_arg < capacity(), this member function may actually decrease
-//  the string's capacity.
-template <class _CharT, class _Traits, class _Alloc> void basic_string<_CharT,_Traits,_Alloc>::reserve(size_type __res_arg) {
-
-  if (__res_arg >= capacity())
-    {      
-      if (__res_arg > max_size())
-	this->_M_throw_length_error();
-
-      size_type __n = __res_arg + 1;
-      pointer __new_start = this->_M_end_of_storage.allocate(__n);
-      pointer __new_finish = __new_start;
-      
-      _STLP_TRY {
-	__new_finish = uninitialized_copy(this->_M_start, this->_M_finish, __new_start);
-	_M_construct_null(__new_finish);
-      }
-      _STLP_UNWIND((_STLP_STD::_Destroy(__new_start, __new_finish), 
-		    this->_M_end_of_storage.deallocate(__new_start, __n)));
-      
-      _STLP_STD::_Destroy(this->_M_start, this->_M_finish + 1);
-      this->_M_deallocate_block();
-      this->_M_start = __new_start;
-      this->_M_finish = __new_finish;
-      this->_M_end_of_storage._M_data = __new_start + __n;
-    }
-}
-
-template <class _CharT, class _Traits, class _Alloc> basic_string<_CharT,_Traits,_Alloc>& basic_string<_CharT,_Traits,_Alloc>::append(size_type __n, _CharT __c) {
-  if (__n > max_size() || size() > max_size() - __n)
-    this->_M_throw_length_error();
-  if (size() + __n > capacity())
-    reserve(size() + (max)(size(), __n));
-  if (__n > 0) {
-    uninitialized_fill_n(this->_M_finish + 1, __n - 1, __c);
-    _STLP_TRY {
-      _M_construct_null(this->_M_finish + __n);
-    }
-    _STLP_UNWIND(_STLP_STD::_Destroy(this->_M_finish + 1, this->_M_finish + __n));
-    _Traits::assign(*end(), __c);
-    this->_M_finish += __n;
-  }
-  return *this;
-}
-
-#ifndef _STLP_MEMBER_TEMPLATES
-
-template <class _CharT, class _Traits, class _Alloc> basic_string<_CharT, _Traits, _Alloc>& basic_string<_CharT, _Traits, _Alloc>::append(const _CharT* __first,
-					      const _CharT* __last)
-{
-  if (__first != __last) {
-    const size_type __old_size = size();
-    ptrdiff_t __n = __last - __first;
-    if ((size_type)__n > max_size() || __old_size > max_size() - __n)
-      this->_M_throw_length_error();
-    if (__old_size + __n > capacity()) {
-      const size_type __len = __old_size + (max)(__old_size, (size_t) __n) + 1;
-      pointer __new_start = this->_M_end_of_storage.allocate(__len);
-      pointer __new_finish = __new_start;
-      _STLP_TRY {
-        __new_finish = uninitialized_copy(this->_M_start, this->_M_finish, __new_start);
-        __new_finish = uninitialized_copy(__first, __last, __new_finish);
-        _M_construct_null(__new_finish);
-      }
-      _STLP_UNWIND((_STLP_STD::_Destroy(__new_start,__new_finish),
-                    this->_M_end_of_storage.deallocate(__new_start,__len)));
-      _STLP_STD::_Destroy(this->_M_start, this->_M_finish + 1);
-      this->_M_deallocate_block();
-      this->_M_start = __new_start;
-      this->_M_finish = __new_finish;
-      this->_M_end_of_storage._M_data = __new_start + __len; 
-    }
-    else {
-      const _CharT* __f1 = __first;
-      ++__f1;
-      uninitialized_copy(__f1, __last, this->_M_finish + 1);
-      _STLP_TRY {
-        _M_construct_null(this->_M_finish + __n);
-      }
-      _STLP_UNWIND(_STLP_STD::_Destroy(this->_M_finish + 1, this->_M_finish + __n));
-      _Traits::assign(*end(), *__first);
-      this->_M_finish += __n;
-    }
-  }
-  return *this;  
-}
-
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-template <class _CharT, class _Traits, class _Alloc> 
-basic_string<_CharT,_Traits,_Alloc>& 
-basic_string<_CharT,_Traits,_Alloc>::assign(size_type __n, _CharT __c) {
-  if (__n <= size()) {
-    _Traits::assign(this->_M_start, __n, __c);
-    erase(begin() + __n, end());
-  }
-  else {
-    _Traits::assign(this->_M_start, size(), __c);
-    append(__n - size(), __c);
-  }
-  return *this;
-}
-
-template <class _CharT, class _Traits, class _Alloc> _CharT* 
-basic_string<_CharT,_Traits,_Alloc> ::_M_insert_aux(_CharT* __p,
-                  _CharT __c)
-{
-  pointer __new_pos = __p;
-  if (this->_M_finish + 1 < this->_M_end_of_storage._M_data) {
-    _M_construct_null(this->_M_finish + 1);
-    _Traits::move(__p + 1, __p, this->_M_finish - __p);
-    _Traits::assign(*__p, __c);
-    ++this->_M_finish;
-  }
-  else {
-    const size_type __old_len = size();
-    const size_type __len = __old_len +
-                            (max)(__old_len, __STATIC_CAST(size_type,1)) + 1;
-    pointer __new_start = this->_M_end_of_storage.allocate(__len);
-    pointer __new_finish = __new_start;
-    _STLP_TRY {
-      __new_pos = uninitialized_copy(this->_M_start, __p, __new_start);
-      _Construct(__new_pos, __c);
-      __new_finish = __new_pos + 1;
-      __new_finish = uninitialized_copy(__p, this->_M_finish, __new_finish);
-      _M_construct_null(__new_finish);
-    }
-    _STLP_UNWIND((_STLP_STD::_Destroy(__new_start,__new_finish), 
-                  this->_M_end_of_storage.deallocate(__new_start,__len)));
-    _STLP_STD::_Destroy(this->_M_start, this->_M_finish + 1);
-    this->_M_deallocate_block();
-    this->_M_start = __new_start;
-    this->_M_finish = __new_finish;
-    this->_M_end_of_storage._M_data = __new_start + __len;
-  }
-  return __new_pos;
-}
-
-template <class _CharT, class _Traits, class _Alloc> void basic_string<_CharT,_Traits,_Alloc>::insert(iterator __position,
-           size_t __n, _CharT __c)
-{
-  if (__n != 0) {
-    if (size_type(this->_M_end_of_storage._M_data - this->_M_finish) >= __n + 1) {
-      const size_type __elems_after = this->_M_finish - __position;
-      pointer __old_finish = this->_M_finish;
-      if (__elems_after >= __n) {
-        uninitialized_copy((this->_M_finish - __n) + 1, this->_M_finish + 1,
-                           this->_M_finish + 1);
-        this->_M_finish += __n;
-        _Traits::move(__position + __n,
-                      __position, (__elems_after - __n) + 1);
-        _Traits::assign(__position, __n, __c);
-      }
-      else {
-        uninitialized_fill_n(this->_M_finish + 1, __n - __elems_after - 1, __c);
-        this->_M_finish += __n - __elems_after;
-        _STLP_TRY {
-          uninitialized_copy(__position, __old_finish + 1, this->_M_finish);
-          this->_M_finish += __elems_after;
-        }
-        _STLP_UNWIND((_STLP_STD::_Destroy(__old_finish + 1, this->_M_finish), 
-                      this->_M_finish = __old_finish));
-        _Traits::assign(__position, __elems_after + 1, __c);
-      }
-    }
-    else {
-      const size_type __old_size = size();        
-      const size_type __len = __old_size + (max)(__old_size, __n) + 1;
-      pointer __new_start = this->_M_end_of_storage.allocate(__len);
-      pointer __new_finish = __new_start;
-      _STLP_TRY {
-        __new_finish = uninitialized_copy(this->_M_start, __position, __new_start);
-        __new_finish = uninitialized_fill_n(__new_finish, __n, __c);
-        __new_finish = uninitialized_copy(__position, this->_M_finish,
-                                          __new_finish);
-        _M_construct_null(__new_finish);
-      }
-      _STLP_UNWIND((_STLP_STD::_Destroy(__new_start,__new_finish),
-                    this->_M_end_of_storage.deallocate(__new_start,__len)));
-      _STLP_STD::_Destroy(this->_M_start, this->_M_finish + 1);
-      this->_M_deallocate_block();
-      this->_M_start = __new_start;
-      this->_M_finish = __new_finish;
-      this->_M_end_of_storage._M_data = __new_start + __len;    
-    }
-  }
-}
-
-#ifndef _STLP_MEMBER_TEMPLATES
-
-template <class _CharT, class _Traits, class _Alloc> void 
-basic_string<_CharT,_Traits,_Alloc>::insert(iterator __position,
-                                            const _CharT* __first, 
-                                            const _CharT* __last)
-{
-  if (__first != __last) {
-    const ptrdiff_t __n = __last - __first;
-    if (this->_M_end_of_storage._M_data - this->_M_finish >= __n + 1) {
-      const ptrdiff_t __elems_after = this->_M_finish - __position;
-      pointer __old_finish = this->_M_finish;
-      if (__elems_after >= __n) {
-        uninitialized_copy((this->_M_finish - __n) + 1, this->_M_finish + 1,
-                           this->_M_finish + 1);
-        this->_M_finish += __n;
-        _Traits::move(__position + __n,
-                      __position, (__elems_after - __n) + 1);
-        _M_copy(__first, __last, __position);
-      }
-      else {
-        const _CharT* __mid = __first;
-        advance(__mid, __elems_after + 1);
-        uninitialized_copy(__mid, __last, this->_M_finish + 1);
-        this->_M_finish += __n - __elems_after;
-        _STLP_TRY {
-          uninitialized_copy(__position, __old_finish + 1, this->_M_finish);
-          this->_M_finish += __elems_after;
-        }
-        _STLP_UNWIND((_STLP_STD::_Destroy(__old_finish + 1, this->_M_finish), 
-                      this->_M_finish = __old_finish));
-        _M_copy(__first, __mid, __position);
-      }
-    }
-    else {
-      size_type __old_size = size();        
-      size_type __len
-        = __old_size + (max)(__old_size, __STATIC_CAST(const size_type,__n)) + 1;
-      pointer __new_start = this->_M_end_of_storage.allocate(__len);
-      pointer __new_finish = __new_start;
-      _STLP_TRY {
-        __new_finish = uninitialized_copy(this->_M_start, __position, __new_start);
-        __new_finish = uninitialized_copy(__first, __last, __new_finish);
-        __new_finish
-          = uninitialized_copy(__position, this->_M_finish, __new_finish);
-        _M_construct_null(__new_finish);
-      }
-      _STLP_UNWIND((_STLP_STD::_Destroy(__new_start,__new_finish),
-                    this->_M_end_of_storage.deallocate(__new_start,__len)));
-      _STLP_STD::_Destroy(this->_M_start, this->_M_finish + 1);
-      this->_M_deallocate_block();
-      this->_M_start = __new_start;
-      this->_M_finish = __new_finish;
-      this->_M_end_of_storage._M_data = __new_start + __len; 
-    }
-  }
-}
-
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-template <class _CharT, class _Traits, class _Alloc> basic_string<_CharT,_Traits,_Alloc>& basic_string<_CharT,_Traits,_Alloc> ::replace(iterator __first, iterator __last, size_type __n, _CharT __c)
-{
-  size_type __len = (size_type)(__last - __first);
-  
-  if (__len >= __n) {
-    _Traits::assign(__first, __n, __c);
-    erase(__first + __n, __last);
-  }
-  else {
-    _Traits::assign(__first, __len, __c);
-    insert(__last, __n - __len, __c);
-  }
-  return *this;
-}
-
-#ifndef _STLP_MEMBER_TEMPLATES
-
-
-template <class _CharT, class _Traits, class _Alloc> basic_string<_CharT,_Traits,_Alloc>& basic_string<_CharT,_Traits,_Alloc> ::replace(iterator __first, iterator __last,
-            const _CharT* __f, const _CharT* __l)
-{
-  const ptrdiff_t         __n = __l - __f;
-  const difference_type __len = __last - __first;
-  if (__len >= __n) {
-    _M_copy(__f, __l, __first);
-    erase(__first + __n, __last);
-  }
-  else {
-    const _CharT* __m = __f + __len;
-    _M_copy(__f, __m, __first);
-    insert(__last, __m, __l);
-  }
-  return *this;
-}
-
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-template <class _CharT, class _Traits, class _Alloc> __size_type__
-basic_string<_CharT,_Traits,_Alloc> ::find(const _CharT* __s, size_type __pos, size_type __n) const 
-{
-  if (__pos + __n > size())
-    return npos;
-  else {
-    const const_pointer __result =
-      _STLP_STD::search((const _CharT*)this->_M_start + __pos, (const _CharT*)this->_M_finish, 
-			__s, __s + __n, _Eq_traits<_Traits>());
-    return __result != this->_M_finish ? __result - this->_M_start : npos;
-  }
-}
-
-template <class _CharT, class _Traits, class _Alloc> __size_type__
-basic_string<_CharT,_Traits,_Alloc> ::find(_CharT __c, size_type __pos) const 
-{
-  if (__pos >= size())
-    return npos;
-  else {
-    const const_pointer __result =
-      _STLP_STD::find_if((const _CharT*)this->_M_start + __pos, (const _CharT*)this->_M_finish,
-			 _Eq_char_bound<_Traits>(__c));
-    return __result != this->_M_finish ? __result - this->_M_start : npos;
-  }
-}    
-
-template <class _CharT, class _Traits, class _Alloc> __size_type__
-basic_string<_CharT,_Traits,_Alloc> ::rfind(const _CharT* __s, size_type __pos, size_type __n) const 
-{
-  const size_t __len = size();
-
-  if (__n > __len)
-    return npos;
-  else if (__n == 0)
-    return (min) (__len, __pos);
-  else {
-    const_pointer __last = this->_M_start + (min) (__len - __n, __pos) + __n;
-    const_pointer __result = _STLP_STD::find_end((const_pointer)this->_M_start, __last,
-						 __s, __s + __n,
-						 _Eq_traits<_Traits>());
-    return __result != __last ? __result - this->_M_start : npos;
-  }
-}
-
-template <class _CharT, class _Traits, class _Alloc> __size_type__
-basic_string<_CharT,_Traits,_Alloc> ::rfind(_CharT __c, size_type __pos) const 
-{
-  const size_type __len = size();
-
-  if (__len < 1)
-    return npos;
-  else {
-    const const_iterator __last = begin() + (min) (__len - 1, __pos) + 1;
-    const_reverse_iterator __rresult =
-      _STLP_STD::find_if(const_reverse_iterator(__last), rend(),
-              _Eq_char_bound<_Traits>(__c));
-    return __rresult != rend() ? (__rresult.base() - 1) - begin() : npos;
-  }
-}
-
-template <class _CharT, class _Traits, class _Alloc> __size_type__
-basic_string<_CharT,_Traits,_Alloc> ::find_first_of(const _CharT* __s, size_type __pos, size_type __n) const
-{
-  if (__pos >= size())
-    return npos;
-  else {
-    const_iterator __result = __find_first_of(begin() + __pos, end(),
-                                              __s, __s + __n,
-                                              _Eq_traits<_Traits>());
-    return __result != end() ? __result - begin() : npos;
-  }
-}
-
-
-template <class _CharT, class _Traits, class _Alloc> __size_type__
-basic_string<_CharT,_Traits,_Alloc> ::find_last_of(const _CharT* __s, size_type __pos, size_type __n) const
-{
-  const size_type __len = size();
-
-  if (__len < 1)
-    return npos;
-  else {
-    const const_iterator __last = begin() + (min) (__len - 1, __pos) + 1;
-    const const_reverse_iterator __rresult =
-      __find_first_of(const_reverse_iterator(__last), rend(),
-                      __s, __s + __n,
-                      _Eq_traits<_Traits>());
-    return __rresult != rend() ? (__rresult.base() - 1) - begin() : npos;
-  }
-}
-
-
-template <class _CharT, class _Traits, class _Alloc> __size_type__
-basic_string<_CharT,_Traits,_Alloc> ::find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const
-{
-  typedef typename _Traits::char_type _CharType;
-  if (__pos > size())
-    return npos;
-  else {
-    const_pointer __result = _STLP_STD::find_if((const _CharT*)this->_M_start + __pos, 
-				      (const _CharT*)this->_M_finish,
-                                _Not_within_traits<_Traits>((const _CharType*)__s, 
-							    (const _CharType*)__s + __n));
-    return __result != this->_M_finish ? __result - this->_M_start : npos;
-  }
-}
-
-template <class _CharT, class _Traits, class _Alloc> __size_type__
-basic_string<_CharT,_Traits,_Alloc> ::find_first_not_of(_CharT __c, size_type __pos) const
-{
-  if (__pos > size())
-    return npos;
-  else {
-    const_pointer __result = _STLP_STD::find_if((const _CharT*)this->_M_start + __pos, (const _CharT*)this->_M_finish,
-						_Neq_char_bound<_Traits>(__c));
-    return __result != this->_M_finish ? __result - this->_M_start : npos;
-  }
-}    
-
-template <class _CharT, class _Traits, class _Alloc> __size_type__
-basic_string<_CharT,_Traits,_Alloc> ::find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const 
-{
-  typedef typename _Traits::char_type _CharType;
-  const size_type __len = size();
-
-  if (__len < 1)
-    return npos;
-  else {
-    const_iterator __last = begin() + (min) (__len - 1, __pos) + 1;
-    const_reverse_iterator __rlast = const_reverse_iterator(__last);
-    const_reverse_iterator __rresult =
-      _STLP_STD::find_if(__rlast, rend(),
-			 _Not_within_traits<_Traits>((const _CharType*)__s, 
-						     (const _CharType*)__s + __n));
-    return __rresult != rend() ? (__rresult.base() - 1) - begin() : npos;
-  }
-}
-
-template <class _CharT, class _Traits, class _Alloc> __size_type__
-basic_string<_CharT, _Traits, _Alloc> ::find_last_not_of(_CharT __c, size_type __pos) const 
-{
-  const size_type __len = size();
-
-  if (__len < 1)
-    return npos;
-  else {
-    const_iterator __last = begin() + (min) (__len - 1, __pos) + 1;
-    const_reverse_iterator __rlast = const_reverse_iterator(__last);
-    const_reverse_iterator __rresult =
-      _STLP_STD::find_if(__rlast, rend(),
-			 _Neq_char_bound<_Traits>(__c));
-    return __rresult != rend() ? (__rresult.base() - 1) - begin() : npos;
-  }
-}
-
-template <class _CharT, class _Traits, class _Alloc> void _STLP_CALL _S_string_copy(const basic_string<_CharT,_Traits,_Alloc>& __s,
-                    _CharT* __buf,
-                    size_t __n)
-{
-  if (__n > 0) {
-    __n = (min) (__n - 1, __s.size());
-    _STLP_STD::copy(__s.begin(), __s.begin() + __n, __buf);
-    __buf[__n] = _CharT();
-  }
-}
-_STLP_END_NAMESPACE
-
-// _string_fwd has to see clean basic_string
-# undef basic_string
-
-# if !defined (_STLP_LINK_TIME_INSTANTIATION)
-#  include <stl/_string_fwd.c> 
-# endif
-
-# ifdef _STLP_DEBUG
-#  define basic_string _Nondebug_string
-# endif
-
-# include <stl/_range_errors.h>  
-_STLP_BEGIN_NAMESPACE
-
-// _String_base methods
-template <class _Tp, class _Alloc> void _String_base<_Tp,_Alloc>::_M_throw_length_error() const {
-    __stl_throw_length_error("basic_string");
-}
-
-template <class _Tp, class _Alloc> void _String_base<_Tp, _Alloc>::_M_throw_out_of_range() const {
-    __stl_throw_out_of_range("basic_string");
-}
-
-template <class _Tp, class _Alloc> void _String_base<_Tp, _Alloc>::_M_allocate_block(size_t __n) {  
-  if ((__n <= (max_size()+1)) && (__n>0)){ 
-    _M_start  = _M_end_of_storage.allocate(__n); 
-    _M_finish = _M_start; 
-    _M_end_of_storage._M_data = _M_start + __n; 
-  } 
-    else 
-      _M_throw_length_error(); 
-} 
- 
-template <class _CharT, class _Traits, class _Alloc> basic_string<_CharT, _Traits, _Alloc>::basic_string()
-  : _String_base<_CharT,_Alloc>(allocator_type()) {  
-  this->_M_start = this->_M_end_of_storage.allocate(8); 
-  this->_M_finish = this->_M_start; 
-  this->_M_end_of_storage._M_data = this->_M_start + 8; 
-  _M_terminate_string();  
-} 
-
-
-template <class _CharT, class _Traits, class _Alloc> basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT* __s, 
-						    const allocator_type& __a) 
-  : _String_base<_CharT,_Alloc>(__a)  
-{ 
-  _STLP_FIX_LITERAL_BUG(__s) 
-    _M_range_initialize(__s, __s + traits_type::length(__s));  
-} 
-
-
-template <class _CharT, class _Traits, class _Alloc> basic_string<_CharT, _Traits, _Alloc>::basic_string(const basic_string<_CharT, _Traits, _Alloc> & __s)  
-  : _String_base<_CharT,_Alloc>(__s.get_allocator())  
-{  
-  _M_range_initialize(__s._M_start, __s._M_finish);  
-} 
-  
-# if defined ( __SUNPRO_CC) && ! defined(_STLP_STATIC_CONST_INIT_BUG)
-template <class _CharT, class _Traits, class _Alloc> const size_t basic_string<_CharT, _Traits, _Alloc>::npos;
-# endif
-
-_STLP_END_NAMESPACE
-
-# undef basic_string
-# undef __size_type__
-# undef size_type
-# undef iterator
-# endif /* NATIVE */
-
-#endif /*  _STLP_STRING_C */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_string.h b/src/STLport/stl/_string.h
deleted file mode 100644
index f00dbe7..0000000
--- a/src/STLport/stl/_string.h
+++ /dev/null
@@ -1,1501 +0,0 @@
-/*
- * Copyright (c) 1997-1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_STRING_H
-#define _STLP_STRING_H
-
-#ifndef _STLP_MEMORY
-# include <memory> 
-#endif
-
-# ifndef _STLP_CCTYPE
-#  include <cctype> 
-# endif
-
-#ifndef _STLP_STRING_FWD_H
-#  include <stl/_string_fwd.h> 
-#endif
-
-#ifndef _STLP_INTERNAL_FUNCTION_BASE_H
-# include <stl/_function.h> 
-#endif
-
-# include <stl/_ctraits_fns.h>  
-#ifndef _STLP_INTERNAL_ALGOBASE_H
-# include <stl/_algobase.h> 
-#endif
-
-#ifndef _STLP_INTERNAL_ITERATOR_H
-# include <stl/_iterator.h> 
-#endif
-
-#if defined( __MWERKS__ ) && ! defined (_STLP_USE_OWN_NAMESPACE)
-
-// MSL implementation classes expect to see the definition of streampos
-// when this header is included. We expect this to be fixed in later MSL
-// implementations
-# if !defined( __MSL_CPP__ ) || __MSL_CPP__ < 0x4105
-#  include <stl/msl_string.h> 
-# endif
-
-#endif // __MWERKS__
-
-// Standard C++ string class.  This class has performance
-// characteristics very much like vector<>, meaning, for example, that
-// it does not perform reference-count or copy-on-write, and that
-// concatenation of two strings is an O(N) operation. 
-
-// There are three reasons why basic_string is not identical to
-// vector.  First, basic_string always stores a null character at the
-// end; this makes it possible for c_str to be a fast operation.
-// Second, the C++ standard requires basic_string to copy elements
-// using char_traits<>::assign, char_traits<>::copy, and
-// char_traits<>::move.  This means that all of vector<>'s low-level
-// operations must be rewritten.  Third, basic_string<> has a lot of
-// extra functions in its interface that are convenient but, strictly
-// speaking, redundant.
-
-// Additionally, the C++ standard imposes a major restriction: according
-// to the standard, the character type _CharT must be a POD type.  This
-// implementation weakens that restriction, and allows _CharT to be a
-// a user-defined non-POD type.  However, _CharT must still have a
-// default constructor.
-
-_STLP_BEGIN_NAMESPACE
-
-# ifdef _STLP_DEBUG
-#  define basic_string _Nondebug_string
-# endif
-
-// A helper class to use a char_traits as a function object.
-
-template <class _Traits> struct _Not_within_traits
-  : public unary_function<typename _Traits::char_type, bool> {
-  typedef typename _Traits::char_type _CharT;
-  const _CharT* _M_first;
-  const _CharT* _M_last;
-
-  _Not_within_traits(const typename _Traits::char_type* __f, 
-		     const typename _Traits::char_type* __l) 
-    : _M_first(__f), _M_last(__l) {}
-
-  bool operator()(const typename _Traits::char_type& __x) const {
-    return find_if(_M_first, _M_last, 
-                   _Eq_char_bound<_Traits>(__x)) == _M_last;
-  }
-};
-
-// ------------------------------------------------------------
-// Class _String_base.  
-
-// _String_base is a helper class that makes it it easier to write an
-// exception-safe version of basic_string.  The constructor allocates,
-// but does not initialize, a block of memory.  The destructor
-// deallocates, but does not destroy elements within, a block of
-// memory.  The destructor assumes that _M_start either is null, or else
-// points to a block of memory that was allocated using _String_base's 
-// allocator and whose size is _M_end_of_storage._M_data - _M_start.
-
-template <class _Tp, class _Alloc> class _String_base {
-public:
-  _STLP_FORCE_ALLOCATORS(_Tp, _Alloc)
-  typedef typename _Alloc_traits<_Tp, _Alloc>::allocator_type allocator_type;
-  _Tp*    _M_start;
-  _Tp*    _M_finish;
-  _STLP_alloc_proxy<_Tp*, _Tp, allocator_type> _M_end_of_storage;
-                                // Precondition: 0 < __n <= max_size().
-  void _M_allocate_block(size_t);
-  void _M_deallocate_block() 
-    { _M_end_of_storage.deallocate(_M_start, _M_end_of_storage._M_data - _M_start); }
-  
-  size_t max_size() const { return (size_t(-1) / sizeof(_Tp)) - 1; }
-
-  _String_base(const allocator_type& __a)
-    : _M_start(0), _M_finish(0), _M_end_of_storage(__a, (_Tp*)0) {}
-  
-  _String_base(const allocator_type& __a, size_t __n)
-    : _M_start(0), _M_finish(0), _M_end_of_storage(__a, (_Tp*)0)
-    { _M_allocate_block(__n); }
-
-  ~_String_base() { _M_deallocate_block(); }
-
-  void _M_throw_length_error() const;
-  void _M_throw_out_of_range() const;
-};
-
-# if defined (_STLP_USE_TEMPLATE_EXPORT)
-_STLP_EXPORT_TEMPLATE_CLASS _String_base<char, allocator<char> >;
-#  if defined (_STLP_HAS_WCHAR_T)
-_STLP_EXPORT_TEMPLATE_CLASS _String_base<wchar_t, allocator<wchar_t> >;
-#  endif
-# endif /* _STLP_USE_TEMPLATE_EXPORT */
-
-// ------------------------------------------------------------
-// Class basic_string.  
-
-// Class invariants:
-// (1) [start, finish) is a valid range.
-// (2) Each iterator in [start, finish) points to a valid object
-//     of type value_type.
-// (3) *finish is a valid object of type value_type; in particular,
-//     it is value_type().
-// (4) [finish + 1, end_of_storage) is a valid range.
-// (5) Each iterator in [finish + 1, end_of_storage) points to 
-//     unininitialized memory.
-
-// Note one important consequence: a string of length n must manage
-// a block of memory whose size is at least n + 1.  
-
-struct _String_reserve_t {};
-
-template <class _CharT, class _Traits, class _Alloc> class basic_string : protected _String_base<_CharT,_Alloc> {
-private:                        // Protected members inherited from base.
-  typedef _String_base<_CharT,_Alloc> _Base;
-  typedef basic_string<_CharT, _Traits, _Alloc> _Self;
-  // fbp : used to optimize char/wchar_t cases, and to simplify
-  // _STLP_DEFAULT_CONSTRUCTOR_BUG problem workaround
-  typedef typename _Is_integer<_CharT>::_Integral _Char_Is_Integral;
-public:
-  typedef _CharT value_type;
-  typedef _Traits traits_type;
-
-  typedef value_type* pointer;
-  typedef const value_type* const_pointer;
-  typedef value_type& reference;
-  typedef const value_type& const_reference;
-  typedef size_t size_type;
-  typedef ptrdiff_t difference_type;
-  typedef random_access_iterator_tag _Iterator_category;
-
-  typedef const value_type*                const_iterator;
-  typedef value_type*                      iterator;
-
-  _STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS;
-
-# if defined(_STLP_STATIC_CONST_INIT_BUG)
-  enum { npos = -1 };
-# elif __GNUC__ == 2 && __GNUC_MINOR__ == 96
-  // inline initializer conflicts with 'extern template' 
-  static const size_t npos ;
-# else
-  static const size_t npos = ~(size_t)0;
-# endif
-
-  typedef _String_reserve_t _Reserve_t;
-# if defined (_STLP_USE_NATIVE_STRING) && ! defined (_STLP_DEBUG)
-#  if (defined(__IBMCPP__) && (500 <= __IBMCPP__) && (__IBMCPP__ < 600) )
-   // this typedef is being used for conversions
-   typedef typename _STLP_VENDOR_STD::basic_string<_CharT,_Traits, 
-    typename _STLP_VENDOR_STD::allocator<_CharT> > __std_string;
-#  else
-   // this typedef is being used for conversions
-   typedef _STLP_VENDOR_STD::basic_string<_CharT,_Traits, 
-    _STLP_VENDOR_STD::allocator<_CharT> > __std_string;
-#  endif
-# endif
-  
-public:                         // Constructor, destructor, assignment.
-  typedef typename _String_base<_CharT,_Alloc>::allocator_type allocator_type;
-
-  allocator_type get_allocator() const {
-    return _STLP_CONVERT_ALLOCATOR((const allocator_type&)this->_M_end_of_storage, _CharT);
-  }
-
-  basic_string();
-
-  explicit basic_string(const allocator_type& __a)
-    : _String_base<_CharT,_Alloc>(__a, 8) { 
-    _M_terminate_string(); 
-  }
-
-  basic_string(_Reserve_t, size_t __n,
-               const allocator_type& __a = allocator_type())
-    : _String_base<_CharT,_Alloc>(__a, __n + 1) { 
-    _M_terminate_string(); 
-  }
-
-  basic_string(const basic_string<_CharT, _Traits, _Alloc>&);
-
-  basic_string(const _Self& __s, size_type __pos, size_type __n = npos,
-               const allocator_type& __a = allocator_type()) 
-    : _String_base<_CharT,_Alloc>(__a) {
-    if (__pos > __s.size())
-      this->_M_throw_out_of_range();
-    else
-      _M_range_initialize(__s._M_start + __pos,
-                          __s._M_start + __pos + (min) (__n, __s.size() - __pos));
-  }
-
-  basic_string(const _CharT* __s, size_type __n,
-               const allocator_type& __a = allocator_type()) 
-    : _String_base<_CharT,_Alloc>(__a) 
-    { 
-      _STLP_FIX_LITERAL_BUG(__s)
-      _M_range_initialize(__s, __s + __n); 
-    }
-
-  basic_string(const _CharT* __s,
-               const allocator_type& __a = allocator_type());
-
-  basic_string(size_type __n, _CharT __c,
-               const allocator_type& __a = allocator_type())
-    : _String_base<_CharT,_Alloc>(__a, __n + 1)
-  {
-    this->_M_finish = uninitialized_fill_n(this->_M_start, __n, __c);
-    _M_terminate_string();
-  }
-
-  // Check to see if _InputIterator is an integer type.  If so, then
-  // it can't be an iterator.
-#if defined (_STLP_MEMBER_TEMPLATES) && !(defined(__MRC__)||(defined(__SC__) && !defined(__DMC__)))		//*ty 04/30/2001 - mpw compilers choke on this ctor
-# ifdef _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS
-  template <class _InputIterator> basic_string(_InputIterator __f, _InputIterator __l)
-    : _String_base<_CharT,_Alloc>(allocator_type())
-  {
-    typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
-    _M_initialize_dispatch(__f, __l, _Integral());
-  }
-# endif
-  template <class _InputIterator> basic_string(_InputIterator __f, _InputIterator __l,
-               const allocator_type & __a _STLP_ALLOCATOR_TYPE_DFL)
-    : _String_base<_CharT,_Alloc>(__a)
-  {
-    typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
-    _M_initialize_dispatch(__f, __l, _Integral());
-  }
-#else /* _STLP_MEMBER_TEMPLATES */
-
-  basic_string(const _CharT* __f, const _CharT* __l,
-               const allocator_type& __a = allocator_type())
-    : _String_base<_CharT,_Alloc>(__a)
-  {
-    _STLP_FIX_LITERAL_BUG(__f)  _STLP_FIX_LITERAL_BUG(__l)
-    _M_range_initialize(__f, __l);
-  }
-
-#endif
-
-# if defined (_STLP_USE_NATIVE_STRING) && ! defined (_STLP_DEBUG)
-  // these conversion operations still needed for
-  // strstream, etc.
-  basic_string (const __std_string& __x): _String_base<_CharT,_Alloc>(allocator_type())
-    {
-      const _CharT* __s = __x.data();
-      _M_range_initialize(__s, __s + __x.size()); 
-    }
-  
-  operator __std_string() const { return __std_string(this->data(), this->size()); }
-# endif
-
-  ~basic_string() { _STLP_STD::_Destroy(this->_M_start, this->_M_finish + 1); }
-    
-  _Self& operator=(const _Self& __s) {
-    if (&__s != this) 
-      assign(__s._M_start, __s._M_finish);
-    return *this;
-  }
-
-  _Self& operator=(const _CharT* __s) { 
-    _STLP_FIX_LITERAL_BUG(__s)
-    return assign(__s, __s + traits_type::length(__s)); 
-  }
-
-  _Self& operator=(_CharT __c)
-    { return assign(__STATIC_CAST(size_type,1), __c); }
-
-  static _CharT _STLP_CALL _M_null() {
-    return _STLP_DEFAULT_CONSTRUCTED(_CharT);
-  }
-
-private:                        // Helper functions used by constructors
-                                // and elsewhere.
-  // fbp : simplify integer types (char, wchar)
-  void _M_construct_null_aux(_CharT* __p, const __false_type&) {
-    _Construct(__p);
-  }
-  void _M_construct_null_aux(_CharT* __p, const __true_type&) {
-    *__p = 0;
-  }
-
-  void _M_construct_null(_CharT* __p) {
-    _M_construct_null_aux(__p, _Char_Is_Integral());
-  }
-
-private:                        
-  // Helper functions used by constructors.  It is a severe error for
-  // any of them to be called anywhere except from within constructors.
-
-  void _M_terminate_string_aux(const __false_type&) {
-    _STLP_TRY {
-      _M_construct_null(this->_M_finish);
-    }
-    _STLP_UNWIND(_STLP_STD::_Destroy(this->_M_start, this->_M_finish));
-  }
-
-  void _M_terminate_string_aux(const __true_type&) {
-    *(this->_M_finish)=0;
-  }
-
-  void _M_terminate_string() {
-    _M_terminate_string_aux(_Char_Is_Integral());
-  }
-
-#ifndef _STLP_MEMBER_TEMPLATES
-  bool _M_inside(const _CharT* __s ) const {
-    return (__s >= this->_M_start) && (__s < this->_M_finish);
-  }
-#else
-  template <class _InputIter>
-  bool _M_inside(_InputIter __i) const {
-    const _CharT* __s = __STATIC_CAST(const _CharT*, &(*__i));
-    return (__s >= this->_M_start) && (__s < this->_M_finish);
-  }
-#endif /*_STLP_MEMBER_TEMPLATES*/
-
-#ifdef _STLP_MEMBER_TEMPLATES
-    
-  template <class _InputIter> void _M_range_initialize(_InputIter __f, _InputIter __l,
-                           const input_iterator_tag &) {
-    this->_M_allocate_block(8);
-    _M_construct_null(this->_M_finish);
-    _STLP_TRY {
-      append(__f, __l);
-    }
-    _STLP_UNWIND(_STLP_STD::_Destroy(this->_M_start, this->_M_finish + 1));
-  }
-
-  template <class _ForwardIter> void _M_range_initialize(_ForwardIter __f, _ForwardIter __l, 
-                           const forward_iterator_tag &) {
-    difference_type __n = distance(__f, __l);
-    this->_M_allocate_block(__n + 1);
-    this->_M_finish = uninitialized_copy(__f, __l, this->_M_start);
-    _M_terminate_string();
-  }
-
-  template <class _InputIter> void _M_range_initialize(_InputIter __f, _InputIter __l) {
-    _M_range_initialize(__f, __l, _STLP_ITERATOR_CATEGORY(__f, _InputIter));
-  }
-
-  template <class _Integer> void _M_initialize_dispatch(_Integer __n, _Integer __x, const __true_type&) {
-    this->_M_allocate_block(__n + 1);
-    this->_M_finish = uninitialized_fill_n(this->_M_start, __n, __x);
-    _M_terminate_string();
-  }
-
-  template <class _InputIter> void _M_initialize_dispatch(_InputIter __f, _InputIter __l, const __false_type&) {
-     _M_range_initialize(__f, __l);
-  }
-    
-#else /* _STLP_MEMBER_TEMPLATES */
-
-  void _M_range_initialize(const _CharT* __f, const _CharT* __l) {
-    ptrdiff_t __n = __l - __f;
-    this->_M_allocate_block(__n + 1);
-    this->_M_finish = uninitialized_copy(__f, __l, this->_M_start);
-    _M_terminate_string();
-  }
-
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-public:                         // Iterators.
-  iterator begin()             { return this->_M_start; }
-  iterator end()               { return this->_M_finish; }
-  const_iterator begin() const { return this->_M_start; }
-  const_iterator end()   const { return this->_M_finish; }  
-
-  reverse_iterator rbegin()             
-    { return reverse_iterator(this->_M_finish); }
-  reverse_iterator rend()               
-    { return reverse_iterator(this->_M_start); }
-  const_reverse_iterator rbegin() const 
-    { return const_reverse_iterator(this->_M_finish); }
-  const_reverse_iterator rend()   const 
-    { return const_reverse_iterator(this->_M_start); }
-
-public:                         // Size, capacity, etc.
-  size_type size() const { return this->_M_finish - this->_M_start; }
-  size_type length() const { return size(); }
-
-  size_t max_size() const { return _Base::max_size(); }
-
-
-  void resize(size_type __n, _CharT __c) {
-    if (__n <= size())
-      erase(begin() + __n, end());
-    else
-      append(__n - size(), __c);
-  }
-  void resize(size_type __n) { resize(__n, _M_null()); }
-
-  void reserve(size_type = 0);
-
-  size_type capacity() const { return (this->_M_end_of_storage._M_data - this->_M_start) - 1; }
-
-  void clear() {
-    if (!empty()) {
-      _Traits::assign(*(this->_M_start), _M_null());
-      _STLP_STD::_Destroy(this->_M_start+1, this->_M_finish+1);
-      this->_M_finish = this->_M_start;
-    }
-  } 
-
-  bool empty() const { return this->_M_start == this->_M_finish; }    
-
-public:                         // Element access.
-
-  const_reference operator[](size_type __n) const
-    { return *(this->_M_start + __n); }
-  reference operator[](size_type __n)
-    { return *(this->_M_start + __n); }
-
-  const_reference at(size_type __n) const {
-    if (__n >= size())
-      this->_M_throw_out_of_range();
-    return *(this->_M_start + __n);
-  }
-
-  reference at(size_type __n) {
-    if (__n >= size())
-      this->_M_throw_out_of_range();
-    return *(this->_M_start + __n);
-  }
-
-public:                         // Append, operator+=, push_back.
-
-  _Self& operator+=(const _Self& __s) { return append(__s); }
-  _Self& operator+=(const _CharT* __s) { _STLP_FIX_LITERAL_BUG(__s) return append(__s); }
-  _Self& operator+=(_CharT __c) { push_back(__c); return *this; }
-
-  _Self& append(const _Self& __s) 
-    { return append(__s._M_start, __s._M_finish); }
-
-  _Self& append(const _Self& __s,
-                       size_type __pos, size_type __n)
-  {
-    if (__pos > __s.size())
-      this->_M_throw_out_of_range();
-    return append(__s._M_start + __pos,
-                  __s._M_start + __pos + (min) (__n, __s.size() - __pos));
-  }
-
-  _Self& append(const _CharT* __s, size_type __n) 
-    { _STLP_FIX_LITERAL_BUG(__s) return append(__s, __s+__n); }
-  _Self& append(const _CharT* __s) 
-    { _STLP_FIX_LITERAL_BUG(__s) return append(__s, __s + traits_type::length(__s)); }
-  _Self& append(size_type __n, _CharT __c);
-
-#ifdef _STLP_MEMBER_TEMPLATES
-
-  // Check to see if _InputIterator is an integer type.  If so, then
-  // it can't be an iterator.
-  template <class _InputIter> _Self& append(_InputIter __first, _InputIter __last) {
-    typedef typename _Is_integer<_InputIter>::_Integral _Integral;
-    return _M_append_dispatch(__first, __last, _Integral());
-  }
-
-#else /* _STLP_MEMBER_TEMPLATES */
-
-  _Self& append(const _CharT* __first, const _CharT* __last);
-
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-  void push_back(_CharT __c) {
-    if (this->_M_finish + 1 == this->_M_end_of_storage._M_data)
-      reserve(size() + (max)(size(), __STATIC_CAST(size_type,1)));
-    _M_construct_null(this->_M_finish + 1);
-    _Traits::assign(*(this->_M_finish), __c);
-    ++this->_M_finish;
-  }
-
-  void pop_back() {
-    _Traits::assign(*(this->_M_finish - 1), _M_null());
-    _STLP_STD::_Destroy(this->_M_finish);
-    --this->_M_finish;
-  }
-
-private:                        // Helper functions for append.
-
-#ifdef _STLP_MEMBER_TEMPLATES
-
-  template <class _InputIter> _Self& append(_InputIter __first, _InputIter __last, const input_iterator_tag &)
-  {
-	  for ( ; __first != __last ; ++__first)
-	    push_back(*__first);
-	  return *this;
-	}
-
-  template <class _ForwardIter> _Self& append(_ForwardIter __first, _ForwardIter __last, 
-                       const forward_iterator_tag &)  {
-    if (__first != __last) {
-	    const size_type __old_size = size();
-	    difference_type __n = distance(__first, __last);
-	    if (__STATIC_CAST(size_type,__n) > max_size() || __old_size > max_size() - __STATIC_CAST(size_type,__n))
-	      this->_M_throw_length_error();
-	    if (__old_size + __n > capacity()) {
-	      const size_type __len = __old_size +
-	                            (max)(__old_size, __STATIC_CAST(size_type,__n)) + 1;
-	      pointer __new_start = this->_M_end_of_storage.allocate(__len);
-	      pointer __new_finish = __new_start;
-	      _STLP_TRY {
-	        __new_finish = uninitialized_copy(this->_M_start, this->_M_finish, __new_start);
-	        __new_finish = uninitialized_copy(__first, __last, __new_finish);
-	        _M_construct_null(__new_finish);
-	      }
-	      _STLP_UNWIND((_STLP_STD::_Destroy(__new_start,__new_finish),
-	                    this->_M_end_of_storage.deallocate(__new_start,__len)));
-	      _STLP_STD::_Destroy(this->_M_start, this->_M_finish + 1);
-	      this->_M_deallocate_block();
-	      this->_M_start = __new_start;
-	      this->_M_finish = __new_finish;
-	      this->_M_end_of_storage._M_data = __new_start + __len; 
-	    }
-	    else {
-	      _ForwardIter __f1 = __first;
-	      ++__f1;
-	      uninitialized_copy(__f1, __last, this->_M_finish + 1);
-	      _STLP_TRY {
-	        _M_construct_null(this->_M_finish + __n);
-	      }
-	      _STLP_UNWIND(_STLP_STD::_Destroy(this->_M_finish + 1, this->_M_finish + __n));
-	      _Traits::assign(*end(), *__first);
-	      this->_M_finish += __n;
-	    }
-	  }
-	  return *this;  
-	}
-
-  template <class _Integer> _Self& _M_append_dispatch(_Integer __n, _Integer __x, const __true_type&) {
-    return append((size_type) __n, (_CharT) __x);
-  }
-
-  template <class _InputIter> _Self& _M_append_dispatch(_InputIter __f, _InputIter __l,
-                                   const __false_type&) {
-    return append(__f, __l, _STLP_ITERATOR_CATEGORY(__f, _InputIter));
-  }
-
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-public:                         // Assign
-  
-  _Self& assign(const _Self& __s) 
-    { return assign(__s._M_start, __s._M_finish); }
-
-  _Self& assign(const _Self& __s, 
-                       size_type __pos, size_type __n) {
-    if (__pos > __s.size())
-      this->_M_throw_out_of_range();
-    return assign(__s._M_start + __pos, 
-                  __s._M_start + __pos + (min) (__n, __s.size() - __pos));
-  }
-
-  _Self& assign(const _CharT* __s, size_type __n)
-    { _STLP_FIX_LITERAL_BUG(__s) return assign(__s, __s + __n); }
-
-  _Self& assign(const _CharT* __s)
-    { _STLP_FIX_LITERAL_BUG(__s) return assign(__s, __s + _Traits::length(__s)); }
-
-  _Self& assign(size_type __n, _CharT __c);
-
-#ifdef _STLP_MEMBER_TEMPLATES
-
-private:                        // Helper functions for assign.
-
-  template <class _Integer> 
-  _Self& _M_assign_dispatch(_Integer __n, _Integer __x, const __true_type&) {
-    return assign((size_type) __n, (_CharT) __x);
-  }
-
-  template <class _InputIter> 
-  _Self& _M_assign_dispatch(_InputIter __f, _InputIter __l,
-			    const __false_type&)  {
-    pointer __cur = this->_M_start;
-    while (__f != __l && __cur != this->_M_finish) {
-      _Traits::assign(*__cur, *__f);
-      ++__f;
-      ++__cur;
-    }
-    if (__f == __l)
-      erase(__cur, end());
-    else
-      append(__f, __l);
-    return *this;
-  }
-  
-public:
-  // Check to see if _InputIterator is an integer type.  If so, then
-  // it can't be an iterator.
-  template <class _InputIter> _Self& assign(_InputIter __first, _InputIter __last) {
-    typedef typename _Is_integer<_InputIter>::_Integral _Integral;
-    return _M_assign_dispatch(__first, __last, _Integral());
-  }
-#endif  /* _STLP_MEMBER_TEMPLATES */
-
-  // if member templates are on, this works as specialization 
-  _Self& assign(const _CharT* __f, const _CharT* __l)
-  {
-    ptrdiff_t __n = __l - __f;
-    if (__STATIC_CAST(size_type,__n) <= size()) {
-      _Traits::copy(this->_M_start, __f, __n);
-      erase(begin() + __n, end());
-    }
-    else {
-      _Traits::copy(this->_M_start, __f, size());
-      append(__f + size(), __l);
-    }
-    return *this;
-  }
-  
-public:                         // Insert
-
-  _Self& insert(size_type __pos, const _Self& __s) {
-    if (__pos > size())
-      this->_M_throw_out_of_range();
-    if (size() > max_size() - __s.size())
-      this->_M_throw_length_error();
-    insert(begin() + __pos, __s._M_start, __s._M_finish);
-    return *this;
-  }
-
-  _Self& insert(size_type __pos, const _Self& __s,
-                       size_type __beg, size_type __n) {
-    if (__pos > size() || __beg > __s.size())
-      this->_M_throw_out_of_range();
-    size_type __len = (min) (__n, __s.size() - __beg);
-    if (size() > max_size() - __len)
-      this->_M_throw_length_error();
-    insert(begin() + __pos,
-           __s._M_start + __beg, __s._M_start + __beg + __len);
-    return *this;
-  }
-
-  _Self& insert(size_type __pos, const _CharT* __s, size_type __n) {
-    _STLP_FIX_LITERAL_BUG(__s)
-    if (__pos > size())
-      this->_M_throw_out_of_range();
-    if (size() > max_size() - __n)
-      this->_M_throw_length_error();
-    insert(begin() + __pos, __s, __s + __n);
-    return *this;
-  }
-
-  _Self& insert(size_type __pos, const _CharT* __s) {
-    _STLP_FIX_LITERAL_BUG(__s)
-    if (__pos > size())
-      this->_M_throw_out_of_range();
-    size_type __len = _Traits::length(__s);
-    if (size() > max_size() - __len)
-      this->_M_throw_length_error();
-    insert(this->_M_start + __pos, __s, __s + __len);
-    return *this;
-  }
-    
-  _Self& insert(size_type __pos, size_type __n, _CharT __c) {
-    if (__pos > size())
-      this->_M_throw_out_of_range();
-    if (size() > max_size() - __n)
-      this->_M_throw_length_error();
-    insert(begin() + __pos, __n, __c);
-    return *this;
-  }
-
-  iterator insert(iterator __p, _CharT __c) {
-    _STLP_FIX_LITERAL_BUG(__p)
-    if (__p == end()) {
-      push_back(__c);
-      return this->_M_finish - 1;
-    }
-    else
-      return _M_insert_aux(__p, __c);
-  }
-
-  void insert(iterator __p, size_t __n, _CharT __c);
-
-#ifdef _STLP_MEMBER_TEMPLATES
-
-  // Check to see if _InputIterator is an integer type.  If so, then
-  // it can't be an iterator.
-  template <class _InputIter> void insert(iterator __p, _InputIter __first, _InputIter __last) {
-    typedef typename _Is_integer<_InputIter>::_Integral _Integral;
-    _M_insert_dispatch(__p, __first, __last, _Integral());
-  }
-
-#else /* _STLP_MEMBER_TEMPLATES */
-
-  void insert(iterator __p, const _CharT* __first, const _CharT* __last);
-
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-private:                        // Helper functions for insert.
-
-#ifdef _STLP_MEMBER_TEMPLATES
-
-  template <class _InputIter> void insert(iterator __p, _InputIter __first, _InputIter __last,
-	      const input_iterator_tag &)
-  {
-	  for ( ; __first != __last; ++__first) {
-	    __p = insert(__p, *__first);
-	    ++__p;
-	  }
-	}
-
-  template <class _ForwardIter> 
-  void insert(iterator __position, _ForwardIter __first, _ForwardIter __last, 
-	      const forward_iterator_tag &)  {
-    if (__first != __last) {
-      difference_type __n = distance(__first, __last);
-      if (this->_M_end_of_storage._M_data - this->_M_finish >= __n + 1) {
-	const difference_type __elems_after = this->_M_finish - __position;
-	pointer __old_finish = this->_M_finish;
-	if (__elems_after >= __n) {
-	  uninitialized_copy((this->_M_finish - __n) + 1, this->_M_finish + 1,
-			     this->_M_finish + 1);
-	  this->_M_finish += __n;
-	  _Traits::move(__position + __n,
-			__position, (__elems_after - __n) + 1);
-	  _M_move(__first, __last, __position);
-	      }
-	else {
-	  _ForwardIter __mid = __first;
-	  advance(__mid, __elems_after + 1);
-	  uninitialized_copy(__mid, __last, this->_M_finish + 1);
-	  this->_M_finish += __n - __elems_after;
-	        _STLP_TRY {
-	          uninitialized_copy(__position, __old_finish + 1, this->_M_finish);
-	          this->_M_finish += __elems_after;
-	        }
-	        _STLP_UNWIND((_STLP_STD::_Destroy(__old_finish + 1, this->_M_finish), 
-	                      this->_M_finish = __old_finish));
-	        _M_move(__first, __mid, __position);
-	}
-      }
-      else {
-	const size_type __old_size = size();        
-	const size_type __len
-	  = __old_size + (max)(__old_size, __STATIC_CAST(size_type,__n)) + 1;
-	      pointer __new_start = this->_M_end_of_storage.allocate(__len);
-	      pointer __new_finish = __new_start;
-	      _STLP_TRY {
-	        __new_finish = uninitialized_copy(this->_M_start, __position, __new_start);
-	        __new_finish = uninitialized_copy(__first, __last, __new_finish);
-	        __new_finish
-	          = uninitialized_copy(__position, this->_M_finish, __new_finish);
-	        _M_construct_null(__new_finish);
-	      }
-	      _STLP_UNWIND((_STLP_STD::_Destroy(__new_start,__new_finish),
-	                    this->_M_end_of_storage.deallocate(__new_start,__len)));
-	      _STLP_STD::_Destroy(this->_M_start, this->_M_finish + 1);
-	      this->_M_deallocate_block();
-	      this->_M_start = __new_start;
-	      this->_M_finish = __new_finish;
-	      this->_M_end_of_storage._M_data = __new_start + __len; 
-	    }
-    }
-  }
-
-  template <class _Integer> void _M_insert_dispatch(iterator __p, _Integer __n, _Integer __x,
-                          const __true_type&) {
-    insert(__p, (size_type) __n, (_CharT) __x);
-  }
-
-  template <class _InputIter> void _M_insert_dispatch(iterator __p, _InputIter __first, _InputIter __last,
-                          const __false_type&) {
-    insert(__p, __first, __last, _STLP_ITERATOR_CATEGORY(__first, _InputIter));
-  }
-
-  template <class _InputIterator> void 
-  _M_copy(_InputIterator __first, _InputIterator __last, pointer __result) {
-    for ( ; __first != __last; ++__first, ++__result)
-      _Traits::assign(*__result, *__first);
-  }
-
-  template <class _InputIterator>
-  void _M_move(_InputIterator __first, _InputIterator __last, pointer __result) {
-    //call _M_copy as being here means that __result is not within [__first, __last)
-    for ( ; __first != __last; ++__first, ++__result)
-      _Traits::assign(*__result, *__first);
-  }
-
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-  pointer _M_insert_aux(pointer, _CharT);
-
-  void 
-  _M_copy(const _CharT* __first, const _CharT* __last, _CharT* __result) {
-    _Traits::copy(__result, __first, __last - __first);
-  }
-  void _M_move(const _CharT* __first, const _CharT* __last, _CharT* __result) {
-    _Traits::move(__result, __first, __last - __first);
-  }
-
-public:                         // Erase.
-
-  _Self& erase(size_type __pos = 0, size_type __n = npos) {
-    if (__pos > size())
-      this->_M_throw_out_of_range();
-    erase(begin() + __pos, begin() + __pos + (min) (__n, size() - __pos));
-    return *this;
-  }  
-
-  iterator erase(iterator __position) {
-                                // The move includes the terminating _CharT().
-    _Traits::move(__position, __position + 1, this->_M_finish - __position);
-    _STLP_STD::_Destroy(this->_M_finish);
-    --this->_M_finish;
-    return __position;
-  }
-
-  iterator erase(iterator __first, iterator __last) {
-    if (__first != __last) {
-                                // The move includes the terminating _CharT().
-      traits_type::move(__first, __last, (this->_M_finish - __last) + 1);
-      pointer __new_finish = this->_M_finish - (__last - __first);
-      _STLP_STD::_Destroy(__new_finish + 1, this->_M_finish + 1);
-      this->_M_finish = __new_finish;
-    }
-    return __first;
-  }
-
-public:                         // Replace.  (Conceptually equivalent
-                                // to erase followed by insert.)
-  _Self& replace(size_type __pos, size_type __n, 
-                        const _Self& __s) {
-    if (__pos > size())
-      this->_M_throw_out_of_range();
-    const size_type __len = (min) (__n, size() - __pos);
-    if (size() - __len >= max_size() - __s.size())
-      this->_M_throw_length_error();
-    return replace(begin() + __pos, begin() + __pos + __len, 
-                   __s._M_start, __s._M_finish);
-  }
-
-  _Self& replace(size_type __pos1, size_type __n1,
-                        const _Self& __s,
-                        size_type __pos2, size_type __n2) {
-    if (__pos1 > size() || __pos2 > __s.size())
-      this->_M_throw_out_of_range();
-    const size_type __len1 = (min) (__n1, size() - __pos1);
-    const size_type __len2 = (min) (__n2, __s.size() - __pos2);
-    if (size() - __len1 >= max_size() - __len2)
-      this->_M_throw_length_error();
-    return replace(begin() + __pos1, begin() + __pos1 + __len1,
-                   __s._M_start + __pos2, __s._M_start + __pos2 + __len2);
-  }
-
-  _Self& replace(size_type __pos, size_type __n1,
-                        const _CharT* __s, size_type __n2) {
-    _STLP_FIX_LITERAL_BUG(__s)
-    if (__pos > size())
-      this->_M_throw_out_of_range();
-    const size_type __len = (min) (__n1, size() - __pos);
-    if (__n2 > max_size() || size() - __len >= max_size() - __n2)
-      this->_M_throw_length_error();
-    return replace(begin() + __pos, begin() + __pos + __len,
-                   __s, __s + __n2);
-  }
-
-  _Self& replace(size_type __pos, size_type __n1,
-                        const _CharT* __s) {
-    _STLP_FIX_LITERAL_BUG(__s)
-    if (__pos > size())
-      this->_M_throw_out_of_range();
-    const size_type __len = (min) (__n1, size() - __pos);
-    const size_type __n2 = _Traits::length(__s);
-    if (__n2 > max_size() || size() - __len >= max_size() - __n2)
-      this->_M_throw_length_error();
-    return replace(begin() + __pos, begin() + __pos + __len,
-                   __s, __s + _Traits::length(__s));
-  }
-
-  _Self& replace(size_type __pos, size_type __n1,
-                        size_type __n2, _CharT __c) {
-    if (__pos > size())
-      this->_M_throw_out_of_range();
-    const size_type __len = (min) (__n1, size() - __pos);
-    if (__n2 > max_size() || size() - __len >= max_size() - __n2)
-      this->_M_throw_length_error();
-    return replace(begin() + __pos, begin() + __pos + __len, __n2, __c);
-  }
-
-  _Self& replace(iterator __first, iterator __last, 
-                        const _Self& __s) 
-    { return replace(__first, __last, __s._M_start, __s._M_finish); }
-
-  _Self& replace(iterator __first, iterator __last,
-                        const _CharT* __s, size_type __n) 
-    { _STLP_FIX_LITERAL_BUG(__s) return replace(__first, __last, __s, __s + __n); }
-
-  _Self& replace(iterator __first, iterator __last,
-                        const _CharT* __s) {
-    _STLP_FIX_LITERAL_BUG(__s)
-    return replace(__first, __last, __s, __s + _Traits::length(__s));
-  }
-
-  _Self& replace(iterator __first, iterator __last, 
-                        size_type __n, _CharT __c);
-
-  // Check to see if _InputIterator is an integer type.  If so, then
-  // it can't be an iterator.
-#ifdef _STLP_MEMBER_TEMPLATES
-  template <class _InputIter> _Self& replace(iterator __first, iterator __last,
-                        _InputIter __f, _InputIter __l) {
-    typedef typename _Is_integer<_InputIter>::_Integral _Integral;
-    return _M_replace_dispatch(__first, __last, __f, __l,  _Integral());
-  }
-#else /* _STLP_MEMBER_TEMPLATES */
-  _Self& replace(iterator __first, iterator __last,
-		 const _CharT* __f, const _CharT* __l);
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-private:                        // Helper functions for replace.
-
-#ifdef _STLP_MEMBER_TEMPLATES
-
-  template <class _Integer> _Self& _M_replace_dispatch(iterator __first, iterator __last,
-                                    _Integer __n, _Integer __x,
-                                    const __true_type&) {
-    return replace(__first, __last, (size_type) __n, (_CharT) __x);
-  }
-
-  template <class _InputIter> _Self& _M_replace_dispatch(iterator __first, iterator __last,
-                                    _InputIter __f, _InputIter __l,
-                                    const __false_type&) {
-    return replace(__first, __last, __f, __l, _STLP_ITERATOR_CATEGORY(__f, _InputIter));
-  }
-
-  template <class _InputIter> _Self& replace(iterator __first, iterator __last,
-                        _InputIter __f, _InputIter __l, const input_iterator_tag &)  {
-	  for ( ; __first != __last && __f != __l; ++__first, ++__f)
-	    _Traits::assign(*__first, *__f);
-
-	  if (__f == __l)
-	    erase(__first, __last);
-	  else
-	    insert(__last, __f, __l);
-	  return *this;
-	}
-
-  template <class _InputIter>
-  _Self& replace(iterator __first, iterator __last,
-                 _InputIter __f, _InputIter __l, const random_access_iterator_tag &) {
-    //might be overlapping
-    if (_M_inside(__f)) {
-      difference_type __n = __l - __f;
-      const difference_type __len = __last - __first;
-      if (__len >= __n) {
-        _M_move(__f, __l, __first);
-        erase(__first + __n, __last);
-      }
-      else {
-        _InputIter __m = __f + __len;
-        if ((__l <= __first) || (__f >= __last)) {
-				  //no overlap:
-          _M_copy(__f, __m, __first);
-          insert(__last, __m, __l);
-        }
-        else {
-				  //we have to take care of reallocation:
-				  const difference_type __off_dest = __first - this->begin();
-				  const difference_type __off_src = __f - this->begin();
-				  insert(__last, __m, __l);
-				  _Traits::move(begin() + __off_dest, begin() + __off_src, __n);
-        }
-      }
-      return *this;
-    }
-	  else {
-		  return replace(__first, __last, __f, __l, forward_iterator_tag());
-	  }
-  }
-
-
-  template <class _ForwardIter> _Self& replace(iterator __first, iterator __last,
-                        _ForwardIter __f, _ForwardIter __l, 
-                        const forward_iterator_tag &)  {
-	  difference_type __n = distance(__f, __l);
-	  const difference_type __len = __last - __first;
-	  if (__len >= __n) {
-	    _M_copy(__f, __l, __first);
-	    erase(__first + __n, __last);
-	  }
-	  else {
-	    _ForwardIter __m = __f;
-	    advance(__m, __len);
-	    _M_copy(__f, __m, __first);
-	    insert(__last, __m, __l);
-	  }
-	  return *this;
-	}
-
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-public:                         // Other modifier member functions.
-
-  size_type copy(_CharT* __s, size_type __n, size_type __pos = 0) const {
-    _STLP_FIX_LITERAL_BUG(__s)
-    if (__pos > size())
-      this->_M_throw_out_of_range();
-    const size_type __len = (min) (__n, size() - __pos);
-    _Traits::copy(__s, this->_M_start + __pos, __len);
-    return __len;
-  }
-
-  void swap(_Self& __s) {
-    _STLP_STD::swap(this->_M_start, __s._M_start);
-    _STLP_STD::swap(this->_M_finish, __s._M_finish);
-    _STLP_STD::swap(this->_M_end_of_storage, __s._M_end_of_storage);
-  }
-
-public:                         // Conversion to C string.
-
-  const _CharT* c_str() const { return this->_M_start; }
-  const _CharT* data()  const { return this->_M_start; }
-
-public:                         // find.
-
-  size_type find(const _Self& __s, size_type __pos = 0) const 
-    { return find(__s._M_start, __pos, __s.size()); }
-
-  size_type find(const _CharT* __s, size_type __pos = 0) const 
-    { _STLP_FIX_LITERAL_BUG(__s) return find(__s, __pos, _Traits::length(__s)); }
-
-  size_type find(const _CharT* __s, size_type __pos, size_type __n) const;
-
-  // WIE: Versant schema compiler 5.2.2 ICE workaround
-  size_type find(_CharT __c) const
-    { return find(__c, 0) ; }
-  size_type find(_CharT __c, size_type __pos /* = 0 */) const;
-
-public:                         // rfind.
-
-  size_type rfind(const _Self& __s, size_type __pos = npos) const 
-    { return rfind(__s._M_start, __pos, __s.size()); }
-
-  size_type rfind(const _CharT* __s, size_type __pos = npos) const 
-    { _STLP_FIX_LITERAL_BUG(__s) return rfind(__s, __pos, _Traits::length(__s)); }
-
-  size_type rfind(const _CharT* __s, size_type __pos, size_type __n) const;
-  size_type rfind(_CharT __c, size_type __pos = npos) const;
-
-public:                         // find_first_of
-  
-  size_type find_first_of(const _Self& __s, size_type __pos = 0) const 
-    { return find_first_of(__s._M_start, __pos, __s.size()); }
-
-  size_type find_first_of(const _CharT* __s, size_type __pos = 0) const 
-    { _STLP_FIX_LITERAL_BUG(__s) return find_first_of(__s, __pos, _Traits::length(__s)); }
-
-  size_type find_first_of(const _CharT* __s, size_type __pos, 
-                          size_type __n) const;
-
-  size_type find_first_of(_CharT __c, size_type __pos = 0) const 
-    { return find(__c, __pos); }
-
-public:                         // find_last_of
-
-  size_type find_last_of(const _Self& __s,
-                         size_type __pos = npos) const
-    { return find_last_of(__s._M_start, __pos, __s.size()); }
-
-  size_type find_last_of(const _CharT* __s, size_type __pos = npos) const 
-    { _STLP_FIX_LITERAL_BUG(__s) return find_last_of(__s, __pos, _Traits::length(__s)); }
-
-  size_type find_last_of(const _CharT* __s, size_type __pos, 
-                         size_type __n) const;
-
-  size_type find_last_of(_CharT __c, size_type __pos = npos) const {
-    return rfind(__c, __pos);
-  }
-
-public:                         // find_first_not_of
-
-  size_type find_first_not_of(const _Self& __s, 
-                              size_type __pos = 0) const 
-    { return find_first_not_of(__s._M_start, __pos, __s.size()); }
-
-  size_type find_first_not_of(const _CharT* __s, size_type __pos = 0) const 
-    { _STLP_FIX_LITERAL_BUG(__s) return find_first_not_of(__s, __pos, _Traits::length(__s)); }
-
-  size_type find_first_not_of(const _CharT* __s, size_type __pos,
-                              size_type __n) const;
-
-  size_type find_first_not_of(_CharT __c, size_type __pos = 0) const;
-
-public:                         // find_last_not_of
-
-  size_type find_last_not_of(const _Self& __s, 
-                             size_type __pos = npos) const
-    { return find_last_not_of(__s._M_start, __pos, __s.size()); }
-
-  size_type find_last_not_of(const _CharT* __s, size_type __pos = npos) const
-    { _STLP_FIX_LITERAL_BUG(__s) return find_last_not_of(__s, __pos, _Traits::length(__s)); }
-
-  size_type find_last_not_of(const _CharT* __s, size_type __pos,
-                             size_type __n) const;
-
-  size_type find_last_not_of(_CharT __c, size_type __pos = npos) const;
-
-public:                         // Substring.
-
-  _Self substr(size_type __pos = 0, size_type __n = npos) const {
-    if (__pos > size())
-      this->_M_throw_out_of_range();
-    return _Self(this->_M_start + __pos, 
-                        this->_M_start + __pos + (min) (__n, size() - __pos));
-  }
-
-public:                         // Compare
-
-  int compare(const _Self& __s) const 
-    { return _M_compare(this->_M_start, this->_M_finish, __s._M_start, __s._M_finish); }
-
-  int compare(size_type __pos1, size_type __n1,
-              const _Self& __s) const {
-    if (__pos1 > size())
-      this->_M_throw_out_of_range();
-    return _M_compare(this->_M_start + __pos1, 
-                      this->_M_start + __pos1 + (min) (__n1, size() - __pos1),
-                      __s._M_start, __s._M_finish);
-  }
-    
-  int compare(size_type __pos1, size_type __n1,
-              const _Self& __s,
-              size_type __pos2, size_type __n2) const {
-    if (__pos1 > size() || __pos2 > __s.size())
-      this->_M_throw_out_of_range();
-    return _M_compare(this->_M_start + __pos1, 
-                      this->_M_start + __pos1 + (min) (__n1, size() - __pos1),
-                      __s._M_start + __pos2, 
-                      __s._M_start + __pos2 + (min) (__n2, __s.size() - __pos2));
-  }
-
-  int compare(const _CharT* __s) const {
-    _STLP_FIX_LITERAL_BUG(__s) 
-      return _M_compare(this->_M_start, this->_M_finish, __s, __s + _Traits::length(__s));
-  }
-
-  int compare(size_type __pos1, size_type __n1, const _CharT* __s) const {
-    _STLP_FIX_LITERAL_BUG(__s)
-    if (__pos1 > size())
-      this->_M_throw_out_of_range();
-    return _M_compare(this->_M_start + __pos1, 
-                      this->_M_start + __pos1 + (min) (__n1, size() - __pos1),
-                      __s, __s + _Traits::length(__s));
-  }
-
-  int compare(size_type __pos1, size_type __n1, const _CharT* __s,
-              size_type __n2) const {
-    _STLP_FIX_LITERAL_BUG(__s)
-    if (__pos1 > size())
-      this->_M_throw_out_of_range();
-    return _M_compare(this->_M_start + __pos1, 
-                      this->_M_start + __pos1 + (min) (__n1, size() - __pos1),
-                      __s, __s + __n2);
-  }
-
-public:                        // Helper functions for compare.
-  
-  static int _STLP_CALL _M_compare(const _CharT* __f1, const _CharT* __l1,
-                        const _CharT* __f2, const _CharT* __l2) {
-    const ptrdiff_t __n1 = __l1 - __f1;
-    const ptrdiff_t __n2 = __l2 - __f2;
-    const int cmp = _Traits::compare(__f1, __f2, (min) (__n1, __n2));
-    return cmp != 0 ? cmp : (__n1 < __n2 ? -1 : (__n1 > __n2 ? 1 : 0));
-  }
-};
-
-#if ! defined (__STLP_STATIC_CONST_INIT_BUG) && \
-  __GNUC__ == 2 && __GNUC_MINOR__ == 96
-template <class _CharT, class _Traits, class _Alloc>
-const size_t basic_string<_CharT, _Traits, _Alloc>::npos = ~(size_t) 0;
-#endif
-
-# if defined (_STLP_USE_TEMPLATE_EXPORT)
-_STLP_EXPORT_TEMPLATE_CLASS basic_string<char, char_traits<char>, allocator<char> >;
-#  if defined (_STLP_HAS_WCHAR_T)
-_STLP_EXPORT_TEMPLATE_CLASS basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> >;
-#  endif
-# endif /* _STLP_USE_TEMPLATE_EXPORT */
-
-// ------------------------------------------------------------
-// Non-member functions.
-
-template <class _CharT, class _Traits, class _Alloc> inline basic_string<_CharT,_Traits,_Alloc> _STLP_CALL
-operator+(const basic_string<_CharT,_Traits,_Alloc>& __s,
-          const basic_string<_CharT,_Traits,_Alloc>& __y)
-{
-  typedef basic_string<_CharT,_Traits,_Alloc> _Str;
-  typedef typename _Str::_Reserve_t _Reserve_t;
-# ifdef __GNUC__
-  // gcc counts this as a function
-  _Str __result  = _Str(_Reserve_t(),__s.size() + __y.size());
-# else
-  _Str __result(_Reserve_t(), __s.size() + __y.size());
-# endif
-  __result.append(__s);
-  __result.append(__y);
-  return __result;
-}
-
-# if defined (__GNUC__) || defined (__MLCCPP__)
-#  define _STLP_INIT_AMBIGUITY 1
-# endif
-
-template <class _CharT, class _Traits, class _Alloc> inline basic_string<_CharT,_Traits,_Alloc> _STLP_CALL
-operator+(const _CharT* __s,
-          const basic_string<_CharT,_Traits,_Alloc>& __y) {
-  _STLP_FIX_LITERAL_BUG(__s)
-  typedef basic_string<_CharT,_Traits,_Alloc> _Str;
-  typedef typename _Str::_Reserve_t _Reserve_t;
-  const size_t __n = _Traits::length(__s);
-# ifdef _STLP_INIT_AMBIGUITY
-  _Str __result = _Str(_Reserve_t(), __n + __y.size());
-# else
-  _Str __result(_Reserve_t(), __n + __y.size());
-# endif
-  __result.append(__s, __s + __n);
-  __result.append(__y);
-  return __result;
-}
-
-template <class _CharT, class _Traits, class _Alloc> inline basic_string<_CharT,_Traits,_Alloc> _STLP_CALL
-operator+(_CharT __c,
-          const basic_string<_CharT,_Traits,_Alloc>& __y) {
-  typedef basic_string<_CharT,_Traits,_Alloc> _Str;
-  typedef typename _Str::_Reserve_t _Reserve_t;
-# ifdef _STLP_INIT_AMBIGUITY
-  _Str __result = _Str(_Reserve_t(), 1 + __y.size());
-# else
-  _Str __result(_Reserve_t(), 1 + __y.size());
-# endif
-  __result.push_back(__c);
-  __result.append(__y);
-  return __result;
-}
-
-template <class _CharT, class _Traits, class _Alloc> inline basic_string<_CharT,_Traits,_Alloc> _STLP_CALL
-operator+(const basic_string<_CharT,_Traits,_Alloc>& __x,
-          const _CharT* __s) {
-  _STLP_FIX_LITERAL_BUG(__s)
-  typedef basic_string<_CharT,_Traits,_Alloc> _Str;
-  typedef typename _Str::_Reserve_t _Reserve_t;
-  const size_t __n = _Traits::length(__s);
-# ifdef _STLP_INIT_AMBIGUITY
-  _Str __result = _Str(_Reserve_t(), __x.size() + __n, __x.get_allocator());
-# else
-  _Str __result(_Reserve_t(), __x.size() + __n, __x.get_allocator());
-# endif
-  __result.append(__x);
-  __result.append(__s, __s + __n);
-  return __result;
-}
-
-template <class _CharT, class _Traits, class _Alloc> inline basic_string<_CharT,_Traits,_Alloc> _STLP_CALL
-operator+(const basic_string<_CharT,_Traits,_Alloc>& __x,
-          const _CharT __c) {
-  typedef basic_string<_CharT,_Traits,_Alloc> _Str;
-  typedef typename _Str::_Reserve_t _Reserve_t;
-# ifdef _STLP_INIT_AMBIGUITY
-  _Str __result = _Str(_Reserve_t(), __x.size() + 1, __x.get_allocator());
-# else
-  _Str __result(_Reserve_t(), __x.size() + 1, __x.get_allocator());
-# endif
-  __result.append(__x);
-  __result.push_back(__c);
-  return __result;
-}
-
-# undef _STLP_INIT_AMBIGUITY
-
-// Operator== and operator!=
-
-template <class _CharT, class _Traits, class _Alloc> inline bool _STLP_CALL
-operator==(const basic_string<_CharT,_Traits,_Alloc>& __x,
-           const basic_string<_CharT,_Traits,_Alloc>& __y) {
-  return __x.size() == __y.size() && _Traits::compare(__x.data(), __y.data(), __x.size()) == 0;
-}
-
-template <class _CharT, class _Traits, class _Alloc> inline bool _STLP_CALL
-operator==(const _CharT* __s,
-           const basic_string<_CharT,_Traits,_Alloc>& __y) {
-  _STLP_FIX_LITERAL_BUG(__s)
-  size_t __n = _Traits::length(__s);
-  return __n == __y.size() && _Traits::compare(__s, __y.data(), __n) == 0;
-}
-
-template <class _CharT, class _Traits, class _Alloc> inline bool _STLP_CALL
-operator==(const basic_string<_CharT,_Traits,_Alloc>& __x,
-           const _CharT* __s) {
-  _STLP_FIX_LITERAL_BUG(__s)
-  size_t __n = _Traits::length(__s);
-  return __x.size() == __n && _Traits::compare(__x.data(), __s, __n) == 0;
-}
-
-// Operator< (and also >, <=, and >=).
-
-template <class _CharT, class _Traits, class _Alloc> inline bool _STLP_CALL
-operator<(const basic_string<_CharT,_Traits,_Alloc>& __x,
-          const basic_string<_CharT,_Traits,_Alloc>& __y) {
-  return basic_string<_CharT,_Traits,_Alloc> ::_M_compare(__x.begin(), __x.end(), 
-		 __y.begin(), __y.end()) < 0;
-}
-
-template <class _CharT, class _Traits, class _Alloc> inline bool _STLP_CALL
-operator<(const _CharT* __s,
-          const basic_string<_CharT,_Traits,_Alloc>& __y) {
-  _STLP_FIX_LITERAL_BUG(__s)
-  size_t __n = _Traits::length(__s);
-  return basic_string<_CharT,_Traits,_Alloc> ::_M_compare(__s, __s + __n, __y.begin(), __y.end()) < 0;
-}
-
-template <class _CharT, class _Traits, class _Alloc> inline bool _STLP_CALL
-operator<(const basic_string<_CharT,_Traits,_Alloc>& __x,
-          const _CharT* __s) {
-  _STLP_FIX_LITERAL_BUG(__s)
-  size_t __n = _Traits::length(__s);
-  return basic_string<_CharT,_Traits,_Alloc> ::_M_compare(__x.begin(), __x.end(), __s, __s + __n) < 0;
-}
-
-#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE
-
-template <class _CharT, class _Traits, class _Alloc> inline bool _STLP_CALL
-operator!=(const basic_string<_CharT,_Traits,_Alloc>& __x,
-           const basic_string<_CharT,_Traits,_Alloc>& __y) {
-  return !(__x == __y);
-}
-
-template <class _CharT, class _Traits, class _Alloc> inline bool _STLP_CALL
-operator>(const basic_string<_CharT,_Traits,_Alloc>& __x,
-          const basic_string<_CharT,_Traits,_Alloc>& __y) {
-  return __y < __x;
-}
-
-template <class _CharT, class _Traits, class _Alloc> inline bool _STLP_CALL
-operator<=(const basic_string<_CharT,_Traits,_Alloc>& __x,
-           const basic_string<_CharT,_Traits,_Alloc>& __y) {
-  return !(__y < __x);
-}
-
-template <class _CharT, class _Traits, class _Alloc> inline bool _STLP_CALL
-operator>=(const basic_string<_CharT,_Traits,_Alloc>& __x,
-           const basic_string<_CharT,_Traits,_Alloc>& __y) {
-  return !(__x < __y);
-}
-
-#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */
-
-template <class _CharT, class _Traits, class _Alloc> inline bool _STLP_CALL 
-operator!=(const _CharT* __s,
-           const basic_string<_CharT,_Traits,_Alloc>& __y) {
-  _STLP_FIX_LITERAL_BUG(__s)
-  return !(__s == __y);
-}
-
-template <class _CharT, class _Traits, class _Alloc> inline bool _STLP_CALL 
-operator!=(const basic_string<_CharT,_Traits,_Alloc>& __x,
-           const _CharT* __s) {
-  _STLP_FIX_LITERAL_BUG(__s)
-  return !(__x == __s);
-}
-
-template <class _CharT, class _Traits, class _Alloc> inline bool _STLP_CALL
-operator>(const _CharT* __s,
-          const basic_string<_CharT,_Traits,_Alloc>& __y) {
-  _STLP_FIX_LITERAL_BUG(__s)
-  return __y < __s;
-}
-
-template <class _CharT, class _Traits, class _Alloc> inline bool _STLP_CALL
-operator>(const basic_string<_CharT,_Traits,_Alloc>& __x,
-          const _CharT* __s) {
-  _STLP_FIX_LITERAL_BUG(__s)
-  return __s < __x;
-}
-
-template <class _CharT, class _Traits, class _Alloc> inline bool _STLP_CALL
-operator<=(const _CharT* __s,
-           const basic_string<_CharT,_Traits,_Alloc>& __y) {
-  _STLP_FIX_LITERAL_BUG(__s)
-  return !(__y < __s);
-}
-
-template <class _CharT, class _Traits, class _Alloc> inline bool _STLP_CALL
-operator<=(const basic_string<_CharT,_Traits,_Alloc>& __x,
-           const _CharT* __s) {
-  _STLP_FIX_LITERAL_BUG(__s)
-  return !(__s < __x);
-}
-
-template <class _CharT, class _Traits, class _Alloc> inline bool _STLP_CALL
-operator>=(const _CharT* __s,
-           const basic_string<_CharT,_Traits,_Alloc>& __y) {
-  _STLP_FIX_LITERAL_BUG(__s)
-  return !(__s < __y);
-}
-
-template <class _CharT, class _Traits, class _Alloc> inline bool _STLP_CALL
-operator>=(const basic_string<_CharT,_Traits,_Alloc>& __x,
-           const _CharT* __s) {
-  _STLP_FIX_LITERAL_BUG(__s)
-  return !(__x < __s);
-}
-
-
-// Swap.
-
-#ifdef _STLP_FUNCTION_TMPL_PARTIAL_ORDER
-
-template <class _CharT, class _Traits, class _Alloc> inline void _STLP_CALL
-swap(basic_string<_CharT,_Traits,_Alloc>& __x,
-     basic_string<_CharT,_Traits,_Alloc>& __y) {
-  __x.swap(__y);
-}
-
-#endif /* _STLP_FUNCTION_TMPL_PARTIAL_ORDER */
-
-template <class _CharT, class _Traits, class _Alloc> void  _STLP_CALL _S_string_copy(const basic_string<_CharT,_Traits,_Alloc>& __s,
-                    _CharT* __buf,
-                    size_t __n);
-
-# undef basic_string
-
-#if defined(_STLP_WINCE)
-// A couple of functions to transfer between ASCII/Unicode
-
-wstring __ASCIIToWide(const char *ascii);
-string __WideToASCII(const wchar_t *wide);
-#endif
-
-_STLP_END_NAMESPACE
-
-# ifdef _STLP_DEBUG
-#  include <stl/debug/_string.h> 
-# endif
-
-# if !defined (_STLP_LINK_TIME_INSTANTIATION)
-#  include <stl/_string.c> 
-# endif
-
-# include <stl/_string_io.h>  
-# include <stl/_string_hash.h>  
-
-#endif /* _STLP_STRING_H */
-
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_string_fwd.c b/src/STLport/stl/_string_fwd.c
deleted file mode 100644
index 509ac82..0000000
--- a/src/STLport/stl/_string_fwd.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- *
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_STRING_FWD_H
-# include <stl/_string_fwd.h>
-#endif
-
-#if !defined ( _STLP_STRING_FWD_C) && ! defined (_STLP_OWN_IOSTREAMS)
-#define _STLP_STRING_FWD_C
-
-_STLP_BEGIN_NAMESPACE
-
-template <class _CharT, class _Traits, class _Alloc>
-const char* _STLP_CALL
-__get_c_string(const basic_string<_CharT,_Traits,_Alloc>& __str) { 
-  return __str.c_str(); 
-}
-
-_STLP_END_NAMESPACE
-
-#endif /*  _STLP_STRING_FWD_C */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_string_fwd.h b/src/STLport/stl/_string_fwd.h
deleted file mode 100644
index e90a00b..0000000
--- a/src/STLport/stl/_string_fwd.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_STRING_FWD_H
-#define _STLP_STRING_FWD_H
-
-#ifndef _STLP_IOSFWD
-# include <iosfwd>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-# if !defined (_STLP_LIMITED_DEFAULT_TEMPLATES)
-template <class _CharT, 
-          class _Traits = char_traits<_CharT>, 
-          class _Alloc = allocator<_CharT> >
-class basic_string;
-# else
-template <class _CharT, 
-          class _Traits, 
-          class _Alloc>
-class basic_string;
-# endif /* _STLP_LIMITED_DEFAULT_TEMPLATES */
-
-typedef basic_string<char, char_traits<char>, allocator<char> > string;
-
-#  ifdef _STLP_HAS_WCHAR_T
-typedef basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> > wstring;
-#  endif
-
-# ifdef _STLP_OWN_IOSTREAMS
-_STLP_DECLSPEC const char*  _STLP_CALL
-__get_c_string(const string& __str);
-# else
-template <class _CharT, class _Traits, class _Alloc>
-const char* _STLP_CALL
-__get_c_string(const basic_string<_CharT, _Traits, _Alloc>& __str);
-# endif
-
-_STLP_END_NAMESPACE
-
-#endif /* _STLP_STRING_FWD_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_string_hash.h b/src/STLport/stl/_string_hash.h
deleted file mode 100644
index acf8f04..0000000
--- a/src/STLport/stl/_string_hash.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 1997-1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_STRING_HASH_H
-# define _STLP_STRING_HASH_H
-
-#ifndef _STLP_HASH_FUN_H
-# include <stl/_hash_fun.h>
-#endif
-
-#ifndef _STLP_STRING_H
-# include <stl/_string.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-template <class _CharT, class _Traits, class _Alloc>
-_STLP_INLINE_LOOP size_t
-__stl_string_hash(const basic_string<_CharT,_Traits,_Alloc>& __s) {
-  unsigned long __h = 0;
-  typedef typename basic_string<_CharT,_Traits,_Alloc>::const_pointer const_ptr;
-  size_t __len = __s.size();
-  const _CharT* __data = __s.data();
-  for ( size_t __i = 0; __i < __len; ++__i)
-    __h = 5*__h + __data[__i];
-  return size_t(__h);
-}
-
-#ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION
-
-template <class _CharT, class _Traits, class _Alloc>
-struct hash<basic_string<_CharT,_Traits,_Alloc> > {
-  size_t operator()(const basic_string<_CharT,_Traits,_Alloc>& __s) const
-    { return __stl_string_hash(__s); }
-};
-
-#else
-
-_STLP_TEMPLATE_NULL struct _STLP_CLASS_DECLSPEC hash<string> {
-  size_t operator()(const string& __s) const
-    { return __stl_string_hash(__s); }
-};
-
-# if defined (_STLP_HAS_WCHAR_T)
-_STLP_TEMPLATE_NULL struct _STLP_CLASS_DECLSPEC hash<wstring> {
-  size_t operator()(const wstring& __s) const
-    { return __stl_string_hash(__s); }
-};
-# endif
-
-#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
-
-_STLP_END_NAMESPACE
-
-#endif
diff --git a/src/STLport/stl/_string_io.c b/src/STLport/stl/_string_io.c
deleted file mode 100644
index 973b6c4..0000000
--- a/src/STLport/stl/_string_io.c
+++ /dev/null
@@ -1,334 +0,0 @@
-#ifndef _STLP_STRING_IO_C
-#define _STLP_STRING_IO_C
-
-#ifndef _STLP_STRING_IO_H
-# include <stl/_string_io.h>
-#endif
-
-#ifndef _STLP_INTERNAL_CTYPE_H
-# include <stl/_ctype.h>
-#endif
-
-# ifdef _STLP_DEBUG
-#  define basic_string _Nondebug_string
-# endif
-
-_STLP_BEGIN_NAMESPACE
-
-# if defined (_STLP_OWN_IOSTREAMS)
-#  define _STLP_USING_IO
-# else
-#  define _STLP_USING_IO _STLP_USING_VENDOR_STD
-# endif
-
-#if defined (_STLP_USE_NEW_IOSTREAMS)
-
-template <class _CharT, class _Traits>
-bool _STLP_CALL
-__stlp_string_fill(basic_ostream<_CharT, _Traits>& __os,
-                  basic_streambuf<_CharT, _Traits>* __buf,
-                  size_t __n)
-{
-  _CharT __f = __os.fill();
-  size_t __i;
-  bool __ok = true;
-
-  for (__i = 0; __i < __n; ++__i)
-    __ok = __ok && !_Traits::eq_int_type(__buf->sputc(__f), _Traits::eof());
-  return __ok;
-}
-
-template <class _CharT, class _Traits, class _Alloc>
-basic_ostream<_CharT, _Traits>& _STLP_CALL
-operator<<(basic_ostream<_CharT, _Traits>& __os, 
-           const basic_string<_CharT,_Traits,_Alloc>& __s)
-{
-
-  _STLP_USING_IO
-  typedef basic_ostream<_CharT, _Traits> __ostream;
-  typename __ostream::sentry __sentry(__os);
-  bool __ok = false;
-
-  if (__sentry) {
-    __ok = true;
-    size_t __n = __s.size();
-    size_t __pad_len = 0;
-    const bool __left = (__os.flags() & __ostream::left) != 0;
-    const size_t __w = __os.width(0);
-    basic_streambuf<_CharT, _Traits>* __buf = __os.rdbuf();
-
-    if (__n < __w) {
-      __pad_len = __w - __n;
-    }
-    
-    if (!__left)
-      __ok = __stlp_string_fill(__os, __buf, __pad_len);    
-
-    __ok = __ok && (__buf->sputn(__s.data(), streamsize(__n)) == streamsize(__n));
-
-    if (__left)
-      __ok = __ok && __stlp_string_fill(__os, __buf, __pad_len);
-  }
-
-  if (!__ok)
-    __os.setstate(__ostream::failbit);
-
-  return __os;
-}
- 
-template <class _CharT, class _Traits, class _Alloc>
-basic_istream<_CharT, _Traits>& _STLP_CALL 
-operator>>(basic_istream<_CharT, _Traits>& __is,
-           basic_string<_CharT,_Traits, _Alloc>& __s)
-{
-  _STLP_USING_IO
-  typedef basic_istream<_CharT, _Traits> __istream;
-  typename __istream::sentry __sentry(__is);
-
-  if (__sentry) {
-    basic_streambuf<_CharT, _Traits>* __buf = __is.rdbuf();
-    typedef ctype<_CharT> _C_type;
-
-#ifdef _STLP_OWN_IOSTREAMS
-    //    const _C_type& _Ctype = use_facet<_C_type>(__loc);
-    const _C_type& _Ctype = *(const _C_type*)__is._M_ctype_facet();
-#else
-# if defined (_STLP_MSVC) && (_STLP_MSVC <= 1200 ) || defined (__ICL)
-    const locale& __loc = __is.getloc();
-    const _C_type& _Ctype = use_facet(__loc , ( _C_type * ) 0, true);
-# elif defined (__SUNPRO_CC)
-    const locale& __loc = __is.getloc();
-    const _C_type& _Ctype = use_facet(__loc , ( _C_type * ) 0);
-# else
-    const locale& __loc = __is.getloc();
-    const _C_type& _Ctype = use_facet<_C_type>(__loc);
-# endif
-#endif
-    __s.clear();
-    size_t __n = __is.width(0);
-    if (__n == 0)
-      __n = __STATIC_CAST(size_t,-1);
-    else
-      __s.reserve(__n);
-    
-
-    while (__n-- > 0) {
-      typename _Traits::int_type __c1 = __buf->sbumpc();
-      if (_Traits::eq_int_type(__c1, _Traits::eof())) {
-        __is.setstate(__istream::eofbit);
-        break;
-      }
-      else {
-        _CharT __c = _Traits::to_char_type(__c1);
-
-        if (_Ctype.is(_C_type::space, __c)) {
-          if (_Traits::eq_int_type(__buf->sputbackc(__c), _Traits::eof()))
-            __is.setstate(__istream::failbit);
-          break;
-        }
-        else
-          __s.push_back(__c);
-      }
-    }
-    
-    // If we have read no characters, then set failbit.
-    if (__s.size() == 0)
-      __is.setstate(__istream::failbit);
-  }
-  else
-    __is.setstate(__istream::failbit);
-
-  return __is;
-}
-
-template <class _CharT, class _Traits, class _Alloc>    
-basic_istream<_CharT, _Traits>& _STLP_CALL 
-getline(basic_istream<_CharT, _Traits>& __is,
-        basic_string<_CharT,_Traits,_Alloc>& __s,
-        _CharT __delim)
-{
-  _STLP_USING_IO
-  typedef basic_istream<_CharT, _Traits> __istream;
-  size_t __nread = 0;
-  typename basic_istream<_CharT, _Traits>::sentry __sentry(__is, true);
-  if (__sentry) {
-    basic_streambuf<_CharT, _Traits>* __buf = __is.rdbuf();
-    __s.clear();
-
-    while (__nread < __s.max_size()) {
-      int __c1 = __buf->sbumpc();
-      if (_Traits::eq_int_type(__c1, _Traits::eof())) {
-        __is.setstate(__istream::eofbit);
-        break;
-      }
-      else {
-        ++__nread;
-        _CharT __c = _Traits::to_char_type(__c1);
-        if (!_Traits::eq(__c, __delim)) 
-          __s.push_back(__c);
-        else
-          break;              // Character is extracted but not appended.
-      }
-    }
-  }
-  if (__nread == 0 || __nread >= __s.max_size())
-    __is.setstate(__istream::failbit);
-
-  return __is;
-}
-
-#elif ! defined ( _STLP_USE_NO_IOSTREAMS )
-
-// (reg) For Watcom IO, _OSTREAM_DLL tells if ostream class is in .exe or in .dll
-
-template <class _CharT, class _Traits, class _Alloc>
-_OSTREAM_DLL&  _STLP_CALL operator<<(_OSTREAM_DLL& __os, 
-                    const basic_string<_CharT,_Traits,_Alloc>& __s)
-{
-  _STLP_USING_IO
-  streambuf* __buf = __os.rdbuf();
-  if (__buf) {
-    size_t __n = __s.size();
-    size_t __pad_len = 0;
-    const bool __left = (__os.flags() & ios::left) !=0;
-    const size_t __w = __os.width();
-
-    if (__n < __w) { 
-      __pad_len = __w - __n; 
-    } 
-    
-    if (!__left)
-      __stlp_string_fill(__os, __buf, __pad_len);
-  
-    const size_t __nwritten = __buf->sputn(__s.data(), __n);
-
-    if (__left)
-      __stlp_string_fill(__os, __buf, __pad_len);
-
-    if (__nwritten != __n)
-      __os.clear(__os.rdstate() | ios::failbit);
-
-    __os.width(0);
-  }
-  else
-    __os.clear(__os.rdstate() | ios::badbit);
-
-  return __os;
-}
-
-template <class _CharT, class _Traits, class _Alloc>
-_ISTREAM_DLL& _STLP_CALL operator>>(_ISTREAM_DLL& __is, basic_string<_CharT,_Traits,_Alloc>& __s)
-{
-  _STLP_USING_IO
-  if (!__is)
-    return __is;
-
-  streambuf* __buf = __is.rdbuf();
-  if (__buf) {
-
-    if (__is.flags() & ios::skipws) {
-      //      _CharT __c;
-      int __c;
-      do {
-        __c = __buf->sbumpc();
-      }
-      while (__c != EOF && isspace((unsigned char)__c));
-
-      if (__c == EOF) {
-        __is.clear(__is.rdstate() | ios::eofbit | ios::failbit);
-      }
-      else {
-	if (__buf->sputbackc(__c) == EOF)
-	  __is.clear(__is.rdstate() | ios::failbit);
-      }
-    }
-
-    // If we arrive at end of file (or fail for some other reason) while
-    // still discarding whitespace, then we don't try to read the string.
-    if (__is) {
-      __s.clear();
-
-      size_t __n = __is.width();
-      if (__n == 0)
-        __n = __STATIC_CAST(size_t,-1);
-      else
-        __s.reserve(__n);
-
-      while (__n-- > 0) {
-        int __c1 = __buf->sbumpc();
-        if (__c1 == EOF) {
-          __is.clear(__is.rdstate() | ios::eofbit);
-          break;
-        }
-        else {
-          _CharT __c = _Traits::to_char_type(__c1);
-
-          if (isspace((unsigned char) __c)) {
-            if (__buf->sputbackc(__c) == EOF)
-              __is.clear(__is.rdstate() | ios::failbit);
-            break;
-          }
-          else
-            __s.push_back(__c);
-        }
-      }
-    
-      // If we have read no characters, then set failbit.
-      if (__s.size() == 0)
-        __is.clear(__is.rdstate() | ios::failbit);
-    }
-
-    __is.width(0);
-  }
-  else                          // We have no streambuf.
-    __is.clear(__is.rdstate() | ios::badbit);
-
-  return __is;
-}
-
-template <class _CharT, class _Traits, class _Alloc>    
-_ISTREAM_DLL& _STLP_CALL getline(_ISTREAM_DLL& __is,
-                 basic_string<_CharT,_Traits,_Alloc>& __s,
-                 _CharT __delim)
-{
-  _STLP_USING_IO
-  streambuf* __buf = __is.rdbuf();
-  if (__buf) {
-    size_t __nread = 0;
-    if (__is) {
-      __s.clear();
-
-      while (__nread < __s.max_size()) {
-        int __c1 = __buf->sbumpc();
-        if (__c1 == EOF) {
-          __is.clear(__is.rdstate() | ios::eofbit);
-          break;
-        }
-        else {
-          ++__nread;
-          _CharT __c = _Traits::to_char_type(__c1);
-          if (!_Traits::eq(__c, __delim)) 
-            __s.push_back(__c);
-          else
-            break;              // Character is extracted but not appended.
-        }
-      }
-    }
-
-    if (__nread == 0 || __nread >= __s.max_size())
-      __is.clear(__is.rdstate() | ios::failbit);
-  }
-  else
-    __is.clear(__is.rdstate() | ios::badbit);
-
-  return __is;
-}
-
-# endif /* _STLP_NEW_IOSTREAMS */
-
-_STLP_END_NAMESPACE
-
-// # undef _STLP_USING_IO
-# undef basic_string
-
-#endif
diff --git a/src/STLport/stl/_string_io.h b/src/STLport/stl/_string_io.h
deleted file mode 100644
index c4b99e3..0000000
--- a/src/STLport/stl/_string_io.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Copyright (c) 1997-1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_STRING_IO_H
-#define _STLP_STRING_IO_H
-
-// this is for link-time instantiation
-#if !defined  ( _STLP_STRING )
-# include <string>
-# endif
-
-//#ifndef _STLP_LOCALE
-//# include <locale>
-//#endif
-
-# ifdef _STLP_DEBUG
-#  define basic_string _Nondebug_string
-# endif
-
-// I/O.  
-_STLP_BEGIN_NAMESPACE
-
-#if defined (_STLP_USE_NEW_IOSTREAMS)
-
-template <class _CharT, class _Traits, class _Alloc>
-basic_ostream<_CharT, _Traits>& _STLP_CALL
-operator<<(basic_ostream<_CharT, _Traits>& __os, 
-           const basic_string<_CharT,_Traits,_Alloc>& __s);
-
-template <class _CharT, class _Traits, class _Alloc>
-basic_istream<_CharT, _Traits>&  _STLP_CALL
-operator>>(basic_istream<_CharT, _Traits>& __is,
-           basic_string<_CharT,_Traits,_Alloc>& __s);
-
-template <class _CharT, class _Traits, class _Alloc>    
-basic_istream<_CharT, _Traits>& _STLP_CALL 
-getline(basic_istream<_CharT, _Traits>& __is,
-        basic_string<_CharT,_Traits,_Alloc>& __s,
-        _CharT __delim);
-
-# if !(defined (__BORLANDC__) && ! defined (_STLP_USE_OWN_NAMESPACE))
-
-template <class _CharT, class _Traits, class _Alloc>    
-inline basic_istream<_CharT, _Traits>& _STLP_CALL 
-getline(basic_istream<_CharT, _Traits>& __is,
-        basic_string<_CharT,_Traits,_Alloc>& __s)
-{
-  return getline(__is, __s, __is.widen('\n'));
-}
-# endif
-
-template <class _CharT, class _Traits>
-bool _STLP_CALL
-__stlp_string_fill(basic_ostream<_CharT, _Traits>& __os,
-                  basic_streambuf<_CharT, _Traits>* __buf,
-                  size_t __n);
-#elif ! defined ( _STLP_USE_NO_IOSTREAMS )
-
-// (reg) For Watcom IO, this tells if ostream class is in .exe or in .dll
-# ifdef _WPRTLINK
-typedef _WPRTLINK ostream _OSTREAM_DLL;
-typedef _WPRTLINK istream _ISTREAM_DLL;
-#else
-typedef           ostream _OSTREAM_DLL;
-typedef           istream _ISTREAM_DLL;
-#endif
-
-template <class _CharT, class _Traits, class _Alloc>
-_OSTREAM_DLL& _STLP_CALL operator<<(_OSTREAM_DLL& __os, 
-                    const basic_string<_CharT,_Traits,_Alloc>& __s);
-
-template <class _CharT, class _Traits, class _Alloc>
-_ISTREAM_DLL& _STLP_CALL operator>>(_ISTREAM_DLL& __is, basic_string<_CharT,_Traits,_Alloc>& __s);
-
-template <class _CharT, class _Traits, class _Alloc>    
-_ISTREAM_DLL& _STLP_CALL getline(_ISTREAM_DLL& __is,
-                 basic_string<_CharT,_Traits,_Alloc>& __s,
-                 _CharT __delim);
-
-
-template <class _CharT, class _Traits, class _Alloc>    
-inline _ISTREAM_DLL& _STLP_CALL 
-getline(_ISTREAM_DLL& __is, basic_string<_CharT,_Traits,_Alloc>& __s)
-{
-  return getline(__is, __s, '\n');
-}
-
-inline void  _STLP_CALL
-__stlp_string_fill(_OSTREAM_DLL& __os, streambuf* __buf, size_t __n)
-{
-  char __f = __os.fill();
-  size_t __i;
-
-  for (__i = 0; __i < __n; ++__i) __buf->sputc(__f);
-}
-
-#endif /* _STLP_USE_NEW_IOSTREAMS */
-
-_STLP_END_NAMESPACE
-
-# undef basic_string
-
-# if !defined (_STLP_LINK_TIME_INSTANTIATION)
-#  include <stl/_string_io.c>
-# endif
-
-#endif /* _STLP_STRING_IO_H */
diff --git a/src/STLport/stl/_strstream.h b/src/STLport/stl/_strstream.h
deleted file mode 100644
index 85bb7fc..0000000
--- a/src/STLport/stl/_strstream.h
+++ /dev/null
@@ -1,141 +0,0 @@
-
-#ifndef _STLP_INTERNAL_STREAMBUF
-#include <stl/_streambuf.h>
-#endif
-#ifndef _STLP_ISTREAM
-#include <istream>              // Includes <ostream>, <ios>, <iosfwd>
-#endif
-#ifndef _STLP_STRING_H
-#include <stl/_string.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-#ifndef _STLP_USE_NAMESPACES
-# define strstream _STLP_strstream 
-# define ostrstream _STLP_ostrstream
-# define istrstream _STLP_istrstream
-# define strstreambuf _STLP_strstreambuf
-#endif
-
-//----------------------------------------------------------------------
-// Class strstreambuf, a streambuf class that manages an array of char.
-// Note that this class is not a template.
-
-class _STLP_CLASS_DECLSPEC strstreambuf : public basic_streambuf<char, char_traits<char> >
-{
-public:                         // Types.
-  typedef char_traits<char>              _Traits;
-  typedef basic_streambuf<char, char_traits<char> > _Base;
-  typedef void* (*__alloc_fn)(size_t);
-  typedef void (*__free_fn)(void*);
-public:                         // Constructor, destructor
-
-  explicit strstreambuf(streamsize _Initial_capacity = 0);
-
-  strstreambuf(__alloc_fn, __free_fn);
-
-  strstreambuf(char* __get, streamsize __n, char* __put = 0);
-  strstreambuf(signed char* __get, streamsize __n, signed char* __put = 0);
-  strstreambuf(unsigned char* __get, streamsize __n, unsigned char* __put=0);
-
-  strstreambuf(const char* __get, streamsize __n);
-  strstreambuf(const signed char* __get, streamsize __n);
-  strstreambuf(const unsigned char* __get, streamsize __n);
-
-  virtual ~strstreambuf();
-
-public:                         // strstreambuf operations.
-  void freeze(bool = true);
-  char* str();
-  int pcount() const;
-
-protected:                      // Overridden virtual member functions.
-  virtual int_type overflow(int_type __c  = _Traits::eof());
-  virtual int_type pbackfail(int_type __c = _Traits::eof());
-  virtual int_type underflow();
-  virtual _Base* setbuf(char* __buf, streamsize __n);
-  virtual pos_type seekoff(off_type __off, ios_base::seekdir __dir,
-                           ios_base::openmode __mode 
-                                      = ios_base::in | ios_base::out);
-  virtual pos_type seekpos(pos_type __pos, ios_base::openmode __mode 
-                                      = ios_base::in | ios_base::out);
-
-private:                        // Helper functions.
-  // Dynamic allocation, possibly using _M_alloc_fun and _M_free_fun.
-  char* _M_alloc(size_t);
-  void  _M_free(char*);
-
-  // Helper function used in constructors.
-  void _M_setup(char* __get, char* __put, streamsize __n);
-private:                        // Data members.
-  __alloc_fn _M_alloc_fun;
-  __free_fn  _M_free_fun;
-  bool _M_dynamic  : 1;
-  bool _M_frozen   : 1;
-  bool _M_constant : 1;
-};
-
-//----------------------------------------------------------------------
-// Class istrstream, an istream that manages a strstreambuf.
-
-class _STLP_CLASS_DECLSPEC istrstream : public basic_istream<char, char_traits<char> >
-{
-public:
-  explicit istrstream(char*);
-  explicit istrstream(const char*);
-  istrstream(char* , streamsize);
-  istrstream(const char*, streamsize);
-  virtual ~istrstream();
-  
-  strstreambuf* rdbuf() const;
-  char* str();
-
-private:
-  strstreambuf _M_buf;
-};
-
-//----------------------------------------------------------------------
-// Class ostrstream
-
-class _STLP_CLASS_DECLSPEC ostrstream : public basic_ostream<char, char_traits<char> >
-{
-public:
-  ostrstream();
-  ostrstream(char*, int, ios_base::openmode = ios_base::out);
-  virtual ~ostrstream();
-
-  strstreambuf* rdbuf() const;
-  void freeze(bool = true);
-  char* str();
-  int pcount() const;
-
-private:
-  strstreambuf _M_buf;
-};
-
-//----------------------------------------------------------------------
-// Class strstream
-
-class _STLP_CLASS_DECLSPEC strstream : public basic_iostream<char, char_traits<char> >
-{
-public:
-  typedef char                        char_type;
-  typedef char_traits<char>::int_type int_type;
-  typedef char_traits<char>::pos_type pos_type;
-  typedef char_traits<char>::off_type off_type;
-
-  strstream();
-  strstream(char*, int, ios_base::openmode = ios_base::in | ios_base::out);
-  virtual ~strstream();
-
-  strstreambuf* rdbuf() const;
-  void freeze(bool = true);
-  int pcount() const;
-  char* str();
-
-private:
-  strstreambuf _M_buf;
-};
-
-_STLP_END_NAMESPACE
diff --git a/src/STLport/stl/_tempbuf.c b/src/STLport/stl/_tempbuf.c
deleted file mode 100644
index b1eb21c..0000000
--- a/src/STLport/stl/_tempbuf.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- *
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-#ifndef _STLP_TEMPBUF_C
-#define _STLP_TEMPBUF_C
-
-#ifndef _STLP_INTERNAL_TEMPBUF_H
-# include <stl/_tempbuf.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-template <class _Tp>
-pair<_Tp*, ptrdiff_t> _STLP_CALL 
-__get_temporary_buffer(ptrdiff_t __len, _Tp*)
-{
-  if (__len > ptrdiff_t(INT_MAX / sizeof(_Tp)))
-    __len = INT_MAX / sizeof(_Tp);
-
-  while (__len > 0) {
-    _Tp* __tmp = (_Tp*) malloc((size_t)__len * sizeof(_Tp));
-    if (__tmp != 0)
-      return pair<_Tp*, ptrdiff_t>(__tmp, __len);
-    __len /= 2;
-  }
-
-  return pair<_Tp*, ptrdiff_t>((_Tp*)0, 0);
-}
-_STLP_END_NAMESPACE
-
-#endif /*  _STLP_TEMPBUF_C */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_tempbuf.h b/src/STLport/stl/_tempbuf.h
deleted file mode 100644
index f6d342e..0000000
--- a/src/STLport/stl/_tempbuf.h
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_TEMPBUF_H
-#define _STLP_INTERNAL_TEMPBUF_H
-
-# ifndef _STLP_CLIMITS
-#  include <climits>
-# endif
-# ifndef _STLP_CSTDLIB
-#  include <cstdlib>
-# endif
-# ifndef _STLP_INTERNAL_UNINITIALIZED_H
-#  include <stl/_uninitialized.h>
-# endif
-
-_STLP_BEGIN_NAMESPACE
-
-template <class _Tp>
-pair<_Tp*, ptrdiff_t>  _STLP_CALL
-__get_temporary_buffer(ptrdiff_t __len, _Tp*);
-
-#ifndef _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS
-
-template <class _Tp>
-inline pair<_Tp*, ptrdiff_t>  _STLP_CALL get_temporary_buffer(ptrdiff_t __len) {
-  return __get_temporary_buffer(__len, (_Tp*) 0);
-}
-
-# if ! defined(_STLP_NO_EXTENSIONS)
-// This overload is not required by the standard; it is an extension.
-// It is supported for backward compatibility with the HP STL, and
-// because not all compilers support the language feature (explicit
-// function template arguments) that is required for the standard
-// version of get_temporary_buffer.
-template <class _Tp>
-inline pair<_Tp*, ptrdiff_t>  _STLP_CALL
-get_temporary_buffer(ptrdiff_t __len, _Tp*) {
-  return __get_temporary_buffer(__len, (_Tp*) 0);
-}
-# endif
-#endif
-
-template <class _Tp>
-inline void  _STLP_CALL return_temporary_buffer(_Tp* __p) {
-// SunPro brain damage
-  free((char*)__p);
-}
-
-template <class _ForwardIterator, class _Tp>
-class _Temporary_buffer {
-private:
-  ptrdiff_t  _M_original_len;
-  ptrdiff_t  _M_len;
-  _Tp*       _M_buffer;
-
-  void _M_allocate_buffer() {
-    _M_original_len = _M_len;
-    _M_buffer = 0;
-
-    if (_M_len > (ptrdiff_t)(INT_MAX / sizeof(_Tp)))
-      _M_len = INT_MAX / sizeof(_Tp);
-
-    while (_M_len > 0) {
-      _M_buffer = (_Tp*) malloc(_M_len * sizeof(_Tp));
-      if (_M_buffer)
-        break;
-      _M_len /= 2;
-    }
-  }
-
-  void _M_initialize_buffer(const _Tp&, const __true_type&) {}
-  void _M_initialize_buffer(const _Tp& val, const __false_type&) {
-    uninitialized_fill_n(_M_buffer, _M_len, val);
-  }
-
-public:
-  ptrdiff_t size() const { return _M_len; }
-  ptrdiff_t requested_size() const { return _M_original_len; }
-  _Tp* begin() { return _M_buffer; }
-  _Tp* end() { return _M_buffer + _M_len; }
-
-  _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last) {
-    // Workaround for a __type_traits bug in the pre-7.3 compiler.
-#   if defined(__sgi) && !defined(__GNUC__) && _COMPILER_VERSION < 730
-    typedef typename __type_traits<_Tp>::is_POD_type _Trivial;
-#   else
-     typedef typename __type_traits<_Tp>::has_trivial_default_constructor  _Trivial;
-#   endif
-    _STLP_TRY {
-      _M_len = distance(__first, __last);
-      _M_allocate_buffer();
-      if (_M_len > 0)
-        _M_initialize_buffer(*__first, _Trivial());
-    }
-    _STLP_UNWIND(free(_M_buffer); _M_buffer = 0; _M_len = 0);
-  }
- 
-  ~_Temporary_buffer() {  
-    _STLP_STD::_Destroy(_M_buffer, _M_buffer + _M_len);
-    free(_M_buffer);
-  }
-
-private:
-  // Disable copy constructor and assignment operator.
-  _Temporary_buffer(const _Temporary_buffer<_ForwardIterator, _Tp>&) {}
-  void operator=(const _Temporary_buffer<_ForwardIterator, _Tp>&) {}
-};
-
-# ifndef _STLP_NO_EXTENSIONS
-
-// Class temporary_buffer is not part of the standard.  It is an extension.
-
-template <class _ForwardIterator, 
-          class _Tp 
-#ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION
-                    = typename iterator_traits<_ForwardIterator>::value_type
-#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
-         >
-struct temporary_buffer : public _Temporary_buffer<_ForwardIterator, _Tp>
-{
-  temporary_buffer(_ForwardIterator __first, _ForwardIterator __last)
-    : _Temporary_buffer<_ForwardIterator, _Tp>(__first, __last) {}
-  ~temporary_buffer() {}
-};
-
-# endif /* _STLP_NO_EXTENSIONS */
-    
-_STLP_END_NAMESPACE
-
-# ifndef _STLP_LINK_TIME_INSTANTIATION
-#  include <stl/_tempbuf.c>
-# endif
-
-#endif /* _STLP_INTERNAL_TEMPBUF_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_threads.c b/src/STLport/stl/_threads.c
deleted file mode 100644
index 31c2cfa..0000000
--- a/src/STLport/stl/_threads.c
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- *
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-#ifndef _STLP_THREADS_C
-#define _STLP_THREADS_C
-
-#ifndef _STLP_INTERNAL_THREADS_H
-# include <stl/_threads.h>
-#endif
-
-# if defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION)
-
-# if defined(_STLP_SGI_THREADS)
-#  include <time.h>
-# elif defined (_STLP_UNIX)
-#  include <ctime>
-# if defined (_STLP_USE_NAMESPACES) && ! defined (_STLP_VENDOR_GLOBAL_CSTD)
-using _STLP_VENDOR_CSTD::time_t;
-# endif
-#  include <sys/time.h>
-# endif
-
-_STLP_BEGIN_NAMESPACE
-
-# if (_STLP_STATIC_TEMPLATE_DATA > 0)
-
-#  ifdef _STLP_THREADS
-#  if !defined(_STLP_ATOMIC_EXCHANGE) && (defined(_STLP_PTHREADS) || defined(_STLP_UITHREADS) || defined(_STLP_OS2THREADS) || defined(_STLP_USE_PTHREAD_SPINLOCK))
-template<int __dummy>
-_STLP_STATIC_MUTEX
-_Swap_lock_struct<__dummy>::_S_swap_lock _STLP_MUTEX_INITIALIZER;
-#  endif
-#  endif //_STLP_THREADS
-
-#  ifndef _STLP_USE_PTHREAD_SPINLOCK
-template <int __inst>
-unsigned _STLP_mutex_spin<__inst>::__max = _STLP_mutex_spin<__inst>::__low_max;
-
-template <int __inst>
-unsigned _STLP_mutex_spin<__inst>::__last = 0;
-#  endif // _STLP_USE_PTHREAD_SPINLOCK
-
-# else /* ( _STLP_STATIC_TEMPLATE_DATA > 0 ) */
-
-#  if defined(_STLP_PTHREADS) || defined(_STLP_UITHREADS) || defined(_STLP_OS2THREADS)
-__DECLARE_INSTANCE(_STLP_STATIC_MUTEX, _Swap_lock_struct<0>::_S_swap_lock, 
-                   _STLP_MUTEX_INITIALIZER  );
-#  endif /* _STLP_PTHREADS */
-
-#  ifndef _STLP_USE_PTHREAD_SPINLOCK
-__DECLARE_INSTANCE(unsigned, _STLP_mutex_spin<0>::__max,  =30);
-__DECLARE_INSTANCE(unsigned, _STLP_mutex_spin<0>::__last, =0);
-#  endif // _STLP_USE_PTHREAD_SPINLOCK
-
-# endif /* ( _STLP_STATIC_TEMPLATE_DATA > 0 ) */
-
-#ifndef _STLP_USE_PTHREAD_SPINLOCK
-
-#ifdef _STLP_SPARC_SOLARIS_THREADS
-// underground function in libc.so; we do not want dependance on librt
-extern "C" int __nanosleep(const struct timespec*, struct timespec*);
-# define _STLP_NANOSLEEP __nanosleep
-#else
-# define _STLP_NANOSLEEP nanosleep
-#endif
-
-template <int __inst>
-void _STLP_CALL
-_STLP_mutex_spin<__inst>::_S_nsec_sleep(int __log_nsec) {
-#     if defined(_STLP_WIN32THREADS)
-	  if (__log_nsec <= 20) {
-        // Note from boost (www.boost.org): 
-        // Changed to Sleep(1) from Sleep(0).
-        // According to MSDN, Sleep(0) will never yield
-        // to a lower-priority thread, whereas Sleep(1)
-        // will. Performance seems not to be affected.
-	      Sleep(1);
-	  } else {
-	      Sleep(1 << (__log_nsec - 20));
-	  }
-#    elif defined(_STLP_OS2THREADS)
-      if (__log_nsec <= 20) {
-         DosSleep(0);
-      } else {
-         DosSleep(1 << (__log_nsec - 20));
-      }
-#     elif defined (_STLP_UNIX)
-          timespec __ts;
-          /* Max sleep is 2**27nsec ~ 60msec      */
-          __ts.tv_sec = 0;
-          __ts.tv_nsec = 1 << __log_nsec;
-          _STLP_NANOSLEEP(&__ts, 0);
-#     endif
-  }
-
-
-template <int __inst>
-void  _STLP_CALL
-_STLP_mutex_spin<__inst>::_M_do_lock(volatile __stl_atomic_t* __lock)
-{
-#if defined(_STLP_ATOMIC_EXCHANGE)
-  if (_Atomic_swap(__lock, 1)) {
-    unsigned __my_spin_max = _STLP_mutex_spin<0>::__max;
-    unsigned __my_last_spins = _STLP_mutex_spin<0>::__last;
-    volatile unsigned __junk = 17; 	// Value doesn't matter.
-    unsigned  __i;
-    
-    for (__i = 0; __i < __my_spin_max; ++__i) {
-      if (__i < __my_last_spins/2 || *__lock) {
-        __junk *= __junk; __junk *= __junk;
-        __junk *= __junk; __junk *= __junk;
-      } else {
-        if (!_Atomic_swap(__lock, 1)) {
-          // got it!
-          // Spinning worked.  Thus we're probably not being scheduled
-          // against the other process with which we were contending.
-          // Thus it makes sense to spin longer the next time.
-          _STLP_mutex_spin<0>::__last = __i;
-          _STLP_mutex_spin<0>::__max = _STLP_mutex_spin<0>::__high_max;
-	    return;
-        }
-      }
-    }
-    
-    // We are probably being scheduled against the other process.  Sleep.
-    _STLP_mutex_spin<0>::__max = _STLP_mutex_spin<0>::__low_max;
-    
-    for (__i = 0 ;; ++__i) {
-      int __log_nsec = __i + 6;
-      
-      if (__log_nsec > 27) __log_nsec = 27;
-      if (!_Atomic_swap(__lock, 1)) {
-	  break;
-      }
-      _S_nsec_sleep(__log_nsec);
-    }
-    
-  } /* first _Atomic_swap */
-# endif
-}
-#endif // _STLP_USE_PTHREAD_SPINLOCK
-
-_STLP_END_NAMESPACE
-
-# endif /* BUILDING_STLPORT */
-#endif /*  _STLP_THREADS_C */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_threads.h b/src/STLport/stl/_threads.h
deleted file mode 100644
index a383604..0000000
--- a/src/STLport/stl/_threads.h
+++ /dev/null
@@ -1,721 +0,0 @@
-/*
- * Copyright (c) 1997-1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-// WARNING: This is an internal header file, included by other C++
-// standard library headers.  You should not attempt to use this header
-// file directly.
-// Stl_config.h should be included before this file.
-
-
-#ifndef _STLP_INTERNAL_THREADS_H
-#define _STLP_INTERNAL_THREADS_H
-
-// Supported threading models are native SGI, pthreads, uithreads
-// (similar to pthreads, but based on an earlier draft of the Posix
-// threads standard), and Win32 threads.  Uithread support by Jochen
-// Schlick, 1999, and Solaris threads generalized to them.
-
-#ifndef _STLP_CONFIG_H
-#include <stl/_config.h>
-#endif
-
-# if ! defined (_STLP_CSTDDEF)
-#  include <cstddef>
-# endif
-
-# if ! defined (_STLP_CSTDLIB)
-#  include <cstdlib>
-# endif
-
-// On SUN and Mac OS X gcc, zero-initialization works just fine...
-# if defined (__sun) || ( defined(__GNUC__) && defined(__APPLE__) )
-# define _STLP_MUTEX_INITIALIZER
-# endif
-
-# if defined (_STLP_WIN32) || defined (__sgi) || defined (_STLP_SPARC_SOLARIS_THREADS)
-  typedef long __stl_atomic_t;
-# else 
-# if defined (_STLP_USE_NAMESPACES) && ! defined (_STLP_VENDOR_GLOBAL_CSTD)
-// using _STLP_VENDOR_CSTD::size_t;
-using namespace _STLP_VENDOR_CSTD;
-# endif
-  typedef size_t __stl_atomic_t;
-#endif  
-
-# if defined(_STLP_SGI_THREADS)
-#  include <mutex.h>
-// Hack for SGI o32 compilers.
-#if !defined(__add_and_fetch) && \
-    (__mips < 3 || !(defined (_ABIN32) || defined(_ABI64)))
-#  define __add_and_fetch(__l,__v) add_then_test((unsigned long*)__l,__v)  
-#  define __test_and_set(__l,__v)  test_and_set(__l,__v)
-#endif /* o32 */
-
-# if __mips < 3 || !(defined (_ABIN32) || defined(_ABI64))
-#  define _STLP_ATOMIC_EXCHANGE(__p, __q) test_and_set(__p, __q)
-# else
-#  define _STLP_ATOMIC_EXCHANGE(__p, __q) __test_and_set((unsigned long*)__p, (unsigned long)__q)
-# endif
-
-#  define _STLP_ATOMIC_INCREMENT(__x) __add_and_fetch(__x, 1)
-#  define _STLP_ATOMIC_DECREMENT(__x) __add_and_fetch(__x, (size_t) -1)
-
-# elif defined (__GNUC__) && defined (__i386__) && defined (__unix__) && defined (_STLP_USE_INLINE_X86_SPINLOCK) 
-
-// gcc on i386 linux, freebsd, etc. 
-
-// This enables the memory caching on x86 linux.  It is critical for SMP
-// without it the performace is DISMAL!
-static inline unsigned long __xchg(volatile __stl_atomic_t* target, int source)
-{
-
-  // The target is refernce in memory rather than the register
-  // because making a copy of it from memory to the register and
-  // back again would ruin the atomic nature of the call.
-  // the source does not need to be delt with atomicly so it can
-  // be copied about as needed.
-  //
-  // The casting of the source is used to prevent gcc from optimizing 
-  // in such a way that breaks the atomic nature of this call.
-  //
-  __asm__ __volatile__("xchgl %1,%0"
-		       :"=m" (*(volatile long *) target), "=r" (source)
-		       :"m" (*(volatile long *) target), "r" (source) );
-  return source;
-
-  //  The assembly above does the following atomicly:
-  //   int temp=source;
-  //   source=(int)(*target);
-  //   (int)(*target)=temp;
-  // return source
-}
-
-static inline void __inc_and_fetch(volatile __stl_atomic_t* __x)
-{
-  // Referenced in memory rather than register to preserve the atomic nature.
-  //
-  __asm__ __volatile__(
-      "lock; incl %0"
-      :"=m" (*__x)
-      :"m" (*__x) );
-
-  //  The assembly above does the following atomicly:
-  //   ++(int)(*__x);
-
-}
-static inline void __dec_and_fetch(volatile __stl_atomic_t* __x)
-{
-  // Referenced in memory rather than register to preserve the atomic nature.
-  //
-  __asm__ __volatile__(
-      "lock; decl %0"
-      :"=m" (*__x)
-      :"m" (*__x) );
-
-  //  The assembly above does the following atomicly:
-  //   --(int)(*__x);
-}
-
-#  define _STLP_ATOMIC_EXCHANGE(target, newValue) ((__xchg(target, newValue)))
-#  define _STLP_ATOMIC_INCREMENT(__x) __inc_and_fetch(__x)
-#  define _STLP_ATOMIC_DECREMENT(__x) __dec_and_fetch(__x)
-
-# elif defined(_STLP_PTHREADS)
-
-#  include <pthread.h>
-#  ifndef _STLP_USE_PTHREAD_SPINLOCK
-#   if defined(PTHREAD_MUTEX_INITIALIZER) && !defined(_STLP_MUTEX_INITIALIZER)
-#    define _STLP_MUTEX_INITIALIZER = { PTHREAD_MUTEX_INITIALIZER }
-#   endif
-
-//HPUX variants have (on some platforms optional) non-standard "DCE" pthreads impl
-#   if defined(_DECTHREADS_) && (defined(_PTHREAD_USE_D4) || defined(__hpux)) && !defined(_CMA_SUPPRESS_EXTERNALS_)
-#    define _STLP_PTHREAD_ATTR_DEFAULT pthread_mutexattr_default
-#   else
-#    define _STLP_PTHREAD_ATTR_DEFAULT 0
-#   endif
-#  endif // !_STLP_USE_PTHREAD_SPINLOCK 
-
-# elif defined(_STLP_WIN32THREADS)
-#  if !defined (_STLP_WINDOWS_H_INCLUDED) && ! defined (_WINDOWS_H)
-#   if ! (defined ( _STLP_MSVC ) || defined (__BORLANDC__) || defined (__ICL) || defined (__WATCOMC__) || defined (__MINGW32__) || defined (__DMC__))
-#    ifdef _STLP_USE_MFC
-#     include <afx.h>
-#    else
-#     include <windows.h>
-#    endif
-#    define _STLP_WINDOWS_H_INCLUDED
-#   else 
-// This section serves as a replacement for windows.h header for Visual C++
-extern "C" {
-#   if (defined(_M_MRX000) || defined(_M_ALPHA) \
-       || (defined(_M_PPC) && (_MSC_VER >= 1000))) && !defined(RC_INVOKED)
-#    define InterlockedIncrement       _InterlockedIncrement
-#    define InterlockedDecrement       _InterlockedDecrement
-#    define InterlockedExchange        _InterlockedExchange
-#    define _STLP_STDCALL
-#   else
-#    ifdef _MAC
-#     define _STLP_STDCALL _cdecl
-#    else
-#     define _STLP_STDCALL __stdcall
-#    endif
-#   endif
-
-#if (_MSC_VER >= 1300) || defined (_STLP_NEW_PLATFORM_SDK)
-_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedIncrement(long volatile *);
-_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedDecrement(long volatile *);
-_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedExchange(long volatile *, long);
-#else
-  // boris : for the latest SDK, you may actually need the other version of the declaration (above)
-  // even for earlier VC++ versions. There is no way to tell SDK versions apart, sorry ...
-_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedIncrement(long*);
-_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedDecrement(long*);
-_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedExchange(long*, long);
-#endif
-
-_STLP_IMPORT_DECLSPEC void _STLP_STDCALL Sleep(unsigned long);
-_STLP_IMPORT_DECLSPEC void _STLP_STDCALL OutputDebugStringA( const char* lpOutputString );
-
-#ifdef _STLP_DEBUG
-typedef unsigned long DWORD;
-_STLP_IMPORT_DECLSPEC DWORD _STLP_STDCALL GetCurrentThreadId();
-#endif /* _STLP_DEBUG */
-
-#    if defined (InterlockedIncrement)
-#     pragma intrinsic(_InterlockedIncrement)
-#     pragma intrinsic(_InterlockedDecrement)
-#     pragma intrinsic(_InterlockedExchange)
-#    endif
-} /* extern "C" */
-
-#   endif /* STL_MSVC */
-
-#   define _STLP_WINDOWS_H_INCLUDED
-
-#  endif /* _STLP_WIN32 */
-
-#  ifndef _STLP_ATOMIC_INCREMENT
-#   define _STLP_ATOMIC_INCREMENT(__x)           InterlockedIncrement((long*)__x)
-#   define _STLP_ATOMIC_DECREMENT(__x)           InterlockedDecrement((long*)__x)
-#   define _STLP_ATOMIC_EXCHANGE(__x, __y)       InterlockedExchange((long*)__x, (long)__y)
-#  endif
-# elif defined(__DECC) || defined(__DECCXX)
-#  include <machine/builtins.h>
-#  define _STLP_ATOMIC_EXCHANGE __ATOMIC_EXCH_LONG
-#  define _STLP_ATOMIC_INCREMENT(__x) __ATOMIC_ADD_LONG(__x, 1)
-#  define _STLP_ATOMIC_DECREMENT(__x) __ATOMIC_ADD_LONG(__x, -1)
-# elif defined(_STLP_SPARC_SOLARIS_THREADS)
-#  include <stl/_sparc_atomic.h>
-# elif defined (_STLP_UITHREADS)
-// this inclusion is potential hazard to bring up all sorts
-// of old-style headers. Let's assume vendor already know how
-// to deal with that.
-#  include <ctime>
-# if defined (_STLP_USE_NAMESPACES) && ! defined (_STLP_VENDOR_GLOBAL_CSTD)
-using _STLP_VENDOR_CSTD::time_t;
-# endif
-#  include <synch.h>
-#  include <cstdio>
-#  include <stl/_cwchar.h>
-# elif defined (_STLP_BETHREADS)
-#  include <OS.h>
-#include <cassert>
-#include <stdio.h>
-#  define _STLP_MUTEX_INITIALIZER = { 0 }
-#elif defined(_STLP_OS2THREADS)
-# ifdef __GNUC__
-#  define INCL_DOSSEMAPHORES
-#  include <os2.h>
-# else
-  // This section serves to replace os2.h for VisualAge C++
-  typedef unsigned long ULONG;
-  #ifndef __HEV__  /* INCL_SEMAPHORE may also define HEV */
-    #define __HEV__
-    typedef ULONG HEV;
-    typedef HEV*  PHEV;
-  #endif
-  typedef ULONG APIRET;
-  typedef ULONG HMTX;
-  typedef HMTX*  PHMTX;
-  typedef const char*  PCSZ;
-  typedef ULONG BOOL32;
-  APIRET _System DosCreateMutexSem(PCSZ pszName, PHEV phev, ULONG flAttr, BOOL32 fState);
-  APIRET _System DosRequestMutexSem(HMTX hmtx, ULONG ulTimeout);
-  APIRET _System DosReleaseMutexSem(HMTX hmtx);
-  APIRET _System DosCloseMutexSem(HMTX hmtx);
-# define _STLP_MUTEX_INITIALIZER = { 0 };
-#  endif /* GNUC */
-# endif
-
-# ifndef _STLP_MUTEX_INITIALIZER
-#   if defined(_STLP_ATOMIC_EXCHANGE)
-// we are using our own spinlock. 
-#     define _STLP_MUTEX_INITIALIZER = { 0 }
-#   elif defined(_STLP_UITHREADS)
-// known case
-#     define _STLP_MUTEX_INITIALIZER = { DEFAULTMUTEX }
-#   else
-// we do not have static initializer available. therefore, on-demand synchronization is needed.
-#     define _STLP_MUTEX_INITIALIZER
-#     define _STLP_MUTEX_NEEDS_ONDEMAND_INITIALIZATION
-#   endif
-# endif
-
-_STLP_BEGIN_NAMESPACE
-
-#ifndef _STLP_USE_PTHREAD_SPINLOCK
-// Helper struct.  This is a workaround for various compilers that don't
-// handle static variables in inline functions properly.
-template <int __inst>
-struct _STLP_mutex_spin {
-  enum { __low_max = 30, __high_max = 1000 };
-  // Low if we suspect uniprocessor, high for multiprocessor.
-  static unsigned __max;
-  static unsigned __last;
-  static void _STLP_CALL _M_do_lock(volatile __stl_atomic_t* __lock);
-  static void _STLP_CALL _S_nsec_sleep(int __log_nsec);
-};
-#endif // !_STLP_USE_PTHREAD_SPINLOCK
-
-
-// Locking class.  Note that this class *does not have a constructor*.
-// It must be initialized either statically, with _STLP_MUTEX_INITIALIZER,
-// or dynamically, by explicitly calling the _M_initialize member function.
-// (This is similar to the ways that a pthreads mutex can be initialized.)
-// There are explicit member functions for acquiring and releasing the lock.
-
-// There is no constructor because static initialization is essential for
-// some uses, and only a class aggregate (see section 8.5.1 of the C++
-// standard) can be initialized that way.  That means we must have no
-// constructors, no base classes, no virtual functions, and no private or
-// protected members.
-
-// For non-static cases, clients should use  _STLP_mutex.
-
-struct _STLP_CLASS_DECLSPEC _STLP_mutex_base
-{
-#if defined(_STLP_ATOMIC_EXCHANGE) || defined(_STLP_SGI_THREADS)
-  // It should be relatively easy to get this to work on any modern Unix.
-  volatile __stl_atomic_t _M_lock;
-#endif
-
-#ifdef _STLP_THREADS
-
-# ifdef _STLP_ATOMIC_EXCHANGE
-  inline void _M_initialize() { _M_lock=0; }
-  inline void _M_destroy() {}
-
-  void _M_acquire_lock() {
-    _STLP_mutex_spin<0>::_M_do_lock(&_M_lock);
-  }
-
-  inline void _M_release_lock() {
-    volatile __stl_atomic_t* __lock = &_M_lock;
-#  if defined(_STLP_SGI_THREADS) && defined(__GNUC__) && __mips >= 3
-        asm("sync");
-        *__lock = 0;
-#  elif defined(_STLP_SGI_THREADS) && __mips >= 3 \
-	 && (defined (_ABIN32) || defined(_ABI64))
-        __lock_release(__lock);
-#  elif defined (_STLP_SPARC_SOLARIS_THREADS)
-#   if defined (__WORD64) || defined (__arch64__) || defined (__sparcv9) || defined (__sparcv8plus)
-	asm("membar #StoreStore ; membar #LoadStore");
-#   else
-	asm(" stbar ");
-#   endif
-        *__lock = 0;	
-#  else
-        *__lock = 0;
-        // This is not sufficient on many multiprocessors, since
-        // writes to protected variables and the lock may be reordered.
-#  endif
-  }
-# elif defined(_STLP_PTHREADS)
-#  ifdef _STLP_USE_PTHREAD_SPINLOCK
-  pthread_spinlock_t _M_lock;
-  inline void _M_initialize() { pthread_spin_init( &_M_lock, 0 ); }
-  inline void _M_destroy() { pthread_spin_destroy( &_M_lock ); }
-
-  inline void _M_acquire_lock() { 
-    // we do not care about race conditions here : there is only one thread at this point 
-    if(!_M_lock) pthread_spin_init( &_M_lock, 0 );
-
-    // fbp: here, initialization on demand should happen before the lock
-    // we use simple strategy as we are sure this only happens on initialization
-    pthread_spin_lock( &_M_lock );
-  }
-
-  inline void _M_acquire_lock_nodemand() { 
-    pthread_spin_lock( &_M_lock ); 
-  }
-  inline void _M_release_lock() { pthread_spin_unlock( &_M_lock ); }
-#  else // !_STLP_USE_PTHREAD_SPINLOCK
-  pthread_mutex_t _M_lock;
-
-  inline void _M_initialize() {
-    pthread_mutex_init(&_M_lock,_STLP_PTHREAD_ATTR_DEFAULT);
-  }
-  inline void _M_destroy() {
-    pthread_mutex_destroy(&_M_lock);
-  }
-  inline void _M_acquire_lock_nodemand() { 
-    pthread_mutex_lock(&_M_lock);
-  }
-
-  inline void _M_acquire_lock() { 
-#    if defined (__hpux) && !defined (PTHREAD_MUTEX_INITIALIZER)
-      if (!_M_lock.field1)  _M_initialize();
-#    endif
-     pthread_mutex_lock(&_M_lock);
-  }
-  inline void _M_release_lock() { pthread_mutex_unlock(&_M_lock); }
-#  endif // !_STLP_USE_PTHREAD_SPINLOCK
-  
-# elif defined (_STLP_UITHREADS)
-  mutex_t _M_lock;
-  inline void _M_initialize() {
-    mutex_init(&_M_lock,0,NULL);	
-  }
-  inline void _M_destroy() {
-    mutex_destroy(&_M_lock);
-  }
-  inline void _M_acquire_lock() { mutex_lock(&_M_lock); }
-  inline void _M_release_lock() { mutex_unlock(&_M_lock); }
-
-# elif defined(_STLP_OS2THREADS)
-  HMTX _M_lock;
-  inline void _M_initialize() { DosCreateMutexSem(NULL, &_M_lock, 0, false); }
-  inline void _M_destroy() { DosCloseMutexSem(_M_lock); }
-  inline void _M_acquire_lock_nodemand() {
-    DosRequestMutexSem(_M_lock, SEM_INDEFINITE_WAIT);
-  }  
-  inline void _M_acquire_lock() {
-    if(!_M_lock) _M_initialize();
-    DosRequestMutexSem(_M_lock, SEM_INDEFINITE_WAIT);
-  }
-  inline void _M_release_lock() { DosReleaseMutexSem(_M_lock); }
-# elif defined(_STLP_BETHREADS)
-  sem_id sem;
-  inline void _M_initialize() 
-  {
-     sem = create_sem(1, "STLPort");
-     assert(sem > 0);
-  }
-  inline void _M_destroy() 
-  {
-     int t = delete_sem(sem);
-     assert(t == B_NO_ERROR);
-  }
-  inline void _M_acquire_lock_nodemand()
-  {
-    status_t t;
-    t = acquire_sem(sem);
-    assert(t == B_NO_ERROR);
-  }
-  inline void _M_acquire_lock();
-  inline void _M_release_lock() 
-  {
-     status_t t = release_sem(sem);
-     assert(t == B_NO_ERROR);
-  }
-# else		//*ty 11/24/2001 - added configuration check
-#  error "Unknown thread facility configuration"
-# endif
-#else /* No threads */
-  inline void _M_initialize() {}
-  inline void _M_destroy() {}
-  inline void _M_acquire_lock() {}
-  inline void _M_release_lock() {}
-#endif // _STLP_PTHREADS
-};
-
-
-#if defined (_STLP_THREADS) && defined (_STLP_MUTEX_NEEDS_ONDEMAND_INITIALIZATION)
-// for use in _STLP_mutex, our purposes do not require ondemand initialization
-// also, mutex_base may use some hacks to determine uninitialized state by zero data, which only works for globals.
-class _STLP_CLASS_DECLSPEC _STLP_mutex_nodemand : public _STLP_mutex_base {
-  inline void _M_acquire_lock() { 
-    _M_acquire_lock_nodemand();
-  }
-};
-#else
-typedef _STLP_mutex_base _STLP_mutex_nodemand;
-#endif
-
-
-// Locking class.  The constructor initializes the lock, the destructor destroys it.
-// Well - behaving class, does not need static initializer
-class _STLP_CLASS_DECLSPEC _STLP_mutex : public _STLP_mutex_nodemand {
-  public:
-    inline _STLP_mutex () { _M_initialize(); }
-    inline ~_STLP_mutex () { _M_destroy(); }
-  private:
-    _STLP_mutex(const _STLP_mutex&);
-    void operator=(const _STLP_mutex&);
-};
-
-#if 0 /* def _STLP_DEBUG */
-/*
- * Recursive Safe locking class.
-*/
-# ifndef _STLP_THREADS
-class _STLP_mutex_RS
-{};
-# else
-class _STLP_CLASS_DECLSPEC _STLP_mutex_RS : public _STLP_mutex
-{
-  public:
-    _STLP_mutex_RS()
-      : _count( 0 )
-#  if defined(_STLP_UITHREADS)
-        ,_id( __STATIC_CAST(thread_t,-1) )
-#  elif defined(_STLP_PTHREADS)
-#   if !defined(__FreeBSD__) && !defined(__DECCXX)
-        ,_id( __STATIC_CAST(pthread_t,-1) )
-#   else
-        ,_id( __STATIC_CAST(pthread_t,0) )
-#   endif /*__FreeBSD__*/
-#  elif defined(__FIT_NOVELL_THREADS)
-        ,_id( -1 )
-#  elif defined(_STLP_WIN32THREADS)
-        ,_id( NULL )
-#  else
-#   error "New _STLP_mutex_RS class not yet ported to this platform"
-#  endif
-    {}
-
-    ~_STLP_mutex_RS()
-    {}
-
-    void _M_acquire_lock() {
-#  if defined(_STLP_PTHREADS)
-      pthread_t _c_id = pthread_self();
-#  elif defined(_STLP_UITHREADS)
-      thread_t _c_id = thr_self();
-#  elif defined(__FIT_NOVELL_THREADS)
-      int _c_id = GetThreadID();
-#  elif defined(_STLP_WIN32THREADS)
-      DWORD _c_id = GetCurrentThreadId();
-#  endif
-      if ( _c_id == _id ) {
-        ++_count;
-        return;
-      }
-      _STLP_mutex::_M_acquire_lock();
-      _id = _c_id;
-      ++_count;
-    }
-
-    void _M_release_lock() {
-      if ( --_count == 0 ) {
-#  if defined(_STLP_UITHREADS)
-        _id = __STATIC_CAST(thread_t,-1);
-#  elif defined(_STLP_PTHREADS)
-#   if !defined(__FreeBSD__) && !defined(__DECCXX)
-        _id =  __STATIC_CAST(pthread_t,-1);
-#   else
-        _id =  __STATIC_CAST(pthread_t,0);
-#   endif /*__FreeBSD__*/
-#  elif defined(__FIT_NOVELL_THREADS)
-        _id = -1;
-#  elif defined(_STLP_WIN32THREADS)
-        _id = NULL;
-#  endif
-        _STLP_mutex::_M_release_lock();
-      }
-    }
-
-  protected:
-    unsigned int _count;
-
-#  if defined(_STLP_PTHREADS)
-    pthread_t _id;
-#  elif defined(_STLP_UITHREADS)
-    thread_t  _id;
-#  elif defined(__FIT_NOVELL_THREADS)
-    int _id;
-#  elif defined(_STLP_WIN32THREADS)
-    DWORD _id;
-#  endif
-};
-
-# endif /* _STLP_THREADS */
-
-#endif /* OBSOLETE, _STLP_DEBUG */
-
-
-/*
- * Class _Refcount_Base provides a type, __stl_atomic_t, a data member,
- * _M_ref_count, and member functions _M_incr and _M_decr, which perform
- * atomic preincrement/predecrement.  The constructor initializes 
- * _M_ref_count.
- */
-struct _STLP_CLASS_DECLSPEC _Refcount_Base
-{
-  // The data member _M_ref_count
-  volatile __stl_atomic_t _M_ref_count;
-
-# if !defined (_STLP_ATOMIC_EXCHANGE)
-  _STLP_mutex _M_mutex;
-# endif
-
-  // Constructor
-  _Refcount_Base(__stl_atomic_t __n) : _M_ref_count(__n) {}
-
-  // _M_incr and _M_decr
-# if defined (_STLP_THREADS) && defined (_STLP_ATOMIC_EXCHANGE)
-   void _M_incr() { _STLP_ATOMIC_INCREMENT((__stl_atomic_t*)&_M_ref_count); }
-   void _M_decr() { _STLP_ATOMIC_DECREMENT((__stl_atomic_t*)&_M_ref_count); }
-# elif defined(_STLP_THREADS)
-  void _M_incr() {
-    _M_mutex._M_acquire_lock();
-    ++_M_ref_count;
-    _M_mutex._M_release_lock();
-  }
-  void _M_decr() {
-    _M_mutex._M_acquire_lock();
-    --_M_ref_count;
-    _M_mutex._M_release_lock();
-  }
-# else  /* No threads */
-  void _M_incr() { ++_M_ref_count; }
-  void _M_decr() { --_M_ref_count; }
-# endif
-};
-
-// Atomic swap on unsigned long
-// This is guaranteed to behave as though it were atomic only if all
-// possibly concurrent updates use _Atomic_swap.
-// In some cases the operation is emulated with a lock.
-# if defined (_STLP_THREADS)
-#  ifdef _STLP_ATOMIC_EXCHANGE
-inline __stl_atomic_t _Atomic_swap(volatile __stl_atomic_t * __p, __stl_atomic_t __q) {
-  return (__stl_atomic_t) _STLP_ATOMIC_EXCHANGE(__p,__q);
-}
-#  elif defined(_STLP_PTHREADS) || defined (_STLP_UITHREADS) || defined (_STLP_OS2THREADS) || defined(_STLP_USE_PTHREAD_SPINLOCK)
-// We use a template here only to get a unique initialized instance.
-template<int __dummy>
-struct _Swap_lock_struct {
-  static _STLP_STATIC_MUTEX _S_swap_lock;
-};
-
-
-// This should be portable, but performance is expected
-// to be quite awful.  This really needs platform specific
-// code.
-inline __stl_atomic_t _Atomic_swap(volatile __stl_atomic_t * __p, __stl_atomic_t __q) {
-  _Swap_lock_struct<0>::_S_swap_lock._M_acquire_lock();
-  __stl_atomic_t __result = *__p;
-  *__p = __q;
-  _Swap_lock_struct<0>::_S_swap_lock._M_release_lock();
-  return __result;
-}
-#  endif // _STLP_PTHREADS || _STLP_UITHREADS || _STLP_OS2THREADS || _STLP_USE_PTHREAD_SPINLOCK
-# else // !_STLP_THREADS
-/* no threads */
-static inline __stl_atomic_t  _STLP_CALL
-_Atomic_swap(volatile __stl_atomic_t * __p, __stl_atomic_t __q) {
-  __stl_atomic_t __result = *__p;
-  *__p = __q;
-  return __result;
-}
-# endif // _STLP_THREADS
-
-// A locking class that uses _STLP_STATIC_MUTEX.  The constructor takes
-// a reference to an _STLP_STATIC_MUTEX, and acquires a lock.  The destructor
-// releases the lock.
-
-struct _STLP_CLASS_DECLSPEC _STLP_auto_lock
-{
-  _STLP_STATIC_MUTEX& _M_lock;
-  
-  _STLP_auto_lock(_STLP_STATIC_MUTEX& __lock) : _M_lock(__lock)
-    { _M_lock._M_acquire_lock(); }
-  ~_STLP_auto_lock() { _M_lock._M_release_lock(); }
-
-private:
-  void operator=(const _STLP_auto_lock&);
-  _STLP_auto_lock(const _STLP_auto_lock&);
-};
-
-typedef _STLP_auto_lock _STLP_mutex_lock;
-
-#ifdef _STLP_BETHREADS
-
-template <int __inst>
-struct _STLP_beos_static_lock_data
-{
-	static bool is_init;
-	struct mutex_t : public _STLP_mutex
-	{
-		mutex_t()
-		{
-			_STLP_beos_static_lock_data<0>::is_init = true;
-		}
-		~mutex_t()
-		{
-			_STLP_beos_static_lock_data<0>::is_init = false;
-		}
-	};
-	static mutex_t mut;
-};
-
-template <int __inst>
-bool _STLP_beos_static_lock_data<__inst>::is_init = false;
-template <int __inst>
-typename _STLP_beos_static_lock_data<__inst>::mutex_t _STLP_beos_static_lock_data<__inst>::mut;
-
-
-inline void _STLP_mutex_base::_M_acquire_lock() 
-{
-	if(sem == 0)
-	{
-		// we need to initialise on demand here
-		// to prevent race conditions use our global
-		// mutex if it's available:
-		if(_STLP_beos_static_lock_data<0>::is_init)
-		{
-			_STLP_auto_lock al(_STLP_beos_static_lock_data<0>::mut);
-			if(sem == 0) _M_initialize();
-		}
-		else
-		{
-			// no lock available, we must still be
-			// in startup code, THERE MUST BE ONE THREAD
-			// ONLY active at this point.
-			_M_initialize();
-		}
-	}
-	_M_acquire_lock_nodemand();
-}
-
-#endif
-
-_STLP_END_NAMESPACE
-
-# if !defined (_STLP_LINK_TIME_INSTANTIATION)
-#  include <stl/_threads.c>
-# endif
-
-#endif /* _STLP_INTERNAL_THREADS_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/stl/_time_facets.c b/src/STLport/stl/_time_facets.c
deleted file mode 100644
index 5f58deb..0000000
--- a/src/STLport/stl/_time_facets.c
+++ /dev/null
@@ -1,497 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-#ifndef _STLP_TIME_FACETS_C
-#define _STLP_TIME_FACETS_C
-
-#ifndef _STLP_INTERNAL_TIME_FACETS_H
-# include <stl/_time_facets.h>
-#endif
-
-#if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION)
-
-#ifndef _STLP_INTERNAL_NUM_PUT_H
-# include <stl/_num_put.h>
-#endif
-
-#ifndef _STLP_INTERNAL_NUM_GET_H
-# include <stl/_num_get.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-//----------------------------------------------------------------------
-// Declarations of static template members.
-# if ( _STLP_STATIC_TEMPLATE_DATA > 0 )
-
-template <class _CharT, class _InputIterator>
-locale::id time_get<_CharT, _InputIterator>::id;
-
-template <class _CharT, class _OutputIterator>
-locale::id time_put<_CharT, _OutputIterator>::id;
-
-# else /* ( _STLP_STATIC_TEMPLATE_DATA > 0 ) */
-
-typedef time_get<char, const char*> time_get_char;
-typedef time_get<char, char*> time_get_char_2;
-typedef time_get<char, istreambuf_iterator<char, char_traits<char> > > time_get_char_3;
-typedef time_put<char, const char*> time_put_char;
-typedef time_put<char, char*> time_put_char_2;
-typedef time_put<char, ostreambuf_iterator<char, char_traits<char> > > time_put_char_3;
-
-__DECLARE_INSTANCE(locale::id, time_get_char::id, );
-__DECLARE_INSTANCE(locale::id, time_get_char_2::id, );
-__DECLARE_INSTANCE(locale::id, time_get_char_3::id, );
-__DECLARE_INSTANCE(locale::id, time_put_char::id, );
-__DECLARE_INSTANCE(locale::id, time_put_char_2::id, );
-__DECLARE_INSTANCE(locale::id, time_put_char_3::id, );
-
-# ifndef _STLP_NO_WCHAR_T
-
-typedef time_get<wchar_t, const wchar_t*> time_get_wchar_t;
-typedef time_get<wchar_t, wchar_t*> time_get_wchar_t_2;
-typedef time_get<wchar_t, istreambuf_iterator<wchar_t, char_traits<wchar_t> > > time_get_wchar_t_3;
-typedef time_put<wchar_t, const wchar_t*> time_put_wchar_t;
-typedef time_put<wchar_t, wchar_t*> time_put_wchar_t_2;
-typedef time_put<wchar_t, ostreambuf_iterator<wchar_t, char_traits<wchar_t> > > time_put_wchar_t_3;
-
-__DECLARE_INSTANCE(locale::id, time_get_wchar_t::id, );
-__DECLARE_INSTANCE(locale::id, time_get_wchar_t_2::id, );
-__DECLARE_INSTANCE(locale::id, time_get_wchar_t_3::id, );
-__DECLARE_INSTANCE(locale::id, time_put_wchar_t::id, );
-__DECLARE_INSTANCE(locale::id, time_put_wchar_t_2::id, );
-__DECLARE_INSTANCE(locale::id, time_put_wchar_t_3::id, );
-
-# endif
-
-# endif /* ( _STLP_STATIC_TEMPLATE_DATA > 0 ) */
-
-template <class _InIt, class _RAIt, class _DiffType>
-_RAIt _STLP_CALL
-__match(_InIt& __first, _InIt& __last, _RAIt __name, _RAIt __name_end, _DiffType*) {
-  typedef _DiffType difference_type;
-  difference_type __n = __name_end - __name;
-  size_t __max_pos = 0;
-  difference_type __i;
-  difference_type __pos = 0;
-  difference_type __check_count = __n;
-  bool __do_check[_MAXNAMES];
-  _RAIt __matching_name[_MAX_NAME_LENGTH];
-
-  for (__i = 0; __i < __n; ++__i)
-    __max_pos = (max)(__max_pos,  __name[__i].size());
-
-  for (__i = 0; __i < _MAXNAMES; ++__i)
-    __do_check[__i] = true;
-
-
-
-  for (__i = 0; __i < _MAX_NAME_LENGTH; ++__i)
-    __matching_name[__i] = __name_end;
-
-  while (__first != __last) {
-    for (__i = 0; __i < __n; ++__i)
-      if (__do_check[__i])
-        if (*__first == __name[__i][__pos]) {
-          if (__pos == _DiffType(__name[__i].size()) - 1) {
-            __do_check[__i] = 0;
-            __matching_name[__pos+1] = __name + __i;
-            --__check_count;
-            if (__check_count == 0) {
-              ++__first; 
-	      return __name + __i;
-	    }
-          }
-        }
-        else {
-          __do_check[__i] = 0;
-          --__check_count;
-          if (__check_count == 0) 
-            return __matching_name[__pos];
-        }
-
-    ++__first; ++__pos;
-  }
-
-  return __matching_name[__pos];
-}
-
-template <class _InIt, class _RAIt>
-_RAIt _STLP_CALL
-__match(_InIt& __first, _InIt& __last, _RAIt __name, _RAIt __name_end) {
-  return __match((_InIt&)__first, (_InIt&)__last, __name, __name_end, _STLP_DISTANCE_TYPE(__name, _InIt));
-}
-
-// __get_formatted_time reads input that is assumed to be formatted
-// according to the rules for the C strftime function (C standard,
-// 7.12.3.5).  This function is used to implement the do_get_time
-// and do_get_date virtual functions, which depend on the locale
-// specifications for the time and day formats respectively.
-// Note the catchall default case, intended mainly for the '%Z'
-// format designator, which does not make sense here since the
-// representation of timezones is not part of the locale.
-//
-// The case branches are implemented either by doing a match using
-// the appopriate name table or by doing a __get_integer_nogroup.
-//
-// 'y' format is assumed to mean that the input represents years
-// since 1900.  That is, 2002 should be represented as 102.  There
-// is no century-guessing.
-//
-// The match is successful if and only if the second component of the
-// return value is format_end.
-
-// Note that the antepenultimate parameter is being used only to determine
-// the correct overloading for the calls to __get_integer_nogroup.
-
-template <class _InIt1, class _InIt2 /* , class _Ch */ >
-_InIt2 _STLP_CALL
-__get_formatted_time _STLP_WEAK (_InIt1 __first,  _InIt1 __last,
-                     _InIt2 __format, _InIt2 __format_end,
-				 /* _Ch, */ const _Time_Info& __table,
-		     ios_base::iostate& __err,
-                     tm*         __t) {
-  while(__first != __last && __format != __format_end) {
-    if (*__format == '%') {
-      ++__format;
-      char __c = *__format;
-      switch (__c) {
-        case 'a': {
-          const string* __pr =
-            __match(__first, __last,
-		    (string*)__table._M_dayname + 0 , (string*)__table._M_dayname + 7);
-            if (__pr == (string*)__table._M_dayname + 7)
-              return __format;
-            __t->tm_wday = (int)(__pr - (string*)__table._M_dayname);
-            break;
-        }
-
-        case 'A': {
-          const string* __pr =
-            __match(__first, __last,
-		    (string*)__table._M_dayname + 7, (string*)__table._M_dayname + 14);
-            if (__pr == (string*)__table._M_dayname + 14)
-              return __format;
-            __t->tm_wday = (int)(__pr - (string*)__table._M_dayname - 7);
-            break;
-        }
-
-        case 'b': {
-          const string* __pr =
-            __match(__first, __last,
-		    (string*)__table._M_monthname + 0, (string*)__table._M_monthname + 12);
-            if (__pr == (string*)__table._M_monthname + 12)
-              return __format;
-            __t->tm_mon = (int)(__pr - (string*)__table._M_monthname);
-            break;
-        }
-
-        case 'B': {
-          const string* __pr =
-            __match(__first, __last,
-		    (string*)__table._M_monthname + 12, (string*)__table._M_monthname + 24);
-            if (__pr == (string*)__table._M_monthname + 24)
-              return __format;
-            __t->tm_mon = (int)(__pr - (string*)__table._M_monthname - 12);
-            break;
-        }
-
-        case 'd': {
-          bool __pr =
-            __get_decimal_integer(__first, __last, __t->tm_mday);
-          if (!__pr || __t->tm_mday < 1 || __t->tm_mday > 31) {
-	    __err |= ios_base::failbit;
-            return __format;
-	  }
-          break;
-        }
-        
-        case 'H': case 'I': {
-          bool __pr =
-            __get_decimal_integer(__first, __last, __t->tm_hour);
-            if (!__pr)
-              return __format;
-            break;
-        }
-
-        case 'j': {
-          bool __pr =
-            __get_decimal_integer(__first, __last, __t->tm_yday);
-          if (!__pr)
-            return __format;
-          break;
-        }
-
-        case 'm': {
-          bool __pr =
-            __get_decimal_integer(__first, __last, __t->tm_mon);
-	    --__t->tm_mon;
-          if (!__pr || __t->tm_mon < 0 || __t->tm_mon > 11) {
-	    __err |= ios_base::failbit;
-            return __format;
-	  }
-          break;
-        }
-
-        case 'M': {
-          bool __pr =
-            __get_decimal_integer(__first, __last, __t->tm_min);
-          if (!__pr)
-            return __format;
-          break;
-        }
-
-        case 'p': {
-          const string* __pr =
-            __match(__first, __last, (string*)__table._M_am_pm + 0, (string*)__table._M_am_pm + 2);
-          if (__pr == (string*)__table._M_am_pm + 2)
-            return __format;
-          if (__pr == (string*)__table._M_am_pm + 1)
-            __t->tm_hour += 12;
-          break;
-        }
-
-        case 'S': {
-          bool __pr =
-            __get_decimal_integer(__first, __last, __t->tm_sec);
-          if (!__pr)
-            return __format;
-          break;
-        }
-
-	case 'y': {
-	  bool __pr =
-	    __get_decimal_integer(__first, __last, __t->tm_year);
-	  if (!__pr)
-	    return __format;
-	  break;
-        }
-
-        case 'Y': {
-	  bool __pr =
-            __get_decimal_integer(__first, __last, __t->tm_year);
-          __t->tm_year -= 1900;
-          if (!__pr)
-            return __format;
-          break;
-        }
-
-        default:
-          break;
-      }
-
-    }
-    else {
-      if (*__first++ != *__format) break;
-    }
-    
-    ++__format;
-  }
-
-  return __format;
-}
-
-template <class _InIt>
-bool _STLP_CALL
-__get_short_or_long_dayname(_InIt& __first, _InIt& __last,
-                            const _Time_Info& __table, tm* __t) {
-  const string* __pr =
-    __match(__first, __last, __table._M_dayname + 0, __table._M_dayname + 14);
-  __t->tm_wday = (int)(__pr - __table._M_dayname) % 7;
-  return __pr != __table._M_dayname + 14;
-}
-
-template <class _InIt>
-bool _STLP_CALL
-__get_short_or_long_monthname(_InIt& __first, _InIt& __last,
-                              const _Time_Info& __table, tm* __t) {
-  const string* __pr =
-    __match(__first, __last, (string*)__table._M_monthname + 0, (string*)__table._M_monthname + 24);
-  __t->tm_mon = (int)(__pr - __table._M_monthname) % 12;
-  return __pr != __table._M_monthname + 24;
-}
-
-# ifndef _STLP_NO_WCHAR_T
-template <class _OuIt>
-_OuIt _STLP_CALL
-__put_time(char * __first, char * __last, _OuIt __out,
-           const ios_base& __s, wchar_t) {
-    const ctype<wchar_t>& __ct = *(ctype<wchar_t>*)__s._M_ctype_facet();
-    wchar_t __wbuf[64];
-    __ct.widen(__first, __last, __wbuf);
-    ptrdiff_t __len = __last - __first;
-    wchar_t * __eend = __wbuf + __len;
-    return copy((wchar_t*)__wbuf, __eend, __out);
-}
-# endif
-
-template <class _Ch, class _InIt>
-_InIt
-time_get<_Ch, _InIt>::do_get_date(_InIt __s, _InIt  __end,
-				  ios_base& /* __str */, ios_base::iostate&  __err,
-				  tm* __t) const 
-{
-  typedef string::const_iterator string_iterator;
-
-  string_iterator __format
-    = _M_timeinfo._M_date_format.begin();
-  string_iterator __format_end
-    = _M_timeinfo._M_date_format.end();
-  
-  string_iterator __result
-    = __get_formatted_time(__s, __end, __format, __format_end,
-                           /* _Ch() ,*/  _M_timeinfo, __err, __t);
-  if (__result == __format_end)
-    __err = ios_base::goodbit;
-  else {
-    __err = ios_base::failbit;
-    if (__s == __end)
-      __err |= ios_base::eofbit;
-  }
-  return __s;
-}
-
-template <class _Ch, class _InIt>
-_InIt
-time_get<_Ch, _InIt>::do_get_time(_InIt __s, _InIt  __end,
-				  ios_base& /* __str */, ios_base::iostate&  __err,
-				  tm* __t) const 
-{
-  typedef string::const_iterator string_iterator;
-  string_iterator __format
-    = _M_timeinfo._M_time_format.begin();
-  string_iterator __format_end
-    = _M_timeinfo._M_time_format.end();
-  
-  string_iterator __result
-    = __get_formatted_time(__s, __end, __format, __format_end,
-			   /* _Ch() , */ _M_timeinfo, __err, __t);
-  __err = __result == __format_end ? ios_base::goodbit 
-    : ios_base::failbit;
-  if (__s == __end)
-    __err |= ios_base::eofbit;
-  return __s;
-}
-
-template <class _Ch, class _InIt>
-_InIt
-time_get<_Ch, _InIt>::do_get_year(_InIt __s, _InIt  __end,
-				  ios_base&, 
-				  ios_base::iostate&  __err,
-				  tm* __t) const
-{
-  
-  if (__s == __end) {
-    __err = ios_base::failbit | ios_base::eofbit;
-    return __s;
-  }
-  
-  bool __pr =  __get_decimal_integer(__s, __end, __t->tm_year);
-  __t->tm_year -= 1900;
-  __err = __pr ? ios_base::goodbit : ios_base::failbit;
-  if (__s == __end)
-    __err |= ios_base::eofbit;
-  
-  return __s;
-}
-
-template <class _Ch, class _InIt>
-_InIt
-time_get<_Ch, _InIt>::do_get_weekday(_InIt __s, _InIt  __end,
-				     ios_base& /* __str */, 
-				     ios_base::iostate&  __err,
-				     tm* __t) const 
-{
-    bool __result =
-      __get_short_or_long_dayname(__s, __end, _M_timeinfo, __t);
-    if (__result)
-      __err = ios_base::goodbit;
-    else {
-      __err = ios_base::failbit;
-      if (__s == __end)
-        __err |= ios_base::eofbit;
-    }
-    return __s;
-}
-
-template <class _Ch, class _InIt>
-_InIt
-time_get<_Ch, _InIt>::do_get_monthname(_InIt __s, _InIt  __end,
-				       ios_base& /* __str */, 
-				       ios_base::iostate&  __err,
-				       tm* __t) const 
-{
-  bool __result =
-    __get_short_or_long_monthname(__s, __end, _M_timeinfo, __t);
-  if (__result)
-    __err = ios_base::goodbit;
-  else {
-    __err = ios_base::failbit;
-    if (__s == __end)
-      __err |= ios_base::eofbit;
-  }
-  return __s;
-}
-
-template<class _Ch, class _OutputIter>
-_OutputIter
-time_put<_Ch,_OutputIter>::put(_OutputIter __s, ios_base& __f, _Ch __fill,
-			       const tm* __tmb,
-			       const _Ch* __pat, const _Ch* __pat_end) const 
-{
-  //  locale __loc = __f.getloc();
-  //  const ctype<_Ch>& _Ct = use_facet<ctype<_Ch> >(__loc); 
-  const ctype<_Ch>& _Ct = *(ctype<_Ch>*)__f._M_ctype_facet(); 
-  while (__pat != __pat_end) {
-    char __c = _Ct.narrow(*__pat, 0);
-    if (__c == '%') {
-      char __mod = 0;
-      ++__pat;
-      __c = _Ct.narrow(*__pat++, 0);
-      if(__c == '#') { // MS extension
-        __mod = __c;
-        __c = _Ct.narrow(*__pat++, 0);
-      }
-      __s = do_put(__s, __f, __fill, __tmb, __c, __mod);
-    }
-    else
-      *__s++ = *__pat++;
-  }
-  return __s;
-}
-
-template<class _Ch, class _OutputIter>
-_OutputIter
-time_put<_Ch,_OutputIter>::do_put(_OutputIter __s, ios_base& __f, _Ch     /* __fill */ ,
-				  const tm* __tmb,
-				  char __format, char __modifier ) const 
-{
-  char __buf[64];
-  char * __iend = __write_formatted_time(__buf, __format, __modifier,
-					 _M_timeinfo, __tmb);
-  //  locale __loc = __f.getloc();
-  return __put_time(__buf, __iend, __s, __f, _Ch());
-}
-
-_STLP_END_NAMESPACE
-
-# endif /* defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) */
-#endif /* _STLP_TIME_FACETS_C */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_time_facets.h b/src/STLport/stl/_time_facets.h
deleted file mode 100644
index 4d777ca..0000000
--- a/src/STLport/stl/_time_facets.h
+++ /dev/null
@@ -1,315 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-// WARNING: This is an internal header file, included by other C++
-// standard library headers.  You should not attempt to use this header
-// file directly.
-
-
-#ifndef _STLP_INTERNAL_TIME_FACETS_H
-#define _STLP_INTERNAL_TIME_FACETS_H
-
-#ifndef _STLP_CTIME
-# include <ctime>                // Needed (for struct tm) by time facets
-#endif
-
-#include <stl/c_locale.h>
-#include <stl/_ios_base.h>
-
-_STLP_BEGIN_NAMESPACE
-
-// Template functions used by time_get
-
-// Matching input against a list of names
-
-// Alphabetic input of the names of months and the names
-// of weekdays requires matching input against a list of names.
-// We use a simple generic algorithm to accomplish this.  This
-// algorithm is not very efficient, especially for longer lists
-// of names, but it probably does not matter for the initial
-// implementation and it may never matter, since we do not expect
-// this kind of input to be used very often.  The algorithm
-// could be improved fairly simply by creating a new list of
-// names still in the running at each iteration.  A more sophisticated
-// approach would be to build a trie to do the matching.
-//
-// We compare each character of the input to the corresponding
-// character of each name on the list that has not been eliminated,
-// either because every character in the name has already been
-// matched, or because some character has not been matched.  We
-// continue only as long as there are some names that have not been
-// eliminated.
-
-// We do not really need a random access iterator (a forward iterator
-// would do), but the extra generality makes the notation clumsier,
-// and we don't really need it.
-
-// We can recognize a failed match by the fact that the second
-// component of the return value will be __name_end.
-
-#define _MAXNAMES        64
-#define _MAX_NAME_LENGTH 64
-
-// Both time_get and time_put need a structure of type _Time_Info
-// to provide names and abbreviated names for months and days,
-// as well as the am/pm designator.  The month and weekday tables
-// have the all the abbreviated names before all the full names.
-// The _Time_Info tables are initialized using the non-template
-// function _Init_timeinfo, which has two overloadings:  one
-// with a single reference parameter for the table to be initialized,
-// and one with a second _Locale_time * parameter.  The first form
-// is called by the default constructor and the second by a special
-// constructor invoked from the _byname subclass constructor to
-// construct the base class.
-
-class _STLP_CLASS_DECLSPEC _Time_Info {
-public:
-  string _M_dayname[14];
-  string _M_monthname[24];
-  string _M_am_pm[2];
-  string _M_time_format;
-  string _M_date_format;
-  string _M_date_time_format;
-  string _M_long_date_format;
-  string _M_long_date_time_format;
-};
-
-void _STLP_CALL _Init_timeinfo(_Time_Info&);
-void _STLP_CALL _Init_timeinfo(_Time_Info&, _Locale_time*);
-
-class _STLP_CLASS_DECLSPEC time_base {
-public:
-  enum dateorder {no_order, dmy, mdy, ymd, ydm};
-};
-
-
-template <class _Ch, __DFL_TMPL_PARAM( _InIt , istreambuf_iterator<_Ch>) >
-class time_get : public locale::facet, public time_base 
-{
-  friend class _Locale;
-
-public:
-  typedef _Ch   char_type;
-  typedef _InIt iter_type;
-
-  explicit time_get(size_t __refs = 0)   : _BaseFacet(__refs) {
-      _Init_timeinfo(_M_timeinfo);
-  }
-  dateorder date_order() const { return do_date_order(); }
-  iter_type get_time(iter_type __s, iter_type  __end, ios_base&  __str,
-                     ios_base::iostate&  __err, tm* __t) const
-    { return do_get_time(__s,  __end,  __str,  __err, __t); }
-  iter_type get_date(iter_type __s, iter_type  __end, ios_base&  __str,
-                     ios_base::iostate&  __err, tm* __t) const
-    { return do_get_date(__s,  __end,  __str,  __err, __t); }
-  iter_type get_weekday(iter_type __s, iter_type  __end, ios_base&  __str,
-                        ios_base::iostate&  __err, tm* __t) const
-    { return do_get_weekday(__s,  __end,  __str,  __err, __t); }
-  iter_type get_monthname(iter_type __s, iter_type  __end, ios_base&  __str,
-                          ios_base::iostate&  __err, tm* __t) const
-    { return do_get_monthname(__s,  __end,  __str,  __err, __t); }
-  iter_type get_year(iter_type __s, iter_type  __end, ios_base&  __str,
-                     ios_base::iostate&  __err, tm* __t) const
-    { return do_get_year(__s,  __end,  __str,  __err, __t); }
-
-  _STLP_STATIC_MEMBER_DECLSPEC static locale::id id;
-
-protected:
-  _Time_Info _M_timeinfo;
-
-  time_get(_Locale_time *, size_t __refs) : _BaseFacet(__refs) {}
-
-  ~time_get() {}
-
-  virtual dateorder do_date_order() const {return no_order;}
-    
-  virtual iter_type do_get_time(iter_type __s, iter_type  __end,
-                                ios_base&, ios_base::iostate&  __err,
-                                tm* __t) const;
-    
-  virtual iter_type do_get_date(iter_type __s, iter_type  __end,
-                                ios_base&, ios_base::iostate& __err,
-                                tm* __t) const;
-
-  virtual iter_type do_get_weekday(iter_type __s, iter_type  __end,
-                                   ios_base&,
-                                   ios_base::iostate& __err,
-                                   tm* __t) const;
-  virtual iter_type do_get_monthname(iter_type __s, iter_type  __end,
-                                     ios_base&,
-                                     ios_base::iostate& __err,
-                                     tm* __t) const;
-  
-  virtual iter_type do_get_year(iter_type __s, iter_type  __end,
-                                ios_base&, ios_base::iostate& __err,
-                                tm* __t) const;
-};
-
-time_base::dateorder _STLP_CALL
-__get_date_order(_Locale_time*);
-_Locale_time* _STLP_CALL __acquire_time(const char* __name);
-void          _STLP_CALL __release_time(_Locale_time* __time);
-
-template <class _Ch, __DFL_TMPL_PARAM( _InIt , istreambuf_iterator<_Ch>) >
-class time_get_byname : public time_get<_Ch, _InIt> 
-{
-public:
-  typedef  time_base::dateorder dateorder;
-  typedef _InIt                 iter_type;
-
-  explicit time_get_byname(const char* __name, size_t __refs = 0)
-    : time_get<_Ch, _InIt>((_Locale_time*) 0, __refs),
-      _M_time(__acquire_time(__name))
-    { _Init_timeinfo(this->_M_timeinfo, this->_M_time); }
-
-protected:
-  ~time_get_byname() { __release_time(_M_time); }
-  dateorder do_date_order() const { return __get_date_order(_M_time); }
-private:
-  _Locale_time* _M_time;
-};
-
-// time_put facet
-
-// For the formats 'x, 'X', and 'c', do_put calls the first form of
-// put with the pattern obtained from _M_timeinfo._M_date_format or
-// _M_timeinfo._M_time_format.
-
-// Helper function:  __  takes a single-character
-// format.  As indicated by the foregoing remark, this will never be
-// 'x', 'X', or 'c'.
-
-char * _STLP_CALL
-__write_formatted_time(char * __buf, char __format, char __modifier,
-                       const _Time_Info& __table, const tm* __t);
-
-template <class _OuIt>
-inline _OuIt _STLP_CALL __put_time(char * __first, char * __last, _OuIt __out,
-                                   const ios_base& /* __loc */, char) {
-    return copy(__first, __last, __out);
-}
-
-# ifndef _STLP_NO_WCHAR_T
-template <class _OuIt>
-_OuIt _STLP_CALL __put_time(char * __first, char * __last, _OuIt __out,
-                            const ios_base& __s, wchar_t);
-# endif
-
-template<class _Ch, __DFL_TMPL_PARAM( _OutputIter , ostreambuf_iterator<_Ch> ) >
-class time_put : public locale::facet, public time_base
-{
-  friend class _Locale;
-public:
-  typedef _Ch      char_type;
-  typedef _OutputIter iter_type;
-
-  explicit time_put(size_t __refs = 0) : _BaseFacet(__refs) {
-    _Init_timeinfo(_M_timeinfo);
-  }
-
-  _OutputIter put(iter_type __s, ios_base& __f, _Ch __fill,
-		  const tm* __tmb,
-		  const _Ch* __pat, const _Ch* __pat_end) const;
-  
-  _OutputIter put(iter_type __s, ios_base& __f, _Ch  __fill,
-		  const tm* __tmb, char __format, char __modifier = 0) const { 
-    return do_put(__s, __f,  __fill, __tmb, __format, __modifier); 
-  }
-  
-  _STLP_STATIC_MEMBER_DECLSPEC static locale::id id;
-  
-protected:
-  _Time_Info _M_timeinfo;
-
-  time_put(_Locale_time* /*__time*/, size_t __refs) : _BaseFacet(__refs) {
-    //    _Init_timeinfo(_M_timeinfo, __time);
-  }
-
-  ~time_put() {}
-  virtual iter_type do_put(iter_type __s, ios_base& __f,
-                           char_type  /* __fill */, const tm* __tmb,
-                           char __format, char /* __modifier */) const;
-};
-
-template <class _Ch, __DFL_TMPL_PARAM( _InIt , ostreambuf_iterator<_Ch> ) >
-class time_put_byname : public time_put<_Ch, _InIt> 
-{
-  friend class _Locale;
-public:
-  typedef time_base::dateorder dateorder;
-  typedef _InIt iter_type;
-  typedef _Ch   char_type;
-
-  explicit time_put_byname(const char * __name, size_t __refs = 0)
-    : time_put<_Ch, _InIt>((_Locale_time*) 0, __refs),
-    _M_time(__acquire_time(__name))
-  { _Init_timeinfo(this->_M_timeinfo, this->_M_time); }
-  
-protected:
-  ~time_put_byname() { __release_time(_M_time); }
-
-private:
-  _Locale_time* _M_time;
-};
-
-# ifdef _STLP_USE_TEMPLATE_EXPORT
-_STLP_EXPORT_TEMPLATE_CLASS time_get<char, istreambuf_iterator<char, char_traits<char> > >;
-_STLP_EXPORT_TEMPLATE_CLASS time_put<char, ostreambuf_iterator<char, char_traits<char> > >;
-// _STLP_EXPORT_TEMPLATE_CLASS time_get<char, const char*>;
-// _STLP_EXPORT_TEMPLATE_CLASS time_put<char, char*>;
-#  ifndef _STLP_NO_WCHAR_T
-_STLP_EXPORT_TEMPLATE_CLASS time_get<wchar_t, istreambuf_iterator<wchar_t, char_traits<wchar_t> > >;
-_STLP_EXPORT_TEMPLATE_CLASS time_put<wchar_t, ostreambuf_iterator<wchar_t, char_traits<wchar_t> > >;
-// _STLP_EXPORT_TEMPLATE_CLASS time_get<wchar_t, const wchar_t*>;
-// _STLP_EXPORT_TEMPLATE_CLASS time_put<wchar_t, wchar_t*>;
-#  endif /* INSTANTIATE_WIDE_STREAMS */
-
-# endif
-
-# if defined (__BORLANDC__) && defined (_RTLDLL)
-inline void _Stl_loc_init_time_facets() {
-  
-  time_get<char, istreambuf_iterator<char, char_traits<char> > >::id._M_index                      = 16;
-  time_get<char, const char*>::id._M_index         = 17;
-  time_put<char, ostreambuf_iterator<char, char_traits<char> > >::id._M_index                      = 18;
-  time_put<char, char*>::id._M_index               = 19;
-  
-# ifndef _STLP_NO_WCHAR_T
-  
-  time_get<wchar_t, istreambuf_iterator<wchar_t, char_traits<wchar_t> > >::id._M_index                   = 35;
-  time_get<wchar_t, const wchar_t*>::id._M_index   = 36;
-  time_put<wchar_t, ostreambuf_iterator<wchar_t, char_traits<wchar_t> > >::id._M_index                   = 37;
-  time_put<wchar_t, wchar_t*>::id._M_index         = 38;
-  
-# endif
-  
-}
-# endif
-
-_STLP_END_NAMESPACE
-
-#if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION)
-#  include <stl/_time_facets.c>
-# endif
-
-#endif /* _STLP_INTERNAL_TIME_FACETS_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
-
diff --git a/src/STLport/stl/_tree.c b/src/STLport/stl/_tree.c
deleted file mode 100644
index eb056fd..0000000
--- a/src/STLport/stl/_tree.c
+++ /dev/null
@@ -1,715 +0,0 @@
-/*
- *
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- * Modified CRP 7/10/00 for improved conformance / efficiency on insert_unique /
- * insert_equal with valid hint -- efficiency is improved all around, and it is
- * should now be standard conforming for complexity on insert point immediately
- * after hint (amortized constant time).
- *
- */
-#ifndef _STLP_TREE_C
-#define _STLP_TREE_C
-
-#ifndef _STLP_INTERNAL_TREE_H
-# include <stl/_tree.h>
-#endif
-
-// fbp: these defines are for outline methods definitions.
-// needed for definitions to be portable. Should not be used in method bodies.
-# if defined  ( _STLP_NESTED_TYPE_PARAM_BUG )
-#  define __iterator__        _Rb_tree_iterator<_Value, _Nonconst_traits<_Value> > 
-#  define __size_type__       size_t
-#  define iterator __iterator__
-# else
-#  define __iterator__  _STLP_TYPENAME_ON_RETURN_TYPE _Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc>::iterator
-#  define __size_type__  _STLP_TYPENAME_ON_RETURN_TYPE _Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc>::size_type
-# endif
-
-#if defined ( _STLP_DEBUG)
-#  define _Rb_tree __WORKAROUND_DBG_RENAME(Rb_tree)
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-# if defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION)
-
-template <class _Dummy> void _STLP_CALL
-_Rb_global<_Dummy>::_Rotate_left(_Rb_tree_node_base* __x, _Rb_tree_node_base*& __root)
-{
-  _Rb_tree_node_base* __y = __x->_M_right;
-  __x->_M_right = __y->_M_left;
-  if (__y->_M_left !=0)
-    __y->_M_left->_M_parent = __x;
-  __y->_M_parent = __x->_M_parent;
-
-  if (__x == __root)
-    __root = __y;
-  else if (__x == __x->_M_parent->_M_left)
-    __x->_M_parent->_M_left = __y;
-  else
-    __x->_M_parent->_M_right = __y;
-  __y->_M_left = __x;
-  __x->_M_parent = __y;
-}
-
-template <class _Dummy> void _STLP_CALL 
-_Rb_global<_Dummy>::_Rotate_right(_Rb_tree_node_base* __x, _Rb_tree_node_base*& __root)
-{
-  _Rb_tree_node_base* __y = __x->_M_left;
-  __x->_M_left = __y->_M_right;
-  if (__y->_M_right != 0)
-    __y->_M_right->_M_parent = __x;
-  __y->_M_parent = __x->_M_parent;
-
-  if (__x == __root)
-    __root = __y;
-  else if (__x == __x->_M_parent->_M_right)
-    __x->_M_parent->_M_right = __y;
-  else
-    __x->_M_parent->_M_left = __y;
-  __y->_M_right = __x;
-  __x->_M_parent = __y;
-}
-
-template <class _Dummy> void _STLP_CALL
-_Rb_global<_Dummy>::_Rebalance(_Rb_tree_node_base* __x, 
-			       _Rb_tree_node_base*& __root)
-{
-  __x->_M_color = _S_rb_tree_red;
-  while (__x != __root && __x->_M_parent->_M_color == _S_rb_tree_red) {
-    if (__x->_M_parent == __x->_M_parent->_M_parent->_M_left) {
-      _Rb_tree_node_base* __y = __x->_M_parent->_M_parent->_M_right;
-      if (__y && __y->_M_color == _S_rb_tree_red) {
-        __x->_M_parent->_M_color = _S_rb_tree_black;
-        __y->_M_color = _S_rb_tree_black;
-        __x->_M_parent->_M_parent->_M_color = _S_rb_tree_red;
-        __x = __x->_M_parent->_M_parent;
-      }
-      else {
-        if (__x == __x->_M_parent->_M_right) {
-          __x = __x->_M_parent;
-          _Rotate_left(__x, __root);
-        }
-        __x->_M_parent->_M_color = _S_rb_tree_black;
-        __x->_M_parent->_M_parent->_M_color = _S_rb_tree_red;
-        _Rotate_right(__x->_M_parent->_M_parent, __root);
-      }
-    }
-    else {
-      _Rb_tree_node_base* __y = __x->_M_parent->_M_parent->_M_left;
-      if (__y && __y->_M_color == _S_rb_tree_red) {
-        __x->_M_parent->_M_color = _S_rb_tree_black;
-        __y->_M_color = _S_rb_tree_black;
-        __x->_M_parent->_M_parent->_M_color = _S_rb_tree_red;
-        __x = __x->_M_parent->_M_parent;
-      }
-      else {
-        if (__x == __x->_M_parent->_M_left) {
-          __x = __x->_M_parent;
-          _Rotate_right(__x, __root);
-        }
-        __x->_M_parent->_M_color = _S_rb_tree_black;
-        __x->_M_parent->_M_parent->_M_color = _S_rb_tree_red;
-        _Rotate_left(__x->_M_parent->_M_parent, __root);
-      }
-    }
-  }
-  __root->_M_color = _S_rb_tree_black;
-}
-
-template <class _Dummy> _Rb_tree_node_base* _STLP_CALL
-_Rb_global<_Dummy>::_Rebalance_for_erase(_Rb_tree_node_base* __z,
-					 _Rb_tree_node_base*& __root,
-					 _Rb_tree_node_base*& __leftmost,
-					 _Rb_tree_node_base*& __rightmost)
-{
-  _Rb_tree_node_base* __y = __z;
-  _Rb_tree_node_base* __x = 0;
-  _Rb_tree_node_base* __x_parent = 0;
-  if (__y->_M_left == 0)     // __z has at most one non-null child. y == z.
-    __x = __y->_M_right;     // __x might be null.
-  else
-    if (__y->_M_right == 0)  // __z has exactly one non-null child. y == z.
-      __x = __y->_M_left;    // __x is not null.
-    else {                   // __z has two non-null children.  Set __y to
-      __y = __y->_M_right;   //   __z's successor.  __x might be null.
-      while (__y->_M_left != 0)
-        __y = __y->_M_left;
-      __x = __y->_M_right;
-    }
-  if (__y != __z) {          // relink y in place of z.  y is z's successor
-    __z->_M_left->_M_parent = __y; 
-    __y->_M_left = __z->_M_left;
-    if (__y != __z->_M_right) {
-      __x_parent = __y->_M_parent;
-      if (__x) __x->_M_parent = __y->_M_parent;
-      __y->_M_parent->_M_left = __x;      // __y must be a child of _M_left
-      __y->_M_right = __z->_M_right;
-      __z->_M_right->_M_parent = __y;
-    }
-    else
-      __x_parent = __y;  
-    if (__root == __z)
-      __root = __y;
-    else if (__z->_M_parent->_M_left == __z)
-      __z->_M_parent->_M_left = __y;
-    else 
-      __z->_M_parent->_M_right = __y;
-    __y->_M_parent = __z->_M_parent;
-    _STLP_STD::swap(__y->_M_color, __z->_M_color);
-    __y = __z;
-    // __y now points to node to be actually deleted
-  }
-  else {                        // __y == __z
-    __x_parent = __y->_M_parent;
-    if (__x) __x->_M_parent = __y->_M_parent;   
-    if (__root == __z)
-      __root = __x;
-    else 
-      if (__z->_M_parent->_M_left == __z)
-        __z->_M_parent->_M_left = __x;
-      else
-        __z->_M_parent->_M_right = __x;
-    if (__leftmost == __z) 
-      if (__z->_M_right == 0)        // __z->_M_left must be null also
-        __leftmost = __z->_M_parent;
-    // makes __leftmost == _M_header if __z == __root
-      else
-        __leftmost = _Rb_tree_node_base::_S_minimum(__x);
-    if (__rightmost == __z)  
-      if (__z->_M_left == 0)         // __z->_M_right must be null also
-        __rightmost = __z->_M_parent;  
-    // makes __rightmost == _M_header if __z == __root
-      else                      // __x == __z->_M_left
-        __rightmost = _Rb_tree_node_base::_S_maximum(__x);
-  }
-  if (__y->_M_color != _S_rb_tree_red) { 
-    while (__x != __root && (__x == 0 || __x->_M_color == _S_rb_tree_black))
-      if (__x == __x_parent->_M_left) {
-        _Rb_tree_node_base* __w = __x_parent->_M_right;
-        if (__w->_M_color == _S_rb_tree_red) {
-          __w->_M_color = _S_rb_tree_black;
-          __x_parent->_M_color = _S_rb_tree_red;
-          _Rotate_left(__x_parent, __root);
-          __w = __x_parent->_M_right;
-        }
-        if ((__w->_M_left == 0 || 
-             __w->_M_left->_M_color == _S_rb_tree_black) && (__w->_M_right == 0 || 
-             __w->_M_right->_M_color == _S_rb_tree_black)) {
-          __w->_M_color = _S_rb_tree_red;
-          __x = __x_parent;
-          __x_parent = __x_parent->_M_parent;
-        } else {
-          if (__w->_M_right == 0 || 
-              __w->_M_right->_M_color == _S_rb_tree_black) {
-            if (__w->_M_left) __w->_M_left->_M_color = _S_rb_tree_black;
-            __w->_M_color = _S_rb_tree_red;
-            _Rotate_right(__w, __root);
-            __w = __x_parent->_M_right;
-          }
-          __w->_M_color = __x_parent->_M_color;
-          __x_parent->_M_color = _S_rb_tree_black;
-          if (__w->_M_right) __w->_M_right->_M_color = _S_rb_tree_black;
-          _Rotate_left(__x_parent, __root);
-          break;
-        }
-      } else {                  // same as above, with _M_right <-> _M_left.
-        _Rb_tree_node_base* __w = __x_parent->_M_left;
-        if (__w->_M_color == _S_rb_tree_red) {
-          __w->_M_color = _S_rb_tree_black;
-          __x_parent->_M_color = _S_rb_tree_red;
-          _Rotate_right(__x_parent, __root);
-          __w = __x_parent->_M_left;
-        }
-        if ((__w->_M_right == 0 || 
-             __w->_M_right->_M_color == _S_rb_tree_black) && (__w->_M_left == 0 || 
-             __w->_M_left->_M_color == _S_rb_tree_black)) {
-          __w->_M_color = _S_rb_tree_red;
-          __x = __x_parent;
-          __x_parent = __x_parent->_M_parent;
-        } else {
-          if (__w->_M_left == 0 || 
-              __w->_M_left->_M_color == _S_rb_tree_black) {
-            if (__w->_M_right) __w->_M_right->_M_color = _S_rb_tree_black;
-            __w->_M_color = _S_rb_tree_red;
-            _Rotate_left(__w, __root);
-            __w = __x_parent->_M_left;
-          }
-          __w->_M_color = __x_parent->_M_color;
-          __x_parent->_M_color = _S_rb_tree_black;
-          if (__w->_M_left) __w->_M_left->_M_color = _S_rb_tree_black;
-          _Rotate_right(__x_parent, __root);
-          break;
-        }
-      }
-    if (__x) __x->_M_color = _S_rb_tree_black;
-  }
-  return __y;
-}
-
-template <class _Dummy> _Rb_tree_node_base* _STLP_CALL
-_Rb_global<_Dummy>::_M_decrement(_Rb_tree_node_base* _M_node)
-{
-  if (_M_node->_M_color == _S_rb_tree_red && _M_node->_M_parent->_M_parent == _M_node)
-    _M_node = _M_node->_M_right;
-  else if (_M_node->_M_left != 0) {
-    _Base_ptr __y = _M_node->_M_left;
-    while (__y->_M_right != 0)
-      __y = __y->_M_right;
-    _M_node = __y;
-  }
-  else {
-    _Base_ptr __y = _M_node->_M_parent;
-    while (_M_node == __y->_M_left) {
-      _M_node = __y;
-      __y = __y->_M_parent;
-    }
-    _M_node = __y;
-  }
-  return _M_node;
-}
-
-template <class _Dummy> _Rb_tree_node_base* _STLP_CALL
-_Rb_global<_Dummy>::_M_increment(_Rb_tree_node_base* _M_node)
-{
-  if (_M_node->_M_right != 0) {
-    _M_node = _M_node->_M_right;
-    while (_M_node->_M_left != 0)
-      _M_node = _M_node->_M_left;
-  }
-  else {
-    _Base_ptr __y = _M_node->_M_parent;
-    while (_M_node == __y->_M_right) {
-      _M_node = __y;
-      __y = __y->_M_parent;
-    }
-    if (_M_node->_M_right != __y)
-      _M_node = __y;
-  }
-  return _M_node;
-}
-
-#endif /* defined (__BUILDING_STLPORT) || ! defined (_STLP_OWN_IOSTREAMS) */
-
-
-template <class _Key, class _Value, class _KeyOfValue, 
-          class _Compare, class _Alloc> _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc> ::operator=(const _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& __x)
-{
-  if (this != &__x) {
-                                // Note that _Key may be a constant type.
-    clear();
-    _M_node_count = 0;
-    _M_key_compare = __x._M_key_compare;        
-    if (__x._M_root() == 0) {
-      _M_root() = 0;
-      _M_leftmost() = this->_M_header._M_data;
-      _M_rightmost() = this->_M_header._M_data;
-    }
-    else {
-      _M_root() = _M_copy(__x._M_root(), this->_M_header._M_data);
-      _M_leftmost() = _S_minimum(_M_root());
-      _M_rightmost() = _S_maximum(_M_root());
-      _M_node_count = __x._M_node_count;
-    }
-  }
-  return *this;
-}
-
-// CRP 7/10/00 inserted argument __w_, which is another hint (meant to
-// act like __x_ and ignore a portion of the if conditions -- specify
-// __w_ != 0 to bypass comparison as false or __x_ != 0 to bypass
-// comparison as true)
-template <class _Key, class _Value, class _KeyOfValue, 
-          class _Compare, class _Alloc> __iterator__ 
-_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc> ::_M_insert(_Rb_tree_node_base* __x_, _Rb_tree_node_base* __y_, const _Value& __v,
-  _Rb_tree_node_base* __w_)
-{
-  _Link_type __w = (_Link_type) __w_;
-  _Link_type __x = (_Link_type) __x_;
-  _Link_type __y = (_Link_type) __y_;
-  _Link_type __z;
-
-  if ( __y == this->_M_header._M_data ||
-       ( __w == 0 && // If w != 0, the remainder fails to false
-         ( __x != 0 ||     // If x != 0, the remainder succeeds to true
-           _M_key_compare( _KeyOfValue()(__v), _S_key(__y) ) )
-	 )
-       ) {
-    
-    __z = _M_create_node(__v);
-    _S_left(__y) = __z;               // also makes _M_leftmost() = __z 
-                                      //    when __y == _M_header
-    if (__y == this->_M_header._M_data) {
-      _M_root() = __z;
-      _M_rightmost() = __z;
-    }
-    else if (__y == _M_leftmost())
-      _M_leftmost() = __z;   // maintain _M_leftmost() pointing to min node
-  }
-  else {
-    __z = _M_create_node(__v);
-    _S_right(__y) = __z;
-    if (__y == _M_rightmost())
-      _M_rightmost() = __z;  // maintain _M_rightmost() pointing to max node
-  }
-  _S_parent(__z) = __y;
-  _S_left(__z) = 0;
-  _S_right(__z) = 0;
-  _Rb_global_inst::_Rebalance(__z, this->_M_header._M_data->_M_parent);
-  ++_M_node_count;
-  return iterator(__z);
-}
-
-template <class _Key, class _Value, class _KeyOfValue, 
-          class _Compare, class _Alloc> __iterator__
-_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc> ::insert_equal(const _Value& __v)
-{
-  _Link_type __y = this->_M_header._M_data;
-  _Link_type __x = _M_root();
-  while (__x != 0) {
-    __y = __x;
-    __x = _M_key_compare(_KeyOfValue()(__v), _S_key(__x)) ? 
-            _S_left(__x) : _S_right(__x);
-  }
-  return _M_insert(__x, __y, __v);
-}
-
-
-template <class _Key, class _Value, class _KeyOfValue, 
-          class _Compare, class _Alloc> pair< _Rb_tree_iterator<_Value, _Nonconst_traits<_Value> >, bool> _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc> ::insert_unique(const _Value& __v)
-{
-  _Link_type __y = this->_M_header._M_data;
-  _Link_type __x = _M_root();
-  bool __comp = true;
-  while (__x != 0) {
-    __y = __x;
-    __comp = _M_key_compare(_KeyOfValue()(__v), _S_key(__x));
-    __x = __comp ? _S_left(__x) : _S_right(__x);
-  }
-  iterator __j = iterator(__y);   
-  if (__comp)
-    if (__j == begin())     
-      return pair<iterator,bool>(_M_insert(/* __x*/ __y, __y, __v), true);
-    else
-      --__j;
-  if (_M_key_compare(_S_key(__j._M_node), _KeyOfValue()(__v)))
-    return pair<iterator,bool>(_M_insert(__x, __y, __v), true);
-  return pair<iterator,bool>(__j, false);
-}
-
-// Modifications CRP 7/10/00 as noted to improve conformance and
-// efficiency.
-template <class _Key, class _Value, class _KeyOfValue, 
-          class _Compare, class _Alloc> __iterator__ 
-_Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc> ::insert_unique(iterator __position, const _Value& __v)
-{
-  if (__position._M_node == this->_M_header._M_data->_M_left) { // begin()
-
-    // if the container is empty, fall back on insert_unique.
-    if (size() <= 0)
-      return insert_unique(__v).first;
-
-    if ( _M_key_compare(_KeyOfValue()(__v), _S_key(__position._M_node)))
-      return _M_insert(__position._M_node, __position._M_node, __v);
-    // first argument just needs to be non-null 
-    else
-      {
-	bool __comp_pos_v = _M_key_compare( _S_key(__position._M_node), _KeyOfValue()(__v) );
-	
-	if (__comp_pos_v == false)  // compare > and compare < both false so compare equal
-	  return __position;
-	//Below __comp_pos_v == true
-
-	// Standard-conformance - does the insertion point fall immediately AFTER
-	// the hint?
-	iterator __after = __position;
-	++__after;
-
-	// Check for only one member -- in that case, __position points to itself,
-	// and attempting to increment will cause an infinite loop.
-	if (__after._M_node == this->_M_header._M_data)
-	  // Check guarantees exactly one member, so comparison was already
-	  // performed and we know the result; skip repeating it in _M_insert
-	  // by specifying a non-zero fourth argument.
-	  return _M_insert(0, __position._M_node, __v, __position._M_node);
-		
-	
-	// All other cases:
-	
-	// Optimization to catch insert-equivalent -- save comparison results,
-	// and we get this for free.
-	if(_M_key_compare( _KeyOfValue()(__v), _S_key(__after._M_node) )) {
-	  if (_S_right(__position._M_node) == 0)
-	    return _M_insert(0, __position._M_node, __v, __position._M_node);
-	  else
-	    return _M_insert(__after._M_node, __after._M_node, __v);
-	} else {
-	    return insert_unique(__v).first;
-	}
-      }
-
-  } else if (__position._M_node == this->_M_header._M_data) { // end()
-    if (_M_key_compare(_S_key(_M_rightmost()), _KeyOfValue()(__v)))
-      // pass along to _M_insert that it can skip comparing
-      // v, Key ; since compare Key, v was true, compare v, Key must be false.
-      return _M_insert(0, _M_rightmost(), __v, __position._M_node); // Last argument only needs to be non-null
-    else
-      return insert_unique(__v).first;
-  } else {
-    iterator __before = __position;
-    --__before;
-    
-    bool __comp_v_pos = _M_key_compare(_KeyOfValue()(__v), _S_key(__position._M_node));
-
-    if (__comp_v_pos
-      && _M_key_compare( _S_key(__before._M_node), _KeyOfValue()(__v) )) {
-
-      if (_S_right(__before._M_node) == 0)
-        return _M_insert(0, __before._M_node, __v, __before._M_node); // Last argument only needs to be non-null
-      else
-        return _M_insert(__position._M_node, __position._M_node, __v);
-    // first argument just needs to be non-null 
-    } else
-      {
-	// Does the insertion point fall immediately AFTER the hint?
-	iterator __after = __position;
-	++__after;
-	
-	// Optimization to catch equivalent cases and avoid unnecessary comparisons
-	bool __comp_pos_v = !__comp_v_pos;  // Stored this result earlier
-	// If the earlier comparison was true, this comparison doesn't need to be
-	// performed because it must be false.  However, if the earlier comparison
-	// was false, we need to perform this one because in the equal case, both will
-	// be false.
-	if (!__comp_v_pos) __comp_pos_v = _M_key_compare(_S_key(__position._M_node), _KeyOfValue()(__v));
-	
-	if ( (!__comp_v_pos) // comp_v_pos true implies comp_v_pos false
-	     && __comp_pos_v
-	     && (__after._M_node == this->_M_header._M_data ||
-	        _M_key_compare( _KeyOfValue()(__v), _S_key(__after._M_node) ))) {
-	  
-	  if (_S_right(__position._M_node) == 0)
-	    return _M_insert(0, __position._M_node, __v, __position._M_node);
-	  else
-	    return _M_insert(__after._M_node, __after._M_node, __v);
-	} else {
-	  // Test for equivalent case
-	  if (__comp_v_pos == __comp_pos_v)
-	    return __position;
-	  else
-	    return insert_unique(__v).first;
-	}
-      }
-  }
-}
-
-
-template <class _Key, class _Value, class _KeyOfValue, 
-          class _Compare, class _Alloc> __iterator__ 
-_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc> ::insert_equal(iterator __position, const _Value& __v)
-{
-  if (__position._M_node == this->_M_header._M_data->_M_left) { // begin()
-
-    // Check for zero members
-    if (size() <= 0)
-        return insert_equal(__v);
-
-    if (!_M_key_compare(_S_key(__position._M_node), _KeyOfValue()(__v)))
-      return _M_insert(__position._M_node, __position._M_node, __v);
-    else    {
-      // Check for only one member
-      if (__position._M_node->_M_left == __position._M_node)
-        // Unlike insert_unique, can't avoid doing a comparison here.
-        return _M_insert(0, __position._M_node, __v);
-                
-      // All other cases:
-      // Standard-conformance - does the insertion point fall immediately AFTER
-      // the hint?
-      iterator __after = __position;
-      ++__after;
-      
-      // Already know that compare(pos, v) must be true!
-      // Therefore, we want to know if compare(after, v) is false.
-      // (i.e., we now pos < v, now we want to know if v <= after)
-      // If not, invalid hint.
-      if ( __after._M_node==this->_M_header._M_data ||
-	   !_M_key_compare( _S_key(__after._M_node), _KeyOfValue()(__v) ) ) {
-        if (_S_right(__position._M_node) == 0)
-          return _M_insert(0, __position._M_node, __v, __position._M_node);
-        else
-          return _M_insert(__after._M_node, __after._M_node, __v);
-      } else // Invalid hint
-        return insert_equal(__v);
-    }
-  } else if (__position._M_node == this->_M_header._M_data) {// end()
-    if (!_M_key_compare(_KeyOfValue()(__v), _S_key(_M_rightmost())))
-      return _M_insert(0, _M_rightmost(), __v, __position._M_node); // Last argument only needs to be non-null
-    else
-      return insert_equal(__v);
-  } else {
-    iterator __before = __position;
-    --__before;
-    // store the result of the comparison between pos and v so
-    // that we don't have to do it again later.  Note that this reverses the shortcut
-    // on the if, possibly harming efficiency in comparisons; I think the harm will
-    // be negligible, and to do what I want to do (save the result of a comparison so
-    // that it can be re-used) there is no alternative.  Test here is for before <= v <= pos.
-    bool __comp_pos_v = _M_key_compare(_S_key(__position._M_node), _KeyOfValue()(__v));
-    if (!__comp_pos_v
-        && !_M_key_compare(_KeyOfValue()(__v), _S_key(__before._M_node))) {
-      if (_S_right(__before._M_node) == 0)
-        return _M_insert(0, __before._M_node, __v, __before._M_node); // Last argument only needs to be non-null
-      else
-        return _M_insert(__position._M_node, __position._M_node, __v);
-    } else  {
-      // Does the insertion point fall immediately AFTER the hint?
-      // Test for pos < v <= after
-      iterator __after = __position;
-      ++__after;
-      
-      if (__comp_pos_v
-	  && ( __after._M_node==this->_M_header._M_data 
-	       || !_M_key_compare( _S_key(__after._M_node), _KeyOfValue()(__v) ) ) ) {
-        if (_S_right(__position._M_node) == 0)
-          return _M_insert(0, __position._M_node, __v, __position._M_node);
-        else
-          return _M_insert(__after._M_node, __after._M_node, __v);
-      } else // Invalid hint
-        return insert_equal(__v);
-    }
-  }
-}
-
-template <class _Key, class _Value, class _KeyOfValue, class _Compare, class _Alloc> _Rb_tree_node<_Value>* 
-_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc> ::_M_copy(_Rb_tree_node<_Value>* __x, _Rb_tree_node<_Value>* __p)
-{
-                        // structural copy.  __x and __p must be non-null.
-  _Link_type __top = _M_clone_node(__x);
-  __top->_M_parent = __p;
-  
-  _STLP_TRY {
-    if (__x->_M_right)
-      __top->_M_right = _M_copy(_S_right(__x), __top);
-    __p = __top;
-    __x = _S_left(__x);
-
-    while (__x != 0) {
-      _Link_type __y = _M_clone_node(__x);
-      __p->_M_left = __y;
-      __y->_M_parent = __p;
-      if (__x->_M_right)
-        __y->_M_right = _M_copy(_S_right(__x), __y);
-      __p = __y;
-      __x = _S_left(__x);
-    }
-  }
-  _STLP_UNWIND(_M_erase(__top));
-
-  return __top;
-}
-
-// this has to stay out-of-line : it's recursive
-template <class _Key, class _Value, class _KeyOfValue, 
-          class _Compare, class _Alloc> void 
-_Rb_tree<_Key,_Value,_KeyOfValue,
-  _Compare,_Alloc>::_M_erase(_Rb_tree_node<_Value>* __x)
-{
-                                // erase without rebalancing
-  while (__x != 0) {
-    _M_erase(_S_right(__x));
-    _Link_type __y = _S_left(__x);
-    _STLP_STD::_Destroy(&__x->_M_value_field);
-    this->_M_header.deallocate(__x,1);
-    __x = __y;
-  }
-}
-
-template <class _Key, class _Value, class _KeyOfValue, 
-          class _Compare, class _Alloc> __size_type__ 
-_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc> ::count(const _Key& __k) const
-{
-  pair<const_iterator, const_iterator> __p = equal_range(__k);
-  size_type __n = distance(__p.first, __p.second);
-  return __n;
-}
-
-inline int 
-__black_count(_Rb_tree_node_base* __node, _Rb_tree_node_base* __root)
-{
-  if (__node == 0)
-    return 0;
-  else {
-    int __bc = __node->_M_color == _S_rb_tree_black ? 1 : 0;
-    if (__node == __root)
-      return __bc;
-    else
-      return __bc + __black_count(__node->_M_parent, __root);
-  }
-}
-
-template <class _Key, class _Value, class _KeyOfValue, 
-          class _Compare, class _Alloc> bool _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>::__rb_verify() const
-{
-  if (_M_node_count == 0 || begin() == end())
-    return _M_node_count == 0 && begin() == end() && this->_M_header._M_data->_M_left == this->_M_header._M_data
-      && this->_M_header._M_data->_M_right == this->_M_header._M_data;
-  
-  int __len = __black_count(_M_leftmost(), _M_root());
-  for (const_iterator __it = begin(); __it != end(); ++__it) {
-    _Link_type __x = (_Link_type) __it._M_node;
-    _Link_type __L = _S_left(__x);
-    _Link_type __R = _S_right(__x);
-
-    if (__x->_M_color == _S_rb_tree_red)
-      if ((__L && __L->_M_color == _S_rb_tree_red) ||
-          (__R && __R->_M_color == _S_rb_tree_red))
-        return false;
-
-    if (__L && _M_key_compare(_S_key(__x), _S_key(__L)))
-      return false;
-    if (__R && _M_key_compare(_S_key(__R), _S_key(__x)))
-      return false;
-
-    if (!__L && !__R && __black_count(__x, _M_root()) != __len)
-      return false;
-  }
-
-  if (_M_leftmost() != _Rb_tree_node_base::_S_minimum(_M_root()))
-    return false;
-  if (_M_rightmost() != _Rb_tree_node_base::_S_maximum(_M_root()))
-    return false;
-
-  return true;
-}
-_STLP_END_NAMESPACE
-
-# undef __iterator__        
-# undef iterator
-# undef __size_type__  
-
-#endif /*  _STLP_TREE_C */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_tree.h b/src/STLport/stl/_tree.h
deleted file mode 100644
index c46a17d..0000000
--- a/src/STLport/stl/_tree.h
+++ /dev/null
@@ -1,622 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_TREE_H
-#define _STLP_INTERNAL_TREE_H
-
-/*
-
-Red-black tree class, designed for use in implementing STL
-associative containers (set, multiset, map, and multimap). The
-insertion and deletion algorithms are based on those in Cormen,
-Leiserson, and Rivest, Introduction to Algorithms (MIT Press, 1990),
-except that
-
-(1) the header cell is maintained with links not only to the root
-but also to the leftmost node of the tree, to enable constant time
-begin(), and to the rightmost node of the tree, to enable linear time
-performance when used with the generic set algorithms (set_union,
-etc.);
-
-(2) when a node being deleted has two children its successor node is
-relinked into its place, rather than copied, so that the only
-iterators invalidated are those referring to the deleted node.
-
-*/
-
-# ifndef _STLP_INTERNAL_ALGOBASE_H
-#  include <stl/_algobase.h> 
-# endif
-
-# ifndef _STLP_INTERNAL_ALLOC_H
-#  include <stl/_alloc.h> 
-# endif
-
-# ifndef _STLP_INTERNAL_ITERATOR_H
-#  include <stl/_iterator.h> 
-# endif
-
-# ifndef _STLP_INTERNAL_CONSTRUCT_H
-#  include <stl/_construct.h> 
-# endif
-
-# ifndef _STLP_INTERNAL_FUNCTION_H
-#  include <stl/_function_base.h> 
-# endif
-
-#if defined ( _STLP_DEBUG)
-#  define _Rb_tree __WORKAROUND_DBG_RENAME(Rb_tree)
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-typedef bool _Rb_tree_Color_type;
-//const _Rb_tree_Color_type _S_rb_tree_red = false;
-//const _Rb_tree_Color_type _S_rb_tree_black = true;
-
-#define _S_rb_tree_red false
-#define _S_rb_tree_black true
-
-struct _Rb_tree_node_base
-{
-  typedef _Rb_tree_Color_type _Color_type;
-  typedef _Rb_tree_node_base* _Base_ptr;
-
-  _Color_type _M_color; 
-  _Base_ptr _M_parent;
-  _Base_ptr _M_left;
-  _Base_ptr _M_right;
-
-  static _Base_ptr _STLP_CALL _S_minimum(_Base_ptr __x)
-  {
-    while (__x->_M_left != 0) __x = __x->_M_left;
-    return __x;
-  }
-
-  static _Base_ptr _STLP_CALL _S_maximum(_Base_ptr __x)
-  {
-    while (__x->_M_right != 0) __x = __x->_M_right;
-    return __x;
-  }
-};
-
-template <class _Value> struct _Rb_tree_node : public _Rb_tree_node_base
-{
-  _Value _M_value_field;
-  __TRIVIAL_STUFF(_Rb_tree_node)
-};
-
-struct _Rb_tree_base_iterator;
-
-template <class _Dummy> class _Rb_global {
-public:
-  typedef _Rb_tree_node_base* _Base_ptr;
-  // those used to be global functions 
-  static void _STLP_CALL _Rebalance(_Rb_tree_node_base* __x, _Rb_tree_node_base*& __root);
-  static _Rb_tree_node_base* _STLP_CALL _Rebalance_for_erase(_Rb_tree_node_base* __z,
-                                                             _Rb_tree_node_base*& __root,
-                                                             _Rb_tree_node_base*& __leftmost,
-                                                             _Rb_tree_node_base*& __rightmost);
-  // those are from _Rb_tree_base_iterator - moved here to reduce code bloat
-  // moved here to reduce code bloat without templatizing _Rb_tree_base_iterator
-  static _Rb_tree_node_base*  _STLP_CALL _M_increment(_Rb_tree_node_base*);
-  static _Rb_tree_node_base*  _STLP_CALL _M_decrement(_Rb_tree_node_base*);
-  static void _STLP_CALL _Rotate_left(_Rb_tree_node_base* __x, _Rb_tree_node_base*& __root);
-  static void _STLP_CALL _Rotate_right(_Rb_tree_node_base* __x, _Rb_tree_node_base*& __root); 
-};
-
-# if defined (_STLP_USE_TEMPLATE_EXPORT) 
-_STLP_EXPORT_TEMPLATE_CLASS _Rb_global<bool>;
-# endif
-
-typedef _Rb_global<bool> _Rb_global_inst;
-
-struct _Rb_tree_base_iterator
-{
-  typedef _Rb_tree_node_base*        _Base_ptr;
-  typedef bidirectional_iterator_tag iterator_category;
-  typedef ptrdiff_t                  difference_type;
-  _Base_ptr _M_node;
-  bool operator==(const _Rb_tree_base_iterator& __y) const {
-    return _M_node == __y._M_node;
-  }
-  bool operator!=(const _Rb_tree_base_iterator& __y) const {
-    return _M_node != __y._M_node;
-  }
-};
-
-
-template <class _Value, class _Traits> struct _Rb_tree_iterator : public _Rb_tree_base_iterator
-{
-  typedef _Value value_type;
-  typedef typename _Traits::reference  reference;
-  typedef typename _Traits::pointer    pointer;
-  typedef _Rb_tree_iterator<_Value, _Traits> _Self;
-  typedef _Rb_tree_node<_Value>* _Link_type;
-
-  _Rb_tree_iterator() { _M_node = 0; }
-  _Rb_tree_iterator(_Link_type __x) { _M_node = __x; }
-  _Rb_tree_iterator(const _Rb_tree_iterator<_Value, 
-                    _Nonconst_traits<_Value> >& __it) { _M_node = __it._M_node; }
-
-  reference operator*() const { 
-    return _Link_type(_M_node)->_M_value_field; 
-  }
-  
-  _STLP_DEFINE_ARROW_OPERATOR
-
-  _Self& operator++() { _M_node = _Rb_global_inst::_M_increment(_M_node); return *this; }
-  _Self operator++(int) {
-    _Self __tmp = *this;
-    _M_node = _Rb_global_inst::_M_increment(_M_node);
-    return __tmp;
-  }
-    
-  _Self& operator--() { _M_node = _Rb_global_inst::_M_decrement(_M_node); return *this; }
-  _Self operator--(int) {
-    _Self __tmp = *this;
-    _M_node = _Rb_global_inst::_M_decrement(_M_node);
-    return __tmp;
-  }
-};
-
-# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES
-template <class _Value, class _Traits> inline _Value* value_type(const _Rb_tree_iterator<_Value, _Traits>&) { return (_Value*)0; }
-inline bidirectional_iterator_tag iterator_category(const _Rb_tree_base_iterator&) { return bidirectional_iterator_tag(); }
-inline ptrdiff_t* distance_type(const _Rb_tree_base_iterator&) { return (ptrdiff_t*) 0; }
-#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
-
-// Base class to help EH
-
-template <class _Tp, class _Alloc> struct _Rb_tree_base
-{
-  typedef _Rb_tree_node<_Tp> _Node;
-  _STLP_FORCE_ALLOCATORS(_Tp, _Alloc)
-  typedef typename _Alloc_traits<_Tp, _Alloc>::allocator_type allocator_type;
-
-  _Rb_tree_base(const allocator_type& __a) : 
-    _M_header(_STLP_CONVERT_ALLOCATOR(__a, _Node), (_Node*)0) { 
-      _M_header._M_data = _M_header.allocate(1); 
-  }
-  ~_Rb_tree_base() { 
-    _M_header.deallocate(_M_header._M_data,1); 
-  }
-  allocator_type get_allocator() const { 
-    return _STLP_CONVERT_ALLOCATOR(_M_header, _Tp); 
-  }
-protected:
-  typedef typename _Alloc_traits<_Node, _Alloc>::allocator_type _M_node_allocator_type;
-  _STLP_alloc_proxy<_Node*, _Node, _M_node_allocator_type> _M_header;
-};
-
-
-template <class _Key, class _Value, class _KeyOfValue, class _Compare,
-          _STLP_DEFAULT_ALLOCATOR_SELECT(_Value) > class _Rb_tree : public _Rb_tree_base<_Value, _Alloc> {
-  typedef _Rb_tree_base<_Value, _Alloc> _Base;
-protected:
-  typedef _Rb_tree_node_base* _Base_ptr;
-  typedef _Rb_tree_node<_Value> _Node;
-  typedef _Rb_tree_Color_type _Color_type;
-public:
-  typedef _Key key_type;
-  typedef _Value value_type;
-  typedef value_type* pointer;
-  typedef const value_type* const_pointer;
-  typedef value_type& reference;
-  typedef const value_type& const_reference;
-  typedef _Rb_tree_node<_Value>* _Link_type;
-  typedef size_t size_type;
-  typedef ptrdiff_t difference_type;
-  typedef bidirectional_iterator_tag _Iterator_category;
-  typedef typename _Base::allocator_type allocator_type;
-  
-protected:
-
-  _Link_type _M_create_node(const value_type& __x)
-  {
-    _Link_type __tmp = this->_M_header.allocate(1);
-    _STLP_TRY {
-      _Construct(&__tmp->_M_value_field, __x);
-    }
-    _STLP_UNWIND(this->_M_header.deallocate(__tmp,1));
-    return __tmp;
-  }
-
-  _Link_type _M_clone_node(_Link_type __x)
-  {
-    _Link_type __tmp = _M_create_node(__x->_M_value_field);
-    __tmp->_M_color = __x->_M_color;
-    __tmp->_M_left = 0;
-    __tmp->_M_right = 0;
-    return __tmp;
-  }
-
-protected:
-  size_type _M_node_count; // keeps track of size of tree
-  _Compare _M_key_compare;
-
-  _Link_type& _M_root() const 
-    { return (_Link_type&) this->_M_header._M_data->_M_parent; }
-  _Link_type& _M_leftmost() const 
-    { return (_Link_type&) this->_M_header._M_data->_M_left; }
-  _Link_type& _M_rightmost() const 
-    { return (_Link_type&) this->_M_header._M_data->_M_right; }
-
-  static _Link_type& _STLP_CALL _S_left(_Link_type __x)
-    { return (_Link_type&)(__x->_M_left); }
-  static _Link_type& _STLP_CALL _S_right(_Link_type __x)
-    { return (_Link_type&)(__x->_M_right); }
-  static _Link_type& _STLP_CALL _S_parent(_Link_type __x)
-    { return (_Link_type&)(__x->_M_parent); }
-  static reference  _STLP_CALL _S_value(_Link_type __x)
-    { return __x->_M_value_field; }
-  static const _Key& _STLP_CALL _S_key(_Link_type __x)
-    { return _KeyOfValue()(_S_value(__x)); }
-  static _Color_type& _STLP_CALL _S_color(_Link_type __x)
-    { return (_Color_type&)(__x->_M_color); }
-
-  static _Link_type& _STLP_CALL _S_left(_Base_ptr __x)
-    { return (_Link_type&)(__x->_M_left); }
-  static _Link_type& _STLP_CALL _S_right(_Base_ptr __x)
-    { return (_Link_type&)(__x->_M_right); }
-  static _Link_type& _STLP_CALL _S_parent(_Base_ptr __x)
-    { return (_Link_type&)(__x->_M_parent); }
-  static reference  _STLP_CALL _S_value(_Base_ptr __x)
-    { return ((_Link_type)__x)->_M_value_field; }
-  static const _Key& _STLP_CALL _S_key(_Base_ptr __x)
-    { return _KeyOfValue()(_S_value(_Link_type(__x)));} 
-  static _Color_type& _STLP_CALL _S_color(_Base_ptr __x)
-    { return (_Color_type&)(_Link_type(__x)->_M_color); }
-
-  static _Link_type  _STLP_CALL _S_minimum(_Link_type __x) 
-    { return (_Link_type)  _Rb_tree_node_base::_S_minimum(__x); }
-
-  static _Link_type  _STLP_CALL _S_maximum(_Link_type __x)
-    { return (_Link_type) _Rb_tree_node_base::_S_maximum(__x); }
-
-public:
-  typedef _Rb_tree_iterator<value_type, _Nonconst_traits<value_type> > iterator;
-  typedef _Rb_tree_iterator<value_type, _Const_traits<value_type> > const_iterator;
-  _STLP_DECLARE_BIDIRECTIONAL_REVERSE_ITERATORS;
-
-private:
-  iterator _M_insert(_Base_ptr __x, _Base_ptr __y, const value_type& __v, _Base_ptr __w = 0);
-  _Link_type _M_copy(_Link_type __x, _Link_type __p);
-  void _M_erase(_Link_type __x);
-
-public:
-                                // allocation/deallocation
-  _Rb_tree()
-    : _Rb_tree_base<_Value, _Alloc>(allocator_type()), _M_node_count(0), _M_key_compare(_Compare())
-    { _M_empty_initialize(); }
-
-  _Rb_tree(const _Compare& __comp)
-    : _Rb_tree_base<_Value, _Alloc>(allocator_type()), _M_node_count(0), _M_key_compare(__comp) 
-    { _M_empty_initialize(); }
-
-  _Rb_tree(const _Compare& __comp, const allocator_type& __a)
-    : _Rb_tree_base<_Value, _Alloc>(__a), _M_node_count(0), _M_key_compare(__comp) 
-    { _M_empty_initialize(); }
-
-  _Rb_tree(const _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& __x) 
-    : _Rb_tree_base<_Value, _Alloc>(__x.get_allocator()),
-      _M_node_count(0), _M_key_compare(__x._M_key_compare)
-  { 
-    if (__x._M_root() == 0)
-      _M_empty_initialize();
-    else {
-      _S_color(this->_M_header._M_data) = _S_rb_tree_red;
-      _M_root() = _M_copy(__x._M_root(), this->_M_header._M_data);
-      _M_leftmost() = _S_minimum(_M_root());
-      _M_rightmost() = _S_maximum(_M_root());
-    }
-    _M_node_count = __x._M_node_count;
-  }
-  ~_Rb_tree() { clear(); }
-  _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& operator=(const _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& __x);
-
-private:
-  void _M_empty_initialize() {
-    _S_color(this->_M_header._M_data) = _S_rb_tree_red; // used to distinguish header from 
-                                          // __root, in iterator.operator++
-    _M_root() = 0;
-    _M_leftmost() = this->_M_header._M_data;
-    _M_rightmost() = this->_M_header._M_data;
-  }
-
-public:    
-                                // accessors:
-  _Compare key_comp() const { return _M_key_compare; }
-
-  iterator begin() { return iterator(_M_leftmost()); }
-  const_iterator begin() const { return const_iterator(_M_leftmost()); }
-  iterator end() { return iterator(this->_M_header._M_data); }
-  const_iterator end() const { return const_iterator(this->_M_header._M_data); }
-
-  reverse_iterator rbegin() { return reverse_iterator(end()); }
-  const_reverse_iterator rbegin() const { 
-    return const_reverse_iterator(end()); 
-  }
-  reverse_iterator rend() { return reverse_iterator(begin()); }
-  const_reverse_iterator rend() const { 
-    return const_reverse_iterator(begin());
-  } 
-  bool empty() const { return _M_node_count == 0; }
-  size_type size() const { return _M_node_count; }
-  size_type max_size() const { return size_type(-1); }
-
-  void swap(_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& __t) {
-    _STLP_STD::swap(this->_M_header, __t._M_header);
-    _STLP_STD::swap(_M_node_count, __t._M_node_count);
-    _STLP_STD::swap(_M_key_compare, __t._M_key_compare);
-  }
-    
-public:
-                                // insert/erase
-  pair<iterator,bool> insert_unique(const value_type& __x);
-  iterator insert_equal(const value_type& __x);
-
-  iterator insert_unique(iterator __position, const value_type& __x);
-  iterator insert_equal(iterator __position, const value_type& __x);
-
-#ifdef _STLP_MEMBER_TEMPLATES  
-  template<class _II> void insert_equal(_II __first, _II __last) {
-    for ( ; __first != __last; ++__first)
-      insert_equal(*__first);
-  }
-  template<class _II> void insert_unique(_II __first, _II __last) {
-    for ( ; __first != __last; ++__first)
-      insert_unique(*__first);
-  }
-#else /* _STLP_MEMBER_TEMPLATES */
-  void insert_unique(const_iterator __first, const_iterator __last) {
-    for ( ; __first != __last; ++__first)
-      insert_unique(*__first);
-  }
-  void insert_unique(const value_type* __first, const value_type* __last) {
-    for ( ; __first != __last; ++__first)
-      insert_unique(*__first);
-  }
-  void insert_equal(const_iterator __first, const_iterator __last) {
-    for ( ; __first != __last; ++__first)
-      insert_equal(*__first);
-  }
-  void insert_equal(const value_type* __first, const value_type* __last) {
-    for ( ; __first != __last; ++__first)
-      insert_equal(*__first);
-  }
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-  void erase(iterator __position) {
-    _Link_type __y = 
-      (_Link_type) _Rb_global_inst::_Rebalance_for_erase(__position._M_node,
-							 this->_M_header._M_data->_M_parent,
-							 this->_M_header._M_data->_M_left,
-							 this->_M_header._M_data->_M_right);
-    _STLP_STD::_Destroy(&__y->_M_value_field);
-    this->_M_header.deallocate(__y,1);
-    --_M_node_count;
-  }
-  
-  size_type erase(const key_type& __x) {
-    pair<iterator,iterator> __p = equal_range(__x);
-    size_type __n = distance(__p.first, __p.second);
-    erase(__p.first, __p.second);
-    return __n;
-  }
-  
-  void erase(iterator __first, iterator __last) {
-    if (__first == begin() && __last == end())
-      clear();
-    else
-      while (__first != __last) erase(__first++);
-  }
-
-  void erase(const key_type* __first, const key_type* __last) {
-    while (__first != __last) erase(*__first++);
-  }
-
-  void clear() {
-    if (_M_node_count != 0) {
-      _M_erase(_M_root());
-      _M_leftmost() = this->_M_header._M_data;
-      _M_root() = 0;
-      _M_rightmost() = this->_M_header._M_data;
-      _M_node_count = 0;
-    }
-  }      
-
-public:
-                                // set operations:
-# if defined(_STLP_MEMBER_TEMPLATES) && ! defined ( _STLP_NO_EXTENSIONS ) && !defined(__MRC__) && !(defined(__SC__) && !defined(__DMC__))
-  template <class _KT> iterator find(const _KT& __x) { return iterator(_M_find(__x)); }
-  template <class _KT> const_iterator find(const _KT& __x) const { return const_iterator(_M_find(__x)); }
-private:
-  template <class _KT> _Rb_tree_node<_Value>* _M_find(const _KT& __k) const
-# else
-  iterator find(const key_type& __x) { return iterator(_M_find(__x)); }
-  const_iterator find(const key_type& __x) const { return const_iterator(_M_find(__x)); }
-private:
-  _Rb_tree_node<_Value>* _M_find(const key_type& __k) const
-# endif
-  {
-    _Link_type __y = this->_M_header._M_data;      // Last node which is not less than __k. 
-    _Link_type __x = _M_root();      // Current node. 
-    
-    while (__x != 0) 
-      if (!_M_key_compare(_S_key(__x), __k))
-	__y = __x, __x = _S_left(__x);
-      else
-	__x = _S_right(__x);
-    if (__y == this->_M_header._M_data || _M_key_compare(__k, _S_key(__y)))
-      __y = this->_M_header._M_data;
-    return __y;
-  }
-  
-  _Link_type _M_lower_bound(const key_type& __k) const {
-    _Link_type __y = this->_M_header._M_data; /* Last node which is not less than __k. */
-    _Link_type __x = _M_root(); /* Current node. */
-    
-    while (__x != 0) 
-      if (!_M_key_compare(_S_key(__x), __k))
-	__y = __x, __x = _S_left(__x);
-      else
-	__x = _S_right(__x);
-    
-    return __y;
-  }
-
-  _Link_type _M_upper_bound(const key_type& __k) const {
-    _Link_type __y = this->_M_header._M_data; /* Last node which is greater than __k. */
-    _Link_type __x = _M_root(); /* Current node. */
-    
-    while (__x != 0) 
-      if (_M_key_compare(__k, _S_key(__x)))
-	__y = __x, __x = _S_left(__x);
-      else
-	__x = _S_right(__x);
-    
-    return __y;
-  }
-  
-public:  
-  size_type count(const key_type& __x) const;
-  iterator lower_bound(const key_type& __x) { return iterator(_M_lower_bound(__x)); }
-  const_iterator lower_bound(const key_type& __x) const { return const_iterator(_M_lower_bound(__x)); }
-  iterator upper_bound(const key_type& __x) { return iterator(_M_upper_bound(__x)); }
-  const_iterator upper_bound(const key_type& __x) const { return const_iterator(_M_upper_bound(__x)); }
-  pair<iterator,iterator> equal_range(const key_type& __x) {
-    return pair<iterator, iterator>(lower_bound(__x), upper_bound(__x));
-  }
-  pair<const_iterator, const_iterator> equal_range(const key_type& __x) const {
-    return pair<const_iterator,const_iterator>(lower_bound(__x),
-					       upper_bound(__x));
-  }
-
-public:
-                                // Debugging.
-  bool __rb_verify() const;
-};
-
-template <class _Key, class _Value, class _KeyOfValue, 
-          class _Compare, class _Alloc> inline bool _STLP_CALL 
-operator==(const _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& __x, 
-           const _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& __y)
-{
-  return __x.size() == __y.size() && equal(__x.begin(), __x.end(), __y.begin());
-}
-
-template <class _Key, class _Value, class _KeyOfValue, 
-          class _Compare, class _Alloc> inline bool _STLP_CALL 
-operator<(const _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& __x, 
-          const _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& __y)
-{
-  return lexicographical_compare(__x.begin(), __x.end(), 
-                                 __y.begin(), __y.end());
-}
-
-#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE
-
-template <class _Key, class _Value, class _KeyOfValue, 
-          class _Compare, class _Alloc> inline bool _STLP_CALL 
-operator!=(const _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& __x, 
-           const _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& __y) {
-  return !(__x == __y);
-}
-
-template <class _Key, class _Value, class _KeyOfValue, 
-          class _Compare, class _Alloc> inline bool _STLP_CALL 
-operator>(const _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& __x, 
-          const _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& __y) {
-  return __y < __x;
-}
-
-template <class _Key, class _Value, class _KeyOfValue, 
-          class _Compare, class _Alloc> inline bool _STLP_CALL 
-operator<=(const _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& __x, 
-           const _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& __y) {
-  return !(__y < __x);
-}
-
-template <class _Key, class _Value, class _KeyOfValue, 
-          class _Compare, class _Alloc> inline bool _STLP_CALL 
-operator>=(const _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& __x, 
-           const _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& __y) {
-  return !(__x < __y);
-}
-
-#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */
-
-#ifdef _STLP_FUNCTION_TMPL_PARTIAL_ORDER
-
-template <class _Key, class _Value, class _KeyOfValue, 
-          class _Compare, class _Alloc> inline void _STLP_CALL 
-swap(_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& __x, 
-     _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& __y)
-{
-  __x.swap(__y);
-}
-
-#endif /* _STLP_FUNCTION_TMPL_PARTIAL_ORDER */
-         
-_STLP_END_NAMESPACE
-
-# if !defined (_STLP_LINK_TIME_INSTANTIATION)
-#  include <stl/_tree.c> 
-# endif
-
-# undef _Rb_tree
-
-#if defined (_STLP_DEBUG)
-# include <stl/debug/_tree.h> 
-#endif
-
-_STLP_BEGIN_NAMESPACE
-// Class rb_tree is not part of the C++ standard.  It is provided for
-// compatibility with the HP STL.
-
-template <class _Key, class _Value, class _KeyOfValue, class _Compare,
-          _STLP_DEFAULT_ALLOCATOR_SELECT(_Value) > struct rb_tree : public _Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc> {
-  typedef _Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc> _Base;
-  typedef typename _Base::allocator_type allocator_type;
-
-  rb_tree()
-     : _Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc>(_Compare(), allocator_type()) {}
-  rb_tree(const _Compare& __comp,
-          const allocator_type& __a = allocator_type())
-    : _Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc>(__comp, __a) {} 
-  ~rb_tree() {}
-};
-_STLP_END_NAMESPACE
-
-#endif /* _STLP_INTERNAL_TREE_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_uninitialized.h b/src/STLport/stl/_uninitialized.h
deleted file mode 100644
index 6784ff7..0000000
--- a/src/STLport/stl/_uninitialized.h
+++ /dev/null
@@ -1,287 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_UNINITIALIZED_H
-#define _STLP_INTERNAL_UNINITIALIZED_H
-
-# ifndef _STLP_CSTRING
-#  include <cstring>
-# endif
-
-# ifndef _STLP_INTERNAL_ALGOBASE_H
-#  include <stl/_algobase.h>
-# endif
-
-# ifndef _STLP_INTERNAL_CONSTRUCT_H
-#  include <stl/_construct.h>
-# endif
-
-_STLP_BEGIN_NAMESPACE
-
-// uninitialized_copy
-
-// Valid if copy construction is equivalent to assignment, and if the
-//  destructor is trivial.
-template <class _InputIter, class _ForwardIter>
-inline _ForwardIter 
-__uninitialized_copy(_InputIter __first, _InputIter __last, _ForwardIter __result,
-                     const __true_type&) {
-  return __copy_aux(__first, __last, __result, _BothPtrType< _InputIter, _ForwardIter> :: _Ret());
-}
-
-template <class _InputIter, class _ForwardIter>
-_STLP_INLINE_LOOP
-_ForwardIter 
-__uninitialized_copy(_InputIter __first, _InputIter __last, _ForwardIter __result,
-                     const __false_type&)
-{
-  _ForwardIter __cur = __result;
-  _STLP_TRY {
-    for ( ; __first != __last; ++__first, ++__cur)
-      _Construct(&*__cur, *__first);
-    return __cur;
-  }
-  _STLP_UNWIND(_STLP_STD::_Destroy(__result, __cur));
-# ifdef _STLP_THROW_RETURN_BUG
-  return __cur;
-# endif
-}
-
-template <class _InputIter, class _ForwardIter>
-inline _ForwardIter
-uninitialized_copy(_InputIter __first, _InputIter __last, _ForwardIter __result) {
-  return __uninitialized_copy(__first, __last, __result,  _IS_POD_ITER(__result, _ForwardIter));
-}
-
-inline char* 
-uninitialized_copy(const char* __first, const char* __last, char* __result) {
-  return  (char*)__copy_trivial (__first, __last, __result);
-}
-
-#  ifdef _STLP_HAS_WCHAR_T // dwa 8/15/97
-inline wchar_t* 
-uninitialized_copy(const wchar_t* __first, const wchar_t* __last, wchar_t* __result) {
-  return  (wchar_t*)__copy_trivial (__first, __last, __result);
-}
-#  endif /* _STLP_HAS_WCHAR_T */
-
-# ifndef _STLP_NO_EXTENSIONS
-// uninitialized_copy_n (not part of the C++ standard)
-
-template <class _InputIter, class _Size, class _ForwardIter>
-_STLP_INLINE_LOOP 
-pair<_InputIter, _ForwardIter>
-__uninitialized_copy_n(_InputIter __first, _Size __count,
-                       _ForwardIter __result,
-                       const input_iterator_tag &)
-{
-  _ForwardIter __cur = __result;
-  _STLP_TRY {
-    for ( ; __count > 0 ; --__count, ++__first, ++__cur) 
-      _Construct(&*__cur, *__first);
-    return pair<_InputIter, _ForwardIter>(__first, __cur);
-  }
-  _STLP_UNWIND(_STLP_STD::_Destroy(__result, __cur));
-# ifdef _STLP_THROW_RETURN_BUG
-  return pair<_InputIter, _ForwardIter>(__first, __cur);
-# endif
-}
-
-# if defined(_STLP_NONTEMPL_BASE_MATCH_BUG) 
-template <class _InputIterator, class _Size, class _ForwardIterator>
-inline pair<_InputIterator, _ForwardIterator>
-__uninitialized_copy_n(_InputIterator __first, _Size __count,
-                       _ForwardIterator __result,
-                       const forward_iterator_tag &) {
-  return __uninitialized_copy_n(__first, __count, __result, input_iterator_tag());
-}
-
-template <class _InputIterator, class _Size, class _ForwardIterator>
-inline pair<_InputIterator, _ForwardIterator>
-__uninitialized_copy_n(_InputIterator __first, _Size __count,
-                       _ForwardIterator __result,
-                       const bidirectional_iterator_tag &) {
-  return __uninitialized_copy_n(__first, __count, __result, input_iterator_tag());
-}
-# endif
-
-
-template <class _RandomAccessIter, class _Size, class _ForwardIter>
-inline pair<_RandomAccessIter, _ForwardIter>
-__uninitialized_copy_n(_RandomAccessIter __first, _Size __count, _ForwardIter __result, const random_access_iterator_tag &) {
-  _RandomAccessIter __last = __first + __count;
-  return pair<_RandomAccessIter, _ForwardIter>( __last, __uninitialized_copy(__first, __last, __result, 
-                                                                             _IS_POD_ITER(__result, _ForwardIter)));
-}
-
-// this is used internally in <rope> , which is extension itself.
-template <class _InputIter, class _Size, class _ForwardIter>
-inline pair<_InputIter, _ForwardIter>
-uninitialized_copy_n(_InputIter __first, _Size __count,
-                     _ForwardIter __result) {
-  return __uninitialized_copy_n(__first, __count, __result, _STLP_ITERATOR_CATEGORY(__first, _InputIter));
-}
-# endif /* _STLP_NO_EXTENSIONS */
-
-// Valid if copy construction is equivalent to assignment, and if the
-// destructor is trivial.
-template <class _ForwardIter, class _Tp>
-inline void
-__uninitialized_fill(_ForwardIter __first, _ForwardIter __last, 
-                     const _Tp& __x, const __true_type&) {
-  _STLP_STD::fill(__first, __last, __x);
-}
-
-template <class _ForwardIter, class _Tp>
-_STLP_INLINE_LOOP void
-__uninitialized_fill(_ForwardIter __first, _ForwardIter __last, 
-                     const _Tp& __x, const __false_type&)
-{
-  _ForwardIter __cur = __first;
-  _STLP_TRY {
-    for ( ; __cur != __last; ++__cur)
-      _Construct(&*__cur, __x);
-  }
-  _STLP_UNWIND(_STLP_STD::_Destroy(__first, __cur));
-}
-
-template <class _ForwardIter, class _Tp>
-inline void uninitialized_fill(_ForwardIter __first, _ForwardIter __last,  const _Tp& __x) {
-  __uninitialized_fill(__first, __last, __x, _IS_POD_ITER(__first, _ForwardIter));
-}
-
-// Valid if copy construction is equivalent to assignment, and if the
-//  destructor is trivial.
-template <class _ForwardIter, class _Size, class _Tp>
-inline _ForwardIter
-__uninitialized_fill_n(_ForwardIter __first, _Size __n,
-                       const _Tp& __x, const __true_type&) {
-  return _STLP_STD::fill_n(__first, __n, __x);
-}
-
-template <class _ForwardIter, class _Size, class _Tp>
-_STLP_INLINE_LOOP _ForwardIter
-__uninitialized_fill_n(_ForwardIter __first, _Size __n,
-                       const _Tp& __x, const __false_type&)
-{
-  _ForwardIter __cur = __first;
-  _STLP_TRY {
-    for ( ; __n > 0; --__n, ++__cur)
-      _Construct(&*__cur, __x);
-    return __cur;
-  }
-  _STLP_UNWIND(_STLP_STD::_Destroy(__first, __cur));
-# ifdef _STLP_THROW_RETURN_BUG
-  return __cur;
-# endif
-}
-
-template <class _ForwardIter, class _Size, class _Tp>
-inline _ForwardIter 
-uninitialized_fill_n(_ForwardIter __first, _Size __n, const _Tp& __x) {
-  return __uninitialized_fill_n(__first, __n, __x, _IS_POD_ITER(__first, _ForwardIter));
-}
-
-// Extensions: __uninitialized_copy_copy, __uninitialized_copy_fill, 
-// __uninitialized_fill_copy.
-
-// __uninitialized_copy_copy
-// Copies [first1, last1) into [result, result + (last1 - first1)), and
-//  copies [first2, last2) into
-//  [result, result + (last1 - first1) + (last2 - first2)).
-
-template <class _InputIter1, class _InputIter2, class _ForwardIter>
-inline _ForwardIter
-__uninitialized_copy_copy(_InputIter1 __first1, _InputIter1 __last1,
-                          _InputIter2 __first2, _InputIter2 __last2,
-                          _ForwardIter __result, __true_type)
-{
-  return __uninitialized_copy(__first2, __last2, 
-                              __uninitialized_copy(__first1, __last1, __result, __true_type()), __true_type());
-}
-
-template <class _InputIter1, class _InputIter2, class _ForwardIter>
-inline _ForwardIter
-__uninitialized_copy_copy(_InputIter1 __first1, _InputIter1 __last1,
-                          _InputIter2 __first2, _InputIter2 __last2,
-                          _ForwardIter __result, __false_type)
-{
-  _ForwardIter __mid = __uninitialized_copy(__first1, __last1, __result, _IS_POD_ITER(__result, _ForwardIter));
-  _STLP_TRY {
-    return __uninitialized_copy(__first2, __last2, __mid , _IS_POD_ITER(__result, _ForwardIter));
-  }
-  _STLP_UNWIND(_STLP_STD::_Destroy(__result, __mid));
-# ifdef _STLP_THROW_RETURN_BUG
-  return __mid;
-# endif
-}
-
-// __uninitialized_fill_copy
-// Fills [result, mid) with x, and copies [first, last) into
-//  [mid, mid + (last - first)).
-template <class _ForwardIter, class _Tp, class _InputIter>
-inline _ForwardIter 
-__uninitialized_fill_copy(_ForwardIter __result, _ForwardIter __mid, const _Tp& __x,
-                          _InputIter __first, _InputIter __last)
-{
-  typedef typename __type_traits<_Tp>::is_POD_type _I_POD;
-  __uninitialized_fill(__result, __mid, __x, _I_POD());
-  _STLP_TRY {
-    return __uninitialized_copy(__first, __last, __mid, _I_POD());
-  }
-  _STLP_UNWIND(_STLP_STD::_Destroy(__result, __mid));
-# ifdef _STLP_THROW_RETURN_BUG
-  return __result;
-# endif
-}
-
-// __uninitialized_copy_fill
-// Copies [first1, last1) into [first2, first2 + (last1 - first1)), and
-//  fills [first2 + (last1 - first1), last2) with x.
-template <class _InputIter, class _ForwardIter, class _Tp>
-inline void
-__uninitialized_copy_fill(_InputIter __first1, _InputIter __last1,
-                          _ForwardIter __first2, _ForwardIter __last2,
-                          const _Tp& __x)
-{
-  typedef typename __type_traits<_Tp>::is_POD_type _I_POD;
-  _ForwardIter __mid2 = __uninitialized_copy(__first1, __last1, __first2, _I_POD());
-  _STLP_TRY {
-    __uninitialized_fill(__mid2, __last2, __x, _I_POD());
-  }
-  _STLP_UNWIND(_STLP_STD::_Destroy(__first2, __mid2));
-}
-
-_STLP_END_NAMESPACE
-
-#endif /* _STLP_INTERNAL_UNINITIALIZED_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_valarray.c b/src/STLport/stl/_valarray.c
deleted file mode 100644
index 3381ca2..0000000
--- a/src/STLport/stl/_valarray.c
+++ /dev/null
@@ -1,197 +0,0 @@
-/*
- *
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-#ifndef _STLP_VALARRAY_C
-#define _STLP_VALARRAY_C
-
-#ifndef _STLP_VALARRAY_H
-# include <stl/_valarray.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-template <class _Tp>
-_Valarray_bool valarray<_Tp>:: operator!() const {
-  _Valarray_bool __tmp(this->size(), _Valarray_bool::_NoInit());
-  for (size_t __i = 0; __i < this->size(); ++__i)
-    __tmp[__i] = !(*this)[__i];
-  return __tmp;
-}
-
-// Behavior is undefined if __x and *this have different sizes
-template <class _Tp>
-valarray<_Tp>& valarray<_Tp>::operator=(const slice_array<_Tp>& __x)
-{
-  size_t __index = __x._M_slice.start();
-  for (size_t __i = 0;
-       __i < __x._M_slice.size();
-       ++__i, __index += __x._M_slice.stride())
-    (*this)[__i] = __x._M_array[__index];
-  return *this;
-}
-
-template <class _Tp>
-valarray<_Tp> valarray<_Tp>::operator[](slice __slice) const {
-  valarray<_Tp> __tmp(__slice.size(), _NoInit());
-  size_t __index = __slice.start();
-  for (size_t __i = 0;
-       __i < __slice.size();
-       ++__i, __index += __slice.stride())
-    __tmp[__i] = (*this)[__index];
-  return __tmp;
-}
-
-template <class _Size>
-bool _Gslice_Iter_tmpl<_Size>::_M_incr() {
-  size_t __dim = _M_indices.size() - 1;
-  ++_M_step;
-  while (true) {
-    _M_1d_idx += _M_gslice._M_strides[__dim];
-    if (++_M_indices[__dim] != _M_gslice._M_lengths[__dim])
-      return true;
-    else if (__dim != 0) {
-      _M_1d_idx -=
-	_M_gslice._M_strides[__dim] * _M_gslice._M_lengths[__dim];
-      _M_indices[__dim] = 0;
-      --__dim;
-    }
-    else
-      return false;
-  }
-}
-
-// Behavior is undefined if __x and *this have different sizes, or if
-// __x was constructed from a degenerate gslice.
-template <class _Tp>
-valarray<_Tp>& valarray<_Tp>::operator=(const gslice_array<_Tp>& __x)
-{
-  if (this->size() != 0) {
-    _Gslice_Iter __i(__x._M_gslice);
-    do
-      (*this)[__i._M_step] = __x._M_array[__i._M_1d_idx];
-    while(__i._M_incr());
-  }
-  return *this;
-}
-
-template <class _Tp>
-valarray<_Tp> valarray<_Tp>::operator[](gslice __slice) const
-{
-  valarray<_Tp> __tmp(__slice._M_size(), _NoInit());
-  if (__tmp.size() != 0) {
-    _Gslice_Iter __i(__slice);
-    do __tmp[__i._M_step] = (*this)[__i._M_1d_idx]; while(__i._M_incr());
-  }
-  return __tmp;
-}
-
-template <class _Tp>
-valarray<_Tp> valarray<_Tp>::operator[](const _Valarray_bool& __mask) const
-{
-  size_t _p_size = 0;
-  {
-    for (size_t __i = 0; __i < __mask.size(); ++__i)
-      if (__mask[__i]) ++_p_size;
-  }
-
-  valarray<_Tp> __tmp(_p_size, _NoInit());
-  size_t __idx = 0;
-  {
-    for (size_t __i = 0; __i < __mask.size(); ++__i)
-      if (__mask[__i]) __tmp[__idx++] = (*this)[__i];
-  }
-
-  return __tmp;
-}
-
-template <class _Tp>
-valarray<_Tp>& valarray<_Tp>::operator=(const indirect_array<_Tp>& __x) {
-  for (size_t __i = 0; __i < __x._M_addr.size(); ++__i)
-    (*this)[__i] = __x._M_array[__x._M_addr[__i]];
-  return *this;
-}
-
-template <class _Tp>
-valarray<_Tp>
-valarray<_Tp>::operator[](const _Valarray_size_t& __addr) const
-{
-  valarray<_Tp> __tmp(__addr.size(), _NoInit());
-  for (size_t __i = 0; __i < __addr.size(); ++__i)
-    __tmp[__i] = (*this)[__addr[__i]];
-  return __tmp;
-}
-
-//----------------------------------------------------------------------
-// Other valarray noninline member functions
-
-// Shift and cshift
-
-template <class _Tp>
-valarray<_Tp> valarray<_Tp>::shift(int __n) const
-{
-  valarray<_Tp> __tmp(this->size());
-
-  if (__n >= 0) {
-    if (__n < this->size())
-      copy(this->_M_first + __n, this->_M_first + this->size(),
-           __tmp._M_first);
-  }
-  else {
-    if (-__n < this->size())
-      copy(this->_M_first, this->_M_first + this->size() + __n,
-           __tmp._M_first - __n);
-  }
-  return __tmp;
-}
-
-template <class _Tp>
-valarray<_Tp> valarray<_Tp>::cshift(int __m) const
-{
-  valarray<_Tp> __tmp(this->size());
-
-  // Reduce __m to an equivalent number in the range [0, size()).  We
-  // have to be careful with negative numbers, since the sign of a % b
-  // is unspecified when a < 0.
-  long __n = __m;
-  if (this->size() < (numeric_limits<long>::max)())
-    __n %= long(this->size());
-  if (__n < 0)
-    __n += this->size();
-
-  copy(this->_M_first,       this->_M_first + __n,
-       __tmp._M_first + (this->size() - __n));
-  copy(this->_M_first + __n, this->_M_first + this->size(),
-       __tmp._M_first);
-
-  return __tmp;
-}
-
-_STLP_END_NAMESPACE
-
-#endif /*  _STLP_VALARRAY_C */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_valarray.h b/src/STLport/stl/_valarray.h
deleted file mode 100644
index be8b5b7..0000000
--- a/src/STLport/stl/_valarray.h
+++ /dev/null
@@ -1,1657 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-
-#ifndef _STLP_VALARRAY_H
-#define _STLP_VALARRAY_H
-
-#ifndef _STLP_CMATH_H_HEADER
-#include <stl/_cmath.h>
-#endif
-#ifndef _STLP_INTERNAL_NEW_HEADER
-#include <stl/_new.h>
-#endif
-#ifndef _STLP_INTERNAL_ALGO_H
-#include <stl/_algo.h>
-#endif
-#ifndef _STLP_INTERNAL_NUMERIC_H
-#include <stl/_numeric.h>
-#endif
-#ifndef _STLP_LIMITS_H
-#include <limits>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-class slice;
-class gslice;
-
-template <class _Tp> class valarray;
-typedef valarray<bool>    _Valarray_bool;
-typedef valarray<size_t>  _Valarray_size_t;
-
-template <class _Tp> class slice_array;
-template <class _Tp> class gslice_array;
-template <class _Tp> class mask_array;
-template <class _Tp> class indirect_array;
-
-//----------------------------------------------------------------------
-// class valarray
-
-// Base class to handle memory allocation and deallocation.  We can't just
-// use vector<>, because vector<bool> would be unsuitable as an internal 
-// representation for valarray<bool>.
-
-template <class _Tp> 
-struct _Valarray_base
-{
-  _Tp*   _M_first;
-  size_t _M_size;
-
-  _Valarray_base() : _M_first(0), _M_size(0) {}
-  _Valarray_base(size_t __n) : _M_first(0), _M_size(0) { _M_allocate(__n); }
-  ~_Valarray_base() { _M_deallocate(); }
-
-  void _M_allocate(size_t __n) {
-    if (__n != 0) {
-      _M_first = __STATIC_CAST(_Tp*, (malloc(__n * sizeof(_Tp))));
-      _M_size  = __n;
-#   if !defined(_STLP_NO_BAD_ALLOC) && defined(_STLP_USE_EXCEPTIONS)
-      if (_M_first == 0) {
-        _M_size = 0;
-        throw _STLP_STD::bad_alloc();
-      }
-#   endif
-    }
-    else {
-      _M_first = 0;
-      _M_size = 0;
-    }
-  }
-
-  void _M_deallocate() {
-    free(_M_first);
-    _M_first = 0;
-    _M_size = 0;
-  }
-};
-
-template <class _Tp> 
-class valarray : private _Valarray_base<_Tp>
-{
-  friend class gslice;
-
-public:
-  typedef _Tp value_type;
-
-  // Basic constructors
-  valarray() : _Valarray_base<_Tp>() {}
-  valarray(size_t __n) : _Valarray_base<_Tp>(__n)
-    { uninitialized_fill_n(this->_M_first, this->_M_size, value_type()); }
-  valarray(const value_type& __x, size_t __n) : _Valarray_base<_Tp>(__n)
-    { uninitialized_fill_n(this->_M_first, this->_M_size, __x); }
-  valarray(const value_type* __p, size_t __n) : _Valarray_base<_Tp>(__n)
-    { uninitialized_copy(__p, __p + __n, this->_M_first); } 
-  valarray(const valarray<_Tp>& __x) : _Valarray_base<_Tp>(__x._M_size) {
-    uninitialized_copy(__x._M_first, __x._M_first + __x._M_size,
-                       this->_M_first);
-  }
-
-  // Constructors from auxiliary array types
-  valarray(const slice_array<_Tp>&);
-  valarray(const gslice_array<_Tp>&);
-  valarray(const mask_array<_Tp>&);
-  valarray(const indirect_array<_Tp>&);
-
-  // Destructor
-  ~valarray() { _STLP_STD::_Destroy(this->_M_first, this->_M_first + this->_M_size); }
-
-  // Extension: constructor that doesn't initialize valarray elements to a
-  // specific value.  This is faster for types such as int and double.
-private:
-  void _M_initialize(const __true_type&) {}
-  void _M_initialize(const __false_type&)
-    { uninitialized_fill_n(this->_M_first, this->_M_size, value_type()); }
-
-public:
-  struct _NoInit {};
-  valarray(size_t __n, _NoInit) : _Valarray_base<_Tp>(__n) {
-    typedef typename __type_traits<_Tp>::has_trivial_default_constructor _Is_Trivial;
-    _M_initialize(_Is_Trivial());
-  }
-
-public:                         // Assignment
-  // Basic assignment.  Note that 'x = y' is undefined if x.size() != y.size()
-  valarray<_Tp>& operator=(const valarray<_Tp>& __x) {
-    _STLP_ASSERT(__x.size() == this->size())
-    if (this != &__x)
-      copy(__x._M_first, __x._M_first + __x._M_size, this->_M_first);
-    return *this;
-  }
-
-  // Scalar assignment
-  valarray<_Tp>& operator=(const value_type& __x) {
-    fill_n(this->_M_first, this->_M_size, __x);
-    return *this;
-  }
-
-  // Assignment of auxiliary array types
-  valarray<_Tp>& operator=(const slice_array<_Tp>&);
-  valarray<_Tp>& operator=(const gslice_array<_Tp>&);
-  valarray<_Tp>& operator=(const mask_array<_Tp>&);
-  valarray<_Tp>& operator=(const indirect_array<_Tp>&);
-
-public:                         // Element access
-  value_type  operator[](size_t __n) const { return this->_M_first[__n]; }
-  value_type& operator[](size_t __n)       { return this->_M_first[__n]; }
-  size_t size() const { return this->_M_size; }
-
-public:                         // Subsetting operations with auxiliary type
-  valarray<_Tp>            operator[](slice) const;
-  slice_array<_Tp>    operator[](slice);
-  valarray<_Tp>            operator[](gslice) const;
-  gslice_array<_Tp>   operator[](const gslice&);  
-  valarray<_Tp>            operator[](const _Valarray_bool&) const;
-  mask_array<_Tp>     operator[](const _Valarray_bool&);
-  valarray<_Tp>            operator[](const _Valarray_size_t&) const;
-  indirect_array<_Tp> operator[](const _Valarray_size_t&);
-  
-public:                         // Unary operators.
-  valarray<_Tp> operator+() const { return *this; }
-
-  valarray<_Tp> operator-() const {
-    valarray<_Tp> __tmp(this->size(), _NoInit());
-    for (size_t __i = 0; __i < this->size(); ++__i)
-      __tmp[__i] = -(*this)[__i];
-    return __tmp;
-  }
-  
-  valarray<_Tp> operator~() const {
-    valarray<_Tp> __tmp(this->size(), _NoInit());
-    for (size_t __i = 0; __i < this->size(); ++__i)
-      __tmp[__i] = ~(*this)[__i];
-    return __tmp;
-  }
-
-  _Valarray_bool operator!() const;
-
-public:                         // Scalar computed assignment.
-  valarray<_Tp>& operator*= (const value_type& __x) {
-    for (size_t __i = 0; __i < this->size(); ++__i)
-      (*this)[__i] *= __x;
-    return *this;
-  }
-    
-  valarray<_Tp>& operator/= (const value_type& __x) {
-    for (size_t __i = 0; __i < this->size(); ++__i)
-      (*this)[__i] /= __x;
-    return *this;
-  }
-
-  valarray<_Tp>& operator%= (const value_type& __x) {
-    for (size_t __i = 0; __i < this->size(); ++__i)
-      (*this)[__i] %= __x;
-    return *this;
-  }
-
-  valarray<_Tp>& operator+= (const value_type& __x) {
-    for (size_t __i = 0; __i < this->size(); ++__i)
-      (*this)[__i] += __x;
-    return *this;
-  }
-
-  valarray<_Tp>& operator-= (const value_type& __x) {
-    for (size_t __i = 0; __i < this->size(); ++__i)
-      (*this)[__i] -= __x;
-    return *this;
-  }
-
-  valarray<_Tp>& operator^= (const value_type& __x) {
-    for (size_t __i = 0; __i < this->size(); ++__i)
-      (*this)[__i] ^= __x;
-    return *this;
-  }
-
-  valarray<_Tp>& operator&= (const value_type& __x) {
-    for (size_t __i = 0; __i < this->size(); ++__i)
-      (*this)[__i] &= __x;
-    return *this;
-  }
-
-  valarray<_Tp>& operator|= (const value_type& __x) {
-    for (size_t __i = 0; __i < this->size(); ++__i)
-      (*this)[__i] |= __x;
-    return *this;
-  }
-
-  valarray<_Tp>& operator<<= (const value_type& __x) {
-    for (size_t __i = 0; __i < this->size(); ++__i)
-      (*this)[__i] <<= __x;
-    return *this;
-  }
-
-  valarray<_Tp>& operator>>= (const value_type& __x) {
-    for (size_t __i = 0; __i < this->size(); ++__i)
-      (*this)[__i] >>= __x;
-    return *this;
-  }
-
-public:                         // Array computed assignment.
-  valarray<_Tp>& operator*= (const valarray<_Tp>& __x) {
-    for (size_t __i = 0; __i < this->size(); ++__i)
-      (*this)[__i] *= __x[__i];
-    return *this;
-  }
-    
-  valarray<_Tp>& operator/= (const valarray<_Tp>& __x) {
-    for (size_t __i = 0; __i < this->size(); ++__i)
-      (*this)[__i] /= __x[__i];
-    return *this;
-  }
-
-  valarray<_Tp>& operator%= (const valarray<_Tp>& __x) {
-    for (size_t __i = 0; __i < this->size(); ++__i)
-      (*this)[__i] %= __x[__i];
-    return *this;
-  }
-
-  valarray<_Tp>& operator+= (const valarray<_Tp>& __x) {
-    for (size_t __i = 0; __i < this->size(); ++__i)
-      (*this)[__i] += __x[__i];
-    return *this;
-  }
-
-  valarray<_Tp>& operator-= (const valarray<_Tp>& __x) {
-    for (size_t __i = 0; __i < this->size(); ++__i)
-      (*this)[__i] -= __x[__i];
-    return *this;
-  }
-
-  valarray<_Tp>& operator^= (const valarray<_Tp>& __x) {
-    for (size_t __i = 0; __i < this->size(); ++__i)
-      (*this)[__i] ^= __x[__i];
-    return *this;
-  }
-
-  valarray<_Tp>& operator&= (const valarray<_Tp>& __x) {
-    for (size_t __i = 0; __i < this->size(); ++__i)
-      (*this)[__i] &= __x[__i];
-    return *this;
-  }
-
-  valarray<_Tp>& operator|= (const valarray<_Tp>& __x) {
-    for (size_t __i = 0; __i < this->size(); ++__i)
-      (*this)[__i] |= __x[__i];
-    return *this;
-  }
-
-  valarray<_Tp>& operator<<= (const valarray<_Tp>& __x) {
-    for (size_t __i = 0; __i < this->size(); ++__i)
-      (*this)[__i] <<= __x[__i];
-    return *this;
-  }
-
-  valarray<_Tp>& operator>>= (const valarray<_Tp>& __x) {
-    for (size_t __i = 0; __i < this->size(); ++__i)
-      (*this)[__i] >>= __x[__i];
-    return *this;
-  }
-
-public:                         // Other member functions.
-
-  // The result is undefined for zero-length arrays
-  value_type sum() const {
-    return accumulate(this->_M_first + 1, this->_M_first + this->_M_size,
-                      (*this)[0]);
-  }
-
-  // The result is undefined for zero-length arrays
-  value_type (min) () const {
-    return *min_element(this->_M_first + 0, this->_M_first + this->_M_size);
-  }
-
-  value_type (max) () const {
-    return *max_element(this->_M_first + 0, this->_M_first + this->_M_size);
-  }
-
-  valarray<_Tp> shift(int __n) const;
-  valarray<_Tp> cshift(int __n) const;
-
-  valarray<_Tp> apply(value_type __f(value_type)) const {
-    valarray<_Tp> __tmp(this->size());
-    transform(this->_M_first + 0, this->_M_first + this->_M_size, __tmp._M_first,
-              __f);
-    return __tmp;
-  }
-  valarray<_Tp> apply(value_type __f(const value_type&)) const {
-    valarray<_Tp> __tmp(this->size());
-    transform(this->_M_first + 0, this->_M_first + this->_M_size, __tmp._M_first,
-              __f);
-    return __tmp;
-  }
-  
-  void resize(size_t __n, value_type __x = value_type()) {
-    _STLP_STD::_Destroy(this->_M_first, this->_M_first + this->_M_size);
-    this->_Valarray_base<_Tp>::_M_deallocate();
-    this->_Valarray_base<_Tp>::_M_allocate(__n);
-    uninitialized_fill_n(this->_M_first, this->_M_size, __x);
-  }
-};
-
-//----------------------------------------------------------------------
-// valarray non-member functions.
-
-// Binary arithmetic operations between two arrays.  Behavior is
-// undefined if the two arrays do not have the same length.
-
-template <class _Tp> 
-inline valarray<_Tp>  _STLP_CALL operator*(const valarray<_Tp>& __x,
-                                           const valarray<_Tp>& __y) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __x[__i] * __y[__i];
-  return __tmp;
-}
-
-template <class _Tp> 
-inline valarray<_Tp>  _STLP_CALL operator/(const valarray<_Tp>& __x,
-                                           const valarray<_Tp>& __y) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __x[__i] / __y[__i];
-  return __tmp;
-}
-
-template <class _Tp> 
-inline valarray<_Tp>  _STLP_CALL operator%(const valarray<_Tp>& __x,
-                                           const valarray<_Tp>& __y) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __x[__i] % __y[__i];
-  return __tmp;
-}
-
-template <class _Tp> 
-inline valarray<_Tp>  _STLP_CALL operator+(const valarray<_Tp>& __x,
-                                           const valarray<_Tp>& __y) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __x[__i] + __y[__i];
-  return __tmp;
-}
-
-template <class _Tp> 
-inline valarray<_Tp>  _STLP_CALL operator-(const valarray<_Tp>& __x,
-                                           const valarray<_Tp>& __y) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __x[__i] - __y[__i];
-  return __tmp;
-}
-
-template <class _Tp> 
-inline valarray<_Tp> _STLP_CALL operator^(const valarray<_Tp>& __x,
-                               const valarray<_Tp>& __y) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __x[__i] ^ __y[__i];
-  return __tmp;
-}
-
-template <class _Tp> 
-inline valarray<_Tp> _STLP_CALL operator&(const valarray<_Tp>& __x,
-                               const valarray<_Tp>& __y) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __x[__i] & __y[__i];
-  return __tmp;
-}
-
-template <class _Tp> 
-inline valarray<_Tp> _STLP_CALL operator|(const valarray<_Tp>& __x,
-                               const valarray<_Tp>& __y) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __x[__i] | __y[__i];
-  return __tmp;
-}
-
-template <class _Tp> 
-inline valarray<_Tp> _STLP_CALL operator<<(const valarray<_Tp>& __x,
-                               const valarray<_Tp>& __y) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __x[__i] << __y[__i];
-  return __tmp;
-}
-
-template <class _Tp> 
-inline valarray<_Tp> _STLP_CALL operator>>(const valarray<_Tp>& __x,
-                               const valarray<_Tp>& __y) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __x[__i] >> __y[__i];
-  return __tmp;
-}
-
-// Binary arithmetic operations between an array and a scalar.
-
-template <class _Tp> 
-inline valarray<_Tp> _STLP_CALL operator*(const valarray<_Tp>& __x, const _Tp& __c) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __x[__i]  * __c;
-  return __tmp;
-}
-
-template <class _Tp> 
-inline valarray<_Tp> _STLP_CALL operator*(const _Tp& __c, const valarray<_Tp>& __x) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __c * __x[__i];
-  return __tmp;
-}
-
-template <class _Tp> 
-inline valarray<_Tp> _STLP_CALL operator/(const valarray<_Tp>& __x, const _Tp& __c) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __x[__i]  / __c;
-  return __tmp;
-}
-
-template <class _Tp> 
-inline valarray<_Tp> _STLP_CALL operator/(const _Tp& __c, const valarray<_Tp>& __x) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __c / __x[__i];
-  return __tmp;
-}
-
-template <class _Tp> 
-inline valarray<_Tp> _STLP_CALL operator%(const valarray<_Tp>& __x, const _Tp& __c) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __x[__i]  % __c;
-  return __tmp;
-}
-
-template <class _Tp> 
-inline valarray<_Tp> _STLP_CALL operator%(const _Tp& __c, const valarray<_Tp>& __x) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __c % __x[__i];
-  return __tmp;
-}
-
-template <class _Tp> 
-inline valarray<_Tp> _STLP_CALL operator+(const valarray<_Tp>& __x, const _Tp& __c) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __x[__i]  + __c;
-  return __tmp;
-}
-
-template <class _Tp> 
-inline valarray<_Tp> _STLP_CALL operator+(const _Tp& __c, const valarray<_Tp>& __x) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __c + __x[__i];
-  return __tmp;
-}
-
-template <class _Tp> 
-inline valarray<_Tp> _STLP_CALL operator-(const valarray<_Tp>& __x, const _Tp& __c) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __x[__i]  - __c;
-  return __tmp;
-}
-
-template <class _Tp> 
-inline valarray<_Tp> _STLP_CALL operator-(const _Tp& __c, const valarray<_Tp>& __x) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __c - __x[__i];
-  return __tmp;
-}
-
-template <class _Tp> 
-inline valarray<_Tp> _STLP_CALL operator^(const valarray<_Tp>& __x, const _Tp& __c) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __x[__i]  ^ __c;
-  return __tmp;
-}
-
-template <class _Tp> 
-inline valarray<_Tp> _STLP_CALL operator^(const _Tp& __c, const valarray<_Tp>& __x) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __c ^ __x[__i];
-  return __tmp;
-}
-
-template <class _Tp> 
-inline valarray<_Tp> _STLP_CALL operator&(const valarray<_Tp>& __x, const _Tp& __c) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __x[__i]  & __c;
-  return __tmp;
-}
-
-template <class _Tp> 
-inline valarray<_Tp> _STLP_CALL operator&(const _Tp& __c, const valarray<_Tp>& __x) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __c & __x[__i];
-  return __tmp;
-}
-
-template <class _Tp> 
-inline valarray<_Tp> _STLP_CALL operator|(const valarray<_Tp>& __x, const _Tp& __c) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __x[__i]  | __c;
-  return __tmp;
-}
-
-template <class _Tp> 
-inline valarray<_Tp> _STLP_CALL operator|(const _Tp& __c, const valarray<_Tp>& __x) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __c | __x[__i];
-  return __tmp;
-}
-
-template <class _Tp> 
-inline valarray<_Tp> _STLP_CALL operator<<(const valarray<_Tp>& __x, const _Tp& __c) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __x[__i]  << __c;
-  return __tmp;
-}
-
-template <class _Tp> 
-inline valarray<_Tp> _STLP_CALL operator<<(const _Tp& __c, const valarray<_Tp>& __x) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __c << __x[__i];
-  return __tmp;
-}
-
-template <class _Tp> 
-inline valarray<_Tp> _STLP_CALL operator>>(const valarray<_Tp>& __x, const _Tp& __c) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __x[__i]  >> __c;
-  return __tmp;
-}
-
-template <class _Tp> 
-inline valarray<_Tp> _STLP_CALL operator>>(const _Tp& __c, const valarray<_Tp>& __x) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __c >> __x[__i];
-  return __tmp;
-}
-
-// Binary logical operations between two arrays.  Behavior is undefined
-// if the two arrays have different lengths.  Note that operator== does
-// not do what you might at first expect.
-
-template <class _Tp> 
-inline _Valarray_bool _STLP_CALL operator==(const valarray<_Tp>& __x,
-                                 const valarray<_Tp>& __y)
-{
-  _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __x[__i] == __y[__i];
-  return __tmp;  
-}
-
-template <class _Tp> 
-inline _Valarray_bool _STLP_CALL operator<(const valarray<_Tp>& __x,
-                                const valarray<_Tp>& __y)
-{
-  _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __x[__i] < __y[__i];
-  return __tmp;  
-}
-
-#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE
-
-template <class _Tp> 
-inline _Valarray_bool _STLP_CALL operator!=(const valarray<_Tp>& __x,
-                                 const valarray<_Tp>& __y)
-{
-  _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __x[__i] != __y[__i];
-  return __tmp;  
-}
-
-template <class _Tp> 
-inline _Valarray_bool _STLP_CALL operator>(const valarray<_Tp>& __x,
-                                const valarray<_Tp>& __y)
-{
-  _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __x[__i] > __y[__i];
-  return __tmp;  
-}
-
-template <class _Tp> 
-inline _Valarray_bool _STLP_CALL operator<=(const valarray<_Tp>& __x,
-                                 const valarray<_Tp>& __y)
-{
-  _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __x[__i] <= __y[__i];
-  return __tmp;  
-}
-
-template <class _Tp> 
-inline _Valarray_bool _STLP_CALL operator>=(const valarray<_Tp>& __x,
-                                 const valarray<_Tp>& __y)
-{
-  _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __x[__i] >= __y[__i];
-  return __tmp;  
-}
-
-#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */
-// fbp : swap ?
-
-template <class _Tp> 
-inline _Valarray_bool _STLP_CALL operator&&(const valarray<_Tp>& __x,
-                                 const valarray<_Tp>& __y)
-{
-  _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __x[__i] && __y[__i];
-  return __tmp;  
-}
-
-template <class _Tp> 
-inline _Valarray_bool _STLP_CALL operator||(const valarray<_Tp>& __x,
-                                 const valarray<_Tp>& __y)
-{
-  _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __x[__i] || __y[__i];
-  return __tmp;  
-}
-
-// Logical operations between an array and a scalar.
-
-template <class _Tp>
-inline _Valarray_bool _STLP_CALL operator==(const valarray<_Tp>& __x, const _Tp& __c)
-{
-  _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __x[__i] == __c;
-  return __tmp;  
-}
-
-template <class _Tp>
-inline _Valarray_bool _STLP_CALL operator==(const _Tp& __c, const valarray<_Tp>& __x)
-{
-  _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __c == __x[__i];
-  return __tmp;  
-}
-
-template <class _Tp>
-inline _Valarray_bool _STLP_CALL operator!=(const valarray<_Tp>& __x, const _Tp& __c)
-{
-  _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __x[__i] != __c;
-  return __tmp;  
-}
-
-template <class _Tp>
-inline _Valarray_bool _STLP_CALL operator!=(const _Tp& __c, const valarray<_Tp>& __x)
-{
-  _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __c != __x[__i];
-  return __tmp;  
-}
-
-template <class _Tp>
-inline _Valarray_bool _STLP_CALL operator<(const valarray<_Tp>& __x, const _Tp& __c)
-{
-  _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __x[__i] < __c;
-  return __tmp;  
-}
-
-template <class _Tp>
-inline _Valarray_bool _STLP_CALL operator<(const _Tp& __c, const valarray<_Tp>& __x)
-{
-  _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __c < __x[__i];
-  return __tmp;  
-}
-
-template <class _Tp>
-inline _Valarray_bool _STLP_CALL operator>(const valarray<_Tp>& __x, const _Tp& __c)
-{
-  _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __x[__i] > __c;
-  return __tmp;  
-}
-
-template <class _Tp>
-inline _Valarray_bool _STLP_CALL operator>(const _Tp& __c, const valarray<_Tp>& __x)
-{
-  _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __c > __x[__i];
-  return __tmp;  
-}
-
-template <class _Tp>
-inline _Valarray_bool _STLP_CALL operator<=(const valarray<_Tp>& __x, const _Tp& __c)
-{
-  _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __x[__i]  <= __c;
-  return __tmp;  
-}
-
-template <class _Tp>
-inline _Valarray_bool _STLP_CALL operator<=(const _Tp& __c, const valarray<_Tp>& __x)
-{
-  _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __c <= __x[__i];
-  return __tmp;  
-}
-
-template <class _Tp>
-inline _Valarray_bool _STLP_CALL operator>=(const valarray<_Tp>& __x, const _Tp& __c)
-{
-  _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __x[__i] >= __c;
-  return __tmp;  
-}
-
-template <class _Tp>
-inline _Valarray_bool _STLP_CALL operator>=(const _Tp& __c, const valarray<_Tp>& __x)
-{
-  _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __c >= __x[__i];
-  return __tmp;  
-}
-
-template <class _Tp>
-inline _Valarray_bool _STLP_CALL operator&&(const valarray<_Tp>& __x, const _Tp& __c)
-{
-  _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __x[__i] && __c;
-  return __tmp;  
-}
-
-template <class _Tp>
-inline _Valarray_bool _STLP_CALL operator&&(const _Tp& __c, const valarray<_Tp>& __x)
-{
-  _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __c && __x[__i];
-  return __tmp;  
-}
-
-template <class _Tp>
-inline _Valarray_bool _STLP_CALL operator||(const valarray<_Tp>& __x, const _Tp& __c)
-{
-  _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __x[__i] || __c;
-  return __tmp;  
-}
-
-template <class _Tp>
-inline _Valarray_bool _STLP_CALL operator||(const _Tp& __c, const valarray<_Tp>& __x)
-{
-  _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = __c || __x[__i];
-  return __tmp;  
-}
-
-// valarray "transcendentals" (the list includes abs and sqrt, which,
-// of course, are not transcendental).
-
-template <class _Tp>
-inline valarray<_Tp> abs(const valarray<_Tp>& __x) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = _STLP_DO_ABS(_Tp)(__x[__i]);
-  return __tmp;
-}
-
-template <class _Tp>
-inline valarray<_Tp> acos(const valarray<_Tp>& __x) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = _STLP_DO_ACOS(_Tp)(__x[__i]);
-  return __tmp;
-}
-
-template <class _Tp>
-inline valarray<_Tp> asin(const valarray<_Tp>& __x) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = _STLP_DO_ASIN(_Tp)(__x[__i]);
-  return __tmp;
-}
-
-template <class _Tp>
-inline valarray<_Tp> atan(const valarray<_Tp>& __x) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = _STLP_DO_ATAN(_Tp)(__x[__i]);
-  return __tmp;
-}
-
-template <class _Tp>
-inline valarray<_Tp> atan2(const valarray<_Tp>& __x,
-                           const valarray<_Tp>& __y) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = _STLP_DO_ATAN2(_Tp)(__x[__i], __y[__i]);
-  return __tmp;
-}
-
-template <class _Tp>
-inline valarray<_Tp> atan2(const valarray<_Tp>& __x, const _Tp& __c) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = _STLP_DO_ATAN2(_Tp)(__x[__i], __c);
-  return __tmp;
-}
-
-template <class _Tp>
-inline valarray<_Tp> atan2(const _Tp& __c, const valarray<_Tp>& __x) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = _STLP_DO_ATAN2(_Tp)(__c, __x[__i]);
-  return __tmp;
-}
-
-template <class _Tp>
-inline valarray<_Tp> cos(const valarray<_Tp>& __x) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = _STLP_DO_COS(_Tp)(__x[__i]);
-  return __tmp;
-}
-
-template <class _Tp>
-inline valarray<_Tp> cosh(const valarray<_Tp>& __x) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = _STLP_DO_COSH(_Tp)(__x[__i]);
-  return __tmp;
-}
-
-template <class _Tp>
-inline valarray<_Tp> exp(const valarray<_Tp>& __x) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = _STLP_DO_EXP(_Tp)(__x[__i]);
-  return __tmp;
-}
-
-template <class _Tp>
-inline valarray<_Tp> log(const valarray<_Tp>& __x) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = _STLP_DO_LOG(_Tp)(__x[__i]);
-  return __tmp;
-}
-
-template <class _Tp>
-inline valarray<_Tp> log10(const valarray<_Tp>& __x) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = _STLP_DO_LOG10(_Tp)(__x[__i]);
-  return __tmp;
-}
-
-template <class _Tp>
-inline valarray<_Tp> pow(const valarray<_Tp>& __x,
-                           const valarray<_Tp>& __y) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = _STLP_DO_POW(_Tp)(__x[__i], __y[__i]);
-  return __tmp;
-}
-
-template <class _Tp>
-inline valarray<_Tp> pow(const valarray<_Tp>& __x, const _Tp& __c) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = _STLP_DO_POW(_Tp)(__x[__i], __c);
-  return __tmp;
-}
-
-template <class _Tp>
-inline valarray<_Tp> pow(const _Tp& __c, const valarray<_Tp>& __x) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = _STLP_DO_POW(_Tp)(__c, __x[__i]);
-  return __tmp;
-}
-
-template <class _Tp>
-inline valarray<_Tp> sin(const valarray<_Tp>& __x) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = _STLP_DO_SIN(_Tp)(__x[__i]);
-  return __tmp;
-}
-
-template <class _Tp>
-inline valarray<_Tp> sinh(const valarray<_Tp>& __x) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = _STLP_DO_SINH(_Tp)(__x[__i]);
-  return __tmp;
-}
-
-template <class _Tp>
-inline valarray<_Tp> sqrt(const valarray<_Tp>& __x) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = _STLP_DO_SQRT(_Tp)(__x[__i]);
-  return __tmp;
-}
-
-template <class _Tp>
-inline valarray<_Tp> tan(const valarray<_Tp>& __x) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = _STLP_DO_TAN(_Tp)(__x[__i]);
-  return __tmp;
-}
-
-template <class _Tp>
-inline valarray<_Tp> tanh(const valarray<_Tp>& __x) {
-  typedef typename valarray<_Tp>::_NoInit _NoInit;
-  valarray<_Tp> __tmp(__x.size(), _NoInit());
-  for (size_t __i = 0; __i < __x.size(); ++__i)
-    __tmp[__i] = _STLP_DO_TANH(_Tp)(__x[__i]);
-  return __tmp;
-}
-
-//----------------------------------------------------------------------
-// slice and slice_array
-
-class slice {
-public:
-  slice() : _M_start(0), _M_length(0), _M_stride(0) {}
-  slice(size_t __start, size_t __length, size_t __stride)
-    : _M_start(__start), _M_length(__length), _M_stride(__stride)
-    {}
-  __TRIVIAL_DESTRUCTOR(slice)
-
-  size_t start()  const { return _M_start; }
-  size_t size()   const { return _M_length; }
-  size_t stride() const { return _M_stride; }
-
-   
-private:
-  size_t _M_start;
-  size_t _M_length;
-  size_t _M_stride;
-};
-
-template <class _Tp>
-class slice_array {
-  friend class valarray<_Tp>;
-public:
-  typedef _Tp value_type;
-
-  void operator=(const valarray<value_type>& __x) const {
-    size_t __index = _M_slice.start();
-    for (size_t __i = 0;
-         __i < _M_slice.size();
-         ++__i, __index += _M_slice.stride())
-      _M_array[__index] = __x[__i];
-  }
-
-  void operator*=(const valarray<value_type>& __x) const {
-    size_t __index = _M_slice.start();
-    for (size_t __i = 0;
-         __i < _M_slice.size();
-         ++__i, __index += _M_slice.stride())
-      _M_array[__index] *= __x[__i];
-  }
-
-  void operator/=(const valarray<value_type>& __x) const {
-    size_t __index = _M_slice.start();
-    for (size_t __i = 0;
-         __i < _M_slice.size();
-         ++__i, __index += _M_slice.stride())
-      _M_array[__index] /= __x[__i];
-  }
-
-  void operator%=(const valarray<value_type>& __x) const {
-    size_t __index = _M_slice.start();
-    for (size_t __i = 0;
-         __i < _M_slice.size();
-         ++__i, __index += _M_slice.stride())
-      _M_array[__index] %= __x[__i];
-  }
-
-  void operator+=(const valarray<value_type>& __x) const {
-    size_t __index = _M_slice.start();
-    for (size_t __i = 0;
-         __i < _M_slice.size();
-         ++__i, __index += _M_slice.stride())
-      _M_array[__index] += __x[__i];
-  }
-
-  void operator-=(const valarray<value_type>& __x) const {
-    size_t __index = _M_slice.start();
-    for (size_t __i = 0;
-         __i < _M_slice.size();
-         ++__i, __index += _M_slice.stride())
-      _M_array[__index] -= __x[__i];
-  }
-
-  void operator^=(const valarray<value_type>& __x) const {
-    size_t __index = _M_slice.start();
-    for (size_t __i = 0;
-         __i < _M_slice.size();
-         ++__i, __index += _M_slice.stride())
-      _M_array[__index] ^= __x[__i];
-  }
-
-  void operator&=(const valarray<value_type>& __x) const {
-    size_t __index = _M_slice.start();
-    for (size_t __i = 0;
-         __i < _M_slice.size();
-         ++__i, __index += _M_slice.stride())
-      _M_array[__index] &= __x[__i];
-  }
-
-  void operator|=(const valarray<value_type>& __x) const {
-    size_t __index = _M_slice.start();
-    for (size_t __i = 0;
-         __i < _M_slice.size();
-         ++__i, __index += _M_slice.stride())
-      _M_array[__index] |= __x[__i];
-  }
-
-  void operator<<=(const valarray<value_type>& __x) const {
-    size_t __index = _M_slice.start();
-    for (size_t __i = 0;
-         __i < _M_slice.size();
-         ++__i, __index += _M_slice.stride())
-      _M_array[__index] <<= __x[__i];
-  }
-
-  void operator>>=(const valarray<value_type>& __x) const {
-    size_t __index = _M_slice.start();
-    for (size_t __i = 0;
-         __i < _M_slice.size();
-         ++__i, __index += _M_slice.stride())
-      _M_array[__index] >>= __x[__i];
-  }
-
-  void operator=(const value_type& __c) {
-    size_t __index = _M_slice.start();
-    for (size_t __i = 0;
-         __i < _M_slice.size();
-         ++__i, __index += _M_slice.stride())
-      _M_array[__index] = __c;
-  }
-
-  ~slice_array() {}
-
-private:
-  slice_array(const slice& __slice, valarray<_Tp>& __array)
-    : _M_slice(__slice), _M_array(__array)
-    {}
-
-  slice          _M_slice;
-  valarray<_Tp>& _M_array;
-
-private:                        // Disable assignment and default constructor
-  slice_array();
-};
-
-// valarray member functions dealing with slice and slice_array
-
-template <class _Tp>
-inline valarray<_Tp>::valarray(const slice_array<_Tp>& __x)
-  : _Valarray_base<_Tp>(__x._M_slice.size())
-{
-  typedef typename __type_traits<_Tp>::has_trivial_default_constructor
-          _Is_Trivial;
-  _M_initialize(_Is_Trivial());  
-  *this = __x;
-}
-
-
-template <class _Tp>
-inline slice_array<_Tp> valarray<_Tp>::operator[](slice __slice) {
-  return slice_array<_Tp>(__slice, *this);
-}
-
-//----------------------------------------------------------------------
-// gslice and gslice_array
-
-template <class _Size>
-struct _Gslice_Iter_tmpl;
-
-class gslice {
-  friend struct _Gslice_Iter_tmpl<size_t>;
-public:
-  gslice() : _M_start(0), _M_lengths(0), _M_strides(0) {}
-  gslice(size_t __start,
-         const _Valarray_size_t& __lengths, const _Valarray_size_t& __strides)
-    : _M_start(__start), _M_lengths(__lengths), _M_strides(__strides)
-    {}
-  __TRIVIAL_DESTRUCTOR(gslice)
-
-  size_t start()            const { return _M_start; }
-  _Valarray_size_t size()   const { return _M_lengths; }
-  _Valarray_size_t stride() const { return _M_strides; }
-
-  // Extension: check for an empty gslice.
-  bool _M_empty() const { return _M_lengths.size() == 0; }
-
-  // Extension: number of indices this gslice represents.  (For a degenerate
-  // gslice, they're not necessarily all distinct.)
-  size_t _M_size() const {
-    return !this->_M_empty()
-      ? accumulate(_M_lengths._M_first + 1,
-                   _M_lengths._M_first + _M_lengths._M_size,
-                   _M_lengths[0],
-                   multiplies<size_t>())
-      : 0;
-  }
-
-# ifndef __HP_aCC
-private:
-# endif
-
-  size_t _M_start;
-  _Valarray_size_t _M_lengths;
-  _Valarray_size_t _M_strides;
-};
-
-// This is not an STL iterator.  It is constructed from a gslice, and it
-// steps through the gslice indices in sequence.  See 23.3.6 of the C++
-// standard, paragraphs 2-3, for an explanation of the sequence.  At
-// each step we get two things: the ordinal (i.e. number of steps taken),
-// and the one-dimensional index.
-
-template <class _Size>
-struct _Gslice_Iter_tmpl {
-  _Gslice_Iter_tmpl(const gslice& __gslice)
-    : _M_step(0), _M_1d_idx(__gslice.start()),
-      _M_indices(size_t(0), __gslice._M_lengths.size()),
-      _M_gslice(__gslice)
-    {}
-    
-  bool _M_done() const { return _M_indices[0] == _M_gslice._M_lengths[0]; }
-
-  bool _M_incr();
-
-  _Size _M_step;
-  _Size _M_1d_idx;
-
-  valarray<_Size> _M_indices;
-  const gslice& _M_gslice;
-};
-
-typedef _Gslice_Iter_tmpl<size_t> _Gslice_Iter;
-
-template <class _Tp>
-class gslice_array {
-  friend class valarray<_Tp>;
-public:
-  typedef _Tp value_type;
-
-  void operator= (const valarray<value_type>& __x) const {
-    if (!_M_gslice._M_empty()) {
-      _Gslice_Iter __i(_M_gslice);
-      do _M_array[__i._M_1d_idx] = __x[__i._M_step]; while(__i._M_incr());
-    }
-  }
-
-  void operator*= (const valarray<value_type>& __x) const {
-    if (!_M_gslice._M_empty()) {
-      _Gslice_Iter __i(_M_gslice);
-      do _M_array[__i._M_1d_idx] *= __x[__i._M_step]; while(__i._M_incr());
-    }
-  }
-
-  void operator/= (const valarray<value_type>& __x) const {
-    if (!_M_gslice._M_empty()) {
-      _Gslice_Iter __i(_M_gslice);
-      do _M_array[__i._M_1d_idx] /= __x[__i._M_step]; while(__i._M_incr());
-    }
-  }
-
-  void operator%= (const valarray<value_type>& __x) const {
-    if (!_M_gslice._M_empty()) {
-      _Gslice_Iter __i(_M_gslice);
-      do _M_array[__i._M_1d_idx] %= __x[__i._M_step]; while(__i._M_incr());
-    }
-  }
-
-  void operator+= (const valarray<value_type>& __x) const {
-    if (!_M_gslice._M_empty()) {
-      _Gslice_Iter __i(_M_gslice);
-      do _M_array[__i._M_1d_idx] += __x[__i._M_step]; while(__i._M_incr());
-    }
-  }
-
-  void operator-= (const valarray<value_type>& __x) const {
-    if (!_M_gslice._M_empty()) {
-      _Gslice_Iter __i(_M_gslice);
-      do _M_array[__i._M_1d_idx] -= __x[__i._M_step]; while(__i._M_incr());
-    }
-  }
-
-  void operator^= (const valarray<value_type>& __x) const {
-    if (!_M_gslice._M_empty()) {
-      _Gslice_Iter __i(_M_gslice);
-      do _M_array[__i._M_1d_idx] ^= __x[__i._M_step]; while(__i._M_incr());
-    }
-  }
-
-  void operator&= (const valarray<value_type>& __x) const {
-    if (!_M_gslice._M_empty()) {
-      _Gslice_Iter __i(_M_gslice);
-      do _M_array[__i._M_1d_idx] &= __x[__i._M_step]; while(__i._M_incr());
-    }
-  }
-
-  void operator|= (const valarray<value_type>& __x) const {
-    if (!_M_gslice._M_empty()) {
-      _Gslice_Iter __i(_M_gslice);
-      do _M_array[__i._M_1d_idx] |= __x[__i._M_step]; while(__i._M_incr());
-    }
-  }
-
-  void operator<<= (const valarray<value_type>& __x) const {
-    if (!_M_gslice._M_empty()) {
-      _Gslice_Iter __i(_M_gslice);
-      do _M_array[__i._M_1d_idx] <<= __x[__i._M_step]; while(__i._M_incr());
-    }
-  }
-
-  void operator>>= (const valarray<value_type>& __x) const {
-    if (!_M_gslice._M_empty()) {
-      _Gslice_Iter __i(_M_gslice);
-      do _M_array[__i._M_1d_idx] >>= __x[__i._M_step]; while(__i._M_incr());
-    }
-  }
-
-  void operator= (const value_type& __c) {
-    if (!_M_gslice._M_empty()) {
-      _Gslice_Iter __i(_M_gslice);
-      do _M_array[__i._M_1d_idx] = __c; while(__i._M_incr());
-    }
-  }
-
-  ~gslice_array() {}
-
-private:                        
-  gslice_array(gslice __gslice, valarray<_Tp>& __array)
-    : _M_gslice(__gslice), _M_array(__array)
-    {}
-
-  gslice                _M_gslice;
-  valarray<value_type>& _M_array;
-
-private:                        // Disable assignment
-  void operator=(const gslice_array<_Tp>&);
-};
-
-// valarray member functions dealing with gslice and gslice_array.  Note
-// that it is illegal (behavior is undefined) to construct a gslice_array
-// from a degenerate gslice.
-
-template <class _Tp>
-inline valarray<_Tp>::valarray(const gslice_array<_Tp>& __x)
-  : _Valarray_base<_Tp>(__x._M_gslice._M_size())
-{
-  typedef typename __type_traits<_Tp>::has_trivial_default_constructor
-          _Is_Trivial;
-  _M_initialize(_Is_Trivial());  
-  *this = __x;
-}
-
-template <class _Tp>
-inline gslice_array<_Tp> valarray<_Tp>::operator[](const gslice& __slice) {
-  return gslice_array<_Tp>(__slice, *this);
-}
-
-
-//----------------------------------------------------------------------
-// mask_array
-
-template <class _Tp>
-class mask_array {
-  friend class valarray<_Tp>;
-public:
-  typedef _Tp value_type;
-
-  void operator=(const valarray<value_type>& __x) const {
-    size_t __idx = 0;
-    for (size_t __i = 0; __i < _M_array.size(); ++__i)
-      if (_M_mask[__i]) _M_array[__i] = __x[__idx++];
-  }
-
-  void operator*=(const valarray<value_type>& __x) const {
-    size_t __idx = 0;
-    for (size_t __i = 0; __i < _M_array.size(); ++__i)
-      if (_M_mask[__i]) _M_array[__i] *= __x[__idx++];
-  }
-
-  void operator/=(const valarray<value_type>& __x) const {
-    size_t __idx = 0;
-    for (size_t __i = 0; __i < _M_array.size(); ++__i)
-      if (_M_mask[__i]) _M_array[__i] /= __x[__idx++];
-  }
-
-  void operator%=(const valarray<value_type>& __x) const {
-    size_t __idx = 0;
-    for (size_t __i = 0; __i < _M_array.size(); ++__i)
-      if (_M_mask[__i]) _M_array[__i] %= __x[__idx++];
-  }
-
-  void operator+=(const valarray<value_type>& __x) const {
-    size_t __idx = 0;
-    for (size_t __i = 0; __i < _M_array.size(); ++__i)
-      if (_M_mask[__i]) _M_array[__i] += __x[__idx++];
-  }
-
-  void operator-=(const valarray<value_type>& __x) const {
-    size_t __idx = 0;
-    for (size_t __i = 0; __i < _M_array.size(); ++__i)
-      if (_M_mask[__i]) _M_array[__i] -= __x[__idx++];
-  }
-  
-  void operator^=(const valarray<value_type>& __x) const {
-    size_t __idx = 0;
-    for (size_t __i = 0; __i < _M_array.size(); ++__i)
-      if (_M_mask[__i]) _M_array[__i] ^= __x[__idx++];
-  }
-
-  void operator&=(const valarray<value_type>& __x) const {
-    size_t __idx = 0;
-    for (size_t __i = 0; __i < _M_array.size(); ++__i)
-      if (_M_mask[__i]) _M_array[__i] &= __x[__idx++];
-  }
-
-  void operator|=(const valarray<value_type>& __x) const {
-    size_t __idx = 0;
-    for (size_t __i = 0; __i < _M_array.size(); ++__i)
-      if (_M_mask[__i]) _M_array[__i] |= __x[__idx++];
-  }
-
-  void operator<<=(const valarray<value_type>& __x) const {
-    size_t __idx = 0;
-    for (size_t __i = 0; __i < _M_array.size(); ++__i)
-      if (_M_mask[__i]) _M_array[__i] <<= __x[__idx++];
-  }
-
-  void operator>>=(const valarray<value_type>& __x) const {
-    size_t __idx = 0;
-    for (size_t __i = 0; __i < _M_array.size(); ++__i)
-      if (_M_mask[__i]) _M_array[__i] >>= __x[__idx++];
-  }
-
-  void operator=(const value_type& __c) const {
-    for (size_t __i = 0; __i < _M_array.size(); ++__i)
-      if (_M_mask[__i]) _M_array[__i] = __c;
-  }
-
-  ~mask_array() {}
-
-  // Extension: number of true values in the mask
-  size_t _M_num_true() const {
-    size_t __result = 0;
-    for (size_t __i = 0; __i < _M_mask.size(); ++__i)
-      if (_M_mask[__i]) ++__result;
-    return __result;
-  }
-
-private:
-  mask_array(const _Valarray_bool& __mask, valarray<_Tp>& __array)
-    : _M_mask(__mask), _M_array(__array)
-    {}
-
-  _Valarray_bool _M_mask;
-  valarray<_Tp>& _M_array;
-
-private:                        // Disable assignment
-  void operator=(const mask_array<_Tp>&);
-};
-
-// valarray member functions dealing with mask_array
-
-template <class _Tp>
-inline valarray<_Tp>::valarray(const mask_array<_Tp>& __x)
-  : _Valarray_base<_Tp>(__x._M_num_true())
-{
-  typedef typename __type_traits<_Tp>::has_trivial_default_constructor
-          _Is_Trivial;
-  _M_initialize(_Is_Trivial());  
-  *this = __x;
-}
-
-// Behavior is undefined if __x._M_num_true() != this->size()
-template <class _Tp>
-inline valarray<_Tp>& valarray<_Tp>::operator=(const mask_array<_Tp>& __x) {
-  size_t __idx = 0;
-  for (size_t __i = 0; __i < __x._M_array.size(); ++__i)
-    if (__x._M_mask[__i]) (*this)[__idx++] = __x._M_array[__i];
-  return *this;
-}
-
-template <class _Tp>
-inline mask_array<_Tp> valarray<_Tp>::operator[](const _Valarray_bool& __mask)
-{
-  return mask_array<_Tp>(__mask, *this);
-}
-
-
-//----------------------------------------------------------------------
-// indirect_array
-
-template <class _Tp>
-class indirect_array {
-  friend class valarray<_Tp>;
-public:
-  typedef _Tp value_type;
-
-  void operator=(const valarray<value_type>& __x) const {
-    for (size_t __i = 0; __i < _M_addr.size(); ++__i)
-      _M_array[_M_addr[__i]] = __x[__i];
-  }
-
-  void operator*=(const valarray<value_type>& __x) const {
-    for (size_t __i = 0; __i < _M_addr.size(); ++__i)
-      _M_array[_M_addr[__i]] *= __x[__i];
-  }
-
-  void operator/=(const valarray<value_type>& __x) const {
-    for (size_t __i = 0; __i < _M_addr.size(); ++__i)
-      _M_array[_M_addr[__i]] /= __x[__i];
-  }
-
-  void operator%=(const valarray<value_type>& __x) const {
-    for (size_t __i = 0; __i < _M_addr.size(); ++__i)
-      _M_array[_M_addr[__i]] %= __x[__i];
-  }
-
-  void operator+=(const valarray<value_type>& __x) const {
-    for (size_t __i = 0; __i < _M_addr.size(); ++__i)
-      _M_array[_M_addr[__i]] += __x[__i];
-  }
-
-  void operator-=(const valarray<value_type>& __x) const {
-    for (size_t __i = 0; __i < _M_addr.size(); ++__i)
-      _M_array[_M_addr[__i]] -= __x[__i];
-  }
-
-  void operator^=(const valarray<value_type>& __x) const {
-    for (size_t __i = 0; __i < _M_addr.size(); ++__i)
-      _M_array[_M_addr[__i]] ^= __x[__i];
-  }
-
-  void operator&=(const valarray<value_type>& __x) const {
-    for (size_t __i = 0; __i < _M_addr.size(); ++__i)
-      _M_array[_M_addr[__i]] &= __x[__i];
-  }
-
-  void operator|=(const valarray<value_type>& __x) const {
-    for (size_t __i = 0; __i < _M_addr.size(); ++__i)
-      _M_array[_M_addr[__i]] |= __x[__i];
-  }
-
-  void operator<<=(const valarray<value_type>& __x) const {
-    for (size_t __i = 0; __i < _M_addr.size(); ++__i)
-      _M_array[_M_addr[__i]] <<= __x[__i];
-  }
-
-  void operator>>=(const valarray<value_type>& __x) const {
-    for (size_t __i = 0; __i < _M_addr.size(); ++__i)
-      _M_array[_M_addr[__i]] >>= __x[__i];
-  }
-
-  void operator=(const value_type& __c) const {
-    for (size_t __i = 0; __i < _M_addr.size(); ++__i)
-      _M_array[_M_addr[__i]] = __c;
-  }
-
-  ~indirect_array() {}
-
-private:
-  indirect_array(const _Valarray_size_t& __addr, valarray<_Tp>& __array)
-    : _M_addr(__addr), _M_array(__array)
-    {}
-
-  _Valarray_size_t _M_addr;
-  valarray<_Tp>&   _M_array;
-
-private:                        // Disable assignment
-  void operator=(const indirect_array<_Tp>&);
-};
-
-// valarray member functions dealing with indirect_array
-
-template <class _Tp>
-inline valarray<_Tp>::valarray(const indirect_array<_Tp>& __x)
-  : _Valarray_base<_Tp>(__x._M_addr.size())
-{
-  typedef typename __type_traits<_Tp>::has_trivial_default_constructor
-          _Is_Trivial;
-  _M_initialize(_Is_Trivial());  
-  *this = __x;
-}
-
-
-template <class _Tp>
-inline indirect_array<_Tp>
-valarray<_Tp>::operator[](const _Valarray_size_t& __addr)
-{
-  return indirect_array<_Tp>(__addr, *this);
-}
-
-_STLP_END_NAMESPACE
-
-# if !defined (_STLP_LINK_TIME_INSTANTIATION)
-#  include <stl/_valarray.c>
-# endif
-
-#endif /* _STLP_VALARRAY */
-
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/_vector.c b/src/STLport/stl/_vector.c
deleted file mode 100644
index 30ec488..0000000
--- a/src/STLport/stl/_vector.c
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- *
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-#ifndef _STLP_VECTOR_C
-#define _STLP_VECTOR_C
-
-# if !defined (_STLP_INTERNAL_VECTOR_H)
-#  include <stl/_vector.h>
-# endif
-
-# if defined ( _STLP_NESTED_TYPE_PARAM_BUG )
-#  define iterator       _Tp*
-#  define size_type           size_t
-# endif
-
-#  undef  vector
-#  define vector __WORKAROUND_DBG_RENAME(vector)
-
-_STLP_BEGIN_NAMESPACE
-
-template <class _Tp, class _Alloc>
-void 
-__vector__<_Tp, _Alloc>::reserve(size_type __n) {
-  if (capacity() < __n) {
-    const size_type __old_size = size();
-    pointer __tmp;
-    if (this->_M_start) {
-      __tmp = _M_allocate_and_copy(__n, this->_M_start, this->_M_finish);
-      _M_clear();
-    } else {
-      __tmp = this->_M_end_of_storage.allocate(__n);
-    }
-    _M_set(__tmp, __tmp + __old_size, __tmp + __n);
-  }
-}
-
-template <class _Tp, class _Alloc>
-void 
-__vector__<_Tp, _Alloc>::_M_fill_insert(
-				    iterator __position, 
-				    size_type __n, const _Tp& __x) {
-  if (__n != 0) {
-    if (size_type(this->_M_end_of_storage._M_data - this->_M_finish) >= __n) {
-      _Tp __x_copy = __x;
-      const size_type __elems_after = this->_M_finish - __position;
-      pointer __old_finish = this->_M_finish;
-      if (__elems_after > __n) {
-        __uninitialized_copy(this->_M_finish - __n, this->_M_finish, this->_M_finish, _IsPODType());
-        this->_M_finish += __n;
-        __copy_backward_ptrs(__position, __old_finish - __n, __old_finish, _TrivialAss());
-        _STLP_STD::fill(__position, __position + __n, __x_copy);
-      }
-      else {
-        uninitialized_fill_n(this->_M_finish, __n - __elems_after, __x_copy);
-        this->_M_finish += __n - __elems_after;
-        __uninitialized_copy(__position, __old_finish, this->_M_finish, _IsPODType());
-        this->_M_finish += __elems_after;
-        _STLP_STD::fill(__position, __old_finish, __x_copy);
-      }
-    }
-    else 
-      _M_insert_overflow(__position, __x, _IsPODType(), __n);
-  }
-}
-
-template <class _Tp, class _Alloc>
-__vector__<_Tp,_Alloc>& 
-__vector__<_Tp,_Alloc>::operator=(const __vector__<_Tp, _Alloc>& __x)
-{
-  if (&__x != this) {
-    const size_type __xlen = __x.size();
-    if (__xlen > capacity()) {
-      pointer __tmp = _M_allocate_and_copy(__xlen, (const_pointer)__x._M_start+0, (const_pointer)__x._M_finish+0);
-      _M_clear();
-      this->_M_start = __tmp;
-      this->_M_end_of_storage._M_data = this->_M_start + __xlen;
-    }
-    else if (size() >= __xlen) {
-      pointer __i = __copy_ptrs((const_pointer)__x._M_start+0, (const_pointer)__x._M_finish+0, (pointer)this->_M_start, _TrivialAss());
-      _STLP_STD::_Destroy(__i, this->_M_finish);
-    }
-    else {
-      __copy_ptrs((const_pointer)__x._M_start, (const_pointer)__x._M_start + size(), (pointer)this->_M_start, _TrivialAss());
-      __uninitialized_copy((const_pointer)__x._M_start + size(), (const_pointer)__x._M_finish+0, this->_M_finish, _IsPODType());
-    }
-    this->_M_finish = this->_M_start + __xlen;
-  }
-  return *this;
-}
-
-template <class _Tp, class _Alloc>
-void __vector__<_Tp, _Alloc>::_M_fill_assign(size_t __n, const _Tp& __val) {
-  if (__n > capacity()) {
-    __vector__<_Tp, _Alloc> __tmp(__n, __val, get_allocator());
-    __tmp.swap(*this);
-  }
-  else if (__n > size()) {
-    fill(begin(), end(), __val);
-    this->_M_finish = _STLP_STD::uninitialized_fill_n(this->_M_finish, __n - size(), __val);
-  }
-  else
-    erase(_STLP_STD::fill_n(begin(), __n, __val), end());
-}
-
-_STLP_END_NAMESPACE
-
-# undef size_type
-# undef iterator
-# undef vector
-
-#endif /*  _STLP_VECTOR_C */
-
-      // Local Variables:
-	// mode:C++
-	// End:
diff --git a/src/STLport/stl/_vector.h b/src/STLport/stl/_vector.h
deleted file mode 100644
index 7ad440c..0000000
--- a/src/STLport/stl/_vector.h
+++ /dev/null
@@ -1,591 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_VECTOR_H
-#define _STLP_INTERNAL_VECTOR_H
-
-
-
-# ifndef _STLP_INTERNAL_ALGOBASE_H
-#  include <stl/_algobase.h>
-# endif
-
-# ifndef _STLP_INTERNAL_ALLOC_H
-#  include <stl/_alloc.h>
-# endif
-
-# ifndef _STLP_INTERNAL_ITERATOR_H
-#  include <stl/_iterator.h>
-# endif
-
-# ifndef _STLP_INTERNAL_UNINITIALIZED_H
-#  include <stl/_uninitialized.h>
-# endif
-
-# ifndef _STLP_RANGE_ERRORS_H
-#  include <stl/_range_errors.h>
-# endif
-
-#  undef  vector
-#  define vector __WORKAROUND_DBG_RENAME(vector)
-
-_STLP_BEGIN_NAMESPACE 
-
-// The vector base class serves two purposes.  First, its constructor
-// and destructor allocate (but don't initialize) storage.  This makes
-// exception safety easier.
-
-template <class _Tp, class _Alloc> 
-class _Vector_base {
-public:
-
-  _STLP_FORCE_ALLOCATORS(_Tp, _Alloc)
-  typedef typename _Alloc_traits<_Tp, _Alloc>::allocator_type allocator_type;
-
-  _Vector_base(const _Alloc& __a)
-    : _M_start(0), _M_finish(0), _M_end_of_storage(__a, 0) {
-  }
-  _Vector_base(size_t __n, const _Alloc& __a)
-    : _M_start(0), _M_finish(0), _M_end_of_storage(__a, 0)
-  {
-    _M_start = _M_end_of_storage.allocate(__n);
-    _M_finish = _M_start;
-    _M_end_of_storage._M_data = _M_start + __n;
-	_STLP_MPWFIX_TRY _STLP_MPWFIX_CATCH
-  }
-
-  ~_Vector_base() { 
-    if (_M_start !=0) 
-    _M_end_of_storage.deallocate(_M_start, _M_end_of_storage._M_data - _M_start); 
-  }
-
-protected:
-  _Tp* _M_start;
-  _Tp* _M_finish;
-  _STLP_alloc_proxy<_Tp*, _Tp, allocator_type> _M_end_of_storage;
-};
-
-template <class _Tp, _STLP_DEFAULT_ALLOCATOR_SELECT(_Tp) >
-class vector : public _Vector_base<_Tp, _Alloc> 
-{
-private:
-  typedef _Vector_base<_Tp, _Alloc> _Base;
-public:
-  typedef _Tp value_type;
-  typedef value_type* pointer;
-  typedef const value_type* const_pointer;
-  typedef value_type* iterator;
-  typedef const value_type* const_iterator;
-
-public:
-  typedef value_type& reference;
-  typedef const value_type& const_reference;
-  typedef size_t size_type;
-  typedef ptrdiff_t difference_type;
-  typedef random_access_iterator_tag _Iterator_category;
-
-  _STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS;
-  _STLP_FORCE_ALLOCATORS(_Tp, _Alloc)
-  typedef typename _Vector_base<_Tp, _Alloc>::allocator_type allocator_type;
-
-  allocator_type get_allocator() const {
-    return _STLP_CONVERT_ALLOCATOR((const allocator_type&)this->_M_end_of_storage, _Tp);
-  }
-protected:
-  typedef typename  __type_traits<_Tp>::has_trivial_assignment_operator _TrivialAss;
-  typedef typename  __type_traits<_Tp>::has_trivial_assignment_operator _IsPODType;
-
-  // handles insertions on overflow
-  void _M_insert_overflow(pointer __position, const _Tp& __x, const __false_type&, 
-			  size_type __fill_len, bool __atend = false) {
-    const size_type __old_size = size();
-    const size_type __len = __old_size + (max)(__old_size, __fill_len);
-    
-    pointer __new_start = this->_M_end_of_storage.allocate(__len);
-    pointer __new_finish = __new_start;
-    _STLP_TRY {
-      __new_finish = __uninitialized_copy(this->_M_start, __position, __new_start, __false_type());
-      // handle insertion
-      if (__fill_len == 1) {
-        _Construct(__new_finish, __x);
-        ++__new_finish;
-      } else
-        __new_finish = __uninitialized_fill_n(__new_finish, __fill_len, __x, __false_type());
-      if (!__atend)
-        // copy remainder
-        __new_finish = __uninitialized_copy(__position, this->_M_finish, __new_finish, __false_type());
-    }
-    _STLP_UNWIND((_Destroy(__new_start,__new_finish), 
-                  this->_M_end_of_storage.deallocate(__new_start,__len)));
-    _M_clear();
-    _M_set(__new_start, __new_finish, __new_start + __len);
-  }
-
-  void _M_insert_overflow(pointer __position, const _Tp& __x, const __true_type&, 
-			  size_type __fill_len, bool __atend = false) {
-    const size_type __old_size = size();
-    const size_type __len = __old_size + (max)(__old_size, __fill_len);
-    
-    pointer __new_start = this->_M_end_of_storage.allocate(__len);
-    pointer __new_finish = (pointer)__copy_trivial(this->_M_start, __position, __new_start);
-      // handle insertion
-    __new_finish = fill_n(__new_finish, __fill_len, __x);
-    if (!__atend)
-      // copy remainder
-      __new_finish = (pointer)__copy_trivial(__position, this->_M_finish, __new_finish);
-    _M_clear();
-    _M_set(__new_start, __new_finish, __new_start + __len);
-  }
- 
-  void _M_range_check(size_type __n) const {
-    if (__n >= size_type(this->_M_finish-this->_M_start))
-      __stl_throw_out_of_range("vector");
-  }
-
-public:
-  iterator begin()             { return this->_M_start; }
-  const_iterator begin() const { return this->_M_start; }
-  iterator end()               { return this->_M_finish; }
-  const_iterator end() const   { return this->_M_finish; }
-
-  reverse_iterator rbegin()              { return reverse_iterator(end()); }
-  const_reverse_iterator rbegin() const  { return const_reverse_iterator(end()); }
-  reverse_iterator rend()                { return reverse_iterator(begin()); }
-  const_reverse_iterator rend() const    { return const_reverse_iterator(begin()); }
-
-  size_type size() const        { return size_type(this->_M_finish - this->_M_start); }
-  size_type max_size() const    { return size_type(-1) / sizeof(_Tp); }
-  size_type capacity() const    { return size_type(this->_M_end_of_storage._M_data - this->_M_start); }
-  bool empty() const            { return this->_M_start == this->_M_finish; }
-
-  reference operator[](size_type __n) { return *(begin() + __n); }
-  const_reference operator[](size_type __n) const { return *(begin() + __n); }
-
-  reference front()             { return *begin(); }
-  const_reference front() const { return *begin(); }
-  reference back()              { return *(end() - 1); }
-  const_reference back() const  { return *(end() - 1); }
-
-  reference at(size_type __n) { _M_range_check(__n); return (*this)[__n]; }
-  const_reference at(size_type __n) const { _M_range_check(__n); return (*this)[__n]; }
-
-  explicit vector(const allocator_type& __a = allocator_type()) : 
-    _Vector_base<_Tp, _Alloc>(__a) {}
-
-  vector(size_type __n, const _Tp& __val,
-         const allocator_type& __a = allocator_type()) 
-    : _Vector_base<_Tp, _Alloc>(__n, __a) { 
-    this->_M_finish = uninitialized_fill_n(this->_M_start, __n, __val); 
-  }
-
-  explicit vector(size_type __n)
-    : _Vector_base<_Tp, _Alloc>(__n, allocator_type() ) {
-    this->_M_finish = uninitialized_fill_n(this->_M_start, __n, _Tp()); 
-  }
-
-  vector(const vector<_Tp, _Alloc>& __x) 
-    : _Vector_base<_Tp, _Alloc>(__x.size(), __x.get_allocator()) { 
-    this->_M_finish = __uninitialized_copy((const_pointer)__x._M_start, 
-                                           (const_pointer)__x._M_finish, this->_M_start, _IsPODType());
-  }
-  
-#if defined (_STLP_MEMBER_TEMPLATES)
-
-  template <class _Integer>
-  void _M_initialize_aux(_Integer __n, _Integer __val, const __true_type&) {
-    this->_M_start = this->_M_end_of_storage.allocate(__n);
-    this->_M_end_of_storage._M_data = this->_M_start + __n; 
-    this->_M_finish = uninitialized_fill_n(this->_M_start, __n, __val);
-  }
-
-  template <class _InputIterator>
-  void _M_initialize_aux(_InputIterator __first, _InputIterator __last,
-                         const __false_type&) {
-    _M_range_initialize(__first, __last, _STLP_ITERATOR_CATEGORY(__first, _InputIterator));
-  }
-
-  // Check whether it's an integral type.  If so, it's not an iterator.
- # ifdef _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS
-  template <class _InputIterator>
-  vector(_InputIterator __first, _InputIterator __last) :
-    _Vector_base<_Tp, _Alloc>(allocator_type()) {
-    typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
-    _M_initialize_aux(__first, __last, _Integral());
-  }
- # endif
-  template <class _InputIterator>
-  vector(_InputIterator __first, _InputIterator __last,
-         const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL ) :
-    _Vector_base<_Tp, _Alloc>(__a) {
-    typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
-    _M_initialize_aux(__first, __last, _Integral());
-  }
-
-#else
-  vector(const _Tp* __first, const _Tp* __last,
-         const allocator_type& __a = allocator_type())
-    : _Vector_base<_Tp, _Alloc>(__last - __first, __a) { 
-      this->_M_finish = __uninitialized_copy(__first, __last, this->_M_start, _IsPODType()); 
-  }
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-  ~vector() { _Destroy(this->_M_start, this->_M_finish); }
-
-  vector<_Tp, _Alloc>& operator=(const vector<_Tp, _Alloc>& __x);
-
-  void reserve(size_type __n);
-
-  // assign(), a generalized assignment member function.  Two
-  // versions: one that takes a count, and one that takes a range.
-  // The range version is a member template, so we dispatch on whether
-  // or not the type is an integer.
-
-  void assign(size_type __n, const _Tp& __val) { _M_fill_assign(__n, __val); }
-  void _M_fill_assign(size_type __n, const _Tp& __val);
-  
-#ifdef _STLP_MEMBER_TEMPLATES
-  template <class _ForwardIter>
-  void _M_assign_aux(_ForwardIter __first, _ForwardIter __last, const forward_iterator_tag &)
-#else
-  void assign(const_iterator __first, const_iterator __last)
-#endif
-  {
-    size_type __len = distance(__first, __last);
-    
-    if (__len > capacity()) {
-      iterator __tmp = _M_allocate_and_copy(__len, __first, __last);
-    _M_clear();
-    _M_set(__tmp, __tmp + __len, __tmp + __len);
-    }
-    else if (size() >= __len) {
-      iterator __new_finish = copy(__first, __last, this->_M_start);
-      _Destroy(__new_finish, this->_M_finish);
-      this->_M_finish = __new_finish;
-    }
-    else {
-# if defined ( _STLP_MEMBER_TEMPLATES )
-          _ForwardIter __mid = __first;
-          advance(__mid, size());
-# else
-          const_iterator __mid = __first + size() ;
-# endif
-    copy(__first, __mid, this->_M_start);
-    this->_M_finish = __uninitialized_copy(__mid, __last, this->_M_finish, _IsPODType());
-    }
-  }
-
-#ifdef _STLP_MEMBER_TEMPLATES
-  template <class _InputIter>
-  void _M_assign_aux(_InputIter __first, _InputIter __last,
-		     const input_iterator_tag &) {
-    iterator __cur = begin();
-    for ( ; __first != __last && __cur != end(); ++__cur, ++__first)
-      *__cur = *__first;
-    if (__first == __last)
-      erase(__cur, end());
-    else
-      insert(end(), __first, __last);
-  }
-  
-  template <class _Integer>
-  void _M_assign_dispatch(_Integer __n, _Integer __val, const __true_type&)
-    { assign((size_type) __n, (_Tp) __val); }
-
-  template <class _InputIter>
-  void _M_assign_dispatch(_InputIter __first, _InputIter __last, const __false_type&)
-    { _M_assign_aux(__first, __last, _STLP_ITERATOR_CATEGORY(__first, _InputIter)); }
-
-  template <class _InputIterator>
-  void assign(_InputIterator __first, _InputIterator __last) {
-    typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
-    _M_assign_dispatch(__first, __last, _Integral());
-  }
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-  void push_back(const _Tp& __x) {
-    if (this->_M_finish != this->_M_end_of_storage._M_data) {
-      _Construct(this->_M_finish, __x);
-      ++this->_M_finish;
-    }
-    else
-      _M_insert_overflow(this->_M_finish, __x, _IsPODType(), 1UL, true);
-  }
-
-  void swap(vector<_Tp, _Alloc>& __x) {
-    _STLP_STD::swap(this->_M_start, __x._M_start);
-    _STLP_STD::swap(this->_M_finish, __x._M_finish);
-    _STLP_STD::swap(this->_M_end_of_storage, __x._M_end_of_storage);
-  }
-
-  iterator insert(iterator __position, const _Tp& __x) {
-    size_type __n = __position - begin();
-    if (this->_M_finish != this->_M_end_of_storage._M_data) {
-      if (__position == end()) {
-        _Construct(this->_M_finish, __x);
-        ++this->_M_finish;
-      } else {
-        _Construct(this->_M_finish, *(this->_M_finish - 1));
-        ++this->_M_finish;
-        _Tp __x_copy = __x;
-        __copy_backward_ptrs(__position, this->_M_finish - 2, this->_M_finish - 1, _TrivialAss());
-        *__position = __x_copy;
-      }
-    }
-    else
-      _M_insert_overflow(__position, __x, _IsPODType(), 1UL);
-    return begin() + __n;
-  }
-
-# ifndef _STLP_NO_ANACHRONISMS
-  void push_back() { push_back(_Tp()); }
-  iterator insert(iterator __position) { return insert(__position, _Tp()); }
-# endif
-
-  void _M_fill_insert (iterator __pos, size_type __n, const _Tp& __x);
-
-#if defined ( _STLP_MEMBER_TEMPLATES)
-
-  template <class _Integer>
-  void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val,
-                          const __true_type&) {
-    _M_fill_insert(__pos, (size_type) __n, (_Tp) __val);
-  }
-
-  template <class _InputIterator>
-  void _M_insert_dispatch(iterator __pos,
-                          _InputIterator __first, _InputIterator __last,
-                          const __false_type&) {
-    _M_range_insert(__pos, __first, __last, _STLP_ITERATOR_CATEGORY(__first, _InputIterator));
-  }
-
-  // Check whether it's an integral type.  If so, it's not an iterator.
-  template <class _InputIterator>
-  void insert(iterator __pos, _InputIterator __first, _InputIterator __last) {
-    typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
-    _M_insert_dispatch(__pos, __first, __last, _Integral());
-  }
-
-  template <class _InputIterator>
-  void _M_range_insert(iterator __pos, 
-		       _InputIterator __first, 
-		       _InputIterator __last,
-		       const input_iterator_tag &) {
-    for ( ; __first != __last; ++__first) {
-      __pos = insert(__pos, *__first);
-      ++__pos;
-    }
-  }
-
-  template <class _ForwardIterator>
-  void _M_range_insert(iterator __position,
-                       _ForwardIterator __first,
-                       _ForwardIterator __last,
-                       const forward_iterator_tag &) 
-#else /* _STLP_MEMBER_TEMPLATES */
-  void insert(iterator __position,
-              const_iterator __first, const_iterator __last)
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-  {
-    if (__first != __last) {
-      size_type __n = distance(__first, __last);
-
-      if (size_type(this->_M_end_of_storage._M_data - this->_M_finish) >= __n) {
-        const size_type __elems_after = this->_M_finish - __position;
-        pointer __old_finish = this->_M_finish;
-        if (__elems_after > __n) {
-          __uninitialized_copy(this->_M_finish - __n, this->_M_finish, this->_M_finish, _IsPODType());
-          this->_M_finish += __n;
-          __copy_backward_ptrs(__position, __old_finish - __n, __old_finish, _TrivialAss());
-          copy(__first, __last, __position);
-        }
-        else {
-# if defined ( _STLP_MEMBER_TEMPLATES )
-          _ForwardIterator __mid = __first;
-          advance(__mid, __elems_after);
-# else
-          const_pointer __mid = __first + __elems_after;
-# endif
-          __uninitialized_copy(__mid, __last, this->_M_finish, _IsPODType());
-          this->_M_finish += __n - __elems_after;
-          __uninitialized_copy(__position, __old_finish, this->_M_finish, _IsPODType());
-          this->_M_finish += __elems_after;
-          copy(__first, __mid, __position);
-        } /* elems_after */
-      }
-      else {
-        const size_type __old_size = size();
-        const size_type __len = __old_size + (max)(__old_size, __n);
-        pointer __new_start = this->_M_end_of_storage.allocate(__len);
-        pointer __new_finish = __new_start;
-        _STLP_TRY {
-          __new_finish = __uninitialized_copy(this->_M_start, __position, __new_start, _IsPODType());
-          __new_finish = __uninitialized_copy(__first, __last, __new_finish, _IsPODType());
-          __new_finish = __uninitialized_copy(__position, this->_M_finish, __new_finish, _IsPODType());
-        }
-        _STLP_UNWIND((_Destroy(__new_start,__new_finish), 
-                      this->_M_end_of_storage.deallocate(__new_start,__len)));
-        _M_clear();
-        _M_set(__new_start, __new_finish, __new_start + __len);
-      }
-    }
-  }
-  void insert (iterator __pos, size_type __n, const _Tp& __x)
-  { _M_fill_insert(__pos, __n, __x); }
-  
-  void pop_back() {
-    --this->_M_finish;
-    _Destroy(this->_M_finish);
-  }
-  iterator erase(iterator __position) {
-    if (__position + 1 != end())
-      __copy_ptrs(__position + 1, this->_M_finish, __position, _TrivialAss());
-    --this->_M_finish;
-    _Destroy(this->_M_finish);
-    return __position;
-  }
-  iterator erase(iterator __first, iterator __last) {
-    pointer __i = __copy_ptrs(__last, this->_M_finish, __first, _TrivialAss());
-    _Destroy(__i, this->_M_finish);
-    this->_M_finish = __i;
-    return __first;
-  }
-
-  void resize(size_type __new_size, _Tp __x) {
-    if (__new_size < size()) 
-      erase(begin() + __new_size, end());
-    else
-      insert(end(), __new_size - size(), __x);
-  }
-  void resize(size_type __new_size) { resize(__new_size, _Tp()); }
-  void clear() { 
-    erase(begin(), end());
-  }
-
-protected:
-
-  void _M_clear() {
-    //    if (this->_M_start) {
-    _Destroy(this->_M_start, this->_M_finish);
-    this->_M_end_of_storage.deallocate(this->_M_start, this->_M_end_of_storage._M_data - this->_M_start);
-    //    }
-  }
-
-  void _M_set(pointer __s, pointer __f, pointer __e) {
-    this->_M_start = __s;
-    this->_M_finish = __f;
-    this->_M_end_of_storage._M_data = __e;
-  }
-
-#ifdef _STLP_MEMBER_TEMPLATES
-  template <class _ForwardIterator>
-  pointer _M_allocate_and_copy(size_type __n, _ForwardIterator __first, 
-				_ForwardIterator __last)
-#else /* _STLP_MEMBER_TEMPLATES */
-  pointer _M_allocate_and_copy(size_type __n, const_pointer __first, 
-			       const_pointer __last)
-#endif /* _STLP_MEMBER_TEMPLATES */
-  {
-    pointer __result = this->_M_end_of_storage.allocate(__n);
-    _STLP_TRY {
-#if !defined(__MRC__)		//*TY 12/17/2000 - added workaround for MrCpp. it confuses on nested try/catch block
-      __uninitialized_copy(__first, __last, __result, _IsPODType());
-#else
-      uninitialized_copy(__first, __last, __result);
-#endif
-      return __result;
-    }
-    _STLP_UNWIND(this->_M_end_of_storage.deallocate(__result, __n));
-# ifdef _STLP_THROW_RETURN_BUG
-	return __result;
-# endif
-  }
-
-
-#ifdef _STLP_MEMBER_TEMPLATES
-  template <class _InputIterator>
-  void _M_range_initialize(_InputIterator __first,  
-                           _InputIterator __last, const input_iterator_tag &) {
-    for ( ; __first != __last; ++__first)
-      push_back(*__first);
-  }
-  // This function is only called by the constructor. 
-  template <class _ForwardIterator>
-  void _M_range_initialize(_ForwardIterator __first,
-                           _ForwardIterator __last, const forward_iterator_tag &) {
-    size_type __n = distance(__first, __last);
-    this->_M_start = this->_M_end_of_storage.allocate(__n);
-    this->_M_end_of_storage._M_data = this->_M_start + __n;
-    this->_M_finish = __uninitialized_copy(__first, __last, this->_M_start, _IsPODType());
-  }
-  
-#endif /* _STLP_MEMBER_TEMPLATES */
-};
-
-# define _STLP_TEMPLATE_CONTAINER vector<_Tp, _Alloc>
-# define _STLP_TEMPLATE_HEADER    template <class _Tp, class _Alloc>
-# include <stl/_relops_cont.h>
-# undef _STLP_TEMPLATE_CONTAINER
-# undef _STLP_TEMPLATE_HEADER
-
-# if defined (_STLP_USE_TEMPLATE_EXPORT) 
-_STLP_EXPORT_TEMPLATE_CLASS allocator<void*>;
-_STLP_EXPORT_TEMPLATE_CLASS _STLP_alloc_proxy<void**, void*, allocator<void*> >;
-_STLP_EXPORT_TEMPLATE_CLASS _Vector_base<void*,allocator<void*> >;
-_STLP_EXPORT_TEMPLATE_CLASS vector<void*,allocator<void*> >;
-# endif
-
-#  undef  vector
-#  undef  __vector__
-#  define __vector__ __WORKAROUND_RENAME(vector)
-
-_STLP_END_NAMESPACE
-
-# if !defined (_STLP_LINK_TIME_INSTANTIATION)
-#  include <stl/_vector.c>
-# endif
-
-#ifndef _STLP_INTERNAL_BVECTOR_H
-# include <stl/_bvector.h>
-#endif
-
-# if defined (_STLP_DEBUG)
-#  include <stl/debug/_vector.h>
-# endif
-
-# if defined (_STLP_USE_WRAPPER_FOR_ALLOC_PARAM)
-#  include <stl/wrappers/_vector.h>
-# endif
-
-#endif /* _STLP_VECTOR_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/stl/c_locale.h b/src/STLport/stl/c_locale.h
deleted file mode 100644
index 0a619ea..0000000
--- a/src/STLport/stl/c_locale.h
+++ /dev/null
@@ -1,436 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-
-
-#ifndef _STLP_C_LOCALE_H
-# define _STLP_C_LOCALE_H
-
-/*
- * Implementation dependent definitions
- */
-#ifdef __cplusplus
-#  include <stl/_config.h>
-#endif
-
-#if defined(__sgi) 
-# if defined(ROOT_65) /* IRIX 6.5.x */
-#  include <sgidefs.h>
-#  include <standards.h>
-#  include <wchar.h>
-#  include <ctype.h>
-
-# else
-                  /* IRIX pre-6.5 */
-#  include <sgidefs.h>
-#  include <standards.h>
-
-#  if !defined(_SIZE_T) && !defined(_SIZE_T_)
-#   define _SIZE_T
-#    if (_MIPS_SZLONG == 32)
-typedef unsigned int    size_t;
-#    endif
-#    if (_MIPS_SZLONG == 64)
-typedef unsigned long   size_t;
-#    endif
-#   endif
-
-#   ifndef _WCHAR_T
-#    define _WCHAR_T
-#     if (_MIPS_SZLONG == 32)
-typedef long wchar_t;
-#     endif
-#     if (_MIPS_SZLONG == 64)
-typedef __int32_t wchar_t;
-#     endif
-#    endif /* _WCHAR_T */
-
-#    ifndef _WINT_T
-#     define _WINT_T
-#     if (_MIPS_SZLONG == 32)
-        typedef long    wint_t;
-#     endif
-#     if (_MIPS_SZLONG == 64)
-        typedef __int32_t wint_t;
-#     endif
-#    endif /* _WINT_T */
-
-#    ifndef _MBSTATE_T
-#    define _MBSTATE_T
-#    ifdef _MSC_VER
-		typedef int		mbstate_t;
-#    else
-        typedef char    mbstate_t;
-#    endif
-#    endif /* _MBSTATE_T */
-
-#   endif /* ROOT65 */ 
-
-#  else /* __sgi */
-
-# ifdef __cplusplus
-# ifndef _STLP_CSTDDEF
-#  include <cstddef>
-# endif
-# ifndef _STLP_CWCHAR_H
-#  include <stl/_cwchar.h>
-# endif
-# ifndef _STLP_CCTYPE
-#  include <cctype>
-# endif
-# else
-#  include <stddef.h>
-#  include <wchar.h>
-#  include <ctype.h>
-# endif
-
-#endif /* __sgi */
-
-/*
- * GENERAL FRAMEWORK
- */
-
-struct _Locale_ctype;
-struct _Locale_numeric;
-struct _Locale_time;
-struct _Locale_collate;
-struct _Locale_monetary;
-struct _Locale_messages;
-
-/*
-  Bitmask macros.  
-*/
-
-/*
- * For narrow characters, we expose the lookup table interface.
- */
-
-/* Internal bitmask macros, os-specific. */
-
-#if defined(__sgi)              /* IRIX */
-
-#define _Locale_S      0x00000008      /* Spacing character */
-#define _Locale_A      0x00004000      /* Alphabetical characters only */
-#define _Locale_B      0x00000040      /* Obsolete: was space char only */
-#define _Locale_PR     0x00008000      /* Printable characters only */
-#define _Locale_G      0x40000000      /* Graphic characters only */
-#define _Locale_BL     0x80000000      /* The blank character class */
-
-/* Public bitmask macros, must be defined for every OS. These values, of
- * course, are specific to IRIX. */
-
-#define _Locale_CNTRL  0x00000020      /* Control character */
-#define _Locale_UPPER  0x00000001      /* Upper case */
-#define _Locale_LOWER  0x00000002      /* Lower case */
-#define _Locale_DIGIT  0x00000004      /* Numeral (digit) */
-#define _Locale_XDIGIT 0x00000080      /* heXadecimal digit */
-#define _Locale_PUNCT  0x00000010      /* Punctuation */
-#define _Locale_SPACE  (_Locale_S | _Locale_BL)
-#define _Locale_PRINT  (_Locale_PUNCT | _Locale_UPPER | _Locale_LOWER | \
-                        _Locale_DIGIT | _Locale_A | _Locale_XDIGIT | \
-                        _Locale_PR)
-#define _Locale_ALPHA  _Locale_A
-
-/*
-* All of these except for graph and blank are from the C standard;
-* graph and blank are XPG4.  (graph in XPG4 doesn't mean quite the
-* same thing as graph in the C++ library)
-*/
-
-#endif /* IRIX */
-
-
-#if defined( __Lynx__ )
- /* azov: On Lynx isalpha defined as (_U | _L), which gives us a mask 
-  * unusable in ctype_table. So we have to redefine it and use hard-coded 
-  * numbers (to avoid potential clashes if system headers change).
-  *
-  * P.S. Actually, I see no reason in using platform-specific masks - 
-  * having just one set of masks for all platforms should work just as
-  * well - we only use them internally and they don't have to be equal 
-  * to whatever defined in local ctype.h
-  *
-  */ 
-#   define _Locale_CNTRL  040     /* _C, Control character */
-#   define _Locale_UPPER  01      /* _U, Upper case */
-#   define _Locale_LOWER  02      /* _L, Lower case */
-#   define _Locale_DIGIT  04      /* _N, Numeral (digit) */
-#   define _Locale_XDIGIT 0200    /* _X, heXadecimal digit */
-#   define _Locale_PUNCT  020     /* _P, Punctuation */
-#   define _Locale_SPACE  010     /* _S, Spacing */
-#   define _Locale_ALPHA  040000  /* none, Alphanumerical */
-#   define _Locale_PRINT  (_Locale_PUNCT | _Locale_UPPER | _Locale_LOWER | \
-                           _Locale_DIGIT | _Locale_ALPHA | _Locale_XDIGIT |\
-                           _Locale_SPACE ) /* Printable */
-# endif /* __Lynx__ */
-
-#if defined(__GNUC__) || defined (__BORLANDC__) || defined (__COMO__)
-
-# if defined (__CYGWIN__)
-
-#  define _Locale_CNTRL  040
-#  define _Locale_UPPER  02
-#  define _Locale_LOWER  01
-#  define _Locale_DIGIT  04
-#  define _Locale_XDIGIT ( 0100 | _Locale_DIGIT )
-#  define _Locale_PUNCT  020
-#  define _Locale_SPACE  010
-#  define _Locale_ALPHA  (_Locale_UPPER | _Locale_LOWER)
-#  define _Locale_PRINT  (_Locale_ALPHA | _Locale_DIGIT | _Locale_PUNCT | 0200 )
-
-# elif defined (__FreeBSD__)
-
-# define _Locale_CNTRL _CTYPE_C
-# define _Locale_UPPER _CTYPE_U
-# define _Locale_LOWER _CTYPE_L
-# define _Locale_DIGIT _CTYPE_D
-# define _Locale_XDIGIT _CTYPE_X
-# define _Locale_PUNCT _CTYPE_P
-# define _Locale_SPACE _CTYPE_S
-# define _Locale_PRINT _CTYPE_R
-# define _Locale_ALPHA _CTYPE_A
-
-# elif defined (__NetBSD__) || defined (__amigaos__)
- 
-#  define _Locale_CNTRL _C
-#  define _Locale_UPPER _U
-#  define _Locale_LOWER _L
-#  define _Locale_DIGIT _N
-#  define _Locale_XDIGIT (_N|_X)
-#  define _Locale_PUNCT _P
-#  define _Locale_SPACE _S
-#  define _Locale_PRINT (_P|_U|_L|_N|_B)
-#  define _Locale_ALPHA (_U|_L)
-# elif defined(__EMX__) /* OS/2 with emx runtime */
-#  define _Locale_CNTRL _CNTRL
-#  define _Locale_UPPER _UPPER
-#  define _Locale_LOWER _LOWER
-#  define _Locale_DIGIT _DIGIT
-#  define _Locale_XDIGIT _XDIGIT
-#  define _Locale_PUNCT _PUNCT
-#  define _Locale_SPACE _SPACE
-#  define _Locale_PRINT _PRINT
-#  define _Locale_ALPHA (_UPPER|_LOWER)
-
-# elif defined(_STLP_USE_GLIBC) /* linux, using the gnu compiler */
-
-/* This section uses macros defined in the gnu libc ctype.h header */
-
-#  define _Locale_CNTRL  _IScntrl
-#  define _Locale_UPPER  _ISupper
-#  define _Locale_LOWER  _ISlower
-#  define _Locale_DIGIT  _ISdigit
-#  define _Locale_XDIGIT _ISxdigit
-#  define _Locale_PUNCT  _ISpunct
-#  define _Locale_SPACE  _ISspace
-#  define _Locale_PRINT  _ISprint
-#  define _Locale_ALPHA  _ISalpha
-
-#  endif /* GLIBC */
-
-#endif /* gnu */
-
-#if ( defined(__sun) && defined (__SVR4) ) \
-    || (defined (__digital__) && defined (__unix__)) \
-    || defined(_AIX)
-/* fbp : condition from AT&T code*/
-#if !(defined(__XPG4_CHAR_CLASS__) || defined(_XPG4_2) || \
-    (defined(_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 == 4))) && ! defined (_ISCNTRL)
-  /* fbp : on 2.5.1, the defines are different ;( */
-  // # if ( defined (__sun) && defined (__SVR4) && ! defined (_ISCNTRL) )
-#   define _ISCNTRL _C
-#   define _ISUPPER _U
-#   define _ISLOWER _L
-#   define _ISDIGIT _N
-#   define _ISXDIGIT _X
-#   define _ISPUNCT _P
-#   define _ISSPACE _S
-#   define _ISPRINT (_P | _U | _L | _N | _B)
-#   define _ISALPHA (_U | _L)
-#  endif 
-
-#  define _Locale_CNTRL  _ISCNTRL
-#  define _Locale_UPPER  _ISUPPER
-#  define _Locale_LOWER  _ISLOWER
-#  define _Locale_DIGIT  _ISDIGIT
-#  define _Locale_XDIGIT _ISXDIGIT
-#  define _Locale_PUNCT  _ISPUNCT
-#  define _Locale_SPACE  _ISSPACE
-#  define _Locale_PRINT  _ISPRINT
-#  define _Locale_ALPHA  _ISALPHA
-#elif defined (__MWERKS__)
-#  define _Locale_CNTRL  __control_char
-#  define _Locale_UPPER  __upper_case
-#  define _Locale_LOWER  __lower_case
-#  define _Locale_DIGIT  __digit
-#  define _Locale_XDIGIT __hex_digit
-#  define _Locale_PUNCT  __punctuation
-#  define _Locale_SPACE  __space_char
-#  define _Locale_PRINT  __printable
-#  define _Locale_ALPHA  __alphanumeric
-#elif defined (__BORLANDC__)
-#  define _Locale_CNTRL  _IS_CTL
-#  define _Locale_UPPER  _IS_UPP
-#  define _Locale_LOWER  _IS_LOW
-#  define _Locale_DIGIT  _IS_DIG
-#  define _Locale_XDIGIT _IS_HEX
-#  define _Locale_PUNCT  _IS_PUN
-#  define _Locale_SPACE  _IS_SP
-#  define _Locale_PRINT  (_IS_SP|_IS_PUN|_IS_UPP|_IS_LOW|_IS_DIG)
-#  define _Locale_ALPHA  _IS_ALPHA
-#elif defined (_MSC_VER) || defined (__MINGW32__)
-#  define _Locale_CNTRL  _CONTROL
-#  define _Locale_UPPER  _UPPER
-#  define _Locale_LOWER  _LOWER
-#  define _Locale_DIGIT  _DIGIT
-#  define _Locale_XDIGIT _HEX
-#  define _Locale_PUNCT  _PUNCT
-#  define _Locale_SPACE  _SPACE
-#  define _Locale_PRINT  (_ALPHA | _DIGIT | _BLANK | _PUNCT)
-// is this one has to be so complex ?  
-#  define _Locale_ALPHA  ( _ALPHA & ~ (_UPPER | _LOWER )) 
-#elif defined (__DMC__)
-#  define _Locale_CNTRL  _CONTROL
-#  define _Locale_UPPER  _UPPER
-#  define _Locale_LOWER  _LOWER
-#  define _Locale_DIGIT  _DIGIT
-#  define _Locale_XDIGIT _HEX
-#  define _Locale_PUNCT  _PUNCT
-#  define _Locale_SPACE  _SPACE
-#  define _Locale_PRINT  (_UPPER | _LOWER | _DIGIT | _PUNCT | _SPACE)
-#  define _Locale_ALPHA  _ALPHA
-#elif defined(__MRC__) || defined(__SC__)		//*TY 02/24/2000 - added support for MPW
-#  define _Locale_CNTRL  _CTL
-#  define _Locale_UPPER  _UPP
-#  define _Locale_LOWER  _LOW
-#  define _Locale_DIGIT  _DIG
-#  define _Locale_XDIGIT _HEX
-#  define _Locale_PUNCT  _PUN
-#  define _Locale_SPACE  _BLA
-#  define _Locale_PRINT  (_UPP | _LOW | _DIG | _PUN | _BLA)
-#  define _Locale_ALPHA  (_UPP | _LOW)
-#elif defined(__MLCCPP__)
-#  define _Locale_CNTRL    1
-#  define _Locale_UPPER    2
-#  define _Locale_LOWER    4
-#  define _Locale_DIGIT    8
-#  define _Locale_XDIGIT  16
-#  define _Locale_PUNCT   32
-#  define _Locale_SPACE   64
-#  define _Locale_PRINT  128
-#  define _Locale_ALPHA  256
-
-# elif defined (__GNUC__) && defined (__APPLE__)
- 
-# define _Locale_CNTRL _C
-# define _Locale_UPPER _U
-# define _Locale_LOWER _L
-# define _Locale_DIGIT _D
-# define _Locale_XDIGIT _X
-# define _Locale_PUNCT _P
-# define _Locale_SPACE _S
-# define _Locale_PRINT _R
-# define _Locale_ALPHA _A
-
-# elif defined (__hpux) || defined (__osf__)
- 
-#   if defined(__HP_aCC) && !defined(_INCLUDE_HPUX_SOURCE)
-#     define _ISALPHA      0x001
-#     define _ISALNUM      0x002
-#     define _ISBLANK      0x004
-#     define _ISCNTRL      0x008
-#     define _ISDIGIT      0x010
-#     define _ISGRAPH      0x020
-#     define _ISLOWER      0x040
-#     define _ISPRINT      0x080
-#     define _ISPUNCT      0x100
-#     define _ISSPACE      0x200
-#     define _ISUPPER      0x400
-#     define _ISXDIGIT     0x800
-#  endif
-#  define _Locale_CNTRL  _ISCNTRL
-#  define _Locale_UPPER  _ISUPPER
-#  define _Locale_LOWER  _ISLOWER
-#  define _Locale_DIGIT  _ISDIGIT
-#  define _Locale_XDIGIT _ISXDIGIT
-#  define _Locale_PUNCT  _ISPUNCT
-#  define _Locale_SPACE  _ISSPACE
-#  define _Locale_PRINT  _ISPRINT
-#  define _Locale_ALPHA  _ISALPHA
-# elif defined (__MVS__) || defined(__OS400__)
-#  define _Locale_CNTRL __ISCNTRL
-#  define _Locale_UPPER __ISUPPER
-#  define _Locale_LOWER __ISLOWER
-#  define _Locale_DIGIT __ISDIGIT
-#  define _Locale_XDIGIT __ISXDIGIT
-#  define _Locale_PUNCT __ISPUNCT
-#  define _Locale_SPACE __ISSPACE
-#  define _Locale_PRINT __ISPRINT
-#  define _Locale_ALPHA __ISALPHA
-# elif defined (__QNXNTO__)  || defined (__WATCOMC__)
-# define _Locale_CNTRL _CNTRL
-# define _Locale_UPPER _UPPER
-# define _Locale_LOWER _LOWER
-# define _Locale_DIGIT _DIGIT
-# define _Locale_XDIGIT _XDIGT
-# define _Locale_PUNCT _PUNCT
-# define _Locale_SPACE _SPACE
-# define _Locale_PRINT _PRINT
-# define _Locale_ALPHA (_UPPER | _LOWER)
-#elif defined (__DJGPP)
-#  define _Locale_CNTRL  __dj_ISCNTRL
-#  define _Locale_UPPER  __dj_ISUPPER
-#  define _Locale_LOWER  __dj_ISLOWER
-#  define _Locale_DIGIT  __dj_ISDIGIT
-#  define _Locale_XDIGIT __dj_ISXDIGIT
-#  define _Locale_PUNCT  __dj_ISPUNCT
-#  define _Locale_SPACE  __dj_ISSPACE
-#  define _Locale_PRINT  __dj_ISPRINT
-#  define _Locale_ALPHA  __dj_ISALPHA
-#elif defined (_STLP_SCO_OPENSERVER)
-#  define _Locale_CNTRL _C
-#  define _Locale_UPPER _U
-#  define _Locale_LOWER _L
-#  define _Locale_DIGIT _N
-#  define _Locale_XDIGIT _X
-#  define _Locale_PUNCT _P
-#  define _Locale_SPACE _S
-#  define _Locale_PRINT _R
-#  define _Locale_ALPHA _A
-#elif defined (__NCR_SVR)
-#  define _Locale_CNTRL _C
-#  define _Locale_UPPER _U
-#  define _Locale_LOWER _L
-#  define _Locale_DIGIT _N
-#  define _Locale_XDIGIT _X
-#  define _Locale_PUNCT _P
-#  define _Locale_SPACE _S
-#  define _Locale_PRINT (_P | _U | _L | _N | _B)
-#  define _Locale_ALPHA (_U | _L)
-#elif defined (_CRAY)
-#  define _Locale_CNTRL  _CNTRL
-#  define _Locale_UPPER  _UPPER
-#  define _Locale_LOWER  _LOWER
-#  define _Locale_DIGIT  _DIGIT
-#  define _Locale_XDIGIT _XDIGIT
-#  define _Locale_PUNCT  _PUNCT
-#  define _Locale_SPACE  _SPACE
-#  define _Locale_PRINT  _PRINT
-#  define _Locale_ALPHA  _ALPHA
-#endif
-
-# endif /* _STLP_C_LOCALE_H */
diff --git a/src/STLport/stl/char_traits.h b/src/STLport/stl/char_traits.h
deleted file mode 100644
index e93a56e..0000000
--- a/src/STLport/stl/char_traits.h
+++ /dev/null
@@ -1,266 +0,0 @@
-/*
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_CHAR_TRAITS_H
-#define _STLP_CHAR_TRAITS_H
-
-// Define char_traits
-
-# if defined (_STLP_OWN_IOSTREAMS) || ! defined (_STLP_USE_NEW_IOSTREAMS)
-
-# if ! defined (_STLP_CSTDDEF)
-#  include <cstddef>
-# endif
-
-#if ! defined (_STLP_CSTRING)
-#  include <cstring>
-#endif
-
-#if defined (_STLP_UNIX) && defined (_STLP_HAS_NO_NEW_C_HEADERS)
-#include <sys/types.h>          // For off_t
-#endif /* __unix */
-
-#ifdef __BORLANDC__
-# include <mem.h>
-# include <string.h>
-# include <_stddef.h>
-// class mbstate_t;
-#endif
-
-#ifndef __TYPE_TRAITS_H
-# include <stl/type_traits.h>
-#endif
-
-# if !defined (_STLP_CWCHAR)
-#  include <stl/_cwchar.h>
-# endif			
-
-_STLP_BEGIN_NAMESPACE
-
-# ifdef _STLP_OWN_IOSTREAMS
-
-template <class _Tp> class allocator;
-
-#define _STLP_NULL_CHAR_INIT(_ChT) _STLP_DEFAULT_CONSTRUCTED(_ChT)
-
-#if defined (__sgi) && defined (_STLP_HAS_NO_NEW_C_HEADERS) /* IRIX */
-typedef off64_t   streamoff;
-// #elif defined (__unix) && defined (_STLP_HAS_NO_NEW_C_HEADERS) /* Other version of UNIX */
-// typedef off_t     streamoff;
-#else /* __unix */
-// boris : here, it's not ptrdiff_t as some Solaris systems have confusing definitions of these.
-typedef long streamoff;
-#endif /* _STLP_HAS_NO_NEW_C_HEADERS */
-
-typedef ptrdiff_t streamsize;
-
-// Class fpos, which represents a position within a file.  (The C++
-// standard calls for it to be defined in <ios>.  This implementation
-// moves it to <iosfwd>, which is included by <ios>.)
-template <class _StateT> class fpos
-{
-public:                         // From table 88 of the C++ standard.
-  fpos(streamoff __pos) : _M_pos(__pos), _M_st(_STLP_NULL_CHAR_INIT(_StateT)) {}
-  fpos() : _M_pos(0), _M_st(_STLP_NULL_CHAR_INIT(_StateT)) {}
-
-  operator streamoff() const { return _M_pos; }
-
-  bool  _STLP_CALL operator==(const fpos<_StateT>& __y) const
-    { return _M_pos == __y._M_pos; }
-  bool _STLP_CALL operator!=(const fpos<_StateT>& __y) const
-    { return _M_pos != __y._M_pos; }
-
-  fpos<_StateT>& operator+=(streamoff __off) {
-    _M_pos += __off;
-    return *this;
-  }
-  fpos<_StateT>& operator-=(streamoff __off) {
-    _M_pos -= __off;
-    return *this;
-  }
-
-  fpos<_StateT> operator+(streamoff __off) {
-    fpos<_StateT> __tmp(*this);
-    __tmp += __off;
-    return __tmp;
-  }
-  fpos<_StateT> operator-(streamoff __off) {
-    fpos<_StateT> __tmp(*this);
-    __tmp -= __off;
-    return __tmp;
-  }
-
-public:                         // Manipulation of the state member.
-  _StateT state() const { return _M_st; }
-  void state(_StateT __st) { _M_st = __st; }
-private:
-  streamoff _M_pos;
-  _StateT _M_st;
-};
-
-typedef fpos<mbstate_t> streampos;
-typedef fpos<mbstate_t> wstreampos;
-# endif
-
-// Class __char_traits_base.
-
-template <class _CharT, class _IntT> class __char_traits_base {
-public:
-  typedef _CharT char_type;
-  typedef _IntT int_type;
-#ifdef _STLP_USE_NEW_IOSTREAMS
-  typedef streamoff off_type;
-  typedef streampos pos_type;
-# ifdef _STLP_NO_MBSTATE_T
-  typedef char      state_type;
-# else
-  typedef mbstate_t state_type;
-# endif
-#endif /* _STLP_USE_NEW_IOSTREAMS */
-
-  static void _STLP_CALL assign(char_type& __c1, const char_type& __c2) { __c1 = __c2; }
-  static bool _STLP_CALL eq(const _CharT& __c1, const _CharT& __c2) 
-    { return __c1 == __c2; }
-  static bool _STLP_CALL lt(const _CharT& __c1, const _CharT& __c2) 
-    { return __c1 < __c2; }
-
-  static int _STLP_CALL compare(const _CharT* __s1, const _CharT* __s2, size_t __n) {
-    for (size_t __i = 0; __i < __n; ++__i)
-      if (!eq(__s1[__i], __s2[__i]))
-        return __s1[__i] < __s2[__i] ? -1 : 1;
-    return 0;
-  }
-
-  static size_t _STLP_CALL length(const _CharT* __s) {
-    const _CharT _NullChar = _STLP_DEFAULT_CONSTRUCTED(_CharT);
-    size_t __i;
-    for (__i = 0; !eq(__s[__i], _NullChar); ++__i)
-      {}
-    return __i;
-  }
-
-  static const _CharT* _STLP_CALL find(const _CharT* __s, size_t __n, const _CharT& __c) {
-    for ( ; __n > 0 ; ++__s, --__n)
-      if (eq(*__s, __c))
-        return __s;
-    return 0;
-  }
-
-
-  static _CharT* _STLP_CALL move(_CharT* __s1, const _CharT* __s2, size_t _Sz) {    
-    return (_Sz == 0 ? __s1 : (_CharT*)memmove(__s1, __s2, _Sz * sizeof(_CharT)));
-  }
-  
-  static _CharT* _STLP_CALL copy(_CharT* __s1, const _CharT* __s2, size_t __n) {
-    return (__n == 0 ? __s1 :
-	    (_CharT*)memcpy(__s1, __s2, __n * sizeof(_CharT)));
-    } 
-
-  static _CharT* _STLP_CALL assign(_CharT* __s, size_t __n, _CharT __c) {
-    for (size_t __i = 0; __i < __n; ++__i)
-      __s[__i] = __c;
-    return __s;
-  }
-
-  static int_type _STLP_CALL not_eof(const int_type& __c) {
-    return !eq_int_type(__c, eof()) ? __c : __STATIC_CAST(int_type, 0);
-  }
-
-  static char_type _STLP_CALL to_char_type(const int_type& __c) {
-    return (char_type)__c;
-  }
-
-  static int_type _STLP_CALL to_int_type(const char_type& __c) {
-    return (int_type)__c;
-  }
-
-  static bool _STLP_CALL eq_int_type(const int_type& __c1, const int_type& __c2) {
-    return __c1 == __c2;
-  }
-
-  static int_type _STLP_CALL eof() {
-    return (int_type)-1;
-    //    return __STATIC_CAST(int_type,-1);
-  }
-};
-
-// Generic char_traits class.  Note that this class is provided only
-//  as a base for explicit specialization; it is unlikely to be useful
-//  as is for any particular user-defined type.  In particular, it 
-//  *will not work* for a non-POD type.
-
-template <class _CharT> class char_traits
-  : public __char_traits_base<_CharT, _CharT>
-{};
-
-// Specialization for char.
-
-_STLP_TEMPLATE_NULL class _STLP_CLASS_DECLSPEC char_traits<char> 
-  : public __char_traits_base<char, int>
-{
-public:
-  typedef char char_type;
-  typedef int int_type;
-#ifdef _STLP_USE_NEW_IOSTREAMS
-  typedef streamoff off_type;
-# ifndef _STLP_NO_MBSTATE_T
-  typedef streampos pos_type;
-  typedef mbstate_t state_type;
-# endif
-#endif /* _STLP_USE_NEW_IOSTREAMS */
-
-  static char _STLP_CALL to_char_type(const int& __c) {
-    return (char)(unsigned char)__c;
-  }
-
-  static int _STLP_CALL to_int_type(const char& __c) {
-    return (unsigned char)__c;
-  }
-
-  static int _STLP_CALL compare(const char* __s1, const char* __s2, size_t __n) 
-    { return memcmp(__s1, __s2, __n); }
-  
-  static size_t _STLP_CALL length(const char* __s) { return strlen(__s); }
-
-  static void _STLP_CALL assign(char& __c1, const char& __c2) { __c1 = __c2; }
-
-  static char* _STLP_CALL assign(char* __s, size_t __n, char __c)
-    { memset(__s, __c, __n); return __s; }
-};
-
-# if defined (_STLP_HAS_WCHAR_T)
-// Specialization for wchar_t.
-_STLP_TEMPLATE_NULL class _STLP_CLASS_DECLSPEC char_traits<wchar_t>
-  : public __char_traits_base<wchar_t, wint_t>
-{};
-# endif
-
-_STLP_END_NAMESPACE
-
-# else /* OWN_IOSTREAMS */
-
-#  include <wrap_std/iosfwd>
-
-# endif /* OWN_IOSTREAMS */
-
-#endif /* _STLP_CHAR_TRAITS_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/stl/concept_checks.h b/src/STLport/stl/concept_checks.h
deleted file mode 100644
index 36fb00c..0000000
--- a/src/STLport/stl/concept_checks.h
+++ /dev/null
@@ -1,810 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Silicon Graphics makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- */
-
-#ifndef __CONCEPT_CHECKS_H
-#define __CONCEPT_CHECKS_H
-
-/*
-  Use these macro like assertions, but they assert properties
-  on types (usually template arguments). In technical terms they
-  verify whether a type "models" a "concept".
-
-  This set of requirements and the terminology used here is derived
-  from the book "Generic Programming and the STL" by Matt Austern
-  (Addison Wesley). For further information please consult that
-  book. The requirements also are intended to match the ANSI/ISO C++
-  standard.
-
-  This file covers the basic concepts and the iterator concepts.
-  There are several other files that provide the requirements
-  for the STL containers:
-    container_concepts.h
-    sequence_concepts.h
-    assoc_container_concepts.h
-
-  Jeremy Siek, 1999
-
-  TO DO:
-    - some issues with regards to concept classification and mutability
-      including AssociativeContianer -> ForwardContainer
-      and SortedAssociativeContainer -> ReversibleContainer
-    - HashedAssociativeContainer
-    - Allocator
-    - Function Object Concepts
-
-  */
-
-#ifndef _STLP_USE_CONCEPT_CHECKS
-
-// Some compilers lack the features that are necessary for concept checks.
-// On those compilers we define the concept check macros to do nothing.
-#define _STLP_REQUIRES(__type_var, __concept) do {} while(0)
-#define _STLP_CLASS_REQUIRES(__type_var, __concept) \
-  static int  __##__type_var##_##__concept
-#define _STLP_CONVERTIBLE(__type_x, __type_y) do {} while(0)
-#define _STLP_REQUIRES_SAME_TYPE(__type_x, __type_y) do {} while(0)
-#define _STLP_CLASS_REQUIRES_SAME_TYPE(__type_x, __type_y) \
-  static int  __##__type_x##__type_y##_require_same_type
-#define _STLP_GENERATOR_CHECK(__func, __ret) do {} while(0)
-#define _STLP_CLASS_GENERATOR_CHECK(__func, __ret) \
-  static int  __##__func##__ret##_generator_check
-#define _STLP_UNARY_FUNCTION_CHECK(__func, __ret, __arg) do {} while(0)
-#define _STLP_CLASS_UNARY_FUNCTION_CHECK(__func, __ret, __arg) \
-  static int  __##__func##__ret##__arg##_unary_function_check
-#define _STLP_BINARY_FUNCTION_CHECK(__func, __ret, __first, __second) \
-  do {} while(0)
-#define _STLP_CLASS_BINARY_FUNCTION_CHECK(__func, __ret, __first, __second) \
-  static int  __##__func##__ret##__first##__second##_binary_function_check
-#define _STLP_REQUIRES_BINARY_OP(__opname, __ret, __first, __second) \
-  do {} while(0)
-#define _STLP_CLASS_REQUIRES_BINARY_OP(__opname, __ret, __first, __second) \
-  static int __##__opname##__ret##__first##__second##_require_binary_op
-
-#else /* _STLP_USE_CONCEPT_CHECKS */
-
-// This macro tests whether the template argument "__type_var"
-// satisfies the requirements of "__concept".  Here is a list of concepts
-// that we know how to check:
-//       _Allocator
-//       _Assignable
-//       _DefaultConstructible
-//       _EqualityComparable
-//       _LessThanComparable
-//       _TrivialIterator
-//       _InputIterator
-//       _OutputIterator
-//       _ForwardIterator
-//       _BidirectionalIterator
-//       _RandomAccessIterator
-//       _Mutable_TrivialIterator
-//       _Mutable_ForwardIterator
-//       _Mutable_BidirectionalIterator
-//       _Mutable_RandomAccessIterator
-
-#define _STLP_REQUIRES(__type_var, __concept) \
-do { \
-  void (*__x)( __type_var ) = __concept##_concept_specification< __type_var >\
-    ::##__concept##_requirement_violation; __x = __x; } while (0)
-
-// Use this to check whether type X is convertible to type Y
-#define _STLP_CONVERTIBLE(__type_x, __type_y) \
-do { \
-  void (*__x)( __type_x , __type_y ) = _STL_CONVERT_ERROR< __type_x , \
-  __type_y >::__type_X_is_not_convertible_to_type_Y; \
-  __x = __x; } while (0)
-
-// Use this to test whether two template arguments are the same type
-#define _STLP_REQUIRES_SAME_TYPE(__type_x, __type_y) \
-do { \
-  void (*__x)( __type_x , __type_y ) = _STL_SAME_TYPE_ERROR< __type_x, \
-    __type_y  >::__type_X_not_same_as_type_Y; \
-  __x = __x; } while (0)
-
-
-// function object checks
-#define _STLP_GENERATOR_CHECK(__func, __ret) \
-do { \
-  __ret (*__x)( __func&) = \
-     _STL_GENERATOR_ERROR< \
-  __func, __ret>::__generator_requirement_violation; \
-  __x = __x; } while (0)
-
-
-#define _STLP_UNARY_FUNCTION_CHECK(__func, __ret, __arg) \
-do { \
-  __ret (*__x)( __func&, const __arg& ) = \
-     _STL_UNARY_FUNCTION_ERROR< \
-  __func, __ret, __arg>::__unary_function_requirement_violation; \
-  __x = __x; } while (0)
-
-
-#define _STLP_BINARY_FUNCTION_CHECK(__func, __ret, __first, __second) \
-do { \
-  __ret (*__x)( __func&, const __first&, const __second& ) = \
-     _STL_BINARY_FUNCTION_ERROR< \
-  __func, __ret, __first, __second>::__binary_function_requirement_violation; \
-  __x = __x; } while (0)
-
-
-#define _STLP_REQUIRES_BINARY_OP(__opname, __ret, __first, __second) \
-    do { \
-  __ret (*__x)( __first&, __second& ) = _STL_BINARY##__opname##_ERROR< \
-    __ret, __first, __second>::__binary_operator_requirement_violation; \
-  __ret (*__y)( const __first&, const __second& ) = \
-    _STL_BINARY##__opname##_ERROR< __ret, __first, __second>:: \
-      __const_binary_operator_requirement_violation; \
-  __y = __y; __x = __x; } while (0)
-
-
-#ifdef _STLP_NO_FUNCTION_PTR_IN_CLASS_TEMPLATE
-
-#define _STLP_CLASS_REQUIRES(__type_var, __concept)
-#define _STLP_CLASS_REQUIRES_SAME_TYPE(__type_x, __type_y)
-#define _STLP_CLASS_GENERATOR_CHECK(__func, __ret)
-#define _STLP_CLASS_UNARY_FUNCTION_CHECK(__func, __ret, __arg)
-#define _STLP_CLASS_BINARY_FUNCTION_CHECK(__func, __ret, __first, __second)
-#define _STLP_CLASS_REQUIRES_BINARY_OP(__opname, __ret, __first, __second)
-
-#else
-
-// Use this macro inside of template classes, where you would
-// like to place requirements on the template arguments to the class
-// Warning: do not pass pointers and such (e.g. T*) in as the __type_var,
-// since the type_var is used to construct identifiers. Instead typedef
-// the pointer type, then use the typedef name for the __type_var.
-#define _STLP_CLASS_REQUIRES(__type_var, __concept) \
-  typedef void (* __func##__type_var##__concept)( __type_var ); \
-  template <__func##__type_var##__concept _Tp1> \
-  struct __dummy_struct_##__type_var##__concept { }; \
-  static __dummy_struct_##__type_var##__concept< \
-    __concept##_concept_specification< \
-      __type_var>::__concept##_requirement_violation>  \
-  __dummy_ptr_##__type_var##__concept
-
-
-#define _STLP_CLASS_REQUIRES_SAME_TYPE(__type_x, __type_y) \
-  typedef void (* __func_##__type_x##__type_y##same_type)( __type_x, \
-                                                            __type_y ); \
-  template < __func_##__type_x##__type_y##same_type _Tp1> \
-  struct __dummy_struct_##__type_x##__type_y##_same_type { }; \
-  static __dummy_struct_##__type_x##__type_y##_same_type< \
-    _STL_SAME_TYPE_ERROR<__type_x, __type_y>::__type_X_not_same_as_type_Y>  \
-  __dummy_ptr_##__type_x##__type_y##_same_type
-
-
-#define _STLP_CLASS_GENERATOR_CHECK(__func, __ret) \
-  typedef __ret (* __f_##__func##__ret##_generator)( __func& ); \
-  template <__f_##__func##__ret##_generator _Tp1> \
-  struct __dummy_struct_##__func##__ret##_generator { }; \
-  static __dummy_struct_##__func##__ret##_generator< \
-    _STL_GENERATOR_ERROR< \
-      __func, __ret>::__generator_requirement_violation>  \
-  __dummy_ptr_##__func##__ret##_generator
-
-
-#define _STLP_CLASS_UNARY_FUNCTION_CHECK(__func, __ret, __arg) \
-  typedef __ret (* __f_##__func##__ret##__arg##_unary_check)( __func&, \
-                                                         const __arg& ); \
-  template <__f_##__func##__ret##__arg##_unary_check _Tp1> \
-  struct __dummy_struct_##__func##__ret##__arg##_unary_check { }; \
-  static __dummy_struct_##__func##__ret##__arg##_unary_check< \
-    _STL_UNARY_FUNCTION_ERROR< \
-      __func, __ret, __arg>::__unary_function_requirement_violation>  \
-  __dummy_ptr_##__func##__ret##__arg##_unary_check
-
-
-#define _STLP_CLASS_BINARY_FUNCTION_CHECK(__func, __ret, __first, __second) \
-  typedef __ret (* __f_##__func##__ret##__first##__second##_binary_check)( __func&, const __first&,\
-                                                    const __second& ); \
-  template <__f_##__func##__ret##__first##__second##_binary_check _Tp1> \
-  struct __dummy_struct_##__func##__ret##__first##__second##_binary_check { }; \
-  static __dummy_struct_##__func##__ret##__first##__second##_binary_check< \
-    _STL_BINARY_FUNCTION_ERROR<__func, __ret, __first, __second>:: \
-  __binary_function_requirement_violation>  \
-  __dummy_ptr_##__func##__ret##__first##__second##_binary_check
-
-
-#define _STLP_CLASS_REQUIRES_BINARY_OP(__opname, __ret, __first, __second) \
-  typedef __ret (* __f_##__func##__ret##__first##__second##_binary_op)(const __first&, \
-                                                    const __second& ); \
-  template <__f_##__func##__ret##__first##__second##_binary_op _Tp1> \
-  struct __dummy_struct_##__func##__ret##__first##__second##_binary_op { }; \
-  static __dummy_struct_##__func##__ret##__first##__second##_binary_op< \
-    _STL_BINARY##__opname##_ERROR<__ret, __first, __second>:: \
-  __binary_operator_requirement_violation>  \
-  __dummy_ptr_##__func##__ret##__first##__second##_binary_op
-
-#endif
-
-/* helper class for finding non-const version of a type. Need to have
-   something to assign to etc. when testing constant iterators. */
-
-template <class _Tp>
-struct _Mutable_trait {
-  typedef _Tp _Type;
-};
-template <class _Tp>
-struct _Mutable_trait<const _Tp> {
-  typedef _Tp _Type;
-};
-
-
-/* helper function for avoiding compiler warnings about unused variables */
-template <class _Type>
-void __sink_unused_warning(_Type) { }
-
-template <class _TypeX, class _TypeY>
-struct _STL_CONVERT_ERROR {
-  static void
-  __type_X_is_not_convertible_to_type_Y(_TypeX __x, _TypeY) {
-    _TypeY __y = __x;
-    __sink_unused_warning(__y);
-  }
-};
-
-
-template <class _Type> struct __check_equal { };
-
-template <class _TypeX, class _TypeY>
-struct _STL_SAME_TYPE_ERROR {
-  static void
-  __type_X_not_same_as_type_Y(_TypeX , _TypeY ) { 
-    __check_equal<_TypeX> t1 = __check_equal<_TypeY>();
-  }
-};
-
-
-// Some Functon Object Checks
-
-template <class _Func, class _Ret>
-struct _STL_GENERATOR_ERROR {
-  static _Ret __generator_requirement_violation(_Func& __f) {
-    return __f();
-  }
-};
-
-template <class _Func>
-struct _STL_GENERATOR_ERROR<_Func, void> {
-  static void __generator_requirement_violation(_Func& __f) {
-    __f();
-  }
-};
-
-
-template <class _Func, class _Ret, class _Arg>
-struct _STL_UNARY_FUNCTION_ERROR {
-  static _Ret
-  __unary_function_requirement_violation(_Func& __f,
-                                          const _Arg& __arg) {
-    return __f(__arg);
-  }
-};
-
-template <class _Func, class _Arg>
-struct _STL_UNARY_FUNCTION_ERROR<_Func, void, _Arg> {
-  static void
-  __unary_function_requirement_violation(_Func& __f,
-                                          const _Arg& __arg) {
-    __f(__arg);
-  }
-};
-
-template <class _Func, class _Ret, class _First, class _Second>
-struct _STL_BINARY_FUNCTION_ERROR {
-  static _Ret
-  __binary_function_requirement_violation(_Func& __f,
-                                          const _First& __first, 
-                                          const _Second& __second) {
-    return __f(__first, __second);
-  }
-};
-
-template <class _Func, class _First, class _Second>
-struct _STL_BINARY_FUNCTION_ERROR<_Func, void, _First, _Second> {
-  static void
-  __binary_function_requirement_violation(_Func& __f,
-                                          const _First& __first, 
-                                          const _Second& __second) {
-    __f(__first, __second);
-  }
-};
-
-
-#define _STLP_DEFINE_BINARY_OP_CHECK(_OP, _NAME) \
-template <class _Ret, class _First, class _Second> \
-struct _STL_BINARY##_NAME##_ERROR { \
-  static _Ret \
-  __const_binary_operator_requirement_violation(const _First& __first,  \
-                                                const _Second& __second) { \
-    return __first _OP __second; \
-  } \
-  static _Ret \
-  __binary_operator_requirement_violation(_First& __first,  \
-                                          _Second& __second) { \
-    return __first _OP __second; \
-  } \
-}
-
-_STLP_DEFINE_BINARY_OP_CHECK(==, _OP_EQUAL);
-_STLP_DEFINE_BINARY_OP_CHECK(!=, _OP_NOT_EQUAL);
-_STLP_DEFINE_BINARY_OP_CHECK(<, _OP_LESS_THAN);
-_STLP_DEFINE_BINARY_OP_CHECK(<=, _OP_LESS_EQUAL);
-_STLP_DEFINE_BINARY_OP_CHECK(>, _OP_GREATER_THAN);
-_STLP_DEFINE_BINARY_OP_CHECK(>=, _OP_GREATER_EQUAL);
-_STLP_DEFINE_BINARY_OP_CHECK(+, _OP_PLUS);
-_STLP_DEFINE_BINARY_OP_CHECK(*, _OP_TIMES);
-_STLP_DEFINE_BINARY_OP_CHECK(/, _OP_DIVIDE);
-_STLP_DEFINE_BINARY_OP_CHECK(-, _OP_SUBTRACT);
-_STLP_DEFINE_BINARY_OP_CHECK(%, _OP_MOD);
-// ...
-
-// TODO, add unary operators (prefix and postfix)
-
-/*
-  The presence of this class is just to trick EDG into displaying
-  these error messages before any other errors. Without the
-  classes, the errors in the functions get reported after
-  other class errors deep inside the library. The name
-  choice just makes for an eye catching error message :)
- */
-struct _STL_ERROR {
-
-  template <class _Type>
-  static _Type
-  __default_constructor_requirement_violation(_Type) {
-    return _Type();
-  }
-  template <class _Type>
-  static _Type
-  __assignment_operator_requirement_violation(_Type __a) {
-    __a = __a;
-    return __a;
-  }
-  template <class _Type>
-  static _Type
-  __copy_constructor_requirement_violation(_Type __a) {
-    _Type __c(__a);
-    return __c;
-  }
-  template <class _Type>
-  static _Type
-  __const_parameter_required_for_copy_constructor(_Type /* __a */, 
-                                                  const _Type& __b) {
-    _Type __c(__b);
-    return __c;
-  }
-  template <class _Type>
-  static _Type
-  __const_parameter_required_for_assignment_operator(_Type __a, 
-                                                     const _Type& __b) {
-    __a = __b;
-    return __a;
-  }
-  template <class _Type>
-  static _Type
-  __less_than_comparable_requirement_violation(_Type __a, _Type __b) {
-    if (__a < __b || __a > __b || __a <= __b || __a >= __b) return __a;
-    return __b;
-  }
-  template <class _Type>
-  static _Type
-  __equality_comparable_requirement_violation(_Type __a, _Type __b) {
-    if (__a == __b || __a != __b) return __a;
-    return __b;
-  }
-  template <class _Iterator>
-  static void
-  __dereference_operator_requirement_violation(_Iterator __i) {
-    __sink_unused_warning(*__i);
-  }
-  template <class _Iterator>
-  static void
-  __dereference_operator_and_assignment_requirement_violation(_Iterator __i) {
-    *__i = *__i;
-  }
-  template <class _Iterator>
-  static void
-  __preincrement_operator_requirement_violation(_Iterator __i) {
-    ++__i;
-  }
-  template <class _Iterator>
-  static void
-  __postincrement_operator_requirement_violation(_Iterator __i) {
-    __i++;
-  }
-  template <class _Iterator>
-  static void
-  __predecrement_operator_requirement_violation(_Iterator __i) {
-    --__i;
-  }
-  template <class _Iterator>
-  static void
-  __postdecrement_operator_requirement_violation(_Iterator __i) {
-    __i--;
-  }
-  template <class _Iterator, class _Type>
-  static void
-  __postincrement_operator_and_assignment_requirement_violation(_Iterator __i,
-                                                                _Type __t) {
-    *__i++ = __t;
-  }
-  template <class _Iterator, class _Distance>
-  static _Iterator
-  __iterator_addition_assignment_requirement_violation(_Iterator __i, 
-                                                       _Distance __n) {
-    __i += __n;
-    return __i;
-  }
-  template <class _Iterator, class _Distance>
-  static _Iterator
-  __iterator_addition_requirement_violation(_Iterator __i, _Distance __n) {
-    __i = __i + __n;
-    __i = __n + __i;
-    return __i;
-  }
-  template <class _Iterator, class _Distance>
-  static _Iterator
-  __iterator_subtraction_assignment_requirement_violation(_Iterator __i,
-                                                          _Distance __n) {
-    __i -= __n;
-    return __i;
-  }
-  template <class _Iterator, class _Distance>
-  static _Iterator
-  __iterator_subtraction_requirement_violation(_Iterator __i, _Distance __n) {
-    __i = __i - __n;
-    return __i;
-  }
-  template <class _Iterator, class _Distance>
-  static _Distance
-  __difference_operator_requirement_violation(_Iterator __i, _Iterator __j,
-                                              _Distance __n) {
-    __n = __i - __j;
-    return __n;
-  }
-  template <class _Exp, class _Type, class _Distance>
-  static _Type
-  __element_access_operator_requirement_violation(_Exp __x, _Type*,
-                                                  _Distance __n) {
-    return __x[__n];
-  }
-  template <class _Exp, class _Type, class _Distance>
-  static void
-  __element_assignment_operator_requirement_violation(_Exp __x,
-                                                      _Type* __t,
-                                                      _Distance __n) {
-    __x[__n] = *__t;
-  }
-
-}; /* _STL_ERROR */
-
-/* Associated Type Requirements */
-
-_STLP_BEGIN_NAMESPACE
-template <class _Iterator> struct iterator_traits;
-_STLP_END_NAMESPACE
-
-template <class _Iter> 
-struct __value_type_type_definition_requirement_violation {
-  typedef typename __STD::iterator_traits<_Iter>::value_type value_type;
-};
-
-template <class _Iter> 
-struct __difference_type_type_definition_requirement_violation {
-  typedef typename __STD::iterator_traits<_Iter>::difference_type
-          difference_type;
-};
-
-template <class _Iter> 
-struct __reference_type_definition_requirement_violation {
-  typedef typename __STD::iterator_traits<_Iter>::reference reference;
-};
-
-template <class _Iter> 
-struct __pointer_type_definition_requirement_violation {
-  typedef typename __STD::iterator_traits<_Iter>::pointer pointer;
-};
-
-template <class _Iter> 
-struct __iterator_category_type_definition_requirement_violation {
-  typedef typename __STD::iterator_traits<_Iter>::iterator_category 
-          iterator_category;
-};
-
-/* Assignable Requirements */
-
-
-template <class _Type>
-struct _Assignable_concept_specification {
-  static void _Assignable_requirement_violation(_Type __a) {
-    _STL_ERROR::__assignment_operator_requirement_violation(__a);
-    _STL_ERROR::__copy_constructor_requirement_violation(__a);
-    _STL_ERROR::__const_parameter_required_for_copy_constructor(__a,__a);
-    _STL_ERROR::__const_parameter_required_for_assignment_operator(__a,__a);
-  }
-};
-
-/* DefaultConstructible Requirements */
-
-
-template <class _Type>
-struct _DefaultConstructible_concept_specification {
-  static void _DefaultConstructible_requirement_violation(_Type __a) {
-    _STL_ERROR::__default_constructor_requirement_violation(__a);
-  }
-};
-
-/* EqualityComparable Requirements */
-
-template <class _Type>
-struct _EqualityComparable_concept_specification {
-  static void _EqualityComparable_requirement_violation(_Type __a) {
-    _STL_ERROR::__equality_comparable_requirement_violation(__a, __a);
-  }
-};
-
-/* LessThanComparable Requirements */
-template <class _Type>
-struct _LessThanComparable_concept_specification {
-  static void _LessThanComparable_requirement_violation(_Type __a) {
-    _STL_ERROR::__less_than_comparable_requirement_violation(__a, __a);
-  }
-};
-
-/* TrivialIterator Requirements */
-
-template <class _TrivialIterator>
-struct _TrivialIterator_concept_specification {
-static void
-_TrivialIterator_requirement_violation(_TrivialIterator __i) {
-  typedef typename
-    __value_type_type_definition_requirement_violation<_TrivialIterator>::
-    value_type __T;
-  // Refinement of Assignable
-  _Assignable_concept_specification<_TrivialIterator>::
-    _Assignable_requirement_violation(__i);
-  // Refinement of DefaultConstructible
-  _DefaultConstructible_concept_specification<_TrivialIterator>::
-    _DefaultConstructible_requirement_violation(__i);
-  // Refinement of EqualityComparable
-  _EqualityComparable_concept_specification<_TrivialIterator>::
-    _EqualityComparable_requirement_violation(__i);
-  // Valid Expressions
-  _STL_ERROR::__dereference_operator_requirement_violation(__i);
-}
-};
-
-template <class _TrivialIterator>
-struct _Mutable_TrivialIterator_concept_specification {
-static void
-_Mutable_TrivialIterator_requirement_violation(_TrivialIterator __i) {
-  _TrivialIterator_concept_specification<_TrivialIterator>::
-    _TrivialIterator_requirement_violation(__i);
-  // Valid Expressions
-  _STL_ERROR::__dereference_operator_and_assignment_requirement_violation(__i);
-}
-};
-
-/* InputIterator Requirements */
-
-template <class _InputIterator>
-struct _InputIterator_concept_specification {
-static void
-_InputIterator_requirement_violation(_InputIterator __i) {
-  // Refinement of TrivialIterator
-  _TrivialIterator_concept_specification<_InputIterator>::
-    _TrivialIterator_requirement_violation(__i);
-  // Associated Types
-  __difference_type_type_definition_requirement_violation<_InputIterator>();
-  __reference_type_definition_requirement_violation<_InputIterator>();
-  __pointer_type_definition_requirement_violation<_InputIterator>();
-  __iterator_category_type_definition_requirement_violation<_InputIterator>();
-  // Valid Expressions
-  _STL_ERROR::__preincrement_operator_requirement_violation(__i);
-  _STL_ERROR::__postincrement_operator_requirement_violation(__i);
-}
-};
-
-/* OutputIterator Requirements */
-
-template <class _OutputIterator>
-struct _OutputIterator_concept_specification {
-static void
-_OutputIterator_requirement_violation(_OutputIterator __i) {
-  // Refinement of Assignable
-  _Assignable_concept_specification<_OutputIterator>::
-    _Assignable_requirement_violation(__i);
-  // Associated Types
-  __iterator_category_type_definition_requirement_violation<_OutputIterator>();
-  // Valid Expressions
-  _STL_ERROR::__dereference_operator_requirement_violation(__i);
-  _STL_ERROR::__preincrement_operator_requirement_violation(__i);
-  _STL_ERROR::__postincrement_operator_requirement_violation(__i);
-  _STL_ERROR::
-    __postincrement_operator_and_assignment_requirement_violation(__i, *__i);
-}
-};
-
-/* ForwardIterator Requirements */
-
-template <class _ForwardIterator>
-struct _ForwardIterator_concept_specification {
-static void
-_ForwardIterator_requirement_violation(_ForwardIterator __i) {
-  // Refinement of InputIterator
-  _InputIterator_concept_specification<_ForwardIterator>::
-    _InputIterator_requirement_violation(__i);
-}
-};
-
-template <class _ForwardIterator>
-struct _Mutable_ForwardIterator_concept_specification {
-static void
-_Mutable_ForwardIterator_requirement_violation(_ForwardIterator __i) {
-  _ForwardIterator_concept_specification<_ForwardIterator>::
-    _ForwardIterator_requirement_violation(__i);
-  // Refinement of OutputIterator
-  _OutputIterator_concept_specification<_ForwardIterator>::
-    _OutputIterator_requirement_violation(__i);
-}
-};
-
-/* BidirectionalIterator Requirements */
-
-template <class _BidirectionalIterator>
-struct _BidirectionalIterator_concept_specification {
-static void
-_BidirectionalIterator_requirement_violation(_BidirectionalIterator __i) {
-  // Refinement of ForwardIterator
-  _ForwardIterator_concept_specification<_BidirectionalIterator>::
-    _ForwardIterator_requirement_violation(__i);
-  // Valid Expressions
-  _STL_ERROR::__predecrement_operator_requirement_violation(__i);
-  _STL_ERROR::__postdecrement_operator_requirement_violation(__i);
-}
-};
-
-template <class _BidirectionalIterator>
-struct _Mutable_BidirectionalIterator_concept_specification {
-static void
-_Mutable_BidirectionalIterator_requirement_violation(
-       _BidirectionalIterator __i)
-{
-  _BidirectionalIterator_concept_specification<_BidirectionalIterator>::
-    _BidirectionalIterator_requirement_violation(__i);
-  // Refinement of mutable_ForwardIterator
-  _Mutable_ForwardIterator_concept_specification<_BidirectionalIterator>::
-    _Mutable_ForwardIterator_requirement_violation(__i);
-  typedef typename
-    __value_type_type_definition_requirement_violation<
-    _BidirectionalIterator>::value_type __T;
-  typename _Mutable_trait<__T>::_Type* __tmp_ptr = 0;
-  // Valid Expressions
-  _STL_ERROR::
-    __postincrement_operator_and_assignment_requirement_violation(__i,
-                                                                  *__tmp_ptr);
-}
-};
-
-/* RandomAccessIterator Requirements */
-
-template <class _RandAccIter>
-struct _RandomAccessIterator_concept_specification {
-static void
-_RandomAccessIterator_requirement_violation(_RandAccIter __i) {
-  // Refinement of BidirectionalIterator
-  _BidirectionalIterator_concept_specification<_RandAccIter>::
-    _BidirectionalIterator_requirement_violation(__i);
-  // Refinement of LessThanComparable
-  _LessThanComparable_concept_specification<_RandAccIter>::
-    _LessThanComparable_requirement_violation(__i);
-  typedef typename 
-        __value_type_type_definition_requirement_violation<_RandAccIter>
-        ::value_type
-    value_type;
-  typedef typename
-        __difference_type_type_definition_requirement_violation<_RandAccIter>
-        ::difference_type 
-    _Dist;
-  typedef typename _Mutable_trait<_Dist>::_Type _MutDist;
-
-  // Valid Expressions
-  _STL_ERROR::__iterator_addition_assignment_requirement_violation(__i,
-                                                                   _MutDist());
-  _STL_ERROR::__iterator_addition_requirement_violation(__i,
-                                                        _MutDist());
-  _STL_ERROR::
-    __iterator_subtraction_assignment_requirement_violation(__i,
-                                                            _MutDist());
-  _STL_ERROR::__iterator_subtraction_requirement_violation(__i,
-                                                           _MutDist());
-  _STL_ERROR::__difference_operator_requirement_violation(__i, __i,
-                                                          _MutDist());
-  typename _Mutable_trait<value_type>::_Type* __dummy_ptr = 0;
-  _STL_ERROR::__element_access_operator_requirement_violation(__i,
-                                                              __dummy_ptr,
-                                                              _MutDist());
-}
-};
-
-template <class _RandAccIter>
-struct _Mutable_RandomAccessIterator_concept_specification {
-static void
-_Mutable_RandomAccessIterator_requirement_violation(_RandAccIter __i)
-{
-  _RandomAccessIterator_concept_specification<_RandAccIter>::
-    _RandomAccessIterator_requirement_violation(__i);
-  // Refinement of mutable_BidirectionalIterator
-  _Mutable_BidirectionalIterator_concept_specification<_RandAccIter>::
-    _Mutable_BidirectionalIterator_requirement_violation(__i);
-  typedef typename
-        __value_type_type_definition_requirement_violation<_RandAccIter>
-        ::value_type
-    value_type;
-  typedef typename
-        __difference_type_type_definition_requirement_violation<_RandAccIter>
-        ::difference_type
-    _Dist;
-
-  typename _Mutable_trait<value_type>::_Type* __tmp_ptr = 0;
-  // Valid Expressions
-  _STL_ERROR::__element_assignment_operator_requirement_violation(__i,
-                  __tmp_ptr, _Dist());
-}
-};
-
-#define _STLP_TYPEDEF_REQUIREMENT(__REQUIREMENT) \
-template <class Type> \
-struct __##__REQUIREMENT##__typedef_requirement_violation { \
-  typedef typename Type::__REQUIREMENT __REQUIREMENT; \
-};
-
-_STLP_TYPEDEF_REQUIREMENT(value_type);
-_STLP_TYPEDEF_REQUIREMENT(difference_type);
-_STLP_TYPEDEF_REQUIREMENT(size_type);
-_STLP_TYPEDEF_REQUIREMENT(reference);
-_STLP_TYPEDEF_REQUIREMENT(const_reference);
-_STLP_TYPEDEF_REQUIREMENT(pointer);
-_STLP_TYPEDEF_REQUIREMENT(const_pointer);
-
-
-template <class _Alloc>
-struct _Allocator_concept_specification {
-static void
-_Allocator_requirement_violation(_Alloc __a) {
-  // Refinement of DefaultConstructible
-  _DefaultConstructible_concept_specification<_Alloc>::
-    _DefaultConstructible_requirement_violation(__a);
-  // Refinement of EqualityComparable
-  _EqualityComparable_concept_specification<_Alloc>::
-    _EqualityComparable_requirement_violation(__a);
-  // Associated Types
-  __value_type__typedef_requirement_violation<_Alloc>();
-  __difference_type__typedef_requirement_violation<_Alloc>();
-  __size_type__typedef_requirement_violation<_Alloc>();
-  __reference__typedef_requirement_violation<_Alloc>();
-  __const_reference__typedef_requirement_violation<_Alloc>();
-  __pointer__typedef_requirement_violation<_Alloc>();
-  __const_pointer__typedef_requirement_violation<_Alloc>();
-  typedef typename _Alloc::value_type _Type;
-  _STLP_REQUIRES_SAME_TYPE(typename _Alloc::rebind<_Type>::other, _Alloc);
-}
-};
-
-#endif /* _STLP_USE_CONCEPT_CHECKS */
-
-#endif /* __CONCEPT_CHECKS_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/debug/_debug.c b/src/STLport/stl/debug/_debug.c
deleted file mode 100644
index 028ed76..0000000
--- a/src/STLport/stl/debug/_debug.c
+++ /dev/null
@@ -1,490 +0,0 @@
-/*
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-# ifndef _STLP_DEBUG_C
-#  define  _STLP_DEBUG_C
-
-#if defined ( _STLP_DEBUG )
-
-# ifdef _STLP_THREADS
-#  ifndef _STLP_NEED_MUTABLE 
-#   define _STLP_ACQUIRE_LOCK(_Lock) _Lock._M_acquire_lock();
-#   define _STLP_RELEASE_LOCK(_Lock) _Lock._M_release_lock();
-#  else
-#   define _STLP_ACQUIRE_LOCK(_Lock) ((_STLP_mutex&)_Lock)._M_acquire_lock();
-#   define _STLP_RELEASE_LOCK(_Lock) ((_STLP_mutex&)_Lock)._M_release_lock();
-#  endif /* _STLP_NEED_MUTABLE */
-# else
-#  define _STLP_ACQUIRE_LOCK(_Lock)
-#  define _STLP_RELEASE_LOCK(_Lock)
-# endif /* _STLP_THREADS */
-
-_STLP_BEGIN_NAMESPACE
-
-//==========================================================
-//  global non-inline functions
-//==========================================================
-
-// [ i1, i2)
-template <class _Iterator>
-inline bool  _STLP_CALL
-__in_range_aux(const _Iterator& __it, const _Iterator& __first,
-               const _Iterator& __last, const random_access_iterator_tag &) {
-    return ( __it >= __first && 
-             __it < __last);
-}
-
-template <class _Iterator1, class _Iterator>
-# if defined (_STLP_MSVC) && (_STLP_MSVC >= 1100)
-inline bool _STLP_CALL  __in_range_aux(_Iterator1 __it, const _Iterator& __first,
-# else
-inline bool _STLP_CALL  __in_range_aux(const _Iterator1& __it, const _Iterator& __first,
-# endif
-                                       const _Iterator& __last, const forward_iterator_tag &) {
-    _Iterator1 __i(__first);
-    for (;  __i != __last && __i != __it; ++__i);
-    return (__i!=__last);
-}
-
-# if defined (_STLP_NONTEMPL_BASE_MATCH_BUG)
-template <class _Iterator1, class _Iterator>
-inline bool  _STLP_CALL
-__in_range_aux(const _Iterator1& __it, const _Iterator& __first,
-               const _Iterator& __last, const bidirectional_iterator_tag &) {
-    _Iterator1 __i(__first);
-    for (;  __i != __last && __i != __it; ++__i);
-    return (__i !=__last);
-}
-# endif
-
-template <class _Iterator>
-bool _STLP_CALL  __check_range(const _Iterator& __first, const _Iterator& __last) {
-    _STLP_VERBOSE_RETURN(__valid_range(__first,__last), _StlMsg_INVALID_RANGE )
-    return true;
-}
-
-template <class _Iterator>
-bool _STLP_CALL  __check_range(const _Iterator& __it, 
-                               const _Iterator& __start, const _Iterator& __finish) {
-    _STLP_VERBOSE_RETURN(__in_range(__it,__start, __finish), 
-                         _StlMsg_NOT_IN_RANGE_1)
-    return true;
-}
-
-template <class _Iterator>
-bool _STLP_CALL  __check_range(const _Iterator& __first, const _Iterator& __last, 
-                               const _Iterator& __start, const _Iterator& __finish) {
-    _STLP_VERBOSE_RETURN(__in_range(__first, __last, __start, __finish), 
-                         _StlMsg_NOT_IN_RANGE_2)
-    return true;
-}
-
-//===============================================================
-
-template <class _Iterator>
-void  _STLP_CALL __invalidate_range(const __owned_list* __base, 
-                                    const _Iterator& __first,
-                                    const _Iterator& __last)
-{
-    typedef _Iterator* _Safe_iterator_ptr;
-    typedef __owned_link _L_type;
-    _STLP_ACQUIRE_LOCK(__base->_M_lock)
-    _L_type* __pos;
-    _L_type* __prev;
-
-    for (__prev = (_L_type*)&__base->_M_node, __pos= (_L_type*)__prev->_M_next; 
-         __pos!=0;) {	    
-        if ((!(&__first == (_Iterator*)__pos || &__last == (_Iterator*)__pos))
-            &&  __in_range_aux(
-			       ((_Iterator*)__pos)->_M_iterator,
-			       __first._M_iterator,
-			       __last._M_iterator,
-			       _STLP_ITERATOR_CATEGORY(__first, _Iterator))) {
-	  __pos->_M_owner = 0;
-	  __pos = (_L_type*) (__prev->_M_next = __pos->_M_next);
-	}
-	else {
-	  __prev = __pos;
-	  __pos=(_L_type*)__pos->_M_next;
-	}
-    }
-    _STLP_RELEASE_LOCK(__base->_M_lock)    
-}
-
-template <class _Iterator>
-void  _STLP_CALL __invalidate_iterator(const __owned_list* __base, 
-                                       const _Iterator& __it)
-{
-    typedef __owned_link   _L_type;
-    _L_type*  __position, *__prev;
-    _STLP_ACQUIRE_LOCK(__base->_M_lock)
-    for (__prev = (_L_type*)&__base->_M_node, __position = (_L_type*)__prev->_M_next; 
-         __position!= 0;) {
-      // this requires safe iterators to be derived from __owned_link
-       if ((__position != (_L_type*)&__it) && ((_Iterator*)__position)->_M_iterator ==__it._M_iterator) {
-	    __position->_M_owner = 0;
-	    __position = (_L_type*) (__prev->_M_next = __position->_M_next);
-        }
-       else {
-	 __prev = __position;
-	 __position=(_L_type*)__position->_M_next;
-       }
-    }
-    _STLP_RELEASE_LOCK(__base->_M_lock)
-}
-
-_STLP_END_NAMESPACE
-
-# endif /* _STLP_DEBUG */
-
-# if defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION)
-
-// dwa 12/26/99 -- for abort
-#  if defined (_STLP_USE_NEW_C_HEADERS)
-#   include <cstdlib>
-#  else
-#   include <stdlib.h>
-#  endif
-
-# if defined (_STLP_WIN32)
-#  include <stl/_threads.h>
-# endif
-
-//==========================================================
-// .c section
-//  owned_list non-inline methods and global functions 
-//==========================================================
-
-#if defined ( _STLP_ASSERTIONS )
-
-_STLP_BEGIN_NAMESPACE
-
-# ifndef _STLP_STRING_LITERAL
-# define _STLP_STRING_LITERAL(__x) __x
-# endif
-
-# ifdef _STLP_WINCE
-#  define _STLP_PERCENT_S "%hs" 
-# else
-#  define _STLP_PERCENT_S "%s" 
-# endif
-
-# define _STLP_MESSAGE_TABLE_BODY = { \
-_STLP_STRING_LITERAL("\n" _STLP_PERCENT_S "(%d): STL error: %s\n"), \
-_STLP_STRING_LITERAL(_STLP_PERCENT_S "(%d): STL assertion failure : " _STLP_PERCENT_S "\n" _STLP_ASSERT_MSG_TRAILER), \
-_STLP_STRING_LITERAL("\n" _STLP_PERCENT_S "(%d): STL error : " _STLP_PERCENT_S "\n" _STLP_PERCENT_S "(%d): STL assertion failure:     " _STLP_PERCENT_S " \n" _STLP_ASSERT_MSG_TRAILER), \
-_STLP_STRING_LITERAL("Invalid argument to operation (see operation documentation)"),                  \
-_STLP_STRING_LITERAL("Taking an iterator out of destroyed (or otherwise corrupted) container"),       \
-_STLP_STRING_LITERAL("Trying to extract an object out from empty container"),\
-_STLP_STRING_LITERAL("Past-the-end iterator could not be erased"),  \
-_STLP_STRING_LITERAL("Index out of bounds"),  \
-_STLP_STRING_LITERAL("Container doesn't own the iterator"),  \
-_STLP_STRING_LITERAL("Uninitialized or invalidated (by mutating operation) iterator used"),  \
-_STLP_STRING_LITERAL("Uninitialized or invalidated (by mutating operation) lefthand iterator in expression"),  \
-_STLP_STRING_LITERAL("Uninitialized or invalidated (by mutating operation) righthand iterator in expression"),  \
-_STLP_STRING_LITERAL("Iterators used in expression are from different owners"),  \
-_STLP_STRING_LITERAL("Iterator could not be dereferenced (past-the-end ?)"),  \
-_STLP_STRING_LITERAL("Range [first,last) is invalid"),  \
-_STLP_STRING_LITERAL("Iterator is not in range [first,last)"),  \
-_STLP_STRING_LITERAL("Range [first,last) is not in range [start,finish)"),  \
-_STLP_STRING_LITERAL("The advance would produce invalid iterator"),  \
-_STLP_STRING_LITERAL("Iterator is singular (advanced beyond the bounds ?)"),  \
-_STLP_STRING_LITERAL("Memory block deallocated twice"),  \
-_STLP_STRING_LITERAL("Deallocating a block that was never allocated"),  \
-_STLP_STRING_LITERAL("Deallocating a memory block allocated for another type"),  \
-_STLP_STRING_LITERAL("Size of block passed to deallocate() doesn't match block size"),  \
-_STLP_STRING_LITERAL("Pointer underrun - safety margin at front of memory block overwritten"),  \
-_STLP_STRING_LITERAL("Pointer overrrun - safety margin at back of memory block overwritten"),   \
-_STLP_STRING_LITERAL("Attempt to dereference null pointer returned by auto_ptr::get()"),   \
-_STLP_STRING_LITERAL("Unknown problem") \
-  }
-
-# if ( _STLP_STATIC_TEMPLATE_DATA > 0 )
-template <class _Dummy>
-const char* __stl_debug_engine<_Dummy>::_Message_table[_StlMsg_MAX]  _STLP_MESSAGE_TABLE_BODY;
-
-# else
-__DECLARE_INSTANCE(const char*, __stl_debug_engine<bool>::_Message_table[_StlMsg_MAX],
-		   _STLP_MESSAGE_TABLE_BODY);
-
-# endif
-
-# undef _STLP_STRING_LITERAL
-# undef _STLP_PERCENT_S
-_STLP_END_NAMESPACE
-
-// abort()
-#    include <cstdlib>
-
-#  if !defined( _STLP_DEBUG_MESSAGE )
-
-#    include <cstdarg>
-#    include <cstdio>
-
-_STLP_BEGIN_NAMESPACE
-
-template <class _Dummy>
-void _STLP_CALL  
-__stl_debug_engine<_Dummy>::_Message(const char * __format_str, ...)
-{
-	STLPORT_CSTD::va_list __args;
-	va_start( __args, __format_str );
-
-# if defined (_STLP_WINCE)
-	TCHAR __buffer[512];
-	int _convert = strlen(__format_str) + 1;
-	LPWSTR _lpw = (LPWSTR)alloca(_convert*sizeof(wchar_t));
-	_lpw[0] = '\0';
-	MultiByteToWideChar(GetACP(), 0, __format_str, -1, _lpw, _convert);
-	wvsprintf(__buffer, _lpw, __args);
-	//	wvsprintf(__buffer, __format_str, __args);
-	_STLP_WINCE_TRACE(__buffer);
-# elif defined (_STLP_WIN32) && ( defined(_STLP_MSVC) || defined (__ICL) || defined (__BORLANDC__))
-    char __buffer [4096];
-    _vsnprintf(__buffer, sizeof(__buffer) / sizeof(char),
-               __format_str, __args);
-    OutputDebugStringA(__buffer);
-# elif defined (__amigaos__)
-    STLPORT_CSTD::vfprintf(stderr, __format_str, (char *)__args);
-# else
-    STLPORT_CSTD::vfprintf(stderr, __format_str, __args);
-# endif /* WINCE */
-
-# ifdef _STLP_DEBUG_MESSAGE_POST
-	_STLP_DEBUG_MESSAGE_POST
-# endif
-
-    va_end(__args);
-
-}
-
-_STLP_END_NAMESPACE
-
-#  endif /* _STLP_DEBUG_MESSAGE */
-
-
-_STLP_BEGIN_NAMESPACE
-
-
-template <class _Dummy>
-void _STLP_CALL  
-__stl_debug_engine<_Dummy>::_IndexedError(int __error_ind, const char* __f, int __l)
-{
-  __stl_debug_message(_Message_table[_StlFormat_ERROR_RETURN], 
-		      __f, __l, _Message_table[__error_ind]);
-}
-
-template <class _Dummy>
-void _STLP_CALL  
-__stl_debug_engine<_Dummy>::_VerboseAssert(const char* __expr, int __error_ind, const char* __f, int __l)
-{
-  __stl_debug_message(_Message_table[_StlFormat_VERBOSE_ASSERTION_FAILURE],
-		      __f, __l, _Message_table[__error_ind], __f, __l, __expr);
-  __stl_debug_terminate();
-}
-
-template <class _Dummy>
-void _STLP_CALL 
-__stl_debug_engine<_Dummy>::_Assert(const char* __expr, const char* __f, int __l)
-{
-  __stl_debug_message(_Message_table[_StlFormat_ASSERTION_FAILURE],__f, __l, __expr);
-  __stl_debug_terminate();
-}
-
-// if exceptions are present, sends unique exception
-// if not, calls abort() to terminate
-template <class _Dummy>
-void _STLP_CALL 
-__stl_debug_engine<_Dummy>::_Terminate()
-{
-# ifdef _STLP_USE_NAMESPACES
-  using namespace _STLP_STD;
-# endif
-# if defined (_STLP_USE_EXCEPTIONS) && ! defined (_STLP_NO_DEBUG_EXCEPTIONS)
-  throw __stl_debug_exception();
-# else
-  _STLP_ABORT();
-# endif
-}
-
-_STLP_END_NAMESPACE
-
-# endif /* _STLP_ASSERTIONS */
-
-#ifdef _STLP_DEBUG
-
-_STLP_BEGIN_NAMESPACE
-
-//==========================================================
-//  owned_list non-inline methods 
-//==========================================================
-
-template <class _Dummy>
-void  _STLP_CALL
-__stl_debug_engine<_Dummy>::_Invalidate_all(__owned_list* __l) {
-  _STLP_ACQUIRE_LOCK(__l->_M_lock);
-  _Stamp_all(__l, 0);
-  __l->_M_node._M_next =0;
-  _STLP_RELEASE_LOCK(__l->_M_lock);
-}
-
-// boris : this is unasafe routine; should be used from within critical section only !
-template <class _Dummy>
-void  _STLP_CALL
-__stl_debug_engine<_Dummy>::_Stamp_all(__owned_list* __l, __owned_list* __o) {
-  // crucial
-  if (__l->_M_node._M_owner) {
-    for (__owned_link*  __position = (__owned_link*)__l->_M_node._M_next; 
-	 __position != 0; __position= (__owned_link*)__position->_M_next) {
-      _STLP_ASSERT(__position->_Owner()== __l)
-      __position->_M_owner=__o;
-    }
-  }
-}
-
-template <class _Dummy>
-void  _STLP_CALL
-__stl_debug_engine<_Dummy>::_Verify(const __owned_list* __l) {
-  _STLP_ACQUIRE_LOCK(__l->_M_lock);
-  if (__l) {
-    _STLP_ASSERT(__l->_M_node._Owner() != 0)
-    for (__owned_link* __position = (__owned_link*)__l->_M_node._M_next; 
-         __position != 0; __position= (__owned_link*)__position->_M_next) {
-      _STLP_ASSERT(__position->_Owner()== __l)
-    }
-  }
-  _STLP_RELEASE_LOCK(__l->_M_lock);
-}
-
-template <class _Dummy>
-void _STLP_CALL  
-__stl_debug_engine<_Dummy>::_Swap_owners(__owned_list& __x, __owned_list& __y) {
-
-  //  according to the standard : --no swap() function invalidates any references, 
-  //  pointers,  or  iterators referring to the elements of the containers being swapped.
-
-  __owned_link* __tmp;
-
-  // boris : there is a deadlock potential situation here if we lock two containers sequentially.
-  // As user is supposed to provide its own synchronization around swap() ( it is unsafe to do any container/iterator access
-  // in parallel with swap()), we just do not use any locking at all -- that behaviour is closer to non-debug version
-
-  __tmp = __x._M_node._M_next;
-
-  _Stamp_all(&__x, &__y);
-  _Stamp_all(&__y, &__x);
-
-  __x._M_node._M_next = __y._M_node._M_next;
-  __y._M_node._M_next = __tmp;  
-
-}
-
-template <class _Dummy>
-void _STLP_CALL 
-__stl_debug_engine<_Dummy>::_M_detach(__owned_list* __l, __owned_link* __c_node) {
-  if (__l  != 0) {
-
-    _STLP_VERBOSE_ASSERT(__l->_Owner()!=0, _StlMsg_INVALID_CONTAINER)
-
-    _STLP_ACQUIRE_LOCK(__l->_M_lock)
-      // boris : re-test the condition in case someone else already deleted us
-      if(__c_node->_M_owner != 0) {
-        __owned_link* __prev, *__next;
-        
-        for (__prev = &__l->_M_node; (__next = __prev->_M_next) != __c_node; 
-             __prev = __next) {
-          _STLP_ASSERT(__next && __next->_Owner() == __l)
-            }
-        
-        __prev->_M_next = __c_node->_M_next;
-        __c_node->_M_owner=0;
-      }
-    _STLP_RELEASE_LOCK(__l->_M_lock)
-  }
-}
-
-template <class _Dummy>
-void _STLP_CALL 
-__stl_debug_engine<_Dummy>::_M_attach(__owned_list* __l, __owned_link* __c_node) {
-  if (__l ==0) {
-    (__c_node)->_M_owner = 0;    
-  } else {
-    _STLP_VERBOSE_ASSERT(__l->_Owner()!=0, _StlMsg_INVALID_CONTAINER)
-    _STLP_ACQUIRE_LOCK(__l->_M_lock)
-    __c_node->_M_owner = __l;
-    __c_node->_M_next = __l->_M_node._M_next;
-    __l->_M_node._M_next = __c_node;
-    _STLP_RELEASE_LOCK(__l->_M_lock)
-  }
-}
-
-
-template <class _Dummy>
-void* _STLP_CALL
-__stl_debug_engine<_Dummy>::_Get_container_ptr(const __owned_link* __l) {
-  const __owned_list* __owner    = __l->_Owner();
-  _STLP_VERBOSE_RETURN_0(__owner != 0, _StlMsg_INVALID_ITERATOR)
-  void* __ret = __CONST_CAST(void*,__owner->_Owner());
-  _STLP_VERBOSE_RETURN_0(__ret !=0, _StlMsg_INVALID_CONTAINER)
-  return __ret;
-}
-
-template <class _Dummy>
-bool _STLP_CALL
-__stl_debug_engine<_Dummy>::_Check_same_owner( const __owned_link& __i1, 
-                                               const __owned_link& __i2)
-{
-  _STLP_VERBOSE_RETURN(__i1._Valid(), _StlMsg_INVALID_LEFTHAND_ITERATOR)
-  _STLP_VERBOSE_RETURN(__i2._Valid(), _StlMsg_INVALID_RIGHTHAND_ITERATOR)
-  _STLP_VERBOSE_RETURN((__i1._Owner()==__i2._Owner()), _StlMsg_DIFFERENT_OWNERS)
-  return true;
-}
-
-template <class _Dummy>
-bool  _STLP_CALL
-__stl_debug_engine<_Dummy>::_Check_same_owner_or_null( const __owned_link& __i1, 
-						       const __owned_link& __i2)
-{
-  _STLP_VERBOSE_RETURN(__i1._Owner()==__i2._Owner(), _StlMsg_DIFFERENT_OWNERS)
-  return true;
-}
-
-template <class _Dummy>
-bool _STLP_CALL
-__stl_debug_engine<_Dummy>::_Check_if_owner( const __owned_list * __l, const __owned_link& __it)
-{
-  const __owned_list* __owner_ptr = __it._Owner();
-  _STLP_VERBOSE_RETURN(__owner_ptr!=0, _StlMsg_INVALID_ITERATOR)
-  _STLP_VERBOSE_RETURN(__l==__owner_ptr, _StlMsg_NOT_OWNER)
-  return true;
-}
-
-
-_STLP_END_NAMESPACE
-
-#endif /* _STLP_DEBUG */
-
-#endif /* if defined (EXPOSE_GLOBALS_IMPLEMENTATION) */
-
-#endif /* header guard */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/stl/debug/_debug.h b/src/STLport/stl/debug/_debug.h
deleted file mode 100644
index 0297598..0000000
--- a/src/STLport/stl/debug/_debug.h
+++ /dev/null
@@ -1,426 +0,0 @@
-/*
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_DEBUG_H
-# define _STLP_DEBUG_H
-
-# if defined (_STLP_ASSERTIONS) || defined (_STLP_DEBUG)
-
-#ifndef _STLP_CONFIG_H
-# include <stl/_config.h>
-#endif
-
-# if !defined (_STLP_EXTRA_OPERATORS_FOR_DEBUG) && \
-     ( defined (_STLP_BASE_MATCH_BUG) || (defined (_STLP_MSVC) && _STLP_MSVC < 1100 ) )
-#  define _STLP_EXTRA_OPERATORS_FOR_DEBUG
-# endif
-
-# if !defined(_STLP_FILE__)
-#   define _STLP_FILE__ __FILE__
-# endif
- 
-enum {
-  _StlFormat_ERROR_RETURN,
-  _StlFormat_ASSERTION_FAILURE,
-  _StlFormat_VERBOSE_ASSERTION_FAILURE,
-  _StlMsg_INVALID_ARGUMENT,
-  _StlMsg_INVALID_CONTAINER,
-  _StlMsg_EMPTY_CONTAINER,
-  _StlMsg_ERASE_PAST_THE_END,
-  _StlMsg_OUT_OF_BOUNDS,
-  _StlMsg_NOT_OWNER,
-  _StlMsg_INVALID_ITERATOR,
-  _StlMsg_INVALID_LEFTHAND_ITERATOR,
-  _StlMsg_INVALID_RIGHTHAND_ITERATOR,
-  _StlMsg_DIFFERENT_OWNERS     ,
-  _StlMsg_NOT_DEREFERENCEABLE  ,
-  _StlMsg_INVALID_RANGE        ,
-  _StlMsg_NOT_IN_RANGE_1       ,
-  _StlMsg_NOT_IN_RANGE_2       ,
-  _StlMsg_INVALID_ADVANCE      ,
-  _StlMsg_SINGULAR_ITERATOR    ,
-  // debug alloc messages
-  _StlMsg_DBA_DELETED_TWICE    ,
-  _StlMsg_DBA_NEVER_ALLOCATED  ,
-  _StlMsg_DBA_TYPE_MISMATCH    ,
-  _StlMsg_DBA_SIZE_MISMATCH    ,
-  _StlMsg_DBA_UNDERRUN         ,
-  _StlMsg_DBA_OVERRUN          ,
-  // auto_ptr messages
-  _StlMsg_AUTO_PTR_NULL    ,
-  _StlMsg_UNKNOWN
-  /* _StlMsg_MAX */
-};
-
-/* have to hardcode that ;() */
-# define _StlMsg_MAX 27
-
-_STLP_BEGIN_NAMESPACE
-
-// This class is unique (not inherited from exception),
-// to disallow catch in anything but (...)
-struct __stl_debug_exception {
-  // no members
-};
-
-class _STLP_CLASS_DECLSPEC __owned_link;
-class _STLP_CLASS_DECLSPEC __owned_list;
-
-template <class _Dummy>
-struct __stl_debug_engine {
-
-  // Basic routine to report any debug message
-  // Use _STLP_DEBUG_MESSAGE to override
-  static void _STLP_CALL _Message(const char * format_str, ...);
-
-  // Micsellanous function to report indexed error message
-  static void _STLP_CALL  _IndexedError(int __ind, const char* __f, int __l);
-
-  // Basic assertion report mechanism.
-  // Reports failed assertion via __stl_debug_message and calls _Terminate
-  // if _STLP_DEBUG_TERMINATE is specified, calls __stl_debug_terminate instead
-  static void _STLP_CALL  _Assert(const char* __expr, const char* __f, int __l);
-
-  // The same, with additional diagnostics
-  static void _STLP_CALL  _VerboseAssert(const char* __expr, int __error_ind, const char* __f, int __l);
-
-  // If exceptions are present, sends unique exception
-  // If not, calls _STLP_ABORT() to terminate
-  // Use _STLP_DEBUG_TERMINATE to override
-  static void _STLP_CALL  _Terminate();
-
-# ifdef _STLP_DEBUG
-
-  // owned_list/link delegate non-inline functions here
-
-  static bool _STLP_CALL  _Check_same_owner( const __owned_link& __i1, 
-                                             const __owned_link& __i2);
-  static bool _STLP_CALL  _Check_same_owner_or_null( const __owned_link& __i1, 
-                                                     const __owned_link& __i2);
-  static bool  _STLP_CALL _Check_if_owner( const __owned_list*, const __owned_link&);
-
-  static void _STLP_CALL  _Verify(const __owned_list*);
-  
-  static void _STLP_CALL  _Swap_owners(__owned_list&, __owned_list& /*, bool __swap_roots */ );
- 
-  static void _STLP_CALL  _Invalidate_all(__owned_list*);
-  
-  static void _STLP_CALL  _Stamp_all(__owned_list*, __owned_list*);
-
-  static void _STLP_CALL  _M_detach(__owned_list*, __owned_link*);
-
-  static void _STLP_CALL  _M_attach(__owned_list*, __owned_link*);
-
-  // accessor : check and get pointer to the container
-  static void* _STLP_CALL  _Get_container_ptr(const __owned_link*);
-# endif /* _STLP_DEBUG */
-
-  // debug messages and formats
-   _STLP_STATIC_MEMBER_DECLSPEC static const char* _Message_table[_StlMsg_MAX];
-};
-
-
-# if defined (_STLP_USE_TEMPLATE_EXPORT)
-_STLP_EXPORT_TEMPLATE struct _STLP_CLASS_DECLSPEC __stl_debug_engine<bool>;
-# endif /* _STLP_USE_TEMPLATE_EXPORT */
-
-typedef __stl_debug_engine<bool> __stl_debugger;
-
-_STLP_END_NAMESPACE
-
-#  ifndef _STLP_ASSERT
-#   define _STLP_ASSERT(expr) \
-     if (!(expr)) {STLPORT::__stl_debugger::_Assert( # expr, _STLP_FILE__, __LINE__);}
-#  endif
-
-# endif /* _STLP_ASSERTIONS || _STLP_DEBUG */
-
-
-// this section is for _STLP_DEBUG only 
-#if defined ( _STLP_DEBUG )
-
-# ifndef _STLP_VERBOSE_ASSERT
-// fbp : new form not requiring ";"
-#  define _STLP_VERBOSE_ASSERT(expr,__diag_num) \
-    if (!(expr)) { STLPORT::__stl_debugger::_VerboseAssert\
-                                 ( # expr,  __diag_num, _STLP_FILE__, __LINE__ ); \
-         }
-# endif
-
-#  define _STLP_DEBUG_CHECK(expr) _STLP_ASSERT(expr)
-#  define _STLP_DEBUG_DO(expr)    expr;
-
-# ifndef _STLP_VERBOSE_RETURN
-#  define _STLP_VERBOSE_RETURN(__expr,__diag_num) if (!(__expr)) { \
-       __stl_debugger::_IndexedError(__diag_num, __FILE__ , __LINE__); \
-       return false; }
-# endif
-
-# ifndef _STLP_VERBOSE_RETURN_0
-#  define _STLP_VERBOSE_RETURN_0(__expr,__diag_num) if (!(__expr)) { \
-       __stl_debugger::_IndexedError(__diag_num, __FILE__ , __LINE__); \
-       return 0; }
-# endif
-
-#if ! defined (_STLP_INTERNAL_THREADS_H)
-# include <stl/_threads.h>
-#endif
-
-#ifndef _STLP_INTERNAL_ITERATOR_BASE_H
-# include <stl/_iterator_base.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-//=============================================================
-template <class _Iterator>
-inline bool  _STLP_CALL __valid_range(const _Iterator& __i1 ,const _Iterator& __i2, 
-                                      const random_access_iterator_tag&) { 
-    return (__i1< __i2) || (__i1 == __i2);
-}
-
-template <class _Iterator>
-inline bool  _STLP_CALL __valid_range(const _Iterator& __i1 ,const _Iterator& __i2,
-                                      const bidirectional_iterator_tag&) { 
-    // check if comparable
-    bool __dummy(__i1==__i2);
-    return (__dummy==__dummy); 
-}
-
-template <class _Iterator>
-inline bool  _STLP_CALL __valid_range(const _Iterator& __i1 ,const _Iterator& __i2, const forward_iterator_tag&) { 
-    // check if comparable
-    bool __dummy(__i1==__i2);
-    return (__dummy==__dummy); 
-}
-
-template <class _Iterator>
-inline bool  _STLP_CALL __valid_range(const _Iterator&,const _Iterator&, const input_iterator_tag&) { 
-    return true; 
-}
-
-template <class _Iterator>
-inline bool  _STLP_CALL __valid_range(const _Iterator&,const _Iterator&, const output_iterator_tag&) { 
-    return true; 
-}
-
-template <class _Iterator>
-inline bool  _STLP_CALL __valid_range(const _Iterator& __i1, const _Iterator& __i2) { 
-    return __valid_range(__i1,__i2,_STLP_ITERATOR_CATEGORY(__i1, _Iterator));
-}
-
-// Note : that means in range [i1, i2].
-template <class _Iterator>
-inline bool  _STLP_CALL __in_range(const _Iterator& _It, const _Iterator& __i1,
-                                   const _Iterator& __i2) { 
-    return __valid_range(__i1,_It,_STLP_ITERATOR_CATEGORY(__i1, _Iterator)) && 
-        __valid_range(_It,__i2,_STLP_ITERATOR_CATEGORY(_It, _Iterator));
-}
-
-template <class _Iterator>
-inline bool  _STLP_CALL __in_range(const _Iterator& __first, const _Iterator& __last, 
-                                   const _Iterator& __start, const _Iterator& __finish) { 
-    return __valid_range(__first,__last,_STLP_ITERATOR_CATEGORY(__first, _Iterator)) &&
-        __valid_range(__start,__first,_STLP_ITERATOR_CATEGORY(__first, _Iterator)) && 
-        __valid_range(__last,__finish,_STLP_ITERATOR_CATEGORY(__last, _Iterator));
-}
-
-//==========================================================
-
-
-class _STLP_CLASS_DECLSPEC __owned_link {
-public:
-
-  __owned_link() : _M_owner(0) {}
-  __owned_link(const __owned_list* __c) : _M_owner(0), _M_next(0) {
-    __stl_debugger::_M_attach(__CONST_CAST(__owned_list*,__c), this);
-  }
-  __owned_link(const __owned_link& __rhs): _M_owner(0) {
-    __stl_debugger::_M_attach(__CONST_CAST(__owned_list*,__rhs._M_owner), this);
-  }
-  __owned_link& operator=(const __owned_link& __rhs) {
-    __owned_list* __new_owner = __CONST_CAST(__owned_list*,__rhs._M_owner);
-    __owned_list* __old_owner = _M_owner;
-    if ( __old_owner != __new_owner ) {
-      __stl_debugger::_M_detach(__old_owner, this);
-      __stl_debugger::_M_attach(__new_owner, this);
-    }
-    return *this;
-  }
-  ~__owned_link() {
-    __stl_debugger::_M_detach(_M_owner, this);
-    _Invalidate();
-  }
-  
-  const __owned_list* _Owner() const { 
-    return _M_owner; 
-  }
-  __owned_list* _Owner() { 
-    return _M_owner; 
-  }
-  void _Set_owner(const __owned_list* __o)  { 
-    _M_owner= __CONST_CAST(__owned_list*,__o); 
-  }
-  bool  _Valid() const { 
-    return _M_owner !=0; 
-  }
-
-  void _Invalidate() { _M_owner=0; _M_next = 0; }
-  void _Link_to_self() { _M_next= 0; }
-
-  __owned_link* _Next() { return _M_next; }
-  const __owned_link* _Next() const { return _M_next; }
-
-public:
-  __owned_list* _M_owner;
-  __owned_link* _M_next;
-};
-
-
-class _STLP_CLASS_DECLSPEC __owned_list {
-public:
-  __owned_list(const void* __o) {
-    //    fprintf(stderr, "__owned_list(): %p\n",(void*)this);
-    _M_node._M_owner = __CONST_CAST(__owned_list*, __REINTERPRET_CAST(const __owned_list*,__o)); 
-    _M_node._M_next=0;
-  }
-  ~__owned_list() {
-    //    fprintf(stderr, "~__owned_list(): %p\n",(void*)this);
-    _Invalidate_all();
-    // that prevents detach
-    _M_node._Invalidate();
-  }
-  const void* _Owner() const { 
-    return (const void*)_M_node._M_owner; 
-  }
-  void* _Owner() { 
-    return (void*)_M_node._M_owner; 
-  }
-  bool  _Valid() const { 
-    return _M_node._M_owner!=0; 
-  }
-  void _Invalidate() { _M_node._M_owner=0; }
-  
-  __owned_link* _First() { return _M_node._Next(); }
-  __owned_link* _Last() { return 0 ; }
-
-  const __owned_link* _First() const { return (__owned_link*)_M_node._M_next; }
-  const __owned_link* _Last() const { return 0 ;}
-  
-  void _Verify() const {
-    __stl_debugger::_Verify(this); 
-  }
-  
-  void _Swap_owners(__owned_list& __y) { 
-    __stl_debugger::_Swap_owners(*this, __y); 
-  }
- 
-  void _Invalidate_all() { 
-    __stl_debugger::_Invalidate_all(this);
-  }
-  
-  mutable __owned_link              _M_node; 
-  mutable _STLP_mutex            _M_lock;
-  
-private:
-  // should never be called, should be left undefined,
-  // but some compilers complain about it ;(
-  __owned_list(const __owned_list&){}
-  void operator=(const __owned_list&) {}
-
-  friend class __owned_link;
-  friend struct __stl_debug_engine<bool>;
-};
-
-
-//==========================================================
-
-// forward declaratioins
-
-template <class _Iterator>
-bool  _STLP_CALL __check_range(const _Iterator&, const _Iterator&);
-template <class _Iterator>
-bool _STLP_CALL  __check_range(const _Iterator&, 
-                               const _Iterator&, const _Iterator&);
-template <class _Iterator>
-bool _STLP_CALL  __check_range(const _Iterator&, const _Iterator& , 
-                               const _Iterator&, const _Iterator& );
-
-template <class _Iterator>
-void _STLP_CALL  __invalidate_range(const __owned_list* __base, 
-                                    const _Iterator& __first,
-                                    const _Iterator& __last);
-
-template <class _Iterator>
-void  _STLP_CALL __invalidate_iterator(const __owned_list* __base, 
-                                       const _Iterator& __it);
-
-//============================================================
-
-inline bool _STLP_CALL 
-__check_same_owner( const __owned_link& __i1, const __owned_link& __i2) {
-  return __stl_debugger::_Check_same_owner(__i1,__i2);
-}
-inline bool _STLP_CALL  
-__check_same_owner_or_null( const __owned_link& __i1, const __owned_link& __i2) {
-  return __stl_debugger::_Check_same_owner_or_null(__i1,__i2);
-}
-
-template <class _Iterator>
-inline bool _STLP_CALL  __check_if_owner( const __owned_list* __owner, 
-                                          const _Iterator& __it) {
-  return __stl_debugger::_Check_if_owner(__owner, (const __owned_link&)__it);
-}
-
-_STLP_END_NAMESPACE
-
-# endif /* _STLP_DEBUG */
-
-#if defined ( _STLP_ASSERTIONS )
-
-# ifndef _STLP_ASSERT_MSG_TRAILER
-#  define _STLP_ASSERT_MSG_TRAILER
-# endif
-
-// dwa 12/30/98 - if _STLP_DEBUG_MESSAGE is defined, the user can supply own definition.
-# if !defined( _STLP_DEBUG_MESSAGE )
-#   define __stl_debug_message __stl_debugger::_Message
-# else
-    extern  void __stl_debug_message(const char * format_str, ...);
-# endif
-
-// fbp: if _STLP_DEBUG_TERMINATE is defined, the user can supply own definition.
-# if !defined( _STLP_DEBUG_TERMINATE )
-#   define __stl_debug_terminate __stl_debugger::_Terminate
-# else
-    extern  void __stl_debug_terminate(void);
-# endif
-
-#endif
-
-# if !defined (_STLP_LINK_TIME_INSTANTIATION)
-#  include <stl/debug/_debug.c>
-# endif
-
-#endif /* DEBUG_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/stl/debug/_deque.h b/src/STLport/stl/debug/_deque.h
deleted file mode 100644
index 2212696..0000000
--- a/src/STLport/stl/debug/_deque.h
+++ /dev/null
@@ -1,281 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_DBG_DEQUE_H
-#define _STLP_INTERNAL_DBG_DEQUE_H
-
-#include <stl/debug/_iterator.h>
-
-# if !defined (_STLP_USE_WRAPPER_FOR_ALLOC_PARAM) && !defined (_STLP_NO_DEFAULT_NON_TYPE_PARAM)
-#  undef  _DBG_deque
-#  define _DBG_deque deque
-# endif
-
-# define _DEQUE_WRAPPER _DBG_deque<_Tp,_Alloc>
-
-# define _STLP_DEQUE_SUPER   __WORKAROUND_DBG_RENAME(deque) <_Tp,_Alloc>
-
-_STLP_BEGIN_NAMESPACE
-
-# ifdef _STLP_DEBUG_USE_DISTINCT_VALUE_TYPE_HELPERS
-template <class _Tp, class _Alloc>
-inline _Tp* value_type(const  _DBG_iter_base< _STLP_DEQUE_SUPER >&) {
-  return (_Tp*)0;
-}
-template <class _Tp, class _Alloc>
-inline random_access_iterator_tag iterator_category(const  _DBG_iter_base< _STLP_DEQUE_SUPER >&) {
-  return random_access_iterator_tag();
-}
-# endif
-
-template <class _Tp, _STLP_DBG_ALLOCATOR_SELECT(_Tp) >
-class _DBG_deque : public _STLP_DEQUE_SUPER {
-
-  typedef _DBG_deque<_Tp,_Alloc> _Self;
-  typedef _STLP_DEQUE_SUPER _Base;
-
-public:                         // Basic types
-
-  __IMPORT_CONTAINER_TYPEDEFS(_Base)
-
-public:                         // Iterators
-  typedef _DBG_iter< _STLP_DEQUE_SUPER, _Nonconst_traits<value_type> >    iterator;
-  typedef _DBG_iter< _STLP_DEQUE_SUPER, _Const_traits<value_type> >   const_iterator;
-
-  _STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS;
-
-protected:
-  __owned_list _M_iter_list;
-  void _Invalidate_iterator(const iterator& __it) { 
-    __invalidate_iterator(&_M_iter_list,__it);
-  }
-  void _Invalidate_all() {
-      _M_iter_list._Invalidate_all();
-  }
-
-public:                         // Basic accessors
-  iterator begin() { return iterator(&_M_iter_list, this->_M_start); }
-  iterator end() { return iterator(&_M_iter_list, this->_M_finish); }
-  const_iterator begin() const { 
-    return const_iterator(&_M_iter_list, this->_M_start); 
-  }
-  const_iterator end() const { 
-    return const_iterator(&_M_iter_list,  this->_M_finish); 
-  }
-
-  reverse_iterator rbegin() { return reverse_iterator(end()); }
-  reverse_iterator rend() { return reverse_iterator(begin()); }
-  const_reverse_iterator rbegin() const 
-    { return const_reverse_iterator(end()); }
-  const_reverse_iterator rend() const 
-    { return const_reverse_iterator(begin()); }
-
-  reference operator[](size_type __n)
-    { return begin()[difference_type(__n)]; }
-  const_reference operator[](size_type __n) const 
-    { return begin()[difference_type(__n)]; }
-
-  reference front() { return *begin(); }
-  reference back() {
-    iterator __tmp = end();
-    --__tmp;
-    return *__tmp;
-  }
-  const_reference front() const { return *begin(); }
-  const_reference back() const {
-    const_iterator __tmp = end();
-    --__tmp;
-    return *__tmp;
-  }
-
-public:                         // Constructor, destructor.
-
-  const _Base* _Get_base() const { return (const _Base*)this; }
-
-  explicit _DBG_deque(const allocator_type& __a = allocator_type()) :
-    _STLP_DEQUE_SUPER(__a), _M_iter_list(_Get_base()) {}
-  _DBG_deque(const _Self& __x) : _STLP_DEQUE_SUPER(__x), _M_iter_list(_Get_base()) {}
-  _DBG_deque(size_type __n, const value_type& __value,
-        const allocator_type& __a = allocator_type()) : 
-    _STLP_DEQUE_SUPER(__n, __value, __a), _M_iter_list(_Get_base()) {}
-  explicit _DBG_deque(size_type __n) : _STLP_DEQUE_SUPER(__n), _M_iter_list(_Get_base()) {}
-
-#ifdef _STLP_MEMBER_TEMPLATES
-  template <class _InputIterator>
-  _DBG_deque(_InputIterator __first, _InputIterator __last,
-        const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL) : 
-    _STLP_DEQUE_SUPER(__first, __last, __a) , _M_iter_list(_Get_base()) {}
-# ifdef _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS
-  template <class _InputIterator>
-  _DBG_deque(_InputIterator __first, _InputIterator __last):
-    _STLP_DEQUE_SUPER(__first, __last, allocator_type()) , _M_iter_list(_Get_base()) {}
-# endif
-#else /* _STLP_MEMBER_TEMPLATES */
-  _DBG_deque(const value_type* __first, const value_type* __last,
-        const allocator_type& __a = allocator_type()) 
-    : _STLP_DEQUE_SUPER(__first, __last, __a), _M_iter_list(_Get_base()) {}
-
-  _DBG_deque(const_iterator __first, const_iterator __last,
-        const allocator_type& __a = allocator_type()) 
-    : _STLP_DEQUE_SUPER(__first._M_iterator, __last._M_iterator, __a), 
-      _M_iter_list(_Get_base()) {}
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-  _Self& operator= (const _Self& __x) {
-    _Invalidate_all();
-    (_Base&)*this = (const _Base&)__x; 
-    return *this;
-  }
-
-  void swap(_Self& __x) {
-    _M_iter_list._Swap_owners(__x._M_iter_list);
-    _Base::swap(__x);
-  }
-
-public: 
-  void assign(size_type __n, const _Tp& __val) {
-    _Base::assign(__n, __val);
-  }
-
-#ifdef _STLP_MEMBER_TEMPLATES
-
-  template <class _InputIterator>
-  void assign(_InputIterator __first, _InputIterator __last) {
-    _Base::assign(__first, __last);
-  }
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-public:                         // push_* and pop_*
-  
-  void push_back(const value_type& __t) {
-    _Invalidate_all();
-    _Base::push_back(__t);
-  }
-
-  void push_back() {
-    _Invalidate_all();
-    _Base::push_back();
-  }
-
-  void push_front(const value_type& __t) {
-    _Invalidate_all();
-    _Base::push_front(__t);
-  }
-
-  void push_front() {
-    _Base::push_front();
-    _Invalidate_all();
-  }
-
-
-  void pop_back() {
-    _Invalidate_iterator(end());
-    _Base::pop_back();
-  }
-
-  void pop_front() {
-    _Invalidate_iterator(begin());        
-    _Base::pop_front();
-  }
-
-public:                         // Insert
-
-  iterator insert(iterator __position, const value_type& __x) {
-    _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list, __position))
-    // fbp : invalidation !
-    return iterator(&_M_iter_list, _Base::insert(__position._M_iterator, __x));
-  }
-
-  iterator insert(iterator __position) { 
-    _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list, __position))
-    // fbp : invalidation !
-    return iterator(&_M_iter_list, _Base::insert(__position._M_iterator));
-  }
-
-  void insert(iterator __position, size_type __n, const value_type& __x) {
-    _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list, __position))
-    // fbp : invalidation !
-    _Base::insert(__position._M_iterator, __n, __x);
-  }
-
-#ifdef _STLP_MEMBER_TEMPLATES  
-  template <class _InputIterator>
-  void insert(iterator __position, _InputIterator __first, _InputIterator __last) {
-    _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list, __position))
-    // fbp : invalidation !
-    _Base::insert(__position._M_iterator, __first, __last);
-  }
-#else /* _STLP_MEMBER_TEMPLATES */
-  void insert(iterator __position,
-              const value_type* __first, const value_type* __last) {
-    _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list, __position))
-    _Base::insert(__position._M_iterator, __first, __last);
-  }
-  void insert(iterator __position,
-              const_iterator __first, const_iterator __last) {
-    _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list, __position))
-    _Base::insert(__position._M_iterator, __first._M_iterator, __last._M_iterator);
-  }
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-public:                         // Erase
-  iterator erase(iterator __pos) {
-    _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list, __pos) && (__pos != end()))
-    return iterator (&_M_iter_list, _Base::erase(__pos._M_iterator));
-  }
-
-  iterator erase(iterator __first, iterator __last) {
-    _STLP_DEBUG_CHECK(__first >= begin() && __last <= end())
-    return iterator (&_M_iter_list, _Base::erase(__first._M_iterator, __last._M_iterator));
-  }
-  
-  void clear() {
-    _Invalidate_all();
-    _Base::clear();
-  }
-};
-
-#define _STLP_TEMPLATE_HEADER template <class _Tp, class _Alloc>
-#define _STLP_TEMPLATE_CONTAINER _DBG_deque<_Tp, _Alloc>
-#define _STLP_TEMPLATE_CONTAINER_BASE _STLP_DEQUE_SUPER
-#include <stl/debug/_relops_cont.h>
-#undef _STLP_TEMPLATE_CONTAINER_BASE
-#undef _STLP_TEMPLATE_CONTAINER
-#undef _STLP_TEMPLATE_HEADER
-
-_STLP_END_NAMESPACE 
-
-# undef _DBG_deque
-# undef _STLP_DEQUE_SUPER
-  
-#endif /* _STLP_INTERNAL_DEQUE_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/debug/_hashtable.h b/src/STLport/stl/debug/_hashtable.h
deleted file mode 100644
index 0d5a110..0000000
--- a/src/STLport/stl/debug/_hashtable.h
+++ /dev/null
@@ -1,261 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_DBG_HASHTABLE_H
-#define _STLP_INTERNAL_DBG_HASHTABLE_H
-
-// Hashtable class, used to implement the hashed associative containers
-// hash_set, hash_map, hash_multiset, and hash_multimap.
-
-# include <stl/debug/_iterator.h>
-
-#  undef  hashtable
-#  undef  _DBG_hashtable
-#  define _DBG_hashtable  hashtable
-
-#  define _STLP_DBG_HT_SUPER \
-__WORKAROUND_DBG_RENAME(hashtable) <_Val, _Key, _HF, _ExK, _EqK, _All>
-
-_STLP_BEGIN_NAMESPACE
-
-# ifdef _STLP_DEBUG_USE_DISTINCT_VALUE_TYPE_HELPERS
-template <class _Val, class _Key, class _HF,
-          class _ExK, class _EqK, class _All>
-inline _Val*
-value_type(const  _DBG_iter_base< _STLP_DBG_HT_SUPER >&) {
-  return (_Val*)0;
-}
-
-template <class _Val, class _Key, class _HF,
-          class _ExK, class _EqK, class _All>
-inline forward_iterator_tag
-iterator_category(const  _DBG_iter_base< _STLP_DBG_HT_SUPER >&) {
-  return forward_iterator_tag();
-}
-# endif
-
-template <class _Val, class _Key, class _HF,
-          class _ExK, class _EqK, class _All>
-class _DBG_hashtable : public _STLP_DBG_HT_SUPER {
-  typedef _DBG_hashtable<_Val, _Key, _HF, _ExK, _EqK, _All> _Self;
-  typedef _STLP_DBG_HT_SUPER _Base;
-
-public:
-  typedef _Key key_type;
-  typedef _HF hasher;
-  typedef _EqK key_equal;
-
-  __IMPORT_CONTAINER_TYPEDEFS(_Base)
-
-public:
-  typedef _DBG_iter<_Base, _Nonconst_traits<value_type> >  iterator;
-  typedef _DBG_iter<_Base, _Const_traits<value_type> > const_iterator;
-  typedef typename _Base::iterator _Base_iterator;
-  typedef typename _Base::const_iterator _Base_const_iterator;
-
-protected:
-  void _Invalidate_all() {_M_iter_list._Invalidate_all();}
-
-  void _Invalidate_iterator(const const_iterator& __it) { 
-    __invalidate_iterator(&_M_iter_list,__it); 
-  }
-  void _Invalidate_iterators(const const_iterator& __first, const const_iterator& __last) {
-    const_iterator __cur = __first;
-    while (__cur != __last) __invalidate_iterator(&_M_iter_list, __cur++); 
-  }
-
-  const _Base* _Get_base() const { return (const _Base*)this; }
-  _Base* _Get_base() { return (_Base*)this; }
-
-public:
-  _DBG_hashtable(size_type __n,
-		 const _HF&  __hf,
-		 const _EqK& __eql,
-		 const _ExK& __ext,
-		 const allocator_type& __a = allocator_type()):
-    _STLP_DBG_HT_SUPER(__n, __hf, __eql, __ext, __a),
-    _M_iter_list(_Get_base()) {}
-  
-  _DBG_hashtable(size_type __n,
-		 const _HF&    __hf,
-		 const _EqK&   __eql,
-		 const allocator_type& __a = allocator_type()):
-    
-    _STLP_DBG_HT_SUPER(__n, __hf, __eql, __a),
-    _M_iter_list(_Get_base()) {}
-  
-  _DBG_hashtable(const _Self& __ht):
-    _STLP_DBG_HT_SUPER(__ht),
-    _M_iter_list(_Get_base()) {}
-  
-  _Self& operator= (const _Self& __ht) {
-    _Invalidate_all();
-    _Base::operator=(__ht);
-    return *this;
-  }
-  
-  void swap(_Self& __ht)
-  {
-   _M_iter_list._Swap_owners(__ht._M_iter_list);
-   _Base::swap(__ht);
-  }
-
-  iterator begin() { return iterator(&_M_iter_list, _Base::begin()); }
-  iterator end()   { return iterator(&_M_iter_list, _Base::end()); }
-
-  const_iterator begin() const { return const_iterator(&_M_iter_list, _Base::begin()); }
-  const_iterator end() const { return const_iterator(&_M_iter_list, _Base::end()); }
-
-  pair<iterator, bool> insert_unique(const value_type& __obj)
-  {
-    pair < _Base_iterator, bool> __res =
-      _Base::insert_unique(__obj);
-    return pair<iterator, bool> ( iterator(&_M_iter_list, __res.first), __res.second);
-  }
-
-  iterator insert_equal(const value_type& __obj) {
-    return iterator(&_M_iter_list, _Base::insert_equal(__obj));
-  }
-  
-  pair<iterator, bool> insert_unique_noresize(const value_type& __obj) {
-    pair < _Base_iterator, bool> __res =
-      _Base::insert_unique_noresize(__obj);
-    return pair<iterator, bool> ( iterator(&_M_iter_list, __res.first), __res.second);
-  }
-  
-  iterator insert_equal_noresize(const value_type& __obj) {
-    return iterator(&_M_iter_list, _Base::insert_equal_noresize(__obj));
-  }
-  
-#ifdef _STLP_MEMBER_TEMPLATES
-  template <class _InputIterator>
-  void insert_unique(_InputIterator __f, _InputIterator __l) {
-    _Base::insert_unique(__f, __l);
-  }
-
-  template <class _InputIterator>
-  void insert_equal(_InputIterator __f, _InputIterator __l){
-    _Base::insert_equal(__f, __l);
-  }
-
-#else /* _STLP_MEMBER_TEMPLATES */
-
-  void insert_unique(const value_type* __f, const value_type* __l) {
-    _Base::insert_unique(__f, __l);
-  }
-  
-  void insert_equal(const value_type* __f, const value_type* __l) {
-    _Base::insert_equal(__f, __l);
-  }
-  
-  void insert_unique(const_iterator __f, const_iterator __l) {
-    _Base::insert_unique(__f._M_iterator, __l._M_iterator);
-  }
-  
-  void insert_equal(const_iterator __f, const_iterator __l) {
-    _Base::insert_equal(__f._M_iterator, __l._M_iterator);
-  }
-#endif /*_STLP_MEMBER_TEMPLATES */
-  
-  iterator find(const key_type& __key) {
-    return iterator(&_M_iter_list, _Base::find(__key));
-  } 
-
-  const_iterator find(const key_type& __key) const {
-    return const_iterator(&_M_iter_list, _Base::find(__key));
-  } 
-
-  pair<iterator, iterator> 
-  equal_range(const key_type& __key) {
-    pair < _Base_iterator, _Base_iterator > __res =
-      _Base::equal_range(__key);
-    return pair<iterator,iterator> (iterator(&_M_iter_list,__res.first),
-				    iterator(&_M_iter_list,__res.second));
-  }
-
-  pair<const_iterator, const_iterator> 
-  equal_range(const key_type& __key) const {
-    pair <  _Base_const_iterator, _Base_const_iterator > __res =
-      _Base::equal_range(__key);
-    return pair<const_iterator,const_iterator> (const_iterator(&_M_iter_list,__res.first),
-				    const_iterator(&_M_iter_list,__res.second));
-  }
-
-  size_type erase(const key_type& __key) {
-    pair<const_iterator, const_iterator> __p = equal_range(__key);
-    size_type __n = distance(__p.first, __p.second);
-    _Invalidate_iterators(__p.first, __p.second);
-    _Base::erase(__p.first._M_iterator, __p.second._M_iterator);
-    return __n;
-  }
-
-  void erase(const const_iterator& __it) {
-    _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list, __it))
-    _STLP_DEBUG_CHECK(_Dereferenceable(__it))
-    _Invalidate_iterator(__it);
-    _Base::erase(__it._M_iterator);
-  }
-  void erase(const_iterator __first, const_iterator __last) {
-    _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list, __first)&&
-                      __check_if_owner(&_M_iter_list, __last))
-    _Invalidate_iterators(__first, __last);
-    _Base::erase(__first._M_iterator, __last._M_iterator);
-  }
-  void resize(size_type __num_elements_hint) {
-    _Base::resize(__num_elements_hint);
-  }
-  
-  void clear() {
-    _Invalidate_all();
-    _Base::clear();
-  }
-
-private:
-  __owned_list _M_iter_list;
-
-};
-
-#define _STLP_TEMPLATE_HEADER template <class _Val, class _Key, class _HF, class _ExK, class _EqK, class _All>
-#define _STLP_TEMPLATE_CONTAINER _DBG_hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>
-#define _STLP_TEMPLATE_CONTAINER_BASE hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>
-#include <stl/debug/_relops_hash_cont.h>
-#undef _STLP_TEMPLATE_CONTAINER_BASE
-#undef _STLP_TEMPLATE_CONTAINER
-#undef _STLP_TEMPLATE_HEADER
-
-_STLP_END_NAMESPACE
-#  undef  hashtable
-
-#endif /* _STLP_INTERNAL_HASHTABLE_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
-
diff --git a/src/STLport/stl/debug/_iterator.h b/src/STLport/stl/debug/_iterator.h
deleted file mode 100644
index 2b96a2f..0000000
--- a/src/STLport/stl/debug/_iterator.h
+++ /dev/null
@@ -1,394 +0,0 @@
-/*
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_DBG_ITERATOR_H
-# define _STLP_DBG_ITERATOR_H
-
-# include <stl/_pair.h>
-# include <stl/_alloc.h>
-
-# define _STLP_DBG_ALLOCATOR_SELECT( _Tp ) _STLP_DEFAULT_ALLOCATOR_SELECT( _Tp )
-
-_STLP_BEGIN_NAMESPACE
-
-//============================================================
-
-template <class _Iterator>
-void _Decrement(_Iterator& __it, const bidirectional_iterator_tag &) {
-  --__it;
-}
-
-template <class _Iterator>
-void _Decrement(_Iterator& __it, const random_access_iterator_tag &) {
-  --__it;
-}
-
-template <class _Iterator>
-void _Decrement(_Iterator& __it, const forward_iterator_tag &) {
-  _STLP_ASSERT(0)
-}
-
-template <class _Iterator>
-void _Advance(_Iterator&, ptrdiff_t, const forward_iterator_tag &) {
-  _STLP_ASSERT(0)
-}
-
-template <class _Iterator>
-void _Advance(_Iterator& __it, ptrdiff_t, const bidirectional_iterator_tag &) {
-  _STLP_ASSERT(0)  
-}
-
-template <class _Iterator>
-void _Advance(_Iterator& __it, ptrdiff_t __n, const random_access_iterator_tag &) {
-  __it += __n;
-}
-
-template <class _Iterator>
-ptrdiff_t _DBG_distance(const _Iterator& __x, const _Iterator& __y, const random_access_iterator_tag &) {
-  return __x - __y;
-}
-
-template <class _Iterator>
-ptrdiff_t _DBG_distance(const _Iterator&, const _Iterator&, const forward_iterator_tag &) {
-  _STLP_ASSERT(0)
-  return 0;
-}
-
-template <class _Iterator>
-ptrdiff_t _DBG_distance(const _Iterator&, const _Iterator&, const bidirectional_iterator_tag &) {
-  _STLP_ASSERT(0)  
-  return 0;
-}
-
-template <class _Iterator>
-bool _CompareIt(const _Iterator&, const _Iterator&, const forward_iterator_tag &) {
-  _STLP_ASSERT(0)
-  return false;
-}
-
-template <class _Iterator>
-bool _CompareIt(const _Iterator&, const _Iterator&, const bidirectional_iterator_tag &) {
-  _STLP_ASSERT(0)  
-  return false;
-}
-
-template <class _Iterator>
-bool _CompareIt(const _Iterator& __x, const _Iterator& __y, const random_access_iterator_tag &) {
-  return __x < __y;
-}
-
-
-template <class _Iterator>
-bool _Dereferenceable(_Iterator __it) {
-  return (__it._Get_container_ptr() !=0) && !(__it._M_iterator == (__it._Get_container_ptr())->end());
-}
-
-
-template <class _Iterator>
-bool _Incrementable(const _Iterator& __it, ptrdiff_t __n, const forward_iterator_tag &) {
-  return (__n == 1) && _Dereferenceable(__it);
-}
-
-template <class _Iterator>
-bool _Incrementable(const _Iterator& __it, ptrdiff_t __n, const bidirectional_iterator_tag &) {
-  typedef typename _Iterator::_Container_type __container_type;
-  __container_type* __c = __it._Get_container_ptr();
-  return (__c!=0) && ((__n == 1 && __it._M_iterator != __c->end() ) ||
-    (__n == -1 && __it._M_iterator != __c->begin()));
-}
-
-template <class _Iterator>
-bool _Incrementable(const _Iterator& __it, ptrdiff_t __n, const random_access_iterator_tag &) {
-  typedef typename _Iterator::_Container_type __container_type;
-  __container_type* __c = __it._Get_container_ptr();
-  if (!__c) return false;
-  ptrdiff_t __new_pos = (__it._M_iterator - __c->begin()) + __n;
-  return  (__new_pos >=0) && (__STATIC_CAST(typename __container_type::size_type,__new_pos) <=__c->size());
-}
-
-
-template <class _Container>
-struct _DBG_iter_base : public __owned_link {
-public:
-  typedef typename _Container::value_type value_type;
-  typedef typename _Container::reference  reference;
-  typedef typename _Container::pointer    pointer;
-  typedef ptrdiff_t difference_type;
-  //private:
-  typedef typename _Container::iterator        _Nonconst_iterator;
-  typedef typename _Container::const_iterator  _Const_iterator;
-  typedef _Container                     _Container_type;
-    
-# ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION
-  typedef typename iterator_traits<_Const_iterator>::iterator_category _Iterator_category;
-# else
-  typedef typename _Container::_Iterator_category  _Iterator_category;
-# endif
-  typedef _Iterator_category iterator_category;
-
-  _DBG_iter_base() : __owned_link(0)  {}
-  _DBG_iter_base(const __owned_list* __c, const _Const_iterator& __it) :
-# ifdef __HP_aCC
-    __owned_link(__c), _M_iterator(*__REINTERPRET_CAST(const _Nonconst_iterator *, &__it)) {}
-# else
-    __owned_link(__c), _M_iterator(*(const _Nonconst_iterator*)&__it) {}
-# endif  
-  _Container* _Get_container_ptr() const { 
-    return (_Container*)__stl_debugger::_Get_container_ptr(this); 
-  }
-
-  void __increment() {
-    _STLP_DEBUG_CHECK(_Incrementable(*this,1,_Iterator_category()))
-    ++_M_iterator;
-  }
-  
-  void __decrement() {
-    _STLP_DEBUG_CHECK(_Incrementable(*this,-1,_Iterator_category()))
-    _Decrement(_M_iterator, _Iterator_category());
-  }
-
-  void __advance(difference_type __n) {
-    _STLP_DEBUG_CHECK(_Incrementable(*this,__n, _Iterator_category()))
-    _Advance(_M_iterator,__n, _Iterator_category());
-  }
-
-// protected:
-  _Nonconst_iterator _M_iterator;
-};
-
-template <class _Container>
-ptrdiff_t operator-(const _DBG_iter_base<_Container>& __x,
-                    const _DBG_iter_base<_Container>& __y ) {
-  typedef typename _DBG_iter_base<_Container>::_Iterator_category  _Iterator_category;
-  _STLP_DEBUG_CHECK(__check_same_owner(__x, __y))
-  return _DBG_distance(__x._M_iterator,__y._M_iterator, _Iterator_category());
-}
-
-template <class _Container, class _Traits>
-struct _DBG_iter_mid : public _DBG_iter_base<_Container>
-{
-  typedef _DBG_iter_mid<_Container, typename _Traits::_Non_const_traits> _Nonconst_self;
-  typedef typename _Container::iterator        _Nonconst_iterator;
-  typedef typename _Container::const_iterator  _Const_iterator;
-
-  _DBG_iter_mid() {}
-
-  explicit _DBG_iter_mid(const _Nonconst_self& __it) :
-      _DBG_iter_base<_Container>(__it) {}
-        
-  _DBG_iter_mid(const __owned_list* __c, const _Const_iterator& __it) :
-      _DBG_iter_base<_Container>(__c, __it) {}
-};
-
-template <class _Container, class _Traits>
-struct _DBG_iter : public _DBG_iter_mid<_Container, _Traits> {
-  typedef _DBG_iter_base<_Container>          _Base;
-public:
-  typedef typename _Base::value_type value_type;
-  typedef typename _Base::difference_type difference_type;    
-  typedef typename _Traits::reference  reference;
-  typedef typename _Traits::pointer    pointer;
-
-private:
-  typedef typename _Base::_Nonconst_iterator _Nonconst_iterator;
-  typedef typename _Base::_Const_iterator _Const_iterator;
-
-  typedef _DBG_iter<_Container, _Traits>     _Self;
-  typedef _DBG_iter_mid<_Container, typename _Traits::_Non_const_traits> _Nonconst_mid;
-
-public:
-
-# ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION
-  typedef typename _Base::iterator_category iterator_category;
-# endif
-  typedef typename _Base::_Iterator_category  _Iterator_category;
-    
-public:
-  _DBG_iter() {}
-    // boris : real type of iter would be nice
-  _DBG_iter(const __owned_list* __c, const _Const_iterator& __it) :
-    _DBG_iter_mid<_Container, _Traits>(__c, __it) {}
-
-  // This allows conversions from iterator to const_iterator without being
-  // redundant with the copy constructor below.
-  _DBG_iter(const _Nonconst_mid& __rhs) :
-    _DBG_iter_mid<_Container, _Traits>(__rhs) {}
-
-  _DBG_iter(const  _Self& __rhs) :
-    _DBG_iter_mid<_Container, _Traits>(__rhs) {}
-  
-  // This allows conversions from iterator to const_iterator without being
-  // redundant with the copy assignment operator below.
-  _Self& operator=(const _Nonconst_mid& __rhs)  
-  {
-    (_Base&)*this = __rhs;
-    return *this;
-  }
-
-  _Self& operator=(const  _Self& __rhs) 
-  {
-    (_Base&)*this = __rhs;
-    return *this;
-  }
-  
-  reference operator*() const {
-    _STLP_DEBUG_CHECK(_Dereferenceable(*this))
-    return *this->_M_iterator;
-  }
-
-  _STLP_DEFINE_ARROW_OPERATOR
-  
-  _Self& operator++() {
-    this->__increment();
-    return *this;
-  }
-  _Self operator++(int) {
-    _Self __tmp = *this;
-    this->__increment();
-    return __tmp;
-  }
-  _Self& operator--() {
-    this->__decrement();
-    return *this;
-  }
-  _Self operator--(int) {
-    _Self __tmp = *this;
-    this->__decrement();
-    return __tmp;
-  }
-  
-  _Self& operator+=(difference_type __n) {
-    this->__advance(__n);
-    return *this;
-  }
-  
-  _Self& operator-=(difference_type __n) {
-    this->__advance(-__n);
-    return *this;
-  }
-  _Self operator+(difference_type __n) const {
-    _Self __tmp(*this);
-    __tmp.__advance(__n);
-    return __tmp;
-  }
-  _Self operator-(difference_type __n) const {
-    _Self __tmp(*this);
-    __tmp.__advance(-__n);
-    return __tmp;
-  }
-  reference operator[](difference_type __n) const { return *(*this + __n); }
-};
-
-template <class _Container>
-inline bool 
-operator==(const _DBG_iter_base<_Container>& __x, const _DBG_iter_base<_Container>& __y) {
-  _STLP_DEBUG_CHECK(__check_same_owner_or_null(__x, __y))
-  return __x._M_iterator==__y._M_iterator;
-}
-
-template <class _Container>
-inline bool 
-operator<(const _DBG_iter_base<_Container>& __x, const _DBG_iter_base<_Container>& __y) {
-  _STLP_DEBUG_CHECK(__check_same_owner_or_null(__x, __y))
-  typedef typename _DBG_iter_base<_Container>::_Iterator_category _Category;
-  return _CompareIt(__x._M_iterator , __y._M_iterator, _Category());
-}
-
-template <class _Container>
-inline bool 
-operator>(const _DBG_iter_base<_Container>& __x,
-	  const _DBG_iter_base<_Container>& __y) { 
-  typedef typename _DBG_iter_base<_Container>::_Iterator_category _Category;
-  return _CompareIt(__y._M_iterator , __x._M_iterator, _Category());
-}
-
-template <class _Container>
-inline bool 
-operator>=(const _DBG_iter_base<_Container>& __x, const _DBG_iter_base<_Container>& __y) {
-  _STLP_DEBUG_CHECK(__check_same_owner_or_null(__x, __y))
-  typedef typename _DBG_iter_base<_Container>::_Iterator_category _Category;
-  return !_CompareIt(__x._M_iterator , __y._M_iterator, _Category());
-}
-
-template <class _Container>
-inline bool 
-operator<=(const _DBG_iter_base<_Container>& __x,
-	  const _DBG_iter_base<_Container>& __y) {
-  typedef typename _DBG_iter_base<_Container>::_Iterator_category _Category; 
-  return !_CompareIt(__y._M_iterator , __x._M_iterator, _Category());
-}
-
-template <class _Container>
-inline bool 
-operator!=(const _DBG_iter_base<_Container>& __x, 
-	   const _DBG_iter_base<_Container>& __y) {
-  _STLP_DEBUG_CHECK(__check_same_owner_or_null(__x, __y))
-  return __x._M_iterator != __y._M_iterator;
-}
-
-//------------------------------------------
-
-template <class _Container, class _Traits>
-inline _DBG_iter<_Container, _Traits> 
-operator+(ptrdiff_t __n, const _DBG_iter<_Container, _Traits>& __it) {
-    _DBG_iter<_Container, _Traits> __tmp(__it);
-    return __tmp += __n;
-}
-
-
-# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES
-# if defined (_STLP_NESTED_TYPE_PARAM_BUG) \
-   || ( defined (__SUNPRO_CC) && __SUNPRO_CC < 0x600) \
-   || ( defined (_STLP_MSVC) && (_STLP_MSVC < 1100) )
-#  define _STLP_DEBUG_USE_DISTINCT_VALUE_TYPE_HELPERS 1
-# endif
-
-template <class _Container>
-inline ptrdiff_t* 
-distance_type(const  _DBG_iter_base<_Container>&) { return (ptrdiff_t*) 0; }
-
-# if !defined (_STLP_DEBUG_USE_DISTINCT_VALUE_TYPE_HELPERS)
-template <class _Container>
-inline _STLP_TYPENAME_ON_RETURN_TYPE _DBG_iter_base<_Container>::value_type*
-value_type(const  _DBG_iter_base<_Container>&) {
-  typedef typename _DBG_iter_base<_Container>::value_type _Val;
-  return (_Val*)0;
-}
-
-template <class _Container>
-inline _STLP_TYPENAME_ON_RETURN_TYPE _DBG_iter_base<_Container>::_Iterator_category 
-iterator_category(const  _DBG_iter_base<_Container>&) {
-  typedef typename _DBG_iter_base<_Container>::_Iterator_category _Category;
-  return _Category();
-}
-# endif
-
-#  endif /* _STLP_USE_OLD_HP_ITERATOR_QUERIES */
-
-# define _Get_iter(__x)   __x
-# define _Debug_iter(__x, __y) __y
-
-_STLP_END_NAMESPACE
-
-#endif /* INTERNAL_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/stl/debug/_list.h b/src/STLport/stl/debug/_list.h
deleted file mode 100644
index de35cdc..0000000
--- a/src/STLport/stl/debug/_list.h
+++ /dev/null
@@ -1,318 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_DBG_LIST_H
-#define _STLP_INTERNAL_DBG_LIST_H
-
-#include <stl/debug/_iterator.h>
-
-# ifndef _STLP_USE_WRAPPER_FOR_ALLOC_PARAM
-#  undef  _DBG_list
-#  define _DBG_list list
-# endif
-
-#  define _STLP_DBG_LIST_BASE \
-__WORKAROUND_DBG_RENAME(list) <_Tp, _Alloc>
-
-_STLP_BEGIN_NAMESPACE
-
-# ifdef _STLP_DEBUG_USE_DISTINCT_VALUE_TYPE_HELPERS
-template <class _Tp, class _Alloc>
-inline _Tp*
-value_type(const  _DBG_iter_base< _STLP_DBG_LIST_BASE >&) {
-  return (_Tp*)0;
-}
-template <class _Tp, class _Alloc>
-inline bidirectional_iterator_tag
-iterator_category(const _DBG_iter_base< _STLP_DBG_LIST_BASE >&) {
-  return bidirectional_iterator_tag();
-}
-# endif
-
-template <class _Tp, _STLP_DEFAULT_ALLOCATOR_SELECT(_Tp) >
-class _DBG_list : public _STLP_DBG_LIST_BASE {
-
-  typedef _STLP_DBG_LIST_BASE _Base;
-  typedef _DBG_list<_Tp, _Alloc> _Self;
-
-public:      
-  __IMPORT_CONTAINER_TYPEDEFS(_Base)
-
-public:
-  typedef _DBG_iter<_Base, _Nonconst_traits<value_type> >     iterator;
-  typedef _DBG_iter<_Base, _Const_traits<value_type> >    const_iterator;
-
-  _STLP_DECLARE_BIDIRECTIONAL_REVERSE_ITERATORS;
-
-protected:
-  mutable __owned_list _M_iter_list;
-  void _Invalidate_all() { _M_iter_list._Invalidate_all();}
-
-public:
-  const _Base* _Get_base() const { return (const _Base*)this; }
-  _Base* _Get_base() { return (_Base*)this; }
-  explicit _DBG_list(const allocator_type& __a = allocator_type()) :
-    _STLP_DBG_LIST_BASE(__a), _M_iter_list(_Get_base()) {}
-  _DBG_list(size_type __n, const _Tp& __value,
-	    const allocator_type& __a = allocator_type())
-    : _STLP_DBG_LIST_BASE(__n, __value, __a), _M_iter_list(_Get_base()) {}
-  explicit _DBG_list(size_type __n)
-    : _STLP_DBG_LIST_BASE(__n), _M_iter_list(_Get_base()) {}
-  
-#ifdef _STLP_MEMBER_TEMPLATES
-
-  // We don't need any dispatching tricks here, because insert does all of
-  // that anyway.  
-#  ifdef _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS
-  template <class _InputIterator>
-  _DBG_list(_InputIterator __first, _InputIterator __last)
-    : _STLP_DBG_LIST_BASE(__first, __last, allocator_type()), _M_iter_list(_Get_base()) {}
-#  endif
-  template <class _InputIterator>
-  _DBG_list(_InputIterator __first, _InputIterator __last,
-       const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL)
-    : _STLP_DBG_LIST_BASE(__first, __last, __a), _M_iter_list(_Get_base()) {}
-#else /* _STLP_MEMBER_TEMPLATES */
-
-  _DBG_list(const _Tp* __first, const _Tp* __last,
-       const allocator_type& __a = allocator_type())
-    : _STLP_DBG_LIST_BASE(__first, __last, __a), _M_iter_list(_Get_base()) {}
-  _DBG_list(const_iterator __first, const_iterator __last,
-       const allocator_type& __a = allocator_type()):
-    _STLP_DBG_LIST_BASE(__first._M_iterator, __last._M_iterator, __a),
-    _M_iter_list(_Get_base()) {}
-
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-  _DBG_list(const _Self& __x) : 
-    _STLP_DBG_LIST_BASE(__x) , _M_iter_list(_Get_base()) {}
-
-  _Self& operator=(const _Self& __x) {
-    _Invalidate_all();
-    _Base::operator=((const _Base&)__x);
-    return *this;
-  }
-
-public:
-  iterator begin()             { return iterator(&_M_iter_list, _Base::begin()); }
-  const_iterator begin() const { return const_iterator(&_M_iter_list, _Base::begin()); }
-
-  iterator end()               { return iterator(&_M_iter_list, _Base::end()); }
-  const_iterator end() const   { return const_iterator(&_M_iter_list, _Base::end()); }
-
-  reverse_iterator rbegin()    { return reverse_iterator(end()); }
-  reverse_iterator rend()      { return reverse_iterator(begin()); }
-
-  const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); }
-  const_reverse_iterator rend() const { return const_reverse_iterator(begin()); }
-
-  // those are here to enforce checking
-  reference front() { return *begin(); }
-  const_reference front() const { return *begin(); }
-  reference back() { return *(--end()); }
-  const_reference back() const { return *(--end()); }
-
-  void swap(_Self& __x) {
-    _M_iter_list._Swap_owners(__x._M_iter_list);
-    _Base::swap(__x); 
-  }
-
-  iterator insert(iterator __position, const _Tp& __x) {
-    _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list,__position))
-      return iterator(&_M_iter_list,_Base::insert(__position._M_iterator, __x) );
-  }
-
-# ifndef _STLP_NO_ANACHRONISMS
-  iterator insert(iterator __position) { return insert(__position, _Tp()); }
-# endif
-
-#ifdef _STLP_MEMBER_TEMPLATES
-
-  template <class _InputIterator>
-  void insert(iterator __position, _InputIterator __first, _InputIterator __last) {
-    _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list,__position))
-    _Base::insert(__position._M_iterator, __first, __last);
-  }
-
-#else
-
-  void insert(iterator __position, const _Tp* __first, const _Tp* __last) {
-    _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list,__position))
-    _Base::insert(__position._M_iterator, __first, __last);
-  }
-
-  void insert(iterator __position,
-	      const_iterator __first, const_iterator __last) {
-    _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list,__position))
-    _Base::insert(__position._M_iterator, __first._M_iterator, __last._M_iterator);
-  }
-  
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-  void insert(iterator __position, size_type __n, const _Tp& __x) {
-    _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list,__position))
-    _Base::insert(__position._M_iterator, __n, __x);    
-  }
-
-  void pop_back() {
-    _STLP_VERBOSE_ASSERT(!this->empty(), _StlMsg_EMPTY_CONTAINER)
-    __invalidate_iterator(&_M_iter_list,end());
-    _Base::pop_back();
-  }
-
-  void pop_front() {
-    _STLP_VERBOSE_ASSERT(!this->empty(), _StlMsg_EMPTY_CONTAINER)
-    __invalidate_iterator(&_M_iter_list,begin());
-    _Base::pop_front();
-  }
-
-  iterator erase(iterator __position) {
-    _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list,__position))
-    _STLP_VERBOSE_ASSERT(__position._M_iterator._M_node!=this->_M_node._M_data, 
-			 _StlMsg_ERASE_PAST_THE_END)
-    // fbp : CHECK !!!
-    __invalidate_iterator(&_M_iter_list, __position);
-    return iterator(&_M_iter_list,_Base::erase(__position._M_iterator));
-  }
-  iterator erase(iterator __first, iterator __last) {
-    while (__first != __last)
-      erase(__first++);
-    return __last;
-  }
-
-  void resize(size_type __new_size, const _Tp& __x) {
-    typename _Base::iterator __i = _Base::begin();
-    size_type __len = 0;
-    for ( ; __i != _Base::end() && __len < __new_size; ++__i, ++__len);
-    
-    if (__len == __new_size)
-      erase(iterator(&_M_iter_list,__i), end());
-    else                          // __i == end()
-      _Base::insert(_Base::end(), __new_size - __len, __x);
-  }
-
-  void resize(size_type __new_size) { this->resize(__new_size, _Tp()); }
-
-  void remove(const _Tp& __value) {
-    typename _Base::iterator __first = _Base::begin();
-    typename _Base::iterator __last = _Base::end();
-    while (__first != __last) {
-      typename _Base::iterator __next = __first;
-      ++__next;
-      if (__value == *__first) erase(iterator(&_M_iter_list,__first));
-      __first = __next;
-    }
-  }
-
-  void clear() {   
-    _Invalidate_all();
-    _Base::clear(); 
-  }
-
-public:
-  void splice(iterator __position, _Self& __x) {
-    _STLP_VERBOSE_ASSERT(&__x!=this, _StlMsg_INVALID_ARGUMENT)
-    _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list,__position))
-    _Base::splice(__position._M_iterator, __x);
-    __x._Invalidate_all();
-  }
-
-  void splice(iterator __position, _Self& __x, iterator __i) {
-      _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list,__position) &&
-                        __check_if_owner(&__x._M_iter_list ,__i))
-    _STLP_DEBUG_CHECK(_Dereferenceable(__i))
-    // fbp : CHECK !!!
-	// __invalidate_iterator(&__x._M_iter_list, __i);
-    _Base::splice(__position._M_iterator, __x, __i._M_iterator);
-  }
-
-  void splice(iterator __position, _Self& __x, iterator __first, iterator __last) {
-    _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list, __position))
-    _STLP_VERBOSE_ASSERT(__first._Owner()==&__x._M_iter_list && __last._Owner()==&__x._M_iter_list, 
-			 _StlMsg_NOT_OWNER)
-    _Base::splice(__position._M_iterator, __x, __first._M_iterator, __last._M_iterator);
-  }
-
-  void merge(_Self& __x) {   
-    __x._Invalidate_all();
-    _Base::merge(__x); 
-  }
-  void reverse() {
-    _Invalidate_all();
-    _Base::reverse();
-  }
-  void unique() {
-    _Invalidate_all();
-    _Base::unique();
-  }
-  void sort() {
-    _Invalidate_all();
-    _Base::sort();
-  }
-
-#ifdef _STLP_MEMBER_TEMPLATES
-
-  template <class _Predicate> void remove_if(_Predicate __pred)  {
-    _Base::remove_if(__pred);
-  }
-  template <class _BinaryPredicate>
-    void unique(_BinaryPredicate __binary_pred) {
-    _Base::unique(__binary_pred);
-  }
-  template <class _StrictWeakOrdering>
-    void merge(_Self& __x,
-	       _StrictWeakOrdering __comp) {
-    __x._Invalidate_all();
-    _Base::merge(__x, __comp);
-  }
-
-  template <class _StrictWeakOrdering>
-  void sort(_StrictWeakOrdering __comp) {
-      _Invalidate_all();
-      _Base::sort(__comp);
-  }
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-};
-
-#define _STLP_TEMPLATE_HEADER template <class _Tp, class _Alloc>
-#define _STLP_TEMPLATE_CONTAINER _DBG_list<_Tp,_Alloc>
-#define _STLP_TEMPLATE_CONTAINER_BASE _STLP_DBG_LIST_BASE
-#include <stl/debug/_relops_cont.h>
-#undef _STLP_TEMPLATE_CONTAINER_BASE
-#undef _STLP_TEMPLATE_CONTAINER
-#undef _STLP_TEMPLATE_HEADER
-
-_STLP_END_NAMESPACE 
-
-#endif /* _STLP_INTERNAL_LIST_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/debug/_relops_cont.h b/src/STLport/stl/debug/_relops_cont.h
deleted file mode 100644
index c800404..0000000
--- a/src/STLport/stl/debug/_relops_cont.h
+++ /dev/null
@@ -1,41 +0,0 @@
-// This is an implementation file which
-// is intended to be included multiple times with different _STLP_ASSOCIATIVE_CONTAINER
-// setting
-
-#ifdef _STLP_EXTRA_OPERATORS_FOR_DEBUG
-
-_STLP_TEMPLATE_HEADER
-inline  bool _STLP_CALL
-operator==(const _STLP_TEMPLATE_CONTAINER& __x, const _STLP_TEMPLATE_CONTAINER& __y)
-{
-  return (const _STLP_TEMPLATE_CONTAINER_BASE&)__x == (const _STLP_TEMPLATE_CONTAINER_BASE&)__y; 
-}
-
-_STLP_TEMPLATE_HEADER
-inline  bool _STLP_CALL
-operator<(const _STLP_TEMPLATE_CONTAINER& __x, const _STLP_TEMPLATE_CONTAINER& __y)
-{
-  return (const _STLP_TEMPLATE_CONTAINER_BASE&)__x < (const _STLP_TEMPLATE_CONTAINER_BASE&)__y; 
-}
-
-_STLP_RELOPS_OPERATORS( _STLP_TEMPLATE_HEADER , _STLP_TEMPLATE_CONTAINER )
-
-#endif /* _STLP_EXTRA_OPERATORS_FOR_DEBUG */
-
-#ifdef _STLP_FUNCTION_TMPL_PARTIAL_ORDER
-
-_STLP_TEMPLATE_HEADER
-inline void _STLP_CALL swap(_STLP_TEMPLATE_CONTAINER& __x, _STLP_TEMPLATE_CONTAINER& __y)
-{
-  __x.swap(__y);
-}
-
-#endif /* _STLP_FUNCTION_TMPL_PARTIAL_ORDER */
-
-#if 0 /* def _STLP_CLASS_PARTIAL_SPECIALIZATION */
-
-_STLP_TEMPLATE_HEADER
-struct __type_traits<_STLP_STD::_STLP_TEMPLATE_CONTAINER > : __type_traits_aux<0, 1>
-{};
-
-#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
diff --git a/src/STLport/stl/debug/_relops_hash_cont.h b/src/STLport/stl/debug/_relops_hash_cont.h
deleted file mode 100644
index 6e94167..0000000
--- a/src/STLport/stl/debug/_relops_hash_cont.h
+++ /dev/null
@@ -1,34 +0,0 @@
-// This is an implementation file which
-// is intended to be included multiple times with different _STLP_ASSOCIATIVE_CONTAINER
-// setting
-
-#ifdef _STLP_EXTRA_OPERATORS_FOR_DEBUG
-_STLP_TEMPLATE_HEADER
-inline bool _STLP_CALL 
-operator==(const _STLP_TEMPLATE_CONTAINER& __hm1, const _STLP_TEMPLATE_CONTAINER& __hm2)
-{
-  return _STLP_TEMPLATE_CONTAINER_BASE::_M_equal(__hm1, __hm2);
-}
-
-#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE
-
-_STLP_TEMPLATE_HEADER
-inline bool _STLP_CALL 
-operator!=(const _STLP_TEMPLATE_CONTAINER& __hm1, const _STLP_TEMPLATE_CONTAINER& __hm2) {
-  return !(__hm1 == __hm2);
-}
-
-#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */
-
-#endif /* _STLP_EXTRA_OPERATORS_FOR_DEBUG */
-
-#ifdef _STLP_FUNCTION_TMPL_PARTIAL_ORDER
-
-_STLP_TEMPLATE_HEADER
-inline void _STLP_CALL 
-swap(_STLP_TEMPLATE_CONTAINER& __hm1, _STLP_TEMPLATE_CONTAINER& __hm2)
-{
-  __hm1.swap(__hm2);
-}
-
-#endif /* _STLP_FUNCTION_TMPL_PARTIAL_ORDER */
diff --git a/src/STLport/stl/debug/_slist.h b/src/STLport/stl/debug/_slist.h
deleted file mode 100644
index ec22394..0000000
--- a/src/STLport/stl/debug/_slist.h
+++ /dev/null
@@ -1,399 +0,0 @@
-/*
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_DBG_SLIST_H
-#define _STLP_INTERNAL_DBG_SLIST_H
-
-#include <stl/debug/_iterator.h>
-
-# ifndef _STLP_USE_WRAPPER_FOR_ALLOC_PARAM
-#  undef  _DBG_slist
-#  define _DBG_slist slist
-# endif
-
-#  define _STLP_DBG_SLIST_BASE __WORKAROUND_DBG_RENAME(slist) <_Tp, _Alloc>
-
-_STLP_BEGIN_NAMESPACE
-
-# ifdef _STLP_DEBUG_USE_DISTINCT_VALUE_TYPE_HELPERS
-template <class _Tp, class _Alloc>
-inline _Tp*
-value_type(const _DBG_iter_base< _STLP_DBG_SLIST_BASE >&) {
-  return (_Tp*)0;
-}
-
-template <class _Tp, class _Alloc>
-inline forward_iterator_tag
-iterator_category(const _DBG_iter_base< _STLP_DBG_SLIST_BASE >&) {
-  return forward_iterator_tag();
-}
-# endif
-
-template <class _Tp, _STLP_DEFAULT_ALLOCATOR_SELECT(_Tp) >
-class _DBG_slist : public _STLP_DBG_SLIST_BASE
-{
-private:
-  typedef _STLP_DBG_SLIST_BASE _Base;
-  typedef _DBG_slist<_Tp,_Alloc> _Self;
-
-public:
-
-  __IMPORT_CONTAINER_TYPEDEFS(_Base)
-
-  typedef _DBG_iter<_Base, _Nonconst_traits<value_type> >      iterator;
-  typedef _DBG_iter<_Base, _Const_traits<value_type> >     const_iterator;
-
-protected:
-  friend class __owned_link;
-  mutable __owned_list _M_iter_list;
-  void _Invalidate_all() { _M_iter_list._Invalidate_all();}
-  void _Invalidate_iterator(const iterator& __it) {__invalidate_iterator(&_M_iter_list, __it); }
-
-public:
-  const _Base* _Get_base() const { return (const _Base*)this; }
-  _Base* _Get_base() { return (_Base*)this; }
-
-public:
-
-  explicit _DBG_slist(const allocator_type& __a = allocator_type()) :
-    _STLP_DBG_SLIST_BASE(__a) , _M_iter_list(_Get_base()) {}
-  
-  _DBG_slist(size_type __n, const value_type& __x,
-	     const allocator_type& __a =  allocator_type()) :
-    _STLP_DBG_SLIST_BASE(__n, __x, __a), _M_iter_list(_Get_base()) {}
-  
-  explicit _DBG_slist(size_type __n) : _STLP_DBG_SLIST_BASE(__n) , _M_iter_list(_Get_base()) {}
-  
-#ifdef _STLP_MEMBER_TEMPLATES
-  // We don't need any dispatching tricks here, because _M_insert_after_range
-  // already does them.
-# ifdef _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS
-  template <class _InputIterator>
-  _DBG_slist(_InputIterator __first, _InputIterator __last) :
-    _STLP_DBG_SLIST_BASE(__first, __last, allocator_type()), _M_iter_list(_Get_base()) {} 
-# endif
-  template <class _InputIterator>
-  _DBG_slist(_InputIterator __first, _InputIterator __last,
-	     const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL) : 
-    _STLP_DBG_SLIST_BASE(__first, __last, __a), _M_iter_list(_Get_base()) {} 
-
-#else /* _STLP_MEMBER_TEMPLATES */
-
-  _DBG_slist(const_iterator __first, const_iterator __last,
-	     const allocator_type& __a = allocator_type() ) :
-    _STLP_DBG_SLIST_BASE(__first._M_iterator, __last._M_iterator, __a),
-    _M_iter_list(_Get_base()) {}
-  
-  _DBG_slist(const value_type* __first, const value_type* __last,
-        const allocator_type& __a =  allocator_type()) : 
-    _STLP_DBG_SLIST_BASE(__first, __last, __a), _M_iter_list(_Get_base())  {}
-
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-  _DBG_slist(const _Self& __x) : _STLP_DBG_SLIST_BASE(__x), _M_iter_list(_Get_base()) {}
-  
-  _Self& operator= (const _Self& __x) {
-    _Invalidate_all();
-    (_Base&)*this = (const _Base&)__x;
-    return *this;
-  }
-  
-  ~_DBG_slist() {}
-
-public:
-  void assign(size_type __n, const _Tp& __val) {
-    // fbp :check invalidation here !
-    _Base::assign(__n, __val); 
-  }
-
-public:
-
-  iterator before_begin() { return iterator(&_M_iter_list, _Base::before_begin()); }
-  const_iterator before_begin() const
-    { return const_iterator(&_M_iter_list, _Base::before_begin()); }
-
-  iterator begin() { return iterator(&_M_iter_list, _Base::begin()); }
-  const_iterator begin() const 
-    { return const_iterator(&_M_iter_list,_Base::begin());}
-
-  iterator end() { return iterator(&_M_iter_list, _Base::end()); }
-  const_iterator end() const { return const_iterator(&_M_iter_list, _Base::end()); }
-
-  void swap(_Self& __x) { 
-    _M_iter_list._Swap_owners(__x._M_iter_list);
-    _Base::swap(__x); 
-  }
-
-public:
-  // fbp : checks here !
-  reference front() { 
-    _STLP_VERBOSE_ASSERT(!this->empty(), _StlMsg_EMPTY_CONTAINER)
-    return _Base::front(); 
-  }
-  const_reference front() const { 
-    _STLP_VERBOSE_ASSERT(!this->empty(), _StlMsg_EMPTY_CONTAINER)
-    return _Base::front(); 
-  }
-  void pop_front() {
-    _STLP_VERBOSE_ASSERT(!this->empty(), _StlMsg_EMPTY_CONTAINER)
-    _Base::pop_front();
-  }
-  iterator previous(const_iterator __pos) {
-    return iterator(&_M_iter_list,_Base::previous(__pos._M_iterator));
-  }
-  const_iterator previous(const_iterator __pos) const {
-    return const_iterator(&_M_iter_list,_Base::previous(__pos._M_iterator));
-  }
-
-public:
-
-  iterator insert_after(iterator __pos, const value_type& __x) {
-    return iterator(&_M_iter_list,_Base::insert_after(__pos._M_iterator, __x));
-  }
-
-  iterator insert_after(iterator __pos) {
-    return iterator(&_M_iter_list,_Base::insert_after(__pos._M_iterator));
-  }
-
-  void insert_after(iterator __pos, size_type __n, const value_type& __x) {
-    _Base::insert_after(__pos._M_iterator, __n, __x);
-  }
-
-#ifdef _STLP_MEMBER_TEMPLATES
-
-  template <class _InputIterator>
-  void assign(_InputIterator __first, _InputIterator __last) {
-    // fbp :check invalidation here !
-    _Base::assign(__first, __last);
-  }
-
-  // We don't need any dispatching tricks here, because _M_insert_after_range
-  // already does them.
-  template <class _InIter>
-  void insert_after(iterator __pos, _InIter __first, _InIter __last) {
-    _Base::insert_after(__pos._M_iterator, __first, __last);
-  }
-
-  // We don't need any dispatching tricks here, because _M_insert_after_range
-  // already does them.
-  template <class _InIter>
-  void insert(iterator __pos, _InIter __first, _InIter __last) {
-    _Base::insert(__pos._M_iterator, __first, __last);
-
-  }
-
-#else /* _STLP_MEMBER_TEMPLATES */
-
-  void insert_after(iterator __pos,
-                    const_iterator __first, const_iterator __last) {
-    _Base::insert_after(__pos._M_iterator, __first._M_iterator, __last._M_iterator);
-  }
-  void insert_after(iterator __pos,
-                    const value_type* __first, const value_type* __last) {
-    _Base::insert_after(__pos._M_iterator, __first, __last);
-  }
-
-  void insert(iterator __pos, const_iterator __first, const_iterator __last) {
-    _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list,__pos))
-    _Base::insert(__pos._M_iterator, __first._M_iterator, __last._M_iterator);
-  }
-  void insert(iterator __pos, const value_type* __first, 
-                              const value_type* __last) {
-    _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list,__pos))
-    _Base::insert(__pos._M_iterator, __first, __last);
-  }
-
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-  iterator insert(iterator __pos, const value_type& __x) {
-    _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list,__pos))
-    return iterator(&_M_iter_list, _Base::insert(__pos._M_iterator, __x));
-  }
-
-  iterator insert(iterator __pos) {
-    _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list,__pos))
-    return iterator(&_M_iter_list, _Base::insert(__pos._M_iterator));
-  }
-
-  void insert(iterator __pos, size_type __n, const value_type& __x) {
-    _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list,__pos))
-    _Base::insert(__pos._M_iterator, __n, __x);
-  } 
-    
-public:
-  iterator erase_after(iterator __pos) {
-    _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list,__pos))
-    return iterator(&_M_iter_list, _Base::erase_after(__pos._M_iterator));
-  }
-  iterator erase_after(iterator __before_first, iterator __last) {
-    _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list,__before_first))
-    _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list,__last))
-    return iterator(&_M_iter_list, 
-		    _Base::erase_after(__before_first._M_iterator, __last._M_iterator));
-  } 
-
-  iterator erase(iterator __pos) {
-    _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list,__pos))
-    return iterator(&_M_iter_list, _Base::erase(__pos._M_iterator));
-  }
-  iterator erase(iterator __first, iterator __last) {
-    _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list,__first))
-    _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list,__last))
-    return iterator(&_M_iter_list, 
-		    _Base::erase(__first._M_iterator, __last._M_iterator));
-  }
-
-  void resize(size_type __new_size, const _Tp& __x) {
-    _Base::resize(__new_size, __x);
-  }
-  void resize(size_type new_size) { resize(new_size, _Tp()); }
-
-  void clear() {
-    _Invalidate_all();      
-    _Base::clear();
-  }
-
-public:
-  // Moves the range [__before_first + 1, __before_last + 1) to *this,
-  //  inserting it immediately after __pos.  This is constant time.
-  void splice_after(iterator __pos, 
-                    iterator __before_first, iterator __before_last)
-  {
-    if (__before_first != __before_last) {
-      _Base::splice_after(__pos._M_iterator, 
-                          __before_first._M_iterator, __before_last._M_iterator);
-      __before_first++;
-      __before_last++;
-      __invalidate_range(__before_first._Owner(), 
-                         __before_first, __before_last);
-    }
-  }
-
-  // Moves the element that follows __prev to *this, inserting it immediately
-  //  after __pos.  This is constant time.
-  void splice_after(iterator __pos, iterator __prev)
-  {
-    _Base::splice_after(__pos._M_iterator, __prev._M_iterator);
-    __invalidate_iterator(__prev._Owner(), ++__prev);
-  }
-
-  // Removes all of the elements from the list __x to *this, inserting
-  // them immediately after __pos.  __x must not be *this.  Complexity:
-  // linear in __x.size().
-  void splice_after(iterator __pos, _Self& __x)
-  {
-    _Base::splice_after(__pos._M_iterator, (_Base&)__x);
-    __x._Invalidate_all();
-  }
-
-  // Linear in distance(begin(), __pos), and linear in __x.size().
-  void splice(iterator __pos, _Self& __x) {
-    _STLP_VERBOSE_ASSERT(!(&__x==this), _StlMsg_INVALID_ARGUMENT)
-    _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list,__pos))
-    _Base::splice(__pos._M_iterator, (_Base&)__x);
-    __x._Invalidate_all();
-  }
-
-  // Linear in distance(begin(), __pos), and in distance(__x.begin(), __i).
-  void splice(iterator __pos, _Self& __x, iterator __i) {
-    _STLP_VERBOSE_ASSERT(&__x!=this, _StlMsg_INVALID_ARGUMENT)
-    _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list,__pos) && 
-                      __check_if_owner(&__x._M_iter_list ,__i))
-    _Base::splice(__pos._M_iterator, (_Base&)__x, __i._M_iterator);
-    __x._Invalidate_iterator(__i);
-  }
-
-  // Linear in distance(begin(), __pos), in distance(__x.begin(), __first),
-  // and in distance(__first, __last).
-  void splice(iterator __pos, _Self& __x, iterator __first, iterator __last)
-  {
-    _STLP_VERBOSE_ASSERT(&__x!=this, _StlMsg_INVALID_ARGUMENT)
-    _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list,__pos))
-    if (__first != __last)
-      _Base::splice(__pos._M_iterator, (_Base&)__x, __first._M_iterator, __last._M_iterator);      
-    __invalidate_range(&__x._M_iter_list, __first, __last);
-  }
-
-public:
-
-  void remove(const _Tp& __val) {
-    _Base::remove(__val);
-    //    __x._Invalidate_all();    
-  }
-  void unique() {
-    _Base::unique();
-  }
-  void merge(_Self& __x) {
-    _Base::merge((_Base&)__x);
-    __x._Invalidate_all();
-  }
-  void sort() {
-    _Invalidate_all();
-    _Base::sort();
-  }
-
-#ifdef _STLP_MEMBER_TEMPLATES
-
-  template <class _Predicate> 
-  void remove_if(_Predicate __pred) {
-    _Base::remove_if(__pred);
-  }
-
-  template <class _BinaryPredicate> 
-  void unique(_BinaryPredicate __pred) {
-    _Base::unique(__pred);
-  }
-
-  template <class _StrictWeakOrdering> 
-  void merge(_Self& __x, _StrictWeakOrdering __ord) {
-    _Base::merge((_Base&)__x, __ord);
-    __x._Invalidate_all();    
-  }
-
-  template <class _StrictWeakOrdering>
-  void sort(_StrictWeakOrdering __comp) {
-      _Invalidate_all();
-      _Base::sort(__comp);
-  }
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-};
-
-#define _STLP_TEMPLATE_HEADER template <class _Tp, class _Alloc>
-#define _STLP_TEMPLATE_CONTAINER _DBG_slist<_Tp,_Alloc>
-#define _STLP_TEMPLATE_CONTAINER_BASE _STLP_DBG_SLIST_BASE
-#include <stl/debug/_relops_cont.h>
-#undef _STLP_TEMPLATE_CONTAINER_BASE
-#undef _STLP_TEMPLATE_CONTAINER
-#undef _STLP_TEMPLATE_HEADER
-
-_STLP_END_NAMESPACE
-
-#endif /* _STLP_INTERNAL_DBG_SLIST_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/debug/_string.h b/src/STLport/stl/debug/_string.h
deleted file mode 100644
index 2ea29e1..0000000
--- a/src/STLport/stl/debug/_string.h
+++ /dev/null
@@ -1,772 +0,0 @@
-/*
- * Copyright (c) 1997-1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_DBG_STRING_H
-#define _STLP_DBG_STRING_H
-
-#include <stl/debug/_iterator.h>
-
-# define _STLP_DBG_STRING_BASE _Nondebug_string <_CharT, _Traits, _Alloc>
-
-_STLP_BEGIN_NAMESPACE
-
-# ifdef _STLP_DEBUG_USE_DISTINCT_VALUE_TYPE_HELPERS
-template <class _CharT,class _Traits, class _Alloc>
-inline _CharT*
-value_type(const  _DBG_iter_base< _STLP_DBG_STRING_BASE >&) {
-return (_CharT*)0;
-}
-template <class _CharT, class _Traits, class _Alloc>
-inline random_access_iterator_tag
-iterator_category(const  _DBG_iter_base< _STLP_DBG_STRING_BASE >&) {
-  return random_access_iterator_tag();
-}
-# endif
-
-template <class _CharT, class _Traits, class _Alloc> 
-class basic_string : public _STLP_DBG_STRING_BASE {
-private:
-  typedef _STLP_DBG_STRING_BASE _Base;
-  typedef basic_string<_CharT, _Traits, _Alloc> _Self;
-protected:
-  mutable __owned_list _M_iter_list;
-public:
-  __IMPORT_CONTAINER_TYPEDEFS(_Base)
-  typedef _DBG_iter<_Base, _Nonconst_traits<value_type> > iterator;
-  typedef _DBG_iter<_Base, _Const_traits<value_type> > const_iterator;
-  _STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS;
-# ifdef _STLP_USE_NATIVE_STRING
-  // this typedef is being used for conversions
-  typedef _STLP_VENDOR_STD::basic_string<_CharT,_Traits, 
-    _STLP_VENDOR_STD::allocator<_CharT> >  __std_string;
-# endif
-public:                         // Constructor, destructor, assignment.
-  typedef typename _Base::_Reserve_t _Reserve_t;
-
-  const _Base* _Get_base() const { return (const _Base*)this; }
-  _Base* _Get_base() { return (_Base*)this; }
-
-  basic_string() :_STLP_DBG_STRING_BASE(), _M_iter_list(_Get_base()) {}
-  
-  explicit basic_string(const allocator_type& __a): 
-    _STLP_DBG_STRING_BASE(__a), _M_iter_list(_Get_base()) {}
-
-  basic_string(_Reserve_t __r, size_t __n,
-               const allocator_type& __a = allocator_type())
-    : _STLP_DBG_STRING_BASE(__r, __n, __a), _M_iter_list(_Get_base()) {}
-
-  basic_string(const _Self& __s): 
-    _STLP_DBG_STRING_BASE(__s), _M_iter_list(_Get_base()) {}
-
-  basic_string(const _Self& __s, size_type __pos, size_type __n = _Base::npos,
-               const allocator_type& __a = allocator_type()):
-    _STLP_DBG_STRING_BASE(__s, __pos, __n, __a), _M_iter_list(_Get_base()) {}
-
-  basic_string(const _CharT* __s, size_type __n,
-		    const allocator_type& __a = allocator_type()):
-    _STLP_DBG_STRING_BASE(__s, __n, __a), _M_iter_list(_Get_base()) {}
-
-  basic_string(const _CharT* __s,
-		    const allocator_type& __a = allocator_type()):
-    _STLP_DBG_STRING_BASE(__s, __a), _M_iter_list(_Get_base()) {}
-
-  basic_string(size_type __n, _CharT __c,
-		    const allocator_type& __a = allocator_type()):
-    _STLP_DBG_STRING_BASE(__n, __c, __a), _M_iter_list(_Get_base()) {}
-
-#if defined (_STLP_MEMBER_TEMPLATES) && !(defined(__MRC__)||(defined(__SC__) && !defined(__DMC__)))
-# ifdef _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS
-  template <class _InputIterator>
-  basic_string(_InputIterator __f, _InputIterator __l):
-    _STLP_DBG_STRING_BASE(__f, __l), _M_iter_list(_Get_base()) {}
-#  endif
-  template <class _InputIterator>
-  basic_string(_InputIterator __f, _InputIterator __l,
-		    const allocator_type & __a _STLP_ALLOCATOR_TYPE_DFL):
-    _STLP_DBG_STRING_BASE(__f, __l, __a), _M_iter_list(_Get_base()) {}
-#else /* _STLP_MEMBER_TEMPLATES */
-  basic_string(const_iterator __f, const_iterator __l, 
-		    const allocator_type & __a = allocator_type()):
-    _STLP_DBG_STRING_BASE(__f._M_iterator, __l._M_iterator, __a), 
-     _M_iter_list(_Get_base()) {}
-
-  basic_string(const _CharT* __f, const _CharT* __l,
-               const allocator_type& __a = allocator_type()):
-   _STLP_DBG_STRING_BASE(__f, __l, __a), _M_iter_list(_Get_base()) {}
-#endif
-
-# ifdef _STLP_USE_NATIVE_STRING
-  // these conversion operations still needed for
-  // strstream, etc.
-  basic_string (const __std_string& __x)
-    : _STLP_DBG_STRING_BASE(__x.begin(), __x.end()), _M_iter_list(_Get_base()) {}
-  operator __std_string() const { return __std_string(this->data()); }
-# endif
-
-  // constructor from non-debug version
-  basic_string (const _Base& __x)
-    : _STLP_DBG_STRING_BASE(__x), _M_iter_list(_Get_base()) {}
-
-  _Self& operator=(const _Self& __s) {
-    _Base::operator=(__s);
-    return *this;
-  }
-
-  _Self& operator=(const _CharT* __s) { 
-    _STLP_FIX_LITERAL_BUG(__s)
-    _Base::operator=(__s);
-    return *this;
-  }
-
-  _Self& operator=(_CharT __c) {
-    _Base::operator=(__c);
-    return *this;
-  }
-
-public:                         // Iterators.
-
-  iterator begin() { return iterator(&_M_iter_list, this->_M_start); }
-  const_iterator begin() const { return const_iterator(&_M_iter_list,this->_M_start); }
-  iterator end() { return iterator(&_M_iter_list,this->_M_finish); }
-  const_iterator end() const { return const_iterator(&_M_iter_list,this->_M_finish); }
-  void _M_deallocate_block() {
-    _M_iter_list._Invalidate_all();
-    _Base::_M_deallocate_block();
-  }
-
-  reverse_iterator rbegin()             
-    { return reverse_iterator(iterator(&_M_iter_list,this->_M_finish)); }
-  reverse_iterator rend()               
-    { return reverse_iterator(iterator(&_M_iter_list,this->_M_start)); }
-  const_reverse_iterator rbegin() const 
-    { return const_reverse_iterator(const_iterator(&_M_iter_list,this->_M_finish)); }
-  const_reverse_iterator rend()   const 
-    { return const_reverse_iterator(const_iterator(&_M_iter_list,this->_M_start)); }
-
-public:                         // Size, capacity, etc.
-
-  void resize(size_type __n, _CharT __c) {
-    _Base::resize(__n, __c);
-  }
-  void resize(size_type __n) { resize(__n, this->_M_null()); }
-
-  void reserve(size_type __s= 0) {
-    _Base::reserve(__s);
-  }
-
-  void clear() {
-    _M_iter_list._Invalidate_all();
-    _Base::clear();
-  } 
-
-public:                         // Element access.
-
-  const_reference operator[](size_type __n) const
-    { return *(begin() + __n); }
-  reference operator[](size_type __n)
-    { return *(begin() + __n); }
-
-  const_reference at(size_type __n) const {
-    if (__n >= this->size())
-      this->_M_throw_out_of_range();
-    return *(begin() + __n);
-  }
-
-  reference at(size_type __n) {
-    if (__n >= this->size())
-      this->_M_throw_out_of_range();
-    return *(begin() + __n);
-  }
-
-public:                         // Append, operator+=, push_back.
-
-  _Self& operator+=(const _Self& __s) { return append(__s); }
-  _Self& operator+=(const _CharT* __s) { _STLP_FIX_LITERAL_BUG(__s) return append(__s); }
-  _Self& operator+=(_CharT __c) { push_back(__c); return *this; }
-
-  _Self& append(const _Self& __s) { return append(__s._M_start, __s._M_finish); }
-
-  _Self& append(const _Self& __s,
-                       size_type __pos, size_type __n)
-  {
-    _Base::append(__s, __pos, __n);
-    return *this;
-  }
-
-  _Self& append(const _CharT* __s, size_type __n) 
-    { _STLP_FIX_LITERAL_BUG(__s) return append(__s, __s+__n); }
-
-  _Self& append(const _CharT* __s) 
-    { _STLP_FIX_LITERAL_BUG(__s) return append(__s, __s + _Traits::length(__s)); }
-
-  _Self& append(size_type __n, _CharT __c){
-	  _Base::append(__n, __c);
-	  return *this;
-  }
-
-#ifdef _STLP_MEMBER_TEMPLATES
-
-  // Check to see if _InputIterator is an integer type.  If so, then
-  // it can't be an iterator.
-  template <class _InputIter>
-  _Self& append(_InputIter __first, _InputIter __last) {
-    _Base::append(__first, __last);
-    return *this;
-  }
-
-#ifdef _STLP_MSVC
-// specialization for append
- template <>
- inline _Self& append(iterator __f, iterator __l) {
- _STLP_FIX_LITERAL_BUG(__f) _STLP_FIX_LITERAL_BUG(__l)
-  __check_range(__f, __l);
-  _Base::append(__f._M_iterator, __l._M_iterator);
-  return *this;
- }
-#endif
-
-#else /* _STLP_MEMBER_TEMPLATES */
-
-  _Self& append(const _CharT* __first, const _CharT* __last) {
-    _Base::append(__first, __last);
-    return *this;
-  }
-
-  _Self& append(const_iterator __first, const_iterator __last) {
-    _Base::append(__first._M_iterator, __last._M_iterator);
-    return *this;
-  }
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-  void push_back(_CharT __c) {
-    _Base::push_back(__c);
-  }
-
-  void pop_back() {
-    __invalidate_iterator(&_M_iter_list,end());
-    _Base::pop_back();
-  }
-
-
-public:                         // Assign
-  
-  _Self& assign(const _Self& __s) {
-    _Base::assign(__s); 
-    return *this; 
-  }
-
-  _Self& assign(const _Self& __s, 
-                       size_type __pos, size_type __n) {
-    _Base::assign(__s, __pos, __n);
-    return *this;
-  }
-
-  _Self& assign(const _CharT* __s, size_type __n)
-    { _STLP_FIX_LITERAL_BUG(__s) return assign(__s, __s + __n); }
-
-  _Self& assign(const _CharT* __s)
-    { _STLP_FIX_LITERAL_BUG(__s) return assign(__s, __s + _Traits::length(__s)); }
-
-  _Self& assign(size_type __n, _CharT __c) {
-    _Base::assign(__n, __c);
-    return *this;    
-  }
-
-#ifdef _STLP_MEMBER_TEMPLATES
-  template <class _InputIter>
-  inline _Self& assign(_InputIter __first, _InputIter __last) {
-      _STLP_FIX_LITERAL_BUG(__first) _STLP_FIX_LITERAL_BUG(__last)
-      __check_range(__first, __last);
-      _Base::assign(__first, __last);
-      return *this;    
-  }
-
-#ifdef _STLP_MSVC
-// partial specialization for assign
-template <>
-inline _Self& assign(iterator __f, iterator __l) {
-  _STLP_FIX_LITERAL_BUG(__f) _STLP_FIX_LITERAL_BUG(__l)
-    __check_range(__f, __l);
-  _Base::assign(__f._M_iterator, __l._M_iterator);
-  return *this;
-  }
-#endif
-
-#else
-  _Self& assign(const _CharT* __f, const _CharT* __l) {
-    _STLP_FIX_LITERAL_BUG(__f) _STLP_FIX_LITERAL_BUG(__l)
-      __check_range(__f, __l);
-      _Base::assign(__f, __l);
-    return *this;
-  }
-  _Self& assign(const_iterator __f, const_iterator __l) {
-
-      _Base::assign(__f._M_iterator, __l._M_iterator);
-    return *this;
-  }
-#endif  /* _STLP_MEMBER_TEMPLATES */
-    
-public:                         // Insert
-
-  _Self& insert(size_type __pos, const _Self& __s) {
-    _Base::insert(__pos, __s);
-    return *this;
-  }
-
-  _Self& insert(size_type __pos, const _Self& __s,
-                       size_type __beg, size_type __n) {
-    _Base::insert(__pos, __s, __beg, __n);
-    return *this;
-  }
-
-  _Self& insert(size_type __pos, const _CharT* __s, size_type __n) {
-    _STLP_FIX_LITERAL_BUG(__s)
-    _Base::insert(__pos, __s, __n);
-    return *this;
-  }
-
-  _Self& insert(size_type __pos, const _CharT* __s) {
-    _STLP_FIX_LITERAL_BUG(__s)
-    _Base::insert(__pos, __s);      
-    return *this;
-  }
-    
-  _Self& insert(size_type __pos, size_type __n, _CharT __c) {
-    _Base::insert(__pos, __n, __c);
-    return *this;
-  }
-
-  iterator insert(iterator __p, _CharT __c) {
-    _STLP_FIX_LITERAL_BUG(__p)
-    __check_if_owner(&_M_iter_list,__p);
-    return iterator(&_M_iter_list,_Base::insert(__p._M_iterator, __c));
-  }
-
-  void insert(iterator __p, size_t __n, _CharT __c) {
-    __check_if_owner(&_M_iter_list,__p);
-    _Base::insert(__p._M_iterator, __n, __c);
-  }
-
-#ifdef _STLP_MEMBER_TEMPLATES
-  template <class _InputIter>
-  void insert(iterator __p, _InputIter __first, _InputIter __last) {
-    __check_if_owner(&_M_iter_list,__p);
-    __check_range(__first,__last);
-    _Base::insert(__p._M_iterator, __first, __last);
-  }
-#else /* _STLP_MEMBER_TEMPLATES */
-  void insert(iterator __p, const _CharT* __first, const _CharT* __last) {
-    _STLP_FIX_LITERAL_BUG(__first) _STLP_FIX_LITERAL_BUG(__last)
-    __check_if_owner(&_M_iter_list,__p);
-    __check_range(__first,__last);
-    _Base::insert(__p._M_iterator, __first, __last);
-  }
-  void insert(iterator __p, const_iterator __first, const_iterator __last) {
-    __check_range(__first,__last);
-    _Base::insert(__p._M_iterator, __first._M_iterator, __last._M_iterator); 
-  }
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-public:                         // Erase.
-  _Self& erase(size_type __pos = 0, size_type __n = _Base::npos) {
-    _Base::erase(__pos, __n);
-    return *this;
-  }  
-  iterator erase(iterator __position) {
-    __check_if_owner(&_M_iter_list, __position);
-    __invalidate_iterator(&_M_iter_list,end());
-    return iterator(&_M_iter_list, _Base::erase(__position._M_iterator));
-  }
-  iterator erase(iterator __first, iterator __last) {
-    __check_range(__first, __last)&&__check_if_owner(&_M_iter_list,__first);
-    if (__first != __last) {
-      __invalidate_range(&_M_iter_list, __last, end());
-    }
-    return iterator(&_M_iter_list, _Base::erase(__first._M_iterator, __last._M_iterator));   
-  }
-
-public:                         // Substring.
-  _Self substr(size_type __pos = 0, size_type __n = _Base::npos) const {
-    if (__pos > this->size())
-      this->_M_throw_out_of_range();
-    return _Self(this->begin() + __pos, 
-                 this->begin() + __pos + min(__n, this->size() - __pos),
-                 allocator_type());
-  }
-public:                         // Replace.  (Conceptually equivalent
-                                // to erase followed by insert.)
-  _Self& replace(size_type __pos, size_type __n, 
-                        const _Self& __s) {
-    _Base::replace(__pos, __n, __s);
-    return *this;
-  }
-
-  _Self& replace(size_type __pos1, size_type __n1,
-                        const _Self& __s,
-                        size_type __pos2, size_type __n2) {
-    _Base::replace(__pos1, __n1, (const _Base&)__s, __pos2, __n2);
-    return *this;
-  }
-
-  _Self& replace(size_type __pos, size_type __n1,
-                        const _CharT* __s, size_type __n2) {    
-    _STLP_FIX_LITERAL_BUG(__s)
-    _Base::replace(__pos, __n1, __s, __n2);
-    return *this;
-  }
-
-  _Self& replace(size_type __pos, size_type __n1,
-                        const _CharT* __s) {
-    _STLP_FIX_LITERAL_BUG(__s)
-    _Base::replace(__pos, __n1, __s);
-    return *this;
-  }
-
-  _Self& replace(size_type __pos, size_type __n1,
-                        size_type __n2, _CharT __c) {
-    _Base::replace(__pos, __n1, __n2, __c);
-    return *this;
-  }
-
-  _Self& replace(iterator __first, iterator __last, 
-                        const _Self& __s) { 
-    __check_if_owner(&_M_iter_list,__first);
-    __check_range(__first, __last);
-    _Base::replace(__first._M_iterator, __last._M_iterator,__s);
-    return *this;
-  }
-
-  _Self& replace(iterator __first, iterator __last,
-                        const _CharT* __s, size_type __n) { 
-    _STLP_FIX_LITERAL_BUG(__s)
-    __check_if_owner(&_M_iter_list,__first);
-    __check_range(__first, __last);
-    _Base::replace(__first._M_iterator, __last._M_iterator,__s, __n);
-    return *this;
-  }
-
-  _Self& replace(iterator __first, iterator __last,
-                        const _CharT* __s) {
-    _STLP_FIX_LITERAL_BUG(__s)
-    __check_if_owner(&_M_iter_list,__first);
-    __check_range(__first, __last);
-    _Base::replace(__first._M_iterator, __last._M_iterator,__s);
-    return *this;
-  }
-
-  _Self& replace(iterator __first, iterator __last, 
-		 size_type __n, _CharT __c) {
-    __check_if_owner(&_M_iter_list,__first);
-    __check_range(__first, __last);
-    _Base::replace(__first._M_iterator, __last._M_iterator, __n, __c);
-    return *this;
-  }
-
-#ifdef _STLP_MEMBER_TEMPLATES
-  template <class _InputIter>
-  _Self& replace(iterator __first, iterator __last,
-                        _InputIter __f, _InputIter __l) {
-    __check_if_owner(&_M_iter_list, __first);
-    __check_range(__first, __last);
-    __check_range(__f, __l);
-    _Base::replace(__first._M_iterator, __last._M_iterator, __f, __l);
-    return *this;    
-  }
-#else /* _STLP_MEMBER_TEMPLATES */
-  _Self& replace(iterator __first, iterator __last,
-		 const _CharT* __f, const _CharT* __l) {
-    __check_if_owner(&_M_iter_list, __first);
-    __check_range(__first, __last);
-    __check_range(__f, __l);
-    _Base::replace(__first._M_iterator, __last._M_iterator, __f, __l);
-    return *this;    
-  }
- 
-  _Self& replace(iterator __first, iterator __last,
-		 const_iterator __f, const_iterator __l) {
-    __check_if_owner(&_M_iter_list, __first);
-    __check_range(__first, __last);
-    __check_range(__f, __l);
-    _Base::replace(__first._M_iterator, __last._M_iterator, 
-		   __f._M_iterator, __l._M_iterator);
-    return *this; 
-  } 
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-public:                         // Other modifier member functions.
-
-  void swap(_Self& __s) {
-    _M_iter_list._Swap_owners(__s._M_iter_list);
-    _Base::swap(__s);
-  }
-};
-
-
-// This is a hook to instantiate STLport exports in a designated DLL
-# if defined (_STLP_USE_TEMPLATE_EXPORT)
-_STLP_EXPORT template class _STLP_CLASS_DECLSPEC basic_string<char, char_traits<char>, allocator<char> >;
-#  if defined (_STLP_HAS_WCHAR_T)
-_STLP_EXPORT template class _STLP_CLASS_DECLSPEC basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> >;
-#  endif
-# endif /* _STLP_USE_TEMPLATE_EXPORT */
-
-
-// ------------------------------------------------------------
-// Non-member functions.
-
-template <class _CharT, class _Traits, class _Alloc>
-inline basic_string<_CharT,_Traits,_Alloc> _STLP_CALL
-operator+(const basic_string<_CharT,_Traits,_Alloc>& __s,
-          const basic_string<_CharT,_Traits,_Alloc>& __y)
-{
-  return basic_string<_CharT,_Traits,_Alloc>(*__s._Get_base() + *__y._Get_base());
-}
-
-template <class _CharT, class _Traits, class _Alloc>
-inline basic_string<_CharT,_Traits,_Alloc> _STLP_CALL
-operator+(const _CharT* __s,
-          const basic_string<_CharT,_Traits,_Alloc>& __y) {
-  _STLP_FIX_LITERAL_BUG(__s)
-  return basic_string<_CharT,_Traits,_Alloc>(__s + *__y._Get_base());
-}
-
-template <class _CharT, class _Traits, class _Alloc>
-inline basic_string<_CharT,_Traits,_Alloc> _STLP_CALL
-operator+(_CharT __c,
-          const basic_string<_CharT,_Traits,_Alloc>& __y) {
-  return basic_string<_CharT,_Traits,_Alloc>(__c + *__y._Get_base());
-}
-
-template <class _CharT, class _Traits, class _Alloc>
-inline basic_string<_CharT,_Traits,_Alloc> _STLP_CALL
-operator+(const basic_string<_CharT,_Traits,_Alloc>& __x,
-          const _CharT* __s) {
-  _STLP_FIX_LITERAL_BUG(__s)
-  return basic_string<_CharT,_Traits,_Alloc>(*__x._Get_base()+ __s);
-}
-
-template <class _CharT, class _Traits, class _Alloc>
-inline basic_string<_CharT,_Traits,_Alloc> _STLP_CALL
-operator+(const basic_string<_CharT,_Traits,_Alloc>& __x,
-          const _CharT __c) {
-  return basic_string<_CharT,_Traits,_Alloc>(*__x._Get_base() + __c);
-}
-
-#ifdef _STLP_EXTRA_OPERATORS_FOR_DEBUG
-
-// Operator== and operator!=
-
-template <class _CharT, class _Traits, class _Alloc>
-inline bool _STLP_CALL
-operator==(const basic_string<_CharT,_Traits,_Alloc>& __x,
-           const basic_string<_CharT,_Traits,_Alloc>& __y) {
-  return (*__x._Get_base() == *__y._Get_base());
-}
-
-template <class _CharT, class _Traits, class _Alloc>
-inline bool _STLP_CALL
-operator==(const _CharT* __s,
-           const basic_string<_CharT,_Traits,_Alloc>& __y) {
-  _STLP_FIX_LITERAL_BUG(__s)
-  return (__s == *__y._Get_base());
-}
-
-template <class _CharT, class _Traits, class _Alloc>
-inline bool _STLP_CALL
-operator==(const basic_string<_CharT,_Traits,_Alloc>& __x,
-           const _CharT* __s) {
-  _STLP_FIX_LITERAL_BUG(__s)
-  return (*__x._Get_base() == __s);
-}
-
-// Operator< (and also >, <=, and >=).
-
-template <class _CharT, class _Traits, class _Alloc>
-inline bool _STLP_CALL
-operator<(const basic_string<_CharT,_Traits,_Alloc>& __x,
-          const basic_string<_CharT,_Traits,_Alloc>& __y) {
-  return (*__x._Get_base() < *__y._Get_base());
-}
-
-template <class _CharT, class _Traits, class _Alloc>
-inline bool _STLP_CALL
-operator<(const _CharT* __s,
-          const basic_string<_CharT,_Traits,_Alloc>& __y) {
-  _STLP_FIX_LITERAL_BUG(__s)
-  return (__s < *__y._Get_base());    
-}
-
-template <class _CharT, class _Traits, class _Alloc>
-inline bool _STLP_CALL
-operator<(const basic_string<_CharT,_Traits,_Alloc>& __x,
-          const _CharT* __s) {
-  _STLP_FIX_LITERAL_BUG(__s)
-  return (*__x._Get_base() < __s);
-}
-
-#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE
-
-template <class _CharT, class _Traits, class _Alloc>
-inline bool _STLP_CALL
-operator!=(const basic_string<_CharT,_Traits,_Alloc>& __x,
-           const basic_string<_CharT,_Traits,_Alloc>& __y) {
-  return !(__x == __y);
-}
-
-template <class _CharT, class _Traits, class _Alloc>
-inline bool _STLP_CALL
-operator>(const basic_string<_CharT,_Traits,_Alloc>& __x,
-          const basic_string<_CharT,_Traits,_Alloc>& __y) {
-  return __y < __x;
-}
-
-template <class _CharT, class _Traits, class _Alloc>
-inline bool _STLP_CALL
-operator<=(const basic_string<_CharT,_Traits,_Alloc>& __x,
-           const basic_string<_CharT,_Traits,_Alloc>& __y) {
-  return !(__y < __x);
-}
-
-template <class _CharT, class _Traits, class _Alloc>
-inline bool _STLP_CALL
-operator>=(const basic_string<_CharT,_Traits,_Alloc>& __x,
-           const basic_string<_CharT,_Traits,_Alloc>& __y) {
-  return !(__x < __y);
-}
-
-#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */
-
-template <class _CharT, class _Traits, class _Alloc>
-inline bool _STLP_CALL
-operator!=(const _CharT* __s,
-           const basic_string<_CharT,_Traits,_Alloc>& __y) {
-  _STLP_FIX_LITERAL_BUG(__s)
-  return !(__s == __y);
-}
-
-template <class _CharT, class _Traits, class _Alloc>
-inline bool _STLP_CALL
-operator!=(const basic_string<_CharT,_Traits,_Alloc>& __x,
-           const _CharT* __s) {
-  _STLP_FIX_LITERAL_BUG(__s)
-  return !(__x == __s);
-}
-
-template <class _CharT, class _Traits, class _Alloc>
-inline bool _STLP_CALL
-operator>(const _CharT* __s,
-          const basic_string<_CharT,_Traits,_Alloc>& __y) {
-  _STLP_FIX_LITERAL_BUG(__s)
-  return __y < __s;
-}
-
-template <class _CharT, class _Traits, class _Alloc>
-inline bool _STLP_CALL
-operator>(const basic_string<_CharT,_Traits,_Alloc>& __x,
-          const _CharT* __s) {
-  _STLP_FIX_LITERAL_BUG(__s)
-  return __s < __x;
-}
-
-template <class _CharT, class _Traits, class _Alloc>
-inline bool _STLP_CALL
-operator<=(const _CharT* __s,
-           const basic_string<_CharT,_Traits,_Alloc>& __y) {
-  _STLP_FIX_LITERAL_BUG(__s)
-  return !(__y < __s);
-}
-
-template <class _CharT, class _Traits, class _Alloc>
-inline bool _STLP_CALL
-operator<=(const basic_string<_CharT,_Traits,_Alloc>& __x,
-           const _CharT* __s) {
-  _STLP_FIX_LITERAL_BUG(__s)
-  return !(__s < __x);
-}
-
-template <class _CharT, class _Traits, class _Alloc>
-inline bool _STLP_CALL
-operator>=(const _CharT* __s,
-           const basic_string<_CharT,_Traits,_Alloc>& __y) {
-  _STLP_FIX_LITERAL_BUG(__s)
-  return !(__s < __y);
-}
-
-template <class _CharT, class _Traits, class _Alloc>
-inline bool _STLP_CALL
-operator>=(const basic_string<_CharT,_Traits,_Alloc>& __x,
-           const _CharT* __s) {
-  _STLP_FIX_LITERAL_BUG(__s)
-  return !(__x < __s);
-}
-#endif /*  if 0 */
-
-// Swap.
-#ifdef _STLP_FUNCTION_TMPL_PARTIAL_ORDER
-template <class _CharT, class _Traits, class _Alloc>
-inline void swap(basic_string<_CharT,_Traits,_Alloc>& __x,
-                 basic_string<_CharT,_Traits,_Alloc>& __y) {
-  __x.swap(__y);
-}
-#endif /* _STLP_FUNCTION_TMPL_PARTIAL_ORDER */
-
-// I/O.  
-
-#ifdef _STLP_EXTRA_OPERATORS_FOR_DEBUG
-#if defined (_STLP_USE_NEW_IOSTREAMS) && ! defined (_STLP_OWN_IOSTREAMS)
-
-template <class _CharT, class _Traits, class _Alloc>
-basic_ostream<_CharT, _Traits>& _STLP_CALL
-operator<<(basic_ostream<_CharT, _Traits>& __os, 
-           const basic_string<_CharT,_Traits,_Alloc>& __s) {
-  return __os << *__s._Get_base();
-}
-
-template <class _CharT, class _Traits, class _Alloc>
-basic_istream<_CharT, _Traits>&  _STLP_CALL
-operator>>(basic_istream<_CharT, _Traits>& __is,
-           basic_string<_CharT,_Traits,_Alloc>& __s) {
-    return __is >> *__s._Get_base();
-}
-
-#elif ! defined ( _STLP_USE_NO_IOSTREAMS )
-
-template <class _CharT, class _Traits, class _Alloc>
-ostream& _STLP_CALL operator<<(ostream& __os, 
-                    const basic_string<_CharT,_Traits,_Alloc>& __s) {
-  return __os << *__s._Get_base();
-}
-
-template <class _CharT, class _Traits, class _Alloc>
-istream& _STLP_CALL operator>>(istream& __is, basic_string<_CharT,_Traits,_Alloc>& __s) {
-    return __is >> *__s._Get_base();
-}
-
-#endif /* _STLP_USE_NEW_IOSTREAMS */
-#endif /* if _STLP_EXTRA_OPERATORS_FOR_DEBUG */
-
-
-_STLP_END_NAMESPACE
-
-#endif /* _STLP_DBG_STRING */
-
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/stl/debug/_tree.h b/src/STLport/stl/debug/_tree.h
deleted file mode 100644
index 4d2ecc0..0000000
--- a/src/STLport/stl/debug/_tree.h
+++ /dev/null
@@ -1,249 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_DBG_TREE_H
-#define _STLP_INTERNAL_DBG_TREE_H
-
-#include <stl/debug/_iterator.h>
-#include <stl/_function.h>
-#include <stl/_alloc.h>
-
-#  undef _DBG_Rb_tree
-#  define _DBG_Rb_tree _Rb_tree
-
-# define _STLP_DBG_TREE_SUPER __WORKAROUND_DBG_RENAME(Rb_tree) <_Key, _Value, _KeyOfValue, _Compare, _Alloc>
-
-_STLP_BEGIN_NAMESPACE
-
-# ifdef _STLP_DEBUG_USE_DISTINCT_VALUE_TYPE_HELPERS
-template <class _Key, class _Value, class _KeyOfValue, class _Compare, class _Alloc >
-inline _Value*
-value_type(const  _DBG_iter_base< _STLP_DBG_TREE_SUPER >&) {
-  return (_Value*)0;
-}
-template <class _Key, class _Value, class _KeyOfValue, class _Compare, class _Alloc >
-inline bidirectional_iterator_tag
-iterator_category(const  _DBG_iter_base< _STLP_DBG_TREE_SUPER >&) {
-  return bidirectional_iterator_tag();
-}
-# endif
-
-template <class _Key, class _Value, class _KeyOfValue, class _Compare,
-          _STLP_DBG_ALLOCATOR_SELECT(_Value) >
-class _DBG_Rb_tree : public _STLP_DBG_TREE_SUPER {
-  typedef _STLP_DBG_TREE_SUPER _Base;
-  typedef _DBG_Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc> _Self;
-protected:
-  friend class __owned_link;
-  mutable __owned_list _M_iter_list;
-
-public:
-  __IMPORT_CONTAINER_TYPEDEFS(_Base)
-    typedef typename _Base::key_type key_type;
-  
-  typedef _DBG_iter<_Base, _Nonconst_traits<value_type> > iterator;
-  typedef _DBG_iter<_Base, _Const_traits<value_type> > const_iterator;
-
-  _STLP_DECLARE_BIDIRECTIONAL_REVERSE_ITERATORS;
-
-protected:
-
-  //typedef typename _Base::key_param_type key_param_type;
-  //typedef typename _Base::val_param_type val_param_type;
-
-  void _Invalidate_all() {_M_iter_list._Invalidate_all();}
-
-  void _Invalidate_iterator(const iterator& __it) { 
-    __invalidate_iterator(&_M_iter_list,__it); 
-  }
-  void _Invalidate_iterators(const iterator& __first, const iterator& __last) {
-    iterator __cur = __first;
-    while (__cur != __last) __invalidate_iterator(&_M_iter_list, __cur++); 
-  }
-
-  const _Base* _Get_base() const { return (const _Base*)this; }
-  _Base* _Get_base() { return (_Base*)this; }
-
-public:
-  _DBG_Rb_tree() : _STLP_DBG_TREE_SUPER(), 
-    _M_iter_list(_Get_base()) {}
-  _DBG_Rb_tree(const _Compare& __comp) : 
-    _STLP_DBG_TREE_SUPER(__comp), _M_iter_list(_Get_base()) {}
-  _DBG_Rb_tree(const _Compare& __comp, const allocator_type& __a): 
-    _STLP_DBG_TREE_SUPER(__comp, __a), _M_iter_list(_Get_base()) {}
-  _DBG_Rb_tree(const _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& __x):
-    _STLP_DBG_TREE_SUPER(__x), _M_iter_list(_Get_base()) {}
-  ~_DBG_Rb_tree() { _Invalidate_all(); }
-
-  _Self& operator=(const _Self& __x) {
-    _Invalidate_all();
-    (_Base&)*this = (const _Base&)__x;
-    return *this;
-  }
-  
-  iterator begin() { return iterator(&_M_iter_list,_Base::begin()); }
-  const_iterator begin() const { return const_iterator(&_M_iter_list, _Base::begin()); }
-  iterator end() { return iterator(&_M_iter_list, _Base::end()); }
-  const_iterator end() const { return const_iterator(&_M_iter_list,_Base::end()); }
-
-public:
-  reverse_iterator rbegin() { return reverse_iterator(end()); }
-  const_reverse_iterator rbegin() const { 
-    return const_reverse_iterator(end()); 
-  }
-  reverse_iterator rend() { return reverse_iterator(begin()); }
-  const_reverse_iterator rend() const { 
-    return const_reverse_iterator(begin());
-  }
-  void swap(_Self& __t) {
-    _Base::swap(__t);
-    _M_iter_list._Swap_owners(__t._M_iter_list);
-  }
-    
-public:
-
-  iterator find(const key_type& __x) {
-    return iterator(&_M_iter_list, _Base::find(__x));    
-  }
-  const_iterator find(const key_type& __x) const {
-    return const_iterator(&_M_iter_list, _Base::find(__x));    
-  }
-
-  iterator lower_bound(const key_type& __x) {
-    return iterator(&_M_iter_list, _Base::lower_bound(__x));    
-  }
-  const_iterator lower_bound(const key_type& __x) const {
-    return const_iterator(&_M_iter_list, _Base::lower_bound(__x));    
-  }
-
-  iterator upper_bound(const key_type& __x) {
-    return iterator(&_M_iter_list, _Base::upper_bound(__x));    
-  }
-  const_iterator upper_bound(const key_type& __x) const {
-    return const_iterator(&_M_iter_list, _Base::upper_bound(__x));    
-  }
-
-  pair<iterator,iterator> equal_range(const key_type& __x) {
-    return pair<iterator, iterator>(iterator(&_M_iter_list, _Base::lower_bound(__x)),
-				    iterator(&_M_iter_list, _Base::upper_bound(__x)));
-  }
-  pair<const_iterator, const_iterator> equal_range(const key_type& __x) const {
-    return pair<const_iterator,const_iterator>(const_iterator(&_M_iter_list, _Base::lower_bound(__x)),
-					       const_iterator(&_M_iter_list, _Base::upper_bound(__x)));
-  }
-
-  pair<iterator,bool> insert_unique(const value_type& __x) {
-    _STLP_STD::pair<_STLP_HEADER_TYPENAME _Base::iterator, bool> __res = _Base::insert_unique(__x);
-    return pair<iterator,bool>( iterator(&_M_iter_list, __res.first), __res.second ) ;
-  }
-  iterator insert_equal(const value_type& __x) {
-    return iterator(&_M_iter_list, _Base::insert_equal(__x));
-  }
-
-  iterator insert_unique(iterator __position, const value_type& __x) {
-    _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list,__position))
-    return iterator(&_M_iter_list, _Base::insert_unique(__position._M_iterator, __x));
-  }
-  iterator insert_equal(iterator __position, const value_type& __x) {
-    _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list,__position))
-    return iterator(&_M_iter_list, _Base::insert_equal(__position._M_iterator, __x));
-  }
-
-#ifdef _STLP_MEMBER_TEMPLATES  
-  template<class _II>
-  void insert_equal(_II __first, _II __last) {
-    _Base::insert_equal(__first, __last);
-  }
-  template<class _II>
-  void insert_unique(_II __first, _II __last) {
-    _Base::insert_unique(__first, __last);
-  }
-#else /* _STLP_MEMBER_TEMPLATES */
-  void insert_unique(const_iterator __first, const_iterator __last) {
-    _Base::insert_unique(__first._M_iterator, __last._M_iterator);
-  }
-  void insert_unique(const value_type* __first, const value_type* __last) {
-    _Base::insert_unique(__first, __last);    
-  }
-  void insert_equal(const_iterator __first, const_iterator __last) {
-    _Base::insert_equal(__first._M_iterator, __last._M_iterator);
-  }
-  void insert_equal(const value_type* __first, const value_type* __last) {
-    _Base::insert_equal(__first, __last);
-  }
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-  void erase(iterator __position) {
-    _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list,__position))
-    _STLP_DEBUG_CHECK(_Dereferenceable(__position))
-    _Invalidate_iterator(__position);
-    _Base::erase(__position._M_iterator);
-  }
-  size_type erase(const key_type& __x) {
-    pair<iterator,iterator> __p = equal_range(__x);
-    size_type __n = distance(__p.first, __p.second);
-    _Invalidate_iterators(__p.first, __p.second);
-    _Base::erase(__p.first._M_iterator, __p.second._M_iterator);
-	return __n;
-  }
-
-  void erase(iterator __first, iterator __last) {
-    _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list, __first)&&
-		      __check_if_owner(&_M_iter_list, __last))
-    _Invalidate_iterators(__first, __last);
-    _Base::erase(__first._M_iterator, __last._M_iterator);    
-  }
-  void erase(const key_type* __first, const key_type* __last) {
-    while (__first != __last) erase(*__first++);
-  }
-
-  void clear() {
-    _Invalidate_all();
-    _Base::clear();
-  }      
-};
-
-#define _STLP_TEMPLATE_HEADER template <class _Key, class _Value, class _KeyOfValue, class _Compare, class _Alloc>
-#define _STLP_TEMPLATE_CONTAINER _DBG_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>
-#define _STLP_TEMPLATE_CONTAINER_BASE _STLP_DBG_TREE_SUPER
-#include <stl/debug/_relops_cont.h>
-#undef _STLP_TEMPLATE_CONTAINER_BASE
-#undef _STLP_TEMPLATE_CONTAINER
-#undef _STLP_TEMPLATE_HEADER
-         
-_STLP_END_NAMESPACE
-
-# undef  _STLP_DBG_TREE_SUPER
-
-#endif /* _STLP_INTERNAL_DBG_TREE_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/stl/debug/_vector.h b/src/STLport/stl/debug/_vector.h
deleted file mode 100644
index a9a1a0a..0000000
--- a/src/STLport/stl/debug/_vector.h
+++ /dev/null
@@ -1,300 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_DBG_VECTOR_H
-#define _STLP_INTERNAL_DBG_VECTOR_H
-
-#include <stl/debug/_iterator.h>
-
-# ifndef _STLP_USE_WRAPPER_FOR_ALLOC_PARAM
-#  undef  _DBG_vector
-#  define _DBG_vector vector
-# endif
-
-#  define _STLP_DBG_VECTOR_BASE __WORKAROUND_DBG_RENAME(vector) <_Tp, _Alloc>
-
-_STLP_BEGIN_NAMESPACE
-
-# ifdef _STLP_DEBUG_USE_DISTINCT_VALUE_TYPE_HELPERS
-template <class _Tp, class _Alloc>
-inline _Tp*
-value_type(const  _DBG_iter_base< _STLP_DBG_VECTOR_BASE >&) {
-  return (_Tp*)0;
-}
-template <class _Tp, class _Alloc>
-inline random_access_iterator_tag
-iterator_category(const  _DBG_iter_base< _STLP_DBG_VECTOR_BASE >&) {
-  return random_access_iterator_tag();
-}
-# endif
-
-template <class _Tp, class _NcIt>
-struct _Vector_nonconst_traits
-{
-	typedef _Nonconst_traits<_Tp> _BaseT;
-	typedef _Tp value_type;
-	typedef _Tp& reference;
-	typedef _Tp* pointer;
-	typedef _Vector_nonconst_traits<_Tp, _NcIt> _Non_const_traits;
-};
-
-template <class _Tp, class _NcIt>
-struct _Vector_const_traits
-{
-	typedef _Const_traits<_Tp> _BaseT;
-	typedef _Tp value_type;
-	typedef const _Tp& reference;
-	typedef const _Tp* pointer;
-	typedef _Vector_nonconst_traits<_Tp, _NcIt> _Non_const_traits;
-};
-
-_STLP_TEMPLATE_NULL
-struct _Vector_nonconst_traits<bool, _Bit_iterator>
-{
-	typedef _Bit_iterator::value_type value_type;
-	typedef _Bit_iterator::reference reference;
-	typedef _Bit_iterator::pointer pointer;
-	typedef _Vector_nonconst_traits<bool, _Bit_iterator> _Non_const_traits;
-};
-
-_STLP_TEMPLATE_NULL
-struct _Vector_const_traits<bool, _Bit_iterator>
-{
-	typedef _Bit_const_iterator::value_type value_type;
-	typedef _Bit_const_iterator::reference reference;
-	typedef _Bit_const_iterator::pointer pointer;
-	typedef _Vector_nonconst_traits<bool, _Bit_iterator> _Non_const_traits;
-};
-
-template <class _Tp, _STLP_DBG_ALLOCATOR_SELECT(_Tp) >
-class _DBG_vector : public  _STLP_DBG_VECTOR_BASE {
-private:
-  typedef _STLP_DBG_VECTOR_BASE _Base;
-  typedef _DBG_vector<_Tp, _Alloc> _Self;
-  mutable __owned_list _M_iter_list;
-
-public:
-
-  __IMPORT_CONTAINER_TYPEDEFS(_Base)
-
-  typedef _DBG_iter<_Base,
-      _Vector_nonconst_traits<value_type, typename _Base::iterator> > iterator;
-    
-  typedef _DBG_iter<_Base,
-      _Vector_const_traits<value_type, typename _Base::iterator> > const_iterator;
-
-  _STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS;
-
-  iterator begin() { return iterator(&_M_iter_list, this->_M_start); }
-  const_iterator begin() const { return const_iterator(&_M_iter_list, this->_M_start); }
-  iterator end() { return iterator(&_M_iter_list, this->_M_finish); }
-  const_iterator end() const { return const_iterator(&_M_iter_list, this->_M_finish); }
-
-  reverse_iterator rbegin()
-    { return reverse_iterator(end()); }
-  const_reverse_iterator rbegin() const
-    { return const_reverse_iterator(end()); }
-  reverse_iterator rend()
-    { return reverse_iterator(begin()); }
-  const_reverse_iterator rend() const
-    { return const_reverse_iterator(begin()); }
-
-  reference operator[](size_type __n) {
-    _STLP_VERBOSE_ASSERT(__n < _Base::size(), _StlMsg_OUT_OF_BOUNDS)
-    return _Base::operator[](__n);
-  }
-
-  const_reference operator[](size_type __n) const {
-    _STLP_VERBOSE_ASSERT(__n < _Base::size(), _StlMsg_OUT_OF_BOUNDS)
-    return _Base::operator[](__n);
-  }
-
-  _Base* _Get_base() { return (_Base*)this; }
-  const _Base* _Get_base() const { return (const _Base*)this; }
-
-  explicit _DBG_vector(const allocator_type& __a = allocator_type())
-    : _STLP_DBG_VECTOR_BASE(__a), _M_iter_list((const _Base*)this)  {}
-
-  _DBG_vector(size_type __n, const _Tp& __value,
-         const allocator_type& __a = allocator_type()) 
-    : _STLP_DBG_VECTOR_BASE(__n, __value, __a), _M_iter_list((const _Base*)this) {}
-
-  explicit _DBG_vector(size_type __n)
-    : _STLP_DBG_VECTOR_BASE(__n), _M_iter_list((const _Base*)this) {}
-
-
-  _DBG_vector(const _Self& __x) 
-    : _STLP_DBG_VECTOR_BASE(__x), _M_iter_list((const _Base*)this) {}
-
-#if defined (_STLP_MEMBER_TEMPLATES)
-# ifdef _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS
-  template <class _InputIterator>
-  _DBG_vector(_InputIterator __first, _InputIterator __last):
-    _STLP_DBG_VECTOR_BASE(__first, __last), _M_iter_list((const _Base*)this) {}
-# endif
-  template <class _InputIterator>
-  _DBG_vector(_InputIterator __first, _InputIterator __last,
-         const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL) :
-    _STLP_DBG_VECTOR_BASE(__first, __last, __a), _M_iter_list((const _Base*)this) {}
-
-#else
-  _DBG_vector(const _Tp* __first, const _Tp* __last,
-         const allocator_type& __a = allocator_type())
-    : _STLP_DBG_VECTOR_BASE(__first, __last, __a), _M_iter_list((const _Base*)this) {}
-
-  // mysterious VC++ bug ?
-  _DBG_vector(const_iterator __first, const_iterator __last , 
-	      const allocator_type& __a = allocator_type())
-    : _STLP_DBG_VECTOR_BASE(__first._M_iterator, __last._M_iterator, __a),
-      _M_iter_list((const _Base*)this) { }
-
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-  _Self& operator=(const _Self& __x) {
-    _M_iter_list._Invalidate_all();
-    (_Base&)*this = (const _Base&)__x;
-    return *this;
-  }
-
-  reference front() { return *begin(); }
-  const_reference front() const { return *begin(); }
-
-  reference back() {
-    iterator __tmp = end();
-    --__tmp;
-    return *__tmp;
-  }
-  const_reference back() const {
-    const_iterator __tmp = end();
-    --__tmp;
-    return *__tmp;
-  }
-
-  void swap(_Self& __x) {
-    _M_iter_list._Swap_owners(__x._M_iter_list);
-    _Base::swap((_Base&)__x);
-  }
-
-  iterator insert(iterator __position, const _Tp& __x) {
-    _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list, __position))
-    if (this->size()+1 > this->capacity()) _M_iter_list._Invalidate_all();  
-    return iterator(&_M_iter_list, _Base::insert(__position._M_iterator, __x));
-  }
-
-  iterator insert(iterator __position) {
-    _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list, __position))
-    if (this->size()+1 > this->capacity()) _M_iter_list._Invalidate_all();  
-    return iterator(&_M_iter_list, _Base::insert(__position._M_iterator));    
-  }
-
-#ifdef _STLP_MEMBER_TEMPLATES
-  // Check whether it's an integral type.  If so, it's not an iterator.
-  template <class _InputIterator>
-  void insert(iterator __position, _InputIterator __first, _InputIterator __last) {
-    _STLP_DEBUG_CHECK(__check_range(__first,__last))
-    _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list, __position))
-    size_type __n = distance(__first, __last);
-    if (this->size()+__n > this->capacity()) _M_iter_list._Invalidate_all();  
-    _Base::insert(__position._M_iterator, __first, __last);    
-  }
-#else /* _STLP_MEMBER_TEMPLATES */
-  void insert(iterator __position,
-              const_iterator __first, const_iterator __last) {
-    _STLP_DEBUG_CHECK(__check_range(__first,__last))
-    _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list, __position))
-    size_type __n = distance(__first, __last);
-    if (this->size()+__n > this->capacity()) _M_iter_list._Invalidate_all();  
-    _Base::insert(__position._M_iterator,
-		  __first._M_iterator, __last._M_iterator);        
-  }
-
-  void insert (iterator __position, const_pointer __first, const_pointer __last) {
-    _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list, __position))
-    _STLP_DEBUG_CHECK(__check_range(__first,__last))
-    size_type __n = distance(__first, __last);
-    if (this->size()+__n > this->capacity()) _M_iter_list._Invalidate_all();  
-    _Base::insert(__position._M_iterator, __first, __last);  
-}
-#endif /* _STLP_MEMBER_TEMPLATES */
-
-  void insert (iterator __position, size_type __n, const _Tp& __x){
-    _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list, __position))
-    if (this->size()+__n > this->capacity()) _M_iter_list._Invalidate_all();  
-    _Base::insert(__position._M_iterator, __n, __x);
-  }
-  
-  void pop_back() {
-    _STLP_VERBOSE_ASSERT(!this->empty(), _StlMsg_EMPTY_CONTAINER)
-    __invalidate_iterator(&_M_iter_list,end());
-    _Base::pop_back();
-  }
-  iterator erase(iterator __position) {
-    _STLP_DEBUG_CHECK(__check_if_owner(&_M_iter_list, __position))
-    _STLP_VERBOSE_ASSERT(__position._M_iterator !=this->_M_finish,_StlMsg_ERASE_PAST_THE_END)
-    __invalidate_range(&_M_iter_list, __position+1, end());
-    return iterator(&_M_iter_list,_Base::erase(__position._M_iterator));
-  }
-  iterator erase(iterator __first, iterator __last) {
-    _STLP_DEBUG_CHECK(__check_range(__first,__last, begin(), end()))
-    __invalidate_range(&_M_iter_list, __first._M_iterator == this->_M_finish ? 
-		       __first : __first+1, end());
-    return iterator(&_M_iter_list, _Base::erase(__first._M_iterator, __last._M_iterator));
-  }
-  void clear() { 
-    _M_iter_list._Invalidate_all();
-    _Base::clear();
-  }
-  void push_back(const _Tp& __x) {
-    if (this->size()+1 > this->capacity()) _M_iter_list._Invalidate_all();
-    _Base::push_back(__x);
-  }
-};
-
-#define _STLP_TEMPLATE_HEADER template <class _Tp, class _Alloc>
-#define _STLP_TEMPLATE_CONTAINER _DBG_vector<_Tp, _Alloc>
-#define _STLP_TEMPLATE_CONTAINER_BASE _STLP_DBG_VECTOR_BASE
-#include <stl/debug/_relops_cont.h>
-#undef _STLP_TEMPLATE_CONTAINER_BASE
-#undef _STLP_TEMPLATE_CONTAINER
-#undef _STLP_TEMPLATE_HEADER
-
-# if defined (_STLP_USE_TEMPLATE_EXPORT) 
- _STLP_EXPORT_TEMPLATE_CLASS _DBG_vector <void*,allocator<void*> >;
-#  endif /* _STLP_USE_TEMPLATE_EXPORT */
-
-_STLP_END_NAMESPACE
-
-# undef _STLP_DBG_VECTOR_BASE
-# undef _DBG_vector
-
-#endif /* _STLP_DBG_VECTOR_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/msl_string.h b/src/STLport/stl/msl_string.h
deleted file mode 100644
index 0e57377..0000000
--- a/src/STLport/stl/msl_string.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 1998
- * Mark of the Unicorn, Inc.
- *
- * Permission to use, copy, modify, distribute and sell this software
- * and its documentation for any purpose is hereby granted without fee,
- * provided that the above copyright notice appear in all copies and
- * that both that copyright notice and this permission notice appear
- * in supporting documentation.  Mark of the Unicorn, Inc. makes no
- * representations about the suitability of this software for any
- * purpose.  It is provided "as is" without express or implied warranty.
- *
- */
-#if defined( _STLP_USE_MSIPL ) && !defined( _STLP_MSL_STRING_H_ )
-#define _STLP_MSL_STRING_H_
-
-//# define char_traits __msl_char_traits
-# define basic_string __msl_basic_string
-# define b_str_ref __msl_b_str_ref
-# define basic_istream __msl_basic_istream
-# define basic_ostream __msl_basic_ostream
-# define string __msl_string
-# define wstring __msl_wstring
-# define iterator_traits __msl_iterator_traits
-
-namespace std
-{
-	template<class charT, class traits> class basic_istream;
-	template<class charT, class traits> class basic_ostream;
-}
-
-# include _STLP_NATIVE_HEADER(string)
-// # undef char_traits
-# undef basic_string
-# undef b_str_ref
-# undef basic_istream
-# undef basic_ostream
-# undef string
-# undef wstring
-# undef iterator_traits
-
-#endif
diff --git a/src/STLport/stl/type_traits.h b/src/STLport/stl/type_traits.h
deleted file mode 100644
index 240f7b2..0000000
--- a/src/STLport/stl/type_traits.h
+++ /dev/null
@@ -1,418 +0,0 @@
-/*
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_TYPE_TRAITS_H
-#define _STLP_TYPE_TRAITS_H
-
-/*
-This header file provides a framework for allowing compile time dispatch
-based on type attributes. This is useful when writing template code.
-For example, when making a copy of an array of an unknown type, it helps
-to know if the type has a trivial copy constructor or not, to help decide
-if a memcpy can be used.
-
-The class template __type_traits provides a series of typedefs each of
-which is either __true_type or __false_type. The argument to
-__type_traits can be any type. The typedefs within this template will
-attain their correct values by one of these means:
-    1. The general instantiation contain conservative values which work
-       for all types.
-    2. Specializations may be declared to make distinctions between types.
-    3. Some compilers (such as the Silicon Graphics N32 and N64 compilers)
-       will automatically provide the appropriate specializations for all
-       types.
-
-EXAMPLE:
-
-//Copy an array of elements which have non-trivial copy constructors
-template <class T> void copy(T* source, T* destination, int n, __false_type);
-//Copy an array of elements which have trivial copy constructors. Use memcpy.
-template <class T> void copy(T* source, T* destination, int n, __true_type);
-
-//Copy an array of any type by using the most efficient copy mechanism
-template <class T> inline void copy(T* source,T* destination,int n) {
-   copy(source, destination, n,
-        typename __type_traits<T>::has_trivial_copy_constructor());
-}
-*/
-
-#ifdef __WATCOMC__
-# include <stl/_cwchar.h>
-#endif
-
-_STLP_BEGIN_NAMESPACE
-
-struct __true_type {};
-struct __false_type {};
-
-
-template <int _Is> struct __bool2type {
-  typedef __false_type _Ret; 
-};
-
-_STLP_TEMPLATE_NULL
-struct __bool2type<1> { typedef __true_type _Ret; };
-
-_STLP_TEMPLATE_NULL
-struct __bool2type<0> { typedef __false_type _Ret; };
-
-// logical end of 3 predicated
-template <class _P1, class _P2, class _P3>
-struct _Land3 {
-  typedef __false_type _Ret;
-};
-
-_STLP_TEMPLATE_NULL
-struct _Land3<__true_type, __true_type, __true_type> {
-  typedef __true_type _Ret;
-};
-
-
-// Forward declarations.
-template <class _Tp> struct __type_traits; 
-template <int _IsPOD> struct __type_traits_aux {
-   typedef __false_type    has_trivial_default_constructor;
-   typedef __false_type    has_trivial_copy_constructor;
-   typedef __false_type    has_trivial_assignment_operator;
-   typedef __false_type    has_trivial_destructor;
-   typedef __false_type    is_POD_type;
-};
-
-_STLP_TEMPLATE_NULL
-struct __type_traits_aux<0> {
-   typedef __false_type    has_trivial_default_constructor;
-   typedef __false_type    has_trivial_copy_constructor;
-   typedef __false_type    has_trivial_assignment_operator;
-   typedef __false_type    has_trivial_destructor;
-   typedef __false_type    is_POD_type;
-};
-
-_STLP_TEMPLATE_NULL
-struct __type_traits_aux<1> { 
-   typedef __true_type    has_trivial_default_constructor;
-   typedef __true_type    has_trivial_copy_constructor;
-   typedef __true_type    has_trivial_assignment_operator;
-   typedef __true_type    has_trivial_destructor;
-   typedef __true_type    is_POD_type;
-};
-
-# ifdef _STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS
-
-// Boris : simulation technique is used here according to Adobe Open Source License Version 1.0.
-// Copyright 2000 Adobe Systems Incorporated and others. All rights reserved.
-// Authors: Mat Marcus and Jesse Jones
-// The original version of this source code may be found at
-// http://opensource.adobe.com.
-
-struct _PointerShim {
-  // Since the compiler only allows at most one non-trivial
-  // implicit conversion we can make use of a shim class to
-  // be sure that IsPtr below doesn't accept classes with
-  // implicit pointer conversion operators
-  _PointerShim(const volatile void*); // no implementation
-};
-
-// These are the discriminating functions
-
-char _STLP_CALL _IsP(bool, _PointerShim); // no implementation is required
-char* _STLP_CALL _IsP(bool, ...);          // no implementation is required
-
-template <class _Tp>
-char _STLP_CALL _IsSameFun(bool, _Tp*, _Tp*); // no implementation is required
-char* _STLP_CALL _IsSameFun(bool, ...);          // no implementation is required
-
-template <class _Tp1, class _Tp2>
-struct _IsSame {
-  // boris : check!
-  static _Tp1* __null_rep1();
-  static _Tp2* __null_rep2();
-  enum { _Ret = (sizeof(_IsSameFun(false,__null_rep1(),__null_rep2())) == sizeof(char)) };
-};
-
-template <class _Tp>
-struct _IsPtr {
-  
-  // This template meta function takes a type T
-  // and returns true exactly when T is a pointer.
-  // One can imagine meta-functions discriminating on
-  // other criteria.
-  static _Tp& __null_rep();
-  enum { _Ret = (sizeof(_IsP(false,__null_rep())) == sizeof(char)) };
-
-};
-
-template <class _Tp>
-struct _IsPtrType {
-  enum { _Is =  _IsPtr<_Tp>::_Ret } ;
-  typedef __bool2type< _Is > _BT;
-  typedef typename _BT::_Ret _Type;
-  static _Type _Ret() { return _Type(); }
-};
-
-template <class _Tp1, class _Tp2>
-struct _BothPtrType {
-  typedef __bool2type< _IsPtr<_Tp1>::_Ret> _B1;
-  typedef __bool2type< _IsPtr<_Tp2>::_Ret> _B2;
-  typedef typename _B1::_Ret _Type1;
-  typedef typename _B2::_Ret _Type2;
-  typedef typename _Land3<_Type1, _Type2, __true_type>::_Ret _Type;
-  static _Type _Ret() { return _Type(); }
-};
-
-// we make general case dependant on the fact the type is actually a pointer.
- 
-template <class _Tp>
-struct __type_traits : __type_traits_aux<_IsPtr<_Tp>::_Ret> {};
-
-# else
-
-template <class _Tp>
-struct __type_traits { 
-   typedef __true_type     this_dummy_member_must_be_first;
-                   /* Do not remove this member. It informs a compiler which
-                      automatically specializes __type_traits that this
-                      __type_traits template is special. It just makes sure that
-                      things work if an implementation is using a template
-                      called __type_traits for something unrelated. */
-
-   /* The following restrictions should be observed for the sake of
-      compilers which automatically produce type specific specializations 
-      of this class:
-          - You may reorder the members below if you wish
-          - You may remove any of the members below if you wish
-          - You must not rename members without making the corresponding
-            name change in the compiler
-          - Members you add will be treated like regular members unless
-            you add the appropriate support in the compiler. */
-   typedef __false_type    has_trivial_default_constructor;
-   typedef __false_type    has_trivial_copy_constructor;
-   typedef __false_type    has_trivial_assignment_operator;
-   typedef __false_type    has_trivial_destructor;
-   typedef __false_type    is_POD_type;
-};
-
-
-template <class _Tp>  struct _IsPtr { enum { _Ret = 0 }; };
-template <class _Tp>  struct _IsPtrType { 
-  static __false_type _Ret() { return __false_type();} 
-};
-template <class _Tp1, class _Tp2>  struct _BothPtrType { 
-  static __false_type _Ret() { return __false_type();} 
-};
-
-template <class _Tp1, class _Tp2>
-struct _IsSame { enum { _Ret = 0 }; };
-
-// template <class _Tp1, class _Tp2>
-// struct _IsSameType {   static __false_type _Ret() { return __false_type(); }  };
-
-#  ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION
-template <class _Tp>  struct _IsPtr<_Tp*> { enum { _Ret = 1 }; };
-template <class _Tp>  struct _IsPtrType<_Tp*> { 
-  static __true_type _Ret() { return __true_type();} 
-};
-template <class _Tp1, class _Tp2>  struct _BothPtrType<_Tp1*, _Tp2*> { 
-  static __true_type _Ret() { return __true_type();} 
-};
-template <class _Tp>
-struct _IsSame<_Tp, _Tp> { enum { _Ret = 1 }; };
-#  endif
-
-# endif /* _STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS */
-
-// Provide some specializations.  This is harmless for compilers that
-//  have built-in __types_traits support, and essential for compilers
-//  that don't.
-#ifndef _STLP_NO_BOOL
-_STLP_TEMPLATE_NULL struct __type_traits<bool> : __type_traits_aux<1> {};
-#endif /* _STLP_NO_BOOL */
-_STLP_TEMPLATE_NULL struct __type_traits<char> : __type_traits_aux<1> {};
-#ifndef _STLP_NO_SIGNED_BUILTINS
-_STLP_TEMPLATE_NULL struct __type_traits<signed char> : __type_traits_aux<1> {};
-# endif
-_STLP_TEMPLATE_NULL struct __type_traits<unsigned char> : __type_traits_aux<1> {};
-#if defined ( _STLP_HAS_WCHAR_T ) && ! defined (_STLP_WCHAR_T_IS_USHORT)
-_STLP_TEMPLATE_NULL struct __type_traits<wchar_t> : __type_traits_aux<1> {};
-#endif /* _STLP_HAS_WCHAR_T */
-
-_STLP_TEMPLATE_NULL struct __type_traits<short> : __type_traits_aux<1> {};
-_STLP_TEMPLATE_NULL struct __type_traits<unsigned short> : __type_traits_aux<1> {};
-_STLP_TEMPLATE_NULL struct __type_traits<int> : __type_traits_aux<1> {};
-_STLP_TEMPLATE_NULL struct __type_traits<unsigned int> : __type_traits_aux<1> {};
-_STLP_TEMPLATE_NULL struct __type_traits<long> : __type_traits_aux<1> {};
-_STLP_TEMPLATE_NULL struct __type_traits<unsigned long> : __type_traits_aux<1> {};
-
-#ifdef _STLP_LONG_LONG
-_STLP_TEMPLATE_NULL struct __type_traits<_STLP_LONG_LONG> : __type_traits_aux<1> {};
-_STLP_TEMPLATE_NULL struct __type_traits<unsigned _STLP_LONG_LONG> : __type_traits_aux<1> {};
-#endif /* _STLP_LONG_LONG */
-
-_STLP_TEMPLATE_NULL struct __type_traits<float> : __type_traits_aux<1> {};
-_STLP_TEMPLATE_NULL struct __type_traits<double> : __type_traits_aux<1> {};
-
-# if !defined ( _STLP_NO_LONG_DOUBLE )
-_STLP_TEMPLATE_NULL struct __type_traits<long double> : __type_traits_aux<1> {};
-# endif
-
-#ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION
-template <class _Tp> struct __type_traits<_Tp*> : __type_traits_aux<1> {};
-#endif
-
-// The following could be written in terms of numeric_limits.  
-// We're doing it separately to reduce the number of dependencies.
-
-template <class _Tp> struct _Is_integer {
-  typedef __false_type _Integral;
-};
-
-#ifndef _STLP_NO_BOOL
-
-_STLP_TEMPLATE_NULL struct _Is_integer<bool> {
-  typedef __true_type _Integral;
-};
-
-#endif /* _STLP_NO_BOOL */
-
-_STLP_TEMPLATE_NULL struct _Is_integer<char> {
-  typedef __true_type _Integral;
-};
-
-#ifndef _STLP_NO_SIGNED_BUILTINS
-
-_STLP_TEMPLATE_NULL struct _Is_integer<signed char> {
-  typedef __true_type _Integral;
-};
-#endif
-
-_STLP_TEMPLATE_NULL struct _Is_integer<unsigned char> {
-  typedef __true_type _Integral;
-};
-
-#if defined ( _STLP_HAS_WCHAR_T ) && ! defined (_STLP_WCHAR_T_IS_USHORT)
-
-_STLP_TEMPLATE_NULL struct _Is_integer<wchar_t> {
-  typedef __true_type _Integral;
-};
-
-#endif /* _STLP_HAS_WCHAR_T */
-
-_STLP_TEMPLATE_NULL struct _Is_integer<short> {
-  typedef __true_type _Integral;
-};
-
-_STLP_TEMPLATE_NULL struct _Is_integer<unsigned short> {
-  typedef __true_type _Integral;
-};
-
-_STLP_TEMPLATE_NULL struct _Is_integer<int> {
-  typedef __true_type _Integral;
-};
-
-_STLP_TEMPLATE_NULL struct _Is_integer<unsigned int> {
-  typedef __true_type _Integral;
-};
-
-_STLP_TEMPLATE_NULL struct _Is_integer<long> {
-  typedef __true_type _Integral;
-};
-
-_STLP_TEMPLATE_NULL struct _Is_integer<unsigned long> {
-  typedef __true_type _Integral;
-};
-
-#ifdef _STLP_LONG_LONG
-
-_STLP_TEMPLATE_NULL struct _Is_integer<_STLP_LONG_LONG> {
-  typedef __true_type _Integral;
-};
-
-_STLP_TEMPLATE_NULL struct _Is_integer<unsigned _STLP_LONG_LONG> {
-  typedef __true_type _Integral;
-};
-
-#endif /* _STLP_LONG_LONG */
-
-template <class _Tp1, class _Tp2>
-struct _OKToMemCpy {
-  enum { _Same = _IsSame<_Tp1,_Tp2>::_Ret } ;
-  typedef typename __type_traits<_Tp1>::has_trivial_assignment_operator _Tr1;
-  typedef typename __type_traits<_Tp2>::has_trivial_assignment_operator _Tr2;
-  typedef typename __bool2type< _Same >::_Ret _Tr3;
-  typedef typename _Land3<_Tr1, _Tr2, _Tr3>::_Ret _Type;
-  static _Type _Ret() { return _Type(); }
-};
-
-template <class _Tp1, class _Tp2>
-inline _OKToMemCpy<_Tp1, _Tp2> _IsOKToMemCpy(_Tp1*, _Tp2*)  {
-  return _OKToMemCpy<_Tp1, _Tp2>();
-}
-
-template <class _Tp> 
-struct _IsPOD {
-  typedef typename __type_traits<_Tp>::is_POD_type _Type;
-  static _Type _Ret() { return _Type(); }
-};
-
-template <class _Tp> 
-inline _IsPOD<_Tp>  _Is_POD (_Tp*) { return _IsPOD<_Tp>(); } 
-
-#  ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION
-#   if defined (__BORLANDC__) || defined (__SUNPRO_CC) || ( defined (__MWERKS__) && (__MWERKS__ <= 0x2303)) || ( defined (__sgi) && defined (_COMPILER_VERSION)) || defined (__DMC__)
-#   define _IS_POD_ITER(_It, _Tp) __type_traits< typename iterator_traits< _Tp >::value_type >::is_POD_type()
-#   else
-#   define _IS_POD_ITER(_It, _Tp) typename __type_traits< typename iterator_traits< _Tp >::value_type >::is_POD_type()
-#   endif
-#  else
-#   define _IS_POD_ITER(_It, _Tp) _Is_POD( _STLP_VALUE_TYPE( _It, _Tp ) )._Ret()
-#  endif
-
-# ifdef _STLP_DEFAULT_CONSTRUCTOR_BUG
-// Those adaptors are here to fix common compiler bug regarding builtins:
-// expressions like int k = int() should initialize k to 0
-template <class _Tp>
-inline _Tp __default_constructed_aux(_Tp*, const __false_type&) {
-  return _Tp();
-}
-template <class _Tp>
-inline _Tp __default_constructed_aux(_Tp*, const __true_type&) {
-  return _Tp(0);
-}
-
-template <class _Tp>
-inline _Tp __default_constructed(_Tp* __p) {
-  typedef typename _Is_integer<_Tp>::_Integral _Is_Integral;
-  return __default_constructed_aux(__p, _Is_Integral());
-}
-
-#  define _STLP_DEFAULT_CONSTRUCTED(_TTp) __default_constructed((_TTp*)0)
-# else
-#  define _STLP_DEFAULT_CONSTRUCTED(_TTp) _TTp()
-# endif
-
-_STLP_END_NAMESPACE
-
-#endif /* __TYPE_TRAITS_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/stl/wrappers/_deque.h b/src/STLport/stl/wrappers/_deque.h
deleted file mode 100644
index 0a79713..0000000
--- a/src/STLport/stl/wrappers/_deque.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_INTERNAL_DEQUE_H
-# include <stl/_deque.h>
-#endif
-
-# if defined (_STLP_DEBUG)
-#  define _DEQUE_SUPER_NAME _DBG_deque
-# else
-#  define _DEQUE_SUPER_NAME __deque__
-# endif
-
-# define _DEQUE_SUPER   _DEQUE_SUPER_NAME<_Tp, _STLP_DEFAULT_ALLOCATOR(_Tp) >
-
-_STLP_BEGIN_NAMESPACE
-
-// provide a "default" deque adaptor
-template <class _Tp>
-class deque : public _DEQUE_SUPER {
-public:
-  typedef deque<_Tp> _Self;
-  typedef _DEQUE_SUPER _Super;
-  __IMPORT_WITH_REVERSE_ITERATORS(_Super)
-    __IMPORT_SUPER_COPY_ASSIGNMENT(deque, _Self, _DEQUE_SUPER)
-    deque() : _DEQUE_SUPER() { }
-  deque(size_type __n, const _Tp& __value) : _DEQUE_SUPER(__n, __value) { }
-  explicit deque(size_type __n) : _DEQUE_SUPER(__n) { }
-  deque(const _Tp* __first, const _Tp* __last) : _DEQUE_SUPER(__first, __last) { }
-  deque(const_iterator __first, const_iterator __last) : _DEQUE_SUPER(__first, __last) { }
-  ~deque() { }
-};
-
-#  if defined (_STLP_BASE_MATCH_BUG)
-template <class _Tp>
-inline bool 
-operator==(const deque<_Tp>& __x, const deque<_Tp>& __y) {
-    return __x.size() == __y.size() && equal(__x.begin(), __x.end(), __y.begin());
-}
-
-template <class _Tp>
-inline bool 
-operator<(const deque<_Tp>& __x, const deque<_Tp>& __y) {
-    return lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end());
-}
-#  endif /* BASE_MATCH_BUG */
-
-# undef _DEQUE_SUPER
-
-_STLP_END_NAMESPACE  
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/wrappers/_hash_map.h b/src/STLport/stl/wrappers/_hash_map.h
deleted file mode 100644
index 952f3e5..0000000
--- a/src/STLport/stl/wrappers/_hash_map.h
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Copyright (c) 1999, 2000
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_WRAP_HASH_MAP_H
-#define _STLP_INTERNAL_WRAP_HASH_MAP_H
-
-#ifndef _STLP_INTERNAL_HASH_MAP_H
-# include <stl/_hash_map.h>
-#endif
-
-# ifdef _STLP_USE_NAMESPACES
-namespace STLPORT { 
-# endif
-
-// provide a "default" hash_map adaptor
-#  if defined (_STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS)
-#   define __HM_TEMPLATE_HEADER  template <class _Key, class _Tp>
-#   define __HM_ARGUMENTS        _Key, _Tp
-#   define __HM_BASE_ARGUMENTS   _Key, _Tp, hash<_Key>, equal_to<_Key>, _STLP_DEFAULT_PAIR_ALLOCATOR(const _Key, _Tp)
-#  else
-#   define __HM_TEMPLATE_HEADER  template <class _Key, class _Tp, class _HashFcn, class _EqualKey >
-#   define __HM_ARGUMENTS        _Key, _Tp, _HashFcn, _EqualKey
-#   define __HM_BASE_ARGUMENTS   _Key, _Tp, _HashFcn, _EqualKey, _STLP_DEFAULT_PAIR_ALLOCATOR(const _Key, _Tp)
-#  endif
-
-
-# define __HM_SUPER  __hash_map< __HM_BASE_ARGUMENTS >
-# define __HMM_SUPER __hash_multimap< __HM_BASE_ARGUMENTS >
-
-__HM_TEMPLATE_HEADER
-class hash_map : public __HM_SUPER
-{
-  typedef hash_map< __HM_ARGUMENTS > _Self;
-public:
-  typedef __HM_SUPER _Super;
-  __IMPORT_WITH_ITERATORS(_Super)
-  typedef typename _Super::key_type key_type;
-  typedef typename _Super::hasher hasher;
-  typedef typename _Super::key_equal key_equal;
-  typedef _Tp data_type;
-  hash_map() {}
-  hash_map(size_type __n) : __HM_SUPER(__n) {}
-  hash_map(size_type __n, const hasher& __hf) : __HM_SUPER(__n, __hf) {}
-  hash_map(size_type __n, const hasher& __hf, const key_equal& __eql): __HM_SUPER(__n, __hf, __eql) {}
-  hash_map(const value_type* __f, const value_type* __l) : __HM_SUPER(__f,__l) {}
-  hash_map(const value_type* __f, const value_type* __l, size_type __n): __HM_SUPER(__f,__l,__n) {}
-  hash_map(const value_type* __f, const value_type* __l, size_type __n, 
-           const hasher& __hf) : __HM_SUPER(__f,__l,__n,__hf) {}
-  hash_map(const value_type* __f, const value_type* __l, size_type __n,
-           const hasher& __hf, const key_equal& __eql) : __HM_SUPER(__f,__l,__n,__hf, __eql) {}
-  hash_map(const_iterator __f, const_iterator __l) : __HM_SUPER(__f,__l) { }
-  hash_map(const_iterator __f, const_iterator __l, size_type __n) : __HM_SUPER(__f,__l,__n) { }
-  hash_map(const_iterator __f, const_iterator __l, size_type __n,
-           const hasher& __hf) : __HM_SUPER(__f, __l, __n, __hf) { }
-  hash_map(const_iterator __f, const_iterator __l, size_type __n,
-           const hasher& __hf, const key_equal& __eql) : __HM_SUPER(__f, __l, __n, __hf, __eql) { }
-# if defined (_STLP_BASE_MATCH_BUG)
-  friend inline bool operator== _STLP_NULL_TMPL_ARGS (const _Self& __hm1, const _Self& __hm2);
-# endif
-};
-
-
-# if defined (_STLP_BASE_MATCH_BUG)
-__HM_TEMPLATE_HEADER
-inline bool operator==(const hash_map< __HM_ARGUMENTS >& __hm1, 
-                       const hash_map< __HM_ARGUMENTS >& __hm2)
-{
-    typedef __HM_SUPER _Super;
-    return (const _Super&)__hm1 == (const _Super&)__hm2; 
-}
-# endif
-
-// provide a "default" hash_multimap adaptor
-__HM_TEMPLATE_HEADER
-class hash_multimap : public __HMM_SUPER
-{
-  typedef hash_multimap< __HM_ARGUMENTS > _Self;
-public:
-  typedef __HMM_SUPER _Super;
-  __IMPORT_WITH_ITERATORS(_Super)
-  typedef typename _Super::key_type key_type;
-  typedef typename _Super::hasher hasher;
-  typedef typename _Super::key_equal key_equal;
-  typedef _Tp data_type;
-  hash_multimap() {}
-  hash_multimap(size_type __n) : __HMM_SUPER(__n) {}
-  hash_multimap(size_type __n, const hasher& __hf) : __HMM_SUPER(__n, __hf) {}
-  hash_multimap(size_type __n, const hasher& __hf, const key_equal& __eql): __HMM_SUPER(__n, __hf, __eql) {}
-  hash_multimap(const value_type* __f, const value_type* __l) : __HMM_SUPER(__f,__l) {}
-  hash_multimap(const value_type* __f, const value_type* __l, size_type __n): __HMM_SUPER(__f,__l,__n) {}
-  hash_multimap(const value_type* __f, const value_type* __l, size_type __n, 
-           const hasher& __hf) : __HMM_SUPER(__f,__l,__n,__hf) {}
-  hash_multimap(const value_type* __f, const value_type* __l, size_type __n,
-           const hasher& __hf, const key_equal& __eql) : __HMM_SUPER(__f,__l,__n,__hf, __eql) {}
-
-  hash_multimap(const_iterator __f, const_iterator __l) : __HMM_SUPER(__f,__l) { }
-  hash_multimap(const_iterator __f, const_iterator __l, size_type __n) : __HMM_SUPER(__f,__l,__n) { }
-  hash_multimap(const_iterator __f, const_iterator __l, size_type __n,
-           const hasher& __hf) : __HMM_SUPER(__f, __l, __n, __hf) { }
-  hash_multimap(const_iterator __f, const_iterator __l, size_type __n,
-           const hasher& __hf, const key_equal& __eql) : __HMM_SUPER(__f, __l, __n, __hf, __eql) { }
-# if defined (_STLP_BASE_MATCH_BUG)
-  friend inline bool operator== _STLP_NULL_TMPL_ARGS (const _Self& __hm1, const _Self& __hm2);
-# endif
-};
-
-# if defined (_STLP_BASE_MATCH_BUG)
-__HM_TEMPLATE_HEADER
-inline bool operator==(const hash_multimap< __HM_ARGUMENTS >& __hm1, 
-                       const hash_multimap< __HM_ARGUMENTS >& __hm2)
-{
-    typedef __HMM_SUPER _Super;
-    return (const _Super&)__hm1 == (const _Super&)__hm2; 
-}
-# endif
-
-# undef __HM_SUPER
-# undef __HMM_SUPER
-# undef __HM_TEMPLATE_HEADER
-# undef __HM_ARGUMENTS
-# undef __HM_BASE_ARGUMENTS
-
-# ifdef _STLP_USE_NAMESPACES
-} /* namespace STLPORT */
-# endif
-
-#endif /* _STLP_INTERNAL_HASH_SET_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/wrappers/_hash_set.h b/src/STLport/stl/wrappers/_hash_set.h
deleted file mode 100644
index e5af83c..0000000
--- a/src/STLport/stl/wrappers/_hash_set.h
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Copyright (c) 1999, 2000
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_WRAP_HASH_SET_H
-#define _STLP_INTERNAL_WRAP_HASH_SET_H
-
-#ifndef _STLP_INTERNAL_HASH_SET_H
-# include <stl/_hash_set.h>
-#endif
-
-# ifdef _STLP_USE_NAMESPACES
-namespace STLPORT { 
-# endif
-
-#  if defined (_STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS)
-#   define __HS_TEMPLATE_HEADER  template <class _Value>
-#   define __HS_ARGUMENTS        _Value
-#   define __HS_BASE_ARGUMENTS   _Value, hash<_Value>, equal_to<_Value>, _STLP_DEFAULT_ALLOCATOR(_Value)
-#  else
-#   define __HS_TEMPLATE_HEADER  template <class _Value, class _HashFcn, class _EqualKey >
-#   define __HS_ARGUMENTS        _Value, _HashFcn, _EqualKey
-#   define __HS_BASE_ARGUMENTS   _Value, _HashFcn, _EqualKey, _STLP_DEFAULT_ALLOCATOR(_Value)
-#  endif
-
-
-#  define __HS_SUPER  __hash_set< __HS_BASE_ARGUMENTS >
-#  define __HMS_SUPER __hash_multiset< __HS_BASE_ARGUMENTS >
-
-
-// provide a "default" hash_set adaptor
-__HS_TEMPLATE_HEADER
-class hash_set : public __HS_SUPER 
-{
-  typedef hash_set< __HS_ARGUMENTS > _Self;
-public:
-  typedef  __HS_SUPER _Super;
-  __IMPORT_WITH_ITERATORS(_Super)
-  typedef typename _Super::key_type key_type;
-  typedef typename _Super::hasher hasher;
-  typedef typename _Super::key_equal key_equal;
-  hash_set() {}
-  hash_set(size_type n) : __HS_SUPER(n) {}
-  hash_set(size_type n, const hasher& hf) : __HS_SUPER(n, hf) {}
-  hash_set(size_type n, const hasher& hf, const key_equal& eql): __HS_SUPER(n, hf, eql) {}
-
-  hash_set(const value_type* f, const value_type* l) : __HS_SUPER(f,l) {}
-  hash_set(const value_type* f, const value_type* l, size_type n): __HS_SUPER(f,l,n) {}
-  hash_set(const value_type* f, const value_type* l, size_type n,
-           const hasher& hf) : __HS_SUPER(f,l,n,hf) {}
-  hash_set(const value_type* f, const value_type* l, size_type n,
-           const hasher& hf, const key_equal& eql) : __HS_SUPER(f,l,n,hf, eql) {}
-
-  hash_set(const_iterator f, const_iterator l) : __HS_SUPER(f,l) { }
-  hash_set(const_iterator f, const_iterator l, size_type n) : __HS_SUPER(f,l,n) { }
-  hash_set(const_iterator f, const_iterator l, size_type n,
-           const hasher& hf) : __HS_SUPER(f, l, n, hf) { }
-  hash_set(const_iterator f, const_iterator l, size_type n,
-           const hasher& hf, const key_equal& eql) : __HS_SUPER(f, l, n, hf, eql) { }
-# if defined (_STLP_BASE_MATCH_BUG)
-    friend inline bool operator== _STLP_NULL_TMPL_ARGS (const _Self& hs1, const _Self& hs2);
-# endif
-};
-
-# if defined (_STLP_BASE_MATCH_BUG)
-__HS_TEMPLATE_HEADER
-inline bool operator==(const hash_set< __HS_ARGUMENTS >& hs1, 
-                       const hash_set< __HS_ARGUMENTS >& hs2)
-{
-    typedef __HS_SUPER _Super;
-    return (const _Super&)hs1 == (const _Super&)hs2; 
-}
-# endif
-
-// provide a "default" hash_multiset adaptor
-__HS_TEMPLATE_HEADER
-class hash_multiset : public __HMS_SUPER
-{
-  typedef hash_multiset< __HS_ARGUMENTS > _Self;
-public:
-  typedef __HMS_SUPER _Super;
-  __IMPORT_WITH_ITERATORS(_Super)
-  typedef typename _Super::key_type key_type;
-  typedef typename _Super::hasher hasher;
-  typedef typename _Super::key_equal key_equal;
-
-  hash_multiset() {}
-  hash_multiset(size_type __n) : __HMS_SUPER(__n) {}
-  hash_multiset(size_type __n, const hasher& __hf) : __HMS_SUPER(__n, __hf) {}
-  hash_multiset(size_type __n, const hasher& __hf, const key_equal& __eql): __HMS_SUPER(__n, __hf, __eql) {}
-
-  hash_multiset(const value_type* __f, const value_type* __l) : __HMS_SUPER(__f,__l) {}
-  hash_multiset(const value_type* __f, const value_type* __l, size_type __n): __HMS_SUPER(__f,__l,__n) {}
-  hash_multiset(const value_type* __f, const value_type* __l, size_type __n,
-           const hasher& __hf) : __HMS_SUPER(__f,__l,__n,__hf) {}
-  hash_multiset(const value_type* __f, const value_type* __l, size_type __n,
-           const hasher& __hf, const key_equal& __eql) : __HMS_SUPER(__f,__l,__n,__hf, __eql) {}
-
-  hash_multiset(const_iterator __f, const_iterator __l) : __HMS_SUPER(__f,__l) { }
-  hash_multiset(const_iterator __f, const_iterator __l, size_type __n) : __HMS_SUPER(__f,__l,__n) { }
-  hash_multiset(const_iterator __f, const_iterator __l, size_type __n,
-           const hasher& __hf) : __HMS_SUPER(__f, __l, __n, __hf) { }
-  hash_multiset(const_iterator __f, const_iterator __l, size_type __n,
-           const hasher& __hf, const key_equal& __eql) : __HMS_SUPER(__f, __l, __n, __hf, __eql) { }
-# if defined (_STLP_BASE_MATCH_BUG)
-  friend inline bool operator== _STLP_NULL_TMPL_ARGS (const _Self& __hs1, const _Self& __hs2);
-# endif
-};
-
-# if defined (_STLP_BASE_MATCH_BUG)
-__HS_TEMPLATE_HEADER
-inline bool operator==(const hash_multiset< __HS_ARGUMENTS >& __hs1, 
-                       const hash_multiset< __HS_ARGUMENTS >& __hs2)
-{
-    typedef __HMS_SUPER  __s;
-    return _STLP_STD::operator==((const __s&)__hs1,(const __s&)__hs2);
-}
-# endif
-
-
-# undef __HS_SUPER
-# undef __HMS_SUPER
-# undef __HS_ARGUMENTS
-# undef __HS_BASE_ARGUMENTS
-# undef __HS_TEMPLATE_HEADER
-
-# ifdef _STLP_USE_NAMESPACES
-} /* namespace STLPORT */
-# endif
-
-#endif /* _STLP_INTERNAL_HASH_SET_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/wrappers/_list.h b/src/STLport/stl/wrappers/_list.h
deleted file mode 100644
index 4baf5be..0000000
--- a/src/STLport/stl/wrappers/_list.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_WRAP_LIST_H
-#define _STLP_INTERNAL_WRAP_LIST_H
-
-#ifndef _STLP_INTERNAL_LIST_H
-# include <stl/_list.h>
-#endif
-
-# ifdef _STLP_USE_NAMESPACES
-namespace STLPORT { 
-# endif
-
-# if defined (_STLP_DEBUG)
-#  define __LIST_SUPER _DBG_list<_Tp, _STLP_DEFAULT_ALLOCATOR(_Tp) >
-# else
-#  define __LIST_SUPER __list__<_Tp, _STLP_DEFAULT_ALLOCATOR(_Tp) >
-# endif
-
-
-// provide a "default" list adaptor
-template <class _Tp>
-class list : public __LIST_SUPER
-{
-public:
-    typedef __LIST_SUPER _Super;
-    __IMPORT_WITH_REVERSE_ITERATORS(_Super)
-    __IMPORT_SUPER_COPY_ASSIGNMENT(list, list<_Tp>, __LIST_SUPER)
-    list() { }
-    explicit list(size_type __n, const _Tp& __value) : __LIST_SUPER(__n, __value) { }
-    explicit list(size_type __n) :  __LIST_SUPER(__n) { } 
-    list(const _Tp* __first, const _Tp* __last) : __LIST_SUPER(__first, __last) { } 
-    list(const_iterator __first, const_iterator __last) : __LIST_SUPER(__first, __last) { }
-# undef __LIST_SUPER
-};
-
-#  if defined (_STLP_BASE_MATCH_BUG)
-template <class _Tp>
-inline bool operator==(const list<_Tp>& __x, const list<_Tp>& __y) {
-    typedef typename list<_Tp>::_Super _Super;
-    return operator == ((const _Super&)__x,(const _Super&)__y);
-}
-
-template <class _Tp>
-inline bool operator<(const list<_Tp>& __x, const list<_Tp>& __y) {
-  return lexicographical_compare(__x.begin(), __x.end(),
-                                 __y.begin(), __y.end());
-}
-#  endif
-
-# ifdef _STLP_USE_NAMESPACES
-} /* namespace STLPORT */
-# endif
-
-#endif /* _STLP_INTERNAL_LIST_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/wrappers/_map.h b/src/STLport/stl/wrappers/_map.h
deleted file mode 100644
index 3ad9940..0000000
--- a/src/STLport/stl/wrappers/_map.h
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Copyright (c) 1999, 2000
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_WRAP_MAP_H
-#define _STLP_INTERNAL_WRAP_MAP_H
-
-#ifndef _STLP_INTERNAL_MAP_H
-# include <stl/_map.h>
-#endif
-
-# ifdef _STLP_USE_NAMESPACES
-namespace STLPORT { 
-# endif
-
-#  if defined (_STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS)
-#   define __MAP_TEMPLATE_HEADER  template <class _Key, class _Tp>
-#   define __MAP_ARGUMENTS        _Key, _Tp
-#   define __MMAP_TEMPLATE_HEADER  template <class _Key, class _Tp>
-#   define __MMAP_ARGUMENTS        _Key, _Tp
-#   define _Compare less<_Key>
-#  else
-#   define __MAP_TEMPLATE_HEADER  template <class _Key, class _Tp, class _Compare >
-#   define __MAP_ARGUMENTS        _Key, _Tp, _Compare
-#   define __MMAP_TEMPLATE_HEADER  template <class _Key, class _Tp, class _Compare >
-#   define __MMAP_ARGUMENTS        _Key, _Tp, _Compare
-#  endif
-
-
-#  define __MAP_SUPER  __map< _Key, _Tp, _Compare, _STLP_DEFAULT_PAIR_ALLOCATOR(const _Key, _Tp) >
-#  define __MMAP_SUPER  __multimap< _Key, _Tp, _Compare, _STLP_DEFAULT_PAIR_ALLOCATOR(const _Key, _Tp) >
-
-// provide a "default" map adaptor
-__MAP_TEMPLATE_HEADER
-class map : public __MAP_SUPER
-{
-  typedef map< __MAP_ARGUMENTS > _Self;
-public:
-    typedef __MAP_SUPER _Super;
-    __IMPORT_WITH_REVERSE_ITERATORS(_Super)
-    __IMPORT_SUPER_COPY_ASSIGNMENT(map, _Self, __MAP_SUPER)
-    map() : __MAP_SUPER(_Compare()) {}
-    explicit map(const _Compare& __comp) : __MAP_SUPER(__comp) {}
-    map(const typename _Super::value_type* __first, 
-	const typename _Super::value_type* __last) : 
-      __MAP_SUPER(__first, __last, _Compare()) { }
-    map(const typename _Super::value_type* __first, 
-	const typename _Super::value_type* __last, 
-        const _Compare& __comp) : __MAP_SUPER(__first, __last, __comp) { }
-    map(typename _Super::const_iterator __first, 
-	typename _Super::const_iterator __last) : 
-        __MAP_SUPER(__first, __last, _Compare()) { }
-    map(typename _Super::const_iterator __first, 
-	typename _Super::const_iterator __last, 
-        const _Compare& __comp) : __MAP_SUPER(__first, __last, __comp) { }
-};
-
-#  if defined (_STLP_BASE_MATCH_BUG)
-__MAP_TEMPLATE_HEADER
-inline bool operator==(const map< __MAP_ARGUMENTS >& __x, 
-                       const map< __MAP_ARGUMENTS >& __y) {
-  typedef __MAP_SUPER _Super;
-  return operator==((const _Super&)__x,(const _Super&)__y);
-}
-
-__MAP_TEMPLATE_HEADER
-inline bool operator<(const map< __MAP_ARGUMENTS >& __x, 
-                      const map< __MAP_ARGUMENTS >& __y) {
-  typedef __MAP_SUPER _Super;
-  return operator < ((const _Super&)__x,(const _Super&)__y);
-}
-#  endif /* _STLP_BASE_MATCH_BUG */
-
-
-// provide a "default" multimap adaptor
-__MMAP_TEMPLATE_HEADER
-class multimap : public __MMAP_SUPER
-{
-  typedef multimap< __MMAP_ARGUMENTS > _Self;
-public:
-    typedef __MMAP_SUPER  _Super;
-    __IMPORT_WITH_REVERSE_ITERATORS(_Super)
-    // copy & assignment from super
-    __IMPORT_SUPER_COPY_ASSIGNMENT(multimap, _Self, __MMAP_SUPER)
-    multimap() : __MMAP_SUPER(_Compare()) {}
-    explicit multimap(const _Compare& __comp) : __MMAP_SUPER(__comp) {}
-    multimap(const typename _Super::value_type* __first, 
-	     const typename _Super::value_type* __last) : 
-        __MMAP_SUPER(__first, __last, _Compare()) { }
-    multimap(const typename _Super::value_type* __first,
-	     const typename _Super::value_type* __last, 
-	     const _Compare& __comp) : __MMAP_SUPER(__first, __last, __comp) { }
-    multimap(typename _Super::const_iterator __first, 
-	     typename _Super::const_iterator __last) : 
-      __MMAP_SUPER(__first, __last, _Compare()) { }
-    multimap(typename _Super::const_iterator __first, 
-	     typename _Super::const_iterator __last, 
-	     const _Compare& __comp) : __MMAP_SUPER(__first, __last, __comp) { }
-};
-
-#  if defined (_STLP_BASE_MATCH_BUG)
-__MMAP_TEMPLATE_HEADER
-inline bool operator==(const multimap< __MMAP_ARGUMENTS >& __x, 
-                       const multimap< __MMAP_ARGUMENTS >& __y) {
-  typedef __MMAP_SUPER  _Super;
-  return (const _Super&)__x == (const _Super&)__y;
-}
-
-__MMAP_TEMPLATE_HEADER
-inline bool operator<(const multimap< __MMAP_ARGUMENTS >& __x, 
-                      const multimap< __MMAP_ARGUMENTS >& __y) {
-  typedef __MMAP_SUPER  _Super;
-  return (const _Super&)__x < (const _Super&)__y;
-}
-#  endif
-
-# undef __MMAP_TEMPLATE_HEADER
-# undef __MMAP_ARGUMENTS
-# undef __MMAP_SUPER
-
-# undef __MAP_TEMPLATE_HEADER
-# undef __MAP_ARGUMENTS
-# undef __MAP_SUPER
-
-# undef _Compare
-
-# ifdef _STLP_USE_NAMESPACES
-} /* namespace STLPORT */
-# endif
-
-#endif /* _STLP_INTERNAL_WRAP_MAP_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/wrappers/_mmap.h b/src/STLport/stl/wrappers/_mmap.h
deleted file mode 100644
index 49a32f6..0000000
--- a/src/STLport/stl/wrappers/_mmap.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 1999, 2000
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_WRAP_MULTIMAP_H
-#define _STLP_INTERNAL_WRAP_MULTIMAP_H
-
-# ifdef _STLP_USE_NAMESPACES
-namespace STLPORT { 
-# endif
-
-#  if defined (_STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS)
-#   define _Compare less<_Key>
-#  else
-#  endif
-
-# if defined (_STLP_DEBUG) && ! defined (_STLP_USE_NAMESPACES)
-# else
-
-# endif
-
-
-# ifdef _STLP_USE_NAMESPACES
-} /* namespace STLPORT */
-# endif
-
-#endif /* _STLP_INTERNAL_WRAP_MULTIMAP_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/wrappers/_set.h b/src/STLport/stl/wrappers/_set.h
deleted file mode 100644
index 3785cc1..0000000
--- a/src/STLport/stl/wrappers/_set.h
+++ /dev/null
@@ -1,141 +0,0 @@
-/*
- * Copyright (c) 1999, 2000
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_WRAP_SET_H
-#define _STLP_INTERNAL_WRAP_SET_H
-
-#ifndef _STLP_INTERNAL_SET_H
-# include <stl/_set.h>
-#endif
-
-# ifdef _STLP_USE_NAMESPACES
-namespace STLPORT { 
-# endif
-
-#  if defined (_STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS)
-#   define __SET_TEMPLATE_HEADER  template <class _Key>
-#   define __SET_ARGUMENTS        _Key
-#   define __MSET_TEMPLATE_HEADER  template <class _Key>
-#   define __MSET_ARGUMENTS        _Key
-#   define _Compare less<_Key>
-#  else
-#   define __SET_TEMPLATE_HEADER  template <class _Key, class _Compare >
-#   define __SET_ARGUMENTS        _Key, _Compare
-#   define __MSET_TEMPLATE_HEADER  template <class _Key, class _Compare >
-#   define __MSET_ARGUMENTS        _Key, _Compare
-#  endif
-
-#   define __SET_SUPER  __set< _Key, _Compare, _STLP_DEFAULT_ALLOCATOR(_Key) >
-#   define __MSET_SUPER __multiset< _Key, _Compare, _STLP_DEFAULT_ALLOCATOR(_Key) >
-
-// provide a "default" set adaptor
-__SET_TEMPLATE_HEADER
-class set : public __SET_SUPER
-{
-  typedef set< __SET_ARGUMENTS > _Self;
-public:
-    typedef __SET_SUPER _Super;
-    __IMPORT_WITH_REVERSE_ITERATORS(_Super)
-    // copy & assignment from super
-    __IMPORT_SUPER_COPY_ASSIGNMENT(set,_Self,__SET_SUPER)
-    // specific constructors
-    explicit set() : __SET_SUPER(_Compare()) {}
-    explicit set(const _Compare& __comp) : __SET_SUPER(__comp) {}
-    set(const value_type* __first, const value_type* __last) : 
-        __SET_SUPER(__first, __last, _Compare()) { }
-    set(const value_type* __first, const value_type* __last, 
-        const _Compare& __comp) : __SET_SUPER(__first, __last, __comp) { }
-    set(const_iterator __first, const_iterator __last) : 
-        __SET_SUPER(__first, __last, _Compare()) { }
-    set(const_iterator __first, const_iterator __last, 
-        const _Compare& __comp) : __SET_SUPER(__first, __last, __comp) { }
-};
-
-#  if defined (_STLP_BASE_MATCH_BUG)
-__SET_TEMPLATE_HEADER 
-inline bool operator==(const set< __SET_ARGUMENTS >& __x, 
-                       const set< __SET_ARGUMENTS >& __y) {
-  typedef __SET_SUPER _Super;
-  return operator==((const _Super&)__x,(const _Super&)__y);
-}
-
-__SET_TEMPLATE_HEADER 
-inline bool operator<(const set< __SET_ARGUMENTS >& __x, 
-                      const set< __SET_ARGUMENTS >& __y) {
-  typedef __SET_SUPER _Super;
-  return operator < ((const _Super&)__x , (const _Super&)__y);
-}
-#  endif
-
-// provide a "default" multiset adaptor
-__MSET_TEMPLATE_HEADER 
-class multiset : public __MSET_SUPER
-{
-    typedef multiset< __MSET_ARGUMENTS > _Self;
-public:
-    typedef __MSET_SUPER _Super;
-    __IMPORT_WITH_REVERSE_ITERATORS(_Super)
-    // copy & assignment from super
-    __IMPORT_SUPER_COPY_ASSIGNMENT(multiset, _Self, __MSET_SUPER)
-    explicit multiset() : __MSET_SUPER(_Compare()) {}
-    explicit multiset(const _Compare& __comp) : __MSET_SUPER(__comp) {}
-    multiset(const value_type* __first, const value_type* __last) : 
-        __MSET_SUPER(__first, __last, _Compare()) { }
-    multiset(const value_type* __first, const value_type* __last, 
-        const _Compare& __comp) : __MSET_SUPER(__first, __last, __comp) { }
-    multiset(const_iterator __first, const_iterator __last) : 
-        __MSET_SUPER(__first, __last, _Compare()) { }
-    multiset(const_iterator __first, const_iterator __last, 
-        const _Compare& __comp) : __MSET_SUPER(__first, __last, __comp) { }
-};
-
-#  if defined (_STLP_BASE_MATCH_BUG)   
-__MSET_TEMPLATE_HEADER 
-inline bool operator==(const multiset< __MSET_ARGUMENTS >& __x, 
-                       const multiset< __MSET_ARGUMENTS >& __y) {
-  typedef __MSET_SUPER  _Super;
-  return (const _Super&)__x == (const _Super&)__y;
-}
-
-__MSET_TEMPLATE_HEADER 
-inline bool operator<(const multiset< __MSET_ARGUMENTS >& __x, 
-                      const multiset< __MSET_ARGUMENTS >& __y) {
-  typedef __MSET_SUPER _Super;
-  return (const _Super&)__x < (const _Super&)__y;
-}
-#  endif
-
-# undef __MSET_TEMPLATE_HEADER
-# undef __MSET_ARGUMENTS
-# undef __MSET_SUPER
-
-# undef __SET_TEMPLATE_HEADER
-# undef __SET_ARGUMENTS
-# undef __SET_SUPER 
-# undef _Compare
-
-# ifdef _STLP_USE_NAMESPACES
-} /* namespace STLPORT */
-# endif
-
-#endif /* _STLP_INTERNAL_WRAP_SET_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/wrappers/_slist.h b/src/STLport/stl/wrappers/_slist.h
deleted file mode 100644
index ffa8de1..0000000
--- a/src/STLport/stl/wrappers/_slist.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_WRAP_SLIST_H
-#define _STLP_INTERNAL_WRAP_SLIST_H
-
-#ifndef _STLP_INTERNAL_SLIST_H
-# include <stl/_slist.h>
-#endif
-
-# if defined (_STLP_DEBUG)
-#  define __SL_SUPER _DBG_slist<_Tp, _STLP_DEFAULT_ALLOCATOR(_Tp) >
-# else
-#  define __SL_SUPER __slist__<_Tp, _STLP_DEFAULT_ALLOCATOR(_Tp) >
-# endif
-
-
-# ifdef _STLP_USE_NAMESPACES
-namespace STLPORT { 
-# endif
- 
-// provide a "default" list adaptor
-template <class _Tp>
-class slist : public  __SL_SUPER
-{
-public:
-    typedef __SL_SUPER _Super;
-    __IMPORT_WITH_ITERATORS(_Super)
-    __IMPORT_SUPER_COPY_ASSIGNMENT(slist, slist<_Tp>, __SL_SUPER)
-    slist() { }
-    explicit slist(size_type __n, const _Tp& __value) : __SL_SUPER(__n, __value) { }
-    explicit slist(size_type __n) :  __SL_SUPER(__n) { } 
-    slist(const _Tp* __first, const _Tp* __last) : __SL_SUPER(__first, __last) { } 
-    slist(const_iterator __first, const_iterator __last) : __SL_SUPER(__first, __last) { }
-};
-
-#  if defined (_STLP_BASE_MATCH_BUG)
-template <class _Tp>
-inline bool operator==(const slist<_Tp>& __x, const slist<_Tp>& __y) {
-    typedef typename slist<_Tp>::_Super _Super;
-    return operator == ((const _Super&)__x,(const _Super&)__y);
-}
-
-template <class _Tp>
-inline bool operator<(const slist<_Tp>& __x, const slist<_Tp>& __y) {
-    typedef typename slist<_Tp>::_Super _Super;
-    return operator < ((const _Super&)__x,(const _Super&)__y);
-}
-#  endif
-#  undef __SL_SUPER
-
-# ifdef _STLP_USE_NAMESPACES
-} /* namespace STLPORT */
-# endif
-
-#endif /* _STLP_INTERNAL_WRAP_SLIST_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl/wrappers/_vector.h b/src/STLport/stl/wrappers/_vector.h
deleted file mode 100644
index ff42bc6..0000000
--- a/src/STLport/stl/wrappers/_vector.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1997
- * Moscow Center for SPARC Technology
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/* NOTE: This is an internal header file, included by other STL headers.
- *   You should not attempt to use it directly.
- */
-
-#ifndef _STLP_INTERNAL_WRAP_VECTOR_H
-#define _STLP_INTERNAL_WRAP_VECTOR_H
-
-#ifndef _STLP_INTERNAL_VECTOR_H
-# include <stl/_vector.h>
-#endif
-
-# if defined (_STLP_DEBUG)
-#  define _VEC_SUPER _DBG_vector<_Tp, _STLP_DEFAULT_ALLOCATOR(_Tp) >
-# else
-#  define _VEC_SUPER __vector__<_Tp, _STLP_DEFAULT_ALLOCATOR(_Tp) >
-# endif
-
-# ifdef _STLP_USE_NAMESPACES
-namespace STLPORT { 
-# endif
-
-template <class _Tp>
-class vector : public _VEC_SUPER
-{
-public:
-    typedef _VEC_SUPER  _Super;
-    __IMPORT_WITH_REVERSE_ITERATORS(_Super)
-    __IMPORT_SUPER_COPY_ASSIGNMENT(vector, vector<_Tp>, _VEC_SUPER)
-    vector() {}
-    explicit vector(size_type __n, const _Tp& __value) : _VEC_SUPER(__n, __value) { }
-    explicit vector(size_type __n) : _VEC_SUPER(__n) { }
-    vector(const_iterator __first, const_iterator __last) : _VEC_SUPER(__first,__last) { }
-# ifdef _STLP_DEBUG
-  // certainly, no member templates here !
-    vector(const _Tp* __first, const _Tp* __last) : _VEC_SUPER(__first,__last) { }    
-# endif
-    ~vector() {}
-};
-
-#  if defined (_STLP_BASE_MATCH_BUG)
-template <class _Tp>
-inline bool operator==(const vector<_Tp>& __x, const vector<_Tp>& __y) {
-  return __x.size() == __y.size() &&
-    equal(__x.begin(), __x.end(), __y.begin());
-}
-
-template <class _Tp>
-inline bool operator<(const vector<_Tp>& __x, const vector<_Tp>& __y) {
-  return lexicographical_compare(__x.begin(), __x.end(), 
-				 __y.begin(), __y.end());
-}
-#  endif /* _STLP_BASE_MATCH_BUG */
-#  undef _VEC_SUPER
-
-// close std namespace
-# ifdef _STLP_USE_NAMESPACES
-}
-# endif
-
-#endif /* _STLP_WRAP_VECTOR_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/stl_user_config.h b/src/STLport/stl_user_config.h
deleted file mode 100644
index 2fdcccd..0000000
--- a/src/STLport/stl_user_config.h
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-/*
- * Purpose of this file :
- *
- * To hold user-definable portion of STLport settings which may be overridden
- * on per-project basis.
- * Please note that if you use STLport iostreams (compiled library) then you have
- * to use consistent settings when you compile STLport library and your project. 
- * Those settings are defined in _site_config.h and have to be the same for a given
- * STLport installation.
- *
- */
-
-
-//==========================================================
-// User-settable macros that control compilation:
-//              Features selection
-//==========================================================
-
-/* _STLP_NO_OWN_IOSTREAMS: 
- * __STL_NO_SGI_IOSTREAMS (in older versions)
- *  This is major configuration switch.
- *  Turn it on to disable use of SGI iostreams and use wrappers 
- *  around your compiler's iostreams, like before.
- *  Keep it off if you want to use  SGI iostreams 
- *  (Note that in this case you have to compile library in ../src
- *  and supply resulting library at link time).
- *
- */
-
- # define   _STLP_NO_OWN_IOSTREAMS	1
-
-
-/* 
- * This macro only works in non-SGI iostreams mode.
- *
- * Uncomment to suppress using new-style streams even if they are
- * available.
- * Beware - _STLP_USE_OWN_NAMESPACE depends on this macro, too.
- * Do that only if you are absolutely sure backwards-compatible 
- * <iostream.h> is not actually a wrapper with <iostream>
- * Hint : In VC++ 6.x, they are not.
- */
-
-// #define   _STLP_NO_NEW_IOSTREAMS	1
-
-/*
- * Use this switch for embedded systems where no iostreams are available
- * at all. STLport own iostreams will also get disabled automatically then.
- */
-// # define _STLP_NO_IOSTREAMS 1
-
-/* 
- * Set _STLP_DEBUG to turn the "Debug Mode" on.
- * That gets you checked iterators/ranges in the manner
- * of "Safe STL". Very useful for debugging. Thread-safe.
- * Please do not forget to link proper STLport library flavor
- * (e.g libstlport_gcc_stldebug.a) when you set this flag in STLport iostreams mode.
- */
-//#define   _STLP_DEBUG 1
-
-
-/* 
- *
- *  _STLP_NO_CUSTOM_IO : define this if you do not instantiate basic_xxx iostream classes  with custom types (which is most likely the case).
- *  Custom means types other than char, wchar and char_traits<>,
- *  like basic_ostream<my_char_type, my_traits<my_char_type> >
- *  When this option is on, most non-inline template functions definitions for iostreams are not seen by the client.
- *  Default is off, just not to break compilation for those who do use those types.
- *  which saves a lot of compile time for most compilers, also object and executable size for some.
- *  That also guarantees that you still use optimized standard i/o when you compile your program without optimization. 
- *  Option does not affect STLport library build; you may use the same binary library with and without this option, 
- *  on per-project basis.
- *
- */
-//#define _STLP_NO_CUSTOM_IO
-
-
-/* 
- * _STLP_NO_RELOPS_NAMESPACE: if defined, don't put the relational
- * operator templates (>, <=. >=, !=) in namespace std::rel_ops, even
- * if the compiler supports namespaces.
- * Note : if the compiler do not support namespaces, those operators are not be provided by default,
- * to simulate hiding them into rel_ops. This was proved to resolve many compiler bugs with ambiguity.
- */
-
-// #define _STLP_NO_RELOPS_NAMESPACE 1
-
-
-/*
- * If _STLP_USE_OWN_NAMESPACE is in effect, STLport by default will not try
- * to rename std:: for the user
- * to _STL::. If you do want this feature, please define the following switch :
- */
-// # define _STLP_REDEFINE_STD 1
-
-
-/*
- * _STLP_WHOLE_NATIVE_STD : only meaningful in _STLP_USE_OWN_NAMESPACE mode.
- * Normally, STLport only imports necessary components from native std:: namespace -
- * those not yet provided by STLport (<iostream>, <complex>, etc.) 
- * and their dependencies (<string>, <stdexcept>). 
- * You might want everything from std:: being available in std:: namespace when you
- * include corresponding STLport header (like STLport <map> provides std::map as well, etc.),
- * if you are going to use both stlport:: and std:: components in your code.
- * Otherwise this option is not recommended as it increases the size of your object files
- * and slows down compilation.
- */
-// # define _STLP_WHOLE_NATIVE_STD
-
-
-/*
- * Use this option to catch uninitialized members in your classes.
- * When it is set, construct() and destroy() fill the class storage
- * with _STLP_SHRED_BYTE (see below). 
- * Note : _STLP_DEBUG and _STLP_DEBUG_ALLOC don't set this option automatically.
- */
-
-// # define _STLP_DEBUG_UNINITIALIZED 1
-
-/*
- * Uncomment and provide a definition for the byte with which raw memory
- * will be filled if _STLP_DEBUG_ALLOC or _STLP_DEBUG_UNINITIALIZED is defined. 
- * Choose a value which is likely to cause a noticeable problem if dereferenced 
- * or otherwise abused. A good value may already be defined for your platform; see
- * stl_config.h
- */
-// #define _STLP_SHRED_BYTE 0xA3
-
-/*
- *  This option is for gcc users only and only affects systems where native linker
- *  does not let gcc to implement automatic instantiation of static template data members/
- *  It is being put in this file as there is no way to check if we are using GNU ld automatically,
- *  so it becomes user's responsibility.
- * 
- */
-
-// #define _STLP_GCC_USES_GNU_LD
-
-
-//==========================================================
-// Compatibility section
-//==========================================================
-
-/*
- *  Define this macro to disable anachronistic constructs (like the ones used in HP STL and
- *  not included in final standard, etc. 
- */
-// define _STLP_NO_ANACHRONISMS 1
-
-/*
- *  Define this macro to disable STLport extensions (for example, to make sure your code will 
- *  compile with some other implementation )
- */
-// define _STLP_NO_EXTENSIONS   1
-
-
-/* 
- * You should define this macro if compiling with MFC - STLport <stl/_config.h>
- * then include <afx.h> instead of <windows.h> to get synchronisation primitives 
- *
- */
-
-// # define _STLP_USE_MFC 1
-
-
-// boris : this setting is here as we cannot detect precense of new Platform SDK automatically 
-// If you are using new PSDK with VC++ 6.0 or lower, please define this to get correct prototypes for InterlockedXXX functions
-//# define _STLP_NEW_PLATFORM_SDK 1
-
-/*
- * Use minimum set of default arguments on template classes that have more
- * than one - for example map<>, set<>.
- * This has effect only if _STLP_LIMITED_DEFAULT_TEMPLATES is on.
- * If _STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS is set, you'll be able to compile
- * set<T> with those compilers, but you'll have to use __set__<T, less<T>>
- *
- * Affects : map<>, multimap<>, set<>, multiset<>, hash_*<>, 
- * queue<>, priority_queue<>, stack<>, istream_iterator<>
- */
-
-// # define _STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS 1
-
-//==========================================================
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/streambuf b/src/STLport/streambuf
deleted file mode 100644
index b033cfc..0000000
--- a/src/STLport/streambuf
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-#ifndef _STLP_STREAMBUF
-#define _STLP_STREAMBUF
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x1066
-#  include <stl/_prolog.h>
-# endif
-
-# ifdef _STLP_PRAGMA_ONCE
-#  pragma once
-# endif
-
-# if defined ( _STLP_OWN_IOSTREAMS )
-#  include <stl/_streambuf.h>
-# elif !defined (_STLP_USE_NO_IOSTREAMS)
-#  include <wrap_std/streambuf>
-# endif
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x1066)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_STREAMBUF */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/streambuf.h b/src/STLport/streambuf.h
deleted file mode 100644
index 378c23c..0000000
--- a/src/STLport/streambuf.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-#ifndef _STLP_STREAMBUF_H
-# define _STLP_STREAMBUF_H
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x2067
-#  include <stl/_prolog.h>
-# endif
-
-# if defined ( _STLP_OWN_IOSTREAMS )
-
-#ifdef __BORLANDC__
-#  include <streambuf.>
-#else
-#  include <streambuf>
-#endif
-
-# include <ios.h>
-
-# ifndef _STLP_HAS_NO_NAMESPACES
-#  ifdef _STLP_BROKEN_USING_DIRECTIVE
-   using namespace _STLP_STD;
-#  else
-using _STLP_STD::basic_streambuf;
-using _STLP_STD::streambuf;
-#   ifndef _STLP_NO_WCHAR_T
-using _STLP_STD::wstreambuf;
-#   endif
-#  endif
-# endif /* _STLP_HAS_NO_NAMESPACES */
-
-# elif !defined (_STLP_USE_NO_IOSTREAMS)
-
-# include _STLP_NATIVE_OLD_STREAMS_HEADER(streambuf.h)
-
-# endif
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x2067)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_STREAMBUF_H */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/string b/src/STLport/string
deleted file mode 100644
index d3a8055..0000000
--- a/src/STLport/string
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 1997-1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_STRING
-# define _STLP_STRING
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x68
-#  include <stl/_prolog.h>
-# endif
-
-# ifdef _STLP_PRAGMA_ONCE
-#  pragma once
-# endif
-
-#if defined (_STLP_USE_NATIVE_STRING)
-
-// as part of compiled runtime library depends on it.
-
-# if defined (_STLP_MSVC)
-#  include <streambuf>
-#  include <istream>
-# endif
-
-#  include _STLP_NATIVE_HEADER(string)
-
-# endif /* _STLP_USE_NATIVE_STRING */
-
-# if !defined (_STLP_USE_NATIVE_STRING) || defined (_STLP_USE_OWN_NAMESPACE)
-# include <stl/_string.h>
-# else
-# include <stl/_string_hash.h>
-# endif /*_STLP_USE_NATIVE_STRING */
-
-// cleanup
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x68)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_STRING */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/string.h b/src/STLport/string.h
deleted file mode 100644
index 47babc3..0000000
--- a/src/STLport/string.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x269
-#  include <stl/_prolog.h>
-# endif
-
-# if defined (__BORLANDC__)
-#  include _STLP_NATIVE_CPP_C_HEADER(_str.h)
-# else
-#  include _STLP_NATIVE_C_HEADER(string.h)
-# endif
-
-# if defined (__BORLANDC__) && defined (_STLP_IMPORT_VENDOR_CSTD)
-#  include <using/cstring>
-# endif /* BORLAND */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x269)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/strstream b/src/STLport/strstream
deleted file mode 100644
index 6f87f19..0000000
--- a/src/STLport/strstream
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-// WARNING: The classes defined in this header are DEPRECATED.  This
-// header is defined in section D.7.1 of the C++ standard, and it
-// MAY BE REMOVED in a future standard revision.  You should use the
-// header <sstream> instead.
-
-
-#ifndef _STLP_STRSTREAM
-#define _STLP_STRSTREAM
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x1070
-#  include <stl/_prolog.h>
-# endif
-
-# ifdef _STLP_PRAGMA_ONCE
-#  pragma once
-# endif
-
-# if defined (_STLP_OWN_IOSTREAMS)
-
-#  include <stl/_strstream.h>
-
-# elif !defined (_STLP_USE_NO_IOSTREAMS)
-
-#  if defined (_STLP_USE_NEW_IOSTREAMS)
-#   include <wrap_std/strstream>
-#  else
-#   include <wrap_std/h/strstream.h>
-#  endif
-
-# endif
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x1070)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_STRSTREAM */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/strstream.h b/src/STLport/strstream.h
deleted file mode 100644
index 6a1978e..0000000
--- a/src/STLport/strstream.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_STRSTREAM_H
-# define _STLP_STRSTREAM_H
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x2071
-#  include <stl/_prolog.h>
-# endif
-
-# if defined ( _STLP_USE_NEW_IOSTREAMS )
-
-// fbp - if we are going to use that consistently, let's do it
-#ifdef __BORLANDC__
-#  include <strstream.>
-#else
-#  include <strstream>
-#endif
-
-# include  <iostream.h>
-
-
-# ifndef _STLP_HAS_NO_NAMESPACES
-
-#  ifdef _STLP_BROKEN_USING_DIRECTIVE
-
-using namespace _STLP_STD;
-
-#  else
-
-using _STLP_STD::strstreambuf;
-using _STLP_STD::istrstream;
-using _STLP_STD::ostrstream;
-using _STLP_STD::strstream;
-
-#  endif /* _STLP_BROKEN_USING_DIRECTIVE */
-
-# endif /* _STLP_HAS_NO_NAMESPACES */
-
-# else
-
-
-// just include old-style strstream.h
-#  if defined (_MSC_VER) && (_MSC_VER <= 1200)
-#   include _STLP_NATIVE_OLD_STREAMS_HEADER(strstrea.h)
-#  else
-#   include _STLP_NATIVE_OLD_STREAMS_HEADER(strstream.h)
-#  endif
-
-# endif
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x2071)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_STRSTREAM_H */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/time.h b/src/STLport/time.h
deleted file mode 100644
index ccb64b3..0000000
--- a/src/STLport/time.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-# if !defined (_STLP_OUTERMOST_HEADER_ID)
-#  define _STLP_OUTERMOST_HEADER_ID 0x272
-#  include <stl/_prolog.h>
-# elif (_STLP_OUTERMOST_HEADER_ID == 0x272) && ! defined (_STLP_DONT_POP_0x272)
-#  define _STLP_DONT_POP_0x272
-# endif
-
-# include _STLP_NATIVE_C_HEADER(time.h)
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x272)
-#  if ! defined (_STLP_DONT_POP_0x272)
-#   include <stl/_epilog.h>
-#   undef  _STLP_OUTERMOST_HEADER_ID
-#   endif
-#   undef  _STLP_DONT_POP_0x272
-# endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/typeinfo b/src/STLport/typeinfo
deleted file mode 100644
index 1301bfe..0000000
--- a/src/STLport/typeinfo
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_TYPEINFO
-# define _STLP_TYPEINFO
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x473
-#  include <stl/_prolog.h>
-# endif
-
-# ifndef _STLP_NO_TYPEINFO
-
-# if defined (_STLP_NO_NEW_NEW_HEADER)
-#  include <typeinfo.h>
-# else
-#  include _STLP_NATIVE_CPP_RUNTIME_HEADER(typeinfo)
-# endif
-
-# if defined(_STLP_MSVC) && (_STLP_MSVC >= 1300)
-// In .NET, <typeinfo> actually includes <typeinfo.h> 
-#  undef _STLP_OLDSTD_typeinfo
-# endif
-
-// if <typeinfo.h> already included, do not import anything
-# if defined  (_STLP_USE_NAMESPACES) && ! defined (_STLP_OLDSTD_typeinfo) \
-&& ( defined (_STLP_VENDOR_GLOBAL_EXCEPT_STD) || defined (_STLP_USE_OWN_NAMESPACE) || defined (_STLP_DEBUG))
-# if defined(_STLP_MSVC) && (_STLP_MSVC < 1300)
-class bad_cast : public exception {};
-# endif
-_STLP_BEGIN_NAMESPACE
-
-// VC++ 6 has only this guy in ::
-// # if !(defined(_STLP_MSVC)&& (_STLP_MSVC <= 1200))
-using _STLP_VENDOR_EXCEPT_STD::type_info;
-// # endif
-
-#  if !(defined(__MRC__) || defined(__SC__) || defined(__DMC__))
-using _STLP_VENDOR_EXCEPT_STD::bad_typeid;
-#  endif
-
-//#if defined( __xlC__ ) && (__xlC__ < 0x500)
-//# include <exception>
-//struct bad_cast : exception {};
-//#endif
-# if defined(_STLP_MSVC) && (_STLP_MSVC < 1300)
-using ::bad_cast;
-# else
-using _STLP_VENDOR_EXCEPT_STD::bad_cast;
-# endif
-
-_STLP_END_NAMESPACE
-#endif /* _STLP_OWN_NAMESPACE */
-
-#else
-
-# include <exception>
-_STLP_BEGIN_NAMESPACE
-# ifndef __DMC__
-struct bad_cast : exception {};
-# endif
-_STLP_END_NAMESPACE
-#endif  /* NO_TYPEINFO */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x473)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_TYPEINFO */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/typeinfo.h b/src/STLport/typeinfo.h
deleted file mode 100644
index c0ec75d..0000000
--- a/src/STLport/typeinfo.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_OLDSTD_typeinfo
-# define _STLP_OLDSTD_typeinfo
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x874
-#  include <stl/_prolog.h>
-# endif
-
-# ifndef _STLP_NO_TYPEINFO
-
-#if defined (__GNUC__)
-# undef _STLP_OLDSTD_typeinfo
-#  include <typeinfo>
-# define _STLP_OLDSTD_typeinfo
-#else
-#  include _STLP_NATIVE_CPP_RUNTIME_HEADER(typeinfo.h)
-#endif
-
-// if <typeinfo> already included, do not import anything
-
-# if defined  (_STLP_USE_OWN_NAMESPACE) && ! (defined (_STLP_TYPEINFO) && !defined(_STLP_NO_NEW_NEW_HEADER))
-
-_STLP_BEGIN_NAMESPACE
-
-using /*_STLP_VENDOR_EXCEPT_STD */ :: type_info;
-# if !(defined(__MRC__) || (defined(__SC__) && !defined(__DMC__)))
-using /* _STLP_VENDOR_EXCEPT_STD */ :: bad_typeid;
-# endif
-using /* _STLP_VENDOR_EXCEPT_STD */ :: bad_cast;
-
-_STLP_END_NAMESPACE
-
-#endif /* _STLP_OWN_NAMESPACE */
-
-# endif /* _STLP_NO_TYPEINFO */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x874)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_OLDSTD_typeinfo */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/using/cstring b/src/STLport/using/cstring
deleted file mode 100644
index 5142dda..0000000
--- a/src/STLport/using/cstring
+++ /dev/null
@@ -1,54 +0,0 @@
-using _STLP_VENDOR_CSTD::size_t;
-
-#  ifndef _STLP_NO_CSTD_FUNCTION_IMPORTS
-#   if defined(__MSL__) && __MC68K__ && !_No_BlockMove && __dest_os == __mac_os
-#    undef memcpy
-#    undef memmove
-inline void* memcpy(void* dst, const void* src, size_t len)
-{
-	return _STLP_VENDOR_CSTD::__memcpy(dst, src, len);
-}
-inline void* memmove(void* dst, const void* src, size_t len)
-{
-	return _STLP_VENDOR_CSTD::__memmove(dst, src, len);
-}
-#   else
-
- using _STLP_VENDOR_CSTD::memmove;
- using _STLP_VENDOR_CSTD::memcpy;
-
-#   endif
-
-# if ! defined (__BORLANDC__)
-using _STLP_VENDOR_CSTD::memchr;
-using _STLP_VENDOR_CSTD::strchr;
-using _STLP_VENDOR_CSTD::strpbrk;
-using _STLP_VENDOR_CSTD::strrchr;
-using _STLP_VENDOR_CSTD::strstr;
-# endif
-
-using _STLP_VENDOR_CSTD::memcmp;
-using _STLP_VENDOR_CSTD::memset;
-
-using _STLP_VENDOR_CSTD::strcat;
-
-# if !defined (strcmp)
-using _STLP_VENDOR_CSTD::strcmp;
-# endif
-
-using _STLP_VENDOR_CSTD::strcoll;
-# if !defined (strcpy)
-using _STLP_VENDOR_CSTD::strcpy;
-# endif
-using _STLP_VENDOR_CSTD::strcspn;
-using _STLP_VENDOR_CSTD::strerror;
-using _STLP_VENDOR_CSTD::strlen;
-using _STLP_VENDOR_CSTD::strncat;
-using _STLP_VENDOR_CSTD::strncmp;
-
-using _STLP_VENDOR_CSTD::strncpy;
-using _STLP_VENDOR_CSTD::strspn;
-
-using _STLP_VENDOR_CSTD::strtok;
-using _STLP_VENDOR_CSTD::strxfrm;
-#  endif /* _STLP_NO_CSTD_FUNCTION_IMPORTS */
diff --git a/src/STLport/using/export b/src/STLport/using/export
deleted file mode 100644
index 2d3afcd..0000000
--- a/src/STLport/using/export
+++ /dev/null
@@ -1,12 +0,0 @@
-cstring
-fstream
-iomanip
-ios
-iosfwd
-iostream
-istream
-locale
-ostream
-sstream
-streambuf
-strstream
diff --git a/src/STLport/using/fstream b/src/STLport/using/fstream
deleted file mode 100644
index e79e048..0000000
--- a/src/STLport/using/fstream
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifdef _STLP_BROKEN_USING_DIRECTIVE
-using namespace _STLP_STD;
-#else
-using _STLP_NEW_IO_NAMESPACE::basic_filebuf;
-using _STLP_NEW_IO_NAMESPACE::filebuf;
-using _STLP_NEW_IO_NAMESPACE::basic_ifstream;
-using _STLP_NEW_IO_NAMESPACE::basic_ofstream;
-using _STLP_NEW_IO_NAMESPACE::ifstream;
-using _STLP_NEW_IO_NAMESPACE::ofstream;
-using _STLP_NEW_IO_NAMESPACE::basic_fstream;
-using _STLP_NEW_IO_NAMESPACE::fstream;
-
-# ifndef _STLP_NO_WIDE_STREAMS
-using _STLP_NEW_IO_NAMESPACE::wofstream;
-using _STLP_NEW_IO_NAMESPACE::wfilebuf;
-using _STLP_NEW_IO_NAMESPACE::wifstream;
-using _STLP_NEW_IO_NAMESPACE::wfstream;
-# endif
-#endif
diff --git a/src/STLport/using/h/fstream.h b/src/STLport/using/h/fstream.h
deleted file mode 100644
index 6600568..0000000
--- a/src/STLport/using/h/fstream.h
+++ /dev/null
@@ -1,4 +0,0 @@
-using ::streambuf;
-using ::ifstream;
-using ::ofstream;
-using ::fstream;
diff --git a/src/STLport/using/h/iomanip.h b/src/STLport/using/h/iomanip.h
deleted file mode 100644
index 99e48d9..0000000
--- a/src/STLport/using/h/iomanip.h
+++ /dev/null
@@ -1,6 +0,0 @@
-using ::setiosflags;
-using ::resetiosflags;
-// using ::setbase;
-using ::setfill;
-using ::setprecision;
-using ::setw;
diff --git a/src/STLport/using/h/iostream.h b/src/STLport/using/h/iostream.h
deleted file mode 100644
index e85f4e2..0000000
--- a/src/STLport/using/h/iostream.h
+++ /dev/null
@@ -1,24 +0,0 @@
-using _STLP_OLD_IO_NAMESPACE::istream;
-using _STLP_OLD_IO_NAMESPACE::ostream;
-
-/* HP aCC include files re-define these when THREAD_SAFE */
-#if !defined(cin)
-using _STLP_OLD_IO_NAMESPACE::cin;
-#endif
-#if !defined(cout)
-using _STLP_OLD_IO_NAMESPACE::cout;
-#endif
-#if !defined(cerr)
-using _STLP_OLD_IO_NAMESPACE::cerr;
-#endif
-#if !defined(clog)
-using _STLP_OLD_IO_NAMESPACE::clog;
-#endif
-
-using _STLP_OLD_IO_NAMESPACE::endl;
-using _STLP_OLD_IO_NAMESPACE::ends;
-
-using _STLP_OLD_IO_NAMESPACE::ios;
-using _STLP_OLD_IO_NAMESPACE::flush;
-
-// using _STLP_OLD_IO_NAMESPACE::ws;
diff --git a/src/STLport/using/h/ostream.h b/src/STLport/using/h/ostream.h
deleted file mode 100644
index 6ba3f88..0000000
--- a/src/STLport/using/h/ostream.h
+++ /dev/null
@@ -1,6 +0,0 @@
-using _STLP_OLD_IO_NAMESPACE::ostream;
-using _STLP_OLD_IO_NAMESPACE::endl;
-using _STLP_OLD_IO_NAMESPACE::ends;
-using _STLP_OLD_IO_NAMESPACE::flush;
-
-// using _STLP_OLD_IO_NAMESPACE::ws;
diff --git a/src/STLport/using/h/streambuf.h b/src/STLport/using/h/streambuf.h
deleted file mode 100644
index 459de3d..0000000
--- a/src/STLport/using/h/streambuf.h
+++ /dev/null
@@ -1 +0,0 @@
-using ::streambuf;
diff --git a/src/STLport/using/h/strstream.h b/src/STLport/using/h/strstream.h
deleted file mode 100644
index a7d9f11..0000000
--- a/src/STLport/using/h/strstream.h
+++ /dev/null
@@ -1,4 +0,0 @@
-using _STLP_OLD_IO_NAMESPACE::strstreambuf;
-using _STLP_OLD_IO_NAMESPACE::istrstream;
-using _STLP_OLD_IO_NAMESPACE::ostrstream;
-using _STLP_OLD_IO_NAMESPACE::strstream;
diff --git a/src/STLport/using/iomanip b/src/STLport/using/iomanip
deleted file mode 100644
index 8a7c792..0000000
--- a/src/STLport/using/iomanip
+++ /dev/null
@@ -1,6 +0,0 @@
-using _STLP_NEW_IO_NAMESPACE::setiosflags;
-using _STLP_NEW_IO_NAMESPACE::resetiosflags;
-using _STLP_NEW_IO_NAMESPACE::setbase;
-using _STLP_NEW_IO_NAMESPACE::setfill;
-using _STLP_NEW_IO_NAMESPACE::setprecision;
-using _STLP_NEW_IO_NAMESPACE::setw;
diff --git a/src/STLport/using/ios b/src/STLport/using/ios
deleted file mode 100644
index 22f23ae..0000000
--- a/src/STLport/using/ios
+++ /dev/null
@@ -1,41 +0,0 @@
-#  ifdef _STLP_BROKEN_USING_DIRECTIVE
-using namespace _STLP_NEW_IO_NAMESPACE;
-#  else
-
-using _STLP_NEW_IO_NAMESPACE::ios;
-using _STLP_NEW_IO_NAMESPACE::streamoff;
-using _STLP_NEW_IO_NAMESPACE::streamsize;
-
-using _STLP_NEW_IO_NAMESPACE::ios_base;
-using _STLP_NEW_IO_NAMESPACE::basic_ios;
-
-// _lib.std.ios.manip_, manipulators:	
-using _STLP_NEW_IO_NAMESPACE::boolalpha;
-using _STLP_NEW_IO_NAMESPACE::noboolalpha;
-using _STLP_NEW_IO_NAMESPACE::showbase;
-using _STLP_NEW_IO_NAMESPACE::noshowbase;
-using _STLP_NEW_IO_NAMESPACE::showpoint;
-using _STLP_NEW_IO_NAMESPACE::noshowpoint;
-using _STLP_NEW_IO_NAMESPACE::showpos;
-using _STLP_NEW_IO_NAMESPACE::noshowpos;
-using _STLP_NEW_IO_NAMESPACE::skipws;
-using _STLP_NEW_IO_NAMESPACE::noskipws;
-using _STLP_NEW_IO_NAMESPACE::uppercase;
-using _STLP_NEW_IO_NAMESPACE::nouppercase;
-
-// _lib.adjustfield.manip_ adjustfield:
-using _STLP_NEW_IO_NAMESPACE::internal;
-using _STLP_NEW_IO_NAMESPACE::left;
-using _STLP_NEW_IO_NAMESPACE::right;
-
-// _lib.basefield.manip_ basefield:
-using _STLP_NEW_IO_NAMESPACE::dec;
-using _STLP_NEW_IO_NAMESPACE::hex;
-using _STLP_NEW_IO_NAMESPACE::oct;
-
-// _lib.floatfield.manip_ floatfield:
-using _STLP_NEW_IO_NAMESPACE::fixed;
-using _STLP_NEW_IO_NAMESPACE::scientific;
-
-#  endif  /* _STLP_BROKEN_USING_DIRECTIVE */
-
diff --git a/src/STLport/using/iosfwd b/src/STLport/using/iosfwd
deleted file mode 100644
index b564e81..0000000
--- a/src/STLport/using/iosfwd
+++ /dev/null
@@ -1,54 +0,0 @@
-# if defined (_STLP_USE_NEW_IOSTREAMS)
-using _STLP_NEW_IO_NAMESPACE::char_traits;
-using _STLP_NEW_IO_NAMESPACE::basic_ios;
-using _STLP_NEW_IO_NAMESPACE::basic_streambuf;
-using _STLP_NEW_IO_NAMESPACE::basic_istream;
-using _STLP_NEW_IO_NAMESPACE::basic_ostream;
-using _STLP_NEW_IO_NAMESPACE::basic_iostream;
-using _STLP_NEW_IO_NAMESPACE::basic_stringbuf;
-using _STLP_NEW_IO_NAMESPACE::basic_istringstream;
-using _STLP_NEW_IO_NAMESPACE::basic_ostringstream;
-using _STLP_NEW_IO_NAMESPACE::basic_stringstream;
-using _STLP_NEW_IO_NAMESPACE::basic_filebuf;
-using _STLP_NEW_IO_NAMESPACE::basic_ifstream;
-using _STLP_NEW_IO_NAMESPACE::basic_ofstream;
-using _STLP_NEW_IO_NAMESPACE::basic_fstream;
-using _STLP_NEW_IO_NAMESPACE::fpos;
-using _STLP_NEW_IO_NAMESPACE::istreambuf_iterator;
-using _STLP_NEW_IO_NAMESPACE::ostreambuf_iterator;
-using _STLP_NEW_IO_NAMESPACE::stringbuf;
-using _STLP_NEW_IO_NAMESPACE::istringstream;
-using _STLP_NEW_IO_NAMESPACE::ostringstream;
-using _STLP_NEW_IO_NAMESPACE::stringstream;
-# endif
-
-using _STLP_NEW_IO_NAMESPACE::ios;
-using _STLP_NEW_IO_NAMESPACE::streambuf;
-using _STLP_NEW_IO_NAMESPACE::istream;
-using _STLP_NEW_IO_NAMESPACE::ostream;
-using _STLP_NEW_IO_NAMESPACE::iostream;
-
-using _STLP_NEW_IO_NAMESPACE::filebuf;
-using _STLP_NEW_IO_NAMESPACE::ifstream;
-using _STLP_NEW_IO_NAMESPACE::ofstream;
-using _STLP_NEW_IO_NAMESPACE::fstream;
-
-using _STLP_NEW_IO_NAMESPACE::streampos;
-using _STLP_NEW_IO_NAMESPACE::streamoff;
-
-# if !defined (_STLP_NO_WIDE_STREAMS)
-using _STLP_NEW_IO_NAMESPACE::wios;
-using _STLP_NEW_IO_NAMESPACE::wstreambuf;
-using _STLP_NEW_IO_NAMESPACE::wistream;
-using _STLP_NEW_IO_NAMESPACE::wostream;
-using _STLP_NEW_IO_NAMESPACE::wiostream;
-using _STLP_NEW_IO_NAMESPACE::wstringbuf;
-using _STLP_NEW_IO_NAMESPACE::wistringstream;
-using _STLP_NEW_IO_NAMESPACE::wostringstream;
-using _STLP_NEW_IO_NAMESPACE::wstringstream;
-using _STLP_NEW_IO_NAMESPACE::wfilebuf;
-using _STLP_NEW_IO_NAMESPACE::wifstream;
-using _STLP_NEW_IO_NAMESPACE::wofstream;
-using _STLP_NEW_IO_NAMESPACE::wfstream;
-using _STLP_NEW_IO_NAMESPACE::wstreampos;
-# endif
diff --git a/src/STLport/using/iostream b/src/STLport/using/iostream
deleted file mode 100644
index 6169afb..0000000
--- a/src/STLport/using/iostream
+++ /dev/null
@@ -1,14 +0,0 @@
-
-# include <using/istream>
-
-using _STLP_VENDOR_STD::cin;
-using _STLP_VENDOR_STD::cout;
-using _STLP_VENDOR_STD::cerr;
-using _STLP_VENDOR_STD::clog;
-
-# if ! defined (_STLP_NO_WIDE_STREAMS)
-using _STLP_VENDOR_STD::wcin;
-using _STLP_VENDOR_STD::wcout;
-using _STLP_VENDOR_STD::wcerr;
-using _STLP_VENDOR_STD::wclog;
-# endif
diff --git a/src/STLport/using/istream b/src/STLport/using/istream
deleted file mode 100644
index baf10d2..0000000
--- a/src/STLport/using/istream
+++ /dev/null
@@ -1,16 +0,0 @@
-# include <using/ostream>
-
-using _STLP_NEW_IO_NAMESPACE::basic_istream;
-using _STLP_NEW_IO_NAMESPACE::basic_iostream;
-
-using _STLP_NEW_IO_NAMESPACE::istream;
-using _STLP_NEW_IO_NAMESPACE::iostream;
-
-# if !defined (_STLP_NO_NATIVE_WIDE_STREAMS)
-using _STLP_NEW_IO_NAMESPACE::wistream;
-using _STLP_NEW_IO_NAMESPACE::wiostream;
-# endif
-
-#if !(defined (_STLP_MSVC) && (_STLP_MSVC < 1200))
-using _STLP_NEW_IO_NAMESPACE::ws;
-#endif
diff --git a/src/STLport/using/locale b/src/STLport/using/locale
deleted file mode 100644
index aa99b5b..0000000
--- a/src/STLport/using/locale
+++ /dev/null
@@ -1,65 +0,0 @@
-#if !defined(_STLP_NO_IMPORT_LOCALE)
-
-// from <cwchar>
-#if !defined (_STLP_NO_MBSTATE_T)
-using _STLP_VENDOR_MB_NAMESPACE::mbstate_t;
-#endif
-
-// _lib.locale_, locale:
-using _STLP_NEW_IO_NAMESPACE::locale;
-using _STLP_NEW_IO_NAMESPACE::use_facet;
-using _STLP_NEW_IO_NAMESPACE::has_facet;
-
-// _lib.locale.convenience_, convenience interfaces:
-using _STLP_NEW_IO_NAMESPACE::isspace;
-using _STLP_NEW_IO_NAMESPACE::isprint;
-using _STLP_NEW_IO_NAMESPACE::iscntrl;
-using _STLP_NEW_IO_NAMESPACE::isupper;
-using _STLP_NEW_IO_NAMESPACE::islower;
-using _STLP_NEW_IO_NAMESPACE::isalpha;
-using _STLP_NEW_IO_NAMESPACE::isdigit;
-using _STLP_NEW_IO_NAMESPACE::ispunct;
-using _STLP_NEW_IO_NAMESPACE::isxdigit;
-using _STLP_NEW_IO_NAMESPACE::isalnum;
-using _STLP_NEW_IO_NAMESPACE::isgraph;
-using _STLP_NEW_IO_NAMESPACE::toupper;
-using _STLP_NEW_IO_NAMESPACE::tolower;
-
-// _lib.category.ctype_ and _lib.facet.ctype.special_, ctype:
-using _STLP_NEW_IO_NAMESPACE::ctype_base;
-using _STLP_NEW_IO_NAMESPACE::ctype;
-using _STLP_NEW_IO_NAMESPACE::ctype_byname;
-using _STLP_NEW_IO_NAMESPACE::codecvt_base;
-using _STLP_NEW_IO_NAMESPACE::codecvt;
-using _STLP_NEW_IO_NAMESPACE::codecvt_byname;
-
-// _lib.category.numeric_ and _lib.facet.numpunct_, numeric:
-using _STLP_NEW_IO_NAMESPACE::num_get;
-using _STLP_NEW_IO_NAMESPACE::num_put;
-using _STLP_NEW_IO_NAMESPACE::numpunct;
-using _STLP_NEW_IO_NAMESPACE::numpunct_byname;
-
-// _lib.category.collate_, collation:
-using _STLP_NEW_IO_NAMESPACE::collate;
-using _STLP_NEW_IO_NAMESPACE::collate_byname;
-
-// _lib.category.time_, date and time:
-using _STLP_NEW_IO_NAMESPACE::time_base;
-using _STLP_NEW_IO_NAMESPACE::time_get;
-using _STLP_NEW_IO_NAMESPACE::time_get_byname;
-using _STLP_NEW_IO_NAMESPACE::time_put;
-using _STLP_NEW_IO_NAMESPACE::time_put_byname;
-
-// _lib.category.monetary_, money:
-using _STLP_NEW_IO_NAMESPACE::money_base;
-using _STLP_NEW_IO_NAMESPACE::money_get;
-using _STLP_NEW_IO_NAMESPACE::money_put;
-using _STLP_NEW_IO_NAMESPACE::moneypunct;
-using _STLP_NEW_IO_NAMESPACE::moneypunct_byname;
-
-#if !defined (_STLP_OWN_IOSTREAMS) && !defined (_STLP_NO_NATIVE_MESSAGE_FACET)
-using _STLP_NEW_IO_NAMESPACE::messages_base;
-using _STLP_NEW_IO_NAMESPACE::messages;
-using _STLP_NEW_IO_NAMESPACE::messages_byname;
-#endif // _MSL_NO_MESSAGE_FACET
-#endif /* !defined(_STLP_NO_IMPORT_LOCALE) */
diff --git a/src/STLport/using/ostream b/src/STLport/using/ostream
deleted file mode 100644
index 162b32d..0000000
--- a/src/STLport/using/ostream
+++ /dev/null
@@ -1,10 +0,0 @@
-using _STLP_NEW_IO_NAMESPACE::basic_ostream;
-using _STLP_NEW_IO_NAMESPACE::ostream;
-
-# ifndef _STLP_NO_WIDE_STREAMS
-using _STLP_NEW_IO_NAMESPACE::wostream;
-# endif
-
-using _STLP_NEW_IO_NAMESPACE::endl;
-using _STLP_NEW_IO_NAMESPACE::ends;
-using _STLP_NEW_IO_NAMESPACE::flush;
diff --git a/src/STLport/using/sstream b/src/STLport/using/sstream
deleted file mode 100644
index 925c37e..0000000
--- a/src/STLport/using/sstream
+++ /dev/null
@@ -1,16 +0,0 @@
-using _STLP_NEW_IO_NAMESPACE::basic_stringbuf;
-using _STLP_NEW_IO_NAMESPACE::stringbuf;
-
-using _STLP_NEW_IO_NAMESPACE::basic_istringstream;
-using _STLP_NEW_IO_NAMESPACE::basic_ostringstream;
-using _STLP_NEW_IO_NAMESPACE::basic_stringstream;
-using _STLP_NEW_IO_NAMESPACE::istringstream;
-using _STLP_NEW_IO_NAMESPACE::ostringstream;
-using _STLP_NEW_IO_NAMESPACE::stringstream;
-
-#ifndef _STLP_NO_WIDE_STREAMS
-using _STLP_NEW_IO_NAMESPACE::wstringbuf;
-using _STLP_NEW_IO_NAMESPACE::wistringstream;
-using _STLP_NEW_IO_NAMESPACE::wostringstream;
-using _STLP_NEW_IO_NAMESPACE::wstringstream;
-#endif
diff --git a/src/STLport/using/streambuf b/src/STLport/using/streambuf
deleted file mode 100644
index 308241d..0000000
--- a/src/STLport/using/streambuf
+++ /dev/null
@@ -1,5 +0,0 @@
-using _STLP_NEW_IO_NAMESPACE::basic_streambuf;
-using _STLP_NEW_IO_NAMESPACE::streambuf;
-#ifndef _STLP_NO_WIDE_STREAMS
-using _STLP_NEW_IO_NAMESPACE::wstreambuf;
-# endif
diff --git a/src/STLport/using/strstream b/src/STLport/using/strstream
deleted file mode 100644
index eb26ac1..0000000
--- a/src/STLport/using/strstream
+++ /dev/null
@@ -1,4 +0,0 @@
-using _STLP_NEW_IO_NAMESPACE::strstreambuf;
-using _STLP_NEW_IO_NAMESPACE::istrstream;
-using _STLP_NEW_IO_NAMESPACE::ostrstream;
-using _STLP_NEW_IO_NAMESPACE::strstream;
diff --git a/src/STLport/utility b/src/STLport/utility
deleted file mode 100644
index c6de4d8..0000000
--- a/src/STLport/utility
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_UTILITY
-#define _STLP_UTILITY
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x75
-#  include <stl/_prolog.h>
-# endif
-
-# ifdef _STLP_PRAGMA_ONCE
-#  pragma once
-# endif
-
-# ifndef __TYPE_TRAITS_H
-#  include <stl/type_traits.h>
-# endif
-
-# if !defined (_STLP_DEBUG_H) && (defined  (_STLP_DEBUG) || defined (_STLP_ASSERTIONS))
-#  include <stl/debug/_debug.h>
-# endif
-
-# ifndef _STLP_INTERNAL_PAIR_H
-#  include <stl/_pair.h>
-# endif
-
-# if defined (_STLP_IMPORT_VENDOR_STD)
-#   include _STLP_NATIVE_HEADER(utility)
-# else
-#  if defined (_STLP_MSVC) && ! defined (_STLP_INTERNAL_ITERATOR_H)
-#   include <stl/_iterator.h>
-#  endif
-# endif
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x75)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_UTILITY */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/valarray b/src/STLport/valarray
deleted file mode 100644
index 8acc0b1..0000000
--- a/src/STLport/valarray
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 1999
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */ 
-
-#ifndef _STLP_VALARRAY
-#define _STLP_VALARRAY
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x76
-#  include <stl/_prolog.h>
-# endif
-
-# ifdef _STLP_PRAGMA_ONCE
-#  pragma once
-# endif
-
-#include <stl/_valarray.h>
-
-#if defined (_STLP_WHOLE_VENDOR_STD)
-# include _STLP_NATIVE_HEADER(valarray)
-#endif
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x76)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_VALARRAY */
-
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/vector b/src/STLport/vector
deleted file mode 100644
index 23ae762..0000000
--- a/src/STLport/vector
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- *
- * Copyright (c) 1994
- * Hewlett-Packard Company
- *
- * Copyright (c) 1996,1997
- * Silicon Graphics Computer Systems, Inc.
- *
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#ifndef _STLP_VECTOR
-#define _STLP_VECTOR
-
-# ifndef _STLP_OUTERMOST_HEADER_ID
-#  define _STLP_OUTERMOST_HEADER_ID 0x77
-#  include <stl/_prolog.h>
-# endif
-
-# ifdef _STLP_PRAGMA_ONCE
-#  pragma once
-# endif
-
-# ifndef _STLP_INTERNAL_ALGOBASE_H
-#  include <stl/_algobase.h>
-# endif
-
-#ifndef _STLP_INTERNAL_VECTOR_H
-# include <stl/_vector.h>
-#endif
-
-#if defined (_STLP_IMPORT_VENDOR_STD) && ! defined (_STLP_MINIMUM_IMPORT_STD)
-#  include _STLP_NATIVE_HEADER(vector)
-#endif
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x77)
-#  include <stl/_epilog.h>
-#  undef _STLP_OUTERMOST_HEADER_ID
-# endif
-
-#endif /* _STLP_VECTOR */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/wchar.h b/src/STLport/wchar.h
deleted file mode 100644
index 30608d6..0000000
--- a/src/STLport/wchar.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-# if !defined (_STLP_OUTERMOST_HEADER_ID)
-#  define _STLP_OUTERMOST_HEADER_ID 0x278
-#  include <stl/_prolog.h>
-# elif (_STLP_OUTERMOST_HEADER_ID == 0x278) && ! defined (_STLP_DONT_POP_0x278)
-#  define _STLP_DONT_POP_0x278
-# endif
-
-# if ! defined (_STLP_WINCE) && ! defined (_STLP_NO_WCHAR_T)
-
-# if defined ( __BORLANDC__ ) && (__BORLANDC__) >= 0x530
-// #  include <cstring>
-# include _STLP_NATIVE_CPP_C_HEADER(_str.h)
-using _STLP_VENDOR_CSTD::strlen;
-using _STLP_VENDOR_CSTD::strspn;
-# endif
-
-# if defined (__GNUC__) && defined (__APPLE__)
-#  include _STLP_NATIVE_C_HEADER(stddef.h)
-# else
-#  include _STLP_NATIVE_C_HEADER(wchar.h)
-# endif
-
-# endif /* WINCE */
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x278)
-#  if ! defined (_STLP_DONT_POP_0x278)
-#   include <stl/_epilog.h>
-#   undef  _STLP_OUTERMOST_HEADER_ID
-#   endif
-#   undef  _STLP_DONT_POP_0x278
-# endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/wctype.h b/src/STLport/wctype.h
deleted file mode 100644
index f5de1e1..0000000
--- a/src/STLport/wctype.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-# if !defined (_STLP_OUTERMOST_HEADER_ID)
-#  define _STLP_OUTERMOST_HEADER_ID 0x279
-#  include <stl/_prolog.h>
-# elif (_STLP_OUTERMOST_HEADER_ID == 0x279) && ! defined (_STLP_DONT_POP_0x279)
-#  define _STLP_DONT_POP_0x279
-# endif
-
-# include _STLP_NATIVE_C_HEADER(wctype.h)
-
-# if (_STLP_OUTERMOST_HEADER_ID == 0x279)
-#  if ! defined (_STLP_DONT_POP_0x279)
-#   include <stl/_epilog.h>
-#   undef  _STLP_OUTERMOST_HEADER_ID
-#   endif
-#   undef  _STLP_DONT_POP_0x279
-# endif
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/wrap_std/complex b/src/STLport/wrap_std/complex
deleted file mode 100644
index 0dc4e4e..0000000
--- a/src/STLport/wrap_std/complex
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-# include _STLP_NATIVE_HEADER(complex)
-
-# if defined (_STLP_USE_OWN_NAMESPACE)
-_STLP_BEGIN_NAMESPACE
-
-using _STLP_COMPLEX_NAMESPACE::complex;
-
-using _STLP_COMPLEX_NAMESPACE::real;
-using _STLP_COMPLEX_NAMESPACE::imag;
-using _STLP_COMPLEX_NAMESPACE::abs;
-using _STLP_COMPLEX_NAMESPACE::arg;
-using _STLP_COMPLEX_NAMESPACE::norm;
-
-using _STLP_COMPLEX_NAMESPACE::conj;
-using _STLP_COMPLEX_NAMESPACE::polar;
-
-using _STLP_COMPLEX_NAMESPACE::cos;
-using _STLP_COMPLEX_NAMESPACE::cosh;
-using _STLP_COMPLEX_NAMESPACE::exp;
-using _STLP_COMPLEX_NAMESPACE::log;
-using _STLP_COMPLEX_NAMESPACE::log10;
-using _STLP_COMPLEX_NAMESPACE::pow;
-using _STLP_COMPLEX_NAMESPACE::sin;
-using _STLP_COMPLEX_NAMESPACE::sinh;
-using _STLP_COMPLEX_NAMESPACE::sqrt;
-using _STLP_COMPLEX_NAMESPACE::tan;
-using _STLP_COMPLEX_NAMESPACE::tanh;
-
-_STLP_END_NAMESPACE
-# endif /* USE_OWN_NAMESPACE */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/wrap_std/export b/src/STLport/wrap_std/export
deleted file mode 100644
index f9b7305..0000000
--- a/src/STLport/wrap_std/export
+++ /dev/null
@@ -1,13 +0,0 @@
-./complex
-./export
-./fstream
-./iomanip
-./ios
-./iosfwd
-./iostream
-./istream
-./locale
-./ostream
-./sstream
-./streambuf
-./strstream
diff --git a/src/STLport/wrap_std/fstream b/src/STLport/wrap_std/fstream
deleted file mode 100644
index b69e024..0000000
--- a/src/STLport/wrap_std/fstream
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-# if defined (_STLP_USE_NEW_IOSTREAMS)
-# include _STLP_NATIVE_HEADER(fstream)
-# if defined (_STLP_USE_OWN_NAMESPACE)
-_STLP_BEGIN_NAMESPACE
-# include <using/fstream>
-_STLP_END_NAMESPACE
-# endif /* _STLP_OWN_NAMESPACE */
-# else
-# include <wrap_std/h/fstream.h>
-# endif /* _STLP_USE_NEW_IOSTREAMS */
diff --git a/src/STLport/wrap_std/h/fstream.h b/src/STLport/wrap_std/h/fstream.h
deleted file mode 100644
index 27192c3..0000000
--- a/src/STLport/wrap_std/h/fstream.h
+++ /dev/null
@@ -1,7 +0,0 @@
-# include _STLP_NATIVE_OLD_STREAMS_HEADER(fstream.h)
-# if defined  (_STLP_USE_NAMESPACES) && ! defined (_STLP_BROKEN_USING_DIRECTIVE)
-_STLP_BEGIN_NAMESPACE
-#  include <using/h/fstream.h>
-_STLP_END_NAMESPACE
-# endif /* _STLP_OWN_NAMESPACE */
-
diff --git a/src/STLport/wrap_std/h/iostream.h b/src/STLport/wrap_std/h/iostream.h
deleted file mode 100644
index b523af6..0000000
--- a/src/STLport/wrap_std/h/iostream.h
+++ /dev/null
@@ -1,11 +0,0 @@
-// # ifndef  _STLP_NO_WCHAR_T
-// #   include <wchar.h>
-// # endif
-
-# include _STLP_NATIVE_OLD_STREAMS_HEADER(iostream.h)
-
-# if defined (_STLP_USE_OWN_NAMESPACE)
-_STLP_BEGIN_NAMESPACE
-# include <using/h/iostream.h>
-_STLP_END_NAMESPACE
-# endif /* _STLP_USE_OWN_NAMESPACE */
diff --git a/src/STLport/wrap_std/h/streambuf.h b/src/STLport/wrap_std/h/streambuf.h
deleted file mode 100644
index 37fc08f..0000000
--- a/src/STLport/wrap_std/h/streambuf.h
+++ /dev/null
@@ -1,9 +0,0 @@
-//*TY 02/11/2000 - added missing header file
-
-# include _STLP_NATIVE_OLD_STREAMS_HEADER(iostream.h)
-
-# if defined (_STLP_USE_OWN_NAMESPACE)
-_STLP_BEGIN_NAMESPACE
-# include <using/h/streambuf.h>
-_STLP_END_NAMESPACE
-# endif /* _STLP_USE_OWN_NAMESPACE */
diff --git a/src/STLport/wrap_std/h/strstream.h b/src/STLport/wrap_std/h/strstream.h
deleted file mode 100644
index bf271be..0000000
--- a/src/STLport/wrap_std/h/strstream.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-#  if defined (_MSC_VER) && (_MSC_VER <= 1200)
-#   include _STLP_NATIVE_OLD_STREAMS_HEADER(strstrea.h)
-#  else
-#   include _STLP_NATIVE_OLD_STREAMS_HEADER(strstream.h)
-#  endif
-
-# ifdef _STLP_USE_OWN_NAMESPACE
-_STLP_BEGIN_NAMESPACE
-#  include <using/h/strstream.h>
-_STLP_END_NAMESPACE
-#endif /* _STLP_OWN_NAMESPACE */
-
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/wrap_std/iomanip b/src/STLport/wrap_std/iomanip
deleted file mode 100644
index 6c93073..0000000
--- a/src/STLport/wrap_std/iomanip
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-# if defined (_STLP_USE_NEW_IOSTREAMS)
-
-#  include _STLP_NATIVE_HEADER(iomanip)
-
-#  ifdef _STLP_USE_OWN_NAMESPACE
-_STLP_BEGIN_NAMESPACE
-#   include <using/iomanip>
-_STLP_END_NAMESPACE
-#  endif /* _STLP_OWN_NAMESPACE */
-
-# else
-
-#  include _STLP_NATIVE_OLD_STREAMS_HEADER(iomanip.h)
-
-# if defined  (_STLP_USE_NAMESPACES) && ! defined (_STLP_BROKEN_USING_DIRECTIVE)
-_STLP_BEGIN_NAMESPACE
-#   include <using/h/iomanip.h>
-_STLP_END_NAMESPACE
-#  endif /* _STLP_USE_OWN_NAMESPACE */
-
-# endif /* _STLP_USE_NEW_IOSTREAMS */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/wrap_std/ios b/src/STLport/wrap_std/ios
deleted file mode 100644
index 765f4c9..0000000
--- a/src/STLport/wrap_std/ios
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-# if defined (_STLP_USE_NEW_IOSTREAMS)
-#  include _STLP_NATIVE_HEADER(ios)
-# ifdef _STLP_USE_OWN_NAMESPACE
-_STLP_BEGIN_NAMESPACE
-#  include <using/ios>
-_STLP_END_NAMESPACE
-#endif /* _STLP_OWN_NAMESPACE */
-# else
-#  include <wrap_std/h/iostream.h>
-# endif /* USE_NEW_IOSTREAMS */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/wrap_std/iosfwd b/src/STLport/wrap_std/iosfwd
deleted file mode 100644
index 0582bda..0000000
--- a/src/STLport/wrap_std/iosfwd
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-# ifndef _STLP_CSTDDEF
-#  include <cstddef> /* wchar_t */
-# endif
-
-# ifndef _STLP_CSTRING
-#  include <cstring>
-# endif
-
-# if defined (_STLP_USE_NEW_IOSTREAMS)
-
-#   include _STLP_NATIVE_HEADER(iosfwd)
-
-#  if defined ( __MWERKS__ ) || defined (__KCC)
-// MSL leaves a few important things out of <iosfwd>.
-// We expect this to be fixed in later MSL implementations
-# if !defined( __MSL_CPP__ ) || __MSL_CPP__ <= 0x4105
-
-#    ifdef MSIPL_USING_NAMESPACE
-namespace std {
-#    endif
-
-// A few things that seem to be missing from CodeWarrior's <iosfwd>
-#    ifdef __MWERKS__
-template <class charT, class traits = char_traits<charT> >
-  class istreambuf_iterator;
-
-template <class charT, class traits = char_traits<charT> >
-  class ostreambuf_iterator;
-#    endif /* __MWERKS__ */
-
-#  if defined (_STLP_NO_NATIVE_WIDE_STREAMS)
-class streampos;
-#  endif
-
-#  ifdef MSIPL_USING_NAMESPACE
-	} // namespace std
-#    endif
-
-#   endif    /* __MSL__ version */
-#  endif  /* MWERKS */
-
-# else 
-
-_STLP_BEGIN_NAMESPACE
-template <class _Tp> class allocator;
-_STLP_END_NAMESPACE
-
-// use old-style iostreams
-#  include <iostream.h>
-#  include <fstream.h>
-
-#ifndef _STLP_CHAR_TRAITS_H
-// that defines char_traits or imports std::char_traits
-# include <stl/char_traits.h>
-#endif
-
-# endif /* _STLP_USE_NEW_IOSTREAMS */
-
-# ifdef _STLP_USE_ABBREVS
-#  define istream_iterator               _iS__It
-#  define ostream_iterator               _oS__It
-# endif
-
-# if  defined (_STLP_USE_OWN_NAMESPACE)
-_STLP_BEGIN_NAMESPACE
-#  include <using/iosfwd>
-_STLP_END_NAMESPACE
-# endif 
-
-// Local Variables:
-// mode:C++
-// End:
-
-
-
-
-
-
-
diff --git a/src/STLport/wrap_std/iostream b/src/STLport/wrap_std/iostream
deleted file mode 100644
index 4f522df..0000000
--- a/src/STLport/wrap_std/iostream
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-# if defined (_STLP_MSVC) && (_STLP_MSVC < 1200)
-#  include <cwchar>
-// lower ifdef level
-#  include <ios>
-# endif
-
-# if defined (_STLP_USE_NEW_IOSTREAMS)
-#  include _STLP_NATIVE_HEADER(iostream)
-#   if defined  (_STLP_USE_OWN_NAMESPACE)
-_STLP_BEGIN_NAMESPACE
-#    include <using/iostream>
-_STLP_END_NAMESPACE
-#  endif
-# else
-#  include <wrap_std/h/iostream.h>
-# endif /* _STLP_USE_NEW_STYLE_IOSTREAMS */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/wrap_std/istream b/src/STLport/wrap_std/istream
deleted file mode 100644
index 8d3647a..0000000
--- a/src/STLport/wrap_std/istream
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-# if defined (_STLP_MSVC) && (_STLP_MSVC < 1200)
-// #  include <cwchar>
-// lower ifdef level
-#  include <ios>
-# endif
-
-# if defined (_STLP_USE_NEW_IOSTREAMS)
-
-# include _STLP_NATIVE_HEADER(istream)
-
-# if defined  (_STLP_USE_OWN_NAMESPACE)
-_STLP_BEGIN_NAMESPACE
-#  include <using/istream>
-_STLP_END_NAMESPACE
-#  endif /* _STLP_OWN_NAMESPACE */
-
-# else
-
-# include _STLP_NATIVE_OLD_STREAMS_HEADER(iostream.h)
-# if defined  (_STLP_USE_NAMESPACES)
-_STLP_BEGIN_NAMESPACE
-using ::istream;
-// using ::ws;
-_STLP_END_NAMESPACE
-# endif /* NAMESPACES */
-
-# endif /* if defined (_STLP_USE_NEW_IOSTREAMS) */
-
-// Local Variables:
-// mode:C++
-// End:
-
diff --git a/src/STLport/wrap_std/locale b/src/STLport/wrap_std/locale
deleted file mode 100644
index 5c7e125..0000000
--- a/src/STLport/wrap_std/locale
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-# ifndef _STLP_CSTDLIB
-#  include <cstdlib>
-# endif
-
-# include _STLP_NATIVE_HEADER(locale)
-
-# ifdef _STLP_USE_OWN_NAMESPACE
-_STLP_BEGIN_NAMESPACE
-#  include <using/locale>
-_STLP_END_NAMESPACE
-#endif /* _STLP_OWN_NAMESPACE */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/wrap_std/ostream b/src/STLport/wrap_std/ostream
deleted file mode 100644
index d6d4fa8..0000000
--- a/src/STLport/wrap_std/ostream
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-# if defined (_STLP_MSVC) && (_STLP_MSVC < 1200)
-// #  include <cwchar>
-// lower ifdef level
-#  include <ios>
-# endif
-
-# if defined (_STLP_USE_NEW_IOSTREAMS) || defined (__IN_STLPORT_OSTREAM)
-
-#  include _STLP_NATIVE_HEADER(ostream)
-
-#  if defined (_STLP_USE_OWN_NAMESPACE)
-_STLP_BEGIN_NAMESPACE
-# include <using/ostream>
-_STLP_END_NAMESPACE
-#   endif /* _STLP_OWN_NAMESPACE */
-
-# else
-
-#  include _STLP_NATIVE_OLD_STREAMS_HEADER(iostream.h)
-
-# if defined  (_STLP_USE_NAMESPACES) && ! defined (_STLP_BROKEN_USING_DIRECTIVE)
-_STLP_BEGIN_NAMESPACE
-# include <using/h/ostream.h>
-_STLP_END_NAMESPACE
-#   endif /* _STLP_NAMESPACE */
-# endif /* if defined (_STLP_USE_NEW_IOSTREAMS) */
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/wrap_std/sstream b/src/STLport/wrap_std/sstream
deleted file mode 100644
index 086c512..0000000
--- a/src/STLport/wrap_std/sstream
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-# include _STLP_NATIVE_HEADER(sstream)
-# ifdef _STLP_USE_OWN_NAMESPACE
-_STLP_BEGIN_NAMESPACE
-#  include <using/sstream>
-_STLP_END_NAMESPACE
-#endif /* _STLP_OWN_NAMESPACE */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/wrap_std/streambuf b/src/STLport/wrap_std/streambuf
deleted file mode 100644
index 2c0dc58..0000000
--- a/src/STLport/wrap_std/streambuf
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-# if defined (_STLP_USE_NEW_IOSTREAMS)
-#  include _STLP_NATIVE_HEADER(streambuf)
-# else
-#  include <wrap_std/h/streambuf.h>		
-# endif
-
-# if defined (_STLP_USE_OWN_NAMESPACE) && defined (_STLP_USE_NEW_IOSTREAMS)
-_STLP_BEGIN_NAMESPACE
-#  include <using/streambuf> 
-_STLP_END_NAMESPACE
-# endif /* _STLP_OWN_NAMESPACE */
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/STLport/wrap_std/strstream b/src/STLport/wrap_std/strstream
deleted file mode 100644
index 28164cc..0000000
--- a/src/STLport/wrap_std/strstream
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Copyright (c) 1999 
- * Boris Fomitchev
- *
- * This material is provided "as is", with absolutely no warranty expressed
- * or implied. Any use is at your own risk.
- *
- * Permission to use or copy this software for any purpose is hereby granted 
- * without fee, provided the above notices are retained on all copies.
- * Permission to modify the code and to distribute modified code is granted,
- * provided the above notices are retained, and a notice that the code was
- * modified is included with the above copyright notice.
- *
- */
-
-# include _STLP_NATIVE_HEADER(strstream)
-
-# ifdef _STLP_USE_OWN_NAMESPACE
-_STLP_BEGIN_NAMESPACE
-#  include <using/strstream>
-_STLP_END_NAMESPACE
-#endif /* _STLP_OWN_NAMESPACE */
-
-
-// Local Variables:
-// mode:C++
-// End:
diff --git a/src/shapelib/dbfopen.c b/src/shapelib/dbfopen.c
deleted file mode 100644
index edcab76..0000000
--- a/src/shapelib/dbfopen.c
+++ /dev/null
@@ -1,1542 +0,0 @@
-/******************************************************************************
- * $Id: dbfopen.c,v 1.5 2004/11/01 15:11:39 juan Exp $
- *
- * Project:  Shapelib
- * Purpose:  Implementation of .dbf access API documented in dbf_api.html.
- * Author:   Frank Warmerdam, warmerdam at pobox.com
- *
- ******************************************************************************
- * Copyright (c) 1999, Frank Warmerdam
- *
- * This software is available under the following "MIT Style" license,
- * or at the option of the licensee under the LGPL (see LICENSE.LGPL).  This
- * option is discussed in more detail in shapelib.html.
- *
- * --
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- ******************************************************************************
- *
- * $Log: dbfopen.c,v $
- * Revision 1.5  2004/11/01 15:11:39  juan
- * Warnings removidos
- *
- * Revision 1.4  2004/04/29 14:48:57  lubia
- * modificacao de tempo
- *
- * Revision 1.3  2004/02/20 14:10:42  lubia
- * Migrando para ultima versao da shapelib: 1.2.10
- *
- * Revision 1.48  2003/03/10 14:51:27  warmerda
- * DBFWrite* calls now return FALSE if they have to truncate
- *
- * Revision 1.47  2002/11/20 03:32:22  warmerda
- * Ensure field name in DBFGetFieldIndex() is properly terminated.
- *
- * Revision 1.46  2002/10/09 13:10:21  warmerda
- * Added check that width is positive.
- *
- * Revision 1.45  2002/09/29 00:00:08  warmerda
- * added FTLogical and logical attribute read/write calls
- *
- * Revision 1.44  2002/05/07 13:46:11  warmerda
- * Added DBFWriteAttributeDirectly().
- *
- * Revision 1.43  2002/02/13 19:39:21  warmerda
- * Fix casting issues in DBFCloneEmpty().
- *
- * Revision 1.42  2002/01/15 14:36:07  warmerda
- * updated email address
- *
- * Revision 1.41  2002/01/15 14:31:49  warmerda
- * compute rather than copying nHeaderLength in DBFCloneEmpty()
- *
- * Revision 1.40  2002/01/09 04:32:35  warmerda
- * fixed to read correct amount of header
- *
- * Revision 1.39  2001/12/11 22:41:03  warmerda
- * improve io related error checking when reading header
- *
- * Revision 1.38  2001/11/28 16:07:31  warmerda
- * Cleanup to avoid compiler warnings as suggested by Richard Hash.
- *
- * Revision 1.37  2001/07/04 05:18:09  warmerda
- * do last fix properly
- *
- * Revision 1.36  2001/07/04 05:16:09  warmerda
- * fixed fieldname comparison in DBFGetFieldIndex
- *
- * Revision 1.35  2001/06/22 02:10:06  warmerda
- * fixed NULL shape support with help from Jim Matthews
- *
- * Revision 1.33  2001/05/31 19:20:13  warmerda
- * added DBFGetFieldIndex()
- *
- * Revision 1.32  2001/05/31 18:15:40  warmerda
- * Added support for NULL fields in DBF files
- *
- * Revision 1.31  2001/05/23 13:36:52  warmerda
- * added use of SHPAPI_CALL
- *
- * Revision 1.30  2000/12/05 14:43:38  warmerda
- * DBReadAttribute() white space trimming bug fix
- *
- * Revision 1.29  2000/10/05 14:36:44  warmerda
- * fix bug with writing very wide numeric fields
- *
- * Revision 1.28  2000/09/25 14:18:07  warmerda
- * Added some casts of strlen() return result to fix warnings on some
- * systems, as submitted by Daniel.
- *
- * Revision 1.27  2000/09/25 14:15:51  warmerda
- * added DBFGetNativeFieldType()
- *
- * Revision 1.26  2000/07/07 13:39:45  warmerda
- * removed unused variables, and added system include files
- *
- * Revision 1.25  2000/05/29 18:19:13  warmerda
- * avoid use of uchar, and adding casting fix
- *
- * Revision 1.24  2000/05/23 13:38:27  warmerda
- * Added error checks on return results of fread() and fseek().
- *
- * Revision 1.23  2000/05/23 13:25:49  warmerda
- * Avoid crashing if field or record are out of range in dbfread*attribute().
- *
- * Revision 1.22  1999/12/15 13:47:24  warmerda
- * Added stdlib.h to ensure that atof() is prototyped.
- *
- * Revision 1.21  1999/12/13 17:25:46  warmerda
- * Added support for upper case .DBF extention.
- *
- * Revision 1.20  1999/11/30 16:32:11  warmerda
- * Use atof() instead of sscanf().
- *
- * Revision 1.19  1999/11/05 14:12:04  warmerda
- * updated license terms
- *
- * Revision 1.18  1999/07/27 00:53:28  warmerda
- * ensure that whole old field value clear on write of string
- *
- * Revision 1.1  1999/07/05 18:58:07  warmerda
- * New
- *
- * Revision 1.17  1999/06/11 19:14:12  warmerda
- * Fixed some memory leaks.
- *
- * Revision 1.16  1999/06/11 19:04:11  warmerda
- * Remoted some unused variables.
- *
- * Revision 1.15  1999/05/11 03:19:28  warmerda
- * added new Tuple api, and improved extension handling - add from candrsn
- *
- * Revision 1.14  1999/05/04 15:01:48  warmerda
- * Added 'F' support.
- *
- * Revision 1.13  1999/03/23 17:38:59  warmerda
- * DBFAddField() now actually does return the new field number, or -1 if
- * it fails.
- *
- * Revision 1.12  1999/03/06 02:54:46  warmerda
- * Added logic to convert shapefile name to dbf filename in DBFOpen()
- * for convenience.
- *
- * Revision 1.11  1998/12/31 15:30:34  warmerda
- * Improved the interchangability of numeric and string attributes.  Add
- * white space trimming option for attributes.
- *
- * Revision 1.10  1998/12/03 16:36:44  warmerda
- * Use r+b instead of rb+ for binary access.
- *
- * Revision 1.9  1998/12/03 15:34:23  warmerda
- * Updated copyright message.
- *
- * Revision 1.8  1997/12/04 15:40:15  warmerda
- * Added newline character after field definitions.
- *
- * Revision 1.7  1997/03/06 14:02:10  warmerda
- * Ensure bUpdated is initialized.
- *
- * Revision 1.6  1996/02/12 04:54:41  warmerda
- * Ensure that DBFWriteAttribute() returns TRUE if it succeeds.
- *
- * Revision 1.5  1995/10/21  03:15:12  warmerda
- * Changed to use binary file access, and ensure that the
- * field name field is zero filled, and limited to 10 chars.
- *
- * Revision 1.4  1995/08/24  18:10:42  warmerda
- * Added use of SfRealloc() to avoid pre-ANSI realloc() functions such
- * as on the Sun.
- *
- * Revision 1.3  1995/08/04  03:15:16  warmerda
- * Fixed up header.
- *
- * Revision 1.2  1995/08/04  03:14:43  warmerda
- * Added header.
- */
-
-/* static char rcsid[] = 
-  "$Id: dbfopen.c,v 1.5 2004/11/01 15:11:39 juan Exp $"; */
-
-#include "shapefil.h"
-
-#include <math.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <string.h>
-
-#ifndef FALSE
-#  define FALSE		0
-#  define TRUE		1
-#endif
-
-static int	nStringFieldLen = 0;
-static char * pszStringField = NULL;
-
-/************************************************************************/
-/*                             SfRealloc()                              */
-/*                                                                      */
-/*      A realloc cover function that will access a NULL pointer as     */
-/*      a valid input.                                                  */
-/************************************************************************/
-
-static void * SfRealloc( void * pMem, int nNewSize )
-
-{
-    if( pMem == NULL )
-        return( (void *) malloc(nNewSize) );
-    else
-        return( (void *) realloc(pMem,nNewSize) );
-}
-
-/************************************************************************/
-/*                           DBFWriteHeader()                           */
-/*                                                                      */
-/*      This is called to write out the file header, and field          */
-/*      descriptions before writing any actual data records.  This      */
-/*      also computes all the DBFDataSet field offset/size/decimals     */
-/*      and so forth values.                                            */
-/************************************************************************/
-
-static void DBFWriteHeader(DBFHandle psDBF)
-
-{
-    unsigned char	abyHeader[XBASE_FLDHDR_SZ];
-    int		i;
-
-    if( !psDBF->bNoHeader )
-        return;
-
-    psDBF->bNoHeader = FALSE;
-
-/* -------------------------------------------------------------------- */
-/*	Initialize the file header information.				*/
-/* -------------------------------------------------------------------- */
-    for( i = 0; i < XBASE_FLDHDR_SZ; i++ )
-        abyHeader[i] = 0;
-
-    abyHeader[0] = 0x03;		/* memo field? - just copying 	*/
-
-    /* date updated on close, record count preset at zero */
-
-    abyHeader[8] = psDBF->nHeaderLength % 256;
-    abyHeader[9] = psDBF->nHeaderLength / 256;
-    
-    abyHeader[10] = psDBF->nRecordLength % 256;
-    abyHeader[11] = psDBF->nRecordLength / 256;
-
-/* -------------------------------------------------------------------- */
-/*      Write the initial 32 byte file header, and all the field        */
-/*      descriptions.                                     		*/
-/* -------------------------------------------------------------------- */
-    fseek( psDBF->fp, 0, 0 );
-    fwrite( abyHeader, XBASE_FLDHDR_SZ, 1, psDBF->fp );
-    fwrite( psDBF->pszHeader, XBASE_FLDHDR_SZ, psDBF->nFields, psDBF->fp );
-
-/* -------------------------------------------------------------------- */
-/*      Write out the newline character if there is room for it.        */
-/* -------------------------------------------------------------------- */
-    if( psDBF->nHeaderLength > 32*psDBF->nFields + 32 )
-    {
-        char	cNewline;
-
-        cNewline = 0x0d;
-        fwrite( &cNewline, 1, 1, psDBF->fp );
-    }
-}
-
-/************************************************************************/
-/*                           DBFFlushRecord()                           */
-/*                                                                      */
-/*      Write out the current record if there is one.                   */
-/************************************************************************/
-
-static void DBFFlushRecord( DBFHandle psDBF )
-
-{
-    int		nRecordOffset;
-
-    if( psDBF->bCurrentRecordModified && psDBF->nCurrentRecord > -1 )
-    {
-	psDBF->bCurrentRecordModified = FALSE;
-
-	nRecordOffset = psDBF->nRecordLength * psDBF->nCurrentRecord 
-	                                             + psDBF->nHeaderLength;
-
-	fseek( psDBF->fp, nRecordOffset, 0 );
-	fwrite( psDBF->pszCurrentRecord, psDBF->nRecordLength, 1, psDBF->fp );
-    }
-}
-
-/************************************************************************/
-/*                              DBFOpen()                               */
-/*                                                                      */
-/*      Open a .dbf file.                                               */
-/************************************************************************/
-   
-DBFHandle SHPAPI_CALL
-DBFOpen( const char * pszFilename, const char * pszAccess )
-
-{
-    DBFHandle		psDBF;
-    unsigned char		*pabyBuf;
-    int			nFields, nHeadLen, nRecLen, iField, i;
-    char		*pszBasename, *pszFullname;
-
-/* -------------------------------------------------------------------- */
-/*      We only allow the access strings "rb" and "r+".                  */
-/* -------------------------------------------------------------------- */
-    if( strcmp(pszAccess,"r") != 0 && strcmp(pszAccess,"r+") != 0 
-        && strcmp(pszAccess,"rb") != 0 && strcmp(pszAccess,"rb+") != 0
-        && strcmp(pszAccess,"r+b") != 0 )
-        return( NULL );
-
-    if( strcmp(pszAccess,"r") == 0 )
-        pszAccess = "rb";
- 
-    if( strcmp(pszAccess,"r+") == 0 )
-        pszAccess = "rb+";
-
-/* -------------------------------------------------------------------- */
-/*	Compute the base (layer) name.  If there is any extension	*/
-/*	on the passed in filename we will strip it off.			*/
-/* -------------------------------------------------------------------- */
-    pszBasename = (char *) malloc(strlen(pszFilename)+5);
-    strcpy( pszBasename, pszFilename );
-    for( i = strlen(pszBasename)-1; 
-	 i > 0 && pszBasename[i] != '.' && pszBasename[i] != '/'
-	       && pszBasename[i] != '\\';
-	 i-- ) {}
-
-    if( pszBasename[i] == '.' )
-        pszBasename[i] = '\0';
-
-    pszFullname = (char *) malloc(strlen(pszBasename) + 5);
-    sprintf( pszFullname, "%s.dbf", pszBasename );
-        
-    psDBF = (DBFHandle) calloc( 1, sizeof(DBFInfo) );
-    psDBF->fp = fopen( pszFullname, pszAccess );
-
-    if( psDBF->fp == NULL )
-    {
-        sprintf( pszFullname, "%s.DBF", pszBasename );
-        psDBF->fp = fopen(pszFullname, pszAccess );
-    }
-    
-    free( pszBasename );
-    free( pszFullname );
-    
-    if( psDBF->fp == NULL )
-    {
-        free( psDBF );
-        return( NULL );
-    }
-
-    psDBF->bNoHeader = FALSE;
-    psDBF->nCurrentRecord = -1;
-    psDBF->bCurrentRecordModified = FALSE;
-
-/* -------------------------------------------------------------------- */
-/*  Read Table Header info                                              */
-/* -------------------------------------------------------------------- */
-    pabyBuf = (unsigned char *) malloc(500);
-    if( fread( pabyBuf, 32, 1, psDBF->fp ) != 1 )
-    {
-        fclose( psDBF->fp );
-        free( pabyBuf );
-        free( psDBF );
-        return NULL;
-    }
-
-    psDBF->nRecords = 
-     pabyBuf[4] + pabyBuf[5]*256 + pabyBuf[6]*256*256 + pabyBuf[7]*256*256*256;
-
-    psDBF->nHeaderLength = nHeadLen = pabyBuf[8] + pabyBuf[9]*256;
-    psDBF->nRecordLength = nRecLen = pabyBuf[10] + pabyBuf[11]*256;
-    
-    psDBF->nFields = nFields = (nHeadLen - 32) / 32;
-
-    psDBF->pszCurrentRecord = (char *) malloc(nRecLen);
-
-/* -------------------------------------------------------------------- */
-/*  Read in Field Definitions                                           */
-/* -------------------------------------------------------------------- */
-    
-    pabyBuf = (unsigned char *) SfRealloc(pabyBuf,nHeadLen);
-    psDBF->pszHeader = (char *) pabyBuf;
-
-    fseek( psDBF->fp, 32, 0 );
-    if( fread( pabyBuf, nHeadLen-32, 1, psDBF->fp ) != 1 )
-    {
-        fclose( psDBF->fp );
-        free( pabyBuf );
-        free( psDBF );
-        return NULL;
-    }
-
-    psDBF->panFieldOffset = (int *) malloc(sizeof(int) * nFields);
-    psDBF->panFieldSize = (int *) malloc(sizeof(int) * nFields);
-    psDBF->panFieldDecimals = (int *) malloc(sizeof(int) * nFields);
-    psDBF->pachFieldType = (char *) malloc(sizeof(char) * nFields);
-
-    for( iField = 0; iField < nFields; iField++ )
-    {
-	unsigned char		*pabyFInfo;
-
-	pabyFInfo = pabyBuf+iField*32;
-
-	if( pabyFInfo[11] == 'N' || pabyFInfo[11] == 'F' )
-	{
-	    psDBF->panFieldSize[iField] = pabyFInfo[16];
-	    psDBF->panFieldDecimals[iField] = pabyFInfo[17];
-	}
-	else
-	{
-	    psDBF->panFieldSize[iField] = pabyFInfo[16] + pabyFInfo[17]*256;
-	    psDBF->panFieldDecimals[iField] = 0;
-	}
-
-	psDBF->pachFieldType[iField] = (char) pabyFInfo[11];
-	if( iField == 0 )
-	    psDBF->panFieldOffset[iField] = 1;
-	else
-	    psDBF->panFieldOffset[iField] = 
-	      psDBF->panFieldOffset[iField-1] + psDBF->panFieldSize[iField-1];
-    }
-
-    return( psDBF );
-}
-
-/************************************************************************/
-/*                              DBFClose()                              */
-/************************************************************************/
-
-void SHPAPI_CALL
-DBFClose(DBFHandle psDBF)
-{
-/* -------------------------------------------------------------------- */
-/*      Write out header if not already written.                        */
-/* -------------------------------------------------------------------- */
-    if( psDBF->bNoHeader )
-        DBFWriteHeader( psDBF );
-
-    DBFFlushRecord( psDBF );
-
-/* -------------------------------------------------------------------- */
-/*      Update last access date, and number of records if we have	*/
-/*	write access.                					*/
-/* -------------------------------------------------------------------- */
-    if( psDBF->bUpdated )
-    {
-	unsigned char		abyFileHeader[32];
-
-	fseek( psDBF->fp, 0, 0 );
-	fread( abyFileHeader, 32, 1, psDBF->fp );
-
-	abyFileHeader[1] = 95;			/* YY */
-	abyFileHeader[2] = 7;			/* MM */
-	abyFileHeader[3] = 26;			/* DD */
-
-	abyFileHeader[4] = psDBF->nRecords % 256;
-	abyFileHeader[5] = (psDBF->nRecords/256) % 256;
-	abyFileHeader[6] = (psDBF->nRecords/(256*256)) % 256;
-	abyFileHeader[7] = (psDBF->nRecords/(256*256*256)) % 256;
-
-	fseek( psDBF->fp, 0, 0 );
-	fwrite( abyFileHeader, 32, 1, psDBF->fp );
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Close, and free resources.                                      */
-/* -------------------------------------------------------------------- */
-    fclose( psDBF->fp );
-
-    if( psDBF->panFieldOffset != NULL )
-    {
-        free( psDBF->panFieldOffset );
-        free( psDBF->panFieldSize );
-        free( psDBF->panFieldDecimals );
-        free( psDBF->pachFieldType );
-    }
-
-    free( psDBF->pszHeader );
-    free( psDBF->pszCurrentRecord );
-
-    free( psDBF );
-
-    if( pszStringField != NULL )
-    {
-        free( pszStringField );
-        pszStringField = NULL;
-        nStringFieldLen = 0;
-    }
-}
-
-/************************************************************************/
-/*                             DBFCreate()                              */
-/*                                                                      */
-/*      Create a new .dbf file.                                         */
-/************************************************************************/
-
-DBFHandle SHPAPI_CALL
-DBFCreate( const char * pszFilename )
-
-{
-    DBFHandle	psDBF;
-    FILE	*fp;
-    char	*pszFullname, *pszBasename;
-    int		i;
-
-/* -------------------------------------------------------------------- */
-/*	Compute the base (layer) name.  If there is any extension	*/
-/*	on the passed in filename we will strip it off.			*/
-/* -------------------------------------------------------------------- */
-    pszBasename = (char *) malloc(strlen(pszFilename)+5);
-    strcpy( pszBasename, pszFilename );
-    for( i = strlen(pszBasename)-1; 
-	 i > 0 && pszBasename[i] != '.' && pszBasename[i] != '/'
-	       && pszBasename[i] != '\\';
-	 i-- ) {}
-
-    if( pszBasename[i] == '.' )
-        pszBasename[i] = '\0';
-
-    pszFullname = (char *) malloc(strlen(pszBasename) + 5);
-    sprintf( pszFullname, "%s.dbf", pszBasename );
-    free( pszBasename );
-
-/* -------------------------------------------------------------------- */
-/*      Create the file.                                                */
-/* -------------------------------------------------------------------- */
-    fp = fopen( pszFullname, "wb" );
-    if( fp == NULL )
-        return( NULL );
-
-    fputc( 0, fp );
-    fclose( fp );
-
-    fp = fopen( pszFullname, "rb+" );
-    if( fp == NULL )
-        return( NULL );
-
-    free( pszFullname );
-
-/* -------------------------------------------------------------------- */
-/*	Create the info structure.					*/
-/* -------------------------------------------------------------------- */
-    psDBF = (DBFHandle) malloc(sizeof(DBFInfo));
-
-    psDBF->fp = fp;
-    psDBF->nRecords = 0;
-    psDBF->nFields = 0;
-    psDBF->nRecordLength = 1;
-    psDBF->nHeaderLength = 33;
-    
-    psDBF->panFieldOffset = NULL;
-    psDBF->panFieldSize = NULL;
-    psDBF->panFieldDecimals = NULL;
-    psDBF->pachFieldType = NULL;
-    psDBF->pszHeader = NULL;
-
-    psDBF->nCurrentRecord = -1;
-    psDBF->bCurrentRecordModified = FALSE;
-    psDBF->pszCurrentRecord = NULL;
-
-    psDBF->bNoHeader = TRUE;
-
-    return( psDBF );
-}
-
-/************************************************************************/
-/*                            DBFAddField()                             */
-/*                                                                      */
-/*      Add a field to a newly created .dbf file before any records     */
-/*      are written.                                                    */
-/************************************************************************/
-
-int SHPAPI_CALL
-DBFAddField(DBFHandle psDBF, const char * pszFieldName, 
-            DBFFieldType eType, int nWidth, int nDecimals )
-
-{
-    char	*pszFInfo;
-    int		i;
-
-/* -------------------------------------------------------------------- */
-/*      Do some checking to ensure we can add records to this file.     */
-/* -------------------------------------------------------------------- */
-    if( psDBF->nRecords > 0 )
-        return( -1 );
-
-    if( !psDBF->bNoHeader )
-        return( -1 );
-
-    if( eType != FTDouble && nDecimals != 0 )
-        return( -1 );
-
-    if( nWidth < 1 )
-        return -1;
-
-/* -------------------------------------------------------------------- */
-/*      SfRealloc all the arrays larger to hold the additional field      */
-/*      information.                                                    */
-/* -------------------------------------------------------------------- */
-    psDBF->nFields++;
-
-    psDBF->panFieldOffset = (int *) 
-      SfRealloc( psDBF->panFieldOffset, sizeof(int) * psDBF->nFields );
-
-    psDBF->panFieldSize = (int *) 
-      SfRealloc( psDBF->panFieldSize, sizeof(int) * psDBF->nFields );
-
-    psDBF->panFieldDecimals = (int *) 
-      SfRealloc( psDBF->panFieldDecimals, sizeof(int) * psDBF->nFields );
-
-    psDBF->pachFieldType = (char *) 
-      SfRealloc( psDBF->pachFieldType, sizeof(char) * psDBF->nFields );
-
-/* -------------------------------------------------------------------- */
-/*      Assign the new field information fields.                        */
-/* -------------------------------------------------------------------- */
-    psDBF->panFieldOffset[psDBF->nFields-1] = psDBF->nRecordLength;
-    psDBF->nRecordLength += nWidth;
-    psDBF->panFieldSize[psDBF->nFields-1] = nWidth;
-    psDBF->panFieldDecimals[psDBF->nFields-1] = nDecimals;
-
-    if( eType == FTDate )
-        psDBF->pachFieldType[psDBF->nFields-1] = 'D';
-    else if( eType == FTLogical )
-        psDBF->pachFieldType[psDBF->nFields-1] = 'L';
-    else if( eType == FTString )
-        psDBF->pachFieldType[psDBF->nFields-1] = 'C';
-    else
-        psDBF->pachFieldType[psDBF->nFields-1] = 'N';
-
-/* -------------------------------------------------------------------- */
-/*      Extend the required header information.                         */
-/* -------------------------------------------------------------------- */
-    psDBF->nHeaderLength += 32;
-    psDBF->bUpdated = FALSE;
-
-    psDBF->pszHeader = (char *) SfRealloc(psDBF->pszHeader,psDBF->nFields*32);
-
-    pszFInfo = psDBF->pszHeader + 32 * (psDBF->nFields-1);
-
-    for( i = 0; i < 32; i++ )
-        pszFInfo[i] = '\0';
-
-    if( (int) strlen(pszFieldName) < 10 )
-        strncpy( pszFInfo, pszFieldName, strlen(pszFieldName));
-    else
-        strncpy( pszFInfo, pszFieldName, 10);
-
-    pszFInfo[11] = psDBF->pachFieldType[psDBF->nFields-1];
-
-    if( eType == FTDate )
-    {
-        pszFInfo[16] = 8 % 256;
-        pszFInfo[17] = 8 / 256;
-    }
-    else if( eType == FTString )
-    {
-        pszFInfo[16] = nWidth % 256;
-        pszFInfo[17] = nWidth / 256;
-    }
-    else
-    {
-        pszFInfo[16] = nWidth;
-        pszFInfo[17] = nDecimals;
-    }
-    
-/* -------------------------------------------------------------------- */
-/*      Make the current record buffer appropriately larger.            */
-/* -------------------------------------------------------------------- */
-    psDBF->pszCurrentRecord = (char *) SfRealloc(psDBF->pszCurrentRecord,
-					       psDBF->nRecordLength);
-
-    return( psDBF->nFields-1 );
-}
-
-/************************************************************************/
-/*                          DBFReadAttribute()                          */
-/*                                                                      */
-/*      Read one of the attribute fields of a record.                   */
-/************************************************************************/
-
-static void *DBFReadAttribute(DBFHandle psDBF, int hEntity, int iField,
-                              char chReqType )
-
-{
-    int	       	nRecordOffset;
-    unsigned char	*pabyRec;
-    void	*pReturnField = NULL;
-
-    static double dDoubleField;
-
-/* -------------------------------------------------------------------- */
-/*      Verify selection.                                               */
-/* -------------------------------------------------------------------- */
-    if( hEntity < 0 || hEntity >= psDBF->nRecords )
-        return( NULL );
-
-    if( iField < 0 || iField >= psDBF->nFields )
-        return( NULL );
-
-/* -------------------------------------------------------------------- */
-/*	Have we read the record?					*/
-/* -------------------------------------------------------------------- */
-    if( psDBF->nCurrentRecord != hEntity )
-    {
-	DBFFlushRecord( psDBF );
-
-	nRecordOffset = psDBF->nRecordLength * hEntity + psDBF->nHeaderLength;
-
-	if( fseek( psDBF->fp, nRecordOffset, 0 ) != 0 )
-        {
-            fprintf( stderr, "fseek(%d) failed on DBF file.\n",
-                     nRecordOffset );
-            return NULL;
-        }
-
-	if( fread( psDBF->pszCurrentRecord, psDBF->nRecordLength, 
-                   1, psDBF->fp ) != 1 )
-        {
-            fprintf( stderr, "fread(%d) failed on DBF file.\n",
-                     psDBF->nRecordLength );
-            return NULL;
-        }
-
-	psDBF->nCurrentRecord = hEntity;
-    }
-
-    pabyRec = (unsigned char *) psDBF->pszCurrentRecord;
-
-/* -------------------------------------------------------------------- */
-/*	Ensure our field buffer is large enough to hold this buffer.	*/
-/* -------------------------------------------------------------------- */
-    if( psDBF->panFieldSize[iField]+1 > nStringFieldLen )
-    {
-	nStringFieldLen = psDBF->panFieldSize[iField]*2 + 10;
-	pszStringField = (char *) SfRealloc(pszStringField,nStringFieldLen);
-    }
-
-/* -------------------------------------------------------------------- */
-/*	Extract the requested field.					*/
-/* -------------------------------------------------------------------- */
-    strncpy( pszStringField, 
-	     ((const char *) pabyRec) + psDBF->panFieldOffset[iField],
-	     psDBF->panFieldSize[iField] );
-    pszStringField[psDBF->panFieldSize[iField]] = '\0';
-
-    pReturnField = pszStringField;
-
-/* -------------------------------------------------------------------- */
-/*      Decode the field.                                               */
-/* -------------------------------------------------------------------- */
-    if( chReqType == 'D' )
-    {
-		char dateField[11];
-		sprintf(dateField,"%4s/%2s/%2s",pszStringField,pszStringField+4,pszStringField+6);
-		dateField[10] = '\0';
-		pReturnField = dateField;
-    }   
-	else if( chReqType == 'N' )
-    {
-        dDoubleField = atof(pszStringField);
-
-	pReturnField = &dDoubleField;
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Should we trim white space off the string attribute value?      */
-/* -------------------------------------------------------------------- */
-#ifdef TRIM_DBF_WHITESPACE
-    else
-    {
-        char	*pchSrc, *pchDst;
-
-        pchDst = pchSrc = pszStringField;
-        while( *pchSrc == ' ' )
-            pchSrc++;
-
-        while( *pchSrc != '\0' )
-            *(pchDst++) = *(pchSrc++);
-        *pchDst = '\0';
-
-        while( pchDst != pszStringField && *(--pchDst) == ' ' )
-            *pchDst = '\0';
-    }
-#endif
-    
-    return( pReturnField );
-}
-
-/************************************************************************/
-/*                        DBFReadIntAttribute()                         */
-/*                                                                      */
-/*      Read an integer attribute.                                      */
-/************************************************************************/
-
-int SHPAPI_CALL
-DBFReadIntegerAttribute( DBFHandle psDBF, int iRecord, int iField )
-
-{
-    double	*pdValue;
-
-    pdValue = (double *) DBFReadAttribute( psDBF, iRecord, iField, 'N' );
-
-    if( pdValue == NULL )
-        return 0;
-    else
-        return( (int) *pdValue );
-}
-
-/************************************************************************/
-/*                        DBFReadDoubleAttribute()                      */
-/*                                                                      */
-/*      Read a double attribute.                                        */
-/************************************************************************/
-
-double SHPAPI_CALL
-DBFReadDoubleAttribute( DBFHandle psDBF, int iRecord, int iField )
-
-{
-    double	*pdValue;
-
-    pdValue = (double *) DBFReadAttribute( psDBF, iRecord, iField, 'N' );
-
-    if( pdValue == NULL )
-        return 0.0;
-    else
-        return( *pdValue );
-}
-
-/************************************************************************/
-/*                        DBFReadStringAttribute()                      */
-/*                                                                      */
-/*      Read a string attribute.                                        */
-/************************************************************************/
-
-const char SHPAPI_CALL1(*)
-DBFReadStringAttribute( DBFHandle psDBF, int iRecord, int iField )
-
-{
-    return( (const char *) DBFReadAttribute( psDBF, iRecord, iField, 'C' ) );
-}
-
-/************************************************************************/
-/*                        DBFReadStringAttribute()                      */
-/*                                                                      */
-/*      Read a string attribute.                                        */
-/************************************************************************/
-
-const char SHPAPI_CALL1(*)
-DBFReadDateAttribute( DBFHandle psDBF, int iRecord, int iField )
-
-{
-    return( (const char *) DBFReadAttribute( psDBF, iRecord, iField, 'D' ) );
-}
-
-/************************************************************************/
-/*                        DBFReadLogicalAttribute()                     */
-/*                                                                      */
-/*      Read a logical attribute.                                       */
-/************************************************************************/
-
-const char SHPAPI_CALL1(*)
-DBFReadLogicalAttribute( DBFHandle psDBF, int iRecord, int iField )
-
-{
-    return( (const char *) DBFReadAttribute( psDBF, iRecord, iField, 'L' ) );
-}
-
-/************************************************************************/
-/*                         DBFIsAttributeNULL()                         */
-/*                                                                      */
-/*      Return TRUE if value for field is NULL.                         */
-/*                                                                      */
-/*      Contributed by Jim Matthews.                                    */
-/************************************************************************/
-
-int SHPAPI_CALL
-DBFIsAttributeNULL( DBFHandle psDBF, int iRecord, int iField )
-
-{
-    const char	*pszValue;
-
-    pszValue = DBFReadStringAttribute( psDBF, iRecord, iField );
-
-    switch(psDBF->pachFieldType[iField])
-    {
-      case 'N':
-      case 'F':
-        /* NULL numeric fields have value "****************" */
-        return pszValue[0] == '*';
-
-      case 'D':
-        /* NULL date fields have value "00000000" */
-        return strncmp(pszValue,"00000000",8) == 0;
-
-      case 'L':
-        /* NULL boolean fields have value "?" */ 
-        return pszValue[0] == '?';
-
-      default:
-        /* empty string fields are considered NULL */
-        return strlen(pszValue) == 0;
-    }
-}
-
-/************************************************************************/
-/*                          DBFGetFieldCount()                          */
-/*                                                                      */
-/*      Return the number of fields in this table.                      */
-/************************************************************************/
-
-int SHPAPI_CALL
-DBFGetFieldCount( DBFHandle psDBF )
-
-{
-    return( psDBF->nFields );
-}
-
-/************************************************************************/
-/*                         DBFGetRecordCount()                          */
-/*                                                                      */
-/*      Return the number of records in this table.                     */
-/************************************************************************/
-
-int SHPAPI_CALL
-DBFGetRecordCount( DBFHandle psDBF )
-
-{
-    return( psDBF->nRecords );
-}
-
-/************************************************************************/
-/*                          DBFGetFieldInfo()                           */
-/*                                                                      */
-/*      Return any requested information about the field.               */
-/************************************************************************/
-
-DBFFieldType SHPAPI_CALL
-DBFGetFieldInfo( DBFHandle psDBF, int iField, char * pszFieldName,
-                 int * pnWidth, int * pnDecimals )
-
-{
-    if( iField < 0 || iField >= psDBF->nFields )
-        return( FTInvalid );
-
-    if( pnWidth != NULL )
-        *pnWidth = psDBF->panFieldSize[iField];
-
-    if( pnDecimals != NULL )
-        *pnDecimals = psDBF->panFieldDecimals[iField];
-
-    if( pszFieldName != NULL )
-    {
-	int	i;
-
-	strncpy( pszFieldName, (char *) psDBF->pszHeader+iField*32, 11 );
-	pszFieldName[11] = '\0';
-	for( i = 10; i > 0 && pszFieldName[i] == ' '; i-- )
-	    pszFieldName[i] = '\0';
-    }
-
-    if ( psDBF->pachFieldType[iField] == 'L' )
-	return( FTLogical);
-	else if ( psDBF->pachFieldType[iField] == 'D')
-		return (FTDate);
-    else if( psDBF->pachFieldType[iField] == 'N' || psDBF->pachFieldType[iField] == 'F')
-    {
-		if( psDBF->panFieldDecimals[iField] > 0 )
-			return( FTDouble );
-		else
-			return( FTInteger );
-    }
-    else
-    {
-		return( FTString );
-    }
-}
-
-/************************************************************************/
-/*                         DBFWriteAttribute()                          */
-/*																		*/
-/*	Write an attribute record to the file.								*/
-/************************************************************************/
-
-static int DBFWriteAttribute(DBFHandle psDBF, int hEntity, int iField,
-			     void * pValue )
-
-{
-    int	       	nRecordOffset, i, j, nRetResult = TRUE;
-    unsigned char	*pabyRec;
-    char	szSField[400], szFormat[20];
-
-/* -------------------------------------------------------------------- */
-/*	Is this a valid record?						*/
-/* -------------------------------------------------------------------- */
-    if( hEntity < 0 || hEntity > psDBF->nRecords )
-        return( FALSE );
-
-    if( psDBF->bNoHeader )
-        DBFWriteHeader(psDBF);
-
-/* -------------------------------------------------------------------- */
-/*      Is this a brand new record?                                     */
-/* -------------------------------------------------------------------- */
-    if( hEntity == psDBF->nRecords )
-    {
-	DBFFlushRecord( psDBF );
-
-	psDBF->nRecords++;
-	for( i = 0; i < psDBF->nRecordLength; i++ )
-	    psDBF->pszCurrentRecord[i] = ' ';
-
-	psDBF->nCurrentRecord = hEntity;
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Is this an existing record, but different than the last one     */
-/*      we accessed?                                                    */
-/* -------------------------------------------------------------------- */
-    if( psDBF->nCurrentRecord != hEntity )
-    {
-	DBFFlushRecord( psDBF );
-
-	nRecordOffset = psDBF->nRecordLength * hEntity + psDBF->nHeaderLength;
-
-	fseek( psDBF->fp, nRecordOffset, 0 );
-	fread( psDBF->pszCurrentRecord, psDBF->nRecordLength, 1, psDBF->fp );
-
-	psDBF->nCurrentRecord = hEntity;
-    }
-
-    pabyRec = (unsigned char *) psDBF->pszCurrentRecord;
-
-    psDBF->bCurrentRecordModified = TRUE;
-    psDBF->bUpdated = TRUE;
-
-/* -------------------------------------------------------------------- */
-/*      Translate NULL value to valid DBF file representation.          */
-/*                                                                      */
-/*      Contributed by Jim Matthews.                                    */
-/* -------------------------------------------------------------------- */
-    if( pValue == NULL )
-    {
-        switch(psDBF->pachFieldType[iField])
-        {
-          case 'N':
-          case 'F':
-	    /* NULL numeric fields have value "****************" */
-            memset( (char *) (pabyRec+psDBF->panFieldOffset[iField]), '*', 
-                    psDBF->panFieldSize[iField] );
-            break;
-
-          case 'D':
-	    /* NULL date fields have value "00000000" */
-            memset( (char *) (pabyRec+psDBF->panFieldOffset[iField]), '0', 
-                    psDBF->panFieldSize[iField] );
-            break;
-
-          case 'L':
-	    /* NULL boolean fields have value "?" */ 
-            memset( (char *) (pabyRec+psDBF->panFieldOffset[iField]), '?', 
-                    psDBF->panFieldSize[iField] );
-            break;
-
-          default:
-            /* empty string fields are considered NULL */
-            memset( (char *) (pabyRec+psDBF->panFieldOffset[iField]), '\0', 
-                    psDBF->panFieldSize[iField] );
-            break;
-        }
-        return TRUE;
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Assign all the record fields.                                   */
-/* -------------------------------------------------------------------- */
-	switch( psDBF->pachFieldType[iField] )
-	{
-	case 'N':
-	case 'F':
-		if( psDBF->panFieldDecimals[iField] == 0 )
-		{
-			int	nWidth = psDBF->panFieldSize[iField];
-
-			if( sizeof(szSField)-2 < (unsigned int)nWidth )
-			nWidth = sizeof(szSField)-2;
-
-			sprintf( szFormat, "%%%dd", nWidth );
-			sprintf(szSField, szFormat, (int) *((double *) pValue) );
-			if( (int)strlen(szSField) > psDBF->panFieldSize[iField] )
-			{
-				szSField[psDBF->panFieldSize[iField]] = '\0';
-				nRetResult = FALSE;
-			}
-
-			strncpy((char *) (pabyRec+psDBF->panFieldOffset[iField]),
-			szSField, strlen(szSField) );
-		}
-		else
-		{
-			int		nWidth = psDBF->panFieldSize[iField];
-
-			if( sizeof(szSField)-2 < (unsigned int)nWidth )
-			nWidth = sizeof(szSField)-2;
-
-			sprintf( szFormat, "%%%d.%df", 
-			nWidth, psDBF->panFieldDecimals[iField] );
-			sprintf(szSField, szFormat, *((double *) pValue) );
-			if( (int) strlen(szSField) > psDBF->panFieldSize[iField] )
-			{
-				szSField[psDBF->panFieldSize[iField]] = '\0';
-				nRetResult = FALSE;
-			}
-			strncpy((char *) (pabyRec+psDBF->panFieldOffset[iField]),
-			szSField, strlen(szSField) );
-		}
-		break;
-
-	case 'L':
-		if (psDBF->panFieldSize[iField] >= 1  && 
-			(*(char*)pValue == 'F' || *(char*)pValue == 'T'))
-			*(pabyRec+psDBF->panFieldOffset[iField]) = *(char*)pValue;
-		break;
-
-	default:
-		if( (int) strlen((char *) pValue) > psDBF->panFieldSize[iField] )
-		{
-			j = psDBF->panFieldSize[iField];
-			nRetResult = FALSE;
-		}
-		else
-		{
-			memset( pabyRec+psDBF->panFieldOffset[iField], ' ',
-			psDBF->panFieldSize[iField] );
-			j = strlen((char *) pValue);
-		}
-
-		strncpy((char *) (pabyRec+psDBF->panFieldOffset[iField]),(char *) pValue, j );
-		break;
-	}
-
-    return( nRetResult );
-}
-
-/************************************************************************/
-/*                     DBFWriteAttributeDirectly()                      */
-/*                                                                      */
-/*      Write an attribute record to the file, but without any          */
-/*      reformatting based on type.  The provided buffer is written     */
-/*      as is to the field position in the record.                      */
-/************************************************************************/
-
-int DBFWriteAttributeDirectly(DBFHandle psDBF, int hEntity, int iField,
-                              void * pValue )
-
-{
-    int	       	nRecordOffset, i, j;
-    unsigned char	*pabyRec;
-
-/* -------------------------------------------------------------------- */
-/*	Is this a valid record?						*/
-/* -------------------------------------------------------------------- */
-    if( hEntity < 0 || hEntity > psDBF->nRecords )
-        return( FALSE );
-
-    if( psDBF->bNoHeader )
-        DBFWriteHeader(psDBF);
-
-/* -------------------------------------------------------------------- */
-/*      Is this a brand new record?                                     */
-/* -------------------------------------------------------------------- */
-    if( hEntity == psDBF->nRecords )
-    {
-	DBFFlushRecord( psDBF );
-
-	psDBF->nRecords++;
-	for( i = 0; i < psDBF->nRecordLength; i++ )
-	    psDBF->pszCurrentRecord[i] = ' ';
-
-	psDBF->nCurrentRecord = hEntity;
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Is this an existing record, but different than the last one     */
-/*      we accessed?                                                    */
-/* -------------------------------------------------------------------- */
-    if( psDBF->nCurrentRecord != hEntity )
-    {
-	DBFFlushRecord( psDBF );
-
-	nRecordOffset = psDBF->nRecordLength * hEntity + psDBF->nHeaderLength;
-
-	fseek( psDBF->fp, nRecordOffset, 0 );
-	fread( psDBF->pszCurrentRecord, psDBF->nRecordLength, 1, psDBF->fp );
-
-	psDBF->nCurrentRecord = hEntity;
-    }
-
-    pabyRec = (unsigned char *) psDBF->pszCurrentRecord;
-
-/* -------------------------------------------------------------------- */
-/*      Assign all the record fields.                                   */
-/* -------------------------------------------------------------------- */
-    if( (int)strlen((char *) pValue) > psDBF->panFieldSize[iField] )
-        j = psDBF->panFieldSize[iField];
-    else
-    {
-        memset( pabyRec+psDBF->panFieldOffset[iField], ' ',
-                psDBF->panFieldSize[iField] );
-        j = strlen((char *) pValue);
-    }
-
-    strncpy((char *) (pabyRec+psDBF->panFieldOffset[iField]),
-            (char *) pValue, j );
-
-    psDBF->bCurrentRecordModified = TRUE;
-    psDBF->bUpdated = TRUE;
-
-    return( TRUE );
-}
-
-/************************************************************************/
-/*                      DBFWriteDoubleAttribute()                       */
-/*                                                                      */
-/*      Write a double attribute.                                       */
-/************************************************************************/
-
-int SHPAPI_CALL
-DBFWriteDoubleAttribute( DBFHandle psDBF, int iRecord, int iField,
-                         double dValue )
-
-{
-    return( DBFWriteAttribute( psDBF, iRecord, iField, (void *) &dValue ) );
-}
-
-/************************************************************************/
-/*                      DBFWriteIntegerAttribute()                      */
-/*                                                                      */
-/*      Write a integer attribute.                                      */
-/************************************************************************/
-
-int SHPAPI_CALL
-DBFWriteIntegerAttribute( DBFHandle psDBF, int iRecord, int iField,
-                          int nValue )
-
-{
-    double	dValue = nValue;
-
-    return( DBFWriteAttribute( psDBF, iRecord, iField, (void *) &dValue ) );
-}
-
-/************************************************************************/
-/*                      DBFWriteStringAttribute()                       */
-/*                                                                      */
-/*      Write a string attribute.                                       */
-/************************************************************************/
-
-int SHPAPI_CALL
-DBFWriteStringAttribute( DBFHandle psDBF, int iRecord, int iField,
-                         const char * pszValue )
-
-{
-    return( DBFWriteAttribute( psDBF, iRecord, iField, (void *) pszValue ) );
-}
-
-/************************************************************************/
-/*                      DBFWriteDateAttribute()		                    */
-/*                                                                      */
-/*      Write a date attribute.                                       */
-/************************************************************************/
-
-int SHPAPI_CALL
-DBFWriteDateAttribute( DBFHandle psDBF, int iRecord, int iField,
-                         const char * pszValue )
-
-{
-    return( DBFWriteAttribute( psDBF, iRecord, iField, (void *) pszValue ) );
-}
-
-/************************************************************************/
-/*                      DBFWriteNULLAttribute()                         */
-/*                                                                      */
-/*      Write a string attribute.                                       */
-/************************************************************************/
-
-int SHPAPI_CALL
-DBFWriteNULLAttribute( DBFHandle psDBF, int iRecord, int iField )
-
-{
-    return( DBFWriteAttribute( psDBF, iRecord, iField, NULL ) );
-}
-
-/************************************************************************/
-/*                      DBFWriteLogicalAttribute()                      */
-/*                                                                      */
-/*      Write a logical attribute.                                      */
-/************************************************************************/
-
-int SHPAPI_CALL
-DBFWriteLogicalAttribute( DBFHandle psDBF, int iRecord, int iField,
-		       const char lValue)
-
-{
-    return( DBFWriteAttribute( psDBF, iRecord, iField, (void *) (&lValue) ) );
-}
-
-/************************************************************************/
-/*                         DBFWriteTuple()                              */
-/*									*/
-/*	Write an attribute record to the file.				*/
-/************************************************************************/
-
-int SHPAPI_CALL
-DBFWriteTuple(DBFHandle psDBF, int hEntity, void * pRawTuple )
-
-{
-    int	       	nRecordOffset, i;
-    unsigned char	*pabyRec;
-
-/* -------------------------------------------------------------------- */
-/*	Is this a valid record?						*/
-/* -------------------------------------------------------------------- */
-    if( hEntity < 0 || hEntity > psDBF->nRecords )
-        return( FALSE );
-
-    if( psDBF->bNoHeader )
-        DBFWriteHeader(psDBF);
-
-/* -------------------------------------------------------------------- */
-/*      Is this a brand new record?                                     */
-/* -------------------------------------------------------------------- */
-    if( hEntity == psDBF->nRecords )
-    {
-	DBFFlushRecord( psDBF );
-
-	psDBF->nRecords++;
-	for( i = 0; i < psDBF->nRecordLength; i++ )
-	    psDBF->pszCurrentRecord[i] = ' ';
-
-	psDBF->nCurrentRecord = hEntity;
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Is this an existing record, but different than the last one     */
-/*      we accessed?                                                    */
-/* -------------------------------------------------------------------- */
-    if( psDBF->nCurrentRecord != hEntity )
-    {
-	DBFFlushRecord( psDBF );
-
-	nRecordOffset = psDBF->nRecordLength * hEntity + psDBF->nHeaderLength;
-
-	fseek( psDBF->fp, nRecordOffset, 0 );
-	fread( psDBF->pszCurrentRecord, psDBF->nRecordLength, 1, psDBF->fp );
-
-	psDBF->nCurrentRecord = hEntity;
-    }
-
-    pabyRec = (unsigned char *) psDBF->pszCurrentRecord;
-
-    memcpy ( pabyRec, pRawTuple,  psDBF->nRecordLength );
-
-    psDBF->bCurrentRecordModified = TRUE;
-    psDBF->bUpdated = TRUE;
-
-    return( TRUE );
-}
-
-/************************************************************************/
-/*                          DBFReadTuple()                              */
-/*                                                                      */
-/*      Read one of the attribute fields of a record.                   */
-/************************************************************************/
-
-const char SHPAPI_CALL1(*)
-DBFReadTuple(DBFHandle psDBF, int hEntity )
-
-{
-    int	       	nRecordOffset;
-    unsigned char	*pabyRec;
-    static char	*pReturnTuple = NULL;
-
-    static int	nTupleLen = 0;
-
-/* -------------------------------------------------------------------- */
-/*	Have we read the record?					*/
-/* -------------------------------------------------------------------- */
-    if( hEntity < 0 || hEntity >= psDBF->nRecords )
-        return( NULL );
-
-    if( psDBF->nCurrentRecord != hEntity )
-    {
-	DBFFlushRecord( psDBF );
-
-	nRecordOffset = psDBF->nRecordLength * hEntity + psDBF->nHeaderLength;
-
-	fseek( psDBF->fp, nRecordOffset, 0 );
-	fread( psDBF->pszCurrentRecord, psDBF->nRecordLength, 1, psDBF->fp );
-
-	psDBF->nCurrentRecord = hEntity;
-    }
-
-    pabyRec = (unsigned char *) psDBF->pszCurrentRecord;
-
-    if ( nTupleLen < psDBF->nRecordLength) {
-      nTupleLen = psDBF->nRecordLength;
-      pReturnTuple = (char *) SfRealloc(pReturnTuple, psDBF->nRecordLength);
-    }
-    
-    memcpy ( pReturnTuple, pabyRec, psDBF->nRecordLength );
-        
-    return( pReturnTuple );
-}
-
-/************************************************************************/
-/*                          DBFCloneEmpty()                              */
-/*                                                                      */
-/*      Read one of the attribute fields of a record.                   */
-/************************************************************************/
-
-DBFHandle SHPAPI_CALL
-DBFCloneEmpty(DBFHandle psDBF, const char * pszFilename ) 
-{
-    DBFHandle	newDBF;
-
-   newDBF = DBFCreate ( pszFilename );
-   if ( newDBF == NULL ) return ( NULL ); 
-   
-   newDBF->pszHeader = (char *) malloc ( 32 * psDBF->nFields );
-   memcpy ( newDBF->pszHeader, psDBF->pszHeader, 32 * psDBF->nFields );
-   
-   newDBF->nFields = psDBF->nFields;
-   newDBF->nRecordLength = psDBF->nRecordLength;
-   newDBF->nHeaderLength = 32 * (psDBF->nFields+1);
-    
-   newDBF->panFieldOffset = (int *) malloc ( sizeof(int) * psDBF->nFields ); 
-   memcpy ( newDBF->panFieldOffset, psDBF->panFieldOffset, sizeof(int) * psDBF->nFields );
-   newDBF->panFieldSize = (int *) malloc ( sizeof(int) * psDBF->nFields );
-   memcpy ( newDBF->panFieldSize, psDBF->panFieldSize, sizeof(int) * psDBF->nFields );
-   newDBF->panFieldDecimals = (int *) malloc ( sizeof(int) * psDBF->nFields );
-   memcpy ( newDBF->panFieldDecimals, psDBF->panFieldDecimals, sizeof(int) * psDBF->nFields );
-   newDBF->pachFieldType = (char *) malloc ( sizeof(int) * psDBF->nFields );
-   memcpy ( newDBF->pachFieldType, psDBF->pachFieldType, sizeof(int) * psDBF->nFields );
-
-   newDBF->bNoHeader = TRUE;
-   newDBF->bUpdated = TRUE;
-   
-   DBFWriteHeader ( newDBF );
-   DBFClose ( newDBF );
-   
-   newDBF = DBFOpen ( pszFilename, "rb+" );
-
-   return ( newDBF );
-}
-
-/************************************************************************/
-/*                       DBFGetNativeFieldType()                        */
-/*                                                                      */
-/*      Return the DBase field type for the specified field.            */
-/*                                                                      */
-/*      Value can be one of: 'C' (String), 'D' (Date), 'F' (Float),     */
-/*                           'N' (Numeric, with or without decimal),    */
-/*                           'L' (Logical),                             */
-/*                           'M' (Memo: 10 digits .DBT block ptr)       */
-/************************************************************************/
-
-char SHPAPI_CALL
-DBFGetNativeFieldType( DBFHandle psDBF, int iField )
-
-{
-    if( iField >=0 && iField < psDBF->nFields )
-        return psDBF->pachFieldType[iField];
-
-    return  ' ';
-}
-
-/************************************************************************/
-/*                            str_to_upper()                            */
-/************************************************************************/
-
-static void str_to_upper (char *string)
-{
-    int len;
-    short i = -1;
-
-    len = strlen (string);
-
-    while (++i < len)
-        if (isalpha(string[i]) && islower(string[i]))
-            string[i] = toupper ((int)string[i]);
-}
-
-/************************************************************************/
-/*                          DBFGetFieldIndex()                          */
-/*                                                                      */
-/*      Get the index number for a field in a .dbf file.                */
-/*                                                                      */
-/*      Contributed by Jim Matthews.                                    */
-/************************************************************************/
-
-int SHPAPI_CALL
-DBFGetFieldIndex(DBFHandle psDBF, const char *pszFieldName)
-
-{
-    char          name[12], name1[12], name2[12];
-    int           i;
-
-    strncpy(name1, pszFieldName,11);
-    name1[11] = '\0';
-    str_to_upper(name1);
-
-    for( i = 0; i < DBFGetFieldCount(psDBF); i++ )
-    {
-        DBFGetFieldInfo( psDBF, i, name, NULL, NULL );
-        strncpy(name2,name,11);
-        str_to_upper(name2);
-
-        if(!strncmp(name1,name2,10))
-            return(i);
-    }
-    return(-1);
-}
diff --git a/src/shapelib/shapefil.h b/src/shapelib/shapefil.h
deleted file mode 100644
index 3e2aec6..0000000
--- a/src/shapelib/shapefil.h
+++ /dev/null
@@ -1,496 +0,0 @@
-#ifndef _SHAPEFILE_H_INCLUDED
-#define _SHAPEFILE_H_INCLUDED
-
-/******************************************************************************
- * $Id: shapefil.h,v 1.3 2004/04/29 14:48:57 lubia Exp $
- *
- * Project:  Shapelib
- * Purpose:  Primary include file for Shapelib.
- * Author:   Frank Warmerdam, warmerdam at pobox.com
- *
- ******************************************************************************
- * Copyright (c) 1999, Frank Warmerdam
- *
- * This software is available under the following "MIT Style" license,
- * or at the option of the licensee under the LGPL (see LICENSE.LGPL).  This
- * option is discussed in more detail in shapelib.html.
- *
- * --
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- ******************************************************************************
- *
- * $Log: shapefil.h,v $
- * Revision 1.3  2004/04/29 14:48:57  lubia
- * modificacao de tempo
- *
- * Revision 1.2  2004/02/20 14:10:42  lubia
- * Migrando para ultima versao da shapelib: 1.2.10
- *
- * Revision 1.26  2002/09/29 00:00:08  warmerda
- * added FTLogical and logical attribute read/write calls
- *
- * Revision 1.25  2002/05/07 13:46:30  warmerda
- * added DBFWriteAttributeDirectly().
- *
- * Revision 1.24  2002/04/10 16:59:54  warmerda
- * added SHPRewindObject
- *
- * Revision 1.23  2002/01/15 14:36:07  warmerda
- * updated email address
- *
- * Revision 1.22  2002/01/15 14:32:00  warmerda
- * try to improve SHPAPI_CALL docs
- *
- * Revision 1.21  2001/11/01 16:29:55  warmerda
- * move pabyRec into SHPInfo for thread safety
- *
- * Revision 1.20  2001/07/20 13:06:02  warmerda
- * fixed SHPAPI attribute for SHPTreeFindLikelyShapes
- *
- * Revision 1.19  2001/05/31 19:20:13  warmerda
- * added DBFGetFieldIndex()
- *
- * Revision 1.18  2001/05/31 18:15:40  warmerda
- * Added support for NULL fields in DBF files
- *
- * Revision 1.17  2001/05/23 13:36:52  warmerda
- * added use of SHPAPI_CALL
- *
- * Revision 1.16  2000/09/25 14:15:59  warmerda
- * added DBFGetNativeFieldType()
- *
- * Revision 1.15  2000/02/16 16:03:51  warmerda
- * added null shape support
- *
- * Revision 1.14  1999/11/05 14:12:05  warmerda
- * updated license terms
- *
- * Revision 1.13  1999/06/02 18:24:21  warmerda
- * added trimming code
- *
- * Revision 1.12  1999/06/02 17:56:12  warmerda
- * added quad'' subnode support for trees
- *
- * Revision 1.11  1999/05/18 19:11:11  warmerda
- * Added example searching capability
- *
- * Revision 1.10  1999/05/18 17:49:38  warmerda
- * added initial quadtree support
- *
- * Revision 1.9  1999/05/11 03:19:28  warmerda
- * added new Tuple api, and improved extension handling - add from candrsn
- *
- * Revision 1.8  1999/03/23 17:22:27  warmerda
- * Added extern "C" protection for C++ users of shapefil.h.
- *
- * Revision 1.7  1998/12/31 15:31:07  warmerda
- * Added the TRIM_DBF_WHITESPACE and DISABLE_MULTIPATCH_MEASURE options.
- *
- * Revision 1.6  1998/12/03 15:48:15  warmerda
- * Added SHPCalculateExtents().
- *
- * Revision 1.5  1998/11/09 20:57:16  warmerda
- * Altered SHPGetInfo() call.
- *
- * Revision 1.4  1998/11/09 20:19:33  warmerda
- * Added 3D support, and use of SHPObject.
- *
- * Revision 1.3  1995/08/23 02:24:05  warmerda
- * Added support for reading bounds.
- *
- * Revision 1.2  1995/08/04  03:17:39  warmerda
- * Added header.
- *
- */
-
-#include <stdio.h>
-
-#ifdef USE_DBMALLOC
-#include <dbmalloc.h>
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/************************************************************************/
-/*                        Configuration options.                        */
-/************************************************************************/
-
-/* -------------------------------------------------------------------- */
-/*      Should the DBFReadStringAttribute() strip leading and           */
-/*      trailing white space?                                           */
-/* -------------------------------------------------------------------- */
-#define TRIM_DBF_WHITESPACE
-
-/* -------------------------------------------------------------------- */
-/*      Should we write measure values to the Multipatch object?        */
-/*      Reportedly ArcView crashes if we do write it, so for now it     */
-/*      is disabled.                                                    */
-/* -------------------------------------------------------------------- */
-#define DISABLE_MULTIPATCH_MEASURE
-
-/* -------------------------------------------------------------------- */
-/*      SHPAPI_CALL                                                     */
-/*                                                                      */
-/*      The following two macros are present to allow forcing           */
-/*      various calling conventions on the Shapelib API.                */
-/*                                                                      */
-/*      To force __stdcall conventions (needed to call Shapelib         */
-/*      from Visual Basic and/or Dephi I believe) the makefile could    */
-/*      be modified to define:                                          */
-/*                                                                      */
-/*        /DSHPAPI_CALL=__stdcall                                       */
-/*                                                                      */
-/*      If it is desired to force export of the Shapelib API without    */
-/*      using the shapelib.def file, use the following definition.      */
-/*                                                                      */
-/*        /DSHAPELIB_DLLEXPORT                                          */
-/*                                                                      */
-/*      To get both at once it will be necessary to hack this           */
-/*      include file to define:                                         */
-/*                                                                      */
-/*        #define SHPAPI_CALL __declspec(dllexport) __stdcall           */
-/*        #define SHPAPI_CALL1 __declspec(dllexport) * __stdcall        */
-/*                                                                      */
-/*      The complexity of the situtation is partly caused by the        */
-/*      peculiar requirement of Visual C++ that __stdcall appear        */
-/*      after any "*"'s in the return value of a function while the     */
-/*      __declspec(dllexport) must appear before them.                  */
-/* -------------------------------------------------------------------- */
-
-#ifdef SHAPELIB_DLLEXPORT
-#  define SHPAPI_CALL __declspec(dllexport)
-#  define SHPAPI_CALL1(x)  __declspec(dllexport) x
-#endif
-
-#ifndef SHPAPI_CALL
-#  define SHPAPI_CALL
-#endif
-
-#ifndef SHPAPI_CALL1
-#  define SHPAPI_CALL1(x)      x SHPAPI_CALL
-#endif
-    
-/************************************************************************/
-/*                             SHP Support.                             */
-/************************************************************************/
-typedef	struct
-{
-    FILE        *fpSHP;
-    FILE	*fpSHX;
-
-    int		nShapeType;				/* SHPT_* */
-    
-    int		nFileSize;				/* SHP file */
-
-    int         nRecords;
-    int		nMaxRecords;
-    int		*panRecOffset;
-    int		*panRecSize;
-
-    double	adBoundsMin[4];
-    double	adBoundsMax[4];
-
-    int		bUpdated;
-
-    unsigned char *pabyRec;
-    int         nBufSize;
-} SHPInfo;
-
-typedef SHPInfo * SHPHandle;
-
-/* -------------------------------------------------------------------- */
-/*      Shape types (nSHPType)                                          */
-/* -------------------------------------------------------------------- */
-#define SHPT_NULL	0
-#define SHPT_POINT	1
-#define SHPT_ARC	3
-#define SHPT_POLYGON	5
-#define SHPT_MULTIPOINT	8
-#define SHPT_POINTZ	11
-#define SHPT_ARCZ	13
-#define SHPT_POLYGONZ	15
-#define SHPT_MULTIPOINTZ 18
-#define SHPT_POINTM	21
-#define SHPT_ARCM	23
-#define SHPT_POLYGONM	25
-#define SHPT_MULTIPOINTM 28
-#define SHPT_MULTIPATCH 31
-
-
-/* -------------------------------------------------------------------- */
-/*      Part types - everything but SHPT_MULTIPATCH just uses           */
-/*      SHPP_RING.                                                      */
-/* -------------------------------------------------------------------- */
-
-#define SHPP_TRISTRIP	0
-#define SHPP_TRIFAN	1
-#define SHPP_OUTERRING	2
-#define SHPP_INNERRING	3
-#define SHPP_FIRSTRING	4
-#define SHPP_RING	5
-
-/* -------------------------------------------------------------------- */
-/*      SHPObject - represents on shape (without attributes) read       */
-/*      from the .shp file.                                             */
-/* -------------------------------------------------------------------- */
-typedef struct
-{
-    int		nSHPType;
-
-    int		nShapeId; /* -1 is unknown/unassigned */
-
-    int		nParts;
-    int		*panPartStart;
-    int		*panPartType;
-    
-    int		nVertices;
-    double	*padfX;
-    double	*padfY;
-    double	*padfZ;
-    double	*padfM;
-
-    double	dfXMin;
-    double	dfYMin;
-    double	dfZMin;
-    double	dfMMin;
-
-    double	dfXMax;
-    double	dfYMax;
-    double	dfZMax;
-    double	dfMMax;
-} SHPObject;
-
-/* -------------------------------------------------------------------- */
-/*      SHP API Prototypes                                              */
-/* -------------------------------------------------------------------- */
-SHPHandle SHPAPI_CALL
-      SHPOpen( const char * pszShapeFile, const char * pszAccess );
-SHPHandle SHPAPI_CALL
-      SHPCreate( const char * pszShapeFile, int nShapeType );
-void SHPAPI_CALL
-      SHPGetInfo( SHPHandle hSHP, int * pnEntities, int * pnShapeType,
-                  double * padfMinBound, double * padfMaxBound );
-
-SHPObject SHPAPI_CALL1(*)
-      SHPReadObject( SHPHandle hSHP, int iShape );
-int SHPAPI_CALL
-      SHPWriteObject( SHPHandle hSHP, int iShape, SHPObject * psObject );
-
-void SHPAPI_CALL
-      SHPDestroyObject( SHPObject * psObject );
-void SHPAPI_CALL
-      SHPComputeExtents( SHPObject * psObject );
-SHPObject SHPAPI_CALL1(*)
-      SHPCreateObject( int nSHPType, int nShapeId,
-                       int nParts, int * panPartStart, int * panPartType,
-                       int nVertices, double * padfX, double * padfY,
-                       double * padfZ, double * padfM );
-SHPObject SHPAPI_CALL1(*)
-      SHPCreateSimpleObject( int nSHPType, int nVertices,
-                             double * padfX, double * padfY, double * padfZ );
-
-int SHPAPI_CALL
-      SHPRewindObject( SHPHandle hSHP, SHPObject * psObject );
-
-void SHPAPI_CALL
-      SHPClose( SHPHandle hSHP );
-
-const char SHPAPI_CALL1(*)
-      SHPTypeName( int nSHPType );
-const char SHPAPI_CALL1(*)
-      SHPPartTypeName( int nPartType );
-
-/* -------------------------------------------------------------------- */
-/*      Shape quadtree indexing API.                                    */
-/* -------------------------------------------------------------------- */
-
-/* this can be two or four for binary or quad tree */
-#define MAX_SUBNODE	4
-
-typedef struct shape_tree_node
-{
-    /* region covered by this node */
-    double	adfBoundsMin[4];
-    double	adfBoundsMax[4];
-
-    /* list of shapes stored at this node.  The papsShapeObj pointers
-       or the whole list can be NULL */
-    int		nShapeCount;
-    int		*panShapeIds;
-    SHPObject   **papsShapeObj;
-
-    int		nSubNodes;
-    struct shape_tree_node *apsSubNode[MAX_SUBNODE];
-    
-} SHPTreeNode;
-
-typedef struct
-{
-    SHPHandle   hSHP;
-    
-    int		nMaxDepth;
-    int		nDimension;
-    
-    SHPTreeNode	*psRoot;
-} SHPTree;
-
-SHPTree SHPAPI_CALL1(*)
-      SHPCreateTree( SHPHandle hSHP, int nDimension, int nMaxDepth,
-                     double *padfBoundsMin, double *padfBoundsMax );
-void    SHPAPI_CALL
-      SHPDestroyTree( SHPTree * hTree );
-
-int	SHPAPI_CALL
-      SHPWriteTree( SHPTree *hTree, const char * pszFilename );
-SHPTree SHPAPI_CALL
-      SHPReadTree( const char * pszFilename );
-
-int	SHPAPI_CALL
-      SHPTreeAddObject( SHPTree * hTree, SHPObject * psObject );
-int	SHPAPI_CALL
-      SHPTreeAddShapeId( SHPTree * hTree, SHPObject * psObject );
-int	SHPAPI_CALL
-      SHPTreeRemoveShapeId( SHPTree * hTree, int nShapeId );
-
-void 	SHPAPI_CALL
-      SHPTreeTrimExtraNodes( SHPTree * hTree );
-
-int    SHPAPI_CALL1(*)
-      SHPTreeFindLikelyShapes( SHPTree * hTree,
-                               double * padfBoundsMin,
-                               double * padfBoundsMax,
-                               int * );
-int     SHPAPI_CALL
-      SHPCheckBoundsOverlap( double *, double *, double *, double *, int );
-
-/************************************************************************/
-/*                             DBF Support.                             */
-/************************************************************************/
-typedef	struct
-{
-    FILE	*fp;
-
-    int         nRecords;
-
-    int		nRecordLength;
-    int		nHeaderLength;
-    int		nFields;
-    int		*panFieldOffset;
-    int		*panFieldSize;
-    int		*panFieldDecimals;
-    char	*pachFieldType;
-
-    char	*pszHeader;
-
-    int		nCurrentRecord;
-    int		bCurrentRecordModified;
-    char	*pszCurrentRecord;
-    
-    int		bNoHeader;
-    int		bUpdated;
-} DBFInfo;
-
-typedef DBFInfo * DBFHandle;
-
-typedef enum {
-  FTString,
-  FTInteger,
-  FTDouble,
-  FTLogical,
-  FTInvalid,
-  FTDate,
-} DBFFieldType;
-
-#define XBASE_FLDHDR_SZ       32
-
-DBFHandle SHPAPI_CALL
-      DBFOpen( const char * pszDBFFile, const char * pszAccess );
-DBFHandle SHPAPI_CALL
-      DBFCreate( const char * pszDBFFile );
-
-int	SHPAPI_CALL
-      DBFGetFieldCount( DBFHandle psDBF );
-int	SHPAPI_CALL
-      DBFGetRecordCount( DBFHandle psDBF );
-int	SHPAPI_CALL
-      DBFAddField( DBFHandle hDBF, const char * pszFieldName,
-                   DBFFieldType eType, int nWidth, int nDecimals );
-
-DBFFieldType SHPAPI_CALL
-      DBFGetFieldInfo( DBFHandle psDBF, int iField, 
-                       char * pszFieldName, int * pnWidth, int * pnDecimals );
-
-int SHPAPI_CALL
-      DBFGetFieldIndex(DBFHandle psDBF, const char *pszFieldName);
-
-int 	SHPAPI_CALL
-      DBFReadIntegerAttribute( DBFHandle hDBF, int iShape, int iField );
-double 	SHPAPI_CALL
-      DBFReadDoubleAttribute( DBFHandle hDBF, int iShape, int iField );
-const char SHPAPI_CALL1(*)
-      DBFReadStringAttribute( DBFHandle hDBF, int iShape, int iField );
-const char SHPAPI_CALL1(*)
-      DBFReadDatettribute( DBFHandle hDBF, int iShape, int iField );
-const char SHPAPI_CALL1(*)
-      DBFReadLogicalAttribute( DBFHandle hDBF, int iShape, int iField );
-int     SHPAPI_CALL
-      DBFIsAttributeNULL( DBFHandle hDBF, int iShape, int iField );
-
-int SHPAPI_CALL
-      DBFWriteIntegerAttribute( DBFHandle hDBF, int iShape, int iField, 
-                                int nFieldValue );
-int SHPAPI_CALL
-      DBFWriteDoubleAttribute( DBFHandle hDBF, int iShape, int iField,
-                               double dFieldValue );
-int SHPAPI_CALL
-      DBFWriteStringAttribute( DBFHandle hDBF, int iShape, int iField,
-                               const char * pszFieldValue );
-int SHPAPI_CALL
-      DBFWriteDateAttribute( DBFHandle hDBF, int iShape, int iField,
-                               const char * pszFieldValue );
-int SHPAPI_CALL
-     DBFWriteNULLAttribute( DBFHandle hDBF, int iShape, int iField );
-
-int SHPAPI_CALL
-     DBFWriteLogicalAttribute( DBFHandle hDBF, int iShape, int iField,
-			       const char lFieldValue);
-int SHPAPI_CALL
-     DBFWriteAttributeDirectly(DBFHandle psDBF, int hEntity, int iField,
-                               void * pValue );
-const char SHPAPI_CALL1(*)
-      DBFReadTuple(DBFHandle psDBF, int hEntity );
-int SHPAPI_CALL
-      DBFWriteTuple(DBFHandle psDBF, int hEntity, void * pRawTuple );
-
-DBFHandle SHPAPI_CALL
-      DBFCloneEmpty(DBFHandle psDBF, const char * pszFilename );
- 
-void	SHPAPI_CALL
-      DBFClose( DBFHandle hDBF );
-char    SHPAPI_CALL
-      DBFGetNativeFieldType( DBFHandle hDBF, int iField );
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* ndef _SHAPEFILE_H_INCLUDED */
diff --git a/src/shapelib/shpopen.c b/src/shapelib/shpopen.c
deleted file mode 100644
index b33b16b..0000000
--- a/src/shapelib/shpopen.c
+++ /dev/null
@@ -1,1872 +0,0 @@
-/******************************************************************************
- * $Id: shpopen.c,v 1.4 2004/11/01 14:54:44 juan Exp $
- *
- * Project:  Shapelib
- * Purpose:  Implementation of core Shapefile read/write functions.
- * Author:   Frank Warmerdam, warmerdam at pobox.com
- *
- ******************************************************************************
- * Copyright (c) 1999, 2001, Frank Warmerdam
- *
- * This software is available under the following "MIT Style" license,
- * or at the option of the licensee under the LGPL (see LICENSE.LGPL).  This
- * option is discussed in more detail in shapelib.html.
- *
- * --
- * 
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- ******************************************************************************
- *
- * $Log: shpopen.c,v $
- * Revision 1.4  2004/11/01 14:54:44  juan
- * Warning removed
- *
- * Revision 1.3  2004/02/20 14:10:42  lubia
- * Migrando para ultima versao da shapelib: 1.2.10
- *
- * Revision 1.39  2002/08/26 06:46:56  warmerda
- * avoid c++ comments
- *
- * Revision 1.38  2002/05/07 16:43:39  warmerda
- * Removed debugging printf.
- *
- * Revision 1.37  2002/04/10 17:35:22  warmerda
- * fixed bug in ring reversal code
- *
- * Revision 1.36  2002/04/10 16:59:54  warmerda
- * added SHPRewindObject
- *
- * Revision 1.35  2001/12/07 15:10:44  warmerda
- * fix if .shx fails to open
- *
- * Revision 1.34  2001/11/01 16:29:55  warmerda
- * move pabyRec into SHPInfo for thread safety
- *
- * Revision 1.33  2001/07/03 12:18:15  warmerda
- * Improved cleanup if SHX not found, provied by Riccardo Cohen.
- *
- * Revision 1.32  2001/06/22 01:58:07  warmerda
- * be more careful about establishing initial bounds in face of NULL shapes
- *
- * Revision 1.31  2001/05/31 19:35:29  warmerda
- * added support for writing null shapes
- *
- * Revision 1.30  2001/05/28 12:46:29  warmerda
- * Add some checking on reasonableness of record count when opening.
- *
- * Revision 1.29  2001/05/23 13:36:52  warmerda
- * added use of SHPAPI_CALL
- *
- * Revision 1.28  2001/02/06 22:25:06  warmerda
- * fixed memory leaks when SHPOpen() fails
- *
- * Revision 1.27  2000/07/18 15:21:33  warmerda
- * added better enforcement of -1 for append in SHPWriteObject
- *
- * Revision 1.26  2000/02/16 16:03:51  warmerda
- * added null shape support
- *
- * Revision 1.25  1999/12/15 13:47:07  warmerda
- * Fixed record size settings in .shp file (was 4 words too long)
- * Added stdlib.h.
- *
- * Revision 1.24  1999/11/05 14:12:04  warmerda
- * updated license terms
- *
- * Revision 1.23  1999/07/27 00:53:46  warmerda
- * added support for rewriting shapes
- *
- * Revision 1.22  1999/06/11 19:19:11  warmerda
- * Cleanup pabyRec static buffer on SHPClose().
- *
- * Revision 1.21  1999/06/02 14:57:56  kshih
- * Remove unused variables
- *
- * Revision 1.20  1999/04/19 21:04:17  warmerda
- * Fixed syntax error.
- *
- * Revision 1.19  1999/04/19 21:01:57  warmerda
- * Force access string to binary in SHPOpen().
- *
- * Revision 1.18  1999/04/01 18:48:07  warmerda
- * Try upper case extensions if lower case doesn't work.
- *
- * Revision 1.17  1998/12/31 15:29:39  warmerda
- * Disable writing measure values to multipatch objects if
- * DISABLE_MULTIPATCH_MEASURE is defined.
- *
- * Revision 1.16  1998/12/16 05:14:33  warmerda
- * Added support to write MULTIPATCH.  Fixed reading Z coordinate of
- * MULTIPATCH. Fixed record size written for all feature types.
- *
- * Revision 1.15  1998/12/03 16:35:29  warmerda
- * r+b is proper binary access string, not rb+.
- *
- * Revision 1.14  1998/12/03 15:47:56  warmerda
- * Fixed setting of nVertices in SHPCreateObject().
- *
- * Revision 1.13  1998/12/03 15:33:54  warmerda
- * Made SHPCalculateExtents() separately callable.
- *
- * Revision 1.12  1998/11/11 20:01:50  warmerda
- * Fixed bug writing ArcM/Z, and PolygonM/Z for big endian machines.
- *
- * Revision 1.11  1998/11/09 20:56:44  warmerda
- * Fixed up handling of file wide bounds.
- *
- * Revision 1.10  1998/11/09 20:18:51  warmerda
- * Converted to support 3D shapefiles, and use of SHPObject.
- *
- * Revision 1.9  1998/02/24 15:09:05  warmerda
- * Fixed memory leak.
- *
- * Revision 1.8  1997/12/04 15:40:29  warmerda
- * Fixed byte swapping of record number, and record length fields in the
- * .shp file.
- *
- * Revision 1.7  1995/10/21 03:15:58  warmerda
- * Added support for binary file access, the magic cookie 9997
- * and tried to improve the int32 selection logic for 16bit systems.
- *
- * Revision 1.6  1995/09/04  04:19:41  warmerda
- * Added fix for file bounds.
- *
- * Revision 1.5  1995/08/25  15:16:44  warmerda
- * Fixed a couple of problems with big endian systems ... one with bounds
- * and the other with multipart polygons.
- *
- * Revision 1.4  1995/08/24  18:10:17  warmerda
- * Switch to use SfRealloc() to avoid problems with pre-ANSI realloc()
- * functions (such as on the Sun).
- *
- * Revision 1.3  1995/08/23  02:23:15  warmerda
- * Added support for reading bounds, and fixed up problems in setting the
- * file wide bounds.
- *
- * Revision 1.2  1995/08/04  03:16:57  warmerda
- * Added header.
- *
- */
-
-/* static char rcsid[] = 
-  "$Id: shpopen.c,v 1.4 2004/11/01 14:54:44 juan Exp $"; */
-
-#include "shapefil.h"
-
-#include <math.h>
-#include <limits.h>
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
-
-typedef unsigned char uchar;
-
-#if UINT_MAX == 65535
-typedef long	      int32;
-#else
-typedef int	      int32;
-#endif
-
-#ifndef FALSE
-#  define FALSE		0
-#  define TRUE		1
-#endif
-
-#define ByteCopy( a, b, c )	memcpy( b, a, c )
-#ifndef MAX
-#  define MIN(a,b)      ((a<b) ? a : b)
-#  define MAX(a,b)      ((a>b) ? a : b)
-#endif
-
-static int 	bBigEndian;
-
-
-/************************************************************************/
-/*                              SwapWord()                              */
-/*                                                                      */
-/*      Swap a 2, 4 or 8 byte word.                                     */
-/************************************************************************/
-
-static void	SwapWord( int length, void * wordP )
-
-{
-    int		i;
-    uchar	temp;
-
-    for( i=0; i < length/2; i++ )
-    {
-	temp = ((uchar *) wordP)[i];
-	((uchar *)wordP)[i] = ((uchar *) wordP)[length-i-1];
-	((uchar *) wordP)[length-i-1] = temp;
-    }
-}
-
-/************************************************************************/
-/*                             SfRealloc()                              */
-/*                                                                      */
-/*      A realloc cover function that will access a NULL pointer as     */
-/*      a valid input.                                                  */
-/************************************************************************/
-
-static void * SfRealloc( void * pMem, int nNewSize )
-
-{
-    if( pMem == NULL )
-        return( (void *) malloc(nNewSize) );
-    else
-        return( (void *) realloc(pMem,nNewSize) );
-}
-
-/************************************************************************/
-/*                          SHPWriteHeader()                            */
-/*                                                                      */
-/*      Write out a header for the .shp and .shx files as well as the	*/
-/*	contents of the index (.shx) file.				*/
-/************************************************************************/
-
-static void SHPWriteHeader( SHPHandle psSHP )
-
-{
-    uchar     	abyHeader[100];
-    int		i;
-    int32	i32;
-    double	dValue;
-    int32	*panSHX;
-
-/* -------------------------------------------------------------------- */
-/*      Prepare header block for .shp file.                             */
-/* -------------------------------------------------------------------- */
-    for( i = 0; i < 100; i++ )
-      abyHeader[i] = 0;
-
-    abyHeader[2] = 0x27;				/* magic cookie */
-    abyHeader[3] = 0x0a;
-
-    i32 = psSHP->nFileSize/2;				/* file size */
-    ByteCopy( &i32, abyHeader+24, 4 );
-    if( !bBigEndian ) SwapWord( 4, abyHeader+24 );
-    
-    i32 = 1000;						/* version */
-    ByteCopy( &i32, abyHeader+28, 4 );
-    if( bBigEndian ) SwapWord( 4, abyHeader+28 );
-    
-    i32 = psSHP->nShapeType;				/* shape type */
-    ByteCopy( &i32, abyHeader+32, 4 );
-    if( bBigEndian ) SwapWord( 4, abyHeader+32 );
-
-    dValue = psSHP->adBoundsMin[0];			/* set bounds */
-    ByteCopy( &dValue, abyHeader+36, 8 );
-    if( bBigEndian ) SwapWord( 8, abyHeader+36 );
-
-    dValue = psSHP->adBoundsMin[1];
-    ByteCopy( &dValue, abyHeader+44, 8 );
-    if( bBigEndian ) SwapWord( 8, abyHeader+44 );
-
-    dValue = psSHP->adBoundsMax[0];
-    ByteCopy( &dValue, abyHeader+52, 8 );
-    if( bBigEndian ) SwapWord( 8, abyHeader+52 );
-
-    dValue = psSHP->adBoundsMax[1];
-    ByteCopy( &dValue, abyHeader+60, 8 );
-    if( bBigEndian ) SwapWord( 8, abyHeader+60 );
-
-    dValue = psSHP->adBoundsMin[2];			/* z */
-    ByteCopy( &dValue, abyHeader+68, 8 );
-    if( bBigEndian ) SwapWord( 8, abyHeader+68 );
-
-    dValue = psSHP->adBoundsMax[2];
-    ByteCopy( &dValue, abyHeader+76, 8 );
-    if( bBigEndian ) SwapWord( 8, abyHeader+76 );
-
-    dValue = psSHP->adBoundsMin[3];			/* m */
-    ByteCopy( &dValue, abyHeader+84, 8 );
-    if( bBigEndian ) SwapWord( 8, abyHeader+84 );
-
-    dValue = psSHP->adBoundsMax[3];
-    ByteCopy( &dValue, abyHeader+92, 8 );
-    if( bBigEndian ) SwapWord( 8, abyHeader+92 );
-
-/* -------------------------------------------------------------------- */
-/*      Write .shp file header.                                         */
-/* -------------------------------------------------------------------- */
-    fseek( psSHP->fpSHP, 0, 0 );
-    fwrite( abyHeader, 100, 1, psSHP->fpSHP );
-
-/* -------------------------------------------------------------------- */
-/*      Prepare, and write .shx file header.                            */
-/* -------------------------------------------------------------------- */
-    i32 = (psSHP->nRecords * 2 * sizeof(int32) + 100)/2;   /* file size */
-    ByteCopy( &i32, abyHeader+24, 4 );
-    if( !bBigEndian ) SwapWord( 4, abyHeader+24 );
-    
-    fseek( psSHP->fpSHX, 0, 0 );
-    fwrite( abyHeader, 100, 1, psSHP->fpSHX );
-
-/* -------------------------------------------------------------------- */
-/*      Write out the .shx contents.                                    */
-/* -------------------------------------------------------------------- */
-    panSHX = (int32 *) malloc(sizeof(int32) * 2 * psSHP->nRecords);
-
-    for( i = 0; i < psSHP->nRecords; i++ )
-    {
-	panSHX[i*2  ] = psSHP->panRecOffset[i]/2;
-	panSHX[i*2+1] = psSHP->panRecSize[i]/2;
-	if( !bBigEndian ) SwapWord( 4, panSHX+i*2 );
-	if( !bBigEndian ) SwapWord( 4, panSHX+i*2+1 );
-    }
-
-    fwrite( panSHX, sizeof(int32) * 2, psSHP->nRecords, psSHP->fpSHX );
-
-    free( panSHX );
-}
-
-/************************************************************************/
-/*                              SHPOpen()                               */
-/*                                                                      */
-/*      Open the .shp and .shx files based on the basename of the       */
-/*      files or either file name.                                      */
-/************************************************************************/
-   
-SHPHandle SHPAPI_CALL
-SHPOpen( const char * pszLayer, const char * pszAccess )
-
-{
-    char		*pszFullname, *pszBasename;
-    SHPHandle		psSHP;
-    
-    uchar		*pabyBuf;
-    int			i;
-    double		dValue;
-    
-/* -------------------------------------------------------------------- */
-/*      Ensure the access string is one of the legal ones.  We          */
-/*      ensure the result string indicates binary to avoid common       */
-/*      problems on Windows.                                            */
-/* -------------------------------------------------------------------- */
-    if( strcmp(pszAccess,"rb+") == 0 || strcmp(pszAccess,"r+b") == 0
-        || strcmp(pszAccess,"r+") == 0 )
-        pszAccess = "r+b";
-    else
-        pszAccess = "rb";
-    
-/* -------------------------------------------------------------------- */
-/*	Establish the byte order on this machine.			*/
-/* -------------------------------------------------------------------- */
-    i = 1;
-    if( *((uchar *) &i) == 1 )
-        bBigEndian = FALSE;
-    else
-        bBigEndian = TRUE;
-
-/* -------------------------------------------------------------------- */
-/*	Initialize the info structure.					*/
-/* -------------------------------------------------------------------- */
-    psSHP = (SHPHandle) calloc(sizeof(SHPInfo),1);
-
-    psSHP->bUpdated = FALSE;
-
-/* -------------------------------------------------------------------- */
-/*	Compute the base (layer) name.  If there is any extension	*/
-/*	on the passed in filename we will strip it off.			*/
-/* -------------------------------------------------------------------- */
-    pszBasename = (char *) malloc(strlen(pszLayer)+5);
-    strcpy( pszBasename, pszLayer );
-    for( i = strlen(pszBasename)-1; 
-	 i > 0 && pszBasename[i] != '.' && pszBasename[i] != '/'
-	       && pszBasename[i] != '\\';
-	 i-- ) {}
-
-    if( pszBasename[i] == '.' )
-        pszBasename[i] = '\0';
-
-/* -------------------------------------------------------------------- */
-/*	Open the .shp and .shx files.  Note that files pulled from	*/
-/*	a PC to Unix with upper case filenames won't work!		*/
-/* -------------------------------------------------------------------- */
-    pszFullname = (char *) malloc(strlen(pszBasename) + 5);
-    sprintf( pszFullname, "%s.shp", pszBasename );
-    psSHP->fpSHP = fopen(pszFullname, pszAccess );
-    if( psSHP->fpSHP == NULL )
-    {
-        sprintf( pszFullname, "%s.SHP", pszBasename );
-        psSHP->fpSHP = fopen(pszFullname, pszAccess );
-    }
-    
-    if( psSHP->fpSHP == NULL )
-    {
-        free( psSHP );
-        free( pszBasename );
-        free( pszFullname );
-        return( NULL );
-    }
-
-    sprintf( pszFullname, "%s.shx", pszBasename );
-    psSHP->fpSHX = fopen(pszFullname, pszAccess );
-    if( psSHP->fpSHX == NULL )
-    {
-        sprintf( pszFullname, "%s.SHX", pszBasename );
-        psSHP->fpSHX = fopen(pszFullname, pszAccess );
-    }
-    
-    if( psSHP->fpSHX == NULL )
-    {
-        fclose( psSHP->fpSHP );
-        free( psSHP );
-        free( pszBasename );
-        free( pszFullname );
-        return( NULL );
-    }
-
-    free( pszFullname );
-    free( pszBasename );
-
-/* -------------------------------------------------------------------- */
-/*  Read the file size from the SHP file.				*/
-/* -------------------------------------------------------------------- */
-    pabyBuf = (uchar *) malloc(100);
-    fread( pabyBuf, 100, 1, psSHP->fpSHP );
-
-    psSHP->nFileSize = (pabyBuf[24] * 256 * 256 * 256
-			+ pabyBuf[25] * 256 * 256
-			+ pabyBuf[26] * 256
-			+ pabyBuf[27]) * 2;
-
-/* -------------------------------------------------------------------- */
-/*  Read SHX file Header info                                           */
-/* -------------------------------------------------------------------- */
-    fread( pabyBuf, 100, 1, psSHP->fpSHX );
-
-    if( pabyBuf[0] != 0 
-        || pabyBuf[1] != 0 
-        || pabyBuf[2] != 0x27 
-        || (pabyBuf[3] != 0x0a && pabyBuf[3] != 0x0d) )
-    {
-	fclose( psSHP->fpSHP );
-	fclose( psSHP->fpSHX );
-	free( psSHP );
-
-	return( NULL );
-    }
-
-    psSHP->nRecords = pabyBuf[27] + pabyBuf[26] * 256
-      + pabyBuf[25] * 256 * 256 + pabyBuf[24] * 256 * 256 * 256;
-    psSHP->nRecords = (psSHP->nRecords*2 - 100) / 8;
-
-    psSHP->nShapeType = pabyBuf[32];
-
-    if( psSHP->nRecords < 0 || psSHP->nRecords > 256000000 )
-    {
-        /* this header appears to be corrupt.  Give up. */
-	fclose( psSHP->fpSHP );
-	fclose( psSHP->fpSHX );
-	free( psSHP );
-
-	return( NULL );
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Read the bounds.                                                */
-/* -------------------------------------------------------------------- */
-    if( bBigEndian ) SwapWord( 8, pabyBuf+36 );
-    memcpy( &dValue, pabyBuf+36, 8 );
-    psSHP->adBoundsMin[0] = dValue;
-
-    if( bBigEndian ) SwapWord( 8, pabyBuf+44 );
-    memcpy( &dValue, pabyBuf+44, 8 );
-    psSHP->adBoundsMin[1] = dValue;
-
-    if( bBigEndian ) SwapWord( 8, pabyBuf+52 );
-    memcpy( &dValue, pabyBuf+52, 8 );
-    psSHP->adBoundsMax[0] = dValue;
-
-    if( bBigEndian ) SwapWord( 8, pabyBuf+60 );
-    memcpy( &dValue, pabyBuf+60, 8 );
-    psSHP->adBoundsMax[1] = dValue;
-
-    if( bBigEndian ) SwapWord( 8, pabyBuf+68 );		/* z */
-    memcpy( &dValue, pabyBuf+68, 8 );
-    psSHP->adBoundsMin[2] = dValue;
-    
-    if( bBigEndian ) SwapWord( 8, pabyBuf+76 );
-    memcpy( &dValue, pabyBuf+76, 8 );
-    psSHP->adBoundsMax[2] = dValue;
-    
-    if( bBigEndian ) SwapWord( 8, pabyBuf+84 );		/* z */
-    memcpy( &dValue, pabyBuf+84, 8 );
-    psSHP->adBoundsMin[3] = dValue;
-
-    if( bBigEndian ) SwapWord( 8, pabyBuf+92 );
-    memcpy( &dValue, pabyBuf+92, 8 );
-    psSHP->adBoundsMax[3] = dValue;
-
-    free( pabyBuf );
-
-/* -------------------------------------------------------------------- */
-/*	Read the .shx file to get the offsets to each record in 	*/
-/*	the .shp file.							*/
-/* -------------------------------------------------------------------- */
-    psSHP->nMaxRecords = psSHP->nRecords;
-
-    psSHP->panRecOffset =
-        (int *) malloc(sizeof(int) * MAX(1,psSHP->nMaxRecords) );
-    psSHP->panRecSize =
-        (int *) malloc(sizeof(int) * MAX(1,psSHP->nMaxRecords) );
-
-    pabyBuf = (uchar *) malloc(8 * MAX(1,psSHP->nRecords) );
-    fread( pabyBuf, 8, psSHP->nRecords, psSHP->fpSHX );
-
-    for( i = 0; i < psSHP->nRecords; i++ )
-    {
-	int32		nOffset, nLength;
-
-	memcpy( &nOffset, pabyBuf + i * 8, 4 );
-	if( !bBigEndian ) SwapWord( 4, &nOffset );
-
-	memcpy( &nLength, pabyBuf + i * 8 + 4, 4 );
-	if( !bBigEndian ) SwapWord( 4, &nLength );
-
-	psSHP->panRecOffset[i] = nOffset*2;
-	psSHP->panRecSize[i] = nLength*2;
-    }
-    free( pabyBuf );
-
-    return( psSHP );
-}
-
-/************************************************************************/
-/*                              SHPClose()                              */
-/*								       	*/
-/*	Close the .shp and .shx files.					*/
-/************************************************************************/
-
-void SHPAPI_CALL
-SHPClose(SHPHandle psSHP )
-
-{
-/* -------------------------------------------------------------------- */
-/*	Update the header if we have modified anything.			*/
-/* -------------------------------------------------------------------- */
-    if( psSHP->bUpdated )
-    {
-	SHPWriteHeader( psSHP );
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Free all resources, and close files.                            */
-/* -------------------------------------------------------------------- */
-    free( psSHP->panRecOffset );
-    free( psSHP->panRecSize );
-
-    fclose( psSHP->fpSHX );
-    fclose( psSHP->fpSHP );
-
-    if( psSHP->pabyRec != NULL )
-    {
-        free( psSHP->pabyRec );
-    }
-    
-    free( psSHP );
-}
-
-/************************************************************************/
-/*                             SHPGetInfo()                             */
-/*                                                                      */
-/*      Fetch general information about the shape file.                 */
-/************************************************************************/
-
-void SHPAPI_CALL
-SHPGetInfo(SHPHandle psSHP, int * pnEntities, int * pnShapeType,
-           double * padfMinBound, double * padfMaxBound )
-
-{
-    int		i;
-    
-    if( pnEntities != NULL )
-        *pnEntities = psSHP->nRecords;
-
-    if( pnShapeType != NULL )
-        *pnShapeType = psSHP->nShapeType;
-
-    for( i = 0; i < 4; i++ )
-    {
-        if( padfMinBound != NULL )
-            padfMinBound[i] = psSHP->adBoundsMin[i];
-        if( padfMaxBound != NULL )
-            padfMaxBound[i] = psSHP->adBoundsMax[i];
-    }
-}
-
-/************************************************************************/
-/*                             SHPCreate()                              */
-/*                                                                      */
-/*      Create a new shape file and return a handle to the open         */
-/*      shape file with read/write access.                              */
-/************************************************************************/
-
-SHPHandle SHPAPI_CALL
-SHPCreate( const char * pszLayer, int nShapeType )
-
-{
-    char	*pszBasename, *pszFullname;
-    int		i;
-    FILE	*fpSHP, *fpSHX;
-    uchar     	abyHeader[100];
-    int32	i32;
-    double	dValue;
-    
-/* -------------------------------------------------------------------- */
-/*      Establish the byte order on this system.                        */
-/* -------------------------------------------------------------------- */
-    i = 1;
-    if( *((uchar *) &i) == 1 )
-        bBigEndian = FALSE;
-    else
-        bBigEndian = TRUE;
-
-/* -------------------------------------------------------------------- */
-/*	Compute the base (layer) name.  If there is any extension	*/
-/*	on the passed in filename we will strip it off.			*/
-/* -------------------------------------------------------------------- */
-    pszBasename = (char *) malloc(strlen(pszLayer)+5);
-    strcpy( pszBasename, pszLayer );
-    for( i = strlen(pszBasename)-1; 
-	 i > 0 && pszBasename[i] != '.' && pszBasename[i] != '/'
-	       && pszBasename[i] != '\\';
-	 i-- ) {}
-
-    if( pszBasename[i] == '.' )
-        pszBasename[i] = '\0';
-
-/* -------------------------------------------------------------------- */
-/*      Open the two files so we can write their headers.               */
-/* -------------------------------------------------------------------- */
-    pszFullname = (char *) malloc(strlen(pszBasename) + 5);
-    sprintf( pszFullname, "%s.shp", pszBasename );
-    fpSHP = fopen(pszFullname, "wb" );
-    if( fpSHP == NULL )
-        return( NULL );
-
-    sprintf( pszFullname, "%s.shx", pszBasename );
-    fpSHX = fopen(pszFullname, "wb" );
-    if( fpSHX == NULL )
-        return( NULL );
-
-    free( pszFullname );
-    free( pszBasename );
-
-/* -------------------------------------------------------------------- */
-/*      Prepare header block for .shp file.                             */
-/* -------------------------------------------------------------------- */
-    for( i = 0; i < 100; i++ )
-      abyHeader[i] = 0;
-
-    abyHeader[2] = 0x27;				/* magic cookie */
-    abyHeader[3] = 0x0a;
-
-    i32 = 50;						/* file size */
-    ByteCopy( &i32, abyHeader+24, 4 );
-    if( !bBigEndian ) SwapWord( 4, abyHeader+24 );
-    
-    i32 = 1000;						/* version */
-    ByteCopy( &i32, abyHeader+28, 4 );
-    if( bBigEndian ) SwapWord( 4, abyHeader+28 );
-    
-    i32 = nShapeType;					/* shape type */
-    ByteCopy( &i32, abyHeader+32, 4 );
-    if( bBigEndian ) SwapWord( 4, abyHeader+32 );
-
-    dValue = 0.0;					/* set bounds */
-    ByteCopy( &dValue, abyHeader+36, 8 );
-    ByteCopy( &dValue, abyHeader+44, 8 );
-    ByteCopy( &dValue, abyHeader+52, 8 );
-    ByteCopy( &dValue, abyHeader+60, 8 );
-
-/* -------------------------------------------------------------------- */
-/*      Write .shp file header.                                         */
-/* -------------------------------------------------------------------- */
-    fwrite( abyHeader, 100, 1, fpSHP );
-
-/* -------------------------------------------------------------------- */
-/*      Prepare, and write .shx file header.                            */
-/* -------------------------------------------------------------------- */
-    i32 = 50;						/* file size */
-    ByteCopy( &i32, abyHeader+24, 4 );
-    if( !bBigEndian ) SwapWord( 4, abyHeader+24 );
-    
-    fwrite( abyHeader, 100, 1, fpSHX );
-
-/* -------------------------------------------------------------------- */
-/*      Close the files, and then open them as regular existing files.  */
-/* -------------------------------------------------------------------- */
-    fclose( fpSHP );
-    fclose( fpSHX );
-
-    return( SHPOpen( pszLayer, "r+b" ) );
-}
-
-/************************************************************************/
-/*                           _SHPSetBounds()                            */
-/*                                                                      */
-/*      Compute a bounds rectangle for a shape, and set it into the     */
-/*      indicated location in the record.                               */
-/************************************************************************/
-
-static void	_SHPSetBounds( uchar * pabyRec, SHPObject * psShape )
-
-{
-    ByteCopy( &(psShape->dfXMin), pabyRec +  0, 8 );
-    ByteCopy( &(psShape->dfYMin), pabyRec +  8, 8 );
-    ByteCopy( &(psShape->dfXMax), pabyRec + 16, 8 );
-    ByteCopy( &(psShape->dfYMax), pabyRec + 24, 8 );
-
-    if( bBigEndian )
-    {
-        SwapWord( 8, pabyRec + 0 );
-        SwapWord( 8, pabyRec + 8 );
-        SwapWord( 8, pabyRec + 16 );
-        SwapWord( 8, pabyRec + 24 );
-    }
-}
-
-/************************************************************************/
-/*                         SHPComputeExtents()                          */
-/*                                                                      */
-/*      Recompute the extents of a shape.  Automatically done by        */
-/*      SHPCreateObject().                                              */
-/************************************************************************/
-
-void SHPAPI_CALL
-SHPComputeExtents( SHPObject * psObject )
-
-{
-    int		i;
-    
-/* -------------------------------------------------------------------- */
-/*      Build extents for this object.                                  */
-/* -------------------------------------------------------------------- */
-    if( psObject->nVertices > 0 )
-    {
-        psObject->dfXMin = psObject->dfXMax = psObject->padfX[0];
-        psObject->dfYMin = psObject->dfYMax = psObject->padfY[0];
-        psObject->dfZMin = psObject->dfZMax = psObject->padfZ[0];
-        psObject->dfMMin = psObject->dfMMax = psObject->padfM[0];
-    }
-    
-    for( i = 0; i < psObject->nVertices; i++ )
-    {
-        psObject->dfXMin = MIN(psObject->dfXMin, psObject->padfX[i]);
-        psObject->dfYMin = MIN(psObject->dfYMin, psObject->padfY[i]);
-        psObject->dfZMin = MIN(psObject->dfZMin, psObject->padfZ[i]);
-        psObject->dfMMin = MIN(psObject->dfMMin, psObject->padfM[i]);
-
-        psObject->dfXMax = MAX(psObject->dfXMax, psObject->padfX[i]);
-        psObject->dfYMax = MAX(psObject->dfYMax, psObject->padfY[i]);
-        psObject->dfZMax = MAX(psObject->dfZMax, psObject->padfZ[i]);
-        psObject->dfMMax = MAX(psObject->dfMMax, psObject->padfM[i]);
-    }
-}
-
-/************************************************************************/
-/*                          SHPCreateObject()                           */
-/*                                                                      */
-/*      Create a shape object.  It should be freed with                 */
-/*      SHPDestroyObject().                                             */
-/************************************************************************/
-
-SHPObject SHPAPI_CALL1(*)
-SHPCreateObject( int nSHPType, int nShapeId, int nParts,
-                 int * panPartStart, int * panPartType,
-                 int nVertices, double * padfX, double * padfY,
-                 double * padfZ, double * padfM )
-
-{
-    SHPObject	*psObject;
-    int		i, bHasM, bHasZ;
-
-    psObject = (SHPObject *) calloc(1,sizeof(SHPObject));
-    psObject->nSHPType = nSHPType;
-    psObject->nShapeId = nShapeId;
-
-/* -------------------------------------------------------------------- */
-/*	Establish whether this shape type has M, and Z values.		*/
-/* -------------------------------------------------------------------- */
-    if( nSHPType == SHPT_ARCM
-        || nSHPType == SHPT_POINTM
-        || nSHPType == SHPT_POLYGONM
-        || nSHPType == SHPT_MULTIPOINTM )
-    {
-        bHasM = TRUE;
-        bHasZ = FALSE;
-    }
-    else if( nSHPType == SHPT_ARCZ
-             || nSHPType == SHPT_POINTZ
-             || nSHPType == SHPT_POLYGONZ
-             || nSHPType == SHPT_MULTIPOINTZ
-             || nSHPType == SHPT_MULTIPATCH )
-    {
-        bHasM = TRUE;
-        bHasZ = TRUE;
-    }
-    else
-    {
-        bHasM = FALSE;
-        bHasZ = FALSE;
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Capture parts.  Note that part type is optional, and            */
-/*      defaults to ring.                                               */
-/* -------------------------------------------------------------------- */
-    if( nSHPType == SHPT_ARC || nSHPType == SHPT_POLYGON
-        || nSHPType == SHPT_ARCM || nSHPType == SHPT_POLYGONM
-        || nSHPType == SHPT_ARCZ || nSHPType == SHPT_POLYGONZ
-        || nSHPType == SHPT_MULTIPATCH )
-    {
-        psObject->nParts = MAX(1,nParts);
-
-        psObject->panPartStart = (int *)
-            malloc(sizeof(int) * psObject->nParts);
-        psObject->panPartType = (int *)
-            malloc(sizeof(int) * psObject->nParts);
-
-        psObject->panPartStart[0] = 0;
-        psObject->panPartType[0] = SHPP_RING;
-        
-        for( i = 0; i < nParts; i++ )
-        {
-            psObject->panPartStart[i] = panPartStart[i];
-            if( panPartType != NULL )
-                psObject->panPartType[i] = panPartType[i];
-            else
-                psObject->panPartType[i] = SHPP_RING;
-        }
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Capture vertices.  Note that Z and M are optional, but X and    */
-/*      Y are not.                                                      */
-/* -------------------------------------------------------------------- */
-    if( nVertices > 0 )
-    {
-        psObject->padfX = (double *) calloc(sizeof(double),nVertices);
-        psObject->padfY = (double *) calloc(sizeof(double),nVertices);
-        psObject->padfZ = (double *) calloc(sizeof(double),nVertices);
-        psObject->padfM = (double *) calloc(sizeof(double),nVertices);
-
-        assert( padfX != NULL );
-        assert( padfY != NULL );
-    
-        for( i = 0; i < nVertices; i++ )
-        {
-            psObject->padfX[i] = padfX[i];
-            psObject->padfY[i] = padfY[i];
-            if( padfZ != NULL && bHasZ )
-                psObject->padfZ[i] = padfZ[i];
-            if( padfM != NULL && bHasM )
-                psObject->padfM[i] = padfM[i];
-        }
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Compute the extents.                                            */
-/* -------------------------------------------------------------------- */
-    psObject->nVertices = nVertices;
-    SHPComputeExtents( psObject );
-
-    return( psObject );
-}
-
-/************************************************************************/
-/*                       SHPCreateSimpleObject()                        */
-/*                                                                      */
-/*      Create a simple (common) shape object.  Destroy with            */
-/*      SHPDestroyObject().                                             */
-/************************************************************************/
-
-SHPObject SHPAPI_CALL1(*)
-SHPCreateSimpleObject( int nSHPType, int nVertices,
-                       double * padfX, double * padfY,
-                       double * padfZ )
-
-{
-    return( SHPCreateObject( nSHPType, -1, 0, NULL, NULL,
-                             nVertices, padfX, padfY, padfZ, NULL ) );
-}
-                                  
-/************************************************************************/
-/*                           SHPWriteObject()                           */
-/*                                                                      */
-/*      Write out the vertices of a new structure.  Note that it is     */
-/*      only possible to write vertices at the end of the file.         */
-/************************************************************************/
-
-int SHPAPI_CALL
-SHPWriteObject(SHPHandle psSHP, int nShapeId, SHPObject * psObject )
-		      
-{
-    int	       	nRecordOffset, i, nRecordSize;
-    uchar	*pabyRec;
-    int32	i32;
-
-    psSHP->bUpdated = TRUE;
-
-/* -------------------------------------------------------------------- */
-/*      Ensure that shape object matches the type of the file it is     */
-/*      being written to.                                               */
-/* -------------------------------------------------------------------- */
-    assert( psObject->nSHPType == psSHP->nShapeType 
-            || psObject->nSHPType == SHPT_NULL );
-
-/* -------------------------------------------------------------------- */
-/*      Ensure that -1 is used for appends.  Either blow an             */
-/*      assertion, or if they are disabled, set the shapeid to -1       */
-/*      for appends.                                                    */
-/* -------------------------------------------------------------------- */
-    assert( nShapeId == -1 
-            || (nShapeId >= 0 && nShapeId < psSHP->nRecords) );
-
-    if( nShapeId != -1 && nShapeId >= psSHP->nRecords )
-        nShapeId = -1;
-
-/* -------------------------------------------------------------------- */
-/*      Add the new entity to the in memory index.                      */
-/* -------------------------------------------------------------------- */
-    if( nShapeId == -1 && psSHP->nRecords+1 > psSHP->nMaxRecords )
-    {
-	psSHP->nMaxRecords =(int) ( psSHP->nMaxRecords * 1.3 + 100);
-
-	psSHP->panRecOffset = (int *) 
-            SfRealloc(psSHP->panRecOffset,sizeof(int) * psSHP->nMaxRecords );
-	psSHP->panRecSize = (int *) 
-            SfRealloc(psSHP->panRecSize,sizeof(int) * psSHP->nMaxRecords );
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Initialize record.                                              */
-/* -------------------------------------------------------------------- */
-    pabyRec = (uchar *) malloc(psObject->nVertices * 4 * sizeof(double) 
-			       + psObject->nParts * 8 + 128);
-    
-/* -------------------------------------------------------------------- */
-/*  Extract vertices for a Polygon or Arc.				*/
-/* -------------------------------------------------------------------- */
-    if( psObject->nSHPType == SHPT_POLYGON
-        || psObject->nSHPType == SHPT_POLYGONZ
-        || psObject->nSHPType == SHPT_POLYGONM
-        || psObject->nSHPType == SHPT_ARC 
-        || psObject->nSHPType == SHPT_ARCZ
-        || psObject->nSHPType == SHPT_ARCM
-        || psObject->nSHPType == SHPT_MULTIPATCH )
-    {
-	int32		nPoints, nParts;
-	int    		i;
-
-	nPoints = psObject->nVertices;
-	nParts = psObject->nParts;
-
-	_SHPSetBounds( pabyRec + 12, psObject );
-
-	if( bBigEndian ) SwapWord( 4, &nPoints );
-	if( bBigEndian ) SwapWord( 4, &nParts );
-
-	ByteCopy( &nPoints, pabyRec + 40 + 8, 4 );
-	ByteCopy( &nParts, pabyRec + 36 + 8, 4 );
-
-        nRecordSize = 52;
-
-        /*
-         * Write part start positions.
-         */
-	ByteCopy( psObject->panPartStart, pabyRec + 44 + 8,
-                  4 * psObject->nParts );
-	for( i = 0; i < psObject->nParts; i++ )
-	{
-	    if( bBigEndian ) SwapWord( 4, pabyRec + 44 + 8 + 4*i );
-            nRecordSize += 4;
-	}
-
-        /*
-         * Write multipatch part types if needed.
-         */
-        if( psObject->nSHPType == SHPT_MULTIPATCH )
-        {
-            memcpy( pabyRec + nRecordSize, psObject->panPartType,
-                    4*psObject->nParts );
-            for( i = 0; i < psObject->nParts; i++ )
-            {
-                if( bBigEndian ) SwapWord( 4, pabyRec + nRecordSize );
-                nRecordSize += 4;
-            }
-        }
-
-        /*
-         * Write the (x,y) vertex values.
-         */
-	for( i = 0; i < psObject->nVertices; i++ )
-	{
-	    ByteCopy( psObject->padfX + i, pabyRec + nRecordSize, 8 );
-	    ByteCopy( psObject->padfY + i, pabyRec + nRecordSize + 8, 8 );
-
-	    if( bBigEndian )
-                SwapWord( 8, pabyRec + nRecordSize );
-            
-	    if( bBigEndian )
-                SwapWord( 8, pabyRec + nRecordSize + 8 );
-
-            nRecordSize += 2 * 8;
-	}
-
-        /*
-         * Write the Z coordinates (if any).
-         */
-        if( psObject->nSHPType == SHPT_POLYGONZ
-            || psObject->nSHPType == SHPT_ARCZ
-            || psObject->nSHPType == SHPT_MULTIPATCH )
-        {
-            ByteCopy( &(psObject->dfZMin), pabyRec + nRecordSize, 8 );
-            if( bBigEndian ) SwapWord( 8, pabyRec + nRecordSize );
-            nRecordSize += 8;
-            
-            ByteCopy( &(psObject->dfZMax), pabyRec + nRecordSize, 8 );
-            if( bBigEndian ) SwapWord( 8, pabyRec + nRecordSize );
-            nRecordSize += 8;
-
-            for( i = 0; i < psObject->nVertices; i++ )
-            {
-                ByteCopy( psObject->padfZ + i, pabyRec + nRecordSize, 8 );
-                if( bBigEndian ) SwapWord( 8, pabyRec + nRecordSize );
-                nRecordSize += 8;
-            }
-        }
-
-        /*
-         * Write the M values, if any.
-         */
-        if( psObject->nSHPType == SHPT_POLYGONM
-            || psObject->nSHPType == SHPT_ARCM
-#ifndef DISABLE_MULTIPATCH_MEASURE            
-            || psObject->nSHPType == SHPT_MULTIPATCH
-#endif            
-            || psObject->nSHPType == SHPT_POLYGONZ
-            || psObject->nSHPType == SHPT_ARCZ )
-        {
-            ByteCopy( &(psObject->dfMMin), pabyRec + nRecordSize, 8 );
-            if( bBigEndian ) SwapWord( 8, pabyRec + nRecordSize );
-            nRecordSize += 8;
-            
-            ByteCopy( &(psObject->dfMMax), pabyRec + nRecordSize, 8 );
-            if( bBigEndian ) SwapWord( 8, pabyRec + nRecordSize );
-            nRecordSize += 8;
-
-            for( i = 0; i < psObject->nVertices; i++ )
-            {
-                ByteCopy( psObject->padfM + i, pabyRec + nRecordSize, 8 );
-                if( bBigEndian ) SwapWord( 8, pabyRec + nRecordSize );
-                nRecordSize += 8;
-            }
-        }
-    }
-
-/* -------------------------------------------------------------------- */
-/*  Extract vertices for a MultiPoint.					*/
-/* -------------------------------------------------------------------- */
-    else if( psObject->nSHPType == SHPT_MULTIPOINT
-             || psObject->nSHPType == SHPT_MULTIPOINTZ
-             || psObject->nSHPType == SHPT_MULTIPOINTM )
-    {
-	int32		nPoints;
-	int    		i;
-
-	nPoints = psObject->nVertices;
-
-        _SHPSetBounds( pabyRec + 12, psObject );
-
-	if( bBigEndian ) SwapWord( 4, &nPoints );
-	ByteCopy( &nPoints, pabyRec + 44, 4 );
-	
-	for( i = 0; i < psObject->nVertices; i++ )
-	{
-	    ByteCopy( psObject->padfX + i, pabyRec + 48 + i*16, 8 );
-	    ByteCopy( psObject->padfY + i, pabyRec + 48 + i*16 + 8, 8 );
-
-	    if( bBigEndian ) SwapWord( 8, pabyRec + 48 + i*16 );
-	    if( bBigEndian ) SwapWord( 8, pabyRec + 48 + i*16 + 8 );
-	}
-
-	nRecordSize = 48 + 16 * psObject->nVertices;
-
-        if( psObject->nSHPType == SHPT_MULTIPOINTZ )
-        {
-            ByteCopy( &(psObject->dfZMin), pabyRec + nRecordSize, 8 );
-            if( bBigEndian ) SwapWord( 8, pabyRec + nRecordSize );
-            nRecordSize += 8;
-
-            ByteCopy( &(psObject->dfZMax), pabyRec + nRecordSize, 8 );
-            if( bBigEndian ) SwapWord( 8, pabyRec + nRecordSize );
-            nRecordSize += 8;
-            
-            for( i = 0; i < psObject->nVertices; i++ )
-            {
-                ByteCopy( psObject->padfZ + i, pabyRec + nRecordSize, 8 );
-                if( bBigEndian ) SwapWord( 8, pabyRec + nRecordSize );
-                nRecordSize += 8;
-            }
-        }
-
-        if( psObject->nSHPType == SHPT_MULTIPOINTZ
-            || psObject->nSHPType == SHPT_MULTIPOINTM )
-        {
-            ByteCopy( &(psObject->dfMMin), pabyRec + nRecordSize, 8 );
-            if( bBigEndian ) SwapWord( 8, pabyRec + nRecordSize );
-            nRecordSize += 8;
-
-            ByteCopy( &(psObject->dfMMax), pabyRec + nRecordSize, 8 );
-            if( bBigEndian ) SwapWord( 8, pabyRec + nRecordSize );
-            nRecordSize += 8;
-            
-            for( i = 0; i < psObject->nVertices; i++ )
-            {
-                ByteCopy( psObject->padfM + i, pabyRec + nRecordSize, 8 );
-                if( bBigEndian ) SwapWord( 8, pabyRec + nRecordSize );
-                nRecordSize += 8;
-            }
-        }
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Write point.							*/
-/* -------------------------------------------------------------------- */
-    else if( psObject->nSHPType == SHPT_POINT
-             || psObject->nSHPType == SHPT_POINTZ
-             || psObject->nSHPType == SHPT_POINTM )
-    {
-	ByteCopy( psObject->padfX, pabyRec + 12, 8 );
-	ByteCopy( psObject->padfY, pabyRec + 20, 8 );
-
-	if( bBigEndian ) SwapWord( 8, pabyRec + 12 );
-	if( bBigEndian ) SwapWord( 8, pabyRec + 20 );
-
-        nRecordSize = 28;
-        
-        if( psObject->nSHPType == SHPT_POINTZ )
-        {
-            ByteCopy( psObject->padfZ, pabyRec + nRecordSize, 8 );
-            if( bBigEndian ) SwapWord( 8, pabyRec + nRecordSize );
-            nRecordSize += 8;
-        }
-        
-        if( psObject->nSHPType == SHPT_POINTZ
-            || psObject->nSHPType == SHPT_POINTM )
-        {
-            ByteCopy( psObject->padfM, pabyRec + nRecordSize, 8 );
-            if( bBigEndian ) SwapWord( 8, pabyRec + nRecordSize );
-            nRecordSize += 8;
-        }
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Not much to do for null geometries.                             */
-/* -------------------------------------------------------------------- */
-    else if( psObject->nSHPType == SHPT_NULL )
-    {
-        nRecordSize = 12;
-    }
-
-    else
-    {
-        /* unknown type */
-        assert( FALSE );
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Establish where we are going to put this record. If we are      */
-/*      rewriting and existing record, and it will fit, then put it     */
-/*      back where the original came from.  Otherwise write at the end. */
-/* -------------------------------------------------------------------- */
-    if( nShapeId == -1 || psSHP->panRecSize[nShapeId] < nRecordSize-8 )
-    {
-        if( nShapeId == -1 )
-            nShapeId = psSHP->nRecords++;
-
-        psSHP->panRecOffset[nShapeId] = nRecordOffset = psSHP->nFileSize;
-        psSHP->panRecSize[nShapeId] = nRecordSize-8;
-        psSHP->nFileSize += nRecordSize;
-    }
-    else
-    {
-        nRecordOffset = psSHP->panRecOffset[nShapeId];
-    }
-    
-/* -------------------------------------------------------------------- */
-/*      Set the shape type, record number, and record size.             */
-/* -------------------------------------------------------------------- */
-    i32 = nShapeId+1;					/* record # */
-    if( !bBigEndian ) SwapWord( 4, &i32 );
-    ByteCopy( &i32, pabyRec, 4 );
-
-    i32 = (nRecordSize-8)/2;				/* record size */
-    if( !bBigEndian ) SwapWord( 4, &i32 );
-    ByteCopy( &i32, pabyRec + 4, 4 );
-
-    i32 = psObject->nSHPType;				/* shape type */
-    if( bBigEndian ) SwapWord( 4, &i32 );
-    ByteCopy( &i32, pabyRec + 8, 4 );
-
-/* -------------------------------------------------------------------- */
-/*      Write out record.                                               */
-/* -------------------------------------------------------------------- */
-    if( fseek( psSHP->fpSHP, nRecordOffset, 0 ) != 0
-        || fwrite( pabyRec, nRecordSize, 1, psSHP->fpSHP ) < 1 )
-    {
-        printf( "Error in fseek() or fwrite().\n" );
-        free( pabyRec );
-        return -1;
-    }
-    
-    free( pabyRec );
-
-/* -------------------------------------------------------------------- */
-/*	Expand file wide bounds based on this shape.			*/
-/* -------------------------------------------------------------------- */
-    if( psSHP->adBoundsMin[0] == 0.0
-        && psSHP->adBoundsMax[0] == 0.0
-        && psSHP->adBoundsMin[1] == 0.0
-        && psSHP->adBoundsMax[1] == 0.0 
-        && psObject->nSHPType != SHPT_NULL )
-    {
-        psSHP->adBoundsMin[0] = psSHP->adBoundsMax[0] = psObject->padfX[0];
-        psSHP->adBoundsMin[1] = psSHP->adBoundsMax[1] = psObject->padfY[0];
-        psSHP->adBoundsMin[2] = psSHP->adBoundsMax[2] = psObject->padfZ[0];
-        psSHP->adBoundsMin[3] = psSHP->adBoundsMax[3] = psObject->padfM[0];
-    }
-
-    for( i = 0; i < psObject->nVertices; i++ )
-    {
-	psSHP->adBoundsMin[0] = MIN(psSHP->adBoundsMin[0],psObject->padfX[i]);
-	psSHP->adBoundsMin[1] = MIN(psSHP->adBoundsMin[1],psObject->padfY[i]);
-	psSHP->adBoundsMin[2] = MIN(psSHP->adBoundsMin[2],psObject->padfZ[i]);
-	psSHP->adBoundsMin[3] = MIN(psSHP->adBoundsMin[3],psObject->padfM[i]);
-	psSHP->adBoundsMax[0] = MAX(psSHP->adBoundsMax[0],psObject->padfX[i]);
-	psSHP->adBoundsMax[1] = MAX(psSHP->adBoundsMax[1],psObject->padfY[i]);
-	psSHP->adBoundsMax[2] = MAX(psSHP->adBoundsMax[2],psObject->padfZ[i]);
-	psSHP->adBoundsMax[3] = MAX(psSHP->adBoundsMax[3],psObject->padfM[i]);
-    }
-
-    return( nShapeId  );
-}
-
-/************************************************************************/
-/*                          SHPReadObject()                             */
-/*                                                                      */
-/*      Read the vertices, parts, and other non-attribute information	*/
-/*	for one shape.							*/
-/************************************************************************/
-
-SHPObject SHPAPI_CALL1(*)
-SHPReadObject( SHPHandle psSHP, int hEntity )
-
-{
-    SHPObject		*psShape;
-
-/* -------------------------------------------------------------------- */
-/*      Validate the record/entity number.                              */
-/* -------------------------------------------------------------------- */
-    if( hEntity < 0 || hEntity >= psSHP->nRecords )
-        return( NULL );
-
-/* -------------------------------------------------------------------- */
-/*      Ensure our record buffer is large enough.                       */
-/* -------------------------------------------------------------------- */
-    if( psSHP->panRecSize[hEntity]+8 > psSHP->nBufSize )
-    {
-	psSHP->nBufSize = psSHP->panRecSize[hEntity]+8;
-	psSHP->pabyRec = (uchar *) SfRealloc(psSHP->pabyRec,psSHP->nBufSize);
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Read the record.                                                */
-/* -------------------------------------------------------------------- */
-    fseek( psSHP->fpSHP, psSHP->panRecOffset[hEntity], 0 );
-    fread( psSHP->pabyRec, psSHP->panRecSize[hEntity]+8, 1, psSHP->fpSHP );
-
-/* -------------------------------------------------------------------- */
-/*	Allocate and minimally initialize the object.			*/
-/* -------------------------------------------------------------------- */
-    psShape = (SHPObject *) calloc(1,sizeof(SHPObject));
-    psShape->nShapeId = hEntity;
-
-    memcpy( &psShape->nSHPType, psSHP->pabyRec + 8, 4 );
-    if( bBigEndian ) SwapWord( 4, &(psShape->nSHPType) );
-
-/* ==================================================================== */
-/*  Extract vertices for a Polygon or Arc.				*/
-/* ==================================================================== */
-    if( psShape->nSHPType == SHPT_POLYGON || psShape->nSHPType == SHPT_ARC
-        || psShape->nSHPType == SHPT_POLYGONZ
-        || psShape->nSHPType == SHPT_POLYGONM
-        || psShape->nSHPType == SHPT_ARCZ
-        || psShape->nSHPType == SHPT_ARCM
-        || psShape->nSHPType == SHPT_MULTIPATCH )
-    {
-	int32		nPoints, nParts;
-	int    		i, nOffset;
-
-/* -------------------------------------------------------------------- */
-/*	Get the X/Y bounds.						*/
-/* -------------------------------------------------------------------- */
-        memcpy( &(psShape->dfXMin), psSHP->pabyRec + 8 +  4, 8 );
-        memcpy( &(psShape->dfYMin), psSHP->pabyRec + 8 + 12, 8 );
-        memcpy( &(psShape->dfXMax), psSHP->pabyRec + 8 + 20, 8 );
-        memcpy( &(psShape->dfYMax), psSHP->pabyRec + 8 + 28, 8 );
-
-	if( bBigEndian ) SwapWord( 8, &(psShape->dfXMin) );
-	if( bBigEndian ) SwapWord( 8, &(psShape->dfYMin) );
-	if( bBigEndian ) SwapWord( 8, &(psShape->dfXMax) );
-	if( bBigEndian ) SwapWord( 8, &(psShape->dfYMax) );
-
-/* -------------------------------------------------------------------- */
-/*      Extract part/point count, and build vertex and part arrays      */
-/*      to proper size.                                                 */
-/* -------------------------------------------------------------------- */
-	memcpy( &nPoints, psSHP->pabyRec + 40 + 8, 4 );
-	memcpy( &nParts, psSHP->pabyRec + 36 + 8, 4 );
-
-	if( bBigEndian ) SwapWord( 4, &nPoints );
-	if( bBigEndian ) SwapWord( 4, &nParts );
-
-	psShape->nVertices = nPoints;
-        psShape->padfX = (double *) calloc(nPoints,sizeof(double));
-        psShape->padfY = (double *) calloc(nPoints,sizeof(double));
-        psShape->padfZ = (double *) calloc(nPoints,sizeof(double));
-        psShape->padfM = (double *) calloc(nPoints,sizeof(double));
-
-	psShape->nParts = nParts;
-        psShape->panPartStart = (int *) calloc(nParts,sizeof(int));
-        psShape->panPartType = (int *) calloc(nParts,sizeof(int));
-
-        for( i = 0; i < nParts; i++ )
-            psShape->panPartType[i] = SHPP_RING;
-
-/* -------------------------------------------------------------------- */
-/*      Copy out the part array from the record.                        */
-/* -------------------------------------------------------------------- */
-	memcpy( psShape->panPartStart, psSHP->pabyRec + 44 + 8, 4 * nParts );
-	for( i = 0; i < nParts; i++ )
-	{
-	    if( bBigEndian ) SwapWord( 4, psShape->panPartStart+i );
-	}
-
-	nOffset = 44 + 8 + 4*nParts;
-
-/* -------------------------------------------------------------------- */
-/*      If this is a multipatch, we will also have parts types.         */
-/* -------------------------------------------------------------------- */
-        if( psShape->nSHPType == SHPT_MULTIPATCH )
-        {
-            memcpy( psShape->panPartType, psSHP->pabyRec + nOffset, 4*nParts );
-            for( i = 0; i < nParts; i++ )
-            {
-                if( bBigEndian ) SwapWord( 4, psShape->panPartType+i );
-            }
-
-            nOffset += 4*nParts;
-        }
-        
-/* -------------------------------------------------------------------- */
-/*      Copy out the vertices from the record.                          */
-/* -------------------------------------------------------------------- */
-	for( i = 0; i < nPoints; i++ )
-	{
-	    memcpy(psShape->padfX + i,
-		   psSHP->pabyRec + nOffset + i * 16,
-		   8 );
-
-	    memcpy(psShape->padfY + i,
-		   psSHP->pabyRec + nOffset + i * 16 + 8,
-		   8 );
-
-	    if( bBigEndian ) SwapWord( 8, psShape->padfX + i );
-	    if( bBigEndian ) SwapWord( 8, psShape->padfY + i );
-	}
-
-        nOffset += 16*nPoints;
-        
-/* -------------------------------------------------------------------- */
-/*      If we have a Z coordinate, collect that now.                    */
-/* -------------------------------------------------------------------- */
-        if( psShape->nSHPType == SHPT_POLYGONZ
-            || psShape->nSHPType == SHPT_ARCZ
-            || psShape->nSHPType == SHPT_MULTIPATCH )
-        {
-            memcpy( &(psShape->dfZMin), psSHP->pabyRec + nOffset, 8 );
-            memcpy( &(psShape->dfZMax), psSHP->pabyRec + nOffset + 8, 8 );
-            
-            if( bBigEndian ) SwapWord( 8, &(psShape->dfZMin) );
-            if( bBigEndian ) SwapWord( 8, &(psShape->dfZMax) );
-            
-            for( i = 0; i < nPoints; i++ )
-            {
-                memcpy( psShape->padfZ + i,
-                        psSHP->pabyRec + nOffset + 16 + i*8, 8 );
-                if( bBigEndian ) SwapWord( 8, psShape->padfZ + i );
-            }
-
-            nOffset += 16 + 8*nPoints;
-        }
-
-/* -------------------------------------------------------------------- */
-/*      If we have a M measure value, then read it now.  We assume      */
-/*      that the measure can be present for any shape if the size is    */
-/*      big enough, but really it will only occur for the Z shapes      */
-/*      (options), and the M shapes.                                    */
-/* -------------------------------------------------------------------- */
-        if( psSHP->panRecSize[hEntity]+8 >= nOffset + 16 + 8*nPoints )
-        {
-            memcpy( &(psShape->dfMMin), psSHP->pabyRec + nOffset, 8 );
-            memcpy( &(psShape->dfMMax), psSHP->pabyRec + nOffset + 8, 8 );
-            
-            if( bBigEndian ) SwapWord( 8, &(psShape->dfMMin) );
-            if( bBigEndian ) SwapWord( 8, &(psShape->dfMMax) );
-            
-            for( i = 0; i < nPoints; i++ )
-            {
-                memcpy( psShape->padfM + i,
-                        psSHP->pabyRec + nOffset + 16 + i*8, 8 );
-                if( bBigEndian ) SwapWord( 8, psShape->padfM + i );
-            }
-        }
-        
-    }
-
-/* ==================================================================== */
-/*  Extract vertices for a MultiPoint.					*/
-/* ==================================================================== */
-    else if( psShape->nSHPType == SHPT_MULTIPOINT
-             || psShape->nSHPType == SHPT_MULTIPOINTM
-             || psShape->nSHPType == SHPT_MULTIPOINTZ )
-    {
-	int32		nPoints;
-	int    		i, nOffset;
-
-	memcpy( &nPoints, psSHP->pabyRec + 44, 4 );
-	if( bBigEndian ) SwapWord( 4, &nPoints );
-
-	psShape->nVertices = nPoints;
-        psShape->padfX = (double *) calloc(nPoints,sizeof(double));
-        psShape->padfY = (double *) calloc(nPoints,sizeof(double));
-        psShape->padfZ = (double *) calloc(nPoints,sizeof(double));
-        psShape->padfM = (double *) calloc(nPoints,sizeof(double));
-
-	for( i = 0; i < nPoints; i++ )
-	{
-	    memcpy(psShape->padfX+i, psSHP->pabyRec + 48 + 16 * i, 8 );
-	    memcpy(psShape->padfY+i, psSHP->pabyRec + 48 + 16 * i + 8, 8 );
-
-	    if( bBigEndian ) SwapWord( 8, psShape->padfX + i );
-	    if( bBigEndian ) SwapWord( 8, psShape->padfY + i );
-	}
-
-        nOffset = 48 + 16*nPoints;
-        
-/* -------------------------------------------------------------------- */
-/*	Get the X/Y bounds.						*/
-/* -------------------------------------------------------------------- */
-        memcpy( &(psShape->dfXMin), psSHP->pabyRec + 8 +  4, 8 );
-        memcpy( &(psShape->dfYMin), psSHP->pabyRec + 8 + 12, 8 );
-        memcpy( &(psShape->dfXMax), psSHP->pabyRec + 8 + 20, 8 );
-        memcpy( &(psShape->dfYMax), psSHP->pabyRec + 8 + 28, 8 );
-
-	if( bBigEndian ) SwapWord( 8, &(psShape->dfXMin) );
-	if( bBigEndian ) SwapWord( 8, &(psShape->dfYMin) );
-	if( bBigEndian ) SwapWord( 8, &(psShape->dfXMax) );
-	if( bBigEndian ) SwapWord( 8, &(psShape->dfYMax) );
-
-/* -------------------------------------------------------------------- */
-/*      If we have a Z coordinate, collect that now.                    */
-/* -------------------------------------------------------------------- */
-        if( psShape->nSHPType == SHPT_MULTIPOINTZ )
-        {
-            memcpy( &(psShape->dfZMin), psSHP->pabyRec + nOffset, 8 );
-            memcpy( &(psShape->dfZMax), psSHP->pabyRec + nOffset + 8, 8 );
-            
-            if( bBigEndian ) SwapWord( 8, &(psShape->dfZMin) );
-            if( bBigEndian ) SwapWord( 8, &(psShape->dfZMax) );
-            
-            for( i = 0; i < nPoints; i++ )
-            {
-                memcpy( psShape->padfZ + i,
-                        psSHP->pabyRec + nOffset + 16 + i*8, 8 );
-                if( bBigEndian ) SwapWord( 8, psShape->padfZ + i );
-            }
-
-            nOffset += 16 + 8*nPoints;
-        }
-
-/* -------------------------------------------------------------------- */
-/*      If we have a M measure value, then read it now.  We assume      */
-/*      that the measure can be present for any shape if the size is    */
-/*      big enough, but really it will only occur for the Z shapes      */
-/*      (options), and the M shapes.                                    */
-/* -------------------------------------------------------------------- */
-        if( psSHP->panRecSize[hEntity]+8 >= nOffset + 16 + 8*nPoints )
-        {
-            memcpy( &(psShape->dfMMin), psSHP->pabyRec + nOffset, 8 );
-            memcpy( &(psShape->dfMMax), psSHP->pabyRec + nOffset + 8, 8 );
-            
-            if( bBigEndian ) SwapWord( 8, &(psShape->dfMMin) );
-            if( bBigEndian ) SwapWord( 8, &(psShape->dfMMax) );
-            
-            for( i = 0; i < nPoints; i++ )
-            {
-                memcpy( psShape->padfM + i,
-                        psSHP->pabyRec + nOffset + 16 + i*8, 8 );
-                if( bBigEndian ) SwapWord( 8, psShape->padfM + i );
-            }
-        }
-    }
-
-/* ==================================================================== */
-/*      Extract vertices for a point.                                   */
-/* ==================================================================== */
-    else if( psShape->nSHPType == SHPT_POINT
-             || psShape->nSHPType == SHPT_POINTM
-             || psShape->nSHPType == SHPT_POINTZ )
-    {
-        int	nOffset;
-        
-	psShape->nVertices = 1;
-        psShape->padfX = (double *) calloc(1,sizeof(double));
-        psShape->padfY = (double *) calloc(1,sizeof(double));
-        psShape->padfZ = (double *) calloc(1,sizeof(double));
-        psShape->padfM = (double *) calloc(1,sizeof(double));
-
-	memcpy( psShape->padfX, psSHP->pabyRec + 12, 8 );
-	memcpy( psShape->padfY, psSHP->pabyRec + 20, 8 );
-
-	if( bBigEndian ) SwapWord( 8, psShape->padfX );
-	if( bBigEndian ) SwapWord( 8, psShape->padfY );
-
-        nOffset = 20 + 8;
-        
-/* -------------------------------------------------------------------- */
-/*      If we have a Z coordinate, collect that now.                    */
-/* -------------------------------------------------------------------- */
-        if( psShape->nSHPType == SHPT_POINTZ )
-        {
-            memcpy( psShape->padfZ, psSHP->pabyRec + nOffset, 8 );
-        
-            if( bBigEndian ) SwapWord( 8, psShape->padfZ );
-            
-            nOffset += 8;
-        }
-
-/* -------------------------------------------------------------------- */
-/*      If we have a M measure value, then read it now.  We assume      */
-/*      that the measure can be present for any shape if the size is    */
-/*      big enough, but really it will only occur for the Z shapes      */
-/*      (options), and the M shapes.                                    */
-/* -------------------------------------------------------------------- */
-        if( psSHP->panRecSize[hEntity]+8 >= nOffset + 8 )
-        {
-            memcpy( psShape->padfM, psSHP->pabyRec + nOffset, 8 );
-        
-            if( bBigEndian ) SwapWord( 8, psShape->padfM );
-        }
-
-/* -------------------------------------------------------------------- */
-/*      Since no extents are supplied in the record, we will apply      */
-/*      them from the single vertex.                                    */
-/* -------------------------------------------------------------------- */
-        psShape->dfXMin = psShape->dfXMax = psShape->padfX[0];
-        psShape->dfYMin = psShape->dfYMax = psShape->padfY[0];
-        psShape->dfZMin = psShape->dfZMax = psShape->padfZ[0];
-        psShape->dfMMin = psShape->dfMMax = psShape->padfM[0];
-    }
-
-    return( psShape );
-}
-
-/************************************************************************/
-/*                            SHPTypeName()                             */
-/************************************************************************/
-
-const char SHPAPI_CALL1(*)
-SHPTypeName( int nSHPType )
-
-{
-    switch( nSHPType )
-    {
-      case SHPT_NULL:
-        return "NullShape";
-
-      case SHPT_POINT:
-        return "Point";
-
-      case SHPT_ARC:
-        return "Arc";
-
-      case SHPT_POLYGON:
-        return "Polygon";
-
-      case SHPT_MULTIPOINT:
-        return "MultiPoint";
-        
-      case SHPT_POINTZ:
-        return "PointZ";
-
-      case SHPT_ARCZ:
-        return "ArcZ";
-
-      case SHPT_POLYGONZ:
-        return "PolygonZ";
-
-      case SHPT_MULTIPOINTZ:
-        return "MultiPointZ";
-        
-      case SHPT_POINTM:
-        return "PointM";
-
-      case SHPT_ARCM:
-        return "ArcM";
-
-      case SHPT_POLYGONM:
-        return "PolygonM";
-
-      case SHPT_MULTIPOINTM:
-        return "MultiPointM";
-
-      case SHPT_MULTIPATCH:
-        return "MultiPatch";
-
-      default:
-        return "UnknownShapeType";
-    }
-}
-
-/************************************************************************/
-/*                          SHPPartTypeName()                           */
-/************************************************************************/
-
-const char SHPAPI_CALL1(*)
-SHPPartTypeName( int nPartType )
-
-{
-    switch( nPartType )
-    {
-      case SHPP_TRISTRIP:
-        return "TriangleStrip";
-        
-      case SHPP_TRIFAN:
-        return "TriangleFan";
-
-      case SHPP_OUTERRING:
-        return "OuterRing";
-
-      case SHPP_INNERRING:
-        return "InnerRing";
-
-      case SHPP_FIRSTRING:
-        return "FirstRing";
-
-      case SHPP_RING:
-        return "Ring";
-
-      default:
-        return "UnknownPartType";
-    }
-}
-
-/************************************************************************/
-/*                          SHPDestroyObject()                          */
-/************************************************************************/
-
-void SHPAPI_CALL
-SHPDestroyObject( SHPObject * psShape )
-
-{
-    if( psShape == NULL )
-        return;
-    
-    if( psShape->padfX != NULL )
-        free( psShape->padfX );
-    if( psShape->padfY != NULL )
-        free( psShape->padfY );
-    if( psShape->padfZ != NULL )
-        free( psShape->padfZ );
-    if( psShape->padfM != NULL )
-        free( psShape->padfM );
-
-    if( psShape->panPartStart != NULL )
-        free( psShape->panPartStart );
-    if( psShape->panPartType != NULL )
-        free( psShape->panPartType );
-
-    free( psShape );
-}
-
-/************************************************************************/
-/*                          SHPRewindObject()                           */
-/*                                                                      */
-/*      Reset the winding of polygon objects to adhere to the           */
-/*      specification.                                                  */
-/************************************************************************/
-
-int SHPAPI_CALL
-SHPRewindObject( SHPHandle hSHP, SHPObject * psObject )
-
-{
-    int  iOpRing, bAltered = 0;
-
-/* -------------------------------------------------------------------- */
-/*      Do nothing if this is not a polygon object.                     */
-/* -------------------------------------------------------------------- */
-    if( psObject->nSHPType != SHPT_POLYGON
-        && psObject->nSHPType != SHPT_POLYGONZ
-        && psObject->nSHPType != SHPT_POLYGONM )
-        return 0;
-
-/* -------------------------------------------------------------------- */
-/*      Process each of the rings.                                      */
-/* -------------------------------------------------------------------- */
-    for( iOpRing = 0; iOpRing < psObject->nParts; iOpRing++ )
-    {
-        int      bInner, iVert, nVertCount, nVertStart, iCheckRing;
-        double   dfSum, dfTestX, dfTestY;
-
-/* -------------------------------------------------------------------- */
-/*      Determine if this ring is an inner ring or an outer ring        */
-/*      relative to all the other rings.  For now we assume the         */
-/*      first ring is outer and all others are inner, but eventually    */
-/*      we need to fix this to handle multiple island polygons and      */
-/*      unordered sets of rings.                                        */
-/* -------------------------------------------------------------------- */
-        dfTestX = psObject->padfX[psObject->panPartStart[iOpRing]];
-        dfTestY = psObject->padfY[psObject->panPartStart[iOpRing]];
-
-        bInner = FALSE;
-        for( iCheckRing = 0; iCheckRing < psObject->nParts; iCheckRing++ )
-        {
-            int iEdge;
-
-            if( iCheckRing == iOpRing )
-                continue;
-            
-            nVertStart = psObject->panPartStart[iCheckRing];
-
-            if( iCheckRing == psObject->nParts-1 )
-                nVertCount = psObject->nVertices 
-                    - psObject->panPartStart[iCheckRing];
-            else
-                nVertCount = psObject->panPartStart[iCheckRing+1] 
-                    - psObject->panPartStart[iCheckRing];
-
-            for( iEdge = 0; iEdge < nVertCount; iEdge++ )
-            {
-                int iNext;
-
-                if( iEdge < nVertCount-1 )
-                    iNext = iEdge+1;
-                else
-                    iNext = 0;
-
-                if( (psObject->padfY[iEdge+nVertStart] < dfTestY 
-                     && psObject->padfY[iNext+nVertStart] >= dfTestY)
-                    || (psObject->padfY[iNext+nVertStart] < dfTestY 
-                        && psObject->padfY[iEdge+nVertStart] >= dfTestY) )
-                {
-                    if( psObject->padfX[iEdge+nVertStart] 
-                        + (dfTestY - psObject->padfY[iEdge+nVertStart])
-                           / (psObject->padfY[iNext+nVertStart]
-                              - psObject->padfY[iEdge+nVertStart])
-                           * (psObject->padfX[iNext+nVertStart]
-                              - psObject->padfX[iEdge+nVertStart]) < dfTestX )
-                        bInner = !bInner;
-                }
-            }
-        }
-
-/* -------------------------------------------------------------------- */
-/*      Determine the current order of this ring so we will know if     */
-/*      it has to be reversed.                                          */
-/* -------------------------------------------------------------------- */
-        nVertStart = psObject->panPartStart[iOpRing];
-
-        if( iOpRing == psObject->nParts-1 )
-            nVertCount = psObject->nVertices - psObject->panPartStart[iOpRing];
-        else
-            nVertCount = psObject->panPartStart[iOpRing+1] 
-                - psObject->panPartStart[iOpRing];
-
-        dfSum = 0.0;
-        for( iVert = nVertStart; iVert < nVertStart+nVertCount-1; iVert++ )
-        {
-            dfSum += psObject->padfX[iVert] * psObject->padfY[iVert+1]
-                - psObject->padfY[iVert] * psObject->padfX[iVert+1];
-        }
-
-        dfSum += psObject->padfX[iVert] * psObject->padfY[nVertStart]
-               - psObject->padfY[iVert] * psObject->padfX[nVertStart];
-
-/* -------------------------------------------------------------------- */
-/*      Reverse if necessary.                                           */
-/* -------------------------------------------------------------------- */
-        if( (dfSum < 0.0 && bInner) || (dfSum > 0.0 && !bInner) )
-        {
-            int   i;
-
-            bAltered++;
-            for( i = 0; i < nVertCount/2; i++ )
-            {
-                double dfSaved;
-
-                /* Swap X */
-                dfSaved = psObject->padfX[nVertStart+i];
-                psObject->padfX[nVertStart+i] = 
-                    psObject->padfX[nVertStart+nVertCount-i-1];
-                psObject->padfX[nVertStart+nVertCount-i-1] = dfSaved;
-
-                /* Swap Y */
-                dfSaved = psObject->padfY[nVertStart+i];
-                psObject->padfY[nVertStart+i] = 
-                    psObject->padfY[nVertStart+nVertCount-i-1];
-                psObject->padfY[nVertStart+nVertCount-i-1] = dfSaved;
-
-                /* Swap Z */
-                if( psObject->padfZ )
-                {
-                    dfSaved = psObject->padfZ[nVertStart+i];
-                    psObject->padfZ[nVertStart+i] = 
-                        psObject->padfZ[nVertStart+nVertCount-i-1];
-                    psObject->padfZ[nVertStart+nVertCount-i-1] = dfSaved;
-                }
-
-                /* Swap M */
-                if( psObject->padfM )
-                {
-                    dfSaved = psObject->padfM[nVertStart+i];
-                    psObject->padfM[nVertStart+i] = 
-                        psObject->padfM[nVertStart+nVertCount-i-1];
-                    psObject->padfM[nVertStart+nVertCount-i-1] = dfSaved;
-                }
-            }
-        }
-    }
-
-    return bAltered;
-}
diff --git a/src/terralib/PDI/.cvsignore b/src/terralib/PDI/.cvsignore
deleted file mode 100644
index 33ceb8f..0000000
--- a/src/terralib/PDI/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Makefile
\ No newline at end of file
diff --git a/src/terralib/PDI/Doxyfile b/src/terralib/PDI/Doxyfile
deleted file mode 100644
index 234bd7b..0000000
--- a/src/terralib/PDI/Doxyfile
+++ /dev/null
@@ -1,214 +0,0 @@
-# Doxyfile 1.3.9.1
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-PROJECT_NAME           = "TerraLib - Digital Image Processing Algorithms"
-PROJECT_NUMBER         = 
-OUTPUT_DIRECTORY       = docs
-CREATE_SUBDIRS         = YES
-OUTPUT_LANGUAGE        = English
-USE_WINDOWS_ENCODING   = YES
-BRIEF_MEMBER_DESC      = YES
-REPEAT_BRIEF           = NO
-ABBREVIATE_BRIEF       = 
-ALWAYS_DETAILED_SEC    = YES
-INLINE_INHERITED_MEMB  = YES
-FULL_PATH_NAMES        = NO
-STRIP_FROM_PATH        = 
-STRIP_FROM_INC_PATH    = 
-SHORT_NAMES            = YES
-JAVADOC_AUTOBRIEF      = YES
-MULTILINE_CPP_IS_BRIEF = NO
-DETAILS_AT_TOP         = YES
-INHERIT_DOCS           = YES
-DISTRIBUTE_GROUP_DOC   = NO
-TAB_SIZE               = 8
-ALIASES                = 
-OPTIMIZE_OUTPUT_FOR_C  = YES
-OPTIMIZE_OUTPUT_JAVA   = NO
-SUBGROUPING            = NO
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-EXTRACT_ALL            = YES
-EXTRACT_PRIVATE        = YES
-EXTRACT_STATIC         = YES
-EXTRACT_LOCAL_CLASSES  = YES
-EXTRACT_LOCAL_METHODS  = YES
-HIDE_UNDOC_MEMBERS     = NO
-HIDE_UNDOC_CLASSES     = NO
-HIDE_FRIEND_COMPOUNDS  = NO
-HIDE_IN_BODY_DOCS      = NO
-INTERNAL_DOCS          = YES
-CASE_SENSE_NAMES       = YES
-HIDE_SCOPE_NAMES       = NO
-SHOW_INCLUDE_FILES     = YES
-INLINE_INFO            = YES
-SORT_MEMBER_DOCS       = YES
-SORT_BRIEF_DOCS        = YES
-SORT_BY_SCOPE_NAME     = NO
-GENERATE_TODOLIST      = YES
-GENERATE_TESTLIST      = YES
-GENERATE_BUGLIST       = YES
-GENERATE_DEPRECATEDLIST= YES
-ENABLED_SECTIONS       = 
-MAX_INITIALIZER_LINES  = 30
-SHOW_USED_FILES        = YES
-SHOW_DIRECTORIES       = YES
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-QUIET                  = NO
-WARNINGS               = YES
-WARN_IF_UNDOCUMENTED   = YES
-WARN_IF_DOC_ERROR      = YES
-WARN_FORMAT            = "$file:$line: $text"
-WARN_LOGFILE           = 
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT                  = source
-FILE_PATTERNS          = 
-RECURSIVE              = YES
-EXCLUDE                = 
-EXCLUDE_SYMLINKS       = NO
-EXCLUDE_PATTERNS       = 
-EXAMPLE_PATH           = 
-EXAMPLE_PATTERNS       = 
-EXAMPLE_RECURSIVE      = YES
-IMAGE_PATH             = 
-INPUT_FILTER           = 
-FILTER_PATTERNS        = 
-FILTER_SOURCE_FILES    = YES
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-SOURCE_BROWSER         = YES
-INLINE_SOURCES         = YES
-STRIP_CODE_COMMENTS    = NO
-REFERENCED_BY_RELATION = YES
-REFERENCES_RELATION    = YES
-VERBATIM_HEADERS       = YES
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-ALPHABETICAL_INDEX     = YES
-COLS_IN_ALPHA_INDEX    = 5
-IGNORE_PREFIX          = 
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-GENERATE_HTML          = YES
-HTML_OUTPUT            = html
-HTML_FILE_EXTENSION    = .html
-HTML_HEADER            = 
-HTML_FOOTER            = 
-HTML_STYLESHEET        = 
-HTML_ALIGN_MEMBERS     = YES
-GENERATE_HTMLHELP      = YES
-CHM_FILE               = 
-HHC_LOCATION           = 
-GENERATE_CHI           = YES
-BINARY_TOC             = NO
-TOC_EXPAND             = YES
-DISABLE_INDEX          = NO
-ENUM_VALUES_PER_LINE   = 4
-GENERATE_TREEVIEW      = YES
-TREEVIEW_WIDTH         = 250
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-GENERATE_LATEX         = NO
-LATEX_OUTPUT           = latex
-LATEX_CMD_NAME         = latex
-MAKEINDEX_CMD_NAME     = makeindex
-COMPACT_LATEX          = NO
-PAPER_TYPE             = a4wide
-EXTRA_PACKAGES         = 
-LATEX_HEADER           = 
-PDF_HYPERLINKS         = NO
-USE_PDFLATEX           = NO
-LATEX_BATCHMODE        = NO
-LATEX_HIDE_INDICES     = NO
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-GENERATE_RTF           = NO
-RTF_OUTPUT             = rtf
-COMPACT_RTF            = NO
-RTF_HYPERLINKS         = NO
-RTF_STYLESHEET_FILE    = 
-RTF_EXTENSIONS_FILE    = 
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-GENERATE_MAN           = NO
-MAN_OUTPUT             = man
-MAN_EXTENSION          = .3
-MAN_LINKS              = NO
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-GENERATE_XML           = NO
-XML_OUTPUT             = xml
-XML_SCHEMA             = 
-XML_DTD                = 
-XML_PROGRAMLISTING     = YES
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-GENERATE_AUTOGEN_DEF   = NO
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-GENERATE_PERLMOD       = NO
-PERLMOD_LATEX          = NO
-PERLMOD_PRETTY         = YES
-PERLMOD_MAKEVAR_PREFIX = 
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor   
-#---------------------------------------------------------------------------
-ENABLE_PREPROCESSING   = YES
-MACRO_EXPANSION        = NO
-EXPAND_ONLY_PREDEF     = NO
-SEARCH_INCLUDES        = YES
-INCLUDE_PATH           = 
-INCLUDE_FILE_PATTERNS  = 
-PREDEFINED             = 
-EXPAND_AS_DEFINED      = 
-SKIP_FUNCTION_MACROS   = NO
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references   
-#---------------------------------------------------------------------------
-TAGFILES               = 
-GENERATE_TAGFILE       = 
-ALLEXTERNALS           = YES
-EXTERNAL_GROUPS        = YES
-PERL_PATH              = /usr/bin/perl
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool   
-#---------------------------------------------------------------------------
-CLASS_DIAGRAMS         = YES
-HIDE_UNDOC_RELATIONS   = NO
-HAVE_DOT               = YES
-CLASS_GRAPH            = YES
-COLLABORATION_GRAPH    = YES
-UML_LOOK               = NO
-TEMPLATE_RELATIONS     = YES
-INCLUDE_GRAPH          = YES
-INCLUDED_BY_GRAPH      = YES
-CALL_GRAPH             = YES
-GRAPHICAL_HIERARCHY    = YES
-DOT_IMAGE_FORMAT       = png
-DOT_PATH               = 
-DOTFILE_DIRS           = 
-MAX_DOT_GRAPH_WIDTH    = 1024
-MAX_DOT_GRAPH_HEIGHT   = 1024
-MAX_DOT_GRAPH_DEPTH    = 0
-GENERATE_LEGEND        = YES
-DOT_CLEANUP            = YES
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine   
-#---------------------------------------------------------------------------
-SEARCHENGINE           = YES
diff --git a/src/terralib/PDI/PDI.pro b/src/terralib/PDI/PDI.pro
deleted file mode 100755
index 0f63f80..0000000
--- a/src/terralib/PDI/PDI.pro
+++ /dev/null
@@ -1,8 +0,0 @@
-
-TEMPLATE = subdirs
-
-SUBDIRS = \
-          source \
-          tests
-
-
diff --git a/src/terralib/PDI/bin/.cvsignore b/src/terralib/PDI/bin/.cvsignore
deleted file mode 100644
index e69de29..0000000
diff --git a/src/terralib/PDI/bin/dynamic/.cvsignore b/src/terralib/PDI/bin/dynamic/.cvsignore
deleted file mode 100644
index 1f78391..0000000
--- a/src/terralib/PDI/bin/dynamic/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-libterralibpdi*
diff --git a/src/terralib/PDI/bin/static/.cvsignore b/src/terralib/PDI/bin/static/.cvsignore
deleted file mode 100644
index 1f78391..0000000
--- a/src/terralib/PDI/bin/static/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-libterralibpdi*
diff --git a/src/terralib/PDI/docs/.cvsignore b/src/terralib/PDI/docs/.cvsignore
deleted file mode 100644
index 1936cc1..0000000
--- a/src/terralib/PDI/docs/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-html
diff --git a/src/terralib/PDI/source/.cvsignore b/src/terralib/PDI/source/.cvsignore
deleted file mode 100644
index 550bd25..0000000
--- a/src/terralib/PDI/source/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-
diff --git a/src/terralib/PDI/source/TePDIAgnostic.cpp b/src/terralib/PDI/source/TePDIAgnostic.cpp
deleted file mode 100644
index f19c24a..0000000
--- a/src/terralib/PDI/source/TePDIAgnostic.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-#include "TePDIAgnostic.hpp"
-
-#include "stdio.h"
-
-namespace TePDIAgnostic{
-
-  void redirect_log( char* log_file_name, char* error_log_file_name )
-  {
-    freopen( log_file_name, "w", stdout );
-    freopen( error_log_file_name, "w", stderr );
-  };
-
-};
diff --git a/src/terralib/PDI/source/TePDIAgnostic.hpp b/src/terralib/PDI/source/TePDIAgnostic.hpp
deleted file mode 100644
index b33a1e0..0000000
--- a/src/terralib/PDI/source/TePDIAgnostic.hpp
+++ /dev/null
@@ -1,257 +0,0 @@
-/*
-TerraLib - a library for developing GIS applications.
-Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular
-purpose. The library provided hereunder is on an "as is" basis, and the
-authors have no obligation to provide maintenance, support, updates,
-enhancements, or modifications.
-In no event shall INPE be held liable to any party
-for direct, indirect, special, incidental, or consequential damages arising
-out of the use of this library and its documentation.
-*/
-
-/**
- *  This file contains a set of macros, routines and classes to deal with
- *  system checking and logging facility.
- */
-
-#ifndef TEPDIAGNOSTIC_HPP
-  #define TEPDIAGNOSTIC_HPP
-
-  #include <stdlib.h>
-  #include <stdio.h>
-  #include <sstream>
-  #include <string>
-  #include <iostream>
-
-  #ifdef USETERRALIBLOG
-
-    #include <TeException.h>
-    #include <TeErrorLog.h>
-
-    /**
-     * Logs a message to stdout
-     *
-     * @param message Message to be logged.
-    */
-    #define PDIAGN_LOGMSG(message) \
-      TeErroLog::instance().insert( LOG_MESSAGE, std::string( __DATE__ ) + \
-      " - " + std::string( __TIME__ ) + " - " + std::string( __FILE__ ) + \
-      ":" + std::string( __LINE__ ) + " : " + \
-      TePDIAgnostic::to_string( message ) );
-
-    /**
-     * Logs a message to stderr
-     *
-     * @param message Message to be logged.
-    */
-    #define PDIAGN_LOGERR(message) \
-      TeErroLog::instance().insert( UNKNOWN_ERROR_TYPE, \
-      std::string( __DATE__ ) + \
-      " - " + std::string( __TIME__ ) + " - " + std::string( __FILE__ ) + \
-      ":" + std::string( __LINE__ ) + " : " + \
-      TePDIAgnostic::to_string( message ) );
-
-  #else // USETERRALIBLOG
-
-    /**
-    * Logs a message to stdout
-    *
-    * @param message Message to be logged.
-    */
-    #define PDIAGN_LOGMSG(message) \
-      std::cout << std::endl << "Message :" \
-        << " " << __DATE__ \
-        << " " << __TIME__ \
-        << " - " << __FILE__ \
-        << ":" << __LINE__ \
-        << " - " << TePDIAgnostic::to_string( message ) \
-        << std::endl;
-
-    /**
-    * Logs a error message to stderr
-    *
-    * @param message Message to be logged.
-    */
-    #define PDIAGN_LOGERR(message) \
-      std::cerr << std::endl << "Error :" \
-        << " " << __DATE__ \
-        << " " << __TIME__ \
-        << " - " << __FILE__ \
-        << ":" << __LINE__ \
-        << " - " << TePDIAgnostic::to_string( message ) \
-        << std::endl;
-
-  #endif // USETERRALIBLOG
-
-  /**
-   * Logs a message to stderr and throws.
-   *
-   * @param variable Variable to be logged.
-   */
-  #define PDIAGN_WATCH( variable ) \
-    { \
-      PDIAGN_LOGMSG( "WATCH - " + TePDIAgnostic::to_string( #variable ) + \
-      "=" + TePDIAgnostic::to_string( variable ) ); \
-    }
-
-  /**
-   * Logs a message to stderr and throws.
-   *
-   * @param message Message to be logged.
-   */
-  #define PDIAGN_LOG_AND_THROW( message ) \
-    { \
-      PDIAGN_LOGERR( message ); \
-      throw; \
-    }
-
-  /**
-   *  Checks if value is true and throws an exception if not.
-   *
-   * @param value Value to be checked.
-   * @param message Message to be logged.
-   */
-  #define PDIAGN_TRUE_OR_THROW(value,message) \
-    if( value == 0 ) { \
-      PDIAGN_LOG_AND_THROW( message ); \
-    };
-
-  /**
-   *  Checks if value is true and logs an error message if not.
-   *
-   * @param value Value to be checked.
-   * @param message Message to be logged.
-   */
-  #define PDIAGN_TRUE_OR_LOG(value,message) \
-    if( value == 0 ) { \
-      PDIAGN_LOGERR( message ); \
-    };
-
-  /**
-   * Checks if value is true. if not a message will be logget and
-   * a return of context with false value will be done.
-   *
-   * @param value Value to be checked.
-   * @param message Message to be logged.
-   */
-  #define PDIAGN_TRUE_OR_RETURN(value,message) \
-    if( value == 0 ) { \
-      PDIAGN_LOGERR( message ); \
-      return false; \
-    };
-
-  /**
-   *  Checks if value is false and logs an error message if not.
-   *
-   * @param value Value to be checked.
-   * @param message Message to be logged.
-   */
-  #define PDIAGN_FALSE_OR_LOG(value,message) \
-    if( value != 0 ) { \
-      PDIAGN_LOGERR( message ); \
-    };
-
-  /**
-   *  Checks if two values are equal and throws an exception if not.
-   *
-   * @param value1 Value to be checked.
-   * @param value2 Value to be checked.
-   * @param message Message to be logged.
-   */
-  #define PDIAGN_CHECK_EQUAL(value1,value2,message) \
-    PDIAGN_TRUE_OR_THROW( ( value1 == value2 ), \
-    message + std::string( " [" ) + \
-    TePDIAgnostic::to_string( value1 ) + "!=" + \
-    TePDIAgnostic::to_string( value2 ) + "]" );
-
-  /**
-   *  Checks if two values are diferent and throws an exception if not.
-   *
-   * @param value1 Value to be checked.
-   * @param value2 Value to be checked.
-   * @param message Message to be logged.
-   */
-  #define PDIAGN_CHECK_NOTEQUAL(value1,value2,message) \
-    PDIAGN_TRUE_OR_THROW( ( value1 != value2 ), \
-    message + std::string( " [Values are equal]" ) );
-
-  /**
-   * Throws an exception for not implemented source.
-   */
-  #define PDIAGN_NOT_IMPLEMENTED \
-    PDIAGN_LOG_AND_THROW( "Not Implemented." );
-
-  /**
-   *  Checks if Debug mode is enabled and throws an exception if not.
-   */
-  #ifdef NDEBUG
-    #define PDIAGN_DEBUG_MODE_CHECK \
-      PDIAGN_LOG_AND_THROW( "Debug Mode Disabled." );
-  #else
-    #define PDIAGN_DEBUG_MODE_CHECK {};
-  #endif
-
-  /**
-   * Checks if value is true and throws an exception if not.
-   * This macro will be disabled for non debug mode.
-   *
-   * @param value Value to be checked.
-   * @param message Message to be logged.
-   */
-  #ifndef NDEBUG
-    #define PDIAGN_PRE_CONDITION(value,message) \
-      PDIAGN_TRUE_OR_THROW( value, message );
-  #else
-    #define PDIAGN_PRE_CONDITION(value,message) {};
-  #endif
-
-  /**
-   * Checks if value is true and throws an exception if not.
-   * This macro will be disabled for non debug mode.
-   *
-   * @param value Value to be checked.
-   * @param message Message to be logged.
-   */
-  #define PDIAGN_POS_CONDITION(value,message) \
-    PDIAGN_PRE_CONDITION(value,message);
-
-  namespace TePDIAgnostic{
-
-    /**
-     * Data convertion to string.
-     *
-     * @param data Data to be converted.
-     * @return The converted string.
-     */
-     template< class T >
-     std::string to_string( const T& data )
-     {
-        std::stringstream temp_ss;
-        temp_ss << data;
-        return temp_ss.str();
-     }
-
-    /**
-     * Redirects stdout and stderr to disk files.
-     *
-     * @param log_file_name stdout output file name.
-     * @param error_log_file_name stderr output file name.
-     */
-     void redirect_log( char* log_file_name, char* error_log_file_name );
-
-  };
-
-#endif //TEPDIAGNOSTIC_HPP
diff --git a/src/terralib/PDI/source/TePDIAlgorithm.cpp b/src/terralib/PDI/source/TePDIAlgorithm.cpp
deleted file mode 100755
index 8ae5b96..0000000
--- a/src/terralib/PDI/source/TePDIAlgorithm.cpp
+++ /dev/null
@@ -1,42 +0,0 @@
-#include "TePDIAlgorithm.hpp"
-
-#include "TePDIAgnostic.hpp"
-
-TePDIAlgorithm::TePDIAlgorithm()
-{
-}
-
-TePDIAlgorithm::TePDIAlgorithm( const TePDIParameters& params )
-{
-  Reset( params );
-}
-
-
-TePDIAlgorithm::~TePDIAlgorithm()
-{
-}
-
-
-bool TePDIAlgorithm::Reset( const TePDIParameters& params )
-{
-  ResetState();
-
-  if( CheckParameters( params ) ) {
-    params_ = params;
-    return true;
-  } else {
-    PDIAGN_LOGERR( "Invalid supplied parameters" );
-    return false;
-  }
-}
-
-
-bool TePDIAlgorithm::Apply()
-{
-  if( CheckParameters( params_ ) ) {
-    return RunImplementation();
-  } else {
-    PDIAGN_LOGERR( "Invalid supplied parameters" );
-    return false;
-  }
-}
diff --git a/src/terralib/PDI/source/TePDIAlgorithm.hpp b/src/terralib/PDI/source/TePDIAlgorithm.hpp
deleted file mode 100644
index 5abd657..0000000
--- a/src/terralib/PDI/source/TePDIAlgorithm.hpp
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
-TerraLib - a library for developing GIS applications.
-Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular
-purpose. The library provided hereunder is on an "as is" basis, and the
-authors have no obligation to provide maintenance, support, updates,
-enhancements, or modifications.
-In no event shall INPE be held liable to any party
-for direct, indirect, special, incidental, or consequential damages arising
-out of the use of this library and its documentation.
-*/
-
-/**
- *   This file contains the base class for digital image processing
- *   algorithms.
- */
-
-#ifndef TEPDIALGORITHM_HPP
-  #define TEPDIALGORITHM_HPP
-
-  #include "TePDIParameters.hpp"
-
-  #include "TePDISharedPtr.cpp"
-
-  class TePDIAlgorithm{
-    public :
-      typedef TePDISharedPtr< TePDIAlgorithm > pointer;
-      typedef const TePDISharedPtr< TePDIAlgorithm > const_pointer;
-
-      /**
-       * Default Destructor
-       */
-      virtual ~TePDIAlgorithm();
-
-      /**
-       * Applies the algorithm following the current state and
-       * internal stored parameters.
-       *
-       * @return true if OK. false on error.
-       */
-      bool Apply();
-
-      /**
-       * Reset the internal state with new supplied parameters.
-       *
-       * @param params The new supplied parameters.
-       * @return true if parameters OK, false on error.
-       */
-      bool Reset( const TePDIParameters& params );
-
-      /**
-       * Checks if the supplied parameters fits the requirements of each
-       * PDI algorithm implementation.
-       *
-       * Error log messages must be generated. No exceptions generated.
-       *
-       * @param parameters The parameters to be checked.
-       * @return true if the parameters are OK. false if not.
-       */
-      virtual bool CheckParameters( const TePDIParameters& parameters ) = 0;
-
-    protected :
-      /**
-       * Internal parameters reference
-       */
-      mutable TePDIParameters params_;
-
-      /**
-       * Default Constructor
-       */
-      TePDIAlgorithm();
-
-      /**
-       * Alternative Constructor
-       *
-       * @param params Algoritm parameters.
-       */
-      TePDIAlgorithm( const TePDIParameters& params );
-
-      /**
-       * Runs the current algorithm implementation.
-       *
-       * @return true if OK. false on error.
-       */
-      virtual bool RunImplementation() = 0;
-
-      /**
-       * Reset the internal state to the initial state.
-       */
-      virtual void ResetState() = 0;
-
-  };
-
-#endif //TEPDIALGORITHM_HPP
diff --git a/src/terralib/PDI/source/TePDIBox.cpp b/src/terralib/PDI/source/TePDIBox.cpp
deleted file mode 100755
index f0f4bf3..0000000
--- a/src/terralib/PDI/source/TePDIBox.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
-#include "TePDIBox.hpp"
-
-#include "TePDIAgnostic.hpp"
-
-
-TePDIBox::TePDIBox( unsigned long int top_left_x,
-                    unsigned long int top_left_y,
-                    unsigned long int bottom_right_x,
-                    unsigned long int bottom_right_y )
-{
-  Reset( top_left_x, top_left_y, bottom_right_x, bottom_right_y );
-}
-
-
-TePDIBox::~TePDIBox()
-{
-
-}
-
-
-void TePDIBox::Reset( unsigned long int top_left_x,
-                      unsigned long int top_left_y,
-                      unsigned long int bottom_right_x,
-                      unsigned long int bottom_right_y )
-{
-
-  PDIAGN_TRUE_OR_THROW( top_left_x < bottom_right_x,
-    "Invalid supplied parameter X" );
-
-  PDIAGN_TRUE_OR_THROW( top_left_y < bottom_right_y,
-    "Invalid supplied parameter Y" );
-
-  top_left_x_ = top_left_x;
-  top_left_y_ = top_left_y;
-  bottom_right_x_ = bottom_right_x;
-  bottom_right_y_ = bottom_right_y;
-}
diff --git a/src/terralib/PDI/source/TePDIBox.hpp b/src/terralib/PDI/source/TePDIBox.hpp
deleted file mode 100644
index e1c46bf..0000000
--- a/src/terralib/PDI/source/TePDIBox.hpp
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
-TerraLib - a library for developing GIS applications.
-Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular
-purpose. The library provided hereunder is on an "as is" basis, and the
-authors have no obligation to provide maintenance, support, updates,
-enhancements, or modifications.
-In no event shall INPE be held liable to any party
-for direct, indirect, special, incidental, or consequential damages arising
-out of the use of this library and its documentation.
-*/
-
-/**
- *   This file contains the base class for digital image processing
- *   algorithms.
- */
-
-#ifndef TEPDIBOX_HPP
-  #define TEPDIBOX_HPP
-
-  #include "TePDISharedPtr.cpp"
-
-  class TePDIBox{
-    public :
-      typedef TePDISharedPtr< TePDIBox > pointer;
-      typedef const TePDISharedPtr< TePDIBox > const_pointer;
-
-      /**
-       * Default Constructor
-       *
-       * @param top_left_x Top left X coord.
-       * @param top_left_y Top left Y coord.
-       * @param bottom_right_x Bottom right X coord.
-       * @param bottom_right_y Bottom right Y coord.
-       */
-      TePDIBox( unsigned long int top_left_x = 0,
-                unsigned long int top_left_y = 0,
-                unsigned long int bottom_right_x = 0,
-                unsigned long int bottom_right_y = 0 );
-
-      /**
-       * Default Destructor
-       */
-      ~TePDIBox();
-
-      /**
-       * Resets the current Box coords.
-       *
-       * @param top_left_x Top left X coord.
-       * @param top_left_y Top left Y coord.
-       * @param bottom_right_x Bottom right X coord.
-       * @param bottom_right_y Bottom right Y coord.
-       */
-      void Reset( unsigned long int top_left_x,
-                  unsigned long int top_left_y,
-                  unsigned long int bottom_right_x,
-                  unsigned long int bottom_right_y );
-    protected :
-      unsigned long int top_left_x_;
-      unsigned long int top_left_y_;
-      unsigned long int bottom_right_x_;
-      unsigned long int bottom_right_y_;
-  };
-
-#endif //TEPDIBOX_HPP
diff --git a/src/terralib/PDI/source/TePDIContrast.cpp b/src/terralib/PDI/source/TePDIContrast.cpp
deleted file mode 100755
index f901344..0000000
--- a/src/terralib/PDI/source/TePDIContrast.cpp
+++ /dev/null
@@ -1,879 +0,0 @@
-#include "TePDIContrast.hpp"
-
-#include "TePDIAgnostic.hpp"
-#include "TePDITypes.hpp"
-#include "TePDIUtils.hpp"
-
-#include <sstream>
-#include <cmath>
-
-
-TePDIContrast::TePDIContrast( const TePDIParameters& params )
-: TePDIAlgorithm( params )
-{
-}
-
-TePDIContrast::TePDIContrast()
-{
-}
-
-
-TePDIContrast::~TePDIContrast()
-{
-}
-
-
-bool TePDIContrast::RunImplementation()
-{
-  /* Getting general parameters */
-
-  int contrast_type;
-  params_.GetParameter( "contrast_type", contrast_type );
-
-  TePDITypes::TePDIRasterPtrType inRaster;
-  params_.GetParameter( "input_image", inRaster );
-
-  std::vector< int > channels;
-  params_.GetParameter( "channels", channels );
-
-  int histo_levels;
-  params_.GetParameter( "histo_levels", histo_levels );
-
-  TePDITypes::TePDIRasterPtrType outRaster;
-  params_.GetParameter( "output_image", outRaster );
-
-  /* Generating histograms */
-
-  BuildHistograms( inRaster, (unsigned int)histo_levels, channels );
-
-  /* Processing each algorithm */
-
-  TePDITypes::TePDILutType lut;
-
-  switch( contrast_type ) {
-    case TePDIContrastMinMax :
-    {
-      PDIAGN_TRUE_OR_RETURN(
-        TePDIUtils::TeResetRaster( outRaster, channels.size(),
-        inRaster->params().nlines_, inRaster->params().ncols_ ),
-        "Raster reset error" );
-
-      for( unsigned int channels_index = 0 ;
-           channels_index < channels.size() ;
-           ++channels_index ) {
-
-        lut = GetMinMaxLut( histo_cache_[ channels[ channels_index ] ] );
-
-        RemapLevels( inRaster, lut, channels[ channels_index ],
-          channels_index, outRaster );
-      }
-
-      break;
-    }
-    case TePDIContrastLinear :
-    {
-      PDIAGN_TRUE_OR_RETURN(
-        TePDIUtils::TeResetRaster( outRaster, channels.size(),
-        inRaster->params().nlines_, inRaster->params().ncols_ ),
-        "Raster reset error" );
-
-      double min_level = 0;
-      double max_level = 0;
-
-      params_.GetParameter( "min_level", min_level );
-      params_.GetParameter( "max_level", max_level );
-
-      for( unsigned int channels_index = 0 ;
-           channels_index < channels.size() ;
-           ++channels_index ) {
-
-        lut = GetLinearLut( histo_cache_[ channels[ channels_index ] ],
-          min_level, max_level );
-
-        RemapLevels( inRaster, lut, channels[ channels_index ],
-          channels_index, outRaster );
-      }
-
-      break;
-    }
-    case TePDIContrastSquareRoot :
-    {
-      PDIAGN_TRUE_OR_RETURN(
-        TePDIUtils::TeResetRaster( outRaster, channels.size(),
-        inRaster->params().nlines_, inRaster->params().ncols_ ),
-        "Raster reset error" );
-
-      double min_level = 0;
-      double max_level = 0;
-
-      params_.GetParameter( "min_level", min_level );
-      params_.GetParameter( "max_level", max_level );
-
-      for( unsigned int channels_index = 0 ;
-           channels_index < channels.size() ;
-           ++channels_index ) {
-
-        lut = GetSquareRootLut( histo_cache_[ channels[ channels_index ] ],
-          min_level, max_level );
-
-        RemapLevels( inRaster, lut, channels[ channels_index ],
-          channels_index, outRaster );
-      }
-
-      break;
-    }
-    case TePDIContrastSquare :
-    {
-      PDIAGN_TRUE_OR_RETURN(
-        TePDIUtils::TeResetRaster( outRaster, channels.size(),
-        inRaster->params().nlines_, inRaster->params().ncols_ ),
-        "Raster reset error" );
-
-      double min_level = 0;
-      double max_level = 0;
-
-      params_.GetParameter( "min_level", min_level );
-      params_.GetParameter( "max_level", max_level );
-
-      for( unsigned int channels_index = 0 ;
-           channels_index < channels.size() ;
-           ++channels_index ) {
-
-        lut = GetSquareLut( histo_cache_[ channels[ channels_index ] ],
-          min_level, max_level );
-        RemapLevels( inRaster, lut, channels[ channels_index ],
-          channels_index, outRaster );
-      }
-
-      break;
-    }
-    case TePDIContrastLog :
-    {
-      PDIAGN_TRUE_OR_RETURN(
-        TePDIUtils::TeResetRaster( outRaster, channels.size(),
-        inRaster->params().nlines_, inRaster->params().ncols_ ),
-        "Raster reset error" );
-
-      double min_level = 0;
-      double max_level = 0;
-
-      params_.GetParameter( "min_level", min_level );
-      params_.GetParameter( "max_level", max_level );
-
-      for( unsigned int channels_index = 0 ;
-           channels_index < channels.size() ;
-           ++channels_index ) {
-
-        lut = GetLogLut( histo_cache_[ channels[ channels_index ] ],
-          min_level, max_level );
-
-        RemapLevels( inRaster, lut, channels[ channels_index ],
-          channels_index, outRaster );
-      }
-
-      break;
-    }
-    case TePDIContrastNegative :
-    {
-      PDIAGN_TRUE_OR_RETURN(
-        TePDIUtils::TeResetRaster( outRaster, channels.size(),
-        inRaster->params().nlines_, inRaster->params().ncols_ ),
-        "Raster reset error" );
-
-      double min_level = 0;
-      double max_level = 0;
-
-      params_.GetParameter( "min_level", min_level );
-      params_.GetParameter( "max_level", max_level );
-
-      for( unsigned int channels_index = 0 ;
-           channels_index < channels.size() ;
-           ++channels_index ) {
-
-        lut = GetNegativeLut( histo_cache_[ channels[ channels_index ] ],
-          min_level, max_level );
-
-        RemapLevels( inRaster, lut, channels[ channels_index ],
-          channels_index, outRaster );
-
-      }
-
-      break;
-    }
-    case TePDIContrastHistEqualizer :
-    {
-      PDIAGN_TRUE_OR_RETURN(
-        TePDIUtils::TeResetRaster( outRaster, channels.size(),
-        inRaster->params().nlines_, inRaster->params().ncols_ ),
-        "Raster reset error" );
-
-      for( unsigned int channels_index = 0 ;
-           channels_index < channels.size() ;
-           ++channels_index ) {
-
-        lut = GetHistEqualizerLut( histo_cache_[ channels[ channels_index ] ] );
-
-        RemapLevels( inRaster, lut, channels[ channels_index ],
-          channels_index, outRaster );
-
-      }
-
-      break;
-    }
-    case TePDIContrastSimpleSlicer :
-    {
-      /* Getting user parameters */
-
-      TePDIRgbPalette::pointer palette;
-      params_.GetParameter( "rgb_palette", palette );
-
-      double min_level = 0;
-      double max_level = 0;
-      params_.GetParameter( "min_level", min_level );
-      params_.GetParameter( "max_level", max_level );
-
-      PDIAGN_TRUE_OR_RETURN(
-        TePDIUtils::TeResetRaster( outRaster, 1,
-        inRaster->params().nlines_, inRaster->params().ncols_,
-        palette.NakedPointer() ), "Raster reset error" );
-
-      /* Slicing process */
-
-      GetSimpleSlicerLut( histo_cache_[ channels[ 0 ] ],
-        palette,  min_level, max_level, lut );
-
-      RemapLevels( inRaster, lut, channels[ 0 ], 0,
-        outRaster );
-
-      break;
-    }
-    default :
-    {
-      PDIAGN_NOT_IMPLEMENTED;
-      break;
-    }
-  }
-
-
-  return true;
-}
-
-
-bool TePDIContrast::CheckParameters( const TePDIParameters& parameters )
-{
-  /* Checking for general required parameters */
-
-  TePDITypes::TePDIRasterPtrType inRaster;
-  if( ! parameters.GetParameter( "input_image", inRaster ) ) {
-
-    PDIAGN_LOGERR( "Missing parameter: input_image" );
-    return false;
-  }
-  if( ! inRaster.isActive() ) {
-
-    PDIAGN_LOGERR( "Invalid parameter: input_image inactive" );
-    return false;
-  }
-  if( inRaster->status() == TeNOTREADY ) {
-
-    PDIAGN_LOGERR( "Invalid parameter: input_image not ready" );
-    return false;
-  }
-
-  TePDITypes::TePDIRasterPtrType outRaster;
-  if( ! parameters.GetParameter( "output_image", outRaster ) ) {
-
-    PDIAGN_LOGERR( "Missing parameter: output_image" );
-    return false;
-  }
-  if( ! outRaster.isActive() ) {
-
-    PDIAGN_LOGERR( "Invalid parameter: output_image inactive" );
-    return false;
-  }
-  if( inRaster->status() == TeREADYTOWRITE ) {
-
-    PDIAGN_LOGERR( "Invalid parameter: output_image not ready" );
-    return false;
-  }
-
-  int histo_levels = 0;
-  if( ! parameters.GetParameter( "histo_levels", histo_levels ) ||
-      ( histo_levels <= 0 ) ) {
-
-    PDIAGN_LOGERR( "Invalid parameter: histo_levels" );
-    return false;
-  }
-
-  /* Checking for the correct allowed contrast types */
-
-  int contrast_type;
-  if( ! parameters.GetParameter( "contrast_type", contrast_type ) ) {
-    PDIAGN_LOGERR( "Missing parameter: contrast_type" );
-    return false;
-  }
-  PDIAGN_CHECK_NOTEQUAL( contrast_type, 0 ,
-    "Invalid Contrast Type" );
-  if( ( contrast_type != TePDIContrastMinMax ) &&
-      ( contrast_type != TePDIContrastLinear ) &&
-      ( contrast_type != TePDIContrastSquareRoot ) &&
-      ( contrast_type != TePDIContrastSquare ) &&
-      ( contrast_type != TePDIContrastLog ) &&
-      ( contrast_type != TePDIContrastNegative ) &&
-      ( contrast_type != TePDIContrastHistEqualizer ) &&
-      ( contrast_type != TePDIContrastSimpleSlicer ) ) {
-
-    PDIAGN_LOGERR( "Invalid parameter: contrast_type" );
-    return false;
-  }
-
-  /* channels parameter checking */
-
-  std::vector< int > channels;
-  if( ! parameters.GetParameter( "channels", channels ) ) {
-
-    PDIAGN_LOGERR( "Missing parameter: channels" );
-    return false;
-  }
-  for( unsigned int index = 0 ; index < channels.size() ; ++index ) {
-    if( channels[ index ] >= inRaster->nBands() ) {
-      PDIAGN_LOGERR( "Invalid parameter: channels" );
-      return false;
-    }
-  }
-  if( ( contrast_type == TePDIContrastSimpleSlicer ) ) {
-    if( channels.size() != 1 ) {
-      PDIAGN_LOGERR( "Invalid channels number" );
-      return false;
-    }
-  } else {
-    /* For the other algorithms */
-    if( channels.size() == 0 ) {
-      PDIAGN_LOGERR( "Invalid channels number" );
-      return false;
-    }
-  }
-
-  /* Checking for min and max required parameters */
-
-  if( ( contrast_type == TePDIContrastLinear ) ||
-      ( contrast_type == TePDIContrastSquareRoot ) ||
-      ( contrast_type == TePDIContrastSquare ) ||
-      ( contrast_type == TePDIContrastLog ) ||
-      ( contrast_type == TePDIContrastNegative ) ||
-      ( contrast_type == TePDIContrastSimpleSlicer ) ) {
-
-    if( ! parameters.CheckParameter( "min_level",
-          TePDIParameters::TePDIDoubleParam ) ) {
-
-      PDIAGN_LOGERR( "Missing parameter: min_level" );
-      return false;
-    }
-    if( ! parameters.CheckParameter( "max_level",
-          TePDIParameters::TePDIDoubleParam ) ) {
-
-      PDIAGN_LOGERR( "Missing parameter: max_level" );
-      return false;
-    }
-  }
-
-  /* Checking for RGB Palette required parameters */
-
-  if( ( contrast_type == TePDIContrastSimpleSlicer ) ) {
-    TePDIRgbPalette::pointer rgb_palette;
-
-    if( ( ! parameters.GetParameter( "rgb_palette", rgb_palette ) ) ||
-        ( ! rgb_palette.isActive() ) ) {
-
-      PDIAGN_LOGERR( "Missing parameter: rgb_palette" );
-      return false;
-    }
-  }
-
-  return true;
-}
-
-
-void TePDIContrast::ResetState()
-{
-  histo_cache_.clear();
-}
-
-
-void TePDIContrast::BuildHistograms(
-  TePDITypes::TePDIRasterPtrType& inRaster,
-  unsigned int histo_levels,
-  std::vector< int >& channels,
-  bool force )
-{
-  PDIAGN_TRUE_OR_THROW( inRaster.isActive(),
-    "inRaster inactive" );
-  PDIAGN_TRUE_OR_THROW( inRaster->status() != TeNOTREADY,
-    "inRaster not ready" );
-
-  for( unsigned int channels_index = 0 ; channels_index < channels.size() ;
-       ++channels_index ) {
-
-    PDIAGN_TRUE_OR_THROW( channels[ channels_index ] < inRaster->nBands(),
-      "Trying to creat histogram from an invalid band" );
-
-    bool hist_cached =
-      ( histo_cache_.find( channels[ channels_index ] ) !=
-        histo_cache_.end() ) ? true : false;
-
-    if( ( ! hist_cached ) || force ) {
-      if( hist_cached ) {
-        histo_cache_[ channels[ channels_index ] ].clear();
-      }
-
-      TePDITypes::TePDIHistogramType temp_hist;
-
-      PDIAGN_TRUE_OR_THROW( TePDIUtils::TeGenerateHistogram( inRaster,
-        histo_levels, channels[ channels_index ], temp_hist ),
-        "Histogram Generation Error" );
-
-      PDIAGN_CHECK_EQUAL( temp_hist.size(), histo_levels,
-        "Generated histogram size error" );
-
-      histo_cache_[ channels[ channels_index ] ] = temp_hist;
-    }
-  }
-}
-
-
-void TePDIContrast::RemapLevels(
-  TePDITypes::TePDIRasterPtrType& inRaster,
-  TePDITypes::TePDILutType& lut,
-  int in_channel,
-  int out_channel,
-  TePDITypes::TePDIRasterPtrType& outRaster )
-{
-  PDIAGN_TRUE_OR_THROW( inRaster.isActive(),
-    "inRaster inactive" );
-  PDIAGN_TRUE_OR_THROW( outRaster.isActive(),
-    "outRaster inactive" );
-  PDIAGN_TRUE_OR_THROW( inRaster->status() != TeNOTREADY,
-    "inRaster not ready" );
-  PDIAGN_TRUE_OR_THROW( outRaster->status() == TeREADYTOWRITE,
-    "outRaster not ready" );
-  PDIAGN_CHECK_EQUAL( inRaster->params().nlines_,
-    outRaster->params().nlines_,
-    "Lines number mismatch between input and output image" );
-  PDIAGN_CHECK_EQUAL( inRaster->params().ncols_,
-    outRaster->params().ncols_,
-    "Columns number mismatch between input and output image" );
-
-  int raster_lines = inRaster->params().nlines_;
-  int raster_columns = inRaster->params().ncols_;
-
-  double current_level;
-  double best_lut_reference;
-
-  TePDITypes::TePDILutType::iterator lut_it;
-  TePDITypes::TePDILutType::iterator lut_next_it;
-  TePDITypes::TePDILutType::iterator lut_it_end = lut.end();
-
-  for( int line = 0 ; line < raster_lines ; ++line ) {
-    for( int column = 0 ; column < raster_columns ; ++column ) {
-      if( inRaster->getElement( column, line, current_level,
-          in_channel ) ) {
-
-        /* Finding mapped level by using the best LUT reference Level */
-
-        lut_it = lut.begin();
-        lut_next_it = lut_it;
-        ++lut_next_it;
-
-        while( lut_next_it != lut_it_end ) {
-          if( lut_next_it->first >= current_level ) {
-            break;
-          }
-
-          ++lut_it;
-          ++lut_next_it;
-        }
-
-        if( lut_next_it == lut_it_end ) {
-          best_lut_reference = lut_it->first;
-        } else {
-          if( std::abs( lut_it->first - current_level ) <
-              std::abs( lut_next_it->first - current_level ) ) {
-
-            best_lut_reference = lut_it->first;
-          } else {
-            best_lut_reference = lut_next_it->first;
-          }
-        }
-
-        /* Pixel Output level mapping */
-
-        PDIAGN_TRUE_OR_THROW( outRaster->setElement( column, line,
-          lut[ best_lut_reference ], out_channel ),
-          "Level remmaping error at " + TePDIUtils::to_string( line ) +
-          "," + TePDIUtils::to_string( column ) );
-      }
-    }
-  }
-
-}
-
-double TePDIContrast::GetHistMax( TePDITypes::TePDIHistogramType& hist )
-{
-  PDIAGN_TRUE_OR_THROW( hist.size() != 0, "Invalid histogram" );
-
-  TePDITypes::TePDIHistogramType::reverse_iterator hist_it = hist.rbegin();
-  TePDITypes::TePDIHistogramType::reverse_iterator hist_it_end = hist.rend();
-
-  while( hist_it != hist_it_end ) {
-    if( hist_it->second != 0 ) {
-      return hist_it->first;
-    }
-
-    ++hist_it;
-  }
-
-  PDIAGN_LOG_AND_THROW( "Empty invalid Histogram" );
-
-  return 0;
-}
-
-double TePDIContrast::GetHistMin( TePDITypes::TePDIHistogramType& hist )
-{
-  PDIAGN_TRUE_OR_THROW( hist.size() != 0, "Invalid histogram" );
-
-  TePDITypes::TePDIHistogramType::iterator hist_it = hist.begin();
-  TePDITypes::TePDIHistogramType::iterator hist_it_end = hist.end();
-
-  while( hist_it != hist_it_end ) {
-    if( hist_it->second != 0 ) {
-      return hist_it->first;
-    }
-
-    ++hist_it;
-  }
-
-  PDIAGN_LOG_AND_THROW( "Empty invalid Histogram" );
-
-  return 0;
-}
-
-
-TePDITypes::TePDILutType TePDIContrast::GetMinMaxLut(
-  TePDITypes::TePDIHistogramType& hist )
-{
-  PDIAGN_TRUE_OR_THROW( hist.size() != 0, "Invalid histogram" );
-
-  return GetLinearLut( hist, GetHistMin( hist ), GetHistMax( hist ) );
-}
-
-
-TePDITypes::TePDILutType TePDIContrast::GetLinearLut(
-  TePDITypes::TePDIHistogramType& hist,
-  double min, double max )
-{
-  PDIAGN_CHECK_NOTEQUAL( hist.size(), 0, "Invalid histogram size" );
-  PDIAGN_TRUE_OR_THROW( max > min, "Invalid max and min values" );
-
-  /* Calculating parameters */
-
-  unsigned int levels = hist.size();
-
-  double a = 0;
-  double b = 0;
-
-  if( max == min ) {
-    a = (double)levels;
-    b = -1. * ((double)levels) * min;
-  } else {
-    a = ((double)levels) / ( max - min );
-    b = ( -1. * ((double)levels) * min ) / ( max - min );
-  }
-
-  /* Generating LUT map using the existing histogram levels */
-
-  TePDITypes::TePDILutType out_lut;
-
-  TePDITypes::TePDIHistogramType::iterator hist_it = hist.begin();
-  TePDITypes::TePDIHistogramType::iterator hist_it_end = hist.end();
-
-  while( hist_it != hist_it_end ) {
-    if( hist_it->first <= min ) {
-      out_lut[ hist_it->first ] = min;
-    } else if( hist_it->first >= max ) {
-      out_lut[ hist_it->first ] = max;
-    } else {
-      out_lut[ hist_it->first ] = ( a * hist_it->first ) + b;
-    }
-
-    ++hist_it;
-  }
-
-  return out_lut;
-}
-
-
-TePDITypes::TePDILutType TePDIContrast::GetSquareRootLut(
-  TePDITypes::TePDIHistogramType& hist,
-  double min, double max )
-{
-  PDIAGN_CHECK_NOTEQUAL( hist.size(), 0, "Invalid histogram size" );
-  PDIAGN_TRUE_OR_THROW( min < max, "Invalid min and max values" );
-
-  unsigned int levels = hist.size();
-
-  double factor = ((double)levels) / std::sqrt( max - min );
-
-  /* Generating LUT map using the existing histogram levels */
-
-  TePDITypes::TePDILutType out_lut;
-
-  TePDITypes::TePDIHistogramType::iterator hist_it = hist.begin();
-  TePDITypes::TePDIHistogramType::iterator hist_it_end = hist.end();
-
-  while( hist_it != hist_it_end ) {
-    if( hist_it->first <= min ) {
-      out_lut[ hist_it->first ] = min;
-    } else if( hist_it->first >= max ) {
-      out_lut[ hist_it->first ] = max;
-    } else {
-      out_lut[ hist_it->first ] = factor * std::sqrt( hist_it->first - min );
-    }
-
-    ++hist_it;
-  }
-
-  return out_lut;
-}
-
-
-TePDITypes::TePDILutType TePDIContrast::GetSquareLut(
-  TePDITypes::TePDIHistogramType& hist,
-  double min, double max )
-{
-  PDIAGN_CHECK_NOTEQUAL( hist.size(), 0, "Invalid histogram size" );
-  PDIAGN_TRUE_OR_THROW( min < max, "Invalid min and max values" );
-
-  unsigned int levels = hist.size();
-
-  double factor = ((double)levels) / std::pow( (max - min), 2 );
-
-  /* Generating LUT map using the existing histogram levels */
-
-  TePDITypes::TePDILutType out_lut;
-
-  TePDITypes::TePDIHistogramType::iterator hist_it = hist.begin();
-  TePDITypes::TePDIHistogramType::iterator hist_it_end = hist.end();
-
-  while( hist_it != hist_it_end ) {
-    if( hist_it->first <= min ) {
-      out_lut[ hist_it->first ] = min;
-    } else if( hist_it->first >= max ) {
-      out_lut[ hist_it->first ] = max;
-    } else {
-      out_lut[ hist_it->first ] =
-        factor * std::pow( hist_it->first - min, 2 );
-    }
-
-    ++hist_it;
-  }
-
-  return out_lut;
-}
-
-
-TePDITypes::TePDILutType TePDIContrast::GetLogLut(
-  TePDITypes::TePDIHistogramType& hist,
-  double min, double max )
-{
-  PDIAGN_CHECK_NOTEQUAL( hist.size(), 0, "Invalid histogram size" );
-  PDIAGN_TRUE_OR_THROW( max > ( min+1 ), "Invalid min and max values" );
-
-  unsigned int levels = hist.size();
-
-  double factor = ((double)levels) / std::log10( max - min + 1 );
-
-  /* Generating LUT map using the existing histogram levels */
-
-  TePDITypes::TePDILutType out_lut;
-
-  TePDITypes::TePDIHistogramType::iterator hist_it = hist.begin();
-  TePDITypes::TePDIHistogramType::iterator hist_it_end = hist.end();
-
-  while( hist_it != hist_it_end ) {
-    if( hist_it->first <= min ) {
-      out_lut[ hist_it->first ] = min;
-    } else if( hist_it->first >= max ) {
-      out_lut[ hist_it->first ] = max;
-    } else {
-      out_lut[ hist_it->first ] =
-        factor * std::log10( hist_it->first - min + 1 );
-    }
-
-    ++hist_it;
-  }
-
-  return out_lut;
-}
-
-
-TePDITypes::TePDILutType TePDIContrast::GetNegativeLut(
-  TePDITypes::TePDIHistogramType& hist,
-  double min, double max )
-{
-  PDIAGN_CHECK_NOTEQUAL( hist.size(), 0, "Invalid histogram size" );
-  PDIAGN_TRUE_OR_THROW( max > min, "Invalid max and min values" );
-
-  /* Calculating parameters */
-
-  unsigned int levels = hist.size();
-
-  double a = -1. * ((double)levels) / ( max - min );
-  double b = ( ((double)levels) * max ) / ( max - min );
-
-  /* Generating LUT map using the existing histogram levels */
-
-  TePDITypes::TePDILutType out_lut;
-
-  TePDITypes::TePDIHistogramType::iterator hist_it = hist.begin();
-  TePDITypes::TePDIHistogramType::iterator hist_it_end = hist.end();
-
-  while( hist_it != hist_it_end ) {
-    if( hist_it->first <= min ) {
-      out_lut[ hist_it->first ] = max;
-    } else if( hist_it->first >= max ) {
-      out_lut[ hist_it->first ] = min;
-    } else {
-      out_lut[ hist_it->first ] = ( a * hist_it->first ) + b;
-    }
-
-    ++hist_it;
-  }
-
-  return out_lut;
-}
-
-TePDITypes::TePDILutType TePDIContrast::GetHistEqualizerLut(
-  TePDITypes::TePDIHistogramType& hist )
-{
-  PDIAGN_TRUE_OR_THROW( hist.size() > 1, "Invalid histogram size" );
-
-  TePDITypes::TePDIHistogramType::iterator in_hist_it = hist.begin();
-  TePDITypes::TePDIHistogramType::iterator in_hist_it_past = hist.begin();
-  TePDITypes::TePDIHistogramType::iterator in_hist_it_end = hist.end();
-
-  int hist_population = 0;
-
-  /* Generating the accumulative histogram */
-
-  TePDITypes::TePDIHistogramType accumulative_hist;
-
-  accumulative_hist[ in_hist_it->first ] = in_hist_it->second;
-  hist_population += in_hist_it->second;
-  ++in_hist_it;
-
-  TePDITypes::TePDIHistogramType::iterator accumulative_hist_it =
-    accumulative_hist.begin();
-  TePDITypes::TePDIHistogramType::iterator accumulative_hist_it_past =
-    accumulative_hist.begin();
-  ++accumulative_hist_it;
-
-  while( in_hist_it != in_hist_it_end ) {
-    hist_population += in_hist_it->second;
-
-    /* Building accumulative histogram */
-
-    accumulative_hist[ in_hist_it->first ] =
-      accumulative_hist_it_past->second + in_hist_it->second;
-
-    ++accumulative_hist_it_past;
-    ++accumulative_hist_it;
-
-    ++in_hist_it_past;
-    ++in_hist_it;
-  }
-
-  /* Creating the look-up table */
-
-  double levels = (double)hist.size();
-
-  TePDITypes::TePDILutType out_lut;
-
-  in_hist_it = hist.begin();
-
-  while( in_hist_it != in_hist_it_end ) {
-    out_lut[ in_hist_it->first ] = accumulative_hist[ in_hist_it->first ] *
-      levels / ((double)hist_population);
-
-    ++in_hist_it;
-  }
-
-  return out_lut;
-}
-
-
-void TePDIContrast::GetSimpleSlicerLut(
-  TePDITypes::TePDIHistogramType& hist,
-  TePDIRgbPalette::pointer in_palette,
-  double min,
-  double max,
-  TePDITypes::TePDILutType& out_lut )
-{
-  PDIAGN_CHECK_NOTEQUAL( hist.size(), 0, "Invalid histogram size" );
-  PDIAGN_TRUE_OR_THROW( max > min, "Invalid max and min values" );
-  PDIAGN_TRUE_OR_THROW( in_palette->size() > 0,
-    "Invalid input palette size" );
-
-  out_lut.clear();
-
-  /* Extracting palette levels */
-
-  std::vector< double > palette_levels;
-  TePDIRgbPalette::iterator pal_it = in_palette->begin();
-  TePDIRgbPalette::iterator pal_it_end = in_palette->end();
-
-  while( pal_it != pal_it_end ) {
-    palette_levels.push_back( pal_it.level() );
-
-    ++pal_it;
-  }
-
-  /* min and max adjusting to the supplied histogram range */
-
-  double in_hist_max = GetHistMax( hist );
-  double in_hist_min = GetHistMin( hist );
-
-  min = ( min < in_hist_min ) ? in_hist_min : min;
-  max = ( max > in_hist_max ) ? in_hist_max : max;
-
-  /* Output LUT generation */
-
-  double slice_size = ( max - min ) / ((double)in_palette->size());
-
-  double first_pal_level = palette_levels[ 0 ];
-  double last_pal_level = palette_levels[ palette_levels.size() - 1 ];
-
-  TePDITypes::TePDIHistogramType::iterator in_hist_it = hist.begin();
-  TePDITypes::TePDIHistogramType::iterator in_hist_it_end = hist.end();
-
-  double current_level;
-  unsigned int current_slice;
-
-  while( in_hist_it != in_hist_it_end ) {
-    current_level = in_hist_it->first;
-
-    if( current_level < min ) {
-      out_lut[ current_level ] = first_pal_level;
-    } else if ( current_level > max ) {
-      out_lut[ current_level ] = last_pal_level;
-    } else {
-      current_slice =
-        (unsigned int) std::floor( ( current_level - min ) / slice_size );
-
-      out_lut[ current_level ] = palette_levels[ current_slice ];
-    }
-
-    ++in_hist_it;
-  }
-
-
-}
diff --git a/src/terralib/PDI/source/TePDIContrast.hpp b/src/terralib/PDI/source/TePDIContrast.hpp
deleted file mode 100755
index 100a963..0000000
--- a/src/terralib/PDI/source/TePDIContrast.hpp
+++ /dev/null
@@ -1,278 +0,0 @@
-/*
-TerraLib - a library for developing GIS applications.
-Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular
-purpose. The library provided hereunder is on an "as is" basis, and the
-authors have no obligation to provide maintenance, support, updates,
-enhancements, or modifications.
-In no event shall INPE be held liable to any party
-for direct, indirect, special, incidental, or consequential damages arising
-out of the use of this library and its documentation.
-*/
-
-#ifndef TEPDICONTRAST_HPP
-  #define TEPDICONTRAST_HPP
-
-  #include "TePDIAlgorithm.hpp"
-  #include "TePDIRgbPalette.hpp"
-  #include "TePDITypes.hpp"
-
-  #include "TePDISharedPtr.cpp"
-
-  /**
-   *   This is the class for contrast image processing algorithms.
-   */
-  class TePDIContrast : public TePDIAlgorithm{
-    public :
-      typedef TePDISharedPtr< TePDIContrast > pointer;
-      typedef const TePDISharedPtr< TePDIContrast > const_pointer;
-
-      /**
-       * Allowed contrast types.
-       */
-      enum TePDIContrastType{
-        TePDIContrastMinMax = 1,
-        TePDIContrastLinear = 2,
-        TePDIContrastSquareRoot = 3,
-        TePDIContrastSquare = 4,
-        TePDIContrastLog = 5,
-        TePDIContrastNegative = 6,
-        TePDIContrastHistEqualizer = 7,
-        TePDIContrastSimpleSlicer = 8
-      };
-
-      /**
-       * Alternative Constructor.
-       *
-       * The general required parameters by any contrast type:
-       *
-       * contrast_type (TePDIContrastType),
-       * input_image (TePDITypes::TePDIRasterPtrType),
-       * output_image (TePDITypes::TePDIRasterPtrType),
-       * histo_levels (int) - Number of interpolated histogram levels.
-       *
-       * The specific required parameters ( by parameter type ):
-       *
-       * channels (std::vector<int>) - Band(s) to process. For
-       * TePDIContrastSimpleSlicer just one band is allowed.
-       *
-       * min_level (double) - Minimal level for Linear Luts
-       * Required by: TePDIContrastLinear, TePDIContrastSquareRoot,
-       * TePDIContrastSquare, TePDIContrastLog, TePDIContrastNegative,
-       * TePDIContrastSimpleSlicer
-       *
-       * max_level (double) - Minimal level for Linear Luts
-       * Required by: TePDIContrastLinear, TePDIContrastSquareRoot,
-       * TePDIContrastSquare, TePDIContrastLog, TePDIContrastNegative,
-       * TePDIContrastSimpleSlicer
-       *
-       * rgb_palette (TePDIRgbPalette::pointer) -
-       * Reference RGB palette.
-       * Required by: TePDIContrastSimpleSlicer
-       *
-       * @param params Algoritm parameters.
-       */
-      TePDIContrast( const TePDIParameters& params );
-
-      /**
-       * Default Constructor.
-       *
-       */
-      TePDIContrast();
-
-      /**
-       * Default Destructor
-       */
-      ~TePDIContrast();
-
-      /**
-       * Checks if the supplied parameters fits the requirements of each
-       * PDI algorithm implementation.
-       *
-       * Error log messages must be generated. No exceptions generated.
-       *
-       * @param parameters The parameters to be checked.
-       * @return true if the parameters are OK. false if not.
-       */
-      bool CheckParameters( const TePDIParameters& parameters );
-
-    protected :
-      /**
-       * A cache of level ordered histograms to avoid rebuilding
-       * histograms all the times.
-       */
-      TePDITypes::TePDIHistogramsMapType histo_cache_;
-
-      /**
-       * Runs the current algorithm implementation.
-       *
-       * @return true if OK. false on error.
-       */
-      bool RunImplementation();
-
-      /**
-       * Reset the internal state to the initial state.
-       */
-      void ResetState();
-
-      /**
-       * Build level ordered histograms from the required raster channels.
-       *
-       * The result histograms will remain inside the protected
-       * object histo_cache_
-       *
-       * @param inRaster The input Raster.
-       * @param histo_levels Number of histogram interpolated levels.
-       * @param channels Channels to use for histogram generation.
-       * @param force Force histogram regeneratin even if already in cache.
-       */
-      void BuildHistograms(
-        TePDITypes::TePDIRasterPtrType& inRaster,
-        unsigned int histo_levels,
-        std::vector< int >& channels,
-        bool force = false );
-
-      /**
-       * Do level remapping from one raster to another.
-       *
-       * @param inRaster The input Raster.
-       * @param outRaster The Output Raster.
-       * @param lut The look-up table.
-       * @param in_channel in_raster channel to remap.
-       * @param out_channel out_raster channel to write on.
-       */
-      void RemapLevels(
-        TePDITypes::TePDIRasterPtrType& inRaster,
-        TePDITypes::TePDILutType& lut,
-        int in_channel,
-        int out_channel,
-        TePDITypes::TePDIRasterPtrType& outRaster );
-
-      /**
-       * Get the maximum histogram level.
-       *
-       * Only for histograms with levels equal or greater than zero.
-       *
-       * @param hist The input LEVEL ORDERED histogram.
-       * @return the maximum level.
-       */
-      double GetHistMax( TePDITypes::TePDIHistogramType& hist );
-
-      /**
-       * Get the minimum histogram level.
-       *
-       * Only for histograms with levels equal or greater than zero.
-       *
-       * @param hist The input LEVEL ORDERED histogram.
-       * @return the minimum level.
-       */
-      double GetHistMin( TePDITypes::TePDIHistogramType& hist );
-
-      /**
-       * Build a min-max look-up table.
-       *
-       * @param hist Base histogram.
-       * @return  The look-up table.
-       */
-      TePDITypes::TePDILutType GetMinMaxLut(
-        TePDITypes::TePDIHistogramType& hist );
-
-      /**
-       * Build a Linear look-up table.
-       *
-       * @param min Minimal level value.
-       * @param max Maximum level value.
-       * @param hist Base histogram.
-       * @return The look-up table.
-       */
-      TePDITypes::TePDILutType GetLinearLut(
-        TePDITypes::TePDIHistogramType& hist,
-        double min, double max );
-
-      /**
-       * Build a Square Root look-up table.
-       *
-       * @param min Minimal level value.
-       * @param max Maximum level value.
-       * @param hist Base histogram.
-       * @return The look-up table.
-       */
-      TePDITypes::TePDILutType GetSquareRootLut(
-        TePDITypes::TePDIHistogramType& hist,
-        double min, double max );
-
-      /**
-       * Build a Square look-up table.
-       *
-       * @param min Minimal level value.
-       * @param max Maximum level value.
-       * @param hist Base histogram.
-       * @return The look-up table.
-       */
-      TePDITypes::TePDILutType GetSquareLut(
-        TePDITypes::TePDIHistogramType& hist,
-        double min, double max );
-
-      /**
-       * Build a Log look-up table.
-       *
-       * @param min Minimal level value.
-       * @param max Maximum level value.
-       * @param hist Base histogram.
-       * @return The look-up table.
-       */
-      TePDITypes::TePDILutType GetLogLut(
-        TePDITypes::TePDIHistogramType& hist,
-        double min, double max );
-
-      /**
-       * Build a Negative look-up table.
-       *
-       * @param min Minimal level value.
-       * @param max Maximum level value.
-       * @param hist Base histogram.
-       * @return The look-up table.
-       */
-      TePDITypes::TePDILutType GetNegativeLut(
-        TePDITypes::TePDIHistogramType& hist,
-        double min, double max );
-
-      /**
-       * Build a Histogram equalizer look-up table.
-       *
-       * @param hist A LEVEL-ORDERED Base histogram.
-       * @return The look-up table.
-       */
-      TePDITypes::TePDILutType GetHistEqualizerLut(
-        TePDITypes::TePDIHistogramType& hist );
-
-      /**
-       * Builds a Simple slicer look-up table.
-       *
-       * @param hist A LEVEL-ORDERED Base histogram.
-       * @param in_palette The reference RGB palette.
-       * @param min Minimal level value.
-       * @param max Maximum level value.
-       * @param out_lut The look-up table.
-       */
-      void GetSimpleSlicerLut(
-        TePDITypes::TePDIHistogramType& hist,
-        TePDIRgbPalette::pointer in_palette,
-        double min,
-        double max,
-        TePDITypes::TePDILutType& out_lut );
-  };
-
-#endif //TEPDICONTRAST_HPP
diff --git a/src/terralib/PDI/source/TePDIFilter.cpp b/src/terralib/PDI/source/TePDIFilter.cpp
deleted file mode 100755
index 0f7d1d5..0000000
--- a/src/terralib/PDI/source/TePDIFilter.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-#include "TePDIFilter.hpp"
-
-
-TePDIFilter::TePDIFilter( const TePDIParameters& params )
-: TePDIAlgorithm( params )
-{
-}
-
-TePDIFilter::TePDIFilter()
-{
-}
-
-
-TePDIFilter::~TePDIFilter()
-{
-}
-
diff --git a/src/terralib/PDI/source/TePDIFilter.hpp b/src/terralib/PDI/source/TePDIFilter.hpp
deleted file mode 100755
index b9708fd..0000000
--- a/src/terralib/PDI/source/TePDIFilter.hpp
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
-TerraLib - a library for developing GIS applications.
-Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular
-purpose. The library provided hereunder is on an "as is" basis, and the
-authors have no obligation to provide maintenance, support, updates,
-enhancements, or modifications.
-In no event shall INPE be held liable to any party
-for direct, indirect, special, incidental, or consequential damages arising
-out of the use of this library and its documentation.
-*/
-
-#ifndef TEPDIFILTER_HPP
-  #define TEPDIFILTER_HPP
-
-  #include "TePDIAlgorithm.hpp"
-  #include "TePDIParameters.hpp"
-
-  #include "TePDISharedPtr.cpp"
-
-  /**
-   *   This is the base class for image filtering algorithms.
-   */
-  class TePDIFilter : public TePDIAlgorithm{
-    public :
-      typedef TePDISharedPtr< TePDIFilter > pointer;
-      typedef const TePDISharedPtr< TePDIFilter > const_pointer;
-
-      /**
-       * Default Destructor
-       */
-      ~TePDIFilter();
-
-      /**
-       * Checks if the supplied parameters fits the requirements of each
-       * PDI algorithm implementation.
-       *
-       * Error log messages must be generated. No exceptions generated.
-       *
-       * @param parameters The parameters to be checked.
-       * @return true if the parameters are OK. false if not.
-       */
-      virtual bool CheckParameters( const TePDIParameters& parameters ) = 0;
-
-    protected :
-      /**
-       * Default Constructor.
-       *
-       */
-      TePDIFilter();
-
-      /**
-       * Alternative Constructor
-       *
-       * @param params Algoritm parameters.
-       */
-      TePDIFilter( const TePDIParameters& params );
-
-      /**
-       * Runs the current algorithm implementation.
-       *
-       * @return true if OK. false on error.
-       */
-      virtual bool RunImplementation() = 0;
-
-      /**
-       * Reset the internal state to the initial state.
-       */
-      virtual void ResetState() = 0;
-
-  };
-
-#endif //TEPDIFILTER_HPP
diff --git a/src/terralib/PDI/source/TePDIFilterMask.cpp b/src/terralib/PDI/source/TePDIFilterMask.cpp
deleted file mode 100755
index c5b086c..0000000
--- a/src/terralib/PDI/source/TePDIFilterMask.cpp
+++ /dev/null
@@ -1,17 +0,0 @@
-#include "TePDIFilterMask.hpp"
-
-#include "TePDIAgnostic.hpp"
-
-
-TePDIFilterMask::TePDIFilterMask()
-{
-}
-
-
-TePDIFilterMask::~TePDIFilterMask()
-{
-}
-
-
-
-
diff --git a/src/terralib/PDI/source/TePDIFilterMask.hpp b/src/terralib/PDI/source/TePDIFilterMask.hpp
deleted file mode 100755
index ad6f98e..0000000
--- a/src/terralib/PDI/source/TePDIFilterMask.hpp
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
-TerraLib - a library for developing GIS applications.
-Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular
-purpose. The library provided hereunder is on an "as is" basis, and the
-authors have no obligation to provide maintenance, support, updates,
-enhancements, or modifications.
-In no event shall INPE be held liable to any party
-for direct, indirect, special, incidental, or consequential damages arising
-out of the use of this library and its documentation.
-*/
-
-#ifndef TEPDIFILTERMASK_HPP
-  #define TEPDIFILTERMASK_HPP
-
-  #include <TeMatrix.h>
-
-  #include "TePDISharedPtr.cpp"
-
-  /**
-   *   This is the class for image Linear filtering processing.
-   */
-  class TePDIFilterMask : public TeMatrix{
-    public :
-      typedef TePDISharedPtr< TePDIFilterMask > pointer;
-      typedef const TePDISharedPtr< TePDIFilterMask > const_pointer;
-
-      /**
-       * Default Constructor.
-       *
-       */
-      TePDIFilterMask();
-
-      /**
-       * Default Destructor
-       */
-      ~TePDIFilterMask();
-
-  };
-
-#endif //TEPDIFILTERMASK_HPP
diff --git a/src/terralib/PDI/source/TePDILinearFilter.cpp b/src/terralib/PDI/source/TePDILinearFilter.cpp
deleted file mode 100755
index 0256cf6..0000000
--- a/src/terralib/PDI/source/TePDILinearFilter.cpp
+++ /dev/null
@@ -1,90 +0,0 @@
-#include "TePDILinearFilter.hpp"
-
-#include "TePDIAgnostic.hpp"
-
-
-TePDILinearFilter::TePDILinearFilter( const TePDIParameters& params )
-: TePDIFilter( params )
-{
-}
-
-
-TePDILinearFilter::TePDILinearFilter()
-{
-}
-
-
-TePDILinearFilter::~TePDILinearFilter()
-{
-}
-
-
-bool TePDILinearFilter::CheckParameters( const TePDIParameters& parameters )
-{
-  /* Checking for general required parameters */
-
-  TePDITypes::TePDIRasterPtrType inRaster;
-  if( ! parameters.GetParameter( "input_image", inRaster ) ) {
-
-    PDIAGN_LOGERR( "Missing parameter: input_image" );
-    return false;
-  }
-  if( ! inRaster.isActive() ) {
-
-    PDIAGN_LOGERR( "Invalid parameter: input_image inactive" );
-    return false;
-  }
-  if( inRaster->status() == TeNOTREADY ) {
-
-    PDIAGN_LOGERR( "Invalid parameter: input_image not ready" );
-    return false;
-  }
-
-  TePDITypes::TePDIRasterPtrType outRaster;
-  if( ! parameters.GetParameter( "output_image", outRaster ) ) {
-
-    PDIAGN_LOGERR( "Missing parameter: output_image" );
-    return false;
-  }
-  if( ! outRaster.isActive() ) {
-
-    PDIAGN_LOGERR( "Invalid parameter: output_image inactive" );
-    return false;
-  }
-  if( inRaster->status() == TeREADYTOWRITE ) {
-
-    PDIAGN_LOGERR( "Invalid parameter: output_image not ready" );
-    return false;
-  }
-
-  /* channels parameter checking */
-
-  std::vector< int > channels;
-  if( ! parameters.GetParameter( "channels", channels ) ) {
-
-    PDIAGN_LOGERR( "Missing parameter: channels" );
-    return false;
-  }
-  for( unsigned int index = 0 ; index < channels.size() ; ++index ) {
-    if( channels[ index ] >= inRaster->nBands() ) {
-      PDIAGN_LOGERR( "Invalid parameter: channels" );
-      return false;
-    }
-  }
-  return true;
-}
-
-
-bool TePDILinearFilter::RunImplementation()
-{
-  PDIAGN_NOT_IMPLEMENTED;
-
-  return false;
-}
-
-
-void TePDILinearFilter::ResetState()
-{
-  PDIAGN_NOT_IMPLEMENTED;
-}
-
diff --git a/src/terralib/PDI/source/TePDILinearFilter.hpp b/src/terralib/PDI/source/TePDILinearFilter.hpp
deleted file mode 100755
index 430b844..0000000
--- a/src/terralib/PDI/source/TePDILinearFilter.hpp
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
-TerraLib - a library for developing GIS applications.
-Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular
-purpose. The library provided hereunder is on an "as is" basis, and the
-authors have no obligation to provide maintenance, support, updates,
-enhancements, or modifications.
-In no event shall INPE be held liable to any party
-for direct, indirect, special, incidental, or consequential damages arising
-out of the use of this library and its documentation.
-*/
-
-#ifndef TEPDILINEARFILTER_HPP
-  #define TEPDILINEARFILTER_HPP
-
-  #include "TePDIFilter.hpp"
-  #include "TePDIParameters.hpp"
-
-  #include "TePDISharedPtr.cpp"
-
-  /**
-   *   This is the class for image Linear filtering processing.
-   */
-  class TePDILinearFilter : public TePDIFilter{
-    public :
-      typedef TePDISharedPtr< TePDILinearFilter > pointer;
-      typedef const TePDISharedPtr< TePDILinearFilter > const_pointer;
-
-      /**
-       * Default Constructor.
-       *
-       */
-      TePDILinearFilter();
-
-      /**
-       * Alternative Constructor
-       *
-       * @param params Algoritm parameters.
-       */
-      TePDILinearFilter( const TePDIParameters& params );
-
-      /**
-       * Default Destructor
-       */
-      ~TePDILinearFilter();
-
-      /**
-       * Checks if the supplied parameters fits the requirements of each
-       * PDI algorithm implementation.
-       *
-       * Error log messages must be generated. No exceptions generated.
-       *
-       * @param parameters The parameters to be checked.
-       * @return true if the parameters are OK. false if not.
-       */
-      bool CheckParameters( const TePDIParameters& parameters );
-
-    protected :
-
-      /**
-       * Runs the current algorithm implementation.
-       *
-       * @return true if OK. false on error.
-       */
-      bool RunImplementation();
-
-      /**
-       * Reset the internal state to the initial state.
-       */
-      void ResetState();
-
-  };
-
-#endif //TEPDILINEARFILTER_HPP
diff --git a/src/terralib/PDI/source/TePDIParameters.cpp b/src/terralib/PDI/source/TePDIParameters.cpp
deleted file mode 100644
index 93cd64e..0000000
--- a/src/terralib/PDI/source/TePDIParameters.cpp
+++ /dev/null
@@ -1,313 +0,0 @@
-#include "TePDIParameters.hpp"
-
-#include "TePDIAgnostic.hpp"
-
-TePDIParameters::TePDIParameters()
-{
-
-}
-
-
-TePDIParameters::~TePDIParameters()
-{
-
-}
-
-void TePDIParameters::SetParameter( const std::string& pname,
-  const TePDITypes::TePDIRasterPtrType& data )
-{
-  unsigned int old_size = RasterMap_.size();
-
-  RasterMap_[ pname ] = data;
-
-  PDIAGN_TRUE_OR_THROW( old_size != RasterMap_.size(),
-    "Insertion failed." );
-}
-
-
-bool TePDIParameters::GetParameter( const std::string& pname,
-  TePDITypes::TePDIRasterPtrType& data ) const
-{
-  TePDIRasterMap::iterator it = RasterMap_.find( pname );
-
-  if( it != RasterMap_.end() ) {
-    data = it->second;
-    return true;
-  }
-
-  PDIAGN_LOGERR( "Invalid get: Parameter not stored" );
-
-  return false;
-}
-
-
-void TePDIParameters::SetParameter( const std::string& pname,
-  TePDIRgbPalette::const_pointer& data )
-{
-  unsigned int old_size = PDIRgbPaletteMap_.size();
-
-  PDIRgbPaletteMap_[ pname ] = data;
-
-  PDIAGN_TRUE_OR_THROW( old_size != PDIRgbPaletteMap_.size(),
-    "Insertion failed." );
-}
-
-
-bool TePDIParameters::GetParameter( const std::string& pname,
-  TePDIRgbPalette::pointer& data ) const
-{
-  TePDIRgbPaletteMap::iterator it = PDIRgbPaletteMap_.find( pname );
-
-  if( it != PDIRgbPaletteMap_.end() ) {
-    data = it->second;
-    return true;
-  }
-
-  PDIAGN_LOGERR( "Invalid get: Parameter not stored" );
-
-  return false;
-}
-
-
-void TePDIParameters::SetParameter( const std::string& pname,
-                                    int data )
-{
-  unsigned int old_size = IntegerMap_.size();
-
-  IntegerMap_[ pname ] = data;
-
-  PDIAGN_TRUE_OR_THROW( old_size != IntegerMap_.size(),
-    "Insertion failed." );
-}
-
-
-bool TePDIParameters::GetParameter( const std::string& pname,
-                                    int& data ) const
-{
-  TePDIIntegerMap::iterator it = IntegerMap_.find( pname );
-
-  if( it != IntegerMap_.end() ) {
-    data = it->second;
-    return true;
-  }
-
-  PDIAGN_LOGERR( "Invalid get: Parameter not stored" );
-
-  return false;
-}
-
-void TePDIParameters::SetParameter( const std::string& pname,
-                                    std::vector< int >& data )
-{
-  unsigned int old_size = IntegerVectorMap_.size();
-
-  IntegerVectorMap_[ pname ] = data;
-
-  PDIAGN_TRUE_OR_THROW( old_size != IntegerVectorMap_.size(),
-    "Insertion failed." );
-}
-
-
-bool TePDIParameters::GetParameter( const std::string& pname,
-                                    std::vector< int >& data ) const
-{
-  TePDIIntegerVectorMap::iterator it = IntegerVectorMap_.find( pname );
-
-  if( it != IntegerVectorMap_.end() ) {
-    data = it->second;
-    return true;
-  }
-
-  PDIAGN_LOGERR( "Invalid get: Parameter not stored" );
-
-  return false;
-}
-
-void TePDIParameters::SetParameter( const std::string& pname,
-                                    const std::string& data )
-{
-  unsigned int old_size = StringMap_.size();
-
-  StringMap_[ pname ] = data;
-
-  PDIAGN_TRUE_OR_THROW( old_size != StringMap_.size(),
-    "Insertion failed." );
-}
-
-
-bool TePDIParameters::GetParameter( const std::string& pname,
-                                    std::string& data ) const
-{
-  TePDIStringMap::iterator it = StringMap_.find( pname );
-
-  if( it != StringMap_.end() ) {
-    data = it->second;
-    return true;
-  }
-
-  PDIAGN_LOGERR( "Invalid get: Parameter not stored" );
-
-  return false;
-}
-
-void TePDIParameters::SetParameter( const std::string& pname,
-                                    double data )
-{
-  unsigned int old_size = DoubleMap_.size();
-
-  DoubleMap_[ pname ] = data;
-
-  PDIAGN_TRUE_OR_THROW( old_size != DoubleMap_.size(),
-    "Insertion failed." );
-}
-
-
-bool TePDIParameters::GetParameter( const std::string& pname,
-                                    double& data ) const
-{
-  TePDIDoubleMap::iterator it = DoubleMap_.find( pname );
-
-  if( it != DoubleMap_.end() ) {
-    data = it->second;
-    return true;
-  }
-
-  PDIAGN_LOGERR( "Invalid get: Parameter not stored" );
-
-  return false;
-}
-
-void TePDIParameters::SetParameter( const std::string& pname,
-                                    const TePDIBox::pointer& data )
-{
-  unsigned int old_size = PDIBoxMap_.size();
-
-  PDIBoxMap_[ pname ] = data;
-
-  PDIAGN_TRUE_OR_THROW( old_size != PDIBoxMap_.size(),
-    "Insertion failed." );
-}
-
-
-bool TePDIParameters::GetParameter( const std::string& pname,
-                                    TePDIBox::pointer& data ) const
-{
-  TePDIBoxMap::iterator it = PDIBoxMap_.find( pname );
-
-  if( it != PDIBoxMap_.end() ) {
-    data = it->second;
-    return true;
-  }
-
-  PDIAGN_LOGERR( "Invalid get: Parameter not stored" );
-
-  return false;
-}
-
-void TePDIParameters::SetParameter( const std::string& pname,
-                                    const TePDIFilterMask::pointer& data )
-{
-  unsigned int old_size = PDIFilterMaskMap_.size();
-
-  PDIFilterMaskMap_[ pname ] = data;
-
-  PDIAGN_TRUE_OR_THROW( old_size != PDIFilterMaskMap_.size(),
-    "Insertion failed." );
-}
-
-
-bool TePDIParameters::GetParameter( const std::string& pname,
-                                    TePDIFilterMask::pointer& data ) const
-{
-  TePDIFilterMaskMap::iterator it = PDIFilterMaskMap_.find( pname );
-
-  if( it != PDIFilterMaskMap_.end() ) {
-    data = it->second;
-    return true;
-  }
-
-  PDIAGN_LOGERR( "Invalid get: Parameter not stored" );
-
-  return false;
-}
-
-bool TePDIParameters::CheckParameter( const std::string& pname,
-                                      TePDIParamTypes type ) const
-{
-  switch( type ) {
-    case TePDIIntParam :
-    {
-      if( IntegerMap_.find( pname ) != IntegerMap_.end() ){
-        return true;
-      }
-      break;
-    }
-    case TePDIIntVectorParam :
-    {
-      if( IntegerVectorMap_.find( pname ) != IntegerVectorMap_.end() ){
-        return true;
-      }
-      break;
-    }
-    case TePDIRasterParam :
-    {
-      if( RasterMap_.find( pname ) != RasterMap_.end() ){
-        return true;
-      }
-      break;
-    }
-    case TePDIStringParam :
-    {
-      if( StringMap_.find( pname ) != StringMap_.end() ){
-        return true;
-      }
-      break;
-    }
-    case TePDIDoubleParam :
-    {
-      if( DoubleMap_.find( pname ) != DoubleMap_.end() ){
-        return true;
-      }
-      break;
-    }
-    case TePDIBoxParam :
-    {
-      if( PDIBoxMap_.find( pname ) != PDIBoxMap_.end() ){
-        return true;
-      }
-      break;
-    }
-    case TePDIRgbPaletteParam :
-    {
-      if( PDIRgbPaletteMap_.find( pname ) != PDIRgbPaletteMap_.end() ){
-        return true;
-      }
-      break;
-    }
-    case TePDIFilterMaskParam :
-    {
-      if( PDIFilterMaskMap_.find( pname ) != PDIFilterMaskMap_.end() ){
-        return true;
-      }
-      break;
-    }    default :
-    {
-      PDIAGN_LOG_AND_THROW( "Invalid Parameter Type" );
-      break;
-    }
-  }
-
-  return false;
-}
-
-void TePDIParameters::operator=( const TePDIParameters& ext_params )
-{
-  RasterMap_ = ext_params.RasterMap_;
-  IntegerMap_ = ext_params.IntegerMap_;
-  IntegerVectorMap_ = ext_params.IntegerVectorMap_;
-  StringMap_ = ext_params.StringMap_;
-  DoubleMap_ = ext_params.DoubleMap_;
-  PDIBoxMap_ = ext_params.PDIBoxMap_;
-  PDIRgbPaletteMap_ = ext_params.PDIRgbPaletteMap_;
-  PDIFilterMaskMap_ = ext_params.PDIFilterMaskMap_;
-}
diff --git a/src/terralib/PDI/source/TePDIParameters.hpp b/src/terralib/PDI/source/TePDIParameters.hpp
deleted file mode 100644
index da1b40f..0000000
--- a/src/terralib/PDI/source/TePDIParameters.hpp
+++ /dev/null
@@ -1,306 +0,0 @@
-/*
-TerraLib - a library for developing GIS applications.
-Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular
-purpose. The library provided hereunder is on an "as is" basis, and the
-authors have no obligation to provide maintenance, support, updates,
-enhancements, or modifications.
-In no event shall INPE be held liable to any party
-for direct, indirect, special, incidental, or consequential damages arising
-out of the use of this library and its documentation.
-*/
-
-/**
- *   This file contains the class of structures and definitions
- *   to deal with parameters used by all PDI classes.
- */
-
-#ifndef TEPDIPARAMETERS_HPP
-  #define TEPDIPARAMETERS_HPP
-
-  #include "TePDIBox.hpp"
-  #include "TePDITypes.hpp"
-  #include "TePDIRgbPalette.hpp"
-  #include "TePDIFilterMask.hpp"
-
-  #include "TePDISharedPtr.cpp"
-
-  #include <TeRaster.h>
-
-  #include <map>
-  #include <string>
-  #include <vector>
-
-  class TePDIParameters {
-    public :
-      typedef TePDISharedPtr< TePDIParameters > pointer;
-      typedef const TePDISharedPtr< TePDIParameters > const_pointer;
-
-      /**
-       * Suported parameters.
-       */
-      enum TePDIParamTypes{
-        TePDIIntParam = 1,
-        TePDIIntVectorParam = 2,
-        TePDIRasterParam = 3,
-        TePDIDoubleParam = 4,
-        TePDIStringParam = 5,
-        TePDIBoxParam = 6,
-        TePDIRgbPaletteParam = 7,
-        TePDIFilterMaskParam = 8
-      };
-
-      /**
-       * Default Constructor
-       */
-      TePDIParameters();
-
-      /**
-       *  Default Destructor
-       */
-      ~TePDIParameters();
-
-      /**
-       * Sets a TeRaster parameter reference.
-       *
-       * @param pname Parameter name.
-       * @param data Parameter data.
-       */
-      void SetParameter( const std::string& pname,
-                         const TePDITypes::TePDIRasterPtrType& data );
-
-      /**
-       * Gets a TeRaster parameter reference.
-       *
-       * @param pname Parameter name.
-       * @param data Parameter data.
-       * @return true if OK, false if the parameter was not found or error.
-       */
-      bool GetParameter( const std::string& pname,
-                         TePDITypes::TePDIRasterPtrType& data ) const;
-
-      /**
-       * Sets a TePDIPalette parameter reference.
-       *
-       * @param pname Parameter name.
-       * @param data Parameter data.
-       */
-      void SetParameter( const std::string& pname,
-                         TePDIRgbPalette::const_pointer& data );
-
-      /**
-       * Gets a TePDIPalette parameter reference.
-       *
-       * @param pname Parameter name.
-       * @param data Parameter data.
-       * @return true if OK, false if the parameter was not found or error.
-       */
-      bool GetParameter( const std::string& pname,
-                         TePDIRgbPalette::pointer& data ) const;
-
-      /**
-       * Sets a Integer parameter.
-       *
-       * @param pname Parameter name.
-       * @param data Parameter data.
-       */
-      void SetParameter( const std::string& pname,
-                         int data );
-
-      /**
-       * Gets a Integer parameter.
-       *
-       * @param pname Parameter name.
-       * @param data Parameter data.
-       * @return true if OK, false if the parameter was no found or error.
-       */
-      bool GetParameter( const std::string& pname,
-                         int& data ) const;
-
-      /**
-       * Sets a Integer vector parameter.
-       *
-       * @param pname Parameter name.
-       * @param data Parameter data.
-       */
-      void SetParameter( const std::string& pname,
-                         std::vector< int >& data );
-
-      /**
-       * Gets a Integer vector parameter.
-       *
-       * @param pname Parameter name.
-       * @param data Parameter data.
-       * @return true if OK, false if the parameter was no found or error.
-       */
-      bool GetParameter( const std::string& pname,
-                         std::vector< int >& data ) const;
-
-      /**
-       * Sets a String parameter.
-       *
-       * @param pname Parameter name.
-       * @param data Parameter data.
-       */
-      void SetParameter( const std::string& pname,
-                         const std::string& data );
-
-      /**
-       * Gets a String parameter.
-       *
-       * @param pname Parameter name.
-       * @param data Parameter data.
-       * @return true if OK, false if the parameter was no found or error.
-       */
-      bool GetParameter( const std::string& pname,
-                         std::string& data ) const;
-
-      /**
-       * Sets a Double parameter.
-       *
-       * @param pname Parameter name.
-       * @param data Parameter data.
-       */
-      void SetParameter( const std::string& pname,
-                         double data );
-
-      /**
-       * Gets a Double parameter.
-       *
-       * @param pname Parameter name.
-       * @param data Parameter data.
-       * @return true if OK, false if the parameter was no found or error.
-       */
-      bool GetParameter( const std::string& pname,
-                         double& data ) const;
-
-      /**
-       * Sets a PDIBox parameter.
-       *
-       * @param pname Parameter name.
-       * @param data Parameter data.
-       */
-      void SetParameter( const std::string& pname,
-                         const TePDIBox::pointer& data );
-
-      /**
-       * Gets a PDIBox parameter.
-       *
-       * @param pname Parameter name.
-       * @param data Parameter data.
-       * @return true if OK, false if the parameter was no found or error.
-       */
-      bool GetParameter( const std::string& pname,
-                         TePDIBox::pointer& data ) const;
-
-      /**
-       * Sets a FilterMask parameter.
-       *
-       * @param pname Parameter name.
-       * @param data Parameter data.
-       */
-      void SetParameter( const std::string& pname,
-                         const TePDIFilterMask::pointer& data );
-
-      /**
-       * Gets a FilterMask parameter.
-       *
-       * @param pname Parameter name.
-       * @param data Parameter data.
-       * @return true if OK, false if the parameter was no found or error.
-       */
-      bool GetParameter( const std::string& pname,
-                         TePDIFilterMask::pointer& data ) const;
-
-      /**
-       * Checks if the parameter was set.
-       *
-       * @param pname Parameter name.
-       * @param type Parameter type.
-       * @return true if OK, false if the parameter was not set.
-       */
-      bool CheckParameter( const std::string& pname,
-                           TePDIParamTypes type ) const;
-
-      /**
-       * Operator = overload.
-       *
-       * @param ext_params External instance TePDIParameters reference.
-       */
-      void operator=( const TePDIParameters& ext_params );
-
-    protected :
-      /**
-       * Internal Type definitions of suported parameters.
-       */
-      typedef std::map< std::string, std::string >
-        TePDIStringMap;
-      typedef std::map< std::string, int >
-        TePDIIntegerMap;
-      typedef std::map< std::string, std::vector< int > >
-        TePDIIntegerVectorMap;
-      typedef std::map< std::string, double >
-        TePDIDoubleMap;
-      typedef std::map< std::string, TePDITypes::TePDIRasterPtrType >
-        TePDIRasterMap;
-      typedef std::map< std::string, TePDIBox::pointer >
-        TePDIBoxMap;
-      typedef std::map< std::string, TePDIRgbPalette::pointer >
-        TePDIRgbPaletteMap;
-      typedef std::map< std::string, TePDIFilterMask::pointer >
-        TePDIFilterMaskMap;
-
-      /**
-       * Stored TeRaster references Map.
-       */
-      mutable TePDIRasterMap RasterMap_;
-
-      /**
-       * Stored integer references Map.
-       */
-      mutable TePDIIntegerMap IntegerMap_;
-
-      /**
-       * Stored integer vector references Map.
-       */
-      mutable TePDIIntegerVectorMap IntegerVectorMap_;
-
-      /**
-       * Stored double references Map.
-       */
-      mutable TePDIDoubleMap DoubleMap_;
-
-      /**
-       * Stored string references Map.
-       */
-      mutable TePDIStringMap StringMap_;
-
-      /**
-       * Stored PDIBox references Map.
-       */
-      mutable TePDIBoxMap PDIBoxMap_;
-
-      /**
-       * Stored PDIPalette references Map.
-       */
-      mutable TePDIRgbPaletteMap PDIRgbPaletteMap_;
-
-      /**
-       * Stored PDIFilterMask references Map.
-       */
-      mutable TePDIFilterMaskMap PDIFilterMaskMap_;
-};
-
-#endif //TEPDIPARAMETERS_HPP
diff --git a/src/terralib/PDI/source/TePDIRgbPalette.cpp b/src/terralib/PDI/source/TePDIRgbPalette.cpp
deleted file mode 100755
index e825f04..0000000
--- a/src/terralib/PDI/source/TePDIRgbPalette.cpp
+++ /dev/null
@@ -1,194 +0,0 @@
-#include "TePDIRgbPalette.hpp"
-
-#include "TePDIAgnostic.hpp"
-
-#include <math.h>
-
-
-TePDIRgbPalette::iterator::iterator(
-  const std::map< double, unsigned int >::iterator& red_it,
-  const std::map< double, unsigned int >::iterator& green_it,
-  const std::map< double, unsigned int >::iterator& blue_it )
-{
-  red_it_ = red_it;
-  green_it_ = green_it;
-  blue_it_ = blue_it;
-}
-
-
-TePDIRgbPalette::iterator::~iterator()
-{
-}
-
-
-void TePDIRgbPalette::iterator::operator++()
-{
-  ++red_it_;
-  ++green_it_;
-  ++blue_it_;
-}
-
-
-void TePDIRgbPalette::iterator::operator--()
-{
-  --red_it_;
-  --green_it_;
-  --blue_it_;
-}
-
-
-void TePDIRgbPalette::iterator::operator=( const iterator& ext_ref )
-{
-  red_it_ = ext_ref.red_it_;
-  green_it_ = ext_ref.green_it_;
-  blue_it_ = ext_ref.blue_it_;
-}
-
-
-bool TePDIRgbPalette::iterator::operator!=( const iterator& ext_ref )
-{
-  return ( red_it_ != ext_ref.red_it_ ) ? true : false;
-}
-
-
-double TePDIRgbPalette::iterator::level() const
-{
-  return red_it_->first;
-}
-
-
-unsigned int TePDIRgbPalette::iterator::red() const
-{
-  return red_it_->second;
-}
-
-
-unsigned int TePDIRgbPalette::iterator::green() const
-{
-  return green_it_->second;
-}
-
-
-unsigned int TePDIRgbPalette::iterator::blue() const
-{
-  return blue_it_->second;
-}
-
-
-TePDIRgbPalette::TePDIRgbPalette()
-{
-}
-
-
-TePDIRgbPalette::~TePDIRgbPalette()
-{
-}
-
-void TePDIRgbPalette::set( double level, unsigned int red,
-  unsigned int green, unsigned int blue )
-{
-  red_map_[ level ] = red;
-  green_map_[ level ] = green;
-  blue_map_[ level ] = blue;
-}
-
-bool TePDIRgbPalette::get( double level, unsigned int& red,
-  unsigned int& green, unsigned int& blue ) const
-{
-  if( red_map_.find( level ) != red_map_.end() ) {
-    red = red_map_[ level ];
-    green = green_map_[ level ];
-    blue = blue_map_[ level ];
-
-    return true;
-  } else {
-    return false;
-  }
-}
-
-
-void TePDIRgbPalette::clear()
-{
-  red_map_.clear();
-  green_map_.clear();
-  blue_map_.clear();
-}
-
-
-unsigned long int TePDIRgbPalette::size() const
-{
-  return red_map_.size();
-}
-
-
-void TePDIRgbPalette::operator=( TePDIRgbPalette& external_reference )
-{
-  red_map_ = external_reference.red_map_;
-  green_map_ = external_reference.green_map_;
-  blue_map_ = external_reference.blue_map_;
-}
-
-
-TePDIRgbPalette::iterator TePDIRgbPalette::begin() const
-{
-  TePDIRgbPalette::iterator temp_it( red_map_.begin(), green_map_.begin(),
-    blue_map_.begin() );
-
-  return temp_it;
-}
-
-
-TePDIRgbPalette::iterator TePDIRgbPalette::end() const
-{
-  TePDIRgbPalette::iterator temp_it( red_map_.end(), green_map_.end(),
-    blue_map_.end() );
-
-  return temp_it;
-}
-
-
-TePDISharedPtr< TePDIRgbPalette > TePDIRgbPalette::createLB(
-  unsigned int levels )
-{
-  PDIAGN_TRUE_OR_THROW( levels > 0, "Invalid supplied Levels" );
-
-  unsigned int channel_levels =
-    (unsigned int) ceil( cbrtf( (float)levels ) );
-
-  unsigned int channel_step =
-    (unsigned int) floor( 256. / (float)(channel_levels + 1) );
-
-  unsigned int red_level = 0;
-  unsigned int green_level = 0;
-  unsigned int blue_level = 0;
-
-  TePDISharedPtr< TePDIRgbPalette > outPal( new TePDIRgbPalette );
-
-  unsigned int level = 0;
-
-  while( level < levels ) {
-    if( red_level > 255 ) {
-      red_level = red_level % 255;
-
-      green_level += channel_step;
-
-      if( green_level > 255 ) {
-        green_level = green_level % 255;
-
-        blue_level += channel_step;
-
-        if( blue_level > 255 ) {
-          blue_level = blue_level % 255;
-        }
-      }
-    }
-
-    outPal->set( (double)level, red_level, green_level, blue_level );
-
-    red_level += channel_step;
-
-    ++level;
-  }
-
-  return outPal;
-}
diff --git a/src/terralib/PDI/source/TePDIRgbPalette.hpp b/src/terralib/PDI/source/TePDIRgbPalette.hpp
deleted file mode 100644
index abe8b62..0000000
--- a/src/terralib/PDI/source/TePDIRgbPalette.hpp
+++ /dev/null
@@ -1,238 +0,0 @@
-/*
-TerraLib - a library for developing GIS applications.
-Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular
-purpose. The library provided hereunder is on an "as is" basis, and the
-authors have no obligation to provide maintenance, support, updates,
-enhancements, or modifications.
-In no event shall INPE be held liable to any party
-for direct, indirect, special, incidental, or consequential damages arising
-out of the use of this library and its documentation.
-*/
-
-/**
- *   This file contains the class for RGB Palettes.
- */
-
-#ifndef TEPDIRGBPALETTE_HPP
-  #define TEPDIRGBPALETTE_HPP
-
-  #include "TePDISharedPtr.cpp"
-
-  #include <map>
-  #include <cctype>
-
-  class TePDIRgbPalette{
-    public :
-      typedef TePDISharedPtr< TePDIRgbPalette > pointer;
-      typedef const TePDISharedPtr< TePDIRgbPalette > const_pointer;
-
-      /**
-       * Default Constructor
-       *
-       */
-      TePDIRgbPalette();
-
-      /**
-       * Default Destructor
-       */
-      virtual ~TePDIRgbPalette();
-
-      /**
-       * Stores RGB values associated with a paletted level.
-       *
-       * @param level Palette Level.
-       * @param red Red Level.
-       * @param green Green Level.
-       * @param blue Blue Level.
-       */
-      void set( double level, unsigned int red, unsigned int green,
-        unsigned int blue );
-
-      /**
-       * Retrives Stored RGB values associated with a paletted level.
-       *
-       * @param level Palette Level.
-       * @param red Red Level.
-       * @param green Green Level.
-       * @param blue Blue Level.
-       *
-       * @return true if the paletted level was found, false on error.
-       */
-      bool get( double level, unsigned int& red, unsigned int& green,
-        unsigned int& blue ) const;
-
-      /**
-       * Clears the entire palette.
-       */
-      void clear();
-
-      /**
-       * The current palette size.
-       *
-       * @return The current palette size.
-       */
-      unsigned long int size() const;
-
-      /**
-       * Operator = overload.
-       *
-       * @param external_reference A external palette reference.
-       */
-      void operator=( TePDIRgbPalette& external_reference );
-
-      /**
-       * Automatic Level Based Palette creation.
-       *
-       * @param levels The number of levels.
-       * @return The generated palette.
-       */
-      static TePDISharedPtr< TePDIRgbPalette > createLB( unsigned int levels );
-
-      /**
-       * Palette iterator.
-       */
-      class iterator{
-        public :
-          /**
-           * Default Constructor.
-           *
-           * @param red_it Red channel iterator.
-           * @param green_it Green channel iterator.
-           * @param blue_it Blue channel iterator.
-           */
-          explicit iterator(
-            const std::map< double, unsigned int >::iterator& red_it,
-            const std::map< double, unsigned int >::iterator& green_it,
-            const std::map< double, unsigned int >::iterator& blue_it );
-
-          /**
-           * Default Destructor.
-           */
-          ~iterator();
-
-          /**
-           * Operator ++ overload.
-           */
-          void operator++();
-
-          /**
-           * Operator -- overload.
-           */
-          void operator--();
-
-          /**
-           * Operator = overload.
-           *
-           * @param ext_ref External iterator reference.
-           */
-          void operator=( const iterator& ext_ref );
-
-          /**
-           * Operator != overload.
-           *
-           * @param ext_ref External iterator reference.
-           * @return true if both iterators are pointing to the same
-           * position.
-           */
-          bool operator!=( const iterator& ext_ref );
-
-          /**
-           * The current iterator pointed level.
-           *
-           * @return The current iterator pointed level.
-           */
-          double level() const;
-
-          /**
-           * The current iterator red channel value.
-           *
-           * @return The current iterator red channel value.
-           */
-          unsigned int red() const;
-
-          /**
-           * The current iterator green channel value.
-           *
-           * @return The current iterator green channel value.
-           */
-          unsigned int green() const;
-
-          /**
-           * The current iterator blue channel value.
-           *
-           * @return The current iterator blue channel value.
-           */
-          unsigned int blue() const;
-
-        protected :
-          /**
-           * Internal red map iterator;
-           */
-          mutable std::map< double, unsigned int >::iterator red_it_;
-
-          /**
-           * Internal green map iterator;
-           */
-          mutable std::map< double, unsigned int >::iterator green_it_;
-
-          /**
-           * Internal blue map iterator;
-           */
-          mutable std::map< double, unsigned int >::iterator blue_it_;
-      };
-
-      /**
-       * Iterator to the first element.
-       *
-       * @return An Iterator to the first element.
-       */
-      iterator begin() const;
-
-      /**
-       * Iterator pointing to the position after the
-       * last element.
-       *
-       * @return The iterator.
-       */
-      iterator end() const;
-
-    protected :
-      /**
-       * Internal Red channel map.
-       *
-       * @param double Paletted Level.
-       * @param unsigned int Relative Red Level.
-       */
-      mutable std::map< double, unsigned int > red_map_;
-
-      /**
-       * Internal Green channel map.
-       *
-       * @param double Paletted Level.
-       * @param unsigned int Relative Green Level.
-       */
-      mutable std::map< double, unsigned int > green_map_;
-
-      /**
-       * Internal Blue channel map.
-       *
-       * @param double Paletted Level.
-       * @param unsigned int Relative Blue Level.
-       */
-      mutable std::map< double, unsigned int > blue_map_;
-  };
-
-#endif //TEPDIRGBPALETTE_HPP
diff --git a/src/terralib/PDI/source/TePDISharedPtr.cpp b/src/terralib/PDI/source/TePDISharedPtr.cpp
deleted file mode 100644
index dcb0aca..0000000
--- a/src/terralib/PDI/source/TePDISharedPtr.cpp
+++ /dev/null
@@ -1,146 +0,0 @@
-#ifndef TEPDISHAREDPTR_CPP
-#define TEPDISHAREDPTR_CPP
-
-#include "TePDISharedPtr.hpp"
-
-#include <iostream>
-
-
-template< class T >
-TePDISharedPtr< T >::TePDISharedPtr( T* pointer,
-  bool static_assignment )
-{
-  if( pointer == 0 ) {
-    counter_ = 0;
-    reference_ = 0;
-    static_assignment_ = false;
-  } else {
-    counter_ = new unsigned long int;
-    (*counter_) = 1;
-
-    reference_ = pointer;
-
-    static_assignment_ = static_assignment;
-  }
-}
-
-
-template< class T >
-TePDISharedPtr< T >::TePDISharedPtr( const TePDISharedPtr& external )
-{
-  counter_ = 0;
-  reference_ = 0;
-  static_assignment_ = false;
-
-  (*this) = external;
-}
-
-
-template< class T >
-  TePDISharedPtr< T >::~TePDISharedPtr()
-{
-  reset();
-}
-
-
-template< class T >
-bool TePDISharedPtr< T >::isActive() const
-{
-  return ( reference_ == 0 ) ? false : true;
-}
-
-
-template< class T >
-void TePDISharedPtr< T >::reset( T* pointer, bool static_assignment )
-{
-  if( isActive() ) {
-     --(*counter_);
-
-     if( (*counter_) == 0 ) {
-       delete counter_;
-
-       if( ! static_assignment_ ) {
-         delete reference_;
-       }
-     }
-  }
-
-  if( pointer != 0 ){
-    counter_ = new unsigned long int;
-    (*counter_) = 1;
-
-    reference_ = pointer;
-
-    static_assignment_ = static_assignment;
-  } else {
-    counter_ = 0;
-    reference_ = 0;
-    static_assignment_ = false;
-  }
-}
-
-
-template< class T >
-TePDISharedPtr< T >& TePDISharedPtr< T >::operator=(
-  const TePDISharedPtr< T >& external )
-{
-  reset();
-
-  if( external.isActive() ) {
-    counter_ = external.counter_;
-    (*counter_) = (*counter_) + 1;
-
-    reference_ = external.reference_;
-
-    static_assignment_ = external.static_assignment_;
-  }
-
-  return *this;
-}
-
-
-template< class T >
-T& TePDISharedPtr< T >::operator*()
-{
-  if( ! isActive() ) {
-    std::cout << std::endl
-      << "TePDISharedPtr::operator* - Invalid use of inactive instance"
-      << std::endl;
-    throw;
-  }
-
-  return *reference_;
-}
-
-
-template< class T >
-T* TePDISharedPtr< T >::operator->()
-{
-  return reference_;
-}
-
-
-template< class T >
-bool TePDISharedPtr< T >::operator==( const TePDISharedPtr& external )
-{
-  return ( ( reference_ == external.reference_ ) &&
-         ( counter_ == external.counter_ ) ) ? true : false;
-}
-
-
-template< class T >
-bool TePDISharedPtr< T >::operator!=( const TePDISharedPtr& external )
-{
-  return ( ( reference_ != external.reference_ ) ||
-    ( counter_ != external.counter_ ) ) ? true : false;
-}
-
-
-template< class T >
-T* TePDISharedPtr< T >::NakedPointer()
-{
-  return reference_;
-}
-
-
-#endif //TEPDISHAREDPTR_CPP
diff --git a/src/terralib/PDI/source/TePDISharedPtr.hpp b/src/terralib/PDI/source/TePDISharedPtr.hpp
deleted file mode 100644
index f06ca4f..0000000
--- a/src/terralib/PDI/source/TePDISharedPtr.hpp
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
-TerraLib - a library for developing GIS applications.
-Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular
-purpose. The library provided hereunder is on an "as is" basis, and the
-authors have no obligation to provide maintenance, support, updates,
-enhancements, or modifications.
-In no event shall INPE be held liable to any party
-for direct, indirect, special, incidental, or consequential damages arising
-out of the use of this library and its documentation.
-*/
-
-/**
- *   This file contains the class to deal with automatic dynamic memory
- *   allocation / desallocation.
- */
-
-#ifndef TEPDISHAREDPTR_HPP
-  #define TEPDISHAREDPTR_HPP
-
-  template< class T >
-  class TePDISharedPtr{
-    public :
-      /**
-       * Default Constructor.
-       *
-       * @param pointer A pointer the the active object.
-       * @param static_assignment A flag indication for a static
-       * assignment (the pointed object will not be destroyed at the
-       * end ).
-       */
-      TePDISharedPtr( T* pointer = 0, bool static_assignment = false );
-
-      /**
-       * Alternative Constructor.
-       *
-       * @param external External object reference.
-       */
-      TePDISharedPtr( const TePDISharedPtr& external );
-
-      /**
-       * Default Destructor
-       */
-      ~TePDISharedPtr();
-
-      /**
-       * Verifies if the current pointer points to an active object.
-       *
-       * @return true if active, false if not.
-       */
-      bool isActive() const;
-
-      /**
-       * Reset the active instance the the new pointer.
-       *
-       * @param pointer A pointer the the active object.
-       * @param static_assignment A flag indication for a static
-       * assignment (the pointed object will not be destroyed at the
-       * end ).
-       */
-      void reset( T* pointer = 0, bool static_assignment = false );
-
-      /**
-       * Operator = overload.
-       *
-       * @param external External instance reference.
-       */
-      TePDISharedPtr< T >& operator=( const TePDISharedPtr< T >& external );
-
-      /**
-       * Operator * overload.
-       *
-       * @return The internal instance reference.
-       */
-      T& operator*();
-
-      /**
-       * Operator -> overload.
-       *
-       * @return The internal instance pointer.
-       */
-      T* operator->();
-
-      /**
-       * Operator == overload.
-       *
-       * @return true if the current pointer and the external pointer
-       * are pointing to the same object.
-       */
-      bool operator==( const TePDISharedPtr& external );
-
-      /**
-       * Operator != overload.
-       *
-       * @return true if the current pointer and the external pointer
-       * are not pointing to the same object.
-       */
-      bool operator!=( const TePDISharedPtr& external );
-
-      /**
-       * A Naked Pointer to the encapsulated object.
-       *
-       * @return The internal instance pointer.
-       */
-      T* NakedPointer();
-
-    protected :
-
-      /**
-       * A pointer to the current number of active users of this pointer.
-       */
-      mutable unsigned long int* counter_;
-
-      /**
-       * A pointer to the current object encapsulated by this
-       * shared pointer.
-       */
-      mutable T* reference_;
-
-      /**
-       * A flag indicating if this shared pointer was created by a
-       * dynamic assignment ( false value ) or by a static
-       * assignment( true value - the encapsulated object will not
-       * be destroyed at the end.
-       */
-      mutable bool static_assignment_;
-  };
-
-
-#endif //TEPDISHAREDPTR_HPP
diff --git a/src/terralib/PDI/source/TePDITypes.hpp b/src/terralib/PDI/source/TePDITypes.hpp
deleted file mode 100644
index ae30194..0000000
--- a/src/terralib/PDI/source/TePDITypes.hpp
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
-TerraLib - a library for developing GIS applications.
-Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular
-purpose. The library provided hereunder is on an "as is" basis, and the
-authors have no obligation to provide maintenance, support, updates,
-enhancements, or modifications.
-In no event shall INPE be held liable to any party
-for direct, indirect, special, incidental, or consequential damages arising
-out of the use of this library and its documentation.
-*/
-
-#ifndef TEPDITYPES_HPP
-  #define TEPDITYPES_HPP
-
-  #include "TePDIRgbPalette.hpp"
-
-  #include "TePDISharedPtr.cpp"
-
-  #include <TeRaster.h>
-
-  #include <map>
-  #include <vector>
-
-
-  /**
-   *  This namespace contains the global types used by all PDI classes.
-   */
-  namespace TePDITypes
-  {
-    /**
-     * Histogram alias definition.
-     *
-     * @param double level.
-     * @param int Pixel count.
-     */
-    typedef map< double, int > TePDIHistogramType;
-
-    /**
-     * Histograms vector alias definition.
-     */
-    typedef std::vector< TePDIHistogramType > TePDIHistogramsVectorType;
-
-    /**
-     * Histograms map alias definition.
-     *
-     * @param int Channel ( band ) number;
-     * @param TePDIHistogramType Related histogram.
-     */
-    typedef std::map< int, TePDIHistogramType > TePDIHistogramsMapType;
-
-    /**
-     * Type definition for a simple LUT - Look-Up Table.
-     *
-     * @param double (First) input level.
-     * @param double (Second) output level.
-     */
-    typedef map< double, double > TePDILutType;
-
-    /**
-     * Look-Up Table vector alias definition.
-     */
-    typedef std::vector< TePDILutType > TePDILutsVectorType;
-
-    /**
-     * TeRaster pointer definition.
-     */
-    typedef TePDISharedPtr< TeRaster > TePDIRasterPtrType;
-
-  };
-
-#endif //TEPDITYPES_HPP
diff --git a/src/terralib/PDI/source/TePDIUtils.cpp b/src/terralib/PDI/source/TePDIUtils.cpp
deleted file mode 100755
index 70b5822..0000000
--- a/src/terralib/PDI/source/TePDIUtils.cpp
+++ /dev/null
@@ -1,284 +0,0 @@
-#include "TePDIUtils.hpp"
-
-#include "TePDIAgnostic.hpp"
-
-#include <TeDecoderMemory.h>
-#include <TeDecoderTIFF.h>
-#include <TeRaster.h>
-#include <TeRasterParams.h>
-
-#include <cmath>
-
-namespace TePDIUtils{
-
-  bool TeGenerateHistogram(
-    TePDITypes::TePDIRasterPtrType& in_raster,
-    unsigned int levels,
-    unsigned int band,
-    TePDITypes::TePDIHistogramType& out_hist,
-    bool force_zero_reference )
-  {
-    int bands_number = in_raster->nBands();
-
-    PDIAGN_TRUE_OR_RETURN( (int)band < bands_number,
-      "Invalid band" );
-
-    out_hist.clear();
-
-    TeRaster::iterator raster_it = in_raster->begin();
-
-    TeRaster::iterator raster_end_it = in_raster->end();
-
-    /* Finding the lowest end highest level */
-
-    double lowest_level = 0;
-    bool lowest_level_enabled = 0;
-    double highest_level = 0;
-    bool highest_level_enabled = 0;
-    double current_raster_level;
-
-    while( raster_it != raster_end_it ) {
-      current_raster_level = raster_it*( band );
-
-      if( lowest_level_enabled ) {
-        if( current_raster_level < lowest_level) {
-          lowest_level = current_raster_level;
-        }
-      } else {
-        lowest_level = current_raster_level;
-        lowest_level_enabled = true;
-      }
-
-      if( highest_level_enabled ) {
-        if( current_raster_level > highest_level) {
-          highest_level = current_raster_level;
-        }
-      } else {
-        highest_level = current_raster_level;
-        highest_level_enabled = true;
-      }
-
-      ++raster_it;
-    }
-
-    if( force_zero_reference ) {
-      if( highest_level > 0 ) {
-        lowest_level = 0;
-      } else {
-        highest_level = 0;
-      }
-    }
-
-    /* Calculating the histogram step */
-
-    double step = 1;
-    unsigned int hist_computed_levels = 1;
-
-    if( levels == 0 ) {
-      /* Auto step feature */
-      PDIAGN_TRUE_OR_RETURN( ( highest_level - lowest_level ) > 1,
-        "Unable to use the Histogram Auto-step feature" );
-
-      hist_computed_levels = 1 +
-        ( unsigned int ) std::floor( highest_level - lowest_level );
-    } else {
-      hist_computed_levels = levels;
-    }
-
-    PDIAGN_TRUE_OR_RETURN( hist_computed_levels > 1,
-      "Invalid levels number" );
-
-    step = ( highest_level - lowest_level ) / (double)hist_computed_levels;
-
-    /* Ordered Histogram pre-allocation */
-
-    for( unsigned int level = 0 ; level < ( hist_computed_levels - 1 ) ;
-         ++level ) {
-
-      out_hist[ ( level * step ) + lowest_level ] = 0;
-    }
-    out_hist[ highest_level ] = 0;
-
-    /* Histogram generation */
-
-    raster_it = in_raster->begin();
-    TePDITypes::TePDIHistogramType::iterator hist_it;
-    TePDITypes::TePDIHistogramType::iterator hist_next_it;
-    TePDITypes::TePDIHistogramType::iterator hist_end_it = out_hist.end();
-
-    while( raster_it != raster_end_it ) {
-      current_raster_level = raster_it*( band );
-
-      /* locating the raster level position relative to histogram levels */
-
-      hist_it = out_hist.begin();
-      hist_next_it = hist_it;
-      ++hist_next_it;
-
-      while( hist_next_it != hist_end_it ) {
-        if( current_raster_level <= hist_next_it->first ) {
-          break;
-        }
-
-        ++hist_it;
-        ++hist_next_it;
-      }
-
-      /* Interpolating level */
-
-      if( hist_next_it == hist_end_it ) {
-        (*hist_it).second = (*hist_it).second + 1;
-      } else {
-        if( std::abs( hist_it->first - current_raster_level ) <
-            std::abs( hist_next_it->first - current_raster_level ) ) {
-
-          (*hist_it).second = (*hist_it).second + 1;
-        } else {
-          (*hist_next_it).second = (*hist_next_it).second + 1;
-        }
-      }
-
-
-      ++raster_it;
-    }
-
-    return true;
-  }
-
-
-  bool TeAllocRAMRaster(
-    TePDITypes::TePDIRasterPtrType& template_raster,
-    TePDITypes::TePDIRasterPtrType& RAMRaster )
-  {
-    PDIAGN_TRUE_OR_RETURN( template_raster.isActive(),
-      "Inactive Input Raster" );
-    PDIAGN_TRUE_OR_RETURN( template_raster->status() != TeNOTREADY,
-      "Input not Ready" );
-
-    if( ! RAMRaster.isActive() ) {
-      RAMRaster.reset( new TeRaster() );
-    }
-
-    TeRasterParams temp_params = template_raster->params();
-    temp_params.mode_ = 'c';
-
-    /* Assigning a RAM decoder */
-    RAMRaster->setDecoder( new TeDecoderMemory( temp_params ) );
-
-    return RAMRaster->init();
-  }
-
-
-  bool TeRaster2Geotiff(
-    TePDITypes::TePDIRasterPtrType& in_raster,
-    const std::string& file_name )
-  {
-    PDIAGN_TRUE_OR_RETURN( in_raster.isActive(),
-      "Inactive Input Raster" );
-    PDIAGN_TRUE_OR_RETURN( in_raster->status() != TeNOTREADY,
-      "Input not Ready" );
-    PDIAGN_TRUE_OR_RETURN( file_name.size() != 0,
-      "Invalid file name" );
-
-    TeRasterParams temp_params = in_raster->params();
-
-    temp_params.mode_ = 'c';
-    temp_params.fileName_ = file_name;
-
-    TePDITypes::TePDIRasterPtrType outRaster( new TeRaster( temp_params ) );
-
-    outRaster->setDecoder( new TeDecoderTIFF( outRaster->params() ) );
-
-    PDIAGN_TRUE_OR_RETURN( outRaster->init(),
-      "Unable to init GeoTIFF Raster" );
-
-    return TeCopyRasterPixels( in_raster, outRaster );
-  }
-
-
-  bool TeCopyRasterPixels(
-    TePDITypes::TePDIRasterPtrType& source_raster,
-    TePDITypes::TePDIRasterPtrType& target_raster )
-  {
-    PDIAGN_TRUE_OR_RETURN( source_raster.isActive(),
-      "Inactive Input Raster" );
-    PDIAGN_TRUE_OR_RETURN( target_raster.isActive(),
-      "Inactive Output Raster" );
-    PDIAGN_TRUE_OR_RETURN( source_raster->status() != TeNOTREADY,
-      "Input not Ready" );
-    PDIAGN_TRUE_OR_RETURN( target_raster->status() == TeREADYTOWRITE,
-      "OutPut not Ready" );
-
-    TeRasterParams& source_params = source_raster->params();
-    TeRasterParams& target_params = target_raster->params();
-
-    PDIAGN_TRUE_OR_RETURN(
-      ( ( source_params.nBands() == target_params.nBands() ) &&
-      ( source_params.nlines_ == target_params.nlines_ ) &&
-      ( source_params.ncols_ == target_params.ncols_ ) ),
-      "Input and Output Raster's have different dimentions" );
-
-    double pixel_value;
-
-    for( int band = 0 ; band < source_params.nBands() ; ++band )
-      for( int line = 0 ; line < source_params.nlines_ ; ++line )
-        for( int column = 0 ; column < source_params.ncols_ ; ++column ) {
-          if( source_raster->getElement( column, line, pixel_value, band ) ) {
-            PDIAGN_TRUE_OR_THROW( target_raster->setElement( column, line,
-              pixel_value, band ), "Pixel copy error" );
-          }
-
-        }
-
-    return true;
-  }
-
-
-  bool TeResetRaster(TePDITypes::TePDIRasterPtrType& raster,
-      unsigned int bands, unsigned int lines, unsigned int columns,
-      TePDIRgbPalette* palette  )
-  {
-    PDIAGN_TRUE_OR_RETURN( raster.isActive(),
-      "Inactive Raster" );
-    PDIAGN_TRUE_OR_RETURN( raster->status() == TeREADYTOWRITE,
-      "Raster not ready" );
-
-    TeRasterParams params = raster->params();
-
-    params.nBands( (int) bands );
-
-    params.nlines_ = (int) lines;
-    params.ncols_ = (int) columns;
-    params.mode_ = 'c';
-    params.useDummy_ = false;
-
-    if( palette != 0 ) {
-      params.setPhotometric( TeRASTERPALETTE );
-      params.setNumberPalleteEntries( palette->size() );
-
-      TePDIRgbPalette::iterator pal_it = palette->begin();
-      TePDIRgbPalette::iterator pal_it_end = palette->end();
-
-      for( unsigned int lut_index = 0 ; lut_index < palette->size() ;
-           ++lut_index ) {
-
-        params.lutr_[ lut_index ] = (unsigned short)pal_it.red();
-        params.lutg_[ lut_index ] = (unsigned short)pal_it.green();
-        params.lutb_[ lut_index ] = (unsigned short)pal_it.blue();
-
-        ++pal_it;
-      }
-
-      params.lutr_[ palette->size() ] = 255;
-      params.lutg_[ palette->size() ] = 255;
-      params.lutb_[ palette->size() ] = 255;
-    }
-
-    PDIAGN_TRUE_OR_RETURN( raster->init( params ),
-      "Unable to init raster" );
-
-    return true;
-  }
-
-}
-
diff --git a/src/terralib/PDI/source/TePDIUtils.hpp b/src/terralib/PDI/source/TePDIUtils.hpp
deleted file mode 100644
index 1ac499e..0000000
--- a/src/terralib/PDI/source/TePDIUtils.hpp
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
-TerraLib - a library for developing GIS applications.
-Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular
-purpose. The library provided hereunder is on an "as is" basis, and the
-authors have no obligation to provide maintenance, support, updates,
-enhancements, or modifications.
-In no event shall INPE be held liable to any party
-for direct, indirect, special, incidental, or consequential damages arising
-out of the use of this library and its documentation.
-*/
-
-/**
- *   This file contains utilitary functions.
- */
-
-#ifndef TEPDIUTILS_HPP
-  #define TEPDIUTILS_HPP
-
-  #include "TePDITypes.hpp"
-
-  #include <TeRaster.h>
-
-  #include <sstream>
-  #include <string>
-  #include <iostream>
-  #include <map>
-
-  namespace TePDIUtils{
-
-    /**
-     * Data convertion to string.
-     *
-     * @param data Data to be converted.
-     * @return The converted string.
-     */
-     template< class T >
-     std::string to_string( const T& data )
-     {
-        std::stringstream temp_ss;
-        temp_ss << data;
-        return temp_ss.str();
-     }
-
-    /**
-     * Generates a discrete level-ordered histogram by interpolation, using
-     * the supplied parameters.
-     *
-     * @param in_raster Input raster.
-     * @param levels The number of interpolated levels, and if set to zero,
-     * the number of levels will be automaticlly found by using
-     * level step aproximation to one.
-     * @param band Band number.
-     * @param out_hist The generated histogram.
-     * @param force_zero_reference If true, the histogram will always
-     * start( or end ) with the zero level.
-     * @return true if the histogram has been generated, false on error.
-     */
-    bool TeGenerateHistogram(
-      TePDITypes::TePDIRasterPtrType& in_raster,
-      unsigned int levels,
-      unsigned int band,
-      TePDITypes::TePDIHistogramType& out_hist,
-      bool force_zero_reference = 0 );
-
-    /**
-     * Allocates one RAM raster using the info of another.
-     *
-     * @param template_raster Input raster.
-     * @param RAMRaster Output raster.
-     * @return true if OK. false on error.
-     */
-    bool TeAllocRAMRaster(
-      TePDITypes::TePDIRasterPtrType& template_raster,
-      TePDITypes::TePDIRasterPtrType& RAMRaster );
-
-    /**
-     * Save the raster to a GeoTIFF file.
-     *
-     * @param in_raster Input raster.
-     * @param file_name Output file name.
-     * @return true if OK. false on error.
-     */
-    bool TeRaster2Geotiff(
-      TePDITypes::TePDIRasterPtrType& in_raster,
-      const std::string& file_name );
-
-    /**
-     * Do pixel by pixel copy from on raster to another ( all bands ).
-     *
-     * @param source_raster Input raster.
-     * @param target_raster Output raster.
-     * @return true if OK. false on error.
-     */
-    bool TeCopyRasterPixels(
-      TePDITypes::TePDIRasterPtrType& source_raster,
-      TePDITypes::TePDIRasterPtrType& target_raster );
-
-    /**
-     * Reset the raster to the new parameters.
-     *
-     * If there are no decoder associated with the raster, a
-     * default MEMORY DECODER will be created.
-     *
-     * @param raster Input raster.
-     * @param bands The new number of bands.
-     * @param lines The new number of lines.
-     * @param columns The new number of columns.
-     * @param palette A palette reference, for generation of a paletted
-     * raster.
-     * @return true if OK. false on error.
-     */
-    bool TeResetRaster(
-      TePDITypes::TePDIRasterPtrType& raster,
-      unsigned int bands, unsigned int lines, unsigned int columns,
-      TePDIRgbPalette* palette = 0 );
-
-  };
-
-#endif //TEPDIUTILS_HPP
diff --git a/src/terralib/PDI/source/projects/.cvsignore b/src/terralib/PDI/source/projects/.cvsignore
deleted file mode 100644
index 550bd25..0000000
--- a/src/terralib/PDI/source/projects/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-
diff --git a/src/terralib/PDI/source/projects/base/.cvsignore b/src/terralib/PDI/source/projects/base/.cvsignore
deleted file mode 100644
index 0236094..0000000
--- a/src/terralib/PDI/source/projects/base/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-*.o
-*.obj
-
-
diff --git a/src/terralib/PDI/source/projects/base/base.pro b/src/terralib/PDI/source/projects/base/base.pro
deleted file mode 100755
index 79142f4..0000000
--- a/src/terralib/PDI/source/projects/base/base.pro
+++ /dev/null
@@ -1,52 +0,0 @@
-TEMPLATE = lib
-
-CONFIG = warn_on debug create_prl
-
-LANGUAGE = C++
-
-INCLUDEPATH = ../../../../kernel
-INCLUDEPATH += ../../../../functions
-INCLUDEPATH += ../../../../../tiff
-
-HEADERS = \
-          TePDIAgnostic.hpp \
-          TePDISharedPtr.hpp \
-          TePDIUtils.hpp \
-          TePDITypes.hpp \
-          TePDIBox.hpp \
-          TePDIRgbPalette.hpp \
-          TePDIParameters.hpp \
-          TePDIAlgorithm.hpp \
-          TePDIContrast.hpp \
-          TePDIFilter.hpp \
-          TePDIFilterMask.hpp \
-          TePDILinearFilter.hpp
-
-SOURCES = \
-          TePDIAgnostic.cpp \
-          TePDISharedPtr.cpp \
-          TePDIUtils.cpp \
-          TePDIBox.cpp \
-          TePDIRgbPalette.cpp \
-          TePDIParameters.cpp \
-          TePDIAlgorithm.cpp \
-          TePDIContrast.cpp \
-          TePDIFilter.cpp \
-          TePDIFilterMask.cpp \
-          TePDILinearFilter.cpp
-
-
-VPATH = ../..
-
-win32 {
-  INCLUDEPATH += ../../../../../STLport/
-
-  LIBS = ../../../../../../terralibw/terralib/terralib.lib
-  LIBS += ../../../../../../terralibw/tiff/tiff.lib
-}
-
-unix {
-  LIBS = -L../../../../../../terralibx/terralib -lterralib
-  LIBS += -L../../../../../../terralibx/tiff -ltiff
-}
-
diff --git a/src/terralib/PDI/source/projects/dynamic/.cvsignore b/src/terralib/PDI/source/projects/dynamic/.cvsignore
deleted file mode 100644
index f896ca9..0000000
--- a/src/terralib/PDI/source/projects/dynamic/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-Makefile
-*.obj
-*.o
-
diff --git a/src/terralib/PDI/source/projects/dynamic/dynamic.pro b/src/terralib/PDI/source/projects/dynamic/dynamic.pro
deleted file mode 100644
index 5b1a8f6..0000000
--- a/src/terralib/PDI/source/projects/dynamic/dynamic.pro
+++ /dev/null
@@ -1,17 +0,0 @@
-include( ../base/base.pro )
-
-CONFIG += dll
-
-TARGET  = ../../../bin/dynamic/terralibpdi
-
-unix {
-  QMAKE_CLEAN  += \
-    ../../../bin/dynamic/*.so.* \
-    ../../../bin/dynamic/*.prl
-}
-
-win32 {
-  QMAKE_CLEAN  += \
-    ../../../bin/dynamic/*.lib \
-    ../../../bin/dynamic/*.prl
-}
\ No newline at end of file
diff --git a/src/terralib/PDI/source/projects/projects.pro b/src/terralib/PDI/source/projects/projects.pro
deleted file mode 100755
index ea32871..0000000
--- a/src/terralib/PDI/source/projects/projects.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-
-TEMPLATE = subdirs
-
-SUBDIRS = \
-          dynamic
-
diff --git a/src/terralib/PDI/source/projects/static/.cvsignore b/src/terralib/PDI/source/projects/static/.cvsignore
deleted file mode 100644
index f896ca9..0000000
--- a/src/terralib/PDI/source/projects/static/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-Makefile
-*.obj
-*.o
-
diff --git a/src/terralib/PDI/source/projects/static/static.pro b/src/terralib/PDI/source/projects/static/static.pro
deleted file mode 100644
index 5146d03..0000000
--- a/src/terralib/PDI/source/projects/static/static.pro
+++ /dev/null
@@ -1,17 +0,0 @@
-include( ../base/base.pro )
-
-CONFIG  += staticlib
-
-TARGET  = ../../../bin/static/terralibpdi
-
-unix {
-  QMAKE_CLEAN  += \
-    ../../../bin/static/*.so.* \
-    ../../../bin/static/*.prl
-}
-
-win32 {
-  QMAKE_CLEAN  += \
-    ../../../bin/static/*.lib \
-    ../../../bin/static/*.prl
-}
\ No newline at end of file
diff --git a/src/terralib/PDI/source/source.pro b/src/terralib/PDI/source/source.pro
deleted file mode 100755
index 3b1affe..0000000
--- a/src/terralib/PDI/source/source.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-
-TEMPLATE = subdirs
-
-SUBDIRS = \
-          projects
-
diff --git a/src/terralib/PDI/tests/.cvsignore b/src/terralib/PDI/tests/.cvsignore
deleted file mode 100644
index f3c7a7c..0000000
--- a/src/terralib/PDI/tests/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Makefile
diff --git a/src/terralib/PDI/tests/bin/.cvsignore b/src/terralib/PDI/tests/bin/.cvsignore
deleted file mode 100644
index 620ec53..0000000
--- a/src/terralib/PDI/tests/bin/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-*.tif
-Te*
-
diff --git a/src/terralib/PDI/tests/resources/.cvsignore b/src/terralib/PDI/tests/resources/.cvsignore
deleted file mode 100644
index 8b13789..0000000
--- a/src/terralib/PDI/tests/resources/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/src/terralib/PDI/tests/source/.cvsignore b/src/terralib/PDI/tests/source/.cvsignore
deleted file mode 100644
index 550bd25..0000000
--- a/src/terralib/PDI/tests/source/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-
diff --git a/src/terralib/PDI/tests/source/TePDIContrast/.cvsignore b/src/terralib/PDI/tests/source/TePDIContrast/.cvsignore
deleted file mode 100644
index ac63e51..0000000
--- a/src/terralib/PDI/tests/source/TePDIContrast/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-Makefile
-*.o
-*.obj
diff --git a/src/terralib/PDI/tests/source/TePDIContrast/TePDIContrast.pro b/src/terralib/PDI/tests/source/TePDIContrast/TePDIContrast.pro
deleted file mode 100755
index d36c036..0000000
--- a/src/terralib/PDI/tests/source/TePDIContrast/TePDIContrast.pro
+++ /dev/null
@@ -1,7 +0,0 @@
-include( ../base/base.pro )
-
-SOURCES += \
-  TePDIContrast_test.cpp
-
-QMAKE_CLEAN += \
-  ../../bin/TePDIContrast*
diff --git a/src/terralib/PDI/tests/source/TePDIContrast/TePDIContrast_test.cpp b/src/terralib/PDI/tests/source/TePDIContrast/TePDIContrast_test.cpp
deleted file mode 100644
index 96d60db..0000000
--- a/src/terralib/PDI/tests/source/TePDIContrast/TePDIContrast_test.cpp
+++ /dev/null
@@ -1,346 +0,0 @@
-#include <TePDIContrast.hpp>
-#include <TePDIParameters.hpp>
-#include <TePDIUtils.hpp>
-#include <TePDIRgbPalette.hpp>
-
-#include <TeRaster.h>
-#include <TeDataTypes.h>
-#include <TeDecoderTIFF.h>
-#include <TeInitRasterDecoders.h>
-
-#include <TePDIAgnostic.hpp>
-
-#include <string>
-
-void TePDIContrastMinMax_test()
-{
-  TePDIParameters params;
-
-  int contrast_type = TePDIContrast::TePDIContrastMinMax;
-  params.SetParameter( "contrast_type", contrast_type );
-
-  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
-    std::string( "../resources/cbers_b2_crop.tif" ), 'r' ) );
-  PDIAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
-  params.SetParameter( "input_image", inRaster );
-
-  TePDITypes::TePDIRasterPtrType outRaster;
-  PDIAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( inRaster,
-    outRaster ), "RAM Raster Alloc error" );
-  params.SetParameter( "output_image", outRaster );
-
-  std::vector<int> channels;
-  channels.push_back( 0 );
-  params.SetParameter( "channels", channels );
-
-  params.SetParameter( "histo_levels", (int)256 );
-
-  TePDIContrast contra;
-
-  PDIAGN_TRUE_OR_THROW( contra.Reset( params ),
-    "Invalid Parameters" );
-
-  PDIAGN_TRUE_OR_THROW( contra.Apply(),
-    "Apply error" );
-
-  PDIAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
-    "TePDIContrastMinMax_test.tif" ), "GeoTIF generation error" );
-}
-
-
-void TePDIContrastLinear_test()
-{
-  TePDIParameters params;
-
-  int contrast_type = TePDIContrast::TePDIContrastLinear;
-  params.SetParameter( "contrast_type", contrast_type );
-
-  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
-    std::string( "../resources/cbers_b2_crop.tif" ), 'r' ) );
-  PDIAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
-  params.SetParameter( "input_image", inRaster );
-
-  TePDITypes::TePDIRasterPtrType outRaster;
-  PDIAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( inRaster,
-    outRaster ), "RAM Raster Alloc error" );
-  params.SetParameter( "output_image", outRaster );
-
-  std::vector<int> channels;
-  channels.push_back( 0 );
-  params.SetParameter( "channels", channels );
-
-  params.SetParameter( "histo_levels", (int)256 );
-
-  params.SetParameter( "min_level", (double)46 );
-  params.SetParameter( "max_level", (double)102 );
-
-  TePDIContrast contra;
-
-  PDIAGN_TRUE_OR_THROW( contra.Reset( params ),
-    "Invalid Parameters" );
-
-  PDIAGN_TRUE_OR_THROW( contra.Apply(),
-    "Apply error" );
-
-  PDIAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
-    "TePDIContrastLinear_test.tif" ), "GeoTIF generation error" );
-}
-
-void TePDIContrastSquareRoot_test()
-{
-  TePDIParameters params;
-
-  int contrast_type = TePDIContrast::TePDIContrastSquareRoot;
-  params.SetParameter( "contrast_type", contrast_type );
-
-  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
-    std::string( "../resources/cbers_b2_crop.tif" ), 'r' ) );
-  PDIAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
-  params.SetParameter( "input_image", inRaster );
-
-  TePDITypes::TePDIRasterPtrType outRaster;
-  PDIAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( inRaster,
-    outRaster ), "RAM Raster Alloc error" );
-  params.SetParameter( "output_image", outRaster );
-
-  std::vector<int> channels;
-  channels.push_back( 0 );
-  params.SetParameter( "channels", channels );
-
-  params.SetParameter( "histo_levels", (int)256 );
-
-  params.SetParameter( "min_level", (double)46 );
-  params.SetParameter( "max_level", (double)102 );
-
-  TePDIContrast contra;
-
-  PDIAGN_TRUE_OR_THROW( contra.Reset( params ),
-    "Invalid Parameters" );
-
-  PDIAGN_TRUE_OR_THROW( contra.Apply(),
-    "Apply error" );
-
-  PDIAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
-    "TePDIContrastSquareRoot_test.tif" ), "GeoTIF generation error" );
-}
-
-void TePDIContrastSquare_test()
-{
-  TePDIParameters params;
-
-  int contrast_type = TePDIContrast::TePDIContrastSquare;
-  params.SetParameter( "contrast_type", contrast_type );
-
-  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
-    std::string( "../resources/cbers_b2_crop.tif" ), 'r' ) );
-  PDIAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
-  params.SetParameter( "input_image", inRaster );
-
-  TePDITypes::TePDIRasterPtrType outRaster;
-  PDIAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( inRaster,
-    outRaster ), "RAM Raster Alloc error" );
-  params.SetParameter( "output_image", outRaster );
-
-  std::vector<int> channels;
-  channels.push_back( 0 );
-  params.SetParameter( "channels", channels );
-
-  params.SetParameter( "histo_levels", (int)256 );
-
-  params.SetParameter( "min_level", (double)46 );
-  params.SetParameter( "max_level", (double)102 );
-
-  TePDIContrast contra;
-
-  PDIAGN_TRUE_OR_THROW( contra.Reset( params ),
-    "Invalid Parameters" );
-
-  PDIAGN_TRUE_OR_THROW( contra.Apply(),
-    "Apply error" );
-
-  PDIAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
-    "TePDIContrastSquare_test.tif" ), "GeoTIF generation error" );
-}
-
-void TePDIContrastLog_test()
-{
-  TePDIParameters params;
-
-  int contrast_type = TePDIContrast::TePDIContrastLog;
-  params.SetParameter( "contrast_type", contrast_type );
-
-  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
-    std::string( "../resources/cbers_b2_crop.tif" ), 'r' ) );
-  PDIAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
-  params.SetParameter( "input_image", inRaster );
-
-  TePDITypes::TePDIRasterPtrType outRaster;
-  PDIAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( inRaster,
-    outRaster ), "RAM Raster Alloc error" );
-  params.SetParameter( "output_image", outRaster );
-
-  std::vector<int> channels;
-  channels.push_back( 0 );
-  params.SetParameter( "channels", channels );
-
-  params.SetParameter( "histo_levels", (int)256 );
-
-  params.SetParameter( "min_level", (double)46 );
-  params.SetParameter( "max_level", (double)102 );
-
-  TePDIContrast contra;
-
-  PDIAGN_TRUE_OR_THROW( contra.Reset( params ),
-    "Invalid Parameters" );
-
-  PDIAGN_TRUE_OR_THROW( contra.Apply(),
-    "Apply error" );
-
-  PDIAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
-    "TePDIContrastLog_test.tif" ), "GeoTIF generation error" );
-}
-
-void TePDIContrastNegative_test()
-{
-  TePDIParameters params;
-
-  int contrast_type = TePDIContrast::TePDIContrastNegative;
-  params.SetParameter( "contrast_type", contrast_type );
-
-  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
-    std::string( "../resources/cbers_b2_crop.tif" ), 'r' ) );
-  PDIAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
-  params.SetParameter( "input_image", inRaster );
-
-  TePDITypes::TePDIRasterPtrType outRaster;
-  PDIAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( inRaster,
-    outRaster ), "RAM Raster Alloc error" );
-  params.SetParameter( "output_image", outRaster );
-
-  std::vector<int> channels;
-  channels.push_back( 0 );
-  params.SetParameter( "channels", channels );
-
-  params.SetParameter( "histo_levels", (int)256 );
-
-  params.SetParameter( "min_level", (double)46 );
-  params.SetParameter( "max_level", (double)102 );
-
-  TePDIContrast contra;
-
-  PDIAGN_TRUE_OR_THROW( contra.Reset( params ),
-    "Invalid Parameters" );
-
-  PDIAGN_TRUE_OR_THROW( contra.Apply(),
-    "Apply error" );
-
-  PDIAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
-    "TePDIContrastNegative_test.tif" ), "GeoTIF generation error" );
-}
-
-void TePDIContrastHistEqualizer_test()
-{
-  TePDIParameters params;
-
-  int contrast_type = TePDIContrast::TePDIContrastHistEqualizer;
-  params.SetParameter( "contrast_type", contrast_type );
-
-  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
-    std::string( "../resources/cbers_b2_crop.tif" ), 'r' ) );
-  PDIAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
-  params.SetParameter( "input_image", inRaster );
-
-  TePDITypes::TePDIRasterPtrType outRaster;
-  PDIAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( inRaster,
-    outRaster ), "RAM Raster Alloc error" );
-  params.SetParameter( "output_image", outRaster );
-
-  std::vector<int> channels;
-  channels.push_back( 0 );
-  params.SetParameter( "channels", channels );
-
-  params.SetParameter( "histo_levels", (int)256 );
-
-  params.SetParameter( "min_level", (double)46 );
-  params.SetParameter( "max_level", (double)102 );
-
-  TePDIContrast contra;
-
-  PDIAGN_TRUE_OR_THROW( contra.Reset( params ),
-    "Invalid Parameters" );
-
-  PDIAGN_TRUE_OR_THROW( contra.Apply(),
-    "Apply error" );
-
-  PDIAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
-    "TePDIContrastHistEqualizer_test.tif" ), "GeoTIF generation error" );
-}
-
-void TePDIContrastSimpleSlicer_test()
-{
-  TePDIParameters params;
-
-  int contrast_type = TePDIContrast::TePDIContrastSimpleSlicer;
-  params.SetParameter( "contrast_type", contrast_type );
-
-  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
-    std::string( "../resources/cbers_b2_crop.tif" ), 'r' ) );
-  PDIAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
-  params.SetParameter( "input_image", inRaster );
-
-  TePDITypes::TePDIRasterPtrType outRaster;
-  PDIAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( inRaster,
-    outRaster ), "RAM Raster Alloc error" );
-  params.SetParameter( "output_image", outRaster );
-
-  std::vector<int> channels;
-  channels.push_back( 0 );
-  params.SetParameter( "channels", channels );
-
-  params.SetParameter( "histo_levels", (int)( 102 - 47 + 1 ) );
-
-  params.SetParameter( "min_level", (double)47 );
-  params.SetParameter( "max_level", (double)102 );
-
-  TePDIRgbPalette::pointer pal =
-    TePDIRgbPalette::createLB( 20 );
-  params.SetParameter( "rgb_palette", pal );
-
-  TePDIContrast contra;
-
-  PDIAGN_TRUE_OR_THROW( contra.Reset( params ),
-    "Invalid Parameters" );
-
-  PDIAGN_TRUE_OR_THROW( contra.Apply(),
-    "Apply error" );
-
-  PDIAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
-    "TePDIContrastSimpleSlicer_test.tif" ), "GeoTIF generation error" );
-}
-
-int main()
-{
-  PDIAGN_LOGMSG( "Test started." );
-
-  PDIAGN_DEBUG_MODE_CHECK;
-
-  try{
-    TeInitRasterDecoders();
-
-    TePDIContrastMinMax_test();
-    TePDIContrastLinear_test();
-    TePDIContrastSquareRoot_test();
-    TePDIContrastSquare_test();
-    TePDIContrastLog_test();
-    TePDIContrastNegative_test();
-    TePDIContrastHistEqualizer_test();
-    TePDIContrastSimpleSlicer_test();
-  }
-  catch(...){
-    PDIAGN_LOGERR( "Test Failed.");
-    return EXIT_FAILURE;
-  }
-
-  PDIAGN_LOGMSG( "Test OK." );
-  return EXIT_SUCCESS;
-}
diff --git a/src/terralib/PDI/tests/source/TePDIParameters/.cvsignore b/src/terralib/PDI/tests/source/TePDIParameters/.cvsignore
deleted file mode 100644
index ac63e51..0000000
--- a/src/terralib/PDI/tests/source/TePDIParameters/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-Makefile
-*.o
-*.obj
diff --git a/src/terralib/PDI/tests/source/TePDIParameters/TePDIParameters.pro b/src/terralib/PDI/tests/source/TePDIParameters/TePDIParameters.pro
deleted file mode 100755
index 6295733..0000000
--- a/src/terralib/PDI/tests/source/TePDIParameters/TePDIParameters.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-include( ../base/base.pro )
-
-SOURCES += TePDIParameters_test.cpp
-
-QMAKE_CLEAN += \
-  ../../bin/TePDIParameters
diff --git a/src/terralib/PDI/tests/source/TePDIParameters/TePDIParameters_test.cpp b/src/terralib/PDI/tests/source/TePDIParameters/TePDIParameters_test.cpp
deleted file mode 100644
index bb5eba1..0000000
--- a/src/terralib/PDI/tests/source/TePDIParameters/TePDIParameters_test.cpp
+++ /dev/null
@@ -1,103 +0,0 @@
-#include <TePDIParameters.hpp>
-
-#include <TePDIAgnostic.hpp>
-
-#include <TeRaster.h>
-
-#include <stdlib.h>
-#include <iostream>
-
-int main()
-{
-  PDIAGN_LOGMSG( "Test started." );
-
-  PDIAGN_DEBUG_MODE_CHECK;
-
-  try{
-    /* Integer type test */
-
-    TePDIParameters tparam;
-
-    tparam.SetParameter( std::string("param_name_1"), (int)1 );
-    tparam.SetParameter( std::string("param_name_2"), (int)2 );
-
-    PDIAGN_TRUE_OR_THROW( tparam.CheckParameter( "param_name_1",
-      TePDIParameters::TePDIIntParam ),
-      "Parameter checking error for param_name_1" );
-
-    PDIAGN_TRUE_OR_THROW( tparam.CheckParameter( "param_name_2",
-      TePDIParameters::TePDIIntParam ),
-      "Parameter checking error for param_name_2" );
-
-    PDIAGN_TRUE_OR_THROW( false == tparam.CheckParameter(
-      "param_name_unknown", TePDIParameters::TePDIIntParam ),
-      "Unknown Parameter checking error" );
-
-    int temp_v1 = 0;
-    int temp_v2 = 0;
-
-    PDIAGN_TRUE_OR_THROW( tparam.GetParameter( "param_name_1", temp_v1 ),
-      "Invalid param_name_1 GET" );
-
-    PDIAGN_TRUE_OR_THROW( temp_v1 == 1,
-      "param_name_1 value checking" );
-
-    PDIAGN_TRUE_OR_THROW( tparam.GetParameter( "param_name_2", temp_v2 ),
-      "Invalid param_name_2 GET" );
-
-    PDIAGN_TRUE_OR_THROW( temp_v2 == 2,
-      "param_name_2 value checking" );
-
-    /* Vector type test */
-
-    std::vector< int > temp_vector_1;
-    temp_vector_1.push_back( 1 );
-
-    tparam.SetParameter( "temp_vector_1", temp_vector_1 );
-
-    std::vector< int > temp_vector_2;
-
-    PDIAGN_TRUE_OR_THROW(
-      tparam.GetParameter( "temp_vector_1", temp_vector_2 ),
-      "Invalid temp_vector_1 GET" );
-
-    PDIAGN_TRUE_OR_THROW( temp_vector_2.size() != 0,
-      "Invalid temp_vector_2.size()" );
-
-    /* Raster type test */
-
-    TePDISharedPtr < TeRaster > rast1( new TeRaster( 0, 0, 0, TeDOUBLE ) );
-
-    tparam.SetParameter( "rast1", rast1 );
-
-    TePDISharedPtr < TeRaster > rast2( new TeRaster( 0, 0, 0, TeDOUBLE ) );
-
-    PDIAGN_TRUE_OR_THROW(
-      tparam.GetParameter( "rast1", rast2 ),
-      "Invalid rast1 GET" );
-
-    /* Copy operator test */
-
-    TePDIParameters tparam2;
-
-    tparam2 = tparam;
-
-    PDIAGN_TRUE_OR_THROW( tparam2.GetParameter( "param_name_1", temp_v1 ),
-      "Invalid param_name_1 GET" );
-
-    PDIAGN_TRUE_OR_THROW(
-      tparam2.GetParameter( "temp_vector_1", temp_vector_2 ),
-      "Invalid temp_vector_1 GET" );
-
-    PDIAGN_TRUE_OR_THROW(
-      tparam2.GetParameter( "rast1", rast2 ),
-      "Invalid rast1 GET" );
-  }
-  catch(...){
-    PDIAGN_LOGERR( "Test Failed.");
-    return EXIT_FAILURE;
-  }
-
-  PDIAGN_LOGMSG( "Test OK." );
-  return EXIT_SUCCESS;
-}
diff --git a/src/terralib/PDI/tests/source/TePDISharedPtr/.cvsignore b/src/terralib/PDI/tests/source/TePDISharedPtr/.cvsignore
deleted file mode 100644
index ac63e51..0000000
--- a/src/terralib/PDI/tests/source/TePDISharedPtr/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-Makefile
-*.o
-*.obj
diff --git a/src/terralib/PDI/tests/source/TePDISharedPtr/TePDISharedPtr.pro b/src/terralib/PDI/tests/source/TePDISharedPtr/TePDISharedPtr.pro
deleted file mode 100755
index 3d079de..0000000
--- a/src/terralib/PDI/tests/source/TePDISharedPtr/TePDISharedPtr.pro
+++ /dev/null
@@ -1,7 +0,0 @@
-include( ../base/base.pro )
-
-SOURCES += \
-           TePDISharedPtr_test.cpp
-
-QMAKE_CLEAN += \
-  ../../bin/TePDISharedPtr
diff --git a/src/terralib/PDI/tests/source/TePDISharedPtr/TePDISharedPtr_test.cpp b/src/terralib/PDI/tests/source/TePDISharedPtr/TePDISharedPtr_test.cpp
deleted file mode 100644
index bc33663..0000000
--- a/src/terralib/PDI/tests/source/TePDISharedPtr/TePDISharedPtr_test.cpp
+++ /dev/null
@@ -1,65 +0,0 @@
-
-#include <TePDIAgnostic.hpp>
-
-#include <TePDISharedPtr.cpp>
-
-#include <string>
-
-int main()
-{
-  PDIAGN_LOGMSG( "Test started." );
-
-  PDIAGN_DEBUG_MODE_CHECK;
-
-  try{
-    TePDISharedPtr< int > sptr1( new int );
-
-    *sptr1 = 12345;
-
-    TePDISharedPtr< int > sptr2;
-
-    sptr2 = sptr1;
-
-    *sptr2 = 54321;
-
-    PDIAGN_TRUE_OR_THROW( *sptr2 == 54321,
-      "Invalid pointer 2 reference" );
-
-    PDIAGN_TRUE_OR_THROW( *sptr1 == 54321,
-      "Invalid pointer 1 reference" );
-
-    sptr1.reset( new int );
-
-    *sptr1 = 6789;
-
-    PDIAGN_TRUE_OR_THROW( *sptr1 == 6789,
-      "Invalid pointer 1 reference" );
-
-    PDIAGN_TRUE_OR_THROW( *sptr2 == 54321,
-      "Invalid pointer 2 reference" );
-
-    TePDISharedPtr< int > sptr3( sptr2 );
-
-    PDIAGN_TRUE_OR_THROW( *sptr3 == 54321,
-      "Invalid pointer 2 reference" );
-
-    /* Static shared pointer test */
-
-    int temp_int = 54321;
-    int* temp_int_ptr = &temp_int;
-
-    if( true ) {
-      TePDISharedPtr< int > sptr4( temp_int_ptr, true );
-    }
-
-    PDIAGN_TRUE_OR_THROW( *temp_int_ptr == 54321,
-      "Invalid naked pointer reference" );
-  }
-  catch(...){
-    PDIAGN_LOGERR( "Test Failed.");
-    return EXIT_FAILURE;
-  }
-
-  PDIAGN_LOGMSG( "Test OK." );
-  return EXIT_SUCCESS;
-}
diff --git a/src/terralib/PDI/tests/source/TePDIUtils/.cvsignore b/src/terralib/PDI/tests/source/TePDIUtils/.cvsignore
deleted file mode 100644
index ac63e51..0000000
--- a/src/terralib/PDI/tests/source/TePDIUtils/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-Makefile
-*.o
-*.obj
diff --git a/src/terralib/PDI/tests/source/TePDIUtils/TePDIUtils.pro b/src/terralib/PDI/tests/source/TePDIUtils/TePDIUtils.pro
deleted file mode 100755
index 8e41e21..0000000
--- a/src/terralib/PDI/tests/source/TePDIUtils/TePDIUtils.pro
+++ /dev/null
@@ -1,10 +0,0 @@
-include( ../base/base.pro )
-
-SOURCES += TePDIUtils_test.cpp
-
-QMAKE_CLEAN += \
-  ../../bin/TePDIUtils \
-  ../../bin/TeRaster2Geotiff_test.tif \
-  ../../bin/TeAllocRAMRaster_test.tif \
-  ../../bin/TeResetRaster_test.tif
-
diff --git a/src/terralib/PDI/tests/source/TePDIUtils/TePDIUtils_test.cpp b/src/terralib/PDI/tests/source/TePDIUtils/TePDIUtils_test.cpp
deleted file mode 100644
index 56a421d..0000000
--- a/src/terralib/PDI/tests/source/TePDIUtils/TePDIUtils_test.cpp
+++ /dev/null
@@ -1,119 +0,0 @@
-#include <TePDIUtils.hpp>
-
-//#include <TeRaster.h>
-//#include <TeDataTypes.h>
-//#include <TeDecoderTIFF.h>
-#include <TeInitRasterDecoders.h>
-
-#include <TePDIAgnostic.hpp>
-
-#include <string>
-
-void TeGenerateHistogram_test()
-{
-  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
-    std::string( "../resources/cbers_b2_crop.tif" ), 'r' ) );
-
-  PDIAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
-
-  TePDITypes::TePDIHistogramType out_hist;
-
-  PDIAGN_TRUE_OR_THROW(
-    TePDIUtils::TeGenerateHistogram(inRaster, 0, 0, out_hist, true ),
-    "Histogram generation error" );
-
-  PDIAGN_CHECK_EQUAL( out_hist.size(), 256,
-    "Invalid Generated histogram" );
-
-  int pixels = 0;
-
-  TePDITypes::TePDIHistogramType::iterator hist_it = out_hist.begin();
-  TePDITypes::TePDIHistogramType::iterator hist_it_end = out_hist.end();
-
-  while( hist_it != hist_it_end ) {
-    pixels += hist_it->second;
-
-    ++hist_it;
-  }
-
-  PDIAGN_CHECK_EQUAL( pixels, inRaster->params().nlines_ *
-    inRaster->params().ncols_, "Invalid Generated historgram" );
-
-}
-
-void TeRaster2Geotiff_test()
-{
-  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
-    std::string( "../resources/cbers_b2_crop.tif" ), 'r' ) );
-
-  PDIAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
-
-  PDIAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( inRaster,
-    "TeRaster2Geotiff_test.tif" ), "GeoTIF generation error" );
-}
-
-void TeAllocRAMRaster_test()
-{
-  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
-    std::string( "../resources/cbers_b2_crop.tif" ), 'r' ) );
-
-  PDIAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
-
-  TePDITypes::TePDIRasterPtrType RAMRaster;
-
-  PDIAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( inRaster, RAMRaster ),
-    "RAM Raster Allocation error" );
-
-  PDIAGN_TRUE_OR_THROW( TePDIUtils::TeCopyRasterPixels( inRaster, RAMRaster ),
-    "Raster pixel copy error" );
-
-  PDIAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( RAMRaster,
-    "TeAllocRAMRaster_test.tif" ), "GeoTIF generation error" );
-}
-
-void TeResetRaster_test()
-{
-  TePDITypes::TePDIRasterPtrType inRaster( new TeRaster(
-    std::string( "../resources/cbers_b2_crop.tif" ), 'r' ) );
-
-  PDIAGN_TRUE_OR_THROW( inRaster->init(), "Unable to init inRaster" );
-
-  TePDITypes::TePDIRasterPtrType outRaster(
-    new TeRaster( inRaster->params().ncols_, inRaster->params().nlines_,
-    inRaster->nBands(), TeUNSIGNEDCHAR ) );
-  PDIAGN_TRUE_OR_THROW( outRaster->init(), "Unable to init outRaster" );
-
-  PDIAGN_TRUE_OR_THROW( TePDIUtils::TeResetRaster( outRaster,
-    inRaster->nBands(), inRaster->params().nlines_,
-    inRaster->params().ncols_ ), "Raster reset error" );
-
-  PDIAGN_TRUE_OR_THROW(
-    TePDIUtils::TeCopyRasterPixels( inRaster, outRaster ),
-    "Raster pixel copy error" );
-
-  PDIAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( outRaster,
-    "TeResetRaster_test.tif" ), "GeoTIF generation error" );
-}
-
-int main()
-{
-  PDIAGN_LOGMSG( "Test started." );
-
-  PDIAGN_DEBUG_MODE_CHECK;
-
-  try{
-    TeInitRasterDecoders();
-
-    TeGenerateHistogram_test();
-    TeRaster2Geotiff_test();
-    TeAllocRAMRaster_test();
-    TeResetRaster_test();
-  }
-  catch(...){
-    PDIAGN_LOGERR( "Test Failed.");
-    return EXIT_FAILURE;
-  }
-
-  PDIAGN_LOGMSG( "Test OK." );
-  return EXIT_SUCCESS;
-}
diff --git a/src/terralib/PDI/tests/source/base/.cvsignore b/src/terralib/PDI/tests/source/base/.cvsignore
deleted file mode 100644
index 139597f..0000000
--- a/src/terralib/PDI/tests/source/base/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
diff --git a/src/terralib/PDI/tests/source/base/base.pro b/src/terralib/PDI/tests/source/base/base.pro
deleted file mode 100755
index 8b1ca8e..0000000
--- a/src/terralib/PDI/tests/source/base/base.pro
+++ /dev/null
@@ -1,27 +0,0 @@
-
-INCLUDEPATH = ../../../source
-INCLUDEPATH += ../../../../kernel
-INCLUDEPATH += ../../../../../tiff
-
-CONFIG = warn_on debug link_prl
-
-LANGUAGE = C++
-
-DESTDIR = ../../bin
-
-win32 {
-  TEMPLATE = vcapp
-
-  LIBS = ../../../bin/static/terralibpdi.lib
-}
-
-unix {
-  TEMPLATE = app
-
-  LIBS = -L../../../bin/dynamic -lterralibpdi
-}
-
-
-
-
-
diff --git a/src/terralib/PDI/tests/source/source.pro b/src/terralib/PDI/tests/source/source.pro
deleted file mode 100755
index 70d5dd9..0000000
--- a/src/terralib/PDI/tests/source/source.pro
+++ /dev/null
@@ -1,10 +0,0 @@
-
-TEMPLATE = subdirs
-
-SUBDIRS = \
-          TePDIParameters \
-          TePDIUtils \
-          TePDISharedPtr \
-          TePDIContrast
-
-
diff --git a/src/terralib/PDI/tests/tests.pro b/src/terralib/PDI/tests/tests.pro
deleted file mode 100755
index 0635acc..0000000
--- a/src/terralib/PDI/tests/tests.pro
+++ /dev/null
@@ -1,7 +0,0 @@
-
-TEMPLATE = subdirs
-
-SUBDIRS = \
-          source
-
-
diff --git a/src/terralib/application/TeApplicationUtils.cpp b/src/terralib/application/TeApplicationUtils.cpp
deleted file mode 100644
index 94c7e02..0000000
--- a/src/terralib/application/TeApplicationUtils.cpp
+++ /dev/null
@@ -1,409 +0,0 @@
-/************************************************************************************
-TerraView - visualization and exploration of geographical databases
-using TerraLib.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-This file is part of TerraView. TerraView is free software; you can redistribute it 
-and/or modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-You should have received a copy of the GNU General Public License
-along with TerraView.
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The software provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use of
-this program and its documentation.
-*************************************************************************************/
-
-#include "TeApplicationUtils.h"
-#include "TeSlice.h"
-#include "TeDatabase.h"
-#include "TeDatabaseUtils.h"
-#include "TeColorUtils.h"
-
-template<class iterator> extern void
-TeGroupByEqualStep(iterator, iterator, int , vector<TeSlice>& , int);
-
-extern void TeGroupByUniqueValue(vector<string>& vec, TeAttrDataType tipo, vector<TeSlice>& result, int precision);
-
-bool generateCountLegends(TeThemeApplication* theme, string table, string field)
-{
-	if(theme == 0)
-		return false;
-
-	theme->groupObjects(TeAll);
-	TeAttributeRep rep;
-	rep.name_ = table + "." + field;
-	rep.type_ = TeINT;
-	
-	TeGrouping* group = new TeGrouping();
-	group->groupAttribute_ = rep;
-	group->groupNormAttribute_ = "";
-	group->groupMode_ = TeUniqueValue;
-	group->groupPrecision_ = 0;
-	theme->grouping(group);
-	
-	string	scor = "Cy-G-Y-Or-R";
-	theme->groupColor(scor);
-	theme->countObj(true);
-	theme->mixColor(true);
-	theme->groupColorDir(TeColorAscSatEnd);
-	
-	string	fieldId = theme->collectionTable() + ".c_object_id";
-	TeLayer* layer = theme->layer();
-	TeDatabase* db = layer->database();
-    vector<TeSlice> result;
-	vector<string> valVec;
-	vector<string> idVec;
-
-	string sel = "SELECT " + fieldId + ", " + field + theme->sqlFrom() + " ORDER BY " + field;
-
-	TeDatabasePortal* portal = db->getPortal();
-	if(portal->query(sel) == false)
-	{
-		delete portal;
-		return false;
-	}
-
-	while(portal->fetchRow())
-	{
-		string objectId = portal->getData(0);
-		string val = portal->getData(1);
-		if (val.empty() == false)
-		{
-			valVec.push_back(val);
-			idVec.push_back(objectId);
-		}
-	}
-	delete portal;
-
-	if(valVec.size()==0)
-		return false;
-
-	TeGroupByUniqueValue(valVec, TeINT, result, 0);
-	theme->grouping()->groupNumSlices_ = result.size();
-
-	vector<string> colorRamps;
-	colorRamps.push_back("CYAN");
-	colorRamps.push_back("GREEN");
-	colorRamps.push_back("YELLOW");
-	colorRamps.push_back("ORANGE");
-	colorRamps.push_back("RED");
-	vector<TeColor> colorVec;
-	getColors(colorRamps,10, colorVec);
-
-	TeVisual visual;
-	if((layer->geomRep() & TePOLYGONS) || (layer->geomRep() & TeCELLS))
-		visual = theme->defaultLegend().visual(TePOLYGONS);
-	else if((layer->geomRep() & TeLINES))
-		visual = theme->defaultLegend().visual(TeLINES);
-	else if((layer->geomRep() & TePOINTS))
-		visual = theme->defaultLegend().visual(TePOINTS);
-
-	TeLegendEntryVector legVec;
-	unsigned int i, j = 0;
-	for(i = 0; i < result.size(); i++)
-	{
-		TeColor cor = colorVec[i];
-		visual.color(cor);
-
-		TeLegendEntry leg;
-		leg.from(result[i].from_);
-		leg.to(result[i].to_);
-		if((layer->geomRep() & TePOLYGONS) || (layer->geomRep() & TeCELLS))
-			leg.setVisual(visual, TePOLYGONS);
-		else if((layer->geomRep() & TeLINES))
-			leg.setVisual(visual, TeLINES);
-		else if((layer->geomRep() & TePOINTS))
-			leg.setVisual(visual, TePOINTS);
-
-		int count = 0;
-		while(j < valVec.size())
-		{
-			if(valVec[j] == leg.from())
-			{
-				count++;
-				j++;
-			}
-			else
-				break;
-		}
-		leg.count(count);
-		leg.group(i);
-		leg.theme(theme->id());
-		string label = leg.from();
-		leg.label(label);
-		legVec.push_back(leg);
-	}
-
-	colorRamps.clear();
-	colorVec.clear();
-
-	db->deleteLegend(theme->id());
-	map<int, vector<string> > legMap;
-	for(i=j=0; i<legVec.size(); i++)
-	{
-		theme->legend().push_back(legVec[i]);
-		if (db->insertLegend(&(theme->legend()[i])) == false)
-			return false;
-
-		vector<string> ids;
-		TeLegendEntry& leg = theme->legend()[i];
-		while(j < valVec.size())
-		{
-			if(valVec[j] == leg.from())
-			{
-				ids.push_back(idVec[j]);
-				j++;
-			}
-			else
-				break;
-		}
-		legMap[leg.id()] = ids;
-	}
-
-	map<int, vector<string> > :: iterator it = legMap.begin();
-	while(it != legMap.end())
-	{
-		vector<string>::iterator itB = it->second.begin();
-		vector<string>::iterator itE = it->second.end();
-		vector<string> svec = generateInClauses(itB,itE,db);				
-
-		for(i=0; i<svec.size(); i++)
-		{
-			string up = "UPDATE " + theme->collectionTable() + " SET c_legend_id = " + Te2String(it->first);
-			up += " WHERE c_object_id IN " + svec[i];
-
-			if(db->execute(up) == false)
-				return false;
-		}
-		it++;
-	}
-
-	if(theme->legend().size())
-		theme->visibleRep(theme->visibleRep() | 0x40000000);
-	else
-		theme->visibleRep(theme->visibleRep() & 0xbfffffff);
-
-	if((db->updateGrouping (theme->id(), theme->grouping())) == false)
-		return false;
-
-	return(updateThemeApplication(db, theme));
-}
-
-void changeObjectStatus(ObjectInfo& info, string& uniqueId, string mode, int pointed)
-{
-	if(uniqueId.empty())
-	{
-		if(mode == "pointing")
-			info.status_ ^= 0x1; // toggle least significant bit
-		else if(mode == "shiftAndPointing")
-		{
-			if(pointed == 1)
-				info.status_ |= 0x1; // set least significant bit
-			else
-				info.status_ &= 0x2; // reset least significant bit
-		}
-		return;
-	}
-
-	int& gs = info.uniqueMap_[uniqueId];
-	int	os;
-
-	if(mode == "pointing")
-	{
-		gs ^= 0x1; // toggle least significant bit
-
-		set<int> statusSet;
-		map<string, int>::iterator it = info.uniqueMap_.begin();
-		while(it != info.uniqueMap_.end())
-		{
-			statusSet.insert(it->second);
-			it++;
-		}
-		if(statusSet.find(3) != statusSet.end())
-			os = 3;
-		else if(statusSet.find(2) != statusSet.end() && statusSet.find(1) != statusSet.end())
-			os = 3;
-		else if(statusSet.find(2) != statusSet.end() && statusSet.find(1) == statusSet.end())
-			os = 2;
-		else if(statusSet.find(2) == statusSet.end() && statusSet.find(1) != statusSet.end())
-			os = 1;
-		else
-			os = 0;
-	}
-	else if(mode == "shiftAndPointing")
-	{
-		if(pointed == 1)
-			gs |= 0x1; // set least significant bit
-		else
-			gs &= 0x2; // reset least significant bit
-
-		set<int> statusSet;
-		map<string, int>::iterator it = info.uniqueMap_.begin();
-		while(it != info.uniqueMap_.end())
-		{
-			statusSet.insert(it->second);
-			it++;
-		}
-		if(statusSet.find(3) != statusSet.end())
-			os = 3;
-		else if(statusSet.find(2) != statusSet.end() && statusSet.find(1) != statusSet.end())
-			os = 3;
-		else if(statusSet.find(2) != statusSet.end() && statusSet.find(1) == statusSet.end())
-			os = 2;
-		else if(statusSet.find(2) == statusSet.end() && statusSet.find(1) != statusSet.end())
-			os = 1;
-		else
-			os = 0;
-	}
-
-	info.status_ = os;
-}
-
-bool saveObjectStatus(TeThemeApplication *theme, set<string>& objectSet, map<string, ObjectInfo>& objectMap)
-{
-	unsigned int i;
-    int os, gs;
-	string	q, oid, uid;
-	TeDatabase *db = theme->layer()->database();
-	map<int, vector<string> > sameObjectStMap;
-	map<int, vector<string> > sameGridStMap;
-
-	set<string>::iterator setIt = objectSet.begin();
-	while(setIt != objectSet.end())
-	{
-		oid = *setIt;
-		ObjectInfo& info = objectMap[oid];
-		os = info.status_;
-		sameObjectStMap[os].push_back(oid);
-
-		map<string, int>& gridMap = info.uniqueMap_;
-		map<string, int>::iterator gridIt = gridMap.begin();
-		while(gridIt != gridMap.end())
-		{
-			uid = gridIt->first;
-			gs = gridIt->second;
-			sameGridStMap[gs].push_back(uid);
-			gridIt++;
-		}
-		setIt++;
-	}
-
-	string qUpdate = "UPDATE " + theme->collectionTable();
-	map<int, vector<string> >::iterator it;
-	for (it = sameObjectStMap.begin(); it != sameObjectStMap.end(); ++it)
-	{
-		vector<string>::iterator itB = it->second.begin();
-		vector<string>::iterator itE = it->second.end();
-		vector<string> inClauseVector = generateInClauses(itB,itE,db);				
-		for (i = 0; i < inClauseVector.size(); ++i)
-		{
-			q = qUpdate + " SET c_object_status = " + Te2String(it->first);
-			q += " WHERE c_object_id IN " + inClauseVector[i];
-
-			if (db->execute(q) == false)
-				return false;
-		}
-	}
-
-
-	qUpdate = "UPDATE " + theme->collectionAuxTable();
-	for (it = sameGridStMap.begin(); it != sameGridStMap.end(); ++it)
-	{
-		vector<string>::iterator itB = it->second.begin();
-		vector<string>::iterator itE = it->second.end();
-		vector<string> inClauseVector = generateInClauses(itB,itE,db);				
-		for (i = 0; i < inClauseVector.size(); ++i)
-		{
-			q = qUpdate + " SET grid_status = " + Te2String(it->first);
-			q += " WHERE unique_id IN " + inClauseVector[i];
-
-			if (db->execute(q) == false)
-				return false;
-		}
-	}
-	return true;
-}
-
-string getStringFromStatistic(TeStatisticType sType)
-{
-	string ss;
-
-	if(sType == TeSUM)
-		ss = "SUM";
-	else if(sType == TeMAXVALUE)
-		ss = "MAXVALUE";
-	else if(sType == TeMINVALUE)
-		ss = "MINVALUE";
-	else if(sType == TeCOUNT)
-		ss = "COUNT";
-	else if(sType == TeVALIDCOUNT)
-		ss = "VALIDCOUNT";
-	else if(sType == TeSTANDARDDEVIATION)
-		ss = "STANDARDDEVIATION";
-	else if(sType == TeKERNEL)
-		ss = "KERNEL";
-	else if(sType == TeMEAN)
-		ss = "MEAN";
-	else if(sType == TeVARIANCE)
-		ss = "VARIANCE";
-	else if(sType == TeSKEWNESS)
-		ss = "SKEWNESS";
-	else if(sType == TeKURTOSIS)
-		ss = "KURTOSIS";
-	else if(sType == TeAMPLITUDE)
-		ss = "AMPLITUDE";
-	else if(sType == TeMEDIAN)
-		ss = "MEDIAN";
-	else if(sType == TeVARCOEFF)
-		ss = "VARCOEFF";
-	else if(sType == TeMODE)
-		ss = "MODE";
-
-	return ss;
-}
-
-TeStatisticType getStatisticFromString(const string& s)
-{
-	TeStatisticType sType;
-
-	if(s == "TeSUM")
-		sType = TeSUM;
-	else if(s == "TeMAXVALUE")
-		sType = TeMAXVALUE;
-	else if(s == "TeMINVALUE")
-		sType = TeMINVALUE;
-	else if(s == "TeCOUNT")
-		sType = TeCOUNT;
-	else if(s == "TeVALIDCOUNT")
-		sType = TeVALIDCOUNT;
-	else if(s == "TeSTANDARDDEVIATION")
-		sType = TeSTANDARDDEVIATION;
-	else if(s == "TeKERNEL")
-		sType = TeKERNEL;
-	else if(s == "TeMEAN")
-		sType = TeMEAN;
-	else if(s == "TeVARIANCE")
-		sType = TeVARIANCE;
-	else if(s == "TeSKEWNESS")
-		sType = TeSKEWNESS;
-	else if(s == "TeKURTOSIS")
-		sType = TeKURTOSIS;
-	else if(s == "TeAMPLITUDE")
-		sType = TeAMPLITUDE;
-	else if(s == "TeMEDIAN")
-		sType = TeMEDIAN;
-	else if(s == "TeVARCOEFF")
-		sType = TeVARCOEFF;
-	else if(s == "TeMODE")
-		sType = TeMODE;
-
-	return sType;
-}
-	
-	
diff --git a/src/terralib/application/TeApplicationUtils.h b/src/terralib/application/TeApplicationUtils.h
deleted file mode 100644
index 2df0412..0000000
--- a/src/terralib/application/TeApplicationUtils.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/************************************************************************************
-TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The library provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use
-of this library and its documentation.
-*************************************************************************************/
-/*! \file TeApplicationUtils.h
-    This contains some utilitary functions to deal with TerraLib databases
-*/
-#ifndef  __TERRALIB_INTERNAL_APPLICATIONUTILS_H
-#define  __TERRALIB_INTERNAL_APPLICATIONUTILS_H
-
-#include "TeThemeApplication.h"
-#include "TeVisual.h"
-#include "TeDatabase.h"
-
-#include <string>
-#include <vector>
-#include <set>
-using namespace std;
-
-struct ObjectInfo
-{
-	int	status_;						// collection: c_object_status
-	map<string, int> uniqueMap_;	// uniqueId to grid status (collection: grid_status)
-};
-
-//! Breaks a collection of strings into a series of IN clauses to be used in query expressions
-/*
-	\params begin Iterator that p oints to the beginning of the collection
-	\params end Iterator that points to the end of the collection
-	\param db pointer to the database where the query expression will be applied
-	\param addPlicae flat to indicate that the character ' should enclose each string
-*/
-template <typename Iterator>
-vector<string>
-generateInClauses(Iterator& begin, Iterator& end, TeDatabase* db, bool addPlicae=true)
-{
-	int i, chunkSize = 200;
-	string inClause;
-	vector<string> inClauseVector;
-
-	Iterator temp = begin;
-	i = 0;
-	while (temp != end)
-	{
-		if (i%chunkSize == 0)
-		{
-			if (!inClause.empty())
-			{
-				inClause[inClause.size() - 1] = ')';
-				inClauseVector.push_back(inClause);
-				inClause.clear();
-			}
-			inClause = "(";
-		}
-
-		if (addPlicae)
-			inClause += "'" + db->escapeSequence(*temp) + "',";
-		else
-			inClause += db->escapeSequence(*temp) + ",";
-		i++;
-		++temp;
-	}
-	if (!inClause.empty())
-	{
-		inClause[inClause.size() - 1] = ')';
-		inClauseVector.push_back(inClause);
-	}
-	return inClauseVector;
-}
-
-//! generate Count legends 
-bool generateCountLegends(TeThemeApplication* theme, string table, string field);
-
-void changeObjectStatus(ObjectInfo& info, string& uniqueId, string mode, int pointed = 1);
-
-bool saveObjectStatus(TeThemeApplication *theme, set<string>& objectSet, map<string, ObjectInfo>& objectMap);
-
-string getStringFromStatistic (TeStatisticType st);
-
-TeStatisticType getStatisticFromString(const string& s);
-
-#endif
-
-
diff --git a/src/terralib/application/TeColorUtils.cpp b/src/terralib/application/TeColorUtils.cpp
deleted file mode 100644
index e688c14..0000000
--- a/src/terralib/application/TeColorUtils.cpp
+++ /dev/null
@@ -1,198 +0,0 @@
-/************************************************************************************
-TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The library provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use
-of this library and its documentation.
-*************************************************************************************/
-#include "TeColorUtils.h"
-
-bool getColors(TeDatabase* db, vector<string>& ramps, int nc, bool asc, vector<TeColor> &colors)
-{
-	if (!db)
-		return false;
-
-	TeDatabasePortal* portal = db->getPortal();
-	if (!portal)
-		return false;
-
-	if (ramps.empty())
-		ramps.push_back("RED");
-
-	vector<TeColor> allColors;
-
-	unsigned int i;
-	for (i=0; i<ramps.size(); i++)
-	{
-		string	query = "SELECT red, green, blue FROM te_color_scheme";
-		if (asc)
-			query = query + " WHERE ramp_name = '" + ramps[i] + "' ORDER BY color_order ASC";
-		else
-			query = query + " WHERE ramp_name = '" + ramps[i] + "' ORDER BY color_order DESC";
-	
-		TeColor color;
-		if (portal->query(query))
-		{
-			while(portal->fetchRow())
-			{
-				color.name_ = ramps[i];
-				color.red_ = portal->getInt(0);
-				color.green_ = portal->getInt(1);
-				color.blue_ = portal->getInt(2);
-				allColors.push_back(color);
-			}
-		}
-		portal->freeResult();
-	}
-	delete portal;
-
-	double step = 0.;
-	if (nc > 1)
-		step = (double)(allColors.size()) / (double)(nc-1);
-	for (int j=0; j<nc; j++)
-	{
-		int ind = (int)(step * (double)j + .5);
-		if(ind > (int)(allColors.size() - 1))
-			ind = allColors.size() - 1;
-		colors.push_back(allColors[ind]);
-	}
-	allColors.clear();
-	return true;
-}
-
-bool getColors(vector<string>& ramps, int nc, vector<TeColor> &colors)
-{
-	if (ramps.empty())
-		ramps.push_back("RED");
-
-	TeColor	RGB;
-	map<string, TeColor> mapcor;
-
-	RGB.name_ = "RED";
-	RGB.red_ = 240;
-	RGB.green_ = 0;
-	RGB.blue_ = 0;
-	mapcor["RED"] = RGB;
-
-	RGB.name_ = "GREEN";
-	RGB.red_ = 0;
-	RGB.green_ = 240;
-	RGB.blue_ = 0;
-	mapcor["GREEN"] = RGB;
-
-	RGB.name_ = "BLUE";
-	RGB.red_ = 0;
-	RGB.green_ = 0;
-	RGB.blue_ = 240;
-	mapcor["BLUE"] = RGB;
-
-	RGB.name_ = "YELLOW";
-	RGB.red_ = 255;
-	RGB.green_ = 255;
-	RGB.blue_ = 100;
-	mapcor["YELLOW"] = RGB;
-
-	RGB.name_ = "CYAN";
-	RGB.red_ = 100;
-	RGB.green_ = 255;
-	RGB.blue_ = 255;
-	mapcor["CYAN"] = RGB;
-
-	RGB.name_ = "MAGENTA";
-	RGB.red_ = 255;
-	RGB.green_ = 100;
-	RGB.blue_ = 255;
-	mapcor["MAGENTA"] = RGB;
-
-	RGB.name_ = "ORANGE";
-	RGB.red_ = 255;
-	RGB.green_ = 140;
-	RGB.blue_ = 0;
-	mapcor["ORANGE"] = RGB;
-
-	RGB.name_ = "GRAY";
-	RGB.red_ = 240;
-	RGB.green_ = 240;
-	RGB.blue_ = 240;
-	mapcor["GRAY"] = RGB;
-
-	RGB.name_ = "BLACK";
-	RGB.red_ = 0;
-	RGB.green_ = 0;
-	RGB.blue_ = 0;
-	mapcor["BLACK"] = RGB;
-
-	int	ii, jj;
-	int n = 200;
-	
-	TeColor cfrom = mapcor[ramps[0]];
-	TeColor	cto, cor;
-
-	vector<TeColor> allColors;
-	if (ramps.size() == 1)
-	{
-		cto.red_ = cfrom.red_ / 5;
-		cto.green_ = cfrom.green_ / 5;
-		cto.blue_ = cfrom.blue_ / 5;
-		double dr = (double)(cto.red_ - cfrom.red_) / (double)n;
-		double dg = (double)(cto.green_ - cfrom.green_) / (double)n;
-		double db = (double)(cto.blue_ - cfrom.blue_) / (double)n;
-
-		for(jj=0; jj<n; jj++)
-		{
-			cor.red_ = cfrom.red_ + (int)(dr * (double)jj);
-			cor.green_ = cfrom.green_ + (int)(dg * (double)jj);
-			cor.blue_ = cfrom.blue_ + (int)(db * (double)jj);
-			allColors.push_back(cor);
-		}
-	}
-	else
-	{
-		ii = 1;
-		while(ii < (int)ramps.size())
-		{
-			cto = mapcor[ramps[ii]];
-
-			double dr = (double)(cto.red_ - cfrom.red_) / (double)n;
-			double dg = (double)(cto.green_ - cfrom.green_) / (double)n;
-			double db = (double)(cto.blue_ - cfrom.blue_) / (double)n;
-
-			for(jj=0; jj<n; jj++)
-			{
-				cor.red_ = cfrom.red_ + (int)(dr * (double)jj);
-				cor.green_ = cfrom.green_ + (int)(dg * (double)jj);
-				cor.blue_ = cfrom.blue_ + (int)(db * (double)jj);
-				allColors.push_back(cor);
-			}
-			cfrom = cto;
-			ii++;
-		}
-	}
-	double step = 0.;
-	if (nc > 1)
-		step = (double)(allColors.size()) / (double)(nc-1);
-	for (int i=0; i<nc; i++)
-	{
-		int ind = (int)(step * (double)i + .5);
-		if (ind > (int)(allColors.size() - 1))
-			ind = allColors.size() - 1;
-		colors.push_back(allColors[ind]);
-	}
-	allColors.clear();
-	return true;
-}
diff --git a/src/terralib/application/TeColorUtils.h b/src/terralib/application/TeColorUtils.h
deleted file mode 100644
index f52483d..0000000
--- a/src/terralib/application/TeColorUtils.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/************************************************************************************
-TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The library provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use
-of this library and its documentation.
-*************************************************************************************/
-#ifndef  __TERRALIB_INTERNAL_COLORUTILS_H
-#define  __TERRALIB_INTERNAL_COLORUTILS_H
-
-#include "TeVisual.h"
-#include "TeDatabase.h"
-
-#include <vector>
-#include <string>
-
-//! Generates a graduated color scale following a set of color ramps, based on a color scheme table stored in a TerraLib database
-/*!
-	\param db pointer do a TerraLib database
-	\param ramps vector with the sequence color ramps used to build the scale 
-	\param nc desired number of colors on the scale
-	\param asc flag to indicate that within each ramp goes from light to dark colors
-	\param colors resulting color scale
-	\returns true if color scale was successfully generated and false otherwise
-*/
-bool getColors(TeDatabase* db, vector<string>& ramps, int nc, bool asc, vector<TeColor> &colors);
-
-
-//! Generates a graduated color scale following a set of color ramps
-/*!
-	\param ramps vector with the sequence color ramps used to build the scale 
-	\param nc desired number of colors on the scale
-	\param colors resulting color scale
-	\returns true if color scale was successfully generated and false otherwise
-	\note the available ramps are "RED", "GREEN", "BLUE", "YELLOW", "CYAN", "MAGENTA", "GRAY" and  "BLACK"
-*/
-bool getColors(vector<string>& ramps, int nc, vector<TeColor> &colors);
-
-#endif
-
-
-
-
diff --git a/src/terralib/application/TeDatabaseUtils.cpp b/src/terralib/application/TeDatabaseUtils.cpp
deleted file mode 100644
index 17ddd8f..0000000
--- a/src/terralib/application/TeDatabaseUtils.cpp
+++ /dev/null
@@ -1,3269 +0,0 @@
-/************************************************************************************
-TerraView - visualization and exploration of geographical databases
-using TerraLib.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-This file is part of TerraView. TerraView is free software; you can redistribute it 
-and/or modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-You should have received a copy of the GNU General Public License
-along with TerraView.
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The software provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use of
-this program and its documentation.
-*************************************************************************************/
-
-#include "TeDatabaseUtils.h"
-#include "TeApplicationUtils.h"
-#include "TeDatabase.h"
-#include "TeTable.h"
-#include "TeKernelParams.h"
-#include "TeLayerFunctions.h"
-#include "TeErrorLog.h"
-#include "TeStatistics.h"
-
-#include <algorithm>
-
-using std::string;
-
-bool createColorSchemeTable(TeDatabase* db, const string& tname)
-{
-	string table;
-
-	if (!db)
-		return false;
-	if (tname.empty())
-		table = "te_color_scheme";
-	else
-		table = tname;
-
-	TeAttributeList attList;
-
-	TeAttribute at1;
-	at1.rep_.type_ = TeSTRING;
-	at1.rep_.numChar_ = 50;
-	at1.rep_.name_ = "ramp_name";
-	at1.rep_.isPrimaryKey_ = true;
-	attList.push_back(at1);	
-	
-	TeAttribute at2;
-	at2.rep_.type_ = TeINT;
-	at2.rep_.name_ = "color_order";
-	at2.rep_.isPrimaryKey_ = true;
-	attList.push_back(at2);	
-	
-	TeAttribute at3;
-	at3.rep_.type_ = TeINT;
-	at3.rep_.name_ = "red";
-	attList.push_back(at3);	
-	
-	
-	TeAttribute at4;
-	at4.rep_.type_ = TeINT;
-	at4.rep_.name_ = "green";
-	attList.push_back(at4);	
-	
-	TeAttribute at5;
-	at5.rep_.type_ = TeINT;
-	at5.rep_.name_ = "blue";
-	attList.push_back(at5);	
-	
-	bool status = db->createTable(table,attList);
-	attList.clear();
-	return status;
-}
-
-bool createChartParamsTable(TeDatabase* db, bool integrity)
-{
-	if (!db)
-		return false;
-	
-	string table = "te_chart_params";
-	
-	TeAttributeList attList;
-
-	TeAttribute at5;
-	at5.rep_.type_ = TeINT;
-	at5.rep_.name_ = "theme_id";
-	at5.rep_.isPrimaryKey_ = true;
-	attList.push_back(at5);	
-	
-	TeAttribute at1;
-	at1.rep_.type_ = TeSTRING;
-	at1.rep_.numChar_ = 50;
-	at1.rep_.name_ = "attr_name";
-	at1.rep_.isPrimaryKey_ = true;
-	attList.push_back(at1);	
-	
-	TeAttribute at2;
-	at2.rep_.type_ = TeINT;
-	at2.rep_.name_ = "red";
-	attList.push_back(at2);	
-	
-	TeAttribute at3;
-	at3.rep_.type_ = TeINT;
-	at3.rep_.name_ = "blue";
-	attList.push_back(at3);	
-	
-	TeAttribute at4;
-	at4.rep_.type_ = TeINT;
-	at4.rep_.name_ = "green";
-	attList.push_back(at4);	
-	
-	bool status = db->createTable(table,attList);
-	attList.clear();
-
-	if(status && integrity)
-	{
-		if(db->tableExist ("te_theme_application"))
-		{
-			if (!db->createRelation("fk_chartpar_theme_id", "te_chart_params", "theme_id", "te_theme_application", "theme_id", true))
-				return false;
-		}
-		else
-			return false;
-	}
-	return status;
-}
-
-
-bool createThemeApplicationTable(TeDatabase* db, bool integrity)
-{
-	if (!db)
-		return false;
-	
-	string table = "te_theme_application";
-	
-	TeAttributeList attList;
-
-	TeAttribute at1;
-	at1.rep_.type_ = TeINT;
-	at1.rep_.name_ = "theme_id";
-	at1.rep_.isPrimaryKey_ = true;
-	attList.push_back(at1);
-	
-	TeAttribute at2;
-	at2.rep_.type_ = TeINT;
-	at2.rep_.name_ = "visible_out_coll";
-	attList.push_back(at2);	
-	
-	TeAttribute at3;
-	at3.rep_.type_ = TeINT;
-	at3.rep_.name_ = "visible_without_conn";
-	attList.push_back(at3);	
-
-	TeAttribute at31;
-	at31.rep_.type_ = TeSTRING;
-	at31.rep_.numChar_ = 255;
-	at31.rep_.name_ = "refine_attribute_where";
-	attList.push_back(at31);	
-
-	TeAttribute at32;
-	at32.rep_.type_ = TeSTRING;
-	at32.rep_.numChar_ = 255;
-	at32.rep_.name_ = "refine_spatial_where";
-	attList.push_back(at32);	
-
-	TeAttribute at33;
-	at33.rep_.type_ = TeSTRING;
-	at33.rep_.numChar_ = 255;
-	at33.rep_.name_ = "refine_temporal_where";
-	attList.push_back(at33);	
-
-	TeAttribute at4;
-	at4.rep_.type_ = TeSTRING;
-	at4.rep_.numChar_ = 50;
-	at4.rep_.name_ = "grouping_color";
-	attList.push_back(at4);	
-
-	TeAttribute at5;
-	at5.rep_.type_ = TeINT;
-	at5.rep_.name_ = "grouping_color_direction";
-	attList.push_back(at5);	
-
-	TeAttribute at6;
-	at6.rep_.type_ = TeINT;
-	at6.rep_.name_ = "grouping_objects";
-	attList.push_back(at6);	
-
-	TeAttribute at7;
-	at7.rep_.type_ = TeREAL;
-	at7.rep_.name_ = "pie_diameter";
-	attList.push_back(at7);	
-
-	TeAttribute at8;
-	at8.rep_.type_ = TeREAL;
-	at8.rep_.name_ = "pie_max_diameter";
-	attList.push_back(at8);	
-
-	TeAttribute at9;
-	at9.rep_.type_ = TeREAL;
-	at9.rep_.name_ = "pie_min_diameter";
-	attList.push_back(at9);	
-
-	TeAttribute at10;
-	at10.rep_.type_ = TeSTRING;
-	at10.rep_.numChar_ = 255;
-	at10.rep_.name_ = "pie_dimension_attr";
-	attList.push_back(at10);	
-
-	TeAttribute at11;
-	at11.rep_.type_ = TeREAL;
-	at11.rep_.name_ = "bar_max_height";
-	attList.push_back(at11);	
-
-	TeAttribute at12;
-	at12.rep_.type_ = TeREAL;
-	at12.rep_.name_ = "bar_min_height";
-	attList.push_back(at12);	
-
-	TeAttribute at13;
-	at13.rep_.type_ = TeREAL;
-	at13.rep_.name_ = "bar_width";
-	attList.push_back(at13);	
-
-	TeAttribute at14;
-	at14.rep_.type_ = TeREAL;
-	at14.rep_.name_ = "chart_max_value";
-	attList.push_back(at14);	
-
-	TeAttribute at15;
-	at15.rep_.type_ = TeREAL;
-	at15.rep_.name_ = "chart_min_value";
-	attList.push_back(at15);	
-
-	TeAttribute at16;
-	at16.rep_.type_ = TeINT;
-	at16.rep_.name_ = "chart_type";
-	attList.push_back(at16);	
-
-	TeAttribute at17;
-	at17.rep_.type_ = TeINT;
-	at17.rep_.name_ = "chart_objects";
-	attList.push_back(at17);
-	 
-	TeAttribute at18;
-	at18.rep_.type_ = TeINT;
-	at18.rep_.name_ = "keep_dimension";
-	attList.push_back(at18);
-
-	TeAttribute at19;
-	at19.rep_.type_ = TeINT;
-	at19.rep_.name_ = "show_canvas_leg";
-	attList.push_back(at19);
-
-	TeAttribute at20;
-	at20.rep_.type_ = TeREAL;
-	at20.rep_.name_ = "canvas_leg_x";
-	attList.push_back(at20);
-
-	TeAttribute at21;
-	at21.rep_.type_ = TeREAL;
-	at21.rep_.name_ = "canvas_leg_y";
-	attList.push_back(at21);
-
-	TeAttribute at22;
-	at22.rep_.type_ = TeINT;
-	at22.rep_.name_ = "mix_color";
-	attList.push_back(at22);
-
-	TeAttribute at23;
-	at23.rep_.type_ = TeINT;
-	at23.rep_.name_ = "count_obj";
-	attList.push_back(at23);
-
-	TeAttribute at24;
-	at24.rep_.type_ = TeSTRING;
-	at24.rep_.name_ = "text_table";
-	at24.rep_.numChar_ = 50;
-	attList.push_back(at24);
-	
-	TeAttribute at26;
-	at26.rep_.type_ = TeSTRING;
-	at26.rep_.name_ = "chart_function";
-	at26.rep_.numChar_ = 10;
-	attList.push_back(at26);
-	
-	bool status = db->createTable(table,attList);
-	attList.clear();
-	
-	if(status && integrity)
-	{
-		if (!db->createRelation("fk_themeAppl_theme_id", "te_theme_application", "theme_id", "te_theme", "theme_id", true))
-			return false;
-	}
-	return status;
-}
-
-
-bool populateThemeApplicationTable(TeDatabase* db)
-{
-	string sel, ins; 
-	
-	if(db->dbmsName()=="MySQL") //MySQL doesn�t support NOT EXISTS  
-	{
-		sel = " SELECT theme_id FROM te_theme ";
-	}
-	else
-	{
-		ins  = " INSERT INTO te_theme_application (theme_id) ";
-		ins += " SELECT t.theme_id FROM te_theme t ";
-		ins += " WHERE NOT EXISTS ";
-		ins += " ( SELECT ta.theme_id FROM ";
-		ins += " te_theme_application ta ";
-		ins += " WHERE ta.theme_id = t.theme_id ) ";
-
-		return (db->execute(ins));
-	}
-	
-	TeDatabasePortal* portal = db->getPortal();
-	if(!portal)
-		return false;
-
-	if(!portal->query(sel))
-	{
-		delete portal;
-		return false;
-	}
-
-	if(!portal->fetchRow())
-	{
-		delete portal;
-		return true;
-	}
-
-	do 
-	{
-		ins  = " INSERT INTO te_theme_application (theme_id) VALUES (";
-		ins += string(portal->getData(0));
-		ins += " )";
-		
-		db->execute(ins);
-
-	} while(portal->fetchRow());
-
-	delete portal;
-	return true;
-}
-
-
-bool createMediaTable(TeDatabase* db, const string& tname)
-{
-	if (!db)
-		return false;
-	
-	TeAttributeList attList;
-
-	TeAttribute at1;
-	at1.rep_.type_ = TeSTRING;
-	at1.rep_.numChar_ = 255;
-	at1.rep_.name_ = "media_name";
-	at1.rep_.isPrimaryKey_ = true;
-	attList.push_back(at1);	
-
-	TeAttribute at2;
-	at2.rep_.type_ = TeSTRING;
-	at2.rep_.numChar_ = 50;
-	at2.rep_.name_ = "media_type";
-	attList.push_back(at2);	
-
-	TeAttribute at3;
-	at3.rep_.type_ = TeSTRING;
-	at3.rep_.numChar_ = 255;
-	at3.rep_.name_ = "description";
-	attList.push_back(at3);
-	
-	TeAttribute at4;
-	at4.rep_.type_ = TeBLOB;
-	at4.rep_.name_ = "media_blob";
-	attList.push_back(at4);	
-	
-	TeAttribute at5;
-	at5.rep_.type_ = TeSTRING;
-	at5.rep_.numChar_ = 255;
-	at5.rep_.name_ = "media_path";
-	attList.push_back(at5);
-	
-	vector<string> pkeys;
-	pkeys.push_back("media_name");
-	
-	bool status = db->createTable(tname,attList);
-	attList.clear();
-	return status;
-}
-
-
-bool createLayerMediaTable(TeDatabase* db, int layerId, const string& tname)
-{
-	if (!db)
-		return false;
-	
-	TeAttributeList attList;
-
-	TeAttribute at1;
-	at1.rep_.type_ = TeSTRING;
-	at1.rep_.numChar_ = 50;
-	at1.rep_.name_ = "object_id";
-	at1.rep_.isPrimaryKey_ = true;
-	attList.push_back(at1);	
-
-	TeAttribute at3;
-	at3.rep_.type_ = TeSTRING;
-	at3.rep_.numChar_ = 255;
-	at3.rep_.name_ = "media_name";
-	at3.rep_.isPrimaryKey_ = true;
-	attList.push_back(at3);
-	
-	TeAttribute at2;
-	at2.rep_.type_ = TeSTRING;
-	at2.rep_.numChar_ = 50;
-	at2.rep_.name_ = "media_table";
-	at2.rep_.isPrimaryKey_ = true;
-	attList.push_back(at2);	
-
-	TeAttribute at4;
-	at4.rep_.type_ = TeINT;
-	at4.rep_.name_ = "show_default";
-	attList.push_back(at4);	
-	
-	if(!db->createTable(tname,attList))
-	{
-		attList.clear();
-		return false;
-	}
-
-	//insert in te_layer_table
-	TeTable table(tname, attList,"object_id", "object_id", TeAttrMedia);
-	
-	bool status = db->insertTableInfo(layerId, table); 
-	db->layerMap()[layerId]->addAttributeTable (table);
-		
-	attList.clear();
-	return status;
-}
-
-bool createKernelMetadataTable(TeDatabase* db)
-{
-	if (!db)
-		return false;
-	
-	TeAttributeList attList;
-
-	TeAttribute at1;
-	at1.rep_.type_ = TeINT;
-	at1.rep_.name_ = "kernel_id";
-	at1.rep_.isPrimaryKey_ = true;
-	at1.rep_.isAutoNumber_ = true;
-	attList.push_back(at1);	
-
-	TeAttribute at2;
-	at2.rep_.type_ = TeINT;
-	at2.rep_.name_ = "event_theme_id_1";
-	attList.push_back(at2);	
-	
-	TeAttribute at3;
-	at3.rep_.type_ = TeSTRING;
-	at3.rep_.numChar_ = 255;
-	at3.rep_.name_ = "intensity_attr_name_1";
-	attList.push_back(at3);
-	
-	TeAttribute at4;
-	at4.rep_.type_ = TeSTRING;
-	at4.rep_.numChar_ = 255;
-	at4.rep_.name_ = "intensity_attr_table_1";
-	attList.push_back(at4);
-
-	TeAttribute at5;
-	at5.rep_.type_ = TeINT;
-	at5.rep_.name_ = "kernel_function_1";
-	attList.push_back(at5);	
-
-	TeAttribute at6;
-	at6.rep_.type_ = TeINT;
-	at6.rep_.name_ = "compute_type_1";
-	attList.push_back(at6);	
-
-	TeAttribute at7;
-	at7.rep_.type_ = TeREAL;
-	at7.rep_.name_ = "radius_value_1";
-	attList.push_back(at7);	
-
-	TeAttribute at8;
-	at8.rep_.type_ = TeINT;
-	at8.rep_.name_ = "combination_type";
-	attList.push_back(at8);	
-
-	TeAttribute at9;
-	at9.rep_.type_ = TeINT;
-	at9.rep_.name_ = "event_theme_id_2";
-	attList.push_back(at9);	
-	
-	TeAttribute at10;
-	at10.rep_.type_ = TeSTRING;
-	at10.rep_.numChar_ = 255;
-	at10.rep_.name_ = "intensity_attr_name_2";
-	attList.push_back(at10);
-	
-	TeAttribute at11;
-	at11.rep_.type_ = TeSTRING;
-	at11.rep_.numChar_ = 255;
-	at11.rep_.name_ = "intensity_attr_table_2";
-	attList.push_back(at11);
-
-	TeAttribute at12;
-	at12.rep_.type_ = TeINT;
-	at12.rep_.name_ = "kernel_function_2";
-	attList.push_back(at12);	
-
-	TeAttribute at13;
-	at13.rep_.type_ = TeINT;
-	at13.rep_.name_ = "compute_type_2";
-	attList.push_back(at13);	
-
-	TeAttribute at14;
-	at14.rep_.type_ = TeREAL;
-	at14.rep_.name_ = "radius_value_2";
-	attList.push_back(at14);
-	
-	TeAttribute at15;
-	at15.rep_.type_ = TeINT;
-	at15.rep_.name_ = "support_theme_id";
-	attList.push_back(at15);
-
-	TeAttribute at17;
-	at17.rep_.type_ = TeSTRING;
-	at17.rep_.numChar_ = 255;
-	at17.rep_.name_ = "support_theme_table";
-	attList.push_back(at17);
-
-	TeAttribute at18;
-	at18.rep_.type_ = TeSTRING;
-	at18.rep_.numChar_ = 255;
-	at18.rep_.name_ = "support_theme_attr";
-	attList.push_back(at18);
-
-	TeAttribute at19;
-	at19.rep_.type_ = TeINT;
-	at19.rep_.name_ = "generated_layer_id";
-	attList.push_back(at19);
-
-	if(!db->createTable("te_kernel_metadata",attList))
-	{
-		attList.clear();
-		return false;
-	}
-
-	db->createIndex("te_kernel_metadata", "kernel_meta_ind1", "support_theme_id, support_theme_table, support_theme_attr");
-	db->createIndex("te_kernel_metadata", "kernel_meta_ind2", "generated_layer_id");
-
-	return true;
-}
-
-
-bool insertMedia(TeDatabase* bd, const string& tableName, string fileName, const string& description, const string& type, bool blob)
-{
-	string ins;
-	if(blob)
-	{
-		 if(bd->dbmsName()!="OracleSpatial")
-		 {
-			ins = "  INSERT INTO "+ tableName +" (media_name, media_type, description) ";
-			ins += " VALUES (";
-			ins += "'"+ fileName + "'";
-			ins += ", '"+ type +"'";
-			ins += ", '"+ description +"'";
-			ins += ")";
-		 }
-		 else
-		 {
-			ins = "  INSERT INTO "+ tableName +" (media_name, media_type, description, media_blob) ";
-			ins += " VALUES (";
-			ins += "'"+ fileName + "'";
-			ins += ", '"+ type +"'";
-			ins += ", '"+ description +"'";
-			ins += ", EMPTY_BLOB()";
-			ins += " )";
-		 }
-	}
-	else
-	{
-		 ins = "  INSERT INTO "+ tableName +" (media_name, media_type, description, media_path) ";
-		 ins += " VALUES (";
-		 ins += "'"+ fileName + "'";
-		 ins += ", '"+ type +"'";
-		 ins += ", '"+ description +"'";
-		 ins += ", '"+ fileName +"'";
-		 ins += ")";
-	}
-
-	if(!bd->execute (ins))
-		return false;
-
-	//insert blob
-	TeAttributeRep rep;
-	rep.name_ = "media_name";
-	rep.type_ = TeSTRING;
-
-	if(blob)
-	{
-		if(!bd->insertBlob (tableName, "media_blob", rep, fileName, fileName))
-			return false;
-	}
-
-	return true;
-}
-
-bool insertMediaObjLayer (TeDatabase* db, TeLayer* layer, const string& objectId, const string& mediaName, const string& mediaTable)
-{
-	string table = layer->mediaTable();
-	int show = 0;
-
-	string ins = "  INSERT INTO "+ table +" (object_id, media_name, media_table, show_default) ";
-	ins += " VALUES (";
-	ins += "'"+  objectId + "'";
-	ins += ", '"+ mediaName +"'";
-	ins += ", '"+ mediaTable +"'";
-	ins += ", "+ Te2String(show);
-	ins += ")";
-
-	if(!db->execute (ins))
-		return false;
-
-	return true;
-}
-
-bool insertKernelMetadata(TeDatabase* db, TeKernelParams& kernelPar)
-{
-	string ins = " INSERT INTO te_kernel_metadata (event_theme_id_1, intensity_attr_name_1, ";
-	ins += " intensity_attr_table_1, kernel_function_1, compute_type_1, radius_value_1, ";
-	ins += " combination_type, event_theme_id_2, intensity_attr_name_2, intensity_attr_table_2, ";
-	ins += " kernel_function_2, compute_type_2, radius_value_2, support_theme_id,  ";
-	ins += " support_theme_table, support_theme_attr, generated_layer_id)";
-	ins += " VALUES ( ";
-	ins += Te2String(kernelPar.eventThemeId1_) + ",";
-	ins += "'"+ kernelPar.intensityAttrName1_ + "',";
-	ins += "'"+ kernelPar.intensityAttrTable1_ + "',";
-	ins += Te2String((int)kernelPar.kernelFunction1_) + ",";
-	ins += Te2String((int)kernelPar.computeType1_) + ",";
-	ins += Te2String(kernelPar.radiusValue1_) + ",";
-	ins += Te2String((int)kernelPar.combinationType_) + ",";
-	ins += Te2String(kernelPar.eventThemeId2_) + ",";
-	ins += "'"+ kernelPar.intensityAttrName2_ + "',";
-	ins += "'"+ kernelPar.intensityAttrTable2_ + "',";
-	ins += Te2String((int)kernelPar.kernelFunction2_) + ",";
-	ins += Te2String((int)kernelPar.computeType2_) + ",";
-	ins += Te2String(kernelPar.radiusValue2_) + ",";
-	ins += Te2String(kernelPar.supportThemeId_)+ ",";
-	ins += "'"+ kernelPar.supportThemeTable_+ "',";
-	ins += "'"+ kernelPar.supportThemeAttr_+ "',";
-	ins += Te2String(kernelPar.generatedLayerId_);
-	ins += ")";
-
-	if(!db->execute (ins))
-		return false;
-
-	return true;
-}
-
-
-bool updateKernelMetadata(TeDatabase* db, TeKernelParams& kernelPar)
-{
-  string del = "DELETE FROM te_kernel_metadata WHERE support_theme_id = ";
-  del += Te2String(kernelPar.supportThemeId_);
-
-  if (!db->execute(del)) 
-  {
-    return false;
-  }
-
-  return insertKernelMetadata(db,kernelPar);  
-}
-
-bool setDefaultMedia(TeDatabase* db, TeLayer* layer, const string& objectId, const string& mediaName, const string& mediaTable)
-{
-	string table = layer->mediaTable();
-	
-	string up = "UPDATE " + table + " SET show_default = 0 WHERE ";
-	up += "object_id = '" + objectId + "'";
-	if(!db->execute(up))
-		return false;
-	
-	up = "UPDATE "+ table +" SET ";
-	up += " show_default = 1 ";
-	up += "	WHERE 	object_id = '"+ objectId +"'";
-	up += " AND		media_name = '"+ mediaName +"'";
-	up += " AND		media_table = '"+ mediaTable +"'";
-
-	if(!db->execute (up))
-		return false;
-
-	return true;
-}
-
-
-bool updateMediaDescription(TeDatabase* db, const string& mediaName, const string& mediaTable, const string& desc)
-{
-	string up = "UPDATE " + mediaTable + " SET description = '" + desc.c_str() + "'";
-	up += " WHERE media_name = '" + mediaName + "'";
-	if(!db->execute(up))
-		return false;
-	return true;
-}
-
-
-bool populateColorSchemeTable(TeDatabase* db, const string& tname)
-{
-	string table;
-
-	if (!db)
-		return false;
-	if (tname.empty())
-		table = "te_color_scheme";
-	else
-		table = tname;
-	if (!db->tableExist(table))
-		createColorSchemeTable(db,table);
-	
-	string ins = "INSERT INTO " + table + " (ramp_name, color_order, red, green, blue)";
-	string insert;
-	insert = ins + " VALUES ('RED', 1, 255, 225, 225)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('RED', 2, 255, 195, 195)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('RED', 3, 255, 165, 165)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('RED', 4, 255, 135, 135)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('RED', 5, 255, 112, 112)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('RED', 6, 255, 66, 66)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('RED', 7, 255, 0, 0)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('RED', 8, 225, 1, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('RED', 9, 200, 1, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('RED', 10, 175, 1, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('RED', 11, 150, 1, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('RED', 12, 125, 0, 0)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('RED', 13, 100, 0, 0)";
-	if (!db->execute(insert)) return false;
-
-	insert = ins + " VALUES ('GREEN', 1, 231, 255, 231)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN', 2, 206, 255, 206)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN', 3, 176, 255, 176)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN', 4, 136, 255, 135)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN', 5, 92, 255, 91)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN', 6, 47, 255, 46)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN', 7, 0, 255, 0)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN', 8, 3, 225, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN', 9, 2, 195, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN', 10, 2, 170, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN', 11, 2, 140, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN', 12, 1, 115, 0)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN', 13, 1, 85, 0)";
-	if (!db->execute(insert)) return false;
-
-	insert = ins + " VALUES ('BLUE', 1, 225, 226, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('BLUE', 2, 195, 196, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('BLUE', 3, 165, 167, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('BLUE', 4, 135, 137, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('BLUE', 5, 112, 114, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('BLUE', 6, 76, 79, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('BLUE', 7, 41, 44, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('BLUE', 8, 0, 0, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('BLUE', 9, 1, 4, 239)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('BLUE', 10, 1, 4, 210)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('BLUE', 11, 1, 4, 185)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('BLUE', 12, 1, 3, 160)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('BLUE', 13, 1, 3, 135)";
-	if (!db->execute(insert)) return false;
-
-	insert = ins + " VALUES ('CYAN', 1, 225, 255, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CYAN', 2, 195, 255, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CYAN', 3, 165, 255, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CYAN', 4, 135, 255, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CYAN', 5, 106, 255, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CYAN', 6, 76, 255, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CYAN', 7, 41, 255, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CYAN', 8, 0, 255, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CYAN', 9, 1, 235, 235)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CYAN', 10, 1, 215, 215)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CYAN', 11, 1, 195, 195)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CYAN', 12, 1, 175, 175)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CYAN', 13, 1, 155, 155)";
-	if (!db->execute(insert)) return false;
-
-	insert = ins + " VALUES ('ORANGE', 1, 255, 238, 225)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('ORANGE', 2, 255, 222, 195)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('ORANGE', 3, 255, 205, 165)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('ORANGE', 4, 255, 189, 135)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('ORANGE', 5, 255, 172, 106)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('ORANGE', 6, 255, 156, 76)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('ORANGE', 7, 255, 136, 41)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('ORANGE', 8, 255, 114, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('ORANGE', 9, 239, 105, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('ORANGE', 10, 210, 94, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('ORANGE', 11, 185, 83, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('ORANGE', 12, 160, 72, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('ORANGE', 13, 135, 60, 1)";
-	if (!db->execute(insert)) return false;
-
-	insert = ins + " VALUES ('YELLOW', 1, 255, 250, 225)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('YELLOW', 2, 255, 245, 195)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('YELLOW', 3, 255, 241, 165)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('YELLOW', 4, 255, 236, 135)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('YELLOW', 5, 255, 232, 106)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('YELLOW', 6, 255, 227, 76)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('YELLOW', 7, 255, 222, 41)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('YELLOW', 8, 255, 215, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('YELLOW', 9, 235, 198, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('YELLOW', 10, 210, 177, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('YELLOW', 11, 185, 156, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('YELLOW', 12, 160, 135, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('YELLOW', 13, 135, 114, 1)";
-	if (!db->execute(insert)) return false;
-
-	insert = ins + " VALUES ('MAGENTA', 1, 255, 225, 247)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('MAGENTA', 2, 255, 195, 239)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('MAGENTA', 3, 255, 165, 231)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('MAGENTA', 4, 255, 135, 222)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('MAGENTA', 5, 255, 106, 214)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('MAGENTA', 6, 255, 76, 206)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('MAGENTA', 7, 255, 41, 197)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('MAGENTA', 8, 255, 1, 186)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('MAGENTA', 9, 235, 1, 171)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('MAGENTA', 10, 210, 1, 153)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('MAGENTA', 11, 185, 1, 135)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('MAGENTA', 12, 160, 1, 116)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('MAGENTA', 13, 135, 1, 98)";
-	if (!db->execute(insert)) return false;
-
-	insert = ins + " VALUES ('GRAY', 1, 245, 245, 245)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GRAY', 2, 225, 225, 225)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GRAY', 3, 205, 205, 205)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GRAY', 4, 185, 185, 185)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GRAY', 5, 165, 165, 165)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GRAY', 6, 145, 145, 145)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GRAY', 7, 125, 125, 125)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GRAY', 8, 105, 105, 105)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GRAY', 9, 85, 85, 85)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GRAY', 10, 65, 65, 65)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GRAY', 11, 45, 45, 45)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GRAY', 12, 25, 25, 25)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GRAY', 13, 5, 5, 5)";
-	if (!db->execute(insert)) return false;
-
-	insert = ins + " VALUES ('CHARTREUSE', 1, 246, 255, 225)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CHARTREUSE', 2, 238, 255, 195)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CHARTREUSE', 3, 229, 255, 165)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CHARTREUSE', 4, 220, 255, 135)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CHARTREUSE', 5, 211, 255, 106)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CHARTREUSE', 6, 203, 255, 76)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CHARTREUSE', 7, 193, 255, 41)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CHARTREUSE', 8, 41, 255, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CHARTREUSE', 9, 238, 255, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CHARTREUSE', 10, 238, 255, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CHARTREUSE', 11, 132, 185, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CHARTREUSE', 12, 114, 154, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CHARTREUSE', 13, 96, 135, 1)";
-	if (!db->execute(insert)) return false;
-
-	insert = ins + " VALUES ('PURPLE', 1, 251, 215, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('PURPLE', 2, 249, 195, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('PURPLE', 3, 248, 165, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('PURPLE', 4, 246, 135, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('PURPLE', 5, 242, 96, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('PURPLE', 6, 235, 55, 250)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('PURPLE', 7, 221, 1, 240)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('PURPLE', 8, 207, 1, 225)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('PURPLE', 9, 184, 1, 205)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('PURPLE', 10, 166, 1, 180)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('PURPLE', 11, 138, 1, 150)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('PURPLE', 12, 112, 0, 125)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('PURPLE', 13, 92, 0, 100)";
-	if (!db->execute(insert)) return false;
-
-	insert = ins + " VALUES ('BLUE TO RED', 1, 23, 1, 220)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('BLUE TO RED', 2, 21, 1, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('BLUE TO RED', 3, 85, 71, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('BLUE TO RED', 4, 101, 103, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('BLUE TO RED', 5, 165, 167, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('BLUE TO RED', 6, 210, 211, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('BLUE TO RED', 7, 255, 255, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('BLUE TO RED', 8, 255, 210, 210)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('BLUE TO RED', 9, 255, 160, 160)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('BLUE TO RED', 10, 255, 111, 111)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('BLUE TO RED', 11, 255, 71, 71)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('BLUE TO RED', 12, 255, 0, 0)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('BLUE TO RED', 13, 220, 1, 1)";
-	if (!db->execute(insert)) return false;
-
-	insert = ins + " VALUES ('GRAY TO RED', 1, 85, 85, 85)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GRAY TO RED', 2, 115, 115, 115)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GRAY TO RED', 3, 145, 145, 145)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GRAY TO RED', 4, 170, 170, 170)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GRAY TO RED', 5, 195, 195, 195)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GRAY TO RED', 6, 225, 225, 225)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GRAY TO RED', 7, 255, 255, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GRAY TO RED', 8, 255, 210, 210)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GRAY TO RED', 9, 255, 160, 160)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GRAY TO RED', 10, 255, 111, 111)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GRAY TO RED', 11, 255, 71, 71)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GRAY TO RED', 12, 255, 0, 0)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GRAY TO RED', 13, 220, 1, 1)";
-	if (!db->execute(insert)) return false;
-
-	insert = ins + " VALUES ('BLUE TO ORANGE', 1, 23, 1, 220)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('BLUE TO ORANGE', 2, 21, 1, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('BLUE TO ORANGE', 3, 85, 71, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('BLUE TO ORANGE', 4, 101, 103, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('BLUE TO ORANGE', 5, 165, 167, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('BLUE TO ORANGE', 6, 210, 211, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('BLUE TO ORANGE', 7, 255, 255, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('BLUE TO ORANGE', 8, 255, 230, 210)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('BLUE TO ORANGE', 9, 255, 205, 165)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('BLUE TO ORANGE', 10, 255, 178, 116)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('BLUE TO ORANGE', 11, 255, 153, 71)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('BLUE TO ORANGE', 12, 255, 114, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('BLUE TO ORANGE', 13, 220, 98, 1)";
-	if (!db->execute(insert)) return false;
-
-	insert = ins + " VALUES ('PURPLE TO ORANGE', 1, 198, 1, 220)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('PURPLE TO ORANGE', 2, 229, 1, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('PURPLE TO ORANGE', 3, 236, 71, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('PURPLE TO ORANGE', 4, 240, 111, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('PURPLE TO ORANGE', 5, 246, 165, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('PURPLE TO ORANGE', 6, 250, 195, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('PURPLE TO ORANGE', 7, 255, 255, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('PURPLE TO ORANGE', 8, 255, 230, 210)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('PURPLE TO ORANGE', 9, 255, 205, 165)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('PURPLE TO ORANGE', 10, 255, 178, 116)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('PURPLE TO ORANGE', 11, 255, 153, 71)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('PURPLE TO ORANGE', 12, 255, 114, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('PURPLE TO ORANGE', 13, 220, 98, 1)";
-	if (!db->execute(insert)) return false;
-
-	insert = ins + " VALUES ('GREEN TO RED', 1, 3, 220, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN TO RED', 2, 0, 255, 0)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN TO RED', 3, 72, 255, 71)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN TO RED', 4, 112, 255, 111)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN TO RED', 5, 166, 255, 165)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN TO RED', 6, 196, 255, 195)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN TO RED', 7, 255, 255, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN TO RED', 8, 255, 210, 210)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN TO RED', 9, 255, 160, 160)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN TO RED', 10, 255, 111, 111)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN TO RED', 11, 255, 71, 71)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN TO RED', 12, 255, 0, 0)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN TO RED', 13, 220, 1, 1)";
-	if (!db->execute(insert)) return false;
-
-	insert = ins + " VALUES ('GREEN TO ORANGE', 1, 3, 220, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN TO ORANGE', 2, 0, 255, 0)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN TO ORANGE', 3, 72, 255, 71)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN TO ORANGE', 4, 112, 255, 111)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN TO ORANGE', 5, 166, 255, 165)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN TO ORANGE', 6, 196, 255, 195)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN TO ORANGE', 7, 255, 255, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN TO ORANGE', 8, 255, 230, 210)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN TO ORANGE', 9, 255, 205, 165)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN TO ORANGE', 10, 255, 178, 116)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN TO ORANGE', 11, 255, 153, 71)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN TO ORANGE', 12, 255, 114, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN TO ORANGE', 13, 220, 98, 1)";
-	if (!db->execute(insert)) return false;
-
-	insert = ins + " VALUES ('CYAN TO RED', 1, 1, 220, 220)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CYAN TO RED', 2, 0, 255, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CYAN TO RED', 3, 71, 255, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CYAN TO RED', 4, 116, 255, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CYAN TO RED', 5, 165, 255, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CYAN TO RED', 6, 210, 255, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CYAN TO RED', 7, 255, 255, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CYAN TO RED', 8, 255, 210, 210)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CYAN TO RED', 9, 255, 160, 160)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CYAN TO RED', 10, 255, 111, 111)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CYAN TO RED', 11, 255, 71, 71)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CYAN TO RED', 12, 255, 0, 0)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CYAN TO RED', 13, 220, 1, 1)";
-	if (!db->execute(insert)) return false;
-
-	insert = ins + " VALUES ('CYAN TO ORANGE', 1, 1, 220, 220)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CYAN TO ORANGE', 2, 0, 255, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CYAN TO ORANGE', 3, 71, 255, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CYAN TO ORANGE', 4, 116, 255, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CYAN TO ORANGE', 5, 165, 255, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CYAN TO ORANGE', 6, 210, 255, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CYAN TO ORANGE', 7, 255, 255, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CYAN TO ORANGE', 8, 255, 230, 210)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CYAN TO ORANGE', 9, 255, 220, 165)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CYAN TO ORANGE', 10, 255, 178, 116)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CYAN TO ORANGE', 11, 255, 153, 71)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CYAN TO ORANGE', 12, 255, 114, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('CYAN TO ORANGE', 13, 220, 98, 1)";
-	if (!db->execute(insert)) return false;
-
-	insert = ins + " VALUES ('YELLOW TO ORANGE TO RED', 1, 247, 255, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('YELLOW TO ORANGE TO RED', 2, 255, 245, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('YELLOW TO ORANGE TO RED', 3, 255, 227, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('YELLOW TO ORANGE TO RED', 4, 255, 209, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('YELLOW TO ORANGE TO RED', 5, 255, 183, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('YELLOW TO ORANGE TO RED', 6, 255, 174, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('YELLOW TO ORANGE TO RED', 7, 255, 156, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('YELLOW TO ORANGE TO RED', 8, 255, 132, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('YELLOW TO ORANGE TO RED', 9, 255, 108, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('YELLOW TO ORANGE TO RED', 10, 255, 90, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('YELLOW TO ORANGE TO RED', 11, 255, 61, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('YELLOW TO ORANGE TO RED', 12, 255, 37, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('YELLOW TO ORANGE TO RED', 13, 255, 0, 0)";
-	if (!db->execute(insert)) return false;
-
-	insert = ins + " VALUES ('RED TO PURPLE TO BLUE', 1, 220, 1, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('RED TO PURPLE TO BLUE', 2, 240, 1, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('RED TO PURPLE TO BLUE', 3, 255, 1, 49)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('RED TO PURPLE TO BLUE', 4, 255, 1, 96)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('RED TO PURPLE TO BLUE', 5, 255, 1, 144)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('RED TO PURPLE TO BLUE', 6, 255, 1, 204)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('RED TO PURPLE TO BLUE', 7, 255, 0, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('RED TO PURPLE TO BLUE', 8, 223, 1, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('RED TO PURPLE TO BLUE', 9, 187, 1, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('RED TO PURPLE TO BLUE', 10, 152, 1, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('RED TO PURPLE TO BLUE', 11, 116, 1, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('RED TO PURPLE TO BLUE', 12, 56, 1, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('RED TO PURPLE TO BLUE', 13, 0, 255, 0)";
-	if (!db->execute(insert)) return false;
-
-	insert = ins + " VALUES ('GREEN TO CYAN TO BLUE', 1, 1, 255, 58)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN TO CYAN TO BLUE', 2, 1, 255, 88)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN TO CYAN TO BLUE', 3, 1, 255, 118)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN TO CYAN TO BLUE', 4, 1, 255, 148)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN TO CYAN TO BLUE', 5, 1, 255, 178)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN TO CYAN TO BLUE', 6, 1, 255, 207)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN TO CYAN TO BLUE', 7, 1, 255, 237)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN TO CYAN TO BLUE', 8, 1, 243, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN TO CYAN TO BLUE', 9, 1, 213, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN TO CYAN TO BLUE', 10, 1, 184, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN TO CYAN TO BLUE', 11, 1, 124, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN TO CYAN TO BLUE', 12, 1, 94, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('GREEN TO CYAN TO BLUE', 13, 0, 0, 255)";
-	if (!db->execute(insert)) return false;
-
-	insert = ins + " VALUES ('YELLOW TO GREEN TO DARK BLUE', 1, 255, 255, 0)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('YELLOW TO GREEN TO DARK BLUE', 2, 229, 255, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('YELLOW TO GREEN TO DARK BLUE', 3, 205, 255, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('YELLOW TO GREEN TO DARK BLUE', 4, 170, 255, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('YELLOW TO GREEN TO DARK BLUE', 5, 116, 255, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('YELLOW TO GREEN TO DARK BLUE', 6, 63, 255, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('YELLOW TO GREEN TO DARK BLUE', 7, 3, 235, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('YELLOW TO GREEN TO DARK BLUE', 8, 1, 222, 103)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('YELLOW TO GREEN TO DARK BLUE', 9, 1, 220, 153)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('YELLOW TO GREEN TO DARK BLUE', 10, 1, 170, 138)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('YELLOW TO GREEN TO DARK BLUE', 11, 1, 135, 166)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('YELLOW TO GREEN TO DARK BLUE', 12, 1, 81, 166)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('YELLOW TO GREEN TO DARK BLUE', 13, 14, 1, 130)";
-	if (!db->execute(insert)) return false;
-
-	insert = ins + " VALUES ('ELEVATION 1', 1, 175, 255, 231)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('ELEVATION 1', 2, 151, 255, 150)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('ELEVATION 1', 3, 255, 247, 130)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('ELEVATION 1', 4, 122, 205, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('ELEVATION 1', 5, 2, 130, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('ELEVATION 1', 6, 230, 162, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('ELEVATION 1', 7, 230, 125, 31)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('ELEVATION 1', 8, 220, 104, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('ELEVATION 1', 9, 200, 74, 36)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('ELEVATION 1', 10, 170, 1, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('ELEVATION 1', 11, 88, 52, 20)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('ELEVATION 1', 12, 185, 185, 185)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('ELEVATION 1', 13, 255, 55, 255)";
-	if (!db->execute(insert)) return false;
-
-	insert = ins + " VALUES ('ELEVATION 2', 1, 176, 231, 219)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('ELEVATION 2', 2, 228, 255, 180)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('ELEVATION 2', 3, 255, 251, 195)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('ELEVATION 2', 4, 250, 255, 156)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('ELEVATION 2', 5, 225, 212, 124)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('ELEVATION 2', 6, 219, 166, 32)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('ELEVATION 2', 7, 187, 165, 99)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('ELEVATION 2', 8, 161, 103, 51)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('ELEVATION 2', 9, 156, 123, 96)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('ELEVATION 2', 10, 157, 174, 176)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('ELEVATION 2', 11, 217, 192, 217)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('ELEVATION 2', 12, 198, 220, 221)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('ELEVATION 2', 13, 255, 255, 255)";
-	if (!db->execute(insert)) return false;
-
-	insert = ins + " VALUES ('SEA FLOOR ELEVATION', 1, 210, 255, 218)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('SEA FLOOR ELEVATION', 2, 198, 255, 231)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('SEA FLOOR ELEVATION', 3, 157, 255, 225)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('SEA FLOOR ELEVATION', 4, 116, 242, 248)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('SEA FLOOR ELEVATION', 5, 0, 255, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('SEA FLOOR ELEVATION', 6, 83, 231, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('SEA FLOOR ELEVATION', 7, 127, 192, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('SEA FLOOR ELEVATION', 8, 65, 155, 220)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('SEA FLOOR ELEVATION', 9, 1, 123, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('SEA FLOOR ELEVATION', 10, 0, 0, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('SEA FLOOR ELEVATION', 11, 23, 1, 220)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('SEA FLOOR ELEVATION', 12, 16, 1, 200)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('SEA FLOOR ELEVATION', 13, 14, 1, 130)";
-	if (!db->execute(insert)) return false;
-
-	insert = ins + " VALUES ('FULL SPECTRUM', 1, 255, 0, 0)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('FULL SPECTRUM', 2, 255, 90, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('FULL SPECTRUM', 3, 255, 180, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('FULL SPECTRUM', 4, 241, 255, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('FULL SPECTRUM', 5, 152, 255, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('FULL SPECTRUM', 6, 3, 255, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('FULL SPECTRUM', 7, 1, 255, 148)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('FULL SPECTRUM', 8, 1, 255, 237)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('FULL SPECTRUM', 9, 1, 184, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('FULL SPECTRUM', 10, 0, 0, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('FULL SPECTRUM', 11, 176, 1, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('FULL SPECTRUM', 12, 254, 0, 245)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('FULL SPECTRUM', 13, 254, 0, 155)";
-	if (!db->execute(insert)) return false;
-
-	insert = ins + " VALUES ('PRECIPITATION', 1, 206, 134, 63)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('PRECIPITATION', 2, 255, 166, 0)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('PRECIPITATION', 3, 255, 216, 0)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('PRECIPITATION', 4, 255, 255, 0)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('PRECIPITATION', 5, 186, 239, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('PRECIPITATION', 6, 111, 255, 39)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('PRECIPITATION', 7, 0, 206, 102)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('PRECIPITATION', 8, 3, 220, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('PRECIPITATION', 9, 2, 187, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('PRECIPITATION', 10, 0, 140, 0)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('PRECIPITATION', 11, 0, 135, 140)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('PRECIPITATION', 12, 44, 102, 130)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('PRECIPITATION', 13, 32, 71, 146)";
-	if (!db->execute(insert)) return false;
-
-	insert = ins + " VALUES ('TEMPERATURE', 1, 255, 255, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('TEMPERATURE', 2, 255, 101, 150)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('TEMPERATURE', 3, 176, 1, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('TEMPERATURE', 4, 0, 0, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('TEMPERATURE', 5, 1, 130, 255)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('TEMPERATURE', 6, 1, 210, 220)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('TEMPERATURE', 7, 1, 255, 178)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('TEMPERATURE', 8, 0, 255, 0)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('TEMPERATURE', 9, 185, 255, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('TEMPERATURE', 10, 255, 255, 0)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('TEMPERATURE', 11, 255, 180, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('TEMPERATURE', 12, 204, 72, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('TEMPERATURE', 13, 180, 1, 1)";
-	if (!db->execute(insert)) return false;
-
-	insert = ins + " VALUES ('LAND COVER 1', 1, 255, 239, 140)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('LAND COVER 1', 2, 255, 201, 125)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('LAND COVER 1', 3, 239, 202, 0)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('LAND COVER 1', 4, 239, 155, 73)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('LAND COVER 1', 5, 206, 174, 0)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('LAND COVER 1', 6, 206, 191, 112)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('LAND COVER 1', 7, 163, 206, 90)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('LAND COVER 1', 8, 155, 206, 50)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('LAND COVER 1', 9, 0, 206, 0)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('LAND COVER 1', 10, 69, 140, 0)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('LAND COVER 1', 11, 122, 139, 53)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('LAND COVER 1', 12, 2, 130, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('LAND COVER 1', 13, 1, 100, 99)";
-	if (!db->execute(insert)) return false;
-
-	insert = ins + " VALUES ('LAND COVER 2', 1, 222, 51, 51)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('LAND COVER 2', 2, 239, 155, 73)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('LAND COVER 2', 3, 239, 202, 0)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('LAND COVER 2', 4, 255, 247, 144)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('LAND COVER 2', 5, 189, 239, 104)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('LAND COVER 2', 6, 182, 255, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('LAND COVER 2', 7, 172, 220, 119)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('LAND COVER 2', 8, 155, 206, 50)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('LAND COVER 2', 9, 0, 206, 0)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('LAND COVER 2', 10, 69, 140, 0)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('LAND COVER 2', 11, 122, 139, 53)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('LAND COVER 2', 12, 2, 130, 1)";
-	if (!db->execute(insert)) return false;
-	insert = ins + " VALUES ('LAND COVER 2', 13, 1, 100, 0)";
-	if (!db->execute(insert)) return false;
-	return true;
-}
-
-bool locatePieBar (TeDatabase* db, TeThemeApplication* theme, TeCoord2D pt, double delta) 
-{
-	if (!db || !theme) 
-		return false;
-
-	theme->chartSelected_.clear();
-	string	TC = theme->collectionTable();
-	string xmin = Te2String(pt.x()-delta);
-	string xmax = Te2String(pt.x()+delta);
-	string ymin = Te2String(pt.y()-delta);
-	string ymax = Te2String(pt.y()+delta);
-
-	TeDatabasePortal* portal = db->getPortal();
-	if (!portal)
-		return false;
-
-	string sel = "SELECT c_object_id FROM " + TC + " WHERE ";
-	sel += "label_x > " + xmin + " AND ";
-	sel += "label_x < " + xmax + " AND ";
-	sel += "label_y > " + ymin + " AND ";
-	sel += "label_y < " + ymax;
-
-	if(!portal->query(sel))
-	{
-		delete portal;
-		return false;
-	}
-
-	if(portal->fetchRow() == false)
-	{
-		delete portal;
-		return false;
-	}
-
-	theme->chartSelected_ = portal->getData("c_object_id");
-
-	delete portal;
-
-	return true;
-}
-
-
-bool loadChartParams (TeDatabase* db, TeThemeApplication *theme)
-{
-	if (!db || !theme) 
-		return false;
-
-	TeDatabasePortal* portal = db->getPortal();
-
-	string q ="SELECT * FROM te_chart_params WHERE theme_id= ";
-	q += Te2String (theme->id());
-
-	if (!portal->query(q))
-	{	
-		delete portal;
-		return false;
-	}
-	while (portal->fetchRow())
-	{
-		TeColor cor = portal->getColor ();
-		string attname = portal->getData("attr_name");
-		int f = attname.find("(");
-		if(f >= 0)
-		{
-			string alias = attname;
-			attname.erase(f, attname.size()-f);
-			alias.erase(0, f+1);
-			alias.erase(alias.size()-1, 1);
-			map<string, string>& mapAA = db->mapThemeAlias()[theme->id()];
-			theme->concatTableName(attname);
-			mapAA[attname] = alias;
-		}
-		theme->chartAttributes_.push_back(attname);
-		theme->chartColors_.push_back(cor);
-	}
-	delete portal;
-	return true;
-}
-
-
-bool loadKernelParams (TeDatabase* db, int supThemeId, const string& supTableName, const string& supAttrName, TeKernelParams& KernelPar)
-{
-	if (!db) 
-		return false;
-
-	TeDatabasePortal* portal = db->getPortal();
-
-	string q ="SELECT event_theme_id_1, intensity_attr_name_1, ";
-	q += " intensity_attr_table_1, kernel_function_1, compute_type_1, radius_value_1, ";
-	q += " combination_type, event_theme_id_2, intensity_attr_name_2, intensity_attr_table_2, ";
-	q += " kernel_function_2, compute_type_2, radius_value_2, support_theme_id,  ";
-	q += " support_theme_table, support_theme_attr, generated_layer_id ";
-	q += " FROM te_kernel_metadata WHERE ";
-	q += " support_theme_id = "+ Te2String (supThemeId);
-	q += " AND support_theme_table = '"+ supTableName +"'";
-	q += " AND support_theme_attr = '"+ supAttrName +"'";
-
-	if (!portal->query(q))
-	{	
-		delete portal;
-		return false;
-	}
-	
-	if (portal->fetchRow())
-	{
-		KernelPar.eventThemeId1_ = atoi(portal->getData(0));
-		KernelPar.intensityAttrName1_ = string(portal->getData(1));
-		KernelPar.intensityAttrTable1_ = string(portal->getData(2));
-		KernelPar.kernelFunction1_ = TeKernelFunctionType(atoi(portal->getData(3)));
-		KernelPar.computeType1_ = TeKernelComputeType(atoi(portal->getData(4)));
-		KernelPar.radiusValue1_ = portal->getDouble(5);
-		KernelPar.combinationType_ = TeKernelCombinationType(atoi(portal->getData(6)));
-		KernelPar.eventThemeId2_ = atoi(portal->getData(7));
-		KernelPar.intensityAttrName2_ = string(portal->getData(8));
-		KernelPar.intensityAttrTable2_ = string(portal->getData(9));
-		KernelPar.kernelFunction2_ = TeKernelFunctionType(atoi(portal->getData(10)));
-		KernelPar.computeType2_ = TeKernelComputeType(atoi(portal->getData(11)));
-		KernelPar.radiusValue2_ = portal->getDouble(12);
-		KernelPar.supportThemeId_ = atoi(portal->getData(13));
-		KernelPar.supportThemeTable_ = string(portal->getData(14));
-		KernelPar.supportThemeAttr_ = string(portal->getData(15));
-		KernelPar.generatedLayerId_ =  atoi(portal->getData(16));
-
-		vector<int> ids;
-		if(KernelPar.eventThemeId1_>0)
-			ids.push_back (KernelPar.eventThemeId1_);
-		if(KernelPar.eventThemeId2_>0)
-			ids.push_back (KernelPar.eventThemeId2_);
-		if(KernelPar.supportThemeId_>0)
-			ids.push_back (KernelPar.supportThemeId_);
-
-		string sqlIds; 
-		vector<int>::iterator it = ids.begin();
-		
-		while (it != ids.end ())
-		{
-			sqlIds += Te2String((*it)) +",";
-			++it;
-		}
-
-		sqlIds.replace (sqlIds.size()-1, 1, " ");
-		string sql = "SELECT theme_id, name FROM te_theme WHERE theme_id IN ("+ sqlIds +")";
-
-		portal->freeResult();
-		if(!portal->query(sql))
-		{
-			delete portal;
-			return false;
-		}
-
-		while(portal->fetchRow())
-		{
-			int themeId = atoi(portal->getData(0));
-			string themeName = string(portal->getData(1));
-
-			if(themeId==KernelPar.eventThemeId1_)
-				KernelPar.eventThemeName1_ = themeName;
-			else if (themeId==KernelPar.eventThemeId2_)
-				KernelPar.eventThemeName2_ = themeName;
-			else if (themeId==KernelPar.supportThemeId_)
-				KernelPar.supportThemeName_ = themeName;
-		}
-
-		if(KernelPar.generatedLayerId_>0)
-		{
-			sql = "SELECT name FROM te_layer WHERE layer_id = "+ KernelPar.generatedLayerId_;
-			
-			portal->freeResult();
-			if(!portal->query(sql) || !portal->fetchRow())
-			{
-				delete portal;
-				return false;
-			}
-			
-			KernelPar.generatedLayerName_= string(portal->getData(0));
-		}
-
-		delete portal;
-		return true;
-	}
-	
-	delete portal;
-	return false;
-}
-
-
-
-bool loadKernelParams (TeDatabase* db, int layerId, TeKernelParams& KernelPar)
-{
-	if (!db) 
-		return false;
-
-	TeDatabasePortal* portal = db->getPortal();
-
-	string q ="SELECT event_theme_id_1, intensity_attr_name_1, ";
-	q += " intensity_attr_table_1, kernel_function_1, compute_type_1, radius_value_1, ";
-	q += " combination_type, event_theme_id_2, intensity_attr_name_2, intensity_attr_table_2, ";
-	q += " kernel_function_2, compute_type_2, radius_value_2, support_theme_id,  ";
-	q += " support_theme_table, support_theme_attr, generated_layer_id ";
-	q += " FROM te_kernel_metadata WHERE ";
-	q += " generated_layer_id = "+ Te2String (layerId);
-
-	if (!portal->query(q))
-	{	
-		delete portal;
-		return false;
-	}
-	
-	if (portal->fetchRow())
-	{
-		KernelPar.eventThemeId1_ = atoi(portal->getData(0));
-		KernelPar.intensityAttrName1_ = string(portal->getData(1));
-		KernelPar.intensityAttrTable1_ = string(portal->getData(2));
-		KernelPar.kernelFunction1_ = TeKernelFunctionType(atoi(portal->getData(3)));
-		KernelPar.computeType1_ = TeKernelComputeType(atoi(portal->getData(4)));
-		KernelPar.radiusValue1_ = portal->getDouble(5);
-		KernelPar.combinationType_ = TeKernelCombinationType(atoi(portal->getData(6)));
-		KernelPar.eventThemeId2_ = atoi(portal->getData(7));
-		KernelPar.intensityAttrName2_ = string(portal->getData(8));
-		KernelPar.intensityAttrTable2_ = string(portal->getData(9));
-		KernelPar.kernelFunction2_ = TeKernelFunctionType(atoi(portal->getData(10)));
-		KernelPar.computeType2_ = TeKernelComputeType(atoi(portal->getData(11)));
-		KernelPar.radiusValue2_ = portal->getDouble(12);
-		KernelPar.supportThemeId_ = atoi(portal->getData(13));
-		KernelPar.supportThemeTable_ = string(portal->getData(14));
-		KernelPar.supportThemeAttr_ = string(portal->getData(15));
-		KernelPar.generatedLayerId_ =  atoi(portal->getData(16));
-
-		vector<int> ids;
-		if(KernelPar.eventThemeId1_>0)
-			ids.push_back (KernelPar.eventThemeId1_);
-		if(KernelPar.eventThemeId2_>0)
-			ids.push_back (KernelPar.eventThemeId2_);
-		if(KernelPar.supportThemeId_>0)
-			ids.push_back (KernelPar.supportThemeId_);
-
-		string sqlIds; 
-		vector<int>::iterator it = ids.begin();
-		
-		while (it != ids.end ())
-		{
-			sqlIds += Te2String((*it)) +",";
-			++it;
-		}
-
-		sqlIds.replace (sqlIds.size()-1, 1, " ");
-		string sql = "SELECT theme_id, name FROM te_theme WHERE theme_id IN ("+ sqlIds +")";
-
-		portal->freeResult();
-		if(!portal->query(sql))
-		{
-			delete portal;
-			return false;
-		}
-
-		while(portal->fetchRow())
-		{
-			int themeId = atoi(portal->getData(0));
-			string themeName = string(portal->getData(1));
-
-			if(themeId==KernelPar.eventThemeId1_)
-				KernelPar.eventThemeName1_ = themeName;
-			else if (themeId==KernelPar.eventThemeId2_)
-				KernelPar.eventThemeName2_ = themeName;
-			else if (themeId==KernelPar.supportThemeId_)
-				KernelPar.supportThemeName_ = themeName;
-		}
-
-		if(KernelPar.generatedLayerId_>0)
-		{
-      sql = "";
-			sql = 
-        "SELECT name FROM te_layer WHERE layer_id = "
-        + Te2String(KernelPar.generatedLayerId_);
-			
-			portal->freeResult();
-			if(!portal->query(sql) || !portal->fetchRow())
-			{
-				delete portal;
-				return false;
-			}
-			
-			KernelPar.generatedLayerName_= string(portal->getData(0));
-		}
-
-		delete portal;
-		return true;
-	}
-	
-	delete portal;
-	return false;
-}
-
-
-bool updatePieBarLocation (TeDatabase* db, TeThemeApplication* theme, TeCoord2D pt) 
-{
-	if (!db || !theme) 
-		return false;
-
-	if (theme->chartSelected_.empty() == true)
-		return false;
-
-	string	x = Te2String(pt.x());
-	string	y = Te2String(pt.y());
-	string	TC = theme->collectionTable();
-	string mover = "UPDATE " + TC + " SET label_x = " + x + ", label_y = " + y;
-	mover += " WHERE c_object_id = '" + theme->chartSelected_ + "'";
-	return db->execute(mover);
-}
-
-bool updatePointLocation (TeDatabase* db, TeThemeApplication* theme, TeCoord2D pt) 
-{
-	if (!db || !theme) 
-		return false;
-
-	string	x = Te2String(pt.x());
-	string	y = Te2String(pt.y());
-	string	table = theme->layer()->tableName(TePOINTS);
-	string mover = "UPDATE " + table + " SET x = " + x + ", y = " + y;
-	mover += " WHERE geom_id = " + Te2String(theme->tePoint_.geomId());
-	return db->execute(mover);
-}
-
-
-bool insertChartParams(TeDatabase* db, TeThemeApplication *theme)
-{
-	if (!db || !theme) 
-		return false;
-
-	unsigned int n = theme->chartColors_.size();
-	int themeId = theme->id();
-	TeColor cor;
-	string ins, insert;
-	for (unsigned int i=0; i<n; i++)
-	{
-		cor = theme->chartColors_[i];
-		ins = "INSERT INTO te_chart_params (theme_id, attr_name, red, green, blue)";
-		insert = ins + " VALUES (" + Te2String(themeId) +",'";
-		string attname = theme->chartAttributes_[i];
-		map<int, map<string, string> > mapTAA = db->mapThemeAlias();
-		map<int, map<string, string> >::iterator tit = mapTAA.find(theme->id());
-		if(tit != mapTAA.end())
-		{
-			map<string, string> mapAA = tit->second;
-			theme->concatTableName(attname);
-			map<string, string>::iterator it = mapAA.find(attname);
-			if(it != mapAA.end())
-			{
-				string alias = it->second;
-				attname += "(" + alias + ")";
-			}
-		}
-		insert += attname +"',";
-		insert += Te2String(cor.red_) + ",";
-		insert += Te2String(cor.green_) + ",";
-		insert += Te2String(cor.blue_) + ")";
-		if (!db->execute(insert))
-			return false;
-	}
-	return true;
-}
-
-
-bool deleteChartParams (TeDatabase* db, TeThemeApplication* theme)
-{
-	if (!db || !theme) 
-		return false;
-
-	string id = Te2String(theme->id());
-	string del = "DELETE FROM te_chart_params WHERE theme_id = " + id;
-	return db->execute(del);
-}
-
-bool insertRampColor(TeDatabase* db, const string& name, int /* order */, TeColor& color, const string& tableName)
-{
-	if (!db) 
-		return false;
-
-	string ins = "INSERT INTO " + tableName + " (ramp_name, color_order, red, green, blue)";
-	ins += " VALUES ('" +  name + "', " + Te2String(color.red_);
-	ins += ", " + Te2String(color.green_);
-	ins += ", " + Te2String (color.blue_) + ")";
-	return db->execute(ins);
-}
-
-bool updateGridColor(TeDatabase* db, int themeId, TeObjectSelectionMode sel, TeColor& color)
-{
-	if (!db || themeId <= 0) 
-		return false;
-
-	string ins = "UPDATE te_legend SET red = " + Te2String(color.red_);
-	ins += ", green = " +  Te2String(color.green_);
-	ins += ", blue = "  + Te2String (color.blue_);
-	ins += " WHERE theme_id = " + Te2String(themeId) + " AND ";
-	if(sel == TeDefaultSelection)
-		ins += "group_id = -3";
-	else if(sel == TePointingSelection)
-		ins += "group_id = -4";
-	else if(sel == TeQuerySelection)
-		ins += "group_id = -5";
-	else
-		ins += "group_id = -6";
-	return db->execute(ins);
-}
-
-bool loadThemeApplication (TeDatabase* db, TeThemeApplication *theme, const string& tableName)
-{
-	if (!db || !theme) 
-		return false;
-
-	if (!db->loadTheme(theme))
-		return false;
-
-	TeDatabasePortal* portal = db->getPortal();
-	if (!portal)
-		return false;
-
-	string q = "SELECT * FROM " + tableName + " WHERE theme_id= ";
-	q += Te2String (theme->id());
-
-	if (!portal->query(q) || !portal->fetchRow())
-	{	
-		delete portal;
-		return false;
-	}
-	theme->outOfCollectionVisibility(portal->getBool(1));
-	theme->withoutDataConnectionVisibility(portal->getBool(2));
-	theme->refineAttributeWhere(string(portal->getData (3)));
-	theme->refineSpatialWhere(string(portal->getData (4)));
-	theme->refineTemporalWhere(string(portal->getData (5)));
-
-	string name = portal->getData(6);
-	if (!name.empty())
-		theme->groupColor(name);
-	theme->groupColorDir(TeColorDirection(atoi(portal->getData(7))));
-	theme->groupObjects(TeSelectedObjects(atoi(portal->getData(8))));
-	theme->pieDiameter(portal->getDouble(9));
-	theme->pieMaxDiameter(portal->getDouble(10));
-	theme->pieMinDiameter(portal->getDouble(11));
-	name = portal->getData(12);
-	if (!name.empty())
-		theme->pieDimAttribute(name);
-	theme->barMaxHeight(portal->getDouble(13));
-	theme->barMinHeight(portal->getDouble(14));
-	theme->barWidth(portal->getDouble(15));
-	theme->chartMaxVal(portal->getDouble(16));
-	theme->chartMinVal(portal->getDouble(17));
-	theme->chartType(TeChartType(atoi(portal->getData(18))));
-	theme->chartObjects(TeSelectedObjects(atoi(portal->getData(19))));
-	theme->keepDimension(atoi(portal->getData(20)));
-	theme->showCanvasLegend(portal->getBool(21));
-	TeCoord2D p;
-	p.x(portal->getDouble(22));
-	p.y(portal->getDouble(23));
-	theme->canvasLegUpperLeft(p);
-	bool n = portal->getBool(24);
-	theme->mixColor(n);
-	n = portal->getBool(25);
-	theme->countObj(n);
-	name = portal->getData(26);
-	if (!name.empty())
-		theme->textTable(name);
-	theme->chartFunction(portal->getData(27));
-	portal->freeResult();
-	delete portal;
-	return loadChartParams(db,theme);
-}
-
-bool insertThemeApplication (TeDatabase* db, TeThemeApplication *theme, const string& tableName)
-{
-	if (!db || !theme) 
-		return false;
-	if (!db->insertTheme((TeTheme*) theme))
-		return false;
-
-	string q = "INSERT INTO " + tableName + " (theme_id, visible_out_coll, visible_without_conn, ";
-	q += "refine_attribute_where, refine_spatial_where, refine_temporal_where, ";
-	q += "grouping_color, grouping_color_direction, grouping_objects, ";
-	q += "pie_diameter, pie_max_diameter, pie_min_diameter, pie_dimension_attr, ";
-	q += "bar_max_height, bar_min_height, bar_width, ";
-	q += "chart_max_value, chart_min_value, chart_type, chart_objects, ";
-	q += "keep_dimension, show_canvas_leg, canvas_leg_x, canvas_leg_y, ";
-	q += "mix_color, count_obj, text_table, chart_function) VALUES (";
-
-	q += Te2String(theme->id()) + ", ";
-	if (theme->outOfCollectionVisibility())
-		q += "1, ";
-	else
-		q += "0, ";
-	if (theme->withoutDataConnectionVisibility())
-		q += "1, '";
-	else
-		q += "0, '";
-	q += theme->refineAttributeWhere () + "', '" + theme->refineSpatialWhere() + "', '";
-	q += theme->refineTemporalWhere () + "', '" + theme->groupColor() + "', ";
-	q += Te2String(theme->groupColorDir()) + ", " + Te2String(theme->groupObjects()) + ", ";
-	q += Te2String(theme->pieDiameter(),8) + ", " + Te2String(theme->pieMaxDiameter(),8) + ", ";
-	q += Te2String(theme->pieMinDiameter(),8) + ", '" + theme->pieDimAttribute() + "', ";
-	q += Te2String(theme->barMaxHeight(),8) + ", " + Te2String(theme->barMinHeight(),8) + ", ";
-	q += Te2String(theme->barWidth(),8) + ", " + Te2String(theme->chartMaxVal(),8) + ", ";
-	q += Te2String(theme->chartMinVal(),8)+ ", " + Te2String(theme->chartType()) + ", ";
-	q += Te2String(theme->chartObjects()) + ", "; 
-	q += Te2String(theme->keepDimension()) + ", ";
-	if (theme->showCanvasLegend())
-		q += "1, ";
-	else
-		q += "0, ";
-	q += Te2String(theme->canvasLegWidth(),8) + ", ";
-	q += Te2String(theme->canvasLegHeight(),8) + ", ";
-	if (theme->mixColor())
-		q += "1, ";
-	else
-		q += "0, ";
-	if (theme->countObj())
-		q += "1, '";
-	else
-		q += "0, '";
-	q += theme->textTable() + "', '";
-	q += theme->chartFunction() + "')";
-	if(!db->execute(q))
-		return false;
-
-	for (unsigned int i=0; i<theme->chartAttributes_.size(); i++)
-	{
-		q = "INSERT INTO te_chart_params VALUES (attr_name, red, blue, green, theme_id) VALUES (";
-		string attname = theme->chartAttributes_[i];
-		map<int, map<string, string> > mapTAA = db->mapThemeAlias();
-		map<int, map<string, string> >::iterator tit = mapTAA.find(theme->id());
-		if(tit != mapTAA.end())
-		{
-			map<string, string> mapAA = tit->second;
-			theme->concatTableName(attname);
-			map<string, string>::iterator it = mapAA.find(attname);
-			if(it != mapAA.end())
-			{
-				string alias = it->second;
-				attname += "(" + alias + ")";
-			}
-		}
-		q += "'" + attname + "', " + Te2String(theme->chartColors_[i].red_)+ ", ";
-		q += Te2String(theme->chartColors_[i].green_)+ ", " + Te2String(theme->chartColors_[i].blue_) +", ";
-		q += Te2String(theme->id()) + ")";
-		if (!db->execute(q))
-			return false;
-	}
-	return true; 
-}
-
-bool loadViewSet(TeDatabase* db, const string& user)
-{
-	if (!db)
-		return false;
-
-	TeViewMap::iterator it = db->viewMap().begin();
-	while (it != db->viewMap().end())
-	{
-		delete it->second;
-		++it;
-	}
-	db->viewMap().clear();
-
-	
-	TeDatabasePortal* portal = db->getPortal();
-	if (!portal)
-		return false;
-
-	string q = " SELECT * FROM te_view WHERE user_name = '" + user + "'";
-	
-	if (!portal->query(q))
-	{	
-		delete portal;
-		return false;
-	}
-
-	TeDatabasePortal* themePortal = db->getPortal();
-	if (!themePortal)
-	{	
-		delete portal;
-		return false;
-	}
-
-	while (portal->fetchRow())
-	{
-		TeView *view = new TeView();
-		view->id (atoi(portal->getData("view_id")));
-		int projId = atoi(portal->getData("projection_id"));
-		TeProjection* proj = db->loadProjection(projId);
-		if (proj != 0)
-			view->projection(proj);
-		view->name(portal->getData("name"));
-		view->user(portal->getData("user_name"));
-		view->isVisible (portal->getBool("visibility"));
-		
-		loadViewTree(db, view, 0);
-
-		vector<TeViewNode*>& themes = view->themes();
-		for (unsigned int i = 0; i < themes.size(); i++)
-		{
-			TeTheme *theme = (TeTheme*)themes[i];
-			int id = theme->layerId();
-			TeLayerMap::iterator it = db->layerMap().find(id);
-			if (it == db->layerMap().end())
-			{
-				db->layerMap().clear();
-				db->loadLayerSet();
-			}
-			theme->layer(db->layerMap()[id]);
-		}
-		db->viewMap()[view->id()] = view;
-		themePortal->freeResult();
-	}
-
-	delete themePortal;
-	delete portal;
-	return true;
-}
-
-bool 
-updateView(TeDatabase* db, TeView *view)
-{
-	if(!db) return false;
-	if(!view) return false;
-
-	TeProjection* proj = view->projection();
-	if (proj)
-	{
-		if (proj->id() <= 0)
-			db->insertProjection(view->projection());
-		else
-			db->updateProjection(view->projection());
-	}
-	else
-		return false;
-
-	string sql = "UPDATE te_view SET projection_id=" + Te2String(proj->id());
-	sql+= ", name='" + view->name() + "'";
-	sql+= ", user_name='" + view->user() + "'";
-	sql+= ", visibility= " + Te2String((int)view->isVisible());
-	sql +=" WHERE view_id = " + Te2String(view->id());
-
-	if (!db->execute (sql))
-		return false;
-
-	TeViewTree* tree = view->root();
-	if(tree) 
-		updateViewTree(db, tree);
-
-	return true;
-}
-
-bool updateThemeApplication (TeDatabase* db, TeThemeApplication *theme)
-{
-	if (!db || !theme) 
-		return false;
-	if (!db->updateTheme((TeTheme*) theme))
-		return false;
-
-	string sql;
-
-	if (theme->id() <= 0 )  // theme doesn�t exist in the database yet
-	{
-		return insertThemeApplication (db, theme);
-	}
-	
-	// update theme metadata
-	sql = "UPDATE te_theme_application SET ";
-	sql += "  visible_out_coll=";
-	if (theme->outOfCollectionVisibility())
-		sql += "1";
-	else 
-		sql += "0";
-	sql += ", visible_without_conn=";
-	if (theme->withoutDataConnectionVisibility())
-		sql += "1";
-	else 
-		sql += "0";
-
-	sql += ", refine_attribute_where='" + theme->refineAttributeWhere()+"'";
-	sql += ", refine_spatial_where='" + theme->refineSpatialWhere()+"'";
-	sql += ", refine_temporal_where='" + theme->refineTemporalWhere()+"'";
-	sql += ", grouping_color='" + theme->groupColor() + "'";
-	sql += ", grouping_color_direction=" + Te2String(theme->groupColorDir());
-	sql += ", grouping_objects=" + Te2String (theme->groupObjects());
-	sql += ", pie_diameter=" + Te2String(theme->pieDiameter());
-	sql += ", pie_max_diameter=" + Te2String(theme->pieMaxDiameter());
-	sql += ", pie_min_diameter=" + Te2String(theme->pieMinDiameter());
-	sql += ", pie_dimension_attr='" + theme->pieDimAttribute()+"'";
-	sql += ", bar_max_height=" + Te2String(theme->barMaxHeight());
-	sql += ", bar_min_height=" + Te2String(theme->barMinHeight());
-	sql += ", bar_width=" + Te2String(theme->barWidth());
-	sql += ", chart_max_value=" + Te2String(theme->chartMaxVal());
-	sql += ", chart_min_value=" + Te2String(theme->chartMinVal());
-	sql += ", chart_type=" + Te2String (theme->chartType());
-	sql += ", chart_objects=" + Te2String (theme->chartObjects());
-	sql += ", keep_dimension=" + Te2String(theme->keepDimension());
-	sql += ", show_canvas_leg=";
-	if (theme->showCanvasLegend())
-		sql += "1";
-	else 
-		sql += "0";
-	sql += ", canvas_leg_x=" + Te2String(theme->canvasLegUpperLeft().x());
-	sql += ", canvas_leg_y=" + Te2String(theme->canvasLegUpperLeft().y());
-	sql += ", mix_color=";
-	if (theme->mixColor())
-		sql += "1";
-	else 
-		sql += "0";
-	sql += ", count_obj=";
-	if (theme->countObj())
-		sql += "1";
-	else 
-		sql += "0";
-	sql += ", text_table='" + theme->textTable () + "'";
-	sql += ", chart_function='" + theme->chartFunction () + "'";
-	sql += " WHERE theme_id=" + Te2String (theme->id());
-
-	if (!db->execute (sql))
-		return false;
-         
-	// remove it�s chart parameters and reinsert them
-	deleteChartParams(db, theme);
-	if(!insertChartParams (db, theme))
-		return false;
-
-	return true;
-
-//	return theme->mountSqlJoin (false);
-}
-
-
-bool deleteThemeApplication (TeDatabase* db, int themeId)
-{
-	if (!db || themeId < 1) 
-		return false;
-	if (!db->deleteTheme(themeId))
-		return false;
-
-	string sql = "DELETE FROM te_kernel_metadata WHERE event_theme_id_1 = "+ Te2String(themeId);
-	sql += " OR event_theme_id_2 = "+ Te2String(themeId);
-	db->execute(sql);
-
-	if (db->existRelation("te_theme_application", "fk_themeAppl_theme_id") != TeRICascadeDeletion)
-	{
-		// Delete all chart parameters associated to the theme
-		string sql = "DELETE FROM te_theme_application WHERE theme_id =" + Te2String(themeId);
-		if (!db->execute (sql))
-			return false;
-	}
-
-	if (db->existRelation("te_chart_params", "fk_chartpar_theme_id") != TeRICascadeDeletion)
-	{
-		// Delete all chart parameters associated to the theme
-		string sql = "DELETE FROM te_chart_params WHERE theme_id =" + Te2String(themeId);
-		if (!db->execute (sql))
-			return false;
-	}
-	return true;
-}
-
-TeViewTree* 
-loadViewTree(TeDatabase* db, TeView* view, int id)
-{
-	if(db == NULL) return NULL;
-	if(view == NULL) return NULL;
-	TeDatabasePortal* portal = db->getPortal();
-	string q;
-	TeViewTree *node = NULL;
-
-	if(id != 0)
-	{
-		q = "SELECT * FROM te_theme";
-		q += " WHERE view_id = " + Te2String (view->id());
-		q += " AND theme_id = " + Te2String(id);
-		if (!portal->query(q) || portal->fetchRow())
-		{
-			delete portal;
-			return NULL;
-		}
-
-		TeViewNodeType type = (TeViewNodeType)atoi(portal->getData("node_type"));
-		if(type != TeTREE)
-		{
-			portal->freeResult();
-			delete portal;
-			return NULL;
-		}
-
-		node = portal->getViewTree();
-		portal->freeResult();
-	}
-
-	q ="SELECT * FROM te_theme";
-	q += " WHERE view_id = " + Te2String (view->id());
-	q += " AND parent_id = " + Te2String(id);
-	q += " ORDER BY priority ASC";
-
-	if (!portal->query(q))
-	{
-		delete portal;
-		return node;
-	}
-
-	while (portal->fetchRow())
-	{
-		TeViewNodeType childType = (TeViewNodeType)atoi(portal->getData("node_type"));
-		TeViewNode *childNode;
-		if (childType == TeTHEME)
-		{
-			childNode = new TeThemeApplication();
-			childNode->id(atoi(portal->getData("theme_id")));
-			if(loadThemeApplication(db,(TeThemeApplication*) childNode))
-				db->themeMap()[childNode->id()] = (TeTheme*)childNode;
-			else
-				childNode = 0;
-		} 
-		else
-		{
-			childNode = loadViewTree(db, view, atoi(portal->getData("theme_id")));
-		}
-
-		if((id==0) && (childNode))
-		{
-			view->add(childNode);
-		} 
-		else if (childNode)
-		{
-//			view->addTheme(childNode);
-			node->add(childNode);
-		}
-	}
-	
-	delete portal;
-	return node;
-}
-
-bool updateViewTree (TeDatabase* db, TeViewTree *tree)
-{
-	if(tree->id() > 0)
-	{
-		string sql;
-		sql = "UPDATE te_theme SET ";
-		sql += "name='" + tree->name()+"'";
-		sql += ", parent_id=" + Te2String (tree->parentId());
-		sql += ", node_type=" + Te2String (tree->type());
-		sql += " ,priority=" + Te2String (tree->priority());
-//		sql += ", visible_rep=" + Te2String (tree->visible());
-		sql += " WHERE theme_id = " + Te2String(tree->id());
-
-		if(!db->execute (sql)) return false;
-	}
-
-	for (unsigned int th=0; th<tree->size(); th++)
-	{
-		TeViewNode* node = tree->retrieve(th);
-		if (node->type() == TeTHEME)
-		{
-			TeThemeApplication *theme = (TeThemeApplication*)node;
-			if(!updateThemeApplication(db, theme)) return false;
-		}
-		else
-		{
-			TeViewTree* tree = (TeViewTree*)node;
-			if(!updateViewTree(db, tree)) return false;
-		}
-	}
-
-	return true;
-}
-
-int createTeLayerMetadata(TeDatabase* db)
-{
-	TeAttributeList attr;
-	TeAttribute		at;
-
-	at.rep_.type_ = TeINT;
-	at.rep_.name_ = "layer_id";
-	at.rep_.isPrimaryKey_ = true;
-	attr.push_back(at);
-
-	at.rep_.isPrimaryKey_ = false;
-	at.rep_.type_ = TeSTRING;
-	at.rep_.name_ = "name";
-	at.rep_.numChar_ = 128;
-	attr.push_back(at);
-
-	at.rep_.type_ = TeSTRING;
-	at.rep_.name_ = "author";
-	at.rep_.numChar_ = 128;
-	attr.push_back(at);
-
-	at.rep_.type_ = TeSTRING;
-	at.rep_.name_ = "source";
-	at.rep_.numChar_ = 255;
-	attr.push_back(at);
-
-	at.rep_.type_ = TeSTRING;
-	at.rep_.name_ = "quality";
-	at.rep_.numChar_ = 128;
-	attr.push_back(at);
-
-	at.rep_.type_ = TeSTRING;
-	at.rep_.name_ = "description";
-	at.rep_.numChar_ = 255;
-	attr.push_back(at);
-
-	at.rep_.type_ = TeSTRING;
-	at.rep_.name_ = "date_";
-	at.rep_.numChar_ = 64;
-	attr.push_back(at);
-
-	at.rep_.type_ = TeSTRING;
-	at.rep_.name_ = "hour_";
-	at.rep_.numChar_ = 64;
-	attr.push_back(at);
-
-	at.rep_.type_ = TeINT;
-	at.rep_.name_ = "transf";
-	attr.push_back(at);
-
-	if(db->createTable ("te_layer_metadata", attr) == false)
-		return 1;
-
-	bool b = db->tableExist("te_layer_metadata");
-	while(b == false)
-		b = db->tableExist("te_layer_metadata");
-
-	if (db->createRelation("fk_te_layer_met_id", "te_layer_metadata", "layer_id", "te_layer", "layer_id", true) == false)
-		return 2;
-	return 3;
-}
-
-int createTeTableMetadata(TeDatabase* db)
-{
-	TeAttributeList attr;
-	TeAttribute		at;
-
-	at.rep_.type_ = TeINT;
-	at.rep_.name_ = "table_id";
-	at.rep_.isPrimaryKey_ = true;
-	attr.push_back(at);
-
-	at.rep_.isPrimaryKey_ = false;
-	at.rep_.type_ = TeSTRING;
-	at.rep_.name_ = "name";
-	at.rep_.numChar_ = 128;
-	attr.push_back(at);
-
-	at.rep_.type_ = TeSTRING;
-	at.rep_.name_ = "author";
-	at.rep_.numChar_ = 128;
-	attr.push_back(at);
-
-	at.rep_.type_ = TeSTRING;
-	at.rep_.name_ = "source";
-	at.rep_.numChar_ = 255;
-	attr.push_back(at);
-
-	at.rep_.type_ = TeSTRING;
-	at.rep_.name_ = "quality";
-	at.rep_.numChar_ = 128;
-	attr.push_back(at);
-
-	at.rep_.type_ = TeSTRING;
-	at.rep_.name_ = "description";
-	at.rep_.numChar_ = 255;
-	attr.push_back(at);
-
-	at.rep_.type_ = TeSTRING;
-	at.rep_.name_ = "date_";
-	at.rep_.numChar_ = 64;
-	attr.push_back(at);
-
-	at.rep_.type_ = TeSTRING;
-	at.rep_.name_ = "hour_";
-	at.rep_.numChar_ = 64;
-	attr.push_back(at);
-
-	at.rep_.type_ = TeINT;
-	at.rep_.name_ = "transf";
-	attr.push_back(at);
-
-	if(db->createTable ("te_table_metadata", attr) == false)
-		return 1;
-
-	bool b = db->tableExist("te_table_metadata");
-	while(b == false)
-		b = db->tableExist("te_table_metadata");
-
-	if (db->createRelation("fk_te_table_met_id", "te_table_metadata", "table_id", "te_layer_table", "table_id", true) == false)
-		return 2;
-	return 3;
-}
-
-
-bool deleteTextVisual(TeLayer* layer)
-{
-	TeDatabase*	db = layer->database();
-	TeDatabasePortal*	portal = db->getPortal();
-
-	string sel = "SELECT geom_table FROM te_representation";
-	sel += " WHERE layer_id = " + Te2String(layer->id());
-	sel += " AND geom_type = " + Te2String(TeTEXT);
-
-	if(portal->query(sel))
-	{
-		while(portal->fetchRow())
-		{
-			string s = portal->getData(0);
-			string drop = "DROP TABLE " + s + "_txvisual";
-			if(db->execute(drop) == false)
-			{
-				delete portal;
-				return false;	
-			}
-		}
-	}
-	delete portal;
-	return true;
-}
-
-
-bool isTerralibModel(TeDatabase* db)
-{
-	vector<string>::iterator it;
-	vector<string> tables;
-	db->listTables(tables);
-
-	for(unsigned int i = 0; i<tables.size(); i++)
-	{
-		if((it = find(tables.begin(), tables.end(), "te_projection")) == tables.end())
-			return false;
-		if((it = find(tables.begin(), tables.end(), "te_layer")) == tables.end())
-			return false;
-		if((it = find(tables.begin(), tables.end(), "te_layer_table")) == tables.end())
-			return false;
-		if((it = find(tables.begin(), tables.end(), "te_tables_relation")) == tables.end())
-			return false;
-		if((it = find(tables.begin(), tables.end(), "te_representation")) == tables.end())
-			return false;
-		if((it = find(tables.begin(), tables.end(), "te_view")) == tables.end())
-			return false;
-		if((it = find(tables.begin(), tables.end(), "te_theme")) == tables.end())
-			return false;
-		if((it = find(tables.begin(), tables.end(), "te_grouping")) == tables.end())
-			return false;
-		if((it = find(tables.begin(), tables.end(), "te_theme_table")) == tables.end())
-			return false;
-		if((it = find(tables.begin(), tables.end(), "te_legend")) == tables.end())
-			return false;
-		if((it = find(tables.begin(), tables.end(), "te_visual")) == tables.end())
-			return false;
-		if((it = find(tables.begin(), tables.end(), "te_visual_raster")) == tables.end())
-			return false;
-		if((it = find(tables.begin(), tables.end(), "te_database")) == tables.end())
-			return false;
-	}
-	if(tables.size() == 0)
-		return false;
-
-	return true;
-}
-
-string insertObjectIntoCollection(TeTheme* theme, TeCoord2D p, string newId, string newTId)
-{
-	string erro;
-	string sel;
-	TeLayer* layer = theme->layer();
-	TeDatabase* db = layer->database();
-	string CT = theme->collectionTable();
-	string CAT = theme->collectionAuxTable();
-
-	TeDatabasePortal* portal = db->getPortal();
-	if(newId.empty() == false)
-	{
-		sel = "SELECT * FROM " + CT + " WHERE c_object_id = '" + newId + "'";
-		if(portal->query(sel) && portal->fetchRow())
-		{
-//			erro = "There is already the object identifier:" + newId;
-//			erro += " in the collection table:" + CT;
-			delete portal;
-			return "There is already";
-		}
-	}
-
-//	if(newTId.empty() == false)
-//	{
-//		sel = "SELECT * FROM " + CAT + " WHERE aux0 = '" + newTId + "'";
-//		portal->freeResult();
-//		if(portal->query(sel) && portal->fetchRow())
-//		{
-//			erro = "There is already the object identifier:" + newTId;
-//			erro += " in the collection auxliar table:" + CAT;
-//			delete portal;
-//			return erro;
-//		}
-//	}
-	delete portal;
-
-	unsigned int i;
-	vector<TeTable> staticTableVec, eventTableVec, temporalTableVec;
-	TeAttrTableVector layerTablesVector;
-	if(layer->getAttrTables(layerTablesVector))
-	{
-		for(i=0; i<layerTablesVector.size(); i++)
-		{
-			TeTable t = layerTablesVector[i];
-			if(t.tableType() == TeAttrStatic)
-				staticTableVec.push_back(t);
-			else if(t.tableType() == TeAttrEvent)
-				eventTableVec.push_back(t);
-			else if(t.tableType() == TeFixedGeomDynAttr)
-				temporalTableVec.push_back(t);
-		}
-	}
-	else
-	{
-		erro = "Fail in the layer method to gets attribute table associated";
-		return erro;
-	}
-
-	bool ret;
-	if(newId.empty() == false)
-	{
-		string ins = "INSERT INTO " + CT + " (c_object_id, c_legend_id,";
-		ins += " label_x, label_y, c_legend_own, c_object_status) VALUES (";
-		ins += "'" + newId + "', 0, " + Te2String(p.x()) + ", " + Te2String(p.y());
-		ins += ", 0, 1)";
-		ret = db->execute(ins);
-		if(ret == false)
-			return db->errorMessage();
-
-		for(i=0; i<staticTableVec.size(); i++)
-		{
-			TeTable t = staticTableVec[i];
-			ins = "INSERT INTO " + t.name() + " (" + t.linkName() + ")";
-			ins += " VALUES ('" + newId + "')";
-			ret = db->execute(ins);
-			if(ret == false)
-				return db->errorMessage();
-		}
-		for(i=0; i<eventTableVec.size(); i++)
-		{
-			TeTable t = eventTableVec[i];
-			ins = "INSERT INTO " + t.name() + " (" + t.linkName() + ")";
-			ins += " VALUES ('" + newId + "')";
-			ret = db->execute(ins);
-			if(ret == false)
-				return db->errorMessage();
-		}
-	}
-
-	string uniqueId = newId;
-	if(newTId.empty() == false)
-	{
-		uniqueId = newId + newTId;
-		string ins = "INSERT INTO " + CAT + " (object_id, aux0, unique_id, grid_status) VALUES (";
-		ins += "'" + newId + "', '" + newTId + "', '" + uniqueId + "', 1)";
-		ret = db->execute(ins);
-		if(ret == false)
-			return db->errorMessage();
-
-		for(i=0; i<temporalTableVec.size(); i++)
-		{
-			TeTable t = temporalTableVec[i];
-			ins = "INSERT INTO " + t.name() + " (" + t.linkName() + ", " + t.uniqueName() + ")";
-			ins += " VALUES ('" + newId + "', '" + newTId + "')";
-			ret = db->execute(ins);
-			if(ret == false)
-				return db->errorMessage();
-		}
-	}
-	else
-	{
-		string ins = "INSERT INTO " + CAT + " (object_id, unique_id, grid_status) VALUES (";
-		ins += "'" + newId + "', '" + uniqueId + "', 1)";
-		ret = db->execute(ins);
-		if(ret == false)
-			return db->errorMessage();
-	}
-
-	return "";
-}
-
-string deletePointedObjects(TeTheme* theme, TeBox& box)
-{
-	unsigned int i;
-	TeLayer* layer = theme->layer();		
-	TeDatabase* db = layer->database();
-	TeThemeMap&	themeMap = db->themeMap();
-	string CT = theme->collectionTable();
-	string CAT = theme->collectionAuxTable();
-	string tsel, sel, del;
-	vector<TeTable> table;
-	vector<TeTable> ttable;
-	vector<string> selVec;
-	vector<string> selAuxVec;
-
-	TeAttrTableVector layerTablesVector;
-	layer->getAttrTables(layerTablesVector);
-
-// delete temporal instances of TeFixedGeomDynAttr tables
-	for(i=0; i<layerTablesVector.size(); i++)
-	{
-		TeTable t = layerTablesVector[i];
-		TeAttrTableType type = t.tableType();
-
-		if(type == TeFixedGeomDynAttr)
-			ttable.push_back(t);
-	}
-
-	if(ttable.size())
-	{
-		tsel = "(SELECT aux0 FROM " + CAT;
-		tsel += " WHERE grid_status = 1 OR grid_status = 3)";
-
-		for(i=0; i<ttable.size(); i++)
-		{
-			del = "DELETE FROM " + ttable[i].name() + " WHERE " + ttable[i].uniqueName() + " IN " + tsel;
-			if(db->execute(del) == false)
-				return db->errorMessage();
-		}
-	}
-
-// get selected object ids
-	TeDatabasePortal* portal = db->getPortal();
-	vector<string> oidVec;
-	sel = "SELECT DISTINCT object_id FROM " + CAT;
-	sel += " WHERE (grid_status = 1 OR grid_status = 3) AND object_id NOT IN";
-	sel += "(SELECT DISTINCT object_id FROM " + CAT;
-	sel += " WHERE grid_status = 0 OR grid_status = 2)";
-	portal->freeResult();
-	if(portal->query(sel))
-	{
-		while(portal->fetchRow())
-		{
-			string oid = portal->getData(0);
-			oidVec.push_back(oid);
-		}
-	}
-
-	sel = "SELECT * FROM " + CT + " as T LEFT JOIN " + CAT + " as TT";
-	sel += " ON T.c_object_id = TT.object_id WHERE TT.grid_status is null";
-	sel += " AND (T.c_object_status = 1 OR T.c_object_status = 3)";
-	portal->freeResult();
-	if(portal->query(sel))
-	{
-		while(portal->fetchRow())
-		{
-			string oid = portal->getData(0);
-			oidVec.push_back(oid);
-		}
-	}
-	vector<string>::iterator itB = oidVec.begin();
-	vector<string>::iterator itE = oidVec.end();
-	selVec = generateInClauses(itB,itE, db, true);
-
-// delete attributes of TeAttrStatic tables and TeAttrEvent tables
-	for(i=0; i<layerTablesVector.size(); i++)
-	{
-		TeTable t = layerTablesVector[i];
-		TeAttrTableType type = t.tableType();
-
-		if(type == TeAttrStatic || type == TeAttrEvent)
-			table.push_back(t);
-	}
-
-	for(i=0; i<table.size(); i++)
-	{
-		for(i=0; i<selVec.size(); i++)
-		{
-			del = "DELETE FROM " + table[i].name() + " WHERE ";
-			del += table[i].linkName() + " IN " + selVec[i];
-			if(db->execute(del) == false)
-			{
-				delete portal;
-				return db->errorMessage();
-			}
-		}
-	}
-
-	double minX = TeMAXFLOAT, minY = TeMAXFLOAT, maxX = -TeMAXFLOAT, maxY = -TeMAXFLOAT;
-// delete selected geometries
-	if(layer->geomRep() & TePOLYGONS)
-	{
-		string geo = layer->tableName(TePOLYGONS);
-		for(i=0; i<selVec.size(); i++)
-		{
-			string boxsel = "SELECT * FROM " + geo;
-			boxsel += " WHERE object_id IN " + selVec[i];
-
-			portal->freeResult();
-			if(portal->query(boxsel))
-			{
-				while(portal->fetchRow())
-				{
-					double x1 = portal->getDouble("lower_x");
-					double y1 = portal->getDouble("lower_y");
-					double x2 = portal->getDouble("upper_x");
-					double y2 = portal->getDouble("upper_y");
-					TeBox b(x1, y1, x2, y2);
-					box = TeUnion(box, b);
-				}
-			}
-			del = "DELETE FROM " + geo + " WHERE object_id IN " + selVec[i];
-			if(db->execute(del) == false)
-			{
-				delete portal;
-				return db->errorMessage();
-			}
-		}
-		string bb = "SELECT MIN(lower_x), MIN(lower_y), MAX(upper_x), MAX(upper_y) FROM " + geo;
-		portal->freeResult();
-		if(portal->query(bb) && portal->fetchRow())
-		{
-			minX = MIN(minX, portal->getDouble(0));
-			minY = MIN(minY, portal->getDouble(1));
-			maxX = MAX(maxX, portal->getDouble(2));
-			maxY = MAX(maxY, portal->getDouble(3));
-		}
-	}
-	if(layer->geomRep() & TePOINTS)
-	{
-		string geo = layer->tableName(TePOINTS);
-		for(i=0; i<selVec.size(); i++)
-		{
-			string boxsel = "SELECT * FROM " + geo;
-			boxsel += " WHERE object_id IN " + selVec[i];
-
-			portal->freeResult();
-			if(portal->query(boxsel))
-			{
-				while(portal->fetchRow())
-				{
-					double x = portal->getDouble("x");
-					double y = portal->getDouble("y");
-					TeBox b(x, y, x, y);
-					box = TeUnion(box, b);
-				}
-			}
-			del = "DELETE FROM " + geo + " WHERE object_id IN " + selVec[i];
-			if(db->execute(del) == false)
-			{
-				delete portal;
-				return db->errorMessage();
-			}
-		}
-		string bb = "SELECT MIN(x), MIN(y), MAX(x), MAX(y) FROM " + geo;
-		portal->freeResult();
-		if(portal->query(bb) && portal->fetchRow())
-		{
-			minX = MIN(minX, portal->getDouble(0));
-			minY = MIN(minY, portal->getDouble(1));
-			maxX = MAX(maxX, portal->getDouble(2));
-			maxY = MAX(maxY, portal->getDouble(3));
-		}
-	}
-	if(layer->geomRep() & TeCELLS)
-	{
-		string geo = layer->tableName(TeCELLS);
-		for(i=0; i<selVec.size(); i++)
-		{
-			string boxsel = "SELECT * FROM " + geo;
-			boxsel += " WHERE object_id IN " + selVec[i];
-
-			portal->freeResult();
-			if(portal->query(boxsel))
-			{
-				while(portal->fetchRow())
-				{
-					double x1 = portal->getDouble("lower_x");
-					double y1 = portal->getDouble("lower_y");
-					double x2 = portal->getDouble("upper_x");
-					double y2 = portal->getDouble("upper_y");
-					TeBox b(x1, y1, x2, y2);
-					box = TeUnion(box, b);
-				}
-			}
-			del = "DELETE FROM " + geo + " WHERE object_id IN " + selVec[i];
-			if(db->execute(del) == false)
-			{
-				delete portal;
-				return db->errorMessage();
-			}
-		}
-		string bb = "SELECT MIN(lower_x), MIN(lower_y), MAX(upper_x), MAX(upper_y) FROM " + geo;
-		portal->freeResult();
-		if(portal->query(bb) && portal->fetchRow())
-		{
-			minX = MIN(minX, portal->getDouble(0));
-			minY = MIN(minY, portal->getDouble(1));
-			maxX = MAX(maxX, portal->getDouble(2));
-			maxY = MAX(maxY, portal->getDouble(3));
-		}
-	}
-	if(layer->geomRep() & TeLINES)
-	{
-		string geo = layer->tableName(TePOINTS);
-		for(i=0; i<selVec.size(); i++)
-		{
-			string boxsel = "SELECT * FROM " + geo;
-			boxsel += " WHERE object_id IN " + selVec[i];
-
-			portal->freeResult();
-			if(portal->query(boxsel))
-			{
-				while(portal->fetchRow())
-				{
-					double x1 = portal->getDouble("lower_x");
-					double y1 = portal->getDouble("lower_y");
-					double x2 = portal->getDouble("upper_x");
-					double y2 = portal->getDouble("upper_y");
-					TeBox b(x1, y1, x2, y2);
-					box = TeUnion(box, b);
-				}
-			}
-			del = "DELETE FROM " + geo + " WHERE object_id IN " + selVec[i];
-			if(db->execute(del) == false)
-			{
-				delete portal;
-				return db->errorMessage();
-			}
-		}
-		string bb = "SELECT MIN(lower_x), MIN(lower_y), MAX(upper_x), MAX(upper_y) FROM " + geo;
-		portal->freeResult();
-		if(portal->query(bb) && portal->fetchRow())
-		{
-			minX = MIN(minX, portal->getDouble(0));
-			minY = MIN(minY, portal->getDouble(1));
-			maxX = MAX(maxX, portal->getDouble(2));
-			maxY = MAX(maxY, portal->getDouble(3));
-		}
-	}
-
-	double dx = maxX - minX;
-	double dy = maxY - minY;
-	minX -= dx/20.;
-	maxX += dx/20.;
-	minY -= dy/20.;
-	maxY += dy/20.;
-
-	string up = "UPDATE te_layer SET lower_x = " + Te2String(minX);
-	up += ", lower_y = " + Te2String(minY);
-	up += ", upper_x = " + Te2String(maxX);
-	up += ", upper_y = " + Te2String(maxY);
-	up += " WHERE layer_id = " + Te2String(layer->id());
-	if(db->execute(up) == false)
-	{
-		delete portal;
-		return db->errorMessage();
-	}
-	TeBox nbox(minX, minY, maxX, maxY);
-	layer->setLayerBox(nbox);
-
-// get collection names of all themes that use this layer
-	vector<string> CATFVec;
-	vector<string> CATVec;
-	vector<string> CTVec;
-	string ss = "SELECT theme_id FROM te_theme WHERE layer_id = " + Te2String(layer->id());
-	portal->freeResult();
-	if(portal->query(ss))
-	{
-		while(portal->fetchRow())
-		{
-			int id = atoi(portal->getData(0));
-			if(id != theme->id())
-			{
-				TeTheme* t = themeMap[id];
-				TeAttrTableVector& tableVec = t->attrTables();
-				for(i=0; i<tableVec.size(); i++)
-				{
-					string s = t->collectionAuxTable();
-					if(tableVec[i].tableType() == TeFixedGeomDynAttr)
-						CATFVec.push_back(s);
-					else
-						CATVec.push_back(s);
-				}
-				string s = t->collectionTable();
-				CTVec.push_back(s);
-			}
-		}
-	}
-	delete portal;
-
-// delete selected objects of the collections of other themes
-	for(i=0; i<CTVec.size(); i++)
-	{
-		for(i=0; i<selVec.size(); i++)
-		{
-			del = "DELETE FROM " + CTVec[i] + " WHERE c_object_id IN " + selVec[i];
-			if(db->execute(del) == false)
-				return db->errorMessage();
-		}
-	}
-
-// delete selected objects of the collection this theme
-	for(i=0; i<selVec.size(); i++)
-	{
-		del = "DELETE FROM " + CT + " WHERE c_object_id IN " + selVec[i];
-		if(db->execute(del) == false)
-			return db->errorMessage();
-	}
-
-	up = "UPDATE " + CT + " SET c_object_status = c_object_status - 1 WHERE (c_object_status = 1 OR c_object_status = 3)";
-	if(db->execute(up) == false)
-		return db->errorMessage();
-
-// delete selected instances of the auxiliar collection of other themes (only TeFixedGeomDynAttr)
-	if(ttable.size())
-	{
-		for(i=0; i<CATFVec.size(); i++)
-		{
-			del = "DELETE FROM " + CATFVec[i] + " WHERE aux0 IN " + tsel;
-			if(db->execute(del) == false)
-				return db->errorMessage();
-		}
-	}
-
-// delete selected instances of the auxiliar collection of other themes (TeAttrStatic and TeAttrEvent)
-	unsigned int j;
-	for(i=0; i<CATVec.size(); i++)
-	{
-		for(j=0; j<selVec.size(); j++)
-		{
-			del = "DELETE FROM " + CATVec[i] + " WHERE object_id IN " + selVec[j];
-			if(db->execute(del) == false)
-				return db->errorMessage();
-		}
-	}
-
-// delete selected instances of the auxiliar collection this theme
-	del = "DELETE FROM " + CAT + " WHERE grid_status = 1 OR grid_status = 3";
-	if(db->execute(del) == false)
-		return db->errorMessage();
-
-	return "";
-}
-
-bool TeCopyDatabase(TeDatabase* dbFrom, TeDatabase* dbTo)
-{
-	// -- Step 1 : copies the external tables
-	TeAttrTableVector externs;
-	dbFrom->getAttrTables(externs,TeAttrExternal);
-	if (!externs.empty())
-	{
-		TeDatabasePortal* portal = dbFrom->getPortal();
-		if (!portal)
-		{
-			// log error here
-			return false;
-		}
-
-		for (unsigned int nt=0; nt < externs.size(); nt++)
-		{
-			TeTable table = externs[nt];
-			table.setId(-1);
-			string sql = "select * from " + table.name();
-			if (!portal->query(sql) || portal->numRows() == 0)
-			{
-				portal->freeResult();
-				continue;
-			}
-			if (!dbTo->createTable(table.name(),table.attributeList()))
-			{
-				portal->freeResult();
-				continue;
-			}
-			unsigned int nr=0;
-			while (portal->fetchRow())
-			{
-				TeTableRow row;
-				for(int i = 0; i < portal->numFields(); i++)
-					row.push_back(portal->getData(i));
-				table.add(row);
-				nr++;
-				if (nr % 200)
-				{
-					dbTo->insertTable(table);
-					table.clear();
-					nr = 0;
-				}
-			}
-			if (table.size() >0)
-				dbTo->insertTable(table);
-				table.clear();	
-			dbTo->insertTableInfo(-1,table);
-			portal->freeResult();
-		}
-		delete portal;
-	}
-
-	// -- Step 2: Copies the layers
-	if(!dbFrom->loadLayerSet())
-	{
-		// log error here
-		return false;
-	}
-
-	TeLayerMap& fromLayerMap = dbFrom->layerMap();
-	TeLayerMap::iterator itFrom = fromLayerMap.begin();
-
-	while(itFrom != fromLayerMap.end())
-	{
-		TeLayer* fromLayer = (*itFrom).second;
-		TeLayer* toLayer = new TeLayer(fromLayer->name(), dbTo, fromLayer->projection());
-		map<string, string> tables;
-		if (!TeCopyLayerToLayer(fromLayer, toLayer, &tables))
-		{
-			// log error here: layer couldn�t be copied
-		}
-		++itFrom;
-	}
-	// -- Set 3: Copies the views and themes
-	if(!dbFrom->loadViewSet(dbFrom->user()))
-	{
-		// log error here
-		return false;
-	}
-
-	if(!dbTo->loadLayerSet())
-	{
-		// log error here
-		return false;
-	}
-
-	TeViewMap&	fromViewMap = dbFrom->viewMap();
-	TeViewMap::iterator itvFrom = fromViewMap.begin();
-	while (itvFrom != fromViewMap.end())
-	{
-		TeView* fromView = (*itvFrom).second;			
-		TeView* toView = new TeView();
-
-		TeProjection* toViewProjection = 0;
-		if (fromView->projection())
-			 toViewProjection = TeProjectionFactory::make(fromView->projection()->params());
-		
-		toView->projection(toViewProjection);
-		toView->name(fromView->name());
-		toView->user(dbTo->user());
-		toView->isVisible(fromView->isVisible());
-
-		if (!dbTo->insertView(toView))
-		{
-			// log error here
-			++itvFrom;
-			continue;
-		}
-
-		TeLayerMap& toLayerMap = dbTo->layerMap();			
-		vector<TeViewNode*>& themeVec = fromView->themes();
-		for (unsigned int i = 0; i < themeVec.size(); ++i)
-		{
-			TeTheme* themeFrom = (TeTheme*) themeVec[i];
-			string fromLayerName = themeFrom->layer()->name();
-			TeLayer* toLayer = 0;
-			TeLayerMap::iterator itTo = toLayerMap.begin();
-			while(itTo != toLayerMap.end())
-			{
-				if(itTo->second->name() == fromLayerName)
-				{
-					toLayer = itTo->second;
-					break;
-				}
-				++itTo;
-			}
-
-			if (!toLayer )
-			{
-				// log error here
-				continue;
-			}
-			
-			TeTheme* themeTo = new TeTheme(themeFrom->name(), toLayer);
-			toView->add(themeTo);
-						
-			themeTo->outOfCollectionLegend(themeFrom->outOfCollectionLegend());
-			themeTo->withoutDataConnectionLegend(themeFrom->withoutDataConnectionLegend ());
-			themeTo->defaultLegend(themeFrom->defaultLegend());
-			themeTo->pointingLegend(themeFrom->pointingLegend());
-			themeTo->queryLegend(themeFrom->queryLegend());
-
-			TeAttrTableVector tftablevec = themeFrom->attrTables();
-			TeAttrTableVector tttablevec;
-
-			for (unsigned int nt=0; nt<tftablevec.size(); nt++)
-			{
-				TeTable attTable(tftablevec[nt].name());
-				dbTo->loadTableInfo(attTable);
-				tttablevec.push_back(attTable);
-			}
-			themeTo->setAttTables(tttablevec);
-			themeTo->attributeRest(themeFrom->attributeRest());
-			themeTo->temporalRest(themeFrom->temporalRest());
-			themeTo->spatialRest(themeFrom->spatialRest());
-			themeTo->visibleRep(themeFrom->visibleRep());
-			if(!themeTo->save() || !themeTo->buildCollection())
-			{
-				// log error here
-				continue;
-			}
-			themeTo->generateLabelPositions();
-			
-			if(themeFrom->grouping())
-			{
-				TeGrouping* grouping = new TeGrouping();
-				(*grouping) = (*themeFrom->grouping());
-				
-				themeTo->buildGrouping(grouping);
-				TeLegendEntryVector& legends = themeFrom->legend();
-				for (unsigned int nl=0; nl<legends.size(); nl++)
-					themeTo->setGroupingVisual(nl+1,legends[nl].getVisualMap());
-				if (!themeTo->saveGrouping())
-				{
-						// log error here
-				}
-			}
-		} // end for each theme
-		++itvFrom;
-	} // end for each view
-	return true;
-}
-
-
-
diff --git a/src/terralib/application/TeDatabaseUtils.h b/src/terralib/application/TeDatabaseUtils.h
deleted file mode 100644
index 3901baa..0000000
--- a/src/terralib/application/TeDatabaseUtils.h
+++ /dev/null
@@ -1,179 +0,0 @@
-/************************************************************************************
-TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The library provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use
-of this library and its documentation.
-*************************************************************************************/
-
-/*! \file TeDatabaseUtils.h
-    This contains some utilitary functions to create some tables useful for 
-	TerraView like applications.
-*/
-#ifndef __TERRALIB_INTERNAL_DATABASEUTILS_H
-#define __TERRALIB_INTERNAL_DATABASEUTILS_H
-
-#include "TeThemeApplication.h"
-#include <TeDatabase.h>
-#include <string>
-#include <map>
-
-class	TeView;
-struct	TeKernelParams;
-
- 
-/*!
-	\fn bool createColorSchemeTable(TeDatabase* db, const string& tname="te_color_scheme")
-	\brief Creates a standard TerraView table to store color ramps 
- 	\param db pointer to an opened database connection
- 	\note The table created will have the following scheme:
- 
-   \par  --------------------------------------------------
-   \par | ramp_name  |  color_order  | red  | green | blue |
-   \par ----------------------------------------------------
-   \par | red        |      1        | 255  |  256  | 256  |
-   \par | red        |      2        | 196  |  195  | 256  |
-   \par | red        |      3        | 123  |  124  | 256  |
-   \par | green      |      1        | 0    |  256  | 123  |
-   \par | ...        |     ...       | ...  |  ...  | ...  |
-   \par ---------------------------------------------------
-*/
-bool createColorSchemeTable(TeDatabase* db, const string& tname="te_color_scheme");
-
-//! Populates a color scheme table with 30 ramp colors, each ramp with 13 shades
-bool populateColorSchemeTable(TeDatabase* db, const string& tname="te_color_scheme");
-
-//! Insert a ramp color entry in the database
-bool insertRampColor(TeDatabase* bd, const string& name, int order, TeColor& color, const string& tableName = "te_color_scheme");
-
-//! Insert some default colors a grid color table
-bool updateGridColor(TeDatabase* bd, int themeId, TeObjectSelectionMode sel, TeColor& color);
-
-//! Creates table to store information about the results of Kernel algorithm
-bool createKernelMetadataTable(TeDatabase* db);
-
-//! Inserts kernel parameters
-bool insertKernelMetadata(TeDatabase* db, TeKernelParams& kernelPar);
-
-//! Updates kernel parameters in a database -- inserts if it does not exist
-bool updateKernelMetadata(TeDatabase* db, TeKernelParams& kernelPar);
-
-//! Creates a table to store multimedia documents 
-bool createMediaTable(TeDatabase* db, const string& tname);
-
-//! Creates a table to store the association between objects of a layer and its multimedia attributes
-bool createLayerMediaTable(TeDatabase* db, int layerId, const string& tname);
-
-//! Inserts a new media file in a database
-bool insertMedia(TeDatabase* db, const string& tableName, string fileName, const string& description, const string& type, bool blob=true);
-
-//! Associates a media data to an object of a layer
-bool insertMediaObjLayer (TeDatabase* db, TeLayer* layer, const string& objectId, const string& mediaName, const string& mediaTable); 
-
-//! Sets a media as a default media of an object of a layer
-bool setDefaultMedia(TeDatabase* db, TeLayer* layer, const string& objectId, const string& mediaName, const string& mediaTable);
-
-//! Updates a media description in a database
-bool updateMediaDescription(TeDatabase* db, const string& mediaName, const string& mediaTable, const string& desc);
-
-//! Load the kernel parameters 
-bool loadKernelParams (TeDatabase* db, int supThemeId, const string& supTableName, const string& supAttrName, TeKernelParams& KernelPar);
-
-//! Load the kernel parameters 
-bool loadKernelParams (TeDatabase* db, int LayerId, TeKernelParams& KernelPar);
-
-//! Creates a table to store parameters of bar and pie charts 
-bool createChartParamsTable(TeDatabase* db, bool integrity=false);	
-
-//! Retrieves the location of pie/bar charts over the objects of a theme
-bool locatePieBar (TeDatabase* db, TeThemeApplication* theme, TeCoord2D pt, double delta);
-
-//! Load the charts parameters of a theme in the database
-bool loadChartParams (TeDatabase* db, TeThemeApplication *theme);
-
-//! Sets the location of pie/bar charts over the objects of a theme
-bool updatePieBarLocation (TeDatabase* db, TeThemeApplication* theme, TeCoord2D pt); 
-
-//! Sets the location of point of a layer
-bool updatePointLocation (TeDatabase* db, TeThemeApplication* theme, TeCoord2D pt); 
-
-//! Insert the chart parameters of a theme in the database
-bool insertChartParams(TeDatabase* bd, TeThemeApplication *theme);
-
-//! Delete the chart parameters of a theme in the database
-bool deleteChartParams (TeDatabase* bd, TeThemeApplication *theme);
-
-//! Loads a set of views that belongs to a user
-bool loadViewSet(TeDatabase* db, const string& user);
-
-//! Updates the parameters of a view
-bool updateView(TeDatabase* db, TeView *view);
-
-//! Creates a table to store other information about the theme 
-bool createThemeApplicationTable(TeDatabase* db, bool integrity=false);
-
-//! Populates the te_theme_application table with default parameters
-bool populateThemeApplicationTable(TeDatabase* db);
-
-//! Loads the parameters of a ThemeApplication
-bool loadThemeApplication (TeDatabase* db, TeThemeApplication *theme, const string& tableName="te_theme_application");
-
-//! Saves the parameters of a ThemeApplication
-bool insertThemeApplication (TeDatabase* db, TeThemeApplication *theme, const string& tableName="te_theme_application");
-
-//! Updates the parameters of a theme application
-bool updateThemeApplication (TeDatabase* db, TeThemeApplication *theme);
-
-//! Delete a theme application
-bool deleteThemeApplication (TeDatabase* db, int themeId);
-
-//! Recursive load view tree from a database
-TeViewTree* loadViewTree(TeDatabase* db, TeView* view, int id);
-
-//! Updates a tree view structure in a database
-bool updateViewTree (TeDatabase* db, TeViewTree *tree);
-
-//! Creates a table to store metadata about layers 
-int createTeLayerMetadata(TeDatabase* db);
-
-//! Creates a table to store metadata about attribute tables 
-int createTeTableMetadata(TeDatabase* db);
-
-//! Removes tables that visual of texts associated to a layer
-bool deleteTextVisual(TeLayer* layer);
-
-//! Returns true whether a database contains the TerraLib data model
-bool isTerralibModel(TeDatabase* db);
-
-//! insert a new object into collection
-string insertObjectIntoCollection(TeTheme* theme, TeCoord2D p, string newId, string newTId = "");
-
-//! delete pointed objects
-string deletePointedObjects(TeTheme* theme, TeBox& box);
-
-//! \fn bool TeCopyDatabase(TeDatabase* dbFrom, TeDatabase* dbTo)
-/*
-    \brief This function copies the contents of a TerraLib database to another TerraLib database
-	\param dbFrom A pointer to the source database
-	\param dbTo	  A pointer to the destination database
-*/
-bool TeCopyDatabase(TeDatabase* dbFrom, TeDatabase* dbTo);
-
-
-#endif
-
diff --git a/src/terralib/application/TeGUIUtils.cpp b/src/terralib/application/TeGUIUtils.cpp
deleted file mode 100644
index 563e40f..0000000
--- a/src/terralib/application/TeGUIUtils.cpp
+++ /dev/null
@@ -1,141 +0,0 @@
-#include "TeGUIUtils.h"
-#include <TeViewNode.h>
-#include <TeThemeApplication.h>
-
-bool fillThemeCombo(TeGeomRep tg, TeView* view, QComboBox* cBox, string selName, bool clear)
-{
-	vector<TeViewNode *> themeVec = view->themes();
-//	bool enableWindow = false;
-	
-	if (clear)
-		cBox->clear();
-	
-	int idx = 0;
-	int count = 0;
-	
-	for(unsigned int i=0; i<themeVec.size(); i++)
-	{
-		TeThemeApplication* t = (TeThemeApplication *)themeVec[i];
-		if(t->layer()->hasGeometry(tg))
-		{
-			cBox->insertItem(t->name().c_str());
-			if (!t->name().compare(selName)) {
-				idx = count;
-			}
-			count++;
-		}
-	}
-  
-	if (count > 0) {
-		cBox->setCurrentItem(idx);
-	}
-	
-	return (count > 0);
-}
-
-
-bool fillTableCombo(TeView* view,
-                     QComboBox *cTableCombo, 
-                     QComboBox *cThemeCombo,
-                     string selName, bool clear)
-{
-	TeTable ttable;
-	string tableName;
-	string themeName =  string(cThemeCombo->currentText().ascii());
-	TeTheme* currTheme = view->get(themeName);
-
-	if (currTheme == NULL) 
-		return false;
-
-	TeAttrTableVector atvec;
-  currTheme->getAttTables(atvec);
-	
-	if (atvec.size() == 0)
-		return false;
-
-	if (clear)
-		cTableCombo->clear();
-	int idx = 0;
-	
-	for(unsigned int i=0; i<atvec.size(); i++)
-	{
-		TeTable ttable = atvec[i];
-		tableName = ttable.name();
-		cTableCombo->insertItem(tableName.c_str());
-		if (!selName.compare(tableName)) {
-			idx = i;
-		}
-	}
-	
-	cTableCombo->setCurrentItem(idx);
-	return true;
-}
-
-
-bool fillColumnCombo(TeAttrDataType aType,
-                      TeTheme* theme,
-                      QComboBox *cColumnCombo, 
-                      QComboBox *cTableCombo,
-                      string selName, bool clear) {
-
-//	bool done = false;
-  
-	TeAttributeList columns;
-	TeAttrTableVector atvec;
-  theme->getAttTables(atvec);
-
-	string tableName = string(cTableCombo->currentText().ascii());
-	unsigned int t;
-
-	for (t = 0; t < atvec.size(); t++) {
-		if (!tableName.compare(atvec[t].name()))
-			break;
-	}
-	
-	if (t == atvec.size())
-		return false;
-
-	TeTable ttable = atvec[t];
-	columns = ttable.attributeList();
-	
-	if (clear)
-		cColumnCombo->clear();
-	
-	int idx = 0;
-	int count = 0;
-	
-	for(unsigned int i=0; i<columns.size(); i++)
-	{
-		int type = columns[i].rep_.type_;
-		string colName = columns[i].rep_.name_;	
-		if ((aType == TeUNKNOWN) || (type == aType)) {
-			cColumnCombo->insertItem(colName.c_str());
-			if (!selName.compare(colName)) {
-				idx = count;
-			}
-			count++;
-		}
-	}
-	
-	if (count > 0) 
-		cColumnCombo->setCurrentItem(idx);
-	
-	return count> 0;
-}
-
-bool fillColumnCombo(vector<TeAttrDataType> &aTypeVec,
-                      TeTheme* theme,
-                      QComboBox *cColumnCombo, 
-                      QComboBox *cTableCombo,
-                      string selName, bool clear)
-{
-	bool result = true;
-	
-	for(unsigned int i = 0; i < aTypeVec.size(); i++)
-	{
-		result = fillColumnCombo(aTypeVec[i], theme, cColumnCombo, cTableCombo, selName, clear);
-		if(!result)
-			return false;
-	}
-	return true;
-}
diff --git a/src/terralib/application/TeGUIUtils.h b/src/terralib/application/TeGUIUtils.h
deleted file mode 100644
index 4fc5ecd..0000000
--- a/src/terralib/application/TeGUIUtils.h
+++ /dev/null
@@ -1,42 +0,0 @@
-#ifndef __GUIUTILSH
-#define __GUIUTILSH
-
-#include <TeDataTypes.h>
-#include <TeView.h>
-#include <qcombobox.h>
-/**
- * Acha temas na vista que contenham geometria de um determinado tipo
- **/
-bool fillThemeCombo(TeGeomRep tg, 
-                TeView* view, 
-                QComboBox* cBox, 
-                string selName, bool clear=true);
-
-/**
- * Acha tabelas de um tema, de um determinado tipo 
- **/
-
-bool fillTableCombo(TeView* view,
-                     QComboBox *cTableCombo, 
-                     QComboBox *cThemeCombo,
-                     string selName, bool clear=true);
-
-/**
- * Acha colunas de uma tabela, com um determinado tipo
- **/
-bool fillColumnCombo(TeAttrDataType aType,
-                     TeTheme* theme,
-                     QComboBox *cColumnCombo, 
-                     QComboBox *cTableCombo,
-                     string selName, bool clear=true);
-
-/**
- * Acha colunas de uma tabela, com mais de um determinado tipo
- **/
-bool fillColumnCombo(vector<TeAttrDataType> &aTypeVec,
-                      TeTheme* theme,
-                      QComboBox *cColumnCombo, 
-                      QComboBox *cTableCombo,
-                      string selName, bool clear=true);
-
-#endif
diff --git a/src/terralib/application/TeMSVFactory.h b/src/terralib/application/TeMSVFactory.h
deleted file mode 100644
index e06b44b..0000000
--- a/src/terralib/application/TeMSVFactory.h
+++ /dev/null
@@ -1,192 +0,0 @@
-/************************************************************************************
-TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The library provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use
-of this library and its documentation.
-*************************************************************************************/
-
-#ifndef __TERRALIB_INTERNAL_SPATIALMEASUREFACTORY_H
-#define __TERRALIB_INTERNAL_SPATIALMEASUREFACTORY_H
-
-#ifdef WIN32 
-#pragma warning ( disable: 4786 ) 
-#endif
-
-
-#include <map>
-#include <string>
-#include <TeMatrix.h>
-#include <TeFactory.h>
-
-using namespace std;
-
-// -- Struct of Parameters 
-struct TeMSVParams
-{
-	TeMatrix	MSVPmatrix_;
-	double		MSVPdir_;
-	double		MSVPtoldir_;
-	double		MSVPincr_;
-	double		MSVPnlag_;
-};
-
-// -- Measures of Spatial Variability 
-class TeMSV		
-{
-public:
-	TeMSV (){};
-	virtual ~TeMSV () {}
-
-	virtual TeMatrix	calculate ()=0;
-	static TeMSV* DefaultObject(TeMSVParams){ return 0; }		
-	void setMatrix(TeMatrix* m) {MSVmatrix_ = m;}
-
-protected:
-	TeMatrix*	MSVmatrix_;
-	double		MSVdir_;
-	double		MSVtoldir_;
-	double		MSVincr_;
-	double		MSVnlag_;		
-};
-
-
-//////////////////////////////////
-class TeSemivariogram : public TeMSV
-{
-public:
-	TeSemivariogram(const TeMSVParams& params){
-		MSVdir_ = params.MSVPdir_;
-		MSVtoldir_ = params.MSVPtoldir_;
-		MSVincr_ = params.MSVPincr_;
-		MSVnlag_ = params.MSVPnlag_;
-	}
-	
-	~TeSemivariogram() { }
-
-	virtual TeMatrix	calculate ();	
-};
-
-
-////////////////////////////////////
-class TeCorrelogram : public TeMSV
-{
-public:
-		TeCorrelogram(const TeMSVParams& params){
-		MSVdir_ = params.MSVPdir_;
-		MSVtoldir_ = params.MSVPtoldir_;
-		MSVincr_ = params.MSVPincr_;
-		MSVnlag_ = params.MSVPnlag_;
-	}		
-	
-	~TeCorrelogram(){};
-
-	virtual TeMatrix	calculate ();	
-};
-
-////////////////////////////////////
-class TeSemimadogram : public TeMSV
-{
-public:
-		TeSemimadogram(const TeMSVParams& params){
-		MSVdir_ = params.MSVPdir_;
-		MSVtoldir_ = params.MSVPtoldir_;
-		MSVincr_ = params.MSVPincr_;
-		MSVnlag_ = params.MSVPnlag_;
-	}		
-	
-	~TeSemimadogram(){};
-
-	virtual TeMatrix	calculate ();	
-};
-
-////////////////////////////////////
-class TeCovariance : public TeMSV
-{
-public:
-		TeCovariance(const TeMSVParams& params){
-		MSVdir_ = params.MSVPdir_;
-		MSVtoldir_ = params.MSVPtoldir_;
-		MSVincr_ = params.MSVPincr_;
-		MSVnlag_ = params.MSVPnlag_;
-	}		
-	
-	~TeCovariance(){};
-
-	virtual TeMatrix	calculate ();	
-};
-
-
-
-
-
-
-//////////////////////////////////////////////
-// -- Factory: Measures of Spatial Variability 
-
-class TeMSVFactory : public TeFactory<TeMSV, TeMSVParams>
-{
-public:
-	TeMSVFactory(const string& name) : TeFactory<TeMSV, TeMSVParams>(name){}
-	virtual TeMSV* build(const TeMSVParams&) = 0;
-};
-
-
-/////////////////////////////
-class TeSemivariogram_Factory : public TeMSVFactory
-{
-public:
-	TeSemivariogram_Factory (const string& name) : TeMSVFactory(name){}
-
-	virtual TeMSV* build(const TeMSVParams& params){return new TeSemivariogram(params);}
-};
-
-
-/////////////////////////////
-class TeCorrelogram_Factory : public TeMSVFactory
-{
-public:
-	TeCorrelogram_Factory (const string& name) : TeMSVFactory (name){}
-
-	virtual TeMSV* build (const TeMSVParams& params){return new TeCorrelogram(params);}
-};
-
-
-/////////////////////////////
-class TeSemimadogram_Factory : public TeMSVFactory
-{
-public:
-	TeSemimadogram_Factory (const string& name) : TeMSVFactory (name){}
-
-	virtual TeMSV* build (const TeMSVParams& params){return new TeSemimadogram(params);}
-};
-
-
-/////////////////////////////
-class TeCovariance_Factory : public TeMSVFactory
-{
-public:
-	TeCovariance_Factory (const string& name) : TeMSVFactory (name){}
-
-	virtual TeMSV* build (const TeMSVParams& params){return new TeCovariance(params);}
-};
-
-
-#endif
-
-
diff --git a/src/terralib/application/TePlotTheme.h b/src/terralib/application/TePlotTheme.h
deleted file mode 100644
index 9bdee90..0000000
--- a/src/terralib/application/TePlotTheme.h
+++ /dev/null
@@ -1,2155 +0,0 @@
-/************************************************************************************
-TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The library provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use
-of this library and its documentation.
-*************************************************************************************/
-/*! \file TePlotTheme.h
-    This file contains support to plot a theme on a canvas
-*/
-#ifndef  __TERRALIB_INTERNAL_PLOTTHEME_H
-#define  __TERRALIB_INTERNAL_PLOTTHEME_H
-
-#include "TeThemeApplication.h"
-#include "TeDatabase.h"
-#include "TeGeometryAlgorithms.h"
-#include "TeVectorRemap.h"
-#include "TeDecoderMemory.h"
-#include <time.h>
-#include <set>
-#include "TeApplicationUtils.h"
-
-template<class Canvas, class Progress>
-void TePlotTextWV(TeThemeApplication* theme, Canvas* canvas, Progress * progress, TeBox box = TeBox())
-{
-	if ((theme->visibleRep() & TeTEXT) == 0)
-		return;
-
-	if(theme->textTable().empty())
-		return;
-	TeDatabase* db = theme->layer()->database();
-	if(db->tableExist(theme->textTable()) == false)
-		return;
-	canvas->setDataProjection (theme->layer()->projection());
-	TeDatabasePortal* plot = db->getPortal();
-
-	string	tabtx = theme->textTable();
-	string	tabs = theme->collectionTable();
-
-	string wherebox;
-	if(box.isValid())
-	{
-		wherebox = "NOT (x >= " + Te2String(box.x2()+4*box.width());
-		wherebox += " OR y >= " + Te2String(box.y2()+2*box.height());
-		wherebox += " OR x <= " + Te2String(box.x1()-4*box.width());
-		wherebox += " OR y <= " + Te2String(box.y1()-2*box.height()) + ")";
-	}
-	else
-	{
-		wherebox = getWhereBox(plot, theme, canvas, TeTEXT, box);
-		if(wherebox.empty())
-		{
-			TeBox box = canvas->getDataWorld();
-			wherebox = " x >= " + Te2String(box.x1());
-			wherebox += " AND x <= " + Te2String(box.x2());
-			wherebox += " AND y >= " + Te2String(box.y1());
-			wherebox += " AND y <= " + Te2String(box.y2());
-		}
-	}
-
-	// calculate initial filed number for collection and legenda (sind and vind)
-	int sind=0, vind=0;
-	string ind = "SELECT * FROM " + tabtx + " WHERE object_id < ' '";
-	plot->freeResult();
-	if (plot->query (ind))
-		sind = plot->AttributeList().size();
-
-	ind = "SELECT * FROM " + tabs + " WHERE c_object_id < ' '";
-	plot->freeResult();
-	if (plot->query (ind))
-		vind = plot->AttributeList().size() + sind;
-
-	int numrows = 0;
-	string conta = "SELECT COUNT(*) FROM " + tabs;
-	plot->freeResult();
-	if (plot->query (conta))
-	{
-		if(plot->fetchRow())
-			numrows = atoi(plot->getData(0));
-	}
-	delete plot;
-
-	string tabv = tabtx + "_txvisual";
-	string sa = "SELECT " + tabtx + ".*, " + tabv + ".*, " + tabs + ".* ";
-	sa += "FROM " + tabtx + ", " + tabv + ", " + tabs;
-	sa += " WHERE (" + tabs + ".c_object_id = " + tabtx + ".object_id";
-	sa += " AND " + tabtx + ".geom_id = " + tabv + ".geom_id)";
-	string squery;
-	squery = sa + " AND (" + wherebox + ")";
-	plotTextWV(theme, canvas, squery, progress);
-
-	string othersQuery = "SELECT " + tabtx + ".*, " + tabv + ".* ";
-	othersQuery += "FROM " + tabtx + ", " + tabv;
-	othersQuery += " WHERE " + tabtx + ".geom_id = " + tabv + ".geom_id";
-	othersQuery += " AND " + tabtx + ".object_id = 'TE_NONE_ID'";
-	plotTextWV(theme, canvas, othersQuery, progress);
-}
-
-template<class Canvas, class Progress>
-void plotTextWV(TeThemeApplication *theme, Canvas *canvas, string query, Progress *progress)
-{
-	TeText	text;
-	int	np = 0;
-	int dt = CLOCKS_PER_SEC/4;
-	int dt2 = CLOCKS_PER_SEC * 5;
-	clock_t	t0, t1, t2;
-	TeDatabasePortal* plot = theme->layer()->database()->getPortal();
-
-	if(progress == 0)
-	{
-		if(plot->query(query) && plot->fetchRow())
-		{
-			t1 = clock();
-			t2 = t1;
-			bool flag = true;
-			do
-			{
-				bool bold = false, italic = false;
-				int	size;
-				int dot_height = atoi(plot->getData(10));
-				bool fixedSize = atoi(plot->getData(11));
-				int rgb = atoi(plot->getData(12));
-				TeColor	cor((rgb >> 16) & 0xff, (rgb >> 8) & 0xff, rgb & 0xff);
-				string	family = plot->getData(13);
-				if(atoi(plot->getData(14)))
-					bold = true;
-				if(atoi(plot->getData(15)))
-					italic = true;
-
-				flag = plot->fetchGeometry(text);
-				if(fixedSize == false && text.height() > 0.)
-				{
-					TeBox wbox = canvas->getDataWorld();
-					TeCoord2D p1(wbox.x1_, wbox.y1_);
-					TeCoord2D p2(p1.x() + text.height(), p1.y() + text.height());
-					TeBox box(p1, p2);
-					canvas->mapWtoV(box);
-					size = int(box.height());
-				}
-				else
-					size = dot_height;
-
-				canvas->setTextColor(cor.red_, cor.green_, cor.blue_);
-				canvas->setTextStyle (family, size, bold, italic );
-				TeVisual visual;
-				visual.size(size);
-				visual.family(family);
-				visual.bold(bold);
-				visual.italic(italic);
-				visual.fixedSize(fixedSize);
-				visual.ptAngle((int)text.angle());
-
-				canvas->plotText (text, visual);
-				np++;
-				t2 = clock();
-				if (int(t2-t1) > dt)
-				{
-					t1 = t2;
-					canvas->copyPixmapToWindow();
-				}
-			} while (flag);
-			canvas->copyPixmapToWindow();
-		}
-	}
-	else
-	{
-		int steps = 0;
-		string conta = query;
-		int ff;
-		if((ff=conta.find(" FROM ")) >= 0)
-			conta.replace(0, ff, "SELECT COUNT(*)");
-		if((ff=conta.find("ORDER BY")) >= 0)
-			conta.erase(ff, conta.size()-ff);
-		plot->freeResult();
-		if(plot->query(conta) && plot->fetchRow())
-			steps = atoi(plot->getData(0));
-
-		plot->freeResult();
-		if(plot->query(query) && plot->fetchRow())
-		{
-			string caption = "Plotando tema: " + theme->name();
-			progress->setCaption(caption.c_str());
-			progress->setLabelText("      Plotagem de textos em andamento, aguarde...      ");
-			progress->setTotalSteps(steps);
-			t2 = clock();
-			t0 = t1 = t2;
-			bool flag = true;
-			do
-			{
-				bool bold = false, italic = false;
-				int	size;
-				int dot_height = atoi(plot->getData(10));
-				bool fixedSize = atoi(plot->getData(11));
-				int rgb = atoi(plot->getData(12));
-				TeColor	cor((rgb >> 16) & 0xff, (rgb >> 8) & 0xff, rgb & 0xff);
-				string	family = plot->getData(13);
-				if(atoi(plot->getData(14)))
-					bold = true;
-				if(atoi(plot->getData(15)))
-					italic = true;
-
-				flag = plot->fetchGeometry(text);
-				if(fixedSize == false && text.height() > 0.)
-				{
-					TeBox wbox = canvas->getDataWorld();
-					TeCoord2D p1(wbox.x1_, wbox.y1_);
-					TeCoord2D p2(p1.x() + text.height(), p1.y() + text.height());
-					TeBox box(p1, p2);
-					canvas->mapWtoV(box);
-					size = int(box.height());
-				}
-				else
-					size = dot_height;
-
-				canvas->setTextColor(cor.red_, cor.green_, cor.blue_);
-				canvas->setTextStyle (family, size, bold, italic );
-				TeVisual visual;
-				visual.size(size);
-				visual.family(family);
-				visual.bold(bold);
-				visual.italic(italic);
-				visual.fixedSize(fixedSize);
-				visual.ptAngle((int)text.angle());
-
-				canvas->plotText (text, visual);
-				np++;
-				t2 = clock();
-				if (int(t2-t1) > dt)
-				{
-					t1 = t2;
-					canvas->copyPixmapToWindow();
-					if(progress->wasCancelled())
-					{
-						progress->reset();
-						break;
-					}
-					if((int)(t2-t0) > dt2)
-						progress->setProgress(np);
-				}
-			} while (flag);
-			canvas->copyPixmapToWindow();
-		}
-		progress->reset();
-	}
-	delete plot;
-}
-
-template<class Canvas, class Progress>
-void TePlotTexts(TeThemeApplication* theme, Canvas* canvas, Progress * progress)
-{
-	if ((theme->visibleRep() & TeTEXT) == 0)
-		return;
-
-	if(theme->textTable().empty())
-		return;
-	TeDatabase* db = theme->layer()->database();
-	if(db->tableExist(theme->textTable()) == false)
-		return;
-	canvas->setDataProjection (theme->layer()->projection());
-	TeDatabasePortal* plot = db->getPortal();
-
-	string	tabtx = theme->textTable();
-	string	tabs = theme->collectionTable();
-
-	string wherebox = getWhereBox(plot, theme, canvas, TeTEXT);
-	if(wherebox.empty())
-	{
-		TeBox box = canvas->getDataWorld();
-		wherebox = " x >= " + Te2String(box.x1());
-		wherebox += " AND x <= " + Te2String(box.x2());
-		wherebox += " AND y >= " + Te2String(box.y1());
-		wherebox += " AND y <= " + Te2String(box.y2());
-	}
-
-	// calculate initial filed number for collection and legenda (sind and vind)
-	int sind=0, vind=0;
-	string ind = "SELECT * FROM " + tabtx + " WHERE object_id < ' '";
-	plot->freeResult();
-	if (plot->query (ind))
-		sind = plot->AttributeList().size();
-
-	ind = "SELECT * FROM " + tabs + " WHERE c_object_id < ' '";
-	plot->freeResult();
-	if (plot->query (ind))
-		vind = plot->AttributeList().size() + sind;
-
-	int numrows = 0;
-	string conta = "SELECT COUNT(*) FROM " + tabs;
-	plot->freeResult();
-	if (plot->query (conta))
-	{
-		if(plot->fetchRow())
-			numrows = atoi(plot->getData(0));
-	}
-	string sa;
-	string sel;
-	if(plot->getDatabase()->dbmsName() == "OracleSpatial")	
-		sel = " SELECT /*+ ordered */ * "; 
-	else
-		sel = " SELECT * ";
-
-	delete plot;
-	if(numrows > 0)
-		sa = sel + " FROM (" + tabtx + " INNER JOIN " + tabs;
-	else
-		sa = sel + " FROM (" + tabtx + " LEFT JOIN " + tabs;
-
-	sa += " ON " + tabtx + ".object_id = " + tabs + ".c_object_id) WHERE ";
-
-	string squery;
-	squery = sa + wherebox;
-	plotTexts(theme, canvas, squery, progress);
-
-	string othersQuery = "SELECT * FROM " + tabtx + " WHERE object_id = 'TE_NONE_ID'";
-	plotTexts(theme, canvas, othersQuery, progress);
-}
-
-template<class Canvas, class Progress>
-void plotTexts(TeThemeApplication *theme, Canvas *canvas, string query, Progress *progress)
-{
-	TeText	text;
-	int	np = 0;
-	int dt = CLOCKS_PER_SEC/4;
-	int dt2 = CLOCKS_PER_SEC * 5;
-	clock_t	t0, t1, t2;
-	TeDatabasePortal* plot = theme->layer()->database()->getPortal();
-
-	if(progress == 0)
-	{
-		if(plot->query(query) && plot->fetchRow())
-		{
-			t1 = clock();
-			t2 = t1;
-			bool flag = true;
-			do
-			{
-				flag = plot->fetchGeometry(text);
-				setTextAttributes(theme, canvas, text);
-				canvas->plotText (text, theme->defaultLegend().visual(TeTEXT));
-				np++;
-				t2 = clock();
-				if (int(t2-t1) > dt)
-				{
-					t1 = t2;
-					canvas->copyPixmapToWindow();
-				}
-			} while (flag);
-			canvas->copyPixmapToWindow();
-		}
-	}
-	else
-	{
-		int steps = 0;
-		string conta = query;
-		conta.replace(0, strlen("SELECT *")+1, "SELECT COUNT(*)");
-		int ff;
-		if((ff=conta.find("ORDER BY")) >= 0)
-			conta.erase(ff, conta.size()-ff);
-		plot->freeResult();
-		if(plot->query(conta) && plot->fetchRow())
-			steps = atoi(plot->getData(0));
-
-		plot->freeResult();
-		if(plot->query(query) && plot->fetchRow())
-		{
-			string caption = "Plotando tema: " + theme->name();
-			progress->setCaption(caption.c_str());
-			progress->setLabelText("      Plotagem de textos em andamento, aguarde...      ");
-			progress->setTotalSteps(steps);
-			t2 = clock();
-			t0 = t1 = t2;
-			bool flag = true;
-			do
-			{
-				flag = plot->fetchGeometry(text);
-				setTextAttributes(theme, canvas, text);
-				canvas->plotText (text, theme->defaultLegend().visual(TeTEXT));
-				np++;
-				t2 = clock();
-				if (int(t2-t1) > dt)
-				{
-					t1 = t2;
-					canvas->copyPixmapToWindow();
-					if(progress->wasCancelled())
-					{
-						progress->reset();
-						break;
-					}
-					if((int)(t2-t0) > dt2)
-						progress->setProgress(np);
-				}
-			} while (flag);
-			canvas->copyPixmapToWindow();
-		}
-		progress->reset();
-	}
-	delete plot;
-}
-
-template<class Canvas>
-void setTextAttributes(TeThemeApplication* theme, Canvas* canvas, TeText tx)
-{
-	TeColor	cor;
-	static	TeVisual snc;
-	string	family;
-	static int		ssize;
-	int		size = 0;
-	bool	bold, italic, fixedSize;
-
-	if(theme == 0)
-	{
-		ssize = 0;
-		snc.family("notFamily");
-		return;
-	}
-
-	fixedSize = theme->defaultLegend().visual(TeTEXT).fixedSize(); // font size is fixed
-	if(snc == theme->defaultLegend().visual(TeTEXT))
-	{
-		if(fixedSize == false && tx.height() > 0.)
-		{
-			TeBox wbox = canvas->getDataWorld();
-			TeCoord2D p1(wbox.x1_, wbox.y1_);
-			TeCoord2D p2(p1.x() + tx.height(), p1.y() + tx.height());
-			TeBox box(p1, p2);
-			canvas->mapWtoV(box);
-			size = int(box.height());
-		}
-		else
-			size = theme->defaultLegend().visual(TeTEXT).size(); // font size
-	}
-
-	if(size == 0)
-	{
-		if(fixedSize == false && tx.height() > 0.)
-		{
-			TeBox wbox = canvas->getDataWorld();
-			TeCoord2D p1(wbox.x1_, wbox.y1_);
-			TeCoord2D p2(p1.x() + tx.height(), p1.y() + tx.height());
-			TeBox box(p1, p2);
-			canvas->mapWtoV(box);
-			size = int(box.height());
-		}
-		else
-			size = theme->defaultLegend().visual(TeTEXT).size(); // font size
-	}
-
-	cor = theme->defaultLegend().visual(TeTEXT).color();
-	family = theme->defaultLegend().visual(TeTEXT).family();
-	bold = theme->defaultLegend().visual(TeTEXT).bold();
-	italic = theme->defaultLegend().visual(TeTEXT).italic();
-	fixedSize = theme->defaultLegend().visual(TeTEXT).fixedSize(); // font size is fixed
-
-	canvas->setTextColor(cor.red_, cor.green_, cor.blue_);
-	canvas->setTextStyle (family, size, bold, italic );
-	snc = theme->defaultLegend().visual(TeTEXT);
-	ssize = size;
-}
-
-template<class Canvas, class Progress>
-void plotPieBars(TeThemeApplication *theme, Canvas *canvas, Progress *progress, TeBox ebox = TeBox())
-{
-	if((theme->visibleRep() & 0x80000000) == 0)
-		return;
-
-	int steps = 0;
-	int	np = 0;
-	int dt = CLOCKS_PER_SEC/4;
-	int dt2 = CLOCKS_PER_SEC * 2;
-	clock_t	t0, t1, t2;
-	TeDatabasePortal* plot = theme->layer()->database()->getPortal();
-	canvas->setDataProjection (theme->layer()->projection());
-
-	if(theme->chartAttributes_.size() == 0)
-	{
-		delete plot;
-		return;
-	}
-	double	width = theme->barWidth();
-	double	maxh = theme->barMaxHeight();
-	double	minh = theme->barMinHeight();
-	double	maxd = theme->pieMaxDiameter();
-	double	mind = theme->pieMinDiameter();
-	double	diameter = theme->pieDiameter();
-	string FUNC = theme->chartFunction();
-
-	if(theme->keepDimension() != 0)
-	{
-		width = canvas->mapVtoData((int)width);
-		maxh = canvas->mapVtoData((int)maxh);
-		minh = canvas->mapVtoData((int)minh);
-		maxd = canvas->mapVtoData((int)maxd);
-		mind = canvas->mapVtoData((int)mind);
-		diameter = canvas->mapVtoData((int)diameter);
-	}
-
-	unsigned int i;
-	string	input, cinput;
-	TeSelectedObjects  selectedObjects = theme->chartObjects();
-	
-	if(selectedObjects == TeSelectedByPointing)
-	{
-		input = "(grid_status = 1 OR grid_status = 3";
-		input += " OR (grid_status is null AND (c_object_status = 1 OR c_object_status = 3)))";
-		cinput = "(c_object_status = 1 OR c_object_status = 3)";
-	}
-	else if(selectedObjects == TeNotSelectedByPointing)
-	{
-		input = "(grid_status = 0 OR grid_status = 2";
-		input += " OR (grid_status is null AND (c_object_status = 0 OR c_object_status = 2)))";
-		cinput = "(c_object_status = 0 OR c_object_status = 2)";
-	}
-	else if(selectedObjects == TeSelectedByQuery)
-	{
-		input = "(grid_status = 2 OR grid_status = 3";
-		input += " OR (grid_status is null AND (c_object_status = 2 OR c_object_status = 3)))";
-		cinput = "(c_object_status = 2 OR c_object_status = 3)";
-	}
-	else if(selectedObjects == TeNotSelectedByQuery)
-	{
-		input = "(grid_status = 0 OR grid_status = 1";
-		input += " OR (grid_status is null AND (c_object_status = 0 OR c_object_status = 1)))";
-		cinput = "(c_object_status = 0 OR c_object_status = 1)";
-	}
-	else if(selectedObjects == TeGrouped)
-	{
-		input = "c_legend_id <> 0";
-		cinput = "c_legend_id <> 0";
-	}
-	else if(selectedObjects == TeNotGrouped)
-	{
-		input = "c_legend_id = 0";
-		cinput = "c_legend_id = 0";
-	}
-
-	canvas->setLineStyle(TeLnTypeContinuous, 0);
-	canvas->setLineColor(0, 0, 0);
-	TeChartType chartType = (TeChartType)theme->chartType();
-	if(chartType == TePieChart)
-	{
-		string wherebox;
-		double delta = diameter / 2.;
-		if(!(theme->pieDimAttribute() == "NONE"))
-			delta = maxd / 2.;
-
-		TeBox box;
-		if(ebox.isValid())
-			box = ebox;
-		else
-			box = canvas->getDataWorld();
-
-		box.x1_ = box.x1_ - delta;
-		box.x2_ = box.x2_ + delta;
-		box.y1_ = box.y1_ - delta;
-		box.y2_ = box.y2_ + delta;
-
-		wherebox = "NOT(label_x > " + Te2String(box.x2_, 10) + " OR ";
-		wherebox = wherebox + "label_x < " + Te2String(box.x1_, 10) + " OR ";
-		wherebox = wherebox + "label_y > " + Te2String(box.y2_, 10) + " OR ";
-		wherebox = wherebox + "label_y < " + Te2String(box.y1_, 10) + ")";
-
-		string attrs, q;
-		for(i=0; i<theme->chartAttributes_.size(); i++)
-			attrs += FUNC + "(" + theme->chartAttributes_[i] + "),";
-		attrs += "AVG(label_x),AVG(label_y)";
-		if(!(theme->pieDimAttribute() == "NONE"))
-			attrs += "," + FUNC + "(" + theme->pieDimAttribute() + ")";
-
-		if(wherebox.empty() && input.empty())
-			q = "SELECT " + attrs + theme->sqlGridFrom();
-		else if(wherebox.empty() && input.empty()==false)
-			q = "SELECT " + attrs + theme->sqlGridFrom() + " WHERE " + input;
-		else if(wherebox.empty()==false && input.empty())
-			q = "SELECT " + attrs + theme->sqlGridFrom() + " WHERE " + wherebox;
-		else if(wherebox.empty()==false && input.empty()==false)
-			q = "SELECT " + attrs + theme->sqlGridFrom() + " WHERE " + input + " AND " + wherebox;
-		q += " GROUP BY " + theme->collectionTable() + ".c_object_id";
-
-		string conta = "SELECT COUNT(*) FROM " + theme->collectionTable();
-		if(wherebox.empty() && cinput.empty()==false)
-			conta += " WHERE " + cinput;
-		else if(wherebox.empty()==false && cinput.empty())
-			conta += " WHERE " + wherebox;
-		else if(wherebox.empty()==false && cinput.empty()==false)
-			conta += " WHERE " + cinput + " AND " + wherebox;
-		
-		plot->freeResult();
-		if(plot->query(conta) && plot->fetchRow())
-			steps = atoi(plot->getData(0));
-
-		plot->freeResult();
-		if(plot->query(q))
-		{
-			if(progress)
-			{
-				string caption = "Plotando tema: " + theme->name();
-				progress->setCaption(caption.c_str());
-				progress->setLabelText("      Plotagem de tortas em andamento, aguarde...      ");
-				progress->setTotalSteps(steps);
-			}
-			t2 = clock();
-			t0 = t1 = t2;
-			bool b = plot->fetchRow(0);
-			while(b)
-			{
-				double tot = 0.;
-				for(i=0; i<theme->chartAttributes_.size(); i++)
-				{
-					string v = plot->getData(i);
-					if(v.empty())
-					{
-						tot = 0.;
-						break;
-					}
-					tot += atof(v.c_str());
-				}
-				if(tot == 0.)
-				{
-					b = plot->fetchRow();
-					np++;
-					continue;
-				}
-
-				if(!(theme->pieDimAttribute() == "NONE"))
-				{
-					if(theme->chartMaxVal() - theme->chartMinVal() == 0)
-						diameter = 0.;
-					else
-					{
-						double	adim = atof(plot->getData(theme->chartAttributes_.size()+2));
-						double a = (adim - theme->chartMinVal()) / (theme->chartMaxVal() - theme->chartMinVal());
-						diameter = a * (maxd - mind) + mind;
-					}
-				}
-				double	x = atof(plot->getData(theme->chartAttributes_.size())) - diameter / 2.;
-				double	y = atof(plot->getData(theme->chartAttributes_.size()+1)) - diameter / 2.;
-
-				double	a = 0.;
-				for(i=0; i<theme->chartAttributes_.size(); i++)
-				{
-					double b = atof(plot->getData(i)) / tot * 360.;
-					TeColor	cor = theme->chartColors_[i];
-					canvas->setPieColor(cor.red_, cor.green_, cor.blue_);
-					canvas->plotPie(x, y, diameter, diameter, a, b);
-					a += b;
-				}
-				np++;
-				t2 = clock();
-				if (int(t2-t1) > dt)
-				{
-					t1 = t2;
-					canvas->copyPixmapToWindow();
-					if(progress)
-					{
-						if(progress->wasCancelled())
-						{
-							progress->reset();
-							break;
-						}
-						if((int)(t2-t0) > dt2)
-							progress->setProgress(np);
-					}
-				}
-				b = plot->fetchRow();
-			}
-			canvas->copyPixmapToWindow();
-		}
-	}
-	else
-	{
-		double	n = theme->chartAttributes_.size();
-		double	maxv = theme->chartMaxVal();
-		double	minv = theme->chartMinVal();
-		double delta = maxh / 2.;
-
-		string wherebox;
-
-		TeBox box;
-		if(ebox.isValid())
-			box = ebox;
-		else
-			box = canvas->getDataWorld();
-
-		box.x1_ = box.x1_ - delta;
-		box.x2_ = box.x2_ + delta;
-		box.y1_ = box.y1_ - delta;
-		box.y2_ = box.y2_ + delta;
-
-		wherebox = "NOT(label_x > " + Te2String(box.x2_, 10) + " OR ";
-		wherebox = wherebox + "label_x < " + Te2String(box.x1_, 10) + " OR ";
-		wherebox = wherebox + "label_y > " + Te2String(box.y2_, 10) + " OR ";
-		wherebox = wherebox + "label_y < " + Te2String(box.y1_, 10) + ")";
-
-		string attrs, q;
-		for(i=0; i<theme->chartAttributes_.size(); i++)
-			attrs += FUNC + "(" + theme->chartAttributes_[i] + "),";
-		attrs += "AVG(label_x),AVG(label_y)";
-
-		if(wherebox.empty() && input.empty())
-			q = "SELECT " + attrs + theme->sqlGridFrom();
-		else if (wherebox.empty() == false && input.empty() == false)
-			q = "SELECT " + attrs + theme->sqlGridFrom() + " WHERE " + input + " AND " + wherebox;
-		else if (wherebox.empty() == false && input.empty())
-			q = "SELECT " + attrs + theme->sqlGridFrom() + " WHERE " + wherebox;
-		else if (wherebox.empty() && input.empty() == false)
-			q = "SELECT " + attrs + theme->sqlGridFrom() + " WHERE " + input;
-		q += " GROUP BY " + theme->collectionTable() + ".c_object_id";
-
-		string conta = "SELECT COUNT(*) FROM " + theme->collectionTable();
-		if(wherebox.empty() && cinput.empty()==false)
-			conta += " WHERE " + cinput;
-		else if(wherebox.empty()==false && cinput.empty())
-			conta += " WHERE " + wherebox;
-		else if(wherebox.empty()==false && cinput.empty()==false)
-			conta += " WHERE " + cinput + " AND " + wherebox;
-
-		plot->freeResult();
-		if(plot->query(conta) && plot->fetchRow())
-			steps = atoi(plot->getData(0));
-
-		vector<double> dvec;
-		plot->freeResult();
-		if(plot->query(q))
-		{
-			if(progress)
-			{
-				string caption = "Plotando tema: " + theme->name();
-				progress->setCaption(caption.c_str());
-				progress->setLabelText("      Plotagem de barras em andamento, aguarde...      ");
-				progress->setTotalSteps(steps);
-			}
-			t2 = clock();
-			t0 = t1 = t2;
-			bool b = plot->fetchRow(0);
-			while(b)
-			{
-				double	x = atof(plot->getData(theme->chartAttributes_.size())) - n * width / 2.;
-				double	y = atof(plot->getData(theme->chartAttributes_.size()+1));
-
-				dvec.clear();
-				for(i=0; i<theme->chartAttributes_.size(); i++)
-				{
-					string val = plot->getData(i);
-					if(val.empty())
-					{
-						dvec.clear();
-						break;
-					}
-					dvec.push_back(atof(val.c_str()));
-				}
-
-				for(i=0; i<dvec.size(); i++)
-				{
-					double height;
-					double v = dvec[i];
-					if(maxv - minv == 0)
-						height = 0.;
-					else
-						height = (v - minv) * (maxh - minh) / (maxv - minv) + minh;
-					TeColor	cor = theme->chartColors_[i];
-					canvas->setRectColor(cor.red_, cor.green_, cor.blue_);
-					canvas->plotRect(x, y, width, height);
-					x += width;
-				}
-				np++;
-				t2 = clock();
-				if (int(t2-t1) > dt)
-				{
-					t1 = t2;
-					canvas->copyPixmapToWindow();
-					if(progress)
-					{
-						if(progress->wasCancelled())
-						{
-							progress->reset();
-							break;
-						}
-						if((int)(t2-t0) > dt2)
-							progress->setProgress(np);
-					}
-				}
-				b = plot->fetchRow();
-			}
-			canvas->copyPixmapToWindow();
-		}
-	}
-	if(progress)
-		progress->reset();
-	delete plot;
-}
-
-
-template<class Portal, class Canvas>
-string getWhereBox(Portal *plot, TeThemeApplication *theme, Canvas *canvas, TeGeomRep rep, TeBox bbox = TeBox())
-{
-	string wherebox;
-	if(theme->chartSelected_.empty() == true)
-	{
-		TeBox box;
-		if(bbox.isValid())
-			box = bbox;
-		else
-			box = canvas->getDataWorld ();
-		wherebox = plot->getDatabase()->getSQLBoxWhere(box, rep);
-	}
-	else
-	{
-		if (rep == TePOINTS)
-		{
-			double	width = theme->barWidth();
-			double	maxh = theme->barMaxHeight();
-			double	minh = theme->barMinHeight();
-			double	maxd = theme->pieMaxDiameter();
-			double	mind = theme->pieMinDiameter();
-			double	diameter = theme->pieDiameter();
-			double	delta;
-
-			if(theme->keepDimension() != 0)
-			{
-				width = canvas->mapVtoData((int)width);
-				maxh = canvas->mapVtoData((int)maxh);
-				minh = canvas->mapVtoData((int)minh);
-				maxd = canvas->mapVtoData((int)maxd);
-				mind = canvas->mapVtoData((int)mind);
-				diameter = canvas->mapVtoData((int)diameter);
-			}
-
-			TeChartType chartType = (TeChartType)theme->chartType();
-			if(chartType == TePieChart)
-			{
-				delta = diameter / 2.;
-				if(!(theme->pieDimAttribute() == "NONE"))
-					delta = maxd / 2.;
-			}
-			else
-				delta = maxh / 2.;
-
-			string sel = "SELECT label_x, label_y FROM " + theme->collectionTable();
-			sel += " WHERE c_object_id = '" + theme->chartSelected_ + "'";
-			plot->freeResult();
-			if(plot->query(sel))
-			{
-				bool b = plot->fetchRow(0);
-				if(b == false)
-					return wherebox;
-				if(b)
-				{
-					double x = atof(plot->getData(0));
-					double y = atof(plot->getData(1));
-					string xmin = Te2String(x - delta);
-					string xmax = Te2String(x + delta);
-					string ymin = Te2String(y - delta);
-					string ymax = Te2String(y + delta);
-					wherebox = "label_x > " + xmin + " AND ";
-					wherebox += "label_x < " + xmax + " AND ";
-					wherebox += "label_y > " + ymin + " AND ";
-					wherebox += "label_y < " + ymax;
-				}
-			}
-		}
-		else if(rep == TePOLYGONS || rep == TeLINES || rep == TeCELLS)
-		{
-			string tab;
-			if(rep == TePOLYGONS)
-				tab = theme->layer()->tableName(TePOLYGONS);
-			else if (rep == TeLINES)
-				tab = theme->layer()->tableName(TeLINES);
-			else if (rep == TeCELLS)
-				tab = theme->layer()->tableName(TeCELLS);
-			
-			plot->freeResult();
-
-			TeBox b;
-			bool result = plot->getDatabase()->getMBRGeom(tab, theme->chartSelected_, b, "spatial_data");
-			if(!result)
-				return wherebox;
-			else
-				wherebox = plot->getDatabase()->getSQLBoxWhere(b, rep);
-		}
-	}
-	return wherebox;
-}
-
-template<class Portal>
-TeVisual getVisual(Portal* portal, TeThemeApplication* theme, TeGeomRep GEOMREP, int resPos, int groPos, int ownPos)
-{
-	TeVisual visual;
-	TeDatabase* db = theme->layer()->database();
-	TeLegendEntry* legendEntry;
-
-	int status = atoi(portal->getData(resPos));
-	int groId = atoi(portal->getData(groPos));
-	int ownId = atoi(portal->getData(ownPos));
-
-	if(groId && (theme->visibleRep()&0x40000000))
-		legendEntry = db->legendMap()[groId];
-	else if(ownId != 0)
-		legendEntry = db->legendMap()[ownId];
-	else
-		legendEntry = &(theme->defaultLegend());
-	
-//	if(legendEntry)
-//		visual = legendEntry->visual(GEOMREP);
-//	else
-//		visual = TeVisual(GEOMREP);
-/////////////////////////////////////////////////////////
-	TeGeomRepVisualMap vm = legendEntry->getVisualMap();
-	if(legendEntry && vm.find(GEOMREP) != vm.end())
-		visual = legendEntry->visual(GEOMREP);
-	else
-	{
-		if(ownId != 0)
-			legendEntry = db->legendMap()[ownId];
-		else
-			legendEntry = &(theme->defaultLegend());
-
-		visual = legendEntry->visual(GEOMREP);
-	}
-/////////////////////////////////////////////////////////
-
-	if(status == 1)
-		visual.color(theme->pointingLegend().visual(TePOLYGONS).color());
-	else if(status == 2)
-		visual.color(theme->queryLegend().visual(TePOLYGONS).color());
-	else if(status == 3)
-		visual.color(theme->queryAndPointingLegend().visual(TePOLYGONS).color());
-
-	return visual;
-}
-
-template<class Canvas , class Progress>
-void TePlotObjects (TeThemeApplication *theme, Canvas *canvas, map<int, RepMap>& layerRepMap, Progress *progress = 0, TeBox box = TeBox())
-{
-	string tableName, objectId;
-	TeColor color;
-	TeVisual visual;
-	int dt = CLOCKS_PER_SEC/4;
-	int dt2 = CLOCKS_PER_SEC * 5;
-	clock_t	t0, t1, t2;
-	int nSteps, nLoops;
-
-
-	TeLayer *layer = theme->layer();
-	TeDatabase *db = layer->database();
-	TeDatabasePortal *portal = db->getPortal();
-	canvas->setDataProjection (layer->projection());
-	map<int, RepMap>::iterator it = layerRepMap.find(layer->id());
-
-	TeBox vb = box;
-	if(box.isValid())
-	{
-		canvas->mapDataWorldToCanvasWorld(vb);
-		canvas->mapCanvasWorldToViewport(vb);
-	}
-
-	if (layer->hasGeometry(TeRASTER) && (theme->visibleRep() & TeRASTER))
-	{
-		TeBox bIn;
-		if (box.isValid())
-		{
-			canvas->setClipRegion((int)vb.x1(), (int)vb.y1(), (int)vb.width(), (int)vb.height());
-			bIn = vb;	
-		}
-	
-		TeRaster* raster = theme->layer()->raster();
-		if (!theme->rasterVisual())
-			theme->createRasterVisual();
-	
-		canvas->plotRaster(raster,theme->rasterVisual(),progress);
-	}	
-	if(layer->hasGeometry(TePOLYGONS) && (theme->visibleRep() & TePOLYGONS))
-	{
-		nLoops = 0;
-		// query the database table containing the polygons� geometry
-		string wherebox = getWhereBox(portal, theme, canvas, TePOLYGONS, box);
-		tableName = layer->tableName(TePOLYGONS);
-
-		string queryPolygons  = "SELECT " + tableName + ".*, c_legend_id, c_legend_own, c_object_status";
-		queryPolygons += " FROM " + tableName + ", " + theme->collectionTable();
-		queryPolygons += " WHERE object_id = c_object_id";
-		if(wherebox.empty() == false)
-			queryPolygons += " AND " + wherebox;
-
-		if(db->dbmsName() != "OracleSpatial" && db->dbmsName() != "PostGIS")
-			queryPolygons += " ORDER BY object_id ASC, parent_id ASC, num_holes DESC";
-		else
-			queryPolygons += " ORDER BY object_id ASC";
-
-		//Calculate the number of polygons to be drawn
-		string selectPolyCount; 
-		if(db->dbmsName()=="SqlServerAdo")
-			selectPolyCount="SELECT COUNT(DISTINCT(parent_id)) FROM ";
-		else if(db->dbmsName() != "OracleSpatial" && db->dbmsName() != "PostGIS")
-			selectPolyCount = "SELECT DISTINCT parent_id FROM ";
-		else
-			selectPolyCount = "SELECT DISTINCT object_id FROM ";
-
-		selectPolyCount += tableName + ", " + theme->collectionTable() + " WHERE c_object_id = object_id";
-		if(wherebox.empty() == false)
-			selectPolyCount += " AND " + wherebox;
-
-		string polyCount;
-		if(db->dbmsName() =="SqlServerAdo")
-			polyCount=selectPolyCount;
-		else if(db->dbmsName() == "PostgreSQL" || db->dbmsName() == "PostGIS")
-			polyCount = "SELECT COUNT(*) FROM (" + selectPolyCount + ") AS r";		
-		else if(db->dbmsName() == "MySQL")
-		{
-			string createTempTable = "CREATE TEMPORARY TABLE count_table " + selectPolyCount;
-			db->execute(createTempTable);
-			polyCount = "SELECT COUNT(*) FROM count_table";
-		}
-		else 
-			polyCount = "SELECT COUNT(*) FROM (" + selectPolyCount + ")";
-		
-		if (portal->query(polyCount))
-		{
-			if (portal->fetchRow())
-				nSteps = atoi(portal->getData(0));
-		}
-		else
-		{
-			delete portal;
-			return;
-		}
-
-		if (db->dbmsName() == "MySQL")
-			db->execute("DROP TABLE count_table");
-
-		portal->freeResult();
-
-		//Plot the polygons whose number was placed in nSteps
-		if(db->dbmsName() == "PostgreSQL" || db->dbmsName() == "PostGIS")
-		{
-			 if(portal->query(queryPolygons, TeSERVERSIDE, TeUNIDIRECTIONAL, TeREADONLY, TeBINARYCURSOR) == false)
-			 {
-				delete portal;
-				return;
-			 } 
-		}
-		else
-		{
-			if (portal->query(queryPolygons) == false)
-			{
-				delete portal;
-				return;
-			}
-		}
-
-		int	groPos = portal->AttributeList().size() - 3;
-		int	ownPos = portal->AttributeList().size() - 2;
-		int	resPos = portal->AttributeList().size() - 1;
-		
-		progress->setTotalSteps(nSteps);
-		t2 = clock();
-		t0 = t1 = t2;
-		if(portal->fetchRow())
-		{
-			bool flag;
-			flag = true;
-			do
-			{
-				int geomId = atoi(portal->getData(0));					
-				TePolygon poly;
-				visual = getVisual(portal, theme, TePOLYGONS, resPos, groPos, ownPos);					
-				color = visual.color();
-				canvas->setPolygonColor(color.red_, color.green_, color.blue_);
-				canvas->setPolygonStyle((int)visual.style(),visual.transparency());
-				color = visual.contourColor();
-				canvas->setPolygonLineColor (color.red_, color.green_, color.blue_);
-				canvas->setPolygonLineStyle((int)visual.contourStyle(),visual.contourWidth());
-				if(box.isValid())
-					canvas->setClipRegion((int)vb.x1(), (int)vb.y1(), (int)vb.width(), (int)vb.height());
-				if(it == layerRepMap.end())
-				{
-					flag = portal->fetchGeometry(poly);
-					canvas->plotPolygon(poly);
-				}
-				else
-				{
-					canvas->plotPolygon(layerRepMap[layer->id()].polygonMap_[geomId]);
-					int parent_id = atoi(portal->getData(4));
-					int parent = parent_id;
-					while(parent == parent_id)
-					{
-						flag = portal->fetchRow();
-						if(flag)
-							parent = atoi(portal->getData(4));
-						else
-							parent = -1;
-					}
-				}
-				t2 = clock();
-				nLoops++;
-				if (int(t2-t1) > dt)
-				{
-					t1 = t2;
-					canvas->copyPixmapToWindow();
-					if(progress->wasCancelled())
-					{
-						progress->reset();
-						break;
-					}
-					if((int)(t2-t0) > dt2)
-						progress->setProgress(nLoops);
-				}
-			}
-			while (flag);
-		}
-		progress->reset();
-	}
-
-	if(box.isValid())
-		canvas->setClipRegion((int)vb.x1(), (int)vb.y1(), (int)vb.width(), (int)vb.height());
-	if(layer->hasGeometry(TeCELLS) && (theme->visibleRep() & TeCELLS))
-	{
-		nLoops = 0;
-		// query the database table containing the polygons� geometry
-		string wherebox = getWhereBox(portal, theme, canvas, TeCELLS, box);
-		tableName = layer->tableName(TeCELLS);
-
-		string queryCells  = "SELECT " + tableName + ".*, c_legend_id, c_legend_own, c_object_status";
-		queryCells += " FROM " + tableName + ", " + theme->collectionTable();
-		queryCells += " WHERE object_id = c_object_id";
-		if(wherebox.empty() == false)
-			queryCells += " AND " + wherebox;
-
-		string cellsCount = "SELECT COUNT(*) FROM " + tableName + ", " + theme->collectionTable();
-		cellsCount += " WHERE object_id = c_object_id";
-		if(wherebox.empty() == false)
-			cellsCount += " AND " + wherebox;
-		
-		portal->freeResult();
-		if (portal->query(cellsCount))
-		{
-			if (portal->fetchRow())
-				nSteps = atoi(portal->getData(0));
-		}
-		else
-		{
-			delete portal;
-			return;
-		}
-
-		portal->freeResult();
-		if (portal->query(queryCells) == false)
-		{
-			delete portal;
-			return;
-		}
-		int	groPos = portal->AttributeList().size() - 3;
-		int	ownPos = portal->AttributeList().size() - 2;
-		int	resPos = portal->AttributeList().size() - 1;
-
-		progress->setTotalSteps(nSteps);
-		t2 = clock();
-		t0 = t1 = t2;
-		if(portal->fetchRow())
-		{
-			bool flag;
-			flag = true;
-			do
-			{
-				TeCell cell;
-				visual = getVisual(portal, theme, TePOLYGONS, resPos, groPos, ownPos);	//use TePOLYGONS				
-				color = visual.color();
-				canvas->setPolygonColor(color.red_, color.green_, color.blue_);
-				canvas->setPolygonStyle((int)visual.style(),visual.transparency());
-				color = visual.contourColor();
-				canvas->setPolygonLineColor (color.red_, color.green_, color.blue_);
-				canvas->setPolygonLineStyle((int)visual.contourStyle(),visual.contourWidth());
-				flag = portal->fetchGeometry(cell);
-				canvas->plotCell(cell);
-				t2 = clock();
-				nLoops++;
-				if (int(t2-t1) > dt)
-				{
-					t1 = t2;
-					canvas->copyPixmapToWindow();
-					if(progress->wasCancelled())
-					{
-						progress->reset();
-						break;
-					}
-					if((int)(t2-t0) > dt2)
-						progress->setProgress(nLoops);
-				}
-			}
-			while (flag);
-		}
-		progress->reset();
-	}
-
-	if (layer->hasGeometry(TeLINES) && (theme->visibleRep() & TeLINES))
-	{
-		nLoops = 0;
-		string wherebox = getWhereBox(portal, theme, canvas, TeLINES, box);
-		// query the database table containing the lines� geometry
-		tableName = layer->tableName(TeLINES);
-
-		string queryLines  = "SELECT " + tableName + ".*, c_legend_id, c_legend_own, c_object_status";
-		queryLines += " FROM " + tableName + ", " + theme->collectionTable();
-		queryLines += " WHERE object_id = c_object_id";
-		if(wherebox.empty() == false)
-			queryLines += " AND " + wherebox;
-
-		string linesCount = "SELECT COUNT(*) FROM " + tableName + ", " + theme->collectionTable();
-		linesCount += " WHERE object_id = c_object_id";
-		if(wherebox.empty() == false)
-			linesCount += " AND " + wherebox;
-
-		portal->freeResult();
-		if (portal->query(linesCount))
-		{
-			if (portal->fetchRow())
-				nSteps = atoi(portal->getData(0));
-		}
-		else
-		{
-			delete portal;
-			return;
-		}
-
-		portal->freeResult();
-		if (portal->query(queryLines) == false)
-		{
-			delete portal;
-			return;
-		}
-		int	groPos = portal->AttributeList().size() - 3;
-		int	ownPos = portal->AttributeList().size() - 2;
-		int	resPos = portal->AttributeList().size() - 1;
-
-		progress->setTotalSteps(nSteps);
-		t2 = clock();
-		t0 = t1 = t2;
-		if(portal->fetchRow())
-		{
-			bool flag = true;
-			do
-			{
-				int geomId = atoi(portal->getData(0));					
-				TeLine2D line;
-				visual = getVisual(portal, theme, TeLINES, resPos, groPos, ownPos);					
-				color = visual.color();
-				canvas->setLineColor(color.red_, color.green_, color.blue_);
-				canvas->setLineStyle((int)visual.style(),visual.width());
-				if(it == layerRepMap.end())
-				{
-					flag = portal->fetchGeometry(line);
-					canvas->plotLine(line);
-				}
-				else
-				{
-					canvas->plotLine(layerRepMap[layer->id()].lineMap_[geomId]);
-					flag = portal->fetchRow();
-				}
-				t2 = clock();
-				if (int(t2-t1) > dt)
-				{
-					t1 = t2;
-					canvas->copyPixmapToWindow();
-					if(progress->wasCancelled())
-					{
-						progress->reset();
-						break;
-					}
-					if((int)(t2-t0) > dt2)
-						progress->setProgress(int(t2));
-				}
-			}
-			while (flag);
-		}
-		progress->reset();
-	}
-
-	if (layer->hasGeometry(TePOINTS) && (theme->visibleRep() & TePOINTS))
-	{
-		nLoops = 0;
-		string wherebox = getWhereBox(portal, theme, canvas, TePOINTS, box);
-		// query the database table containing the points� geometry
-		tableName = layer->tableName(TePOINTS);
-
-		string queryPoints  = "SELECT " + tableName + ".*, c_legend_id, c_legend_own, c_object_status";
-		queryPoints += " FROM " + tableName + ", " + theme->collectionTable();
-		queryPoints += " WHERE object_id = c_object_id";
-		if(wherebox.empty() == false)
-			queryPoints += " AND " + wherebox;
-
-		string pointsCount = "SELECT COUNT(*) FROM " + tableName + ", " + theme->collectionTable();
-		pointsCount += " WHERE object_id = c_object_id";
-		if(wherebox.empty() == false)
-			pointsCount += " AND " + wherebox;
-
-		portal->freeResult();
-		if (portal->query(pointsCount))
-		{
-			if (portal->fetchRow())
-				nSteps = atoi(portal->getData(0));
-		}
-		else
-		{
-			delete portal;
-			return;
-		}
-
-		portal->freeResult();
-		if (portal->query(queryPoints) == false)
-		{
-			delete portal;
-			return;
-		}
-		int	groPos = portal->AttributeList().size() - 3;
-		int	ownPos = portal->AttributeList().size() - 2;
-		int	resPos = portal->AttributeList().size() - 1;
-
-		progress->setTotalSteps(nSteps);
-		t2 = clock();
-		t0 = t1 = t2;
-		if(portal->fetchRow())
-		{
-			bool flag = true;
-			do
-			{
-				TePoint point;
-				visual = getVisual(portal, theme, TePOINTS, resPos, groPos, ownPos);					
-				color = visual.color();
-				canvas->setPointColor(color.red_, color.green_, color.blue_);
-				canvas->setPointStyle((int)visual.style(),visual.size());
-				flag = portal->fetchGeometry(point);
-				canvas->plotPoint(point);
-				t2 = clock();
-				if (int(t2-t1) > dt)
-				{
-					t1 = t2;
-					canvas->copyPixmapToWindow();
-					if(progress->wasCancelled())
-					{
-						progress->reset();
-						break;
-					}
-					if((int)(t2-t0) > dt2)
-						progress->setProgress(int(t2));
-				}
-			}
-			while (flag);
-		}
-		progress->reset();
-	}
-	delete portal;
-
-	if(box.isValid())
-		canvas->setClipping(false);
-}
-
-
-
-template<class Canvas , class Progress>
-TeBox TePlotSelectedObjects(TeThemeApplication *theme, Canvas *canvas, set<string>& drawSet, map<int, RepMap>& layerRepMap, Progress * /* progress */ = 0, TeGeomRepVisualMap* visualMap = 0)
-{
-	TeBox	boxRet;
-	int i, nLoops;
-	int dt = CLOCKS_PER_SEC/4;
-	clock_t	t0, t1, t2;
-	vector<string> inClauseVector;
-
-	TeLayer *layer = theme->layer();
-	TeDatabase *db = layer->database();
-	TeDatabasePortal *portal = db->getPortal();
-	canvas->setDataProjection (layer->projection());
-	string TC = theme->collectionTable();
-
-	string tableName, objectId;
-	TeColor color;
-	TeVisual	visual;
-
-	set<string>::iterator itB = drawSet.begin();
-	set<string>::iterator itE = drawSet.end();
-	inClauseVector = generateInClauses(itB,itE, db);
-
-	if (layer->hasGeometry(TePOLYGONS) && (theme->visibleRep() & TePOLYGONS))
-	{
-		map<int, RepMap>::iterator it = layerRepMap.find(layer->id());
-//		nLoops = 0;
-//		progress->setTotalSteps(drawSet.size());
-		t2 = clock();
-		t0 = t1 = t2;
-
-		bool hasVisual = false;
-
-		if(visualMap)
-			hasVisual = (visualMap->find(TePOLYGONS) != visualMap->end());
-
-		TeVisual visualPol;
-
-		if(hasVisual)
-			visualPol = (*visualMap)[TePOLYGONS];
-
-
-		for (i = 0; i < (int)inClauseVector.size(); ++i)
-		{
-			// query the database table containing the polygons� geometry
-			tableName = layer->tableName(TePOLYGONS);
-			string queryPolygons  = "SELECT " + tableName + ".*, c_legend_id, c_legend_own, c_object_status";
-			queryPolygons += " FROM " + tableName + ", " + theme->collectionTable();
-			queryPolygons += " WHERE object_id = c_object_id AND object_id IN " + inClauseVector[i];
-			
-			if(db->dbmsName() != "OracleSpatial" && db->dbmsName() != "PostGIS")
-				queryPolygons += " ORDER BY object_id ASC, parent_id ASC, num_holes DESC";
-			else
-				queryPolygons += " ORDER BY object_id ASC";
-
-			portal->freeResult();
-			if (portal->query(queryPolygons) == false)
-			{
-				delete portal;
-				return boxRet;
-			}
-			int	groPos = portal->AttributeList().size() - 3;
-			int	ownPos = portal->AttributeList().size() - 2;
-			int	resPos = portal->AttributeList().size() - 1;
-
-			if(portal->fetchRow())
-			{
-				bool flag = true;
-				do
-				{
-					TePolygon poly;
-
-					if(hasVisual)
-					{
-						color = visualPol.color();
-						canvas->setPolygonColor(color.red_, color.green_, color.blue_);
-						canvas->setPolygonStyle((int)visualPol.style(),visualPol.transparency());
-						color = visualPol.contourColor();
-						canvas->setPolygonLineColor (color.red_, color.green_, color.blue_);
-						canvas->setPolygonLineStyle((int)visualPol.contourStyle(),visualPol.contourWidth());
-					}
-					else
-					{
-						visual = getVisual(portal, theme, TePOLYGONS, resPos, groPos, ownPos);					
-						color = visual.color();
-						canvas->setPolygonColor(color.red_, color.green_, color.blue_);
-						canvas->setPolygonStyle((int)visual.style(),visual.transparency());
-						color = visual.contourColor();
-						canvas->setPolygonLineColor (color.red_, color.green_, color.blue_);
-						canvas->setPolygonLineStyle((int)visual.contourStyle(),visual.contourWidth());
-					}
-
-					if(it == layerRepMap.end())
-					{
-						flag = portal->fetchGeometry(poly);
-						boxRet = TeUnion(boxRet, poly.box());
-						canvas->plotPolygon(poly);
-					}
-					else
-					{
-						int geomId = atoi(portal->getData(0));					
-						int parent_id = atoi(portal->getData(4));
-						int parent = parent_id;
-						while(parent == parent_id)
-						{
-							flag = portal->fetchRow();
-							if(flag)
-								parent = atoi(portal->getData(4));
-							else
-								parent = -1;
-						}
-						boxRet = TeUnion(boxRet, layerRepMap[layer->id()].polygonMap_[geomId].box());
-						canvas->plotPolygon(layerRepMap[layer->id()].polygonMap_[geomId]);
-					}
-					t2 = clock();
-//					nLoops++;
-					if (int(t2-t1) > dt)
-					{
-						t1 = t2;
-						canvas->copyPixmap1ToWindow();
-//						if(progress->wasCancelled())
-//							break;
-//						progress->setProgress(nLoops);
-					}
-				}
-				while (flag);
-			}
-		}
-//		progress->reset();
-	}
-
-	if (layer->hasGeometry(TeCELLS) && (theme->visibleRep() & TeCELLS))
-	{
-//		nLoops = 0;
-//		progress->setTotalSteps(drawSet.size());
-		t2 = clock();
-		t0 = t1 = t2;
-
-		bool hasVisual = false;
-
-		if(visualMap)
-			hasVisual = (visualMap->find(TeCELLS) != visualMap->end());
-
-		TeVisual visualCell;
-
-		if(hasVisual)
-			visualCell = (*visualMap)[TeCELLS];
-
-
-		for (i = 0; i < (int)inClauseVector.size(); ++i)
-		{
-			// query the database table containing the lines� geometry
-			tableName = layer->tableName(TeCELLS);
-			string queryCells  = "SELECT " + tableName + ".*, c_legend_id, c_legend_own, c_object_status";
-			queryCells += " FROM " + tableName + ", " + theme->collectionTable();
-			queryCells += " WHERE object_id = c_object_id AND object_id IN " + inClauseVector[i];
-
-			portal->freeResult();
-			if (portal->query(queryCells) == false)
-			{
-				delete portal;
-				return boxRet;
-			}
-			int	groPos = portal->AttributeList().size() - 3;
-			int	ownPos = portal->AttributeList().size() - 2;
-			int	resPos = portal->AttributeList().size() - 1;
-			
-			if(portal->fetchRow())
-			{
-				bool flag = true;
-				do
-				{
-					TeCell cell;
-
-					if(hasVisual)
-					{
-						color = visualCell.color();
-						canvas->setPolygonColor(color.red_, color.green_, color.blue_);
-						canvas->setPolygonStyle((int)visualCell.style(),visualCell.transparency());
-						color = visualCell.contourColor();
-						canvas->setPolygonLineColor (color.red_, color.green_, color.blue_);
-						canvas->setPolygonLineStyle((int)visualCell.contourStyle(),visualCell.contourWidth());
-					}
-					else
-					{
-
-						visual = getVisual(portal, theme, TePOLYGONS, resPos, groPos, ownPos);	//use TePOLYGONS				
-						color = visual.color();
-						canvas->setPolygonColor(color.red_, color.green_, color.blue_);
-						canvas->setPolygonStyle((int)visual.style(),visual.transparency());
-						color = visual.contourColor();
-						canvas->setPolygonLineColor (color.red_, color.green_, color.blue_);
-						canvas->setPolygonLineStyle((int)visual.contourStyle(),visual.contourWidth());
-					}
-
-					flag = portal->fetchGeometry(cell);
-					boxRet = TeUnion(boxRet, cell.box());
-					canvas->plotCell(cell);
-					t2 = clock();
-//					nLoops++;
-					if (int(t2-t1) > dt)
-					{
-						t1 = t2;
-						canvas->copyPixmap1ToWindow();
-//						if(progress->wasCancelled())
-//							break;
-//						progress->setProgress(nLoops);
-					}
-				}
-				while (flag);
-			}
-		}
-//		progress->reset();
-	}
-
-	if (layer->hasGeometry(TeLINES) && (theme->visibleRep() & TeLINES))
-	{
-//		nLoops = 0;
-//		progress->setTotalSteps(drawSet.size());
-		t2 = clock();
-		t0 = t1 = t2;
-
-		bool hasVisual = false;
-
-		if(visualMap)
-			hasVisual = (visualMap->find(TeLINES) != visualMap->end());
-
-		TeVisual visualLin;
-
-		if(hasVisual)
-			visualLin = (*visualMap)[TeLINES];
-
-
-		for (i = 0; i < (int)inClauseVector.size(); ++i)
-		{
-			// query the database table containing the lines� geometry
-			tableName = layer->tableName(TeLINES);
-			string queryLines  = "SELECT " + tableName + ".*, c_legend_id, c_legend_own, c_object_status";
-			queryLines += " FROM " + tableName + ", " + theme->collectionTable();
-			queryLines += " WHERE object_id = c_object_id AND object_id IN " + inClauseVector[i];
-
-			portal->freeResult();
-			if (portal->query(queryLines) == false)
-			{
-				delete portal;
-				return boxRet;
-			}
-			int	groPos = portal->AttributeList().size() - 3;
-			int	ownPos = portal->AttributeList().size() - 2;
-			int	resPos = portal->AttributeList().size() - 1;
-
-			if(portal->fetchRow())
-			{
-				bool flag = true;
-				do
-				{
-					TeLine2D line;
-
-					if(hasVisual)
-					{
-						color = visualLin.color();
-						canvas->setLineColor(color.red_, color.green_, color.blue_);
-						canvas->setLineStyle((int)visualLin.style(),visualLin.width());
-					}
-					else
-					{
-						visual = getVisual(portal, theme, TeLINES, resPos, groPos, ownPos);					
-						color = visual.color();
-						canvas->setLineColor(color.red_, color.green_, color.blue_);
-						canvas->setLineStyle((int)visual.style(),visual.width());
-					}
-
-					flag = portal->fetchGeometry(line);
-					boxRet = TeUnion(boxRet, line.box());
-					canvas->plotLine(line);
-					t2 = clock();
-//					nLoops++;
-					if (int(t2-t1) > dt)
-					{
-						t1 = t2;
-						canvas->copyPixmap1ToWindow();
-//						if(progress->wasCancelled())
-//							break;
-//						progress->setProgress(nLoops);
-					}
-				}
-				while (flag);
-			}
-		}
-//		progress->reset();
-	}
-
-	if (layer->hasGeometry(TePOINTS) && (theme->visibleRep() & TePOINTS))
-	{
-		nLoops = 0;
-//		progress->setTotalSteps(drawSet.size());
-		t2 = clock();
-		t0 = t1 = t2;
-
-		bool hasVisual = false;
-
-		if(visualMap)
-			hasVisual = (visualMap->find(TePOINTS) != visualMap->end());
-
-		TeVisual visualPt;
-
-		if(hasVisual)
-			visualPt = (*visualMap)[TePOINTS];
-
-
-
-		for (i = 0; i < (int)inClauseVector.size(); ++i)
-		{
-			// query the database table containing the points� geometry
-			tableName = layer->tableName(TePOINTS);
-			string queryLines  = "SELECT " + tableName + ".*, c_legend_id, c_legend_own, c_object_status";
-			queryLines += " FROM " + tableName + ", " + theme->collectionTable();
-			queryLines += " WHERE object_id = c_object_id AND object_id IN " + inClauseVector[i];
-
-			portal->freeResult();
-			if (portal->query(queryLines) == false)
-			{
-				delete portal;
-				return boxRet;
-			}
-			int	groPos = portal->AttributeList().size() - 3;
-			int	ownPos = portal->AttributeList().size() - 2;
-			int	resPos = portal->AttributeList().size() - 1;
-
-			if(portal->fetchRow())
-			{
-				bool flag = true;
-				do
-				{
-					TePoint point;
-
-					if(hasVisual)
-					{
-						color = visualPt.color();
-						canvas->setPointColor(color.red_, color.green_, color.blue_);
-						canvas->setPointStyle((int)visualPt.style(),visualPt.size());
-					}
-					else
-					{
-						visual = getVisual(portal, theme, TePOINTS, resPos, groPos, ownPos);					
-						color = visual.color();
-						canvas->setPointColor(color.red_, color.green_, color.blue_);
-						canvas->setPointStyle((int)visual.style(),visual.size());
-					}
-
-					flag = portal->fetchGeometry(point);
-					double dw = canvas->mapVtoDW(visual.size());
-					TeCoord2D p = point.location();
-					TeBox b(p.x()-dw, p.y()-dw, p.x()+dw, p.y()+dw);
-					boxRet = TeUnion(boxRet, b);
-					canvas->plotPoint(point);
-					t2 = clock();
-					nLoops++;
-					if (int(t2-t1) > dt)
-					{
-						t1 = t2;
-						canvas->copyPixmap1ToWindow();
-//						if(progress->wasCancelled())
-//							break;
-//						progress->setProgress(nLoops);
-					}
-				}
-				while (flag);
-			}
-		}
-//		progress->reset();
-	}
-	delete portal;
-	return boxRet;
-}
-
-template<class Canvas>
-bool objBoxInCanvas(TeThemeApplication *theme, Canvas *canvas, set<string>& drawSet, TeGeomRep repType, TeBox& bout, double tol)
-{
-	//calculate the box that contains all the objects in objectIdSet.
-	//If this box is inside the canvas box, return true to indicate that
-	//is enough to paint the objects selected. If this box is not inside
-	//the canvas box, center this box in the canvas, and return false
-	//to indicate that a plot in the whole canvas area is necessary.
-
-	TeLayer *layer = theme->layer();
-	TeDatabase *db = layer->database();
-	TeDatabasePortal *portal = db->getPortal();
-
-	string tableName;
-	if (repType & TePOLYGONS)
-		tableName = theme->layer()->tableName(TePOLYGONS);
-	else if (repType & TeLINES)
-		tableName = theme->layer()->tableName(TeLINES);
-	else if (repType & TePOINTS)
-		tableName = theme->layer()->tableName(TePOINTS);
-	else if (repType & TeCELLS)
-		tableName = theme->layer()->tableName(TeCELLS);
-
-	set<string>::iterator it, beginIt;
-	int i, chunk = 200, size = drawSet.size();
-	string inClause, plic, fields, queryString;
-
-	beginIt = drawSet.begin();
-	while (size > 0)
-	{
-		portal->freeResult();
-		inClause = "(";
-		plic = "'";
-		i = 0;
-		for (it = beginIt; it != drawSet.end(); ++it)
-		{
-			if (i >= chunk)
-				break;
-			inClause += plic + *it + "',";
-			++i;
-		}
-		inClause[inClause.size() - 1] = ')';
-		beginIt = it;
-		size -= chunk;
-
-		if((repType & TePOLYGONS) || (repType & TeLINES) || (repType & TeCELLS))
-		{
-			if(db->dbmsName() == "PostGIS")
-				fields = "MIN(xmin(spatial_data::box3d)), MIN(ymin(spatial_data::box3d)), MAX(xmax(spatial_data::box3d)), MAX(ymax(spatial_data::box3d))";
-			else
-				fields = "MIN(lower_x), MIN(lower_y), MAX(upper_x), MAX(upper_y)";
-
-			queryString =  "SELECT " + fields;
-			queryString += " FROM " + tableName; 
-			queryString += " WHERE object_id IN " + inClause;
-			
-			if (portal->query(queryString))
-			{
-				while(portal->fetchRow())
-				{
-					string vxmin = portal->getData(0);
-					string vymin = portal->getData(1);
-					string vxmax = portal->getData(2);
-					string vymax = portal->getData(3);
-					if(vxmin.empty() || vymin.empty() || vxmax.empty() || vymax.empty())
-						continue;
-					double xmin = atof(vxmin.c_str());
-					double ymin = atof(vymin.c_str());
-					double xmax = atof(vxmax.c_str());
-					double ymax = atof(vymax.c_str());
-					TeBox ibox(xmin+tol, ymin+tol, xmax-tol, ymax-tol);
-					updateBox (bout, ibox);
-				}
-			}
-		}
-		else if(repType & TePOINTS)
-		{
-			if(db->dbmsName() == "PostGIS")
-				fields = "MIN(xmin(spatial_data::box3d)), MIN(ymin(spatial_data::box3d)), MAX(xmax(spatial_data::box3d)), MAX(ymax(spatial_data::box3d))";
-			else
-				fields = "MIN(x), MIN(y), MAX(x), MAX(y)";
-
-			queryString =  "SELECT " + fields;
-			queryString += " FROM " + tableName; 
-			queryString += " WHERE object_id IN " + inClause;
-
-			if (portal->query(queryString))
-			{
-				while(portal->fetchRow())
-				{
-					string vx = portal->getData(0);
-					string vy = portal->getData(1);
-					if(vx.empty() || vy.empty())
-						continue;
-					double x = atof(vx.c_str());
-					double y = atof(vy.c_str()); 
-
-					TeBox ibox(x-tol, y-tol, x+tol, y+tol);
-					updateBox (bout, ibox);
-				}
-			}
-		}
-	}
-
-	TeBox cbox = canvas->getDataWorld();
-	if(TeWithin(bout, cbox) == true)
-	{
-		delete portal;
-		return true;
-	}
-
-	//box of the objects selected is not inside the canvas box
-	if(bout.width() < cbox.width())
-	{
-		double w = cbox.width();
-		double tw = bout.width();
-		double dw = (w - tw) / 2.;
-		bout.x1_ = bout.x1_ - dw;
-		bout.x2_ = bout.x2_ + dw;
-	}
-
-	if(bout.height() < cbox.height())
-	{
-		double h = cbox.height();
-		double th = bout.height();
-		double dh = (h - th) / 2.;
-		bout.y1_ = bout.y1_ - dh;
-		bout.y2_ = bout.y2_ + dh;
-	}
-
-	delete portal;
-
-	// layer to canvas projection
-	bout = TeRemapBox(bout, theme->layer()->projection(), canvas->projection());
-	return false;
-}
-
-
-template<class Canvas>
-void TePlotFrame(TeThemeApplication* theme, Canvas* canvas, map<int, RepMap>& layerRepMap, map<string, TeGeomRepVisualMap*>& objVisualMap)
-{
-	string tableName, objectId;
-	TeColor color;
-	TeVisual visual;
-
-	TeLayer *layer = theme->layer();
-	TeDatabase *db = layer->database();
-	TeDatabasePortal *portal = db->getPortal();
-	canvas->setDataProjection (layer->projection());
-	map<int, RepMap>::iterator it = layerRepMap.find(layer->id());
-	TeGeomRepVisualMap* vmap;
-
-	TeBox box;
-	TeBox vb = box;
-	if(box.isValid())
-	{
-		canvas->mapDataWorldToCanvasWorld(vb);
-		canvas->mapCanvasWorldToViewport(vb);
-	}
-
-	if (layer->hasGeometry(TeRASTER) && (theme->visibleRep() & TeRASTER))
-	{
-		TeBox bIn;
-		if (box.isValid())
-		{
-			canvas->setClipRegion((int)vb.x1(), (int)vb.y1(), (int)vb.width(), (int)vb.height());
-			bIn = vb;	
-		}
-	
-		TeRaster* raster = theme->layer()->raster();
-		if (!theme->rasterVisual())
-			theme->createRasterVisual();
-	
-		canvas->plotRaster(raster,theme->rasterVisual(), 0);
-	}	
-	if(layer->hasGeometry(TePOLYGONS) && (theme->visibleRep() & TePOLYGONS))
-	{
-		// query the database table containing the polygons� geometry
-		string wherebox = getWhereBox(portal, theme, canvas, TePOLYGONS, box);
-		tableName = layer->tableName(TePOLYGONS);
-
-		string queryPolygons  = "SELECT " + tableName + ".*";
-		queryPolygons += " FROM " + tableName + ", " + theme->collectionTable();
-		queryPolygons += " WHERE object_id = c_object_id";
-		if(wherebox.empty() == false)
-			queryPolygons += " AND " + wherebox;
-
-		if(db->dbmsName() != "OracleSpatial" && db->dbmsName() != "PostGIS")
-			queryPolygons += " ORDER BY object_id ASC, parent_id ASC, num_holes DESC";
-		else
-			queryPolygons += " ORDER BY object_id ASC";
-
-		portal->freeResult();
-
-		//Plot the polygons whose number was placed in nSteps
-		if (portal->query(queryPolygons) == false)
-		{
-			delete portal;
-			return;
-		}
-		
-		if(portal->fetchRow())
-		{
-			bool flag;
-			flag = true;
-			do
-			{
-				TePolygon poly;
-				int geomId = atoi(portal->getData(0));
-				string oid = portal->getData(1);
-				if (objVisualMap.find(oid) != objVisualMap.end())
-					vmap = objVisualMap[oid];
-				else
-				{
-					flag = portal->fetchGeometry(poly);
-					continue;
-				}
-
-				visual = vmap->operator[](TePOLYGONS);					
-				color = visual.color();
-				canvas->setPolygonColor(color.red_, color.green_, color.blue_);
-				canvas->setPolygonStyle((int)visual.style(),visual.transparency());
-				color = visual.contourColor();
-				canvas->setPolygonLineColor (color.red_, color.green_, color.blue_);
-				canvas->setPolygonLineStyle((int)visual.contourStyle(),visual.contourWidth());
-				if(box.isValid())
-					canvas->setClipRegion((int)vb.x1(), (int)vb.y1(), (int)vb.width(), (int)vb.height());
-				if(it == layerRepMap.end())
-				{
-					flag = portal->fetchGeometry(poly);
-					canvas->plotPolygon(poly);
-				}
-				else
-				{
-					canvas->plotPolygon(layerRepMap[layer->id()].polygonMap_[geomId]);
-					int parent_id = atoi(portal->getData(4));
-					int parent = parent_id;
-					while(parent == parent_id)
-					{
-						flag = portal->fetchRow();
-						if(flag)
-							parent = atoi(portal->getData(4));
-						else
-							parent = -1;
-					}
-				}
-			}
-			while (flag);
-		}
-	}
-
-	if(box.isValid())
-		canvas->setClipRegion((int)vb.x1(), (int)vb.y1(), (int)vb.width(), (int)vb.height());
-	if(layer->hasGeometry(TeCELLS) && (theme->visibleRep() & TeCELLS))
-	{
-		// query the database table containing the polygons� geometry
-		string wherebox = getWhereBox(portal, theme, canvas, TeCELLS, box);
-		tableName = layer->tableName(TeCELLS);
-
-		string queryCells  = "SELECT " + tableName + ".*";
-		queryCells += " FROM " + tableName + ", " + theme->collectionTable();
-		queryCells += " WHERE object_id = c_object_id";
-		if(wherebox.empty() == false)
-			queryCells += " AND " + wherebox;
-
-		portal->freeResult();
-		if (portal->query(queryCells) == false)
-		{
-			delete portal;
-			return;
-		}
-
-		if(portal->fetchRow())
-		{
-			bool flag;
-			flag = true;
-			do
-			{
-				TeCell cell;
-				string oid = portal->getData(1);
-				if (objVisualMap.find(oid) != objVisualMap.end())
-					vmap = objVisualMap[oid];
-				else
-				{
-					flag = portal->fetchGeometry(cell);
-					continue;
-				}
-				visual = vmap->operator[](TePOLYGONS);					
-				color = visual.color();
-				canvas->setPolygonColor(color.red_, color.green_, color.blue_);
-				canvas->setPolygonStyle((int)visual.style(),visual.transparency());
-				color = visual.contourColor();
-				canvas->setPolygonLineColor (color.red_, color.green_, color.blue_);
-				canvas->setPolygonLineStyle((int)visual.contourStyle(),visual.contourWidth());
-				flag = portal->fetchGeometry(cell);
-				canvas->plotCell(cell);
-			}
-			while (flag);
-		}
-	}
-
-	if (layer->hasGeometry(TeLINES) && (theme->visibleRep() & TeLINES))
-	{
-		string wherebox = getWhereBox(portal, theme, canvas, TeLINES, box);
-		// query the database table containing the lines� geometry
-		tableName = layer->tableName(TeLINES);
-
-		string queryLines  = "SELECT " + tableName + ".*";
-		queryLines += " FROM " + tableName + ", " + theme->collectionTable();
-		queryLines += " WHERE object_id = c_object_id";
-		if(wherebox.empty() == false)
-			queryLines += " AND " + wherebox;
-
-		portal->freeResult();
-		if (portal->query(queryLines) == false)
-		{
-			delete portal;
-			return;
-		}
-
-		if(portal->fetchRow())
-		{
-			bool flag = true;
-			do
-			{
-				TeLine2D line;
-				int geomId = atoi(portal->getData(0));					
-				string oid = portal->getData(1);
-				if (objVisualMap.find(oid) != objVisualMap.end())
-					vmap = objVisualMap[oid];
-				else
-				{
-					flag = portal->fetchGeometry(line);
-					continue;
-				}
-
-				visual = vmap->operator[](TeLINES);					
-				color = visual.color();
-				canvas->setLineColor(color.red_, color.green_, color.blue_);
-				canvas->setLineStyle((int)visual.style(),visual.width());
-				if(it == layerRepMap.end())
-				{
-					flag = portal->fetchGeometry(line);
-					canvas->plotLine(line);
-				}
-				else
-				{
-					canvas->plotLine(layerRepMap[layer->id()].lineMap_[geomId]);
-					flag = portal->fetchRow();
-				}
-			}
-			while (flag);
-		}
-	}
-
-	if (layer->hasGeometry(TePOINTS) && (theme->visibleRep() & TePOINTS))
-	{
-		string wherebox = getWhereBox(portal, theme, canvas, TePOINTS, box);
-		// query the database table containing the points� geometry
-		tableName = layer->tableName(TePOINTS);
-
-		string queryPoints  = "SELECT " + tableName + ".*";
-		queryPoints += " FROM " + tableName + ", " + theme->collectionTable();
-		queryPoints += " WHERE object_id = c_object_id";
-		if(wherebox.empty() == false)
-			queryPoints += " AND " + wherebox;
-
-		portal->freeResult();
-		if (portal->query(queryPoints) == false)
-		{
-			delete portal;
-			return;
-		}
-
-		if(portal->fetchRow())
-		{
-			bool flag = true;
-			do
-			{
-				TePoint point;
-				string oid = portal->getData(1);
-				if (objVisualMap.find(oid) != objVisualMap.end())
-					vmap = objVisualMap[oid];
-				else
-				{
-					flag = portal->fetchGeometry(point);
-					continue;
-				}
-
-				visual = vmap->operator[](TePOINTS);					
-				color = visual.color();
-				canvas->setPointColor(color.red_, color.green_, color.blue_);
-				canvas->setPointStyle((int)visual.style(),visual.size());
-				flag = portal->fetchGeometry(point);
-				canvas->plotPoint(point);
-			}
-			while (flag);
-		}
-	}
-	delete portal;
-
-	if(box.isValid())
-		canvas->setClipping(false);
-}
-
-#endif
-
diff --git a/src/terralib/application/TePlotView.h b/src/terralib/application/TePlotView.h
deleted file mode 100644
index a400f82..0000000
--- a/src/terralib/application/TePlotView.h
+++ /dev/null
@@ -1,41 +0,0 @@
-//***********************************************************************
-//      TerraLib is a GIS Classes and Functions Library that 
-//      strongly explores Spatial Database Technologies 
-//
-//      Copyright � 2002 INPE and Tecgraf/PUC-Rio. 
-//
-//      This library is free software; you can redistribute it 
-//      and/or modify it under the terms of the GNU Lesser General 
-//      Public License as published by the Free Software Foundation
-//      version 2.1.(http://www.opensource.org/licenses/lgpl-license.php)
-//
-//      
-//
-//      Send questions or suggestions about the TerraLib Project 
-//      to terralib at dpi.inpe.br .
-//**************************************************************************//
-/*! \file TePlotTheme.h
-    This file contains support to plot a view on a canvas
-*/
-#ifndef TEPLOTVIEW_H
-#define TEPLOTVIEW_H
-#include <TeView.h>
-#include <TePlotTheme.h>
-#include <TeDatabase.h>
-
-template<class Portal, class Canvas>
-void TePlotView (Portal *portal, TeView *view, Canvas *canvas)
-{
-	if (view->themes().size() == 0)
-		portal->loadView (*view);
-
-	for (int i=0 ; i < view->themes().size() ; i++)
-	{
-		TeThemeApplication *theme = (TeTheme*)view->get(i);
-		if (theme->visible ())
-			TePlotTheme (portal, theme, canvas);
-	}
-}
-
-#endif
-
diff --git a/src/terralib/application/TeSemivarModelFactory.h b/src/terralib/application/TeSemivarModelFactory.h
deleted file mode 100644
index d9d556d..0000000
--- a/src/terralib/application/TeSemivarModelFactory.h
+++ /dev/null
@@ -1,153 +0,0 @@
-/************************************************************************************
-TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The library provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use
-of this library and its documentation.
-*************************************************************************************/
-
-/*! \file TeFactorySemivarModel.h
-    This file contains support do deal with factory semivar model
-*/
-
-#ifndef __TERRALIB_INTERNAL_SEMIVARMODEL_H
-#define __TERRALIB_INTERNAL_SEMIVARMODEL_H
-
-#ifdef WIN32 
-#pragma warning ( disable: 4786 ) 
-#endif
-
-#include <TeMatrix.h>
-#include <TeFactory.h>
-
-struct TeSemivarModelParams
-{
-	double		efeitopepita_;
-	double		contribuicao_;
-	double		alcance_;
-};
-
-
-////////////////////////////////////
-class TeSemivarModel		
-{
-public:
-	TeSemivarModel (){};
-	virtual ~TeSemivarModel (){};
-
-	virtual TeMatrix	calculate (TeMatrix&)=0;
-	static TeSemivarModel* DefaultObject(TeSemivarModelParams){ return 0; }
-
-protected:
-	double		modeloefeitopepita_;
-	double		modelocontribuicao_;
-	double		modeloalcance_;
-};
-
-////////////////////////////////////
-class TeEsfericSemivarModel : public TeSemivarModel
-{
-public:
-		TeEsfericSemivarModel(const TeSemivarModelParams& params){
-		modeloefeitopepita_ = params.efeitopepita_;
-		modelocontribuicao_ = params.contribuicao_;
-		modeloalcance_ = params.alcance_;
-	}		
-	
-	virtual ~TeEsfericSemivarModel(){};
-
-	virtual TeMatrix	calculate (TeMatrix&);	
-};
-
-//////////////////////////////////
-class TeExponentialSemivarModel : public TeSemivarModel
-{
-public:
-		TeExponentialSemivarModel(const TeSemivarModelParams& params){
-		modeloefeitopepita_ = params.efeitopepita_;
-		modelocontribuicao_ = params.contribuicao_;
-		modeloalcance_ = params.alcance_;
-	}		
-	
-	virtual ~TeExponentialSemivarModel(){};
-
-	virtual TeMatrix	calculate (TeMatrix&);	
-};
-
-//////////////////////////////////
-class TeGaussianSemivarModel : public TeSemivarModel
-{
-public:
-		TeGaussianSemivarModel(const TeSemivarModelParams& params){
-		modeloefeitopepita_ = params.efeitopepita_;
-		modelocontribuicao_ = params.contribuicao_;
-		modeloalcance_ = params.alcance_;
-	}		
-	
-	virtual ~TeGaussianSemivarModel(){};
-
-	virtual TeMatrix	calculate (TeMatrix&);	
-};
-
-
-
-///////////////////////////////////////////////////////////
-// -- Fabrica de Modelos Teoricos de Variabilidade Espacial 
-
-class TeSemivarModelFactory : public TeFactory<TeSemivarModel, TeSemivarModelParams>
-{
-public:
-	TeSemivarModelFactory( const string& name) : TeFactory<TeSemivarModel, TeSemivarModelParams>(name){}
-
-	virtual TeSemivarModel* build( const TeSemivarModelParams&) = 0;
-};
-
-
-/////////////////////////////
-class TeEsfericSemivar_Factory : public TeSemivarModelFactory
-{
-public:
-	TeEsfericSemivar_Factory (const string& name) : TeSemivarModelFactory(name){}
-
-	virtual TeSemivarModel* build(const TeSemivarModelParams& params){return new TeEsfericSemivarModel(params);}
-};
-
-
-/////////////////////////////
-class TeExponentialSemivar_Factory : public TeSemivarModelFactory
-{
-public:
-	TeExponentialSemivar_Factory (const string& name) : TeSemivarModelFactory(name){}
-
-	virtual TeSemivarModel* build(const TeSemivarModelParams& params){return new TeExponentialSemivarModel(params);}
-};
-
-
-/////////////////////////////
-class TeGaussianSemivar_Factory : public TeSemivarModelFactory
-{
-public:
-	TeGaussianSemivar_Factory (const string& name) : TeSemivarModelFactory(name){}
-
-	virtual TeSemivarModel* build(const TeSemivarModelParams& params){return new TeGaussianSemivarModel(params);}
-};
-
-
-#endif
-
-
diff --git a/src/terralib/application/TeThemeApplication.cpp b/src/terralib/application/TeThemeApplication.cpp
deleted file mode 100644
index 1cdc086..0000000
--- a/src/terralib/application/TeThemeApplication.cpp
+++ /dev/null
@@ -1,345 +0,0 @@
-/************************************************************************************
-TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The library provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use
-of this library and its documentation.
-*************************************************************************************/
-
-#include "TeThemeApplication.h"
-#include "TeUtils.h"
-#include "TeDatabase.h"
-#include "TeDatabaseUtils.h"
-
-
-unsigned int TeThemeApplication::getTableIndexFromField(string fieldName)
-{
-	unsigned int i, n, index;
-	index = 0;
-	n = attTableVector_[0].attributeList().size();
-	for (i = 0; i < sqlAttList_.size(); ++i)
-	{
-		if (i > n - 1)
-		{
-			++index;
-			n += attTableVector_[index].attributeList().size();
-		}
-
-		if (sqlAttList_[i].rep_.name_ == fieldName)
-			break;
-	}
-	return index;
-}
-
-
-
-bool TeThemeApplication::locateText (TeCoord2D &pt, TeText &text, const double& tol)
-{
-	TeDatabasePortal* portal = layer()->database()->getPortal();
-	string table = textTable();
-
-	TeBox box (pt.x()-tol,pt.y()-tol,pt.x()+tol,pt.y()+tol);
-	string q = "SELECT " + table + ".* FROM " + table + ", " + collectionTable();
-	char buf [1024];
-	sprintf (buf," WHERE c_object_id = object_id AND (x < %f AND x > %f AND y < %f AND y > %f)",
-		box.x2(),box.x1(),box.y2(),box.y1());
-	q += buf;
-	if (!portal->query(q) || !portal->fetchRow())
-	{
-		delete portal;
-		return false;
-	}
-	// Look for all texts
-	bool flag = true;
-	TeTextSet ts;
-	do
-	{
-		TeText p;
-		flag = portal->fetchGeometry(p);
-		ts.add ( p );
-	} while (flag);
-
-	delete portal;
-
-	int k;
-	if (TeNearest (pt, ts, k, tol))
-	{
-		text = ts[k];
-		return true;
-	}
-	return false;
-}
-
-TeVisual TeThemeApplication::getTextVisual(const TeText &text)
-{
-	int	dot_height, rgb;
-	string family;
-	string table = textTable() + "_txvisual";
-	bool fix_size = false, bold = false, italic = false;
-	TeDatabase* db = layer()->database();
-
-	string sel = "SELECT dot_height, fix_size, color, family, bold, italic FROM ";
-	sel += table + " WHERE geom_id = " + Te2String(text.geomId());
-
-	TeDatabasePortal* portal = db->getPortal();
-	if(portal->query(sel))
-	{
-		if(portal->fetchRow())
-		{
-			dot_height = atoi(portal->getData(0));
-			if(atoi(portal->getData(1)))
-				fix_size = true;
-			rgb = atoi(portal->getData(2));
-			family = portal->getData(3);
-			if(atoi(portal->getData(4)))
-				bold = true;
-			if(atoi(portal->getData(5)))
-				italic = true;
-		}
-	}
-	delete portal;
-	TeColor	cor((rgb >> 16) & 0xff, (rgb >> 8) & 0xff, rgb & 0xff);
-	TeVisual visual;
-	visual.size(dot_height);
-	visual.fixedSize(fix_size);
-	visual.color(cor);
-	visual.family(family);
-	visual.bold(bold);
-	visual.italic(italic);
-
-	return visual;
-}
-
-
-string TeThemeApplication::getLegendTitleAlias()
-{
-	string text;
-
-	TeLegendEntryVector& legendVector = legend();
-	if (legendVector.size() > 0)
-	{
-		TeDatabase* database = layer()->database();
-		TeAttributeRep rep; 
-		string nattr;
-		if(grouping())
-		{
-			rep = grouping()->groupAttribute_; 
-			nattr = grouping()->groupNormAttribute_;
-		}
-		text = rep.name_;
-		map<int, map<string, string> >::iterator it = database->mapThemeAlias().find(id());
-		if(it != database->mapThemeAlias().end())
-		{
-			map<string, string>& m = it->second;
-			map<string, string>::iterator tit = m.find(text);
-			if(tit != m.end())
-				text = tit->second;
-			if(!(nattr.empty() || nattr == "NONE"))
-			{
-				tit = m.find(nattr);
-        		if(tit != m.end()) {
-        		  if (!tit->second.empty()) {
-					text += "/" + tit->second;
-          		  }
-        		}
-        		else  //Deixando ficar sem barra 
-					text += "/" + nattr;
-			}
-		}
-	}
-	return text;
-}
-
-string TeThemeApplication::	getPieBarAlias(string atr)
-{
-	string text;
-
-	if (chartAttributes_.size() > 0)
-	{
-		TeDatabase* database = layer()->database();
-		map<int, map<string, string> >::iterator it = database->mapThemeAlias().find(id());
-		if(it != database->mapThemeAlias().end())
-		{
-			map<string, string>& m = it->second;
-			map<string, string>::iterator tit = m.find(atr);
-			if(tit != m.end())
-				text = tit->second;
-		}
-	}
-	return text;
-}
-
-bool TeThemeApplication::setAlias(string attr, string attAlias)
-{
-	TeDatabase* db = layer()->database();
-	map<int, map<string, string> >& mapThemeAlias = db->mapThemeAlias();
-	map<string, string>& mapAA = mapThemeAlias[id()];
-	map<string, string>::iterator it = mapAA.begin();
-
-	while(it != mapAA.end())
-	{
-		if(it->first != attr && it->second == attAlias)
-			return false;
-		it++;
-	}
-
-	int f = attr.find("/");
-	int af = attAlias.find("/");
-	if(f >= 0 && af >= 0)
-	{
-		string nattr = attr;
-		attr.erase(f, attr.size()-f);
-		nattr.erase(0, f+1);
-
-		string alias = attAlias;
-		string nalias = alias;
-		alias.erase(af, alias.size()-af);
-		nalias.erase(0, af+1);
-
-		mapAA[attr] = alias;
-		mapAA[nattr] = nalias;
-		updateThemeApplication (db, this);
-		return true;
-	}
-	else
-	{
-    	//Alterando para deixar ficar sem /
-    	if(f >= 0) {
-      		string nattr = attr;
-      		nattr.erase(0, f+1);
-      		mapAA[nattr] = "";
-			attr.erase(f, attr.size()-f);
-    	}
-		mapAA[attr] = attAlias;
-		updateThemeApplication (db, this);
-		return true;
-	}
-}
-
-void TeThemeApplication::removeAlias(string attribute)
-{
-	string attr = attribute;
-	string nattr = attr;
-	TeDatabase* db = layer()->database();
-	map<int, map<string, string> >& mapThemeAlias = db->mapThemeAlias();
-	map<string, string>& mapAA = mapThemeAlias[id()];
-
-	int f = attr.find("/");
-	if(f >= 0)
-	{
-		attr.erase(f, attr.size()-f);
-		nattr.erase(0, f+1);
-	}
-	map<string, string>::iterator it = mapAA.find(attr);
-	if(it != mapAA.end())
-	{
-		mapAA.erase(it);
-		if(mapAA.size() == 0)
-		{
-			map<int, map<string, string> >::iterator tit = mapThemeAlias.find(id());
-			if(tit != mapThemeAlias.end())
-				mapThemeAlias.erase(tit);
-		}
-	}
-	if(nattr != attr)
-	{
-		map<string, string>::iterator it = mapAA.find(nattr);
-		if(it != mapAA.end())
-		{
-			mapAA.erase(it);
-			if(mapAA.size() == 0)
-			{
-				map<int, map<string, string> >::iterator tit = mapThemeAlias.find(id());
-				if(tit != mapThemeAlias.end())
-					mapThemeAlias.erase(tit);
-			}
-		}
-	}
-
-	updateThemeApplication (db, this);
-}
-
-void TeThemeApplication::removeAllAlias()
-{
-	TeDatabase* db = layer()->database();
-	map<int, map<string, string> >& mapThemeAlias = db->mapThemeAlias();
-	map<int, map<string, string> >::iterator it = mapThemeAlias.find(id());
-	if(it != mapThemeAlias.end())
-		mapThemeAlias.erase(it);
-	updateThemeApplication (db, this);
-}
-
-void TeThemeApplication::concatTableName(string& attr)
-{
-	string tableName;
-
-	if(attr.find(".") == attr.npos)
-	{
-		TeAttrTableVector::iterator it = attTableVector_.begin();
-
-		while(it != attTableVector_.end())
-		{
-			TeTable	t = *it;
-			TeAttributeList AL = t.attributeList();
-			TeAttributeList::iterator iit = AL.begin();
-
-			while(iit != AL.end())
-			{
-				if((*iit).rep_.name_ == attr)
-				{
-					tableName = (*it).name();
-					break;
-				}
-				iit++;
-			}
-
-			if(tableName.empty() == false)
-			{
-				tableName += ".";
-				attr.insert(0, tableName);
-				break;
-			}
-			it++;
-		}
-	}
-}
-
-
-
-int TeThemeApplication::numObjects() {
-
-  int numRows;
-
-  string s = "SELECT COUNT(*) " + sqlFrom();	
-  TeDatabasePortal* portal = layer_->database()->getPortal();
-  if(portal->query(s))
-  {
-    if(portal->fetchRow())
-    {
-      numRows = atoi(portal->getData(0));
-    }
-  }
-  
-  delete portal;
-  return numRows;
-  
-}
-
-TeBox TeThemeApplication::boundingBox() {
-    return layer_->database()->getThemeBox(this);
-}
diff --git a/src/terralib/application/TeThemeApplication.h b/src/terralib/application/TeThemeApplication.h
deleted file mode 100644
index e6b8317..0000000
--- a/src/terralib/application/TeThemeApplication.h
+++ /dev/null
@@ -1,314 +0,0 @@
-/************************************************************************************
- TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The library provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use
-of this library and its documentation.
-*************************************************************************************/
-
-#ifndef  __TERRALIB_INTERNAL_THEMEAPLICATION_H
-#define  __TERRALIB_INTERNAL_THEMEAPLICATION_H
-
-#include "TeTheme.h"
-
-struct RepMap {
-	map<int, TePolygon> polygonMap_;
-	map<int, TeLine2D> lineMap_;
-};
-
-
-class TeThemeApplication: public TeTheme
-{
-public:
-
-	//! Constructor
-    TeThemeApplication( const string& name="", TeLayer* layer=0, TeViewNode* parent = 0, int view=0, int id=0)
-		: TeTheme(name, layer, parent, view, id),
-		outOfCollectionVisibility_(false),
-		withoutDataConnectionVisibility_(false),
-		refineAttributeWhere_(""),
-		refineSpatialWhere_(""), 
-		refineTemporalWhere_(""),
-		groupColorDir_(TeColorAscSatEnd),
-		groupObjects_(TeAll),
-		pieDiameter_ (0.0),
-		pieMinDiameter_(0.0),
-		pieMaxDiameter_(0.0),
-		barMinHeight_(0.0),
-		barMaxHeight_(0.0),
-		barWidth_(0.0),
-		chartMaxVal_(-1),
-		chartMinVal_(-1),
-		chartType_(TeBarChart),
-		chartObjects_(TeAll),
-		chartFunction_("AVG"),
-		keepDimension_(0),
-		showCanvasLegend_(false),
-		canvasLegWidth_(0.0),
-		canvasLegHeight_(0.0), 
-		editRep_ (TeGeomRep(0)),
-		mix_color_(false),
-		count_obj_(false), 
-		textTable_("")
-	{}
-	
-	//! Destructor
-	~TeThemeApplication () {}
-
-	//! Returns TRUE if objects of the layer that don�t belong to the theme are visible
-	bool outOfCollectionVisibility() 
-	{ return outOfCollectionVisibility_;}
-	//! Set whether objects of the layer that don�t belong to the theme are visible
-	void outOfCollectionVisibility(bool v) 
-	{ outOfCollectionVisibility_ = v;}
-	
-	//! Returns TRUE if objects whithout descriptive attributes are visible
-	bool withoutDataConnectionVisibility() 
-	{ return withoutDataConnectionVisibility_;}
-	//! Set whether objects whithout descriptive attributes are visible
-	void withoutDataConnectionVisibility(bool v) 
-	{ withoutDataConnectionVisibility_ = v;}
-
-	//! Returns a attribute restriction (where clause) used to refine the selection defined by the theme
-	string refineAttributeWhere() { return refineAttributeWhere_; }
-	//! Set a attribute restriction (where clause) to refine the selection defined by the theme
-	void refineAttributeWhere(const string& s) { refineAttributeWhere_ = s; }
-
-	//! Returns a spatial restriction (where clause) used to refine the selection defined by the theme
-	string refineSpatialWhere() { return refineSpatialWhere_; }
-	//! Set a spatial restriction (where clause) used to refine the selection defined by the theme
-	void refineSpatialWhere(const string& s) { refineSpatialWhere_ = s; }
-
-	//! Returns a temporal restriction (where clause) used to refine the selection defined by the theme
-	string refineTemporalWhere() { return refineTemporalWhere_; }
-	//! Set a temporal restriction (where clause) used to refine the selection defined by the theme
-	void refineTemporalWhere(const string& t) { refineTemporalWhere_ = t; }
-
-	//! Returns the grouping colors
-	string groupColor () { return groupColor_ ; }
-	//! Set the grouping colors
-	void groupColor (const string& c) { groupColor_ = c; }
-	
-	//! Returns the grouping colors direction
-	TeColorDirection groupColorDir() { return groupColorDir_; }
-	//! Set the grouping colors direction
-	void groupColorDir(TeColorDirection n){ groupColorDir_ = n; }
-
-	//! Returns a code identifying which objects should be grouped
-	TeSelectedObjects groupObjects() { return groupObjects_; }
-	//! Set a code identifying which objects should be  grouped
-	void groupObjects(TeSelectedObjects n) { groupObjects_ = n; }
-
-	//! Returns the diameter in pixels of the pie charts
-	double pieDiameter() { return pieDiameter_; };
-	//! Set the diameter in pixels of the pie charts
-	void pieDiameter(double n) { pieDiameter_ = n; };
-
-	//! Returns the name of the attribute which gives the dimension of the diameter in pixels of the pie charts
-	string pieDimAttribute() { return pieAttr_; }
-	//! Set the name of the attribute which gives the dimension of the diameter in pixels of the pie charts
-	void pieDimAttribute(const string& s) { pieAttr_ = s; }
-
-	//! Returns the minimum diameter in pixels of the pie charts
-	double pieMinDiameter() { return pieMinDiameter_; };
-	//! Set the minimum diameter in pixels of pie charts
-	void pieMinDiameter(double n) { pieMinDiameter_ = n; };
-
-	//! Returns the maximum diameter in pixels of the pie charts
-	double pieMaxDiameter() { return pieMaxDiameter_; };
-	//! Set the maximum diameter in pixels of pie charts
-	void pieMaxDiameter(double n) { pieMaxDiameter_ = n; };
-
-	//! Returns the minimum height in pixels of the bar charts
-	double barMinHeight() { return barMinHeight_; };
-	//! Set the minimum height in pixels of the bar charts
-	void barMinHeight(double n) { barMinHeight_ = n; };
-
-	//! Returns the maximum height in pixels of the bar charts
-	double barMaxHeight() { return barMaxHeight_; };
-	//! Set the maximum height in pixels of the bar charts
-	void barMaxHeight(double n) { barMaxHeight_ = n; };
-
-	//! Returns the bar width in pixels of the bar charts
-	double barWidth() { return barWidth_; };
-	//! Set the bar width in pixels of the bar charts
-	void barWidth(double n) { barWidth_ = n; };
-
-	//! Returns the type of the chart 
-	TeChartType	chartType() {return chartType_;}
-	//! Set the type of the chart 
-	void chartType(TeChartType n) { chartType_ = n; }
-
-	//! Get the chart aggregate function
-	string chartFunction() { return chartFunction_; }
-
-	//! Set the chart aggregate function
-	void chartFunction(string s) { chartFunction_ = s; }
-
-	//! Returns the objects where the charts should be plotted 
-	TeSelectedObjects chartObjects() { return chartObjects_; };
-	//! Set the objects where the charts should be plotted 
-	void chartObjects(TeSelectedObjects n) { chartObjects_ = n; };
-
-	//! Returns the maximum value used to plot charts
-	double chartMaxVal() { return chartMaxVal_; }
-	//! Set the maximum value used to plot charts
-	void chartMaxVal(double n) { chartMaxVal_ = n; }
-
-	//! Returns the minimum value used to plot charts
-	double chartMinVal() { return chartMinVal_; }
-	//! Set the minimum value used to plot charts
-	void chartMinVal(double n) { chartMinVal_ = n; }
-
-	//! Returns TRUE if charts keep its dimension in zooming operations 
-	int	keepDimension() { return keepDimension_; };
-	//! Set if charts keep its dimension in zooming operations 
-	void keepDimension(int n) { keepDimension_ = n; };
-
-	//! Returns TRUE if the legends of the grouping should be plot in the canvas
-	bool showCanvasLegend()
-	{	return showCanvasLegend_; }
-	//! Set whether the legends of the grouping should be plot in the canvas
-	void showCanvasLegend(bool cl)
-	{	showCanvasLegend_ = cl; }
-
-	//! Returns the upper left position of the canvas legend
-	TeCoord2D canvasLegUpperLeft()
-	{	return canvasLegUpperLeft_; }
-	//! Set the upper left position of the canvas legend
-	void canvasLegUpperLeft(TeCoord2D c)
-	{	canvasLegUpperLeft_ = c; }
-	//! Returns the canvas legend width
-	double canvasLegWidth()
-	{	return canvasLegWidth_; }
-	//! Set the canvas legend width
-	void canvasLegWidth(double w)
-	{	canvasLegWidth_ = w; }
-	//! Returns the canvas legend height
-	double canvasLegHeight()
-	{	return canvasLegHeight_; }
-	//! Set the canvas legend height
-	void canvasLegHeight(double h)
-	{	canvasLegHeight_ = h; }
-	
-	//! Returns the geometrical representation being edited
-	TeGeomRep editRep() {return editRep_;}
-	//! Set the geometrical representation being edited
-	void editRep(TeGeomRep r) {editRep_ = r;}
-
-	//! Get the table index from the list of the theme tables, through a given field
-	unsigned int getTableIndexFromField(string fieldName);
-
-	bool mixColor()
-	{	return mix_color_; }
-
-	void mixColor(bool mixcolor)
-	{	mix_color_ = mixcolor;	}
-
-	bool countObj()
-	{	return count_obj_; }
-
-	void countObj(bool countobj)
-	{	count_obj_ = countobj;	}
-
-	//! Returns the name of a text table that is visible by this theme (used to label objects)
-	string textTable() { return textTable_; }
-
-	//! Set the name of a text table that is visible by this theme (used to label objects)
-	void textTable(const string& t) { textTable_ = t; }
-
-	bool locateText	(TeCoord2D &pt, TeText &text, const double& tol = 0.0);
-
-	TeVisual getTextVisual(const TeText &text);
-
-	bool setAlias(string att, string attAlias);
-
-	string getLegendTitleAlias();
-
-	string getPieBarAlias(string atr);
-
-	void removeAlias(string att);
-
-	void removeAllAlias();
-
-	void concatTableName(string &attr);
-
-  //! Returns the number of objects in a theme
-  int  numObjects();
-  
-  //! Returns the bounding box of the theme
-  TeBox boundingBox();  
-  
-
-
-	//! Vector of colors used to plot the charts
-	vector<TeColor> chartColors_;	
-	//! Vector of attributes used to plot the charts
-	vector<string>	chartAttributes_;
-
-	string		chartSelected_;
-	TeCoord2D	chartPoint_;
-	TePoint		tePoint_;
-
-private:
-	
-	bool			outOfCollectionVisibility_; 
-	bool			withoutDataConnectionVisibility_; 
-
-	// Refining 
-	string			refineAttributeWhere_;
-	string			refineSpatialWhere_;
-	string			refineTemporalWhere_;
-
-	string				groupColor_;
-	TeColorDirection	groupColorDir_;
-	TeSelectedObjects	groupObjects_;
-		
-	double			pieDiameter_;
-	string			pieAttr_;
-	double			pieMinDiameter_;
-	double			pieMaxDiameter_;
-
-	double			barMinHeight_;
-	double			barMaxHeight_;
-	double			barWidth_;
-
-	double			  chartMaxVal_;
-	double			  chartMinVal_;
-	TeChartType		  chartType_;
-	TeSelectedObjects chartObjects_;
-	string			  chartFunction_;
-	
-	int				keepDimension_;
-	
-	bool			showCanvasLegend_;		//to show or not the legend in the canvas
-	TeCoord2D		canvasLegUpperLeft_;	//legend�s upper left point  
-	double			canvasLegWidth_;		//legend width
-	double			canvasLegHeight_;		//legend height
-
-	TeGeomRep		editRep_;
-
-	bool			mix_color_;
-	bool			count_obj_;
-
-	string			textTable_;
-};
-
-
-#endif
-
diff --git a/src/terralib/application/TeUpdateDBVersion.cpp b/src/terralib/application/TeUpdateDBVersion.cpp
deleted file mode 100644
index 686a623..0000000
--- a/src/terralib/application/TeUpdateDBVersion.cpp
+++ /dev/null
@@ -1,545 +0,0 @@
-/************************************************************************************
-TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The library provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use
-of this library and its documentation.
-*************************************************************************************/
-
-#include "TeUpdateDBVersion.h"
-
-bool needUpdateDB(TeDatabase* db, string& DBversion)
-{
-	TeDatabasePortal* portal = db->getPortal();
-	if(!portal)
-		return false;
-
-	string sql = " SELECT db_version FROM te_database ";
-	if(!portal->query(sql))
-	{
-		DBversion = "";
-		delete portal;
-		return true;
-	}
-
-	if(!portal->fetchRow())
-	{
-		DBversion = "";
-		delete portal;
-		return true;
-	}
-
-	DBversion = portal->getData(0);
-	if(DBversion=="3.0.2")  //3.0 Plus
-	{
-		delete portal;
-		return false;
-	}
-	
-	delete portal;
-	return true;
-}
-
-
-bool updateDBVersion(TeDatabase* db, string& DBversion, string& errorMessage)
-{
-	//from old version to 3.0
-	if(DBversion=="")
-	{
-		if(!updateDB30To301(db, errorMessage))
-			return false;
-
-		if(!updateDB20To30(db, errorMessage))
-			return false;
-		
-		DBversion = "3.0.1";
-	}
-
-	//from 3.0 to 3.0.1
-	if(DBversion=="3.0") 
-	{
-		if(!updateDB30To301(db, errorMessage))
-			return false;
-
-		DBversion = "3.0.1";
-	}
-
-	//from 3.0.1 to 3.0.2
-	if(DBversion=="3.0.1") 
-	{
-		if(!updateDB301To302(db, errorMessage))
-			return false;
-
-		DBversion = "3.0.2";
-	}
-
-	if(DBversion!="3.0.2")
-		return false;
-
-	string del= "DELETE FROM te_database"; 
-	if(!db->execute(del))
-		return false;
-
-	string ins = "INSERT INTO te_database (db_version) VALUES ('3.0.2')";
-	if(!db->execute(ins))
-		return false;
-
-	return true;
-}
-
-
-bool updateDB20To30(TeDatabase* db, string& errorMessage)
-{
-	TeAttribute fattr;
-
-	// ----- te_grouping 
-
-	if(db->columnExist("te_grouping", "grouping_function", fattr) == false)
-	{
-		TeAttributeRep atRep;
-		atRep.type_ = TeSTRING;
-		atRep.name_ = "grouping_function";
-		atRep.numChar_ = 10;
-		if(db->addColumn("te_grouping", atRep) == false)
-		{
-			errorMessage = "The column grouping_function could not be appended!";
-			return false;
-		}
-
-		string upd;
-		if(db->columnExist("te_theme_application", "group_function", fattr))
-		{
-			upd =	" UPDATE te_grouping g, te_theme_application ta ";
-			upd +=	" SET g.grouping_function = ta.group_function ";
-			upd +=	" WHERE ta.theme_id = g.theme_id ";
-
-			if(!db->execute (upd))
-				return false;
-
-			db->deleteColumn("te_theme_application", "group_function");
-		}
-		else
-		{
-			upd =	" UPDATE te_grouping g ";
-			upd +=	" SET g.grouping_function = 'AVG' ";
-			
-			if(!db->execute (upd))
-				return false;
-		}
-	}
-
-	// ----- te_theme_application
-
-	if(db->columnExist("te_theme_application", "chart_function", fattr) == false)
-	{
-		TeAttributeRep atRep;
-		atRep.type_ = TeSTRING;
-		atRep.name_ = "chart_function";
-		atRep.numChar_ = 10;
-		if(db->addColumn("te_theme_application", atRep) == false)
-		{
-			errorMessage = "The column chart_function could not be appended!";
-			return false;
-		}
-		db->execute("UPDATE te_theme_application SET chart_function = 'AVG'");
-	}
-
-	// ----- te_theme 
-	if(db->columnExist("te_theme", "visible_rep", fattr) == false)
-	{
-		TeAttributeRep atRep;
-		atRep.type_ = TeINT;
-		atRep.name_ = "visible_rep";
-		if(db->addColumn("te_theme", atRep) == false)
-		{
-			errorMessage = "The column visible_rep could not be appended!";
-			return false;
-		}
-
-		atRep.name_ = "enable_visibility";
-		if(db->addColumn("te_theme", atRep) == false)
-		{
-			errorMessage = "The column enable_visibility could not be appended!";
-			return false;
-		}
-
-		string upd = " UPDATE te_theme t, te_theme_application ta ";
-		upd +=       " SET t.visible_rep = ta.visible_rep ";
-		upd +=       " WHERE ta.theme_id = t.theme_id ";
-		if(!db->execute (upd))
-			return false;
-
-		upd =		 " UPDATE te_theme t, te_theme_application ta ";
-		upd +=       " SET t.enable_visibility = ta.enable_visibility ";
-		upd +=       " WHERE ta.theme_id = t.theme_id ";
-		if(!db->execute (upd))
-			return false;
-			
-		db->deleteColumn("te_theme_application", "visible_rep");
-		db->deleteColumn("te_theme_application", "enable_visibility");
-	}
-
-	//if for ADO passar todas as tabelas para aceitar comprimento iguel a zero!!!
-	if(db->dbmsName() == "Ado")
-	{
-		//te_layer 
-		//te_layer_table
-		db->allowEmptyString ("te_layer_table", "attr_initial_time");
-		db->allowEmptyString ("te_layer_table", "attr_final_time");
-		db->allowEmptyString ("te_layer_table", "user_name");
-
-		//te_representation
-		db->allowEmptyString ("te_representation", "description");
-		
-		//te_view
-		db->allowEmptyString ("te_view", "user_name");
-
-		//te_visual
-		db->allowEmptyString ("te_visual", "lib_name");
-		db->allowEmptyString ("te_visual", "contour_lib_name");
-		db->allowEmptyString ("te_visual", "family");
-
-		//te_legend
-		db->allowEmptyString ("te_legend", "lower_value");
-		db->allowEmptyString ("te_legend", "upper_value");
-		db->allowEmptyString ("te_legend", "label");
-		
-		//te_theme
-		db->allowEmptyString ("te_theme", "generate_attribute_where");
-		db->allowEmptyString ("te_theme", "generate_spatial_where");
-		db->allowEmptyString ("te_theme", "generate_temporal_where");
-		db->allowEmptyString ("te_theme", "collection_table");
-
-		//te_grouping
-		db->allowEmptyString ("te_grouping", "grouping_attr");
-		db->allowEmptyString ("te_grouping", "grouping_norm_attr");
-		db->allowEmptyString ("te_grouping", "grouping_function");
-
-		//te_theme_application
-		db->allowEmptyString ("te_theme_application", "refine_attribute_where");
-		db->allowEmptyString ("te_theme_application", "refine_spatial_where");
-		db->allowEmptyString ("te_theme_application", "refine_temporal_where");
-		db->allowEmptyString ("te_theme_application", "grouping_color");
-		db->allowEmptyString ("te_theme_application", "pie_dimension_attr");
-		db->allowEmptyString ("te_theme_application", "text_table");
-		db->allowEmptyString ("te_theme_application", "chart_function");
-	}
-
-	//------------ auxiliary collection  
-	TeDatabasePortal* portal = db->getPortal();
-	if(!portal)
-		return false;
-
-	string sql = " SELECT theme_id, visible_rep FROM te_theme ";
-	if(!portal->query(sql))
-	{
-		delete portal;
-		return true;
-	}
-
-	while(portal->fetchRow ())
-	{
-		string	themeId = portal->getData(0);
-		int		visRep  = atoi(portal->getData(1));
-
-		string collExtTable = "te_collection_"+ themeId +"_aux";
-		
-		if	((db->tableExist("te_collection_"+ themeId)) && 
-			((visRep & TeRASTER) != TeRASTER)			 && 
-			(!db->tableExist(collExtTable)))
-		{
-			TeTheme* theme = new TeTheme();
-			theme->id(atoi(themeId.c_str()));
-			if(!db->loadTheme (theme))
-			{
-				delete portal;
-				return false;
-			}
-
-			string up = "UPDATE " + theme->collectionTable() + " SET c_object_status = 0";
-			up += " WHERE c_object_status <> " + Te2String(theme->pointingLegend().id());
-			up += " AND c_object_status <> " + Te2String(theme->queryLegend().id());
-			up += " AND c_object_status <> " + Te2String(theme->queryAndPointingLegend().id());
-			db->execute(up);
-
-			up = "UPDATE " + theme->collectionTable() + " SET c_object_status = 1";
-			up += " WHERE c_object_status = " + Te2String(theme->pointingLegend().id());
-			db->execute(up);
-
-			up = "UPDATE " + theme->collectionTable() + " SET c_object_status = 2";
-			up += " WHERE c_object_status = " + Te2String(theme->queryLegend().id());
-			db->execute(up);
-
-			up = "UPDATE " + theme->collectionTable() + " SET c_object_status = 3";
-			up += " WHERE c_object_status = " + Te2String(theme->queryAndPointingLegend().id());
-			db->execute(up);
-
-			if ((!theme->createCollectionAuxTable()) || (!theme->populateCollectionAux())) 
-			{
-				errorMessage = "Fail to mount the auxiliary table of the collection!";
-				delete portal;
-				return false;
-			}
-
-			theme->collectionAuxTable(collExtTable);
-			theme->addThemeTable(collExtTable);
-					
-			string oldTCE = theme->collectionTable() + "_ext";
-			if (db->tableExist(oldTCE))
-			{
-				string delTable = "DROP TABLE " + oldTCE;
-				db->execute(delTable);
-			}
-		}
-		
-	}
-	//------------ end auxiliary collection  
-
-	portal->freeResult();
-
-	//------------ text table  
-	// if text table have not text visual table associated, create it
-	string sel = "SELECT geom_table FROM te_representation WHERE";
-	sel += " geom_type = " + Te2String(TeTEXT);
-	if(portal->query(sel))
-	{
-		while(portal->fetchRow())
-		{
-			string table = portal->getData(0);
-			string tvis = table + "_txvisual";
-			if(!db->tableExist(tvis))
-			{
-				TeAttributeList atl;
-				TeAttribute		at;
-
-				at.rep_.name_ = "geom_id";
-				at.rep_.type_ = TeINT;
-				at.rep_.numChar_ = 0;
-				at.rep_.isPrimaryKey_ = true;
-				atl.push_back(at);
-
-				at.rep_.isPrimaryKey_ = false;
-				at.rep_.name_ = "dot_height";
-				at.rep_.type_ = TeINT;
-				atl.push_back(at);
-
-				at.rep_.name_ = "fix_size";
-				at.rep_.type_ = TeINT;
-				atl.push_back(at);
-
-				at.rep_.name_ = "color";
-				at.rep_.type_ = TeINT;
-				atl.push_back(at);
-
-				at.rep_.name_ = "family";
-				at.rep_.type_ = TeSTRING;
-				at.rep_.numChar_ = 128;
-				atl.push_back(at);
-
-				at.rep_.name_ = "bold";
-				at.rep_.type_ = TeINT;
-				at.rep_.numChar_ = 0;
-				atl.push_back(at);
-
-				at.rep_.name_ = "italic";
-				at.rep_.type_ = TeINT;
-				atl.push_back(at);
-
-				db->createTable(tvis, atl);
-				string fk = "fk_" + tvis;
-				db->createRelation(fk, tvis, "geom_id", table, "geom_id", true);
-				string ins = "INSERT INTO " + tvis + " (geom_id) SELECT geom_id FROM " + table;
-				db->execute(ins);
-
-				string popule = "UPDATE " + tvis;
-				popule += " SET dot_height = 12";
-				popule += ", fix_size = 0";
-				popule += ", color = 16711680";
-				popule += ", family = 'verdana'";
-				popule += ", bold = 1";
-				popule += ", italic = 0";
-				if(!db->execute(popule))
-				{
-					errorMessage = "Fail to generate the text visual table!";
-					delete portal;
-					return false;;
-				}
-			}
-		}
-	}
-	//------------ end text table  
-	delete portal;
-	return true;
-}
-
-
-bool updateDB30To301(TeDatabase* db, string& errorMessage)
-{
-	TeAttribute fattr;
-
-	TeDatabasePortal* portal = db->getPortal();
-	if(!portal)
-		return false;
-
-	// ----- collection_table
-
-	string sql = " SELECT collection_table FROM te_theme ";   
-	if(!portal->query(sql))
-	{
-		delete portal;
-		return false;
-	}
-
-	while(portal->fetchRow())
-	{
-		string collName = portal->getData(0);
-		if(	(db->tableExist(collName)) && 
-			(!db->columnExist(collName, "c_object_status", fattr)))
-		{
-			TeAttributeRep atRep;
-			atRep.type_ = TeINT;
-			atRep.name_ = "c_object_status";
-			if(db->addColumn(collName, atRep) == false)
-			{
-				errorMessage = "The column c_object_status could not be appended!";
-				delete portal;
-				return false;
-			}
-
-			string upd = " UPDATE "+collName+" t1, "+collName+" t2 ";
-			upd +=	" SET t1.c_object_status = t2.c_legend_result ";
-			upd +=	" WHERE t1.c_object_id = t2.c_object_id ";
-
-			if(!db->execute (upd))
-			{
-				delete portal;
-				return false;
-			}
-
-			db->deleteColumn(collName, "c_legend_result");
-		}
-	}
-
-	delete portal;
-	return true; 
-}
-
-
-bool updateDB301To302(TeDatabase* db, string& errorMessage)
-{
-		
-	TeDatabasePortal* portal = db->getPortal();
-	if(!portal)
-		return false;
-
-	// ----- valid attribute table 
-	
-	TeAttrTableVector attrTableVec;
-	if(db->getAttrTables(attrTableVec))
-	{
-		for(unsigned int i=0; i<attrTableVec.size(); ++i)
-		{
-			TeTable fromTable = attrTableVec[i];
-			bool	flag = false;
-			
-			if(fromTable.tableType()==TeAttrMedia)
-				continue;
-
-			//verify if there is another table with the same name
-			for(unsigned int j=0; j<i; ++j)
-			{
-				if(TeConvertToUpperCase(attrTableVec[j].name())==TeConvertToUpperCase(fromTable.name())) 
-				{
-					flag = true;
-					break;
-				}
-			}
-
-			if(flag)
-				continue;
-			
-			if(db->validTable(fromTable)) //fromTable was modified
-			{
-				TeAttributeList newAttrList = fromTable.attributeList();
-				TeAttributeList oldAttrList = attrTableVec[i].attributeList();
-				TeAttributeList::iterator newAttIt = newAttrList.begin();
-				TeAttributeList::iterator oldAttIt = oldAttrList.begin();
-
-				bool change = false;
-				while(newAttIt!=newAttrList.end())
-				{
-					if(((*oldAttIt).rep_.name_) != ((*newAttIt).rep_.name_))
-					{
-						TeAttributeRep rep = (*newAttIt).rep_;
-						if(db->alterTable(fromTable.name(), rep, (*oldAttIt).rep_.name_))
-							change = true;
-					}
-
-					++newAttIt;
-					++oldAttIt;
-				}
-
-				if(change)
-				{
-					// update te_layer_table
-					string upd = " UPDATE te_layer_table ";
-					upd +=	" SET unique_id = '"+ fromTable.uniqueName() +"'";
-					upd +=  ", attr_link = '"+ fromTable.linkName() +"'";
-					upd +=	" WHERE attr_table = '"+ fromTable.name() +"'";
-
-					if(!db->execute (upd))
-					{
-						delete portal;
-						errorMessage = "Error updating te_layer_table!";
-						return false;
-					}
-				}
-			}//if
-		}//for
-		portal->freeResult();
-	}
-
-	// ----- te_grouping table
-
-	string sel = " SELECT theme_id, grouping_attr, grouping_attr_type FROM te_grouping ";
-	if(!portal->query(sel))
-	{
-		delete portal;
-		return false;
-	}
-
-	while(portal->fetchRow())
-	{
-		string themeId, gAttr;
-		themeId = portal->getData(0);
-		gAttr = portal->getData(1);
-		int gTypr = portal->getInt(2);
-		
-		if(((gAttr.empty()) || (gAttr=="NONE")) && (gTypr==0))
-		{
-			string del = " DELETE FROM te_grouping WHERE theme_id = "+ themeId; 
-			db->execute(del);
-		}
-	}
-
-	// ----- te_grouping table
-
-	delete portal;
-	return true; 
-}
-
diff --git a/src/terralib/application/TeUpdateDBVersion.h b/src/terralib/application/TeUpdateDBVersion.h
deleted file mode 100644
index 528f584..0000000
--- a/src/terralib/application/TeUpdateDBVersion.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/************************************************************************************
- TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The library provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use
-of this library and its documentation.
-*************************************************************************************/
-
-#ifndef  __TERRALIB_INTERNAL_UPDATEDBVERSION_H
-#define  __TERRALIB_INTERNAL_UPDATEDBVERSION_H
-
-#include "TeDatabase.h"
-
-//! verify if the database needs update 
-bool needUpdateDB(TeDatabase* db, string& DBversion);
-
-//! update database version 
-bool updateDBVersion(TeDatabase* db, string& DBversion, string& errorMessage);
-
-//! update database from release 2.0 to release 3.0
-bool updateDB20To30(TeDatabase* db, string& errorMessage);
-
-//! update database from release 3.0 to release 3.0.1
-bool updateDB30To301(TeDatabase* db, string& errorMessage);
-
-//! update database from release 3.0.1 to release 3.0.2 (3.0 Plus)
-bool updateDB301To302(TeDatabase* db, string& errorMessage); 
- 
-
-#endif
-
diff --git a/src/terralib/application/qt/TeDecoderQtImage.cpp b/src/terralib/application/qt/TeDecoderQtImage.cpp
deleted file mode 100644
index cf4f005..0000000
--- a/src/terralib/application/qt/TeDecoderQtImage.cpp
+++ /dev/null
@@ -1,102 +0,0 @@
-/************************************************************************************
-TerraView - visualization and exploration of geographical databases
-using TerraLib.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-This file is part of TerraView. TerraView is free software; you can redistribute it 
-and/or modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-You should have received a copy of the GNU General Public License
-along with TerraView.
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The software provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use of
-this program and its documentation.
-*************************************************************************************/
-
-#include <TeDecoderQtImage.h>
-
-TeDecoderQtImage::TeDecoderQtImage ( const TeRasterParams& par )
-{
-	image_ = 0;
-	params_ = par;
-}
-
-TeDecoderQtImage::~TeDecoderQtImage ()
-{
-	clear ();
-}
-
-void
-TeDecoderQtImage::init()
-{
-	params_.status_= TeNOTREADY;
-	if (params_.mode_ == 'c')	// creating a new file
-	{
-		clear ();
-		image_ = new QImage (params_.ncols_,params_.nlines_,32);
-		image_->fill(qRgb(255,255,255));
-		params_.status_ = TeREADYTOWRITE;
-	}
-	else if (params_.mode_ == 'w')
-	{
-		if (image_)
-			params_.status_ = TeREADYTOWRITE;
-	}
-	else if (params_.mode_ == 'r')
-	{
-		if (image_)
-			params_.status_ = TeREADYTOREAD;	
-	}
-}
-
-bool
-TeDecoderQtImage::clear()
-{
-	if (image_ != 0)
-		delete image_;
-	image_ = 0;
-	return true;
-}
-
-bool 
-TeDecoderQtImage::getElement (int col, int lin, double &val,int band )
-{
-	QRgb cell = image_->pixel ( col, lin );
-
-	if (band == 0)
-		val = (double) qRed(cell);
-	if (band == 1)
-		val = (double) qGreen(cell);
-	if (band == 2)
-		val = (double) qBlue(cell);
-
-	return true;
-}
-
-bool 
-TeDecoderQtImage::setElement (int col, int lin, double val,int band )
-{
-	int r,g,b;
-	QRgb cell = image_->pixel ( col, lin );
-	r = qRed(cell);
-	g = qGreen(cell);
-	b = qBlue(cell);
-
-	if (band == 0)
-		r = (int)val;
-	if (band == 1)
-		g = (int)val;
-	if (band == 2)
-		b = (int)val;
-
-	image_->setPixel(col,lin, qRgb ( r,  g,  b));
-	return true;
-}
-
-
diff --git a/src/terralib/application/qt/TeDecoderQtImage.h b/src/terralib/application/qt/TeDecoderQtImage.h
deleted file mode 100644
index cdb2ac6..0000000
--- a/src/terralib/application/qt/TeDecoderQtImage.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/************************************************************************************
-TerraView - visualization and exploration of geographical databases
-using TerraLib.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-This file is part of TerraView. TerraView is free software; you can redistribute it 
-and/or modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-You should have received a copy of the GNU General Public License
-along with TerraView.
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The software provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use of
-this program and its documentation. 
-*************************************************************************************/
-
-/*! \file TeDecoderQtImage_H.h
-    This file contais the definitions of a decoder to a QTImage
-*/
-#ifndef __TERRALIB_INTERNAL_DECODERQTIMAGE_H
-#define __TERRALIB_INTERNAL_DECODERQTIMAGE_H
-
-#include "TeDecoder.h"
-#include <qimage.h>
-
-//! Implements a decoder to access a Qt image as a TeRaster
-class TeDecoderQtImage : public TeDecoder
-{
-public:
-	TeDecoderQtImage ( const TeRasterParams& );
-	~TeDecoderQtImage ();
-
-	bool setElement (int col, int lin, double val, int band = 0);
-	bool getElement (int col, int lin, double &val, int band = 0);
-
-	void init	();
-	bool clear	();
-	QImage*	getImage () { return image_; }
-private:
-
-	QImage*	image_;
-};
-
-//! Implements a factory to build TeQtDecoders
-class TeDecoderQtImageFactory : public TeDecoderFactory
-{
-public:
-
-	TeDecoderQtImageFactory(const string& name) : TeDecoderFactory(name) {}
-
-	virtual TeDecoder* build (const TeRasterParams& arg)
-	{  return new TeDecoderQtImage(arg); }
-};
-
-#endif
-
diff --git a/src/terralib/application/qt/TeQtAnimaThread.cpp b/src/terralib/application/qt/TeQtAnimaThread.cpp
deleted file mode 100644
index 92907f0..0000000
--- a/src/terralib/application/qt/TeQtAnimaThread.cpp
+++ /dev/null
@@ -1,117 +0,0 @@
-/************************************************************************************
-TerraView - visualization and exploration of geographical databases
-using TerraLib.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-This file is part of TerraView. TerraView is free software; you can redistribute it 
-and/or modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-You should have received a copy of the GNU General Public License
-along with TerraView.
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The software provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use of
-this program and its documentation.
-*************************************************************************************/
-#include <TeQtAnimaThread.h>
-#include <TeQtCanvas.h>
-#include <qpainter.h>
-#include <qpaintdevice.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qslider.h>
-#include <animation.h>
-#include <qdatetime.h>
-
-void TeQtAnimaThread::run()
-{
-	bool init = false;
-	stop_ = false;
-	frame_ = pauseFrame_;
-	frames_ = fileList_.count();
-	animation_->playingScrollBar->setMinValue(0);
-	animation_->playingScrollBar->setMaxValue(frames_-1);
-	animation_->playingScrollBar->setValue(frame_);
-	while(frame_ < frames_)
-	{
-		showFrame(frame_);
-		if(pause_)
-			frame_ = pauseFrame_;
-		if(pause_ || stop_)
-			break;
-
-		int t = 10000 / animation_->velocitySlider->value() - 10000 / animation_->velocitySlider->maxValue();
-		sleep(t);
-		frame_++;
-		if(frame_ == frames_)
-		{
-			if(animation_->loopCheckBox->isChecked())
-			{
-				sleep(t);
-				sleep(t);
-				frame_ = 0;
-			}
-			else
-				init = true;
-		}
-	}
-	if(init)
-	{
-		animation_->stopButton->setEnabled(false);
-		animation_->pauseButton->setEnabled(false);
-		animation_->playButton->setEnabled(true);
-		animation_->playingScrollBar->setEnabled(false);
-		showFrame(0);
-	}
-}
-
-void TeQtAnimaThread::showFrame(int i)
-{
-	if((unsigned int)i >= fileList_.count())
-		return;
-	pauseFrame_ = i;
-	QString s = *(fileList_.at(i));
-	QString ss = dir_.absPath() + "/" + s;
-	QPixmap pixmap(ss);
-	QRect rect = pixmap.rect();
-	QRect crect = canvas_->viewport()->rect();
-	rect = crect.intersect(rect);
-	QPaintDevice *device = canvas_->viewport();
-	bitBlt(device, 0, 0, &pixmap, 0, 0, rect.width(), rect.height(), Qt::CopyROP);
-	animation_->frameNumberLineEdit->setText(Te2String(pauseFrame_).c_str());
-	animation_->playingScrollBar->setValue(pauseFrame_);
-}
-
-void TeQtAnimaThread::setAnimation(Animation* a, QDir d)
-{
-	animation_ = a;
-	dir_ = d;
-	fileList_ = dir_.entryList(QDir::Files);
-}
-
-void TeQtAnimaThread::stop()
-{
-	if(pause_)
-		pause_=false;
-	stop_ = true; wait();
-}
-
-void TeQtAnimaThread::sleep(int t)
-{
-	QTime time;
-	time.start();
-
-	int vel = animation_->velocitySlider->value();
-	int frame = animation_->playingScrollBar->value();
-	while(time.elapsed() < t)
-	{
-		if(pause_ || stop_ || vel != animation_->velocitySlider->value() || frame != animation_->playingScrollBar->value())
-			break;
-	}
-}
diff --git a/src/terralib/application/qt/TeQtBasicCanvas.cpp b/src/terralib/application/qt/TeQtBasicCanvas.cpp
deleted file mode 100644
index a04c4be..0000000
--- a/src/terralib/application/qt/TeQtBasicCanvas.cpp
+++ /dev/null
@@ -1,2428 +0,0 @@
-/************************************************************************************
-TerraView - visualization and exploration of geographical databases
-using TerraLib.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-This file is part of TerraView. TerraView is free software; you can redistribute it 
-and/or modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-You should have received a copy of the GNU General Public License
-along with TerraView.
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The software provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use of
-this program and its documentation.
-*************************************************************************************/
-
-#include <TeQtBasicCanvas.h>
-#include <TeQtCanvas.h>
-#include <TeDecoderMemory.h>
-#include <TeQtProgress.h>
-#include <TeVectorRemap.h>
-#include <TeGeometryAlgorithms.h>
-#include <TeDefines.h>
-#include <TeRasterRemap.h>
-#include <TeDecoderQtImage.h>
-
-#include <qpaintdevice.h> 
-#include <qpaintdevicemetrics.h> 
-#include <qapplication.h>
-
-#include <algorithm>	
-#include <time.h>
-
-
-//TeQtBasicCanvas::TeQtBasicCanvas( )
-TeQtBasicCanvas::TeQtBasicCanvas(QWidget *parent, const char *name ) : QScrollView(parent,name,WNorthWestGravity)
-{
-	pixmap0_ = 0;
-	pixmap1_ = 0;
-	pixmap2_ = 0;
-	pixmap3_ = 0;
-	backRaster_ = 0;
-
-	canvasProjection_ = 0;
-	dataProjection_ = 0;
-	pointStyle_ = 0;
-	nodeStyle_ = 0;
-	pointSize_ = 3;
-	nodeSize_ = 4;
-
-#ifdef WIN32
-	int winVersion = qApp->winVersion();
-	if (winVersion == Qt::WV_2000 || winVersion == Qt::WV_NT)
-		setTextTTStyle (QString("c:/winnt/fonts/tahoma.ttf"),10);
-	else
-		setTextTTStyle (QString("c:/windows/fonts/tahoma.ttf"),10);
-#else
-	char *s = "/usr/share/fonts/ttf/western/Bluehigc.ttf";
-	QString qs = s;
-	setTextTTStyle (qs,10);
-#endif
-	textTT_ = true;
-	db_ = 0;
-
-	//Mounting the brushStyleMap
-	brushStyleMap_[TePolyTypeTransparent] = Qt::NoBrush;
-	brushStyleMap_[TePolyTypeFill] = Qt::SolidPattern;
-	brushStyleMap_[TePolyTypeHorizontal] = Qt::HorPattern;
-	brushStyleMap_[TePolyTypeVertical] = Qt::VerPattern;
-	brushStyleMap_[TePolyTypeFDiagonal] = Qt::FDiagPattern;
-	brushStyleMap_[TePolyTypeBDiagonal] = Qt::BDiagPattern;
-	brushStyleMap_[TePolyTypeCross] = Qt::CrossPattern;
-	brushStyleMap_[TePolyTypeDiagonalCross] = Qt::DiagCrossPattern;
-
-	//Mounting the penStyleMap
-	penStyleMap_[TeLnTypeContinuous] = Qt::SolidLine;
-	penStyleMap_[TeLnTypeDashed] = Qt::DashLine;
-	penStyleMap_[TeLnTypeDotted] = Qt::DotLine;
-	penStyleMap_[TeLnTypeDashDot] = Qt::DashDotLine;
-	penStyleMap_[TeLnTypeDashDotDot] = Qt::DashDotDotLine;
-	penStyleMap_[TeLnTypeNone] = Qt::NoPen;
-}
-
-TeQtBasicCanvas::~TeQtBasicCanvas()
-{
-	if (dataProjection_)
-		delete dataProjection_;
-	if (canvasProjection_)
-		delete canvasProjection_;
-}
-
-void
-TeQtBasicCanvas::setDataProjection ( TeProjection* proj )
-{	
-	if(dataProjection_)
-		delete dataProjection_;
-	dataProjection_ = TeProjectionFactory::make(proj->params());
-	if (canvasProjection_ && dataProjection_ && !(*canvasProjection_== *dataProjection_))
-	{
-		dataProjection_->setDestinationProjection(canvasProjection_);
-		canvasProjection_->setDestinationProjection(dataProjection_);
-	}
-}
-
-void
-TeQtBasicCanvas::setProjection ( TeProjection* proj )
-{	
-	if (canvasProjection_)
-		delete canvasProjection_;
-	canvasProjection_ = TeProjectionFactory::make(proj->params()); 
-	params_.projection(canvasProjection_);
-}
-
-void TeQtBasicCanvas::plotOnWindow ()
-{
-	QPaintDevice* dev = painter_.device();
-	if(dev == viewport())
-		return;
-	if(dev)
-		painter_.end();
-	painter_.begin(viewport());
-}
-
-void TeQtBasicCanvas::plotOnPixmap0 ()
-{
-	QPaintDevice* dev = painter_.device();
-	if(dev == pixmap0_)
-		return;
-	if(dev)
-		painter_.end();
-	painter_.begin(pixmap0_);
-}
-
-void TeQtBasicCanvas::plotOnPixmap1 ()
-{
-	QPaintDevice* dev = painter_.device();
-	if(dev == pixmap1_)
-		return;
-	if(dev)
-		painter_.end();
-	painter_.begin(pixmap1_);
-}
-
-void TeQtBasicCanvas::setWorld(TeBox b, int w, int h, QPaintDevice *pd)
-{
-	xmin_= b.x1();
-	xmax_= b.x2();
-	ymin_= b.y1();
-	ymax_= b.y2();
-	setView (w,h,pd);
-	bool extend = pd ? false : true;
-	TeQtBasicCanvas::setTransformation (b.x1(),b.x2(),b.y1(),b.y2(),extend);
-	params_.nBands(3);
-	double resx = pixelSize();
-	double resy = pixelSize();
-	TeBox box(getWorld());
-	params_.lowerLeftResolutionSize(box.x1_+0.5*resx,box.y1_+0.5*resy,resx,resy,width_,height_);
-	params_.projection();
-	params_.mode_ = 'w';
-	params_.decoderIdentifier_ = "";
-}
-void TeQtBasicCanvas::setTransformation(double xmin, double xmax, double ymin, double ymax, bool extend)
-{
-	if (painter_.device() == 0)
-		return;
-	
-	xmin_= xmin;
-	xmax_= xmax;
-	ymin_= ymin;
-	ymax_= ymax;
-	double	dxw = xmax_ - xmin_,
-			dyw = ymax_ - ymin_,
-			dxv = width_,
-			dyv = height_;
-					
-	double	fx = dxv/dxw,
-			fy = dyv/dyw;
-
-	if (fx > fy)
-	{
-		f_ = fy;
-		if (extend)
-		{
-			dxw = width_/f_;
-			xmax_ = xmin_ + dxw;
-		}
-		else
-			width_ = (int)(f_*dxw + .5);
-	}
-	else
-	{
-		f_ = fx;
-		if (extend)
-		{
-			dyw = height_/f_;
-			ymax_ = ymin_ + dyw;
-		}
-		else
-			height_ = (int)(f_*dyw + .5);
-	}
-
-	wc_ = TeBox (xmin_,ymin_,xmax_,ymax_);
-	params_.boundingBoxResolution(xmin_,ymin_,xmax_,ymax_,params_.resx_,params_.resy_);
-
-	QPaintDeviceMetrics devMetric(viewport());
-	double wpixels = devMetric.width();
-	double wMM = devMetric.widthMM();
-	double wT = wMM;
-	if(canvasProjection_)
-	{
-		string unit = canvasProjection_->units();
-		if(unit == "Meters")
-			wT = wMM / 1000.;
-		else if(unit == "Kilometers")
-			wT = wMM / 1000000.;
-		else if(unit == "Centimeters")
-			wT = wMM / 100.;
-		else if(unit == "Millimeters")
-			wT = wMM;
-		else if(unit == "Feet")
-			wT = wMM / (12. * 25.4);
-		else if(unit == "Inches")
-			wT = wMM / 25.4;
-		else if(unit == "DecimalDegrees")
-			wT = wMM / 110000000.;
-	}
-	double wp = wT / wpixels;
-	scaleApx_ = (1. / f_) / wp;
-}
-
-void TeQtBasicCanvas::scaleApx(double scale)
-{
-	QPaintDeviceMetrics devMetric(viewport());
-	double wMM = devMetric.widthMM();
-	double wT = wMM;
-	if(canvasProjection_)
-	{
-		string unit = canvasProjection_->units();
-		if(unit == "Meters")
-			wT = wMM / 1000.;
-		else if(unit == "Kilometers")
-			wT = wMM / 1000000.;
-		else if(unit == "Centimeters")
-			wT = wMM / 100.;
-		else if(unit == "Millimeters")
-			wT = wMM;
-		else if(unit == "Feet")
-			wT = wMM / (12. * 25.4);
-		else if(unit == "Inches")
-			wT = wMM / 25.4;
-		else if(unit == "DecimalDegrees")
-			wT = wMM / 110000000.;
-	}
-
-	double ff = scale / scaleApx_;
-	double xmin, ymin, xmax, ymax;
-	if(ff < 1)
-	{
-		double dx = (wc_.width() - (wc_.width() * ff)) / 2.;
-		double dy = (wc_.height() - (wc_.height() * ff)) / 2.;
-		xmin = xmin_ + dx;
-		ymin = ymin_ + dy;
-		xmax = xmax_ - dx;
-		ymax = ymax_ - dy;
-	}
-	else
-	{
-		double dx = ((wc_.width() * ff) - wc_.width()) / 2.;
-		double dy = ((wc_.height() * ff) - wc_.height()) / 2.;
-		xmin = xmin_ - dx;
-		ymin = ymin_ - dy;
-		xmax = xmax_ + dx;
-		ymax = ymax_ + dy;
-	}
-
-	TeBox box(xmin, ymin, xmax, ymax);
-	setWorld(box);
-}
-
-double TeQtBasicCanvas::mapVtoDW (int pixels)
-{
-	TeBox wbox = getDataWorld();
-	TeCoord2D	wpc(wbox.x1_ + wbox.width()/2., wbox.y1_ + wbox.height()/2.);
-	QPoint pc = mapWtoV(wpc);
-	QPoint qp(pc.x()+pixels, pc.y());
-	TeCoord2D	wp = mapVtoDW(qp);
-	wpc = mapVtoDW(pc);
-	double d = fabs(wp.x() - wpc.x());
-	return d;
-}
-
-TeCoord2D TeQtBasicCanvas::mapVtoDW (QPoint v)
-{
-	TeCoord2D w((v.x()-x0_)/f_ + xmin_,
-		(height_ - y0_ - v.y())/f_ + ymin_);
-
-	if ( canvasProjection_ && dataProjection_ )
-	if ( canvasProjection_ != dataProjection_ && !(*canvasProjection_ == *dataProjection_) )
-	{
-		w = canvasProjection_->PC2LL (w);
-		w = dataProjection_->LL2PC (w);
-	}
-	return w;
-}
-
-double TeQtBasicCanvas::mapVtoW (int pixels)
-{
-	TeBox wbox = getDataWorld();
-	TeCoord2D	wpc(wbox.x1_ + wbox.width()/2., wbox.y1_ + wbox.height()/2.);
-	QPoint pc = mapWtoV(wpc);
-	QPoint qp(pc.x()+pixels, pc.y());
-	TeCoord2D	wp = mapVtoW(qp);
-	wpc = mapVtoW(pc);
-	double d = fabs(wp.x() - wpc.x());
-	return d;
-}
-
-TeCoord2D TeQtBasicCanvas::mapVtoW (QPoint v)
-{
-	TeCoord2D w((v.x()-x0_)/f_ + xmin_,
-		(height_ - y0_ - v.y())/f_ + ymin_);
-	return w;
-}
-
-TeBox TeQtBasicCanvas::getDataWorld()
-{
-	if ( canvasProjection_ && dataProjection_ )
-	if ( canvasProjection_ != dataProjection_ && !(*canvasProjection_ == *dataProjection_) )
-	{
-		TeBox b = TeRemapBox ( wc_, canvasProjection_, dataProjection_);
-		return b;
-	}
-	return wc_ ;
-}
-
-QPoint TeQtBasicCanvas::mapWtoV (TeCoord2D w)
-{
-	TeCoord2D tw = w;
-	if ( canvasProjection_ && dataProjection_ )
-	if ( canvasProjection_ != dataProjection_ && !(*canvasProjection_ == *dataProjection_) )
-	{
-		tw = dataProjection_->PC2LL (tw);
-		tw = canvasProjection_->LL2PC (tw);
-	}
-
-	QPoint v((int)((tw.x() - xmin_)*f_ + 0.5)+x0_,
-		height_ - y0_ - (int)((tw.y() - ymin_)*f_ + 0.5));
-	correctScrolling (v);
-	return v;
-}
-
-void TeQtBasicCanvas::mapWtoV (TeBox& w)
-{
-	TeCoord2D tw = w.lowerLeft();
-	if ( canvasProjection_ && dataProjection_ )
-	if ( canvasProjection_ != dataProjection_ && !(*canvasProjection_ == *dataProjection_) )
-	{
-		tw = dataProjection_->PC2LL (tw);
-		tw = canvasProjection_->LL2PC (tw);
-	}
-
-	QPoint p1((int)((tw.x() - xmin_)*f_ + 0.5)+x0_,
-		height_ - y0_ - (int)((tw.y() - ymin_)*f_ + 0.5));
-	correctScrolling (p1);
-
-	tw = w.upperRight();
-	if ( canvasProjection_ && dataProjection_ )
-	if ( canvasProjection_ != dataProjection_ && !(*canvasProjection_ == *dataProjection_) )
-	{
-		tw = dataProjection_->PC2LL (tw);
-		tw = canvasProjection_->LL2PC (tw);
-	}
-
-	QPoint p2((int)((tw.x() - xmin_)*f_ + 0.5)+x0_,
-		height_ - y0_ - (int)((tw.y() - ymin_)*f_ + 0.5));
-	correctScrolling (p2);
-	w.x1_ = p1.x();
-	w.y1_ = p2.y();
-	w.x2_ = p2.x();
-	w.y2_ = p1.y();
-}
-
-void TeQtBasicCanvas::mapCanvasWorldToDataWorld (TeBox& w)
-{
-	TeCoord2D wll = w.lowerLeft();
-	TeCoord2D wur = w.upperRight();
-	if ( canvasProjection_ && dataProjection_ )
-	if ( canvasProjection_ != dataProjection_ && !(*canvasProjection_ == *dataProjection_) )
-	{
-		canvasProjection_->setDestinationProjection(dataProjection_);
-		wll = canvasProjection_->PC2LL (wll);
-		wll = dataProjection_->LL2PC (wll);
-		wur = canvasProjection_->PC2LL (wur);
-		wur = dataProjection_->LL2PC (wur);
-	}
-
-	w = TeBox(wll, wur);
-}
-
-void TeQtBasicCanvas::mapDataWorldToCanvasWorld (TeBox& w)
-{
-	TeCoord2D wll = w.lowerLeft();
-	TeCoord2D wur = w.upperRight();
-	if ( canvasProjection_ && dataProjection_ )
-	if ( canvasProjection_ != dataProjection_ && !(*canvasProjection_ == *dataProjection_) )
-	{
-		dataProjection_->setDestinationProjection(canvasProjection_);
-		wll = dataProjection_->PC2LL (wll);
-		wll = canvasProjection_->LL2PC (wll);
-		wur = dataProjection_->PC2LL (wur);
-		wur = canvasProjection_->LL2PC (wur);
-	}
-
-	w = TeBox(wll, wur);
-}
-
-void TeQtBasicCanvas::mapCanvasWorldToViewport (TeBox& w)
-{
-	QPoint p1((int)((w.x1() - xmin_)*f_ + 0.5)+x0_,
-		height_ - y0_ - (int)((w.y1() - ymin_)*f_ + 0.5));
-	correctScrolling (p1);
-
-	QPoint p2((int)((w.x2() - xmin_)*f_ + 0.5)+x0_,
-		height_ - y0_ - (int)((w.y2() - ymin_)*f_ + 0.5));
-	correctScrolling (p2);
-
-// swap y value
-	w.x1_ = p1.x();
-	w.y1_ = p2.y();
-	w.x2_ = p2.x();
-	w.y2_ = p1.y();
-}
-
-void TeQtBasicCanvas::mapViewportToCanvasWorld (TeBox& v)
-{
-// swap y value
-
-	TeCoord2D w1((v.x1()-x0_)/f_ + xmin_,
-		(height_ - y0_ - v.y2())/f_ + ymin_);
-
-	TeCoord2D w2((v.x2()-x0_)/f_ + xmin_,
-		(height_ - y0_ - v.y1())/f_ + ymin_);
-
-	v = TeBox(w1, w2);
-}
-
-QPoint TeQtBasicCanvas::mapCanvasWorldToViewport (TeCoord2D& c)
-{
-	QPoint p((int)((c.x() - xmin_)*f_ + 0.5)+x0_,
-		height_ - y0_ - (int)((c.y() - ymin_)*f_ + 0.5));
-	correctScrolling (p);
-
-	return p;
-}
-
-void TeQtBasicCanvas::setPolygonColor (int r, int g, int b)
-{
-//	polygonColor_.setRgb(r,g,b);
-//	polygonBrush_.setColor (polygonColor_);
-
-	QRgb cor = qRgba(r, g, b, 50);
-	polygonColor_.setRgb(cor);
-	polygonBrush_.setColor (polygonColor_);
-}
-
-void TeQtBasicCanvas::setPolygonStyle (int s, int t)
-{
-	polygonBrush_.setStyle(brushStyleMap_[(TePolyBasicType)s]);
-	polygonTransparency_ = t;
-}
-
-void TeQtBasicCanvas::setPolygonLineColor (int r, int g, int b)
-{
-	QColor cor(r, g, b);
-	polygonPen_.setColor (cor);
-}
-
-void TeQtBasicCanvas::setPolygonLineStyle (int s, int w)
-{
-	polygonPen_.setStyle(penStyleMap_[(TeLnBasicType)s]);
-	polygonPen_.setWidth(w);
-}
-
-void TeQtBasicCanvas::setLineColor (int r, int g, int b)
-{
-	lineColor_.setRgb(r,g,b);
-	linePen_.setColor (lineColor_);
-}
-
-void TeQtBasicCanvas::setLineStyle (int s, int w)
-{
-	linePen_.setStyle(penStyleMap_[(TeLnBasicType)s]);
-	linePen_.setWidth(w);
-}
-
-void TeQtBasicCanvas::setTextColor (int r, int g, int b)
-{
-	textColor_.setRgb(r,g,b);
-	textPen_.setColor (textColor_);
-}
-
-void TeQtBasicCanvas::setTextStyle (string& family, int size, bool bold, bool italic )
-{
-	textFont_.setFamily (family.c_str());
-	textFont_.setBold (bold);
-	textFont_.setItalic (italic);
-	if(size <= 0)
-		textSize_ = 1;
-	else
-		textSize_ = size;
-	textFont_.setPointSize (textSize_);
-}
-
-void TeQtBasicCanvas::setTextSize (int size)
-{
-	if(size <= 0)
-		textSize_ = 1;
-	else
-		textSize_ = size;
-	textFont_.setPointSize (textSize_);
-}
-
-void TeQtBasicCanvas::setTextTTStyle (QString& font, int size)
-{
-	textTTFont_ = font.latin1();
-	textSize_ = size;
-}
-
-void TeQtBasicCanvas::plotText (TeCoord2D &pt, string &str, double angle, double /*alignh*/, double /*alignv*/)
-{
-	painter_.setPen(textPen_);
-	painter_.setFont(textFont_);
-	QPoint p = mapWtoV (pt);
-	if (angle != 0.)
-	{
-		painter_.save ();
-		painter_.translate (p.x(),p.y());
-		painter_.rotate (-angle);
-		painter_.drawText (0,-4,QString(str.c_str()));
-		painter_.restore ();
-	}
-	else
-		painter_.drawText (p,QString(str.c_str()));
-}
-
-void TeQtBasicCanvas::plotText (TeText& tx, TeVisual& visual)
-{
-	if(tx.textValue().empty())
-		return;
-
-	int	x, y;
-
-	TeCoord2D pt = tx.location();
-	QPoint p = mapWtoV (pt);
-	double angle = tx.angle();
-
-	QRect brect = textRect(tx, visual);
-	painter_.setFont(textFont_);
-	painter_.setPen(textPen_);
-	painter_.setRasterOp (Qt::CopyROP);
-	string st = tx.textValue();
-
-	if (angle != 0.)
-	{
-		x = - brect.width()/2;
-		y = - brect.height()/2;
-		painter_.save ();
-		painter_.translate (p.x(), p.y());
-		painter_.rotate (-angle);
-		painter_.drawText(x, y, brect.width(), brect.height(), Qt::AlignLeft|Qt::DontClip, st.c_str());
-		painter_.restore ();
-	}
-	else
-	{
-		x = p.x() - brect.width()/2;
-		y = p.y() - brect.height()/2;
-		painter_.drawText(x, y, brect.width(), brect.height(), Qt::AlignLeft|Qt::DontClip, st.c_str());
-	}
-}
-
-QRect TeQtBasicCanvas::textRect (TeText& tx, TeVisual visual)
-{
-	QRect rect;
-	if(tx.textValue().empty())
-		return rect;
-
-	int size;
-	int fixedSize = visual.fixedSize(); // font size is fixed
-	if(fixedSize == false && tx.height() > 0.)
-	{
-		TeBox wbox = getDataWorld();
-		TeCoord2D p1(wbox.x1_, wbox.y1_);
-		TeCoord2D p2(double(p1.x() + tx.height()), double(p1.y() + tx.height()));
-		TeBox box(p1, p2);
-		mapWtoV(box);
-		size = int(box.height());
-	}
-	else
-		size = visual.size(); // font size
-	if(size == 0)
-		size = 1;
-
-	setTextSize(size);
-	textFont_.setFamily (visual.family().c_str());
-
-	TeCoord2D pt = tx.location();
-	QPoint p = mapWtoV (pt);
-
-	string st = tx.textValue();
-	QFontMetrics fm(textFont_);
-//	int hh = fm.height();							//hh is not used
-//	int ww = fm.width(st.c_str());			//ww is not used
-	rect = fm.boundingRect(st.c_str());
-	QPoint cc = rect.center();
-	QPoint tr = p;
-	tr = tr - cc;
-	rect.setRight(rect.right()+tr.x());
-	rect.setLeft(rect.left()+tr.x());
-	rect.setTop(rect.top()+tr.y());
-	rect.setBottom(rect.bottom()+tr.y());
-	QPoint o = offset();
-	rect.moveCenter(rect.center() + o); // do offset translation on window
-	return rect;
-}
-
-void TeQtBasicCanvas::plotXorPolyline (QPointArray& PA, bool cdev)
-{
-//	if(painter_ == 0)
-//		return;
-
-	QPoint o = offset();
-	QPen pen(QColor("green"));
-
-	plotOnPixmap0();
-	painter_.save ();
-	if(cdev == false)
-		painter_.translate(o.x(), o.y());
-	painter_.setRasterOp (Qt::XorROP);
-	painter_.setPen(pen);
-	painter_.drawPolyline(PA);
-	painter_.restore ();
-
-	plotOnWindow(); // do offset translation on window
-	painter_.save ();
-	if(cdev)
-		painter_.translate(-o.x(), -o.y());
-	painter_.setRasterOp (Qt::XorROP);
-	painter_.setPen(pen);
-	painter_.drawPolyline(PA);
-	painter_.restore ();
-
-}
-
-void TeQtBasicCanvas::plotTextRects (TeText& tx, TeVisual visual)
-{
-	if(tx.textValue().empty())
-		return;
-
-	QPoint o = offset();
-	QRect rect, l, r, t, b, c;
-
-	TeCoord2D pt = tx.location();
-	plotOnWindow();
-	QPoint p = mapWtoV (pt) + o;
-	double angle = tx.angle();
-
-	rect = textRect(tx, visual);
-	if(angle != 0.)
-	{
-		rect.setTop(rect.top()-p.y());
-		rect.setBottom(rect.bottom()-p.y());
-		rect.setLeft(rect.left()-p.x());
-		rect.setRight(rect.right()-p.x());
-	}
-
-	l = rect;
-	l.setTop(rect.top()+rect.height()/2-3);
-	l.setBottom(rect.top()+rect.height()/2+3);
-	l.setRight(rect.left() + 6);
-
-	r = rect;
-	r.setTop(l.top());
-	r.setBottom(l.bottom());
-	r.setLeft(rect.right() - 6);
-
-	t = rect;
-	t.setLeft(rect.left()+rect.width()/2-3);
-	t.setRight(rect.left()+rect.width()/2+3);
-	t.setBottom(rect.top() + 6);
-
-	b = rect;
-	b.setLeft(t.left());
-	b.setRight(t.right());
-	b.setTop(rect.bottom() - 6);
-
-	c.setLeft(rect.left()+rect.width()/2-3);
-	c.setRight(c.left() + 6);
-	c.setTop(rect.top()+rect.height()/2-3);
-	c.setBottom(c.top() + 6);
-
-	QPointArray parL(4);
-	parL.setPoint(0, l.bottomLeft());
-	parL.setPoint(1, l.bottomRight());
-	parL.setPoint(2, l.topRight());
-	parL.setPoint(3, l.topLeft());
-
-	QPointArray parR(4);
-	parR.setPoint(0, r.bottomRight());
-	parR.setPoint(1, r.bottomLeft());
-	parR.setPoint(2, r.topLeft());
-	parR.setPoint(3, r.topRight());
-
-	QPointArray parT(4);
-	parT.setPoint(0, t.topLeft());
-	parT.setPoint(1, t.bottomLeft());
-	parT.setPoint(2, t.bottomRight());
-	parT.setPoint(3, t.topRight());
-
-	QPointArray parB(4);
-	parB.setPoint(0, b.bottomLeft());
-	parB.setPoint(1, b.topLeft());
-	parB.setPoint(2, b.topRight());
-	parB.setPoint(3, b.bottomRight());
-
-	QBrush	brush(QColor("green"));
-
-	if (angle != 0.)
-	{
-		plotOnPixmap0();
-		painter_.save ();
-		painter_.setRasterOp (Qt::XorROP);
-		painter_.setBrush(Qt::NoBrush);
-		QPen pen(QColor("green"));
-		painter_.setPen(pen);
-		painter_.translate (p.x(), p.y());
-		painter_.rotate (-angle);
-		painter_.drawRect(rect);
-		painter_.drawPolyline(parL);
-		painter_.drawPolyline(parR);
-		painter_.drawPolyline(parT);
-		painter_.drawPolyline(parB);
-		painter_.fillRect(c, brush);
-		painter_.restore ();
-
-		plotOnWindow(); // do offset translation on window
-		painter_.save ();
-		painter_.setRasterOp (Qt::XorROP);
-		painter_.setBrush(Qt::NoBrush);
-		pen = QPen(QColor("green"));
-		painter_.setPen(pen);
-		painter_.translate (p.x()-o.x(), p.y()-o.y());
-		painter_.rotate (-angle);
-		painter_.drawRect(rect);
-		painter_.drawPolyline(parL);
-		painter_.drawPolyline(parR);
-		painter_.drawPolyline(parT);
-		painter_.drawPolyline(parB);
-		painter_.fillRect(c, brush);
-		painter_.restore ();
-	}
-	else
-	{
-		plotOnPixmap0();
-		painter_.save ();
-		painter_.setRasterOp (Qt::XorROP);
-		painter_.setBrush(Qt::NoBrush);
-		QPen pen(QColor("green"));
-		painter_.setPen(pen);
-		painter_.drawRect(rect);
-		painter_.drawPolyline(parL);
-		painter_.drawPolyline(parR);
-		painter_.drawPolyline(parT);
-		painter_.drawPolyline(parB);
-		painter_.fillRect(c, brush);
-		painter_.restore ();
-
-		plotOnWindow(); // do offset translation on window
-		painter_.save ();
-		painter_.setRasterOp (Qt::XorROP);
-		painter_.setBrush(Qt::NoBrush);
-		pen = QPen(QColor("green"));
-		painter_.setPen(pen);
-		painter_.translate (-o.x(), -o.y());
-		painter_.drawRect(rect);
-		painter_.drawPolyline(parL);
-		painter_.drawPolyline(parR);
-		painter_.drawPolyline(parT);
-		painter_.drawPolyline(parB);
-		painter_.fillRect(c, brush);
-		painter_.restore ();
-	}
-}
-
-void TeQtBasicCanvas::setArcColor (int r, int g, int b)
-{
-	arcColor_.setRgb(r,g,b);
-}
-
-void TeQtBasicCanvas::setArcStyle (int s, int w )
-{
-	arcPen_.setStyle ((Qt::PenStyle)s);
-	arcPen_.setWidth(w);
-}
-
-void TeQtBasicCanvas::setPointColor (int r, int g, int b)
-{
-	pointColor_.setRgb(r,g,b);
-}
-
-void TeQtBasicCanvas::setPointStyle (int s, int w)
-{
-	pointStyle_ = (TePtBasicType) s;
-	pointSize_ = w;
-}
-
-void TeQtBasicCanvas::plotPoint (TeCoord2D &pt)
-{	
-	pointPen_.setColor (pointColor_);
-	painter_.setPen(pointPen_);
-
-	QPoint p = mapWtoV (pt);
-
-	plotMark(p,pointStyle_, pointSize_);
-}
-
-void TeQtBasicCanvas::setNodeColor (int r, int g, int b)
-{
-	nodeColor_.setRgb(r,g,b);
-}
-
-void TeQtBasicCanvas::setNodeStyle (int s, int w)
-{
-	nodeStyle_ = s;
-	nodeSize_ = w;
-}
-
-void TeQtBasicCanvas::plotNode (TeNode &pt)
-{	
-	nodePen_.setColor (nodeColor_);
-	painter_.setPen(nodePen_);
-
-	QPoint p = mapWtoV (pt.location());
-	plotMark(p,nodeStyle_, nodeSize_);
-}
-
-
-void TeQtBasicCanvas::plotMark(QPoint &p, int s, int w)
-{
-	painter_.setPen(pointColor_);
-	if (s == TePtTypePlus)
-	{
-		painter_.drawLine (p.x()-w/2,p.y(),p.x()+w/2,p.y());
-		painter_.drawLine (p.x(),p.y()-w/2,p.x(),p.y()+w/2);
-	}
-	else if (s == TePtTypeStar)
-	{
-		painter_.save ();
-		painter_.translate (p.x(),p.y());
-		painter_.drawLine (0,-w/2,0,w/2);
-		painter_.rotate (45);
-		painter_.drawLine (0,-w/2,0,w/2);
-		painter_.rotate (-90);
-		painter_.drawLine (0,-w/2,0,w/2);
-		painter_.restore ();
-	}
-	else if (s == TePtTypeCircle)
-	{
-		painter_.setBrush(pointColor_);
-		painter_.drawChord (p.x()-w/2,p.y()-w/2,w,w,0,360*16);
-	}
-	else if (s == TePtTypeX)
-	{
-		painter_.drawLine (p.x()-w/2,p.y()-w/2,p.x()+w/2,p.y()+w/2);
-		painter_.drawLine (p.x()-w/2,p.y()+w/2,p.x()+w/2,p.y()-w/2);
-	}
-	else if (s == TePtTypeBox)
-	{
-		painter_.fillRect (p.x()-w/2,p.y()-w/2,w,w,pointColor_);
-	}
-	else if (s == TePtTypeDiamond)
-	{
-		QPointArray pa(5);
-		pa.setPoint(0, p.x()-w/2, p.y());
-		pa.setPoint(1, p.x(), p.y()-w/2);
-		pa.setPoint(2, p.x()+w/2, p.y());
-		pa.setPoint(3, p.x(), p.y()+w/2);
- 		pa.setPoint(4, p.x()-w/2, p.y());
-		painter_.setBrush(pointColor_);
-		painter_.drawPolygon(pa);
-	}
-	else if (s == TePtTypeHollowCircle)
-	{
-		painter_.drawArc (p.x()-w/2,p.y()-w/2,w,w,0,360*16);
-	}
-	else if (s == TePtTypeHollowBox)
-	{
-		painter_.setBrush(Qt::NoBrush);
-		painter_.drawRect (p.x()-w/2,p.y()-w/2,w,w);
-	}
-	else if (s == TePtTypeHollowDiamond)
-	{
-		painter_.drawLine (p.x()-w/2,p.y(),p.x(),p.y()-w/2);
-		painter_.drawLine (p.x(),p.y()-w/2,p.x()+w/2,p.y());
-		painter_.drawLine (p.x()+w/2,p.y(),p.x(),p.y()+w/2);
-		painter_.drawLine (p.x(),p.y()+w/2,p.x()-w/2,p.y());
-	}
-}
-
-
-void TeQtBasicCanvas::plotCell (TeCell &cell)
-{
-	TeBox b = getDataWorld ();
-
-	if (!TeIntersects (b, cell.box ()))
-		return;
-
-	QPoint pfrom, pto;
-
-	pfrom = mapWtoV (cell.box().lowerLeft());
-	pto   = mapWtoV (cell.box().upperRight());
-
-	painter_.setBrush(polygonBrush_);
-	painter_.setPen (polygonPen_);
-
-	if((polygonTransparency_ == 0 && polygonBrush_.style() != Qt::NoBrush) || // 100% opaque or
-		(polygonTransparency_ == 100 || polygonBrush_.style() == Qt::NoBrush)) // 100% transparent
-	{
-		if(polygonTransparency_ == 100 && polygonBrush_.style() != Qt::NoBrush)
-			painter_.setBrush(Qt::NoBrush);
-		painter_.drawRect( pfrom.x()+1, pto.y()+1,pto.x()-pfrom.x(), pfrom.y()-pto.y() );
-	}
-	else
-	{
-		QRect viewRect = painter_.viewport();
-
-		TeBox	box = cell.box();
-		mapWtoV (box); // data coordinate to viewport coordinate
-		QRect polyRect((int)box.x1_, (int)box.y1_, (int)box.width(), (int)box.height());
-		QRect interRect = viewRect & polyRect;
-		QPoint pOffset = interRect.topLeft();
-
-		int width = interRect.width();
-		int height = interRect.height();
-
-		int r = width%8;
-		if(r)
-			width += (8-r);
-		r = height%8;
-		if(r)
-			height += (8-r);
-
-		QBitmap	bm;
-		bm.resize(width, height);
-		//Fill bitmap with 0-bits: clipping region
-		bm.fill(Qt::color0);
-		QPainter maskPainter(&bm);
-
-		// Draw cell with 1-bits: drawing region
-		QBrush bs(Qt::color1, polygonBrush_.style());
-		maskPainter.setBrush(bs);
-		QPen pen(Qt::color1, polygonPen_.width());
-		maskPainter.setPen(pen);
-		maskPainter.translate(-pOffset.x(), -pOffset.y());
- 		maskPainter.drawRect( interRect );
-		maskPainter.end();
-
-		QRegion clipRegion(bm);
-		clipRegion.translate(pOffset.x(), pOffset.y());
-
-		int transp = 255 - (polygonTransparency_ * 255 / 100);
-		painter_.setClipRegion(clipRegion);
-		// restore background from pixmap2_
-//		bitBlt(painter_.device(), pOffset.x(), pOffset.y(), pixmap2_, pOffset.x(), pOffset.y(), interRect.width(), interRect.height());
-		painter_.drawPixmap(pOffset.x(), pOffset.y(), *pixmap2_, pOffset.x(),
-			pOffset.y(), interRect.width(), interRect.height());
-
-		// set alpha buffer and color
-		QImage img(interRect.width(), interRect.height(), 32);
-		unsigned int val = (transp << 24) | (polygonColor_.red() << 16) | (polygonColor_.green() << 8) | polygonColor_.blue();
-		img.fill(val);
-		img.setAlphaBuffer(true);
-
-		// plot transparency
-//		bitBlt(painter_.device(), pOffset.x(), pOffset.y(), &img);
-		painter_.drawPixmap(pOffset.x(), pOffset.y(), img);
-
-
-		// plot contours
-		painter_.setClipping(false);
-		painter_.setBrush(Qt::NoBrush);
-		painter_.drawRect( interRect );
-	}
-}
-
-void TeQtBasicCanvas::plotPolygon (TePolygon &poly)
-{
-	TeBox b = getDataWorld ();
-
-	if (!TeIntersects (b, poly.box ()))
-		return;
-
-	int		i, j, k, np;
- 	QPoint	p;
-	painter_.setBrush(polygonBrush_);
-	painter_.setPen (polygonPen_);
-
-	if(polygonTransparency_==100 || polygonBrush_.style() == Qt::NoBrush) // contour
-	{
-		TeLinearRing ring = poly[0];
- 		np = ring.size();
- 		QPointArray parray(np);
-
- 		for ( i = 0 ; i < np; i++)
- 		{
-			p = mapWtoV (ring[i]);
- 			parray.setPoint(i, p);
- 		}
-		painter_.drawPolyline( parray );
-
-		for ( k = 1; k < (int)(poly.size()); k++ )
-  		{
-  			ring = poly[k];
-  			np = ring.size();
-  			QPointArray hole(np);
-
-  			for ( i = 0 ; i < np; i++)
-  			{
-				p = mapWtoV (ring[i]);
-				hole.setPoint(i, p);
-  			}
-  			painter_.drawPolyline( hole );
-  		}
-	}
-	else if(poly.size() == 1 && // no holes
-		polygonTransparency_ == 0  && // and is opaque
-		polygonBrush_.style() != Qt::NoBrush)
-	{
-		TeLinearRing ring = poly[0];
- 		np = ring.size();
- 		QPointArray parray(np);
- 		for ( i = 0 ; i < np; i++)
- 		{
-			p = mapWtoV (ring[i]);
- 			parray.setPoint(i, p);
- 		}
-		painter_.drawPolygon( parray );
-	}
-	else
-	{
-		QRect viewRect = painter_.viewport();
-
-		TeBox	box = poly.box();
-		mapWtoV (box); // data coordinate to viewport coordinate
-		if(box.width() <= 0 || box.height() <= 0)
-			return;
-		QRect polyRect((int)box.x1_, (int)box.y1_, (int)box.width(), (int)box.height());
-		if(polyRect.intersects(viewRect) == false)
-			return;
-		QRect interRect = viewRect & polyRect;
-
-		if(painter_.hasClipping())
-		{
-			QRegion interRegion = QRegion(interRect);
-			QRegion pclip = painter_.clipRegion();
-			interRegion = interRegion.intersect(pclip);
-			interRect = interRegion.boundingRect();
-		}
-
-		QPoint pOffset = interRect.topLeft();
-		int width = interRect.width();
-		int height = interRect.height();
-
-		int r = width%8;
-		if(r)
-			width += (8-r);
-		r = height%8;
-		if(r)
-			height += (8-r);
-
-		if(width == 0)
-			width = 8;
-		if(height == 0)
-			height = 8;
-
-		QBitmap	bm;
-		bm.resize(width, height);
-		//Fill bitmap with 0-bits: clipping region
-		bm.fill(Qt::color0);
-		QPainter maskPainter(&bm);
-
-		TeLinearRing ring = poly[0];
- 		np = ring.size();
- 		QPointArray parray(np);
-
-		// Draw polygon with 1-bits: drawing region
-		QBrush bs(Qt::color1, polygonBrush_.style());
-		maskPainter.setBrush(bs);
-		QPen pen(Qt::color1, polygonPen_.width());
-		maskPainter.setPen(pen);
-		maskPainter.translate(-pOffset.x(), -pOffset.y());
-		j = 0;
-		parray.setPoint(j, mapWtoV (ring[0]));
- 		for ( i = 1 ; i < np; i++)
- 		{
-			p = mapWtoV (ring[i]);
- 			parray.setPoint(++j, p);
- 		}
- 		maskPainter.drawPolygon( parray );
-
-  		vector<QPointArray> holeVec;
-		if(poly.size() > 1)
-		{
-			// Draw holes with 0-bits: clipping region
-			maskPainter.setBrush(Qt::color0);
-			pen.setColor(Qt::color0);
-			maskPainter.setPen(pen);
-			for ( k = 1; k < (int)poly.size(); k++ )
-  			{
-  				ring = poly[k];
-  				np = ring.size();
-  				QPointArray hole(np);
-
-  				for ( i = 0 ; i < np; i++)
-  				{
-					p = mapWtoV (ring[i]);
-					hole.setPoint(i, p);
-  				}
-				holeVec.push_back(hole);
-  				maskPainter.drawPolygon( hole );
-  			}
-		}
-		maskPainter.end();
-
-		QRegion clipRegion(bm);
-		clipRegion.translate(pOffset.x(), pOffset.y());
-
-		if(polygonTransparency_ == 0)
-		{
-			painter_.setClipRegion(clipRegion);
-			painter_.drawPolygon( parray );
-			painter_.setClipping(false);
-			for(i = 0; i < (int)holeVec.size(); i++)
-				painter_.drawPolyline( holeVec[i] );
-		}
-		else
-		{
-			int transp = 255 - (polygonTransparency_ * 255 / 100);
-			painter_.setClipRegion(clipRegion);
-			// restore background from pixmap2_
-			painter_.drawPixmap(pOffset.x(), pOffset.y(), *pixmap2_, pOffset.x(),
-				pOffset.y(), interRect.width(), interRect.height());
-
-			// set alpha buffer and color
-			QImage img(interRect.width(), interRect.height(), 32);
-			unsigned int val = (transp << 24) | (polygonColor_.red() << 16) | (polygonColor_.green() << 8) | polygonColor_.blue();
-			img.fill(val);
-			img.setAlphaBuffer(true);
-
-			// plot transparency
-//			bitBlt(painter_.device(), pOffset.x(), pOffset.y(), &img);
-			painter_.drawPixmap(pOffset.x(), pOffset.y(), img);
-
-			// plot contours
-			painter_.setClipping(false);
-			painter_.drawPolyline( parray );
-			for(i = 0; i< (int)holeVec.size(); i++)
-				painter_.drawPolyline( holeVec[i] );
-		}
-	}
-}
-
-
-/*void TeQtBasicCanvas::plotPolygon (TePolygon &poly)
-{
-	TeBox b = getDataWorld ();
-
-	if (!TeIntersects (b, poly.box (), 0.0))
-		return;
-
-	int		i, np;
-
-	if(polygonTransparency_==0 &&
-		polygonBrush_.style()!=Qt::NoBrush)
-	{
-		painter_->setBrush(polygonBrush_);
-		painter_->setPen (polygonPen_);
-		if (poly.size() == 1)
- 		{
- 			TeLinearRing ring = poly[0];
- 			np = ring.size();
- 			QPointArray a(np);
- 			QPoint p;
-
-		// Draw polygon with polygon brush and line pen
- 			for ( i = 0 ; i < np; i++)
- 			{
-				p = mapWtoV (ring[i]);
- 				a.setPoint(i,p);
- 			}
-			painter_->drawPolygon( a );
-		}
-		else
-		{
-			QRect rect = painter_->viewport();
-			int	w = rect.width();
-			int	h = rect.height();
-
-			int r = w%8;
-			if(r)
-				w += (8-r);
-			r = h%8;
-			if(r)
-				h += (8-r);
-
-			QBitmap	bm;
-			bm.resize(w, h);
-			//Fill bitmap with 0-bits:background(or transparent)
-			bm.fill(Qt::color0);
-			QPainter qp(&bm);
- 
-			TeLinearRing ring = poly[0];
- 			np = ring.size();
- 			QPointArray a(np);
- 			QPoint p;
-
-			// Draw outer polygon with 1-bits:foreground(or opaque)
-			qp.setBrush(Qt::color1);
-			QPen pen(Qt::color1, polygonPen_.width());
-			qp.setPen(pen);
- 			for ( i = 0 ; i < np; i++)
- 			{
-				p = mapWtoV (ring[i]);
- 				a.setPoint(i,p);
- 			}
- 			qp.drawPolygon( a );
-
-			// Draw holes with 0-bits:background(or transparent)
-			qp.setBrush(Qt::color0);
-			pen.setColor(Qt::color0);
-			qp.setPen(pen);
-			unsigned int k;
-			for ( k = 1; k < poly.size(); k++ )
-  			{
-  				ring = poly[k];
-  				np = ring.size();
-  				QPointArray hole(np);
-
-  				for ( i = 0 ; i < np; i++)
-  				{
-					p = mapWtoV (ring[i]);
-					hole.setPoint(i,p);
-  				}
-  				qp.drawPolygon( hole );
-  			}
-			
-			QRegion region(bm);
-			painter_->setClipRegion(region);
-			painter_->drawPolygon( a );
-			painter_->setClipping(false);
-		}
-	}
-	else
-	{
-		Qt::BrushStyle bstyle = polygonBrush_.style();
-		int	transp = polygonTransparency_;
-		if(polygonBrush_.style()==Qt::NoBrush || polygonTransparency_==100)
-		{
-			polygonTransparency_ =  100;
-			polygonBrush_.setStyle(Qt::SolidPattern);
-		}
-
-		QRect rect = painter_->viewport();
-
-		int		j, xmin, ymin, xmax, ymax, height, width;
-		TeBox	box = poly.box();
-		QPoint	pll, pur;
-		pll = mapWtoV (box.lowerLeft());
-		pur = mapWtoV (box.upperRight());
-		xmin = MAX (pll.x(), rect.left());
-		xmax = MIN (pur.x(), rect.right());
-		ymin = MAX (pur.y(), rect.top());
-		ymax = MIN (pll.y(), rect.bottom());
-		height = ymax - ymin;
-		width = xmax - xmin;
-
-		int	w = rect.width();
-		int	h = rect.height();
-
-		int r = w%8;
-		if(r)
-			w += (8-r);
-		r = h%8;
-		if(r)
-			h += (8-r);
-
-		QBitmap	bm;
-		bm.resize(w, h);
-		//Fill bitmap with 0-bits:background(or transparent)
-		bm.fill(Qt::color0);
-		QPainter qp(&bm);
-
-		TeLinearRing ring = poly[0];
- 		np = ring.size();
- 		QPointArray a(np);
- 		QPoint p;
-
-		// Draw outer polygon with 1-bits: foreground(or opaque)
-		qp.setBrush(Qt::color1);
-		QPen pen(Qt::color1, polygonPen_.width());
-		qp.setPen(pen);
- 		for ( i = 0 ; i < np; i++)
- 		{
-			p = mapWtoV (ring[i]);
- 			a.setPoint(i,p);
- 		}
- 		qp.drawPolygon( a );
-
-		if(poly.size() > 1)
-		{
-			// Draw holes with 0-bits:background(or transparent)
-			qp.setBrush(Qt::color0);
-			pen.setColor(Qt::color0);
-			qp.setPen(pen);
-			unsigned int k;
-			for ( k = 1; k < poly.size(); k++ )
-  			{
-  				ring = poly[k];
-  				np = ring.size();
-  				QPointArray hole(np);
-
-  				for ( i = 0 ; i < np; i++)
-  				{
-					p = mapWtoV (ring[i]);
-					hole.setPoint(i,p);
-  				}
-  				qp.drawPolygon( hole );
-  			}
-		}
-
-		QRegion region(bm);
-		qp.end();
-		painter_->setClipRegion(region);
-
-		QPixmap pixmap(rect.width(), rect.height());
-		QPainter painter(&pixmap);
-		painter.setBrush(polygonBrush_);
-		if(bstyle == Qt::NoBrush)
-			painter.setPen(polygonColor_);
-		else
-			painter.setPen(polygonPen_);
-		painter.drawPolygon( a );
-
-		QImage imap = pixmap.convertToImage();
-		painter.end();
-
-		if(qimage_.width()==0 || qimage_.height()==0)
-		{
-			qimage_.reset();
-			qimage_ = pixmap2_->convertToImage();
-		}
-
-		QRgb polyRgb = polygonColor_.rgb() & 0x00ffffff;
-//		QRgb contourRgb = polygonPen_.color().rgb() & 0x00ffffff; //contourRgb not used
-		double alpha = (double)polygonTransparency_ / 100.;
-		double beta = 1. - alpha;
-		for(i=xmin; i<xmax; i++)
-		{
-			for(j=ymin; j<ymax; j++)
-			{
-				QRgb vp = imap.pixel(i, j);
-				if(vp == polyRgb)
-				{
-					QRgb v = qimage_.pixel(i, j);
-					int r = (int)((double)qRed(v) * alpha + (double)qRed(vp) * beta);
-					int g = (int)((double)qGreen(v) * alpha + (double)qGreen(vp) * beta);
-					int b = (int)((double)qBlue(v) * alpha + (double)qBlue(vp) * beta);
-					QRgb t = qRgb(r, g, b);
-					imap.setPixel(i, j, t);
-				}
-				else if(vp == 0)
-					imap.setPixel(i, j, qimage_.pixel(i, j));
-			}
-		}
-		pixmap.convertFromImage(imap);
-		bitBlt (painter_->device(),xmin,ymin,&pixmap,xmin,ymin,width,height,Qt::CopyROP,true);
-		painter_->setClipping(false);
-		polygonBrush_.setStyle(bstyle);
-		polygonTransparency_ = transp;
-	}
-}*/
-
-QRect TeQtBasicCanvas::getLegendRect (QPoint p, const QPixmap* pix, string tx)
-{
-	QRect rect;
-	TeVisual visual;
-	TeColor cor(0, 0, 0);
-
-	visual.fixedSize(true);
-	visual.size(8);
-	visual.bold(true);
-	visual.color(cor);
-	setTextColor (cor.red_, cor.green_, cor.blue_);
-	string fam(visual.family());
-	setTextStyle (fam, visual.size(), visual.bold(), visual.italic());
-
-	if(pix)
-	{
-		int x = p.x()+pix->width()+3;
-		int y = p.y()+13;
-		QFontMetrics fm(textFont_);
-		rect = fm.boundingRect(tx.c_str());
-		rect.setRight(rect.right() + x);
-		rect.setLeft(rect.left() + x);
-		rect.setTop(rect.top() + y);
-		rect.setBottom(rect.bottom() + y);
-		QRect prect = pix->rect();
-		prect.setRight(prect.right() + p.x());
-		prect.setLeft(prect.left() + p.x());
-		prect.setTop(prect.top() + p.y());
-		prect.setBottom(prect.bottom() + p.y());
-		rect |= prect;
-	}
-	else
-	{
-		int x = p.x()+1;
-		int y = p.y()+13;
-		QFontMetrics fm(textFont_);
-		rect = fm.boundingRect(tx.c_str());
-		rect = fm.boundingRect(tx.c_str());
-		rect.setRight(rect.right() + x);
-		rect.setLeft(rect.left() + x);
-		rect.setTop(rect.top() + y);
-		rect.setBottom(rect.bottom() + y);
-	}
-	return rect;
-}
-
-void TeQtBasicCanvas::plotLegend (QPoint p, const QPixmap* pix, string tx)
-{
-//	if(painter_ == 0)
-//		return;
-
-	TeVisual visual;
-	TeColor cor(0, 0, 0);
-
-	visual.fixedSize(true);
-	visual.size(8);
-	visual.bold(true);
-	visual.color(cor);
-	setTextColor (cor.red_, cor.green_, cor.blue_);
-	string fam = visual.family();
-	setTextStyle (fam, visual.size(), visual.bold(), visual.italic());
-	painter_.setFont(textFont_);
-	painter_.setPen(textPen_);
-
-	if(pix)
-	{
-		int x = p.x()+pix->width()+3;
-		int y = p.y()+13;
-		bitBlt (painter_.device(), p.x(), p.y(), pix, 0, 0, pix->width(), pix->height(), Qt::CopyROP, true);
-		painter_.drawText(x, y, tx.c_str());
-	}
-	else
-	{
-		int x = p.x()+1;
-		int y = p.y()+13;
-		painter_.drawText(x, y, tx.c_str());
-	}
-}
-
-void TeQtBasicCanvas::plotLine (TeLine2D &line)
-{
-	TeBox b = getDataWorld ();
-	if (!TeIntersects (b, line.box ()))
-		return;
-	int i,np;
-	
-	linePen_.setColor (lineColor_);
-	painter_.setPen(linePen_);
-
-	np = line.size();
-	QPointArray a(np);
-	QPoint p;
-	for ( i = 0 ; i < np; i++)
-	{
-		p = mapWtoV (line[i]);
-		a.setPoint(i,p);
-	}
-	painter_.drawPolyline( a );
-}
-
-void TeQtBasicCanvas::plotArc (TeArc &arc)
-{
-	TeBox b = getDataWorld ();
-	if (!TeIntersects (b, arc.box ()))
-		return;
-	
-	arcPen_.setColor (arcColor_);
-	painter_.setPen(arcPen_);
-
-	QPoint pfrom, pto;
-
-	pfrom = mapWtoV (arc.fromNode().location());
-	pto   = mapWtoV (arc.toNode().location());
-
-	painter_.drawLine( pfrom, pto );
-
-	double ang = atan2 (double(pfrom.y()-pto.y()), double (pfrom.x()-pto.x()));
-	QPoint pm((int)((pto.x()+pfrom.x())/2.+0.5),(int)((pto.y()+pfrom.y())/2.+0.5));
-	
-	double ang1 = ang + 25.*TeCDR;
-	double ang2 = ang - 25.*TeCDR;
-	QPoint	p1((int)(10.*cos(ang1)+0.5),(int)(10.*sin(ang1)+.5)),
-			p2((int)(10.*cos(ang2)+0.5),(int)(10.*sin(ang2)+.5));
-	p1 += pm;
-	p2 += pm;
-	painter_.drawLine( pm, p1 );
-	painter_.drawLine( pm, p2 );
-	painter_.drawLine( p1, p2 );
-
-}
-
-void TeQtBasicCanvas::plotPie (double x, double y, double w, double h, double a, double alen)
-{
-	int	dx, dy, dw, dh, da, df;
-
-	pieBrush_.setColor (pieColor_);
-	painter_.setBrush(pieBrush_);
-	painter_.setPen(linePen_);
-
-	TeCoord2D p(x, y);
-	QPoint	qp = mapWtoV(p);
-	dx = qp.x();
-	dy = qp.y();
-
-	TeCoord2D pt(x+w, y+h);
-	QPoint	qpt = mapWtoV(pt);
-	dw = abs(qpt.x() - dx);
-	dh = abs(qpt.y() - dy);
-
-	da = (int)(a * 16);
-	df = (int)(alen * 16);
-	painter_.drawPie(dx, dy-dh, dw, dh, da, df);
-}
-
-void TeQtBasicCanvas::setPieColor (int r, int g, int b)
-{
-	pieColor_.setRgb(r, g, b);
-	pieBrush_.setStyle(Qt::SolidPattern);
-}
-
-void TeQtBasicCanvas::plotRect (QRect& rect)
-{
-	rectBrush_.setColor (rectColor_);
-	painter_.setBrush(Qt::NoBrush);
-	painter_.setPen(linePen_);
-	painter_.drawRect(rect);
-}
-
-void TeQtBasicCanvas::plotRect (double x, double y, double w, double h, int transp, bool legend)
-{
-	if(pixmap1_ == 0)
-		return;
-
-	int	dx, dy, dw, dh;
-
-	TeCoord2D p(x, y);
-	QPoint	qp;
-	if(legend)
-		qp = QPoint((int)p.x(), (int)p.y());
-	else
-		qp = mapWtoV(p);
-	dx = qp.x();
-	dy = qp.y();
-
-	TeCoord2D pt(x+w, y+h);
-	QPoint	qpt;
-	if(legend)
-		qpt = QPoint((int)pt.x(), (int)pt.y());
-	else
-		qpt = mapWtoV(pt);
-	dw = abs(qpt.x() - dx);
-	dh = abs(qpt.y() - dy);
-
-	if(transp == 0)
-	{
-		rectBrush_.setColor (rectColor_);
-		painter_.setBrush(rectBrush_);
-		painter_.setPen(linePen_);
-		painter_.drawRect(dx, dy-dh, dw, dh);
-	}
-	else
-	{
-		double alpha = transp / 100.;
-		double beta = 1 - alpha;
-		double red = rectColor_.red() * beta;
-		double green = rectColor_.green() * beta;
-		double blue = rectColor_.blue() * beta;
-
-		int r = dw%8;
-		if(r)
-			dw += (8-r);
-		r = dh%8;
-		if(r)
-			dh += (8-r);
-
-//		QImage ima = pixmap1_->convertToImage();
-		QImage ima = pixmap0_->convertToImage();
-		QImage imap(dw, dh, 32);
-		int i, j;
-		int x = qp.x();
-		int	y = qp.y() - dh;
-		for(i=x; i-x<dw && i<ima.width(); i++)
-		{
-			if(i < 0)
-				continue;
-			for(j=y; j-y<dh && j<ima.height(); j++)
-			{
-				if(j < 0)
-					continue;
-				QRgb v = ima.pixel(i, j);
-				int r = (int)((double)qRed(v) * alpha + red);
-				int g = (int)((double)qGreen(v) * alpha + green);
-				int b = (int)((double)qBlue(v) * alpha + blue);
-				QRgb t = qRgb(r, g, b);
-				imap.setPixel(i-x, j-y, t);
-			}
-		}
-
-		QPixmap pm(dw, dh);
-		pm.convertFromImage(imap);
-		QRect rec = pm.rect();
-		rec &= painter_.viewport();
-		bitBlt (painter_.device(), x, y, &pm, 0, 0, rec.width(), rec.height(), Qt::CopyROP, true);
-	}
-}
-
-void TeQtBasicCanvas::setRectColor (int r, int g, int b)
-{
-	rectColor_.setRgb(r, g, b);
-	rectBrush_.setStyle(Qt::SolidPattern);
-}
-
-static inline int blendComponent( int back, int fore, int falpha )
-{
-	int balpha = 255 - falpha;
-    int a = falpha + balpha -(falpha*balpha)/255;
-    return (falpha*fore + balpha*back -(balpha*falpha*fore)/255)/a;  
-}
-
-int d2dms(double v)
-{
-    double av;
-    int d, m, s;
-    av = fabs(v);
-    d = (int)av;
-    av = av - d;
-    av = av * 60;
-    m = (int)av;
-    av = av - m;
-    av = av * 60;
-    s = (int)av;
-    int gms = d * 10000 + m * 100 + s ;
-	return gms;
-}
-
-double dms2d (int vs)
-{
-	int v = abs(vs);
-	int dd = v/10000;
-	int dm = (v-dd*10000)/100;
-	int ds = v - dd*10000 - dm*100;
-	double d = dd + dm/60. + ds/3600.;
-	if (vs < 0)
-		d = -d;
-	return d;
-}
-
-string buildMosaicName (int x, int y, int delta)
-{
-	int		lad,lam,las,lod,lom,los,dd,dm,ds;
-	char	hemis,hemiss;
-	int		lx1,ly1;
-
-	hemis = 'S';
-	if (y>=0)hemis = 'N';
-	ly1 = abs(y);
-	lad = ly1/3600;
-	lam = (ly1-lad*3600)/60;
-	las = ly1 - lad*3600 - lam*60;
-
-	hemiss = 'O';
-	if (x>=0)hemis = 'E';
-	lx1 = abs(x);
-	lod = lx1/3600;
-	lom = (lx1-lod*3600)/60;
-	los = lx1 - lod*3600 - lom*60;
-
-	dd = delta/10000;
-	dm = (delta-dd*10000)/100;
-	ds = delta - dd*10000 - dm*100;
-
-	char name[128];
-	sprintf(name,"%c%02d%02d%02d%c%02d%02d%02d%02d%02d%02d",
-		hemis,lad,lam,las,hemiss,lod,lom,los,dd,dm,ds);
-	return string(name);
-}
-
-void TeQtBasicCanvas::copyPixmap0ToPrinter()
-{
-	if (pixmap0_)
-	{
-		QPrinter printer;
-		if (printer.setup())
-		{
-			QPainter p(&printer);
-
-			QPaintDevice* dev = painter_.device();
-			if(dev == pixmap0_)
-				painter_.end();
-
-			p.drawPixmap(0, 0, *pixmap0_);
-			p.flush();
-			p.end();
-
-			if(dev && painter_.device() == 0)
-				painter_.begin(dev);
-		}
-	}
-}
-
-void TeQtBasicCanvas::copyPixmapToWindow(QPixmap* p, int ulx, int uly, int w, int h)
-{
-	bitBlt (viewport(),ulx,uly,p,ulx,uly,w,h,Qt::CopyROP,true);
-}
-
-void TeQtBasicCanvas::copyPixmap0To(QPaintDevice* dev)
-{
-	if (pixmap0_)
-	{
-		bitBlt (dev,0,0,pixmap0_,0,0,width_,height_,Qt::CopyROP,true);
-	}
-}
-
-void TeQtBasicCanvas::copyPixmap0ToWindow()
-{
-	if (pixmap0_)
-	{
-		bitBlt (viewport(),0,0,pixmap0_,0,0,width_,height_,Qt::CopyROP,true);
-	}
-}
-
-void TeQtBasicCanvas::copyPixmap1ToWindow()
-{
-	if (pixmap1_)
-	{
-		bitBlt (viewport(),0,0,pixmap1_,0,0,width_,height_,Qt::CopyROP,true);
-	}
-}
-
-void TeQtBasicCanvas::copyPixmap2ToWindow()
-{
-	if (pixmap2_)
-	{
-		bitBlt (viewport(),0,0,pixmap2_,0,0,width_,height_,Qt::CopyROP,true);
-	}
-}
-
-void TeQtBasicCanvas::copyPixmap3ToWindow()
-{
-	if (pixmap3_)
-	{
-		bitBlt (viewport(),0,0,pixmap3_,0,0,width_,height_,Qt::CopyROP,true);
-	}
-}
-
-void TeQtBasicCanvas::copyPixmap0ToWindow(int ulx, int uly, int w, int h)
-{
-	if (pixmap0_)
-	{
-		bitBlt (viewport(),ulx,uly,pixmap0_,ulx,uly,w,h,Qt::CopyROP,true);
-	}
-}
-
-void TeQtBasicCanvas::copyPanArea(int x, int y)
-{
-	if (pixmap0_)
-	{
-		QPaintDevice* dev = painter_.device();
-		if(dev)
-			painter_.end();
-		painter_.begin(viewport());
-		int	w, h;
-		QRect a, b;
-		int hh = pixmap0_->height();
-		int ww = pixmap0_->width();
-		if(x <= 0 && y <= 0)
-		{
-			a = QRect(0, 0, ww, -y);
-			b = QRect(0, -y, -x, hh+y);
-			w = ww + x;
-			h = hh + y;
-			painter_.fillRect(a, painter_.backgroundColor());
-			painter_.fillRect(b, painter_.backgroundColor());
-			bitBlt (viewport(), -x, -y, pixmap1_, 0, 0, w, h, Qt::CopyROP, true);
-		}
-		else if(x >= 0 && y >= 0)
-		{
-			a = QRect(0, hh-y, ww, y);
-			b = QRect(ww-x, 0, x, hh-y);
-			w = ww - x;
-			h = hh - y;
-			painter_.fillRect(a, painter_.backgroundColor());
-			painter_.fillRect(b, painter_.backgroundColor());
-			bitBlt (viewport(), 0, 0, pixmap1_, x, y, w, h, Qt::CopyROP, true);
-		}
-		else if(x >= 0 && y <= 0)
-		{
-			a = QRect(0, 0, ww, -y);
-			b = QRect(ww-x, -y, x, hh+y);
-			w = ww - x;
-			h = hh + y;
-			painter_.fillRect(a, painter_.backgroundColor());
-			painter_.fillRect(b, painter_.backgroundColor());
-			bitBlt (viewport(), 0, -y, pixmap1_, x, 0, w, h, Qt::CopyROP, true);
-		}
-		else
-		{
-			a = QRect(0, hh-y, ww, y);
-			b = QRect(0, 0, -x, hh-y);
-			w = ww + x;
-			h = hh - y;
-			painter_.fillRect(a, painter_.backgroundColor());
-			painter_.fillRect(b, painter_.backgroundColor());
-			bitBlt (viewport(), -x, 0, pixmap1_, 0, y, w, h, Qt::CopyROP, true);
-		}
-		if(dev)
-			painter_.begin(dev);
-	}
-}
-
-void TeQtBasicCanvas::copyPixmap0ToPixmap1()
-{
-	if (pixmap1_ && pixmap0_)
-		bitBlt (pixmap1_,0,0,pixmap0_,0,0,width_,height_,Qt::CopyROP,true);
-}
-
-void TeQtBasicCanvas::copyPixmap0ToPixmap1(int ulx, int uly, int w, int h)
-{
-	if (pixmap1_ && pixmap0_)
-		bitBlt (pixmap1_,ulx,uly,pixmap0_,ulx,uly,w,h,Qt::CopyROP,true);
-}
-
-void TeQtBasicCanvas::copyPixmap1ToPixmap0()
-{
-	if (pixmap1_ && pixmap0_)
-		bitBlt (pixmap0_,0,0,pixmap1_,0,0,width_,height_,Qt::CopyROP,true);
-}
-
-void TeQtBasicCanvas::copyPixmap1ToPixmap0(int ulx, int uly, int w, int h)
-{
-	if (pixmap1_ && pixmap0_)
-		bitBlt (pixmap0_,ulx,uly,pixmap1_,ulx,uly,w,h,Qt::CopyROP,true);
-}
-
-void TeQtBasicCanvas::copyPixmap1ToPixmap2()
-{
-	if (pixmap1_ && pixmap2_)
-	{
-		bitBlt (pixmap2_,0,0,pixmap1_,0,0,width_,height_,Qt::CopyROP,true);
-		qimage_.reset();
-		qimage_ = pixmap2_->convertToImage();
-	}
-}
-
-void TeQtBasicCanvas::copyPixmap1ToPixmap2(int ulx, int uly, int w, int h)
-{
-	if (pixmap1_ && pixmap2_)
-	{
-		bitBlt (pixmap2_,ulx,uly,pixmap1_,ulx,uly,w,h,Qt::CopyROP,true);
-		qimage_.reset();
-		qimage_ = pixmap2_->convertToImage();
-	}
-}
-
-void TeQtBasicCanvas::copyPixmap2ToPixmap1()
-{
-	if (pixmap1_ && pixmap2_)
-		bitBlt (pixmap1_,0,0,pixmap2_,0,0,width_,height_,Qt::CopyROP,true);
-}
-
-void TeQtBasicCanvas::copyPixmap2ToPixmap1(int ulx, int uly, int w, int h)
-{
-	if (pixmap1_ && pixmap2_)
-		bitBlt (pixmap1_,ulx,uly,pixmap2_,ulx,uly,w,h,Qt::CopyROP,true);
-}
-
-void TeQtBasicCanvas::copyPixmap2ToPixmap3()
-{
-	if (pixmap3_ && pixmap2_)
-		bitBlt (pixmap3_,0,0,pixmap2_,0,0,width_,height_,Qt::CopyROP,true);
-}
-
-void TeQtBasicCanvas::copyPixmap2ToPixmap3(int ulx, int uly, int w, int h)
-{
-	if (pixmap3_ && pixmap2_)
-		bitBlt (pixmap3_,ulx,uly,pixmap2_,ulx,uly,w,h,Qt::CopyROP,true);
-}
-
-void TeQtBasicCanvas::copyPixmap3ToPixmap2()
-{
-	if (pixmap3_ && pixmap2_)
-		bitBlt (pixmap2_,0,0,pixmap3_,0,0,width_,height_,Qt::CopyROP,true);
-}
-
-void TeQtBasicCanvas::copyPixmap3ToPixmap2(int ulx, int uly, int w, int h)
-{
-	if (pixmap3_ && pixmap2_)
-		bitBlt (pixmap2_,ulx,uly,pixmap3_,ulx,uly,w,h,Qt::CopyROP,true);
-}
-
-void TeQtBasicCanvas::plotRaster(TeRaster* raster, TeRasterTransform* transf, TeQtProgress *progress)
-{
-	QPixmap* pix = (QPixmap*)(painter_.device());
-	int dt = CLOCKS_PER_SEC/4;
-	int dt2 = CLOCKS_PER_SEC * 5;
-	clock_t	t0, t1, t2;
-	params_.fileName_ = raster->params().fileName_;
-
-	if (buildRaster ())
-	{
-		// Calculates the box of input image that intersects the box of the canvas
-		TeBox bboxBackRaster = backRaster_->params().boundingBox();		
-		TeBox bboxSearched = TeRemapBox(bboxBackRaster, backRaster_->projection(), raster->projection());
-		TeBox bboxIntersection;
-		if (!TeIntersection (raster->params().boundingBox(),bboxSearched,bboxIntersection))
-			return ;			// no intersection 
-
-		// Create a remapping tool to back raster
-		TeDecoderQtImage* decqt = reinterpret_cast<TeDecoderQtImage*>(backRaster_->decoder());
-		TeRasterRemap remap;
-		if (transf)
-			remap.setTransformer(transf);
-		remap.setOutput(backRaster_);
-
-		// Calculates best resolution level to display the input image on this canvas
-		TeBox box = params_.boundingBox();
-		int nlines = params_.nlines_;
-		int ncols = params_.ncols_;
-		int res = raster->decoder()->bestResolution(box, nlines, ncols, params_.projection());
-
-		// Check if raster blocks in best level of resolution that intersects the canvas box
-		TeRasterParams parBlock;	
-		if (raster->selectBlocks(bboxIntersection,res,parBlock))        
-		{
-			params_.resolution_ = res;	
-			if (progress)
-				progress->setTotalSteps(raster->numberOfSelectedBlocks());
-			t2 = clock();
-			t0 = t1 = t2;
-			
-			// Process each block as an independent raster decoded in memory
-			TeRaster* block = new TeRaster;
-			TeDecoderMemory* decMem = new TeDecoderMemory(parBlock);
-			decMem->init();
-			remap.setInput(block);
-
-			// Portal of raster block selection behaves as portal of geometries
-			// use the "bool flag - do - while" scheme
-			int numBlockProcessed=0;
-			bool flag = true;
-			do
-			{
-				flag = raster->fetchRasterBlock(decMem);
-				block->setDecoder(decMem);
-				remap.apply();
-				numBlockProcessed++;
-
-				TeRasterParams par = decMem->params();
-				t2 = clock();
-				if (int(t2-t1) > dt)
-				{
-					t1 = t2;
-					if((int)(t2-t0) > dt2)	// show progress and refresh painted area
-					{
-						if (progress)
-						{
-							if (progress->wasCancelled())
-								break;
-							else
-								progress->setProgress(numBlockProcessed);
-						}
-						if(pix == pixmap0_ || pix == pixmap1_ || pix == pixmap2_ || pix == pixmap3_)
-						{
-							QPaintDevice* dev = painter_.device();
-							if(dev)
-								painter_.end();
-							if(dev == pixmap0_)
-							{
-								pixmap0_->convertFromImage (*(decqt->getImage ()));
-								copyPixmap0ToWindow();
-							}
-							else if(dev == pixmap1_)
-							{
-								pixmap1_->convertFromImage (*(decqt->getImage ()));
-								copyPixmap1ToWindow();
-							}
-							else if(dev == pixmap2_)
-							{
-								pixmap2_->convertFromImage (*(decqt->getImage ()));
-								copyPixmap2ToWindow();
-							}
-							else if(dev == pixmap3_)
-							{
-								pixmap3_->convertFromImage (*(decqt->getImage ()));
-								copyPixmap3ToWindow();
-							}
-							if(dev)
-								painter_.begin(dev);
-						}
-						else
-							pix->convertFromImage (*(decqt->getImage ()));
-					}
-				}
-			} while (flag);
-			if (progress)
-				progress->reset();
-			decMem->clear();
-			delete block;
-			raster->clearBlockSelection();
-		}
-		else		// no blocks found try to remap the whole raster
-		{
-			remap.setInput(raster);
-			remap.apply(true);	
-		}
-
-		if(pix == pixmap0_ || pix == pixmap1_ || pix == pixmap2_ || pix == pixmap3_)
-		{
-			QPaintDevice* dev = painter_.device();
-			if(dev)
-				painter_.end();
-
-			if(dev == pixmap0_)
-			{
-				pixmap0_->convertFromImage (*(decqt->getImage ()));
-				copyPixmap0ToWindow();
-			}
-			else if(dev == pixmap1_)
-			{
-				pixmap1_->convertFromImage (*(decqt->getImage ()));
-				copyPixmap1ToWindow();
-			}
-			else if(dev == pixmap2_)
-			{
-				pixmap2_->convertFromImage (*(decqt->getImage ()));
-				copyPixmap2ToWindow();
-			}
-			else if(dev == pixmap3_)
-			{
-				pixmap3_->convertFromImage (*(decqt->getImage ()));
-				copyPixmap3ToWindow();
-			}
-			if(dev)
-				painter_.begin(dev);
-		}
-		else
-			pix->convertFromImage (*(decqt->getImage ()));
-	}
-}
-
-bool TeQtBasicCanvas::buildRaster ()
-{
-/*	if (backRaster_)
-	{
-		TeRasterParams  rparams = backRaster_->params();
-		if (!(rparams.box() == params_.box()) ||
-			  rparams.ncols_ != params_.ncols_ ||
-			  rparams.nlines_ != params_.nlines_)
-		{  
-			delete backRaster_;
-			backRaster_ = 0;
-		}
-		else
-		{
-			if (rparams.fileName_ != params_.fileName_)
-				return true;
-			return false;
-		}
-	}
-*/
-	if (!backRaster_)
-	{
-		backRaster_ = new TeRaster();
-		params_.mode_ = 'c';
-		params_.useDummy_ = true;
-		params_.setDummy(255);
-		TeDecoderQtImage *dec = new TeDecoderQtImage(params_);
-		backRaster_->setDecoder (dec);
-		backRaster_->init();
-	}
-	return true;
-}
-
-void TeQtBasicCanvas::endPrinting()
-{
-	QPaintDevice* dev = painter_.device();
-	if(dev)
-		painter_.end();
-	if(pixmap0_)
-		painter_.begin(pixmap0_);
-}
-
-void TeQtBasicCanvas::plotGraphicScale(TeVisual& visual)
-{
-	TeColor	cor = visual.color();
-	string	family = visual.family();
-	int		size = visual.size();
-	bool	bold = visual.bold();
-	bool	italic = visual.italic();
-	TeBox	box = getWorld();
-	double	w = box.width();
-	double	dx = w / 9.;
-	long	idx = (long)dx;
-	double	f;
-	double	fa = 1.;
-	int		fw, fh;
-
-	if(box.isValid() == false)
-		return;
-
-	int conta = 1000;
-	if(idx > 0)
-	{
-		while(--conta)
-		{
-			dx /= 10.;
-			fa *= 10.;
-			idx = (long)dx;
-			if(idx == 0)
-			{
-				idx = (long)(dx * 10.);
-				f = idx * fa / 10.;
-				break;
-			}
-		}
-	}
-	else
-	{
-		while(--conta)
-		{
-			dx *= 10.;
-			fa /= 10.;
-			idx = (long)dx;
-			if(idx > 0)
-			{
-				f = idx * fa;
-				break;
-			}
-		}
-	}
-	if(conta == 0)
-		return;
-
-	double space = f * 3.;
-	double hini = box.x1_ + (w - space) / 2.;
-
-	QFont font(family.c_str(), size);
-	font.setBold (bold);
-	font.setItalic (italic);
-	painter_.setFont(font);
-
-	QFontMetrics fm(font);
-	QRect rect;
-	string unit = canvasProjection_->units();
-	rect = fm.boundingRect(unit.c_str());
-	fh = rect.height();
-	double vini = box.y1_ + mapVtoW(fh+6);
-
-	TeCoord2D wp(hini, vini);
-	QPoint p1((int)((wp.x() - xmin_)*f_ + 0.5)+x0_,
-		height_ - y0_ - (int)((wp.y() - ymin_)*f_ + 0.5));
-	correctScrolling (p1);
-
-	wp.x(wp.x() + f);
-	QPoint p2((int)((wp.x() - xmin_)*f_ + 0.5)+x0_,
-		height_ - y0_ - (int)((wp.y() - ymin_)*f_ + 0.5));
-	correctScrolling (p2);
-
-	wp.x(wp.x() + f);
-	QPoint p3((int)((wp.x() - xmin_)*f_ + 0.5)+x0_,
-		height_ - y0_ - (int)((wp.y() - ymin_)*f_ + 0.5));
-	correctScrolling (p3);
-
-	wp.x(wp.x() + f);
-	QPoint p4((int)((wp.x() - xmin_)*f_ + 0.5)+x0_,
-		height_ - y0_ - (int)((wp.y() - ymin_)*f_ + 0.5));
-	correctScrolling (p4);
-
-	QPen pen(QColor(cor.red_, cor.green_, cor.blue_));
-	painter_.setPen(pen);
-
-	if(bold == false)
-	{
-		QPoint pa = p2;
-		QPoint pb = p3;
-		painter_.drawLine(pa, pb);
-
-		pa = p1;
-		pb = pa;
-		pa.setY(pa.y() - 5);
-		pb.setY(pb.y() + 4);
-		painter_.drawLine(pa, pb);
-
-		pa = p2; 
-		pb = pa;
-		pa.setY(pa.y() - 5);
-		pb.setY(pb.y() + 4);
-		painter_.drawLine(pa, pb);
-
-		pa = p3; 
-		pb = pa;
-		pa.setY(pa.y() - 5);
-		pb.setY(pb.y() + 4);
-		painter_.drawLine(pa, pb);
-
-		pa = p4; 
-		pb = pa;
-		pa.setY(pa.y() - 5);
-		pb.setY(pb.y() + 4);
-		painter_.drawLine(pa, pb);
-
-		pa = p1;
-		pb = p4;
-		pa.setY(pa.y() - 1);
-		pb.setY(pb.y() - 1);
-		painter_.drawLine(pa, pb);
-		pa.setY(pa.y() + 2);
-		pb.setY(pb.y() + 2);
-		painter_.drawLine(pa, pb);
-	}
-	else
-	{
-		QPoint pa = p2;
-		QPoint pb = p3;
-		painter_.drawLine(pa, pb);
-		pa.setY(pa.y()-1);
-		pb.setY(pb.y()-1);
-		painter_.drawLine(pa, pb);
-
-		pa = p1;
-		pb = pa;
-		pa.setY(pa.y() - 5);
-		pb.setY(pb.y() + 4);
-		painter_.drawLine(pa, pb);
-		pa.setX(pa.x()-1);
-		pb.setX(pb.x()-1);
-		painter_.drawLine(pa, pb);
-
-		pa = p2; 
-		pb = pa;
-		pa.setY(pa.y() - 5);
-		pb.setY(pb.y() + 4);
-		painter_.drawLine(pa, pb);
-		pa.setX(pa.x()-1);
-		pb.setX(pb.x()-1);
-		painter_.drawLine(pa, pb);
-
-		pa = p3; 
-		pb = pa;
-		pa.setY(pa.y() - 5);
-		pb.setY(pb.y() + 4);
-		painter_.drawLine(pa, pb);
-		pa.setX(pa.x()-1);
-		pb.setX(pb.x()-1);
-		painter_.drawLine(pa, pb);
-
-		pa = p4; 
-		pb = pa;
-		pa.setY(pa.y() - 5);
-		pb.setY(pb.y() + 4);
-		painter_.drawLine(pa, pb);
-		pa.setX(pa.x()-1);
-		pb.setX(pb.x()-1);
-		painter_.drawLine(pa, pb);
-
-		pa = p1;
-		pb = p4;
-		pa.setY(pa.y() - 2);
-		pb.setY(pb.y() - 2);
-		painter_.drawLine(pa, pb);
-		pa.setY(pa.y() + 3);
-		pb.setY(pb.y() + 3);
-		painter_.drawLine(pa, pb);
-	}
-
-	rect = fm.boundingRect("0");
-	fw = rect.width();
-	painter_.drawText (p1.x()-fw/2, p1.y()-8, "0");
-
-	char buf[50];
-	long n = (long)f;
-
-	if(n > 0)
-	{
-		sprintf(buf, "%ld", n);
-		QString s = buf;
-		rect = fm.boundingRect(s);
-		int fw1 = rect.width();
-
-		sprintf(buf, "%ld", n*2);
-		s = buf;
-		rect = fm.boundingRect(s);
-		int fw2 = rect.width();
-
-		sprintf(buf, "%ld", n*3);
-		s = buf;
-		rect = fm.boundingRect(s);
-		int fw3 = rect.width();
-
-		if((fw1 + fw2)/2 < p3.x()-p2.x() &&
-			(fw2 + fw3)/2 < p3.x()-p2.x())
-		{
-			sprintf(buf, "%ld", n);
-			QString s = buf;
-			rect = fm.boundingRect(s);
-			fw = rect.width();
-			painter_.drawText (p2.x()-fw/2, p2.y()-8, s);
-
-			sprintf(buf, "%ld", n*2);
-			s = buf;
-			rect = fm.boundingRect(s);
-			fw = rect.width();
-			painter_.drawText (p3.x()-fw/2, p3.y()-8, s);
-		}
-
-		sprintf(buf, "%ld", n*3);
-		s = buf;
-		rect = fm.boundingRect(s);
-		fw = rect.width();
-		painter_.drawText (p4.x()-fw/2, p4.y()-8, s);
-	}
-	else
-	{
-		int nn=0;
-		int fn = (int)fa;
-		while(fn == 0)
-		{
-			fa *= 10;
-			fn = (int)fa;
-			nn++;
-		}
-		sprintf (buf, "%.*f", nn, f);
-		QString s = buf;
-		rect = fm.boundingRect(s);
-		int fw1 = rect.width();
-
-		sprintf (buf, "%.*f", nn, f*2.);
-		s = buf;
-		rect = fm.boundingRect(s);
-		int fw2 = rect.width();
-
-		sprintf (buf, "%.*f", nn, f*3.);
-		s = buf;
-		rect = fm.boundingRect(s);
-		int fw3 = rect.width();
-
-		if((fw1 + fw2)/2 < p3.x()-p2.x() &&
-			(fw2 + fw3)/2 < p3.x()-p2.x())
-		{
-			sprintf (buf, "%.*f", nn, f);
-			QString s = buf;
-			rect = fm.boundingRect(s);
-			fw = rect.width();
-			painter_.drawText (p2.x()-fw/2, p2.y()-8, s);
-
-			sprintf (buf, "%.*f", nn, f*2.);
-			s = buf;
-			rect = fm.boundingRect(s);
-			fw = rect.width();
-			painter_.drawText (p3.x()-fw/2, p3.y()-8, s);
-		}
-
-		sprintf (buf, "%.*f", nn, f*3.);
-		s = buf;
-		rect = fm.boundingRect(s);
-		fw = rect.width();
-		painter_.drawText (p4.x()-fw/2, p4.y()-8, s);
-	}
-
-	int sw = p4.x() - p1.x();
-	rect = fm.boundingRect(unit.c_str());
-	fw = rect.width();
-	fh = rect.height();
-	int suini = (sw - fw) / 2 + p1.x();
-	painter_.drawText (suini, p1.y()+fh+2, unit.c_str());
-}
-
-void TeQtBasicCanvas::setClipRegion(int x, int y, int w, int h)
-{
-	QRegion region(x, y, w, h);
-	if(painter_.device())
-		painter_.setClipRegion(region);
-}
-
-void TeQtBasicCanvas::setClipRegion(QRegion region)
-{
-	if(painter_.device())
-		painter_.setClipRegion(region);
-}
-
-void TeQtBasicCanvas::setClipping(bool enable)
-{
-	if(painter_.device())
-		painter_.setClipping(enable);
-}
-
-void TeQtBasicCanvas::clearRaster()
-{
-	if (backRaster_)
-		delete backRaster_;
-	backRaster_ = 0;
-}
diff --git a/src/terralib/application/qt/TeQtBasicCanvas.h b/src/terralib/application/qt/TeQtBasicCanvas.h
deleted file mode 100644
index 066decf..0000000
--- a/src/terralib/application/qt/TeQtBasicCanvas.h
+++ /dev/null
@@ -1,280 +0,0 @@
-/************************************************************************************
-TerraView - visualization and exploration of geographical databases
-using TerraLib.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-This file is part of TerraView. TerraView is free software; you can redistribute it 
-and/or modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-You should have received a copy of the GNU General Public License
-along with TerraView.
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The software provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use of
-this program and its documentation.
-*************************************************************************************/
-
-#ifndef  __TERRALIB_INTERNAL_QTBASICCANVAS_H
-#define  __TERRALIB_INTERNAL_QTBASICCANVAS_H
-
-#include <TeDatabase.h>
-#include <TeRaster.h>
-
-#include <qpainter.h>
-#include <qbrush.h> 
-#include <qpixmap.h>
-#include <qimage.h>
-#include <qbitmap.h>
-#include <qprinter.h>
-#include <qscrollview.h>   
- 
-#include <string>
-using namespace std;
-
-class TeQtProgress;
-/**
-  *@author R Cartaxo
-  */
-
-class TeQtBasicCanvas : public QScrollView
-{
-public:
-	TeQtBasicCanvas(QWidget *parent, const char *name );
-	virtual ~TeQtBasicCanvas();
-	void setWorld(TeBox b, int w = 0, int h = 0, QPaintDevice *pd = 0);
-	virtual void setView(int /*w*/ = 0, int /*h*/ = 0, QPaintDevice * /* pd */ = 0) {}
-	void setTransformation(double xmin, double xmax, double ymin, double ymax, bool extend = true);
-	TeBox getWorld() {return wc_ ;}
-	TeBox getDataWorld();
-
-// Coordinates system transformation
-// Viewport to Canvas coordinates
-	double mapVtoW (int);
-	TeCoord2D mapVtoW (QPoint);
-// Viewport to Data World coordinates
-	double mapVtoDW (int);
-	TeCoord2D mapVtoDW (QPoint);
-// Data World to Viewport coordinates
-	QPoint mapWtoV (TeCoord2D);
-	void mapWtoV (TeBox& box);
-//  Canvas World to Data World coordinates
-	void mapCanvasWorldToDataWorld (TeBox& w);
-// Data World to Canvas World coordinates
-	void mapDataWorldToCanvasWorld (TeBox& w);
-// Data Canvas World to Viewport coordinates
-	void mapCanvasWorldToViewport (TeBox& w);
-// Viewport to Canvas World coordinates
-	void mapViewportToCanvasWorld (TeBox& w);
-	QPoint mapCanvasWorldToViewport (TeCoord2D& c);
-
-	virtual void correctScrolling (QPoint & ) {}
-	virtual QPoint offset () {QPoint p; return p;}
-// Pixel size in world coordinates
-	double pixelSize () { return (xmax_-xmin_)/(double)width_; }
-
-// Sets the projection of next incoming data
-	void  setDataProjection ( TeProjection* proj );
-
-// Sets the projection
-	void  setProjection ( TeProjection* proj );
-
-// Retrive the projection
-	TeProjection* projection()
-	{	return canvasProjection_; }
-
-// Plotting primitives
-
-//	void setPainter (QPainter* p) {painter_ = p;}
-	QPainter* getPainter () {return &painter_;}
-	void plotOnWindow ();
-	void plotOnPixmap0 ();
-	void plotOnPixmap1 ();
-	virtual void copyPixmapToWindow(QPixmap*, int, int, int, int);
-	virtual void copyPixmap0ToPrinter();
-	virtual void copyPixmap0To(QPaintDevice*);
-	virtual void copyPixmap0ToWindow();
-	virtual void copyPixmap1ToWindow();
-	virtual void copyPixmap2ToWindow();
-	virtual void copyPixmap3ToWindow();
-	virtual void copyPixmap0ToWindow(int, int, int, int);
-	virtual void copyPixmap0ToPixmap1();
-	virtual void copyPixmap0ToPixmap1(int, int, int, int);
-	virtual void copyPixmap1ToPixmap0();
-	virtual void copyPixmap1ToPixmap0(int, int, int, int);
-	virtual void copyPixmap1ToPixmap2();
-	virtual void copyPixmap1ToPixmap2(int, int, int, int);
-	virtual void copyPixmap2ToPixmap1();
-	virtual void copyPixmap2ToPixmap1(int, int, int, int);
-	virtual void copyPixmap2ToPixmap3();
-	virtual void copyPixmap2ToPixmap3(int, int, int, int);
-	virtual void copyPixmap3ToPixmap2();
-	virtual void copyPixmap3ToPixmap2(int, int, int, int);
-	virtual void copyPanArea(int, int);
-
-	void plotPoint (TeCoord2D &p);
-	void plotPoint (TePoint &p){ plotPoint(p.location()); }
-
-	void setPointColor (int r, int g, int b);
-	void setPointStyle (int s, int w = 3);
-	void setPointPixmap (char* p);
-
-	void plotCell (TeCell &s);
-
-	QRect getLegendRect (QPoint p, const QPixmap* pix, string tx);
-	void plotLegend (QPoint p, const QPixmap* pix, string tx);
-
-	void plotPolygon (TePolygon &p);
-	void setPolygonColor (int r, int g, int b);
-	void setPolygonStyle (int s, int width = 1);
-	void setPolygonLineColor (int r, int g, int b);
-	void setPolygonLineStyle (int s, int width = 1);
-
-	void plotLine (TeLine2D &l);
-	void setLineColor (int r, int g, int b);
-	void setLineStyle (int s, int w = 1);
-
-	void plotNode (TeNode &n);
-	void setNodeColor (int r, int g, int b);
-	void setNodeStyle (int s, int w = 4);
-	void setNodePixmap (char* p);
-
-	void plotArc (TeArc &a);
-	void setArcColor (int r, int g, int b);
-	void setArcStyle ( int s, int w = 1 );
-
-	void plotPie (double x, double y, double w, double h, double a, double alen);
-	void setPieColor (int r, int g, int b);
-	void plotRect (double x, double y, double w, double h, int transp=0, bool legend=false);
-	void plotRect (QRect&);
-	void setRectColor (int r, int g, int b);
-
-	void plotText (TeCoord2D &p, string &str, double angle = 0., double alignh = 0., double alignv = 0.);
-	void plotText (TeText &tx, TeVisual& visual);
-	QRect textRect (TeText &tx, TeVisual visual);
-	void plotTextRects (TeText &tx, TeVisual visual);
-	void setTextColor (int r, int g, int b);
-	void setTextSize (int size);
-	void setTextStyle (string& family, int size, bool bold, bool italic);
-	void setTextTTStyle (QString& font, int size);
-	void useTextTT (bool u) { textTT_ = u; }
-	void textExtent ( string &str, int &w, int &h, double angle = 0.);
-	void plotXorPolyline (QPointArray& PA, bool cdev=true);
-
-	void setDB (TeDatabase* db) { db_ = db; }
-	void plotRaster (TeRaster* raster, TeRasterTransform* transf, TeQtProgress *progress);
-	void clearRaster();
-	void endPrinting();
-
-	QPixmap* getPixmap0 () {return pixmap0_; }
-	QPixmap* getPixmap1 () {return pixmap1_; }
-	QPixmap* getPixmap2 () {return pixmap2_; }
-	QPixmap* getPixmap3 () {return pixmap3_; }
-
-	void plotGraphicScale(TeVisual& visual);
-
-	void setClipRegion(int x, int y, int w, int h);
-	void setClipRegion(QRegion region);
-	void setClipping (bool enable);
-
-	virtual void copyPixmapToWindow(){}
-
-	TeRasterParams& getParams()
-	{	return params_; }
-
-	double scaleApx() {return scaleApx_;}
-	void scaleApx(double);
-
-protected:
-
-	void plotMark(QPoint &p, int s, int w);
-	bool buildRaster ();
-
-// Sizes and transformation
-	TeBox		wc_;
-	double 		xmin_,
-				xmax_,
-				ymin_,
-				ymax_;
-	
-	int			x0_;
-	int			y0_;
-	int			width_;
-	int			height_;
-	double		f_;
-	double		scaleApx_;
-	TeProjection* canvasProjection_;
-	TeProjection* dataProjection_;
-
-// The Painter
-	QPainter	painter_;
-
-// Pie
-	QBrush		pieBrush_;
-	QColor		pieColor_;
-	QBrush		rectBrush_;
-	QColor		rectColor_;
-	
-// Polygon
-	int			polygonTransparency_;
-	QBrush		polygonBrush_;
-	QPen		polygonPen_;
-	QColor		polygonColor_;
-	map<TePolyBasicType, Qt::BrushStyle> brushStyleMap_;
-	
-// Line
-	QPen		linePen_;
-	QColor		lineColor_;
-	map<TeLnBasicType, Qt::PenStyle> penStyleMap_;
-	
-// Point
-	int			pointStyle_;
-	int			pointSize_;
-	QPen		pointPen_;
-	QColor		pointColor_;
-	QPixmap*	pointPixmap_;
-
-// Arc
-	QPen		arcPen_;
-	QColor		arcColor_;
-	
-// Node
-	int			nodeStyle_;
-	int			nodeSize_;
-	QPen		nodePen_;
-	QColor		nodeColor_;
-	QPixmap*	nodePixmap_;
-
-// Text
-	QPen		textPen_;
-	QColor		textColor_;
-	QFont		textFont_;
-	string		textTTFont_;
-	int			textSize_;
-	bool		textTT_;
-
-// Pixmap
-	QPixmap		*pixmap0_;
-	QPixmap		*pixmap1_;
-	QPixmap		*pixmap2_;
-	QPixmap		*pixmap3_;
-
-	QImage		qimage_;
-
-	int			scale_;
-	TeRaster	*backRaster_;
-	TeRasterParams	params_;
-	int			lx1_,
-				ly1_,
-				lx2_,
-				ly2_;
-
-	TeDatabase	*db_;
-};
-
-#endif
-
diff --git a/src/terralib/application/qt/TeQtCanvas.cpp b/src/terralib/application/qt/TeQtCanvas.cpp
deleted file mode 100644
index 051eb3e..0000000
--- a/src/terralib/application/qt/TeQtCanvas.cpp
+++ /dev/null
@@ -1,625 +0,0 @@
-/************************************************************************************
-TerraView - visualization and exploration of geographical databases
-using TerraLib.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-This file is part of TerraView. TerraView is free software; you can redistribute it 
-and/or modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-You should have received a copy of the GNU General Public License
-along with TerraView.
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The software provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use of
-this program and its documentation.
-*************************************************************************************/
-
-#include <TeQtCanvas.h>
-#include <stdio.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qimage.h>
-#include <qcursor.h>
-#include <qpaintdevicemetrics.h> 
-
-#define MIN(a,b) a<b?a:b
-#define MAX(a,b) a>b?a:b
-
-//TeQtCanvas::TeQtCanvas(QWidget *parent, const char *name ) : QScrollView(parent,name,WNorthWestGravity)
-TeQtCanvas::TeQtCanvas(QWidget *parent, const char *name ) : TeQtBasicCanvas(parent,name)
-{
-	setVScrollBarMode(QScrollView::Auto);
-	setHScrollBarMode(QScrollView::Auto);
-    viewport()->setMouseTracking( TRUE );
-    viewport()->setFocusPolicy( StrongFocus );
-    viewport()->setBackgroundColor( backgroundColor() );
-	setMargin (0);
-	width_ = viewport()->width();
-	height_ = viewport()->height();
-	popupCanvas_ = new QPopupMenu(this);
-}
-
-TeQtCanvas::~TeQtCanvas()
-{
-	if (backRaster_)
-		delete backRaster_;
-	backRaster_ = 0;
-
-	QPaintDevice* dev = painter_.device();
-	if(dev)
-		painter_.end();
-
-	if(pixmap0_)
-		delete pixmap0_;
-	pixmap0_ = 0;
-
-	if(pixmap1_)
-		delete pixmap1_;
-	pixmap1_ = 0;
-
-	if(pixmap2_)
-		delete pixmap2_;
-	pixmap2_ = 0;
-
-	if(pixmap3_)
-		delete pixmap3_;
-	pixmap3_ = 0;
-}
-
-void TeQtCanvas::setMode (CursorMode m)
-{
-	cursorMode_ = m;
-	down_ = false;
-}
-
-void TeQtCanvas::clear()
-{
-	int ww, hh;
-	ww = viewport()->width();
-	hh = viewport()->height();
-	resizeContents (ww,hh);
-
-// Clear the window
-	QPaintDevice* dev = painter_.device();
-	if(dev)
-		painter_.end();
-	painter_.begin(viewport());
-	painter_.eraseRect(0, 0, ww, hh);
-	painter_.end();
-	if(dev)
-	painter_.begin(dev);
-
-	emit windowClear();
-}
-
-void TeQtCanvas::clear(TeBox box)
-{
-	int ww, hh;
-	ww = viewport()->width();
-	hh = viewport()->height();
-	resizeContents (ww,hh);
-
-	mapCanvasWorldToViewport(box);
-// Clear the window
-	QPaintDevice* dev = painter_.device();
-	plotOnWindow();
-	painter_.eraseRect((int)box.x1(), (int)box.y1(), (int)box.width(), (int)box.height());
-	painter_.end();
-	if(dev)
-		painter_.begin(dev);
-	emit windowClear();
-}
-
-void TeQtCanvas::clearAll()
-{
-	// Clear the window
-	clear();
-
-	// Clear the pixmap
-	if(pixmap0_)
-		pixmap0_->fill(paletteBackgroundColor());
-	if(pixmap1_)
-		pixmap1_->fill(paletteBackgroundColor());
-	if(pixmap2_)
-		pixmap2_->fill(paletteBackgroundColor());
-	if(pixmap3_)
-		pixmap3_->fill(paletteBackgroundColor());
-
-	if (backRaster_)
-		delete backRaster_;
-	backRaster_ = 0;
-
-}
-
-void TeQtCanvas::clearAll(TeBox box)
-{
-	// Clear the window
-	clear(box);
-
-	// Clear the pixmap
-	mapCanvasWorldToViewport(box);
-
-	QPaintDevice* dev = painter_.device();
-	if(dev)
-		painter_.end();
-
-	if(pixmap0_)
-	{
-		painter_.begin(pixmap0_);
-		painter_.fillRect((int)box.x1(), (int)box.y1(), (int)box.width(), (int)box.height(), backgroundColor());
-		painter_.end();
-	}
-	if(pixmap1_)
-	{
-		painter_.begin(pixmap1_);
-		painter_.fillRect((int)box.x1(), (int)box.y1(), (int)box.width(), (int)box.height(), backgroundColor());
-		painter_.end();
-	}
-	if(pixmap0_)
-	{
-		painter_.begin(pixmap2_);
-		painter_.fillRect((int)box.x1(), (int)box.y1(), (int)box.width(), (int)box.height(), backgroundColor());
-		painter_.end();
-	}
-
-	if(dev)
-		painter_.begin(dev);
-}
-
-void TeQtCanvas::setView(int w, int h, QPaintDevice *pd)
-{
-    int ww = w, 
-           hh = h;
-
-    int dpix, dpiy, ncolors, wmm, hmm, depth, pdepth;
-
-	if (pd == 0)
-	{
-		if (ww == 0)
-			ww = viewport()->width();
-		if (hh == 0)
-			hh = viewport()->height();
-		resizeContents (ww,hh);
-		x0_ = 0;
-		y0_ = 0;
-	}
-	else
-	{
-		QPaintDeviceMetrics pdm( pd );
-		if (ww == 0)
-			ww = pdm.width();
-		if (hh == 0)
-			hh = pdm.height ();
-//		x0_ = pdm.width()*.1;
-//		y0_ = pdm.height()*.1;
-		x0_ = 0;
-		y0_ = 0;
-		dpix = pdm.logicalDpiX();
-		dpiy = pdm.logicalDpiY();
-		ncolors = pdm.numColors ();
-		wmm = pdm.widthMM ();
-		hmm = pdm.heightMM ();
-		depth = pdm.depth ();
-		QPaintDevice* dev = painter_.device();
-		if(dev)
-			painter_.end();
-		painter_.begin(pd);
-	    painter_.setClipRect( x0_, y0_, ww, hh );
-	}
-
-// Build new pixmap if window has been resized
-	if (pixmap0_ == 0 || width_ != ww || height_ != hh)
-	{
-		QPaintDevice* dev = painter_.device();
-		if(dev)
-			painter_.end();
-
-		if (pixmap0_)
-			delete pixmap0_;
-		pixmap0_ = 0;
-
-		if (pixmap1_)
-			delete pixmap1_;
-		pixmap1_ = 0;
-
-		if (pixmap2_)
-			delete pixmap2_;
-		pixmap2_ = 0;
-
-		if (pixmap3_)
-			delete pixmap3_;
-		pixmap3_ = 0;
-
-// Build a new pixmap
-		pixmap0_ = new QPixmap (ww,hh);
-		pixmap1_ = new QPixmap (ww,hh);
-		pixmap2_ = new QPixmap (ww,hh);
-		pixmap3_ = new QPixmap (ww,hh);
-
-		pdepth = pixmap0_->depth ();
-	}
-
-	width_ = ww;
-	height_ = hh;
-	params_.ncols_ = width_;
-	params_.nlines_ = height_;
-
-	if (pd == 0)
-	{
-		QPaintDevice* dev = painter_.device();
-		if(dev)
-			painter_.end();
-		painter_.begin(pixmap0_);
-	}
-
-	down_ = false;
-	xul_ = xmin_;
-	yul_ = ymax_;
-	xlr_ = xmax_;
-	ylr_ = ymin_;
-	clearAll();
-}
-
-void TeQtCanvas::correctScrolling (QPoint &p)
-{
-	if(painter_.device() == viewport())
-	{
-		QPoint o (contentsX (), contentsY ());
-		p -= o;
-	}
-}
-
-void TeQtCanvas::initCursorArea(QPoint p)
-{
-	if (!pixmap0_)
-		return;
-
-	down_ = true;
-	TeCoord2D pw = mapVtoW(p);
-	xul_ = pw.x();
-	yul_ = pw.y();
-	ixul_ = ixlr_ = p.x();
-	iyul_ = iylr_ = p.y();
-}
-
-void TeQtCanvas::contentsMousePressEvent( QMouseEvent* e)
-{
-	if (!pixmap0_)
-		return;
-
-	QPoint m = e->pos();
-	TeCoord2D p = mapVtoW(m);
-
-	if(e->button() == LeftButton)
-	{
-		if (cursorMode_ == Area || cursorMode_ == Edit)
-		{
-			plotOnWindow();
-			down_ = true;
-			xul_ = p.x();
-			yul_ = p.y();
-			ixul_ = ixlr_ = e->pos().x();
-			iyul_ = iylr_ = e->pos().y();
-			emit mouseMoved (p, e->state(), m);
-		}
-		else
-			emit mousePressed (p, e->state(), m);
-	}
-	else if(e->button() == RightButton)
-		emit mouseRightButtonPressed (p, e->state(), m);
-}
-
-void TeQtCanvas::contentsMouseMoveEvent ( QMouseEvent* e)
-{
-	if (!pixmap0_)
-		return;
-	QPoint m = e->pos();
-	TeCoord2D p = mapVtoW(m);
-	if (down_)
-	{
-		QPoint o = offset();
-		painter_.setPen (green);
-		painter_.setRasterOp (Qt::XorROP);
-		painter_.drawLine(ixul_-o.x(),iyul_-o.y(),ixlr_-o.x()-1,iyul_-o.y());            
-		painter_.drawLine(ixlr_-o.x(),iyul_-o.y(),ixlr_-o.x(),iylr_-o.y() -1);            
-		painter_.drawLine(ixlr_-o.x(),iylr_-o.y(),ixul_-o.x()-1,iylr_-o.y() );            
-		painter_.drawLine(ixul_-o.x(),iylr_-o.y(),ixul_-o.x(),iyul_-o.y()-1 );            
-		ixlr_ = e->pos().x();
-		iylr_ = e->pos().y();
-		painter_.drawLine(ixul_-o.x(),iyul_-o.y(),ixlr_-o.x()-1,iyul_-o.y());            
-		painter_.drawLine(ixlr_-o.x(),iyul_-o.y(),ixlr_-o.x(),iylr_ -o.y()-1);            
-		painter_.drawLine(ixlr_-o.x(),iylr_-o.y(),ixul_-o.x()-1,iylr_-o.y() );            
-		painter_.drawLine(ixul_-o.x(),iylr_-o.y(),ixul_-o.x(),iyul_-o.y()-1 );            
-		painter_.setRasterOp (Qt::CopyROP);
-	}
-	emit mouseMoved (p, e->state(), m);
-}
-
-void TeQtCanvas::contentsMouseReleaseEvent( QMouseEvent* e)
-{
-	if (!pixmap0_)
-		return;
-	QPoint m = e->pos();
-	TeCoord2D p = mapVtoW(m);
-	if (down_)
-	{
-		ixlr_ = e->pos().x();
-		iylr_ = e->pos().y();
-		xlr_ = p.x();
-		ylr_ = p.y();
-		if(xul_ > xlr_)
-		{
-			double a = xlr_;
-			xlr_ = xul_;
-			xul_ = a;
-		}
-		if(ylr_ > yul_)
-		{
-			double a = ylr_;
-			ylr_ = yul_;
-			yul_ = a;
-		}
-		down_ = false;
-	}
-	emit mouseReleased (p, e->state(), m);
-}
-
-void TeQtCanvas::contentsMouseDoubleClickEvent ( QMouseEvent* e)
-{
-	if (!pixmap0_)
-		return;
-
-	QPoint m = e->pos();
-	TeCoord2D p = mapVtoW(m);
-
-	if(e->button() == LeftButton)
-		emit mouseDoublePressed (p, e->state(), m);
-}
-
-
-void TeQtCanvas::contentsContextMenuEvent( QContextMenuEvent* e)
-{
-//	popupCanvas_->exec(QCursor::pos());
-	QMouseEvent *m = (QMouseEvent *)e;
-	emit popupCanvasSignal(m);
-}
-
-
-void TeQtCanvas::leaveEvent ( QEvent * )
-{
-	emit mouseLeave();
-}
-
-void TeQtCanvas::keyPressEvent (QKeyEvent* e)
-{
-	emit keyPressed(e);
-}
-
-void TeQtCanvas::keyReleaseEvent (QKeyEvent* e)
-{
-	emit keyReleased(e);
-}
-
-void TeQtCanvas::viewportPaintEvent (QPaintEvent*)
-{
-	copyPixmapToWindow ();
-	emit paintEvent ();
-}
-
-void TeQtCanvas::resizeEvent ( QResizeEvent * e)
-{
-//	viewport()->resize(e->size());
-	QScrollView::resizeEvent(e);
-}
-
-void TeQtCanvas::copyPixmapToWindow()
-{
-	if (pixmap0_)
-	{
-		int cx = contentsX();
-		int cy = contentsY();
-		bitBlt (viewport(),0,0,pixmap0_,cx,cy,width_-cx,height_-cy,CopyROP,true);
-	}
-}
-
-double TeQtCanvas::mapVtoData (int pixels)
-{
-	TeBox dbox = getDataWorld();
-	double dwidth = dbox.width();
-	int	width = viewport()->width();
-
-	double d = (double)pixels * dwidth / (double)width;
-	return d;
-}
-
-int TeQtCanvas::mapDatatoV (double a)
-{
-	TeBox dbox = getDataWorld();
-	double dwidth = dbox.width();
-	int	pwidth = viewport()->width();
-
-	int d = (int)((double)pwidth * a / (double)dwidth);
-	return d;
-}
-
-TeBox 
-TeQtCanvas::getPieBarBox(TeThemeApplication* theme)
-{
-	TeBox	boxOut;
-
-	if(theme->chartAttributes_.size() == 0)
-		return boxOut;
-
-	string objectId = theme->chartSelected_;
-
-	string	TS = theme->collectionTable();
-	string	sel = "SELECT * FROM " + TS + " WHERE ";
-
-/*	if(theme->chartObjects() == TeSelectedByPointing)
-		sel += TS + ".sel_by_pointing = 1 AND ";
-	else if(theme->chartObjects() == TeNotSelectedByPointing)
-		sel += TS + ".sel_by_pointing = 0 AND ";
-	else if(theme->chartObjects() == TeSelectedByQuery)
-		sel += TS + ".sel_by_query = 1 AND ";
-	else if(theme->chartObjects() == TeNotSelectedByQuery)
-		sel += TS + ".sel_by_query = 0 AND ";
-	else if(theme->chartObjects() == TeGrouped)
-		sel += TS + ".c_legend_id <> 0 AND ";
-	else if(theme->chartObjects() == TeNotGrouped)
-		sel += TS + ".c_legend_id = 0 AND ";
-*/
-	sel += TS + ".c_object_id = '" + objectId + "'";
-
-	TeDatabasePortal *portal = theme->layer()->database()->getPortal();
-	if (!portal)
-		return false;
-
-	if (!portal->query(sel) || !portal->fetchRow())
-	{
-		delete portal;
-		return boxOut;
-	}
-
-	setDataProjection(theme->layer()->projection());
-
-	double	width = theme->barWidth();
-	double	maxh = theme->barMaxHeight();
-	double	minh = theme->barMinHeight();
-	double	maxd = theme->pieMaxDiameter();
-	double	mind = theme->pieMinDiameter();
-	double	diameter = theme->pieDiameter();
-
-
-	if(theme->keepDimension() != 0)
-	{
-		width = mapVtoData((int)width);
-		maxh = mapVtoData((int)maxh);
-		minh = mapVtoData((int)minh);
-		maxd = mapVtoData((int)maxd);
-		mind = mapVtoData((int)mind);
-		diameter = mapVtoData((int)diameter);
-	}
-
-	unsigned int i;
-
-	TeChartType chartType = (TeChartType)theme->chartType();
-	if(chartType == TePieChart)
-	{
-		double delta = diameter / 2.;
-		if(!(theme->pieDimAttribute() == "NONE"))
-			delta = maxd / 2.;
-
-		string attrs;
-		for(i=0; i<theme->chartAttributes_.size(); i++)
-			attrs += theme->chartAttributes_[i] + ",";
-		attrs += "label_x,label_y";
-		if(!(theme->pieDimAttribute() == "NONE"))
-			attrs += "," + theme->pieDimAttribute();
-
-		string q = "SELECT " + attrs + theme->sqlFrom() + " WHERE " + TS + ".c_object_id = '" + objectId + "'";
-		portal->freeResult();
-		if(portal->query(q))
-		{
-			if(portal->fetchRow())
-			{
-				double tot = 0.;
-				for(i=0; i<theme->chartAttributes_.size(); i++)
-				{
-					string v = portal->getData(i);
-					if(v.empty())
-					{
-						delete portal;
-						return boxOut;
-					}
-					tot += atof(v.c_str());
-				}
-				if(tot == 0.)
-				{
-					delete portal;
-					return boxOut;
-				}
-
-				if(!(theme->pieDimAttribute() == "NONE"))
-				{
-					if(theme->chartMaxVal() - theme->chartMinVal() == 0)
-						diameter = 0.;
-					else
-					{
-						double	adim = portal->getDouble(theme->chartAttributes_.size()+2);
-						double a = (adim - theme->chartMinVal()) / (theme->chartMaxVal() - theme->chartMinVal());
-						diameter = a * (maxd - mind) + mind;
-					}
-				}
-				double	x = theme->chartPoint_.x();
-				double	y = theme->chartPoint_.y();
-				boxOut.x1_ = x - diameter / 2.;
-				boxOut.y1_ = y - diameter / 2.;
-				boxOut.x2_ = x + diameter / 2.;
-				boxOut.y2_ = y + diameter / 2.;
-			}
-		}
-	}
-	else
-	{
-		double	n = theme->chartAttributes_.size();
-		double	maxv = theme->chartMaxVal();
-		double	minv = theme->chartMinVal();
-
-		string attrs;
-		for(i=0; i<theme->chartAttributes_.size(); i++)
-			attrs += theme->chartAttributes_[i] + ",";
-		attrs += "label_x,label_y";
-
-		string q = "SELECT " + attrs + theme->sqlFrom() + " WHERE " + TS + ".c_object_id = '" + objectId + "'";
-
-		vector<double> dvec;
-		portal->freeResult();
-		if(portal->query(q))
-		{
-			if(portal->fetchRow())
-			{
-				double	x = theme->chartPoint_.x();
-				double	xmin = x - n * width / 2.;
-				double	xmax = x + n * width / 2.;
-				double	y = theme->chartPoint_.y();
-
-				dvec.clear();
-				for(i=0; i<theme->chartAttributes_.size(); i++)
-				{
-					string val = portal->getData(i);
-					if(val.empty())
-					{
-						delete portal;
-						return boxOut;
-					}
-					dvec.push_back(atof(val.c_str()));
-				}
-
-				double mheight = -10;
-				for(i=0; i<dvec.size(); i++)
-				{
-					double height;
-					double v = dvec[i];
-					if(maxv - minv == 0)
-						height = 0.;
-					else
-						height = (v - minv) * (maxh - minh) / (maxv - minv) + minh;
-					mheight = MAX(height, mheight);
-				}
-				boxOut.x1_ = xmin;
-				boxOut.y1_ = y;
-				boxOut.x2_ = xmax;
-				boxOut.y2_ = y + mheight;
-			}
-		}
-	}
-	delete portal;
-	return boxOut;
-}
-
-
diff --git a/src/terralib/application/qt/TeQtCanvas.h b/src/terralib/application/qt/TeQtCanvas.h
deleted file mode 100644
index 993301e..0000000
--- a/src/terralib/application/qt/TeQtCanvas.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/************************************************************************************
-TerraView - visualization and exploration of geographical databases
-using TerraLib.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-This file is part of TerraView. TerraView is free software; you can redistribute it 
-and/or modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-You should have received a copy of the GNU General Public License
-along with TerraView.
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The software provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use of
-this program and its documentation.
-*************************************************************************************/
-
-#ifndef  __TERRALIB_INTERNAL_QTCANVAS_H
-#define  __TERRALIB_INTERNAL_QTCANVAS_H
-
-#include "TeQtBasicCanvas.h"
-#include "TeThemeApplication.h"
-//#include <qscrollview.h>
-#include <qpopupmenu.h>
-#include <qpixmap.h>
-
-/**
-  *@author R Cartaxo
-  */
-
-//class TeQtCanvas : public QScrollView ,public TeQtBasicCanvas {
-class TeQtCanvas : public TeQtBasicCanvas {
-   Q_OBJECT
-public:
-    enum CursorMode { Pointer, Area, Pan, Hand, SizeVer, SizeBDiag, UpArrow, Edit, Distance, Information, ZoomIn, ZoomOut };
-
-// Initialization
-	TeQtCanvas(QWidget *parent=0, const char *name=0);
-	~TeQtCanvas();
-
-	void setMode (CursorMode);
-	void initCursorArea (QPoint p);
-	TeBox getCursorBox (){ return TeBox (xul_,ylr_,xlr_,yul_); }
-
-	void copyPixmapToWindow();
-
-	void setView(int w = 0, int h = 0, QPaintDevice *pd = 0);
-	void clear();
-	void clear(TeBox box);
-	void clearAll();
-	void clearAll(TeBox box);
-	CursorMode getCursorMode() { return cursorMode_;}
-//	void drawTextTT (int x, int y, string &str, double angle = 0.);
-	double mapVtoData (int);
-	int mapDatatoV (double);
-	TeBox  getPieBarBox(TeThemeApplication* theme);
-	QPopupMenu* popupCanvas() { return popupCanvas_; }
-// scrollbar offset
-	QPoint offset () {return QPoint(contentsX(), contentsY());}
-
-signals:
-	void mousePressed (TeCoord2D&, int, QPoint&);
-	void mouseDoublePressed (TeCoord2D&, int, QPoint&);
-	void mouseRightButtonPressed (TeCoord2D&, int, QPoint&);
-	void mouseMoved (TeCoord2D&, int, QPoint&);
-	void mouseReleased (TeCoord2D&, int, QPoint&);
-	void mouseLeave ();
-	void paintEvent ();
-	void windowClear();
-	void popupCanvasSignal(QMouseEvent*);
-	void keyPressed(QKeyEvent*);
-	void keyReleased(QKeyEvent*);
-
-protected:
-
-// Mouse events
-	void contentsMousePressEvent( QMouseEvent* );
-	void contentsMouseMoveEvent ( QMouseEvent* );
-	void contentsMouseReleaseEvent ( QMouseEvent* );
-	void contentsMouseDoubleClickEvent ( QMouseEvent* );
-	void contentsContextMenuEvent( QContextMenuEvent* );
-
-// leave Event
-	void leaveEvent ( QEvent * );
-
-// Key events
-	void keyPressEvent ( QKeyEvent*);
-	void keyReleaseEvent ( QKeyEvent*);
-
-// Area Cursor section
-	CursorMode cursorMode_;
-	bool		down_;
-	double 		xul_, // cursor world coordinates
-				xlr_,
-				yul_,
-				ylr_;
-	int 		ixul_, // cursor screen coordinates
-				ixlr_,
-				iyul_,
-				iylr_;
-
-// Other events
-	void viewportPaintEvent (QPaintEvent* e);
-	void resizeEvent ( QResizeEvent * );
-
-// Mapping correction when scrollbars have been used
-	void correctScrolling (QPoint &p);
-
-// Menu de popup
-	QPopupMenu *popupCanvas_;
-
-};
-
-#endif
diff --git a/src/terralib/application/qt/TeQtChartItem.cpp b/src/terralib/application/qt/TeQtChartItem.cpp
deleted file mode 100644
index 8e986a6..0000000
--- a/src/terralib/application/qt/TeQtChartItem.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-/************************************************************************************
-TerraView - visualization and exploration of geographical databases
-using TerraLib.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-This file is part of TerraView. TerraView is free software; you can redistribute it 
-and/or modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-You should have received a copy of the GNU General Public License
-along with TerraView.
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The software provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use of
-this program and its documentation.
-*************************************************************************************/
-
-#include <qpixmap.h>
-#include <qpainter.h>
-#include <TeQtChartItem.h>
-#include <TeQtViewsListView.h>
-
-
-//Chart item constructor
-TeQtChartItem::TeQtChartItem(QListViewItem *parent,
-				QString text, TeColor color)
-	: TeQtCheckListItem(parent, text), color_(color)
-{
-	type_ = CHART;
-	name_ = text.latin1();
-	setRenameEnabled(0,true);
-	setSelected(false);
-	setEnabled(true);
-
-	order_ = parent->childCount();
-
-	//create pixmap
-	int	w = 21;
-	int	h = 16;
-
-	QPixmap pixmap(w, h);
-	pixmap.resize(w, h);
-	pixmap.fill();
-
-	QPainter p(&pixmap);
-	QBrush	 brush;
-	QColor	 qColor;
-
-	qColor.setRgb(color_.red_, color_.green_, color_.blue_);
-	brush.setColor(qColor);
-	brush.setStyle((Qt::BrushStyle)SolidPattern);
-
-	p.fillRect (1, 1, w-2, h-2, brush);
-	p.end();
-
-	setPixmap(0, pixmap);
-}
-
-void TeQtChartItem::changeColor(TeColor color)
-{
-	color_ = color;
-
-	int	w = 21;
-	int	h = 16;
-
-	QPixmap pixmap(w, h);
-	pixmap.resize(w, h);
-	pixmap.fill();
-
-	QPainter p(&pixmap);
-	QBrush	 brush;
-	QColor	 qColor;
-
-	qColor.setRgb(color_.red_, color_.green_, color_.blue_);
-	brush.setColor(qColor);
-	brush.setStyle((Qt::BrushStyle)SolidPattern);
-
-	p.fillRect (1, 1, w-2, h-2, brush);
-	p.end();
-
-	setPixmap(0, pixmap);
-	repaint();
-}
diff --git a/src/terralib/application/qt/TeQtChartItem.h b/src/terralib/application/qt/TeQtChartItem.h
deleted file mode 100644
index 7038b03..0000000
--- a/src/terralib/application/qt/TeQtChartItem.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/************************************************************************************
-TerraView - visualization and exploration of geographical databases
-using TerraLib.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-This file is part of TerraView. TerraView is free software; you can redistribute it 
-and/or modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-You should have received a copy of the GNU General Public License
-along with TerraView.
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The software provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use of
-this program and its documentation.
-*************************************************************************************/
-
-#ifndef  __TERRALIB_INTERNAL_QTCHARTITEM_H
-#define  __TERRALIB_INTERNAL_QTCHARTITEM_H
-
-#include "TeQtCheckListItem.h"
-#include "TeVisual.h"
-
-
-class TeQtChartItem : public TeQtCheckListItem
-{
-public:
-    TeQtChartItem(QListViewItem *parent, QString text, TeColor color);
-
-	~TeQtChartItem () {}
-
-	TeColor color()
-		{ return color_; }
-
-	void changeColor(TeColor color);
-
-	string name() {return name_;}
-
-protected:
-	TeColor color_;
-	string name_;
-};
-
-
-class TeQtChartTitleItem : public TeQtCheckListItem
-{
-public:
-    TeQtChartTitleItem(QListViewItem *parent, QString text)
-	: TeQtCheckListItem(parent, text)
-	{
-		type_ = CHARTTITLE;
-		order_ = parent->childCount();
-	}
-
-	~TeQtChartTitleItem() {}
-};
-
-
-#endif
diff --git a/src/terralib/application/qt/TeQtCheckListItem.cpp b/src/terralib/application/qt/TeQtCheckListItem.cpp
deleted file mode 100644
index 5d0f62b..0000000
--- a/src/terralib/application/qt/TeQtCheckListItem.cpp
+++ /dev/null
@@ -1,95 +0,0 @@
-/************************************************************************************
-TerraView - visualization and exploration of geographical databases
-using TerraLib.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-This file is part of TerraView. TerraView is free software; you can redistribute it 
-and/or modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-You should have received a copy of the GNU General Public License
-along with TerraView.
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The software provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use of
-this program and its documentation.
-*************************************************************************************/
-
-#include <TeQtCheckListItem.h>
-#include <TeUtils.h>
-#include <vector>
-
-
-int TeQtCheckListItem::compare (QListViewItem *i, int col, bool ascending) const
-{
-	int order1 = atoi(key(col, ascending).latin1());
-	int order2 = atoi(i->key(col, ascending).latin1());
-
-	if (order1 < order2)
-		return -1;
-	else if (order1 == order2)
-		return 0;
-	else 
-		return 1;
-}
-
-
-QString TeQtCheckListItem::key ( int /* col */, bool /* ascending */ ) const
-{
-	return Te2String(order_).c_str();
-}
-
-
-vector<QListViewItem*> TeQtCheckListItem::getChildren()
-{
-	vector<QListViewItem*> childrenVector;
-
-	QListViewItem *child = firstChild();
-    while (child)
-	{
-		childrenVector.push_back(child);
-        child = child->nextSibling();
-	}
-	return childrenVector;
-}
-
-
-void TeQtCheckListItem::unselectChildren()
-{
-	TeQtCheckListItem *item;
-	int n = childCount();
-	int i = 0;
-
-	if (n == 0)
-		return;
-
-	QListViewItemIterator it(this);
-	++it;
-	item = (TeQtCheckListItem*)(it.current());
-	while(item)
-	{
-		if (item->parent() == this)
-		{
-			item->setSelected(false);
-			item->repaint();
-			++i;
-		}
-		if (i == n)
-			break;
-		++it;
-		item = (TeQtCheckListItem*)(it.current());
-	}
-}
-
-
-bool TeQtCheckListItem::isChild(QListViewItem *item)
-{
-	if (item->parent() == this)
-		return true;
-	else
-		return false;
-}
diff --git a/src/terralib/application/qt/TeQtCheckListItem.h b/src/terralib/application/qt/TeQtCheckListItem.h
deleted file mode 100644
index 7d1d7da..0000000
--- a/src/terralib/application/qt/TeQtCheckListItem.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/************************************************************************************
-TerraView - visualization and exploration of geographical databases
-using TerraLib.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-This file is part of TerraView. TerraView is free software; you can redistribute it 
-and/or modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-You should have received a copy of the GNU General Public License
-along with TerraView.
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The software provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use of
-this program and its documentation.
-*************************************************************************************/
-
-#ifndef  __TERRALIB_INTERNAL_QTCHECKLISTITEM_H
-#define  __TERRALIB_INTERNAL_QTCHECKLISTITEM_H
-
-#include <qlistview.h>
-#include <vector>
-using namespace std;
-
-
-class TeQtCheckListItem : public QCheckListItem
-{
-public:
-	enum ItemType {DATABASE, INFOLAYER, VIEW, THEME, LEGENDTITLE, LEGEND, CHARTTITLE, CHART};
-
-    TeQtCheckListItem(QListView *parent, QString text, QCheckListItem::Type ctype = QCheckListItem::Controller)
-		: QCheckListItem(parent, text, ctype) {}
- 
-	TeQtCheckListItem(QListViewItem *parent, QString text, QCheckListItem::Type ctype = QCheckListItem::Controller)
-		: QCheckListItem(parent, text, ctype) {}
-
-	TeQtCheckListItem(QCheckListItem *parent, QString text, QCheckListItem::Type ctype = QCheckListItem::Controller)
-	: QCheckListItem(parent, text, ctype) {}
-	
-	virtual ~TeQtCheckListItem() {}
-
-	ItemType getType() {return type_;}
-	
-	int order()
-		{return order_;}
-
-	void order(int order)
-		{order_ = order;}
-
-	virtual int compare(QListViewItem * i, int col, bool ascending) const;
-
-	virtual QString key(int column, bool ascending) const;
-
-	vector<QListViewItem*> getChildren();
-
-	void unselectChildren();
-
-	bool isChild(QListViewItem *item);
-
-	void cancelRename(int col) {QListViewItem::cancelRename(col);}
-
-
-protected:
-	ItemType type_;
-	int order_;
-};
-
-#endif
diff --git a/src/terralib/application/qt/TeQtDatabaseItem.cpp b/src/terralib/application/qt/TeQtDatabaseItem.cpp
deleted file mode 100644
index 4d78bd4..0000000
--- a/src/terralib/application/qt/TeQtDatabaseItem.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
-/************************************************************************************
-TerraView - visualization and exploration of geographical databases
-using TerraLib.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-This file is part of TerraView. TerraView is free software; you can redistribute it 
-and/or modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-You should have received a copy of the GNU General Public License
-along with TerraView.
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The software provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use of
-this program and its documentation.
-*************************************************************************************/
-
-#include <qpixmap.h>
-#include <TeQtDatabaseItem.h>
-#include <images/database.xpm>
-
-
-//Database item constructor
-TeQtDatabaseItem::TeQtDatabaseItem(QListView *parent,
-	QString text, TeDatabase *db)
-	: TeQtCheckListItem(parent,text), db_(db)
-{
-	type_ = DATABASE;
-	QPixmap p(database_xpm);
-	setPixmap(0,p);
-	sortChildItems(0, true);
-	setSelected(false);
-	setEnabled(true);
-}
-
-				
diff --git a/src/terralib/application/qt/TeQtDatabaseItem.h b/src/terralib/application/qt/TeQtDatabaseItem.h
deleted file mode 100644
index af25fc0..0000000
--- a/src/terralib/application/qt/TeQtDatabaseItem.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/************************************************************************************
-TerraView - visualization and exploration of geographical databases
-using TerraLib.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-This file is part of TerraView. TerraView is free software; you can redistribute it 
-and/or modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-You should have received a copy of the GNU General Public License
-along with TerraView.
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The software provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use of
-this program and its documentation.
-*************************************************************************************/
-
-#ifndef  __TERRALIB_INTERNAL_QTDATABASEITEM_H
-#define  __TERRALIB_INTERNAL_QTDATABASEITEM_H
-
-#include <TeQtCheckListItem.h>
-
-class TeDatabase;
-
-
-class TeQtDatabaseItem : public TeQtCheckListItem
-{
-public:
-    TeQtDatabaseItem(QListView *parent, QString text,
-					 TeDatabase *db);
-
-	~TeQtDatabaseItem () {}
-
-	int compare(QListViewItem * i, int col, bool ascending) const
-		{ return QListViewItem::compare(i, col, ascending); }
-
-	QString key(int col, bool ascending) const
-		{ return QListViewItem::key(col, ascending); }
-
-	TeDatabase*	getDatabase()
-		{return db_;}
-
-protected:
-	TeDatabase	*db_;
-};
-
-#endif
diff --git a/src/terralib/application/qt/TeQtDatabasesListView.cpp b/src/terralib/application/qt/TeQtDatabasesListView.cpp
deleted file mode 100644
index cc07859..0000000
--- a/src/terralib/application/qt/TeQtDatabasesListView.cpp
+++ /dev/null
@@ -1,270 +0,0 @@
-/************************************************************************************
-TerraView - visualization and exploration of geographical databases
-using TerraLib.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-This file is part of TerraView. TerraView is free software; you can redistribute it 
-and/or modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-You should have received a copy of the GNU General Public License
-along with TerraView.
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The software provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use of
-this program and its documentation.
-*************************************************************************************/
-
-#include <TeQtDatabasesListView.h>
-#include <TeQtCheckListItem.h>
-#include <TeQtDatabaseItem.h>
-#include <TeQtLayerItem.h>
-#include <qpopupmenu.h>
-
-
-TeQtDatabasesListView::TeQtDatabasesListView(QWidget *parent, const char *name)
-		: QListView(parent, name)
-{
-	currentDatabaseItem_ = 0;
-	currentLayerItem_ = 0;
-	rightMouseWasClicked_ = false;
-
-	setSelectionMode(QListView::Multi);
-    setRootIsDecorated( TRUE );
-
-	popupDatabase_ = new QPopupMenu(this);
-	popupLayer_ = new QPopupMenu(this);
-	popupOutItem_ = new QPopupMenu(this);
-
-	// rename action
-	setDefaultRenameAction(QListView::Accept);
-
-	connect(this,SIGNAL(clicked(QListViewItem*)),
-			this,SLOT(clicked(QListViewItem*)));
-	connect(this,SIGNAL(contextMenuRequested(QListViewItem*,const QPoint&, int)),
-		    this,SLOT(contextMenuRequested(QListViewItem*,const QPoint&, int)));
-}
-
-
-TeQtDatabasesListView::~TeQtDatabasesListView()
-{
-	if (popupDatabase_)
-		delete popupDatabase_;
-	if (popupLayer_)
-		delete popupLayer_;
-	if (popupOutItem_)
-		delete popupOutItem_;
-}
-
-
-void TeQtDatabasesListView::selectItem(QListViewItem *item)
-{
-	clicked(item);
-}
-
-
-void TeQtDatabasesListView::selectLayerItem(TeLayer *layer)
-{
-	if (layer == 0)
-		return;
-
-	QListViewItem		*item;
-	TeQtCheckListItem	*checkListItem;
-	TeQtLayerItem		*layerItem;
-	TeQtDatabaseItem	*dbItem;
-
-	unselectAllItems();
-	QListViewItemIterator it(this);
-	item = it.current();
-	while(item)
-	{
-		checkListItem = (TeQtCheckListItem*)item;
-		if (checkListItem->getType() == TeQtCheckListItem::INFOLAYER)
-		{
-			layerItem = (TeQtLayerItem*)item;
-			if (layerItem->getLayer() == layer)
-			{
-				if (layerItem == currentLayerItem_)
-					break;
-				else
-				{
-					item->setSelected(true);
-					item->repaint();
-					currentLayerItem_ = layerItem;
-
-					dbItem = (TeQtDatabaseItem*)item->parent();
-					dbItem->setSelected(true);
-					dbItem->repaint();
-					currentDatabaseItem_ = dbItem;
-					emit itemChanged(item);
-					return;
-				}
-			}
-		}
-		it++;
-		item = it.current();
-	}
-}
-
-
-void TeQtDatabasesListView::removeItem(QListViewItem *item)
-{
-	TeQtCheckListItem *checkListItem = (TeQtCheckListItem*)item;
-
-	if(checkListItem->getType() == TeQtCheckListItem::DATABASE)
-	{
-		TeQtDatabaseItem* dbItem = (TeQtDatabaseItem*)item;
-
-		vector<QListViewItem*> childrenVector;
-		childrenVector = dbItem->getChildren();
-
-		unsigned int i;
-		TeQtLayerItem *layerItem;
-		for (i = 0; i < childrenVector.size(); ++i)
-		{
-			layerItem = (TeQtLayerItem*)childrenVector[i];
-			delete layerItem;
-		}
-
-		if (currentDatabaseItem_ == dbItem)
-		{
-			currentDatabaseItem_ = 0;
-			currentLayerItem_ = 0;
-		}
-		delete dbItem;
-	}
-	else
-	{
-		// item is a layer
-		TeQtLayerItem *layerItem = (TeQtLayerItem*)item;
-		if (currentLayerItem_ == layerItem)
-			currentLayerItem_ = 0;
-		delete layerItem;
-	}
-}
-
-
-void TeQtDatabasesListView::clicked(QListViewItem *item)
-{
-	unselectAllItems();
-	if (item == 0 || rightMouseWasClicked_ == true)
-	{
-		if (currentDatabaseItem_ != 0)
-		{
-			currentDatabaseItem_->setSelected(true);
-			currentDatabaseItem_->repaint();
-		}
-
-		if (currentLayerItem_ != 0)
-		{
-			currentLayerItem_->setSelected(true);
-			currentLayerItem_->repaint();
-		}
-
-		rightMouseWasClicked_ = false;
-		return;
-	}
-
-	TeQtCheckListItem *checkListItem = (TeQtCheckListItem*)item;
-	if (checkListItem->getType() == TeQtCheckListItem::DATABASE)
-	{
-		item->setSelected(true);
-		item->repaint();
-
-		TeQtDatabaseItem* dbItem = (TeQtDatabaseItem*)item;
-		if (dbItem != currentDatabaseItem_)
-		{
-			currentDatabaseItem_ = dbItem;
-			currentLayerItem_ = 0;
-			emit itemChanged(item);
-		}
-		else
-		{
-			if (currentLayerItem_ != 0)
-			{
-				currentLayerItem_->setSelected(true);
-				currentLayerItem_->repaint();
-			}
-		}
-	}
-	else if(checkListItem->getType() == TeQtCheckListItem::INFOLAYER)
-	{
-		item->parent()->setSelected(true);
-		item->parent()->repaint();
-		item->setSelected(true);
-		item->repaint();
-
-		TeQtDatabaseItem *dbItem = (TeQtDatabaseItem*)item->parent();
-		if (currentDatabaseItem_ != dbItem)
-		{
-			currentDatabaseItem_ = dbItem;
-			emit itemChanged(item->parent());
-		}
-
-		TeQtLayerItem* layerItem = (TeQtLayerItem*)item;
-		if (layerItem != currentLayerItem_)
-		{
-			currentLayerItem_ = layerItem;
-			emit itemChanged(item);
-		}
-	}
-}
-
-
-void TeQtDatabasesListView::contextMenuRequested(QListViewItem *item, const QPoint&, int)
-{
-	popupItem_ = (TeQtCheckListItem*)item;
-
-	unselectAllItems();
-	if (currentDatabaseItem_)
-	{
-		currentDatabaseItem_->setSelected(true);
-		currentDatabaseItem_->repaint();
-	}
-
-	if (currentLayerItem_)
-	{
-		currentLayerItem_->setSelected(true);
-		currentLayerItem_->repaint();
-	}
-
-	emit popupSignal();
-}
-
-
-void TeQtDatabasesListView::contentsMousePressEvent(QMouseEvent *e)
-{
-	if (e->button() == Qt::RightButton)
-	{
-		rightMouseWasClicked_ = true;
-		popupDatabase_->move(e->globalPos().x(), e->globalPos().y());
-		popupLayer_->move(e->globalPos().x(), e->globalPos().y());
-		popupOutItem_->move(e->globalPos().x(), e->globalPos().y());
-	}
-	QListView::contentsMousePressEvent(e);
-}
-
-
-void TeQtDatabasesListView::unselectAllItems()
-{
-	QListViewItem *item;
-
-	QListViewItemIterator it(this);
-	item = it.current();
-	while(item)
-	{
-		item->setSelected(false);
-		item->repaint();
-		it++;
-		item = it.current();
-	}
-}
-
-
-
-
-
diff --git a/src/terralib/application/qt/TeQtDatabasesListView.h b/src/terralib/application/qt/TeQtDatabasesListView.h
deleted file mode 100644
index 2b29be9..0000000
--- a/src/terralib/application/qt/TeQtDatabasesListView.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/************************************************************************************
-TerraView - visualization and exploration of geographical databases
-using TerraLib.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-This file is part of TerraView. TerraView is free software; you can redistribute it 
-and/or modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-You should have received a copy of the GNU General Public License
-along with TerraView.
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The software provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use of
-this program and its documentation.
-*************************************************************************************/
-
-#ifndef  __TERRALIB_INTERNAL_QTDATABASESLISTVIEW_H
-#define  __TERRALIB_INTERNAL_QTDATABASESLISTVIEW_H
-
-
-#include <qlistview.h>
-
-class QPopupMenu;
-class TeQtCheckListItem;
-class TeQtDatabaseItem;
-class TeQtLayerItem;
-class TeLayer;
-
-
-class TeQtDatabasesListView : public QListView
-{
-	Q_OBJECT
-
-public:
-    TeQtDatabasesListView(QWidget *parent = 0, const char *name = 0);
-
-	~TeQtDatabasesListView();
-
-	TeQtDatabaseItem* currentDatabaseItem() 
-		{ return currentDatabaseItem_; }
-
-	TeQtLayerItem* currentLayerItem() 
-		{ return currentLayerItem_; }
-
-	TeQtCheckListItem *popupItem()
-		{ return popupItem_; }
-
-	QPopupMenu* popupDatabase()
-		{ return popupDatabase_; }
-
-	QPopupMenu* popupLayer()
-		{ return popupLayer_; }
-
-	QPopupMenu* popupOutItem()
-		{ return popupOutItem_; }
-
-	void selectItem(QListViewItem *item);
-
-	void selectLayerItem(TeLayer *layer);
-
-	void removeItem(QListViewItem *item);
-
-signals:
-	void itemChanged(QListViewItem*);
-	void popupSignal();
-
-protected slots:
-	void clicked(QListViewItem *item);
-	void contextMenuRequested(QListViewItem*, const QPoint&, int);
-
-protected:
-	TeQtDatabaseItem	*currentDatabaseItem_;
-	TeQtLayerItem		*currentLayerItem_;
-	bool				rightMouseWasClicked_;
-	TeQtCheckListItem	*popupItem_;
-	QPopupMenu			*popupDatabase_;
-	QPopupMenu			*popupLayer_;
-	QPopupMenu			*popupOutItem_;
-
-	void contentsMousePressEvent(QMouseEvent *e);
-
-	void unselectAllItems();
-};
-
-
-#endif
-
diff --git a/src/terralib/application/qt/TeQtGrid.cpp b/src/terralib/application/qt/TeQtGrid.cpp
deleted file mode 100644
index 038f1f2..0000000
--- a/src/terralib/application/qt/TeQtGrid.cpp
+++ /dev/null
@@ -1,2765 +0,0 @@
-/************************************************************************************
-TerraView - visualization and exploration of geographical databases
-using TerraLib.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-This file is part of TerraView. TerraView is free software; you can redistribute it 
-and/or modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-You should have received a copy of the GNU General Public License
-along with TerraView.
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The software provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use of
-this program and its documentation.
-************************************************************************************/
-#include "TeQtGrid.h"
-#include "TeWaitCursor.h"
-#include "TeApplicationUtils.h"
-#include <qtable.h>
-#include <qcolordialog.h>
-#include <qmessagebox.h>
-#include <qapplication.h>
-#include <qdragobject.h>
-#include <algorithm>
-
-TeQtGrid::TeQtGrid(QWidget* parent, const char* name)
-	: QTable(parent, name)
-{
-	autoPromote_ = true;
-	gridX_ = -1;
-	gridY_ = -1;
-	iLine_ = -1;
-	fLine_ = -1;
-	iCol_ = -1;
-	fCol_ = -1;
-	gridWidth_  = -1;
-	gridHeight_ = -1;
-	portal_ = 0;
-	doRepaint_ = true;
-	doRefresh_ = false;
-	shiftKeyPressed_ = false;
-	lastLinePressed_ = -1;
-	verticalEdition_ = true;
-	rowToEdit_ = -1;
-	colToEdit_ = -1;
-	editing_ = false;
-	showGridInformation_ = true;
-	columnDragEnabled_ = false;
-	mousePressedOnHorizontalHeader_ = false;
-
-	setNumCols(0);
-	setNumRows(0);
-	setSelectionMode(QTable::Multi);
-
-	popupHorizHeader_ = new QPopupMenu;
-	popupVertHeader_ = new QPopupMenu;
-	popupViewport_ = new QPopupMenu;
-
-	horizontalHeader()->setAcceptDrops(true);
-
-	verticalHeader()->installEventFilter(this);
-	horizontalHeader()->installEventFilter(this);
-
-    connect(verticalHeader(), SIGNAL(released(int)),
-	     this, SLOT(mouseReleasedOnVerticalHeaderSlot(int))); // NOTE: QT send the pressed position in your argument
-
-	verticalHeader()->setResizeEnabled(false);
-}
-
-
-TeQtGrid::~TeQtGrid()
-{
-	if (portal_)
-	{
-		delete portal_;
-		portal_ = 0;
-	}
-	if (popupHorizHeader_)
-		delete popupHorizHeader_;
-	if (popupVertHeader_)
-		delete popupVertHeader_;
-	if (popupViewport_)
-		delete popupViewport_;
-}
-
-
-void TeQtGrid::init (TeThemeApplication *theme)
-{
-	int i, j, numRows, nCols, gs;
-	int collectionNumCols = 0;
-	char buf[20];
-	string oid, uid;
-	hide();
-	clear();
-
-	if (theme == 0)
-		return;
-
-	TeAttrTableVector attrTables; 
-	theme->getAttTables(attrTables); 
-
-	if (attrTables.size() == 0)
-		return;
-
-	TeWaitCursor wait;
-
-	theme_ = theme;
-	CT_ = theme->collectionTable();
-	CTE_ = theme->collectionAuxTable();
-	db_ = theme_->layer()->database();
-
-	sqlJoin_ = theme_->sqlGridJoin();
-
-	// Mount the vector of indexes (indexName_) from the tables
-	theme_->getAttTables(tableVector_);
-	for (i = 0; i < (int)tableVector_.size(); ++i)
-	{
-		TeTable t = tableVector_[i];
-		if(t.tableType() == TeAttrStatic || t.tableType() == TeAttrEvent)
-		{
-			if(tableVector_[i].linkName().empty())
-				indexVector_.push_back(tableVector_[i].name() + "." + tableVector_[i].uniqueName());
-			else
-				indexVector_.push_back(tableVector_[i].name() + "." + tableVector_[i].linkName());
-		}
-		else if(t.tableType() != TeAttrExternal)
-		{
-			if(tableVector_[i].uniqueName().empty() == false)
-				indexVector_.push_back(tableVector_[i].name() + "." + tableVector_[i].uniqueName());
-			if(tableVector_[i].linkName().empty() == false)
-				indexVector_.push_back(tableVector_[i].name() + "." + tableVector_[i].linkName());
-		}
-		else
-		{
-			if(tableVector_[i].uniqueName().empty() == false)
-				indexVector_.push_back(tableVector_[i].name() + "." + tableVector_[i].uniqueName());
-			if(tableVector_[i].linkName().empty() == false)
-				indexVector_.push_back(tableVector_[i].name() + "." + tableVector_[i].linkName());
-			if(tableVector_[i].relatedAttribute().empty() == false)
-				indexVector_.push_back(tableVector_[i].relatedTableName() + "." + tableVector_[i].relatedAttribute());
-		}
-	}
-
-	TeAttributeList collAttrList;
-	db_->getAttributeList(CT_, collAttrList);
-	collectionNumCols = collAttrList.size();
-
-	if (portal_)
-		delete portal_;
-	portal_= db_->getPortal();
-
-	//read the objects and their legends
-	//from the collection table
-	orderBy_ = CTE_ + ".unique_id ";
-	sql_ = sqlJoin_ + " ORDER BY " + orderBy_ + "ASC ";
-	if (!portal_->query(sql_))
-	{
-		delete portal_;
-		portal_ = 0;
-		wait.resetWaitCursor();
-		return;
-	}
-
-	TeAttributeList extAttList;
-	db_->getAttributeList(CTE_, extAttList);
-
-	TeAttributeList attrList = portal_->AttributeList();
-	uniqueIdPos_ = attrList.size() - 2;
-	objectIdPos_ = attrList.size() - extAttList.size() - 6;
-	gridStatusPos_ = attrList.size() - 1;
-	resultIdPos_ = attrList.size() - extAttList.size() - 1;
-	i = 0;
-	while (portal_->fetchRow())
-	{
-		uid = portal_->getData(uniqueIdPos_);
-		oid = portal_->getData(objectIdPos_);
-		gs = atoi(portal_->getData(gridStatusPos_));
-
-		if(uid.empty())
-		{
-			unique2ObjectMap_[oid] = oid;
-			ObjectInfo	info;
-			info.status_ = atoi(portal_->getData(resultIdPos_));
-			objectMap_[oid] = info;
-			portalRow2UniqueIdVector_.push_back(oid);
-		}
-		else
-		{
-			unique2ObjectMap_[uid] = oid;
-
-			if(objectMap_.find(oid) == objectMap_.end())
-			{
-				ObjectInfo	info;
-				info.uniqueMap_[uid] = gs;
-				info.status_ = atoi(portal_->getData(resultIdPos_));
-				objectMap_[oid] = info;
-			}
-			else
-			{
-				objectMap_[oid].uniqueMap_[uid] = gs;
-
-				if(objectMap_[oid].status_ == 0 && gs > 0)
-					objectMap_[oid].status_ = gs;
-				else if(objectMap_[oid].status_ == 1 && gs == 2)
-					objectMap_[oid].status_ = 3;
-				else if(objectMap_[oid].status_ == 2 && gs == 1)
-					objectMap_[oid].status_ = 3;
-			}
-			portalRow2UniqueIdVector_.push_back(uid);
-		}
-		gridToPortalRowVector_.push_back(i);
-		++i;
-	}
-	numRows = i;
-	
-	//get the column names
-
-	nCols = theme->sqlAttList().size();
-	vector<string> colNamesVector;
-	for (j = 0; j < nCols; ++j)
-		colNamesVector.push_back(theme->sqlAttList()[j].rep_.name_);
-
-	doRepaint_ = false; // don�t repaint
-	setNumRows(numRows);
-	setNumCols(nCols);
-
-	for (i = 0; i < nCols; ++i)
-		horizontalHeader()->setLabel(i, colNamesVector[i].c_str());
-
-	// Set the vector that will contain the order the
-	// grid columns will be shown
-	for (i = 0; i < nCols; i++)
-	{
-		gridToPortalColVector_.push_back(i);
-		gridColVisVector_.push_back(true);
-	}
-
-	// Set the minimum width of the vertical header of the grid
-	sprintf(buf, "%d", numRows);
-	int minw = strlen(buf) + 1;
-	if (minw < 3)
-		minw = 3;
-	verticalHeader()->setMinimumWidth(minw*9); // supposing char width of 9 pixels
-	setLeftMargin(minw*9);
-
-
-	doRepaint_ = true; // do repaint
-	doRefresh_ = true; // do refresh
-
-	refresh();
-	int visibleCols = 0;
-	int scVal = horizontalScrollBar()->value();
-	for(i=0; i<numCols(); i++)
-	{
-		if(visibleWidth() < columnPos(i) - scVal)
-			break;
-		visibleCols++;
-	}
-
-	for (i = 0; i < visibleCols; ++i)
-		adjustColumn(i);
-	refresh();
-	emit gridChangedSignal();
-	show();
-	gridInformation();
-}
-
-
-void TeQtGrid::initPortal()
-{
-	TeWaitCursor wait;
-
-	int i, j;
-	int nCols = numCols();
-
-	doRepaint_ = false; // do not repaint
-
-	for (j = 0; j < nCols; ++j)
-		horizontalHeader()->removeLabel(j);
-
-	TeAttributeList collAttrList;
-	db_->getAttributeList(CT_, collAttrList);
-
-	portal_= db_->getPortal();
-
-	//read the objects and their legends
-	//from the collection table
-	if (!portal_->query(sql_))
-	{
-		delete portal_;
-		portal_ = 0;
-		wait.resetWaitCursor();
-		return;
-	}
-
-	TeAttrTableVector cTableVec = tableVector_;
-	tableVector_.clear();
-	theme_->getAttTables(tableVector_);
-
-	TeAttributeList extAttList;
-	db_->getAttributeList(CTE_, extAttList);
-
-	TeAttributeList attrList = portal_->AttributeList();
-	uniqueIdPos_ = attrList.size() - 2;
-	objectIdPos_ = attrList.size() - extAttList.size() - 6;
-	gridStatusPos_ = attrList.size() - 1;
-	resultIdPos_ = attrList.size() - extAttList.size() - 1;
-	
-	//get the column names
-	nCols = theme_->sqlAttList().size();
-	vector<string> colNamesVector;
-	for (j = 0; j < nCols; ++j)
-		colNamesVector.push_back(theme_->sqlAttList()[j].rep_.name_);
-
-	setNumCols(nCols);
-
-	arrangeColumns(cTableVec);	
-	for(i=0; (unsigned int)i<gridColVisVector_.size(); i++)
-		showColumn(i);
-
-	for (i = 0; i < nCols; ++i)
-	{
-		j = gridToPortalColVector_[i];
-		horizontalHeader()->setLabel(i, colNamesVector[j].c_str());
-	}
-	doRepaint_ = true; // do repaint
-	doRefresh_ = true; // do refresh
-
-	for(i=0; (unsigned int)i<gridColVisVector_.size(); i++)
-	{
-		bool b = gridColVisVector_[i];
-		if(b == false)
-			hideColumn(i);
-	}
-	refresh();
-	int visibleCols = 0;
-	int scVal = horizontalScrollBar()->value();
-	for(i=0; i<numCols(); i++)
-	{
-		if(visibleWidth() < columnPos(i) - scVal)
-			break;
-		visibleCols++;
-	}
-
-	for (i = 0; i < visibleCols; ++i)
-		adjustColumn(i);
-	refresh();
-	emit gridChangedSignal();
-	show();
-	gridInformation();
-}
-
-void TeQtGrid::updatePortalContents()
-{
-	TeWaitCursor wait;
-
-	if (portal_ == 0)
-	{
-		wait.resetWaitCursor();
-		return;
-	}
-
-	portal_->freeResult();
-
-	if (!portal_->query(sql_))
-	{
-		delete portal_;
-		portal_ = 0;
-	}
-}
-
-void TeQtGrid::clear()
-{
-	gridX_ = -1;
-	gridY_ = -1;
-	iLine_ = -1;
-	fLine_ = -1;
-	iCol_ = -1;
-	fCol_ = -1;
-	gridWidth_  = -1;
-	gridHeight_ = -1;
-	rowToEdit_ = -1;
-	colToEdit_ = -1;
-
-	shiftKeyPressed_ = false;
-	lastLinePressed_ = -1;
-
-	gridToPortalRowVector_.clear();
-	gridToPortalColVector_.clear();
-	objectMap_.clear();
-	unique2ObjectMap_.clear();
-	portalRow2UniqueIdVector_.clear();
-	gridColVisVector_.clear();
-	indexVector_.clear();
-	tableVector_.clear();
-
-	if (portal_)
-	{
-		delete portal_;
-		portal_ = 0;
-	}
-	setNumRows(0);
-	setNumCols(0);
-}
-
-void TeQtGrid::clearPortal()
-{
-	if (portal_)
-	{
-		delete portal_;
-		portal_ = 0;
-	}
-}
-
-
-bool TeQtGrid::eventFilter(QObject *o, QEvent *e)
-{
-	if (doRepaint_ == false) // do not repaint
-		return true; // stop event
-	static int stx, sty;
-
-	if(o == horizontalHeader())
-	{
-		QMouseEvent *m = (QMouseEvent *)e;
-		int gridCol = columnAt(m->x() + contentsX());
-		if(portal_)
-		{
-			TeTable table = findTable(gridCol);
-			QString msg = tr("Table:") + " ";
-			msg += table.name().c_str();
-			if(table.tableType() == TeAttrStatic)
-				msg += " - " + tr("Table type: TeAttrStatic");
-			else if(table.tableType() == TeAttrExternal)
-				msg += "  " + tr("Table type: TeAttrExternal");
-			else if(table.tableType() == TeAttrEvent)
-				msg += " - " + tr("Table type: TeAttrEvent");
-			else if(table.tableType() == TeFixedGeomDynAttr)
-				msg += " - " + tr("Table type: TeFixedGeomDynAttr");
-			else if(table.tableType() == TeDynGeomDynAttr)
-				msg += " - " + tr("Table type: TeDynGeomDynAttr");
-
-			TeAttributeList AL = portal_->AttributeList();
-			int pcol = gridToPortalColVector_[gridCol];
-			if(AL.size() > (unsigned int)pcol)
-			{
-				msg += " - " + tr("Column:");
-				msg += " ";
-				msg += AL[pcol].rep_.name_.c_str();
-				if(AL[pcol].rep_.type_ == TeSTRING)
-				{
-					msg += " - " + tr("Column type: TeSTRING");
-					msg += " - " + tr("Num char:");
-					msg += " ";
-					msg += Te2String(AL[pcol].rep_.numChar_).c_str();
-				}
-				else if(AL[pcol].rep_.type_ == TeREAL)
-					msg += "  " + tr("Column type: TeREAL");
-				else if(AL[pcol].rep_.type_ == TeINT)
-					msg += " - " + tr("Column type: TeINT");
-				else if(AL[pcol].rep_.type_ == TeDATETIME)
-					msg += " - " + tr("Column type: TeDATETIME");
-				if(isIndex(pcol))
-					msg += " - " + tr("Column is not editable");
-				else
-					msg += " - " + tr("Column is editable");
-			}
-
-			displayGridInformation(msg);
-		}
-		
-		if (e->type() == QEvent::MouseButtonPress)
-		{
-			stx = sty = -1;
-			if (m->button() == RightButton)
-			{
-				if(gridCol < 0)
-					return false;
-
-				int portalColToPopup = gridToPortalColVector_[gridCol];
-				popupHorizHeader_->move(m->globalPos().x(), m->globalPos().y());
-				emit horizHeaderSignal(portalColToPopup);
-				return true;
-			}
-			if (m->button() == LeftButton)
-			{
-				stx = contentsX();
-				sty = contentsY();
-				if(sty != 0)
-					mousePressedOnHorizontalHeader_ = true;
-				int p = horizontalHeader()->sectionPos(gridCol);
-				int ss = horizontalHeader()->sectionSize(gridCol);
-				int x = m->x() + horizontalHeader()->offset();
-				if(abs(x-p) <= 3 || abs(x-(p+ss)) <= 3)
-					return false;
-				columnDragEnabled_ = true;
-				return false;
-			}
-		}
-		else if(e->type() == QEvent::DragEnter) {
-			QDragEnterEvent *dg = (QDragEnterEvent *)e;
-			dg->accept(QTextDrag::canDecode(dg));
-			return true;
-		}
-		else if(e->type() == QEvent::DragMove) {
-			return true;
-		}
-		else if(e->type() == QEvent::MouseMove) {
-			if (columnDragEnabled_)
-			{
-				columnDragEnabled_ = false;
-				clearSelection(true);
-				setSelectionMode(QTable::NoSelection);
-				string t = "swap:" + Te2String(gridCol);
-				QTextDrag* tDrag = new QTextDrag(t.c_str(), this, "gridswap");
-				tDrag->drag();
-			}
-			return false;
-		}
-		else if(e->type() == QEvent::Drop) {
-			QDragEnterEvent *dg = (QDragEnterEvent *)e;
-			dg->accept(QTextDrag::canDecode(dg));
-			QDropEvent *dp = (QDropEvent *)e;
-
-			QString tx;
-			string dragText;
-			if(QTextDrag::decode(dp, tx))
-				dragText = tx.latin1();
-
-			string fName = dragText;
-			int f = fName.find("-fieldName:");
-			if(f >= 0)
-			{
-				fName.erase(0, f+strlen("-fieldName:"));
-
-				string table = dragText;
-				table.erase(f, table.size()-f);
-				f = table.find("table:", string::npos);
-				if(f == 0)
-					table.erase(0, strlen("table:"));
-
-				int col = columnAt(dg->pos().x() + contentsX());
-				string dropName = horizontalHeader()->label(col).latin1();
-				emit linkTable(table, fName, dropName);
-			}
-			else // swap column
-			{
-				f = fName.find("swap:", string::npos);
-				if(f >= 0)
-				{
-					TeWaitCursor wait;
-					string s = fName;
-					s.erase(0, strlen("swap:"));
-					int col1 = atoi(s.c_str());
-					int col2 = columnAt(dg->pos().x() + contentsX());
-					if(col1 < col2)
-						for(int i=col1; i<col2; i++)
-							swapColumns(i, i+1);
-					else
-						for(int i=col1; i>col2; i--)
-							swapColumns(i, i-1);
-					QPoint p = dg->pos();
-					QMouseEvent* e = new QMouseEvent(QEvent::MouseButtonRelease, p, Qt::LeftButton, Qt::LeftButton);
-					QApplication::postEvent(horizontalHeader(), e);
-				}
-			}
-			return true;
-		}
-		else if (e->type() == QEvent::MouseButtonRelease)
-		{
-			columnDragEnabled_ = false;
-			setSelectionMode(QTable::Multi);
-			if(stx > -1 && sty > -1)
-				setContentsPos(stx, sty);
-			return false;
-		}
-	}
-	else if(o == verticalHeader())
-	{
-		if (e->type() == QEvent::MouseButtonDblClick)
-		{
-			QMouseEvent *m = (QMouseEvent *)e;
-			if (m->button() == LeftButton)
-			{
-				int lin = rowAt(m->y() + contentsY());
-				if (lin >= 0)
-				{
-					int portalRowToPopup = gridToPortalRowVector_[lin];
-					emit vertHeaderLeftDblClickSignal(portalRowToPopup);
-				}
-			}
-		}
-		else if (e->type() == QEvent::MouseButtonPress)
-		{
-			QMouseEvent *m = (QMouseEvent *)e;
-			if (m->button() == LeftButton)
-			{
-				stx = contentsX();
-				sty = contentsY();
-				return false;
-			}
-			else if (m->button() == RightButton)
-			{
-				int lin = rowAt(m->y() + contentsY());
-				if (lin < 0)
-					return false;
-
-				int portalRowToPopup = gridToPortalRowVector_[lin];
-				popupVertHeader_->move(m->globalPos().x(), m->globalPos().y());
-				emit vertHeaderSignal(portalRowToPopup);
-				return true;
-			}
-		}
-		else if (e->type() == QEvent::MouseButtonRelease)
-		{
-			QMouseEvent *m = (QMouseEvent *)e;
-			if (m->button() == LeftButton)
-			{
-				if (m->state() & Qt::ShiftButton)
-					shiftKeyPressed_ = true;
-				else
-					shiftKeyPressed_ = false;
-				int lin = m->y();
-				dragLineReleased_ = rowAt(lin + contentsY());
-				setContentsPos(stx, sty);
-			}
-			return false;
-		}
-	}
-	else if (o == viewport())
-	{
-		if (e->type() == QEvent::MouseButtonPress)
-		{
-			if(rowToEdit_ > -1 && colToEdit_ > -1)
-				endEdit(rowToEdit_, colToEdit_, true, true);
-			rowToEdit_ = -1;
-			colToEdit_ = -1;
-			editing_ = false;
-
-			QMouseEvent *m = (QMouseEvent *)e;
-			if (m->button() == RightButton)
-			{
-				popupViewport_->move(m->globalPos().x(), m->globalPos().y());
-				emit viewportSignal();
-				return true;
-			}
-		}
-		else if (e->type() == QEvent::MouseButtonDblClick)
-		{
-			QMouseEvent *m = (QMouseEvent *)e;
-			if (m->button() == LeftButton)
-			{
-				int col = gridToPortalColVector_[currentColumn()];
-				if(isIndex(col))
-					return true;
-
-				refresh();
-				setEditMode(QTable::Editing, currentRow(), currentColumn());
-				beginEdit(currEditRow(), currEditCol(), false);
-				rowToEdit_ = currEditRow();
-				colToEdit_ = currEditCol();
-				return false;
-			}
-		}
-		else if (e->type() == QEvent::Enter)
-			gridInformation();
-	}
-	else
-	{
-		if (e->type() == QEvent::KeyPress)
-		{
-			if(rowToEdit_ == -1 || colToEdit_ == -1)
-				return true;
-
-			QKeyEvent *k = (QKeyEvent*)e;
-			if (k->state() & Qt::ControlButton)
-			{
-				if(k->key() == Qt::Key_PageDown)
-				{
-					scrollToNextPointedObjectSlot();
-					return true;
-				}
-				else if(k->key() == Qt::Key_PageUp)
-				{
-					scrollToPrevPointedObjectSlot();
-					return true;
-				}
-			}
-			else if (k->state() & Qt::AltButton)
-			{
-				if(k->key() == Qt::Key_PageDown)
-				{
-					scrollToNextQueriedObjectSlot();
-					return true;
-				}
-				else if(k->key() == Qt::Key_PageUp)
-				{
-					scrollToPrevQueriedObjectSlot();
-					return true;
-				}
-			}
-			else if (k->key() == Qt::Key_Return)
-			{
-				editing_ = true;
-				endEdit(rowToEdit_, colToEdit_, true, true);
-				goToEditNewCell();
-				return true;
-			}
-		}
-	}
-
-	return QTable::eventFilter(o, e);
-}
-
-
-void TeQtGrid::mouseReleasedOnVerticalHeaderSlot(int lin)     
-{
-	TeWaitCursor wait;
-	string uid, oid;
-	int i, begin, end;
-	set<string> drawSet;
-	
-	if (shiftKeyPressed_ == false) // single toggle
-	{
-		portal_->fetchRow(gridToPortalRowVector_[lin]);
-		uid = portal_->getData(uniqueIdPos_);
-		oid = portal_->getData(objectIdPos_);
-		drawSet.insert(oid);
-		ObjectInfo& info = objectMap_[oid];
-		changeObjectStatus(info, uid, "pointing");
-	}
-	else	// set or reset grid lines (shift and pointing operation)
-	{
-		if (lastLinePressed_ != -1)
-		{
-			portal_->fetchRow(gridToPortalRowVector_[lastLinePressed_]);
-			uid = portal_->getData(uniqueIdPos_);
-			oid = portal_->getData(objectIdPos_);
-			ObjectInfo& info = objectMap_[oid];
-			int pointed = info.status_  & 0x1;
-			if(uid.empty() == false)
-				pointed = info.uniqueMap_[uid] & 0x1;
-
-			if (lin > lastLinePressed_)
-			{
-				begin = lastLinePressed_ + 1;
-				end = lin;
-			}
-			else if (lin < lastLinePressed_)
-			{
-				begin = lin;
-				end = lastLinePressed_ - 1;
-			}
-			else
-				begin = end = lin;
-
-			for (i = begin ; i <= end; ++i)
-			{
-				portal_->fetchRow(gridToPortalRowVector_[i]);
-				uid = portal_->getData(uniqueIdPos_);
-				oid = portal_->getData(objectIdPos_);
-				ObjectInfo& info = objectMap_[oid];
-				changeObjectStatus(info, uid, "shiftAndPointing", pointed);
-				drawSet.insert(oid);
-			}
-		}
-	}
-
-	if (lin != dragLineReleased_)
-	{
-		if (dragLineReleased_ == -1)
-		{
-			int ini, fim;
-			for (ini = iLine_; ini <= fLine_; ini++)
-				if (isRowSelected(ini, true))
-					break;
-
-			for (fim = fLine_; fim >= iLine_; fim--)
-				if (isRowSelected(fim, true))
-					break;
-
-			if (fim > lin)
-				dragLineReleased_ = fim;
-			else
-				dragLineReleased_ = ini;
-		}
-		portal_->fetchRow(gridToPortalRowVector_[lin]);
-		uid = portal_->getData(uniqueIdPos_);
-		oid = portal_->getData(objectIdPos_);
-		ObjectInfo& info = objectMap_[oid];
-		int pointed = info.status_  & 0x1;
-		if(uid.empty() == false)
-			pointed = info.uniqueMap_[uid] & 0x1;
-
-		if (lin < dragLineReleased_)
-		{
-			begin = lin + 1;
-			end = dragLineReleased_;
-		}
-		else
-		{
-			begin = dragLineReleased_;
-			end = lin - 1;
-		}
-
-		for (i = begin ; i <= end; ++i)
-		{
-			portal_->fetchRow(gridToPortalRowVector_[i]);
-			uid = portal_->getData(uniqueIdPos_);
-			oid = portal_->getData(objectIdPos_);
-			ObjectInfo& info = objectMap_[oid];
-			changeObjectStatus(info, uid, "shiftAndPointing", pointed);
-			drawSet.insert(oid);
-		}
-	}
-
-	lastLinePressed_ = lin;
-	clearSelection(true);
-
-	refresh();
-	if (saveObjectStatus(theme_, drawSet, objectMap_) == false)
-	{
-		QMessageBox::critical(this, tr("Error"),
-			tr("Fail to update the \"c_object_status\" and \"grid_status\" fields in the collection table!"));
-		return;
-	}
-	emit putColorOnObject(theme_, drawSet);
-	gridInformation();
-}
-
-
-void TeQtGrid::putColorOnGrid(set<string> uidSet, set<string> oidSet, string operation, string /* attrQuery */)     
-{
-	int	x, y;
-	string oid, uid;
-	set<string> drawSet;
-	set<string>::iterator it, nit;
-	list<string>::iterator vit;
-	map<string, int>::iterator uit;
-	map<string, ObjectInfo>::iterator oit;
-	set<string> auxSet;
-
-	for (it = oidSet.begin(); it != oidSet.end(); ++it)
-	{
-		ObjectInfo& info = objectMap_[*it];
-		if(info.uniqueMap_.size())
-		{
-			for(uit = info.uniqueMap_.begin(); uit != info.uniqueMap_.end(); uit++)
-				uidSet.insert(uit->first);
-		}
-		else
-			auxSet.insert(*it);
-	}
-	oidSet = auxSet;
-
-	if (operation == "newQuery" || operation == "filterQuery" || operation == "addQuery")
-	{
-		//get the unique ids that were queried before this query
-		list<string> oldUQueriedList, oldOQueriedList;
-		for(oit =  objectMap_.begin(); oit != objectMap_.end(); oit++)
-		{
-			ObjectInfo& info = oit->second;
-			if(info.uniqueMap_.size())
-			{
-				for(uit = info.uniqueMap_.begin(); uit != info.uniqueMap_.end(); uit++)
-				{
-					if(uit->second & 0x2)
-						oldUQueriedList.push_back(uit->first);
-				}
-			}
-			else
-			{
-				if(info.status_ & 0x2)
-					oldOQueriedList.push_back(oit->first);
-			}
-		}
-
-		if(operation == "newQuery")
-		{
-			// remove intersection (new and old set)
-			vit = oldUQueriedList.begin();
-			while(vit != oldUQueriedList.end())
-			{
-				if((nit = uidSet.find(*vit)) != uidSet.end())
-				{
-					vit = oldUQueriedList.erase(vit);
-					uidSet.erase(nit);
-				}
-				else
-					vit++;
-			}
-			vit = oldOQueriedList.begin();
-			while(vit != oldOQueriedList.end())
-			{
-				if((nit = oidSet.find(*vit)) != oidSet.end())
-				{
-					vit = oldOQueriedList.erase(vit);
-					oidSet.erase(nit);
-				}
-				else
-					vit++;
-			}
-
-			// reset old queried
-			for(vit = oldUQueriedList.begin(); vit != oldUQueriedList.end(); vit++)
-			{
-				oid = unique2ObjectMap_[*vit];
-				ObjectInfo& info = objectMap_[oid];
-				info.uniqueMap_[*vit] &= 0x1;
-				drawSet.insert(oid);
-			}
-			for(vit = oldOQueriedList.begin(); vit != oldOQueriedList.end(); vit++)
-			{
-				oid = *vit;
-				ObjectInfo& info = objectMap_[oid];
-				info.status_ &= 0x1;
-				drawSet.insert(oid);
-			}
-
-			// set new queried
-			for(nit = uidSet.begin(); nit != uidSet.end(); nit++)
-			{
-				oid = unique2ObjectMap_[*nit];
-				ObjectInfo& info = objectMap_[oid];
-				info.uniqueMap_[*nit] |= 0x2;
-				drawSet.insert(oid);
-			}
-			for(nit = oidSet.begin(); nit != oidSet.end(); nit++)
-			{
-				oid = *nit;
-				ObjectInfo& info = objectMap_[oid];
-				info.status_ |= 0x2;
-				for(uit = info.uniqueMap_.begin(); uit != info.uniqueMap_.end(); uit++)
-					uit->second |= 0x2;
-				drawSet.insert(oid);
-			}
-		}
-		else if(operation == "filterQuery")
-		{
-			// remove intersection (old set)
-			for (nit = uidSet.begin(); nit != uidSet.end(); nit++)
-				if((vit = std::find(oldUQueriedList.begin(), oldUQueriedList.end(), *nit)) != oldUQueriedList.end())
-					oldUQueriedList.erase(vit);
-			for (nit = oidSet.begin(); nit != oidSet.end(); nit++)
-				if((vit = std::find(oldOQueriedList.begin(), oldOQueriedList.end(), *nit)) != oldOQueriedList.end())
-					oldOQueriedList.erase(vit);
-
-			// reset old queried
-			for(vit = oldUQueriedList.begin(); vit != oldUQueriedList.end(); vit++)
-			{
-				oid = unique2ObjectMap_[*vit];
-				ObjectInfo& info = objectMap_[oid];
-				info.uniqueMap_[*vit] &= 0x1;
-				drawSet.insert(oid);
-			}
-			for(vit = oldOQueriedList.begin(); vit != oldOQueriedList.end(); vit++)
-			{
-				oid = *vit;
-				ObjectInfo& info = objectMap_[oid];
-				info.status_ &= 0x1;
-				for(uit = info.uniqueMap_.begin(); uit != info.uniqueMap_.end(); uit++)
-					uit->second &= 0x1;
-				drawSet.insert(oid);
-			}
-		}
-		else if(operation == "addQuery")
-		{
-			// remove intersection (new set)
-			for (vit = oldUQueriedList.begin(); vit != oldUQueriedList.end(); vit++)
-				if((nit = uidSet.find(*vit)) != uidSet.end())
-					uidSet.erase(nit);
-			for (vit = oldOQueriedList.begin(); vit != oldOQueriedList.end(); vit++)
-				if((nit = oidSet.find(*vit)) != oidSet.end())
-					oidSet.erase(nit);
-
-			// set new queried
-			for(nit = uidSet.begin(); nit != uidSet.end(); nit++)
-			{
-				oid = unique2ObjectMap_[*nit];
-				ObjectInfo& info = objectMap_[oid];
-				info.uniqueMap_[*nit] |= 0x2;
-				drawSet.insert(oid);
-			}
-			for(nit = oidSet.begin(); nit != oidSet.end(); nit++)
-			{
-				oid = *nit;
-				ObjectInfo& info = objectMap_[oid];
-				info.status_ |= 0x2;
-				for(uit = info.uniqueMap_.begin(); uit != info.uniqueMap_.end(); uit++)
-					uit->second |= 0x2;
-				drawSet.insert(oid);
-			}
-		}
-	}
-	else if (operation == "newPointing" || operation == "togglePointing" || operation == "addPointing")
-	{
-		list<string> oldUPointedList, oldOPointedList;
-		if(operation != "togglePointing")
-		{
-			//get the object ids that were pointed before this pointing
-			for(oit =  objectMap_.begin(); oit != objectMap_.end(); oit++)
-			{
-				ObjectInfo& info = oit->second;
-				if(info.uniqueMap_.size())
-				{
-					for(uit = info.uniqueMap_.begin(); uit != info.uniqueMap_.end(); uit++)
-					{
-						if(uit->second & 0x1)
-							oldUPointedList.push_back(uit->first);
-					}
-				}
-				else
-				{
-					if(info.status_ & 0x1)
-						oldOPointedList.push_back(oit->first);
-				}
-			}
-		}
-
-		if(operation == "newPointing")
-		{
-			// remove intersection (new and old set)
-			vit = oldUPointedList.begin();
-			while(vit != oldUPointedList.end())
-			{
-				if((nit = uidSet.find(*vit)) != uidSet.end())
-					vit = oldUPointedList.erase(vit);
-				else
-					vit++;
-			}
-			vit = oldOPointedList.begin();
-			while(vit != oldOPointedList.end())
-			{
-				if((nit = oidSet.find(*vit)) != oidSet.end())
-					oldOPointedList.erase(vit);
-				else
-					vit++;
-			}
-
-			// reset old pointeds
-			for(vit = oldUPointedList.begin(); vit != oldUPointedList.end(); vit++)
-			{
-				oid = unique2ObjectMap_[*vit];
-				ObjectInfo& info = objectMap_[oid];
-				info.uniqueMap_[*vit] &= 0x2;
-				drawSet.insert(oid);
-			}
-			for(vit = oldOPointedList.begin(); vit != oldOPointedList.end(); vit++)
-			{
-				oid = *vit;
-				ObjectInfo& info = objectMap_[oid];
-				info.status_ &= 0x2;
-				drawSet.insert(oid);
-			}
-
-			// set new pointed
-			for(nit = uidSet.begin(); nit != uidSet.end(); nit++)
-			{
-				oid = unique2ObjectMap_[*nit];
-				ObjectInfo& info = objectMap_[oid];
-				info.uniqueMap_[*nit] |= 0x1;
-				drawSet.insert(oid);
-			}
-			for(nit = oidSet.begin(); nit != oidSet.end(); nit++)
-			{
-				oid = *nit;
-				ObjectInfo& info = objectMap_[oid];
-				info.status_ |= 0x1;
-				for(uit = info.uniqueMap_.begin(); uit != info.uniqueMap_.end(); uit++)
-					uit->second |= 0x1;
-				drawSet.insert(oid);
-			}
-		}
-		else if(operation == "togglePointing")
-		{
-			// toggle status (new pointed ids)
-			nit = oidSet.begin();
-			if(nit != oidSet.end())
-			{
-				oid = *nit;
-				ObjectInfo& info = objectMap_[oid];
-				int status = info.status_;
-
-				if(status & 0x1) // reset new pointed
-				{
-					while(nit != oidSet.end())
-					{
-						oid = *nit;
-						ObjectInfo& info = objectMap_[oid];
-						info.status_ &= 0x2;
-						for(uit = info.uniqueMap_.begin(); uit != info.uniqueMap_.end(); uit++)
-							uit->second &= 0x2;
-						nit++;
-						drawSet.insert(oid);
-					}
-				}
-				else // set new pointed
-				{
-					while(nit != oidSet.end())
-					{
-						oid = *nit;
-						ObjectInfo& info = objectMap_[oid];
-						info.status_ |= 0x1;
-						for(uit = info.uniqueMap_.begin(); uit != info.uniqueMap_.end(); uit++)
-							uit->second |= 0x1;
-						nit++;
-						drawSet.insert(oid);
-					}
-				}
-			}
-
-			nit = uidSet.begin();
-			if(nit != uidSet.end())
-			{
-				oid = unique2ObjectMap_[*nit];
-				ObjectInfo& info = objectMap_[oid];
-				int status = info.status_;
-
-				if(status & 0x1) // reset new pointed
-				{
-					for(nit = uidSet.begin(); nit != uidSet.end(); nit++)
-					{
-						oid = unique2ObjectMap_[*nit];
-						ObjectInfo& info = objectMap_[oid];
-						info.uniqueMap_[*nit] &= 0x2;
-						drawSet.insert(oid);
-					}
-				}
-				else // set new pointed
-				{
-					for(nit = uidSet.begin(); nit != uidSet.end(); nit++)
-					{
-						oid = unique2ObjectMap_[*nit];
-						ObjectInfo& info = objectMap_[oid];
-						info.uniqueMap_[*nit] |= 0x1;
-						drawSet.insert(oid);
-					}
-				}
-			}
-		}
-		else if(operation == "addPointing")
-		{
-			// remove intersection (new pointed ids)
- // not erase (not optimize) - graphic plot need selectd objects
-
-			// set new pointeds
-			for(nit = uidSet.begin(); nit != uidSet.end(); nit++)
-			{
-				oid = unique2ObjectMap_[*nit];
-				ObjectInfo& info = objectMap_[oid];
-				info.uniqueMap_[*nit] |= 0x1;
-				drawSet.insert(oid);
-			}
-			for(nit = oidSet.begin(); nit != oidSet.end(); nit++)
-			{
-				oid = *nit;
-				ObjectInfo& info = objectMap_[oid];
-				info.status_ |= 0x1;
-				for(uit = info.uniqueMap_.begin(); uit != info.uniqueMap_.end(); uit++)
-					uit->second |= 0x1;
-				drawSet.insert(oid);
-			}
-		}
-	}
-
-	for(it = drawSet.begin(); it != drawSet.end(); it++)
-	{
-		oid = *it;
-		ObjectInfo& info = objectMap_[oid];
-		if(info.uniqueMap_.size())
-		{
-			set<int> statusSet;
-			uit = info.uniqueMap_.begin();
-			uid = uit->first;
-
-			while(uit != info.uniqueMap_.end())
-				statusSet.insert(uit++->second);
-			if(statusSet.find(3) != statusSet.end())
-				info.status_ = 3;
-			else if(statusSet.find(2) != statusSet.end() && statusSet.find(1) != statusSet.end())
-				info.status_ = 3;
-			else if(statusSet.find(2) != statusSet.end() && statusSet.find(1) == statusSet.end())
-				info.status_ = 2;
-			else if(statusSet.find(2) == statusSet.end() && statusSet.find(1) != statusSet.end())
-				info.status_ = 1;
-			else
-				info.status_ = 0;
-		}
-	}
-
-	// If it is not a query operation (i.e., a pointing operation), scroll the grid if the
-	// single object is not visible in the grid.
-	if (operation == "togglePointing")
-	{
-		vector<string>::iterator itpos;
-		if(uid.empty() == false)
-			itpos = std::find(portalRow2UniqueIdVector_.begin(), portalRow2UniqueIdVector_.end(), uid);
-		else
-			itpos = std::find(portalRow2UniqueIdVector_.begin(), portalRow2UniqueIdVector_.end(), oid);
-		int pos = 0;
-		if(itpos != portalRow2UniqueIdVector_.end())
-			pos = itpos - portalRow2UniqueIdVector_.begin();
-
-		vector<int>::iterator itpos2;
-		itpos2 = std::find(gridToPortalRowVector_.begin(),gridToPortalRowVector_.end(), pos);
-		pos = itpos2 - gridToPortalRowVector_.begin();
-
-		if (pos <= iLine_ || pos >= fLine_)
-		{
-			// if editing, end edit to enable vertical scrolling
-			if(editing_ && (rowToEdit_ > -1 && colToEdit_ > -1))
-			{
-				endEdit(rowToEdit_, colToEdit_, true, true);
-				rowToEdit_ = -1;
-				colToEdit_ = -1;
-				editing_ = false;
-			}
-			doRepaint_ = true;
-			x = contentsX();
-			y = rowPos(pos);
-			setContentsPos(x, y);
-		}
-	}
-
-	clearSelection(true);
-	refresh();
-
-	if (saveObjectStatus(theme_, drawSet, objectMap_) == false)
-	{
-		QMessageBox::critical(this, tr("Error"),
-			tr("Fail to update the \"c_object_status\" and \"grid_status\" fields in the collection table!"));
-		return;
-	}
-
-	emit putColorOnObject(theme_, drawSet);
-
-	if(autoPromote_)
-	{
-		// if editing, end edit to enable vertical scrolling
-		if(editing_ && (rowToEdit_ > -1 && colToEdit_ > -1))
-		{
-			endEdit(rowToEdit_, colToEdit_, true, true);
-			rowToEdit_ = -1;
-			colToEdit_ = -1;
-			editing_ = false;
-		}
-		if (operation == "newPointing" || operation == "addPointing")
-			promotePointedObjectsSlot();
-		else if(operation == "newQuery" || operation == "addQuery" || operation == "filterQuery")
-			promoteQueriedObjectsSlot();
-	}
-
-	gridInformation();
-}
-
-
-void TeQtGrid::drawContents (QPainter *qp, int clipx, int clipy, int clipw, int cliph)
-{
-	if(doRepaint_ == true)
-	{
-		update();
-		QTable :: drawContents(qp, clipx, clipy, clipw, cliph);
-	}
-}
-
-
-void TeQtGrid::update()
-{
-	if(portal_ == 0)
-		return;
-	int ie = currEditRow();
-	int je = currEditCol();
-	QString vale;
-	if(ie >= 0 && je >= 0)
-	{
-		setCellContentFromEditor(ie, je);
-		vale = text(ie, je);
-		if(vale.isEmpty())
-		{
-			int pos = gridToPortalRowVector_[ie];
-			if(portal_->fetchRow(pos))
-			{
-				string s = portal_->getData(gridToPortalColVector_[je]);
-				if(s.empty() == false)
-					vale = s.c_str();
-			}
-		}
-	}
-
-	int	i, j, pos;
-
-	int gridY = contentsY();
-	int gridX = contentsX();
-
-	if(mousePressedOnHorizontalHeader_ && gridY == 0)
-	{
-		setContentsPos(gridX_, gridY_);
-		gridY = gridY_;
-		mousePressedOnHorizontalHeader_ = false;
-	}
-
-	int gridHeight = visibleHeight(); 
-	int gridWidth = visibleWidth(); 
-
-	if (doRefresh_ == false && 
-		gridX_ == gridX && gridY_ == gridY &&
-		gridHeight_ == gridHeight && 
-		gridWidth_ == gridWidth)
-		return;
-
-	gridX_ = gridX;
-	gridY_ = gridY;
-	gridHeight_ = gridHeight;
-	gridWidth_ = gridWidth;
-		
-// clear cells
-	doRepaint_ = false; // do not repaint
-	if (iLine_ >= 0 && iCol_ >= 0)
-	{
-		for (i = iLine_; i <= fLine_; ++i)
-		{
-			for (j = iCol_; j <= fCol_; ++j)
-			{
-				if(item(i, j))
-					clearCell(i, j);
-			}
-		}
-	}
-
-	iLine_ = rowAt(gridY_);
-	iCol_  = columnAt(gridX_);
-	visibleLines_ = rowAt(gridHeight_);
-	if (visibleLines_ == -1)
-		visibleLines_ = numRows();
-
-	visibleCols_ = 0;
-	int scVal = horizontalScrollBar()->value();
-	for(i=iCol_; i<numCols(); i++)
-	{
-		if(gridWidth_ < columnPos(i) - scVal)
-			break;
-		visibleCols_++;
-	}
-
-	if (iLine_ < 0 || iCol_ < 0)
-	{
-		gridX_ = gridY_ = iLine_ = fLine_ = iCol_ = fCol_ = -1;
-		doRepaint_ = true;
-		return;
-	}
-
-	fLine_ = iLine_ + visibleLines_;
-	if (fLine_ > numRows() - 1)
-		fLine_ = numRows() - 1;
-	fCol_ = iCol_ + visibleCols_ - 1;
-
-	int status;
-	string st, oid, uid;
-	QColor qc;
-	TeColor color;
-	for (i = iLine_; i <= fLine_ ; ++i)
-	{
-		pos = gridToPortalRowVector_[i];
-		if (portal_->fetchRow(pos) == false)
-			return;
-
-		oid = portal_->getData(objectIdPos_);
-		uid = portal_->getData(uniqueIdPos_);
-
-		ObjectInfo& info = objectMap_[oid];
-		if(uid.empty() == false)
-			status = info.uniqueMap_[uid];
-		else
-			status = info.status_;
-
-		if (status == 1)
-			color = theme_->pointingLegend().visual(TePOLYGONS).color();
-		else if (status == 2)
-			color = theme_->queryLegend().visual(TePOLYGONS).color();
-		else if (status == 3)
-			color = theme_->queryAndPointingLegend().visual(TePOLYGONS).color();
-		qc = QColor(color.red_,color.green_,color.blue_);
-
-		for (j = iCol_; j <= fCol_; ++j)
-		{
-			if (gridColVisVector_[j] == true)
-			{
-				st = portal_->getData(gridToPortalColVector_[j]);
-				if(status != 0)
-				{
-					TeQtGridItem *ti;
-					if(ie == i && je == j)
-						ti = new TeQtGridItem( this, QTableItem::OnTyping, vale);
-					else
-						ti = new TeQtGridItem( this, QTableItem::OnTyping, st.c_str());
-
-					ti->setColor(qc);
-					setItem(i, j, ti );
-				}
-				else
-				{
-					if(ie == i && je == j)
-						setText(i, j, vale);
-					else
-						setText(i, j, st.c_str());
-				}
-			}
-
-			if(i == fLine_ && j == fCol_- 1)
-			{
-				doRepaint_ = true; // do repaint
-				doRefresh_ = true;
-				updateCell(i, j);
-			}
-		}
-	}
-
-	doRepaint_ = true; // do repaint
-	doRefresh_ = false;
-
-	if(ie >= 0 && je >= 0)
-		endEdit(ie, je, true, true);
-
-	if(rowToEdit_ > -1 && colToEdit_ > -1 && editing_)
-	{
-		setEditMode(QTable::Editing, rowToEdit_, colToEdit_);
-		beginEdit(rowToEdit_, colToEdit_, false);
-	}
-}
-
-
-void TeQtGrid::adjustColumns()
-{
-	int	i;
-	for (i = 0; i < numCols(); ++i)
-		adjustColumn(i);
-	refresh();
-}
-
-
-void TeQtGrid::swapColumns(int col1, int col2)
-{
-	int	nc = numCols();
-	vector<int>	cols;
-	int	n;
-
-	if (col1 == -1 || col2 == -1)
-	{
-		for(n = 0; n < nc; n++)
-			if (isColumnSelected(n, true) == true)
-				cols.push_back(n);
-		if(cols.size() != 2)
-		{
-			QMessageBox::warning(this, tr("Warning"),
-				tr("Select the two grid columns to be exchanged!"));
-			return;
-		}
-		col1 = cols[0];
-		col2 = cols[1];
-	}
-
-	int c1 = gridToPortalColVector_[col1];
-	int c2 = gridToPortalColVector_[col2];
-
-	gridToPortalColVector_[col1] = c2;
-	gridToPortalColVector_[col2] = c1;
-
-	QTable::swapColumns(col1, col2);
-	for (n=0; n<nc; n++)
-	{
-		string st = portal_->getAttribute(gridToPortalColVector_[n]).rep_.name_;
-		horizontalHeader()->setLabel(n, st.c_str());
-	}
-	refresh();
-}
-
-
-void TeQtGrid::setVisColumn(bool vis, int col)
-{
-	unsigned int nc = numCols();
-	unsigned int n;
-	vector<int>	cols;
-
-	if (vis == false)
-	{
-		if (col == -1)
-		{
-			for(n=0; n<nc; n++)
-				if (isColumnSelected(n, true) == true)
-					cols.push_back(n);
-			if(cols.size() == 0)
-			{
-				QMessageBox::warning(this, tr("Warning"),
-					tr("Select the grid column(s) to be hidden!"));
-				return;
-			}
-		}
-		else
-			cols.push_back(col);
-
-		for(n=0; n<cols.size(); n++)
-		{
-			showColumn(cols[n]); // it is a BUG in the QT 3.2.0 
-			hideColumn(cols[n]);
-			gridColVisVector_[cols[n]] = false;
-		}
-	}
-	else
-	{
-		for(n=0; n<nc; n++)
-		{
-			if(gridColVisVector_[n] == false)
-			{
-				gridColVisVector_[n] = true;
-				showColumn(n);
-				cols.push_back(n);
-			}
-		}
-	}
-	refresh();
-}
-
-void TeQtGrid::refresh()
-{
-	doRefresh_ = true;
-	update();
-}
-
-
-void TeQtGrid::promotePointedObjectsSlot()
-{
-	TeWaitCursor	wait;
-	gridToPortalRowVector_.clear();
-	string	oid, uid;
-	TeDatabasePortal* portal = db_->getPortal();
-	vector<int> notByPointingVector;
-
-	unsigned int i=0;
-    int gs;
-	if (portal->query(sql_))
-	{
-		while (portal->fetchRow())
-		{
-			gs = atoi(portal->getData(gridStatusPos_));
-			if(gs &= 0x1)
-				gridToPortalRowVector_.push_back(i);
-			else
-				notByPointingVector.push_back(i);
-			++i;
-		}
-	}
-	delete portal;
-
-	for (i = 0; i < notByPointingVector.size(); ++i)
-		gridToPortalRowVector_.push_back(notByPointingVector[i]);
-	
-	doRepaint_ = true;
-
-	int x = contentsX();
-	int y = rowPos(0);
-	setContentsPos(x, y);
-
-	refresh();
-}
-
-
-void TeQtGrid::promoteQueriedObjectsSlot()
-{
-	TeWaitCursor	wait;
-	gridToPortalRowVector_.clear();
-	string	oid, uid, val;
-	TeDatabasePortal* portal = db_->getPortal();
-	vector<int> notByQueryVector;
-
-	unsigned int i=0;
-    int gs;
-	if (portal->query(sql_))
-	{
-		while (portal->fetchRow())
-		{
-			val =  portal->getData(gridStatusPos_);
-			if(val.empty())
-				gs = atoi(portal->getData(resultIdPos_));
-			else
-				gs = atoi(val.c_str());
-
-			if(gs &= 0x2)
-				gridToPortalRowVector_.push_back(i);
-			else
-				notByQueryVector.push_back(i);
-			++i;
-		}
-	}
-	delete portal;
-
-	for (i = 0; i < notByQueryVector.size(); ++i)
-		gridToPortalRowVector_.push_back(notByQueryVector[i]);
-	
-	doRepaint_ = true;
-
-	int x = contentsX();
-	int y = rowPos(0);
-	setContentsPos(x, y);
-
-	refresh();
-}
-
-
-void TeQtGrid::sortAscOrderSlot()    
-{
-	vector<int>	v;
-
-	sort(v, "ASC");
-}
-
-
-void TeQtGrid::sortDescOrderSlot()    
-{
-	vector<int>	v;
-
-	sort(v, "DESC");
-}
-
-
-void TeQtGrid::sort(vector<int> cols, string order)
-{
-	unsigned int nc = numCols();
-	unsigned int n;
-	string uid, oid;
-
-	if (portal_ == 0)
-		return;
-
-
-	if (cols.size() == 0)
-	{
-		for(n = 0; n < nc; ++n)
-			if (isColumnSelected(n, true) == true)
-				cols.push_back(n);
-	}
-
-	if (cols.size() == 0)
-	{
-		QMessageBox::warning(this, tr("Warning"),
-			tr("Select the grid column(s) to be sorted!"));
-		return;
-	}
-
-	orderBy_.clear();
-	for (n=0; n<cols.size(); n++)
-		orderBy_ += (horizontalHeader()->label(cols[n]) + " ").latin1() + order + ",";
-	orderBy_.erase(orderBy_.size()-1, 1);
-	doRepaint_ = true;
-
-	portal_->freeResult();
-	sql_ = sqlJoin_ + " ORDER BY " + orderBy_;
-	if (portal_->query(sql_) == false)
-	{
-		delete portal_;
-		portal_ = 0;
-		return;
-	}
-
-	gridToPortalRowVector_.clear();
-	portalRow2UniqueIdVector_.clear();
-	int i = 0;
-	while(portal_->fetchRow())
-	{
-		uid = portal_->getData(uniqueIdPos_);
-		if(uid.empty() == false)
-			portalRow2UniqueIdVector_.push_back(uid);
-		else
-		{
-			oid = portal_->getData(objectIdPos_);
-			portalRow2UniqueIdVector_.push_back(oid);
-		}
-		gridToPortalRowVector_.push_back(i);
-		++i;
-	}
-
-	refresh();
-}
-
-
-TeTable& TeQtGrid::findTable(int col) // grid column
-{
-	unsigned int i;
-    int nCols;
-	static	TeTable t;
-
-	int portalCol = gridToPortalColVector_[col];
-	TeAttributeList attrList;
-	
-	nCols = 0;
-	for (i = 0; i < tableVector_.size(); ++i)
-	{
-		attrList = tableVector_[i].attributeList();
-		nCols += attrList.size();
-		if (portalCol < nCols)
-			break;				
-	}
-	if(i == tableVector_.size())
-		return t;
-	return tableVector_[i];	
-}
-
-TeTable& TeQtGrid::findTable(string  colName)
-{
-	int	i;
-	for(i=0; i<numCols(); i++)
-	{
-		string cname = horizontalHeader()->label(i).latin1();
-		if(cname == colName)
-			break;
-	}
-	return findTable(i);
-}
-
-
-void TeQtGrid::setVerticalEdition(bool flag)
-{
-	verticalEdition_ = flag;				
-}
-
-bool TeQtGrid::writeCell()
-{
-	string	val;
-	QString qs;
-	unsigned int i;
-
-	if(rowToEdit_ == -1 || colToEdit_ == -1)
-		return false;
-
-	int portalRowToEdit = gridToPortalRowVector_[rowToEdit_];
-	int portalColToEdit = gridToPortalColVector_[colToEdit_];
-	endEdit(rowToEdit_, colToEdit_, true, false);
-
-	int col = gridToPortalColVector_[colToEdit_];
-	if(isIndex(col))
-		return false;
-
-	string colName = horizontalHeader()->label(colToEdit_).latin1();
-	qs = text(rowToEdit_, colToEdit_);
-//	if(qs.isEmpty() && db_->dbmsName() == "Ado")
-//		return false;
-	if(qs.isEmpty() == false)
-		val = qs.latin1();
-
-	TeAttributeList	attrList = portal_->AttributeList();
-	TeAttrDataType type = attrList[portalColToEdit].rep_.type_;
-
-	if (portal_->fetchRow(portalRowToEdit) == false)
-		return false;
-
-	TeWaitCursor wait;
-	TeTable& tableToEdit = findTable(colToEdit_);
-	string tableName = tableToEdit.name();
-	string linkName;
-	if(tableToEdit.tableType() == TeAttrStatic || tableToEdit.tableType() == TeAttrEvent)
-		linkName = tableToEdit.linkName();
-	else
-		linkName = tableToEdit.uniqueName();
-
-	i = linkName.find(".");
-	if(i == string::npos)
-		linkName = tableName + "." + linkName;
-
-	string id = portal_->getData(linkName);
-
-	string qString = "UPDATE " + tableName;
-	if(val.empty())
-	{
-		qString += " SET " + colName + " = null";
-		qString += " WHERE " + linkName + " = '" + id + "'";
-	}
-	else
-	{
-		if (type == TeSTRING)
-		{
-			qString += " SET " + colName + " = '" + val;
-			qString += "' WHERE " + linkName + " = '" + id + "'";
-		}
-		else
-		{
-			qString += " SET " + colName + " = " + val;
-			qString += " WHERE " + linkName + " = '" + id + "'";
-		}
-	}
-
-	if (db_->execute(qString) == false)
-		return false;
-
-	if (db_->dbmsName() != "Ado")
-		arrangeGridToPortalRowVector(col);
-
-	return true;
-}
-
-
-void TeQtGrid::editNextRow()
-{
-	if (rowToEdit_ < numRows()-1)
-		++rowToEdit_;
-	else
-	{
-		rowToEdit_ = 0;
-		editNextColumn();
-	}
-}
-
-
-void TeQtGrid::editNextColumn()
-{
-	bool editavel = false;
-	while(editavel == false)
-	{
-		if (colToEdit_ == numCols()-1)
-		{
-			colToEdit_ = 0;
-			if (rowToEdit_ == numRows()-1)
-				rowToEdit_ = 0;
-			else
-				++rowToEdit_;
-		}
-		else
-			++colToEdit_;
-
-		int col = gridToPortalColVector_[colToEdit_];
-		if(isIndex(col))
-			editavel = false;
-		else
-			editavel = true;
-	}
-}
-
-void TeQtGrid::goToEditNewCell()
-{
-	int	x = contentsX();
-	int y = contentsY();
-
-	if(verticalEdition_ == true)
-		editNextRow();
-	else
-		editNextColumn();
-
-	if(rowToEdit_ >= fLine_)
-		y = rowPos(iLine_+1);
-	if(colToEdit_ >= fCol_)
-		x = columnPos(iCol_+1);
-
-	setContentsPos(x, y);
-	refresh();
-
-	int i = currEditRow();
-	int j = currEditCol();
-	if(i != rowToEdit_ || j != colToEdit_)
-	{
-		if(i > 0 && j > 0)
-			endEdit(i, j, true, true);
-		setEditMode(QTable::Editing, rowToEdit_, colToEdit_);
-		beginEdit(rowToEdit_, colToEdit_, false);
-	}
-}
-
-void TeQtGrid::removeQueryColorSlot()
-{
-	TeWaitCursor wait;
-
-	set<string> drawSet;
-	map<string, int>::iterator uit;
-
-	map<string, ObjectInfo>::iterator oit;
-	for(oit =  objectMap_.begin(); oit != objectMap_.end(); oit++)
-	{
-		ObjectInfo& info = oit->second;
-		if(info.status_ & 0x2)
-		{
-			for(uit = info.uniqueMap_.begin(); uit != info.uniqueMap_.end(); uit++)
-				uit->second &= 0x1;
-			info.status_ &= 0x1;
-			drawSet.insert(oit->first);
-		}
-	}
-
-	clearSelection(true);
-	refresh();
-	string s = "UPDATE " + theme_->collectionTable();
-	s += " SET c_object_status = 0 WHERE c_object_status = 2";
-	db_->execute(s);
-
-	s = "UPDATE " + theme_->collectionTable();
-	s += " SET c_object_status = 1 WHERE c_object_status = 3";
-	db_->execute(s);
-
-	s = "UPDATE " + theme_->collectionAuxTable();
-	s += " SET grid_status = 0 WHERE grid_status = 2";
-	db_->execute(s);
-
-	s = "UPDATE " + theme_->collectionAuxTable();
-	s += " SET grid_status = 1 WHERE grid_status = 3";
-	db_->execute(s);
-
-	emit putColorOnObject(theme_, drawSet);
-}
-
-
-void TeQtGrid::removePointingColorSlot()
-{
-	TeWaitCursor wait;
-
-	set<string> drawSet;
-	map<string, int>::iterator uit;
-
-	map<string, ObjectInfo>::iterator oit;
-	for(oit =  objectMap_.begin(); oit != objectMap_.end(); oit++)
-	{
-		ObjectInfo& info = oit->second;
-		if(info.status_ & 0x1)
-		{
-			for(uit = info.uniqueMap_.begin(); uit != info.uniqueMap_.end(); uit++)
-				uit->second &= 0x2;
-			info.status_ &= 0x2;
-			drawSet.insert(oit->first);
-		}
-	}
-
-	clearSelection(true);
-	refresh();
-	string s = "UPDATE " + theme_->collectionTable();
-	s += " SET c_object_status = 0 WHERE c_object_status = 1";
-	db_->execute(s);
-
-	s = "UPDATE " + theme_->collectionTable();
-	s += " SET c_object_status = 2 WHERE c_object_status = 3";
-	db_->execute(s);
-
-	s = "UPDATE " + theme_->collectionAuxTable();
-	s += " SET grid_status = 0 WHERE grid_status = 1";
-	db_->execute(s);
-
-	s = "UPDATE " + theme_->collectionAuxTable();
-	s += " SET grid_status = 2 WHERE grid_status = 3";
-	db_->execute(s);
-
-	emit putColorOnObject(theme_, drawSet);
-}
-
-
-void TeQtGrid::scrollToNextPointedObjectSlot()
-{
-	TeWaitCursor wait;
-
-	int	rowpos, portalpos, nrows = numRows();
-	int	x, y;
-	string oid, uid;
-
-	x = contentsX();
-	y = contentsY();
-	rowpos = rowAt(y);
-
-	if(rowpos == numRows() - 1)
-	{
-		wait.resetWaitCursor();
-		return;
-	}
-	rowpos++;
-
-	while(rowpos < nrows)
-	{
-		portalpos = gridToPortalRowVector_[rowpos];
-		portal_->fetchRow(portalpos);
-
-		oid = portal_->getData(objectIdPos_);
-		uid = portal_->getData(uniqueIdPos_);
-
-		ObjectInfo& info = objectMap_[oid];
-		int status = info.status_;
-		if(uid.empty() == false)
-			status = info.uniqueMap_[uid];
-
-
-		if (status & 0x1)
-			break;
-		rowpos++;
-	}
-
-
-	if (rowpos == nrows)
-	{
-		wait.resetWaitCursor();
-		return;
-	}
-
-	y = rowPos(rowpos);
-	setContentsPos (x, y);
-
-	clearSelection(true);
-	refresh();
-}
-
-
-void TeQtGrid::scrollToPrevPointedObjectSlot()
-{
-	TeWaitCursor wait;
-
-	int	rowpos, portalpos;
-	int	x, y;
-	string oid, uid;
-
-	x = contentsX();
-	y = contentsY();
-	rowpos = rowAt(y);
-
-	if(rowpos == 0)
-	{
-		wait.resetWaitCursor();
-		return;
-	}
-	rowpos--;
-
-	while(rowpos >= 0)
-	{
-		portalpos = gridToPortalRowVector_[rowpos];
-		portal_->fetchRow(portalpos);
-
-		oid = portal_->getData(objectIdPos_);
-		uid = portal_->getData(uniqueIdPos_);
-
-		ObjectInfo& info = objectMap_[oid];
-		int status = info.status_;
-		if(uid.empty() == false)
-			status = info.uniqueMap_[uid];
-
-		if (status & 0x1)
-			break;
-		rowpos--;
-	}
-
-
-	if (rowpos < 0)
-	{
-		wait.resetWaitCursor();
-		return;
-	}
-
-	y = rowPos(rowpos);
-	setContentsPos (x, y);
-
-	clearSelection(true);
-	refresh();
-}
-
-
-void TeQtGrid::scrollToNextQueriedObjectSlot()
-{
-	TeWaitCursor wait;
-
-	int	rowpos, portalpos, nrows = numRows();
-	int	x, y;
-	string oid, uid;
-
-	x = contentsX();
-	y = contentsY();
-	rowpos = rowAt(y);
-
-	if(rowpos == numRows() - 1)
-	{
-		wait.resetWaitCursor();
-		return;
-	}
-	rowpos++;
-
-	while(rowpos < nrows)
-	{
-		portalpos = gridToPortalRowVector_[rowpos];
-		portal_->fetchRow(portalpos);
-
-		oid = portal_->getData(objectIdPos_);
-		uid = portal_->getData(uniqueIdPos_);
-
-		ObjectInfo& info = objectMap_[oid];
-		int status = info.status_;
-		if(uid.empty() == false)
-			status = info.uniqueMap_[uid];
-
-		if (status & 0x2)
-			break;
-		rowpos++;
-	}
-
-
-	if (rowpos == nrows)
-	{
-		wait.resetWaitCursor();
-		return;
-	}
-
-	y = rowPos(rowpos);
-	setContentsPos (x, y);
-
-	clearSelection(true);
-	refresh();
-}
-
-
-void TeQtGrid::scrollToPrevQueriedObjectSlot()
-{
-	TeWaitCursor wait;
-
-	int	rowpos, portalpos;
-	int	x, y;
-	string oid, uid;
-
-	x = contentsX();
-	y = contentsY();
-	rowpos = rowAt(y);
-
-	if(rowpos == 0)
-	{
-		wait.resetWaitCursor();
-		return;
-	}
-	rowpos--;
-
-	while(rowpos >= 0)
-	{
-		portalpos = gridToPortalRowVector_[rowpos];
-		portal_->fetchRow(portalpos);
-
-		oid = portal_->getData(objectIdPos_);
-		uid = portal_->getData(uniqueIdPos_);
-
-		ObjectInfo& info = objectMap_[oid];
-		int status = info.status_;
-		if(uid.empty() == false)
-			status = info.uniqueMap_[uid];
-
-		if (status & 0x2)
-			break;
-		rowpos--;
-	}
-
-
-	if (rowpos < 0)
-	{
-		wait.resetWaitCursor();
-		return;
-	}
-
-	y = rowPos(rowpos);
-	setContentsPos (x, y);
-
-	clearSelection(true);
-	refresh();
-}
-
-void TeQtGrid::invertSelectionSlot()
-{
-	TeWaitCursor wait;
-
-	set<string> drawSet;
-	map<string, int>::iterator uit;
-	string oid, uid;
-
-	map<string, ObjectInfo>::iterator oit;
-	for(oit =  objectMap_.begin(); oit != objectMap_.end(); oit++)
-	{
-		ObjectInfo& info = oit->second;
-		if(info.status_ & 0x2)	//queried object -> sets it to selected
-		{
-			for(uit = info.uniqueMap_.begin(); uit != info.uniqueMap_.end(); uit++)
-				uit->second &= 0x1;
-			info.status_ &= 0x1;
-			for(uit = info.uniqueMap_.begin(); uit != info.uniqueMap_.end(); uit++)
-				uit->second |= 0x1;
-			info.status_ |= 0x1;
-		}
-		for(uit = info.uniqueMap_.begin(); uit != info.uniqueMap_.end(); uit++)
-			uit->second ^= 0x1;
-		info.status_ ^= 0x1;			 
-		drawSet.insert(oit->first);
-	}
-	refresh();
-	if (saveObjectStatus(theme_, drawSet, objectMap_) == false)
-	{
-		QMessageBox::critical(this, tr("Error"),
-			tr("Fail to update the \"c_legend_result\" and \"grid_status\" fields in the collection table!"));
-		return;
-	}
-	emit putColorOnObject(theme_, drawSet);
-}
-
-bool TeQtGrid::getVisColumn(int col)
-{
-	if(col < (int)gridColVisVector_.size())
-		return gridColVisVector_[col];
-	return false;
-}
-
-
-bool TeQtGrid::isIndex(int col) // portal column
-{
-	unsigned int i;
-	string cname = portal_->getAttribute(col).rep_.name_;
-
-	if(cname.find(".") == string::npos)
-	{
-		TeAttributeList attrList;		
-		int nCols = 0;
-		for (i = 0; i < tableVector_.size(); ++i)
-		{
-			attrList = tableVector_[i].attributeList();
-			nCols += attrList.size();
-			if (col < nCols)
-				break;				
-		}
-		
-		if(i>0)
-			cname.insert(0, tableVector_[(i-1)].name() + ".");
-	}
-
-	for(i=0; i<indexVector_.size(); i++)
-	{
-		string s = indexVector_[i];
-		if(s.find(cname, string::npos) != string::npos)
-			return true;
-	}
-	return false;
-}
-
-bool TeQtGrid::isDateTimeRegistered(int col) // portal column
-{
-	string cname = portal_->getAttribute(col).rep_.name_;
-	TeTable& t = findTable(cname);
-	string name = cname;
-	int f = name.find(".");
-	if(f >= 0)
-		name.erase(0, f+1);
-	if(t.attInitialTime() == name || t.attFinalTime() == name)
-		return true;
-	return false;
-}
-
-bool TeQtGrid::isSortBy(int col) // portal column
-{
-	string cname = portal_->getAttribute(col).rep_.name_;
-	cname += " ";
-
-	if(orderBy_.find(cname, string::npos) == string::npos)
-		return false;
-	return true;
-}
-
-bool TeQtGrid::isExternalTable(int col) // portal column
-{
-	unsigned int c;
-	for(c=0; c<gridToPortalColVector_.size(); c++)
-	{
-		if(gridToPortalColVector_[c] == col)
-			break;
-	}
-
-	TeTable& T = findTable(c);
-	if(T.tableType() == TeAttrExternal)
-		return true;
-	else
-		return false;
-}
-
-string TeQtGrid::getObject(int row)
-{
-	int portalpos = gridToPortalRowVector_[row];
-	portal_->fetchRow(portalpos);
-
-	string oid = portal_->getData(objectIdPos_);
-	return oid;
-}
-
-void TeQtGrid::gridInformation()
-{
-	if(showGridInformation_ == false)
-		return;
-
-	int orows = 0, opointed = 0, oqueried = 0, opqs = 0;
-	int pointed = 0, queried = 0, pqs = 0;
-	int rows = numRows();
-	map<string, ObjectInfo>::iterator it = objectMap_.begin();
-
-	while (it != objectMap_.end())
-	{
-		orows++;
-		ObjectInfo& info = it->second;
-		int leg_res = info.status_;
-		if(leg_res == 1)
-			opointed++;
-		else if(leg_res == 2)
-			oqueried++;
-		else if(leg_res == 3)
-		{
-			opointed++;
-			oqueried++;
-			opqs++;
-		}
-
-		map<string, int> uMap = info.uniqueMap_;
-		if(uMap.size())
-		{
-			map<string, int>::iterator uit = uMap.begin();
-			while(uit != uMap.end())
-			{
-				int gStatus = uit->second;
-				if(gStatus == 1)
-					pointed++;
-				else if(gStatus == 2)
-					queried++;
-				else if(gStatus == 3)
-				{
-					pointed++;
-					queried++;
-					pqs++;
-				}
-				uit++;
-			}
-		}
-		it++;
-	}
-
-	string sorows = Te2String(orows);
-	string sopointed = Te2String(opointed);
-	string soqueried = Te2String(oqueried);
-	string sopqs = Te2String(opqs);
-	string srows = Te2String(rows);
-	string spointed = Te2String(pointed);
-	string squeried = Te2String(queried);
-	string spqs = Te2String(pqs);
-
-	if(orows != rows || opointed != pointed || oqueried != queried || opqs != pqs)
-	{
-		sorows += "/" + srows;
-		sopointed += "/" + spointed;
-		soqueried += "/" + squeried;
-		sopqs += "/" + spqs;
-	}
-
-	QString msg = tr("Number of Rows:") + " " + sorows.c_str() + ", " + tr("Pointed:") + " " + sopointed.c_str();
-	msg += ", " + tr("Queried:") + " " + soqueried.c_str() + ", " + tr("Pointed and Queried:") + " " + sopqs.c_str();
-	emit displayGridInformation(msg);
-}
-
-void TeQtGrid::endEdit(int row, int col, bool accept, bool replace)
-{
-	if(accept && replace)
-		writeCell();
-	else
-		QTable::endEdit(row, col, accept, replace);
-}
-
-
-void TeQtGrid::columnWidthChanged(int col)
-{
-	if(doRepaint_)
-		refresh();
-	QTable::columnWidthChanged(col);
-}
-
-void TeQtGrid::insertObjectIntoCollection(string newId, string newTId)
-{
-	doRepaint_ = false;
-	ObjectInfo	info;
-
-	string oid = newId;
-	string uid = newId;
-	if(newTId.empty() == false)
-	{
-		uid += newTId;
-		info.uniqueMap_[uid] = 1;
-		unique2ObjectMap_[uid] = oid;
-	}
-	else
-	{
-		info.uniqueMap_[oid] = 1;
-		unique2ObjectMap_[oid] = oid;
-	}
-
-	info.status_ = 1;
-	objectMap_[oid] = info;
-
-	portalRow2UniqueIdVector_.push_back(uid);
-
-	int numRows = portalRow2UniqueIdVector_.size();
-	gridToPortalRowVector_.push_back(numRows - 1);
-	doRepaint_ = true;
-	setNumRows(numRows);
-}
-
-void TeQtGrid::deletePointedLines()
-{
-	doRepaint_ = false;
-	unsigned int	i, j;
-	string oid, uid;
-	vector<string> oidVec;
-	map<string, vector<string> > uidMap;
-
-	map<string, ObjectInfo>::iterator it = objectMap_.begin();
-	while(it != objectMap_.end())
-	{
-		ObjectInfo	info = (*it).second;
-		if(info.status_ == 1 || info.status_ == 3)
-		{
-			oid = (*it).first;
-			uid.clear();
-			map<string, int>::iterator uit = info.uniqueMap_.begin();
-			vector<string> uidVec;
-			while(uit != info.uniqueMap_.end())
-			{
-				if((*uit).second == 1 || (*uit).second == 3)
-				{
-					uid = (*uit).first;
-					uidVec.push_back(uid);
-				}
-				uit++;
-			}
-
-			if(uidVec.size() == 0)
-			{
-				uidVec.push_back(oid);
-			}
-			uidMap[oid] = uidVec;
-			oidVec.push_back(oid);
-		}
-		it++;
-	}
-
-	vector<string> iVec;
-	for(i=0; i<oidVec.size(); i++)
-	{
-		oid = oidVec[i];
-		ObjectInfo&	info = objectMap_[oid];
-		vector<string> uidVec = uidMap[oid];
-
-		for(j=0; j<uidVec.size(); j++)
-		{
-			string s = uidVec[j];
-			iVec.push_back(s);
-			info.uniqueMap_.erase(s);
-			unique2ObjectMap_.erase(s);
-		}
-		if(info.uniqueMap_.size() == 0)
-			objectMap_.erase(oid);
-	}
-
-	vector<int> jVec;
-	vector<string> copy1(portalRow2UniqueIdVector_.begin(), portalRow2UniqueIdVector_.end());
-	portalRow2UniqueIdVector_.clear();
-	for(i=0; i<copy1.size(); i++)
-	{
-		string ps = copy1[i];
-		for(j=0; j<iVec.size(); j++)
-		{
-			string s = iVec[j];
-			if(ps == s)
-			{
-				jVec.push_back(i);
-				break;
-			}
-		}
-		if(j == iVec.size())
-			portalRow2UniqueIdVector_.push_back(ps);
-	}
-
-	vector<int> copy2(gridToPortalRowVector_.begin(), gridToPortalRowVector_.end());
-	gridToPortalRowVector_.clear();
-	for(i=0; i<copy2.size(); i++)
-	{
-		int ps = copy2[i];
-		for(j=0; j<jVec.size(); j++)
-		{
-			int s = jVec[j];
-			if(ps == s)
-				break;
-		}
-		if(j == jVec.size())
-			gridToPortalRowVector_.push_back(ps);
-	}
-
-	for(i=jVec.size()-1; (int)i>=0; i--)
-	{
-		int s = jVec[i];
-		for(j=0; j<gridToPortalRowVector_.size(); j++)
-		{
-			int ss = gridToPortalRowVector_[j];
-			if(ss >= s)
-				gridToPortalRowVector_[j] = ss - 1;
-		}
-	}
-
-	int numRows = portalRow2UniqueIdVector_.size();
-	doRepaint_ = true;
-	setNumRows(numRows);
-}
-
-bool TeQtGrid::hasPointedLine()
-{
-	map<string, ObjectInfo>::iterator it = objectMap_.begin();
-
-	while(it != objectMap_.end())
-	{
-		ObjectInfo	info = (*it).second;
-		if(info.status_ == 1 || info.status_ == 3)
-			return true;
-		it++;
-	}
-
-	return false;
-}
-
-void TeQtGrid::goToLastLine()
-{
-	int nRows = numRows();
-	int iniRow = nRows - visibleLines_;
-
-	doRepaint_ = true;
-	int x = columnAt(gridX_);
-	int y = rowPos(iniRow);
-	setContentsPos(x, y);
-	refresh();
-}
-
-void TeQtGrid::goToLastColumn()
-{
-	int x = contentsWidth() - visibleWidth();
-
-	doRepaint_ = true;
-	int y = contentsY();
-	setContentsPos(x, y);
-	refresh();
-}
-
-vector<int> TeQtGrid::getSelectedColumns()
-{
-	int i, j;
-	vector<int> colVec;
-
-	for (i = 0; i < numCols(); i++)
-	{
-		if(gridColVisVector_[i])
-		{
-			if (isColumnSelected(i, true) == true)
-			{
-				j = gridToPortalColVector_[i];
-				colVec.push_back(j);
-			}
-		}
-	}
-	return colVec;
-}
-
-void TeQtGrid::arrangeColumns(TeAttrTableVector cTableVec)
-{
-	int	i, j, k, m;
-	TeAttributeList CAL;
-	TeAttributeList	AL;
-	vector<int> cVec;
-
-	for(i=m=0; (unsigned int)i<cTableVec.size(); i++)
-	{
-		TeTable ct = cTableVec[i];
-		CAL = ct.attributeList();
-
-		TeTable t = tableVector_[i];
-		AL = t.attributeList();
-
-		if(AL.size() > CAL.size())
-		{
-			for(j=0; (unsigned int)j<AL.size(); j++, m++)
-			{
-				TeAttribute a = AL[j];
-				for(k=0; (unsigned int)k<CAL.size(); k++)
-				{
-					TeAttribute ca = CAL[k];
-					if(TeConvertToUpperCase(a.rep_.name_) == TeConvertToUpperCase(ca.rep_.name_))
-						break;
-				}
-				if((unsigned int)k == CAL.size())
-					cVec.push_back(m);
-			}
-		}
-		else if(AL.size() < CAL.size())
-		{
-			for(j=0; (unsigned int)j<CAL.size(); j++, m++)
-			{
-				TeAttribute a = CAL[j];
-				for(k=0; (unsigned int)k<AL.size(); k++)
-				{
-					TeAttribute ca = AL[k];
-					if(TeConvertToUpperCase(a.rep_.name_) == TeConvertToUpperCase(ca.rep_.name_))
-						break;
-				}
-				if((unsigned int)k == AL.size())
-					cVec.push_back(m);
-			}
-		}
-		else
-			m += (int)AL.size();
-	}
-
-	TeAttributeList attrList = portal_->AttributeList();
-	int nCols = numCols();
-	int nOldCols = gridColVisVector_.size();
-	vector<bool> cVisVec(gridColVisVector_.begin(), gridColVisVector_.end());
-	vector<int> cSwapVec(gridToPortalColVector_.begin(), gridToPortalColVector_.end());
-	gridColVisVector_.clear();
-	gridToPortalColVector_.clear();
-
-	bool added = false;
-	if(nCols > nOldCols)
-		added = true;
-
-	std::sort(cVec.begin(), cVec.end());
-	if(cVec.size())
-	{
-		if(added)
-		{
-			for(i=nOldCols; i<nCols; i++)
-				cVisVec.push_back(true);
-			gridColVisVector_ = vector<bool>(cVisVec.begin(), cVisVec.end());
-
-			for(i=0; (unsigned int)i<cVec.size(); i++)
-			{
-				k = cVec[i];
-				for(j=0; (unsigned int)j<cSwapVec.size(); j++)
-				{
-					int v = cSwapVec[j];
-					if(v >= k)
-						cSwapVec[j] = v + 1;
-				}
-				cSwapVec.push_back(k);
-			}
-			gridToPortalColVector_ = vector<int>(cSwapVec.begin(), cSwapVec.end());
-		}
-		else
-		{
-			for(i=j=0; (unsigned int)i<cVec.size(); i++)
-			{
-				k = cVec[i];
-				while(j < k)
-				{
-					bool b = cVisVec[j];
-					gridColVisVector_.push_back(b);
-					j++;
-				}
-				j = k + 1;
-			}
-			while((unsigned int)j < cVisVec.size())
-			{
-				bool b = cVisVec[j];
-				gridColVisVector_.push_back(b);
-				j++;
-			}
-
-			for(i=0; (unsigned int)i<cVec.size(); i++)
-			{
-				k = cVec[i];
-				for(j=0; (unsigned int)j<cSwapVec.size(); j++)
-				{
-					int kk = cSwapVec[j];
-					if(kk != k)
-						gridToPortalColVector_.push_back(kk);
-				}
-				cSwapVec.clear();
-				cSwapVec = vector<int>(gridToPortalColVector_.begin(), gridToPortalColVector_.end());
-				gridToPortalColVector_.clear();
-			}
-
-			for(i = (int)cVec.size() - 1; i>=0; i--)
-			{
-				k = cVec[i];
-				for(j=0; (unsigned int)j<cSwapVec.size(); j++)
-				{
-					int v = cSwapVec[j];
-					if(v >= k)
-						cSwapVec[j] = v - 1;
-				}
-			}
-			gridToPortalColVector_ = vector<int>(cSwapVec.begin(), cSwapVec.end());
-		}
-	}
-	else
-	{
-		// Set the vector that will contain the order the
-		// grid columns will be shown
-		gridToPortalColVector_.clear();
-		gridColVisVector_.clear();
-		for (i = 0; i < nCols; i++)
-		{
-			gridToPortalColVector_.push_back(i);
-			gridColVisVector_.push_back(true);
-		}
-	}
-}
-
-void TeQtGrid::arrangeGridToPortalRowVector(int col)
-{
-	int i, p, pp;
-	string id, s, ss;
-
-	portal_->freeResult();
-	if (!portal_->query(sql_))
-	{
-		delete portal_;
-		portal_ = 0;
-		return;
-	}
-
-	if(isSortBy(col) == false)
-		return;
-
-	vector<int> cGridToPortal(gridToPortalRowVector_.begin(), gridToPortalRowVector_.end());
-	vector<string> cPortalToUnique(portalRow2UniqueIdVector_.begin(), portalRow2UniqueIdVector_.end());
-	gridToPortalRowVector_.clear();
-	portalRow2UniqueIdVector_.clear();
-
-	while (portal_->fetchRow())
-	{
-		id = portal_->getData(uniqueIdPos_);
-		if(id.empty())
-			id = portal_->getData(objectIdPos_);
-		portalRow2UniqueIdVector_.push_back(id);
-	}
-
-	vector<string>::iterator it;
-	for(i=0; (unsigned int)i<cGridToPortal.size(); i++)
-	{
-		p = cGridToPortal[i];
-		s = cPortalToUnique[p];
-		ss = portalRow2UniqueIdVector_[p];
-		if(s == ss)
-			gridToPortalRowVector_.push_back(p);
-		else
-		{
-			it = std::find(portalRow2UniqueIdVector_.begin(), portalRow2UniqueIdVector_.end(), s);
-			if(it != portalRow2UniqueIdVector_.end())
-				pp = it - portalRow2UniqueIdVector_.begin();
-
-			gridToPortalRowVector_.push_back(pp);
-		}
-	}
-}
-
-void TeQtGridItem::paint(QPainter* p, const QColorGroup& cg,
-						 const QRect& cr, bool selected)
-{
-    QColorGroup g(cg);
-	g.setColor( QColorGroup::Base, color_);
-	QTableItem :: paint(p, g, cr, selected);
-}
-
-
-
-
-
diff --git a/src/terralib/application/qt/TeQtGrid.h b/src/terralib/application/qt/TeQtGrid.h
deleted file mode 100644
index ff89198..0000000
--- a/src/terralib/application/qt/TeQtGrid.h
+++ /dev/null
@@ -1,251 +0,0 @@
-/************************************************************************************
-TerraView - visualization and exploration of geographical databases
-using TerraLib.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-This file is part of TerraView. TerraView is free software; you can redistribute it 
-and/or modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-You should have received a copy of the GNU General Public License
-along with TerraView.
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The software provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use of
-this program and its documentation.
-*************************************************************************************/
-
-#ifndef  __TERRALIB_INTERNAL_QTGRID_H
-#define  __TERRALIB_INTERNAL_QTGRID_H
-
-#include <qwidget.h>
-#include <qtable.h>
-#include <qcolor.h> 
-#include <qlabel.h>
-#include <qpopupmenu.h>
-#include <vector>
-#include <map>
-#include <set>
-#include <string>
-#include "TeDatabase.h"
-#include "TeThemeApplication.h"
-#include "TeApplicationUtils.h"
-
-using namespace std;
-
-class TeQtGrid : public QTable
-{
-	Q_OBJECT
-
-protected:
-	TeDatabase				*db_;
-	TeThemeApplication		*theme_;
-	TeDatabasePortal		*portal_;
-	string					sqlJoin_;
-	string					orderBy_;
-	string					sql_;
-	string					CT_;
-	string					CTE_;
-	vector<string>			indexVector_;
-	vector<TeTable>			tableVector_;
-	bool					editing_;
-	bool					doRefresh_;
-	bool					doRepaint_;
-	bool					shiftKeyPressed_;
-	bool					showGridInformation_;
-	int						uniqueIdPos_;
-	int						objectIdPos_;
-	int						resultIdPos_;
-	int						gridStatusPos_;
-	int						gridX_, gridY_;
-	int						iLine_, fLine_;
-	int						iCol_, fCol_;
-	int						gridWidth_, gridHeight_;
-	int						visibleLines_, visibleCols_;
-	long					lastLinePressed_;
-	long					dragLineReleased_;
-	map<string, ObjectInfo>	objectMap_;
-	map<string, string>		unique2ObjectMap_;
-	vector<int>				gridToPortalRowVector_;
-	vector<int>				gridToPortalColVector_;
-	vector<bool>			gridColVisVector_;
-	vector<string>			portalRow2UniqueIdVector_;
-	int						rowToEdit_;
-	int						colToEdit_;
-	bool					verticalEdition_;
-	QPopupMenu				*popupHorizHeader_;
-	QPopupMenu				*popupVertHeader_;
-	QPopupMenu				*popupViewport_;
-	bool					columnDragEnabled_;
-	bool					mousePressedOnHorizontalHeader_;
-
-	virtual bool eventFilter(QObject*, QEvent*);
-
-	virtual void drawContents (QPainter *qp, int clipx, int clipy,
-							   int clipw, int cliph);
-
-	void sort(vector<int> cols, string order);
-
-	bool writeCell();
-
-	void editNextRow();
-
-	void editNextColumn();
-	
-	void update();
-
-	void goToEditNewCell();
-
-	virtual void endEdit(int row, int col, bool accept, bool replace);
-
-	void arrangeColumns(TeAttrTableVector cTableVec);
-	
-public:
-
-	bool autoPromote_;
-
-	TeQtGrid (QWidget* parent = 0, const char* name = 0);
-
-	~TeQtGrid();
-
-	void init(TeThemeApplication *theme);
-
-	void initPortal();
-
-	void updatePortalContents();
-
-	QPopupMenu* popupHorizHeader()
-		{ return popupHorizHeader_; }
-
-	QPopupMenu* popupVertHeader()
-		{ return popupVertHeader_; }
-
-	QPopupMenu* popupViewport()
-		{ return popupViewport_; }
-
-	TeDatabasePortal* getPortal()
-		{ return portal_; }
-	TeThemeApplication* getTheme() 
-    {  return theme_;} 
-
-
-	bool isIndex(int col);
-
-	bool isDateTimeRegistered(int col);
-
-	bool isSortBy(int col);
-
-	bool isExternalTable(int col);
-
-	TeTable& findTable(int col);
-
-	TeTable& findTable(string colName);
-
-	void adjustColumns();
-
-	void swapColumns(int col1 = -1, int col2 = -1);
-
-	int	getColumn(int col) {return gridToPortalColVector_[col];}
-
-	void setVisColumn (bool vis, int col=-1);
-
-	bool getVisColumn (int col);
-
-	void putColorOnGrid(set<string> uniqueIdSet, set<string> objectIdSet, string operation, string attrQuery = "");
-
-	void setVerticalEdition(bool flag);
-
-	void refresh();
-
-	void clear();
-
-	void clearPortal();
-
-	string	getObject(int row);
-
-	bool isVerticalEdition() { return verticalEdition_; }
-
-	bool showGridInformation() { return showGridInformation_;}
-
-	void showGridInformation(bool b) { showGridInformation_ = b;}
-
-	void gridInformation ();
-
-	void insertObjectIntoCollection(string newId, string newTId = "");
-
-	void goToLastLine();
-
-	void goToLastColumn();
-
-	bool hasPointedLine();
-
-	void deletePointedLines();
-
-	vector<int> getSelectedColumns();
-
-	void arrangeGridToPortalRowVector(int col);
-
-public slots:
-	void mouseReleasedOnVerticalHeaderSlot(int lin);
-
-	void promotePointedObjectsSlot();
-
-	void promoteQueriedObjectsSlot();
-
-	void sortAscOrderSlot();
-
-	void sortDescOrderSlot();
-
-	void removeQueryColorSlot();
-
-	void removePointingColorSlot();
-
-	void scrollToPrevPointedObjectSlot();
-
-	void scrollToNextPointedObjectSlot();
-
-	void scrollToPrevQueriedObjectSlot();
-
-	void scrollToNextQueriedObjectSlot();
-
-	void invertSelectionSlot();
-
-protected slots:
-	void columnWidthChanged(int col);
-
-signals:
-	void putColorOnObject(TeThemeApplication*, set<string>&);
-	void horizHeaderSignal(int);
-	void vertHeaderSignal(int);
-	void viewportSignal();
-	void vertHeaderLeftDblClickSignal(int);
-	void linkTable(string, string, string);
-	void gridChangedSignal();
-	void displayGridInformation(QString);
-	void clearGridInformation();
-};
-
-
-
-
-class TeQtGridItem : public QTableItem
-{
-	QColor color_;
-
-public:
-    TeQtGridItem(QTable *t, EditType et, const QString &txt)
-		: QTableItem( t, et, txt )
-	{}
-
-	void setColor(QColor& c)
-	{ color_.setRgb(c.red(), c.green(), c.blue()); }
-
-    void paint(QPainter *p, const QColorGroup &cg,
-		       const QRect &cr, bool selected );
-};
-
-#endif
diff --git a/src/terralib/application/qt/TeQtLayerItem.cpp b/src/terralib/application/qt/TeQtLayerItem.cpp
deleted file mode 100644
index 12b8c57..0000000
--- a/src/terralib/application/qt/TeQtLayerItem.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-/************************************************************************************
-TerraView - visualization and exploration of geographical databases
-using TerraLib.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-This file is part of TerraView. TerraView is free software; you can redistribute it 
-and/or modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-You should have received a copy of the GNU General Public License
-along with TerraView.
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The software provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use of
-this program and its documentation.
-*************************************************************************************/
-
-#include <TeQtLayerItem.h>
-#include <qpixmap.h>
-#include <images/infolayer.xpm>
-
-
-//Layer item constructor
-TeQtLayerItem::TeQtLayerItem(QListViewItem *parent, 
-		QString name, TeLayer* layer)
-		: TeQtCheckListItem(parent,name), layer_(layer) 
-{
-	type_ = INFOLAYER;
-	QPixmap p(infolayer_xpm);
-	setPixmap(0,p);
-	setRenameEnabled(0,true);
-	sortChildItems(0, true);
-	setSelected(false);
-	setEnabled(true);
-}
-
-
-
-				
diff --git a/src/terralib/application/qt/TeQtLayerItem.h b/src/terralib/application/qt/TeQtLayerItem.h
deleted file mode 100644
index 8410d7d..0000000
--- a/src/terralib/application/qt/TeQtLayerItem.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/************************************************************************************
-TerraView - visualization and exploration of geographical databases
-using TerraLib.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-This file is part of TerraView. TerraView is free software; you can redistribute it 
-and/or modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-You should have received a copy of the GNU General Public License
-along with TerraView.
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The software provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use of
-this program and its documentation.
-*************************************************************************************/
-
-#ifndef  __TERRALIB_INTERNAL_QTLAYERITEM_H
-#define  __TERRALIB_INTERNAL_QTLAYERITEM_H
-
-#include <TeQtCheckListItem.h>
-
-class TeLayer;
-
-
-class TeQtLayerItem : public TeQtCheckListItem
-{
-public:
-    TeQtLayerItem(QListViewItem *parent, QString text, TeLayer* layer);
-
-	~TeQtLayerItem () {}
-
-	int compare(QListViewItem * i, int col, bool ascending) const
-		{ return QListViewItem::compare(i, col, ascending); }
-
-	QString key(int col, bool ascending) const
-		{ return QListViewItem::key(col, ascending); }
-
-	TeLayer* getLayer() {return layer_;}
-
-protected:
-	TeLayer	*layer_;
-};
-
-#endif
diff --git a/src/terralib/application/qt/TeQtLegendItem.cpp b/src/terralib/application/qt/TeQtLegendItem.cpp
deleted file mode 100644
index 9167c6c..0000000
--- a/src/terralib/application/qt/TeQtLegendItem.cpp
+++ /dev/null
@@ -1,319 +0,0 @@
-/************************************************************************************
-TerraView - visualization and exploration of geographical databases
-using TerraLib.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-This file is part of TerraView. TerraView is free software; you can redistribute it 
-and/or modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-You should have received a copy of the GNU General Public License
-along with TerraView.
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The software provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use of
-this program and its documentation.
-*************************************************************************************/
-
-#include <TeQtLegendItem.h>
-#include <TeQtViewsListView.h>
-#include <TeLegendEntry.h>
-#include <qpixmap.h>
-#include <qpainter.h>
-#include <qbitmap.h>
-#include <qimage.h>
-
-
-//Legend item constructor
-TeQtLegendItem::TeQtLegendItem(QListViewItem *parent,
-				QString text, TeLegendEntry *legendEntry)
-	: TeQtCheckListItem(parent, text), legendEntry_(legendEntry)
-{
-	type_ = LEGEND;
-	setRenameEnabled(0,true);
-	setSelected(false);
-	setEnabled(true);
-
-	order_ = parent->childCount();
-
-	if (legendEntry_ != 0)
-		createPixmap();
-}
-
-
-void TeQtLegendItem::createPixmap()
-{
-	int	ww = 21;
-	int	pixh = 16;
-	int	pixw = ww;
-
-	QPixmap	pixmap(ww, pixh);
-	pixmap.fill();
-
-// TePOLYGONS = 1, TeLINES = 2, TePOINTS = 4, TeCELLS = 256
-	bool hasPolygons = true;
-	bool hasCells = true;
-	bool hasLines = true;
-	bool hasPoints = true;
-
-	if(legendEntry_->to().find("mean = ") == string::npos)
-	{
-		TeGeomRepVisualMap vm = legendEntry_->getVisualMap();
-		if(vm.find(TePOLYGONS) == vm.end())
-		{
-			hasPolygons = false;
-			hasCells = false;
-		}
-		if(vm.find(TeLINES) == vm.end())
-			hasLines = false;
-		if(vm.find(TePOINTS) == vm.end())
-			hasPoints = false;
-
-		if ((hasPolygons || hasCells) && (hasLines == false) && (hasPoints == false))
-			drawPolygonRep(pixw, pixh, 0, &pixmap);
-		else if ((hasPolygons || hasCells) && (hasLines == true) && (hasPoints == false))
-		{
-			pixmap.resize(2*ww, pixh);
-			pixmap.fill();
-			drawPolygonRep(pixw, pixh, 0, &pixmap);
-			drawLineRep(pixw, pixh, ww, &pixmap);
-		}
-		else if ((hasPolygons || hasCells) && (hasLines == false) && (hasPoints == true))
-		{
-			pixmap.resize(2*ww, pixh);
-			pixmap.fill();
-			drawPolygonRep(pixw, pixh, 0, &pixmap);
-			drawPointRep(pixw, pixh, ww, &pixmap);
-		}
-		else if ((hasPolygons || hasCells) && (hasLines == true) && (hasPoints == true))
-		{
-			pixmap.resize(3*ww, pixh);
-			pixmap.fill();
-			drawPolygonRep(pixw, pixh, 0, &pixmap);
-			drawLineRep(pixw, pixh, ww, &pixmap);
-			drawPointRep(pixw, pixh, 2*ww, &pixmap);
-		}
-		else if (hasPolygons == false && hasCells == false && hasLines == true && hasPoints == false)
-			drawLineRep(pixw, pixh, 0, &pixmap);
-		else if (hasPolygons == false && hasCells == false && hasLines == false && hasPoints == true)
-			drawPointRep(pixw, pixh, 0, &pixmap);
-		else if (hasPolygons == false && hasCells == false && hasLines == true && hasPoints == true)
-		{
-			pixmap.resize(2*ww, pixh);
-			pixmap.fill();
-			drawLineRep(pixw, pixh, 0, &pixmap);
-			drawPointRep(pixw, pixh, ww, &pixmap);
-		}
-	}
-	setPixmap(0, pixmap);
-}
-
-
-void TeQtLegendItem::changeVisual(TeLegendEntry *legendEntry)
-{
-	legendEntry_ = legendEntry;
-	createPixmap();
-}
-
-
-void TeQtLegendItem::drawPolygonRep(int w, int h, int offset, QPixmap *pixmap)
-{
-	QPainter p(pixmap);
-	QBrush	 brush;
-	QColor	 cor;
-	TeColor	 tcor;
-	Qt::BrushStyle	style;
-
-	TeVisual& visual = legendEntry_->visual(TePOLYGONS);
-	int transp = 255 - (visual.transparency() * 255 / 100);
-	tcor = visual.color();
-	cor.setRgb(tcor.red_, tcor.green_, tcor.blue_);
-	TeQtViewsListView* viewsListView = (TeQtViewsListView*) listView();
-	map<TePolyBasicType, Qt::BrushStyle>& brushMap = viewsListView->getBrushStyleMap();
-
-	style = brushMap[(TePolyBasicType)(legendEntry_->visual(TePOLYGONS).style())];
-	brush.setStyle(style);
-	brush.setColor(cor);
-
-	QRect trect(offset+1, 1, w-2, h-2);
-	QRect rect(0, 0, offset+w-1, h-1);
-
-	int width = rect.width();
-	int height = rect.height();
-
-	int r = width%8;
-	if(r)
-		width += (8-r);
-	r = height%8;
-	if(r)
-		height += (8-r);
-
-	if(width == 0)
-		width = 8;
-	if(height == 0)
-		height = 8;
-
-	QBitmap	bm;
-	bm.resize(width, height);
-	//Fill bitmap with 0-bits: clipping region
-	bm.fill(Qt::color0);
-	QPainter maskPainter(&bm);
-
-	// Draw bitmap with 1-bits: drawing region
-	QBrush bs(Qt::color1, style);
-	QPen pen(Qt::color1, 1);
-	maskPainter.setPen(pen);
- 	maskPainter.fillRect(trect, bs);
-	maskPainter.end();
-
-	QRegion clipRegion(bm);
-	p.setClipRegion(clipRegion);
-
-	if(visual.transparency() == 0)
-		p.fillRect(trect, brush);
-	else
-	{
-		// set alpha buffer and color
-		QImage img(rect.width(), rect.height(), 32);
-		unsigned int val = (transp << 24) | (cor.red() << 16) | (cor.green() << 8) | cor.blue();
-		img.fill(val);
-		img.setAlphaBuffer(true);
-
-		// plot transparency
-		p.drawPixmap(trect.x(), trect.y(), img);
-	}
-	p.setClipping(false);
-
-	Qt::PenStyle pstyle;
-	uint		pwidth;
-
-	tcor = visual.contourColor();
-	cor.setRgb(tcor.red_, tcor.green_, tcor.blue_);
-	pen.setColor(cor);
-
-	map<TeLnBasicType, Qt::PenStyle>& penMap = viewsListView->getPenStyleMap();
-	pstyle = penMap[(TeLnBasicType)(visual.contourStyle())];
-	pen.setStyle(pstyle);
-
-	pwidth = (Qt::PenStyle) visual.contourWidth();
-	pen.setWidth (pwidth);
-
-	p.setPen(pen);
-	p.drawRect (offset+1+pwidth/2,1+pwidth/2,w-2-pwidth/2,h-2-pwidth/2);
-
-	p.end();
-}
-
-void TeQtLegendItem::drawLineRep( int w, int h, int offset, QPixmap *pixmap)
-{
-	QPainter	p(pixmap);
-	QPen		pen;
-	QColor		cor;
-	TeColor		tcor;
-	Qt::PenStyle style;
-	uint		width;
-
-	TeVisual& visual = legendEntry_->visual(TeLINES);
-
-	tcor = visual.color();
-	cor.setRgb(tcor.red_, tcor.green_, tcor.blue_);
-	pen.setColor(cor);
-
-	TeQtViewsListView* viewsListView = (TeQtViewsListView*) listView();
-	map<TeLnBasicType, Qt::PenStyle>& penMap = viewsListView->getPenStyleMap();
-
-	style = penMap[(TeLnBasicType)(legendEntry_->visual(TeLINES).style())];
-	pen.setStyle(style);
-
-	width = (Qt::PenStyle) legendEntry_->visual(TeLINES).width();
-	pen.setWidth (width);
-
-	p.setPen(pen);
-	p.moveTo(offset+1, h-2);
-	p.lineTo(offset+w/3, 1);
-	p.lineTo(offset+w/3*2, h-3);
-	p.lineTo(offset+w-2, 1);
-	p.end();
-}
-
-
-void TeQtLegendItem::drawPointRep( int pw, int ph, int offset, QPixmap *pixmap)
-{
-	QPainter	painter(pixmap);
-	QColor		cor;
-	TeColor		tcor;
-
-	TeVisual& visual = legendEntry_->visual(TePOINTS);
-	tcor = visual.color();
-	cor.setRgb(tcor.red_, tcor.green_, tcor.blue_);
-	int s = visual.style();
-
-	int	w = visual.size();
-	QPoint	p;
-	p.setX(offset+pw/2);
-	p.setY(ph/2-1);
-
-	painter.setPen(cor);
-	if (s == TePtTypePlus)
-	{
-		painter.drawLine (p.x()-w/2,p.y(),p.x()+w/2,p.y());
-		painter.drawLine (p.x(),p.y()-w/2,p.x(),p.y()+w/2);
-	}
-	else if (s == TePtTypeStar)
-	{
-		painter.save ();
-		painter.translate (p.x(),p.y());
-		painter.drawLine (0,-w/2,0,w/2);
-		painter.rotate (45);
-		painter.drawLine (0,-w/2,0,w/2);
-		painter.rotate (-90);
-		painter.drawLine (0,-w/2,0,w/2);
-		painter.restore ();
-	}
-	else if (s == TePtTypeCircle)
-	{
-		painter.setBrush(cor);
-		painter.drawChord (p.x()-w/2,p.y()-w/2,w,w,0,360*16);
-	}
-	else if (s == TePtTypeX)
-	{
-		painter.drawLine (p.x()-w/2,p.y()-w/2,p.x()+w/2,p.y()+w/2);
-		painter.drawLine (p.x()-w/2,p.y()+w/2,p.x()+w/2,p.y()-w/2);
-	}
-	else if (s == TePtTypeBox)
-	{
-		painter.fillRect (p.x()-w/2,p.y()-w/2,w,w,cor);
-	}
-	else if (s == TePtTypeDiamond)
-	{
-		QPointArray pa(5);
-		pa.setPoint(0, p.x()-w/2, p.y());
-		pa.setPoint(1, p.x(), p.y()-w/2);
-		pa.setPoint(2, p.x()+w/2, p.y());
-		pa.setPoint(3, p.x(), p.y()+w/2);
- 		pa.setPoint(4, p.x()-w/2, p.y());
-		painter.setBrush(cor);
-		painter.drawPolygon(pa);
-	}
-	else if (s == TePtTypeHollowCircle)
-	{
-		painter.drawArc (p.x()-w/2,p.y()-w/2,w,w,0,360*16);
-	}
-	else if (s == TePtTypeHollowBox)
-	{
-		painter.setBrush(Qt::NoBrush);
-		painter.drawRect (p.x()-w/2,p.y()-w/2,w,w);
-	}
-	else if (s == TePtTypeHollowDiamond)
-	{
-		painter.drawLine (p.x()-w/2,p.y(),p.x(),p.y()-w/2);
-		painter.drawLine (p.x(),p.y()-w/2,p.x()+w/2,p.y());
-		painter.drawLine (p.x()+w/2,p.y(),p.x(),p.y()+w/2);
-		painter.drawLine (p.x(),p.y()+w/2,p.x()-w/2,p.y());
-	}
-	painter.end();
-}
diff --git a/src/terralib/application/qt/TeQtLegendItem.h b/src/terralib/application/qt/TeQtLegendItem.h
deleted file mode 100644
index a21ba3f..0000000
--- a/src/terralib/application/qt/TeQtLegendItem.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/************************************************************************************
-TerraView - visualization and exploration of geographical databases
-using TerraLib.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-This file is part of TerraView. TerraView is free software; you can redistribute it 
-and/or modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-You should have received a copy of the GNU General Public License
-along with TerraView.
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The software provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use of
-this program and its documentation.
-*************************************************************************************/
-
-#ifndef  __TERRALIB_INTERNAL_QTLEGENDITEM_H
-#define  __TERRALIB_INTERNAL_QTLEGENDITEM_H
-
-#include <TeQtCheckListItem.h>
-
-class TeLegendEntry;
-
-
-class TeQtLegendItem : public TeQtCheckListItem
-{
-public:
-    TeQtLegendItem(QListViewItem *parent, QString text, TeLegendEntry *legendEntry);
-
-	~TeQtLegendItem() {}
-
-	TeLegendEntry* legendEntry()
-		{ return legendEntry_; }
-
-	void changeVisual(TeLegendEntry *legendEntry);
-
-protected:
-	TeLegendEntry *legendEntry_;
-
-	void createPixmap();
-
-	void drawPolygonRep(int w, int h, int offset, QPixmap *pixmap);
-
-	void drawLineRep(int w, int h, int offset, QPixmap *pixmap);
-
-	void drawPointRep(int w, int h, int offset, QPixmap *pixmap);
-};
-
-
-class TeQtLegendTitleItem : public TeQtCheckListItem
-{
-public:
-    TeQtLegendTitleItem(QListViewItem *parent, QString text)
-	: TeQtCheckListItem(parent, text)
-	{
-		type_ = LEGENDTITLE;
-		setRenameEnabled(0,true);
-		order_ = parent->childCount();
-	}
-
-	~TeQtLegendTitleItem() {}
-};
-
-
-
-#endif
diff --git a/src/terralib/application/qt/TeQtMethods.cpp b/src/terralib/application/qt/TeQtMethods.cpp
deleted file mode 100644
index 961cf06..0000000
--- a/src/terralib/application/qt/TeQtMethods.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-/************************************************************************************
-TerraView - visualization and exploration of geographical databases
-using TerraLib.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-This file is part of TerraView. TerraView is free software; you can redistribute it 
-and/or modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-You should have received a copy of the GNU General Public License
-along with TerraView.
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The software provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use of
-this program and its documentation.
-*************************************************************************************/
-
-
-#include "TeSTElementSet.h"
-#include "TeQtMethods.h"
-#include "TeSkaterFunctions.h"
-#include "TeQtTerraStat.h"
-#include "TeQtGrid.h"
-#include "TeSTEFunctionsDB.h"
-#include <qobject.h>
-#include <qapplication.h>
-
-/////////////////////////////////////////////////////////////////////////////////////
-
-
-bool TeSkaterMethod::apply(vector<double>& het) {
-
-
-
-  if (this->hasPop_) {
-    this->attrVector_.push_back(this->attrPop_);
-  }
-
-  TeSTElementSet stoSet(regTheme_);
-
-  if (!TeSTOSetBuildDB(&stoSet, true, false, attrVector_)) {
-    QMessageBox::critical(NULL, tr("Error"), 
-		tr("Unexpected: Regions and attributes could not be loaded!"));
-    return false;
-  }
-
-  if (!TeSkaterFunction(this->hasPop_, this->type_, this->nClusters_, this->minPop_,
-    stoSet, this->resName_, het) ) {
-    QMessageBox::critical(NULL, tr("Error"), 
-		tr("Choose a connected graph!"));
-    return false;
-  }
-
-  double h;
-  for(unsigned int i = 0; i < het.size(); i++) {
-    h = het[i];
-  }
-
-  
-  if (!insertPropertyColumn(stoSet, tableName_, resName_) ) 
-  {
-    QMessageBox::critical(NULL, tr("Error"), 
-		tr("Error storing results. Check result column name!"));
-    return false;
-  }
-
-  // ---------------------------------------------- load updated table from database 
-	// Update all the themes that uses this table
-	TeViewMap& viewMap = regTheme_->layer()->database()->viewMap();
-	TeViewMap::iterator it;
-	set<TeLayer*> layerSet;
-	for (it = viewMap.begin(); it != viewMap.end(); ++it)
-	{
-		TeView *view = it->second;
-		vector<TeViewNode*>& themesVector = view->themes();
-		for (unsigned int i = 0; i < themesVector.size(); ++i)
-		{
-			TeTheme *theme = (TeThemeApplication*)themesVector[i];
-			if (theme->isThemeTable(tableName_) == true)
-			{
-				theme->loadThemeTables();
-				layerSet.insert(theme->layer());
-			}
-		}
-	}
-
-	// Update the layer tables affected
-	set<TeLayer*>::iterator setIt;
-	for (setIt = layerSet.begin(); setIt != layerSet.end(); ++setIt)
-		(*setIt)->loadLayerTables();
-
-  return true;
-}
-
diff --git a/src/terralib/application/qt/TeQtMethods.h b/src/terralib/application/qt/TeQtMethods.h
deleted file mode 100644
index d0a3860..0000000
--- a/src/terralib/application/qt/TeQtMethods.h
+++ /dev/null
@@ -1,64 +0,0 @@
-#ifndef  __TERRALIB_INTERNAL_QTTERRAMETHODS_H
-#define  __TERRALIB_INTERNAL_QTTERRAMETHODS_H
-/***
- * Implementa suporte para as funcoes do TerraStat
- * Objetivo -- soh nao manter a parte de geracao de eventos,
- * etc no ui, que podera ser reaproveitado.
- ****/
-
-#include "TeDatabase.h"
-#include "TeKernelParams.h"
-#include <qapplication.h>
-
-/////////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////////
-class TeThemeApplication;
-class TeQtGrid;
-
-class TeSkaterMethod : public QWidget {
-
-	Q_OBJECT
-
-protected:
-  //Method params
-  TeTheme*        regTheme_;    //Tema de regioes
-  vector<string>  attrVector_;  //Atributos a serem utilizados
-  bool            hasPop_;       //Usa populacao
-  string          attrPop_;     //Atributo de populacao
-  int             type_;
-  int             minPop_;
-  int             nClusters_;
-  string          tableName_;
-  string          resName_;
-
-public:
-
-  bool setTheme(string name, TeView* view) {
-    regTheme_ = view->get(name);
-    return (regTheme_ != NULL);
-  }
-
-  void setAttrVector(const vector<string>& vec) {
-    attrVector_ = vec;
-  }
-
-  void setHasPop(bool hp, const string& pop) {
-    hasPop_ = hp;
-    attrPop_ = pop;
-  }
-
-  void setType(int t, int mp, int nc) {
-    type_ = t; minPop_= mp; nClusters_= nc;
-  }
-
-  void setResName(string r, string t) {
-    resName_ = r;
-    tableName_ = t;
-  }
-
-  //Aplica o metodo skater
-  bool apply(vector<double>& het);
-
-};
-
-#endif
diff --git a/src/terralib/application/qt/TeQtProgress.h b/src/terralib/application/qt/TeQtProgress.h
deleted file mode 100644
index 691b9ee..0000000
--- a/src/terralib/application/qt/TeQtProgress.h
+++ /dev/null
@@ -1,138 +0,0 @@
-/************************************************************************************
-TerraView - visualization and exploration of geographical databases
-using TerraLib.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-This file is part of TerraView. TerraView is free software; you can redistribute it 
-and/or modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-You should have received a copy of the GNU General Public License
-along with TerraView.
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The software provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use of
-this program and its documentation.
-*************************************************************************************/
-
-#ifndef  __TERRALIB_INTERNAL_QTPROGRESS_H
-#define  __TERRALIB_INTERNAL_QTPROGRESS_H
-
-#include <qprogressdialog.h>
-#include <qapplication.h>
-#include <qcursor.h>
-#include <qaction.h>
-#include "TeProgress.h"
-#include <qeventloop.h>
-
-class TeQtProgress : public QProgressDialog, public TeProgressBase
-{
-	Q_OBJECT
-
-protected:
-	int		numberOfCursors_;	//<! Number of cursors that were pushed on application stack.
-
-	void enterEvent ( QEvent * )
-	{
-		if(QApplication::overrideCursor())
-		{
-			if(QApplication::overrideCursor()->shape() != Qt::ArrowCursor)
-			{
-				QApplication::setOverrideCursor( Qt::ArrowCursor );
-				numberOfCursors_++;
-			}
-		}
-	}
-
-	void leaveEvent ( QEvent * )
-	{
-		if(QApplication::overrideCursor())
-		{
-			if(QApplication::overrideCursor()->shape() == Qt::ArrowCursor)
-			{
-				QApplication::restoreOverrideCursor();
-				numberOfCursors_--;
-			}
-		}
-	}
-
-public:
-	TeQtProgress( QWidget * creator = 0, const char * name = 0, bool modal = FALSE, WFlags f = 0)
-		: QProgressDialog(creator, name, modal, f)	
-	{
-		numberOfCursors_ = 0;
-	}
-
-	~TeQtProgress() {}
-
-	void reset()
-	{
-		int i;
-		QProgressDialog::reset();
-		QProgressDialog::setLabelText("");
-		QProgressDialog::setCaption("");
-
-		//Restore all cursors that were set by TeQtProgress.
-		for (i=0; i<numberOfCursors_; i++)
-		{
-			if(QApplication::overrideCursor())
-				QApplication::restoreOverrideCursor();
-		}
-		numberOfCursors_ = 0;
-	}
-
-	void setTotalSteps (int steps)
-	{
-		QProgressDialog::setTotalSteps(steps);
-		if(QApplication::overrideCursor())
-		{
-			if(QApplication::overrideCursor()->shape() != Qt::WaitCursor)
-			{
-				QApplication::setOverrideCursor( Qt::WaitCursor );
-				numberOfCursors_++;
-			}
-		}
-		else
-		{
-			QApplication::setOverrideCursor( Qt::WaitCursor );
-			numberOfCursors_++;
-		}
-	}
-
-	void setMessage(const string& text)
-	{
-		QProgressDialog::setLabelText(text.c_str());
-	}
-
-	string getMessage()
-	{
-		return QProgressDialog::labelText().latin1();
-	}
-
-	void setProgress(int steps)
-	{
-		QProgressDialog::setProgress(steps);
-	}
-
-	 bool wasCancelled()
-	 {
-		 hasMouse();
-		 return QProgressDialog::wasCancelled();
-	 }
-
-	 void setCaption(const string& cap)
-	 {
-		 QProgressDialog::setCaption(cap.c_str());
-	 }
-
-	 void cancel() 
-	 {
-		 QProgressDialog::cancel();
-	 }
-
-};
-#endif
diff --git a/src/terralib/application/qt/TeQtShowMedia.cpp b/src/terralib/application/qt/TeQtShowMedia.cpp
deleted file mode 100644
index 1807781..0000000
--- a/src/terralib/application/qt/TeQtShowMedia.cpp
+++ /dev/null
@@ -1,1444 +0,0 @@
-/************************************************************************************
-TerraView - visualization and exploration of geographical databases
-using TerraLib.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-This file is part of TerraView. TerraView is free software; you can redistribute it 
-and/or modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-You should have received a copy of the GNU General Public License
-along with TerraView.
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The software provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use of
-this program and its documentation.
-*************************************************************************************/
-
-#include <TeQtShowMedia.h>
-#include <TeAttribute.h>
-#include <qfiledialog.h> 
-#include <qlineedit.h> 
-#include <qstring.h> 
-#include <qtextedit.h> 
-#include <qmessagebox.h>
-#include <qfile.h>
-#include <errno.h>
-
-#ifdef WIN32
-#include <windows.h>
-#include <process.h>
-#include <io.h>
-#include <direct.h>
-#else
-#include <unistd.h>
-#endif
-
-
-TeQtShowMedia :: TeQtShowMedia(QWidget* parent, const char* name)
-	: QTable(2, 2, parent, name)
-{
-	layer_ = 0;
-	db_ = 0;
-	cmdLocal_ = false;
-	popup_ = new QPopupMenu(this);
-	popup_->insertItem(tr("Show Media..."), this, SLOT(slotShow()));
-	popup_->insertItem(tr("Insert Media..."), this, SLOT(slotInsert()));
-	popup_->insertItem(tr("Insert URL..."), this, SLOT(slotInsertURL()));
-	popup_->insertItem(tr("Remove..."), this, SLOT(slotRemove()));
-	popup_->insertItem(tr("Set the Default Media"), this, SLOT(slotSetDefault()));
-	popup_->insertItem(tr("Description..."), this, SLOT(slotDescription()));
-
-	connect(this, SIGNAL(pressed(int, int, int, const QPoint&)),
-		 this, SLOT(slotpressed(int, int, int, const QPoint&)));
-
-	connect(this, SIGNAL(doubleClicked(int, int, int, const QPoint&)),
-		 this, SLOT(slotDoubleClicked(int, int, int, const QPoint&)));
-}
-
-TeQtShowMedia :: ~TeQtShowMedia()
-{
-}
-
-void TeQtShowMedia :: init(string objId, TeThemeApplication* theme, TeQtGrid* grid)
-{
-	setNumRows(0);
-	id_ = objId;
-	nattrs_ = grid->numCols();
-	layer_ = theme->layer();
-	table_ = layer_->mediaTable();
-	db_ = layer_->database();
-	TeDatabasePortal* portal = db_->getPortal();
-	
-	TeAttributeList	colAttrList;
-	db_->getAttributeList(theme->collectionTable(), colAttrList);
-
-	horizontalHeader()->setLabel(0, tr("Attribute"));
-	horizontalHeader()->setLabel(1, tr("Value"));
-
-	int	i, nMidias = 0;
-	if(table_.empty() == false)
-	{
-		string q = "SELECT COUNT(*) FROM " + table_;
-		q += " WHERE object_id = '" + id_ + "'";
-		if(portal->query(q))
-		{
-			if(portal->fetchRow())
-				nMidias = atoi(portal->getData(0));
-		}
-	}
-
-	string sel = theme->sqlJoin() + " WHERE c_object_id = '" + id_ + "'";
-
-	portal->freeResult();
-	if(portal->query(sel))
-	{
-		int ncol = portal->AttributeList().size() - colAttrList.size() + nMidias;
-
-		setNumRows(ncol);
-
-		if(portal->fetchRow())
-		{
-			for(i=0; i<grid->numCols(); i++)
-			{
-				string fname = portal->getAttribute(i).rep_.name_;
-				string data = portal->getData(i);
-				setText(i, 0, fname.c_str());
-				setText(i, 1, data.c_str());
-			}
-		}
-
-		if(table_.empty() == false)
-		{
-			string q = "SELECT media_name, media_table, show_default FROM " + table_;
-			q += " WHERE object_id = '" + id_ + "'";
-			portal->freeResult();
-			if(portal->query(q))
-			{
-				TeDatabasePortal* portal2 = db_->getPortal();
-				while(portal->fetchRow())
-				{
-					string type;
-					string mediaName = portal->getData(0);
-					string mediaTable = portal->getData(1);
-					bool showDefault = atoi(portal->getData(2));
-
-					string q = "SELECT media_type FROM " + mediaTable;
-					q += " WHERE media_name = '" + mediaName + "'";
-					portal2->freeResult();
-					if(portal2->query(q))
-					{
-						if(portal2->fetchRow())
-							type = portal2->getData(0);
-					}
-
-					string ss;
-					if(showDefault)
-						ss = "*media: "; // + type;
-					else
-						ss = "media: "; // + type;
-
-					setText(i, 0, ss.c_str());
-					setText(i, 1, mediaName.c_str());
-					i++;
-				}
-				delete portal2;
-			}
-		}
-		show();
-		moveDown();
-	}
-	delete portal;
-}
-
-bool TeQtShowMedia :: eventFilter(QObject* o, QEvent* e)
-{
-//	if (e->type() == QEvent::MouseButtonDblClick)
-//		return true;
-	return QTable::eventFilter(o, e);    // standard event processing
-}
-
-void TeQtShowMedia :: slotpressed( int row, int /* col */, int button, const QPoint & mousePos )
-{
-	if(button == RightButton)
-	{
-		cmdLocal_ = true;
-		row_ = row;
-		popup_->move(mousePos.x() + x() - contentsX(), mousePos.y() + y() - contentsY());
-		popup_->exec();
-		cmdLocal_ = false;
-	}
-}
-
-void TeQtShowMedia :: slotDoubleClicked( int row, int /* col */, int button, const QPoint & /*mousePos */)
-{
-	if(button == LeftButton)
-	{
-		row_ = row;
-		slotShow();
-	}
-}
-
-void TeQtShowMedia :: slotShow()
-{
-	if(row_ > 0 && nattrs_ > row_)
-		return;
-
-	string name;
-	if(row_ >= 0)
-		name = text(row_, 1).latin1();
-
-    int     pos;
-    char    buf[300];
-	vector<string>	varg;
-    string  cmd, arg, sname;
-	string	swdir;
-	string	mediaTable;
-	string	type;
-
-// load media data to archive from database
-	TeDatabasePortal *portal = db_->getPortal();
-	string query = "SELECT media_table, media_name FROM " + table_;
-	if(row_ >= 0)
-		query += " WHERE object_id = '" + id_ + "' AND media_name = '" + name + "'";
-	else
-		query += " WHERE object_id = '" + id_ + "' AND show_default = 1";
-	if(portal->query(query))
-	{
-		if(portal->fetchRow())
-		{
-			mediaTable = portal->getData(0);
-			name = portal->getData(1);
-		}
-	}
-
-	if(mediaTable.empty())
-	{
-		QMessageBox::warning(this, tr("Warning"),
-			tr("There is no media to show!\nInsert one first."));
-		delete portal;
-		return;
-	}
-
-	query = "SELECT * FROM " + mediaTable + " WHERE media_name = '" + name + "'";
-	portal->freeResult();
-	if(portal->query(query))
-		if(portal->fetchRow())
-			type = portal->getData("media_type");
-
-	if(type.empty())
-	{
-		QMessageBox::warning(this, tr("Warning"),
-			tr("There is no media in the table!"));
-		delete portal;
-		return;
-	}
-
-	string tempName =  name;
-	if(type != "url")
-	{
-        int f;
-#ifdef WIN32
-		char wdir[100];
-		GetWindowsDirectory((LPTSTR)wdir, 100);
-		swdir = wdir;
-		f = swdir.find(":\\");
-		if(f >= 0)
-			swdir.erase(f, swdir.size()-f);
-		swdir.append(":\\TERRAVIEW_TEMP");
-		if( access (swdir.c_str(), 06) == -1 ) // test if directory exists
-		{
-			if( errno == ENOENT )  // directory does not exist so create it
-			{
-				if ( _mkdir(swdir.c_str()) == -1)
-				{
-                    QString msg = tr("The directory ");
-                    msg += swdir.c_str();
-                    msg += tr(" could not be created");
-            		QMessageBox::critical(this, tr("Error"),
-            		    tr("The directory /tmp/TERRAVIEW_TEMP could not be created!"));
-					delete portal;
-					return;
-				}
-			}
-		}
-		swdir.append("\\");
-#else
-    	swdir = "/tmp/TERRAVIEW_TEMP";
-		if( access (swdir.c_str(), F_OK) == -1 ) // test if directory exists
-		{
-			if( errno == ENOENT )  // directory does not exist so create it
-			{
-                char buf[20];
-                sprintf(buf, "mkdir %s", swdir.c_str());
-				if (system(buf) != 0)
-				{
-            		QMessageBox::critical(this, tr("Error"),
-            		    tr("The directory /tmp/TERRAVIEW_TEMP could not be created!"));
-            		delete portal;
-            		return;
-				}
-			}
-		}        
-		swdir.append("/");
-#endif
-		f = tempName.rfind("/");
-		if(f < 0)
-			f = tempName.rfind("\\");
-		if(f >= 0)
-			tempName.erase(0, f+1);
-		tempName.insert(0, swdir);
-
-		pos = tempName.rfind(".");
-		if (pos < 0)
-		{
-			tempName.append(".");
-			tempName.append(type);
-		}
-		unsigned char *data = 0;
-		long size;
-//		string description;
-//		string type;
-		if((portal->getBlob("media_blob", data, size)) == false)
-		{
-			delete portal;
-			return;
-		}
-		FILE *fp = fopen(tempName.c_str(), "wb");
-		if(fp == 0)
-		{
-			delete portal;
-			return;
-		}
-		if(fwrite(data, sizeof(unsigned char), size, fp) < (unsigned long)size)
-		{
-			delete portal;
-			return;
-		}
-		if(data)
-			delete []data;
-		fclose(fp);
-
-		pos = tempName.rfind(".");
-		if (pos < 0)
-		{
-			delete portal;
-			return;
-		}
-
-		memset (buf, 0, 300);
-		tempName.copy (buf, tempName.size()-pos, pos);
-	}
-	else
-		strcpy(buf, ".html");
-
-	delete portal;
-
-#ifdef WIN32
-	if (TeConvertToUpperCase (buf) == ".EXE")
-	{
-		_spawnl (P_NOWAIT, tempName.c_str(), tempName.c_str(), NULL);
-		return;
-	}
-	// if application is user defined find current application
-	// else use default application
-	string key = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts\\";
-	key += buf;
-
-	string keycmd = getSystemKeyValue(HKEY_CURRENT_USER, key, "Application");
-	if(keycmd.empty() == false)
-	{
-		string com = keycmd;
-		key = "Applications\\" + com + "\\SHELL\\PLAY\\COMMAND";
-		keycmd = getSystemKeyValue(HKEY_CLASSES_ROOT, key, "");
-		if(keycmd.empty())
-		{
-			key = "Applications\\" + com + "\\SHELL\\OPEN\\COMMAND";
-			keycmd = getSystemKeyValue(HKEY_CLASSES_ROOT, key, "");
-			if(keycmd.empty())
-			{
-				key = "Applications\\" + com + "\\SHELL\\EDIT\\COMMAND";
-				keycmd = getSystemKeyValue(HKEY_CLASSES_ROOT, key, "");
-			}
-		}
-	}
-	else
-	{
-		key = buf;
-		keycmd = getSystemKeyValue(HKEY_CLASSES_ROOT, key, "");
-		if(keycmd.size() <= 1)
-		{
-			key += "\\SHELL\\PLAY\\COMMAND";
-			keycmd = getSystemKeyValue(HKEY_CLASSES_ROOT, key, "");
-			if(keycmd.empty())
-			{
-				key = buf;
-				key += "\\SHELL\\OPEN\\COMMAND";
-				keycmd = getSystemKeyValue(HKEY_CLASSES_ROOT, key, "");
-				if(keycmd.empty())
-				{
-					key = buf;
-					key += "\\SHELL\\EDIT\\COMMAND";
-					keycmd = getSystemKeyValue(HKEY_CLASSES_ROOT, key, "");
-				}
-			}
-		}
-		else
-		{
-			memset (buf, 0, 300);
-			strcpy(buf, keycmd.c_str());
-
-			key = buf;
-			key += "\\SHELL\\PLAY\\COMMAND";
-			keycmd = getSystemKeyValue(HKEY_CLASSES_ROOT, key, "");
-			if(keycmd.empty())
-			{
-				key = buf;
-				key += "\\SHELL\\OPEN\\COMMAND";
-				keycmd = getSystemKeyValue(HKEY_CLASSES_ROOT, key, "");
-				if(keycmd.empty())
-				{
-					key = buf;
-					key += "\\SHELL\\EDIT\\COMMAND";
-					keycmd = getSystemKeyValue(HKEY_CLASSES_ROOT, key, "");
-				}
-			}
-		}
-	}
-
-	if(keycmd.empty())
-	{
-		QMessageBox::warning(this, tr("Warning"),
-			tr("The media cannot be shown!\nCheck if there is a program defined to open it."));
-		return;
-	}
-
-// get command and arguments from keycmd
-    getCommand(keycmd, cmd, varg);
-	if((pos = tempName.find(" ")) >= 0)
-		tempName = "\"" + tempName + "\"";
-
-	char curdir[256];
-	_getcwd(curdir, 256);
-	_chdir(swdir.c_str());
-
-	if (varg.size() == 0)
-		_spawnl (P_NOWAIT, cmd.c_str(), tempName.c_str(), NULL);
-	else if (varg.size() == 1)
-        _spawnl (P_NOWAIT, cmd.c_str(), varg[0].c_str(), tempName.c_str(), NULL);
-	else if (varg.size() == 2)
-	{
-		const char* p = varg[1].c_str();
-		if(varg[1] == "%L" || varg[1] == "%1")
-			_spawnl (P_NOWAIT, cmd.c_str(), varg[0].c_str(), tempName.c_str(), NULL);
-		else
-			_spawnl (P_NOWAIT, cmd.c_str(), varg[0].c_str(), p, tempName.c_str(), NULL);
-	}
-	else if (varg.size() == 3)
-	{
-		const char* p = varg[1].c_str();
-		const char* p1 = varg[2].c_str();
-		int f = varg[0].find("/prefetch:", -1);
-		if(f >= 0 && (varg[2] == "%L" || varg[2] == "%1"))
-			_spawnl (P_NOWAIT, cmd.c_str(), p, tempName.c_str(), NULL);
-		else
-			_spawnl (P_NOWAIT, cmd.c_str(), varg[0].c_str(), p, p1, tempName.c_str(), NULL);
-
-
-	}
-
-	_chdir(curdir);
-#else
-    string command;
-    //Mount the vector of directory paths that are
-    //stored in the PATH environment variable
-    string path =  getenv("PATH");
-    vector<string> dirVector;
-    string dirPath;
-    size_t idx = 0;
-    size_t len = path.find(':', idx);
-    while (len != string::npos)
-    {
-        dirPath = path.substr(idx, len-idx);
-        dirVector.push_back(dirPath);
-        idx = len+1;
-        len = path.find(':', idx);
-    }
-
-
-    // get the last directory path
-    idx = path.rfind(':', path.size());
-    dirPath = path.substr(idx+1, path.size());
-    dirVector.push_back(dirPath);
-       
-	string fs; 
-    if(type != "url")
-	{
-        bool exists = false;
-        for (unsigned int i = 0; i < dirVector.size(); ++i)
-        {
-			QString qfs = dirVector[i].c_str();
-			qfs += "/konqueror";
-            QFile file(qfs);
-            if (file.exists() == true)
-            {
-                exists = true;
-                break;
-            }
-        }
-        if (exists == true)
-            command = "konqueror " + tempName + " &";
-        else
-        {
-			QString msg = tr("The program konqueror used to display your media is not") + "\n";
-			msg += tr("present in your PATH environment variable or KDE is not installed!");
-            QMessageBox::warning(this, tr("Warning"), msg);
-            return;
-        }      
-    }
-    else
-    {
-        unsigned int i;
-        for (i = 0; i < dirVector.size(); ++i)
-        {
-			QString qfs = dirVector[i].c_str();
-			qfs += "/netscape";
-            QFile file(qfs);
-            if (file.exists() == true)
-            {
-                command = "netscape -remote 'openURL(" + tempName + ")' &";              
-                break;
-            }
-        }
-
-        if (command.empty() == true)
-        {
-            for (i = 0; i < dirVector.size(); ++i)
-            {
-				QString qfs = dirVector[i].c_str();
-				qfs += "/mozilla";
-                QFile file(qfs);
-                if (file.exists() == true)
-                {
-                    command = "mozilla -remote 'openURL(" + tempName + ")' &";
-                    break;
-                }
-            }
-        }
-         
-        if (command.empty() == true)
-        {
-            for (i = 0; i < dirVector.size(); ++i)
-            {
-				QString qfs = dirVector[i].c_str();
-				qfs += "/konqueror";
-				QFile file(qfs);
-                if (file.exists() == true)
-                {
-                    command = "konqueror " + tempName + " &";
-                    break;
-                }
-           }
-        }
-        
-        if (command.empty() == true)
-        {
- 			QString msg = tr("The program konqueror used to display your media is not") + "\n";
-			msg += tr("present in your PATH environment variable or KDE is not installed!");
-            QMessageBox::warning(this, tr("Warning"), msg);
-             return;
-        }
-    }
-    
-    system(command.c_str());
-#endif
-}
-
-void TeQtShowMedia :: slotInsert()
-{
-	if(cmdLocal_ == false)
-		hide();
-	QFileDialog filed("c:\\", QString::null, 0, 0, true);
-	QString qfile = filed.getOpenFileName (QString::null, QString::null, 0, 0);
-
-	if(qfile.isEmpty())
-	{
-		QMessageBox::warning(this, tr("Warning"), tr("No media was selected!"));
-		show();
-		return;
-	}
-
-	string file = qfile.latin1();
-	string type;
-	int f = file.rfind(".");
-	if (f >= 0)
-	{
-		type = file;
-		type.erase(0, f+1);
-	}
-
-	string mTable = "media_table_" + Te2String(layer_->id());
-	if(table_.empty())
-	{
-		string tname = "media_layer_" + Te2String(layer_->id());
-		if(createLayerMediaTable(db_, layer_->id(), tname) == false)
-		{
-			QMessageBox::critical(this, tr("Error"),
-				tr("Fail to create the table that will store media names!"));
-			return;
-		}
-		table_ = layer_->mediaTable();
-		if(createMediaTable(db_, mTable) == false)
-		{
-			QMessageBox::critical(this, tr("Error"),
-				tr("Fail to create the media table!"));
-			return;
-		}
-	}
-
-	int response = 1;
-
-	TeDatabasePortal *portal = db_->getPortal();
-	string sel = "SELECT media_name, object_id FROM "  + table_ + " WHERE media_table = '" + mTable + "'";
-	if(portal->query(sel))
-	{
-		while(portal->fetchRow())
-		{
-			string s = portal->getData(0);
-			if(s == file)
-			{
-				response = QMessageBox::question(this, tr("Question"),
-				tr("The media already exists! Do you wish to use it even so?"), tr("Yes"), tr("No"));
-				if(response == 1)
-				{
-					QMessageBox::warning(this, tr("Warning"),
-						tr("Rename the file and try again!"));
-					delete portal;
-					return;
-				}
-				else
-				{
-					string s = portal->getData(1);
-					if(s == id_)
-					{
-						QMessageBox::warning(this, tr("Warning"),
-							tr("There is already a media associated to this object!"));
-						delete portal;
-						return;
-					}
-				}
-				break;
-			}
-		}
-	}
-
-	if(response == 1)
-	{
-		if(insertMedia(db_, mTable, file, "", type) == false)
-		{
-			QString msg = tr("Fail to insert media:") + " ";
-			msg += db_->errorMessage().c_str();
-			QMessageBox::critical(this, tr("Error"), msg);
-			delete portal;
-			return;
-		}
-	}
-	if(insertMediaObjLayer(db_, layer_, id_, file, mTable) == false)
-	{
-		QMessageBox::critical(this, tr("Error"),
-			tr("Fail to insert the \"media_name\" field in the table!"));
-		delete portal;
-		return;
-	}
-
-	setNumRows(numRows() + 1);
-	setText(numRows()-1, 1, file.c_str());
-
-	int nmidias = 0;
-	string conta = "SELECT COUNT(*) FROM "  + table_ + " WHERE object_id = '" + id_ + "'";
-	portal->freeResult();
-	if(portal->query(conta))
-	{
-		if(portal->fetchRow())
-			nmidias = atoi(portal->getData(0));
-	}
-
-	string title = "media: ";
-
-	if(nmidias <= 1)
-	{
-		title = "*media: "; // + type;
-		string up = "UPDATE " + table_ + " SET show_default = 1 WHERE object_id = '" + id_ + "'";
-		db_->execute(up);
-	}
-	delete portal;
-	setText(numRows()-1, 0, title.c_str());
-
-	if(cmdLocal_ == false)
-		hide();
-	else
-	{
-		moveDown();
-		show();
-		raise();
-
-	}
-}
-
-void TeQtShowMedia :: moveDown()
-{
-	int x = contentsX();
-	int height = visibleHeight(); 
-	int nlins = rowAt(height);
-	int y = rowPos(numRows()-nlins);
-	setContentsPos(x, y);
-	adjustColumn(0);
-	adjustColumn(1);
-}
-
-void TeQtShowMedia :: slotRemove()
-{
-	if(nattrs_ > row_)
-		return;
-
-	int x = contentsX();
-	int y = contentsY();
-
-	vector<string> atr;
-	vector<string> val;
-	int	i;
-
-	for(i=0; i<numRows(); i++)
-	{
-		string a = text(i, 0).latin1();
-		atr.push_back(a);
-		string b = text(i, 1).latin1();
-		val.push_back(b);
-	}
-
-	string	name = val[row_];
-	vector<string>::iterator ait = atr.begin();
-	ait += row_;
-	atr.erase(ait, ait+1);
-	vector<string>::iterator vit = val.begin();
-	vit += row_;
-	val.erase(vit, vit+1);
-
-	setNumRows(0);
-	string mTable = "media_table_" + Te2String(layer_->id());
-	string remover = "DELETE FROM " + table_ + " WHERE object_id = '" + id_ + "'";
-	remover += " AND media_name = '" + name + "'" + " AND media_table = '" + mTable + "'";
-	db_->execute(remover);
-
-	bool aindaUsa = false;
-	TeDatabasePortal* portal = db_->getPortal();
-	string sel = "SELECT * FROM " + table_ + " WHERE media_name = '" + name + "'";
-	sel += " AND media_table = '" +  mTable + "'";
-	if(portal->query(sel))
-		if(portal->fetchRow())
-			aindaUsa = true;
-
-	if(aindaUsa == false)
-	{
-		string remover = "DELETE FROM " + mTable + " WHERE media_name = '" + name + "'";
-		db_->execute(remover);
-	}
-
-	string defname;
-	bool defshow = false;
-	sel = "SELECT media_name, show_default FROM " + table_ + " WHERE object_id = '" + id_ + "'";
-	portal->freeResult();
-	if(portal->query(sel))
-	{
-		while(portal->fetchRow())
-		{
-			defname = portal->getData(0);
-			defshow = atoi(portal->getData(1));
-			if(defshow)
-				break;
-		}
-	}
-	delete portal;
-
-	if(defshow ==  false && defname.empty() == false)
-	{
-		string up = "UPDATE " + table_ + " SET show_default = 1 WHERE media_name = '" + defname + "'";
-		db_->execute(up);
-	}
-
-	setNumRows(atr.size());
-
-	unsigned int k;
-	for(k=0; k<atr.size(); k++)
-	{
-		if(defshow ==  false && defname.empty() == false)
-		{
-			if(val[k] == defname)
-				atr[k].insert(0, "*");
-		}
-		setText(k, 0, atr[k].c_str());
-		setText(k, 1, val[k].c_str());
-	}
-	setContentsPos(x, y);
-	raise();
-}
-
-void TeQtShowMedia :: slotInsertURL()
-{
-	if(cmdLocal_ == false)
-		hide();
-
-	urlWindow_ = new URLWindow(this, "urlInsertion", true);
-	urlWindow_->exec();
-	QString qsite = urlWindow_->URLLineEdit->text();
-	delete urlWindow_;
-	if(qsite.isNull() || qsite.isEmpty())
-		return;
-
-	string site = qsite.latin1();
-	string type = "url";
-
-
-	string mTable = "media_table_" + Te2String(layer_->id());
-	if(table_.empty())
-	{
-		string tname = "media_layer_" + Te2String(layer_->id());
-		if(createLayerMediaTable(db_, layer_->id(), tname) == false)
-		{
-			QMessageBox::critical(this,tr("Error"),
-				tr("Fail to create the table to store media names!"));
-			return;
-		}
-		if(createMediaTable(db_, mTable) == false)
-		{
-			QMessageBox::critical(this, tr("Error"), tr("Fail to create the media tables!"));
-			return;
-		}
-	}
-
-
-	bool jatem = false;
-
-	TeDatabasePortal *portal = db_->getPortal();
-	string sel = "SELECT media_name, object_id FROM "  + table_ + " WHERE media_table = '" + mTable + "'";
-	if(portal->query(sel))
-	{
-		while(portal->fetchRow())
-		{
-			string s = portal->getData(0);
-			if(s == site)
-			{
-				jatem = true;
-				string ss = portal->getData(1);
-				if(ss == id_)
-				{
-					QMessageBox::warning(this, tr("Warning"),
-						tr("This URL is already associated to this object!"));
-					delete portal;
-					return;
-				}
-				break;
-			}
-		}
-	}
-
-	if(jatem == false)
-	{
-		if(insertMedia(db_, mTable, site, "", type, false) == false)
-		{
-			QMessageBox::critical(this, tr("Error"),
-				tr("Fail to insert the \"media_blob\" field in the table!"));
-			delete portal;
-			return;
-		}
-	}
-	if(insertMediaObjLayer(db_, layer_, id_, site, mTable) == false)
-	{
-		QMessageBox::critical(this, tr("Error"),
-			tr("Fail to insert the \"media_name\" field in the table!"));
-		delete portal;
-		return;
-	}
-
-	setNumRows(numRows() + 1);
-	setText(numRows()-1, 1, site.c_str());
-
-	int nmidias = 0;
-	string conta = "SELECT COUNT(*) FROM "  + table_ + " WHERE object_id = '" + id_ + "'";
-	portal->freeResult();
-	if(portal->query(conta))
-	{
-		if(portal->fetchRow())
-			nmidias = atoi(portal->getData(0));
-	}
-
-	string title;
-
-	if(nmidias <= 1)
-	{
-		title = "*media: "; // + type;
-		string up = "UPDATE " + table_ + " SET show_default = 1 WHERE object_id = '" + id_ + "'";
-		db_->execute(up);
-	}
-
-	delete portal;
-	setText(numRows()-1, 0, title.c_str());
-
-	if(cmdLocal_ == false)
-		hide();
-	else
-	{
-		moveDown();
-		show();
-		raise();
-	}
-}
-
-void TeQtShowMedia :: slotSetDefault()
-{
-	if(nattrs_ > row_)
-		return;
-
-	string media_name = text(row_, 1).latin1();
-	string mTable = "media_table_" + Te2String(layer_->id());
-	setDefaultMedia(db_, layer_, id_, media_name, mTable);
-
-	string type = text(row_, 0).latin1();
-	int f = type.find("*", string::npos);
-	if(f >= 0)
-		return;
-	else
-	{
-		int i;
-		for(i = nattrs_; i<numRows(); i++)
-		{
-			string s = text(i, 0).latin1();
-			f = s.find("*", 0);
-			if(f >= 0)
-			{
-
-				setText(i, 0, "media:");
-				break;
-			}
-		}
-		setText(row_, 0, "*media:");
-	}
-
-	if(cmdLocal_ == false)
-		hide();
-	else
-		raise();
-}
-
-void TeQtShowMedia :: slotDescription()
-{
-	if(row_ > 0 && nattrs_ > row_)
-		return;
-
-	string mTable = "media_table_" + Te2String(layer_->id());
-	TeDatabasePortal *ptal = db_->getPortal();
-	string name;
-
-	if(row_ < 0)
-	{
-		string s = "SELECT media_name FROM " + table_ + " WHERE object_id = '" + id_ + "'";
-		s += " AND show_default = 1";
-		if(ptal->query(s))
-		{
-			if(ptal->fetchRow())
-				name = ptal->getData(0);
-		}
-	}
-	else
-		name = text(row_, 1).latin1();
-
-	string q = "SELECT * FROM " + mTable + " WHERE media_name = '" + name + "'";
-
-	string description;
-	ptal->freeResult();
-	if(ptal->query(q))
-	{
-		if(ptal->fetchRow())
-			description = ptal->getData("description");
-	}
-	delete ptal;
-	descriptionWindow_ = new MediaDescription(this, "mediaDescription", true);
-	QString qdesc;
-	qdesc.setLatin1(description.c_str(), description.size());
-	descriptionWindow_->descriptionTextEdit->setText(qdesc);
-	descriptionWindow_->exec();
-
-	QString qtext = descriptionWindow_->descriptionTextEdit->text();
-	if(qtext.isEmpty() || qtext.isNull())
-		description.clear();
-	else
-		description = qtext.latin1();
-	if(description.size() > 255)
-	{
-		QMessageBox::warning(this, tr("Warning"),
-			tr("The description is longer than 255 caracteres!\nIt will be truncated."));
-		description.erase(255, description.size()-255);
-	}
-	if(description.empty() == false)
-		updateMediaDescription(db_, name, mTable, description);
-
-	delete descriptionWindow_;
-
-	if(cmdLocal_ == false)
-		hide();
-	else
-		raise();
-}
-
-#ifdef WIN32
-void TeQtShowMedia :: getCommand(string keycom, string& cmd, vector<string>& varg)
-{
-    string  s = keycom;
-    string  ss = keycom;
-    string  S = TeConvertToUpperCase(keycom);
-    unsigned int i;
-    int     pos, n;
-	string	arg;
-	bool	isDll = false;
-
-	varg.clear();
-    cmd.clear();
-    arg.clear();
-
-// find command
-	if((pos=s.find(".")) >= 0)
-	{
-		if((n=s.find(" ", pos)) >= 0)
-		{
-			s.erase(n, s.size()-n);
-			S.erase(n, S.size()-n);
-			ss.erase(0, n);
-		}
-	}
-
-// remove ""
-	while((pos=s.find("\"", -1)) >= 0)
-	{
-		s.erase(pos, 1);
-		S.erase(pos, 1);
-	}
-// replace %SystemRoot%
-	if((pos=S.find("%SYSTEMROOT%", -1)) >= 0)
-	{
-		int len = strlen("%SystemRoot%");
-		string systemRoot = getSystemKeyValue(HKEY_LOCAL_MACHINE,
-			"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", "SystemRoot");
-		s.replace(pos, len, systemRoot);
-		S.replace(pos, len, systemRoot);
-	}
-
-// replace %ProgramFiles%
-	if((pos=S.find("%PROGRAMFILES%", -1)) >= 0)
-	{
-		int len = strlen("%ProgramFiles%");
-		string programFiles = getSystemKeyValue(HKEY_LOCAL_MACHINE,
-			"SOFTWARE\\Microsoft\\Windows\\CurrentVersion", "ProgramFilesDir");
-		s.replace(pos, len, programFiles);
-		S.replace(pos, len, programFiles);
-	}
-
-// replace %CommonProgramFiles%
-	if((pos=S.find("%COMMOMFILES%", -1)) >= 0)
-	{
-		int len = strlen("%CommonFiles%");
-		string commonFiles = getSystemKeyValue(HKEY_LOCAL_MACHINE,
-			"SOFTWARE\\Microsoft\\Windows\\CurrentVersion", "CommonFilesDir");
-		s.replace(pos, len, commonFiles);
-		S.replace(pos, len, commonFiles);
-	}
-
-// rundll32.exe
-	if((pos=S.find("RUNDLL32", -1)) == 0)
-	{
-		string dllDirectory = getSystemKeyValue(HKEY_LOCAL_MACHINE,
-			"System\\ControlSet001\\Control\\Session Manager\\KnownDLLs", "DllDirectory");
-		string  DIR = TeConvertToUpperCase(dllDirectory);
-		if((pos=DIR.find("%SYSTEMROOT%", -1)) >= 0)
-		{
-
-			int len = strlen("%SystemRoot%");
-			string systemRoot = getSystemKeyValue(HKEY_LOCAL_MACHINE,
-			"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", "SystemRoot");
-			dllDirectory.replace(pos, len, systemRoot);
-		}
-		cmd = dllDirectory + "\\rundll32.exe";
-		isDll = true;
-	}
-	else
-		cmd = s;
-
-	string command = TeConvertToUpperCase(cmd);
-	bool percentOut = false;
-	if((pos=command.find("MSACCESS.EXE", -1)) >= 0)
-
-		percentOut = true;
-	if((pos=command.find("POWERPNT.EXE", -1)) >= 0)
-		percentOut = true;
-
-	s = ss; // arguments
-	if(isDll)
-	{
-		varg.push_back("rundll32.exe");
-		S = TeConvertToUpperCase(s);
-		if((pos=S.find("%SYSTEMROOT%", -1)) >= 0)
-		{
-			int len = strlen("%SystemRoot%");
-			string systemRoot = getSystemKeyValue(HKEY_LOCAL_MACHINE,
-			"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", "SystemRoot");
-			s.replace(pos, len, systemRoot);
-		}
-		if(s[0] == ' ')
-			s.erase(0, 1);
-
-		for(i=0; i<s.size(); i++)
-			if(s[i] == '/' || s[i] == '-' || s[i]=='%')
-				break;
-		string arg = s;
-		arg.erase(i-1, arg.size()-(i-1));
-		varg.push_back(arg);
-		s.erase(0, i-1);
-	}
-
-// if runddl32 the option has "/" or "-" and termineted with " " 
-// else the option has "/", "-" or "%" and termineted with " "
-	for(i=0; i<s.size(); i++)
-	{
-		if(isDll || percentOut)
-		{
-			if(s[i] == '/' || s[i] == '-')
-			{
-				if((pos=s.find(" ", i)) >=0)
-				{
-					string arg = s;
-
-					arg.erase(pos, arg.size()-pos);
-					arg.erase(0, i);
-					// remove ""
-					while((n=arg.find("\"", -1)) >= 0)
-						arg.erase(n, 1);
-
-					varg.push_back(arg);
-					i = pos;
-				}
-				else
-				{
-					string arg = s;
-					arg.erase(0, i);
-					// remove ""
-					while((n=arg.find("\"", -1)) >= 0)
-						arg.erase(n, 1);
-
-
-					varg.push_back(arg);
-					break;
-				}
-			}
-		}
-		else
-		{
-			if(s[i] == '/' || s[i] == '-' || s[i] == '%')
-			{
-				if((pos=s.find(" ", i)) >=0)
-				{
-					string arg = s;
-					arg.erase(pos, arg.size()-pos);
-					arg.erase(0, i);
-					// remove ""
-					while((n=arg.find("\"", -1)) >= 0)
-						arg.erase(n, 1);
-
-					varg.push_back(arg);
-					i = pos;
-				}
-				else
-				{
-					string arg = s;
-					arg.erase(0, i);
-					// remove ""
-					while((n=arg.find("\"", -1)) >= 0)
-						arg.erase(n, 1);
-
-					varg.push_back(arg);
-					break;
-				}
-			}
-		}
-	}
-}
-
-
-string TeQtShowMedia :: getSystemKeyValue(HKEY hkey, string key, string value)
-{
-	HKEY    hk;
-	DWORD	DataSize = 1024;
-    DWORD   Type = REG_SZ;
-    char    buf[1024];
-    string  keycmd;
-
-    if (RegOpenKeyEx(hkey, (LPCTSTR)key.c_str(), 0, KEY_READ, &hk) == ERROR_SUCCESS)
-	{
-		memset (buf, 0, 1024);
-		if (RegQueryValueEx(hk, (LPCTSTR)value.c_str(), NULL, &Type, (LPBYTE)buf, &DataSize) == ERROR_SUCCESS)
-
-			keycmd = buf;
-	}
-	if(hk)
-		RegCloseKey (hk);
-	return keycmd;
-
-
-//  key query example:
-//	HKEY key; LONG res;
-//	res = RegOpenKeyEx(HKEY_CURRENT_USER,"Identities",0,KEY_READ,&key);
-//	if (res!=ERROR_SUCCESS) return;
-//	list<string> ids = RegQuerySubkeys(key);
-//	string defid = RegQueryString(key,"Default User ID");
-//	RegCloseKey(key);
-//	if (ids.size()==0) return;
-}
-#endif
-
-void TeQtShowMedia :: slotShowFile(string file)
-{
-    int				pos;
-     string			cmd;
-	vector<string>	varg;
-	string			name = file;
-
-	string tempName = name;
-	pos = tempName.find("/");
-	while(pos >= 0)
-	{
-		tempName.replace(pos, 1, "\\");
-		pos = tempName.find("/");
-	}
-	
-	string	type = tempName;
-	pos = type.rfind(".");
-	if(pos >= 0)
-		type.erase(0, pos);
-	else
-		return;
-
-#ifdef WIN32
-   char	buf[300];
-
-	if (TeConvertToUpperCase (type) == ".EXE")
-	{
-		_spawnl (P_NOWAIT, tempName.c_str(), tempName.c_str(), NULL);
-		return;
-	}
-	// if application is user defined find current application
-	// else use default application
-	string key = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts\\";
-	key += type;
-
-	string keycmd = getSystemKeyValue(HKEY_CURRENT_USER, key, "Application");
-	if(keycmd.empty() == false)
-	{
-		string com = keycmd;
-		key = "Applications\\" + com + "\\SHELL\\PLAY\\COMMAND";
-		keycmd = getSystemKeyValue(HKEY_CLASSES_ROOT, key, "");
-		if(keycmd.empty())
-		{
-			key = "Applications\\" + com + "\\SHELL\\OPEN\\COMMAND";
-			keycmd = getSystemKeyValue(HKEY_CLASSES_ROOT, key, "");
-			if(keycmd.empty())
-			{
-				key = "Applications\\" + com + "\\SHELL\\EDIT\\COMMAND";
-				keycmd = getSystemKeyValue(HKEY_CLASSES_ROOT, key, "");
-			}
-		}
-	}
-	else
-	{
-		key = type;
-		keycmd = getSystemKeyValue(HKEY_CLASSES_ROOT, key, "");
-		if(keycmd.size() <= 1)
-		{
-			key += "\\SHELL\\PLAY\\COMMAND";
-			keycmd = getSystemKeyValue(HKEY_CLASSES_ROOT, key, "");
-			if(keycmd.empty())
-			{
-				key = type;
-				key += "\\SHELL\\OPEN\\COMMAND";
-				keycmd = getSystemKeyValue(HKEY_CLASSES_ROOT, key, "");
-				if(keycmd.empty())
-				{
-					key = type;
-					key += "\\SHELL\\EDIT\\COMMAND";
-					keycmd = getSystemKeyValue(HKEY_CLASSES_ROOT, key, "");
-				}
-			}
-		}
-		else
-		{
-			memset (buf, 0, 300);
-			strcpy(buf, keycmd.c_str());
-
-			key = buf;
-			key += "\\SHELL\\PLAY\\COMMAND";
-			keycmd = getSystemKeyValue(HKEY_CLASSES_ROOT, key, "");
-			if(keycmd.empty())
-			{
-				key = buf;
-				key += "\\SHELL\\OPEN\\COMMAND";
-				keycmd = getSystemKeyValue(HKEY_CLASSES_ROOT, key, "");
-				if(keycmd.empty())
-				{
-					key = buf;
-					key += "\\SHELL\\EDIT\\COMMAND";
-					keycmd = getSystemKeyValue(HKEY_CLASSES_ROOT, key, "");
-				}
-			}
-		}
-	}
-
-	if(keycmd.empty())
-	{
-		QMessageBox::warning(this, tr("Warning"),
-			tr("The media cannot be shown!\nCheck if there is a program defined to open it."));
-		return;
-	}
-
-// get command and arguments from keycmd
-    getCommand(keycmd, cmd, varg);
-	if((pos = tempName.find(" ")) >= 0)
-		tempName = "\"" + tempName + "\"";
-
-	if (varg.size() == 0)
-		_spawnl (P_NOWAIT, cmd.c_str(), tempName.c_str(), NULL);
-	else if (varg.size() == 1)
-        _spawnl (P_NOWAIT, cmd.c_str(), varg[0].c_str(), tempName.c_str(), NULL);
-	else if (varg.size() == 2)
-	{
-		const char* p = varg[1].c_str();
-		if(varg[1] == "%L" || varg[1] == "%1")
-			_spawnl (P_NOWAIT, cmd.c_str(), varg[0].c_str(), tempName.c_str(), NULL);
-		else
-			_spawnl (P_NOWAIT, cmd.c_str(), varg[0].c_str(), p, tempName.c_str(), NULL);
-	}
-	else if (varg.size() == 3)
-	{
-		const char* p = varg[1].c_str();
-		const char* p1 = varg[2].c_str();
-		int f = varg[0].find("/prefetch:", -1);
-		if(f >= 0 && (varg[2] == "%L" || varg[2] == "%1"))
-			_spawnl (P_NOWAIT, cmd.c_str(), p, tempName.c_str(), NULL);
-		else
-			_spawnl (P_NOWAIT, cmd.c_str(), varg[0].c_str(), p, p1, tempName.c_str(), NULL);
-	}
-
-#else
-    string command;
-    //Mount the vector of directory paths that are
-    //stored in the PATH environment variable
-    string path =  getenv("PATH");
-    vector<string> dirVector;
-    string dirPath;
-    size_t idx = 0;
-    size_t len = path.find(':', idx);
-    while (len != string::npos)
-    {
-        dirPath = path.substr(idx, len-idx);
-        dirVector.push_back(dirPath);
-        idx = len+1;
-        len = path.find(':', idx);
-    }
-
-
-    // get the last directory path
-    idx = path.rfind(':', path.size());
-    dirPath = path.substr(idx+1, path.size());
-    dirVector.push_back(dirPath);
-       
-	string fs; 
-    if(type != "url")
-	{
-        bool exists = false;
-        for (unsigned int i = 0; i < dirVector.size(); ++i)
-        {
-			fs = dirVector[i] + "/konqueror";
-            QFile file(fs.c_str());
-            if (file.exists() == true)
-            {
-                exists = true;
-                break;
-            }
-        }
-        if (exists == true)
-            command = "konqueror " + name + " &";
-        else
-        {
-			QString msg = tr("The program konqueror used to display your media is not") + "\n";
-			msg += tr("present in your PATH environment variable or KDE is not installed!");
-            QMessageBox::warning(this, tr("Warning"), msg);
-             return;
-        }      
-    }
-    else
-    {
-        unsigned int i;
-        for (i = 0; i < dirVector.size(); ++i)
-        {
-			QString qfs = dirVector[i].c_str();
-			qfs += "/netscape";
-            QFile file(qfs);
-            if (file.exists() == true)
-            {
-                command = "netscape -remote 'openURL(" + name + ")' &";              
-                break;
-            }
-        }
-
-        if (command.empty() == true)
-        {
-            for (i = 0; i < dirVector.size(); ++i)
-            {
-				QString qfs = dirVector[i].c_str();
-				qfs += "/mozilla";
-                QFile file(qfs);
-                if (file.exists() == true)
-                {
-                    command = "mozilla -remote 'openURL(" + name + ")' &";
-                    break;
-                }
-            }
-        }
-         
-        if (command.empty() == true)
-        {
-            for (i = 0; i < dirVector.size(); ++i)
-            {
-				QString qfs = dirVector[i].c_str();
-				qfs += "/konqueror";
-				QFile file(qfs);
-                if (file.exists() == true)
-                {
-                    command = "konqueror " + name + " &";
-                    break;
-                }
-           }
-        }
-        
-        if (command.empty() == true)
-        {
-			QString msg = tr("The program konqueror used to display your media is not") + "\n";
-			msg += tr("present in your PATH environment variable or KDE is not installed!");
-            QMessageBox::warning(this, tr("Warning"), msg);
-             return;
-        }
-    }
-    
-    system(command.c_str());
-#endif
-}
diff --git a/src/terralib/application/qt/TeQtShowMedia.h b/src/terralib/application/qt/TeQtShowMedia.h
deleted file mode 100644
index cdb8cd1..0000000
--- a/src/terralib/application/qt/TeQtShowMedia.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/************************************************************************************
-TerraView - visualization and exploration of geographical databases
-using TerraLib.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-This file is part of TerraView. TerraView is free software; you can redistribute it 
-and/or modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-You should have received a copy of the GNU General Public License
-along with TerraView.
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The software provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use of
-this program and its documentation.
-*************************************************************************************/
-
-#ifndef  __TERRALIB_INTERNAL_QTSHOWMEDIA_H
-#define  __TERRALIB_INTERNAL_QTSHOWMEDIA_H
-
-#ifdef WIN32
-#include <windows.h>
-#endif
-#include <TeDatabase.h>
-#include <qtable.h>
-#include <urlWindow.h> 
-#include <mediaDescription.h> 
-#include <qpopupmenu.h>
-#include <TeDatabaseUtils.h>
-#include <TeQtGrid.h>
-#include <string>
-using namespace std;
-
-class TeQtShowMedia : public QTable
-{
-	Q_OBJECT
-	QPopupMenu*			popup_;
-	URLWindow*			urlWindow_;
-	MediaDescription*	descriptionWindow_;
-
-public:
-	int				row_;
-	string			id_;
-	string			table_;
-	TeDatabase*		db_;
-	TeLayer*		layer_;
-	int				nattrs_;
-	bool			cmdLocal_;
-	TeQtShowMedia(QWidget* parent = 0, const char* name = 0);
-
-	~TeQtShowMedia();
-	void moveDown();
-	void init(string objId, TeThemeApplication* theme, TeQtGrid* grid);
-
-protected:
-	bool eventFilter(QObject*, QEvent*);
-#ifdef WIN32
-	void getCommand(string keycom, string& cmd, vector<string>& varg);
-	string getSystemKeyValue(HKEY hkey, string key, string value);
-#endif
-
-public slots:
-	void slotpressed(int, int, int, const QPoint&);
-	void slotDoubleClicked(int, int, int, const QPoint&);
-	void slotShow();
-	void slotShowFile(string file);
-	void slotInsert();
-	void slotInsertURL();
-	void slotRemove();
-	void slotSetDefault();
-	void slotDescription();
-};
-#endif
diff --git a/src/terralib/application/qt/TeQtTable.cpp b/src/terralib/application/qt/TeQtTable.cpp
deleted file mode 100644
index 09f7c9d..0000000
--- a/src/terralib/application/qt/TeQtTable.cpp
+++ /dev/null
@@ -1,316 +0,0 @@
-/************************************************************************************
-TerraView - visualization and exploration of geographical databases
-using TerraLib.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-This file is part of TerraView. TerraView is free software; you can redistribute it 
-and/or modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-You should have received a copy of the GNU General Public License
-along with TerraView.
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The software provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use of
-this program and its documentation.
-************************************************************************************/
-#include "TeQtTable.h"
-#include <qmessagebox.h>
-#include <qapplication.h>
-#include <TeDatabase.h>
-
-TeQtTable::TeQtTable(QWidget* parent, QString name)
-	: QTable(parent, name)
-{
-	gridX_ = -1;
-	gridY_ = -1;
-	iLine_ = -1;
-	fLine_ = -1;
-	iCol_ = -1;
-	fCol_ = -1;
-	gridWidth_  = -1;
-	gridHeight_ = -1;
-	portal_ = 0;
-	db_ = 0;
-	doRepaint_ = true;
-
-	setNumCols(0);
-	setNumRows(0);
-	setSelectionMode(QTable::NoSelection);
-}
-
-TeQtTable::~TeQtTable()
-{
-	if (portal_)
-	{
-		delete portal_;
-		portal_ = 0;
-	}
-}
-
-
-void TeQtTable::openTable (TeDatabase* db, string& table)
-{
-	int i, numRows, nCols;
-
-	doRepaint_ = false; // don�t repaint
-
-	if (table.empty() || db == 0)
-		return;
-
-	db_ = db;
-
-	if (portal_)
-		delete portal_;
-	portal_= db_->getPortal();
-
-	string s = "SELECT * FROM " + table;
-
-	if (!portal_->query(s))
-	{
-		delete portal_;
-		portal_ = 0;
-		return;
-	}
-
-	TeAttributeList attrList = portal_->AttributeList();
-	numRows = portal_->numRows();
-
-	if(numRows <= 0)
-	{
-		numRows = 0;
-		while (portal_->fetchRow(numRows))
-			numRows += 1000;
-		numRows -= 1000;
-
-		portal_->fetchRow(numRows);
-		while (portal_->fetchRow())
-			numRows++;
-	}
-	
-	//get the column names
-	nCols = attrList.size();
-	setNumRows(numRows);
-	setNumCols(nCols);
-
-	for (i = 0; i < nCols; ++i)
-		horizontalHeader()->setLabel(i, attrList[i].rep_.name_.c_str());
-
-	// Set the minimum width of the vertical header of the grid
-	char buf[10];
-	sprintf(buf, "%d", numRows);
-	int minw = strlen(buf) + 1;
-	if (minw < 3)
-		minw = 3;
-	verticalHeader()->setMinimumWidth(minw*9); // supposing char width of 9 pixels
-	setLeftMargin(minw*9);
-
-
-	doRepaint_ = true; // do repaint
-
-	int visibleCols = 0;
-	int scVal = horizontalScrollBar()->value();
-	for(i=0; i<numCols(); i++)
-	{
-		if(visibleWidth() < columnPos(i) - scVal)
-			break;
-		visibleCols++;
-	}
-
-	repaint();
-}
-
-
-void TeQtTable::openSql(TeDatabase* db, string& sql)
-{
-	int i, numRows, nCols;
-
-	doRepaint_ = false; // don�t repaint
-
-	if (sql.empty() || db == 0)
-		return;
-
-	db_ = db;
-
-	if (portal_)
-		delete portal_;
-	portal_= db_->getPortal();
-
-	string s = sql;
-
-	if (!portal_->query(s))
-	{
-		delete portal_;
-		portal_ = 0;
-		return;
-	}
-
-	TeAttributeList attrList = portal_->AttributeList();
-	numRows = portal_->numRows();
-
-	if(numRows <= 0)
-	{
-		numRows = 0;
-		while (portal_->fetchRow())
-			++numRows;
-	}
-	
-	//get the column names
-	nCols = attrList.size();
-	setNumRows(numRows);
-	setNumCols(nCols);
-
-	for (i = 0; i < nCols; ++i)
-		horizontalHeader()->setLabel(i, attrList[i].rep_.name_.c_str());
-
-	// Set the minimum width of the vertical header of the grid
-	char buf[10];
-	sprintf(buf, "%d", numRows);
-	int minw = strlen(buf) + 1;
-	if (minw < 3)
-		minw = 3;
-	verticalHeader()->setMinimumWidth(minw*9); // supposing char width of 9 pixels
-	setLeftMargin(minw*9);
-
-
-	doRepaint_ = true; // do repaint
-
-	int visibleCols = 0;
-	int scVal = horizontalScrollBar()->value();
-	for(i=0; i<numCols(); i++)
-	{
-		if(visibleWidth() < columnPos(i) - scVal)
-			break;
-		visibleCols++;
-	}
-
-	repaint();
-}
-
-void TeQtTable::freePortal()
-{
-	gridX_ = -1;
-	gridY_ = -1;
-	iLine_ = -1;
-	fLine_ = -1;
-	iCol_ = -1;
-	fCol_ = -1;
-	gridWidth_  = -1;
-	gridHeight_ = -1;
-	portal_ = 0;
-	db_ = 0;
-	doRepaint_ = true;
-
-	if (portal_)
-	{
-		delete portal_;
-		portal_ = 0;
-	}
-
-	setNumRows(0);
-	setNumCols(0);
-}
-
-void TeQtTable::drawContents (QPainter *qp, int clipx, int clipy, int clipw, int cliph)
-{
-	if(doRepaint_ == false)
-		return;
-
-	update();
-	QTable :: drawContents(qp, clipx, clipy, clipw, cliph);
-}
-
-void TeQtTable::update ()
-{
-	if(portal_ == 0)
-		return;
-
-	int	i, j;
-
-	int gridY = contentsY();
-	int gridX = contentsX();
-
-	int gridHeight = visibleHeight(); 
-	int gridWidth = visibleWidth(); 
-
-	if (gridX_ == gridX && gridY_ == gridY &&
-		gridHeight_ == gridHeight && 
-		gridWidth_ == gridWidth)
-		return;
-
-	gridX_ = gridX;
-	gridY_ = gridY;
-	gridHeight_ = gridHeight;
-	gridWidth_ = gridWidth;
-		
-// clear cells
-	doRepaint_ = false; // do not repaint
-	if (iLine_ >= 0 && iCol_ >= 0)
-	{
-		for (i = iLine_; i <= fLine_; ++i)
-		{
-			for (j = iCol_; j <= fCol_; ++j)
-			{
-				if(item(i, j))
-					clearCell(i, j);
-			}
-		}
-	}
-
-	iLine_ = rowAt(gridY_);
-	iCol_  = columnAt(gridX_);
-	int visibleLines = rowAt(gridHeight_);
-	if (visibleLines == -1)
-		visibleLines = numRows();
-
-	int visibleCols = 0;
-	int scVal = horizontalScrollBar()->value();
-	for(i=iCol_; i<numCols(); i++)
-	{
-		if(gridWidth_ < columnPos(i) - scVal)
-			break;
-		visibleCols++;
-	}
-
-	if (iLine_ < 0 || iCol_ < 0)
-	{
-		gridX_ = gridY_ = iLine_ = fLine_ = iCol_ = fCol_ = -1;
-		doRepaint_ = true;
-		return;
-	}
-
-	fLine_ = iLine_ + visibleLines;
-	if (fLine_ > numRows() - 1)
-		fLine_ = numRows() - 1;
-	fCol_ = iCol_ + visibleCols - 1;
-
-	for (i = iLine_; i <= fLine_ ; ++i)
-	{
-		if (portal_->fetchRow(i) == false)
-			return;
-
-		string s;
-		for (j = iCol_; j <= fCol_; ++j)
-		{
-			s = portal_->getData(j);
-			setText(i, j, s.c_str());
-
-			if(i == fLine_ && j == fCol_- 1)
-			{
-				doRepaint_ = true; // do repaint
-				updateCell(i, j);
-			}
-		}
-	}
-
-	doRepaint_ = true; // do repaint
-}
-
-
-
-
-
diff --git a/src/terralib/application/qt/TeQtTable.h b/src/terralib/application/qt/TeQtTable.h
deleted file mode 100644
index c6825ae..0000000
--- a/src/terralib/application/qt/TeQtTable.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/************************************************************************************
-TerraView - visualization and exploration of geographical databases
-using TerraLib.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-This file is part of TerraView. TerraView is free software; you can redistribute it 
-and/or modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-You should have received a copy of the GNU General Public License
-along with TerraView.
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The software provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use of
-this program and its documentation.
-*************************************************************************************/
-
-#ifndef TEQTTABLE_H
-#define TEQTTABLE_H
-
-#include <qtable.h>
-#include <string>
-using namespace std;
-
-class TeDatabase;
-class TeDatabasePortal;
-
-class TeQtTable : public QTable
-{
-protected:
-	TeDatabase			*db_;
-	TeDatabasePortal	*portal_;
-	int					gridX_, gridY_;
-	int					iLine_, fLine_;
-	int					iCol_, fCol_;
-	int					gridWidth_, gridHeight_;
-	bool				doRepaint_;
-
-	virtual void drawContents (QPainter *qp, int clipx, int clipy, int clipw, int cliph);
-
-	void update();
-
-public:
-
-    TeQtTable(QWidget *parent, QString name);
-
-	virtual ~TeQtTable();
-
-	virtual void endEdit(int row, int col, bool accept, bool replace)
-	{
-		QTable::endEdit(row, col, accept, replace);
-	}
-
-	void openTable(TeDatabase* db, string& table);
-
-	void openSql(TeDatabase* db, string& sql);
-
-	void freePortal();
-
-	TeDatabasePortal* getPortal() {return portal_;}
-};
-
-#endif
diff --git a/src/terralib/application/qt/TeQtTerraStat.cpp b/src/terralib/application/qt/TeQtTerraStat.cpp
deleted file mode 100644
index a1ed886..0000000
--- a/src/terralib/application/qt/TeQtTerraStat.cpp
+++ /dev/null
@@ -1,1184 +0,0 @@
-/************************************************************************************
-TerraView - visualization and exploration of geographical databases
-using TerraLib.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-This file is part of TerraView. TerraView is free software; you can redistribute it 
-and/or modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-You should have received a copy of the GNU General Public License
-along with TerraView.
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The software provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use of
-this program and its documentation.
-*************************************************************************************/
-
-
-#include "TeSTElementSet.h"
-#include "TeKernelParams.h"
-#include "TeQtTerraStat.h"
-#include "TeKernelFunctions.h"
-#include "TeStatDataStructures.h"
-#include "TeQtDatabasesListView.h"
-#include "TeImportRaster.h"
-#include "TeQtViewsListView.h"
-#include "TeQtGrid.h"
-#include "TeSTEFunctionsDB.h"
-#include "TeWaitCursor.h"
-#include "TeColorUtils.h"
-#include "TeDatabaseUtils.h"
-#include "TeKernelParams.h"
-#include "TeQtLayerItem.h"
-#include <qobject.h>
-#include <qapplication.h>
-
-
-string getKernelFunction (TeKernelFunctionType t)
-{
-	string result;
-
-	switch (t)
-	{
-		case TeKQuartic:
-      result = QObject::tr("Quartic").latin1();
-			break;
-		case TeKNormal:
-			result = QObject::tr("Normal").latin1();
-			break;
-		case TeKUniform:
-			result = QObject::tr("Uniform").latin1();
-			break;
-		case TeKTriangular:
-			result = QObject::tr("Triangular").latin1();
-			break;
-		case TeKNegExponential:
-			result = QObject::tr("NegExponential").latin1();
-			break;
-	}
-	return result;
-}
-
-string getKernelComputeType (TeKernelComputeType t)
-{
-	string result;
-
-	switch (t)
-	{
-		case TeKDensity:
-			result = QObject::tr("Density").latin1();
-			break;
-		case TeKProbability:
-			result = QObject::tr("Probability").latin1();
-			break;
-		case TeKMovingAverage:
-			result = QObject::tr("Spatial Moving Average").latin1();
-			break;
-	}
-	return result;
-}
-
-string getCombinationType (TeKernelCombinationType /* t */)
-{
-	string result;
-
-  //COMPLETAR---
-
-//	switch (t)
-//	{
-//		case TeNone:
-//			result = "None";
-//			break;
-//  default:
-//    result = "DESCONHECIDO";
-//   break;
-//	}
-	result = "DESCONHECIDO";
-	return result;
-}
-
-
-/**
- * Retorna legenda para kernel
- **/
-bool getKernelLegend(TeKernelParams& par, vector<string>& result)
-{
-	string legend = QObject::tr("Kernel parameters").latin1();
-	result.push_back(legend); 
-	string numb = "";
-	
-	legend = QObject::tr("Event theme").ascii()+ numb +" : "+ par.eventThemeName1_ ;
-	result.push_back(legend);
-	
-	if(!par.intensityAttrName1_.empty())
-	{
-		legend = QObject::tr("Attribute name").ascii()+ numb +" : "+ par.intensityAttrTable1_+"."+ par.intensityAttrName1_;
-		result.push_back(legend);
-	}
-
-  if (par.radiusValue1_ > 0) {
-	  legend = QObject::tr("Radius value").ascii()+ numb +" : "+ Te2String(par.radiusValue1_);
-  }
-  else {
-    legend = QObject::tr("Adaptive radius").ascii();
-  }
-  result.push_back(legend);
-
-  legend = QObject::tr("Compute: ").ascii()+getKernelComputeType(par.computeType1_);
-  result.push_back(legend);
-
-  legend = QObject::tr("Function: ").ascii()+getKernelFunction(par.kernelFunction1_);
-  result.push_back(legend);
-
-  /*
-  	if(!eventThemeName2_.empty())
-	{
-		legend = "Combination type : "+ getCombinationType(combinationType_);
-		result.push_back(legend);
-		numb = "1";
-	}
-
-	if(!eventThemeName2_.empty())
-	{
-		legend = "Event theme 2 : "+ eventThemeName2_ ;
-		result.push_back(legend);
-		
-		if(!intensityAttrName2_.empty())
-		{
-			legend = "Intensity attribute name 2 : "+ intensityAttrName2_;
-			result.push_back(legend);
-			legend = "Intensity attribute table 2 : "+ intensityAttrTable2_;
-			result.push_back(legend);
-		}
-
-		legend = "Radius value 2 : "+ Te2String(radiusValue2_);
-		result.push_back(legend);
-	}
-  */
-	return true;
-}
-
-
-/**
- * Grava uma coluna na tabela de atributos associada a um STOSet.
- * Nome da coluna eh o mesmo nome da propriedade
- **/
-bool insertPropertyColumn(TeSTElementSet& stoSet,
-                          const string& tableName,
-                          const string&  columnName) 
-{
-	
-	
- 	vector<int> index;
-	int ind = stoSet.getAttributeIndex(columnName);
-	if(ind<0)
-	{
-		ind = stoSet.getAttributeIndex(tableName+"."+columnName);
-		if(ind>-1)
-			index.push_back (ind);
-	}
-	else
-		index.push_back (ind);
-  
-	if(!index.empty())
-	{
-		if (!TeUpdateDBFromSet (&stoSet, tableName, &index)) 
-			return false;
-	}
-	else
-	{
-		if (!TeUpdateDBFromSet (&stoSet, tableName)) 
-			return false;
-	}
-	return true;
-}
-
-/**
- * Grava uma coluna na tabela de atributos associada a um STOSet.
- * Nome da coluna eh o mesmo nome da propriedade
- **/
-bool insertPropertyColumn(TeSTStatInstanceSet& stSet,
-                          int idxDoubleProp,
-                          TeTheme* theme,
-                          const string& tableName,
-                          const string& columnName) {
-
-  TeProperty prop;
-
-  prop.attr_.rep_.name_ = columnName;
-  prop.attr_.rep_.type_ = TeREAL;
-  double value;
-  TePropertyVector pVect;
-  pVect.push_back(prop);
-
-  //Constroi um de outro
-  TeSTElementSet rs(theme);
-
-  TeSTStatInstanceSet::iterator ito = stSet.begin();
-  while (ito != stSet.end()) {
-
-    //Cria uma nova propriedade no objeto
-    (*ito).getDoubleProperty(idxDoubleProp, value);
-    pVect[0].value_ = Te2String(value, STAT_PRECISION);
-    (*ito).properties(pVect);
-    rs.insertSTInstance(*ito);
-    ++ito;
-  }
-
-  return insertPropertyColumn(rs, tableName, columnName) ;
-}
-
-
-/***
- * Cria um STOSet a partir de um tema e um conjunto de atributos,
- * colocando todas as tabelas do TEMA
- ***/
-bool createSTOSetFromTheme(TeTheme* theme, 
-                              vector<string>& attributes,
-                              TeSTElementSet* rs) {
-
-  TeSTElementSet newRS(theme);
-
-  if (TeSTOSetBuildDB(&newRS, true, false, attributes) ) {
-    *rs = newRS;
-    return true;
-  }
-  else return false;
-}
-
-
-/***
- * Cria um STOSet a partir de um tema e um conjunto de atributos,
- * colocando todas as tabelas do TEMA
- ***/
-bool createSTOStatSetFromTheme(TeTheme* theme, 
-                               vector<string>& attributes,
-                               int additionalDouble,
-                               TeSTStatInstanceSet* rs) {
-
-  TeSTElementSet stoSet(theme);
-   if (!TeSTOSetBuildDB(&stoSet, true, false, attributes))
-     return false;
-   rs->Copy(stoSet, attributes.size(), additionalDouble);
-   return true;
-
-}
-
-
-
-void TeKernelMethod::error(TeKernelErrorType type, string message, QWidget* parent) {
-
-  QString title;
-  switch (type) {
-  case Uerror:
-	  title = tr("Unexpected Error");
-    break;
-  case Error:
-		title = tr("Error");
-    break;
-  case Warning:
-		title = tr("Warning");
-    break;
-  }
-
-  if (parent) {
-	  QMessageBox::information(parent, title, tr(message.c_str()));
-  }
-  else {
-    QMessageBox::information(0, (title), tr(message.c_str())); 
-  }
-
-}
-
-/**
- * Defines name, theme pointer and id for a given theme 
- * id = 0 -- support theme
- * id = 1,2 -- first and second event theme
- **/
-bool TeKernelMethod::setTheme(string name, int id, TeView* view) {
-  if (id == 0) {
-    params_.supportThemeName_ = name;
-    regTheme_ = (TeThemeApplication *)view->get(params_.supportThemeName_);
-    if (evTheme1_ == NULL) {
-      return false;
-    }
-    params_.supportThemeId_ = regTheme_->id(); 
-  }
-  else if (id == 1) {
-    params_.eventThemeName1_ = name;
-
-    evTheme1_ = view->get(params_.eventThemeName1_);
-    if (evTheme1_ == NULL) {
-      return false;
-    }
-    params_.eventThemeId1_ = evTheme1_->id();
-    
-  }
-  else if (id == 2) {
-    params_.eventThemeName2_ = name;
-
-    evTheme2_ = view->get(params_.eventThemeName2_);
-    if (evTheme2_ == NULL) {
-      return false;
-    }
-    params_.eventThemeId2_ = evTheme2_->id();
-    
-  }
-  return true;
-}
-
-
-enum TeGridType {GridFromSupport, GridFromEvent, GridFromBoth};
-
-
-/**
- * Generates support set from parameters
- *   If grid, generate box
- *   If theme, generate column
- **/
-bool TeKernelMethod::generateSupportSet() {
- 
-  
-  bool isGrid = isGridReg_ || isGridEv_;
-  bool isRatio = (params_.eventThemeId2_ != -1);
-
-  justOnePolygon_ = false;
-
-  //support set is from type TeKernelGridSupport
-  if (isGrid) {
-
-    //Computes grid boundary and defines if just one set.
-    TeGridType t;
-    TeBox      gridBound;
-
-  
-    if (isRatio) {
-      t = GridFromBoth;
-    }
-    else if (isGridEv_) {
-      t = GridFromEvent;
-    }
-    else {
-      t = GridFromSupport;
-    }
-
-    if (db_ == NULL) {
-      error(Uerror, tr("There is no database. Please, contact support!").latin1());
-      return false;
-    }
-
-    TeBox bound1;
-    TeBox bound2;
-    
-    switch(t) {
-    case GridFromSupport:
-      if (regTheme_ == NULL) {
-		error(Uerror, tr("There is no support theme. Please, contact support!").latin1());
-        return false;
-      }
-      gridBound = db_->getThemeBox(regTheme_);
-      break;
-    case GridFromEvent:
-      if (evTheme1_ == NULL) {
-		error(Uerror, tr("There is no event theme. Please, contact support!").latin1());
-        return false;
-      }
-      gridBound = db_->getThemeBox(evTheme1_);
-      break;
-    case GridFromBoth:
-      if ((evTheme1_ == NULL) || (evTheme2_ == NULL)) {
-		error(Uerror, tr("There is no event theme. Please, contact support!").latin1());
-        return false;
-      }
-
-      bound1 = db_->getThemeBox(evTheme1_);
-      bound2 = db_->getThemeBox(evTheme2_);
-    
-      //Box is the rectangle that envolves both boxes
-      gridBound.x1_ = (bound1.x1_ < bound2.x1_) ? bound1.x1_ : bound2.x1_;
-      gridBound.y1_ = (bound1.y1_ < bound2.y1_) ? bound1.y1_ : bound2.y1_;
-      gridBound.x2_ = (bound1.x2_ > bound2.x2_) ? bound1.x2_ : bound2.x2_;
-      gridBound.y2_ = (bound1.y2_ < bound2.y2_) ? bound1.y2_ : bound2.y2_;
-
-      break;
-
-    default:
-		error(Uerror, tr("Invalid type. Please, contact support!").latin1());
-      return false;
-      break;
-    }
-    
-    
-    if (!gridBound.isValid()) {
-		error(Uerror, tr("Invalid grid box. Please, contact support!").latin1());
-        return false;
-    }
-
-
-    //Verifies if it has just one polygon
-    if (t == GridFromSupport) {
-
-      TeDatabasePortal* portal = this->db_->getPortal();
-
-      TeLayer* l = this->regTheme_->layer();
-
-      if (l->hasGeometry(TePOLYGONS))
-      {
-        string count = "SELECT COUNT(*) FROM " + l->tableName(TePOLYGONS);
-        count += ", " + regTheme_->collectionTable() + " WHERE ";
-        count += l->tableName(TePOLYGONS) + ".object_id = ";
-        count += regTheme_->collectionTable() + ".c_object_id";
-        portal->freeResult();
-        if(portal->query(count))
-        {
-          if(portal->fetchRow())
-          {
-            count = portal->getData(0);		
-          }
-          else {
- 			error(Uerror, tr("There is no polygons. Please, contact support!").latin1());
-          }
-        }
-
-        int nPol = atoi(count.c_str());
-        this->justOnePolygon_ = (nPol == 1);
-		delete portal;
-      }
-    }
-
-    TeProjection* proj = db_->loadProjection(this->evTheme1_->layer()->projection()->id());
-
-    if (proj == NULL) {
- 			error(Uerror, tr("There is no projection. Please, contact support!").latin1());
-       return false;
-    }
-
-    regSet_ = new TeKernelGridSupport(gridBound, gridCols_, proj);   
-  }
-  //Gera grid irregular a partir de poligonos do layer
-  else {
-    
-    //Define regioes a partir de tema -- aplicar restricao
-    if (regTheme_ == NULL) {
- 		error(Uerror, tr("There is no support theme. Please, contact support!").latin1());
-      return false;
-    }
-
-	//Generates set from theme
-    vector<string> empty;
-    TeSTStatInstanceSet* rs = new TeSTStatInstanceSet();
-    createSTOStatSetFromTheme(regTheme_, 
-      empty, 1, rs);
-    resName_ = string(this->params_.supportThemeAttr_);
-    regSet_ = rs;
-  }
-  return true;
-}
-
-
-/**
- * Generates event set from theme. If there is an attribute, set is initialize with it.
- * Otherwise, just geometries are loaded. Geometries may be points or polygons
- **/
-bool TeKernelMethod::generateEventSet(int which) {
-
-  bool     isPoint;
-  TeTheme* theme;
-  TeLayer* layer;
-  string   table;
-  string   column;
-    
-  if (which == 1) {
-    isPoint = this->isPoint1_;
-    theme = this->evTheme1_;
-    if (this->evTheme1_ == NULL) {
- 		error(Uerror, tr("There is no event set for the kernel. Please, contact support!").latin1());
-      return false;
-    }
-    layer = this->evTheme1_->layer();
-    if (layer == NULL) {
- 		error(Uerror, tr("There is no layer for the theme. Please, contact support!").latin1());
-      return false;
-    }
-    table = this->params_.intensityAttrTable1_;
-    column = this->params_.intensityAttrName1_;
-  }
-  else if (which == 2) {
-    isPoint = this->isPoint2_;
-    theme = this->evTheme2_;
-    if (this->evTheme2_ == NULL) {
- 		error(Uerror, tr("There is no event set for the kernel. Please, contact support!").latin1());
-      return false;
-    }
-    layer = this->evTheme2_->layer();
-    if (layer == NULL) {
- 		error(Uerror, tr("There is no layer for the theme. Please, contact support!").latin1());
-      return false;
-    }
-    table = this->params_.intensityAttrTable2_;
-    column = this->params_.intensityAttrName2_;
-  }
-  else {
- 		error(Uerror, tr("Invalid event set. Please, contact support!").latin1());
-    return false;
-  }
-  
-  TeWaitCursor wait;
-
-  bool done;
-  vector<string> vecAttr;
-  if (column.compare("")) {
-      vecAttr.push_back(column);
-  }
- if (isPoint) {
-
-    //Generates set from theme
-    TePointTInstanceSet* evs = new TePointTInstanceSet();
-    if (vecAttr.size() == 0) {
-      done =  createSTOStatSetFromTheme(theme, vecAttr, 1, evs);
-      //Deve inicializar com 1 toda a propriedade
-      TePointTInstanceSet::iterator itev = evs->begin();
-      while (itev != evs->end()) {
-        (*itev).setDoubleProperty(0, 1.0);
-        ++itev;
-      }
-    }
-    else {
-      done = createSTOStatSetFromTheme(theme, vecAttr, 0, evs);
-    }
-
-    if (!done)
-      return false;
-    if (which == 1) {
-      evSet1_ = evs;
-    }
-    else {
-      evSet2_ = evs;
-    }
-
-  }
-  else {
-
-      //Generates set from theme
-    TePointTInstanceSet* evs = new TePointTInstanceSet();
-    if (vecAttr.size() == 0) {
-      done =  createSTOStatSetFromTheme(theme, vecAttr, 1, evs);
-      //Deve inicializar com 1 toda a propriedade
-      TePointTInstanceSet::iterator itev = evs->begin();
-      while (itev != evs->end()) {
-        (*itev).setDoubleProperty(0, 1.0);
-        ++itev;
-      }
-  }
-  else {
-      done = createSTOStatSetFromTheme(theme, vecAttr, 0, evs);
-    }
-    if (!done)
-      return false;
-    if (which == 1) {
-      evSet1_ = evs;
-    }
-    else {
-      evSet2_ = evs;
-    }
-  }
-  return true;
-}
-
-
-bool TeKernelMethod::call() 
-{
-  bool isGrid = this->isGridEv_ || this->isGridReg_;
-  bool isRatio = this->params_.eventThemeName2_.compare("");
-
-//  bool justOnePolygon = false;
-
-  double totalArea;
-  if (isGrid)  {
-    totalArea = ((TeKernelGridSupport *)regSet_)->totalArea();
-  }
-  else {
-    //SUBSTITUIR
-    totalArea = TeGeometryArea(db_->getThemeBox(regTheme_));
-  }
-
-  int  totalRegions;
-  if (isGrid) {
-      totalRegions = ((TeKernelGridSupport *)regSet_)->numObjects();
-  }
-  else {
-      totalRegions = ((TeSTStatInstanceSet *)regSet_)->numObjects();
-  }
-
-  if (TeProgress::instance())
-  {
-		TeProgress::instance()->setTotalSteps(totalRegions);
-  }
-
-  //Kernel de razao
-  if (isRatio) {
-   
-   
-    TeStatKernelRatio kerRatio;
-    kerRatio.numReg_ = totalRegions;
-    kerRatio.kComb_ = params_.combinationType_;
-    kerRatio.ktype_ = params_.computeType1_;
-    kerRatio.kfunc1_ = params_.kernelFunction1_;
-    kerRatio.radius1_ = params_.radiusValue1_;
-    kerRatio.kfunc2_ = params_.kernelFunction2_;
-    kerRatio.radius2_ = params_.radiusValue2_;
-    kerRatio.totalArea_ = totalArea;
-
-
-    //Colocar janela com parametros para o usuario confirmar
-
-    if (isGrid) {
-      //Verifica se o iterador eh para um unico poligono
-      if (justOnePolygon_) {
-        TeDatabasePortal* portal = db_->getPortal();
-
-        string count = "SELECT c_object_id FROM " + regTheme_->layer()->tableName(TePOLYGONS)+",";
-        count += regTheme_->collectionTable() + " WHERE ";
-        count += regTheme_->layer()->tableName(TePOLYGONS) + ".object_id = ";
-        count += regTheme_->collectionTable() + ".c_object_id";
-        portal->freeResult();
-        if(portal->query(count))
-        {
-          if(portal->fetchRow())
-          {
-            count = portal->getData(0);		
-          }
-          else {
- 			      error(Uerror, tr("There is no polygons. Please, contact support!").latin1());
-            return false;
-          }
-        }
-		    delete portal;
-        TePolygonSet polygon;
-        if (!regTheme_->layer()->loadGeometrySet(count, polygon)) {
- 		    	error(Uerror, tr("There is no polygon boundary. Please, contact support!").latin1());
-          return false;
-        }
-        boundary_ = polygon.first();
-        if (boundary_.empty()) {
- 		    	error(Uerror, tr("There is no polygon boundary. Please, contact support!").latin1());
-          return false;
-        }
-        return kerRatio.apply(*((TePointTInstanceSet *)evSet1_),
-            *((TePointTInstanceSet *)evSet2_),
-            (*((TeKernelGridSupport *)regSet_)).begin(boundary_), 
-            (*((TeKernelGridSupport *)regSet_)).end(boundary_));
-      }
-      else {
-        return kerRatio.apply(*((TePointTInstanceSet *)evSet1_),
-            *((TePointTInstanceSet *)evSet2_),
-            (*((TeKernelGridSupport *)regSet_)).begin(), 
-            (*((TeKernelGridSupport *)regSet_)).end());
-      }
-    }
-    else {
-       return kerRatio.apply(*((TePointTInstanceSet *)evSet1_), 
-         *((TePointTInstanceSet *)evSet2_),
-          (*((TeSTStatInstanceSet *)regSet_)).begin(), 
-          (*((TeSTStatInstanceSet *)regSet_)).end());
-    }
-  }  
-  //Kernel normal com um unico conjunto
-  else {
-   
-    TeStatKernel kernel;
-    kernel.radius_ = params_.radiusValue1_;
-    kernel.kfunc_ =  params_.kernelFunction1_;
-    kernel.ktype_ = params_.computeType1_;
-    kernel.totalArea_ = totalArea;
-    kernel.numReg_ = totalRegions;
-
-    //Colocar janela com parametros para o usuario confirmar
-
-    if (isGrid) {
-      //Verifica se o iterador eh para um unico poligono
-      if (justOnePolygon_) {
-        TeDatabasePortal* portal = db_->getPortal();
-
-        string count = "SELECT c_object_id FROM " + regTheme_->layer()->tableName(TePOLYGONS)+",";
-        count += regTheme_->collectionTable() + " WHERE ";
-        count += regTheme_->layer()->tableName(TePOLYGONS) + ".object_id = ";
-        count += regTheme_->collectionTable() + ".c_object_id";
-        portal->freeResult();
-        if(portal->query(count))
-        {
-          if(portal->fetchRow())
-          {
-            count = portal->getData(0);		
-          }
-          else {
- 			      error(Uerror, tr("There is no polygons. Please, contact support!").latin1());
-            return false;
-          }
-        }
-		    delete portal;
-        TePolygonSet polygon;
-        if (!regTheme_->layer()->loadGeometrySet(count, polygon)) {
- 		    	error(Uerror, tr("There is no polygon boundary. Please, contact support!").latin1());
-          return false;
-        }
-        boundary_ = polygon.first();
-        if (boundary_.empty()) {
- 		    	error(Uerror, tr("There is no polygon boundary. Please, contact support!").latin1());
-          return false;
-        }
-        return kernel.apply(*((TePointTInstanceSet *)evSet1_),
-            (*((TeKernelGridSupport *)regSet_)).begin(boundary_), 
-            (*((TeKernelGridSupport *)regSet_)).end(boundary_));
-      }
-      else {
-        return kernel.apply(*((TePointTInstanceSet *)evSet1_),
-            (*((TeKernelGridSupport *)regSet_)).begin(), 
-            (*((TeKernelGridSupport *)regSet_)).end());
-      }
-    }
-    else {
-       return kernel.apply(*((TePointTInstanceSet *)evSet1_), 
-          (*((TeSTStatInstanceSet *)regSet_)).begin(), 
-          (*((TeSTStatInstanceSet *)regSet_)).end());
-    }
-  }  
-  return true;
-}
-
- 
-
-/**
- * Apply kernel method based on parameters definition
- *   Create event(s) set
- *   Create support set
- *   Execute suitable kernel method (basic, adaptive, ratio)
- *   Returns support set region
- **/
-bool TeKernelMethod::apply(void*& supportSet, QWidget* parent) 
-{
-	precision_ = -1;
-
-	//Verifies if there is an event theme
-	if (this->evTheme1_ == NULL) {
-		error(Uerror, tr("There is no event set for the kernel. Please, contact support!").latin1());
-		return false;
-	}
-
-	//Verifies if all themes are in the same projection
-	TeProjection* ev1 = this->evTheme1_->layer()->projection();
-	if (this->regTheme_ != NULL) {
-		TeProjection* reg = this->regTheme_->layer()->projection();
-		if (!(*reg == *ev1)) {
-			error(Warning,tr("All of the themes should be in the same projection!").latin1(),parent);
-			return false;
-		}
-	}
-
-	if (this->evTheme2_ != NULL) {
-		TeProjection* ev2 = this->evTheme2_->layer()->projection();
-		if (!(*ev1 == *ev2)) {
-			error(Warning,tr("All of the themes should be in the same projection!").latin1(),parent);
-			return false;
-		}
-	}
-
-	if (TeProgress::instance())
-	{
-		TeProgress::instance()->setTotalSteps(4);
-		TeProgress::instance()->setMessage(tr("Generating the support set...").latin1());
-		TeProgress::instance()->setProgress(1);
-	}
-	
-	// Generates support set
-	if (!this->generateSupportSet() ) {
-		if (TeProgress::instance())
-			TeProgress::instance()->reset();
-		error(Error, tr("It was not possible to create the support set!").latin1(), parent);
-		return false;
-	}
-	if (TeProgress::instance()) {
-		if (TeProgress::instance()->wasCancelled() ) {
-			TeProgress::instance()->reset();
-			return false;
-		}
-		else 
-		{
-			TeProgress::instance()->setMessage(tr("Generating the event set...").latin1());
-			TeProgress::instance()->setProgress(2);
-		}
-	}
-
-	// Generates first event set
-	if (!this->generateEventSet(1)) {
-		if (TeProgress::instance())
-			TeProgress::instance()->reset();
-		error(Error, tr("It was not possible to create the event set!").latin1(),parent);
-		return false;
-	}
-
-	if (TeProgress::instance()) {
-		if (TeProgress::instance()->wasCancelled()) {
-			TeProgress::instance()->reset();
-			return false;
-		}
-		else
-			TeProgress::instance()->setTotalSteps(4);
-	}
-
-
-	// Generates second event set
-	if (this->evTheme2_ != NULL) {
-		if (TeProgress::instance())
-		{
-			TeProgress::instance()->setTotalSteps(5);
-			TeProgress::instance()->setMessage(tr("Generating second event set...").latin1());
-			TeProgress::instance()->setProgress(3);
-		}
-		if (!this->generateEventSet(2)) {
-			if (TeProgress::instance())
-				TeProgress::instance()->reset();
-			error(Error, tr("It was not possible to create the event set 2!").latin1(),parent);
-			return false;
-		}
-	}
-
-	if (TeProgress::instance())
-	{
-		TeProgress::instance()->setTotalSteps(5);
-		TeProgress::instance()->setMessage(tr("Calculating Kernel Map...").latin1());
-		TeProgress::instance()->setProgress(4);
-	}
-
-	// Calls kernel functions
-	bool okKernel = this->call();
-	if (okKernel) 
-		supportSet = this->regSet_;
-
-  //Deallocate temporary values
-  if (this->evSet1_ != NULL)
-  {
-      delete (TePointTInstanceSet *)this->evSet1_;
-  }
-
-  if (this->evSet2_ != NULL)
-  {
-     delete (TePointTInstanceSet *)this->evSet2_;
-  }
-//    delete this->evSet2_;
-
-	return okKernel;
-}
-
-
-
-bool TeKernelMethod::getPrecision(int& prec) {
-
-  //Precisao ja foi calculada
-  if (precision_ >= 0) {
-    prec= precision_;
-    return true;
-  }
-
-  bool isGrid = isGridReg_ || isGridEv_;
-  if (isGrid) {
-    if (justOnePolygon_) {
-      if (this->getPrecision((*((TeKernelGridSupport *)regSet_)).begin(boundary_), 
-        (*((TeKernelGridSupport *)regSet_)).end(boundary_))) {
-        prec = precision_;
-        return true;
-      }
-      else
-        return false;
-    }
-    else {
-      if (this->getPrecision((*((TeKernelGridSupport *)regSet_)).begin(), 
-        (*((TeKernelGridSupport *)regSet_)).end())) {
-        prec = precision_;
-        return true;
-      }
-      else
-        return false;
-    }
-  }
-  if (this->getPrecision((*((TeSTStatInstanceSet *)regSet_)).begin(), 
-    (*((TeSTStatInstanceSet *)regSet_)).end())) {
-    prec = precision_;
-    return true;
-  }
-  else {
-    return false;
-  }
-
-}
-
-bool TeKernelMethod::setGridLayer(string name) {
-
-  this->resName_ = name;
-  this->gridLayer_ = NULL;
-
-  // Check whether there is a layer with this name in the database
-  TeLayerMap& layerMap = db_->layerMap();
-  TeLayerMap::iterator it;
-  for (it = layerMap.begin(); it != layerMap.end(); ++it)
-  {
-    if (it->second->name() == name)
-    {
-      this->gridLayer_ = it->second;
-      this->params_.generatedLayerId_ = it->second->id();
-      break;
-    }
-  }
-
-  //Vai criar uma nova -- verifica se nome esta ok
-  if (!gridLayer_)
-  {
-    size_t pos = name.find("-",string::npos,1);
-    if (pos != string::npos)
-    {
-		QMessageBox::warning( NULL, tr("Error"), 
-			tr("The layer name cannot have the \"-\" character!"));
-      return false;
-    }
-    char ch = name.at(0);
-    if (isdigit(ch))
-    {
-		QMessageBox::information( NULL, tr("Error"),
-			tr("The layer name cannot have numerical characters!"));
-      return false;
-    }
-  }
-
-  return true;
-}
-
-
-bool TeKernelMethod::createLayer(TeRaster* raster,
-                                 TerraViewBase* mWindow)
-{
- 
-  TeQtDatabasesListView* dbView = mWindow->getDatabasesListView();
-  if (!isNewLayer())  {
-
-    //Recupera item associado ao layer para poder remover 
-    TeQtLayerItem* lItPrev = dbView->currentLayerItem();
-    dbView->selectLayerItem(gridLayer_);
-    TeQtLayerItem* layerItem = dbView->currentLayerItem();
-    if (lItPrev != layerItem) {
-      mWindow->removeItem((TeQtCheckListItem*)layerItem);
-      if (lItPrev != NULL)
-        dbView->selectLayerItem(lItPrev->getLayer());
-    }
-    else {
-      mWindow->removeItem(layerItem);
-    }
-  }
-  TeLayer* l = new TeLayer(resName_, db_, raster->projection());
-  int bw, bh;
-  if (raster->params().ncols_ > 512)
-  {
-	  bw = 256;
-	  bh = 256;
-  }
-  else
-  {
-	  bw = raster->params().ncols_;
-	  bh = raster->params().nlines_;
-  }
-  if (!TeImportRaster(l,raster,bw,bh, TeNoCompression,"", -TeMAXFLOAT, true, TeNoExpansible))
-  {  
-    return false;
-  }
-  
-  params_.generatedLayerId_ = l->id();
-  
-  TeQtDatabaseItem *dbItem = dbView->currentDatabaseItem();
-  
-  TeQtLayerItem *layerItem = 
-    new TeQtLayerItem((QListViewItem*)dbItem,l->name().c_str(), l);
-  layerItem->setEnabled(true);
-  if (!dbView->isOpen(layerItem->parent()))
-				dbView->setOpen(layerItem->parent(),true);
-  mWindow->checkWidgetEnabling();
-
-  //Verifica se existe tema com mesmo nome e remove
-  vector<TeViewNode*>& themeVec = mWindow->currentView()->themes();
-  TeThemeApplication* theme;
-  unsigned int i;
-  for (i = 0; i < themeVec.size(); i++) {
-    theme = (TeThemeApplication *)themeVec[i];
-    if (!resName_.compare(theme->name())) {
-      TeQtViewsListView* viewList = mWindow->getViewsListView();
-      TeQtThemeItem* themeItem = viewList->getThemeItem(theme);
-      if (themeItem != NULL)
-        mWindow->removeItem((TeQtCheckListItem*)themeItem);
-    }
-  }
-
-	TeAttrTableVector ATV;
-  if (! mWindow->createTheme(resName_, mWindow->currentView(), l, "", ATV))
-    return false;
-
-
-  //Recupera apontador para o tema criado
-
-  themeVec = mWindow->currentView()->themes();
-  for (i = 0; i < themeVec.size(); i++) {
-    theme = (TeThemeApplication *)themeVec[i];
-    if (!resName_.compare(theme->name())) {
-      this->rasterTheme_ = theme;
-    }
-  }
-  if (this->rasterTheme_ == NULL) {
-      QMessageBox::information( NULL, tr("Error"),
-		  tr("There is no theme with the raster representation!"));
-      return false;
-  }
-  return true;
-}
-
-bool TeKernelMethod::createColumn(TeThemeApplication* currTheme,
-                         TeQtGrid* grid) 
-{
-
-	grid->clear();
-	if(!insertPropertyColumn(*((TeSTStatInstanceSet *)this->regSet_),
-      0, this->regTheme_, params_.supportThemeTable_, params_.supportThemeAttr_))
-	  return false;
-
-	 // ---------------------------------------------- load updated table from database 
-	// Update all the themes that uses this table
-	TeViewMap& viewMap = this->db_->viewMap();
-	TeViewMap::iterator it;
-	set<TeLayer*> layerSet;
-	for (it = viewMap.begin(); it != viewMap.end(); ++it)
-	{
-		TeView *view = it->second;
-		vector<TeViewNode*>& themesVector = view->themes();
-		for (unsigned int i = 0; i < themesVector.size(); ++i)
-		{
-			TeTheme *theme = (TeThemeApplication*)themesVector[i];
-			if (theme->isThemeTable(params_.supportThemeTable_) == true)
-			{
-				theme->loadThemeTables();
-				layerSet.insert(theme->layer());
-			}
-		}
-	}
-
-	// Update the layer tables affected
-	set<TeLayer*>::iterator setIt;
-	for (setIt = layerSet.begin(); setIt != layerSet.end(); ++setIt)
-		(*setIt)->loadLayerTables();
-
-	// ---------------------------------------------- grid 
-	if(currTheme!= NULL)
-	{
-		grid->init(currTheme);
-		grid->refresh();
-		grid->goToLastColumn();
-	}
-
-	return true;
-}
-
-//Alterando pois soh precisa internamente
-bool TeKernelMethod::createKernelLegends(int nColors, bool /* color */)
-{
-  	int precision;
-	if (!getPrecision(precision)) 
-	{
-		QMessageBox::critical(NULL, tr("Error"), 
-		tr("Unexpected error in the evaluation of the kernel precision!"));
-		return false;
-	}
-  
-	// recupera o tema sobre o qual foi calculado kernel
-	TeThemeApplication* theme;
-	if (this->rasterTheme_ != NULL)
-		theme = this->rasterTheme_;
-	else
-		theme = this->regTheme_;
-
-	TeAttributeRep rep;				  
-	rep.type_ = TeREAL;
-
-	TeGrouping* groupKernel = new TeGrouping();
-	groupKernel->groupNumSlices_ = nColors;
-	groupKernel->groupPrecision_ = precision;
-
-	if (theme->layer()->geomRep() & TeRASTER)    // suporte foi grade
-	{
-		groupKernel->groupMode_ = TeRasterSlicing;
-		rep.name_ = "0";
-	}
-	else										// suporte foi regioes
-	{
-		groupKernel->groupMode_ = TeEqualSteps;
-		rep.name_ = this->params_.supportThemeTable_ + "." + this->params_.supportThemeAttr_;
-	}
-	groupKernel->groupAttribute_ = rep;
-
-	if (!theme->buildGrouping(groupKernel))
-		return false;
-  
-	theme->groupColor("Cy-G-Y-Or-R");
-	vector<string> colorRamp;
-	colorRamp.push_back("CYAN");
-	colorRamp.push_back("GREEN");
-	colorRamp.push_back("YELLOW");
-	colorRamp.push_back("ORANGE");
-	colorRamp.push_back("RED");
-
-	// cria rampa de cores default para dados de kernel e define visual de cada fatia
-	vector<TeColor> colorGrad;
-	getColors(colorRamp,10, colorGrad);
-	for (int g=0; g<theme->grouping()->groupNumSlices_; g++)
-	{
-		TeVisual visual(TePOLYGONS);            
-		visual.color(colorGrad[g]);
-		if((theme->layer()->geomRep() & TePOLYGONS) || 
-		   (theme->layer()->geomRep() & TeCELLS) || 
-		   (theme->layer()->geomRep() & TeRASTER))
-		{
-			visual.transparency(theme->defaultLegend().visual(TePOLYGONS).transparency());
-			visual.contourStyle(theme->defaultLegend().visual(TePOLYGONS).contourStyle());
-			visual.contourWidth(theme->defaultLegend().visual(TePOLYGONS).contourWidth());
-			visual.contourColor(theme->defaultLegend().visual(TePOLYGONS).contourColor());	
-			theme->setGroupingVisual(g+1,visual,TePOLYGONS);
-		}
-		if(theme->layer()->geomRep() & TeLINES)
-		{
-			visual.style(theme->defaultLegend().visual(TeLINES).style());
-			visual.width(theme->defaultLegend().visual(TeLINES).width());
-			theme->setGroupingVisual(g+1,visual,TeLINES);
-		}
-		else if(theme->layer()->geomRep() & TePOINTS)
-		{
-			visual.style(theme->defaultLegend().visual(TePOINTS).style());
-			visual.size(theme->defaultLegend().visual(TePOINTS).size());
-			theme->setGroupingVisual(g+1,visual,TePOINTS);
-		}
-	}
-	colorGrad.clear();
-
-	// acrescenta algumas informacoes relativas ao theme application
-	theme->countObj(false);
-	theme->mixColor(true);
-	theme->groupColorDir(TeColorAscSatEnd);
-	if (!theme->saveGrouping())
-		return false;
-	
-	theme->visibleRep(theme->visibleRep() | 0x40000000);
-	updateThemeApplication(this->db_,theme);
-
-	if (this->rasterTheme_ != NULL)
-		theme->setAlias("0",tr("Kernel Values").latin1());
-	return true;
-}
-
diff --git a/src/terralib/application/qt/TeQtTerraStat.h b/src/terralib/application/qt/TeQtTerraStat.h
deleted file mode 100644
index 2e53273..0000000
--- a/src/terralib/application/qt/TeQtTerraStat.h
+++ /dev/null
@@ -1,207 +0,0 @@
-#ifndef  __TERRALIB_INTERNAL_QTTERRASTAT_H
-#define  __TERRALIB_INTERNAL_QTTERRASTAT_H
-/***
- * Implementa suporte para as funcoes do TerraStat
- * Objetivo -- soh nao manter a parte de geracao de eventos,
- * etc no ui, que podera ser reaproveitado.
- ****/
-
-#include "TeDatabase.h"
-#include "TeKernelParams.h"
-#include <qmessagebox.h>
-#include <terraViewBase.h>
-
-
-#define STAT_PRECISION   12
-/////////////////////////////////////////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////////////////////
-
-class TeSTElementSet;
-class TeSTStatInstanceSet;
-
-/**
- * Grava uma coluna na tabela de atributos associada a um STOSet.
- * Nome da coluna eh o mesmo nome da propriedade
- **/
-bool insertPropertyColumn(TeSTElementSet& stoSet,
-                          const string& tableName,
-                          const string& columnName);
-
-bool insertPropertyColumn(TeSTStatInstanceSet& stSet,
-                          int idxDoubleProp,
-                          TeTheme* theme,
-                          const string& tableName,
-                          const string& columnName);
-
-/***
- * Cria um STOSet a partir de um tema e um conjunto de atributos,
- * colocando todas as tabelas do TEMA
- ***/
-bool createSTOSetFromTheme(TeTheme* theme, 
-                              vector<string>& attributes,
-                              TeSTElementSet* rs);
-
-
-/***
- * Cria um STOSet a partir de um tema e um conjunto de atributos,
- * colocando todas as tabelas do TEMA
- ***/
-bool createSTOStatSetFromTheme(TeTheme* theme, 
-                               vector<string>& attributes,
-                               int additionalDouble,
-                               TeSTStatInstanceSet* rs);
-
- 
-enum TeKernelErrorType {Uerror, Error, Warning};
-
-
-///Retorna legenda do kernel
-bool getKernelLegend(TeKernelParams& par, vector<string>& legend);
-
-/** Classe para aplicar o metodo de Kernel **/
-class TeKernelMethod : public QWidget {
-
-	Q_OBJECT
-
-protected:
-    TeTheme*                  evTheme1_;
-    TeTheme*                  evTheme2_;
-    TeThemeApplication*       regTheme_;
-    TeThemeApplication*       rasterTheme_;
-
-
-    /**
-     * Pointers to containers -- void since different types may apply
-     * should dispose them
-     **/
-    void*          evSet1_;
-    void*          evSet2_;
-    void*          regSet_;
-    int            precision_;
-    TeLayer*       gridLayer_;
-    bool           justOnePolygon_;
-    TePolygon      boundary_;
-
-    bool           call();
-    bool           generateEventSet(int which);
-    bool           generateSupportSet();
-    void           error(TeKernelErrorType type, string message, 
-						QWidget* parent = 0);
-
-
-    //Calcula a precisao para um conjunto de valores
-    template<typename SetIt> 
-    bool           getPrecision(SetIt itBegin, SetIt itEnd) {
-      
-      
-      SetIt it = itBegin;
-      
-      double max = -TeMAXFLOAT;
-      double min = TeMAXFLOAT;
-      
-      double kValue;
-      while (it != itEnd) {
-        
-        if ((*it).getDoubleProperty(0, kValue)) {
-          if (kValue > max)
-            max = kValue;
-          if ((kValue > 0) && (kValue < min))
-            min = kValue;
-        }
-        ++it;
-      }
-      
-      if (min == TeMAXFLOAT)
-        return false;
-      if (max == -TeMAXFLOAT)
-        return false;
-
-      double diff = max - min;
-
-      double prec = log10(diff);
-      //Diferenca esta antes da virgula
-      if (prec > 0) {
-        precision_ = 2;
-      }
-      else {
-        precision_ = (int)(ceil(fabs(prec)) + 3);
-      }
-      return true;
-    }
-    
-
-public:
-
-    TeKernelParams params_;
-
-    /** Geracao de conjuntos **/
-    bool           isPoint1_;
-    bool           isPoint2_;
-
-    bool           isGridEv_;
-    bool           isGridReg_;
-    int            gridCols_;
-    TeDatabase*    db_;
-    string         resName_; //Nome do layer ou da coluna gerada
-
-    TeKernelMethod():
-		evTheme1_(0),
-		evTheme2_(0),
-		regTheme_(0),
-		rasterTheme_(0),
-		evSet1_(0),
-		evSet2_(0),
-		regSet_(0),
-		precision_(-1),
-		isPoint1_(true),
-		isPoint2_(true),
-		isGridEv_(false),
-		isGridReg_(false),
-		gridCols_(0),
-		db_(0)
-		{}
-
-    //Recupera tema e inicializa os parametros necessarios
-    bool setTheme(string name, int id, TeView* view); 
-
-    //Define nome de layer para criacao de grid
-    bool setGridLayer(string name);
-
-    //Verifica se layer eh nova
-    bool isNewLayer() {
-      return gridLayer_ == NULL;
-    }
-
-    //Cria layer de grid para criar uma nova
-    bool createLayer(TeRaster* raster, TerraViewBase* mWindow);
-
-    bool createColumn(TeThemeApplication* currTheme, TeQtGrid* grid);
-
-    //Aplica o metodo de kernel
-    bool apply(void*& regSet, QWidget* parent);
-
-    //Recupera precisao dos dados
-    //Definida como prec(max - min) + 3
-    bool getPrecision(int& prec);
-
-    TeTheme* getTheme(int id) {
-      if (id == 0)
-        return (TeTheme *)regTheme_;
-      if (id == 1)
-        return evTheme1_;
-      if (id == 2)
-        return evTheme2_;
-      return NULL;
-    }
-
-    bool createKernelLegends(int nColors, bool color);
-
-	TeThemeApplication* regTheme()
-	{	return regTheme_; }
-
-	TeThemeApplication* rasterTheme()
-	{	return rasterTheme_; }
-
-};
-
-#endif
diff --git a/src/terralib/application/qt/TeQtTextEdit.cpp b/src/terralib/application/qt/TeQtTextEdit.cpp
deleted file mode 100644
index 03f3a78..0000000
--- a/src/terralib/application/qt/TeQtTextEdit.cpp
+++ /dev/null
@@ -1,862 +0,0 @@
-/************************************************************************************
-TerraView - visualization and exploration of geographical databases
-using TerraLib.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-This file is part of TerraView. TerraView is free software; you can redistribute it 
-and/or modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-You should have received a copy of the GNU General Public License
-along with TerraView.
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The software provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use of
-this program and its documentation.
-*************************************************************************************/
-
-#include <TeQtTextEdit.h>
-#include <TeDefines.h>
-
-TeQtTextEdit::TeQtTextEdit()
-{
-	canvas_ = 0;
-	edit_ = false;
-	mode_ = 0;
-}
-
-TeQtTextEdit::TeQtTextEdit(TeText& tx, TeVisual v, TeQtBasicCanvas* canvas)
-{
-	edit_ = true;
-	mode_ = 0;
-	canvas_ = canvas;
-	text_ = tx;
-	visual_ = v;
-	change();
-}
-
-TeQtTextEdit::~TeQtTextEdit ()
-{
-}
-
-void 
-TeQtTextEdit::change(QPoint p, bool apxAngle)
-{
-	double angle, dx, dy;
-
-	if(mode_ == 1) // change angle from left
-	{
-		dx = -(p.x() - pCenter_.x());
-		dy = p.y() - pCenter_.y();
-
-		if(apxAngle)
-		{
-			double fdx = fabs(dx);
-			double fdy = fabs(dy);
-			if(fdx < fdy)
-			{
-				if(4*fdx < fdy)
-					dx = 0.;
-				else
-				{
-					fdx = fdy;
-					if(dx >= 0)
-						dx = fdx;
-					else
-						dx = -fdx;
-				}
-			}
-			else
-			{
-				if(4*fdy < fdx)
-					dy = 0.;
-				else
-				{
-					fdy = fdx;
-					if(dy >= 0)
-						dy = fdy;
-					else
-						dy = -fdy;
-				}
-			}
-		}
-		if(dx == 0)
-		{
-			if(dy > 0)
-				angle = 90;
-			else
-				angle = 270;
-		}
-		else
-		{
-			if(dx > 0)
-				angle = atan(dy/dx) * 180. / TePI;
-			else
-				angle = atan(dy/dx) * 180. / TePI + 180;
-		}
-		text_.setAngle(angle);
-	}
-	else if(mode_ == 2) // change angle from right
-	{
-		dx = p.x() - pCenter_.x();
-		dy = -(p.y() - pCenter_.y());
-
-		if(apxAngle)
-		{
-			double fdx = fabs(dx);
-			double fdy = fabs(dy);
-			if(fdx < fdy)
-			{
-				if(4*fdx < fdy)
-					dx = 0.;
-				else
-				{
-					fdx = fdy;
-					if(dx >= 0)
-						dx = fdx;
-					else
-						dx = -fdx;
-				}
-			}
-			else
-			{
-				if(4*fdy < fdx)
-					dy = 0.;
-				else
-				{
-					fdy = fdx;
-					if(dy >= 0)
-						dy = fdy;
-					else
-						dy = -fdy;
-				}
-			}
-		}
-		if(dx == 0)
-		{
-			if(dy > 0)
-				angle = 90;
-			else
-				angle = 270;
-		}
-		else
-		{
-			if(dx > 0)
-				angle = atan(dy/dx) * 180. / TePI;
-			else
-				angle = atan(dy/dx) * 180. / TePI + 180;
-		}
-		text_.setAngle(angle);
-	}
-	else if(mode_ == 3 || mode_ == 4) // change size
-	{
-		if(visual_.fixedSize() == false)
-		{
-			double dx = fabs(double(pCenter_.x() - p.x()));
-			double dy = fabs(double(pCenter_.y() - p.y()));
-			int h = apx(sqrt(dx*dx + dy*dy));
-
-			double dh, hc, c = 1.;
-
-			hc = h * c;
-			dh = canvas_->mapVtoDW((int)hc);
-			text_.setHeight(dh);
-			QRect r = canvas_->textRect (text_, visual_);
-			while(r.height()/2 <= h-1)
-			{
-				c *= 1.01;
-				hc = h * c;
-				dh = canvas_->mapVtoDW((int)hc);
-				text_.setHeight(dh);
-				r = canvas_->textRect (text_, visual_);
-			}
-		}
-	}
-	else if(mode_ == 5) // change position
-	{
-		TeCoord2D pt = canvas_->mapVtoDW(p);
-		text_.add(pt);
-	}
-	change();
-}
-
-void 
-TeQtTextEdit::init(TeText& tx, TeVisual v, TeQtBasicCanvas* canvas)
-{
-	edit_ = true;
-	mode_ = 0;
-	canvas_ = canvas;
-	text_ = tx;
-	visual_ = v;
-	change();
-}
-
-void 
-TeQtTextEdit::change()
-{
-	QRect rect = canvas_->textRect(text_, visual_);
-
-	pCenter_ = rect.center();
-
-	pLeft_ = rect.center();
-	pLeft_.setX(rect.left()+3);
-
-	pRight_ = rect.center();
-	pRight_.setX(rect.right()-3);
-
-	pTop_ = rect.center();
-	pTop_.setY(rect.top()+3);
-
-	pBottom_ = rect.center();
-	pBottom_.setY(rect.bottom()-3);
-
-	double angle = text_.angle();
-	if(angle == 0)
-	{
-//		canvas_->plotOnWindow();
-//		canvas_->plotTextRects(text_, visual_);
-//		canvas_->plotOnPixmap0();
-		return;
-	}
-
-	int	nx, ny;
-	double	d;
-
-	d = fabs(double(pRight_.x() - pCenter_.x()));
-	nx = pCenter_.x() + apx(cos(angle*TePI/180.) * d);
-	ny = pCenter_.y() - apx(sin(angle*TePI/180.) * d);
-	pRight_ = QPoint(nx, ny);
-
-	d = fabs(double(pLeft_.x() - pCenter_.x()));
-	nx = pCenter_.x() + apx(cos((180.+angle)*TePI/180.) * d);
-	ny = pCenter_.y() - apx(sin((180.+angle)*TePI/180.) * d);
-	pLeft_ = QPoint(nx, ny);
-
-	d = fabs(double(pTop_.y() - pCenter_.y()));
-	nx = pCenter_.x() + apx(cos((90.+angle)*TePI/180.) * d);
-	ny = pCenter_.y() - apx(sin((90.+angle)*TePI/180.) * d);
-	pTop_ = QPoint(nx, ny);
-
-	d = fabs(double(pBottom_.y() - pCenter_.y()));
-	nx = pCenter_.x() + apx(cos((270.+angle)*TePI/180.) * d);
-	ny = pCenter_.y() - apx(sin((270.+angle)*TePI/180.) * d);
-	pBottom_ = QPoint(nx, ny);
-
-//	canvas_->plotTextRects(text_, visual_);
-}
-
-int
-TeQtTextEdit::apx(double d)
-{
-	if(d >= 0)
-		return (int)(d+.5);
-	else
-		return (int)(d-.5);
-}
-
-int
-TeQtTextEdit::located(QPoint& p)
-{
-	QRect rLeft(0, 0, 6, 6), rRight(0, 0, 6, 6), rTop(0, 0, 6, 6), rBottom(0, 0, 6, 6), rCenter(0, 0, 6, 6);
-	rLeft.moveCenter(pLeft_);
-	rRight.moveCenter(pRight_);
-	rTop.moveCenter(pTop_);
-	rBottom.moveCenter(pBottom_);
-	rCenter.moveCenter(pCenter_);
-
-	mode_ = 0;
-	double d, m = TeMAXFLOAT;
-
-	if(rLeft.contains(p))
-	{
-		QPoint a(rLeft.left() + rLeft.width()/2, rLeft.left() + rLeft.height()/2);
-		d = (p.x()-a.x())*(p.x()-a.x()) + (p.y()-a.y())*(p.y()-a.y());
-		m = MIN(m, d);
-		if(m == d)
-			mode_ = 1;
-	}
-	if(rRight.contains(p))
-	{
-		QPoint a(rRight.left() + rRight.width()/2, rRight.left() + rRight.height()/2);
-		d = (p.x()-a.x())*(p.x()-a.x()) + (p.y()-a.y())*(p.y()-a.y());
-		m = MIN(m, d);
-		if(m == d)
-			mode_ = 2;
-	}
-	if(rTop.contains(p))
-	{
-		QPoint a(rTop.left() + rTop.width()/2, rTop.left() + rTop.height()/2);
-		d = (p.x()-a.x())*(p.x()-a.x()) + (p.y()-a.y())*(p.y()-a.y());
-		m = MIN(m, d);
-		if(m == d)
-			mode_ = 3;
-	}
-	if(rBottom.contains(p))
-	{
-		QPoint a(rBottom.left() + rBottom.width()/2, rBottom.left() + rBottom.height()/2);
-		d = (p.x()-a.x())*(p.x()-a.x()) + (p.y()-a.y())*(p.y()-a.y());
-		m = MIN(m, d);
-		if(m == d)
-			mode_ = 4;
-	}
-	if(rCenter.contains(p))
-	{
-		QPoint a(rCenter.left() + rCenter.width()/2, rCenter.left() + rCenter.height()/2);
-		d = (p.x()-a.x())*(p.x()-a.x()) + (p.y()-a.y())*(p.y()-a.y());
-		m = MIN(m, d);
-		mode_ = 5;
-	}
-
-	if(mode_ == 1)
-		pLeft_ = p;
-	else if(mode_ == 2)
-		pRight_ = p;
-	else if(mode_ == 3)
-		pTop_ = p;
-	else if(mode_ == 4)
-		pBottom_ = p;
-	else if(mode_ == 5)
-		pCenter_ = p;
-
-	return mode_;
-}
-
-bool
-TeQtTextEdit::isHotPoint(QPoint& p)
-{
-	QRect rLeft(0, 0, 6, 6), rRight(0, 0, 6, 6), rTop(0, 0, 6, 6), rBottom(0, 0, 6, 6), rCenter(0, 0, 6, 6);
-	rLeft.moveCenter(pLeft_);
-	rRight.moveCenter(pRight_);
-	rTop.moveCenter(pTop_);
-	rBottom.moveCenter(pBottom_);
-	rCenter.moveCenter(pCenter_);
-
-	mode_ = 0;
-	double d, m = TeMAXFLOAT;
-
-	if(rLeft.contains(p))
-	{
-		QPoint a(rLeft.left() + rLeft.width()/2, rLeft.left() + rLeft.height()/2);
-		d = (p.x()-a.x())*(p.x()-a.x()) + (p.y()-a.y())*(p.y()-a.y());
-		m = MIN(m, d);
-		if(m == d)
-			mode_ = 1;
-	}
-	if(rRight.contains(p))
-	{
-		QPoint a(rRight.left() + rRight.width()/2, rRight.left() + rRight.height()/2);
-		d = (p.x()-a.x())*(p.x()-a.x()) + (p.y()-a.y())*(p.y()-a.y());
-		m = MIN(m, d);
-		if(m == d)
-			mode_ = 2;
-	}
-	if(rTop.contains(p))
-	{
-		QPoint a(rTop.left() + rTop.width()/2, rTop.left() + rTop.height()/2);
-		d = (p.x()-a.x())*(p.x()-a.x()) + (p.y()-a.y())*(p.y()-a.y());
-		m = MIN(m, d);
-		if(m == d)
-			mode_ = 3;
-	}
-	if(rBottom.contains(p))
-	{
-		QPoint a(rBottom.left() + rBottom.width()/2, rBottom.left() + rBottom.height()/2);
-		d = (p.x()-a.x())*(p.x()-a.x()) + (p.y()-a.y())*(p.y()-a.y());
-		m = MIN(m, d);
-		if(m == d)
-			mode_ = 4;
-	}
-	if(rCenter.contains(p))
-	{
-		QPoint a(rCenter.left() + rCenter.width()/2, rCenter.left() + rCenter.height()/2);
-		d = (p.x()-a.x())*(p.x()-a.x()) + (p.y()-a.y())*(p.y()-a.y());
-		m = MIN(m, d);
-		mode_ = 5;
-	}
-
-	if(mode_ > 0)
-		return true;
-	return false;
-}
-
-void
-TeQtTextEdit::endEdit()
-{
-	edit_ = false;
-	mode_ = 0;
-}
-
-int
-TeQtTextEdit::mode()
-{
-	return mode_;
-}
-
-void
-TeQtTextEdit::mode(int mode)
-{
-	mode_ = mode;
-}
-
-bool
-TeQtTextEdit::edit()
-{
-	return edit_;
-}
-
-TeText
-TeQtTextEdit::text()
-{
-	return text_;
-}
-
-void
-TeQtTextEdit::text(TeText t)
-{
-	text_ = t;
-}
-
-void
-TeQtTextEdit::height(double h)
-{
-	text_.setHeight(h);
-}
-
-void
-TeQtTextEdit::angle(double a)
-{
-	text_.setAngle(a);
-}
-
-void
-TeQtTextEdit::addPosition(TeCoord2D p)
-{
-	TeCoord2D tp = text_.location();
-	tp += p;
-	text_.add(tp);
-}
-
-TeQtBasicCanvas*
-TeQtTextEdit::canvas()
-{
-	return canvas_;
-}
-
-QRect
-TeQtTextEdit::getRect()
-{
-	QRect rect = canvas_->textRect(text_, visual_);
-	int	x1 = rect.left();
-	int	y1 = rect.top();
-	int	x2 = rect.right();
-	int	y2 = rect.bottom();
-
-	double angle = text_.angle() * -1;
-	if(!(angle == 0 || angle == 90 || angle == 180 || angle == 270))
-	{
-		double d, dx, dy, alfa, beta;
-		QPoint c = rect.center();
-		QPoint p, p1, p2, p3, p4;
-
-		p = QPoint(x1, y1);
-		dx = p.x() - c.x();
-		dy = p.y() - c.y();
-		alfa = atan(dy/dx) * 180. / TePI;
-		if(dx<0)
-			alfa = 180. + alfa;
-		else if(dx>=0 && dy<0)
-			alfa = 360. + alfa;
-		beta = alfa + angle;
-		d = sqrt(double((p.x()-c.x()) * (p.x()-c.x()) + (p.y()-c.y()) * (p.y()-c.y())));
-		p1.setX(c.x() + TeRound(cos(beta*TePI/180.) * d));
-		p1.setY(c.y() + TeRound(sin(beta*TePI/180.) * d));
-
-		p = QPoint(x1, y2);
-		dx = p.x() - c.x();
-		dy = p.y() - c.y();
-		alfa = atan(dy/dx) * 180. / TePI;
-		if(dx<0)
-			alfa = 180. + alfa;
-		else if(dx>=0 && dy<0)
-			alfa = 360. + alfa;
-		beta = alfa + angle;
-		d = sqrt(double((p.x()-c.x()) * (p.x()-c.x()) + (p.y()-c.y()) * (p.y()-c.y())));
-		p2.setX(c.x() + TeRound(cos(beta*TePI/180.) * d));
-		p2.setY(c.y() + TeRound(sin(beta*TePI/180.) * d));
-
-		p = QPoint(x2, y1);
-		dx = p.x() - c.x();
-		dy = p.y() - c.y();
-		alfa = atan(dy/dx) * 180. / TePI;
-		if(dx<0)
-			alfa = 180. + alfa;
-		else if(dx>=0 && dy<0)
-			alfa = 360. + alfa;
-		beta = alfa + angle;
-		d = sqrt(double((p.x()-c.x()) * (p.x()-c.x()) + (p.y()-c.y()) * (p.y()-c.y())));
-		p3.setX(c.x() + TeRound(cos(beta*TePI/180.) * d));
-		p3.setY(c.y() + TeRound(sin(beta*TePI/180.) * d));
-
-		p = QPoint(x2, y2);
-		dx = p.x() - c.x();
-		dy = p.y() - c.y();
-		alfa = atan(dy/dx) * 180. / TePI;
-		if(dx<0)
-			alfa = 180. + alfa;
-		else if(dx>=0 && dy<0)
-			alfa = 360. + alfa;
-		beta = alfa + angle;
-		d = sqrt(double((p.x()-c.x()) * (p.x()-c.x()) + (p.y()-c.y()) * (p.y()-c.y())));
-		p4.setX(c.x() + TeRound(cos(beta*TePI/180.) * d));
-		p4.setY(c.y() + TeRound(sin(beta*TePI/180.) * d));
-
-		x1 = MIN(p1.x(), p2.x());
-		x1 = MIN(x1, p3.x());
-		x1 = MIN(x1, p4.x());
-		y1 = MIN(p1.y(), p2.y());
-		y1 = MIN(y1, p3.y());
-		y1 = MIN(y1, p4.y());
-		x2 = MAX(p1.x(), p2.x());
-		x2 = MAX(x2, p3.x());
-		x2 = MAX(x2, p4.x());
-		y2 = MAX(p1.y(), p2.y());
-		y2 = MAX(y2, p3.y());
-		y2 = MAX(y2, p4.y());
-
-		rect.setLeft(x1);
-		rect.setTop(y1);
-		rect.setRight(x2);
-		rect.setBottom(y2);
-	}
-	return rect;
-//	QRect rect;
-//	int	x1, y1, x2, y2;
-
-//	x1 = pLeft_.x();
-//	x1 = MIN(x1, pRight_.x());
-//	x1 = MIN(x1, pTop_.x());
-//	x1 = MIN(x1, pBottom_.x());
-
-//	y1 = pLeft_.y();
-//	y1 = MIN(y1, pRight_.y());
-//	y1 = MIN(y1, pTop_.y());
-//	y1 = MIN(y1, pBottom_.y());
-
-//	x2 = pLeft_.x();
-//	x2 = MAX(x2, pRight_.x());
-//	x2 = MAX(x2, pTop_.x());
-//	x2 = MAX(x2, pBottom_.x());
-
-//	y2 = pLeft_.y();
-//	y2 = MAX(y2, pRight_.y());
-//	y2 = MAX(y2, pTop_.y());
-//	y2 = MAX(y2, pBottom_.y());
-
-//	if(text_.angle() == 0 || text_.angle() == 90 || text_.angle() == 180 || text_.angle() == 270)
-//		rect = QRect(x1-3, y1-3, x2-x1+7, y2-y1+7);
-//	else
-//	{
-//		int h = y2 - y1;
-//		int w = x2 - x1;
-//		int	d = h;
-//		if(w < h)
-//			d = w;
-//		x1 -= d;
-//		y1 -= d;
-//		x2 += d;
-//		y2 += d;
-//		rect = QRect(x1, y1, x2-x1, y2-y1);
-//	}
-//	return rect;
-}
-
-QRect
-TeQtTextEdit::getHRect()
-{
-	return canvas_->textRect(text_, visual_);
-}
-
-TeQtMultiTextEdit::TeQtMultiTextEdit()
-{
-	current_ = -1;
-	selMode_ = false;
-}
-
-TeQtMultiTextEdit::~TeQtMultiTextEdit()
-{
-}
-
-int
-TeQtMultiTextEdit::size()
-{
-	return textVec_.size();
-}
-
-void
-TeQtMultiTextEdit::push(TeQtTextEdit t)
-{
-	int geomId = t.text().geomId();
-	if(geomIdSet_.find(geomId) == geomIdSet_.end())
-	{
-		geomIdSet_.insert(geomId);
-		textVec_.push_back(t);
-		current_ = textVec_.size() - 1;
-	}
-}
-
-void
-TeQtMultiTextEdit::change()
-{
-	if(current_ == -1)
-		return;
-
-//	canvas->plotOnWindow();
-	unsigned int i;
-	for(i=0; i<textVec_.size(); i++)
-	{
-		TeQtTextEdit& t = textVec_[i];
-		t.change();
-	}
-}
-
-void
-TeQtMultiTextEdit::change(QPoint p, bool apxAngle)
-{
-	if(current_ == -1)
-		return;
-
-	TeQtTextEdit& t = textVec_[current_];
-	TeCoord2D pa = t.text().location();
-	t.change(p, apxAngle);
-	TeCoord2D pb = t.text().location();
-	TeCoord2D poffset(pb.x()-pa.x(), pb.y()-pa.y());
-
-	if(t.mode()==1 || t.mode()==2)
-		angle(t.text().angle());
-	else if(t.mode()==3 || t.mode()==4)
-		height(t.text().height());
-	else if(t.mode() == 5)
-		addPosition(poffset);
-	change();
-}
-
-int 
-TeQtMultiTextEdit::located(QPoint& p)
-{
-	unsigned int i;
-	int mode = 0;
-	for(i=0; i<textVec_.size(); i++)
-	{
-		TeQtTextEdit& t = textVec_[i];
-		mode = t.located(p);
-		if(mode)
-		{
-			current_ = i;
-			break;
-		}
-	}
-	return mode;
-}
-
-bool
-TeQtMultiTextEdit::isHotPoint(QPoint& p)
-{
-	if(textVec_.size() == 0)
-		return false;
-
-	unsigned int i;
-	for(i=0; i<textVec_.size(); i++)
-	{
-		TeQtTextEdit& t = textVec_[i];
-		if(t.isHotPoint(p))
-		{
-			current_ = i;
-			break;
-		}
-	}
-	if(i < textVec_.size())
-		return true;
-	return false;
-}
-
-void
-TeQtMultiTextEdit::endEdit()
-{
-	unsigned int i;
-	for(i=0; i<textVec_.size(); i++)
-	{
-		TeQtTextEdit& t = textVec_[i];
-		t.endEdit();
-	}
-	textVec_.clear();
-	geomIdSet_.clear();
-}
-
-int
-TeQtMultiTextEdit::mode()
-{
-	if(current_ >= 0)
-		return textVec_[current_].mode();
-	return 0;
-}
-
-void
-TeQtMultiTextEdit::mode(int m)
-{
-	if(current_ >= 0)
-		textVec_[current_].mode(m);
-}
-
-bool
-TeQtMultiTextEdit::selMode()
-{
-	return selMode_;
-}
-
-void
-TeQtMultiTextEdit::selMode(bool m)
-{
-	selMode_ = m;
-}
-
-bool
-TeQtMultiTextEdit::edit()
-{
-	if(current_ >= 0)
-		return textVec_[current_].edit();
-	return false;
-}
-
-TeText
-TeQtMultiTextEdit::text(int i)
-{
-	TeText t;
-	if(i<(int)textVec_.size())
-		return textVec_[i].text();
-	else
-		return t;
-}
-
-TeVisual
-TeQtMultiTextEdit::visual(int i)
-{
-	TeVisual v;
-	if(i<(int)textVec_.size())
-		return textVec_[i].visual();
-	else
-		return v;
-}
-
-void
-TeQtMultiTextEdit::height(double h)
-{
-	int i;
-	for(i=0; i<(int)textVec_.size(); i++)
-	{
-		if(i == current_)
-			continue;
-		TeQtTextEdit& t = textVec_[i];
-		t.height(h);
-	}
-}
-
-void
-TeQtMultiTextEdit::angle(double a)
-{
-	int i;
-	for(i=0; i<(int)textVec_.size(); i++)
-	{
-		if(i == current_)
-			continue;
-		TeQtTextEdit& t = textVec_[i];
-		t.angle(a);
-	}
-}
-
-void
-TeQtMultiTextEdit::addPosition(TeCoord2D p)
-{
-	int i;
-	for(i=0; i<(int)textVec_.size(); i++)
-	{
-		if(i == current_)
-			continue;
-		TeQtTextEdit& t = textVec_[i];
-		t.addPosition(p);
-	}
-}
-
-QRect
-TeQtMultiTextEdit::getRect()
-{
-	QRect	rect;
-	int i;
-	for(i=0; i<(int)textVec_.size(); i++)
-	{
-		TeQtTextEdit& t = textVec_[i];
-		rect = rect | t.getRect();
-	}
-	return rect;
-}
-
-int
-TeQtMultiTextEdit::getTextIndex(QPoint p)
-{
-	int i;
-	for(i=0; i<(int)textVec_.size(); i++)
-	{
-		TeQtTextEdit& t = textVec_[i];
-		QRect rect = t.getHRect();
-		TeText tx = t.text();
-		double angle = tx.angle() * -1;
-
-		if(angle == 0)
-		{
-			if(rect.contains(p, true))
-				return i;
-		}
-		else
-		{
-			double d, dx, dy, alfa, beta;
-			QPoint c = rect.center();
-
-			dx = p.x() - c.x();
-			dy = p.y() - c.y();
-			alfa = atan(dy/dx) * 180. / TePI;
-			if(dx<0)
-				alfa = 180. + alfa;
-			else if(dx>=0 && dy<0)
-				alfa = 360. + alfa;
-			beta = alfa - angle;
-			d = sqrt(double((p.x()-c.x()) * (p.x()-c.x()) + (p.y()-c.y()) * (p.y()-c.y())));
-			int x = c.x() + TeRound(cos(beta*TePI/180.) * d);
-			int y = c.y() + TeRound(sin(beta*TePI/180.) * d);
-
-			QPoint pp(x, y);
-			if(rect.contains(pp))
-				return i;
-		}
-	}
-	return -1;
-}
-
-void
-TeQtMultiTextEdit::updateText(int index, string t)
-{
-	TeText tx = textVec_[index].text();
-	tx.setTextValue(t);
-	textVec_[index].text(tx);
-	textVec_[index].change();
-}
-
-void
-TeQtMultiTextEdit::visual(const TeVisual& visual)
-{
-	unsigned int i;
-	for(i=0; i<textVec_.size(); i++)
-		textVec_[i].visual(visual);
-}
diff --git a/src/terralib/application/qt/TeQtTextEdit.h b/src/terralib/application/qt/TeQtTextEdit.h
deleted file mode 100644
index 5404d3d..0000000
--- a/src/terralib/application/qt/TeQtTextEdit.h
+++ /dev/null
@@ -1,150 +0,0 @@
-/************************************************************************************
-TerraView - visualization and exploration of geographical databases
-using TerraLib.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-This file is part of TerraView. TerraView is free software; you can redistribute it 
-and/or modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-You should have received a copy of the GNU General Public License
-along with TerraView.
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The software provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use of
-this program and its documentation.
-*************************************************************************************/
-
-#ifndef  __TERRALIB_INTERNAL_QTTEXTEDIT_H
-#define  __TERRALIB_INTERNAL_QTTEXTEDIT_H
-
-#include "TeCoord2D.h"
-#include "TeQtCanvas.h"
-#include "TeTheme.h"
-#include <qpoint.h>
-#include <set>
-
-class TeQtTextEdit
-{
-	QPoint				pLeft_;
-	QPoint				pRight_;
-	QPoint				pTop_;
-	QPoint				pBottom_;
-	QPoint				pCenter_;
-	bool				edit_;
-	int					mode_;
-	TeQtBasicCanvas*	canvas_;
-	TeTheme*			theme_;
-	TeVisual			visual_;
-	TeText				text_;
-
-public:
-
-    TeQtTextEdit();
-    TeQtTextEdit(TeText& tx, TeVisual v, TeQtBasicCanvas* canvas);
-
-	~TeQtTextEdit ();
-
-	void init(TeText& tx, TeVisual v, TeQtBasicCanvas* canvas);
-
-	void change();
-
-	void change(QPoint p, bool apxAngle=false);
-
-	int	apx(double d);
-
-	int located(QPoint& p);
-
-	bool isHotPoint(QPoint& p);
-
-	void endEdit();
-
-	int mode();
-
-	void mode(int m);
-
-	bool edit();
-
-	TeText text();
-
-	void text(TeText t);
-
-	void height(double h);
-
-	void angle(double a);
-
-	void addPosition(TeCoord2D p);
-
-	TeQtBasicCanvas*	canvas();
-
-	TeVisual	visual() {return visual_;}
-
-	void	visual(const TeVisual& visual) {visual_ = visual;}
-
-	QRect	getRect();
-
-	QRect	getHRect();
-};
-
-
-class TeQtMultiTextEdit
-{
-	vector<TeQtTextEdit> textVec_;
-	set<int>			 geomIdSet_;
-	int					 current_;
-	bool				 selMode_;
-
-public:
-
-    TeQtMultiTextEdit();
-	~TeQtMultiTextEdit();
-
-	int size();
-
-	void push(TeQtTextEdit t);
-
-	void change();
-
-	void change(QPoint p, bool apxAngle=false);
-
-	int located(QPoint& p);
-
-	bool isHotPoint(QPoint& p);
-
-	void endEdit();
-
-	int mode();
-
-	void mode(int m);
-
-	bool selMode();
-
-	void selMode(bool m);
-
-	bool edit();
-
-	TeText text(int i);
-
-	TeVisual visual(int i);
-
-	void visual(const TeVisual&);
-
-	void height(double h);
-
-	void angle(double a);
-
-	void addPosition(TeCoord2D p);
-
-	void clear() {textVec_.clear(); geomIdSet_.clear();}
-
-	QRect	getRect();
-
-	int getTextIndex(QPoint p);
-
-	void updateText(int index, string t);
-};
-#endif
diff --git a/src/terralib/application/qt/TeQtThemeItem.cpp b/src/terralib/application/qt/TeQtThemeItem.cpp
deleted file mode 100644
index 498ed2d..0000000
--- a/src/terralib/application/qt/TeQtThemeItem.cpp
+++ /dev/null
@@ -1,187 +0,0 @@
-/************************************************************************************
-TerraView - visualization and exploration of geographical databases
-using TerraLib.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-This file is part of TerraView. TerraView is free software; you can redistribute it 
-and/or modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-You should have received a copy of the GNU General Public License
-along with TerraView.
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The software provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use of
-this program and its documentation.
-*************************************************************************************/
-
-#include <TeQtThemeItem.h>
-#include <TeQtViewsListView.h>
-#include <TeQtLegendItem.h>
-#include <TeQtChartItem.h>
-#include <TeDatabase.h>
-#include <qpixmap.h>
-#include <images/theme.xpm>
-#include <qimage.h>
-
-//Database item constructor
-TeQtThemeItem::TeQtThemeItem(QListViewItem *parent,
-	QString text, TeTheme *theme)
-	: TeQtCheckListItem(parent,text,CheckBox), theme_(theme)
-{
-	type_ = THEME;
-	QPixmap p(theme_xpm);
-	setPixmap(0,p);
-	setRenameEnabled(0,true);
-	setSelected(false);
-	setEnabled(true);
-
-	order_ = theme->priority();
-}
-
-
-void TeQtThemeItem::stateChange(bool visible)
-{
-	TeQtViewsListView *lView = (TeQtViewsListView*)listView();
-	lView->checkItemStateChanged(this, visible);
-}
-
-
-void TeQtThemeItem::removeLegends()
-{
-	vector<QListViewItem*> legendVector = getChildren();
-	unsigned int i;
-	for (i = 0; i < legendVector.size(); ++i)
-	{
-		TeQtCheckListItem *checkItem = (TeQtCheckListItem*)legendVector[i];
-		if (checkItem->getType() == TeQtCheckListItem::LEGEND ||
-			checkItem->getType() == TeQtCheckListItem::LEGENDTITLE)
-			delete checkItem;
-	}
-}
-
-
-void TeQtThemeItem::removeCharts()
-{
-	vector<QListViewItem*> legendVector = getChildren();
-	unsigned int i;
-	for (i = 0; i < legendVector.size(); ++i)
-	{
-		TeQtCheckListItem *checkItem = (TeQtCheckListItem*)legendVector[i];
-		if (checkItem->getType() == TeQtCheckListItem::CHART ||
-			checkItem->getType() == TeQtCheckListItem::CHARTTITLE)
-			delete checkItem;
-	}
-}
-
-
-void TeQtThemeItem::getLegends(vector<const QPixmap*>& pixmapVector, vector<string>& labelVector, string& title)
-{
-	vector<QListViewItem*> legendVector = getChildren();
-	unsigned int i;
-	for (i = 0; i < legendVector.size(); ++i)
-	{
-		TeQtCheckListItem *checkItem = (TeQtCheckListItem*)legendVector[i];
-
-		if (checkItem->getType() == TeQtCheckListItem::LEGENDTITLE)
-		{
-			title = checkItem->text().latin1();
-		}
-		else if (checkItem->getType() == TeQtCheckListItem::LEGEND)
-		{
-			TeQtLegendItem *legendItem = (TeQtLegendItem*)checkItem;
-			pixmapVector.push_back(legendItem->pixmap(0));
-			labelVector.push_back(legendItem->text().latin1());
-		}
-	}
-}
-				
-TeQtCheckListItem* TeQtThemeItem::getLegendItem(TeLegendEntry* leg)
-{
-	vector<QListViewItem*> legendVector = getChildren();
-	unsigned int i;
-	for (i = 0; i < legendVector.size(); ++i)
-	{
-		TeQtCheckListItem *checkItem = (TeQtCheckListItem*)legendVector[i];
-
-		if (checkItem->getType() == TeQtCheckListItem::LEGEND)
-		{
-			TeQtLegendItem *legendItem = (TeQtLegendItem*)checkItem;
-			if(legendItem->legendEntry()->id() == leg->id())
-				return legendItem;
-		}
-	}
-	return (TeQtCheckListItem*)0;
-}
-
-void TeQtThemeItem::updateAlias()
-{
-	TeDatabase* db = theme_->layer()->database();
-	map<int, map<string, string> >& mapThemeAlias = db->mapThemeAlias();
-	map<string, string>& mapAA = mapThemeAlias[theme_->id()];
-
-	vector<QListViewItem*> itemVec = getChildren();
-
-	unsigned int i;
-	for (i = 0; i < itemVec.size(); ++i)
-	{
-		TeQtCheckListItem *checkItem = (TeQtCheckListItem*)itemVec[i];
-
-		if (checkItem->getType() == TeQtCheckListItem::LEGENDTITLE)
-		{
-			string attr, nattr;
-			if(theme_->grouping())
-			{
-				attr = theme_->grouping()->groupAttribute_.name_;
-				nattr = theme_->grouping()->groupNormAttribute_;
-			}
-
-			if(nattr.empty() || nattr == "NONE")
-			{
-				map<string, string>::iterator it = mapAA.find(attr);
-				if(it != mapAA.end())
-				{
-					string alias = it->second;
-					if(alias.empty())
-						checkItem->setText(0, attr.c_str());
-					else
-						checkItem->setText(0, alias.c_str());
-				}
-				else
-					checkItem->setText(0, attr.c_str());
-			}
-			else
-			{
-				string alias = attr;
-				map<string, string>::iterator it = mapAA.find(attr);
-				if(it != mapAA.end())
-					alias = it->second;
-
-				it = mapAA.find(nattr);
-				if(it != mapAA.end())
-					alias += "/" + it->second;
-				else
-					alias += "/" + nattr;
-
-				checkItem->setText(0, alias.c_str());
-			}
-		}
-		else if (checkItem->getType() == TeQtCheckListItem::CHART)
-		{
-			string attr = ((TeQtChartItem*)checkItem)->name();
-			map<string, string>::iterator it = mapAA.find(attr);
-			if(it != mapAA.end())
-			{
-				string alias = it->second;
-				checkItem->setText(0, alias.c_str());
-			}
-			else
-				checkItem->setText(0, attr.c_str());
-		}
-	}
-}
-
diff --git a/src/terralib/application/qt/TeQtThemeItem.h b/src/terralib/application/qt/TeQtThemeItem.h
deleted file mode 100644
index 585137f..0000000
--- a/src/terralib/application/qt/TeQtThemeItem.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/************************************************************************************
-TerraView - visualization and exploration of geographical databases
-using TerraLib.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-This file is part of TerraView. TerraView is free software; you can redistribute it 
-and/or modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-You should have received a copy of the GNU General Public License
-along with TerraView.
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The software provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use of
-this program and its documentation.
-*************************************************************************************/
-
-#ifndef  __TERRALIB_INTERNAL_QTTHEMEITEM_H
-#define  __TERRALIB_INTERNAL_QTTHEMEITEM_H
-
-#include <TeQtCheckListItem.h>
-
-class TeTheme;
-class TeLegendEntry;
-
-
-class TeQtThemeItem : public TeQtCheckListItem
-{
-public:
-    TeQtThemeItem(QListViewItem *parent, QString text, TeTheme* theme);
-
-	~TeQtThemeItem () {}
-
-	TeTheme* getTheme()
-		{return theme_;}
-
-	void removeLegends();
-
-	void removeCharts();
-
-	void getLegends(vector<const QPixmap*>& pixmapVector, vector<string>& labels, string& title);
-
-	TeQtCheckListItem* getLegendItem(TeLegendEntry* leg);
-
-	void updateAlias();
-
-protected:
-	TeTheme *theme_;
-
-	virtual void stateChange(bool);
-};
-
-#endif
diff --git a/src/terralib/application/qt/TeQtViewItem.cpp b/src/terralib/application/qt/TeQtViewItem.cpp
deleted file mode 100644
index 5505a33..0000000
--- a/src/terralib/application/qt/TeQtViewItem.cpp
+++ /dev/null
@@ -1,49 +0,0 @@
-/************************************************************************************
-TerraView - visualization and exploration of geographical databases
-using TerraLib.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-This file is part of TerraView. TerraView is free software; you can redistribute it 
-and/or modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-You should have received a copy of the GNU General Public License
-along with TerraView.
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The software provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use of
-this program and its documentation.
-*************************************************************************************/
-
-#include <TeQtViewItem.h>
-#include <TeQtThemeItem.h>
-#include <qpixmap.h>
-#include <images/view.xpm>
-
-
-//Database item constructor
-TeQtViewItem::TeQtViewItem(QListView *parent,
-	QString text, TeView *view)
-	: TeQtCheckListItem(parent,text), view_(view)
-{
-	type_ = VIEW;
-//	QPixmap p("images/view.bmp");
-	QPixmap p((const char**)view_xpm);
-	setPixmap(0,p);
-	setRenameEnabled(0,true);
-	setSelected(false);
-	setEnabled(true);
-	setDragEnabled(false);
-}
-
-void	
-TeQtViewItem::resetAll()
-{
-	vector<QListViewItem*> childrenVector = this->getChildren();
-	for (int i = 0; i < (int)childrenVector.size(); ++i)
-		((TeQtThemeItem*)childrenVector[i])->setOn(false);
-}
diff --git a/src/terralib/application/qt/TeQtViewItem.h b/src/terralib/application/qt/TeQtViewItem.h
deleted file mode 100644
index 560df84..0000000
--- a/src/terralib/application/qt/TeQtViewItem.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/************************************************************************************
-TerraView - visualization and exploration of geographical databases
-using TerraLib.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-This file is part of TerraView. TerraView is free software; you can redistribute it 
-and/or modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-You should have received a copy of the GNU General Public License
-along with TerraView.
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The software provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use of
-this program and its documentation.
-*************************************************************************************/
-
-#ifndef  __TERRALIB_INTERNAL_QTVIEWITEM_H
-#define  __TERRALIB_INTERNAL_QQTVIEWITEM_H
-
-#include <TeQtCheckListItem.h>
-
-class TeView;
-
-class TeQtViewItem : public TeQtCheckListItem
-{
-public:
-    TeQtViewItem(QListView *parent, QString text,
-				 TeView *view);
-
-	~TeQtViewItem () {}
-
-	int compare(QListViewItem * i, int col, bool ascending) const
-		{ return QListViewItem::compare(i, col, ascending); }
-
-	QString key(int col, bool ascending) const
-		{ return QListViewItem::key(col, ascending); }
-
-	TeView*	getView() {return view_;}
-
-	void setView(TeView *view)
-		{ view_ = view; }
-
-	void resetAll();
-
-protected:
-	TeView	*view_;
-};
-
-#endif
diff --git a/src/terralib/application/qt/TeQtViewsListView.cpp b/src/terralib/application/qt/TeQtViewsListView.cpp
deleted file mode 100644
index 1046300..0000000
--- a/src/terralib/application/qt/TeQtViewsListView.cpp
+++ /dev/null
@@ -1,767 +0,0 @@
-/************************************************************************************
-TerraView - visualization and exploration of geographical databases
-using TerraLib.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-This file is part of TerraView. TerraView is free software; you can redistribute it 
-and/or modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-You should have received a copy of the GNU General Public License
-along with TerraView.
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The software provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use of
-this program and its documentation.
-*************************************************************************************/
-
-#include <TeQtViewsListView.h>
-#include <TeQtCheckListItem.h>
-#include <TeQtViewItem.h>
-#include <TeQtThemeItem.h>
-#include <TeWaitCursor.h>
-#include <qapplication.h>
-#include <qpopupmenu.h>
-#include <qdragobject.h>
-
-TeQtViewsListView::TeQtViewsListView(QWidget *parent, const char *name)
-		: QListView(parent, name)
-{
-	pressedThemeItem_ = 0;
-	currentViewItem_ = 0;
-	currentThemeItem_ = 0;
-	rightMouseWasClicked_ = false;
-	checkItemStateChanged_ = false;
-	leftButtonPressed_ = false;
-	drag_ = false;
-
-	setSelectionMode(QListView::Multi);
-    setRootIsDecorated( TRUE );
-//	setAcceptDrops(true);
-	viewport()->setAcceptDrops(true);
-
-	popupView_ = new QPopupMenu(this);
-	popupTheme_ = new QPopupMenu(this);
-	popupLegendTitle_ = new QPopupMenu(this);
-	popupLegend_ = new QPopupMenu(this);
-	popupChartTitle_ = new QPopupMenu(this);
-	popupChart_ = new QPopupMenu(this);
-	popupOutItem_ = new QPopupMenu(this);
-
-	//Mounting the brushStyleMap
-	brushStyleMap_[TePolyTypeTransparent] = Qt::NoBrush;
-	brushStyleMap_[TePolyTypeFill] = Qt::SolidPattern;
-	brushStyleMap_[TePolyTypeHorizontal] = Qt::HorPattern;
-	brushStyleMap_[TePolyTypeVertical] = Qt::VerPattern;
-	brushStyleMap_[TePolyTypeFDiagonal] = Qt::FDiagPattern;
-	brushStyleMap_[TePolyTypeBDiagonal] = Qt::BDiagPattern;
-	brushStyleMap_[TePolyTypeCross] = Qt::CrossPattern;
-	brushStyleMap_[TePolyTypeDiagonalCross] = Qt::DiagCrossPattern;
-
-	//Mounting the penStyleMap
-	penStyleMap_[TeLnTypeContinuous] = Qt::SolidLine;
-	penStyleMap_[TeLnTypeDashed] = Qt::DashLine;
-	penStyleMap_[TeLnTypeDotted] = Qt::DotLine;
-	penStyleMap_[TeLnTypeDashDot] = Qt::DashDotLine;
-	penStyleMap_[TeLnTypeDashDotDot] = Qt::DashDotDotLine;
-	penStyleMap_[TeLnTypeNone] = Qt::NoPen;
-
-	// rename action
-	setDefaultRenameAction(QListView::Accept);
-
-	connect(this,SIGNAL(clicked(QListViewItem*)),
-			this,SLOT(clicked(QListViewItem*)));
-	connect(this,SIGNAL(contextMenuRequested(QListViewItem*,const QPoint&, int)),
-		    this,SLOT(contextMenuRequested(QListViewItem*,const QPoint&, int)));
-}
-
-
-TeQtViewsListView::~TeQtViewsListView()
-{
-	if (popupView_)
-		delete popupView_;
-	if (popupTheme_)
-		delete popupTheme_;
-	if (popupLegendTitle_)
-		delete popupLegendTitle_;
-	if (popupLegend_)
-		delete popupLegend_;
-	if (popupChartTitle_)
-		delete popupChartTitle_;
-	if (popupChart_)
-		delete popupChart_;
-	if (popupOutItem_)
-		delete popupOutItem_;
-}
-
-
-void TeQtViewsListView::selectItem(QListViewItem *item)
-{
-	checkItemStateChanged_ = false;
-	clicked(item);
-}
-
-
-void TeQtViewsListView::selectViewItem(TeView *view)
-{
-	if (view == 0)
-		return;
-
-	QListViewItem *child = firstChild();
-    while (child)
-	{
-		TeQtViewItem *viewItem = (TeQtViewItem*)child;
-		if (viewItem->getView() == view)
-		{
-			if (viewItem == currentViewItem_)
-				break;
-			else
-			{
-				unselectAllItems();
-				child->setSelected(true);
-				child->repaint();
-				currentViewItem_ = viewItem;
-				currentThemeItem_ = 0;
-				emit itemChanged(child);
-				return;
-			}
-		}
-        child = child->nextSibling();
-	}
-}
-
-
-TeQtViewItem* TeQtViewsListView::getViewItem(TeView *view)
-{
-	if (view == 0)
-		return 0;
-
-	QListViewItem *child = firstChild();
-    while (child)
-	{
-		TeQtViewItem *viewItem = (TeQtViewItem*)child;
-		if (viewItem->getView() == view)
-			return viewItem;
-		else
-			child = child->nextSibling();
-	}
-	return 0;
-}
-
-
-TeQtThemeItem* TeQtViewsListView::getThemeItem(TeTheme *theme)
-{
-	if (theme == 0)
-		return 0;
-
-	QListViewItem *item;
-	QListViewItemIterator it(this);
-	item = it.current();
-	while(item)
-	{
-		TeQtCheckListItem *checkListItem = (TeQtCheckListItem*)item;
-		if (checkListItem->getType() == TeQtCheckListItem::THEME)
-		{
-			TeQtThemeItem* themeItem = (TeQtThemeItem*)item;
-			if (themeItem->getTheme() == theme)
-					return themeItem;
-		}
-		it++;
-		item = it.current();
-	}
-	return 0;
-}
-
-
-void TeQtViewsListView::removeViewItem(TeView *view)
-{
-	QListViewItem *item;
-
-	QListViewItemIterator it(this);
-	item = it.current();
-	while(item)
-	{
-		TeQtCheckListItem *checkListItem = (TeQtCheckListItem*)item;
-		if (checkListItem->getType() == TeQtCheckListItem::VIEW)
-		{
-			TeQtViewItem* viewItem = (TeQtViewItem*)item;
-			if (viewItem->getView() == view)
-			{
-				if (viewItem == currentViewItem_)
-					currentViewItem_ = 0;
-				removeItem(item);
-				break;
-			}
-		}
-		it++;
-		item = it.current();
-	}	
-}
-
-
-void TeQtViewsListView::removeThemeItem(TeTheme *theme)
-{
-	QListViewItem *item;
-
-	QListViewItemIterator it(this);
-	item = it.current();
-	while(item)
-	{
-		TeQtCheckListItem *checkListItem = (TeQtCheckListItem*)item;
-		if (checkListItem->getType() == TeQtCheckListItem::THEME)
-		{
-			TeQtThemeItem* themeItem = (TeQtThemeItem*)item;
-			if (themeItem->getTheme() == theme)
-			{
-				if (themeItem == currentThemeItem_)
-					currentThemeItem_ = 0;
-				removeItem(item);
-				break;
-			}
-		}
-		it++;
-		item = it.current();
-	}	
-}
-
-
-void TeQtViewsListView::removeItem(QListViewItem *item)
-{
-	TeQtCheckListItem *checkListItem = (TeQtCheckListItem*)item;
-
-	if(checkListItem->getType() == TeQtCheckListItem::VIEW)
-	{
-		TeQtViewItem* viewItem = (TeQtViewItem*)item;
-
-		vector<QListViewItem*> childrenVector;
-		childrenVector = viewItem->getChildren();
-
-		int i;
-		TeQtThemeItem *themeItem;
-		for (i = 0; i < (int)childrenVector.size(); ++i)
-		{
-			themeItem = (TeQtThemeItem*)childrenVector[i];
-			delete themeItem;
-		}
-
-		if (currentViewItem_ == viewItem)
-		{
-			currentViewItem_ = 0;
-			currentThemeItem_ = 0;
-		}
-		delete viewItem;
-	}
-	else if (checkListItem->getType() == TeQtCheckListItem::THEME)
-	{
-		TeQtThemeItem* themeItem = (TeQtThemeItem*)item;
-		if (currentThemeItem_ == themeItem)
-			currentThemeItem_ = 0;
-		delete themeItem;
-	}
-	else
-		delete item;
-}
-
-
-void TeQtViewsListView::checkItemStateChanged(QCheckListItem *checkListItem, bool visible)
-{
-	checkItemStateChanged_ = true;
-	emit checkListItemVisChanged(checkListItem, visible);
-}
-
-
-void TeQtViewsListView::openViewItems()
-{
-	QListViewItem *child = firstChild();
-    while (child)
-	{
-		setOpen(child, true);
-		child = child->nextSibling();
-	}
-}
-
-
-void TeQtViewsListView::reset()
-{
-	unselectAllItems();
-	currentViewItem_ = 0;
-	currentThemeItem_ = 0;
-}
-
-
-void TeQtViewsListView::setOn(QCheckListItem *item, bool visible)
-{
-	TeQtCheckListItem *checkListItem = (TeQtCheckListItem*)item;
-	if (checkListItem->getType() == TeQtCheckListItem::THEME)
-	{
-		TeQtThemeItem *themeItem = (TeQtThemeItem*)item;
-		themeItem->setOn(visible);
-		checkItemStateChanged_ = false;
-	}
-}
-
-void TeQtViewsListView::clicked(QListViewItem *item)
-{
-	if(item == 0)
-		return;
-	if(drag_ && pressedThemeItem_)
-		return;
-
-	unselectAllItems();
-
-	TeQtCheckListItem *checkListItem = (TeQtCheckListItem*)item;
-
-	if(	checkItemStateChanged_ && (checkListItem->getType() == TeQtCheckListItem::THEME))
-	{
-		checkItemStateChanged_ = false;
-		if(currentThemeItem_)
-		{
-			currentThemeItem_->parent()->setSelected(true);
-			currentThemeItem_->parent()->repaint();
-			currentThemeItem_->setSelected(true);
-			currentThemeItem_->repaint();
-			return;
-		}
-	}
-
-	if(checkListItem->getType() != TeQtCheckListItem::THEME)
-	{
-		if (rightMouseWasClicked_ == true || checkItemStateChanged_ == true ||
-			drag_ == true || checkListItem->getType() == TeQtCheckListItem::LEGEND ||
-			checkListItem->getType() == TeQtCheckListItem::CHART)
-		{
-			if (checkListItem->getType() == TeQtCheckListItem::LEGEND ||
-				checkListItem->getType() == TeQtCheckListItem::CHART)
-			{
-				checkListItem->setSelected(false);
-				checkListItem->repaint();
-			}
-
-			if (currentViewItem_ != 0)
-			{
-				currentViewItem_->setSelected(true);
-				currentViewItem_->repaint();
-			}
-
-			if (currentThemeItem_ != 0)
-			{
-				currentThemeItem_->setSelected(true);
-				currentThemeItem_->repaint();
-			}
-			rightMouseWasClicked_ = false;
-			checkItemStateChanged_ = false;
-			return;
-		}
-	}
-
-	if (checkListItem->getType() == TeQtCheckListItem::VIEW)
-	{
-		item->setSelected(true);
-		item->repaint();
-
-		TeQtViewItem *viewItem = (TeQtViewItem*)item;
-		if (viewItem != currentViewItem_)
-		{
-			currentViewItem_ = viewItem;
-			currentThemeItem_ = 0;
-			emit itemChanged(item);
-		}
-		else
-		{
-			if (currentThemeItem_ != 0)
-			{
-				currentThemeItem_->setSelected(true);
-				currentThemeItem_->repaint();
-			}
-		}
-	}
-	else if(checkListItem->getType() == TeQtCheckListItem::THEME)
-	{
-		item->parent()->setSelected(true);
-		item->parent()->repaint();
-		item->setSelected(true);
-		item->repaint();
-
-		TeQtViewItem *viewItem = (TeQtViewItem*)item->parent();
-		if (currentViewItem_ != viewItem && rightMouseWasClicked_ == false)
-		{
-			currentViewItem_ = viewItem;
-			emit itemChanged(item->parent());
-		}
-
-		TeQtThemeItem* themeItem = (TeQtThemeItem*)item;
-		if (themeItem != currentThemeItem_ && rightMouseWasClicked_ == false)
-		{
-			currentThemeItem_ = themeItem;
-			emit itemChanged(item);
-		}
-	}
-	rightMouseWasClicked_ = false;
-	checkItemStateChanged_ = false;
-}
-
-
-void TeQtViewsListView::contextMenuRequested(QListViewItem *item, const QPoint&, int)
-{
-	popupItem_ = (TeQtCheckListItem*)item;
-
-	unselectAllItems();
-	if (currentViewItem_)
-	{
-		currentViewItem_->setSelected(true);
-		currentViewItem_->repaint();
-	}
-
-	if (currentThemeItem_)
-	{
-		currentThemeItem_->setSelected(true);
-		currentThemeItem_->repaint();
-	}
-
-	emit popupSignal();	
-}
-
-void TeQtViewsListView::contentsMousePressEvent(QMouseEvent *e)
-{
-	rightMouseWasClicked_ = false;;
-	if (e->button() == RightButton)
-	{
-		rightMouseWasClicked_ = true;
-		popupView_->move(e->globalPos().x(), e->globalPos().y());
-		popupTheme_->move(e->globalPos().x(), e->globalPos().y());
-		popupLegendTitle_->move(e->globalPos().x(), e->globalPos().y());
-		popupLegend_->move(e->globalPos().x(), e->globalPos().y());
-		popupChartTitle_->move(e->globalPos().x(), e->globalPos().y());
-		popupChart_->move(e->globalPos().x(), e->globalPos().y());
-		popupOutItem_->move(e->globalPos().x(), e->globalPos().y());
-	}
-	else if (e->button() == LeftButton)
-	{
-		QPoint p( contentsToViewport( e->pos() ) );
-		pressedPosition_ = p;
-		TeQtCheckListItem *item = (TeQtCheckListItem*)itemAt(p);
-		if (item != 0)
-		{
-			if(item->getType() == TeQtCheckListItem::THEME)
-			{
-				// don�t drag, if the user clicked into the root decoration of the item
-				if (p.x() > treeStepSize() * (item->depth() + (rootIsDecorated() ? 1 : 0)) + itemMargin())
-				{
-					pressedThemeItem_ = (TeQtThemeItem*)item;
-					themeOpen_ = isOpen(item);
-				}
-			}
-			else
-			{
-				item->setSelected(false);
-				item->repaint();
-				pressedThemeItem_ = 0;
-			}
-			leftButtonPressed_ = true;
-		}
-	}
-
-	QListView::contentsMousePressEvent(e);
-}
-
-
-void TeQtViewsListView::contentsMouseReleaseEvent(QMouseEvent *e)
-{
-	leftButtonPressed_ = false;
-	QListView::contentsMouseReleaseEvent(e);
-
-	if(currentThemeItem_)
-	{
-		unselectAllItems();
-		currentThemeItem_->parent()->setSelected(true);
-		currentThemeItem_->parent()->repaint();
-		currentThemeItem_->setSelected(true);
-		repaint();
-	}
-	drag_ = false;
-}
-
-
-void TeQtViewsListView::unselectAllItems()
-{
-	QListViewItem *item;
-
-	QListViewItemIterator it(this);
-	item = it.current();
-	while(item)
-	{
-		setSelected(item,false);
-		item->repaint();
-		it++;
-		item = it.current();
-	}
-}
-
-
-void TeQtViewsListView::contentsMouseMoveEvent(QMouseEvent* e)
-{
-	QPoint p( contentsToViewport( e->pos() ) );
-    if (leftButtonPressed_)
-	{
-		QPoint pdif = pressedPosition_ - p;
-		if(abs(pdif.x()) > 2 || abs(pdif.y()) > 2)
-		{
-			drag_ = true;
-			leftButtonPressed_ = false;
-			if(pressedThemeItem_)
-			{
-				TeQtCheckListItem *item = (TeQtCheckListItem*)itemAt(p);
-				if (item && item->getType() == TeQtCheckListItem::THEME)
-				{
-	//				clicked(item);
-					QUriDrag* ud = new QUriDrag(viewport());
-					ud->drag();
-				}
-			}
-		}
-    }
-	if(drag_ && pressedThemeItem_)
-		pressedThemeItem_->setOpen(themeOpen_);
-}
-
-
-void TeQtViewsListView::contentsDragMoveEvent(QDragMoveEvent *e)
-{
-	if(pressedThemeItem_)
-		pressedThemeItem_->setOpen(themeOpen_);
-
-	if(e->source() != viewport())
-	{
-		e->ignore();
-		e->acceptAction(false);
-		return;
-	}
-
-    QPoint p = contentsToViewport(((QDragMoveEvent*)e)->pos());
-    TeQtCheckListItem *item = (TeQtCheckListItem*)itemAt(p);
-    if (item)
-	{
-		if (p.x() < treeStepSize() * (item->depth() + (rootIsDecorated() ? 1 : 0)) + itemMargin())
-		{
-			e->ignore();
-			e->acceptAction(false);
-		}
-		else
-		{
-			if(item->getType() == TeQtCheckListItem::THEME || item->getType() == TeQtCheckListItem::VIEW)
-			{
-				e->accept();
-				e->acceptAction();
-			}
-			else
-			{
-				e->ignore();
-				e->acceptAction(false);
-				if(currentThemeItem_)
-				{
-					unselectAllItems();
-					currentThemeItem_->parent()->setSelected(true);
-					currentThemeItem_->parent()->repaint();
-					currentThemeItem_->setSelected(true);
-					repaint();
-				}
-			}
-		}
-    }
-	else
-	{
-		e->ignore();
-		e->acceptAction(false);
-	}
-}
-
-
-void TeQtViewsListView::contentsDropEvent(QDropEvent *e)
-{
-	if(e->source() != viewport())
-	{
-		e->ignore();
-		e->acceptAction(false);
-		pressedThemeItem_ = 0;
-		if(currentThemeItem_)
-		{
-			unselectAllItems();
-			currentThemeItem_->parent()->setSelected(true);
-			currentThemeItem_->parent()->repaint();
-			currentThemeItem_->setSelected(true);
-			repaint();
-		}
-		return;
-	}
-
-	int itemPriority;
-	TeQtThemeItem *themeItem;
-	bool viewChanged = false;
-
-    QPoint p = contentsToViewport(((QDragMoveEvent*)e)->pos());
-	TeQtCheckListItem *dropItem = (TeQtCheckListItem*)itemAt(p);
-
-	if (dropItem == 0)
-	{
-		e->ignore();
-		e->acceptAction(false);
-		pressedThemeItem_ = 0;
-		if(currentThemeItem_)
-		{
-			unselectAllItems();
-			currentThemeItem_->parent()->setSelected(true);
-			currentThemeItem_->parent()->repaint();
-			currentThemeItem_->setSelected(true);
-			repaint();
-		}
-		return;
-	}
-
-	if (dropItem == pressedThemeItem_)
-	{
-		e->ignore();
-		e->acceptAction(false);
-		pressedThemeItem_ = 0;
-		if(currentThemeItem_)
-		{
-			unselectAllItems();
-			currentThemeItem_->parent()->setSelected(true);
-			currentThemeItem_->parent()->repaint();
-			currentThemeItem_->setSelected(true);
-			repaint();
-		}
-		return;
-	}
-
-	e->accept();
-	e->acceptAction();
-
-	//Set the view item of the pressed item and the drop item
-	TeQtViewItem *pressedViewItem = (TeQtViewItem*)pressedThemeItem_->parent();
-	TeQtViewItem *dropViewItem;
-	if(dropItem->getType() == TeQtCheckListItem::THEME)
-		dropViewItem = (TeQtViewItem*)dropItem->parent();
-	else
-		dropViewItem = (TeQtViewItem*)dropItem;
-
-	//set a flag to indicate whether there was a view change
-	if (pressedViewItem != dropViewItem)
-		viewChanged = true;
-
-	//update the priorities and move the items accordingly
-	if (viewChanged)
-	{
-		vector<QListViewItem*> themeItemVector = dropViewItem->getChildren();
-		for (unsigned int i = 0; i < themeItemVector.size(); ++i)
-		{
-			themeItem = (TeQtThemeItem*)themeItemVector[i];
-			if(pressedThemeItem_->text(0) == themeItem->text(0))
-			{
-				emit dragDropItems(0, 0, 0);
-				pressedThemeItem_ = 0;
-				return;
-			}
-		}
-
-		if (dropItem->getType() == TeQtCheckListItem::THEME)
-		{
-			TeQtThemeItem *dropThemeItem = (TeQtThemeItem*)dropItem;
-			itemPriority = dropThemeItem->order();
-			pressedThemeItem_->order(itemPriority);
-			themeItem = dropThemeItem;
-		}
-		else
-		{
-			itemPriority = 0;
-			pressedThemeItem_->order(itemPriority);
-			themeItem = (TeQtThemeItem*)dropViewItem->firstChild();
-		}
-
-		while (themeItem)
-		{
-			themeItem->order(++itemPriority);
-			themeItem = (TeQtThemeItem*)themeItem->nextSibling();
-		}
-		pressedViewItem->takeItem(pressedThemeItem_);
-		dropViewItem->insertItem(pressedThemeItem_);
-	}
-	else
-	{
-		if (dropItem->getType() == TeQtCheckListItem::THEME)
-		{
-			TeQtThemeItem *dropThemeItem = (TeQtThemeItem*)dropItem;
-			int pressedItemPriority = pressedThemeItem_->order();
-			int droppedItemPriority = dropThemeItem->order();
-			if (pressedItemPriority < droppedItemPriority)
-			{
-				itemPriority = pressedItemPriority;
-				pressedThemeItem_->order(droppedItemPriority);
-				themeItem = (TeQtThemeItem*)pressedThemeItem_->nextSibling();
-				while (themeItem != dropThemeItem)
-				{
-					themeItem->order(itemPriority++);
-					themeItem = (TeQtThemeItem*)themeItem->nextSibling();
-				}
-				dropThemeItem->order(itemPriority);
-			}
-			else
-			{
-				itemPriority = droppedItemPriority;
-				pressedThemeItem_->order(itemPriority);
-				themeItem = (TeQtThemeItem*)dropThemeItem;
-
-				while (themeItem != pressedThemeItem_)
-				{
-					themeItem->order(++itemPriority);
-					themeItem = (TeQtThemeItem*)themeItem->nextSibling();
-				}
-			}
-			pressedThemeItem_->moveItem(dropThemeItem);
-		}
-		else
-		{
-			itemPriority = 0;
-			pressedThemeItem_->order(itemPriority);
-			themeItem = (TeQtThemeItem*)dropItem->firstChild();
-			while (themeItem != pressedThemeItem_)
-			{
-				themeItem->order(++itemPriority);
-				themeItem = (TeQtThemeItem*)themeItem->nextSibling();
-			}
-			pressedViewItem->takeItem(pressedThemeItem_);
-			pressedViewItem->insertItem(pressedThemeItem_);
-			dropViewItem->setOpen(true);
-		}
-	}
-
-	if (pressedViewItem != dropViewItem)
-	{
-		// the drag and drop theme items belong to different views
-		if (pressedThemeItem_ == currentThemeItem_)
-		{
-			currentViewItem_ = dropViewItem;
-			clicked(pressedThemeItem_);
-		}
-	}
-
-//	emit dragDropItems(pressedViewItem, dropViewItem);
-	emit dragDropItems(pressedThemeItem_, pressedViewItem, dropViewItem);
-	pressedThemeItem_->setOpen(themeOpen_);
-
-	pressedThemeItem_ = 0;
-
-	if(currentThemeItem_)
-	{
-		unselectAllItems();
-		currentThemeItem_->parent()->setSelected(true);
-		currentThemeItem_->parent()->repaint();
-		currentThemeItem_->setSelected(true);
-		repaint();
-	}
-}
-
-
diff --git a/src/terralib/application/qt/TeQtViewsListView.h b/src/terralib/application/qt/TeQtViewsListView.h
deleted file mode 100644
index 820ef79..0000000
--- a/src/terralib/application/qt/TeQtViewsListView.h
+++ /dev/null
@@ -1,146 +0,0 @@
-/************************************************************************************
-TerraView - visualization and exploration of geographical databases
-using TerraLib.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-This file is part of TerraView. TerraView is free software; you can redistribute it 
-and/or modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-You should have received a copy of the GNU General Public License
-along with TerraView.
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The software provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use of
-this program and its documentation.
-*************************************************************************************/
-
-#ifndef  __TERRALIB_INTERNAL_QTVIEWSLISTVIEW_H
-#define  __TERRALIB_INTERNAL_QTVIEWSLISTVIEW_H
-
-#include <qlistview.h>
-#include <TeDataTypes.h>
-
-class QPopupMenu;
-class TeView;
-class TeQtThemeItem;
-class TeQtViewItem;
-class TeQtCheckListItem;
-class TeTheme;
-
-class TeQtViewsListView : public QListView
-{
-	Q_OBJECT
-
-public:
-
-    TeQtViewsListView(QWidget *parent = 0, const char *name = 0);
-
-	~TeQtViewsListView();
-
-	TeQtViewItem* currentViewItem() 
-	{ return currentViewItem_; }
-
-	TeQtThemeItem* currentThemeItem() 
-	{ return currentThemeItem_; }
-
-	TeQtCheckListItem *popupItem()
-		{ return popupItem_; }
-
-	QPopupMenu* popupView()
-		{ return popupView_; }
-
-	QPopupMenu* popupTheme()
-		{ return popupTheme_; }
-
-	QPopupMenu* popupLegendTitle()
-		{ return popupLegendTitle_; }
-
-	QPopupMenu* popupLegend()
-		{ return popupLegend_; }
-
-	QPopupMenu* popupChartTitle()
-		{ return popupChartTitle_; }
-
-	QPopupMenu* popupChart()
-		{ return popupChart_; }
-
-	QPopupMenu* popupOutItem()
-		{ return popupOutItem_; }
-
-	void selectItem(QListViewItem *item);
-
-	void selectViewItem(TeView *view);
-
-	TeQtViewItem* getViewItem(TeView *view);
-
-	TeQtThemeItem* getThemeItem(TeTheme *theme);
-
-	void removeViewItem(TeView *view);
-
-	void removeThemeItem(TeTheme *theme);
-
-	void removeItem(QListViewItem *item);
-
-	void checkItemStateChanged(QCheckListItem*, bool);
-
-	void openViewItems();
-
-	void reset();
-
-	void setOn(QCheckListItem*, bool);
-
-	map<TePolyBasicType, Qt::BrushStyle>& getBrushStyleMap() {return brushStyleMap_;}
-
-	map<TeLnBasicType, Qt::PenStyle>& getPenStyleMap() {return penStyleMap_;}
-
-signals:
-	void itemChanged(QListViewItem*);
-	void popupSignal();
-	void checkListItemVisChanged(QCheckListItem*, bool);
-	void dragDropItems(TeQtThemeItem*, TeQtViewItem*, TeQtViewItem*);
-
-protected slots:
-	void clicked(QListViewItem *item);
-	void contextMenuRequested(QListViewItem*, const QPoint&, int);
-
-protected:
-	TeQtViewItem		*currentViewItem_;
-	TeQtThemeItem		*currentThemeItem_;
-	bool				rightMouseWasClicked_;
-	bool				checkItemStateChanged_;
-	bool				drag_;
-	bool				themeOpen_;
-	bool				leftButtonPressed_;
-	QPoint				pressedPosition_;
-	TeQtCheckListItem	*popupItem_;
-	QPopupMenu			*popupView_;
-	QPopupMenu			*popupTheme_;
-	QPopupMenu			*popupLegendTitle_;
-	QPopupMenu			*popupLegend_;
-	QPopupMenu			*popupChartTitle_;
-	QPopupMenu			*popupChart_;
-	QPopupMenu			*popupOutItem_;
-	map<TePolyBasicType, Qt::BrushStyle>	brushStyleMap_;
-	map<TeLnBasicType, Qt::PenStyle>		penStyleMap_;
-	TeQtThemeItem		*pressedThemeItem_;
-
-	void contentsMousePressEvent(QMouseEvent *e);
-
-	void contentsMouseReleaseEvent(QMouseEvent *e);
-
-	void contentsMouseMoveEvent(QMouseEvent* e);
-
-	void contentsDragMoveEvent(QDragMoveEvent *e);
-
-	void contentsDropEvent(QDropEvent *e);
-
-	void unselectAllItems();
-};
-
-
-#endif
diff --git a/src/terralib/application/qt/TeWaitCursor.cpp b/src/terralib/application/qt/TeWaitCursor.cpp
deleted file mode 100644
index 3194a98..0000000
--- a/src/terralib/application/qt/TeWaitCursor.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-/************************************************************************************
-TerraView - visualization and exploration of geographical databases
-using TerraLib.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-This file is part of TerraView. TerraView is free software; you can redistribute it 
-and/or modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-You should have received a copy of the GNU General Public License
-along with TerraView.
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The software provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use of
-this program and its documentation.
-*************************************************************************************/
-
-#include "TeWaitCursor.h"
-#include <qapplication.h>
-
-TeWaitCursor::TeWaitCursor ()
-{
-	if(QApplication::overrideCursor())
-	{
-		if(QApplication::overrideCursor()->shape() != Qt::WaitCursor)
-			QApplication::setOverrideCursor( Qt::WaitCursor );
-	}
-	else
-		QApplication::setOverrideCursor( Qt::WaitCursor );
-}
-
-TeWaitCursor::~TeWaitCursor ()
-{
-	if(QApplication::overrideCursor())
-		QApplication::restoreOverrideCursor();
-}
-
-
-void TeWaitCursor::setWaitCursor ()
-{
-	if(QApplication::overrideCursor())
-	{
-		if(QApplication::overrideCursor()->shape() != Qt::WaitCursor)
-			QApplication::setOverrideCursor( Qt::WaitCursor );
-	}
-	else
-		QApplication::setOverrideCursor( Qt::WaitCursor );
-}
-
-void TeWaitCursor::resetWaitCursor ()
-{
-	if(QApplication::overrideCursor())
-		QApplication::restoreOverrideCursor();
-}
-
diff --git a/src/terralib/application/qt/TeWaitCursor.h b/src/terralib/application/qt/TeWaitCursor.h
deleted file mode 100644
index 695cbc0..0000000
--- a/src/terralib/application/qt/TeWaitCursor.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/************************************************************************************
-TerraView - visualization and exploration of geographical databases
-using TerraLib.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-This file is part of TerraView. TerraView is free software; you can redistribute it 
-and/or modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-You should have received a copy of the GNU General Public License
-along with TerraView.
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The software provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use of
-this program and its documentation.
-*************************************************************************************/
-
-#ifndef  __TERRALIB_INTERNAL_WAITCURSOR_H
-#define  __TERRALIB_INTERNAL_WAITCURSOR_H
-
-#include <qcursor.h>
-
-
-class TeWaitCursor : public QCursor  {
-public: 
-	TeWaitCursor();
-	~TeWaitCursor();
-	void setWaitCursor();
-	void resetWaitCursor();
-};
-
-#endif
diff --git a/src/terralib/application/qt/resultVisual.h b/src/terralib/application/qt/resultVisual.h
deleted file mode 100644
index 0ba8787..0000000
--- a/src/terralib/application/qt/resultVisual.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/************************************************************************************
-TerraView - visualization and exploration of geographical databases
-using TerraLib.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-This file is part of TerraView. TerraView is free software; you can redistribute it 
-and/or modify it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-You should have received a copy of the GNU General Public License
-along with TerraView.
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The software provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use of
-this program and its documentation.
-*************************************************************************************/
-
-#ifndef RESULTVISUAL_H
-#define RESULTVISUAL_H
-
-
-#include <qwidget.h>
-
-class ResultVisual : public QWidget
-{
-public:
-	ResultVisual(QWidget *parent=0, const char *name=0)
-		:QWidget(parent,name) {}
-
-	~ResultVisual() {}
-};
-
-#endif
diff --git a/src/terralib/drivers/MrSID/TeDecoderMrSID.cpp b/src/terralib/drivers/MrSID/TeDecoderMrSID.cpp
old mode 100644
new mode 100755
index 19977dc..1ca448f
--- a/src/terralib/drivers/MrSID/TeDecoderMrSID.cpp
+++ b/src/terralib/drivers/MrSID/TeDecoderMrSID.cpp
@@ -6,43 +6,138 @@
 #include "TeGeometryAlgorithms.h"
 
 
+
 TeDecoderMrSID::TeDecoderMrSID(const TeRasterParams& par) :
+	TeDecoder(par),
 	mrsid_(0),
-	nSelectedBlocks_(0),
-	data_(0),
-	dX_(0),
-	dY_(0)
+	nSelectedBlocks_(0)
 {
 	params_ = par; 
 	params_.decoderIdentifier_= "MrSID";
-	try
+	params_.mode_ = 'r';
+	mrsid_ = new TeMrSIDReader(par.fileName_.c_str());
+	if (mrsid_)
 	{
-		mrsid_ = new TeMrSIDReader(params_.fileName_.c_str());
+		params_.nBands(mrsid_->nBands());
+		unsigned int w, h;
+		mrsid_->getDimensions(w,h);
+		params_.ncols_=w; params_.nlines_=h;
+		vector<double> vv;
+		mrsid_->getNavigationParameters(vv);
+		params_.setNavigationParameters(vv);
+		params_.projection(readProjection());
+		params_.setDataType(TeUNSIGNEDCHAR);
+		if(mrsid_->getColorModel() == TeMrSIDReader::ColorModelRGB)
+			params_.setPhotometric(TeRasterParams::TeRGB);
+		else
+			params_.setPhotometric(TeRasterParams::TeMultiBand);
+	    readMetadataInformation();
 	}
-	catch(/*exception& e*/...)
-	{
-		return;
-	}
-	fillRasterParams();
-	originalLevel_ = currentLevel_;
 }
 
 TeDecoderMrSID::TeDecoderMrSID(const std::string& fname):
 	mrsid_(0),
-	nSelectedBlocks_(0),
-	data_(0),
-	dX_(0),
-	dY_(0)
+	nSelectedBlocks_(0)
 {
-	try
+	params_.fileName_ = fname;
+	params_.mode_ = 'r';
+	params_.decoderIdentifier_= "MrSID";
+	mrsid_ = new TeMrSIDReader(fname.c_str());
+	if (mrsid_)
 	{
-		mrsid_ = new TeMrSIDReader(params_.fileName_.c_str());
+		params_.nBands(mrsid_->nBands());
+		unsigned int w, h;
+		mrsid_->getDimensions(w,h);
+		params_.ncols_=w; params_.nlines_=h;
+		vector<double> vv;
+		mrsid_->getNavigationParameters(vv);
+		params_.setNavigationParameters(vv);
+		params_.setDataType(TeUNSIGNEDCHAR);
+		if(mrsid_->getColorModel() == TeMrSIDReader::ColorModelRGB)
+			params_.setPhotometric(TeRasterParams::TeRGB);
+		else
+			params_.setPhotometric(TeRasterParams::TeMultiBand);
+	    readMetadataInformation();
 	}
-	catch(...)
+}
+
+TeDecoderMrSID::~TeDecoderMrSID()
+{
+	clear();
+	if (mrsid_)
 	{
+		delete mrsid_;
+		mrsid_ = 0;
+	}
+}
+
+void TeDecoderMrSID::init()
+{
+	clear();
+	params_.status_= TeRasterParams::TeNotReady;
+
+	if (params_.mode_ == 'r') // only use of this decoder....	
+	{
+		params_.status_ = TeRasterParams::TeReadyToRead;
+		if (mrsid_)
+		{
+			if (mrsid_->fileName().empty() || mrsid_->fileName() != params_.fileName_)
+			{
+				delete mrsid_;
+				mrsid_ = 0;
+			}
+		}
+		if (!mrsid_)
+		{
+			try
+			{
+				params_.nBands(mrsid_->nBands());
+				unsigned int w, h;
+				mrsid_->getDimensions(w,h);
+				params_.ncols_=w; params_.nlines_=h;
+				vector<double> vv;
+				mrsid_->getNavigationParameters(vv);
+				params_.setNavigationParameters(vv);
+				params_.setDataType(TeUNSIGNEDCHAR);
+				if(mrsid_->getColorModel() == TeMrSIDReader::ColorModelRGB)
+					params_.setPhotometric(TeRasterParams::TeRGB);
+				else
+					params_.setPhotometric(TeRasterParams::TeMultiBand);
+				readMetadataInformation();
+			}
+			catch(...)
+			{
+				return;
+			}
+		}
+		params_.status_= TeRasterParams::TeReadyToRead;
+	}
+	return;
+}
+
+void
+TeDecoderMrSID::readMetadataInformation()
+{
+	if (!mrsid_)
 		return;
+
+	int i=0;
+	vector<double> aux;
+	if (mrsid_->getNoDataPixel(aux))
+	{
+		for (i=0; i<params_.nBands(); ++i)
+			params_.setDummy(aux[i],i);
+	}
+	if (mrsid_->getMaxValues(aux))
+	{
+		for (i=0; i<params_.nBands(); ++i)
+			params_.vmax_[i] = aux[i];
+	}
+	if (mrsid_->getMinValues(aux))
+	{
+		for (i=0; i<params_.nBands(); ++i)
+			params_.vmin_[i] = aux[i];
 	}
-	fillRasterParams();
 }
 
 TeProjection* 
@@ -92,223 +187,56 @@ TeDecoderMrSID::readProjection()
 	return proj;
 }
 
-void TeDecoderMrSID::fillRasterParams()
-{
-	params_.projection(readProjection());
-	params_.nBands(mrsid_->nBands());
-	params_.setDataType(TeUNSIGNEDCHAR);
-	if(mrsid_->getColorModel() == TeMrSIDReader::ColorModelRGB)
-		params_.setPhotometric(TeRASTERRGB);
-	else
-		params_.setPhotometric(TeRASTERMULTIBAND);
-
-	// retrieves the original resolution (level 0) of MrSID
-	double oResx_ = mrsid_->resX();
-	double oResy_ = -mrsid_->resY();
-
-	// calculates the proper MrSID level accordingly to the asked TerraLib resolution
-	// lowest level where resolution is equal or greater than the asked resolution
-	double dResx_ = oResx_* params_.resolution_;
-	double dResy_ = oResy_* params_.resolution_;
-	currentLevel_ = 0;
-
-	while (oResx_ < dResx_ && oResy_ < dResy_ && currentLevel_ < mrsid_->nlev())
-	{
-		currentLevel_++;
-		mrsid_->zoomTo(currentLevel_);
-		mrsid_->getCurrentLevelResolution(oResx_, oResy_);
-	}
-	zoomToLevel(currentLevel_);
-	if (params_.blockHeight_ == 0 || params_.blockWidth_ != params_.ncols_)
-	{
-		params_.blockWidth_ = params_.ncols_;
-		params_.blockHeight_ = nLinesInBlock();
-	}
-}
-
-
-void TeDecoderMrSID::init()
-{
-	params_.status_= TeNOTREADY;
-	if (params_.mode_ != 'r')	
-		return;
-
-	if (mrsid_)
-	{
-		string curFile(mrsid_->fileName());
-		if (curFile.empty() || curFile != params_.fileName_)
-		{
-			delete mrsid_;
-			mrsid_ = 0;
-		}
-	}
-
-	if (!mrsid_)
-	{
-		try
-		{
-			mrsid_ = new TeMrSIDReader(params_.fileName_.c_str());
-		}
-		catch(...)
-		{
-			return;
-		}
-	}
-	
-	if (data_)
-	{
-		delete data_;
-		data_ = 0;
-	}
-	fillRasterParams();
-	originalLevel_ = currentLevel_;
-	if (!allocateMemory())
-		return;
-	params_.status_= TeREADYTOREAD;
-	return;
-}
-
-bool 
-TeDecoderMrSID::allocateMemory()
-{
-	curStrip_ = -1;
-	if (data_)
-		delete []data_;
-	data_ = 0;
-	data_ = new unsigned char[params_.blockWidth_ * params_.blockHeight_ * params_.nBands()];
-	return (data_ != 0);
-}
-
 bool 
 TeDecoderMrSID::clear()
 {
-	if (mrsid_)
-		mrsid_->clear();
-	if (data_)
-		delete data_;
-	data_ = 0;
-	dX_ = dY_ = 0;
-	curStrip_ = -1;
 	nSelectedBlocks_ = 0;
-	params_.status_= TeNOTREADY;
+	params_.status_= TeRasterParams::TeNotReady;
 	return true;
 }
 
-bool
-TeDecoderMrSID::getElement(int col, int lin, double& val, int band)
-{
-	if ((unsigned int)(lin/params_.blockHeight_) != (unsigned int)(curStrip_/params_.blockHeight_))
-	{
-		curStrip_ = ((unsigned int)(lin/params_.blockHeight_))*params_.blockHeight_;
-		if (!loadStrip())
-			return false;
-	}
-	unsigned int position  = params_.nBands()*(params_.ncols_*(lin-curStrip_)+col)+band;
-	val = (unsigned char) data_[position];
-	return true;
-}
-
-bool TeDecoderMrSID::loadLine(int row, unsigned char* buf, int nlines)
+int 
+TeDecoderMrSID::bestResolution(double res)
 {
-	try
-	{	
-		if (!mrsid_->selectArea(dX_,row+dY_,params_.blockWidth_,nlines))
-			return false;
-		mrsid_->getSelectedArea(buf);
-	}
-	catch(...)
-	{
-		return false;
-	}
-	return true;
+	return mrsid_->bestResolution(res);
 }
 
 
-bool
-TeDecoderMrSID::zoomToLevel(int level)
-{
-	if (level < 0 || level >= mrsid_->nlev())
-		return false;
-
-	mrsid_->zoomTo(level);
-	int ncols, nlines;
-	mrsid_->getDimensionAtLevel(level, ncols, nlines);
-	double x0,y0,x1,y1;
-	mrsid_->getCurrentBoundingBox(x0,y0,x1,y1);
-	params_.boundingBoxLinesColumns(x0,y0,x1,y1,nlines,ncols);
-	params_.resolution_ = (int)(params_.resx_/mrsid_->resX());
-	return true;
-}
-
 int 
 TeDecoderMrSID::bestResolution(TeBox& bb, int ncols, int nlines, TeProjection* proj)
 {
-	if (!mrsid_)
-		return -1;
-
 	TeBox box = bb;
-	if (proj && !(*proj==*params_.projection()))
+	if (proj)
 		box = TeRemapBox(bb, proj, params_.projection());
-	
-	double resx = box.width()/ncols;		// desired resolution
-	double resy = box.height()/nlines;
-	double res = MIN(resx,resy);
-
-	int prevLevel = mrsid_->getCurrentLevel();			// save current level
-
-	int nlev = mrsid_->nlev();
-	int  sidscale_ = 0;
-	double mrsidresx, mrsidresy, mrsidres;
-	do 
-	{
-		mrsid_->zoomTo(sidscale_);
-		mrsid_->getCurrentLevelResolution(mrsidresx, mrsidresy);
-		mrsidres = std::min(mrsidresx, mrsidresy);
-		sidscale_++;
-	}while (res >= mrsidres && sidscale_< nlev);
-	
-	mrsid_->zoomTo(prevLevel);
-	return sidscale_-1;
+	return (mrsid_->getWorstResolutionLevel(ncols, nlines, bb.x1(), bb.y2(), bb.x2(), bb.y1()));
 }
 
+
 bool TeDecoderMrSID::selectBlocks(TeBox& bbox, int resLevel, TeRasterParams& parBlock) 
 {
-	if (!mrsid_)
-		return false;
-
 	// check if desired resolution level is between the range of available levels
-	if (resLevel < 0 || resLevel >= mrsid_->nlev())
+	if (resLevel < 0 || resLevel >= mrsid_->getNumLevels())
 		return false;
 
 	nSelectedBlocks_ = 0;
-	int prevLevel =  mrsid_->getCurrentLevel();				// save current level
-
-	// zoom to level and defines clipping area
-	zoomToLevel(resLevel);
-
 	// calculates width and height of the selected area
-	double bw = bbox.width();
-	double bh = bbox.height();
-	int w = TeRound(bbox.width()/params_.resx_);
-	int h = TeRound(bbox.height()/params_.resy_);
 
-	TeCoord2D ul = coord2Index(TeCoord2D(bbox.x1_,bbox.y2_));
-	int ulx = TeRoundRasterIndex(ul.x_);
-	int uly = TeRoundRasterIndex(ul.y_);
+	double x1 = bbox.x1_;
+	double y1 = bbox.y1_;
+	double x2 = bbox.x2_;
+	double y2 = bbox.y2_;
 
-	if (!mrsid_->selectArea(ulx,uly,w,h))
-	{
-		zoomToLevel(prevLevel);
+	if (!mrsid_->selectArea(resLevel,x1,y1,x2,y2))
 		return false;
-	}
-	params_.blockWidth_ = w;
-	params_.blockHeight_ = h;
-	
+
+	params_.blockWidth_ = mrsid_->getSelectedAreaWidth();
+	params_.blockHeight_ = mrsid_->getSelectedAreaHeight();
+
 	// defines parameters of the selected block
 	nSelectedBlocks_ = 1;			// always select only one block
 	parBlock = params_;
-	parBlock.boundingBoxResolution(bbox.x1_,bbox.y1_,bbox.x2_,bbox.y2_,parBlock.resx_,parBlock.resy_);
-	parBlock.interleaving_ = TePerPixel;
+	parBlock.boundingBoxLinesColumns(x1,y1,x2,y2,params_.blockHeight_,params_.blockWidth_);
+	parBlock.interleaving_ = TeRasterParams::TePerBand;
 	return true;
 }
 
@@ -316,7 +244,8 @@ bool TeDecoderMrSID::getSelectedRasterBlock(TeDecoderMemory* memDec)
 {
   if (!mrsid_ || nSelectedBlocks_ <= 0)
 	  return false;
-  bool res = mrsid_->getSelectedArea((unsigned char*) memDec->data(0));
+  unsigned char* data = (unsigned char*) memDec->data(0);
+  bool res = mrsid_->getSelectedAreaData(data);
   nSelectedBlocks_--;
   return res;
 }
@@ -324,64 +253,11 @@ bool TeDecoderMrSID::getSelectedRasterBlock(TeDecoderMemory* memDec)
 void 
 TeDecoderMrSID::clearBlockSelection()
 {	
-	zoomToLevel(originalLevel_);
 	nSelectedBlocks_ = 0;	
 }
 
-int 
-TeDecoderMrSID::nLinesInBlock()
-{
-	int nlines = 1;
-	while (nlines*params_.ncols_*params_.nBands() < 200*1024*1024 && nlines < params_.nlines_)
-		nlines *= 2;
-	nlines /= 2;
-	return nlines;
-}
-
-void
-TeDecoderMrSID::setClippingArea(TeBox clipBox)
+TeDecoderMrSIDFactory::TeDecoderMrSIDFactory(const string& name): 
+	TeDecoderFactory(name) 
 {
-	zoomToLevel(originalLevel_);
-	TeBox clipBoxInter;
-	if (TeIntersection(params_.boundingBox(),clipBox,clipBoxInter))		//if there where a given box set in parameters
-	{
-		int nlines = params_.nlines_;
-		clipBox = params_.boundingBox();
-		params_.boundingBoxResolution(clipBoxInter.x1_,clipBoxInter.y1_,
-								      clipBoxInter.x2_,clipBoxInter.y2_,
-								      params_.resx_,params_.resy_);	
-	
-		dX_ = static_cast<int>((params_.boundingBox().x1_ - clipBox.x1_)/params_.resx_);
-		dY_ = nlines - static_cast<int>((params_.boundingBox().y1_ - clipBox.y1_)/params_.resy_)
-			  - params_.nlines_;
-	}
-	params_.blockWidth_ = params_.ncols_;
-	params_.blockHeight_ = nLinesInBlock();
-	allocateMemory();
-}
-
-void 
-TeDecoderMrSID::resetClippingArea()
-{
-	zoomToLevel(originalLevel_);
-	params_.blockWidth_ = params_.ncols_;
-	params_.blockHeight_ = nLinesInBlock();
-	allocateMemory();
-}
-
-bool
-TeDecoderMrSID::loadStrip()
-{
-	try
-	{	
-		//(int leftColumn, int topRow, int width, int height)
-		if (!mrsid_->selectArea(dX_,curStrip_+dY_,params_.blockWidth_, params_.blockHeight_))
-			return false;
-		mrsid_->getSelectedArea(data_);
-	}
-	catch(...)
-	{
-		return false;
-	}
-	return true;
-}
+	TeDecoderFactory::instanceName2Dec()["SID"]  = "MrSID";	
+}
\ No newline at end of file
diff --git a/src/terralib/drivers/MrSID/TeDecoderMrSID.h b/src/terralib/drivers/MrSID/TeDecoderMrSID.h
old mode 100644
new mode 100755
index 49ea060..e9033f9
--- a/src/terralib/drivers/MrSID/TeDecoderMrSID.h
+++ b/src/terralib/drivers/MrSID/TeDecoderMrSID.h
@@ -21,7 +21,7 @@ indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
 /*! \file TeDecoderMrSID.h
-    This file deals with decoding of raster images in MrSID Format
+    This file deals with decoding of images in MrSID Format
 */
 #ifndef  __TERRALIB_INTERNAL_DECODERMRSID_H
 #define  __TERRALIB_INTERNAL_DECODERMRSID_H
@@ -29,7 +29,15 @@ of this library and its documentation.
 #include "TeDecoder.h"
 #include "TeMrSID.h"
 
-//! The TeMrSID driver provides access to decode MrSID Images
+//! The TeMrSID decoder is a driver to decode images on the MrSID format.
+/*	
+	This class depends on the SDK provided by LizardTech, available at the
+	website <www.lizardtech.com.br>. You should include this file in your
+	final application and link it against the SDK libraries. \par
+	This decoder provides only decoding capacities. It is not possible
+	to codifiy images in MrSID format. \par
+	The default file extension associated to this decoder is ".sid".
+*/
 class TeDecoderMrSID : public TeDecoder
 {
 public:
@@ -41,22 +49,16 @@ public:
 	TeDecoderMrSID(const std::string& fname);
 
 	//! Destructor
-	~TeDecoderMrSID()
-	{
-		if (mrsid_)
-			delete mrsid_;
-		if (data_)
-			delete data_;
-	}
-
-	//! Initalizes internal structures to make decode able to read MrSID images
+	~TeDecoderMrSID();
+
+	//! Initalizes internal structures to make decoder able to read MrSID images
 	void init();
 
 	//! Releases internal structures and invalidates MrSID decoder
 	bool clear();
 
 	//! Provided for compatibility reasons only, this decoder can not encode data
-	bool setElement(int col, int lin, double val, int band=0) 
+	bool setElement(int /*col*/, int /*lin*/, double /*val*/, int /*band=0*/) 
 	{ return false; }
 
 	//! Gets the value of an specific element (col, lin, band) of a raster data
@@ -66,7 +68,8 @@ public:
 		\param val pixel value being retrieved
 		\param band pixel band identifier
 	*/
-	bool getElement(int col, int lin, double& val, int band=0);
+	bool getElement(int /*col*/, int /*lin*/, double& /*val*/, int /*band=0*/)
+	{ return false; }
 
 	//! Returns the best resolution level in a MrSID image to cover a paricular area
 	/* 
@@ -94,7 +97,7 @@ public:
 	//! Returns the contents of a portion of image previously selected
 	/*
 		\param memDec a pointer to a decoder to a raster in memory. This decoder
-		should be previously initialialized
+		should be previously initialized
 	*/
 	bool getSelectedRasterBlock(TeDecoderMemory* memDec);
 
@@ -105,59 +108,38 @@ public:
 	//! Reset block selection. Returns navigator to the original resolution level
 	void clearBlockSelection();
 
-	//! Defines a decoding subarea
-	void setClippingArea(TeBox clipBox);
-
-	//! Resets decoding area
-	void resetClippingArea();
-
-	bool loadLine(int row, unsigned char* buf,int nlines);
+	//! Returns the raster resolution level available that is more similiar to a given desired resolution
+	int bestResolution(double res);
 
-	void addDeltaY()
-	{ 	
-		params_.boxLinesColumns(params_.box().x1_, params_.box().y1_+10000000,
-	                            params_.box().x2_, params_.box().y2_+10000000, 
-								params_.nlines_, params_.ncols_); 
-	}
 
 private:
-
+	// Methods
 	TeDecoderMrSID();  
-	
-	bool allocateMemory();
-
-	TeMrSIDReader* mrsid_;
-
-	int nSelectedBlocks_;
-	int originalLevel_;
-	int currentLevel_;
-
-	unsigned int curStrip_;
-	unsigned char* data_;
-	
-	void fillRasterParams();
-
-	bool zoomToLevel(int level);
-
-	bool loadStrip();
-
-	int nLinesInBlock();
-
 	TeProjection* readProjection();
+	void readMetadataInformation();
 
 
-	int dX_, dY_;
+	// Members
+	TeMrSIDReader* mrsid_;
+	int nSelectedBlocks_;
 };
 
-//! Implements a factory to build TeQtDecoders
+//! Implements a factory to build MrSID decoders
 class TeDecoderMrSIDFactory : public TeDecoderFactory
 {
 public:
+	//! Factory constructor
+	TeDecoderMrSIDFactory(const string& name);
 
-	TeDecoderMrSIDFactory(const string& name) : TeDecoderFactory(name) {}
-
-	virtual TeDecoder* build (const TeRasterParams& arg)
+	//! Builds the object
+	TeDecoder* build (const TeRasterParams& arg)
 	{  return new TeDecoderMrSID(arg); }
 };
 
+//! Creates a static factory to build MrSID decoders 
+namespace 
+{
+	//! A static factory to build MrSID decoders 
+	static TeDecoderMrSIDFactory theDecoderMrSIDFactory("MrSID");
+};
 #endif
diff --git a/src/terralib/drivers/MrSID/TeMrSID.cpp b/src/terralib/drivers/MrSID/TeMrSID.cpp
old mode 100644
new mode 100755
index 653b170..79a8558
--- a/src/terralib/drivers/MrSID/TeMrSID.cpp
+++ b/src/terralib/drivers/MrSID/TeMrSID.cpp
@@ -1,465 +1,560 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2006 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
 #include "TeMrSID.h"
-#include "MrSIDNavigator.h" 
-#include "MrSIDImageFile.h" 
-#include "lt_xTrans.h" 
-#include "lt_exception.h"
+
+#include <lt_fileSpec.h>
+#include <MrSIDImageReader.h>
+#include <lti_navigator.h>
+#include <lti_sceneBuffer.h>
+#include <lti_pixel.h>
+#include <lti_utils.h>
+
+#include <locale.h>
+#include <math.h>
+#include <stdio.h>
 
 LT_USE_NAMESPACE(LizardTech)
 
-// MrSID not initialized yet
-bool TeMrSIDReader::mrsid_initialized = false; 
+// Static variables initialization:
+
+bool TeMrSIDReader::mrsid_initialized = false;
+
+/*
+** ---------------------------------------------------------------
+** Methods Implementation:
+*/
 
-// Constructor
-TeMrSIDReader::TeMrSIDReader(const char* fname) :
-	sidNav_(0),
-    sidImageFile_(0),
-	imgBuffer_(0),
-	mrsidFileName_(fname)
+TeMrSIDReader::TeMrSIDReader(const std::string& fname):
+	fileName_(fname)
 {
-  if(!mrsid_initialized)
-  {
-    setlocale(LC_ALL,"English");
-    XTrans::initialize();
-    mrsid_initialized = true;
-  }
-
-  FileSpecification filespec(fname);
-  try
-  {
-	  sidImageFile_ = new MrSIDImageFile(filespec);
-	  sidNav_ = new MrSIDNavigator(*sidImageFile_);
-  }
-  catch(...)
-  {
-	  int j = 0;
-  }
+	LT_STATUS sts = LT_STS_Uninit;
 
-	return;
+	if(!mrsid_initialized)
+	{
+		setlocale(LC_ALL,"English");
+		//ATENCAO - Verificar se isso funciona quando a configuracao do Windows for em Portugues.
+		//    XTrans::initialize();      
+		mrsid_initialized = true;
+	}
+	const LTFileSpec filespec(fname.c_str());
+	sidImageFile_ = new MrSIDImageReader(filespec);
+	sts = sidImageFile_->initialize();
+	if(!LT_SUCCESS(sts))
+		throw "Erro lendo MrSID";
+	sidNav_ = new LTINavigator(*sidImageFile_);
 };
 
 TeMrSIDReader::~TeMrSIDReader()
 {
-  if(sidNav_) delete sidNav_;
- // if(sidImageFile_) delete sidImageFile_;		// ????!!!
-  clear();
-}
-
-void TeMrSIDReader::clear()
-{
-  if(imgBuffer_ != NULL) 
-  {
-    free(imgBuffer_);
-    imgBuffer_ = NULL;
-  }
+//	if(sidImageFile_) delete sidImageFile_;
+	if(sidNav_) delete sidNav_;
 }
 
 int TeMrSIDReader::nBands() const
 {
-  return sidNav_->nband();
+	return sidImageFile_->getNumBands();
 }
 
 unsigned int TeMrSIDReader::bitsPerPixel() const
 {
-  return sidImageFile_->colorSpace().samplesPerPixel();
+	return sidImageFile_->getPixelProps ().getNumBytes() * 8;
 }
 
-TeMrSIDReader::ColorModel TeMrSIDReader::getColorModel() const
+TeMrSIDReader::ColorModel TeMrSIDReader::getColorModel()
 {
-	ColorSpace::Scheme scheme = sidImageFile_->colorSpace().scheme();
-	if (scheme == ColorSpace::RGB)
+	LTIColorSpace color_space = sidImageFile_->getColorSpace();
+
+	if(color_space == LTI_COLORSPACE_RGB)
 		return ColorModelRGB;
-	else if (scheme == ColorSpace::GRAYSCALE)
+	else if(color_space == LTI_COLORSPACE_GRAYSCALE)
 		return ColorModelGray;
 	else
 		return ColorModelUnknown;
 }
 
-unsigned int TeMrSIDReader::getWidth() const 
+unsigned int TeMrSIDReader::getWidth()
 {
-  return sidNav_->imageWidth();
+	return sidImageFile_->getWidth();
 }
 
-unsigned int TeMrSIDReader::getHeight() const
+unsigned int TeMrSIDReader::getHeight()
 {
-  return sidNav_->imageHeight();
+	return sidImageFile_->getHeight();
 }
 
 bool TeMrSIDReader::hasWorldInfo()
 {
-  return sidNav_->hasWorldInfo();
+	return !(sidImageFile_->isGeoCoordImplicit());
 }
 
 double TeMrSIDReader::originX()
 {
-  double x;
-
-  if(!sidImageFile_->xu(x))
-    return 0;
-
-  x-= resX() * 0.5;
-
-  return x;
+	return sidImageFile_->getGeoCoord().getX(); 
 }
 
 double TeMrSIDReader::originY()
 {
-  double y;
-
-  if(!sidImageFile_->yu(y))
-    return 0;
-
-  y-= resY() * 0.5;
-
-  return y;
+	return sidImageFile_->getGeoCoord().getY();
 }
 
 double TeMrSIDReader::resX()
 {
-  double res;
-
-  MetadataReader myReader = sidImageFile_->metadata();
-  if (myReader.empty()) return 1;
-  if (myReader.keyExists("IMAGE::X_RESOLUTION"))
-  {
-    MetadataElement element = myReader.getValue("IMAGE::X_RESOLUTION");
-    if (!(element.type() == MetadataValue::DOUBLE)) return 1;
-    res = (double) element.getMetadataValue();
-    return res;
-  }
-  else return 1;
+  return sidImageFile_->getGeoCoord().getXRes();
 }
 
 double TeMrSIDReader::resY()
 {
-  double res;
-
-  MetadataReader myReader = sidImageFile_->metadata();
-  if (myReader.empty()) return -1;
-  if (myReader.keyExists("IMAGE::Y_RESOLUTION"))
-  {
-    MetadataElement element = myReader.getValue("IMAGE::Y_RESOLUTION");
-    if (!(element.type() == MetadataValue::DOUBLE)) return -1;
-    res = (double) element.getMetadataValue();
-    return -res;
-  }
-  else return -1;
+	return sidImageFile_->getGeoCoord().getYRes();
 }
 
 void TeMrSIDReader::getWorld(double& x0, double& y0, double& x1, double& y1)
 {
-  double sx, sy;
-  unsigned int w, h;
-
-  getOrigin(x0, y0);
-  getResolution(sx, sy);
-  getDimensions(w, h);
-
-  x1 = x0 + w * sx;
-  y1 = y0 + h * sy;
+	unsigned int w, h;
+	getOrigin(x0, y0);
+	getDimensions(w, h);
+	sidImageFile_->getGeoCoord().pixelToGeo(w - 1, h - 1, 1.0, x1, y1);
 }
 
-void TeMrSIDReader::getCurrentBoundingBox(double& xmin, double& ymin, double& xmax, double& ymax)
+void TeMrSIDReader::getNavigationParameters(std::vector<double>& nwf)
 {
-  double sx, sy;
-  unsigned int w, h;
-  double x0, y0, x1, y1;
-
-  sidNav_->xres(sx);
-  sidNav_->yres(sy);
-
-  sidNav_->panTo(0,0,IntRect::TOP_LEFT);
-  if(!sidNav_->xu(x0))
-    x0 = 0.0;
-  else
-    x0-= sx * 0.5;
-
-  if(!sidNav_->yu(y0))
-    y0 = 0.0;
-  else
-    y0-= sy * 0.5;
-
-  sy = -1*sy;
-  int l = sidNav_->level();
-
-  LizardTech::IntDimension dim = sidImageFile_->getDimensionsAtLevel(l);
-  w = dim.width;
-  h = dim.height;
-
-  x1 = x0 + w * sx;
-  y1 = y0 + h * sy;
-
-  if(x0 < x1)
-  {
-    xmin = x0;
-    xmax = x1;
-  }
-  else
-  {
-    xmin = x1;
-    xmax = x0;
-  }
-
-  if(y0 < y1)
-  {
-    ymin = y0;
-    ymax = y1;
-  }
-  else
-  {
-    ymin = y1;
-    ymax = y0;
-  }
+	const LTIGeoCoord& geo = sidImageFile_->getGeoCoord();
+	double xUL, yUL, xRes, yRes, xRot, yRot;
+	geo.get(xUL,yUL,xRes,yRes,xRot,yRot);
+	nwf.clear();
+	nwf.push_back(xRes);
+	nwf.push_back(xRot);
+	nwf.push_back(yRot);
+	nwf.push_back(yRes);
+	nwf.push_back(xUL);
+	nwf.push_back(yUL);
+	return;
 }
 
 void TeMrSIDReader::getBoundingBox(double& xmin, double& ymin, double& xmax, double& ymax)
 {
-  double sx, sy;
-  unsigned int w, h;
-  double x0, y0, x1, y1;
-
-  sx = resX();
-  sy = resY();
-
-  if(!sidImageFile_->xu(x0))
-    x0 = 0.0;
-  else
-    x0-= sx * 0.5;
-
-  if(!sidImageFile_->yu(y0))
-    y0 = 0.0;
-  else
-    y0-= sy * 0.5;
-
-  w = sidNav_->imageWidth();
-  h = sidNav_->imageHeight();
-
-  x1 = x0 + w * sx;
-  y1 = y0 + h * sy;
-
-  if(x0 < x1)
-  {
-    xmin = x0;
-    xmax = x1;
-  }
-  else
-  {
-    xmin = x1;
-    xmax = x0;
-  }
-
-  if(y0 < y1)
-  {
-    ymin = y0;
-    ymax = y1;
-  }
-  else
-  {
-    ymin = y1;
-    ymax = y0;
-  }
+	double sx, sy;
+	unsigned int w, h;
+	double x0, y0, x1, y1;
+
+	sx = resX();
+	sy = resY();
+
+	getOrigin(x0, y0);
+	x0-= sx * 0.5;
+	y0-= sy * 0.5;
+
+	getDimensions(w, h);
+
+	x1 = x0 + w * sx;
+	y1 = y0 + h * sy;
+
+	if(x0 < x1)
+	{
+		xmin = x0;
+		xmax = x1;
+	}
+	else
+	{
+		xmin = x1;
+		xmax = x0;
+	}
+
+	if(y0 < y1)
+	{
+		ymin = y0;
+		ymax = y1;
+	}
+	else
+	{
+		ymin = y1;
+		ymax = y0;
+	}
 }
 
-ImageBuffer* TeMrSIDReader::getImageBuffer(unsigned int size, unsigned int nbands,
-                                           const unsigned int* bands, void* data)
+void TeMrSIDReader::world2Pixel(double wx, double wy, int& ix, int& iy)
 {
-	unsigned int i;
-	ImageBufferInfo properties;
-	int* sample_map;
+	double px, py;
 
-	if(data == NULL)
-		throw OutOfMemoryException();
-
-	// compute each band offset
-	sample_map = (int*)calloc(nbands, sizeof(int));
-	if (sample_map == NULL)
-		throw OutOfMemoryException();
-
-	for(i = 0;i < nbands;i++)
-		sample_map[i] = bands[i] * size;
-
-	/* 
-	Set image buffer properties
-	Attention! The order in which the ImageBufferInfo properties are set matters.
-	So, care must be taken during modification of code part.
-	*/
-	if(nBands() == 1)
-		properties.setColorSpace(ColorSpace::GRAYSCALE);
-	else
-		properties.setColorSpace(ColorSpace::RGB);
-
-	properties.setSampleMap((const int*)sample_map);
-	properties.setBandDistribution(ImageBufferInfo::BSQ);
-	properties.setSampleType(ImageBufferInfo::UINT8);
-	properties.setAlignment(ImageBufferInfo::NO_ALIGN);
-	properties.setStride(1);
-	free(sample_map);
-	return new ImageBuffer(properties, data);
+	sidImageFile_->getGeoCoord().geoToPixel(wx, wy, 1.0, px, py);
+
+	ix = (int)(px + 0.5);
+	iy = (int)(py + 0.5);
 }
 
-ImageBuffer* TeMrSIDReader::getImageBuffer2(unsigned int size, unsigned int nbands,
-                                const unsigned int* bands, void* data[])
+void TeMrSIDReader::pixel2World(int ix, int iy, double& wx, double& wy)
 {
-  unsigned int i;
-  ImageBufferInfo properties;
-  int* sample_map;
-
-  // allocate data for the image buffer
-  if(imgBuffer_ != NULL) 
-	  free(imgBuffer_);
-  imgBuffer_ = (unsigned char*)calloc(nbands, size);
-
-  if(imgBuffer_ == NULL)
-    throw OutOfMemoryException();
-
-  // compute each band offset
-  sample_map = (int*)calloc(nbands, sizeof(int));
-  if(sample_map == NULL)
-    throw OutOfMemoryException();
-
-  for(i = 0;i < nbands;i++)
-  {
-    sample_map[i] = bands[i] * size;
-    data[i] = imgBuffer_ + sample_map[i];
-  }
-
-  /* 
-    Set image buffer properties
-    Attention! The order in which the ImageBufferInfo properties are set matters.
-    So, care must be taken during modification of code part.
-  */
-  if(nBands() == 1)
-    properties.setColorSpace(ColorSpace::GRAYSCALE);
-  else
-    properties.setColorSpace(ColorSpace::RGB);
-
-  properties.setSampleMap((const int*)sample_map);
-  properties.setBandDistribution(ImageBufferInfo::BSQ);
-  properties.setSampleType(ImageBufferInfo::UINT8);
-  properties.setAlignment(ImageBufferInfo::NO_ALIGN);
-  properties.setStride(1);
-
-  free(sample_map);
-
-  return new ImageBuffer(properties, imgBuffer_);
+	sidImageFile_->getGeoCoord().pixelToGeo(ix, iy, 1.0, wx, wy);
 }
 
-int TeMrSIDReader::getMaxZoomLevel()
-{ 
-	if (sidNav_)
-		return sidNav_->getMaxZoomLevel();
-	return -1;
+
+LTISceneBuffer* 
+TeMrSIDReader::getImageBuffer(unsigned int width, unsigned int height, 
+							  unsigned int nbands, unsigned char* data)
+{
+	if(data == NULL)
+		return NULL;
+
+	unsigned int size = width * height;
+	void** bands_data = (void**)calloc(nbands, sizeof(void*));
+	for(unsigned int i = 0;i < nbands;i++)
+		bands_data[i] = data + i * size;
+	return new LTISceneBuffer(sidImageFile_->getPixelProps(), width, height, bands_data);
 }
 
-int TeMrSIDReader::nlev()
+int
+TeMrSIDReader::bestResolution(double res)
 {
-	if (sidNav_)
-		return sidNav_->nlev();
-	return 0;
+	double magx, magy, mag;
+
+	//compute Magnification
+	magx = fabs(1/res);
+	magy = fabs(1/res);
+
+	if(magx > magy)
+		mag = magx;
+	else
+		mag = magy;
+
+	if(mag <= sidImageFile_->getMinMagnification())
+		mag = sidImageFile_->getMinMagnification();
+	else if(mag >= sidImageFile_->getMaxMagnification())
+		mag = sidImageFile_->getMaxMagnification();
+	else if(mag < 1)
+	{
+		int imag = (int)(1.0/mag) >> 1;
+		int i;
+
+		for(i = 1;i <= imag;i = i << 1);
+		mag = 1.0/i;
+	}
+	else 
+	{
+		int imag = (int)ceil(mag);
+		int i;
+		for(i = 1;i < imag;i = i << 1);
+			mag = i;
+	}
+	return LTIUtils::magToLevel(mag);
 }
 
-int TeMrSIDReader::getCurrentLevel()
+int 
+TeMrSIDReader::getBestResolutionLevel(unsigned int w, unsigned int h, 
+									  double x0, double y0, double x1, double y1)
 {
-	if (sidNav_)
-		return sidNav_->level();
-	return 0;
+	double magx, magy, mag;
+
+	//compute Magnification
+	magx = fabs((double)w/(x1 - x0) * resX());
+	magy = fabs((double)h/(y1 - y0) * resY());
+
+	if(magx > magy)
+		mag = magx;
+	else
+		mag = magy;
+
+	if(mag <= sidImageFile_->getMinMagnification())
+		mag = sidImageFile_->getMinMagnification();
+	else if(mag >= sidImageFile_->getMaxMagnification())
+		mag = sidImageFile_->getMaxMagnification();
+	else if(mag < 1)
+	{
+		int imag = (int)(1.0/mag) >> 1;
+		int i;
+
+		for(i = 1;i <= imag;i = i << 1);
+		mag = 1.0/i;
+	}
+	else 
+	{
+		int imag = (int)ceil(mag);
+		int i;
+		for(i = 1;i < imag;i = i << 1);
+			mag = i;
+	}
+	return LTIUtils::magToLevel(mag);
 }
 
-void TeMrSIDReader::zoomTo(int level)
+int 
+TeMrSIDReader::getWorstResolutionLevel(unsigned int w, unsigned int h, 
+									   double x0, double y0, double x1, double y1)
 {
-	if (sidNav_)
-		sidNav_->zoomTo(level);
+	double magx, magy, mag;
+
+	//compute Magnification
+	magx = fabs((double)w/(x1 - x0) * resX());
+	magy = fabs((double)h/(y1 - y0) * resY());
+
+	if(magx < magy)
+		mag = magx;
+	else
+		mag = magy;
+
+	if(mag <= sidImageFile_->getMinMagnification())
+		mag = sidImageFile_->getMinMagnification();
+	else if(mag >= sidImageFile_->getMaxMagnification())
+		mag = sidImageFile_->getMaxMagnification();
+	else if(mag < 1)
+	{
+		int imag = (int)ceil(1.0/mag);
+		int i;
+		for(i = 1;i < imag;i = i << 1);
+			mag = 1.0/i;
+	}
+	else 
+	{
+		int imag = (int)mag >> 1;
+		int i;
+		for(i = 1;i <= imag;i = i << 1);
+		mag = i;
+	}
+	return LTIUtils::magToLevel(mag);
 }
 
-void TeMrSIDReader::getCurrentLevelResolution(double& resx, double& resy)
+int 
+TeMrSIDReader::getProxResolutionLevel(unsigned int w, unsigned int h, 
+                                      double x0, double y0, double x1, double y1)
 {
-	if (!sidNav_)
-		return;
-	sidNav_->yres(resy);
-	sidNav_->xres(resx);
+	double magx, magy, mag;
+
+	//compute Magnification
+	magx = fabs((double)w/(x1 - x0) * resX());
+	magy = fabs((double)h/(y1 - y0) * resY());
+
+	if(magx > magy)
+		mag = magx;
+	else
+		mag = magy;
+
+	if(mag <= sidImageFile_->getMinMagnification())
+		mag = sidImageFile_->getMinMagnification();
+	else if(mag >= sidImageFile_->getMaxMagnification())
+		mag = sidImageFile_->getMaxMagnification();
+	else if(mag < 1)
+	{
+		//    int imag = (int)(1.0/mag) >> 1;
+		int imag = (int)(1.0/mag + 0.5);
+		int i;
+		for(i = 1;i < imag;i = i << 1);
+			mag = 1.0/i;
+	}
+	else 
+	{
+		int imag = (int)ceil(mag);
+		int i;
+		for(i = 1;i < imag;i = i << 1);
+			mag = i;
+	}
+	return LTIUtils::magToLevel(mag);
+}
+
+bool 
+TeMrSIDReader::selectArea(int lev, double& x0, double& y0, double& x1, double& y1)
+{ 
+	double mag;
+	LT_STATUS sts = LT_STS_Uninit;
+	mag = LTIUtils::levelToMag(lev);
+
+	if(mag < sidImageFile_->getMinMagnification())
+		mag = sidImageFile_->getMinMagnification();
+	else if(mag > sidImageFile_->getMaxMagnification())
+		mag = sidImageFile_->getMaxMagnification();
+
+	sts = sidNav_->setSceneAsGeoULLR(x0, y1, x1, y0, mag);
+	if(!LT_SUCCESS(sts))
+		return false;
+
+	if(!sidNav_->clipToImage())
+		return false;
+
+	sidNav_->roundScene();
+	const LTIGeoCoord& geo_coord = sidImageFile_->getGeoCoord();
+	geo_coord.pixelToGeo(sidNav_->getUpperLeftCol() - 0.5, sidNav_->getUpperLeftRow() - 0.5, 
+						 mag, x0, y1);
+	geo_coord.pixelToGeo(sidNav_->getLowerRightCol() - 0.5, sidNav_->getLowerRightRow() - 0.5, 
+						 mag, x1, y0);
+	return sidNav_->isSceneValid();
 }
 
-void TeMrSIDReader::getCurrentRectangleDimension(int& w, int& h)
+int 
+TeMrSIDReader::getSelectedAreaWidth()
 {
-	if (!sidNav_)
-		return;
-	w = sidNav_->width();
-	h = sidNav_->height();
+	return sidNav_->getNumCols();
 }
 
-void TeMrSIDReader::getDimensionAtLevel(int level, int& w, int& h)
+int 
+TeMrSIDReader::getSelectedAreaHeight()
 {
-	if (!sidImageFile_)
-		return;
-	LizardTech::IntDimension dim;
-	dim = sidImageFile_->getDimensionsAtLevel(level);
-	w = dim.width;
-	h = dim.height;
+	return sidNav_->getNumRows();
 }
 
-/* Pans the specified rectangle navigator to a new point and redefines it's dimension*/
+/* Loads the image selected by the navigator rectangle into memory.
+   Expects that the pointer to unsiged char was already allocated */
 bool 
-TeMrSIDReader::selectArea(int leftColumn, int topRow, int width, int height)
+TeMrSIDReader::getSelectedAreaData(unsigned char*& data)
 {
 	if(!sidImageFile_)
 		return false;
-
 	if(!sidNav_)
 		return false;
-	try{
-		sidNav_->panTo(leftColumn, topRow, IntRect::TOP_LEFT);
-	    sidNav_->resize(width, height, IntRect::TOP_LEFT);
-	}
-	catch(...)
-	{
+	if(!data)
 		return false;
-	}
+
+	// generate a memory buffer
+	unsigned int size = sidNav_->getNumCols() * sidNav_->getNumRows();
+	void** bands_data = (void**)calloc(nBands(), sizeof(void*));
+	for(int i=0;i<nBands();++i)
+		bands_data[i] = data + i * size;
+	LTISceneBuffer* sidBuffer = new LTISceneBuffer(sidImageFile_->getPixelProps(), sidNav_->getNumCols(), 
+		                           sidNav_->getNumRows(), bands_data);
+	if(sidBuffer == NULL)
+		return false;
+
+	LT_STATUS sts = LT_STS_Uninit;
+	sts = sidImageFile_->read(sidNav_->getScene(), *sidBuffer);
+
+	if(!LT_SUCCESS(sts))
+		return false;
+	delete sidBuffer;
 	return true;
 }
 
-/* Loads the image selected by the navigator rectangle into memory.
-   Expects that the pointer to unsiged char was already allocated */
 bool 
-TeMrSIDReader::getSelectedArea(unsigned char* data)
+TeMrSIDReader::getMinValues(std::vector<double>& minvalues)
 {
-	if(!sidImageFile_)
+	const LTIPixel minv = sidImageFile_->getMinDynamicRange(); 
+	LTIDataType dt = minv.getDataType();
+	if (dt == LTI_DATATYPE_INVALID)
 		return false;
+	
+	minvalues.clear();
+	int i;
+	switch (dt)
+	{
+	case LTI_DATATYPE_UINT8:
+		for (i=0; i<minv.getNumBands(); ++i)
+			minvalues.push_back(minv.getSampleValueUint8(i));
+		break;
+	case LTI_DATATYPE_SINT8:
+		for (i=0; i<minv.getNumBands(); ++i)
+			minvalues.push_back(minv.getSampleValueSint8(i));
+		break;
+	case LTI_DATATYPE_UINT16:
+		for (i=0; i<minv.getNumBands(); ++i)
+			minvalues.push_back(minv.getSampleValueUint16(i));
+		break;
+	case LTI_DATATYPE_SINT16:
+		for (i=0; i<minv.getNumBands(); ++i)
+			minvalues.push_back(minv.getSampleValueSint16(i));
+		break;
+	default:
+		for (i=0; i<minv.getNumBands(); ++i)
+			minvalues.push_back(minv.getSampleValueFloat32(i));
+	}
+	return true;	
+}
 
-	if(!sidNav_)
+bool 
+TeMrSIDReader::getMaxValues(std::vector<double>& maxvalues)
+{
+	const LTIPixel maxv = sidImageFile_->getMaxDynamicRange(); 
+	LTIDataType dt = maxv.getDataType();
+	if (dt == LTI_DATATYPE_INVALID)
 		return false;
-
-	try{
-		ImageBuffer* sidBuffer = getImageBuffer(sidNav_->width() * sidNav_->height(), 
-			                                    nBands(), data);
-		sidNav_->loadImage(*sidBuffer);
-		delete sidBuffer;
-	}
-	catch(...)
+	
+	maxvalues.clear();
+	int i;
+	switch (dt)
 	{
+	case LTI_DATATYPE_UINT8:
+		for (i=0; i<maxv.getNumBands(); ++i)
+			maxvalues.push_back(maxv.getSampleValueUint8(i));
+		break;
+	case LTI_DATATYPE_SINT8:
+		for (i=0; i<maxv.getNumBands(); ++i)
+			maxvalues.push_back(maxv.getSampleValueSint8(i));
+		break;
+	case LTI_DATATYPE_UINT16:
+		for (i=0; i<maxv.getNumBands(); ++i)
+			maxvalues.push_back(maxv.getSampleValueUint16(i));
+		break;
+	case LTI_DATATYPE_SINT16:
+		for (i=0; i<maxv.getNumBands(); ++i)
+			maxvalues.push_back(maxv.getSampleValueSint16(i));
+		break;
+	default:
+		for (i=0; i<maxv.getNumBands(); ++i)
+			maxvalues.push_back(maxv.getSampleValueFloat32(i));
+	}
+	return true;
+}
+//! Returns true if there is a specification for a no data value
+bool 
+TeMrSIDReader::getNoDataPixel(std::vector<double>& nodata)
+{
+	const LTIPixel* nd = sidImageFile_->getNoDataPixel();
+    	if(nd == NULL)
 		return false;
+	LTIDataType dt = nd->getDataType();
+	if (dt == LTI_DATATYPE_INVALID)
+		return false;
+
+	nodata.clear();
+	int i;
+	switch (dt)
+	{
+	case LTI_DATATYPE_UINT8:
+		for (i=0; i<nd->getNumBands(); ++i)
+			nodata.push_back(nd->getSampleValueUint8(i));
+		break;
+	case LTI_DATATYPE_SINT8:
+		for (i=0; i<nd->getNumBands(); ++i)
+			nodata.push_back(nd->getSampleValueSint8(i));
+		break;
+	case LTI_DATATYPE_UINT16:
+		for (i=0; i<nd->getNumBands(); ++i)
+			nodata.push_back(nd->getSampleValueUint16(i));
+		break;
+	case LTI_DATATYPE_SINT16:
+		for (i=0; i<nd->getNumBands(); ++i)
+			nodata.push_back(nd->getSampleValueSint16(i));
+		break;
+	default:
+		for (i=0; i<nd->getNumBands(); ++i)
+			nodata.push_back(nd->getSampleValueFloat32(i));
 	}
 	return true;
 }
 
+int 
+TeMrSIDReader::getNumLevels()
+{
+	return sidImageFile_->getNumLevels();
+}
 
-/* Allocates an image buffer as expected from MrSID */
-ImageBuffer* 
-TeMrSIDReader::getImageBuffer(unsigned int size, unsigned int nbands, void* data)
+bool 
+TeMrSIDReader::zoomTo(int level)
 {
-	ImageBufferInfo properties;
-	if (nbands == 1)
-		properties.setColorSpace(ColorSpace::GRAYSCALE);
-	else
-		properties.setColorSpace(ColorSpace::RGB);
-    properties.setBandDistribution(ImageBufferInfo::BIP);
-    properties.setSampleType(ImageBufferInfo::UINT8);
-    properties.setAlignment(ImageBufferInfo::NO_ALIGN);
-	if (nbands == 3)
-	{
-	    properties.setStride(3);
-		int sampleMap[] = {0, 1, 2,};
-		properties.setSampleMap(sampleMap);
-	}
-	else
-	    properties.setStride(1);
-	return new ImageBuffer(properties, data);
+	double mag = LTIUtils::levelToMag(level);
+	return LT_SUCCESS(sidNav_->zoomTo(mag,LTINavigator::STYLE_STRICT));
 }
+
diff --git a/src/terralib/drivers/MrSID/TeMrSID.h b/src/terralib/drivers/MrSID/TeMrSID.h
old mode 100644
new mode 100755
index 50510a1..8e995db
--- a/src/terralib/drivers/MrSID/TeMrSID.h
+++ b/src/terralib/drivers/MrSID/TeMrSID.h
@@ -1,35 +1,77 @@
-#ifndef TEMRSID_H
-#define TEMRSID_H
-
-/*
-#ifdef TEMRSIDDLL_EXPORTS
-#define DLL_IMP __declspec(dllexport)
-#else
-#define DLL_IMP __declspec(dllimport)
-#endif
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2006 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeMrSID.h
+    This file contains functions that provide a wrapper around the SDK provided by LizardTech to decode MrSID images.
 */
+#ifndef  __TERRALIB_INTERNAL_MRSID_H
+#define  __TERRALIB_INTERNAL_MRSID_H
 
+//Internal classes from LizardTech namespace
 namespace LizardTech
 {
-class MrSIDNavigator;
-class MrSIDImageFile;
-class ImageBuffer;
+class MrSIDImageReader;
+class LTINavigator;
+class LTISceneBuffer;
 }
 
-#pragma warning(disable: 4275)
+#include <string>
+#include <vector>
+
 
-//class DLL_IMP TeMrSIDReader
+//! A reader to a MrSID image
+/*!
+	This class uses the SDK provided by LizardTech to built a MrSID image reader support.
+	This class is used by TeDecoderMrSID and shouldn't be used directly.
+	\sa TeDecoderMrSID
+*/
 class TeMrSIDReader
 {
-	LizardTech::MrSIDNavigator* sidNav_;
-	LizardTech::MrSIDImageFile* sidImageFile_;
+	static bool mrsid_initialized; // indicates if MrSID has already been initialized
+	LizardTech::LTINavigator*		sidNav_;
+	LizardTech::MrSIDImageReader*	sidImageFile_;
+	std::string						fileName_;
+
+	//!Returns an ImageBuffer for loading an image from MrSIDNavigator.
+	/**
+		\param size(in) size of the image buffer
+		\param nbands(in) number of output bands
+		\param bands(in) output bands vector indicating the desired output bands and its order
+		\param data(out) bands image buffer vector
+	*/
+	LizardTech::LTISceneBuffer*		getImageBuffer(unsigned int width, unsigned int height,
+												unsigned int nbands, unsigned char* data);
+public:
+	//! Constructor
+	TeMrSIDReader(const std::string& fname);
 
-	unsigned char* imgBuffer_; //!< image buffer
+	//! Destructor
+	~TeMrSIDReader();
 
-	const char* mrsidFileName_; 
+	//! Returns the  image filename associated to this reader
+	std::string fileName() const
+	{	return fileName_; }
 
-public:
-	//! Color Models 
+	//! Color models from MrSID encoding system
 	typedef enum { 
 		ColorModelUnknown,  //!< unknown color model
 		ColorModelGray,     //!< gray scale, composed by one 8 bit channel 
@@ -38,150 +80,120 @@ public:
 		ColorModelRGBA      //!< composed by four 8 bit channels
 	} ColorModel;
 
-	static bool mrsid_initialized; //!< indicates if MrSID has already been initialized
+	//! Returns the color model of the image
+	ColorModel getColorModel();
 
-	//! Returns the color space
-	TeMrSIDReader::ColorModel getColorModel() const;	
-		
-	//! Constructor
-	TeMrSIDReader(const char* fname);
+	//! Returns the number of bands in the image   
+	int nBands() const;  
 
-	//! Destructor
-	~TeMrSIDReader();
+	//! Returns the number of bits per pixel of the image   
+	unsigned int bitsPerPixel() const; 
 
-	//! Releases internal buffer image
-	void clear();
+	//! Returns the width of the image in pixels  
+	unsigned int getWidth();
 
-	//! Returns the name of the data file
-	const char* fileName()
-	{	return mrsidFileName_; }
+	//! Returns the height of the image in pixels 
+	unsigned int getHeight();
 
-	// { --- These methods are relative to the level 0 (or original) image
-	//@  
-	int nBands() const;  
-	unsigned int bitsPerPixel() const; 
-	unsigned int getWidth() const;
-	unsigned int getHeight() const;
-	void getDimensions(unsigned int& width, unsigned int& height) const;
+	//! Returns the dimensions of the image
+	void getDimensions(unsigned int& width, unsigned int& height);
 
+	//! Checks if the imagem has world navigation information
 	bool hasWorldInfo();
 
+	//! Gets the upper-left X position
 	double originX();
+
+ 	//! Gets the upper-left Y position
 	double originY();
+
+	//! Gets the (X,Y) coordinate of the upper-left position
 	void getOrigin(double& x, double& y);
 
+	//! Returns the X resolution
 	double resX();
+
+	//! Returns the Y resolution
 	double resY();
+
+	//! Returns the X and Y resolutions
 	void getResolution(double& rx, double& ry);
 
+	//! Gets the box of the image 
 	void getWorld(double& x0, double& y0, double& x1, double& y1);
+
+	//! Gets the bounding box of the image 
 	void getBoundingBox(double& xmin, double& ymin, double& xmax, double& ymax);
+
+	//! Gets all the coordinate information
+	void getNavigationParameters(std::vector<double>& nwf);
+
+	//! Converts a geo coordinate to pixel coordinate 
 	void world2Pixel(double wx, double wy, int& ix, int& iy);
+	
+	//! Converts a pixel coordinate to geo coordinate 
 	void pixel2World(int ix, int iy, double& wx, double& wy);
 
-	// Returns the number of levels of resolution available on the image
-	int nlev();
+	/** Returns the level that corresponds to a resolution >= than 
+		the resolution defined by a given box an a dimension
+    */
+	int getBestResolutionLevel(unsigned int w, unsigned int h, 
+							   double x0, double y0, double x1, double y1);
 
-	// Returns the maxmum resolution level  available on the image
-	int getMaxZoomLevel();
+	/** 
+		Returns the level that corresponds to a resolution <= than 
+		the resolution defined by a given box an a dimension
+    */
+	int getWorstResolutionLevel(unsigned int w, unsigned int h, 
+								double x0, double y0, double x1, double y1);
 
-	//@}
-	//------- }
+	/** 
+		Returns the level that corresponds to the closest resolution to 
+		the resolution defined by a given box an a dimension
+    */
+	int getProxResolutionLevel(unsigned int w, unsigned int h, 
+								double x0, double y0, double x1, double y1);
 
-	// { --- Methods to get ImageBuffer's
-	//@{
-	/*! Returns an ImageBuffer for loading an image from MrSIDNavigator.  
-	   \param size(in) size of the image buffer
-	   \param nbands(in) number of output bands
-	   \param bands(in) output bands vector indicating the desired output bands and its order
-	   \param data(out) image buffer  
-	   \note data must have been previously allocated and its content is band interleaved
-	*/
-	LizardTech::ImageBuffer* getImageBuffer (unsigned int size, 
-		                                     unsigned int nbands,
-	                                         const unsigned int* bands, 
-											 void* data);
-
-	/*! Returns an ImageBuffer for loading an image from MrSIDNavigator.
-	   \param size(in) size of the image buffer
-	   \param nbands(in) number of output bands
-	   \param bands(in) output bands vector indicating the desired output bands and its order
-	   \param data(out) bands image buffer vector
-	   \note data will be internally allocated and its content is band interleaved
-	*/
-	LizardTech::ImageBuffer* getImageBuffer2(unsigned int size, 
-											 unsigned int nbands,
-	                                         const unsigned int* bands, 
-											 void* data[]);
-
-	/*! Returns an ImageBuffer for loading an image from MrSIDNavigator.  
-	   \param size(in) size of the image buffer
-	   \param nbands(in) number of output bands
-	   \param data(out) image buffer  
-	   \note  
-		- data must have been previously allocated and its content is pixel interleaved
-		- band order is always set to 0, 1, 2
-	*/
-	LizardTech::ImageBuffer* getImageBuffer(unsigned int size, unsigned int nbands, void* data);
-	//@}
+	/** 
+		Returns the level that corresponds to the closest resolution to 
+		the resolution given
+    */
+	int bestResolution(double res);
 
-	//@{
-	void getData(unsigned int& w, unsigned int& h, 
-		         double& x0, double& y0, 
-	             double& x1, double& y1, 
-				 unsigned int nbands, 
-	             const unsigned int* bands, 
-				 void *data[]);
-	//@}
+	//! Selects an area in a given level of the image
+	bool selectArea(int lev, double& x0, double& y0, double& x1, double& y1);
 
-	// { --- Methods that are relative to the SidNavigator rectangle
+	//! Returns the width in pixels, of the area selected
+	int getSelectedAreaWidth();
 
-	//! Changes resolution level of MrSIDNavigator to the indicated level
-	void zoomTo(int level); 
+	//! Returns the height in pixels, of the area selected
+	int getSelectedAreaHeight();
 
-	//! Gets the current resolution level that navigator is bound
-	int getCurrentLevel();
+	//! Returns the selected area in a buffer of char
+	bool getSelectedAreaData(unsigned char*& data);
 
-	//! Gets the number of lines and columns at the current level
-	void getDimensionAtLevel(int level, int& w, int& h);
+	//! Returns true, and the values, if there is a specification for a no data value
+	bool getNoDataPixel(std::vector<double>& nodata);
 
-	//! Gets the dimension of the current Navigator rectangle 
-	void getCurrentRectangleDimension(int& w, int& h);
+	//! Returns the number of levels in the image
+	int getNumLevels();
 
-	void getCurrentBoundingBox(double& xmin, double& ymin, double& xmax, double& ymax);
-	
-	//! Gets the pixel resolution at the current level
-	void getCurrentLevelResolution(double& resx, double& resy);
-
-	//! Move an redimension current rectangle navigator
-	/*!
-		\param leftColum X index of upper left corner of the rectangle
-		\param topRow Y index of the upper corner of the rectangle
-		\param width width of the rectangle
-		\param height height of the rectangle
-		\returns TRUE if the rectangle is valid and can be positioned and FALSE otherwise
-	*/
-	bool selectArea(int leftColumn, int topRow, int width, int height); 
+	//! Zoom the image to a given level
+	bool zoomTo(int level);
 
-	//! Gets the image defines by the current rectangle navigator
-	/*!
-		\param pointer to a selected area of memory to hold the content of the
-		current rectangle navigator
-	*/
-	bool getSelectedArea(unsigned char* data);
-	// --- }
+	//! Returns true, and the values, if there is a specification for a max value
+	bool getMaxValues(std::vector<double>& maxvalues);
 
-};
+	//! Returns true, and the values, if there is a specification for a min value
+	bool getMinValues(std::vector<double>& minvalues);
 
-/*
-** ---------------------------------------------------------------
-** Inline methods:
-*/
+};
 
-inline void TeMrSIDReader::getDimensions(unsigned int& width, unsigned int& height) const
+//! Inline Methods
+inline void TeMrSIDReader::getDimensions(unsigned int& w, unsigned int& h)
 {
-  width = getWidth();
-  height = getHeight();
+  w = getWidth();
+  h = getHeight();
 }
 
 inline void TeMrSIDReader::getResolution(double& rx, double& ry)
@@ -195,29 +207,4 @@ inline void TeMrSIDReader::getOrigin(double& x, double& y)
   x = originX();
   y = originY();
 }
-
-inline void TeMrSIDReader::world2Pixel(double wx, double wy, int& ix, int& iy)
-{
-  double off_x, off_y;
-  double sx, sy;
-
-  getOrigin(off_x, off_y);
-  getResolution(sx, sy);
-
-  ix = (int) ((wx - off_x)/sx + 0.5);
-  iy = (int) ((wy - off_y)/sy + 0.5);
-}
-
-inline void TeMrSIDReader::pixel2World(int ix, int iy, double& wx, double& wy)
-{
-  double off_x, off_y;
-  double sx, sy;
-
-  getOrigin(off_x, off_y);
-  getResolution(sx, sy);
-
-  wx = off_x + ix * sx;
-  wy = off_y + iy * sy;
-}
-
 #endif
diff --git a/src/terralib/drivers/MySQL/TeMySQL.cpp b/src/terralib/drivers/MySQL/TeMySQL.cpp
old mode 100644
new mode 100755
index 6b2bb42..ddb7e01
--- a/src/terralib/drivers/MySQL/TeMySQL.cpp
+++ b/src/terralib/drivers/MySQL/TeMySQL.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright © 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -24,14 +24,19 @@ of this library and its documentation.
 #include "TeMySQL.h"
 #include <stdio.h>
 #include <sys/types.h>
-#include <sys/stat.h>
+#include <TeProject.h>
+#include <cstring>
 
 extern "C" {
 extern char *strxmov(char* dest, const char* src, ...);
 }
 
-#define MAX(a,b) a>b?a:b
-#define MIN(a,b) a<b?a:b
+#ifndef MAX
+  #define MAX(a,b) ((a>b)?a:b)
+#endif
+#ifndef MIN
+  #define MIN(a,b) ((a<b)?a:b)
+#endif
 
 
 double swappd(double din)
@@ -66,7 +71,7 @@ TeMySQL::TeMySQL()
 TeMySQL::~TeMySQL()
 {
 	if (bufferBlob_)
-		delete bufferBlob_;
+		delete []bufferBlob_;
 	if (isConnected_)
 		close ();
 }
@@ -74,18 +79,41 @@ TeMySQL::~TeMySQL()
 void
 TeMySQL::close()
 {
-	clear();
 	if (bufferBlob_)
-		delete bufferBlob_;
+		delete []bufferBlob_;
 	bufferBlob_ = 0;
 	bufferBlobSize_ = 0;
+
 	mysql_close(&mysql_);
+    isConnected_ = false;
+}
+
+bool TeMySQL::beginTransaction()
+{
+	return this->execute("START TRANSACTION;");
+}
+
+bool TeMySQL::commitTransaction()
+{
+	return this->execute("COMMIT;");
 }
 
+bool TeMySQL::rollbackTransaction()
+{
+	return this->execute("ROLLBACK;");
+}
+
+
 bool 
-TeMySQL::newDatabase(const string& database, const string& user, const string& password, const string& host, const int & /* port */, bool terralibModel)
+TeMySQL::newDatabase(const string& database, const string& user, const string& password, const string& host, const int & port, bool terralibModel)
 {
-	if (mysql_real_connect(&mysql_,host.c_str(),user.c_str(),password.c_str(),"",0,NULL,0) == NULL)
+	int portToConnect = port;
+	if(portToConnect < 0)
+	{
+		portToConnect = 0;
+	}
+
+	if (mysql_real_connect(&mysql_,host.c_str(),user.c_str(),password.c_str(),"",portToConnect,NULL,0) == NULL)
 	{
 		isConnected_ = false;
 		return false;
@@ -116,6 +144,7 @@ TeMySQL::newDatabase(const string& database, const string& user, const string& p
 	host_ = host;
 	password_ = password;
 	database_ = database;
+	portNumber_ = portToConnect;
 	return true;
 }
 
@@ -123,6 +152,9 @@ TeMySQL::newDatabase(const string& database, const string& user, const string& p
 bool 
 TeMySQL::connect (const string& host, const string& user, const string& password, const string& database, int port)
 {
+	if(port<0)
+		port = 0;
+
 	if (mysql_real_connect(&mysql_,host.c_str(),user.c_str(),password.c_str(),database.c_str(),port,NULL,0) == NULL)
 	{
 		isConnected_ = false;
@@ -134,6 +166,7 @@ TeMySQL::connect (const string& host, const string& user, const string& password
 	host_ = host;
 	password_ = password;
 	database_ = database;
+	portNumber_ = port;
 	return true;
 }
 
@@ -144,6 +177,9 @@ TeMySQL::showDatabases (const string& host, const string& user, const string& pa
 	unsigned long i;
 	MYSQL_ROW row;
 
+	if(port<0)
+		port = 0;
+
 	if (mysql_real_connect(&mysql_,host.c_str(),user.c_str(),password.c_str(),0,port,NULL,0) == NULL)
 	{
 		errorMessage_= string(mysql_error(&mysql_));
@@ -172,32 +208,253 @@ TeMySQL::execute (const string &q)
 	if (mysql_real_query(&mysql_, q.c_str(), q.size()) != 0)
 	{
 		errorMessage_= string(mysql_error(&mysql_));
+		errorNumber_= mysql_errno(&mysql_);
 		return false;
 	}
+    return true;
+}
 
-	return true;
+bool 
+TeMySQL::createTable(const string& table, TeAttributeList &attr)
+{
+	string createStr = " CREATE TABLE " + table + " (";
+	string type;
+	string pkeys;
+	bool first = true;	
+
+	TeAttributeList::iterator it = attr.begin();
+
+	while(it != attr.end())
+	{
+		string name = (*it).rep_.name_;
+		
+		switch((*it).rep_.type_)
+		{
+			case TeSTRING:
+							if((*it).rep_.numChar_ > 0)
+							{
+								type = "VARCHAR(" + Te2String((*it).rep_.numChar_) + ") ";
+							}
+							else
+							{
+								type = "LONGTEXT";
+							}
+							break;
+			case TeREAL:
+							if((*it).rep_.decimals_ > 0)
+								type = "DECIMAL(53, " + Te2String((*it).rep_.decimals_) + ") ";
+							else
+								type = "DECIMAL(53, 15) ";
+							break;
+			case TeINT:
+							type = "INT ";							
+							break;
+
+			case TeUNSIGNEDINT:
+							type = "INT UNSIGNED ";							
+							break;
+
+			case TeCHARACTER:
+							type = "CHAR ";							
+							break;
+			case TeDATETIME:
+							type = "DATETIME ";  //time							
+							break;
+			case TeBLOB:
+							type = "BLOB ";
+							break;
+
+			case TePOINTTYPE:
+			case TePOINTSETTYPE:
+							if(!first)
+								createStr += ", ";
+							else
+								first = false;
+
+							createStr += "x				DOUBLE(53,15) DEFAULT '0.0'";
+							createStr += ", y			DOUBLE(53,15) DEFAULT '0.0'";
+							++it;
+							continue;
+
+			case TeLINE2DTYPE:
+			case TeLINESETTYPE:
+							if(!first)
+								createStr += ", ";
+							else
+								first = false;
+
+							createStr += "num_coords INT UNSIGNED not null ,";
+							createStr += "lower_x double(53,15) not null ,";
+							createStr += "lower_y double(53,15) not null ,";
+							createStr += "upper_x double(53,15) not null ,";
+							createStr += "upper_y double(53,15) not null ,";
+							createStr += "ext_max double(53,15) not null, ";
+							createStr += "spatial_data LONGBLOB not null ";
+							++it;
+							continue;
+
+			case TePOLYGONTYPE:
+			case TePOLYGONSETTYPE:
+							if(!first)
+								createStr += ", ";
+							else
+								first = false;
+
+							createStr += "num_coords INT UNSIGNED not null ,";
+							createStr += "num_holes INT UNSIGNED not null ,";
+							createStr += "parent_id INT UNSIGNED not null ,";
+							createStr += "lower_x double(53,15) not null ,";
+							createStr += "lower_y double(53,15) not null ,";
+							createStr += "upper_x double(53,15) not null ,";
+							createStr += "upper_y double(53,15) not null ,";
+							createStr += "ext_max double(53,15) not null ,";
+							createStr += "spatial_data LONGBLOB not null ";
+							++it;
+							continue;
+
+			case TeCELLTYPE:
+			case TeCELLSETTYPE:
+							if(!first)
+								createStr += ", ";
+							else
+								first = false;
+
+							createStr += "lower_x		double(53,15) NOT NULL ,";
+							createStr += "lower_y		double(53,15) NOT NULL ,";
+							createStr += "upper_x		double(53,15) NOT NULL ,";
+							createStr += "upper_y		double(53,15) NOT NULL ,";
+							createStr += "col_number	INT(10) NOT NULL ,";
+							createStr += "row_number	INT(10) NOT NULL ";
+							++it;
+							continue;					
+
+			case TeRASTERTYPE:
+							if(!first)
+								createStr += ", ";
+							else
+								first = false;
+
+							createStr += "lower_x double(53,15) not null, ";
+							createStr += "lower_y double(53,15) not null, ";
+							createStr += "upper_x double(53,15) not null, ";
+							createStr += "upper_y double(53,15) not null, ";
+							createStr += "band_id int(10) unsigned not null, ";
+							createStr += "resolution_factor int(10) unsigned , ";
+							createStr += "subband int(10) unsigned,";
+							createStr += "spatial_data LONGBLOB NOT NULL, ";
+							createStr += "block_size int(10) unsigned not null ";
+							++it;
+							continue;
+
+			case TeNODETYPE:
+			case TeNODESETTYPE:
+							if(!first)
+								createStr += ", ";
+							else
+								first = false;
+
+							createStr += "x				DOUBLE(53,15) DEFAULT '0.0'";
+							createStr += ", y			DOUBLE(53,15) DEFAULT '0.0'";
+							++it;
+							continue;
+
+			case TeTEXTTYPE:
+			case TeTEXTSETTYPE:
+
+			default:
+							type = "VARCHAR(" + Te2String((*it).rep_.numChar_) + ") ";
+							break;
+		}
+
+		if(!((*it).rep_.defaultValue_.empty()))
+			type += " DEFAULT '" + (*it).rep_.defaultValue_ + "' ";
+
+		if(!((*it).rep_.null_))
+			type += " NOT NULL ";
+
+		if((*it).rep_.isAutoNumber_)
+			type += " AUTO_INCREMENT ";
+				
+		if(!first)
+			createStr += ", ";
+		else
+			first = false;
+		
+		createStr += name + " " + type;
+
+		// check if column is part of primary key
+		if(((*it).rep_.isPrimaryKey_) && ((*it).rep_.type_ != TeBLOB))
+		{
+			if(!pkeys.empty())
+				pkeys += ", ";
+
+			pkeys += (*it).rep_.name_;
+		}
+		
+		++it;
+	}
+
+	if(!pkeys.empty())
+		createStr += ", PRIMARY KEY (" + pkeys + ") ";
+
+	createStr += ")";
+
+	return execute(createStr);
 }
 
 
 bool 
 TeMySQL::tableExist(const string& table)
 {
-	string q ="DESC "+ table;
+	//if (table.empty())
+	//	return false;
 
-	if (mysql_real_query(&mysql_, q.c_str(), q.size()) != 0)
-	{
-		errorMessage_ = string(mysql_error(&mysql_));
-	}
+	//string q ="SHOW TABLES LIKE '"+ table + "'";
+	////string q ="DESC "+ table;
 
-	MYSQL_RES*	res_ = mysql_use_result(&mysql_);
+	//if (mysql_real_query(&mysql_, q.c_str(), q.size()) != 0)
+	//{
+	//	errorMessage_ = string(mysql_error(&mysql_));
+	//}
 
-	if (res_)
+	//MYSQL_RES*	res_ = mysql_use_result(&mysql_);
+
+	//if (res_)
+	//{
+	//	mysql_free_result(res_);
+	//	return true;
+	//}
+	//else
+	//	return false;
+	if (table.empty())
+		return false;
+
+	MYSQL_RES* myres;
+
+    myres = mysql_list_tables(&mysql_, table.c_str());
+	if(myres == 0)
 	{
-		mysql_free_result(res_);
-		return true;
+		errorMessage_ = string(mysql_error(&mysql_));
+		return false;
 	}
 	else
-		return false;
+	{
+		bool ret = false;
+		MYSQL_ROW myrow;
+		while ((myrow = mysql_fetch_row(myres)))
+		{
+			string s = myrow[0];
+			string S = TeConvertToUpperCase(s);
+			string SS = TeConvertToUpperCase(table);
+			if(S == SS)
+			{
+				ret = true;
+				break;
+			}
+		}
+		mysql_free_result(myres);
+		return ret;
+	}
 }
 
 bool 
@@ -226,6 +483,8 @@ TeMySQL::columnExist(const string& table, const string&  column ,TeAttribute& at
 		attr.rep_.type_ = TeREAL;
 	else if (ftype.find("blob") != string::npos)
 		attr.rep_.type_ = TeBLOB;
+	else if (ftype.find("longtext") != string::npos)
+		attr.rep_.type_ = TeSTRING;
 	else if ((ftype.find("date") != string::npos) || (ftype.find("time") != string::npos))
 		attr.rep_.type_ = TeDATETIME;
 
@@ -254,12 +513,17 @@ bool TeMySQL::addColumn (const string& table, TeAttributeRep &rep)
 	switch (rep.type_)
 	{
 		case TeSTRING:
-			type = " VARCHAR ";
-			sprintf (size,"(%d)",rep.numChar_);
-			type += string (size);
+			if(rep.numChar_ > 0)
+			{
+				type = " VARCHAR(" + Te2String(rep.numChar_) + ")";
+			}
+			else
+			{
+				type = " LONGTEXT";
+			}
 			break;
 		case TeREAL:
-			type = " DOUBLE";
+			type = " DECIMAL(53, " + Te2String(rep.decimals_) + ") ";
 			break;
 		case TeINT:
 			type = " INT";
@@ -281,92 +545,154 @@ bool TeMySQL::addColumn (const string& table, TeAttributeRep &rep)
 	}
 	q += field;
 	q += type;
-	return execute(q);
-}
-
-TeDatabasePortal*  
-TeMySQL::getPortal ()
-{
-	TeMySQLPortal* portal = new TeMySQLPortal (this);
-	return portal;
+	bool res = execute(q);
+	if (res)
+		alterTableInfoInMemory(table);
+	return res;
 }
 
 bool 
-TeMySQL::createRasterTable (const string& table)
+TeMySQL::alterTable(const string& tableName, TeAttributeRep& rep, const string& oldColName)
 {
-	if (table.empty())
+	if(!tableExist(tableName))
 		return false;
 
-	string create = "CREATE TABLE "+table+" (";
-	create += "block_id VARCHAR(50) not null, ";
-	create += "lower_x double(24,15) not null, ";
-	create += "lower_y double(24,15) not null, ";
-	create += "upper_x double(24,15) not null, ";
-	create += "upper_y double(24,15) not null, ";
-	create += "band_id int(10) unsigned not null, ";
-	create += "resolution_factor int(10) unsigned , ";
-	create += "subband int(10) unsigned,";
-	create += "spatial_data LONGBLOB not null NOT NULL, ";
-	create += "block_size int(10) unsigned not null, ";
-	create += "PRIMARY KEY (block_id),";
-	create += "INDEX (band_id),";
-	create += "INDEX (subband),";
-	create += "INDEX (resolution_factor),";
-	create += "INDEX (lower_x,lower_y,upper_x,upper_y))";
-	return execute (create);
-}
+	string tab;
 
+	if(oldColName.empty())
+	{
+		tab = " ALTER TABLE " + tableName + " MODIFY ";
+		tab += rep.name_ +"  ";
+	}
+	else
+	{
+		tab = " ALTER TABLE " + tableName + " CHANGE ";
+		tab += oldColName +" "+ rep.name_ +"  ";
+	}
 
-bool 
-TeMySQL::createPolygonGeometry (const string&  table)
-{
-	if (table.empty())
-		return false;
+	switch (rep.type_)
+	{
+		case TeSTRING:
+			if(rep.numChar_ > 0)
+			{
+				tab += "VARCHAR(" + Te2String(rep.numChar_) + ") ";
+			}
+			else
+			{
+				tab += "LONGTEXT";
+			}
+			break;
+			
+		case TeREAL:
+			tab += "DOUBLE(24, 15)";	
+			break;
+			
+		case TeINT:
+			tab += "INT";
+			break;
 
-	string q ="CREATE TABLE " + table +"(";
-	q += "geom_id INT UNSIGNED not null AUTO_INCREMENT,";
-	q += "object_id VARCHAR(50) NOT NULL ,";
-	q += "num_coords INT UNSIGNED not null ,";
-	q += "num_holes INT UNSIGNED not null ,";
-	q += "parent_id INT UNSIGNED not null ,";
-	q += "lower_x double(24,15) not null ,";
-	q += "lower_y double(24,15) not null ,";
-	q += "upper_x double(24,15) not null ,";
-	q += "upper_y double(24,15) not null ,";
-	q += "ext_max double(24,15) not null ,";
-	q += "spatial_data LONGBLOB not null ,";
-	q += "PRIMARY KEY (geom_id),";
-	q += "INDEX (object_id),";
-	q += "INDEX (ext_max),";
-	q += "INDEX (lower_x,lower_y,upper_x,upper_y))";
-	bool status = execute(q);
-	return status;
-}
+		case TeDATETIME:
+			tab += "DATETIME";
+			break;
 
+		case TeCHARACTER:
+			tab += "CHAR";
+			break;
 
-bool 
-TeMySQL::createLineGeometry (const string& table)
-{
-	if (table.empty())
+		case TeBLOB:
+			tab += "LONGBLOB";
+			break; 
+		
+		default:
+			tab += "VARCHAR(" + Te2String(rep.numChar_) + ") ";
+			break;
+	}
+
+	tab += " NULL ";
+
+	if(!execute(tab))
+	{
+		if(errorMessage_.empty())
+			errorMessage_ = "Error alter table " + tableName + " !";
 		return false;
+	}
+
+	string tableId;
+	TeDatabasePortal* portal = getPortal();
+	string sql = "SELECT table_id FROM te_layer_table WHERE attr_table = '" + tableName + "'";
+	if(portal->query(sql) && portal->fetchRow())
+		tableId = portal->getData(0);
+
+	delete portal;
+
+	if(tableId.empty() == false)
+	{
+		if(oldColName.empty() == false) // column name changed
+		{
+			 // update relation
+			sql = "UPDATE te_tables_relation SET related_attr = '" + rep.name_ + "'";
+			sql += " WHERE related_table_id = " + tableId;
+			sql += " AND related_attr = '" + oldColName + "'";
+			if(execute(sql) == false)
+				return false;
+
+			sql = "UPDATE te_tables_relation SET external_attr = '" + rep.name_ + "'";
+			sql += " WHERE external_table_name = '" + tableName + "'";
+			sql += " AND external_attr = '" + oldColName + "'";
+			if(execute(sql) == false)
+				return false;
+
+			 // update grouping
+			sql = "UPDATE te_grouping SET grouping_attr = '" + tableName + "." + rep.name_ + "'";
+			sql += " WHERE grouping_attr = '" + tableName + "." + oldColName + "'";
+			if(execute(sql) == false)
+				return false;
+		}
+		else // column type changed
+		{
+			// delete relation
+			sql = "DELETE FROM te_tables_relation WHERE (related_table_id = " + tableId;
+			sql += " AND related_attr = '" + rep.name_ + "')";
+			sql += " OR (external_table_name = '" + tableName + "'";
+			sql += " AND external_attr = '" + rep.name_ + "')";
+			if(execute(sql) == false)
+				return false;
+
+			// delete grouping
+			TeDatabasePortal* portal = getPortal();
+			sql = "SELECT theme_id FROM te_grouping WHERE grouping_attr = '" + tableName + "." + oldColName + "'";
+			if(portal->query(sql) && portal->fetchRow())
+			{
+				string themeId = portal->getData(0);
+
+				sql = "DELETE FROM te_legend WHERE theme_id = " + themeId + " AND group_id >= 0";
+				if(execute(sql) == false)
+				{
+					delete portal;
+					return false;
+				}
+			}
+			delete portal;
+
+			sql = "DELETE FROM te_grouping";
+			sql += " WHERE grouping_attr = '" + tableName + "." + oldColName + "'";
+			if(execute(sql) == false)
+				return false;
+		}
+	}
 
-	string q ="CREATE TABLE " + table +"(";
-	q += "geom_id INT UNSIGNED not null AUTO_INCREMENT,";
-	q += "object_id VARCHAR(50) not null ,";
-	q += "num_coords INT UNSIGNED not null ,";
-	q += "lower_x double(24,15) not null ,";
-	q += "lower_y double(24,15) not null ,";
-	q += "upper_x double(24,15) not null ,";
-	q += "upper_y double(24,15) not null ,";
-	q += "ext_max double(24,15) not null ,";
-	q += "spatial_data LONGBLOB not null ,";
-	q += "PRIMARY KEY (geom_id),";
-	q += "INDEX (object_id),";
-	q += "INDEX (lower_x,lower_y,upper_x,upper_y))";
-	return execute(q);
+	alterTableInfoInMemory(tableName);
+	return true;
 }
 
 
+TeDatabasePortal*  
+TeMySQL::getPortal ()
+{
+	TeMySQLPortal* portal = new TeMySQLPortal (this);
+	return portal;
+}
+
 bool
 TeMySQL::defineIntegrity(void)
 {
@@ -375,6 +701,26 @@ TeMySQL::defineIntegrity(void)
 }
 
 
+string TeMySQL::getConcatFieldsExpression(const vector<string>& fNamesVec)
+{
+	if (fNamesVec.empty() == true)
+		return "";
+
+	string concatExp = "CONCAT(";
+	for (unsigned int i = 0; i < fNamesVec.size(); ++i)
+	{
+		if (i != 0)
+			concatExp += ", ";
+		concatExp += fNamesVec[i];
+	}
+	concatExp += ")";
+
+	return concatExp;
+}
+
+
+
+
 TeMySQLPortal::TeMySQLPortal ( TeMySQL  *m)
 {
 	mysql_ = m->getMySQL();
@@ -411,7 +757,7 @@ TeMySQL::escapeSequence(const string& from)
 		char	*to = new char[from.size()*2+1];
 		mysql_real_escape_string(&mysql_,to,from.c_str(),from.size());
 		ret = to;
-		delete  to;
+		delete  []to;
 	}
 
 	return ret;
@@ -436,7 +782,7 @@ bool TeMySQLPortal::query (const string &q, TeCursorLocation /* l */, TeCursorTy
 		numFields_ = mysql_num_fields(result_);
 
 		MYSQL_FIELD *fields = mysql_fetch_fields(result_);
-
+		
 		int i;
 		for(i = 0; i < numFields_; i++)
 		{
@@ -455,6 +801,7 @@ bool TeMySQLPortal::query (const string &q, TeCursorLocation /* l */, TeCursorTy
 			case FIELD_TYPE_FLOAT:
 			case FIELD_TYPE_DOUBLE:
 			case FIELD_TYPE_LONGLONG:
+			case FIELD_TYPE_NEWDECIMAL:
 				attribute.rep_.type_ = TeREAL;
 				attribute.rep_.numChar_ = fields[i].length;
 				attribute.rep_.decimals_ = fields[i].decimals;
@@ -474,7 +821,14 @@ bool TeMySQLPortal::query (const string &q, TeCursorLocation /* l */, TeCursorTy
 			case FIELD_TYPE_MEDIUM_BLOB:
 			case FIELD_TYPE_LONG_BLOB:
 			case FIELD_TYPE_BLOB:
-				attribute.rep_.type_ = TeBLOB;
+				if (fields[i].flags & BINARY_FLAG)
+				{
+					attribute.rep_.type_ = TeBLOB;
+				}
+				else
+				{
+					attribute.rep_.type_ = TeSTRING; //como tipo TEXT
+				}
 				break;
 
 			case FIELD_TYPE_VAR_STRING:
@@ -569,7 +923,7 @@ bool
 TeMySQL::insertProjection (TeProjection *proj)
 {
 	char q[512];
-	sprintf (q,"INSERT INTO te_projection VALUES('','%s',%.15f,%.15f,%.15f,%.15f,%.15f,%.15f,'%s',%.15f,%d,'%s',%.15f,%.15f,%.15f,%.15f,%.15f)",
+	sprintf (q,"INSERT INTO te_projection VALUES(0,'%s',%.15f,%.15f,%.15f,%.15f,%.15f,%.15f,'%s',%.15f,%d,'%s',%.15f,%.15f,%.15f,%.15f,%.15f)",
 	proj->name().c_str(),
 		proj->params().lon0*TeCRD,
 		proj->params().lat0*TeCRD,
@@ -591,6 +945,7 @@ TeMySQL::insertProjection (TeProjection *proj)
 		return false;
 
 	proj->id(insertId());
+
 	return true;
 }
 
@@ -599,16 +954,29 @@ bool
 TeMySQL::insertView (TeView *view)
 {
 	TeProjection* proj = view->projection();
-	// save it�s projection
+	// save its projection
 	if (!proj || !insertProjection(proj))
 	{
-		errorMessage_ = "N�o � poss�vel inserir vista sem proje��o";
+		errorMessage_ = "Error inserting projection";
 		return false;
 	}
 
 	char q[512];
-	sprintf (q,"INSERT INTO te_view VALUES('',%d,'%s','%s',%d)",
-			proj->id(),view->name().c_str(),view->user().c_str(),view->isVisible());
+	if(view->getCurrentTheme() > 0)
+	{
+		sprintf (q,"INSERT INTO te_view VALUES(0,%d,'%s','%s',%d,%E,%E,%E,%E,%d)",
+				proj->id(),view->name().c_str(),view->user().c_str(),view->isVisible(),
+				view->getCurrentBox().lowerLeft().x(),view->getCurrentBox().lowerLeft().y(),
+				view->getCurrentBox().upperRight().x(),view->getCurrentBox().upperRight().y(),
+				view->getCurrentTheme());
+	}
+	else
+	{
+		sprintf (q,"INSERT INTO te_view VALUES(0,%d,'%s','%s',%d,%E,%E,%E,%E,NULL)",
+				proj->id(),view->name().c_str(),view->user().c_str(),view->isVisible(),
+				view->getCurrentBox().lowerLeft().x(),view->getCurrentBox().lowerLeft().y(),
+				view->getCurrentBox().upperRight().x(),view->getCurrentBox().upperRight().y());
+	}
 
 	if (!execute(q))
 		return false;
@@ -630,7 +998,7 @@ TeMySQL::insertView (TeView *view)
 		}
 	}
 
-	viewMap_[view->id()] = view;
+	viewMap()[view->id()] = view;
 	return true;
 }
 
@@ -650,38 +1018,55 @@ TeMySQL::insertViewTree (TeViewTree *tree)
 
 
 bool 
-TeMySQL::insertTheme (TeTheme *tem)
+TeMySQL::insertTheme (TeAbstractTheme *tem)
 {
 	string save;
 	save = "INSERT INTO te_theme ";
 	save += "(layer_id, view_id, name, parent_id, priority, node_type, min_scale, max_scale, ";
 	save += "generate_attribute_where, generate_spatial_where, generate_temporal_where, ";
-	save += "collection_table, visible_rep, enable_visibility) ";
+	save += "collection_table, visible_rep, enable_visibility, lower_x, lower_y, upper_x, upper_y, creation_time) ";
 	save += " VALUES(";
-	save += Te2String(tem->layerId()) +", ";
+	
+	if(tem->type()==TeTHEME)
+		save += Te2String(static_cast<TeTheme*>(tem)->layerId()) +", " ;
+	else
+		save += " NULL, ";
+
 	save += Te2String(tem->view()) +", ";
-	save += "'" + tem->name() + "', ";
+	save += "'" + escapeSequence(tem->name()) + "', ";
 	save += Te2String(tem->parentId()) +", ";
 	save += Te2String(tem->priority()) +", ";
 	save += Te2String(tem->type()) +", ";
-	save += Te2String(tem->minScale()) +", ";
-	save += Te2String(tem->maxScale()) +", ";
+	save += Te2String(tem->minScale(), 15) +", ";
+	save += Te2String(tem->maxScale(), 15) +", ";
 	save += "'" + escapeSequence(tem->attributeRest()) + "', ";
 	save += "'" + escapeSequence(tem->spatialRest()) + "', ";
 	save += "'" + escapeSequence(tem->temporalRest()) + "', ";
-	save += "'" + escapeSequence(tem->collectionTable()) + "', ";
+
+	if(tem->type()==TeTHEME)
+		save += " '" + escapeSequence(static_cast<TeTheme*>(tem)->collectionTable()) + "', ";
+	else
+		save += " '', ";
+
 	save += Te2String(tem->visibleRep()) +", ";
-	save += Te2String(tem->visibility()) +" ) ";
+	save += Te2String(tem->visibility()) +", ";
+	save += Te2String(tem->box().x1()) +", ";
+	save += Te2String(tem->box().y1()) +", ";
+	save += Te2String(tem->box().x2()) +", ";
+	save += Te2String(tem->box().y2()) +",  ";
+	TeTime creationTime = tem->getCreationTime();
+	save += getSQLTime(creationTime);
+	save += " ) ";
 
 	if (!this->execute(save))
 		return false;
 
 	tem->id(this->insertId());
 
-	if (tem->collectionTable().empty())
+	if((tem->type()==TeTHEME || tem->type()==TeEXTERNALTHEME)&& static_cast<TeTheme*>(tem)->collectionTable().empty())
 	{
 		string colTab = "te_collection_" + Te2String(tem->id());
-		tem->collectionTable(colTab);
+		static_cast<TeTheme*>(tem)->collectionTable(colTab);
 		save = "UPDATE te_theme SET collection_table='" + colTab + "' WHERE theme_id=" ;
 		save += Te2String(tem->id());
 		this->execute(save);
@@ -691,11 +1076,11 @@ TeMySQL::insertTheme (TeTheme *tem)
 
 	// insert grouping
 	int numSlices = 0;
-	if(tem->grouping())
+	if(tem->grouping().groupMode_ != TeNoGrouping)
 	{
 		if(!insertGrouping (tem->id(), tem->grouping()))
 			return false;
-		numSlices = tem->grouping()->groupNumSlices_;
+		numSlices = tem->grouping().groupNumSlices_;
 	}
 		
 	tem->outOfCollectionLegend().group(-1); 
@@ -745,8 +1130,16 @@ TeMySQL::insertTheme (TeTheme *tem)
 	if (!status)
 		return status;
 
-	themeMap_[tem->id()] = tem;
-	return updateThemeTable(tem);
+	//insert metadata theme
+	if(!tem->saveMetadata(this))
+		return false;
+
+	themeMap()[tem->id()] = tem;
+
+	if(tem->type()==TeTHEME && !updateThemeTable(static_cast<TeTheme*>(tem)))
+		return false;
+
+	return true;
 }
 
 bool 
@@ -766,7 +1159,7 @@ TeMySQL::insertThemeGroup (TeViewTree* tree)
 
 
 bool 
-TeMySQL::generateLabelPositions (TeTheme *theme)
+TeMySQL::generateLabelPositions (TeTheme *theme, const std::string& objectId)
 {
 	string	geomTable, query;
 	string	collTable = theme->collectionTable();
@@ -780,7 +1173,10 @@ TeMySQL::generateLabelPositions (TeTheme *theme)
 				
 		string extMax = "CREATE TEMPORARY TABLE maxTable";
 		extMax += " SELECT object_id, lower_x, lower_y, upper_x, upper_y";
-		extMax += " FROM " + geomTable + " ORDER BY object_id, ext_max DESC";
+		extMax += " FROM " + geomTable; 
+		if(!objectId.empty())
+			extMax += " WHERE object_id = '"+ objectId +"'";
+		extMax += " ORDER BY object_id, ext_max DESC ";
 		
 		if(!execute(extMax))
 			return false;
@@ -804,6 +1200,9 @@ TeMySQL::generateLabelPositions (TeTheme *theme)
 		query = "UPDATE " + collTable + "," + geomTable + " SET label_x = x,";
 		query += "label_y = y WHERE c_object_id = object_id";
 
+		if(!objectId.empty())
+			query += " AND c_object_id = '"+ objectId +"'";
+
 		if(execute(query) == false)
 			return false;
 	}
@@ -814,13 +1213,18 @@ TeMySQL::generateLabelPositions (TeTheme *theme)
 				
 		string extMax = "CREATE TEMPORARY TABLE maxTable";
 		extMax += " SELECT object_id, lower_x, lower_y, upper_x, upper_y";
-		extMax += " FROM " + geomTable + " ORDER BY object_id, ext_max DESC";
-		
+		extMax += " FROM " + geomTable; 
+		if(!objectId.empty())
+			extMax += " WHERE object_id = '"+ objectId +"'";
+		extMax += " ORDER BY object_id, ext_max DESC ";
+
 		if(!execute(extMax))
 			return false;
 
 		query = "UPDATE " + collTable + ",maxTable SET label_x = (lower_x + upper_x)/2,";
 		query += "label_y = (lower_y + upper_y)/2 WHERE c_object_id = object_id";
+		if(!objectId.empty())
+			query += " AND c_object_id = '"+ objectId +"'";
 
 		if (execute(query) == false)
 		{
@@ -837,15 +1241,12 @@ TeMySQL::generateLabelPositions (TeTheme *theme)
 
 		query = "UPDATE " + collTable + "," + geomTable + " SET label_x = (lower_x + upper_x)/2,";
 		query += "label_y = (lower_y + upper_y)/2 WHERE c_object_id = object_id";
+		if(!objectId.empty())
+			query += " AND c_object_id = '"+ objectId +"'";
 
 		if (execute(query) == false)
 			return false;	
 	}
-
-
-
-
-	
 	return true;
 }
 
@@ -856,17 +1257,19 @@ TeMySQL::insertLayer (TeLayer* layer)
 	TeProjection* proj = layer->projection();
 	if (!proj || !insertProjection(proj))
 	{
-		errorMessage_ = "Layer sem proje��o ou falha na inser��o da proje��o";
+		errorMessage_ = "Error inserting projection";
 		return false;
 	}
 	int pid = proj->id();
-	string save = "INSERT INTO te_layer (layer_id,projection_id,name,lower_x,lower_y,upper_x,upper_y) VALUES('',";
+	string save = "INSERT INTO te_layer (layer_id,projection_id,name,lower_x,lower_y,upper_x,upper_y,edition_time) VALUES(0,";
 	save += Te2String(pid);
 	save += ",'" + layer->name() + "', ";
-	save += Te2String(layer->box().x1(),15)+ ", ";
-	save += Te2String(layer->box().y1(),15)+ ", ";
-	save += Te2String(layer->box().x2(),15)+ ", ";
-	save += Te2String(layer->box().y2(),15) + ")";
+	save += Te2String(layer->box().x1_, 15) + ", ";
+	save += Te2String(layer->box().y1_, 15) + ", ";
+	save += Te2String(layer->box().x2_, 15) + ", ";
+	save += Te2String(layer->box().y2_, 15) + ", ";
+	TeTime editionTime = layer->getEditionTime();
+	save += getSQLTime(editionTime) + ")";
 
 	// if layer insertion fails remove projection
 	if (!this->execute (save))
@@ -877,23 +1280,44 @@ TeMySQL::insertLayer (TeLayer* layer)
 	}
 
 	layer->id(this->insertId());
-	layerMap_[layer->id()] = layer;
+	layerMap()[layer->id()] = layer;
 
 	return true;
 }
 
+bool
+TeMySQL::insertProject (TeProject* project)
+{
+	if (!project)
+		return false;
+
+	string save = "INSERT INTO te_project (project_id, name, description, current_view) VALUES(0,";
+	save += "'" + project->name() + "', ";
+	save += "'" + project->description() + "', ";
+	save += Te2String(project->getCurrentViewId())+ ")";
+
+	// if layer insertion fails remove projection
+	if (!this->execute (save))
+		return false;
+	
+	project->setId(this->insertId());
+	projectMap()[project->id()] = project;
+	for (unsigned int i=0; i<project->getViewVector().size(); i++)
+		insertProjectViewRel(project->id(), project->getViewVector()[i]);
+	return true;
+}
 
 bool TeMySQL::insertLegend (TeLegendEntry *legend)
 {
 	char q[1024];
 	string save;
-	sprintf (q,"INSERT INTO te_legend VALUES('',%d,%d,%d,'%s','%s','%s')",
+	sprintf (q,"INSERT INTO te_legend VALUES(0,%d,%d,%d,'%s','%s','%s')",
 	legend->theme(),
 	legend->group(),
 	legend->count(),
-	legend->from().c_str(),
-	legend->to().c_str(),
-	legend->label().c_str());
+	escapeSequence(legend->from()).c_str(),
+	escapeSequence(legend->to()).c_str(),
+	escapeSequence(legend->label()).c_str());
 	save = q;
 
 	if (!this->execute(save))
@@ -901,7 +1325,7 @@ bool TeMySQL::insertLegend (TeLegendEntry *legend)
 
 	int legId = insertId();
 	legend->id(legId);
-	legendMap_[legend->id()] = legend;
+	legendMap()[legend->id()] = legend;
 	return insertVisual(legend);
 }
 
@@ -919,14 +1343,14 @@ TeMySQL::insertRepresentation (int layerId, TeRepresentation& rep)
 	sql += Te2String(static_cast<int>(rep.geomRep_)) + ", ";
 	sql += "'" + rep.tableName_ + "', ";
 	sql += "'" + rep.description_ + "',";
-	sql += Te2String(rep.box_.x1(),15) + ", ";
-	sql += Te2String(rep.box_.y1(),15) + ", ";
-	sql += Te2String(rep.box_.x2(),15) + ", ";
-	sql += Te2String(rep.box_.y2(),15) + ", ";
-	sql += Te2String(rep.resX_,15) + ", ";
-	sql += Te2String(rep.resY_,15) + ", ";
-	sql += Te2String(rep.nCols_,15) + ", ";
-	sql += Te2String(rep.nLins_,15) + ") ";
+	sql += Te2String(rep.box_.x1_,15) + ", ";
+	sql += Te2String(rep.box_.y1_,15) + ", ";
+	sql += Te2String(rep.box_.x2_,15) + ", ";
+	sql += Te2String(rep.box_.y2_,15) + ", ";
+	sql += Te2String(rep.resX_) + ", ";
+	sql += Te2String(rep.resY_) + ", ";
+	sql += Te2String(rep.nCols_) + ", ";
+	sql += Te2String(rep.nLins_) + ") ";
 	if (execute(sql))
 	{
 		rep.id_ = (this->insertId());
@@ -977,6 +1401,229 @@ TeMySQL::insertRelationInfo(const int tableId, const string& tField,
 }
 
 bool 
+TeMySQL::insertTable(TeTable &table)
+{
+	string tableName = table.name();
+	int size = table.size();
+	TeAttributeList att = table.attributeList();
+	TeAttributeList::iterator it = att.begin();
+	TeAttributeList::iterator itEnd = att.end();
+	TeTableRow row;
+	
+	if (!beginTransaction())
+		return false;
+
+	int i;
+	unsigned int j;
+	for ( i = 0; i < size; i++ )	
+	{
+		row = table[i];
+		it = att.begin();
+		string attrs;
+		string values;
+		j = 1;
+		unsigned int jj = 0;
+		while ( it != itEnd )
+		{
+			if ((jj>=row.size()) || row[jj].empty() || (*it).rep_.isAutoNumber_)
+			{
+				++it;
+				j++;
+				jj++;
+				continue;
+			}
+			
+			if (!values.empty())
+			{
+				attrs += ", ";
+				values += ", ";
+			}			
+			attrs += (*it).rep_.name_;			
+			switch ((*it).rep_.type_)
+			{
+			case TeSTRING:
+				values += "'"+ escapeSequence( row[jj] ) +"'";
+				break;
+			case TeREAL:
+				{
+				std::string strValue = row[jj];
+				replace(strValue.begin(), strValue.end(), ',', '.');
+				values += strValue;
+				}
+				break;
+			case TeINT:
+				values += row[jj];
+				break;
+			case TeDATETIME:
+				{
+					const string temp_dt = string(row[jj].c_str());
+					TeTime t(temp_dt, (*it).dateChronon_, (*it).dateTimeFormat_, (*it).dateSeparator_, (*it).timeSeparator_, (*it).indicatorPM_);
+					values += this->getSQLTime(t);
+				}
+				break;
+			case TeCHARACTER:
+				values += "'" + escapeSequence(row[jj]) + "'";
+				break;
+			case TeBLOB:
+				values += "'" + escapeSequence(row[jj]) + "'";
+			default:
+				values += "'"+ escapeSequence(row[jj]) +"'";
+				break;
+			}
+			++it;
+			j++;
+			jj++;
+		}
+
+		if (values.empty()) 
+			continue;
+
+		string q = "INSERT INTO "+tableName + " ("+ attrs+") " + " VALUES ("+values+") ";
+		if (!execute(q)) 
+			continue;
+	}
+
+	if (!commitTransaction())
+	{
+		rollbackTransaction();
+		return false;
+	}
+	return true;
+}
+
+bool
+TeMySQL::updateTable(TeTable &table)
+{
+	TeAttributeList& att = table.attributeList();
+	unsigned int i;
+	string uniqueVal;
+	bool isUniqueValString = false;
+	
+	if (!beginTransaction())
+		return false;
+
+	string uniqueName = table.uniqueName(); // primary key explicitly defined or 
+	if (table.uniqueName().empty())			// check in the attribute list
+	{								
+		for (i=0; i<att.size(); ++i)
+			if (att[i].rep_.isPrimaryKey_)
+			{
+				uniqueName = att[i].rep_.name_;
+				table.setUniqueName(uniqueName);
+				break;
+			}
+	}
+
+	TeAttributeList::iterator it;
+	TeTableRow row;
+	unsigned int j;
+	bool useComma = false;
+	for (i = 0; i < table.size(); i++  )
+	{
+		row = table[i];
+		it = att.begin();
+		string q;
+		j = 1;
+		int jj = 0;
+		while ( it != att.end() )
+		{
+			if (uniqueName != (*it).rep_.name_)
+			{
+				if ((*it).rep_.isAutoNumber_)
+				{
+					++it;
+					j++;
+					jj++;
+					continue;
+				}			
+				if(useComma == true)
+				{
+					q += ", ";
+				}
+				else
+				{
+					useComma = true;
+				}
+				q += (*it).rep_.name_ + " = ";
+				  				
+				if(row[jj].empty())
+				{
+					q += " null";
+
+					++it;
+					j++;
+					jj++;
+					continue;
+				}
+
+  				switch ((*it).rep_.type_)
+  				{
+  					case TeSTRING:
+						q += "'"+escapeSequence(row[jj])+"'";
+  					break;
+  					case TeREAL:
+					{
+						std::string value = row[jj];
+						replace(value.begin(), value.end(), ',', '.');
+						q += value;
+					}
+  					break;
+  					case TeINT:
+						q += row[jj];
+  					break;
+					case TeDATETIME:
+					{
+						const string temp_dt = string(row[jj].c_str());
+						TeTime t(temp_dt, (*it).dateChronon_, (*it).dateTimeFormat_, (*it).dateSeparator_, (*it).timeSeparator_, (*it).indicatorPM_);
+						q += this->getSQLTime(t);
+					}
+  					break;
+					case TeCHARACTER:
+						q += "'" + escapeSequence(row[jj]) + "'";
+  					break;
+					case TeBLOB:
+						q += "'" + escapeSequence(row[jj]) + "'";
+					break;
+  					default:
+						q += "'"+escapeSequence(row[jj])+"'";
+  					break;
+  				}
+			}
+			else
+			{
+				uniqueVal = row[jj];
+				isUniqueValString = ((*it).rep_.type_ == TeSTRING);
+			}
+			++it;
+			j++;
+			jj++;
+		}
+		if (q.empty())
+			continue;
+		
+		if (!uniqueName.empty() && !uniqueVal.empty())  
+		{
+			if(isUniqueValString)
+				q += " WHERE " + uniqueName + " = '" + uniqueVal +"'";
+			else
+				q += " WHERE " + uniqueName + " = " + uniqueVal;
+		}
+		string sql = "UPDATE "+ table.name() + " SET " + q;
+		if (!execute(sql))
+		{
+			rollbackTransaction();
+			return false;
+		}
+	}
+	if (!commitTransaction())
+	{
+		rollbackTransaction();
+		return false;
+	}
+	return true;
+}
+
+bool 
 TeMySQL::insertTableInfo (int layerId, TeTable &table, const string& user)
 {
 	string sql;
@@ -1014,7 +1661,7 @@ TeMySQL::insertThemeTable (int themeId, int tableId, int relationId, int tableOr
 	else
 		relId = "NULL";
 
-	string sql = "INSERT INTO te_theme_table VALUES ('',";
+	string sql = "INSERT INTO te_theme_table VALUES (0,";
 	sql += Te2String(themeId) + "," + Te2String(tableId) + ",";
 	sql += relId + "," + Te2String(tableOrder) + ")";
 
@@ -1025,6 +1672,92 @@ TeMySQL::insertThemeTable (int themeId, int tableId, int relationId, int tableOr
 	return true;
 }
 
+bool
+TeMySQL::insertPolygonSet(const string& table, TePolygonSet &ps)
+{
+	double		ext_max;
+	unsigned int	i, ni, size, npts=100;
+	unsigned int k;
+	double		*points	= new double[2*sizeof(double)*100];
+	char		buf[256], *query, *end;
+	int			parentId = 0;
+	unsigned int querySize = 100*4*sizeof(double)+256+4;
+	query = new char[querySize];
+	npts = 0;
+	this->beginTransaction();
+	for (unsigned int p = 0; p < ps.size(); ++p)
+	{
+		TePolygon& poly = ps [p];
+		parentId = 0;
+		for (k=0; k<poly.size(); ++k)
+		{
+			TeLinearRing& ring(poly[k]);
+			TeBox b = ring.box();
+			size = ring.size();
+			ni = 0;
+			ext_max = MAX(b.width(),b.height());
+			if (k==0)
+				ni = poly.size()-1;
+			else
+				ni = 0;
+
+			// Create and save the BLOB
+			if (points && size > npts)
+			{
+				delete [] points;
+				points = new double[2*sizeof(double)*size];
+				npts = size;
+			}
+			int iac = 0;
+			for (i=0;i<size;++i)
+			{
+				points[iac++]=swappd(ring[i].x());
+				points[iac++]=swappd(ring[i].y());
+			}
+
+			sprintf (buf,"INSERT INTO %s values(0,'%s',%d,%d,%d,%.15f,%.15f,%.15f,%.15f,%.15f,",
+				table.c_str(),escapeSequence(poly.objectId()).c_str(),size,ni,parentId,b.lowerLeft().x(),b.lowerLeft().y(),b.upperRight().x(),b.upperRight().y(),ext_max);
+
+			if (query && (size*4*sizeof(double)+strlen(buf)+4) > querySize)
+			{
+				delete [] query;
+				querySize = size*4*sizeof(double)+strlen(buf)+4;
+				query = new char[querySize];
+			}
+			end = strxmov(query,buf,(char*)0);
+			*end++ = '\'';
+			end += mysql_real_escape_string(&mysql_,end,(char*)points,size*2*sizeof(double));
+			*end++ = '\'';
+			*end++ = ')';
+
+			if (mysql_real_query(&mysql_,query,(unsigned int) (end - query)) != 0)
+			{
+				errorMessage_ = string(mysql_error(&mysql_));
+				delete []query;
+				break;
+			}
+			ring.geomId (insertId());
+			if (k==0)
+			{
+				parentId = ring.geomId();
+				ps[p].geomId(parentId);
+			}
+		}
+		sprintf(buf,"UPDATE %s SET parent_id=%d WHERE geom_id=%d",table.c_str(),parentId,parentId);
+		if (mysql_real_query(&mysql_,buf,(unsigned int)strlen(buf)) != 0)
+		{
+			errorMessage_ = string(mysql_error(&mysql_));
+			delete []query;
+			break;
+		}	
+	}
+	if (points)
+		delete []points;
+	if (query)
+		delete []query;
+	this->commitTransaction();
+	return true;
+}
 
 bool 
 TeMySQL::insertPolygon (const string& table, TePolygon &poly )
@@ -1062,7 +1795,7 @@ TeMySQL::insertPolygon (const string& table, TePolygon &poly )
 			points[iac++]=swappd(ring[i].y());
 		}
 
-		sprintf (buf,"INSERT INTO %s values('','%s',%d,%d,%d,%.15f,%.15f,%.15f,%.15f,%.15f,",
+		sprintf (buf,"INSERT INTO %s values(0,'%s',%d,%d,%d,%.15f,%.15f,%.15f,%.15f,%.15f,",
 			table.c_str(),escapeSequence(poly.objectId()).c_str(),size,ni,parentId,b.lowerLeft().x(),b.lowerLeft().y(),b.upperRight().x(),b.upperRight().y(),ext_max);
 
 		query = new char[size*4*sizeof(double)+strlen(buf)+4];
@@ -1071,25 +1804,28 @@ TeMySQL::insertPolygon (const string& table, TePolygon &poly )
 		end += mysql_real_escape_string(&mysql_,end,(char*)points,size*2*sizeof(double));
 		*end++ = '\'';
 		*end++ = ')';
-		delete points;
+		delete []points;
 
 		if (mysql_real_query(&mysql_,query,(unsigned int) (end - query)) != 0)
 		{
 			errorMessage_ = string(mysql_error(&mysql_));
-			delete query;
+			delete []query;
 			return false;
 		}
-		delete query;
+		delete []query;
 		query = 0;
 		ring.geomId (insertId());
 		if (k==0)
+		{
 			parentId = ring.geomId();
+			poly.geomId(parentId);
+		}
 	}
 	sprintf(buf,"UPDATE %s SET parent_id=%d WHERE geom_id=%d",table.c_str(),parentId,parentId);
 	if (mysql_real_query(&mysql_,buf,(unsigned int)strlen(buf)) != 0)
 	{
 		errorMessage_ = string(mysql_error(&mysql_));
-		delete query;
+		delete []query;
 		return false;
 	}	
 	return true;
@@ -1100,11 +1836,12 @@ TeMySQL::updatePolygon (const string& table, TePolygon &poly )
 {
 	double	ext_max;
 	int ni;
-	unsigned int i,k,size;
+	unsigned int i,k,size,parentId;
 	double	*points	= NULL;
 	char	buf[256], message[256], *query, *end;
 	TeBox b = poly.box();
 
+	std::string objectId = poly.objectId();
 	for ( k = 0; k < poly.size(); k++ )
 	{
 		TeLinearRing ring ( poly[k] );
@@ -1114,6 +1851,7 @@ TeMySQL::updatePolygon (const string& table, TePolygon &poly )
 		{
 			ext_max = MAX(b.width(),b.height());
 			ni = poly.size()-1;
+			parentId = ring.geomId();
 		}
 		else
 			ni = 0;
@@ -1127,8 +1865,8 @@ TeMySQL::updatePolygon (const string& table, TePolygon &poly )
 			points[iac++]=swappd(ring[i].y());
 		}
 
-		sprintf (buf,"UPDATE %s SET num_coords=%d, num_holes=%d, parent_id=%d, lower_x=%g, lower_y=%g, upper_x=%g, upper_y=%g, ext_max=%g, spatial_data=",
-			table.c_str(),size,ni,k,b.lowerLeft().x(),b.lowerLeft().y(),b.upperRight().x(),b.upperRight().y(),ext_max);
+		sprintf (buf,"UPDATE %s SET object_id=%s, num_coords=%d, num_holes=%d, parent_id=%d, lower_x=%.15f, lower_y=%.15f, upper_x=%.15f, upper_y=%.15f, ext_max=%.15f, spatial_data=",
+			table.c_str(),escapeSequence(objectId).c_str(),size,ni,parentId,b.lowerLeft().x(),b.lowerLeft().y(),b.upperRight().x(),b.upperRight().y(),ext_max);
 		query = new char[size*4*sizeof(double)+strlen(buf)+50];
 		end = strxmov(query,buf,(char*)0);
 		*end++ = '\'';
@@ -1136,15 +1874,15 @@ TeMySQL::updatePolygon (const string& table, TePolygon &poly )
 		*end++ = '\'';
 		sprintf (message," WHERE geom_id=%d",ring.geomId());
 		end = strxmov(end,message,0);
-		delete points;
+		delete []points;
 
 		if (mysql_real_query(&mysql_,query,(unsigned int) (end - query)) != 0)
 		{
 			errorMessage_ = string(mysql_error(&mysql_));
-			delete query;
+			delete []query;
 			return false;
 		}
-		delete query;
+		delete []query;
 		query = 0;
 	}
 	return true;
@@ -1173,6 +1911,57 @@ TeMySQLPortal::fetchGeometry (TePolygon& poly)
 	return false;
 }
 
+bool 
+TeMySQLPortal::fetchGeometry (TePolygon& poly, const unsigned int& initIndex)
+{
+	int np, ni,k;
+	double x,y,*data;
+	
+	TeLine2D line;
+	line.geomId(atoi(getData(initIndex)));
+	line.objectId(getData(initIndex+1));
+	np = atoi (getData(initIndex+2));
+	ni = atoi (getData(initIndex+3));
+	data = (double*)getData(initIndex+10);
+	for (k=0;k<np;k++)
+	{
+		x = swappd(*data++);
+		y = swappd(*data++);
+		TeCoord2D pt(x,y);
+		line.add(pt);
+	}
+
+	TeLinearRing ring(line); 
+	poly.objectId ( ring.objectId() );
+	poly.geomId ( ring.geomId() );
+	poly.add ( ring );
+	int parentId = poly.geomId();
+	while (fetchRow())
+	{
+		if (atoi(this->getData(initIndex+4)) == parentId)
+		{
+			TeLine2D hole;
+			hole.geomId(atoi(getData(initIndex)));
+			hole.objectId(getData(initIndex+1));
+			np = atoi (getData(initIndex+2));
+			data = (double*)getData(initIndex+10);
+			for (k=0;k<np;k++)
+			{
+				x = swappd(*data++);
+				y = swappd(*data++);
+				TeCoord2D pt(x,y);
+				line.add(pt);
+			}
+
+			TeLinearRing ring(line); 
+			poly.add ( ring );
+		}
+		else
+			return true;
+	}
+	return false;
+}
+
 
 TeLinearRing 
 TeMySQLPortal::getLinearRing (int &ni)
@@ -1201,6 +1990,73 @@ TeMySQLPortal::getLinearRing (int &ni)
 	return ring;
 }
 
+bool 
+TeMySQL::insertLineSet(const string& table, TeLineSet &ls)
+{
+	char	buf[256],
+			*query,
+			*end;
+	unsigned int npts = 100, size;
+	double	*points	= new double[2*sizeof(double)*npts],
+			ext_max;
+	int		iac;
+	TeBox	b;
+	unsigned int querySize = 100*4*sizeof(double)+256+4;
+	query = new char[querySize];
+
+	unsigned int nl, i;
+	this->beginTransaction();
+	for ( nl = 0; nl < ls.size(); ++nl)
+	{
+		TeLine2D& l = ls[nl];
+		b=l.box();
+		ext_max = MAX(b.width(),b.height());
+
+		size = l.size();
+		if (size > npts)
+		{
+			delete []points;
+			points = new double[2*sizeof(double)*size];
+			npts = size;
+		}
+		iac = 0;
+		for (i=0;i<size;i++)
+		{
+			points[iac++]=l[i].x();
+			points[iac++]=l[i].y();
+		}
+
+		sprintf (buf,"INSERT INTO %s values(0,'%s',%d,%.15f,%.15f,%.15f,%.15f,%.15f,",
+		table.c_str(),
+		escapeSequence(l.objectId()).c_str(),
+		size,
+		b.lowerLeft().x(),b.lowerLeft().y(),b.upperRight().x(),b.upperRight().y(),ext_max);
+
+		if ((size*4*sizeof(double)+strlen(buf)+4) > querySize)
+		{
+			delete []query;
+			querySize = size*4*sizeof(double)+strlen(buf)+4;
+			query = new char[querySize];
+		}
+		end = strxmov(query,buf,0);
+		*end++ = '\'';
+		end += mysql_real_escape_string(&mysql_,end,(char*)points,size*2*sizeof(double));
+		*end++ = '\'';
+		*end++ = ')';
+
+		if (mysql_real_query(&mysql_,query,(unsigned int) (end - query)) != 0)
+		{
+			errorMessage_ = string(mysql_error(&mysql_));
+			break;
+		}
+
+		l.geomId (insertId());
+	}
+	this->commitTransaction();
+	delete []points;
+	delete []query;
+	return true;
+}
 
 bool 
 TeMySQL::insertLine (const string& table, TeLine2D &l)
@@ -1225,7 +2081,7 @@ TeMySQL::insertLine (const string& table, TeLine2D &l)
 		points[iac++]=l[i].y();
 	}
 
-	sprintf (buf,"INSERT INTO %s values('','%s',%d,%.15f,%.15f,%.15f,%.15f,%.15f,",
+	sprintf (buf,"INSERT INTO %s values(0,'%s',%d,%.15f,%.15f,%.15f,%.15f,%.15f,",
 	table.c_str(),
 	escapeSequence(l.objectId()).c_str(),
 	size,
@@ -1238,17 +2094,17 @@ TeMySQL::insertLine (const string& table, TeLine2D &l)
 	end += mysql_real_escape_string(&mysql_,end,(char*)points,size*2*sizeof(double));
 	*end++ = '\'';
 	*end++ = ')';
-	delete points;
+	delete []points;
 
 	if (mysql_real_query(&mysql_,query,(unsigned int) (end - query)) != 0)
 	{
 		errorMessage_ = string(mysql_error(&mysql_));
-		delete query;
+		delete [] query;
 		return false;
 	}
 
 	l.geomId (insertId());
-	delete query;
+	delete [] query;
 	return true;
 }
 
@@ -1277,14 +2133,14 @@ TeMySQL::updateLine (const string& table, TeLine2D &l)
 		points[iac++]=l[i].y();
 	}
 
-	sprintf (buf,"UPDATE %s SET num_coords=%d, lower_x=%g, lower_y=%g, upper_x=%g, upper_y=%g, ext_max=%g, spatial_data=",
+	sprintf (buf,"UPDATE %s SET num_coords=%d, lower_x=%.15f, lower_y=%.15f, upper_x=%.15f, upper_y=%.15f, ext_max=%.15f, spatial_data=",
 	table.c_str(),size,b.lowerLeft().x(),b.lowerLeft().y(),b.upperRight().x(),b.upperRight().y(),ext_max);
 	query = new char[size*4*sizeof(double)+strlen(buf)+50];
 	end = strxmov(query,buf,(char*)0);
 	*end++ = '\'';
 	end += mysql_real_escape_string(&mysql_,end,(char*)points,size*2*sizeof(double));
 	*end++ = '\'';
-	delete points;
+	delete []points;
 
 	sprintf (message," WHERE geom_id=%d",l.geomId());
 	end = strxmov(end,message,(char*)0);
@@ -1292,10 +2148,10 @@ TeMySQL::updateLine (const string& table, TeLine2D &l)
 	if (mysql_real_query(&mysql_,query,(unsigned int) (end - query)) != 0)
 	{
 		errorMessage_ = string(mysql_error(&mysql_));
-		delete query;
+		delete []query;
 		return false;
 	}
-	delete query;
+	delete []query;
 	return true;
 }
 
@@ -1324,14 +2180,35 @@ TeMySQLPortal::fetchGeometry(TeLine2D& line)
 	return (fetchRow());
 }
 
+bool
+TeMySQLPortal::fetchGeometry(TeLine2D& line, const unsigned int& initIndex)
+{
+	int index = atoi (getData (initIndex));
+	string object_id = getData (initIndex+1);
+	int np = atoi (getData(initIndex+2));
+	int k;
+	double x,y,*data = (double*)getData(initIndex+8);
+
+	for (k=0;k<np;k++)
+	{
+		x = *data++;
+		y = *data++;
+		TeCoord2D pt(x,y);
+		line.add(pt);
+	}
+	line.objectId (object_id);
+	line.geomId (index);
+	return (fetchRow());
+}
+
 
 bool 
 TeMySQL::insertPoint(const string& table,TePoint &p)
 {
-	string q = "INSERT INTO " + table + " VALUES('',";
+	string q = "INSERT INTO " + table + " VALUES(0,";
 	q += "'" + escapeSequence(p.objectId()) + "',";
-	q += Te2String(p.location().x(),15) + ",";
-	q += Te2String(p.location().y(),15) + ")";
+	q += Te2String(p.location().x_,15) + ",";
+	q += Te2String(p.location().y_,15) + ")";
 	
 	if (!this->execute(string(q)))
 		return false;
@@ -1350,14 +2227,24 @@ TeMySQLPortal::fetchGeometry(TePoint& p)
 	return (fetchRow());
 }
 
+bool 
+TeMySQLPortal::fetchGeometry(TePoint& p, const unsigned int& initIndex)
+{
+	TeCoord2D c(atof (getData(initIndex+2)), atof (getData(initIndex+3)));
+	p.geomId( atoi(getData(initIndex)));
+	p.objectId( string(getData(initIndex+1)));
+	p.add(c);
+	return (fetchRow());
+}
+
 
 bool 
 TeMySQL::insertText(const string& table, TeText &t)
 {
 	char q[256];
-	sprintf (q,"INSERT INTO %s values('','%s',%g,%g,'%s',%g, %g, %g, %g)",
+	sprintf (q,"INSERT INTO %s values(0,'%s',%.15f,%.15f,'%s',%.15f, %.15f, %.15f, %.15f)",
 		table.c_str(), escapeSequence(t.objectId()).c_str(),
-		t.location().x(), t.location().y(),
+		t.location().x_, t.location().y_,
 		t.textValue().c_str(), t.angle(), t.height(),t.alignmentVert(),t.alignmentHoriz());
 	if (!this->execute(string(q)))
 		return false;
@@ -1371,7 +2258,7 @@ bool
 TeMySQL::insertArc(const string& table, TeArc &arc)
 {
 	char q[256];
-	sprintf (q,"INSERT INTO %s values('','%s',%d,%d)",
+	sprintf (q,"INSERT INTO %s values(0,'%s',%d,%d)",
 		table.c_str(),escapeSequence(arc.objectId()).c_str(),arc.fromNode().geomId(),arc.toNode().geomId());
 	if (!this->execute(string(q)))
 		return false;
@@ -1384,61 +2271,24 @@ bool
 TeMySQL::insertNode(const string& table, TeNode &node)
 {
 	char q[256];
-	sprintf (q,"INSERT INTO %s values('','%s',%g,%g)",table.c_str(),node.objectId().c_str(),node.location().x(),node.location().y());
+	sprintf (q,"INSERT INTO %s values(0,'%s',%.15f,%.15f)",table.c_str(),node.objectId().c_str(),node.location().x(),node.location().y());
 	if (!this->execute(string(q)))
 		return false;
 	node.geomId(this->insertId());
 	return true;
 }
 
-bool
-TeMySQL::insertBlob (const string& tableName, const string& columnBlob, TeAttributeRep& columnId, const string& valueId, const string& fileName)
+bool 
+TeMySQL::insertBlob (const string& tableName, const string& columnBlob , const string& whereClause, unsigned char* data, int size)
 {
-	unsigned char	*cdata = 0;
-	int		size;
-	FILE	*fp = 0;
-	
-	struct	stat buf;
-	int		result;
-	
-	result = stat(fileName.c_str(), &buf);
-	
-	if( result != 0 )
+	if (whereClause.empty())
 		return false;
-	
-	size = buf.st_size;
 
-	cdata = new unsigned char[size];
-	fp = fopen(fileName.c_str(), "rb");
-	fread(cdata, sizeof(unsigned char), size, fp); 
-
-	bool status = insertBlob (tableName, columnBlob, columnId,  valueId, cdata, size);
-
-	if(fp)
-		fclose(fp);
-
-	return status;
-}
-
-bool 
-TeMySQL::insertBlob (const string& tableName, const string& /* columnBlob */, TeAttributeRep& columnId, const string& valueId, unsigned char* data, int size)
-{
 	TeMySQLPortal* portal = (TeMySQLPortal*)this->getPortal();
 	if (!portal)
 		return false;
 
-	string q = "SELECT * FROM "+ tableName +" WHERE "+ columnId.name_ +" = ";
-	
-	switch (columnId.type_ )
-	{
-		case TeSTRING:
-			q += "'"+ valueId + "'";
-			break;
-		default:
-			q += valueId;
-			break;
-	}
-
+	string q = "SELECT * FROM "+ tableName +" WHERE "+ whereClause;
 	if ((!portal->query(q)) || (!portal->fetchRow()))
 	{
 		delete portal;
@@ -1449,7 +2299,7 @@ TeMySQL::insertBlob (const string& tableName, const string& /* columnBlob */, Te
 	char	message[256],
 			*query,
 			*end;
-	sprintf (message,"UPDATE %s SET media_blob= ",tableName.c_str());
+	sprintf (message,"UPDATE %s SET %s = ",tableName.c_str(), columnBlob.c_str());
 
 	query = new char[2*size+strlen(message)+4];
 	end = strxmov(query,message,0);
@@ -1457,23 +2307,20 @@ TeMySQL::insertBlob (const string& tableName, const string& /* columnBlob */, Te
 	end += mysql_real_escape_string(&mysql_,end,(char*)data,size);
 	*end++ = '\'';
 
-	if (columnId.type_ == TeSTRING)
-		sprintf (message,"WHERE %s='%s'",columnId.name_.c_str(),valueId.c_str());
-	else
-		sprintf (message,"WHERE %s=%s",columnId.name_.c_str(),valueId.c_str());
+	sprintf (message," WHERE %s",whereClause.c_str());
 
 	end = strxmov(end,message,0);
 
 	if (mysql_real_query(&mysql_,query,(unsigned int) (end - query)))
 	{
 		errorMessage_ = string(mysql_error(&mysql_));
-		delete query;
+		delete []query;
 		return false;
 	}
-	delete query;	
+	delete []query;	
 	return true;
 }
-	
+
 bool
 TeMySQL::insertRasterBlock(const string& table, const string& blockId, const TeCoord2D& ll, const TeCoord2D& ur, 
 						   unsigned char *buf,unsigned long size, int band, unsigned int res, unsigned int subband)
@@ -1506,7 +2353,7 @@ TeMySQL::insertRasterBlock(const string& table, const string& blockId, const TeC
 			*end;
 	if (!update)
 	{
-		sprintf (message,"INSERT INTO %s values('%s',%f,%f,%f,%f,%d,%d,%d,",
+		sprintf (message,"INSERT INTO %s values('%s',%.15f,%.15f,%.15f,%.15f,%d,%d,%d,",
 			table.c_str(),blockId.c_str(),ll.x(),ll.y(),ur.x(),ur.y(),band,res,subband);
 	}
 	else
@@ -1517,7 +2364,7 @@ TeMySQL::insertRasterBlock(const string& table, const string& blockId, const TeC
 	if (bufferBlobSize_ < (long)(2*size+strlen(message)+20))
 	{
 		if (bufferBlob_)
-			delete bufferBlob_;
+			delete []bufferBlob_;
 		bufferBlobSize_ = 2*size+strlen(message)+20;
 		bufferBlob_ = new char[bufferBlobSize_];
 	}
@@ -1540,7 +2387,7 @@ TeMySQL::insertRasterBlock(const string& table, const string& blockId, const TeC
 	if (mysql_real_query(&mysql_,bufferBlob_,(unsigned int) (end - bufferBlob_)))
 	{
 		errorMessage_ = string(mysql_error(&mysql_));
-		delete bufferBlob_;
+		delete []bufferBlob_;
 		bufferBlobSize_ = 0;
 		bufferBlob_ = 0;
 		return false;
@@ -1558,13 +2405,22 @@ TeMySQLPortal::fetchGeometry(TeNode& n)
 	return (fetchRow());
 }
 
+bool
+TeMySQLPortal::fetchGeometry(TeNode& n, const unsigned int& initIndex)
+{
+	TeCoord2D c(atof (getData(initIndex+2)), atof (getData(initIndex+3)));
+	n.geomId( atoi(getData(initIndex)));
+	n.objectId( string(getData(initIndex+1)));
+	n.add(c);
+	return (fetchRow());
+}
 
 bool
 TeMySQL::insertCell(const string& table, TeCell &c)
 {
 	TeBox	b=c.box();
 	char	q[256];
-	sprintf (q,"INSERT INTO %s values('','%s',%.15f,%.15f,%.15f,%.15f,%d,%d)",
+	sprintf (q,"INSERT INTO %s values(0,'%s',%.15f,%.15f,%.15f,%.15f,%d,%d)",
 		table.c_str(),c.objectId().c_str(),
 		b.lowerLeft().x(),b.lowerLeft().y(),b.upperRight().x(),b.upperRight().y(),
 		c.column(),c.line());
@@ -1675,7 +2531,8 @@ char*
 TeMySQLPortal::getData (const string& s)
 {
 	string fieldName;
-	size_t pos = s.find(".", string::npos,1);
+//	size_t pos = s.find(".", string::npos,1);
+	size_t pos = s.find(".", 0, 1);
 	if (pos != string::npos)
 		fieldName = s.substr(pos+1);
 	else
@@ -1707,7 +2564,8 @@ bool
 TeMySQLPortal::getBlob (const string& s, unsigned char* &data, long& size)
 {
 	string fieldName;
-	size_t pos = s.find(".", string::npos,1);
+//	size_t pos = s.find(".", string::npos,1);
+	size_t pos = s.find(".", 0, 1);
 	if (pos != string::npos)
 		fieldName = s.substr(pos+1);
 	else
@@ -1805,7 +2663,7 @@ TeMySQL::inClauseValues(const string& query, const string& attribute, vector<str
 		}
 		else
 		{
-			inClause.erase(inClause.size()-1,1);
+			inClause = inClause.substr(0, inClause.size()-1);
 			inClause += ")";
 			inClauseVector.push_back(inClause);
 			count = 0;
@@ -1820,7 +2678,7 @@ TeMySQL::inClauseValues(const string& query, const string& attribute, vector<str
 	}
 	else
 	{
-		inClause.erase(inClause.size()-1,1);
+		inClause = inClause.substr(0, inClause.size()-1);
 		inClause += ")";
 		inClauseVector.push_back(inClause);
 	}
@@ -1891,3 +2749,4 @@ string TeMySQL::toUpper(const string& value)
 
 	return result;
 }
+
diff --git a/src/terralib/drivers/MySQL/TeMySQL.h b/src/terralib/drivers/MySQL/TeMySQL.h
old mode 100644
new mode 100755
index d268062..9bb9794
--- a/src/terralib/drivers/MySQL/TeMySQL.h
+++ b/src/terralib/drivers/MySQL/TeMySQL.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,7 +20,9 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
+/*! \file TeMySQL.h
+    \brief This file contains the particularities of a MySQL driver
+*/
 #ifndef  __TERRALIB_INTERNAL_MYSQL_H
 #define  __TERRALIB_INTERNAL_MYSQL_H
 
@@ -32,6 +34,7 @@ of this library and its documentation.
 
 #include <TeTable.h>
 #include <TeDatabase.h>
+#include <TeDatabaseFactory.h>
 
 
 //! A concrete implementation of a driver to the MySQL SGDB
@@ -50,11 +53,11 @@ public:
 
 	string  escapeSequence(const string& from);
 
-	bool newDatabase(const string& database, const string& user, const string& password, const string& host, const int &port=0, bool terralibModel=true);
+	bool newDatabase(const string& database, const string& user, const string& password, const string& host, const int &port=-1, bool terralibModel=true);
 
-	bool connect (const string& host, const string& user, const string& password, const string& database, int port=0);
+	bool connect (const string& host, const string& user, const string& password, const string& database, int port=-1);
 
-	bool showDatabases (const string& host, const string& user, const string& password, vector<string>& dbNames, int port=0);
+	bool showDatabases (const string& host, const string& user, const string& password, vector<string>& dbNames, int port=-1);
 
 	void close();
 
@@ -64,6 +67,9 @@ public:
 
 	bool addColumn (const string& table,TeAttributeRep &rep);
 
+	//! Alter a property of a table 
+	virtual bool alterTable(const string& tableName, TeAttributeRep& rep, const string& oldColName="");
+
 	bool defineIntegrity(void);
 
 	bool createRelation (const string& /* relName */, const string& /* table */, const string& /* fieldName */,
@@ -76,6 +82,8 @@ public:
 
 	bool execute ( const string &q);
 
+	bool createTable(const string& table, TeAttributeList &attr);
+
 	TeDatabasePortal* getPortal ();
 
 	string	errorMessage () 
@@ -84,27 +92,28 @@ public:
 	int	errorNum () 
 	{	return mysql_errno(&mysql_);	}
 	
-	bool createPolygonGeometry (const string&  table);
-	bool createLineGeometry (const string&  table);
-	bool createRasterTable (const string& table);
-
 // specific TerraLib database access methods
 
 	bool insertProjection (TeProjection *proj);
 	bool insertLayer(TeLayer* layer);
+	bool insertProject(TeProject* project);
 	bool insertRepresentation(int layerId, TeRepresentation& rep);	
+	bool insertTable(TeTable &table);
+	bool updateTable	(TeTable &table);
 	bool insertTableInfo (int layerId, TeTable &table, const string& user="");
 	bool insertRelationInfo(const int tableId, const string& tField,
 						    const string& eTable, const string& eField, int& relId);
 	bool insertView (TeView *view);
 	bool insertViewTree (TeViewTree *tree);	
-	bool insertTheme(TeTheme *theme);
+	bool insertTheme(TeAbstractTheme *theme);
 	bool insertThemeGroup (TeViewTree* tree);
-	bool generateLabelPositions (TeTheme *theme);
+	bool generateLabelPositions (TeTheme *theme, const std::string& objectId = "");
 	bool insertThemeTable (int themeId, int tableId, int relationId, int tableOrder);
 	bool insertLegend (TeLegendEntry *legend);
-	bool insertPolygon	(const string& table, TePolygon &p);	
+	bool insertPolygon	(const string& table, TePolygon &p);
+	bool insertPolygonSet(const string& table, TePolygonSet &ps);
 	bool updatePolygon	(const string& table, TePolygon &p);
+	bool insertLineSet	(const string& table, TeLineSet &ls);	
 	bool insertLine (const string&  table, TeLine2D &l);
 	bool updateLine (const string& table, TeLine2D &l);
 	bool insertPoint (const string& table, TePoint &p);
@@ -113,6 +122,7 @@ public:
 	bool insertNode	(const string& table, TeNode &node);	
 	bool insertCell	(const string& table, TeCell &c);
 	int  insertId();
+	
 
 	bool insertRasterBlock(const string& table, const string& blockId, const TeCoord2D& ll, const TeCoord2D& ur, unsigned char *buf,unsigned long size, int band=0, unsigned int res=1, unsigned int subband=0);
 
@@ -122,16 +132,20 @@ public:
 
 	bool inClauseValues(const string& query, const string& attribute, vector<string>& inClauseVector);
 
-	bool insertBlob (const string& tableName, const string& columnBlob, TeAttributeRep& columnId, const string& valueId, const string& fileName);
-	bool insertBlob (const string& tableName, const string& columnBlob, 
-		TeAttributeRep& columnId, const string& valueId, unsigned char* data, int size);
-
+	bool insertBlob (const string& tableName, const string& columnBlob, const string& whereClause, unsigned char* data, int size);
+	
 	//! Concat values in a vector using unionString as the join between each value
 	string concatValues(vector<string>& values, const string& unionString);
 
 	//! Returns the SQL function for upper case
 	string toUpper(const string& value);
 
+	string getConcatFieldsExpression(const vector<string>& fNamesVec);
+
+	bool beginTransaction();
+    bool commitTransaction();
+    bool rollbackTransaction();
+
 private :
 
 	MYSQL	mysql_;
@@ -194,6 +208,10 @@ public :
 	bool fetchGeometry(TeLine2D& line);
 	bool fetchGeometry(TeNode& n);
 	bool fetchGeometry(TePoint& p);
+	bool fetchGeometry(TePolygon& pol, const unsigned int& initIndex);
+	bool fetchGeometry(TeLine2D& line, const unsigned int& initIndex);
+	bool fetchGeometry(TeNode& n, const unsigned int& initIndex);
+	bool fetchGeometry(TePoint& p, const unsigned int& initIndex);
 	
 	bool setData (int /* field */, string /* val */)
 	{return true; }
@@ -209,10 +227,55 @@ public :
 	string getDateAsString(int i);
 	string getDateAsString(const string& s);
 
-
 protected:
 	TeLinearRing getLinearRing (int &ni);
 };
 
+
+/**
+ * @brief This is the class for TeMySQL driver factory.
+ * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+ * @ingroup DatabaseUtils
+ */
+class TeMySQLFactory : public TeDatabaseFactory
+{
+  public :
+      
+    /**
+     * Default constructor
+     */
+    TeMySQLFactory() : TeDatabaseFactory( std::string( "MySQL" ) ) {};      
+      
+    /**
+     * Default Destructor
+     */
+    ~TeMySQLFactory() {};
+      
+  protected :  
+  
+    /**
+     * Implementation for the abstract TeFactory::build.
+     *
+     * @param arg A const reference to the parameters used by the
+     * database.
+     * @return A pointer to the new generated database instance.
+     */
+    TeDatabase* build( const TeDatabaseFactoryParams& arg )
+    {
+      TeMySQL* instance_ptr = new TeMySQL();
+      
+      if( arg.host_ != "" ) {
+        instance_ptr->connect( arg.host_, arg.user_, arg.password_,
+          arg.database_, arg.port_ );
+      }
+  
+      return (TeDatabase*)instance_ptr;
+    }
+};
+
+namespace {
+  static TeMySQLFactory TeMySQLFactory_instance;
+}; 
+
 #endif
 
diff --git a/src/terralib/drivers/MySQL/include/config-netware.h b/src/terralib/drivers/MySQL/include/config-netware.h
deleted file mode 100644
index 3e145f5..0000000
--- a/src/terralib/drivers/MySQL/include/config-netware.h
+++ /dev/null
@@ -1,119 +0,0 @@
-/* Copyright (C) 2000 MySQL AB
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
-
-/* Header for NetWare compatible with MySQL */
-
-#ifndef _config_netware_h
-#define _config_netware_h
-
-/* required headers */
-#include <unistd.h>
-#include <stdio.h>
-#include <errno.h>
-#include <screen.h>
-#include <limits.h>
-#include <signal.h>
-#include <errno.h>
-#include <stdbool.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <time.h>
-#include <sys/time.h>
-#include <pthread.h>
-#include <termios.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* required adjustments */
-#undef HAVE_READDIR_R
-#undef HAVE_RWLOCK_INIT
-#undef HAVE_SCHED_H
-#undef HAVE_SYS_MMAN_H
-#undef HAVE_SYNCH_H
-#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1
-#define HAVE_PTHREAD_SIGMASK 1
-#define HAVE_PTHREAD_YIELD_ZERO_ARG 1
-#define HAVE_BROKEN_REALPATH 1
-
-/* no libc crypt() function */
-#ifdef HAVE_OPENSSL
-  #define HAVE_CRYPT 1
-#else
-  #undef HAVE_CRYPT
-#endif /* HAVE_OPENSSL */
-
-/* Configure can't detect this because it uses AC_TRY_RUN */
-#undef HAVE_COMPRESS
-#define HAVE_COMPRESS
-
-/* include the old function apis */
-#define USE_OLD_FUNCTIONS 1
-
-/* no case sensitivity */
-#define FN_NO_CASE_SENCE 1
-
-/* the thread alarm is not used */
-#define DONT_USE_THR_ALARM 1
-
-/* signals do not interrupt sockets */
-#define SIGNALS_DONT_BREAK_READ 1
-
-/* signal by closing the sockets */
-#define SIGNAL_WITH_VIO_CLOSE 1
-
-/* On NetWare, stack grows towards lower address*/
-#define STACK_DIRECTION -1
-
-/* default directory information */
-#define	DEFAULT_MYSQL_HOME    "sys:/mysql"
-#define PACKAGE               "mysql"
-#define DEFAULT_BASEDIR       "sys:/"
-#define SHAREDIR              "share/"
-#define DEFAULT_CHARSET_HOME  "sys:/mysql/"
-#define DATADIR               "data/"
-
-/* 64-bit file system calls */
-#define SIZEOF_OFF_T          8
-#define off_t                 off64_t
-#define chsize                chsize64
-#define ftruncate             ftruncate64
-#define lseek                 lseek64
-#define pread                 pread64
-#define pwrite                pwrite64
-#define tell                  tell64
-
-/* do not use the extended time in LibC sys\stat.h */
-#define _POSIX_SOURCE
-
-/* Kernel call on NetWare that will only yield if our time slice is up */
-void kYieldIfTimeSliceUp(void);
-
-/* Some macros for portability */
-
-#define set_timespec(ABSTIME,SEC) { (ABSTIME).tv_sec=time(NULL)+(SEC); (ABSTIME).tv_nsec=0; }
-
-/* extra protection against CPU Hogs on NetWare */
-#define NETWARE_YIELD kYieldIfTimeSliceUp()
-/* Screen mode for help texts */
-#define NETWARE_SET_SCREEN_MODE(A) setscreenmode(A)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _config_netware_h */
diff --git a/src/terralib/drivers/MySQL/include/config-os2.h b/src/terralib/drivers/MySQL/include/config-os2.h
deleted file mode 100644
index 0402074..0000000
--- a/src/terralib/drivers/MySQL/include/config-os2.h
+++ /dev/null
@@ -1,835 +0,0 @@
-/* Copyright (C) 2000 MySQL AB & Yuri Dario
-   All the above parties has a full, independent copyright to
-   the following code, including the right to use the code in
-   any manner without any demands from the other parties.
-
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public
-   License as published by the Free Software Foundation; either
-   version 2 of the License, or (at your option) any later version.
-
-   This library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public
-   License along with this library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-   MA 02111-1307, USA */
-
-/* Defines for OS2 to make it compatible for MySQL */
-
-#ifndef __CONFIG_OS2_H__
-#define __CONFIG_OS2_H__
-
-#include <os2.h>
-#include <math.h>
-#include <io.h>
-#include <types.h>
-
-/* Define to name of system eg solaris*/
-#define SYSTEM_TYPE "IBM OS/2 Warp"
-/* Define to machine type name eg sun10 */
-#define MACHINE_TYPE "i686"
-/* Name of package */
-#define PACKAGE "mysql"
-/* Version number of package */
-#define VERSION MYSQL_SERVER_VERSION
-/* Default socket */
-#define MYSQL_UNIX_ADDR "\\socket\\MySQL"
-
-#define FN_LIBCHAR		 '\\'
-#define FN_ROOTDIR		 "\\"
-#define MY_NFILE		1024  /* This is only used to save filenames */
-
-#define HAVE_ACCESS
-
-#define DEFAULT_MYSQL_HOME	"c:\\mysql"
-#define DEFAULT_BASEDIR		"C:\\"
-#define SHAREDIR		"share"
-#define DEFAULT_CHARSET_HOME	"C:/mysql/"
-#define _POSIX_PATH_MAX		255
-#define DWORD			ULONG
-
-#define O_SHARE		0x1000		/* Open file in sharing mode */
-#define FILE_BINARY	O_BINARY	/* my_fopen in binary mode */
-#define S_IROTH		S_IREAD		/* for my_lib */
-
-#define CANT_DELETE_OPEN_FILES		/* saves open files in a list, for delayed delete */
-
-#define O_NONBLOCK	0x10
-
-#define NO_OPEN_3			/* For my_create() */
-#define SIGQUIT		SIGTERM		/* No SIGQUIT */
-#define SIGALRM		14		/* Alarm */
-
-#define NO_FCNTL_NONBLOCK
-
-#define EFBIG			   E2BIG
-/*#define ENFILE		  EMFILE    */
-/*#define ENAMETOOLONG		(EOS2ERR+2) */
-/*#define ETIMEDOUT		  145       */
-/*#define EPIPE			  146       */
-#define EROFS			147
-
-#define sleep(A)	DosSleep((A)*1000)
-#define closesocket(A)	soclose(A)
-
-#define F_OK		0
-#define W_OK		2
-
-#define bzero(x,y)	memset((x),'\0',(y))
-#define bcopy(x,y,z)	memcpy((y),(x),(z))
-#define bcmp(x,y,z)	memcmp((y),(x),(z))
-
-#define F_RDLCK		4	    /* Read lock.  */
-#define F_WRLCK		2	    /* Write lock.  */
-#define F_UNLCK		0	    /* Remove lock.  */
-
-#define S_IFMT		0x17000	    /* Mask for file type */
-#define F_TO_EOF	0L	    /* Param to lockf() to lock rest of file */
-
-#define HUGE_PTR
-
-#ifdef __cplusplus
-extern "C"
-#endif
-double _cdecl rint( double nr);
-
-DWORD	 TlsAlloc( void);
-BOOL	 TlsFree( DWORD);
-PVOID	 TlsGetValue( DWORD);
-BOOL	 TlsSetValue( DWORD, PVOID);
-
-/* support for > 2GB file size */
-#define SIZEOF_OFF_T	8
-#define lseek(A,B,C)	_lseek64( A, B, C)
-#define tell(A)		_lseek64( A, 0, SEEK_CUR)
-
-void* dlopen( char* path, int flag);
-char* dlerror( void);
-void* dlsym( void* hmod, char* fn);
-void  dlclose( void* hmod);
-
-/* Some typedefs */
-typedef unsigned long long os_off_t;
-
-/* config.h.  Generated automatically by configure.  */
-/* config.h.in.  Generated automatically from configure.in by autoheader.  */
-
-/* Define if using alloca.c.  */
-/* #undef C_ALLOCA */
-
-/* Define to empty if the keyword does not work.  */
-/* #undef const */
-
-/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
-   This function is required for alloca.c support on those systems.  */
-/* #undef CRAY_STACKSEG_END */
-
-/* Define if you have alloca, as a function or macro.  */
-#define HAVE_ALLOCA 1
-
-/* Define if you have <alloca.h> and it should be used (not on Ultrix).  */
-/* #define HAVE_ALLOCA_H 1 */
-
-/* Define if you don't have vprintf but do have _doprnt.  */
-/* #undef HAVE_DOPRNT */
-
-/* Define if you have a working `mmap' system call.  */
-/* #undef HAVE_MMAP */
-
-/* Define if system calls automatically restart after interruption
-   by a signal.  */
-/* #undef HAVE_RESTARTABLE_SYSCALLS */
-
-/* Define if your struct stat has st_rdev.  */
-#define HAVE_ST_RDEV 1
-
-/* Define if you have <sys/wait.h> that is POSIX.1 compatible.	*/
-/* #define HAVE_SYS_WAIT_H 1 */
-
-/* Define if you don't have tm_zone but do have the external array
-   tzname.  */
-#define HAVE_TZNAME 1
-
-/* Define if utime(file, NULL) sets file's timestamp to the present.  */
-#define HAVE_UTIME_NULL 1
-
-/* Define if you have the vprintf function.  */
-#define HAVE_VPRINTF 1
-
-/* Define as __inline if that's what the C compiler calls it.  */
-/* #undef inline */
-
-/* Define to `long' if <sys/types.h> doesn't define.  */
-/* #undef off_t */
-
-/* Define as the return type of signal handlers (int or void).	*/
-#define RETSIGTYPE void
-
-/* Define to `unsigned' if <sys/types.h> doesn't define.  */
-/* #undef size_t */
-
-/* If using the C implementation of alloca, define if you know the
-   direction of stack growth for your system; otherwise it will be
-   automatically deduced at run-time.
- STACK_DIRECTION > 0 => grows toward higher addresses
- STACK_DIRECTION < 0 => grows toward lower addresses
- STACK_DIRECTION = 0 => direction of growth unknown
- */
-#define STACK_DIRECTION -1
-
-/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly.  */
-/* #undef STAT_MACROS_BROKEN */
-
-/* Define if you have the ANSI C header files.	*/
-#define STDC_HEADERS 1
-
-/* Define if you can safely include both <sys/time.h> and <time.h>.  */
-#define TIME_WITH_SYS_TIME 1
-
-/* Define if your <sys/time.h> declares struct tm.  */
-/* #undef TM_IN_SYS_TIME */
-
-/* Define if your processor stores words with the most significant
-   byte first (like Motorola and SPARC, unlike Intel and VAX).	*/
-/* #undef WORDS_BIGENDIAN */
-
-/* Version of .frm files */
-#define DOT_FRM_VERSION 6
-
-/* READLINE: */
-#define FIONREAD_IN_SYS_IOCTL 1
-
-/* READLINE: Define if your system defines TIOCGWINSZ in sys/ioctl.h.  */
-/* #undef GWINSZ_IN_SYS_IOCTL */
-
-/* Do we have FIONREAD */
-#define FIONREAD_IN_SYS_IOCTL 1
-
-/* atomic_add() from <asm/atomic.h> (Linux only) */
-/* #undef HAVE_ATOMIC_ADD */
-
-/* atomic_sub() from <asm/atomic.h> (Linux only) */
-/* #undef HAVE_ATOMIC_SUB */
-
-/* bool is not defined by all C++ compilators */
-#define HAVE_BOOL 1
-
-/* Have berkeley db installed */
-/* #define HAVE_BERKELEY_DB 1 */
-
-/* DSB style signals ? */
-/* #undef HAVE_BSD_SIGNALS */
-
-/* Can netinet be included */
-/* #undef HAVE_BROKEN_NETINET_INCLUDES */
-
-/* READLINE: */
-/* #undef HAVE_BSD_SIGNALS */
-
-/* ZLIB and compress: */
-#define HAVE_COMPRESS 1
-
-/* Define if we are using OSF1 DEC threads */
-/* #undef HAVE_DEC_THREADS */
-
-/* Define if we are using OSF1 DEC threads on 3.2 */
-/* #undef HAVE_DEC_3_2_THREADS */
-
-/* fp_except from ieeefp.h */
-/* #undef HAVE_FP_EXCEPT */
-
-/* READLINE: */
-/* #undef HAVE_GETPW_DECLS */
-
-/* Solaris define gethostbyname_r with 5 arguments. glibc2 defines
-   this with 6 arguments */
-/* #undef HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE */
-
-/* In OSF 4.0f the 3'd argument to gethostname_r is hostent_data * */
-/* #undef HAVE_GETHOSTBYNAME_R_RETURN_INT */
-
-/* Define if int8, int16 and int32 types exist */
-/* #undef HAVE_INT_8_16_32 */
-
-/* Define if have -lwrap */
-/* #undef HAVE_LIBWRAP */
-
-/* Define if we are using Xavier Leroy's LinuxThreads */
-/* #undef HAVE_LINUXTHREADS */
-
-/* Do we use user level threads */
-/* #undef HAVE_mit_thread */
-
-/* For some non posix threads */
-/* #undef HAVE_NONPOSIX_PTHREAD_GETSPECIFIC */
-
-/* For some non posix threads */
-/* #undef HAVE_NONPOSIX_PTHREAD_MUTEX_INIT */
-
-/* READLINE: */
-#define HAVE_POSIX_SIGNALS 0
-
-/* sigwait with one argument */
-/* #undef HAVE_NONPOSIX_SIGWAIT */
-
-/* pthread_attr_setscope */
-#define HAVE_PTHREAD_ATTR_SETSCOPE 1
-
-/* POSIX readdir_r */
-/* #undef HAVE_READDIR_R */
-
-/* POSIX sigwait */
-/* #undef HAVE_SIGWAIT */
-
-/* crypt */
-#define HAVE_CRYPT 1
-
-/* Solaris define gethostbyaddr_r with 7 arguments. glibc2 defines
-   this with 8 arguments */
-/* #undef HAVE_SOLARIS_STYLE_GETHOST */
-
-/* Timespec has a ts_sec instead of tv_sev  */
-#define HAVE_TIMESPEC_TS_SEC 1
-
-/* Have the tzname variable */
-#define HAVE_TZNAME 1
-
-/* Define if the system files define uchar */
-/* #undef HAVE_UCHAR */
-
-/* Define if the system files define uint */
-/* #undef HAVE_UINT */
-
-/* Define if the system files define ulong */
-/* #undef HAVE_ULONG */
-
-/* UNIXWARE7 threads are not posix */
-/* #undef HAVE_UNIXWARE7_THREADS */
-
-/* new UNIXWARE7 threads that are not yet posix */
-/* #undef HAVE_UNIXWARE7_POSIX */
-
-/* READLINE: */
-/* #undef HAVE_USG_SIGHOLD */
-
-/* Define if want -lwrap */
-/* #undef LIBWRAP */
-
-/* mysql client protocoll version */
-#define PROTOCOL_VERSION 10
-
-/* Define if qsort returns void */
-#define QSORT_TYPE_IS_VOID 1
-
-/* Define as the return type of qsort (int or void). */
-#define RETQSORTTYPE void
-
-/* Define as the base type of the last arg to accept */
-#define SOCKET_SIZE_TYPE int
-
-/* Last argument to get/setsockopt */
-/* #undef SOCKOPT_OPTLEN_TYPE */
-
-/* #undef SPEED_T_IN_SYS_TYPES */
-/* #undef SPRINTF_RETURNS_PTR */
-#define SPRINTF_RETURNS_INT 1
-/* #undef SPRINTF_RETURNS_GARBAGE */
-
-/* #undef STRUCT_DIRENT_HAS_D_FILENO */
-#define STRUCT_DIRENT_HAS_D_INO 1
-
-/* Define if you want to have threaded code. This may be undef on client code */
-#define THREAD 1
-
-/* Should be client be thread safe */
-/* #undef THREAD_SAFE_CLIENT */
-
-/* READLINE: */
-/* #undef TIOCSTAT_IN_SYS_IOCTL */
-
-/* Use multi-byte character routines */
-/* #undef USE_MB */
-/* #undef USE_MB_IDENT */
-
-/* Use MySQL RAID */
-/* #undef USE_RAID */
-
-/* Use strcoll() functions when comparing and sorting. */
-/* #undef USE_STRCOLL */
-
-/* READLINE: */
-#define VOID_SIGHANDLER 1
-
-/* The number of bytes in a char.  */
-#define SIZEOF_CHAR 1
-
-/* The number of bytes in a int.  */
-#define SIZEOF_INT 4
-
-/* The number of bytes in a long.  */
-#define SIZEOF_LONG 4
-
-/* The number of bytes in a long long.	*/
-#define SIZEOF_LONG_LONG 8
-
-/* Define if you have the alarm function.  */
-#define HAVE_ALARM 1
-
-/* Define if you have the atod function.  */
-/* #undef HAVE_ATOD */
-
-/* Define if you have the bcmp function.  */
-#define HAVE_BCMP 1
-
-/* Define if you have the bfill function.  */
-/* #undef HAVE_BFILL */
-
-/* Define if you have the bmove function.  */
-/* #undef HAVE_BMOVE */
-
-/* Define if you have the bzero function.  */
-#define HAVE_BZERO 1
-
-/* Define if you have the chsize function.  */
-#define HAVE_CHSIZE 1
-
-/* Define if you have the cuserid function.  */
-/* #define HAVE_CUSERID 1 */
-
-/* Define if you have the dlerror function.  */
-#define HAVE_DLERROR 1
-
-/* Define if you have the dlopen function.  */
-#define HAVE_DLOPEN 1
-
-/* Define if you have the fchmod function.  */
-/* #undef HAVE_FCHMOD */
-
-/* Define if you have the fcntl function.  */
-/* #define HAVE_FCNTL 1 */
-
-/* Define if you have the fconvert function.  */
-/* #undef HAVE_FCONVERT */
-
-/* Define if you have the finite function.  */
-/* #undef HAVE_FINITE */
-
-/* Define if you have the fpresetsticky function.  */
-/* #undef HAVE_FPRESETSTICKY */
-
-/* Define if you have the fpsetmask function.  */
-/* #undef HAVE_FPSETMASK */
-
-/* Define if you have the fseeko function.  */
-/* #undef HAVE_FSEEKO */
-
-/* Define if you have the ftruncate function.  */
-/* #define HAVE_FTRUNCATE 1 */
-
-/* Define if you have the getcwd function.  */
-#define HAVE_GETCWD 1
-
-/* Define if you have the gethostbyaddr_r function.  */
-/* #undef HAVE_GETHOSTBYADDR_R */
-
-/* Define if you have the gethostbyname_r function.  */
-/* #undef HAVE_GETHOSTBYNAME_R */
-
-/* Define if you have the getpagesize function.  */
-#define HAVE_GETPAGESIZE 1
-
-/* Define if you have the getpass function.  */
-/*#define HAVE_GETPASS 1 */
-
-/* Define if you have the getpassphrase function.  */
-/* #undef HAVE_GETPASSPHRASE */
-
-/* Define if you have the getpwnam function.  */
-/* #define HAVE_GETPWNAM 1 */
-
-/* Define if you have the getpwuid function.  */
-/* #define HAVE_GETPWUID 1 */
-
-/* Define if you have the getrlimit function.  */
-/* #undef HAVE_GETRLIMIT */
-
-/* Define if you have the getrusage function.  */
-/* #undef HAVE_GETRUSAGE */
-
-/* Define if you have the getwd function.  */
-#define HAVE_GETWD 1
-
-/* Define to 1 if you have the `gmtime_r' function. */
-#define HAVE_GMTIME_R 1
-
-/* Define if you have the index function.  */
-#define HAVE_INDEX 1
-
-/* Define if you have the initgroups function.	*/
-/* #undef HAVE_INITGROUPS */
-
-/* Define if you have the localtime_r function.  */
-#define HAVE_LOCALTIME_R 1
-
-/* Define if you have the locking function.  */
-/* #undef HAVE_LOCKING */
-
-/* Define if you have the longjmp function.  */
-#define HAVE_LONGJMP 1
-
-/* Define if you have the lrand48 function.  */
-/* #undef HAVE_LRAND48 */
-
-/* Define if you have the lstat function.  */
-/* #undef HAVE_LSTAT */
-
-/* Define if you have the madvise function.  */
-/* #undef HAVE_MADVISE */
-
-/* Define if you have the memcpy function.  */
-#define HAVE_MEMCPY 1
-
-/* Define if you have the memmove function.  */
-#define HAVE_MEMMOVE 1
-
-/* Define if you have the mkstemp function.  */
-/* #define HAVE_MKSTEMP 1 */
-
-/* Define if you have the mlockall function.  */
-/* #undef HAVE_MLOCKALL */
-
-/* Define if you have the perror function.  */
-#define HAVE_PERROR 1
-
-/* Define if you have the poll function.  */
-/* #undef HAVE_POLL */
-
-/* Define if you have the pread function.  */
-/* #undef HAVE_PREAD */
-
-/* Define if you have the pthread_attr_create function.  */
-/* #undef HAVE_PTHREAD_ATTR_CREATE */
-
-/* Define if you have the pthread_attr_setprio function.  */
-#define HAVE_PTHREAD_ATTR_SETPRIO 1
-
-/* Define if you have the pthread_attr_setschedparam function.	*/
-/* #undef HAVE_PTHREAD_ATTR_SETSCHEDPARAM */
-
-/* Define if you have the pthread_attr_setstacksize function.  */
-#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1
-
-/* Define if you have the pthread_condattr_create function.  */
-/* #undef HAVE_PTHREAD_CONDATTR_CREATE */
-
-/* Define if you have the pthread_getsequence_np function.  */
-/* #undef HAVE_PTHREAD_GETSEQUENCE_NP */
-
-/* Define if you have the pthread_init function.  */
-/* #undef HAVE_PTHREAD_INIT */
-
-/* Define if you have the pthread_rwlock_rdlock function.  */
-/* #undef HAVE_PTHREAD_RWLOCK_RDLOCK */
-
-/* Define if you have the pthread_setprio function.  */
-#define HAVE_PTHREAD_SETPRIO 1
-
-/* Define if you have the pthread_setprio_np function.	*/
-/* #undef HAVE_PTHREAD_SETPRIO_NP */
-
-/* Define if you have the pthread_setschedparam function.  */
-/* #undef HAVE_PTHREAD_SETSCHEDPARAM */
-
-/* Define if you have the pthread_sigmask function.  */
-#define HAVE_PTHREAD_SIGMASK 1
-
-/* Define if you have the putenv function.  */
-#define HAVE_PUTENV 1
-
-/* Define if you have the readlink function.  */
-/* #undef HAVE_READLINK */
-
-/* Define if you have the realpath function.  */
-/* #undef HAVE_REALPATH */
-
-/* Define if you have the rename function.  */
-#define HAVE_RENAME 1
-
-/* Define if you have the rint function.  */
-#define HAVE_RINT 1
-
-/* Define if you have the rwlock_init function.  */
-/* #undef HAVE_RWLOCK_INIT */
-
-/* Define if you have the select function.  */
-#define HAVE_SELECT 1
-
-/* Define if you have the setenv function.  */
-/* #undef HAVE_SETENV */
-
-/* Define if you have the setlocale function.  */
-#define HAVE_SETLOCALE 1
-
-/* Define if you have the setupterm function.  */
-/* #undef HAVE_SETUPTERM */
-
-/* Define if you have the sighold function.  */
-/* #undef HAVE_SIGHOLD */
-
-/* Define if you have the sigset function.  */
-/* #undef HAVE_SIGSET */
-
-/* Define if you have the sigthreadmask function.  */
-/* #undef HAVE_SIGTHREADMASK */
-
-/* Define if you have the snprintf function.  */
-/* #define HAVE_SNPRINTF 1 */
-
-/* Define if you have the socket function.  */
-#define HAVE_SOCKET 1
-
-/* Define if you have the stpcpy function.  */
-/* #undef HAVE_STPCPY */
-
-/* Define if you have the strcasecmp function.	*/
-/* #undef HAVE_STRCASECMP */
-
-/* Define if you have the strcoll function.  */
-#define HAVE_STRCOLL 1
-
-/* Define if you have the strerror function.  */
-#define HAVE_STRERROR 1
-
-/* Define if you have the strnlen function.  */
-/* #undef HAVE_STRNLEN */
-
-/* Define if you have the strpbrk function.  */
-#define HAVE_STRPBRK 1
-
-/* Define if you have the strstr function.  */
-#define HAVE_STRSTR 1
-
-/* Define if you have the strtok_r function.  */
-/* #undef HAVE_STRTOK_R */
-
-/* Define if you have the strtol function.  */
-#define HAVE_STRTOL 1
-
-/* Define if you have the strtoul function.  */
-#define HAVE_STRTOUL 1
-
-/* Define if you have the strtoull function.  */
-/* #undef HAVE_STRTOULL */
-
-/* Define if you have the tcgetattr function.  */
-#define HAVE_TCGETATTR 1
-
-/* Define if you have the tell function.  */
-#define HAVE_TELL 1
-
-/* Define if you have the tempnam function.  */
-#define HAVE_TEMPNAM 1
-
-/* Define if you have the thr_setconcurrency function.	*/
-/* #undef HAVE_THR_SETCONCURRENCY */
-
-/* Define if you have the vidattr function.  */
-/* #undef HAVE_VIDATTR */
-
-/* Define if you have the <alloca.h> header file.  */
-/* #define HAVE_ALLOCA_H 1 */
-
-/* Define if you have the <arpa/inet.h> header file.  */
-#define HAVE_ARPA_INET_H 1
-
-/* Define if you have the <asm/termbits.h> header file.  */
-/* #undef HAVE_ASM_TERMBITS_H */
-
-/* Define if you have the <crypt.h> header file.  */
-#define HAVE_CRYPT_H 1
-
-/* Define if you have the <curses.h> header file.  */
-/* #define HAVE_CURSES_H 1 */
-
-/* Define if you have the <dirent.h> header file.  */
-/* #define HAVE_DIRENT_H 1 */
-
-/* Define if you have the <fcntl.h> header file.  */
-#define HAVE_FCNTL_H 1
-
-/* Define if you have the <float.h> header file.  */
-#define HAVE_FLOAT_H 1
-
-/* Define if you have the <floatingpoint.h> header file.  */
-/* #undef HAVE_FLOATINGPOINT_H */
-
-/* Define if you have the <grp.h> header file.	*/
-/* #define HAVE_GRP_H 1 */
-
-/* Define if you have the <ieeefp.h> header file.  */
-/* #undef HAVE_IEEEFP_H */
-
-/* Define if you have the <limits.h> header file.  */
-#define HAVE_LIMITS_H 1
-
-/* Define if you have the <locale.h> header file.  */
-#define HAVE_LOCALE_H 1
-
-/* Define if you have the <memory.h> header file.  */
-#define HAVE_MEMORY_H 1
-
-/* Define if you have the <ndir.h> header file.  */
-/* #undef HAVE_NDIR_H */
-
-/* Define if you have the <netinet/in.h> header file.  */
-#define HAVE_NETINET_IN_H 1
-
-/* Define if you have the <paths.h> header file.  */
-/* #undef HAVE_PATHS_H */
-
-/* Define if you have the <pwd.h> header file.	*/
-/* #define HAVE_PWD_H 1 */
-
-/* Define if you have the <sched.h> header file.  */
-/* #undef HAVE_SCHED_H */
-
-/* Define if you have the <select.h> header file.  */
-/* #undef HAVE_SELECT_H */
-
-/* Define if you have the <stdarg.h> header file.  */
-#define HAVE_STDARG_H 1
-
-/* Define if you have the <stddef.h> header file.  */
-#define HAVE_STDDEF_H 1
-
-/* Define if you have the <stdlib.h> header file.  */
-#define HAVE_STDLIB_H 1
-
-/* Define if you have the <string.h> header file.  */
-#define HAVE_STRING_H 1
-
-/* Define if you have the <strings.h> header file.  */
-/* #define HAVE_STRINGS_H 1 */
-
-/* Define if you have the <synch.h> header file.  */
-/* #undef HAVE_SYNCH_H */
-
-/* Define if you have the <sys/dir.h> header file.  */
-/* #define HAVE_SYS_DIR_H 1 */
-
-/* Define if you have the <sys/file.h> header file.  */
-/* #define HAVE_SYS_FILE_H 1 */
-
-/* Define if you have the <sys/ioctl.h> header file.  */
-#define HAVE_SYS_IOCTL_H 1
-
-/* Define if you have the <sys/mman.h> header file.  */
-/* #undef HAVE_SYS_MMAN_H */
-
-/* Define if you have the <sys/ndir.h> header file.  */
-/* #undef HAVE_SYS_NDIR_H */
-
-/* Define if you have the <sys/pte.h> header file.  */
-/* #undef HAVE_SYS_PTE_H */
-
-/* Define if you have the <sys/ptem.h> header file.  */
-/* #undef HAVE_SYS_PTEM_H */
-
-/* Define if you have the <sys/select.h> header file.  */
-#define HAVE_SYS_SELECT_H 1
-
-/* Define if you have the <sys/socket.h> header file.  */
-#define HAVE_SYS_SOCKET_H 1
-
-/* Define if you have the <sys/stream.h> header file.  */
-/* #undef HAVE_SYS_STREAM_H */
-
-/* Define if you have the <sys/timeb.h> header file.  */
-#define HAVE_SYS_TIMEB_H 1
-
-/* Define if you have the <sys/types.h> header file.  */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define if you have the <sys/un.h> header file.  */
-#define HAVE_SYS_UN_H 1
-
-/* Define if you have the <sys/utime.h> header file.  */
-#define HAVE_SYS_UTIME_H 1
-
-/* Define if you have the <sys/vadvise.h> header file.	*/
-/* #undef HAVE_SYS_VADVISE_H */
-
-/* Define if you have the <sys/wait.h> header file.  */
-/* #define HAVE_SYS_WAIT_H 1 */
-
-/* Define if you have the <term.h> header file.  */
-/* #undef HAVE_TERM_H */
-
-/* Define if you have the <termbits.h> header file.  */
-/* #undef HAVE_TERMBITS_H */
-
-/* Define if you have the <termcap.h> header file.  */
-/* #define HAVE_TERMCAP_H 1 */
-
-/* Define if you have the <termio.h> header file.  */
-/* /#define HAVE_TERMIO_H 1 */
-
-/* Define if you have the <termios.h> header file.  */
-/* #define HAVE_TERMIOS_H 1 */
-
-/* Define if you have the <unistd.h> header file.  */
-#define HAVE_UNISTD_H 1
-
-/* Define if you have the <utime.h> header file.  */
-#define HAVE_UTIME_H 1
-
-/* Define if you have the <varargs.h> header file.  */
-#define HAVE_VARARGS_H 1
-
-/* Define if you have the bind library (-lbind).  */
-/* #undef HAVE_LIBBIND */
-
-/* Define if you have the c_r library (-lc_r).	*/
-/* #undef HAVE_LIBC_R */
-
-/* Define if you have the compat library (-lcompat).  */
-/* #undef HAVE_LIBCOMPAT */
-
-/* Define if you have the crypt library (-lcrypt).  */
-#define HAVE_LIBCRYPT 1
-
-/* Define if you have the dl library (-ldl).  */
-#define HAVE_LIBDL 1
-
-/* Define if you have the gen library (-lgen).	*/
-/* #undef HAVE_LIBGEN */
-
-/* Define if you have the m library (-lm).  */
-#define HAVE_LIBM 1
-
-/* Define if you have the nsl library (-lnsl).	*/
-/* #undef HAVE_LIBNSL */
-
-/* Define if you have the nsl_r library (-lnsl_r).  */
-/* #undef HAVE_LIBNSL_R */
-
-/* Define if you have the pthread library (-lpthread).	*/
-/* #undef HAVE_LIBPTHREAD */
-
-/* Define if you have the socket library (-lsocket).  */
-/* #undef HAVE_LIBSOCKET */
-
-/* Number of bits in a file offset, on hosts where this is settable. */
-/* #undef _FILE_OFFSET_BITS */
-
-/* Define to make fseeko etc. visible, on some hosts. */
-/* #undef _LARGEFILE_SOURCE */
-
-/* Define for large files, on AIX-style hosts. */
-/* #undef _LARGE_FILES */
-
-#endif /* __CONFIG_OS2_H__ */
diff --git a/src/terralib/drivers/MySQL/include/config-win.h b/src/terralib/drivers/MySQL/include/config-win.h
deleted file mode 100644
index d28bb25..0000000
--- a/src/terralib/drivers/MySQL/include/config-win.h
+++ /dev/null
@@ -1,396 +0,0 @@
-/* Copyright (C) 2000 MySQL AB
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
-
-/* Defines for Win32 to make it compatible for MySQL */
-
-#ifdef __WIN2000__
-/* We have to do this define before including windows.h to get the AWE API
-functions */
-#define _WIN32_WINNT     0x0500
-#endif
-
-#include <sys/locking.h>
-#include <windows.h>
-#include <math.h>			/* Because of rint() */
-#include <fcntl.h>
-#include <io.h>
-#include <malloc.h>
-
-#define HAVE_SMEM 1
-
-#if defined(__NT__)
-#define SYSTEM_TYPE	"NT"
-#elif defined(__WIN2000__)
-#define SYSTEM_TYPE	"WIN2000"
-#else
-#define SYSTEM_TYPE	"Win95/Win98"
-#endif
-
-#if defined(_WIN64) || defined(WIN64)
-#define MACHINE_TYPE	"ia64"		/* Define to machine type name */
-#else
-#define MACHINE_TYPE	"i32"		/* Define to machine type name */
-#ifndef _WIN32
-#define _WIN32				/* Compatible with old source */
-#endif
-#ifndef __WIN32__
-#define __WIN32__
-#endif
-#endif /* _WIN64 */
-#ifndef __WIN__
-#define __WIN__			      /* To make it easier in VC++ */
-#endif
-
-/* File and lock constants */
-#define O_SHARE		0x1000		/* Open file in sharing mode */
-#ifdef __BORLANDC__
-#define F_RDLCK		LK_NBLCK	/* read lock */
-#define F_WRLCK		LK_NBRLCK	/* write lock */
-#define F_UNLCK		LK_UNLCK	/* remove lock(s) */
-#else
-#define F_RDLCK		_LK_NBLCK	/* read lock */
-#define F_WRLCK		_LK_NBRLCK	/* write lock */
-#define F_UNLCK		_LK_UNLCK	/* remove lock(s) */
-#endif
-
-#define F_EXCLUSIVE	1		/* We have only exclusive locking */
-#define F_TO_EOF	(INT_MAX32/2)	/* size for lock of all file */
-#define F_OK		0		/* parameter to access() */
-
-#define S_IROTH		S_IREAD		/* for my_lib */
-
-#ifdef __BORLANDC__
-#define FILE_BINARY	O_BINARY	/* my_fopen in binary mode */
-#define O_TEMPORARY	0
-#define O_SHORT_LIVED	0
-#define SH_DENYNO	_SH_DENYNO
-#else
-#define O_BINARY	_O_BINARY	/* compability with MSDOS */
-#define FILE_BINARY	_O_BINARY	/* my_fopen in binary mode */
-#define O_TEMPORARY	_O_TEMPORARY
-#define O_SHORT_LIVED	_O_SHORT_LIVED
-#define SH_DENYNO	_SH_DENYNO
-#endif
-#define NO_OPEN_3			/* For my_create() */
-
-#define SIGQUIT		SIGTERM		/* No SIGQUIT */
-
-#undef _REENTRANT			/* Crashes something for win32 */
-#undef SAFE_MUTEX			/* Can't be used on windows */
-
-#define LONGLONG_MIN	((__int64) 0x8000000000000000)
-#define LONGLONG_MAX	((__int64) 0x7FFFFFFFFFFFFFFF)
-#define ULONGLONG_MAX	((unsigned __int64) 0xFFFFFFFFFFFFFFFF)
-#define LL(A)		((__int64) A)
-#define ULL(A)		((unsigned __int64) A)
-
-/* Type information */
-
-typedef unsigned short	ushort;
-typedef unsigned int	uint;
-typedef unsigned __int64 ulonglong;	/* Microsofts 64 bit types */
-typedef __int64 longlong;
-typedef int sigset_t;
-#define longlong_defined
-/* off_t should not be __int64 because of conflicts in header files;
-   Use my_off_t or os_off_t instead */
-typedef long off_t;
-typedef __int64 os_off_t;
-#ifdef _WIN64
-typedef UINT_PTR rf_SetTimer;
-#else
-typedef unsigned int size_t;
-typedef uint rf_SetTimer;
-#endif
-
-#define Socket_defined
-#define my_socket SOCKET
-#define bool BOOL
-#define SIGPIPE SIGINT
-#define RETQSORTTYPE void
-#define QSORT_TYPE_IS_VOID
-#define RETSIGTYPE void
-#define SOCKET_SIZE_TYPE int
-#define my_socket_defined
-#define bool_defined
-#define byte_defined
-#define HUGE_PTR
-#define STDCALL __stdcall	    /* Used by libmysql.dll */
-#define isnan(X) _isnan(X)
-#define finite(X) _finite(X)
-
-#ifndef UNDEF_THREAD_HACK
-#define THREAD
-#endif
-#define VOID_SIGHANDLER
-#define SIZEOF_CHAR		1
-#define SIZEOF_LONG		4
-#define SIZEOF_LONG_LONG	8
-#define SIZEOF_OFF_T		8
-#ifdef _WIN64
-#define SIZEOF_CHARP		8
-#else
-#define SIZEOF_CHARP		4
-#endif
-#define HAVE_BROKEN_NETINET_INCLUDES
-#ifdef __NT__
-#define HAVE_NAMED_PIPE			/* We can only create pipes on NT */
-#endif
-
-/* ERROR is defined in wingdi.h */
-#undef ERROR
-
-/* We need to close files to break connections on shutdown */
-#ifndef SIGNAL_WITH_VIO_CLOSE
-#define SIGNAL_WITH_VIO_CLOSE
-#endif
-
-/* Use all character sets in MySQL */
-#define USE_MB 1
-#define USE_MB_IDENT 1
-#define USE_STRCOLL 1
-
-/* All windows servers should support .sym files */
-#undef USE_SYMDIR
-#define USE_SYMDIR
-
-/* If LOAD DATA LOCAL INFILE should be enabled by default */
-#define ENABLED_LOCAL_INFILE 1
-
-/* Convert some simple functions to Posix */
-
-#define sigset(A,B) signal((A),(B))
-#define finite(A) _finite(A)
-#define sleep(A)  Sleep((A)*1000)
-
-#ifndef __BORLANDC__
-#define access(A,B) _access(A,B)
-#endif
-
-#if !defined(__cplusplus)
-#define inline __inline
-#endif /* __cplusplus */
-
-inline double rint(double nr)
-{
-  double f = floor(nr);
-  double c = ceil(nr);
-  return (((c-nr) >= (nr-f)) ? f :c);
-}
-
-#ifdef _WIN64
-#define ulonglong2double(A) ((double) (ulonglong) (A))
-#define my_off_t2double(A)  ((double) (my_off_t) (A))
-
-#else
-inline double ulonglong2double(ulonglong value)
-{
-  longlong nr=(longlong) value;
-  if (nr >= 0)
-    return (double) nr;
-  return (18446744073709551616.0 + (double) nr);
-}
-#define my_off_t2double(A) ulonglong2double(A)
-#endif /* _WIN64 */
-
-#if SIZEOF_OFF_T > 4
-#define lseek(A,B,C) _lseeki64((A),(longlong) (B),(C))
-#define tell(A) _telli64(A)
-#endif
-
-#define set_timespec(ABSTIME,SEC) { (ABSTIME).tv_sec=time((time_t*)0) + (time_t) (SEC); (ABSTIME).tv_nsec=0; }
-
-#define STACK_DIRECTION -1
-
-/* Optimized store functions for Intel x86 */
-
-#ifndef _WIN64
-#define sint2korr(A)	(*((int16 *) (A)))
-#define sint3korr(A)	((int32) ((((uchar) (A)[2]) & 128) ? \
-				  (((uint32) 255L << 24) | \
-				   (((uint32) (uchar) (A)[2]) << 16) |\
-				   (((uint32) (uchar) (A)[1]) << 8) | \
-				   ((uint32) (uchar) (A)[0])) : \
-				  (((uint32) (uchar) (A)[2]) << 16) |\
-				  (((uint32) (uchar) (A)[1]) << 8) | \
-				  ((uint32) (uchar) (A)[0])))
-#define sint4korr(A)	(*((long *) (A)))
-#define uint2korr(A)	(*((uint16 *) (A)))
-/*
-   ATTENTION !
-   
-    Please, note, uint3korr reads 4 bytes (not 3) !
-    It means, that you have to provide enough allocated space !
-*/
-#define uint3korr(A)	(long) (*((unsigned int *) (A)) & 0xFFFFFF)
-#define uint4korr(A)	(*((unsigned long *) (A)))
-#define uint5korr(A)	((ulonglong)(((uint32) ((uchar) (A)[0])) +\
-				    (((uint32) ((uchar) (A)[1])) << 8) +\
-				    (((uint32) ((uchar) (A)[2])) << 16) +\
-				    (((uint32) ((uchar) (A)[3])) << 24)) +\
-				    (((ulonglong) ((uchar) (A)[4])) << 32))
-#define uint8korr(A)	(*((ulonglong *) (A)))
-#define sint8korr(A)	(*((longlong *) (A)))
-#define int2store(T,A)	*((uint16*) (T))= (uint16) (A)
-#define int3store(T,A)		{ *(T)=  (uchar) ((A));\
-				  *(T+1)=(uchar) (((uint) (A) >> 8));\
-				  *(T+2)=(uchar) (((A) >> 16)); }
-#define int4store(T,A)	*((long *) (T))= (long) (A)
-#define int5store(T,A)	{ *(T)= (uchar)((A));\
-			  *((T)+1)=(uchar) (((A) >> 8));\
-			  *((T)+2)=(uchar) (((A) >> 16));\
-			  *((T)+3)=(uchar) (((A) >> 24)); \
-			  *((T)+4)=(uchar) (((A) >> 32)); }
-#define int8store(T,A)	*((ulonglong *) (T))= (ulonglong) (A)
-
-#define doubleget(V,M)	{ *((long *) &V) = *((long*) M); \
-			  *(((long *) &V)+1) = *(((long*) M)+1); }
-#define doublestore(T,V) { *((long *) T) = *((long*) &V); \
-			   *(((long *) T)+1) = *(((long*) &V)+1); }
-#define float4get(V,M) { *((long *) &(V)) = *((long*) (M)); }
-#define floatstore(T,V) memcpy((byte*)(T), (byte*)(&V), sizeof(float))
-#define float8get(V,M) doubleget((V),(M))
-#define float4store(V,M) memcpy((byte*) V,(byte*) (&M),sizeof(float))
-#define float8store(V,M) doublestore((V),(M))
-#endif /* _WIN64 */
-
-#define HAVE_PERROR
-#define HAVE_VFPRINT
-#define HAVE_RENAME		/* Have rename() as function */
-#define HAVE_BINARY_STREAMS	/* Have "b" flag in streams */
-#define HAVE_LONG_JMP		/* Have long jump function */
-#define HAVE_LOCKING		/* have locking() call */
-#define HAVE_ERRNO_AS_DEFINE	/* errno is a define */
-#define HAVE_STDLIB		/* everything is include in this file */
-#define HAVE_MEMCPY
-#define HAVE_MEMMOVE
-#define HAVE_GETCWD
-#define HAVE_TELL
-#define HAVE_TZNAME
-#define HAVE_PUTENV
-#define HAVE_SELECT
-#define HAVE_SETLOCALE
-#define HAVE_SOCKET		/* Giangi */
-#define HAVE_FLOAT_H
-#define HAVE_LIMITS_H
-#define HAVE_STDDEF_H
-#define HAVE_RINT		/* defined in this file */
-#define NO_FCNTL_NONBLOCK	/* No FCNTL */
-#define HAVE_ALLOCA
-#define HAVE_STRPBRK
-#define HAVE_STRSTR
-#define HAVE_COMPRESS
-#define HAVE_CREATESEMAPHORE
-#define HAVE_ISNAN
-#define HAVE_FINITE
-#define HAVE_QUERY_CACHE
-#define SPRINTF_RETURNS_INT
-#define HAVE_SETFILEPOINTER
-#define HAVE_VIO
-
-#ifdef NOT_USED
-#define HAVE_SNPRINTF		/* Gave link error */
-#define _snprintf snprintf
-#endif
-
-#ifdef _MSC_VER
-#define HAVE_LDIV		/* The optimizer breaks in zortech for ldiv */
-#define HAVE_ANSI_INCLUDE
-#define HAVE_SYS_UTIME_H
-#define HAVE_STRTOUL
-#endif
-#define my_reinterpret_cast(A) reinterpret_cast <A>
-#define my_const_cast(A) const_cast<A>
-
-
-/* MYSQL OPTIONS */
-
-#ifdef _CUSTOMCONFIG_
-#include <custom_conf.h>
-#else
-#define DEFAULT_MYSQL_HOME	"c:\\mysql"
-#define PACKAGE			"mysql"
-#define DEFAULT_BASEDIR		"C:\\"
-#define SHAREDIR		"share"
-#define DEFAULT_CHARSET_HOME	"C:/mysql/"
-#endif
-
-/* File name handling */
-
-#define FN_LIBCHAR	'\\'
-#define FN_ROOTDIR	"\\"
-#define FN_NETWORK_DRIVES	/* Uses \\ to indicate network drives */
-#define FN_NO_CASE_SENCE	/* Files are not case-sensitive */
-#define OS_FILE_LIMIT	2048
-
-#define DO_NOT_REMOVE_THREAD_WRAPPERS
-#define thread_safe_increment(V,L) InterlockedIncrement((long*) &(V))
-/* The following is only used for statistics, so it should be good enough */
-#ifdef __NT__  /* This should also work on Win98 but .. */
-#define thread_safe_add(V,C,L) InterlockedExchangeAdd((long*) &(V),(C))
-#define thread_safe_sub(V,C,L) InterlockedExchangeAdd((long*) &(V),-(long) (C))
-#define statistic_add(V,C,L) thread_safe_add((V),(C),(L))
-#else
-#define thread_safe_add(V,C,L) \
-	pthread_mutex_lock((L)); (V)+=(C); pthread_mutex_unlock((L));
-#define thread_safe_sub(V,C,L) \
-	pthread_mutex_lock((L)); (V)-=(C); pthread_mutex_unlock((L));
-#define statistic_add(V,C,L)	 (V)+=(C)
-#endif
-#define statistic_increment(V,L) thread_safe_increment((V),(L))
-
-#define shared_memory_buffer_length 16000
-#define default_shared_memory_base_name "MYSQL"
-#define MYSQL_DEFAULT_CHARSET_NAME "latin1"
-#define MYSQL_DEFAULT_COLLATION_NAME "latin1_swedish_ci"
-
-#define HAVE_SPATIAL 1
-#define HAVE_RTREE_KEYS 1
-
-/* Define charsets you want */
-/* #undef HAVE_CHARSET_armscii8 */
-/* #undef HAVE_CHARSET_ascii */
-#define HAVE_CHARSET_big5 1
-#define HAVE_CHARSET_cp1250 1
-/* #undef HAVE_CHARSET_cp1251 */
-/* #undef HAVE_CHARSET_cp1256 */
-/* #undef HAVE_CHARSET_cp1257 */
-/* #undef HAVE_CHARSET_cp850 */
-/* #undef HAVE_CHARSET_cp852 */
-/* #undef HAVE_CHARSET_cp866 */
-/* #undef HAVE_CHARSET_dec8 */
-#define HAVE_CHARSET_euckr 1
-#define HAVE_CHARSET_gb2312 1
-#define HAVE_CHARSET_gbk 1
-/* #undef HAVE_CHARSET_greek */
-/* #undef HAVE_CHARSET_hebrew */
-/* #undef HAVE_CHARSET_hp8 */
-/* #undef HAVE_CHARSET_keybcs2 */
-/* #undef HAVE_CHARSET_koi8r */
-/* #undef HAVE_CHARSET_koi8u */
-#define HAVE_CHARSET_latin1 1
-#define HAVE_CHARSET_latin2 1
-/* #undef HAVE_CHARSET_latin5 */
-/* #undef HAVE_CHARSET_latin7 */
-/* #undef HAVE_CHARSET_macce */
-/* #undef HAVE_CHARSET_macroman */
-#define HAVE_CHARSET_sjis 1
-/* #undef HAVE_CHARSET_swe7 */
-#define HAVE_CHARSET_tis620 1
-#define HAVE_CHARSET_ucs2 1
-#define HAVE_CHARSET_ujis 1
-#define HAVE_CHARSET_utf8 1
-
diff --git a/src/terralib/drivers/MySQL/include/errmsg.h b/src/terralib/drivers/MySQL/include/errmsg.h
deleted file mode 100644
index 6115b24..0000000
--- a/src/terralib/drivers/MySQL/include/errmsg.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/* Copyright (C) 2000 MySQL AB
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
-
-/* Error messages for MySQL clients */
-/* (Error messages for the daemon are in share/language/errmsg.sys) */
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-void	init_client_errs(void);
-extern const char *client_errors[];	/* Error messages */
-#ifdef	__cplusplus
-}
-#endif
-
-#define CR_MIN_ERROR		2000	/* For easier client code */
-#define CR_MAX_ERROR		2999
-#if defined(OS2) && defined(MYSQL_SERVER)
-#define CER(X) client_errors[(X)-CR_MIN_ERROR]
-#elif !defined(ER)
-#define ER(X) client_errors[(X)-CR_MIN_ERROR]
-#endif
-#define CLIENT_ERRMAP		2	/* Errormap used by my_error() */
-
-#define CR_UNKNOWN_ERROR	2000
-#define CR_SOCKET_CREATE_ERROR	2001
-#define CR_CONNECTION_ERROR	2002
-#define CR_CONN_HOST_ERROR	2003
-#define CR_IPSOCK_ERROR		2004
-#define CR_UNKNOWN_HOST		2005
-#define CR_SERVER_GONE_ERROR	2006
-#define CR_VERSION_ERROR	2007
-#define CR_OUT_OF_MEMORY	2008
-#define CR_WRONG_HOST_INFO	2009
-#define CR_LOCALHOST_CONNECTION 2010
-#define CR_TCP_CONNECTION	2011
-#define CR_SERVER_HANDSHAKE_ERR 2012
-#define CR_SERVER_LOST		2013
-#define CR_COMMANDS_OUT_OF_SYNC 2014
-#define CR_NAMEDPIPE_CONNECTION 2015
-#define CR_NAMEDPIPEWAIT_ERROR  2016
-#define CR_NAMEDPIPEOPEN_ERROR  2017
-#define CR_NAMEDPIPESETSTATE_ERROR 2018
-#define CR_CANT_READ_CHARSET	2019
-#define CR_NET_PACKET_TOO_LARGE 2020
-#define CR_EMBEDDED_CONNECTION	2021
-#define CR_PROBE_SLAVE_STATUS   2022
-#define CR_PROBE_SLAVE_HOSTS    2023
-#define CR_PROBE_SLAVE_CONNECT  2024
-#define CR_PROBE_MASTER_CONNECT 2025
-#define CR_SSL_CONNECTION_ERROR 2026
-#define CR_MALFORMED_PACKET     2027
-#define CR_WRONG_LICENSE	2028
-
-/* new 4.1 error codes */
-#define CR_NULL_POINTER		2029
-#define CR_NO_PREPARE_STMT	2030
-#define CR_PARAMS_NOT_BOUND	2031
-#define CR_DATA_TRUNCATED	2032
-#define CR_NO_PARAMETERS_EXISTS 2033
-#define CR_INVALID_PARAMETER_NO 2034
-#define CR_INVALID_BUFFER_USE	2035
-#define CR_UNSUPPORTED_PARAM_TYPE 2036
-
-#define CR_SHARED_MEMORY_CONNECTION             2037
-#define CR_SHARED_MEMORY_CONNECT_REQUEST_ERROR  2038
-#define CR_SHARED_MEMORY_CONNECT_ANSWER_ERROR   2039
-#define CR_SHARED_MEMORY_CONNECT_FILE_MAP_ERROR 2040
-#define CR_SHARED_MEMORY_CONNECT_MAP_ERROR      2041
-#define CR_SHARED_MEMORY_FILE_MAP_ERROR         2042
-#define CR_SHARED_MEMORY_MAP_ERROR              2043
-#define CR_SHARED_MEMORY_EVENT_ERROR     	2044
-#define CR_SHARED_MEMORY_CONNECT_ABANDONED_ERROR 2045
-#define CR_SHARED_MEMORY_CONNECT_SET_ERROR      2046
-#define CR_CONN_UNKNOW_PROTOCOL 		2047
-#define CR_INVALID_CONN_HANDLE			2048
-#define CR_SECURE_AUTH                          2049
-#define CR_FETCH_CANCELED                       2050
-#define CR_NO_DATA                              2051
diff --git a/src/terralib/drivers/MySQL/include/libmysql.def b/src/terralib/drivers/MySQL/include/libmysql.def
deleted file mode 100644
index bc91e90..0000000
--- a/src/terralib/drivers/MySQL/include/libmysql.def
+++ /dev/null
@@ -1,147 +0,0 @@
-LIBRARY		LIBMYSQL
-DESCRIPTION	'MySQL 4.1 Client Library'
-VERSION		6.0
-EXPORTS
-	_dig_vec_lower
-	_dig_vec_upper
-	bmove_upp
-	delete_dynamic
-	free_defaults
-	getopt_compare_strings
-	getopt_ull_limit_value
-	handle_options
-	init_dynamic_array
-	insert_dynamic
-	int2str
-	is_prefix
-	list_add
-	list_delete
-	load_defaults
-	my_end
-	my_getopt_print_errors
-	my_init
-	my_malloc
-	my_memdup
-	my_no_flags_free
-	my_path
-	mysql_get_parameters
-	my_print_help
-	my_print_variables
-	my_realloc
-	my_strdup
-	mysql_thread_end
-	mysql_thread_init
-	myodbc_remove_escape
-	mysql_affected_rows
-	mysql_autocommit
-	mysql_stmt_bind_param
-	mysql_stmt_bind_result
-	mysql_change_user
-	mysql_character_set_name
-	mysql_close
-	mysql_commit
-	mysql_data_seek
-	mysql_debug
-	mysql_dump_debug_info
-	mysql_eof
-	mysql_errno
-	mysql_error
-	mysql_escape_string
-	mysql_stmt_execute
-	mysql_stmt_fetch
-	mysql_stmt_fetch_column
-	mysql_fetch_field
-	mysql_fetch_field_direct
-	mysql_fetch_fields
-	mysql_fetch_lengths
-	mysql_fetch_row
-	mysql_field_count
-	mysql_field_seek
-	mysql_field_tell
-	mysql_free_result
-	mysql_get_client_info
-	mysql_get_host_info
-	mysql_get_proto_info
-	mysql_get_server_info
-	mysql_get_client_version
-	mysql_info
-	mysql_init
-	mysql_insert_id
-	mysql_kill
-	mysql_set_server_option
-	mysql_list_dbs
-	mysql_list_fields
-	mysql_list_processes
-	mysql_list_tables
-	mysql_more_results
-	mysql_next_result
-	mysql_num_fields
-	mysql_num_rows
-	mysql_odbc_escape_string
-	mysql_options
-	mysql_stmt_param_count
-	mysql_stmt_param_metadata
-	mysql_ping
-	mysql_stmt_result_metadata
-	mysql_query
-	mysql_read_query_result
-	mysql_real_connect
-	mysql_real_escape_string
-	mysql_real_query
-	mysql_refresh
-	mysql_rollback
-	mysql_row_seek
-	mysql_row_tell
-	mysql_select_db
-	mysql_stmt_send_long_data
-	mysql_send_query
-	mysql_shutdown
-	mysql_ssl_set
-	mysql_stat
-	mysql_stmt_affected_rows
-	mysql_stmt_close
-	mysql_stmt_reset
-	mysql_stmt_data_seek
-	mysql_stmt_errno
-	mysql_stmt_error
-	mysql_stmt_free_result
-	mysql_stmt_num_rows
-	mysql_stmt_row_seek
-	mysql_stmt_row_tell
-	mysql_stmt_store_result
-	mysql_store_result
-	mysql_thread_id
-	mysql_thread_safe
-	mysql_use_result
-	mysql_warning_count
-	mysql_stmt_sqlstate
-	mysql_sqlstate
-	mysql_get_server_version
-	set_dynamic
-	strcend
-	strcont
-	strdup_root
-	strfill
-	strinstr
-	strmake
-	strmov
-	strxmov
-	mysql_stmt_prepare
-	mysql_stmt_init
-	mysql_stmt_insert_id
-	mysql_stmt_attr_get
-	mysql_stmt_attr_set
-	mysql_stmt_field_count
-	client_errors
-	mysql_set_local_infile_default
-	mysql_set_local_infile_handler
-	mysql_disable_reads_from_master
-	mysql_disable_rpl_parse
-	mysql_enable_reads_from_master
-	mysql_enable_rpl_parse
-	mysql_master_query
-	mysql_rpl_parse_enabled
-	mysql_rpl_probe
-	mysql_rpl_query_type
-	mysql_slave_query
-	mysql_embedded
diff --git a/src/terralib/drivers/MySQL/include/libmysqld.def b/src/terralib/drivers/MySQL/include/libmysqld.def
deleted file mode 100644
index 14c6725..0000000
--- a/src/terralib/drivers/MySQL/include/libmysqld.def
+++ /dev/null
@@ -1,159 +0,0 @@
-LIBRARY		LIBMYSQLD
-DESCRIPTION	'MySQL 4.1 Embedded Server Library'
-VERSION		4.1
-EXPORTS
-	_dig_vec_upper
-	_dig_vec_lower
-	bmove_upp
-	delete_dynamic
-	free_defaults
-	getopt_compare_strings
-	getopt_ull_limit_value
-	handle_options
-	init_dynamic_array
-	insert_dynamic
-	int2str
-	is_prefix
-	list_add
-	list_delete
-	load_defaults
-	max_allowed_packet
-	my_end
-	my_getopt_print_errors
-	my_init
-	my_malloc
-	my_memdup
-	my_no_flags_free
-	my_path
-	my_print_help
-	my_print_variables
-	my_realloc
-	my_strdup
-	my_thread_end
-	my_thread_init
-	myodbc_remove_escape
-	mysql_affected_rows
-	mysql_autocommit
-	mysql_change_user
-	mysql_character_set_name
-	mysql_close
-	mysql_commit
-	mysql_data_seek
-	mysql_debug
-	mysql_dump_debug_info
-	mysql_eof
-	mysql_errno
-	mysql_error
-	mysql_escape_string
-	mysql_fetch_field
-	mysql_fetch_field_direct
-	mysql_fetch_fields
-	mysql_fetch_lengths
-	mysql_fetch_row
-	mysql_field_count
-	mysql_field_seek
-	mysql_field_tell
-	mysql_free_result
-	mysql_get_client_info
-	mysql_get_host_info
-	mysql_get_proto_info
-	mysql_get_server_info
-	mysql_info
-	mysql_init
-	mysql_insert_id
-	mysql_kill
-	mysql_list_dbs
-	mysql_list_fields
-	mysql_list_processes
-	mysql_list_tables
-	mysql_more_results
-	mysql_next_result
-	mysql_num_fields
-	mysql_num_rows
-	mysql_odbc_escape_string
-	mysql_options
-	mysql_ping
-	mysql_query
-	mysql_read_query_result
-	mysql_real_connect
-	mysql_real_escape_string
-	mysql_real_query
-	mysql_refresh
-	mysql_rollback
-	mysql_row_seek
-	mysql_row_tell
-	mysql_select_db
-	mysql_send_query
-	mysql_shutdown
-	mysql_ssl_set
-	mysql_stat
-	mysql_store_result
-	mysql_sqlstate
-	mysql_thread_id
-	mysql_thread_safe
-	mysql_use_result
-	mysql_warning_count
-	set_dynamic
-	strcend
-	strcont
-	strdup_root
-	strfill
-	strinstr
-	strmake
-	strmov
-	strxmov
-	mysql_server_end
-	mysql_server_init
-	get_tty_password
-	sql_protocol_typelib
-	mysql_get_server_version
-	mysql_sqlstate
-	charsets_dir
-	disabled_my_option
-	my_charset_latin1
-	init_alloc_root
-	my_progname
-	get_charset_by_csname
-	print_defaults
-	find_type
-	strxnmov
-	strend
-	my_fopen
-	my_fclose
-	unpack_filename
-	str2int
-	int10_to_str
-	longlong10_to_str
-	my_snprintf_8bit
-	alloc_root
-	free_root
-	my_read
-	llstr
-	mysql_get_parameters
-	mysql_stmt_bind_param
-	mysql_stmt_bind_result
-	mysql_stmt_execute
-	mysql_stmt_fetch
-	mysql_stmt_fetch_column
-	mysql_stmt_param_count
-	mysql_stmt_param_metadata
-	mysql_stmt_result_metadata
-	mysql_stmt_send_long_data
-	mysql_stmt_affected_rows
-	mysql_stmt_close
-	mysql_stmt_reset
-	mysql_stmt_data_seek
-	mysql_stmt_errno
-	mysql_stmt_error
-	mysql_stmt_free_result
-	mysql_stmt_num_rows
-	mysql_stmt_row_seek
-	mysql_stmt_row_tell
-	mysql_stmt_store_result
-	mysql_stmt_sqlstate
-	mysql_stmt_prepare
-	mysql_stmt_init
-	mysql_stmt_insert_id
-	mysql_stmt_attr_get
-	mysql_stmt_attr_set
-	mysql_stmt_field_count
diff --git a/src/terralib/drivers/MySQL/include/m_ctype.h b/src/terralib/drivers/MySQL/include/m_ctype.h
deleted file mode 100644
index ddc2107..0000000
--- a/src/terralib/drivers/MySQL/include/m_ctype.h
+++ /dev/null
@@ -1,450 +0,0 @@
-/* Copyright (C) 2000 MySQL AB
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
-
-/*
-  A better inplementation of the UNIX ctype(3) library.
-  Notes:   my_global.h should be included before ctype.h
-*/
-
-#ifndef _m_ctype_h
-#define _m_ctype_h
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-#define MY_CS_NAME_SIZE			32
-#define MY_CS_CTYPE_TABLE_SIZE		257
-#define MY_CS_TO_LOWER_TABLE_SIZE	256
-#define MY_CS_TO_UPPER_TABLE_SIZE	256
-#define MY_CS_SORT_ORDER_TABLE_SIZE	256
-#define MY_CS_TO_UNI_TABLE_SIZE		256
-
-#define CHARSET_DIR	"charsets/"
-
-#define my_wc_t ulong
-
-typedef struct unicase_info_st
-{
-  uint16 toupper;
-  uint16 tolower;
-  uint16 sort;
-} MY_UNICASE_INFO;
-
-#define MY_CS_ILSEQ	0
-#define MY_CS_ILUNI	0
-#define MY_CS_TOOSMALL	-1
-#define MY_CS_TOOFEW(n)	(-1-(n))
-
-#define MY_SEQ_INTTAIL	1
-#define MY_SEQ_SPACES	2
-
-        /* My charsets_list flags */
-#define MY_CS_COMPILED  1      /* compiled-in sets               */
-#define MY_CS_CONFIG    2      /* sets that have a *.conf file   */
-#define MY_CS_INDEX     4      /* sets listed in the Index file  */
-#define MY_CS_LOADED    8      /* sets that are currently loaded */
-#define MY_CS_BINSORT	16     /* if binary sort order           */
-#define MY_CS_PRIMARY	32     /* if primary collation           */
-#define MY_CS_STRNXFRM	64     /* if strnxfrm is used for sort   */
-#define MY_CS_UNICODE	128    /* is a charset is full unicode   */
-#define MY_CS_READY	256    /* if a charset is initialized    */
-#define MY_CS_AVAILABLE	512    /* If either compiled-in or loaded*/
-
-#define MY_CHARSET_UNDEFINED 0
-
-
-typedef struct my_uni_idx_st
-{
-  uint16 from;
-  uint16 to;
-  uchar  *tab;
-} MY_UNI_IDX;
-
-typedef struct
-{
-  uint beg;
-  uint end;
-  uint mblen;
-} my_match_t;
-
-enum my_lex_states
-{
-  MY_LEX_START, MY_LEX_CHAR, MY_LEX_IDENT, 
-  MY_LEX_IDENT_SEP, MY_LEX_IDENT_START,
-  MY_LEX_REAL, MY_LEX_HEX_NUMBER,
-  MY_LEX_CMP_OP, MY_LEX_LONG_CMP_OP, MY_LEX_STRING, MY_LEX_COMMENT, MY_LEX_END,
-  MY_LEX_OPERATOR_OR_IDENT, MY_LEX_NUMBER_IDENT, MY_LEX_INT_OR_REAL,
-  MY_LEX_REAL_OR_POINT, MY_LEX_BOOL, MY_LEX_EOL, MY_LEX_ESCAPE, 
-  MY_LEX_LONG_COMMENT, MY_LEX_END_LONG_COMMENT, MY_LEX_SEMICOLON, 
-  MY_LEX_SET_VAR, MY_LEX_USER_END, MY_LEX_HOSTNAME, MY_LEX_SKIP, 
-  MY_LEX_USER_VARIABLE_DELIMITER, MY_LEX_SYSTEM_VAR,
-  MY_LEX_IDENT_OR_KEYWORD,
-  MY_LEX_IDENT_OR_HEX, MY_LEX_IDENT_OR_BIN, MY_LEX_IDENT_OR_NCHAR,
-  MY_LEX_STRING_OR_DELIMITER
-};
-
-struct charset_info_st;
-
-typedef struct my_collation_handler_st
-{
-  my_bool (*init)(struct charset_info_st *, void *(*alloc)(uint));
-  /* Collation routines */
-  int     (*strnncoll)(struct charset_info_st *,
-		       const uchar *, uint, const uchar *, uint, my_bool);
-  int     (*strnncollsp)(struct charset_info_st *,
-		       const uchar *, uint, const uchar *, uint);
-  int     (*strnxfrm)(struct charset_info_st *,
-		      uchar *, uint, const uchar *, uint);
-  my_bool (*like_range)(struct charset_info_st *,
-			const char *s, uint s_length,
-			pchar w_prefix, pchar w_one, pchar w_many, 
-			uint res_length,
-			char *min_str, char *max_str,
-			uint *min_len, uint *max_len);
-  int     (*wildcmp)(struct charset_info_st *,
-  		     const char *str,const char *str_end,
-                     const char *wildstr,const char *wildend,
-                     int escape,int w_one, int w_many);
-
-  int  (*strcasecmp)(struct charset_info_st *, const char *, const char *);
-  
-  uint (*instr)(struct charset_info_st *,
-                const char *b, uint b_length,
-                const char *s, uint s_length,
-                my_match_t *match, uint nmatch);
-  
-  /* Hash calculation */
-  void (*hash_sort)(struct charset_info_st *cs, const uchar *key, uint len,
-		    ulong *nr1, ulong *nr2); 
-} MY_COLLATION_HANDLER;
-
-extern MY_COLLATION_HANDLER my_collation_mb_bin_handler;
-extern MY_COLLATION_HANDLER my_collation_8bit_bin_handler;
-extern MY_COLLATION_HANDLER my_collation_8bit_simple_ci_handler;
-extern MY_COLLATION_HANDLER my_collation_ucs2_uca_handler;
-
-
-typedef struct my_charset_handler_st
-{
-  my_bool (*init)(struct charset_info_st *, void *(*alloc)(uint));
-  /* Multibyte routines */
-  int     (*ismbchar)(struct charset_info_st *, const char *, const char *);
-  int     (*mbcharlen)(struct charset_info_st *, uint);
-  uint    (*numchars)(struct charset_info_st *, const char *b, const char *e);
-  uint    (*charpos)(struct charset_info_st *, const char *b, const char *e, uint pos);
-  uint    (*well_formed_len)(struct charset_info_st *,
-  			   const char *b,const char *e, uint nchars);
-  uint    (*lengthsp)(struct charset_info_st *, const char *ptr, uint length);
-  uint    (*numcells)(struct charset_info_st *, const char *b, const char *e);
-  
-  /* Unicode convertion */
-  int (*mb_wc)(struct charset_info_st *cs,my_wc_t *wc,
-	       const unsigned char *s,const unsigned char *e);
-  int (*wc_mb)(struct charset_info_st *cs,my_wc_t wc,
-	       unsigned char *s,unsigned char *e);
-  
-  /* Functions for case and sort convertion */
-  void    (*caseup_str)(struct charset_info_st *, char *);
-  void    (*casedn_str)(struct charset_info_st *, char *);
-  void    (*caseup)(struct charset_info_st *, char *, uint);
-  void    (*casedn)(struct charset_info_st *, char *, uint);
-  
-  /* Charset dependant snprintf() */
-  int  (*snprintf)(struct charset_info_st *, char *to, uint n, const char *fmt,
-		   ...);
-  int  (*long10_to_str)(struct charset_info_st *, char *to, uint n, int radix,
-			long int val);
-  int (*longlong10_to_str)(struct charset_info_st *, char *to, uint n,
-			   int radix, longlong val);
-  
-  void (*fill)(struct charset_info_st *, char *to, uint len, int fill);
-  
-  /* String-to-number convertion routines */
-  long        (*strntol)(struct charset_info_st *, const char *s, uint l,
-			 int base, char **e, int *err);
-  ulong      (*strntoul)(struct charset_info_st *, const char *s, uint l,
-			 int base, char **e, int *err);
-  longlong   (*strntoll)(struct charset_info_st *, const char *s, uint l,
-			 int base, char **e, int *err);
-  ulonglong (*strntoull)(struct charset_info_st *, const char *s, uint l,
-			 int base, char **e, int *err);
-  double      (*strntod)(struct charset_info_st *, char *s, uint l, char **e,
-			 int *err);
-  longlong (*my_strtoll10)(struct charset_info_st *cs,
-                           const char *nptr, char **endptr, int *error);
-  ulong        (*scan)(struct charset_info_st *, const char *b, const char *e,
-		       int sq);
-} MY_CHARSET_HANDLER;
-
-extern MY_CHARSET_HANDLER my_charset_8bit_handler;
-extern MY_CHARSET_HANDLER my_charset_ucs2_handler;
-
-
-typedef struct charset_info_st
-{
-  uint      number;
-  uint      primary_number;
-  uint      binary_number;
-  uint      state;
-  const char *csname;
-  const char *name;
-  const char *comment;
-  const char *tailoring;
-  uchar    *ctype;
-  uchar    *to_lower;
-  uchar    *to_upper;
-  uchar    *sort_order;
-  uint16   *contractions;
-  uint16   **sort_order_big;
-  uint16      *tab_to_uni;
-  MY_UNI_IDX  *tab_from_uni;
-  uchar     *state_map;
-  uchar     *ident_map;
-  uint      strxfrm_multiply;
-  uint      mbminlen;
-  uint      mbmaxlen;
-  uint16    min_sort_char;
-  uint16    max_sort_char; /* For LIKE optimization */
-  
-  MY_CHARSET_HANDLER *cset;
-  MY_COLLATION_HANDLER *coll;
-  
-} CHARSET_INFO;
-
-
-extern CHARSET_INFO my_charset_bin;
-extern CHARSET_INFO my_charset_big5_chinese_ci;
-extern CHARSET_INFO my_charset_big5_bin;
-extern CHARSET_INFO my_charset_euckr_korean_ci;
-extern CHARSET_INFO my_charset_euckr_bin;
-extern CHARSET_INFO my_charset_gb2312_chinese_ci;
-extern CHARSET_INFO my_charset_gb2312_bin;
-extern CHARSET_INFO my_charset_gbk_chinese_ci;
-extern CHARSET_INFO my_charset_gbk_bin;
-extern CHARSET_INFO my_charset_latin1;
-extern CHARSET_INFO my_charset_latin1_german2_ci;
-extern CHARSET_INFO my_charset_latin1_bin;
-extern CHARSET_INFO my_charset_latin2_czech_ci;
-extern CHARSET_INFO my_charset_sjis_japanese_ci;
-extern CHARSET_INFO my_charset_sjis_bin;
-extern CHARSET_INFO my_charset_tis620_thai_ci;
-extern CHARSET_INFO my_charset_tis620_bin;
-extern CHARSET_INFO my_charset_ucs2_general_ci;
-extern CHARSET_INFO my_charset_ucs2_bin;
-extern CHARSET_INFO my_charset_ucs2_general_uca;
-extern CHARSET_INFO my_charset_ujis_japanese_ci;
-extern CHARSET_INFO my_charset_ujis_bin;
-extern CHARSET_INFO my_charset_utf8_general_ci;
-extern CHARSET_INFO my_charset_utf8_bin;
-extern CHARSET_INFO my_charset_cp1250_czech_ci;
-
-/* declarations for simple charsets */
-extern int  my_strnxfrm_simple(CHARSET_INFO *, uchar *, uint, const uchar *,
-			       uint); 
-extern int  my_strnncoll_simple(CHARSET_INFO *, const uchar *, uint,
-				const uchar *, uint, my_bool);
-
-extern int  my_strnncollsp_simple(CHARSET_INFO *, const uchar *, uint,
-				const uchar *, uint);
-
-extern void my_hash_sort_simple(CHARSET_INFO *cs,
-				const uchar *key, uint len,
-				ulong *nr1, ulong *nr2); 
-
-extern uint my_lengthsp_8bit(CHARSET_INFO *cs, const char *ptr, uint length);
-
-extern uint my_instr_simple(struct charset_info_st *,
-                            const char *b, uint b_length,
-                            const char *s, uint s_length,
-                            my_match_t *match, uint nmatch);
-
-
-/* Functions for 8bit */
-extern void my_caseup_str_8bit(CHARSET_INFO *, char *);
-extern void my_casedn_str_8bit(CHARSET_INFO *, char *);
-extern void my_caseup_8bit(CHARSET_INFO *, char *, uint);
-extern void my_casedn_8bit(CHARSET_INFO *, char *, uint);
-
-extern int my_strcasecmp_8bit(CHARSET_INFO * cs, const char *, const char *);
-
-int my_mb_wc_8bit(CHARSET_INFO *cs,my_wc_t *wc, const uchar *s,const uchar *e);
-int my_wc_mb_8bit(CHARSET_INFO *cs,my_wc_t wc, uchar *s, uchar *e);
-
-ulong my_scan_8bit(CHARSET_INFO *cs, const char *b, const char *e, int sq);
-
-int my_snprintf_8bit(struct charset_info_st *, char *to, uint n,
-		     const char *fmt, ...);
-
-long        my_strntol_8bit(CHARSET_INFO *, const char *s, uint l, int base,
-			    char **e, int *err);
-ulong      my_strntoul_8bit(CHARSET_INFO *, const char *s, uint l, int base,
-			    char **e, int *err);
-longlong   my_strntoll_8bit(CHARSET_INFO *, const char *s, uint l, int base,
-			    char **e, int *err);
-ulonglong my_strntoull_8bit(CHARSET_INFO *, const char *s, uint l, int base,
-			    char **e, int *err);
-double      my_strntod_8bit(CHARSET_INFO *, char *s, uint l,char **e,
-			    int *err);
-int  my_long10_to_str_8bit(CHARSET_INFO *, char *to, uint l, int radix,
-			   long int val);
-int my_longlong10_to_str_8bit(CHARSET_INFO *, char *to, uint l, int radix,
-			      longlong val);
-
-longlong my_strtoll10_8bit(CHARSET_INFO *cs,
-                           const char *nptr, char **endptr, int *error);
-longlong my_strtoll10_ucs2(CHARSET_INFO *cs, 
-                           const char *nptr, char **endptr, int *error);
-
-void my_fill_8bit(CHARSET_INFO *cs, char* to, uint l, int fill);
-
-my_bool  my_like_range_simple(CHARSET_INFO *cs,
-			      const char *ptr, uint ptr_length,
-			      pbool escape, pbool w_one, pbool w_many,
-			      uint res_length,
-			      char *min_str, char *max_str,
-			      uint *min_length, uint *max_length);
-
-my_bool  my_like_range_mb(CHARSET_INFO *cs,
-			  const char *ptr, uint ptr_length,
-			  pbool escape, pbool w_one, pbool w_many,
-			  uint res_length,
-			  char *min_str, char *max_str,
-			  uint *min_length, uint *max_length);
-
-my_bool  my_like_range_ucs2(CHARSET_INFO *cs,
-			    const char *ptr, uint ptr_length,
-			    pbool escape, pbool w_one, pbool w_many,
-			    uint res_length,
-			    char *min_str, char *max_str,
-			    uint *min_length, uint *max_length);
-
-
-int my_wildcmp_8bit(CHARSET_INFO *,
-		    const char *str,const char *str_end,
-		    const char *wildstr,const char *wildend,
-		    int escape, int w_one, int w_many);
-
-uint my_numchars_8bit(CHARSET_INFO *, const char *b, const char *e);
-uint my_numcells_8bit(CHARSET_INFO *, const char *b, const char *e);
-uint my_charpos_8bit(CHARSET_INFO *, const char *b, const char *e, uint pos);
-uint my_well_formed_len_8bit(CHARSET_INFO *, const char *b, const char *e, uint pos);
-int my_mbcharlen_8bit(CHARSET_INFO *, uint c);
-
-
-/* Functions for multibyte charsets */
-extern void my_caseup_str_mb(CHARSET_INFO *, char *);
-extern void my_casedn_str_mb(CHARSET_INFO *, char *);
-extern void my_caseup_mb(CHARSET_INFO *, char *, uint);
-extern void my_casedn_mb(CHARSET_INFO *, char *, uint);
-extern int my_strcasecmp_mb(CHARSET_INFO * cs,const char *, const char *);
-
-int my_wildcmp_mb(CHARSET_INFO *,
-		  const char *str,const char *str_end,
-		  const char *wildstr,const char *wildend,
-		  int escape, int w_one, int w_many);
-uint my_numchars_mb(CHARSET_INFO *, const char *b, const char *e);
-uint my_numcells_mb(CHARSET_INFO *, const char *b, const char *e);
-uint my_charpos_mb(CHARSET_INFO *, const char *b, const char *e, uint pos);
-uint my_well_formed_len_mb(CHARSET_INFO *, const char *b, const char *e, uint pos);
-uint my_instr_mb(struct charset_info_st *,
-                 const char *b, uint b_length,
-                 const char *s, uint s_length,
-                 my_match_t *match, uint nmatch);
-
-int my_wildcmp_unicode(CHARSET_INFO *cs,
-                       const char *str, const char *str_end,
-                       const char *wildstr, const char *wildend,
-                       int escape, int w_one, int w_many,
-                       MY_UNICASE_INFO **weights);
-
-extern my_bool my_parse_charset_xml(const char *bug, uint len,
-				    int (*add)(CHARSET_INFO *cs));
-
-#define	_MY_U	01	/* Upper case */
-#define	_MY_L	02	/* Lower case */
-#define	_MY_NMR	04	/* Numeral (digit) */
-#define	_MY_SPC	010	/* Spacing character */
-#define	_MY_PNT	020	/* Punctuation */
-#define	_MY_CTR	040	/* Control character */
-#define	_MY_B	0100	/* Blank */
-#define	_MY_X	0200	/* heXadecimal digit */
-
-
-#define	my_isascii(c)	(!((c) & ~0177))
-#define	my_toascii(c)	((c) & 0177)
-#define my_tocntrl(c)	((c) & 31)
-#define my_toprint(c)	((c) | 64)
-#define my_toupper(s,c)	(char) ((s)->to_upper[(uchar) (c)])
-#define my_tolower(s,c)	(char) ((s)->to_lower[(uchar) (c)])
-#define	my_isalpha(s, c)  (((s)->ctype+1)[(uchar) (c)] & (_MY_U | _MY_L))
-#define	my_isupper(s, c)  (((s)->ctype+1)[(uchar) (c)] & _MY_U)
-#define	my_islower(s, c)  (((s)->ctype+1)[(uchar) (c)] & _MY_L)
-#define	my_isdigit(s, c)  (((s)->ctype+1)[(uchar) (c)] & _MY_NMR)
-#define	my_isxdigit(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_X)
-#define	my_isalnum(s, c)  (((s)->ctype+1)[(uchar) (c)] & (_MY_U | _MY_L | _MY_NMR))
-#define	my_isspace(s, c)  (((s)->ctype+1)[(uchar) (c)] & _MY_SPC)
-#define	my_ispunct(s, c)  (((s)->ctype+1)[(uchar) (c)] & _MY_PNT)
-#define	my_isprint(s, c)  (((s)->ctype+1)[(uchar) (c)] & (_MY_PNT | _MY_U | _MY_L | _MY_NMR | _MY_B))
-#define	my_isgraph(s, c)  (((s)->ctype+1)[(uchar) (c)] & (_MY_PNT | _MY_U | _MY_L | _MY_NMR))
-#define	my_iscntrl(s, c)  (((s)->ctype+1)[(uchar) (c)] & _MY_CTR)
-
-/* Some macros that should be cleaned up a little */
-#define my_isvar(s,c)                 (my_isalnum(s,c) || (c) == '_')
-#define my_isvar_start(s,c)           (my_isalpha(s,c) || (c) == '_')
-
-#define my_binary_compare(s)	      ((s)->state  & MY_CS_BINSORT)
-#define use_strnxfrm(s)               ((s)->state  & MY_CS_STRNXFRM)
-#define my_strnxfrm(s, a, b, c, d)    ((s)->coll->strnxfrm((s), (a), (b), (c), (d)))
-#define my_strnncoll(s, a, b, c, d) ((s)->coll->strnncoll((s), (a), (b), (c), (d), 0))
-#define my_like_range(s, a, b, c, d, e, f, g, h, i, j) \
-   ((s)->coll->like_range((s), (a), (b), (c), (d), (e), (f), (g), (h), (i), (j)))
-#define my_wildcmp(cs,s,se,w,we,e,o,m) ((cs)->coll->wildcmp((cs),(s),(se),(w),(we),(e),(o),(m)))
-#define my_strcasecmp(s, a, b)        ((s)->coll->strcasecmp((s), (a), (b)))
-#define my_charpos(cs, b, e, num)     (cs)->cset->charpos((cs), (const char*) (b), (const char *)(e), (num))
-
-
-#define use_mb(s)                     ((s)->cset->ismbchar != NULL)
-#define my_ismbchar(s, a, b)          ((s)->cset->ismbchar((s), (a), (b)))
-#ifdef USE_MB
-#define my_mbcharlen(s, a)            ((s)->cset->mbcharlen((s),(a)))
-#else
-#define my_mbcharlen(s, a)            1
-#endif
-
-#define my_caseup(s, a, l)            ((s)->cset->caseup((s), (a), (l)))
-#define my_casedn(s, a, l)            ((s)->cset->casedn((s), (a), (l)))
-#define my_caseup_str(s, a)           ((s)->cset->caseup_str((s), (a)))
-#define my_casedn_str(s, a)           ((s)->cset->casedn_str((s), (a)))
-#define my_strntol(s, a, b, c, d, e)  ((s)->cset->strntol((s),(a),(b),(c),(d),(e)))
-#define my_strntoul(s, a, b, c, d, e) ((s)->cset->strntoul((s),(a),(b),(c),(d),(e)))
-#define my_strntoll(s, a, b, c, d, e) ((s)->cset->strntoll((s),(a),(b),(c),(d),(e)))
-#define my_strntoull(s, a, b, c,d, e) ((s)->cset->strntoull((s),(a),(b),(c),(d),(e)))
-#define my_strntod(s, a, b, c, d)     ((s)->cset->strntod((s),(a),(b),(c),(d)))
-
-
-/* XXX: still need to take care of this one */
-#ifdef MY_CHARSET_TIS620
-#error The TIS620 charset is broken at the moment.  Tell tim to fix it.
-#define USE_TIS620
-#include "t_ctype.h"
-#endif
-
-#ifdef	__cplusplus
-}
-#endif
-
-#endif /* _m_ctype_h */
diff --git a/src/terralib/drivers/MySQL/include/m_string.h b/src/terralib/drivers/MySQL/include/m_string.h
deleted file mode 100644
index 97d3442..0000000
--- a/src/terralib/drivers/MySQL/include/m_string.h
+++ /dev/null
@@ -1,264 +0,0 @@
-/* Copyright (C) 2000 MySQL AB
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
-
-/* There may be prolems include all of theese. Try to test in
-   configure with ones are needed? */
-
-/*  This is needed for the definitions of strchr... on solaris */
-
-#ifndef _m_string_h
-#define _m_string_h
-#ifndef __USE_GNU
-#define __USE_GNU				/* We want to use stpcpy */
-#endif
-#if defined(HAVE_STRINGS_H)
-#include <strings.h>
-#endif
-#if defined(HAVE_STRING_H)
-#include <string.h>
-#endif
-
-/* need by my_vsnprintf */
-#include <stdarg.h> 
-
-/* Correct some things for UNIXWARE7 */
-#ifdef HAVE_UNIXWARE7_THREADS
-#undef HAVE_STRINGS_H
-#undef HAVE_MEMORY_H
-#define HAVE_MEMCPY
-#ifndef HAVE_MEMMOVE
-#define HAVE_MEMMOVE
-#endif
-#undef HAVE_BCMP
-#undef bcopy
-#undef bcmp
-#undef bzero
-#endif /* HAVE_UNIXWARE7_THREADS */
-#ifdef _AIX
-#undef HAVE_BCMP
-#endif
-
-/*  This is needed for the definitions of bzero... on solaris */
-#if defined(HAVE_STRINGS_H) && !defined(HAVE_mit_thread)
-#include <strings.h>
-#endif
-
-/*  This is needed for the definitions of memcpy... on solaris */
-#if defined(HAVE_MEMORY_H) && !defined(__cplusplus)
-#include <memory.h>
-#endif
-
-#if !defined(HAVE_MEMCPY) && !defined(HAVE_MEMMOVE)
-# define memcpy(d, s, n)	bcopy ((s), (d), (n))
-# define memset(A,C,B)		bfill((A),(B),(C))
-# define memmove(d, s, n)	bmove ((d), (s), (n))
-#elif defined(HAVE_MEMMOVE)
-# define bmove(d, s, n)		memmove((d), (s), (n))
-#else
-# define memmove(d, s, n)	bmove((d), (s), (n)) /* our bmove */
-#endif
-
-/* Unixware 7 */
-#if !defined(HAVE_BFILL)
-# define bfill(A,B,C)           memset((A),(C),(B))
-# define bmove_align(A,B,C)    memcpy((A),(B),(C))
-#endif
-
-#if !defined(HAVE_BCMP)
-# define bcopy(s, d, n)		memcpy((d), (s), (n))
-# define bcmp(A,B,C)		memcmp((A),(B),(C))
-# define bzero(A,B)		memset((A),0,(B))
-# define bmove_align(A,B,C)    memcpy((A),(B),(C))
-#endif
-
-#if defined(__cplusplus) && !defined(OS2)
-extern "C" {
-#endif
-
-#if defined(HAVE_STPCPY) && !defined(HAVE_mit_thread)
-#define strmov(A,B) stpcpy((A),(B))
-#ifndef stpcpy
-extern char *stpcpy(char *, const char *);	/* For AIX with gcc 2.95.3 */
-#endif
-#endif
-
-/* Declared in int2str() */
-extern char NEAR _dig_vec_upper[];
-extern char NEAR _dig_vec_lower[];
-
-#ifdef BAD_STRING_COMPILER
-#define strmov(A,B)  (memccpy(A,B,0,INT_MAX)-1)
-#else
-#define strmov_overlapp(A,B) strmov(A,B)
-#define strmake_overlapp(A,B,C) strmake(A,B,C)
-#endif
-
-#ifdef BAD_MEMCPY			/* Problem with gcc on Alpha */
-#define memcpy_fixed(A,B,C) bmove((A),(B),(C))
-#else
-#define memcpy_fixed(A,B,C) memcpy((A),(B),(C))
-#endif
-
-#ifdef MSDOS
-#undef bmove_align
-#define bmove512(A,B,C) bmove_align(A,B,C)
-extern	void bmove_align(gptr dst,const gptr src,uint len);
-#endif
-
-#if (!defined(USE_BMOVE512) || defined(HAVE_purify)) && !defined(bmove512)
-#define bmove512(A,B,C) memcpy(A,B,C)
-#endif
-
-#ifdef HAVE_purify
-#define memcpy_overlap(A,B,C) \
-DBUG_ASSERT((A) <= (B) || ((B)+(C)) <= (A)); \
-bmove((byte*) (A),(byte*) (B),(size_t) (C));
-#else
-#define memcpy_overlap(A,B,C) memcpy((A), (B), (C))
-#endif /* HAVE_purify */
-
-
-	/* Prototypes for string functions */
-
-#if !defined(bfill) && !defined(HAVE_BFILL)
-extern	void bfill(gptr dst,uint len,pchar fill);
-#endif
-
-#if !defined(bzero) && !defined(HAVE_BZERO)
-extern	void bzero(gptr dst,uint len);
-#endif
-
-#if !defined(bcmp) && !defined(HAVE_BCMP)
-extern	int bcmp(const char *s1,const char *s2,uint len);
-#endif
-#ifdef HAVE_purify
-extern	int my_bcmp(const char *s1,const char *s2,uint len);
-#undef bcmp
-#define bcmp(A,B,C) my_bcmp((A),(B),(C))
-#endif
-
-#ifndef bmove512
-extern	void bmove512(gptr dst,const gptr src,uint len);
-#endif
-
-#if !defined(HAVE_BMOVE) && !defined(bmove)
-extern	void bmove(char *dst, const char *src,uint len);
-#endif
-
-extern	void bmove_upp(char *dst,const char *src,uint len);
-extern	void bchange(char *dst,uint old_len,const char *src,
-		     uint new_len,uint tot_len);
-extern	void strappend(char *s,uint len,pchar fill);
-extern	char *strend(const char *s);
-extern  char *strcend(const char *, pchar);
-extern	char *strfield(char *src,int fields,int chars,int blanks,
-			   int tabch);
-extern	char *strfill(my_string s,uint len,pchar fill);
-extern	uint strinstr(const char *str,const char *search);
-extern  uint r_strinstr(reg1 my_string str,int from, reg4 my_string search);
-extern	char *strkey(char *dst,char *head,char *tail,char *flags);
-extern	char *strmake(char *dst,const char *src,uint length);
-#ifndef strmake_overlapp
-extern	char *strmake_overlapp(char *dst,const char *src, uint length);
-#endif
-
-#ifndef strmov
-extern	char *strmov(char *dst,const char *src);
-#endif
-extern	char *strnmov(char *dst,const char *src,uint n);
-extern	char *strsuff(const char *src,const char *suffix);
-extern	char *strcont(const char *src,const char *set);
-extern	char *strxcat _VARARGS((char *dst,const char *src, ...));
-extern	char *strxmov _VARARGS((char *dst,const char *src, ...));
-extern	char *strxcpy _VARARGS((char *dst,const char *src, ...));
-extern	char *strxncat _VARARGS((char *dst,uint len, const char *src, ...));
-extern	char *strxnmov _VARARGS((char *dst,uint len, const char *src, ...));
-extern	char *strxncpy _VARARGS((char *dst,uint len, const char *src, ...));
-
-/* Prototypes of normal stringfunctions (with may ours) */
-
-#ifdef WANT_STRING_PROTOTYPES
-extern char *strcat(char *, const char *);
-extern char *strchr(const char *, pchar);
-extern char *strrchr(const char *, pchar);
-extern char *strcpy(char *, const char *);
-extern int strcmp(const char *, const char *);
-#ifndef __GNUC__
-extern size_t strlen(const char *);
-#endif
-#endif
-#ifndef HAVE_STRNLEN
-extern uint strnlen(const char *s, uint n);
-#endif
-
-#if !defined(__cplusplus)
-#ifndef HAVE_STRPBRK
-extern char *strpbrk(const char *, const char *);
-#endif
-#ifndef HAVE_STRSTR
-extern char *strstr(const char *, const char *);
-#endif
-#endif
-extern int is_prefix(const char *, const char *);
-
-/* Conversion routines */
-double my_strtod(const char *str, char **end);
-double my_atof(const char *nptr);
-
-extern char *llstr(longlong value,char *buff);
-#ifndef HAVE_STRTOUL
-extern long strtol(const char *str, char **ptr, int base);
-extern ulong strtoul(const char *str, char **ptr, int base);
-#endif
-
-extern char *int2str(long val, char *dst, int radix, int upcase);
-extern char *int10_to_str(long val,char *dst,int radix);
-extern char *str2int(const char *src,int radix,long lower,long upper,
-			 long *val);
-longlong my_strtoll10(const char *nptr, char **endptr, int *error);
-#if SIZEOF_LONG == SIZEOF_LONG_LONG
-#define longlong2str(A,B,C) int2str((A),(B),(C),1)
-#define longlong10_to_str(A,B,C) int10_to_str((A),(B),(C))
-#undef strtoll
-#define strtoll(A,B,C) strtol((A),(B),(C))
-#define strtoull(A,B,C) strtoul((A),(B),(C))
-#ifndef HAVE_STRTOULL
-#define HAVE_STRTOULL
-#endif
-#ifndef HAVE_STRTOLL
-#define HAVE_STRTOLL
-#endif
-#else
-#ifdef HAVE_LONG_LONG
-extern char *longlong2str(longlong val,char *dst,int radix);
-extern char *longlong10_to_str(longlong val,char *dst,int radix);
-#if (!defined(HAVE_STRTOULL) || defined(HAVE_mit_thread)) || defined(NO_STRTOLL_PROTO)
-extern longlong strtoll(const char *str, char **ptr, int base);
-extern ulonglong strtoull(const char *str, char **ptr, int base);
-#endif
-#endif
-#endif
-
-/* my_vsnprintf.c */
-
-extern int my_vsnprintf( char *str, size_t n,
-                                const char *format, va_list ap );
-extern int my_snprintf(char* to, size_t n, const char* fmt, ...);
-
-#if defined(__cplusplus) && !defined(OS2)
-}
-#endif
-#endif
diff --git a/src/terralib/drivers/MySQL/include/my_alloc.h b/src/terralib/drivers/MySQL/include/my_alloc.h
deleted file mode 100644
index a3dd35d..0000000
--- a/src/terralib/drivers/MySQL/include/my_alloc.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/* Copyright (C) 2000 MySQL AB
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
-
-/* 
-   Data structures for mysys/my_alloc.c (root memory allocator)
-*/
-
-#ifndef _my_alloc_h
-#define _my_alloc_h
-
-#define ALLOC_MAX_BLOCK_TO_DROP			4096
-#define ALLOC_MAX_BLOCK_USAGE_BEFORE_DROP	10
-
-typedef struct st_used_mem
-{				   /* struct for once_alloc (block) */
-  struct st_used_mem *next;	   /* Next block in use */
-  unsigned int	left;		   /* memory left in block  */
-  unsigned int	size;		   /* size of block */
-} USED_MEM;
-
-
-typedef struct st_mem_root
-{
-  USED_MEM *free;                  /* blocks with free memory in it */
-  USED_MEM *used;                  /* blocks almost without free memory */
-  USED_MEM *pre_alloc;             /* preallocated block */
-  /* if block have less memory it will be put in 'used' list */
-  unsigned int min_malloc;
-  unsigned int block_size;         /* initial block size */
-  unsigned int block_num;          /* allocated blocks counter */
-  /* 
-     first free block in queue test counter (if it exceed 
-     MAX_BLOCK_USAGE_BEFORE_DROP block will be droped in 'used' list)
-  */
-  unsigned int first_block_usage;
-
-  void (*error_handler)(void);
-} MEM_ROOT;
-#endif
diff --git a/src/terralib/drivers/MySQL/include/my_dbug.h b/src/terralib/drivers/MySQL/include/my_dbug.h
deleted file mode 100644
index 9174a8b..0000000
--- a/src/terralib/drivers/MySQL/include/my_dbug.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/* Copyright (C) 2000 MySQL AB
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
-
-#ifndef _dbug_h
-#define _dbug_h
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-#if !defined(DBUG_OFF) && !defined(_lint)
-extern	int _db_on_,_no_db_;
-extern	FILE *_db_fp_;
-extern	char *_db_process_;
-extern	int _db_keyword_(const char *keyword);
-extern	void _db_setjmp_(void);
-extern	void _db_longjmp_(void);
-extern	void _db_push_(const char *control);
-extern	void _db_pop_(void);
-extern	void _db_enter_(const char *_func_,const char *_file_,uint _line_,
-			const char **_sfunc_,const char **_sfile_,
-			uint *_slevel_, char ***);
-extern	void _db_return_(uint _line_,const char **_sfunc_,const char **_sfile_,
-			 uint *_slevel_);
-extern	void _db_pargs_(uint _line_,const char *keyword);
-extern	void _db_doprnt_ _VARARGS((const char *format,...));
-extern	void _db_dump_(uint _line_,const char *keyword,const char *memory,
-		       uint length);
-extern	void _db_lock_file();
-extern	void _db_unlock_file();
-
-#define DBUG_ENTER(a) const char *_db_func_, *_db_file_; uint _db_level_; \
-	char **_db_framep_; \
-	_db_enter_ (a,__FILE__,__LINE__,&_db_func_,&_db_file_,&_db_level_, \
-		    &_db_framep_)
-#define DBUG_LEAVE \
-	(_db_return_ (__LINE__, &_db_func_, &_db_file_, &_db_level_))
-#define DBUG_RETURN(a1) {DBUG_LEAVE; return(a1);}
-#define DBUG_VOID_RETURN {DBUG_LEAVE; return;}
-#define DBUG_EXECUTE(keyword,a1) \
-	{if (_db_on_) {if (_db_keyword_ (keyword)) { a1 }}}
-#define DBUG_PRINT(keyword,arglist) \
-	{if (_db_on_) {_db_pargs_(__LINE__,keyword); _db_doprnt_ arglist;}}
-#define DBUG_PUSH(a1) _db_push_ (a1)
-#define DBUG_POP() _db_pop_ ()
-#define DBUG_PROCESS(a1) (_db_process_ = a1)
-#define DBUG_FILE (_db_fp_)
-#define DBUG_SETJMP(a1) (_db_setjmp_ (), setjmp (a1))
-#define DBUG_LONGJMP(a1,a2) (_db_longjmp_ (), longjmp (a1, a2))
-#define DBUG_DUMP(keyword,a1,a2)\
-	{if (_db_on_) {_db_dump_(__LINE__,keyword,a1,a2);}}
-#define DBUG_IN_USE (_db_fp_ && _db_fp_ != stderr)
-#define DEBUGGER_OFF _no_db_=1;_db_on_=0;
-#define DEBUGGER_ON  _no_db_=0
-#define DBUG_LOCK_FILE { _db_lock_file(); }
-#define DBUG_UNLOCK_FILE { _db_unlock_file(); }
-#define DBUG_ASSERT(A) assert(A)
-#else						/* No debugger */
-
-#define DBUG_ENTER(a1)
-#define DBUG_RETURN(a1) return(a1)
-#define DBUG_VOID_RETURN return
-#define DBUG_EXECUTE(keyword,a1) {}
-#define DBUG_PRINT(keyword,arglist) {}
-#define DBUG_PUSH(a1) {}
-#define DBUG_POP() {}
-#define DBUG_PROCESS(a1) {}
-#define DBUG_FILE (stderr)
-#define DBUG_SETJMP setjmp
-#define DBUG_LONGJMP longjmp
-#define DBUG_DUMP(keyword,a1,a2) {}
-#define DBUG_IN_USE 0
-#define DEBUGGER_OFF
-#define DEBUGGER_ON
-#define DBUG_LOCK_FILE
-#define DBUG_UNLOCK_FILE
-#define DBUG_ASSERT(A) {}
-#endif
-#ifdef	__cplusplus
-}
-#endif
-#endif
diff --git a/src/terralib/drivers/MySQL/include/my_getopt.h b/src/terralib/drivers/MySQL/include/my_getopt.h
deleted file mode 100644
index e6ca113..0000000
--- a/src/terralib/drivers/MySQL/include/my_getopt.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
-
-#ifndef _my_getopt_h
-#define _my_getopt_h
-
-C_MODE_START
-
-#define GET_NO_ARG     1
-#define GET_BOOL       2
-#define GET_INT        3
-#define GET_UINT       4
-#define GET_LONG       5
-#define GET_ULONG      6
-#define GET_LL         7
-#define GET_ULL        8
-#define GET_STR        9
-#define GET_STR_ALLOC 10
-#define GET_DISABLED  11
-
-#define GET_ASK_ADDR	 128
-#define GET_TYPE_MASK	 127
-
-enum get_opt_arg_type { NO_ARG, OPT_ARG, REQUIRED_ARG };
-
-struct my_option
-{
-  const char *name;                     /* Name of the option */
-  int        id;                        /* unique id or short option */
-  const char *comment;                  /* option comment, for autom. --help */
-  gptr       *value;                    /* The variable value */
-  gptr       *u_max_value;              /* The user def. max variable value */
-  const char **str_values;              /* Pointer to possible values */
-  ulong     var_type;
-  enum get_opt_arg_type arg_type;
-  longlong   def_value;                 /* Default value */
-  longlong   min_value;                 /* Min allowed value */
-  longlong   max_value;                 /* Max allowed value */
-  longlong   sub_size;                  /* Subtract this from given value */
-  long       block_size;                /* Value should be a mult. of this */
-  int        app_type;                  /* To be used by an application */
-};
-
-typedef my_bool (* my_get_one_option) (int, const struct my_option *, char * );
-typedef void (* my_error_reporter) (enum loglevel level, const char *format, ... );
-
-extern char *disabled_my_option;
-extern my_bool my_getopt_print_errors;
-extern my_error_reporter my_getopt_error_reporter;
-
-extern int handle_options (int *argc, char ***argv, 
-			   const struct my_option *longopts, my_get_one_option);
-extern void my_print_help(const struct my_option *options);
-extern void my_print_variables(const struct my_option *options);
-extern void my_getopt_register_get_addr(gptr* (*func_addr)(const char *, uint,
-							   const struct my_option *));
-
-ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp);
-my_bool getopt_compare_strings(const char *s, const char *t, uint length);
-
-C_MODE_END
-
-#endif /* _my_getopt_h */
-
diff --git a/src/terralib/drivers/MySQL/include/my_global.h b/src/terralib/drivers/MySQL/include/my_global.h
deleted file mode 100644
index f620083..0000000
--- a/src/terralib/drivers/MySQL/include/my_global.h
+++ /dev/null
@@ -1,1191 +0,0 @@
-/* Copyright (C) 2000-2003 MySQL AB
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
-
-/* This is the include file that should be included 'first' in every C file. */
-
-#ifndef _global_h
-#define _global_h
-
-#ifndef EMBEDDED_LIBRARY
-#define HAVE_REPLICATION
-#define HAVE_EXTERNAL_CLIENT
-#endif
-
-#if defined( __EMX__) && !defined( MYSQL_SERVER)
-/* moved here to use below VOID macro redefinition */
-#define INCL_BASE
-#define INCL_NOPMAPI
-#include <os2.h>
-#endif /* __EMX__ */
-
-#ifdef __CYGWIN__
-/* We use a Unix API, so pretend it's not Windows */
-#undef WIN
-#undef WIN32
-#undef _WIN
-#undef _WIN32
-#undef _WIN64
-#undef __WIN__
-#undef __WIN32__
-#define HAVE_ERRNO_AS_DEFINE
-#endif /* __CYGWIN__ */
-
-#if defined(i386) && !defined(__i386__)
-#define __i386__
-#endif
-
-/* Macros to make switching between C and C++ mode easier */
-#ifdef __cplusplus
-#define C_MODE_START    extern "C" {
-#define C_MODE_END	}
-#else
-#define C_MODE_START
-#define C_MODE_END
-#endif
-
-#if defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || defined(WIN32)
-#include <config-win.h>
-#elif defined(OS2)
-#include <config-os2.h>
-#elif defined(__NETWARE__)
-#include <my_config.h>
-#include <config-netware.h>
-#if defined(__cplusplus) && defined(inline)
-#undef inline				/* fix configure problem */
-#endif
-#else
-#include <my_config.h>
-#if defined(__cplusplus) && defined(inline)
-#undef inline				/* fix configure problem */
-#endif
-#endif /* _WIN32... */
-
-/* Some defines to avoid ifdefs in the code */
-#ifndef NETWARE_YIELD
-#define NETWARE_YIELD
-#define NETWARE_SET_SCREEN_MODE(A)
-#endif
-
-/*
-  The macros below are borrowed from include/linux/compiler.h in the
-  Linux kernel. Use them to indicate the likelyhood of the truthfulness
-  of a condition. This serves two purposes - newer versions of gcc will be
-  able to optimize for branch predication, which could yield siginficant
-  performance gains in frequently executed sections of the code, and the
-  other reason to use them is for documentation
-*/
-
-#if !defined(__GNUC__) || (__GNUC__ == 2 && __GNUC_MINOR__ < 96)
-#define __builtin_expect(x, expected_value) (x)
-#endif
-
-#define likely(x)	__builtin_expect((x),1)
-#define unlikely(x)	__builtin_expect((x),0)
-
-
-/* Fix problem with S_ISLNK() on Linux */
-#if defined(HAVE_LINUXTHREADS)
-#undef  _GNU_SOURCE
-#define _GNU_SOURCE 1
-#endif
-
-/* The client defines this to avoid all thread code */
-#if defined(UNDEF_THREADS_HACK)
-#undef THREAD
-#undef HAVE_mit_thread
-#undef HAVE_LINUXTHREADS
-#undef HAVE_UNIXWARE7_THREADS
-#endif
-
-#ifdef HAVE_THREADS_WITHOUT_SOCKETS
-/* MIT pthreads does not work with unix sockets */
-#undef HAVE_SYS_UN_H
-#endif
-
-#define __EXTENSIONS__ 1	/* We want some extension */
-#ifndef __STDC_EXT__
-#define __STDC_EXT__ 1          /* To get large file support on hpux */
-#endif
-
-#if defined(THREAD) && !defined(__WIN__) && !defined(OS2)
-#ifndef _POSIX_PTHREAD_SEMANTICS
-#define _POSIX_PTHREAD_SEMANTICS /* We want posix threads */
-#endif
-
-#if !defined(SCO)
-#define _REENTRANT	1	/* Some thread libraries require this */
-#endif
-#if !defined(_THREAD_SAFE) && !defined(_AIX)
-#define _THREAD_SAFE            /* Required for OSF1 */
-#endif
-#ifndef HAVE_mit_thread
-#ifdef HAVE_UNIXWARE7_THREADS
-#include <thread.h>
-#else
-#include <pthread.h>		/* AIX must have this included first */
-#endif /* HAVE_UNIXWARE7_THREADS */
-#endif /* HAVE_mit_thread */
-#if !defined(SCO) && !defined(_REENTRANT)
-#define _REENTRANT	1	/* Threads requires reentrant code */
-#endif
-#endif /* THREAD */
-
-/* Go around some bugs in different OS and compilers */
-#ifdef _AIX			/* By soren at t.dk */
-#define _H_STRINGS
-#define _SYS_STREAM_H
-/* #define _AIX32_CURSES */	/* XXX: this breaks AIX 4.3.3 (others?). */
-#define ulonglong2double(A) my_ulonglong2double(A)
-#define my_off_t2double(A)  my_ulonglong2double(A)
-C_MODE_START
-double my_ulonglong2double(unsigned long long A);
-C_MODE_END
-#endif /* _AIX */
-
-#ifdef HAVE_BROKEN_SNPRINTF	/* HPUX 10.20 don't have this defined */
-#undef HAVE_SNPRINTF
-#endif
-#ifdef HAVE_BROKEN_PREAD
-/*
-  pread()/pwrite() are not 64 bit safe on HP-UX 11.0 without
-  installing the kernel patch PHKL_20349 or greater
-*/
-#undef HAVE_PREAD
-#undef HAVE_PWRITE
-#endif
-#if defined(HAVE_BROKEN_INLINE) && !defined(__cplusplus)
-#undef inline
-#define inline
-#endif
-
-#ifdef UNDEF_HAVE_GETHOSTBYNAME_R		/* For OSF4.x */
-#undef HAVE_GETHOSTBYNAME_R
-#endif
-#ifdef UNDEF_HAVE_INITGROUPS			/* For AIX 4.3 */
-#undef HAVE_INITGROUPS
-#endif
-
-/* gcc/egcs issues */
-
-#if defined(__GNUC) && defined(__EXCEPTIONS)
-#error "Please add -fno-exceptions to CXXFLAGS and reconfigure/recompile"
-#endif
-
-
-/* Fix a bug in gcc 2.8.0 on IRIX 6.2 */
-#if SIZEOF_LONG == 4 && defined(__LONG_MAX__)
-#undef __LONG_MAX__             /* Is a longlong value in gcc 2.8.0 ??? */
-#define __LONG_MAX__ 2147483647
-#endif
-
-/* Fix problem when linking c++ programs with gcc 3.x */
-#ifdef DEFINE_CXA_PURE_VIRTUAL
-#define FIX_GCC_LINKING_PROBLEM \
-extern "C" { int __cxa_pure_virtual() {\
-  DBUG_ASSERT("Pure virtual method called." == "Aborted");\
-  return 0;\
-} }
-#else
-#define FIX_GCC_LINKING_PROBLEM
-#endif
-
-/* egcs 1.1.2 has a problem with memcpy on Alpha */
-#if defined(__GNUC__) && defined(__alpha__) && ! (__GNUC__ > 2 || (__GNUC__ == 2 &&  __GNUC_MINOR__ >= 95))
-#define BAD_MEMCPY
-#endif
-
-/* In Linux-alpha we have atomic.h if we are using gcc */
-#if defined(HAVE_LINUXTHREADS) && defined(__GNUC__) && defined(__alpha__) && (__GNUC__ > 2 || ( __GNUC__ == 2 &&  __GNUC_MINOR__ >= 95)) && !defined(HAVE_ATOMIC_ADD)
-#define HAVE_ATOMIC_ADD
-#define HAVE_ATOMIC_SUB
-#endif
-
-/* In Linux-ia64 including atomic.h will give us an error */
-#if (defined(HAVE_LINUXTHREADS) && defined(__GNUC__) && (defined(__ia64__)||defined(__powerpc64__))) || !defined(THREAD)
-#undef HAVE_ATOMIC_ADD
-#undef HAVE_ATOMIC_SUB
-#endif
-
-#if defined(_lint) && !defined(lint)
-#define lint
-#endif
-#if SIZEOF_LONG_LONG > 4 && !defined(_LONG_LONG)
-#define _LONG_LONG 1		/* For AIX string library */
-#endif
-
-#ifndef stdin
-#include <stdio.h>
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_STDDEF_H
-#include <stddef.h>
-#endif
-
-#include <math.h>
-#ifdef HAVE_LIMITS_H
-#include <limits.h>
-#endif
-#ifdef HAVE_FLOAT_H
-#include <float.h>
-#endif
-
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-#ifdef HAVE_SYS_TIMEB_H
-#include <sys/timeb.h>				/* Avoid warnings on SCO */
-#endif
-#if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
-#endif /* TIME_WITH_SYS_TIME */
-#ifdef HAVE_UNISTD_H
-#if defined(HAVE_OPENSSL) && !defined(__FreeBSD__) && !defined(NeXT) && !defined(__OpenBSD__)
-#define crypt unistd_crypt
-#endif
-#include <unistd.h>
-#ifdef HAVE_OPENSSL
-#undef crypt
-#endif
-#endif
-#if defined(__cplusplus) && defined(NO_CPLUSPLUS_ALLOCA)
-#undef HAVE_ALLOCA
-#undef HAVE_ALLOCA_H
-#endif
-#ifdef HAVE_ALLOCA_H
-#include <alloca.h>
-#endif
-#ifdef HAVE_ATOMIC_ADD
-#define __SMP__
-#ifdef HAVE_LINUX_CONFIG_H
-#include <linux/config.h>	/* May define CONFIG_SMP */
-#endif
-#ifndef CONFIG_SMP
-#define CONFIG_SMP
-#endif
-C_MODE_START
-#include <asm/atomic.h>
-C_MODE_END
-#endif
-#include <errno.h>				/* Recommended by debian */
-/* We need the following to go around a problem with openssl on solaris */
-#if defined(HAVE_CRYPT_H)
-#include <crypt.h>
-#endif
-
-/*
-  A lot of our programs uses asserts, so better to always include it
-  This also fixes a problem when people uses DBUG_ASSERT without including
-  assert.h
-*/
-#include <assert.h>
-
-/* Go around some bugs in different OS and compilers */
-#if defined(_HPUX_SOURCE) && defined(HAVE_SYS_STREAM_H)
-#include <sys/stream.h>		/* HPUX 10.20 defines ulong here. UGLY !!! */
-#define HAVE_ULONG
-#endif
-#ifdef DONT_USE_FINITE		/* HPUX 11.x has is_finite() */
-#undef HAVE_FINITE
-#endif
-#if defined(HPUX10) && defined(_LARGEFILE64_SOURCE) && defined(THREAD)
-/* Fix bug in setrlimit */
-#undef setrlimit
-#define setrlimit cma_setrlimit64
-#endif
-
-#ifdef __QNXNTO__
-/* This has to be after include limits.h */
-#define HAVE_ERRNO_AS_DEFINE
-#define HAVE_FCNTL_LOCK
-#undef  HAVE_FINITE
-#undef  LONGLONG_MIN            /* These get wrongly defined in QNX 6.2 */
-#undef  LONGLONG_MAX            /* standard system library 'limits.h' */
-#endif
-
-/* We can not live without the following defines */
-
-#define USE_MYFUNC 1		/* Must use syscall indirection */
-#define MASTER 1		/* Compile without unireg */
-#define ENGLISH 1		/* Messages in English */
-#define POSIX_MISTAKE 1		/* regexp: Fix stupid spec error */
-#define USE_REGEX 1		/* We want the use the regex library */
-/* Do not define for ultra sparcs */
-#ifndef OS2
-#define USE_BMOVE512 1		/* Use this unless system bmove is faster */
-#endif
-
-#define QUOTE_ARG(x)		#x	/* Quote argument (before cpp) */
-#define STRINGIFY_ARG(x) QUOTE_ARG(x)	/* Quote argument, after cpp */
-
-/* Paranoid settings. Define I_AM_PARANOID if you are paranoid */
-#ifdef I_AM_PARANOID
-#define DONT_ALLOW_USER_CHANGE 1
-#define DONT_USE_MYSQL_PWD 1
-#endif
-
-/* Does the system remember a signal handler after a signal ? */
-#ifndef HAVE_BSD_SIGNALS
-#define DONT_REMEMBER_SIGNAL
-#endif
-
-/* Define void to stop lint from generating "null effekt" comments */
-#ifndef DONT_DEFINE_VOID
-#ifdef _lint
-int	__void__;
-#define VOID(X)		(__void__ = (int) (X))
-#else
-#undef VOID
-#define VOID(X)		(X)
-#endif
-#endif /* DONT_DEFINE_VOID */
-
-#if defined(_lint) || defined(FORCE_INIT_OF_VARS)
-#define LINT_INIT(var)	var=0			/* No uninitialize-warning */
-#else
-#define LINT_INIT(var)
-#endif
-
-/* Define some useful general macros */
-#if defined(__cplusplus) && defined(__GNUC__)
-#define max(a, b)	((a) >? (b))
-#define min(a, b)	((a) <? (b))
-#elif !defined(max)
-#define max(a, b)	((a) > (b) ? (a) : (b))
-#define min(a, b)	((a) < (b) ? (a) : (b))
-#endif
-
-#if defined(__EMX__) || !defined(HAVE_UINT)
-typedef unsigned int uint;
-typedef unsigned short ushort;
-#endif
-
-#define CMP_NUM(a,b)    (((a) < (b)) ? -1 : ((a) == (b)) ? 0 : 1)
-#define sgn(a)		(((a) < 0) ? -1 : ((a) > 0) ? 1 : 0)
-#define swap_variables(t, a, b) { register t dummy; dummy= a; a= b; b= dummy; }
-#define test(a)		((a) ? 1 : 0)
-#define set_if_bigger(a,b)  do { if ((a) < (b)) (a)=(b); } while(0)
-#define set_if_smaller(a,b) do { if ((a) > (b)) (a)=(b); } while(0)
-#define test_all_bits(a,b) (((a) & (b)) == (b))
-#define set_bits(type, bit_count) (sizeof(type)*8 <= (bit_count) ? ~(type) 0 : ((((type) 1) << (bit_count)) - (type) 1))
-#define array_elements(A) ((uint) (sizeof(A)/sizeof(A[0])))
-#ifndef HAVE_RINT
-#define rint(A) floor((A)+(((A) < 0)? -0.5 : 0.5))
-#endif
-
-/* Define some general constants */
-#ifndef TRUE
-#define TRUE		(1)	/* Logical true */
-#define FALSE		(0)	/* Logical false */
-#endif
-
-#if defined(__GNUC__)
-#define function_volatile	volatile
-#define my_reinterpret_cast(A) reinterpret_cast<A>
-#define my_const_cast(A) const_cast<A>
-#elif !defined(my_reinterpret_cast)
-#define my_reinterpret_cast(A) (A)
-#define my_const_cast(A) (A)
-#endif
-#if !defined(__attribute__) && (defined(__cplusplus) || !defined(__GNUC__)  || __GNUC__ == 2 && __GNUC_MINOR__ < 8)
-#define __attribute__(A)
-#endif
-
-/* From old s-system.h */
-
-/*
-  Support macros for non ansi & other old compilers. Since such
-  things are no longer supported we do nothing. We keep then since
-  some of our code may still be needed to upgrade old customers.
-*/
-#define _VARARGS(X) X
-#define _STATIC_VARARGS(X) X
-#define _PC(X)	X
-
-#if defined(DBUG_ON) && defined(DBUG_OFF)
-#undef DBUG_OFF
-#endif
-
-#if defined(_lint) && !defined(DBUG_OFF)
-#define DBUG_OFF
-#endif
-
-#include <my_dbug.h>
-
-#define MIN_ARRAY_SIZE	0	/* Zero or One. Gcc allows zero*/
-#define ASCII_BITS_USED 8	/* Bit char used */
-#define NEAR_F			/* No near function handling */
-
-/* Some types that is different between systems */
-
-typedef int	File;		/* File descriptor */
-#ifndef Socket_defined
-typedef int	my_socket;	/* File descriptor for sockets */
-#define INVALID_SOCKET -1
-#endif
-/* Type for fuctions that handles signals */
-#define sig_handler RETSIGTYPE
-C_MODE_START
-typedef void	(*sig_return)();/* Returns type from signal */
-C_MODE_END
-#if defined(__GNUC__) && !defined(_lint)
-typedef char	pchar;		/* Mixed prototypes can take char */
-typedef char	puchar;		/* Mixed prototypes can take char */
-typedef char	pbool;		/* Mixed prototypes can take char */
-typedef short	pshort;		/* Mixed prototypes can take short int */
-typedef float	pfloat;		/* Mixed prototypes can take float */
-#else
-typedef int	pchar;		/* Mixed prototypes can't take char */
-typedef uint	puchar;		/* Mixed prototypes can't take char */
-typedef int	pbool;		/* Mixed prototypes can't take char */
-typedef int	pshort;		/* Mixed prototypes can't take short int */
-typedef double	pfloat;		/* Mixed prototypes can't take float */
-#endif
-C_MODE_START
-typedef int	(*qsort_cmp)(const void *,const void *);
-typedef int	(*qsort_cmp2)(void*, const void *,const void *);
-C_MODE_END
-#ifdef HAVE_mit_thread
-#define qsort_t void
-#undef QSORT_TYPE_IS_VOID
-#define QSORT_TYPE_IS_VOID
-#else
-#define qsort_t RETQSORTTYPE	/* Broken GCC cant handle typedef !!!! */
-#endif
-#ifdef HAVE_mit_thread
-#define size_socket socklen_t	/* Type of last arg to accept */
-#else
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-typedef SOCKET_SIZE_TYPE size_socket;
-#endif
-
-#ifndef SOCKOPT_OPTLEN_TYPE
-#define SOCKOPT_OPTLEN_TYPE size_socket
-#endif
-
-/* file create flags */
-
-#ifndef O_SHARE			/* Probably not windows */
-#define O_SHARE		0	/* Flag to my_open for shared files */
-#ifndef O_BINARY
-#define O_BINARY	0	/* Flag to my_open for binary files */
-#endif
-#ifndef FILE_BINARY
-#define FILE_BINARY	O_BINARY /* Flag to my_fopen for binary streams */
-#endif
-#ifdef HAVE_FCNTL
-#define HAVE_FCNTL_LOCK
-#define F_TO_EOF	0L	/* Param to lockf() to lock rest of file */
-#endif
-#endif /* O_SHARE */
-
-#ifndef O_TEMPORARY
-#define O_TEMPORARY	0
-#endif
-#ifndef O_SHORT_LIVED
-#define O_SHORT_LIVED	0
-#endif
-
-/* #define USE_RECORD_LOCK	*/
-
-	/* Unsigned types supported by the compiler */
-#define UNSINT8			/* unsigned int8 (char) */
-#define UNSINT16		/* unsigned int16 */
-#define UNSINT32		/* unsigned int32 */
-
-	/* General constants */
-#define SC_MAXWIDTH	256	/* Max width of screen (for error messages) */
-#define FN_LEN		256	/* Max file name len */
-#define FN_HEADLEN	253	/* Max length of filepart of file name */
-#define FN_EXTLEN	20	/* Max length of extension (part of FN_LEN) */
-#define FN_REFLEN	512	/* Max length of full path-name */
-#define FN_EXTCHAR	'.'
-#define FN_HOMELIB	'~'	/* ~/ is used as abbrev for home dir */
-#define FN_CURLIB	'.'	/* ./ is used as abbrev for current dir */
-#define FN_PARENTDIR	".."	/* Parent directory; Must be a string */
-#define FN_DEVCHAR	':'
-
-#ifndef FN_LIBCHAR
-#ifdef __EMX__
-#define FN_LIBCHAR	'\\'
-#define FN_ROOTDIR	"\\"
-#else
-#define FN_LIBCHAR	'/'
-#define FN_ROOTDIR	"/"
-#endif
-#endif
-#define MY_NFILE	64	/* This is only used to save filenames */
-#ifndef OS_FILE_LIMIT
-#define OS_FILE_LIMIT	65535
-#endif
-
-/* #define EXT_IN_LIBNAME     */
-/* #define FN_NO_CASE_SENCE   */
-/* #define FN_UPPER_CASE TRUE */
-
-/*
-  Io buffer size; Must be a power of 2 and a multiple of 512. May be
-  smaller what the disk page size. This influences the speed of the
-  isam btree library. eg to big to slow.
-*/
-#define IO_SIZE			4096
-/*
-  How much overhead does malloc have. The code often allocates
-  something like 1024-MALLOC_OVERHEAD bytes
-*/
-#ifdef SAFEMALLOC
-#define MALLOC_OVERHEAD (8+24+4)
-#else
-#define MALLOC_OVERHEAD 8
-#endif
-	/* get memory in huncs */
-#define ONCE_ALLOC_INIT		(uint) (4096-MALLOC_OVERHEAD)
-	/* Typical record cash */
-#define RECORD_CACHE_SIZE	(uint) (64*1024-MALLOC_OVERHEAD)
-	/* Typical key cash */
-#define KEY_CACHE_SIZE		(uint) (8*1024*1024-MALLOC_OVERHEAD)
-	/* Default size of a key cache block  */
-#define KEY_CACHE_BLOCK_SIZE	(uint) 1024
-
-
-	/* Some things that this system doesn't have */
-
-#define NO_HASH			/* Not needed anymore */
-#ifdef __WIN__
-#define NO_DIR_LIBRARY		/* Not standar dir-library */
-#define USE_MY_STAT_STRUCT	/* For my_lib */
-#endif
-
-/* Some defines of functions for portability */
-
-#undef remove		/* Crashes MySQL on SCO 5.0.0 */
-#ifndef __WIN__
-#ifdef OS2
-#define closesocket(A)	soclose(A)
-#else
-#define closesocket(A)	close(A)
-#endif
-#ifndef ulonglong2double
-#define ulonglong2double(A) ((double) (ulonglong) (A))
-#define my_off_t2double(A)  ((double) (my_off_t) (A))
-#endif
-#endif
-
-#ifndef offsetof
-#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
-#endif
-#define ulong_to_double(X) ((double) (ulong) (X))
-#define SET_STACK_SIZE(X)	/* Not needed on real machines */
-
-#if !defined(HAVE_mit_thread) && !defined(HAVE_STRTOK_R)
-#define strtok_r(A,B,C) strtok((A),(B))
-#endif
-
-/* Remove some things that mit_thread break or doesn't support */
-#if defined(HAVE_mit_thread) && defined(THREAD)
-#undef HAVE_PREAD
-#undef HAVE_REALPATH
-#undef HAVE_MLOCK
-#undef HAVE_TEMPNAM				/* Use ours */
-#undef HAVE_PTHREAD_SETPRIO
-#undef HAVE_FTRUNCATE
-#undef HAVE_READLINK
-#endif
-
-/* This is from the old m-machine.h file */
-
-#if SIZEOF_LONG_LONG > 4
-#define HAVE_LONG_LONG 1
-#endif
-
-/*
-  Some pre-ANSI-C99 systems like AIX 5.1 and Linux/GCC 2.95 define
-  ULONGLONG_MAX, LONGLONG_MIN, LONGLONG_MAX; we use them if they're defined.
-  Also on Windows we define these constants by hand in config-win.h.
-*/
-
-#if defined(HAVE_LONG_LONG) && !defined(LONGLONG_MIN)
-#define LONGLONG_MIN	((long long) 0x8000000000000000LL)
-#define LONGLONG_MAX	((long long) 0x7FFFFFFFFFFFFFFFLL)
-#endif
-
-#if defined(HAVE_LONG_LONG) && !defined(ULONGLONG_MAX)
-/* First check for ANSI C99 definition: */
-#ifdef ULLONG_MAX
-#define ULONGLONG_MAX  ULLONG_MAX
-#else
-#define ULONGLONG_MAX ((unsigned long long)(~0ULL))
-#endif
-#endif /* defined (HAVE_LONG_LONG) && !defined(ULONGLONG_MAX)*/
-
-#define INT_MIN32       (~0x7FFFFFFFL)
-#define INT_MAX32       0x7FFFFFFFL
-#define UINT_MAX32      0xFFFFFFFFL
-#define INT_MIN24       (~0x007FFFFF)
-#define INT_MAX24       0x007FFFFF
-#define UINT_MAX24      0x00FFFFFF
-#define INT_MIN16       (~0x7FFF)
-#define INT_MAX16       0x7FFF
-#define UINT_MAX16      0xFFFF
-#define INT_MIN8        (~0x7F)
-#define INT_MAX8        0x7F
-
-/* From limits.h instead */
-#ifndef DBL_MIN
-#define DBL_MIN		4.94065645841246544e-324
-#define FLT_MIN		((float)1.40129846432481707e-45)
-#endif
-#ifndef DBL_MAX
-#define DBL_MAX		1.79769313486231470e+308
-#define FLT_MAX		((float)3.40282346638528860e+38)
-#endif
-
-#if !defined(HAVE_ISINF) && !defined(isinf)
-#define isinf(X)    0
-#endif
-
-/*
-  Max size that must be added to a so that we know Size to make
-  adressable obj.
-*/
-#if SIZEOF_CHARP == 4
-typedef long		my_ptrdiff_t;
-#else
-typedef long long	my_ptrdiff_t;
-#endif
-
-#define MY_ALIGN(A,L)	(((A) + (L) - 1) & ~((L) - 1))
-#define ALIGN_SIZE(A)	MY_ALIGN((A),sizeof(double))
-/* Size to make adressable obj. */
-#define ALIGN_PTR(A, t) ((t*) MY_ALIGN((A),sizeof(t)))
-			 /* Offset of field f in structure t */
-#define OFFSET(t, f)	((size_t)(char *)&((t *)0)->f)
-#define ADD_TO_PTR(ptr,size,type) (type) ((byte*) (ptr)+size)
-#define PTR_BYTE_DIFF(A,B) (my_ptrdiff_t) ((byte*) (A) - (byte*) (B))
-
-#define NullS		(char *) 0
-/* Nowdays we do not support MessyDos */
-#ifndef NEAR
-#define NEAR				/* Who needs segments ? */
-#define FAR				/* On a good machine */
-#ifndef HUGE_PTR
-#define HUGE_PTR
-#endif
-#endif
-#if defined(__IBMC__) || defined(__IBMCPP__)
-/* This was  _System _Export but caused a lot of warnings on _AIX43 */
-#define STDCALL
-#elif !defined( STDCALL)
-#define STDCALL
-#endif
-
-/* Typdefs for easyier portability */
-
-#if defined(VOIDTYPE)
-typedef void	*gptr;		/* Generic pointer */
-#else
-typedef char	*gptr;		/* Generic pointer */
-#endif
-#ifndef HAVE_INT_8_16_32
-typedef signed char int8;       /* Signed integer >= 8  bits */
-typedef short	int16;		/* Signed integer >= 16 bits */
-#endif
-#ifndef HAVE_UCHAR
-typedef unsigned char	uchar;	/* Short for unsigned char */
-#endif
-typedef unsigned char	uint8;	/* Short for unsigned integer >= 8  bits */
-typedef unsigned short	uint16; /* Short for unsigned integer >= 16 bits */
-
-#if SIZEOF_INT == 4
-#ifndef HAVE_INT_8_16_32
-typedef int		int32;
-#endif
-typedef unsigned int	uint32; /* Short for unsigned integer >= 32 bits */
-#elif SIZEOF_LONG == 4
-#ifndef HAVE_INT_8_16_32
-typedef long		int32;
-#endif
-typedef unsigned long	uint32; /* Short for unsigned integer >= 32 bits */
-#else
-error "Neither int or long is of 4 bytes width"
-#endif
-
-#if !defined(HAVE_ULONG) && !defined(HAVE_LINUXTHREADS) && !defined(__USE_MISC)
-typedef unsigned long	ulong;		  /* Short for unsigned long */
-#endif
-#ifndef longlong_defined
-#if defined(HAVE_LONG_LONG) && SIZEOF_LONG != 8
-typedef unsigned long long int ulonglong; /* ulong or unsigned long long */
-typedef long long int	longlong;
-#else
-typedef unsigned long	ulonglong;	  /* ulong or unsigned long long */
-typedef long		longlong;
-#endif
-#endif
-
-#if defined(NO_CLIENT_LONG_LONG)
-typedef unsigned long my_ulonglong;
-#elif defined (__WIN__)
-typedef unsigned __int64 my_ulonglong;
-#else
-typedef unsigned long long my_ulonglong;
-#endif
-
-#ifdef USE_RAID
-/*
-  The following is done with a if to not get problems with pre-processors
-  with late define evaluation
-*/
-#if SIZEOF_OFF_T == 4
-#define SYSTEM_SIZEOF_OFF_T 4
-#else
-#define SYSTEM_SIZEOF_OFF_T 8
-#endif
-#undef  SIZEOF_OFF_T
-#define SIZEOF_OFF_T	    8
-#else
-#define SYSTEM_SIZEOF_OFF_T SIZEOF_OFF_T
-#endif /* USE_RAID */
-
-#if SIZEOF_OFF_T > 4
-typedef ulonglong my_off_t;
-#else
-typedef unsigned long my_off_t;
-#endif
-#define MY_FILEPOS_ERROR	(~(my_off_t) 0)
-#if !defined(__WIN__) && !defined(OS2)
-typedef off_t os_off_t;
-#endif
-
-#if defined(__WIN__)
-#define socket_errno	WSAGetLastError()
-#define SOCKET_EINTR	WSAEINTR
-#define SOCKET_EAGAIN	WSAEINPROGRESS
-#define SOCKET_EWOULDBLOCK WSAEINPROGRESS
-#define SOCKET_ENFILE	ENFILE
-#define SOCKET_EMFILE	EMFILE
-#elif defined(OS2)
-#define socket_errno	sock_errno()
-#define SOCKET_EINTR	SOCEINTR
-#define SOCKET_EAGAIN	SOCEINPROGRESS
-#define SOCKET_EWOULDBLOCK SOCEWOULDBLOCK
-#define SOCKET_ENFILE	SOCENFILE
-#define SOCKET_EMFILE	SOCEMFILE
-#define closesocket(A)	soclose(A)
-#else /* Unix */
-#define socket_errno	errno
-#define closesocket(A)	close(A)
-#define SOCKET_EINTR	EINTR
-#define SOCKET_EAGAIN	EAGAIN
-#define SOCKET_EWOULDBLOCK EWOULDBLOCK
-#define SOCKET_ENFILE	ENFILE
-#define SOCKET_EMFILE	EMFILE
-#endif
-
-typedef uint8		int7;	/* Most effective integer 0 <= x <= 127 */
-typedef short		int15;	/* Most effective integer 0 <= x <= 32767 */
-typedef char		*my_string; /* String of characters */
-typedef unsigned long	size_s; /* Size of strings (In string-funcs) */
-typedef int		myf;	/* Type of MyFlags in my_funcs */
-#ifndef byte_defined
-typedef char		byte;	/* Smallest addressable unit */
-#endif
-typedef char		my_bool; /* Small bool */
-#if !defined(bool) && !defined(bool_defined) && (!defined(HAVE_BOOL) || !defined(__cplusplus))
-typedef char		bool;	/* Ordinary boolean values 0 1 */
-#endif
-	/* Macros for converting *constants* to the right type */
-#define INT8(v)		(int8) (v)
-#define INT16(v)	(int16) (v)
-#define INT32(v)	(int32) (v)
-#define MYF(v)		(myf) (v)
-
-#ifndef LL
-#ifdef HAVE_LONG_LONG
-#define LL(A) A ## LL
-#else
-#define LL(A) A ## L
-#endif
-#endif
-
-#ifndef ULL
-#ifdef HAVE_LONG_LONG
-#define ULL(A) A ## ULL
-#else
-#define ULL(A) A ## UL
-#endif
-#endif
-
-/*
-  Defines to make it possible to prioritize register assignments. No
-  longer that important with modern compilers.
-*/
-#ifndef USING_X
-#define reg1 register
-#define reg2 register
-#define reg3 register
-#define reg4 register
-#define reg5 register
-#define reg6 register
-#define reg7 register
-#define reg8 register
-#define reg9 register
-#define reg10 register
-#define reg11 register
-#define reg12 register
-#define reg13 register
-#define reg14 register
-#define reg15 register
-#define reg16 register
-#endif
-
-/*
-  Sometimes we want to make sure that the variable is not put into
-  a register in debugging mode so we can see its value in the core
-*/
-
-#ifndef DBUG_OFF
-#define dbug_volatile volatile
-#else
-#define dbug_volatile
-#endif
-
-/* Defines for time function */
-#define SCALE_SEC	100
-#define SCALE_USEC	10000
-#define MY_HOW_OFTEN_TO_ALARM	2	/* How often we want info on screen */
-#define MY_HOW_OFTEN_TO_WRITE	1000	/* How often we want info on screen */
-
-#ifndef set_timespec
-#ifdef HAVE_TIMESPEC_TS_SEC
-#define set_timespec(ABSTIME,SEC) { (ABSTIME).ts_sec=time(0) + (time_t) (SEC); (ABSTIME).ts_nsec=0; }
-#else
-#define set_timespec(ABSTIME,SEC) \
-{\
-  struct timeval tv;\
-  gettimeofday(&tv,0);\
-  (ABSTIME).tv_sec=tv.tv_sec+(time_t) (SEC);\
-  (ABSTIME).tv_nsec=tv.tv_usec*1000;\
-}
-#endif /* HAVE_TIMESPEC_TS_SEC */
-#endif /* set_timespec */
-
-/*
-  Define-funktions for reading and storing in machine independent format
-  (low byte first)
-*/
-
-/* Optimized store functions for Intel x86 */
-#if defined(__i386__) && !defined(_WIN64)
-#define sint2korr(A)	(*((int16 *) (A)))
-#define sint3korr(A)	((int32) ((((uchar) (A)[2]) & 128) ? \
-				  (((uint32) 255L << 24) | \
-				   (((uint32) (uchar) (A)[2]) << 16) |\
-				   (((uint32) (uchar) (A)[1]) << 8) | \
-				   ((uint32) (uchar) (A)[0])) : \
-				  (((uint32) (uchar) (A)[2]) << 16) |\
-				  (((uint32) (uchar) (A)[1]) << 8) | \
-				  ((uint32) (uchar) (A)[0])))
-#define sint4korr(A)	(*((long *) (A)))
-#define uint2korr(A)	(*((uint16 *) (A)))
-#ifdef HAVE_purify
-#define uint3korr(A)	(uint32) (((uint32) ((uchar) (A)[0])) +\
-				  (((uint32) ((uchar) (A)[1])) << 8) +\
-				  (((uint32) ((uchar) (A)[2])) << 16))
-#else
-/*
-   ATTENTION !
-   
-    Please, note, uint3korr reads 4 bytes (not 3) !
-    It means, that you have to provide enough allocated space !
-*/
-#define uint3korr(A)	(long) (*((unsigned int *) (A)) & 0xFFFFFF)
-#endif
-#define uint4korr(A)	(*((unsigned long *) (A)))
-#define uint5korr(A)	((ulonglong)(((uint32) ((uchar) (A)[0])) +\
-				    (((uint32) ((uchar) (A)[1])) << 8) +\
-				    (((uint32) ((uchar) (A)[2])) << 16) +\
-				    (((uint32) ((uchar) (A)[3])) << 24)) +\
-				    (((ulonglong) ((uchar) (A)[4])) << 32))
-#define uint8korr(A)	(*((ulonglong *) (A)))
-#define sint8korr(A)	(*((longlong *) (A)))
-#define int2store(T,A)	*((uint16*) (T))= (uint16) (A)
-#define int3store(T,A)  do { *(T)=  (uchar) ((A));\
-                            *(T+1)=(uchar) (((uint) (A) >> 8));\
-                            *(T+2)=(uchar) (((A) >> 16)); } while (0)
-#define int4store(T,A)	*((long *) (T))= (long) (A)
-#define int5store(T,A)  do { *(T)= (uchar)((A));\
-                             *((T)+1)=(uchar) (((A) >> 8));\
-                             *((T)+2)=(uchar) (((A) >> 16));\
-                             *((T)+3)=(uchar) (((A) >> 24)); \
-                             *((T)+4)=(uchar) (((A) >> 32)); } while(0)
-#define int8store(T,A)	*((ulonglong *) (T))= (ulonglong) (A)
-
-typedef union {
-  double v;
-  long m[2];
-} doubleget_union;
-#define doubleget(V,M)	\
-do { doubleget_union _tmp; \
-     _tmp.m[0] = *((long*)(M)); \
-     _tmp.m[1] = *(((long*) (M))+1); \
-     (V) = _tmp.v; } while(0)
-#define doublestore(T,V) do { *((long *) T) = ((doubleget_union *)&V)->m[0]; \
-			     *(((long *) T)+1) = ((doubleget_union *)&V)->m[1]; \
-                         } while (0)
-#define float4get(V,M) do { *((long *) &(V)) = *((long*) (M)); } while(0)
-#define float8get(V,M) doubleget((V),(M))
-#define float4store(V,M) memcpy((byte*) V,(byte*) (&M),sizeof(float))
-#define floatstore(T,V) memcpy((byte*)(T), (byte*)(&V), sizeof(float))
-#define float8store(V,M) doublestore((V),(M))
-#endif /* __i386__ */
-
-#ifndef sint2korr
-/*
-  We're here if it's not a IA-32 architecture (Win32 and UNIX IA-32 defines
-  were done before)
-*/
-#define sint2korr(A)	(int16) (((int16) ((uchar) (A)[0])) +\
-				 ((int16) ((int16) (A)[1]) << 8))
-#define sint3korr(A)	((int32) ((((uchar) (A)[2]) & 128) ? \
-				  (((uint32) 255L << 24) | \
-				   (((uint32) (uchar) (A)[2]) << 16) |\
-				   (((uint32) (uchar) (A)[1]) << 8) | \
-				   ((uint32) (uchar) (A)[0])) : \
-				  (((uint32) (uchar) (A)[2]) << 16) |\
-				  (((uint32) (uchar) (A)[1]) << 8) | \
-				  ((uint32) (uchar) (A)[0])))
-#define sint4korr(A)	(int32) (((int32) ((uchar) (A)[0])) +\
-				(((int32) ((uchar) (A)[1]) << 8)) +\
-				(((int32) ((uchar) (A)[2]) << 16)) +\
-				(((int32) ((int16) (A)[3]) << 24)))
-#define sint8korr(A)	(longlong) uint8korr(A)
-#define uint2korr(A)	(uint16) (((uint16) ((uchar) (A)[0])) +\
-				  ((uint16) ((uchar) (A)[1]) << 8))
-#define uint3korr(A)	(uint32) (((uint32) ((uchar) (A)[0])) +\
-				  (((uint32) ((uchar) (A)[1])) << 8) +\
-				  (((uint32) ((uchar) (A)[2])) << 16))
-#define uint4korr(A)	(uint32) (((uint32) ((uchar) (A)[0])) +\
-				  (((uint32) ((uchar) (A)[1])) << 8) +\
-				  (((uint32) ((uchar) (A)[2])) << 16) +\
-				  (((uint32) ((uchar) (A)[3])) << 24))
-#define uint5korr(A)	((ulonglong)(((uint32) ((uchar) (A)[0])) +\
-				    (((uint32) ((uchar) (A)[1])) << 8) +\
-				    (((uint32) ((uchar) (A)[2])) << 16) +\
-				    (((uint32) ((uchar) (A)[3])) << 24)) +\
-				    (((ulonglong) ((uchar) (A)[4])) << 32))
-#define uint8korr(A)	((ulonglong)(((uint32) ((uchar) (A)[0])) +\
-				    (((uint32) ((uchar) (A)[1])) << 8) +\
-				    (((uint32) ((uchar) (A)[2])) << 16) +\
-				    (((uint32) ((uchar) (A)[3])) << 24)) +\
-			(((ulonglong) (((uint32) ((uchar) (A)[4])) +\
-				    (((uint32) ((uchar) (A)[5])) << 8) +\
-				    (((uint32) ((uchar) (A)[6])) << 16) +\
-				    (((uint32) ((uchar) (A)[7])) << 24))) <<\
-				    32))
-#define int2store(T,A)       do { uint def_temp= (uint) (A) ;\
-                                  *((uchar*) (T))=  (uchar)(def_temp); \
-                                   *((uchar*) (T)+1)=(uchar)((def_temp >> 8)); \
-                             } while(0)
-#define int3store(T,A)       do { /*lint -save -e734 */\
-                                  *((uchar*)(T))=(uchar) ((A));\
-                                  *((uchar*) (T)+1)=(uchar) (((A) >> 8));\
-                                  *((uchar*)(T)+2)=(uchar) (((A) >> 16)); \
-                                  /*lint -restore */} while(0)
-#define int4store(T,A)       do { *((char *)(T))=(char) ((A));\
-                                  *(((char *)(T))+1)=(char) (((A) >> 8));\
-                                  *(((char *)(T))+2)=(char) (((A) >> 16));\
-                                  *(((char *)(T))+3)=(char) (((A) >> 24)); } while(0)
-#define int5store(T,A)       do { *((char *)(T))=((A));\
-                                  *(((char *)(T))+1)=(((A) >> 8));\
-                                  *(((char *)(T))+2)=(((A) >> 16));\
-                                  *(((char *)(T))+3)=(((A) >> 24)); \
-                                  *(((char *)(T))+4)=(((A) >> 32)); } while(0)
-#define int8store(T,A)       do { uint def_temp= (uint) (A), def_temp2= (uint) ((A) >> 32); \
-                                  int4store((T),def_temp); \
-                                  int4store((T+4),def_temp2); } while(0)
-#ifdef WORDS_BIGENDIAN
-#define float4store(T,A) do { *(T)= ((byte *) &A)[3];\
-                              *((T)+1)=(char) ((byte *) &A)[2];\
-                              *((T)+2)=(char) ((byte *) &A)[1];\
-                              *((T)+3)=(char) ((byte *) &A)[0]; } while(0)
-
-#define float4get(V,M)   do { float def_temp;\
-                              ((byte*) &def_temp)[0]=(M)[3];\
-                              ((byte*) &def_temp)[1]=(M)[2];\
-                              ((byte*) &def_temp)[2]=(M)[1];\
-                              ((byte*) &def_temp)[3]=(M)[0];\
-                              (V)=def_temp; } while(0)
-#define float8store(T,V) do { *(T)= ((byte *) &V)[7];\
-                              *((T)+1)=(char) ((byte *) &V)[6];\
-                              *((T)+2)=(char) ((byte *) &V)[5];\
-                              *((T)+3)=(char) ((byte *) &V)[4];\
-                              *((T)+4)=(char) ((byte *) &V)[3];\
-                              *((T)+5)=(char) ((byte *) &V)[2];\
-                              *((T)+6)=(char) ((byte *) &V)[1];\
-                              *((T)+7)=(char) ((byte *) &V)[0]; } while(0)
-
-#define float8get(V,M)   do { double def_temp;\
-                              ((byte*) &def_temp)[0]=(M)[7];\
-                              ((byte*) &def_temp)[1]=(M)[6];\
-                              ((byte*) &def_temp)[2]=(M)[5];\
-                              ((byte*) &def_temp)[3]=(M)[4];\
-                              ((byte*) &def_temp)[4]=(M)[3];\
-                              ((byte*) &def_temp)[5]=(M)[2];\
-                              ((byte*) &def_temp)[6]=(M)[1];\
-                              ((byte*) &def_temp)[7]=(M)[0];\
-                              (V) = def_temp; } while(0)
-#else
-#define float4get(V,M)   memcpy_fixed((byte*) &V,(byte*) (M),sizeof(float))
-#define float4store(V,M) memcpy_fixed((byte*) V,(byte*) (&M),sizeof(float))
-
-#if defined(__FLOAT_WORD_ORDER) && (__FLOAT_WORD_ORDER == __BIG_ENDIAN)
-#define doublestore(T,V) do { *(T)= ((byte *) &V)[4];\
-                              *(((char*)T)+1)=(char) ((byte *) &V)[5];\
-                              *(((char*)T)+2)=(char) ((byte *) &V)[6];\
-                              *(((char*)T)+3)=(char) ((byte *) &V)[7];\
-                              *(((char*)T)+4)=(char) ((byte *) &V)[0];\
-                              *(((char*)T)+5)=(char) ((byte *) &V)[1];\
-                              *(((char*)T)+6)=(char) ((byte *) &V)[2];\
-                              *(((char*)T)+7)=(char) ((byte *) &V)[3]; }\
-                         while(0)
-#define doubleget(V,M)   do { double def_temp;\
-                              ((byte*) &def_temp)[0]=(M)[4];\
-                              ((byte*) &def_temp)[1]=(M)[5];\
-                              ((byte*) &def_temp)[2]=(M)[6];\
-                              ((byte*) &def_temp)[3]=(M)[7];\
-                              ((byte*) &def_temp)[4]=(M)[0];\
-                              ((byte*) &def_temp)[5]=(M)[1];\
-                              ((byte*) &def_temp)[6]=(M)[2];\
-                              ((byte*) &def_temp)[7]=(M)[3];\
-                              (V) = def_temp; } while(0)
-#endif /* __FLOAT_WORD_ORDER */
-
-#define float8get(V,M)   doubleget((V),(M))
-#define float8store(V,M) doublestore((V),(M))
-#endif /* WORDS_BIGENDIAN */
-
-#endif /* sint2korr */
-
-/*
-  Macro for reading 32-bit integer from network byte order (big-endian)
-  from unaligned memory location.
-*/
-#define int4net(A)        (int32) (((uint32) ((uchar) (A)[3]))        |\
-				  (((uint32) ((uchar) (A)[2])) << 8)  |\
-				  (((uint32) ((uchar) (A)[1])) << 16) |\
-				  (((uint32) ((uchar) (A)[0])) << 24))
-/*
-  Define-funktions for reading and storing in machine format from/to
-  short/long to/from some place in memory V should be a (not
-  register) variable, M is a pointer to byte
-*/
-
-#ifdef WORDS_BIGENDIAN
-
-#define ushortget(V,M)  do { V = (uint16) (((uint16) ((uchar) (M)[1]))+\
-                                 ((uint16) ((uint16) (M)[0]) << 8)); } while(0)
-#define shortget(V,M)   do { V = (short) (((short) ((uchar) (M)[1]))+\
-                                 ((short) ((short) (M)[0]) << 8)); } while(0)
-#define longget(V,M)    do { int32 def_temp;\
-                             ((byte*) &def_temp)[0]=(M)[0];\
-                             ((byte*) &def_temp)[1]=(M)[1];\
-                             ((byte*) &def_temp)[2]=(M)[2];\
-                             ((byte*) &def_temp)[3]=(M)[3];\
-                             (V)=def_temp; } while(0)
-#define ulongget(V,M)   do { uint32 def_temp;\
-                            ((byte*) &def_temp)[0]=(M)[0];\
-                            ((byte*) &def_temp)[1]=(M)[1];\
-                            ((byte*) &def_temp)[2]=(M)[2];\
-                            ((byte*) &def_temp)[3]=(M)[3];\
-                            (V)=def_temp; } while(0)
-#define shortstore(T,A) do { uint def_temp=(uint) (A) ;\
-                             *(((char*)T)+1)=(char)(def_temp); \
-                             *(((char*)T)+0)=(char)(def_temp >> 8); } while(0)
-#define longstore(T,A)  do { *(((char*)T)+3)=((A));\
-                             *(((char*)T)+2)=(((A) >> 8));\
-                             *(((char*)T)+1)=(((A) >> 16));\
-                             *(((char*)T)+0)=(((A) >> 24)); } while(0)
-
-#define floatstore(T,V) memcpy_fixed((byte*)(T), (byte*)(&V), sizeof(float))
-#define doubleget(V,M)	 memcpy_fixed((byte*) &V,(byte*) (M),sizeof(double))
-#define doublestore(T,V) memcpy_fixed((byte*) (T),(byte*) &V,sizeof(double))
-#define longlongget(V,M) memcpy_fixed((byte*) &V,(byte*) (M),sizeof(ulonglong))
-#define longlongstore(T,V) memcpy_fixed((byte*) (T),(byte*) &V,sizeof(ulonglong))
-
-#else
-
-#define ushortget(V,M)	do { V = uint2korr(M); } while(0)
-#define shortget(V,M)	do { V = sint2korr(M); } while(0)
-#define longget(V,M)	do { V = sint4korr(M); } while(0)
-#define ulongget(V,M)   do { V = uint4korr(M); } while(0)
-#define shortstore(T,V) int2store(T,V)
-#define longstore(T,V)	int4store(T,V)
-#ifndef floatstore
-#define floatstore(T,V) memcpy_fixed((byte*)(T), (byte*)(&V), sizeof(float))
-#endif
-#ifndef doubleget
-#define doubleget(V,M)	 memcpy_fixed((byte*) &V,(byte*) (M),sizeof(double))
-#define doublestore(T,V) memcpy_fixed((byte*) (T),(byte*) &V,sizeof(double))
-#endif /* doubleget */
-#define longlongget(V,M) memcpy_fixed((byte*) &V,(byte*) (M),sizeof(ulonglong))
-#define longlongstore(T,V) memcpy_fixed((byte*) (T),(byte*) &V,sizeof(ulonglong))
-
-#endif /* WORDS_BIGENDIAN */
-
-/* sprintf does not always return the number of bytes :- */
-#ifdef SPRINTF_RETURNS_INT
-#define my_sprintf(buff,args) sprintf args
-#else
-#ifdef SPRINTF_RETURNS_PTR
-#define my_sprintf(buff,args) ((int)(sprintf args - buff))
-#else
-#define my_sprintf(buff,args) ((ulong) sprintf args, (ulong) strlen(buff))
-#endif
-#endif
-
-#ifndef THREAD
-#define thread_safe_increment(V,L) (V)++
-#define thread_safe_add(V,C,L)     (V)+=(C)
-#define thread_safe_sub(V,C,L)     (V)-=(C)
-#define statistic_increment(V,L)   (V)++
-#define statistic_add(V,C,L)       (V)+=(C)
-#endif
-
-#ifdef HAVE_CHARSET_utf8
-#define MYSQL_UNIVERSAL_CLIENT_CHARSET "utf8"
-#else
-#define MYSQL_UNIVERSAL_CLIENT_CHARSET MYSQL_DEFAULT_CHARSET_NAME
-#endif
-
-#if defined(EMBEDDED_LIBRARY) && !defined(HAVE_EMBEDDED_PRIVILEGE_CONTROL)
-#define NO_EMBEDDED_ACCESS_CHECKS
-#endif
-
-#endif /* my_global_h */
diff --git a/src/terralib/drivers/MySQL/include/my_list.h b/src/terralib/drivers/MySQL/include/my_list.h
deleted file mode 100644
index f786621..0000000
--- a/src/terralib/drivers/MySQL/include/my_list.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Copyright (C) 2000 MySQL AB
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
-
-#ifndef _list_h_
-#define _list_h_
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-typedef struct st_list {
-  struct st_list *prev,*next;
-  void *data;
-} LIST;
-
-typedef int (*list_walk_action)(void *,void *);
-
-extern LIST *list_add(LIST *root,LIST *element);
-extern LIST *list_delete(LIST *root,LIST *element);
-extern LIST *list_cons(void *data,LIST *root);
-extern LIST *list_reverse(LIST *root);
-extern void list_free(LIST *root,unsigned int free_data);
-extern unsigned int list_length(LIST *);
-extern int list_walk(LIST *,list_walk_action action,gptr argument);
-
-#define rest(a) ((a)->next)
-#define list_push(a,b) (a)=list_cons((b),(a))
-#define list_pop(A) {LIST *old=(A); (A)=list_delete(old,old) ; my_free((gptr) old,MYF(MY_FAE)); }
-
-#ifdef	__cplusplus
-}
-#endif
-#endif
diff --git a/src/terralib/drivers/MySQL/include/my_pthread.h b/src/terralib/drivers/MySQL/include/my_pthread.h
deleted file mode 100644
index cd0cf49..0000000
--- a/src/terralib/drivers/MySQL/include/my_pthread.h
+++ /dev/null
@@ -1,700 +0,0 @@
-/* Copyright (C) 2000 MySQL AB
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
-
-/* Defines to make different thread packages compatible */
-
-#ifndef _my_pthread_h
-#define _my_pthread_h
-
-#include <errno.h>
-#ifndef ETIME
-#define ETIME ETIMEDOUT				/* For FreeBSD */
-#endif
-
-#ifdef  __cplusplus
-extern "C" {
-#endif /* __cplusplus */ 
-
-#if defined(__WIN__) || defined(OS2)
-
-#ifdef OS2
-typedef ULONG     HANDLE;
-typedef ULONG     DWORD;
-typedef int sigset_t;
-#endif
-
-#ifdef OS2
-typedef HMTX             pthread_mutex_t;
-#else
-typedef CRITICAL_SECTION pthread_mutex_t;
-#endif
-typedef HANDLE		 pthread_t;
-typedef struct thread_attr {
-    DWORD dwStackSize ;
-    DWORD dwCreatingFlag ;
-    int priority ;
-} pthread_attr_t ;
-
-typedef struct { int dummy; } pthread_condattr_t;
-
-/* Implementation of posix conditions */
-
-typedef struct st_pthread_link {
-  DWORD thread_id;
-  struct st_pthread_link *next;
-} pthread_link;
-
-typedef struct {
-  uint32 waiting;
-#ifdef OS2
-  HEV    semaphore;
-#else
-  HANDLE semaphore;
-#endif
-} pthread_cond_t;
-
-
-#ifndef OS2
-struct timespec {		/* For pthread_cond_timedwait() */
-    time_t tv_sec;
-    long tv_nsec;
-};
-#endif
-
-typedef int pthread_mutexattr_t;
-#define win_pthread_self my_thread_var->pthread_self
-#ifdef OS2
-#define pthread_handler_decl(A,B) void * _Optlink A(void *B)
-typedef void * (_Optlink *pthread_handler)(void *);
-#else
-#define pthread_handler_decl(A,B) void * __cdecl A(void *B)
-typedef void * (__cdecl *pthread_handler)(void *);
-#endif
-
-void win_pthread_init(void);
-int win_pthread_setspecific(void *A,void *B,uint length);
-int pthread_create(pthread_t *,pthread_attr_t *,pthread_handler,void *);
-int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr);
-int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex);
-int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
-			   struct timespec *abstime);
-int pthread_cond_signal(pthread_cond_t *cond);
-int pthread_cond_broadcast(pthread_cond_t *cond);
-int pthread_cond_destroy(pthread_cond_t *cond);
-int pthread_attr_init(pthread_attr_t *connect_att);
-int pthread_attr_setstacksize(pthread_attr_t *connect_att,DWORD stack);
-int pthread_attr_setprio(pthread_attr_t *connect_att,int priority);
-int pthread_attr_destroy(pthread_attr_t *connect_att);
-struct tm *localtime_r(const time_t *timep,struct tm *tmp);
-struct tm *gmtime_r(const time_t *timep,struct tm *tmp);
-
-
-void pthread_exit(void *a);	 /* was #define pthread_exit(A) ExitThread(A)*/
-
-#ifndef OS2
-#define ETIMEDOUT 145		    /* Win32 doesn't have this */
-#define getpid() GetCurrentThreadId()
-#endif
-#define pthread_self() win_pthread_self
-#define HAVE_LOCALTIME_R		1
-#define _REENTRANT			1
-#define HAVE_PTHREAD_ATTR_SETSTACKSIZE	1
-
-#ifdef USE_TLS					/* For LIBMYSQL.DLL */
-#undef SAFE_MUTEX				/* This will cause conflicts */
-#define pthread_key(T,V)  DWORD V
-#define pthread_key_create(A,B) ((*A=TlsAlloc())==0xFFFFFFFF)
-#define pthread_key_delete(A) TlsFree(A)
-#define pthread_getspecific(A) (TlsGetValue(A))
-#define my_pthread_getspecific(T,A) ((T) TlsGetValue(A))
-#define my_pthread_getspecific_ptr(T,V) ((T) TlsGetValue(V))
-#define my_pthread_setspecific_ptr(T,V) (!TlsSetValue((T),(V)))
-#define pthread_setspecific(A,B) (!TlsSetValue((A),(B)))
-#else
-#define pthread_key(T,V) __declspec(thread) T V
-#define pthread_key_create(A,B) pthread_dummy(0)
-#define pthread_key_delete(A) pthread_dummy(0)
-#define pthread_getspecific(A) (&(A))
-#define my_pthread_getspecific(T,A) (&(A))
-#define my_pthread_getspecific_ptr(T,V) (V)
-#define my_pthread_setspecific_ptr(T,V) ((T)=(V),0)
-#define pthread_setspecific(A,B) win_pthread_setspecific(&(A),(B),sizeof(A))
-#endif /* USE_TLS */
-
-#define pthread_equal(A,B) ((A) == (B))
-#ifdef OS2
-extern int pthread_mutex_init (pthread_mutex_t *, const pthread_mutexattr_t *);
-extern int pthread_mutex_lock (pthread_mutex_t *);
-extern int pthread_mutex_unlock (pthread_mutex_t *);
-extern int pthread_mutex_destroy (pthread_mutex_t *);
-#define my_pthread_setprio(A,B)  DosSetPriority(PRTYS_THREAD,PRTYC_NOCHANGE, B, A)
-#define pthread_kill(A,B) raise(B)
-#define pthread_exit(A) pthread_dummy()
-#else
-#define pthread_mutex_init(A,B)  InitializeCriticalSection(A)
-#define pthread_mutex_lock(A)	 (EnterCriticalSection(A),0)
-#define pthread_mutex_trylock(A) (WaitForSingleObject((A), 0) == WAIT_TIMEOUT)
-#define pthread_mutex_unlock(A)  LeaveCriticalSection(A)
-#define pthread_mutex_destroy(A) DeleteCriticalSection(A)
-#define my_pthread_setprio(A,B)  SetThreadPriority(GetCurrentThread(), (B))
-#define pthread_kill(A,B) pthread_dummy(0)
-#endif /* OS2 */
-
-/* Dummy defines for easier code */
-#define pthread_attr_setdetachstate(A,B) pthread_dummy(0)
-#define my_pthread_attr_setprio(A,B) pthread_attr_setprio(A,B)
-#define pthread_attr_setscope(A,B)
-#define pthread_detach_this_thread()
-#define pthread_condattr_init(A)
-#define pthread_condattr_destroy(A)
-
-/*Irena: compiler does not like this: */
-/*#define my_pthread_getprio(pthread_t thread_id) pthread_dummy(0) */
-#define my_pthread_getprio(thread_id) pthread_dummy(0)
-
-#elif defined(HAVE_UNIXWARE7_THREADS)
-
-#include <thread.h>
-#include <synch.h>
-
-#ifndef _REENTRANT
-#define _REENTRANT
-#endif
-
-#define HAVE_NONPOSIX_SIGWAIT
-#define pthread_t thread_t
-#define pthread_cond_t cond_t
-#define pthread_mutex_t mutex_t
-#define pthread_key_t thread_key_t
-typedef int pthread_attr_t;			/* Needed by Unixware 7.0.0 */
-
-#define pthread_key_create(A,B) thr_keycreate((A),(B))
-#define pthread_key_delete(A) thr_keydelete(A)
-
-#define pthread_handler_decl(A,B) void *A(void *B)
-#define pthread_key(T,V) pthread_key_t V
-
-void *	my_pthread_getspecific_imp(pthread_key_t key);
-#define my_pthread_getspecific(A,B) ((A) my_pthread_getspecific_imp(B))
-#define my_pthread_getspecific_ptr(T,V) my_pthread_getspecific(T,V)
-
-#define pthread_setspecific(A,B) thr_setspecific(A,B)
-#define my_pthread_setspecific_ptr(T,V) pthread_setspecific(T,V)
-
-#define pthread_create(A,B,C,D) thr_create(NULL,65536L,(C),(D),THR_DETACHED,(A))
-#define pthread_cond_init(a,b) cond_init((a),USYNC_THREAD,NULL)
-#define pthread_cond_destroy(a) cond_destroy(a)
-#define pthread_cond_signal(a) cond_signal(a)
-#define pthread_cond_wait(a,b) cond_wait((a),(b))
-#define pthread_cond_timedwait(a,b,c) cond_timedwait((a),(b),(c))
-#define pthread_cond_broadcast(a) cond_broadcast(a)
-
-#define pthread_mutex_init(a,b) mutex_init((a),USYNC_THREAD,NULL)
-#define pthread_mutex_lock(a) mutex_lock(a)
-#define pthread_mutex_unlock(a) mutex_unlock(a)
-#define pthread_mutex_destroy(a) mutex_destroy(a)
-
-#define pthread_self() thr_self()
-#define pthread_exit(A) thr_exit(A)
-#define pthread_equal(A,B) (((A) == (B)) ? 1 : 0)
-#define pthread_kill(A,B) thr_kill((A),(B))
-#define HAVE_PTHREAD_KILL
-
-#define pthread_sigmask(A,B,C) thr_sigsetmask((A),(B),(C))
-
-extern int my_sigwait(const sigset_t *set,int *sig);
-
-#define pthread_detach_this_thread() pthread_dummy(0)
-
-#define pthread_attr_init(A) pthread_dummy(0)
-#define pthread_attr_destroy(A) pthread_dummy(0)
-#define pthread_attr_setscope(A,B) pthread_dummy(0)
-#define pthread_attr_setdetachstate(A,B) pthread_dummy(0)
-#define my_pthread_setprio(A,B) pthread_dummy (0)
-#define my_pthread_getprio(A) pthread_dummy (0)
-#define my_pthread_attr_setprio(A,B) pthread_dummy(0)
-
-#else /* Normal threads */
-
-#ifdef HAVE_rts_threads
-#define sigwait org_sigwait
-#include <signal.h>
-#undef sigwait
-#endif
-#include <pthread.h>
-#ifndef _REENTRANT
-#define _REENTRANT
-#endif
-#ifdef HAVE_THR_SETCONCURRENCY
-#include <thread.h>			/* Probably solaris */
-#endif
-#ifdef HAVE_SCHED_H
-#include <sched.h>
-#endif
-#ifdef HAVE_SYNCH_H
-#include <synch.h>
-#endif
-#if defined(__EMX__) && (!defined(EMX_PTHREAD_REV) || (EMX_PTHREAD_REV < 2))
-#error Requires at least rev 2 of EMX pthreads library.
-#endif
-
-#ifdef __NETWARE__
-void my_pthread_exit(void *status);
-#define pthread_exit(A) my_pthread_exit(A)
-#endif
-
-extern int my_pthread_getprio(pthread_t thread_id);
-
-#define pthread_key(T,V) pthread_key_t V
-#define my_pthread_getspecific_ptr(T,V) my_pthread_getspecific(T,(V))
-#define my_pthread_setspecific_ptr(T,V) pthread_setspecific(T,(void*) (V))
-#define pthread_detach_this_thread()
-#define pthread_handler_decl(A,B) void *A(void *B)
-typedef void *(* pthread_handler)(void *);
-
-/* Test first for RTS or FSU threads */
-
-#if defined(PTHREAD_SCOPE_GLOBAL) && !defined(PTHREAD_SCOPE_SYSTEM)
-#define HAVE_rts_threads
-extern int my_pthread_create_detached;
-#define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C))
-#define PTHREAD_CREATE_DETACHED &my_pthread_create_detached
-#define PTHREAD_SCOPE_SYSTEM  PTHREAD_SCOPE_GLOBAL
-#define PTHREAD_SCOPE_PROCESS PTHREAD_SCOPE_LOCAL
-#define USE_ALARM_THREAD
-#elif defined(HAVE_mit_thread)
-#define USE_ALARM_THREAD
-#undef	HAVE_LOCALTIME_R
-#define HAVE_LOCALTIME_R
-#undef	HAVE_GMTIME_R
-#define HAVE_GMTIME_R
-#undef	HAVE_PTHREAD_ATTR_SETSCOPE
-#define HAVE_PTHREAD_ATTR_SETSCOPE
-#undef HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE	/* If we are running linux */
-#undef HAVE_RWLOCK_T
-#undef HAVE_RWLOCK_INIT
-#undef HAVE_PTHREAD_RWLOCK_RDLOCK
-#undef HAVE_SNPRINTF
-
-#define sigset(A,B) pthread_signal((A),(void (*)(int)) (B))
-#define signal(A,B) pthread_signal((A),(void (*)(int)) (B))
-#define my_pthread_attr_setprio(A,B)
-#endif /* defined(PTHREAD_SCOPE_GLOBAL) && !defined(PTHREAD_SCOPE_SYSTEM) */
-
-#if defined(_BSDI_VERSION) && _BSDI_VERSION < 199910
-int sigwait(sigset_t *set, int *sig);
-#endif
-
-#if defined(HAVE_UNIXWARE7_POSIX)
-#undef HAVE_NONPOSIX_SIGWAIT
-#define HAVE_NONPOSIX_SIGWAIT	/* sigwait takes only 1 argument */
-#endif
-
-#ifndef HAVE_NONPOSIX_SIGWAIT
-#define my_sigwait(A,B) sigwait((A),(B))
-#else
-int my_sigwait(const sigset_t *set,int *sig);
-#endif
-
-#ifdef HAVE_NONPOSIX_PTHREAD_MUTEX_INIT
-#ifndef SAFE_MUTEX
-#define pthread_mutex_init(a,b) my_pthread_mutex_init((a),(b))
-extern int my_pthread_mutex_init(pthread_mutex_t *mp,
-				 const pthread_mutexattr_t *attr);
-#endif /* SAFE_MUTEX */
-#define pthread_cond_init(a,b) my_pthread_cond_init((a),(b))
-extern int my_pthread_cond_init(pthread_cond_t *mp,
-				const pthread_condattr_t *attr);
-#endif /* HAVE_NONPOSIX_PTHREAD_MUTEX_INIT */
-
-#if defined(HAVE_SIGTHREADMASK) && !defined(HAVE_PTHREAD_SIGMASK)
-#define pthread_sigmask(A,B,C) sigthreadmask((A),(B),(C))
-#endif
-
-#if !defined(HAVE_SIGWAIT) && !defined(HAVE_mit_thread) && !defined(HAVE_rts_threads) && !defined(sigwait) && !defined(alpha_linux_port) && !defined(HAVE_NONPOSIX_SIGWAIT) && !defined(HAVE_DEC_3_2_THREADS) && !defined(_AIX)
-int sigwait(sigset_t *setp, int *sigp);		/* Use our implemention */
-#endif
-#if !defined(HAVE_SIGSET) && !defined(HAVE_mit_thread) && !defined(sigset)
-#define sigset(A,B) do { struct sigaction s; sigset_t set;              \
-                         sigemptyset(&set);                             \
-                         s.sa_handler = (B);                            \
-                         s.sa_mask    = set;                            \
-                         s.sa_flags   = 0;                              \
-                         sigaction((A), &s, (struct sigaction *) NULL); \
-                       } while (0)
-#endif
-
-#ifndef my_pthread_setprio
-#if defined(HAVE_PTHREAD_SETPRIO_NP)		/* FSU threads */
-#define my_pthread_setprio(A,B) pthread_setprio_np((A),(B))
-#elif defined(HAVE_PTHREAD_SETPRIO)
-#define my_pthread_setprio(A,B) pthread_setprio((A),(B))
-#else
-extern void my_pthread_setprio(pthread_t thread_id,int prior);
-#endif
-#endif
-
-#ifndef my_pthread_attr_setprio
-#ifdef HAVE_PTHREAD_ATTR_SETPRIO
-#define my_pthread_attr_setprio(A,B) pthread_attr_setprio((A),(B))
-#else
-extern void my_pthread_attr_setprio(pthread_attr_t *attr, int priority);
-#endif
-#endif
-
-#if !defined(HAVE_PTHREAD_ATTR_SETSCOPE) || defined(HAVE_DEC_3_2_THREADS)
-#define pthread_attr_setscope(A,B)
-#undef	HAVE_GETHOSTBYADDR_R			/* No definition */
-#endif
-
-#if defined(HAVE_BROKEN_PTHREAD_COND_TIMEDWAIT) && !defined(SAFE_MUTEX)
-extern int my_pthread_cond_timedwait(pthread_cond_t *cond,
-				     pthread_mutex_t *mutex,
-				     struct timespec *abstime);
-#define pthread_cond_timedwait(A,B,C) my_pthread_cond_timedwait((A),(B),(C))
-#endif
-
-#if defined(OS2)
-#define my_pthread_getspecific(T,A) ((T) &(A))
-#define pthread_setspecific(A,B) win_pthread_setspecific(&(A),(B),sizeof(A))
-#elif !defined( HAVE_NONPOSIX_PTHREAD_GETSPECIFIC)
-#define my_pthread_getspecific(A,B) ((A) pthread_getspecific(B))
-#else
-#define my_pthread_getspecific(A,B) ((A) my_pthread_getspecific_imp(B))
-void *my_pthread_getspecific_imp(pthread_key_t key);
-#endif /* OS2 */
-
-#ifndef HAVE_LOCALTIME_R
-struct tm *localtime_r(const time_t *clock, struct tm *res);
-#endif
-
-#ifndef HAVE_GMTIME_R
-struct tm *gmtime_r(const time_t *clock, struct tm *res);
-#endif
-
-#ifdef HAVE_PTHREAD_CONDATTR_CREATE
-/* DCE threads on HPUX 10.20 */
-#define pthread_condattr_init pthread_condattr_create
-#define pthread_condattr_destroy pthread_condattr_delete
-#endif
-
-/* FSU THREADS */
-#if !defined(HAVE_PTHREAD_KEY_DELETE) && !defined(pthread_key_delete)
-#define pthread_key_delete(A) pthread_dummy(0)
-#endif
-
-#ifdef HAVE_CTHREADS_WRAPPER			/* For MacOSX */
-#define pthread_cond_destroy(A) pthread_dummy(0)
-#define pthread_mutex_destroy(A) pthread_dummy(0)
-#define pthread_attr_delete(A) pthread_dummy(0)
-#define pthread_condattr_delete(A) pthread_dummy(0)
-#define pthread_attr_setstacksize(A,B) pthread_dummy(0)
-#define pthread_equal(A,B) ((A) == (B))
-#define pthread_cond_timedwait(a,b,c) pthread_cond_wait((a),(b))
-#define pthread_attr_init(A) pthread_attr_create(A)
-#define pthread_attr_destroy(A) pthread_attr_delete(A)
-#define pthread_attr_setdetachstate(A,B) pthread_dummy(0)
-#define pthread_create(A,B,C,D) pthread_create((A),*(B),(C),(D))
-#define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C))
-#define pthread_kill(A,B) pthread_dummy(0)
-#undef	pthread_detach_this_thread
-#define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthread_detach(&tmp); }
-#endif
-
-#ifdef HAVE_DARWIN_THREADS
-#define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C))
-#define pthread_kill(A,B) pthread_dummy(0)
-#define pthread_condattr_init(A) pthread_dummy(0)
-#define pthread_condattr_destroy(A) pthread_dummy(0)
-#define pthread_signal(A,B) pthread_dummy(0)
-#undef	pthread_detach_this_thread
-#define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthread_detach(tmp); }
-#undef sigset
-#define sigset(A,B) pthread_signal((A),(void (*)(int)) (B))
-#endif
-
-#if ((defined(HAVE_PTHREAD_ATTR_CREATE) && !defined(HAVE_SIGWAIT)) || defined(HAVE_DEC_3_2_THREADS)) && !defined(HAVE_CTHREADS_WRAPPER)
-/* This is set on AIX_3_2 and Siemens unix (and DEC OSF/1 3.2 too) */
-#define pthread_key_create(A,B) \
-		pthread_keycreate(A,(B) ?\
-				  (pthread_destructor_t) (B) :\
-				  (pthread_destructor_t) pthread_dummy)
-#define pthread_attr_init(A) pthread_attr_create(A)
-#define pthread_attr_destroy(A) pthread_attr_delete(A)
-#define pthread_attr_setdetachstate(A,B) pthread_dummy(0)
-#define pthread_create(A,B,C,D) pthread_create((A),*(B),(C),(D))
-#ifndef pthread_sigmask
-#define pthread_sigmask(A,B,C) sigprocmask((A),(B),(C))
-#endif
-#define pthread_kill(A,B) pthread_dummy(0)
-#undef	pthread_detach_this_thread
-#define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthread_detach(&tmp); }
-#elif !defined(__NETWARE__) /* HAVE_PTHREAD_ATTR_CREATE && !HAVE_SIGWAIT */
-#define HAVE_PTHREAD_KILL
-#endif
-
-#endif /* defined(__WIN__) */
-
-#if defined(HPUX10) && !defined(DONT_REMAP_PTHREAD_FUNCTIONS)
-#undef pthread_cond_timedwait
-#define pthread_cond_timedwait(a,b,c) my_pthread_cond_timedwait((a),(b),(c))
-int my_pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
-			      struct timespec *abstime);
-#endif
-
-#if defined(HPUX10)
-#define pthread_attr_getstacksize(A,B) my_pthread_attr_getstacksize(A,B)
-void my_pthread_attr_getstacksize(pthread_attr_t *attrib, size_t *size);
-#endif
-
-#if defined(HAVE_POSIX1003_4a_MUTEX) && !defined(DONT_REMAP_PTHREAD_FUNCTIONS)
-#undef pthread_mutex_trylock
-#define pthread_mutex_trylock(a) my_pthread_mutex_trylock((a))
-int my_pthread_mutex_trylock(pthread_mutex_t *mutex);
-#endif
-
-	/* safe_mutex adds checking to mutex for easier debugging */
-
-#if defined(__NETWARE__) && !defined(SAFE_MUTEX_DETECT_DESTROY)
-#define SAFE_MUTEX_DETECT_DESTROY
-#endif
-
-typedef struct st_safe_mutex_t
-{
-  pthread_mutex_t global,mutex;
-  const char *file;
-  uint line,count;
-  pthread_t thread;
-#ifdef SAFE_MUTEX_DETECT_DESTROY
-  struct st_safe_mutex_info_t *info;	/* to track destroying of mutexes */
-#endif
-} safe_mutex_t;
-
-#ifdef SAFE_MUTEX_DETECT_DESTROY
-/*
-  Used to track the destroying of mutexes. This needs to be a seperate
-  structure because the safe_mutex_t structure could be freed before
-  the mutexes are destroyed.
-*/
-
-typedef struct st_safe_mutex_info_t
-{
-  struct st_safe_mutex_info_t *next;
-  struct st_safe_mutex_info_t *prev;
-  const char *init_file;
-  uint32 init_line;
-} safe_mutex_info_t;
-#endif /* SAFE_MUTEX_DETECT_DESTROY */
-
-int safe_mutex_init(safe_mutex_t *mp, const pthread_mutexattr_t *attr,
-                    const char *file, uint line);
-int safe_mutex_lock(safe_mutex_t *mp,const char *file, uint line);
-int safe_mutex_unlock(safe_mutex_t *mp,const char *file, uint line);
-int safe_mutex_destroy(safe_mutex_t *mp,const char *file, uint line);
-int safe_cond_wait(pthread_cond_t *cond, safe_mutex_t *mp,const char *file,
-		   uint line);
-int safe_cond_timedwait(pthread_cond_t *cond, safe_mutex_t *mp,
-			struct timespec *abstime, const char *file, uint line);
-void safe_mutex_global_init(void);
-void safe_mutex_end(FILE *file);
-
-	/* Wrappers if safe mutex is actually used */
-#ifdef SAFE_MUTEX
-#undef pthread_mutex_init
-#undef pthread_mutex_lock
-#undef pthread_mutex_unlock
-#undef pthread_mutex_destroy
-#undef pthread_mutex_wait
-#undef pthread_mutex_timedwait
-#undef pthread_mutex_t
-#undef pthread_cond_wait
-#undef pthread_cond_timedwait
-#undef pthread_mutex_trylock
-#define pthread_mutex_init(A,B) safe_mutex_init((A),(B),__FILE__,__LINE__)
-#define pthread_mutex_lock(A) safe_mutex_lock((A),__FILE__,__LINE__)
-#define pthread_mutex_unlock(A) safe_mutex_unlock((A),__FILE__,__LINE__)
-#define pthread_mutex_destroy(A) safe_mutex_destroy((A),__FILE__,__LINE__)
-#define pthread_cond_wait(A,B) safe_cond_wait((A),(B),__FILE__,__LINE__)
-#define pthread_cond_timedwait(A,B,C) safe_cond_timedwait((A),(B),(C),__FILE__,__LINE__)
-#define pthread_mutex_trylock(A) pthread_mutex_lock(A)
-#define pthread_mutex_t safe_mutex_t
-#define safe_mutex_assert_owner(mp) DBUG_ASSERT((mp)->count > 0 && pthread_equal(pthread_self(),(mp)->thread))
-#else
-#define safe_mutex_assert_owner(mp)
-#endif /* SAFE_MUTEX */
-
-	/* READ-WRITE thread locking */
-
-#ifdef HAVE_BROKEN_RWLOCK			/* For OpenUnix */
-#undef HAVE_PTHREAD_RWLOCK_RDLOCK
-#undef HAVE_RWLOCK_INIT
-#undef HAVE_RWLOCK_T
-#endif
-
-#if defined(USE_MUTEX_INSTEAD_OF_RW_LOCKS)
-/* use these defs for simple mutex locking */
-#define rw_lock_t pthread_mutex_t
-#define my_rwlock_init(A,B) pthread_mutex_init((A),(B))
-#define rw_rdlock(A) pthread_mutex_lock((A))
-#define rw_wrlock(A) pthread_mutex_lock((A))
-#define rw_tryrdlock(A) pthread_mutex_trylock((A))
-#define rw_trywrlock(A) pthread_mutex_trylock((A))
-#define rw_unlock(A) pthread_mutex_unlock((A))
-#define rwlock_destroy(A) pthread_mutex_destroy((A))
-#elif defined(HAVE_PTHREAD_RWLOCK_RDLOCK)
-#define rw_lock_t pthread_rwlock_t
-#define my_rwlock_init(A,B) pthread_rwlock_init((A),(B))
-#define rw_rdlock(A) pthread_rwlock_rdlock(A)
-#define rw_wrlock(A) pthread_rwlock_wrlock(A)
-#define rw_tryrdlock(A) pthread_rwlock_tryrdlock((A))
-#define rw_trywrlock(A) pthread_rwlock_trywrlock((A))
-#define rw_unlock(A) pthread_rwlock_unlock(A)
-#define rwlock_destroy(A) pthread_rwlock_destroy(A)
-#elif defined(HAVE_RWLOCK_INIT)
-#ifdef HAVE_RWLOCK_T				/* For example Solaris 2.6-> */
-#define rw_lock_t rwlock_t
-#endif
-#define my_rwlock_init(A,B) rwlock_init((A),USYNC_THREAD,0)
-#else
-/* Use our own version of read/write locks */
-typedef struct _my_rw_lock_t {
-	pthread_mutex_t lock;		/* lock for structure		*/
-	pthread_cond_t	readers;	/* waiting readers		*/
-	pthread_cond_t	writers;	/* waiting writers		*/
-	int		state;		/* -1:writer,0:free,>0:readers	*/
-	int		waiters;	/* number of waiting writers	*/
-} my_rw_lock_t;
-
-#define rw_lock_t my_rw_lock_t
-#define rw_rdlock(A) my_rw_rdlock((A))
-#define rw_wrlock(A) my_rw_wrlock((A))
-#define rw_tryrdlock(A) my_rw_tryrdlock((A))
-#define rw_trywrlock(A) my_rw_trywrlock((A))
-#define rw_unlock(A) my_rw_unlock((A))
-#define rwlock_destroy(A) my_rwlock_destroy((A))
-
-extern int my_rwlock_init(my_rw_lock_t *, void *);
-extern int my_rwlock_destroy(my_rw_lock_t *);
-extern int my_rw_rdlock(my_rw_lock_t *);
-extern int my_rw_wrlock(my_rw_lock_t *);
-extern int my_rw_unlock(my_rw_lock_t *);
-extern int my_rw_tryrdlock(my_rw_lock_t *);
-extern int my_rw_trywrlock(my_rw_lock_t *);
-#endif /* USE_MUTEX_INSTEAD_OF_RW_LOCKS */
-
-#define GETHOSTBYADDR_BUFF_SIZE 2048
-
-#ifndef HAVE_THR_SETCONCURRENCY
-#define thr_setconcurrency(A) pthread_dummy(0)
-#endif
-#if !defined(HAVE_PTHREAD_ATTR_SETSTACKSIZE) && ! defined(pthread_attr_setstacksize)
-#define pthread_attr_setstacksize(A,B) pthread_dummy(0)
-#endif
-
-/* Define mutex types */
-#define MY_MUTEX_INIT_SLOW   NULL
-#define MY_MUTEX_INIT_FAST   NULL
-#define MY_MUTEX_INIT_ERRCHK NULL
-#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
-extern pthread_mutexattr_t my_fast_mutexattr;
-#undef  MY_MUTEX_INIT_FAST
-#define MY_MUTEX_INIT_FAST &my_fast_mutexattr
-#endif
-#ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
-extern pthread_mutexattr_t my_errchk_mutexattr;
-#undef MY_INIT_MUTEX_ERRCHK
-#define MY_INIT_MUTEX_ERRCHK &my_errchk_mutexattr
-#endif
-
-extern my_bool my_thread_global_init(void);
-extern void my_thread_global_end(void);
-extern my_bool my_thread_init(void);
-extern void my_thread_end(void);
-extern const char *my_thread_name(void);
-extern long my_thread_id(void);
-extern int pthread_no_free(void *);
-extern int pthread_dummy(int);
-
-/* All thread specific variables are in the following struct */
-
-#define THREAD_NAME_SIZE 10
-#if defined(__ia64__)
-/*
-  MySQL can survive with 32K, but some glibc libraries require > 128K stack
-  To resolve hostnames
-*/
-#define DEFAULT_THREAD_STACK	(192*1024L)
-#else
-#define DEFAULT_THREAD_STACK	(192*1024)
-#endif
-
-struct st_my_thread_var
-{
-  int thr_errno;
-  pthread_cond_t suspend;
-  pthread_mutex_t mutex;
-  pthread_mutex_t * volatile current_mutex;
-  pthread_cond_t * volatile current_cond;
-  pthread_t pthread_self;
-  long id;
-  int cmp_length;
-  int volatile abort;
-  my_bool init;
-  struct st_my_thread_var *next,**prev;
-  void *opt_info;
-#ifndef DBUG_OFF
-  gptr dbug;
-  char name[THREAD_NAME_SIZE+1];
-#endif
-};
-
-extern struct st_my_thread_var *_my_thread_var(void) __attribute__ ((const));
-#define my_thread_var (_my_thread_var())
-#define my_errno my_thread_var->thr_errno
-/*
-  Keep track of shutdown,signal, and main threads so that my_end() will not
-  report errors with them
-*/
-extern pthread_t shutdown_th, main_th, signal_th;
-
-	/* statistics_xxx functions are for not essential statistic */
-
-#ifndef thread_safe_increment
-#ifdef HAVE_ATOMIC_ADD
-#define thread_safe_increment(V,L) atomic_add(1,(atomic_t*) &V);
-#define thread_safe_add(V,C,L)     atomic_add((C),(atomic_t*) &V);
-#define thread_safe_sub(V,C,L)     atomic_sub((C),(atomic_t*) &V);
-#else
-#define thread_safe_increment(V,L) \
-	pthread_mutex_lock((L)); (V)++; pthread_mutex_unlock((L));
-#define thread_safe_add(V,C,L) \
-	pthread_mutex_lock((L)); (V)+=(C); pthread_mutex_unlock((L));
-#define thread_safe_sub(V,C,L) \
-	pthread_mutex_lock((L)); (V)-=(C); pthread_mutex_unlock((L));
-#endif /* HAVE_ATOMIC_ADD */
-#ifdef SAFE_STATISTICS
-#define statistic_increment(V,L)   thread_safe_increment((V),(L))
-#define statistic_add(V,C,L)       thread_safe_add((V),(C),(L))
-#else
-#define statistic_increment(V,L) (V)++
-#define statistic_add(V,C,L)     (V)+=(C)
-#endif /* SAFE_STATISTICS */
-#endif /* thread_safe_increment */
-
-#ifdef  __cplusplus
-}
-#endif
-#endif /* _my_ptread_h */
diff --git a/src/terralib/drivers/MySQL/include/my_sys.h b/src/terralib/drivers/MySQL/include/my_sys.h
deleted file mode 100644
index 01a7482..0000000
--- a/src/terralib/drivers/MySQL/include/my_sys.h
+++ /dev/null
@@ -1,785 +0,0 @@
-/* Copyright (C) 2000-2003 MySQL AB
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
-
-#ifndef _my_sys_h
-#define _my_sys_h
-C_MODE_START
-
-#ifdef HAVE_AIOWAIT
-#include <sys/asynch.h>			/* Used by record-cache */
-typedef struct my_aio_result {
-  aio_result_t result;
-  int	       pending;
-} my_aio_result;
-#endif
-
-#ifndef THREAD
-extern int NEAR my_errno;		/* Last error in mysys */
-#else
-#include <my_pthread.h>
-#endif
-
-#ifndef _m_ctype_h
-#include <m_ctype.h>                    /* for CHARSET_INFO */
-#endif
-
-#include <stdarg.h>
-#include <typelib.h>
-
-#define MYSYS_PROGRAM_USES_CURSES()  { error_handler_hook = my_message_curses;	mysys_uses_curses=1; }
-#define MYSYS_PROGRAM_DONT_USE_CURSES()  { error_handler_hook = my_message_no_curses; mysys_uses_curses=0;}
-#define MY_INIT(name);		{ my_progname= name; my_init(); }
-
-#define MAXMAPS		(4)	/* Number of error message maps */
-#define ERRMOD		(1000)	/* Max number of errors in a map */
-#define ERRMSGSIZE	(SC_MAXWIDTH)	/* Max length of a error message */
-#define NRERRBUFFS	(2)	/* Buffers for parameters */
-#define MY_FILE_ERROR	((uint) ~0)
-
-	/* General bitmaps for my_func's */
-#define MY_FFNF		1	/* Fatal if file not found */
-#define MY_FNABP	2	/* Fatal if not all bytes read/writen */
-#define MY_NABP		4	/* Error if not all bytes read/writen */
-#define MY_FAE		8	/* Fatal if any error */
-#define MY_WME		16	/* Write message on error */
-#define MY_WAIT_IF_FULL 32	/* Wait and try again if disk full error */
-#define MY_RAID         64      /* Support for RAID (not the "Johnson&Johnson"-s one ;) */
-#define MY_FULL_IO     512      /* For my_read - loop intil I/O
-				   is complete
-				*/
-#define MY_DONT_CHECK_FILESIZE 128	/* Option to init_io_cache() */
-#define MY_LINK_WARNING 32	/* my_redel() gives warning if links */
-#define MY_COPYTIME	64	/* my_redel() copys time */
-#define MY_DELETE_OLD	256	/* my_create_with_symlink() */
-#define MY_RESOLVE_LINK 128	/* my_realpath(); Only resolve links */
-#define MY_HOLD_ORIGINAL_MODES 128  /* my_copy() holds to file modes */
-#define MY_REDEL_MAKE_BACKUP 256
-#define MY_SEEK_NOT_DONE 32	/* my_lock may have to do a seek */
-#define MY_DONT_WAIT	64	/* my_lock() don't wait if can't lock */
-#define MY_ZEROFILL	32	/* my_malloc(), fill array with zero */
-#define MY_ALLOW_ZERO_PTR 64	/* my_realloc() ; zero ptr -> malloc */
-#define MY_FREE_ON_ERROR 128	/* my_realloc() ; Free old ptr on error */
-#define MY_HOLD_ON_ERROR 256	/* my_realloc() ; Return old ptr on error */
-#define MY_THREADSAFE	128	/* pread/pwrite:  Don't allow interrupts */
-#define MY_DONT_OVERWRITE_FILE 1024	/* my_copy; Don't overwrite file */
-
-#define MY_CHECK_ERROR	1	/* Params to my_end; Check open-close */
-#define MY_GIVE_INFO	2	/* Give time info about process*/
-
-#define ME_HIGHBYTE	8	/* Shift for colours */
-#define ME_NOCUR	1	/* Don't use curses message */
-#define ME_OLDWIN	2	/* Use old window */
-#define ME_BELL		4	/* Ring bell then printing message */
-#define ME_HOLDTANG	8	/* Don't delete last keys */
-#define ME_WAITTOT	16	/* Wait for errtime secs of for a action */
-#define ME_WAITTANG	32	/* Wait for a user action  */
-#define ME_NOREFRESH	64	/* Dont refresh screen */
-#define ME_NOINPUT	128	/* Dont use the input libary */
-#define ME_COLOUR1	((1 << ME_HIGHBYTE))	/* Possibly error-colours */
-#define ME_COLOUR2	((2 << ME_HIGHBYTE))
-#define ME_COLOUR3	((3 << ME_HIGHBYTE))
-
-	/* Bits in last argument to fn_format */
-#define MY_REPLACE_DIR		1	/* replace dir in name with 'dir' */
-#define MY_REPLACE_EXT		2	/* replace extension with 'ext' */
-#define MY_UNPACK_FILENAME	4	/* Unpack name (~ -> home) */
-#define MY_PACK_FILENAME	8	/* Pack name (home -> ~) */
-#define MY_RESOLVE_SYMLINKS	16	/* Resolve all symbolic links */
-#define MY_RETURN_REAL_PATH	32	/* return full path for file */
-#define MY_SAFE_PATH		64	/* Return NULL if too long path */
-#define MY_RELATIVE_PATH	128	/* name is relative to 'dir' */
-
-	/* My seek flags */
-#define MY_SEEK_SET	0
-#define MY_SEEK_CUR	1
-#define MY_SEEK_END	2
-
-	/* Some constants */
-#define MY_WAIT_FOR_USER_TO_FIX_PANIC	60	/* in seconds */
-#define MY_WAIT_GIVE_USER_A_MESSAGE	10	/* Every 10 times of prev */
-#define MIN_COMPRESS_LENGTH		50	/* Don't compress small bl. */
-#define DFLT_INIT_HITS  3
-
-	/* root_alloc flags */
-#define MY_KEEP_PREALLOC	1
-#define MY_MARK_BLOCKS_FREE     2  /* move used to free list and reuse them */
-
-	/* Internal error numbers (for assembler functions) */
-#define MY_ERRNO_EDOM		33
-#define MY_ERRNO_ERANGE		34
-
-	/* defines when allocating data */
-#ifdef SAFEMALLOC
-#define my_malloc(SZ,FLAG) _mymalloc((SZ), __FILE__, __LINE__, FLAG )
-#define my_malloc_ci(SZ,FLAG) _mymalloc((SZ), sFile, uLine, FLAG )
-#define my_realloc(PTR,SZ,FLAG) _myrealloc((PTR), (SZ), __FILE__, __LINE__, FLAG )
-#define my_checkmalloc() _sanity( __FILE__, __LINE__ )
-#define my_free(PTR,FLAG) _myfree((PTR), __FILE__, __LINE__,FLAG)
-#define my_memdup(A,B,C) _my_memdup((A),(B), __FILE__,__LINE__,C)
-#define my_strdup(A,C) _my_strdup((A), __FILE__,__LINE__,C)
-#define my_strdup_with_length(A,B,C) _my_strdup_with_length((A),(B),__FILE__,__LINE__,C)
-#define QUICK_SAFEMALLOC sf_malloc_quick=1
-#define NORMAL_SAFEMALLOC sf_malloc_quick=0
-extern uint sf_malloc_prehunc,sf_malloc_endhunc,sf_malloc_quick;
-extern ulonglong sf_malloc_mem_limit;
-
-#define CALLER_INFO_PROTO   , const char *sFile, uint uLine
-#define CALLER_INFO         , __FILE__, __LINE__
-#define ORIG_CALLER_INFO    , sFile, uLine
-#else
-#define my_checkmalloc()
-#undef TERMINATE
-#define TERMINATE(A) {}
-#define QUICK_SAFEMALLOC
-#define NORMAL_SAFEMALLOC
-extern gptr my_malloc(uint Size,myf MyFlags);
-#define my_malloc_ci(SZ,FLAG) my_malloc( SZ, FLAG )
-extern gptr my_realloc(gptr oldpoint,uint Size,myf MyFlags);
-extern void my_no_flags_free(gptr ptr);
-extern gptr my_memdup(const byte *from,uint length,myf MyFlags);
-extern char *my_strdup(const char *from,myf MyFlags);
-extern char *my_strdup_with_length(const byte *from, uint length,
-				   myf MyFlags);
-#define my_free(PTR,FG) my_no_flags_free(PTR)
-#define CALLER_INFO_PROTO   /* nothing */
-#define CALLER_INFO         /* nothing */
-#define ORIG_CALLER_INFO    /* nothing */
-#endif
-
-#ifdef HAVE_ALLOCA
-#if defined(_AIX) && !defined(__GNUC__) && !defined(_AIX43)
-#pragma alloca
-#endif /* _AIX */
-#if defined(__GNUC__) && !defined(HAVE_ALLOCA_H) && ! defined(alloca)
-#define alloca __builtin_alloca
-#endif /* GNUC */
-#define my_alloca(SZ) alloca((size_t) (SZ))
-#define my_afree(PTR) {}
-#else
-#define my_alloca(SZ) my_malloc(SZ,MYF(0))
-#define my_afree(PTR) my_free(PTR,MYF(MY_WME))
-#endif /* HAVE_ALLOCA */
-
-#ifdef MSDOS
-#ifdef __ZTC__
-void * __CDECL halloc(long count,size_t length);
-void   __CDECL hfree(void *ptr);
-#endif
-#if defined(USE_HALLOC)
-#if defined(_VCM_) || defined(M_IC80386)
-#undef USE_HALLOC
-#endif
-#endif
-#ifdef USE_HALLOC
-#define malloc(a) halloc((long) (a),1)
-#define free(a) hfree(a)
-#endif
-#endif /* MSDOS */
-
-#ifdef HAVE_ERRNO_AS_DEFINE
-#include <errno.h>			/* errno is a define */
-#else
-extern int errno;			/* declare errno */
-#endif
-extern const char ** NEAR my_errmsg[];
-extern char NEAR errbuff[NRERRBUFFS][ERRMSGSIZE];
-extern char *home_dir;			/* Home directory for user */
-extern char *my_progname;		/* program-name (printed in errors) */
-extern char NEAR curr_dir[];		/* Current directory for user */
-extern int (*error_handler_hook)(uint my_err, const char *str,myf MyFlags);
-extern int (*fatal_error_handler_hook)(uint my_err, const char *str,
-				       myf MyFlags);
-extern uint my_file_limit;
-
-/* charsets */
-extern CHARSET_INFO *default_charset_info;
-extern CHARSET_INFO *all_charsets[256];
-extern CHARSET_INFO compiled_charsets[];
-
-/* statistics */
-extern ulong	my_cache_w_requests, my_cache_write, my_cache_r_requests,
-		my_cache_read;
-extern ulong	my_blocks_used, my_blocks_changed;
-extern ulong	my_file_opened,my_stream_opened, my_tmp_file_created;
-extern my_bool	my_init_done;
-
-					/* Point to current my_message() */
-extern void (*my_sigtstp_cleanup)(void),
-					/* Executed before jump to shell */
-	    (*my_sigtstp_restart)(void),
-	    (*my_abort_hook)(int);
-					/* Executed when comming from shell */
-extern int NEAR my_umask,		/* Default creation mask  */
-	   NEAR my_umask_dir,
-	   NEAR my_recived_signals,	/* Signals we have got */
-	   NEAR my_safe_to_handle_signal, /* Set when allowed to SIGTSTP */
-	   NEAR my_dont_interrupt;	/* call remember_intr when set */
-extern my_bool NEAR mysys_uses_curses, my_use_symdir;
-extern ulong sf_malloc_cur_memory, sf_malloc_max_memory;
-
-extern ulong	my_default_record_cache_size;
-extern my_bool NEAR my_disable_locking,NEAR my_disable_async_io,
-               NEAR my_disable_flush_key_blocks, NEAR my_disable_symlinks;
-extern char	wild_many,wild_one,wild_prefix;
-extern const char *charsets_dir;
-extern char *defaults_extra_file;
-
-typedef struct wild_file_pack	/* Struct to hold info when selecting files */
-{
-  uint		wilds;		/* How many wildcards */
-  uint		not_pos;	/* Start of not-theese-files */
-  my_string	*wild;		/* Pointer to wildcards */
-} WF_PACK;
-
-enum loglevel {
-   ERROR_LEVEL,
-   WARNING_LEVEL,
-   INFORMATION_LEVEL
-};
-
-enum cache_type
-{
-  READ_CACHE,WRITE_CACHE,
-  SEQ_READ_APPEND		/* sequential read or append */,
-  READ_FIFO, READ_NET,WRITE_NET};
-
-enum flush_type
-{
-  FLUSH_KEEP, FLUSH_RELEASE, FLUSH_IGNORE_CHANGED, FLUSH_FORCE_WRITE
-};
-
-typedef struct st_record_cache	/* Used when cacheing records */
-{
-  File file;
-  int	rc_seek,error,inited;
-  uint	rc_length,read_length,reclength;
-  my_off_t rc_record_pos,end_of_file;
-  byte	*rc_buff,*rc_buff2,*rc_pos,*rc_end,*rc_request_pos;
-#ifdef HAVE_AIOWAIT
-  int	use_async_io;
-  my_aio_result aio_result;
-#endif
-  enum cache_type type;
-} RECORD_CACHE;
-
-enum file_type
-{
-  UNOPEN = 0, FILE_BY_OPEN, FILE_BY_CREATE, STREAM_BY_FOPEN, STREAM_BY_FDOPEN,
-  FILE_BY_MKSTEMP, FILE_BY_DUP
-};
-
-struct st_my_file_info
-{
-  my_string		name;
-  enum file_type	type;
-#if defined(THREAD) && !defined(HAVE_PREAD)
-  pthread_mutex_t	mutex;
-#endif
-};
-
-extern struct st_my_file_info *my_file_info;
-
-typedef struct st_my_tmpdir
-{
-  char **list;
-  uint cur, max;
-#ifdef THREAD
-  pthread_mutex_t mutex;
-#endif
-} MY_TMPDIR;
-
-typedef struct st_dynamic_array
-{
-  char *buffer;
-  uint elements,max_element;
-  uint alloc_increment;
-  uint size_of_element;
-} DYNAMIC_ARRAY;
-
-typedef struct st_dynamic_string
-{
-  char *str;
-  uint length,max_length,alloc_increment;
-} DYNAMIC_STRING;
-
-struct st_io_cache;
-typedef int (*IO_CACHE_CALLBACK)(struct st_io_cache*);
-
-#ifdef THREAD
-typedef struct st_io_cache_share
-{
-  /* to sync on reads into buffer */
-  pthread_mutex_t mutex;
-  pthread_cond_t  cond;
-  int             count, total;
-  /* actual IO_CACHE that filled the buffer */
-  struct st_io_cache *active;
-#ifdef NOT_YET_IMPLEMENTED
-  /* whether the structure should be free'd */
-  my_bool alloced;
-#endif
-} IO_CACHE_SHARE;
-#endif
-
-typedef struct st_io_cache		/* Used when cacheing files */
-{
-  /* Offset in file corresponding to the first byte of byte* buffer. */
-  my_off_t pos_in_file;
-  /*
-    The offset of end of file for READ_CACHE and WRITE_CACHE.
-    For SEQ_READ_APPEND it the maximum of the actual end of file and
-    the position represented by read_end.
-  */
-  my_off_t end_of_file;
-  /* Points to current read position in the buffer */
-  byte	*read_pos;
-  /* the non-inclusive boundary in the buffer for the currently valid read */
-  byte  *read_end;
-  byte  *buffer;				/* The read buffer */
-  /* Used in ASYNC_IO */
-  byte  *request_pos;
-
-  /* Only used in WRITE caches and in SEQ_READ_APPEND to buffer writes */
-  byte  *write_buffer;
-  /*
-    Only used in SEQ_READ_APPEND, and points to the current read position
-    in the write buffer. Note that reads in SEQ_READ_APPEND caches can
-    happen from both read buffer (byte* buffer) and write buffer
-    (byte* write_buffer).
-  */
-  byte *append_read_pos;
-  /* Points to current write position in the write buffer */
-  byte *write_pos;
-  /* The non-inclusive boundary of the valid write area */
-  byte *write_end;
-
-  /*
-    Current_pos and current_end are convenience variables used by
-    my_b_tell() and other routines that need to know the current offset
-    current_pos points to &write_pos, and current_end to &write_end in a
-    WRITE_CACHE, and &read_pos and &read_end respectively otherwise
-  */
-  byte  **current_pos, **current_end;
-#ifdef THREAD
-  /*
-    The lock is for append buffer used in SEQ_READ_APPEND cache
-    need mutex copying from append buffer to read buffer.
-  */
-  pthread_mutex_t append_buffer_lock;
-  /*
-    The following is used when several threads are reading the
-    same file in parallel. They are synchronized on disk
-    accesses reading the cached part of the file asynchronously.
-    It should be set to NULL to disable the feature.  Only
-    READ_CACHE mode is supported.
-  */
-  IO_CACHE_SHARE *share;
-#endif
-  /*
-    A caller will use my_b_read() macro to read from the cache
-    if the data is already in cache, it will be simply copied with
-    memcpy() and internal variables will be accordinging updated with
-    no functions invoked. However, if the data is not fully in the cache,
-    my_b_read() will call read_function to fetch the data. read_function
-    must never be invoked directly.
-  */
-  int (*read_function)(struct st_io_cache *,byte *,uint);
-  /*
-    Same idea as in the case of read_function, except my_b_write() needs to
-    be replaced with my_b_append() for a SEQ_READ_APPEND cache
-  */
-  int (*write_function)(struct st_io_cache *,const byte *,uint);
-  /*
-    Specifies the type of the cache. Depending on the type of the cache
-    certain operations might not be available and yield unpredicatable
-    results. Details to be documented later
-  */
-  enum cache_type type;
-  /*
-    Callbacks when the actual read I/O happens. These were added and
-    are currently used for binary logging of LOAD DATA INFILE - when a
-    block is read from the file, we create a block create/append event, and
-    when IO_CACHE is closed, we create an end event. These functions could,
-    of course be used for other things
-  */
-  IO_CACHE_CALLBACK pre_read;
-  IO_CACHE_CALLBACK post_read;
-  IO_CACHE_CALLBACK pre_close;
-  /*
-    Counts the number of times, when we were forced to use disk. We use it to
-    increase the binlog_cache_disk_use status variable.
-  */
-  ulong disk_writes;
-  void* arg;				/* for use by pre/post_read */
-  char *file_name;			/* if used with 'open_cached_file' */
-  char *dir,*prefix;
-  File file; /* file descriptor */
-  /*
-    seek_not_done is set by my_b_seek() to inform the upcoming read/write
-    operation that a seek needs to be preformed prior to the actual I/O
-    error is 0 if the cache operation was successful, -1 if there was a
-    "hard" error, and the actual number of I/O-ed bytes if the read/write was
-    partial.
-  */
-  int	seek_not_done,error;
-  /* buffer_length is memory size allocated for buffer or write_buffer */
-  uint	buffer_length;
-  /* read_length is the same as buffer_length except when we use async io */
-  uint  read_length;
-  myf	myflags;			/* Flags used to my_read/my_write */
-  /*
-    alloced_buffer is 1 if the buffer was allocated by init_io_cache() and
-    0 if it was supplied by the user.
-    Currently READ_NET is the only one that will use a buffer allocated
-    somewhere else
-  */
-  my_bool alloced_buffer;
-#ifdef HAVE_AIOWAIT
-  /*
-    As inidicated by ifdef, this is for async I/O, which is not currently
-    used (because it's not reliable on all systems)
-  */
-  uint inited;
-  my_off_t aio_read_pos;
-  my_aio_result aio_result;
-#endif
-} IO_CACHE;
-
-typedef int (*qsort2_cmp)(const void *, const void *, const void *);
-
-	/* defines for mf_iocache */
-
-	/* Test if buffer is inited */
-#define my_b_clear(info) (info)->buffer=0
-#define my_b_inited(info) (info)->buffer
-#define my_b_EOF INT_MIN
-
-#define my_b_read(info,Buffer,Count) \
-  ((info)->read_pos + (Count) <= (info)->read_end ?\
-   (memcpy(Buffer,(info)->read_pos,(size_t) (Count)), \
-    ((info)->read_pos+=(Count)),0) :\
-   (*(info)->read_function)((info),Buffer,Count))
-
-#define my_b_write(info,Buffer,Count) \
- ((info)->write_pos + (Count) <=(info)->write_end ?\
-  (memcpy((info)->write_pos, (Buffer), (size_t)(Count)),\
-   ((info)->write_pos+=(Count)),0) : \
-   (*(info)->write_function)((info),(Buffer),(Count)))
-
-#define my_b_get(info) \
-  ((info)->read_pos != (info)->read_end ?\
-   ((info)->read_pos++, (int) (uchar) (info)->read_pos[-1]) :\
-   _my_b_get(info))
-
-	/* my_b_write_byte dosn't have any err-check */
-#define my_b_write_byte(info,chr) \
-  (((info)->write_pos < (info)->write_end) ?\
-   ((*(info)->write_pos++)=(chr)) :\
-   (_my_b_write(info,0,0) , ((*(info)->write_pos++)=(chr))))
-
-#define my_b_fill_cache(info) \
-  (((info)->read_end=(info)->read_pos),(*(info)->read_function)(info,0,0))
-
-#define my_b_tell(info) ((info)->pos_in_file + \
-			 (uint) (*(info)->current_pos - (info)->request_pos))
-
-/* tell write offset in the SEQ_APPEND cache */
-my_off_t my_b_append_tell(IO_CACHE* info);
-
-#define my_b_bytes_in_cache(info) (uint) (*(info)->current_end - \
-					  *(info)->current_pos)
-
-typedef uint32 ha_checksum;
-
-#include <my_alloc.h>
-
-	/* Prototypes for mysys and my_func functions */
-
-extern int my_copy(const char *from,const char *to,myf MyFlags);
-extern int my_append(const char *from,const char *to,myf MyFlags);
-extern int my_delete(const char *name,myf MyFlags);
-extern int my_getwd(my_string buf,uint size,myf MyFlags);
-extern int my_setwd(const char *dir,myf MyFlags);
-extern int my_lock(File fd,int op,my_off_t start, my_off_t length,myf MyFlags);
-extern gptr my_once_alloc(uint Size,myf MyFlags);
-extern void my_once_free(void);
-extern char *my_once_strdup(const char *src,myf myflags);
-extern char *my_once_memdup(const char *src, uint len, myf myflags);
-extern my_string my_tempnam(const char *dir,const char *pfx,myf MyFlags);
-extern File my_open(const char *FileName,int Flags,myf MyFlags);
-extern File my_register_filename(File fd, const char *FileName,
-				 enum file_type type_of_file,
-				 uint error_message_number, myf MyFlags);
-extern File my_create(const char *FileName,int CreateFlags,
-		      int AccsesFlags, myf MyFlags);
-extern int my_close(File Filedes,myf MyFlags);
-extern File my_dup(File file, myf MyFlags);
-extern int my_mkdir(const char *dir, int Flags, myf MyFlags);
-extern int my_readlink(char *to, const char *filename, myf MyFlags);
-extern int my_realpath(char *to, const char *filename, myf MyFlags);
-extern File my_create_with_symlink(const char *linkname, const char *filename,
-				   int createflags, int access_flags,
-				   myf MyFlags);
-extern int my_delete_with_symlink(const char *name, myf MyFlags);
-extern int my_rename_with_symlink(const char *from,const char *to,myf MyFlags);
-extern int my_symlink(const char *content, const char *linkname, myf MyFlags);
-extern uint my_read(File Filedes,byte *Buffer,uint Count,myf MyFlags);
-extern uint my_pread(File Filedes,byte *Buffer,uint Count,my_off_t offset,
-		     myf MyFlags);
-extern int my_rename(const char *from,const char *to,myf MyFlags);
-extern my_off_t my_seek(File fd,my_off_t pos,int whence,myf MyFlags);
-extern my_off_t my_tell(File fd,myf MyFlags);
-extern uint my_write(File Filedes,const byte *Buffer,uint Count,
-		     myf MyFlags);
-extern uint my_pwrite(File Filedes,const byte *Buffer,uint Count,
-		      my_off_t offset,myf MyFlags);
-extern uint my_fread(FILE *stream,byte *Buffer,uint Count,myf MyFlags);
-extern uint my_fwrite(FILE *stream,const byte *Buffer,uint Count,
-		      myf MyFlags);
-extern my_off_t my_fseek(FILE *stream,my_off_t pos,int whence,myf MyFlags);
-extern my_off_t my_ftell(FILE *stream,myf MyFlags);
-extern gptr _mymalloc(uint uSize,const char *sFile,
-		      uint uLine, myf MyFlag);
-extern gptr _myrealloc(gptr pPtr,uint uSize,const char *sFile,
-		       uint uLine, myf MyFlag);
-extern gptr my_multi_malloc _VARARGS((myf MyFlags, ...));
-extern void _myfree(gptr pPtr,const char *sFile,uint uLine, myf MyFlag);
-extern int _sanity(const char *sFile,unsigned int uLine);
-extern gptr _my_memdup(const byte *from,uint length,
-		       const char *sFile, uint uLine,myf MyFlag);
-extern my_string _my_strdup(const char *from, const char *sFile, uint uLine,
-			    myf MyFlag);
-extern char *_my_strdup_with_length(const byte *from, uint length,
-				    const char *sFile, uint uLine,
-				    myf MyFlag);
-
-
-#ifndef TERMINATE
-extern void TERMINATE(FILE *file);
-#endif
-extern void init_glob_errs(void);
-extern FILE *my_fopen(const char *FileName,int Flags,myf MyFlags);
-extern FILE *my_fdopen(File Filedes,const char *name, int Flags,myf MyFlags);
-extern int my_fclose(FILE *fd,myf MyFlags);
-extern int my_chsize(File fd,my_off_t newlength, int filler, myf MyFlags);
-extern int my_sync(File fd, myf my_flags);
-extern int my_error _VARARGS((int nr,myf MyFlags, ...));
-extern int my_printf_error _VARARGS((uint my_err, const char *format,
-				     myf MyFlags, ...)
-				    __attribute__ ((format (printf, 2, 4))));
-extern int my_message(uint my_err, const char *str,myf MyFlags);
-extern int my_message_no_curses(uint my_err, const char *str,myf MyFlags);
-extern int my_message_curses(uint my_err, const char *str,myf MyFlags);
-extern my_bool my_init(void);
-extern void my_end(int infoflag);
-extern int my_redel(const char *from, const char *to, int MyFlags);
-extern int my_copystat(const char *from, const char *to, int MyFlags);
-extern my_string my_filename(File fd);
-
-#ifndef THREAD
-extern void dont_break(void);
-extern void allow_break(void);
-#else
-#define dont_break()
-#define allow_break()
-#endif
-
-extern my_bool init_tmpdir(MY_TMPDIR *tmpdir, const char *pathlist);
-extern char *my_tmpdir(MY_TMPDIR *tmpdir);
-extern void free_tmpdir(MY_TMPDIR *tmpdir);
-
-extern void my_remember_signal(int signal_number,sig_handler (*func)(int));
-extern uint dirname_part(my_string to,const char *name);
-extern uint dirname_length(const char *name);
-#define base_name(A) (A+dirname_length(A))
-extern int test_if_hard_path(const char *dir_name);
-extern char *convert_dirname(char *to, const char *from, const char *from_end);
-extern void to_unix_path(my_string name);
-extern my_string fn_ext(const char *name);
-extern my_string fn_same(my_string toname,const char *name,int flag);
-extern my_string fn_format(my_string to,const char *name,const char *dir,
-			   const char *form, uint flag);
-extern size_s strlength(const char *str);
-extern void pack_dirname(my_string to,const char *from);
-extern uint unpack_dirname(my_string to,const char *from);
-extern uint cleanup_dirname(my_string to,const char *from);
-extern uint system_filename(my_string to,const char *from);
-extern uint unpack_filename(my_string to,const char *from);
-extern my_string intern_filename(my_string to,const char *from);
-extern my_string directory_file_name(my_string dst, const char *src);
-extern int pack_filename(my_string to, const char *name, size_s max_length);
-extern my_string my_path(my_string to,const char *progname,
-			 const char *own_pathname_part);
-extern my_string my_load_path(my_string to, const char *path,
-			      const char *own_path_prefix);
-extern int wild_compare(const char *str,const char *wildstr,pbool str_is_pattern);
-extern WF_PACK *wf_comp(my_string str);
-extern int wf_test(struct wild_file_pack *wf_pack,const char *name);
-extern void wf_end(struct wild_file_pack *buffer);
-extern size_s strip_sp(my_string str);
-extern void get_date(my_string to,int timeflag,time_t use_time);
-extern void soundex(CHARSET_INFO *, my_string out_pntr, my_string in_pntr,pbool remove_garbage);
-extern int init_record_cache(RECORD_CACHE *info,uint cachesize,File file,
-			     uint reclength,enum cache_type type,
-			     pbool use_async_io);
-extern int read_cache_record(RECORD_CACHE *info,byte *to);
-extern int end_record_cache(RECORD_CACHE *info);
-extern int write_cache_record(RECORD_CACHE *info,my_off_t filepos,
-			      const byte *record,uint length);
-extern int flush_write_cache(RECORD_CACHE *info);
-extern long my_clock(void);
-extern sig_handler sigtstp_handler(int signal_number);
-extern void handle_recived_signals(void);
-
-extern sig_handler my_set_alarm_variable(int signo);
-extern void my_string_ptr_sort(void *base,uint items,size_s size);
-extern void radixsort_for_str_ptr(uchar* base[], uint number_of_elements,
-				  size_s size_of_element,uchar *buffer[]);
-extern qsort_t qsort2(void *base_ptr, size_t total_elems, size_t size,
-		      qsort2_cmp cmp, void *cmp_argument);
-extern qsort2_cmp get_ptr_compare(uint);
-extern int init_io_cache(IO_CACHE *info,File file,uint cachesize,
-			 enum cache_type type,my_off_t seek_offset,
-			 pbool use_async_io, myf cache_myflags);
-extern my_bool reinit_io_cache(IO_CACHE *info,enum cache_type type,
-			       my_off_t seek_offset,pbool use_async_io,
-			       pbool clear_cache);
-extern int _my_b_read(IO_CACHE *info,byte *Buffer,uint Count);
-#ifdef THREAD
-extern int _my_b_read_r(IO_CACHE *info,byte *Buffer,uint Count);
-extern void init_io_cache_share(IO_CACHE *info,
-				IO_CACHE_SHARE *s, uint num_threads);
-extern void remove_io_thread(IO_CACHE *info);
-#endif
-extern int _my_b_seq_read(IO_CACHE *info,byte *Buffer,uint Count);
-extern int _my_b_net_read(IO_CACHE *info,byte *Buffer,uint Count);
-extern int _my_b_get(IO_CACHE *info);
-extern int _my_b_async_read(IO_CACHE *info,byte *Buffer,uint Count);
-extern int _my_b_write(IO_CACHE *info,const byte *Buffer,uint Count);
-extern int my_b_append(IO_CACHE *info,const byte *Buffer,uint Count);
-extern int my_b_safe_write(IO_CACHE *info,const byte *Buffer,uint Count);
-
-extern int my_block_write(IO_CACHE *info, const byte *Buffer,
-			  uint Count, my_off_t pos);
-extern int my_b_flush_io_cache(IO_CACHE *info, int need_append_buffer_lock);
-
-#define flush_io_cache(info) my_b_flush_io_cache((info),1)
-
-extern int end_io_cache(IO_CACHE *info);
-extern uint my_b_fill(IO_CACHE *info);
-extern void my_b_seek(IO_CACHE *info,my_off_t pos);
-extern uint my_b_gets(IO_CACHE *info, char *to, uint max_length);
-extern my_off_t my_b_filelength(IO_CACHE *info);
-extern uint my_b_printf(IO_CACHE *info, const char* fmt, ...);
-extern uint my_b_vprintf(IO_CACHE *info, const char* fmt, va_list ap);
-extern my_bool open_cached_file(IO_CACHE *cache,const char *dir,
-				 const char *prefix, uint cache_size,
-				 myf cache_myflags);
-extern my_bool real_open_cached_file(IO_CACHE *cache);
-extern void close_cached_file(IO_CACHE *cache);
-File create_temp_file(char *to, const char *dir, const char *pfx,
-		      int mode, myf MyFlags);
-#define my_init_dynamic_array(A,B,C,D) init_dynamic_array(A,B,C,D CALLER_INFO)
-#define my_init_dynamic_array_ci(A,B,C,D) init_dynamic_array(A,B,C,D ORIG_CALLER_INFO)
-extern my_bool init_dynamic_array(DYNAMIC_ARRAY *array,uint element_size,
-	  uint init_alloc,uint alloc_increment CALLER_INFO_PROTO);
-extern my_bool insert_dynamic(DYNAMIC_ARRAY *array,gptr element);
-extern byte *alloc_dynamic(DYNAMIC_ARRAY *array);
-extern byte *pop_dynamic(DYNAMIC_ARRAY*);
-extern my_bool set_dynamic(DYNAMIC_ARRAY *array,gptr element,uint array_index);
-extern void get_dynamic(DYNAMIC_ARRAY *array,gptr element,uint array_index);
-extern void delete_dynamic(DYNAMIC_ARRAY *array);
-extern void delete_dynamic_element(DYNAMIC_ARRAY *array, uint array_index);
-extern void freeze_size(DYNAMIC_ARRAY *array);
-#define dynamic_array_ptr(array,array_index) ((array)->buffer+(array_index)*(array)->size_of_element)
-#define dynamic_element(array,array_index,type) ((type)((array)->buffer) +(array_index))
-#define push_dynamic(A,B) insert_dynamic(A,B)
-#define reset_dynamic(array) ((array)->elements= 0)
-
-extern my_bool init_dynamic_string(DYNAMIC_STRING *str, const char *init_str,
-				   uint init_alloc,uint alloc_increment);
-extern my_bool dynstr_append(DYNAMIC_STRING *str, const char *append);
-my_bool dynstr_append_mem(DYNAMIC_STRING *str, const char *append,
-			  uint length);
-extern my_bool dynstr_set(DYNAMIC_STRING *str, const char *init_str);
-extern my_bool dynstr_realloc(DYNAMIC_STRING *str, ulong additional_size);
-extern void dynstr_free(DYNAMIC_STRING *str);
-#ifdef HAVE_MLOCK
-extern byte *my_malloc_lock(uint length,myf flags);
-extern void my_free_lock(byte *ptr,myf flags);
-#else
-#define my_malloc_lock(A,B) my_malloc((A),(B))
-#define my_free_lock(A,B) my_free((A),(B))
-#endif
-#define alloc_root_inited(A) ((A)->min_malloc != 0)
-#define ALLOC_ROOT_MIN_BLOCK_SIZE (MALLOC_OVERHEAD + sizeof(USED_MEM) + 8)
-#define clear_alloc_root(A) do { (A)->free= (A)->used= (A)->pre_alloc= 0; (A)->min_malloc=0;} while(0)
-extern void init_alloc_root(MEM_ROOT *mem_root, uint block_size,
-			    uint pre_alloc_size);
-extern gptr alloc_root(MEM_ROOT *mem_root,unsigned int Size);
-extern void free_root(MEM_ROOT *root, myf MyFLAGS);
-extern void set_prealloc_root(MEM_ROOT *root, char *ptr);
-extern void reset_root_defaults(MEM_ROOT *mem_root, uint block_size,
-                                uint prealloc_size);
-extern char *strdup_root(MEM_ROOT *root,const char *str);
-extern char *strmake_root(MEM_ROOT *root,const char *str,uint len);
-extern char *memdup_root(MEM_ROOT *root,const char *str,uint len);
-extern int load_defaults(const char *conf_file, const char **groups,
-			 int *argc, char ***argv);
-extern void free_defaults(char **argv);
-extern void print_defaults(const char *conf_file, const char **groups);
-extern my_bool my_compress(byte *, ulong *, ulong *);
-extern my_bool my_uncompress(byte *, ulong *, ulong *);
-extern byte *my_compress_alloc(const byte *packet, ulong *len, ulong *complen);
-extern ha_checksum my_checksum(ha_checksum crc, const byte *mem, uint count);
-extern uint my_bit_log2(ulong value);
-extern uint my_count_bits(ulonglong v);
-extern void my_sleep(ulong m_seconds);
-extern ulong crc32(ulong crc, const uchar *buf, uint len);
-extern uint my_set_max_open_files(uint files);
-void my_free_open_file_info(void);
-
-ulonglong my_getsystime(void);
-my_bool my_gethwaddr(uchar *to);
-
-/* character sets */
-extern uint get_charset_number(const char *cs_name, uint cs_flags);
-extern uint get_collation_number(const char *name);
-extern const char *get_charset_name(uint cs_number);
-
-extern CHARSET_INFO *get_charset(uint cs_number, myf flags);
-extern CHARSET_INFO *get_charset_by_name(const char *cs_name, myf flags);
-extern CHARSET_INFO *get_charset_by_csname(const char *cs_name,
-					   uint cs_flags, myf my_flags);
-extern void free_charsets(void);
-extern char *get_charsets_dir(char *buf);
-extern my_bool my_charset_same(CHARSET_INFO *cs1, CHARSET_INFO *cs2);
-extern my_bool init_compiled_charsets(myf flags);
-extern void add_compiled_collation(CHARSET_INFO *cs);
-extern ulong escape_string_for_mysql(CHARSET_INFO *charset_info, char *to,
-                                     const char *from, ulong length);
-
-#ifdef __WIN__
-extern my_bool have_tcpip;		/* Is set if tcpip is used */
-#endif
-#ifdef __NETWARE__
-void netware_reg_user(const char *ip, const char *user,
-		      const char *application);
-#endif
-
-C_MODE_END
-#include "raid.h"
-#endif /* _my_sys_h */
diff --git a/src/terralib/drivers/MySQL/include/mysql.h b/src/terralib/drivers/MySQL/include/mysql.h
deleted file mode 100644
index 1c88602..0000000
--- a/src/terralib/drivers/MySQL/include/mysql.h
+++ /dev/null
@@ -1,742 +0,0 @@
-/* Copyright (C) 2000-2003 MySQL AB
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
-
-#ifndef _mysql_h
-#define _mysql_h
-
-#ifdef __CYGWIN__     /* CYGWIN implements a UNIX API */
-#undef WIN
-#undef _WIN
-#undef _WIN32
-#undef _WIN64
-#undef __WIN__
-#endif
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-#ifndef _global_h				/* If not standard header */
-#include <sys/types.h>
-#ifdef __LCC__
-#include <winsock.h>				/* For windows */
-#endif
-typedef char my_bool;
-#if (defined(_WIN32) || defined(_WIN64)) && !defined(__WIN__)
-#define __WIN__
-#endif
-#if !defined(__WIN__)
-#define STDCALL
-#else
-#define STDCALL __stdcall
-#endif
-typedef char * gptr;
-
-#ifndef my_socket_defined
-#ifdef __WIN__
-#define my_socket SOCKET
-#else
-typedef int my_socket;
-#endif /* __WIN__ */
-#endif /* my_socket_defined */
-#endif /* _global_h */
-
-#include "mysql_com.h"
-#include "mysql_time.h"
-#include "mysql_version.h"
-#include "typelib.h"
-
-#include "my_list.h" /* for LISTs used in 'MYSQL' and 'MYSQL_STMT' */
-
-extern unsigned int mysql_port;
-extern char *mysql_unix_port;
-
-#define CLIENT_NET_READ_TIMEOUT		365*24*3600	/* Timeout on read */
-#define CLIENT_NET_WRITE_TIMEOUT	365*24*3600	/* Timeout on write */
-
-#ifdef __NETWARE__
-#pragma pack(push, 8)		/* 8 byte alignment */
-#endif
-
-#define IS_PRI_KEY(n)	((n) & PRI_KEY_FLAG)
-#define IS_NOT_NULL(n)	((n) & NOT_NULL_FLAG)
-#define IS_BLOB(n)	((n) & BLOB_FLAG)
-#define IS_NUM(t)	((t) <= FIELD_TYPE_INT24 || (t) == FIELD_TYPE_YEAR)
-#define IS_NUM_FIELD(f)	 ((f)->flags & NUM_FLAG)
-#define INTERNAL_NUM_FIELD(f) (((f)->type <= FIELD_TYPE_INT24 && ((f)->type != FIELD_TYPE_TIMESTAMP || (f)->length == 14 || (f)->length == 8)) || (f)->type == FIELD_TYPE_YEAR)
-
-
-typedef struct st_mysql_field {
-  char *name;                 /* Name of column */
-  char *org_name;             /* Original column name, if an alias */ 
-  char *table;                /* Table of column if column was a field */
-  char *org_table;            /* Org table name, if table was an alias */
-  char *db;                   /* Database for table */
-  char *catalog;	      /* Catalog for table */
-  char *def;                  /* Default value (set by mysql_list_fields) */
-  unsigned long length;       /* Width of column (create length) */
-  unsigned long max_length;   /* Max width for selected set */
-  unsigned int name_length;
-  unsigned int org_name_length;
-  unsigned int table_length;
-  unsigned int org_table_length;
-  unsigned int db_length;
-  unsigned int catalog_length;
-  unsigned int def_length;
-  unsigned int flags;         /* Div flags */
-  unsigned int decimals;      /* Number of decimals in field */
-  unsigned int charsetnr;     /* Character set */
-  enum enum_field_types type; /* Type of field. See mysql_com.h for types */
-} MYSQL_FIELD;
-
-typedef char **MYSQL_ROW;		/* return data as array of strings */
-typedef unsigned int MYSQL_FIELD_OFFSET; /* offset to current field */
-
-#ifndef _global_h
-#if defined(NO_CLIENT_LONG_LONG)
-typedef unsigned long my_ulonglong;
-#elif defined (__WIN__)
-typedef unsigned __int64 my_ulonglong;
-#else
-typedef unsigned long long my_ulonglong;
-#endif
-#endif
-
-#define MYSQL_COUNT_ERROR (~(my_ulonglong) 0)
-
-typedef struct st_mysql_rows {
-  struct st_mysql_rows *next;		/* list of rows */
-  MYSQL_ROW data;
-  unsigned long length;
-} MYSQL_ROWS;
-
-typedef MYSQL_ROWS *MYSQL_ROW_OFFSET;	/* offset to current row */
-
-#include "my_alloc.h"
-
-typedef struct st_mysql_data {
-  my_ulonglong rows;
-  unsigned int fields;
-  MYSQL_ROWS *data;
-  MEM_ROOT alloc;
-#if !defined(CHECK_EMBEDDED_DIFFERENCES) || defined(EMBEDDED_LIBRARY)
-  MYSQL_ROWS **prev_ptr;
-#endif
-} MYSQL_DATA;
-
-enum mysql_option 
-{
-  MYSQL_OPT_CONNECT_TIMEOUT, MYSQL_OPT_COMPRESS, MYSQL_OPT_NAMED_PIPE,
-  MYSQL_INIT_COMMAND, MYSQL_READ_DEFAULT_FILE, MYSQL_READ_DEFAULT_GROUP,
-  MYSQL_SET_CHARSET_DIR, MYSQL_SET_CHARSET_NAME, MYSQL_OPT_LOCAL_INFILE,
-  MYSQL_OPT_PROTOCOL, MYSQL_SHARED_MEMORY_BASE_NAME, MYSQL_OPT_READ_TIMEOUT,
-  MYSQL_OPT_WRITE_TIMEOUT, MYSQL_OPT_USE_RESULT,
-  MYSQL_OPT_USE_REMOTE_CONNECTION, MYSQL_OPT_USE_EMBEDDED_CONNECTION,
-  MYSQL_OPT_GUESS_CONNECTION, MYSQL_SET_CLIENT_IP, MYSQL_SECURE_AUTH
-};
-
-struct st_mysql_options {
-  unsigned int connect_timeout, read_timeout, write_timeout;
-  unsigned int port, protocol;
-  unsigned long client_flag;
-  char *host,*user,*password,*unix_socket,*db;
-  struct st_dynamic_array *init_commands;
-  char *my_cnf_file,*my_cnf_group, *charset_dir, *charset_name;
-  char *ssl_key;				/* PEM key file */
-  char *ssl_cert;				/* PEM cert file */
-  char *ssl_ca;					/* PEM CA file */
-  char *ssl_capath;				/* PEM directory of CA-s? */
-  char *ssl_cipher;				/* cipher to use */
-  char *shared_memory_base_name;
-  unsigned long max_allowed_packet;
-  my_bool use_ssl;				/* if to use SSL or not */
-  my_bool compress,named_pipe;
- /*
-   On connect, find out the replication role of the server, and
-   establish connections to all the peers
- */
-  my_bool rpl_probe;
- /*
-   Each call to mysql_real_query() will parse it to tell if it is a read
-   or a write, and direct it to the slave or the master
- */
-  my_bool rpl_parse;
- /*
-   If set, never read from a master, only from slave, when doing
-   a read that is replication-aware
- */
-  my_bool no_master_reads;
-#if !defined(CHECK_EMBEDDED_DIFFERENCES) || defined(EMBEDDED_LIBRARY)
-  my_bool separate_thread;
-#endif
-  enum mysql_option methods_to_use;
-  char *client_ip;
-  /* Refuse client connecting to server if it uses old (pre-4.1.1) protocol */
-  my_bool secure_auth;
-
-  /* function pointers for local infile support */
-  int (*local_infile_init)(void **, const char *, void *);
-  int (*local_infile_read)(void *, char *, unsigned int);
-  void (*local_infile_end)(void *);
-  int (*local_infile_error)(void *, char *, unsigned int);
-  void *local_infile_userdata;
-};
-
-enum mysql_status 
-{
-  MYSQL_STATUS_READY,MYSQL_STATUS_GET_RESULT,MYSQL_STATUS_USE_RESULT
-};
-
-enum mysql_protocol_type 
-{
-  MYSQL_PROTOCOL_DEFAULT, MYSQL_PROTOCOL_TCP, MYSQL_PROTOCOL_SOCKET,
-  MYSQL_PROTOCOL_PIPE, MYSQL_PROTOCOL_MEMORY
-};
-/*
-  There are three types of queries - the ones that have to go to
-  the master, the ones that go to a slave, and the adminstrative
-  type which must happen on the pivot connectioin
-*/
-enum mysql_rpl_type 
-{
-  MYSQL_RPL_MASTER, MYSQL_RPL_SLAVE, MYSQL_RPL_ADMIN
-};
-
-struct st_mysql_methods;
-
-typedef struct st_mysql
-{
-  NET		net;			/* Communication parameters */
-  gptr		connector_fd;		/* ConnectorFd for SSL */
-  char		*host,*user,*passwd,*unix_socket,*server_version,*host_info,*info;
-  char          *db;
-  struct charset_info_st *charset;
-  MYSQL_FIELD	*fields;
-  MEM_ROOT	field_alloc;
-  my_ulonglong affected_rows;
-  my_ulonglong insert_id;		/* id if insert on table with NEXTNR */
-  my_ulonglong extra_info;		/* Used by mysqlshow */
-  unsigned long thread_id;		/* Id for connection in server */
-  unsigned long packet_length;
-  unsigned int	port;
-  unsigned long client_flag,server_capabilities;
-  unsigned int	protocol_version;
-  unsigned int	field_count;
-  unsigned int 	server_status;
-  unsigned int  server_language;
-  unsigned int	warning_count;
-  struct st_mysql_options options;
-  enum mysql_status status;
-  my_bool	free_me;		/* If free in mysql_close */
-  my_bool	reconnect;		/* set to 1 if automatic reconnect */
-
-  /* session-wide random string */
-  char	        scramble[SCRAMBLE_LENGTH+1];
-
- /*
-   Set if this is the original connection, not a master or a slave we have
-   added though mysql_rpl_probe() or mysql_set_master()/ mysql_add_slave()
- */
-  my_bool rpl_pivot;
-  /*
-    Pointers to the master, and the next slave connections, points to
-    itself if lone connection.
-  */
-  struct st_mysql* master, *next_slave;
-
-  struct st_mysql* last_used_slave; /* needed for round-robin slave pick */
- /* needed for send/read/store/use result to work correctly with replication */
-  struct st_mysql* last_used_con;
-
-  LIST  *stmts;                     /* list of all statements */
-  const struct st_mysql_methods *methods;
-  void *thd;
-  /*
-    Points to boolean flag in MYSQL_RES  or MYSQL_STMT. We set this flag 
-    from mysql_stmt_close if close had to cancel result set of this object.
-  */
-  my_bool *unbuffered_fetch_owner;
-} MYSQL;
-
-typedef struct st_mysql_res {
-  my_ulonglong row_count;
-  MYSQL_FIELD	*fields;
-  MYSQL_DATA	*data;
-  MYSQL_ROWS	*data_cursor;
-  unsigned long *lengths;		/* column lengths of current row */
-  MYSQL		*handle;		/* for unbuffered reads */
-  MEM_ROOT	field_alloc;
-  unsigned int	field_count, current_field;
-  MYSQL_ROW	row;			/* If unbuffered read */
-  MYSQL_ROW	current_row;		/* buffer to current row */
-  my_bool	eof;			/* Used by mysql_fetch_row */
-  /* mysql_stmt_close() had to cancel this result */
-  my_bool       unbuffered_fetch_cancelled;  
-  const struct st_mysql_methods *methods;
-} MYSQL_RES;
-
-#define MAX_MYSQL_MANAGER_ERR 256  
-#define MAX_MYSQL_MANAGER_MSG 256
-
-#define MANAGER_OK           200
-#define MANAGER_INFO         250
-#define MANAGER_ACCESS       401
-#define MANAGER_CLIENT_ERR   450
-#define MANAGER_INTERNAL_ERR 500
-
-#if !defined(MYSQL_SERVER) && !defined(MYSQL_CLIENT)
-#define MYSQL_CLIENT
-#endif
-
-
-typedef struct st_mysql_manager
-{
-  NET net;
-  char *host,*user,*passwd;
-  unsigned int port;
-  my_bool free_me;
-  my_bool eof;
-  int cmd_status;
-  int last_errno;
-  char* net_buf,*net_buf_pos,*net_data_end;
-  int net_buf_size;
-  char last_error[MAX_MYSQL_MANAGER_ERR];
-} MYSQL_MANAGER;
-
-typedef struct st_mysql_parameters
-{
-  unsigned long *p_max_allowed_packet;
-  unsigned long *p_net_buffer_length;
-} MYSQL_PARAMETERS;
-
-#if !defined(MYSQL_SERVER) && !defined(EMBEDDED_LIBRARY)
-#define max_allowed_packet (*mysql_get_parameters()->p_max_allowed_packet)
-#define net_buffer_length (*mysql_get_parameters()->p_net_buffer_length)
-#endif
-
-/*
-  Set up and bring down the server; to ensure that applications will
-  work when linked against either the standard client library or the
-  embedded server library, these functions should be called.
-*/
-int STDCALL mysql_server_init(int argc, char **argv, char **groups);
-void STDCALL mysql_server_end(void);
-
-MYSQL_PARAMETERS *STDCALL mysql_get_parameters(void);
-
-/*
-  Set up and bring down a thread; these function should be called
-  for each thread in an application which opens at least one MySQL
-  connection.  All uses of the connection(s) should be between these
-  function calls.
-*/
-my_bool STDCALL mysql_thread_init(void);
-void STDCALL mysql_thread_end(void);
-
-/*
-  Functions to get information from the MYSQL and MYSQL_RES structures
-  Should definitely be used if one uses shared libraries.
-*/
-
-my_ulonglong STDCALL mysql_num_rows(MYSQL_RES *res);
-unsigned int STDCALL mysql_num_fields(MYSQL_RES *res);
-my_bool STDCALL mysql_eof(MYSQL_RES *res);
-MYSQL_FIELD *STDCALL mysql_fetch_field_direct(MYSQL_RES *res,
-					      unsigned int fieldnr);
-MYSQL_FIELD * STDCALL mysql_fetch_fields(MYSQL_RES *res);
-MYSQL_ROW_OFFSET STDCALL mysql_row_tell(MYSQL_RES *res);
-MYSQL_FIELD_OFFSET STDCALL mysql_field_tell(MYSQL_RES *res);
-
-unsigned int STDCALL mysql_field_count(MYSQL *mysql);
-my_ulonglong STDCALL mysql_affected_rows(MYSQL *mysql);
-my_ulonglong STDCALL mysql_insert_id(MYSQL *mysql);
-unsigned int STDCALL mysql_errno(MYSQL *mysql);
-const char * STDCALL mysql_error(MYSQL *mysql);
-const char *STDCALL mysql_sqlstate(MYSQL *mysql);
-unsigned int STDCALL mysql_warning_count(MYSQL *mysql);
-const char * STDCALL mysql_info(MYSQL *mysql);
-unsigned long STDCALL mysql_thread_id(MYSQL *mysql);
-const char * STDCALL mysql_character_set_name(MYSQL *mysql);
-
-MYSQL *		STDCALL mysql_init(MYSQL *mysql);
-my_bool		STDCALL mysql_ssl_set(MYSQL *mysql, const char *key,
-				      const char *cert, const char *ca,
-				      const char *capath, const char *cipher);
-my_bool		STDCALL mysql_change_user(MYSQL *mysql, const char *user, 
-					  const char *passwd, const char *db);
-MYSQL *		STDCALL mysql_real_connect(MYSQL *mysql, const char *host,
-					   const char *user,
-					   const char *passwd,
-					   const char *db,
-					   unsigned int port,
-					   const char *unix_socket,
-					   unsigned long clientflag);
-int		STDCALL mysql_select_db(MYSQL *mysql, const char *db);
-int		STDCALL mysql_query(MYSQL *mysql, const char *q);
-int		STDCALL mysql_send_query(MYSQL *mysql, const char *q,
-					 unsigned long length);
-int		STDCALL mysql_real_query(MYSQL *mysql, const char *q,
-					unsigned long length);
-MYSQL_RES *     STDCALL mysql_store_result(MYSQL *mysql);
-MYSQL_RES *     STDCALL mysql_use_result(MYSQL *mysql);
-
-/* perform query on master */
-my_bool		STDCALL mysql_master_query(MYSQL *mysql, const char *q,
-					   unsigned long length);
-my_bool		STDCALL mysql_master_send_query(MYSQL *mysql, const char *q,
-						unsigned long length);
-/* perform query on slave */  
-my_bool		STDCALL mysql_slave_query(MYSQL *mysql, const char *q,
-					  unsigned long length);
-my_bool		STDCALL mysql_slave_send_query(MYSQL *mysql, const char *q,
-					       unsigned long length);
-
-/* local infile support */
-
-#define LOCAL_INFILE_ERROR_LEN 512
-
-void
-mysql_set_local_infile_handler(MYSQL *mysql,
-                               int (*local_infile_init)(void **, const char *,
-                            void *),
-                               int (*local_infile_read)(void *, char *,
-							unsigned int),
-                               void (*local_infile_end)(void *),
-                               int (*local_infile_error)(void *, char*,
-							 unsigned int),
-                               void *);
-
-void
-mysql_set_local_infile_default(MYSQL *mysql);
-
-
-/*
-  enable/disable parsing of all queries to decide if they go on master or
-  slave
-*/
-void            STDCALL mysql_enable_rpl_parse(MYSQL* mysql);
-void            STDCALL mysql_disable_rpl_parse(MYSQL* mysql);
-/* get the value of the parse flag */  
-int             STDCALL mysql_rpl_parse_enabled(MYSQL* mysql);
-
-/*  enable/disable reads from master */
-void            STDCALL mysql_enable_reads_from_master(MYSQL* mysql);
-void            STDCALL mysql_disable_reads_from_master(MYSQL* mysql);
-/* get the value of the master read flag */  
-my_bool		STDCALL mysql_reads_from_master_enabled(MYSQL* mysql);
-
-enum mysql_rpl_type     STDCALL mysql_rpl_query_type(const char* q, int len);  
-
-/* discover the master and its slaves */  
-my_bool		STDCALL mysql_rpl_probe(MYSQL* mysql);
-
-/* set the master, close/free the old one, if it is not a pivot */
-int             STDCALL mysql_set_master(MYSQL* mysql, const char* host,
-					 unsigned int port,
-					 const char* user,
-					 const char* passwd);
-int             STDCALL mysql_add_slave(MYSQL* mysql, const char* host,
-					unsigned int port,
-					const char* user,
-					const char* passwd);
-
-int		STDCALL mysql_shutdown(MYSQL *mysql,
-                                       enum mysql_enum_shutdown_level
-                                       shutdown_level);
-int		STDCALL mysql_dump_debug_info(MYSQL *mysql);
-int		STDCALL mysql_refresh(MYSQL *mysql,
-				     unsigned int refresh_options);
-int		STDCALL mysql_kill(MYSQL *mysql,unsigned long pid);
-int		STDCALL mysql_set_server_option(MYSQL *mysql,
-						enum enum_mysql_set_option
-						option);
-int		STDCALL mysql_ping(MYSQL *mysql);
-const char *	STDCALL mysql_stat(MYSQL *mysql);
-const char *	STDCALL mysql_get_server_info(MYSQL *mysql);
-const char *	STDCALL mysql_get_client_info(void);
-unsigned long	STDCALL mysql_get_client_version(void);
-const char *	STDCALL mysql_get_host_info(MYSQL *mysql);
-unsigned long	STDCALL mysql_get_server_version(MYSQL *mysql);
-unsigned int	STDCALL mysql_get_proto_info(MYSQL *mysql);
-MYSQL_RES *	STDCALL mysql_list_dbs(MYSQL *mysql,const char *wild);
-MYSQL_RES *	STDCALL mysql_list_tables(MYSQL *mysql,const char *wild);
-MYSQL_RES *	STDCALL mysql_list_processes(MYSQL *mysql);
-int		STDCALL mysql_options(MYSQL *mysql,enum mysql_option option,
-				      const char *arg);
-void		STDCALL mysql_free_result(MYSQL_RES *result);
-void		STDCALL mysql_data_seek(MYSQL_RES *result,
-					my_ulonglong offset);
-MYSQL_ROW_OFFSET STDCALL mysql_row_seek(MYSQL_RES *result,
-						MYSQL_ROW_OFFSET offset);
-MYSQL_FIELD_OFFSET STDCALL mysql_field_seek(MYSQL_RES *result,
-					   MYSQL_FIELD_OFFSET offset);
-MYSQL_ROW	STDCALL mysql_fetch_row(MYSQL_RES *result);
-unsigned long * STDCALL mysql_fetch_lengths(MYSQL_RES *result);
-MYSQL_FIELD *	STDCALL mysql_fetch_field(MYSQL_RES *result);
-MYSQL_RES *     STDCALL mysql_list_fields(MYSQL *mysql, const char *table,
-					  const char *wild);
-unsigned long	STDCALL mysql_escape_string(char *to,const char *from,
-					    unsigned long from_length);
-unsigned long STDCALL mysql_real_escape_string(MYSQL *mysql,
-					       char *to,const char *from,
-					       unsigned long length);
-void		STDCALL mysql_debug(const char *debug);
-char *		STDCALL mysql_odbc_escape_string(MYSQL *mysql,
-						 char *to,
-						 unsigned long to_length,
-						 const char *from,
-						 unsigned long from_length,
-						 void *param,
-						 char *
-						 (*extend_buffer)
-						 (void *, char *to,
-						  unsigned long *length));
-void 		STDCALL myodbc_remove_escape(MYSQL *mysql,char *name);
-unsigned int	STDCALL mysql_thread_safe(void);
-my_bool		STDCALL mysql_embedded(void);
-MYSQL_MANAGER*  STDCALL mysql_manager_init(MYSQL_MANAGER* con);  
-MYSQL_MANAGER*  STDCALL mysql_manager_connect(MYSQL_MANAGER* con,
-					      const char* host,
-					      const char* user,
-					      const char* passwd,
-					      unsigned int port);
-void            STDCALL mysql_manager_close(MYSQL_MANAGER* con);
-int             STDCALL mysql_manager_command(MYSQL_MANAGER* con,
-						const char* cmd, int cmd_len);
-int             STDCALL mysql_manager_fetch_line(MYSQL_MANAGER* con,
-						  char* res_buf,
-						 int res_buf_size);
-my_bool         STDCALL mysql_read_query_result(MYSQL *mysql);
-
-
-/*
-  The following definitions are added for the enhanced 
-  client-server protocol
-*/
-
-/* statement state */
-enum enum_mysql_stmt_state
-{
-  MYSQL_STMT_INIT_DONE= 1, MYSQL_STMT_PREPARE_DONE, MYSQL_STMT_EXECUTE_DONE,
-  MYSQL_STMT_FETCH_DONE
-};
-
-
-/* bind structure */
-typedef struct st_mysql_bind
-{
-  unsigned long	*length;          /* output length pointer */
-  my_bool       *is_null;	  /* Pointer to null indicator */
-  void		*buffer;	  /* buffer to get/put data */
-  enum enum_field_types buffer_type;	/* buffer type */
-  unsigned long buffer_length;    /* buffer length, must be set for str/binary */  
-
-  /* Following are for internal use. Set by mysql_stmt_bind_param */
-  unsigned char *inter_buffer;    /* for the current data position */
-  unsigned long offset;           /* offset position for char/binary fetch */
-  unsigned long	internal_length;  /* Used if length is 0 */
-  unsigned int	param_number;	  /* For null count and error messages */
-  unsigned int  pack_length;	  /* Internal length for packed data */
-  my_bool       is_unsigned;      /* set if integer type is unsigned */
-  my_bool	long_data_used;	  /* If used with mysql_send_long_data */
-  my_bool	internal_is_null; /* Used if is_null is 0 */
-  void (*store_param_func)(NET *net, struct st_mysql_bind *param);
-  void (*fetch_result)(struct st_mysql_bind *, unsigned char **row);
-  void (*skip_result)(struct st_mysql_bind *, MYSQL_FIELD *,
-		      unsigned char **row);
-} MYSQL_BIND;
-
-
-/* statement handler */
-typedef struct st_mysql_stmt
-{
-  MEM_ROOT       mem_root;             /* root allocations */
-  LIST           list;                 /* list to keep track of all stmts */
-  MYSQL          *mysql;               /* connection handle */
-  MYSQL_BIND     *params;              /* input parameters */
-  MYSQL_BIND     *bind;                /* output parameters */
-  MYSQL_FIELD    *fields;              /* result set metadata */
-  MYSQL_DATA     result;               /* cached result set */
-  MYSQL_ROWS     *data_cursor;         /* current row in cached result */
-  /* copy of mysql->affected_rows after statement execution */
-  my_ulonglong   affected_rows;
-  my_ulonglong   insert_id;            /* copy of mysql->insert_id */
-  /*
-    mysql_stmt_fetch() calls this function to fetch one row (it's different
-    for buffered, unbuffered and cursor fetch).
-  */
-  int            (*read_row_func)(struct st_mysql_stmt *stmt, 
-                                  unsigned char **row);
-  unsigned long	 stmt_id;	       /* Id for prepared statement */
-  unsigned int	 last_errno;	       /* error code */
-  unsigned int   param_count;          /* input parameter count */
-  unsigned int   field_count;          /* number of columns in result set */
-  enum enum_mysql_stmt_state state;    /* statement state */
-  char		 last_error[MYSQL_ERRMSG_SIZE]; /* error message */
-  char		 sqlstate[SQLSTATE_LENGTH+1];
-  /* Types of input parameters should be sent to server */
-  my_bool        send_types_to_server;
-  my_bool        bind_param_done;      /* input buffers were supplied */
-  my_bool        bind_result_done;     /* output buffers were supplied */
-  /* mysql_stmt_close() had to cancel this result */
-  my_bool       unbuffered_fetch_cancelled;  
-  /*
-    Is set to true if we need to calculate field->max_length for 
-    metadata fields when doing mysql_stmt_store_result.
-  */
-  my_bool       update_max_length;     
-} MYSQL_STMT;
-
-enum enum_stmt_attr_type
-{
-  /*
-    When doing mysql_stmt_store_result calculate max_length attribute
-    of statement metadata. This is to be consistent with the old API, 
-    where this was done automatically.
-    In the new API we do that only by request because it slows down
-    mysql_stmt_store_result sufficiently.
-  */
-  STMT_ATTR_UPDATE_MAX_LENGTH
-};
-
-
-typedef struct st_mysql_methods
-{
-  my_bool (*read_query_result)(MYSQL *mysql);
-  my_bool (*advanced_command)(MYSQL *mysql,
-			      enum enum_server_command command,
-			      const char *header,
-			      unsigned long header_length,
-			      const char *arg,
-			      unsigned long arg_length,
-			      my_bool skip_check);
-  MYSQL_DATA *(*read_rows)(MYSQL *mysql,MYSQL_FIELD *mysql_fields,
-			   unsigned int fields);
-  MYSQL_RES * (*use_result)(MYSQL *mysql);
-  void (*fetch_lengths)(unsigned long *to, 
-			MYSQL_ROW column, unsigned int field_count);
-  void (*flush_use_result)(MYSQL *mysql);
-#if !defined(MYSQL_SERVER) || defined(EMBEDDED_LIBRARY)
-  MYSQL_FIELD * (*list_fields)(MYSQL *mysql);
-  my_bool (*read_prepare_result)(MYSQL *mysql, MYSQL_STMT *stmt);
-  int (*stmt_execute)(MYSQL_STMT *stmt);
-  int (*read_binary_rows)(MYSQL_STMT *stmt);
-  int (*unbuffered_fetch)(MYSQL *mysql, char **row);
-  void (*free_embedded_thd)(MYSQL *mysql);
-  const char *(*read_statistics)(MYSQL *mysql);
-  my_bool (*next_result)(MYSQL *mysql);
-  int (*read_change_user_result)(MYSQL *mysql, char *buff, const char *passwd);
-#endif
-} MYSQL_METHODS;
-
-#ifdef HAVE_DEPRECATED_411_API
-/* Deprecated calls (since MySQL 4.1.2) */
-
-/* Use mysql_stmt_init + mysql_stmt_prepare instead */
-MYSQL_STMT * STDCALL mysql_prepare(MYSQL * mysql, const char *query,
-				   unsigned long length);
-#define mysql_execute mysql_stmt_execute
-#define mysql_fetch mysql_stmt_fetch
-#define mysql_fetch_column mysql_stmt_fetch_column
-#define mysql_bind_param mysql_stmt_bind_param
-#define mysql_bind_result mysql_stmt_bind_result
-#define mysql_param_count mysql_stmt_param_count
-#define mysql_param_result mysql_stmt_param_metadata
-#define mysql_get_metadata mysql_stmt_result_metadata
-#define mysql_send_long_data mysql_stmt_send_long_data
-
-#endif /* HAVE_DEPRECATED_411_API */
-
-MYSQL_STMT * STDCALL mysql_stmt_init(MYSQL *mysql);
-int STDCALL mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query,
-                               unsigned long length);
-int STDCALL mysql_stmt_execute(MYSQL_STMT *stmt);
-int STDCALL mysql_stmt_fetch(MYSQL_STMT *stmt);
-int STDCALL mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *bind, 
-                                    unsigned int column,
-                                    unsigned long offset);
-int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt);
-unsigned long STDCALL mysql_stmt_param_count(MYSQL_STMT * stmt);
-my_bool STDCALL mysql_stmt_attr_set(MYSQL_STMT *stmt,
-                                    enum enum_stmt_attr_type attr_type,
-                                    const void *attr);
-my_bool STDCALL mysql_stmt_attr_get(MYSQL_STMT *stmt,
-                                    enum enum_stmt_attr_type attr_type,
-                                    void *attr);
-my_bool STDCALL mysql_stmt_bind_param(MYSQL_STMT * stmt, MYSQL_BIND * bnd);
-my_bool STDCALL mysql_stmt_bind_result(MYSQL_STMT * stmt, MYSQL_BIND * bnd);
-my_bool STDCALL mysql_stmt_close(MYSQL_STMT * stmt);
-my_bool STDCALL mysql_stmt_reset(MYSQL_STMT * stmt);
-my_bool STDCALL mysql_stmt_free_result(MYSQL_STMT *stmt);
-my_bool STDCALL mysql_stmt_send_long_data(MYSQL_STMT *stmt, 
-                                          unsigned int param_number,
-                                          const char *data, 
-                                          unsigned long length);
-MYSQL_RES *STDCALL mysql_stmt_result_metadata(MYSQL_STMT *stmt);
-MYSQL_RES *STDCALL mysql_stmt_param_metadata(MYSQL_STMT *stmt);
-unsigned int STDCALL mysql_stmt_errno(MYSQL_STMT * stmt);
-const char *STDCALL mysql_stmt_error(MYSQL_STMT * stmt);
-const char *STDCALL mysql_stmt_sqlstate(MYSQL_STMT * stmt);
-MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_seek(MYSQL_STMT *stmt, 
-                                             MYSQL_ROW_OFFSET offset);
-MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_tell(MYSQL_STMT *stmt);
-void STDCALL mysql_stmt_data_seek(MYSQL_STMT *stmt, my_ulonglong offset);
-my_ulonglong STDCALL mysql_stmt_num_rows(MYSQL_STMT *stmt);
-my_ulonglong STDCALL mysql_stmt_affected_rows(MYSQL_STMT *stmt);
-my_ulonglong STDCALL mysql_stmt_insert_id(MYSQL_STMT *stmt);
-unsigned int STDCALL mysql_stmt_field_count(MYSQL_STMT *stmt);
-
-my_bool STDCALL mysql_commit(MYSQL * mysql);
-my_bool STDCALL mysql_rollback(MYSQL * mysql);
-my_bool STDCALL mysql_autocommit(MYSQL * mysql, my_bool auto_mode);
-my_bool STDCALL mysql_more_results(MYSQL *mysql);
-int STDCALL mysql_next_result(MYSQL *mysql);
-void STDCALL mysql_close(MYSQL *sock);
-
-
-/* status return codes */
-#define MYSQL_NO_DATA      100
-
-#define mysql_reload(mysql) mysql_refresh((mysql),REFRESH_GRANT)
-
-#ifdef USE_OLD_FUNCTIONS
-MYSQL *		STDCALL mysql_connect(MYSQL *mysql, const char *host,
-				      const char *user, const char *passwd);
-int		STDCALL mysql_create_db(MYSQL *mysql, const char *DB);
-int		STDCALL mysql_drop_db(MYSQL *mysql, const char *DB);
-#define	 mysql_reload(mysql) mysql_refresh((mysql),REFRESH_GRANT)
-#endif
-#define HAVE_MYSQL_REAL_CONNECT
-
-/*
-  The following functions are mainly exported because of mysqlbinlog;
-  They are not for general usage
-*/
-
-#define simple_command(mysql, command, arg, length, skip_check) \
-  (*(mysql)->methods->advanced_command)(mysql, command,         \
-					NullS, 0, arg, length, skip_check)
-unsigned long net_safe_read(MYSQL* mysql);
-
-#ifdef __NETWARE__
-#pragma pack(pop)		/* restore alignment */
-#endif
-
-#ifdef	__cplusplus
-}
-#endif
-
-#endif /* _mysql_h */
diff --git a/src/terralib/drivers/MySQL/include/mysql_com.h b/src/terralib/drivers/MySQL/include/mysql_com.h
deleted file mode 100644
index 4686acc..0000000
--- a/src/terralib/drivers/MySQL/include/mysql_com.h
+++ /dev/null
@@ -1,402 +0,0 @@
-/* Copyright (C) 2000 MySQL AB
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
-
-/*
-** Common definition between mysql server & client
-*/
-
-#ifndef _mysql_com_h
-#define _mysql_com_h
-
-#define NAME_LEN	64		/* Field/table name length */
-#define HOSTNAME_LENGTH 60
-#define USERNAME_LENGTH 16
-#define SERVER_VERSION_LENGTH 60
-#define SQLSTATE_LENGTH 5
-
-#define LOCAL_HOST	"localhost"
-#define LOCAL_HOST_NAMEDPIPE "."
-
-
-#if defined(__WIN__) && !defined( _CUSTOMCONFIG_)
-#define MYSQL_NAMEDPIPE "MySQL"
-#define MYSQL_SERVICENAME "MySQL"
-#endif /* __WIN__ */
-
-enum enum_server_command
-{
-  COM_SLEEP, COM_QUIT, COM_INIT_DB, COM_QUERY, COM_FIELD_LIST,
-  COM_CREATE_DB, COM_DROP_DB, COM_REFRESH, COM_SHUTDOWN, COM_STATISTICS,
-  COM_PROCESS_INFO, COM_CONNECT, COM_PROCESS_KILL, COM_DEBUG, COM_PING,
-  COM_TIME, COM_DELAYED_INSERT, COM_CHANGE_USER, COM_BINLOG_DUMP,
-  COM_TABLE_DUMP, COM_CONNECT_OUT, COM_REGISTER_SLAVE,
-  COM_PREPARE, COM_EXECUTE, COM_LONG_DATA, COM_CLOSE_STMT,
-  COM_RESET_STMT, COM_SET_OPTION,
-  /* don't forget to update const char *command_name[] in sql_parse.cc */
-
-  /* Must be last */
-  COM_END
-};
-
-
-/*
-  Length of random string sent by server on handshake; this is also length of
-  obfuscated password, recieved from client
-*/
-#define SCRAMBLE_LENGTH 20
-#define SCRAMBLE_LENGTH_323 8
-/* length of password stored in the db: new passwords are preceeded with '*' */
-#define SCRAMBLED_PASSWORD_CHAR_LENGTH (SCRAMBLE_LENGTH*2+1)
-#define SCRAMBLED_PASSWORD_CHAR_LENGTH_323 (SCRAMBLE_LENGTH_323*2)
-
-
-#define NOT_NULL_FLAG	1		/* Field can't be NULL */
-#define PRI_KEY_FLAG	2		/* Field is part of a primary key */
-#define UNIQUE_KEY_FLAG 4		/* Field is part of a unique key */
-#define MULTIPLE_KEY_FLAG 8		/* Field is part of a key */
-#define BLOB_FLAG	16		/* Field is a blob */
-#define UNSIGNED_FLAG	32		/* Field is unsigned */
-#define ZEROFILL_FLAG	64		/* Field is zerofill */
-#define BINARY_FLAG	128		/* Field is binary   */
-
-/* The following are only sent to new clients */
-#define ENUM_FLAG	256		/* field is an enum */
-#define AUTO_INCREMENT_FLAG 512		/* field is a autoincrement field */
-#define TIMESTAMP_FLAG	1024		/* Field is a timestamp */
-#define SET_FLAG	2048		/* field is a set */
-#define NUM_FLAG	32768		/* Field is num (for clients) */
-#define PART_KEY_FLAG	16384		/* Intern; Part of some key */
-#define GROUP_FLAG	32768		/* Intern: Group field */
-#define UNIQUE_FLAG	65536		/* Intern: Used by sql_yacc */
-#define BINCMP_FLAG	131072		/* Intern: Used by sql_yacc */
-
-#define REFRESH_GRANT		1	/* Refresh grant tables */
-#define REFRESH_LOG		2	/* Start on new log file */
-#define REFRESH_TABLES		4	/* close all tables */
-#define REFRESH_HOSTS		8	/* Flush host cache */
-#define REFRESH_STATUS		16	/* Flush status variables */
-#define REFRESH_THREADS		32	/* Flush thread cache */
-#define REFRESH_SLAVE           64      /* Reset master info and restart slave
-					   thread */
-#define REFRESH_MASTER          128     /* Remove all bin logs in the index
-					   and truncate the index */
-
-/* The following can't be set with mysql_refresh() */
-#define REFRESH_READ_LOCK	16384	/* Lock tables for read */
-#define REFRESH_FAST		32768	/* Intern flag */
-
-/* RESET (remove all queries) from query cache */
-#define REFRESH_QUERY_CACHE	65536
-#define REFRESH_QUERY_CACHE_FREE 0x20000L /* pack query cache */
-#define REFRESH_DES_KEY_FILE	0x40000L
-#define REFRESH_USER_RESOURCES	0x80000L
-
-#define CLIENT_LONG_PASSWORD	1	/* new more secure passwords */
-#define CLIENT_FOUND_ROWS	2	/* Found instead of affected rows */
-#define CLIENT_LONG_FLAG	4	/* Get all column flags */
-#define CLIENT_CONNECT_WITH_DB	8	/* One can specify db on connect */
-#define CLIENT_NO_SCHEMA	16	/* Don't allow database.table.column */
-#define CLIENT_COMPRESS		32	/* Can use compression protocol */
-#define CLIENT_ODBC		64	/* Odbc client */
-#define CLIENT_LOCAL_FILES	128	/* Can use LOAD DATA LOCAL */
-#define CLIENT_IGNORE_SPACE	256	/* Ignore spaces before '(' */
-#define CLIENT_PROTOCOL_41	512	/* New 4.1 protocol */
-#define CLIENT_INTERACTIVE	1024	/* This is an interactive client */
-#define CLIENT_SSL              2048	/* Switch to SSL after handshake */
-#define CLIENT_IGNORE_SIGPIPE   4096    /* IGNORE sigpipes */
-#define CLIENT_TRANSACTIONS	8192	/* Client knows about transactions */
-#define CLIENT_RESERVED         16384   /* Old flag for 4.1 protocol  */
-#define CLIENT_SECURE_CONNECTION 32768  /* New 4.1 authentication */
-#define CLIENT_MULTI_STATEMENTS 65536   /* Enable/disable multi-stmt support */
-#define CLIENT_MULTI_RESULTS    131072  /* Enable/disable multi-results */
-#define CLIENT_REMEMBER_OPTIONS	(((ulong) 1) << 31)
-
-#define SERVER_STATUS_IN_TRANS     1	/* Transaction has started */
-#define SERVER_STATUS_AUTOCOMMIT   2	/* Server in auto_commit mode */
-#define SERVER_STATUS_MORE_RESULTS 4	/* More results on server */
-#define SERVER_MORE_RESULTS_EXISTS 8    /* Multi query - next query exists */
-#define SERVER_QUERY_NO_GOOD_INDEX_USED 16
-#define SERVER_QUERY_NO_INDEX_USED      32
-
-#define MYSQL_ERRMSG_SIZE	512
-#define NET_READ_TIMEOUT	30		/* Timeout on read */
-#define NET_WRITE_TIMEOUT	60		/* Timeout on write */
-#define NET_WAIT_TIMEOUT	8*60*60		/* Wait for new query */
-
-struct st_vio;					/* Only C */
-typedef struct st_vio Vio;
-
-#define MAX_TINYINT_WIDTH       3       /* Max width for a TINY w.o. sign */
-#define MAX_SMALLINT_WIDTH      5       /* Max width for a SHORT w.o. sign */
-#define MAX_MEDIUMINT_WIDTH     8       /* Max width for a INT24 w.o. sign */
-#define MAX_INT_WIDTH           10      /* Max width for a LONG w.o. sign */
-#define MAX_BIGINT_WIDTH        20      /* Max width for a LONGLONG */
-#define MAX_CHAR_WIDTH		255	/* Max length for a CHAR colum */
-#define MAX_BLOB_WIDTH		8192	/* Default width for blob */
-
-typedef struct st_net {
-#if !defined(CHECK_EMBEDDED_DIFFERENCES) || !defined(EMBEDDED_LIBRARY)
-  Vio* vio;
-  unsigned char *buff,*buff_end,*write_pos,*read_pos;
-  my_socket fd;					/* For Perl DBI/dbd */
-  unsigned long max_packet,max_packet_size;
-  unsigned int pkt_nr,compress_pkt_nr;
-  unsigned int write_timeout, read_timeout, retry_count;
-  int fcntl;
-  my_bool compress;
-  /*
-    The following variable is set if we are doing several queries in one
-    command ( as in LOAD TABLE ... FROM MASTER ),
-    and do not want to confuse the client with OK at the wrong time
-  */
-  unsigned long remain_in_buf,length, buf_length, where_b;
-  unsigned int *return_status;
-  unsigned char reading_or_writing;
-  char save_char;
-  my_bool no_send_ok;
-  /*
-    Pointer to query object in query cache, do not equal NULL (0) for
-    queries in cache that have not stored its results yet
-  */
-#endif
-  char last_error[MYSQL_ERRMSG_SIZE], sqlstate[SQLSTATE_LENGTH+1];
-  unsigned int last_errno;
-  unsigned char error;
-  gptr query_cache_query;
-  my_bool report_error; /* We should report error (we have unreported error) */
-  my_bool return_errno;
-} NET;
-
-#define packet_error (~(unsigned long) 0)
-
-enum enum_field_types { MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY,
-			MYSQL_TYPE_SHORT,  MYSQL_TYPE_LONG,
-			MYSQL_TYPE_FLOAT,  MYSQL_TYPE_DOUBLE,
-			MYSQL_TYPE_NULL,   MYSQL_TYPE_TIMESTAMP,
-			MYSQL_TYPE_LONGLONG,MYSQL_TYPE_INT24,
-			MYSQL_TYPE_DATE,   MYSQL_TYPE_TIME,
-			MYSQL_TYPE_DATETIME, MYSQL_TYPE_YEAR,
-			MYSQL_TYPE_NEWDATE,
-			MYSQL_TYPE_ENUM=247,
-			MYSQL_TYPE_SET=248,
-			MYSQL_TYPE_TINY_BLOB=249,
-			MYSQL_TYPE_MEDIUM_BLOB=250,
-			MYSQL_TYPE_LONG_BLOB=251,
-			MYSQL_TYPE_BLOB=252,
-			MYSQL_TYPE_VAR_STRING=253,
-			MYSQL_TYPE_STRING=254,
-			MYSQL_TYPE_GEOMETRY=255
-
-};
-
-/* For backward compatibility */
-#define CLIENT_MULTI_QUERIES    CLIENT_MULTI_STATEMENTS    
-#define FIELD_TYPE_DECIMAL     MYSQL_TYPE_DECIMAL
-#define FIELD_TYPE_TINY        MYSQL_TYPE_TINY
-#define FIELD_TYPE_SHORT       MYSQL_TYPE_SHORT
-#define FIELD_TYPE_LONG        MYSQL_TYPE_LONG
-#define FIELD_TYPE_FLOAT       MYSQL_TYPE_FLOAT
-#define FIELD_TYPE_DOUBLE      MYSQL_TYPE_DOUBLE
-#define FIELD_TYPE_NULL        MYSQL_TYPE_NULL
-#define FIELD_TYPE_TIMESTAMP   MYSQL_TYPE_TIMESTAMP
-#define FIELD_TYPE_LONGLONG    MYSQL_TYPE_LONGLONG
-#define FIELD_TYPE_INT24       MYSQL_TYPE_INT24
-#define FIELD_TYPE_DATE        MYSQL_TYPE_DATE
-#define FIELD_TYPE_TIME        MYSQL_TYPE_TIME
-#define FIELD_TYPE_DATETIME    MYSQL_TYPE_DATETIME
-#define FIELD_TYPE_YEAR        MYSQL_TYPE_YEAR
-#define FIELD_TYPE_NEWDATE     MYSQL_TYPE_NEWDATE
-#define FIELD_TYPE_ENUM        MYSQL_TYPE_ENUM
-#define FIELD_TYPE_SET         MYSQL_TYPE_SET
-#define FIELD_TYPE_TINY_BLOB   MYSQL_TYPE_TINY_BLOB
-#define FIELD_TYPE_MEDIUM_BLOB MYSQL_TYPE_MEDIUM_BLOB
-#define FIELD_TYPE_LONG_BLOB   MYSQL_TYPE_LONG_BLOB
-#define FIELD_TYPE_BLOB        MYSQL_TYPE_BLOB
-#define FIELD_TYPE_VAR_STRING  MYSQL_TYPE_VAR_STRING
-#define FIELD_TYPE_STRING      MYSQL_TYPE_STRING
-#define FIELD_TYPE_CHAR        MYSQL_TYPE_TINY
-#define FIELD_TYPE_INTERVAL    MYSQL_TYPE_ENUM
-#define FIELD_TYPE_GEOMETRY    MYSQL_TYPE_GEOMETRY
-
-
-/* Shutdown/kill enums and constants */ 
-
-/* Bits for THD::killable. */
-#define MYSQL_SHUTDOWN_KILLABLE_CONNECT    (unsigned char)(1 << 0)
-#define MYSQL_SHUTDOWN_KILLABLE_TRANS      (unsigned char)(1 << 1)
-#define MYSQL_SHUTDOWN_KILLABLE_LOCK_TABLE (unsigned char)(1 << 2)
-#define MYSQL_SHUTDOWN_KILLABLE_UPDATE     (unsigned char)(1 << 3)
-
-enum mysql_enum_shutdown_level {
-  /*
-    We want levels to be in growing order of hardness (because we use number
-    comparisons). Note that DEFAULT does not respect the growing property, but
-    it's ok.
-  */
-  SHUTDOWN_DEFAULT = 0,
-  /* wait for existing connections to finish */
-  SHUTDOWN_WAIT_CONNECTIONS= MYSQL_SHUTDOWN_KILLABLE_CONNECT,
-  /* wait for existing trans to finish */
-  SHUTDOWN_WAIT_TRANSACTIONS= MYSQL_SHUTDOWN_KILLABLE_TRANS,
-  /* wait for existing updates to finish (=> no partial MyISAM update) */
-  SHUTDOWN_WAIT_UPDATES= MYSQL_SHUTDOWN_KILLABLE_UPDATE,
-  /* flush InnoDB buffers and other storage engines' buffers*/
-  SHUTDOWN_WAIT_ALL_BUFFERS= (MYSQL_SHUTDOWN_KILLABLE_UPDATE << 1),
-  /* don't flush InnoDB buffers, flush other storage engines' buffers*/
-  SHUTDOWN_WAIT_CRITICAL_BUFFERS= (MYSQL_SHUTDOWN_KILLABLE_UPDATE << 1) + 1,
-  /* Now the 2 levels of the KILL command */
-#if MYSQL_VERSION_ID >= 50000
-  KILL_QUERY= 254,
-#endif
-  KILL_CONNECTION= 255
-};
-
-/* options for mysql_set_option */
-enum enum_mysql_set_option
-{
-  MYSQL_OPTION_MULTI_STATEMENTS_ON,
-  MYSQL_OPTION_MULTI_STATEMENTS_OFF
-};
-
-#define net_new_transaction(net) ((net)->pkt_nr=0)
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-my_bool	my_net_init(NET *net, Vio* vio);
-void	my_net_local_init(NET *net);
-void	net_end(NET *net);
-void	net_clear(NET *net);
-my_bool net_realloc(NET *net, unsigned long length);
-
-#ifndef EMBEDDED_LIBRARY /* To be removed by HF */
-my_bool	net_flush(NET *net);
-#else
-#define net_flush(A)
-#endif
-
-my_bool	my_net_write(NET *net,const char *packet,unsigned long len);
-my_bool	net_write_command(NET *net,unsigned char command,
-			  const char *header, unsigned long head_len,
-			  const char *packet, unsigned long len);
-int	net_real_write(NET *net,const char *packet,unsigned long len);
-unsigned long my_net_read(NET *net);
-
-/*
-  The following function is not meant for normal usage
-  Currently it's used internally by manager.c
-*/
-struct sockaddr;
-int my_connect(my_socket s, const struct sockaddr *name, unsigned int namelen,
-	       unsigned int timeout);
-
-struct rand_struct {
-  unsigned long seed1,seed2,max_value;
-  double max_value_dbl;
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-  /* The following is for user defined functions */
-
-enum Item_result {STRING_RESULT, REAL_RESULT, INT_RESULT, ROW_RESULT};
-
-typedef struct st_udf_args
-{
-  unsigned int arg_count;		/* Number of arguments */
-  enum Item_result *arg_type;		/* Pointer to item_results */
-  char **args;				/* Pointer to argument */
-  unsigned long *lengths;		/* Length of string arguments */
-  char *maybe_null;			/* Set to 1 for all maybe_null args */
-} UDF_ARGS;
-
-  /* This holds information about the result */
-
-typedef struct st_udf_init
-{
-  my_bool maybe_null;			/* 1 if function can return NULL */
-  unsigned int decimals;		/* for real functions */
-  unsigned long max_length;		/* For string functions */
-  char	  *ptr;				/* free pointer for function data */
-  my_bool const_item;			/* 0 if result is independent of arguments */
-} UDF_INIT;
-
-  /* Constants when using compression */
-#define NET_HEADER_SIZE 4		/* standard header size */
-#define COMP_HEADER_SIZE 3		/* compression header extra size */
-
-  /* Prototypes to password functions */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
-  These functions are used for authentication by client and server and
-  implemented in sql/password.c
-*/
-
-void randominit(struct rand_struct *, unsigned long seed1,
-                unsigned long seed2);
-double my_rnd(struct rand_struct *);
-void create_random_string(char *to, unsigned int length, struct rand_struct *rand_st);
-
-void hash_password(unsigned long *to, const char *password, unsigned int password_len);
-void make_scrambled_password_323(char *to, const char *password);
-void scramble_323(char *to, const char *message, const char *password);
-my_bool check_scramble_323(const char *, const char *message,
-                           unsigned long *salt);
-void get_salt_from_password_323(unsigned long *res, const char *password);
-void make_password_from_salt_323(char *to, const unsigned long *salt);
-
-void make_scrambled_password(char *to, const char *password);
-void scramble(char *to, const char *message, const char *password);
-my_bool check_scramble(const char *reply, const char *message,
-                       const unsigned char *hash_stage2);
-void get_salt_from_password(unsigned char *res, const char *password);
-void make_password_from_salt(char *to, const unsigned char *hash_stage2);
-
-/* end of password.c */
-
-char *get_tty_password(char *opt_message);
-const char *mysql_errno_to_sqlstate(unsigned int mysql_errno);
-
-/* Some other useful functions */
-
-my_bool my_init(void);
-int load_defaults(const char *conf_file, const char **groups,
-		  int *argc, char ***argv);
-my_bool my_thread_init(void);
-void my_thread_end(void);
-
-#ifdef _global_h
-ulong STDCALL net_field_length(uchar **packet);
-my_ulonglong net_field_length_ll(uchar **packet);
-char *net_store_length(char *pkg, ulonglong length);
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#define NULL_LENGTH ((unsigned long) ~0) /* For net_store_length */
-#define MYSQL_STMT_HEADER       4
-#define MYSQL_LONG_DATA_HEADER  6
-
-#endif
diff --git a/src/terralib/drivers/MySQL/include/mysql_embed.h b/src/terralib/drivers/MySQL/include/mysql_embed.h
deleted file mode 100644
index 603af8e..0000000
--- a/src/terralib/drivers/MySQL/include/mysql_embed.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Copyright (C) 2000 MySQL AB
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
-
-/* Defines that are unique to the embedded version of MySQL */
-
-#ifdef EMBEDDED_LIBRARY
-
-/* Things we don't need in the embedded version of MySQL */
-/* TODO HF add #undef HAVE_VIO if we don't want client in embedded library */
-
-#undef HAVE_PSTACK				/* No stacktrace */
-#undef HAVE_DLOPEN				/* No udf functions */
-#undef HAVE_OPENSSL
-#undef HAVE_ISAM
-#undef HAVE_SMEM				/* No shared memory */
-#undef HAVE_NDBCLUSTER_DB /* No NDB cluster */
-
-#define DONT_USE_RAID
-
-#endif /* EMBEDDED_LIBRARY */
diff --git a/src/terralib/drivers/MySQL/include/mysql_time.h b/src/terralib/drivers/MySQL/include/mysql_time.h
deleted file mode 100644
index ec67d60..0000000
--- a/src/terralib/drivers/MySQL/include/mysql_time.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Copyright (C) 2004 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
-
-#ifndef _mysql_time_h_
-#define _mysql_time_h_
-
-/*
-  Time declarations shared between the server and client API:
-  you should not add anything to this header unless it's used
-  (and hence should be visible) in mysql.h.
-  If you're looking for a place to add new time-related declaration,
-  it's most likely my_time.h. See also "C API Handling of Date
-  and Time Values" chapter in documentation.
-*/
-
-enum enum_mysql_timestamp_type
-{
-  MYSQL_TIMESTAMP_NONE= -2, MYSQL_TIMESTAMP_ERROR= -1,
-  MYSQL_TIMESTAMP_DATE= 0, MYSQL_TIMESTAMP_DATETIME= 1, MYSQL_TIMESTAMP_TIME= 2
-};
-
-
-typedef struct st_mysql_time
-{
-  unsigned int  year, month, day, hour, minute, second;
-  unsigned long second_part;
-  my_bool       neg;
-  enum enum_mysql_timestamp_type time_type;
-} MYSQL_TIME;
-
-#endif /* _mysql_time_h_ */
diff --git a/src/terralib/drivers/MySQL/include/mysql_version.h b/src/terralib/drivers/MySQL/include/mysql_version.h
deleted file mode 100644
index 6b53ce0..0000000
--- a/src/terralib/drivers/MySQL/include/mysql_version.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Copyright Abandoned 1996, 1999, 2001 MySQL AB
-   This file is public domain and comes with NO WARRANTY of any kind */
-
-/* Version numbers for protocol & mysqld */
-
-#ifndef _mysql_version_h
-#define _mysql_version_h
-#ifdef _CUSTOMCONFIG_
-#include <custom_conf.h>
-#else
-#define PROTOCOL_VERSION		10
-#define MYSQL_SERVER_VERSION		"4.1.7"
-#define MYSQL_BASE_VERSION		"mysqld-4.1"
-#define MYSQL_SERVER_SUFFIX_DEF		""
-#define FRM_VER				6
-#define MYSQL_VERSION_ID		40107
-#define MYSQL_PORT			3306
-#define MYSQL_UNIX_ADDR			"/tmp/mysql.sock"
-#define MYSQL_CONFIG_NAME		"my"
-#define MYSQL_COMPILATION_COMMENT	"Source distribution"
-
-/* mysqld compile time options */
-#endif /* _CUSTOMCONFIG_ */
-
-#ifndef LICENSE
-#define LICENSE				GPL
-#endif /* LICENSE */
-
-#endif /* _mysql_version_h */
diff --git a/src/terralib/drivers/MySQL/include/mysqld_error.h b/src/terralib/drivers/MySQL/include/mysqld_error.h
deleted file mode 100644
index 776869f..0000000
--- a/src/terralib/drivers/MySQL/include/mysqld_error.h
+++ /dev/null
@@ -1,322 +0,0 @@
-/* Copyright (C) 2000 MySQL AB
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
-
-/* Definefile for error messagenumbers */
-
-#define ER_HASHCHK 1000
-#define ER_NISAMCHK 1001
-#define ER_NO 1002
-#define ER_YES 1003
-#define ER_CANT_CREATE_FILE 1004
-#define ER_CANT_CREATE_TABLE 1005
-#define ER_CANT_CREATE_DB 1006
-#define ER_DB_CREATE_EXISTS 1007
-#define ER_DB_DROP_EXISTS 1008
-#define ER_DB_DROP_DELETE 1009
-#define ER_DB_DROP_RMDIR 1010
-#define ER_CANT_DELETE_FILE 1011
-#define ER_CANT_FIND_SYSTEM_REC 1012
-#define ER_CANT_GET_STAT 1013
-#define ER_CANT_GET_WD 1014
-#define ER_CANT_LOCK 1015
-#define ER_CANT_OPEN_FILE 1016
-#define ER_FILE_NOT_FOUND 1017
-#define ER_CANT_READ_DIR 1018
-#define ER_CANT_SET_WD 1019
-#define ER_CHECKREAD 1020
-#define ER_DISK_FULL 1021
-#define ER_DUP_KEY 1022
-#define ER_ERROR_ON_CLOSE 1023
-#define ER_ERROR_ON_READ 1024
-#define ER_ERROR_ON_RENAME 1025
-#define ER_ERROR_ON_WRITE 1026
-#define ER_FILE_USED 1027
-#define ER_FILSORT_ABORT 1028
-#define ER_FORM_NOT_FOUND 1029
-#define ER_GET_ERRNO 1030
-#define ER_ILLEGAL_HA 1031
-#define ER_KEY_NOT_FOUND 1032
-#define ER_NOT_FORM_FILE 1033
-#define ER_NOT_KEYFILE 1034
-#define ER_OLD_KEYFILE 1035
-#define ER_OPEN_AS_READONLY 1036
-#define ER_OUTOFMEMORY 1037
-#define ER_OUT_OF_SORTMEMORY 1038
-#define ER_UNEXPECTED_EOF 1039
-#define ER_CON_COUNT_ERROR 1040
-#define ER_OUT_OF_RESOURCES 1041
-#define ER_BAD_HOST_ERROR 1042
-#define ER_HANDSHAKE_ERROR 1043
-#define ER_DBACCESS_DENIED_ERROR 1044
-#define ER_ACCESS_DENIED_ERROR 1045
-#define ER_NO_DB_ERROR 1046
-#define ER_UNKNOWN_COM_ERROR 1047
-#define ER_BAD_NULL_ERROR 1048
-#define ER_BAD_DB_ERROR 1049
-#define ER_TABLE_EXISTS_ERROR 1050
-#define ER_BAD_TABLE_ERROR 1051
-#define ER_NON_UNIQ_ERROR 1052
-#define ER_SERVER_SHUTDOWN 1053
-#define ER_BAD_FIELD_ERROR 1054
-#define ER_WRONG_FIELD_WITH_GROUP 1055
-#define ER_WRONG_GROUP_FIELD 1056
-#define ER_WRONG_SUM_SELECT 1057
-#define ER_WRONG_VALUE_COUNT 1058
-#define ER_TOO_LONG_IDENT 1059
-#define ER_DUP_FIELDNAME 1060
-#define ER_DUP_KEYNAME 1061
-#define ER_DUP_ENTRY 1062
-#define ER_WRONG_FIELD_SPEC 1063
-#define ER_PARSE_ERROR 1064
-#define ER_EMPTY_QUERY 1065
-#define ER_NONUNIQ_TABLE 1066
-#define ER_INVALID_DEFAULT 1067
-#define ER_MULTIPLE_PRI_KEY 1068
-#define ER_TOO_MANY_KEYS 1069
-#define ER_TOO_MANY_KEY_PARTS 1070
-#define ER_TOO_LONG_KEY 1071
-#define ER_KEY_COLUMN_DOES_NOT_EXITS 1072
-#define ER_BLOB_USED_AS_KEY 1073
-#define ER_TOO_BIG_FIELDLENGTH 1074
-#define ER_WRONG_AUTO_KEY 1075
-#define ER_READY 1076
-#define ER_NORMAL_SHUTDOWN 1077
-#define ER_GOT_SIGNAL 1078
-#define ER_SHUTDOWN_COMPLETE 1079
-#define ER_FORCING_CLOSE 1080
-#define ER_IPSOCK_ERROR 1081
-#define ER_NO_SUCH_INDEX 1082
-#define ER_WRONG_FIELD_TERMINATORS 1083
-#define ER_BLOBS_AND_NO_TERMINATED 1084
-#define ER_TEXTFILE_NOT_READABLE 1085
-#define ER_FILE_EXISTS_ERROR 1086
-#define ER_LOAD_INFO 1087
-#define ER_ALTER_INFO 1088
-#define ER_WRONG_SUB_KEY 1089
-#define ER_CANT_REMOVE_ALL_FIELDS 1090
-#define ER_CANT_DROP_FIELD_OR_KEY 1091
-#define ER_INSERT_INFO 1092
-#define ER_UPDATE_TABLE_USED 1093
-#define ER_NO_SUCH_THREAD 1094
-#define ER_KILL_DENIED_ERROR 1095
-#define ER_NO_TABLES_USED 1096
-#define ER_TOO_BIG_SET 1097
-#define ER_NO_UNIQUE_LOGFILE 1098
-#define ER_TABLE_NOT_LOCKED_FOR_WRITE 1099
-#define ER_TABLE_NOT_LOCKED 1100
-#define ER_BLOB_CANT_HAVE_DEFAULT 1101
-#define ER_WRONG_DB_NAME 1102
-#define ER_WRONG_TABLE_NAME 1103
-#define ER_TOO_BIG_SELECT 1104
-#define ER_UNKNOWN_ERROR 1105
-#define ER_UNKNOWN_PROCEDURE 1106
-#define ER_WRONG_PARAMCOUNT_TO_PROCEDURE 1107
-#define ER_WRONG_PARAMETERS_TO_PROCEDURE 1108
-#define ER_UNKNOWN_TABLE 1109
-#define ER_FIELD_SPECIFIED_TWICE 1110
-#define ER_INVALID_GROUP_FUNC_USE 1111
-#define ER_UNSUPPORTED_EXTENSION 1112
-#define ER_TABLE_MUST_HAVE_COLUMNS 1113
-#define ER_RECORD_FILE_FULL 1114
-#define ER_UNKNOWN_CHARACTER_SET 1115
-#define ER_TOO_MANY_TABLES 1116
-#define ER_TOO_MANY_FIELDS 1117
-#define ER_TOO_BIG_ROWSIZE 1118
-#define ER_STACK_OVERRUN 1119
-#define ER_WRONG_OUTER_JOIN 1120
-#define ER_NULL_COLUMN_IN_INDEX 1121
-#define ER_CANT_FIND_UDF 1122
-#define ER_CANT_INITIALIZE_UDF 1123
-#define ER_UDF_NO_PATHS 1124
-#define ER_UDF_EXISTS 1125
-#define ER_CANT_OPEN_LIBRARY 1126
-#define ER_CANT_FIND_DL_ENTRY 1127
-#define ER_FUNCTION_NOT_DEFINED 1128
-#define ER_HOST_IS_BLOCKED 1129
-#define ER_HOST_NOT_PRIVILEGED 1130
-#define ER_PASSWORD_ANONYMOUS_USER 1131
-#define ER_PASSWORD_NOT_ALLOWED 1132
-#define ER_PASSWORD_NO_MATCH 1133
-#define ER_UPDATE_INFO 1134
-#define ER_CANT_CREATE_THREAD 1135
-#define ER_WRONG_VALUE_COUNT_ON_ROW 1136
-#define ER_CANT_REOPEN_TABLE 1137
-#define ER_INVALID_USE_OF_NULL 1138
-#define ER_REGEXP_ERROR 1139
-#define ER_MIX_OF_GROUP_FUNC_AND_FIELDS 1140
-#define ER_NONEXISTING_GRANT 1141
-#define ER_TABLEACCESS_DENIED_ERROR 1142
-#define ER_COLUMNACCESS_DENIED_ERROR 1143
-#define ER_ILLEGAL_GRANT_FOR_TABLE 1144
-#define ER_GRANT_WRONG_HOST_OR_USER 1145
-#define ER_NO_SUCH_TABLE 1146
-#define ER_NONEXISTING_TABLE_GRANT 1147
-#define ER_NOT_ALLOWED_COMMAND 1148
-#define ER_SYNTAX_ERROR 1149
-#define ER_DELAYED_CANT_CHANGE_LOCK 1150
-#define ER_TOO_MANY_DELAYED_THREADS 1151
-#define ER_ABORTING_CONNECTION 1152
-#define ER_NET_PACKET_TOO_LARGE 1153
-#define ER_NET_READ_ERROR_FROM_PIPE 1154
-#define ER_NET_FCNTL_ERROR 1155
-#define ER_NET_PACKETS_OUT_OF_ORDER 1156
-#define ER_NET_UNCOMPRESS_ERROR 1157
-#define ER_NET_READ_ERROR 1158
-#define ER_NET_READ_INTERRUPTED 1159
-#define ER_NET_ERROR_ON_WRITE 1160
-#define ER_NET_WRITE_INTERRUPTED 1161
-#define ER_TOO_LONG_STRING 1162
-#define ER_TABLE_CANT_HANDLE_BLOB 1163
-#define ER_TABLE_CANT_HANDLE_AUTO_INCREMENT 1164
-#define ER_DELAYED_INSERT_TABLE_LOCKED 1165
-#define ER_WRONG_COLUMN_NAME 1166
-#define ER_WRONG_KEY_COLUMN 1167
-#define ER_WRONG_MRG_TABLE 1168
-#define ER_DUP_UNIQUE 1169
-#define ER_BLOB_KEY_WITHOUT_LENGTH 1170
-#define ER_PRIMARY_CANT_HAVE_NULL 1171
-#define ER_TOO_MANY_ROWS 1172
-#define ER_REQUIRES_PRIMARY_KEY 1173
-#define ER_NO_RAID_COMPILED 1174
-#define ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE 1175
-#define ER_KEY_DOES_NOT_EXITS 1176
-#define ER_CHECK_NO_SUCH_TABLE 1177
-#define ER_CHECK_NOT_IMPLEMENTED 1178
-#define ER_CANT_DO_THIS_DURING_AN_TRANSACTION 1179
-#define ER_ERROR_DURING_COMMIT 1180
-#define ER_ERROR_DURING_ROLLBACK 1181
-#define ER_ERROR_DURING_FLUSH_LOGS 1182
-#define ER_ERROR_DURING_CHECKPOINT 1183
-#define ER_NEW_ABORTING_CONNECTION 1184
-#define ER_DUMP_NOT_IMPLEMENTED    1185
-#define ER_FLUSH_MASTER_BINLOG_CLOSED 1186
-#define ER_INDEX_REBUILD  1187
-#define ER_MASTER 1188
-#define ER_MASTER_NET_READ 1189
-#define ER_MASTER_NET_WRITE 1190
-#define ER_FT_MATCHING_KEY_NOT_FOUND 1191
-#define ER_LOCK_OR_ACTIVE_TRANSACTION 1192
-#define ER_UNKNOWN_SYSTEM_VARIABLE 1193
-#define ER_CRASHED_ON_USAGE 1194
-#define ER_CRASHED_ON_REPAIR 1195
-#define ER_WARNING_NOT_COMPLETE_ROLLBACK 1196
-#define ER_TRANS_CACHE_FULL 1197
-#define ER_SLAVE_MUST_STOP 1198
-#define ER_SLAVE_NOT_RUNNING 1199
-#define ER_BAD_SLAVE 1200
-#define ER_MASTER_INFO 1201
-#define ER_SLAVE_THREAD 1202
-#define ER_TOO_MANY_USER_CONNECTIONS 1203
-#define ER_SET_CONSTANTS_ONLY 1204
-#define ER_LOCK_WAIT_TIMEOUT 1205
-#define ER_LOCK_TABLE_FULL 1206
-#define ER_READ_ONLY_TRANSACTION 1207
-#define ER_DROP_DB_WITH_READ_LOCK 1208
-#define ER_CREATE_DB_WITH_READ_LOCK 1209
-#define ER_WRONG_ARGUMENTS 1210
-#define ER_NO_PERMISSION_TO_CREATE_USER 1211
-#define ER_UNION_TABLES_IN_DIFFERENT_DIR 1212
-#define ER_LOCK_DEADLOCK 1213
-#define ER_TABLE_CANT_HANDLE_FT 1214
-#define ER_CANNOT_ADD_FOREIGN 1215
-#define ER_NO_REFERENCED_ROW 1216
-#define ER_ROW_IS_REFERENCED 1217
-#define ER_CONNECT_TO_MASTER 1218
-#define ER_QUERY_ON_MASTER 1219
-#define ER_ERROR_WHEN_EXECUTING_COMMAND 1220
-#define ER_WRONG_USAGE 1221
-#define ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT 1222
-#define ER_CANT_UPDATE_WITH_READLOCK 1223
-#define ER_MIXING_NOT_ALLOWED 1224
-#define ER_DUP_ARGUMENT 1225
-#define ER_USER_LIMIT_REACHED 1226
-#define ER_SPECIFIC_ACCESS_DENIED_ERROR 1227
-#define ER_LOCAL_VARIABLE 1228
-#define ER_GLOBAL_VARIABLE 1229
-#define ER_NO_DEFAULT 1230
-#define ER_WRONG_VALUE_FOR_VAR 1231
-#define ER_WRONG_TYPE_FOR_VAR 1232
-#define ER_VAR_CANT_BE_READ 1233
-#define ER_CANT_USE_OPTION_HERE 1234
-#define ER_NOT_SUPPORTED_YET	1235
-#define ER_MASTER_FATAL_ERROR_READING_BINLOG 1236
-#define ER_SLAVE_IGNORED_TABLE 1237
-#define ER_INCORRECT_GLOBAL_LOCAL_VAR 1238
-#define ER_WRONG_FK_DEF 1239
-#define ER_KEY_REF_DO_NOT_MATCH_TABLE_REF 1240
-#define ER_OPERAND_COLUMNS 1241
-#define ER_SUBQUERY_NO_1_ROW 1242
-#define ER_UNKNOWN_STMT_HANDLER 1243
-#define ER_CORRUPT_HELP_DB 1244
-#define ER_CYCLIC_REFERENCE 1245
-#define ER_AUTO_CONVERT 1246
-#define ER_ILLEGAL_REFERENCE 1247
-#define ER_DERIVED_MUST_HAVE_ALIAS 1248
-#define ER_SELECT_REDUCED 1249
-#define ER_TABLENAME_NOT_ALLOWED_HERE 1250
-#define ER_NOT_SUPPORTED_AUTH_MODE 1251
-#define ER_SPATIAL_CANT_HAVE_NULL 1252
-#define ER_COLLATION_CHARSET_MISMATCH 1253
-#define ER_SLAVE_WAS_RUNNING 1254
-#define ER_SLAVE_WAS_NOT_RUNNING 1255
-#define ER_TOO_BIG_FOR_UNCOMPRESS 1256
-#define ER_ZLIB_Z_MEM_ERROR 1257
-#define ER_ZLIB_Z_BUF_ERROR 1258
-#define ER_ZLIB_Z_DATA_ERROR 1259
-#define ER_CUT_VALUE_GROUP_CONCAT 1260
-#define ER_WARN_TOO_FEW_RECORDS 1261
-#define ER_WARN_TOO_MANY_RECORDS 1262
-#define ER_WARN_NULL_TO_NOTNULL 1263
-#define ER_WARN_DATA_OUT_OF_RANGE 1264
-#define ER_WARN_DATA_TRUNCATED 1265
-#define ER_WARN_USING_OTHER_HANDLER 1266
-#define ER_CANT_AGGREGATE_2COLLATIONS 1267
-#define ER_DROP_USER 1268
-#define ER_REVOKE_GRANTS 1269
-#define ER_CANT_AGGREGATE_3COLLATIONS 1270
-#define ER_CANT_AGGREGATE_NCOLLATIONS 1271
-#define ER_VARIABLE_IS_NOT_STRUCT 1272
-#define ER_UNKNOWN_COLLATION 1273
-#define ER_SLAVE_IGNORED_SSL_PARAMS 1274
-#define ER_SERVER_IS_IN_SECURE_AUTH_MODE 1275
-#define ER_WARN_FIELD_RESOLVED 1276
-#define ER_BAD_SLAVE_UNTIL_COND 1277
-#define ER_MISSING_SKIP_SLAVE 1278
-#define ER_UNTIL_COND_IGNORED 1279
-#define ER_WRONG_NAME_FOR_INDEX 1280
-#define ER_WRONG_NAME_FOR_CATALOG 1281
-#define ER_WARN_QC_RESIZE 1282
-#define ER_BAD_FT_COLUMN 1283
-#define ER_UNKNOWN_KEY_CACHE 1284
-#define ER_WARN_HOSTNAME_WONT_WORK 1285
-#define ER_UNKNOWN_STORAGE_ENGINE 1286
-#define ER_WARN_DEPRECATED_SYNTAX 1287
-#define ER_NON_UPDATABLE_TABLE 1288
-#define ER_FEATURE_DISABLED 1289
-#define ER_OPTION_PREVENTS_STATEMENT 1290
-#define ER_DUPLICATED_VALUE_IN_TYPE 1291
-#define ER_TRUNCATED_WRONG_VALUE 1292
-#define ER_TOO_MUCH_AUTO_TIMESTAMP_COLS 1293
-#define ER_INVALID_ON_UPDATE 1294
-#define ER_UNSUPPORTED_PS 1295
-#define ER_GET_ERRMSG 1296
-#define ER_GET_TEMPORARY_ERRMSG 1297
-#define ER_UNKNOWN_TIME_ZONE 1298
-#define ER_WARN_INVALID_TIMESTAMP 1299
-#define ER_INVALID_CHARACTER_STRING 1300
-#define ER_WARN_ALLOWED_PACKET_OVERFLOWED 1301
-#define ER_CONFLICTING_DECLARATIONS 1302
-#define ER_ERROR_MESSAGES 303
diff --git a/src/terralib/drivers/MySQL/include/raid.h b/src/terralib/drivers/MySQL/include/raid.h
deleted file mode 100644
index b5a5e66..0000000
--- a/src/terralib/drivers/MySQL/include/raid.h
+++ /dev/null
@@ -1,158 +0,0 @@
-/* Copyright (C) 2000 MySQL AB
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
-
-/* Parser needs these defines  always, even if USE_RAID is not defined */
-#define RAID_TYPE_0 1       /* Striping */
-#define RAID_TYPE_x 2       /* Some new modes */
-#define RAID_TYPE_y 3
-
-#define RAID_DEFAULT_CHUNKS 4
-#define RAID_DEFAULT_CHUNKSIZE 256*1024 /* 256kB */
-
-C_MODE_START
-#define my_raid_type(raid_type)  raid_type_string[(int)(raid_type)]
-extern const char *raid_type_string[];
-C_MODE_END
-
-#ifdef DONT_USE_RAID
-#undef USE_RAID
-#endif
-#if defined(USE_RAID)
-
-#ifdef __GNUC__
-#pragma interface			/* gcc class implementation */
-#endif
-#include "my_dir.h"
-
-/* Trap all occurences of my_...() in source and use our wrapper around this function */
-
-#ifdef MAP_TO_USE_RAID
-#define my_read(A,B,C,D)     my_raid_read(A,B,C,D)
-#define my_write(A,B,C,D)    my_raid_write(A,B,C,D)
-#define my_pwrite(A,B,C,D,E) my_raid_pwrite(A,B,C,D,E)
-#define my_pread(A,B,C,D,E)  my_raid_pread(A,B,C,D,E)
-#define my_chsize(A,B,C,D)   my_raid_chsize(A,B,C,D)
-#define my_close(A,B)        my_raid_close(A,B)
-#define my_tell(A,B)         my_raid_tell(A,B)
-#define my_seek(A,B,C,D)     my_raid_seek(A,B,C,D)
-#define my_lock(A,B,C,D,E)     my_raid_lock(A,B,C,D,E)
-#define my_fstat(A,B,C)     my_raid_fstat(A,B,C)
-#endif /* MAP_TO_USE_RAID */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-  void init_raid(void);
-  void end_raid(void);
-
-  bool is_raid(File fd);
-  File my_raid_create(const char *FileName, int CreateFlags, int access_flags,
-		      uint raid_type, uint raid_chunks, ulong raid_chunksize,
-		      myf MyFlags);
-  File my_raid_open(const char *FileName, int Flags,
-		    uint raid_type, uint raid_chunks, ulong raid_chunksize,
-		    myf MyFlags);
-  int my_raid_rename(const char *from, const char *to, uint raid_chunks,
-		     myf MyFlags);
-  int my_raid_delete(const char *from, uint raid_chunks, myf MyFlags);
-  int my_raid_redel(const char *old_name, const char *new_name,
-		    uint raid_chunks, myf MyFlags);
-
-  my_off_t my_raid_seek(File fd, my_off_t pos, int whence, myf MyFlags);
-  my_off_t my_raid_tell(File fd, myf MyFlags);
-
-  uint my_raid_write(File,const byte *Buffer, uint Count, myf MyFlags);
-  uint my_raid_read(File Filedes, byte *Buffer, uint Count, myf MyFlags);
-
-  uint my_raid_pread(File Filedes, byte *Buffer, uint Count, my_off_t offset,
-		     myf MyFlags);
-  uint my_raid_pwrite(int Filedes, const byte *Buffer, uint Count,
-		      my_off_t offset, myf MyFlags);
-
-  int my_raid_lock(File,int locktype, my_off_t start, my_off_t length,
-		   myf MyFlags);
-  int my_raid_chsize(File fd, my_off_t newlength, int filler, myf MyFlags);
-  int my_raid_close(File, myf MyFlags);
-  int my_raid_fstat(int Filedes, struct stat *buf,  myf MyFlags);
-
-#ifdef __cplusplus
-}
-
-class RaidName {
-  public:
-    RaidName(const char *FileName);
-    ~RaidName();
-    bool IsRaid();
-    int Rename(const char * from, const char * to, myf MyFlags);
-  private:
-    uint _raid_type;       /* RAID_TYPE_0 or RAID_TYPE_1 or RAID_TYPE_5 */
-    uint _raid_chunks;     /* 1..n */
-    ulong _raid_chunksize; /* 1..n in bytes */
-};
-
-class RaidFd {
-  public:
-    RaidFd(uint raid_type, uint raid_chunks , ulong raid_chunksize);
-    ~RaidFd();
-    File Create(const char *FileName, int CreateFlags, int access_flags,
-		myf MyFlags);
-    File Open(const char *FileName, int Flags, myf MyFlags);
-    my_off_t Seek(my_off_t pos,int whence,myf MyFlags);
-    my_off_t Tell(myf MyFlags);
-    int Write(const byte *Buffer, uint Count, myf MyFlags);
-    int Read(const byte *Buffer, uint Count, myf MyFlags);
-    int Lock(int locktype, my_off_t start, my_off_t length, myf MyFlags);
-    int Chsize(File fd, my_off_t newlength, int filler, myf MyFlags);
-    int Fstat(int fd, MY_STAT *stat_area, myf MyFlags );
-    int Close(myf MyFlags);
-    static bool IsRaid(File fd);
-    static DYNAMIC_ARRAY _raid_map;		/* Map of RaidFD* */
-  private:
-
-    uint _raid_type;       /* RAID_TYPE_0 or RAID_TYPE_1 or RAID_TYPE_5 */
-    uint _raid_chunks;     /* 1..n */
-    ulong _raid_chunksize; /* 1..n in bytes */
-
-    ulong _total_block;    /* We are operating with block no x (can be 0..many). */
-    uint _this_block;      /* can be 0.._raid_chunks */
-    uint _remaining_bytes; /* Maximum bytes that can be written in this block */
-
-    my_off_t _position;
-    my_off_t _size;        /* Cached file size for faster seek(SEEK_END) */
-    File _fd;
-    File *_fd_vector;		/* Array of File */
-    off_t *_seek_vector;	/* Array of cached seek positions */
-
-    inline void Calculate()
-    {
-      DBUG_ENTER("RaidFd::_Calculate");
-      DBUG_PRINT("info",("_position: %lu _raid_chunksize: %d, _size: %lu",
-			 (ulong) _position, _raid_chunksize, (ulong) _size));
-
-      _total_block = (ulong) (_position / _raid_chunksize);
-      _this_block = _total_block % _raid_chunks;    /* can be 0.._raid_chunks */
-      _remaining_bytes = (uint) (_raid_chunksize -
-				 (_position - _total_block * _raid_chunksize));
-      DBUG_PRINT("info",
-		 ("_total_block: %d  this_block: %d  _remaining_bytes:%d",
-		  _total_block, _this_block, _remaining_bytes));
-      DBUG_VOID_RETURN;
-    }
-};
-
-#endif /* __cplusplus */
-#endif /* USE_RAID */
diff --git a/src/terralib/drivers/MySQL/include/typelib.h b/src/terralib/drivers/MySQL/include/typelib.h
deleted file mode 100644
index 1b049d1..0000000
--- a/src/terralib/drivers/MySQL/include/typelib.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Copyright (C) 2000 MySQL AB
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
-
-
-#ifndef _typelib_h
-#define _typelib_h
-
-typedef struct st_typelib {	/* Different types saved here */
-  unsigned int count;		/* How many types */
-  const char *name;		/* Name of typelib */
-  const char **type_names;
-} TYPELIB;
-
-extern int find_type(char *x,TYPELIB *typelib,unsigned int full_name);
-extern void make_type(char *to,unsigned int nr,TYPELIB *typelib);
-extern const char *get_type(TYPELIB *typelib,unsigned int nr);
-
-extern TYPELIB sql_protocol_typelib;
-
-#endif /* _typelib_h */
diff --git a/src/terralib/drivers/OracleSpatial/OCI/include/cdemodp0.h b/src/terralib/drivers/OracleSpatial/OCI/include/cdemodp0.h
deleted file mode 100644
index 419543c..0000000
--- a/src/terralib/drivers/OracleSpatial/OCI/include/cdemodp0.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * $Header: /home/terralib/src/terralib/drivers/OracleSpatial/OCI/include/cdemodp0.h,v 1.2 2002/12/13 13:33:55 karine Exp $
- */
-
-/* Copyright (c) 1998, 1999, Oracle Corporation.  All rights reserved.
-*/
-
-/*
-   NAME
-     cdemodp0.h - C Demo program for Direct Path api
-
-   DESCRIPTION
-     - Internal data structs, macros, & defines for cdemodp driver.
-
-   NOTES
-     Structures, macros, constants used only by cdemodp.c.
-
-   MODIFIED   (MM/DD/YY)
-   mjaeger     07/14/99 - bug 808870: OCCS: convert tabs, no long lines
-   abrumm      12/22/98 - lint
-   cmlim       11/17/98 - take away hardcoded MAX_RECLEN; now a session parm
-   cmlim       10/06/98 - correct typo
-   cmlim       10/02/98 - added externref
-   cmlim       09/16/98 - internal data structs, macros, & defines for cdemodp
-   cmlim       09/16/98 - Creation (abrumm 04/07/98)
-
-*/
-
-
-#ifndef cdemodp0_ORACLE
-# define cdemodp0_ORACLE
-
-# include <oratypes.h>
-# include <oci.h>
-
-/* partial field context structure, maintained by field setting function */
-struct pctx
-{
-  ub1   valid_pctx;                              /* partial context is valid */
-  ub4   pieceCnt_pctx;                            /* count of partial pieces */
-  ub4   row_pctx;                               /* which row in column array */
-  ub4   col_pctx;                            /* which column in column array */
-  ub4   len_pctx;                            /* length of this column so far */
-  int   fd_pctx;                 /* open file descriptor data is coming from */
-  char *fnm_pctx;                                /* filename for data source */
-};
-
-/* CLEAR_PCTX(struct pctx pctx)
- *   Macro to clear the partial context state
- */
-#define CLEAR_PCTX(pctx) \
-  ((pctx).valid_pctx = FALSE,   (pctx).pieceCnt_pctx = 0,    \
-   (pctx).row_pctx = UB4MAXVAL, (pctx).col_pctx = UB4MAXVAL, \
-   (pctx).len_pctx = 0,         (pctx).fd_pctx  = -1,        \
-   (pctx).fnm_pctx = (char *)0)
-
-#define SET_PCTX(pctx, rowoff, coloff, clen, fd, fnm) \
-  ((pctx).valid_pctx = TRUE,   (pctx).pieceCnt_pctx++,     \
-   (pctx).row_pctx = (rowoff), (pctx).col_pctx = (coloff), \
-   (pctx).len_pctx += (ub4)(clen), (pctx).fd_pctx = (fd),  \
-   (pctx).fnm_pctx = (fnm))
-
-#define LEN_PCTX(pctx) ((pctx).len_pctx)
-
-/* Does the input record correspond to the first piece of a row?
- * Note that a row which is not pieced is a first piece too.
- */
-#define FIRST_PIECE(pctx)       \
-( (pctx).valid_pctx == FALSE || \
- ((pctx).valid_pctx == TRUE  && ((pctx).pieceCnt_pctx == 1)))
-
-/* return values from field_set() */
-#define FIELD_SET_COMPLETE   0
-#define FIELD_SET_ERROR      1
-#define FIELD_SET_BUF        2
-#define FIELD_SET_PARTIAL    3
-
-/* return values from do_convert() */
-#define CONVERT_SUCCESS      0
-#define CONVERT_ERROR        1
-#define CONVERT_NEED_DATA    2
-#define CONVERT_CONTINUE     3
-
-/* return values from do_load() */
-#define LOAD_SUCCESS     0
-#define LOAD_ERROR       1
-#define LOAD_NEED_DATA   2
-#define LOAD_NO_DATA     3
-
-/* state values for simple_load() */
-#define RESET             1 /* initial state, reset data structures to empty */
-#define GET_RECORD        2                             /* get input records */
-#define FIELD_SET         3     /* assign fields of input records to columns */
-#define DO_CONVERT        4   /* convert column array input to stream format */
-#define DO_LOAD           5                        /* load the direct stream */
-#define END_OF_INPUT      6                            /* no more input data */
-
-/* Secondary buffer sizes for OUTOFLINE fields; no science here, just a WAG */
-#define SECONDARY_BUF_SIZE (1024*1024)           /* size of secondary buffer */
-#define SECONDARY_BUF_SLOP (8*1024)  /* get another field if this much avail */
-
-#define STATICF
-
-#ifndef externref
-# define externref extern
-#endif
-
-
-#endif                                              /* cdemodp0_ORACLE */
diff --git a/src/terralib/drivers/OracleSpatial/OCI/include/kusapi.h b/src/terralib/drivers/OracleSpatial/OCI/include/kusapi.h
deleted file mode 100644
index 9a51999..0000000
--- a/src/terralib/drivers/OracleSpatial/OCI/include/kusapi.h
+++ /dev/null
@@ -1,775 +0,0 @@
-/*
- * $Header: /home/terralib/src/terralib/drivers/OracleSpatial/OCI/include/kusapi.h,v 1.2 2002/12/13 13:33:55 karine Exp $
- */
-
-/* Copyright (c) Oracle Corporation 1996, 1997. All Rights Reserved. */ 
- 
-/* NOTE:  See 'header_template.doc' in the 'doc' dve under the 'forms' 
-      directory for the header file template that includes instructions. 
-*/
- 
-/* 
-   NAME 
-     kusapi.h - Kernel Utility Statistics Application Programming Interface
-
-   DESCRIPTION 
-     Declarations of types and functions of the API used to retrieve 
-     statistics from the SGA
-
-   PUBLIC FUNCTION(S) 
-     kusdb_connect - connect to a database
-     kuscx_allocate - allocate continuation context
-     kuscx_free - free continuation context
-     kuscx_init - initialize continuation context
-     kusdb_get_info - retrieve database information
-     kusdb_get_memory - copy SGA contents into user-allocated memory
-     kusdb_disconnect - disconnect from database
-     kusdb_error_text - format message for last error
-     kustv_allocate_handle - allocate a TLV handle
-     kustv_dump - dump a TLV buffer
-     kustv_free_handle - free a TLV handle
-     kustv_get - get next entry in a TLV buffer
-     kustv_offset - return offset for current entry in TLV buffer
-     kussys_get_info - retrieve non-db-related info (noop for Oracle)
-     kussys_error_text - format message for last error (noop for Oracle)
-     kustvp1_put_one_byte - put TLV entry with 1 byte value into TLV buffer
-     kustvp2_put_two_bytes - put TLV entry with 2 byte value into TLV buffer
-     kustvp4_put_four_bytes - put TLV entry with 4 byte value into TLV buffer
-     kustv_put - put TLV entry into TLV buffer
-     kustvptg_put_tag - put TLV entry with empty value into TLV buffer
-     kustv_reinit_handle - reset offset for a TLV handle
-     kustv_buffer_state - return termination state for tlv buffer
-
-   NOTES
-     This interface is subject to change without notice
-
-   MODIFIED   (MM/DD/YY)
-   pabingha    03/14/97 - Add get_tagname argument
-   jstenois    11/05/96 - "Make kustv_dump() header CONST"
-   jstenois    11/01/96 - Use oratypes instead of sx.h
-   jstenois    08/15/96 - SGAAPI public include file
-   jstenois    08/15/96 - Creation
-
-*/
-
- 
-#ifndef KUSAPI
-# define KUSAPI
-
-# ifndef ORATYPES
-#  include <oratypes.h>
-# endif
-
-
-/*---------------------------------------------------------------------------
-                     PUBLIC TYPES AND CONSTANTS
-  ---------------------------------------------------------------------------*/
-
-/* values for status code returned by API calls */
-
-typedef enum kusst
-  {
-
-    KUSSTOK =		1,	/* Success                              */
-    KUSSTEOB =		2,	/* Cursor at end of buffer.	        */
-    KUSSTNWR =		3,	/* Attempt to write to TLV when no      */
-				/*    length specified at init time	*/
-    KUSSTILN =		4,	/* Invalid length specified when	*/
-				/*    passing by value			*/
-    KUSSTTRNC =		5,	/* buffer was truncated			*/
-    KUSSTCONT =		6,	/* buffer is continued			*/
-    KUSSTALLC =		7,	/* unable to allocate memory		*/
-    KUSSTUNKC =		8,	/* unknown class tag specified		*/
-    KUSSTICH =		9,	/* Invalid context handle		*/
-    KUSSTIDH =		10,	/* Invalid database handle		*/
-    KUSSTITH =		11,	/* Invalid TLV handle			*/
-    KUSSTDIS =		12,	/* Stats collection disabled for database */
-    KUSSTERR =		13,	/* Unexpected error encountered		*/
-    KUSSTBINF =		14,	/* Input buffer contained a bad tag	*/
-    KUSSTBDKY =         15,     /* Bad index value for class tag	*/
-    KUSSTBFSML =	16,	/* Buffer is too small for data		*/
-    KUSSTIBE =		17,	/* Information buffer is empty          */
-    KUSSTDBDOWN =       18,     /* Database is unavaliable              */
-    KUSSTFILACC =       19,     /* File cannot be accessed              */
-    KUSSTINVDB =        20,     /* File is not a db root file (Rdb only)*/
-    KUSSTNODB =         21,     /* Db root file doesn't exist (Rdb only)*/
-    KUSSTBADVER =       22,     /* Db root file wrong version (Rdb only)*/
-    KUSSTCIU =          23,     /* Context is already in use            */
-    KUSSTDMPOP =        24,     /* Unable to open dump output file      */
-    KUSSTDMPCL =        25      /* Unable to close dump output file     */
-  } kusst;
-
-
-/* values returned by kustvstate */ 
-
-typedef enum kustvs
-  {
-    KUSTVS_CONT =	1,	/* tlv buffer terminated with KUSSTCONT	*/
-    KUSTVS_END =	2,	/* tlv buffer terminated with KUSSTBEND	*/
-    KUSTVS_TRUNC =	3,	/* tlv buffer terminated with KUSSTTRNC	*/
-    KUSTVS_UNK =	4	/* handle specified has not been used	*/
-                                /* to read or write a termination tag   */
-  } kustvs;
-
-
-/* Type Definitions for handles */
-
-typedef dvoid *kusdb_handle;	/* handle for connected database */
-typedef dvoid *kuscx_handle;	/* handle for continuation context */
-typedef dvoid *kustv_handle;	/* handle for TLV context */
-
-/* Data structure for use by kusdb_get_memory */
-
-typedef struct kusmem
-  {
-    ub1 *sga_address_kusmem;    /* SGA memory address */
-    ub4 length_kusmem;          /* Number of bytes to copy */
-    ub1 *dest_address_kusmem;   /* User-allocated destination for SGA data */
-  } kusmem;
-
-
-/*---------------------------------------------------------------------------
-                           PUBLIC FUNCTIONS
-  ---------------------------------------------------------------------------*/
-
-
-/* ---------------------------- kuscx_allocate ----------------------------- */
-/*
-  NAME
-    kuscx_allocate -  allocate continuation context
-  DESCRIPTION
-    Allocate space to track information about continuation context for a 
-    kusdb_get_info call.
-  PARAMETERS
-    context_handle - handle for the continuation context (in/out)
-  RETURN VALUE
-    status of call
-  NOTES
-    kuscx_init can be used to reinitilize a context that has been allocated 
-    and is no longer used for a TLV buffer
-*/
-
-kusst kuscx_allocate (/*_ kuscx_handle *context_handle _*/);
-
-
-
-
-/* ------------------------------ kuscx_free_handle ------------------------ */
-/*
-  NAME
-    kuscx_free_handle -  free continuation context
-  DESCRIPTION
-    free space used to track information about continuation context for a 
-    kusdb_get_info call.
-  PARAMETERS
-    context_handle - handle for the continuation context (in/out)
-  RETURN VALUE
-    status of call
-  NOTES
-    kuscx_init can be used to reinitilize a context that has been allocated
-    and is no longer used for a TLV buffer
-*/
-
-kusst kuscx_free_handle (/*_ kuscx_handle *context_handle _*/);
-
-
-
-
-/* ------------------------------ kuscx_init ------------------------------- */
-/*
-  NAME
-    kuscx_init -  initialize continuation context
-  DESCRIPTION
-    Reinitialize a context handle that has been previously allocated and used.
-  PARAMETERS
-    context_handle - handle for the continuation context (in/out)
-  RETURN VALUE
-    status of call
-  NOTES
-    kuscx_init is the semantic equivalent of freeing a context handle and then
-    allocating a new one.
-*/
-
-kusst kuscx_init (/*_ kuscx_handle *context_handle _*/);
-
-
-
-/* ----------------------------- kusdb_allocate ---------------------------- */
-/*
-  NAME
-    kusdb_allocate - allocate a database handle
-  DESCRIPTION
-    allocate resources for a database handle
-  PARAMETERS
-    db_handle - handle for the database context (in/out)
-  RETURN VALUE
-    kusst - status of attempt to allocate
-*/
-
-kusst kusdb_allocate (/*_ kusdb_handle *db_handle _*/);
-
-
-
-
-/* ----------------------------- kusdb_connect ----------------------------- */
-/*
-  NAME
-    kusdb_connect - connect to a database
-  DESCRIPTION
-    Connects to a database so that statistics for that database can be
-    retrieved.
-  PARAMETERS
-    db_handle - handle for the database context (in/out)
-    database_name_length - number of bytes in database_name parameter
-    database name - name of database
-    security_info_length - number of bytes in security_info parameter
-    security_info - security information used to attach to database
-  RETURN VALUE
-    status of attempt to connect
-  NOTES
-    If the status is not successful, call kusdb_error_text to get more 
-    information about the failure.
-    Refer to the documentation for the format of information in the
-    database_name and security_info parameters.
-*/
-
-kusst kusdb_connect (/*_
-	kusdb_handle db_handle,
-	ub4 database_name_length,
-	char *database_name,
-	ub4 security_info_length,
-	char *security_info
-	_*/);
-
-
-
-
-/* ---------------------------- kusdb_disconnect --------------------------- */
-/*
-  NAME
-    kusdb_disconnect - disconnect from a database
-  DESCRIPTION
-    Disconnect from the current database
-  PARAMETERS
-    db_handle - handle for the database (in/out)
-  RETURN VALUE
-    status of call
-  NOTES
-*/
-
-kusst kusdb_disconnect (/*_ kusdb_handle db_handle _*/);
-
-
-
-
-/* ------------------------------- kusdb_free ------------------------------ */
-/*
-  NAME
-    kusdb_free - free a database handle
-  DESCRIPTION
-    free resources for a database handle
-  PARAMETERS
-    db_handle - handle for the database context (in/out)
-  RETURN VALUE
-    kusst - status of attempt to free the handle
-*/
-
-kusst kusdb_free (/*_ kusdb_handle *db_handle _*/);
-
-
-
-
-/* ----------------------------- kusdb_get_info ---------------------------- */
-/*
-  NAME
-    kusdb_get_info - retrieve statistics for a database
-  DESCRIPTION
-    Retrieve requested statistics for the current database
-  PARAMETERS
-    db_handle - handle for the database (in)
-    context_handle - handle for the continuation context (in/out)
-    info_buf - TLV buffer indicating data to be returned (in)
-    info_buf_len - number of bytes in info_buffer (in)
-    result_buf - allocated TLV buffer to hold data returned (in/out)
-    result_buf_len - number of bytes in result_buf (in/out)
-    buffer_termination_status - indicates how buffer was terminated (normally,
-      truncated, or continued) (out)
-  RETURN VALUE
-    status of call
-  NOTES
-    If the status is not successful, call kusdb_error_text to get more 
-    information about the failure.
-    Refer to documentation for information on the format of the information
-    buffer and the result buffer
-*/
-
-kusst kusdb_get_info (/*_
-	kusdb_handle db_handle,
-	kuscx_handle ctx_handle,
-	ub1 *info_buffer,
-	ub4 info_buffer_length,
-	ub1 *result_buffer,
-	ub4 *result_buffer_length,
-	kustvs *buffer_termination_status
-	_*/);
-
-
-
-/* ----------------------------- kusdb_get_memory -------------------------- */
-/*
-  NAME
-    kusdb_get_memory - copy SGA contents into user-allocated memory
-  DESCRIPTION
-    Copy SGA memory into user-allocated memory regions. User provides
-    an array of kusmem structures. Each kusmem structure in the array
-    describes a distinct copy to be done by this routine.
-  PARAMETERS
-    db_handle - handle for the database (in)
-    mem_array_length - number of elements in mem_array (in)
-    mem_array - address of an array of kusmem structures (in/out)
-  RETURN VALUE
-    status of call:
-        KUSSTOK - call succeeded, all requested data copied
-        KUSSTIDH - invalid database handle
-        KUSSTDBDOWN - database is down
-        KUSSTERR - unexpected error
-  NOTES
-     User should prepare each kusmem structure in array by filling in
-     values for sga_address_kusmem, length_kusmem and dest_address_kusmem
-     prior to making this call. 
-
-     User is reponsible for allocating and deallocating the memory used
-     by mem_array and each region that a dest_address_kusmem points to.
-*/
-
-kusst kusdb_get_memory (/*_
-	kusdb_handle db_handle,
-        ub4 mem_array_length,
-        kusmem *mem_array
-	_*/);
-
-
-
-
-/* ---------------------------- kusdb_error_text --------------------------- */
-/*
-  NAME
-    kusdb_error_text - error text
-  DESCRIPTION
-    Display information about status of last kusdb call
-  PARAMETERS
-    db_ctx - context whose errors are to be returned (in)
-    text_buf - buffer to hold error message (in/out)
-    text_buf_len - number of bytes in text buffer (in)
-    text_len_out - number of bytes written into text_buf
-  RETURN VALUE
-    status of call
-  NOTES
-*/
-
-kusst kusdb_error_text (/*_ kusdb_handle db_ctx, char *text_buf,
-			  ub4 text_buf_len, ub4 *text_len_out _*/);
-
-
-
-
-/* ------------------------ kustv_allocate_handle -------------------------- */
-/*
-  NAME
-    kustv_allocate_handle - allocate a handle for a TLV buffer
-  DESCRIPTION
-    allocates and initializes information for a TLV handle
-  PARAMETERS
-    tlv_handle - handle of the TLV buffer (in/out)
-    tlv_buffer - address of the TLV buffer for this handle (in)
-    buf_size - number of bytes in tlv_buffer (in)
-  RETURN VALUE
-    KUSSTALL	Unable to allocate memory
-  NOTES
-    kustv_reinit can be used to reinitialize a TLV handle that is no longer
-    needed.
-*/
-
-kusst kustv_allocate_handle (/*_
-	kustv_handle *tlv_handle,
-	ub1 *tlv_buffer,
-	ub4 buf_size
-	_*/);
-
-
-#ifndef _WINDOWS
-
-
-/* ------------------------------- kustv_dump -------------------------------*/
-/*
-  NAME
-    kustv_dump - dump tlv buffer
-  DESCRIPTION
-    Formats the content of a TLV buffer into the file specified by the caller
-  PARAMETERS
-    tlv_handle - handle of the TLV buffer to be dumped (in)
-    header - ASCIZ string to be displayed before dumping the buffer (in)
-    data_flg - flag to indicate if the contents of the value fueld in the TLV
-	should be displayed (in)
-    append_flg - flag to indicate if an existing instance of the output
-        file should be appended to (or replaced)
-    get_tagname - routine to get text associated with tags
-    directory - ASCIZ string containing a directory specification for the
-        output file (if absent, current default directory is used)
-    file_name - ASCIZ string containing a file name for the output file.
-        If absent, stderr is used and append_flg and directory are ignored.
-        If specified without an extension, the Oracle extension for an output
-        file on the given platform is used.
-  RETURN VALUE
-    KUSSTOK	Success
-    KUSSTITH	invalid tlv handle
-    KUSSTDMPOP  can't open dump file
-    KUSSTDMPCL  can't close dump file
-  NOTES
-*/
-
-kusst kustv_dump (/*_
-	kustv_handle tlv_handle,
-	CONST char *header,
-	int data_flg,
-        int append_flg,
-        CONST char *(*get_tagname)(ub2),
-        CONST char *directory,
-        CONST char *file_name
-	_*/);
-
-#endif
-
-
-/* ------------------------- kustv_free_handle ----------------------------- */
-/*
-  NAME
-    kustv_free_handle - free a handle for a TLV buffer
-  DESCRIPTION
-    Free a TLV handle that has already been created
-  PARAMETERS
-    tlv_handle - handle of the TLV buffer (in/out)
-  RETURN VALUE
-    status of call
-  NOTES
-    kustv_reinit_handle can be used to reinitialize a handle that is no 
-    longer needed.
-*/
-
-kusst kustv_free_handle (/*_ kustv_handle *tlv_handle _*/);
-
-/* ----------------------------- kussys_get_info --------------------------- */
-/*
-  NAME
-    kussys_get_info - retrieve non database specific data
-  DESCRIPTION
-    Retrieve non database specific information
-  PARAMETERS
-    context_handle - handle for the continuation context (in/out)
-    info_buf - TLV buffer indicating data to be returned (in)
-    info_buf_len - number of bytes in info_buffer (in)
-    result_buf - allocated TLV buffer to hold data returned (in/out)
-    result_buf_len - number of bytes in result_buf (in/out)
-    buffer_termination_status - indicates how buffer was terminated (normally,
-      truncated, or continued) (out)
-  RETURN VALUE
-    status of call
-  NOTES
-    This function is a noop for Oracle. It is included for compatability
-    with Rdb only.
-*/
-
-kusst kussys_get_info (/*_
-	kuscx_handle ctx_handle,
-	ub1 *info_buffer,
-	ub4 info_buffer_length,
-	ub1 *result_buffer,
-	ub4 *result_buffer_length,
-	kustvs *buffer_termination_status
-	_*/);
-
-
-
-
-
-/* ---------------------------- kussys_error_text -------------------------- */
-/*
-  NAME
-    kussys_error_text - error text
-  DESCRIPTION
-    Display information about status of last kustv call
-  PARAMETERS
-    text_buf - buffer to hold error message (in/out)
-    text_buf_len - number of bytes in text buffer (in)
-    text_len_out - number of bytes written into text_buf
-  RETURN VALUE
-    status of call
-  NOTES
-    This function is a noop for Oracle. It is included for compatability
-    with Rdb only.
-*/
-
-kusst kussys_error_text (/*_ char *text_buf,
-			  ub4 text_buf_len, ub4 *text_len_out _*/);
-
-
-
-
-/* ------------------------------ kustv_get -------------------------------- */
-/*
-  NAME
-    kustv_get - get next entry in tlv buffer
-  DESCRIPTION
-    Retrieves information about next entry in the tlv buffer and advances
-    pointer into the TLV buffer to the following entry.
-  PARAMETERS
-    tlv_handle - handle of the TLV buffer (in)
-    tag - tag for the next entry (out)
-    length - number of bytes in the value for the TLV entry (out)
-    value - pointer to value field for the TLV entry (out)
-  RETURN VALUE
-    KUSSTOK	Success
-    KUSSTITH	Invalid TLV handle
-  NOTES
-*/
-
-kusst kustv_get (/*_
-	kustv_handle tlv_handle,
-	ub2 *tag,
-	ub2 *length,
-	ub1 **value
-	_*/);
-
-
-
-
-
-/* ------------------------ kustv_reinit_handle ---------------------------- */
-/*
-  NAME
-    kustv_reinit_handle - reinitialize a TLV handle
-  DESCRIPTION
-    Reimitializes a TLV handle so that it can be used to read or write a new
-    TLV buffer.
-  PARAMETERS
-    tlv_handle - handle of the TLV buffer (in/out)
-    buffer - address of the TLV buffer
-    buffer_size - number of bytes in the TLV buffer
-  RETURN VALUE
-    KUSSTOK	Success
-    KUSSTITH	Invalid TLV handle
-  NOTES
-*/
-
-kusst kustv_reinit_handle (/*_ 
-	kustv_handle tlv_handle,
-	ub1 *buffer,
-	ub4 buffer_length
-	_*/);
-
-
-
-
-
-/* --------------------------- kustv_length -------------------------------- */
-
-/*
-  NAME
-    kustv_length - return length of a TLV buffer
-  DESCRIPTION
-    return the length of a TLV buffer associated with a TLV handle
-  PARAMETERS
-    tlv_handle - handle of the TLV buffer (in)
-    buffer_length - number of bytes in the buffer (out)
-  RETURN VALUE
-    KUSSTOK	Success
-    KUSSTITL	Invalid TLV handle
-  NOTES
-*/
-
-kusst kustv_length (/*_ 
-	kustv_handle tlv_handle,
-	ub4 buffer_length
-	_*/);
-
-
-
-
-/* ---------------------------- kustv_offset ------------------------------- */
-
-/*
-  NAME
-    kustv_offset - return offset of a TLV buffer
-  DESCRIPTION
-    return the current offset of a TLV buffer associated with a TLV handle
-  PARAMETERS
-    tlv_handle - handle of the TLV buffer (in)
-    offset - current offset for TLV buffer (out)
-  RETURN VALUE
-    KUSSTOK - success
-    KUSSTITH - invalid TLV handle
-  NOTES
-*/
-
-kusst kustv_offset (/*_ 
-	kustv_handle tlv_handle, 
-	ub4 *offset 
-	_*/);
-
-
-
-
-/* ------------------------ kustvp1_put_one_byte --------------------------- */
-
-/*
-  NAME
-    kustvp1_put_one_byte - Insert a TLV entry with a value field of 1 byte
-  DESCRIPTION
-    Adds a new TLV entry to the end of the current TLV buffer.  This entry
-    contains 1 byte.
-  PARAMETERS
-    tlv_handle - handle of the TLV buffer (in/out)
-    tag - tag for the new entry (in)
-    value - value for the new entry (in)
-  RETURN VALUE
-    status of the operation
-  NOTES
-*/
-
-kusst kustvp1_put_one_byte (/*_
-	kustv_handle tlv_handle,
-	ub2 tag,
-	ub1 value
-	_*/);
-
-
-
-
-/* ------------------------- kustvp2_put_two_bytes ------------------------- */
-
-/*
-  NAME
-    kustvp2_put_two_bytes - Insert a TLV entry with a value field of 2 byte
-  DESCRIPTION
-    Adds a new TLV entry to the end of the current TLV buffer.  This entry
-    contains 2 bytes.
-  PARAMETERS
-    tlv_handle - handle of the TLV buffer (in/out)
-    tag - tag for the new entry (in)
-    value - value for the new entry (in)
-  RETURN VALUE
-    status of the operation
-  NOTES
-*/
-
-kusst kustvp2_put_two_bytes (/*_
-	kustv_handle tlv_handle,
-	ub2 tag,
-	ub2 value
-	_*/);
-
-
-
-
-/* ----------------------- kustvp4_put_four_bytes -------------------------- */
-
-/*
-  NAME
-    kustvp4_put_four_bytes - Insert a TLV entry with a value field of 4 byte
-  DESCRIPTION
-    Adds a new TLV entry to the end of the current TLV buffer.  This entry
-    contains 4 bytes.
-  PARAMETERS
-    tlv_handle - handle of the TLV buffer (in/out)
-    tag - tag for the new entry (in)
-    value - value for the new entry (in)
-  RETURN VALUE
-    status of the operation
-  NOTES
-*/
-
-kusst kustvp4_put_four_bytes (/*_
-	kustv_handle tlv_handle,
-	ub2 tag,
-	ub4 value
-	_*/);
-
-
-
-
-/* ----------------------------- kustv_put --------------------------------- */
-
-/*
-  NAME
-    kustv_put - Insert a TLV entry
-  DESCRIPTION
-    Adds a new TLV entry to the end of the current TLV buffer.
-  PARAMETERS
-    tlv_handle - handle of the TLV buffer (in/out)
-    tag - tag for the new entry (in)
-    length - number of bytes in the new entry (in)
-    value - value for the new entry (in)
-  RETURN VALUE
-    status of the operation
-  NOTES
-*/
-
-kusst kustv_put (/*_
-	kustv_handle tlv_handle,
-	ub2 tag,
-	ub2 length,
-	dvoid *value
-	_*/);
-
-
-
-
-/* -------------------------- kustvptg_put_tag ----------------------------- */
-
-/*
-  NAME
-    kustvptg_put_tag - Insert a TLV entry with no value field
-  DESCRIPTION
-    Adds a new TLV entry to the end of the current TLV buffer.  the entry
-    contains a 0-length value field.
-  PARAMETERS
-    tlv_handle - handle of the TLV buffer (in/out)
-    tag - tag for the new entry (in)
-  RETURN VALUE
-    status of the operation
-  NOTES
-*/
-
-kusst kustvptg_put_tag (/*_
-	kustv_handle tlv_handle,
-	ub2 tag
-	_*/);
-
-
-
-
-
-/* -------------------------- kustv_buffer_state --------------------------- */
-
-/*
-  NAME
-    kustv_buffer_state - return termination state of TLV buffer
-  DESCRIPTION
-    Returns informationon how a TLV buffer was terminated.  This call returns
-    useful information only if a TLV handle was used to read or write the
-    termination tag.  The termination information is preserved 
-  PARAMETERS
-    tlv_handle - handle of the TLV buffer (in)
-    state - termination state for the TLV (out)
-  RETURN VALUE
-    status of the operation
-  NOTES
-*/
-
-kusst kustv_buffer_state (/*_
-	kustv_handle tlv_handle,
-	kustvs *state
-	_*/);
-
-
-#endif                                              /* kusapi */
diff --git a/src/terralib/drivers/OracleSpatial/OCI/include/kustags.h b/src/terralib/drivers/OracleSpatial/OCI/include/kustags.h
deleted file mode 100644
index 889e62a..0000000
--- a/src/terralib/drivers/OracleSpatial/OCI/include/kustags.h
+++ /dev/null
@@ -1,1034 +0,0 @@
-/* copyright (c) Oracle Corporation 1995.  All Rights Reserved. */
-
-/*
-  NAME
-    kustags.h - definition of tags for statistics API
-  DESCRIPTION
-    Definitions of tags used for Oracle's statistics API.
-  PUBLIC FUNCTIONS
-    none
-  PRIVATE FUNCTIONS
-    none
-  NOTES
-    This file is a generated and should NOT BE EDITTED
-*/
-
-#ifndef ORATYPES
-#include <oratypes.h>
-#endif
-
-#ifndef KUSTAGS
-#define KUSTAGS
-
-/* DISABLE check_macro_naming */
-/* Lint exception approved 9/24/96 by BCCHANG and JMULLER */
-
-/* PUBLIC TYPES AND CONSTANTS */
-#define RMUST_T_ACCESS_MODE 15
-#define RMUST_T_ACTIVE_FLG 16
-#define RMUST_T_AIJ_COMMIT_FLG 17
-#define RMUST_T_AIJ_ENABLED_FLG 18
-#define RMUST_T_AIJ_STATUS 19
-#define RMUST_T_ALARM_ENABLED_FLG 20
-#define RMUST_T_ALLOCATION 21
-#define RMUST_T_ALS_MODE_FLG 22
-#define RMUST_T_ARPMS 23
-#define RMUST_T_ASCII_DEADLOCK 24
-#define RMUST_T_ASCII_STALL 25
-#define RMUST_T_ASCII_TIMEOUT 26
-#define RMUST_T_AUDIT_ENABLED_FLG 27
-#define RMUST_T_AUDIT_FIRST_FLG 28
-#define RMUST_T_AUDIT_FLUSH_FLG 29
-#define RMUST_T_AUTO_BKUP_FLG 30
-#define RMUST_T_FILID_SLOTNUM 31
-#define RMUST_T_BACKUP_DATE_ADT 32
-#define RMUST_T_BACKUP_DATE_FDT 33
-#define RMUST_T_BACKUP_DATE_TDT 34
-#define RMUST_T_BIOCNT 35
-#define RMUST_T_BKUP_ACTIVE_FLG 36
-#define RMUST_T_BKUP_VNO 37
-#define RMUST_T_CACHE_FILENAME 38
-#define RMUST_T_CALC_PNO 39
-#define RMUST_T_CKPT_BLOCKS 40
-#define RMUST_T_CKPT_TIME 41
-#define RMUST_T_CORRUPT_FLG 42
-#define RMUST_T_CPUTIM_RT 43
-#define RMUST_T_CREATE_DATE_ADT 44
-#define RMUST_T_CREATE_DATE_FDT 45
-#define RMUST_T_CREATE_DATE_TDT 46
-#define RMUST_T_CUR_ACTIVE_AIJ 47
-#define RMUST_T_CUR_AIJ_FILENAME 48
-#define RMUST_T_CUR_BKUP_FILENAME 49
-#define RMUST_T_CUR_BKUP_VNO 50
-#define RMUST_T_CUR_RCVR_VNO 51
-#define RMUST_T_DATA_CMIT_FLG 52
-#define RMUST_T_DBID 53
-#define RMUST_T_DBR_ACTIVITY 54
-#define RMUST_T_DBR_BUF_CNT 55
-#define RMUST_T_LSS_LAG_FDT 56
-#define RMUST_T_DB_BKUP_VNO 57
-#define RMUST_T_DEADLOCK_SEQ 58
-#define RMUST_T_DEADLOCK_SINCE_ADT 59
-#define RMUST_T_DEADLOCK_SINCE_TT 60
-#define RMUST_T_DEADLOCK_SINCE_RT 61
-#define RMUST_T_DEFERRED_SNAP_FLG 62
-#define RMUST_T_DEF_AIJ_FILENAME 63
-#define RMUST_T_DEF_ALLOCATION 64
-#define RMUST_T_DEF_BKUP_FILENAME 65
-#define RMUST_T_DEF_BUF_CNT 66
-#define RMUST_T_DEF_EXTENSION 67
-#define RMUST_T_DIOCNT 68
-#define RMUST_T_ENQCNT 69
-#define RMUST_T_EXTENSION 70
-#define RMUST_T_EXT_COUNT 71
-#define RMUST_T_EXT_ENABLED_FLG 72
-#define RMUST_T_EXT_PERCENT 73
-#define RMUST_T_FAST_COMMIT_FLG 74
-#define RMUST_T_FILENAME 75
-#define RMUST_T_FULL_BACKUP_TSN 76
-#define RMUST_T_GB_CNT 77
-#define RMUST_T_GB_ENABLED_FLG 78
-#define RMUST_T_HARD_DATA_LOSS_FLG 79
-#define RMUST_T_IMAGENAME 80
-#define RMUST_T_INCONSISTENT_FLG 81
-#define RMUST_T_INC_RES_DATE_ADT 82
-#define RMUST_T_INC_RES_DATE_FDT 83
-#define RMUST_T_INC_RES_DATE_TDT 84
-#define RMUST_T_INIT_ACTIVE_FLG 85
-#define RMUST_T_IS_STALLED 86
-#define RMUST_T_JOURNAL_CNT 87
-#define RMUST_T_JOURNAL_NAME 88
-#define RMUST_T_JOURNAL_STATUS 89
-#define RMUST_T_LAST_BKUP_VNO 90
-#define RMUST_T_LCKOPT_ENABLED_FLG 91
-#define RMUST_T_LINKAGE_DBID 92
-#define RMUST_T_LKID 93
-#define RMUST_T_LOCK_TIMEOUT 94
-#define RMUST_T_MAX_EXT_PAGCNT 95
-#define RMUST_T_MAX_GB_PER_USER 96
-#define RMUST_T_MAX_NODE_CNT 97
-#define RMUST_T_MAX_PNO 98
-#define RMUST_T_MAX_USER_CNT 99
-#define RMUST_T_MIN_EXT_PAGCNT 100
-#define RMUST_T_MIXED_FMT_FLG 101
-#define RMUST_T_MODIFIED_FLG 102
-#define RMUST_T_NEW_VERSION_FLG 104
-#define RMUST_T_NUMBIO 105
-#define RMUST_T_NUMDIO 106
-#define RMUST_T_OPEN_MODE_FLG 107
-#define RMUST_T_OPER_CLASS 108
-#define RMUST_T_OVERWRITE_FLG 109
-#define RMUST_T_OVERWRITTEN_FLG 110
-#define RMUST_T_PAG_BLKCNT 111
-#define RMUST_T_PGFCNT 112
-#define RMUST_T_PGFLTS 113
-#define RMUST_T_PID 114
-#define RMUST_T_PROCNAME 115
-#define RMUST_T_PSTATE 116
-#define RMUST_T_RESTORED_FLG 117
-#define RMUST_T_RTPMS 118
-#define RMUST_T_SFDB_FLG 119
-#define RMUST_T_SHUTDOWN_TIME 120
-#define RMUST_T_SNAPSHOT_FLG 121
-#define RMUST_T_SNAPS_ALLOWED_FLG 122
-#define RMUST_T_SNAPS_ENABLED_FLG 123
-#define RMUST_T_SOFT_DATA_LOSS_FLG 124
-#define RMUST_T_SPAMS_ENABLED_FLG 125
-#define RMUST_T_SPAMS_FLG 126
-#define RMUST_T_STALL_SINCE_ADT 127
-#define RMUST_T_STALL_SINCE_TT 128
-#define RMUST_T_STALL_SINCE_RT 129
-#define RMUST_T_STALL_THRESHOLD_RT 130
-#define RMUST_T_STAREA_NAME 131
-#define RMUST_T_STATS_ENABLED_FLG 132
-#define RMUST_T_STID 133
-#define RMUST_T_TIMEOUT_SEQ 134
-#define RMUST_T_TIMEOUT_SINCE_ADT 135
-#define RMUST_T_TIMEOUT_SINCE_TT 136
-#define RMUST_T_TIMEOUT_SINCE_RT 137
-#define RMUST_T_TSN_INTERVAL 138
-#define RMUST_T_USERNAME 139
-#define RMUST_T_VBN 140
-#define RMUST_T_VMSIZE 141
-#define RMUST_T_WSSIZE 142
-#define RMUST_T_THRESHOLD 143
-#define RMUST_T_BUF_BLOCK_CNT 144
-#define RMUST_T_FILID_CNT 145
-#define RMUST_T_STALL_INDEX 146
-#define RMUST_T_AIJ_LEOF 147
-#define RMUST_T_AIJ_PEOF 148
-#define RMUST_T_ALS_ACTIVE 149
-#define RMUST_T_CACHE_STATUS 150
-#define RMUST_T_AIJ_SHUTDOWN 151
-#define RMUST_T_RELATION_NAME 152
-#define RMUST_T_ISA_VIEW 153
-#define RMUST_T_FIELD_NAMES 154
-#define RMUST_T_INDEX_NAME 155
-#define RMUST_T_INDEX_UNIQUE 156
-#define RMUST_T_INDEX_TYPE 157
-#define RMUST_T_LSS_AIJ_VNO 158
-#define RMUST_T_LSS_AIJ_VBN 159
-#define RMUST_T_DELTA_HSEC 160
-#define RMUST_T_PLATFORM 161
-#define RMUST_T_LSS_STATE 162
-#define RMUST_T_AIJ_AUTO_SYNC 163
-#define RMUST_T_AIJ_DATA_SYNC 164
-#define RMUST_T_AIJ_VNO 165
-#define RMUST_T_AIJ_SRV_NAME 166
-#define RMUST_T_STBY_RT_FILNAM 167
-#define RMUST_T_AIJ_CUR_MSN 168
-#define RMUST_T_AIJ_STALLED_MSN 169
-#define RMUST_T_LCS_ACTIVE 170
-#define RMUST_T_LRS_STATE 171
-#define RMUST_T_LRS_ACTIVE 172
-#define RMUST_T_LSS_ACTIVE 173
-#define RMUST_T_GOVERNOR_ENABLED 174
-#define RMUST_T_LSS_REF_COUNT 175
-#define RMUST_T_AIJFB_INDEX 176
-#define RMUST_T_PROC_INDEX 177
-#define RMUST_T_DBR_INDEX 178
-#define RMUST_T_SAMPLE_INTERVAL 179
-#define RMUST_T_DBMSROOT 180
-#define RMUST_T_MAJ_VER 181
-#define RMUST_T_MIN_VER 182
-#define RMUST_T_CHECKSUM 183
-#define RMUST_T_VERSION_ADT 184
-#define RMUST_T_VERSION_FDT 185
-#define RMUST_T_VERSION_TDT 186
-#define RMUST_T_LADB_FLG 187
-#define RMUST_T_RUJ_CORRUPT_FLG 188
-#define RMUST_T_ROOT_CORRUPT_FLG 189
-#define RMUST_T_FIB_ENABLED_FLG 190
-#define RMUST_T_APF_ENABLED_FLG 191
-#define RMUST_T_ABW_ENABLED_FLG 192
-#define RMUST_T_PLT_ENABLED_FLG 193
-#define RMUST_T_OPT_ENABLED_FLG 194
-#define RMUST_T_STBY_READ_ONLY_FLG 195
-#define RMUST_T_DAPF_ENABLED_FLG 196
-#define RMUST_T_RCVR_QUIET_POINT_FLG 197
-#define RMUST_T_SSB_ENABLED_FLG 198
-#define RMUST_T_DB_MODIFIED_FLG 199
-#define RMUST_T_ACTIVE_VBN 200
-#define RMUST_T_AIJDB_VBN 201
-#define RMUST_T_AIJFB_VBN 202
-#define RMUST_T_CLIENT_VBN 203
-#define RMUST_T_COSI_VBN 204
-#define RMUST_T_CPT_VBN 205
-#define RMUST_T_FILID_VBN 206
-#define RMUST_T_MEMBIT_VBN 207
-#define RMUST_T_RTUPB_VBN 208
-#define RMUST_T_RUJBLK_VBN 209
-#define RMUST_T_SEQBLK_VBN 210
-#define RMUST_T_TSNBLK_VBN 211
-#define RMUST_T_AIJFB_CNT 212
-#define RMUST_T_RTUPB_BLKCNT 213
-#define RMUST_T_TSNBLK_CNT 214
-#define RMUST_T_ALG_COUNT 215
-#define RMUST_T_ALG_FACTORS 216
-#define RMUST_T_AUDIT_FLAGS 217
-#define RMUST_T_ALARM_NAME 218
-#define RMUST_T_MIN_PAG_BLKCNT 219
-#define RMUST_T_MAX_PAG_BLKCNT 220
-#define RMUST_T_MAX_PIB_COUNT 221
-#define RMUST_T_SEQBLK_CNT 222
-#define RMUST_T_APF_DEPTH 223
-#define RMUST_T_ABW_CLEAN_BUF_CNT 224
-#define RMUST_T_ABW_BATCH_MAX 225
-#define RMUST_T_CLIENT_BLKCNT 226
-#define RMUST_T_COSI_BLKCNT 227
-#define RMUST_T_RMU_CLIENT_VBN 228
-#define RMUST_T_RMU_CLIENT_BLKCNT 229
-#define RMUST_T_CLOSE_MODE 230
-#define RMUST_T_CLOSE_INTERVAL 231
-#define RMUST_T_RCACHE_VBN 232
-#define RMUST_T_RCACHE_CNT 233
-#define RMUST_T_DAPF_DEPTH 234
-#define RMUST_T_DAPF_THRESHOLD 235
-#define RMUST_T_TXN_MODE_FLAGS 236
-#define RMUST_T_RCS_SWEEP_INTERVAL 237
-#define RMUST_T_ACTIVE_BACKUP_TSN 238
-#define RMUST_T_BOOTSTRAP_DBK 239
-#define RMUST_T_HRL_FLG 241
-#define RMUST_T_WRL_FLG 242
-#define RMUST_T_RESTRICT_ACCESS_FLG 243
-#define RMUST_T_ALTER_CNT 244
-#define RMUST_T_ALTER_TAD_ADT 245
-#define RMUST_T_ALTER_TAD_FDT 246
-#define RMUST_T_ALTER_TAD_TDT 247
-#define RMUST_T_INC_RES_TAD_ADT 248
-#define RMUST_T_INC_RES_TAD_FDT 249
-#define RMUST_T_INC_RES_TAD_TDT 250
-#define RMUST_T_FULL_BCK_TAD_ADT 251
-#define RMUST_T_FULL_BCK_TAD_FDT 252
-#define RMUST_T_FULL_BCK_TAD_TDT 253
-#define RMUST_T_LAST_BACKUP_TSN 254
-#define RMUST_T_LAST_BACKUP_CSN 255
-#define RMUST_T_LAST_FULL_BACKUP_TSN 256
-#define RMUST_T_FULL_VER_TAD_ADT 257
-#define RMUST_T_FULL_VER_TAD_FDT 258
-#define RMUST_T_FULL_VER_TAD_TDT 259
-#define RMUST_T_INC_VER_TAD_ADT 260
-#define RMUST_T_INC_VER_TAD_FDT 261
-#define RMUST_T_INC_VER_TAD_TDT 262
-#define RMUST_T_FULL_RES_TAD_ADT 263
-#define RMUST_T_FULL_RES_TAD_FDT 264
-#define RMUST_T_FULL_RES_TAD_TDT 265
-#define RMUST_T_ALT_BOOTSTRAP_DBK 266
-#define RMUST_T_RESTORE_ROOT_TAD_ADT 267
-#define RMUST_T_RESTORE_ROOT_TAD_FDT 268
-#define RMUST_T_RESTORE_ROOT_TAD_TDT 269
-#define RMUST_T_PAG_DBID 271
-#define RMUST_T_RELATED_FLG 272
-#define RMUST_T_COUPLED_FLG 274
-#define RMUST_T_CSM_FLG 275
-#define RMUST_T_SPREAD_FLG 276
-#define RMUST_T_RESTRUCTURED_FLG 277
-#define RMUST_T_WORM_DEVFULL_FLG 278
-#define RMUST_T_2PPL_ENABLED_FLG 279
-#define RMUST_T_WORM_AIJ_ENABLED_FLG 280
-#define RMUST_T_WORM_CORRUPT_FLG 281
-#define RMUST_T_RCACHE_ENABLED_FLG 282
-#define RMUST_T_WORM_LEOF 285
-#define RMUST_T_P0_VBN 286
-#define RMUST_T_CLUMP_PAGCNT 287
-#define RMUST_T_PAGES_PER_SPAM 288
-#define RMUST_T_AIJ_RCVR_VNO 289
-#define RMUST_T_PAG_LEN 290
-#define RMUST_T_PPSP1 291
-#define RMUST_T_SPAM_T1 292
-#define RMUST_T_SPAM_T2 293
-#define RMUST_T_SPAM_T3 294
-#define RMUST_T_SPAMVEC_LEN 295
-#define RMUST_T_PAG_PAD_LEN 296
-#define RMUST_T_MAX_FREE_LEN 297
-#define RMUST_T_MAX_NEW_SEG_LEN 298
-#define RMUST_T_MAX_SEG_LEN 299
-#define RMUST_T_BACKUP_STATS 300
-#define RMUST_T_RCACHE_DBID 301
-#define RMUST_T_SNAPS_ENABLED_TSN 302
-#define RMUST_T_COMMIT_TSN 303
-#define RMUST_T_BACKUP_TSN 304
-#define RMUST_T_INCR_BACKUP_TSN 305
-#define RMUST_T_ABS_QUIET_POINT_FLG 306
-#define RMUST_T_LSS_ACTIVE_FLG 307
-#define RMUST_T_LRS_ACTIVE_FLG 308
-#define RMUST_T_MASTER_DB_FLG 309
-#define RMUST_T_LSS_ONLINE_FLG 310
-#define RMUST_T_LSS_QUIET_POINT_FLG 311
-#define RMUST_T_CUR_RCVR_VBN 312
-#define RMUST_T_LSS_CKPT_INTRVL 313
-#define RMUST_T_LSS_WAIT_INTRVL 314
-#define RMUST_T_LSS_TIMEOUT_INTRVL 315
-#define RMUST_T_LSS_BUFFER_CNT 316
-#define RMUST_T_LSS_ACCESS_MODE 317
-#define RMUST_T_LSS_RESOLVE_2PC 318
-#define RMUST_T_LSS_STARTUP_TAD_ADT 319
-#define RMUST_T_LSS_STARTUP_TAD_FDT 320
-#define RMUST_T_LSS_STARTUP_TAD_TDT 321
-#define RMUST_T_BKUP_EDITNAM 322
-#define RMUST_T_REMOTE_NODENAM 323
-#define RMUST_T_SERVER_NAME 324
-#define RMUST_T_BKUP_FAILED_FLG 325
-#define RMUST_T_EMERGENCY_FLG 326
-#define RMUST_T_ACTIVATE_TAD_ADT 327
-#define RMUST_T_ACTIVATE_TAD_FDT 328
-#define RMUST_T_ACTIVATE_TAD_TDT 329
-#define RMUST_T_RDB_CHECKSUM 330
-#define RMUST_T_MONID 332
-#define RMUST_T_TID 333
-#define RMUST_T_TSNBLK_INDEX 334
-#define RMUST_T_TSNBLK_SLOT 335
-#define RMUST_T_REMOTE_FLG 336
-#define RMUST_T_ALS_FLG 337
-#define RMUST_T_DBR_FLG 338
-#define RMUST_T_SERVER_FLG 339
-#define RMUST_T_UTILITY_FLG 340
-#define RMUST_T_LCS_FLG 341
-#define RMUST_T_LRS_FLG 342
-#define RMUST_T_RCS_FLG 343
-#define RMUST_T_LSS_FLG 344
-#define RMUST_T_CKPT_VNO 345
-#define RMUST_T_CKPT_VBN 346
-#define RMUST_T_QUIET_VNO 347
-#define RMUST_T_VLM_ENABLED_FLG 352
-#define RMUST_T_REPLACE_ENABLED_FLG 353
-#define RMUST_T_SLOT_LEN 354
-#define RMUST_T_SLOT_COUNT 355
-#define RMUST_T_MAX_WS_COUNT 356
-#define RMUST_T_NAME 357
-#define RMUST_T_HASHED_INDEX_FLG 358
-#define RMUST_T_LAPMS_INDEX 359
-#define RMUST_T_VLM_WINDOW_COUNT 360
-#define RMUST_T_CKPT_SEQ 361
-#define RMUST_T_DEVDIR 362
-#define RMUST_T_HASH_LDBID_PRIME 363
-#define RMUST_T_HASH_PNO_PRIME 364
-#define RMUST_T_SWEEP_THRESH_HIGH 365
-#define RMUST_T_SWEEP_THRESH_LOW 366
-#define RMUST_T_SWEEP_FREE_PCT 367
-#define RMUST_T_SWEEP_BATCH_COUNT 368
-#define RMUST_T_MAX_RESERVE_COUNT 369
-#define RMUST_T_ALLOC_BLKCNT 370
-#define RMUST_T_EXTEND_BLKCNT 371
-#define RMUST_T_LIMBO_FLG 373
-#define RMUST_T_PREPARED_FLG 374
-#define RMUST_T_XATM_FLG 375
-#define RMUST_T_RESOLVE_FLG 376
-#define RMUST_T_RESOLUTION_FLG 377
-#define RMUST_T_RUJ_FILNAM 378
-#define RMUST_T_TM_LOG_ID 381
-#define RMUST_T_RM_LOG_ID 382
-#define RMUST_T_RM_NAME 383
-#define RMUST_T_NODE_NAME 384
-#define RMUST_T_PARENT_NODE_NAME 385
-#define RMUST_T_WIPMAP 388
-#define RMUST_T_SIPMAP 389
-#define RMUST_T_OLDEST_TSN 390
-#define RMUST_T_COMMIT_CSN 392
-#define RMUST_T_TSN_VEC 393
-#define RMUST_T_COMMIT_TSN_VEC 394
-#define RMUST_T_NEXT_SEQ 396
-#define RMUST_T_GROUP_SIZE 397
-#define RMUST_T_IGNORE_FLG 399
-#define RMUST_T_RECOVER_FLG 400
-#define RMUST_T_UPTO_AREA_FLG 401
-#define RMUST_T_LAST_COMMIT_TSN 403
-#define RMUST_T_PNO 404
-#define RMUST_T_PDBID 405
-#define RMUST_T_ABM_PNO 406
-#define RMUST_T_LAREA_DBID 407
-#define RMUST_T_PAREA_DBID 408
-#define RMUST_T_LAREA_NAME 409
-#define RMUST_T_REC_LEN 411
-#define RMUST_T_LAREA_EXT_CNT 412
-#define RMUST_T_MODULO_HASH_FLG 414
-#define RMUST_T_DELETED_TID 415
-#define RMUST_T_MOD_HASH_KEY_OFFSET 417
-#define RMUST_T_BITMAP 419
-#define RMUST_T_XID_FORMAT_ID 422
-#define RMUST_T_XID_GTRID_LENGTH 423
-#define RMUST_T_XID_BQUAL_LENGTH 424
-#define RMUST_T_XID_DATA 425
-#define RMUST_T_ACE_SIZE 426
-#define RMUST_T_ACE_TYPE 427
-#define RMUST_T_DEFAULT_FLG 428
-#define RMUST_T_PROTECTED_FLG 429
-#define RMUST_T_HIDDEN_FLG 430
-#define RMUST_T_NOPROPAGATE_FLG 431
-#define RMUST_T_READ_PRV_FLG 432
-#define RMUST_T_WRITE_PRV_FLG 433
-#define RMUST_T_EXECUTE_PRV_FLG 434
-#define RMUST_T_DELETE_PRV_FLG 435
-#define RMUST_T_CONTROL_PRV_FLG 436
-#define RMUST_T_DB_VERSION 437
-#define RMUST_T_NODE 438
-#define RMUST_T_CURRENT_TAD_ADT 439
-#define RMUST_T_CURRENT_TAD_FDT 440
-#define RMUST_T_CURRENT_TAD_TDT 441
-#define RMUST_T_NODE_DATABASES 442
-#define RMUST_T_DATABASE 443
-#define RMUST_T_ACTIVE_USERS 444
-#define RMUST_T_MONITOR_LOG 445
-#define RMUST_T_MONITOR_BUFFERS 446
-#define RMUST_T_USER_ID 448
-#define RMUST_T_USER_STATUS 449
-#define RMUST_T_DEVICE_NAME 450
-#define RMUST_T_DEVICE_STATUS 451
-#define RMUST_T_DEVICE_ERROR_CNT 452
-#define RMUST_T_LABEL 453
-#define RMUST_T_FREE_BLOCKS 454
-#define RMUST_T_TRANSFER_CNT 455
-#define RMUST_T_MOUNT_CNT 456
-#define RMUST_T_DEVICE_TYPE 457
-#define RMUST_T_DEVICE_CHAR 458
-#define RMUST_T_TABLE_NAME 459
-#define RMUST_T_LOGICAL_AREA_ID 460
-#define RMUST_T_TABLE_ID 461
-#define RMUST_T_INDEX_ID 462
-#define RMUST_T_LAPMS 463
-#define RMUST_T_LOGICAL_AREA_COUNT 464
-#define RMUST_T_ALL_LOGICAL_AREA_IDS 465
-#define RMUST_T_ALL_LAPMS 466
-#define RMUST_T_AIJ_MAX_IO_BLKS 468
-#define RMUST_T_AIJ_MIN_IO_BLKS 469
-#define RMUST_T_AIJ_STALL 470
-#define RMUST_T_COMMIT_STALL 471
-#define RMUST_T_DAPF_DEPTH_BUF_CNT 475
-#define RMUST_T_DAPF_START_BUF_CNT 476
-#define RMUST_T_LIVE_BW_MAX 477
-#define RMUST_T_MAX_DBR_CNT 478
-#define RMUST_T_ABS_PRIORITY 479
-#define RMUST_T_ALS_PRIORITY 480
-#define RMUST_T_DBR_PRIORITY 481
-#define RMUST_T_LCS_PRIORITY 482
-#define RMUST_T_LRS_PRIORITY 483
-#define RMUST_T_RCS_PRIORITY 484
-#define RMUST_T_CKPT_TRANS_INTERVAL 487
-#define RMUST_T_CTJ_TSN_INTERVAL 488
-#define RMUST_T_APF_ENABLED 489
-#define RMUST_T_ABW_ENABLED 490
-#define RMUST_T_DAPF_ENABLED 491
-#define RMUST_T_ABS_QUIET_POINT 492
-#define RMUST_T_RCACHE_RCRL_COUNT 493
-#define RMUST_T_RCS_BATCH_COUNT 494
-#define RMUST_T_RCS_CHECKPOINT 495
-#define RMUST_T_HOT_NETWORK_TIMEOUT 496
-#define RMUST_T_RCS_SWP_INT 497
-#define RMUST_T_RCS_COLD_LOW 498
-#define RMUST_T_RCS_COLD_HIGH 499
-#define RMUST_T_RCS_COLD_RECORDS 500
-#define RMUST_T_DBR_BUFFER_CNT 501
-#define RMUST_T_SNAP_QUIET_POINT 502
-#define RMUST_T_LOCK_TIMEOUT_INTERVAL 503
-#define RMUST_T_HRL_ENABLED 504
-#define RMUST_T_CBL_ENABLED 505
-#define RMUST_T_RUJ_EXTEND_BLKCNT 506
-#define RMUST_T_RCACHE_INSERT_ENABLED 507
-#define RMUST_T_RCS_ABORT_SWEEP 508
-#define RMUST_T_AIJ_ARB_COUNT 509
-#define RMUST_T_RCACHE_LATCH_SPIN_COUNT 510
-#define RMUST_T_RCWS_UNMARK_THRESHO 511
-#define RMUST_T_RUJ_ALLOC_BLKCNT 512
-#define RMUST_T_HOT_DATA_SYNC_MODE 513
-#define RMUST_T_HOT_CHECKPOINT 514
-#define RMUST_T_LCS_CONNECT_TIMEOUT 515
-#define RMUST_T_LRS_GAP_TIMEOUT 516
-#define RMUST_T_LRS_GOVERNOR_ENABLED 517
-#define RMUST_T_AIJ_SWITCH_GBL_CKPT 518
-#define RMUST_T_AIJ_CHK_CONTROL_RECS 519
-#define RMUST_T_READY_AREA_SERIALLY 520
-#define RMUST_T_ABS_OVRWRT_ALLOWED 521
-#define RMUST_T_ABS_OVRWRT_IMMEDIATE 522
-#define RMUST_T_ALS_CREATE_AIJ 523
-#define RMUST_T_VNO 524
-#define RMUST_T_AIJ_MAX_IO_BYTES 525
-#define RMUST_T_AIJ_MIN_IO_BYTES 526
-#define RMUST_T_HOT_ABS_SUSPEND 527
-#define RMUST_T_BUF_CNT 529
-#define RMUST_T_RCS_CKPT_BUFFER_CNT 530
-#define RMUST_T_UDASH_INDEX 531
-#define RMUST_T_RCACHE_INDEX 532
-#define RMUST_T_RUJ_INDEX 533
-#define RMUST_T_TSN_INDEX 534
-#define RMUST_T_SEQ_INDEX 535
-#define RMUST_T_CPT_INDEX 536
-#define RMUST_T_CRL_ENABLED 546
-#define RMUST_T_RCWS_UNMARK_THRESHOLD 551
-#define RMUST_T_VOLUME_NAME 555
-#define RMUST_T_MAX_BLOCKS 556
-#define RMUST_T_ACE_FLAGS 557
-#define RMUST_T_ACE_ACCESS 558
-#define RMUST_T_ALTER_PRV_FLG 559
-#define RMUST_T_ANALYSE_PRV_FLG 560
-#define RMUST_T_BACKUP_PRV_FLG 561
-#define RMUST_T_CONVERT_PRV_FLG 562
-#define RMUST_T_COPY_PRV_FLG 563
-#define RMUST_T_DUMP_PRV_FLG 564
-#define RMUST_T_LOAD_PRV_FLG 565
-#define RMUST_T_MOVE_PRV_FLG 566
-#define RMUST_T_OPEN_PRV_FLG 567
-#define RMUST_T_RESTORE_PRV_FLG 568
-#define RMUST_T_SECURITY_PRV_FLG 569
-#define RMUST_T_SHOW_PRV_FLG 570
-#define RMUST_T_UNLOAD_PRV_FLG 571
-#define RMUST_T_VERIFY_PRV_FLG 572
-#define RMUST_T_IDENTIFIER 573
-#define RMUST_T_ACE_TEXT 574
-#define RMUST_T_MONITOR_UP_FLG 575
-#define RMUST_K_TAG_LAST_TAG 575
-#define KUSGTBEND 1000
-#define KUSGTBOG 1001
-#define KUSGTEOG 1002
-#define KUSGTBTRN 1003
-#define KUSGTBCNT 1004
-#define KUSGTBDTG 1005
-#define KUSGTBKEY 1006
-#define KUSGTWCLS 1007
-#define KUSGTUNST 1008
-#define KUSGTMD 1009
-#define KUSGTNP 1010
-#define RMUST_MRT_STAREA_MAPS 2000
-#define RMUST_MRT_RELINFO 2001
-#define RMUST_MRT_IDXINFO 2002
-#define RMUST_CT_AIJINFO 2100
-#define RMUST_CT_AIJJNLS 2101
-#define RMUST_CT_ARPMS_STATS 2102
-#define RMUST_CT_DBINFO 2103
-#define RMUST_CT_DBR 2104
-#define RMUST_CT_FILE 2105
-#define RMUST_CT_PROCESS 2106
-#define RMUST_CT_STALL 2107
-#define RMUST_CT_STALL_ACT 2108
-#define RMUST_CT_RTPMS_STATS 2109
-#define RMUST_CT_FILE_NODUP 2110
-#define RMUST_CT_REC_CACHE 2111
-#define RMUST_CT_RUJINFO 2112
-#define RMUST_CT_TSNINFO 2113
-#define RMUST_CT_SEQINFO 2114
-#define RMUST_CT_CPTINFO 2115
-#define RMUST_CT_AIPINFO 2116
-#define RMUST_CT_ACTIVE 2117
-#define RMUST_CT_CLUSTER 2118
-#define RMUST_CT_RMUACL 2119
-#define RMUST_CT_USERS 2120
-#define RMUST_CT_DATABASES 2121
-#define RMUST_CT_TAPE_DEVICES 2122
-#define RMUST_CT_DISK_DEVICES 2123
-#define RMUST_CT_DASH 2124
-#define RMUST_CT_USER_DASH 2125
-#define RMUST_CT_DB_MONITOR 2126
-#define RMUST_CT_LAPMS_TABLE 2127
-#define RMUST_CT_LAPMS_INDEX 2128
-#define RMUST_CT_LAPMS_TABLE_STATS 2129
-#define RMUST_CT_LAPMS_INDEX_STATS 2130
-#define RMUST_CT_LAPMS_STATS 2131
-#define KUSC2_FILE_ENTRY 2501
-#define KUSC3_FILE_STATS 2502
-#define KUSC4_LIBRARY_CACHE 2503
-#define KUSC5_PARAMETERS 2504
-#define KUSC6_FILE_HEADER 2505
-#define KUSC7_PROCESS 2506
-#define KUSC8_SQL_AREA 2507
-#define KUSC9_SESSIONS 2508
-#define KUSC10_SGA 2509
-#define KUSC11_SQL_TEXT 2510
-#define KUSC12_SESSTAT 2511
-#define KUSC13_SESSIONS_STAT 2512
-#define KUSC14_SYSSTAT 2513
-#define KUSC15_EVENT_DESCRIPTIONS 2514
-#define KUSC16_SESSION_WAIT 2515
-#define KUSC17_OPEN_CURSOR 2516
-#define KUSC18_LATCH_WHERE 2517
-#define KUSC19_LATCH_MISSES 2518
-#define KUSC20_LATCH_HOLDER 2519
-#define KUSC21_LATCH 2520
-#define KUSC23_RESOURCE 2522
-#define KUSC24_LOCKS_1 2523
-#define KUSC25_LOCKS_2 2524
-#define KUSC26_LOCKS_3 2525
-#define KUSC27_LOCKS_4 2526
-#define KUSC28_LOCKS_5 2527
-#define KUSC29_LOCK1_STAT 2528
-#define KUSC30_LOCK2_STAT 2529
-#define KUSC31_LOCK3_STAT 2530
-#define KUSC32_LOCK4_STAT 2531
-#define KUS1_FILE_NUMBER 3000
-#define KUS2_FILE_NAME 3001
-#define KUS4_FILE_STATUS 3003
-#define KUS5_FILE_BLOCK_SIZE 3004
-#define KUS6_FILE_CREATE_BLOCKS 3005
-#define KUS7_SERVER_TYPE 3006
-#define KUS8_CHECKPOINT_CHANGE_NUMBER 3007
-#define KUS9_PHYRDS 3008
-#define KUS10_PHYWRTS 3009
-#define KUS11_READTIM 3010
-#define KUS12_WRITETIM 3011
-#define KUS13_PHYBLKRD 3012
-#define KUS14_PHYBLKWRT 3013
-#define KUS15_LIBRARYCACHE_NDX 3014
-#define KUS16_GETS 3015
-#define KUS17_GETHITS 3016
-#define KUS18_PINS 3017
-#define KUS19_PINHITS 3018
-#define KUS20_RELOADS 3019
-#define KUS21_INVALIDATIONS 3020
-#define KUS22_DLM_LOCK_REQUESTS 3021
-#define KUS23_DLM_PIN_REQUESTS 3022
-#define KUS24_DLM_PIN_RELEASES 3023
-#define KUS25_DLM_INVALIDATION_REQUESTS 3024
-#define KUS26_DLM_INVALIDATIONS 3025
-#define KUS27_PARAM_NUM 3026
-#define KUS28_PARAM_NAME 3027
-#define KUS29_PARAM_TYPE 3028
-#define KUS30_PARAM_VALUE 3029
-#define KUS31_PARAM_IS_DEFAULT 3030
-#define KUS32_PARAM_IS_SESS_MODIFIABLE 3031
-#define KUS33_PARAM_IS_SYS_MODIFIABLE 3032
-#define KUS34_PROC_ADDR 3033
-#define KUS35_PID 3034
-#define KUS36_SPID 3035
-#define KUS37_USERNAME 3036
-#define KUS38_SERIAL_NUMBER 3037
-#define KUS39_TERMINAL 3038
-#define KUS40_PROGRAM 3039
-#define KUS41_PROCESS_BACKGROUND 3040
-#define KUS42_LATCHWAIT 3041
-#define KUS43_LATCHSPIN 3042
-#define KUS44_PROCESS_ACTIVE 3043
-#define KUS45_SQL_TEXT 3044
-#define KUS46_SHARABLE_MEM 3045
-#define KUS47_PERSISTENT_MEM 3046
-#define KUS48_RUNTIME_MEM 3047
-#define KUS49_CURS_SORTS 3048
-#define KUS50_VERSION_COUNT 3049
-#define KUS51_LOADED_VERSIONS 3050
-#define KUS52_OPEN_VERSIONS 3051
-#define KUS53_USERS_OPENING 3052
-#define KUS54_EXECUTIONS 3053
-#define KUS55_USERS_EXECUTING 3054
-#define KUS56_LOADS 3055
-#define KUS57_FIRST_LOAD_TIME 3056
-#define KUS58_INVALIDATIONS 3057
-#define KUS59_PARSE_CALLS 3058
-#define KUS60_DISK_READS 3059
-#define KUS61_BUFFER_GETS 3060
-#define KUS62_COMMAND_TYPE 3061
-#define KUS63_ROWS_PROCESSED 3062
-#define KUS64_OPTIMIZER_MODE 3063
-#define KUS65_PARSING_USER_ID 3064
-#define KUS66_PARSING_SCHEMA_ID 3065
-#define KUS67_KEPT_VERSIONS 3066
-#define KUS68_PARENT_ADDRESS 3067
-#define KUS69_OBJECT_HASH 3068
-#define KUS70_MODULE 3069
-#define KUS71_MODULE_HASH 3070
-#define KUS72_ACTION 3071
-#define KUS73_ACTION_HASH 3072
-#define KUS74_SESSION_ADDR 3073
-#define KUS75_SID 3074
-#define KUS76_SERIAL_NUM 3075
-#define KUS77_AUDSID 3076
-#define KUS78_PADDR 3077
-#define KUS79_USER_NUM 3078
-#define KUS80_USERNAME 3079
-#define KUS81_COMMAND 3080
-#define KUS82_TADDR 3081
-#define KUS83_LOCKWAIT 3082
-#define KUS84_STATUS 3083
-#define KUS85_SERIALIZABLE_ABORTS 3084
-#define KUS86_SCHEMA_NUM 3085
-#define KUS87_SCHEMA_NAME 3086
-#define KUS88_OSUSER 3087
-#define KUS89_PROCESS 3088
-#define KUS90_MACHINE 3089
-#define KUS91_TERMINAL 3090
-#define KUS92_PROGRAM 3091
-#define KUS93_SESSION_TYPE 3092
-#define KUS94_SQL_ADDRESS 3093
-#define KUS95_SQL_HASH_VALUE 3094
-#define KUS96_PREV_SQL_ADDR 3095
-#define KUS97_PREV_HASH_VALUE 3096
-#define KUS98_MODULE 3097
-#define KUS99_MODULE_HASH 3098
-#define KUS100_ACTION 3099
-#define KUS101_ACTION_HASH 3100
-#define KUS102_CLIENT_INFO 3101
-#define KUS103_FIXED_TABLE_SEQUENCE 3102
-#define KUS104_ROW_WAIT_OBJECT 3103
-#define KUS105_ROW_WAIT_FILE 3104
-#define KUS106_ROW_WAIT_BLOCK 3105
-#define KUS107_ROW_WAIT_ROW 3106
-#define KUS108_LOGON_TIME 3107
-#define KUS109_LAST_CALL_ELAPSE_TIME 3108
-#define KUS110_OBJECT_STATE 3109
-#define KUS111_SESSION_FLAGS 3110
-#define KUS112_SGA_NAME 3111
-#define KUS113_SGA_SIZE 3112
-#define KUS114_SQL_TEXT_ADDR 3113
-#define KUS115_HASH_VALUE 3114
-#define KUS116_SQL_TEXT_PIECE 3115
-#define KUS117_SQL_TEXT 3116
-#define KUS118_SESSION_STATS_ARRAY 3117
-#define KUS119_SYS_STATISTIC_NUM 3118
-#define KUS121_SYS_STATISTIC_NAME 3120
-#define KUS122_SYS_STATISTIC_CLASS 3121
-#define KUS123_SYS_STATISTIC_VALUE 3122
-#define KUS124_EVENT_NUMBER 3123
-#define KUS125_EVENT_NAME 3124
-#define KUS126_PARAM_1_TEXT 3125
-#define KUS127_PARAM_2_TEXT 3126
-#define KUS128_PARAM_3_TEXT 3127
-#define KUS129_SESSION_SEQ_NUM 3128
-#define KUS130_P1 3129
-#define KUS131_P1_RAW 3130
-#define KUS132_P2 3131
-#define KUS133_P2_RAW 3132
-#define KUS134_P3 3133
-#define KUS135_P3_RAW 3134
-#define KUS136_WAIT_TIME 3135
-#define KUS137_SECONDS_IN_WAIT 3136
-#define KUS138_OBJECT_STATE_FLAGS 3137
-#define KUS139_LATCH_ADDRESS 3138
-#define KUS140_USER_NAME 3139
-#define KUS141_CURSOR_ADDRESS 3140
-#define KUS142_CURSOR_HASH_VALUE 3141
-#define KUS143_CURSOR_SQL_TEXT 3142
-#define KUS144_CURSOR_OBJ_NAME_SPACE 3143
-#define KUS145_CURSOR_OBJ_HANDLE 3144
-#define KUS146_LATCH_NUMBER 3145
-#define KUS147_LATCH_WHERE 3146
-#define KUS148_LATCH_PARENT_NAME 3147
-#define KUS149_LATCH_NO_WAIT_FAIL_COUNT 3148
-#define KUS150_LATCH_NAME 3149
-#define KUS151_LATCH_LEVEL_NUMBER 3150
-#define KUS152_LATCH_GETS 3151
-#define KUS153_LATCH_MISSES 3152
-#define KUS154_SLEEPS 3153
-#define KUS155_IMMEDIATE_GETS 3154
-#define KUS156_IMMEDIATE_MISSES 3155
-#define KUS157_WAITERS_WOKEN 3156
-#define KUS158_WAITS_HOLDING_LATCH 3157
-#define KUS159_SPIN_GETS 3158
-#define KUS160_SLEEP1 3159
-#define KUS161_SLEEP2 3160
-#define KUS162_SLEEP3 3161
-#define KUS163_SLEEP4 3162
-#define KUS164_SLEEP5 3163
-#define KUS165_SLEEP6 3164
-#define KUS166_SLEEP7 3165
-#define KUS167_SLEEP8 3166
-#define KUS168_SLEEP9 3167
-#define KUS169_SLEEP10 3168
-#define KUS170_SLEEP11 3169
-#define KUS171_SLEEP12 3170
-#define KUS172_SLEEP13 3171
-#define KUS173_RESOURCE_ADDR 3172
-#define KUS174_RESOURCE_TYPE 3173
-#define KUS175_RESOURCE_ID_1 3174
-#define KUS176_RESOURCE_ID_2 3175
-#define KUS177_RESOURCE_FLAG 3176
-#define KUS178_LOCK_STATE_ADDRESS 3177
-#define KUS179_LOCK_ADDRESS 3178
-#define KUS180_LOCK_MODE_HELD 3179
-#define KUS181_LOCK_MODE_REQUESTED 3180
-#define KUS182_LOCK_HELD_TIME 3181
-#define KUS183_BLOCKING 3182
-#define KUS184_LATCH_SLEEP_COUNT 3183
-#define KUS185_CURRENT_FILE_BLOCKS 3184
-#define KUS203_FILE_ENABLED 3202
-#define KUS204_CACHE_NAMESPACE 3203
-#define KUS205_PARAM_IS_MODIFIED 3204
-#define KUS206_PARAM_IS_ADJUSTED 3205
-#define KUS207_PARAM_DESCRIPTION 3206
-#define KUSST1 5000
-#define KUSST2 5001
-#define KUSST3 5002
-#define KUSST4 5003
-#define KUSST5 5004
-#define KUSST6 5005
-#define KUSST7 5006
-#define KUSST8 5007
-#define KUSST9 5008
-#define KUSST10 5009
-#define KUSST11 5010
-#define KUSST12 5011
-#define KUSST13 5012
-#define KUSST14 5013
-#define KUSST15 5014
-#define KUSST16 5015
-#define KUSST17 5016
-#define KUSST18 5017
-#define KUSST19 5018
-#define KUSST20 5019
-#define KUSST21 5020
-#define KUSST22 5021
-#define KUSST23 5022
-#define KUSST24 5023
-#define KUSST25 5024
-#define KUSST26 5025
-#define KUSST27 5026
-#define KUSST28 5027
-#define KUSST29 5028
-#define KUSST30 5029
-#define KUSST31 5030
-#define KUSST32 5031
-#define KUSST33 5032
-#define KUSST34 5033
-#define KUSST35 5034
-#define KUSST36 5035
-#define KUSST37 5036
-#define KUSST38 5037
-#define KUSST39 5038
-#define KUSST40 5039
-#define KUSST41 5040
-#define KUSST42 5041
-#define KUSST43 5042
-#define KUSST44 5043
-#define KUSST45 5044
-#define KUSST46 5045
-#define KUSST47 5046
-#define KUSST48 5047
-#define KUSST49 5048
-#define KUSST50 5049
-#define KUSST51 5050
-#define KUSST52 5051
-#define KUSST53 5052
-#define KUSST54 5053
-#define KUSST55 5054
-#define KUSST56 5055
-#define KUSST57 5056
-#define KUSST58 5057
-#define KUSST59 5058
-#define KUSST60 5059
-#define KUSST61 5060
-#define KUSST62 5061
-#define KUSST63 5062
-#define KUSST64 5063
-#define KUSST65 5064
-#define KUSST66 5065
-#define KUSST67 5066
-#define KUSST68 5067
-#define KUSST69 5068
-#define KUSST70 5069
-#define KUSST71 5070
-#define KUSST72 5071
-#define KUSST73 5072
-#define KUSST74 5073
-#define KUSST75 5074
-#define KUSST76 5075
-#define KUSST77 5076
-#define KUSST78 5077
-#define KUSST79 5078
-#define KUSST80 5079
-#define KUSST81 5080
-#define KUSST82 5081
-#define KUSST83 5082
-#define KUSST84 5083
-#define KUSST85 5084
-#define KUSST86 5085
-#define KUSST87 5086
-#define KUSST88 5087
-#define KUSST89 5088
-#define KUSST90 5089
-#define KUSST91 5090
-#define KUSST92 5091
-#define KUSST93 5092
-#define KUSST94 5093
-#define KUSST95 5094
-#define KUSST96 5095
-#define KUSST97 5096
-#define KUSST98 5097
-#define KUSST99 5098
-#define KUSST100 5099
-#define KUSST101 5100
-#define KUSST102 5101
-#define KUSST103 5102
-#define KUSST104 5103
-#define KUSST105 5104
-#define KUSST106 5105
-#define KUSST107 5106
-#define KUSST108 5107
-#define KUSST109 5108
-#define KUSST110 5109
-#define KUSST111 5110
-#define KUSST112 5111
-#define KUSST113 5112
-#define KUSST114 5113
-#define KUSST115 5114
-#define KUSST116 5115
-#define KUSST117 5116
-#define KUSST118 5117
-#define KUSST119 5118
-#define KUSST120 5119
-#define KUSST121 5120
-#define KUSST122 5121
-#define KUSST123 5122
-#define KUSST124 5123
-#define KUSST125 5124
-#define KUSST126 5125
-#define KUSST127 5126
-#define KUSST128 5127
-#define KUSST129 5128
-#define KUSST130 5129
-#define KUSST131 5130
-#define KUSST132 5131
-#define KUSST133 5132
-#define KUSST134 5133
-#define KUSST135 5134
-#define KUSST136 5135
-#define KUSST137 5136
-#define KUSST138 5137
-#define KUSST139 5138
-#define KUSST140 5139
-#define KUSST141 5140
-#define KUSST142 5141
-#define KUSST143 5142
-#define KUSST144 5143
-#define KUSST145 5144
-#define KUSST146 5145
-#define KUSST147 5146
-#define KUSST148 5147
-#define KUSST149 5148
-#define KUSST150 5149
-#define KUSST151 5150
-#define KUSST152 5151
-#define KUSST153 5152
-#define KUSST154 5153
-#define KUSST155 5154
-#define KUSST156 5155
-#define KUSST157 5156
-#define KUSST158 5157
-#define KUSST159 5158
-#define KUSST160 5159
-#define KUSST161 5160
-#define KUSST162 5161
-#define KUSST163 5162
-#define KUSST164 5163
-#define KUSST165 5164
-#define KUSST166 5165
-#define KUSST167 5166
-#define KUSST168 5167
-#define KUSST169 5168
-#define KUSST170 5169
-#define KUSST171 5170
-#define KUSST172 5171
-#define KUSST173 5172
-#define KUSST174 5173
-#define KUSST175 5174
-#define KUSST176 5175
-#define KUSST177 5176
-#define KUSST178 5177
-#define KUSST179 5178
-#define KUSST180 5179
-#define KUSST181 5180
-#define KUSST182 5181
-#define KUSST183 5182
-#define KUSST184 5183
-#define KUSST185 5184
-#define KUSST186 5185
-#define KUSST187 5186
-#define KUSST188 5187
-#define KUSST189 5188
-#define KUSST190 5189
-#define KUSST191 5190
-#define KUSST192 5191
-#define KUSST193 5192
-#define KUSST194 5193
-#define KUSST195 5194
-#define KUSST196 5195
-#define KUSST197 5196
-#define KUSST198 5197
-#define KUSST199 5198
-
-/* 0-based count of tags */
-
-#define KUSTAGCOUNT 975
-
-/* Oracle Rdb tags (0-999)*/
-
-#define KUSRTAGSTART 0
-#define KUSRTAGEND 999
-
-/* global tags (1000 - 1999) */
-
-#define KUSGTTAGSTART 1000
-#define KUSGTTAGEND 1999
-
-/* Oracle Rdb class tags */
-
-#define KUSRCTAGSTART 2000
-#define KUSRCTAGEND 2499
-
-/* Oracle class tags */
-
-#define KUSOCTAGSTART 2500
-#define KUSOCTAGEND 2999
-
-/* oracle tags (3000 - 9999) */
-
-#define KUSOTAGSTART 3000
-#define KUSOTAGMAX 9999
-
-/* ENABLE check_macro_naming */
-
-#endif
diff --git a/src/terralib/drivers/OracleSpatial/OCI/include/nzerror.h b/src/terralib/drivers/OracleSpatial/OCI/include/nzerror.h
deleted file mode 100644
index bd2a63a..0000000
--- a/src/terralib/drivers/OracleSpatial/OCI/include/nzerror.h
+++ /dev/null
@@ -1,647 +0,0 @@
-/* DISABLE check_long_lines  */
-
-/*
- * $Header: /home/terralib/src/terralib/drivers/OracleSpatial/OCI/include/nzerror.h,v 1.3 2005/05/06 16:48:55 karine Exp $
- *
- * Copyright (c) 1995, 2003, Oracle Corporation.  All rights reserved.  
- */
-
-/* ENABLE check_long_lines  */
-/*
-  NAME
-     nzerror.h - error numbers for the Oracle Security Server
-  DESCRIPTION
-     None.
-  PUBLIC FUNCTION(S)
-     None.
-  PRIVATE FUNCTION(S)
-     None.
-  NOTES
-     A pragma is used to silence olint about the enum value names not being
-     unique within 7 characters. This limit is being changed to 30.
-  MODIFIED
-     rchahal    10/15/03 - bug 2513821 
-     rchahal    08/14/03 - new error range (43000 - 43499) 
-     skalyana   08/25/03 - Error changes 
-     rchahal    06/27/03 - RSA errors
-     rchahal    05/27/03 - convert wallet
-     skalyana   03/07/03 - Move FIPS errors
-     rchahal    02/28/03 - bug 2648177
-     rchahal    01/20/03 - use sltsky
-     rchahal    11/11/02 - pkcs11 support
-     skalyana   11/29/02 - Add mutex errors
-     akoyfman   11/01/02 - adding crl cache
-     rchahal    10/23/02 - crldp error
-     rchahal    10/15/02 - fetch crl from ldap
-     rchahal    10/07/02 - crl support
-     akoyfman   10/16/02 - Update with SSL PLus 4.2 errors
-     skalyana   10/04/02 - Certicom SSL Plus 4.2 Upgrade changes
-     akoyfman   08/06/02 - adding sso wallet errors
-     akoyfman   07/12/02 - adding secret store errors
-     skalyana   07/07/02 - Add more errors for FIPS self tests
-     skalyana   07/01/02 - Add more errors
-     skalyana   06/03/02 - Add NZ error for self test failure.
-     ajacobs    02/22/01 - Add some entrust errors
-     vle        02/09/01 - add error mesg
-     lkethana   08/11/00 - Extension Errors
-     lkethana   07/30/00 - add pkcs12 errors
-     lkethana   06/17/00 - mult cert errors
-     lkethana   06/11/00 - multiple cert support
-     rturlapa   03/29/00 - Add error meesage for Entrust Login failure.
-     rwessman   07/07/99 - Deleted include of sslerrs.h. It caused the RDBMS bu
-     rwessman   07/02/99 - fixed merge errors
-     rwessman   07/01/99 - moved NZOS errors to nzerror to make them visible
-     supriya    12/16/98 - add new error for cert chain.
-     arswamin   12/04/98 - add NZERROR_NO_MATCHING_PRIVATE_KEY
-     qdinh      11/12/98 - add NZERROR_VALIDITY_EXPIRED.
-     arswamin   06/17/98 - add INIT_FAILED
-     sdange     06/10/98 - change wrong password to bad password
-     amthakur   06/09/98 - adding error messages
-     wliau      03/10/97 - Add new error message for snzdfo.c.
-     rwessman   03/14/97 - Consolidated PL/SQL toolkit errors into generic erro
-     rwessman   02/26/97 - Added NZERROR_UNSUPPORTED. Corrected values of
-                           errors outside the valid range.
-     asriniva   03/02/97 - Fix olint warning
-     rwessman   02/26/97 - Added NZERROR_UNSUPPORTED
-     rwessman   01/02/97 - Changed PLSQL package errors to be TK_PLSQL to
-                           separate them from the errors generated by the
-                           Oracle interface.
-     rwessman   12/30/96 - Merged in PL/SQL toolkit errors
-     sdange     11/14/96 - (Added NZERROR_DECRYPT_FAILED to the enum list)
-     rwessman   12/02/96 -
-     rwessman   11/25/96 - Added error messages for PL/SQL functions.
-     asriniva   10/31/96 - Include oratypes.h
-     asriniva   10/29/96 - Fix numbering.
-     asriniva   10/29/96 - Fix error numbers
-     asriniva   10/29/96 - Correct type-o
-     asriniva   10/28/96 - Add more TK errors
-     asriniva   10/28/96 - Convert OKAPI errors to TK errors.
-     rwessman   10/17/96 - still more OSS TK errors
-     asriniva   10/16/96 - OKAPI errors
-     asriniva   10/15/96 - OSSTK errors
-     rwessman   10/15/96 - Added more OSS TK errors
-     asriniva   10/09/96 - Add OSSTK errors.
-     rwessman   09/05/96 - Added errors for PL/SQL functions.
-     wliau      09/05/96 - correct error numbers.
-     $Log: nzerror.h,v $
-     Revision 1.3  2005/05/06 16:48:55  karine
-     nova versao OCI 10.1.0.2
-
- * Revision 1.26  1996/07/15  23:07:23  wliau
- * Added NZERROR_AUTH_SHARED_MEMORY
- *
- * Revision 1.25  1996/07/01  20:40:15  asriniva
- * Finished RSA verify/sign.
- *
- * Revision 1.24  1996/06/27  20:39:41  rwessman
- * Added more errors.
- *
- * Revision 1.23  1996/05/31  17:33:40  rwessman
- * Updated nzerror.h to contain bug # for olint enum bug.
- *
- * Revision 1.22  1996/05/31  17:12:30  rwessman
- * Assigned values to the various errors.
- *
- * Revision 1.21  1996/05/13  20:46:58  ggilchri
- * Added more attribute related error conditions
- *
-*/
-
-#ifndef NZERROR_ORACLE
-# define NZERROR_ORACLE
-
-#ifndef ORATYPES
-# include <oratypes.h>
-#endif /* ORATYPES */
-
-/*
-** Errors - when an error is added here, a message corresponding to the
-** error number must be added to the message file.
-** New errors must be assigned numbers, otherwise the compiler can assign any
-** value that it wants, which may lead to invalid error numbers being
-** generated.
-** The number range currently assigned to the OSS is 28750 - 29249
-** New number range 43000 - 43499
-*/
-
-typedef enum nzerror
-{
-  NZERROR_OK = 0,
-  NZERROR_GENERIC = 28750,                          /* A catchall for errors */
-  NZERROR_NO_MEMORY = 28751,                               /* No more memory */
-  NZERROR_DATA_SOURCE_INIT_FAILED = 28752,     /* Failed to init data source */
-  NZERROR_DATA_SOURCE_TERM_FAILED = 28753,/* Failed to terminate data source */
-  NZERROR_OBJECT_STORE_FAILED = 28754, /* Store object in data source failed */
-  NZERROR_OBJECT_GET_FAILED = 28755,
-                                 /* Failed to obtain object from data source */
-  NZERROR_MEMORY_ALLOC_FAILED = 28756,
-                                       /* Callback failed to allocate memory */
-  NZERROR_MEMORY_ALLOC_0_BYTES = 28757,
-                                   /* Attempted to ask for 0 bytes of memory */
-  NZERROR_MEMORY_FREE_FAILED = 28758,
-                                           /* Callback failed to free memory */
-  NZERROR_FILE_OPEN_FAILED = 28759,
-                                                      /* Open of file failed */
-  NZERROR_LIST_CREATION_FAILED = 28760,
-                                                  /* Creation of list failed */
-  NZERROR_NO_ELEMENT = 28761,
-                                                    /* No list element found */
-  NZERROR_ELEMENT_ADD_FAILED = 28762,
-                                          /* Addition of list element failed */
-  NZERROR_PARAMETER_BAD_TYPE = 28763,
-                                   /* Retrieval of an unknown parameter type */
-  NZERROR_PARAMETER_RETRIEVAL = 28764,      /* Retrieval of parameter failed */
-                             
-  NZERROR_NO_LIST = 28765,                /* Data method list does not exist */
-  NZERROR_TERMINATE_FAIL = 28766,                     /* Failed to terminate */
-  NZERROR_BAD_VERSION_NUMBER = 28767,                  /* Bad version number */
-  NZERROR_BAD_MAGIC_NUMBER = 28768,                      /* Bad magic number */
-  NZERROR_METHOD_NOT_FOUND = 28769,
-                           /* Data retrieval method specified does not exist */
-  NZERROR_ALREADY_INITIALIZED = 28770,
-                                    /*The data source is already initialized */
-  NZERROR_NOT_INITIALIZED = 28771,     /* The data source is not initialized */
-  NZERROR_BAD_FILE_ID = 28772,                             /* File ID is bad */
-  NZERROR_WRITE_MAGIC_VERSION = 28773,  /* Failed to write magic and version */
-  NZERROR_FILE_WRITE_FAILED = 28774,              /* Failed to write to file */
-  NZERROR_FILE_CLOSE_FAILED = 28775,                 /* Failed to close file */
-  NZERROR_OUTPUT_BUFFER_TOO_SMALL = 28776,
-                           /* The buffer supplied by the caller is too small */
-  NZERROR_BINDING_CREATION_FAILED = 28777,/* NL failed in creating a binding */
-  NZERROR_PARAMETER_MALFORMED = 28778,    /* A parameter was in a bad format */
-  NZERROR_PARAMETER_NO_METHOD = 28779,
-                                  /* No method was specified for a data type */
-  NZERROR_BAD_PARAMETER_METHOD = 28780,      /* Illegal method for data type */
-  NZERROR_PARAMETER_NO_DATA = 28781,    /* No method specified when required */
-  NZERROR_NOT_ALLOCATED = 28782,             /* Data source is not allocated */
-  NZERROR_INVALID_PARAMETER = 28783,               /* Invalid parameter name */
-  NZERROR_FILE_NAME_TRANSLATION = 28784,/* Could not translate OSD file name */
-  NZERROR_NO_SUCH_PARAMETER = 28785,   /* Selected parameter is non-existent */
-
-  NZERROR_DECRYPT_FAILED = 28786,  
-                                 /* Encrypted private key decryption failure */ 
-  NZERROR_ENCRYPT_FAILED = 28787,     /* Private key encryption failed */
- 
-  NZERROR_INVALID_INPUT = 28788,     /* Incorrect input or unknown error */ 
-
-  NZERROR_NAME_TYPE_NOT_FOUND = 28789,
-                                  /* Type of name requested is not available */
-  NZERROR_NLS_STRING_OPEN_FAILED = 28790,
-                                        /* Failure to generate an NLS string */
-  NZERROR_CERTIFICATE_VERIFY = 28791,      /* Failed to verify a certificate */
-  NZERROR_OCI_PLSQL_FAILED = 28792,
-                                 /* an OCI call to process some plsql failed */
-  NZERROR_OCI_BIND_FAILED = 28793,
-                              /* an OCI call to bind an internal var. failed */
-  NZERROR_ATTRIBUTE_INIT = 28794,           /* failed to init role retrieval */
-  NZERROR_ATTRIBUTE_FINISH_FAILED = 28795,/* Did not complete role retrieval */
-  NZERROR_UNSUPPORTED_METHOD = 28796, /* Data method specified not supported */
-  NZERROR_INVALID_KEY_DATA_TYPE = 28797,
-                                      /* Invalid data type specified for key */
-  NZEROR_BIND_SUBKEY_COUNT = 28798,
-       /* Number of sub-keys to bind does not match count in initialized key */
-  NZERROR_AUTH_SHARED_MEMORY = 28799,
-    /* Failed to retreieve authentication information from the shared memory */
-  NZERROR_RIO_OPEN = 28800,                               /* RIO Open Failed */
-  NZERROR_RIO_OBJECT_TYPE = 28801,                /* RIO object type invalid */
-  NZERROR_RIO_MODE = 28802,                              /* RIO mode invalid */
-  NZERROR_RIO_IO = 28803,                     /* RIO io set or numberinvalid */
-  NZERROR_RIO_CLOSE = 28804,                             /* RIO close failed */
-  NZERROR_RIO_RETRIEVE = 28805,                       /* RIO retrieve failed */
-  NZERROR_RIO_STORE = 28806,                             /* RIO store failed */
-  NZERROR_RIO_UPDATE = 28807,                           /* RIO update failed */
-  NZERROR_RIO_INFO = 28808,                               /* RIO info failed */
-  NZERROR_RIO_DELETE = 28809,                           /* RIO delete failed */
-  NZERROR_KD_CREATE = 28810,                 /* Key descriptor create failed */
-  NZERROR_RIO_ACCESS_DESCRIPTOR = 28811,        /* access descriptor invalid */
-  NZERROR_RIO_RECORD = 28812,                              /* record invalid */
-  NZERROR_RIO_RECORD_TYPE = 28813,    /* record type and AD type not matched */
-  NZERROR_PLSQL_ORACLE_TO_REAL = 28814,
-          /* A number passed to PL/SQL could not be converted to real format */
-  NZERROR_PLSQL_REAL_TO_ORACLE = 28815,
-       /* A number in machine format could not be converted to Oracle format */
-  NZERROR_TK_PLSQL_NO_PASSWORD = 28816,
-                         /* A password was not provided to a PL/SQL function */
-  NZERROR_TK_PLSQL_GENERIC = 28817,
-                                      /* A PL/SQL function returned an error */
-  NZERROR_TK_PLSQL_NO_CONTEXT = 28818,
-               /* The package context was not specified to a PL/SQL function */
-  NZERROR_TK_PLSQL_NO_DIST_NAME = 28819,
-      /* The user's distinguished name was not provided to a PL/SQL function */
-  NZERROR_TK_PLSQL_NO_STATE = 28820,
-/* The state of either a signature or decryption/encryption was not provided */
-  NZERROR_TK_PLSQL_NO_INPUT = 28821,
-                       /* An input buffer was specified to a PL/SQL function */
-  NZERROR_TK_PLSQL_NO_SEED = 28822,
-         /* No seed was specified to the PL/SQL seed initialization function */
-  NZERROR_TK_PLSQL_NO_BYTES = 28823,
-  /* Number of bytes was not specified to the PL/SQL random number generator */
-  NZERROR_TK_INVALID_STATE = 28824,
-                     /* Invalid encryption/decryption/signature state passed */
-  NZERROR_TK_PLSQL_NO_ENG_FUNC = 28825,
-                                  /* No crypto engine function was passed in */
-  NZERROR_TK_INV_ENG_FUNC = 28826,
-                          /* An invalid crypto engine function was passed in */
-  NZERROR_TK_INV_CIPHR_TYPE = 28827,
-                                     /* An invalid cipher type was passed in */
-  NZERROR_TK_INV_IDENT_TYPE = 28828,
-                                   /* An invalid identity type was specified */
-  NZERROR_TK_PLSQL_NO_CIPHER_TYPE = 28829,
-                                             /* No cipher type was specified */
-  NZERROR_TK_PLSQL_NO_IDENT_TYPE = 28830,
-                                           /* No identity type was specified */
-  NZERROR_TK_PLSQL_NO_DATA_FMT = 28831,
-                                        /* No data unit format was specified */
-  NZERROR_TK_INV_DATA_FMT = 28832,
-                        /* Invalid data unit format was provided to function */
-  NZERROR_TK_PLSQL_INSUFF_INFO = 28833,
-       /* Not enough info (usually parameters) provided to a PL/SQL function */
-  NZERROR_TK_PLSQL_BUF_TOO_SMALL = 28834,
-           /* Buffer provided by PL/SQL is too small for data to be returned */
-  NZERROR_TK_PLSQL_INV_IDENT_DESC = 28835,
-                             /* Identity descriptor not present or too small */
-  NZERROR_TK_PLSQL_WALLET_NOTOPEN = 28836,
-                                           /* Wallet has not been opened yet */
-  NZERROR_TK_PLSQL_NO_WALLET = 28837,
-                        /* No wallet descriptor specified to PL/SQL function */
-  NZERROR_TK_PLSQL_NO_IDENTITY = 28838,
-                      /* No identity descriptor specified to PL/SQL function */
-  NZERROR_TK_PLSQL_NO_PERSONA = 28839,
-                   /* No persona descriptor was specified to PL/SQL function */
-  NZERROR_TK_PLSQL_WALLET_OPEN = 28840,
-                                                /* Wallet was already opened */
-  NZERROR_UNSUPPORTED = 28841,                 /* Operation is not supported */
-  NZERROR_FILE_BAD_PERMISSION = 28842,      /* Bad file permission specified */
-  NZERROR_FILE_OSD_ERROR = 28843,             /* OSD error when opening file */
-  NZERROR_NO_WALLET  = 28844,  /* cert + privkey + tp files do not exist */
-  NZERROR_NO_CERTIFICATE_ALERT    = 28845,  /* no certificate */
-  NZERROR_NO_PRIVATE_KEY          = 28846,  /* no private-key */
-  NZERROR_NO_CLEAR_PRIVATE_KEY_FILE   = 28847,   /* no clear key-file */
-  NZERROR_NO_ENCRYPTED_PRIVATE_KEY_FILE = 28848,  /* no encrypted priv key */
-  NZERROR_NO_TRUSTPOINTS     = 28849,       /* no trustpoints */
-  NZERROR_NO_CLEAR_TRUSTPOINT_FILE    = 28850,   /* no clear trustpoints */
-  NZERROR_NO_ENCRYPTED_TRUSTPOINT_FILE = 28851,   /* no encrypted trustpoints */
-  NZERROR_BAD_PASSWORD    = 28852,   /* bad password */
-  NZERROR_INITIALIZATION_FAILED   =  28853, /* init failed or 
-					       module loading failed */
-  /******************************* SSL ERRORS ********************************/
-  /*
-   * In order to allow SSL errors to be mapped to Oracle errors, space is
-   * provided here. One Oracle error is provided for each SSL error to make
-   * error handling easier. A macro is provided to do the conversion.
-   * NOTE: ANY CHANGE IN SSL ERRORS MUST BE REFLECTED HERE.
-   * To add an SSL error, use the following formula to calculate the Oracle
-   * error:
-   * new_oracle_error = (new_ssl_error - SSLMemoryError) + NZERROR_SSLMemoryErr
-   * or numerically:
-   * new_oracle_error = (new_ssl_error - -7000) + 28854
-   */
-  NZERROR_SSLMemoryErr = 28854,
-  NZERROR_SSLUnsupportedErr = 28855,
-  NZERROR_SSLOverflowErr = 28856,
-  NZERROR_SSLUnknownErr = 28857,
-  NZERROR_SSLProtocolErr = 28858,
-  NZERROR_SSLNegotiationErr = 28859,
-  NZERROR_SSLFatalAlert = 28860,
-  NZERROR_SSLWouldBlockErr = 28861,
-  NZERROR_SSLIOErr = 28862,
-  NZERROR_SSLSessionNotFoundErr = 28863,
-  NZERROR_SSLConnectionClosedGraceful = 28864,
-  NZERROR_SSLConnectionClosedError = 28865,
-  NZERROR_ASNBadEncodingErr = 28866,
-  NZERROR_ASNIntegerTooBigErr = 28867,
-  NZERROR_X509CertChainInvalidErr = 28868,
-  NZERROR_X509CertExpiredErr = 28869,
-  NZERROR_X509NamesNotEqualErr = 28870,
-  NZERROR_X509CertChainIncompleteErr = 28871,
-  NZERROR_X509DataNotFoundErr = 28872,
-  NZERROR_SSLBadParameterErr = 28873,
-  NZERROR_SSLIOClosedOverrideGoodbyeKiss = 28874,
-  NZERROR_X509MozillaSGCErr  =  28875,
-  NZERROR_X509IESGCErr       =  28876,
-  NZERROR_ImproperServerCredentials = 28877,
-  NZERROR_ImproperClientCredentials = 28878,
-  NZERROR_NoProtocolSideSet = 28879,
-  NZERROR_setPersonaFailed = 28880,
-  NZERROR_setCertFailed = 28881,
-  NZERROR_setVKeyFailed = 28882,
-  NZERROR_setTPFailed = 28883,
-  NZERROR_BadCipherSuite = 28884,
-  NZERROR_NoKeyPairForKeyUsage = 28885,
-
-/* ============>>>  ENTRUST ERRORS */
-  NZERROR_EntrustLoginFailed = 28890,
-  NZERROR_EntrustGetInfoFailed = 28891,
-  NZERROR_EntrustLoadCertificateFailed = 28892,
-  NZERROR_EntrustGetNameFailed = 28893,
-
-/* ============>>> NZERRORS CONTINUED */
-  NZERROR_CertNotInstalled = 29000,
-  NZERROR_ServerDNMisMatched = 29002,
-  NZERROR_ServerDNMisConfigured = 29003,
-
-/* ============>>> PKI VENDORS ERRORS 29050 - 29099 */
-
-/* ============>>> SSL Errors CONTINUED */
-  NZERROR_CIC_ERR_SSL_ALERT_CB_FAILURE = 29004,
-  NZERROR_CIC_ERR_SSL_BAD_CERTIFICATE = 29005,
-  NZERROR_CIC_ERR_SSL_BAD_CERTIFICATE_REQUEST = 29006,
-  NZERROR_CIC_ERR_SSL_BAD_CLEAR_KEY_LEN = 29007,
-  NZERROR_CIC_ERR_SSL_BAD_DHPARAM_KEY_LENGTH = 29008,
-  NZERROR_CIC_ERR_SSL_BAD_ENCRYPTED_KEY_LEN = 29009,
-  NZERROR_CIC_ERR_SSL_BAD_EXPORT_KEY_LENGTH = 29010,
-  NZERROR_CIC_ERR_SSL_BAD_FINISHED_MESSAGE = 29011,
-  NZERROR_CIC_ERR_SSL_BAD_KEY_ARG_LEN = 29012,
-  NZERROR_CIC_ERR_SSL_BAD_MAC = 29013,
-  NZERROR_CIC_ERR_SSL_BAD_MAX_FRAGMENT_LENGTH_EXTENSION = 29014,
-  NZERROR_CIC_ERR_SSL_BAD_MESSAGE_LENGTH = 29015,
-  NZERROR_CIC_ERR_SSL_BAD_PKCS1_PADDING = 29016,
-  NZERROR_CIC_ERR_SSL_BAD_PREMASTER_SECRET_LENGTH = 29017,
-  NZERROR_CIC_ERR_SSL_BAD_PREMASTER_SECRET_VERSION = 29018,
-  NZERROR_CIC_ERR_SSL_BAD_PROTOCOL_VERSION = 29019,
-  NZERROR_CIC_ERR_SSL_BAD_RECORD_LENGTH = 29020,
-  NZERROR_CIC_ERR_SSL_BAD_SECRET_KEY_LEN = 29021,
-  NZERROR_CIC_ERR_SSL_BAD_SIDE = 29022,
-  NZERROR_CIC_ERR_SSL_BUFFERS_NOT_EMPTY = 29023,
-  NZERROR_CIC_ERR_SSL_CERTIFICATE_VALIDATE_FAILED = 29024,
-  NZERROR_CIC_ERR_SSL_CERT_CHECK_CALLBACK = 29025,
-  NZERROR_CIC_ERR_SSL_DECRYPT_FAILED = 29026,
-  NZERROR_CIC_ERR_SSL_ENTROPY_COLLECTION = 29027,
-  NZERROR_CIC_ERR_SSL_FAIL_SERVER_VERIFY = 29028,
-  NZERROR_CIC_ERR_SSL_HANDSHAKE_ALREADY_COMPLETED = 29029,
-  NZERROR_CIC_ERR_SSL_HANDSHAKE_REQUESTED = 29030,
-  NZERROR_CIC_ERR_SSL_HANDSHAKE_REQUIRED = 29031,
-  NZERROR_CIC_ERR_SSL_INCOMPLETE_IDENTITY = 29032,
-  NZERROR_CIC_ERR_SSL_INVALID_PFX = 29033,
-  NZERROR_CIC_ERR_SSL_NEEDS_CIPHER_OR_CLIENTAUTH = 29034,
-  NZERROR_CIC_ERR_SSL_NEEDS_PRNG = 29035,
-  NZERROR_CIC_ERR_SSL_NOT_SUPPORTED = 29036,
-  NZERROR_CIC_ERR_SSL_NO_CERTIFICATE = 29037,
-  NZERROR_CIC_ERR_SSL_NO_MATCHING_CERTIFICATES = 29038,
-  NZERROR_CIC_ERR_SSL_NO_MATCHING_CIPHER_SUITES = 29039,
-  NZERROR_CIC_ERR_SSL_NO_SUPPORTED_CIPHER_SUITES = 29040,
-  NZERROR_CIC_ERR_SSL_NULL_CB = 29041,
-  NZERROR_CIC_ERR_SSL_READ_BUFFER_NOT_EMPTY = 29042,
-  NZERROR_CIC_ERR_SSL_READ_REQUIRED = 29043,
-  NZERROR_CIC_ERR_SSL_RENEGOTIATION_ALREADY_REQUESTED = 29044,
-  NZERROR_CIC_ERR_SSL_RENEGOTIATION_REFUSED = 29045,
-  NZERROR_CIC_ERR_SSL_RESUMABLE_SESSION = 29046,
-  NZERROR_CIC_ERR_SSL_TLS_EXTENSION_MISMATCH = 29047,
-  NZERROR_CIC_ERR_SSL_UNEXPECTED_MSG = 29048,
-  NZERROR_CIC_ERR_SSL_UNKNOWN_RECORD = 29049,
-  NZERROR_CIC_ERR_SSL_UNSUPPORTED_CLIENT_AUTH_MODE = 29050,
-  NZERROR_CIC_ERR_SSL_UNSUPPORTED_PUBKEY_TYPE = 29051,
-  NZERROR_CIC_ERR_SSL_WRITE_BUFFER_NOT_EMPTY = 29052,
-  NZERROR_CIC_ERR_PKCS12_MISSING_ALG = 29053,
-  NZERROR_CIC_ERR_PKCS_AUTH_FAILED = 29054,
-  NZERROR_CIC_ERR_PKCS_BAD_CONTENT_TYPE = 29055,
-  NZERROR_CIC_ERR_PKCS_BAD_INPUT = 29056,
-  NZERROR_CIC_ERR_PKCS_BAD_PADDING = 29057,
-  NZERROR_CIC_ERR_PKCS_BAD_SN = 29058,
-  NZERROR_CIC_ERR_PKCS_BAD_SN_LENGTH = 29059,
-  NZERROR_CIC_ERR_PKCS_BAD_VERSION = 29060,
-  NZERROR_CIC_ERR_PKCS_BASE = 29061,
-  NZERROR_CIC_ERR_PKCS_FIELD_NOT_PRESENT = 29062,
-  NZERROR_CIC_ERR_PKCS_NEED_CERTVAL = 29063,
-  NZERROR_CIC_ERR_PKCS_NEED_PASSWORD = 29064,
-  NZERROR_CIC_ERR_PKCS_NEED_PKC = 29065,
-  NZERROR_CIC_ERR_PKCS_NEED_PRV_KEY = 29066,
-  NZERROR_CIC_ERR_PKCS_NEED_TRUSTED = 29067,
-  NZERROR_CIC_ERR_PKCS_UNSUPPORTED_CERT_FORMAT = 29068,
-  NZERROR_CIC_ERR_PKCS_UNSUP_PRVKEY_TYPE = 29069,
-  NZERROR_CIC_ERR_CODING_BAD_PEM = 29070,
-  NZERROR_CIC_ERR_CODING_BASE = 29071, 
-  NZERROR_CIC_ERR_DER_BAD_ENCODING = 29072,
-  NZERROR_CIC_ERR_DER_BAD_ENCODING_LENGTH = 29073,
-  NZERROR_CIC_ERR_DER_BASE = 29074,
-  NZERROR_CIC_ERR_DER_ELEMENT_TOO_LONG = 29075,
-  NZERROR_CIC_ERR_DER_INDEFINITE_LENGTH = 29076,
-  NZERROR_CIC_ERR_DER_NO_MORE_ELEMENTS = 29077,
-  NZERROR_CIC_ERR_DER_OBJECT_TOO_LONG = 29078,
-  NZERROR_CIC_ERR_DER_TAG_SIZE = 29079,
-  NZERROR_CIC_ERR_DER_TIME_OUT_OF_RANGE = 29080,
-  NZERROR_CIC_ERR_DER_UNUSED_BITS_IN_BIT_STR = 29081,
-  NZERROR_CIC_ERR_GENERAL_BASE = 29082,
-  NZERROR_CIC_ERR_HASH_BASE = 29083,
-  NZERROR_CIC_ERR_ILLEGAL_PARAM = 29084,
-  NZERROR_CIC_ERR_MEM_NOT_OURS = 29085,
-  NZERROR_CIC_ERR_MEM_OVERRUN = 29086,
-  NZERROR_CIC_ERR_MEM_UNDERRUN = 29087,
-  NZERROR_CIC_ERR_MEM_WAS_FREED = 29088,
-  NZERROR_CIC_ERR_NOT_FOUND = 29090,
-  NZERROR_CIC_ERR_NO_PTR = 29091,
-  NZERROR_CIC_ERR_TIMEOUT = 29092,
-  NZERROR_CIC_ERR_UNIT_MASK = 29093,
-  NZERROR_CIC_ERR_BAD_CTX = 29094,
-  NZERROR_CIC_ERR_BAD_INDEX = 29095,
-  NZERROR_CIC_ERR_BAD_LENGTH = 29096,
-  NZERROR_CIC_ERR_CODING_BAD_ENCODING = 29097,
-
-  /* ============>>> PKCS12 error 29100 - 29149  */
-  
-  NZERROR_LOCKEYID_CREATE_FAILED = 29100,
-  NZERROR_P12_ADD_PVTKEY_FAILED = 29101,
-  NZERROR_P12_ADD_CERT_FAILED = 29102,
-  NZERROR_P12_WLT_CREATE_FAILED = 29103,
-  NZERROR_P12_ADD_CERTREQ_FAILED = 29104,
-  NZERROR_P12_WLT_EXP_FAILED = 29105,
-  NZERROR_P12_WLT_IMP_FAILED = 29106,
-  NZERROR_P12_CREATE_FAILED = 29107,
-  NZERROR_P12_DEST_FAILED = 29107,
-  NZERROR_P12_RAND_ERROR = 29108, 
-  NZERROR_P12_PVTKEY_CRT_FAILED = 29109,
-  NZERROR_P12_INVALID_BAG = 29110,
-  NZERROR_P12_INVALID_INDEX = 29111,
-  NZERROR_P12_GET_CERT_FAILED = 29112,
-  NZERROR_P12_GET_PVTKEY_FAILED = 29113,
-  NZERROR_P12_IMP_PVTKEY_FAILED = 29114,
-  NZERROR_P12_EXP_PVTKEY_FAILED = 29115,
-  NZERROR_P12_GET_ATTRIB_FAILED = 29116,
-  NZERROR_P12_ADD_ATTRIB_FAILED = 29117,
-  NZERROR_P12_CRT_ATTRIB_FAILED = 29118,
-  NZERROR_P12_IMP_CERT_FAILED = 29119,
-  NZERROR_P12_EXP_CERT_FAILED = 29120,
-  NZERROR_P12_ADD_SECRET_FAILED = 29121,
-  NZERROR_P12_ADD_PKCS11INFO_FAILED = 29122,
-  NZERROR_P12_GET_PKCS11INFO_FAILED = 29123,
-  NZERROR_P12_MULTIPLE_PKCS11_LIBNAME = 29124,
-  NZERROR_P12_MULTIPLE_PKCS11_TOKENLABEL = 29125,
-  NZERROR_P12_MULTIPLE_PKCS11_TOKENPASSPHRASE = 29126,
-  NZERROR_P12_UNKNOWN_PKCS11INFO = 29127,
-  NZERROR_P12_PKCS11_LIBNAME_NOT_SET = 29128,
-  NZERROR_P12_PKCS11_TOKENLABEL_NOT_SET = 29129,
-  NZERROR_P12_PKCS11_TOKENPASSPHRASE_NOT_SET = 29130,
-
-/* ===========>>> SSL Errors CONTINUED 29135 - 29139 */
-  NZERROR_CIC_ERR_RANDOM = 29135,
-  NZERROR_CIC_ERR_SMALL_BUFFER = 29136,
-  NZERROR_CIC_ERR_SSL_BAD_CONTEXT = 29137,
-
-/* ==========>>> Mutex Errors 29138 - 29139 */
-  NZERROR_MUTEX_INITIALIZE_FAILED = 29138,
-  NZERROR_MUTEX_DESTROY_FAILED = 29139,
-
-
-/* ============>>> EXTENSIONS Errors 29140 - 29149 */
-  NZERROR_BS_CERTOBJ_CREAT_FAILED = 29140,
-  NZERROR_BS_DER_IMP_FAILED = 29141,
-
-
-/* ============>>> FIPS ERRORS 29150 - 29175 */
-  NZERROR_DES_SELF_TEST_FAILED = 29150,
-  NZERROR_3DES_SELF_TEST_FAILED = 29151,
-  NZERROR_SHA_SELF_TEST_FAILED = 29152,
-  NZERROR_RSA_SELF_TEST_FAILED = 29153,
-  NZERROR_DRNG_SELF_TEST_FAILED = 29154,
-  NZERROR_CKEYPAIR_SELF_TEST_FAILED = 29155,
-  NZERROR_CRNG_SELF_TEST_FAILED = 29156,
-  NZERROR_FIPS_PATHNAME_ERROR = 29157,
-  NZERROR_FIPS_LIB_OPEN_FAILED = 29158,
-  NZERROR_FIPS_LIB_READ_ERROR = 29159,
-  NZERROR_FIPS_LIB_DIFFERS = 29160,
-  NZERROR_DAC_SELF_TEST_FAILED = 29161,
-  NZERROR_NONFIPS_CIPHERSUITE = 29162,
-  NZERROR_VENDOR_NOT_SUPPORTED_FIPS_MODE = 29163,
-  NZERROR_EXTERNAL_PKCS12_NOT_SUPPORTED_FIPS_MODE = 29164,
-
-/* ============>>> CRL ERRORS 29176 - 29200 */
-  NZERROR_CRL_SIG_VERIFY_FAILED = 29176, /*CRL signature verification failed*/ 
-  NZERROR_CERT_NOT_IN_CRL = 29177, 
-                                 /*Cert is not in CRL - cert is not revoked*/ 
-  NZERROR_CERT_IN_CRL = 29178,           /*Cert is in CRL - cert is revoked*/ 
-  NZERROR_CERT_IN_CRL_CHECK_FAILED = 29179, /*Cert revocation check failed */ 
-  NZERROR_INVALID_CERT_STATUS_PROTOCOL = 29180, 
-  NZERROR_LDAP_OPEN_FAILED = 29181,  /* ldap_open failed */
-  NZERROR_LDAP_BIND_FAILED = 29182,  /* ldap_bind failed */
-  NZERROR_LDAP_SEARCH_FAILED = 29183,  /* ldap_search failed */
-  NZERROR_LDAP_RESULT_FAILED = 29184,  /* ldap_result failed */
-  NZERROR_LDAP_FIRSTATTR_FAILED = 29185,  /* ldap_first_attribute failed */
-  NZERROR_LDAP_GETVALUESLEN_FAILED = 29186,  /* ldap_get_values_len failed */
-  NZERROR_LDAP_UNSUPPORTED_VALMEC = 29187, 
-                                       /* unsupported validation mechanism */
-  NZERROR_LDAP_COUNT_ENTRIES_FAILED = 29188,/* ldap_count_entries failed */
-  NZERROR_LDAP_NO_ENTRY_FOUND = 29189, /* No entry found in OID */
-  NZERROR_LDAP_MULTIPLE_ENTRIES_FOUND = 29190, /* Multiple entries in OID*/
-  NZERROR_OID_INFO_NOT_SET = 29191, 
-  NZERROR_LDAP_VALMEC_NOT_SET = 29192,  
-                                     /* Validation mechanism not set in OID*/
-  NZERROR_CRLDP_NO_CRL_FOUND = 29193,  
-                                     /* No CRL found using CRLDP mechanism */
-  NZERROR_CRL_NOT_IN_CACHE = 29194,  /* No CRL found in the cache*/
-  NZERROR_CRL_EXPIRED = 29195,       /* CRL nextUpdate time is in the past */
-
-/* ============>>>  ADD ERRORS HERE -- NOTE DECREASING numbers */
-  NZERROR_DN_MATCH  =            29222,  /* for nztCompareDN */
-  NZERROR_CERT_CHAIN_CREATION  = 29223,  /* unable to create a cert chain
-					  * with the existing TPs for the 
-					  * cert to be installed. 
-					  */
-  NZERROR_NO_MATCHING_CERT_REQ = 29224,  /* No matching cert_req was 
-					  * found the corresponding to
-					  * the privatekey which
-					  * matches the cert to be
-					  * installed */
-  NZERROR_CERT_ALREADY_INSTALLED = 29225, /* we are attempting to
-					   * install a cert again into
-					   * a persona which already 
-					   * has it installed.
-					   */
-  NZERROR_NO_MATCHING_PRIVATE_KEY = 29226, /* could not find a matching 
-					    * persona-private(privatekey) in
-					    * the Persona, for the given
-					    * cert(public key). 
-					    */
-  NZERROR_VALIDITY_EXPIRED = 29227, /* certificate validity date expired */
-  NZERROR_TK_BYTES_NEEDED = 29228,   /* Couldn't determine # of bytes needed */
-  NZERROR_TK_BAD_MAGIC_NUMBER = 29229,
-                     /* Magic number found in header does not match expected */
-  NZERROR_TK_BAD_HEADER_LENGTH = 29230,
-                /* Header length passed in not sufficient for message header */
-  NZERROR_TK_CE_INIT = 29231,          /* Crypto engine failed to initialize */
-  NZERROR_TK_CE_KEYINIT = 29232,  /* Crypto engine key initialization failed */
-  NZERROR_TK_CE_ENCODE_KEY = 29233,           /* Count not encode key object */
-  NZERROR_TK_CE_DECODE_KEY = 29234,      /* Could not decode key into object */
-  NZERROR_TK_CE_GEYKEYINFO = 29235,  /* Crypto engine failed to get key info */
-  NZERROR_TK_SEED_RANDOM = 29236,   /* Couldn't seed random number generator */
-  NZERROR_TK_CE_ALGFINISH = 29237,              /* Couldn't finish algorithm */
-  NZERROR_TK_CE_ALGAPPLY = 29238,        /* Couldn't apply algorithm to data */
-  NZERROR_TK_CE_ALGINIT = 29239,           /* Couldn't init CE for algorithm */
-  NZERROR_TK_ALGORITHM = 29240,      /* Have no idea what algorithm you want */
-  NZERROR_TK_CANNOT_GROW = 29241,         /* Cannot grow output buffer block */
-  NZERROR_TK_KEYSIZE = 29242,               /* Key not large enough for data */
-  NZERROR_TK_KEYTYPE = 29243,                           /* Unknown key type. */
-
-  NZERROR_TK_PLSQL_NO_WRL = 29244,
-                 /* Wallet resource locator not specified to PL/SQL function */
-
-  NZERROR_TK_CE_FUNC = 29245,              /* Unknown crypto engine function */
-  NZERROR_TK_TDU_FORMAT = 29246,                       /* Unknown TDU format */
-  NZERROR_TK_NOTOPEN = 29247,                         /* Object must be open */
-  NZERROR_TK_WRLTYPE = 29248,                                /* Bad WRL type */
-  NZERROR_TK_CE_STATE = 29249,  /* Bad state specified for the crypto engine */
-
-  /* After 29249, use error numbers in block 43000 - 43499 */
-  NZERROR_PKCS11_LIBRARY_NOT_FOUND = 43000, /* PKCS #11 library not found */
-  NZERROR_PKCS11_TOKEN_NOT_FOUND = 43001, 
-                                         /* can't find token with given label*/
-  NZERROR_PKCS11_BAD_PASSPHRASE = 43002,  /* passphrase is incorrect/expired */
-  NZERROR_PKCS11_GET_FUNC_LIST = 43003,  /* C_GetFunctionList returned error */
-  NZERROR_PKCS11_INITIALIZE = 43004,     /* C_Initialize returned error */
-  NZERROR_PKCS11_NO_TOKENS_PRESENT = 43005, /* No tokens present */
-  NZERROR_PKCS11_GET_SLOT_LIST = 43006,  /* C_GetSlotList returned error */
-
-  NZERROR_PKCS11_GET_TOKEN_INFO = 43008,  /* C_GetTokenInfo returned error */
-  NZERROR_PKCS11_SYMBOL_NOT_FOUND = 43009, /* Symbol not found in PKCS11 lib */
-
-  NZERROR_PKCS11_TOKEN_LOGIN_FAILED = 43011, /* Token login failed */
-
-  NZERROR_PKCS11_CHANGE_PROVIDERS_ERROR = 43013, /* Change providers error */
-  NZERROR_PKCS11_GET_PRIVATE_KEY_ERROR = 43014, 
-                              /* Error trying to find private key on token */
-  NZERROR_PKCS11_CREATE_KEYPAIR_ERROR = 43015, /* Key pair gen error */
-  NZERROR_PKCS11_WALLET_CONTAINS_P11_INFO = 43016, /* Wallet already contains
-                                                      pkcs11 info */
-
-  /* RSA ERRORS 43050 - 43059 */
-  NZERROR_BIND_SERVICE_ERROR = 43050,    /* C_BindService returned error */
-  NZERROR_CREATE_KEY_OBJ_ERROR = 43051,  /* B_CreateKeyObject returned error */
-  NZERROR_GET_CERT_FIELDS = 43052,       /* C_GetCertFields returned error */
-  NZERROR_CREATE_PKCS10_OBJECT = 43053,  
-                                      /* C_CreatePKCS10Object returned error */
-  NZERROR_SET_PKCS10_FIELDS = 43054,     /* C_SetPKCS10Fields returned error */
-  NZERROR_SIGN_CERT_REQUEST = 43055,     /* C_SignCertRequest returned error */
-  NZERROR_GET_PKCS10_DER = 43056,        /* C_GetPKCS10DER returned error */
-  NZERROR_INITIALIZE_CERTC = 43057,      /* C_InitializeCertC returned error */
-  NZERROR_INSERT_PRIVATE_KEY = 43058,   /* C_InsertPrivateKey returned error */
-  /* slts ERRORS 43060 - 43069 */
-  NZERROR_SLTSCTX_INIT_FAILED = 43060,    /* sltsini() returned error */
-  NZERROR_SLTSKYC_FAILED = 43061,         /* sltskyc() returned error */
-  NZERROR_SLTSCTX_TERM_FAILED = 43062,    /* sltster() returned error */
-  NZERROR_SLTSKYS_FAILED = 43063,         /* sltskys() returned error */
-
-  NZERROR_INVALID_HEADER_LENGTH = 43070,       /* bad sso header length */
-
-  NZERROR_LAST_ERROR = 43499,                        /* Last available error */
-                                            /* MAXIMUM ERROR NUMBER IS 43499 */
-
-  /*
-   * DO NOT JUST INSERT NEW ERRORS IN ANY OLD PLACE.  New errors should be
-   * added such the current error retains their integer values. Duplicate
-   * values will cause compiler errors.
-   */
-  NZERROR_THIS_MUST_BE_LAST
-
-} nzerror;
-
-/*
- * Macro to convert SSL errors to Oracle errors. As SSL errors are negative
- * and Oracle numbers are positive, the following needs to be done.
- * 1. The base error number, which is the highest, is added to the
- *    SSL error to get the index into the number range.
- * 2. The result is added to the base Oracle number to get the Oracle error.
- */
-#define NZERROR_SSL_TO_ORACLE(ssl_error_) \
-  ((ssl_error_ == SSLNoErr) \
-   ? NZERROR_OK \
-   : (nzerror) ((ssl_error_ - SSLMemoryErr) + (uword) NZERROR_SSLMemoryErr))
-#endif /* NZERROR_ORACLE */ 
diff --git a/src/terralib/drivers/OracleSpatial/OCI/include/nzt.h b/src/terralib/drivers/OracleSpatial/OCI/include/nzt.h
deleted file mode 100644
index abf604d..0000000
--- a/src/terralib/drivers/OracleSpatial/OCI/include/nzt.h
+++ /dev/null
@@ -1,2750 +0,0 @@
-/* DISABLE check_long_lines */
-
-/* Copyright (c) 1996, 2003, Oracle Corporation.  All rights reserved.  */
-/* Copyright (c) 1996, 2003, Oracle Corporation.  All rights reserved.  */
-
-/*
- * $Header: /home/terralib/src/terralib/drivers/OracleSpatial/OCI/include/nzt.h,v 1.3 2005/05/06 16:48:55 karine Exp $ 
- */
-
-/* 
- * NAME
- *    nzt.h
- * 
- * DESCRIPTION
- *    Toolkit public declarations.
- *    
- * PUBLIC FUNCTIONS
- *    nztwOpenWallet           - Open a wallet based on a WRL and pwd.
- *    nztwCloseWallet          - Close a wallet.
- * +  nztwCreateWallet         - Create a new wallet.
- * +  nztwDestroyWallet        - Destroy an existing wallet.
- *    nztwRetrievePersonaCopy  - Retieve a copy of a particular persona.
- * +  nzteStorePersona         - Store a persona in the wallet.
- *    nzteOpenPersona          - Open a persona.
- *    nzteClosePersona         - Close a persona.
- * +  nzteRemovePersona        - Remove a persona from a wallet.
- * +  nzteCreatePersona        - Create a persona.
- *    nzteDestroyPersona       - Destroy a persona.
- *    nztiStoreTrustedIdentity - Store an identity with associated trust.
- *    nzteRetrieveTrustedIdentCopy - Retrieves a trusted identity from persona
- * +  nzteSetProtection        - Modify the protection set in a persona.
- * +  nzteGetProtection        - Get the protection set in a persona
- *    nztePriKey               - Get the Private Key (X509 Only)
- *    nzteMyCert               - Get the Certificate (X509 only)
- *    nzteX509CreatePersona    - Create a persona given an X509 Certificate.
- * +  nztiRemoveIdentity       - Remove an identity from a persona.
- *    nztiCreateIdentity       - Create an identity.
- *    nztiDuplicateIdentity    - Create a complete copy of an identity.
- *    nztiAbortIdentity        - Discard an unstored identity.
- *    nztidGetIdentityDesc     - Gets Identity Description from Identity.
- *    nztidFreeIdentityDesc    - Frees memory for Identity Desc object.
- *    nztSign                  - Generate an attached signature.
- * +  nztxSignExpansion        - Determine size of signature.
- *    nztVerify                - Verify an attached signature.               
- *    nztValidate              - Validate an identity.                       
- *    nztsd_SignDetached       - Generate a detached signature.
- * +  nztxsd_SignDetachedExpansion - Determine size of detached signature.
- *    nztved_VerifyDetached    - Verify a detached signature.                 
- * +  nztEncrypt               - Symmetric key encryption.   
- * +  nztxEncryptExpansion     - Determine the tdu length for encryption.
- * +  nztDecrypt               - Symmetric key decryption.                   
- * +  nztEnvelope              - Sign then encrypt data for recipient(s).    
- * +  nztDeEnvelope            - Reverse nztEnvelope.                        
- * +  nztKeyedHash             - Generate keyed hash.                        
- * +  nztxKeyedHashExpansion   - Determine size of TDU for keyed hash.
- *    nztHash                  - Generate hash.   
- * +  nztxHashExpansion        - Determine the size of the TDU for a hash.
- *    nztSeedRandom            - See the random number generator.
- *    nztrb_RandomBytes        - Generate a series of random bytes.          
- *    nztrn_RandomNumber       - Generate a random number.                   
- *    nztbbInitBlock           - Initialize a buffer block.                  
- *    nztbbReuseBlock          - Reuse a buffer block.           
- *    nztbbSizeBlock           - Find the size of the buffer block.
- *    nztbbGrowBlock           - Grow initialized buffer block by 'inc' bytes.
- *    nztbbPurgeBlock          - Purge the memory used within a buffer block.
- *    nztbbSetBlock            - Set block to known state.
- *    nztkec_PKEncrypt         - Encrypt data then encrypt key for recipient.
- *    nztkdc_PKDecrypt         - Decrypt PKEncrypt'ed data.                  
- *    nztific_FreeIdentityContent - Free the contents of an identity.
- *    nztifdn                  - Create an identity from a distinguished name
- *    nztcts_CipherSpecToStr   - Converts the Cipher Spec Code To String
- *    nztiae_IsAuthEnabled     - Checks to see if Authentication is Enabled
- *                               in the current Cipher Spec.
- *    nztiae_IsEncrEnabled     - Checks to see if Encryption is Enabled
- *                               in the current Cipher Spec.
- *    nztiae_IsHashEnabled     - Checks to see if Hashing is Enabled
- *                               in the current Cipher Spec.
- *    nztwGetCertInfo          - Get peer certificate info
- *
- * NOTE: the '+' indicates that these functions are UNSUPPORTED at this time.
- * 
- * NOTES
- *    
- * MODIFIED
- *    srtata     11/10/03 - fix nztSetAppDefaultLocation header 
- *    rchahal    10/15/03 - bug 2513821 
- *    rchahal    11/11/02 - pkcs11 support
- *    akoyfman   07/05/02 - adding secret store to persona
- *    supriya    10/11/01 - Fix for bug # 2015732
- *    ajacobs    04/04/01 - make NZT_REGISTRY_WRL always available
- *    ajacobs    03/06/01 - olint fix
- *    ajacobs    03/02/01 - Add GetCertInfo
- *    supriya    02/23/01 - Move nzttKPUsage from nzt0.h
- *    rchahal    01/26/01 - olint fixes
- *    supriya    12/07/00 - Change fn name
- *    supriya    12/01/00 - Certificate API's needed for iAS
- *    supriya    06/19/00 - Adding definitions for MCS and ENTR
- *    lkethana   05/31/00 - multiple cert support
- *    skanjila   06/25/99 - Remove nztcts_CipherSpecToStr() to NZOS.
- *    skanjila   06/23/99 - Change API of nztcts_CipherSpecToStr.
- *    lkethana   06/18/99 - rem nztIPrivateAlloc, etc
- *    lkethana   06/10/99 - changing size_t to ub4
- *    lkethana   06/02/99 - add api for getting auth/encry/hash capability of c
- *    arswamin   12/28/98 - add NZT_MAX_MD5.
- *    arswamin   12/21/98 - change signature of compareDN
- *    qdinh      12/21/98 - change size_t to ub4.
- *    inetwork   11/22/98 - Removing NZDEPRECATED definition
- *    amthakur   09/14/98 - deprecating and updating the c-structures.
- *    arswamin   09/24/98 - adding NZTTWRL_NULL for SSO support.
- *    amthakur   07/30/98 - changing the prototype of nztGetCertChain.
- *    qdinh      05/01/98 - add NZTTIDENTTYPE_INVALID_TYPE
- *    qdinh      04/17/98 - add NZTTWRL_ORACLE.
- *    ascott     10/08/97 - implement nztiStoreTrustedIdentity
- *    ascott     10/07/97 - add nztiGetIdentityDesc
- *    ascott     09/28/97 - clarify prototype comments and error codes
- *    ascott     09/05/97 - update identity: create, destroy, duplicate
- *    ascott     08/21/97 - add GetCert and GetPriKey
- *    ascott     08/07/97 - add other WRL settings
- *    asriniva   03/25/97 - Add ANSI prototypes
- *    rwessman   03/19/97 - Added prototypes for nztific_FreeIdentityContent()
- *    asriniva   03/11/97 - Fix olint errors
- *    sdange     02/28/97 - Removed inclusion of nz0decl.h
- *    sdange     02/18/97 - Moved nzt specific declarations from nz0decl.h
- *    asriniva   01/21/97 - Remove prototypes.
- *    asriniva   10/31/96 - Include oratypes.h
- *    asriniva   10/15/96 - Declare buffer block helper functions
- *    asriniva   10/08/96 - First pass at wallet open/close
- *    asriniva   10/04/96 - Add random number seed function
- *    asriniva   10/03/96 - Reorder parameters in nztbbSetBlock
- *    asriniva   10/03/96 - Keep editing.
- *    asriniva   10/03/96 - Continued edits.
- *    asriniva   10/02/96 - Continue editing.
- *    asriniva   09/26/96 -
- */
-   
-/* ENABLE check_long_lines */
-
-#ifndef NZT_ORACLE
-#define NZT_ORACLE
-
-#ifndef ORATYPES
-# include <oratypes.h>
-#endif /* ORATYPES */
-
-#ifndef NZERROR_ORACLE
-# include <nzerror.h>         /* NZ error type */
-#endif /* NZERROR_ORACLE */
-
-
-#define NZT_MAX_SHA1 20
-#define NZT_MAX_MD5  16
-
-/***************************************/
-/* PUBLIC CONSTANTS, MACROS, AND TYPES */
-/***************************************/
-
-/*
- * Wallet Resource Locator Type Strings
- *
- * WRL TYPE        PARAMETERS      BEHAVIOR
- * ========        ==========      =====================================
- * default:          <none>        Uses directory defined by the parameter
- *                                 SNZD_DEFAULT_FILE_DIRECTORY which in 
- *                                 unix is "$HOME/oracle/oss"
- * 
- * file:            file path      Find the Oracle wallet in this directory.
- *                                 example: file:<dir-path>
- * 
- * sqlnet:           <none>        In this case, the directory path will be 
- *                                 retrieved from the sqlnet.ora file under
- *                                 the oss.source.my_wallet parameter.
- *
- * mcs:              <none>        Microsoft WRL.
- *
- * entr:             dir path      Entrust WRL. eg: ENTR:<dir-path>   
- * 
- */
-/* Note that there is no NZT_NULL_WRL.  Instead look in snzd.h for DEFAULT_WRP
- * which is used in our new defaulting mechanism.  The NZT_DEFAULT_WRL
- * should be deprecated.
- */
-#define NZT_DEFAULT_WRL    ((text *)"default:")
-#define NZT_SQLNET_WRL     ((text *)"sqlnet:")
-#define NZT_FILE_WRL       ((text *)"file:")
-#define NZT_ENTR_WRL       ((text *)"entr:")
-#define NZT_MCS_WRL        ((text *)"mcs:")
-#define NZT_ORACLE_WRL	   ((text *)"oracle:")
-#define NZT_REGISTRY_WRL   ((text *)"reg:")
-          
-enum nzttwrl 
-{
-   NZTTWRL_DEFAULT = 1,    /* Default, use SNZD_DEFAULT_FILE_DIRECTORY */
-   NZTTWRL_SQLNET,         /* Use oss.source.my_wallet in sqlnet.ora file */
-   NZTTWRL_FILE,           /* Find the oracle wallet in this directory */
-   NZTTWRL_ENTR,           /* Find the entrust profile in this directory */
-   NZTTWRL_MCS,            /* WRL for Microsoft */
-   NZTTWRL_ORACLE,	   /* Get the wallet from OSS db */
-   NZTTWRL_NULL,           /* New SSO defaulting mechanism */
-   NZTTWRL_REGISTRY        /* Find the wallet in Windows Registry */
-};
-typedef enum nzttwrl nzttwrl;
-
-#ifndef NZ0DECL_ORACLE
-   /*
-    * With the elimination of nz0decl.h from public, we need this
-    * redundant typedef.
-    */
-   typedef struct nzctx nzctx;
-   typedef struct nzstrc nzstrc;
-   typedef struct nzosContext nzosContext;
-#endif /* NZ0DECL_ORACLE */
-
-/* Moved from nz0decl.h */
-
-typedef struct nzttIdentity nzttIdentity;
-typedef struct nzttIdentityPrivate nzttIdentityPrivate;
-typedef struct nzttPersona nzttPersona;
-typedef struct nzttPersonaPrivate nzttPersonaPrivate;
-typedef struct nzttWallet nzttWallet;
-typedef struct nzttWalletPrivate nzttWalletPrivate;
-typedef struct nzttWalletObj nzttWalletObj; /* For wallet object */
-typedef struct nzssEntry nzssEntry; /* For secretstore */
-typedef struct nzpkcs11_Info nzpkcs11_Info;
-
-/*
- * Crypto Engine State
- *
- * Once the crypto engine (CE) has been initialized for a particular
- * cipher, it is either at the initial state, or it is continuing to
- * use the cipher.  NZTCES_END is used to change the state back to
- * initialized and flush any remaining output.  NZTTCES_RESET can be
- * used to change the state back to initialized and throw away any
- * remaining output.
- */
-enum nzttces 
-{
-   NZTTCES_CONTINUE = 1,    /* Continue processing input */
-   NZTTCES_END,             /* End processing input */
-   NZTTCES_RESET            /* Reset processing and skip generating output */
-};
-typedef enum nzttces nzttces;
-
-/*
- * Crypto Engine Functions
- *
- * List of crypto engine categories; used to index into protection
- * vector.
- */
-enum nzttcef
-{
-   NZTTCEF_DETACHEDSIGNATURE = 1,   /* Signature, detached from content */
-   NZTTCEF_SIGNATURE,               /* Signature combined with content */
-   NZTTCEF_ENVELOPING,              /* Signature and encryption with content */
-   NZTTCEF_PKENCRYPTION,            /* Encryption for one or more recipients */
-   NZTTCEF_ENCRYPTION,              /* Symmetric encryption */
-   NZTTCEF_KEYEDHASH,               /* Keyed hash/checkusm */
-   NZTTCEF_HASH,                    /* Hash/checsum */
-   NZTTCEF_RANDOM,                  /* Random byte generation */
-
-   NZTTCEF_LAST                     /* Used for array size */
-};
-typedef enum nzttcef nzttcef;
-
-/*
- * State of the persona.
- */
-enum nzttState
-{
-   NZTTSTATE_EMPTY = 0,     /* is not in any state(senseless???) */
-   NZTTSTATE_REQUESTED,     /* cert-request */
-   NZTTSTATE_READY,         /* certificate */
-   NZTTSTATE_INVALID,         /* certificate */
-   NZTTSTATE_RENEWAL        /* renewal-requested */
-};
-typedef enum nzttState nzttState;
-
-/*
- * Cert-version types
- * 
- * This is used to quickly look-up the cert-type
- */
-enum nzttVersion
-{
-   NZTTVERSION_X509v1 = 1,        /* X.509v1 */
-   NZTTVERSION_X509v3,            /* X.509v3 */
-#ifdef NZDEPRECATED
-   NZTTVERSION_SYMMETRIC,         /* Symmetric */
-#endif
-   NZTTVERSION_INVALID_TYPE       /* For Initialization */
-};
-typedef enum nzttVersion nzttVersion;
-
-/*
- * Cipher Types
- *
- * List of all cryptographic algorithms, some of which may not be
- * available.
- */
-enum nzttCipherType 
-{
-   NZTTCIPHERTYPE_RSA = 1,          /* RSA public key */
-   NZTTCIPHERTYPE_DES,              /* DES */
-   NZTTCIPHERTYPE_RC4,              /* RC4 */
-   NZTTCIPHERTYPE_MD5DES,           /* DES encrypted MD5 with salt (PBE) */
-   NZTTCIPHERTYPE_MD5RC2,           /* RC2 encrypted MD5 with salt (PBE) */
-   NZTTCIPHERTYPE_MD5,              /* MD5 */
-   NZTTCIPHERTYPE_SHA               /* SHA */
-};
-typedef enum nzttCipherType nzttCipherType;
-
-/*
- * TDU Formats
- *
- * List of possible toolkit data unit (TDU) formats.  Depending on the
- * function and cipher used some may be not be available.
- */
-enum nztttdufmt
-{
-   NZTTTDUFMT_PKCS7 = 1,            /* PKCS7 format */
-   NZTTTDUFMT_RSAPAD,               /* RSA padded format */
-   NZTTTDUFMT_ORACLEv1,             /* Oracle v1 format */
-   NZTTTDUFMT_LAST                  /* Used for array size */
-};
-typedef enum nztttdufmt nztttdufmt;
-
-/*
- * Validate State
- *
- * Possible validation states an identity can be in.
- */
-enum nzttValState
-{
-   NZTTVALSTATE_NONE = 1,        /* Needs to be validated */
-   NZTTVALSTATE_GOOD,            /* Validated */
-   NZTTVALSTATE_REVOKED          /* Failed to validate */
-};
-typedef enum nzttValState nzttValState;
-
-/*
- * Policy Fields <----NEW (09/14/98)
- *
- * Policies enforced
- */
-enum nzttPolicy
-{
-   NZTTPOLICY_NONE = 0,
-   NZTTPOLICY_RETRY_1, /* number of retries for decryption = 1 */
-   NZTTPOLICY_RETRY_2, /* number of retries for decryption = 2 */
-   NZTTPOLICY_RETRY_3  /* number of retries for decryption = 3 */
-};
-typedef enum nzttPolicy nzttPolicy;
-
-/*
- * Persona Usage <----NEW (09/14/98)
- *
- * what a persona will be used for?
- */
-
-#ifdef NZDEPRECATED_MULTIPLECERTS
-enum nzttUsage
-{
-   NZTTUSAGE_NONE = 0,
-   NZTTUSAGE_SSL  /* persona for SSL usage */
-};
-typedef enum nzttUsage nzttUsage;
-#endif
-
-/*
- * Personas and identities have unique id's that are represented with
- * 128 bits.
- */
-typedef ub1 nzttID[16];
-
-/*
- * Identity Types
- *
- * List of all Identity types..
- */
-enum nzttIdentType 
-{
-   NZTTIDENTITYTYPE_INVALID_TYPE = 0,  
-   NZTTIDENTITYTYPE_CERTIFICTAE,      
-   NZTTIDENTITYTYPE_CERT_REQ,      
-   NZTTIDENTITYTYPE_RENEW_CERT_REQ,      
-   NZTTIDENTITYTYPE_CLEAR_ETP,      
-   NZTTIDENTITYTYPE_CLEAR_UTP,      
-   NZTTIDENTITYTYPE_CLEAR_PTP       
-};
-typedef enum nzttIdentType nzttIdentType;
-
-typedef ub4 nzttKPUsage;
-/* IF new types are added nztiMUS should be changed */
-#define NZTTKPUSAGE_NONE 0
-#define NZTTKPUSAGE_SSL 1
-#define NZTTKPUSAGE_SMIME_ENCR 2
-#define NZTTKPUSAGE_SMIME_SIGN 4
-#define NZTTKPUSAGE_CODE_SIGN 8
-#define NZTTKPUSAGE_CERT_SIGN 16
-#define NZTTKPUSAGE_INVALID_USE 0xffff
-
-
-/*
- * Timestamp as 32 bit quantity in UTC.
- */
-typedef ub1 nzttTStamp[4];
-
-/*
- * Buffer Block
- *
- * A function that needs to fill (and possibly grow) an output buffer
- * uses an output parameter block to describe each buffer.
- *
- * The flags_nzttBufferBlock member tells the function whether the
- * buffer can be grown or not.  If flags_nzttBufferBlock is 0, then
- * the buffer will be realloc'ed automatically.  
- *
- * The buflen_nzttBufferBLock member is set to the length of the
- * buffer before the function is called and will be the length of the
- * buffer when the function is finished.  If buflen_nzttBufferBlock is
- * 0, then the initial pointer stored in pobj_nzttBufferBlock is
- * ignored.
- *
- * The objlen_nzttBufferBlock member is set to the length of the
- * object stored in the buffer when the function is finished.  If the
- * initial buffer had a non-0 length, then it is possible that the
- * object length is shorter than the buffer length.
- *
- * The pobj_nzttBufferBlock member is a pointer to the output object.
- */
-struct nzttBufferBlock
-{
-# define NZT_NO_AUTO_REALLOC     0x1
-
-   uword flags_nzttBufferBlock;     /* Flags */
-   ub4 buflen_nzttBufferBlock;   /* Total length of buffer */
-   ub4 usedlen_nzttBufferBlock;  /* Length of used buffer part */
-   ub1 *buffer_nzttBufferBlock;     /* Pointer to buffer */
-};
-typedef struct nzttBufferBlock nzttBufferBlock;
-
-/*
- * Wallet.
- */
-struct nzttWallet
-{
-   ub1 *ldapName_nzttWallet;              /* user's LDAP Name */
-   ub4  ldapNamelen_nzttWallet;           /* len of user's LDAP Name */
-   nzttPolicy securePolicy_nzttWallet;    /* secured-policy of the wallet */
-   nzttPolicy openPolicy_nzttWallet;      /* open-policy of the wallet */
-   nzttPersona *persona_nzttWallet;       /* List of personas in wallet */
-   nzttWalletPrivate *private_nzttWallet; /* Private wallet information */
-#ifdef NZDEPRECATED
-   ub4 npersona_nzttWallet;            /* Number of personas */
-#endif
-};
-
-/*
- * The wallet contains, one or more personas.  A persona always
- * contains its private key and its identity.  It may also contain
- * other 3rd party identites.  All identities qualified with trust
- * where the qualifier can indicate anything from untrusted to trusted
- * for specific operations.
- */
-
-/*
- * Persona
- *
- * Structure containing information about a persona.
- */
-struct nzttPersona
-{
-   ub1 *genericName_nzttPersona;              /* user-friendly persona name  */
-   ub4  genericNamelen_nzttPersona;           /* persona-name length */
-   nzttPersonaPrivate *private_nzttPersona;   /* Opaque part of persona */
-   nzttIdentity *mycertreqs_nzttPersona;      /* My cert-requests */
-   nzttIdentity *mycerts_nzttPersona;         /* My certificates */
-   nzttIdentity *mytps_nzttPersona;           /* List of trusted identities */
-   nzssEntry *mystore_nzttPersona;            /* List of secrets */
-   nzpkcs11_Info *mypkcs11Info_nzttPersona;   /* PKCS11 token info */
-   struct nzttPersona *next_nzttPersona;      /* Next persona */
-#ifdef NZDEPRECATED_MULTIPLECERTS
-  /* As Persona has multiple certs for different
-     usages, Persona Usage does not mean anything. Similarly
-     each key pair has its own state and Persona state itself
-     does not mean anything. - lk 5/31/00
-  */
-   nzttUsage usage_nzttPersona;               /* persona usage; SSL/SET/.. */
-   nzttState state_nzttPersona;               /* persona state-requested/ready */
-   ub4 ntps_nzttPersona;                   /* Num of trusted identities */
-#endif
-};
-
-/*
- * Identity
- *
- * Structure containing information about an identity.
- *
- * NOTE
- *  -- the next_trustpoint field only applies to trusted identities and
- *     has no meaning (i.e. is NULL) for self identities.
- */
-struct nzttIdentity
-{
-   text *dn_nzttIdentity;                      /* Alias */
-   ub4 dnlen_nzttIdentity;                  /* Length of alias */
-   text *comment_nzttIdentity;                 /* Comment  */
-   ub4 commentlen_nzttIdentity;             /* Length of comment */
-   nzttIdentityPrivate *private_nzttIdentity;  /* Opaque part of identity */
-   nzttIdentity *next_nzttIdentity;            /* next identity in list */
-};
-
-struct nzttB64Cert
-{
-   ub1 *b64Cert_nzttB64Cert;
-   ub4  b64Certlen_nzttB64Cert;
-   struct nzttB64Cert *next_nzttB64Cert;
-};
-typedef struct nzttB64Cert nzttB64Cert;
-
-
-struct nzttPKCS7ProtInfo
-{
-   nzttCipherType mictype_nzttPKCS7ProtInfo;    /* Hash cipher */
-   nzttCipherType symmtype_nzttPKCS7ProtInfo;   /* Symmetric cipher */
-   ub4 keylen_nzttPKCS7ProtInfo;             /* Length of key to use */
-};
-typedef struct nzttPKCS7ProtInfo nzttPKCS7ProtInfo;
-
-/*
- * Protection Information.
- *
- * Information specific to a type of protection.
- */
-union nzttProtInfo
-{
-   nzttPKCS7ProtInfo pkcs7_nzttProtInfo;
-};
-typedef union nzttProtInfo nzttProtInfo;
-
-/*
- * A description of a persona so that the toolkit can create one.  A
- * persona can be symmetric or asymmetric and both contain an
- * identity.  The identity for an asymmetric persona will be the
- * certificate and the identity for the symmetric persona will be
- * descriptive information about the persona.  In either case, an
- * identity will have been created before the persona is created.
- *
- * A persona can be stored separately from the wallet that references
- * it.  By default, a persona is stored with the wallet (it inherits
- * with WRL used to open the wallet).  If a WRL is specified, then it
- * is used to store the actuall persona and the wallet will have a
- * reference to it.
- */
-struct nzttPersonaDesc
-{
-   ub4 privlen_nzttPersonaDesc;        /* Length of private info (key)*/
-   ub1 *priv_nzttPersonaDesc;             /* Private information */
-   ub4 prllen_nzttPersonaDesc;         /* Length of PRL */
-   text *prl_nzttPersonaDesc;             /* PRL for storage */
-   ub4 aliaslen_nzttPersonaDesc;       /* Length of alias */
-   text *alias_nzttPersonaDesc;           /* Alias */
-   ub4 longlen_nzttPersonaDesc;        /* Length of longer description*/
-   text *long_nzttPersonaDesc;            /* Longer persona description */
-};
-typedef struct nzttPersonaDesc nzttPersonaDesc;
-
-/*
- * A description of an identity so that the toolkit can create one.
- * Since an identity can be symmetric or asymmetric, the asymmetric
- * identity information will not be used when a symmetric identity is
- * created.  This means the publen_nzttIdentityDesc and
- * pub_nzttIdentityDesc members will not be used when creating a
- * symmetric identity.
- */
-struct nzttIdentityDesc
-{
-   ub4 publen_nzttIdentityDesc;        /* Length of identity */
-   ub1 *pub_nzttIdentityDesc;             /* Type specific identity */
-   ub4 dnlen_nzttIdentityDesc;         /* Length of alias */
-   text *dn_nzttIdentityDesc;             /* Alias */
-   ub4 longlen_nzttIdentityDesc;       /* Length of longer description */
-   text *long_nzttIdentityDesc;           /* Longer description */
-   ub4 quallen_nzttIdentityDesc;       /* Length of trust qualifier */
-   text *trustqual_nzttIdentityDesc;      /* Trust qualifier */
-};
-typedef struct nzttIdentityDesc nzttIdentityDesc;
-
-/********************************/
-/* PUBLIC FUNCTION DECLARATIONS */
-/********************************/
-
-/*---------------------- nztwOpenWallet ----------------------*/
-
-/*
- * NAME
- *    nztwOpenWallet - Open a wallet based on a wallet Resource Locator (WRL).
- * 
- * PARAMETERS
- *    osscntxt {IN}     OSS context. 
- *    wrllen   {IN}     Length of WRL.
- *    wrl      {IN}     WRL.
- *    pwdlen   {IN}     Length of password.
- *    pwd      {IN}     Password.
- *    wallet   {IN/OUT} Initialized wallet structure.   
- * 
- * NOTES
- *    The syntax for a WRL is <Wallet Type>:<Wallet Type Parameters>.
- *
- *    Wallet Type       Wallet Type Parameters.
- *    -----------       ----------------------
- *    File              Pathname (e.g. "file:/home/asriniva")
- *    Oracle            Connect string (e.g. "oracle:scott/tiger at oss")
- *
- *    There are also defaults.  If the WRL is NZT_DEFAULT_WRL, then
- *    the platform specific WRL default is used.  If only the wallet
- *    type is specified, then the WRL type specific default is used
- *    (e.g. "oracle:")
- *
- *    There is an implication with Oracle that should be stated: An
- *    Oracle based wallet can be implemented in a user's private space
- *    or in world readable space.
- *
- *    When the wallet is opened, the password is verified by hashing
- *    it and comparing against the password hash stored with the
- *    wallet.  The list of personas (and their associated identities)
- *    is built and stored into the wallet structure.
- *    
- * RETURNS
- *    NZERROR_OK           Success.
- *    NZERROR_RIO_OPEN     RIO could not open wallet (see network trace file).
- *    NZERROR_TK_PASSWORD  Password verification failed.
- *    NZERROR_TK_WRLTYPE   WRL type is not known.
- *    NZERROR_TK_WRLPARM   WRL parm does not match type.
- */
-#ifdef __STDC__
-nzerror nztwOpenWallet(nzctx *, ub4, text *, ub4, text *, 
-                           nzttWallet *);
-#else
-nzerror nztwOpenWallet(/*_ nzctx *, ub4, text *, ub4, text *, 
-                           nzttWallet * _*/);
-#endif /* __STDC __*/
-
-
-/*---------------------- nztwCloseWallet ----------------------*/
-
-/*
- * NAME
- *    nztwCloseWallet - Close a wallet
- * 
- * PARAMETERS
- *    osscntxt {IN}     OSS context.
- *    wallet   {IN/OUT} Wallet.
- * 
- * NOTES
- *    Closing a wallet also closes all personas associated with that
- *    wallet.  It does not cause a persona to automatically be saved
- *    if it has changed.  The implication is that a persona can be
- *    modified by an application but if it is not explicitly saved it
- *    reverts back to what was in the wallet.
- *
- * RETURNS
- *    NZERROR_OK           Success.
- *    NZERROR_RIO_CLOSE    RIO could not close wallet (see network trace file).
- */
-#ifdef __STDC__
-nzerror nztwCloseWallet(nzctx *, nzttWallet *);
-#else
-nzerror nztwCloseWallet(/*_ nzctx *, nzttWallet * _*/);
-#endif /* __STDC__ */
-
-/*--------------------nztwGetCertInfo----------------------------*/
-/****NOTE: This function is a temporary hack.****/
-/****DO NOT CALL.  It will soon disappear.****/
-nzerror nztwGetCertInfo(/*_ nzctx *nz_context,
-                            nzosContext *nzosCtx,
-                            nzttWallet *walletRef,
-                            void *peerCert _*/);
-
-
-/*------------------------ nztwConstructWallet -----------------------*/
-/*
- * 
- * nzerror nztwConstructWallet( nzctx *oss_context, 	
- *				  nzttPolicy openPolicy,
- *				  nzttPolicy securePolicy,
- *				  ub1 *ldapName,
- *				  ub4 ldapNamelen,
- *				  nzstrc *wrl,
- *				  nzttPersona *personas,
- *				  nzttWallet **wallet );
- */
-
-/*---------------------- nztwRetrievePersonaCopy ----------------------*/
-
-/*
- * NAME
- *    nztwRetrievePersonaCopy - Retrieves a persona based from wallet
- * 
- * PARAMETERS
- *    osscntxt {IN}     OSS context. 
- *    wallet   {IN}     Wallet.
- *    index    {IN}     Which wallet index to remove (first persona is zero).
- *    persona  {OUT}    Persona found.
- * 
- * NOTES
- *    Retrieves a persona from the wallet based on the index number passed
- *    in.  This persona is a COPY of the one stored in the wallet, therefore
- *    it is perfectly fine for the wallet to be closed after this call is 
- *    made.
- *
- *    The caller is responsible for disposing of the persona when completed.
- *
- * RETURNS
- *    NZERROR_OK           Success.
- */
-#ifdef __STDC__
-nzerror nztwRetrievePersonaCopy(nzctx *, nzttWallet *, ub4, nzttPersona **);
-#else
-nzerror nztwRetrievePersonaCopy(/*_ nzctx *, nzttWallet *, ub4, 
-                           nzttPersona ** _*/);
-#endif /* __STDC __*/
-
-
-/*---------------------- nztwRetrievePersonaCopyByName ----------------------*/
-
-/*
- * NAME
- *    nztwRetrievePersonaCopyByName - Retrieves a persona based on its name.
- *
- * PARAMETERS
- *    osscntxt {IN}     OSS context.
- *    wallet   {IN}     Wallet.
- *    name    {IN}     Name of the persona 
- *    persona  {OUT}    Persona found.
- *
- * NOTES
- *    Retrieves a persona from the wallet based on the name of the persona. 
- *    This persona is a COPY of the one stored in the wallet, therefore
- *    it is perfectly fine for the wallet to be closed after this call is
- *    made.
- *
- *    The caller is responsible for disposing of the persona when completed.
- *
- * RETURNS
- *    NZERROR_OK           Success.
- */
-#ifdef __STDC__
-nzerror nztwRetrievePersonaCopyByName(nzctx *, nzttWallet *, 
-                                      char *, nzttPersona **);
-#else
-nzerror nztwRetrievePersonaCopyByName(/*_ nzctx *, nzttWallet *, char *,
-                           nzttPersona ** _*/);
-#endif /* __STDC __*/
-
-/*---------------------- nzteOpenPersona ----------------------*/
-
-/*
- * NAME
- *    nzteOpenPersona - Open a persona.
- * 
- * PARAMETERS
- *    osscntxt {IN}     OSS context. 
- *    persona  {IN/OUT} Persona.
- * 
- * NOTES
- *    
- * RETURNS
- *    NZERROR_OK           Success.
- *    NZERROR_TK_PASSWORD  Password failed to decrypt persona.
- *    NZERROR_TK_BADPRL    Persona resource locator did not work.
- *    NZERROR_RIO_OPEN     Could not open persona (see network trace file).
- */
-#ifdef __STDC__
-nzerror nzteOpenPersona(nzctx *, nzttPersona *);
-#else
-nzerror nzteOpenPersona(/*_ nzctx *, nzttPersona * _*/);
-#endif /* __STDC __*/
-
-/*--------------------- nzteClosePersona ---------------------*/
-
-/*
- * NAME
- *    nzteClosePersona - Close a persona.
- * 
- * PARAMETERS
- *    osscntxt {IN}     OSS context.
- *    persona  {IN/OUT} Persona.
- * 
- * NOTES
- *    Closing a persona does not store the persona, it simply releases
- *    the memory associated with the crypto engine.
- *    
- * RETURNS
- *    NZERROR_OK        Success.
- */
-#ifdef __STDC__
-nzerror nzteClosePersona(nzctx *, nzttPersona *);
-#else
-nzerror nzteClosePersona(/*_ nzctx *, nzttPersona * _*/);
-#endif /* __STDC __*/
-
-/*--------------------- nzteDestroyPersona ---------------------*/
-
-/*
- * NAME
- *    nzteDestroyPersona - Destroy a persona.
- * 
- * PARAMETERS
- *    osscntxt {IN}        OSS context.
- *    persona  {IN/OUT}    Persona.
- * 
- * NOTES
- *    The persona is destroyd in the open state, but it will
- *    not be associated with a wallet.
- *    
- *    The persona parameter is doubly indirect so that at the
- *    conclusion of the function, the pointer can be set to NULL.
- *
- *
- * RETURNS
- *    NZERROR_OK        Success.
- *    NZERROR_TK_TYPE   Unsupported itype/ctype combination.
- *    NZERROR_TK_PARMS  Error in persona description.
- */
-#ifdef __STDC__
-nzerror nzteDestroyPersona(nzctx *,  nzttPersona **);
-#else
-nzerror nzteDestroyPersona(/*_ nzctx *, nzttPersona ** _*/);
-#endif /* __STDC __*/
-
-/*---------------------- nzteRetrieveTrustedIdentCopy ----------------------*/
-
-/*
- * NAME
- *    nzteRetrieveTrustedIdentCopy - Retrieves a trusted identity from persona
- * 
- * PARAMETERS
- *    osscntxt {IN}     OSS context. 
- *    persona  {IN}     Persona.
- *    index    {IN}     Which wallet index to remove (first element is zero).
- *    identity {OUT}    Trusted Identity from this persona.
- * 
- * NOTES
- *    Retrieves a trusted identity from the persona based on the index 
- *    number passed in.  This identity is a COPY of the one stored in 
- *    the persona, therefore it is perfectly fine to close the persona
- *    after this call is made.
- *
- *    The caller is responsible for freeing the memory of this object 
- *    by calling nztiAbortIdentity it is no longer needed
- *
- * RETURNS
- *    NZERROR_OK           Success.
- */
-#ifdef __STDC__
-nzerror nzteRetrieveTrustedIdentCopy(nzctx *, nzttPersona *, ub4, 
-				     nzttIdentity **);
-#else
-nzerror nzteRetrieveTrustedIdentCopy(/*_ nzctx *, nzttPersona *, ub4, 
-                           nzttIdentity ** _*/);
-#endif /* __STDC __*/
-
-/*--------------------- nztePriKey ---------------------*/
-
-/*
- * NAME
- *    nztePriKey - Get the decrypted Private Key for the Persona
- * 
- * PARAMETERS
- *    osscntxt {IN}     OSS context.
- *    persona  {IN}     Persona.
- *    vkey     {OUT}    Private Key [B_KEY_OBJ]
- *    vkey_len {OUT}    Private Key Length
- * 
- * NOTES
- *    This funiction will only work for X.509 based persona which contain
- *    a private key.  
- *    A copy of the private key is returned to the caller so that they do not 
- *    have to worry about the key changeing "underneath them".
- *    Memory will be allocated for the vkey and therefore, the CALLER
- *    will be responsible for freeing this memory.
- *
- * RETURNS
- *    NZERROR_OK           Success.
- *    NZERROR_NO_MEMORY    ossctx is null.
- *    NZERROR_TK_BADPRL    Persona resource locator did not work.
- */
-#ifdef __STDC__
-nzerror nztePriKey(nzctx *, nzttPersona *, ub1 **, ub4 *);
-#else
-nzerror nztePriKey(/*_ nzctx *, nzttPersona *, ub1 **, ub4 * _*/);
-#endif /* __STDC __*/
-
-/*--------------------- nzteMyCert ---------------------*/
-
-/*
- * NAME
- *    nzteMyCert - Get the X.509 Certificate for a persona
- * 
- * PARAMETERS
- *    osscntxt {IN}     OSS context.
- *    persona  {IN}     Persona.
- *    cert     {OUT}    X.509 Certificate [BER encoded]
- *    cert_len {OUT}    Certificate length
- * 
- * NOTES
- *    This funiction will only work for X.509 based persona which contain
- *    a certificate for the self identity. 
- *    A copy of the certificate is returned to the caller so that they do not 
- *    have to worry about the certificate changeing "underneath them".
- *    Memory will be allocated for the cert and therefore, the CALLER
- *    will be responsible for freeing this memory.
- *
- * RETURNS
- *    NZERROR_OK           Success.
- *    NZERROR_NO_MEMORY    ossctx is null.
- */
-#ifdef __STDC__
-nzerror nzteMyCert(nzctx *, nzttPersona *, ub1 **, ub4 *);
-#else
-nzerror nzteMyCert(/*_ nzctx *, nzttPersona *, ub1 **, ub4 * _*/);
-#endif /* __STDC __*/
-
-/*--------------------- nzteX509CreatePersona ---------------------*/
-
-/*
- * NAME
- *    nzteX509CreatePersona - Given a BER X.509 cert, create a persona
- * 
- * PARAMETERS
- *    osscntxt {IN}     OSS context.
- *    cert     {IN}     X.509 Certificate [BER encoded]
- *    cert_len {IN}     Certificate length
- *    persona  {OUT}    Persona.
- * 
- * NOTES
- *    Memory will be allocated for the persona and therefore, the CALLER
- *    will be responsible for freeing this memory.
- *
- * RETURNS
- *    NZERROR_OK           Success.
- *    NZERROR_NO_MEMORY    ossctx is null.
- */
-#ifdef __STDC__
-nzerror nzteX509CreatePersona(nzctx *, ub1 *, ub4, nzttPersona **);
-#else
-nzerror nzteX509CreatePersona(/*_ nzctx *, ub1 *, ub4, nzttPersona ** _*/);
-#endif /* __STDC __*/
-
-/*-------------------- nztiCreateIdentity --------------------*/
-
-/*
- * NAME
- *    nztiCreateIdentity - Create an identity.
- * 
- * PARAMETERS
- *    osscntxt {IN}     OSS context.
- *    itype    {IN}     Identity type.
- *    desc     {IN}     Description of identity.
- *    identity {IN/OUT} Identity.
- * 
- * NOTES
- *    Memory is only allocated for the identity structure.  The elements in
- *    the description struct are not copied.  Rather their pointers are copied
- *    into the identity structure.  Therefore, the caller should not free
- *    the elements referenced by the desc.  These elements will be freed
- *    when the nztiDestroyIdentity is called.
- *    
- * RETURNS
- *    NZERROR_OK        Success.
- *    NZERROR_PARMS     Error in description.
- */
-#ifdef __STDC__
-nzerror nztiCreateIdentity(nzctx *, nzttVersion, nzttIdentityDesc *,
-                               nzttIdentity **);
-#else
-nzerror nztiCreateIdentity(/*_ nzctx *, nzttVersion, nzttIdentityDesc *,
-                               nzttIdentity ** _*/);
-#endif /* __STDC __*/
-
-#ifdef NZ_OLD_TOOLS
-/*-------------------- nztiDuplicateIdentity --------------------*/
-
-/*
- * NAME
- *    nztiDuplicateIdentity - Duplicate an identity.
- * 
- * PARAMETERS
- *    osscntxt     {IN}     OSS context.
- *    identity     {IN}     Target Identity.
- *    new_identity {IN}     New Identity.
- * 
- * NOTES
- *    Memory for the identity is allocated inside the function, and all
- *    internal identity elements as well.
- *    
- * RETURNS
- *    NZERROR_OK        Success.
- *    NZERROR_TK_NOTFOUND  Identity not found.
- *    NZERROR_PARMS     Error in description.
- */
-#ifdef __STDC__
-nzerror nztiDuplicateIdentity(nzctx *, nzttIdentity *, 
-                              nzttIdentity **);
-#else
-nzerror nztiDuplicateIdentity(/*_ nzctx *, nzttIdentity *, 
-                              nzttIdentity ** _*/);
-#endif /* __STDC __*/
-#endif /* NZ_OLD_TOOLS */
-
-/*--------------------- nztiAbortIdentity ---------------------*/
-
-/*
- * NAME
- *    nztiAbortIdentity - Abort an unassociated identity.
- * 
- * PARAMETERS
- *    osscntxt {IN}     OSS context.
- *    identity {IN/OUT} Identity.
- * 
- * NOTES
- *    It is an error to try to abort an identity that can be
- *    referenced through a persona.
- *    
- *    The identity pointer is set to NULL at the conclusion.
- * 
- * RETURNS
- *    NZERROR_OK           Success.
- *    NZERROR_CANTABORT    Identity is associated with persona.
- */
-#ifdef __STDC__
-nzerror nztiAbortIdentity(nzctx *, nzttIdentity **);
-#else
-nzerror nztiAbortIdentity(/*_ nzctx *, nzttIdentity ** _*/);
-#endif /* __STDC __*/
-
-#ifdef NZ_OLD_TOOLS
-/*----------------- nztidGetIdentityDesc -----------------*/
-
-/*
- * NAME
- *    nztidGetIdentityDesc - Gets an Identity Description from the identity
- * 
- * PARAMETERS
- *    osscntxt    {IN}     Success.
- *    identity    {IN}     Identity.
- *    description {IN/OUT} Identity Description.
- * 
- * NOTES
- *    Memory is allocated for the Identity Description. It
- *    is the callers responsibility to free this memory by calling 
- *    nztiFreeIdentityDesc.
- *
- * RETURNS
- *    NZERROR_OK     Success.
- */
-#ifdef __STDC__
-nzerror nztidGetIdentityDesc(nzctx *, nzttIdentity *, 
-                             nzttIdentityDesc **);
-#else
-nzerror nztidGetIdentityDesc(/*_ nzctx *, nzttIdentity *,
-                                     nzttIdentityDesc ** _*/);
-#endif /* __STDC __*/
-
-/*----------------- nztidFreeIdentityDesc -----------------*/
-
-/*
- * NAME
- *    nztidFreeIdentityDesc - Frees memory for Identity Desc object.
- * 
- * PARAMETERS
- *    osscntxt    {IN}     oss context.
- *    description {IN/OUT} Identity Description.
- * 
- * NOTES
- *    Memory is freed for all Identity description elements.  Pointer is 
- *    then set to null.
- *
- * RETURNS
- *    NZERROR_OK     Success.
- */
-#ifdef __STDC__
-nzerror nztidFreeIdentityDesc(nzctx *, nzttIdentityDesc **);
-#else
-nzerror nztidFreeIdentityDesc(/*_ nzctx *, nzttIdentityDesc ** _*/);
-#endif /* __STDC __*/
-#endif /* NZ_OLD_TOOLS */
-
-/*---------------- nztific_FreeIdentityContent ----------------*/
-
-/*
- * NAME
- *     nztific_FreeIdentityContent - free the contents of an identity.
- * 
- * PARAMETERS
- *    osscntxt         {IN}     OSS context.
- *    identity         {IN/OUT} freed identity
- * 
- * NOTES
- *    Free a created identity.
- *
- * RETURNS
- *    NZERROR_OK     Success.
- */
-/*
- * Free the identity content.
- */
-#ifdef __STDC__
-nzerror nztific_FreeIdentityContent(nzctx *ossctx,
-                                        nzttIdentity *identity);
-#else
-nzerror nztific_FreeIdentityContent(/*_ nzctx *ossctx,
-                                        nzttIdentity *identity _*/);
-#endif /* __STDC __*/
-
-
-/*-------------------------- nztSign --------------------------*/
-
-/*
- * NAME
- *    nztSign - Create an attached signature.
- * 
- * PARAMETERS
- *    osscntxt {IN}     OSS context.
- *    persona  {IN}     Open persona acting as signer.
- *    state    {IN}     State of signature.
- *    inlen    {IN}     Length of this input part.
- *    in       {IN}     This input part.
- *    tdubuf   {IN/OUT} TDU buffer.
- * 
- * NOTES
- *    
- * RETURNS
- *    NZERROR_OK           Success.
- *    NZERROR_TK_CANTGROW  Needed to grow output buffer but could not.
- *    NZERROR_TK_NOTOPEN   Persona is not open.
- *    NZERROR_TK_NOTSUPP   Function not supported with persona.
- */
-#ifdef __STDC__
-nzerror nztSign(nzctx *, nzttPersona *, nzttces, ub4, ub1 *,
-                    nzttBufferBlock *);
-#else
-nzerror nztSign(/*_ nzctx *, nzttPersona *, nzttces, ub4, ub1 *,
-                    nzttBufferBlock * _*/);
-#endif /* __STDC __*/
-
-/*------------------------- nztVerify -------------------------*/
-
-/*
- * NAME
- *    nztVerify - Verify an attached signature.
- * 
- * PARAMETERS
- *    osscntxt {IN}     OSS context.
- *    persona  {IN}     Persona.
- *    state    {IN}     State of verification.
- *    intdulen {IN}     TDU length.
- *    intdu    {IN}     TDU.
- *    out      {IN/OUT} Extracted message.
- *    verified {OUT}    TRUE if signature verified.
- *    validated{OUT}    TRUE if signing identity validated.
- *    identity {OUT} Identity of signing party.
- * 
- * NOTES
- *    
- * RETURNS
- *    NZERROR_OK           Success.
- *    NZERROR_TK_CANTGROW  Needed to grow outptu buffer but could not.
- *    NZERROR_TK_NOTOPEN   Persona is not open.
- *    NZERROR_TK_NOTSUPP   Function not supported with persona.
- */
-#ifdef __STDC__
-nzerror nztVerify(nzctx *, nzttPersona *, nzttces, ub4, ub1 *,
-                      nzttBufferBlock *, boolean *, boolean *,
-                      nzttIdentity **);
-#else
-nzerror nztVerify(/*_ nzctx *, nzttPersona *, nzttces, ub4, ub1 *,
-                      nzttBufferBlock *, boolean *, boolean *,
-                      nzttIdentity ** _*/);
-#endif /* __STDC __*/
-
-/*------------------------ nztValidate ------------------------*/
-
-/*
- * NAME
- *    nztValidate - Validate an identity.
- * 
- * PARAMETERS
- *    osscntxt {IN}  OSS context.
- *    persona  {IN}  Persona.
- *    identity {IN}  Identity.
- *    validated{OUT} TRUE if identity was validated.  
- * 
- * NOTES
- *    
- * RETURNS
- *    NZERROR_OK           Success.
- *    NZERROR_TK_NOTOPEN   Persona is not open.
- *    NZERROR_TK_NOTSUPP   Function not supported with persona.
- */
-#ifdef __STDC__
-nzerror nztValidate(nzctx *, nzttPersona *, nzttIdentity *, boolean *);
-#else
-nzerror nztValidate(/*_ nzctx *, nzttPersona *, nzttIdentity *, boolean * _*/);
-#endif /* __STDC __*/
-
-/*-------------------- nztsd_SignDetached --------------------*/
-
-/*
- * NAME
- *    nztsd_SignDetached - Generate a detached signature.
- * 
- * PARAMETERS
- *    osscntxt {IN}     OSS context.
- *    persona  {IN}     Persona.
- *    state    {IN}     State of signature.
- *    inlen    {IN}     Length of this input part.
- *    in       {IN}     This input part.
- *    tdubuf   {IN/OUT} TDU buffer.
- * 
- * NOTES
- *    
- * RETURNS
- *    NZERROR_OK           Success.
- *    NZERROR_TK_CANTGROW  Needed to grow output buffer but could not.
- *    NZERROR_TK_NOTOPEN   Persona is not open.
- *    NZERROR_TK_NOTSUPP   Function not supported with persona.
- */
-#ifdef __STDC__
-nzerror nztsd_SignDetached(nzctx *, nzttPersona *, nzttces, ub4, ub1 *, 
-                               nzttBufferBlock *);
-#else
-nzerror nztsd_SignDetached(/*_ nzctx *, nzttPersona *, nzttces, ub4, ub1 *, 
-                               nzttBufferBlock * _*/);
-#endif /* __STDC __*/
-
-/*------------------- nztved_VerifyDetached -------------------*/
-
-/*
- * NAME
- *    nztved_VerifyDetached - Verify a detached signature.
- * 
- * PARAMETERS
- *    osscntxt {IN}     OSS context.
- *    persona  {IN}     Persona.
- *    state    {IN}     State of verification.
- *    inlen    {IN}     Length of data.
- *    in       {IN}     Data.
- *    intdulen {IN}     Input TDU length.
- *    tdu      {IN}     Input TDU.
- *    verified {OUT}    TRUE if signature verified.
- *    validated{OUT}    TRUE if signing identity validated.
- *    identity {OUT} Identity of signing party.
- * 
- * NOTES
- *    
- * RETURNS
- *    NZERROR_OK           Success.
- *    NZERROR_TK_NOTOPEN   Persona is not open.
- *    NZERROR_TK_NOTSUPP   Function not supported with persona.
- */
-#ifdef __STDC__
-nzerror nztved_VerifyDetached(nzctx *, nzttPersona *, nzttces, ub4, 
-                                  ub1 *, ub4, ub1 *, boolean *, boolean *, 
-                                  nzttIdentity **);
-#else
-nzerror nztved_VerifyDetached(/*_ nzctx *, nzttPersona *, nzttces, ub4, 
-                                  ub1 *, ub4, ub1 *, boolean *, boolean *, 
-                                  nzttIdentity ** _*/);
-#endif /* __STDC __*/
-
-/*--------------------- nztkec_PKEncrypt ---------------------*/
-
-/*
- * NAME
- *    nztkec_PKEncrypt - Encrypt data symmetrically, encrypt key asymmetrically
- * 
- * PARAMETERS
- *    osscntxt    {IN}     OSS context.
- *    persona     {IN}     Persona.
- *    nrecipients {IN}     Number of recipients for this encryption.
- *    recipients  {IN}     List of recipients.
- *    state       {IN}     State of encryption.
- *    inlen       {IN}     Length of this input part.
- *    in          {IN}     This input part.
- *    tdubuf      {IN/OUT} TDU buffer.
- * 
- * NOTES
- *    There is a limitation of 1 recipient (nrecipients = 1) at this
- *    time.
- *    
- * RETURNS
- *    NZERROR_OK           Success.
- *    NZERROR_TK_CANTGROW  Needed to grow output buffer but could not.
- *    NZERROR_TK_NOTOPEN   Persona is not open.
- *    NZERROR_TK_NOTSUPP   Function not supported with persona.
- */
-#ifdef __STDC__
-nzerror nztkec_PKEncrypt(nzctx *, nzttPersona *, ub4, nzttIdentity *, 
-                             nzttces, ub4, ub1 *, nzttBufferBlock *);
-#else
-nzerror nztkec_PKEncrypt(/*_ nzctx *, nzttPersona *, ub4, nzttIdentity *, 
-                             nzttces, ub4, ub1 *, nzttBufferBlock * _*/);
-#endif /* __STDC __*/
-
-/*---------------- nztxkec_PKEncryptExpansion ----------------*/
-
-/*
- * NAME
- *    nztxkec_PKEncryptExpansion - Determine the buffer needed for PKEncrypt
- * 
- * PARAMETERS
- *    osscntxt    {IN}     OSS context. 
- *    persona     {IN}     Persona.
- *    nrecipients {IN}     Number of recipients.
- *    inlen       {IN}     Length of input.
- *    tdulen      {out}    Length of buffer need.
- * 
- * NOTES
- *    
- * RETURNS
- *    NZERROR_OK           Success.
- *    NZERROR_TK_NOTOPEN   Persona is not open.
- *    NZERROR_TK_NOTSUPP   Function not supported with persona.
- */
-#ifdef __STDC__
-nzerror nztxkec_PKEncryptExpansion(nzctx *, nzttPersona *, ub4, ub4,
-                                       ub4 *);
-#else
-nzerror nztxkec_PKEncryptExpansion(/*_ nzctx *, nzttPersona *, ub4, ub4,
-                                       ub4 * _*/);
-#endif /* __STDC __*/
-
-/*--------------------- nztkdc_PKDecrypt ---------------------*/
-
-/*
- * NAME
- *    nztkdc_PKDecrypt - Decrypt a PKEncrypted message.
- * 
- * PARAMETERS
- *    osscntxt    {IN}     OSS context.
- *    persona     {IN}     Persona.
- *    state       {IN}     State of encryption.
- *    inlen       {IN}     Length of this input part.
- *    in          {IN}     This input part.
- *    tdubuf      {IN/OUT} TDU buffer.
- * 
- * NOTES
- *    
- * RETURNS
- *    NZERROR_OK           Success.
- *    NZERROR_TK_CANTGROW  Needed to grow output buffer but could not.
- *    NZERROR_TK_NOTOPEN   Persona is not open.
- *    NZERROR_TK_NOTSUPP   Function not supported with persona.
- */
-#ifdef __STDC__
-nzerror nztkdc_PKDecrypt(nzctx *, nzttPersona *, nzttces, ub4, ub1 *,
-                             nzttBufferBlock *);
-#else
-nzerror nztkdc_PKDecrypt(/*_ nzctx *, nzttPersona *, nzttces, ub4, ub1 *,
-                             nzttBufferBlock * _*/);
-#endif /* __STDC __*/
-
-/*-------------------------- nztHash --------------------------*/
-
-/*
- * NAME
- *    nztHash - Generate a hash.
- * 
- * PARAMETERS
- *    osscntxt {IN}     OSS context.
- *    persona  {IN}     Persona.
- *    state    {IN}     State of hash.
- *    inlen    {IN}     Length of this input.
- *    in       {IN}     This input.
- *    tdu      {IN/OUT} Output tdu.
- * 
- * NOTES
- *    
- * RETURNS
- *    NZERROR_OK           Success.
- *    NZERROR_TK_CANTGROW  Needed to grow TDU buffer but could not.
- *    NZERROR_TK_NOTOPEN   Persona is not open.
- *    NZERROR_TK_NOTSUPP   Function not supported with persona.
- */
-#ifdef __STDC__
-nzerror nztHash(nzctx *, nzttPersona *, nzttces, ub4, ub1 *,
-                    nzttBufferBlock *);
-#else
-nzerror nztHash(/*_ nzctx *, nzttPersona *, nzttces, ub4, ub1 *,
-                    nzttBufferBlock * _*/);
-#endif /* __STDC __*/
-
-/*----------------------- nztSeedRandom -----------------------*/
-
-/*
- * NAME
- *    nztSeedRandom - Seed the random function
- * 
- * PARAMETERS
- *    osscntxt {IN}  OSS context.
- *    persona  {IN}  Persona.
- *    seedlen  {IN}  Length of seed.
- *    seed     {IN}  Seed.
- * 
- * NOTES
- *    
- * RETURNS
- *    NZERROR_OK           Success.
- *    NZERROR_TK_NOTOPEN   Persona is not open.
- *    NZERROR_TK_NOTSUPP   Function not supported with persona.
- */
-#ifdef __STDC__
-nzerror nztSeedRandom(nzctx *, nzttPersona *, ub4, ub1 *);
-#else
-nzerror nztSeedRandom(/*_ nzctx *, nzttPersona *, ub4, ub1 * _*/);
-#endif /* __STDC __*/
-
-/*--------------------- nztrb_RandomBytes ---------------------*/
-
-/*
- * NAME
- *    nztrb_RandomBytes - Generate a buffer random bytes.
- * 
- * PARAMETERS
- *    osscntxt {IN}     OSS context.
- *    persona  {IN}     Persona.
- *    nbytes   {IN}     Number of bytes desired.
- *    out      {IN/OUT} Buffer block for bytes.
- * 
- * NOTES
- *    
- * RETURNS
- *    NZERROR_OK           Success.
- *    NZERROR_TK_CANTGROW  Needed to grow TDU buffer but could not.
- *    NZERROR_TK_NOTOPEN   Persona is not open.
- *    NZERROR_TK_NOTSUPP   Function not supported with persona.
- */
-#ifdef __STDC__
-nzerror nztrb_RandomBytes(nzctx *, nzttPersona *, ub4, 
-                              nzttBufferBlock *);
-#else
-nzerror nztrb_RandomBytes(/*_ nzctx *, nzttPersona *, ub4, 
-                              nzttBufferBlock * _*/);
-#endif /* __STDC __*/
-
-/*-------------------- nztrn_RandomNumber --------------------*/
-
-/*
- * NAME
- *    nztrn_RandomNumber - Generate a random number
- * 
- * PARAMETERS
- *    osscntxt {IN}     OSS context.
- *    persona  {IN}     Persona.
- *    num      {OUT}    Number.
- * 
- * NOTES
- *    
- * RETURNS
- *    NZERROR_OK           Success.
- *    NZERROR_TK_NOTOPEN   Persona is not open.
- *    NZERROR_TK_NOTSUPP   Function not supported with persona.
- */
-#ifdef __STDC__
-nzerror nztrn_RandomNumber(nzctx *, nzttPersona *, uword *);
-#else
-nzerror nztrn_RandomNumber(/*_ nzctx *, nzttPersona *, uword * _*/);
-#endif /* __STDC __*/
-
-/*---------------------- nztbbInitBlock ----------------------*/
-
-/*
- * NAME
- *    nztbbInitBlock - Initialize a buffer block.
- * 
- * PARAMETERS
- *    osscntxt {IN}     OSS context.
- *    block    {IN/OUT} Buffer block.
- * 
- * NOTES
- *    The buffer block is initialized to be empty (all members are set
- *    to 0/NULL).  Such a block will be allocated memory as needed.
- *    
- * RETURNS
- *    NZERROR_OK        Success.
- */
-#ifdef __STDC__
-nzerror nztbbInitBlock(nzctx *, nzttBufferBlock *);
-#else
-nzerror nztbbInitBlock(/*_ nzctx *, nzttBufferBlock * _*/);
-#endif /* __STDC __*/
-
-/*---------------------- nztbbReuseBlock ----------------------*/
-
-/*
- * NAME
- *    nztbbReuseBlock - Reuse an already initialized and possibly used block.
- * 
- * PARAMETERS
- *    osscntxt {IN}     OSS context.
- *    block    {IN/OUT} Buffer block.
- * 
- * NOTES
- *    This function simply sets the used length member of the buffer
- *    block to 0.  If the block already has memory allocated to it,
- *    this will cause it to be reused.
- *    
- * RETURNS
- *    NZERROR_OK        Success.
- */
-#ifdef __STDC__
-nzerror nztbbReuseBlock(nzctx *, nzttBufferBlock *);
-#else
-nzerror nztbbReuseBlock(/*_ nzctx *, nzttBufferBlock * _*/);
-#endif /* __STDC __*/
-
-/*---------------------- nztbbSizeBlock ----------------------*/
-
-/*
- * NAME
- *    nztbbSizeBlock - Size an initialized block to a particular size.
- * 
- * PARAMETERS
- *    osscntxt {IN}     OSS context.
- *    len      {IN}     Minimum number of unused bytes desired.
- *    block    {IN/OUT} Buffer block.
- *
- * NOTES
- *    
- * RETURNS
- *    NZERROR_OK        Success.
- */
-#ifdef __STDC__
-nzerror nztbbSizeBlock(nzctx *, ub4, nzttBufferBlock *);
-#else
-nzerror nztbbSizeBlock(/*_ nzctx *, ub4, nzttBufferBlock * _*/);
-#endif /* __STDC __*/
-
-/*----------------------- nztbbGrowBlock -----------------------*/
-
-/*
- * NAME
- *    nzbbGrowBlock - Increase the size of the buffer block.
- * 
- * PARAMETERS
- *    osscntxt {IN}     OSS context.
- *    inc      {IN}     Number of bytes to increase.
- *    block    {IN/OUT} Buffer block.
- *
- * NOTES
- *    
- * RETURNS
- *    NZERROR_OK        Success.
- */
-#ifdef __STDC__
-nzerror nztbbGrowBlock(nzctx *, ub4, nzttBufferBlock *);
-#else
-nzerror nztbbGrowBlock(/*_ nzctx *, ub4, nzttBufferBlock * _*/);
-#endif /* __STDC __*/
-
-/*---------------------- nztbbPurgeBlock ----------------------*/
-
-/*
- * NAME
- *    nztbbPurgeBlock - Purge a buffer block of its memory.
- * 
- * PARAMETERS
- *    osscntxt {IN}     OSS context.
- *    block    {IN/OUT} Buffer block.
- * 
- * NOTES
- *    The memory used by the buffer block as the buffer is released.
- *    The buffer block itself is not affected.
- *    
- * RETURNS
- *    NZERROR_OK        Success.
- */
-#ifdef __STDC__
-nzerror nztbbPurgeBlock(nzctx *, nzttBufferBlock *);
-#else
-nzerror nztbbPurgeBlock(/*_ nzctx *, nzttBufferBlock * _*/);
-#endif /* __STDC __*/
-
-/*----------------------- nztbbSetBlock -----------------------*/
-
-/*
- * NAME
- *    nztbbSetBlock - Set a buffer block to a known state.
- * 
- * PARAMETERS
- *    osscntxt {IN}     OSS context.
- *    flags    {IN}     Flags to set.
- *    buflen   {IN}     Length of buffer.
- *    usedlen  {IN}     Used length.
- *    buffer   {IN}     Buffer.
- *    block    {IN/OUT} Buffer block
- * 
- * NOTES
- *    If buflen > 0, objlen == 0, and obj == NULL, then buflen bytes
- *    of memory is allocated and a pointer is stored in the buffer
- *    block.
- *
- *    The buffer parameter remains unchanged.
- *    
- * RETURNS
- *    NZERROR_OK        Success.
- */
-#ifdef __STDC__
-nzerror nztbbSetBlock(nzctx *,  uword, ub4, ub4, ub1 *, 
-                          nzttBufferBlock *);
-#else
-nzerror nztbbSetBlock(/*_ nzctx *,  uword, ub4, ub4, ub1 *, 
-                          nzttBufferBlock * _*/);
-#endif /* __STDC __*/
-
-
-/*--------------------- nztiGetSecInfo ---------------------*/
-
-/*
- * NAME
- * 	nztiGetSecInfo - Get some security information for SSL
- * 
- * PARAMETERS
- * 	Name	{IN/OUT}	Description
- *    	osscntxt {IN}     	OSS context.
- *    	persona  {IN}		persona
- *    	dname    {OUT}    	distinguished name of the certificate
- *    	dnamelen {OUT}    	length of the distinguished name 
- *    	issuername {OUT}  	issuer name of the certificate
- *    	certhash {OUT}		SHA1 hash of the certificate
- *	certhashlen{OUT}	length of the hash
- * NOTES
- * 	This function allocate memories for issuername, certhash, and dname.
- *	To deallocate memory for those params, you should call nztdbuf_DestroyBuf.
- * RETURNS
- * 	
- */
-#ifdef __STDC__
-nzerror nztiGetSecInfo(nzctx *, nzttPersona *, text **, ub4 *,
-			 text **, ub4 *, ub1 **, ub4 *);
-#else
-nzerror nztiGetSecInfo(/*_ nzctx *, nzttPersona *, text **, ub4 *,
-			   text **, ub4 *, ub1 **, ub4 * _*/);
-#endif	/* __STDC__ */
-
-
-/*---------------------- nztiGetDName ----------------------*/
-
-/*
- * NAME
- * 	nztiGetDName - Get the distinguished name for the given identity
- * 
- * PARAMETERS
- * 	Name	{IN/OUT}	Description
- *    	osscntxt {IN}     	OSS context.
- *	identity {IN}		identity need to get dname from
- *	dn	{OUT}		distinguished name
- *	dnlen	{OUT}		length of the dname
- *
- * NOTES
- * 	
- * RETURNS
- * 	
- */
-
-#ifdef __STDC__
-nzerror nztiGetDName(nzctx *, nzttIdentity *,
-		     text **, ub4 *);
-#else
-nzerror nztiGetDName(/*_ nzctx *, nzttIdentity *,
-			     text **, ub4 * _*/);
-#endif /* __STDC__ */
-
-/*------------------- nztiGetIssuerName -------------------*/
-
-/*
- * NAME
- * 	nztiGetIssuerName -  Get IssuerName for the given identity 
- * 
- * PARAMETERS
- * 	Name	{IN/OUT}	Description
- *    	osscntxt {IN}     	OSS context.
- *	identity {IN}		identity need to get issuername from
- *	issuername {OUT}       	issuer's name
- *	issuernamelen {OUT}	length of the issuer's name
- * 
- * NOTES
- * 	
- * RETURNS
- * 	
- */
-#ifdef __STDC__
-nzerror nztiGetIssuerName(nzctx *, nzttIdentity *,
-			     text **, ub4 *);
-#else
-nzerror nztiGetIssuerName(/*_ nzctx *, nzttIdentity *,
-			      text **, ub4 * _*/);
-#endif /* __STDC__ */
-
-
-/*-------------------- nztgch_GetCertHash --------------------*/
-
-/*
- * NAME
- * 	nztgch_GetCertHash -  Get SHA1 hash for the certificate of the identity 
- * 
- * PARAMETERS
- * 	Name	{IN/OUT}	Description
- *    	osscntxt {IN}     	OSS context.
- *	identity {IN}		identity need to get issuername from
- *	certHash {OUT}          certHash buffer 
- *	hashLen {OUT}		length of the certHash 
- * 
- * NOTES
- * 	Need to call nztdbuf_DestroyBuf to deallocate memory for certHash.	
- * RETURNS
- * 	
- */
-#ifdef __STDC__
-nzerror nztgch_GetCertHash(nzctx *, nzttIdentity *,
-			     ub1 **, ub4 *);
-#else
-nzerror nztgch_GetCertHash(/*_ nzctx *, nzttIdentity *,
-			     ub1 **, ub4 * _*/);
-#endif /* __STDC__ */
-
-/*-------------------- nztdbuf_DestroyBuf --------------------*/
-
-/*
- * NAME
- * 	nztdbuf_DestroyBuf - Deallocation funtions for ub1 and text buffer 
- * 
- * PARAMETERS
- * 	Name	{IN/OUT}	Description
- *    	osscntxt {IN}     	OSS context.
- *	buf      {IN}		Allocated buffer to be destroyed.
- * 
- * NOTES
- * 	
- * RETURNS
- * 	
- */
-#ifdef __STDC__
-nzerror nztdbuf_DestroyBuf( nzctx *, dvoid **);
-#else
-nzerror nztdbuf_DestroyBuf(/*_ nzctx *, dvoid ** _*/);
-#endif /* __STDC__ */
-
-
-/*----------------------- nztGetCertChain -----------------------*/
-
-/*
- * NAME
- * 	nztGetCertChain - 
- * 
- * PARAMETERS
- * 	Name	{IN/OUT}	Description
- *    	osscntxt {IN}     	OSS context.
- * 
- * NOTES
- * 	
- * RETURNS
- * 	
- */
-#ifdef __STDC__
-nzerror nztGetCertChain(nzctx *, nzttWallet * );
-#else
-nzerror nztGetCertChain(/*_ nzctx *, nzttWallet _*/);
-#endif /* __STDC__ */
-
-/*----------------------- nztCompareDN -----------------------*/
-
-/*
- * NAME
- * 	nztCompareDN - 
- * 
- * PARAMETERS
- * 	Name	{IN/OUT}	Description
- *    	osscntxt {IN}     	OSS context.
- *	dn1	{IN}		distinguished name 1
- *	dn2     {IN}		distinguished name 2
- * 
- * NOTES
- * 	
- * RETURNS
- * 	NZERROR_OK	 	succeeded
- *	others			failed
- * 	
- */
-#ifdef __STDC__
-nzerror nztCompareDN(nzctx *, ub1 *, ub4,  ub1 *, ub4, boolean * );
-#else
-nzerror nztCompareDN(/*_ nzctx *, ub1 *,ub4 ,  ub1 *, ub4, boolean * _*/);
-#endif/* __STDC__ */
-
-
-#ifdef NZ_OLD_TOOLS
-/*--------------------- nztIdentityAlloc ---------------------*/
-
-/*
- * NAME
- * 	nztIdentityAlloc - Allocate memory for nzttIdentity context
- * 
- * PARAMETERS
- * 	Name	{IN/OUT}	Description
- *    	osscntxt {IN}     	OSS context.
- *	identity {OUT}		nzttIdentity context
- * 
- * NOTES
- * 	
- * RETURNS
- * 	NZERROR_OK	 	succeeded
- *	others			failed
- * 	
- */
-#ifdef __STDC__
-nzerror nztIdentityAlloc(nzctx *, nzttIdentity **);
-#else
-nzerror nztIdentityAlloc(/*_ nzctx *, nzttIdentity ** _*/);
-#endif/* __STDC__ */
-
-/*--------------------- nztIPrivateAlloc ---------------------*/
-
-/*
- * NAME
- * 	nztIPrivateAlloc - Allocate memory for nzttIdentityPrivate
- * 
- * PARAMETERS
- * 	Name	{IN/OUT}	Description
- * 
- *    	osscntxt {IN}     	OSS context.
- *	ipriv	{OUT}		identityPrivate structure
- * NOTES
- * 	
- * RETURNS
- * 	NZERROR_OK	 	succeeded
- *	others			failed
- * 	
- */
-
-#ifdef __STDC__
-nzerror nztIPrivateAlloc( nzctx *, nzttIdentityPrivate **);
-#else
-nzerror nztIPrivateAlloc( nzctx *, nzttIdentityPrivate **);
-#endif /* __STDC__ */
-
-
-/*---------------------- nztIDupContent ----------------------*/
-
-/*
- * NAME
- * 	nztIDupContent - 
- * 
- * PARAMETERS
- * 	Name	{IN/OUT}	Description
- *    	osscntxt {IN}     	OSS context.
- * 	targetIdentity{OUT}	target identity
- *	sourceIdentity {IN}	source identity
- * NOTES
- * 	
- * RETURNS
- * 	NZERROR_OK	 	succeeded
- *	others			failed
- * 	
- */
-
-#ifdef __STDC__
-nzerror nztIDupContent( nzctx *, nzttIdentity *, nzttIdentity *);
-#else
-nzerror nztIDupContent(/*_ nzctx *, nzttIdentity *, nzttIdentity * _*/);
-#endif
-/*---------------------- nztIPDuplicate ----------------------*/
-
-/*
- * NAME
- * 	nztIPDuplicate - 
- * 
- * PARAMETERS
- * 	Name	{IN/OUT}	Description
- *    	osscntxt {IN}     	OSS context.
- *	target_ipriv {OUT}	target identityPrivate
- *	source_ipriv {IN}	source identityPrivate
- * 
- * NOTES
- * 	
- * RETURNS
- * 	NZERROR_OK	 	succeeded
- *	others			failed
- * 	
- */
-#ifdef __STDC__
-nzerror nztIPDuplicate( nzctx *, nzttIdentityPrivate **,
-			nzttIdentityPrivate *);
-#else
-nzerror nztIPDuplicate(/*_ nzctx *, nzttIdentityPrivate **,
-			 nzttIdentityPrivate * _*/);
-#endif /* __STDC__ */
-
-/*--------------------- nztiDupIdentList ---------------------*/
-
-/*
- * NAME
- * 	nztiDupIdentList - 
- * 
- * PARAMETERS
- * 	Name	{IN/OUT}	Description
- *    	osscntxt {IN}     	OSS context.
- *	source_identities {IN}	source identity list
- *	numIdent {OUT}		number of identity in the list
- *	ppidentity {OUT}	Target of identity	
- *	
- * NOTES
- * 	
- * RETURNS
- * 	NZERROR_OK	 	succeeded
- *	others			failed
- * 	
- */
-#ifdef __STDC__
-nzerror nztiDupIdentList( nzctx *, nzttIdentity  *, ub4 *, 
-                          nzttIdentity **);
-#else
-
-nzerror nztiDupIdentList(/*_ nzctx *, nzttIdentity  *, ub4 *, 
-                             nzttIdentity ** _*/);
-#endif
-
-/*--------------------- nztFreeIdentList ---------------------*/
-
-/*
- * NAME
- * 	nztFreeIdentList - Free memory for a list of Identities
- * 
- * PARAMETERS
- * 	Name	{IN/OUT}	Description
- *    	osscntxt {IN}     	OSS context.
- *	identity {IN}		identity context
- *
- * NOTES
- * 	
- * RETURNS
- * 	NZERROR_OK	 	succeeded
- *	others			failed
- * 	
- */
-#ifdef __STDC__
-nzerror nztFreeIdentList( nzctx *, nzttIdentity **);
-#else
-nzerror nztFreeIdentList(/*_ nzctx *, nzttIdentity ** _*/);
-#endif
-#endif /* NZ_OLD_TOOLS */
-
-/*--------------------- nztCheckVaLidity ---------------------*/
-
-/*
- * NAME
- * 	nztCheckVaLidity -  Check the validity of certificate
- * 
- * PARAMETERS
- * 	Name	{IN/OUT}	Description
- *    	osscntxt {IN}     	OSS context.
- *	start_time		Start time of the certificate
- *	end_time		End time of the certificate
- * 
- * NOTES
- * 	
- * RETURNS
- * 	NZERROR_OK	 	succeeded
- *	others			failed
- * 	
- */
-#ifdef __STDC__
-nzerror nztCheckValidity( nzctx *, ub4 , ub4 );
-#else
-nzerror nztCheckValidity(/*_ nzctx *, ub4 , ub4 _*/);
-#endif
-
-/*--------------------- nztwCreateWallet ---------------------*/
-
-/*
- * NAME
- *    nztwCreateWallet - Create a new wallet.
- * 
- * PARAMETERS
- *    osscntxt {IN}     OSS context.
- *    wrllen   {IN}     Length of wallet resource locator.
- *    wrl      {IN}     WRL.
- *    pwdlen   {IN}     Length of password (see notes below).
- *    pwd      {IN}     Password.
- *    wallet   {IN/OUT} Wallet. 
- * 
- * NOTES
- *    It is an error to try to create a wallet that already exists.
- *    The previously existing wallet must be destroyed first.
- *
- *    The wallet itself is not encrypted.  Rather, all the personas in
- *    the wallet are encrypted under the same password.  A hash of the
- *    password is stored in the wallet.
- *
- *    Upon success, an empty open wallet is stored in the wallet
- *    parameter.
- *    
- * RETURNS
- *    NZERROR_OK                 Sucess.
- *    NZERROR_TK_WALLET_EXISTS   Wallet already exists.
- *    NZERROR_RIO_OPEN           RIO could not create wallet (see trace file).
- */
-#ifdef __STDC__
-nzerror nztwCreateWallet(nzctx *, ub4, text *, ub4, text *, 
-                             nzttWallet *);
-#else
-nzerror nztwCreateWallet(/*_ nzctx *, ub4, text *, ub4, text *, 
-                             nzttWallet * _*/);
-#endif /* __STDC__ */
-
-
-/*--------------------- nztwDestroyWallet ---------------------*/
-
-/*
- * NAME
- *    nztwDestroyWallet - Destroy an existing wallet.
- * 
- * PARAMETERS
- *    osscntxt {IN}     OSS context.
- *    wrllen   {IN}     Length of wallet resource locator.
- *    wrl      {IN}     WRL.
- *    pwdlen   {IN}     Length of password.
- *    pwd      {IN}     Password.
- * NOTES
- *    
- * RETURNS
- *    NZERROR_OK           Success.
- *    NZERROR_TK_PASSWORD  Password verification failed.
- *    NZERROR_RIO_OPEN     RIO could not open wallet (see trace file).
- *    NZERROR_RIO_DELETE   Delete failed (see trace file).
- */
-#ifdef __STDC__
-nzerror nztwDestroyWallet(nzctx *, ub4, text *, ub4, text *);
-#else
-nzerror nztwDestroyWallet(/*_ nzctx *, ub4, text *, ub4, text * _*/);
-#endif /* __STDC __*/
-
-/*--------------------- nzteStorePersona ---------------------*/
-
-/*
- * NAME
- *    nzteStorePersona - Store an open persona in a wallet.
- * 
- * PARAMETERS
- *    osscntxt {IN}     OSS context. 
- *    persona  {IN/OUT} Persona.
- *    wallet   {IN/OUT} Wallet.
- * 
- * NOTES
- *    If the open persona is not associated with any wallet (it was
- *    created via the nzteClosePersona function), then storing the
- *    persona creates that association.  The wallet will also have an
- *    updated persona list that reflects this association.
- *
- *    If the open persona was associated with wallet 'A' (it was
- *    opened via the nztwOpenWallet function), and is stored back into
- *    wallet 'A', then then the old persona is overwritten by the new
- *    persona if the password can be verified.  Recall that all
- *    personas have a unique identity id.  If that id changes then
- *    storing the persona will put a new persona in the wallet.
- *
- *    If the open persona was associated with wallet 'A' and is stored
- *    into wallet 'B', and if wallet 'B' does not contain a persona
- *    with that unique identity id, then the persona will be copied
- *    into wallet 'B', wallet 'B''s persona list will be updated, and
- *    the persona structure will be updated to be associated with
- *    wallet 'B'.  If wallet 'B' already contained the persona, it
- *    would be overwritten by the new persona.
- *
- *    The persona parameter is doubly indirect so that at the
- *    conclusion of the function call, the pointer can be directed to
- *    the persona in the wallet.
- *
- * RETURNS
- *    NZERROR_OK           Success.
- *    NZERROR_TK_PASSWORD  Password verification failed.
- *    NZERROR_RIO_STORE    Store failed (see network trace file).
- */
-#ifdef __STDC__
-nzerror nzteStorePersona(nzctx *, nzttPersona **, nzttWallet *);
-#else
-nzerror nzteStorePersona(/*_ nzctx *, nzttPersona **, nzttWallet * _*/);
-#endif /* __STDC __*/
-
-/*--------------------- nzteRemovePersona ---------------------*/
-
-/*
- * NAME
- *    nzteRemovePersona - Remove a persona from the wallet.
- * 
- * PARAMETERS
- *    osscntxt {IN}     OSS context.
- *    persona  {IN/OUT} Persona.
- * 
- * NOTES
- *    The password is verified before trying to remove the persona.
- *    
- *    If the persona is open, it is closed.  The persona is removed
- *    from the wallet list and the persona pointer is set to NULL.
- *    
- *    A double indirect pointer to the persona is required so that the
- *    persona pointer can be set to NULL upon completion.
- *
- * RETURNS
- *    NZERROR_OK           Success.
- *    NZERROR_TK_PASSWORD  Password verification failed.
- *    NZERROR_RIO_DELETE   Delete failed.
- */
-#ifdef __STDC__
-nzerror nzteRemovePersona(nzctx *, nzttPersona **);
-#else
-nzerror nzteRemovePersona(/*_ nzctx *, nzttPersona ** _*/);
-#endif /* __STDC __*/
-
-/*--------------------- nzteCreatePersona ---------------------*/
-
-/*
- * NAME
- *    nzteCreatePersona - Create a persona.
- * 
- * PARAMETERS
- *    osscntxt {IN}     OSS context.
- *    itype    {IN}     Identity type.
- *    ctype    {IN}     Cipher type.
- *    desc     {IN}     Persona description.
- *    persona  {OUT}    Persona.
- * 
- * NOTES
- *    The resulting persona is created in the open state, but it will
- *    not be associated with a wallet.
- *    
- *    The memory for the persona is allocated by the function.
- *
- * RETURNS
- *    NZERROR_OK        Success.
- *    NZERROR_TK_TYPE   Unsupported itype/ctype combination.
- *    NZERROR_TK_PARMS  Error in persona description.
- */
-#ifdef __STDC__
-nzerror nzteCreatePersona(nzctx *, nzttVersion, nzttCipherType, 
-			  nzttPersonaDesc *, nzttPersona **);
-#else
-nzerror nzteCreatePersona(/*_ nzctx *, nzttVersion, nzttCipherType, 
-                              nzttPersonaDesc *, nzttPersona ** _*/);
-#endif /* __STDC __*/
-
-
-/*----------------- nztiStoreTrustedIdentity -----------------*/
-
-/*
- * NAME
- *    nztiStoreTrustedIdentity - Store an identity into a persona.
- * 
- * PARAMETERS
- *    osscntxt {IN}     Success.
- *    identity {IN/OUT} Trusted Identity.
- *    persona  {IN/OUT} Persona.    
- * 
- * NOTES
- *    The identity is not saved with the persona in the wallet until
- *    the persona is stored.
- *    
- *    The identity parameter is double indirect so that it can point
- *    into the persona at the conclusion of the call.
- *
- * RETURNS
- *    NZERROR_OK     Success.
- */
-#ifdef __STDC__
-nzerror nztiStoreTrustedIdentity(nzctx *, nzttIdentity **,
-                                     nzttPersona *);
-#else
-nzerror nztiStoreTrustedIdentity(/*_ nzctx *, nzttIdentity **,
-                                     nzttPersona * _*/);
-#endif /* __STDC __*/
-
-/*--------------------- nzteSetProtection ---------------------*/
-
-/*
- * NAME
- *    nzteSetProtection - Set the protection type for a CE function.
- * 
- * PARAMETERS
- *    osscntxt {IN}     OSS context.
- *    persona  {IN/OUT} Persona.
- *    func     {IN}     CE function.
- *    tdufmt   {IN}     TDU Format.
- *    protinfo {IN}     Protection information specific to this format.
- * 
- * NOTES
- *    
- * RETURNS
- *    NZERROR_OK              Success.
- *    NZERROR_TK_PROTECTION   Unsupported protection.
- *    NZERROR_TK_PARMS        Error in protection info.
- */
-#ifdef __STDC__
-nzerror nzteSetProtection(nzctx *, nzttPersona *, nzttcef, nztttdufmt,
-                              nzttProtInfo *);
-#else
-nzerror nzteSetProtection(/*_ nzctx *, nzttPersona *, nzttcef, nztttdufmt,
-                              nzttProtInfo * _*/);
-#endif /* __STDC __*/
-
-/*--------------------- nzteGetProtection ---------------------*/
-
-/*
- * NAME
- *    nzteGetProtection - Get the protection type for a CE function.
- * 
- * PARAMETERS
- *    osscntxt {IN}     OSS context.
- *    persona  {IN}     Persona.
- *    func     {IN}     CE function.
- *    tdufmt   {OUT}    TDU format.
- *    protinfo {OUT}    Protection information.
- * 
- * NOTES
- *    
- * RETURNS
- *    NZERROR_OK        Success.
- */
-#ifdef __STDC__
-nzerror nzteGetProtection(nzctx *, nzttPersona *, nzttcef, nztttdufmt *,
-                              nzttProtInfo *);
-#else
-nzerror nzteGetProtection(/*_ nzctx *, nzttPersona *, nzttcef, nztttdufmt *,
-                              nzttProtInfo * _*/);
-#endif /* __STDC __*/
-
-/*-------------------- nztiRemoveIdentity --------------------*/
-
-/*
- * NAME
- *    nztiRemoveIdentity - Remove an identity from an open persona.
- * 
- * PARAMETERS
- *    osscntxt {IN}     OSS context. 
- *    identity {IN/OUT}     Identity.
- * 
- * NOTES
- *    If the persona is not stored, this identity will still be in the
- *    persona stored in the wallet.
- *    
- *    The identity parameter is doubly indirect so that at the
- *    conclusion of the function, the pointer can be set to NULL.
- *
- * RETURNS
- *    NZERROR_OK           Success.
- *    NZERROR_TK_NOTFOUND  Identity not found.
- *    NZERROR_TK_NOTOPEN   Persona is not open.
- */
-#ifdef __STDC__
-nzerror nztiRemoveIdentity(nzctx *, nzttIdentity **);
-#else
-nzerror nztiRemoveIdentity(/*_ nzctx *, nzttIdentity ** _*/);
-#endif /* __STDC __*/
-
-/*----------------- nztifdn -----------------*/
-
-/*
- * NAME
- *    nztifdn - create an Identity From a Distinguished Name
- * 
- * PARAMETERS
- *    osscntxt           {IN}  OSS context.
- *    length             {IN}  Length of the distinguished name
- *    distinguished_name {IN}  distinguished name string
- *    ppidentity         {OUT} created identity
- * 
- * NOTES
- *    Given a distinguished name, return the identity that corresponds to it.
- *
- * RETURNS
- *    NZERROR_OK     Success.
- */
-#ifdef __STDC__
-nzerror nztifdn(nzctx         *ossctx,
-                    ub4         length,
-                    text          *distinguished_name,
-                    nzttIdentity **ppidentity);
-#else
-nzerror nztifdn(/*_ nzctx         *ossctx,
-                    ub4         length,
-                    text          *distinguished_name,
-                    nzttIdentity **ppidentity _*/);
-#endif /* __STDC __*/
-
-/*--------------------- nztxSignExpansion ---------------------*/
-
-/*
- * NAME
- *    nztxSignExpansion - Determine the size of the attached signature buffer.
- * 
- * PARAMETERS
- *    osscntxt {IN}  OSS context.
- *    persona  {IN}  Persona.
- *    inlen    {IN}  Length of input.
- *    tdulen   {OUT} Buffer needed for signature.
- *
- * NOTES
- *    
- * RETURNS
- *    NZERROR_OK           Success.
- *    NZERROR_TK_NOTOPEN   Persona is not open.
- *    NZERROR_TK_NOTSUPP   Function not supported with persona.
- */
-#ifdef __STDC__
-nzerror nztxSignExpansion(nzctx *, nzttPersona *, ub4, ub4 *);
-#else
-nzerror nztxSignExpansion(/*_ nzctx *, nzttPersona *, ub4, ub4 * _*/);
-#endif /* __STDC __*/
-
-/*--------------- nztxsd_SignDetachedExpansion ---------------*/
-
-/*
- * NAME
- *    nztxsd_SignDetachedExpansion - Determine the size of buffer needed.
- * 
- * PARAMETERS
- *    osscntxt {IN}  OSS context.
- *    persona  {IN}  Persona.
- *    inlen    {IN}  Length of input.
- *    tdulen   {OUT} Buffer needed for signature.
- * 
- * NOTES
- *    
- * RETURNS
- *    NZERROR_OK           Success.
- *    NZERROR_TK_NOTOPEN   Persona is not open.
- *    NZERROR_TK_NOTSUPP   Function not supported with persona.
- */
-#ifdef __STDC__
-nzerror nztxsd_SignDetachedExpansion(nzctx *, nzttPersona *, ub4,
-                                         ub4 *);
-#else
-nzerror nztxsd_SignDetachedExpansion(/*_ nzctx *, nzttPersona *, ub4,
-                                         ub4 * _*/);
-#endif /* __STDC __*/
-
-/*------------------------ nztEncrypt ------------------------*/
-
-/*
- * NAME
- *    nztEncrypt - Symmetrically encrypt
- * 
- * PARAMETERS
- *    osscntxt    {IN}     OSS context.
- *    persona     {IN}     Persona.
- *    inlen       {IN}     Length of this input part.
- *    in          {IN}     This input part.
- *    tdubuf      {IN/OUT} TDU buffer.
- * 
- * NOTES
- *    
- * RETURNS
- *    NZERROR_OK           Success.
- *    NZERROR_TK_CANTGROW  Needed to grow TDU buffer but could not.
- *    NZERROR_TK_NOTOPEN   Persona is not open.
- *    NZERROR_TK_NOTSUPP   Function not supported with persona.
- */
-#ifdef __STDC__
-nzerror nztEncrypt(nzctx *, nzttPersona *, nzttces, ub4, ub1 *,
-                       nzttBufferBlock *);
-#else
-nzerror nztEncrypt(/*_ nzctx *, nzttPersona *, nzttces, ub4, ub1 *,
-                       nzttBufferBlock * _*/);
-#endif /* __STDC __*/
-
-/*------------------- nztxEncryptExpansion -------------------*/
-
-/*
- * NAME
- *    nztxEncryptExpansion - Determine the size of the TDU to encrypt.
- * 
- * PARAMETERS
- *    osscntxt    {IN}  OSS context.
- *    persona     {IN}  Persona.
- *    inlen       {IN}  Length of this input part.
- *    tdulen      {OUT} Length of TDU.
- * 
- * NOTES
- *    
- * RETURNS
- *    NZERROR_OK           Success.
- *    NZERROR_TK_NOTOPEN   Persona is not open.
- *    NZERROR_TK_NOTSUPP   Function not supported with persona.
- */
-#ifdef __STDC__
-nzerror nztxEncryptExpansion(nzctx *, nzttPersona *, ub4, ub4 *);
-#else
-nzerror nztxEncryptExpansion(/*_ nzctx *, nzttPersona *, ub4, ub4 * _*/);
-#endif /* __STDC __*/
-
-/*------------------------ nztDecrypt ------------------------*/
-
-/*
- * NAME
- *    nztDecrypt - Decrypt an Encrypted message.
- * 
- * PARAMETERS
- *    osscntxt {IN}     OSS context.
- *    persona  {IN}     Persona.
- *    state    {IN}     State of decryption.
- *    inlen    {IN}     Length of this input part.
- *    in       {IN}     This input part.
- *    out      {IN/OUT} Cleartext message.
- * 
- * NOTES
- *    
- * RETURNS
- *    NZERROR_OK           Success.
- *    NZERROR_TK_CANTGROW  Needed to grow TDU buffer but could not.
- *    NZERROR_TK_NOTOPEN   Persona is not open.
- *    NZERROR_TK_NOTSUPP   Function not supported with persona.
- */
-#ifdef __STDC__
-nzerror nztDecrypt(nzctx *, nzttPersona *, nzttces, ub4, ub1 *,
-                       nzttBufferBlock *);
-#else
-nzerror nztDecrypt(/*_ nzctx *, nzttPersona *, nzttces, ub4, ub1 *,
-                       nzttBufferBlock * _*/);
-#endif /* __STDC __*/
-
-/*------------------------ nztEnvelope ------------------------*/
-
-/*
- * NAME
- *    nztEnvelope - Sign and PKEncrypt a message.
- * 
- * PARAMETERS
- *    osscntxt    {IN}     OSS context.
- *    persona     {IN}     Persona.
- *    nrecipients {IN}     Number of recipients for this encryption.
- *    recipients  {IN}     List of recipients.
- *    state       {IN}     State of encryption.
- *    inlen       {IN}     Length of this input part.
- *    in          {IN}     This input part.
- *    tdubuf      {IN/OUT} TDU buffer.
- *
- * NOTES
- *    
- * RETURNS
- *    NZERROR_OK           Success.
- *    NZERROR_TK_CANTGROW  Needed to grow output buffer but could not.
- *    NZERROR_TK_NOTOPEN   Persona is not open.
- *    NZERROR_TK_NOTSUPP   Function not supported with persona.
- */
-#ifdef __STDC__
-nzerror nztEnvelope(nzctx *, nzttPersona *, ub4, nzttIdentity *,
-                        nzttces, ub4, ub1 *, nzttBufferBlock *);
-#else
-nzerror nztEnvelope(/*_ nzctx *, nzttPersona *, ub4, nzttIdentity *,
-                        nzttces, ub4, ub1 *, nzttBufferBlock * _*/);
-#endif /* __STDC __*/
-
-/*----------------------- nztDeEnvelope -----------------------*/
-
-/*
- * NAME
- *    nztDeEnvelope - PKDecrypt and verify a message.
- * 
- * PARAMETERS
- *    osscntxt    {IN}     OSS context.
- *    persona     {IN}     Persona.
- *    state       {IN}     State of encryption.
- *    inlen       {IN}     Length of this input part.
- *    in          {IN}     This input part.
- *    out         {OUT}    Message from TDU.
- *    verified    {OUT}    TRUE if verified.
- *    validated   {OUT}    TRUE if validated.
- *    sender      {OUT}    Identity of sender.
- *
- * NOTES
- *    
- * RETURNS
- *    NZERROR_OK           Success.
- *    NZERROR_TK_CANTGROW  Needed to grow TDU buffer but could not.
- *    NZERROR_TK_NOTOPEN   Persona is not open.
- *    NZERROR_TK_NOTSUPP   Function not supported with persona.
- */
-#ifdef __STDC__
-nzerror nztDeEnvelope(nzctx *, nzttPersona *, nzttces, ub4, ub1 *,
-                          nzttBufferBlock *, boolean *, boolean *,
-                          nzttIdentity **);
-#else
-nzerror nztDeEnvelope(/*_ nzctx *, nzttPersona *, nzttces, ub4, ub1 *,
-                          nzttBufferBlock *, boolean *, boolean *,
-                          nzttIdentity ** _*/);
-#endif /* __STDC __*/
-
-/*----------------------- nztKeyedHash -----------------------*/
-
-/*
- * NAME
- *    nztKeyedHash - Generate a keyed hash.
- * 
- * PARAMETERS
- *    osscntxt {IN}     OSS context.
- *    persona  {IN}     Persona.
- *    state    {IN}     State of hash.
- *    inlen    {IN}     Length of this input.
- *    in       {IN}     This input.
- *    tdu      {IN/OUT} Output tdu.
- * 
- * NOTES
- *    
- * RETURNS
- *    NZERROR_OK           Success.
- *    NZERROR_TK_CANTGROW  Needed to grow TDU buffer but could not.
- *    NZERROR_TK_NOTOPEN   Persona is not open.
- *    NZERROR_TK_NOTSUPP   Function not supported with persona.
- */
-#ifdef __STDC__
-nzerror nztKeyedHash(nzctx *, nzttPersona *, nzttces, ub4, ub1 *,
-                         nzttBufferBlock *);
-#else
-nzerror nztKeyedHash(/*_ nzctx *, nzttPersona *, nzttces, ub4, ub1 *,
-                         nzttBufferBlock * _*/);
-#endif /* __STDC __*/
-
-/*------------------ nztxKeyedHashExpansion ------------------*/
-
-/*
- * NAME
- *    nztxKeyedHashExpansion - Determine the space needed for a keyed hash.
- * 
- * PARAMETERS
- *    osscntxt {IN}  OSS context.
- *    persona  {IN}  Persona.
- *    inlen    {IN}  Length of this input.
- *    tdulen   {OUT} TDU length.
- * 
- * NOTES
- *    
- * RETURNS
- *    NZERROR_OK           Success.
- *    NZERROR_TK_NOTOPEN   Persona is not open.
- *    NZERROR_TK_NOTSUPP   Function not supported with persona.
- */
-#ifdef __STDC__
-nzerror nztxKeyedHashExpansion(nzctx *, nzttPersona *, ub4, 
-                                   ub4 *);
-#else
-nzerror nztxKeyedHashExpansion(/*_ nzctx *, nzttPersona *, ub4, 
-                                   ub4 * _*/);
-#endif /* __STDC __*/
-
-/*--------------------- nztxHashExpansion ---------------------*/
-
-/*
- * NAME
- *    nztxHashExpansion - Determine the size of the TDU for a hash.
- * 
- * PARAMETERS
- *    osscntxt {IN}  OSS context.
- *    persona  {IN}  Persona.
- *    inlen    {IN}  Length of this input.
- *    tdulen   {OUT} TDU length.
- * 
- * NOTES
- *    
- * RETURNS
- *    NZERROR_OK           Success.
- *    NZERROR_TK_NOTOPEN   Persona is not open.
- *    NZERROR_TK_NOTSUPP   Function not supported with persona.
- */
-#ifdef __STDC__
-nzerror nztxHashExpansion(nzctx *, nzttPersona *, ub4, ub4 *);
-#else
-nzerror nztxHashExpansion(/*_ nzctx *, nzttPersona *, ub4, ub4 * _*/);
-#endif /* __STDC __*/
-
-/*---------------- nztiae_IsAuthEnabled ----------------*/
-
-/*
- * NAME
- * 	nztiae_IsAuthEnabled -  Checks to see if Authentication is Enabled
- *                               in the current Cipher Spec.
- * 
- * PARAMETERS
- * 	ctx	{IN}	Oracle SSL Context
- *      ncipher {IN}    CipherSuite
- *      authEnabled {OUT} Boolean for is Auth Enabled?
- * 
- * NOTES
- * 	
- * RETURNS
- *      NZERROR_OK on success.
- *      NZERROR_TK_INV_CIPHR_TYPE if Cipher Spec is not Recognized.
- */
-
-#ifdef __STDC__
-nzerror nztiae_IsAuthEnabled( nzctx *, ub2, boolean *);
-#else
-nzerror nztiae_IsAuthEnabled(/*_ nzctx *ctx, 
-                                  ub2 ncipher, 
-                                  boolean *authEnabled _*/);
-#endif
-
-/*---------------- nztiee_IsEncrEnabled ----------------*/
-/*
- * NAME
- * 	nztiee_IsEncrEnabled -  Checks to see if Encryption is Enabled
- *                               in the current Cipher Spec.
- * 
- * PARAMETERS
- * 	ctx	{IN}	Oracle SSL Context
- *      ncipher {IN}    CipherSuite
- *      EncrEnabled {OUT} Boolean for is Auth Enabled?
- * 
- * NOTES
- * 	
- * RETURNS
- *      NZERROR_OK on success.
- *      NZERROR_TK_INV_CIPHR_TYPE if Cipher Spec is not Recognized.
- */
-
-#ifdef __STDC__
-nzerror nztiee_IsEncrEnabled( nzctx *, ub2, boolean *);
-#else
-nzerror nztiee_IsEncrEnabled(/*_ nzctx *ctx, 
-                                  ub2 ncipher, 
-                                  boolean *EncrEnabled _*/);
-#endif
-/*---------------- nztihe_IsHashEnabled ----------------*/
-/*
- * NAME
- * 	nztihe_IsHashEnabled -  Checks to see if HAshing is Enabled
- *                               in the current Cipher Spec.
- * 
- * PARAMETERS
- * 	ctx	{IN}	Oracle SSL Context
- *      ncipher {IN}    CipherSuite
- *      hashEnabled {OUT} Boolean for is Auth Enabled?
- * 
- * NOTES
- * 	
- * RETURNS
- *      NZERROR_OK on success.
- *      NZERROR_TK_INV_CIPHR_TYPE if Cipher Spec is not Recognized.
- */
-
-#ifdef __STDC__
-nzerror nztihe_IsHashEnabled( nzctx *, ub2, boolean *);
-#else
-nzerror nztihe_IsHashEnabled(/*_ nzctx *ctx, 
-                                  ub2 ncipher, 
-                                  boolean *hashEnabled _*/);
-#endif
-
-/*
- *
- */
-
-#ifdef _STDC_
-nzerror nztGetIssuerName(nzctx *, nzttIdentity *, ub1 **, ub4 *);
-#else
-nzerror nztGetIssuerName(/*_ nzctx *ctx,
-                             nzttIdentity *identity,
-                             ub1  **issuername,
-                             ub4   *issuernamelen _*/);
-#endif
-
-#ifdef _STDC_
-nzerror nztGetSubjectName(nzctx *, nzttIdentity *, ub1 **, ub4 *);
-#else
-nzerror nztGetSubjectName(/*_ nzctx *ctx,
-                              nzttIdentity *identity,
-                              ub1  **subjectname,
-                              ub4   *subjectnamelen _*/);
-#endif
-
-
-#ifdef _STDC_
-nzerror nztGetBase64Cert(nzctx *, nzttIdentity *, ub1 **, ub4 *);
-#else
-nzerror nztGetBase64Cert(/*_ nzctx *ctx,
-                              nzttIdentity *identity,
-                              ub1  **b64cert,
-                              ub4   *b64certlen _*/);
-#endif
-
-#ifdef _STDC_
-nzerror nztGetSerialNumber(nzctx *, nzttIdentity *, ub1 **, ub4 *);
-#else
-nzerror nztGetSerialNumber(/*_ nzctx *ctx,
-                              nzttIdentity *identity,
-                              ub1   **serialnum,
-                              ub4    *serialnumlen _*/);
-#endif
-
-#ifdef _STDC_
-nzerror nztGetValidDate(nzctx *, nzttIdentity *, ub4 *, ub4 *);
-#else
-nzerror nztGetValidDate(/*_ nzctx *ctx,
-                            nzttIdentity *identity,
-                            ub4  *startdate, 
-                            ub4  *enddate  _*/);
-#endif
-
-#ifdef _STDC_
-nzerror nztGetVersion(nzctx *, nzttIdentity *, nzstrc *); 
-#else
-nzerror nztGetVersion(/*_ nzctx *ctx,
-                          nzttIdentity *identity,
-                          nzstrc *pVerStr  _*/);
-#endif
-
-#ifdef _STDC_
-nzerror nztGetPublicKey(nzctx *, nzttIdentity *, ub1 **, ub4 *);
-#else
-nzerror nztGetPublicKey(/*_ nzctx *ctx,
-                            nzttIdentity *identity,
-                            ub1  **pubKey,
-                            ub4   *pubKeylen _*/);
-#endif
-
-
-#ifdef _STDC_
-nzerror nztGenericDestroy(nzctx *, ub1 **);
-#else
-nzerror nztGenericDestroy(/*_ nzctx *ctx,
-                              ub1  **var _*/);
-#endif
-
-#ifdef _STDC_
-nzerror nztSetAppDefaultLocation(nzctx *, text *, size_t);
-#else
-nzerror nztSetAppDefaultLocation(/*_ nzctx *ctx,
-                                     text *,
-                                     size_t _*/);
-#endif
-
-#ifdef _STDC_
-nzerror nztSearchNZDefault(nzctx *, boolean *);
-#else
-nzerror nztSearchNZDefault(/*_ nzctx *ctx,
-                               boolean *search _*/);
-#endif
-
-
-#endif /* NZT_ORACLE */
-
diff --git a/src/terralib/drivers/OracleSpatial/OCI/include/occi.h b/src/terralib/drivers/OracleSpatial/OCI/include/occi.h
deleted file mode 100644
index 2dca9e6..0000000
--- a/src/terralib/drivers/OracleSpatial/OCI/include/occi.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/* Copyright (c) 2000, 2002, Oracle Corporation.  All rights reserved.  */
- 
-/* 
-   NAME 
-     occi.h - Oracle C++ Interface header files.
-
-   DESCRIPTION 
-     <short description of facility this file declares/defines> 
-
-   RELATED DOCUMENTS 
-     <note any documents related to this facility>
- 
-   EXPORT FUNCTION(S) 
-     <external functions declared for use outside package - one-line 
-      descriptions>
-
-   INTERNAL FUNCTION(S)
-     <other external functions declared - one-line descriptions>
-
-   EXAMPLES
-
-   NOTES
-     <other useful comments, qualifications, etc.>
-
-   MODIFIED   (MM/DD/YY)
-   vvinay      08/19/02 - 
-   aahluwal    06/03/02 - bug 2360115
-   gayyappa    01/03/01 - removed inclusions before occiCommon.h
-   kmohan      04/11/00 - include oci.h and occiCommon.h also
-   rkasamse    04/03/00 - header file for all the OCCI classes
-   rkasamse    04/03/00 - Creation
-
-*/
-
-#ifndef OCCI_ORACLE
-# define OCCI_ORACLE
-
-#ifndef OCCICOMMON_ORACLE
-#include <occiCommon.h>
-#endif
-
-#ifndef OCCIDATA_ORACLE
-#include <occiData.h>
-#endif
-
-#ifndef OCCICONTROL_ORACLE
-#include <occiControl.h>
-#endif
-
-#ifndef OCCIOBJECTS_ORACLE
-#include <occiObjects.h>
-#endif
-
-#ifndef OCCIAQ_ORACLE
-#include <occiAQ.h>
-#endif
-
-/*---------------------------------------------------------------------------
-                     PUBLIC TYPES AND CONSTANTS
-  ---------------------------------------------------------------------------*/
-
-
-/*---------------------------------------------------------------------------
-                     PRIVATE TYPES AND CONSTANTS
-  ---------------------------------------------------------------------------*/
-
-
-/*---------------------------------------------------------------------------
-                           EXPORT FUNCTIONS
-  ---------------------------------------------------------------------------*/
-
-
-/*---------------------------------------------------------------------------
-                          INTERNAL FUNCTIONS
-  ---------------------------------------------------------------------------*/
-
-
-#endif                                              /* OCCI_ORACLE */
diff --git a/src/terralib/drivers/OracleSpatial/OCI/include/occiAQ.h b/src/terralib/drivers/OracleSpatial/OCI/include/occiAQ.h
deleted file mode 100644
index 9b68f41..0000000
--- a/src/terralib/drivers/OracleSpatial/OCI/include/occiAQ.h
+++ /dev/null
@@ -1,374 +0,0 @@
-/* Copyright (c) 2002, 2003, Oracle Corporation.  All rights reserved.  */
- 
-/* 
-   NAME 
-     occiAQ.h - Header file for occi AQ classes
-
-   DESCRIPTION 
-     Class declarations for Producer, Consumer, Message, Agent
-     Listener, Subscription
-
-   RELATED DOCUMENTS 
-     <note any documents related to this facility>
- 
-   EXPORT FUNCTION(S) 
-     <external functions declared for use outside package - one-line 
-     descriptions>
-
-   INTERNAL FUNCTION(S)
-     <other external functions declared - one-line descriptions>
-
-   EXAMPLES
-
-   NOTES
-     <other useful comments, qualifications, etc.>
-
-   MODIFIED   (MM/DD/YY)
-   cparampa    10/12/02 - creation
-
-*/
-
-#ifndef _olint   /* disable olint check */
-
-#ifndef OCCIAQ_ORACLE
-# define OCCIAQ_ORACLE
-
-#ifndef OCCICOMMON_ORACLE
-#include <occiCommon.h>
-#endif
-
-namespace oracle {
-namespace occi {
-namespace aq{
-
-/*---------------------------------------------------------------------------
-                     PUBLIC TYPES AND CONSTANTS
-  ---------------------------------------------------------------------------*/
-
-class Message
-{
-  public:
-
-     enum MessageState
-     {
-        MSG_READY = OCI_MSG_READY,
-        MSG_WAITING = OCI_MSG_WAITING,
-        MSG_PROCESSED = OCI_MSG_PROCESSED,
-        MSG_EXPIRED = OCI_MSG_EXPIRED
-     };
-     enum PayloadType
-     {
-        RAW,
-        ANYDATA,
-        OBJECT
-     };
-
-     Message( const Environment *env );
-     Message( const Message& rhs);
-     ~Message();
-     
-     void operator=(const Message& rhs);
-     int getAttemptsToDequeue() const ;
-     void setCorrelationId( const OCCI_STD_NAMESPACE::string& corr_id ) ;
-     OCCI_STD_NAMESPACE::string getCorrelationId() const ;
-     void setDelay( int delay ) ;
-     int getDelay() const ;
-     Date getMessageEnqueuedTime() const ;
-     void setExceptionQueueName( const OCCI_STD_NAMESPACE::string& queue ) ;
-     OCCI_STD_NAMESPACE::string getExceptionQueueName() const ;
-     void setExpiration( int exp ) ;
-     int getExpiration() const ;
-     MessageState getMessageState() const ;
-     void setPriority( int priority ) ;
-     int getPriority() const ;
-     void setRecipientList( OCCI_STD_NAMESPACE::vector<Agent>& ag_list ) ;
-     void setSenderId( const Agent& sender ) ;
-     Agent getSenderId() const ;
-     void setOriginalMessageId( const Bytes& queue ) ;
-     Bytes getOriginalMessageId() const ;
-     void setNull();
-     bool isNull() const;
-
-     void setBytes( const Bytes& bytes); 
-     void setObject( PObject* pobj);
-     void setAnyData( const AnyData& any);
-
-     Bytes getBytes() const ;
-     PObject *getObject() ;
-     AnyData getAnyData() const ;
-
-     PayloadType getPayloadType( ) const;
-
-   private:
-     Ptr<MessageImpl> ptr;
-     OCIAQMsgProperties* getOCIMsgProperties() const;
-     Message( const Environment *env, const Connection *con, 
-          OCIAQMsgProperties *msgprop, void *data, unsigned int dataLen, 
-          PayloadType pType);
-     friend class ConsumerImpl;
-     friend class ProducerImpl;
-     friend class NotifyResult;
-};
-
-class Producer
-{
-   public:
-
-     enum EnqueueSequence
-     {
-       ENQ_BEFORE = OCI_ENQ_BEFORE,
-       ENQ_TOP    = OCI_ENQ_TOP
-     };
-     enum Visibility
-     {
-       ENQ_IMMEDIATE = OCI_ENQ_IMMEDIATE,
-       ENQ_ON_COMMIT = OCI_ENQ_ON_COMMIT
-     };
-     
-     Producer( const Connection *conn ); 
-     Producer( const Connection *conn, 
-               const OCCI_STD_NAMESPACE::string& queue ); 
-     Producer( const Producer& rhs);
-     ~Producer();
-
-     void operator=(const Producer& prod);
-     void setRelativeMessageId( const Bytes& msgid );
-     Bytes getRelativeMessageId() const;
-     void setSequenceDeviation( EnqueueSequence option );
-     EnqueueSequence getSequenceDeviation() const;
-     void setVisibility( Visibility option );
-     Visibility getVisibility() const;
-     void setQueueName( const OCCI_STD_NAMESPACE::string& queue );
-     OCCI_STD_NAMESPACE::string getQueueName() const;
-     void setTransformation( const OCCI_STD_NAMESPACE::string& fName);
-     OCCI_STD_NAMESPACE::string getTransformation() const;
-     Bytes send( Message& msg, const OCCI_STD_NAMESPACE::string& queue );
-     Bytes send( Message& msg );
-     void setNull();
-     bool isNull() const;
-
-  private:
-     Ptr<ProducerImpl> ptr; 
-};
-
-class Consumer
-{
-   public:
-
-     enum DequeueMode
-     {
-       DEQ_BROWSE  = OCI_DEQ_BROWSE,
-       DEQ_LOCKED  = OCI_DEQ_LOCKED,
-       DEQ_REMOVE  = OCI_DEQ_REMOVE,
-       DEQ_REMOVE_NODATA = OCI_DEQ_REMOVE_NODATA
-     };
-     enum Navigation
-     {
-       DEQ_FIRST_MSG        = OCI_DEQ_FIRST_MSG,
-       DEQ_NEXT_TRANSACTION = OCI_DEQ_NEXT_TRANSACTION,
-       DEQ_NEXT_MSG         = OCI_DEQ_NEXT_MSG
-     };
-     enum Visibility
-     {
-       DEQ_IMMEDIATE = OCI_DEQ_IMMEDIATE,
-       DEQ_ON_COMMIT = OCI_DEQ_ON_COMMIT
-     };
-     enum
-     {
-       DEQ_WAIT_FOREVER = OCI_DEQ_WAIT_FOREVER,
-       DEQ_NO_WAIT      = OCI_DEQ_NO_WAIT
-     };
-     
-     Consumer( const Connection *conn ); 
-     Consumer( const Connection * conn, const Agent& agent); 
-     Consumer( const Connection *conn,
-               const OCCI_STD_NAMESPACE::string& queue ); 
-     Consumer(const Consumer& con);
-     ~Consumer();
-    
-     void operator=(const Consumer& con);
-     void setAgent(const Agent& agent);
-     void setConsumerName( const OCCI_STD_NAMESPACE::string& name );
-     OCCI_STD_NAMESPACE::string getConsumerName() const;
-     void setCorrelationId( const OCCI_STD_NAMESPACE::string& cor_id );
-     OCCI_STD_NAMESPACE::string getCorrelationId() const;
-     void setDequeueMode( DequeueMode mode );
-     DequeueMode getDequeueMode() const;
-     void setMessageIdToDequeue( const Bytes& msgid );
-     Bytes getMessageIdToDequeue() const;
-     void setPositionOfMessage( Navigation pos );
-     Navigation getPositionOfMessage() const;
-     void setVisibility( Visibility option );
-     Visibility getVisibility() const;
-     void setWaitTime( unsigned int wait );
-     unsigned int getWaitTime() const;
-     void setQueueName( const OCCI_STD_NAMESPACE::string& queue );
-     OCCI_STD_NAMESPACE::string getQueueName() const;
-     void setTransformation( const OCCI_STD_NAMESPACE::string& fName);
-     OCCI_STD_NAMESPACE::string getTransformation() const;
-     Message receive( Message::PayloadType pType,
-                      const OCCI_STD_NAMESPACE::string& type="",
-                      const OCCI_STD_NAMESPACE::string& schema="");
-     void setNull();
-     bool isNull() const;
-
-   private:
-     Ptr<ConsumerImpl> ptr; 
-};
-
-class Agent
-{
-   public:
-     Agent( const Environment *env ); 
-     Agent( const Environment *env, 
-            const OCCI_STD_NAMESPACE::string& name, 
-            const OCCI_STD_NAMESPACE::string& address, 
-            unsigned int protocol=0 ) ; 
-     Agent(const Agent& a);
-     ~Agent() ;
- 
-     void operator=(const Agent& a);
-     void setName( const OCCI_STD_NAMESPACE::string& name );
-     OCCI_STD_NAMESPACE::string getName() const;
-     void setAddress( const OCCI_STD_NAMESPACE::string& addr );
-     OCCI_STD_NAMESPACE::string getAddress() const;
-     void setProtocol(unsigned int protocol = 0);
-     unsigned int getProtocol() const; 
-     void setNull(); 
-     bool isNull() const;
-     OCIAQAgent* getOCIAQAgent() const;
-
-   private:
-     Ptr<AgentImpl> ptr;
-     Agent( const Environment *env, OCIAQAgent *rhs, bool toFree = false );
-     friend class Listener;
-     friend class MessageImpl;
-};
-
-class Listener
-{
-   public:
-     Listener( const Connection *conn ); 
-     Listener( const Connection *conn, 
-               OCCI_STD_NAMESPACE::vector<Agent> &agList, 
-               int waitTime=0 );
-     ~Listener();
-     
-     Agent listen();
-     void setAgentList(OCCI_STD_NAMESPACE::vector<Agent> &agList);
-     void setTimeOutForListen(int waitTime);
-     OCCI_STD_NAMESPACE::vector<Agent> getAgentList() const;
-     int getTimeOutForListen() const; 
-
-   private:
-     const ConnectionImpl *conn; 
-     OCIAQAgent** agentList; 
-     unsigned int numAgents;
-     int timeOut;
-     void *listenerExt;
-};
-
-
-class Subscription
-{
-  public:
-    enum Presentation
-    {
-       PRES_DEFAULT = OCI_SUBSCR_PRES_DEFAULT,
-       PRES_XML = OCI_SUBSCR_PRES_XML
-    };
-    enum Protocol
-    {
-       PROTO_CBK = OCI_SUBSCR_PROTO_OCI,
-       PROTO_MAIL = OCI_SUBSCR_PROTO_MAIL,
-       PROTO_SERVER = OCI_SUBSCR_PROTO_SERVER,
-       PROTO_HTTP = OCI_SUBSCR_PROTO_HTTP
-    };
-    enum Namespace
-    {
-       NS_ANONYMOUS = OCI_SUBSCR_NAMESPACE_ANONYMOUS,
-       NS_AQ = OCI_SUBSCR_NAMESPACE_AQ
-    }; 
-    
-    Subscription(const Environment* env);
-    Subscription(const Environment* env, OCISubscription* sub);
-    Subscription(const Subscription& sub);
-    ~Subscription();
-    
-    void operator=(const Subscription& sub);
-    unsigned int getDatabaseServersCount() const;
-    void setDatabaseServerNames(
-        const OCCI_STD_NAMESPACE::vector<OCCI_STD_NAMESPACE::string>& dbsrv);
-    OCCI_STD_NAMESPACE::vector<OCCI_STD_NAMESPACE::string>
-                      getDatabaseServerNames() const ;
-    void setNotifyCallback(unsigned int (*callback)(Subscription& sub, 
-                                                    NotifyResult *nr));
-    unsigned int  (*getNotifyCallback() const)(Subscription& sub, 
-                                               NotifyResult *nr); 
-    void setCallbackContext(void* ctx);
-    void* getCallbackContext() const;
-    void setSubscriptionName(const OCCI_STD_NAMESPACE::string& name);
-    OCCI_STD_NAMESPACE::string getSubscriptionName() const ;
-    void setSubscriptionNamespace(Namespace nameSpace);
-    Namespace getSubscriptionNamespace() const ;
-    void setPayload(const Bytes& payload);
-    Bytes getPayload() const ;
-    void setRecipientName( const OCCI_STD_NAMESPACE::string& name);
-    OCCI_STD_NAMESPACE::string getRecipientName() const;
-    void setPresentation( Presentation pres) ;
-    Presentation getPresentation() const ;
-    void setProtocol( Protocol prot) ;
-    Protocol getProtocol() const ;
-    OCISubscription* getOCISubscription() const;
-    void setNull();
-    bool isNull() const;
-    Environment* getEnvironment() const;
-
-  private:
-    Ptr<SubscriptionImpl> ptr;
-};
-
-class NotifyResult
-{
-   public:
-     Bytes getPayload() const;
-     Message getMessage() const;
-     Bytes getMessageId() const;
-     OCCI_STD_NAMESPACE::string getConsumerName() const;
-     OCCI_STD_NAMESPACE::string getQueueName() const;
-
-  private:
-     const EnvironmentImpl *env;
-     void *payload;
-     unsigned int payloadLen;
-     dvoid *desc;
-     ub4 mode;
-     void *notifyResultExt;
-
-     //private constructor
-     NotifyResult(const Environment *env, void *payload, ub4 payloadLen, 
-                  void *pdescriptor, ub4 mode);
-
-     friend class SubscriptionImpl;
-};
-      
-/*---------------------------------------------------------------------------
-                     PRIVATE TYPES AND CONSTANTS
-  ---------------------------------------------------------------------------*/
-
-
-/*---------------------------------------------------------------------------
-                           EXPORT FUNCTIONS
-  ---------------------------------------------------------------------------*/
-
-
-/*---------------------------------------------------------------------------
-                          INTERNAL FUNCTIONS
-  ---------------------------------------------------------------------------*/
-} /* end of namespace aq */
-} /* end of namespace occi */
-} /* end of namespace oracle */
-
-#endif                                              /* OCCIAQ_ORACLE */
-
-#endif                                              /* _olint */
diff --git a/src/terralib/drivers/OracleSpatial/OCI/include/occiCommon.h b/src/terralib/drivers/OracleSpatial/OCI/include/occiCommon.h
deleted file mode 100644
index 91a796c..0000000
--- a/src/terralib/drivers/OracleSpatial/OCI/include/occiCommon.h
+++ /dev/null
@@ -1,872 +0,0 @@
-/* Copyright (c) 2000, 2003, Oracle Corporation.  All rights reserved.  */
- 
-/* 
-   NAME 
-     occiCommon.h - header file for doing forward references
-
-   DESCRIPTION 
-     Just declare all the classes
-
-   RELATED DOCUMENTS 
-     <note any documents related to this facility>
- 
-   EXPORT FUNCTION(S) 
-     <external functions declared for use outside package - one-line 
-      descriptions>
-
-   INTERNAL FUNCTION(S)
-     <other external functions declared - one-line descriptions>
-
-   EXAMPLES
-
-   NOTES
-     <other useful comments, qualifications, etc.>
-
-   MODIFIED   (MM/DD/YY)
-   cparampa    09/03/03 - Added NotifyResult
-   rvallam     02/12/03 - modified BFloat/BDouble interface - BFloat/BDouble
-                          type is now a struct  
-   shiyer      01/02/03 - add setVector(vector<UString>,string schema/type)
-   rvallam     11/19/02 - added objects support for interval classes
-   cparampa    12/11/02 - removed declaration for Payload
-   srseshad    11/14/02 - Add OCCIIBFLOAT/OCCIIBDOUBLE
-   cparampa    10/17/02 - prototypes for getVectorOf BDouble and BFloat taking
-                          anydata.
-   cparampa    10/09/02 - Declarations for AQ classes
-   rvallam     10/12/02 - added new method for array pin - pinVectorOfRefs
-   rvallam     10/10/02 - objects performance enhancement - modified
-                          getObject and getVector<T *> to take the
-                          schName and typeName of the object
-   rvallam     10/11/02 - added native float/double API - get(set)vector
-                          methods, added the enum values for BFLOAT and
-                          BDOUBLE and typecodes for the same
-   shiyer      07/31/02 - 10iR1, OCCI Globalization support
-   cparampa    08/27/02 - Added forward reference for StatelessConnnectionPool
-                          and StatelessConnectionPoolImpl  
-   vvinay      06/25/02 - fix #2415021:const of string changed
-   aahluwal    06/03/02 - bug 2360115
-   gayyappa    12/27/01 - fix bug 2073482 - remove include <map> 
-   gayyappa    10/29/01 - removed CharSet - bug 1853748 
-   gayyappa    09/21/01 - #include <map>
-   rratnam     06/18/01 - fixed bug1777042 -- HP support for "std"
-   rvallam     06/11/01 - fixed NT porting problem with template functions-
-                          added generic method get(set)VectorOfRefs
-   rratnam     04/25/01 - fixed NT porting bug1673780
-   rvallam     04/12/01 - added dummy parameter in getVector of AnyData
-                          for PObject *
-   rratnam     04/10/01 - removed references to wstring
-   rvallam     04/02/01 - fixed linux porting bug 1654670
-   gayyappa    03/29/01 - remove get/set vector methods for int/float/double/
-                          unsigned int for anydata.
-   rvallam     03/20/01 - added dummy parameter for Type in getVector for
-                          void * in statement and ResultSet
-                          added setVector of Ref<T> and Number prototype
-                          for statement
-   gayyappa    03/15/01 - added parameter to getvector on anydata with void*.
-   rratnam     03/13/01 - added virtual destructor to RefCounted
-   rkasamse    03/15/01 - add an arg, Type, to getVector of void*
-   rratnam     03/06/01 - removed references() from RefCounted
-   slari       02/15/01 - suppress lint warnings
-   rratnam     02/12/01 - removed #include <iostream.h>
-   rvallam     02/07/01 - added enum OCCI_MAX_PREFETCH_DEPTH
-   gayyappa    01/15/01 - change ub4 to unsigned int for
-                          get/set vector methods..
-   gayyappa    01/03/01 - put "using namespace std" in a ifndef
-   gayyappa    12/14/00 - add forward declaration for ResultSetImpl 
-                          and StatementImpl.
-                          Remove commented #defines
-   gayyappa    11/17/00 - change Session to Connection
-   gayyappa    09/12/00 - remove OCCI_SQLT_INT, OCCI_SQLT_FLT 
-                          remove OCCIUNSIGNED_CHAR, OCCISHORT, 
-                          OCCIUNSIGNED_SHORT, OCCILONG ,OCCI_LONGDOUBLE,
-                          OCCI_UNSIGNEDLONG  from enum Type.
-   gayyappa    08/25/00 - add const to get/set vector mthds of anydata.
-   rvallam     08/10/00 - updated Type enum
-   slari       08/04/00 - add OCCIROWID and OCCICURSOR
-   rkasamse    08/04/00 - add setVector methods
-   slari       07/24/00 - add BytesImpl
-   rratnam     07/25/00 - Added forward declarations for LobStreamImpl,
-                          ConnectionPool[Impl], removed those for
-                          Connection[Impl]
-   rkasamse    07/28/00 - add getVector(ResultSet*...) methods
-   rratnam     06/14/00 - Added forward declaration for RefImpl,
-                          added DefaultCharSet to the CharSet 
-                          enum
-   rratnam     06/13/00 - Added DefaultCharSet to the CharSet enum
-   kmohan      05/31/00 - RefCounted no more templated
-   rratnam     22/05/00 - Added forward declaration of ConnectionImpl, and the
-                         LobOpenMode enum
-   kmohan      05/05/00 - Added global routine prototypes
-   rkasamse    05/23/00 -
-   slari       04/28/00 - add forward declaration of SQLExceptionImpl
-   kmohan      04/19/00 - Added enums Type,CharSet,CharSetForm
-   gayyappa    04/18/00 - removed checkStatus. added checkOCICall and 
-                          createSQLEXception functions 
-   kmohan      04/11/00 - Creation
-
-*/
-
-
-#ifndef OCCICOMMON_ORACLE
-# define OCCICOMMON_ORACLE
-
-#ifndef _olint
-
-#ifndef OCI_ORACLE
-#include <oci.h>
-#endif
-
-#ifndef ORASTRINGSTL
-#define ORASTRINGSTL
-#include <string>
-#endif
-
-#ifndef ORAVECTORSTL
-#include <vector>
-#define ORAVECTORSTL
-#endif
-
-#ifndef ORALISTSTL
-#include <list>
-#define ORALISTSTL
-#endif
-
-#define OCCI_STD_NAMESPACE std
-#define OCCI_HAVE_STD_NAMESPACE 1
-
-namespace oracle {
-namespace occi {
-
-//UString is the class for UTF16 characterset
-typedef OCCI_STD_NAMESPACE::basic_string<utext> UString;
-
-class Environment;
-class EnvironmentImpl;
-class Connection;
-class ConnectionImpl;
-class ConnectionPool;
-class ConnectionPoolImpl;
-class StatelessConnectionPool;
-class StatelessConnectionPoolImpl;
-class Statement;
-class StatementImpl;
-class ResultSet;
-class ResultSetImpl;
-class SQLException;
-class SQLExceptionImpl;
-class Stream;
-class PObject;
-class Number;
-class Bytes;
-class BytesImpl;
-class Date;
-class Timestamp;
-
-class MetaData;
-class MetaDataImpl;
-template <class T> class Ref;
-class RefImpl;
-class RefAny;
-class Blob;
-class Bfile;
-class Clob;
-class LobStreamImpl;
-class AnyData;
-class AnyDataImpl;
-class Map;
-class IntervalDS;
-class IntervalYM;
-
-namespace aq {
-class Message;
-class MessageImpl;
-class Agent;
-class AgentImpl;
-class Producer;
-class ProducerImpl;
-class Consumer;
-class ConsumerImpl;
-class Listener;
-class Subscription;
-class SubscriptionImpl;
-class NotifyResult;
-}
-
-typedef struct BFloat BFloat;
-typedef struct BDouble BDouble;
-
-/*---------------------------------------------------------------------------
-                           ENUMERATORS
-  ---------------------------------------------------------------------------*/
-enum Type
-{
- OCCI_SQLT_CHR=SQLT_CHR,
- OCCI_SQLT_NUM=SQLT_NUM,
- OCCIINT = SQLT_INT,
- OCCIFLOAT = SQLT_FLT,
- OCCIBFLOAT = SQLT_BFLOAT,
- OCCIBDOUBLE = SQLT_BDOUBLE,
- OCCIIBFLOAT = SQLT_IBFLOAT,
- OCCIIBDOUBLE = SQLT_IBDOUBLE,
- OCCI_SQLT_STR=SQLT_STR,
- OCCI_SQLT_VNU=SQLT_VNU,
- OCCI_SQLT_PDN=SQLT_PDN,
- OCCI_SQLT_LNG=SQLT_LNG,
- OCCI_SQLT_VCS=SQLT_VCS,
- OCCI_SQLT_NON=SQLT_NON,
- OCCI_SQLT_RID=SQLT_RID,
- OCCI_SQLT_DAT=SQLT_DAT,
- OCCI_SQLT_VBI=SQLT_VBI,
- OCCI_SQLT_BIN=SQLT_BIN,
- OCCI_SQLT_LBI=SQLT_LBI,
- OCCIUNSIGNED_INT = SQLT_UIN,
- OCCI_SQLT_SLS=SQLT_SLS,
- OCCI_SQLT_LVC=SQLT_LVC,
- OCCI_SQLT_LVB=SQLT_LVB,
- OCCI_SQLT_AFC=SQLT_AFC,
- OCCI_SQLT_AVC=SQLT_AVC,
- OCCI_SQLT_CUR=SQLT_CUR,
- OCCI_SQLT_RDD=SQLT_RDD,
- OCCI_SQLT_LAB=SQLT_LAB,
- OCCI_SQLT_OSL=SQLT_OSL,
- OCCI_SQLT_NTY=SQLT_NTY,
- OCCI_SQLT_REF=SQLT_REF,
- OCCI_SQLT_CLOB=SQLT_CLOB,
- OCCI_SQLT_BLOB=SQLT_BLOB,
- OCCI_SQLT_BFILEE=SQLT_BFILEE,
- OCCI_SQLT_CFILEE=SQLT_CFILEE,
- OCCI_SQLT_RSET=SQLT_RSET,
- OCCI_SQLT_NCO=SQLT_NCO,
- OCCI_SQLT_VST=SQLT_VST,
- OCCI_SQLT_ODT=SQLT_ODT,
- OCCI_SQLT_DATE=SQLT_DATE,
- OCCI_SQLT_TIME=SQLT_TIME,
- OCCI_SQLT_TIME_TZ=SQLT_TIME_TZ,
- OCCI_SQLT_TIMESTAMP=SQLT_TIMESTAMP,
- OCCI_SQLT_TIMESTAMP_TZ=SQLT_TIMESTAMP_TZ,
- OCCI_SQLT_INTERVAL_YM=SQLT_INTERVAL_YM,
- OCCI_SQLT_INTERVAL_DS=SQLT_INTERVAL_DS,
- OCCI_SQLT_TIMESTAMP_LTZ=SQLT_TIMESTAMP_LTZ,
- OCCI_SQLT_FILE=SQLT_FILE,
- OCCI_SQLT_CFILE=SQLT_CFILE,
- OCCI_SQLT_BFILE=SQLT_BFILE,
- 
- OCCICHAR = 32 *1024,
- OCCIDOUBLE,
- OCCIBOOL,
- OCCIANYDATA ,
- OCCINUMBER,
- OCCIBLOB,
- OCCIBFILE,
- OCCIBYTES,
- OCCICLOB ,
- OCCIVECTOR,
- OCCIMETADATA,
- OCCIPOBJECT,
- OCCIREF ,
- OCCIREFANY,
- OCCISTRING  ,
- OCCISTREAM  ,
- OCCIDATE  ,
- OCCIINTERVALDS  ,
- OCCIINTERVALYM  ,
- OCCITIMESTAMP,
- OCCIROWID,
- OCCICURSOR
-
-
-};
-
-enum LockOptions {OCCI_LOCK_NONE = OCI_LOCK_NONE,
-                      OCCI_LOCK_X = OCI_LOCK_X, 
-                      OCCI_LOCK_X_NOWAIT = OCI_LOCK_X_NOWAIT
-                     };
-
-enum {OCCI_MAX_PREFETCH_DEPTH = UB4MAXVAL};
-
-enum TypeCode
-{
-
-OCCI_TYPECODE_REF = OCI_TYPECODE_REF,
-OCCI_TYPECODE_DATE = OCI_TYPECODE_DATE,
-OCCI_TYPECODE_REAL = OCI_TYPECODE_REAL,
-OCCI_TYPECODE_DOUBLE = OCI_TYPECODE_DOUBLE,
-OCCI_TYPECODE_BDOUBLE = OCI_TYPECODE_BDOUBLE,
-OCCI_TYPECODE_FLOAT = OCI_TYPECODE_FLOAT,
-OCCI_TYPECODE_BFLOAT = OCI_TYPECODE_BFLOAT,
-OCCI_TYPECODE_NUMBER = OCI_TYPECODE_NUMBER,
-OCCI_TYPECODE_DECIMAL = OCI_TYPECODE_DECIMAL,
-OCCI_TYPECODE_OCTET = OCI_TYPECODE_OCTET,
-OCCI_TYPECODE_INTEGER = OCI_TYPECODE_INTEGER,
-OCCI_TYPECODE_SMALLINT= OCI_TYPECODE_SMALLINT,
-OCCI_TYPECODE_RAW = OCI_TYPECODE_RAW,
-OCCI_TYPECODE_VARCHAR2 = OCI_TYPECODE_VARCHAR2,
-OCCI_TYPECODE_VARCHAR = OCI_TYPECODE_VARCHAR,
-OCCI_TYPECODE_CHAR = OCI_TYPECODE_CHAR,
-OCCI_TYPECODE_VARRAY= OCI_TYPECODE_VARRAY,
-OCCI_TYPECODE_TABLE = OCI_TYPECODE_TABLE,
-OCCI_TYPECODE_CLOB = OCI_TYPECODE_CLOB,
-OCCI_TYPECODE_BLOB = OCI_TYPECODE_BLOB,
-OCCI_TYPECODE_BFILE = OCI_TYPECODE_BFILE,
-OCCI_TYPECODE_OBJECT = OCI_TYPECODE_OBJECT,
-OCCI_TYPECODE_NAMEDCOLLECTION = OCI_TYPECODE_NAMEDCOLLECTION
-};
-
-enum CharSetForm
-{
-  OCCI_SQLCS_IMPLICIT = SQLCS_IMPLICIT // use local db char set
- ,OCCI_SQLCS_NCHAR = SQLCS_NCHAR // use local db nchar set
- ,OCCI_SQLCS_EXPLICIT = SQLCS_EXPLICIT // char set explicitly specified
- ,OCCI_SQLCS_FLEXIBLE = SQLCS_FLEXIBLE // pl/sql flexible parameter
-};
-
-enum LobOpenMode
-{ OCCI_LOB_READONLY = OCI_LOB_READONLY
- ,OCCI_LOB_READWRITE = OCI_LOB_READWRITE
-};
-
-class RefCounted {
-public:
-    RefCounted();
-    virtual ~RefCounted(){} 
-    const RefCounted * newRef() const;
-    void deleteRef() const;
-
-private:
-
-    void onZeroReferences();
-    unsigned long references_;
-  };
-
-template <class T> 
-class ConstPtr
-{
-
-public:
-
-ConstPtr( const T* ptr = 0 );
-ConstPtr( const ConstPtr<T>& mp );
-~ConstPtr();
-const T * operator->() const;
-const T* rawPtr() const;
-
-#ifdef MEMBER_TEMPLATE
-template<class OtherType> operator ConstPtr<OtherType>();
-#endif
-
-protected:
-
-void operator=( const ConstPtr<T>& mp );
-const T* rawPtr_;
-
-};
-
-template <class T>
-class Ptr : public ConstPtr<T> {
-
-public:
-
-Ptr( T* ptr = 0 );
-Ptr( const Ptr<T>& mp );
-void operator=( const Ptr<T>& mp );
-const T * operator->() const;
-T * operator->();
-T* rawPtr() ;
-const T* rawPtr() const;
-
-
-
-#ifdef MEMBER_TEMPLATE
-  template<class OtherType>
-  operator Ptr<OtherType>();
-#endif
-
-};
-
-/*---------------------------------------------------------------------------
-                           EXPORT FUNCTIONS
-  ---------------------------------------------------------------------------*/
-
-  void getVector(const AnyData &any, 
-  OCCI_STD_NAMESPACE::vector<OCCI_STD_NAMESPACE::string> &vect);
-  void getVector(const AnyData &any,
-  OCCI_STD_NAMESPACE::vector<UString> &vect);
-  void getVector( const AnyData &any,
-  OCCI_STD_NAMESPACE::vector<Blob> &vect) ;
-  void getVector( const AnyData &any,
-  OCCI_STD_NAMESPACE::vector<Clob> &vect) ;
-  void getVector( const AnyData &any, 
-  OCCI_STD_NAMESPACE::vector<Bfile> &vect) ;
-  void getVector( const AnyData &any, 
-  OCCI_STD_NAMESPACE::vector<Number> &vect) ;
-  void getVector( const AnyData &any,
-  OCCI_STD_NAMESPACE::vector<BFloat> &vect);
-  void getVector(const AnyData &any,
-  OCCI_STD_NAMESPACE::vector<BDouble> &vect);
-  void getVector( const AnyData &any, 
-  OCCI_STD_NAMESPACE::vector<Bytes> &vect) ;
-  void getVector( const AnyData &any, 
-  OCCI_STD_NAMESPACE::vector<Date> &vect) ;
-  void getVector( const AnyData &any, 
-  OCCI_STD_NAMESPACE::vector<Timestamp> &vect) ;
-  void getVector( const AnyData &any,
-  OCCI_STD_NAMESPACE::vector<IntervalYM> &vect) ;
-  void getVector( const AnyData &any,
-  OCCI_STD_NAMESPACE::vector<IntervalDS> &vect) ;
-  template <class T>
-  void getVectorOfRefs( const AnyData &any, 
-  OCCI_STD_NAMESPACE::vector< Ref<T> > &vect) ;
-  #ifndef WIN32COMMON
-  template <class T>
-  void getVector(const AnyData &any,
-  OCCI_STD_NAMESPACE::vector< Ref<T> > &vect) ;
-  #endif
-  #ifdef WIN32COMMON
-  template <class T>
-  void getVector(const AnyData &any,
-  OCCI_STD_NAMESPACE::vector<T> &vect,
-  void *(*rSQL)(void *));
-  #else
-  template <class T>
-  void getVector(const AnyData &any,
-  OCCI_STD_NAMESPACE::vector<T *> &vect,
-  void *(*rSQL)(void *));
-  #endif
-
-  void setVector( AnyData &any, 
-  const OCCI_STD_NAMESPACE::vector<OCCI_STD_NAMESPACE::string> &vect) ;
-  void setVector( AnyData &any, 
-  const OCCI_STD_NAMESPACE::vector<UString> &vect) ;
-  void setVector( AnyData &any,
-  const OCCI_STD_NAMESPACE::vector<Blob> &vect) ;
-  void setVector( AnyData &any,
-  const OCCI_STD_NAMESPACE::vector<Clob> &vect) ;
-  void setVector( AnyData &any, 
-  const OCCI_STD_NAMESPACE::vector<Bfile> &vect) ;
-  void setVector( AnyData &any,
-  const OCCI_STD_NAMESPACE::vector<BFloat> &vect) ;
-  void setVector( AnyData &any,
-  const OCCI_STD_NAMESPACE::vector<BDouble> &vect) ;
-  void setVector( AnyData &any, 
-  const OCCI_STD_NAMESPACE::vector<Number> &vect) ;
-  void setVector( AnyData &any, 
-  const OCCI_STD_NAMESPACE::vector<Bytes> &vect) ;
-  void setVector( AnyData &any, 
-  const OCCI_STD_NAMESPACE::vector<Date> &vect) ;
-  void setVector( AnyData &any, 
-  const OCCI_STD_NAMESPACE::vector<Timestamp> &vect) ;
-  void setVector( AnyData &any,
-  const OCCI_STD_NAMESPACE::vector<IntervalYM> &vect) ;
-  void setVector( AnyData &any,
-  const OCCI_STD_NAMESPACE::vector<IntervalDS> &vect) ;
-  template <class T>
-  void setVectorOfRefs( AnyData &any, 
-  const OCCI_STD_NAMESPACE::vector< Ref<T> > &vect) ;
-  #ifndef WIN32COMMON
-  template <class T>
-  void setVector( AnyData &any, 
-  const OCCI_STD_NAMESPACE::vector< Ref<T> > &vect) ;
-  #endif
-  #ifdef WIN32COMMON
-  template <class T>
-  void setVector( AnyData &any,
-  const OCCI_STD_NAMESPACE::vector< T > &vect) ;
-  #else
-  template <class T>
-  void setVector( AnyData &any,
-  const OCCI_STD_NAMESPACE::vector< T* > &vect) ;
-  #endif
-
-  void getVector( ResultSet *rs, unsigned int index, 
-  OCCI_STD_NAMESPACE::vector<int> &vect) ;
-  void getVector( ResultSet *rs, unsigned int index, 
-  OCCI_STD_NAMESPACE::vector<OCCI_STD_NAMESPACE::string> &vect) ;
-  void getVector( ResultSet *rs, unsigned int index, 
-  OCCI_STD_NAMESPACE::vector<UString> &vect) ;//UTF16 support
-  void getVector(ResultSet  *rs, unsigned int, 
-  OCCI_STD_NAMESPACE::vector<unsigned int> &vect) ;
-  void getVector(ResultSet  *rs, unsigned int, 
-  OCCI_STD_NAMESPACE::vector<float> &vect); 
-  void getVector(ResultSet  *rs, unsigned int,
-  OCCI_STD_NAMESPACE::vector<BFloat> &vect);
-  void getVector(ResultSet  *rs, unsigned int, 
-  OCCI_STD_NAMESPACE::vector<double> &vect);
-  void getVector(ResultSet  *rs, unsigned int,
-  OCCI_STD_NAMESPACE::vector<BDouble> &vect);
-  void getVector(ResultSet  *rs, unsigned int, 
-  OCCI_STD_NAMESPACE::vector<Date> &vect) ;
-  void getVector(ResultSet  *rs, unsigned int, 
-  OCCI_STD_NAMESPACE::vector<Timestamp> &vect) ;
-  void getVector(ResultSet  *rs, unsigned int, 
-  OCCI_STD_NAMESPACE::vector<RefAny> &vect) ;
-  void getVector(ResultSet  *rs, unsigned int, 
-  OCCI_STD_NAMESPACE::vector<Blob> &vect) ;
-  void getVector(ResultSet  *rs, unsigned int, 
-  OCCI_STD_NAMESPACE::vector<Clob> &vect) ;
-  void getVector(ResultSet  *rs, unsigned int, 
-  OCCI_STD_NAMESPACE::vector<Bfile> &vect) ;
-  void getVector(ResultSet  *rs, unsigned int, 
-  OCCI_STD_NAMESPACE::vector<Number> &vect) ;
-  void getVector(ResultSet  *rs, unsigned int, 
-  OCCI_STD_NAMESPACE::vector<IntervalYM> &vect) ;
-  void getVector(ResultSet  *rs, unsigned int, 
-  OCCI_STD_NAMESPACE::vector<IntervalDS> &vect) ;
-  template <class T>
-  void getVectorOfRefs(ResultSet  *rs, unsigned int,
-  OCCI_STD_NAMESPACE::vector<Ref<T> > &vect) ;
-  #ifndef WIN32COMMON
-  template <class T>
-  void getVector(ResultSet  *rs, unsigned int,
-  OCCI_STD_NAMESPACE::vector<Ref<T> > &vect) ;
-  #endif
-  #ifdef WIN32COMMON
-  template <class T>
-  void getVector( ResultSet *rs, unsigned int index,
-  OCCI_STD_NAMESPACE::vector< T > &vect) ;
-  #else
-  template <class T>
-  void getVector( ResultSet *rs, unsigned int index,
-  OCCI_STD_NAMESPACE::vector< T* > &vect) ;
-  #endif
-
-
-  void getVector(Statement  *rs, unsigned int, 
-  OCCI_STD_NAMESPACE::vector<RefAny> &vect) ;
-  void getVector(Statement  *rs, unsigned int, 
-  OCCI_STD_NAMESPACE::vector<Blob> &vect) ;
-  void getVector(Statement  *rs, unsigned int, 
-  OCCI_STD_NAMESPACE::vector<Clob> &vect) ;
-  void getVector(Statement  *rs, unsigned int, 
-  OCCI_STD_NAMESPACE::vector<Bfile> &vect) ;
-  void getVector(Statement  *rs, unsigned int, 
-  OCCI_STD_NAMESPACE::vector<Number> &vect) ;
-  void getVector(Statement  *rs, unsigned int, 
-  OCCI_STD_NAMESPACE::vector<IntervalYM> &vect) ;
-  void getVector(Statement  *rs, unsigned int, 
-  OCCI_STD_NAMESPACE::vector<IntervalDS> &vect) ;
-  void getVector( Statement *rs, unsigned int index, 
-  OCCI_STD_NAMESPACE::vector<int> &vect) ;
-  void getVector( Statement *rs, unsigned int index,
-  OCCI_STD_NAMESPACE::vector<OCCI_STD_NAMESPACE::string> &vect) ;
-  void getVector( Statement *rs, unsigned int index,
-  OCCI_STD_NAMESPACE::vector<UString> &vect) ;//UTF16 support
-  void getVector(Statement  *rs, unsigned int, 
-  OCCI_STD_NAMESPACE::vector<unsigned int> &vect) ;
-  void getVector(Statement  *rs, unsigned int, 
-  OCCI_STD_NAMESPACE::vector<float> &vect) ;
-  void getVector(Statement  *rs, unsigned int,
-  OCCI_STD_NAMESPACE::vector<BFloat> &vect) ;
-  void getVector(Statement  *rs, unsigned int, 
-  OCCI_STD_NAMESPACE::vector<double> &vect) ;
-  void getVector(Statement  *rs, unsigned int,
-  OCCI_STD_NAMESPACE::vector<BDouble> &vect) ;
-  void getVector(Statement  *rs, unsigned int, 
-  OCCI_STD_NAMESPACE::vector<Date> &vect) ;
-  void getVector(Statement  *rs, unsigned int, 
-  OCCI_STD_NAMESPACE::vector<Timestamp> &vect) ;
-  template <class T>
-  void getVectorOfRefs(Statement  *rs, unsigned int,
-  OCCI_STD_NAMESPACE::vector<Ref<T> > &vect) ;
-  #ifndef WIN32COMMON
-  template <class T>
-  void getVector(Statement  *rs, unsigned int,
-  OCCI_STD_NAMESPACE::vector<Ref<T> > &vect) ;
-  #endif
-  #ifdef WIN32COMMON
-  template <class T>
-  void getVector( Statement *rs, unsigned int index,
-  OCCI_STD_NAMESPACE::vector< T > &vect) ;
-  #else
-  template <class T>
-  void getVector( Statement *rs, unsigned int index,
-  OCCI_STD_NAMESPACE::vector< T* > &vect) ;
-  #endif
-
-
-  void setVector(Statement *stmt, unsigned int paramIndex, 
-                 const OCCI_STD_NAMESPACE::vector<int> &vect, 
-                 const OCCI_STD_NAMESPACE::string &sqltype) ;
-  void setVector(Statement *stmt, unsigned int paramIndex, 
-                 const OCCI_STD_NAMESPACE::vector<unsigned int> &vect, 
-                 const OCCI_STD_NAMESPACE::string &sqltype) ;
-  void setVector(Statement *stmt, unsigned int paramIndex, 
-                 const OCCI_STD_NAMESPACE::vector<double> &vect, 
-                 const OCCI_STD_NAMESPACE::string &sqltype) ;
-  void setVector(Statement *stmt, unsigned int paramIndex,
-                 const OCCI_STD_NAMESPACE::vector<BDouble> &vect,
-                 const OCCI_STD_NAMESPACE::string &sqltype) ;
-  void setVector(Statement *stmt, unsigned int paramIndex, 
-                 const OCCI_STD_NAMESPACE::vector<float> &vect, 
-                 const OCCI_STD_NAMESPACE::string &sqltype) ;
-  void setVector(Statement *stmt, unsigned int paramIndex,
-                 const OCCI_STD_NAMESPACE::vector<BFloat> &vect,
-                 const OCCI_STD_NAMESPACE::string &sqltype) ;
-  void setVector(Statement *stmt, unsigned int paramIndex,
-                 const OCCI_STD_NAMESPACE::vector<Number> &vect,
-                 const OCCI_STD_NAMESPACE::string &sqltype);
-  void setVector(Statement *stmt, unsigned int paramIndex, 
-         const OCCI_STD_NAMESPACE::vector<OCCI_STD_NAMESPACE::string> &vect,
-         const OCCI_STD_NAMESPACE::string &sqltype) ;
-  void setVector(Statement *stmt, unsigned int paramIndex, 
-                 const OCCI_STD_NAMESPACE::vector<RefAny> &vect, 
-                 const OCCI_STD_NAMESPACE::string &sqltype) ;
-  void setVector(Statement *stmt, unsigned int paramIndex, 
-                 const OCCI_STD_NAMESPACE::vector<Blob> &vect, 
-                 const OCCI_STD_NAMESPACE::string &sqltype) ;
-  void setVector(Statement *stmt, unsigned int paramIndex, 
-                 const OCCI_STD_NAMESPACE::vector<Clob> &vect, 
-                 const OCCI_STD_NAMESPACE::string &sqltype) ;
-  void setVector(Statement *stmt, unsigned int paramIndex, 
-                 const OCCI_STD_NAMESPACE::vector<Bfile> &vect, 
-                 const OCCI_STD_NAMESPACE::string &sqltype) ;
-  void setVector(Statement *stmt, unsigned int paramIndex, 
-                 const OCCI_STD_NAMESPACE::vector<Timestamp> &vect, 
-                 const OCCI_STD_NAMESPACE::string &sqltype) ;
-  void setVector(Statement *stmt, unsigned int paramIndex, 
-                 const OCCI_STD_NAMESPACE::vector<IntervalDS> &vect, 
-                 const OCCI_STD_NAMESPACE::string &sqltype) ;
-  void setVector(Statement *stmt, unsigned int paramIndex, 
-                 const OCCI_STD_NAMESPACE::vector<IntervalYM> &vect, 
-                 const OCCI_STD_NAMESPACE::string &sqltype) ;
-  void setVector(Statement *stmt, unsigned int paramIndex, 
-                 const OCCI_STD_NAMESPACE::vector<Date> &vect, 
-                 const OCCI_STD_NAMESPACE::string &sqltype) ;
-  template  <class T>
-  void setVectorOfRefs(Statement *stmt, unsigned int paramIndex,
-  const OCCI_STD_NAMESPACE::vector<Ref<T> > &vect,
-  const OCCI_STD_NAMESPACE::string &sqltype) ;
-  #ifndef WIN32COMMON
-  template  <class T>
-  void setVector(Statement *stmt, unsigned int paramIndex,
-  const OCCI_STD_NAMESPACE::vector<Ref<T> > &vect,
-  const OCCI_STD_NAMESPACE::string &sqltype) ;
-  #endif
-  #ifdef WIN32COMMON
-  template <class T>
-  void setVector( Statement *stmt, unsigned int paramIndex, 
-                  const OCCI_STD_NAMESPACE::vector< T > &vect, 
-                  const OCCI_STD_NAMESPACE::string   &sqltype) ;
-  #else
-  template <class T>
-  void setVector( Statement *stmt, unsigned int paramIndex,
-                  const OCCI_STD_NAMESPACE::vector<T* > &vect, 
-                  const OCCI_STD_NAMESPACE::string &sqltype) ;
-  #endif
-
-/* -----------------------------------------------------------------------------------
-   Statement setVector functions, schema & type separate arguments - multibyte support
-   -----------------------------------------------------------------------------------
-*/
-  void setVector(Statement *stmt, unsigned int paramIndex, 
-                 const OCCI_STD_NAMESPACE::vector<int> &vect, 
-                 const OCCI_STD_NAMESPACE::string &schemaName,
-                 const OCCI_STD_NAMESPACE::string &typeName) ;
-  void setVector(Statement *stmt, unsigned int paramIndex, 
-                 const OCCI_STD_NAMESPACE::vector<unsigned int> &vect, 
-                 const OCCI_STD_NAMESPACE::string &schemaName,
-                 const OCCI_STD_NAMESPACE::string &typeName) ;
-  void setVector(Statement *stmt, unsigned int paramIndex, 
-                 const OCCI_STD_NAMESPACE::vector<double> &vect, 
-                 const OCCI_STD_NAMESPACE::string &schemaName,
-                 const OCCI_STD_NAMESPACE::string &typeName) ;
-  void setVector(Statement *stmt, unsigned int paramIndex,
-                 const OCCI_STD_NAMESPACE::vector<BDouble> &vect,
-                 const OCCI_STD_NAMESPACE::string &schemaName,
-                 const OCCI_STD_NAMESPACE::string &typeName) ;
-  void setVector(Statement *stmt, unsigned int paramIndex, 
-                 const OCCI_STD_NAMESPACE::vector<float> &vect, 
-                 const OCCI_STD_NAMESPACE::string &schemaName,
-                 const OCCI_STD_NAMESPACE::string &typeName) ;
-  void setVector(Statement *stmt, unsigned int paramIndex,
-                 const OCCI_STD_NAMESPACE::vector<BFloat> &vect,
-                 const OCCI_STD_NAMESPACE::string &schemaName,
-                 const OCCI_STD_NAMESPACE::string &typeName) ;
-  void setVector(Statement *stmt, unsigned int paramIndex,
-                 const OCCI_STD_NAMESPACE::vector<Number> &vect,
-                 const OCCI_STD_NAMESPACE::string &schemaName,
-                 const OCCI_STD_NAMESPACE::string &typeName);
-  void setVector(Statement *stmt, unsigned int paramIndex, 
-         const OCCI_STD_NAMESPACE::vector<OCCI_STD_NAMESPACE::string> &vect,
-         const OCCI_STD_NAMESPACE::string &schemaName,
-         const OCCI_STD_NAMESPACE::string &typeName) ;
-  void setVector(Statement *stmt, unsigned int paramIndex, 
-                 const OCCI_STD_NAMESPACE::vector<RefAny> &vect, 
-                 const OCCI_STD_NAMESPACE::string &schemaName,
-                 const OCCI_STD_NAMESPACE::string &typeName) ;
-  void setVector(Statement *stmt, unsigned int paramIndex, 
-                 const OCCI_STD_NAMESPACE::vector<Blob> &vect, 
-                 const OCCI_STD_NAMESPACE::string &schemaName,
-                 const OCCI_STD_NAMESPACE::string &typeName) ;
-  void setVector(Statement *stmt, unsigned int paramIndex, 
-                 const OCCI_STD_NAMESPACE::vector<Clob> &vect, 
-                 const OCCI_STD_NAMESPACE::string &schemaName,
-                 const OCCI_STD_NAMESPACE::string &typeName) ;
-  void setVector(Statement *stmt, unsigned int paramIndex, 
-                 const OCCI_STD_NAMESPACE::vector<Bfile> &vect, 
-                 const OCCI_STD_NAMESPACE::string &schemaName,
-                 const OCCI_STD_NAMESPACE::string &typeName) ;
-  void setVector(Statement *stmt, unsigned int paramIndex, 
-                 const OCCI_STD_NAMESPACE::vector<Timestamp> &vect, 
-                 const OCCI_STD_NAMESPACE::string &schemaName,
-                 const OCCI_STD_NAMESPACE::string &typeName) ;
-  void setVector(Statement *stmt, unsigned int paramIndex, 
-                 const OCCI_STD_NAMESPACE::vector<IntervalDS> &vect, 
-                 const OCCI_STD_NAMESPACE::string &schemaName,
-                 const OCCI_STD_NAMESPACE::string &typeName) ;
-  void setVector(Statement *stmt, unsigned int paramIndex, 
-                 const OCCI_STD_NAMESPACE::vector<IntervalYM> &vect, 
-                 const OCCI_STD_NAMESPACE::string &schemaName,
-                 const OCCI_STD_NAMESPACE::string &typeName) ;
-  void setVector(Statement *stmt, unsigned int paramIndex, 
-                 const OCCI_STD_NAMESPACE::vector<Date> &vect, 
-                 const OCCI_STD_NAMESPACE::string &schemaName,
-                 const OCCI_STD_NAMESPACE::string &typeName) ;
-  template  <class T>
-  void setVectorOfRefs(Statement *stmt, unsigned int paramIndex,
-  const OCCI_STD_NAMESPACE::vector<Ref<T> > &vect,
-  const OCCI_STD_NAMESPACE::string &schemaName,
-  const OCCI_STD_NAMESPACE::string &typeName) ;
-
-  #ifndef WIN32COMMON
-  template  <class T>
-  void setVector(Statement *stmt, unsigned int paramIndex,
-  const OCCI_STD_NAMESPACE::vector<Ref<T> > &vect,
-  const OCCI_STD_NAMESPACE::string &schemaName,
-  const OCCI_STD_NAMESPACE::string &typeName) ;
-  #endif
-
-  #ifdef WIN32COMMON
-  template <class T>
-  void setVector( Statement *stmt, unsigned int paramIndex, 
-                  const OCCI_STD_NAMESPACE::vector< T > &vect, 
-                  const OCCI_STD_NAMESPACE::string &schemaName,
-                  const OCCI_STD_NAMESPACE::string &typeName) ;
-  #else
-  template <class T>
-  void setVector( Statement *stmt, unsigned int paramIndex,
-  const OCCI_STD_NAMESPACE::vector<T* > &vect, const OCCI_STD_NAMESPACE::string
-  &schemaName, const OCCI_STD_NAMESPACE::string &typeName) ;
-  #endif
-
-/*-------------------------------------------------------------------------
-  Statement setVector function - UTF16 support
-  -------------------------------------------------------------------------
-*/
-  void setVector(Statement *stmt, unsigned int paramIndex, 
-                 const OCCI_STD_NAMESPACE::vector<int> &vect, 
-                 const UString &schemaName,
-                 const UString &typeName) ;
-  void setVector(Statement *stmt, unsigned int paramIndex, 
-                 const OCCI_STD_NAMESPACE::vector<unsigned int> &vect, 
-                 const UString &schemaName,
-                 const UString &typeName) ;
-  void setVector(Statement *stmt, unsigned int paramIndex, 
-                 const OCCI_STD_NAMESPACE::vector<double> &vect, 
-                 const UString &schemaName,
-                 const UString &typeName) ;
-  void setVector(Statement *stmt, unsigned int paramIndex,
-                 const OCCI_STD_NAMESPACE::vector<BDouble> &vect,
-                 const UString &schemaName,
-                 const UString &typeName) ;
-  void setVector(Statement *stmt, unsigned int paramIndex, 
-                 const OCCI_STD_NAMESPACE::vector<float> &vect, 
-                 const UString &schemaName,
-                 const UString &typeName) ;
-  void setVector(Statement *stmt, unsigned int paramIndex,
-                 const OCCI_STD_NAMESPACE::vector<BFloat> &vect,
-                 const UString &schemaName,
-                 const UString &typeName) ;
-  void setVector(Statement *stmt, unsigned int paramIndex,
-                 const OCCI_STD_NAMESPACE::vector<Number> &vect,
-                 const UString &schemaName,
-                 const UString &typeName);
-  void setVector(Statement *stmt, unsigned int paramIndex, 
-                 const OCCI_STD_NAMESPACE::vector<UString> &vect,
-                 const UString &schemaName,
-                 const UString &typeName) ;
-  void setVector(Statement *stmt, unsigned int paramIndex, 
-                 const OCCI_STD_NAMESPACE::vector<UString> &vect,
-                 const OCCI_STD_NAMESPACE::string &schemaName,
-                 const OCCI_STD_NAMESPACE::string &typeName) ;
-  void setVector(Statement *stmt, unsigned int paramIndex, 
-                 const OCCI_STD_NAMESPACE::vector<RefAny> &vect, 
-                 const UString &schemaName,
-                 const UString &typeName) ;
-  void setVector(Statement *stmt, unsigned int paramIndex, 
-                 const OCCI_STD_NAMESPACE::vector<Blob> &vect, 
-                 const UString &schemaName,
-                 const UString &typeName) ;
-  void setVector(Statement *stmt, unsigned int paramIndex, 
-                 const OCCI_STD_NAMESPACE::vector<Clob> &vect, 
-                 const UString &schemaName,
-                 const UString &typeName) ;
-  void setVector(Statement *stmt, unsigned int paramIndex, 
-                 const OCCI_STD_NAMESPACE::vector<Bfile> &vect, 
-                 const UString &schemaName,
-                 const UString &typeName) ;
-  void setVector(Statement *stmt, unsigned int paramIndex, 
-                 const OCCI_STD_NAMESPACE::vector<Timestamp> &vect, 
-                 const UString &schemaName,
-                 const UString &typeName) ;
-  void setVector(Statement *stmt, unsigned int paramIndex, 
-                 const OCCI_STD_NAMESPACE::vector<IntervalDS> &vect, 
-                 const UString &schemaName,
-                 const UString &typeName) ;
-  void setVector(Statement *stmt, unsigned int paramIndex, 
-                 const OCCI_STD_NAMESPACE::vector<IntervalYM> &vect, 
-                 const UString &schemaName,
-                 const UString &typeName) ;
-  void setVector(Statement *stmt, unsigned int paramIndex, 
-                 const OCCI_STD_NAMESPACE::vector<Date> &vect, 
-                 const UString &schemaName,
-                 const UString &typeName) ;
-  template  <class T>
-  void setVectorOfRefs(Statement *stmt, unsigned int paramIndex,
-  const OCCI_STD_NAMESPACE::vector<Ref<T> > &vect,
-  const UString &schemaName,
-  const UString &typeName) ;
-
-  #ifndef WIN32COMMON
-  template  <class T>
-  void setVector(Statement *stmt, unsigned int paramIndex,
-  const OCCI_STD_NAMESPACE::vector<Ref<T> > &vect,
-  const UString &schemaName,
-  const UString &typeName) ;
-  #endif
-
-  #ifdef WIN32COMMON
-  template <class T>
-  void setVector( Statement *stmt, unsigned int paramIndex, 
-                  const OCCI_STD_NAMESPACE::vector< T > &vect, 
-                  const UString &schemaName,
-                  const UString &typeName) ;
-  #else
-  template <class T>
-  void setVector( Statement *stmt, unsigned int paramIndex,
-  const OCCI_STD_NAMESPACE::vector<T* > &vect, const UString
-  &schemaName, const UString &typeName) ;
-  #endif
-
-
-/* Global method for array pins */
-template <class T>
-void pinVectorOfRefs( const Connection *conn,
-OCCI_STD_NAMESPACE::vector<Ref<T> > &vect,
-OCCI_STD_NAMESPACE::vector<T* > &vectObj, 
-LockOptions lockOpt = OCCI_LOCK_NONE );
-
-template <class T>
-void pinVectorOfRefs( const Connection *conn,
-OCCI_STD_NAMESPACE::vector<Ref<T> > &vect,
-LockOptions lockOpt = OCCI_LOCK_NONE );
-
-/*---------------------------------------------------------------------------
-                          INTERNAL FUNCTIONS
-  ---------------------------------------------------------------------------*/
-
-
-} /* end of namespace occi */
-} /* end of namespace oracle */
-#endif /* _olint */
-
-#endif                                              /* OCCICOMMON_ORACLE */
diff --git a/src/terralib/drivers/OracleSpatial/OCI/include/occiControl.h b/src/terralib/drivers/OracleSpatial/OCI/include/occiControl.h
deleted file mode 100644
index aaeee82..0000000
--- a/src/terralib/drivers/OracleSpatial/OCI/include/occiControl.h
+++ /dev/null
@@ -1,2060 +0,0 @@
-/* Copyright  Oracle Corporation 2000, 2001. All Rights Reserved. */ 
- 
-/* 
-   NAME 
-     occiControl.h - header file for OCCI control classes
-
-   DESCRIPTION 
-     Class definitions for MetaData,SQLException,Environment,
-     Connection,Statement, ConnectionPool, StatelessConnectionPool
-
-   RELATED DOCUMENTS 
-     <note any documents related to this facility>
- 
-   EXPORT FUNCTION(S) 
-     <external functions declared for use outside package - one-line 
-     descriptions>
-
-   INTERNAL FUNCTION(S)
-     <other external functions declared - one-line descriptions>
-
-   EXAMPLES
-
-   NOTES
-     <other useful comments, qualifications, etc.>
-
-   MODIFIED   (MM/DD/YY)
-   rvadraha    09/30/03 - New Binary/CharacterStreamMode for Statement class
-   rvallam     02/12/03 - modify BFloat/BDouble interface to use the new 
-                          BFloat/BDouble type 
-   shiyer      01/21/03 - add getPoolNameUString to ConnectionPool
-   shiyer      12/19/02 - Add cache sorted flush get/set to Environment
-   shiyer      12/31/02 - added OCI_ATTR_CHAR_SIZE to typeattr attrs
-   shiyer      12/09/02 - ensure new virtual interfaces are in order
-   cparampa    10/12/02 - AQ Additions
-   rvallam     10/12/02 - added  new methods for array pin 
-   shiyer      10/09/02 - Statement caching, Stateless Connection
-                          Pooling - UTF16 support. Added NLS versions
-                          of getErrorMessage in SQLException
-   rvallam     10/11/02 - added native float/double API - get(set) methods
-                          for Statement and ResultSet class
-   cparampa    09/23/02 - added methods for statement caching
-   shiyer      10/01/02 - setVector versions for Windows
-   shiyer      07/31/02 - 10iR1, OCCI Globalization support
-   cparampa    09/23/02 - added methods for statement caching 
-   praghuna    09/23/02 - 2333038:Fwd merge to 10i/MAIN 
-   cparampa    08/26/02 - added class StatelessConnectionPool
-                          added create/terminateStatelessConnnectionPool in Env 
-   vvinay      08/06/02 - XA additions
-   vvinay      06/25/02 - fix #2415021: math moved to occiHeapAlloc.h
-   aahluwal    06/04/02 - bug 2360115
-   vvinay      02/21/02 - operator= added for SQLException
-   gayyappa    12/27/01 - add set/getDatabaseNCharParam 
-   gayyappa    11/22/01 - modify interface to use strings for CharSet
-   gayyappa    10/01/01 - call reserve() on vector in set/getVector 
-   rkasamse    07/30/01 - 
-   rkasamse    07/26/01 - add env handle attrs - cache max/opt size
-   rvallam     07/23/01 - bug 1891228 - added throw() in destructor
-                          of SQLException
-   rvallam     06/14/01 - replace call to get(set)VectorOfRefs in 
-                          get(set)Vector for Ref<T> with code in 
-                          get(set)VectorOfRefs
-   rvallam     11/06/01 - renamed internal methods in get/setVector to
-                          get(set)VectorOfPObjects/get(set)VectorOfOCIRefs
-                          as part of NT porting fix
-                          added destructors to SQLException and MetaData
-   rvallam     05/03/01 - added const to the vector parameter in setVector
-                          of Statement for Ref<T>
-   rratnam     04/10/01 - removed references to wstring
-   kmohan      04/04/01 - include math.h for WIN32COMMON
-   rvallam     04/02/01 - fixed linux porting bug 1654670
-   gayyappa    03/27/01 - add code for templated getVector on stmt for objects.
-   rvallam     03/20/01 - passed dummy parameter for Type in getVector for
-                          void * in statement and ResultSet
-   rratnam     03/15/01 - fixed set and getRef / get and setVector for NULL 
-                          Refs
-   rkasamse    03/19/01 - 1676579: HP compilation errors
-   rratnam     03/07/01 - derived SQLException from exception, added what()
-   chliang     03/05/01 - disable olint
-   rvallam     02/23/01 - made getReadSQL/getWriteSQL methods const
-   rratnam     01/29/01 - add closeStream() to Statement/ResultSet 
-   rvallam     01/30/01 - added private method getListType() to
-                          MetaData
-   rratnam     01/03/01 - removed preTruncationLength() and isTruncated(),
-                          added setBinary/CharacterStreamMode()
-   rratnam     01/03/01 - added new method setErrorOnBusy in ConnectionPool 
-   rratnam     12/29/00 - added a createProxyConnection without roles
-   gayyappa    12/14/00 - add virtual functions getStatement/getConnection
-                          to resultset and statement (fix bug# 1529888)
-   gayyappa    12/13/00 - remove setErrorOnTruncate from Statement/resultset.
-   rvallam     11/30/00 - removed #define NEVER
-   gayyappa    11/17/00 - split get method in Map to getReadSQL
-                          and getWriteSQL    
-   rvallam     10/20/00 - modify cacheflush() to flushCache()
-                          added enums to MetaData
-   rvallam     09/14/00 - uncomment result set getMetaData method
-                          rename it to getColumnListMetaData.
-                          add get/set interval methods to stmt.
-                          add getinterval methods to resultset.
-   gayyappa    08/30/00 - added virtual destructor to occiconnection.
-                          add default values to registerOutParam in
-                          occistatement.
-                          removed get/set vector and anydata in statement.
-                          removed Stream header in ifdef directive.
-   rvallam     08/10/00 - uncomment gets(), update occiConnection, update
-                          Stream
-   slari       08/06/00 - add statement stream methods
-   slari       08/04/00 - add Statement::getXXX methods
-   slari       08/02/00 - add Stream
-   rratnam     08/04/00 - put in connection-cloning, proxy connections
-   rvallam     08/04/00 - changed metadata header - method signatures
-   rkasamse    08/04/00 - add setObject,setRef methods on Statement
-   slari       07/27/00 - add Statement::setNull
-   slari       07/26/00 - disable getBytes
-   slari       07/25/00 - enable getBytes and getRowid
-   rratnam     07/25/00 - Conn Pooling changes - added ConnectionPool,
-                          Connection, removed Session
-                          modified Environment (made getOCIEnvironment(),
-                          getMap() and getMode() const,
-                          added create/terminateConnectionPool(),
-                          added userName and password to createConnection() )
-   rkasamse    07/26/00 - uncomment getObject methods
-   slari       07/10/00 - enable getString
-   slari       07/05/00 - add result set methods
-   rkasamse    07/17/00 - add get function to Map
-   rratnam     06/16/00 - updated Session::getMetaData() to take the
-                          parameter type
-   rvallam     06/13/00 - updated MetaData
-   rratnam     06/13/00 - added getRef() to Statement
-                           and ResultSet,
-                           made getOCIError(), getOCIEnvironment()
-                           and getOCIServiceContext() in
-                           Connection const
-   kmohan      05/31/00 - Datamember Session * changed to 
-                          SessionImpl *
-                          in the class MetaData
-                          change ORASTRINGSTL to ORASTRING
-   slari       05/26/00 - change ORAVECTOR to ORAVECTORSTL
-   slari       05/22/00 - add initial Statement class methods
-   slari       05/10/00 - enable Connection and Session methods
-   slari       04/21/00 - provide trivial implementation for 
-                          ~Connection
-   slari       04/17/00 - make Environment methods abstract
-   slari       04/13/00 - add Environment
-   gayyappa    04/18/00 - changed defn of SQLException
-   kmohan      04/11/00 - added class definitions
-   rkasamse    04/03/00 - header (interface) files for OCCI 
-                          control classes.
-   rkasamse    04/03/00 - Creation
-
-*/
-
-#ifndef _olint   /* disable olint check */
-
-#ifndef OCCICONTROL_ORACLE
-# define OCCICONTROL_ORACLE
-
-#ifndef OCCICOMMON_ORACLE
-#include <occiCommon.h>
-#endif
-
-#ifndef ORAEXCEPTION
-#define ORAEXCEPTION
-#include <exception>
-#endif
-
-namespace oracle {
-namespace occi {
-/*---------------------------------------------------------------------------
-                     PUBLIC TYPES AND CONSTANTS
-  ---------------------------------------------------------------------------*/
-
-class MetaData
-{
-  public :
-    
-      enum AttrId 
-      {ATTR_PTYPE = OCI_ATTR_PTYPE,
-      ATTR_TIMESTAMP = OCI_ATTR_TIMESTAMP, 
-      ATTR_OBJ_ID = OCI_ATTR_OBJ_ID,
-      ATTR_OBJ_NAME = OCI_ATTR_OBJ_NAME, 
-      ATTR_OBJ_SCHEMA = OCI_ATTR_OBJ_SCHEMA,
-      ATTR_OBJID = OCI_ATTR_OBJID,
-      ATTR_NUM_COLS = OCI_ATTR_NUM_COLS,
-      ATTR_LIST_COLUMNS = OCI_ATTR_LIST_COLUMNS,
-      ATTR_REF_TDO = OCI_ATTR_REF_TDO,
-      ATTR_IS_TEMPORARY = OCI_ATTR_IS_TEMPORARY,
-      ATTR_IS_TYPED = OCI_ATTR_IS_TYPED,
-      ATTR_DURATION = OCI_ATTR_DURATION,
-      ATTR_COLLECTION_ELEMENT = OCI_ATTR_COLLECTION_ELEMENT,
-      ATTR_RDBA = OCI_ATTR_RDBA,
-      ATTR_TABLESPACE = OCI_ATTR_TABLESPACE,
-      ATTR_CLUSTERED = OCI_ATTR_CLUSTERED,
-      ATTR_PARTITIONED = OCI_ATTR_PARTITIONED,
-      ATTR_INDEX_ONLY = OCI_ATTR_INDEX_ONLY,
-      ATTR_LIST_ARGUMENTS = OCI_ATTR_LIST_ARGUMENTS,
-      ATTR_IS_INVOKER_RIGHTS = OCI_ATTR_IS_INVOKER_RIGHTS,
-      ATTR_LIST_SUBPROGRAMS = OCI_ATTR_LIST_SUBPROGRAMS,
-      ATTR_NAME = OCI_ATTR_NAME,
-      ATTR_OVERLOAD_ID = OCI_ATTR_OVERLOAD_ID,
-      ATTR_TYPECODE = OCI_ATTR_TYPECODE,
-      ATTR_COLLECTION_TYPECODE = OCI_ATTR_COLLECTION_TYPECODE,
-      ATTR_VERSION = OCI_ATTR_VERSION,
-      ATTR_IS_INCOMPLETE_TYPE = OCI_ATTR_IS_INCOMPLETE_TYPE,
-      ATTR_IS_SYSTEM_TYPE = OCI_ATTR_IS_SYSTEM_TYPE,
-      ATTR_IS_PREDEFINED_TYPE = OCI_ATTR_IS_PREDEFINED_TYPE,
-      ATTR_IS_TRANSIENT_TYPE = OCI_ATTR_IS_TRANSIENT_TYPE,
-      ATTR_IS_SYSTEM_GENERATED_TYPE = 
-              OCI_ATTR_IS_SYSTEM_GENERATED_TYPE,
-      ATTR_HAS_NESTED_TABLE = OCI_ATTR_HAS_NESTED_TABLE,
-      ATTR_HAS_LOB = OCI_ATTR_HAS_LOB,
-      ATTR_HAS_FILE = OCI_ATTR_HAS_FILE,
-      ATTR_NUM_TYPE_ATTRS = OCI_ATTR_NUM_TYPE_ATTRS,
-      ATTR_LIST_TYPE_ATTRS = OCI_ATTR_LIST_TYPE_ATTRS,
-      ATTR_NUM_TYPE_METHODS = OCI_ATTR_NUM_TYPE_METHODS, 
-      ATTR_LIST_TYPE_METHODS = OCI_ATTR_LIST_TYPE_METHODS,
-      ATTR_MAP_METHOD = OCI_ATTR_MAP_METHOD,
-      ATTR_ORDER_METHOD = OCI_ATTR_ORDER_METHOD,
-      ATTR_DATA_SIZE = OCI_ATTR_DATA_SIZE,
-      ATTR_DATA_TYPE = OCI_ATTR_DATA_TYPE,
-      ATTR_PRECISION = OCI_ATTR_PRECISION,
-      ATTR_SCALE = OCI_ATTR_SCALE,
-      ATTR_TYPE_NAME = OCI_ATTR_TYPE_NAME,
-      ATTR_SCHEMA_NAME = OCI_ATTR_SCHEMA_NAME,
-      ATTR_CHARSET_ID = OCI_ATTR_CHARSET_ID,
-      ATTR_CHARSET_FORM = OCI_ATTR_CHARSET_FORM,
-      ATTR_ENCAPSULATION = OCI_ATTR_ENCAPSULATION,
-      ATTR_IS_CONSTRUCTOR = OCI_ATTR_IS_CONSTRUCTOR,
-      ATTR_IS_DESTRUCTOR = OCI_ATTR_IS_DESTRUCTOR,
-      ATTR_IS_OPERATOR = OCI_ATTR_IS_OPERATOR,
-      ATTR_IS_SELFISH = OCI_ATTR_IS_SELFISH,
-      ATTR_IS_MAP = OCI_ATTR_IS_MAP,
-      ATTR_IS_ORDER = OCI_ATTR_IS_ORDER,
-      ATTR_IS_RNDS = OCI_ATTR_IS_RNDS,
-      ATTR_IS_RNPS = OCI_ATTR_IS_RNPS,
-      ATTR_IS_WNDS = OCI_ATTR_IS_WNDS,
-      ATTR_IS_WNPS = OCI_ATTR_IS_WNPS,
-      ATTR_NUM_ELEMS = OCI_ATTR_NUM_ELEMS,
-      ATTR_LINK = OCI_ATTR_LINK,
-      ATTR_MIN = OCI_ATTR_MIN,
-      ATTR_MAX = OCI_ATTR_MAX,
-      ATTR_INCR = OCI_ATTR_INCR,
-      ATTR_CACHE = OCI_ATTR_CACHE,
-      ATTR_ORDER = OCI_ATTR_ORDER,
-      ATTR_HW_MARK  = OCI_ATTR_HW_MARK,
-      ATTR_IS_NULL = OCI_ATTR_IS_NULL,
-      ATTR_POSITION = OCI_ATTR_POSITION,
-      ATTR_HAS_DEFAULT =  OCI_ATTR_HAS_DEFAULT,
-      ATTR_LEVEL = OCI_ATTR_LEVEL,
-      ATTR_IOMODE = OCI_ATTR_IOMODE,
-      ATTR_RADIX = OCI_ATTR_RADIX,
-      ATTR_SUB_NAME = OCI_ATTR_SUB_NAME,
-      ATTR_LIST_OBJECTS = OCI_ATTR_LIST_OBJECTS,
-      ATTR_NCHARSET_ID = OCI_ATTR_NCHARSET_ID,
-      ATTR_LIST_SCHEMAS = OCI_ATTR_LIST_SCHEMAS,
-      ATTR_MAX_PROC_LEN = OCI_ATTR_MAX_PROC_LEN,
-      ATTR_MAX_COLUMN_LEN = OCI_ATTR_MAX_COLUMN_LEN,
-      ATTR_CURSOR_COMMIT_BEHAVIOR = 
-          OCI_ATTR_CURSOR_COMMIT_BEHAVIOR,
-      ATTR_MAX_CATALOG_NAMELEN = OCI_ATTR_MAX_CATALOG_NAMELEN,
-      ATTR_CATALOG_LOCATION = OCI_ATTR_CATALOG_LOCATION,
-      ATTR_SAVEPOINT_SUPPORT =  OCI_ATTR_SAVEPOINT_SUPPORT,
-      ATTR_NOWAIT_SUPPORT =  OCI_ATTR_NOWAIT_SUPPORT,
-      ATTR_AUTOCOMMIT_DDL =  OCI_ATTR_AUTOCOMMIT_DDL,
-      ATTR_LOCKING_MODE =  OCI_ATTR_LOCKING_MODE,
-      ATTR_IS_FINAL_TYPE = OCI_ATTR_IS_FINAL_TYPE,
-      ATTR_IS_INSTANTIABLE_TYPE = OCI_ATTR_IS_INSTANTIABLE_TYPE,
-      ATTR_IS_SUBTYPE = OCI_ATTR_IS_SUBTYPE,
-      ATTR_SUPERTYPE_SCHEMA_NAME = OCI_ATTR_SUPERTYPE_SCHEMA_NAME,
-      ATTR_SUPERTYPE_NAME = OCI_ATTR_SUPERTYPE_NAME,
-      ATTR_FSPRECISION = OCI_ATTR_FSPRECISION,
-      ATTR_LFPRECISION = OCI_ATTR_LFPRECISION,
-      ATTR_IS_FINAL_METHOD = OCI_ATTR_IS_FINAL_METHOD,
-      ATTR_IS_INSTANTIABLE_METHOD = OCI_ATTR_IS_INSTANTIABLE_METHOD,
-      ATTR_IS_OVERRIDING_METHOD = OCI_ATTR_IS_OVERRIDING_METHOD,
-      ATTR_CHAR_USED = OCI_ATTR_CHAR_USED,
-      ATTR_CHAR_SIZE = OCI_ATTR_CHAR_SIZE
-     };
-
-     enum ParamType
-         { 
-           PTYPE_TABLE = OCI_PTYPE_TABLE
-          ,PTYPE_VIEW = OCI_PTYPE_VIEW
-          ,PTYPE_PROC = OCI_PTYPE_PROC
-          ,PTYPE_FUNC = OCI_PTYPE_FUNC
-          ,PTYPE_PKG = OCI_PTYPE_PKG
-          ,PTYPE_TYPE = OCI_PTYPE_TYPE
-          ,PTYPE_TYPE_ATTR = OCI_PTYPE_TYPE_ATTR
-          ,PTYPE_TYPE_COLL = OCI_PTYPE_TYPE_COLL
-          ,PTYPE_TYPE_METHOD = OCI_PTYPE_TYPE_METHOD
-          ,PTYPE_SYN = OCI_PTYPE_SYN
-          ,PTYPE_SEQ = OCI_PTYPE_SEQ
-          ,PTYPE_COL = OCI_PTYPE_COL
-          ,PTYPE_ARG = OCI_PTYPE_ARG
-          ,PTYPE_TYPE_ARG = OCI_PTYPE_TYPE_ARG
-          ,PTYPE_TYPE_RESULT = OCI_PTYPE_TYPE_RESULT
-          ,PTYPE_SCHEMA = OCI_PTYPE_SCHEMA
-          ,PTYPE_DATABASE = OCI_PTYPE_DATABASE
-          ,PTYPE_UNK = OCI_PTYPE_UNK
-         };
-
-
-     enum { DURATION_SESSION = OCI_DURATION_SESSION
-          ,DURATION_TRANS = OCI_DURATION_TRANS
-          ,DURATION_NULL = OCI_DURATION_NULL
-          ,TYPEENCAP_PRIVATE = OCI_TYPEENCAP_PRIVATE
-          ,TYPEENCAP_PUBLIC = OCI_TYPEENCAP_PUBLIC
-          ,TYPEPARAM_IN = OCI_TYPEPARAM_IN
-          ,TYPEPARAM_OUT = OCI_TYPEPARAM_OUT
-          ,TYPEPARAM_INOUT = OCI_TYPEPARAM_INOUT
-          ,CURSOR_OPEN = OCI_CURSOR_OPEN
-          ,CURSOR_CLOSED = OCI_CURSOR_CLOSED
-          ,CL_START = OCI_CL_START
-          ,CL_END = OCI_CL_END
-          ,SP_SUPPORTED = OCI_SP_SUPPORTED
-          ,SP_UNSUPPORTED = OCI_SP_UNSUPPORTED
-          ,NW_SUPPORTED = OCI_NW_SUPPORTED
-          ,NW_UNSUPPORTED = OCI_NW_UNSUPPORTED
-          ,AC_DDL = OCI_AC_DDL
-          ,NO_AC_DDL = OCI_NO_AC_DDL
-          ,LOCK_IMMEDIATE = OCI_LOCK_IMMEDIATE
-          ,LOCK_DELAYED = OCI_LOCK_DELAYED  
-         }; 
-
-      MetaData(const MetaData &omd);
-      unsigned int getAttributeCount() const 
-      ;
-      AttrId getAttributeId(unsigned int attributenum) const 
-      ;
-      Type getAttributeType(unsigned int attributenum) const 
-      ;
-      int getInt(MetaData::AttrId attrid) const 
-      ;
-      bool getBoolean(MetaData::AttrId attrid) const 
-      ;
-      unsigned int getUInt(MetaData::AttrId attrid) const 
-      ;
-      OCCI_STD_NAMESPACE::string getString(MetaData::AttrId attrid) const 
-      ;
-      UString getUString(MetaData::AttrId attrid) const 
-      ;
-      Number getNumber(MetaData::AttrId attrid) const
-      ;
-      RefAny getRef(MetaData::AttrId attrid) const 
-      ;
-      Timestamp getTimestamp(MetaData::AttrId attrid) const 
-      ;
-      MetaData getMetaData(MetaData::AttrId attrid) const
-      ;
-      OCCI_STD_NAMESPACE::vector<MetaData> getVector(MetaData::AttrId attrid)
-      const ;
-      void  operator  =(const MetaData &omd);
-
-      ~MetaData();  
-     
-   private:
-
-  enum ociAttrType { OCI_UB1, 
-                         OCI_UB2, 
-                         OCI_UB4,
-                         OCI_SB1, 
-                         OCI_WORD,
-                         OCI_UB1_BOOL,     
-                         OCI_UB1PTR_TIMESTAMP,
-                         OCI_UB1PTR_NUMBER,
-                         OCI_TEXTPTR,
-                         OCI_DVOIDPTR_PARAM,
-                         OCI_DVOIDPTR_PARAMLIST,
-                         OCI_OCIREFPTR,
-                         OCI_OCIDURATION,
-                         OCI_OCITYPECODE,
-                         OCI_OCITYPEENCAP,
-                         OCI_OCITYPEPARAMMODE,
-                         OCI_OCIPRECISION
-                      };
-
-  enum AttrCount {COMMON_ATTR_COUNT = 5,
-        TABLE_ATTR_COUNT = 12,
-        VIEW_ATTR_COUNT = 7, 
-        FUNCPROC_ATTR_COUNT = 4,
-        PKG_ATTR_COUNT = 2,
-        TYP_ATTR_COUNT = 27, 
-        TYPEATTR_ATTR_COUNT = 14,
-        TYPEMTHD_ATTR_COUNT = 16,
-        COLL_ATTR_COUNT = 12,
-        SYN_ATTR_COUNT = 4,
-        SEQ_ATTR_COUNT = 7,
-        COL_ATTR_COUNT = 13,
-        ARG_TYPARG_TYPRES_ATTR_COUNT = 20, 
-        SCHEMA_ATTR_COUNT = 1,
-        DATABASE_ATTR_COUNT = 13,
-        UNK_ATTR_COUNT = 0
-        };
-
-  static const AttrId commonAttrId[COMMON_ATTR_COUNT];
-  static const ociAttrType commonAttrType[COMMON_ATTR_COUNT];
-  static const AttrId tableAttrId[TABLE_ATTR_COUNT];
-  static const ociAttrType tableAttrType[TABLE_ATTR_COUNT];
-  static const AttrId viewAttrId[VIEW_ATTR_COUNT];
-  static const ociAttrType viewAttrType[VIEW_ATTR_COUNT];
-  static const AttrId funcprocAttrId[FUNCPROC_ATTR_COUNT];
-  static const ociAttrType funcprocAttrType[FUNCPROC_ATTR_COUNT];
-  static const AttrId pkgAttrId[PKG_ATTR_COUNT];
-  static const ociAttrType pkgAttrType[PKG_ATTR_COUNT];
-  static const AttrId typAttrId[TYP_ATTR_COUNT];
-  static const ociAttrType typAttrType[TYP_ATTR_COUNT];
-  static const AttrId typeattrAttrId[TYPEATTR_ATTR_COUNT];
-  static const ociAttrType typeattrAttrType[TYPEATTR_ATTR_COUNT];
-  static const AttrId typmethdAttrId[TYPEMTHD_ATTR_COUNT];
-  static const ociAttrType typemthdAttrType[TYPEMTHD_ATTR_COUNT];
-  static const AttrId collAttrId[COLL_ATTR_COUNT];
-  static const ociAttrType collAttrType[COLL_ATTR_COUNT];
-  static const AttrId synAttrId[SYN_ATTR_COUNT];
-  static const ociAttrType synAttrType[SYN_ATTR_COUNT];
-  static const AttrId seqAttrId[SEQ_ATTR_COUNT];
-  static const ociAttrType seqAttrType[SEQ_ATTR_COUNT];
-  static const AttrId colAttrId[COL_ATTR_COUNT];
-  static const ociAttrType colAttrType[COL_ATTR_COUNT];
-  static const AttrId argtargtresAttrId[ARG_TYPARG_TYPRES_ATTR_COUNT];
-  static const ociAttrType argtargtresAttrType[
-                   ARG_TYPARG_TYPRES_ATTR_COUNT];
-  static const AttrId schemaAttrId[SCHEMA_ATTR_COUNT];
-  static const ociAttrType schemaAttrType[SCHEMA_ATTR_COUNT];
-  static const AttrId databaseAttrId[DATABASE_ATTR_COUNT];
-  static const ociAttrType databaseAttrType[DATABASE_ATTR_COUNT];
-
-  Ptr<MetaDataImpl> metaDataImplPtr;
-  const OCIParam* paramhp;
-  const ConnectionImpl* sesn;
-  const AttrId* attrIdArray;
-  const ociAttrType* attrTypeArray;
-  AttrCount attrCount;
-  
-  MetaData(const Connection *sessp, const OCCI_STD_NAMESPACE::string& objName,
-  ParamType prmtyp ) ;
-  MetaData(const Connection *sessp, const UString& objName,
-  ParamType prmtyp ) ;
-  MetaData(const Connection *sessp, 
-  const RefAny& ref) ;
-  MetaData(const Connection *sessp, MetaDataImpl *implPtr,
-  OCIParam* parm) ;
-  MetaData(const Connection *sessp, MetaDataImpl *implPtr,
-  OCIParam *parm, ub1 parmTyp) ;
-  ub1 getParamType(OCIParam* prm) const ;
-  const AttrId* getAttrIdArrayAddr(ub1 prmTyp) const;
-  const ociAttrType* getAttrTypeArrayAddr(ub1 prmTyp) const;
-  AttrCount getAttrCount(ub1 prmTyp) const; 
-  Type getType(ociAttrType typ) const;
-  bool isListTypeAttribute(AttrId attrid,ub1 ptyp) const;
-  boolean isInvalidAttrId(AttrId attrid,sb4* pos, 
-            boolean* isTypeSpecificAttrPtr) const;
-  ociAttrType getValidAttrType(sb4 index, boolean isTypeSpecificAttr)
-  const;
-
-  int getListType (const OCIParam *plist) const;
-  unsigned int getLowerBound(int ltype) const;
-  unsigned int getUpperBound(unsigned int ltype, 
-    unsigned int paramnum) const;
-  friend class ConnectionImpl;
-  friend class ResultSetImpl;
-
-};
-
-class Connection
-{
-   public :
-
-      // specifies the type of proxy to be created,
-      // used for future enhancements
-      enum ProxyType
-      {PROXY_DEFAULT
-      };
-
-      virtual ~Connection() { }
-      virtual Statement* createStatement(
-        const OCCI_STD_NAMESPACE::string  &sql = "") 
-         =0; 
-      virtual void terminateStatement(Statement *statement) =0;
-      virtual void commit()  =0; 
-      virtual void rollback()  =0;
-      virtual MetaData getMetaData(const OCCI_STD_NAMESPACE::string &object, 
-        MetaData::ParamType prmtyp 
-        = MetaData::PTYPE_UNK) const 
-         =0; 
-      virtual MetaData getMetaData(const RefAny &ref) const
-         =0; 
-      virtual OCCI_STD_NAMESPACE::string getClientCharSet() const 
-         =0; 
-      virtual OCCI_STD_NAMESPACE::string getClientNCHARCharSet() const 
-         =0; 
-      virtual void changePassword(const OCCI_STD_NAMESPACE::string &user,
-        const OCCI_STD_NAMESPACE::string &oldPassword,
-        const OCCI_STD_NAMESPACE::string &newPassword) 
-         =0; 
-      virtual void flushCache()  =0; 
-
-      virtual OCIServer*  getOCIServer() const =0;
-      virtual OCISvcCtx*  getOCIServiceContext() const =0;
-      virtual OCISession* getOCISession() const =0;
-
-      //new interfaces
-
-      virtual Statement* createStatement(const UString &sql) = 0;
-      virtual MetaData getMetaData(const UString &object, 
-        MetaData::ParamType prmtyp 
-        = MetaData::PTYPE_UNK) const 
-         =0; 
-      virtual UString getClientCharSetUString() const 
-         =0; 
-      virtual UString getClientNCHARCharSetUString() const 
-         =0; 
-      virtual void changePassword(const UString &user,
-        const UString &oldPassword,
-        const UString &newPassword) 
-         =0; 
-      virtual OCCI_STD_NAMESPACE::string getTag() const =0;
-      virtual void setStmtCacheSize(unsigned int cacheSize) = 0;
-      virtual unsigned int getStmtCacheSize() const =0;
-      virtual Statement* createStatement(const OCCI_STD_NAMESPACE::string &sql,
-                    const OCCI_STD_NAMESPACE::string &tag) = 0;
-      virtual void terminateStatement(Statement* stmt, 
-                    const OCCI_STD_NAMESPACE::string &tag) = 0;
-      virtual bool isCached(const OCCI_STD_NAMESPACE::string &sql,
-                    const OCCI_STD_NAMESPACE::string &tag = "") = 0;
-      virtual void registerSubscriptions(
-       const OCCI_STD_NAMESPACE::vector<aq::Subscription>& sub) =0;
-      virtual void unregisterSubscription(const aq::Subscription& sub) =0;
-      virtual void postToSubscriptions(
-       const OCCI_STD_NAMESPACE::vector<aq::Subscription>& sub) =0;
-      virtual Statement* createStatement(const UString &sql,
-                    const UString &tag) = 0;
-      virtual void terminateStatement(Statement* stmt, 
-                    const UString &tag) = 0;
-      virtual bool isCached(const UString &sql,
-                    const UString &tag) = 0;
-};
-
-class StatelessConnectionPool
-{
-  public :
-
-    enum PoolType
-    {
-      HETEROGENEOUS = OCI_DEFAULT,
-      HOMOGENEOUS = OCI_SPC_HOMOGENEOUS
-    };
-
-    enum BusyOption
-    {
-       WAIT = OCI_SPOOL_ATTRVAL_WAIT,
-       NOWAIT = OCI_SPOOL_ATTRVAL_NOWAIT,
-       FORCEGET = OCI_SPOOL_ATTRVAL_FORCEGET
-    };
-
-    enum DestroyMode
-    {
-       DEFAULT = OCI_DEFAULT,
-       SPD_FORCE = OCI_SPD_FORCE
-    };
-
-    virtual ~StatelessConnectionPool() {}
-    virtual unsigned int getBusyConnections() const =0;
-    virtual unsigned int getOpenConnections() const =0;
-    virtual unsigned int getMinConnections() const =0;
-    virtual unsigned int getMaxConnections() const =0;
-    virtual unsigned int getIncrConnections() const =0;
-    virtual OCCI_STD_NAMESPACE::string getPoolName() const =0;
-    virtual unsigned int getTimeOut() const =0;
-    virtual void setBusyOption(BusyOption busyOption) =0;
-    virtual BusyOption getBusyOption() const =0;
-    virtual void setTimeOut(unsigned int connTimeOut =0) =0;
-    virtual void setPoolSize(unsigned int maxConn =1,
-      unsigned int minConn =0, unsigned int incrConn =1) =0;
-    virtual Connection* getConnection( 
-      const OCCI_STD_NAMESPACE::string &tag ="") =0;
-    virtual Connection* getConnection(
-      const OCCI_STD_NAMESPACE::string &userName,
-      const OCCI_STD_NAMESPACE::string &password,
-      const OCCI_STD_NAMESPACE::string &tag = "") =0;
-    virtual Connection* getAnyTaggedConnection(
-      const OCCI_STD_NAMESPACE::string &tag = "") =0;
-    virtual Connection* getAnyTaggedConnection(
-      const OCCI_STD_NAMESPACE::string &userName,
-      const OCCI_STD_NAMESPACE::string &Password,
-      const OCCI_STD_NAMESPACE::string &tag = "") =0;
-    virtual Connection* getProxyConnection(
-      const OCCI_STD_NAMESPACE::string &name,
-      OCCI_STD_NAMESPACE::string roles[], unsigned int numRoles,
-      const OCCI_STD_NAMESPACE::string &tag = "",
-      Connection::ProxyType proxyType = Connection::PROXY_DEFAULT) =0;
-    virtual Connection* getProxyConnection(
-      const OCCI_STD_NAMESPACE::string &name,
-      const OCCI_STD_NAMESPACE::string &tag = "" ,
-      Connection::ProxyType proxyType = Connection::PROXY_DEFAULT) =0;
-    virtual Connection* getAnyTaggedProxyConnection(
-      const OCCI_STD_NAMESPACE::string &name,
-      OCCI_STD_NAMESPACE::string roles[], unsigned int numRoles,
-      const OCCI_STD_NAMESPACE::string &tag = "",
-      Connection::ProxyType proxyType = Connection::PROXY_DEFAULT) =0;
-    virtual Connection* getAnyTaggedProxyConnection(
-      const OCCI_STD_NAMESPACE::string &name,
-      const OCCI_STD_NAMESPACE::string &tag="",
-      Connection::ProxyType proxyType = Connection::PROXY_DEFAULT ) =0;
-    virtual void releaseConnection (Connection *connection,
-      const OCCI_STD_NAMESPACE::string &tag = "") =0;
-    virtual void terminateConnection (Connection *connection) =0;
-    virtual void setStmtCacheSize(unsigned int cacheSize) =0;
-    virtual unsigned int getStmtCacheSize() const =0;
-
-    virtual Connection* getConnection(const UString &tag)=0;
-    virtual Connection* getConnection(const UString &userName,
-      const UString &password,
-      const UString &tag)=0;
-    virtual Connection* getAnyTaggedConnection(const UString &tag)=0;
-    virtual Connection* getAnyTaggedConnection( const UString &userName,
-      const UString &Password, const UString &tag)=0 ;
-    virtual Connection* getProxyConnection(const UString &name,
-      OCCI_STD_NAMESPACE::string roles[], unsigned int numRoles,
-      const UString &tag,
-      Connection::ProxyType proxyType = Connection::PROXY_DEFAULT)=0;
-    virtual Connection* getProxyConnection(const UString &name,
-      const UString &tag, Connection::ProxyType
-      proxyType = Connection::PROXY_DEFAULT)=0;
-    virtual Connection* getAnyTaggedProxyConnection(const UString &name,
-      OCCI_STD_NAMESPACE::string roles[], unsigned int numRoles,
-      const UString &tag,
-      Connection::ProxyType proxyType = Connection::PROXY_DEFAULT)=0;
-    virtual Connection* getAnyTaggedProxyConnection(const UString &name,
-      const UString &tag,
-      Connection::ProxyType proxyType = Connection::PROXY_DEFAULT )=0;
-    virtual void releaseConnection(Connection *connection,
-      const UString  &tag)=0;
-
-};
-
-
-class ConnectionPool
-{
-  public :
-
-    virtual ~ConnectionPool() {}
-    virtual unsigned int getBusyConnections() const 
-       =0; 
-    virtual unsigned int getOpenConnections() const 
-       =0; 
-    virtual unsigned int getMinConnections() const 
-       =0; 
-    virtual unsigned int getMaxConnections() const 
-       =0; 
-    virtual unsigned int getIncrConnections() const 
-       =0; 
-    virtual OCCI_STD_NAMESPACE::string getPoolName() const 
-       =0; 
-    virtual unsigned int getTimeOut() const 
-       =0; 
-    virtual void setErrorOnBusy() 
-       =0; 
-    virtual void setTimeOut(unsigned int connTimeOut =0) 
-       =0; 
-    virtual void setPoolSize(unsigned int minConn =0,
-      unsigned int maxConn =1, unsigned int incrConn =1) 
-       =0; 
-    virtual Connection* createConnection(
-      const OCCI_STD_NAMESPACE::string &userName,
-      const OCCI_STD_NAMESPACE::string &password)  =0; 
-
-    virtual Connection* createProxyConnection(
-      const OCCI_STD_NAMESPACE::string &name,
-      OCCI_STD_NAMESPACE::string roles[], unsigned int numRoles,
-      Connection::ProxyType proxyType = 
-      Connection::PROXY_DEFAULT)  =0; 
-
-    virtual Connection* createProxyConnection(
-      const OCCI_STD_NAMESPACE::string &name,
-      Connection::ProxyType proxyType =
-      Connection::PROXY_DEFAULT)  =0;
-
-    virtual void terminateConnection
-      (Connection *connection) =0;
-
-    //new interfaces
-
-    virtual Connection* createConnection(
-      const UString &userName,
-      const UString &password)  =0; 
-    
-    virtual Connection* createProxyConnection(const UString &name,
-      OCCI_STD_NAMESPACE::string roles[], unsigned int numRoles,
-      Connection::ProxyType proxyType = 
-      Connection::PROXY_DEFAULT)  =0; 
-    
-    virtual Connection* createProxyConnection(const UString &name,
-      Connection::ProxyType proxyType =
-      Connection::PROXY_DEFAULT)  =0;
-    
-    virtual void setStmtCacheSize(unsigned int cacheSize) =0;
-    virtual unsigned int getStmtCacheSize() const =0;
-
-    virtual UString getPoolNameUString() const 
-       =0; 
-};
-
-class   Environment     
-{
- public:
-                    // class constants
-
-  enum Mode
-  {
-    DEFAULT = OCI_DEFAULT,
-    OBJECT = OCI_OBJECT,
-    SHARED = OCI_SHARED,
-    NO_USERCALLBACKS = OCI_NO_UCB,
-    THREADED_MUTEXED = OCI_THREADED,
-    THREADED_UNMUTEXED = OCI_THREADED | OCI_ENV_NO_MUTEX,
-    EVENTS = OCI_EVENTS,
-    USE_LDAP = OCI_USE_LDAP
-  };
-
-  virtual ~Environment(){}
-
-                    // public methods
-
-  static Environment * createEnvironment(
-                              Mode mode = DEFAULT,
-                              void *ctxp = 0,
-                              void *(*malocfp)(void *ctxp, size_t size) = 0,
-                              void *(*ralocfp)(void *ctxp, void *memptr,
-                                               size_t newsize) = 0,
-                              void (*mfreefp)(void *ctxp, void *memptr) = 0);
-  
-  static Environment * createEnvironment(
-                              const OCCI_STD_NAMESPACE::string &charset,
-                              const OCCI_STD_NAMESPACE::string &ncharset,
-                              Mode mode = DEFAULT,
-                              void *ctxp = 0,
-                              void *(*malocfp)(void *ctxp, size_t size) = 0,
-                              void *(*ralocfp)(void *ctxp, void *memptr,
-                                               size_t newsize) = 0,
-                              void (*mfreefp)(void *ctxp, void *memptr) = 0);
-
-  static void terminateEnvironment(Environment *env);
-  
-  static Environment* getXAEnvironment(const 
-                           OCCI_STD_NAMESPACE::string& dbname);
-
-  static void releaseXAEnvironment(Environment *env);
-  
-  virtual Connection * createConnection(
-    const OCCI_STD_NAMESPACE::string &userName,
-    const OCCI_STD_NAMESPACE::string &password, 
-    const OCCI_STD_NAMESPACE::string &connectString = "") = 0;
-
-  virtual void terminateConnection(Connection *connection) = 0;
-
-  virtual ConnectionPool* createConnectionPool(
-    const OCCI_STD_NAMESPACE::string &poolUserName,
-    const OCCI_STD_NAMESPACE::string &poolPassword, 
-    const OCCI_STD_NAMESPACE::string &connectString ="", 
-    unsigned int minConn =0,
-    unsigned int maxConn =1, unsigned int incrConn =1) = 0;
-
-  virtual void terminateConnectionPool(ConnectionPool *poolp) = 0;
-
-  virtual unsigned int getCurrentHeapSize() const = 0;
-
-  virtual OCIEnv * getOCIEnvironment() const = 0;
-
-  virtual Map *getMap() const = 0;
- 
-  virtual void setCacheMaxSize(unsigned int maxSize) = 0; 
-  
-  virtual unsigned int getCacheMaxSize() const = 0; 
-  
-  virtual void setCacheOptSize(unsigned int OptSize) = 0; 
-  
-  virtual unsigned int getCacheOptSize() const = 0; 
-
-
-  //new interfaces
-
-  virtual Connection * createConnection(const UString &userName,
-    const UString &password, const UString &connectString) = 0;
-  
-  virtual ConnectionPool* createConnectionPool(
-    const UString &poolUserName,
-    const UString &poolPassword, const UString &connectString, 
-    unsigned int minConn =0,
-    unsigned int maxConn =1, unsigned int incrConn =1) = 0;
-
-  virtual Connection* getXAConnection(const 
-                           OCCI_STD_NAMESPACE::string& dbname) = 0;
-
-  virtual void releaseXAConnection(Connection* conn) =0;
-  
-  virtual StatelessConnectionPool* createStatelessConnectionPool(
-    const OCCI_STD_NAMESPACE::string &poolUserName,
-    const OCCI_STD_NAMESPACE::string &poolPassword,
-    const OCCI_STD_NAMESPACE::string &connectString = "",
-    unsigned int maxConn = 1, unsigned int minConn = 0,
-    unsigned int incrConn = 1,
-    StatelessConnectionPool::PoolType pType 
-                                 = StatelessConnectionPool::HETEROGENEOUS) = 0;
-  
-  virtual StatelessConnectionPool* createStatelessConnectionPool(
-    const UString &poolUserName,
-    const UString &poolPassword,
-    const UString &connectString,
-    unsigned int maxConn = 1, unsigned int minConn = 0,
-    unsigned int incrConn = 1,
-    StatelessConnectionPool::PoolType pType 
-                                 = StatelessConnectionPool::HETEROGENEOUS) = 0;
-
-  virtual void terminateStatelessConnectionPool(StatelessConnectionPool *poolp,
-  StatelessConnectionPool::DestroyMode mode = StatelessConnectionPool::DEFAULT)
-      = 0;
-  virtual void setLDAPAuthentication(unsigned int mode) =0;
-
-  virtual unsigned int getLDAPAuthentication() const =0;
-  
-  virtual void setLDAPLoginNameAndPassword(
-     const OCCI_STD_NAMESPACE::string &login,
-     const OCCI_STD_NAMESPACE::string &passwd) =0;
-
-  virtual void setLDAPAdminContext(const OCCI_STD_NAMESPACE::string &ctx)=0;
-
-  virtual OCCI_STD_NAMESPACE::string getLDAPAdminContext() const =0;
-
-  virtual void setLDAPHostAndPort(const OCCI_STD_NAMESPACE::string &host,
-     unsigned int port) =0;
-
-  virtual OCCI_STD_NAMESPACE::string getLDAPHost() const =0;
-
-  virtual unsigned int getLDAPPort() const =0;  
- 
-  virtual void registerSubscriptions(
-     const OCCI_STD_NAMESPACE::vector<aq::Subscription>& sub) =0;
-
-  virtual void unregisterSubscription(const aq::Subscription& sub) =0; 
- 
-  virtual void enableSubscription(const aq::Subscription& sub) =0;
-  
-  virtual void disableSubscription(const aq::Subscription& sub) =0;
-  
-  virtual bool getCacheSortedFlush() const = 0;
-
-  virtual void setCacheSortedFlush(bool flag) = 0;
-
-  private:
-
-};
-
-
-
-class Map
-{
- public:
-
-  virtual ~Map(){}
-  virtual void put(const OCCI_STD_NAMESPACE::string&, void *(*)(void *), 
-                void (*)(void *, void *)) = 0;
-  virtual void getReadSQL(
-    void *, unsigned int, void *, unsigned int, void **) const = 0;
-  virtual void getWriteSQL(
-    void *, unsigned int, void *, unsigned int, void **) const = 0;
-  virtual void put(const OCCI_STD_NAMESPACE::string&, 
-                const OCCI_STD_NAMESPACE::string&, void *(*)(void *), 
-                void (*)(void *, void *)) = 0;
-  virtual void putUTF16(const OCCI_STD_NAMESPACE::string&, 
-                const OCCI_STD_NAMESPACE::string&, void *(*)(void *), 
-                void (*)(void *, void *)) = 0;
-
- private:
-};
-
-
-   
-class SQLException : public OCCI_STD_NAMESPACE::exception
-{
- public:
-
-  virtual int getErrorCode() const;
-  
-  virtual OCCI_STD_NAMESPACE::string getMessage() const;
-
-  const char *what() const throw();
-
-  virtual void setErrorCtx(void *ctx);
-  
-  SQLException();
-
-  SQLException(const SQLException &e);
-
-  void operator=(const SQLException &other);
-
-  virtual ~SQLException() throw();
-
-  virtual int getXAErrorCode(const OCCI_STD_NAMESPACE::string& dbname) const;
-  
-  virtual UString getUStringMessage() const;
-
-  virtual OCCI_STD_NAMESPACE::string getNLSMessage(Environment *env) const;
-  
-  virtual UString getNLSUStringMessage(Environment *env) const;
-
- private:
-
-  Ptr<SQLExceptionImpl> ptr_;
-  SQLException(SQLExceptionImpl *ptr);
-  friend SQLException SQLExceptionCreate(int errorCode);
-  friend SQLException SQLExceptionCreate(dvoid *handle,
-  int handleType);
-
-};
-
-
-class Statement 
-{
- public:
-                                // class constants
-
-  virtual ~Statement() {}
-  
-  enum Status                                   
-  {
-    UNPREPARED,
-    PREPARED,
-    RESULT_SET_AVAILABLE,
-    UPDATE_COUNT_AVAILABLE,
-    NEEDS_STREAM_DATA,
-    STREAM_DATA_AVAILABLE
-  };
-  
-                                // common methods
-  
-  virtual void setSQL(const OCCI_STD_NAMESPACE::string &sql) = 0; 
-
-  virtual OCCI_STD_NAMESPACE::string getSQL() const = 0;
-
-  virtual Status execute(const OCCI_STD_NAMESPACE::string &sql = "") = 0;
-  
-  virtual ResultSet * getResultSet() = 0;
-  
-  virtual unsigned int getUpdateCount() const = 0; 
-  
-  virtual ResultSet * executeQuery(
-    const OCCI_STD_NAMESPACE::string &sql = "") = 0;
-  
-  virtual unsigned int executeUpdate(
-    const OCCI_STD_NAMESPACE::string &sql = "") = 0; 
-  
-  virtual Status status() const = 0;  
-                                        
-  virtual void closeResultSet(ResultSet *resultSet) = 0;
-  
-  virtual void setPrefetchRowCount(unsigned int rowCount) = 0; 
-  
-  virtual void setPrefetchMemorySize(unsigned int bytes) = 0;
-  
-  virtual void setAutoCommit(bool autoCommit) = 0;
-  
-  virtual bool getAutoCommit() const = 0;
-  
-  virtual OCIStmt * getOCIStatement() const = 0;
-
-
-                    // methods for prepared statements with IN
-                    // parameters  
-
-  virtual void setMaxParamSize(unsigned int paramIndex,unsigned int maxSize)=0;
-  
-  virtual unsigned int getMaxParamSize(unsigned int paramIndex) const = 0;
-
-  virtual void setNull(unsigned int paramIndex, Type type) = 0;
- 
-  virtual void setInt(unsigned int paramIndex, int x) = 0; 
-  
-  virtual void setUInt(unsigned int paramIndex, unsigned int x) = 0; 
-  
-  virtual void setFloat(unsigned int paramIndex, float x) = 0; 
-
-  virtual void setDouble(unsigned int paramIndex, double x) = 0; 
-
-  virtual void setNumber(unsigned int paramIndex, const Number &x) = 0; 
-  
-  virtual void setString(unsigned int paramIndex, 
-    const OCCI_STD_NAMESPACE::string &x) = 0; 
-
-  virtual void setBytes(unsigned int paramIndex, const Bytes &x) = 0; 
-
-  virtual void setDate(unsigned int paramIndex, const Date &x) = 0; 
-  
-  virtual void setTimestamp(unsigned int paramIndex, const Timestamp &x) = 0; 
-
-  virtual void setBlob(unsigned int paramIndex, const Blob &x) = 0;
-
-  virtual void setClob(unsigned int paramIndex, const Clob &x) = 0;
-
-  virtual void setBfile(unsigned int paramIndex, const Bfile &x) = 0;
-
-  virtual void setIntervalYM(unsigned int paramIndex, const IntervalYM &x) = 0;
- 
-  virtual void setIntervalDS(unsigned int paramIndex, const IntervalDS &x) = 0;
- 
-  virtual void setRowid(unsigned int paramIndex, const Bytes &x) = 0; 
-  
-  virtual void setRef(unsigned int paramIndex, const RefAny &x) = 0; 
-
-  virtual void setObject(unsigned int paramIndex, PObject * x) = 0; 
-  
-  virtual void setDataBuffer(unsigned int paramIndex, void *buffer, 
-                             Type type,
-                             sb4 size, ub2 *length, sb2 *ind = NULL,
-                             ub2 *rc = NULL) = 0; 
-
-  virtual void setDataBufferArray(unsigned int paramIndex, void *buffer, 
-                                  Type type,
-                                  ub4 arraySize, ub4 *arrayLength,
-                                  sb4 elementSize,
-                                  ub2 *elementLength, sb2 *ind = NULL,
-                                  ub2 *rc = NULL) = 0;
-
-  virtual void setCharSet(unsigned int paramIndex, 
-  const OCCI_STD_NAMESPACE::string & charSet) = 0; 
-  
-  virtual OCCI_STD_NAMESPACE::string getCharSet(unsigned int paramIndex) 
-  const = 0; 
-  
-  virtual void setDatabaseNCHARParam(
-    unsigned int paramIndex, bool isNCHAR) = 0;
-                                         
-  virtual bool getDatabaseNCHARParam(unsigned int paramIndex) const = 0;       
-
-  virtual void closeStream(Stream *stream) =0;
-
-  virtual Stream * getStream(unsigned int paramIndex) = 0; 
-  
-  virtual unsigned int getCurrentStreamParam() const = 0; 
-  
-  virtual unsigned int getCurrentStreamIteration() const = 0;
-
-  virtual void setBinaryStreamMode(unsigned int colIndex, 
-    unsigned int size) =0;
-
-  virtual void setCharacterStreamMode(unsigned int colIndex, 
-    unsigned int size) =0;
-  
-  virtual void setMaxIterations(unsigned int maxIterations) = 0;
-  
-  virtual unsigned int getMaxIterations() const = 0; 
-
-  virtual void addIteration() = 0; 
-  
-  virtual unsigned int getCurrentIteration() const = 0; 
-
-  virtual Status executeArrayUpdate(unsigned int arrayLength) = 0;
-  
-
-                    // methods for Callable Statements
-
-  virtual void registerOutParam(unsigned int paramIndex, Type type, 
-  unsigned int maxSize=0, const OCCI_STD_NAMESPACE::string &sqltype="") = 0;
-  
-  virtual bool isNull(unsigned int paramIndex) const = 0;
-
-  virtual bool isTruncated(unsigned int paramIndex) const
-   =0;
-
-  
-  virtual void setErrorOnNull(unsigned int paramIndex, 
-    bool causeException) = 0;
-                               
-  virtual void setErrorOnTruncate(unsigned int paramIndex,
-  bool causeException)  = 0;
-
-  virtual int preTruncationLength(unsigned int paramIndex) const
-   =0;
-
-
-  virtual int getInt(unsigned int paramIndex)  = 0; 
-  
-  virtual unsigned int getUInt(unsigned int paramIndex)  = 0; 
-  
-  virtual float getFloat(unsigned int paramIndex)  = 0; 
-
-  virtual double getDouble(unsigned int paramIndex)  = 0; 
-  
-  virtual Number getNumber(unsigned int paramIndex)  = 0; 
-  
-  virtual OCCI_STD_NAMESPACE::string getString(unsigned int paramIndex)  = 0; 
-  
-  virtual Bytes getBytes(unsigned int paramIndex)  = 0; 
-
-  virtual Date getDate(unsigned int paramIndex)  = 0; 
-  
-  virtual Timestamp getTimestamp(unsigned int paramIndex)  = 0; 
-
-  virtual Bytes getRowid(unsigned int paramIndex)  = 0; 
-  
-  virtual PObject * getObject(unsigned int paramIndex)  = 0; 
-  
-  virtual Blob getBlob(unsigned int paramIndex)  = 0; 
-  
-  virtual Clob getClob(unsigned int paramIndex)  = 0; 
-  
-  virtual Bfile getBfile(unsigned int paramIndex)  = 0; 
-
-  virtual IntervalYM getIntervalYM(unsigned int paramIndex)  = 0; 
- 
-  virtual IntervalDS getIntervalDS(unsigned int paramIndex)  = 0; 
-
-  virtual RefAny getRef(unsigned int paramIndex)  = 0;  
-
-  virtual ResultSet * getCursor(unsigned int paramIndex)   = 0;
-
-  virtual Connection* getConnection() const =0; 
-
-  //new interfaces
-
-  virtual void setRef(unsigned int paramIndex, const RefAny &x, 
-                      const OCCI_STD_NAMESPACE::string &typName, 
-                      const OCCI_STD_NAMESPACE::string &schName = "") = 0; 
-  
-  virtual void setSQLUString(const UString &sql) = 0;
-  
-  virtual UString getSQLUString() const = 0;
-  
-  virtual Status execute(const UString &sql) = 0;
-                                
-  virtual ResultSet * executeQuery(
-    const UString &sql) = 0;
-  
-  virtual unsigned int executeUpdate(
-    const UString &sql) = 0; 
-  
-  virtual void setBFloat(unsigned int paramIndex, const BFloat &fval) = 0;
-  
-  virtual void setBDouble(unsigned int paramIndex, const BDouble &dval) = 0;
-  
-  virtual void setUString(unsigned int paramIndex,
-    const UString &x) = 0;
-  
-  virtual void setCharSetUString(unsigned int paramIndex, 
-  const UString & charSet) = 0; 
-  
-  virtual UString getCharSetUString(unsigned int paramIndex) 
-  const = 0; 
-  
-  virtual void registerOutParam(unsigned int paramIndex, Type type, 
-  unsigned int maxSize, const OCCI_STD_NAMESPACE::string &typName,
-  const OCCI_STD_NAMESPACE::string &schName) = 0;
-  
-  virtual void registerOutParam(unsigned int paramIndex, Type type, 
-  unsigned int maxSize, const UString &typName, 
-  const UString &schName) = 0;
-  
-  virtual BFloat getBFloat(unsigned int paramIndex)  = 0;
-  
-  virtual BDouble getBDouble(unsigned int paramIndex)  = 0;
-
-  virtual UString getUString(unsigned int paramIndex)  = 0; 
-  
-  virtual void disableCaching() =0;
-  
-  virtual void setRef(unsigned int paramIndex, const RefAny &x, 
-                      const UString &typName, 
-                      const UString &schName) = 0; 
-
-  virtual void setBinaryStreamMode(unsigned int colIndex, 
-    unsigned int size, bool INArg) =0;
-
-  virtual void setCharacterStreamMode(unsigned int colIndex, 
-    unsigned int size, bool INArg) =0;
-
-};
-
-
-
-class ResultSet 
-{
- public:
-                                // class constants
-  
-  enum Status                                   
-  {
-    END_OF_FETCH = 0,
-    DATA_AVAILABLE,
-    STREAM_DATA_AVAILABLE
-  };
-  virtual ~ResultSet(){}
- 
-                                // public methods
-
-  virtual Status next(unsigned int numRows = 1) = 0;
-  
-  virtual Status status() const = 0;            
-  
-  virtual unsigned int getNumArrayRows()  const = 0;
-  
-  virtual void cancel() = 0;
-
-  virtual void setMaxColumnSize(unsigned int colIndex, unsigned int max) = 0;
-  
-  virtual unsigned int getMaxColumnSize(unsigned int colIndex) const = 0;
-  
-  virtual bool isNull(unsigned int colIndex) const = 0;
-  
-  virtual bool isTruncated(unsigned int paramIndex) const
-   =0;
-
-  virtual void setErrorOnNull(unsigned int colIndex, bool causeException) = 0;
-  virtual void setErrorOnTruncate(unsigned int paramIndex,
-  bool causeException)   =0;
-
-  virtual int preTruncationLength(unsigned int paramIndex) const
-   =0;
-
-  virtual int getInt(unsigned int colIndex)   = 0; 
-  
-  virtual unsigned int getUInt(unsigned int colIndex)   = 0; 
-  
-  virtual float getFloat(unsigned int colIndex)  = 0; 
-
-  virtual double getDouble(unsigned int colIndex)  = 0; 
-
-  virtual Number getNumber(unsigned int colIndex)  = 0; 
-  
-  virtual OCCI_STD_NAMESPACE::string getString(unsigned int colIndex)  = 0; 
-  
-  virtual Bytes getBytes(unsigned int colIndex)  = 0; 
-
-  virtual Date getDate(unsigned int colIndex)  = 0; 
-  
-  virtual Timestamp getTimestamp(unsigned int colIndex)  = 0; 
-  
-  virtual Bytes getRowid(unsigned int colIndex)  = 0; 
-  
-  virtual PObject * getObject(unsigned int colIndex)  = 0; 
-  
-  virtual Blob getBlob(unsigned int colIndex)  = 0; 
-  
-  virtual Clob getClob(unsigned int colIndex)  =0; 
-  
-  virtual Bfile getBfile(unsigned int colIndex)  = 0; 
-
-  virtual  IntervalYM getIntervalYM(unsigned int colIndex)  =0;
-   
-  virtual  IntervalDS getIntervalDS(unsigned int colIndex)  =0;
-   
-  virtual RefAny getRef(unsigned int colIndex)  = 0; 
-
-  virtual Bytes getRowPosition() const = 0; 
-
-  virtual ResultSet * getCursor(unsigned int colIndex)  = 0; 
-  
-  virtual void setDataBuffer(unsigned int colIndex, void *buffer, Type type,
-                             sb4 size = 0, ub2 *length = NULL,
-                             sb2 *ind = NULL, ub2 *rc = NULL) = 0;
-
-  virtual void setCharSet(unsigned int colIndex, 
-  const OCCI_STD_NAMESPACE::string & charSet) = 0; 
-  
-  virtual OCCI_STD_NAMESPACE::string getCharSet(unsigned int colIndex) 
-  const = 0; 
-  
-  virtual void setBinaryStreamMode(unsigned int colIndex, unsigned int size)
-    = 0;
-
-  virtual void setCharacterStreamMode(unsigned int colIndex, unsigned int size)
-    = 0;
-  
-  virtual void setDatabaseNCHARParam(unsigned int paramIndex, 
-    bool isNCHAR) = 0;
-  
-  virtual bool getDatabaseNCHARParam(unsigned int paramIndex) const = 0;       
-                                         
-  virtual Stream * getStream(unsigned int colIndex)  = 0; 
-
-  virtual void closeStream(Stream *stream) =0;
-  
-  virtual unsigned int getCurrentStreamColumn() const= 0; 
-  
-  virtual unsigned int getCurrentStreamRow() const= 0;       
-  
-  virtual OCCI_STD_NAMESPACE::vector<MetaData> getColumnListMetaData() const 
-    = 0;
-
-  virtual Statement* getStatement() const=0;
-
-  //new interfaces
-
-  virtual BFloat getBFloat(unsigned int colIndex)  = 0;
-  
-  virtual BDouble getBDouble(unsigned int colIndex)  = 0;
-  
-  virtual UString getUString(unsigned int colIndex)  = 0; 
-  
-  virtual void setCharSetUString(unsigned int colIndex, 
-  const UString & charSet) = 0; 
-  
-  virtual UString getCharSetUString(unsigned int colIndex) 
-  const = 0; 
-
-};
-
-
-class Stream
-{
-  public : 
-
-    enum Status {READY_FOR_READ, READY_FOR_WRITE, INACTIVE};
-
-    virtual ~Stream(){}
-    virtual int readBuffer(char *buffer, unsigned int size)
-       =0;
-    virtual int readLastBuffer(char *buffer, unsigned int size)
-       =0;
-    virtual void writeBuffer(char *buffer, unsigned int size)
-       =0;
-    virtual void writeLastBuffer(char *buffer, unsigned int size)
-       =0;
-    virtual Status status() const  =0;
-
-};
-
-/*---------------------------------------------------------------------------
-                PROTOTYPES USED BY FUNCTION TEMPLATES
- -------------------------------------------------------------------------*/
-  void getVectorOfPObjects( ResultSet *rs, unsigned int index,
-  OCCI_STD_NAMESPACE::vector<PObject *> &vect) ;
-  void getVectorOfOCIRefs(ResultSet  *rs, unsigned int index,
-  OCCI_STD_NAMESPACE::vector<void *> &vect) ;
-  void getVectorOfPObjects( Statement *rs, unsigned int index,
-  OCCI_STD_NAMESPACE::vector<PObject *> &vect) ;
-  void getVectorOfOCIRefs(Statement  *rs, unsigned int index,
-  OCCI_STD_NAMESPACE::vector<void *> &vect) ;
-  void setVectorOfPObjects( Statement *stmt, unsigned int paramIndex,
-  const OCCI_STD_NAMESPACE::vector<PObject *> &vect, 
-  const OCCI_STD_NAMESPACE::string &sqltype) ;
-  void setVectorOfPObjects( Statement *stmt, unsigned int paramIndex,
-  const OCCI_STD_NAMESPACE::vector<PObject *> &vect, 
-  const OCCI_STD_NAMESPACE::string &schemaName,
-  const OCCI_STD_NAMESPACE::string &typeName) ;
-  void setVectorOfPObjects( Statement *stmt, unsigned int paramIndex,
-  const OCCI_STD_NAMESPACE::vector<PObject *> &vect, 
-  const UString &schemaName,
-  const UString &typeName) ;
-  void setVectorOfOCIRefs(Statement *stmt, unsigned int paramIndex,
-  const  OCCI_STD_NAMESPACE::vector<void *> &vect,
-  const OCCI_STD_NAMESPACE::vector<OCIInd> &vecind,
-  const OCCI_STD_NAMESPACE::string &sqltype) ;
-  void setVectorOfOCIRefs(Statement *stmt, unsigned int paramIndex,
-  const  OCCI_STD_NAMESPACE::vector<void *> &vect,
-  const OCCI_STD_NAMESPACE::vector<OCIInd> &vecind,
-  const OCCI_STD_NAMESPACE::string &schemaName,
-  const OCCI_STD_NAMESPACE::string &typeName) ;
-  void setVectorOfOCIRefs(Statement *stmt, unsigned int paramIndex,
-  const  OCCI_STD_NAMESPACE::vector<void *> &vect,
-  const OCCI_STD_NAMESPACE::vector<OCIInd> &vecind,
-  const UString &schemaName,
-  const UString &typeName) ;
-  void pinVectorOfOCIRefs(const Connection *conn, 
-  OCCI_STD_NAMESPACE::vector<void *> & vecRef,
-  OCCI_STD_NAMESPACE::vector<void *> & vecCor,
-  OCCI_STD_NAMESPACE::vector<PObject *> &vecPObj,LockOptions &lockOpt );
-
-
-/*---------------------------------------------------------------------------
-                           EXPORT FUNCTIONS
-  ---------------------------------------------------------------------------*/
-
-/*------------------------ getVector for objects ---------------------------*/
-/*
-   NAME
-      getVector - overloaded function. Retrieves the attribute in the current
-position as a vector of objects
-
-   PARAMETERS
-      rs - ResultSet
-      vect- reference to vector of objects(OUT parameter).
-
-   DESCRIPTION
-     Retrieves the column in the specified position as a vector of RefAny.
-   The attribute at the current position should be a collection type (varray or
-   nested table). The SQL type of the elements in the collection should be
-   compatible with objects.
-
-   RETURNS
-     nothing
-
-   NOTES
-        compatible SQL types : NTY
-
-        will call getVector(..., vector<PObject*>)
-*/
-#ifdef WIN32COMMON
-// and other platforms that do not support
-// partial function template specialization
-
-template <class T>
-void getVector( ResultSet *rs, unsigned int index,OCCI_STD_NAMESPACE::vector<T>
-& vect) 
-{
-  OCCI_STD_NAMESPACE::vector<PObject *> vec_pobj;
-  getVectorOfPObjects(rs, index, vec_pobj);
-
-  vect.clear();
-  unsigned int size = vec_pobj.size();
-  vect.reserve( size );
-  for ( unsigned int i=0; i< size; i++)
-    vect.push_back((T)vec_pobj[i]);
-}
-
-#else
-template <class T>
-void getVector( ResultSet *rs, unsigned int index, OCCI_STD_NAMESPACE::vector<T
- *> &vect)
-{
-  OCCI_STD_NAMESPACE::vector<PObject *> vec_pobj;
-  getVectorOfPObjects(rs, index, vec_pobj);
-
-  vect.clear();
-  unsigned int size = vec_pobj.size();
-  vect.reserve( size );
-  for (unsigned int i=0; i< size; i++)
-    vect.push_back((T *)vec_pobj[i]);
-}
-#endif
-
-/*------------------------ getVector for objects ---------------------------*/
-/*
-   NAME
-      getVector - overloaded function. Retrieves the attribute in the current
-position as a vector of objects
-
-   PARAMETERS
-      stmt - Statement
-      vect- reference to vector of objects(OUT parameter).
-
-   DESCRIPTION
-     Retrieves the column in the specified position as a vector of RefAny.
-   The attribute at the current position should be a collection type (varray or
-   nested table). The SQL type of the elements in the collection should be
-   compatible with objects.
-
-   RETURNS
-     nothing
-
-   NOTES
-        compatible SQL types : NTY
-
-        will call getVector(..., vector<PObject*>)
-*/
-#ifdef WIN32COMMON
-// and other platforms that do not support
-// partial function template specialization
-
-template <class T>
-void getVector( Statement *stmt, unsigned int index, 
-OCCI_STD_NAMESPACE::vector<T> &vect) 
-{
-  OCCI_STD_NAMESPACE::vector<PObject *> vec_pobj;
-  getVectorOfPObjects(stmt, index, vec_pobj);
-  vect.clear();
-  unsigned int size = vec_pobj.size();
-  vect.reserve( size );
-  for (unsigned int i=0; i< size; i++)
-    vect.push_back((T)vec_pobj[i]);
-}
-#else
-template <class T>
-void getVector( Statement *stmt, unsigned int index,
-OCCI_STD_NAMESPACE::vector<T *> &vect)
-{
-  OCCI_STD_NAMESPACE::vector<PObject *> vec_pobj;
-  getVectorOfPObjects(stmt, index, vec_pobj);
-  vect.clear();
-  unsigned int size = vec_pobj.size();
-  vect.reserve( size );
-  for (unsigned int i=0; i< size; i++)
-    vect.push_back((T *)vec_pobj[i]);
-}
-#endif
-
-/*------------------------ getVector for Ref<T> ---------------------------*/
-/*
-   NAME
-      getVector - overloaded function. Retrieves the attribute in the current
-position as a vector of Ref<T>
-
-   PARAMETERS
-      rs - ResultSet
-      vect- reference to vector of Ref<T>(OUT parameter).
-
-   DESCRIPTION
-     Retrieves the column in the specified position as a vector of Ref<T>.
-   The attribute at the current position should be a collection type (varray or
-   nested table). The SQL type of the elements in the collection should be
-   compatible with Ref<T>.
-
-   RETURNS
-     nothing
-
-   NOTES
-        compatible SQL types : REF
-*/
-#ifndef WIN32COMMON
-template <class T>
-void getVector( ResultSet *rs, unsigned int index, 
-                OCCI_STD_NAMESPACE::vector<Ref<T> > &vect) 
-{
-  OCCI_STD_NAMESPACE::vector<void *> vec_ref;
-  getVectorOfOCIRefs(rs, index, vec_ref);
-
-  const Connection *sess = rs->getStatement()->getConnection();
-
-  vect.clear();
-  unsigned int size = vec_ref.size();
-  vect.reserve( size );
-  for (unsigned int i=0; i< size; i++)
-  {
-    if (vec_ref[i] == (OCIRef *)0)
-       vect.push_back(Ref<T>());     // pushing a default-constructed Ref
-     else
-       vect.push_back(Ref<T>(sess, (OCIRef *)vec_ref[i], FALSE));
-  }
-}
-#endif
-
-/*------------------------ setVector for PObject*---------------------------*/
-/*
-   NAME
-      SetVector - overloaded function. Binds the attribute in the current
-      position with a vector of objects.
-
-   PARAMETERS
-      rs - ResultSet
-      vect- reference to vector of objects(OUT parameter).
-
-   DESCRIPTION
-     Binds the column in the specified position with a vector of signed int .
-   The column at the current position should be a collection type (varray or
-   nested table). The SQL type of the elements in the collection should be
-   compatible with objects .
-
-   RETURNS
-     nothing
-
-   NOTES
-     compatible SQL types : SQLT_NTY
- 
-     This will be calling setVector(..., vector<PObject*>,..)
-
-*/
-#ifdef WIN32COMMON
-// and other platforms that do not support
-// partial function template specialization
-
-template <class T>
-void setVector( Statement *stmt, unsigned int index, 
-                const OCCI_STD_NAMESPACE::vector<T> &vect, 
-                const OCCI_STD_NAMESPACE::string &sqltype) 
-{
-  OCCI_STD_NAMESPACE::vector<PObject *> vec_pobj;
-  unsigned int size = vect.size();
-  vec_pobj.reserve( size );
-  
-  for (unsigned int i = 0; i < size; i++)
-    vec_pobj.push_back((PObject *)vect[i]);
-
-  setVectorOfPObjects(stmt, index, vec_pobj, sqltype);
-}
-
-template <class T>
-void setVector( Statement *stmt, unsigned int index, const OCCI_STD_NAMESPACE::
-vector<T> &vect, const OCCI_STD_NAMESPACE::string &schemaName,
-const OCCI_STD_NAMESPACE::string &typeName)
-{
-  OCCI_STD_NAMESPACE::vector<PObject *> vec_pobj;
-  unsigned int size = vect.size();
-  vec_pobj.reserve( size );
-
-  for (unsigned int i = 0; i < size; i++)
-    vec_pobj.push_back((PObject *)vect[i]);
-
-  setVectorOfPObjects(stmt, index, vec_pobj, schemaName, typeName);
-}
-
-template <class T>
-void setVector( Statement *stmt, unsigned int index, const OCCI_STD_NAMESPACE::
-vector<T> &vect, const UString &schemaName,
-const UString &typeName)
-{
-  OCCI_STD_NAMESPACE::vector<PObject *> vec_pobj;
-  unsigned int size = vect.size();
-  vec_pobj.reserve( size );
-
-  for (unsigned int i = 0; i < size; i++)
-    vec_pobj.push_back((PObject *)vect[i]);
-
-  setVectorOfPObjects(stmt, index, vec_pobj, schemaName, typeName);
-}
-#else
-template <class T>
-void setVector( Statement *stmt, unsigned int index, const OCCI_STD_NAMESPACE::
-vector<T *> &vect, const OCCI_STD_NAMESPACE::string &sqltype)
-{
-  OCCI_STD_NAMESPACE::vector<PObject *> vec_pobj;
-  unsigned int size = vect.size();
-  vec_pobj.reserve( size );
-
-  for (unsigned int i = 0; i < size; i++)
-    vec_pobj.push_back((PObject *)vect[i]);
-
-  setVectorOfPObjects(stmt, index, vec_pobj, sqltype);
-}
-
-template <class T>
-void setVector( Statement *stmt, unsigned int index, const OCCI_STD_NAMESPACE::
-vector<T *> &vect, const OCCI_STD_NAMESPACE::string &schemaName,
-const OCCI_STD_NAMESPACE::string &typeName)
-{
-  OCCI_STD_NAMESPACE::vector<PObject *> vec_pobj;
-  unsigned int size = vect.size();
-  vec_pobj.reserve( size );
-
-  for (unsigned int i = 0; i < size; i++)
-    vec_pobj.push_back((PObject *)vect[i]);
-
-  setVectorOfPObjects(stmt, index, vec_pobj, schemaName, typeName);
-}
-
-template <class T>
-void setVector( Statement *stmt, unsigned int index, const OCCI_STD_NAMESPACE::
-vector<T *> &vect, const UString &schemaName,
-const UString &typeName)
-{
-  OCCI_STD_NAMESPACE::vector<PObject *> vec_pobj;
-  unsigned int size = vect.size();
-  vec_pobj.reserve( size );
-
-  for (unsigned int i = 0; i < size; i++)
-    vec_pobj.push_back((PObject *)vect[i]);
-
-  setVectorOfPObjects(stmt, index, vec_pobj, schemaName, typeName);
-}
-#endif
-
-/*------------------------ setVector for Ref<T>---------------------------*/
-/*
-   NAME
-      setVector - overloaded function. Binds the attribute in the current
-      position with a vector of Ref<T>.
-
-   PARAMETERS
-      rs - ResultSet
-      vect- reference to vector of REF
-
-   DESCRIPTION
-     Binds the column in the specified position with a vector of signed int .
-   The column at the current position should be a collection type (varray or
-   nested table). The SQL type of the elements in the collection should be
-   compatible with OCIRef* .
-
-   RETURNS
-     nothing
-
-   NOTES
-     compatible SQL types : REF 
-
-     This will just call setVector(..., vector<OCIRef*>,..)
-
-
-*/
-#ifndef WIN32COMMON
-template <class T>
-void setVector( Statement *stmt, unsigned int index, 
-                const OCCI_STD_NAMESPACE::vector<Ref<T> > &vect, 
-                const OCCI_STD_NAMESPACE::string &sqltype)
-{
-  OCCI_STD_NAMESPACE::vector<void *> vec_ref;
-  OCCI_STD_NAMESPACE::vector<OCIInd> vec_ind;
-  unsigned int size = vect.size();
-  vec_ref.reserve( size );
-  vec_ind.reserve( size );
-
-  for (unsigned int i = 0; i < size; i++)
-  {
-    vec_ref.push_back((void *)vect[i].getRef());
-    vec_ind.push_back( vect[i].isNull() ? OCI_IND_NULL : OCI_IND_NOTNULL);
-  }
-
-  setVectorOfOCIRefs(stmt, index, vec_ref, vec_ind, sqltype);
-}
-
-template <class T>
-void setVector( Statement *stmt, unsigned int index, 
-                const OCCI_STD_NAMESPACE::vector<Ref<T> > &vect, 
-                const OCCI_STD_NAMESPACE::string &schemaName,
-                const OCCI_STD_NAMESPACE::string &typeName)
-{
-  OCCI_STD_NAMESPACE::vector<void *> vec_ref;
-  OCCI_STD_NAMESPACE::vector<OCIInd> vec_ind;
-  unsigned int size = vect.size();
-  vec_ref.reserve( size );
-  vec_ind.reserve( size );
-
-  for (unsigned int i = 0; i < size; i++)
-  {
-    vec_ref.push_back((void *)vect[i].getRef());
-    vec_ind.push_back( vect[i].isNull() ? OCI_IND_NULL : OCI_IND_NOTNULL);
-  }
-
-  setVectorOfOCIRefs(stmt, index, vec_ref, vec_ind, schemaName, typeName);
-}
-
-template <class T>
-void setVector( Statement *stmt, unsigned int index, 
-                const OCCI_STD_NAMESPACE::vector<Ref<T> > &vect, 
-                const UString &schemaName,
-                const UString &typeName)
-{
-  OCCI_STD_NAMESPACE::vector<void *> vec_ref;
-  OCCI_STD_NAMESPACE::vector<OCIInd> vec_ind;
-  unsigned int size = vect.size();
-  vec_ref.reserve( size );
-  vec_ind.reserve( size );
-
-  for (unsigned int i = 0; i < size; i++)
-  {
-    vec_ref.push_back((void *)vect[i].getRef());
-    vec_ind.push_back( vect[i].isNull() ? OCI_IND_NULL : OCI_IND_NOTNULL);
-  }
-
-  setVectorOfOCIRefs(stmt, index, vec_ref, vec_ind, schemaName, typeName);
-}
-#endif
-
-/*------------------------ getVector for Ref<T> ---------------------------*/
-/*
-   NAME
-      getVector - overloaded function. Retrieves the attribute in the current
-position as a vector of Ref<T>
-
-   PARAMETERS
-      stmt - Statement
-      vect- reference to vector of Ref<T>(OUT parameter).
-
-   DESCRIPTION
-     Retrieves the column in the specified position as a vector of Ref<T>.
-   The attribute at the current position should be a collection type (varray or
-   nested table). The SQL type of the elements in the collection should be
-   compatible with Ref<T>.
-
-   RETURNS
-     nothing
-
-   NOTES
-        compatible SQL types : REF
-*/
-#ifndef WIN32COMMON
-template <class T>
-void getVector( Statement *stmt, unsigned int index, 
-                OCCI_STD_NAMESPACE::vector<Ref<T> > &vect) 
-{
-  OCCI_STD_NAMESPACE::vector<void *> vec_ref;
-  getVectorOfOCIRefs(stmt, index, vec_ref);
-
-  const Connection *sess = stmt->getConnection();
-
-  vect.clear();
-  unsigned int size = vec_ref.size();
-  vect.reserve( size );
-  for (unsigned int i=0; i< size; i++)
-  {
-    if (vec_ref[i] == (OCIRef *)0)
-       vect.push_back(Ref <T>());     // pushing a default-constructed Ref
-     else
-       vect.push_back(Ref<T> (sess, (OCIRef *)vec_ref[i], FALSE));
-  }
- 
-}
-#endif
-
-// Platform independent get/setVectorOfRefs method added
-// get(set)Vector of Ref<T> and get(set)VectorOfRefs are identical 
-// in functionality. 
-
-/*------------------------ getVectorOfRefs for Ref<T> ----------------------*/
-/*
-   NAME
-      getVectorOfRefs - overloaded function. Retrieves the attribute in the
-      current position as a vector of Ref<T>
-
-   PARAMETERS
-      rs - ResultSet
-      vect- reference to vector of Ref<T>(OUT parameter).
-
-   DESCRIPTION
-     Retrieves the column in the specified position as a vector of Ref<T>.
-   The attribute at the current position should be a collection type (varray or
-   nested table). The SQL type of the elements in the collection should be
-   compatible with Ref<T>.
-
-   RETURNS
-     nothing
-
-   NOTES
-        compatible SQL types : REF
-*/
-
-template <class T>
-void getVectorOfRefs( ResultSet *rs, unsigned int index, 
-OCCI_STD_NAMESPACE::vector<Ref<T> > &vect)
-{
-  OCCI_STD_NAMESPACE::vector<void *> vec_ref;
-  getVectorOfOCIRefs(rs, index, vec_ref);
-
-  const Connection *sess = rs->getStatement()->getConnection();
-
-  vect.clear();
-  unsigned int size = vec_ref.size();
-  vect.reserve( size );
-  for (unsigned int i=0; i< size; i++)
-  {
-    if (vec_ref[i] == (OCIRef *)0)
-       vect.push_back(Ref<T>());     // pushing a default-constructed Ref
-     else
-       vect.push_back(Ref<T>(sess, (OCIRef *)vec_ref[i], FALSE));
-  }
-}
-
-/*------------------------ setVectorOfRefs for Ref<T>-----------------------*/
-/*
-   NAME
-      setVectorOfRefs - overloaded function. Binds the attribute in the current
-      position with a vector of Ref<T>.
-
-   PARAMETERS
-      rs - ResultSet
-      vect- reference to vector of REF
-
-   DESCRIPTION
-     Binds the column in the specified position with a vector of signed int .
-   The column at the current position should be a collection type (varray or
-   nested table). The SQL type of the elements in the collection should be
-   compatible with OCIRef* .
-
-   RETURNS
-     nothing
-
-   NOTES
-     compatible SQL types : REF
-
-     This will just call setVector(..., vector<OCIRef*>,..)
-
-
-*/
-
-template <class T>
-void setVectorOfRefs( Statement *stmt, unsigned int index, 
-const OCCI_STD_NAMESPACE::vector<Ref<T> > &vect, 
-const OCCI_STD_NAMESPACE::string &sqltype)
-{
-  OCCI_STD_NAMESPACE::vector<void *> vec_ref;
-  OCCI_STD_NAMESPACE::vector<OCIInd> vec_ind;
-  unsigned int size = vect.size();
-  vec_ref.reserve( size );
-  vec_ind.reserve( size );
-
-  for (unsigned int i = 0; i < size; i++)
-  {
-    vec_ref.push_back((void *)vect[i].getRef());
-    vec_ind.push_back( vect[i].isNull() ? OCI_IND_NULL : OCI_IND_NOTNULL);
-  }
-
-  setVectorOfOCIRefs(stmt, index, vec_ref, vec_ind, sqltype);
-}
-
-template <class T>
-void setVectorOfRefs( Statement *stmt, unsigned int index, 
-const OCCI_STD_NAMESPACE::vector<Ref<T> > &vect, 
-const OCCI_STD_NAMESPACE::string &schemaName,
-const OCCI_STD_NAMESPACE::string &typeName)
-{
-  OCCI_STD_NAMESPACE::vector<void *> vec_ref;
-  OCCI_STD_NAMESPACE::vector<OCIInd> vec_ind;
-  unsigned int size = vect.size();
-  vec_ref.reserve( size );
-  vec_ind.reserve( size );
-
-  for (unsigned int i = 0; i < size; i++)
-  {
-    vec_ref.push_back((void *)vect[i].getRef());
-    vec_ind.push_back( vect[i].isNull() ? OCI_IND_NULL : OCI_IND_NOTNULL);
-  }
-
-  setVectorOfOCIRefs(stmt, index, vec_ref, vec_ind, schemaName, typeName);
-}
-
-template <class T>
-void setVectorOfRefs( Statement *stmt, unsigned int index, 
-const OCCI_STD_NAMESPACE::vector<Ref<T> > &vect, 
-const UString &schemaName,
-const UString &typeName)
-{
-  OCCI_STD_NAMESPACE::vector<void *> vec_ref;
-  OCCI_STD_NAMESPACE::vector<OCIInd> vec_ind;
-  unsigned int size = vect.size();
-  vec_ref.reserve( size );
-  vec_ind.reserve( size );
-
-  for (unsigned int i = 0; i < size; i++)
-  {
-    vec_ref.push_back((void *)vect[i].getRef());
-    vec_ind.push_back( vect[i].isNull() ? OCI_IND_NULL : OCI_IND_NOTNULL);
-  }
-
-  setVectorOfOCIRefs(stmt, index, vec_ref, vec_ind, schemaName, typeName);
-}
-
-/*------------------------ getVectorOfRefs for Ref<T> ----------------------*/
-/*
-   NAME
-      getVectorOfRefs - overloaded function. Retrieves the attribute in the
-      current position as a vector of Ref<T>
-
-   PARAMETERS
-      stmt - Statement
-      vect- reference to vector of Ref<T>(OUT parameter).
-
-   DESCRIPTION
-     Retrieves the column in the specified position as a vector of Ref<T>.
-   The attribute at the current position should be a collection type (varray or
-   nested table). The SQL type of the elements in the collection should be
-   compatible with Ref<T>.
-
-   RETURNS
-     nothing
-
-   NOTES
-        compatible SQL types : REF
-*/
-
-template <class T>
-void getVectorOfRefs( Statement *stmt, unsigned int index, 
-OCCI_STD_NAMESPACE::vector <Ref<T> > &vect)
-{
-  OCCI_STD_NAMESPACE::vector<void *> vec_ref;
-  getVectorOfOCIRefs(stmt, index, vec_ref);
-
-  const Connection *sess = stmt->getConnection();
-
-  vect.clear();
-  unsigned int size = vec_ref.size();
-  vect.reserve( size );
-  for (unsigned int i=0; i< size; i++)
-  {
-    if (vec_ref[i] == (OCIRef *)0)
-       vect.push_back(Ref <T>());     // pushing a default-constructed Ref
-     else
-       vect.push_back(Ref<T> (sess, (OCIRef *)vec_ref[i], FALSE));
-  }
-}
-/*----------------------------- pinVectorOfRefs---------------------*/
-/*
-   NAME
-    pinVectorOfRefs - array pin implementation
-
-   PARAMETERS
-     conn- Connection object
-     vecRef - vector of OCIRefs *
-     vecCor - vector of OCIComplexObject *
-     vecPOBj - vector of PObject * ( OUT )
-
-   DESCRIPTION
-    implements the array pin of refs passed and returns the corresponding
-    PObject s
-
-   RETURNS
-
-   NOTES
-*/
-template <class T>
-void pinVectorOfRefs( const Connection *conn,
-OCCI_STD_NAMESPACE::vector<Ref<T> > &vect, 
-OCCI_STD_NAMESPACE::vector<T* > &vectObj, LockOptions lockOpt) 
-{
-   
- OCCI_STD_NAMESPACE::vector<void *> vecRef;
- OCCI_STD_NAMESPACE::vector<void *> vecCor;
- OCCI_STD_NAMESPACE::vector<PObject *> vecPObj;
- unsigned int sz = vect.size();
- vecRef.reserve( sz );
- vecCor.reserve( sz );
-
- for ( unsigned int  i=0; i < sz; i++)
- {
-   vecRef.push_back((void *)vect[i].getRef());
-   vecCor.push_back((void *)vect[i].getCor());
- }
- pinVectorOfOCIRefs(conn, vecRef, vecCor, vecPObj, lockOpt);
- for ( unsigned int  k=0; k < sz; k++)
- {
-   vectObj.push_back((T *)vecPObj[k]);
-   vect[k].setPinnedObject(vecPObj[k]);
- }
-}
-
-/*----------------------------- pinVectorOfRefs---------------------*/
-/*
-   NAME
-    pinVectorOfRefs - array pin implementation
-
-   PARAMETERS
-     conn- Connection object
-     vecRef - vector of OCIRefs *
-     vecCor - vector of OCIComplexObject *
-
-   DESCRIPTION
-    implements the array pin of refs passed 
-
-   RETURNS
-
-   NOTES
-*/
-template <class T>
-void pinVectorOfRefs( const Connection *conn,
-OCCI_STD_NAMESPACE::vector<Ref<T> > &vect,
-LockOptions lockOpt)
-{
-  
- OCCI_STD_NAMESPACE::vector<void *> vecRef;
- OCCI_STD_NAMESPACE::vector<void *> vecCor;
- OCCI_STD_NAMESPACE::vector<PObject *> vecPObj;
- unsigned int sz = vect.size();
- vecRef.reserve( sz );
- vecCor.reserve( sz );
-
- for ( unsigned int  i=0; i < sz; i++)
- {
-   vecRef.push_back((void *)vect[i].getRef());
-   vecCor.push_back((void *)vect[i].getCor());
- }
- pinVectorOfOCIRefs(conn, vecRef, vecCor,vecPObj, lockOpt);
- for ( unsigned int  k=0; k < sz; k++)
-   vect[k].setPinnedObject(vecPObj[k]);
-}
-
-
-
-/*---------------------------------------------------------------------------
-                          INTERNAL FUNCTIONS
-  ---------------------------------------------------------------------------*/
-
-
-} /* end of namespace occi */
-} /* end of namespace oracle */
-#endif                                              /* OCCICONTROL_ORACLE */
-
-#endif                                              /* _olint */
diff --git a/src/terralib/drivers/OracleSpatial/OCI/include/occiData.h b/src/terralib/drivers/OracleSpatial/OCI/include/occiData.h
deleted file mode 100644
index fe76fe4..0000000
--- a/src/terralib/drivers/OracleSpatial/OCI/include/occiData.h
+++ /dev/null
@@ -1,936 +0,0 @@
-/* Copyright (c) 2000, 2003, Oracle Corporation.  All rights reserved.  */
-   
-/* 
-   NAME 
-     occiData.h - header file for OCCI data classes
-
-   DESCRIPTION 
-     Class definitions for Stream, Blob, Clob ,Bfile,
-     Number, Date, IntervalYM, IntervalDS, Time,
-     Timestamp
-
-   RELATED DOCUMENTS 
-     <note any documents related to this facility>
- 
-   EXPORT FUNCTION(S) 
-   <external functions declared for use outside package - one-line descriptions>
-
-   INTERNAL FUNCTION(S)
-     <other external functions declared - one-line descriptions>
-
-   EXAMPLES
-
-   NOTES
-     <other useful comments, qualifications, etc.>
-
-   MODIFIED   (MM/DD/YY)
-   shiyer      10/31/03 - Timestamp constructors issue 
-   rvallam     10/07/03 - bug 3089939 - add private method in Date to compute 
-                          hour and min component in daysBetween to be passed 
-                          to set method of IntervalDS.
-   cparampa    08/21/03 - added toCopy to IntervalDS and IntervalYM
-   cparampa    07/14/03 - make SubscriptionImpl friend of Bytes class. 
-   rvallam     02/12/03 - modified BFloat/BDouble interface - BFloat/BDouble
-                          type is now a struct
-   cparampa    01/20/03 - made ProducerImpl friend of Bytes class
-   rvallam     11/19/02 - objects support for interval class
-   shiyer      11/15/02 - Add UTF16 support to IntervalYM & IntervalDS
-   cparampa    12/11/02 - removed references to class Payload
-   cparampa    10/12/02 - AQ additions
-   shiyer      10/12/02 - Added UTF16 version of get/set CharsetId in Clob
-   shiyer      09/06/02 - OCCI globalization support
-   aahluwal    06/04/02 - bug 2360115
-   vvinay      02/21/02 - operator= added for Bytes
-   gayyappa    10/23/01 - fix bug 2073327 , use string instead of enum CharSet  
-   vvinay      12/21/01 - signed char constructor and cast operator
-                          (bug 2073334)
-                          binary operator methods not friends any more
-   gayyappa    15/10/01 - add parameter toCopy to Lob/Timestamp private 
-                          constructors 
-   rvallam     04/09/01 - change private constructor in Number to pass
-                          parameter by reference and made it const
-   chliang     03/05/01 - disable olint
-   rvallam     01/27/02 - remove #include <ostream>
-   gayyappa    01/17/01 - add methods/operators to Interval and
-                          timestamp classes..
-   gayyappa    12/15/00 - interface changes in set methods
-   rvallam     11/29/00 - change method signature in Bytes
-                          added 3 new methods in Number  
-   rvallam     10/20/00  - change method signatures in Date
-   rvallam     09/15/00 - make StmtImpl/ResultSetImpl friend to 
-                          interval classes 
-   gayyappa    08/21/00 - modified timestamp, interval headers.
-                          add OCIEnv to constructor of Bytes.,
-                          removed getOCIRaw from Bytes.
-                          add const to setVector mthds of anydata.
-                          add dvoid* data member to Timestamp/Interval.
-   rvallam     08/10/00 - modified CORE class headers to add friends , 
-                          added private constructor in Bytes
-   slari       08/02/00 - comment out Stream
-   rratnam     08/04/00 - updated the LOB stream interface
-   rkasamse    08/07/00 - make getVector friend of Time
-   slari       07/31/00 - add const to Bytes methods
-   slari       07/25/00 - disable Bytes(Bytes *)
-   slari       07/23/00 - add Bytes
-   gayyappa    07/26/00 - update Timestamp, IntervalYM, IntervalDS.
-   gayyappa    07/04/00 - for fixing a problem in occiNumber
-   rratnam     06/13/00 - Updated LOB class headers
-   kmohan      05/31/00 - Change Environment to Environment * in 
-			  Date constructor
-   kmohan      05/29/00 - No string
-   rkasamse    04/25/00 - Added string class header
-   etucker     04/19/00 - Added CORE class headers
-   kmohan      04/11/00 - Creation
-
-*/
-
-#ifndef _olint   /* disable olint check */
-
-#ifndef OCCIDATA_ORACLE
-# define OCCIDATA_ORACLE
-
-#ifndef OCCICOMMON_ORACLE
-#include <occiCommon.h>
-#endif
-
-#ifndef OCCICONTROL_ORACLE
-#include <occiControl.h>
-#endif
-
-namespace oracle {
-namespace occi {
-class Bytes
-{
- 
- public:
- 
-  Bytes(const Environment *env = NULL);      // default constructor
- 
-  Bytes(unsigned char *value, unsigned int count, 
-            unsigned int offset = 0, const Environment *env = NULL); 
-
-  Bytes(const Bytes &e); // copy constructor
-
- 
-                    // public methods
- 
-  void getBytes(unsigned char *dst, unsigned int count, 
-                        unsigned int srcBegin = 0,
-                        unsigned int dstBegin = 0) const; 
- 
-  unsigned int length() const;
- 
-  unsigned char byteAt(unsigned int index) const;
-
-  bool isNull() const;
- 
-  void setNull();
-
-  void operator=(const Bytes &other);
- 
-  ~Bytes();
-
-private:
-                                // private data members
-  Bytes(OCIEnv *,OCIRaw *) ;
-  Bytes(Ptr<BytesImpl> bytesPtr) ;
-  Ptr<BytesImpl> ptr_;
-  friend class AnyDataImpl;
-  friend class aq::MessageImpl;
-  friend class aq::ProducerImpl;
-  friend class aq::SubscriptionImpl;
-  friend  void getVector(const AnyData &any, 
-                         OCCI_STD_NAMESPACE::vector<Bytes> &vect) ;
-  friend  void setVector(AnyData &any, 
-  const OCCI_STD_NAMESPACE::vector<Bytes> &vect) ;
-
-};
- 
-class Bfile
-{
-  public :
-
-    Bfile();
-    Bfile(const Connection *connectionp) ;
-    Bfile(const Bfile &srcBfile) ;
-    ~Bfile();
-    unsigned int length() const ;
-    OCCI_STD_NAMESPACE::string getDirAlias() const ;
-    UString getUStringDirAlias() const ;
-    OCCI_STD_NAMESPACE::string getFileName() const ;
-    UString getUStringFileName() const ;
-    void setName(const OCCI_STD_NAMESPACE::string &dirAlias, 
-                 const OCCI_STD_NAMESPACE::string &fileName) ;
-    void setName(const UString &dirAlias, const UString &fileName) ;
-    bool fileExists() const ; 
-    Bfile& operator =(const Bfile &srcBfile) ;
-    bool operator ==(const Bfile &srcBfile) const ;
-    bool operator !=(const Bfile &srcBfile) const ;
-    void setNull() ;
-    bool isNull() const ;
-    bool isInitialized() const;
-    void open() ;
-    void close() ;
-    bool isOpen() const ;
-    unsigned int read(unsigned int  amt, unsigned char *buffer,
-      unsigned int  bufsize, unsigned int offset = 1) const ;
-    Stream* getStream(unsigned int offset = 1,
-      unsigned int amount =0)  ;
-    void closeStream(Stream *stream);
-
-  private:
-
-    //Data Members:
-
-    // pointer to the FILE locator
-    OCIBFileLocator *filep; 
-
-    // pointer to the ConnectionImpl instance
-    const ConnectionImpl *connp; 
-
-    // pointer to the LobStreamImpl instance obtained from this FILE
-    LobStreamImpl *streamp;
-
-    void *bfileExt;
-
-    //Enumerations:
-    enum {MAXDIRNAMELEN = 32, MAXFILENAMELEN = 256};
-
-    //Constructor: 
-    Bfile(const Connection *connectionp, 
-    OCIBFileLocator *locatorp, bool toCopy = true) ;
-  
-    //Methods:
-    OCIBFileLocator* getLocator() const;
-    void do_getDirAlias( void * dirAlias, ub2 * dirAliasLen) const ;
-    void do_getFileName( void * fileName, ub2 * fileNameLen) const ;
-    void do_setName( void * alias, ub2 aliasLen,
-                     void *fileName, ub2 fileNameLen);   
-  // Friends
-  friend class AnyDataImpl;
-  friend class StatementImpl;
-  friend class ResultSetImpl;
-  friend class Blob;
-  friend class Clob;
-  friend class aq::MessageImpl;
-
-  friend void getVector(const AnyData&, OCCI_STD_NAMESPACE::vector<Bfile>&) ;
-  friend void getVector(Statement*, unsigned int, 
-  OCCI_STD_NAMESPACE::vector<Bfile>&) ;
-  friend void getVector(ResultSet*, unsigned int , 
-  OCCI_STD_NAMESPACE::vector<Bfile>&) ;
-  friend void setVector(AnyData&, const OCCI_STD_NAMESPACE::vector<Bfile>&) ;
-  friend void do_setVectorOfBfile(Statement*, unsigned int, 
-  const OCCI_STD_NAMESPACE::vector<Bfile>&, void *, unsigned int, void *, unsigned int ) ;
-};
-
-class Blob
-{
-  public:
-
-    Blob();
-    Blob(const Connection *connectionp) ;
-    Blob(const Blob &srcBlob) ;
-    ~Blob();
-    unsigned int getChunkSize() const ;
-    unsigned int length() const ;
-    Blob& operator =(const Blob &srcBlob) ;
-    bool operator ==(const Blob &srcBlob) const ;
-    bool operator !=(const Blob &srcBlob) const ;
-    void setNull() ;
-    bool isNull() const ;
-    void setEmpty() ;
-    void setEmpty(const Connection *connectionp) ;
-    bool isInitialized() const;
-    void open(LobOpenMode mode=OCCI_LOB_READWRITE) ;
-    void close() ;
-    bool isOpen() const ;
-    void copy(const Blob &srcBlob, unsigned int numBytes,
-      unsigned int  dstOffset =1, unsigned int srcOffset =1) ;
-    void copy(const Bfile &srcBfile, unsigned int numBytes,
-      unsigned int  dstOffset =1, unsigned int srcOffset =1) ;
-    void append(const Blob &srcBlob) ;
-    unsigned int read(unsigned int  amt, unsigned char *buffer,
-      unsigned int  bufsize, unsigned int offset = 1) const ;
-    unsigned int write(unsigned int amt, unsigned char *buffer,
-      unsigned int bufsize, unsigned int offset = 1) ;
-    unsigned int writeChunk(unsigned int amt, unsigned char *buffer,
-      unsigned int bufsize, unsigned int offset = 1) ;
-    void trim(unsigned int newlen) ;
-    Stream* getStream(unsigned int offset = 1,
-      unsigned int amount =0)  ;
-    void closeStream(Stream *stream);
-
-  private:
-
-    //Data Members:
-
-    // pointer to the BLOB locator
-    OCIBlobLocator *lobp; 
-
-    // pointer to the ConnectionImpl instance
-    const ConnectionImpl *connp; 
-
-    // pointer to the LobStreamImpl instance obtained from this LOB
-    LobStreamImpl *streamp; 
-
-    //for future use !
-    void *blobExt;
-
-    //Constructor: 
-    Blob(const Connection *connectionp, 
-    OCIBlobLocator *locatorp, bool toCopy=true) ;
-
-    //Methods:
-    OCIBlobLocator* getLocator() const;
-
-  // Friends
-  friend class AnyDataImpl;
-  friend class StatementImpl;
-  friend class ResultSetImpl;
-
-  friend void getVector(const AnyData&, OCCI_STD_NAMESPACE::vector<Blob>&) ;
-  friend void getVector(Statement*, unsigned int, 
-  OCCI_STD_NAMESPACE::vector<Blob>&) ;
-  friend void getVector(ResultSet*, unsigned int, 
-  OCCI_STD_NAMESPACE::vector<Blob>&) ;
-  friend void setVector(AnyData&, const OCCI_STD_NAMESPACE::vector<Blob>&) ;
-  friend void do_setVectorOfBlob(Statement*, unsigned int, 
-  const OCCI_STD_NAMESPACE::vector<Blob>&, void *, unsigned int, void *, unsigned int ) ;
-};
-
-class Clob
-{
-  public:
-
-    Clob();
-    Clob(const Connection *connectionp) ;
-    Clob(const Clob &srcClob) ;
-    ~Clob();
-    unsigned int getChunkSize() const ;
-    unsigned int length() const ;
-    OCCI_STD_NAMESPACE::string getCharSetId() const;
-    CharSetForm getCharSetForm() const;
-    void setCharSetId( const OCCI_STD_NAMESPACE::string &charset) ;
-    void setCharSetForm( CharSetForm csfrm) ;
-    Clob& operator =(const Clob &srcClob) ;
-    bool operator ==(const Clob &srcClob) const ;
-    bool operator !=(const Clob &srcClob) const ;
-    void setNull() ;
-    bool isNull() const ;
-    void setEmpty() ;
-    void setEmpty(const Connection *connectionp) ;
-    bool isInitialized() const;
-    void open(LobOpenMode mode=OCCI_LOB_READWRITE) ;
-    void close() ;
-    bool isOpen() const ;
-    void copy(const Clob &srcClob, unsigned int numBytes,
-              unsigned int  dstOffset = 1, unsigned int srcOffset = 1) ;
-    void copy(const Bfile &srcBfile, unsigned int numBytes,
-              unsigned int  dstOffset = 1, unsigned int srcOffset = 1) ;
-    void append(const Clob &srcClob) ;
-    unsigned int read(unsigned int  amt, unsigned char *buffer,
-                      unsigned int  bufsize,  unsigned int offset = 1) const;
-    unsigned int read(unsigned int  amt, utext *buffer,
-                      unsigned int  bufsize,  unsigned int offset = 1) const;
-    unsigned int write(unsigned int amt, unsigned char *buffer,
-                       unsigned int bufsize,  unsigned int offset = 1 );
-    unsigned int write(unsigned int amt, utext *buffer,
-                       unsigned int bufsize,  unsigned int offset = 1 );
-    unsigned int writeChunk(unsigned int amt, unsigned char *buffer,
-                            unsigned int bufsize, unsigned int offset = 1 );
-    unsigned int writeChunk(unsigned int amt, utext *buffer,
-                            unsigned int bufsize, unsigned int offset = 1 );
-    void trim(unsigned int newlen) ;
-    Stream* getStream(unsigned int offset = 1,
-      unsigned int amount =0 );
-    void closeStream(Stream *stream);
-    
-    UString getCharSetIdUString() const;
-    void setCharSetIdUString( const UString &charset) ;
-
-  private:
-
-    //Data Members:
-
-    // pointer to the CLOB locator
-    OCIClobLocator *lobp; 
-
-    // pointer to the ConnectionImpl instance
-    const ConnectionImpl *connp; 
-
-    // pointer to the LobStreamImpl instance obtained from this LOB
-    LobStreamImpl *streamp; 
-
-    //charset id
-    ub2 charsetId;
-
-    //charset form
-    CharSetForm charsetForm;
-
-    //for future use !
-    void *clobExt;
-
-    //Constructor: 
-    Clob(const Connection *connectionp, 
-    OCIClobLocator *locatorp, bool toCopy =true ) ;
-
-    //Methods:
-    OCIClobLocator* getLocator() const;
-    unsigned int do_read( unsigned int amt, void *buffer, 
-    unsigned int bufsize, unsigned int offset) const;
-    unsigned int do_write( unsigned int amt, void *buffer, 
-    unsigned int bufsize, unsigned int offset) ;
-    unsigned int do_writeChunk( unsigned int amt, void *buffer, 
-    unsigned int bufsize, unsigned int offset) ;
-   
-  // Friends
-  friend class AnyDataImpl;
-  friend class StatementImpl;
-  friend class ResultSetImpl;
-
-  friend void getVector(const AnyData&, OCCI_STD_NAMESPACE::vector<Clob>&) ;
-  friend void getVector(Statement*, unsigned int, 
-  OCCI_STD_NAMESPACE::vector<Clob>&) ;
-  friend void getVector(ResultSet*, unsigned int, 
-  OCCI_STD_NAMESPACE::vector<Clob>&) ;
-  friend void setVector(AnyData&, const OCCI_STD_NAMESPACE::vector<Clob>&) ;
-  friend void do_setVectorOfClob(Statement*, unsigned int, 
-  const OCCI_STD_NAMESPACE::vector<Clob>&, void *, unsigned int, void *, unsigned int ) ;
-};
-
-class Number
-{
- 
- public:
-
- // Constructors
-  /* default constructor added  */
-  Number();
-  Number(const Number &srcNum);
-  Number(long double val) ;
-  Number(double val) ;
-  Number(float val) ;
-  Number(long val) ;
-  Number(int val) ;
-  Number(short val) ;
-  Number(char val) ;
-  Number(signed char val);
-  Number(unsigned long val) ;
-  Number(unsigned int val) ;
-  Number(unsigned short val) ;
-  Number(unsigned char val) ;
-
-  ~Number();
-  // Methods
-  const Number abs() const ;
-  // unary negate
-  const Number operator-() ;
-  // unary increment
-  Number& operator++() ;
-  const Number operator++(int) ;
-  // unary decrement
-  Number& operator--() ;
-  const Number operator--(int) ;
-  // assigment operator
-  Number& operator=(const Number &a);
-  // add and assign
-  Number& operator+=(const Number &a) ;
-  // subtract and assign
-  Number& operator-=(const Number &a) ;
-  // Mulitply an assign
-  Number& operator*=(const Number &a) ;
-   // divide and assign
-  Number& operator/=(const Number &a) ;
-  // Modulo and assign
-  Number& operator%=(const Number &a) ;
-  // casting operators
-  operator long() const;
-  operator int() const;
-  operator short() const;
-  operator char() const;
-  operator signed char() const;
-  operator unsigned long() const;
-  operator unsigned int() const;
-  operator unsigned short() const;
-  operator unsigned char() const;
-  operator long double() const;
-  operator double() const;
-  operator float() const;
-  // Decimal shift
-  const Number shift(int val) const ;
-  // Integer Power
-  const Number intPower(int val) const ;
-  const Number ceil() const ;
-  const Number floor() const ;
-  const Number squareroot() const ;
-  const int sign() const ;
-  // conversion routines
-  //  Format Number and return as a OCCI_STD_NAMESPACE::string
-  OCCI_STD_NAMESPACE::string toText(const Environment *envp,
-                const OCCI_STD_NAMESPACE::string &fmt,const OCCI_STD_NAMESPACE::string &nlsParam="") const
-                ;
-  UString toText(const Environment *envp,
-                const UString &fmt,const UString &nlsParam) const
-                ;
-  // Create an Number from formatted text
-  void fromText(const Environment *envp,const OCCI_STD_NAMESPACE::string &number,
-                const OCCI_STD_NAMESPACE::string &fmt, const OCCI_STD_NAMESPACE::string &nlsParam = "")
-               ;
-  void fromText(const Environment *envp,
-  const UString &number, 
-  const UString &fmt, const UString &nlsParam);
-  void fromBytes(const Bytes &s) ;
-  Bytes toBytes() const;
-  // truncate digits
-  const Number trunc(int decplace) const ;
-   // round to the decplace place.
-  const Number round(int decplace) const ;
-  // returns an Number with digits decimal digits
-  const Number prec(int digits) const ;
-  const Number sin() const ;
-  const Number cos() const ;
-  const Number tan() const ;
-  const Number hypSin() const ;
-  const Number hypCos() const ;
-  const Number hypTan() const ;
-  const Number arcSin() const ;
-  const Number arcCos() const ;
-  const Number arcTan() const ;
-  const Number arcTan2(const Number &val) const;
-  const Number power(const Number &val) const;
-  const Number exp() const ;
-  const Number ln() const ;
-  const Number log(const Number &val) const;
-  bool isNull() const;
-  void setNull();
- private:
-  /* Private constructor for constructing number from methods inside  */
-  Number(const OCINumber &result);
-  OCINumber getOCINumber() const;
-
-  OCINumber data;
-  /* a flag to indicate if the  Number  is null */
-  bool numberIsNull;
-  void *numberExt;
-
-  // a >= b
-  friend bool operator>=(const Number &a, const Number &b);
-  // a < = b
-  friend bool operator<=(const Number &a, const Number &b);
-  // a > b
-  friend bool operator>(const Number &a, const Number &b);
-  // a < b
-  friend bool operator<(const Number &a, const Number &b);
-
-  friend class IntervalDS;
-  friend class IntervalYM;
-  friend const IntervalYM operator*(const IntervalYM &a,
-  const Number& factor) ;
-  friend const IntervalDS operator*(const IntervalDS &a,
-  const Number& factor) ;
-  friend const IntervalYM operator/(const IntervalYM &a,
-  const Number &factor) ;
-  friend const IntervalDS operator/(const IntervalDS &a,
-  const Number &factor) ;
-  friend class ResultSetImpl;
-  friend class StatementImpl;
-  friend class AnyDataImpl;
-  friend void getVector(const AnyData &any, 
-  OCCI_STD_NAMESPACE::vector<Number> &vect);
-  friend void setVector(AnyData &any, 
-  const OCCI_STD_NAMESPACE::vector<Number> &vect) ;
-  friend Number MetaData::getNumber(MetaData::AttrId attrid)          const ;
-  friend void getVector(Statement  *stmt, unsigned int paramIndex,
-  OCCI_STD_NAMESPACE::vector<Number> &vect) ;
-  friend void do_setVectorOfNumber(Statement *stmt, unsigned int paramIndex,
-  const OCCI_STD_NAMESPACE::vector<Number> &vect, void *schemaName, unsigned int schemaNameLen,
-  void *typeName, unsigned int typeNameLen);
-  friend void getVector(ResultSet  *rs, unsigned int colIndex,
-  OCCI_STD_NAMESPACE::vector<Number> &vect);
-
-};
-
-class Date
-{
- public:
-
-  // Constructors
-  Date();
-  Date(const Date &a);
-  Date(const Environment *envp,int year = 1,unsigned int month = 1,
-           unsigned int day = 1,unsigned  int hour = 0,
-           unsigned int minute = 0, unsigned int seconds = 0);
-  ~Date();
-  // Methods
-
-  void setDate(int year = 1,unsigned int month = 1,unsigned int day = 1,
-               unsigned int hour = 0,unsigned int minute = 0,
-               unsigned int seconds = 0);
-  void getDate(int &year,unsigned int &month,unsigned int &day,
-           unsigned int &hour ,unsigned int &min ,unsigned int &sec) const;
-  Bytes toBytes() const ;
-  void fromBytes(const Bytes &byteStream, 
-  const Environment *envp = NULL);
-  OCCI_STD_NAMESPACE::string toText(
-                 const OCCI_STD_NAMESPACE::string &fmt = "",
-                 const OCCI_STD_NAMESPACE::string &nlsParam = "") const;
-  UString toText(
-                 const UString &fmt ,
-                 const UString &nlsParam ) const;
-  void fromText(const OCCI_STD_NAMESPACE::string &datestr,
-                const OCCI_STD_NAMESPACE::string &fmt = "",
-                const OCCI_STD_NAMESPACE::string &nlsParam = "",
-                const Environment *envp = NULL);
-  void fromText(const UString &datestr,
-                const UString &fmt , const UString &nlsParam ,
-                const Environment *envp = NULL);
-  Date toZone(const OCCI_STD_NAMESPACE::string &zone1, const OCCI_STD_NAMESPACE::string &zone2) const;
-  Date& operator=(const Date &d);
-  Date addMonths(int i) const;
-  Date addDays(int i) const ;
-  Date lastDay() const ;
-  IntervalDS daysBetween(const Date &d) const;
-  Date nextDay(const OCCI_STD_NAMESPACE::string &dow) const;
-  Date nextDay(const UString &dow) const;
-  bool isNull() const;
-  void setNull();
-  static Date getSystemDate(const Environment *envp) ;
-
- private:
-  OCIDate date;
-  OCIEnv *envhp;
-  bool dateIsNull;
-  void *dateExt;
-
-  /* private constructor */
-  Date(OCIEnv *envp,OCIDate dateval);
-  OCIDate getOCIDate() const;
-  void do_toText( void * fmt, ub1 fmtLen, void * nlsParam, 
-                  ub4 nlsParamLen, void * buf, ub4 * bufLen, 
-                  bool isUTF16) const;
-  void do_fromText( void * datestr, ub4 datestrLen,
-                  void * fmt, ub1 fmtLen,
-                  void * nlsParam, ub4 nlsParamLen,
-                  const Environment * envp,
-                  bool isUTF16);
-  Date do_nextDay( void * dow, size_t dowLen, bool isUTF16) const;
-  void constructHourAndMinute(sb4 &seconds, sb4 &hours, sb4 &minutes) const;
-  friend bool operator==(const Date &a,const Date &b);
-  friend bool operator>(const Date &a,const Date &b);
-  friend bool operator<(const Date &a,const Date &b);
-  friend bool operator!=(const Date &a,const Date &b);
-  friend bool operator>=(const Date &a,const Date &b);
-  friend bool operator<=(const Date &a,const Date &b);
-  friend class ResultSetImpl;
-  friend class StatementImpl;
-  friend class AnyDataImpl;
-  friend class aq::MessageImpl;
-  friend void getVector(const AnyData &any, 
-                        OCCI_STD_NAMESPACE::vector<Date> &vect) ;
-  friend void setVector(AnyData &any, 
-                        const OCCI_STD_NAMESPACE::vector<Date> &vect);
-  friend void getVector(Statement  *stmt, unsigned int paramIndex,
-   OCCI_STD_NAMESPACE::vector<Date> &vect)  ;
-  friend void do_setVectorOfDate(Statement *stmt, unsigned int paramIndex, 
-   const OCCI_STD_NAMESPACE::vector<Date> &vect, void *schemaName, unsigned int schemaNameLen,
-   void *typeName, unsigned int typeNameLen) ;
-  friend void getVector(ResultSet  *rs, unsigned int colIndex, 
-  OCCI_STD_NAMESPACE::vector<Date> &vect) ;
-
-}; //class Date
-
-class Timestamp
-{
-  public:
-  Timestamp() ;
-
-  Timestamp( const Environment *env, int year=1,
-             unsigned int month=1, unsigned int day=1, unsigned int hour=0,
-             unsigned int min=0 ,unsigned int sec=0, unsigned int fs=0, 
-             int tzhour=0, int tzmin=0) ;
-  Timestamp( const Environment *env, int year,
-             unsigned int month, unsigned int day, unsigned int hour,
-             unsigned int min ,unsigned int sec, unsigned int fs, 
-             const OCCI_STD_NAMESPACE::string &timezone);
-  Timestamp( const Environment *env, int year,
-             unsigned int month, unsigned int day, unsigned int hour,
-             unsigned int min ,unsigned int sec, unsigned int fs, 
-             const UString &timezone);
-  Timestamp( const Timestamp &src) ;
-  ~Timestamp();
-
-  void getTimeZoneOffset( int &hour, int &minute) const ;
-  void getTime( unsigned int &hour, unsigned int &minute,
-  unsigned int &second, unsigned int &fs) const ;
-  void getDate( int &year, unsigned int &month, unsigned int &day )const ;
-  OCCI_STD_NAMESPACE::string toText(const OCCI_STD_NAMESPACE::string &fmt, 
-                     unsigned int fsprec, 
-                     const OCCI_STD_NAMESPACE::string &nlsParam ="") const   ;
-  UString toText(const UString &fmt, 
-                 unsigned int fsprec, const UString &nlsParam ) const   ;
-  void setTimeZoneOffset( int hour,  int minute)  ;
-  void setTime( unsigned int hour, unsigned int minute,
-  unsigned int second, unsigned int fs)  ;
-  void setDate( int year, unsigned int month, unsigned int day ) ;
-  void setNull() ;
-  void fromText( const OCCI_STD_NAMESPACE::string &timestmpStr, 
-                 const OCCI_STD_NAMESPACE::string &fmt ,
-                 const OCCI_STD_NAMESPACE::string &nlsParam= "", 
-                 const Environment *env =NULL);
-  void fromText( const UString &timestmpStr, 
-                 const UString &fmt , const UString &nlsParam, 
-                 const Environment *env =NULL);
-  bool isNull() const;
-  Timestamp & operator =( const Timestamp &src) ;
-  const IntervalYM subYM(const Timestamp& val) const ;
-  const IntervalDS subDS(const Timestamp& val) const ;
-  const Timestamp intervalAdd(const IntervalDS& val) const ;
-  const Timestamp intervalSub(const IntervalDS& val) const ;
-  const Timestamp intervalAdd(const IntervalYM& val) const ;
-  const Timestamp intervalSub(const IntervalYM& val) const ;
-
-  friend bool operator==(const Timestamp &a,const Timestamp &b);
-  friend bool operator>(const Timestamp &a,const Timestamp &b);
-  friend bool operator<(const Timestamp &a,const Timestamp &b);
-  friend bool operator !=(const Timestamp &a,const Timestamp &b);
-  friend bool operator >=(const Timestamp &a,const Timestamp &b);
-  friend bool operator <=(const Timestamp &a,const Timestamp &b);
-
-  friend class ResultSetImpl;
-  friend class StatementImpl;
-  friend class AnyDataImpl;
-
-  private:
-   OCIDateTime *ocidatetime;
-   OCIEnv *ocienv;
-   void *timestampExt;
-
-   OCIDateTime *getOCIDateTime() const;
-   Timestamp( OCIEnv *env, OCIDateTime *dt, bool toCopy = true) ;
-   void allocateDataMembers( OCIEnv *env) ;
-   void do_TimestampConstruct( const Environment *env, int year, 
-   unsigned int month, unsigned int day, unsigned int hour, unsigned int min, 
-   unsigned int sec, unsigned int fs, void *tzinter);
-
-   friend  void getVector(const AnyData &any,
-   OCCI_STD_NAMESPACE::vector<Timestamp> &vect);
-   friend  void setVector(AnyData &any, 
-   const OCCI_STD_NAMESPACE::vector<Timestamp> &vect) ;
-   friend Timestamp MetaData::getTimestamp(
-   MetaData::AttrId attrid) const ;
-   friend void getVector(ResultSet  *rs, unsigned int,
-   OCCI_STD_NAMESPACE::vector<Timestamp> &vect) ;
-   friend void getVector(Statement  *rs, unsigned int,
-   OCCI_STD_NAMESPACE::vector<Timestamp> &vect) ;
-   friend void do_setVectorOfTimestamp(Statement *stmt, unsigned int paramIndex,
-   const OCCI_STD_NAMESPACE::vector<Timestamp> &vect, void *schemaName, unsigned int schemaNameLen,
-   void *typeName, unsigned int typeNameLen) ;
-}; // class Timestamp
-
-class IntervalDS
-{
-
-  public:
-  IntervalDS() ;
-  IntervalDS( const Environment *env,int day=0, 
-  int hour=0, int minute=0, int second=0, 
-  int fs=0) ;
-  IntervalDS( const IntervalDS &src) ;
-
-  ~IntervalDS();
-
-  int getDay () const ;
-  int getHour () const ;
-  int getMinute () const ;
-  int getSecond() const ;
-  int getFracSec () const ;
-  void set( int day, int hour, int minute, int second, int fracsec) ;
-  void setNull() ;
-  void fromText( const OCCI_STD_NAMESPACE::string &inpstr, const OCCI_STD_NAMESPACE::string &nlsParam ="",
-  const Environment *env=NULL)  ;
-  OCCI_STD_NAMESPACE::string toText( unsigned int lfprec, unsigned int fsprec,
-  const OCCI_STD_NAMESPACE::string &nlsParam="") const ;
-  bool isNull() const;
-  IntervalDS& operator =( const IntervalDS &src) ;
-  IntervalDS& operator +=( const IntervalDS &a);
-  IntervalDS& operator -=( const IntervalDS &a);
-  IntervalDS& operator *=( const Number &factor);
-  IntervalDS& operator /=( const Number &factor);
-
-  friend bool operator>(const IntervalDS &a,
-  const IntervalDS &b) ;
-  friend bool operator<(const IntervalDS &a,
-  const IntervalDS &b) ;
-  friend bool operator >=( const IntervalDS &a, 
-  const IntervalDS &b);
-  friend bool operator <=( const IntervalDS &a, 
-  const IntervalDS &b);
-  
-  //UTF16 support
-  void fromUText( const UString &inpstr, const Environment *env=NULL );
-  UString toUText( unsigned int lfprec, unsigned int fsprec) const;
-
-  private:
-   OCIInterval *ociinter;
-   OCIEnv *ocienv;
-   void *intervalDSExt;
-
-   IntervalDS( OCIEnv *env, OCIInterval *inter, bool toCopy = true) ;
-   OCIInterval * getOCIInterval() const;
-
-   void allocateDataMembers( OCIEnv *env) ;
-   friend const IntervalDS Timestamp::subDS(
-   const Timestamp& val) const ;
-   friend const Timestamp Timestamp::intervalAdd(
-   const IntervalDS& val) const ;
-   friend const Timestamp Timestamp::intervalSub(
-   const IntervalDS& val) const ;
-   friend class Date;
-   friend void getVector(ResultSet  *rs, unsigned int,
-   OCCI_STD_NAMESPACE::vector<IntervalDS> &vect) ;
-   friend void getVector(Statement  *rs, unsigned int,
-   OCCI_STD_NAMESPACE::vector<IntervalDS> &vect) ;
-   friend void do_setVectorOfIntervalDS(Statement *stmt, unsigned int paramIndex,
-   const OCCI_STD_NAMESPACE::vector<IntervalDS> &vect, void *schemaName, unsigned int schemaNameLen,
-   void *typeName, unsigned int typeNameLen) ;
-   friend class StatementImpl;
-   friend class ResultSetImpl;
-   friend class AnyDataImpl;
-   friend  void getVector(const AnyData &any,
-   OCCI_STD_NAMESPACE::vector<IntervalDS> &vect);
-   friend  void setVector(AnyData &any,
-   const OCCI_STD_NAMESPACE::vector<IntervalDS> &vect) ;
-
- 
-};  //class IntervalDS
-
-class IntervalYM
-{
-
-  public:
-  IntervalYM() ;
-  IntervalYM( const Environment *env,int year=0, int month=0) ;
-  IntervalYM( const IntervalYM &src) ;
-  ~IntervalYM();
-
-  int getYear() const ;
-  int getMonth() const ;
-
-  void set( int year, int month) ;
-  void setNull() ;
-  void fromText( const OCCI_STD_NAMESPACE::string &inpstr, const OCCI_STD_NAMESPACE::string &nlsParam="",
-  const Environment *env=NULL) ;
-  OCCI_STD_NAMESPACE::string toText( unsigned int lfprec, const OCCI_STD_NAMESPACE::string &nlsParam="") const;
-  bool isNull() const;
-  IntervalYM & operator =( const IntervalYM &src) ;
-  IntervalYM& operator +=( const IntervalYM &a);
-  IntervalYM& operator -=( const IntervalYM &a);
-  IntervalYM& operator *=( const Number &factor);
-  IntervalYM& operator /=( const Number &factor);
-
-  friend bool operator>(const IntervalYM &a, const IntervalYM &b) ;
-  friend bool operator<( const IntervalYM &a, const IntervalYM &b) ;
-  friend bool operator >=(const IntervalYM &a, const IntervalYM &b);
-  friend bool operator <=(const IntervalYM &a, const IntervalYM &b);
-  
-  //UTF16 support
-  void fromUText( const UString &inpstr, const Environment *env=NULL );
-  UString toUText( unsigned int lfprec ) const;
-
-  private:
-   OCIInterval *ociinter;
-   OCIEnv *ocienv;
-   void *intervalYMExt;
-
-   IntervalYM( OCIEnv *env, OCIInterval *inter, bool toCopy = true) ;
-   OCIInterval *getOCIInterval() const;
-   void allocateDataMembers( OCIEnv *env) ;
-   friend const IntervalYM Timestamp :: subYM(
-   const Timestamp& val) const ;
-   friend const Timestamp Timestamp::intervalAdd(
-   const IntervalYM &val) const ;
-   friend const Timestamp Timestamp::intervalSub(
-   const IntervalYM &val) const ;
-
-   friend void getVector(ResultSet  *rs, unsigned int,
-   OCCI_STD_NAMESPACE::vector<IntervalYM> &vect) ;
-   friend void getVector(Statement  *rs, unsigned int,
-   OCCI_STD_NAMESPACE::vector<IntervalYM> &vect) ;
-   friend void do_setVectorOfIntervalYM(Statement *stmt, unsigned int paramIndex,
-   const OCCI_STD_NAMESPACE::vector<IntervalYM> &vect, void *schemaName, unsigned int schemaNameLen,
-   void *typeName, unsigned int typeNameLen) ;
-
-   friend class StatementImpl;
-   friend class ResultSetImpl;
-   friend class AnyDataImpl;
-   friend  void getVector(const AnyData &any,
-   OCCI_STD_NAMESPACE::vector<IntervalYM> &vect);
-   friend  void setVector(AnyData &any,
-   const OCCI_STD_NAMESPACE::vector<IntervalYM> &vect) ;
-
-}; //class IntervalYM
-
-
-Number operator+(const Number &a, const Number &b) ;
-Number operator/(const Number &dividend, const Number &divisor) ;
-Number operator*(const Number &a, const Number &b) ;
-Number operator%(const Number &a, const Number &b) ;
-Number operator-(const Number &subtrahend, const Number &subtractor) ;
-bool operator==(const Number &a, const Number &b);
-bool operator!=(const Number &a, const Number &b);
-
-const IntervalYM operator+(const IntervalYM &a, const IntervalYM &b) ;
-const IntervalYM operator-(const IntervalYM &a, const IntervalYM &b) ;
-const IntervalYM operator*(const IntervalYM &a, const Number& factor);
-const IntervalYM operator/(const IntervalYM &a, const Number &factor);
-bool operator==(const IntervalYM &a, const IntervalYM &b) ;
-bool operator!=(const IntervalYM &a, const IntervalYM &b) ;
-
-const IntervalDS operator+(const IntervalDS &a, const IntervalDS &b) ;
-const IntervalDS operator-(const IntervalDS &a, const IntervalDS &b) ;
-const IntervalDS operator*(const IntervalDS &a, const Number& factor);
-const IntervalDS operator/(const IntervalDS &a, const Number &factor);
-bool operator==(const IntervalDS &a, const IntervalDS &b) ;
-bool operator!=(const IntervalDS &a, const IntervalDS &b) ;
-
-
-typedef struct BFloat
-{
- float value;
- bool  isNull;
-
- BFloat()
- {
-   isNull = false;
-   value = 0.;
- }
-} BFloat;
-
-typedef struct BDouble
-{
- double value;
- bool   isNull;
-
- BDouble()
- {
-   isNull = false;
-   value = 0.;
- }
-} BDouble;
-
-/*---------------------------------------------------------------------------
-                           EXPORT FUNCTIONS
-  ---------------------------------------------------------------------------*/
-
-
-/*---------------------------------------------------------------------------
-                          INTERNAL FUNCTIONS
-  ---------------------------------------------------------------------------*/
-
-
-} /* end of namespace occi */
-} /* end of namespace oracle */
-#endif                                              /* OCCIDATA_ORACLE */
-
-#endif                                              /* _olint */
diff --git a/src/terralib/drivers/OracleSpatial/OCI/include/occiObjects.h b/src/terralib/drivers/OracleSpatial/OCI/include/occiObjects.h
deleted file mode 100644
index 35d0c0e..0000000
--- a/src/terralib/drivers/OracleSpatial/OCI/include/occiObjects.h
+++ /dev/null
@@ -1,990 +0,0 @@
-/* Copyright (c) 2000, 2003, Oracle Corporation.  All rights reserved.  */
-
-/* 
-   NAME 
-     occiObjects.h - header file for OCCI object classes
-
-   DESCRIPTION 
-     Class definitions for Ref, RefAny, AnyData
-
-   RELATED DOCUMENTS 
-     <note any documents related to this facility>
- 
-   EXPORT FUNCTION(S) 
-     <external functions declared for use outside package - one-line 
-     descriptions>
-
-   INTERNAL FUNCTION(S)
-     <other external functions declared - one-line descriptions>
-
-   EXAMPLES
-
-   NOTES
-     <other useful comments, qualifications, etc.>
-
-   MODIFIED   (MM/DD/YY)
-   cparampa    10/28/03 - add PObject::getSQLTypeName
-   shiyer      01/01/03 - add PObject::refresh
-   cparampa    02/19/03 - bug2732941-setFromRef takes schema and typename
-   rvallam     02/12/03 - modify Bfloat/Bdouble interface to use the new
-                          Bfloat/Bdouble type
-   rvallam     11/19/02 - objects support for interval classes
-   cparampa    12/26/02 - Added getType for AnyData,
-                          removed getAs/setFrom methods for Blob/Clob
-   cparampa    10/12/02 - making AnyData a public type
-   rvallam     10/12/02 - added method getCor to get the COR handle and the 
-                          setPinnedObject method - arrayPin 
-   rvallam     10/10/02 - objects performance enhancement - modified
-                          getObject and getVector<T *> to take the
-                          schName and typeName of the object
-   rvallam     10/11/02 - added native float/double API - get(set) methods
-                          for AnyData class
-   shiyer      09/17/02 - Refs performance improvement
-   shiyer      08/14/02 - 10iR1, OCCI Globalization support
-   aahluwal    06/04/02 - bug 2360115
-   vvinay      12/24/01 - declarations for setNull() and isClear() in RefImpl
-   rvallam     11/17/01 - implemented transactional consistency of refs
-   gayyappa    10/01/01 - reserve memory for vectors in set/getVector 
-   rkasamse    07/31/01 - add PObject::new(size_t, void*)
-   gayyappa    07/17/01 - use C style comment in end of #ifdef WIN32COMMON.
-   gayyappa    06/20/01 - fix linux porting bug 1801312.
-   rvallam     06/14/01 - replace call to get(set)VectorOfRefs in 
-                          get(set)Vector for Ref<T> with code in 
-                          get(set)VectorOfRefs
-   rvallam     11/06/01 - renamed internal methods in get/setVector to 
-                          get(set)VectorOfPObjects/get(set)VectorOfOCIRefs
-                          as part of NT porting fix
-                          added destructor to AnyData
-   rratnam     06/07/01 - fixed bug 1816387.
-   rvallam     06/07/01 - fixed bug 1811749 :replaced .data() to .c_str()
-                          for string to char* conversion.
-   rvallam     04/30/01 - modified const methods in Ref (->, *, ptr)
-   rvallam     04/12/01 - passed dummy argument OCCIPOBJECT in getVector
-                          of AnyData for PObject *
-   rvallam     04/09/01 - fixed bug 1721365- call RefAny default constructor
-                          for a NULL Ref in operator RefAny
-   gayyappa    03/29/01 - remove methods for get/set int/float/double/unsigned 
-                          int , wasLastAttrNull, setAttrNull , geSQLTypeName
-                          from AnyData 
-                          as OTT does not use them.
-   gayyappa    03/15/01 - add OCCItype parameter to getVector for OCCIRef.
-   rratnam     03/15/01 - fixed set and getRef / get and setVector for NULL 
-                          Refs, fixed NT compilation errors
-   rratnam     03/13/01 - changed AnyData constructor to take a freeImg flag,
-   rkasamse    03/15/01 - pass OCCI_SQLT_REF to getVector
-   chliang     03/05/01 - disable olint.
-   rvallam     03/01/01 - changed getSessionPtr() to getConnection()
-                          added const methods for dereferencing in Ref
-   gayyappa    02/23/01 - correct template code for setVector
-   gayyappa    12/13/00 - remove allocator from list member for PObject.
-                          bug#1529973
-                          nullify object pointer in clear method of Ref
-   rvallam     11/08/00 - make RefAny constructor public
-   gayyappa    08/21/00 - replace objPtr by objptr.
-                          move templated get/set vector code of anydata 
-                          to header.
-   rkasamse    08/07/00 - make getVector friend of RefAny
-   rkasamse    07/11/00 - take void* instead of AnyDataCtx*
-   rkasamse    07/26/00 - make ResultSetImp friend of RefAny
-   rratnam     06/19/00 - added getConnection in PObject 
-   rvallam     06/13/00 - added Ref<T> and occiRefImpl code
-   rvallam     06/05/00 - to add the Ref<T> code
-   kmohan      06/02/00 -
-   kmohan      05/31/00 - Datamember Connection * changed to ConnectionImpl * 
-                          in class RefAny
-   kmohan      04/11/00 - Ref, RefAny, AnyData class definitions
-                          added
-   rkasamse    04/03/00 - header (interface) files for OCCI Objects clases
-   rkasamse    04/03/00 - Creation
-
-*/
-
-#ifndef _olint   /* disable olint check */
-
-#ifndef OCCIOBJECTS_ORACLE
-# define OCCIOBJECTS_ORACLE
-
-#ifndef OCCICOMMON_ORACLE
-#include <occiCommon.h>
-#endif
-
-namespace oracle {
-namespace occi {
-struct AnyDataCtx {
-   ConnectionImpl *occiSession;
-   OCIAnyData *anyData;
-   dvoid *objHeader;
-   ub4 errNum;
-};
-typedef struct AnyDataCtx AnyDataCtx;
-
-class PObject
-{
-  public:
-        enum LockOption {OCCI_LOCK_WAIT, OCCI_LOCK_NOWAIT};
-        enum UnpinOption {OCCI_PINCOUNT_DECR, OCCI_PINCOUNT_RESET};
-        static void destroy(void *);
-        static void refresh(void *); 
-        PObject();
-        PObject(const void *ctx);
-        PObject(const PObject& obj);
-        virtual ~PObject();
-        PObject& operator=(const PObject& obj);
-        void *operator new(size_t size);
-        void *operator new(size_t size, const Connection *x,
-                           const OCCI_STD_NAMESPACE::string& tablename, 
-                           const char *typeName);
-        void *operator new(size_t size, const Connection *sess,
-               const OCCI_STD_NAMESPACE::string& tablename,
-               const OCCI_STD_NAMESPACE::string& typName ,
-               const OCCI_STD_NAMESPACE::string& schTabName="",
-               const OCCI_STD_NAMESPACE::string& schTypName = "");
-        void *operator new(size_t size, const Connection *sess,
-               const UString& tablename, const UString &typName,
-               const UString& schTabName, const UString& schTypName);
-        void *operator new(size_t size, void *adctx);
-        void operator delete(void *obj, size_t size);
-        RefAny getRef() const;
-        bool isLocked() const;
-        void unpin(UnpinOption mode=OCCI_PINCOUNT_DECR);
-        void pin();
-        void lock(PObject::LockOption lock_option);
-        void unmark();
-        void flush();
-        void markDelete();
-        void markModified();
-        bool isNull() const;
-        void setNull();
-        const Connection *getConnection() const;
-        virtual OCCI_STD_NAMESPACE::string getSQLTypeName() const = 0;
-        virtual void getSQLTypeName(Environment *env, void **schName,
-                     unsigned int &schNameLen, void **typeName,
-                     unsigned int &typeNameLen) const = 0;
-        void getSQLTypeName(Environment *env, void *(*rSQL)(void *),
-                            void **schname, unsigned int &schnamelen,
-                            void **typname, unsigned int &typnamelen) const;
-        virtual void writeSQL(AnyData& stream) = 0;
-        virtual void readSQL(AnyData& stream) = 0;
-  private:
-       static void initialise( void * obj, const Connection * sess,
-              void *schTabName, unsigned int schTabLen,
-              void *tableName, unsigned int tabLen,
-              void *schTypName, unsigned int schTypLen,
-              void *typeName, unsigned int typLen);
-
-        ConnectionImpl  *occiSession_;
-        dvoid *objHeader_;
-        ub2 customNewed_;
-        enum {CUSTOM_NEWED = 0x5cde};
-        ub2 flags_;
-        enum {NULL_INFO = 0x0001, GARBAGE_COLLECTED = 0x0002,
-              REFRESH_OBJECT = 0x0004};
-        // for future use 
-        void *pobjectExt;
-        friend class RefImpl;
-};
-
-class AnyData
-{
-    public:
-    ~AnyData();
-    AnyData(void *any) ;
-    AnyData(const Connection *sessp);
-    AnyData(const Connection *sessp, OCIAnyData *any, bool freeImg = true) ; 
- 
-    AnyData(const AnyData &src);
-    AnyData& operator = (const AnyData &src);
-
-    OCIAnyData* getOCIAnyData() const;
-    const Connection* getConnection() const;
-
-
-    bool isNull() const ;
-    void setNull() ;
-    OCCI_STD_NAMESPACE::string getString() const ;
-    UString getUString() const ;
-    Blob getBlob() const ;
-    Clob getClob() const ;
-    Bfile getBfile() const ;
-    BFloat  getBFloat() const ;
-    BDouble getBDouble() const ;
-    Number getNumber() const ;
-    Bytes getBytes() const ;
-    Date getDate() const ;
-    Timestamp getTimestamp() const ;
-    IntervalYM getIntervalYM() const ;
-    IntervalDS getIntervalDS() const ;
-    PObject *getObject(void *(*rSQL)(void *)) const ;
-    RefAny getRef() const ;
-
-    void setString(const OCCI_STD_NAMESPACE::string &str)  ;
-    void setUString(const UString &str)  ;
-    void setBlob(const Blob &blob) ;
-    void setClob(const Clob &clob) ;
-    void setBfile(const Bfile &bfile) ;
-    void setBFloat(const BFloat &n) ;
-    void setBDouble(const BDouble &n) ;
-    void setNumber(const Number &n) ;
-    void setBytes(const Bytes &bytes) ;
-    void setDate(const Date &date) ;
-    void setTimestamp(const Timestamp &timestamp)  ;
-    void setIntervalYM(const IntervalYM &intervalym)  ;
-    void setIntervalDS(const IntervalDS &intervalds)  ;
-    void setObject(const PObject *objptr) ;
-    void setRef(const RefAny &ref) ;
-
-    void setFromString(const OCCI_STD_NAMESPACE::string &str)  ;
-    void setFromBfile(const Bfile &bfile) ;
-    void setFromBFloat(const BFloat &n) ;
-    void setFromBDouble(const BDouble &n) ;
-    void setFromNumber(const Number &n) ;
-    void setFromBytes(const Bytes &bytes) ;
-    void setFromDate(const Date &date) ;
-    void setFromTimestamp(const Timestamp &timestamp)  ;
-    void setFromIntervalYM(const IntervalYM &intervalym)  ;
-    void setFromIntervalDS(const IntervalDS &intervalds)  ;
-    void setFromObject(const PObject *objptr) ;
-    void setFromRef(const RefAny &ref,
-                    const OCCI_STD_NAMESPACE::string &typname,
-                    const OCCI_STD_NAMESPACE::string &schname) ;
-
-    OCCI_STD_NAMESPACE::string getAsString() const ;
-    Bfile getAsBfile() const ;
-    BFloat  getAsBFloat() const ;
-    BDouble getAsBDouble() const ;
-    Number getAsNumber() const ;
-    Bytes getAsBytes() const ;
-    Date getAsDate() const ;
-    Timestamp getAsTimestamp() const ;
-    IntervalYM getAsIntervalYM() const ;
-    IntervalDS getAsIntervalDS() const ;
-    PObject *getAsObject() const ;
-    RefAny getAsRef() const ;
-
-    TypeCode getType() const;
-    
-    private:
-
-                                 
-    // private data members
-    Ptr<AnyDataImpl> anyDataImplPtr;              
-   
-
-};
-
-template <class T>
-class Ref
-{
-  public:
-
-  Ref();
-  Ref(const T *obj) ;
-  Ref(const RefAny &refAny) ;
-  Ref(const Ref<T> &src) ;
-  Ref(const Connection *sessp, OCIRef *tref, bool copy=TRUE) 
-  ;
- ~Ref();
-  Ref<T>& operator=(const Ref<T> &src) 
-  ;
-  Ref<T>& operator=(const T *obj) ;
-  Ref<T>& operator=(const RefAny &src);
-  T * operator->() ;
-  T * ptr() ;
-  T & operator *() ;
-  const T * operator->() const;
-  const T * ptr()  const;
-  const T & operator *() const ;
-  void markDelete() ;
-  void unmarkDelete() ;
-  void setNull();
-  bool isNull() const;
-  void clear() ;
-  bool isClear() const;
-  void setPrefetch(const OCCI_STD_NAMESPACE::string &typeName, 
-                   unsigned int depth);
-  void setPrefetch(const OCCI_STD_NAMESPACE::string &schName,
-                   const OCCI_STD_NAMESPACE::string &typeName,
-                   unsigned int depth);
-  void setPrefetch(const UString &schName,
-                   const UString &typeName,
-                   unsigned int depth);
-  void setPrefetch(unsigned int depth) ;
-  void setLock(LockOptions );
-  operator RefAny() const;
-  OCIRef *getRef() const;
-  const Connection *getConnection() const;
-  bool operator == (const Ref<T> &ref) const;
-  bool operator != (const Ref<T> &ref) const;
-  bool operator == (const RefAny &refAnyR) const ;
-  bool operator != (const RefAny &refAnyR) const ;
-  OCIComplexObject *getCor() const;
-  void destroy();
-  void setPinnedObject(PObject *objPtr); 
- private:
-
-  RefImpl  *rimplPtr;
-};
-
-
-class RefImpl
-{
-  public:
-
-  RefImpl();
-  RefImpl(PObject *obj) ;
-  RefImpl(const RefAny &refAny) ;
-  RefImpl(const RefImpl &src) ;
-  RefImpl(const Connection *sessp, OCIRef *tref, 
-  bool copy=TRUE) ;
-  ~RefImpl();
-  bool isNull() const ;
-  void setNull() ;
-  void markDelete() ;
-  void unmarkDelete() ;
-  void clear() ;
-  bool isClear() const ;
-  void setPrefetch(const OCCI_STD_NAMESPACE::string &typeName, 
-                   unsigned int depth) ;
-  void setPrefetch(const OCCI_STD_NAMESPACE::string &schName,
-                   const OCCI_STD_NAMESPACE::string &typeName,
-                   unsigned int depth);
-  void setPrefetch(const UString &schName,
-                   const UString &typeName,
-                   unsigned int depth);
-  void setPrefetch(unsigned int depth) ;
-  void setLock(LockOptions lckOption) ;
-  PObject *pin() ;
-  void unpin(PObject *obj) ;
-  void setRefFromObjPtr(const PObject *obj) ;
-  OCIRef* getRef() const;
-  void setRefImpl(RefImpl *rptr);
-  const Connection * getConnection() const;
-  bool operator == (const RefImpl &refI) const ;
-  bool operator == (const RefAny &refAnyR) const ;
-  void assignObj(PObject *newObjPtr) ;
-  void assignRefAny(const RefAny &src) ;
-  // added following methods
-  bool isEqual(PObject *obj);
-  void operator = ( const RefImpl &src);
-  void destroy();
-  OCIComplexObject *getCor() const;
-  void setPinnedObject( PObject *objPtr);
- private:
-
-  OCIRef *ref;
-  const ConnectionImpl *sessp;
-  OCIComplexObject *corhp;
-  OCCI_STD_NAMESPACE::list<void *> descriptorList;
-  LockOptions lockOption;
-  // added data member for object header
-  dvoid *objHeader;
-  //common implementation function for setPrefetch
-  void do_setPrefetch(void *schName, unsigned int schNameLen,
-                      void *typeName, unsigned int typeNameLen,
-                      unsigned int depth);
-};
-
-
-class RefAny
-{
-  public:
-
-  RefAny();
-  RefAny (const Connection *sessptr, const OCIRef *ref);
-  RefAny (const Connection *sessptr, const OCIRef *ref, bool isowner);
-  ~RefAny() ;
-  RefAny(const RefAny& src) ;
-  RefAny& operator=(const RefAny& src) ;
-  void markDelete() ;
-  void unmarkDelete() ;
-  void clear() ;
-  bool isNull() const;
-  OCIRef * getRef() const;
-  const Connection * getConnection() const;
-  bool operator == (const RefAny &refAnyR) const;
-  bool operator != (const RefAny &refAnyR) const;
-  bool isOwner() const;
-
-  private:
-
-  OCIRef *ref;
-  const ConnectionImpl *sessp;
-  // for future use
-  void *refanyExt;
-  bool owner;
-
-  friend RefAny MetaData::getRef(MetaData::AttrId) const;
-  friend RefAny PObject::getRef() const;
-  friend class AnyDataImpl;
-  friend class ResultSetImpl;
-  friend class StatementImpl;
-  friend void getVector(const ResultSet  *rs,
-                        unsigned int colIndex,
-                        OCCI_STD_NAMESPACE::vector<RefAny> &vect) ;
-  friend void getVector(const Statement  *stmt,
-                        unsigned int colIndex,
-                        OCCI_STD_NAMESPACE::vector<RefAny> &vect) ;
-};
-
-template <class T>
-Ref<T>::Ref()
-{
-   rimplPtr = new RefImpl();
-}
-
-template <class T>
-Ref<T>::Ref(const T *obj)
-{
-   rimplPtr = new RefImpl((PObject *)obj);
-}
-
-template <class T>
-Ref<T>::Ref(const RefAny &refAny)
-
-{
-  rimplPtr = new RefImpl(refAny);
-}
-
-template <class T>
-Ref<T>::Ref(const Ref<T>& src)
-
-{
-    rimplPtr = new RefImpl(*(src.rimplPtr));
-}
-
-template <class T>
-Ref<T>::Ref(const Connection *sessp, OCIRef *tref, bool copy)
-
-{
-   rimplPtr = new RefImpl(sessp, tref, copy);
-}
-
-template <class T>
-Ref<T>::~Ref()
-{
-  delete rimplPtr;
-}
-
-
-template <class T>
-Ref<T>& Ref<T>::operator=(const Ref<T> &src)
-{
-   if (&src == this)
-     return *this;
-   *rimplPtr = *(src.rimplPtr);
-   return *this;
-}
-
-template <class T>
-Ref<T>& Ref<T>::operator=(const T *obj)
-{
-  if (rimplPtr->isEqual((PObject *)obj))
-    return *this;
-  rimplPtr->assignObj((PObject *)obj);
-  return *this;
-}
-
-template <class T>
-Ref<T>& Ref<T>::operator=(const RefAny &src)
-{
-  rimplPtr->assignRefAny(src);
-  return *this;
-}
-
-template <class T>
-T* Ref<T>::operator->()
-{
-  return ((T *)rimplPtr->pin());
-}
-
-template <class T>
-T* Ref<T>::ptr()
-{
-  return ((T *)rimplPtr->pin());
-}
-
-template <class T>
-T& Ref<T>::operator * ()
-{
-  return ((T &)(*(rimplPtr->pin())));
-}
-
-template <class T>
-const T* Ref<T>::operator->() const
-{
-  return ((const T *)rimplPtr->pin());
-}
-
-template <class T>
-const T* Ref<T>::ptr() const
-{
-  return ((const T *)rimplPtr->pin());
-}
-
-template <class T>
-const T& Ref<T>::operator * () const
-{
-  return ((const T &)(*(rimplPtr->pin())));
-}
-
-template <class T>
-void Ref<T>::markDelete ()
-{
-   rimplPtr->markDelete();
-}
-
-template <class T>
-void Ref<T>::unmarkDelete ()
-{
-   rimplPtr->unmarkDelete();
-}
-
-template <class T>
-void Ref<T>::setNull()
-{
-   rimplPtr->setNull();
-}
-
-template <class T>
-bool Ref<T>::isNull() const
-{
-  return rimplPtr->isNull();
-}
-
-template <class T>
-void Ref<T>::clear ()
-{
-   rimplPtr->clear();
-}
-
-template <class T>
-bool Ref<T>::isClear() const
-{
-   return rimplPtr->isClear();
-}
-
-template <class T>
-void Ref<T>::setPrefetch (const OCCI_STD_NAMESPACE::string &typeName,
-unsigned int depth)
-
-{
-  rimplPtr->setPrefetch(typeName,depth);
-}
-
-template <class T>
-void Ref<T>::setPrefetch (const OCCI_STD_NAMESPACE::string &schemaName,
-const OCCI_STD_NAMESPACE::string &typeName,
-unsigned int depth)
-
-{
-  rimplPtr->setPrefetch(schemaName,typeName,depth);
-}
-
-template <class T>
-void Ref<T>::setPrefetch (const UString &schemaName,
-const UString &typeName,
-unsigned int depth)
-
-{
-  rimplPtr->setPrefetch(schemaName,typeName,depth);
-}
-
-template <class T>
-void Ref<T>::setPrefetch (unsigned int depth)
-
-{
-  rimplPtr->setPrefetch(depth);
-}
-
-template <class T>
-void Ref<T>::setLock (LockOptions lckOption)
-{
-  rimplPtr->setLock(lckOption);
-}
-
-template <class T>
-OCIRef* Ref<T>::getRef() const
-{
-  return (rimplPtr->getRef());
-}
-
-template<class T>
-const Connection* Ref<T>::getConnection () const
-{
-  return (rimplPtr->getConnection());
-}
-
-template <class T>
-Ref<T>::operator RefAny () const
-{
-  if (isNull())
-    return  RefAny();
-  return (RefAny(rimplPtr->getConnection(), rimplPtr->getRef()));
-}
-
-template <class T>
-bool Ref<T>::operator ==(const Ref<T> &ref) const
-
-{
-  return ( (*rimplPtr) == (*(ref.rimplPtr)) );
-}
-
-template <class T>
-bool Ref<T>::operator !=(const Ref<T> &ref) const
-
-{
-  return ( !((*rimplPtr) == (*(ref.rimplPtr))) );
-}
-
-template <class T>
-bool Ref<T>::operator == (const RefAny & refAnyR) const
-
-{
-  return ( (*rimplPtr) == refAnyR );
-}
-
-template <class T>
-bool Ref<T>::operator != (const RefAny & refAnyR) const
-
-{
-  return ( !((*rimplPtr) == refAnyR ));
-}
-
-template <class T>
-void Ref<T>::destroy()
-{
-   rimplPtr->destroy();
-}
-
-template <class T>
-OCIComplexObject * Ref<T>::getCor() const
-{
-  return (rimplPtr->getCor());
-}
-
-template < class T>
-void Ref<T>::setPinnedObject( PObject *objPtr)
-{
-   rimplPtr->setPinnedObject(objPtr);
-}
-
-/*---------------------------------------------------------------------------
-                PROTOTYPES USED BY FUNCTION TEMPLATES
- ---------------------------------------------------------------------------*/
-  void getVectorOfOCIRefs( const AnyData &any, 
-  OCCI_STD_NAMESPACE::vector<void *> &vect);
-  void getVectorOfPObjects( const AnyData &any,
-  OCCI_STD_NAMESPACE::vector< PObject* > &vect,
-  void *(*rSQL)(void *))  ;
-  void setVectorOfOCIRefs( AnyData &any, 
-  const OCCI_STD_NAMESPACE::vector<void *> &vect,
-  const OCCI_STD_NAMESPACE::vector< OCIInd> &vec_ind) ;
-  void setVectorOfPObjects( AnyData &any, 
-  const OCCI_STD_NAMESPACE::vector< PObject* > &vect) ;
-
-/*---------------------------------------------------------------------------
-                           EXPORT FUNCTIONS
-  ---------------------------------------------------------------------------*/
-
-/*------------------- getVector for POBject----------------------------*/
-/*
-   NAME
-      getVector - overloaded function. Retrieves the attribute in the
-   current position as a vector of PObject
-
-   PARAMETERS
-      any - AnyData
-      vect- reference to vector of PObject (OUT parameter).
-
-   DESCRIPTION
-   Retrieves the attribute in the current position as a vector
-   of PObject
-   The attribute at the current position should be a collection
-   type (varray or nested table). The SQL type of the elements in
-   the collection should be compatible with PObject
-
-   RETURNS
-     nothing
-
-   NOTES
-     compatible SQL types : user defined types (SQLT_NTY) etc.
-*/
-
-#ifdef WIN32COMMON
-// and other platforms that do not support
-// partial function template specialization
- template <class T>
- void getVector(const AnyData &any, OCCI_STD_NAMESPACE::vector<T> &vect,
- void *(*rSQL)(void *))
- {
-   OCCI_STD_NAMESPACE::vector< PObject *> vec_pobj;
-   getVectorOfPObjects( any, vec_pobj, rSQL);
-
-   vect.clear();
-   unsigned int size= vec_pobj.size();
-   vect.reserve( size );
-   for( unsigned int i=0; i< size; i++)
-      vect.push_back( (T)vec_pobj[i] );
- }
-#else
- template <class T>
- void getVector(const AnyData &any, OCCI_STD_NAMESPACE::vector<T*> &vect,
- void *(*rSQL)(void *)) 
- {
-   OCCI_STD_NAMESPACE::vector< PObject *> vec_pobj;
-   getVectorOfPObjects( any, vec_pobj, rSQL);
-
-   vect.clear();
-   unsigned int size= vec_pobj.size();
-   vect.reserve( size );
-   for( unsigned int i=0; i< size; i++)
-      vect.push_back( (T*)vec_pobj[i] );
- }
-#endif /* end of #ifdef WIN32COMMON */
-
- /*------------------- getVector for Ref<T>----------------------------*/
-/*
-   NAME
-      getVector - overloaded function. Retrieves the attribute in the
-   current position as a vector of PObject
-
-   PARAMETERS
-      any - AnyData
-      vect- reference to vector of PObject (OUT parameter).
-
-   DESCRIPTION
-   Retrieves the attribute in the current position as a vector
-   of PObject
-   The attribute at the current position should be a collection
-   type (varray or nested table). The SQL type of the elements in
-   the collection should be compatible with PObject
-
-   RETURNS
-     nothing
-
-   NOTES
-     compatible SQL types : user defined types (SQLT_NTY) etc.
-*/
-#ifndef WIN32COMMON
- template <class T>
- void getVector(const AnyData &any,OCCI_STD_NAMESPACE::vector< Ref<T> > &vect) 
- {
-   OCCI_STD_NAMESPACE::vector< void *> vec_ref;
-   getVectorOfOCIRefs( any, vec_ref);
-
-   vect.clear();
-   unsigned int size = vec_ref.size();
-   vect.reserve( size );
-   const Connection *sess = any.getConnection();
-
-   for (unsigned int i=0; i< size; i++)
-   {
-     if (vec_ref[i] == (OCIRef *)0)
-       vect.push_back(Ref<T>());     // pushing a default-constructed Ref
-     else
-       vect.push_back(Ref<T>(sess, (OCIRef *)vec_ref[i], FALSE));
-   }
- }
-#endif /* end of #ifndef WIN32COMMON  */
- 
-/*-----------------------setVector for PObject--------------------------*/
-/*
-   NAME
-     setVector - overloaded function. sets the attribute in the current
-   position of anydata with the vector elements.
-
-   PARAMETERS
-      none.
-
-   DESCRIPTION
-      sets the attribute in the current position in anydata with the
-   vector elements.
-  The attribute in the current position of anydata should be a
-  collection type. If the collection type is a varray, the input vector
-  size should be equal to the size of the varray. Also the SQL type of
-  the collection's elements should be compatible with PObject.
-
-   RETURNS
-     nothing.
-
-   NOTES
-     compatible SQL types : SQLT_NTY  (user defined types).
-*/
-#ifdef WIN32COMMON
-// and other platforms that do not support
-// partial function template specialization
-
- template <class T>
- void setVector(AnyData &any, const OCCI_STD_NAMESPACE::vector<T> &vect) 
- {
-   OCCI_STD_NAMESPACE::vector< PObject *> vec_pobj;
-   unsigned int size= vect.size();
-   vec_pobj.reserve( size );
-   for( unsigned int i=0; i< size; i++)
-      vec_pobj.push_back( vect[i] );
-   setVectorOfPObjects( any, vec_pobj);
-
- }
- 
-#else
-
- template <class T>
- void setVector(AnyData &any, const OCCI_STD_NAMESPACE::vector<T*> &vect)
- {
-   OCCI_STD_NAMESPACE::vector< PObject *> vec_pobj;
-   unsigned int size= vect.size();
-   vec_pobj.reserve( size );
-   for( unsigned int i=0; i< size; i++)
-      vec_pobj.push_back( vect[i] );
-   setVectorOfPObjects( any, vec_pobj);
-
- }
-#endif /* end of #ifdef WIN32COMMON */
-
-/*-----------------------setVector for Ref<T>--------------------------*/
-/*
-   NAME
-     setVector - overloaded function. sets the attribute in the current
-   position of anydata with the vector elements.
-
-   PARAMETERS
-      none.
-
-   DESCRIPTION
-      sets the attribute in the current position in anydata with the
-   vector elements.
-  The attribute in the current position of anydata should be a
-  collection type. If the collection type is a varray, the input vector
-  size should be equal to the size of the varray. Also the SQL type of
-  the collection's elements should be compatible with PObject.
-
-   RETURNS
-     nothing.
-
-   NOTES
-     compatible SQL types : SQLT_NTY  (user defined types).
-*/
-#ifndef WIN32COMMON
- template <class T>
- void setVector(AnyData &any, const OCCI_STD_NAMESPACE::vector< Ref<T> > &vect)
- {
-   OCCI_STD_NAMESPACE::vector< void *> vec_ref;
-   OCCI_STD_NAMESPACE::vector<OCIInd> vec_ind;
-
-   unsigned int size= vect.size();
-   vec_ref.reserve( size );
-   vec_ind.reserve( size );
-   for( unsigned int i=0; i< size; i++)
-   {
-      vec_ref.push_back( vect[i].getRef() );
-      vec_ind.push_back(vect[i].isNull() ? OCI_IND_NULL : OCI_IND_NOTNULL);
-   }
-   setVectorOfOCIRefs( any, vec_ref, vec_ind);
-
- }
-#endif  /* end of #ifndef WIN32COMMON */
- 
-// Platform independent get/setVectorOfRefs method added 
-// get(set)Vector of Ref<T> and get(set)VectorOfRefs are identical
-// in functionality.
-
- /*------------------- getVectorOfRefs for Ref<T>----------------------------*/
-/*
-   NAME
-      getVectorOfRefs - overloaded function. Retrieves the attribute in the
-   current position as a vector of PObject
-
-   PARAMETERS
-      any - AnyData
-      vect- reference to vector of PObject (OUT parameter).
-
-   DESCRIPTION
-   Retrieves the attribute in the current position as a vector
-   of PObject
-   The attribute at the current position should be a collection
-   type (varray or nested table). The SQL type of the elements in
-   the collection should be compatible with PObject
-
-   RETURNS
-     nothing
-
-   NOTES
-     compatible SQL types : user defined types (SQLT_NTY) etc.
-*/
-
- template <class T>
- void getVectorOfRefs(const AnyData &any,
-                      OCCI_STD_NAMESPACE::vector< Ref<T> > &vect)
- {
-   OCCI_STD_NAMESPACE::vector< void *> vec_ref;
-   getVectorOfOCIRefs( any, vec_ref);
-
-   vect.clear();
-   unsigned int size = vec_ref.size();
-   vect.reserve( size );
-   const Connection *sess = any.getConnection();
-
-   for (unsigned int i=0; i< size; i++)
-   {
-     if (vec_ref[i] == (OCIRef *)0)
-       vect.push_back(Ref<T>());     // pushing a default-constructed Ref
-     else
-       vect.push_back(Ref<T>(sess, (OCIRef *)vec_ref[i], FALSE));
-   }
- }
-
-/*-----------------------setVectorOfRefs for Ref<T>--------------------------*/
-/*
-   NAME
-     setVectorOfRefs - overloaded function. sets the attribute in the current
-   position of anydata with the vector elements.
-
-   PARAMETERS
-      none.
-
-   DESCRIPTION
-      sets the attribute in the current position in anydata with the
-   vector elements.
-  The attribute in the current position of anydata should be a
-  collection type. If the collection type is a varray, the input vector
-  size should be equal to the size of the varray. Also the SQL type of
-  the collection's elements should be compatible with PObject.
-
-   RETURNS
-     nothing.
-
-   NOTES
-     compatible SQL types : SQLT_NTY  (user defined types).
-*/
-
- template <class T>
- void setVectorOfRefs(AnyData &any, 
-                      const OCCI_STD_NAMESPACE::vector< Ref<T> > &vect)
-
- {
-   OCCI_STD_NAMESPACE::vector< void *> vec_ref;
-   OCCI_STD_NAMESPACE::vector<OCIInd> vec_ind;
-
-   unsigned int size= vect.size();
-   vec_ref.reserve( size );
-   vec_ind.reserve( size );
-   for( unsigned int i=0; i< size; i++)
-   {
-      vec_ref.push_back( vect[i].getRef() );
-      vec_ind.push_back(vect[i].isNull() ? OCI_IND_NULL : OCI_IND_NOTNULL);
-   }
-   setVectorOfOCIRefs( any, vec_ref, vec_ind);
-
- }
-
-
-/*---------------------------------------------------------------------------
-                          INTERNAL FUNCTIONS
-  ---------------------------------------------------------------------------*/
-
-
-} /* end of namespace occi */
-} /* end of namespace oracle */
-#endif                                              /* OCCIOBJECTS_ORACLE */
-
-#endif                                              /* _olint */
diff --git a/src/terralib/drivers/OracleSpatial/OCI/include/oci.h b/src/terralib/drivers/OracleSpatial/OCI/include/oci.h
deleted file mode 100644
index a5d8b01..0000000
--- a/src/terralib/drivers/OracleSpatial/OCI/include/oci.h
+++ /dev/null
@@ -1,2366 +0,0 @@
-/*
- * $Header: /home/terralib/src/terralib/drivers/OracleSpatial/OCI/include/oci.h,v 1.3 2005/05/06 16:48:55 karine Exp $
- */
-
-/* Copyright (c) 1995, 2003, Oracle Corporation.  All rights reserved.  */
- 
-/* 
-   NAME 
-     oci.h - V8 Oracle Call Interface public definitions
-
-   DESCRIPTION 
-     This file defines all the constants and structures required by a V8
-     OCI programmer.
-
-   RELATED DOCUMENTS 
-     V8 OCI Functional Specification 
-     Oracle Call Interface Programmer's Guide Vol 1 and 2
- 
-   INSPECTION STATUS 
-     Inspection date: 
-     Inspection status: 
-     Estimated increasing cost defects per page: 
-     Rule sets: 
- 
-   ACCEPTANCE REVIEW STATUS 
-     Review date: 
-     Review status: 
-     Reviewers: 
- 
-   PUBLIC FUNCTION(S) 
-     None
-
-   PRIVATE FUNCTION(S) 
-     None
- 
-   EXAMPLES 
- 
-   NOTES 
-
-
-   MODIFIED   (MM/DD/YY)
-   chliang     11/26/03 - add OCI_ATTR_RESERVED_19 
-   preilly     10/23/03 - Make OCI_ATTR_DIRPATH_METADATA_BUF private 
-   chliang     08/07/03 - add OCI_ATTR_SKIP_BUFFER
-   srseshad    03/12/03 - convert public oci api to ansi
-   weiwang     05/14/03 - remove iot creation for rule sets
-   rkoti       04/15/03 - [2746515] add fntcodes for Unlimited size LOB 6003
-   tcruanes    05/13/03 - add slave SQL OCI execution mode
-   rkoti       02/21/03 - [2761455] add OCI_FNCODE_AQENQARRAY,
-                          OCI_FNCODE_AQDEQARRAY and update OCI_FNCODE_MAXFCN
-   tkeefe      01/29/03 - bug-2773794: Add new interface for setting Kerb attrs
-   aahluwal    02/06/03 - add OCI_ATTR_TRANSFORMATION_NO
-   weiwang     12/05/02 - add OCI_ATTR_USER_PROPERTY
-   ataracha    01/03/03 - include ocixmldb.h
-   preilly     12/05/02 - Add wait attribute for locking when using dir path
-   tkeefe      01/03/03 - bug-2623771: Added OCI_ATTR_KERBEROS_KEY
-   lchidamb    12/13/02 - end-to-end tracing attributes
-   msakayed    10/28/02 - Bug #2643907: add OCI_ATTR_DIRPATH_SKIPINDEX_METHOD
-   rphillip    11/13/02 - Add OCIP_ATTR_DIRPATH_INDEX
-   sagrawal    10/13/02 - liniting
-   sagrawal    10/03/02 - PL/SQL Compiler warnings
-   jstenois    11/07/02 - remove ocixad.h
-   chliang     10/21/02 - add OCI_ATTR_RESERVED_16,17
-   hsbedi      10/30/02 - grabtrans 'jstenois_fix_xt_convert'
-   aahluwal    10/12/02 - add OCI_ATTR_AQ_NUM_E_ERRORS/OCI_ATTR_AQ_ERROR_INDEX
-   bdagevil    10/21/02 - add SQL analyze internal exec mode
-   csteinba    10/11/02 - add OCI_ATTR_RESERVED_16
-   chliang     10/12/02 - add bind row callback attributes
-   preilly     10/25/02 - Add new reserved parameters
-   tkeefe      10/31/02 - bug-2623771: Added OCI_ATTR_AUDIT_SESSION_ID
-   csteinba    10/04/02 - Add OCI_ATTR_RESERVED_15
-   mhho        10/11/02 - add new credential constant
-   thoang      09/25/02 - Add OCI_XMLTYPE_CREATE_CLOB
-   skaluska    10/07/02 - describe rules objects
-   csteinba    09/16/02 - Remove OCI_CACHE
-   gtarora     10/03/02 - OCI_ATTR_COL_SUBS => OCI_ATTR_OBJ_SUBS
-   msakayed    09/09/02 - Bug #2482469: add OCI_ATTR_DIRPATH_RESERVED_[3-6]
-   aahluwal    08/30/02 - adding dequeue across txn group
-   srseshad    04/24/02 - Add attribute OCI_ATTR_SPOOL_STMTCACHESIZE.
-   ebatbout    07/22/02 - Remove OCI_ATTR_RESERVED_11.
-   abande      01/17/02 - Bug 1788921; Add external attribute.
-   aahluwal    06/04/02 - bug 2360115
-   pbagal      05/24/02 - Incorporate review comments
-   pbagal      05/22/02 - Introduce instance type attribute.
-   whe         07/01/02 - add OCI_BIND_DEFINE_SOFT flags
-   gtarora     07/01/02 - Add OCI_ATTR_COL_SUBS
-   tkeefe      05/30/02 - Add support for new proxy authentication credentials
-   dgprice     12/18/01 - bug 2102779 add reserved force describe
-   schandir    11/19/01 - add/modify modes.
-   schandir    11/15/01 - add OCI_SPC_STMTCACHE.
-   schandir    12/06/01 - change mode value of OCI_SPOOL.
-   msakayed    11/02/01 - Bug #2094292: add OCI_ATTR_DIRPATH_INPUT
-   dsaha       11/09/01 - add OCI_DTYPE_RESERVED1
-   skabraha    11/05/01 - new method flag
-   skabraha    10/25/01 - another flag for XML
-   skabraha    10/11/01 - describe flags for subtypes
-   nbhatt      09/18/01 - new reserved AQ flags
-   celsbern    10/19/01 - merge LOG to MAIN
-   ksurlake    10/12/01 - add OCI_ATTR_RESERVED_13
-   ksurlake    08/13/01 - add OCI_ATTR_RESERVED_12
-   schandir    09/24/01 - Adding stmt caching
-   abande      09/04/01 - Adding session pooling
-   sagrawal    10/23/01 - add new bit for OCIPHandleFree
-   preilly     10/25/01 - Add support for specifying metadata on DirPathCtx
-   skabraha    09/24/01 - describe flags for XML type
-   schandir    09/24/01 - Adding stmt caching
-   abande      09/04/01 - Adding session pooling
-   stakeda     09/17/01 - add OCI_NLS_CHARSET_ID
-   whe         09/19/01 - add OCIXMLType create options
-   rpingte     09/11/01 - add OCI_MUTEX_ENV_ONLY and OCI_NO_MUTEX_STMT
-   cmlim       08/28/01 - mod datecache attrs to use same naming as dpapi attrs
-   wzhang      08/24/01 - Add new keywords for OCINlsNameMap.
-   rphillip    05/02/01 - Add date cache attributes
-   rphillip    08/22/01 - Add new stream version
-   ebatbout    04/13/01 - add definition, OCI_ATTR_RESERVED_11
-   chliang     04/12/01 - add shortnames for newer oci funcation
-   wzhang      04/11/01 - Add new OCI NLS constants.
-   cmlim       04/13/01 - remove attrs not used by dpapi (151 & 152 avail)
-   rkambo      03/23/01 - bugfix 1421793
-   cmlim       04/02/01 - remove OCI_ATTR_DIRPATH_{NESTED_TBL, SUBST_OBJ_TBL}
-                        - note: attribute #s 186 & 205 available
-   whe         03/28/01 - add OCI_AFC_PAD_ON/OFF mode
-   preilly     03/05/01 - Add stream versioning support to DirPath context
-   schandir    12/18/00 - remove attr CONN_INCR_DELAY.
-   schandir    12/12/00 - change mode from OCI_POOL to OCI_CPOOL.
-   cbarclay    01/12/01 - add atribute for OCIP_ATTR_TMZ
-   whe         01/07/01 - add attributes related to UTF16 env mode
-   slari       12/29/00 - add blank line
-   slari       12/28/00 - OCI_ATTR_RESERVED_10
-   whe         12/19/00 - add OCI_ENVCR_RESERVED3
-   rpang       11/29/00 - Added OCI_ATTR_ORA_DEBUG_JDWP attribute
-   cmlim       11/28/00 - support substitutable object tables in dpapi
-   akatti      10/09/00 - [198379]:add OCIRowidToChar
-   sgollapu    10/11/00 - Add OCI_PREP_RESERVED_1
-   sgollapu    08/27/00 - add attribute to get erroneous column
-   sgollapu    07/29/00 - Add snapshot attributes
-   kmohan      09/18/00 - add OCI_FNCODE_LOGON2
-   abrumm      10/08/00 - include ocixad.h
-   mbastawa    10/04/00 - add OCI_ATTR_ROWS_FETCHED
-   nbhatt      08/24/00 - add transformation attribute
-   dmwong      08/22/00 - OCI_ATTR_CID_VALUE -> OCI_ATTR_CLIENT_IDENTIFIER.
-   cmlim       08/30/00 - add OCI_ATTR_DIRPATH_SID
-   dsaha       08/18/00 - add OCI_ATTR_RESERVED_5
-   amangal     08/17/00 - Merge into 8.2 : 1194361
-   slari       08/03/00 - add OCI_ATTR_HANDLE_POSITION
-   dsaha       07/20/00 - 2rt exec
-   sgollapu    07/04/00 - Add virtual session flag
-   cmlim       07/07/00 - add OCI_ATTR_DIRPATH_OID, OCI_ATTR_DIRPATH_NESTED_TBL
-   etucker     07/28/00 - add OCIIntervalFromTZ
-   rwessman    06/26/00 - N-tier: added new credential attributes
-   whe         07/27/00 - add OCI_UTF16 mode
-   vjayaram    07/18/00 - add connection pooling changes
-   etucker     07/12/00 - add dls apis
-   cmlim       07/07/00 - add OCI_ATTR_DIRPATH_OID, OCI_ATTR_DIRPATH_NESTED_TBL
-   sgollapu    07/04/00 - Add virtual session flag
-   najain      05/01/00 - AQ Signature support
-   sgollapu    06/14/00 - Add reserved OCI mode
-   rkambo      06/08/00 - notification presentation support
-   sagrawal    06/04/00 - ref cursor to c
-   ksurlake    06/07/00 - define OCI_POOL
-   mbastawa    06/05/00 - added scrollable cursor attributes
-   weiwang     03/31/00 - add LDAP support
-   whe         05/30/00 - add OCI_ATTR_MAXCHAR_SIZE
-   whe         05/23/00 - validate OCI_NO_CACHE mode
-   dsaha       02/02/00 - Add no-cache attr in statement handle
-   whe         05/23/00 - add OCIP_ICACHE
-   allee       05/17/00 - describe support for JAVA implmented TYPE
-   preilly     05/30/00 - Continue adding support for objects in direct path lo
-   cmlim       05/16/00 - 8.2 dpapi support of ADTs
-   rxgovind    05/04/00 - OCIAnyDataSet changes
-   rkasamse    05/25/00 - add OCIAnyDataCtx
-   rmurthy     04/26/00 - describe support for inheritance
-   ksurlake    04/18/00 - Add credential type
-   whe         05/24/00 - add OCI_ATTR_CHAR_ attrs
-   rkambo      04/19/00 - subscription enhancement
-   rmurthy     04/26/00 - describe support for inheritance
-   delson      03/28/00 - add OCI_ATTR_RESERVED_2
-   abrumm      03/31/00 - external table support
-   rkasamse    03/13/00 - add declarations for OCIAnyData
-   najain      02/24/00 - support for dequeue as select
-   dsaha       03/10/00 - Add OCI_ALWAYS_BLOCKING
-   esoyleme    04/25/00 - separated transactions
-   sgollapu    12/23/99 - OCIServerAttach extensions
-   slari       08/23/99 - add OCI_DTYPE_UCB
-   slari       08/20/99 - add OCI_UCBTYPE_REPLACE
-   hsbedi      08/31/99 - Memory Stats .
-   sgollapu    08/02/99 - oci sql routing
-   slari       08/06/99 - rename values for OCI_SERVER_STATUS
-   slari       08/02/99 - add OCI_ATTR_SERVER_STATUS
-   tnbui       07/28/99 - Remove OCI_DTYPE_TIMESTAMP_ITZ                       
-   amangal     07/19/99 - Merge into 8.1.6 : bug 785797
-   tnbui       07/07/99 - Change ADJUSTMENT modes                              
-   dsaha       07/07/99 - OCI_SAHRED_EXT
-   dmwong      06/08/99 - add OCI_ATTR_APPCTX_*
-   vyanaman    06/23/99 -
-   vyanaman    06/21/99 - Add new OCI Datetime and Interval descriptors
-   esoyleme    06/29/99 - expose MTS performance enhancements                  
-   rshaikh     04/23/99 - add OCI_SQL_VERSION_*
-   tnbui       05/24/99 - Remove OCIAdjStr                                     
-   dsaha       05/21/99 - Add OCI_ADJUST_UNK
-   mluong      05/17/99 - fix merge
-   tnbui       04/05/99 - ADJUSTMENT values
-   abrumm      04/16/99 - dpapi: more attributes
-   dsaha       02/24/99 - Add OCI_SHOW_DML_WARNINGS
-   jiyang      12/07/98 - Add OCI_NLS_DUAL_CURRENCY
-   slari       12/07/98 - change OCI_NOMUTEX to OCI_NO_MUTEX
-   aroy        11/30/98 - change OCI_NOCALLBACK to OCI_NO_UCB
-   aroy        11/13/98 - add env modes to process modes
-   slari       09/08/98 - add OCI_FNCODE_SVC2HST and _SVCRH
-   aroy        09/04/98 - Add OCI_ATTR_MIGSESSION
-   skray       08/14/98 - server groups for session switching
-   mluong      08/11/98 - add back OCI_HTYPE_LAST.
-   aroy        05/25/98 - add process handle type                              
-   aroy        04/06/98 - add shared mode                                      
-   slari       07/13/98 -  merge forward to 8.1.4
-   slari       07/09/98 -  add OCI_BIND_RESERVED_2
-   slari       07/08/98 -  add OCI_EXACT_FETCH_RESERVED_1
-   dsaha       07/07/98 -  Add OCI_PARSE_ONLY
-   dsaha       06/29/98 -  Add OCI_PARSE_ONLY
-   slari       07/01/98 -  add OCI_BIND_RESERVED_2
-   sgollapu    06/25/98 -  Fix bug 683565
-   slari       06/17/98 -  remove OC_FETCH_RESERVED_2
-   slari       06/11/98 -  add OCI_FETCH_RESERVED_1 and 2
-   jhasenbe    05/27/98 -  Remove definitions for U-Calls (Unicode)
-   jiyang      05/18/98 - remove OCI_ATTR_CARTLANG
-   nbhatt      05/20/98 -  OCI_DEQ_REMOVE_NODATA
-   nbhatt      05/19/98 - correct AQ opcode
-   skmishra    05/06/98 - Add precision attribute to Attributes list
-   aroy        04/20/98 - merge forward 8.0.5 -> 8.1.3
-   schandra    05/01/98 - OCI sender id
-   sgollapu    02/19/98 - enhanced array DML
-   nbhatt      05/15/98 -  AQ listen call
-   sgollapu    04/27/98 - more attributes
-   skaluska    04/06/98 - Add OCI_PTYPE_SCHEMA, OCI_PTYPE_DATABASE
-   slari       04/28/98 - add OCI_ATTR_PDPRC
-   lchidamb    05/05/98 - change OCI_NAMESPACE_AQ to 1
-   nbhatt      04/27/98 - AQ Notification Descriptor
-   abrumm      06/24/98 - more direct path attributes
-   abrumm      05/27/98 - OCI direct path interface support
-   abrumm      05/08/98 - OCI direct path interface support
-   lchidamb    03/02/98 - client notification additions
-   kkarun      04/17/98 - Add more Interval functions
-   vyanaman    04/16/98 - Add get/set TZ
-   kkarun      04/14/98 - Add OCI Datetime shortnames
-   vyanaman    04/13/98 - Add OCI DateTime and Interval check error codes
-   kkarun      04/07/98 - Add OCI_DTYPE_DATETIME and OCI_DTYPE_INTERVAL
-   esoyleme    12/15/97 - support failover callback retry
-   esoyleme    04/22/98 - merge support for failover callback retry
-   mluong      04/16/98 - add OCI_FNCODE_LOBLOCATORASSIGN
-   rkasamse    04/17/98 - add short names for OCIPickler(Memory/Ctx) cart servi
-   slari       04/10/98 - add OCI_FNCODE_SVCCTXTOLDA
-   slari       04/09/98 - add OCI_FNCODE_RESET
-   slari       04/07/98 - add OCI_FNCODE_LOBFILEISOPEN
-   slari       04/06/98 - add OCI_FNCODE_LOBOPEN
-   slari       03/20/98 - change OCI_CBTYPE_xxx to OCI_UCBTYPE_xxx
-   slari       03/18/98 - add OCI_FNCODE_MAXFCN
-   slari       02/12/98 - add OCI_ENV_NO_USRCB
-   skabraha    04/09/98 - adding shortnames for OCIFile
-   rhwu        04/03/98 - Add short names for the OCIThread package
-   tanguyen    04/03/98 - add OCI_ATTR_xxxx for type inheritance
-   rkasamse    04/02/98 - add OCI_ATTR_UCI_REFRESH
-   nramakri    04/01/98 - Add short names for the OCIExtract package
-   ewaugh      03/31/98 - Add short names for the OCIFormat package.
-   jhasenbe    04/06/98 - Add definitions for U-Calls (Unicode)
-                          (OCI_TEXT, OCI_UTEXT, OCI_UTEXT4)
-   skmishra    03/03/98 - Add OCI_ATTR_PARSE_ERROR_OFFSET
-   rwessman    03/11/98 - Added OCI_CRED_PROXY for proxy authentication
-   abrumm      03/31/98 - OCI direct path interface support
-   nmallava    03/03/98 - add constants for temp lob apis
-   skotsovo    03/05/98 - resolve merge conflicts
-   skotsovo    02/24/98 - add OCI_DTYPE_LOC
-   skaluska    01/21/98 - Add OCI_ATTR_LTYPE
-   rkasamse    01/06/98 - add OCI_ATTR* for obj cache enhancements
-   dchatter    01/08/98 - more comments
-   skabraha    12/02/97 - moved oci1.h to the front of include files.
-   jiyang      12/18/97 - Add OCI_NLS_MAX_BUFSZ
-   rhwu        12/02/97 - move oci1.h up
-   ewaugh      12/15/97 - Add short names for the OCIFormat package.
-   rkasamse    12/02/97 - Add a constant for memory cartridge services -- OCI_M
-   nmallava    12/31/97 - open/close for internal lobs
-   khnguyen    11/27/97 - add OCI_ATTR_LFPRECISION, OCI_ATTR_FSPRECISION
-   rkasamse    11/03/97 - add types for pickler cartridge services
-   mluong      11/20/97 - changed ubig_ora to ub4 per skotsovo
-   ssamu       11/14/97 - add oci1.h
-   jiyang      11/13/97 - Add NLS service for cartridge
-   esoyleme    12/15/97 - support failover callback retry
-   jwijaya     10/21/97 - change OCILobOffset/Length from ubig_ora to ub4
-   cxcheng     07/28/97 - fix compile with SLSHORTNAME
-   schandra    06/25/97 - AQ OCI interface
-   sgollapu    07/25/97 - Add OCI_ATTR_DESC_PUBLIC
-   cxcheng     06/16/97 - add OCI_ATTR_TDO
-   skotsovo    06/05/97 - add fntcodes for lob buffering subsystem
-   esoyleme    05/13/97 - move failover callback prototype
-   skmishra    05/06/97 - stdc compiler fixes
-   skmishra    04/22/97 - Provide C++ compatibility
-   lchidamb    04/19/97 - add OCI_ATTR_SESSLANG
-   ramkrish    04/15/97 - Add OCI_LOB_BUFFER_(NO)FREE
-   sgollapu    04/18/97 - Add OCI_ATTR_TABLESPACE
-   skaluska    04/17/97 - Add OCI_ATTR_SUB_NAME
-   schandra    04/10/97 - Use long OCI names
-   aroy        03/27/97 - add OCI_DTYPE_FILE
-   sgollapu    03/26/97 - Add OCI_OTYPEs
-   skmishra    04/09/97 - Added constant OCI_ROWID_LEN
-   dchatter    03/21/97 - add attr OCI_ATTR_IN_V8_MODE
-   lchidamb    03/21/97 - add OCI_COMMIT_ON_SUCCESS execution mode
-   skmishra    03/20/97 - Added OCI_ATTR_LOBEMPTY
-   sgollapu    03/19/97 - Add OCI_ATTR_OVRLD_ID
-   aroy        03/17/97 - add postprocessing callback
-   sgollapu    03/15/97 - Add OCI_ATTR_PARAM
-   cxcheng     02/07/97 - change OCI_PTYPE codes for type method for consistenc
-   cxcheng     02/05/97 - add OCI_PTYPE_TYPE_RESULT
-   cxcheng     02/04/97 - rename OCI_PTYPE constants to be more consistent
-   cxcheng     02/03/97 - add OCI_ATTR, OCI_PTYPE contants for describe type
-   esoyleme    01/23/97 - merge neerja callback
-   sgollapu    12/30/96 - Remove OCI_DTYPE_SECURITY
-   asurpur     12/26/96 - CHanging OCI_NO_AUTH to OCI_AUTH
-   sgollapu    12/23/96 - Add more attrs to COL, ARG, and SEQ
-   sgollapu    12/12/96 - Add OCI_DESCRIBE_ONLY
-   slari       12/11/96 - change prototype of OCICallbackInBind
-   nbhatt      12/05/96 - "callback"
-   lchidamb    11/19/96 - handle subclassing
-   sgollapu    11/09/96 - OCI_PATTR_*
-   dchatter    11/04/96 - add attr OCI_ATTR_CHRCNT
-   mluong      11/01/96 - test
-   cxcheng     10/31/96 - add #defines for OCILobLength etc
-   dchatter    10/31/96 - add lob read write call back fp defs
-   dchatter    10/30/96 - more changes
-   rhari       10/30/96 - Include ociextp.h at the very end
-   lchidamb    10/22/96 - add fdo attribute for bind/server handle
-   dchatter    10/22/96 - change attr defn for prefetch parameters & lobs/file
-                          calls
-   slari       10/21/96 - add OCI_ENV_NO_MUTEX
-   rhari       10/25/96 - Include ociextp.h
-   rxgovind    10/25/96 - add OCI_LOBMAXSIZE, remove OCI_FILE_READWRITE
-   sgollapu    10/24/96 - Correct OCILogon and OCILogoff
-   sgollapu    10/24/96 - Correct to OCILogon and OCILogoff
-   sgollapu    10/21/96 - Add ocilon and ociloff
-   skaluska    10/31/96 - Add OCI_PTYPE values
-   sgollapu    10/17/96 - correct OCI_ATTR_SVCCTX to OCI_ATTR_SERVER
-   rwessman    10/16/96 - Added security functions and fixed olint errors.
-   sthakur     10/14/96 - add more COR attributes
-   cxcheng     10/14/96 - re-enable LOB functions
-   sgollapu    10/10/96 - Add ocibdp and ocibdn
-   slari       10/07/96 - add back OCIRowid
-   aroy        10/08/96 -  add typedef ocibfill for PRO*C
-   mluong      10/11/96 - replace OCI_ATTR_CHARSET* with OCI_ATTR_CHARSET_*
-   cxcheng     10/10/96 - temporarily take out #define for lob functions
-   sgollapu    10/02/96 - Rename OCI functions and datatypes
-   skotsovo    10/01/96 - move orl lob fnts to oci
-   aroy        09/10/96 - fix merge errors
-   aroy        08/19/96 - NCHAR support
-   jboonleu    09/05/96 - add OCI attributes for object cache
-   dchatter    08/20/96 - HTYPE ranges from 1-50; DTYPE from 50-255
-   slari       08/06/96 - define OCI_DTYPE_ROWID
-   sthakur     08/14/96 - complex object support
-   schandra    06/17/96 - Convert XA to use new OCI
-   abrik       08/15/96 - OCI_ATTR_HEAPALLOC added
-   aroy        07/17/96 - terminology change: ocilobd => ocilobl
-   aroy        07/03/96 - add lob typedefs for Pro*C
-   slari       06/28/96 - add OCI_ATTR_STMT_TYPE
-   lchidamb    06/26/96 - reorg #ifndef
-   schandra    05/31/96 - attribute types for internal and external client name
-   asurpur     05/30/96 - Changing the value of mode
-   schandra    05/18/96 - OCI_TRANS_TWOPHASE -> 0x00000001 to 0x00100000
-   slari       05/30/96 - add callback function prototypes
-   jbellemo    05/23/96 - remove ociisc
-   schandra    04/23/96 - loosely-coupled branches
-   asurpur     05/15/96 - New mode for ocicpw
-   aroy        04/24/96 - making ocihandles opaque
-   slari       04/18/96 - add missing defines
-   schandra    03/27/96 - V8OCI - add transaction related calls
-   dchatter    04/01/96 - add OCI_FILE options
-   dchatter    03/21/96 - add oci2lda conversion routines
-   dchatter    03/07/96 - add OCI piece definition
-   slari       03/12/96 - add describe attributes
-   slari       03/12/96 - add OCI_OTYPE_QUERY
-   aroy        02/28/96 - Add column attributes
-   slari       02/09/96 - add OCI_OBJECT
-   slari       02/07/96 - add OCI_HYTPE_DSC
-   aroy        01/10/96 - adding function code defines...
-   dchatter    01/03/96 - define OCI_NON_BLOCKING
-   dchatter    01/02/96 - Add Any descriptor
-   dchatter    01/02/96 - Add Select List descriptor
-   dchatter    12/29/95 - V8 OCI definitions
-   dchatter    12/29/95 - Creation
-
-*/
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef ORATYPES 
-#include <oratypes.h> 
-#endif
- 
-#ifndef OCIDFN
-#include <ocidfn.h>
-#endif
-
-#ifndef OCI_ORACLE
-# define OCI_ORACLE
-
- 
-/*--------------------------------------------------------------------------- 
- Short names provided for platforms which do not allow extended symbolic names 
-  ---------------------------------------------------------------------------*/
-
-#ifdef SLSHORTNAME
-/* Translation of the long function/type names to short names for IBM only */
-/* maybe lint will use this too */
-#define OCISessionEnd              ocitac
-#define OCIResultSetToStmt         ocirs2sh
-#define OCISessionBegin            ociauth
-#define OCIServerAttach            ociatch
-#define OCIDescriptorAlloc         ocigdesc
-#define OCIServerDetach            ocidtch
-#define OCIDescriptorFree          ocifdesc
-#define OCIServerVersion           ocivers
-#define OCIDescribeAny             ocidsca
-#define OCIBindDynamic             ocibda
-#define OCIBindByName              ocibdn
-#define OCIBindByPos               ocibdp
-#define OCIErrorGet                ocigdr
-#define OCIBindArrayOfStruct       ocibsa
-#define OCIEnvInit                 ociinit
-#define OCIBindObject              ocibndt
-#define OCIHandleAlloc             ocighndl
-#define OCIHandleFree              ocifhndl
-#define OCIRowidToChar             ociri2c
-#ifdef NEVER
-#define OCIStmtBindByPos           ocibndp
-#define OCIStmtBindByName          ocibndn
-#endif
-#define OCIAttrGet                 ocigattr
-#define OCIDefineByPos             ocidfne
-#define OCIAttrSet                 ocisattr
-#define OCIDefineDynamic           ociddf
-#define OCILdaToSvcCtx             ocild2sv
-#define OCIDefineArrayOfStruct     ocidarr
-#define OCIInitialize              ocipi
-#define OCIDefineObject            ocidndt
-#define OCIStmtExecute             ociexec
-#define OCILobAppend               ocilfap
-#define OCILobOpenFile             ocifopn
-#define OCILobCloseFile            ocifcls
-#define OCILobLocator              ocilobd
-#define OCILobCopy                 ocilfcp
-#define OCILobFileCreate           ocifcrt
-#define OCILobFileDelete           ocifdel
-#define OCILobGetLength            ocilfln
-#define OCILobWrite                ocilfwr
-#define OCILobRead                 ocilfrd
-#define OCILobErase                ocilfer
-#define OCILobTrim                 ocilftr
-
-#define OCIStmtFetch               ocifch
-#define OCIStmtGetBindInfo         ocigbp
-#define OCIStmtGetPieceInfo        ocigpi
-#define OCIStmtPrepare             ocireq
-#define OCIStmtSetPieceInfo        ocispi
-#define OCISvcCtxToLda             ocisv2ld
-#define OCITransCommit             ocitxcm
-#define OCITransDetach             ocitxdt
-#define OCITransForget             ocitxfgt
-#define OCITransPrepare            ocitxpre
-#define OCITransRollback           ocitxrl
-#define OCIPasswordChange          ocicpw
-#define OCITransStart              ocitxst
-#define OCITransMultiPrepare       ocitxmp
-
-#define OCIBreak                   ocibreak
-#define OCIParamGet                ocigparm
-#define OCIParamSet                ocisparm
-
-#define OCISecurityOpenWallet           ocizwOpenWallet
-#define OCISecurityCloseWallet          ocizwCloseWallet
-#define OCISecurityCreateWallet         ocizwCreateWallet
-#define OCISecurityDestroyWallet        ocizwDestroyWallet
-#define OCISecurityStorePersona         ocizeStorePersona
-#define OCISecurityOpenPersona          ocizeOpenPersona
-#define OCISecurityClosePersona         ocizeClosePersona
-#define OCISecurityRemovePersona        ocizeRemovePersona
-#define OCISecurityCreatePersona        ocizeCreatePersona
-#define OCISecuritySetProtection        ocizeSetProtection
-#define OCISecurityGetProtection        ocizeGetProtection
-#define OCISecurityRemoveIdentity       ociziRemoveIdentity
-#define OCISecurityCreateIdentity       ociziCreateIdentity
-#define OCISecurityAbortIdentity        ociziAbortIdentity
-#define OCISecurityFreeIdentity         ociziFreeIdentity
-#define OCISecurityStoreTrustedIdentity ociziStoreTrustedIdentity
-#define OCISecuritySign                 ocizSign
-#define OCISecuritySignExpansion        ocizxSignExpansion
-#define OCISecurityVerify               ocizVerify
-#define OCISecurityValidate             ocizValidate
-#define OCISecuritySignDetached         ocizsd_SignDetached
-#define OCISecuritySignDetExpansion     ocizxsd_SignDetachedExpansion
-#define OCISecurityVerifyDetached       ocizved_VerifyDetached
-#define OCISecurity_PKEncrypt           ocizkec_PKEncrypt
-#define OCISecurityPKEncryptExpansion   ocizxkec_PKEncryptExpansion
-#define OCISecurityPKDecrypt            ocizkdc_PKDecrypt
-#define OCISecurityEncrypt              ocizEncrypt
-#define OCISecurityEncryptExpansion     ocizxEncryptExpansion
-#define OCISecurityDecrypt              ocizDecrypt
-#define OCISecurityEnvelope             ocizEnvelope
-#define OCISecurityDeEnvelope           ocizDeEnvelope
-#define OCISecurityKeyedHash            ocizKeyedHash
-#define OCISecurityKeyedHashExpansion   ocizxKeyedHashExpansion
-#define OCISecurityHash                 ocizHash
-#define OCISecurityHashExpansion        ocizxHashExpansion
-#define OCISecuritySeedRandom           ocizSeedRandom
-#define OCISecurityRandomBytes          ocizrb_RandomBytes
-#define OCISecurityRandomNumber         ocizrn_RandomNumber
-#define OCISecurityInitBlock            ocizibInitBlock
-#define OCISecurityReuseBlock           ocizrbReuseBlock
-#define OCISecurityPurgeBlock           ocizpbPurgeBlock
-#define OCISecuritySetBlock             ocizsbSetBlock
-#define OCISecurityGetIdentity          ocizgi_GetIdentity
-
-#define OCIExtractInit             ocixeini
-#define OCIExtractTerm             ocixetrm
-#define OCIExtractReset            ocixerst
-#define OCIExtractSetNumKeys       ocixesnk
-#define OCIExtractSetKey           ocixesk
-#define OCIExtractFromFile         ocixeff
-#define OCIExtractFromStr          ocixefs
-#define OCIExtractToInt            ocixeti
-#define OCIExtractToBool           ocixetb
-#define OCIExtractToStr            ocixets
-#define OCIExtractToOCINum         ocixeton
-#define OCIExtractToList           ocixetl
-#define OCIExtractFromList         ocixefl
-
-#define OCIDateTimeGetTime         ocidt01_GetTime
-#define OCIDateTimeGetDate         ocidt02_GetDate
-#define OCIDateTimeGetTimeZoneOffset     ocidt03_GetTZ
-#define OCIDateTimeSysTimeStamp    ocidt07_SysTS
-#define OCIDateTimeAssign          ocidt08_Assign 
-#define OCIDateTimeToText          ocidt09_ToText
-#define OCIDateTimeFromText        ocidt10_FromText
-#define OCIDateTimeCompare         ocidt11_Compare
-#define OCIDateTimeCheck           ocidt12_Check
-#define OCIDateTimeConvert         ocidt13_Convert
-#define OCIDateTimeSubtract        ocidt14_Subtract
-#define OCIDateTimeIntervalAdd     ocidt15_IntervalAdd
-#define OCIDateTimeIntervalSub     ocidt16_IntervalSub
-#define OCIDateTimeGetTimeZoneName ocidt17_Gettzname
-#define OCIDateTimeToArray         ocidt18_ToArray  
-#define OCIDateTimeFromArray       ocidt19_FromArray
-
-#define OCIIntervalSubtract        ociint01_Subtract  
-#define OCIIntervalAdd             ociint02_Add  
-#define OCIIntervalMultiply        ociint03_Multiply  
-#define OCIIntervalDivide          ociint04_Divide  
-#define OCIIntervalCompare         ociint05_Compare  
-#define OCIIntervalFromText        ociint06_FromText  
-#define OCIIntervalToText          ociint07_ToText  
-#define OCIIntervalToNumber        ociint08_ToNumber  
-#define OCIIntervalCheck           ociint09_Check  
-#define OCIIntervalAssign          ociint10_Assign  
-#define OCIIntervalGetYearMonth    ociint11_GetYearMonth
-#define OCIIntervalSetYearMonth    ociint12_SetYearMonth
-#define OCIIntervalGetDaySecond    ociint13_GetDaySecond
-#define OCIIntervalSetDaySecond    ociint14_SetDaySecond
-#define OCIIntervalFromNumber      ociint15_FromNumber
-#define OCIIntervalFromTZ          ociint16_FromTZ 
-
-#define OCIFormatInit              ocixs01_Init
-#define OCIFormatString            ocixs02_Format
-#define OCIFormatTerm              ocixs03_Term
-#define OCIFormatTUb1              ocixs04_TUb1
-#define OCIFormatTUb2              ocixs05_TUb2
-#define OCIFormatTUb4              ocixs06_TUb4
-#define OCIFormatTUword            ocixs07_TUword
-#define OCIFormatTUbig_ora         ocixs08_TUbig_ora
-#define OCIFormatTSb1              ocixs09_TSb1
-#define OCIFormatTSb2              ocixs10_TSb2
-#define OCIFormatTSb4              ocixs11_TSb4
-#define OCIFormatTSword            ocixs12_TSword
-#define OCIFormatTSbig_ora         ocixs13_TSbig_ora
-#define OCIFormatTEb1              ocixs14_TEb1
-#define OCIFormatTEb2              ocixs15_TEb2
-#define OCIFormatTEb4              ocixs16_TEb4
-#define OCIFormatTEword            ocixs17_TEword
-#define OCIFormatTChar             ocixs18_TChar
-#define OCIFormatTText             ocixs19_TText
-#define OCIFormatTDouble           ocixs20_TDouble
-#define OCIFormatTDvoid            ocixs21_TDvoid
-#define OCIFormatTEnd              ocixs22_TEnd
-
-#define OCIFileInit                ocifinit
-#define OCIFileTerm                ocifterm
-#define OCIFileOpen                ocifopen
-#define OCIFileClose               ocifclose
-#define OCIFileRead                ocifread
-#define OCIFileWrite               ocifwrite
-#define OCIFileSeek                ocifseek
-#define OCIFileExists              ocifexists
-#define OCIFileGetLength           ocifglen
-#define OCIFileFlush               ocifflush
-
-
-/* OCIThread short name */
-#define OCIThreadProcessInit       ocitt01_ProcessInit
-#define OCIThreadInit              ocitt02_Init
-#define OCIThreadTerm              ocitt03_Term
-#define OCIThreadIsMulti           ocitt04_IsMulti
-#define OCIThreadMutexInit         ocitt05_MutexInit
-#define OCIThreadMutexDestroy      ocitt06_MutexDestroy
-#define OCIThreadMutexAcquire      ocitt07_MutexAcquire
-#define OCIThreadMutexRelease      ocitt08_MutexRelease
-#define OCIThreadKeyInit           ocitt09_KeyInit
-#define OCIThreadKeyDestroy        ocitt10_KeyDestroy
-#define OCIThreadKeyGet            ocitt11_KeyGet
-#define OCIThreadKeySet            ocitt12_KeySet
-#define OCIThreadIdInit            ocitt13_IdInit
-#define OCIThreadIdDestroy         ocitt14_IdDestroy
-#define OCIThreadIdSet             ocitt15_IdSet
-#define OCIThreadIdSetNull         ocitt16_IdSetNull
-#define OCIThreadIdGet             ocitt17_IdGet
-#define OCIThreadIdSame            ocitt18_IdSame
-#define OCIThreadIdNull            ocitt19_IdNull
-#define OCIThreadHndInit           ocitt20_HndInit
-#define OCIThreadHndDestroy        ocitt21_HndDestroy
-#define OCIThreadCreate            ocitt22_Create
-#define OCIThreadJoin              ocitt23_Join
-#define OCIThreadClose             ocitt24_Close
-#define OCIThreadHandleGet         ocitt25_HandleGet
-
-/* Translation between the old and new datatypes */
-
-#define OCISession                 ociusrh
-#define OCIBind                    ocibndh
-#define OCIDescribe                ocidsch
-#define OCIDefine                  ocidfnh
-#define OCIEnv                     ocienvh
-#define OCIError                   ocierrh
-
-#define OCICPool                   ocicpool
-
-#define OCISPool                   ocispool
-#define OCIAuthInfo                ociauthinfo
-
-
-#define OCILob                     ocilobd
-#define OCILobLength               ocillen
-#define OCILobMode                 ocilmo
-#define OCILobOffset               ociloff
-
-#define OCILobLocator              ocilobd
-#define OCIBlobLocator             ociblobl
-#define OCIClobLocator             ociclobl
-#define OCIBFileLocator            ocibfilel
-
-#define OCIParam                   ocipard
-#define OCIResult                  ocirstd
-#define OCISnapshot                ocisnad
-#define OCIServer                  ocisrvh
-#define OCIStmt                    ocistmh
-#define OCISvcCtx                  ocisvch
-#define OCITrans                   ocitxnh
-#define OCICallbackInBind          ocibicfp
-#define OCICallbackOutBind         ocibocfp
-#define OCICallbackDefine          ocidcfp
-#define OCICallbackLobRead         ocilrfp
-#define OCICallbackLobWrite        ocilwfp
-#define OCISecurity                ociossh
-#define OCIComplexObject           ocicorh
-#define OCIComplexObjectComp       ocicord
-#define OCIRowid                   ociridd
-
-#define OCIAQDeq                   ociaqdeq                  
-#define OCIAQEnq                   ociaqenq
-#define OCIConnectionPoolCreate    ociconpc
-#define OCIConnectionPoolDestroy   ociconpd
-#define OCIEnvCreate               ocienvct
-#define OCILobAssign               ociloass
-#define OCILobCharSetForm          ocilocfm
-#define OCILobCharSetId            ocilocid
-#define OCILobDisableBuffering     ocilodbf
-#define OCILobEnableBuffering      ociloebf
-#define OCILobFileClose            ocilofcl
-#define OCILobFileCloseAll         ocilofca
-#define OCILobFileExists           ocilofex
-#define OCILobFileGetName          ocilofgn
-#define OCILobFileIsOpen           ocifiopn
-#define OCILobFileOpen             ocilofop
-#define OCILobFileSetName          ocilofsn
-#define OCILobFlushBuffer          ocilofbf
-#define OCILobIsEqual              ociloieq
-#define OCILobLoadFromFile         ocilolff
-#define OCILobLocatorIsInit        ocilolii
-#define OCILobLocatorAssign        ocilolas
-#define OCILogon                   ocilogon
-#define OCILogon2                  ocilgon2
-#define OCILogoff                  ocilgoff
-#endif /* ifdef SLSHORTNAME */
-
-/*--------------------------------------------------------------------------- 
-                     PUBLIC TYPES AND CONSTANTS 
-  ---------------------------------------------------------------------------*/
-
-/*-----------------------------Handle Types----------------------------------*/
-                                           /* handle types range from 1 - 49 */
-#define OCI_HTYPE_FIRST          1             /* start value of handle type */
-#define OCI_HTYPE_ENV            1                     /* environment handle */
-#define OCI_HTYPE_ERROR          2                           /* error handle */
-#define OCI_HTYPE_SVCCTX         3                         /* service handle */
-#define OCI_HTYPE_STMT           4                       /* statement handle */
-#define OCI_HTYPE_BIND           5                            /* bind handle */
-#define OCI_HTYPE_DEFINE         6                          /* define handle */
-#define OCI_HTYPE_DESCRIBE       7                        /* describe handle */
-#define OCI_HTYPE_SERVER         8                          /* server handle */
-#define OCI_HTYPE_SESSION        9                  /* authentication handle */
-#define OCI_HTYPE_AUTHINFO      OCI_HTYPE_SESSION  /* SessionGet auth handle */
-#define OCI_HTYPE_TRANS         10                     /* transaction handle */
-#define OCI_HTYPE_COMPLEXOBJECT 11        /* complex object retrieval handle */
-#define OCI_HTYPE_SECURITY      12                        /* security handle */
-#define OCI_HTYPE_SUBSCRIPTION  13                    /* subscription handle */
-#define OCI_HTYPE_DIRPATH_CTX   14                    /* direct path context */
-#define OCI_HTYPE_DIRPATH_COLUMN_ARRAY 15        /* direct path column array */
-#define OCI_HTYPE_DIRPATH_STREAM       16              /* direct path stream */
-#define OCI_HTYPE_PROC                 17                  /* process handle */
-#define OCI_HTYPE_DIRPATH_FN_CTX       18    /* direct path function context */
-#define OCI_HTYPE_DIRPATH_FN_COL_ARRAY 19          /* dp object column array */
-#define OCI_HTYPE_XADSESSION    20                  /* access driver session */
-#define OCI_HTYPE_XADTABLE      21                    /* access driver table */
-#define OCI_HTYPE_XADFIELD      22                    /* access driver field */
-#define OCI_HTYPE_XADGRANULE    23                  /* access driver granule */
-#define OCI_HTYPE_XADRECORD     24                   /* access driver record */
-#define OCI_HTYPE_XADIO         25                      /* access driver I/O */
-#define OCI_HTYPE_CPOOL         26                 /* connection pool handle */
-#define OCI_HTYPE_SPOOL         27                    /* session pool handle */
-
-#define OCI_HTYPE_LAST          27            /* last value of a handle type */
-
-/*---------------------------------------------------------------------------*/
-
-
-/*-------------------------Descriptor Types----------------------------------*/
-                                    /* descriptor values range from 50 - 255 */
-#define OCI_DTYPE_FIRST 50                 /* start value of descriptor type */
-#define OCI_DTYPE_LOB 50                                     /* lob  locator */
-#define OCI_DTYPE_SNAP 51                             /* snapshot descriptor */
-#define OCI_DTYPE_RSET 52                           /* result set descriptor */
-#define OCI_DTYPE_PARAM 53  /* a parameter descriptor obtained from ocigparm */
-#define OCI_DTYPE_ROWID  54                              /* rowid descriptor */
-#define OCI_DTYPE_COMPLEXOBJECTCOMP  55
-                                      /* complex object retrieval descriptor */
-#define OCI_DTYPE_FILE 56                                /* File Lob locator */
-#define OCI_DTYPE_AQENQ_OPTIONS 57                        /* enqueue options */
-#define OCI_DTYPE_AQDEQ_OPTIONS 58                        /* dequeue options */
-#define OCI_DTYPE_AQMSG_PROPERTIES 59                  /* message properties */
-#define OCI_DTYPE_AQAGENT 60                                     /* aq agent */
-#define OCI_DTYPE_LOCATOR 61                                  /* LOB locator */
-#define OCI_DTYPE_INTERVAL_YM 62                      /* Interval year month */
-#define OCI_DTYPE_INTERVAL_DS 63                      /* Interval day second */
-#define OCI_DTYPE_AQNFY_DESCRIPTOR  64               /* AQ notify descriptor */
-#define OCI_DTYPE_DATE 65                            /* Date */
-#define OCI_DTYPE_TIME 66                            /* Time */
-#define OCI_DTYPE_TIME_TZ 67                         /* Time with timezone */
-#define OCI_DTYPE_TIMESTAMP 68                       /* Timestamp */
-#define OCI_DTYPE_TIMESTAMP_TZ 69                /* Timestamp with timezone */
-#define OCI_DTYPE_TIMESTAMP_LTZ 70             /* Timestamp with local tz */
-#define OCI_DTYPE_UCB           71               /* user callback descriptor */
-#define OCI_DTYPE_SRVDN         72              /* server DN list descriptor */
-#define OCI_DTYPE_SIGNATURE     73                              /* signature */
-#define OCI_DTYPE_RESERVED_1    74              /* reserved for internal use */
-#define OCI_DTYPE_LAST          74        /* last value of a descriptor type */
-
-/*---------------------------------------------------------------------------*/
-
-/*--------------------------------LOB types ---------------------------------*/
-#define OCI_TEMP_BLOB 1                /* LOB type - BLOB ------------------ */
-#define OCI_TEMP_CLOB 2                /* LOB type - CLOB ------------------ */
-/*---------------------------------------------------------------------------*/
-
-/*-------------------------Object Ptr Types----------------------------------*/
-#define OCI_OTYPE_NAME 1                                      /* object name */
-#define OCI_OTYPE_REF  2                                       /* REF to TDO */
-#define OCI_OTYPE_PTR  3                                       /* PTR to TDO */
-/*---------------------------------------------------------------------------*/
-
-/*=============================Attribute Types===============================*/
-/* 
-   Note: All attributes are global.  New attibutes should be added to the end
-   of the list. Before you add an attribute see if an existing one can be 
-   used for your handle. 
-
-   If you see any holes please use the holes first. 
- 
-*/
-/*===========================================================================*/
-
-
-#define OCI_ATTR_FNCODE  1                          /* the OCI function code */
-#define OCI_ATTR_OBJECT   2 /* is the environment initialized in object mode */
-#define OCI_ATTR_NONBLOCKING_MODE  3                    /* non blocking mode */
-#define OCI_ATTR_SQLCODE  4                                  /* the SQL verb */
-#define OCI_ATTR_ENV  5                            /* the environment handle */
-#define OCI_ATTR_SERVER 6                               /* the server handle */
-#define OCI_ATTR_SESSION 7                        /* the user session handle */
-#define OCI_ATTR_TRANS   8                         /* the transaction handle */
-#define OCI_ATTR_ROW_COUNT   9                  /* the rows processed so far */
-#define OCI_ATTR_SQLFNCODE 10               /* the SQL verb of the statement */
-#define OCI_ATTR_PREFETCH_ROWS  11    /* sets the number of rows to prefetch */
-#define OCI_ATTR_NESTED_PREFETCH_ROWS 12 /* the prefetch rows of nested table*/
-#define OCI_ATTR_PREFETCH_MEMORY 13         /* memory limit for rows fetched */
-#define OCI_ATTR_NESTED_PREFETCH_MEMORY 14   /* memory limit for nested rows */
-#define OCI_ATTR_CHAR_COUNT  15 
-                    /* this specifies the bind and define size in characters */
-#define OCI_ATTR_PDSCL   16                          /* packed decimal scale */
-#define OCI_ATTR_FSPRECISION OCI_ATTR_PDSCL   
-                                          /* fs prec for datetime data types */
-#define OCI_ATTR_PDPRC   17                         /* packed decimal format */
-#define OCI_ATTR_LFPRECISION OCI_ATTR_PDPRC 
-                                          /* fs prec for datetime data types */
-#define OCI_ATTR_PARAM_COUNT 18       /* number of column in the select list */
-#define OCI_ATTR_ROWID   19                                     /* the rowid */
-#define OCI_ATTR_CHARSET  20                      /* the character set value */
-#define OCI_ATTR_NCHAR   21                                    /* NCHAR type */
-#define OCI_ATTR_USERNAME 22                           /* username attribute */
-#define OCI_ATTR_PASSWORD 23                           /* password attribute */
-#define OCI_ATTR_STMT_TYPE   24                            /* statement type */
-#define OCI_ATTR_INTERNAL_NAME   25             /* user friendly global name */
-#define OCI_ATTR_EXTERNAL_NAME   26      /* the internal name for global txn */
-#define OCI_ATTR_XID     27           /* XOPEN defined global transaction id */
-#define OCI_ATTR_TRANS_LOCK 28                                            /* */
-#define OCI_ATTR_TRANS_NAME 29    /* string to identify a global transaction */
-#define OCI_ATTR_HEAPALLOC 30                /* memory allocated on the heap */
-#define OCI_ATTR_CHARSET_ID 31                           /* Character Set ID */
-#define OCI_ATTR_CHARSET_FORM 32                       /* Character Set Form */
-#define OCI_ATTR_MAXDATA_SIZE 33       /* Maximumsize of data on the server  */
-#define OCI_ATTR_CACHE_OPT_SIZE 34              /* object cache optimal size */
-#define OCI_ATTR_CACHE_MAX_SIZE 35   /* object cache maximum size percentage */
-#define OCI_ATTR_PINOPTION 36             /* object cache default pin option */
-#define OCI_ATTR_ALLOC_DURATION 37
-                                 /* object cache default allocation duration */
-#define OCI_ATTR_PIN_DURATION 38        /* object cache default pin duration */
-#define OCI_ATTR_FDO          39       /* Format Descriptor object attribute */
-#define OCI_ATTR_POSTPROCESSING_CALLBACK 40
-                                         /* Callback to process outbind data */
-#define OCI_ATTR_POSTPROCESSING_CONTEXT 41
-                                 /* Callback context to process outbind data */
-#define OCI_ATTR_ROWS_RETURNED 42
-               /* Number of rows returned in current iter - for Bind handles */
-#define OCI_ATTR_FOCBK        43              /* Failover Callback attribute */
-#define OCI_ATTR_IN_V8_MODE   44 /* is the server/service context in V8 mode */
-#define OCI_ATTR_LOBEMPTY     45                              /* empty lob ? */
-#define OCI_ATTR_SESSLANG     46                  /* session language handle */
-
-#define OCI_ATTR_VISIBILITY             47                     /* visibility */
-#define OCI_ATTR_RELATIVE_MSGID         48            /* relative message id */
-#define OCI_ATTR_SEQUENCE_DEVIATION     49             /* sequence deviation */
-
-#define OCI_ATTR_CONSUMER_NAME          50                  /* consumer name */
-#define OCI_ATTR_DEQ_MODE               51                   /* dequeue mode */
-#define OCI_ATTR_NAVIGATION             52                     /* navigation */
-#define OCI_ATTR_WAIT                   53                           /* wait */
-#define OCI_ATTR_DEQ_MSGID              54             /* dequeue message id */
-
-#define OCI_ATTR_PRIORITY               55                       /* priority */
-#define OCI_ATTR_DELAY                  56                          /* delay */
-#define OCI_ATTR_EXPIRATION             57                     /* expiration */
-#define OCI_ATTR_CORRELATION            58                 /* correlation id */
-#define OCI_ATTR_ATTEMPTS               59                  /* # of attempts */
-#define OCI_ATTR_RECIPIENT_LIST         60                 /* recipient list */
-#define OCI_ATTR_EXCEPTION_QUEUE        61           /* exception queue name */
-#define OCI_ATTR_ENQ_TIME               62 /* enqueue time (only OCIAttrGet) */
-#define OCI_ATTR_MSG_STATE              63/* message state (only OCIAttrGet) */
-                                                   /* NOTE: 64-66 used below */
-#define OCI_ATTR_AGENT_NAME             64                     /* agent name */
-#define OCI_ATTR_AGENT_ADDRESS          65                  /* agent address */
-#define OCI_ATTR_AGENT_PROTOCOL         66                 /* agent protocol */
-#define OCI_ATTR_USER_PROPERTY          67                  /* user property */
-#define OCI_ATTR_SENDER_ID              68                      /* sender id */
-#define OCI_ATTR_ORIGINAL_MSGID         69            /* original message id */
-
-#define OCI_ATTR_QUEUE_NAME             70                     /* queue name */
-#define OCI_ATTR_NFY_MSGID              71                     /* message id */
-#define OCI_ATTR_MSG_PROP               72             /* message properties */
-
-#define OCI_ATTR_NUM_DML_ERRORS         73       /* num of errs in array DML */
-#define OCI_ATTR_DML_ROW_OFFSET         74        /* row offset in the array */
-
-              /* AQ array error handling uses DML method of accessing errors */
-#define OCI_ATTR_AQ_NUM_ERRORS          OCI_ATTR_NUM_DML_ERRORS
-#define OCI_ATTR_AQ_ERROR_INDEX         OCI_ATTR_DML_ROW_OFFSET
-
-#define OCI_ATTR_DATEFORMAT             75     /* default date format string */
-#define OCI_ATTR_BUF_ADDR               76                 /* buffer address */
-#define OCI_ATTR_BUF_SIZE               77                    /* buffer size */
-#define OCI_ATTR_DIRPATH_MODE           78  /* mode of direct path operation */
-#define OCI_ATTR_DIRPATH_NOLOG          79               /* nologging option */
-#define OCI_ATTR_DIRPATH_PARALLEL       80     /* parallel (temp seg) option */
-#define OCI_ATTR_NUM_ROWS               81 /* number of rows in column array */
-                                  /* NOTE that OCI_ATTR_NUM_COLS is a column
-                                   * array attribute too.
-                                   */
-#define OCI_ATTR_COL_COUNT              82        /* columns of column array
-                                                     processed so far.       */
-#define OCI_ATTR_STREAM_OFFSET          83  /* str off of last row processed */
-#define OCI_ATTR_SHARED_HEAPALLOC       84    /* Shared Heap Allocation Size */
-
-#define OCI_ATTR_SERVER_GROUP           85              /* server group name */
-
-#define OCI_ATTR_MIGSESSION             86   /* migratable session attribute */
-
-#define OCI_ATTR_NOCACHE                87                 /* Temporary LOBs */
-
-#define OCI_ATTR_MEMPOOL_SIZE           88                      /* Pool Size */
-#define OCI_ATTR_MEMPOOL_INSTNAME       89                  /* Instance name */
-#define OCI_ATTR_MEMPOOL_APPNAME        90               /* Application name */
-#define OCI_ATTR_MEMPOOL_HOMENAME       91            /* Home Directory name */
-#define OCI_ATTR_MEMPOOL_MODEL          92     /* Pool Model (proc,thrd,both)*/
-#define OCI_ATTR_MODES                  93                          /* Modes */
-
-#define OCI_ATTR_SUBSCR_NAME            94           /* name of subscription */
-#define OCI_ATTR_SUBSCR_CALLBACK        95            /* associated callback */
-#define OCI_ATTR_SUBSCR_CTX             96    /* associated callback context */
-#define OCI_ATTR_SUBSCR_PAYLOAD         97             /* associated payload */
-#define OCI_ATTR_SUBSCR_NAMESPACE       98           /* associated namespace */
-
-#define OCI_ATTR_PROXY_CREDENTIALS      99         /* Proxy user credentials */
-#define OCI_ATTR_INITIAL_CLIENT_ROLES  100       /* Initial client role list */
-
-#define OCI_ATTR_UNK              101                   /* unknown attribute */
-#define OCI_ATTR_NUM_COLS         102                   /* number of columns */
-#define OCI_ATTR_LIST_COLUMNS     103        /* parameter of the column list */
-#define OCI_ATTR_RDBA             104           /* DBA of the segment header */
-#define OCI_ATTR_CLUSTERED        105      /* whether the table is clustered */
-#define OCI_ATTR_PARTITIONED      106    /* whether the table is partitioned */
-#define OCI_ATTR_INDEX_ONLY       107     /* whether the table is index only */
-#define OCI_ATTR_LIST_ARGUMENTS   108      /* parameter of the argument list */
-#define OCI_ATTR_LIST_SUBPROGRAMS 109    /* parameter of the subprogram list */
-#define OCI_ATTR_REF_TDO          110          /* REF to the type descriptor */
-#define OCI_ATTR_LINK             111              /* the database link name */
-#define OCI_ATTR_MIN              112                       /* minimum value */
-#define OCI_ATTR_MAX              113                       /* maximum value */
-#define OCI_ATTR_INCR             114                     /* increment value */
-#define OCI_ATTR_CACHE            115   /* number of sequence numbers cached */
-#define OCI_ATTR_ORDER            116     /* whether the sequence is ordered */
-#define OCI_ATTR_HW_MARK          117                     /* high-water mark */
-#define OCI_ATTR_TYPE_SCHEMA      118                  /* type's schema name */
-#define OCI_ATTR_TIMESTAMP        119             /* timestamp of the object */
-#define OCI_ATTR_NUM_ATTRS        120                /* number of sttributes */
-#define OCI_ATTR_NUM_PARAMS       121                /* number of parameters */
-#define OCI_ATTR_OBJID            122       /* object id for a table or view */
-#define OCI_ATTR_PTYPE            123           /* type of info described by */
-#define OCI_ATTR_PARAM            124                /* parameter descriptor */
-#define OCI_ATTR_OVERLOAD_ID      125     /* overload ID for funcs and procs */
-#define OCI_ATTR_TABLESPACE       126                    /* table name space */
-#define OCI_ATTR_TDO              127                       /* TDO of a type */
-#define OCI_ATTR_LTYPE            128                           /* list type */
-#define OCI_ATTR_PARSE_ERROR_OFFSET 129                /* Parse Error offset */
-#define OCI_ATTR_IS_TEMPORARY     130          /* whether table is temporary */
-#define OCI_ATTR_IS_TYPED         131              /* whether table is typed */
-#define OCI_ATTR_DURATION         132         /* duration of temporary table */
-#define OCI_ATTR_IS_INVOKER_RIGHTS 133                  /* is invoker rights */
-#define OCI_ATTR_OBJ_NAME         134           /* top level schema obj name */
-#define OCI_ATTR_OBJ_SCHEMA       135                         /* schema name */
-#define OCI_ATTR_OBJ_ID           136          /* top level schema object id */
-
-#define OCI_ATTR_DIRPATH_SORTED_INDEX    137 /* index that data is sorted on */
-
-            /* direct path index maint method (see oci8dp.h) */
-#define OCI_ATTR_DIRPATH_INDEX_MAINT_METHOD 138
-
-    /* parallel load: db file, initial and next extent sizes */
-
-#define OCI_ATTR_DIRPATH_FILE               139      /* DB file to load into */
-#define OCI_ATTR_DIRPATH_STORAGE_INITIAL    140       /* initial extent size */
-#define OCI_ATTR_DIRPATH_STORAGE_NEXT       141          /* next extent size */
-
-
-#define OCI_ATTR_TRANS_TIMEOUT              142       /* transaction timeout */
-#define OCI_ATTR_SERVER_STATUS              143/* state of the server handle */
-#define OCI_ATTR_STATEMENT                  144 /* statement txt in stmt hdl */
-
-            /* direct path index maint method (see oci8dp.h) */
-#define OCI_ATTR_DIRPATH_SKIPINDEX_METHOD   145
-
-#define OCI_ATTR_DEQCOND                    146         /* dequeue condition */
-#define OCI_ATTR_RESERVED_2                 147                  /* reserved */
-
-  
-#define OCI_ATTR_SUBSCR_RECPT               148 /* recepient of subscription */
-#define OCI_ATTR_SUBSCR_RECPTPROTO          149    /* protocol for recepient */
-
-    /* 8.2 dpapi support of ADTs */
-#define OCI_ATTR_DIRPATH_EXPR_TYPE  150        /* expr type of OCI_ATTR_NAME */
-
-#define OCI_ATTR_DIRPATH_INPUT      151    /* input in text or stream format */
-#define OCI_DIRPATH_INPUT_TEXT     0x01
-#define OCI_DIRPATH_INPUT_STREAM   0x02
-#define OCI_DIRPATH_INPUT_UNKNOWN  0x04
-
-#define OCI_ATTR_LDAP_HOST       153              /* LDAP host to connect to */
-#define OCI_ATTR_LDAP_PORT       154              /* LDAP port to connect to */
-#define OCI_ATTR_BIND_DN         155                              /* bind DN */
-#define OCI_ATTR_LDAP_CRED       156       /* credentials to connect to LDAP */
-#define OCI_ATTR_WALL_LOC        157               /* client wallet location */
-#define OCI_ATTR_LDAP_AUTH       158           /* LDAP authentication method */
-#define OCI_ATTR_LDAP_CTX        159        /* LDAP adminstration context DN */
-#define OCI_ATTR_SERVER_DNS      160      /* list of registration server DNs */
-
-#define OCI_ATTR_DN_COUNT        161             /* the number of server DNs */
-#define OCI_ATTR_SERVER_DN       162                  /* server DN attribute */
-
-#define OCI_ATTR_MAXCHAR_SIZE               163     /* max char size of data */
-
-#define OCI_ATTR_CURRENT_POSITION           164 /* for scrollable result sets*/
-
-/* Added to get attributes for ref cursor to statement handle */
-#define OCI_ATTR_RESERVED_3                 165                  /* reserved */
-#define OCI_ATTR_RESERVED_4                 166                  /* reserved */
-#define OCI_ATTR_DIRPATH_FN_CTX             167  /* fn ctx ADT attrs or args */
-#define OCI_ATTR_DIGEST_ALGO                168          /* digest algorithm */
-#define OCI_ATTR_CERTIFICATE                169               /* certificate */
-#define OCI_ATTR_SIGNATURE_ALGO             170       /* signature algorithm */
-#define OCI_ATTR_CANONICAL_ALGO             171    /* canonicalization algo. */
-#define OCI_ATTR_PRIVATE_KEY                172               /* private key */
-#define OCI_ATTR_DIGEST_VALUE               173              /* digest value */
-#define OCI_ATTR_SIGNATURE_VAL              174           /* signature value */
-#define OCI_ATTR_SIGNATURE                  175                 /* signature */
-
-/* attributes for setting OCI stmt caching specifics in svchp */
-#define OCI_ATTR_STMTCACHESIZE              176     /* size of the stm cache */
-
-/* --------------------------- Connection Pool Attributes ------------------ */
-#define OCI_ATTR_CONN_NOWAIT               178
-#define OCI_ATTR_CONN_BUSY_COUNT            179
-#define OCI_ATTR_CONN_OPEN_COUNT            180
-#define OCI_ATTR_CONN_TIMEOUT               181
-#define OCI_ATTR_STMT_STATE                 182
-#define OCI_ATTR_CONN_MIN                   183
-#define OCI_ATTR_CONN_MAX                   184
-#define OCI_ATTR_CONN_INCR                  185
-
-#define OCI_ATTR_DIRPATH_OID                187   /* loading into an OID col */
-
-#define OCI_ATTR_NUM_OPEN_STMTS             188     /* open stmts in session */
-#define OCI_ATTR_DESCRIBE_NATIVE            189  /* get native info via desc */
-
-#define OCI_ATTR_BIND_COUNT                 190   /* number of bind postions */
-#define OCI_ATTR_HANDLE_POSITION            191 /* pos of bind/define handle */
-#define OCI_ATTR_RESERVED_5                 192                 /* reserverd */
-#define OCI_ATTR_SERVER_BUSY                193 /* call in progress on server*/
-
-#define OCI_ATTR_DIRPATH_SID                194   /* loading into an SID col */
-/* notification presentation for recipient */
-#define OCI_ATTR_SUBSCR_RECPTPRES           195
-#define OCI_ATTR_TRANSFORMATION             196 /* AQ message transformation */
-
-#define OCI_ATTR_ROWS_FETCHED               197 /* rows fetched in last call */
-
-/* --------------------------- Snapshot attributes ------------------------- */
-#define OCI_ATTR_SCN_BASE                   198             /* snapshot base */
-#define OCI_ATTR_SCN_WRAP                   199             /* snapshot wrap */
-
-/* --------------------------- Miscellanous attributes --------------------- */
-#define OCI_ATTR_RESERVED_6                 200                  /* reserved */
-#define OCI_ATTR_READONLY_TXN               201           /* txn is readonly */
-#define OCI_ATTR_RESERVED_7                 202                  /* reserved */
-#define OCI_ATTR_ERRONEOUS_COLUMN           203 /* position of erroneous col */
-#define OCI_ATTR_RESERVED_8                 204                  /* reserved */
-
-/* -------------------- 8.2 dpapi support of ADTs continued ---------------- */
-#define OCI_ATTR_DIRPATH_OBJ_CONSTR         206 /* obj type of subst obj tbl */
-#define OCI_ATTR_INST_TYPE                  207      /* oracle instance type */
-/******USED attribute 208 for  OCI_ATTR_SPOOL_STMTCACHESIZE*******************/
-
-#define OCI_ATTR_ENV_UTF16                  209     /* is env in utf16 mode? */
-#define OCI_ATTR_RESERVED_9                 210          /* reserved for TMZ */
-#define OCI_ATTR_RESERVED_10                211                  /* reserved */
-
-/* Attr to allow setting of the stream version PRIOR to calling Prepare */
-#define OCI_ATTR_DIRPATH_STREAM_VERSION     212      /* version of the stream*/
-
-#define OCIP_ATTR_DIRPATH_VARRAY_INDEX      213       /* varray index column */
-
-#define OCI_ATTR_RESERVED_12                214                  /* reserved */
-#define OCI_ATTR_RESERVED_13                215                  /* reserved */
-#define OCI_ATTR_IS_EXTERNAL                216 /* whether table is external */
-
-
-/* -------------------------- Statement Handle Attributes ------------------ */
-
-#define OCI_ATTR_RESERVED_15                217                  /* reserved */
-#define OCI_ATTR_STMT_IS_RETURNING          218 /* stmt has returning clause */
-#define OCI_ATTR_RESERVED_16                219                  /* reserved */
-#define OCI_ATTR_RESERVED_17                220                  /* reserved */
-#define OCI_ATTR_RESERVED_18                221                  /* reserved */
-
-/* --------------------------- session attributes ---------------------------*/
-#define OCI_ATTR_RESERVED_19                222                  /* reserved */
-
-/*------------- Supported Values for Direct Path Stream Version -------------*/
-#define OCI_DIRPATH_STREAM_VERSION_1        100
-#define OCI_DIRPATH_STREAM_VERSION_2        200
-#define OCI_DIRPATH_STREAM_VERSION_3        300                   /* default */
-
-/* ----------------------- row callback attributes ------------------------- */
-#define OCI_ATTR_BIND_ROWCBK                301         /* bind row callback */
-#define OCI_ATTR_BIND_ROWCTX                302 /* ctx for bind row callback */
-#define OCI_ATTR_SKIP_BUFFER                303  /* skip buffer in array ops */
-
-/* -------- client side character and national character set ids ----------- */
-#define OCI_ATTR_ENV_CHARSET_ID   OCI_ATTR_CHARSET_ID   /* charset id in env */
-#define OCI_ATTR_ENV_NCHARSET_ID  OCI_ATTR_NCHARSET_ID /* ncharset id in env */
-
-
-/*------------- Supported Values for protocol for recepient -----------------*/
-#define OCI_SUBSCR_PROTO_OCI                0                         /* oci */
-#define OCI_SUBSCR_PROTO_MAIL               1                        /* mail */
-#define OCI_SUBSCR_PROTO_SERVER             2                      /* server */
-#define OCI_SUBSCR_PROTO_HTTP               3                        /* http */
-#define OCI_SUBSCR_PROTO_MAX                4       /* max current protocols */
-
-/*------------- Supported Values for presentation for recepient -------------*/
-#define OCI_SUBSCR_PRES_DEFAULT             0                     /* default */
-#define OCI_SUBSCR_PRES_XML                 1                         /* xml */
-#define OCI_SUBSCR_PRES_MAX                 2   /* max current presentations */
-                                                   
-
-/* ----- Temporary attribute value for UCS2/UTF16 character set ID -------- */ 
-#define OCI_UCS2ID            1000                        /* UCS2 charset ID */
-#define OCI_UTF16ID           1000                       /* UTF16 charset ID */
-
-/*============================== End OCI Attribute Types ====================*/
-
-/*---------------- Server Handle Attribute Values ---------------------------*/
-
-/* OCI_ATTR_SERVER_STATUS */
-#define OCI_SERVER_NOT_CONNECTED        0x0 
-#define OCI_SERVER_NORMAL               0x1 
-
-/*---------------------------------------------------------------------------*/
-
-/*------------------------- Supported Namespaces  ---------------------------*/
-#define OCI_SUBSCR_NAMESPACE_ANONYMOUS   0            /* Anonymous Namespace */
-#define OCI_SUBSCR_NAMESPACE_AQ          1                /* Advanced Queues */
-#define OCI_SUBSCR_NAMESPACE_MAX         2          /* Max Name Space Number */
-
-
-/*-------------------------Credential Types----------------------------------*/
-#define OCI_CRED_RDBMS      1                  /* database username/password */
-#define OCI_CRED_EXT        2             /* externally provided credentials */
-#define OCI_CRED_PROXY      3                        /* proxy authentication */
-#define OCI_CRED_RESERVED_1 4                                    /* reserved */
-#define OCI_CRED_RESERVED_2 5                                    /* reserved */
-/*---------------------------------------------------------------------------*/
-
-/*------------------------Error Return Values--------------------------------*/
-#define OCI_SUCCESS 0                      /* maps to SQL_SUCCESS of SAG CLI */
-#define OCI_SUCCESS_WITH_INFO 1             /* maps to SQL_SUCCESS_WITH_INFO */
-#define OCI_RESERVED_FOR_INT_USE 200                            /* reserved */ 
-#define OCI_NO_DATA 100                               /* maps to SQL_NO_DATA */
-#define OCI_ERROR -1                                    /* maps to SQL_ERROR */
-#define OCI_INVALID_HANDLE -2                  /* maps to SQL_INVALID_HANDLE */
-#define OCI_NEED_DATA 99                            /* maps to SQL_NEED_DATA */
-#define OCI_STILL_EXECUTING -3123                   /* OCI would block error */
-/*---------------------------------------------------------------------------*/
-
-/*--------------------- User Callback Return Values -------------------------*/
-#define OCI_CONTINUE -24200    /* Continue with the body of the OCI function */
-#define OCI_ROWCBK_DONE   -24201              /* done with user row callback */
-/*---------------------------------------------------------------------------*/
-
-/*------------------DateTime and Interval check Error codes------------------*/
-
-/* DateTime Error Codes used by OCIDateTimeCheck() */
-#define   OCI_DT_INVALID_DAY         0x1                          /* Bad day */
-#define   OCI_DT_DAY_BELOW_VALID     0x2      /* Bad DAy Low/high bit (1=low)*/
-#define   OCI_DT_INVALID_MONTH       0x4                       /*  Bad MOnth */
-#define   OCI_DT_MONTH_BELOW_VALID   0x8   /* Bad MOnth Low/high bit (1=low) */
-#define   OCI_DT_INVALID_YEAR        0x10                        /* Bad YeaR */
-#define   OCI_DT_YEAR_BELOW_VALID    0x20  /*  Bad YeaR Low/high bit (1=low) */
-#define   OCI_DT_INVALID_HOUR        0x40                       /*  Bad HouR */
-#define   OCI_DT_HOUR_BELOW_VALID    0x80   /* Bad HouR Low/high bit (1=low) */
-#define   OCI_DT_INVALID_MINUTE      0x100                     /* Bad MiNute */
-#define   OCI_DT_MINUTE_BELOW_VALID  0x200 /*Bad MiNute Low/high bit (1=low) */
-#define   OCI_DT_INVALID_SECOND      0x400                    /*  Bad SeCond */
-#define   OCI_DT_SECOND_BELOW_VALID  0x800  /*bad second Low/high bit (1=low)*/
-#define   OCI_DT_DAY_MISSING_FROM_1582 0x1000     
-                                 /*  Day is one of those "missing" from 1582 */
-#define   OCI_DT_YEAR_ZERO           0x2000       /* Year may not equal zero */
-#define   OCI_DT_INVALID_TIMEZONE    0x4000                 /*  Bad Timezone */
-#define   OCI_DT_INVALID_FORMAT      0x8000         /* Bad date format input */
-
-
-/* Interval Error Codes used by OCIInterCheck() */
-#define   OCI_INTER_INVALID_DAY         0x1                       /* Bad day */
-#define   OCI_INTER_DAY_BELOW_VALID     0x2  /* Bad DAy Low/high bit (1=low) */
-#define   OCI_INTER_INVALID_MONTH       0x4                     /* Bad MOnth */
-#define   OCI_INTER_MONTH_BELOW_VALID   0x8 /*Bad MOnth Low/high bit (1=low) */
-#define   OCI_INTER_INVALID_YEAR        0x10                     /* Bad YeaR */
-#define   OCI_INTER_YEAR_BELOW_VALID    0x20 /*Bad YeaR Low/high bit (1=low) */
-#define   OCI_INTER_INVALID_HOUR        0x40                     /* Bad HouR */
-#define   OCI_INTER_HOUR_BELOW_VALID    0x80 /*Bad HouR Low/high bit (1=low) */
-#define   OCI_INTER_INVALID_MINUTE      0x100                  /* Bad MiNute */
-#define   OCI_INTER_MINUTE_BELOW_VALID  0x200 
-                                            /*Bad MiNute Low/high bit(1=low) */
-#define   OCI_INTER_INVALID_SECOND      0x400                  /* Bad SeCond */
-#define   OCI_INTER_SECOND_BELOW_VALID  0x800   
-                                            /*bad second Low/high bit(1=low) */
-#define   OCI_INTER_INVALID_FRACSEC     0x1000      /* Bad Fractional second */
-#define   OCI_INTER_FRACSEC_BELOW_VALID 0x2000  
-                                           /* Bad fractional second Low/High */
-
-
-/*------------------------Parsing Syntax Types-------------------------------*/
-#define OCI_V7_SYNTAX 2       /* V815 language - for backwards compatibility */
-#define OCI_V8_SYNTAX 3       /* V815 language - for backwards compatibility */
-#define OCI_NTV_SYNTAX 1    /* Use what so ever is the native lang of server */
-                     /* these values must match the values defined in kpul.h */
-/*---------------------------------------------------------------------------*/
-
-/*------------------------Scrollable Cursor Fetch Options------------------- 
- * For non-scrollable cursor, the only valid (and default) orientation is 
- * OCI_FETCH_NEXT
- */
-#define OCI_FETCH_CURRENT 0x01               /* refetching current position  */
-#define OCI_FETCH_NEXT 0x02                                      /* next row */
-#define OCI_FETCH_FIRST 0x04                  /* first row of the result set */
-#define OCI_FETCH_LAST 0x08                /* the last row of the result set */
-#define OCI_FETCH_PRIOR 0x10         /* the previous row relative to current */
-#define OCI_FETCH_ABSOLUTE 0x20                /* absolute offset from first */
-#define OCI_FETCH_RELATIVE 0x40                /* offset relative to current */
-#define OCI_FETCH_RESERVED_1 0x80                                /* reserved */
-
-/*---------------------------------------------------------------------------*/
-
-/*------------------------Bind and Define Options----------------------------*/
-#define OCI_SB2_IND_PTR       0x00000001                           /* unused */
-#define OCI_DATA_AT_EXEC      0x00000002             /* data at execute time */
-#define OCI_DYNAMIC_FETCH     0x00000002                /* fetch dynamically */
-#define OCI_PIECEWISE         0x00000004          /* piecewise DMLs or fetch */
-#define OCI_DEFINE_RESERVED_1 0x00000008                         /* reserved */
-#define OCI_BIND_RESERVED_2   0x00000010                         /* reserved */
-#define OCI_DEFINE_RESERVED_2 0x00000020                         /* reserved */
-#define OCI_BIND_SOFT         0x00000040              /* soft bind or define */
-#define OCI_DEFINE_SOFT       0x00000080              /* soft bind or define */
-/*---------------------------------------------------------------------------*/
-
-/*-----------------------------  Various Modes ------------------------------*/
-#define OCI_DEFAULT         0x00000000 
-                          /* the default value for parameters and attributes */
-/*-------------OCIInitialize Modes / OCICreateEnvironment Modes -------------*/
-#define OCI_THREADED        0x00000001      /* appl. in threaded environment */
-#define OCI_OBJECT          0x00000002  /* application in object environment */
-#define OCI_EVENTS          0x00000004  /* application is enabled for events */
-#define OCI_RESERVED1       0x00000008                           /* reserved */
-#define OCI_SHARED          0x00000010  /* the application is in shared mode */
-#define OCI_RESERVED2       0x00000020                           /* reserved */
-/* The following *TWO* are only valid for OCICreateEnvironment call */
-#define OCI_NO_UCB          0x00000040 /* No user callback called during ini */
-#define OCI_NO_MUTEX        0x00000080 /* the environment handle will not be */
-                                         /*  protected by a mutex internally */
-#define OCI_SHARED_EXT      0x00000100              /* Used for shared forms */
-/************************** 0x00000200 free **********************************/
-#define OCI_ALWAYS_BLOCKING 0x00000400    /* all connections always blocking */
-/************************** 0x00000800 free **********************************/
-#define OCI_USE_LDAP        0x00001000            /* allow  LDAP connections */
-#define OCI_REG_LDAPONLY    0x00002000              /* only register to LDAP */
-#define OCI_UTF16           0x00004000        /* mode for all UTF16 metadata */
-#define OCI_AFC_PAD_ON      0x00008000 
-                             /* turn on AFC blank padding when rlenp present */
-#define OCI_ENVCR_RESERVED3 0x00010000                           /* reserved */
-#define OCI_NEW_LENGTH_SEMANTICS  0x00020000   /* adopt new length semantics */
-       /* the new length semantics, always bytes, is used by OCIEnvNlsCreate */
-#define OCI_NO_MUTEX_STMT   0x00040000           /* Do not mutex stmt handle */
-#define OCI_MUTEX_ENV_ONLY  0x00080000  /* Mutex only the environment handle */
-#define OCI_STM_RESERVED4   0x00100000                           /* reserved */
-
-/*---------------------------------------------------------------------------*/
-/*------------------------OCIConnectionpoolCreate Modes----------------------*/
-
-#define OCI_CPOOL_REINITIALIZE 0x111
-
-/*---------------------------------------------------------------------------*/
-/*--------------------------------- OCILogon2 Modes -------------------------*/
-
-#define OCI_LOGON2_SPOOL       0x0001     /* Use session pool */
-#define OCI_LOGON2_CPOOL       OCI_CPOOL  /* Use connection pool */
-#define OCI_LOGON2_STMTCACHE   0x0004     /* Use Stmt Caching */
-#define OCI_LOGON2_PROXY       0x0008     /* Proxy authentiaction */
-
-/*---------------------------------------------------------------------------*/
-/*------------------------- OCISessionPoolCreate Modes ----------------------*/
-
-#define OCI_SPC_REINITIALIZE 0x0001   /* Reinitialize the session pool */
-#define OCI_SPC_HOMOGENEOUS  0x0002   /* Session pool is homogeneneous */
-#define OCI_SPC_STMTCACHE    0x0004   /* Session pool has stmt cache */
-
-/*---------------------------------------------------------------------------*/
-/*--------------------------- OCISessionGet Modes ---------------------------*/
-
-#define OCI_SESSGET_SPOOL      0x0001     /* SessionGet called in SPOOL mode */
-#define OCI_SESSGET_CPOOL      OCI_CPOOL  /* SessionGet called in CPOOL mode */
-#define OCI_SESSGET_STMTCACHE  0x0004                 /* Use statement cache */
-#define OCI_SESSGET_CREDPROXY  0x0008     /* SessionGet called in proxy mode */
-#define OCI_SESSGET_CREDEXT    0x0010     
-#define OCI_SESSGET_SPOOL_MATCHANY 0x0020
-/*---------------------------------------------------------------------------*/
-/*------------------------ATTR Values for Session Pool-----------------------*/
-/* Attribute values for OCI_ATTR_SPOOL_GETMODE */
-#define OCI_SPOOL_ATTRVAL_WAIT     0         /* block till you get a session */
-#define OCI_SPOOL_ATTRVAL_NOWAIT   1    /* error out if no session avaliable */
-#define OCI_SPOOL_ATTRVAL_FORCEGET 2  /* get session even if max is exceeded */
-
-/*---------------------------------------------------------------------------*/
-/*--------------------------- OCISessionRelease Modes -----------------------*/
-
-#define OCI_SESSRLS_DROPSESS 0x0001                    /* Drop the Session */
-#define OCI_SESSRLS_RETAG    0x0002                   /* Retag the session */
-
-/*---------------------------------------------------------------------------*/
-/*----------------------- OCISessionPoolDestroy Modes -----------------------*/
-
-#define OCI_SPD_FORCE        0x0001       /* Force the sessions to terminate. 
-                                             Even if there are some busy 
-                                             sessions close them */
- 
-/*---------------------------------------------------------------------------*/
-/*----------------------------- Statement States ----------------------------*/
-
-#define OCI_STMT_STATE_INITIALIZED  0x0001
-#define OCI_STMT_STATE_EXECUTED     0x0002
-#define OCI_STMT_STATE_END_OF_FETCH 0x0003
-
-/*---------------------------------------------------------------------------*/
-
-/*----------------------------- OCIMemStats Modes ---------------------------*/
-#define OCI_MEM_INIT        0x01 
-#define OCI_MEM_CLN         0x02 
-#define OCI_MEM_FLUSH       0x04 
-#define OCI_DUMP_HEAP       0x80
-
-#define OCI_CLIENT_STATS    0x10 
-#define OCI_SERVER_STATS    0x20 
-
-/*----------------------------- OCIEnvInit Modes ----------------------------*/
-/* NOTE: NO NEW MODES SHOULD BE ADDED HERE BECAUSE THE RECOMMENDED METHOD 
- * IS TO USE THE NEW OCICreateEnvironment MODES.
- */
-#define OCI_ENV_NO_UCB 0x01         /* A user callback will not be called in
-                                       OCIEnvInit() */
-#define OCI_ENV_NO_MUTEX 0x08 /* the environment handle will not be protected
-                                 by a mutex internally */
-
-/*---------------------------------------------------------------------------*/
-
-/*------------------------ Prepare Modes ------------------------------------*/
-#define OCI_NO_SHARING        0x01      /* turn off statement handle sharing */
-#define OCI_PREP_RESERVED_1   0x02                               /* reserved */
-#define OCI_PREP_AFC_PAD_ON   0x04          /* turn on blank padding for AFC */
-#define OCI_PREP_AFC_PAD_OFF  0x08         /* turn off blank padding for AFC */
-/*---------------------------------------------------------------------------*/
-
-/*---------------------------------------------------------------------------*/
-
-/*----------------------- Execution Modes -----------------------------------*/
-#define OCI_BATCH_MODE        0x01  /* batch the oci statement for execution */
-#define OCI_EXACT_FETCH       0x02         /* fetch the exact rows specified */
-#define OCI_KEEP_FETCH_STATE  0x04                                 /* unused */
-#define OCI_STMT_SCROLLABLE_READONLY 0x08     /* if result set is scrollable */
-#define OCI_DESCRIBE_ONLY     0x10            /* only describe the statement */
-#define OCI_COMMIT_ON_SUCCESS 0x20        /* commit, if successful execution */
-#define OCI_NON_BLOCKING      0x40                           /* non-blocking */
-#define OCI_BATCH_ERRORS      0x80             /* batch errors in array dmls */
-#define OCI_PARSE_ONLY        0x100              /* only parse the statement */
-#define OCI_EXACT_FETCH_RESERVED_1 0x200                         /* reserved */
-#define OCI_SHOW_DML_WARNINGS 0x400   
-         /* return OCI_SUCCESS_WITH_INFO for delete/update w/no where clause */
-#define OCI_EXEC_RESERVED_2   0x800                              /* reserved */
-#define OCI_DESC_RESERVED_1   0x1000                             /* reserved */
-#define OCI_EXEC_RESERVED_3   0x2000                             /* reserved */
-#define OCI_EXEC_RESERVED_4   0x4000                             /* reserved */  
-
-/*---------------------------------------------------------------------------*/
-
-/*------------------------Authentication Modes-------------------------------*/
-#define OCI_MIGRATE         0x0001                /* migratable auth context */
-#define OCI_SYSDBA          0x0002               /* for SYSDBA authorization */
-#define OCI_SYSOPER         0x0004              /* for SYSOPER authorization */
-#define OCI_PRELIM_AUTH     0x0008          /* for preliminary authorization */
-#define OCIP_ICACHE         0x0010 /* Private OCI cache mode to notify cache */
-#define OCI_AUTH_RESERVED_1 0x0020                               /* reserved */
-#define OCI_STMT_CACHE      0x0040                /* enable OCI Stmt Caching */
-
-/*---------------------------------------------------------------------------*/
-
-/*------------------------Session End Modes----------------------------------*/
-#define OCI_SESSEND_RESERVED_1 0x0001                            /* reserved */
-/*---------------------------------------------------------------------------*/
-
-/*------------------------Attach Modes---------------------------------------*/
-
-/* The following attach modes are the same as the UPI modes defined in 
- * UPIDEF.H.  Do not use these values externally.
- */
-
-#define OCI_FASTPATH         0x0010              /* Attach in fast path mode */
-#define OCI_ATCH_RESERVED_1  0x0020                              /* reserved */
-#define OCI_ATCH_RESERVED_2  0x0080                              /* reserved */
-#define OCI_ATCH_RESERVED_3  0x0100                              /* reserved */
-#define OCI_CPOOL            0x0200  /* Attach using server handle from pool */
-#define OCI_ATCH_RESERVED_4  0x0400                              /* reserved */
-
-/*---------------------OCIStmtPrepare2 Modes---------------------------------*/
-#define OCI_PREP2_CACHE_SEARCHONLY    0x0010                  /* ONly Search */
-#define OCI_PREP2_GET_PLSQL_WARNINGS  0x0020         /* Get PL/SQL warnings  */
-
-/*---------------------OCIStmtRelease Modes----------------------------------*/
-#define OCI_STRLS_CACHE_DELETE      0x0010              /* Delete from Cache */
-
-/*-----------------------------End Various Modes ----------------------------*/
-
-/*------------------------Piece Information----------------------------------*/
-#define OCI_PARAM_IN 0x01                                    /* in parameter */
-#define OCI_PARAM_OUT 0x02                                  /* out parameter */
-/*---------------------------------------------------------------------------*/
-
-/*------------------------ Transaction Start Flags --------------------------*/
-/* NOTE: OCI_TRANS_JOIN and OCI_TRANS_NOMIGRATE not supported in 8.0.X       */
-#define OCI_TRANS_NEW          0x00000001 /* starts a new transaction branch */
-#define OCI_TRANS_JOIN         0x00000002    /* join an existing transaction */
-#define OCI_TRANS_RESUME       0x00000004         /* resume this transaction */
-#define OCI_TRANS_STARTMASK    0x000000ff
-
-#define OCI_TRANS_READONLY     0x00000100   /* starts a readonly transaction */
-#define OCI_TRANS_READWRITE    0x00000200 /* starts a read-write transaction */
-#define OCI_TRANS_SERIALIZABLE 0x00000400
-                                        /* starts a serializable transaction */
-#define OCI_TRANS_ISOLMASK     0x0000ff00
-
-#define OCI_TRANS_LOOSE        0x00010000        /* a loosely coupled branch */
-#define OCI_TRANS_TIGHT        0x00020000        /* a tightly coupled branch */
-#define OCI_TRANS_TYPEMASK     0x000f0000
-
-#define OCI_TRANS_NOMIGRATE    0x00100000      /* non migratable transaction */
-#define OCI_TRANS_SEPARABLE    0x00200000  /* separable transaction (8.1.6+) */
-
-
-/*---------------------------------------------------------------------------*/
-
-/*------------------------ Transaction End Flags ----------------------------*/
-#define OCI_TRANS_TWOPHASE      0x01000000           /* use two phase commit */
-/*---------------------------------------------------------------------------*/
-
-/*------------------------- AQ Constants ------------------------------------
- * NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE
- * The following constants must match the PL/SQL dbms_aq constants
- * NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE
- */
-/* ------------------------- Visibility flags -------------------------------*/
-#define OCI_ENQ_IMMEDIATE       1   /* enqueue is an independent transaction */
-#define OCI_ENQ_ON_COMMIT       2  /* enqueue is part of current transaction */
-
-/* ----------------------- Dequeue mode flags -------------------------------*/
-#define OCI_DEQ_BROWSE          1   /* read message without acquiring a lock */
-#define OCI_DEQ_LOCKED          2   /* read and obtain write lock on message */
-#define OCI_DEQ_REMOVE          3          /* read the message and delete it */
-#define OCI_DEQ_REMOVE_NODATA   4    /* delete message w'o returning payload */
-#define OCI_DEQ_GETSIG          5                      /* get signature only */
-
-/* ----------------- Dequeue navigation flags -------------------------------*/
-#define OCI_DEQ_FIRST_MSG        1     /* get first message at head of queue */
-#define OCI_DEQ_NEXT_MSG         3         /* next message that is available */
-#define OCI_DEQ_NEXT_TRANSACTION 2    /* get first message of next txn group */
-#define OCI_DEQ_MULT_TRANSACTION 5        /* array dequeue across txn groups */
-
-/* ----------------- Dequeue Option Reserved flags ------------------------- */
-#define OCI_DEQ_RESERVED_1      0x000001
-
-/* --------------------- Message states -------------------------------------*/
-#define OCI_MSG_WAITING         1 /* the message delay has not yet completed */
-#define OCI_MSG_READY           0    /* the message is ready to be processed */
-#define OCI_MSG_PROCESSED       2          /* the message has been processed */
-#define OCI_MSG_EXPIRED         3    /* message has moved to exception queue */
-
-/* --------------------- Sequence deviation ---------------------------------*/
-#define OCI_ENQ_BEFORE          2  /* enqueue message before another message */
-#define OCI_ENQ_TOP             3     /* enqueue message before all messages */
-
-/* ------------------------- Visibility flags -------------------------------*/
-#define OCI_DEQ_IMMEDIATE       1   /* dequeue is an independent transaction */
-#define OCI_DEQ_ON_COMMIT       2  /* dequeue is part of current transaction */
-
-/* ------------------------ Wait --------------------------------------------*/
-#define OCI_DEQ_WAIT_FOREVER    -1   /* wait forever if no message available */
-#define OCI_DEQ_NO_WAIT         0  /* do not wait if no message is available */
-
-/* ------------------------ Delay -------------------------------------------*/
-#define OCI_MSG_NO_DELAY        0        /* message is available immediately */
-
-/* ------------------------- Expiration -------------------------------------*/
-#define OCI_MSG_NO_EXPIRATION -1                /* message will never expire */
-
-/* ------------------------- Reserved ---------------------------------------*/
-#define OCI_AQ_RESERVED_1      0x0002
-#define OCI_AQ_RESERVED_2      0x0004
-#define OCI_AQ_RESERVED_3      0x0008
-
-/* -------------------------- END AQ Constants ----------------------------- */
-
-/* --------------------END DateTime and Interval Constants ------------------*/
-
-/*-----------------------Object Types----------------------------------------*/
-/*-----------Object Types **** Not to be Used **** --------------------------*/
-/* Deprecated */
-#define OCI_OTYPE_UNK           0
-#define OCI_OTYPE_TABLE         1
-#define OCI_OTYPE_VIEW          2
-#define OCI_OTYPE_SYN           3
-#define OCI_OTYPE_PROC          4
-#define OCI_OTYPE_FUNC          5
-#define OCI_OTYPE_PKG           6
-#define OCI_OTYPE_STMT          7
-/*---------------------------------------------------------------------------*/
-
-/*=======================Describe Handle Parameter Attributes ===============*/
-/* 
-   These attributes are orthogonal to the other set of attributes defined 
-   above.  These attrubutes are tobe used only for the desscribe handle 
-*/
-/*===========================================================================*/
-/* Attributes common to Columns and Stored Procs */
-#define OCI_ATTR_DATA_SIZE      1                /* maximum size of the data */
-#define OCI_ATTR_DATA_TYPE      2     /* the SQL type of the column/argument */
-#define OCI_ATTR_DISP_SIZE      3                        /* the display size */
-#define OCI_ATTR_NAME           4         /* the name of the column/argument */
-#define OCI_ATTR_PRECISION      5                /* precision if number type */
-#define OCI_ATTR_SCALE          6                    /* scale if number type */
-#define OCI_ATTR_IS_NULL        7                            /* is it null ? */
-#define OCI_ATTR_TYPE_NAME      8
-  /* name of the named data type or a package name for package private types */
-#define OCI_ATTR_SCHEMA_NAME    9             /* the schema name */
-#define OCI_ATTR_SUB_NAME       10      /* type name if package private type */
-#define OCI_ATTR_POSITION       11
-                    /* relative position of col/arg in the list of cols/args */
-/* complex object retrieval parameter attributes */
-#define OCI_ATTR_COMPLEXOBJECTCOMP_TYPE         50 
-#define OCI_ATTR_COMPLEXOBJECTCOMP_TYPE_LEVEL   51
-#define OCI_ATTR_COMPLEXOBJECT_LEVEL            52
-#define OCI_ATTR_COMPLEXOBJECT_COLL_OUTOFLINE   53
-
-/* Only Columns */
-#define OCI_ATTR_DISP_NAME      100                      /* the display name */
-
-/*Only Stored Procs */
-#define OCI_ATTR_OVERLOAD       210           /* is this position overloaded */
-#define OCI_ATTR_LEVEL          211            /* level for structured types */
-#define OCI_ATTR_HAS_DEFAULT    212                   /* has a default value */
-#define OCI_ATTR_IOMODE         213                         /* in, out inout */
-#define OCI_ATTR_RADIX          214                       /* returns a radix */
-#define OCI_ATTR_NUM_ARGS       215             /* total number of arguments */
-
-/* only named type attributes */
-#define OCI_ATTR_TYPECODE                  216       /* object or collection */
-#define OCI_ATTR_COLLECTION_TYPECODE       217     /* varray or nested table */
-#define OCI_ATTR_VERSION                   218      /* user assigned version */
-#define OCI_ATTR_IS_INCOMPLETE_TYPE        219 /* is this an incomplete type */
-#define OCI_ATTR_IS_SYSTEM_TYPE            220              /* a system type */
-#define OCI_ATTR_IS_PREDEFINED_TYPE        221          /* a predefined type */
-#define OCI_ATTR_IS_TRANSIENT_TYPE         222           /* a transient type */
-#define OCI_ATTR_IS_SYSTEM_GENERATED_TYPE  223      /* system generated type */
-#define OCI_ATTR_HAS_NESTED_TABLE          224 /* contains nested table attr */
-#define OCI_ATTR_HAS_LOB                   225        /* has a lob attribute */
-#define OCI_ATTR_HAS_FILE                  226       /* has a file attribute */
-#define OCI_ATTR_COLLECTION_ELEMENT        227 /* has a collection attribute */
-#define OCI_ATTR_NUM_TYPE_ATTRS            228  /* number of attribute types */
-#define OCI_ATTR_LIST_TYPE_ATTRS           229    /* list of type attributes */
-#define OCI_ATTR_NUM_TYPE_METHODS          230     /* number of type methods */
-#define OCI_ATTR_LIST_TYPE_METHODS         231       /* list of type methods */
-#define OCI_ATTR_MAP_METHOD                232         /* map method of type */
-#define OCI_ATTR_ORDER_METHOD              233       /* order method of type */
-
-/* only collection element */
-#define OCI_ATTR_NUM_ELEMS                 234         /* number of elements */
-
-/* only type methods */
-#define OCI_ATTR_ENCAPSULATION             235        /* encapsulation level */
-#define OCI_ATTR_IS_SELFISH                236             /* method selfish */
-#define OCI_ATTR_IS_VIRTUAL                237                    /* virtual */
-#define OCI_ATTR_IS_INLINE                 238                     /* inline */
-#define OCI_ATTR_IS_CONSTANT               239                   /* constant */
-#define OCI_ATTR_HAS_RESULT                240                 /* has result */
-#define OCI_ATTR_IS_CONSTRUCTOR            241                /* constructor */
-#define OCI_ATTR_IS_DESTRUCTOR             242                 /* destructor */
-#define OCI_ATTR_IS_OPERATOR               243                   /* operator */
-#define OCI_ATTR_IS_MAP                    244               /* a map method */
-#define OCI_ATTR_IS_ORDER                  245               /* order method */
-#define OCI_ATTR_IS_RNDS                   246  /* read no data state method */
-#define OCI_ATTR_IS_RNPS                   247      /* read no process state */
-#define OCI_ATTR_IS_WNDS                   248 /* write no data state method */
-#define OCI_ATTR_IS_WNPS                   249     /* write no process state */
-
-#define OCI_ATTR_DESC_PUBLIC               250              /* public object */
-
-/* Object Cache Enhancements : attributes for User Constructed Instances     */
-#define OCI_ATTR_CACHE_CLIENT_CONTEXT      251
-#define OCI_ATTR_UCI_CONSTRUCT             252
-#define OCI_ATTR_UCI_DESTRUCT              253
-#define OCI_ATTR_UCI_COPY                  254
-#define OCI_ATTR_UCI_PICKLE                255
-#define OCI_ATTR_UCI_UNPICKLE              256
-#define OCI_ATTR_UCI_REFRESH               257
-
-/* for type inheritance */
-#define OCI_ATTR_IS_SUBTYPE                258
-#define OCI_ATTR_SUPERTYPE_SCHEMA_NAME     259
-#define OCI_ATTR_SUPERTYPE_NAME            260
-
-/* for schemas */
-#define OCI_ATTR_LIST_OBJECTS              261  /* list of objects in schema */
-
-/* for database */
-#define OCI_ATTR_NCHARSET_ID               262                /* char set id */
-#define OCI_ATTR_LIST_SCHEMAS              263            /* list of schemas */
-#define OCI_ATTR_MAX_PROC_LEN              264       /* max procedure length */
-#define OCI_ATTR_MAX_COLUMN_LEN            265     /* max column name length */
-#define OCI_ATTR_CURSOR_COMMIT_BEHAVIOR    266     /* cursor commit behavior */
-#define OCI_ATTR_MAX_CATALOG_NAMELEN       267         /* catalog namelength */
-#define OCI_ATTR_CATALOG_LOCATION          268           /* catalog location */
-#define OCI_ATTR_SAVEPOINT_SUPPORT         269          /* savepoint support */
-#define OCI_ATTR_NOWAIT_SUPPORT            270             /* nowait support */
-#define OCI_ATTR_AUTOCOMMIT_DDL            271             /* autocommit DDL */
-#define OCI_ATTR_LOCKING_MODE              272               /* locking mode */
-
-/* for externally initialized context */
-#define OCI_ATTR_APPCTX_SIZE               273 /* count of context to be init*/
-#define OCI_ATTR_APPCTX_LIST               274 /* count of context to be init*/
-#define OCI_ATTR_APPCTX_NAME               275 /* name  of context to be init*/
-#define OCI_ATTR_APPCTX_ATTR               276 /* attr  of context to be init*/
-#define OCI_ATTR_APPCTX_VALUE              277 /* value of context to be init*/
-
-/* for client id propagation */
-#define OCI_ATTR_CLIENT_IDENTIFIER         278   /* value of client id to set*/
-
-/* for inheritance - part 2 */
-#define OCI_ATTR_IS_FINAL_TYPE             279            /* is final type ? */
-#define OCI_ATTR_IS_INSTANTIABLE_TYPE      280     /* is instantiable type ? */
-#define OCI_ATTR_IS_FINAL_METHOD           281          /* is final method ? */
-#define OCI_ATTR_IS_INSTANTIABLE_METHOD    282   /* is instantiable method ? */
-#define OCI_ATTR_IS_OVERRIDING_METHOD      283     /* is overriding method ? */
-
-/* slot 284 available */
-
-#define OCI_ATTR_CHAR_USED                 285      /* char length semantics */
-#define OCI_ATTR_CHAR_SIZE                 286                /* char length */
-
-/* SQLJ support */
-#define OCI_ATTR_IS_JAVA_TYPE              287 /* is java implemented type ? */
-
-/* N-Tier support */
-#define OCI_ATTR_DISTINGUISHED_NAME        300        /* use DN as user name */
-#define OCI_ATTR_KERBEROS_TICKET           301   /* Kerberos ticket as cred. */
- 
-/* for multilanguage debugging */
-#define OCI_ATTR_ORA_DEBUG_JDWP            302   /* ORA_DEBUG_JDWP attribute */
-
-#define OCI_ATTR_RESERVED_14               303                   /* reserved */
-
-
-/*---------------------------End Describe Handle Attributes -----------------*/
-
-/*------------- Supported Values for Direct Path Date cache -----------------*/
-#define OCI_ATTR_DIRPATH_DCACHE_NUM        303         /* date cache entries */
-#define OCI_ATTR_DIRPATH_DCACHE_SIZE       304           /* date cache limit */
-#define OCI_ATTR_DIRPATH_DCACHE_MISSES     305          /* date cache misses */
-#define OCI_ATTR_DIRPATH_DCACHE_HITS       306            /* date cache hits */
-#define OCI_ATTR_DIRPATH_DCACHE_DISABLE    307 /* on set: disable datecache 
-                                                * on overflow.
-                                                * on get: datecache disabled? 
-                                                * could be due to overflow
-                                                * or others                  */
-
-/* ----------------------- Session Pool Attributes ------------------------- */
-#define OCI_ATTR_SPOOL_TIMEOUT              308           /* session timeout */
-#define OCI_ATTR_SPOOL_GETMODE              309          /* session get mode */
-#define OCI_ATTR_SPOOL_BUSY_COUNT           310        /* busy session count */
-#define OCI_ATTR_SPOOL_OPEN_COUNT           311        /* open session count */
-#define OCI_ATTR_SPOOL_MIN                  312         /* min session count */
-#define OCI_ATTR_SPOOL_MAX                  313         /* max session count */
-#define OCI_ATTR_SPOOL_INCR                 314   /* session increment count */
-#define OCI_ATTR_SPOOL_STMTCACHESIZE        208   /*Stmt cache size of pool  */
-/*------------------------------End Session Pool Attributes -----------------*/
-/*---------------------------- For XML Types ------------------------------- */
-/* For table, view and column */
-#define OCI_ATTR_IS_XMLTYPE          315         /* Is the type an XML type? */
-#define OCI_ATTR_XMLSCHEMA_NAME      316               /* Name of XML Schema */
-#define OCI_ATTR_XMLELEMENT_NAME     317              /* Name of XML Element */
-#define OCI_ATTR_XMLSQLTYPSCH_NAME   318    /* SQL type's schema for XML Ele */
-#define OCI_ATTR_XMLSQLTYPE_NAME     319     /* Name of SQL type for XML Ele */
-#define OCI_ATTR_XMLTYPE_STORED_OBJ  320       /* XML type stored as object? */
-
-/*---------------------------- For Subtypes ------------------------------- */
-/* For type */
-#define OCI_ATTR_HAS_SUBTYPES        321                    /* Has subtypes? */
-#define OCI_ATTR_NUM_SUBTYPES        322               /* Number of subtypes */
-#define OCI_ATTR_LIST_SUBTYPES       323                 /* List of subtypes */
-
-/* XML flag */
-#define OCI_ATTR_XML_HRCHY_ENABLED   324               /* hierarchy enabled? */
-
-/* Method flag */
-#define OCI_ATTR_IS_OVERRIDDEN_METHOD 325           /* Method is overridden? */
-
-/*------------- Attributes for 10i Updates to the DirPath API ---------------*/
-#define OCI_ATTR_DIRPATH_RESERVED_7         326                 /* reserved */
-#define OCI_ATTR_DIRPATH_RESERVED_8         327                 /* reserved */
-#define OCI_ATTR_DIRPATH_CONVERT            328 /* stream conversion needed? */
-#define OCI_ATTR_DIRPATH_BADROW             329        /* info about bad row */
-#define OCI_ATTR_DIRPATH_BADROW_LENGTH      330    /* length of bad row info */
-#define OCI_ATTR_DIRPATH_WRITE_ORDER        331         /* column fill order */
-#define OCI_ATTR_DIRPATH_GRANULE_SIZE       332   /* granule size for unload */
-#define OCI_ATTR_DIRPATH_GRANULE_OFFSET     333    /* offset to last granule */
-#define OCI_ATTR_DIRPATH_RESERVED_1         334                  /* reserved */
-#define OCI_ATTR_DIRPATH_RESERVED_2         335                  /* reserved */
-
-/*------------- Attributes for 10i Distributed Objects ----------------------*/
-#define OCI_ATTR_OBJ_SUBS                   336 /* obj col/tab substitutable */
-
-/*------ Attributes for 10i DirPathAPI conversion (NLS lang, terr, cs) ------*/
-#define OCI_ATTR_DIRPATH_RESERVED_3         337                  /* reserved */
-#define OCI_ATTR_DIRPATH_RESERVED_4         338                  /* reserved */
-
-
-/*---------- Attributes for 10i XADFIELD (NLS language, territory -----------*/
-#define OCI_ATTR_XADFIELD_RESERVED_1        339                  /* reserved */
-#define OCI_ATTR_XADFIELD_RESERVED_2        340                  /* reserved */
-/*------------- Kerberos Secure Client Identifier ---------------------------*/
-#define OCI_ATTR_KERBEROS_CID               341 /* Kerberos db service ticket*/
-
-
-/*------------------------ Attributes for Rules objects ---------------------*/
-#define OCI_ATTR_CONDITION                  342            /* rule condition */
-#define OCI_ATTR_COMMENT                    343                   /* comment */
-#define OCI_ATTR_VALUE                      344             /* Anydata value */
-#define OCI_ATTR_EVAL_CONTEXT_OWNER         345        /* eval context owner */
-#define OCI_ATTR_EVAL_CONTEXT_NAME          346         /* eval context name */
-#define OCI_ATTR_EVALUATION_FUNCTION        347        /* eval function name */
-#define OCI_ATTR_VAR_TYPE                   348             /* variable type */
-#define OCI_ATTR_VAR_VALUE_FUNCTION         349   /* variable value function */
-#define OCI_ATTR_VAR_METHOD_FUNCTION        350  /* variable method function */
-#define OCI_ATTR_ACTION_CONTEXT             351            /* action context */
-#define OCI_ATTR_LIST_TABLE_ALIASES         352     /* list of table aliases */
-#define OCI_ATTR_LIST_VARIABLE_TYPES        353    /* list of variable types */
-#define OCI_ATTR_TABLE_NAME                 356                /* table name */
-
-#define OCI_ATTR_DIRPATH_RESERVED_5         357                  /* reserved */
-#define OCI_ATTR_DIRPATH_RESERVED_6         358                  /* reserved */
-
-#define OCI_ATTR_DIRPATH_LOCK_WAIT          359    /* wait for lock in dpapi */
-
-#define OCI_ATTR_MESSAGE_CSCN               360              /* message cscn */
-#define OCI_ATTR_MESSAGE_DSCN               361              /* message dscn */
-
-/*--------------------- Audit Session ID ------------------------------------*/
-#define OCI_ATTR_AUDIT_SESSION_ID           362          /* Audit session ID */
-
-/*--------------------- Kerberos TGT Keys -----------------------------------*/
-#define OCI_ATTR_KERBEROS_KEY               363  /* n-tier Kerberos cred key */
-#define OCI_ATTR_KERBEROS_CID_KEY           364    /* SCID Kerberos cred key */
-
-
-#define OCI_ATTR_TRANSACTION_NO             365         /* AQ enq txn number */
-
-/*----------------------- Attributes for End To End Tracing -----------------*/
-#define OCI_ATTR_MODULE                     366        /* module for tracing */
-#define OCI_ATTR_ACTION                     367        /* action for tracing */
-#define OCI_ATTR_CLIENT_INFO                368               /* client info */
-#define OCI_ATTR_COLLECT_CALL_TIME          369         /* collect call time */
-#define OCI_ATTR_CALL_TIME                  370         /* extract call time */
-#define OCI_ATTR_ECONTEXT_ID                371      /* execution-id context */
-#define OCI_ATTR_ECONTEXT_SEQ               372  /*execution-id sequence num */
-
-
-/*---------------- Describe Handle Parameter Attribute Values ---------------*/
-
-/* OCI_ATTR_CURSOR_COMMIT_BEHAVIOR */
-#define OCI_CURSOR_OPEN   0 
-#define OCI_CURSOR_CLOSED 1
-
-/* OCI_ATTR_CATALOG_LOCATION */
-#define OCI_CL_START 0
-#define OCI_CL_END   1
-
-/* OCI_ATTR_SAVEPOINT_SUPPORT */
-#define OCI_SP_SUPPORTED   0
-#define OCI_SP_UNSUPPORTED 1
-
-/* OCI_ATTR_NOWAIT_SUPPORT */
-#define OCI_NW_SUPPORTED   0
-#define OCI_NW_UNSUPPORTED 1
-
-/* OCI_ATTR_AUTOCOMMIT_DDL */
-#define OCI_AC_DDL    0
-#define OCI_NO_AC_DDL 1
-
-/* OCI_ATTR_LOCKING_MODE */
-#define OCI_LOCK_IMMEDIATE 0
-#define OCI_LOCK_DELAYED   1
-
-/* ------------------- Instance type attribute values -----------------------*/
-#define OCI_INSTANCE_TYPE_UNKNOWN  0
-#define OCI_INSTANCE_TYPE_RDBMS    1
-#define OCI_INSTANCE_TYPE_OSM      2
-
-/*---------------------------------------------------------------------------*/
-
-/*---------------------------OCIPasswordChange-------------------------------*/
-#define OCI_AUTH         0x08        /* Change the password but do not login */
-
-
-/*------------------------Other Constants------------------------------------*/
-#define OCI_MAX_FNS   100                     /* max number of OCI Functions */
-#define OCI_SQLSTATE_SIZE 5  
-#define OCI_ERROR_MAXMSG_SIZE   1024         /* max size of an error message */
-#define OCI_LOBMAXSIZE MINUB4MAXVAL                 /* maximum lob data size */
-#define OCI_ROWID_LEN             23 
-/*---------------------------------------------------------------------------*/
-
-/*------------------------ Fail Over Events ---------------------------------*/
-#define OCI_FO_END          0x00000001
-#define OCI_FO_ABORT        0x00000002   
-#define OCI_FO_REAUTH       0x00000004
-#define OCI_FO_BEGIN        0x00000008 
-#define OCI_FO_ERROR        0x00000010
-/*---------------------------------------------------------------------------*/
-
-/*------------------------ Fail Over Callback Return Codes ------------------*/
-#define OCI_FO_RETRY        25410
-/*---------------------------------------------------------------------------*/
-
-/*------------------------- Fail Over Types ---------------------------------*/
-#define OCI_FO_NONE           0x00000001
-#define OCI_FO_SESSION        0x00000002
-#define OCI_FO_SELECT         0x00000004
-#define OCI_FO_TXNAL          0x00000008
-/*---------------------------------------------------------------------------*/
-
-/*-----------------------Function Codes--------------------------------------*/
-#define OCI_FNCODE_INITIALIZE     1                         /* OCIInitialize */
-#define OCI_FNCODE_HANDLEALLOC  2                          /* OCIHandleAlloc */
-#define OCI_FNCODE_HANDLEFREE  3                            /* OCIHandleFree */
-#define OCI_FNCODE_DESCRIPTORALLOC  4                  /* OCIDescriptorAlloc */
-#define OCI_FNCODE_DESCRIPTORFREE  5                    /* OCIDescriptorFree */
-#define OCI_FNCODE_ENVINIT   6                                 /* OCIEnvInit */
-#define OCI_FNCODE_SERVERATTACH   7                       /* OCIServerAttach */
-#define OCI_FNCODE_SERVERDETACH   8                       /* OCIServerDetach */
-/* unused         9 */ 
-#define OCI_FNCODE_SESSIONBEGIN  10                       /* OCISessionBegin */
-#define OCI_FNCODE_SESSIONEND   11                          /* OCISessionEnd */
-#define OCI_FNCODE_PASSWORDCHANGE   12                  /* OCIPasswordChange */
-#define OCI_FNCODE_STMTPREPARE   13                        /* OCIStmtPrepare */
-                                                      /* unused       14- 16 */
-#define OCI_FNCODE_BINDDYNAMIC   17                        /* OCIBindDynamic */
-#define OCI_FNCODE_BINDOBJECT  18                           /* OCIBindObject */
-                                                                /* 19 unused */
-#define OCI_FNCODE_BINDARRAYOFSTRUCT   20            /* OCIBindArrayOfStruct */
-#define OCI_FNCODE_STMTEXECUTE  21                         /* OCIStmtExecute */
-                                                             /* unused 22-24 */
-#define OCI_FNCODE_DEFINEOBJECT  25                       /* OCIDefineObject */
-#define OCI_FNCODE_DEFINEDYNAMIC   26                    /* OCIDefineDynamic */
-#define OCI_FNCODE_DEFINEARRAYOFSTRUCT  27         /* OCIDefineArrayOfStruct */
-#define OCI_FNCODE_STMTFETCH   28                            /* OCIStmtFetch */
-#define OCI_FNCODE_STMTGETBIND   29                    /* OCIStmtGetBindInfo */
-                                                            /* 30, 31 unused */
-#define OCI_FNCODE_DESCRIBEANY  32                         /* OCIDescribeAny */
-#define OCI_FNCODE_TRANSSTART  33                           /* OCITransStart */
-#define OCI_FNCODE_TRANSDETACH  34                         /* OCITransDetach */
-#define OCI_FNCODE_TRANSCOMMIT  35                         /* OCITransCommit */
-                                                                /* 36 unused */
-#define OCI_FNCODE_ERRORGET   37                              /* OCIErrorGet */
-#define OCI_FNCODE_LOBOPENFILE  38                         /* OCILobFileOpen */
-#define OCI_FNCODE_LOBCLOSEFILE  39                       /* OCILobFileClose */
-                                             /* 40 was LOBCREATEFILE, unused */
-                                         /* 41 was OCILobFileDelete, unused  */
-#define OCI_FNCODE_LOBCOPY  42                                 /* OCILobCopy */
-#define OCI_FNCODE_LOBAPPEND  43                             /* OCILobAppend */
-#define OCI_FNCODE_LOBERASE  44                               /* OCILobErase */
-#define OCI_FNCODE_LOBLENGTH  45                          /* OCILobGetLength */
-#define OCI_FNCODE_LOBTRIM  46                                 /* OCILobTrim */
-#define OCI_FNCODE_LOBREAD  47                                 /* OCILobRead */
-#define OCI_FNCODE_LOBWRITE  48                               /* OCILobWrite */
-                                                                /* 49 unused */
-#define OCI_FNCODE_SVCCTXBREAK 50                                /* OCIBreak */
-#define OCI_FNCODE_SERVERVERSION  51                     /* OCIServerVersion */
-
-#define OCI_FNCODE_KERBATTRSET 52                          /* OCIKerbAttrSet */
-
-/* unused 53 */
-
-#define OCI_FNCODE_ATTRGET 54                                  /* OCIAttrGet */
-#define OCI_FNCODE_ATTRSET 55                                  /* OCIAttrSet */
-#define OCI_FNCODE_PARAMSET 56                                /* OCIParamSet */
-#define OCI_FNCODE_PARAMGET 57                                /* OCIParamGet */
-#define OCI_FNCODE_STMTGETPIECEINFO   58              /* OCIStmtGetPieceInfo */
-#define OCI_FNCODE_LDATOSVCCTX 59                          /* OCILdaToSvcCtx */
-                                                                /* 60 unused */
-#define OCI_FNCODE_STMTSETPIECEINFO   61              /* OCIStmtSetPieceInfo */
-#define OCI_FNCODE_TRANSFORGET 62                          /* OCITransForget */
-#define OCI_FNCODE_TRANSPREPARE 63                        /* OCITransPrepare */
-#define OCI_FNCODE_TRANSROLLBACK  64                     /* OCITransRollback */
-#define OCI_FNCODE_DEFINEBYPOS 65                          /* OCIDefineByPos */
-#define OCI_FNCODE_BINDBYPOS 66                              /* OCIBindByPos */
-#define OCI_FNCODE_BINDBYNAME 67                            /* OCIBindByName */
-#define OCI_FNCODE_LOBASSIGN  68                             /* OCILobAssign */
-#define OCI_FNCODE_LOBISEQUAL  69                           /* OCILobIsEqual */
-#define OCI_FNCODE_LOBISINIT  70                      /* OCILobLocatorIsInit */
-
-#define OCI_FNCODE_LOBENABLEBUFFERING  71           /* OCILobEnableBuffering */
-#define OCI_FNCODE_LOBCHARSETID  72                       /* OCILobCharSetID */
-#define OCI_FNCODE_LOBCHARSETFORM  73                   /* OCILobCharSetForm */
-#define OCI_FNCODE_LOBFILESETNAME  74                   /* OCILobFileSetName */
-#define OCI_FNCODE_LOBFILEGETNAME  75                   /* OCILobFileGetName */
-#define OCI_FNCODE_LOGON 76                                      /* OCILogon */
-#define OCI_FNCODE_LOGOFF 77                                    /* OCILogoff */
-#define OCI_FNCODE_LOBDISABLEBUFFERING 78          /* OCILobDisableBuffering */
-#define OCI_FNCODE_LOBFLUSHBUFFER 79                    /* OCILobFlushBuffer */
-#define OCI_FNCODE_LOBLOADFROMFILE 80                  /* OCILobLoadFromFile */
-
-#define OCI_FNCODE_LOBOPEN  81                                 /* OCILobOpen */
-#define OCI_FNCODE_LOBCLOSE  82                               /* OCILobClose */
-#define OCI_FNCODE_LOBISOPEN  83                             /* OCILobIsOpen */
-#define OCI_FNCODE_LOBFILEISOPEN  84                     /* OCILobFileIsOpen */
-#define OCI_FNCODE_LOBFILEEXISTS  85                     /* OCILobFileExists */
-#define OCI_FNCODE_LOBFILECLOSEALL  86                 /* OCILobFileCloseAll */
-#define OCI_FNCODE_LOBCREATETEMP  87                /* OCILobCreateTemporary */
-#define OCI_FNCODE_LOBFREETEMP  88                    /* OCILobFreeTemporary */
-#define OCI_FNCODE_LOBISTEMP  89                        /* OCILobIsTemporary */
-
-#define OCI_FNCODE_AQENQ  90                                     /* OCIAQEnq */
-#define OCI_FNCODE_AQDEQ  91                                     /* OCIAQDeq */
-#define OCI_FNCODE_RESET  92                                     /* OCIReset */
-#define OCI_FNCODE_SVCCTXTOLDA  93                         /* OCISvcCtxToLda */
-#define OCI_FNCODE_LOBLOCATORASSIGN 94                /* OCILobLocatorAssign */
-
-#define OCI_FNCODE_UBINDBYNAME 95
-
-#define OCI_FNCODE_AQLISTEN  96                               /* OCIAQListen */
-
-#define OCI_FNCODE_SVC2HST 97                                    /* reserved */
-#define OCI_FNCODE_SVCRH   98                                    /* reserved */
-                           /* 97 and 98 are reserved for Oracle internal use */
-
-#define OCI_FNCODE_TRANSMULTIPREPARE   99            /* OCITransMultiPrepare */
-
-#define OCI_FNCODE_CPOOLCREATE  100               /* OCIConnectionPoolCreate */
-#define OCI_FNCODE_CPOOLDESTROY 101              /* OCIConnectionPoolDestroy */
-#define OCI_FNCODE_LOGON2 102                                   /* OCILogon2 */
-#define OCI_FNCODE_ROWIDTOCHAR  103                        /* OCIRowidToChar */
-
-#define OCI_FNCODE_SPOOLCREATE  104                  /* OCISessionPoolCreate */
-#define OCI_FNCODE_SPOOLDESTROY 105                 /* OCISessionPoolDestroy */
-#define OCI_FNCODE_SESSIONGET   106                         /* OCISessionGet */
-#define OCI_FNCODE_SESSIONRELEASE 107                   /* OCISessionRelease */
-#define OCI_FNCODE_STMTPREPARE2 108                       /* OCIStmtPrepare2 */
-#define OCI_FNCODE_STMTRELEASE 109                         /* OCIStmtRelease */
-#define OCI_FNCODE_AQENQARRAY  110                          /* OCIAQEnqArray */
-#define OCI_FNCODE_AQDEQARRAY  111                          /* OCIAQDeqArray */
-#define OCI_FNCODE_LOBCOPY2    112                            /* OCILobCopy2 */
-#define OCI_FNCODE_LOBERASE2   113                           /* OCILobErase2 */
-#define OCI_FNCODE_LOBLENGTH2  114                       /* OCILobGetLength2 */
-#define OCI_FNCODE_LOBLOADFROMFILE2  115              /* OCILobLoadFromFile2 */
-#define OCI_FNCODE_LOBREAD2    116                            /* OCILobRead2 */
-#define OCI_FNCODE_LOBTRIM2    117                            /* OCILobTrim2 */
-#define OCI_FNCODE_LOBWRITE2   118                           /* OCILobWrite2 */
-#define OCI_FNCODE_LOBGETSTORAGELIMIT 119           /* OCILobGetStorageLimit */
-
-#define OCI_FNCODE_MAXFCN 119                   /* maximum OCI function code */
-
-
-/*---------------------------------------------------------------------------*/
-
-/*-----------------------Handle Definitions----------------------------------*/
-typedef struct OCIEnv           OCIEnv;            /* OCI environment handle */
-typedef struct OCIError         OCIError;                /* OCI error handle */
-typedef struct OCISvcCtx        OCISvcCtx;             /* OCI service handle */
-typedef struct OCIStmt          OCIStmt;             /* OCI statement handle */
-typedef struct OCIBind          OCIBind;                  /* OCI bind handle */
-typedef struct OCIDefine        OCIDefine;              /* OCI Define handle */
-typedef struct OCIDescribe      OCIDescribe;          /* OCI Describe handle */
-typedef struct OCIServer        OCIServer;              /* OCI Server handle */
-typedef struct OCISession       OCISession;     /* OCI Authentication handle */
-typedef struct OCIComplexObject OCIComplexObject;          /* OCI COR handle */
-typedef struct OCITrans         OCITrans;          /* OCI Transaction handle */
-typedef struct OCISecurity      OCISecurity;          /* OCI Security handle */
-typedef struct OCISubscription  OCISubscription;      /* subscription handle */
-
-typedef struct OCICPool         OCICPool;          /* connection pool handle */
-typedef struct OCISPool         OCISPool;             /* session pool handle */
-typedef struct OCIAuthInfo      OCIAuthInfo;                  /* auth handle */
-
-/*-----------------------Descriptor Definitions------------------------------*/
-typedef struct OCISnapshot      OCISnapshot;      /* OCI snapshot descriptor */
-typedef struct OCIResult        OCIResult;      /* OCI Result Set Descriptor */
-typedef struct OCILobLocator    OCILobLocator; /* OCI Lob Locator descriptor */
-typedef struct OCIParam         OCIParam;        /* OCI PARameter descriptor */
-typedef struct OCIComplexObjectComp OCIComplexObjectComp;
-                                                       /* OCI COR descriptor */
-typedef struct OCIRowid OCIRowid;                    /* OCI ROWID descriptor */
-
-typedef struct OCIDateTime OCIDateTime;           /* OCI DateTime descriptor */
-typedef struct OCIInterval OCIInterval;           /* OCI Interval descriptor */
-
-typedef struct OCIUcb           OCIUcb;      /* OCI User Callback descriptor */
-typedef struct OCIServerDNs     OCIServerDNs;    /* OCI server DN descriptor */
-
-/*-------------------------- AQ Descriptors ---------------------------------*/
-typedef struct OCIAQEnqOptions    OCIAQEnqOptions; /* AQ Enqueue Options hdl */
-typedef struct OCIAQDeqOptions    OCIAQDeqOptions; /* AQ Dequeue Options hdl */
-typedef struct OCIAQMsgProperties OCIAQMsgProperties;  /* AQ Mesg Properties */
-typedef struct OCIAQAgent         OCIAQAgent;         /* AQ Agent descriptor */
-typedef struct OCIAQNfyDescriptor OCIAQNfyDescriptor;   /* AQ Nfy descriptor */
-typedef struct OCIAQSignature     OCIAQSignature;            /* AQ Siganture */
-/*---------------------------------------------------------------------------*/
- 
-/* Lob typedefs for Pro*C */
-typedef struct OCILobLocator OCIClobLocator;    /* OCI Character LOB Locator */
-typedef struct OCILobLocator OCIBlobLocator;       /* OCI Binary LOB Locator */
-typedef struct OCILobLocator OCIBFileLocator; /* OCI Binary LOB File Locator */
-/*---------------------------------------------------------------------------*/
-
-/* Undefined value for tz in interval types*/
-#define OCI_INTHR_UNK 24
-
-  /* These defined adjustment values */
-#define OCI_ADJUST_UNK            10
-#define OCI_ORACLE_DATE           0
-#define OCI_ANSI_DATE             1
-
-/*------------------------ Lob-specific Definitions -------------------------*/
-
-/*
- * ociloff - OCI Lob OFFset
- *
- * The offset in the lob data.  The offset is specified in terms of bytes for
- * BLOBs and BFILes.  Character offsets are used for CLOBs, NCLOBs.
- * The maximum size of internal lob data is 4 gigabytes.  FILE LOB 
- * size is limited by the operating system.
- */
-typedef ub4 OCILobOffset;
-
-/*
- * ocillen - OCI Lob LENgth (of lob data)
- *
- * Specifies the length of lob data in bytes for BLOBs and BFILes and in 
- * characters for CLOBs, NCLOBs.  The maximum length of internal lob
- * data is 4 gigabytes.  The length of FILE LOBs is limited only by the
- * operating system.
- */
-typedef ub4 OCILobLength;
-/*
- * ocilmo - OCI Lob open MOdes
- *
- * The mode specifies the planned operations that will be performed on the
- * FILE lob data.  The FILE lob can be opened in read-only mode only.
- * 
- * In the future, we may include read/write, append and truncate modes.  Append
- * is equivalent to read/write mode except that the FILE is positioned for
- * writing to the end.  Truncate is equivalent to read/write mode except that
- * the FILE LOB data is first truncated to a length of 0 before use.
- */
-enum OCILobMode
-{
-  OCI_LOBMODE_READONLY = 1,                                     /* read-only */
-  OCI_LOBMODE_READWRITE = 2             /* read_write for internal lobs only */
-};
-typedef enum OCILobMode OCILobMode;
-
-/*---------------------------------------------------------------------------*/
-
-
-/*----------------------------Piece Definitions------------------------------*/
-
-/* if ocidef.h is being included in the app, ocidef.h should precede oci.h */
-
-/* 
- * since clients may  use oci.h, ocidef.h and ocidfn.h the following defines
- * need to be guarded, usually internal clients
- */
-
-#ifndef OCI_FLAGS
-#define OCI_FLAGS
-#define OCI_ONE_PIECE 0                                         /* one piece */
-#define OCI_FIRST_PIECE 1                                 /* the first piece */
-#define OCI_NEXT_PIECE 2                          /* the next of many pieces */
-#define OCI_LAST_PIECE 3                                   /* the last piece */
-#endif
-/*---------------------------------------------------------------------------*/
-
-/*--------------------------- FILE open modes -------------------------------*/
-#define OCI_FILE_READONLY 1             /* readonly mode open for FILE types */
-/*---------------------------------------------------------------------------*/
-/*--------------------------- LOB open modes --------------------------------*/
-#define OCI_LOB_READONLY 1              /* readonly mode open for ILOB types */
-#define OCI_LOB_READWRITE 2                /* read write mode open for ILOBs */
-
-/*----------------------- LOB Buffering Flush Flags -------------------------*/
-#define OCI_LOB_BUFFER_FREE   1 
-#define OCI_LOB_BUFFER_NOFREE 2
-/*---------------------------------------------------------------------------*/
-
-/*--------------------------- OCI Statement Types ---------------------------*/
-
-#define  OCI_STMT_SELECT  1                              /* select statement */
-#define  OCI_STMT_UPDATE  2                              /* update statement */
-#define  OCI_STMT_DELETE  3                              /* delete statement */
-#define  OCI_STMT_INSERT  4                              /* Insert Statement */
-#define  OCI_STMT_CREATE  5                              /* create statement */
-#define  OCI_STMT_DROP    6                                /* drop statement */
-#define  OCI_STMT_ALTER   7                               /* alter statement */
-#define  OCI_STMT_BEGIN   8                   /* begin ... (pl/sql statement)*/
-#define  OCI_STMT_DECLARE 9                /* declare .. (pl/sql statement ) */
-/*---------------------------------------------------------------------------*/
-
-/*--------------------------- OCI Parameter Types ---------------------------*/
-#define OCI_PTYPE_UNK                 0                         /* unknown   */
-#define OCI_PTYPE_TABLE               1                         /* table     */
-#define OCI_PTYPE_VIEW                2                         /* view      */
-#define OCI_PTYPE_PROC                3                         /* procedure */
-#define OCI_PTYPE_FUNC                4                         /* function  */
-#define OCI_PTYPE_PKG                 5                         /* package   */
-#define OCI_PTYPE_TYPE                6                 /* user-defined type */
-#define OCI_PTYPE_SYN                 7                         /* synonym   */
-#define OCI_PTYPE_SEQ                 8                         /* sequence  */
-#define OCI_PTYPE_COL                 9                         /* column    */
-#define OCI_PTYPE_ARG                 10                        /* argument  */
-#define OCI_PTYPE_LIST                11                        /* list      */
-#define OCI_PTYPE_TYPE_ATTR           12    /* user-defined type's attribute */
-#define OCI_PTYPE_TYPE_COLL           13        /* collection type's element */
-#define OCI_PTYPE_TYPE_METHOD         14       /* user-defined type's method */
-#define OCI_PTYPE_TYPE_ARG            15   /* user-defined type method's arg */
-#define OCI_PTYPE_TYPE_RESULT         16/* user-defined type method's result */
-#define OCI_PTYPE_SCHEMA              17                           /* schema */
-#define OCI_PTYPE_DATABASE            18                         /* database */
-#define OCI_PTYPE_RULE                19                             /* rule */
-#define OCI_PTYPE_RULE_SET            20                         /* rule set */
-#define OCI_PTYPE_EVALUATION_CONTEXT  21               /* evaluation context */
-#define OCI_PTYPE_TABLE_ALIAS         22                      /* table alias */
-#define OCI_PTYPE_VARIABLE_TYPE       23                    /* variable type */
-#define OCI_PTYPE_NAME_VALUE          24                  /* name value pair */
-
-/*---------------------------------------------------------------------------*/
-
-/*----------------------------- OCI List Types ------------------------------*/
-#define OCI_LTYPE_UNK           0                               /* unknown   */
-#define OCI_LTYPE_COLUMN        1                             /* column list */
-#define OCI_LTYPE_ARG_PROC      2                 /* procedure argument list */
-#define OCI_LTYPE_ARG_FUNC      3                  /* function argument list */
-#define OCI_LTYPE_SUBPRG        4                         /* subprogram list */
-#define OCI_LTYPE_TYPE_ATTR     5                          /* type attribute */
-#define OCI_LTYPE_TYPE_METHOD   6                             /* type method */
-#define OCI_LTYPE_TYPE_ARG_PROC 7    /* type method w/o result argument list */
-#define OCI_LTYPE_TYPE_ARG_FUNC 8      /* type method w/result argument list */
-#define OCI_LTYPE_SCH_OBJ       9                      /* schema object list */
-#define OCI_LTYPE_DB_SCH        10                   /* database schema list */
-#define OCI_LTYPE_TYPE_SUBTYPE  11                           /* subtype list */
-#define OCI_LTYPE_TABLE_ALIAS   12                       /* table alias list */
-#define OCI_LTYPE_VARIABLE_TYPE 13                     /* variable type list */
-#define OCI_LTYPE_NAME_VALUE    14                        /* name value list */
-
-/*---------------------------------------------------------------------------*/
-
-/*-------------------------- Memory Cartridge Services ---------------------*/
-#define OCI_MEMORY_CLEARED  1
-
-/*-------------------------- Pickler Cartridge Services ---------------------*/
-typedef struct OCIPicklerTdsCtx OCIPicklerTdsCtx;
-typedef struct OCIPicklerTds OCIPicklerTds;
-typedef struct OCIPicklerImage OCIPicklerImage;
-typedef struct OCIPicklerFdo OCIPicklerFdo;
-typedef ub4 OCIPicklerTdsElement;
-
-typedef struct OCIAnyData OCIAnyData;
-
-typedef struct OCIAnyDataSet OCIAnyDataSet;
-typedef struct OCIAnyDataCtx OCIAnyDataCtx;
-
-/*---------------------------------------------------------------------------*/
-
-/*--------------------------- User Callback Constants -----------------------*/
-#define OCI_UCBTYPE_ENTRY       1                          /* entry callback */
-#define OCI_UCBTYPE_EXIT        2                           /* exit callback */
-#define OCI_UCBTYPE_REPLACE     3                    /* replacement callback */
-
-/*---------------------------------------------------------------------------*/
-
-/*--------------------- NLS service type and constance ----------------------*/
-#define OCI_NLS_DAYNAME1      1                    /* Native name for Monday */
-#define OCI_NLS_DAYNAME2      2                   /* Native name for Tuesday */
-#define OCI_NLS_DAYNAME3      3                 /* Native name for Wednesday */
-#define OCI_NLS_DAYNAME4      4                  /* Native name for Thursday */
-#define OCI_NLS_DAYNAME5      5                    /* Native name for Friday */
-#define OCI_NLS_DAYNAME6      6              /* Native name for for Saturday */
-#define OCI_NLS_DAYNAME7      7                /* Native name for for Sunday */
-#define OCI_NLS_ABDAYNAME1    8        /* Native abbreviated name for Monday */
-#define OCI_NLS_ABDAYNAME2    9       /* Native abbreviated name for Tuesday */
-#define OCI_NLS_ABDAYNAME3    10    /* Native abbreviated name for Wednesday */
-#define OCI_NLS_ABDAYNAME4    11     /* Native abbreviated name for Thursday */
-#define OCI_NLS_ABDAYNAME5    12       /* Native abbreviated name for Friday */
-#define OCI_NLS_ABDAYNAME6    13 /* Native abbreviated name for for Saturday */
-#define OCI_NLS_ABDAYNAME7    14   /* Native abbreviated name for for Sunday */
-#define OCI_NLS_MONTHNAME1    15                  /* Native name for January */
-#define OCI_NLS_MONTHNAME2    16                 /* Native name for February */
-#define OCI_NLS_MONTHNAME3    17                    /* Native name for March */
-#define OCI_NLS_MONTHNAME4    18                    /* Native name for April */
-#define OCI_NLS_MONTHNAME5    19                      /* Native name for May */
-#define OCI_NLS_MONTHNAME6    20                     /* Native name for June */
-#define OCI_NLS_MONTHNAME7    21                     /* Native name for July */
-#define OCI_NLS_MONTHNAME8    22                   /* Native name for August */
-#define OCI_NLS_MONTHNAME9    23                /* Native name for September */
-#define OCI_NLS_MONTHNAME10   24                  /* Native name for October */
-#define OCI_NLS_MONTHNAME11   25                 /* Native name for November */
-#define OCI_NLS_MONTHNAME12   26                 /* Native name for December */
-#define OCI_NLS_ABMONTHNAME1  27      /* Native abbreviated name for January */
-#define OCI_NLS_ABMONTHNAME2  28     /* Native abbreviated name for February */
-#define OCI_NLS_ABMONTHNAME3  29        /* Native abbreviated name for March */
-#define OCI_NLS_ABMONTHNAME4  30        /* Native abbreviated name for April */
-#define OCI_NLS_ABMONTHNAME5  31          /* Native abbreviated name for May */
-#define OCI_NLS_ABMONTHNAME6  32         /* Native abbreviated name for June */
-#define OCI_NLS_ABMONTHNAME7  33         /* Native abbreviated name for July */
-#define OCI_NLS_ABMONTHNAME8  34       /* Native abbreviated name for August */
-#define OCI_NLS_ABMONTHNAME9  35    /* Native abbreviated name for September */
-#define OCI_NLS_ABMONTHNAME10 36      /* Native abbreviated name for October */
-#define OCI_NLS_ABMONTHNAME11 37     /* Native abbreviated name for November */
-#define OCI_NLS_ABMONTHNAME12 38     /* Native abbreviated name for December */
-#define OCI_NLS_YES           39   /* Native string for affirmative response */
-#define OCI_NLS_NO            40                 /* Native negative response */
-#define OCI_NLS_AM            41           /* Native equivalent string of AM */
-#define OCI_NLS_PM            42           /* Native equivalent string of PM */
-#define OCI_NLS_AD            43           /* Native equivalent string of AD */
-#define OCI_NLS_BC            44           /* Native equivalent string of BC */
-#define OCI_NLS_DECIMAL       45                        /* decimal character */
-#define OCI_NLS_GROUP         46                          /* group separator */
-#define OCI_NLS_DEBIT         47                   /* Native symbol of debit */
-#define OCI_NLS_CREDIT        48                  /* Native sumbol of credit */
-#define OCI_NLS_DATEFORMAT    49                       /* Oracle date format */
-#define OCI_NLS_INT_CURRENCY  50            /* International currency symbol */
-#define OCI_NLS_LOC_CURRENCY  51                   /* Locale currency symbol */
-#define OCI_NLS_LANGUAGE      52                            /* Language name */
-#define OCI_NLS_ABLANGUAGE    53           /* Abbreviation for language name */
-#define OCI_NLS_TERRITORY     54                           /* Territory name */
-#define OCI_NLS_CHARACTER_SET 55                       /* Character set name */
-#define OCI_NLS_LINGUISTIC_NAME    56                     /* Linguistic name */
-#define OCI_NLS_CALENDAR      57                            /* Calendar name */
-#define OCI_NLS_DUAL_CURRENCY 78                     /* Dual currency symbol */
-#define OCI_NLS_WRITINGDIR    79               /* Language writing direction */
-#define OCI_NLS_ABTERRITORY   80                   /* Territory Abbreviation */
-#define OCI_NLS_DDATEFORMAT   81               /* Oracle default date format */
-#define OCI_NLS_DTIMEFORMAT   82               /* Oracle default time format */
-#define OCI_NLS_SFDATEFORMAT  83       /* Local string formatted date format */
-#define OCI_NLS_SFTIMEFORMAT  84       /* Local string formatted time format */
-#define OCI_NLS_NUMGROUPING   85                   /* Number grouping fields */
-#define OCI_NLS_LISTSEP       86                           /* List separator */
-#define OCI_NLS_MONDECIMAL    87               /* Monetary decimal character */
-#define OCI_NLS_MONGROUP      88                 /* Monetary group separator */
-#define OCI_NLS_MONGROUPING   89                 /* Monetary grouping fields */
-#define OCI_NLS_INT_CURRENCYSEP 90       /* International currency separator */
-#define OCI_NLS_CHARSET_MAXBYTESZ 91     /* Maximum character byte size      */
-#define OCI_NLS_CHARSET_FIXEDWIDTH 92    /* Fixed-width charset byte size    */
-#define OCI_NLS_CHARSET_ID    93                         /* Character set id */
-#define OCI_NLS_NCHARSET_ID   94                        /* NCharacter set id */
-
-#define OCI_NLS_MAXBUFSZ   100 /* Max buffer size may need for OCINlsGetInfo */
-
-#define OCI_NLS_BINARY            0x1           /* for the binary comparison */
-#define OCI_NLS_LINGUISTIC        0x2           /* for linguistic comparison */
-#define OCI_NLS_CASE_INSENSITIVE  0x10    /* for case-insensitive comparison */
-
-#define OCI_NLS_UPPERCASE         0x20               /* convert to uppercase */
-#define OCI_NLS_LOWERCASE         0x40               /* convert to lowercase */
-
-#define OCI_NLS_CS_IANA_TO_ORA   0   /* Map charset name from IANA to Oracle */
-#define OCI_NLS_CS_ORA_TO_IANA   1   /* Map charset name from Oracle to IANA */
-#define OCI_NLS_LANG_ISO_TO_ORA  2   /* Map language name from ISO to Oracle */
-#define OCI_NLS_LANG_ORA_TO_ISO  3   /* Map language name from Oracle to ISO */
-#define OCI_NLS_TERR_ISO_TO_ORA  4   /* Map territory name from ISO to Oracle*/
-#define OCI_NLS_TERR_ORA_TO_ISO  5   /* Map territory name from Oracle to ISO*/
-#define OCI_NLS_TERR_ISO3_TO_ORA 6   /* Map territory name from 3-letter ISO */
-                                     /* abbreviation to Oracle               */
-#define OCI_NLS_TERR_ORA_TO_ISO3 7   /* Map territory name from Oracle to    */
-                                     /* 3-letter ISO abbreviation            */
-
-typedef struct OCIMsg  OCIMsg;
-typedef ub4            OCIWchar;
-
-#define OCI_XMLTYPE_CREATE_OCISTRING 1
-#define OCI_XMLTYPE_CREATE_CLOB      2
-#define OCI_XMLTYPE_CREATE_BLOB      3
-
-/*------------------------- Kerber Authentication Modes ---------------------*/
-#define OCI_KERBCRED_PROXY               1 /* Apply Kerberos Creds for Proxy */
-#define OCI_KERBCRED_CLIENT_IDENTIFIER   2/*Apply Creds for Secure Client ID */
-
-/*--------------------------------------------------------------------------- 
-                     PRIVATE TYPES AND CONSTANTS 
-  ---------------------------------------------------------------------------*/
- 
-/* None */
-
-/*--------------------------------------------------------------------------- 
-                           PUBLIC FUNCTIONS 
-  ---------------------------------------------------------------------------*/
-
-/* see ociap.h or ocikp.h */
- 
-/*--------------------------------------------------------------------------- 
-                          PRIVATE FUNCTIONS 
-  ---------------------------------------------------------------------------*/
-
-/* None */
-
- 
-#endif                                              /* OCI_ORACLE */
-
-
-/* more includes */
-
-#ifndef OCI1_ORACLE
-#include <oci1.h>
-#endif
-
-#ifndef ORO_ORACLE
-#include <oro.h>
-#endif
-
-#ifndef ORI_ORACLE
-#include <ori.h>
-#endif
-
-#ifndef ORL_ORACLE
-#include <orl.h>
-#endif
-
-#ifndef ORT_ORACLE
-#include <ort.h>
-#endif
-
-#ifndef OCIEXTP_ORACLE
-#include <ociextp.h>
-#endif
-
-#include <ociapr.h>
-#include <ociap.h>
-
-#ifndef OCIXMLDB_ORACLE
-#include <ocixmldb.h>
-#endif
-
-#ifndef OCI8DP_ORACLE
-#include <oci8dp.h>         /* interface definitions for the direct path api */
-#endif
-
-#ifndef OCIEXTP_ORACLE
-#include <ociextp.h>
-#endif
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
diff --git a/src/terralib/drivers/OracleSpatial/OCI/include/oci1.h b/src/terralib/drivers/OracleSpatial/OCI/include/oci1.h
deleted file mode 100644
index 21a86b9..0000000
--- a/src/terralib/drivers/OracleSpatial/OCI/include/oci1.h
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
- * $Header: /home/terralib/src/terralib/drivers/OracleSpatial/OCI/include/oci1.h,v 1.3 2005/05/06 16:48:55 karine Exp $
- */
-
-/* Copyright (c) Oracle Corporation 1997, 1998. All Rights Reserved. */ 
- 
-/* NOTE:  See 'header_template.doc' in the 'doc' dve under the 'forms' 
-      directory for the header file template that includes instructions. 
-*/
- 
-/* 
-   NAME 
-     oci1.h - Cartridge Service definitions
-
-   DESCRIPTION 
-     <short description of component this file declares/defines> 
-
-   RELATED DOCUMENTS 
- 
-   INSPECTION STATUS 
-     Inspection date: 
-     Inspection status: 
-     Estimated increasing cost defects per page: 
-     Rule sets: 
- 
-   ACCEPTANCE REVIEW STATUS 
-     Review date: 
-     Review status: 
-     Reviewers: 
- 
-   PUBLIC FUNCTION(S) 
-     <list of external functions declared/defined - with one-line descriptions>
-
-   PRIVATE FUNCTION(S)
-     <list of static functions defined in .c file - with one-line descriptions>
-
-   EXAMPLES
-
-   NOTES
-     <other useful comments, qualifications, etc.>
-
-   MODIFIED   (MM/DD/YY)
-   nramakri    01/16/98 - remove #ifdef NEVER clause
-   ewaugh      12/18/97 - Turn type wrappers into functions.
-   skabraha    12/02/97 - Adding data structures & constants for OCIFile
-   rhwu        12/02/97 - OCI Thread
-   nramakri    12/15/97 - move to core4
-   ewaugh      12/11/97 - add OCIFormat package constants
-   ssamu       12/10/97 - do not include s.h
-   nramakri    11/19/97 - add OCIExtract definitions
-   ssamu       11/14/97 - creation
-
-*/
-
-
-#ifndef OCI1_ORACLE
-# define OCI1_ORACLE
-
-# ifndef ORATYPES
-#  include <oratypes.h>
-# endif
-
-
-/*---------------------------------------------------------------------------
-                     PUBLIC TYPES AND CONSTANTS
-  ---------------------------------------------------------------------------*/
-
-/* Constants required by the OCIFormat package. */
-
-#define OCIFormatUb1(variable)      OCIFormatTUb1(),      &(variable)
-#define OCIFormatUb2(variable)      OCIFormatTUb2(),      &(variable)
-#define OCIFormatUb4(variable)      OCIFormatTUb4(),      &(variable)
-#define OCIFormatUword(variable)    OCIFormatTUword(),    &(variable)
-#define OCIFormatUbig_ora(variable) OCIFormatTUbig_ora(), &(variable)
-#define OCIFormatSb1(variable)      OCIFormatTSb1(),      &(variable)
-#define OCIFormatSb2(variable)      OCIFormatTSb2(),      &(variable)
-#define OCIFormatSb4(variable)      OCIFormatTSb4(),      &(variable)
-#define OCIFormatSword(variable)    OCIFormatTSword(),    &(variable)
-#define OCIFormatSbig_ora(variable) OCIFormatTSbig_ora(), &(variable)
-#define OCIFormatEb1(variable)      OCIFormatTEb1(),      &(variable)
-#define OCIFormatEb2(variable)      OCIFormatTEb2(),      &(variable)
-#define OCIFormatEb4(variable)      OCIFormatTEb4(),      &(variable)
-#define OCIFormatEword(variable)    OCIFormatTEword(),    &(variable)
-#define OCIFormatChar(variable)     OCIFormatTChar(),     &(variable)
-#define OCIFormatText(variable)     OCIFormatTText(),      (variable)
-#define OCIFormatDouble(variable)   OCIFormatTDouble(),   &(variable)
-#define OCIFormatDvoid(variable)    OCIFormatTDvoid(),     (variable)
-#define OCIFormatEnd                OCIFormatTEnd()
-
-#define OCIFormatDP 6
-
-
-/*----------------- Public Constants for OCIFile -------------------------*/
-
-/* flags for open.*/
-/* flags for mode */
-#define OCI_FILE_READ_ONLY         1   /* open for read only */
-#define OCI_FILE_WRITE_ONLY        2   /* open for write only */
-#define OCI_FILE_READ_WRITE        3   /* open for read & write */
-/* flags for create */
-#define OCI_FILE_EXIST             0   /* the file should exist */
-#define OCI_FILE_CREATE            1   /* create if the file doesn't exist */
-#define OCI_FILE_EXCL              2   /* the file should not exist */
-#define OCI_FILE_TRUNCATE          4   /* create if the file doesn't exist, 
-                                          else truncate file the file to 0 */
-#define OCI_FILE_APPEND            8   /* open the file in append mode */
-
-/* flags for seek */
-#define OCI_FILE_SEEK_BEGINNING    1  /* seek from the beginning of the file */
-#define OCI_FILE_SEEK_CURRENT      2  /* seek from the current position */
-#define OCI_FILE_SEEK_END          3  /* seek from the end of the file */
-
-#define OCI_FILE_FORWARD     1     /* seek forward		*/
-#define OCI_FILE_BACKWARD    2     /* seek backward		*/
-
-/* file type */
-#define   OCI_FILE_BIN      0    /* binary file */
-#define   OCI_FILE_TEXT     1    /* text file */
-#define   OCI_FILE_STDIN    2    /* standard i/p */
-#define   OCI_FILE_STDOUT   3    /* standard o/p */
-#define   OCI_FILE_STDERR   4    /* standard error */
-
-/* Represents an open file */
-typedef struct OCIFileObject OCIFileObject;
-
-
-/*--------------------- OCI Thread Object Definitions------------------------*/
-
-/* OCIThread Context */
-typedef struct OCIThreadContext OCIThreadContext;
-
-/* OCIThread Mutual Exclusion Lock */
-typedef struct OCIThreadMutex   OCIThreadMutex; 
-
-/* OCIThread Key for Thread-Specific Data */
-typedef struct OCIThreadKey     OCIThreadKey;  
-
-/* OCIThread Thread ID */
-typedef struct OCIThreadId      OCIThreadId;  
-
-/* OCIThread Thread Handle */
-typedef struct OCIThreadHandle  OCIThreadHandle;  
-
-
-/*-------------------- OCI Thread Callback Function Pointers ----------------*/
-
-/* OCIThread Key Destructor Function Type */
-typedef void (*OCIThreadKeyDestFunc)(/*_ dvoid * _*/);
-
-
-/* Flags passed into OCIExtractFromXXX routines to direct processing         */
-#define OCI_EXTRACT_CASE_SENSITIVE     0x1 /* matching is case sensitive     */
-#define OCI_EXTRACT_UNIQUE_ABBREVS     0x2 /* unique abbreviations for keys
-                                              are allowed                    */
-#define OCI_EXTRACT_APPEND_VALUES      0x4 /* if multiple values for a key
-                                              exist, this determines if the 
-                                              new value should be appended 
-                                              to (or replace) the current 
-                                              list of values                 */
-
-/* Constants passed into OCIExtractSetKey routine */
-#define OCI_EXTRACT_MULTIPLE           0x8 /* key can accept multiple values */
-#define OCI_EXTRACT_TYPE_BOOLEAN         1 /* key type is boolean            */
-#define OCI_EXTRACT_TYPE_STRING          2 /* key type is string             */
-#define OCI_EXTRACT_TYPE_INTEGER         3 /* key type is integer            */
-#define OCI_EXTRACT_TYPE_OCINUM          4 /* key type is ocinum             */
-
-/*---------------------------------------------------------------------------
-                     PRIVATE TYPES AND CONSTANTS
-  ---------------------------------------------------------------------------*/
-
-
-/*---------------------------------------------------------------------------
-                           PUBLIC FUNCTIONS
-  ---------------------------------------------------------------------------*/
-
-
-/*---------------------------------------------------------------------------
-                          PRIVATE FUNCTIONS
-  ---------------------------------------------------------------------------*/
-
-
-#endif                                              /* OCI1_ORACLE */
diff --git a/src/terralib/drivers/OracleSpatial/OCI/include/oci8dp.h b/src/terralib/drivers/OracleSpatial/OCI/include/oci8dp.h
deleted file mode 100644
index eea652f..0000000
--- a/src/terralib/drivers/OracleSpatial/OCI/include/oci8dp.h
+++ /dev/null
@@ -1,315 +0,0 @@
-/*
- * $Header: /home/terralib/src/terralib/drivers/OracleSpatial/OCI/include/oci8dp.h,v 1.3 2005/05/06 16:48:55 karine Exp $
- */
-
-/* Copyright (c) 1998, 2003, Oracle Corporation.  All rights reserved.  */
- 
-/* 
-   NAME 
-     oci8dp.h - OCI: Direct Path API interface prototypes.
-
-   DESCRIPTION 
-     Public types, constants, and interfaces to the direct path API.
-
-   RELATED DOCUMENTS 
- 
-   NOTES
-     This file is not directly included by the application, this file
-     is included by "oci.h", which the application should include.
-
-   MODIFIED   (MM/DD/YY)
-   srseshad    03/12/03 - convert oci public api to ansi
-   msakayed    10/28/02 - Bug #2643907: add OCI_ATTR_DIRPATH_SKIPINDEX_METHOD
-   cmlim       04/13/01 - remove OCIDirPathStreamToStream - not used by dpapi
-   cmlim       04/02/01 - OCI_DIRPATH_EXPR_OPQ_SQL_FN to OCI_DIRPATH_EXPR_SQL
-   ebatbout    01/22/01 - PARTIAL value for OCIDirPathDataSave action parameter
-   cmlim       07/20/00 - support opaques/sql strings in 8.2 dpapi
-   cmlim       08/14/00 - support refs in 8.2 dpapi
-   cmlim       04/17/00 - add defines for OCIDirPathFuncCtx handle & OCI_ATTR_D
-   whe         09/01/99 - 976457:check __cplusplus for C++ code
-   abrumm      04/16/99 - dpapi: more attributes
-   abrumm      02/26/99 - add defines for DataSave action
-   abrumm      10/04/98 - clen must be a ub4
-   abrumm      05/27/98 - add column array flag values
-   abrumm      05/12/98 - direct path api support
-   abrumm      03/31/98 - OCI direct path interface support
-   abrumm      03/18/98 - Creation
-
-*/
-
-#ifndef OCI8DP_ORACLE
-# define OCI8DP_ORACLE
-
-#ifndef ORATYPES
-#include <oratypes.h>
-#endif
-
-#ifndef OCIDFN
-#include <ocidfn.h>
-#endif
-
-#ifndef OCI_ORACLE
-#include <oci.h>
-#endif
-
-
-/*---------------------------------------------------------------------------
-                     PUBLIC TYPES AND CONSTANTS
-  ---------------------------------------------------------------------------*/
-
-/*----- Handles and descriptors for direct path operations (OCIDirPath*) ----*/
-
-typedef struct OCIDirPathCtx      OCIDirPathCtx;                  /* context */
-typedef struct OCIDirPathFuncCtx  OCIDirPathFuncCtx;     /* function context */
-typedef struct OCIDirPathColArray OCIDirPathColArray;        /* column array */
-typedef struct OCIDirPathStream   OCIDirPathStream;                /* stream */
-typedef struct OCIDirPathDesc     OCIDirPathDesc;  /* direct path descriptor */
-
-                 /*----- Defines for Direct Path Options -----*/
-
-                 /* values for OCI_ATTR_DIRPATH_MODE attribute */
-#define OCI_DIRPATH_LOAD         1             /* direct path load operation */
-#define OCI_DIRPATH_UNLOAD       2           /* direct path unload operation */
-#define OCI_DIRPATH_CONVERT      3     /* direct path convert only operation */
-
-    /*----- values for OCI_ATTR_DIRPATH_INDEX_MAINT_METHOD attribute -----*/
-#define OCI_DIRPATH_INDEX_MAINT_SINGLE_ROW     1
-
-/* Note that there are two attributes dealing with index maintenance -
- * OCI_ATTR_DIRPATH_INDEX_MAINT_METHOD and OCI_ATTR_DIRPATH_SKIPINDEX_METHOD.
- * OCI_ATTR_DIRPATH_SKIPINDEX_METHOD exists to isolate the behavior for
- * skipping index maintenance since maintenance of unusable indexes is 
- * orthogonal to that of single row insertion.
- * For backwards compatibility we still allow users to specify skip
- * methods in OCI_ATTR_DIRPATH_INDEX_MAINT_METHOD so make sure the
- * enumerations for the two attributes are distinct.
- */
-    /*----- values for OCI_ATTR_DIRPATH_SKIPINDEX_METHOD attribute -----*/
-#define OCI_DIRPATH_INDEX_MAINT_SKIP_UNUSABLE       2
-#define OCI_DIRPATH_INDEX_MAINT_DONT_SKIP_UNUSABLE  3
-#define OCI_DIRPATH_INDEX_MAINT_SKIP_ALL            4
-
-           /* values for OCI_ATTR_STATE attribute of OCIDirPathCtx */
-#define OCI_DIRPATH_NORMAL       1     /* can accept rows, last row complete */
-#define OCI_DIRPATH_PARTIAL      2                   /* last row was partial */
-#define OCI_DIRPATH_NOT_PREPARED 3    /* direct path context is not prepared */
-
-     /*----- values for cflg argument to OCIDirpathColArrayEntrySet -----*/
-#define OCI_DIRPATH_COL_COMPLETE 0                /* column data is complete */
-#define OCI_DIRPATH_COL_NULL     1                         /* column is null */
-#define OCI_DIRPATH_COL_PARTIAL  2                 /* column data is partial */
-
-          /*----- values for action parameter to OCIDirPathDataSave -----*/
-#define OCI_DIRPATH_DATASAVE_SAVEONLY 0              /* data save point only */
-#define OCI_DIRPATH_DATASAVE_FINISH   1           /* execute finishing logic */
-/* save portion of input data (before space error occurred) and finish */
-#define OCI_DIRPATH_DATASAVE_PARTIAL  2       
-
-  /*- OCI_ATTR_DIRPATH_EXPR_TYPE values (describes OCI_ATTR_NAME expr type) -*/
-#define OCI_DIRPATH_EXPR_OBJ_CONSTR  1      /* NAME is an object constructor */
-#define OCI_DIRPATH_EXPR_SQL         2  /* NAME is an opaque or sql function */
-#define OCI_DIRPATH_EXPR_REF_TBLNAME 3 /* NAME is table name if ref is scoped*/
-
-
-/*---------------------------------------------------------------------------
-                           PUBLIC FUNCTIONS
-  ---------------------------------------------------------------------------*/
-
-/*------------------------ OCIDirPathCtx Operations -------------------------*/
-
-/*
-  NAME
-    OCIDirPathAbort - OCI: Abort a direct path operation.
-
-  DESCRIPTION
-    Aborts a direct path operation.  Upon successful completion
-    the direct path context is no longer valid.
-
-  RETURNS
-    An OCI error code, Oracle errors are returned via the error handle.
-  NOTES
- */
-sword
-OCIDirPathAbort( OCIDirPathCtx *dpctx, OCIError *errhp );
-
-/*
-  NAME
-    OCIDirPathDataSave - OCI: Execute a data save point.
-
-  DESCRIPTION
-    Successful return of this function indicates that a data save
-    point has been executed.
-
-  RETURNS
-    An OCI error code, Oracle errors are returned via the error handle.
-  NOTES
- */
-sword
-OCIDirPathDataSave( OCIDirPathCtx *dpctx, OCIError *errhp, ub4 action );
-
-/*
-  NAME
-    OCIDirPathFinish - OCI: Finish a direct path operation.
-
-  DESCRIPTION
-    Finishes a direct path operation.
-
-  RETURNS
-    An OCI error code, Oracle errors are returned via the error handle.
-  NOTES
- */
-sword
-OCIDirPathFinish( OCIDirPathCtx *dpctx, OCIError  *errhp );
-
-/*
-  NAME
-    OCIDirPathFlushRow - OCI: Flush a partial row from the server.
-
-  DESCRIPTION
-    Flushes a partially loaded row from the server.
-
-  RETURNS
-    An OCI error code, Oracle errors are returned via the error handle.
-  NOTES
- */
-sword
-OCIDirPathFlushRow( OCIDirPathCtx *dpctx, OCIError  *errhp );
-
-/*
-  NAME
-    OCIDirPathPrepare - OCI: Prepare a direct path operation.
-
-  DESCRIPTION
-    Prepares a table/partition for a direct path operation.
-
-  RETURNS
-    An OCI error code, Oracle errors are returned via the error handle.
-  NOTES
- */
-sword
-OCIDirPathPrepare( OCIDirPathCtx *dpctx, OCISvcCtx *svchp,
-                      OCIError  *errhp );
-
-/*
-  NAME
-    OCIDirPathLoadStream - OCI: Load a direct path stream.
-
-  DESCRIPTION
-    Load a direct path stream to the object associated with
-    the direct path context.
-
-  RETURNS
-    An OCI error code, Oracle errors are returned via the error handle.
-  NOTES
- */
-sword
-OCIDirPathLoadStream( OCIDirPathCtx *dpctx, OCIDirPathStream *dpstr,
-                         OCIError      *errhp );
-
-
-/*---------------------- OCIDirPathColArray Operations ----------------------*/
-
-/*
-  NAME
-    OCIDirPathColArrayEntryGet - OCI:  Get column array entry.
-
-  DESCRIPTION
-    Column array function which is used to get a specified entry in
-    a column array.
-
-  RETURNS
-    An OCI error code, Oracle errors are returned via the error handle.
-  NOTES
- */
-sword
-OCIDirPathColArrayEntryGet( OCIDirPathColArray *dpca, OCIError *errhp,
-                              ub4 rownum, ub2 colIdx, ub1 **cvalpp, ub4 *clenp,
-                              ub1 *cflgp );
-
-/*
-  NAME
-    OCIDirPathColArrayEntrySet - OCI:  Set column array entry.
-
-  DESCRIPTION
-    Column array function which is used to set a specified entry in
-    a column array.
-
-  RETURNS
-    An OCI error code, Oracle errors are returned via the error handle.
-  NOTES
- */
-sword
-OCIDirPathColArrayEntrySet( OCIDirPathColArray *dpca, OCIError *errhp,
-                               ub4 rownum, ub2 colIdx, ub1 *cvalp, ub4 clen,
-                               ub1 cflg );
-
-/*
-  NAME
-    OCIDirPathColArrayRowGet - OCI:  Get column array row pointers.
-
-  DESCRIPTION
-    Column array function which is used to get the base row pointers
-    for a specified row in a column array.
-    To be used in lieu of OCIDirPathColArrayEntryGet() and
-    OCIDirPathColArrayEntrySet().
-
-  RETURNS
-    An OCI error code, Oracle errors are returned via the error handle.
-  NOTES
- */
-sword
-OCIDirPathColArrayRowGet( OCIDirPathColArray *dpca, OCIError *errhp,
-                         ub4 rownum, ub1 ***cvalppp, ub4 **clenpp,
-                         ub1 **cflgpp );
-
-/*
-  NAME
-    OCIDirPathColArrayReset - OCI: Reset Column Array State
-
-  DESCRIPTION
-    Function which resets the column array state.
-
-  RETURNS
-    An OCI error code, Oracle errors are returned via the error handle.
-  NOTES
-    Resetting the column array state is necessary when piecing in a large
-    column and an error occurs in the middle of loading the column.
- */
-sword
-OCIDirPathColArrayReset( OCIDirPathColArray *dpca, OCIError *errhp );
-
-/*
-  NAME
-    OCIDirPathColArrayToStream - OCI: Convert Column Array to Stream Format.
-
-  DESCRIPTION
-    Convert from column array format to stream format which is suitable
-    for loading via OCIDirPathLoadStream().
-
-  RETURNS
-    An OCI error code, Oracle errors are returned via the error handle.
-  NOTES
- */
-sword
-OCIDirPathColArrayToStream( OCIDirPathColArray *dpca,  OCIDirPathCtx *dpctx,
-                               OCIDirPathStream   *dpstr, OCIError      *errhp,
-                               ub4 rowcnt, ub4 rowoff );
-
-
-
-/*----------------------- OCIDirPathStream Operations -----------------------*/
-
-/*
-  NAME
-    OCIDirPathStreamReset - OCI:
-
-  DESCRIPTION
-
-  RETURNS
-    An OCI error code, Oracle errors are returned via the error handle.
-  NOTES
- */
-sword
-OCIDirPathStreamReset( OCIDirPathStream *dpstr, OCIError *errhp );
-
-#endif                                              /* OCI8DP_ORACLE */
diff --git a/src/terralib/drivers/OracleSpatial/OCI/include/ociap.h b/src/terralib/drivers/OracleSpatial/OCI/include/ociap.h
deleted file mode 100644
index 3132df7..0000000
--- a/src/terralib/drivers/OracleSpatial/OCI/include/ociap.h
+++ /dev/null
@@ -1,10240 +0,0 @@
-/*
- * $Header: /home/terralib/src/terralib/drivers/OracleSpatial/OCI/include/ociap.h,v 1.3 2005/05/06 16:48:55 karine Exp $
- */
-
-/* Copyright (c) 1996, 2003, Oracle Corporation.  All rights reserved.  */
- 
-/* NOTE:  See 'header_template.doc' in the 'doc' dve under the 'forms' 
-      directory for the header file template that includes instructions. 
-*/
- 
-/* 
-   NAME 
-     ociap.h - Oracle Call Interface - Ansi Prototypes
-
-   DESCRIPTION 
-     <short description of component this file declares/defines> 
-
-   RELATED DOCUMENTS 
- 
-   INSPECTION STATUS 
-     Inspection date: 
-     Inspection status: 
-     Estimated increasing cost defects per page: 
-     Rule sets: 
- 
-   ACCEPTANCE REVIEW STATUS 
-     Review date: 
-     Review status: 
-     Reviewers: 
- 
-   PUBLIC FUNCTION(S) 
-     <list of external functions declared/defined - with one-line descriptions>
-
-   PRIVATE FUNCTION(S)
-     <list of static functions defined in .c file - with one-line descriptions>
-
-   EXAMPLES
-
-   NOTES
-     <other useful comments, qualifications, etc.>
-
-   MODIFIED   (MM/DD/YY)
-   debanerj    08/26/03 - 6003: Lob interface changes
-   sgollapu    06/23/03 - Add OCIPing
-   debanerj    01/16/03 - Bug 2753018: Lob Locator parameter for 
-                          OCILobGetStorageLimit
-   tkeefe      02/17/03 - bug-2773794: Add new interface for setting Kerb attrs
-   ataracha    01/03/03 - Move OCIXMLType functions to ocixml.h
-   akatti      11/28/02 - [2521361]:add OCIRowidToChar prototype
-   chliang     10/23/02 - add OCIFetchRowCallback
-   cparampa    10/13/02 - Fix the prototype of OCIAQListen(ansi prototype)
-   chliang     10/12/02 - add OCIBindRowCallback
-   debanerj    09/30/02 - Unlimited size LOB 6003
-   thoang      09/25/02 - Add csid to XMLType create functions
-   thoang      04/19/02 - Add OCIXMLTypeGetNS
-   aahluwal    08/09/02 - adding OCIAQDeqArray
-   aahluwal    06/03/02 - bug 2360115
-   skabraha    04/16/02 - fix compiler warnings
-   sichandr    02/12/02 - fix OCIXMLTypeExists
-   gayyappa    02/01/02 - fix 2210776 : change Dom to DOM 
-   sichandr    10/24/01 - OCISvcCtx for XMLType create routines
-   schandir    09/14/01 - Add prototypes for Stmt Caching
-   abande      09/04/01 - Add Prototypes for Session Pooling Methods
-   stakeda     09/12/01 - add OCINlsCharSetConvert
-   whe         08/28/01 - add OCIEnvNlsCreate
-   wzhang      08/22/01 - Add OCINlsCharSetNameToId.
-   whe         10/05/01 - add prototype for OCIXMLType functions
-   mdmehta     04/06/01 - Bug 1683763, OCIDateTimeToText: buf_size to ub4*
-   schandir    12/12/00 - modify the ociconnectionpoolcreate() interface.
-   porangas    12/04/00 - Forward merge bug#974710 to 9i
-   rpingte     11/29/00 - Fix bug# 1485795.
-   gtarora     11/30/00 - fix comment for OCILobIsTemporary
-   akatti      11/07/00 - [1198379]:add OCIRowidToChar
-   bpalaval    10/15/00 - Forward merge 892654.
-   kmohan      09/18/00 - add OCILogon2
-   etucker     07/28/00 - add OCIIntervalFromTZ
-   vjayaram    07/18/00 - add connection pooling changes
-   etucker     07/13/00 - add dls apis for oci
-   hmasaki     07/05/00 - fix 1230846: forward merge into 8.2
-   mbastawa    06/05/00 - add OCIStmtFetch2
-   rxgovind    06/07/00 - update OCIAnyData interfaces
-   rxgovind    05/04/00 - add OCIAnyDataSet interfaces
-   rkasamse    05/01/00 - remove attrno from OCIAnyDataAttrGet
-   rkasamse    03/13/00 - add prototype s for OCCIAnyData
-   slari       09/01/99 - remove OCIEnvCallback
-   slari       08/23/99 - add OCIUcb in user callback functions
-   dsaha       07/07/99 - Add OCIFEnvCreate for forms
-   vyanaman    06/21/99 - Change OCI DateTime/Interval APIs.
-   esoyleme    07/01/99 - expose MTS performance enhancements                  
-   whe         06/14/99 - bug727872:add CONST to match definitions
-   kkarun      02/23/99 - Fix OCIDateTime APIs
-   jiyang      12/07/98 - Add comments for OCI_NLS_DUAL_CURRENCY
-   aroy        12/01/98 - add OCIEnvCreate
-   slari       11/23/98 - use ORASTDARG
-   slari       11/21/98 - replace ellipsis by arglist in OCIUserCallback
-   thchang     10/20/98 - correct comment on OCILobCreateTemporary
-   slari       09/08/98 - allow envh to receive error info also in CallbackReg/
-   kkarun      09/02/98 - Change const to CONST
-   aroy        08/04/98 - add OCITerminate calls                               
-   nramakri    06/25/98 - remove CONST from some OCIPickler APIs
-   jiyang      06/22/98 - Fix a lint error
-   nmallava    06/08/98 - ociistemporary -> envhp
-   jhasenbe    05/27/98 - Remove definitions for U-Calls (Unicode)
-   nmallava    05/18/98 - add comments
-   sgollapu    05/19/98 - Change text to OraText
-   aroy        04/20/98 - merge forward 8.0.5 -> 8.1.3
-   nbhatt      05/14/98 -  aq listen call
-   lchidamb    03/02/98 - Client Notification prototypes
-   vyanaman    04/19/98 - System Timestamp
-   kkarun      04/17/98 - Add more Interval functions
-   vyanaman    04/17/98 - Fix min (proc error)
-   vyanaman    04/16/98 - Add get/set TZ
-   kkarun      04/13/98 - Add Datetime prototypes
-   rkasamse    04/13/98 - change OCIEnv* to dvoid* for context/memory cart serv
-   rkasamse    04/15/98 - chage pickler cart interface
-   slari       03/20/98 - change proto of OCIUserCallback
-   slari       02/17/98 - add OCIUserCallback
-   jiyang      04/02/98 - Accept both env and user handles for NLS
-   rkasamse    03/20/98 - remove prototypes for OCIMemoryDuration* functions.
-   tsaulys     03/20/98 - use environment or session handle
-   nmallava    04/09/98 - OCILobLocatorAssign
-   nmallava    04/07/98 - lobgetchunksize and writeappend apis
-   jhasenbe    04/06/98 - Add new interfaces for Unicode support
-   nmallava    03/17/98 - add interfaces
-   nmallava    03/16/98 - add open/close apis
-   nmallava    03/10/98 - add temporary lobs apis
-   sgollapu    07/10/97 - Add OCIReset
-   sgollapu    02/09/98 - OCI non-blocking
-   nramakri    01/16/98 - remove #ifdef NEVER clause for OCIExtract
-   rmurthy     01/08/98 - OCIContextGenerateKey: change ub1 to ub4
-   ewaugh      12/18/97 - Turn type wrappers into functions.
-   skabraha    12/02/97 - adding OCIFile functions
-   rhwu        12/02/97 - add OCI Thread
-   nramakri    12/15/97 - move to core4
-   nramakri    12/11/97 - modify OCIExtract prototype
-   ewaugh      12/10/97 - add OCIFormat prototypes
-   nmallava    12/17/97 - Add ilob open and close apis
-   rkasamse    12/03/97 - Change some of the function names for pickler cartrid
-   nramakri    11/12/97 - add OCIExtract prototypes
-   rkasamse    11/21/97 - add prototypes for memory cartridge services and cont
-   rkasamse    11/03/97 - Add pickler cartridge interfaces.
-   jiyang      11/11/97 - Add NLS service for cartridge
-   tanguyen    08/19/97 -
-   cxcheng     07/30/97 - replace OCISvcCtx with OCISvcCtx
-   schandra    06/25/97 - AQ OCI interface
-   bnainani    07/21/97 - add prototypes for Oracle XA extensions
-   esoyleme    05/13/97 - move failover callback prototype
-   skmishra    05/06/97 - stdc compiler fixes
-   skmishra    04/24/97 - C++ Compatibility changes
-   skotsovo    04/21/97 - make lob parameter names consistent
-   rwhitman    04/16/97 - Fix LOB prototypes - Olint OCI 8.0.3
-   ramkrish    04/15/97 - Add free flag to OCILobFlushBuffer
-   dchatter    04/10/97 - add nzt.h inclusion
-   cxcheng     04/09/97 - change objnamp from CONST text* to dvoid*
-   cxcheng     04/08/97 - fix prototype of OCIDescribeAny()
-   skotsovo    03/31/97 - remove OCILobLocatorSize
-   skotsovo    03/27/97 - add OCILobLoadFromFile
-   bcchang     02/18/97 - Fix syntax error
-   dchatter    01/13/97 - fix comments on LOB calls
-   aroy        01/10/97 - remove ocilobfilecreate delete
-   sgollapu    12/27/96 - Correct OCILogon prototype
-   dchatter    01/04/97 - comments to describe the functions
-   sgollapu    11/25/96 - Change OCILobFileIsExistent
-   schandra    11/18/96 - Remove xa.h include
-   sgollapu    11/09/96 - Change prototype of OCIDescribeAny
-   dchatter    10/31/96 - delete CONST from lob write cb fn
-   dchatter    10/30/96 - more changes
-   dchatter    10/26/96 - lob/file long name corrections
-   slari       10/16/96 - delete unused calls
-   rwessman    10/29/96 - Fixed OCISecurityGetIdentity prototype
-   bcchang     10/25/96 - Fix syntax error
-   sgollapu    10/22/96 - Add OCILogon and OCILogoff
-   rwessman    10/16/96 - Added cryptographic and digital signature functions
-   sgollapu    10/10/96 - Add ocibdp and ocibdn
-   rxgovind    10/07/96 - add oci file calls
-   skotsovo    10/01/96 - move orl lob fnts to oci
-   skotsovo    09/20/96 - in OCILobGetLength(), remove the 'isnull' parameter.
-   aroy        08/29/96 - change prototype for Nchar Lob support
-   dchatter    08/21/96 - OCIResultSetToStmt prototype change
-   sthakur     08/14/96 - add OCIParamSet
-   schandra    07/26/96 - TX OCI return values - sb4->sword
-   aroy        07/17/96 - terminology change: OCILobLocator => OCILobLocator
-   dchatter    07/01/96 - create ANSI prototypes
-   dchatter    07/01/96 - Creation
-
-*/
-
- 
-#ifndef OCIAP_ORACLE
-# define OCIAP_ORACLE
-
-# ifndef ORATYPES 
-#  include <oratypes.h> 
-# endif 
- 
-#ifndef ORASTDARG
-#include <stdarg.h>
-#define ORASTDARG
-#endif
-
-#ifndef OCIDFN
-#include <ocidfn.h>
-#endif
-
-#ifndef NZT_ORACLE
-#include <nzt.h>
-#endif /* NZT_ORACLE */
- 
-#ifndef OCI_ORACLE
-#include <oci.h>
-#endif
-
-#ifndef ORT_ORACLE
-#include <ort.h>
-#endif
-
-
-
-/*---------------------------------------------------------------------------
-                     PUBLIC TYPES AND CONSTANTS
-  ---------------------------------------------------------------------------*/
-
-
-/*---------------------------------------------------------------------------
-                     PRIVATE TYPES AND CONSTANTS
-  ---------------------------------------------------------------------------*/
-
-
-/*---------------------------------------------------------------------------
-                           PUBLIC FUNCTIONS
-  ---------------------------------------------------------------------------*/
-
-/*****************************************************************************
-                              DESCRIPTION
-******************************************************************************
-Note: the descriptions of the functions are alphabetically arranged. Please 
-maintain the arrangement when adding a new function description. The actual 
-prototypes are below this comment section and donot follow any alphabetical 
-ordering. 
-
-
---------------------------------OCIAttrGet------------------------------------
-
-OCIAttrGet()
-Name
-OCI Attribute Get
-Purpose
-This call is used to get a particular attribute of a handle. 
-Syntax
-sword OCIAttrGet ( CONST dvoid    *trgthndlp,
-                 ub4            trghndltyp,
-                 dvoid          *attributep,
-                 ub4            *sizep,
-                 ub4            attrtype,
-                 OCIError       *errhp );
-Comments
-This call is used to get a particular attribute of a handle.
-See Appendix B,  "Handle Attributes",  for a list of handle types and their 
-readable attributes.
-Parameters
-trgthndlp (IN) - is the pointer to a handle type. 
-trghndltyp (IN) - is the handle type. 
-attributep (OUT) - is a pointer to the storage for an attribute value. The 
-attribute value is filled in. 
-sizep (OUT) - is the size of the attribute value. 
-This can be passed in as NULL for most parameters as the size is well known. 
-For text* parameters, a pointer to a ub4 must be passed in to get the length 
-of the string. 
-attrtype (IN) - is the type of attribute.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-Related Functions
-OCIAttrSet()
-
---------------------------------OCIAttrSet------------------------------------
-
-
-OCIAttrSet()
-Name
-OCI Attribute Set
-Purpose
-This call is used to set a particular attribute of a handle or a descriptor. 
-Syntax
-sword OCIAttrSet ( dvoid       *trgthndlp,
-                 ub4         trghndltyp,
-                 dvoid       *attributep,
-                 ub4         size,
-                 ub4         attrtype,
-                 OCIError    *errhp );
-Comments
-This call is used to set a particular attribute of a handle or a descriptor. 
-See Appendix B for a list of handle types and their writeable attributes.
-Parameters
-trghndlp (IN/OUT) - the pointer to a handle type whose attribute gets 
-modified. 
-trghndltyp (IN/OUT) - is the handle type. 
-attributep (IN) - a pointer to an attribute value. 
-The attribute value is copied into the target handle. If the attribute value 
-is a pointer, then only the pointer is copied, not the contents of the pointer.
-size (IN) - is the size of an attribute value. This can be passed in as 0 for 
-most attributes as the size is already known by the OCI library. For text*
-attributes, a ub4 must be passed in set to the length of the string. 
-attrtype (IN) - the type of attribute being set.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-Related Functions
-OCIAttrGet()
-
-
-
---------------------------------OCIBindArrayOfStruct--------------------------
-
-
-
-OCIBindArrayOfStruct()
-Name
-OCI Bind for Array of Structures
-Purpose
-This call sets up the skip parameters for a static array bind.
-Syntax
-sword OCIBindArrayOfStruct ( OCIBind     *bindp,
-                           OCIError    *errhp,
-                           ub4         pvskip, 
-                           ub4         indskip, 
-                           ub4         alskip, 
-                           ub4         rcskip );
-Comments
-This call sets up the skip parameters necessary for a static array bind.
-This call follows a call to OCIBindByName() or OCIBindByPos(). The bind 
-handle returned by that initial bind call is used as a parameter for the 
-OCIBindArrayOfStruct() call.
-For information about skip parameters, see the section "Arrays of Structures" 
-on page 4-16.
-Parameters
-bindp (IN) - the handle to a bind structure. 
-errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-pvskip (IN) - skip parameter for the next data value. 
-indskip (IN) - skip parameter for the next indicator value or structure. 
-alskip (IN) - skip parameter for the next actual length value. 
-rcskip (IN) - skip parameter for the next column-level return code value. 
-Related Functions
-OCIAttrGet()
-
-
---------------------------------OCIBindByName---------------------------------
-
-OCIBindByName()
-Name
-OCI Bind by Name
-Purpose
-Creates an association between a program variable and a placeholder in a SQL 
-statement or PL/SQL block.
-Syntax
-sword OCIBindByName (
-              OCIStmt       *stmtp, 
-              OCIBind       **bindp,
-              OCIError      *errhp,
-              CONST OraText    *placeholder,
-              sb4           placeh_len,
-              dvoid         *valuep,
-              sb4           value_sz,
-              ub2           dty,
-              dvoid         *indp,
-              ub2           *alenp,
-              ub2           *rcodep,
-              ub4           maxarr_len,
-              ub4           *curelep, 
-              ub4           mode ); 
-Description
-This call is used to perform a basic bind operation. The bind creates an 
-association between the address of a program variable and a placeholder in a 
-SQL statement or PL/SQL block. The bind call also specifies the type of data 
-which is being bound, and may also indicate the method by which data will be 
-provided at runtime.
-This function also implicitly allocates the bind handle indicated by the bindp 
-parameter.
-Data in an OCI application can be bound to placeholders statically or 
-dynamically. Binding is static when all the IN bind data and the OUT bind 
-buffers are well-defined just before the execute. Binding is dynamic when the 
-IN bind data and the OUT bind buffers are provided by the application on 
-demand at execute time to the client library. Dynamic binding is indicated by 
-setting the mode parameter of this call to OCI_DATA_AT_EXEC.
-Related Functions: For more information about dynamic binding, see 
-the section "Runtime Data Allocation and Piecewise Operations" on 
-page 5-16.
-Both OCIBindByName() and OCIBindByPos() take as a parameter a bind handle, 
-which is implicitly allocated by the bind call A separate bind handle is 
-allocated for each placeholder the application is binding.
-Additional bind calls may be required to specify particular attributes 
-necessary when binding certain data types or handling input data in certain 
-ways:
-If arrays of structures are being utilized, OCIBindArrayOfStruct() must 
-be called to set up the necessary skip parameters.
-If data is being provided dynamically at runtime, and the application 
-will be using user-defined callback functions, OCIBindDynamic() must 
-be called to register the callbacks.
-If a named data type is being bound, OCIBindObject() must be called to 
-specify additional necessary information.
-Parameters
-stmth (IN/OUT) - the statement handle to the SQL or PL/SQL statement 
-being processed.
-bindp (IN/OUT) - a pointer to a pointer to a bind handle which is implicitly 
-allocated by this call.  The bind handle  maintains all the bind information 
-for this particular input value. The handle is feed implicitly when the 
-statement handle is deallocated.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-placeholder (IN) - the placeholder attributes are specified by name if 
-ocibindn() is being called.
-placeh_len (IN) - the length of the placeholder name specified in placeholder.
-valuep (IN/OUT) - a pointer to a data value or an array of data values of the 
-type specified in the dty parameter. An array of data values can be specified 
-for mapping into a PL/SQL table or for providing data for SQL multiple-row 
-operations. When an array of bind values is provided, this is called an array 
-bind in OCI terms. Additional attributes of the array bind (not bind to a 
-column of ARRAY type) are set up in OCIBindArrayOfStruct() call. 
-For a REF, named data type  bind, the valuep parameter is used only for IN 
-bind data. The pointers to OUT buffers are set in the pgvpp parameter 
-initialized by OCIBindObject(). For named data type and REF binds, the bind 
-values are unpickled into the Object Cache. The OCI object navigational calls 
-can then be used to navigate the objects and the refs in the Object Cache.
-If the OCI_DATA_AT_EXEC mode is specified in the mode parameter, valuep 
-is ignored for all data types. OCIBindArrayOfStruct() cannot be used and 
-OCIBindDynamic() must be invoked to provide callback functions if desired. 
-value_sz (IN) - the size of a data value. In the case of an array bind, this is
-the maximum size of any element possible with the actual sizes being specified 
-in the alenp parameter. 
-If the OCI_DATA_AT_EXEC mode is specified, valuesz defines the maximum 
-size of the data that can be ever provided at runtime for data types other than
-named data types or REFs. 
-dty (IN) - the data type of the value(s) being bound. Named data types 
-(SQLT_NTY) and REFs (SQLT_REF) are valid only if the application has been 
-initialized in object mode. For named data types, or REFs, additional calls 
-must be made with the bind handle to set up the datatype-specific attributes.
-indp (IN/OUT) - pointer to an indicator variable or array. For scalar data 
-types, this is a pointer to sb2 or an array of sb2s. For named data types, 
-this pointer is ignored and the actual pointer to the indicator structure or 
-an array of indicator structures is initialized by OCIBindObject(). 
-Ignored for dynamic binds.
-See the section "Indicator Variables" on page 2-43 for more information about 
-indicator variables.
-alenp (IN/OUT) - pointer to array of actual lengths of array elements. Each 
-element in alenp is the length of the data in the corresponding element in the 
-bind value array before and after the execute. This parameter is ignored for 
-dynamic binds.
-rcodep (OUT) - pointer to array of column level return codes. This parameter 
-is ignored for dynamic binds.
-maxarr_len (IN) - the maximum possible number of elements of type dty in a 
-PL/SQL binds. This parameter is not required for non-PL/SQL binds. If 
-maxarr_len is non-zero, then either OCIBindDynamic() or 
-OCIBindArrayOfStruct() can be invoked to set up additional bind attributes. 
-curelep(IN/OUT) - a pointer to the actual number of elements. This parameter 
-is only required for PL/SQL binds.
-mode (IN) - the valid modes for this parameter are:
-OCI_DEFAULT. This is default mode.
-OCI_DATA_AT_EXEC. When this mode is selected, the value_sz 
-parameter defines the maximum size of the data that can be ever 
-provided at runtime. The application must be ready to provide the OCI 
-library runtime IN data buffers at any time and any number of times. 
-Runtime data is provided in one of the two ways:
-callbacks using a user-defined function which must be registered 
-with a subsequent call to OCIBindDynamic(). 
-a polling mechanism using calls supplied by the OCI. This mode 
-is assumed if no callbacks are defined.
-For more information about using the OCI_DATA_AT_EXEC mode, see 
-the section "Runtime Data Allocation and Piecewise Operations" on 
-page 5-16.
-When the allocated buffers are not required any more, they should be 
-freed by the client. 
-Related Functions
-OCIBindDynamic(), OCIBindObject(), OCIBindArrayOfStruct(), OCIAttrGet()
-
-
-
--------------------------------OCIBindByPos-----------------------------------
-
-
-OCIBindByPos()
-Name
-OCI Bind by Position
-Purpose
-Creates an association between a program variable and a placeholder in a SQL 
-statement or PL/SQL block.
-Syntax
-sword OCIBindByPos ( 
-              OCIStmt      *stmtp, 
-              OCIBind      **bindp,
-              OCIError     *errhp,
-              ub4          position,
-              dvoid        *valuep,
-              sb4          value_sz,
-              ub2          dty,
-              dvoid        *indp,
-              ub2          *alenp,
-              ub2          *rcodep,
-              ub4          maxarr_len,
-              ub4          *curelep, 
-              ub4          mode);
-
-Description
-This call is used to perform a basic bind operation. The bind creates an 
-association between the address of a program variable and a placeholder in a 
-SQL statement or PL/SQL block. The bind call also specifies the type of data 
-which is being bound, and may also indicate the method by which data will be 
-provided at runtime.
-This function also implicitly allocates the bind handle indicated by the bindp 
-parameter.
-Data in an OCI application can be bound to placeholders statically or 
-dynamically. Binding is static when all the IN bind data and the OUT bind 
-buffers are well-defined just before the execute. Binding is dynamic when the 
-IN bind data and the OUT bind buffers are provided by the application on 
-demand at execute time to the client library. Dynamic binding is indicated by 
-setting the mode parameter of this call to OCI_DATA_AT_EXEC.
-Related Functions: For more information about dynamic binding, see 
-the section "Runtime Data Allocation and Piecewise Operations" on 
-page 5-16
-Both OCIBindByName() and OCIBindByPos() take as a parameter a bind handle, 
-which is implicitly allocated by the bind call A separate bind handle is 
-allocated for each placeholder the application is binding.
-Additional bind calls may be required to specify particular attributes 
-necessary when binding certain data types or handling input data in certain 
-ways:
-If arrays of structures are being utilized, OCIBindArrayOfStruct() must 
-be called to set up the necessary skip parameters.
-If data is being provided dynamically at runtime, and the application 
-will be using user-defined callback functions, OCIBindDynamic() must 
-be called to register the callbacks.
-If a named data type is being bound, OCIBindObject() must be called to 
-specify additional necessary information.
-Parameters
-stmth (IN/OUT) - the statement handle to the SQL or PL/SQL statement 
-being processed.
-bindp (IN/OUT) - a pointer to a pointer to a bind handle which is implicitly 
-allocated by this call.  The bind handle  maintains all the bind information 
-for this particular input value. The handle is feed implicitly when the 
-statement handle is deallocated.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-position (IN) - the placeholder attributes are specified by position if 
-ocibindp() is being called.
-valuep (IN/OUT) - a pointer to a data value or an array of data values of the 
-type specified in the dty parameter. An array of data values can be specified 
-for mapping into a PL/SQL table or for providing data for SQL multiple-row 
-operations. When an array of bind values is provided, this is called an array 
-bind in OCI terms. Additional attributes of the array bind (not bind to a 
-column of ARRAY type) are set up in OCIBindArrayOfStruct() call. 
-For a REF, named data type  bind, the valuep parameter is used only for IN 
-bind data. The pointers to OUT buffers are set in the pgvpp parameter 
-initialized by OCIBindObject(). For named data type and REF binds, the bind 
-values are unpickled into the Object Cache. The OCI object navigational calls 
-can then be used to navigate the objects and the refs in the Object Cache.
-If the OCI_DATA_AT_EXEC mode is specified in the mode parameter, valuep 
-is ignored for all data types. OCIBindArrayOfStruct() cannot be used and 
-OCIBindDynamic() must be invoked to provide callback functions if desired. 
-value_sz (IN) - the size of a data value. In the case of an array bind, this is
-the maximum size of any element possible with the actual sizes being specified
-in the alenp parameter. 
-If the OCI_DATA_AT_EXEC mode is specified, valuesz defines the maximum 
-size of the data that can be ever provided at runtime for data types other than
-named data types or REFs. 
-dty (IN) - the data type of the value(s) being bound. Named data types 
-(SQLT_NTY) and REFs (SQLT_REF) are valid only if the application has been 
-initialized in object mode. For named data types, or REFs, additional calls 
-must be made with the bind handle to set up the datatype-specific attributes.
-indp (IN/OUT) - pointer to an indicator variable or array. For scalar data 
-types, this is a pointer to sb2 or an array of sb2s. For named data types, 
-this pointer is ignored and the actual pointer to the indicator structure or 
-an array of indicator structures is initialized by OCIBindObject(). Ignored 
-for dynamic binds.
-See the section "Indicator Variables" on page 2-43 for more information about 
-indicator variables.
-alenp (IN/OUT) - pointer to array of actual lengths of array elements. Each 
-element in alenp is the length of the data in the corresponding element in the 
-bind value array before and after the execute. This parameter is ignored for 
-dynamic binds.
-rcodep (OUT) - pointer to array of column level return codes. This parameter 
-is ignored for dynamic binds.
-maxarr_len (IN) - the maximum possible number of elements of type dty in a 
-PL/SQL binds. This parameter is not required for non-PL/SQL binds. If 
-maxarr_len is non-zero, then either OCIBindDynamic() or 
-OCIBindArrayOfStruct() can be invoked to set up additional bind attributes. 
-curelep(IN/OUT) - a pointer to the actual number of elements. This parameter 
-is only required for PL/SQL binds.
-mode (IN) - the valid modes for this parameter are:
-OCI_DEFAULT. This is default mode.
-OCI_DATA_AT_EXEC. When this mode is selected, the value_sz 
-parameter defines the maximum size of the data that can be ever 
-provided at runtime. The application must be ready to provide the OCI 
-library runtime IN data buffers at any time and any number of times. 
-Runtime data is provided in one of the two ways:
-callbacks using a user-defined function which must be registered 
-with a subsequent call to OCIBindDynamic() . 
-a polling mechanism using calls supplied by the OCI. This mode 
-is assumed if no callbacks are defined.
-For more information about using the OCI_DATA_AT_EXEC mode, see 
-the section "Runtime Data Allocation and Piecewise Operations" on 
-page 5-16.
-When the allocated buffers are not required any more, they should be 
-freed by the client. 
-Related Functions
-OCIBindDynamic(), OCIBindObject(), OCIBindArrayOfStruct(), OCIAttrGet()
-
-
-
--------------------------------OCIBindDynamic---------------------------------
-
-OCIBindDynamic()
-Name
-OCI Bind Dynamic Attributes
-Purpose
-This call is used to register user callbacks for dynamic data allocation. 
-Syntax
-sword OCIBindDynamic( OCIBind     *bindp,
-                    OCIError    *errhp,
-                    dvoid       *ictxp, 
-                    OCICallbackInBind         (icbfp)(
-                                dvoid            *ictxp,
-                                OCIBind          *bindp,
-                                ub4              iter, 
-                                ub4              index, 
-                                dvoid            **bufpp,
-                                ub4              *alenp,
-                                ub1              *piecep, 
-                                dvoid            **indp ),
-                    dvoid       *octxp,
-                    OCICallbackOutBind         (ocbfp)(
-                                dvoid            *octxp,
-                                OCIBind          *bindp,
-                                ub4              iter, 
-                                ub4              index, 
-                                dvoid            **bufp, 
-                                ub4              **alenpp,
-                                ub1              *piecep,
-                                dvoid            **indpp, 
-                                ub2              **rcodepp)   );
-Comments
-This call is used to register user-defined callback functions for providing 
-data for an UPDATE or INSERT if OCI_DATA_AT_EXEC mode was specified in a 
-previous call to OCIBindByName() or OCIBindByPos(). 
-The callback function pointers must return OCI_CONTINUE if it the call is 
-successful. Any return code other than OCI_CONTINUE signals that the client 
-wishes to abort processing immediately.
-For more information about the OCI_DATA_AT_EXEC mode, see the section 
-"Runtime Data Allocation and Piecewise Operations" on page 5-16.
-Parameters
-bindp (IN/OUT) - a bind handle returned by a call to OCIBindByName() or 
-OCIBindByPos(). 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-ictxp (IN) - the context pointer required by the call back function icbfp. 
-icbfp (IN) - the callback function which returns a pointer to the IN bind 
-value or piece at run time. The callback takes in the following parameters. 
-ictxp (IN/OUT) - the context pointer for this callback function. 
-bindp (IN) - the bind handle passed in to uniquely identify this bind 
-variable. 
-iter (IN) - 1-based execute iteration value. 
-index (IN) - index of the current array, for an array bind. 1 based not 
-greater than curele parameter of the bind call. 
-index (IN) - index of the current array, for an array bind. This parameter 
-is 1-based, and may not be greater than curele parameter of the bind call. 
-bufpp (OUT) - the pointer to the buffer. 
-piecep (OUT) - which piece of the bind value. This can be one of the 
-following values - OCI_ONE_PIECE, OCI_FIRST_PIECE, 
-OCI_NEXT_PIECE and OCI_LAST_PIECE.
-indp (OUT) - contains the indicator value. This is apointer to either an 
-sb2 value or a pointer to an indicator structure for binding named data 
-types. 
-indszp (OUT) - contains the indicator value size. A pointer containing 
-the size of either an sb2 or an indicator structure pointer. 
-octxp (IN) - the context pointer required by the callback function ocbfp. 
-ocbfp (IN) - the callback function which returns a pointer to the OUT bind 
-value or piece at run time. The callback takes in the following parameters. 
-octxp (IN/OUT) - the context pointer for this call back function. 
-bindp (IN) - the bind handle passed in to uniquely identify this bind 
-variable. 
-iter (IN) - 1-based execute iteration value. 
-index (IN) - index of the current array, for an array bind. This parameter 
-is 1-based, and must not be greater than curele parameter of the bind call. 
-bufpp (OUT) - a pointer to a buffer to write the bind value/piece. 
-buflp (OUT) - returns the buffer size. 
-alenpp (OUT) - a pointer to a storage for OCI to fill in the size of the bind 
-value/piece after it has been read. 
-piecep (IN/OUT) - which piece of the bind value. It will be set by the 
-library to be one of the following values - OCI_ONE_PIECE or 
-OCI_NEXT_PIECE. The callback function can leave it unchanged or set 
-it to OCI_FIRST_PIECE or OCI_LAST_PIECE. By default - 
-OCI_ONE_PIECE. 
-indpp (OUT) - returns a pointer to contain the indicator value which 
-either an sb2 value or a pointer to an indicator structure for named data 
-types. 
-indszpp (OUT) - returns a pointer to return the size of the indicator 
-value which is either size of an sb2 or size of an indicator structure. 
-rcodepp (OUT) - returns a pointer to contains the return code. 
-Related Functions
-OCIAttrGet()
-
-
----------------------------------OCIBindObject--------------------------------
-
-
-OCIBindObject()
-Name
-OCI Bind Object
-Purpose
-This function sets up additional attributes which are required for a named 
-data type (object)  bind.
-Syntax
-sword OCIBindObject ( OCIBind          *bindp,
-                    OCIError         *errhp, 
-                    CONST OCIType    *type,
-                    dvoid            **pgvpp, 
-                    ub4              *pvszsp, 
-                    dvoid            **indpp, 
-                    ub4              *indszp, );
-Comments
-This function sets up additional attributes which binding a named data type 
-or a REF. An error will be returned if this function is called when the OCI 
-environment has been initialized in non-object mode. 
-This call takes as a paramter a type descriptor object (TDO) of datatype 
-OCIType for the named data type being defined.  The TDO can be retrieved 
-with a call to OCITypeByName().
-If the OCI_DATA_AT_EXEC mode was specified in ocibindn() or ocibindp(), the 
-pointers to the IN buffers are obtained either using the callback icbfp 
-registered in the OCIBindDynamic() call or by the OCIStmtSetPieceInfo() call. 
-The buffers are dynamically allocated for the OUT data and the pointers to 
-these buffers are returned either by calling ocbfp() registered by the 
-OCIBindDynamic() or by setting the pointer to the buffer in the buffer passed 
-in by OCIStmtSetPieceInfo() called when OCIStmtExecute() returned 
-OCI_NEED_DATA. The memory of these client library- allocated buffers must be 
-freed when not in use anymore by using the OCIObjectFreee() call.
-Parameters
-bindp ( IN/OUT) - the bind handle returned by the call to OCIBindByName() 
-or OCIBindByPos(). 
-errhp ( IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-type ( IN) - points to the TDO which describes the type of the program 
-variable being bound. Retrieved by calling OCITypeByName().
-pgvpp ( IN/OUT) - points to a pointer to the program variable buffer. For an 
-array, pgvpp points to an array of pointers. When the bind variable is also an 
-OUT variable, the OUT Named Data Type value or REF is allocated 
-(unpickled) in the Object Cache, and a pointer to the value or REF is returned,
-At the end of execute, when all OUT values have been received, pgvpp points 
-to an array of pointer(s) to these newly allocated named data types in the 
-object cache. 
-pgvpp is ignored if the OCI_DATA_AT_EXEC mode is set. Then the Named 
-Data Type buffers are requested at runtime. For static array binds, skip 
-factors may be specified using the OCIBindArrayOfStruct() call. The skip 
-factors are used to compute the address of the next pointer to the value, the 
-indicator structure and their sizes.
-pvszsp ( IN/OUT) - points to the size of the program variable. The size of the 
-named data type is not required on input. For an array, pvszsp is an array of 
-ub4s. On return, for OUT bind variables, this points to size(s) of the Named 
-Data Types and REFs received. pvszsp is ignored if the OCI_DATA_AT_EXEC 
-mode is set. Then the size of the buffer is taken at runtime.
-indpp ( IN/OUT) - points to a pointer to the program variable buffer 
-containing the parallel indicator structure. For an array, points to an array 
-of pointers. When the bind variable is also an OUT bind variable, memory is 
-allocated in the object cache, to store the unpickled OUT indicator values. At 
-the end of the execute when all OUT values have been received, indpp points 
-to the pointer(s) to these newly allocated indicator structure(s). 
-indpp is ignored if the OCI_DATA_AT_EXEC mode is set. Then the indicator 
-is requested at runtime.
-indszp ( IN/OUT) - points to the size of the IN indicator structure program 
-variable. For an array, it is an array of sb2s. On return for OUT bind 
-variables, this points to size(s) of the received OUT indicator structures.
-indszp is ignored if the OCI_DATA_AT_EXEC mode is set. Then the indicator 
-size is requested at runtime.
-Related Functions
-OCIAttrGet()
-
-
-
-----------------------------------OCIBreak------------------------------------
-
-
-OCIBreak()
-Name
-OCI Break
-Purpose
-This call performs an immediate (asynchronous) abort of any currently 
-executing OCI function that is associated with a server .
-Syntax
-sword OCIBreak ( dvoid      *hndlp,
-                 OCIError   *errhp);
-Comments
-This call performs an immediate (asynchronous) abort of any currently 
-executing OCI function that is associated with a server. It is normally used 
-to stop a long-running OCI call being processed on the server.
-This call can take either the service context handle or the server context 
-handle as a parameter to identify the function to be aborted.
-Parameters
-hndlp (IN) - the service context handle or the server context handle.
-errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-Related Functions
-
------------------------------OCIConnectionPoolCreate --------------------------
-Name:
-OCIConnectionPoolCreate
-
-Purpose:
-Creates the connections in the pool
-
-Syntax:
-OCIConnectionPoolCreate (OCIEnv *envhp, OCIError *errhp, OCICPool *poolhp,
-                         OraText **poolName, sb4 *poolNameLen, 
-                         CONST Oratext *dblink, sb4 dblinkLen,
-                         ub4 connMin, ub4 connMax, ub4 connIncr,
-                         CONST OraText *poolUsername, sb4 poolUserLen,
-                         CONST OraText *poolPassword, sb4 poolPassLen, 
-                         ub4 mode)
-Comments:
-This call is used to create a connection pool. conn_min connections
-to the database are started on calling OCIConnectionPoolCreate.
-
-Parameters:
-envhp (IN/OUT)  - A pointer to the environment where the Conencton Pool
-                  is to be created
-errhp (IN/OUT)  - An error handle which can be passed to OCIErrorGet().
-poolhp (IN/OUT) - An uninitialiazed pool handle.
-poolName (OUT) - The connection pool name. 
-poolNameLen (OUT) - The length of the connection pool name 
-dblink (IN/OUT) - Specifies the database(server) to connect. This will also
-                  be used as the default pool name.
-dblinkLen (IN)  - The length of the string pointed to by dblink.
-connMin (IN)    - Specifies the minimum number of connections in the
-                  Connection Pool at any instant.
-                  connMin number of connections are started when
-                  OCIConnectionPoolCreate() is called.
-connMax (IN)    - Specifies the maximum number of connections that can be
-                  opened to the database. Once this value is reached, no
-                  more connections are opened.
-connIncr (IN)   - Allows application to set the next increment for
-                  connections to be opened to the database if the current
-                  number of connections are less than conn_max.
-poolUsername (IN/OUT) - Connection pooling requires an implicit proxy
-                         session and this attribute provides a username
-                         for that session.
-poolUserLen (IN) - This represents the length of pool_username.
-poolPassword (IN/OUT) - The password for the parameter pool_username passed
-                        above.
-poolPassLen (IN) - This represents the length of pool_password.
-
-mode (IN) - The modes supported are OCI_DEFAULT and 
-OCI_CPOOL_REINITIALIZE 
-
-Related Functions
-OCIConnectionPoolDestroy()
-
----------------------------------------------------------------------------
-
-----------------------------OCIConnectionPoolDestroy-------------------------
-Name:
-OCIConnectionPoolDestroy
-
-Purpose:
-Terminates the connections in the pool
-
-Syntax:
-OCIConnectionPoolDestroy (OCICPool *poolhp, OCIError *errhp, ub4 mode)
-
-Comments:
-On calling OCIConnectionPoolDestroy, all the open connections in the pool
-are closed and the pool is destroyed.
-
-Parameters:
-poolhp (IN/OUT) - An initialiazed pool handle.
-errhp (IN/OUT)  - An error handle which can be passed to OCIErrorGet().
-mode (IN)       - Currently, OCIConnectionPoolDestroy() will support only
-                  the OCI_DEFAULT mode.
-
-Related Functions:
-OCIConnectionPoolCreate()
-
------------------------------------------------------------------------------
-----------------------------OCISessionPoolCreate-----------------------------
-Name: 
-OCISessionPoolCreate
-
-Purpose:
-Creates the sessions in the session pool.
-
-Syntax:
-sword OCISessionPoolCreate (OCIEnv *envhp, OCIError *errhp, OCISpool *spoolhp, 
-                      OraText **poolName, ub4 *poolNameLen, 
-                      CONST OraText *connStr, ub4 connStrLen,
-                      ub4 sessMin, ub4 sessMax, ub4 sessIncr,
-                      OraText *userid,  ub4 useridLen,
-                      OraText *password, ub4 passwordLen,
-                      ub4 mode)
-
-Comments:
-When OCISessionPoolCreate is called, a session pool is initialized for
-the associated environment and the database specified by the
-connStr parameter. This pool is named uniquely and the name
-is returned to the user in the poolname parameter.
-
-Parameters:
-envhp (IN/OUT) - A pointer to the environment handle in which the session
-                 pool needs to be created.
-errhp (IN/OUT) - An error handle which can be passed to OCIErrorGet().
-spoolhp (IN/OUT) - A pointer to the session pool handle that is created.
-poolName (OUT) - Session pool name returned to the user.
-poolNameLen (OUT) - Length of the PoolName
-connStr (IN) - The TNS alias of the database to connect to.
-connStrLen (IN) - Length of the connStr.
-sessMin (IN) - Specifies the minimum number of sessions in the Session Pool.
-               These are the number of sessions opened in the beginning, if
-               in Homogeneous mode. Else, the parameter is ignored.
-sessMax (IN) - Specifies the maximum number of sessions in the Session Pool.
-               Once this value is reached, no more sessions are opened,
-               unless the OCI_ATTR_SPOOL_FORCEGET is set.
-userid (IN) - Specifies the userid with which to start up the sessions.
-useridLen (IN) - Length of userid.
-password (IN) - Specifies the password for the corresponding userid.
-passwordLen (IN) - Specifies the length of the password
-mode(IN) - May be OCI_DEFAULT, OCI_SPC_SPOOL_REINITIALIZE, or
-           OCI_SPC_SPOOL_HOMOGENEOUS.
-
-Returns:
-SUCCESS - If pool could be allocated and created successfully.
-ERROR - If above conditions could not be met.
-
-Related Functions:
-OCISessionPoolDestroy()
------------------------------------------------------------------------------
------------------------------OCISessionPoolDestroy---------------------------
-Name:
-OCISessionPoolDestroy
-
-Purpose:
-Terminates all the sessions in the session pool.
-
-Syntax:
-sword OCISessionPoolDestroy (OCISPool *spoolhp, OCIError *errhp, ub4 mode)
-
-Comments:
-spoolhp (IN/OUT) - The pool handle of the session pool to be destroyed.
-errhp (IN/OUT) - An error handle which can be passed to OCIErrorGet().
-mode (IN) - Currently only OCI_DEFAULT mode is supported.
-
-Returns:
-SUCCESS - All the sessions could be closed.
-ERROR - If the above condition is not met.
-
-Related Functions:
-OCISessionPoolCreate()
------------------------------------------------------------------------------
--------------------------------OCISessionGet---------------------------------
-Name:
-OCISessionGet
-
-Purpose:
-Get a session. This could be from a session pool, connection pool or
-a new standalone session.
-
-Syntax:
-sword OCISessionGet(OCIenv *envhp, OCIError *errhp, OCISvcCtx **svchp,
-                    OCIAuthInfo *authhp,
-                    OraText *poolName, ub4 poolName_len,
-                    CONST OraText *tagInfo, ub4 tagInfo_len,
-                    OraText **retTagInfo, ub4 *retTagInfo_len,
-                    boolean *found,
-                    ub4 mode)
-
-Comments:
-envhp (IN/OUT) - OCI environment handle.
-errhp (IN/OUT) - OCI error handle to be passed to OCIErrorGet().
-svchp (IN/OUT) - Address of an OCI service context pointer. This will be
-                 filled with a server and session handle, attached to the
-                 pool.
-authhp (IN/OUT) - OCI Authentication Information handle.
-poolName (IN) - This indicates the session/connection pool to get the
-                session/connection from in the OCI_SPOOL/OCI_CPOOL mode.
-                In the OCI_DEFAULT mode it refers to the connect string.
-poolName_len (IN) - length of poolName.
-tagInfo (IN) - indicates the tag of the session that the user wants. If the
-                   user wants a default session, he must specify a NULL here.
-                   Only used for Session Pooling.
-tagInfo_len (IN) - the length of tagInfo.
-retTagInfo (OUT) - This indicates the type of session that is returned to
-                   the user. Only used for Session Pooling.
-retTagInfo_len (OUT) - the length of retTagInfo.
-found (OUT) - set to true if the user gets a session he had requested, else
-              set to false. Only used for Session Pooling.
-mode (IN) - The supported modes are OCI_DEFAULT, OCI_CRED_PROXY and
-            OCI_GET_SPOOL_MATCHANY, OCI_SPOOL and OCI_CPOOL. OCI_SPOOL and
-            OCI_CPOOL are mutually exclusive.
-
-Returns:
-SUCCESS -  if a session was successfully returned into svchp.
-SUCCESS_WITH_INFO - if a session was successfully returned into svchp and the
-                    total number of sessions > maxsessions. Only valid for
-                    Session Pooling.
-ERROR - If a session could not be retrieved.
-
-Related Functions:
-OCISessionRelease()
------------------------------------------------------------------------------
----------------------------OCISessionRelease---------------------------------
-Name:
-OCISessionRelease
-
-Purpose:
-Release the session.
-
-Syntax:
-sword OCISessionRelease ( OCISvcCtx *svchp, OCIError *errhp,
-                          OraText *tag, ub4 tag_len,
-                          ub4 mode);
-
-Comments:
-svchp (IN/OUT) - The service context associated with the session/connection.
-errhp (IN/OUT) - OCI error handle to be passed to OCIErrorGet().
-tag (IN) - Only used for Session Pooling.
-           This parameter will be ignored unless mode OCI_RLS_SPOOL_RETAG is
-           specified. In this case, the session is labelled with this tag and
-           returned to the pool. If this is NULL, then the session is untagged.
-tag_len (IN) - Length of the tag. This is ignored unless mode 
-               OCI_RLS_SPOOL_RETAG is set.
-mode (IN) - The supported modes are OCI_DEFAULT, OCI_RLS_SPOOL_DROPSESS,
-            OCI_RLS_SPOOL_RETAG. The last 2 are only valid for Session Pooling.
-            When OCI_RLS_SPOOL_DROPSESS is specified, the session
-            will be removed from the session pool. If OCI_RLS_SPOOL_RETAG 
-            is set, the tag on the session will be altered. If this mode is 
-            not set, the tag and tag_len parameters will be ignored.
-
-Returns:
-ERROR - If the session could not be released successfully.
-SUCCESS - In all other cases.
-
-Related Functions:
-OCISessionGet().
------------------------------------------------------------------------------
-------------------------------OCIDateTimeAssign --------------------------
-sword OCIDateTimeAssign(dvoid *hndl, OCIError *err, CONST OCIDateTime *from, 
-                        OCIDateTime *to);
-NAME: OCIDateTimeAssign - OCIDateTime Assignment
-PARAMETERS:
-hndl (IN) - Session/Env handle.
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-from (IN) - datetime to be assigned
-to (OUT) - lhs of assignment
-DESCRIPTION:
-        Performs date assignment. The type of the output will be same as that
-        of input
-
-------------------------------OCIDateTimeCheck----------------------------
-sword OCIDateTimeCheck(dvoid *hndl, OCIError *err, CONST OCIDateTime *date, 
-                 ub4 *valid );
-NAME: OCIDateTimeCheck - OCIDateTime CHecK if the given date is valid
-PARAMETERS:
-hndl (IN) - Session/Env handle. 
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-date (IN) - date to be checked
-valid (OUT) -  returns zero for a valid date, otherwise 
-                the ORed combination of all error bits specified below:
-   Macro name                   Bit number      Error
-   ----------                   ----------      -----
-   OCI_DATE_INVALID_DAY         0x1             Bad day
-   OCI_DATE_DAY_BELOW_VALID     0x2             Bad DAy Low/high bit (1=low)
-   OCI_DATE_INVALID_MONTH       0x4             Bad MOnth
-   OCI_DATE_MONTH_BELOW_VALID   0x8             Bad MOnth Low/high bit (1=low)
-   OCI_DATE_INVALID_YEAR        0x10            Bad YeaR
-   OCI_DATE_YEAR_BELOW_VALID    0x20            Bad YeaR Low/high bit (1=low)
-   OCI_DATE_INVALID_HOUR        0x40            Bad HouR
-   OCI_DATE_HOUR_BELOW_VALID    0x80            Bad HouR Low/high bit (1=low)
-   OCI_DATE_INVALID_MINUTE      0x100           Bad MiNute
-   OCI_DATE_MINUTE_BELOW_VALID  0x200           Bad MiNute Low/high bit (1=low)
-   OCI_DATE_INVALID_SECOND      0x400           Bad SeCond
-   OCI_DATE_SECOND_BELOW_VALID  0x800           bad second Low/high bit (1=low)
-   OCI_DATE_DAY_MISSING_FROM_1582 0x1000        Day is one of those "missing"
-                                                from 1582
-   OCI_DATE_YEAR_ZERO           0x2000          Year may not equal zero
-   OCI_DATE_INVALID_TIMEZONE    0x4000          Bad Timezone
-   OCI_DATE_INVALID_FORMAT      0x8000          Bad date format input
-
-   So, for example, if the date passed in was 2/0/1990 25:61:10 in
-   (month/day/year hours:minutes:seconds format), the error returned
-   would be OCI_DATE_INVALID_DAY | OCI_DATE_DAY_BELOW_VALID |
-   OCI_DATE_INVALID_HOUR | OCI_DATE_INVALID_MINUTE
-
-DESCRIPTION:
-        Check if the given date is valid.
-RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          'date' and 'valid' pointers are NULL pointers
-
-------------------------------- OCIDateTimeCompare----------------------------
-sword OCIDateTimeCompare(dvoid *hndl, OCIError *err, CONST OCIDateTime *date1, 
-                     CONST OCIDateTime *date2,  sword *result );
-NAME: OCIDateTimeCompare - OCIDateTime CoMPare dates
-PARAMETERS:
-hndl (IN) - Session/Env handle. 
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-date1, date2 (IN) - dates to be compared
-result (OUT) - comparison result, 0 if equal, -1 if date1 < date2, 
-                1 if date1 > date2
-DESCRIPTION:
-The function OCIDateCompare compares two dates. It returns -1 if 
-date1 is smaller than date2, 0 if they are equal, and 1 if date1 is 
-greater than date2.
-RETURNS:
-       OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          invalid date
-          input dates are not mutually comparable
-
-------------------------------OCIDateTimeConvert----------------------
-sword OCIDateTimeConvert(dvoid *hndl, OCIError *err, OCIDateTime *indate, 
-                                OCIDateTime *outdate);
-NAME: OCIDateTimeConvert - Conversion between different DATETIME types
-PARAMETERS:
-hndl (IN) - Session/Env handle. 
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-indate (IN) - pointer to input date
-outdate (OUT) - pointer to output datetime 
-DESCRIPTION: Converts one datetime type to another. The result type is
-       the type of the 'outdate' descriptor.
-RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-            conversion not possible.
-   
----------------------------- OCIDateTimeFromText-----------------------
-sword OCIDateTimeFromText(dvoid *hndl, OCIError *err, CONST OraText *date_str, 
-             size_t d_str_length, CONST OraText *fmt, ub1 fmt_length,
-             CONST OraText *lang_name, size_t lang_length, OCIDateTime *date );
-NAME: OCIDateTimeFromText - OCIDateTime convert String FROM Date
-PARAMETERS:
-hndl (IN) - Session/Env handle. If Session Handle is passed, the 
-                    conversion takes place in session NLS_LANGUAGE and
-                    session NLS_CALENDAR, otherwise the default is used.
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-date_str (IN) - input string to be converted to Oracle date
-d_str_length (IN) - size of the input string, if the length is -1
-                then 'date_str' is treated as a null terminated  string
-fmt (IN) - conversion format; if 'fmt' is a null pointer, then
-                the string is expected to be in the default format for
-                the datetime type.
-fmt_length (IN) - length of the 'fmt' parameter
-lang_name (IN) - language in which the names and abbreviations of
-                days and months are specified, if null i.e. (OraText *)0,
-                the default language of session is used, 
-lang_length (IN) - length of the 'lang_name' parameter
-date (OUT) - given string converted to date
-DESCRIPTION:
-        Converts the given string to Oracle datetime type set in the 
-        OCIDateTime descriptor according to the specified format. Refer to 
-        "TO_DATE" conversion function described in "Oracle SQL Language 
-        Reference Manual" for a description of format.
-RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          invalid format
-          unknown language
-          invalid input string
-
---------------------------- OCIDateTimeGetDate-------------------------
-sword OCIDateTimeGetDate(dvoid *hndl, OCIError *err,  CONST OCIDateTime *date, 
-                           sb2 *year, ub1 *month, ub1 *day );
-NAME: OCIDateTimeGetDate - OCIDateTime Get Date (year, month, day)  
-                                portion of DATETIME. 
-PARAMETERS:
-hndl (IN) - Session/Env handle. 
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-datetime (IN) - Pointer to OCIDateTime 
-year      (OUT) - year value
-month     (OUT) - month value
-day       (OUT) - day value
-
---------------------------- OCIDateTimeGetTime ------------------------
-sword OCIDateTimeGetTime(dvoid *hndl, OCIError *err, OCIDateTime *datetime,
-                 ub1 *hour, ub1 *minute, ub1 *sec, ub4 *fsec);
-NAME: OCIDateTimeGetTime - OCIDateTime Get Time (hour, min, second, 
-                        fractional second)  of DATETIME. 
-PARAMETERS:
-hndl (IN) - Session/Env handle. 
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-datetime (IN) - Pointer to OCIDateTime 
-hour      (OUT) - hour value
-minute       (OUT) - minute value
-sec       (OUT) - second value
-fsec      (OUT) - Fractional Second value
-
---------------------------- OCIDateTimeGetTimeZoneOffset ----------------------
-sword OCIDateTimeGetTimeZoneOffset(dvoid *hndl,OCIError *err,CONST 
-              OCIDateTime *datetime,sb1 *hour,sb1  *minute);
-
-NAME: OCIDateTimeGetTimeZoneOffset - OCIDateTime Get TimeZone (hour, minute)  
-                         portion of DATETIME. 
-PARAMETERS:
-hndl (IN) - Session/Env handle. 
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-datetime (IN) - Pointer to OCIDateTime 
-hour      (OUT) - TimeZone Hour value
-minute     (OUT) - TimeZone Minute value
-
---------------------------- OCIDateTimeSysTimeStamp---------------------
-sword OCIDateTimeSysTimeStamp(dvoid *hndl, OCIError *err, 
-              OCIDateTime *sys_date );
- 
-NAME: OCIDateTimeSysTimeStamp - Returns system date/time as a TimeStamp with 
-                      timezone
-PARAMETERS:
-hndl (IN) - Session/Env handle. 
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-sys_date (OUT) - Pointer to output timestamp
- 
-DESCRIPTION: 
-        Gets the system current date and time as a timestamp with timezone
-RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-
-
-------------------------------OCIDateTimeIntervalAdd----------------------
-sword OCIDateTimeIntervalAdd(dvoid *hndl, OCIError *err, OCIDateTime *datetime,
-         OCIInterval *inter, OCIDateTime *outdatetime);
-NAME: OCIDateTimeIntervalAdd - Adds an interval to datetime
-PARAMETERS:
-hndl (IN) - Session/Env handle.
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-datetime (IN) - pointer to input datetime
-inter    (IN) - pointer to interval 
-outdatetime (IN) - pointer to output datetime. The output datetime 
-                                will be of same type as input datetime
-DESCRIPTION: 
-        Adds an interval to a datetime to produce a resulting datetime
-RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if:
-                resulting date is before Jan 1, -4713
-                resulting date is after Dec 31, 9999
-
-------------------------------OCIDateTimeIntervalSub----------------------
-sword OCIDateTimeIntervalSub(dvoid *hndl, OCIError *err, OCIDateTime *datetime,
-              OCIInterval *inter, OCIDateTime *outdatetime);
-NAME: OCIDateTimeIntervalSub - Subtracts an interval from a datetime
-PARAMETERS:
-hndl (IN) - Session/Env handle. 
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-datetime (IN) - pointer to input datetime
-inter    (IN) - pointer to interval 
-outdatetime (IN) - pointer to output datetime. The output datetime 
-                                will be of same type as input datetime
-DESCRIPTION: 
-        Subtracts an interval from a datetime and stores the result in a
-        datetime
-RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if:
-                resulting date is before Jan 1, -4713
-                resulting date is after Dec 31, 9999
-
---------------------------- OCIDateTimeConstruct-------------------------
-sword OCIDateTimeConstruct(dvoid  *hndl,OCIError *err,OCIDateTime *datetime,
-               sb2 year,ub1 month,ub1 day,ub1 hour,ub1 min,ub1 sec,ub4 fsec,
-               OraText  *timezone,size_t timezone_length);
-
-NAME: OCIDateTimeConstruct - Construct an OCIDateTime. Only the relevant
-       fields for the OCIDateTime descriptor types are used.
-PARAMETERS:
-        hndl (IN) - Session/Env handle. 
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        datetime (IN) - Pointer to OCIDateTime 
-        year      (IN) - year value
-        month     (IN) - month value
-        day       (IN) - day value        
-        hour      (IN) - hour value
-        min       (IN) - minute value
-        sec       (IN) - second value
-        fsec      (IN) - Fractional Second value
-        timezone  (IN) - Timezone string
-        timezone_length(IN) - Length of timezone string
-
-DESCRIPTION:
-       Constructs a DateTime descriptor. The type of the datetime is the
-       type of the OCIDateTime descriptor. Only the relevant fields based
-       on the type are used. For Types with timezone, the date and time
-       fields are assumed to be in the local time of the specified timezone.
-       If timezone is not specified, then session default timezone is
-       assumed.
-RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_ERROR if datetime is not valid.
-
-------------------------------OCIDateTimeSubtract-----------------------
-sword OCIDateTimeSubtract(dvoid *hndl, OCIError *err, OCIDateTime *indate1, 
-                OCIDateTime *indate2, OCIInterval *inter);
-NAME: OCIDateTimeSubtract - subtracts two datetimes to return an interval
-PARAMETERS:
-hndl (IN) - Session/Env handle. 
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-indate1(IN) - pointer to subtrahend
-indate2(IN) - pointer to minuend
-inter  (OUT) - pointer to output interval
-DESCRIPTION: 
-        Takes two datetimes as input and stores their difference in an 
-        interval. The type of the interval is the type of the 'inter'
-        descriptor.
-RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-           datetimes are not comparable.
-
---------------------------- OCIDateTimeToText--------------------------
-sword OCIDateTimeToText(dvoid *hndl, OCIError *err, CONST OCIDateTime *date, 
-                        CONST OraText *fmt, ub1 fmt_length, ub1 fsprec, 
-                        CONST OraText *lang_name, size_t lang_length, 
-                        ub4 *buf_size, OraText *buf );
-NAME: OCIDateTimeToText - OCIDateTime convert date TO String 
-PARAMETERS:
-hndl (IN) - Session/Env handle. If Session Handle is passed, the 
-                    conversion takes place in session NLS_LANGUAGE and
-                    session NLS_CALENDAR, otherwise the default is used.
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-date (IN) - Oracle datetime to be converted
-fmt (IN) - conversion format, if null string pointer (OraText*)0, then
-                the date is converted to a character string in the
-                default format for that type.
-fmt_length (IN) - length of the 'fmt' parameter
-fsprec (IN) - specifies the fractional second precision in which the
-               fractional seconds is returned.
-lang_name (IN) - specifies the language in which the names and 
-                abbreviations of months and days are returned;
-                default language of session is used if 'lang_name' 
-                is null i.e. (OraText *)0
-lang_length (IN) - length of the 'nls_params' parameter
-buf_size (IN/OUT) - size of the buffer; size of the resulting string
-                is returned via this parameter
-buf (OUT) - buffer into which the converted string is placed
-DESCRIPTION:
-        Converts the given date to a string according to the specified format.
-        Refer to "TO_DATE" conversion function described in
-        "Oracle SQL Language Reference Manual" for a description of format
-        and NLS arguments. The converted null-terminated date string is
-        stored in the buffer 'buf'.
-RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          buffer too small
-          invalid format
-          unknown language
-          overflow error
-
-----------------------------OCIDateTimeGetTimeZoneName------------------------
-sword OCIDateTimeGetTimeZoneName(dvoid *hndl, 
-                                 OCIError *err,
-                                 CONST OCIDateTime *datetime,
-                                 ub1 *buf,
-                                 ub4 *buflen);
-NAME OCIDateTimeGetTimeZoneName - OCI DateTime Get the Time Zone Name
-PARAMETERS:
-hndl (IN)      - Session/Env handle.
-err (IN/OUT)   - error handle. If there is an error, it is
-                 recorded in 'err' and this function returns OCI_ERROR.
-                 The error recorded in 'err' can be retrieved by calling
-                 OCIErrorGet().
-datetime (IN)   - Pointer to an OCIDateTime.
-buf (OUT)       - User allocated storage for name string.
-buflen (IN/OUT) - length of buf on input, length of name on out
-DESCRIPTION:
-        Returns either the timezone region name or the absolute hour and minute
-        offset. If the DateTime was created with a region id then the region 
-        name will be returned in the buf.  If the region id is zero, then the 
-        hour and minute offset is returned as "[-]HH:MM".
-RETURNS:
-       OCI_SUCCESS if the function completes successfully.
-       OCI_INVALID_HANDLE if 'err' is NULL.
-       OCI_ERROR if
-         buffer too small
-         error retrieving timezone data
-         invalid region 
-         invalid LdiDateTime type
-
----------------------------------OCIDateTimeToArray----------------------------
-sword OCIDateTimeToArray(dvoid *hndl, 
-                         OCIError *err,
-                         CONST OCIDateTime *datetime,
-                         CONST OCIInterval *reftz,
-                         ub1 *outarray,
-                         ub4 *len
-                         ub1 *fsprec);
-NAME OCIDateTimeToArray - OCI DateTime convert To Array format
-PARAMETERS:
-hndl (IN)      - Session/Env handle.
-err (IN/OUT)   - error handle. If there is an error, it is
-                 recorded in 'err' and this function returns OCI_ERROR.
-                 The error recorded in 'err' can be retrieved by calling
-                 OCIErrorGet().
-datetime (IN)   - Pointer to OCIDateTime to be converted.
-outarray (OUT)  - Result array storage
-len (OUT)        - pointer to  length of outarray.
-fsprec (IN)     - Number of fractional seconds digits.
-DESCRIPTION:
-        Returns an array representing the input DateTime descriptor.
-RETURNS:
-       OCI_SUCCESS if the function completes successfully.
-       OCI_INVALID_HANDLE if 'err' is NULL.
-       OCI_ERROR if
-         buffer too small
-         error retrieving timezone data
-         invalid region 
-         invalid LdiDateTime type
-
---------------------------------OCIDateTimeFromArray---------------------------
-sword OCIDateTimeFromArray(dvoid *hndl, 
-                         OCIError *err,
-                         ub1 *inarray,
-                         ub4 len
-                         ub1 type
-                         OCIDateTime *datetime,
-                         OCIInterval *reftz,
-                         ub1 fsprec);
-NAME OCIDateTimeFromArray - OCI DateTime convert From Array format
-PARAMETERS:
-hndl (IN)      - Session/Env handle.
-err (IN/OUT)   - error handle. If there is an error, it is
-                 recorded in 'err' and this function returns OCI_ERROR.
-                 The error recorded in 'err' can be retrieved by calling
-                 OCIErrorGet().
-inarray (IN)   - Pointer to input array representtion of DateTime
-len (IN)       - len of inarray.
-type (IN)      - One of SQLT_DATE, SQLT_TIME, SQLT_TIME_TZ, SQLT_TIMESTAMP,
-                 SQLT_TIMESTAMP_TZ, or SQLT_TIMESTAMP_LTZ.
-datetime (OUT) - Pointer to the result OCIDateTime.
-reftz (IN)     - timezone interval used with SQLT_TIMESTAMP_LTZ.
-fsprec (IN)    - fractionl seconds digits of precision (0-9).
-DESCRIPTION:
-        Returns a pointer to an OCIDateTime of type type converted from 
-        the inarray.
-RETURNS:
-       OCI_SUCCESS if the function completes successfully.
-       OCI_INVALID_HANDLE if 'err' is NULL.
-       OCI_ERROR if
-         buffer too small
-         error retrieving timezone data
-         invalid region 
-         invalid LdiDateTime type
-
-----------------------------------OCIRowidToChar-----------------------------
-Name
-OCIRowidToChar
-
-Purpose
-Converts physical/logical (universal) ROWID to chracter extended (Base 64) 
-representation into user provided buffer outbfp of length outbflp. After 
-execution outbflp contains amount of bytes converted.In case of truncation 
-error, outbflp contains required size to make this conversion successful
-and returns ORA-1405.
-
-Syntax
-sword OCIRowidToChar( OCIRowid *rowidDesc, 
-                      OraText *outbfp, 
-                      ub2 *outbflp, 
-                      OCIError *errhp)
-
-Comments
-After this conversion, ROWID in character format can be bound using
-OCIBindByPos or OCIBindByName call and used to query a row at a
-desired ROWID. 
-
-Parameters
-rowidDesc (IN)   - rowid DESCriptor which is allocated from OCIDescritorAlloc
-                   and populated by a prior SQL statement execution
-outbfp (OUT)     - pointer to the buffer where converted rowid in character 
-                   representation is stored after successful execution.
-outbflp (IN/OUT) - pointer to output buffer length variable.
-                   Before execution (IN mode) *outbflp contains the size of
-                   outbfp, after execution (OUT mode) *outbflp contains amount
-                   of bytes converted. In an event of truncation during 
-                   conversion *outbflp contains the required length to make
-                   conversion successful.
-errhp (IN/OUT)   - an error handle which can be passed to OCIErrorGet() for
-                   diagnostic information in the event of an error.
-
-------------------------------OCIDefineArrayOfStruct--------------------------
-
-
-OCIDefineArrayOfStruct()
-Name
-OCI Define for Array of Structures
-Purpose
-This call specifies additional attributes necessary for a static array define.
-Syntax
-sword OCIDefineArrayOfStruct ( OCIDefine   *defnp,
-                             OCIError    *errhp,
-                             ub4         pvskip, 
-                             ub4         indskip, 
-                             ub4         rlskip,
-                             ub4         rcskip );
-Comments
-This call specifies additional attributes necessary for an array define, 
-used in an array of structures (multi-row, multi-column) fetch.
-For more information about skip parameters, see the section "Skip Parameters" 
-on page 4-17.
-Parameters
-defnp (IN) - the handle to the define structure which was returned by a call 
-to OCIDefineByPos().
-errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-pvskip (IN) - skip parameter for the next data value.
-indskip (IN) - skip parameter for the next indicator location. 
-rlskip (IN) - skip parameter for the next return length value.
-rcskip (IN) - skip parameter for the next return code.
-Related Functions
-OCIAttrGet()
-
-
-
-
-
-OCIDefineByPos()
-Name
-OCI Define By Position
-Purpose
-Associates an item in a select-list with the type and output data buffer. 
-Syntax
-sb4 OCIDefineByPos ( 
-              OCIStmt     *stmtp, 
-              OCIDefine   **defnp,
-              OCIError    *errhp,
-              ub4         position,
-              dvoid       *valuep,
-              sb4         value_sz,
-              ub2         dty,
-              dvoid       *indp,
-              ub2         *rlenp,
-              ub2         *rcodep,
-              ub4         mode );
-Comments
-This call defines an output buffer which will receive data retreived from 
-Oracle. The define is a local step which is necessary when a SELECT statement 
-returns data to your OCI application.
-This call also implicitly allocates the define handle for the select-list item.
-Defining attributes of a column for a fetch is done in one or more calls. The 
-first call is to OCIDefineByPos(), which defines the minimal attributes 
-required to specify the fetch. 
-This call takes as a parameter a define handle, which must have been 
-previously allocated with a call to OCIHandleAlloc().
-Following the call to OCIDefineByPos() additional define calls may be 
-necessary for certain data types or fetch modes:
-A call to OCIDefineArrayOfStruct() is necessary to set up skip parameters 
-for an array fetch of multiple columns.
-A call to OCIDefineObject() is necessary to set up the appropriate 
-attributes of a named data type fetch. In this case the data buffer pointer 
-in ocidefn() is ignored.
-Both OCIDefineArrayOfStruct() and OCIDefineObject() must be called 
-after ocidefn() in order to fetch multiple rows with a column of named 
-data types.
-For a LOB define, the buffer pointer must be a lob locator of type 
-OCILobLocator , allocated by the OCIDescAlloc() call. LOB locators, and not 
-LOB values, are always returned for a LOB column. LOB values can then be 
-fetched using OCI LOB calls on the fetched locator.
-For NCHAR (fixed and varying length), the buffer pointer must point to an 
-array of bytes sufficient for holding the required NCHAR characters. 
-Nested table columns are defined and fetched like any other named data type. 
-If the mode parameter is this call is set to OCI_DYNAMIC_FETCH, the client 
-application can fetch data dynamically at runtime.
-Runtime data can be provided in one of two ways:
-callbacks using a user-defined function which must be registered with a 
-subsequent call to OCIDefineDynamic(). When the client library needs a 
-buffer to return the fetched data, the callback will be invoked and the 
-runtime buffers provided will return a piece or the whole data. 
-a polling mechanism using calls supplied by the OCI. This mode is 
-assumed if no callbacks are defined. In this case, the fetch call returns the 
-OCI_NEED_DATA error code, and a piecewise polling method is used 
-to provide the data.
-Related Functions: For more information about using the 
-OCI_DYNAMIC_FETCH mode, see the section "Runtime Data 
-Allocation and Piecewise Operations" on page 5-16 of Volume 1..
-For more information about the define step, see the section "Defining" 
-on page 2-30.
-Parameters
-stmtp (IN) - a handle to the requested SQL query operation.
-defnp (IN/OUT) - a pointer to a pointer to a define handle which is implicitly 
-allocated by this call.  This handle is used to  store the define information 
-for this column.
-errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-position (IN) - the position of this value in the select list. Positions are 
-1-based and are numbered from left to right. For example, in the SELECT 
-statement
-SELECT empno, ssn, mgrno FROM employees;
-empno is at position 1, ssn is at position 2, and mgrno is at position 3.
-valuep (IN/OUT) - a pointer to a buffer or an array of buffers of the type 
-specified in the dty parameter. A number of buffers can be specified when 
-results for more than one row are desired in a single fetch call.
-value_sz (IN) - the size of each valuep buffer in bytes. If the data is stored 
-internally in VARCHAR2 format, the number of characters desired, if different 
-from the buffer size in bytes, may be additionally specified by the using 
-OCIAttrSet(). 
-In an NLS conversion environment, a truncation error will be generated if the 
-number of bytes specified is insufficient to handle the number of characters 
-desired.
-dty (IN) - the data type. Named data type (SQLT_NTY) and REF (SQLT_REF) 
-are valid only if the environment has been intialized with in object mode. 
-indp - pointer to an indicator variable or array. For scalar data types, 
-pointer to sb2 or an array of sb2s. Ignored for named data types. For named 
-data types, a pointer to a named data type indicator structure or an array of 
-named data type indicator structures is associated by a subsequent 
-OCIDefineObject() call. 
-See the section "Indicator Variables" on page 2-43 for more information about 
-indicator variables.
-rlenp (IN/OUT) - pointer to array of length of data fetched. Each element in 
-rlenp is the length of the data in the corresponding element in the row after 
-the fetch. 
-rcodep (OUT) - pointer to array of column-level return codes
-mode (IN) - the valid modes are:
-OCI_DEFAULT. This is the default mode.
-OCI_DYNAMIC_FETCH. For applications requiring dynamically 
-allocated data at the time of fetch, this mode must be used. The user may 
-additionally call OCIDefineDynamic() to set up a callback function that 
-will be invoked to receive the dynamically allocated buffers and to set 
-up the memory allocate/free callbacks and the context for the callbacks. 
-valuep and value_sz are ignored in this mode. 
-Related Functions
-OCIDefineArrayOfStruct(), OCIDefineDynamic(), OCIDefineObject()
-
-
-
-
-OCIDefineDynamic()
-Name
-OCI Define Dynamic Fetch Attributes
-Purpose
-This call is used to set the additional attributes required if the 
-OCI_DYNAMIC_FETCH mode was selected in OCIDefineByPos(). 
-Syntax
-sword OCIDefineDynamic( OCIDefine   *defnp,
-                      OCIError    *errhp,
-                      dvoid       *octxp, 
-                      OCICallbackDefine (ocbfp)(
-                                  dvoid             *octxp,
-                                  OCIDefine         *defnp,
-                                  ub4               iter, 
-                                  dvoid             **bufpp,
-                                  ub4               **alenpp,
-                                  ub1               *piecep,
-                                  dvoid             **indpp,
-                                  ub2               **rcodep)  );
-Comments
-This call is used to set the additional attributes required if the 
-OCI_DYNAMIC_FETCH mode has been selected in a call to 
-OCIDefineByPos(). 
-When the OCI_DYNAMIC_FETCH mode is selected, buffers will be 
-dynamically allocated for REF, and named data type, values to receive the 
-data. The pointers to these buffers will be returned. 
-If OCI_DYNAMIC_FETCH mode was selected, and the call to 
-OCIDefineDynamic() is skipped, then the application can fetch data piecewise 
-using OCI calls.
-For more information about OCI_DYNAMIC_FETCH mode, see the section 
-"Runtime Data Allocation and Piecewise Operations" on page 5-16.
-Parameters
-defnp (IN/OUT) - the handle to a define structure returned by a call to 
-OCIDefineByPos().
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-octxp (IN) - points to a context for the callback function. 
-ocbfp (IN) - points to a callback function. This is invoked at runtime to get 
-a pointer to the buffer into which the fetched data or a piece of it will be 
-retreived. The callback also specifies the indicator, the return code and the 
-lengths of the data piece and indicator. The callback has the following 
-parameters:
-octxp (IN) - a context pointer passed as an argument to all the callback 
-functions.
-defnp (IN) - the define handle.
-iter (IN) - which row of this current fetch.
-bufpp (OUT) - returns a pointer to a buffer to store the column value, ie. 
-*bufp points to some appropriate storage for the column value.
-alenpp (OUT) - returns a pointer to the length of the buffer. *alenpp 
-contains the size of the buffer after return from callback. Gets set to 
-actual data size after fetch.
-piecep (IN/OUT) - returns a piece value, as follows:
-The IN value can be OCI_ONE_PIECE, OCI_FIRST_PIECE or 
-OCI_NEXT_PIECE.
-The OUT value can be OCI_ONE_PIECE if the IN value was 
-OCI_ONE_PIECE.
-The OUT value can be OCI_ONE_PIECE or OCI_FIRST_PIECE if 
-the IN value was OCI_FIRST_PIECE.
-The OUT value can only be OCI_NEXT_PIECE or 
-OCI_LAST_PIECE if the IN value was OCI_NEXT_PIECE. 
-indpp (IN) - indicator variable pointer
-rcodep (IN) - return code variable pointer
-Related Functions
-OCIAttrGet()
-OCIDefineObject()
-
-
-
-
-OCIDefineObject()
-Name
-OCI Define Named Data Type attributes
-Purpose
-Sets up additional attributes necessary for a Named Data Type define.
-Syntax
-sword OCIDefineObject ( OCIDefine       *defnp,
-                      OCIError        *errhp,
-                      CONST OCIType   *type,
-                      dvoid           **pgvpp, 
-                      ub4             *pvszsp, 
-                      dvoid           **indpp, 
-                      ub4             *indszp );
-Comments
-This call sets up additional attributes necessary for a Named Data Type define.
-An error will be returned if this function is called when the OCI environment 
-has been initialized in non-Object mode.
-This call takes as a paramter a type descriptor object (TDO) of datatype 
-OCIType for the named data type being defined.  The TDO can be retrieved 
-with a call to OCITypeByName().
-See the description of OCIInitialize() on page 13 - 43 for more information 
-about initializing the OCI process environment.
-Parameters
-defnp (IN/OUT) - a define handle previously allocated in a call to 
-OCIDefineByPos(). 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-type (IN, optional) - points to the Type Descriptor Object (TDO) which 
-describes the type of the program variable. Only used for program variables 
-of type SQLT_NTY. This parameter is optional, and may be passed as NULL 
-if it is not being used.
-pgvpp (IN/OUT) - points to a pointer to a program variable buffer. For an 
-array, pgvpp points to an array of pointers. Memory for the fetched named data 
-type instance(s) is dynamically allocated in the object cache. At the end of 
-the fetch when all the values have been received, pgvpp points to the 
-pointer(s) to these newly allocated named data type instance(s). The 
-application must call OCIObjectMarkDel() to deallocate the named data type 
-instance(s) when they are no longer needed. 
-pvszsp (IN/OUT) - points to the size of the program variable. For an array, it 
-is an array of ub4s. On return points to the size(s) of unpickled fetched 
-values.
-indpp (IN/OUT) - points to a pointer to the program variable buffer 
-containing the parallel indicator structure. For an array, points to an array 
-of pointers. Memory is allocated to store the indicator structures in the 
-object cache. At the end of the fetch when all values have been received, 
-indpp points to the pointer(s) to these newly allocated indicator structure(s).
-indszp (IN/OUT) - points to the size(s) of the indicator structure program 
-variable. For an array, it is an array of ub4s. On return points to the size(s)
-of the unpickled fetched indicator values.
-Related Functions
-OCIAttrGet()
-
-
-
-OCIDescAlloc()
-Name
-OCI Get DESCriptor or lob locator
-Purpose
-Allocates storage to hold certain data types. The descriptors can be used as 
-bind or define variables.
-Syntax
-sword OCIDescAlloc ( CONST dvoid   *parenth,
-                   dvoid         **descpp, 
-                   ub4           type,
-                   size_t        xtramem_sz,
-                   dvoid         **usrmempp);
-Comments
-Returns a pointer to an allocated and initialized structure, corresponding to 
-the type specified in type. A non-NULL descriptor or LOB locator is returned 
-on success. No diagnostics are available on error.
-This call returns OCI_SUCCESS if successful, or OCI_INVALID_HANDLE if 
-an out-of-memory error occurs. 
-Parameters
-parenth (IN) - an environment handle. 
-descpp (OUT) - returns a descriptor or LOB locator of desired type. 
-type (IN) - specifies the type of descriptor or LOB locator to be allocated. 
-The specific types are:
-OCI_DTYPE_SNAP - specifies generation of snapshot descriptor of C 
-type - OCISnapshot
-OCI_DTYPE_LOB - specifies generation of a LOB data type locator of C 
-type - OCILobLocator
-OCI_DTYPE_RSET - specifies generation of a descriptor of C type 
-OCIResult that references a result set (a number of rows as a result of a 
-query). This descriptor is bound to a bind variable of data type 
-SQLT_RSET (result set). The descriptor has to be converted into a 
-statement handle using a function - OCIResultSetToStmt() - which can 
-then be passed to OCIDefineByPos() and OCIStmtFetch() to retrieve the 
-rows of the result set.
-OCI_DTYPE_ROWID - specifies generation of a ROWID descriptor of C 
-type OCIRowid.
-OCI_DTYPE_COMPLEXOBJECTCOMP - specifies generation of a 
-complex object retrieval descriptor of C type 
-OCIComplexObjectComp.
-xtramemsz (IN) - specifies an amount of user memory to be allocated for use 
-by the application. 
-usrmempp (OUT) - returns a pointer to the user memory of size xtramemsz 
-allocated by the call for the user. 
-Related Functions
-OCIDescFree()
-
-
-
-
-OCIDescFree()
-Name
-OCI Free DESCriptor
-Purpose
-Deallocates a previously allocated descriptor.
-Syntax
-sword OCIDescFree ( dvoid    *descp,
-                  ub4      type);
-Comments
-This call frees up storage associated with the descriptor, corresponding to the
-type specified in type. Returns OCI_SUCCESS or OCI_INVALID_HANDLE. 
-All descriptors must be explicitly deallocated. OCI will not deallocate a 
-descriptor if the environment handle is deallocated.
-Parameters
-descp (IN) - an allocated descriptor. 
-type (IN) - specifies the type of storage to be freed. The specific types are: 
-OCI_DTYPE_SNAP - snapshot descriptor
-OCI_DTYPE_LOB - a LOB data type descriptor
-OCI_DTYPE_RSET - a descriptor that references a result set (a number 
-of rows as a result of a query).
-OCI_DTYPE_ROWID - a ROWID descriptor
-OCI_DTYPE_COMPLEXOBJECTCOMP - a complex object retrieval 
-descriptor
-Related Functions
-OCIDescAlloc()
-
-
-
-OCIDescribeAny()
-Name
-OCI DeSCribe Any
-Purpose
-Describes existing schema objects.
-Syntax
-sword OCIDescribeAny ( OCISvcCtx     *svchp,
-                     OCIError      *errhp,
-                     dvoid         *objptr,
-                     ub4           objnm_len,
-                     ub1           objptr_typ,
-                     ub1           info_level,
-                     ub1           objtype,
-                     OCIDesc       *dschp );
-Comments
-This is a generic describe call that describes existing schema objects: tables,
-views, synonyms, procedures, functions, packages, sequences, and types. As a 
-result of this call, the describe handle is populated with the object-specific 
-attributes which can be obtained through an OCIAttrGet() call.
-An OCIParamGet() on the describe handle returns a parameter descriptor for a 
-specified position. Parameter positions begin with 1. Calling OCIAttrGet() on 
-the parameter descriptor returns the specific attributes of a stored procedure 
-or function parameter or a table column descriptor as the case may be. 
-These subsequent calls do not need an extra round trip to the server because 
-the entire schema object description cached on the client side by 
-OCIDescribeAny(). Calling OCIAttrGet() on the describe handle can also return 
-the total number of positions.
-See the section "Describing" on page 2-33 for more information about describe 
-operations.
-Parameters
-TO BE UPDATED
-svchp (IN/OUT) - a service context handle.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-objptr (IN) - the name of the object (a null-terminated string) to be 
-described. Only procedure or function names are valid when connected to an 
-Oracle7 Server.
-objptr_len (IN) - the length of the string. Must be non-zero.
-objptr_typ (IN) - Must be OCI_OTYPE_NAME, OCI_OTYPE_REF, or OCI_OTYPE_PTR.
-info_level (IN) - reserved for future extensions. Pass OCI_DEFAULT.
-objtype (IN/OUT) - object type.
-dschp (IN/OUT) - a describe handle that is populated with describe 
-information about the object after the call.
-Related Functions
-OCIAttrGet()
-
-
-
-OCIEnvCreate()
-Name
-OCI ENVironment CREATE
-Purpose
-This function creates and initializes an environment for the rest of
-the OCI functions to work under.  This call is a replacement for both
-the OCIInitialize and OCIEnvInit calls.
-Syntax
-sword OCIEnvCreate  ( OCIEnv        **envhpp, 
-                      ub4           mode, 
-                      CONST dvoid   *ctxp, 
-                      CONST dvoid   *(*malocfp) 
-                                    (dvoid *ctxp, 
-                                        size_t size), 
-                      CONST dvoid   *(*ralocfp) 
-                                    (dvoid *ctxp, 
-                                       dvoid *memptr, 
-                                       size_t newsize), 
-                      CONST void    (*mfreefp) 
-                                    ( dvoid *ctxp, 
-                                       dvoid *memptr))
-                      size_t    xtramemsz,
-                      dvoid     **usrmempp );
- 
-Comments
-This call creates an environment for all the OCI calls using the modes
-specified by the user. This call can be used instead of the two calls
-OCIInitialize and OCIEnvInit. This function returns an environment handle
-which is then used by the remaining OCI functions. There can be multiple
-environments in OCI each with its own environment modes.  This function 
-also performs any process level initialization if required by any mode.
-For example if the user wants to initialize an environment as OCI_THREADED,
-then all libraries that are used by OCI are also initialized in the
-threaded mode. 
-
-This call should be invoked before anny other OCI call and should be used
-instead of the OCIInitialize and OCIEnvInit calls. This is the recommended
-call, although OCIInitialize and OCIEnvInit calls will still be supported
-for backward compatibility. 
- 
-envpp (OUT) - a pointer to a handle to the environment. 
-mode (IN) - specifies initialization of the mode. The valid modes are:
-OCI_DEFAULT - default mode.
-OCI_THREADED - threaded environment. In this mode, internal data 
-structures are protected from concurrent accesses by multiple threads. 
-OCI_OBJECT - will use navigational object interface. 
-ctxp (IN) - user defined context for the memory call back routines. 
-malocfp (IN) - user-defined memory allocation function. If mode is 
-OCI_THREADED, this memory allocation routine must be thread safe.
-ctxp - context pointer for the user-defined memory allocation function.
-size - size of memory to be allocated by the user-defined memory 
-allocation function
-ralocfp (IN) - user-defined memory re-allocation function. If mode is 
-OCI_THREADED, this memory allocation routine must be thread safe.
-ctxp - context pointer for the user-defined memory reallocation 
-function.
-memp - pointer to memory block
-newsize - new size of memory to be allocated
-mfreefp (IN) - user-defined memory free function. If mode is 
-OCI_THREADED, this memory free routine must be thread safe.
-ctxp - context pointer for the user-defined memory free function.
-memptr - pointer to memory to be freed
-xtramemsz (IN) - specifies the amount of user memory to be allocated. 
-usrmempp (OUT) - returns a pointer to the user memory of size xtramemsz 
-allocated by the call for the user.
-
-Example
-
-Related Functions
-OCIInitialize, OCIEnvInit
-
-OCIEnvNlsCreate()
-Name
-OCI ENVironment CREATE with NLS info
-Purpose
-This function does almost everything OCIEnvCreate does, plus enabling setting
-of charset and ncharset programmatically, except OCI_UTF16 mode.
-Syntax
-sword OCIEnvNlsCreate(OCIEnv        **envhpp,
-                      ub4           mode,
-                      dvoid         *ctxp,
-                      dvoid         *(*malocfp)
-                                    (dvoid *ctxp,
-                                        size_t size),
-                      dvoid         *(*ralocfp)
-                                    (dvoid *ctxp,
-                                       dvoid *memptr,
-                                       size_t newsize),
-                      void          (*mfreefp)
-                                    (dvoid *ctxp,
-                                       dvoid *memptr),
-                      size_t        xtramemsz,
-                      dvoid         **usrmempp,
-                      ub2           charset,
-                      ub2           ncharset)
-Comments
-The charset and ncharset must be both zero or non-zero.
-The parameters have the same meaning as the ones in OCIEnvCreate().
-When charset or ncharset is non-zero, the corresponding character set will
-be used to replace the ones specified in NLS_LANG or NLS_NCHAR. Moreover,
-OCI_UTF16ID is allowed to be set as charset and ncharset.
-On the other hand, OCI_UTF16 mode is deprecated with this function. 
-Applications can achieve the same effects by setting 
-both charset and ncharset as OCI_UTF16ID.
-
-
-OCIEnvInit()
-Name
-OCI INITialize environment
-Purpose
-This call initializes the OCI environment handle.
-Syntax
-sword OCIEnvInit ( OCIEnv    **envp,
-                 ub4       mode,
-                 size_t    xtramemsz,
-                 dvoid     **usrmempp );
-Comments
-Initializes the OCI environment handle. No changes are done on an initialized 
-handle. If OCI_ERROR or OCI_SUCCESS_WITH_INFO is returned, the 
-environment handle can be used to obtain ORACLE specific errors and 
-diagnostics.
-This call is processed locally, without a server round-trip.
-Parameters
-envpp (OUT) - a pointer to a handle to the environment. 
-mode (IN) - specifies initialization of an environment mode. The only valid 
-mode is OCI_DEFAULT for default mode
-xtramemsz (IN) - specifies the amount of user memory to be allocated. 
-usrmempp (OUT) - returns a pointer to the user memory of size xtramemsz 
-allocated by the call for the user.
-Example
-See the description of OCISessionBegin() on page 13-84 for an example showing 
-the use of OCIEnvInit(). 
-Related Functions
-
-
-
-
-OCIErrorGet()
-Name
-OCI Get Diagnostic Record
-Purpose
-Returns an error message in the buffer provided and an ORACLE error.
-Syntax
-sword OCIErrorGet ( dvoid      *hndlp, 
-                  ub4        recordno,
-                  OraText       *sqlstate,
-                  ub4        *errcodep, 
-                  OraText       *bufp,
-                  ub4        bufsiz,
-                  ub4        type );
-Comments
-Returns an error message in the buffer provided and an ORACLE error. 
-Currently does not support SQL state. This call can be called a multiple 
-number of times if there are more than one diagnostic record for an error.
-The error handle is originally allocated with a call to OCIHandleAlloc().
-Parameters
-hndlp (IN) - the error handle, in most cases, or the environment handle (for 
-errors on OCIEnvInit(), OCIHandleAlloc()).
-recordno (IN) - indicates the status record from which the application seeks 
-info. Starts from 1. 
-sqlstate (OUT) - Not supported in Version 8.0.
-errcodep (OUT) - an ORACLE Error is returned.
-bufp (OUT) - the error message text is returned.
-bufsiz (IN) - the size of the buffer provide to get the error message.
-type (IN) - the type of the handle.
-Related Functions
-OCIHandleAlloc()
-
-OCIExtractInit
-Name
-OCI Extract Initialize 
-Purpose
-This function initializes the parameter manager. 
-Syntax
-sword OCIExtractInit(dvoid *hndl, OCIError *err);
-Comments
-It must be called before calling any other parameter manager routine. The NLS 
-information is stored inside the parameter manager context and used in 
-subsequent calls to OCIExtract routines.
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
-Parameters
-hndl (IN/OUT) - The OCI environment or session handle.
-err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-               err and this function returns OCI_ERROR. Diagnostic information 
-               can be obtained by calling OCIErrorGet().
-Related Functions
-OCIExtractTerm()
-
-OCIExtractTerm
-Name
-OCI Extract Terminate
-Purpose
-This function releases all dynamically allocated storage and may perform 
-other internal bookkeeping functions.
-Syntax
-sword OCIExtractTerm(dvoid *hndl, OCIError *err);
-Comments
-It must be called when the parameter manager is no longer being used.
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
-Parameters
-hndl (IN/OUT) - The OCI environment or session handle.
-err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-               err and this function returns OCI_ERROR. Diagnostic information 
-               can be obtained by calling OCIErrorGet().
-Related Functions
-OCIExtractInit()
-
-OCIExtractReset
-Name
-OCI Extract Reset
-Purpose
-The memory currently used for parameter storage, key definition storage, and 
-parameter value lists is freed and the structure is reinitialized.
-Syntax
-sword OCIExtractReset(dvoid *hndl, OCIError *err);
-Comments
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
-Parameters
-hndl (IN/OUT) - The OCI environment or session handle.
-err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-               err and this function returns OCI_ERROR. Diagnostic information 
-               can be obtained by calling OCIErrorGet().
-Related Functions
-
-OCIExtractSetNumKeys
-Name
-OCI Extract Set Number of Keys
-Purpose
-Informs the parameter manager of the number of keys that will be registered.
-Syntax
-sword OCIExtractSetNumKeys(dvoid *hndl, OCIError *err, uword numkeys);
-Comments
-This routine must be called prior to the first call of OCIExtractSetKey().  
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
-Parameters
-hndl (IN/OUT) - The OCI environment or session handle.
-err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-               err and this function returns OCI_ERROR. Diagnostic information 
-               can be obtained by calling OCIErrorGet().
-numkeys (IN) - The number of keys that will be registered with 
-               OCIExtractSetKey().
-Related Functions
-OCIExtractSetKey()
-
-OCIExtractSetKey
-Name
-OCI Extract Set Key definition
-Purpose
-Registers information about a key with the parameter manager.
-Syntax
-sword OCIExtractSetKey(dvoid *hndl, OCIError *err, CONST OraText *name, 
-                       ub1 type, ub4 flag, CONST dvoid *defval,
-                       CONST sb4 *intrange, CONST OraText *CONST *strlist);
-Comments
-This routine must be called after calling OCIExtractSetKey() and before 
-calling OCIExtractFromFile() or OCIExtractFromStr().  
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
-Parameters
-hndl (IN/OUT) - The OCI environment or session handle.
-err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-               err and this function returns OCI_ERROR. Diagnostic information 
-               can be obtained by calling OCIErrorGet().
-name (IN) - The name of the key.
-type (IN) - The type of the key (OCI_EXTRACT_TYPE_INTEGER, 
-            OCI_EXTRACT_TYPE_OCINUM, OCI_EXTRACT_TYPE_STRING, or 
-            OCI_EXTRACT_TYPE_BOOLEAN).
-flag (IN) - Set to OCI_EXTRACT_MULTIPLE if the key can take multiple values 
-            or 0 otherwise.
-defval (IN) - Set to the default value for the key.  May be NULL if there is 
-               no default.  A string default must be a (text*) type, an 
-               integer default must be an (sb4*) type, and a boolean default 
-               must be a (ub1*) type.
-intrange (IN) - Starting and ending values for the allowable range of integer 
-                values.  May be NULL if the key is not an integer type or if 
-                all integer values are acceptable.
-strlist (IN) - List of all acceptable text strings for the key.  May be NULL 
-               if the key is not a string type or if all text values are 
-               acceptable.
-Related Functions
-OCIExtractSetNumKeys()
-
-OCIExtractFromFile
-Name
-OCI Extract parameters From File
-Purpose
-The keys and their values in the given file are processed. 
-Syntax
-sword OCIExtractFromFile(dvoid *hndl, OCIError *err, ub4 flag, 
-                         OraText *filename);
-Comments
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
-Parameters
-hndl (IN/OUT) - The OCI environment or session handle.
-err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-               err and this function returns OCI_ERROR. Diagnostic information 
-               can be obtained by calling OCIErrorGet().
-flag (IN) - Zero or has one or more of the following bits set: 
-           OCI_EXTRACT_CASE_SENSITIVE, OCI_EXTRACT_UNIQUE_ABBREVS, or 
-           OCI_EXTRACT_APPEND_VALUES. 
-filename (IN) - Null-terminated filename string.
-Related Functions
-
-OCIExtractFromStr
-Name
-OCI Extract parameters From String
-Purpose
-The keys and their values in the given string are processed. 
-Syntax
-sword OCIExtractFromStr(dvoid *hndl, OCIError *err, ub4 flag, OraText *input);
-Comments
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
-Parameters
-hndl (IN/OUT) - The OCI environment or session handle.
-err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-               err and this function returns OCI_ERROR. Diagnostic information 
-               can be obtained by calling OCIErrorGet().
-flag (IN) - Zero or has one or more of the following bits set: 
-           OCI_EXTRACT_CASE_SENSITIVE, OCI_EXTRACT_UNIQUE_ABBREVS, or 
-           OCI_EXTRACT_APPEND_VALUES. 
-input (IN) - Null-terminated input string.
-Related Functions
-
-OCIExtractToInt
-Name
-OCI Extract To Integer
-Purpose
-Gets the integer value for the specified key.
-Syntax
-sword OCIExtractToInt(dvoid *hndl, OCIError *err, OraText *keyname, 
-                      uword valno, sb4 *retval);
-Comments
-The valno'th value (starting with 0) is returned.
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, OCI_NO_DATA, or OCI_ERROR. 
-OCI_NO_DATA means that there is no valno'th value for this key.
-Parameters
-hndl (IN) - The OCI environment or session handle.
-err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-               err and this function returns OCI_ERROR. Diagnostic information 
-               can be obtained by calling OCIErrorGet().
-keyname (IN) - Key name.
-valno (IN) - Which value to get for this key.
-retval (OUT) - The actual integer value.
-Related Functions
-
-OCIExtractToBool
-Name
-OCI Extract To Boolean
-Purpose
-Gets the boolean value for the specified key. 
-Syntax
-sword OCIExtractToBool(dvoid *hndl, OCIError *err, OraText *keyname, 
-                       uword valno, ub1 *retval);
-Comments
-The valno'th value (starting with 0) is returned.
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, OCI_NO_DATA, or OCI_ERROR. 
-OCI_NO_DATA means that there is no valno'th value for this key.
-Parameters
-hndl (IN) - The OCI environment or session handle.
-err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-               err and this function returns OCI_ERROR. Diagnostic information 
-               can be obtained by calling OCIErrorGet().
-keyname (IN) - Key name.
-valno (IN) - Which value to get for this key.
-retval (OUT) - The actual boolean value.
-Related Functions
-
-OCIExtractToStr
-Name
-OCI Extract To String
-Purpose
-Gets the string value for the specified key.
-Syntax
-sword OCIExtractToStr(dvoid *hndl, OCIError *err, OraText *keyname, 
-                      uword valno, OraText *retval, uword buflen);
-Comments
-The valno'th value (starting with 0) is returned.
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, OCI_NO_DATA, or OCI_ERROR. 
-OCI_NO_DATA means that there is no valno'th value for this key.
-Parameters
-hndl (IN) - The OCI environment or session handle.
-err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-               err and this function returns OCI_ERROR. Diagnostic information 
-               can be obtained by calling OCIErrorGet().
-keyname (IN) - Key name.
-valno (IN) - Which value to get for this key.
-retval (OUT) - The actual null-terminated string value.
-buflen (IN) - The length of the buffer for retval.
-Related Functions
-
-Note: The following OCIExtract functions are unavailable in this release
-
-OCIExtractToOCINum
-Name
-OCI Extract To OCI Number
-Purpose
-Gets the OCINumber value for the specified key.
-Syntax
-sword OCIExtractToOCINum(dvoid *hndl, OCIError *err, OraText *keyname, 
-                         uword valno, OCINumber *retval);
-Comments
-The valno'th value (starting with 0) is returned.
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, OCI_NO_DATA, or OCI_ERROR. 
-OCI_NO_DATA means that there is no valno'th value for this key.
-Parameters
-hndl (IN) - The OCI environment or session handle.
-err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-               err and this function returns OCI_ERROR. Diagnostic information 
-               can be obtained by calling OCIErrorGet().
-keyname (IN) - Key name.
-valno (IN) - Which value to get for this key.
-retval (OUT) - The actual OCINumber value.
-Related Functions
-
-OCIExtractToList
-Name
-OCI Extract To parameter List
-Purpose
-Generates a list of parameters from the parameter structures that are stored 
-in memory. 
-Syntax
-sword OCIExtractToList(dvoid *hndl, OCIError *err, uword *numkeys);
-Comments
-Must be called before OCIExtractValues() is called.
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
-Parameters
-hndl (IN) - The OCI environment or session handle.
-err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-               err and this function returns OCI_ERROR. Diagnostic information 
-               can be obtained by calling OCIErrorGet().
-numkeys (OUT) - Number of distinct keys stored in memory.
-Related Functions
-OCIExtractFromList()
-
-OCIExtractFromList
-Name
-OCI Extract From parameter List
-Purpose
-Generates a list of values for the a parameter in the parameter list.
-Syntax
-sword OCIExtractFromList(dvoid *hndl, OCIError *err, uword index, 
-                         OraText *name, ub1 *type, uword *numvals, 
-                         dvoid ***values);
-Comments
-Parameters are specified by an index. OCIExtractToList() must be called prior 
-to calling this routine to generate the parameter list from the parameter 
-structures that are stored in memory. 
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
-Parameters
-hndl (IN) - The OCI environment or session handle.
-err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-               err and this function returns OCI_ERROR. Diagnostic information 
-               can be obtained by calling OCIErrorGet().
-name (OUT) - Name of the key for the current parameter.
-type (OUT) - Type of the current parameter (OCI_EXTRACT_TYPE_STRING, 
-             OCI_EXTRACT_TYPE_INTEGER, OCI_EXTRACT_TYPE_OCINUM, or 
-             OCI_EXTRACT_TYPE_BOOLEAN)
-numvals (OUT) - Number of values for this parameter.
-values (OUT) - The values for this parameter.
-Related Functions
-OCIExtractToList()
-
-
-************************  OCIFileClose() ***********************************
- 
-Name
- OCIFileClose - Oracle Call Interface FILE i/o CLOSE
-
-Purpose
- Close a previously opened file.
-
-Syntax
- sword OCIFileClose ( dvoid             *hndl, 
-                      OCIError          *err,
-                      OCIFileObject     *filep )
-
-Comments
- This function will close a previously opened file. If the function succeeds
- then OCI_SUCCESS will be returned, else OCI_ERROR. 
- 
-Parameters
- hndl  (IN) - the OCI environment or session handle.
- err (OUT) - the OCI error handle
- filep (IN) - the OCIFile file object
-
-Related Functions
- OCIFileOpen.  
-
-
-
-********************* OCIFileExists() **************************************
-
-Name
- OCIFileExists - Oracle Call Interface FILE i/o EXIST
-
-Purpose
- Check to see if the file exists.
-
-Syntax
- sword OCIFileExists ( dvoid           *hndl, 
-                      OCIError         *err, 
-                      OraText          *filename,
-                      OraText          *path,
-                      ub1              *flag )
-
-Comments
- This function will set the flag to TRUE if the file exists else it will
- be set to FALSE.
- The function will return OCI_ERROR if any error is encountered, else
- it will return OCI_ERROR. 
-
-Parameters
- hndl(IN) - OCI environment or session handle
- err(OUT) - OCI error handle
- filename(IN) - filename
- path(IN) - path of the file
- flag(OUT) - whether the file exists or not
-
-Related Functions.
- None.
-     
-
- **************************** OCIFileFlush() ******************************
-
-
-Name
- OCIFileFlush - Oracle Call Interface File i/o FLUSH
-
-Purpose
- Flush the buffers associated with the file to the disk.
-
-Syntax
- sword OCIFileFlush ( dvoid             *hndl, 
-                      OCIError          *err,
-                      OCIFileObject     *filep )
-
-Comments
- The function will return OCI_ERROR if any error is encountered, else
- it will return OCI_ERROR.
-
-Parameters 
- hndl (IN) - the OCI environment or session handle.
- err (OUT) - the OCI error handle
- filep (IN) - the OCIFile file object
-
-Related Functions
- OCIFileOpen, OCIFileWrite
-
-
-
- *************************** OCIFileGetLength() ****************************
-
-Name
- OCIFileGetLength - Oracle Call Interface FILE i/o GET file LENGTH
-
-Purpose
- Get the length of a file.
-
-Syntax
- OCIFileGetLength(dvoid           *hndl, 
-                  OCIError        *err,
-                  OraText         *filename,
-                  OraText         *path,
-                  ubig_ora        *lenp )
-
-Comments
- The length of the file will be returned in lenp.
- The function will return OCI_ERROR if any error is encountered, else
- it will return OCI_ERROR.
- 
-Parameters
- hndl (IN) - the OCI environment or session handle.
- err (OUT) - the OCI error handle.  If  there is an error, it is recorded 
- in err and this function returns OCI_ERROR.  Diagnostic information can be 
- obtained by calling OCIErrorGet().
- filename (IN) - file name.
- path (IN) - path of the file.
- lenp (OUT) - On output, it is the length of the file in bytes.
- is the number of bytes in the file.
-
-Related Functions
- None.
-
-
-
-******************************** OCIFileInit() *****************************
-   
-Name
- OCIFileInit - Oracle Call Interface FILE i/o INITialize
-
-Purpose
- Initialize the OCI File I/O package and create the OCIFile context.
-
-Syntax
- sword OCIFileInit ( dvoid *hndl, 
-                     OCIError *err)
-
-Comments
- This function should be called before any of the OCIFile functions are
- used.
- The function will return OCI_ERROR if any error is encountered, else
- it will return OCI_ERROR.
- 
-Parameters
- hndl(IN) - OCI environment or session handle.
- err(OUT) - OCI error structure.
-
-Related Functions
- OCIFileTerm
-     
-
-
-********************************* OCIFileOpen() *****************************
-
-Name
- OCIFileOpen - Oracle Call Interface File i/o OPEN
-
-Purpose
-     Open a file.
-
-Syntax
- sword OCIFileOpen ( dvoid               *hndl, 
-                     OCIError            *err,
-                     OCIFileObject      **filep,
-                     OraText             *filename,
-                     OraText             *path,
-                     ub4                  mode,
-                     ub4                  create, 
-                     ub4                  type )
-
-Comments
- OCIFileOpen returns a handle to the open file in filep if the file is
- successfully opened. 
- If one wants to use the standard file objects (stdin, stdout & stderr)
- then OCIFileOpen whould be called with the type filed containing the 
- appropriate type (see the parameter type). If any of the standard files 
- are specified then filename, path, mode and create are ignored.
- The function will return OCI_ERROR if any error is encountered, else
- it will return OCI_ERROR.
-
-Parameters
- hndl (OUT) - the OCI environment or session handle.
- err (OUT) - the OCI error handle.  If  there is an error, it is recorded 
- in err and this function returns OCI_ERROR.  Diagnostic information can be 
- obtained by calling OCIErrorGet().
- filep (OUT) - the file object to be returned.
- filename (IN) - file name (NULL terminated string).
- path (IN) - path of the file (NULL terminated string).
- mode - mode in which to open the file (valid modes are OCI_FILE_READONLY,
- OCI_FILE_WRITEONLY, OCI_FILE_READ_WRITE).
- create - should the file be created if it does not exist. Valid values
- are: 
-     OCI_FILE_TRUNCATE - create a file regardless of whether or not it exists. 
-                        If the file already exists overwrite it.
-     OCI_FILE_EXIST - open it if it exists, else fail.
-     OCI_FILE_EXCL - fail if the file exists, else create.
-     OCI_FILE_CREATE - open the file if it exists, and create it if it doesn't.
-     OCI_FILE_APPEND - set the file pointer to the end of the file prior to 
-                      writing(this flag can be OR'ed with OCI_FILE_EXIST or
-                      OCI_FILE_CREATE).
-type - file type. Valid values are OCI_FILE_TEXT, OCI_FILE_BIN, 
-       OCI_FILE_STDIN, OCI_FILE_STDOUT and OCI_FILE_STDERR.
-       If any of the standard files are specified then filename, path, mode
-       and create are ignored.
-
-Related Functions.
- OCIFileClose
-
-
-
-************************** OCIFileRead() ************************************
-   
-Name
- OCIFileRead - Oracle Call Interface FILE i/o READ
-
-Purpose
- Read from a file into a buffer.
-
-Syntax
- sword OCIFileRead ( dvoid            *hndl, 
-                     OCIError         *err,
-                     OCIFileObject    *filep,
-                     dvoid            *bufp,
-                     ub4               bufl,
-                     ub4              *bytesread )
-
-Comments
- Upto bufl bytes from the file will be read into bufp. The user should
- allocate memory for the buffer.
- The number of bytes read would be in bytesread.
- The function will return OCI_ERROR if any error is encountered, else
- it will return OCI_ERROR.
-
-Parameters
- hndl (IN) - the OCI environment or session handle.
- err (OUT) - the OCI error handle.  If  there is an error, it is recorded 
- in err and this function returns OCI_ERROR.  Diagnostic information can be 
- obtained by calling OCIErrorGet().
- filep (IN/OUT) - a File Object that uniquely references the file.
- bufp (IN) - the pointer to a buffer into which the data will be read. The 
- length of the allocated memory is assumed to be bufl. 
- bufl - the length of the buffer in bytes. 
- bytesread (OUT) - the number of bytes read.
-
-Related Functions
- OCIFileOpen, OCIFileSeek, OCIFileWrite
-
-
-
-****************************** OCIFileSeek() ******************************
-
-Name
- OCIFileSeek - Oracle Call Interface FILE i/o SEEK
-
-Purpose
- Perfom a seek to a byte position.
-
-Syntax
- sword OCIFileSeek ( dvoid           *hndl, 
-                     OCIError        *err,  
-                     OCIFileObject   *filep,
-                     uword            origin,
-                     ubig_ora         offset,
-                     sb1              dir)
-
-Comments
- The function will return OCI_ERROR if any error is encountered, else
- it will return OCI_ERROR.
-
-Parameters
- hndl (IN) - the OCI environment or session handle.
- err (OUT) - the OCI error handle.  If  there is an error, it is recorded 
- in err and this function returns OCI_ERROR.  Diagnostic information can be 
- obtained by calling OCIErrorGet().
- filep (IN/OUT) - a file handle that uniquely references the file.
- origin - The starting point we want to seek from. NOTE: The starting 
- point may be OCI_FILE_SEEK_BEGINNING (beginning), OCI_FILE_SEEK_CURRENT 
- (current position), or OCI_FILE_SEEK_END (end of file). 
- offset - The number of bytes from the origin we want to start reading from. 
- dir - The direction we want to go from the origin. NOTE: The direction 
- can be either OCI_FILE_FORWARD or OCI_FILE_BACKWARD. 
- 
-Related Function
- OCIFileOpen, OCIFileRead, OCIFileWrite
-
-
-
-*************************** OCIFileTerm() **********************************
-
-Name
- OCIFileTerm - Oracle Call Interface FILE i/o TERMinate
-
-Purpose
- Terminate the OCI File I/O package and destroy the OCI File context.
-
-Syntax
- sword OCIFileTerm ( dvoid *hndl, 
-                     OCIError *err )
-
-Comments
- After this function has been called no OCIFile function should be used.
- The function will return OCI_ERROR if any error is encountered, else
- it will return OCI_ERROR.
- 
-Parameters
- hndl(IN) - OCI environment or session handle.
- err(OUT) - OCI error structure. 
-  
-Related Functions 
- OCIFileInit   
- 
-
-********************************* OCIFileWrite() **************************** 
-
-Name 
- OCIFileWrite - Oracle Call Interface FILE i/o WRITE
-
-Purpose
-  Write data from buffer into a file.
-
-Syntax
- sword OCIFileWrite ( dvoid            *hndl, 
-                      OCIError         *err,  
-                      OCIFileObject    *filep,
-                      dvoid            *bufp, 
-                      ub4               buflen
-                      ub4              *byteswritten )
-
-Comments
- The number of bytes written will be in *byteswritten.
- The function will return OCI_ERROR if any error is encountered, else
- it will return OCI_ERROR.
-
-Parameters
- hndl (IN) - the OCI environment or session handle.
- err (OUT) - the OCI error handle.  If  there is an error, it is recorded 
- in err and this function returns OCI_ERROR.  Diagnostic information can be 
- obtained by calling OCIErrorGet().
- filep (IN/OUT) - a file handle that uniquely references the file.
- bufp (IN) - the pointer to a buffer from which the data will be written. 
- The length of the allocated memory is assumed to be the value passed
- in bufl. 
- bufl - the length of the buffer in bytes.
- byteswritten (OUT) - the number of bytes written.
- 
-Related Functions
- OCIFileOpen, OCIFileSeek, OCIFileRead 
-
-
-
-
-
-OCIHandleAlloc() 
-Name
-OCI Get HaNDLe
-Purpose
-This call returns a pointer to an allocated and initialized handle.
-Syntax
-sword OCIHandleAlloc ( CONST dvoid   *parenth,
-                     dvoid         **hndlpp, 
-                     ub4           type, 
-                     size_t        xtramem_sz,
-                     dvoid         **usrmempp);
-Comments
-Returns a pointer to an allocated and initialized structure, corresponding to 
-the type specified in type. A non-NULL handle is returned on success. Bind 
-handle and define handles are allocated with respect to a statement handle. All
-other handles are allocated with respect to an environment handle which is 
-passed in as a parent handle.
-No diagnostics are available on error. This call returns OCI_SUCCESS if 
-successful, or OCI_INVALID_HANDLE if an out-of-memory error occurs.
-Handles must be allocated using OCIHandleAlloc() before they can be passed 
-into an OCI call.
-Parameters
-parenth (IN) - an environment or a statement handle. 
-hndlpp (OUT) - returns a handle to a handle type. 
-type (IN) - specifies the type of handle to be allocated. The specific types 
-are: 
-OCI_HTYPE_ERROR - specifies generation of an error report handle of 
-C type OCIError
-OCI_HTYPE_SVCCTX - specifies generation of a service context handle 
-of C type OCISvcCtx
-OCI_HTYPE_STMT - specifies generation of a statement (application 
-request) handle of C type OCIStmt
-OCI_HTYPE_BIND - specifies generation of a bind information handle 
-of C type OCIBind
-OCI_HTYPE_DEFINE - specifies generation of a column definition 
-handle of C type OCIDefine
-OCI_HTYPE_DESCRIBE  - specifies generation of a select list 
-description handle of C type OCIDesc
-OCI_HTYPE_SERVER - specifies generation of a server context handle 
-of C type OCIServer
-OCI_HTYPE_SESSION - specifies generation of an authentication 
-context handle of C type OCISession
-OCI_HTYPE_TRANS - specifies generation of a transaction context
-handle of C type OCITrans
-OCI_HTYPE_COMPLEXOBJECT - specifies generation of a complex 
-object retrieval handle of C type OCIComplexObject
-OCI_HTYPE_SECURITY - specifies generation of a security handle of C 
-type OCISecurity
-xtramem_sz (IN) - specifies an amount of user memory to be allocated.
-usrmempp (OUT) - returns a pointer to the user memory of size xtramemsz 
-allocated by the call for the user. 
-Related Functions
-OCIHandleFree()
-
-
-
-OCIHandleFree()
-Name
-OCI Free HaNDLe
-Purpose
-This call explicitly deallocates a handle.
-Syntax
-sword OCIHandleFree ( dvoid     *hndlp,
-                    ub4       type);
-Comments
-This call frees up storage associated with a handle, corresponding to the type 
-specified in the type parameter.
-This call returns either OCI_SUCCESS or OCI_INVALID_HANDLE.
-All handles must be explicitly deallocated. OCI will not deallocate a child 
-handle if the parent is deallocated.
-Parameters
-hndlp (IN) - an opaque pointer to some storage.
-type (IN) - specifies the type of storage to be allocated. The specific types 
-are:
-OCI_HTYPE_ENV - an environment handle
-OCI_HTYPE_ERROR - an error report handle
-OCI_HTYPE_SVCCTX - a service context handle
-OCI_HTYPE_STMT - a statement (application request) handle
-OCI_HTYPE_BIND - a bind information handle
-OCI_HTYPE_DEFINE - a column definition handle
-OCI_HTYPE_DESCRIBE  - a select list description handle
-OCI_HTYPE_SERVER - a server handle
-OCI_HTYPE_SESSION - a user authentication handle
-OCI_HTYPE_TRANS - a transaction handle
-OCI_HTYPE_COMPLEXOBJECT - a complex object retrieval handle
-OCI_HTYPE_SECURITY - a security handle
-Related Functions
-OCIHandleAlloc()
-
-
-
-
-OCIInitialize()
-Name
-OCI Process Initialize
-Purpose
-Initializes the OCI process environment.
-Syntax
-sword OCIInitialize ( ub4           mode,
-                    CONST dvoid   *ctxp, 
-                    CONST dvoid   *(*malocfp) 
-                                  ( dvoid *ctxp,
-                                    size_t size ),
-                    CONST dvoid   *(*ralocfp)
-                                  ( dvoid *ctxp,
-                                    dvoid *memp,
-                                    size_t newsize ),
-                    CONST void    (*mfreefp)
-                                  ( dvoid *ctxp,
-                                    dvoid *memptr ));
-Comments
-This call initializes the OCI process environment.
-OCIInitialize() must be invoked before any other OCI call. 
-Parameters
-mode (IN) - specifies initialization of the mode. The valid modes are:
-OCI_DEFAULT - default mode.
-OCI_THREADED - threaded environment. In this mode, internal data 
-structures are protected from concurrent accesses by multiple threads. 
-OCI_OBJECT - will use navigational object interface. 
-ctxp (IN) - user defined context for the memory call back routines. 
-malocfp (IN) - user-defined memory allocation function. If mode is 
-OCI_THREADED, this memory allocation routine must be thread safe.
-ctxp - context pointer for the user-defined memory allocation function.
-size - size of memory to be allocated by the user-defined memory 
-allocation function
-ralocfp (IN) - user-defined memory re-allocation function. If mode is 
-OCI_THREADED, this memory allocation routine must be thread safe.
-ctxp - context pointer for the user-defined memory reallocation 
-function.
-memp - pointer to memory block
-newsize - new size of memory to be allocated
-mfreefp (IN) - user-defined memory free function. If mode is 
-OCI_THREADED, this memory free routine must be thread safe.
-ctxp - context pointer for the user-defined memory free function.
-memptr - pointer to memory to be freed
-Example
-See the description of OCIStmtPrepare() on page 13-96 for an example showing 
-the use of OCIInitialize().
-Related Functions
-
--------------------------------OCITerminate------------------------------------
-
-OCITerminate()
-Name
-OCI process Terminate
-Purpose
-Do cleanup before process termination
-Syntax
-sword OCITerminate (ub4 mode);
-
-Comments
-This call performs  OCI related clean up before the OCI process terminates.
-If the process is running in shared mode then the OCI process is disconnected
-from the shared memory subsystem.
-
-OCITerminate() should be the last OCI call in any process.
-
-Parameters
-mode (IN) - specifies different termination modes.
-
-OCI_DEFAULT - default mode.
-
-Example
-
-Related Functions
-OCIInitialize()
-
----------------------- OCIIntervalAssign --------------------------------- 
-sword OCIIntervalAssign(dvoid *hndl, OCIError *err, 
-                    CONST OCIInterval *inpinter, OCIInterval *outinter );
-
-  DESCRIPTION
-    Copies one interval to another to create a replica
-  PARAMETERS
-     hndl (IN) - Session/Env handle.
-    err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-    (IN)  inpinter - Input Interval 
-    (OUT) outinter - Output Interval 
-  RETURNS
-     OCI_INVALID_HANDLE if 'err' is NULL.
-     OCI_SUCCESS otherwise
-
- ---------------------- OCIIntervalCheck ------------------------------------ 
-sword OCIIntervalCheck(dvoid *hndl, OCIError *err, CONST OCIInterval *interval,
-                         ub4 *valid );
-
-  DESCRIPTION
-    Checks the validity of an interval
-  PARAMETERS
-     hndl (IN) - Session/Env handle.
-    err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-    (IN)  interval - Interval to be checked 
-    (OUT) valid     - Zero if the interval is valid, else returns an Ored
-        combination of the following codes.
-
-   Macro name                   Bit number      Error
-   ----------                   ----------      -----
-   OCI_INTER_INVALID_DAY         0x1           Bad day
-   OCI_INTER_DAY_BELOW_VALID     0x2           Bad DAy Low/high bit (1=low)
-   OCI_INTER_INVALID_MONTH       0x4           Bad MOnth
-   OCI_INTER_MONTH_BELOW_VALID   0x8           Bad MOnth Low/high bit (1=low)
-   OCI_INTER_INVALID_YEAR        0x10          Bad YeaR
-   OCI_INTER_YEAR_BELOW_VALID    0x20          Bad YeaR Low/high bit (1=low)
-   OCI_INTER_INVALID_HOUR        0x40          Bad HouR
-   OCI_INTER_HOUR_BELOW_VALID    0x80          Bad HouR Low/high bit (1=low)
-   OCI_INTER_INVALID_MINUTE      0x100         Bad MiNute
-   OCI_INTER_MINUTE_BELOW_VALID  0x200         Bad MiNute Low/high bit(1=low)
-   OCI_INTER_INVALID_SECOND      0x400         Bad SeCond
-   OCI_INTER_SECOND_BELOW_VALID  0x800         bad second Low/high bit(1=low)
-   OCI_INTER_INVALID_FRACSEC     0x1000        Bad Fractional second
-   OCI_INTER_FRACSEC_BELOW_VALID 0x2000        Bad fractional second Low/High
-
-        
-  RETURNS
-    OCI_SUCCESS if interval is okay
-    OCI_INVALID_HANDLE if 'err' is NULL.
-
- ---------------------- OCIIntervalCompare ----------------------------------- 
-sword OCIIntervalCompare(dvoid *hndl, OCIError *err, OCIInterval *inter1, 
-                        OCIInterval *inter2, sword *result );
-
-  DESCRIPTION
-        Compares two intervals, returns 0 if equal, -1 if inter1 < inter2, 
-        1 if inter1 > inter2
-  PARAMETERS
-     hndl (IN) - Session/Env handle. 
-     err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-     inter1  (IN)   - Interval to be compared 
-     inter2  (IN)   - Interval to be compared 
-     result  (OUT)  -   comparison result, 0 if equal, -1 if inter1 < inter2, 
-                        1 if inter1 > inter2
-
-  RETURNS
-     OCI_SUCCESS on success
-     OCI_INVALID_HANDLE if 'err' is NULL.
-     OCI_ERROR if 
-        the two input datetimes are not mutually comparable.
-
----------------------- OCIIntervalDivide ------------------------------------ 
-sword OCIIntervalDivide(dvoid *hndl, OCIError *err, OCIInterval *dividend, 
-                OCINumber *divisor, OCIInterval *result );
- 
-  DESCRIPTION
-     Divides an interval by an Oracle Number to produce an interval
-  PARAMETERS
-        hndl (IN) - Session/Env handle. 
-     err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-     dividend  (IN)   - Interval to be divided 
-     divisor   (IN)   - Oracle Number dividing `dividend' 
-     result    (OUT)  - resulting interval (dividend / divisor) 
-  RETURNS
-     OCI_SUCCESS on success
-     OCI_INVALID_HANDLE if 'err' is NULL.
-
- ---------------------- OCIIntervalFromNumber -------------------- 
-sword OCIIntervalFromNumber(dvoid *hndl, OCIError *err, 
-               OCIInterval *inter, OCINumber *number);
-  DESCRIPTION
-    Converts an interval to an Oracle Number
-  PARAMETERS
-     hndl (IN) - Session/Env handle. 
-    err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-    (OUT)  interval - Interval to be converted 
-    (IN) number - Oracle number result  (in years for YEARMONTH interval
-                     and in days for DAYSECOND)
-  RETURNS
-    OCI_SUCCESS on success 
-    OCI_INVALID_HANDLE if 'err' is NULL.
-    OCI_ERROR on error.
-  NOTES
-    Fractional portions of the date (for instance, minutes and seconds if
-    the unit chosen is hours) will be included in the Oracle number produced.
-    Excess precision will be truncated.
- 
- ---------------------- OCIIntervalFromText --------------------------------- 
-sword OCIIntervalFromText( dvoid *hndl, OCIError *err, CONST OraText *inpstr, 
-                size_t str_len, OCIInterval *result );
-
-  DESCRIPTION
-    Given an interval string produce the interval represented by the string.
-    The type of the interval is the type of the 'result' descriptor.
-  PARAMETERS
-
-     hndl (IN) - Session/Env handle. 
-     err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-    (IN)  inpstr - Input string 
-    (IN)  str_len - Length of input string 
-    (OUT) result - Resultant interval 
-  RETURNS
-    OCI_SUCCESS on success
-    OCI_INVALID_HANDLE if 'err' is NULL.
-    OCI_ERROR if
-        there are too many fields in the literal string
-        the year is out of range (-4713 to 9999)
-        if the month is out of range (1 to 12)
-        if the day of month is out of range (1 to 28...31)
-        if hour is not in range (0 to 23)
-        if hour is not in range (0 to 11)
-        if minute is not in range (0 to 59)
-        if seconds in minute not in range (0 to 59)
-        if seconds in day not in range (0 to 86399)
-        if the interval is invalid
-
-
- ---------------------- OCIIntervalGetDaySecond -------------------- 
-
-  DESCRIPTION
-     Gets values of day second interval
-  PARAMETERS
-        hndl (IN) - Session/Env handle.
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().     
-        day     (OUT) - number of days
-        hour    (OUT) - number of hours
-        min     (OUT) - number of mins
-        sec     (OUT) - number of secs
-        fsec    (OUT) - number of fractional seconds
-        result     (IN)  - resulting interval 
-  RETURNS
-        OCI_SUCCESS on success
-        OCI_INVALID_HANDLE if 'err' is NULL.
-
-
- ---------------------- OCIIntervalGetYearMonth -------------------- 
-
-  DESCRIPTION
-     Gets year month from an interval
-  PARAMETERS
-        hndl (IN) - Session/Env handle.
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().     
-        year    (OUT)   - year value
-        month   (OUT)   - month value
-        result     (IN)  - resulting interval 
-  RETURNS
-        OCI_SUCCESS on success
-        OCI_INVALID_HANDLE if 'err' is NULL.
-
-
-
--------------------------- OCIIntervalAdd ------------------------------
-sword OCIIntervalAdd(dvoid *hndl, OCIError *err, OCIInterval *addend1, 
-                        OCIInterval *addend2, OCIInterval *result );
-NAME OCIIntervalAdd - Adds two intervals 
-PARAMETERS
-hndl (IN) - Session/Env handle. 
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-addend1  (IN)   - Interval to be added 
-addend2  (IN)   - Interval to be added 
-result   (OUT)  - resulting interval (addend1 + addend2) 
-DESCRIPTION
-     Adds two intervals to produce a resulting interval
-RETURNS
-     OCI_SUCCESS on success
-     OCI_ERROR if:
-        the two input intervals are not mutually comparable.
-        the resulting year would go above SB4MAXVAL
-        the resulting year would go below SB4MINVAL
-     OCI_INVALID_HANDLE if 'err' is NULL.
-NOTES
-     The two input intervals must be mutually comparable
-
- ---------------------- OCIIntervalSubtract ------------------------------- 
-sword OCIIntervalSubtract(dvoid *hndl, OCIError *err, OCIInterval *minuend, 
-                            OCIInterval *subtrahend, OCIInterval *result );
-NAME - OCIIntervalSubtract - subtracts two intervals
-PARAMETERS
-hndl (IN) - Session/Env handle.
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().     
-minuend    (IN)   - interval to be subtracted from 
-subtrahend (IN)   - interval subtracted from minuend 
-result     (OUT)  - resulting interval (minuend - subtrahend) 
-DESCRIPTION
-     Subtracts two intervals and stores the result in an interval
-RETURNS
-        OCI_SUCCESS on success
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if:
-           the two input intervals are not mutually comparable.
-           the resulting leading field would go below SB4MINVAL 
-           the resulting leading field would go above SB4MAXVAL
-
----------------------- OCIIntervalMultiply --------------------------------- 
-sword OCIIntervalMultiply(dvoid *hndl, OCIError *err, CONST OCIInterval *inter,
-                        OCINumber *nfactor, OCIInterval *result );
-
-  DESCRIPTION
-     Multiplies an interval by an Oracle Number to produce an interval
-  PARAMETERS
-        hndl (IN) - Session/Env handle. 
-     err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-     inter  (IN)   - Interval to be multiplied 
-     nfactor  (IN)   - Oracle Number to be multiplied 
-     result   (OUT)  - resulting interval (ifactor * nfactor) 
-  RETURNS
-     OCI_SUCCESS on success
-     OCI_INVALID_HANDLE if 'err' is NULL.
-     OCI_ERROR if:
-        the resulting year would go above SB4MAXVAL
-        the resulting year would go below SB4MINVAL
-
-
- ---------------------- OCIIntervalSetDaySecond -------------------- 
-
-  DESCRIPTION
-     Sets day second interval
-  PARAMETERS
-        hndl (IN) - Session/Env handle.
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().     
-        day     (IN) - number of days
-        hour    (IN) - number of hours
-        min     (IN) - number of mins
-        sec     (IN) - number of secs
-        fsec    (IN) - number of fractional seconds
-        result     (OUT)  - resulting interval 
-  RETURNS
-        OCI_SUCCESS on success
-        OCI_INVALID_HANDLE if 'err' is NULL.
-
-
- ---------------------- OCIIntervalSetYearMonth -------------------- 
-
-  DESCRIPTION
-     Sets year month interval
-  PARAMETERS
-        hndl (IN) - Session/Env handle.
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().     
-        year    (IN)   - year value
-        month   (IN)   - month value
-        result     (OUT)  - resulting interval 
-  RETURNS
-        OCI_SUCCESS on success
-        OCI_INVALID_HANDLE if 'err' is NULL.
-
-
------------------------ OCIIntervalToNumber ---------------------------------
-sword OCIIntervalToNumber(dvoid *hndl, OCIError *err, CONST OCIInterval *inter,
-                          OCINumber *number);
-
-  DESCRIPTION
-    Converts an interval to an Oracle Number
-  PARAMETERS
-     hndl (IN) - Session/Env handle. 
-    err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-    (IN)  inter - Interval to be converted 
-    (OUT) number - Oracle number result  (in years for YEARMONTH interval
-                     and in days for DAYSECOND)
-  RETURNS
-    OCI_INVALID_HANDLE if 'err' is NULL.
-    OCI_SUCCESS on success 
-  NOTES
-    Fractional portions of the date (for instance, minutes and seconds if
-    the unit chosen is hours) will be included in the Oracle number produced.
-    Excess precision will be truncated.
- 
-------------------------------- OCIIntervalToText -------------------------
-sword OCIIntervalToText( dvoid *hndl, OCIError *err, CONST OCIInterval *inter,
-                        ub1 lfprec, ub1 fsprec, OraText *buffer, 
-                        size_t buflen, size_t *resultlen );
-
-  DESCRIPTION
-    Given an interval, produces a string representing the interval.
-  PARAMETERS
-     hndl (IN) - Session/Env handle. 
-    err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-    (IN)  inter - Interval to be converted 
-    (IN)  lfprec  - Leading field precision. Number of digits used to
-                represent the leading field.
-    (IN)  fsprec  - Fractional second precision of the interval. Number of
-                digits used to represent the fractional seconds.
-    (OUT) buffer - buffer to hold result 
-    (IN)  buflen - length of above buffer 
-    (OUT) resultlen - length of result placed into buffer 
- 
-  RETURNS
-    OCI_SUCCESS on success
-    OCI_INVALID_HANDLE if 'err' is NULL.
-    OCI_ERROR 
-        if the buffer is not large enough to hold the result
-  NOTES
-    The interval literal will be output as `year' or `[year-]month' for
-    YEAR-MONTH intervals and as `seconds' or `minutes[:seconds]' or
-    `hours[:minutes[:seconds]]' or `days[ hours[:minutes[:seconds]]]' for
-    DAY-TIME intervals (where optional fields are surrounded by brackets).
-
- ---------------------- OCIIntervalFromTZ -------------------- 
-sword OCIIntervalFromTZ(dvoid *hndl, OCIError *err, CONST oratext *inpstring,
-                        size_t str_len, OCIInterval *result);
-
-  DESCRIPTION
-    Retuns an OCI_DTYPE_INTERVAL_DS OCIInterval with the region id (if
-    the region is specified in the input string) set and the current
-    absolute offset or an absolut offset with the region id set to 0.
-  PARAMETERS
-    hndl (IN) - Session/Env handle.
-    err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-    inpstring (IN) - pointer to the input string
-    str_len (IN) - inpstring length
-    result - Output Interval 
-  RETURNS
-     OCI_SUCCESS on success
-     OCI_INVALID_HANDLE if 'err' is NULL.
-     OCI_ERROR on error
-        Bad interval type
-        Timezone errors
-  NOTES
-     The input string must be of the form [+/-]TZH:TZM or 'TZR [TZD]'
-
- ----------------------- OCIKerbAttrSet ---------------------
-sword OCIKerbAttrSet(OCISession *trgthndlp, ub4 auth_mode, 
-                     ub1 *ftgt_ticket, ub4 ftgt_ticket_len, 
-                     ub1 *ftgt_sesskey, ub4 ftgt_sesskey_len, 
-                     ub2 ftgt_keytype, ub4 ftgt_ticket_flags, 
-                     sb4 ftgt_auth_time, sb4 ftgt_start_time, 
-                     sb4 ftgt_end_time, sb4 ftgt_renew_time, 
-                     text *ftgt_principal, ub4 ftgt_principal_len,
-                     text *ftgt_realm, ub4 ftgt_realm_len, 
-                     OCIError *errhp);
-
-  DESCRIPTION
-    This call sets the attributes required for Kerberos authentication
-    on the user handle.
-
-  PARAMETERS
-    trgthndlp (IN) - The pointer to a user handle.
-    auth_mode (IN) - Indicates what type of Kerberos credentials should
-                    be set. Options are:
-
-                    OCI_KERBCRED_PROXY 
-                                         - Set Kerberos credentials for use with
-                                           proxy authentication.
-                    OCI_KERBCRED_CLIENT_IDENTIFIER 
-                                         - Set Kerberos credentials for use
-                                           with secure client identifier.
-
-    ftgt_ticket (IN) - Forwardable Ticket Granting Ticket (FTGT).
-    ftgt_ticket_len (IN) - Length of FTGT.
-    ftgt_sesskey(IN) - Session Key associated with FTGT.
-    ftgt_sesskey_len (IN) - Length of session key.
-    ftgt_keytype (IN) -  Type of encryption key used to encrypt FTGT.
-    ftgt_ticket_flags (IN) - Flags associated with  encryption of FTGT.
-    ftgt_auth_time (IN) - Authentication time compatible with that in FTGT.
-    ftgt_start_time (IN) - Start time compatible with that indicated in FTGT.
-    ftgt_end_time (IN) - End time compatible with that indicated in FTGT.
-    ftgt_renew_time (IN) - Renew time compatible with that indicated in FTGT.
-    ftgt_principal (IN) - Client principal name from FTGT.
-    ftgt_principal_len (IN) - Length of client principal name.
-    ftgt_realm (IN) - Client realm name from FTGT.
-    ftgt_realm_len (IN) - Client realm name length.
-    errhp (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-  RETURNS
-     OCI_SUCCESS on success
-     OCI_ERROR on error
-  NOTES
-
-OCILdaToSvcCtx()
-Name
-OCI toggle version 7 Lda_Def to SerVice context handle
-Purpose
-Converts a V7 Lda_Def to a V8 service context handle.
-Syntax
-sword OCILdaToSvcCtx ( OCISvcCtx  **svchpp,
-                     OCIError   *errhp,
-                     Lda_Def    *ldap );
-Comments
-Converts a V7 Lda_Def to a V8 service context handle. The action of this call 
-can be reversed by passing the resulting service context handle to the 
-OCISvcCtxToLda() function.
-Parameters
-svchpp (IN/OUT) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-ldap (IN/OUT) - the V7 logon data area returned by OCISvcCtxToLda() from 
-this service context.
-Related Functions
-OCISvcCtxToLda()
-
-
-
-
-OCILobAppend()
-
-Name
-OCI Lob APpend
-
-Purpose
-Appends a LOB value at the end of another LOB. 
-
-Syntax
-sword OCILobAppend ( OCISvcCtx        *svchp,
-                   OCIError         *errhp,
-                   OCILobLocator    *dst_locp,
-                   OCILobLocator    *src_locp );
-Comments
-Appends a LOB value at the end of LOB. The data is 
-copied from the source to the destination at the end of the destination. The 
-source and the destination must already exist. The destination LOB is 
-extended to accommodate the newly written data.
-
-It is an error to extend the destination LOB beyond the maximum length 
-allowed or to try to copy from a NULL LOB. 
-
-Parameters
-svchp (IN) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-dst_locp (IN/OUT) - a locator uniquely referencing the destination LOB. 
-src_locp (IN/OUT) - a locator uniquely referencing the source LOB. 
-
-Related Functions
-OCILobTrim()
-OCIErrorGet()
-OCILobWrite()
-OCILobCopy()
-
-
-
-OCILobAssign()
-
-Name
-OCI Lob ASsiGn
-
-Purpose
-Assigns one LOB/FILE locator to another.
-
-Syntax
-sword OCILobAssign ( OCIEnv                *envhp, 
-                     OCIError              *errhp, 
-                     CONST OCILobLocator   *src_locp, 
-                     OCILobLocator         **dst_locpp );
-
-Comments
-Assign source locator to destination locator.  After the assignment, both 
-locators refer to the same LOB data.  For internal LOBs, the source locator's 
-LOB data gets copied to the destination locator's LOB data only when the 
-destination locator gets stored in the table.  Therefore, issuing a flush of 
-the object containing the destination locator will copy the LOB data. For 
-FILEs only the locator that refers to the OS file is copied to the table. The
-OS file is not copied.
-Note: The only difference between this and OCILobLocatorAssign is that this
-takes an environment handle whereas OCILobLocatorAssign takes an OCI service
-handle
-
-Parameters
-envhp (IN/OUT) - OCI environment handle initialized in object mode.
-errhp (IN/OUT) - The OCI error handle. If there is an error, it is recorded 
-in errhp and this function returns OCI_ERROR. Diagnostic information can be 
-obtained by calling OCIErrorGet().
-src_locp (IN) - LOB locator to copy from.
-dst_locpp (IN/OUT) - LOB locator to copy to.  The caller must allocate space 
-for the OCILobLocator by calling OCIDescriptorAlloc().
-
-See also
-OCIErrorGet()
-OCILobIsEqual()
-OCILobLocatorIsInit()
-OCILobLocatorAssign()
-
-
-OCILobCharSetForm()
-
-Name
-OCI Lob Get Character Set Form
-
-Purpose
-Gets the LOB locator's character set fpr,, if any.
-
-Syntax
-sword OCILobCharSetForm ( OCIEnv                    *envhp, 
-                          OCIError                  *errhp, 
-                          CONST OCILobLocator       *locp, 
-                          ub1                       *csfrm );
-
-Comments
-Returns the character set form of the input LOB locator in the csfrm output 
-parameter. 
-
-Parameters
-envhp (IN/OUT) - OCI environment handle initialized in object mode.
-errhp (IN/OUT) - error handle. The OCI error handle. If there is an error, it 
-is recorded in err and this function returns OCI_ERROR. Diagnostic 
-information can be obtained by calling OCIErrorGet().
-locp (IN) - LOB locator for which to get the character set form.
-csfrm(OUT) - character set form of the input LOB locator.  If the input 
-locator is for a BLOB or a BFILE, csfrm is set to 0 since there is no concept 
-of a character set for binary LOBs/FILEs.  The caller must allocate space for 
-the csfrm (ub1) and not write into the space.
-See also
-OCIErrorGet(), OCILobCharSetId(), OCILobLocatorIsInit
-
-
-
-OCILobCharSetId()
-
-Name
-OCI Lob get Character Set IDentifier
-
-Purpose
-Gets the LOB locator's character set ID, if any.
-
-Syntax
-sword OCILobCharSetId ( OCIEnv                    *envhp, 
-                        OCIError                  *errhp, 
-                        CONST OCILobLocator       *locp, 
-                        ub2                       *csid );
-
-Comments
-Returns the character set ID of the input LOB locator in the cid output 
-parameter. 
-
-Parameters
-envhp (IN/OUT) - OCI environment handle initialized in object mode.
-errhp (IN/OUT) - error handle. The OCI error handle. If there is an error, it 
-is recorded in err and this function returns OCI_ERROR. Diagnostic 
-information can be obtained by calling OCIErrorGet().
-locp (IN) - LOB locator for which to get the character set ID.
-csid (OUT) - character set ID of the input LOB locator.  If the input locator 
-is for a BLOB or a BFILE, csid is set to 0 since there is no concept of a 
-character set for binary LOBs/FILEs.  The caller must allocate space for the 
-character set id of type ub2 and not write into the space.
-
-See also
-OCIErrorGet(), OCILobCharSetForm(), OCILobLocatorIsInit()
-
-
-
-OCILobCopy()
-
-Name
-OCI Lob Copy
-
-Purpose
-Copies a portion of a LOB value into another LOB value.
-
-Syntax
-sword OCILobCopy ( OCISvcCtx        *svchp,
-                   OCIError         *errhp,
-                   OCILobLocator    *dst_locp,
-                   OCILobLocator    *src_locp,
-                   ub4              amount,
-                   ub4              dst_offset,
-                   ub4              src_offset );
-
-Comments
-Copies a portion of a LOB value into another LOB as specified. The data 
-is copied from the source to the destination. The source (src_locp) and the 
-destination (dlopb) LOBs must already exist.
-If the data already exists at the destination's start position, it is 
-overwritten with the source data. If the destination's start position is 
-beyond the end of the current data, a hole is created from the end of the data
-to the beginning of the newly written data from the source. The destination 
-LOB is extended to accommodate the newly written data if it extends 
-beyond the current length of the destination LOB. 
-It is an error to extend the destination LOB beyond the maximum length 
-allowed or to try to copy from a NULL LOB.
-Parameters
-svchp (IN) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-dst_locp (IN/OUT) - a locator uniquely referencing the destination LOB. 
-src_locp (IN/OUT) - a locator uniquely referencing the source LOB. 
-amount (IN) - the number of character or bytes, as appropriate, to be copied.
-dst_offset (IN) - this is the absolute offset for the destination LOB. 
-For character LOBs it is the number of characters from the beginning of the 
-LOB at which to begin writing. For binary LOBs it is the number of bytes from 
-the beginning of the lob from which to begin reading. The offset starts at 1.
-src_offset (IN) - this is the absolute offset for the source LOB. 
-For character LOBs it is the number of characters from the beginning of the 
-LOB, for binary LOBs it is the number of bytes. Starts at 1.
-
-See Also 
-OCIErrorGet(), OCILobAppend(), OCILobWrite(), OCILobTrim()
-
-OCILobCreateTemporary()
-
-Name
-OCI Lob Create Temporary
-
-Purpose
-Create a Temporary Lob
-
-Syntax
-sword OCILobCreateTemporary(OCISvcCtx          *svchp,
-                            OCIError           *errhp,
-                            OCILobLocator      *locp,
-                            ub2                 csid,
-                            ub1                 csfrm,
-                            ub1                 lobtype,
-                            boolean             cache,
-                            OCIDuration         duration);
-
-
-Comments
-svchp (IN) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-locp (IN/OUT) - a locator which points to the temporary Lob
-csid (IN) - the character set id
-csfrm(IN) - the character set form
-lobtype (IN) - the lob type - one of the three constants OCI_TEMP_BLOB, 
-               OCI_TEMP_CLOB and OCI_TEMP_NCLOB
-cache(IN)-  TRUE if the temporary LOB goes through the cache; FALSE, if not.
-duration(IN)- duration of the temporary LOB; Can be a valid duration id or one 
-              of the values: OCI_DURATION_SESSION, OCI_DURATION_CALL
-              Note: OCI_DURATION_TRANSACTION is NOT supported in 8.1
-Related functions
-OCILobFreeTemporary()
-OCILobIsTemporary()
-
-OCILobDisableBuffering()
-
-Name
-OCI Lob Disable Buffering
-
-Purpose
-Disable lob buffering for the input locator.
-
-
-Syntax
-sword OCILobDisableBuffering ( OCISvcCtx      *svchp,
-                               OCIError       *errhp,
-                               OCILobLocator  *locp);
-
-Comments
-
-Disable lob buffering for the input locator.  The next time data is
-read/written from/to the lob through the input locator, the lob
-buffering subsystem is *not* used.  Note that this call does *not*
-implicitly flush the changes made in the buffering subsystem.  The 
-user must explicitly call OCILobFlushBuffer() to do this.
-
-Parameters
-svchp (IN) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-locp (IN/OUT) - a locator uniquely referencing the LOB. 
-
-Related Functions
-OCILobEnableBuffering()
-OCIErrorGet()
-OCILobFlushBuffer()
-
-
-
-
-OCILobEnableBuffering()
-
-Name
-OCI Lob Enable Buffering
-
-Purpose
-Enable lob buffering for the input locator.
-
-
-Syntax
-sword OCILobEnableBuffering ( OCISvcCtx      *svchp,
-                              OCIError       *errhp,
-                              OCILobLocator  *locp);
-
-Comments
-
-Enable lob buffering for the input locator.  The next time data is
-read/written from/to the lob through the input locator, the lob
-buffering subsystem is used.  
-
-Once lob buffering is enabled for a locator, if that locator is passed to 
-one of the following routines, an error is returned:
-        OCILobCopy, OCILobAppend, OCILobErase, OCILobGetLength, OCILobTrim
-
-Parameters
-svchp (IN) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-locp (IN/OUT) - a locator uniquely referencing the LOB. 
-
-Related Functions
-OCILobDisableBuffering()
-OCIErrorGet()
-OCILobWrite()
-OCILobRead()
-OCILobFlushBuffer()
-
-
-
-
-OCILobErase()
-
-Name
-OCI Lob ERase
-
-Purpose
-Erases a specified portion of the LOB data starting at a specified offset.
-
-Syntax
-sword OCILobErase ( OCISvcCtx       *svchp,
-                  OCIError        *errhp,
-                  OCILobLocator   *locp,
-                  ub4             *amount,
-                  ub4             offset );
-
-Comments
-Erases a specified portion of the LOB data starting at a specified offset.
-The actual number of characters/bytes erased is returned. The actual number 
-of characters/bytes and the requested number of characters/bytes will differ 
-if the end of the LOB data is reached before erasing the requested number of 
-characters/bytes.
-If a section of data from the middle of the LOB data is erased, a hole is 
-created. When data from that hole is read, 0's are returned. If the LOB is
-NULL, this routine will indicate that 0 characters/bytes were erased.
-
-Parameters
-svchp (IN) - the service context handle.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-locp (IN/OUT) - the LOB for which to erase a section of data.
-amount (IN/OUT) - On IN, the number of characters/bytes to erase. On OUT, 
-the actual number of characters/bytes erased.
-offset (IN) - absolute offset from the beginning of the LOB data from which 
-to start erasing data. Starts at 1.
-
-See Also
-OCIErrorGet(), OCILobRead(), OCILobWrite()
-
-OCILobOpen()
-
-Name
-OCI Lob Open
-
-Purpose
-Opens an internal or external Lob.
-
-Syntax
-sword OCILobOpen( OCISvcCtx        *svchp,
-                  OCIError         *errhp,
-                  OCILobLocator    *locp,
-                  ub1               mode );
-
-Comments
-It is an error if the same lob is opened more than once in
-the same transaction. Lobs are opened implicitly if they are
-not opened before using them. A LOB has to be closed before
-the transaction commits else the transaction is rolled back.
-Open locators are closed if the transaction aborts. Multiple 
-users can open the same lob on different locators.
-Parameters
-svchp (IN) - the service context handle.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-locp (IN/OUT) - locator points to the LOB to be opened
-mode (IN) - mode in which to open the lob. The valid modes are
-read-only - OCI_FILE_READONLY, read-write - OCI_FILE_READWRITE 
-
-OCILobClose()
-
-Name
-OCI Lob Close
-
-Purpose
-Closes an open internal or external Lob.
-
-Syntax
-sword OCILobClose( OCISvcCtx        *svchp,
-                   OCIError         *errhp,
-                   OCILobLocator    *locp );
-
-
-Comments
-It is an error if the lob is not open at this time. All LOBs
-that have been opened in a transaction have to be closed 
-before the transaction commits, else the transaction gets
-rolled back.
-
-Parameters
-svchp (IN) - the service context handle.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-locp  (IN)  - A locator that was opened using OCILobOpen()
-
-
-OCILobFileClose()
-
-Name
-OCI Lob File CLoSe
-
-Purpose
-Closes a previously opened FILE.
-
-Syntax
-sword OCILobFileClose ( OCISvcCtx            *svchp,
-                        OCIError             *errhp,
-                        OCILobLocator        *filep );
-
-Comments
-Closes a previously opened FILE. It is an error if this function is called for
-an internal LOB. No error is returned if the FILE exists but is not opened.
-Parameters
-svchp (IN) - the service context handle.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-filep (IN/OUT) - a pointer to a FILE locator to be closed.
-
-See Also
-OCIErrorGet(), OCILobFileOpen(), OCILobFileCloseAll(), OCILobFileIsOpen(),
-OCILobFileExists(), CREATE DIRECTORY DDL
-
-
-
-
-OCILobFileCloseAll()
-
-Name
-OCI LOB FILE Close All
-
-Purpose
-Closes all open FILEs on a given service context.
-
-Syntax
-sword OCILobFileCLoseAll ( OCISvcCtx *svchp, 
-                           OCIError  *errhp );
-
-Comments
-Closes all open FILEs on a given service context.
-
-Parameters
-svchp (IN) - the service context handle.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-
-See also
-OCILobFileClose(),
-OCIErrorGet(), OCILobFileOpen(), OCILobFileIsOpen(),
-OCILobFileExists(), CREATE DIRECTORY DDL
-
-
-
-
-OCILobFileExists()
-
-Name
-OCI LOB FILE exists
-
-Purpose
-Tests to see if the FILE exists on the server
-
-Syntax
-sword OCILobFileExists ( OCISvcCtx     *svchp,
-                         OCIError      *errhp,
-                         OCILobLocator *filep,
-                         boolean       *flag );
-
-Comments
-Checks to see if a FILE exists for on the server.
-
-Parameters
-svchp (IN) - the OCI service context handle.
-errhp (IN/OUT) - error handle. The OCI error handle. If there is an error, 
-it is recorded in err and this function returns OCI_ERROR. Diagnostic 
-information can be obtained by calling OCIErrorGet().
-filep (IN) - pointer to the FILE locator that refers to the file.
-flag (OUT) - returns TRUE if the FILE exists; FALSE if it does not.
-
-See also
-OCIErrorGet, CREATE DIRECTORY (DDL)
-
-
-
-
-OCILobFileGetName()
-
-Name
-OCI LOB FILE Get file Name
-
-Purpose
-Gets the FILE locator's directory alias and file name.
-
-Syntax
-sword OCILobFileGetName ( OCIEnv                   *envhp,
-                          OCIError                 *errhp, 
-                          CONST OCILobLocator      *filep, 
-                          OraText                     *dir_alias,
-                          ub2                      *d_length, 
-                          OraText                     *filename, 
-                          ub2                      *f_length );
-
-Comments
-Returns the directory alias and file name associated with this file locator.  
-
-Parameters
-envhp (IN/OUT) - OCI environment handle initialized in object mode.
-errhp (IN/OUT) -The OCI error handle. If there is an error, it is recorded in 
-errhp and this function returns OCI_ERROR. Diagnostic information can be 
-obtained by calling OCIErrorGet().
-filep (IN) - FILE locator for which to get the directory alias and file name.
-dir_alias (OUT) - buffer into which the directory alias name is placed. The 
-caller must allocate enough space for the directory alias name and must not 
-write into the space.
-d_length (IN/OUT)                 
-        - IN: length of the input dir_alias string;
-        - OUT: length of the returned dir_alias string.
-filename (OUT) - buffer into which the file name is placed. The caller must 
-allocate enough space for the file name and must not write into the space.
-f_length (IN/OUT) 
-        - IN: length of the input filename string;
-         - OUT: lenght of the returned filename string.
-
-See also
-OCILobFileSetName(), OCIErrorGet()
-
-
-
-
-OCILobFileIsOpen()
-
-Name
-OCI LOB FILE Is Open?
-
-Purpose
-Tests to see if the FILE is open
-
-Syntax
-sword OCILobFileIsOpen ( OCISvcCtx *svchp,
-                         OCIError  *errhp,
-                         OCILobLocator *filep,
-                         boolean       *flag );
-
-Comments
-Checks to see if the FILE on the server is open for a given LobLocator.
-
-Parameters
-svchp (IN) - the OCI service context handle.
-errhp (IN/OUT) - error handle. The OCI error handle. If there is an error, it 
-is recorded in err and this function returns OCI_ERROR. Diagnostic 
-information can be obtained by calling OCIErrorGet().
-filep (IN) - pointer to the FILE locator being examined. If the input file 
-locator was never passed to OCILobFileOpen(), the file is considered not to 
-be opened by this locator. However, a different locator may have opened the 
-file. More than one file opens can be performed on the same file using 
-different locators.
-flag (OUT) - returns TRUE if the FILE is opened using this locator; FALSE if 
-it is not. 
-
-See also
-OCIErrorGet, OCILobFileOpen, OCILobFileClose, OCILobFileCloseAll, CREATE 
-DIRECTORY SQL command
-
-
-OCILobFileOpen()
-
-Name
-OCI LOB FILE open
-
-Purpose
-Opens a FILE for read-only access
-
-Syntax
-sword OCILobFileOpen ( OCISvcCtx            *svchp,
-                     OCIError             *errhp,
-                     OCILobLocator        *filep,
-                     ub1                  mode );
-
-Comments
-Opens a FILE. The FILE can be opened for read-only access only. FILEs may not 
-be written to throough ORACLE.
-
-Parameters 
-svchp (IN) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-filep (IN/OUT) - the FILE to open. Error if the locator does not refer to a 
-FILE. 
-mode (IN) - mode in which to open the file. The only valid mode is 
-read-only - OCI_FILE_READONLY. 
-
-See Also
-OCILobFileClose, OCIErrorGet, OCILobFileCloseAll, OCILobFileIsOpen, 
-OCILobFileSetName, CREATE DIRECTORY 
-
-
-
-
-OCILobFileSetName()
-
-Name
-OCI Lob File Set NaMe
-
-Purpose
-Sets directory alias and file name in the FILE locator.
-
-Syntax
-sword OCILobFileSetName ( OCIEnv             *envhp,
-                          OCIError           *errhp,
-                          OCILobLocator      **filepp,
-                          OraText               *dir_alias,
-                          ub2                d_length, 
-                          OraText               *filename, 
-                          ub2                f_length );
-Comments
-Sets the directory alias and file name in the LOB file locator.  
-Parameters
-envhp (IN/OUT) - OCI environment handle initialized in object mode.
-errhp (IN/OUT) - The OCI error handle. If there is an error, it is recorded 
-in errhp and this function returns OCI_ERROR. Diagnostic information can be 
-obtained by calling OCIErrorGet().
-filepp (IN/OUT) - FILE locator for which to set the directory alias name.
-The caller must have already allocated space for the locator by calling
-OCIDescriptorAlloc().
-dir_alias (IN) - buffer that contains the directory alias name to set in the 
-locator.
-d_length (IN) - length of the input dir_alias parameter.
-filename (IN) - buffer that contains the file name is placed.
-f_length (IN) - length of the input filename parameter.
-See also
-OCILobFileGetName, OCIErrorGet, CREATE DIRECTORY
-
-
-
-
-OCILobFlushBuffer()
-
-Name
-OCI Lob Flush all Buffers for this lob.
-
-Purpose
-Flush/write all buffers for this lob to the server.
-
-
-Syntax
-sword OCILobFlushBuffer ( OCISvcCtx       *svchp,
-                          OCIError        *errhp,
-                          OCILobLocator   *locp,
-                          ub4              flag);
-
-Comments
-
-Flushes to the server, changes made to the buffering subsystem that 
-are associated with the lob referenced by the input locator.  This 
-routine will actually write the data in the buffer to the lob in 
-the database.  Lob buffering must have already been enabled for the 
-input lob locator.
-
-This routine, by default, does not free the buffer resources for
-reallocation to another buffered LOB operation. However, if you
-want to free the buffer explicitly, you can set the flag parameter
-to OCI_LOB_BUFFER_FREE.
-
-Parameters
-svchp (IN/OUT) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-locp (IN/OUT) - a locator uniquely referencing the LOB. 
-flag    (IN)     - to indicate if the buffer resources need to be freed
-                   after a flush. Default value is OCI_LOB_BUFFER_NOFREE.
-                   Set it to OCI_LOB_BUFFER_FREE if you want the buffer
-                   resources to be freed.
-Related Functions
-OCILobEnableBuffering()
-OCILobDisableBuffering()
-OCIErrorGet()
-OCILobWrite()
-OCILobRead()
-
-
-OCILobFreeTemporary()
-
-Name
-OCI Lob Free Temporary
-
-Purpose
-Free a temporary LOB
-
-Syntax
-sword OCILobFreeTemporary(OCISvcCtx          *svchp,
-                          OCIError           *errhp,
-                          OCILobLocator      *locp);
-
-Comments
-  Frees the contents of the temporary Lob this locator is pointing to. Note
-  that the locator itself is not freed until a OCIDescriptorFree is done.
-
-Parameters
-svchp (IN/OUT) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-locp (IN/OUT) - a locator uniquely referencing the LOB
-
-Related functions
-OCILobCreateTemporary()
-OCILobIsTemporary()
-
-
-Name
-OCI Lob/File Get Chunk Size
-
-Purpose
-When creating the table, the user can specify the chunking factor, which can
-be a multiple of Oracle blocks. This corresponds to the chunk size used by the
-LOB data layer when accessing/modifying the LOB value. Part of the chunk is
-used to store system-related information and the rest stores the LOB value.
-This function returns the amount of space used in the LOB chunk to store 
-the LOB value.
-
-Syntax
-sword OCILobGetChunkSize ( OCISvcCtx      *svchp,
-                           OCIError       *errhp,
-                           OCILobLocator  *locp,
-                           ub4            *chunksizep );
-
-Comments
- Performance will be improved if the user issues read/write
-requests using a multiple of this chunk size. For writes, there is an added 
-benefit since LOB chunks are versioned and, if all writes are done on chunk
-basis, no extra/excess versioning is done nor duplicated. Users could batch 
-up the write until they have enough for a chunk instead of issuing several
-write calls for the same chunk.
-
-Parameters
-svchp (IN) - the service context handle.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-locp (IN/OUT) - a LOB locator that uniquely references the LOB. For internal
-LOBs, this locator must be a locator that was obtained from the server 
-specified by svchp. For FILEs, this locator can be initialized by a Select or
-OCILobFileSetName.
-chunksizep (OUT) - On output, it is the length of the LOB if not NULL - for 
-character LOBs it is the number of characters, for binary LOBs it is the 
-number of bytes in the LOB.
-
-Related Functions
-
-OCILobGetLength()
-
-Name
-OCI Lob/File Length
-
-Purpose
-Gets the length of a LOB/FILE. 
-
-Syntax
-sword OCILobGetLength ( OCISvcCtx      *svchp,
-                        OCIError       *errhp,
-                        OCILobLocator  *locp,
-                        ub4            *lenp );
-
-Comments
-Gets the length of a LOB/FILE. If the LOB/FILE is NULL, the length is 
-undefined.
-
-Parameters
-svchp (IN) - the service context handle.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-locp (IN/OUT) - a LOB locator that uniquely references the LOB. For internal
-LOBs, this locator must be a locator that was obtained from the server 
-specified by svchp. For FILEs, this locator can be initialized by a Select or
-OCILobFileSetName.
-lenp (OUT) - On output, it is the length of the LOB if not NULL - for 
-character LOBs it is the number of characters, for binary LOBs it is the 
-number of bytes in the LOB.
-
-Related Functions
-OCIErrorGet, OCIFileSetName
-
-
-
-OCILobIsEqual()
-
-Name
-
-OCI Lob Is Equal
-
-Purpose
-Compares two LOB locators for equality.
-
-Syntax
-sword OCILobIsEqual ( OCIEnv                  *envhp,
-                      CONST OCILobLocator     *x,
-                      CONST OCILobLocator     *y,
-                      boolean                 *is_equal );
-
-Comments
-Compares the given LOB locators for equality.  Two LOB locators are equal if 
-and only if they both refer to the same LOB data.
-Two NULL locators are considered not equal by this function.
-Parameters
-envhp (IN) - the OCI environment handle.
-x (IN) - LOB locator to compare.
-y (IN) - LOB locator to compare.
-is_equal (OUT) - TRUE, if the LOB locators are equal; FALSE if they are not.
-
-See also
-OCILobAssign, OCILobLocatorIsInit
-OCILobLocatorAssign,
-OCILobIsOpen()
-
-Name
-
-OCI Lob Is Open
-sword OCILobIsOpen(svchp, errhp, locp, flag)
-OCISvcCtx     *svchp;
-OCIError      *errhp;
-OCILobLocator *locp;
-boolean       *flag;
-
-Comments
-   Checks if the LOB locator was opened before. flag is set to TRUE
-   if opened; FALSE otherwise 
-
-
-Parameters
-svchp (IN) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-locp (IN) - the locator to test for temporary LOB
-flag(OUT) - TRUE, if the LOB locator points to is open
-                    FALSE, if not.
-
-OCILobIsTemporary()
-
-Name
-
-OCI Lob Is Temporary
-
-Purpose
-  Tests if this locator points to a temporary LOB
-
-Syntax
-sword OCILobIsTemporary(OCIEnv            *envhp,
-                        OCIError          *errhp,
-                        OCILobLocator     *locp,
-                        boolean           *is_temporary);
-
-Comments
-Tests the locator to determine if it points to a temporary LOB.
-If so, is_temporary is set to TRUE. If not, is_temporary is set
-to FALSE.
-
-Parameters
-envhp (IN) - the environment handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-locp (IN) - the locator to test for temporary LOB
-is_temporary(OUT) - TRUE, if the LOB locator points to a temporary LOB;
-                    FALSE, if not.
-
-See Also
-OCILobCreateTemporary, OCILobFreeTemporary
-
-
-OCILobLoadFromFile()
-
-Name
-OCI Lob Load From File
-
-Purpose
-Load/copy all or a portion of the file into an internal LOB.
-
-Syntax
-sword OCILobLoadFromFile ( OCISvcCtx        *svchp,
-                           OCIError         *errhp,
-                           OCILobLocator    *dst_locp,
-                           OCILobLocator    *src_filep,
-                           ub4              amount,
-                           ub4              dst_offset,
-                           ub4              src_offset );
-
-Comments
-Loads/copies a portion or all of a file value into an internal LOB as 
-specified.  The data is copied from the source file to the destination 
-internal LOB (BLOB/CLOB).  No character set conversions are performed 
-when copying the bfile data to a clob/nclob.  The bfile data must already
-be in the same character set as the clob/nclob in the database.  No
-error checking is performed to verify this.
-The source (src_filep) and the destination (dst_locp) LOBs must already exist.
-If the data already exists at the destination's start position, it is 
-overwritten with the source data. If the destination's start position is 
-beyond the end of the current data, a hole is created from the end of the data
-to the beginning of the newly written data from the source. The destination 
-LOB is extended to accommodate the newly written data if it extends 
-beyond the current length of the destination LOB. 
-It is an error to extend the destination LOB beyond the maximum length 
-allowed or to try to copy from a NULL LOB.
-Parameters
-svchp (IN) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-dst_locp (IN/OUT) - a locator uniquely referencing the destination internal 
-LOB which may be of type blob, clob, or nclob. 
-src_filep (IN/OUT) - a locator uniquely referencing the source BFILE. 
-amount (IN) - the number of bytes to be copied.
-dst_offset (IN) - this is the absolute offset for the destination LOB. 
-For character LOBs it is the number of characters from the beginning of the 
-LOB at which to begin writing. For binary LOBs it is the number of bytes from 
-the beginning of the lob from which to begin reading. The offset starts at 1.
-src_offset (IN) - this is the absolute offset for the source BFILE.  It is 
-the number of bytes from the beginning of the LOB.  The offset starts at 1.
-
-See Also 
-OCIErrorGet(), OCILobAppend(), OCILobWrite(), OCILobTrim(), OCILobCopy()
-
-OCILobLocatorAssign()
-
-Name
-OCI Lob LOCATOR ASsiGn
-
-Purpose
-Assigns one LOB/FILE locator to another.
-
-Syntax
-sword OCILobLocatorAssign ( OCISvcCtx             *svchp, 
-                            OCIError              *errhp, 
-                            CONST OCILobLocator   *src_locp, 
-                            OCILobLocator         **dst_locpp );
-
-Comments
-Assign source locator to destination locator.  After the assignment, both 
-locators refer to the same LOB data.  For internal LOBs, the source locator's 
-LOB data gets copied to the destination locator's LOB data only when the 
-destination locator gets stored in the table.  Therefore, issuing a flush of 
-the object containing the destination locator will copy the LOB data. For 
-FILEs only the locator that refers to the OS file is copied to the table. The
-OS file is not copied.
-Note : the only difference between this and OCILobAssign is that this takes
-a OCI service handle pointer instead of a OCI environment handle pointer
-
-Parameters
-svchp (IN/OUT) - OCI service handle initialized in object mode.
-errhp (IN/OUT) - The OCI error handle. If there is an error, it is recorded 
-in errhp and this function returns OCI_ERROR. Diagnostic information can be 
-obtained by calling OCIErrorGet().
-src_locp (IN) - LOB locator to copy from.
-dst_locpp (IN/OUT) - LOB locator to copy to.  The caller must allocate space 
-for the OCILobLocator by calling OCIDescriptorAlloc().
-
-See also
-OCIErrorGet()
-OCILobIsEqual()
-OCILobLocatorIsInit()
-OCILobAssign()
-
-
-
-
-OCILobLocatorIsInit()
-
-Name
-OCI LOB locator is initialized?
-
-Purpose
-Tests to see if a given LOB locator is initialized.
-
-Syntax
-sword OCILobLocatorIsInit ( OCIEnv   *envhp,
-                            OCIError *errhp,
-                            CONST OCILobLocator *locp,
-                            boolean *is_initialized );
-
-Comments
-Tests to see if a given LOB locator is initialized.
-
-Parameters
-envhp (IN/OUT) - OCI environment handle initialized in object mode.
-errhp (IN/OUT) - error handle. The OCI error handle. If there is an error, it 
-is recorded in err and this function returns OCI_ERROR. Diagnostic 
-information can be obtained by calling OCIErrorGet().
-locp (IN) - the LOB locator being tested
-is_initialized (OUT) - returns TRUE if the given LOB locator is initialized; 
-FALSE if it is not.
-
-See also
-OCIErrorGet, OCILobIsEqual
-
-
-
-
-OCILobRead()
-
-Name
-OCI Lob/File ReaD
-
-Purpose
-Reads a portion of a LOB/FILE as specified by the call into a buffer. 
-
-Syntax
-sword OCILobRead ( OCISvcCtx       *svchp,
-                   OCIError        *errhp,
-                   OCILobLocator   *locp,
-                   ub4             offset,
-                   ub4             *amtp,
-                   dvoid           *bufp,
-                   ub4             bufl,
-                   dvoid           *ctxp,  
-                   OCICallbackLobRead cbfp,
-                   ub2             csid,
-                   ub1             csfrm );
-
-Comments
-Reads a portion of a LOB/FILE as specified by the call into a buffer. Data 
-read from a hole is returned as 0s. It is an error to try to read from a NULL
-LOB/FILE. The OS FILE must already exist on the server and must have been 
-opened using the input locator. Oracle must hav epermission to read the OS 
-file and user must have read permission on the directory object.
-
-Parameters
-svchp (IN/OUT) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-locp (IN/OUT) - a LOB locator that uniquely references a LOB. 
-offset (IN) - On input, it is the absolute offset, for character LOBs in the 
-number of characters from the beginning of the LOB, for binary LOBs it is the 
-number of bytes. Starts from 1.
-amtp (IN/OUT) - On input, the number of character or bytes to be read. On 
-output, the actual number of bytes or characters read. 
-If the amount of bytes to be read is larger than the buffer length it is 
-assumed that the LOB is being read in a streamed mode. On input if this value 
-is 0, then the data shall be read in streamed mode from the LOB until the end 
-of LOB. If the data is read in pieces, *amtp always contains the length of 
-the last piece read.  If a callback function is defined, then this callback 
-function will be invoked each time bufl bytes are read off the pipe. Each 
-piece will be written into bufp.
-If the callback function is not defined, then OCI_NEED_DATA error code will 
-be returned. The application must invoke the LOB read over and over again to 
-read more pieces of the LOB until the OCI_NEED_DATA error code is not 
-returned. The buffer pointer and the length can be different in each call 
-if the pieces are being read into different sizes and location. 
-bufp (IN) - the pointer to a buffer into which the piece will be read. The 
-length of the allocated memory is assumed to be bufl. 
-bufl (IN) - the length of the buffer in octets. 
-ctxp (IN) - the context for the call back function. Can be NULL.
-cbfp (IN) - a callback that may be registered to be called for each piece. If 
-this is NULL, then OCI_NEED_DATA will be returned for each piece. 
-The callback function must return OCI_CONTINUE for the read to continue. 
-If any other error code is returned, the LOB read is aborted. 
-  ctxp (IN) - the context for the call back function. Can be NULL.
-  bufp (IN) - a buffer pointer for the piece.
-  len (IN) - the length of length of current piece in bufp.
-  piece (IN) - which piece - OCI_FIRST_PIECE, OCI_NEXT_PIECE or 
-  OCI_LAST_PIECE.
-csid - the character set ID of the buffer data
-csfrm - the character set form of the buffer data
-
-Related Functions
-OCIErrorGet, OCILobWrite, OCILobFileOpen, OCILobFileSetName, CREATE DIRECTORY
-
-
-
-
-OCILobTrim()
-
-Name
-
-OCI Lob  Trim
-
-Purpose
-Trims the lob value to a shorter length
-
-Syntax
-sword OCILobTrim ( OCISvcCtx       *svchp,
-                 OCIError        *errhp,
-                 OCILobLocator   *locp,
-                 ub4             newlen );
-
-Comments
-Truncates LOB data to a specified shorter length. 
-
-Parameters
-svchp (IN) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-locp (IN/OUT) - a LOB locator that uniquely references the LOB. This locator 
-must be a locator that was obtained from the server specified by svchp. 
-newlen (IN) - the new length of the LOB data, which must be less than or equal
-to the current length. 
-
-Related Functions
-OCIErrorGet, OCILobWrite, OCiLobErase, OCILobAppend, OCILobCopy
-
-
-
-
-
-OCILobWrite()
-
-Name
-OCI Lob Write
-
-Purpose
-Writes a buffer into a LOB
-
-Syntax
-sword OCILobWrite ( OCISvcCtx       *svchp,
-                    OCIError        *errhp,
-                    OCILobLocator   *locp,
-                    ub4             offset,
-                    ub4             *amtp,
-                    dvoid           *bufp, 
-                    ub4             buflen,
-                    ub1             piece,
-                    dvoid           *ctxp,  
-                    OCICallbackLobWrite   (cbfp)
-                                    (
-                                    dvoid    *ctxp,
-                                    dvoid    *bufp,
-                                    ub4      *lenp,
-                                    ub1      *piecep ) 
-                    ub2             csid
-                    ub1             csfrm );
-
-
-Comments
-Writes a buffer into a LOB as specified. If LOB data already exists 
-it is overwritten with the data stored in the buffer.
-The buffer can be written to the LOB in a single piece with this call, or
-it can be provided piecewise using callbacks or a standard polling method.
-If this value of the piece parameter is OCI_FIRST_PIECE, data must be 
-provided through callbacks or polling.
-If a callback function is defined in the cbfp parameter, then this callback 
-function will be invoked to get the next piece after a piece is written to 
-the pipe. Each piece will be written from bufp.
-If no callback function is defined, then OCILobWrite() returns the 
-OCI_NEED_DATA error code. The application must all OCILobWrite() again 
-to write more pieces of the LOB. In this mode, the buffer pointer and the 
-length can be different in each call if the pieces are of different sizes and 
-from different locations. A piece value of OCI_LAST_PIECE terminates the 
-piecewise write. 
-
-Parameters
-svchp (IN/OUT) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-locp (IN/OUT) - a LOB locator that uniquely references a LOB. 
-offset (IN) - On input, it is the absolute offset, for character LOBs in 
-the number of characters from the beginning of the LOB, for binary LOBs it 
-is the number of bytes. Starts at 1.
-bufp (IN) - the pointer to a buffer from which the piece will be written. The 
-length of the allocated memory is assumed to be the value passed in bufl. 
-Even if the data is being written in pieces, bufp must contain the first 
-piece of the LOB when this call is invoked.
-bufl (IN) - the length of the buffer in bytes.
-Note: This parameter assumes an 8-bit byte. If your platform uses a 
-longer byte, the value of bufl must be adjusted accordingly.
-piece (IN) - which piece of the buffer is being written. The default value for
-this parameter is OCI_ONE_PIECE, indicating the buffer will be written in a 
-single piece.
-The following other values are also possible for piecewise or callback mode: 
-OCI_FIRST_PIECE, OCI_NEXT_PIECE and OCI_LAST_PIECE.
-amtp (IN/OUT) - On input, takes the number of character or bytes to be 
-written. On output, returns the actual number of bytes or characters written. 
-If the data is written in pieces, *amtp will contain the total length of the 
-pieces written at the end of the call (last piece written) and is undefined in
-between. 
-(Note it is different from the piecewise read case)
-ctxp (IN) - the context for the call back function. Can be NULL.
-cbfp (IN) - a callback that may be registered to be called for each piece in 
-a piecewise write. If this is NULL, the standard polling method will be used.
-The callback function must return OCI_CONTINUE for the write to continue. 
-If any other error code is returned, the LOB write is aborted. The 
-callback takes the following parameters:
-  ctxp (IN) - the context for the call back function. Can be NULL.
-  bufp (IN/OUT) - a buffer pointer for the piece.
-  lenp (IN/OUT) - the length of the buffer (in octets) and the length of 
-  current piece in bufp (out octets).
-  piecep (OUT) - which piece - OCI_NEXT_PIECE or OCI_LAST_PIECE.
-csid - the character set ID of the buffer data
-csfrm - the character set form of the buffer data
-Related Functions
-
-OCILobWriteAppend()
-
-Name
-OCI Lob Write Append
-
-Purpose
-Writes data to the end of a LOB value. This call provides the ability
-to get the length of the data and append it to the end of the LOB in
-a single round trip to the server.
-
-Syntax
-sword OCILobWriteAppend ( OCISvcCtx       *svchp,
-                    OCIError        *errhp,
-                    OCILobLocator   *locp,
-                    ub4             *amtp,
-                    dvoid           *bufp, 
-                    ub4             buflen,
-                    ub1             piece,
-                    dvoid           *ctxp,  
-                    OCICallbackLobWrite   (cbfp)
-                                    (
-                                    dvoid    *ctxp,
-                                    dvoid    *bufp,
-                                    ub4      *lenp,
-                                    ub1      *piecep ) 
-                    ub2             csid
-                    ub1             csfrm );
-
-
-Comments
-Writes a buffer to the end of a LOB as specified. If LOB data already exists 
-it is overwritten with the data stored in the buffer.
-The buffer can be written to the LOB in a single piece with this call, or
-it can be provided piecewise using callbacks or a standard polling method.
-If this value of the piece parameter is OCI_FIRST_PIECE, data must be 
-provided through callbacks or polling.
-If a callback function is defined in the cbfp parameter, then this callback 
-function will be invoked to get the next piece after a piece is written to the 
-pipe. Each piece will be written from bufp.
-If no callback function is defined, then OCILobWriteAppend() returns the 
-OCI_NEED_DATA error code. The application must all OCILobWriteAppend() again 
-to write more pieces of the LOB. In this mode, the buffer pointer and the 
-length can be different in each call if the pieces are of different sizes and 
-from different locations. A piece value of OCI_LAST_PIECE terminates the 
-piecewise write. 
-
-Parameters
-svchp (IN/OUT) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-locp (IN/OUT) - a LOB locator that uniquely references a LOB. 
-bufp (IN) - the pointer to a buffer from which the piece will be written. The 
-length of the allocated memory is assumed to be the value passed in bufl. Even 
-if the data is being written in pieces, bufp must contain the first piece of 
-the LOB when this call is invoked.
-bufl (IN) - the length of the buffer in bytes.
-Note: This parameter assumes an 8-bit byte. If your platform uses a 
-longer byte, the value of bufl must be adjusted accordingly.
-piece (IN) - which piece of the buffer is being written. The default value for
-this parameter is OCI_ONE_PIECE, indicating the buffer will be written in a 
-single piece.
-The following other values are also possible for piecewise or callback mode: 
-OCI_FIRST_PIECE, OCI_NEXT_PIECE and OCI_LAST_PIECE.
-amtp (IN/OUT) - On input, takes the number of character or bytes to be 
-written. On output, returns the actual number of bytes or characters written. 
-If the data is written in pieces, *amtp will contain the total length of the 
-pieces written at the end of the call (last piece written) and is undefined in
-between. 
-(Note it is different from the piecewise read case)
-ctxp (IN) - the context for the call back function. Can be NULL.
-cbfp (IN) - a callback that may be registered to be called for each piece in a 
-piecewise write. If this is NULL, the standard polling method will be used.
-The callback function must return OCI_CONTINUE for the write to continue. 
-If any other error code is returned, the LOB write is aborted. The 
-callback takes the following parameters:
-  ctxp (IN) - the context for the call back function. Can be NULL.
-  bufp (IN/OUT) - a buffer pointer for the piece.
-  lenp (IN/OUT) - the length of the buffer (in octets) and the length of 
-  current piece in bufp (out octets).
-  piecep (OUT) - which piece - OCI_NEXT_PIECE or OCI_LAST_PIECE.
-csid - the character set ID of the buffer data
-csfrm - the character set form of the buffer data
-Related Functions
-
-
-
-
-OCILobGetStorageLimit()
-
-Name
-OCI Lob Get Storage Limit
-
-Purpose
-To get the maximum Length of a LOB in bytes that can be stored in the database.
-
-Syntax
-sword OCILobGetStorageLimit ( OCISvcCtx       *svchp,
-                    OCIError        *errhp,
-                    OCILobLocator   *locp,
-                    oraub8          *limitp);
-
-
-Comments
-With unlimited size LOB support the limit for a LOB is no longer restricted to 4GB.
-This interface should be used to get the actual limit for storing data for a specific
-LOB locator. Note that if the compatibality is set to 9.2 or older the limit would still 
-be 4GB.
-
-Parameters
-svchp (IN/OUT) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-locp (IN/OUT) - a LOB locator that uniquely references a LOB. 
-limitp (OUT)  - The storage limit for a LOB in bytes.
-Related Functions
-
-
-
-
-OCILogoff()
-Name
-OCI simplified Logoff
-Purpose
-This function is used to terminate a session created with OCILogon() or
-OCILogon2().
-Syntax
-sword OCILogoff ( OCISvcCtx      *svchp
-                   OCIError       *errhp );
-Comments
-This call is used to terminate a session which was created with OCILogon() or
-OCILogon2().  
-This call implicitly deallocates the server, authentication, and service 
-context handles.
-Note: For more information on logging on and off in an application, 
-refer to the section "Application Initialization, Connection, and 
-Authorization" on page 2-16.
-Parameters
-svchp (IN) - the service context handle which was used in the call to 
-OCILogon() or OCILogon2().
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-See Also
-OCILogon(), OCILogon2().
-
-
-
-
-
-
-OCILogon()
-Name
-OCI Service Context Logon
-Purpose
-This function is used to create a simple logon session.
-Syntax
-sword OCILogon ( OCIEnv          *envhp,
-                       OCIError        *errhp,
-                       OCISvcCtx       *svchp,
-                       CONST OraText      *username,
-                       ub4             uname_len,
-                       CONST OraText      *password,
-                       ub4             passwd_len,
-                       CONST OraText      *dbname,
-                       ub4             dbname_len );
-Comments
-This function is used to create a simple logon session for an application. 
-Note: Users requiring more complex session (e.g., TP monitor 
-applications) should refer to the section "Application Initialization, 
-Connection, and Authorization" on page 2-16.
-This call allocates the error and service context handles which are passed to 
-it. This call also implicitly allocates server and authentication handles 
-associated with the session.  These handles can be retrieved by calling 
-OCIAttrGet() on the service context handle.
-Parameters
-envhp (IN) - the OCI environment handle.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-svchp (OUT) - the service context pointer.
-username (IN) - the username.
-uname_len (IN) - the length of username.
-password (IN) - the user's password.
-passwd_len (IN) - the length of password.
-dbname (IN) - the name of the database to connect to.
-dbname_len (IN) - the length of dbname.
-See Also
-OCILogoff()
-
-
-
-
-
-OCILogon2()
-Name
-OCI Service Context Logon
-Purpose
-This function is used to create a logon session in connection pooling mode.
-Syntax
-sword OCILogon2 ( OCIEnv          *envhp,
-                       OCIError        *errhp,
-                       OCISvcCtx       **svchp,
-                       CONST OraText      *username,
-                       ub4             uname_len,
-                       CONST OraText      *password,
-                       ub4             passwd_len,
-                       CONST OraText      *dbname,
-                       ub4             dbname_len,
-                       ub4             mode);
-Comments
-This function is used to create a simple logon session for an application in
-Connection Pooling mode. The valid values for mode are currently OCI_POOL and
-OCI_DEFAULT. Call to this function with OCI_DEFAULT mode is equivalent to 
-OCILogon() call.
-This call allocates the error and service context handles which are passed to 
-it. This call also implicitly allocates server and authentication handles 
-associated with the session.  These handles can be retrieved by calling 
-OCIAttrGet() on the service context handle. This call assumes that 
-OCIConnectionPoolCreate() has already been called for the same dbname.
-Parameters
-envhp (IN) - the OCI environment handle.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-svchp (OUT) - the service context pointer.
-username (IN) - the username.
-uname_len (IN) - the length of username.
-password (IN) - the user's password. If this is null, it is assumed that a
-                proxy session has to be created and the required grants on 
-                the database are already done.
-passwd_len (IN) - the length of password.
-dbname (IN) - the name of the database to connect to.
-dbname_len (IN) - the length of dbname.
-mode (IN) - the mode for doing the server attach. Should be OCI_POOL for
-            using Connection Pooling.
-
-
-See Also
-OCILogoff()
-
-
-
-
-
-OCIMemoryFree()
-Name
-OCI FREE Memory
-Purpose
-Frees up storage associated with the pointer.
-Syntax
-void OCIMemoryFree ( CONST OCIStmt   *stmhp,
-                     dvoid           *memptr);
-Comments
-Frees up dynamically allocated data pointers associated with the pointer using 
-either the default memory free function or the registered memory free 
-function, as the case may be.
-A user-defined memory free function can be registered during the initial call 
-to OCIInitialize(). 
-This call is always successful. 
-Parameters
-stmhp (IN) - statement handle which returned this data buffer.
-memptr (IN) - pointer to data allocated by the client library. 
-Related Functions
-OCIInitialize()
-
-
-
-
-
-OCIParamGet()
-Name
-OCI Get PARaMeter
-Purpose
-Returns a descriptor of a parameter specified by position in the describe 
-handle or statement handle.
-Syntax
-sword OCIParamGet ( CONST dvoid       *hndlp,
-                  ub4         htype,
-                  OCIError    *errhp,
-                  dvoid    **parmdpp,
-                  ub4         pos );
-Comments
-This call returns a descriptor of a parameter specified by position in the 
-describe handle or statement handle. Parameter descriptors are always 
-allocated internally by the OCI library. They are read-only.
-OCI_NO_DATA may be returned if there are no parameter descriptors for this 
-position. 
-See Appendix B for more detailed information about parameter descriptor 
-attributes.
-Parameters
-hndlp (IN) - a statement handle or describe handle. The OCIParamGet() 
-function will return a parameter descriptor for this handle. 
-htype (IN) - the type of the handle passed in the handle parameter. Valid 
-types are OCI_HTYPE_DESCRIBE, for a describe handle OCI_HTYPE_STMT, for a 
-statement handle
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-parmdpp (OUT) - a descriptor of the parameter at the position given in the pos 
-parameter.
-pos (IN) - position number in the statement handle or describe handle. A 
-parameter descriptor will be returned for this position.
-Note: OCI_NO_DATA may be returned if there are no parameter 
-descriptors for this position. 
-Related Functions
-OCIAttrGet(), OCIAttrSet()
-
-
-
-
-
-OCIParamSet()
-Name
-OCI Parameter Set in handle
-Purpose
-Used to set a complex object retrieval descriptor into a complex object 
-retrieval handle.
-Syntax
-sword   OCIParamGet ( dvoid *hndlp,
-                       ub4 htyp,
-                      OCIError *errhp,
-                      CONST dvoid *dscp,
-                      ub4 dtyp,
-                      ub4 pos );
-Comments
-This call sets a given complex object retrieval descriptor into a complex 
-object retrieval handle.
-The handle must have been previously allocated using OCIHandleAlloc(), and 
-the descriptor must have been previously allocated using OCIDescAlloc(). 
-Attributes of the descriptor are set using OCIAttrSet().
-Parameters
-hndlp (IN/OUT) - handle pointer.
-htype (IN) - handle type.
-errhp (IN/OUT) - error handle.
-dscp (IN) - complex object retrieval descriptor pointer.
-dtyp (IN) - 
-pos (IN) - position number.
-See Also
-
-
-
-
-
-OCIPasswordChange()
-Name
-OCI Change PassWord
-Purpose
-This call allows the password of an account to be changed.
-Syntax
-sword OCIPasswordChange ( OCISvcCtx     *svchp,
-                        OCIError      *errhp,
-                        CONST OraText    *user_name,
-                        ub4           usernm_len,
-                        CONST OraText    *opasswd,
-                        ub4           opasswd_len,
-                        CONST OraText    *npasswd,
-                        sb4           npasswd_len,
-                        ub4           mode);
-Comments
-This call allows the password of an account to be changed. This call is 
-similar to OCISessionBegin() with the following differences:
-If the user authentication is already established, it authenticates 
-the account using the old password and then changes the 
-password to the new password
-If the user authentication is not established, it establishes a user 
-authentication and authenticates the account using the old 
-password, then changes the password to the new password.
-This call is useful when the password of an account is expired and 
-OCISessionBegin() returns an error or warning which indicates that the 
-password has expired. 
-Parameters
-svchp (IN/OUT) - a handle to a service context. The service context handle 
-must be initialized and have a server context handle associated with it.
-errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-user_name (IN) - specifies the user name. It points to a character string, 
-whose length is specified in usernm_len. This parameter must be NULL if the 
-service context has been initialized with an authentication handle.
-usernm_len (IN) - the length of the user name string specified in user_name. 
-For a valid user name string, usernm_len must be non-zero.
-opasswd (IN) - specifies the user's old password. It points to a character 
-string, whose length is specified in opasswd_len .
-opasswd_len (IN) - the length of the old password string specified in opasswd. 
-For a valid password string, opasswd_len must be non-zero.
-npasswd (IN) - specifies the user's new password. It points to a character 
-string, whose length is specified in npasswd_len which must be non-zero for a 
-valid password string. If the password complexity verification routine is 
-specified in the user's profile to verify the new password's complexity, the 
-new password must meet the complexity requirements of the verification 
-function.
-npasswd_len (IN)  - then length of the new password string specified in 
-npasswd. For a valid password string, npasswd_len must be non-zero.
-mode - pass as OCI_DEFAULT.
-Related Functions
-OCISessionBegin()
-
-
-----------------------------------OCIReset------------------------------------
-
-
-OCIReset()
-Name
-OCI Reset
-Purpose
-Resets the interrupted asynchronous operation and protocol. Must be called
-if a OCIBreak call had been issued while a non-blocking operation was in
-progress.
-Syntax
-sword OCIReset ( dvoid      *hndlp,
-                 OCIError   *errhp);
-Comments
-This call is called in non-blocking mode ONLY. Resets the interrupted
-asynchronous operation and protocol. Must be called if a OCIBreak call 
-had been issued while a non-blocking operation was in progress. 
-Parameters
-hndlp (IN) - the service context handle or the server context handle.
-errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-Related Functions
-
-
-OCIResultSetToStmt()
-Name
-OCI convert Result Set to Statement Handle
-Purpose
-Converts a descriptor to statement handle for fetching rows.
-Syntax
-sword OCIResultSetToStmt ( OCIResult     *rsetdp,
-                         OCIError      *errhp );
-Comments
-Converts a descriptor to statement handle for fetching rows.
-A result set descriptor can be allocated with a call to OCIDescAlloc().
-Parameters
-rsetdp (IN/OUT) - a result set descriptor pointer. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-Related Functions
-OCIDescAlloc()
-
-
-
-
-OCIServerAttach()
-Name
-OCI ATtaCH to server
-Purpose
-Creates an access path to a data source for OCI operations.
-Syntax
-sword OCIServerAttach ( OCIServer    *srvhp,
-                      OCIError     *errhp,
-                      CONST OraText   *dblink,
-                      sb4          dblink_len,
-                      ub4          mode);
-Comments
-This call is used to create an association between an OCI application and a 
-particular server. 
-This call initializes a server context handle, which must have been previously 
-allocated with a call to OCIHandleAlloc().
-The server context handle initialized by this call can be associated with a 
-service context through a call to OCIAttrSet(). Once that association has been 
-made, OCI operations can be performed against the server.
-If an application is operating against multiple servers, multiple server 
-context handles can be maintained. OCI operations are performed against 
-whichever server context is currently associated with the service context.
-Parameters
-srvhp (IN/OUT) - an uninitialized server context handle, which gets 
-initialized by this call. Passing in an initialized server handle causes an 
-error. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-dblink (IN) - specifies the database (server) to use. This parameter points to
-a character string which specifies a connect string or a service point. If the 
-connect string is NULL, then this call attaches to the default host. The length
-of connstr is specified in connstr_len. The connstr pointer may be freed by the
-caller on return.
-dblink_len (IN) - the length of the string pointed to by connstr. For a valid 
-connect string name or alias, connstr_len must be non-zero.
-mode (IN) - specifies the various modes of operation.  For release 8.0, pass as
-OCI_DEFAULT - in this mode, calls made to the server on this server context 
-are made in blocking mode. 
-Example
-See the description of OCIStmtPrepare() on page 13-96 for an example showing 
-the use of OCIServerAttach().
-Related Functions
-OCIServerDetach()
-
-
-
-OCIServerDetach()
-Name
-OCI DeTaCH server
-Purpose
-Deletes an access to a data source for OCI operations.
-Syntax
-sword OCIServerDetach ( OCIServer   *svrhp,
-                      OCIError    *errhp,
-                      ub4         mode); 
-Comments
-This call deletes an access to data source for OCI operations, which was 
-established by a call to OCIServerAttach(). 
-Parameters
-srvhp (IN) - a handle to an initialized server context, which gets reset to 
-uninitialized state. The handle is not de-allocated. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-mode (IN) - specifies the various modes of operation. The only valid mode is 
-OCI_DEFAULT for the default mode. 
-Related Functions
-OCIServerAttach()
-
-
-
-OCIServerVersion()
-Name
-OCI VERSion
-Purpose
-Returns the version string of the Oracle server.
-Syntax
-sword OCIServerVersion ( dvoid        *hndlp, 
-                       OCIError     *errhp, 
-                       OraText         *bufp,
-                       ub4          bufsz
-                       ub1          hndltype );
-Comments
-This call returns the version string of the Oracle server. 
-For example, the following might be returned as the version string if your 
-application is running against a 7.3.2 server:
-Oracle7 Server Release 7.3.2.0.0 - Production Release
-PL/SQL Release 2.3.2.0.0 - Production
-CORE Version 3.5.2.0.0 - Production
-TNS for SEQUENT DYNIX/ptx: Version 2.3.2.0.0 - Production
-NLSRTL Version 3.2.2.0.0 - Production
-
-Parameters
-hndlp (IN) - the service context handle or the server context handle.
-errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-bufp (IN) - the buffer in which the version information is returned.
-bufsz (IN) - the length of the buffer.
-hndltype (IN) - the type of handle passed to the function.
-Related Functions
-
-
-
-
-
-OCISessionBegin()
-Name
-OCI Session Begin and authenticate user
-Purpose
-Creates a user authentication and begins a user session for a given server.
-Syntax
-sword OCISessionBegin ( OCISvcCtx     *svchp,
-                      OCIError      *errhp,
-                      OCISession    *usrhp,
-                      ub4           credt,
-                      ub4           mode);
-
-Comments
-For Oracle8, OCISessionBegin() must be called for any given server handle 
-before requests can be made against it. Also, OCISessionBegin() only supports 
-authenticating the user for access to the Oracle server specified by the 
-server handle in the service context. In other words, after OCIServerAttach() 
-is called to initialize a server handle, OCISessionBegin() must be called to 
-authenticate the user for that given server. 
-When OCISessionBegin() is called for the first time for the given server 
-handle, the initialized authentication handle is called a primary 
-authentication context. A primary authentication context may not be created 
-with the OCI_MIGRATE mode. Also, only one primary authentication context can 
-be created for a given server handle and the primary authentication context c
-an only ever be used with that server handle. If the primary authentication 
-context is set in a service handle with a different server handle, then an 
-error will result.
-After OCISessionBegin() has been called for the server handle, and the primary 
-authentication context is set in the service handle, OCISessionBegin() may be 
-called again to initialize another authentication handle with different (or 
-the same) credentials. When OCISessionBegin() is called with a service handle 
-set with a primary authentication context, the returned authentication context
-in authp is called a user authentication context. As many user authentication 
-contexts may be initialized as desired.
-User authentication contexts may be created with the OCI_MIGRATE mode. 
-If the OCI_MIGRATE mode is not specified, then the user authentication 
-context can only ever be used with the same server handle set in svchp. If 
-OCI_MIGRATE mode is specified, then the user authentication may be set 
-with different server handles. However, the user authentication context is 
-restricted to use with only server handles which resolve to the same database 
-instance and that have equivalent primary authentication contexts. Equivalent 
-authentication contexts are those which were authenticated as the same 
-database user.
-OCI_SYSDBA, OCI_SYSOPER, and OCI_PRELIM_AUTH may only be used 
-with a primary authentication context.
-To provide credentials for a call to OCISessionBegin(), one of two methods are 
-supported. The first is to provide a valid username and password pair for 
-database authentication in the user authentication handle passed to 
-OCISessionBegin(). This involves using OCIAttrSet() to set the 
-OCI_ATTR_USERNAME and OCI_ATTR_PASSWORD attributes on the 
-authentication handle. Then OCISessionBegin() is called with 
-OCI_CRED_RDBMS.
-Note: When the authentication handle is terminated using 
-OCISessionEnd(), the username and password attributes remain 
-unchanged and thus can be re-used in a future call to OCISessionBegin(). 
-Otherwise, they must be reset to new values before the next 
-OCISessionBegin() call.
-The second type of credentials supported are external credentials. No 
-attributes need to be set on the authentication handle before calling 
-OCISessionBegin(). The credential type is OCI_CRED_EXT. This is equivalent 
-to the Oracle7 `connect /' syntax. If values have been set for 
-OCI_ATTR_USERNAME and OCI_ATTR_PASSWORD, then these are 
-ignored if OCI_CRED_EXT is used.
-Parameters
-svchp (IN) - a handle to a service context. There must be a valid server 
-handle set in svchp.
-errhp (IN) - an error handle to the retrieve diagnostic information.
-usrhp (IN/OUT) - a handle to an authentication context, which is initialized 
-by this call.
-credt (IN) - specifies the type of credentials to use for authentication. 
-Valid values for credt are:
-OCI_CRED_RDBMS - authenticate using a database username and 
-password pair as credentials. The attributes OCI_ATTR_USERNAME 
-and OCI_ATTR_PASSWORD should be set on the authentication 
-context before this call.
-OCI_CRED_EXT - authenticate using external credentials. No username 
-or password is provided.
-mode (IN) - specifies the various modes of operation. Valid modes are:
-OCI_DEFAULT - in this mode, the authentication context returned may 
-only ever be set with the same server context specified in svchp. This 
-establishes the primary authentication context.
-OCI_MIGRATE - in this mode, the new authentication context may be 
-set in a service handle with a different server handle. This mode 
-establishes the user authentication context. 
-OCI_SYSDBA - in this mode, the user is authenticated for SYSDBA 
-access.
-OCI_SYSOPER - in this mode, the user is authenticated for SYSOPER 
-access.
-OCI_PRELIM_AUTH - this mode may only be used with OCI_SYSDBA 
-or OCI_SYSOPER to authenticate for certain administration tasks.
-Related Functions
-OCISessionEnd()
-
-
-
-
-
-
-OCISessionEnd()
-Name
-OCI Terminate user Authentication Context
-Purpose
-Terminates a user authentication context created by OCISessionBegin()
-Syntax
-sword OCISessionEnd ( OCISvcCtx       *svchp,
-                    OCIError        *errhp,
-                    OCISession      *usrhp,
-                    ub4             mode);
-
-Comments
-The user security context associated with the service context is invalidated 
-by this call. Storage for the authentication context is not freed. The 
-transaction specified by the service context is implicitly committed. The 
-transaction handle, if explicitly allocated, may be freed if not being used.
-Resources allocated on the server for this user are freed.
-The authentication handle may be reused in a new call to OCISessionBegin().
-Parameters
-svchp (IN/OUT) - the service context handle. There must be a valid server 
-handle and user authentication handle associated with svchp.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-usrhp (IN) - de-authenticate this user. If this parameter is passed as NULL, 
-the user in the service context handle is de-authenticated.
-mode (IN) - the only valid mode is OCI_DEFAULT.
-Example
-In this example, an authentication context is destroyed.
-Related Functions
-OCISessionBegin()
-
-
-
-
-OCIStmtExecute()
-Name
-OCI EXECute
-Purpose
-This call associates an application request with a server.
-Syntax
-sword OCIStmtExecute ( OCISvcCtx           *svchp,
-                     OCIStmt             *stmtp,
-                     OCIError            *errhp,
-                     ub4                 iters,
-                     ub4                 rowoff,
-                     CONST OCISnapshot   *snap_in,
-                     OCISnapshot         *snap_out,
-                     ub4                 mode );
-Comments
-This function  is used to execute a prepared SQL statement.
-Using an execute call, the application associates a request with a server. On 
-success, OCI_SUCCESS is returned.
-If a SELECT statement is executed, the description of the select list follows 
-implicitly as a response. This description is buffered on the client side for 
-describes, fetches and define type conversions. Hence it is optimal to 
-describe a select list only after an execute. 
-Also for SELECT statements, some results are available implicitly. Rows will 
-be received and buffered at the end of the execute. For queries with small row 
-count, a prefetch causes memory to be released in the server if the end of 
-fetch is reached, an optimization that may result in memory usage reduction. 
-Set attribute call has been defined to set the number of rows to be prefetched
-per result set.
-For SELECT statements, at the end of the execute, the statement handle 
-implicitly maintains a reference to the service context on which it is 
-executed. It is the user's responsibility to maintain the integrity of the 
-service context. If the attributes of a service context is changed for 
-executing some operations on this service context, the service context must 
-be restored to have the same attributes, that a statement was executed with, 
-prior to a fetch on the statement handle. The implicit reference is maintained 
-until the statement handle is freed or the fetch is cancelled or an end of 
-fetch condition is reached.
-Note: If output variables are defined for a SELECT statement before a 
-call to OCIStmtExecute(), the number of rows specified by iters will be 
-fetched directly into the defined output buffers and additional rows 
-equivalent to the prefetch count will be prefetched. If there are no 
-additional rows, then the fetch is complete without calling 
-OCIStmtFetch().
-The execute call will return errors if the statement has bind data types that 
-are not supported in an Oracle7 server.
-Parameters
-svchp (IN/OUT) - service context handle. 
-stmtp (IN/OUT) - an statement handle - defines the statement and the 
-associated data to be executed at the server. It is invalid to pass in a 
-statement handle that has bind of data types only supported in release 8.0 
-when srvchp points to an Oracle7 server. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. If the statement is being 
-batched and it is successful, then this handle will contain this particular 
-statement execution specific errors returned from the server when the batch is 
-flushed.
-iters (IN) - the number of times this statement is executed for non-Select 
-statements. For Select statements, if iters is non-zero, then defines must 
-have been done for the statement handle. The execution fetches iters rows into 
-these predefined buffers and prefetches more rows depending upon the prefetch 
-row count. This function returns an error if iters=0 for non-SELECT 
-statements.
-rowoff (IN) - the index from which the data in an array bind is relevant for 
-this multiple row execution. 
-snap_in (IN) - this parameter is optional. if supplied, must point to a 
-snapshot descriptor of type OCI_DTYPE_SNAP.  The contents of this descriptor 
-must be obtained from the snap_out parameter of a previous call.  The 
-descriptor is ignored if the SQL is not a SELECT.  This facility allows 
-multiple service contexts to ORACLE to see the same consistent snapshot of the 
-database's committed data.  However, uncommitted data in one context is not 
-visible to another context even using the same snapshot.
-snap_out (OUT) - this parameter optional. if supplied, must point to a 
-descriptor of type OCI_DTYPE_SNAP. This descriptor is filled in with an 
-opaque representation which is the current ORACLE "system change 
-number" suitable as a snap_in input to a subsequent call to OCIStmtExecute().  
-This descriptor should not be used any longer than necessary in order to avoid 
-"snapshot too old" errors. 
-mode (IN) - The modes are:
-If OCI_DEFAULT_MODE, the default mode, is selected, the request is 
-immediately executed. Error handle contains diagnostics on error if any. 
-OCI_EXACT_FETCH - if the statement is a SQL SELECT, this mode is 
-only valid if the application has set the prefetch row count prior to this 
-call. In this mode, the OCI library will get up to the number of rows 
-specified (i.e., prefetch row count plus iters). If the number of rows 
-returned by the query is greater than this value, OCI_ERROR will be 
-returned with ORA-01422 as the implementation specific error in a 
-diagnostic record. If the number of rows returned by the query is 
-smaller than the prefetch row count, OCI_SUCCESS_WITH_INFO will 
-be returned with ORA-01403 as the implementation specific error. The 
-prefetch buffer size is ignored and the OCI library tries to allocate all the 
-space required to contain the prefetched rows. The exact fetch semantics 
-apply to only the top level rows. No more rows can be fetched for this 
-query at the end of the call. 
-OCI_KEEP_FETCH_STATE - the result set rows (not yet fetched) of this 
-statement executed in this transaction will be maintained when the 
-transaction is detached for migration. By default, a query is cancelled 
-when a transaction is detached for migration. This mode is the default 
-mode when connected to a V7 server. 
-Related Functions
-OCIStmtPrepare()
-
-
-
-
-
-OCIStmtFetch()
-Name
-OCI FetCH
-Purpose
-Fetches rows from a query.
-Syntax
-sword OCIStmtFetch ( OCIStmt     *stmtp,
-                   OCIError    *errhp, 
-                   ub4         nrows,
-                   ub2         orientation,
-                   ub4         mode);
-Comments
-The fetch call is a local call, if prefetched rows suffice. However, this is 
-transparent to the application. If LOB columns are being read, LOB locators 
-are fetched for subsequent LOB operations to be performed on these locators. 
-Prefetching is turned off if LONG columns are involved. 
-A fetch with nrows set to 0 rows effectively cancels the fetch for this 
-statement.
-Parameters
-stmtp (IN) - a statement (application request) handle.
-errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-nrows (IN) - number of rows to be fetched from the current position.
-orientation (IN) - for release 8.0, the only acceptable value is 
-OCI_FETCH_NEXT, which is also the default value. 
-mode (IN) - for release 8.0, beta-1, the following mode is defined.
-OCI_DEFAULT - default mode
-OCI_EOF_FETCH - indicates that it is the last fetch from the result set. 
-If nrows is non-zero, setting this mode effectively cancels fetching after 
-retrieving nrows, otherwise it cancels fetching immediately. 
-Related Functions
-OCIAttrGet()
-
-OCIStmtFetch2()
-Name
-OCI FetCH2
-Purpose
-Fetches rows from a query.
-Syntax
-sword OCIStmtFetch2 ( OCIStmt     *stmtp,
-                   OCIError    *errhp, 
-                   ub4         nrows,
-                   ub2         orientation,
-                   ub4         scrollOffset,
-                   ub4         mode);
-Comments
-The fetch call works similar to the OCIStmtFetch call with the 
-addition of the fetchOffset parameter. It can be used on any 
-statement handle, whether it is scrollable or not. For a 
-non-scrollable statement handle, the only acceptable value 
-will be OCI_FETCH_NEXT, and the fetchOffset parameter will be 
-ignored. Applications are encouraged to use this new call. 
-
-A fetchOffset with OCI_FETCH_RELATIVE is equivalent to 
-OCI_FETCH_CURRENT with a value of 0, is equivalent to 
-OCI_FETCH_NEXT with a value of 1, and equivalent to 
-OCI_FETCH_PRIOR with a value of -1. Note that the range of 
-accessible rows is [1,OCI_ATTR_ROW_COUNT] beyond which an 
-error could be raised if sufficient rows do not exist in 
-
-The fetch call is a local call, if prefetched rows suffice. However, this is 
-transparent to the application. If LOB columns are being read, LOB locators 
-are fetched for subsequent LOB operations to be performed on these locators. 
-Prefetching is turned off if LONG columns are involved. 
-A fetch with nrows set to 0 rows effectively cancels the fetch for this 
-statement.
-Parameters
-stmtp (IN) - a statement (application request) handle.
-errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-nrows (IN) - number of rows to be fetched from the current position.
-It defaults to 1 for orientation OCI_FETCH_LAST.
-orientation (IN) -  The acceptable values are as follows, with 
-OCI_FETCH_NEXT being the default value.
-OCI_FETCH_CURRENT gets the current row, 
-OCI_FETCH_NEXT gets the next row from the current position,
-OCI_FETCH_FIRST gets the first row in the result set,
-OCI_FETCH_LAST gets the last row in the result set, 
-OCI_FETCH_PRIOR gets the previous row from the current row in the result set, 
-OCI_FETCH_ABSOLUTE will fetch the row number (specified by fetchOffset 
-parameter) in the result set using absolute positioning,
-OCI_FETCH_RELATIVE will fetch the row number (specified by fetchOffset 
-parameter) in the result set using relative positioning.
-scrollOffset(IN) - offset used with the OCI_FETCH_ABSOLUTE and 
-OCI_FETCH_RELATIVE orientation parameters only. It specify
-the new current position for scrollable result set. It is 
-ignored for non-scrollable result sets. 
-mode (IN) - for release 8.0, beta-1, the following mode is defined.
-OCI_DEFAULT - default mode
-OCI_EOF_FETCH - indicates that it is the last fetch from the result set. 
-If nrows is non-zero, setting this mode effectively cancels fetching after 
-retrieving nrows, otherwise it cancels fetching immediately. 
-Related Functions
-OCIAttrGet()
-
-
-
-OCIStmtGetPieceInfo()
-Name
-OCI Get Piece Information
-Purpose
-Returns piece information for a piecewise operation.
-Syntax
-sword OCIStmtGetPieceInfo( CONST OCIStmt  *stmtp,
-                         OCIError       *errhp,
-                         dvoid          **hndlpp,
-                         ub4            *typep,
-                         ub1            *in_outp,
-                         ub4            *iterp, 
-                         ub4            *idxp,
-                         ub1            *piecep );
-
-Comments
-When an execute/fetch call returns OCI_NEED_DATA to get/return a 
-dynamic bind/define value or piece, OCIStmtGetPieceInfo() returns the 
-relevant information: bind/define handle, iteration or index number and 
-which piece.
-See the section "Runtime Data Allocation and Piecewise Operations" on page 
-5-16 for more information about using OCIStmtGetPieceInfo().
-Parameters
-stmtp (IN) - the statement when executed returned OCI_NEED_DATA. 
-errhp (OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-hndlpp (OUT) - returns a pointer to the bind or define handle of the bind or 
-define whose runtime data is required or is being provided.
-typep (OUT) - the type of the handle pointed to by hndlpp: OCI_HTYPE_BIND 
-(for a bind handle) or OCI_HTYPE_DEFINE (for a define handle).
-in_outp (OUT) - returns OCI_PARAM_IN if the data is required for an IN bind 
-value. Returns OCI_PARAM_OUT if the data is available as an OUT bind 
-variable or a define position value.
-iterp (OUT) - returns the row number of a multiple row operation.
-idxp (OUT) - the index of an array element of a PL/SQL array bind operation.
-piecep (OUT) - returns one of the following defined values - 
-OCI_ONE_PIECE, OCI_FIRST_PIECE, OCI_NEXT_PIECE and 
-OCI_LAST_PIECE. The default value is always OCI_ONE_PIECE. 
-Related Functions
-OCIAttrGet(), OCIAttrGet(), OCIStmtExecute(), OCIStmtFetch(), 
-OCIStmtSetPieceInfo()
-
-
-
-
-OCIStmtPrepare()
-Name
-OCI Statement REQuest
-Purpose
-This call defines the SQL/PLSQL statement to be executed.
-Syntax
-sword OCIStmtPrepare ( OCIStmt      *stmtp,
-                     OCIError     *errhp,
-                     CONST OraText   *stmt, 
-                     ub4          stmt_len,
-                     ub4          language,
-                     ub4          mode);
-Comments
-This call is used to prepare a SQL or PL/SQL statement for execution. The 
-OCIStmtPrepare() call defines an application request. 
-This is a purely local call. Data values for this statement initialized in 
-subsequent bind calls will be stored in a bind handle which will hang off this 
-statement handle.
-This call does not create an association between this statement handle and any 
-particular server.
-See the section "Preparing Statements" on page 2-21 for more information 
-about using this call.
-Parameters
-stmtp (IN) - a statement handle.
-errhp (IN) - an error handle to retrieve diagnostic information.
-stmt (IN) - SQL or PL/SQL statement to be executed. Must be a null-terminated 
-string. The pointer to the OraText of the statement must be available as long 
-as the statement is executed.
-stmt_len (IN) - length of the statement. Must not be zero.
-language (IN) - V7, V8, or native syntax. Possible values are:
-OCI_V7_SYNTAX - V7 ORACLE parsing syntax
-OCI_V8_SYNTAX - V8 ORACLE parsing syntax
-OCI_NTV_SYNTAX - syntax depending upon the version of the server. 
-mode (IN) - the only defined mode is OCI_DEFAULT for default mode. 
-Example
-This example demonstrates the use of OCIStmtPrepare(), as well as the OCI 
-application initialization calls.
-Related Functions
-OCIAttrGet(), OCIStmtExecute()
-
-
-OCIStmtPrepare2()
-Name
-OCI Statement REQuest with (a) early binding to svchp and/or
-(b) stmt caching
-Purpose
-This call defines the SQL/PLSQL statement to be executed.
-Syntax
-sword OCIStmtPrepare2 ( OCISvcCtx *svchp,
-                     OCIStmt      **stmtp,
-                     OCIError     *errhp,
-                     CONST OraText   *stmt,
-                     ub4          stmt_len,
-                     CONST OraText *key,
-                     ub4          key_len,
-                     ub4          language,
-                     ub4          mode);
-Comments
-This call is used to prepare a SQL or PL/SQL statement for execution. The
-OCIStmtPrepare() call defines an application request.
-This is a purely local call. Data values for this statement initialized in
-subsequent bind calls will be stored in a bind handle which will hang off this
-statement handle.
-This call creates an association between the statement handle and a service
-context. It differs from OCIStmtPrepare in that respect.It also supports
-stmt caching. The stmt will automatically be cached if the authp of the stmt
-has enabled stmt caching.
-Parameters
-svchp (IN) - the service context handle that contains the session that
-             this stmt handle belongs to.
-stmtp (OUT) - an unallocated stmt handle must be pased in. An allocated
-              and prepared  statement handle will be returned.
-errhp (IN) - an error handle to retrieve diagnostic information.
-stmt (IN) - SQL or PL/SQL statement to be executed. Must be a null-
-            terminated string. The pointer to the OraText of the statement 
-            must be available as long as the statement is executed.
-stmt_len (IN) - length of the statement. Must not be zero.
-key (IN) - This is only Valid for OCI Stmt Caching. It indicates the
-           key to search with. It thus optimizes the search in the cache.
-key_len (IN) - the length of the key. This, too, is onlly valid for stmt
-               caching.
-language (IN) - V7, V8, or native syntax. Possible values are:
-OCI_V7_SYNTAX - V7 ORACLE parsing syntax
-OCI_V8_SYNTAX - V8 ORACLE parsing syntax
-OCI_NTV_SYNTAX - syntax depending upon the version of the server.
-mode (IN) - the defined modes are OCI_DEFAULT and OCI_PREP2_CACHE_SEARCHONLY.
-Example
-Related Functions
-OCIStmtExecute(), OCIStmtRelease()
-
-
-OCIStmtRelease()
-Name
-OCI Statement Release. This call is used to relesae the stmt that
-was retreived using OCIStmtPrepare2(). If the stmt is release
-using this call, OCIHandleFree() must not be called on the stmt
-handle.
-Purpose
-This call releases the statement obtained by OCIStmtPrepare2
-Syntax
-sword OCIStmtRelease ( OCIStmt      *stmtp,
-                     OCIError     *errhp,
-                     cONST OraText *key,
-                     ub4          key_len,
-                     ub4          mode);
-Comments
-This call is used to release a handle obtained via OCIStmtPrepare2().
-It also frees the memory associated with the handle.
-This is a purely local call.
-Parameters
-stmtp (IN/OUT) - The statement handle to be released/freed.
-errhp (IN) - an error handle to retrieve diagnostic information.
-key (IN) - This is only Valid for OCI Stmt Caching. It indicates the
-           key to tag the stmt with.
-key_len (IN) - the length of the key. This, too, is only valid for stmt
-               caching.
-mode (IN) - the defined modes are OCI_DEFAULT for default mode and
-            OCI_STRLS_CACHE_DELETE (only used for Stmt Caching).
-Example
-Related Functions
-OCIStmtExecute(), OCIStmtPrepare2()
-
-
-OCIStmtSetPieceInfo()
-Name
-OCI Set Piece Information
-Purpose
-Sets piece information for a piecewise operation.
-Syntax
-sword OCIStmtSetPieceInfo ( dvoid             *hndlp,
-                          ub4               type,
-                          OCIError          *errhp,
-                          CONST dvoid       *bufp,
-                          ub4               *alenp, 
-                          ub1               piece,
-                          CONST dvoid       *indp, 
-                          ub2               *rcodep ); 
-Comments
-When an execute call returns OCI_NEED_DATA to get a dynamic IN/OUT 
-bind value or piece, OCIStmtSetPieceInfo() sets the piece information: the 
-buffer, the length, the indicator and which piece is currently being processed.
-For more information about using OCIStmtSetPieceInfo() see the section 
-"Runtime Data Allocation and Piecewise Operations" on page 5-16.
-Parameters
-hndlp (IN/OUT) - the bind/define handle.
-type (IN) - type of the handle. 
-errhp (OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-bufp (IN/OUT) - bufp is a pointer to a storage containing the data value or 
-the piece when it is an IN bind variable, otherwise bufp is a pointer to 
-storage for getting a piece or a value for OUT binds and define variables. For
-named data types or REFs, a pointer to the object or REF is returned.
-alenp (IN/OUT) - the length of the piece or the value. 
-piece (IN) - the piece parameter. The following are valid values: 
-OCI_ONE_PIECE, OCI_FIRST_PIECE, OCI_NEXT_PIECE, or 
-OCI_LAST_PIECE. 
-The default value is OCI_ONE_PIECE. This parameter is used for IN bind 
-variables only.
-indp (IN/OUT) - indicator. A pointer to a sb2 value or pointer to an indicator 
-structure for named data types (SQLT_NTY) and REFs (SQLT_REF), i.e., *indp 
-is either an sb2 or a dvoid * depending upon the data type.
-rcodep (IN/OUT) - return code. 
-Related Functions
-OCIAttrGet(), OCIAttrGet(), OCIStmtExecute(), OCIStmtFetch(), 
-OCIStmtGetPieceInfo()
-
-
-OCIFormatInit
-Name
-OCIFormat Package Initialize
-Purpose
-Initializes the OCIFormat package.
-Syntax
-sword OCIFormatInit(dvoid *hndl, OCIError *err);
-Comments
-This routine must be called before calling any other OCIFormat routine.
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
-Parameters
-hndl (IN/OUT) - OCI environment or session handle
-err (IN/OUT) - OCI error handle
-Related Functions
-OCIFormatTerm()
-
-
-OCIFormatString
-Name
-OCIFormat Package Format String
-Purpose
-Writes a text string into the supplied text buffer using the argument
-list submitted to it and in accordance with the format string given.
-Syntax
-sword OCIFormatString(dvoid *hndl, OCIError *err, OraText *buffer,
-                      sbig_ora bufferLength, sbig_ora *returnLength,
-                      CONST OraText *formatString, ...);
-Comments
-The first call to this routine must be preceded by a call to the
-OCIFormatInit routine that initializes the OCIFormat package
-for use.  When this routine is no longer needed then terminate
-the OCIFormat package by a call to the OCIFormatTerm routine.
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
-Parameters
-hndl         (IN/OUT) - OCI environment or session handle
-err          (IN/OUT) - OCI error handle
-buffer       (OUT)    - text buffer for the string
-bufferLength (IN)     - length of the text buffer
-returnLength (OUT)    - length of the formatted string
-formatString (IN)     - format specification string
-...          (IN)     - variable argument list
-Related Functions
-
-
-OCIFormatTerm 
-Name
-OCIFormat Package Terminate
-Purpose
-Terminates the OCIFormat package.
-Syntax
-sword OCIFormatTerm(dvoid *hndl, OCIError *err);
-Comments
-It must be called after the OCIFormat package is no longer being used.
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
-Parameters
-hndl (IN/OUT) - OCI environment or session handle
-err (IN/OUT) - OCI error handle
-Related Functions
-OCIFormatInit()
-
-
-OCIFormatTUb1
-Name
-OCIFormat Package ub1 Type
-Purpose
-Return the type value for the ub1 type.
-Syntax
-sword OCIFormatTUb1(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTUb2
-Name
-OCIFormat Package ub2 Type
-Purpose
-Return the type value for the ub2 type.
-Syntax
-sword OCIFormatTUb2(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTUb4
-Name
-OCIFormat Package ub4 Type
-Purpose
-Return the type value for the ub4 type.
-Syntax
-sword OCIFormatTUb4(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTUword
-Name
-OCIFormat Package uword Type
-Purpose
-Return the type value for the uword type.
-Syntax
-sword OCIFormatTUword(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTUbig_ora
-Name
-OCIFormat Package ubig_ora Type
-Purpose
-Return the type value for the ubig_ora type.
-Syntax
-sword OCIFormatTUbig_ora(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTSb1
-Name
-OCIFormat Package sb1 Type
-Purpose
-Return the type value for the sb1 type.
-Syntax
-sword OCIFormatTSb1(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTSb2
-Name
-OCIFormat Package sb2 Type
-Purpose
-Return the type value for the sb2 type.
-Syntax
-sword OCIFormatTSb2(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTSb4
-Name
-OCIFormat Package sb4 Type
-Purpose
-Return the type value for the sb4 type.
-Syntax
-sword OCIFormatTSb4(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTSword
-Name
-OCIFormat Package sword Type
-Purpose
-Return the type value for the sword type.
-Syntax
-sword OCIFormatTSword(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTSbig_ora
-Name
-OCIFormat Package sbig_ora Type
-Purpose
-Return the type value for the sbig_ora type.
-Syntax
-sword OCIFormatTSbig_ora(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTEb1
-Name
-OCIFormat Package eb1 Type
-Purpose
-Return the type value for the eb1 type.
-Syntax
-sword OCIFormatTEb1(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTEb2
-Name
-OCIFormat Package eb2 Type
-Purpose
-Return the type value for the eb2 type.
-Syntax
-sword OCIFormatTEb2(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTEb4
-Name
-OCIFormat Package eb4 Type
-Purpose
-Return the type value for the eb4 type.
-Syntax
-sword OCIFormatTEb4(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTEword
-Name
-OCIFormat Package eword Type
-Purpose
-Return the type value for the eword type.
-Syntax
-sword OCIFormatTEword(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTChar
-Name
-OCIFormat Package text Type
-Purpose
-Return the type value for the text type.
-Syntax
-sword OCIFormatTChar(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTText
-Name
-OCIFormat Package *text Type
-Purpose
-Return the type value for the *text type.
-Syntax
-sword OCIFormatTText(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTDouble
-Name
-OCIFormat Package double Type
-Purpose
-Return the type value for the double type.
-Syntax
-sword OCIFormatTDouble(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatDvoid
-Name
-OCIFormat Package dvoid Type
-Purpose
-Return the type value for the dvoid type.
-Syntax
-sword OCIFormatTDvoid(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTEnd
-Name
-OCIFormat Package end Type
-Purpose
-Return the list terminator's "type".
-Syntax
-sword OCIFormatTEnd(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCISvcCtxToLda()
-Name
-OCI toggle SerVice context handle to Version 7 Lda_Def
-Purpose
-Toggles between a V8 service context handle and a V7 Lda_Def.
-Syntax
-sword OCISvcCtxToLda ( OCISvcCtx    *srvhp,
-                     OCIError     *errhp,
-                     Lda_Def      *ldap );
-Comments
-Toggles between an Oracle8 service context handle and an Oracle7 Lda_Def.
-This function can only be called after a service context has been properly 
-initialized.
-Once the service context has been translated to an Lda_Def, it can be used in 
-release 7.x OCI calls (e.g., obindps(), ofen()).
-Note: If there are multiple service contexts which share the same server 
-handle, only one can be in V7 mode at any time.
-The action of this call can be reversed by passing the resulting Lda_Def to 
-the OCILdaToSvcCtx() function.
-Parameters
-svchp (IN/OUT) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-ldap (IN/OUT) - a Logon Data Area for V7-style OCI calls which is initialized 
-by this call. 
-Related Functions
-OCILdaToSvcCtx()
-
-
-
-
-OCITransCommit()
-Name
-OCI TX (transaction) CoMmit
-Purpose
-Commits the transaction associated with a specified service context.
-Syntax
-sword OCITransCommit ( OCISvcCtx    *srvcp,
-                     OCIError     *errhp,
-                     ub4          flags );
-Comments
-The transaction currently associated with the service context is committed. If 
-it is a distributed transaction that the server cannot commit, this call 
-additionally retrieves the state of the transaction from the database to be 
-returned to the user in the error handle.
-If the application has defined multiple transactions, this function operates 
-on the transaction currently associated with the service context. If the 
-application is working with only the implicit local transaction created when 
-database changes are made, that implicit transaction is committed.
-If the application is running in the object mode, then the modified or updated 
-objects in the object cache for this transaction are also committed.
-The flags parameter is used for one-phase commit optimization in distributed 
-transactions. If the transaction is non-distributed, the flags parameter is 
-ignored, and OCI_DEFAULT can be passed as its value. OCI applications 
-managing global transactions should pass a value of 
-OCI_TRANS_TWOPHASE to the flags parameter for a two-phase commit. The 
-default is one-phase commit.
-Under normal circumstances, OCITransCommit() returns with a status 
-indicating that the transaction has either been committed or rolled back. With 
-distributed transactions, it is possible that the transaction is now in-doubt 
-(i.e., neither committed nor aborted). In this case, OCITransCommit() 
-attempts to retrieve the status of the transaction from the server. 
-The status is returned.
-Parameters
-srvcp (IN) - the service context handle.
-errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-flags -see the "Comments" section above.
-Related Functions
-OCITransRollback()
-
-
-
-
-OCITransDetach()
-Name
-OCI TX (transaction) DeTach
-Purpose
-Detaches a transaction.
-Syntax
-sword OCITransDetach ( OCISvcCtx    *srvcp,
-                     OCIError     *errhp,
-                     ub4          flags);
-Comments
-Detaches a global transaction from the service context handle. The transaction 
-currently attached to the service context handle becomes inactive at the end 
-of this call. The transaction may be resumed later by calling OCITransStart(), 
-specifying  a flags value of OCI_TRANS_RESUME.
-When a transaction is detached, the value which was specified in the timeout 
-parameter of OCITransStart() when the transaction was started is used to 
-determine the amount of time the branch can remain inactive before being 
-deleted by the server's PMON process.
-Note: The transaction can be resumed by a different process than the one 
-that detached it, provided that the transaction has the same 
-authorization.
-Parameters
-srvcp (IN) - the service context handle. 
-errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-flags (IN) - you must pass a value of OCI_DEFAULT for this parameter.
-Related Functions
-OCITransStart()
-
-
-
-OCITransForget()
-Name
-OCI TX (transaction) ForGeT
-Purpose
-Causes the server to forget a heuristically completed global transaction.
-Syntax
-sword OCITransForget ( OCISvcCtx     *svchp, 
-                     OCIError      *errhp,
-                     ub4           flags);
-
-Comments
-
-Forgets a heuristically completed global transaction. The server deletes the 
-status of the transaction from the system's pending transaction table.
-The XID of the transaction to be forgotten is set as an attribute of the 
-transaction handle (OCI_ATTR_XID).
-Parameters
-srvcp (IN) - the service context handle - the transaction is rolled back.
-errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-flags (IN) - you must pass OCI_DEFAULT for this parameter.
-Related Functions
-OCITransCommit(), OCITransRollback()
-
-
-OCITransMultiPrepare() 
-Name
-OCI Trans(action) Multi-Branch Prepare
-Purpose
-Prepares a transaction with multiple branches in a single call.
-Syntax
-sword OCITransMultiPrepare ( OCISvcCtx    *svchp,
-                             ub4           numBranches,
-                             OCITrans     **txns,
-                             OCIError     **errhp);
-
-Comments
-
-Prepares the specified global transaction for commit.
-This call is valid only for distributed transactions.
-This call is an advanced performance feature intended for use only in
-situations where the caller is responsible for preparing all the branches
-in a transaction. 
-Parameters
-srvcp (IN) - the service context handle. 
-numBranches (IN) - This is the number of branches expected. It is also the
-array size for the next two parameters.
-txns (IN) - This is the array of transaction handles for the branches to
-prepare. They should all have the OCI_ATTR_XID set. The global transaction
-ID should be the same.
-errhp (IN) - This is the array of error handles. If OCI_SUCCESS is not
-returned, then these will indicate which branches received which errors.
-Related Functions
-OCITransPrepare()
-
-
-OCITransPrepare()
-Name
-OCI TX (transaction) PREpare
-Purpose
-Prepares a transaction for commit.
-Syntax
-sword OCITransPrepare ( OCISvcCtx    *svchp, 
-                      OCIError     *errhp,
-                      ub4          flags);
-
-Comments
-
-Prepares the specified global transaction for commit.
-This call is valid only for distributed transactions.
-The call returns OCI_SUCCESS_WITH_INFO if the transaction has not made 
-any changes. The error handle will indicate that the transaction is read-only. 
-The flag parameter is not currently used. 
-Parameters
-srvcp (IN) - the service context handle. 
-errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-flags (IN) - you must pass OCI_DEFAULT for this parameter.
-Related Functions
-OCITransCommit(), OCITransForget()
-
-
-
-
-OCITransRollback()
-Name
-OCI TX (transaction) RoLlback
-Purpose
-Rolls back the current transaction.
-Syntax
-sword OCITransRollback ( dvoid        *svchp, 
-                       OCIError     *errhp,
-                       ub4          flags );
-Comments
-The current transaction- defined as the set of statements executed since the 
-last OCITransCommit() or since OCISessionBegin()-is rolled back.
-If the application is running under object mode then the modified or updated 
-objects in the object cache for this transaction are also rolled back.
-An error is returned if an attempt is made to roll back a global transaction 
-that is not currently active.
-Parameters
-svchp (IN) - a service context handle. The transaction currently set in the 
-service context handle is rolled back.
-errhp -(IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-flags - you must pass a value of OCI_DEFAULT for this parameter.
-Related Functions
-OCITransCommit()
-
-
-
-
-OCITransStart()
-Name
-OCI TX (transaction) STart
-Purpose
-Sets the beginning of a transaction.
-Syntax
-sword OCITransStart ( OCISvcCtx    *svchp, 
-                    OCIError     *errhp, 
-                    uword        timeout,
-                    ub4          flags);
-
-Comments
-This function sets the beginning of a global or serializable transaction. The 
-transaction context currently associated with the service context handle is 
-initialized at the end of the call if the flags parameter specifies that a new 
-transaction should be started.
-The XID of the transaction is set as an attribute of the transaction handle 
-(OCI_ATTR_XID)
-Parameters
-svchp (IN/OUT) - the service context handle. The transaction context in the 
-service context handle is initialized at the end of the call if the flag 
-specified a new transaction to be started.
-errhp (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-err and this function returns OCI_ERROR. Diagnostic information can be 
-obtained by calling OCIErrorGet().
-timeout (IN) - the time, in seconds, to wait for a transaction to become 
-available for resumption when OCI_TRANS_RESUME is specified. When 
-OCI_TRANS_NEW is specified, this value is stored and may be used later by 
-OCITransDetach().
-flags (IN) - specifies whether a new transaction is being started or an 
-existing transaction is being resumed. Also specifies serializiability or 
-read-only status. More than a single value can be specified. By default, 
-a read/write transaction is started. The flag values are:
-OCI_TRANS_NEW - starts a new transaction branch. By default starts a 
-tightly coupled and migratable branch.
-OCI_TRANS_TIGHT - explicitly specifies a tightly coupled branch
-OCI_TRANS_LOOSE - specifies a loosely coupled branch
-OCI_TRANS_RESUME - resumes an existing transaction branch. 
-OCI_TRANS_READONLY - start a readonly transaction
-OCI_TRANS_SERIALIZABLE - start a serializable transaction
-Related Functions
-OCITransDetach()
-
-
-
-
-
-******************************************************************************/
-/*-----------------------Dynamic Callback Function Pointers------------------*/
- 
- 
-typedef sb4 (*OCICallbackInBind)(dvoid *ictxp, OCIBind *bindp, ub4 iter,
-                                  ub4 index, dvoid **bufpp, ub4 *alenp,
-                                  ub1 *piecep, dvoid **indp);
- 
-typedef sb4 (*OCICallbackOutBind)(dvoid *octxp, OCIBind *bindp, ub4 iter,
-                                 ub4 index, dvoid **bufpp, ub4 **alenp,
-                                 ub1 *piecep, dvoid **indp,
-                                 ub2 **rcodep);
- 
-typedef sb4 (*OCICallbackDefine)(dvoid *octxp, OCIDefine *defnp, ub4 iter,
-                                 dvoid **bufpp, ub4 **alenp, ub1 *piecep,
-                                 dvoid **indp, ub2 **rcodep);
-
-typedef sword (*OCIUserCallback)(dvoid *ctxp, dvoid *hndlp, ub4 type,
-                                 ub4 fcode, ub4 when, sword returnCode,
-                                 sb4 *errnop, va_list arglist);
-
-typedef sword (*OCIEnvCallbackType)(OCIEnv *env, ub4 mode,
-                                   size_t xtramem_sz, dvoid *usrmemp,
-                                   OCIUcb *ucbDesc); 
-
-typedef sb4 (*OCICallbackLobRead)(dvoid *ctxp, CONST dvoid *bufp,
-                                             ub4 len, ub1 piece);
-
-typedef sb4 (*OCICallbackLobWrite)(dvoid *ctxp, dvoid *bufp, 
-                                          ub4 *lenp, ub1 *piece);
-
-#ifdef ORAXB8_DEFINED
-
-typedef sb4 (*OCICallbackLobRead2)(dvoid *ctxp, CONST dvoid *bufp, oraub8 len,
-                                   ub1 piece, dvoid **changed_bufpp,
-                                   oraub8 *changed_lenp);
-
-typedef sb4 (*OCICallbackLobWrite2)(dvoid *ctxp, dvoid *bufp, oraub8 *lenp,
-                                    ub1 *piece, dvoid **changed_bufpp,
-                                    oraub8 *changed_lenp);
-#endif
-
-typedef sb4 (*OCICallbackAQEnq)(dvoid *ctxp, dvoid **payload, 
-                                dvoid **payload_ind);
-
-typedef sb4 (*OCICallbackAQDeq)(dvoid *ctxp, dvoid **payload, 
-                                dvoid **payload_ind);
-
-/*--------------------------Failover Callback Structure ---------------------*/
-typedef sb4 (*OCICallbackFailover)(dvoid *svcctx, dvoid *envctx,
-                                   dvoid *fo_ctx, ub4 fo_type,
-                                   ub4 fo_event);
-
-typedef struct
-{
-  OCICallbackFailover callback_function;
-  dvoid *fo_ctx;
-} 
-OCIFocbkStruct;
-
-/*****************************************************************************
-                         ACTUAL PROTOTYPE DECLARATIONS
-******************************************************************************/
-
-sword   OCIInitialize   (ub4 mode, dvoid *ctxp, 
-                 dvoid *(*malocfp)(dvoid *ctxp, size_t size),
-                 dvoid *(*ralocfp)(dvoid *ctxp, dvoid *memptr, size_t newsize),
-                 void   (*mfreefp)(dvoid *ctxp, dvoid *memptr) );
-
-sword   OCITerminate( ub4 mode);
-
-sword   OCIEnvCreate (OCIEnv **envp, ub4 mode, dvoid *ctxp,
-                 dvoid *(*malocfp)(dvoid *ctxp, size_t size),
-                 dvoid *(*ralocfp)(dvoid *ctxp, dvoid *memptr, size_t newsize),
-                 void   (*mfreefp)(dvoid *ctxp, dvoid *memptr),
-                 size_t xtramem_sz, dvoid **usrmempp);
-
-sword   OCIEnvNlsCreate (OCIEnv **envp, ub4 mode, dvoid *ctxp,
-                 dvoid *(*malocfp)(dvoid *ctxp, size_t size),
-                 dvoid *(*ralocfp)(dvoid *ctxp, dvoid *memptr, size_t newsize),
-                 void   (*mfreefp)(dvoid *ctxp, dvoid *memptr),
-                 size_t xtramem_sz, dvoid **usrmempp,
-                 ub2 charset, ub2 ncharset);
-
-sword   OCIFEnvCreate (OCIEnv **envp, ub4 mode, dvoid *ctxp,
-                 dvoid *(*malocfp)(dvoid *ctxp, size_t size),
-                 dvoid *(*ralocfp)(dvoid *ctxp, dvoid *memptr, size_t newsize),
-                 void   (*mfreefp)(dvoid *ctxp, dvoid *memptr),
-                 size_t xtramem_sz, dvoid **usrmempp, dvoid *fupg);
-
-sword   OCIHandleAlloc(CONST dvoid *parenth, dvoid **hndlpp, CONST ub4 type, 
-                       CONST size_t xtramem_sz, dvoid **usrmempp);
-
-sword   OCIHandleFree(dvoid *hndlp, CONST ub4 type);
-
-
-sword   OCIDescriptorAlloc(CONST dvoid *parenth, dvoid **descpp, 
-                           CONST ub4 type, CONST size_t xtramem_sz, 
-                           dvoid **usrmempp);
-
-sword   OCIDescriptorFree(dvoid *descp, CONST ub4 type);
-
-sword   OCIEnvInit (OCIEnv **envp, ub4 mode, 
-                    size_t xtramem_sz, dvoid **usrmempp);
-
-sword   OCIServerAttach  (OCIServer *srvhp, OCIError *errhp,
-                          CONST OraText *dblink, sb4 dblink_len, ub4 mode);
-
-sword   OCIServerDetach  (OCIServer *srvhp, OCIError *errhp, ub4 mode);
-
-sword   OCISessionBegin  (OCISvcCtx *svchp, OCIError *errhp, OCISession *usrhp,
-                          ub4 credt, ub4 mode);
-
-sword   OCISessionEnd   (OCISvcCtx *svchp, OCIError *errhp, OCISession *usrhp, 
-                         ub4 mode);
-
-sword   OCILogon (OCIEnv *envhp, OCIError *errhp, OCISvcCtx **svchp, 
-                  CONST OraText *username, ub4 uname_len, 
-                  CONST OraText *password, ub4 passwd_len, 
-                  CONST OraText *dbname, ub4 dbname_len);
-
-sword   OCILogon2 (OCIEnv *envhp, OCIError *errhp, OCISvcCtx **svchp,
-                  CONST OraText *username, ub4 uname_len,
-                  CONST OraText *password, ub4 passwd_len,
-                  CONST OraText *dbname, ub4 dbname_len,
-                  ub4 mode);
-
-sword   OCILogoff (OCISvcCtx *svchp, OCIError *errhp);
-
-
-sword   OCIPasswordChange   (OCISvcCtx *svchp, OCIError *errhp, 
-                             CONST OraText *user_name, ub4 usernm_len, 
-                             CONST OraText *opasswd, ub4 opasswd_len, 
-                             CONST OraText *npasswd, ub4 npasswd_len, 
-                             ub4 mode);
-
-sword   OCIStmtPrepare   (OCIStmt *stmtp, OCIError *errhp, CONST OraText *stmt,
-                          ub4 stmt_len, ub4 language, ub4 mode);
-
-sword OCIStmtPrepare2 ( OCISvcCtx *svchp, OCIStmt **stmtp, OCIError *errhp,
-                     CONST OraText *stmt, ub4 stmt_len, CONST OraText *key,
-                     ub4 key_len, ub4 language, ub4 mode);
-
-sword OCIStmtRelease ( OCIStmt *stmtp, OCIError *errhp, CONST OraText *key,
-                       ub4 key_len, ub4 mode);
-
-sword   OCIBindByPos  (OCIStmt *stmtp, OCIBind **bindp, OCIError *errhp,
-                       ub4 position, dvoid *valuep, sb4 value_sz,
-                       ub2 dty, dvoid *indp, ub2 *alenp, ub2 *rcodep,
-                       ub4 maxarr_len, ub4 *curelep, ub4 mode);
-
-sword   OCIBindByName   (OCIStmt *stmtp, OCIBind **bindp, OCIError *errhp,
-                         CONST OraText *placeholder, sb4 placeh_len, 
-                         dvoid *valuep, sb4 value_sz, ub2 dty, 
-                         dvoid *indp, ub2 *alenp, ub2 *rcodep, 
-                         ub4 maxarr_len, ub4 *curelep, ub4 mode);
-
-sword   OCIBindObject  (OCIBind *bindp, OCIError *errhp, CONST OCIType *type, 
-                        dvoid **pgvpp, ub4 *pvszsp, dvoid **indpp, 
-                        ub4 *indszp);
-
-sword   OCIBindDynamic   (OCIBind *bindp, OCIError *errhp, dvoid *ictxp,
-                          OCICallbackInBind icbfp, dvoid *octxp,
-                          OCICallbackOutBind ocbfp);
-
-sword   OCIBindArrayOfStruct   (OCIBind *bindp, OCIError *errhp, 
-                                ub4 pvskip, ub4 indskip,
-                                ub4 alskip, ub4 rcskip);
-
-sword   OCIStmtGetPieceInfo   (OCIStmt *stmtp, OCIError *errhp, 
-                               dvoid **hndlpp, ub4 *typep,
-                               ub1 *in_outp, ub4 *iterp, ub4 *idxp, 
-                               ub1 *piecep);
-
-sword   OCIStmtSetPieceInfo   (dvoid *hndlp, ub4 type, OCIError *errhp, 
-                               CONST dvoid *bufp, ub4 *alenp, ub1 piece, 
-                               CONST dvoid *indp, ub2 *rcodep);
-
-sword   OCIStmtExecute  (OCISvcCtx *svchp, OCIStmt *stmtp, OCIError *errhp, 
-                         ub4 iters, ub4 rowoff, CONST OCISnapshot *snap_in, 
-                         OCISnapshot *snap_out, ub4 mode);
-
-sword   OCIDefineByPos  (OCIStmt *stmtp, OCIDefine **defnp, OCIError *errhp,
-                         ub4 position, dvoid *valuep, sb4 value_sz, ub2 dty,
-                         dvoid *indp, ub2 *rlenp, ub2 *rcodep, ub4 mode);
-
-sword   OCIDefineObject  (OCIDefine *defnp, OCIError *errhp, 
-                          CONST OCIType *type, dvoid **pgvpp, 
-                          ub4 *pvszsp, dvoid **indpp, ub4 *indszp);
-
-sword   OCIDefineDynamic   (OCIDefine *defnp, OCIError *errhp, dvoid *octxp,
-                            OCICallbackDefine ocbfp);
-
-sword   OCIRowidToChar  (OCIRowid *rowidDesc, OraText *outbfp, ub2 *outbflp,
-                         OCIError *errhp);
-
-sword   OCIDefineArrayOfStruct  (OCIDefine *defnp, OCIError *errhp, ub4 pvskip,
-                                 ub4 indskip, ub4 rlskip, ub4 rcskip);
-
-sword   OCIStmtFetch   (OCIStmt *stmtp, OCIError *errhp, ub4 nrows, 
-                        ub2 orientation, ub4 mode);
-
-sword   OCIStmtFetch2   (OCIStmt *stmtp, OCIError *errhp, ub4 nrows, 
-                        ub2 orientation, sb4 scrollOffset, ub4 mode);
-
-sword   OCIStmtGetBindInfo   (OCIStmt *stmtp, OCIError *errhp, ub4 size, 
-                              ub4 startloc,
-                              sb4 *found, OraText *bvnp[], ub1 bvnl[],
-                              OraText *invp[], ub1 inpl[], ub1 dupl[],
-                              OCIBind **hndl);
-
-sword   OCIDescribeAny  (OCISvcCtx *svchp, OCIError *errhp, 
-                         dvoid *objptr, 
-                         ub4 objnm_len, ub1 objptr_typ, ub1 info_level,
-                         ub1 objtyp, OCIDescribe *dschp);
-
-sword   OCIParamGet (CONST dvoid *hndlp, ub4 htype, OCIError *errhp, 
-                     dvoid **parmdpp, ub4 pos);
-
-sword   OCIParamSet(dvoid *hdlp, ub4 htyp, OCIError *errhp, CONST dvoid *dscp,
-                    ub4 dtyp, ub4 pos);
-
-sword   OCITransStart  (OCISvcCtx *svchp, OCIError *errhp, 
-                        uword timeout, ub4 flags );
-
-sword   OCITransDetach  (OCISvcCtx *svchp, OCIError *errhp, ub4 flags );
-
-sword   OCITransCommit  (OCISvcCtx *svchp, OCIError *errhp, ub4 flags);
-
-sword   OCITransRollback  (OCISvcCtx *svchp, OCIError *errhp, ub4 flags);
-
-sword   OCITransPrepare (OCISvcCtx *svchp, OCIError *errhp, ub4 flags);
-
-sword   OCITransMultiPrepare (OCISvcCtx *svchp, ub4 numBranches, 
-                              OCITrans **txns, OCIError **errhp);
-
-sword   OCITransForget (OCISvcCtx *svchp, OCIError *errhp, ub4 flags);
-
-sword   OCIErrorGet   (dvoid *hndlp, ub4 recordno, OraText *sqlstate,
-                       sb4 *errcodep, OraText *bufp, ub4 bufsiz, ub4 type);
-
-sword   OCILobAppend  (OCISvcCtx *svchp, OCIError *errhp, 
-                       OCILobLocator *dst_locp,
-                       OCILobLocator *src_locp);
-
-sword   OCILobAssign (OCIEnv *envhp, OCIError *errhp, 
-                      CONST OCILobLocator *src_locp, 
-                      OCILobLocator **dst_locpp);
-
-sword   OCILobCharSetForm (OCIEnv *envhp, OCIError *errhp, 
-                           CONST OCILobLocator *locp, ub1 *csfrm);
-
-sword   OCILobCharSetId (OCIEnv *envhp, OCIError *errhp, 
-                         CONST OCILobLocator *locp, ub2 *csid);
-
-sword   OCILobCopy (OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *dst_locp,
-                    OCILobLocator *src_locp, ub4 amount, ub4 dst_offset, 
-                    ub4 src_offset);
-
-sword OCILobCreateTemporary(OCISvcCtx          *svchp,
-                            OCIError           *errhp,
-                            OCILobLocator      *locp,
-                            ub2                 csid,
-                            ub1                 csfrm,
-                            ub1                 lobtype,
-                            boolean             cache,
-                            OCIDuration         duration);
-
-
-sword OCILobClose( OCISvcCtx        *svchp,
-                   OCIError         *errhp,
-                   OCILobLocator    *locp );
-
-
-sword   OCILobDisableBuffering (OCISvcCtx      *svchp,
-                                OCIError       *errhp,
-                                OCILobLocator  *locp);
-
-sword   OCILobEnableBuffering (OCISvcCtx      *svchp,
-                               OCIError       *errhp,
-                               OCILobLocator  *locp);
-
-sword   OCILobErase (OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *locp,
-                      ub4 *amount, ub4 offset);
-
-sword   OCILobFileClose (OCISvcCtx *svchp, OCIError *errhp, 
-                         OCILobLocator *filep);
-
-sword   OCILobFileCloseAll (OCISvcCtx *svchp, OCIError *errhp);
-
-sword   OCILobFileExists (OCISvcCtx *svchp, OCIError *errhp, 
-                          OCILobLocator *filep,
-                          boolean *flag);
-
-sword   OCILobFileGetName (OCIEnv *envhp, OCIError *errhp, 
-                           CONST OCILobLocator *filep, 
-                           OraText *dir_alias, ub2 *d_length, 
-                           OraText *filename, ub2 *f_length);
-
-sword   OCILobFileIsOpen (OCISvcCtx *svchp, OCIError *errhp, 
-                          OCILobLocator *filep,
-                          boolean *flag);
-
-sword   OCILobFileOpen (OCISvcCtx *svchp, OCIError *errhp, 
-                        OCILobLocator *filep,
-                        ub1 mode);
-
-sword   OCILobFileSetName (OCIEnv *envhp, OCIError *errhp, 
-                           OCILobLocator **filepp, 
-                           CONST OraText *dir_alias, ub2 d_length, 
-                           CONST OraText *filename, ub2 f_length);
-
-sword   OCILobFlushBuffer (OCISvcCtx       *svchp,
-                           OCIError        *errhp,
-                           OCILobLocator   *locp,
-                           ub4              flag);
-
-sword OCILobFreeTemporary(OCISvcCtx          *svchp,
-                          OCIError           *errhp,
-                          OCILobLocator      *locp);
-
-sword OCILobGetChunkSize(OCISvcCtx         *svchp,
-                         OCIError          *errhp,
-                         OCILobLocator     *locp,
-                         ub4               *chunksizep);
-
-sword   OCILobGetLength  (OCISvcCtx *svchp, OCIError *errhp, 
-                          OCILobLocator *locp,
-                          ub4 *lenp);
-
-sword   OCILobIsEqual  (OCIEnv *envhp, CONST OCILobLocator *x, 
-                        CONST OCILobLocator *y, 
-                        boolean *is_equal);
-
-sword OCILobIsOpen( OCISvcCtx     *svchp,
-                    OCIError      *errhp,
-                    OCILobLocator *locp,
-                    boolean       *flag);
-
-sword OCILobIsTemporary(OCIEnv            *envp,
-                        OCIError          *errhp,
-                        OCILobLocator     *locp,
-                        boolean           *is_temporary);
-
-sword   OCILobLoadFromFile (OCISvcCtx *svchp, OCIError *errhp, 
-                            OCILobLocator *dst_locp,
-                            OCILobLocator *src_filep, 
-                            ub4 amount, ub4 dst_offset, 
-                            ub4 src_offset);
-
-sword   OCILobLocatorAssign  (OCISvcCtx *svchp, OCIError *errhp, 
-                            CONST OCILobLocator *src_locp, 
-                            OCILobLocator **dst_locpp);
-
-
-sword   OCILobLocatorIsInit (OCIEnv *envhp, OCIError *errhp, 
-                             CONST OCILobLocator *locp, 
-                             boolean *is_initialized);
-
-sword   OCILobOpen( OCISvcCtx        *svchp,
-                   OCIError         *errhp,
-                   OCILobLocator    *locp,
-                   ub1               mode );
- 
-sword   OCILobRead  (OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *locp,
-                     ub4 *amtp, ub4 offset, dvoid *bufp, ub4 bufl, dvoid *ctxp,
-                     OCICallbackLobRead cbfp, ub2 csid, ub1 csfrm);
-
-sword   OCILobTrim  (OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *locp,
-                     ub4 newlen);
-
-sword   OCILobWrite  (OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *locp,
-                      ub4 *amtp, ub4 offset, dvoid *bufp, ub4 buflen, ub1 piece,
-                      dvoid *ctxp, OCICallbackLobWrite cbfp, ub2 csid,
-                      ub1 csfrm);
-
-sword OCILobWriteAppend(OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *lobp,
-                        ub4 *amtp, dvoid *bufp, ub4 bufl, ub1 piece, dvoid *ctxp,
-                        OCICallbackLobWrite cbfp, ub2 csid, ub1 csfrm);
-
-sword   OCIBreak (dvoid *hndlp, OCIError *errhp);
-
-sword   OCIReset (dvoid *hndlp, OCIError *errhp);
-
-sword   OCIServerVersion  (dvoid *hndlp, OCIError *errhp, OraText *bufp, 
-                           ub4 bufsz,
-                           ub1 hndltype);
-
-sword   OCIServerRelease  (dvoid *hndlp, OCIError *errhp, OraText *bufp,
-                           ub4 bufsz,
-                           ub1 hndltype, ub4 *version);
-
-sword   OCIAttrGet (CONST dvoid *trgthndlp, ub4 trghndltyp, 
-                    dvoid *attributep, ub4 *sizep, ub4 attrtype, 
-                    OCIError *errhp);
-
-sword   OCIAttrSet (dvoid *trgthndlp, ub4 trghndltyp, dvoid *attributep,
-                    ub4 size, ub4 attrtype, OCIError *errhp);
-
-sword   OCISvcCtxToLda (OCISvcCtx *svchp, OCIError *errhp, Lda_Def *ldap);
-
-sword   OCILdaToSvcCtx (OCISvcCtx **svchpp, OCIError *errhp, Lda_Def *ldap);
-
-sword   OCIResultSetToStmt (OCIResult *rsetdp, OCIError *errhp);
-
-sword OCIFileClose ( dvoid  *hndl, OCIError *err, OCIFileObject *filep );
-
-sword   OCIUserCallbackRegister(dvoid *hndlp, ub4 type, dvoid *ehndlp,
-                                    OCIUserCallback callback, dvoid *ctxp,
-                                    ub4 fcode, ub4 when, OCIUcb *ucbDesc);
-
-sword   OCIUserCallbackGet(dvoid *hndlp, ub4 type, dvoid *ehndlp,
-                               ub4 fcode, ub4 when, OCIUserCallback *callbackp,
-                               dvoid **ctxpp, OCIUcb *ucbDesc);
-
-sword   OCISharedLibInit(dvoid *metaCtx, dvoid *libCtx, ub4 argfmt, sword argc,
-                         dvoid **argv, OCIEnvCallbackType envCallback);
-
-sword OCIFileExists ( dvoid  *hndl, OCIError *err, OraText *filename,
-                     OraText *path, ub1 *flag  );
-
-sword OCIFileFlush( dvoid *hndl, OCIError *err, OCIFileObject *filep  );
-
-
-sword OCIFileGetLength( dvoid *hndl, OCIError *err, OraText *filename,
-                        OraText *path, ubig_ora *lenp  );
-
-sword OCIFileInit ( dvoid *hndl, OCIError *err );
-
-sword OCIFileOpen ( dvoid *hndl, OCIError *err, OCIFileObject **filep,
-                    OraText *filename, OraText *path, ub4 mode, ub4 create, 
-                    ub4 type );
-
-sword OCIFileRead ( dvoid *hndl, OCIError *err, OCIFileObject *filep,
-                    dvoid *bufp, ub4 bufl, ub4 *bytesread );
-
-sword OCIFileSeek ( dvoid *hndl, OCIError *err, OCIFileObject *filep,
-                     uword origin, ubig_ora offset, sb1 dir );
-
-sword OCIFileTerm ( dvoid *hndl, OCIError *err );
-
-
-sword OCIFileWrite ( dvoid *hndl, OCIError *err, OCIFileObject   *filep,
-                     dvoid *bufp, ub4 buflen, ub4 *byteswritten );
-
-
-#ifdef ORAXB8_DEFINED
-
-sword   OCILobCopy2 (OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *dst_locp,
-                     OCILobLocator *src_locp, oraub8 amount, oraub8 dst_offset, 
-                     oraub8 src_offset);
-
-sword   OCILobErase2 (OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *locp,
-                      oraub8 *amount, oraub8 offset);
-
-sword   OCILobGetLength2 (OCISvcCtx *svchp, OCIError *errhp, 
-                          OCILobLocator *locp, oraub8 *lenp);
-
-sword   OCILobLoadFromFile2 (OCISvcCtx *svchp, OCIError *errhp, 
-                             OCILobLocator *dst_locp,
-                             OCILobLocator *src_filep, 
-                             oraub8 amount, oraub8 dst_offset, 
-                             oraub8 src_offset);
-
-sword   OCILobRead2 (OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *locp,
-                     oraub8 *byte_amtp, oraub8 *char_amtp, oraub8 offset,
-                     dvoid *bufp, oraub8 bufl, ub1 piece, dvoid *ctxp,
-                     OCICallbackLobRead2 cbfp, ub2 csid, ub1 csfrm);
-
-sword   OCILobTrim2 (OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *locp,
-                     oraub8 newlen);
-
-sword   OCILobWrite2 (OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *locp,
-                      oraub8 *byte_amtp, oraub8 *char_amtp, oraub8 offset,
-                      dvoid *bufp, oraub8 buflen, ub1 piece, dvoid *ctxp, 
-                      OCICallbackLobWrite2 cbfp, ub2 csid, ub1 csfrm);
-
-sword OCILobWriteAppend2 (OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *lobp,
-                          oraub8 *byte_amtp, oraub8 *char_amtp, dvoid *bufp,
-                          oraub8 bufl, ub1 piece, dvoid *ctxp,
-                          OCICallbackLobWrite2 cbfp, ub2 csid, ub1 csfrm);
-
-sword OCILobGetStorageLimit (OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *lobp, oraub8 *limitp);
-
-#endif
-
-/*
- ** Initialize the security package
- */
-sword   OCISecurityInitialize (OCISecurity *sechandle, OCIError *error_handle);
-
-sword   OCISecurityTerminate (OCISecurity *sechandle, OCIError *error_handle);
-
-sword OCISecurityOpenWallet(OCISecurity *osshandle,
-                            OCIError *error_handle,
-                            size_t wrllen,
-                            OraText *wallet_resource_locator,
-                            size_t pwdlen,
-                            OraText *password,
-                            nzttWallet *wallet);
-
-sword OCISecurityCloseWallet(OCISecurity *osshandle,
-                             OCIError *error_handle,
-                             nzttWallet *wallet);
-
-sword OCISecurityCreateWallet(OCISecurity *osshandle,
-                              OCIError *error_handle,
-                              size_t wrllen,
-                              OraText *wallet_resource_locator,
-                              size_t pwdlen,
-                              OraText *password,
-                              nzttWallet *wallet);
-
-sword OCISecurityDestroyWallet(OCISecurity *osshandle,
-                               OCIError *error_handle,
-                               size_t wrllen,
-                               OraText *wallet_resource_locator,
-                               size_t pwdlen,
-                               OraText *password);
-
-sword OCISecurityStorePersona(OCISecurity *osshandle,
-                              OCIError *error_handle,
-                              nzttPersona **persona,
-                              nzttWallet *wallet);
-
-sword OCISecurityOpenPersona(OCISecurity *osshandle,
-                             OCIError *error_handle,
-                             nzttPersona *persona);
-
-sword OCISecurityClosePersona(OCISecurity *osshandle,
-                              OCIError *error_handle,
-                              nzttPersona *persona);
-
-sword OCISecurityRemovePersona(OCISecurity *osshandle,
-                               OCIError *error_handle,
-                               nzttPersona **persona);
-
-sword OCISecurityCreatePersona(OCISecurity *osshandle,
-                               OCIError *error_handle,
-                               nzttIdentType identity_type,
-                               nzttCipherType cipher_type,
-                               nzttPersonaDesc *desc,
-                               nzttPersona **persona);
-
-sword OCISecuritySetProtection(OCISecurity *osshandle,
-                               OCIError *error_handle,
-                               nzttPersona *persona,
-                               nzttcef crypto_engine_function,
-                               nztttdufmt data_unit_format,
-                               nzttProtInfo *protection_info);
-
-sword OCISecurityGetProtection(OCISecurity *osshandle,
-                               OCIError *error_handle,
-                               nzttPersona *persona,
-                               nzttcef crypto_engine_function,
-                               nztttdufmt * data_unit_format_ptr,
-                               nzttProtInfo *protection_info);
-
-sword OCISecurityRemoveIdentity(OCISecurity *osshandle,
-                                OCIError *error_handle,
-                                nzttIdentity **identity_ptr);
-
-sword OCISecurityCreateIdentity(OCISecurity *osshandle,
-                                OCIError *error_handle,
-                                nzttIdentType type,
-                                nzttIdentityDesc *desc,
-                                nzttIdentity **identity_ptr);
-
-sword OCISecurityAbortIdentity(OCISecurity *osshandle,
-                               OCIError *error_handle,
-                               nzttIdentity **identity_ptr);
-
-sword OCISecurityFreeIdentity(OCISecurity *osshandle,
-                              OCIError *error_handle,
-                              nzttIdentity **identity_ptr);
-
-
-sword OCISecurityStoreTrustedIdentity(OCISecurity *osshandle,
-                                      OCIError *error_handle,
-                                      nzttIdentity **identity_ptr,
-                                      nzttPersona *persona);
-
-sword OCISecuritySign(OCISecurity *osshandle,
-                      OCIError *error_handle,
-                      nzttPersona *persona,
-                      nzttces signature_state,
-                      size_t input_length,
-                      ub1 *input,
-                      nzttBufferBlock *buffer_block);
-
-sword OCISecuritySignExpansion(OCISecurity *osshandle,
-                               OCIError *error_handle,
-                               nzttPersona *persona,
-                               size_t inputlen,
-                               size_t *signature_length);
-
-sword OCISecurityVerify(OCISecurity *osshandle,
-                        OCIError *error_handle,
-                        nzttPersona *persona,
-                        nzttces signature_state,
-                        size_t siglen,
-                        ub1 *signature,
-                        nzttBufferBlock *extracted_message,
-                        boolean *verified,
-                        boolean *validated,
-                        nzttIdentity **signing_party_identity);
-
-sword OCISecurityValidate(OCISecurity *osshandle,
-                          OCIError *error_handle,
-                          nzttPersona *persona,
-                          nzttIdentity *identity,
-                          boolean *validated);
-
-sword OCISecuritySignDetached(OCISecurity *osshandle,
-                              OCIError *error_handle,
-                              nzttPersona *persona,
-                              nzttces signature_state,
-                              size_t input_length,
-                              ub1 * input,
-                              nzttBufferBlock *signature);
-
-sword OCISecuritySignDetExpansion(OCISecurity *osshandle,
-                                  OCIError *error_handle,
-                                  nzttPersona *persona,
-                                  size_t input_length,
-                                  size_t *required_buffer_length);
-
-sword OCISecurityVerifyDetached(OCISecurity *osshandle,
-                                OCIError *error_handle,
-                                nzttPersona *persona,
-                                nzttces signature_state,
-                                size_t data_length,
-                                ub1 *data,
-                                size_t siglen,
-                                ub1 *signature,
-                                boolean *verified,
-                                boolean *validated,
-                                nzttIdentity **signing_party_identity);
-
-sword OCISecurity_PKEncrypt(OCISecurity *osshandle,
-                            OCIError *error_handle,
-                            nzttPersona *persona,
-                            size_t number_of_recipients,
-                            nzttIdentity *recipient_list,
-                            nzttces encryption_state,
-                            size_t input_length,
-                            ub1 *input,
-                            nzttBufferBlock *encrypted_data);
-
-sword OCISecurityPKEncryptExpansion(OCISecurity *osshandle,
-                                    OCIError *error_handle,
-                                    nzttPersona *persona,
-                                    size_t number_recipients,
-                                    size_t input_length,
-                                    size_t *buffer_length_required);
-
-sword OCISecurityPKDecrypt(OCISecurity *osshandle,
-                           OCIError *error_handle,
-                           nzttPersona *persona,
-                           nzttces encryption_state,
-                           size_t input_length,
-                           ub1 *input,
-                           nzttBufferBlock *encrypted_data);
-
-sword OCISecurityEncrypt(OCISecurity *osshandle,
-                         OCIError *error_handle,
-                         nzttPersona *persona,
-                         nzttces encryption_state,
-                         size_t input_length,
-                         ub1 *input,
-                         nzttBufferBlock *encrypted_data);
-
-sword OCISecurityEncryptExpansion(OCISecurity *osshandle,
-                                  OCIError *error_handle,
-                                  nzttPersona *persona,
-                                  size_t input_length,
-                                  size_t *encrypted_data_length);
-
-sword OCISecurityDecrypt(OCISecurity *osshandle,
-                         OCIError *error_handle,
-                         nzttPersona *persona,
-                         nzttces decryption_state,
-                         size_t input_length,
-                         ub1 *input,
-                         nzttBufferBlock *decrypted_data);
-
-sword OCISecurityEnvelope(OCISecurity *osshandle,
-                          OCIError *error_handle,
-                          nzttPersona *persona,
-                          size_t number_of_recipients,
-                          nzttIdentity *identity,
-                          nzttces encryption_state,
-                          size_t input_length,
-                          ub1 *input,
-                          nzttBufferBlock *enveloped_data);
-
-sword OCISecurityDeEnvelope(OCISecurity *osshandle,
-                            OCIError *error_handle,
-                            nzttPersona *persona,
-                            nzttces decryption_state,
-                            size_t input_length,
-                            ub1 *input,
-                            nzttBufferBlock *output_message,
-                            boolean *verified,
-                            boolean *validated,
-                            nzttIdentity **sender_identity);
-
-sword OCISecurityKeyedHash(OCISecurity *osshandle,
-                           OCIError *error_handle,
-                           nzttPersona *persona,
-                           nzttces hash_state,
-                           size_t input_length,
-                           ub1 *input,
-                           nzttBufferBlock *keyed_hash);
-
-sword OCISecurityKeyedHashExpansion(OCISecurity *osshandle,
-                                    OCIError *error_handle,
-                                    nzttPersona *persona,
-                                    size_t input_length,
-                                    size_t *required_buffer_length);
-
-sword OCISecurityHash(OCISecurity *osshandle,
-                      OCIError *error_handle,
-                      nzttPersona *persona,
-                      nzttces hash_state,
-                      size_t input,
-                      ub1 *input_length,
-                      nzttBufferBlock *hash);
-
-sword OCISecurityHashExpansion(OCISecurity *osshandle,
-                               OCIError *error_handle,
-                               nzttPersona *persona,
-                               size_t input_length,
-                               size_t *required_buffer_length);
-
-sword OCISecuritySeedRandom(OCISecurity *osshandle,
-                            OCIError *error_handle,
-                            nzttPersona *persona,
-                            size_t seed_length,
-                            ub1 *seed);
-
-sword OCISecurityRandomBytes(OCISecurity *osshandle,
-                             OCIError *error_handle,
-                             nzttPersona *persona,
-                             size_t number_of_bytes_desired,
-                             nzttBufferBlock *random_bytes);
-
-sword OCISecurityRandomNumber(OCISecurity *osshandle,
-                              OCIError *error_handle,
-                              nzttPersona *persona,
-                              uword *random_number_ptr);
-
-sword OCISecurityInitBlock(OCISecurity *osshandle,
-                           OCIError *error_handle,
-                           nzttBufferBlock *buffer_block);
-
-sword OCISecurityReuseBlock(OCISecurity *osshandle,
-                            OCIError *error_handle,
-                            nzttBufferBlock *buffer_block);
-
-sword OCISecurityPurgeBlock(OCISecurity *osshandle,
-                            OCIError *error_handle,
-                            nzttBufferBlock *buffer_block);
-
-sword OCISecuritySetBlock(OCISecurity *osshandle,
-                          OCIError *error_handle,
-                          uword flags_to_set,
-                          size_t buffer_length,
-                          size_t used_buffer_length,
-                          ub1 *buffer,
-                          nzttBufferBlock *buffer_block);
-
-sword OCISecurityGetIdentity(OCISecurity   *osshandle,
-                             OCIError      *error_handle,
-                             size_t         namelen,
-                             OraText          *distinguished_name,
-                             nzttIdentity **identity);
-
-sword OCIAQEnq(OCISvcCtx *svchp, OCIError *errhp, OraText *queue_name,
-                 OCIAQEnqOptions *enqopt, OCIAQMsgProperties *msgprop,
-                 OCIType *payload_tdo, dvoid **payload, dvoid **payload_ind, 
-                 OCIRaw **msgid, ub4 flags); 
-
-sword OCIAQDeq(OCISvcCtx *svchp, OCIError *errhp, OraText *queue_name,
-                 OCIAQDeqOptions *deqopt, OCIAQMsgProperties *msgprop,
-                 OCIType *payload_tdo, dvoid **payload, dvoid **payload_ind, 
-                 OCIRaw **msgid, ub4 flags); 
-
-sword OCIAQEnqArray(OCISvcCtx *svchp, OCIError *errhp, OraText *queue_name,
-                    OCIAQEnqOptions *enqopt, ub4 *iters,
-                    OCIAQMsgProperties **msgprop, OCIType *payload_tdo,
-                    dvoid **payload, dvoid **payload_ind, OCIRaw **msgid,
-                    dvoid *ctxp, OCICallbackAQEnq enqcbfp, ub4 flags);
-
-sword OCIAQDeqArray(OCISvcCtx *svchp, OCIError *errhp, OraText *queue_name,
-                    OCIAQDeqOptions *deqopt, ub4 *iters,
-                    OCIAQMsgProperties **msgprop, OCIType *payload_tdo,
-                    dvoid **payload, dvoid **payload_ind, OCIRaw **msgid,
-                    dvoid *ctxp, OCICallbackAQDeq deqcbfp, ub4 flags);
-
-sword OCIAQListen(OCISvcCtx *svchp, OCIError *errhp, 
-                      OCIAQAgent **agent_list, ub4 num_agents,
-                      sb4 wait, OCIAQAgent **agent,
-                      ub4 flags);
-
-sword OCIExtractInit(dvoid *hndl, OCIError *err);
-
-sword OCIExtractTerm(dvoid *hndl, OCIError *err);
-
-sword OCIExtractReset(dvoid *hndl, OCIError *err);
-
-sword OCIExtractSetNumKeys(dvoid *hndl, OCIError *err, uword numkeys);
-
-sword OCIExtractSetKey(dvoid *hndl, OCIError *err, CONST OraText *name, 
-                       ub1 type, ub4 flag, CONST dvoid *defval, 
-                       CONST sb4 *intrange, CONST OraText *CONST *strlist);
-
-sword OCIExtractFromFile(dvoid *hndl, OCIError *err, ub4 flag, 
-                         OraText *filename);
-
-sword OCIExtractFromStr(dvoid *hndl, OCIError *err, ub4 flag, OraText *input);
-
-sword OCIExtractToInt(dvoid *hndl, OCIError *err, OraText *keyname, 
-                      uword valno, sb4 *retval);
-
-sword OCIExtractToBool(dvoid *hndl, OCIError *err, OraText *keyname, 
-                       uword valno, ub1 *retval);
-
-sword OCIExtractToStr(dvoid *hndl, OCIError *err, OraText *keyname, 
-                      uword valno, OraText *retval, uword buflen);
-
-sword OCIExtractToOCINum(dvoid *hndl, OCIError *err, OraText *keyname, 
-                         uword valno, OCINumber *retval);
-
-sword OCIExtractToList(dvoid *hndl, OCIError *err, uword *numkeys);
-
-sword OCIExtractFromList(dvoid *hndl, OCIError *err, uword index, 
-                         OraText **name, 
-                         ub1 *type, uword *numvals, dvoid ***values);
-
-/* Memory Related Service Interfaces */
-
-sword OCIMemoryAlloc(dvoid *hdl, OCIError *err, dvoid **mem,
-        OCIDuration dur, ub4 size, ub4 flags);
-
-sword OCIMemoryResize(dvoid *hdl, OCIError *err, dvoid **mem,
-                        ub4 newsize, ub4 flags);
-                        
-sword OCIMemoryFree(dvoid *hdl, OCIError *err, dvoid *mem);
-
-sword OCIContextSetValue(dvoid *hdl, OCIError *err, OCIDuration duration,
-                        ub1 *key, ub1 keylen, dvoid *ctx_value);
-
-sword OCIContextGetValue(dvoid *hdl, OCIError *err, ub1 *key,
-                        ub1 keylen, dvoid **ctx_value);
-
-sword OCIContextClearValue(dvoid *hdl, OCIError *err, ub1 *key, 
-                        ub1 keylen);
-
-sword OCIContextGenerateKey(dvoid *hdl, OCIError *err, ub4 *key);
-
-sword OCIMemorySetCurrentIDs(dvoid *hdl, OCIError *err, 
-                             ub4 curr_session_id, ub4 curr_trans_id, 
-                             ub4 curr_stmt_id);
-
-sword OCIPicklerTdsCtxInit(OCIEnv *env, OCIError *err, 
-                           OCIPicklerTdsCtx **tdsc);
-
-sword OCIPicklerTdsCtxFree(OCIEnv *env, OCIError *err, OCIPicklerTdsCtx *tdsc);
-
-sword OCIPicklerTdsInit(OCIEnv *env, OCIError *err, OCIPicklerTdsCtx *tdsc, 
-                                        OCIPicklerTds **tdsh);
-
-sword OCIPicklerTdsFree(OCIEnv *env, OCIError *err, OCIPicklerTds *tdsh);
-
-sword OCIPicklerTdsCreateElementNumber(OCIEnv *env, OCIError *err, 
-                                        OCIPicklerTds *tdsh, ub1 prec, 
-                                        sb1 scale, OCIPicklerTdsElement *elt);
-
-sword OCIPicklerTdsCreateElementChar(OCIEnv *env, OCIError *err, 
-                                     OCIPicklerTds *tdsh, ub2 len, 
-                                     OCIPicklerTdsElement *elt);
-
-sword OCIPicklerTdsCreateElementVarchar(OCIEnv *env, OCIError *err, 
-                                        OCIPicklerTds *tdsh, ub2 len, 
-                                        OCIPicklerTdsElement *elt);
-
-sword OCIPicklerTdsCreateElementRaw(OCIEnv *env, OCIError *err, 
-                                    OCIPicklerTds *tdsh, ub2 len, 
-                                    OCIPicklerTdsElement *elt);
-
-sword OCIPicklerTdsCreateElement(OCIEnv *env, OCIError *err, 
-                                 OCIPicklerTds *tdsh, OCITypeCode dty, 
-                                 OCIPicklerTdsElement *elt);
-
-sword OCIPicklerTdsAddAttr(OCIEnv *env, OCIError *err, 
-                           OCIPicklerTds *tdsh, OCIPicklerTdsElement elt);
-
-sword OCIPicklerTdsGenerate(OCIEnv *env, OCIError *err, 
-                                OCIPicklerTds *tdsh);
-
-sword OCIPicklerTdsGetAttr(OCIEnv *env, OCIError *err, 
-                                CONST OCIPicklerTds *tdsh, ub1  attrno,
-                                OCITypeCode *typ, ub2  *len);
-
-sword OCIPicklerFdoInit(OCIEnv *env, OCIError *err, 
-                                OCIPicklerFdo **fdoh);
-
-sword OCIPicklerFdoFree(OCIEnv *env, OCIError *err, 
-                                OCIPicklerFdo *fdoh);
-
-sword OCIPicklerImageInit(OCIEnv *env, OCIError *err, 
-                          OCIPicklerFdo *fdoh, 
-                          OCIPicklerTds *tdsh,
-                          OCIPicklerImage **imgh);
-
-sword OCIPicklerImageFree(OCIEnv *env, OCIError *err, 
-                                OCIPicklerImage *imgh);
- 
-sword OCIPicklerImageAddScalar(OCIEnv *env, OCIError *err,  
-                               OCIPicklerImage *imgh, 
-                               dvoid *scalar, ub4  len);
- 
-sword OCIPicklerImageAddNullScalar(OCIEnv *env, OCIError *err, 
-                                OCIPicklerImage *imgh);
- 
-sword OCIPicklerImageGenerate(OCIEnv *env, OCIError *err, 
-                                OCIPicklerImage *imgh);
- 
-sword OCIPicklerImageGetScalarSize(OCIEnv *env, OCIError *err, 
-                                OCIPicklerImage *imgh, 
-                                ub4  attrno, ub4  *size);
- 
-sword OCIPicklerImageGetScalar(OCIEnv *env, OCIError *err, 
-                                OCIPicklerImage *imgh, ub4  attrno, 
-                                dvoid *buf, ub4  *len, OCIInd *ind);
-
-sword OCIPicklerImageCollBegin(OCIEnv *env, OCIError *err,
-                OCIPicklerImage *imgh, CONST OCIPicklerTds *colltdsh);
- 
-sword OCIPicklerImageCollAddScalar( OCIEnv *env, OCIError *err,
-                OCIPicklerImage *imgh, dvoid *scalar,
-                ub4 buflen, OCIInd ind);
- 
-sword OCIPicklerImageCollEnd(OCIEnv *env, OCIError *err,
-                OCIPicklerImage *imgh);
- 
-/* should take svcctx for locator stuff */
-sword OCIPicklerImageCollBeginScan(OCIEnv *env, OCIError *err,
-                OCIPicklerImage *imgh, CONST OCIPicklerTds *coll_tdsh,
-                ub4 attrnum, ub4 startidx, OCIInd *ind);
- 
-sword OCIPicklerImageCollGetScalarSize(OCIEnv *env, OCIError *err,
-                CONST OCIPicklerTds *coll_tdsh, ub4 *size);
- 
-sword OCIPicklerImageCollGetScalar(OCIEnv *env, OCIError *err,
-                                   OCIPicklerImage *imgh, dvoid *buf,
-                                   ub4 *buflen, OCIInd *ind);
-
-sword OCIAnyDataGetType(OCISvcCtx *svchp, OCIError *errhp, OCIAnyData *sdata,
-        OCITypeCode *tc, OCIType **type);
-
-sword OCIAnyDataIsNull(OCISvcCtx *svchp, OCIError *errhp, OCIAnyData *sdata,
-        boolean *isnull);
-
-sword OCIAnyDataConvert(OCISvcCtx *svchp, OCIError *errhp, OCITypeCode tc,
-        OCIType *type, OCIDuration dur, dvoid *ind, dvoid *data_val,
-        ub4 len, OCIAnyData **sdata);
-
-sword OCIAnyDataBeginCreate(OCISvcCtx *svchp, OCIError *errhp, OCITypeCode tc,
-        OCIType *type, OCIDuration dur, OCIAnyData **sdata);
-
-sword OCIAnyDataDestroy(OCISvcCtx *svchp, OCIError *errhp, OCIAnyData *sdata);
-
-sword OCIAnyDataAttrSet(OCISvcCtx *svchp, OCIError *errhp, OCIAnyData *sdata,
-        OCITypeCode tc, OCIType *type, dvoid *ind, dvoid *attr_val,
-        ub4 length, boolean is_any);
-
-sword OCIAnyDataCollAddElem(OCISvcCtx *svchp, OCIError *errhp,
-        OCIAnyData *sdata, OCITypeCode tc, OCIType *type, dvoid *ind,
-        dvoid *attr_val, ub4 length, boolean is_any, boolean last_elem);
-
-sword OCIAnyDataEndCreate(OCISvcCtx *svchp, OCIError *errhp,
-                          OCIAnyData *sdata);
-
-sword OCIAnyDataAccess(OCISvcCtx *svchp, OCIError *errhp, OCIAnyData *sdata,
-        OCITypeCode tc, OCIType *type, dvoid *ind, dvoid *attr_val,
-        ub4 *length);
-
-sword OCIAnyDataGetCurrAttrNum(OCISvcCtx *svchp, OCIError *errhp, 
-                               OCIAnyData *sdata, ub4 *attrnum);
-
-sword OCIAnyDataAttrGet(OCISvcCtx *svchp, OCIError *errhp, OCIAnyData *sdata,
-  OCITypeCode tc, OCIType *type, dvoid *ind, dvoid *attr_val,
-        ub4 *length, boolean is_any);
-
-sword OCIAnyDataCollGetElem(OCISvcCtx *svchp, OCIError *errhp,
-  OCIAnyData *sdata,
-  OCITypeCode tc, OCIType *type, dvoid *ind, dvoid *celem_val,
-  ub4 *length, boolean is_any);
-
-
-/*------------------------ OCIAnyDataSet interfaces -------------------------*/
-
-/*
-   NAME
-     OCIAnyDataSetBeginCreate - OCIAnyDataSet Begin Creation
-   PARAMETERS
-     svchp (IN/OUT) - The OCI service context.
-     errhp (IN/OUT) - The OCI error handle. If there is an error, it is
-                      recorded in errhp and this function returns OCI_ERROR.
-                      Diagnostic information can be obtained by calling
-                      OCIErrorGet().
-     typecode       - typecode corresponding to the OCIAnyDataSet.
-     type (IN)      - type corresponding to the OCIAnyDataSet. If the typecode
-                      corresponds to a built-in type (OCI_TYPECODE_NUMBER etc.)
-                      , this parameter can be NULL. It should be non NULL for
-                      user defined types (OCI_TYPECODE_OBJECT,
-                      OCI_TYPECODE_REF, collection types etc.)
-     dur (IN)       - duration for which OCIAnyDataSet is allocated.
-     data_set (OUT) - Initialized OCIAnyDataSet.
-     RETURNS        - error code
-   NOTES
-     This call allocates an OCIAnyDataSet for the duration of dur and
-     initializes it with the type information. The OCIAnyDataSet can hold
-     multiple instances of the given type. For performance reasons, the 
-     OCIAnyDataSet will end up pointing to the passed in OCIType parameter.
-     It is the responsibility of the caller to ensure that the OCIType is
-     longer lived (has allocation duration >= the duration of the OCIAnyData
-     if the OCIType is a transient one, allocation/pin duration >= duration of
-     the OCIAnyData if the OCIType is a persistent one).
-
-*/
-sword OCIAnyDataSetBeginCreate(OCISvcCtx *svchp, OCIError *errhp,
-     OCITypeCode typecode, CONST OCIType *type, OCIDuration dur,
-     OCIAnyDataSet ** data_set);
-
-/*
-   NAME
-     OCIAnyDataSetDestroy  - OCIAnyDataSet Destroy
-   DESCRIPTION
-     This call frees the OCIAnyDataSet allocated using
-     OCIAnyDataSetBeginCreate().
-   RETURNS
-     error code.
-   PARAMETERS
-     svchp (IN/OUT)    - The OCI service context.
-     errhp (IN/OUT)    - The OCI Error handle.
-     data_set (IN/OUT) - OCIAnyDataSet to be freed.
-*/
-sword OCIAnyDataSetDestroy(OCISvcCtx *svchp, OCIError *errhp,
-     OCIAnyDataSet *data_set);
-
-
-/*
-   NAME
-     OCIAnyDataSetAddInstance - OCIAnyDataSet Add an instance
-   DESCRIPTION
-     This call adds a new skeleton instance to the OCIAnyDataSet and all the
-     attributes of the instance are set to NULL. It returns this skeleton
-     instance through the OCIAnyData parameter which can be constructed
-     subsequently by invoking the OCIAnyData API.
-   RETURNS
-     error code.
-   PARAMETERS
-     svchp (IN/OUT)      - The OCI service context.
-     errhp (IN/OUT)      - The OCI Error handle.
-     data_set (IN/OUT)   - OCIAnyDataSet to which a new instance is added.
-     data (IN/OUT)       - OCIAnyData corresponding to the newly added
-                           instance. If (*data) is NULL, a new OCIAnyData will
-                           be allocated for same duration as the OCIAnyDataSet.
-                           If (*data) is not NULL, it will get reused. This
-                           OCIAnyData can be subseqently constructed using the
-                           OCIAnyDataConvert() call or it can be constructed
-                           piece-wise using the OCIAnyDataAttrSet and
-                           OCIAnyDataCollAddElem calls.
-   NOTES
-     No Destruction of the old value is done here. It is the responsibility of
-     the caller to destroy the old value pointed to by (*data) and set (*data)
-     to a null pointer before beginning to make a sequence of this call. No
-     deep copying (of OCIType information nor the data part.) is done in the
-     returned OCIAnyData. This OCIAnyData cannot be used beyond the allocation
-     duration of the OCIAnyDataSet (it is like a reference into the
-     OCIAnyDataSet). The returned OCIAnyData can be reused on subsequent calls
-     to this function, to sequentially add new data instances to the
-     OCIAnyDataSet.
-*/
-sword OCIAnyDataSetAddInstance(OCISvcCtx *svchp, OCIError *errhp,
-     OCIAnyDataSet *data_set, OCIAnyData **data);
-
-/*
-   NAME
-     OCIAnyDataSetEndCreate - OCIAnyDataSet End Creation process.
-   DESCRIPTION
-     This call marks the end of OCIAnyDataSet creation. It should be called
-     after constructing all of its instance(s).
-   RETURNS
-     error code.
-   PARAMETERS
-     svchp (IN/OUT)        - The OCI service context.
-     errhp (IN/OUT)        - The OCI error handle. If there is an error, it is
-                             recorded in errhp and this function returns
-                             OCI_ERROR. Diagnostic information can be obtained
-                             by calling OCIErrorGet().
-     data_set (IN/OUT)     - OCIAnyDataSet that has been fully constructed.
-*/
-sword OCIAnyDataSetEndCreate(OCISvcCtx *svchp, OCIError *errhp,
-     OCIAnyDataSet *data_set);
-
-/*
-   NAME
-     OCIAnyDataSetGetType - OCIAnyDataSet Get Type of an OCIAnyDataSet
-   DESCRIPTION
-     Gets the Type corresponding to an OCIAnyDataSet. It returns the actual
-     pointer to the type maintained inside an OCIAnyDataSet. No copying is
-     done for performance reasons. The client is responsible for not using
-     this type once the OCIAnyDataSet is freed (or its duration ends).
-   RETURNS
-     error code.
-   PARAMETERS
-     svchp (IN/OUT)      - The OCI service context.
-     errhp (IN/OUT)      - The OCI Error handle.
-     data_set (IN)       - Initialized OCIAnyDataSet.
-     tc (OUT)            - The typecode of the type.
-     type (OUT)          - The type corresponding to the OCIAnyDataSet. This
-                           could be null if the OCIAnyData corresponds to a
-                           built-in type.
-*/
-sword OCIAnyDataSetGetType (OCISvcCtx *svchp, OCIError *errhp,
-     OCIAnyDataSet *data_set, OCITypeCode *tc, OCIType **type);
-
-/*
-  NAME
-    OCIAnyDataSetGetCount - OCIAnyDataSet Get Count of instances.
-  DESCRIPTION
-    This call gets the number of instances in the OCIAnyDataSet.
-  RETURNS
-    error code.
-  PARAMETERS
-    svchp (IN/OUT)      - OCI Service Context
-    errhp (IN/OUT)      - OCI Error handle
-    data_set (IN)       - Well formed OCIAnyDataSet.
-    count (OUT)         - number of instances in OCIAnyDataSet
-*/
-sword OCIAnyDataSetGetCount(OCISvcCtx *svchp, OCIError *errhp,
-     OCIAnyDataSet *data_set, ub4 *count);
-
-/*
-  NAME
-    OCIAnyDataSetGetInstance - OCIAnyDataSet Get next instance.
-  DESCRIPTION
-    Only sequential access to the instances in an OCIAnyDataSet is allowed.
-    This call returns the OCIAnyData corresponding to an instance at the
-    current position and updates the current position. Subsequently, the
-    OCIAnyData access routines may be used to access the instance.
-  RETURNS
-    error code. Returns OCI_NO_DATA if the current position is at the end of
-    the set, OCI_SUCCESS otherwise.
-  PARAMETERS
-    svchp (IN/OUT)      - OCI Service Context
-    errhp (IN/OUT)      - OCI Error handle
-    data_set (IN)       - Well formed OCIAnyDataSet
-    data (IN/OUT)       - OCIAnyData corresponding to the instance. If (*data)
-                          is NULL, a new OCIAnyData will be allocated for same
-                          duration as the OCIAnyDataSet. If (*data) is not NULL
-                          , it will get reused. This OCIAnyData can be
-                          subsequently accessed using the OCIAnyDataAccess()
-                          call or piece-wise by using the OCIAnyDataAttrGet()
-                          call.
-  NOTE
-    No Destruction of the old value is done here. It is the responsibility of
-    the caller to destroy the old value pointed to by (*data) and set (*data)
-    to a null pointer before beginning to make a sequence of this call. No deep
-    copying (of OCIType information nor the data part.) is done in the returned
-    OCIAnyData. This OCIAnyData cannot be used beyond the allocation duration
-    of the OCIAnyDataSet (it is like a reference into the OCIAnyDataSet). The
-    returned OCIAnyData can be reused on subsequent calls to this function to
-    sequentially access the OCIAnyDataSet.
-*/
-sword OCIAnyDataSetGetInstance(OCISvcCtx *svchp, OCIError *errhp,
-     OCIAnyDataSet *data_set, OCIAnyData **data);
-
-/*--------------------- End of OCIAnyDataSet interfaces ---------------------*/
-
-sword OCIFormatInit(dvoid *hndl, OCIError *err);
-
-sword OCIFormatString(dvoid *hndl, OCIError *err, OraText *buffer,
-                      sbig_ora bufferLength, sbig_ora *returnLength,
-                      CONST OraText *formatString, ...);
-
-sword OCIFormatTerm(dvoid *hndl, OCIError *err);
-
-sword OCIFormatTUb1(void);
-sword OCIFormatTUb2(void);
-sword OCIFormatTUb4(void);
-sword OCIFormatTUword(void);
-sword OCIFormatTUbig_ora(void);
-sword OCIFormatTSb1(void);
-sword OCIFormatTSb2(void);
-sword OCIFormatTSb4(void);
-sword OCIFormatTSword(void);
-sword OCIFormatTSbig_ora(void);
-sword OCIFormatTEb1(void);
-sword OCIFormatTEb2(void);
-sword OCIFormatTEb4(void);
-sword OCIFormatTEword(void);
-sword OCIFormatTChar(void);
-sword OCIFormatTText(void);
-sword OCIFormatTDouble(void);
-sword OCIFormatTDvoid(void);
-sword OCIFormatTEnd(void);
-
-/*-------------------------- Extensions to XA interface ---------------------*/
-/* ------------------------- xaosvch ----------------------------------------*/
-/*
-   NAME
-     xaosvch  -  XA Oracle get SerViCe Handle
-   DESCRIPTION
-     Given a database name return the service handle that is used by the
-     XA library
-   NOTE
-     This macro has been provided for backward compatibilty with 8.0.2
-*/
-OCISvcCtx *xaosvch(OraText *dbname);
-
-/* ------------------------- xaoSvcCtx --------------------------------------*/
-/*
-   NAME
-     xaoSvcCtx  -  XA Oracle get SerViCe ConTeXt
-   DESCRIPTION
-     Given a database name return the service handle that is used by the
-     XA library
-   NOTE
-     This routine has been provided for APs to get access to the service
-     handle that XA library uses. Without this routine APs must use SQLLIB
-     routine sqlld2 to get access to the Logon data area registered by the
-     XA library
-*/
-OCISvcCtx *xaoSvcCtx(OraText *dbname);
-
-/* ------------------------- xaoEnv -----------------------------------------*/
-/*
-   NAME
-     xaoEnv  -  XA Oracle get ENvironment Handle
-   DESCRIPTION
-     Given a database name return the environment handle that is used by the
-     XA library
-   NOTE
-     This routine has been provided for APs to get access to the environment
-     handle that XA library uses. Without this routine APs must use SQLLIB
-     routine sqlld2 to get access to the Logon data area registered by the
-     XA library
-*/
-OCIEnv *xaoEnv(OraText *dbname);
-
-/* ------------------------- xaosterr ---------------------------------------*/
-/*
-   NAME
-     xaosterr  -  XA Oracle get xa STart ERRor code
-   DESCRIPTION
-     Given an oracle error code return the XA error code
- */
-int xaosterr(OCISvcCtx *svch, sb4 error);
-/*-------------------------- End Extensions ---------------------------------*/
-/*---------------------- Extensions to NLS cartridge service ----------------*/
-/* ----------------------- OCINlsGetInfo ------------------------------------*/
-/*
-   NAME
-     OCINlsGetInfo - Get NLS info from OCI environment handle
-   REMARKS
-     This function generates language information specified by item from OCI 
-     environment handle envhp into an array pointed to by buf within size 
-     limitation as buflen.
-   RETURNS
-     OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR on wrong item.
-   envhp(IN/OUT)
-     OCI environment handle.
-   errhp(IN/OUT)
-     The OCI error handle. If there is an error, it is record in errhp and 
-     this function returns a NULL pointer. Diagnostic information can be 
-     obtained by calling OCIErrorGet().
-   buf(OUT)
-     Pointer to the destination buffer.
-   buflen(IN)
-     The size of destination buffer. The maximum length for each information
-     is 32 bytes.
-   item(IN)
-     It specifies to get which item in OCI environment handle and can be one
-     of following values:
-       OCI_NLS_DAYNAME1 : Native name for Monday.
-       OCI_NLS_DAYNAME2 : Native name for Tuesday.
-       OCI_NLS_DAYNAME3 : Native name for Wednesday.
-       OCI_NLS_DAYNAME4 : Native name for Thursday.
-       OCI_NLS_DAYNAME5 : Native name for Friday.
-       OCI_NLS_DAYNAME6 : Native name for for Saturday.
-       OCI_NLS_DAYNAME7 : Native name for for Sunday.
-       OCI_NLS_ABDAYNAME1 : Native abbreviated name for Monday.
-       OCI_NLS_ABDAYNAME2 : Native abbreviated name for Tuesday.
-       OCI_NLS_ABDAYNAME3 : Native abbreviated name for Wednesday.
-       OCI_NLS_ABDAYNAME4 : Native abbreviated name for Thursday.
-       OCI_NLS_ABDAYNAME5 : Native abbreviated name for Friday.
-       OCI_NLS_ABDAYNAME6 : Native abbreviated name for for Saturday.
-       OCI_NLS_ABDAYNAME7 : Native abbreviated name for for Sunday.
-       OCI_NLS_MONTHNAME1 : Native name for January.
-       OCI_NLS_MONTHNAME2 : Native name for February.
-       OCI_NLS_MONTHNAME3 : Native name for March.
-       OCI_NLS_MONTHNAME4 : Native name for April.
-       OCI_NLS_MONTHNAME5 : Native name for May.
-       OCI_NLS_MONTHNAME6 : Native name for June.
-       OCI_NLS_MONTHNAME7 : Native name for July.
-       OCI_NLS_MONTHNAME8 : Native name for August.
-       OCI_NLS_MONTHNAME9 : Native name for September.
-       OCI_NLS_MONTHNAME10 : Native name for October.
-       OCI_NLS_MONTHNAME11 : Native name for November.
-       OCI_NLS_MONTHNAME12 : Native name for December.
-       OCI_NLS_ABMONTHNAME1 : Native abbreviated name for January.
-       OCI_NLS_ABMONTHNAME2 : Native abbreviated name for February.
-       OCI_NLS_ABMONTHNAME3 : Native abbreviated name for March.
-       OCI_NLS_ABMONTHNAME4 : Native abbreviated name for April.
-       OCI_NLS_ABMONTHNAME5 : Native abbreviated name for May.
-       OCI_NLS_ABMONTHNAME6 : Native abbreviated name for June.
-       OCI_NLS_ABMONTHNAME7 : Native abbreviated name for July.
-       OCI_NLS_ABMONTHNAME8 : Native abbreviated name for August.
-       OCI_NLS_ABMONTHNAME9 : Native abbreviated name for September.
-       OCI_NLS_ABMONTHNAME10 : Native abbreviated name for October.
-       OCI_NLS_ABMONTHNAME11 : Native abbreviated name for November.
-       OCI_NLS_ABMONTHNAME12 : Native abbreviated name for December.
-       OCI_NLS_YES : Native string for affirmative response.
-       OCI_NLS_NO : Native negative response. 
-       OCI_NLS_AM : Native equivalent string of AM.
-       OCI_NLS_PM : Native equivalent string of PM.
-       OCI_NLS_AD : Native equivalent string of AD.
-       OCI_NLS_BC : Native equivalent string of BC.
-       OCI_NLS_DECIMAL : decimal character.
-       OCI_NLS_GROUP : group separator.
-       OCI_NLS_DEBIT : Native symbol of debit.
-       OCI_NLS_CREDIT : Native sumbol of credit.
-       OCI_NLS_DATEFORMAT : Oracle date format.
-       OCI_NLS_INT_CURRENCY: International currency symbol.
-       OCI_NLS_LOC_CURRENCY : Locale currency symbol.
-       OCI_NLS_LANGUAGE : Language name.
-       OCI_NLS_ABLANGUAGE : Abbreviation for language name.
-       OCI_NLS_TERRITORY : Territory name.
-       OCI_NLS_CHARACTER_SET : Character set name.
-       OCI_NLS_LINGUISTIC : Linguistic name.
-       OCI_NLS_CALENDAR : Calendar name.
-       OCI_NLS_DUAL_CURRENCY : Dual currency symbol.
-*/
-sword OCINlsGetInfo(dvoid *envhp, OCIError *errhp, OraText *buf,
-                    size_t buflen, ub2 item);
-
-/* ----------------------- OCINlsNumericInfoGet -----------------------------*/
-/*
-   NAME
-     OCINlsNumericInfoGet - Get NLS numeric info from OCI environment handle
-   REMARKS
-     This function generates numeric language information specified by item 
-     from OCI environment handle envhp into an output number variable.
-   RETURNS
-     OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR on wrong item.
-   envhp(IN/OUT)
-     OCI environment handle. If handle invalid, returns OCI_INVALID_HANDLE.
-   errhp(IN/OUT)
-     The OCI error handle. If there is an error, it is record in errhp and 
-     this function returns a NULL pointer. Diagnostic information can be 
-     obtained by calling OCIErrorGet().
-   val(OUT)
-     Pointer to the output number variable. On OCI_SUCCESS return, it will
-     contain the requested NLS numeric info.
-   item(IN)
-     It specifies to get which item in OCI environment handle and can be one
-     of following values:
-       OCI_NLS_CHARSET_MAXBYTESZ : Maximum character byte size for OCI
-                                   environment or session handle charset
-       OCI_NLS_CHARSET_FIXEDWIDTH: Character byte size for fixed-width charset;
-                                   0 for variable-width charset 
-*/
-sword OCINlsNumericInfoGet(dvoid *envhp, OCIError *errhp, sb4 *val, ub2 item);
-
-/* ----------------------- OCINlsCharSetNameToId ----------------------------*/
-/*
-   NAME
-     OCINlsCharSetNameToId - Get Oracle charset id given Oracle charset name
-   REMARKS
-     This function will get the Oracle character set id corresponding to
-     the given Oracle character set name.
-   RETURNS
-     Oracle character set id for the given Oracle character set name if
-     character set name and OCI handle are valid; otherwise returns 0.
-   envhp(IN/OUT)
-     OCI environment handle.
-   name(IN)
-     Pointer to a null-terminated Oracle character set name whose id 
-     will be returned.
-*/
-ub2 OCINlsCharSetNameToId(dvoid *envhp, const oratext *name);
-
-/* ----------------------- OCINlsCharSetIdToName ----------------------------*/
-/*
-   NAME
-     OCINlsCharSetIdToName - Get Oracle charset name given Oracle charset id
-   REMARKS
-     This function will get the Oracle character set name corresponding to
-     the given Oracle character set id.
-   RETURNS
-     OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
-   envhp(IN/OUT)
-     OCI environment handle. If handle invalid, returns OCI_INVALID_HANDLE.
-   buf(OUT)
-     Pointer to the destination buffer. On OCI_SUCCESS return, it will contain
-     the null-terminated string for character set name.
-   buflen(IN)
-     Size of destination buffer. Recommended size is OCI_NLS_MAXBUFSZ for
-     guarantee to store an Oracle character set name. If it's smaller than
-     the length of the character set name, the function will return OCI_ERROR.
-   id(IN)
-     Oracle character set id.
-*/
-sword OCINlsCharSetIdToName(dvoid *envhp, oratext *buf, size_t buflen, ub2 id);
-
-/* ----------------------- OCINlsNameMap ------------------------------------*/
-/*
-   NAME
-     OCINlsNameMap - Map NLS naming from Oracle to other standards and vice 
-                     versa
-   REMARKS
-     This function will map NLS naming from Oracle to other standards (such
-     as ISO, IANA) and vice versa.
-   RETURNS
-     OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
-   envhp(IN/OUT)
-     OCI environment handle. If handle invalid, returns OCI_INVALID_HANDLE.
-   buf(OUT)
-     Pointer to the destination buffer. On OCI_SUCCESS return, it will 
-     contain null-terminated string for requested mapped name.
-   buflen(IN)
-     The size of destination buffer. Recommended size is OCI_NLS_MAXBUFSZ
-     for guarantee to store an NLS name. If it is smaller than the length
-     of the name, the function will return OCI_ERROR.
-   srcbuf(IN)
-     Pointer to null-terminated NLS name. If it is not a valid name in its
-     define scope, the function will return OCI_ERROR.
-   flag(IN)
-     It specifies name mapping direction and can take the following values:
-       OCI_NLS_CS_IANA_TO_ORA : Map character set name from IANA to Oracle
-       OCI_NLS_CS_ORA_TO_IANA : Map character set name from Oracle to IANA
-       OCI_NLS_LANG_ISO_TO_ORA : Map language name from ISO to Oracle
-       OCI_NLS_LANG_ORA_TO_ISO : Map language name from Oracle to ISO
-       OCI_NLS_TERR_ISO_TO_ORA : Map territory name from ISO to Oracle
-       OCI_NLS_TERR_ORA_TO_ISO : Map territory name from Oracle to ISO
-       OCI_NLS_TERR_ISO3_TO_ORA : Map territory name from 3-letter ISO
-                                  abbreviation to Oracle
-       OCI_NLS_TERR_ORA_TO_ISO3 : Map territory name from Oracle to 3-letter
-                                  ISO abbreviation
-*/
-sword OCINlsNameMap(dvoid *envhp, oratext *buf, size_t buflen,
-                    const oratext *srcbuf, ub4 flag);
-
-/* -------------------- OCIMultiByteToWideChar ------------------------------*/
-/*
-   NAME
-     OCIMultiByteToWideChar - Convert a null terminated multibyte string into 
-                              wchar
-   REMARKS
-     This routine converts an entire null-terminated string into the wchar 
-     format. The wchar output buffer will be null-terminated.
-   RETURNS
-     OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set of string.
-   dst (OUT)
-     Destination buffer for wchar.
-   src (IN)
-     Source string to be converted.
-   rsize (OUT)
-     Number of characters converted including null-terminator.
-     If it is a NULL pointer, no number return
-*/
-sword OCIMultiByteToWideChar(dvoid *envhp, OCIWchar *dst, CONST OraText *src,
-                             size_t *rsize);
-
-
-/* --------------------- OCIMultiByteInSizeToWideChar -----------------------*/
-/*
-   NAME
-     OCIMultiByteInSizeToWideChar - Convert a mulitbyte string in length into
-                                    wchar
-   REMARKS
-     This routine converts part of string into the wchar format. It will
-     convert as many complete characters as it can until it reaches output
-     buffer size or input buffer size or it reaches a null-terminator in
-     source string. The output buffer will be null-terminated if space permits.
-     If dstsz is zero, this function will only return number of characters not
-     including ending null terminator for converted string.
-   RETURNS
-     OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set of string.
-   dst (OUT)
-     Pointer to a destination buffer for wchar. It can be NULL pointer when
-     dstsz is zero.
-   dstsz(IN)
-     Destination buffer size in character. If it is zero, this function just
-     returns number of characters will be need for the conversion.
-   src (IN)
-     Source string to be converted.
-   srcsz(IN)
-     Length of source string in byte.
-   rsize(OUT)
-     Number of characters written into destination buffer, or number of
-     characters for converted string is dstsz is zero.
-     If it is NULL pointer, nothing to return.
-*/
-sword OCIMultiByteInSizeToWideChar(dvoid *envhp, OCIWchar *dst,
-                                  size_t dstsz, CONST OraText *src, 
-                                  size_t srcsz, size_t *rsize);
-
-
-/* ---------------------- OCIWideCharToMultiByte ----------------------------*/
-/*
-   NAME
-     OCIWideCharToMultiByte - Convert a null terminated wchar string into
-                              multibyte
-   REMARKS
-     This routine converts an entire null-terminated wide character string into
-     multi-byte string. The output buffer will be null-terminated.
-   RETURNS
-     OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set of string.
-   dst (OUT)
-     Destination buffer for multi-byte string.
-   src (IN)
-     Source wchar string to be converted.
-   rsize (OUT)
-     Number of bytes written into the destination buffer.
-     If it is NULL pointer, nothing to return.
-*/
-sword OCIWideCharToMultiByte(dvoid *envhp, OraText *dst, CONST OCIWchar *src,
-                             size_t *rsize);
-
-
-/* ---------------------- OCIWideCharInSizeToMultiByte ----------------------*/
-/*
-   NAME
-     OCIWideCharInSizeToMultiByte - Convert a wchar string in length into 
-                                    mulitbyte
-   REMARKS
-     This routine converts part of wchar string into the multi-byte format.
-     It will convert as many complete characters as it can until it reaches
-     output buffer size or input buffer size or it reaches a null-terminator
-     in source string. The output buffer will be null-terminated if space
-     permits. If dstsz is zero, the function just returns the size of byte not 
-     including ending null-terminator need to store the converted string.
-   RETURNS
-     OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set of string.
-   dst (OUT)
-     Destination buffer for multi-byte. It can be NULL pointer if dstsz is
-     zero.
-   dstsz(IN)
-     Destination buffer size in byte. If it is zero, it just returns the size
-     of bytes need for converted string.
-   src (IN)
-     Source wchar string to be converted.
-   srcsz(IN)
-     Length of source string in character.
-   rsize(OUT)
-     Number of bytes written into destination buffer, or number of bytes need
-     to store the converted string if dstsz is zero.
-     If it is NULL pointer, nothing to return.
-*/
-sword OCIWideCharInSizeToMultiByte(dvoid *envhp, OraText *dst,
-                                    size_t dstsz, CONST OCIWchar *src,
-                                    size_t srcsz, size_t *rsize);
-
-
-
-/* ----------------------- OCIWideCharIsAlnum -------------------------------*/
-/*
-   NAME
-     OCIWideCharIsAlnum - test whether wc is a letter or decimal digit
-   REMARKS
-     It tests whether wc is a letter or decimal digit.
-   RETURNS
-     TRUE or FLASE.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar for testing.
-*/
-boolean OCIWideCharIsAlnum(dvoid *envhp, OCIWchar wc);
-
-
-/* ----------------------- OCIWideCharIsAlpha -------------------------------*/
-/*
-   NAME
-     OCIWideCharIsAlpha - test whether wc is an alphabetic letter
-   REMARKS
-     It tests whether wc is an alphabetic letter
-   RETURNS
-     TRUE or FLASE.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar for testing.
-*/
-boolean OCIWideCharIsAlpha(dvoid *envhp, OCIWchar wc);
-
-
-/* --------------------- OCIWideCharIsCntrl ---------------------------------*/
-/*
-   NAME
-     OCIWideCharIsCntrl - test whether wc is a control character
-   REMARKS
-     It tests whether wc is a control character.
-   RETURNS
-     TRUE or FLASE.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar for testing.
-*/
-boolean OCIWideCharIsCntrl(dvoid *envhp, OCIWchar wc);
-
-
-/* ----------------------- OCIWideCharIsDigit -------------------------------*/
-/*
-   NAME
-     OCIWideCharIsDigit - test whether wc is a decimal digit character
-   REMARKS
-     It tests whether wc is a decimal digit character.
-   RETURNS
-     TRUE or FLASE.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar for testing.
-*/
-boolean OCIWideCharIsDigit(dvoid *envhp, OCIWchar wc);
-
-
-/* ----------------------- OCIWideCharIsGraph -------------------------------*/
-/*
-   NAME
-     OCIWideCharIsGraph - test whether wc is a graph character
-   REMARKS
-     It tests whether wc is a graph character. A graph character is character
-     with a visible representation and normally includes alphabetic letter,
-     decimal digit, and punctuation.
-   RETURNS
-     TRUE or FLASE.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar for testing.
-*/
-boolean OCIWideCharIsGraph(dvoid *envhp, OCIWchar wc);
-
-
-/* ----------------------- OCIWideCharIsLower -------------------------------*/
-/*
-   NAME
-     OCIWideCharIsLower - test whether wc is a lowercase letter
-   REMARKS
-     It tests whether wc is a lowercase letter.
-   RETURNS
-     TRUE or FLASE.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar for testing.
-*/
-boolean OCIWideCharIsLower(dvoid *envhp, OCIWchar wc);
-
-
-/* ----------------------- OCIWideCharIsPrint -------------------------------*/
-/*
-   NAME
-     OCIWideCharIsPrint - test whether wc is a printable character
-   REMARKS
-     It tests whether wc is a printable character.
-   RETURNS
-     TRUE or FLASE.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar for testing.
-*/
-boolean OCIWideCharIsPrint(dvoid *envhp, OCIWchar wc);
-
-
-/* ----------------------- OCIWideCharIsPunct -------------------------------*/
-/*
-   NAME
-     OCIWideCharIsPunct - test whether wc is a punctuation character
-   REMARKS
-     It tests whether wc is a punctuation character.
-   RETURNS
-     TRUE or FLASE.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar for testing.
-*/
-boolean OCIWideCharIsPunct(dvoid *envhp, OCIWchar wc);
-
-
-/* ----------------------- OCIWideCharIsSpace -------------------------------*/
-/*
-   NAME
-     OCIWideCharIsSpace - test whether wc is a space character
-   REMARKS
-     It tests whether wc is a space character. A space character only causes
-     white space in displayed text(for example, space, tab, carriage return,
-     newline, vertical tab or form feed).
-   RETURNS
-     TRUE or FLASE.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar for testing.
-*/
-boolean OCIWideCharIsSpace(dvoid *envhp, OCIWchar wc);
-
-
-/* ----------------------- OCIWideCharIsUpper -------------------------------*/
-/*
-   NAME
-     OCIWideCharIsUpper - test whether wc is a uppercase letter
-   REMARKS
-     It tests whether wc is a uppercase letter.
-   RETURNS
-     TRUE or FLASE.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar for testing.
-*/
-boolean OCIWideCharIsUpper(dvoid *envhp, OCIWchar wc);
-
-
-/*----------------------- OCIWideCharIsXdigit -------------------------------*/
-/*
-   NAME
-     OCIWideCharIsXdigit - test whether wc is a hexadecimal digit
-   REMARKS
-     It tests whether wc is a hexadecimal digit ( 0-9, A-F, a-f ).
-   RETURNS
-     TRUE or FLASE.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar for testing.
-*/
-boolean OCIWideCharIsXdigit(dvoid *envhp, OCIWchar wc);
-
-
-/* --------------------- OCIWideCharIsSingleByte ----------------------------*/
-/*
-   NAME
-     OCIWideCharIsSingleByte - test whether wc is a single-byte character
-   REMARKS
-     It tests whether wc is a single-byte character when converted into
-     multi-byte.
-   RETURNS
-     TRUE or FLASE.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar for testing.
-*/
-boolean OCIWideCharIsSingleByte(dvoid *envhp, OCIWchar wc);
-
-
-/* ----------------------- OCIWideCharToLower -------------------------------*/
-/*
-   NAME
-     OCIWideCharToLower - Convert a wchar into the lowercase
-   REMARKS
-     If there is a lower-case character mapping for wc in the specified locale,
-     it will return the lower-case in wchar, else return wc itself.
-   RETURNS
-     A wchar
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar for lowercase mapping.
-*/
-OCIWchar OCIWideCharToLower(dvoid *envhp, OCIWchar wc);
-
-
-/* ----------------------- OCIWideCharToUpper -------------------------------*/
-/*
-   NAME
-     OCIWideCharToUpper - Convert a wchar into the uppercase
-   REMARKS
-     If there is a upper-case character mapping for wc in the specified locale,
-     it will return the upper-case in wchar, else return wc itself.
-   RETURNS
-     A wchar
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar for uppercase mapping.
-*/
-OCIWchar OCIWideCharToUpper(dvoid *envhp, OCIWchar wc);
-
-
-/* ----------------------- OCIWideCharStrcmp --------------------------------*/
-/*
-   NAME
-     OCIWideCharStrcmp - compare two null terminated wchar string
-   REMARKS
-     It compares two wchar string in binary ( based on wchar encoding value ),
-     linguistic, or case-insensitive.
-   RETURNS
-     0, if wstr1 == wstr2.
-     Positive, if wstr1 > wstr2.
-     Negative, if wstr1 < wstr2.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set.
-   wstr1(IN)
-     Pointer to a null-terminated wchar string.
-   wstr2(IN)
-     Pointer to a null-terminated wchar string.
-   flag(IN)
-     It is used to decide the comparison method. It can be taken one of the
-     following values:
-       OCI_NLS_BINARY : for the binary comparison, this is default value.
-       OCI_NLS_LINGUISTIC : for linguistic comparison specified in the locale.
-     This flag can be ORed with OCI_NLS_CASE_INSENSITIVE for case-insensitive
-     comparison.
-*/
-int OCIWideCharStrcmp(dvoid *envhp, CONST OCIWchar *wstr1, 
-                CONST OCIWchar *wstr2, int flag);
-
-
-/* ----------------------- OCIWideCharStrncmp -------------------------------*/
-/*
-   NAME
-     OCIWideCharStrncmp - compare twe wchar string in length
-   REMARKS
-     This function is similar to OCIWideCharStrcmp(), except that at most len1
-     characters from wstr1 and len2 characters from wstr1 are compared. The
-     null-terminator will be taken into the comparison.
-   RETURNS
-     0, if wstr1 = wstr2
-     Positive, if wstr1 > wstr2
-     Negative, if wstr1 < wstr2
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wstr1(IN)
-     Pointer to the first wchar string
-   len1(IN)
-     The length for the first string for comparison
-   wstr2(IN)
-     Pointer to the second wchar string
-   len2(IN)
-     The length for the second string for comparison.
-   flag(IN)
-     It is used to decide the comparison method. It can be taken one of the
-     following values:
-       OCI_NLS_BINARY : for the binary comparison, this is default value.
-       OCI_NLS_LINGUISTIC : for linguistic comparison specified in the locale.
-     This flag can be ORed with OCI_NLS_CASE_INSENSITIVE for case-insensitive 
-     comparison.
-*/
-int OCIWideCharStrncmp(dvoid *envhp, CONST OCIWchar *wstr1, size_t len1,
-                 CONST OCIWchar *wstr2, size_t len2, int flag);
-
-
-/* ----------------------- OCIWideCharStrcat --------------------------------*/
-/*
-   NAME
-     OCIWideCharStrcat - concatenate two wchar strings
-   REMARKS
-     This function appends a copy of the wchar string pointed to by wsrcstr,
-     including the null-terminator to the end of wchar string pointed to by
-     wdststr. It returns the number of character in the result string not
-     including the ending null-terminator.
-   RETURNS
-     number of characters in the result string not including the ending
-     null-terminator.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wdststr(IN/OUT)
-     Pointer to the destination wchar string for appending.
-   wsrcstr(IN)
-     Pointer to the source wchar string to append.
-*/
-size_t OCIWideCharStrcat(dvoid *envhp, OCIWchar *wdststr,
-                         CONST OCIWchar *wsrcstr);
-
-
-/* ----------------------- OCIWideCharStrchr --------------------------------*/
-/*
-   NAME
-     OCIWideCharStrchr - Search the first occurrence of wchar in a wchar string
-   REMARKS
-     This function searchs for the first occurrence of wc in the wchar string
-     pointed to by wstr. It returns a pointer to the whcar if successful, or
-     a null pointer.
-   RETURNS
-     wchar pointer if successful, otherwise a null pointer.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wstr(IN)
-     Pointer to the wchar string to search
-   wc(IN)
-     Wchar to search for.
-*/
-OCIWchar *OCIWideCharStrchr(dvoid *envhp, CONST OCIWchar *wstr,
-                            OCIWchar wc);
-
-
-/* ----------------------- OCIWideCharStrcpy --------------------------------*/
-/*
-   NAME
-     OCIWideCharStrcpy - copy a wchar string
-   REMARKS
-     This function copies the wchar string pointed to by wsrcstr, including the
-     null-terminator, into the array pointed to by wdststr. It returns the
-     number of character copied not including the ending null-terminator.
-   RETURNS
-     number of characters copied not including the ending null-terminator.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wdststr(OUT)
-     Pointer to the destination wchar buffer.
-   wsrcstr(IN)
-     Pointer to the source wchar string.
-*/
-size_t OCIWideCharStrcpy(dvoid *envhp, OCIWchar *wdststr,
-                         CONST OCIWchar *wsrcstr);
-
-
-/* ----------------------- OCIWideCharStrlen --------------------------------*/
-/*
-   NAME
-     OCIWideCharStrlen - Return number of character in a wchar string
-   REMARKS
-     This function computes the number of characters in the wchar string
-     pointed to by wstr, not including the null-terminator, and returns
-    this number. 
-   RETURNS
-     number of characters not including ending null-terminator.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wstr(IN)
-     Pointer to the source wchar string.
-*/
-size_t OCIWideCharStrlen(dvoid *envhp, CONST OCIWchar *wstr);
-
-
-/* ----------------------- OCIWideCharStrncat -------------------------------*/
-/*
-   NAME
-     OCIWideCharStrncat - Concatenate wchar string in length
-   REMARKS
-     This function is similar to OCIWideCharStrcat(), except that at most n
-     characters from wsrcstr are appended to wdststr. Note that the
-     null-terminator in wsrcstr will stop appending. wdststr will be
-     null-terminated.. 
-   RETURNS
-     Number of characters in the result string not including the ending
-     null-terminator.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wdststr(IN/OUT)
-     Pointer to the destination wchar string for appending.
-   wsrcstr(IN)
-     Pointer to the source wchar string to append.
-   n(IN)
-     Number of characters from wsrcstr to append.
-*/
-size_t OCIWideCharStrncat(dvoid *envhp, OCIWchar *wdststr,
-                          CONST OCIWchar *wsrcstr, size_t n);
-
-
-/* ----------------------- OCIWideCharStrncpy -------------------------------*/
-/*
-   NAME
-     OCIWideCharStrncpy - Copy wchar string in length
-   REMARKS
-     This function is similar to OCIWideCharStrcpy(), except that at most n
-     characters are copied from the array pointed to by wsrcstr to the array
-     pointed to by wdststr. Note that the null-terminator in wdststr will
-     stop coping and result string will be null-terminated.
-   RETURNS
-     number of characters copied not including the ending null-terminator.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wdststr(OUT)
-     Pointer to the destination wchar buffer.
-   wsrcstr(IN)
-     Pointer to the source wchar string.
-   n(IN)
-     Number of characters from wsrcstr to copy.
-*/
-size_t OCIWideCharStrncpy(dvoid *envhp, OCIWchar *wdststr,
-                          CONST OCIWchar *wsrcstr, size_t n);
-
-
-/* ----------------------- OCIWideCharStrrchr -------------------------------*/
-/*
-   NAME
-     OCIWideCharStrrchr - search the last occurrence of a wchar in wchar string
-   REMARKS
-     This function searchs for the last occurrence of wc in the wchar string
-     pointed to by wstr. It returns a pointer to the whcar if successful, or
-     a null pointer.
-   RETURNS
-     wchar pointer if successful, otherwise a null pointer.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wstr(IN)
-     Pointer to the wchar string to search
-   wc(IN)
-     Wchar to search for.
-*/
-OCIWchar *OCIWideCharStrrchr(dvoid *envhp, CONST OCIWchar *wstr,
-                             OCIWchar wc);
-
-
-/* --------------------- OCIWideCharStrCaseConversion -----------------------*/
-/*
-   NAME
-     OCIWideCharStrCaseConversion - convert a wchar string into lowercase or
-                                    uppercase
-   REMARKS
-     This function convert the wide char string pointed to by wsrcstr into the
-     uppercase or lowercase specified by flag and copies the result into the
-     array pointed to by wdststr. The result string will be null-terminated.
-   RETURNS
-     number of characters for result string not including null-terminator.
-   envhp(IN/OUT)
-     OCI environment handle.
-   wdststr(OUT)
-     Pointer to destination array.
-   wsrcstr(IN)
-     Pointer to source string.
-   flag(IN)
-     Specify the case to convert:
-       OCI_NLS_UPPERCASE : convert to uppercase.
-       OCI_NLS_LOWERCASE: convert to lowercase.
-     This flag can be ORed with OCI_NLS_LINGUISTIC to specify that the
-     linguistic setting in the locale will be used for case conversion.
-*/
-size_t OCIWideCharStrCaseConversion(dvoid *envhp, OCIWchar *wdststr,
-                                    CONST OCIWchar *wsrcstr, ub4 flag);
-
-
-/*---------------------- OCIWideCharDisplayLength ---------------------------*/
-/*
-   NAME
-     OCIWideCharDisplayLength - Calculate the display length for a wchar
-   REMARKS
-     This function determines the number of column positions required for wc
-     in display. It returns number of column positions, or 0 if wc is 
-     null-terminator.
-   RETURNS
-     Number of display positions.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar character.
-*/
-size_t OCIWideCharDisplayLength(dvoid *envhp, OCIWchar wc );
-
-
-/*---------------------- OCIWideCharMultiByteLength -------------------------*/
-/*
-   NAME
-     OCIWideCharMultiByteLength - Determine byte size in multi-byte encoding
-   REMARKS
-     This function determines the number of byte required for wc in multi-byte
-     encoding. It returns number of bytes in multi-byte for wc.
-   RETURNS
-     Number of bytes.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar character.
-*/
-size_t OCIWideCharMultiByteLength(dvoid *envhp, OCIWchar wc);
-
-
-/* ----------------------- OCIMultiByteStrcmp -------------------------------*/
-/*
-   NAME
-     OCIMultiByteStrcmp - Compare two multi-byte strings
-   REMARKS
-     It compares two multi-byte strings in binary ( based on encoding value ),
-     linguistic, or case-insensitive.
-   RETURNS
-     0, if str1 == str2.
-     Positive, if str1 > str2.
-     Negative, if str1 < str2.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set.
-   str1(IN)
-     Pointer to a null-terminated string.
-   str2(IN)
-     Pointer to a null-terminated string.
-   flag(IN)
-     It is used to decide the comparison method. It can be taken one of the
-     following values:
-       OCI_NLS_BINARY: for the binary comparison, this is default value.
-       OCI_NLS_LINGUISTIC: for linguistic comparison specified in the locale.
-     This flag can be ORed with OCI_NLS_CASE_INSENSITIVE for case-insensitive 
-     comparison.
-*/
-int OCIMultiByteStrcmp(dvoid *envhp, CONST OraText *str1,
-                       CONST OraText *str2, int flag);
-
-
-/*----------------------- OCIMultiByteStrncmp -------------------------------*/
-/*
-   NAME
-     OCIMultiByteStrncmp - compare two strings in length
-   REMARKS
-     This function is similar to OCIMultiBytestrcmp(), except that at most
-     len1 bytes from str1 and len2 bytes from str2 are compared. The
-     null-terminator will be taken into the comparison.
-   RETURNS
-     0, if str1 = str2
-     Positive, if str1 > str2
-     Negative, if str1 < str2
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set.
-   str1(IN)
-     Pointer to the first string
-   len1(IN)
-     The length for the first string for comparison
-   str2(IN)
-     Pointer to the second string
-   len2(IN)
-     The length for the second string for comparison.
-   flag(IN)
-     It is used to decide the comparison method. It can be taken one of the
-     following values:
-       OCI_NLS_BINARY: for the binary comparison, this is default value.
-       OCI_NLS_LINGUISTIC: for linguistic comparison specified in the locale.
-     This flag can be ORed with OCI_NLS_CASE_INSENSITIVE for case-insensitive 
-     comparison.
-*/
-int OCIMultiByteStrncmp(dvoid *envhp, CONST OraText *str1, size_t len1,
-                        OraText *str2, size_t len2, int flag);
-
-
-/*----------------------- OCIMultiByteStrcat --------------------------------*/
-/*
-   NAME
-     OCIMultiByteStrcat - concatenate multibyte strings
-   REMARKS
-     This function appends a copy of the multi-byte string pointed to by
-     srcstr, including the null-terminator to the end of string pointed to by
-     dststr. It returns the number of bytes in the result string not including
-     the ending null-terminator.
-   RETURNS
-     number of bytes in the result string not including the ending
-     null-terminator.
-   envhp(IN/OUT)
-     Pointer to OCI environment handle
-   dststr(IN/OUT)
-     Pointer to the destination multi-byte string for appending.
-   srcstr(IN)
-     Pointer to the source string to append.
-*/
-size_t OCIMultiByteStrcat(dvoid *envhp, OraText *dststr,
-                          CONST OraText *srcstr);
-
-
-/*------------------------- OCIMultiByteStrcpy ------------------------------*/
-/*
-   NAME
-     OCIMultiByteStrcpy - copy multibyte string
-   REMARKS
-     This function copies the multi-byte string pointed to by srcstr,
-     including the null-terminator, into the array pointed to by dststr. It
-     returns the number of bytes copied not including the ending 
-     null-terminator.
-   RETURNS
-     number of bytes copied not including the ending null-terminator.
-   envhp(IN/OUT)
-     Pointer to the OCI environment handle.
-   srcstr(OUT)
-     Pointer to the destination buffer.
-   dststr(IN)
-     Pointer to the source multi-byte string.
-*/
-size_t OCIMultiByteStrcpy(dvoid *envhp, OraText *dststr,
-                          CONST OraText *srcstr);
-
-
-/*----------------------- OCIMultiByteStrlen --------------------------------*/
-/*
-   NAME
-     OCIMultiByteStrlen - Calculate multibyte string length
-   REMARKS
-     This function computes the number of bytes in the multi-byte string
-     pointed to by str, not including the null-terminator, and returns this
-     number. 
-   RETURNS
-     number of bytes not including ending null-terminator.
-   str(IN)
-     Pointer to the source multi-byte string.
-*/
-size_t OCIMultiByteStrlen(dvoid *envhp, CONST OraText *str);
-
-
-/*----------------------- OCIMultiByteStrncat -------------------------------*/
-/*
-   NAME
-     OCIMultiByteStrncat - concatenate string in length
-   REMARKS
-     This function is similar to OCIMultiBytestrcat(), except that at most n
-     bytes from srcstr are appended to dststr. Note that the null-terminator in
-     srcstr will stop appending and the function will append as many character
-     as possible within n bytes. dststr will be null-terminated. 
-   RETURNS
-     Number of bytes in the result string not including the ending
-     null-terminator.
-   envhp(IN/OUT)
-     Pointer to OCI environment handle.
-   srcstr(IN/OUT)
-     Pointer to the destination multi-byte string for appending.
-   dststr(IN)
-     Pointer to the source multi-byte string to append.
-   n(IN)
-     Number of bytes from srcstr to append.
-*/
-size_t OCIMultiByteStrncat(dvoid *envhp, OraText *dststr,
-                           CONST OraText *srcstr, size_t n);
-
-
-/*----------------------- OCIMultiByteStrncpy -------------------------------*/
-/*
-   NAME
-     OCIMultiByteStrncpy - copy multibyte string in length
-   REMARKS
-     This function is similar to OCIMultiBytestrcpy(), except that at most n
-     bytes are copied from the array pointed to by srcstr to the array pointed
-     to by dststr. Note that the null-terminator in srcstr will stop coping and
-     the function will copy as many character as possible within n bytes. The 
-     result string will be null-terminated.
-   RETURNS
-     number of bytes copied not including the ending null-terminator.
-   envhp(IN/OUT)
-     Pointer to a OCI environment handle.
-   dststr(IN)
-     Pointer to the source multi-byte string.
-   srcstr(OUT)
-     Pointer to the destination buffer.
-   n(IN)
-     Number of bytes from srcstr to copy.
-*/
-size_t OCIMultiByteStrncpy(dvoid *envhp, OraText *dststr,
-                           CONST OraText *srcstr, size_t n);
-
-
-/*----------------------- OCIMultiByteStrnDisplayLength ---------------------*/
-/*
-   NAME
-     OCIMultiByteStrnDisplayLength - calculate the display length for a
-                                     multibyt string
-   REMARKS
-     This function returns the number of display positions occupied by the 
-     complete characters within the range of n bytes.
-   RETURNS
-     number of display positions.
-   envhp(IN/OUT)
-     OCI environment handle.
-   str(IN)
-     Pointer to a multi-byte string.
-   n(IN)
-     Number of bytes to examine.
-*/
-size_t OCIMultiByteStrnDisplayLength(dvoid *envhp, CONST OraText *str1,
-                                     size_t n);
-
-
-/*---------------------- OCIMultiByteStrCaseConversion  ---------------------*/
-/*
-   NAME
-     OCIMultiByteStrCaseConversion
-   REMARKS
-     This function convert the multi-byte string pointed to by srcstr into the
-     uppercase or lowercase specified by flag and copies the result into the
-     array pointed to by dststr. The result string will be null-terminated.
-   RETURNS
-     number of bytes for result string not including null-terminator.
-   envhp(IN/OUT)
-     OCI environment handle.
-   dststr(OUT)
-     Pointer to destination array.
-   srcstr(IN)
-     Pointer to source string.
-   flag(IN)
-     Specify the case to convert:
-       OCI_NLS_UPPERCASE: convert to uppercase.
-       OCI_NLS_LOWERCASE: convert to lowercase.
-     This flag can be ORed with OCI_NLS_LINGUISTIC to specify that the 
-     linguistic setting in the locale will be used for case conversion.
-*/
-size_t OCIMultiByteStrCaseConversion(dvoid *envhp, OraText *dststr,
-                                     CONST OraText *srcstr, ub4 flag);
-
-
-/*------------------------- OCICharSetToUnicode -----------------------------*/
-/*
-   NAME
-     OCICharSetToUnicode - convert multibyte string into Unicode as UCS2
-   REMARKS
-     This function converts a multi-byte string pointed to by src to Unicode 
-     into the array pointed to by dst. The conversion will stop when it reach
-     to the source limitation or destination limitation. 
-     The function will return number of characters converted into Unicode.
-     If dstlen is zero, it will just return the number of characters for the
-     result without real conversion.
-   RETURNS
-     OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
-   envhp(IN/OUT)
-     Pointer to an OCI environment handle
-   dst(OUT)
-     Pointer to a destination buffer
-   dstlen(IN)
-     Size of destination buffer in character
-   src(IN)
-     Pointer to multi-byte source string.
-   srclen(IN)
-     Size of source string in bytes.
-   rsize(OUT)
-     Number of characters converted.
-     If it is a NULL pointer, nothing to return.
-*/
-sword OCICharSetToUnicode(dvoid *envhp, ub2 *dst, size_t dstlen,
-                          CONST OraText *src, size_t  srclen, size_t *rsize);
-
-
-/*------------------------- OCIUnicodeToCharSet -----------------------------*/
-/*
-   NAME
-     OCIUnicodeToCharSet - convert Unicode into multibyte
-   REMARKS
-     This function converts a Unicode string pointed to by src to multi-byte
-     into the array pointed to by dst. The conversion will stop when it reach
-     to the source limitation or destination limitation. The function will
-     return number of bytes converted into multi-byte. If dstlen is zero, it
-     will just return the number of bytes for the result without real 
-     conversion. If a Unicode character is not convertible for the character
-     set specified in OCI environment handle, a replacement character will be
-     used for it. In this case, OCICharSetConversionIsReplacementUsed() will
-     return ture.
-   RETURNS
-     OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
-   envhp(IN/OUT)
-     Pointer to an OCI environment handle.
-   dst(OUT)
-     Pointer to a destination buffer.
-   dstlen(IN)
-     Size of destination buffer in byte.
-   src(IN)
-     Pointer to a Unicode string.
-   srclen(IN)
-     Size of source string in characters.
-   rsize(OUT)
-     Number of bytes converted.
-     If it is a NULL pointer, nothing to return.
-*/
-sword OCIUnicodeToCharSet(dvoid *envhp, OraText *dst, size_t dstlen, 
-                           CONST ub2 *src, size_t srclen, size_t *rsize);
-
-/*----------------------- OCINlsCharSetConvert ------------------------------*/
-/*
-   NAME
-     OCINlsCharSetConvert - convert between any two character set.
-   REMARKS
-     This function converts a string pointed to by src in the character set
-     specified with srcid to the array pointed to by dst in the character set
-     specified with dstid. The conversion will stop when it reaches the source
-     limitation or destination limitation. The function will return the number
-     of bytes converted into the destination buffer. Even though either source
-     or destination character set id is OCI_UTF16ID, given and return data
-     length will be represented with the byte length as this function is
-     intended for generic purpose. Note the conversion will not stop at null
-     data.
-     To get character set id from name, OCINlsCharSetNameToId can be used.
-     To check if derived data in the destination buffer contains any
-     replacement character resulting from conversion failure,
-     OCICharSetConversionIsReplacementUsed can be used to get the status.
-     Data alignment should be guaranteed by a caller. For example, UTF-16 data
-     should be aligned to ub2 type.
-
-   RETURNS
-     OCI_SUCCESS or OCI_ERROR.
-   errhp(IN/OUT)
-     OCI error handle. If there is an error, it is recorded in errhp and this
-     function returns a NULL pointer. Diagnostic information can be obtained
-     by calling OCIErrorGet().
-   dstid(IN)
-     Character set id for the destination buffer.
-   dstp(OUT)
-     Pointer to the destination buffer.
-   dstlen(IN)
-     The maximum byte size of destination buffer.
-   srcid(IN)
-     Character set id for the source buffer.
-   srcp(IN)
-     Pointer to the source buffer.
-   srclen(IN)
-     The length byte size of source buffer.
-   rsize(OUT)
-     The number of characters converted. If it is a NULL pointer, nothing to
-     return.
-*/
-sword OCINlsCharSetConvert(dvoid *envhp, OCIError *errhp, 
-                        ub2 dstid, dvoid *dstp, size_t dstlen,
-                        ub2 srcid, CONST dvoid *srcp, size_t srclen,
-                        size_t *rsize);
-
-
-/* ------------------- OCICharsetConversionIsReplacementUsed ----------------*/
-/*
-   NAME
-     OCICharsetConversionIsReplacementUsed - chech if replacement is used in 
-                                             conversion
-   REMARKS
-     This function indicates whether or not the replacement character was used
-     for nonconvertible characters in character set conversion in last invoke
-     of OCICharsetUcs2ToMb().
-   RETURNS
-     TRUE is the replacement character was used in last OCICharsetUcs2ToMb()
-     invoking, else FALSE.
-   envhp(IN/OUT)
-     OCI environment handle. This should be the first handle passed to 
-     OCICharsetUcs2ToMb().
-*/
-boolean OCICharSetConversionIsReplacementUsed(dvoid *envhp);
-
-/*------------------- OCINlsEnvironmentVariableGet -----------------*/
-/*
-   NAME
-     OCINlsEnvironmentVariableGet - get a value of NLS environment variable.
-
-   DESCRIPTION
-     This function retrieves a value of NLS environment variable to the buffer
-     pointed to by val. Data type is determined by the parameter specified by
-     item. Either numeric data or string data can be retrieved.
-
-   RETURNS
-     OCI_SUCCESS or OCI_ERROR.
-
-   PARAMETERS
-   valp(OUT) -
-     Pointer to the buffer.
-   size(IN) -
-     Size of the buffer. This argument is only applicable to string data type,
-     but not to numerical data, in such case, it is ignored.
-   item(IN) -
-     NLS item value, which can be one of following values:
-       OCI_NLS_CHARSET_ID  - NLS_LANG character set id in ub2 data type.
-       OCI_NLS_NCHARSET_ID - NLS_NCHAR character set id in ub2 data type.
-   charset(IN) -
-     Character set id for retrieved string data. If it is 0, NLS_LANG will be
-     used. OCI_UTF16ID is a valid id. In case of numeric data, this argument
-     is ignored.
-   rsize(OUT) -
-     Size of return value.
-
-   NOTE
-     This functions is mainly used for retrieving character set id from either
-     NLS_LANG or NLS_NCHAR environment variables. If NLS_LANG is not set,
-     the default character set id is returned.
-     For future extension, the buffer is capable for storing other data types.
-*/
-sword OCINlsEnvironmentVariableGet(dvoid  *valp, size_t size, ub2 item,
-                                   ub2 charset, size_t *rsize);
-
-
-/*------------------------- OCIMessageOpen ----------------------------------*/
-/*
-   NAME
-     OCIMessageOpen - open a locale message file
-   REMARKS
-     This function opens a message handle for facility of product in a language
-     pointed to by envhp. It first try to open the message file corresponding
-     to envhp for the facility. If it successes, it will use that file to
-     initialize a message handle, else it will use the default message file
-     which is for American language for the facility. The function return a
-     pointer pointed to a message handle into msghp parameter.
-   RETURNS
-     OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
-   envhp(IN/OUT)
-     A pointer to OCI environment handle for message language.
-   errhp(IN/OUT)
-     The OCI error handle. If there is an error, it is record in errhp and this
-     function returns a NULL pointer. Diagnostic information can be obtained by
-     calling OCIErrorGet().
-   msghp(OUT)
-     a message handle for return
-   product(IN)
-     A pointer to a product name. Product name is used to locate the directory
-     for message in a system dependent way. For example, in Solaris, the
-     directory of message files for the product `rdbms' is
-     `${ORACLE_HOME}/rdbms'.
-   facility(IN)
-     A pointer to a facility name in the product. It is used to construct a
-     message file name. A message file name follows the conversion with 
-     facility as prefix. For example, the message file name for facility
-     `img' in American language will be `imgus.msb' where `us' is the 
-     abbreviation of American language and `msb' as message binary file 
-     extension.
-   dur(IN)
-     Duration for memory allocation for the return message handle. It can be
-     the following values:
-        OCI_DURATION_CALL
-        OCI_DURATION_STATEMENT
-        OCI_DURATION_SESSION
-        OCI_DURATION_TRANSACTION
-     For the detail description, please refer to Memory Related Service
-     Interfaces section.
-*/
-sword OCIMessageOpen(dvoid *envhp, OCIError *errhp, OCIMsg **msghp,
-                      CONST OraText *product, CONST OraText *facility, 
-                      OCIDuration dur);
- 
-
-/*------------------------- OCIMessageGet -----------------------------------*/
-/*
-   NAME
-     OCIMessageGet - get a locale message from a message handle
-   REMARKS
-     This function will get message with message number identified by msgno and
-     if buflen is not zero, the function will copy the message into the buffer
-     pointed to by msgbuf. If buflen is zero, the message will be copied into
-     a message buffer inside the message handle pointed to by msgh. For both
-     cases. it will return the pointer to the null-terminated message string.
-     If it cannot get the message required, it will return a NULL pointer.
-   RETURNS
-     A pointer to a null-terminated message string on success, otherwise a NULL
-     pointer.
-   msgh(IN/OUT)
-     Pointer to a message handle which was previously opened by
-     OCIMessageOpen().
-   msgno(IN)
-     The message number for getting message.
-   msgbuf(OUT)
-     Pointer to a destination buffer to the message retrieved. If buflen is
-     zero, it can be NULL pointer.
-   buflen(IN)
-     The size of the above destination buffer.
-*/
-OraText *OCIMessageGet(OCIMsg *msgh, ub4 msgno, OraText *msgbuf,
-                       size_t buflen);
-
-/*------------------------- OCIMessageClose ---------------------------------*/
-/*
-   NAME
-     OCIMessageClose - close a message handle
-   REMARKS
-     This function closes a message handle pointed to by msgh and frees any
-     memory associated with this handle.
-   RETURNS
-     OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
-   envhp(IN/OUT)
-     A pointer to OCI environment handle for message language.
-   errhp(IN/OUT)
-     The OCI error handle. If there is an error, it is record in errhp and this
-     function returns a NULL pointer. Diagnostic information can be obtained by
-     calling OCIErrorGet().
-   msghp(IN/OUT)
-     A pointer to a message handle which was previously opened by
-     OCIMessageOpen().
-*/
-sword OCIMessageClose(dvoid *envhp, OCIError *errhp, OCIMsg *msghp);
-
-/*--------------- End of Extensions to NLS cartridge service ----------------*/
-
-
-/*----------------- Extensions to OCI Thread interface ---------------------*/
-/*****************************************************************************
-                              DESCRIPTION
-******************************************************************************
-1 Threads Interface
-
-The OCIThread package provides a number of commonly used threading
-primitives for use by Oracle customers.  It offers a portable interface to
-threading capabilities native to various platforms.  It does not implement
-threading on platforms which do not have native threading capability.
-
-OCIThread does not provide a portable implementation of multithreaded 
-facilities.  It only serves as a set of portable covers for native 
-multithreaded facilities.  Therefore, platforms that do not have native 
-support for multi-threading will only be able to support a limited 
-implementation of OCIThread.  As a result, products that rely on all of 
-OCIThread's functionality will not port to all platforms.  Products that must 
-port to all platforms must use only a subset of OCIThread's functionality.  
-This issue is discussed further in later sections of this document.
-
-The OCIThread API is split into four main parts.  Each part is described
-briefly here.  The following subsections describe each in greater detail.
-
- 1. Initialization and Termination Calls
-
-     These calls deal with the initialization and termination of OCIThread.
-     Initialization of OCIThread initializes the OCIThread context which is
-     a member of the OCI environment or session handle.  This context is 
-     required for other OCIThread calls.
-
- 2. Passive Threading Primitives
-
-     The passive threading primitives include primitives to manipulate mutual
-     exclusion (mutex) locks, thread ID's, and thread-specific data keys.
-
-     The reason that these primitives are described as 'passive' is that while
-     their specifications allow for the existence of multiple threads, they do
-     not require it.  This means that it is possible for these primitives to
-     be implemented according to specification in both single-threaded and
-     multi-threaded environments.
-
-     As a result, OCIThread clients that use only these primitives will not
-     require the existence of multiple threads in order to work correctly,
-     i.e., they will be able to work in single-threaded environments without 
-     branching code.
-
- 3. Active Threading Primitives
-
-     Active threading primitives include primitives dealing with the creation,
-     termination, and other manipulation of threads.
-
-     The reason that these primitives are described as 'active' is that they
-     can only be used in true multi-threaded environments.  Their
-     specifications explicitly require that it be possible to have multiple
-     threads.  If you need to determine at runtime whether or not you are in a
-     multi-threaded environment, call OCIThreadIsMulti() before calling an
-     OCIThread active primitive.
-
-
-1.1 Initialization & Termination
-==================================
-
-The types and functions described in this section are associated with the
-initialization and termination of the OCIThread package.  OCIThread must
-be properly initialized before any of its functionality can be used.
-OCIThread's process initialization function, 'OCIThreadProcessInit()',
-must be called with care; see below.
-
-The observed behavior of the initialization and termination functions is the
-same regardless of whether OCIThread is in single-threaded or multi-threaded
-environment.  It is OK to call the initialization functions from both generic
-and operating system specific (OSD) code.
-
-1.1.1 Types
-
-  OCIThreadContext - OCIThread Context
-  -------------------------------------
-
-    Most calls to OCIThread functions take the OCI environment or session 
-    handle as a parameter.  The OCIThread context is part of the OCI 
-    environment or session handle and it must be initialized by calling 
-    'OCIThreadInit()'.  Termination of the OCIThread context occurs by calling
-    'OCIThreadTerm()'.
-
-    The OCIThread context is a private data structure.  Clients must NEVER
-    attempt to examine the contents of the context.
-
-1.1.2  OCIThreadProcessInit
-
-  OCIThreadProcessInit - OCIThread Process INITialization
-  --------------------------------------------------------
-
-    Description
-
-      This function should be called to perform OCIThread process
-      initialization.
-
-    Prototype
-
-      void OCIThreadProcessInit();
-
-    Returns
-
-      Nothing.
-
-    Notes
-
-      Whether or not this function needs to be called depends on how OCI
-      Thread is going to be used.
-
-        * In a single-threaded application, calling this function is optional.
-          If it is called at all, the first call to it must occur before calls
-          to any other OCIThread functions.  Subsequent calls can be made
-          without restriction; they will not have any effect.
-
-        * In a multi-threaded application, this function MUST be called.  The
-          first call to it MUST occur 'strictly before' any other OCIThread
-          calls; i.e., no other calls to OCIThread functions (including other
-          calls to this one) can be concurrent with the first call.
-          Subsequent calls to this function can be made without restriction;
-          they will not have any effect.
-
-
-1.1.3 OCIThreadInit
-
-  OCIThreadInit - OCIThread INITialize
-  -------------------------------------
-
-    Description
-
-      This initializes OCIThread context.
-
-    Prototype
-
-      sword OCIThreadInit(dvoid *hndl, OCIError *err);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      It is illegal for OCIThread clients to try an examine the memory
-      pointed to by the returned pointer.
-
-      It is safe to make concurrent calls to 'OCIThreadInit()'.  Unlike
-      'OCIThreadProcessInit()',  there is no need to have a first call
-      that occurs before all the others.
-
-      The first time 'OCIThreadInit()' is called, it initilaizes the OCI
-      Thread context.  It also saves a pointer to the context in some system
-      dependent manner.  Subsequent calls to 'OCIThreadInit()' will return
-      the same context.
-
-      Each call to 'OCIThreadInit()' must eventually be matched by a call to
-      'OCIThreadTerm()'.
-
-  OCIThreadTerm - OCIThread TERMinate
-  ------------------------------------
-
-    Description
-
-      This should be called to release the OCIThread context.  It should be
-      called exactly once for each call made to 'OCIThreadInit()'.
-
-    Prototype
-
-      sword OCIThreadTerm(dvoid *hndl, OCIError *err);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      It is safe to make concurrent calls to 'OCIThreadTerm()'.
-
-      'OCIThreadTerm()' will not do anything until it has been called as
-      many times as 'OCIThreadInit()' has been called.  When that happens,
-      it terminates the OCIThread layer and frees the memory allocated for
-      the context.  Once this happens, the context should not be re-used.
-      It will be necessary to obtain a new one by calling 'OCIThreadInit()'.
-
-
-  OCIThreadIsMulti - OCIThread Is Multi-Threaded?
-  ------------------------------------------------
-
-    Description
-
-      This tells the caller whether the application is running in a
-      multi-threaded environment or a single-threaded environment.
-
-    Prototype
-      boolean OCIThreadIsMulti(void);
-
-    Returns
-
-      TRUE if the environment is multi-threaded;
-      FALSE if the environment is single-threaded.
-
-
-1.2 Passive Threading Primitives
-==================================
-
-1.2.1 Types
-
-The passive threading primitives deal with the manipulation of mutex, 
-thread ID's, and thread-specific data.  Since the specifications of these 
-primitives do not require the existence of multiple threads, they can be 
-used both on multithreaded and single-threaded platforms.
-
-1.2.1.1  OCIThreadMutex - OCIThread Mutual Exclusion Lock
------------------------------------------------------------
-
-  The type 'OCIThreadMutex' is used to represent a mutual exclusion lock
-  (mutex).  A mutex is typically used for one of two purposes: (i) to
-  ensure that only one thread accesses a given set of data at a time, or
-  (ii) to ensure that only one thread executes a given critical section of
-  code at a time.
-
-  Mutexes pointer can be declared as parts of client structures or as 
-  stand-alone variables.  Before they can be used, they must be initialized 
-  using 'OCIThreadMutexInit()'.  Once they are no longer needed, they must be
-  destroyed using 'OCIThreadMutexDestroy()'.  A mutex pointer must NOT be 
-  used after it is destroyed.
-
-  A thread can acquire a mutex by using either 'OCIThreadMutexAcquire()' or
-  'OCIThreadMutexTry()'.  They both ensure that only one thread at a time is
-  allowed to hold a given mutex.  A thread that holds a mutex can release it
-  by calling 'OCIThreadMutexRelease()'.
-
-
-1.2.1.2  OCIThreadKey - OCIThread Key for Thread-Specific Data
-----------------------------------------------------------------
-
-  A key can be thought of as a process-wide variable that has a
-  thread-specific value.  What this means is that all the threads in a
-  process can use any given key.  However, each thread can examine or modify
-  that key independently of the other threads.  The value that a thread sees
-  when it examines the key will always be the same as the value that it last
-  set for the key.  It will not see any values set for the key by the other
-  threads.
-
-  The type of the value held by a key is a 'dvoid *' generic pointer.
-
-  Keys can be created using 'OCIThreadKeyInit()'.  When a key is created, its
-  value is initialized to 'NULL' for all threads.
-
-  A thread can set a key's value using 'OCIThreadKeySet()'.  A thread can
-  get a key's value using 'OCIThreadKeyGet()'.
-
-  The OCIThread key functions will save and retrieve data SPECIFIC TO THE
-  THREAD.  When clients maintain a pool of threads and assign the threads to
-  different tasks, it *may not* be appropriate for a task to use OCIThread
-  key functions to save data associated with it.  Here is a scenario of how
-  things can fail: A thread is assigned to execute the initialization of a
-  task.  During the initialization, the task stored some data related to it
-  in the thread using OCIThread key functions.  After the initialization,
-  the thread is returned back to the threads pool.  Later, the threads pool
-  manager assigned another thread to perform some operations on the task,
-  and the task needs to retrieve those data it stored earlier in
-  initialization.  Since the task is running in another thread, it will not
-  be able to retrieve the same data back!  Applications that use thread
-  pools should be aware of this and be cautious when using OCIThread key
-  functions.
-
-
-1.2.1.3  OCIThreadKeyDestFunc - OCIThread Key Destructor Function Type
-------------------------------------------------------------------------
-
-  This is the type of a pointer to a key's destructor routine.  Keys can be
-  associated with a destructor routine when they are created (see
-  'OCIThreadKeyInit()').
-
-  A key's destructor routine will be called whenever a thread that has a
-  non-NULL value for the key terminates.
-
-  The destructor routine returns nothing and takes one parameter.  The
-  parameter will be the value that was set for key when the thread
-  terminated.
-
-  The destructor routine is guaranteed to be called on a thread's value
-  in the key after the termination of the thread and before process
-  termination.  No more precise guarantee can be made about the timing
-  of the destructor routine call; thus no code in the process may assume
-  any post-condition of the destructor routine.  In particular, the
-  destructor is not guaranteed to execute before a join call on the
-  terminated thread returns.
-
-
-1.2.1.4  OCIThreadId - OCIThread Thread ID
---------------------------------------------
-
-  Type 'OCIThreadId' is the type that will be used to identify a thread.
-  At any given time, no two threads will ever have the same 'OCIThreadId'.
-  However, 'OCIThreadId' values can be recycled; i.e., once a thread dies,
-  a new thread may be created that has the same 'OCIThreadId' as the one
-  that died.  In particular, the thread ID must uniquely identify a thread
-  T within a process, and it must be consistent and valid in all threads U
-  of the process for which it can be guaranteed that T is running
-  concurrently with U.  The thread ID for a thread T must be retrievable
-  within thread T.  This will be done via OCIThreadIdGet().
-
-  The 'OCIThreadId' type supports the concept of a NULL thread ID: the NULL
-  thread ID will never be the same as the ID of an actual thread.
-
-
-
-1.2.2 Function prototypes for passive primitives
---------------------------------------------------
-
-1.2.2.1 Mutex functions
--------------------------
-
-  OCIThreadMutexInit - OCIThread MuteX Initialize
-  -----------------------------------------------
-
-    Description
-
-      This allocate and initializes a mutex.  All mutexes must be 
-      initialized prior to use.
-
-    Prototype
-
-      sword OCIThreadMutexInit(dvoid *hndl, OCIError *err, 
-                               OCIThreadMutex **mutex);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        mutex(OUT):  The mutex to initialize.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      Multiple threads must not initialize the same mutex simultaneously.
-      Also, a mutex must not be reinitialized until it has been destroyed (see
-      'OCIThreadMutexDestroy()').
-
-  OCIThreadMutexDestroy - OCIThread MuteX Destroy
-  -----------------------------------------------
-
-    Description
-
-      This destroys and deallocate a mutex.  Each mutex must be destroyed 
-      once it is no longer needed.
-
-    Prototype
-
-      sword OCIThreadMutexDestroy(dvoid *hndl, OCIError *err,
-                                  OCIThreadMutex **mutex);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        mutex(IN/OUT):   The mutex to destroy.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      It is not legal to destroy a mutex that is uninitialized or is currently
-      held by a thread.  The destruction of a mutex must not occur concurrently
-      with any other operations on the mutex.  A mutex must not be used after
-      it has been destroyed.
-
-
-  OCIThreadMutexAcquire - OCIThread MuteX Acquire
-  -----------------------------------------------
-
-    Description
-
-      This acquires a mutex for the thread in which it is called.  If the mutex
-      is held by another thread, the calling thread is blocked until it can
-      acquire the mutex.
-
-    Prototype
-
-     sword OCIThreadMutexAcquire(dvoid *hndl, OCIError *err,
-                                 OCIThreadMutex *mutex);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error, it is 
-                     recorded in err and this function returns OCI_ERROR.  
-                     Diagnostic information can be obtained by calling 
-                     OCIErrorGet().
-
-        mutex(IN/OUT):   The mutex to acquire.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      It is illegal to attempt to acquire an uninitialized mutex.
-
-      This function's behavior is undefined if it is used by a thread to
-      acquire a mutex that is already held by that thread.
-
-
-
-  OCIThreadMutexRelease - OCIThread MuteX Release
-  -----------------------------------------------
-
-    Description
-
-      This releases a mutex.  If there are any threads blocked on the mutex,
-      one of them will acquire it and become unblocked.
-
-    Prototype
-
-      sword OCIThreadMutexRelease(dvoid *hndl, OCIError *err,
-                                  OCIThreadMutex *mutex);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        mutex(IN/OUT):   The mutex to release.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      It is illegal to attempt to release an uninitialized mutex.  It is also
-      illegal for a thread to release a mutex that it does not hold.
-
-
-  OCIThreadKeyInit - OCIThread KeY Initialize
-  -------------------------------------------
-
-    Description
-
-      This creates a key.  Each call to this routine allocate and generates 
-      a new key that is distinct from all other keys.
-
-    Prototype
-
-      sword OCIThreadKeyInit(dvoid *hndl, OCIError *err, OCIThreadKey **key,
-                             OCIThreadKeyDestFunc destFn);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        key(OUT):    The 'OCIThreadKey' in which to create the new key.
-
-        destFn(IN):  The destructor for the key.  NULL is permitted.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      Once this function executes successfully, a pointer to an allocated and 
-      initialized key is return.  That key can be used with 'OCIThreadKeyGet()'
-      and 'OCIThreadKeySet()'.  The initial value of the key will be 'NULL' for
-      all threads.
-
-      It is illegal for this function to be called more than once to create the
-      same key (i.e., to be called more than once with the same value for the
-      'key' parameter).
-
-      If the 'destFn' parameter is not NULL, the routine pointed to by 'destFn'
-      will be called whenever a thread that has a non-NULL value for the key
-      terminates.  The routine will be called with one parameter.  The
-      parameter will be the key's value for the thread at the time at which the
-      thread terminated.
-      If the key does not need a destructor function, pass NULL for 'destFn'.
-
-
-  OCIThreadKeyDestroy - OCIThread KeY DESTROY
-  -------------------------------------------
-
-   Description
-
-     Destroy and deallocate the key pointed to by 'key'.
-
-    Prototype
-
-      sword OCIThreadKeyDestroy(dvoid *hndl, OCIError *err, 
-                                OCIThreadKey **key);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        key(IN/OUT):  The 'OCIThreadKey' in which to destroy the key.
- 
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      This is different from the destructor function callback passed to the
-      key create routine.  This new destroy function 'OCIThreadKeyDestroy' is 
-      used to terminate any resources OCI THREAD acquired when it created 
-      'key'.  [The 'OCIThreadKeyDestFunc' callback type is a key VALUE 
-      destructor; it does in no way operate on the key itself.]
-
-      This must be called once the user has finished using the key.  Not
-      calling the key destroy function may result in memory leaks.
-
-
-
-
-1.2.2.2 Thread Key operations
--------------------------------
-
-  OCIThreadKeyGet - OCIThread KeY Get value
-  -----------------------------------------
-
-    Description
-
-      This gets the calling thread's current value for a key.
-
-    Prototype
-
-      sword OCIThreadKeyGet(dvoid *hndl, OCIError *err, OCIThreadKey *key,
-                            dvoid **pValue);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        key(IN):          The key.
-
-        pValue(IN/OUT):   The location in which to place the thread-specific
-                          key value.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      It is illegal to use this function on a key that has not been created
-      using 'OCIThreadKeyInit()'.
-
-      If the calling thread has not yet assigned a value to the key, 'NULL' is
-      placed in the location pointed to by 'pValue'.
-
-
-  OCIThreadKeySet - OCIThread KeY Set value
-  -----------------------------------------
-
-    Description
-
-      This sets the calling thread's value for a key.
-
-    Prototype
-
-      sword OCIThreadKeySet(dvoid *hndl, OCIError *err, OCIThreadKey *key,
-                            dvoid *value);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        key(IN/OUT): The key.
-
-        value(IN):   The thread-specific value to set in the key.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      It is illegal to use this function on a key that has not been created
-      using 'OCIThreadKeyInit()'.
-
-1.2.2.3  Thread Id
---------------------
-
-  OCIThreadIdInit - OCIThread Thread Id INITialize
-  --------------------------------------------------
-
-    Description
-
-      Allocate and initialize the thread id 'tid'.
-
-    Prototype
-
-      sword OCIThreadIdInit(dvoid *hndl, OCIError *err, OCIThreadId **tid);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        tid (OUT):   Pointer to the thread ID to initialize.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-
-  OCIThreadIdDestroy - OCIThread Thread Id DESTROY
-  --------------------------------------------------
-
-    Description
-
-      Destroy and deallocate the thread id 'tid'.
-
-    Prototype
-
-      sword OCIThreadIdDestroy(dvoid *hndl, OCIError *err, OCIThreadId **tid);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        tid(IN/OUT):        Pointer to the thread ID to destroy.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Note
-
-      'tid' should be initialized by OCIThreadIdInit().
-
-
-  OCIThreadIdSet - OCIThread Thread Id Set
-  -----------------------------------------
-
-    Description
-
-      This sets one 'OCIThreadId' to another.
-
-    Prototype
-
-      sword OCIThreadIdSet(dvoid *hndl, OCIError *err, 
-                           OCIThreadId *tidDest,
-                           OCIThreadId *tidSrc);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        tidDest(OUT):   This should point to the location of the 'OCIThreadId'
-                        to be set to.
-
-        tidSrc(IN):     This should point to the 'OCIThreadId' to set from.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      'tid' should be initialized by OCIThreadIdInit().
-
-
-  OCIThreadIdSetNull - OCIThread Thread Id Set Null
-  ---------------------------------------------------------
-
-    Description
-
-      This sets the NULL thread ID to a given 'OCIThreadId'.
-
-    Prototype
-
-      sword OCIThreadIdSetNull(dvoid *hndl, OCIError *err,
-                               OCIThreadId *tid);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error, it is 
-                     recorded in err and this function returns OCI_ERROR.  
-                     Diagnostic information can be obtained by calling 
-                     OCIErrorGet().
-
-        tid(OUT):    This should point to the 'OCIThreadId' in which to put
-                     the NULL thread ID.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      'tid' should be initialized by OCIThreadIdInit().
-
-
-  OCIThreadIdGet - OCIThread Thread Id Get
-  ------------------------------------------
-
-    Description
-
-      This retrieves the 'OCIThreadId' of the thread in which it is called.
-
-    Prototype
-
-      sword OCIThreadIdGet(dvoid *hndl, OCIError *err,
-                           OCIThreadId *tid);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        tid(OUT):    This should point to the location in which to place the
-                     ID of the calling thread.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      'tid' should be initialized by OCIThreadIdInit().
-
-      When OCIThread is used in a single-threaded environment,
-      OCIThreadIdGet() will always place the same value in the location
-      pointed to by 'tid'.  The exact value itself is not important.  The
-      important thing is that it is not the same as the NULL thread ID and
-      that it is always the same value.
-
-
-  OCIThreadIdSame - OCIThread Thread Ids Same?
-  ----------------------------------------------
-
-    Description
-
-      This determines whether or not two 'OCIThreadId's represent the same
-      thread.
-
-    Prototype
-
-      sword OCIThreadIdSame(dvoid *hndl, OCIError *err,
-                            OCIThreadId *tid1, OCIThreadId *tid2,
-                            boolean *result);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        tid1(IN):   Pointer to the first 'OCIThreadId'.
-
-        tid2(IN):   Pointer to the second 'OCIThreadId'.
-        
-        result(IN/OUT): Pointer to the result.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      If 'tid1' and 'tid2' represent the same thread, 'result' is set to TRUE.
-      Otherwise, 'result' is set to FALSE.
-
-      'result' is set to TRUE if both 'tid1' and 'tid2' are the NULL thread ID.
-
-      'ti1d' and 'tid2' should be initialized by OCIThreadIdInit().
-
-
-  OCIThreadIdNull - OCIThread Thread Id NULL?
-  ---------------------------------------------
-
-    Description
-
-      This determines whether or not a given 'OCIThreadId' is the NULL thread
-      ID.
-
-    Prototype
-
-      sword OCIThreadIdNull(dvoid *hndl, OCIError *err,
-                            OCIThreadId *tid,
-                            boolean *result);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        tid(IN):    Pointer to the 'OCIThreadId' to check.
-
-        result(IN/OUT): Pointer to the result.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      If 'tid' is the NULL thread ID, 'result' is set to TRUE.  Otherwise, 
-      'result' is set to FALSE.
-
-      'tid' should be initialized by OCIThreadIdInit().
-
-
-1.3 Active Threading Primitives
-=================================
-
-The active threading primitives deal with the manipulation of actual
-threads.  Because the specifications of most of these primitives require
-that it be possible to have multiple threads, they work correctly only in
-the enabled OCIThread; In the disabled OCIThread, they always return
-failure.  The exception is OCIThreadHandleGet(); it may be called in a 
-single-threaded environment, in which case it will have no effect.
-
-Active primitives should only be called by code running in a multi-threaded
-environment.  You can call OCIThreadIsMulti() to determine whether the 
-environment is multi-threaded or single-threaded.
-
-
-1.3.1  Types
---------------
-
-1.3.1.1    OCIThreadHandle - OCIThread Thread Handle
-------------------------------------------------------
-
-  Type 'OCIThreadHandle' is used to manipulate a thread in the active
-  primitives:  OCIThreadJoin()and OCIThreadClose().  A thread handle opened by
-  OCIThreadCreate() must be closed in a matching call to
-  OCIThreadClose().  A thread handle is invalid after the call to
-  OCIThreadClose().
-
-  The distinction between a thread ID and a thread handle in OCIThread usage
-  follows the distinction between the thread ID and the thread handle on
-  Windows NT.  On many platforms, the underlying native types are the same.
-
-
-1.3.2  Functions
-------------------
-
-  OCIThreadHndInit - OCIThread HaNDle Initialize
-  ----------------------------------------------
-
-    Description
-
-      Allocate and initialize the thread handle.
-
-    Prototype
-
-      sword OCIThreadHndInit(dvoid *hndl, OCIError *err, 
-                             OCIThreadHandle **thnd);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        thnd(OUT):   The address of pointer to the thread handle to initialize.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-
-  OCIThreadHndDestroy - OCIThread HaNDle Destroy
-  ----------------------------------------------
-
-    Description
-
-      Destroy and deallocate the thread handle.
-
-    Prototype
-
-      sword OCIThreadHndDestroy(dvoid *hndl, OCIError *err, 
-                                OCIThreadHandle **thnd);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        thnd(IN/OUT):  The address of pointer to the thread handle to destroy.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      'thnd' should be initialized by OCIThreadHndInit().
-
-
-  OCIThreadCreate - OCIThread Thread Create
-  -----------------------------------------
-
-    Description
-
-      This creates a new thread.
-
-    Prototype
-
-      sword OCIThreadCreate(dvoid *hndl, OCIError *err,
-                            void (*start)(dvoid *), dvoid *arg,
-                            OCIThreadId *tid, OCIThreadHandle *tHnd);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        start(IN):    The function in which the new thread should begin
-                      execution.
-
-        arg(IN):      The argument to give the function pointed to by 'start'.
-
-        tid(IN/OUT):  If not NULL, gets the ID for the new thread.
-
-        tHnd(IN/OUT): If not NULL, gets the handle for the new thread.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      The new thread will start by executing a call to the function pointed
-      to by 'start' with the argument given by 'arg'.  When that function
-      returns, the new thread will terminate.  The function should not
-      return a value and should accept one parameter, a 'dvoid *'.
-
-      The call to OCIThreadCreate() must be matched by a call to
-      OCIThreadClose() if and only if tHnd is non-NULL.
-
-      If tHnd is NULL, a thread ID placed in *tid will not be valid in the
-      calling thread because the timing of the spawned thread's termination
-      is unknown.
-
-      'tid' should be initialized by OCIThreadIdInit().
-
-      'thnd' should be initialized by OCIThreadHndInit().
-
-
-
-  OCIThreadJoin - OCIThread Thread Join
-  -------------------------------------
-
-    Description
-
-      This function allows the calling thread to 'join' with another thread.
-      It blocks the caller until the specified thread terminates.
-
-    Prototype
-
-      sword OCIThreadJoin(dvoid *hndl, OCIError *err, OCIThreadHandle *tHnd);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        tHnd(IN):    The 'OCIThreadHandle' of the thread to join with.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      'thnd' should be initialized by OCIThreadHndInit().
-
-      The result of multiple threads all trying to join with the same thread is
-      undefined.
-
-
-  OCIThreadClose - OCIThread Thread Close
-  ---------------------------------------
-
-   Description
-
-     This function should be called to close a thread handle.
-
-   Prototype
-
-     sword OCIThreadClose(dvoid *hndl, OCIError *err, OCIThreadHandle *tHnd);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        tHnd(IN/OUT):    The OCIThread thread handle to close.
-
-   Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-   Notes
-
-      'thnd' should be initialized by OCIThreadHndInit().
-
-      Both thread handle and the thread ID that was returned by the same call
-      to OCIThreadCreate() are invalid after the call to OCIThreadClose().
-
-
-
-  OCIThreadHandleGet - OCIThread Thread Get Handle
-  ------------------------------------------------
-
-    Description
-
-      Retrieve the 'OCIThreadHandle' of the thread in which it is called.
-
-    Prototype
-
-      sword OCIThreadHandleGet(dvoid *hndl, OCIError *err,
-                               OCIThreadHandle *tHnd);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        tHnd(IN/OUT):      If not NULL, the location to place the thread
-                           handle for the thread.
-
-     Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      'thnd' should be initialized by OCIThreadHndInit().   
-
-      The thread handle 'tHnd' retrieved by this function must be closed 
-      with OCIThreadClose() and destroyed by OCIThreadHndDestroy() after it
-      is used.
-
-
-
-
-1.4 Using OCIThread
-=====================
-
-This section summarizes some of the more important details relating to the use
-of OCIThread.
-
-  * Process initialization
-
-    OCIThread only requires that the process initialization function
-    ('OCIThreadProcessInit()') be called when OCIThread is being used in a
-    multi-threaded application.  Failing to call 'OCIThreadProcessInit()' in
-    a single-threaded application is not an error.
-
-  * OCIThread initialization
-
-    Separate calls to 'OCIThreadInit()' will all return the same OCIThread
-    context.
-
-    Also, remember that each call to 'OCIThreadInit()' must eventually be
-    matched by a call to 'OCIThreadTerm()'.
-
-  * Active vs. Passive Threading primitives
-
-    OCIThread client code written without using any active primitives can be
-    compiled and used without change on both single-threaded and
-    multi-threaded platforms.
-
-    OCIThread client code written using active primitives will only work
-    correctly on multi-threaded platforms.  In order to write a version of the
-    same application to run on single-threaded platform, it is necessary to 
-    branch the your code, whether by branching versions of the source file or 
-    by branching at runtime with the OCIThreadIsMulti() call.
-
-******************************************************************************/
-
-/*****************************************************************************
-                         ACTUAL PROTOTYPE DECLARATIONS
-******************************************************************************/
-
-void OCIThreadProcessInit();
-
-sword OCIThreadInit(dvoid *hndl, OCIError *err);
-
-sword OCIThreadTerm(dvoid *hndl, OCIError *err);
-
-boolean OCIThreadIsMulti();
-
-sword OCIThreadMutexInit(dvoid *hndl, OCIError *err,  
-                         OCIThreadMutex **mutex); 
-
-sword OCIThreadMutexDestroy(dvoid *hndl, OCIError *err, 
-                            OCIThreadMutex **mutex);
-
-sword OCIThreadMutexAcquire(dvoid *hndl, OCIError *err,
-                            OCIThreadMutex *mutex);
-
-sword OCIThreadMutexRelease(dvoid *hndl, OCIError *err,
-                            OCIThreadMutex *mutex);
-
-sword OCIThreadKeyInit(dvoid *hndl, OCIError *err, OCIThreadKey **key,
-                       OCIThreadKeyDestFunc destFn);
-
-sword OCIThreadKeyDestroy(dvoid *hndl, OCIError *err, 
-                          OCIThreadKey **key);
-
-sword OCIThreadKeyGet(dvoid *hndl, OCIError *err, OCIThreadKey *key,
-                      dvoid **pValue);
-
-sword OCIThreadKeySet(dvoid *hndl, OCIError *err, OCIThreadKey *key,
-                      dvoid *value);
-
-sword OCIThreadIdInit(dvoid *hndl, OCIError *err, OCIThreadId **tid);
-
-sword OCIThreadIdDestroy(dvoid *hndl, OCIError *err, OCIThreadId **tid);
-
-sword OCIThreadIdSet(dvoid *hndl, OCIError *err, 
-                     OCIThreadId *tidDest, OCIThreadId *tidSrc);
-
-sword OCIThreadIdSetNull(dvoid *hndl, OCIError *err, OCIThreadId *tid);
-
-sword OCIThreadIdGet(dvoid *hndl, OCIError *err, OCIThreadId *tid);
-
-sword OCIThreadIdSame(dvoid *hndl, OCIError *err,
-                      OCIThreadId *tid1, OCIThreadId *tid2,
-                      boolean *result);
-
-sword OCIThreadIdNull(dvoid *hndl, OCIError *err,
-                      OCIThreadId *tid, boolean *result);
-
-sword OCIThreadHndInit(dvoid *hndl, OCIError *err, OCIThreadHandle **thnd);
-
-sword OCIThreadHndDestroy(dvoid *hndl, OCIError *err, OCIThreadHandle **thnd);
-
-sword OCIThreadCreate(dvoid *hndl, OCIError *err,
-                      void (*start)(dvoid *), dvoid *arg,
-                      OCIThreadId *tid, OCIThreadHandle *tHnd);
-
-sword OCIThreadJoin(dvoid *hndl, OCIError *err, OCIThreadHandle *tHnd);
-
-sword OCIThreadClose(dvoid *hndl, OCIError *err, OCIThreadHandle *tHnd);
-
-sword OCIThreadHandleGet(dvoid *hndl, OCIError *err, OCIThreadHandle *tHnd);
-/*----------------- End OCI Thread interface Extensions ---------------------*/
-
-/*------------------ Begin OCI Row Callback Interfaces ----------------------*/
-
-typedef sword (*OCIBindRowCallback)(dvoid *ctx);
-typedef sword (*OCIFetchRowCallback)(dvoid *ctx);
-
-/*------------------ Begin OCI Row Callback Interfaces ----------------------*/
-
-/*--------------- Begin OCI Client Notification Interfaces ------------------*/
-
-typedef ub4 (*OCISubscriptionNotify)(dvoid *ctx, OCISubscription *subscrhp, 
-                                     dvoid *pay, ub4 payl, 
-                                     dvoid *desc, ub4 mode);
-
-sword OCISubscriptionRegister(OCISvcCtx *svchp, OCISubscription **subscrhpp, 
-                              ub2 count, OCIError *errhp, ub4 mode);
-
-
-sword OCISubscriptionPost(OCISvcCtx *svchp, OCISubscription **subscrhpp, 
-                              ub2 count, OCIError *errhp, ub4 mode);
-
-sword OCISubscriptionUnRegister(OCISvcCtx *svchp, OCISubscription *subscrhp, 
-                              OCIError *errhp, ub4 mode);
-
-sword OCISubscriptionDisable(OCISubscription *subscrhp, 
-                           OCIError *errhp, ub4 mode);
-
-sword OCISubscriptionEnable(OCISubscription *subscrhp, 
-                          OCIError *errhp, ub4 mode);
-
-/*------------------- End OCI Publish/Subscribe Interfaces ------------------*/
-
-/*----------------- Extensions to Datetime interfaces -----------------------*/
-/*--------------------- Actual Prototypes -----------------------------------*/
-sword OCIDateTimeGetTime(dvoid *hndl, OCIError *err, OCIDateTime *datetime, 
-                         ub1 *hr, ub1 *mm, ub1 *ss, ub4 *fsec);
-
-sword OCIDateTimeGetDate(dvoid *hndl, OCIError *err,  CONST OCIDateTime *date, 
-                 sb2 *yr, ub1 *mnth, ub1 *dy );
-
-sword OCIDateTimeGetTimeZoneOffset(dvoid *hndl,OCIError *err,
-                                   CONST OCIDateTime *datetime,
-                                   sb1 *hr,sb1 *mm);
-
-sword OCIDateTimeConstruct(dvoid  *hndl,OCIError *err,OCIDateTime *datetime,
-               sb2 yr,ub1 mnth,ub1 dy,ub1 hr,ub1 mm,ub1 ss,ub4 fsec,
-               OraText  *timezone,size_t timezone_length);
-
-sword OCIDateTimeSysTimeStamp(dvoid *hndl, OCIError *err, 
-                              OCIDateTime *sys_date );
-
-sword OCIDateTimeAssign(dvoid *hndl, OCIError *err, CONST OCIDateTime *from, 
-                       OCIDateTime *to);
-
-sword OCIDateTimeToText(dvoid *hndl, OCIError *err, CONST OCIDateTime *date, 
-                        CONST OraText *fmt, ub1 fmt_length, ub1 fsprec, 
-                        CONST OraText *lang_name, size_t lang_length, 
-                        ub4 *buf_size, OraText *buf );
-
-sword OCIDateTimeFromText(dvoid *hndl, OCIError *err, CONST OraText *date_str, 
-             size_t dstr_length, CONST OraText *fmt, ub1 fmt_length,
-             CONST OraText *lang_name, size_t lang_length, OCIDateTime *date );
-
-sword OCIDateTimeCompare(dvoid *hndl, OCIError *err, CONST OCIDateTime *date1, 
-                     CONST OCIDateTime *date2,  sword *result );
-
-sword OCIDateTimeCheck(dvoid *hndl, OCIError *err, CONST OCIDateTime *date, 
-                 ub4 *valid );
-
-sword OCIDateTimeConvert(dvoid *hndl, OCIError *err, OCIDateTime *indate,
-                                OCIDateTime *outdate);
-
-sword OCIDateTimeSubtract(dvoid *hndl, OCIError *err, OCIDateTime *indate1, 
-                OCIDateTime *indate2,    OCIInterval *inter);
-
-sword OCIDateTimeIntervalAdd(dvoid *hndl, OCIError *err, OCIDateTime *datetime,
-         OCIInterval *inter, OCIDateTime *outdatetime);
-
-sword OCIDateTimeIntervalSub(dvoid *hndl, OCIError *err, OCIDateTime *datetime,
-         OCIInterval *inter, OCIDateTime *outdatetime);
-
-sword OCIIntervalSubtract(dvoid *hndl, OCIError *err, OCIInterval *minuend, 
-                            OCIInterval *subtrahend, OCIInterval *result );
-
-sword OCIIntervalAdd(dvoid *hndl, OCIError *err, OCIInterval *addend1, 
-                        OCIInterval *addend2, OCIInterval *result );
-
-sword OCIIntervalMultiply(dvoid *hndl, OCIError *err, CONST OCIInterval *inter,
-                        OCINumber *nfactor, OCIInterval *result );
-
-sword OCIIntervalDivide(dvoid *hndl, OCIError *err, OCIInterval *dividend, 
-                OCINumber *divisor, OCIInterval *result );
-
-sword OCIIntervalCompare(dvoid *hndl, OCIError *err, OCIInterval *inter1, 
-                        OCIInterval *inter2, sword *result );
-
-sword OCIIntervalFromNumber(dvoid *hndl, OCIError *err, OCIInterval *inter, 
-                        OCINumber *number);
-
-sword OCIIntervalFromText( dvoid *hndl, OCIError *err, CONST OraText *inpstr, 
-                size_t str_len, OCIInterval *result );
-
-sword OCIIntervalToText( dvoid *hndl, OCIError *err, CONST OCIInterval *inter,
-                         ub1 lfprec, ub1 fsprec, 
-                        OraText *buffer, size_t buflen, size_t *resultlen );
-
-sword OCIIntervalToNumber(dvoid *hndl, OCIError *err,CONST OCIInterval *inter, 
-                        OCINumber *number);
-
-sword OCIIntervalCheck(dvoid *hndl, OCIError *err, CONST OCIInterval *interval,
-                         ub4 *valid );
-
-sword OCIIntervalAssign(dvoid *hndl, OCIError *err, CONST OCIInterval *ininter,
-                        OCIInterval *outinter );
-
-sword OCIIntervalSetYearMonth(dvoid *hndl, OCIError *err, sb4 yr, sb4 mnth,
-                        OCIInterval *result );
-
-sword OCIIntervalGetYearMonth(dvoid *hndl, OCIError *err, sb4 *yr, sb4 *mnth,
-                        CONST OCIInterval *result );
-
-sword OCIIntervalSetDaySecond(dvoid *hndl, OCIError *err, sb4 dy, sb4 hr,
-                        sb4 mm, sb4 ss, sb4 fsec, OCIInterval *result );
-
-sword OCIIntervalGetDaySecond(dvoid *hndl, OCIError *err, sb4 *dy, sb4 *hr,
-                     sb4 *mm, sb4 *ss, sb4 *fsec, CONST OCIInterval *result );
-
-sword OCIDateTimeToArray(dvoid *hndl, OCIError *err,
-                         CONST OCIDateTime *datetime, CONST OCIInterval *reftz,
-                         ub1 *outarray, ub4 *len, ub1 fsprec);
-
-sword OCIDateTimeFromArray(dvoid *hndl, OCIError *err, ub1 *inarray, ub4 len,
-                           ub1 type, OCIDateTime *datetime,
-                           CONST OCIInterval *reftz, ub1 fsprec);
-
-sword OCIDateTimeGetTimeZoneName(dvoid *hndl, OCIError *err,
-                                 CONST OCIDateTime *datetime, 
-                                 ub1 *buf, ub4 *buflen);
-
-sword OCIIntervalFromTZ(dvoid *hndl, OCIError *err, CONST oratext *inpstring,
-                        size_t str_len, OCIInterval *result);
-
-/*----------------- End Datetime interface Extensions -----------------------*/
-
-/*----------------- Connection Pooling prototypes ---------------------------*/
-sword OCIConnectionPoolCreate(OCIEnv *envhp, OCIError *errhp, OCICPool *poolhp,
-                              OraText **poolName, sb4 *poolNameLen,  
-                              CONST OraText *dblink, sb4 dblinkLen,
-                              ub4 connMin, ub4 connMax, ub4 connIncr,
-                              CONST OraText *poolUserName, sb4 poolUserLen,
-                              CONST OraText *poolPassword, sb4 poolPassLen,
-                              ub4 mode);
-
-sword OCIConnectionPoolDestroy(OCICPool *poolhp,
-                               OCIError *errhp, ub4 mode);
-
-/*----------------- End Connection Pooling prototypes -----------------------*/
-
-/*-------------------- Session Pooling prototypes ---------------------------*/
-
-sword OCISessionPoolCreate (OCIEnv *envhp, OCIError *errhp, OCISPool *spoolhp, 
-                            OraText **poolName, ub4 *poolNameLen, 
-                            CONST OraText *connStr, ub4 connStrLen,
-                            ub4 sessMin, ub4 sessMax, ub4 sessIncr,
-                            OraText *userid, ub4 useridLen,
-                            OraText *password, ub4 passwordLen,
-                            ub4 mode);
-                                                  
-sword OCISessionPoolDestroy (OCISPool *spoolhp,
-                             OCIError *errhp,
-                             ub4 mode);
-                             
-sword OCISessionGet (OCIEnv *envhp, OCIError *errhp, OCISvcCtx **svchp,
-                     OCIAuthInfo *authhp,
-                     OraText *poolName, ub4 poolName_len, 
-                     CONST OraText *tagInfo, ub4 tagInfo_len,
-                     OraText **retTagInfo, ub4 *retTagInfo_len,
-                     boolean *found, ub4 mode);
-
-sword OCISessionRelease (OCISvcCtx *svchp, OCIError *errhp,
-                         OraText *tag, ub4 tag_len,
-                         ub4 mode);
-
-/*-------------------- End Session Pooling prototypes -----------------------*/
-
-/*-------------------------------- OCIPing ----------------------------------*/
-sword OCIPing (OCISvcCtx *svchp, OCIError *errhp);
-
-
-/*----------------- Kerberos Authentication prototypes ----------------------*/
-
-sword OCIKerbAttrSet(OCISession *trgthndlp, ub4 cred_use, ub1 *ftgt_ticket, 
-                     ub4 ticket_len, ub1 *session_key, ub4 skey_len, 
-                     ub2 ftgt_keytype, ub4 ftgt_ticket_flags, 
-                     sb4 ftgt_auth_time, sb4 ftgt_start_time, 
-                     sb4 ftgt_end_time, sb4 ftgt_renew_time, 
-                     text *ftgt_client_principal, 
-                     ub4 ftgt_client_principal_len, text *ftgt_client_realm,
-                     ub4 ftgt_client_realm_len, OCIError *errhp);
-
-/*------------------- End Kerberos Authentication prototypes ----------------*/
-
-/*---------------------------------------------------------------------------
-                          PRIVATE FUNCTIONS
-  ---------------------------------------------------------------------------*/
-
-            /* the following functions are depracated and should not be used */
-#ifdef NEVER
-sword   OCIStmtBindByPos  (OCIStmt *stmtp, OCIBind *bindp, OCIError *errhp,
-                  ub4 position, dvoid *valuep, sb4 value_sz,
-                  ub2 dty, dvoid *indp, ub2 *alenp, ub2 *rcodep,
-                  ub4 maxarr_len, ub4 *curelep, ub4 mode);
-
-
-sword   OCIStmtBindByName  (OCIStmt *stmtp, OCIBind *bindp, OCIError *errhp,
-                  CONST OraText *placeholder, sb4 placeh_len, dvoid *valuep, 
-                  sb4 value_sz, ub2 dty, dvoid *indp, ub2 *alenp, 
-                  ub2 *rcodep, ub4 maxarr_len, ub4 *curelep, ub4 mode);
-
-sword   ocidefn  (OCIStmt *stmtp, OCIDefine *defnp, OCIError *errhp,
-                  ub4 position, dvoid *valuep, sb4 value_sz, ub2 dty,
-                  dvoid *indp, ub2 *rlenp, ub2 *rcodep, ub4 mode);
-#endif /* NEVER */
-
-#endif                                                       /* OCIAP_ORACLE */
diff --git a/src/terralib/drivers/OracleSpatial/OCI/include/ociapr.h b/src/terralib/drivers/OracleSpatial/OCI/include/ociapr.h
deleted file mode 100644
index c1e6978..0000000
--- a/src/terralib/drivers/OracleSpatial/OCI/include/ociapr.h
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * $Header: /home/terralib/src/terralib/drivers/OracleSpatial/OCI/include/ociapr.h,v 1.3 2005/05/06 16:48:56 karine Exp $ 
- */
-
-/* Copyright (c) 1991, 1996, 1998, 2000 by Oracle Corporation */
-/*
-   NAME
-     ociapr.h
-   MODIFIED   (MM/DD/YY)
-    dsaha      05/19/00 -  Fix lint
-    sgollapu   05/19/98 -  Change text to OraText
-    dchatter   11/10/95 -  add ognfd() - get native fd
-    lchidamb   04/06/95 -  drop maxdsz from obindps/odefinps
-    slari      04/07/95 -  add opinit
-    dchatter   03/08/95 -  osetpi and ogetpi
-    lchidamb   12/09/94 -  add obindps() and odefinps()
-    dchatter   03/06/95 -  merge changes from branch 1.1.720.2
-    dchatter   11/14/94 -  merge changes from branch 1.1.720.1
-    dchatter   02/08/95 -  olog call; drop onblon
-    dchatter   10/31/94 -  new functions for non-blocking oci
-    rkooi2     11/27/92 -  Changing datatypes to agree with ocidef.h 
-    rkooi2     10/26/92 -  More portability mods 
-    rkooi2     10/18/92 -  Changed to agree with oci.c 
-    sjain      03/16/92 -  Creation 
-*/
-/*
- *  Declare the OCI functions.
- *  Prototype information is included.
- *  Use this header for ANSI C compilers.
- */
-
-#ifndef OCIAPR
-#define OCIAPR
-
-#ifndef ORATYPES
-#include <oratypes.h>
-#endif 
-
-#ifndef OCIDFN
-#include <ocidfn.h>
-#endif 
-
-/*
- * Oci BIND (Piecewise or with Skips) 
- */
-sword  obindps(struct cda_def *cursor, ub1 opcode, OraText *sqlvar, 
-	       sb4 sqlvl, ub1 *pvctx, sb4 progvl, 
-	       sword ftype, sword scale,
-	       sb2 *indp, ub2 *alen, ub2 *arcode, 
-	       sb4 pv_skip, sb4 ind_skip, sb4 alen_skip, sb4 rc_skip,
-	       ub4 maxsiz, ub4 *cursiz,
-	       OraText *fmt, sb4 fmtl, sword fmtt);
-sword  obreak(struct cda_def *lda);
-sword  ocan  (struct cda_def *cursor);
-sword  oclose(struct cda_def *cursor);
-sword  ocof  (struct cda_def *lda);
-sword  ocom  (struct cda_def *lda);
-sword  ocon  (struct cda_def *lda);
-
-
-/*
- * Oci DEFINe (Piecewise or with Skips) 
- */
-sword  odefinps(struct cda_def *cursor, ub1 opcode, sword pos,ub1 *bufctx,
-		sb4 bufl, sword ftype, sword scale, 
-		sb2 *indp, OraText *fmt, sb4 fmtl, sword fmtt, 
-		ub2 *rlen, ub2 *rcode,
-		sb4 pv_skip, sb4 ind_skip, sb4 alen_skip, sb4 rc_skip);
-sword  odessp(struct cda_def *cursor, OraText *objnam, size_t onlen,
-              ub1 *rsv1, size_t rsv1ln, ub1 *rsv2, size_t rsv2ln,
-              ub2 *ovrld, ub2 *pos, ub2 *level, OraText **argnam,
-              ub2 *arnlen, ub2 *dtype, ub1 *defsup, ub1* mode,
-              ub4 *dtsiz, sb2 *prec, sb2 *scale, ub1 *radix,
-              ub4 *spare, ub4 *arrsiz);
-sword  odescr(struct cda_def *cursor, sword pos, sb4 *dbsize,
-                 sb2 *dbtype, sb1 *cbuf, sb4 *cbufl, sb4 *dsize,
-                 sb2 *prec, sb2 *scale, sb2 *nullok);
-sword  oerhms   (struct cda_def *lda, sb2 rcode, OraText *buf,
-                 sword bufsiz);
-sword  oermsg   (sb2 rcode, OraText *buf);
-sword  oexec    (struct cda_def *cursor);
-sword  oexfet   (struct cda_def *cursor, ub4 nrows,
-                 sword cancel, sword exact);
-sword  oexn     (struct cda_def *cursor, sword iters, sword rowoff);
-sword  ofen     (struct cda_def *cursor, sword nrows);
-sword  ofetch   (struct cda_def *cursor);
-sword  oflng    (struct cda_def *cursor, sword pos, ub1 *buf,
-                 sb4 bufl, sword dtype, ub4 *retl, sb4 offset);
-sword  ogetpi   (struct cda_def *cursor, ub1 *piecep, dvoid **ctxpp, 
-                 ub4 *iterp, ub4 *indexp);
-sword  oopt     (struct cda_def *cursor, sword rbopt, sword waitopt);
-sword  opinit   (ub4 mode);
-sword  olog     (struct cda_def *lda, ub1* hda,
-                 OraText *uid, sword uidl,
-                 OraText *pswd, sword pswdl, 
-                 OraText *conn, sword connl, 
-                 ub4 mode);
-sword  ologof   (struct cda_def *lda);
-sword  oopen    (struct cda_def *cursor, struct cda_def *lda,
-                 OraText *dbn, sword dbnl, sword arsize,
-                 OraText *uid, sword uidl);
-sword  oparse   (struct cda_def *cursor, OraText *sqlstm, sb4 sqllen,
-                 sword defflg, ub4 lngflg);
-sword  orol     (struct cda_def *lda);
-sword  osetpi   (struct cda_def *cursor, ub1 piece, dvoid *bufp, ub4 *lenp);
-
-void sqlld2     (struct cda_def *lda, OraText *cname, sb4 *cnlen);
-void sqllda     (struct cda_def *lda);
-
-/* non-blocking functions */
-sword onbset    (struct cda_def *lda ); 
-sword onbtst    (struct cda_def *lda ); 
-sword onbclr    (struct cda_def *lda ); 
-sword ognfd     (struct cda_def *lda, dvoid *fdp);
-
-
-/* 
- * OBSOLETE CALLS 
- */
-
-/* 
- * OBSOLETE BIND CALLS
- */
-sword  obndra(struct cda_def *cursor, OraText *sqlvar, sword sqlvl,
-                 ub1 *progv, sword progvl, sword ftype, sword scale,
-                 sb2 *indp, ub2 *alen, ub2 *arcode, ub4 maxsiz,
-                 ub4 *cursiz, OraText *fmt, sword fmtl, sword fmtt);
-sword  obndrn(struct cda_def *cursor, sword sqlvn, ub1 *progv,
-                 sword progvl, sword ftype, sword scale, sb2 *indp,
-                 OraText *fmt, sword fmtl, sword fmtt);
-sword  obndrv(struct cda_def *cursor, OraText *sqlvar, sword sqlvl,
-                 ub1 *progv, sword progvl, sword ftype, sword scale,
-                 sb2 *indp, OraText *fmt, sword fmtl, sword fmtt);
-
-/*
- * OBSOLETE DEFINE CALLS
- */
-sword  odefin(struct cda_def *cursor, sword pos, ub1 *buf,
-	      sword bufl, sword ftype, sword scale, sb2 *indp,
-	      OraText *fmt, sword fmtl, sword fmtt, ub2 *rlen, ub2 *rcode);
-
-/* older calls ; preferred equivalent calls above */
-
-sword  oname    (struct cda_def *cursor, sword pos, sb1 *tbuf,
-                 sb2 *tbufl, sb1 *buf, sb2 *bufl);
-sword  orlon    (struct cda_def *lda, ub1 *hda, 
-                 OraText *uid, sword uidl, 
-                 OraText *pswd, sword pswdl, 
-                 sword audit);
-sword  olon     (struct cda_def *lda, OraText *uid, sword uidl,
-                 OraText *pswd, sword pswdl, sword audit);
-sword  osql3    (struct cda_def *cda, OraText *sqlstm, sword sqllen);
-sword  odsc     (struct cda_def *cursor, sword pos, sb2 *dbsize,
-                 sb2 *fsize, sb2 *rcode, sb2 *dtype, sb1 *buf,
-                 sb2 *bufl, sb2 *dsize);
-
-#endif /* OCIAPR */
diff --git a/src/terralib/drivers/OracleSpatial/OCI/include/ocidef.h b/src/terralib/drivers/OracleSpatial/OCI/include/ocidef.h
deleted file mode 100644
index 1fde105..0000000
--- a/src/terralib/drivers/OracleSpatial/OCI/include/ocidef.h
+++ /dev/null
@@ -1,888 +0,0 @@
-/*
- * $Header: /home/terralib/src/terralib/drivers/OracleSpatial/OCI/include/ocidef.h,v 1.3 2005/05/06 16:48:56 karine Exp $ ocidef.h 
- */
-
-/* Copyright (c) 1981, 2003, Oracle Corporation.  All rights reserved.  */
-/* Copyright (c) 1984, 2003, Oracle Corporation.  All rights reserved.  */
- 
-/*
-NAME
-  ocidef
-CONTENTS
-  Oracle Call Interface cursor area and LDA definitions
-NOTES
-  none
-OWNER
-  Oates
-DATE
-  09/07/82
-MODIFIED
-    srseshad   03/25/03  - convert oci public api to ansi
-    csteinba   11/05/02  - bug 2521931: redefine OTYACL
-    aahluwal   06/03/02  - bug 2360115
-    bpalaval   02/08/01  - Change text to oratext.
-    chliang    02/01/01  - fix olint error.
-    bpalaval   11/16/00  - Bug 1244685 : Fix ALTER CLUSTER issue..
-    slari      11/08/00  - remove functions duplicated in ociapr.h
-    whe        09/01/99 -  976457:check __cplusplus for C++ code
-    skmishra   04/23/97 -  Provide C++ compatibility
-    lchidamb   06/26/96 -  put upidef.h, riddef.h within #ifndef
-    slari      06/12/96 -  add ocigft_getFcnType
-    dchatter   11/10/95 -  ocignfd - oci get native file descriptor
-    slari      05/11/95 -  change OCIEVDEF/OCIEVTSF to UPIEVDEF/UPIEVTSF
-    dchatter   04/06/95 -  add ifdef flags around OCI_flags
-    lchidamb   04/06/95 -  drop maxdsz from ocibndps/ocidfnps
-    slari      04/07/95 -  rename opinit to ocipin
-    slari      03/13/95 -  thread safety changes
-    dchatter   03/08/95 -  piece definitions OCI_*_PIECE
-    lchidamb   12/06/94 -  add support for binding/defining with skips
-    dchatter   03/06/95 -  merge changes from branch 1.12.720.1
-    dchatter   02/06/95 -  add defines for login mode parameters
-    dchatter   07/06/94 -  Deleting CRSCHK, with refcursor, no way to set this
-    dchatter   06/13/94 -  add a new LDA flag LDANBL
-    rkooi      11/18/92 -  update ocidpr interface 
-    mmoore     10/31/92 -  add ocidpr 
-    gpongrac   11/17/92 -  fix oexfet prototype 
-    sjain      01/03/92 -  Add ocibra 
-    rjenkins   11/04/91 -  adding prototypes for oparse and oexfet 
-    sjain      04/15/91 -         Change ocistf proto 
-    sjain      04/01/91 -         Rearrange oty codes. Add new ones 
-    Jain       12/03/90 - Add #define for new describe call
-    Jain       11/29/90 - Add new function code for the new oci calls
-    Mendels    01/20/89 - fix 19170: make ocitbl CONST_DATA
-    Kabcene    01/27/88 - change interfaces to match V5
-    Navab      12/09/87 - add a parameter to ocierr call
-    Navab      11/30/87 - add ocierr, rename ocioer
-    Navab      10/08/87 - add prototypes for procedure declarations
-    Howard     09/07/87 - endif blah
-    Howard     05/11/87 - Add OTY types
-    Howard     04/27/87 - move ocldef defines here
-    Oates      10/15/85 - Add OCANCEL
-    Oates      09/30/85 - Implement ORA*Net
-    Oates      06/27/85 - Make datatype compatible with upidef.h
-    Andy       05/07/85 - delete CSRFBPIC
-*/
-
-#ifndef UPIDEF 
-#include <upidef.h>
-#endif
-
-#ifndef RIDDEF
-#include <riddef.h>
-#endif
-
-#include <ociapr.h>
-
-#ifndef OCIDEF
-#define OCIDEF
- 
- 
-#define CSRCHECK 172                                   /* csrdef is a cursor */
-#define LDACHECK 202                          /* csrdef is a login data area */
-struct csrdef
-{
-   b2      csrrc;                /* return code: v2 codes, v4 codes negative */
-   ub2     csrft;                                           /* function type */
-   ub4     csrrpc;                                   /* rows processed count */
-   ub2     csrpeo;                                     /* parse error offset */
-   ub1     csrfc;                                           /* function code */
-   ub1     csrlfl;                     /* lda flag to indicate type of login */
-   ub2     csrarc;                        /* actual untranslated return code */
-   ub1     csrwrn;                                          /* warning flags */
-   ub1     csrflg;                                           /* error action */
-   word    csrcn;                                           /* cursor number */
-   riddef  csrrid;                                        /* rowid structure */
-   word    csrose;                                /* os dependent error code */
-   ub1     csrchk;                      /* check byte = CSRCHECK - in cursor */
-                                        /* check byte = LDACHECK - in    LDA */
-   struct hstdef *csrhst;                              /* pointer to the hst */
-};
-typedef struct csrdef csrdef;
-typedef struct csrdef ldadef;                    /* lda is the same as a csr */
- 
- 
-/* values for csrlfl */
-#define LDAFLG 1                                            /* ...via ologon */
-#define LDAFLO 2                                     /* ...via olon or orlon */
-#define LDANBL 3                                  /* ...nb logon in progress */
- 
-/* valuses for crsfc */
-#define csrfpa 2                                                  /* ...OSQL */
-#define csrfex 4                                                 /* ...OEXEC */
-#define csrfbi 6                                                 /* ...OBIND */
-#define csrfdb 8                                                /* ...ODFINN */
-#define csrfdi 10                                               /* ...ODSRBN */
-#define csrffe 12                                               /* ...OFETCH */
-#define csrfop 14                                                /* ...OOPEN */
-#define csrfcl 16                                               /* ...OCLOSE */
-#define csrfds 22                                                 /* ...ODSC */
-#define csrfnm 24                                                /* ...ONAME */
-#define csrfp3 26                                                /* ...OSQL3 */
-#define csrfbr 28                                               /* ...OBNDRV */
-#define csrfbx 30                                               /* ...OBNDRN */
-/*#defe csrfdf 32*/                                                  /* ???? */
-#define csrfso 34                                                 /* ...OOPT */
-#define csrfre 36                                               /* ...ORESUM */
-#define csrfbn 50                                               /* ...OBINDN */
-#define csrfca 52                                               /* ..OCANCEL */
-#define csrfsd 54                                                 /* ..OSQLD */
-#define csrfef 56                                                /* ..OEXFEN */
-#define csrfln 58                                                 /* ..OFLNG */
-#define csrfdp 60                                                /* ..ODSCSP */
-#define csrfba 62                                                /* ..OBNDRA */
-#define csrfbps 63                                               /*..OBINDPS */
-#define csrfdps 64                                              /*..ODEFINPS */
-#define csrfgpi 65                                              /* ...OGETPI */
-#define csrfspi 66                                              /* ...OSETPI */
-
-/* values for csrwrn */
-#define CSRWANY  0x01                         /* there is a warning flag set */
-#define CSRWTRUN 0x02                           /* a data item was truncated */
-#define CSRWNVIC 0x04      /* NULL values were used in an aggregate function */
-#define CSRWITCE 0x08           /* column count not equal to into list count */
-#define CSRWUDNW 0x10               /* update or delete without where clause */
-#define CSRWRSV0 0x20
-#define CSRWROLL 0x40                                   /* rollback required */
-#define CSRWRCHG 0x80       /* change after query start on select for update */
- 
-/* values fro csrflg */
-#define CSRFSPND 0x01                         /* current operation suspended */
-#define CSRFATAL 0x02            /* fatal operation: transaction rolled back */
-#define CSRFBROW 0x04                              /* current row backed out */
-#define CSRFREFC 0x08     /* ref cursor type CRSCHK disabled for this cursor */
-#define CSRFNOAR 0x10     /* ref cursor type binds, so no array bind/execute */
- 
-/* define function codes; in order of octdef.h */
-#define OTYCTB 1                                             /* CREATE TABLE */
-#define OTYSER 2                                                 /* set role */
-#define OTYINS 3                                                   /* INSERT */
-#define OTYSEL 4                                                   /* SELECT */
-#define OTYUPD 5                                                   /* UPDATE */
-#define OTYDRO 6                                                /* drop role */
-#define OTYDVW 7                                                /* DROP VIEW */
-                                                  /* once was validate index */
-                                                /* once was create partition */
-                                                 /* once was alter partition */
-#define OTYDTB 8                                               /* DROP TABLE */
-                                                     /* once was alter space */
-                                                      /* once was drop space */
-#define OTYDEL 9                                                   /* DELETE */
-#define OTYCVW 10                                             /* create view */
-#define OTYDUS 11                                               /* drop user */
-#define OTYCRO 12                                             /* create role */
-#define OTYCSQ 13                                         /* create sequence */
-#define OTYASQ 14                                          /* alter sequence */
-#define OTYACL 15                                           /* alter cluster */
-#define OTYDSQ 16                                           /* drop sequence */
-#define OTYCSC 17                                           /* create schema */
-#define OTYCCL 18                                          /* CREATE CLUSTER */
-                                                   /* once was alter cluster */
-#define OTYCUS 19                                             /* create user */
-#define OTYCIX 20                                            /* CREATE INDEX */
-#define OTYDIX 21                                              /* DROP INDEX */
-#define OTYDCL 22                                            /* DROP CLUSTER */
-#define OTYVIX 23                                          /* validate index */
-#define OTYCPR 24                                        /* create procedure */
-#define OTYAPR 25                                         /* alter procedure */
-#define OTYATB 26                                             /* alter table */
-                                                        /* once was evaluate */
-#define OTYXPL 27                                                 /* explain */
-#define OTYGRA 28                                                   /* grant */
-#define OTYREV 29                                                  /* revoke */
-#define OTYCSY 30                                          /* create synonym */
-#define OTYDSY 31                                            /* drop synonym */
-#define OTYASY 32                                 /* alter system switch log */
-#define OTYSET 33                                         /* set transaction */
-#define OTYPLS 34                                          /* pl/sql execute */
-#define OTYLTB 35                                                    /* lock */
-#define OTYNOP 36                                                    /* noop */
-#define OTYRNM 37                                                  /* rename */
-#define OTYCMT 38                                                 /* comment */
-#define OTYAUD 39                                                   /* audit */
-#define OTYNOA 40                                                /* no audit */
-#define OTYAIX 41                                             /* ALTER INDEX */
-#define OTYCED 42                                /* create external database */
-#define OTYDED 43                                  /* drop external database */
-#define OTYCDB 44                                         /* create database */
-#define OTYADB 45                                          /* alter database */
-#define OTYCRS 46                                 /* create rollback segment */
-#define OTYARS 47                                  /* alter rollback segment */
-#define OTYDRS 48                                   /* drop rollback segment */
-#define OTYCTS 49                                       /* create tablespace */
-#define OTYATS 50                                        /* alter tablespace */
-#define OTYDTS 51                                         /* drop tablespace */
-#define OTYASE 52                                           /* alter session */
-#define OTYAUR 53                                              /* alter user */
-#define OTYCWK 54                                           /* commit (work) */
-#define OTYROL 55                                                /* rollback */
-#define OTYSPT 56                                               /* savepoint */
- 
-/* For number greater than 56 the the type is the same as defined in 
-** octdef.h for that number. So for completion look at octdef.h 
-*/
-
-#define OTYDEV OTYCVW                       /* old DEFINE VIEW = create view */
- 
-/* FUNCTION CODES */
-#define OCLFPA  2                                            /* parse - OSQL */
-#define OCLFEX  4                                         /* execute - OEXEC */
-#define OCLFBI  6                                    /* BIND by name - OBIND */
-#define OCLFDB  8                                 /* define buffer -  ODEFIN */
-#define OCLFDI  10                                   /* describe item - ODSC */
-#define OCLFFE  12                                         /* fetch - OFETCH */
-#define OCLFOC  14                                    /* open cursor - OOPEN */
-#       define OCLFLI  OCLFOC            /* old name for open cursor - OOPEN */
-#define OCLFCC  16                                  /* close cursor - OCLOSE */
-#       define OCLFLO  OCLFCC          /* old name for close cursor - OCLOSE */
-#define OCLFDS  22                                        /* describe - ODSC */
-#define OCLFON  24                     /* get table and column names - ONAME */
-#define OCLFP3  26                                          /* parse - OSQL3 */
-#define OCLFBR  28                        /* bind reference by name - OBNDRV */
-#define OCLFBX  30                        /* bind referecne numeric - OBNDRN */
-#define OCLFSO  34                                /* special function - OOPT */
-#define OCLFRE  36                                        /* resume - ORESUM */
-#define OCLFBN  50                                                  /* bindn */
-#define OCLFMX  52                                /* maximum function number */
-
-#ifdef NEVER                                                 /* unused codes */
-# define OCLFLK  18                           /* open  for kernel operations */
-# define OCLFEK  20                             /* execute kernel operations */
-# define OCLFOK  22                                          /* kernel close */
-# define OCLFIN  28                                       /* logon to oracle */
-# define OCLFOF  30                                    /* logoff from oracle */
-# define OCLFAX  32                               /* allocate a context area */
-# define OCLFPI  34                                  /* page in context area */
-# define OCLFIS  36                                  /* special system logon */
-# define OCLFCO  38                          /* cancel the current operation */
-# define OCLFGI  40                                       /* get database id */
-# define OCLFJN  42                                     /* journal operation */
-# define OCLFCL  44                       /* cleanup prior execute operation */
-# define OCLFMC  46                                     /* map a cursor area */
-# define OCLFUC  48                  /* unmap cursor and restore user maping */
-#endif /*NEVER                                           *//* obsolete codes */
- 
-
-/* values for ocimode in ocipin call */
-
-#define OCIEVDEF UPIEVDEF           /* default : non-thread safe enivronment */
-#define OCIEVTSF UPIEVTSF                         /* thread-safe environment */
-
-
-/* OCIL* flags used to determine the mode of login, using ocilog().
-** Currently defined only for non-blocking and thread-safe logins.
-*/
-
-#define OCILMDEF        UPILMDEF                   /* default, regular login */
-#define OCILMNBL        UPILMNBL                       /* non-blocking logon */
-#define OCILMESY        UPILMESY            /* thread safe but external sync */
-#define OCILMISY        UPILMISY                  /* internal sync, we do it */
-#define OCILMTRY        UPILMTRY        /* try to, but do not block on mutex */
-
-
-/* 
- * since sqllib uses both ocidef and ocidfn the following defines
- * need to be guarded
- */
-#ifndef OCI_FLAGS 
-#define OCI_FLAGS
-
-/* OCI_*_PIECE defines the piece types that are returned or set
-*/
-
-#define OCI_ONE_PIECE   UPI_ONE_PIECE     /* there or this is the only piece */
-#define OCI_FIRST_PIECE UPI_FIRST_PIECE          /* the first of many pieces */
-#define OCI_NEXT_PIECE  UPI_NEXT_PIECE            /* the next of many pieces */
-#define OCI_LAST_PIECE  UPI_LAST_PIECE      /* the last piece of this column */
-#endif
-
-/*
-**  OCITAB: define return code pairs for version 2 to 3 conversions
-*/
-struct  ocitab
-{
-   b2   ocitv3;                                   /* Version 3/4 return code */
-   b2   ocitv2;                          /* Version 2 equivalent return code */
-};
-typedef struct ocitab ocitab;
- 
-externref CONST_DATA ocitab ocitbl[];
- 
-/* macros to check cursors and LDA's.  */
-/* macros to set error codes           */
-
-# define CRSCHK(c)     if ((c->csrchk != CSRCHECK)\
-                            && !bit(c->csrflg, CSRFREFC))\
-                          return(ocir32(c, OER(1001)))
-# define ldaerr(l, e)  ( l->csrrc = (b2)(-( l->csrarc = (ub2)(e)) ) )
-# define LDACHK(l)     if (l->csrchk != LDACHECK) \
-                          return(ldaerr(l, OER(1001)))
- 
-
-/************************************************/
-/*         OCI PROCEDURE DECLARATIONS           */
-/************************************************/ 
-
-
-
-
-/*****************************/
-/*  Database logon/logout    */
-/*****************************/
-sword ocilog( /*_ ldadef *lda, struct hstdef *hst, oratext *uid, sword uidl, 
-                  oratext *psw, sword pswl, oratext* conn, sword connl,
-                  ub4 mode _*/);
-sword ocilon( /*_ ldadef *lda, oratext *uid, word uidl, oratext *psw, 
-                  word pswl, word audit _*/);
-sword  ocilgi( /*_ ldadef *lda, b2 areacount _*/ );
-sword ocirlo( /*_ ldadef *lda, struct hstdef *hst, oratext *uid, word uidl,
-            oratext *psw, word pswl, word audit _*/ );
-     /* ocilon - logon to oracle
-     ** ocilgi - version 2 compatible ORACLE logon call.
-     **          no login to ORACLE is performed: the LDA is initialized
-     ** ocirlo - version 5 compatible ORACLE Remote Login call,
-     **          oracle login is executed.
-     **   lda     - pointer to ldadef
-     **   uid     - user id [USER[/PASSWORD]]
-     **   uidl    - length of uid, if -1 strlen(uid) is used
-     **   psw     - password string; ignored if specified in uid
-     **   pswl    - length of psw, if -1 strlen(psw) is used
-     **   audit   - is not supported; the only permissible value is 0
-     **   areacount - unused
-     */
-
-sword ocilof( /*_ ldadef *lda _*/ );
-     /*
-     ** ocilof - disconnect from ORACLE
-     **   lda     - pointer to ldadef
-     */
-
-
-/*********************/
-/*   Error Messages  */
-/*********************/
-sword ocierr( /*_ ldadef *lda, b2 rcode, oratext *buffer, word bufl _*/ );
-sword ocidhe( /*_ b2 rcode, oratext *buffer _*/ );
-    /* 
-    ** Move the text explanation for an ORACLE error to a user defined buffer
-    **  ocierr - will return the message associated with the hstdef stored 
-    **           in the lda.
-    **  ocidhe - will return the message associated with the default host.
-    **    lda    - lda associated with the login session
-    **    rcode  - error code as returned by V3 call interface
-    **    buffer - address of a user buffer of at least 132 characters
-    */
-
-
-/***********************/
-/*  Cursor Open/Close  */
-/***********************/
-sword ociope( /*_ struct csrdef *cursor, ldadef *lda, oratext *dbn, word dbnl, 
-                 word areasize, oratext *uid, word uidl _*/ );
-
-sword ociclo( /*_ struct csrdef *cursor _*/ );
-   /* 
-   ** open or close a cursor.
-   **   cursor - pointer to csrdef
-   **   ldadef - pointer to ldadef
-   **   dbn    - unused
-   **   dbnl   - unused
-   **   areasize - if (areasize == -1)  areasize <- system default initial size
-   **              else if (areasize IN [1..256]) areasize <- areasize * 1024;
-   **              most applications should use the default size since context
-   **              areas are extended as needed until memory is exhausted.
-   **   uid    - user id
-   **   uidl   - userid length
-   */
-
-/***********************************/
-/*      CONTROL AND OPTIONS        */
-/***********************************/
-sword ocibre( /*_ ldadef *lda _*/ );
-   /*
-   **  ocibrk - Oracle Call Interface send BReaK Sends a break to
-   **  oracle.  If oracle is  active,  the  current  operation  is
-   **  cancelled.  May be called  asynchronously.   DOES  NOT  SET
-   **  OERRCD in the hst.  This is because ocibrk  may  be  called
-   **  asynchronously.  Callers must test the return code.
-   **    lda  - pointer to a ldadef 
-   */
-
-sword ocican( /*_ struct csrdef *cursor _*/ );
-   /*
-   **  cancel the operation on the cursor, no additional OFETCH calls
-   **  will be issued for the existing cursor without an intervening 
-   **  OEXEC call.
-   **   cursor  - pointer to csrdef
-   */
-
-sword ocisfe( /*_ struct csrdef *cursor, word erropt, word waitopt _*/ );
-   /* 
-   ** ocisfe - user interface set error options
-   ** set the error and cursor options.
-   ** allows user to set the options for dealing with fatal dml errors
-   ** and other cursor related options
-   ** see oerdef for valid settings
-   **   cursor  - pointer to csrdef
-   **   erropt  - error optionsn
-   **   waitopr - wait options
-   */
-
-
-/***************************************/
-/* COMMIT/ROLLBACK/AUTOCOMMIT          */
-/***************************************/
-sword   ocicom( /*_ ldadef *lda _*/ );
-sword   ocirol( /*_ ldadef *lda _*/ );
-   /*
-   ** ocicom - commit the current transaction
-   ** ocirol - roll back the current transaction
-   */
- 
-sword   ocicon( /*_ ldadef *lda _*/ );
-sword   ocicof( /*_ ldadef *lda _*/ );
-   /*
-   ** ocicon - auto Commit ON
-   ** ocicof - auto Commit OFf
-   */
-
-
- 
-/************************/
-/*     parsing          */
-/************************/
-sword    ocisq3( /*_ struct csrdef *cursor, oratext *sqlstm, word sqllen _*/ );
-   /*
-   ** ocisq3 - user interface parse sql statement
-   **   cursor - pointer to csrdef
-   **   sqlstm - pointer to SQL statement
-   **   sqllen - length of SQL statement.  if -1, strlen(sqlstm) is used
-   */
-
-
-
-/***************************/
-/*      BINDING            */
-/***************************/
-/* these are for the opcode in ocibndps, ocidfnps */
-#define OCI_PCWS 0
-#define OCI_SKIP 1
-
-sword ocibin( /*_ struct csrdef *cursor, oratext *sqlvar, word sqlvl, 
-                  ub1 *progv, word progvl, word ftype, word scale, 
-                  oratext *fmt, word fmtl, word fmtt _*/ );
-sword  ocibrv( /*_ struct csrdef *cursor, oratext *sqlvar, word sqlvl, 
-                   ub1 *progv, word progvl, word ftype, word scale, b2 *indp,
-                   oratext *fmt, word fmtl, word fmtt _*/ );
-sword  ocibra( /*_ struct csrdef *cursor, oratext *sqlvar, word sqlvl, 
-                   ub1 *progv, word progvl, word ftype, word scale, 
-                   b2 *indp, ub2 *aln, ub2 *rcp, ub4 mal, ub4 *cal, 
-                   oratext *fmt, word fmtl, word fmtt _*/ );
-sword  ocibndps( /*_ struct csrdef *cursor, ub1 opcode, oratext *sqlvar, 
-                     sb4 sqlvl, ub1 *progv, sb4 progvl, word ftype, 
-                     word scale, b2 *indp, ub2 *aln, ub2 *rcp, sb4 pv_skip, 
-                     sb4 ind_skip, sb4 len_skip, sb4 rc_skip, ub4 mal, 
-                     ub4 *cal, oratext *fmt, sb4 fmtl, word fmtt _*/ );
-sword ocibnn ( /*_ struct csrdef *cursor, ub2 sqlvn, ub1 *progv, word progvl,
-                   word ftype, word scale, oratext *fmt, word fmtl, 
-                   word fmtt _*/ );
-sword  ocibrn( /*_ struct csrdef *cursor, word sqlvn, ub1 *progv, word progvl,
-                  word ftype, word scale, b2 *indp, oratext *fmt, word fmtl, 
-                  word fmtt _*/ );
-    /*
-    ** ocibin - bind by value by name
-    ** ocibrv - bind by reference by name
-    ** ocibra - bind by reference by name (array)
-    ** ocibndps - bind by reference by name (array) piecewise or with skips
-    ** ocibnn - bind by value numeric
-    ** ocibrn - bind by reference numeric
-    **
-    ** the contents of storage specified in bind-by-value calls are
-    ** evaluated immediately.
-    ** the addresses of storage specified in bind-by-reference calls are
-    ** remembered, and the contents are examined at every execute.
-    **
-    **  cursor  - pointer to csrdef
-    **  sqlvn   - the number represented by the name of the bind variables
-    **            for variables of the form :n or &n for n in [1..256)
-    **            (i.e. &1, :234).  unnecessarily using larger numbers
-    **            in the range wastes space.
-    **  sqlvar  - the name of the bind variable (:name or &name)
-    **  sqlval  - the length of the name;
-    **            in bindif -1, strlen(bvname) is used
-    **  progv   - pointer to the object to bind.
-    **  progvl  - length of object to bind.
-    **            in bind-by-value if specified as -1 then strlen(bfa) is
-    **              used (really only makes sends with character types)
-    **            in bind-by-value, if specified as -1 then UB2MAXVAL
-    **              is used.  Again this really makes sense only with
-    **              SQLT_STR.
-    **  ftype   - datatype of object
-    **  indp    - pointer to indicator variable.
-    **              -1     means to ignore bfa/bfl and bind NULL;
-    **              not -1 means to bind the contents of bfa/bfl
-    **              bind the contents pointed to by bfa
-    **  aln     - Alternate length pointer
-    **  rcp     - Return code pointer
-    **  mal     - Maximum array length
-    **  cal     - Current array length pointer
-    **  fmt     - format string
-    **  fmtl    - length of format string; if -1, strlen(fmt) is used
-    **  fmtt    - desired output type after applying forat mask. Not
-    **            really yet implemented
-    **  scale   - number of decimal digits in a cobol packed decimal (type 7)
-    **
-    ** Note that the length of bfa when bound as SQLT_STR is reduced
-    ** to strlen(bfa).
-    ** Note that trailing blanks are stripped of storage of SQLT_STR.
-    */
-    
-/***************************/
-/*        DESCRIBING       */
-/***************************/
-sword ocidsc ( /*_ struct csrdef *cursor, word pos, b2 *dbsize, b2 *fsize,
-             b2 *rcode, b2 *dtype, b1 *buf, b2 *bufl, b2 *dsize _*/ );
-sword ocidsr( /*_ struct csrdef *cursor, word pos, b2 *dbsize, b2 *dtype, 
-            b2 *fsize _*/ );
-sword   ocinam( /*_ struct csrdef *cursor, word pos, b1 *tbuf, b2 *tbufl,
-                b1 *buf, b2 *bufl _*/);
-    /*
-    **  ocidsc, ocidsr: Obtain information about a column
-    **  ocinam : get the name of a column
-    **   cursor  - pointer to csrdef
-    **   pos     - position in select list from [1..N]
-    **   dbsize  - place to store the database size
-    **   fsize   - place to store the fetched size
-    **   rcode   - place to store the fetched column returned code
-    **   dtype   - place to store the data type
-    **   buf     - array to store the column name
-    **   bufl    - place to store the column name length
-    **   dsize   - maximum display size
-    **   tbuf    - place to store the table name
-    **   tbufl   - place to store the table name length
-    */
-
-sword ocidsp ( /*_ struct csrdef *cursor, word pos, sb4 *dbsize, sb2 *dbtype,
-                   sb1 *cbuf, sb4 *cbufl, sb4 *dsize, sb2 *pre, sb2 *scl,
-                   sb2 *nul _*/);
-
-sword ocidpr(/*_ ldadef *lda, oratext *object_name, size_t object_length,
-                ptr_t reserved1, size_t reserved1_length, ptr_t reserved2,
-                size_t reserved2_length, ub2 *overload, ub2 *position,
-                ub2 *level, oratext **argument_name, ub2 *argument_length, 
-                ub2 *datatype, ub1 *default_supplied, ub1 *in_out, 
-                ub4 *length, sb2 *precision, sb2 *scale, ub1 *radix, 
-                ub4 *spare, ub4 *total_elements _*/);
-   /*
-   ** OCIDPR - User Program Interface: Describe Stored Procedure
-   **
-   ** This routine is used to obtain information about the calling
-   ** arguments of a stored procedure.  The client provides the 
-   ** name of the procedure using "object_name" and "database_name"
-   ** (database name is optional).  The client also supplies the 
-   ** arrays for OCIDPR to return the values and indicates the 
-   ** length of array via the "total_elements" parameter.  Upon return
-   ** the number of elements used in the arrays is returned in the 
-   ** "total_elements" parameter.  If the array is too small then 
-   ** an error will be returned and the contents of the return arrays 
-   ** are invalid.
-   **
-   **
-   **   EXAMPLE :
-   **
-   **   Client provides -
-   **
-   **   object_name    - SCOTT.ACCOUNT_UPDATE at BOSTON
-   **   total_elements - 100
-   **   
-   **
-   **   ACCOUNT_UPDATE is an overloaded function with specification :
-   **
-   **     type number_table is table of number index by binary_integer;
-   **     table account (account_no number, person_id number,
-   **                    balance number(7,2))
-   **     table person  (person_id number(4), person_nm varchar2(10))
-   **
-   **      function ACCOUNT_UPDATE (account number, 
-   **         person person%rowtype, amounts number_table,
-   **         trans_date date) return accounts.balance%type;
-   **
-   **      function ACCOUNT_UPDATE (account number, 
-   **         person person%rowtype, amounts number_table,
-   **         trans_no number) return accounts.balance%type;
-   **
-   **
-   **   Values returned -
-   **
-   **   overload position   argument  level  datatype length prec scale rad
-   **   -------------------------------------------------------------------
-   **          0        0                0   NUMBER     22    7     2   10
-   **          0        1   ACCOUNT      0   NUMBER     22    0     0    0
-   **          0        2   PERSON       0   RECORD      0    0     0    0
-   **          0        2     PERSON_ID  1   NUMBER     22    4     0   10
-   **          0        2     PERSON_NM  1   VARCHAR2   10    0     0    0
-   **          0        3   AMOUNTS      0   TABLE       0    0     0    0
-   **          0        3                1   NUMBER     22    0     0    0
-   **          0        4   TRANS_NO     0   NUMBER     22    0     0    0
-   **
-   **          1        0                0   NUMBER     22    7     2   10
-   **          1        1   ACCOUNT      0   NUMBER     22    0     0    0
-   **          1        2   PERSON       0   RECORD      0    0     0    0
-   **          1        2    PERSON_ID   1   NUMBER     22    4     0   10
-   **          1        2    PERSON_NM   1   VARCHAR2   10    0     0    0
-   **          1        3   AMOUNTS      0   TABLE       0    0     0    0
-   **          1        3                1   NUMBER     22    0     0    0
-   **          1        4   TRANS_DATE   0   NUMBER     22    0     0    0
-   **
-   **
-   **  OCIDPR Argument Descriptions -
-   **
-   **  ldadef           - pointer to ldadef
-   **  object_name      - object name, synonyms are also accepted and will 
-   **                     be translate, currently only procedure and function
-   **                     names are accepted, also NLS names are accepted.
-   **                     Currently, the accepted format of a name is 
-   **                     [[part1.]part2.]part3[@dblink] (required)
-   **  object_length    - object name length (required)
-   **  reserved1        - reserved for future use
-   **  reserved1_length - reserved for future use
-   **  reserved2        - reserved for future use
-   **  reserved2_length - reserved for future use
-   **  overload         - array indicating overloaded procedure # (returned)
-   **  position         - array of argument positions, position 0 is a 
-   **                     function return argument (returned)
-   **  level            - array of argument type levels, used to describe
-   **                     sub-datatypes of data structures like records
-   **                     and arrays (returned)
-   **  argument_name    - array of argument names, only returns first 
-   **                     30 characters of argument names, note storage
-   **                     for 30 characters is allocated by client (returned)
-   **  argument_length  - array of argument name lengths (returned)
-   **  datatype         - array of oracle datatypes (returned)
-   **  default_supplied - array indicating parameter has default (returned)
-   **                     0 = no default, 1 = default supplied
-   **  in_out           - array indicating if argument is IN or OUT (returned
-   **                     0 = IN param, 1 = OUT param, 2 = IN/OUT param
-   **  length           - array of argument lengths (returned)
-   **  precision        - array of precisions (if number type)(returned)
-   **  scale            - array of scales (if number type)(returned)
-   **  radix            - array of radix (if number type)(returned)
-   **  spare            - array of spares.
-   **  total_elements   - size of arrays supplied by client (required),
-   **                     total number of elements filled (returned)
-   */
-
-/*************************************/
-/* DEFINING                          */
-/*************************************/
-sword ocidfi( /*_ struct csrdef *cursor, word pos, ub1 *buf, word bufl,
-                  word ftype, b2 *rc, word scale _*/ );
-sword ocidfn( /*_ struct csrdef *cursor, word pos, ub1 *buf, word bufl,
-                 word ftype, word scale, b2 *indp, oratext *fmt, word fmtl,
-                 word fmtt, ub2 *rl, ub2 *rc _*/ );
-sword ocidfnps( /*_ struct csrdef *cursor, ub1 opcode, word pos, ub1 *buf, 
-                    sb4 bufl, word ftype, word scale,  
-                    b2 *indp, oratext *fmt, sb4 fmtl,
-                    word fmtt, ub2 *rl, ub2 *rc,
-                    sb4 pv_skip, sb4 ind_skip, sb4 len_skip, 
-                    sb4 rc_skip _*/ );
-
-
-   /*  Define a user data buffer using upidfn
-   **   cursor  - pointer to csrdef
-   **   pos     - position of a field or exp in the select list of a query
-   **   bfa/bfl - address and length of client-supplied storage
-                  to receive data
-   **   ftype   - user datatype
-   **   scale   - number of fractional digits for cobol packed decimals
-   **   indp    - place to store the length of the returned value. If returned
-   **             value is:
-   **             negative, the field fetched was NULL
-   **             zero    , the field fetched was same length or shorter than
-   **               the buffer provided
-   **             positive, the field fetched was truncated
-   **   fmt    - format string
-   **   fmtl   - length of format string, if -1 strlent(fmt) used
-   **   rl     - place to store column length after each fetch
-   **   rc     - place to store column error code after each fetch
-   **   fmtt   - fomat type
-   */
- 
-/********************************/
-/*    PIECE INFORMATION GET/SET */
-/********************************/
-sword           ocigetpi( /*_ struct csrdef *cursor, ub1 *piecep,
-                              dvoid **ctxpp, ub4 *iterp, ub4 *indexp _*/ );
-sword           ocisetpi( /*_ struct csrdef *cursor, ub1 piece,
-                              dvoid *bufp, ub4 *lenp _*/ );
-
-
-/********************************/
-/*   EXECUTE                    */
-/********************************/
-sword ociexe( /*_ struct csrdef *cursor _*/ );
-sword ociexn( /*_ struct csrdef *cursor, word iters, word roff _*/ );
-sword ociefn( /*_ struct csrdef *cursor, ub4 nrows, word can, word exact _*/);
-    /* 
-    ** ociexe  - execute a cursor
-    ** ociexn  - execute a cursosr N times
-    **  cursor   - pointer to a csrdef
-    **  iters    - number of times to execute cursor
-    **  roff     - offset within the bind variable array at which to begin 
-    **             operations.
-    */
-
-
-/*********************************/
-/*     FETCHING                  */
-/*********************************/
-sword ocifet( /*_ struct csrdef *cursor _*/ );
-sword ocifen( /*_ struct csrdef *cursor, word nrows _*/ );
-    /* ocifet - fetch the next row
-    ** ocifen - fetch n rows 
-    ** cursor   - pointer to csrdef
-    ** nrows    - number of rows to be fetched
-    */
-
-sword ocilng(/*_ struct csrdef *cursor, word posit, ub1 *bfa, sb4 bfl,
-                 word dty, ub4 *rln, sb4 off _*/);
-
-/*********************************/
-/*         CONVERSION            */
-/*********************************/
-sword ocic32( /*_ struct csrdef *cursor _*/ );
-    /*
-    **   Convert selected version 3 return codes to the equivalent
-    **   version 2 code.
-    **   csrdef->csrrc is set to the converted code
-    **   csrdef->csrft is set to v2 oracle statment type
-    **   csrdef->csrrpc is set to the rows processed count
-    **   csrdef->csrpeo is set to error postion
-    ** 
-    **     cursor - pointer to csrdef
-    */
-
-
-sword ocir32( /*_ struct csrdef *cursor, word retcode _*/ );
-   /*   
-   ** Convert selected version 3 return codes to the equivalent version 2 
-   ** code.
-   **
-   **    cursor - pointer to csrdef
-   **    retcode - place to store the return code
-   */
-
-
-VOID ociscn( /*_ word **arglst, char *mask_addr, word **newlst _*/ );
-   /*
-   ** Convert call-by-ref to call-by-value:
-   ** takes an arg list and a mask address, determines which args need 
-   ** conversion to a value, and creates a new list begging at the address
-   ** of newlst.
-   **
-   **    arglst    - list of arguments
-   **    mast_addr _ mask address determines args needing conversion
-   **    newlst    - new list of args
-   */
-
-word     ocistf ( /*_ word typ, word bufl, word rdig, oratext *fmt, 
-                      struct csrdef *cursor, sword *err _*/ );
-/*  Convert a packed  decimal buffer  length  (bytes) and scale to a format
-**  string of the form mm.+/-nn, where  mm is the number of packed 
-**  decimal digits, and nn is the scaling factor.   A positive scale name 
-**  nn digits to the rights of the decimal; a negative scale means nn zeros 
-**  should be supplied to the left of the decimal.
-**     bufl   - length of the packed decimal buffer
-**     rdig   - number of fractional digits
-**     fmt    - pointer to a string holding the conversion format
-**     cursor - pointer to csrdef 
-**     err    - pointer to word storing error code
-*/ 
-
-
-/******************************************/
-/*         Non-blocking operations        */
-/******************************************/
-sword ocinbs( /*_ ldadef *lda _*/ );  /* set a connection to non-blocking   */
-sword ocinbt( /*_ ldadef *lda _*/ );  /* test if connection is non-blocking */
-sword ocinbc( /*_ ldadef *lda _*/ );  /* clear a connection to blocking     */
-sword ocinlo( /*_ ldadef *lda, struct hstdef *hst, oratext *conn,
-                  sword connl, oratext *uid, sword uidl,
-                  oratext *psw, sword pswl, sword audit _*/ );  
-              /* logon in non-blocking fashion */
-/* ocinlo allows an application to logon in non-blocking fashion.
-**   lda     - pointer to ldadef
-**   hst     - pointer to a 256 byte area, must be cleared to zero before call
-**   conn    - the database link (if specified @LINK in uid will be ignored)
-**   connl   - length of conn; if -1 strlen(conn) is used   
-**   uid     - user id [USER[/PASSWORD][@LINK]]
-**   uidl    - length of uid, if -1 strlen(uid) is used
-**   psw     - password string; ignored if specified in uid
-**   pswl    - length of psw, if -1 strlen(psw) is used
-**   audit   - is not supported; the only permissible value is 0
-*/
-
-/***************************************************/
-/*         Procedure Declaration for Pro*C         */
-/***************************************************/
-/* Note: The following routines are used in Pro*C and have the
-   same interface as their couterpart in OCI. 
-   Althought the interface follows for more details please refer 
-   to the above routines */
-
-/******************************************/
-/*         initialization/logon/logof     */
-/******************************************/
-sword ocipin( /*_ ub4 mode _*/ );
-
-sword ologin( /*_ ldadef *lda, b2 areacount _*/ );
-sword ologon( /*_ ldadef *lda, b2 areacount _*/ );
-
-/*****************************************/
-/*        Open/Close/Parse Cursor        */
-/*****************************************/
-
-/* 
-** ocisqd - oci delayed parse (Should be used only with deferred upi/oci)
-** FUNCTION: Call upidpr to delay the parse of the sql statement till the
-**           time that a call needs to be made to the kernel (execution or
-**           describe time )
-** RETURNS: Oracle return code.
-*/ 
-sword ocisq7(/*_ struct csrdef *cursor, oratext *sqlstm, sb4 sqllen,
-                 word defflg, ub4 sqlt _*/);
-
-/*****************************************/
-/*            Bind                       */
-/*****************************************/
-sword obind( /*_ struct csrdef *cursor, oratext *sqlvar, word sqlvl, 
-                 ub1 *progv, word progvl, word ftype, word scale, 
-                 oratext *fmt, word fmtl, word fmtt _*/ );
-sword obindn( /*_ struct csrdef *cursor, ub2 sqlvn, ub1 *progv, word progvl,
-                  word ftype, word scale, oratext *fmt, word fmtl, 
-                  word fmtt _*/ );
-
-/**********************************************/
-/*                 Define                     */
-/**********************************************/
-sword odfinn( /*_ struct csrdef *cursor, word pos, ub1 *buf, word bufl,
-                  word ftype, b2 *rc, word scale _*/ );
-
-/**********************************************/
-/*                 Describe                   */
-/**********************************************/
-sword odsrbn( /*_ struct csrdef *cursor, word pos, b2 *dbsize, b2 *dtype, 
-            b2 *fsize _*/ );
-
-
-/******************************************/
-/*         Non-blocking operations        */
-/******************************************/
-sword onblon( /*_ ldadef *lda, struct hstdef *hst, oratext *conn,
-                  sword connl, oratext *uid, sword uidl,
-                  oratext *psw, sword pswl, sword audit _*/ );  
-              /* logon in non-blocking fashion */
-sword ocignfd( /*_ ldadef *lda, dvoid *nfdp _*/);           /* get native fd */
-
-ub2   ocigft_getFcnType( /*_ ub2 oertyp _*/ );      /* get sql function code */
-
-#endif
diff --git a/src/terralib/drivers/OracleSpatial/OCI/include/ocidem.h b/src/terralib/drivers/OracleSpatial/OCI/include/ocidem.h
deleted file mode 100644
index 1826876..0000000
--- a/src/terralib/drivers/OracleSpatial/OCI/include/ocidem.h
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * $Header: /home/terralib/src/terralib/drivers/OracleSpatial/OCI/include/ocidem.h,v 1.3 2005/05/06 16:48:56 karine Exp $ 
- */
-
-/* Copyright (c) 1991, 1996, 1997, 1999 by Oracle Corporation */
-/* Copyright (c) 1991, 1997, 1999 by Oracle Corporation */
-/*
-   NAME
-     ocidem.h - OCI demo header
-   MODIFIED   (MM/DD/YY)
-    whe        04/07/99 -  bug#810071
-    whe        03/19/99 -  lrg 32079 etc.: putting static back for oci_func_tab
-    nmacnaug   02/02/99 -  static declarations should not be in header files
-    mygopala   09/22/97 -  Fix for bug 550351
-    surman     03/14/97 -  Merge 413362 to 8.0.3
-    surman     11/08/96 -  413362: Add SS_64BIT_SERVER macro
-    emendez    04/07/94 -  merge changes from branch 1.6.710.1
-    emendez    02/02/94 -  Fix for bug 157576
-    jnlee      01/05/93 -  include oratypes.h once, make oci_func_tab static
-    rkooi2     10/26/92 -  More portability mods 
-    rkooi2     10/22/92 -  Change text back to char to avoid casts 
-    rkooi2     10/20/92 -  Changes to make it portable 
-    sjain      03/16/92 -  Creation 
-*/
-
-/*
- *  ocidem.h
- *
- *  Declares additional functions and data structures
- *  used in the OCI C sample programs.
- */
-
-
-#ifndef ORATYPES
-#include <oratypes.h>
-#endif /* ORATYPES */
-
-#ifndef OCIDFN
-#include <ocidfn.h>
-#endif /* OCIDFN */
-
-#ifndef OCIDEM
-#define OCIDEM
-
-
-/*  internal/external datatype codes */
-#define VARCHAR2_TYPE            1
-#define NUMBER_TYPE              2
-#define INT_TYPE		 3
-#define FLOAT_TYPE               4
-#define STRING_TYPE              5
-#define ROWID_TYPE              11
-#define DATE_TYPE               12
-
-/*  ORACLE error codes used in demonstration programs */
-#define VAR_NOT_IN_LIST       1007
-#ifndef NO_DATA_FOUND
-#  define NO_DATA_FOUND         1403
-#endif
-#define NULL_VALUE_RETURNED   1405
-
-/*  some SQL and OCI function codes */
-#define FT_INSERT                3
-#define FT_SELECT                4
-#define FT_UPDATE                5
-#define FT_DELETE                9
-
-#define FC_OOPEN                14
-
-/*
- *  OCI function code labels,
- *  corresponding to the fc numbers
- *  in the cursor data area.
- */
-static CONST text  *oci_func_tab[] =  {(text *) "not used",
-/* 1-2 */       (text *) "not used", (text *) "OSQL",
-/* 3-4 */       (text *) "not used", (text *) "OEXEC, OEXN",
-/* 5-6 */       (text *) "not used", (text *) "OBIND",
-/* 7-8 */       (text *) "not used", (text *) "ODEFIN",
-/* 9-10 */      (text *) "not used", (text *) "ODSRBN",
-/* 11-12 */     (text *) "not used", (text *) "OFETCH, OFEN",
-/* 13-14 */     (text *) "not used", (text *) "OOPEN",
-/* 15-16 */     (text *) "not used", (text *) "OCLOSE",
-/* 17-18 */     (text *) "not used", (text *) "not used",
-/* 19-20 */     (text *) "not used", (text *) "not used",
-/* 21-22 */     (text *) "not used", (text *) "ODSC",
-/* 23-24 */     (text *) "not used", (text *) "ONAME",
-/* 25-26 */     (text *) "not used", (text *) "OSQL3",
-/* 27-28 */     (text *) "not used", (text *) "OBNDRV",
-/* 29-30 */     (text *) "not used", (text *) "OBNDRN",
-/* 31-32 */     (text *) "not used", (text *) "not used",
-/* 33-34 */     (text *) "not used", (text *) "OOPT",
-/* 35-36 */     (text *) "not used", (text *) "not used",
-/* 37-38 */     (text *) "not used", (text *) "not used",
-/* 39-40 */     (text *) "not used", (text *) "not used",
-/* 41-42 */     (text *) "not used", (text *) "not used",
-/* 43-44 */     (text *) "not used", (text *) "not used",
-/* 45-46 */     (text *) "not used", (text *) "not used",
-/* 47-48 */     (text *) "not used", (text *) "not used",
-/* 49-50 */     (text *) "not used", (text *) "not used",
-/* 51-52 */     (text *) "not used", (text *) "OCAN",
-/* 53-54 */     (text *) "not used", (text *) "OPARSE",
-/* 55-56 */     (text *) "not used", (text *) "OEXFET",
-/* 57-58 */     (text *) "not used", (text *) "OFLNG",
-/* 59-60 */     (text *) "not used", (text *) "ODESCR",
-/* 61-62 */     (text *) "not used", (text *) "OBNDRA",
-/* 63-64 */     (text *) "OBINDPS",  (text *) "ODEFINPS",
-/* 65-66 */     (text *) "OGETPI",   (text *) "OSETPI"
-};
-
-#endif      /* OCIDEM */
-
diff --git a/src/terralib/drivers/OracleSpatial/OCI/include/ocidfn.h b/src/terralib/drivers/OracleSpatial/OCI/include/ocidfn.h
deleted file mode 100644
index 0364eec..0000000
--- a/src/terralib/drivers/OracleSpatial/OCI/include/ocidfn.h
+++ /dev/null
@@ -1,251 +0,0 @@
-/*
- * $Header: /home/terralib/src/terralib/drivers/OracleSpatial/OCI/include/ocidfn.h,v 1.3 2005/05/06 16:48:56 karine Exp $ 
- */
-
-/* Copyright (c) 1991, 2002, Oracle Corporation.  All rights reserved.  */
-/* Copyright (c) 1991, 2002, Oracle Corporation.  All rights reserved.  */
-/*
-   NAME
-     ocidfn.h - OCI Definations
-   NOTES
-     Shipped to users.
-   MODIFIED   (MM/DD/YY)
-    srseshad   11/25/02 - change binary float/double codes
-    srseshad   11/14/02 - Add SQLT_IBFLOAT, SQLT_IBDOUBLE
-    mxyang     09/17/02 - grabtrans 'mmorsi_obj_float'
-    srseshad   09/06/02 - Add binary float/double
-    aahluwal   06/04/02 - bug 2360115
-    kmuthukk   05/02/00 - add SQLT_PNTY
-    amangal    07/30/99 - Merge into 8.1.6 : Bug 879031
-    tnbui      07/28/99 - Remove SQLT_TIMESTAMP_ITZ                            
-    tnbui      07/21/99 - SQLT_TIMESTAMP_LTZ                                   
-    tnbui      06/16/99 - TIMESTAMP WITH IMPLICIT TIME ZONE                    
-    whe        04/07/99 - bug#810075
-    whe        03/19/99 - lrg 32079 etc.: move HDA def from ocidem.h to ocidfn.
-    skmishra   05/10/98 -
-    vyanaman   04/16/98 - update sql92 datatypes
-    khnguyen   01/16/98 -
-    khnguyen   12/23/97 - SQLT* for datetimes and intervals
-    tanguyen   08/19/97 -
-    dchatter   03/18/97 -  porting exception 390897
-    dchatter   05/02/97 -   merge porting exception
-    dalpern    12/04/96 -   SQLCS_LIT_NULL added
-    cxcheng    11/14/96 -   add SQLT_BFILE/SQLT_CFILE to fix compile prob
-    cxcheng    11/12/96 -   add SQLT_NCO for named collection
-    lchidamb   10/17/96 -   add SQLT_VST and SQLT_ODT
-    sgollapu   10/14/96 -   Mutual exclusion of ocidfn and sqldef
-    sgollapu   10/07/96 -   OCI Simplification
-    aroy       09/09/96 -   add SQLCS* definitions
-    slari      08/07/96 -  add SQLT_RDD, rowid descriptor
-    slari      06/12/96 -  remove SQLT_TTBL
-    dchatter   04/21/96 -  prepare for merge into main
-    slari      08/24/95 -  b299432, define CDA_SIZE
-    zwalcott   02/28/96 -  add SQLT_BFILEE and SQLT_CFILEE.
-    lchidamb   02/22/96 -  make dtys consistent with dtydef.h
-    lchidamb   02/16/96 -  add SQLT_BFILEE and SQLT_CFILEE
-    lchidamb   01/30/96 -  rename new datatypes for v8
-    lchidamb   09/06/95 -  add new datatypes
-    slari      05/11/95 -  add OCI_EV_DEF and OCI_EV_TSF
-    dchatter   04/06/95 -  add ifdef flags around OCI_flags
-    dchatter   03/08/95 -  piece values
-    dchatter   03/06/95 -  merge changes from branch 1.2.720.3
-    jfbrown    02/17/95 -  merge changes from branch 1.2.720.2
-    dchatter   02/08/95 -  olog call modes
-    jfbrown    02/03/95 -  remove non-printable characters
-    lchidamb   12/06/94 -  merge changes from branch 1.2.720.1
-    lchidamb   10/04/94 -  added field chk to cda_head, cda_def
-    dchatter   07/05/94 -  SQLT_CUR added
-    rkooi2     11/27/92 -  Changing e* datatypes to s* 
-    rkooi2     10/26/92 -  More portability mods 
-    rkooi2     10/22/92 -  Added #ifndef ORATYPES ... 
-    rkooi2     10/18/92 -  Changes to make it portable. 
-    sjain      03/16/92 -  Creation 
-*/
-
-/*
- *  ocidfn.h
- *
- *  Common header file for OCI C sample programs.
- *  This header declares the cursor and logon data area structure.
- *  The types used are defined in <oratypes.h>.
- *
- */
- 
-#ifndef OCIDFN
-#define OCIDFN
-
-#include <oratypes.h>
-
-/* The cda_head struct is strictly PRIVATE.  It is used
-   internally only. Do not use this struct in OCI programs. */
-
-struct cda_head {
-    sb2          v2_rc;
-    ub2          ft;
-    ub4          rpc;
-    ub2          peo;
-    ub1          fc;
-    ub1          rcs1;
-    ub2          rc;
-    ub1          wrn;
-    ub1          rcs2;
-    sword        rcs3;
-    struct {
-        struct {
-           ub4    rcs4;
-           ub2    rcs5;
-           ub1    rcs6;
-        } rd;
-        ub4    rcs7;
-        ub2    rcs8;
-    } rid;
-    sword        ose;
-    ub1           chk;
-    dvoid        *rcsp;
-};
-
-/*
-** Size of HDA area:
-** 512 for 64 bit arquitectures
-** 256 for 32 bit arquitectures
-*/
-
-#if defined(SS_64BIT_SERVER) || defined(__64BIT__)
-# define HDA_SIZE 512
-#else
-# define HDA_SIZE 256
-#endif
-
-#if defined(SS_64BIT_SERVER) || defined(__64BIT__)
-#define CDA_SIZE 88
-#else
-# define CDA_SIZE 64
-#endif
-
-/* the real CDA, padded to CDA_SIZE bytes in size */
-struct cda_def {
-    sb2          v2_rc;                                    /* V2 return code */
-    ub2          ft;                                    /* SQL function type */
-    ub4          rpc;                                /* rows processed count */
-    ub2          peo;                                  /* parse error offset */
-    ub1          fc;                                    /* OCI function code */
-    ub1          rcs1;                                        /* filler area */
-    ub2          rc;                                       /* V7 return code */
-    ub1          wrn;                                       /* warning flags */
-    ub1          rcs2;                                           /* reserved */
-    sword        rcs3;                                           /* reserved */
-    struct {                                              /* rowid structure */
-        struct {
-           ub4    rcs4;
-           ub2    rcs5;
-           ub1    rcs6;
-        } rd;
-        ub4    rcs7;
-        ub2    rcs8;
-    } rid;
-    sword        ose;                                 /* OSD dependent error */
-    ub1           chk;
-    dvoid        *rcsp;                          /* pointer to reserved area */
-    ub1          rcs9[CDA_SIZE - sizeof (struct cda_head)];        /* filler */
-};
-
-typedef struct cda_def Cda_Def;
-
-/* the logon data area (LDA)
-   is the same shape as the CDA */
-typedef struct cda_def Lda_Def;
-
-/* OCI Environment Modes for opinit call */
-#define OCI_EV_DEF 0                  /* default single-threaded environment */
-#define OCI_EV_TSF 1                              /* thread-safe environment */
-
-/* OCI Logon Modes for olog call */
-#define OCI_LM_DEF 0                                        /* default login */
-#define OCI_LM_NBL 1                                   /* non-blocking logon */
-
-/* 
- * since sqllib uses both ocidef and ocidfn the following defines
- * need to be guarded
- */
-#ifndef OCI_FLAGS 
-#define OCI_FLAGS
-
-/* OCI_*_PIECE defines the piece types that are returned or set
-*/
-#define OCI_ONE_PIECE   0                 /* there or this is the only piece */
-#define OCI_FIRST_PIECE 1                        /* the first of many pieces */
-#define OCI_NEXT_PIECE  2                         /* the next of many pieces */
-#define OCI_LAST_PIECE  3                   /* the last piece of this column */
-#endif
-
-#ifndef SQLDEF 
-
-/* input data types */
-#define SQLT_CHR  1                        /* (ORANET TYPE) character string */
-#define SQLT_NUM  2                          /* (ORANET TYPE) oracle numeric */
-#define SQLT_INT  3                                 /* (ORANET TYPE) integer */
-#define SQLT_FLT  4                   /* (ORANET TYPE) Floating point number */
-#define SQLT_STR  5                                /* zero terminated string */
-#define SQLT_VNU  6                        /* NUM with preceding length byte */
-#define SQLT_PDN  7                  /* (ORANET TYPE) Packed Decimal Numeric */
-#define SQLT_LNG  8                                                  /* long */
-#define SQLT_VCS  9                             /* Variable character string */
-#define SQLT_NON  10                      /* Null/empty PCC Descriptor entry */
-#define SQLT_RID  11                                                /* rowid */
-#define SQLT_DAT  12                                /* date in oracle format */
-#define SQLT_VBI  15                                 /* binary in VCS format */
-#define SQLT_BFLOAT 21                                /* Native Binary float*/
-#define SQLT_BDOUBLE 22                             /* NAtive binary double */
-#define SQLT_BIN  23                                  /* binary data(DTYBIN) */
-#define SQLT_LBI  24                                          /* long binary */
-#define SQLT_UIN  68                                     /* unsigned integer */
-#define SQLT_SLS  91                        /* Display sign leading separate */
-#define SQLT_LVC  94                                  /* Longer longs (char) */
-#define SQLT_LVB  95                                   /* Longer long binary */
-#define SQLT_AFC  96                                      /* Ansi fixed char */
-#define SQLT_AVC  97                                        /* Ansi Var char */
-#define SQLT_IBFLOAT  100                           /* binary float canonical */
-#define SQLT_IBDOUBLE 101                          /* binary double canonical */
-#define SQLT_CUR  102                                        /* cursor  type */
-#define SQLT_RDD  104                                    /* rowid descriptor */
-#define SQLT_LAB  105                                          /* label type */
-#define SQLT_OSL  106                                        /* oslabel type */
-
-#define SQLT_NTY  108                                   /* named object type */
-#define SQLT_REF  110                                            /* ref type */
-#define SQLT_CLOB 112                                       /* character lob */
-#define SQLT_BLOB 113                                          /* binary lob */
-#define SQLT_BFILEE 114                                   /* binary file lob */
-#define SQLT_CFILEE 115                                /* character file lob */
-#define SQLT_RSET 116                                     /* result set type */
-#define SQLT_NCO  122      /* named collection type (varray or nested table) */
-#define SQLT_VST  155                                      /* OCIString type */
-#define SQLT_ODT  156                                        /* OCIDate type */
-
-/* datetimes and intervals */
-#define SQLT_DATE                      184                      /* ANSI Date */
-#define SQLT_TIME                      185                           /* TIME */
-#define SQLT_TIME_TZ                   186            /* TIME WITH TIME ZONE */
-#define SQLT_TIMESTAMP                 187                      /* TIMESTAMP */
-#define SQLT_TIMESTAMP_TZ              188       /* TIMESTAMP WITH TIME ZONE */
-#define SQLT_INTERVAL_YM               189         /* INTERVAL YEAR TO MONTH */
-#define SQLT_INTERVAL_DS               190         /* INTERVAL DAY TO SECOND */
-#define SQLT_TIMESTAMP_LTZ             232        /* TIMESTAMP WITH LOCAL TZ */
-
-#define SQLT_PNTY   241              /* pl/sql representation of named types */
-
-/* cxcheng: this has been added for backward compatibility -
-   it needs to be here because ocidfn.h can get included ahead of sqldef.h */
-#define SQLT_FILE SQLT_BFILEE                             /* binary file lob */
-#define SQLT_CFILE SQLT_CFILEE
-#define SQLT_BFILE SQLT_BFILEE
- 
-/* CHAR/NCHAR/VARCHAR2/NVARCHAR2/CLOB/NCLOB char set "form" information */
-#define SQLCS_IMPLICIT 1     /* for CHAR, VARCHAR2, CLOB w/o a specified set */
-#define SQLCS_NCHAR    2                  /* for NCHAR, NCHAR VARYING, NCLOB */
-#define SQLCS_EXPLICIT 3   /* for CHAR, etc, with "CHARACTER SET ..." syntax */
-#define SQLCS_FLEXIBLE 4                 /* for PL/SQL "flexible" parameters */
-#define SQLCS_LIT_NULL 5      /* for typecheck of NULL and empty_clob() lits */
-
-#endif  /* SQLDEF */
-#endif  /* OCIDFN */
diff --git a/src/terralib/drivers/OracleSpatial/OCI/include/ociextp.h b/src/terralib/drivers/OracleSpatial/OCI/include/ociextp.h
deleted file mode 100644
index e20a832..0000000
--- a/src/terralib/drivers/OracleSpatial/OCI/include/ociextp.h
+++ /dev/null
@@ -1,281 +0,0 @@
-/*
- * $Header: /home/terralib/src/terralib/drivers/OracleSpatial/OCI/include/ociextp.h,v 1.3 2005/05/06 16:48:56 karine Exp $
- */
-
-/* Copyright (c) 1996, 2003, Oracle Corporation.  All rights reserved.  */
- 
-/* 
-   NAME 
-     ociextp.h - Interface Definitions for PL/SQL External Procedures
-
-   DESCRIPTION 
-     This header file contains C language callable interface from 
-     PL/SQL External Procedures.
-
-   PUBLIC FUNCTION(S) 
-     OCIExtProcAllocCallMemory  - Allocate Call memory
-     OCIExtProcRaiseExcp        - Raise Exception
-     OCIExtProcRaiseExcpWithMsg - Raise Exception with message
-     OCIExtProcGetEnv           - Get OCI Environment
-
-   PRIVATE FUNCTION(S)
-     <list of static functions defined in .c file - with one-line descriptions>
-
-   EXAMPLES
-
-   NOTES
-     <other useful comments, qualifications, etc.>
-
-   MODIFIED   (MM/DD/YY)
-   srseshad    03/12/03 - convert oci public api to ansi
-   rdecker     01/10/02 - change 32k to MAX_OEN for error numbers
-   sagrawal    07/20/01 - Statement Handle to safe cal outs
-   abrumm      04/19/01 - move include of oci.h after defines/typedef
-   rdecker     02/22/01 - lint fix
-   bpalaval    02/08/01 - Change text to oratext.
-   sagrawal    06/16/00 - ref cursor in callouts
-   whe         09/01/99 - 976457:check __cplusplus for C++ code
-   asethi      04/15/99 - Created (by moving ociextp.h from /vobs/plsql/public)
-   rhari       03/25/97 - Use ifndef
-   rhari       12/18/96 - Include oratypes.h
-   rhari       12/11/96 - #416977, Flip values of return codes
-   rhari       12/02/96 - Define Return Code Macros
-   rhari       11/18/96 - Error number is int
-   rhari       10/30/96 - Fix OCIExtProcRaiseExcpWithMsg
-   rhari       10/30/96 - Get rid of warnings
-   rhari       10/04/96 - Fix OCIExtProcRaiseExcpWithMsg
-   rhari       09/23/96 - Creation
-
-*/
-
- 
-#ifndef OCIEXTP_ORACLE
-# define OCIEXTP_ORACLE
-
-# ifndef ORATYPES 
-#  include <oratypes.h> 
-# endif
-
-
-/*---------------------------------------------------------------------------
-                     PUBLIC TYPES AND CONSTANTS
-  ---------------------------------------------------------------------------*/
-
-
-/* ----------------------------- Return Codes ----------------------------- */
-/* Success and Error return codes for certain external procedure interface 
- * functions. If a particular interface function returns OCIEXTPROC_SUCCESS
- * or OCIEXTPROC_ERROR, then applications must use these macros to check
- * for return values.
- *
- *     OCIEXTPROC_SUCCESS  -- External Procedure Success Return Code 
- *     OCIEXTPROC_ERROR    -- External Procedure Failure Return Code 
- */
-#define OCIEXTPROC_SUCCESS 0
-#define OCIEXTPROC_ERROR   1
-
-
-/* --------------------------- With-Context Type --------------------------- */
-/*
- * The C callable interface to PL/SQL External Procedures require the 
- * With-Context parameter to be passed. The type of this structure is 
- * OCIExtProcContext is is opaque to the user.
- *
- * The user can declare the With-Context parameter in the application as
- *
- *    OCIExtProcContext *with_context;
- */
-typedef struct OCIExtProcContext OCIExtProcContext;
-
-/* NOTE: OCIExtProcContext must be visible prior to including <oci.h> */
-
-# ifndef OCI_ORACLE
-#  include <oci.h>
-# endif
-
-
-/* ----------------------- OCIExtProcAllocCallMemory ----------------------- */
-/* OCIExtProcAllocCallMemory
- *    Allocate N bytes of memory for the duration of the External Procedure.
- *
- *    Memory thus allocated will be freed by PL/SQL upon return from the
- *    External Procedure. You must not use any kind of 'free' function on 
- *    memory allocated by OCIExtProcAllocCallMemory.
- *    Use this function to allocate memory for function returns.
- * 
- * PARAMETERS
- * Input : 
- *    with_context - The with_context pointer that is passed to the C 
- *                   External Procedure.
- *                  Type of with_context : OCIExtProcContext *
- *    amount       - The number of bytes to allocate.
- *                   Type of amount : size_t
- *
- * Output :
- *    Nothing
- *
- * Return :
- *    An untyped (opaque) Pointer to the allocated memory. 
- *
- * Errors :
- *    A 0 return value should be treated as an error
- *
- * EXAMPLE 
- *  text *ptr = (text *)OCIExtProcAllocCallMemory(wctx, 1024)
- *
- */
-#define OCIExtProcAllocCallMemory(with_context, amount) \
-ociepacm(with_context, (size_t)amount)
-
-
-
-
-/* -------------------------- OCIExtProcRaiseExcp -------------------------- */
-/* OCIExtProcRaiseExcp
- *    Raise an Exception to PL/SQL.
- *
- *  Calling this function signalls an exception back to PL/SQL. After a
- *  successful return from this function, the External Procedure must start 
- *  its exit handling and return back to PL/SQL. Once an exception is 
- *  signalled to PL/SQL, INOUT and OUT arguments, if any, are not processed 
- *  at all.
- * 
- * PARAMETERS
- * Input :
- *   with_context - The with_context pointer that is passed to the C
- *                  External Procedure. 
- *                  Type of with_context : OCIExtProcContext *
- *   errnum       - Oracle Error number to signal to PL/SQL. errnum
- *                  must be a positive number and in the range 1 to MAX_OEN
- *                  Type of errnum : int
- * Output :
- *   Nothing
- *
- * Return :
- *   OCIEXTPROC_SUCCESS - If the call was successful.
- *   OCIEXTPROC_ERROR   - If the call failed.
- *
- */
-#define OCIExtProcRaiseExcp(with_context, errnum) \
-ocieperr(with_context, (int)errnum)
-
-
-
-
-
-/* ---------------------- OCIExtProcRaiseExcpWithMsg ---------------------- */
-/* OCIExtProcRaiseExcpWithMsg
- *    Raise an exception to PL/SQL. In addition, substitute the
- *    following error message string within the standard Oracle error 
- *    message string. See note for OCIExtProcRaiseExcp
- * 
- * PARAMETERS
- * Input :
- *   with_context  - The with_context pointer that is passed to the C
- *                   External Procedure.
- *                   Type of with_context : OCIExtProcContext *
- *   errnum        - Oracle Error number to signal to PL/SQL. errnum
- *                   must be a positive number and in the range 1 to MAX_OEN
- *                   Type of errnum : int
- *   errmsg        - The error message associated with the errnum.
- *                   Type of errmsg : char *
- *   len           - The length of the error message. 0 if errmsg is
- *                   null terminated string.
- *                   Type of len : size_t
- * Output :
- *   Nothing
- *
- * Return :
- *  OCIEXTPROC_SUCCESS - If the call was successful.
- *  OCIEXTPROC_ERROR   - If the call failed.
- *
- */
-#define OCIExtProcRaiseExcpWithMsg(with_context, errnum, errmsg, msglen) \
-ociepmsg(with_context, (int)errnum, errmsg, (size_t)msglen)
-
-
-
-/* --------------------------- OCIExtProcGetEnv --------------------------- */
-/* OCIExtProcGetEnv
- *    Get OCI Environment
- * 
- * PARAMETERS
- * Input :
- *    with_context - The with_context pointer that is passed to the C
- *                   External Procedure.
- *
- * Output :
- *    envh - The OCI Environment handle.
- *    svch - The OCI Service handle.
- *    errh - The OCI Error handle.
- *
- * Return :
- *  OCI_SUCCESS - Successful completion of the function.
- *  OCI_ERROR   - Error.
- *
- */
-#define OCIExtProcGetEnv(with_context, envh, svch, errh) \
-ociepgoe(with_context, envh, svch, errh)
-
-
-
-/* ------------------------ OCIInitializeStatementHandle ------------------- */
-/* OCIreateStatementHandle
- *    Initialize Statement Handle
- * 
- * PARAMETERS
- * Input :
- *    wctx     - The 
- *    cursorno - The cursor number for which we need to initialize
- *               the statement handle
- *    svch     - The OCI Service handle.
- *
- * Output :
- *    stmthp - The OCI Statement handle.
- *    errh   - The OCI Error handle.
- *
- * Return :
- *  OCI_SUCCESS - Successful completion of the function.
- *  OCI_ERROR   - Error.
- *
- */
-#define OCIInitializeStatementHandle(wctx, cursorno,  svch, stmthp, errh) \
-ociepish(wctx, cursor, svch, stmthp, errh)
-
-
-
-
-/*---------------------------------------------------------------------------
-                     PRIVATE TYPES AND CONSTANTS
-  ---------------------------------------------------------------------------*/
-
-
-/*---------------------------------------------------------------------------
-                           PUBLIC FUNCTIONS
-  ---------------------------------------------------------------------------*/
-
-
-/*---------------------------------------------------------------------------
-                          PRIVATE FUNCTIONS
-  ---------------------------------------------------------------------------*/
-
-
-
-dvoid *ociepacm(OCIExtProcContext *with_context, size_t amount);
-
-
-
-size_t ocieperr(OCIExtProcContext *with_context, int error_number);
-
-
-
-size_t ociepmsg(OCIExtProcContext *with_context, int error_number,
-                oratext *error_message, size_t len );
-
-
-
-sword ociepgoe(OCIExtProcContext *with_context, OCIEnv **envh, 
-               OCISvcCtx **svch, OCIError **errh);
-
-
-#endif                                                     /* OCIEXTP_ORACLE */
diff --git a/src/terralib/drivers/OracleSpatial/OCI/include/ocikp.h b/src/terralib/drivers/OracleSpatial/OCI/include/ocikp.h
deleted file mode 100644
index f6de3db..0000000
--- a/src/terralib/drivers/OracleSpatial/OCI/include/ocikp.h
+++ /dev/null
@@ -1,10223 +0,0 @@
-/*
- * $Header: /home/terralib/src/terralib/drivers/OracleSpatial/OCI/include/ocikp.h,v 1.2 2002/12/13 13:33:58 karine Exp $
- */
-/* Copyright (c) 1996, 2002, Oracle Corporation.  All rights reserved.  */
- 
-/* NOTE:  See 'header_template.doc' in the 'doc' dve under the 'forms' 
-      directory for the header file template that includes instructions. 
-*/
- 
-/* 
-   NAME 
-     ocikp.h - Prototypes of V8 OCI functions in K&R style
-
-   DESCRIPTION 
-     defines the prototypes of V8 OCI functions in K&R style
-
-   RELATED DOCUMENTS 
- 
-   INSPECTION STATUS 
-     Inspection date: 
-     Inspection status: 
-     Estimated increasing cost defects per page: 
-     Rule sets: 
- 
-   ACCEPTANCE REVIEW STATUS 
-     Review date: 
-     Review status: 
-     Reviewers: 
- 
-   PUBLIC FUNCTION(S) 
-     <list of external functions declared/defined - with one-line descriptions>
-
-   PRIVATE FUNCTION(S) 
-     <list of static functions defined in .c file - with one-line descriptions>
- 
-   EXAMPLES 
- 
-   NOTES 
-     <other useful comments, qualifications, etc.> 
-
-   MODIFIED   (MM/DD/YY)
-   sichandr    02/12/02 - fix OCIXMLTypeExists
-   gayyappa    02/01/02 - fix 2210776 : change Dom to DOM 
-   sichandr    10/24/01 - OCISvcCtx for XMLType create routines
-   schandir    09/24/01 - Add prototypes for Stmt Caching
-   abande      09/04/01 - Add Prototypes for Session Pooling Methods
-   stakeda     09/24/01 - add OCINlsCharSetConvert and 
-                          OCINlsEnvironmentVariableGet.
-   whe         08/28/01 - add OCIEnvNlsCreate
-   wzhang      08/22/01 - Add OCINlsCharSetNameToId.
-   whe         10/05/01 - add prototype for OCIXMLType functions
-   mdmehta     04/06/01 - Bug 1683763, OCIDateTimeToText: buf_size to ub4*
-   schandir    12/12/00 - modify the ociconnectionpoolcreate() interface.
-   porangas    12/04/00 - Forward merge bug#974710 to 9i
-   gtarora     11/30/00 - fix comment for OCILobIsTemporary
-   akatti      11/07/00 - [1198379]:add OCIRowidToChar
-   bpalaval    10/15/00 - Forward merge 892654.
-   kmohan      09/18/00 - add OCILogon2
-   etucker     07/28/00 - add OCIIntervalFromTZ
-   vjayaram    07/18/00 - add connection pooling changes
-   etucker     07/13/00 - add dls apis for oci
-   hmasaki     07/05/00 - fix 1230846: forward merge into 8.2
-   mbastawa    06/05/00 - add OCIStmtFetch2
-   rxgovind    06/07/00 - update OCIAnyData interfaces
-   rxgovind    05/04/00 - add OCIAnyDataSet interfaces
-   rkasamse    05/01/00 - add ocianydata i/f
-   slari       09/01/99 - remove OCIEnvCallback
-   slari       08/23/99 - add OCIUcb in user callback functions
-   whe         09/01/99 - 976457:check __cplusplus for C++ code
-   dsaha       07/07/99 - Add OCIFEnvCreate for forms
-  vyanaman    06/21/99 - Change OCI DateTime/Interval APIs.
-   esoyleme    07/01/99 - expose MTS performance enhancements                  
-   whe         06/14/99 - bug727872:add CONST to match definitions
-   kkarun      02/23/99 - Fix OCIDateTime APIs
-   jiyang      12/07/98 - Add comments for OCI_NLS_DUAL_CURRENCY
-   aroy        12/01/98 - add OCIEnvCreate
-   slari       11/23/98 - use ORASTDARG
-   slari       11/22/98 - use arglist in OCIUserCallback
-   slari       11/21/98 - replace ellipsis by arglist in OCIUserCallback
-   thchang     10/20/98 - correct comment on OCILobCreateTemporary
-   sgollapu    09/30/98 - Fix bug 725473
-   slari       09/08/98 - allow envh to receive error info also in CallbackReg/
-   lchidamb    07/07/98 - change comments
-   aroy        08/04/98 - add OCITerminate calls                               
-   sgollapu    06/30/98 - Add OCISubscription* prototypes
-   nramakri    06/25/98 - remove CONST from some OCIPickler APIs
-   jiyang      06/22/98 - Fix a lint error
-   nmallava    06/08/98 - ociistemporary -> envhp
-   jhasenbe    05/27/98 - Remove definitions for U-Calls (Unicode)
-   nmallava    05/18/98 - correct comment
-   sgollapu    05/19/98 - Change text to OraText
-   aroy        04/20/98 - merge forward 8.0.5 -> 8.1.3
-   nbhatt      05/14/98 - aq listen call
-   vyanaman    04/19/98 - system timestamp
-   kkarun      04/17/98 - Add more Interval functions
-   vyanaman    04/16/98 - Add get/set TZ
-   kkarun      04/13/98 - add datetime prototypes
-   rkasamse    04/13/98 - change OCIEnv* to dvoid* for context/memory cart serv
-   rkasamse    04/15/98 - chage pickler cart interface
-   slari       03/20/98 - change proto of OCIUserCallback
-   slari       02/17/98 - add OCIEnvCallback
-   jiyang      04/02/98 - Accept both env and user handles for NLS
-   nmallava    04/09/98 - OCILobLocatorAssign
-   nmallava    04/07/98 - fix compiler warnings
-   jhasenbe    04/06/98 - Add new interfaces for Unicode support
-   skabraha    03/24/98 - fixing prototype mismatch
-   tsaulys     03/20/98 - use environment or session handle
-   rkasamse    03/20/98 - remove prototypes for OCIMemoryDuration* functions
-   nmallava    03/17/98 - add interfaces
-   nmallava    03/16/98 - add open/close apis
-   nmallava    03/10/98 - add temporary lobs apis
-   sgollapu    07/10/97 - Add OCIReset
-   sgollapu    02/09/98 - OCI non-blocking
-   nramakri    01/16/98 - remove #ifdef NEVER clause for OCIExtract
-   rmurthy     01/08/98 - OCIContextGenerateKey: change ub1 to ub4
-   ewaugh      01/02/98 - remove VAFP from OCIFormatString prototype
-   ewaugh      12/18/97 - Turn type wrappers into functions.
-   rtaranto    12/17/97 - Resolve merge conflicts
-   jiyang      11/13/97 - Add NLS service for cartridge
-   rhwu        12/02/97 - add OCI Thread
-   nramakri    12/15/97 - move to core4
-   nramakri    12/11/97 - modify OCIExtract prototype
-   ewaugh      12/10/97 - add OCIFormat prototypes
-   skabraha    12/02/97 - adding OCIFile functions
-   nramakri    11/12/97 - add OCIExtract prototypes
-   rkasamse    11/21/97 - add prototypes for memory cartridge services and cont
-   rkasamse    11/03/97 - Add pickler cartridge service interfaces
-   tanguyen    08/19/97 -
-   schandra    06/25/97 - AQ OCI interface
-   bnainani    07/21/97 - add prototypes for Oracle XA extensions
-   rtaranto    05/20/97 - remove OCILobLocatorSize (again)
-   esoyleme    05/13/97 - move failover callback prototype
-   skmishra    05/06/97 - stdc compiler fixes
-   skmishra    04/23/97 - Provide C++ compatibility
-   skotsovo    04/21/97 - make lob parameter names consistent
-   rwhitman    04/16/97 - Fix LOB prototypes - Olint OCI 8.0.3
-   ramkrish    04/15/97 - Add free flag to OCILobFlushBuffer
-   cxcheng     04/09/97 - change objnamp from CONST text* to dvoid*
-   cxcheng     04/08/97 - fix prototype for OCIDescribeAny
-   skotsovo    03/31/97 - remove OCILobLocatorSize
-   skotsovo    03/27/97 - add OCILobLoadFromFile
-   sgollapu    03/26/97 - Change OCIDescribeAny prototype
-   skotsovo    03/26/97 - add svchp to ocienablebuffering
-   skotsovo    03/26/97 - change OCILobFlushBuffers to OCILobFlushBuffer
-   skotsovo    03/18/97 - add interface for lob buffering.
-   dchatter    01/13/97 - fix comments on LOB calls
-   aroy        01/10/97 - remove ocilobfilecreate delete
-   sgollapu    12/27/96 - Correct OCILogon prototype
-   dchatter    01/04/97 - comments to describe the functions
-   sgollapu    11/25/96 - Change OCILobFileIsExistent
-   schandra    11/18/96 - Remove xa.h include
-   sgollapu    11/09/96 - Change prototype of OCIDescribeAny
-   dchatter    11/01/96 - lint error
-   dchatter    10/31/96 - delete CONST from lob write cb fn
-   dchatter    10/30/96 - more changes
-   dchatter    10/26/96 - lob/file long name corrections
-   slari       10/16/96 - delete unused calls
-   rwessman    10/29/96 - Fixed OCISecurityGetIdentity prototype
-   sgollapu    10/22/96 - Add OCILogon and OCILogoff prototypes
-   rwessman    10/16/96 - Added cryptographic and digital signature functions
-   rxgovind    10/07/96 - add oci file calls
-   skotsovo    09/20/96 - in OCILobGetLength(), remove the 'isnull' parameter.
-   skotsovo    10/01/96 - move orl lob fnts to oci
-   skotsovo    09/20/96 - in OCILobGetLength(), remove the 'isnull' parameter.
-   aroy        08/29/96 - change prototype for Nchar Lob support
-   dchatter    08/21/96 - OCIResultSetToStmt prototype change
-   sthakur     08/14/96 - add OCIParamSet
-   schandra    06/17/96 - Convert XA to use new OCI
-   aroy        07/17/96 - terminology change: OCILobLocator => OCILobLocator
-   dchatter    07/01/96 - drop prototypes not in beta1
-   dchatter    06/29/96 - OCIParamGet prototype change
-   dchatter    06/19/96 - add OCISvcCtxBreak, OCILdaToSvcCtx
-   slari       06/12/96 - inlcude oratypes.h instead of s.h
-   schandra    05/31/96 - remove client DBID parameters from OCITransStart
-   asurpur     06/05/96 - Changing the prototype for OCIPasswordChange
-   dchatter    05/30/96 - change OCIStmtGetBind prototype
-   schandra    05/29/96 - Add timeout parameter to OCITransDetach
-   slari       05/30/96 - add OCIBindDynamic/OCIDefineDynamic
-   slari       05/28/96 - fix gpi/spi protos
-   slari       05/28/96 - change proto for OCIParamGet
-   jbellemo    05/23/96 - remove ociisc
-   schandra    05/15/96 - Remove ocitgti type
-   schandra    04/18/96 - OCITransCommitt -> OCITransCommit
-   schandra    03/27/96 - V8OCI - add transaction related calls
-   dchatter    04/01/96 - change return types to sword to be compatible with oo
-   dchatter    03/21/96 - add oci2lda conversion routines
-   aroy        03/12/96 - change parameter order for lob functions
-   dchatter    03/08/96 - minor parameter renaming for lob calls
-   slari       03/14/96 - change proto of OCITransRollback
-   slari       03/12/96 - remove ocidqry
-   slari       03/01/96 - change proto for OCIInitialize
-   slari       02/07/96 - update prototypes
-   slari       02/06/96 - add OCITransCommit()
-   slari       02/02/96 - ociisc: rm dblink info
-   dchatter    01/08/96 - V8 OCI K&R prototype file
-   dchatter    01/08/96 - Creation
-
-*/
- 
-#ifndef OCIKP_ORACLE
-# define OCIKP_ORACLE
- 
-# ifndef ORATYPES 
-#  include <oratypes.h> 
-# endif 
- 
-#ifndef ORASTDARG
-#include <stdarg.h>
-#define ORASTDARG
-#endif
- 
-#ifndef OCIDFN
-#include <ocidfn.h>
-#endif
-
-#ifndef NZT_ORACLE
-#include <nzt.h>
-#endif /* NZT_ORACLE */
-
-#ifndef OCI_ORACLE
-#include <oci.h>
-#endif
-
-#ifndef ORT_ORACLE
-#include <ort.h>
-#endif 
-
-/*--------------------------------------------------------------------------- 
-                     PUBLIC TYPES AND CONSTANTS 
-  ---------------------------------------------------------------------------*/
-
-/*--------------------------------------------------------------------------- 
-                     PRIVATE TYPES AND CONSTANTS 
-  ---------------------------------------------------------------------------*/
- 
- 
-/*--------------------------------------------------------------------------- 
-                           PUBLIC FUNCTIONS 
-  ---------------------------------------------------------------------------*/
-
-/*------------------Oracle Version 8 Call Interface--------------------------*/
-
-
-/*****************************************************************************
-                              DESCRIPTION
-******************************************************************************
-Note: the descriptions of the functions are alphabetically arranged. Please 
-maintain the arrangement when adding a new function description. The actual 
-prototypes are below this comment section and donot follow any alphabetical 
-ordering. 
-
-
---------------------------------OCIAttrGet------------------------------------
-
-OCIAttrGet()
-Name
-OCI Attribute Get
-Purpose
-This call is used to get a particular attribute of a handle. 
-Syntax
-sword OCIAttrGet ( CONST dvoid    *trgthndlp,
-                 ub4            trghndltyp,
-                 dvoid          *attributep,
-                 ub4            *sizep,
-                 ub4            attrtype,
-                 OCIError       *errhp );
-Comments
-This call is used to get a particular attribute of a handle.
-See Appendix B,  "Handle Attributes",  for a list of handle types and their 
-readable attributes.
-Parameters
-trgthndlp (IN) - is the pointer to a handle type. 
-trghndltyp (IN) - is the handle type. 
-attributep (OUT) - is a pointer to the storage for an attribute value. The 
-attribute value is filled in. 
-sizep (OUT) - is the size of the attribute value. 
-This can be passed in as NULL for most parameters as the size is well known. 
-For OraText* parameters, a pointer to a ub4 must be passed in to get the length 
-of the string. 
-attrtype (IN) - is the type of attribute.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-Related Functions
-OCIAttrSet()
-
---------------------------------OCIAttrSet------------------------------------
-
-
-OCIAttrSet()
-Name
-OCI Attribute Set
-Purpose
-This call is used to set a particular attribute of a handle or a descriptor. 
-Syntax
-sword OCIAttrSet ( dvoid       *trgthndlp,
-                 ub4         trghndltyp,
-                 dvoid       *attributep,
-                 ub4         size,
-                 ub4         attrtype,
-                 OCIError    *errhp );
-Comments
-This call is used to set a particular attribute of a handle or a descriptor. 
-See Appendix B for a list of handle types and their writeable attributes.
-Parameters
-trghndlp (IN/OUT) - the pointer to a handle type whose attribute gets 
-modified. 
-trghndltyp (IN/OUT) - is the handle type. 
-attributep (IN) - a pointer to an attribute value. 
-The attribute value is copied into the target handle. If the attribute value 
-is a pointer, then only the pointer is copied, not the contents of the pointer.
-size (IN) - is the size of an attribute value. This can be passed in as 0 for 
-most attributes as the size is already known by the OCI library. For OraText*
-attributes, a ub4 must be passed in set to the length of the string. 
-attrtype (IN) - the type of attribute being set.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-Related Functions
-OCIAttrGet()
-
-
-
---------------------------------OCIBindArrayOfStruct--------------------------
-
-
-
-OCIBindArrayOfStruct()
-Name
-OCI Bind for Array of Structures
-Purpose
-This call sets up the skip parameters for a static array bind.
-Syntax
-sword OCIBindArrayOfStruct ( OCIBind     *bindp,
-                           OCIError    *errhp,
-                           ub4         pvskip, 
-                           ub4         indskip, 
-                           ub4         alskip, 
-                           ub4         rcskip );
-Comments
-This call sets up the skip parameters necessary for a static array bind.
-This call follows a call to OCIBindByName() or OCIBindByPos(). The bind 
-handle returned by that initial bind call is used as a parameter for the 
-OCIBindArrayOfStruct() call.
-For information about skip parameters, see the section "Arrays of Structures" 
-on page 4-16.
-Parameters
-bindp (IN) - the handle to a bind structure. 
-errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-pvskip (IN) - skip parameter for the next data value. 
-indskip (IN) - skip parameter for the next indicator value or structure. 
-alskip (IN) - skip parameter for the next actual length value. 
-rcskip (IN) - skip parameter for the next column-level return code value. 
-Related Functions
-OCIAttrGet()
-
-
---------------------------------OCIBindByName---------------------------------
-
-
-OCIBindByName()
-Name
-OCI Bind by Name
-Purpose
-Creates an association between a program variable and a placeholder in a SQL 
-statement or PL/SQL block.
-Syntax
-sword OCIBindByName (
-              OCIStmt       *stmtp, 
-              OCIBind       **bindp,
-              OCIError      *errhp,
-              CONST OraText    *placeholder,
-              sb4           placeh_len,
-              dvoid         *valuep,
-              sb4           value_sz,
-              ub2           dty,
-              dvoid         *indp,
-              ub2           *alenp,
-              ub2           *rcodep,
-              ub4           maxarr_len,
-              ub4           *curelep, 
-              ub4           mode ); 
-Description
-This call is used to perform a basic bind operation. The bind creates an 
-association between the address of a program variable and a placeholder in a 
-SQL statement or PL/SQL block. The bind call also specifies the type of data 
-which is being bound, and may also indicate the method by which data will be 
-provided at runtime.
-This function also implicitly allocates the bind handle indicated by the bindp 
-parameter.
-Data in an OCI application can be bound to placeholders statically or 
-dynamically. Binding is static when all the IN bind data and the OUT bind 
-buffers are well-defined just before the execute. Binding is dynamic when the 
-IN bind data and the OUT bind buffers are provided by the application on 
-demand at execute time to the client library. Dynamic binding is indicated by 
-setting the mode parameter of this call to OCI_DATA_AT_EXEC.
-Related Functions: For more information about dynamic binding, see 
-the section "Runtime Data Allocation and Piecewise Operations" on 
-page 5-16.
-Both OCIBindByName() and OCIBindByPos() take as a parameter a bind handle, 
-which is implicitly allocated by the bind call A separate bind handle is 
-allocated for each placeholder the application is binding.
-Additional bind calls may be required to specify particular attributes 
-necessary when binding certain data types or handling input data in certain 
-ways:
-If arrays of structures are being utilized, OCIBindArrayOfStruct() must 
-be called to set up the necessary skip parameters.
-If data is being provided dynamically at runtime, and the application 
-will be using user-defined callback functions, OCIBindDynamic() must 
-be called to register the callbacks.
-If a named data type is being bound, OCIBindObject() must be called to 
-specify additional necessary information.
-Parameters
-stmth (IN/OUT) - the statement handle to the SQL or PL/SQL statement 
-being processed.
-bindp (IN/OUT) - a pointer to a pointer to a bind handle which is implicitly 
-allocated by this call.  The bind handle  maintains all the bind information for 
-this particular input value. The handle is feed implicitly when the statement 
-handle is deallocated.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-placeholder (IN) - the placeholder attributes are specified by name if ocibindn() 
-is being called.
-placeh_len (IN) - the length of the placeholder name specified in placeholder.
-valuep (IN/OUT) - a pointer to a data value or an array of data values of the 
-type specified in the dty parameter. An array of data values can be specified 
-for mapping into a PL/SQL table or for providing data for SQL multiple-row 
-operations. When an array of bind values is provided, this is called an array 
-bind in OCI terms. Additional attributes of the array bind (not bind to a 
-column of ARRAY type) are set up in OCIBindArrayOfStruct() call. 
-For a REF, named data type  bind, the valuep parameter is used only for IN 
-bind data. The pointers to OUT buffers are set in the pgvpp parameter 
-initialized by OCIBindObject(). For named data type and REF binds, the bind 
-values are unpickled into the Object Cache. The OCI object navigational calls 
-can then be used to navigate the objects and the refs in the Object Cache.
-If the OCI_DATA_AT_EXEC mode is specified in the mode parameter, valuep 
-is ignored for all data types. OCIBindArrayOfStruct() cannot be used and 
-OCIBindDynamic() must be invoked to provide callback functions if desired. 
-value_sz (IN) - the size of a data value. In the case of an array bind, this is the 
-maximum size of any element possible with the actual sizes being specified in 
-the alenp parameter. 
-If the OCI_DATA_AT_EXEC mode is specified, valuesz defines the maximum 
-size of the data that can be ever provided at runtime for data types other than 
-named data types or REFs. 
-dty (IN) - the data type of the value(s) being bound. Named data types 
-(SQLT_NTY) and REFs (SQLT_REF) are valid only if the application has been 
-initialized in object mode. For named data types, or REFs, additional calls 
-must be made with the bind handle to set up the datatype-specific attributes.
-indp (IN/OUT) - pointer to an indicator variable or array. For scalar data 
-types, this is a pointer to sb2 or an array of sb2s. For named data types, 
-this pointer is ignored and the actual pointer to the indicator structure or 
-an array of indicator structures is initialized by OCIBindObject(). 
-Ignored for dynamic binds.
-See the section "Indicator Variables" on page 2-43 for more information about 
-indicator variables.
-alenp (IN/OUT) - pointer to array of actual lengths of array elements. Each 
-element in alenp is the length of the data in the corresponding element in the 
-bind value array before and after the execute. This parameter is ignored for 
-dynamic binds.
-rcodep (OUT) - pointer to array of column level return codes. This parameter 
-is ignored for dynamic binds.
-maxarr_len (IN) - the maximum possible number of elements of type dty in a 
-PL/SQL binds. This parameter is not required for non-PL/SQL binds. If 
-maxarr_len is non-zero, then either OCIBindDynamic() or 
-OCIBindArrayOfStruct() can be invoked to set up additional bind attributes. 
-curelep(IN/OUT) - a pointer to the actual number of elements. This parameter 
-is only required for PL/SQL binds.
-mode (IN) - the valid modes for this parameter are:
-OCI_DEFAULT. This is default mode.
-OCI_DATA_AT_EXEC. When this mode is selected, the value_sz 
-parameter defines the maximum size of the data that can be ever 
-provided at runtime. The application must be ready to provide the OCI 
-library runtime IN data buffers at any time and any number of times. 
-Runtime data is provided in one of the two ways:
-callbacks using a user-defined function which must be registered 
-with a subsequent call to OCIBindDynamic(). 
-a polling mechanism using calls supplied by the OCI. This mode 
-is assumed if no callbacks are defined.
-For more information about using the OCI_DATA_AT_EXEC mode, see 
-the section "Runtime Data Allocation and Piecewise Operations" on 
-page 5-16.
-When the allocated buffers are not required any more, they should be 
-freed by the client. 
-Related Functions
-OCIBindDynamic(), OCIBindObject(), OCIBindArrayOfStruct(), OCIAttrGet()
-
-
--------------------------------OCIBindByPos----------------------------------
-
-
-OCIBindByPos()
-Name
-OCI Bind by Position
-Purpose
-Creates an association between a program variable and a placeholder in a SQL 
-statement or PL/SQL block.
-Syntax
-sword OCIBindByPos ( 
-              OCIStmt      *stmtp, 
-              OCIBind      **bindp,
-              OCIError     *errhp,
-              ub4          position,
-              dvoid        *valuep,
-              sb4          value_sz,
-              ub2          dty,
-              dvoid        *indp,
-              ub2          *alenp,
-              ub2          *rcodep,
-              ub4          maxarr_len,
-              ub4          *curelep, 
-              ub4          mode);
-
-Description
-This call is used to perform a basic bind operation. The bind creates an 
-association between the address of a program variable and a placeholder in a 
-SQL statement or PL/SQL block. The bind call also specifies the type of data 
-which is being bound, and may also indicate the method by which data will be 
-provided at runtime.
-This function also implicitly allocates the bind handle indicated by the bindp 
-parameter.
-Data in an OCI application can be bound to placeholders statically or 
-dynamically. Binding is static when all the IN bind data and the OUT bind 
-buffers are well-defined just before the execute. Binding is dynamic when the 
-IN bind data and the OUT bind buffers are provided by the application on 
-demand at execute time to the client library. Dynamic binding is indicated by 
-setting the mode parameter of this call to OCI_DATA_AT_EXEC.
-Related Functions: For more information about dynamic binding, see 
-the section "Runtime Data Allocation and Piecewise Operations" on 
-page 5-16
-Both OCIBindByName() and OCIBindByPos() take as a parameter a bind handle, 
-which is implicitly allocated by the bind call A separate bind handle is 
-allocated for each placeholder the application is binding.
-Additional bind calls may be required to specify particular attributes 
-necessary when binding certain data types or handling input data in certain 
-ways:
-If arrays of structures are being utilized, OCIBindArrayOfStruct() must 
-be called to set up the necessary skip parameters.
-If data is being provided dynamically at runtime, and the application 
-will be using user-defined callback functions, OCIBindDynamic() must 
-be called to register the callbacks.
-If a named data type is being bound, OCIBindObject() must be called to 
-specify additional necessary information.
-Parameters
-stmth (IN/OUT) - the statement handle to the SQL or PL/SQL statement 
-being processed.
-bindp (IN/OUT) - a pointer to a pointer to a bind handle which is implicitly 
-allocated by this call.  The bind handle  maintains all the bind information for 
-this particular input value. The handle is feed implicitly when the statement 
-handle is deallocated.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-position (IN) - the placeholder attributes are specified by position if ocibindp() 
-is being called.
-valuep (IN/OUT) - a pointer to a data value or an array of data values of the 
-type specified in the dty parameter. An array of data values can be specified 
-for mapping into a PL/SQL table or for providing data for SQL multiple-row 
-operations. When an array of bind values is provided, this is called an array 
-bind in OCI terms. Additional attributes of the array bind (not bind to a 
-column of ARRAY type) are set up in OCIBindArrayOfStruct() call. 
-For a REF, named data type  bind, the valuep parameter is used only for IN 
-bind data. The pointers to OUT buffers are set in the pgvpp parameter 
-initialized by OCIBindObject(). For named data type and REF binds, the bind 
-values are unpickled into the Object Cache. The OCI object navigational calls 
-can then be used to navigate the objects and the refs in the Object Cache.
-If the OCI_DATA_AT_EXEC mode is specified in the mode parameter, valuep 
-is ignored for all data types. OCIBindArrayOfStruct() cannot be used and 
-OCIBindDynamic() must be invoked to provide callback functions if desired. 
-value_sz (IN) - the size of a data value. In the case of an array bind, this is the 
-maximum size of any element possible with the actual sizes being specified in 
-the alenp parameter. 
-If the OCI_DATA_AT_EXEC mode is specified, valuesz defines the maximum 
-size of the data that can be ever provided at runtime for data types other than 
-named data types or REFs. 
-dty (IN) - the data type of the value(s) being bound. Named data types 
-(SQLT_NTY) and REFs (SQLT_REF) are valid only if the application has been 
-initialized in object mode. For named data types, or REFs, additional calls 
-must be made with the bind handle to set up the datatype-specific attributes.
-indp (IN/OUT) - pointer to an indicator variable or array. For scalar data 
-types, this is a pointer to sb2 or an array of sb2s. For named data types, 
-this pointer is ignored and the actual pointer to the indicator structure or 
-an array of indicator structures is initialized by OCIBindObject(). Ignored 
-for dynamic binds.
-See the section "Indicator Variables" on page 2-43 for more information about 
-indicator variables.
-alenp (IN/OUT) - pointer to array of actual lengths of array elements. Each 
-element in alenp is the length of the data in the corresponding element in the 
-bind value array before and after the execute. This parameter is ignored for 
-dynamic binds.
-rcodep (OUT) - pointer to array of column level return codes. This parameter 
-is ignored for dynamic binds.
-maxarr_len (IN) - the maximum possible number of elements of type dty in a 
-PL/SQL binds. This parameter is not required for non-PL/SQL binds. If 
-maxarr_len is non-zero, then either OCIBindDynamic() or 
-OCIBindArrayOfStruct() can be invoked to set up additional bind attributes. 
-curelep(IN/OUT) - a pointer to the actual number of elements. This parameter 
-is only required for PL/SQL binds.
-mode (IN) - the valid modes for this parameter are:
-OCI_DEFAULT. This is default mode.
-OCI_DATA_AT_EXEC. When this mode is selected, the value_sz 
-parameter defines the maximum size of the data that can be ever 
-provided at runtime. The application must be ready to provide the OCI 
-library runtime IN data buffers at any time and any number of times. 
-Runtime data is provided in one of the two ways:
-callbacks using a user-defined function which must be registered 
-with a subsequent call to OCIBindDynamic() . 
-a polling mechanism using calls supplied by the OCI. This mode 
-is assumed if no callbacks are defined.
-For more information about using the OCI_DATA_AT_EXEC mode, see 
-the section "Runtime Data Allocation and Piecewise Operations" on 
-page 5-16.
-When the allocated buffers are not required any more, they should be 
-freed by the client. 
-Related Functions
-OCIBindDynamic(), OCIBindObject(), OCIBindArrayOfStruct(), OCIAttrGet()
-
-
-
--------------------------------OCIBindDynamic---------------------------------
-
-
-OCIBindDynamic()
-Name
-OCI Bind Dynamic Attributes
-Purpose
-This call is used to register user callbacks for dynamic data allocation. 
-Syntax
-sword OCIBindDynamic( OCIBind     *bindp,
-                    OCIError    *errhp,
-                    dvoid       *ictxp, 
-                    OCICallbackInBind         (icbfp)(
-                                dvoid            *ictxp,
-                                OCIBind          *bindp,
-                                ub4              iter, 
-                                ub4              index, 
-                                dvoid            **bufpp,
-                                ub4              *alenp,
-                                ub1              *piecep, 
-                                dvoid            **indp ),
-                    dvoid       *octxp,
-                    OCICallbackOutBind         (ocbfp)(
-                                dvoid            *octxp,
-                                OCIBind          *bindp,
-                                ub4              iter, 
-                                ub4              index, 
-                                dvoid            **bufp, 
-                                ub4              **alenpp,
-                                ub1              *piecep,
-                                dvoid            **indpp, 
-                                ub2              **rcodepp)   );
-Comments
-This call is used to register user-defined callback functions for providing data 
-for an UPDATE or INSERT if OCI_DATA_AT_EXEC mode was specified in a 
-previous call to OCIBindByName() or OCIBindByPos(). 
-The callback function pointers must return OCI_CONTINUE if it the call is 
-successful. Any return code other than OCI_CONTINUE signals that the client 
-wishes to abort processing immediately.
-For more information about the OCI_DATA_AT_EXEC mode, see the section 
-"Runtime Data Allocation and Piecewise Operations" on page 5-16.
-Parameters
-bindp (IN/OUT) - a bind handle returned by a call to OCIBindByName() or 
-OCIBindByPos(). 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-ictxp (IN) - the context pointer required by the call back function icbfp. 
-icbfp (IN) - the callback function which returns a pointer to the IN bind 
-value or piece at run time. The callback takes in the following parameters. 
-ictxp (IN/OUT) - the context pointer for this callback function. 
-bindp (IN) - the bind handle passed in to uniquely identify this bind 
-variable. 
-iter (IN) - 1-based execute iteration value. 
-index (IN) - index of the current array, for an array bind. 1 based not 
-greater than curele parameter of the bind call. 
-index (IN) - index of the current array, for an array bind. This parameter 
-is 1-based, and may not be greater than curele parameter of the bind call. 
-bufpp (OUT) - the pointer to the buffer. 
-piecep (OUT) - which piece of the bind value. This can be one of the 
-following values - OCI_ONE_PIECE, OCI_FIRST_PIECE, 
-OCI_NEXT_PIECE and OCI_LAST_PIECE.
-indp (OUT) - contains the indicator value. This is apointer to either an 
-sb2 value or a pointer to an indicator structure for binding named data 
-types. 
-indszp (OUT) - contains the indicator value size. A pointer containing 
-the size of either an sb2 or an indicator structure pointer. 
-octxp (IN) - the context pointer required by the callback function ocbfp. 
-ocbfp (IN) - the callback function which returns a pointer to the OUT bind 
-value or piece at run time. The callback takes in the following parameters. 
-octxp (IN/OUT) - the context pointer for this call back function. 
-bindp (IN) - the bind handle passed in to uniquely identify this bind 
-variable. 
-iter (IN) - 1-based execute iteration value. 
-index (IN) - index of the current array, for an array bind. This parameter 
-is 1-based, and must not be greater than curele parameter of the bind call. 
-bufpp (OUT) - a pointer to a buffer to write the bind value/piece. 
-buflp (OUT) - returns the buffer size. 
-alenpp (OUT) - a pointer to a storage for OCI to fill in the size of the bind 
-value/piece after it has been read. 
-piecep (IN/OUT) - which piece of the bind value. It will be set by the 
-library to be one of the following values - OCI_ONE_PIECE or 
-OCI_NEXT_PIECE. The callback function can leave it unchanged or set 
-it to OCI_FIRST_PIECE or OCI_LAST_PIECE. By default - 
-OCI_ONE_PIECE. 
-indpp (OUT) - returns a pointer to contain the indicator value which 
-either an sb2 value or a pointer to an indicator structure for named data 
-types. 
-indszpp (OUT) - returns a pointer to return the size of the indicator 
-value which is either size of an sb2 or size of an indicator structure. 
-rcodepp (OUT) - returns a pointer to contains the return code. 
-Related Functions
-OCIAttrGet()
-
-
-
----------------------------------OCIBindObject--------------------------------
-
-
-OCIBindObject()
-Name
-OCI Bind Object
-Purpose
-This function sets up additional attributes which are required for a named 
-data type (object)  bind.
-Syntax
-sword OCIBindObject ( OCIBind          *bindp,
-                    OCIError         *errhp, 
-                    CONST OCIType    *type,
-                    dvoid            **pgvpp, 
-                    ub4              *pvszsp, 
-                    dvoid            **indpp, 
-                    ub4              *indszp, );
-Comments
-This function sets up additional attributes which binding a named data type 
-or a REF. An error will be returned if this function is called when the OCI 
-environment has been initialized in non-object mode. 
-This call takes as a paramter a type descriptor object (TDO) of datatype 
-OCIType for the named data type being defined.  The TDO can be retrieved 
-with a call to OCITypeByName().
-If the OCI_DATA_AT_EXEC mode was specified in ocibindn() or ocibindp(), the 
-pointers to the IN buffers are obtained either using the callback icbfp 
-registered in the OCIBindDynamic() call or by the OCIStmtSetPieceInfo() call. 
-The buffers are dynamically allocated for the OUT data and the pointers to 
-these buffers are returned either by calling ocbfp() registered by the 
-OCIBindDynamic() or by setting the pointer to the buffer in the buffer passed 
-in by OCIStmtSetPieceInfo() called when OCIStmtExecute() returned 
-OCI_NEED_DATA. The memory of these client library- allocated buffers must be 
-freed when not in use anymore by using the OCIObjectFreee() call.
-Parameters
-bindp ( IN/OUT) - the bind handle returned by the call to OCIBindByName() 
-or OCIBindByPos(). 
-errhp ( IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-type ( IN) - points to the TDO which describes the type of the program 
-variable being bound. Retrieved by calling OCITypeByName().
-pgvpp ( IN/OUT) - points to a pointer to the program variable buffer. For an 
-array, pgvpp points to an array of pointers. When the bind variable is also an 
-OUT variable, the OUT Named Data Type value or REF is allocated 
-(unpickled) in the Object Cache, and a pointer to the value or REF is returned,
-At the end of execute, when all OUT values have been received, pgvpp points 
-to an array of pointer(s) to these newly allocated named data types in the 
-object cache. 
-pgvpp is ignored if the OCI_DATA_AT_EXEC mode is set. Then the Named 
-Data Type buffers are requested at runtime. For static array binds, skip 
-factors may be specified using the OCIBindArrayOfStruct() call. The skip 
-factors are used to compute the address of the next pointer to the value, the 
-indicator structure and their sizes.
-pvszsp ( IN/OUT) - points to the size of the program variable. The size of the 
-named data type is not required on input. For an array, pvszsp is an array of 
-ub4s. On return, for OUT bind variables, this points to size(s) of the Named 
-Data Types and REFs received. pvszsp is ignored if the OCI_DATA_AT_EXEC 
-mode is set. Then the size of the buffer is taken at runtime.
-indpp ( IN/OUT) - points to a pointer to the program variable buffer 
-containing the parallel indicator structure. For an array, points to an array of 
-pointers. When the bind variable is also an OUT bind variable, memory is 
-allocated in the object cache, to store the unpickled OUT indicator values. At 
-the end of the execute when all OUT values have been received, indpp points 
-to the pointer(s) to these newly allocated indicator structure(s). 
-indpp is ignored if the OCI_DATA_AT_EXEC mode is set. Then the indicator 
-is requested at runtime.
-indszp ( IN/OUT) - points to the size of the IN indicator structure program 
-variable. For an array, it is an array of sb2s. On return for OUT bind variables, 
-this points to size(s) of the received OUT indicator structures.
-indszp is ignored if the OCI_DATA_AT_EXEC mode is set. Then the indicator 
-size is requested at runtime.
-Related Functions
-OCIAttrGet()
-
-
-
-----------------------------------OCIBreak------------------------------------
-
-
-
-OCIBreak()
-Name
-OCI Break
-Purpose
-This call performs an immediate (asynchronous) abort of any currently 
-executing OCI function that is associated with a server .
-Syntax
-sword OCIBreak ( dvoid      *hndlp,
-                 OCIError   *errhp);
-Comments
-This call performs an immediate (asynchronous) abort of any currently 
-executing OCI function that is associated with a server. It is normally used 
-to stop a long-running OCI call being processed on the server.
-This call can take either the service context handle or the server context 
-handle as a parameter to identify the function to be aborted.
-Parameters
-hndlp (IN) - the service context handle or the server context handle.
-errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-Related Functions
-
------------------------------OCIConnectionPoolCreate --------------------------
-Name:
-OCIConnectionPoolCreate
-
-Purpose:
-Initializes the Connection Pool
-
-Syntax:
-OCIConnectionPoolCreate (OCIEnv *envhp, OCIError *errhp, OCICPool *poolhp,
-                         OraText **poolName, sb4 *poolNameLen,
-                         CONST Oratext *dblink, sb4 dblinkLen,
-                         ub4 connMin, ub4 connMax, ub4 connIncr,
-                         CONST OraText *poolUsername, sb4 poolUserLen,
-                         CONST OraText *poolPassword, sb4 poolPassLen, ub4 mode)
-Comments:
-This call is used to create a connection pool. conn_min connections
-to the database are started on calling OCIConnectionPoolCreate.
-
-Parameters:
-envhp (IN/OUT)  - A pointer to the environment where the Conencton Pool
-                  is to be created
-errhp (IN/OUT)  - An error handle which can be passed to OCIErrorGet().
-poolhp (IN/OUT) - An uninitialiazed pool handle.
-poolName (OUT) - The connection pool name. 
-poolNameLen (OUT) - The length of the connection pool name 
-dblink (IN/OUT) - Specifies the database(server) to connect. This will also
-                  be used as the default pool name.
-dblinkLen (IN)  - The length of the string pointed to by dblink.
-connMin (IN)    - Specifies the minimum number of connections in the
-                  Connection Pool at any instant.
-                  connMin number of connections are started when
-                  OCIConnectionPoolCreate() is called.
-connMax (IN)    - Specifies the maximum number of connections that can be
-                  opened to the database. Once this value is reached, no
-                  more connections are opened.
-connIncr (IN)   - Allows application to set the next increment for
-                  connections to be opened to the database if the current
-                  number of connections are less than conn_max.
-poolUsername (IN/OUT) - Connection pooling requires an implicit proxy
-                         session and this attribute provides a username
-                         for that session.
-poolUserLen (IN) - This represents the length of pool_username.
-poolPassword (IN/OUT) - The password for the parameter pool_username passed
-                        above.
-poolPassLen (IN) - This represents the length of pool_password.
-
-mode (IN) - The modes supported are OCI_DEFAULT and OCI_REINITIALIZE
-
-Related Functions
-OCIConnectionPoolDestroy()
----------------------------------------------------------------------------
-
-----------------------------OCIConnectionPoolDestroy-------------------------
-Name:
-OCIConnectionPoolDestroy
-
-Purpose:
-Destroys the Connection Pool.
-
-Syntax:
-OCIConnectionPoolDestroy (OCICPool *poolhp, OCIError *errhp, ub4 mode)
-
-Comments:
-On calling OCIConnectionPoolDestroy, all the open connections in the pool
-are closed and the pool is destroyed.
-
-Parameters:
-poolhp (IN/OUT) - An uninitialiazed pool handle.
-errhp (IN/OUT)  - An error handle which can be passed to OCIErrorGet().
-mode (IN)       - Currently, OCIConnectionPoolDestroy() will support only
-                  the OCI_DEFAULT mode.
-
-Related Functions:
-OCIConnectionPoolCreate()
-
------------------------------------------------------------------------------
-----------------------------OCISessionPoolCreate-----------------------------
-Name:
-OCISessionPoolCreate
-
-Purpose:
-Creates the sessions in the session pool.
-
-Syntax:
-sword OCISessionPoolCreate (OCIEnv *envhp, OCIError *errhp, OCISpool *spoolhp,
-                      OraText **poolName, ub4 *poolNameLen,
-                      CONST OraText *connStr, ub4 connStrLen,
-                      ub4 sessMin, ub4 sessMax, ub4 sessIncr,
-                      OraText *userid,  ub4 useridLen,
-                      OraText *password, ub4 passwordLen,
-                      ub4 mode)
-
-Comments:
-When OCISessionPoolCreate is called, a session pool is initialized for
-the associated environment and the database specified by the
-connStr parameter. This pool is named uniquely and the name
-is returned to the user in the poolname parameter.
-
-Parameters:
-envhp (IN/OUT) - A pointer to the environment handle in which the session
-                 pool needs to be created.
-errhp (IN/OUT) - An error handle which can be passed to OCIErrorGet().
-spoolhp (IN/OUT) - A pointer to the session pool handle that is created.
-poolName (OUT) - Session pool name returned to the user.
-poolNameLen (OUT) - Length of the PoolName
-connStr (IN) - The TNS alias of the database to connect to.
-connStrLen (IN) - Length of the connStr.
-sessMin (IN) - Specifies the minimum number of sessions in the Session Pool.
-               These are the number of sessions opened in the beginning, if
-               in Homogeneous mode. Else, the parameter is ignored.
-sessMax (IN) - Specifies the maximum number of sessions in the Session Pool.
-               Once this value is reached, no more sessions are opened,
-               unless the OCI_ATTR_SPOOL_FORCEGET is set.
-userid (IN) - Specifies the userid with which to start up the sessions.
-useridLen (IN) - Length of userid.
-password (IN) - Specifies the password for the corresponding userid.
-passwordLen (IN) - Specifies the length of the password
-mode(IN) - May be OCI_DEFAULT, OCI_SPC_SPOOL_REINITIALIZE, or
-           OCI_SPC_SPOOL_HOMOGENEOUS.
-
-Returns:
-SUCCESS - If pool could be allocated and created successfully.
-ERROR - If above conditions could not be met.
-
-Related Functions:
-OCISessionPoolDestroy()
------------------------------------------------------------------------------
------------------------------OCISessionPoolDestroy---------------------------
-Name:
-OCISessionPoolDestroy
-
-Purpose:
-Terminates all the sessions in the session pool.
-
-Syntax:
-sword OCISessionPoolDestroy (OCISPool *spoolhp, OCIError *errhp, ub4 mode)
-
-Comments:
-spoolhp (IN/OUT) - The pool handle of the session pool to be destroyed.
-errhp (IN/OUT) - An error handle which can be passed to OCIErrorGet().
-mode (IN) - Currently only OCI_DEFAULT mode is supported.
-
-Returns:
-SUCCESS - All the sessions could be closed.
-ERROR - If the above condition is not met.
-
-Related Functions:
-OCISessionPoolCreate()
------------------------------------------------------------------------------
--------------------------------OCISessionGet---------------------------------
-Name:
-OCISessionGet
-
-Purpose:
-Get a session. This could be from a session pool, connection pool or
-a new standalone session.
-
-Syntax:
-sword OCISessionGet(OCIenv *envhp, OCIError *errhp, OCISvcCtx **svchp,
-                    OCIAuthInfo *authhp,
-                    OraText *poolName, ub4 poolName_len,
-                    CONST OraText *tagInfo, ub4 tagInfo_len,
-                    OraText **retTagInfo, ub4 *retTagInfo_len,
-                    boolean *found,
-                    ub4 mode)
-
-Comments:
-envhp (IN/OUT) - OCI environment handle.
-errhp (IN/OUT) - OCI error handle to be passed to OCIErrorGet().
-svchp (IN/OUT) - Address of an OCI service context pointer. This will be
-                 filled with a server and session handle, attached to the
-                 pool.
-authhp (IN/OUT) - OCI Authentication Information handle.
-poolName (IN) - This indicates the session/connection pool to get the
-                session/connection from in the OCI_SPOOL/OCI_CPOOL mode.
-                In the OCI_DEFAULT mode it refers to the connect string.
-poolName_len (IN) - length of poolName.
-tagInfo (IN) - indicates the tag of the session that the user wants. If the
-                   user wants a default session, he must specify a NULL here.
-                   Only used for Session Pooling.
-tagInfo_len (IN) - the length of tagInfo.
-retTagInfo (OUT) - This indicates the type of session that is returned to
-                   the user. Only used for Session Pooling.
-retTagInfo_len (OUT) - the length of retTagInfo.
-found (OUT) - set to true if the user gets a session he had requested, else
-              set to false. Only used for Session Pooling.
-mode (IN) - The supported modes are OCI_DEFAULT, OCI_CRED_PROXY and
-            OCI_GET_SPOOL_MATCHANY, OCI_SPOOL and OCI_CPOOL. OCI_SPOOL and
-            OCI_CPOOL are mutually exclusive.
-
-Returns:
-SUCCESS -  if a session was successfully returned into svchp.
-SUCCESS_WITH_INFO - if a session was successfully returned into svchp and the
-                    total number of sessions > maxsessions. Only valid for
-                    Session Pooling.
-ERROR - If a session could not be retrieved.
-
-Related Functions:
-OCISessionRelease()
------------------------------------------------------------------------------
----------------------------OCISessionRelease---------------------------------
-Name:
-OCISessionRelease
-
-Purpose:
-Release the session.
-
-Syntax:
-sword OCISessionRelease ( OCISvcCtx *svchp, OCIError *errhp,
-                          OraText *tag, ub4 tag_len,
-                          ub4 mode);
-
-Comments:
-svchp (IN/OUT) - The service context associated with the session/connection.
-errhp (IN/OUT) - OCI error handle to be passed to OCIErrorGet().
-tag (IN) - Only used for Session Pooling.
-           This parameter will be ignored unless mode OCI_RLS_SPOOL_RETAG is
-           specified. In this case, the session is labelled with this tag and
-           returned to the pool. If this is NULL, then the session is untagged.
-tag_len (IN) - Length of the tag. This is ignored unless mode 
-               OCI_RLS_SPOOL_RETAG is set.
-mode (IN) - The supported modes are OCI_DEFAULT, OCI_RLS_SPOOL_DROPSESS,
-            OCI_RLS_SPOOL_RETAG. The last 2 are only valid for Session Pooling.
-            When OCI_RLS_SPOOL_DROPSESS is specified, the session
-            will be removed from the session pool. If OCI_RLS_SPOOL_RETAG is 
-            set, the tag on the session will be altered. If this mode is not 
-            set, the tag and tag_len parameters will be ignored.
-
-Returns:
-ERROR - If the session could not be released successfully.
-SUCCESS - In all other cases.
-
-Related Functions:
-OCISessionGet().
-
------------------------------------------------------------------------------
-------------------------------OCIDateTimeAssign --------------------------
-sword OCIDateTimeAssign(dvoid *hndl, OCIError *err, CONST OCIDateTime *from, 
-			 OCIDateTime *to);
-NAME: OCIDateTimeAssign - OCIDateTime Assignment
-PARAMETERS:
-hndl (IN) - Session/Env handle.
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-from (IN) - datetime to be assigned
-to (OUT) - lhs of assignment
-DESCRIPTION:
-        Performs date assignment. The type of the output will be same as that
-	of input
-
-------------------------------OCIDateTimeCheck--------------------
-sword OCIDateTimeCheck(dvoid *hndl, OCIError *err, CONST OCIDateTime *date, 
-		 ub4 *valid );
-NAME: OCIDateTimeCheck - OCIDateTime CHecK if the given date is valid
-PARAMETERS:
-hndl (IN) - Session/Env handle. 
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-date (IN) - date to be checked
-type (IN) - type of the input datetime(OCI_DATE, OCI_TIME, 
-				OCI_TIMESTAMP,	OCI_TZTIMESTAMP, OCI_TZTIME)
-valid (OUT) -  returns zero for a valid date, otherwise 
-  		the ORed combination of all error bits specified below:
-   Macro name                   Bit number      Error
-   ----------                   ----------      -----
-   OCI_DATE_INVALID_DAY         0x1             Bad day
-   OCI_DATE_DAY_BELOW_VALID     0x2             Bad DAy Low/high bit (1=low)
-   OCI_DATE_INVALID_MONTH       0x4             Bad MOnth
-   OCI_DATE_MONTH_BELOW_VALID   0x8             Bad MOnth Low/high bit (1=low)
-   OCI_DATE_INVALID_YEAR        0x10            Bad YeaR
-   OCI_DATE_YEAR_BELOW_VALID    0x20            Bad YeaR Low/high bit (1=low)
-   OCI_DATE_INVALID_HOUR        0x40            Bad HouR
-   OCI_DATE_HOUR_BELOW_VALID    0x80            Bad HouR Low/high bit (1=low)
-   OCI_DATE_INVALID_MINUTE      0x100           Bad MiNute
-   OCI_DATE_MINUTE_BELOW_VALID	0x200           Bad MiNute Low/high bit (1=low)
-   OCI_DATE_INVALID_SECOND      0x400           Bad SeCond
-   OCI_DATE_SECOND_BELOW_VALID  0x800           bad second Low/high bit (1=low)
-   OCI_DATE_DAY_MISSING_FROM_1582 0x1000        Day is one of those "missing"
-                                                from 1582
-   OCI_DATE_YEAR_ZERO           0x2000          Year may not equal zero
-   OCI_DATE_INVALID_TIMEZONE    0x4000          Bad Timezone
-   OCI_DATE_INVALID_FORMAT      0x8000          Bad date format input
-
-   So, for example, if the date passed in was 2/0/1990 25:61:10 in
-   (month/day/year hours:minutes:seconds format), the error returned
-   would be OCI_DATE_INVALID_DAY | OCI_DATE_DAY_BELOW_VALID |
-   OCI_DATE_INVALID_HOUR | OCI_DATE_INVALID_MINUTE
-
-DESCRIPTION:
-  	Check if the given date is valid.
-RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-  	  'date' and 'valid' pointers are NULL pointers
-
-------------------------------- OCIDateTimeCompare-------------------------
-sword OCIDateTimeCompare(dvoid *hndl, OCIError *err, CONST OCIDateTime *date1, 
-                     CONST OCIDateTime *date2,  sword *result );
-NAME: OCIDateTimeCompare - OCIDateTime CoMPare dates
-PARAMETERS:
-hndl (IN) - Session/Env handle. 
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-date1, date2 (IN) - dates to be compared
-type (IN)  - Type of datetime to be compared. Both input datetimes
-			should be of same type.(OCI_DATE, OCI_TIME, 
-				OCI_TIMESTAMP, OCI_TZTIMESTAMP, OCI_TZTIME)
-result (OUT) - comparison result, 0 if equal, -1 if date1 < date2, 
-  		1 if date1 > date2
-DESCRIPTION:
-The function OCIDateCompare compares two dates. It returns -1 if 
-date1 is smaller than date2, 0 if they are equal, and 1 if date1 is 
-greater than date2.
-RETURNS:
-       OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-  	  invalid date
-	  input dates are not mutually comparable
-
-------------------------------OCIDateTimeConvert----------------------
-sword OCIDateTimeConvert(dvoid *hndl, OCIError *err, OCIDateTime *indate, 
-				OCIDateTime *outdate);
-NAME: OCIDateTimeConvert - Conversion between different DATETIME types
-PARAMETERS:
-hndl (IN) - Session/Env handle. 
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-indate (IN) - pointer to input date
-outdate (OUT) - pointer to output datetime 
-DESCRIPTION: Converts one datetime type to another. The result type is
-       the type of the 'outdate' descriptor.
-RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-	OCI_ERROR if
-	    conversion not possible.
-   
----------------------------- OCIDateTimeFromText-----------------------
-sword OCIDateTimeFromText(dvoid *hndl, OCIError *err, CONST OraText *date_str, 
-                     size_t d_str_length, CONST OraText *fmt, ub1 fmt_length, 
-                     CONST OraText *lang_name, size_t lang_length, 
-                     OCIDateTime *date );
-NAME: OCIDateTimeFromText - OCIDateTime convert String FROM Date
-PARAMETERS:
-hndl (IN) - Session/Env handle. If Session Handle is passed, the 
-		    conversion takes place in session NLS_LANGUAGE and
-		    session NLS_CALENDAR, otherwise the default is used.
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-date_str (IN) - input string to be converted to Oracle date
-d_str_length (IN) - size of the input string, if the length is -1
-  		then 'date_str' is treated as a null terminated  string
-fmt (IN) - conversion format; if 'fmt' is a null pointer, then
-                the string is expected to be in the default format for
-		the datetime type.
-fmt_length (IN) - length of the 'fmt' parameter
-lang_name (IN) - language in which the names and abbreviations of
-  	        days and months are specified, if null i.e. (OraText *)0,
-  		the default language of session is used, 
-lang_length (IN) - length of the 'lang_name' parameter
-date (OUT) - given string converted to date
-DESCRIPTION:
-  	Converts the given string to Oracle datetime type set in the 
-        OCIDateTime descriptor according to the specified format. Refer to 
-        "TO_DATE" conversion function described in "Oracle SQL Language 
-        Reference Manual" for a description of format.
-RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-  	  invalid format
-  	  unknown language
-  	  invalid input string
-
---------------------------- OCIDateTimeGetDate-------------------------
-void OCIDateTimeGetDate(dvoid *hndl, OCIError *err,  CONST OCIDateTime *date, 
-		 sb2 *year, ub1 *month, ub1 *day );
-NAME: OCIDateTimeGetDate - OCIDateTime Get Date (year, month, day)  
-				portion of DATETIME. 
-PARAMETERS:
-hndl (IN) - Session/Env handle. 
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-datetime (IN) - Pointer to OCIDateTime 
-year      (OUT) - year value
-month     (OUT) - month value
-day       (OUT) - day value
-
---------------------------- OCIDateTimeGetTime ------------------------
-void OCIDateTimeGetTime(dvoid *hndl, OCIError *err, OCIDateTime *datetime, 
-		 ub1 *hour, ub1 *min, ub1 *sec, ub4 *fsec);
-NAME: OCIDateTimeGetTime - OCIDateTime Get Time (hour, min, second, 
-			fractional second)  of DATETIME. 
-PARAMETERS:
-hndl (IN) - Session/Env handle. 
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-datetime (IN) - Pointer to OCIDateTime 
-hour      (OUT) - hour value
-min       (OUT) - minute value
-sec       (OUT) - second value
-fsec      (OUT) - Fractional Second value
-
---------------------------- OCIDateTimeGetTimeZoneOffset ----------------------
-sword OCIDateTimeGetTimeZoneOffset(dvoid *hndl,OCIError *err,CONST 
-              OCIDateTime *datetime,sb1 *hour,sb1  *minute);
- 
-NAME: OCIDateTimeGetTimeZoneOffset - OCIDateTime Get TimeZone (hour, minute)  
-                         portion of DATETIME. 
-PARAMETERS:
-hndl (IN) - Session/Env handle. 
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-datetime (IN) - Pointer to OCIDateTime 
-hour      (OUT) - TimeZone Hour value
-minute     (OUT) - TimeZone Minute value
- 
-
-------------------------------OCIDateTimeIntervalAdd----------------------
-sword OCIDateTimeIntervalAdd(dvoid *hndl, OCIError *err, OCIDateTime *datetime,
-	 OCIInterval *inter, OCIDateTime *outdatetime);
-NAME: OCIDateTimeIntervalAdd - Adds an interval to datetime
-PARAMETERS:
-hndl (IN) - Session/Env handle.
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-datetime (IN) - pointer to input datetime
-inter    (IN) - pointer to interval 
-outdatetime (IN) - pointer to output datetime. The output datetime 
-				will be of same type as input datetime
-DESCRIPTION: 
-	Adds an interval to a datetime to produce a resulting datetime
-RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-	OCI_ERROR if:
-		resulting date is before Jan 1, -4713
-		resulting date is after Dec 31, 9999
-
-------------------------------OCIDateTimeIntervalSub----------------------
-sword OCIDateTimeIntervalSub(dvoid *hndl, OCIError *err, OCIDateTime *datetime,
-	 OCIInterval *inter, OCIDateTime *outdatetime);
-NAME: OCIDateTimeIntervalSub - Subtracts an interval from a datetime
-PARAMETERS:
-hndl (IN) - Session/Env handle. 
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-datetime (IN) - pointer to input datetime
-inter    (IN) - pointer to interval 
-outdatetime (IN) - pointer to output datetime. The output datetime 
-				will be of same type as input datetime
-DESCRIPTION: 
- 	Subtracts an interval from a datetime and stores the result in a
-     	datetime
-RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-	OCI_ERROR if:
-		resulting date is before Jan 1, -4713
-		resulting date is after Dec 31, 9999
-
---------------------------- OCIDateTimeConstruct-------------------------
-sword OCIDateTimeConstruct(dvoid  *hndl,OCIError *err,OCIDateTime *datetime,
-               sb2 year,ub1 month,ub1 day,ub1 hour,ub1 min,ub1 sec,ub4 fsec,
-               OraText  *timezone,size_t timezone_length);
-
-   NAME: OCIDateTimeConstruct - Construct an OCIDateTime. Only the relevant
-       fields for the OCIDateTime descriptor types are used.
-   PARAMETERS:
-        hndl (IN) - Session/Env handle. 
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        datetime (IN) - Pointer to OCIDateTime 
-        year      (IN) - year value
-        month     (IN) - month value
-        day       (IN) - day value        
-        hour      (IN) - hour value
-        min       (IN) - minute value
-        sec       (IN) - second value
-        fsec      (IN) - Fractional Second value
-        timezone  (IN) - Timezone string
-        timezone_length(IN) - Length of timezone string
-DESCRIPTION:
-       Constructs a DateTime descriptor. The type of the datetime is the
-       type of the OCIDateTime descriptor. Only the relevant fields based
-       on the type are used. For Types with timezone, the date and time
-       fields are assumed to be in the local time of the specified timezone.
-       If timezone is not specified, then session default timezone is
-       assumed.
-RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_ERROR if datetime is not valid.
---------------------------- OCIDateTimeSysTimeStamp---------------------
-sword OCIDateTimeSysTimeStamp(dvoid *hndl, OCIError *err, 
-              OCIDateTime *sys_date );
- 
-NAME: OCIDateTimeSysTimeStamp - Returns system date/time as a TimeStamp with 
-                      timezone
-PARAMETERS:
-hndl (IN) - Session/Env handle. 
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-sys_date (OUT) - Pointer to output timestamp
- 
-DESCRIPTION: 
-        Gets the system current date and time as a timestamp with timezone
-RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
- 
-
-------------------------------OCIDateTimeSubtract-----------------------
-sword OCIDateTimeSubtract(dvoid *hndl, OCIError *err, OCIDateTime *indate1, 
-		OCIDateTime *indate2,	OCIInterval *inter);
-NAME: OCIDateTimeSubtract - subtracts two datetimes to return an interval
-PARAMETERS:
-hndl (IN) - Session/Env handle. 
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-indate1(IN) - pointer to subtrahend
-indate2(IN) - pointer to minuend
-inter  (OUT) - pointer to output interval
-DESCRIPTION: 
-	Takes two datetimes as input and stores their difference in an 
-        interval. The type of the result interval is the type of the 
-        'inter' descriptor.
-RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-	OCI_ERROR if
-	   datetimes are not comparable.
-
---------------------------- OCIDateTimeToText--------------------------
-sword OCIDateTimeToText(dvoid *hndl, OCIError *err, CONST OCIDateTime *date, 
-                        CONST OraText *fmt, ub1 fmt_length, ub1 fsprec,
-                        CONST OraText *lang_name, size_t lang_length, 
-                        ub4 *buf_size, OraText *buf );
-NAME: OCIDateTimeToText - OCIDateTime convert date TO String 
-PARAMETERS:
-hndl (IN) - Session/Env handle. If Session Handle is passed, the 
-		    conversion takes place in session NLS_LANGUAGE and
-		    session NLS_CALENDAR, otherwise the default is used.
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-date (IN) - Oracle datetime to be converted
-fmt (IN) - conversion format, if null string pointer (OraText*)0, then
-                the date is converted to a character string in the
-                default format for that type.
-fmt_length (IN) - length of the 'fmt' parameter
-fsprec (IN) - specifies the fractional second precision in which the
-               fractional seconds is returned.
-lang_name (IN) - specifies the language in which the names and 
-  	        abbreviations of months and days are returned;
-  	        default language of session is used if 'lang_name' 
-  		is null i.e. (OraText *)0
-lang_length (IN) - length of the 'nls_params' parameter
-buf_size (IN/OUT) - size of the buffer; size of the resulting string
-                is returned via this parameter
-buf (OUT) - buffer into which the converted string is placed
-DESCRIPTION:
-        Converts the given date to a string according to the specified format.
-        Refer to "TO_DATE" conversion function described in
-        "Oracle SQL Language Reference Manual" for a description of format
-        and NLS arguments. The converted null-terminated date string is
-        stored in the buffer 'buf'.
-RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-  	  buffer too small
-  	  invalid format
-  	  unknown language
-          overflow error
-
-----------------------------OCIDateTimeGetTimeZoneName------------------------
-sword OCIDateTimeGetTimeZoneName(dvoid *hndl, 
-                                 OCIError *err,
-                                 CONST OCIDateTime *datetime,
-                                 ub1 *buf,
-                                 ub4 *buflen);
-NAME OCIDateTimeGetTimeZoneName - OCI DateTime Get the Time Zone Name
-PARAMETERS:
-hndl (IN)      - Session/Env handle.
-err (IN/OUT)   - error handle. If there is an error, it is
-                 recorded in 'err' and this function returns OCI_ERROR.
-                 The error recorded in 'err' can be retrieved by calling
-                 OCIErrorGet().
-datetime (IN)   - Pointer to an OCIDateTime.
-buf (OUT)       - User allocated storage for name string.
-buflen (IN/OUT) - length of buf on input, length of name on out
-DESCRIPTION:
-        Returns either the timezone region name or the absolute hour and minute
-        offset. If the DateTime was created with a region id then the region 
-        name will be returned in the buf.  If the region id is zero, then the 
-        hour and minute offset is returned as "[-]HH:MM".
-RETURNS:
-       OCI_SUCCESS if the function completes successfully.
-       OCI_INVALID_HANDLE if 'err' is NULL.
-       OCI_ERROR if
-         buffer too small
-         error retrieving timezone data
-         invalid region 
-         invalid LdiDateTime type
-
-----------------------------OCIDateTimeFromArray-------------------------------
-sword OCIDateTimeFromArray(dvoid *hndl, 
-                         OCIError *err,
-                         ub1 *inarray,
-                         ub4 len
-                         ub1 type
-                         OCIDateTime *datetime,
-                         OCIInterval *reftz,
-                         ub1 fsprec);
-NAME OCIDateTimeFromArray - OCI DateTime convert From Array format
-PARAMETERS:
-hndl (IN)      - Session/Env handle.
-err (IN/OUT)   - error handle. If there is an error, it is
-                 recorded in 'err' and this function returns OCI_ERROR.
-                 The error recorded in 'err' can be retrieved by calling
-                 OCIErrorGet().
-inarray (IN)   - Pointer to input array representtion of DateTime
-len (IN)       - len of inarray.
-type (IN)      - One of SQLT_DATE, SQLT_TIME, SQLT_TIME_TZ, SQLT_TIMESTAMP,
-                 SQLT_TIMESTAMP_TZ, or SQLT_TIMESTAMP_LTZ.
-datetime (OUT) - Pointer to the result OCIDateTime.
-reftz (IN)     - timezone interval used with SQLT_TIMESTAMP_LTZ.
-fsprec (IN)    - fractionl seconds digits of precision (0-9).
-DESCRIPTION:
-        Returns a pointer to an OCIDateTime of type type converted from 
-        the inarray.
-RETURNS:
-       OCI_SUCCESS if the function completes successfully.
-       OCI_INVALID_HANDLE if 'err' is NULL.
-       OCI_ERROR if
-         buffer too small
-         error retrieving timezone data
-         invalid region 
-         invalid LdiDateTime type
-
------------------------------OCIDateTimeToArray------------------------------
-sword OCIDateTimeToArray(dvoid *hndl, 
-                         OCIError *err,
-                         CONST OCIDateTime *datetime,
-                         CONST OCIInterval *reftz,
-                         ub1 *outarray,
-                         ub4 len,
-                         ub1 fsprec);
-NAME OCIDateTimeToArray - OCI DateTime convert To Array format
-PARAMETERS:
-hndl (IN)      - Session/Env handle.
-err (IN/OUT)   - error handle. If there is an error, it is
-                 recorded in 'err' and this function returns OCI_ERROR.
-                 The error recorded in 'err' can be retrieved by calling
-                 OCIErrorGet().
-datetime (IN)  - Pointer to the OCIDateTime to convert.
-reftz (IN)     - Interval defining the timezone for SQLT_TIMESTAMP_LTZ.
-outarray (OUT) - result array.
-len (IN)       - length of outarray.
-fsprec (IN)    - number of fractional seconds digits. 
-DESCRIPTION:
-        Returns an array representing the input DateTime descriptor.
-RETURNS:
-       OCI_SUCCESS if the function completes successfully.
-       OCI_INVALID_HANDLE if 'err' is NULL.
-       OCI_ERROR if
-         buffer too small
-         error retrieving timezone data
-         invalid region 
-         invalid LdiDateTime type
-
-----------------------------------OCIRowidToChar-----------------------------
-Name
-OCIRowidToChar
-
-Purpose
-Converts physical/logical (universal) ROWID to chracter extended (Base 64)
-representation into user provided buffer outbfp of length outbflp. After
-execution outbflp contains amount of bytes converted.In case of truncation
-error, outbflp contains required size to make this conversion successful
-and returns ORA-1405.
-
-Syntax
-sword OCIRowidToChar( OCIRowid *rowidDesc,
-                      OraText *outbfp,
-                      ub2 *outbflp,
-                      OCIError *errhp)
-
-Comments
-After this conversion, ROWID in character format can be bound using
-OCIBindByPos or OCIBindByName call and used to query a row at a
-desired ROWID.
-
-Parameters
-rowidDesc (IN)   - rowid DESCriptor which is allocated from OCIDescritorAlloc
-                   and populated by a prior SQL statement execution
-outbfp (OUT)     - pointer to the buffer where converted rowid in character
-                   representation is stored after successful execution.
-outbflp (IN/OUT) - pointer to output buffer length variable.
-                   Before execution (IN mode) *outbflp contains the size of
-                   outbfp, after execution (OUT mode) *outbflp contains amount
-                   of bytes converted. In an event of truncation during
-                   conversion *outbflp contains the required length to make
-                   conversion successful.
-errhp (IN/OUT)   - an error handle which can be passed to OCIErrorGet() for
-                   diagnostic information in the event of an error.
-
-------------------------------OCIDefineArrayOfStruct--------------------------
-
-
-OCIDefineArrayOfStruct()
-Name
-OCI Define for Array of Structures
-Purpose
-This call specifies additional attributes necessary for a static array define.
-Syntax
-sword OCIDefineArrayOfStruct ( OCIDefine   *defnp,
-                             OCIError    *errhp,
-                             ub4         pvskip, 
-                             ub4         indskip, 
-                             ub4         rlskip,
-                             ub4         rcskip );
-Comments
-This call specifies additional attributes necessary for an array define, used in 
-an array of structures (multi-row, multi-column) fetch.
-For more information about skip parameters, see the section "Skip Parameters" 
-on page 4-17.
-Parameters
-defnp (IN) - the handle to the define structure which was returned by a call 
-to OCIDefineByPos().
-errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-pvskip (IN) - skip parameter for the next data value.
-indskip (IN) - skip parameter for the next indicator location. 
-rlskip (IN) - skip parameter for the next return length value.
-rcskip (IN) - skip parameter for the next return code.
-Related Functions
-OCIAttrGet()
-
-
-
-
-
-OCIDefineByPos()
-Name
-OCI Define By Position
-Purpose
-Associates an item in a select-list with the type and output data buffer. 
-Syntax
-sb4 OCIDefineByPos ( 
-              OCIStmt     *stmtp, 
-              OCIDefine   **defnp,
-              OCIError    *errhp,
-              ub4         position,
-              dvoid       *valuep,
-              sb4         value_sz,
-              ub2         dty,
-              dvoid       *indp,
-              ub2         *rlenp,
-              ub2         *rcodep,
-              ub4         mode );
-Comments
-This call defines an output buffer which will receive data retreived from 
-Oracle. The define is a local step which is necessary when a SELECT statement 
-returns data to your OCI application.
-This call also implicitly allocates the define handle for the select-list item.
-Defining attributes of a column for a fetch is done in one or more calls. The 
-first call is to OCIDefineByPos(), which defines the minimal attributes 
-required to specify the fetch. 
-This call takes as a parameter a define handle, which must have been 
-previously allocated with a call to OCIHandleAlloc().
-Following the call to OCIDefineByPos() additional define calls may be 
-necessary for certain data types or fetch modes:
-A call to OCIDefineArrayOfStruct() is necessary to set up skip parameters 
-for an array fetch of multiple columns.
-A call to OCIDefineObject() is necessary to set up the appropriate 
-attributes of a named data type fetch. In this case the data buffer pointer 
-in ocidefn() is ignored.
-Both OCIDefineArrayOfStruct() and OCIDefineObject() must be called 
-after ocidefn() in order to fetch multiple rows with a column of named 
-data types.
-For a LOB define, the buffer pointer must be a lob locator of type 
-OCILobLocator , allocated by the OCIDescAlloc() call. LOB locators, and not 
-LOB values, are always returned for a LOB column. LOB values can then be 
-fetched using OCI LOB calls on the fetched locator.
-For NCHAR (fixed and varying length), the buffer pointer must point to an 
-array of bytes sufficient for holding the required NCHAR characters. 
-Nested table columns are defined and fetched like any other named data type. 
-If the mode parameter is this call is set to OCI_DYNAMIC_FETCH, the client 
-application can fetch data dynamically at runtime.
-Runtime data can be provided in one of two ways:
-callbacks using a user-defined function which must be registered with a 
-subsequent call to OCIDefineDynamic(). When the client library needs a 
-buffer to return the fetched data, the callback will be invoked and the 
-runtime buffers provided will return a piece or the whole data. 
-a polling mechanism using calls supplied by the OCI. This mode is 
-assumed if no callbacks are defined. In this case, the fetch call returns the 
-OCI_NEED_DATA error code, and a piecewise polling method is used 
-to provide the data.
-Related Functions: For more information about using the 
-OCI_DYNAMIC_FETCH mode, see the section "Runtime Data 
-Allocation and Piecewise Operations" on page 5-16 of Volume 1..
-For more information about the define step, see the section "Defining" 
-on page 2-30.
-Parameters
-stmtp (IN) - a handle to the requested SQL query operation.
-defnp (IN/OUT) - a pointer to a pointer to a define handle which is implicitly 
-allocated by this call.  This handle is used to  store the define information 
-for this column.
-errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-position (IN) - the position of this value in the select list. Positions are 
-1-based and are numbered from left to right. For example, in the SELECT 
-statement
-SELECT empno, ssn, mgrno FROM employees;
-empno is at position 1, ssn is at position 2, and mgrno is at position 3.
-valuep (IN/OUT) - a pointer to a buffer or an array of buffers of the type 
-specified in the dty parameter. A number of buffers can be specified when 
-results for more than one row are desired in a single fetch call.
-value_sz (IN) - the size of each valuep buffer in bytes. If the data is stored 
-internally in VARCHAR2 format, the number of characters desired, if different 
-from the buffer size in bytes, may be additionally specified by the using 
-OCIAttrSet(). 
-In an NLS conversion environment, a truncation error will be generated if the 
-number of bytes specified is insufficient to handle the number of characters 
-desired.
-dty (IN) - the data type. Named data type (SQLT_NTY) and REF (SQLT_REF) 
-are valid only if the environment has been intialized with in object mode. 
-indp - pointer to an indicator variable or array. For scalar data types, 
-pointer to sb2 or an array of sb2s. Ignored for named data types. For named 
-data types, a pointer to a named data type indicator structure or an array of 
-named data type indicator structures is associated by a subsequent 
-OCIDefineObject() call. 
-See the section "Indicator Variables" on page 2-43 for more information about 
-indicator variables.
-rlenp (IN/OUT) - pointer to array of length of data fetched. Each element in 
-rlenp is the length of the data in the corresponding element in the row after 
-the fetch. 
-rcodep (OUT) - pointer to array of column-level return codes
-mode (IN) - the valid modes are:
-OCI_DEFAULT. This is the default mode.
-OCI_DYNAMIC_FETCH. For applications requiring dynamically 
-allocated data at the time of fetch, this mode must be used. The user may 
-additionally call OCIDefineDynamic() to set up a callback function that 
-will be invoked to receive the dynamically allocated buffers and to set 
-up the memory allocate/free callbacks and the context for the callbacks. 
-valuep and value_sz are ignored in this mode. 
-Related Functions
-OCIDefineArrayOfStruct(), OCIDefineDynamic(), OCIDefineObject()
-
-
-
-
-OCIDefineDynamic()
-Name
-OCI Define Dynamic Fetch Attributes
-Purpose
-This call is used to set the additional attributes required if the 
-OCI_DYNAMIC_FETCH mode was selected in OCIDefineByPos(). 
-Syntax
-sword OCIDefineDynamic( OCIDefine   *defnp,
-                      OCIError    *errhp,
-                      dvoid       *octxp, 
-                      OCICallbackDefine (ocbfp)(
-                                  dvoid             *octxp,
-                                  OCIDefine         *defnp,
-                                  ub4               iter, 
-                                  dvoid             **bufpp,
-                                  ub4               **alenpp,
-                                  ub1               *piecep,
-                                  dvoid             **indpp,
-                                  ub2               **rcodep)  );
-Comments
-This call is used to set the additional attributes required if the 
-OCI_DYNAMIC_FETCH mode has been selected in a call to 
-OCIDefineByPos(). 
-When the OCI_DYNAMIC_FETCH mode is selected, buffers will be 
-dynamically allocated for REF, and named data type, values to receive the 
-data. The pointers to these buffers will be returned. 
-If OCI_DYNAMIC_FETCH mode was selected, and the call to 
-OCIDefineDynamic() is skipped, then the application can fetch data piecewise 
-using OCI calls.
-For more information about OCI_DYNAMIC_FETCH mode, see the section 
-"Runtime Data Allocation and Piecewise Operations" on page 5-16.
-Parameters
-defnp (IN/OUT) - the handle to a define structure returned by a call to 
-OCIDefineByPos().
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-octxp (IN) - points to a context for the callback function. 
-ocbfp (IN) - points to a callback function. This is invoked at runtime to get 
-a pointer to the buffer into which the fetched data or a piece of it will be 
-retreived. The callback also specifies the indicator, the return code and the 
-lengths of the data piece and indicator. The callback has the following 
-parameters:
-octxp (IN) - a context pointer passed as an argument to all the callback 
-functions.
-defnp (IN) - the define handle.
-iter (IN) - which row of this current fetch.
-bufpp (OUT) - returns a pointer to a buffer to store the column value, ie. 
-*bufp points to some appropriate storage for the column value.
-alenpp (OUT) - returns a pointer to the length of the buffer. *alenpp 
-contains the size of the buffer after return from callback. Gets set to 
-actual data size after fetch.
-piecep (IN/OUT) - returns a piece value, as follows:
-The IN value can be OCI_ONE_PIECE, OCI_FIRST_PIECE or 
-OCI_NEXT_PIECE.
-The OUT value can be OCI_ONE_PIECE if the IN value was 
-OCI_ONE_PIECE.
-The OUT value can be OCI_ONE_PIECE or OCI_FIRST_PIECE if 
-the IN value was OCI_FIRST_PIECE.
-The OUT value can only be OCI_NEXT_PIECE or 
-OCI_LAST_PIECE if the IN value was OCI_NEXT_PIECE. 
-indpp (IN) - indicator variable pointer
-rcodep (IN) - return code variable pointer
-Related Functions
-OCIAttrGet()
-OCIDefineObject()
-
-
-
-
-OCIDefineObject()
-Name
-OCI Define Named Data Type attributes
-Purpose
-Sets up additional attributes necessary for a Named Data Type define.
-Syntax
-sword OCIDefineObject ( OCIDefine       *defnp,
-                      OCIError        *errhp,
-                      CONST OCIType   *type,
-                      dvoid           **pgvpp, 
-                      ub4             *pvszsp, 
-                      dvoid           **indpp, 
-                      ub4             *indszp );
-Comments
-This call sets up additional attributes necessary for a Named Data Type define.An error will be returned if this function is called when the OCI environment 
-has been initialized in non-Object mode.
-This call takes as a paramter a type descriptor object (TDO) of datatype 
-OCIType for the named data type being defined.  The TDO can be retrieved 
-with a call to OCITypeByName().
-See the description of OCIInitialize() on page 13 - 43 for more information 
-about initializing the OCI process environment.
-Parameters
-defnp (IN/OUT) - a define handle previously allocated in a call to 
-OCIDefineByPos(). 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-type (IN, optional) - points to the Type Descriptor Object (TDO) which 
-describes the type of the program variable. Only used for program variables 
-of type SQLT_NTY. This parameter is optional, and may be passed as NULL 
-if it is not being used.
-pgvpp (IN/OUT) - points to a pointer to a program variable buffer. For an 
-array, pgvpp points to an array of pointers. Memory for the fetched named data 
-type instance(s) is dynamically allocated in the object cache. At the end of the 
-fetch when all the values have been received, pgvpp points to the pointer(s) to
-these newly allocated named data type instance(s). The application must call 
-OCIObjectMarkDel() to deallocate the named data type instance(s) when they 
-are no longer needed. 
-pvszsp (IN/OUT) - points to the size of the program variable. For an array, it 
-is an array of ub4s. On return points to the size(s) of unpickled fetched 
-values.
-indpp (IN/OUT) - points to a pointer to the program variable buffer 
-containing the parallel indicator structure. For an array, points to an array 
-of pointers. Memory is allocated to store the indicator structures in the 
-object cache. At the end of the fetch when all values have been received, 
-indpp points to the pointer(s) to these newly allocated indicator structure(s).
-indszp (IN/OUT) - points to the size(s) of the indicator structure program 
-variable. For an array, it is an array of ub4s. On return points to the size(s)
-of the unpickled fetched indicator values.
-Related Functions
-OCIAttrGet()
-
-
-
-OCIDescAlloc()
-Name
-OCI Get DESCriptor or lob locator
-Purpose
-Allocates storage to hold certain data types. The descriptors can be used as 
-bind or define variables.
-Syntax
-sword OCIDescAlloc ( CONST dvoid   *parenth,
-                   dvoid         **descpp, 
-                   ub4           type,
-                   size_t        xtramem_sz,
-                   dvoid         **usrmempp);
-Comments
-Returns a pointer to an allocated and initialized structure, corresponding to 
-the type specified in type. A non-NULL descriptor or LOB locator is returned 
-on success. No diagnostics are available on error.
-This call returns OCI_SUCCESS if successful, or OCI_INVALID_HANDLE if 
-an out-of-memory error occurs. 
-Parameters
-parenth (IN) - an environment handle. 
-descpp (OUT) - returns a descriptor or LOB locator of desired type. 
-type (IN) - specifies the type of descriptor or LOB locator to be allocated. 
-The specific types are:
-OCI_DTYPE_SNAP - specifies generation of snapshot descriptor of C 
-type - OCISnapshot
-OCI_DTYPE_LOB - specifies generation of a LOB data type locator of C 
-type - OCILobLocator
-OCI_DTYPE_RSET - specifies generation of a descriptor of C type 
-OCIResult that references a result set (a number of rows as a result of a 
-query). This descriptor is bound to a bind variable of data type 
-SQLT_RSET (result set). The descriptor has to be converted into a 
-statement handle using a function - OCIResultSetToStmt() - which can 
-then be passed to OCIDefineByPos() and OCIStmtFetch() to retrieve the 
-rows of the result set.
-OCI_DTYPE_ROWID - specifies generation of a ROWID descriptor of C 
-type OCIRowid.
-OCI_DTYPE_COMPLEXOBJECTCOMP - specifies generation of a 
-complex object retrieval descriptor of C type 
-OCIComplexObjectComp.
-xtramemsz (IN) - specifies an amount of user memory to be allocated for use 
-by the application. 
-usrmempp (OUT) - returns a pointer to the user memory of size xtramemsz 
-allocated by the call for the user. 
-Related Functions
-OCIDescFree()
-
-
-
-
-OCIDescFree()
-Name
-OCI Free DESCriptor
-Purpose
-Deallocates a previously allocated descriptor.
-Syntax
-sword OCIDescFree ( dvoid    *descp,
-                  ub4      type);
-Comments
-This call frees up storage associated with the descriptor, corresponding to the
-type specified in type. Returns OCI_SUCCESS or OCI_INVALID_HANDLE. 
-All descriptors must be explicitly deallocated. OCI will not deallocate a 
-descriptor if the environment handle is deallocated.
-Parameters
-descp (IN) - an allocated descriptor. 
-type (IN) - specifies the type of storage to be freed. The specific types are: 
-OCI_DTYPE_SNAP - snapshot descriptor
-OCI_DTYPE_LOB - a LOB data type descriptor
-OCI_DTYPE_RSET - a descriptor that references a result set (a number 
-of rows as a result of a query).
-OCI_DTYPE_ROWID - a ROWID descriptor
-OCI_DTYPE_COMPLEXOBJECTCOMP - a complex object retrieval 
-descriptor
-Related Functions
-OCIDescAlloc()
-
-
-
-OCIDescribeAny()
-Name
-OCI DeSCribe Any
-Purpose
-Describes existing schema objects.
-Syntax
-sword OCIDescribeAny ( OCISvcCtx     *svchp,
-                     OCIError      *errhp,
-                     dvoid         *objptr,
-                     ub4           objptr_len,
-   		     ub1           objptr_typ,
-                     ub1           info_level,
-		     ub1           objtype,
-                     OCIDesc       *dschp );
-Comments
-This is a generic describe call that describes existing schema objects: tables,
-views, synonyms, procedures, functions, packages, sequences, and types. As a 
-result of this call, the describe handle is populated with the object-specific 
-attributes which can be obtained through an OCIAttrGet() call.
-An OCIParamGet() on the describe handle returns a parameter descriptor for a 
-specified position. Parameter positions begin with 1. Calling OCIAttrGet() on 
-the parameter descriptor returns the specific attributes of a stored procedure 
-or function parameter or a table column descriptor as the case may be. 
-These subsequent calls do not need an extra round trip to the server because 
-the entire schema object description cached on the client side by 
-OCIDescribeAny(). Calling OCIAttrGet() on the describe handle can also return 
-the total number of positions.
-See the section "Describing" on page 2-33 for more information about describe 
-operations.
-Parameters
-TO BE UPDATED
-svchp (IN/OUT) - a service context handle.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-objptr (IN) - the name of the object (a null-terminated string) to be 
-described. Only procedure or function names are valid when connected to an 
-Oracle7 Server.
-objptr_len (IN) - the length of the string. Must be non-zero.
-objptr_typ (IN) - Must be OCI_OTYPE_NAME, OCI_OTYPE_REF, or OCI_OTYPE_PTR.
-info_level (IN) - reserved for future extensions. Pass OCI_DEFAULT.
-objtype (IN/OUT) - Object type.
-dschp (IN/OUT) - a describe handle that is populated with describe 
-information about the object after the call.
-Related Functions
-OCIAttrGet()
-
-
-
-OCIEnvCreate()
-Name
-OCI ENVironment CREATE
-Purpose
-This function creates and initializes an environment for the rest of
-the OCI functions to work under.  This call is a replacement for both
-the OCIInitialize and OCIEnvInit calls.
-Syntax
-sword OCIEnvCreate  ( OCIEnv        **envhpp, 
-                      ub4           mode, 
-                      dvoid         *ctxp, 
-                      dvoid         *(*malocfp) 
-                                    (dvoid *ctxp, 
-                                        size_t size), 
-                      dvoid         *(*ralocfp) 
-                                    (dvoid *ctxp, 
-                                       dvoid *memptr, 
-                                       size_t newsize), 
-                      void          (*mfreefp) 
-                                    (dvoid *ctxp, 
-                                       dvoid *memptr))
-                      size_t        xtramemsz,
-                      dvoid         **usrmempp );
- 
-Comments
-This call creates an environment for all the OCI calls using the modes
-specified by the user. This call can be used instead of the two calls
-OCIInitialize and OCIEnvInit. This function returns an environment handle
-which is then used by the remaining OCI functions. There can be multiple
-environments in OCI each with its own environment modes.  This function 
-also performs any process level initialization if required by any mode.
-For example if the user wants to initialize an environment as OCI_THREADED,
-then all libraries that are used by OCI are also initialized in the
-threaded mode. 
-
-This call should be invoked before anny other OCI call and should be used
-instead of the OCIInitialize and OCIEnvInit calls. This is the recommended
-call, although OCIInitialize and OCIEnvInit calls will still be supported
-for backward compatibility. 
- 
-envpp (OUT) - a pointer to a handle to the environment. 
-mode (IN) - specifies initialization of the mode. The valid modes are:
-OCI_DEFAULT - default mode.
-OCI_THREADED - threaded environment. In this mode, internal data 
-structures are protected from concurrent accesses by multiple threads. 
-OCI_OBJECT - will use navigational object interface. 
-ctxp (IN) - user defined context for the memory call back routines. 
-malocfp (IN) - user-defined memory allocation function. If mode is 
-OCI_THREADED, this memory allocation routine must be thread safe.
-ctxp - context pointer for the user-defined memory allocation function.
-size - size of memory to be allocated by the user-defined memory 
-allocation function
-ralocfp (IN) - user-defined memory re-allocation function. If mode is 
-OCI_THREADED, this memory allocation routine must be thread safe.
-ctxp - context pointer for the user-defined memory reallocation 
-function.
-memp - pointer to memory block
-newsize - new size of memory to be allocated
-mfreefp (IN) - user-defined memory free function. If mode is 
-OCI_THREADED, this memory free routine must be thread safe.
-ctxp - context pointer for the user-defined memory free function.
-memptr - pointer to memory to be freed
-xtramemsz (IN) - specifies the amount of user memory to be allocated. 
-usrmempp (OUT) - returns a pointer to the user memory of size xtramemsz 
-allocated by the call for the user.
-
-Example
-
-Related Functions
-OCIInitialize, OCIEnvInit
-
-
-OCIEnvNlsCreate()
-Name
-OCI ENVironment CREATE with NLS info
-Purpose
-This function does almost everything OCIEnvCreate does, plus enabling setting
-of charset and ncharset programmatically, except OCI_UTF16 mode. 
-Syntax
-sword OCIEnvNlsCreate(OCIEnv        **envhpp,
-                      ub4           mode,
-                      dvoid         *ctxp,
-                      dvoid         *(*malocfp)
-                                    (dvoid *ctxp,
-                                        size_t size),
-                      dvoid         *(*ralocfp)
-                                    (dvoid *ctxp,
-                                       dvoid *memptr,
-                                       size_t newsize),
-                      void          (*mfreefp)
-                                    (dvoid *ctxp,
-                                       dvoid *memptr),
-                      size_t        xtramemsz,
-                      dvoid         **usrmempp,
-                      ub2           charset,
-                      ub2           ncharset)
-Comments
-The parameters have the same meaning as the ones in OCIEnvCreate().
-The charset and ncharset must be both zero or non-zero.
-When charset or ncharset is non-zero, the corresponding character set will
-be used to replace the ones specified in NLS_LANG or NLS_NCHAR. Moreover,
-OCI_UTF16ID is allowed to be set as charset and ncharset.
-On the other hand, OCI_UTF16 mode is deprecated with this function. 
-Applications can achieve the same effects by setting 
-both charset and ncharset as OCI_UTF16ID.
-
-
-OCIEnvInit()
-Name
-OCI INITialize environment
-Purpose
-This call initializes the OCI environment handle.
-Syntax
-sword OCIEnvInit ( OCIEnv    **envp,
-                 ub4       mode,
-                 size_t    xtramemsz,
-                 dvoid     **usrmempp );
-Comments
-Initializes the OCI environment handle. No changes are done on an initialized 
-handle. If OCI_ERROR or OCI_SUCCESS_WITH_INFO is returned, the 
-environment handle can be used to obtain ORACLE specific errors and 
-diagnostics.
-This call is processed locally, without a server round-trip.
-Parameters
-envpp (OUT) - a pointer to a handle to the environment. 
-mode (IN) - specifies initialization of an environment mode. The only valid 
-mode is OCI_DEFAULT for default mode
-xtramemsz (IN) - specifies the amount of user memory to be allocated. 
-usrmempp (OUT) - returns a pointer to the user memory of size xtramemsz 
-allocated by the call for the user.
-Example
-See the description of OCISessionBegin() on page 13-84 for an example showing 
-the use of OCIEnvInit(). 
-Related Functions
-
-
-
-
-OCIErrorGet()
-Name
-OCI Get Diagnostic Record
-Purpose
-Returns an error message in the buffer provided and an ORACLE error.
-Syntax
-sword OCIErrorGet ( dvoid      *hndlp, 
-                  ub4        recordno,
-                  OraText       *sqlstate,
-                  ub4        *errcodep, 
-                  OraText       *bufp,
-                  ub4        bufsiz,
-                  ub4        type );
-Comments
-Returns an error message in the buffer provided and an ORACLE error. 
-Currently does not support SQL state. This call can be called a multiple 
-number of times if there are more than one diagnostic record for an error.
-The error handle is originally allocated with a call to OCIHandleAlloc().
-Parameters
-hndlp (IN) - the error handle, in most cases, or the environment handle (for 
-errors on OCIEnvInit(), OCIHandleAlloc()).
-recordno (IN) - indicates the status record from which the application seeks 
-info. Starts from 1. 
-sqlstate (OUT) - Not supported in Version 8.0.
-errcodep (OUT) - an ORACLE Error is returned.
-bufp (OUT) - the error message text is returned.
-bufsiz (IN) - the size of the buffer provide to get the error message.
-type (IN) - the type of the handle.
-Related Functions
-OCIHandleAlloc()
-
-OCIExtractInit
-Name
-OCI Extract Initialize 
-Purpose
-This function initializes the parameter manager. 
-Syntax
-sword OCIExtractInit(dvoid *hndl, OCIError *err);
-Comments
-It must be called before calling any other parameter manager routine. The NLS 
-information is stored inside the parameter manager context and used in 
-subsequent calls to OCIExtract routines.
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
-Parameters
-hndl (IN/OUT) - The OCI environment or session handle.
-err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-               err and this function returns OCI_ERROR. Diagnostic information 
-               can be obtained by calling OCIErrorGet().
-Related Functions
-OCIExtractTerm()
-
-OCIExtractTerm
-Name
-OCI Extract Terminate
-Purpose
-This function releases all dynamically allocated storage and may perform 
-other internal bookkeeping functions.
-Syntax
-sword OCIExtractTerm(dvoid *hndl, OCIError *err);
-Comments
-It must be called when the parameter manager is no longer being used.
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
-Parameters
-hndl (IN/OUT) - The OCI environment or session handle.
-err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-               err and this function returns OCI_ERROR. Diagnostic information 
-               can be obtained by calling OCIErrorGet().
-Related Functions
-OCIExtractInit()
-
-OCIExtractReset
-Name
-OCI Extract Reset
-Purpose
-The memory currently used for parameter storage, key definition storage, and 
-parameter value lists is freed and the structure is reinitialized.
-Syntax
-sword OCIExtractReset(dvoid *hndl, OCIError *err);
-Comments
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
-Parameters
-hndl (IN/OUT) - The OCI environment or session handle.
-err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-               err and this function returns OCI_ERROR. Diagnostic information 
-               can be obtained by calling OCIErrorGet().
-Related Functions
-
-OCIExtractSetNumKeys
-Name
-OCI Extract Set Number of Keys
-Purpose
-Informs the parameter manager of the number of keys that will be registered.
-Syntax
-sword OCIExtractSetNumKeys(dvoid *hndl, OCIError *err, uword numkeys);
-Comments
-This routine must be called prior to the first call of OCIExtractSetKey().  
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
-Parameters
-hndl (IN/OUT) - The OCI environment or session handle.
-err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-               err and this function returns OCI_ERROR. Diagnostic information 
-               can be obtained by calling OCIErrorGet().
-numkeys (IN) - The number of keys that will be registered with 
-               OCIExtractSetKey().
-Related Functions
-OCIExtractSetKey()
-
-OCIExtractSetKey
-Name
-OCI Extract Set Key definition
-Purpose
-Registers information about a key with the parameter manager.
-Syntax
-sword OCIExtractSetKey(dvoid *hndl, OCIError *err, CONST OraText *name, ub1 type,
-                       ub4 flag, CONST dvoid *defval, CONST sb4 *intrange, 
-                       CONST OraText *CONST *strlist);
-Comments
-This routine must be called after calling OCIExtractSetKey() and before 
-calling OCIExtractFromFile() or OCIExtractFromStr().  
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
-Parameters
-hndl (IN/OUT) - The OCI environment or session handle.
-err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-               err and this function returns OCI_ERROR. Diagnostic information 
-               can be obtained by calling OCIErrorGet().
-name (IN) - The name of the key.
-type (IN) - The type of the key (OCI_EXTRACT_TYPE_INTEGER, 
-            OCI_EXTRACT_TYPE_OCINUM, OCI_EXTRACT_TYPE_STRING, or 
-            OCI_EXTRACT_TYPE_BOOLEAN).
-flag (IN) - Set to OCI_EXTRACT_MULTIPLE if the key can take multiple values 
-            or 0 otherwise.
-defval (IN) - Set to the default value for the key.  May be NULL if there is 
-               no default.  A string default must be a (text*) type, an 
-               integer default must be an (sb4*) type, and a boolean default 
-               must be a (ub1*) type.
-intrange (IN) - Starting and ending values for the allowable range of integer 
-                values.  May be NULL if the key is not an integer type or if 
-                all integer values are acceptable.
-strlist (IN) - List of all acceptable text strings for the key.  May be NULL 
-               if the key is not a string type or if all text values are 
-               acceptable.
-Related Functions
-OCIExtractSetNumKeys()
-
-OCIExtractFromFile
-Name
-OCI Extract parameters From File
-Purpose
-The keys and their values in the given file are processed. 
-Syntax
-sword OCIExtractFromFile(dvoid *hndl, OCIError *err, ub4 flag, OraText *filename);
-Comments
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
-Parameters
-hndl (IN/OUT) - The OCI environment or session handle.
-err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-               err and this function returns OCI_ERROR. Diagnostic information 
-               can be obtained by calling OCIErrorGet().
-flag (IN) - Zero or has one or more of the following bits set: 
-           OCI_EXTRACT_CASE_SENSITIVE, OCI_EXTRACT_UNIQUE_ABBREVS, or 
-           OCI_EXTRACT_APPEND_VALUES. 
-filename (IN) - Null-terminated filename string.
-Related Functions
-
-OCIExtractFromStr
-Name
-OCI Extract parameters From String
-Purpose
-The keys and their values in the given string are processed. 
-Syntax
-sword OCIExtractFromStr(dvoid *hndl, OCIError *err, ub4 flag, OraText *input);
-Comments
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
-Parameters
-hndl (IN/OUT) - The OCI environment or session handle.
-err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-               err and this function returns OCI_ERROR. Diagnostic information 
-               can be obtained by calling OCIErrorGet().
-flag (IN) - Zero or has one or more of the following bits set: 
-           OCI_EXTRACT_CASE_SENSITIVE, OCI_EXTRACT_UNIQUE_ABBREVS, or 
-           OCI_EXTRACT_APPEND_VALUES. 
-input (IN) - Null-terminated input string.
-Related Functions
-
-OCIExtractToInt
-Name
-OCI Extract To Integer
-Purpose
-Gets the integer value for the specified key.
-Syntax
-sword OCIExtractToInt(dvoid *hndl, OCIError *err, OraText *keyname, uword valno, 
-                      sb4 *retval);
-Comments
-The valno'th value (starting with 0) is returned.
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, OCI_NO_DATA, or OCI_ERROR. 
-OCI_NO_DATA means that there is no valno'th value for this key.
-Parameters
-hndl (IN) - The OCI environment or session handle.
-err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-               err and this function returns OCI_ERROR. Diagnostic information 
-               can be obtained by calling OCIErrorGet().
-keyname (IN) - Key name.
-valno (IN) - Which value to get for this key.
-retval (OUT) - The actual integer value.
-Related Functions
-
-OCIExtractToBool
-Name
-OCI Extract To Boolean
-Purpose
-Gets the boolean value for the specified key. 
-Syntax
-sword OCIExtractToBool(dvoid *hndl, OCIError *err, OraText *keyname, uword valno,
-                       ub1 *retval);
-Comments
-The valno'th value (starting with 0) is returned.
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, OCI_NO_DATA, or OCI_ERROR. 
-OCI_NO_DATA means that there is no valno'th value for this key.
-Parameters
-hndl (IN) - The OCI environment or session handle.
-err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-               err and this function returns OCI_ERROR. Diagnostic information 
-               can be obtained by calling OCIErrorGet().
-keyname (IN) - Key name.
-valno (IN) - Which value to get for this key.
-retval (OUT) - The actual boolean value.
-Related Functions
-
-OCIExtractToStr
-Name
-OCI Extract To String
-Purpose
-Gets the string value for the specified key.
-Syntax
-sword OCIExtractToStr(dvoid *hndl, OCIError *err, OraText *keyname, uword valno, 
-                      OraText *retval, uword buflen);
-Comments
-The valno'th value (starting with 0) is returned.
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, OCI_NO_DATA, or OCI_ERROR. 
-OCI_NO_DATA means that there is no valno'th value for this key.
-Parameters
-hndl (IN) - The OCI environment or session handle.
-err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-               err and this function returns OCI_ERROR. Diagnostic information 
-               can be obtained by calling OCIErrorGet().
-keyname (IN) - Key name.
-valno (IN) - Which value to get for this key.
-retval (OUT) - The actual null-terminated string value.
-buflen (IN) - The length of the buffer for retval.
-Related Functions
-
-Note: The following OCIExtract functions are unavailable in this release
-
-OCIExtractToOCINum
-Name
-OCI Extract To OCI Number
-Purpose
-Gets the OCINumber value for the specified key.
-Syntax
-sword OCIExtractToOCINum(dvoid *hndl, OCIError *err, OraText *keyname, 
-                         uword valno, OCINumber *retval);
-Comments
-The valno'th value (starting with 0) is returned.
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, OCI_NO_DATA, or OCI_ERROR. 
-OCI_NO_DATA means that there is no valno'th value for this key.
-Parameters
-hndl (IN) - The OCI environment or session handle.
-err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-               err and this function returns OCI_ERROR. Diagnostic information 
-               can be obtained by calling OCIErrorGet().
-keyname (IN) - Key name.
-valno (IN) - Which value to get for this key.
-retval (OUT) - The actual OCINumber value.
-Related Functions
-
-OCIExtractToList
-Name
-OCI Extract To parameter List
-Purpose
-Generates a list of parameters from the parameter structures that are stored 
-in memory. 
-Syntax
-sword OCIExtractToList(dvoid *hndl, OCIError *err, uword *numkeys);
-Comments
-Must be called before OCIExtractValues() is called.
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
-Parameters
-hndl (IN) - The OCI environment or session handle.
-err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-               err and this function returns OCI_ERROR. Diagnostic information 
-               can be obtained by calling OCIErrorGet().
-numkeys (OUT) - Number of distinct keys stored in memory.
-Related Functions
-OCIExtractFromList()
-
-OCIExtractFromList
-Name
-OCI Extract From parameter List
-Purpose
-Generates a list of values for the a parameter in the parameter list.
-Syntax
-sword OCIExtractFromList(dvoid *hndl, OCIError *err, uword index, OraText *name, 
-                         ub1 *type, uword *numvals, dvoid ***values);
-Comments
-Parameters are specified by an index. OCIExtractToList() must be called prior 
-to calling this routine to generate the parameter list from the parameter 
-structures that are stored in memory. 
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
-Parameters
-hndl (IN) - The OCI environment or session handle.
-err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-               err and this function returns OCI_ERROR. Diagnostic information 
-               can be obtained by calling OCIErrorGet().
-name (OUT) - Name of the key for the current parameter.
-type (OUT) - Type of the current parameter (OCI_EXTRACT_TYPE_STRING, 
-             OCI_EXTRACT_TYPE_INTEGER, OCI_EXTRACT_TYPE_OCINUM, or 
-             OCI_EXTRACT_TYPE_BOOLEAN)
-numvals (OUT) - Number of values for this parameter.
-values (OUT) - The values for this parameter.
-Related Functions
-OCIExtractToList()
-
-
-************************  OCIFileClose() ***********************************
- 
-Name
- OCIFileClose - Oracle Call Interface FILE i/o CLOSE
-
-Purpose
- Close a previously opened file.
-
-Syntax
- sword OCIFileClose ( dvoid             *hndl, 
-             	      OCIError          *err,
-                      OCIFileObject     *filep )
-
-Comments
- This function will close a previously opened file. If the function succeeds
- then OCI_SUCCESS will be returned, else OCI_ERROR. 
- 
-Parameters
- hndl  (IN) - the OCI environment or session handle.
- err (OUT) - the OCI error handle
- filep (IN) - the OCIFile file object
-
-Related Functions
- OCIFileOpen.  
-
-
-
-********************* OCIFileExists() **************************************
-
-Name
- OCIFileExists - Oracle Call Interface FILE i/o EXIST
-
-Purpose
- Check to see if the file exists.
-
-Syntax
- sword OCIFileExists ( dvoid           *hndl, 
-            	      OCIError         *err, 
-                      OraText          *filename,
-                      OraText          *path,
-                      ub1              *flag )
-
-Comments
- This function will set the flag to TRUE if the file exists else it will
- be set to FALSE.
- The function will return OCI_ERROR if any error is encountered, else
- it will return OCI_ERROR. 
-
-Parameters
- hndl(IN) - OCI environment or session handleenv
- err(OUT) - OCI error handle
- filename(IN) - filename
- path(IN) - path of the file
- flag(OUT) - whether the file exists or not
-
-Related Functions.
- None.
-     
-
- **************************** OCIFileFlush() ******************************
-
-
-Name
- OCIFileFlush - Oracle Call Interface File i/o FLUSH
-
-Purpose
- Flush the buffers associated with the file to the disk.
-
-Syntax
- sword OCIFileFlush ( dvoid             *hndl, 
-             	      OCIError          *err,
-                      OCIFileObject     *filep )
-
-Comments
- The function will return OCI_ERROR if any error is encountered, else
- it will return OCI_ERROR.
-
-Parameters 
- hndl (IN) - the OCI environment or session handle.
- err (OUT) - the OCI error handle
- filep (IN) - the OCIFile file object
-
-Related Functions
- OCIFileOpen, OCIFileWrite
-
-
-
- *************************** OCIFileGetLength() ****************************
-
-Name
- OCIFileGetLength - Oracle Call Interface FILE i/o GET file LENGTH
-
-Purpose
- Get the length of a file.
-
-Syntax
- OCIFileGetLength(dvoid           *hndl, 
-	          OCIError        *err,
-                  OraText         *filename,
-                  OraText         *path,
-                  ubig_ora        *lenp )
-
-Comments
- The length of the file will be returned in lenp.
- The function will return OCI_ERROR if any error is encountered, else
- it will return OCI_ERROR.
- 
-Parameters
- hndl (IN) - the OCI environment or session handle.
- err (OUT) - the OCI error handle.  If  there is an error, it is recorded 
- in err and this function returns OCI_ERROR.  Diagnostic information can be 
- obtained by calling OCIErrorGet().
- filename (IN) - file name.
- path (IN) - path of the file.
- lenp (OUT) - On output, it is the length of the file in bytes.
- is the number of bytes in the file.
-
-Related Functions
- None.
-
-
-
-******************************** OCIFileInit() *****************************
-   
-Name
- OCIFileInit - Oracle Call Interface FILE i/o INITialize
-
-Purpose
- Initialize the OCI File I/O package and create the OCIFile context.
-
-Syntax
- sword OCIFileInit ( dvoid *hndl, 
-                     OCIError *err)
-
-Comments
- This function should be called before any of the OCIFile functions are
- used.
- The function will return OCI_ERROR if any error is encountered, else
- it will return OCI_ERROR.
- 
-Parameters
- hndl(IN) - OCI environment or session handle.
- err(OUT) - OCI error structure.
-
-Related Functions
- OCIFileTerm
-     
-
-
-********************************* OCIFileOpen() *****************************
-
-Name
- OCIFileOpen - Oracle Call Interface File i/o OPEN
-
-Purpose
-     Open a file.
-
-Syntax
- sword OCIFileOpen ( dvoid               *hndl, 
-	             OCIError            *err,
-                     OCIFileObject      **filep,
-                     OraText             *filename,
-                     OraText             *path,
-                     ub4                  mode,
-                     ub4                  create, 
-                     ub4                  type )
-
-Comments
- OCIFileOpen returns a handle to the open file in filep if the file is
- successfully opened. 
- If one wants to use the standard file objects (stdin, stdout & stderr)
- then OCIFileOpen whould be called with the type filed containing the 
- appropriate type (see the parameter type). If any of the standard files 
- are specified then filename, path, mode and create are ignored.
- The function will return OCI_ERROR if any error is encountered, else
- it will return OCI_ERROR.
-
-Parameters
- hndl (OUT) - the OCI environment or session handle.
- err (OUT) - the OCI error handle.  If  there is an error, it is recorded 
- in err and this function returns OCI_ERROR.  Diagnostic information can be 
- obtained by calling OCIErrorGet().
- filep (OUT) - the file object to be returned.
- filename (IN) - file name (NULL terminated string).
- path (IN) - path of the file (NULL terminated string).
- mode - mode in which to open the file (valid modes are OCI_FILE_READONLY,
- OCI_FILE_WRITEONLY, OCI_FILE_READ_WRITE).
- create - should the file be created if it does not exist. Valid values
- are: 
-     OCI_FILE_TRUNCATE - create a file regardless of whether or not it exists. 
-                        If the file already exists overwrite it.
-     OCI_FILE_EXCL - fail if the file exists, else create.
-     OCI_FILE_EXIST - open it if it exists, else fail.
-     OCI_FILE_CREATE - open the file if it exists, and create it if it doesn't.
-     OCI_FILE_APPEND - set the file pointer to the end of the file prior to 
-                      writing(this flag can be OR'ed with OCI_FILE_EXIST or
-                      OCI_FILE_CREATE).
-type - file type. Valid values are OCI_FILE_TEXT, OCI_FILE_BIN, 
-       OCI_FILE_STDIN, OCI_FILE_STDOUT and OCI_FILE_STDERR.
-       If any of the standard files are specified then filename, path, mode
-       and create are ignored.
-
-Related Functions.
- OCIFileClose
-
-
-
-************************** OCIFileRead() ************************************
-   
-Name
- OCIFileRead - Oracle Call Interface FILE i/o READ
-
-Purpose
- Read from a file into a buffer.
-
-Syntax
- sword OCIFileRead ( dvoid            *hndl, 
-          	     OCIError         *err,
-                     OCIFileObject    *filep,
-                     dvoid            *bufp,
-                     ub4               bufl,
-                     ub4              *bytesread )
-
-Comments
- Upto bufl bytes from the file will be read into bufp. The user should
- allocate memory for the buffer.
- The number of bytes read would be in bytesread.
- The function will return OCI_ERROR if any error is encountered, else
- it will return OCI_ERROR.
-
-Parameters
- hndl (IN) - the OCI environment or session handle.
- err (OUT) - the OCI error handle.  If  there is an error, it is recorded 
- in err and this function returns OCI_ERROR.  Diagnostic information can be 
- obtained by calling OCIErrorGet().
- filep (IN/OUT) - a File Object that uniquely references the file.
- bufp (IN) - the pointer to a buffer into which the data will be read. The 
- length of the allocated memory is assumed to be bufl. 
- bufl - the length of the buffer in bytes. 
- bytesread (OUT) - the number of bytes read.
-
-Related Functions
- OCIFileOpen, OCIFileSeek, OCIFileWrite
-
-
-
-****************************** OCIFileSeek() ******************************
-
-Name
- OCIFileSeek - Oracle Call Interface FILE i/o SEEK
-
-Purpose
- Perfom a seek to a byte position.
-
-Syntax
- sword OCIFileSeek ( dvoid           *hndl, 
-        	     OCIError        *err,  
-                     OCIFileObject   *filep,
-                     uword            origin,
-                     ubig_ora         offset,
-                     sb1              dir)
-
-Comments
- The function will return OCI_ERROR if any error is encountered, else
- it will return OCI_ERROR.
-
-Parameters
- hndl (IN) - the OCI environment or session handle.
- err (OUT) - the OCI error handle.  If  there is an error, it is recorded 
- in err and this function returns OCI_ERROR.  Diagnostic information can be 
- obtained by calling OCIErrorGet().
- filep (IN/OUT) - a file handle that uniquely references the file.
- origin - The starting point we want to seek from. NOTE: The starting 
- point may be OCI_FILE_SEEK_BEGINNING (beginning), OCI_FILE_SEEK_CURRENT 
- (current position), or OCI_FILE_SEEK_END (end of file). 
- offset - The number of bytes from the origin we want to start reading from. 
- dir - The direction we want to go from the origin. NOTE: The direction 
- can be either OCI_FILE_FORWARD or OCI_FILE_BACKWARD. 
- 
-Related Function
- OCIFileOpen, OCIFileRead, OCIFileWrite
-
-
-
-*************************** OCIFileTerm() **********************************
-
-Name
- OCIFileTerm - Oracle Call Interface FILE i/o TERMinate
-
-Purpose
- Terminate the OCI File I/O package and destroy the OCI File context.
-
-Syntax
- sword OCIFileTerm ( dvoid *hndl, 
-                     OCIError *err )
-
-Comments
- After this function has been called no OCIFile function should be used.
- The function will return OCI_ERROR if any error is encountered, else
- it will return OCI_ERROR.
- 
-Parameters
- hndl(IN) - OCI environment or session handle.
- err(OUT) - OCI error structure. 
-  
-Related Functions 
- OCIFileInit   
- 
-
-********************************* OCIFileWrite() **************************** 
-
-Name 
- OCIFileWrite - Oracle Call Interface FILE i/o WRITE
-
-Purpose
-  Write data from buffer into a file.
-
-Syntax
- sword OCIFileWrite ( dvoid            *hndl, 
-            	      OCIError         *err,  
-                      OCIFileObject    *filep,
-                      dvoid            *bufp, 
-                      ub4               buflen
-                      ub4              *byteswritten )
-
-Comments
- The number of bytes written will be in *byteswritten.
- The function will return OCI_ERROR if any error is encountered, else
- it will return OCI_ERROR.
-
-Parameters
- hndl (IN) - the OCI environment or session handle.
- err (OUT) - the OCI error handle.  If  there is an error, it is recorded 
- in err and this function returns OCI_ERROR.  Diagnostic information can be 
- obtained by calling OCIErrorGet().
- filep (IN/OUT) - a file handle that uniquely references the file.
- bufp (IN) - the pointer to a buffer from which the data will be written. 
- The length of the allocated memory is assumed to be the value passed
- in bufl. 
- bufl - the length of the buffer in bytes.
- byteswritten (OUT) - the number of bytes written.
- 
-Related Functions
- OCIFileOpen, OCIFileSeek, OCIFileRead
-
-
-
-OCIHandleAlloc()
-Name
-OCI Get HaNDLe
-Purpose
-This call returns a pointer to an allocated and initialized handle.
-Syntax
-sword OCIHandleAlloc ( CONST dvoid   *parenth,
-                     dvoid         **hndlpp, 
-                     ub4           type, 
-                     size_t        xtramem_sz,
-                     dvoid         **usrmempp);
-Comments
-Returns a pointer to an allocated and initialized structure, corresponding to 
-the type specified in type. A non-NULL handle is returned on success. Bind 
-handle and define handles are allocated with respect to a statement handle. All
-other handles are allocated with respect to an environment handle which is 
-passed in as a parent handle.
-No diagnostics are available on error. This call returns OCI_SUCCESS if 
-successful, or OCI_INVALID_HANDLE if an out-of-memory error occurs.
-Handles must be allocated using OCIHandleAlloc() before they can be passed 
-into an OCI call.
-Parameters
-parenth (IN) - an environment or a statement handle. 
-hndlpp (OUT) - returns a handle to a handle type. 
-type (IN) - specifies the type of handle to be allocated. The specific types 
-are: 
-OCI_HTYPE_ERROR - specifies generation of an error report handle of 
-C type OCIError
-OCI_HTYPE_SVCCTX - specifies generation of a service context handle 
-of C type OCISvcCtx
-OCI_HTYPE_STMT - specifies generation of a statement (application 
-request) handle of C type OCIStmt
-OCI_HTYPE_BIND - specifies generation of a bind information handle 
-of C type OCIBind
-OCI_HTYPE_DEFINE - specifies generation of a column definition 
-handle of C type OCIDefine
-OCI_HTYPE_DESCRIBE  - specifies generation of a select list 
-description handle of C type OCIDesc
-OCI_HTYPE_SERVER - specifies generation of a server context handle 
-of C type OCIServer
-OCI_HTYPE_SESSION - specifies generation of an authentication 
-context handle of C type OCISession
-OCI_HTYPE_TRANS - specifies generation of a transaction context 
-handle of C type OCITrans
-OCI_HTYPE_COMPLEXOBJECT - specifies generation of a complex 
-object retrieval handle of C type OCIComplexObject
-OCI_HTYPE_SECURITY - specifies generation of a security handle of C 
-type OCISecurity
-xtramem_sz (IN) - specifies an amount of user memory to be allocated.
-usrmempp (OUT) - returns a pointer to the user memory of size xtramemsz 
-allocated by the call for the user. 
-Related Functions
-OCIHandleFree()
-
-
-
-OCIHandleFree()
-Name
-OCI Free HaNDLe
-Purpose
-This call explicitly deallocates a handle.
-Syntax
-sword OCIHandleFree ( dvoid     *hndlp,
-                    ub4       type);
-Comments
-This call frees up storage associated with a handle, corresponding to the type 
-specified in the type parameter.
-This call returns either OCI_SUCCESS or OCI_INVALID_HANDLE.
-All handles must be explicitly deallocated. OCI will not deallocate a child 
-handle if the parent is deallocated.
-Parameters
-hndlp (IN) - an opaque pointer to some storage.
-type (IN) - specifies the type of storage to be allocated. The specific types are:
-OCI_HTYPE_ENV - an environment handle
-OCI_HTYPE_ERROR - an error report handle
-OCI_HTYPE_SVCCTX - a service context handle
-OCI_HTYPE_STMT - a statement (application request) handle
-OCI_HTYPE_BIND - a bind information handle
-OCI_HTYPE_DEFINE - a column definition handle
-OCI_HTYPE_DESCRIBE  - a select list description handle
-OCI_HTYPE_SERVER - a server handle
-OCI_HTYPE_SESSION - a user authentication handle
-OCI_HTYPE_TRANS - a transaction handle
-OCI_HTYPE_COMPLEXOBJECT - a complex object retrieval handle
-OCI_HTYPE_SECURITY - a security handle
-Related Functions
-OCIHandleAlloc()
-
-
-
-
-OCIInitialize()
-Name
-OCI Process Initialize
-Purpose
-Initializes the OCI process environment.
-Syntax
-sword OCIInitialize ( ub4           mode,
-                    CONST dvoid   *ctxp, 
-                    CONST dvoid   *(*malocfp) 
-                                  ( dvoid *ctxp,
-                                    size_t size ),
-                    CONST dvoid   *(*ralocfp)
-                                  ( dvoid *ctxp,
-                                    dvoid *memp,
-                                    size_t newsize ),
-                    CONST void    (*mfreefp)
-                                  ( dvoid *ctxp,
-                                    dvoid *memptr ));
-Comments
-This call initializes the OCI process environment.
-OCIInitialize() must be invoked before any other OCI call. 
-Parameters
-mode (IN) - specifies initialization of the mode. The valid modes are:
-OCI_DEFAULT - default mode.
-OCI_THREADED - threaded environment. In this mode, internal data 
-structures are protected from concurrent accesses by multiple threads. 
-OCI_OBJECT - will use navigational object interface. 
-ctxp (IN) - user defined context for the memory call back routines. 
-malocfp (IN) - user-defined memory allocation function. If mode is 
-OCI_THREADED, this memory allocation routine must be thread safe.
-ctxp - context pointer for the user-defined memory allocation function.
-size - size of memory to be allocated by the user-defined memory 
-allocation function
-ralocfp (IN) - user-defined memory re-allocation function. If mode is 
-OCI_THREADED, this memory allocation routine must be thread safe.
-ctxp - context pointer for the user-defined memory reallocation 
-function.
-memp - pointer to memory block
-newsize - new size of memory to be allocated
-mfreefp (IN) - user-defined memory free function. If mode is 
-OCI_THREADED, this memory free routine must be thread safe.
-ctxp - context pointer for the user-defined memory free function.
-memptr - pointer to memory to be freed
-Example
-See the description of OCIStmtPrepare() on page 13-96 for an example showing 
-the use of OCIInitialize().
-Related Functions
-
-
---------------------------------OCITerminate------------------------------------
-
-OCITerminate()
-Name
-OCI process Terminate
-Purpose
-Do cleanup before process termination
-Syntax
-sword OCITerminate ( ub4           mode);
-
-Comments
-This call performs  OCI related clean up before the OCI process terminates.
-If the process is running in shared mode then the OCI process is disconnected
-from the shared memory subsystem.
-
-OCITerminate() should be the last OCI call in any process.
-
-Parameters
-mode (IN) - specifies different termination modes.
-
-OCI_DEFAULT - default mode.
-
-Example
-
-Related Functions
-OCIInitialize()
-
- ---------------------- OCIIntervalAssign -------------------- 
-void OCIIntervalAssign(dvoid *hndl, OCIError *err, CONST OCIInterval *inpinter,
-			OCIInterval *outinter );
-
-  DESCRIPTION
-    Copies one interval to another to create a replica
-  PARAMETERS
-     hndl (IN) - Session/Env handle.
-    err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-    (IN)  inpinter - Input Interval 
-    (OUT) outinter - Output Interval 
-  RETURNS
-     OCI_INVALID_HANDLE if 'err' is NULL.
-     OCI_SUCCESS otherwise
-
- ---------------------- OCIIntervalCheck -------------------- 
-sword OCIIntervalCheck(dvoid *hndl, OCIError *err, CONST OCIInterval *interval,
-			 ub4 *valid );
-
-  DESCRIPTION
-    Checks the validity of an interval
-  PARAMETERS
-     hndl (IN) - Session/Env handle.
-    err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-    (IN)  interval - Interval to be checked 
-    (OUT) valid     - Zero if the interval is valid, else returns an Ored
-	combination of the following codes.
-
-   Macro name                   Bit number      Error
-   ----------                   ----------      -----
-   OCI_INTER_INVALID_DAY         0x1           Bad day
-   OCI_INTER_DAY_BELOW_VALID     0x2           Bad DAy Low/high bit (1=low)
-   OCI_INTER_INVALID_MONTH       0x4           Bad MOnth
-   OCI_INTER_MONTH_BELOW_VALID   0x8           Bad MOnth Low/high bit (1=low)
-   OCI_INTER_INVALID_YEAR        0x10          Bad YeaR
-   OCI_INTER_YEAR_BELOW_VALID    0x20          Bad YeaR Low/high bit (1=low)
-   OCI_INTER_INVALID_HOUR        0x40          Bad HouR
-   OCI_INTER_HOUR_BELOW_VALID    0x80          Bad HouR Low/high bit (1=low)
-   OCI_INTER_INVALID_MINUTE      0x100         Bad MiNute
-   OCI_INTER_MINUTE_BELOW_VALID	 0x200         Bad MiNute Low/high bit(1=low)
-   OCI_INTER_INVALID_SECOND      0x400         Bad SeCond
-   OCI_INTER_SECOND_BELOW_VALID  0x800         bad second Low/high bit(1=low)
-   OCI_INTER_INVALID_FRACSEC     0x1000        Bad Fractional second
-   OCI_INTER_FRACSEC_BELOW_VALID 0x2000        Bad fractional second Low/High
-
-	
-  RETURNS
-    OCI_SUCCESS if interval is okay
-    OCI_INVALID_HANDLE if 'err' is NULL.
-
- ---------------------- OCIIntervalCompare -------------------- 
-sword OCIIntervalCompare(dvoid *hndl, OCIError *err, OCIInterval *inter1, 
-			OCIInterval *inter2, sword *result );
-
-  DESCRIPTION
-	Compares two intervals, returns 0 if equal, -1 if inter1 < inter2, 
-      	1 if inter1 > inter2
-  PARAMETERS
-     hndl (IN) - Session/Env handle. 
-     err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-     inter1  (IN)   - Interval to be compared 
-     inter2  (IN)   - Interval to be compared 
-     result  (OUT)  - 	comparison result, 0 if equal, -1 if inter1 < inter2, 
-                	1 if inter1 > inter2
-
-  RETURNS
-     OCI_SUCCESS on success
-     OCI_INVALID_HANDLE if 'err' is NULL.
-     OCI_ERROR if 
-	the two input datetimes are not mutually comparable.
-
----------------------- OCIIntervalDivide -------------------- 
-sword OCIIntervalDivide(dvoid *hndl, OCIError *err, OCIInterval *dividend, 
-		OCINumber *divisor, OCIInterval *result );
- 
-  DESCRIPTION
-     Divides an interval by an Oracle Number to produce an interval
-  PARAMETERS
-	hndl (IN) - Session/Env handle. 
-     err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-     dividend  (IN)   - Interval to be divided 
-     divisor   (IN)   - Oracle Number dividing `dividend' 
-     result    (OUT)  - resulting interval (dividend / divisor) 
-  RETURNS
-     OCI_SUCCESS on success
-     OCI_INVALID_HANDLE if 'err' is NULL.
- 
- ---------------------- OCIIntervalFromNumber -------------------- 
-sword OCIIntervalFromNumber(dvoid *hndl, OCIError *err, 
-               OCIInterval *inter, OCINumber *number);
-  DESCRIPTION
-    Converts an interval to an Oracle Number
-  PARAMETERS
-     hndl (IN) - Session/Env handle. 
-    err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-    (OUT)  interval - Interval to be converted 
-    (IN) number - Oracle number result  (in years for YEARMONTH interval
-                     and in days for DAYSECOND)
-  RETURNS
-    OCI_SUCCESS on success 
-    OCI_INVALID_HANDLE if 'err' is NULL.
-    OCI_ERROR on error.
-  NOTES
-    Fractional portions of the date (for instance, minutes and seconds if
-    the unit chosen is hours) will be included in the Oracle number produced.
-    Excess precision will be truncated.
- 
- ---------------------- OCIIntervalFromText -------------------- 
-sword OCIIntervalFromText(dvoid *hndl, OCIError *err, CONST OraText *inpstring,
-		size_t str_len, OCIInterval *result );
-
-  DESCRIPTION
-    Given an interval string produce the interval represented by the string. 
-    The type of the interval is the type of the 'result' descriptor.
-  PARAMETERS
-
-     hndl (IN) - Session/Env handle. 
-     err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-    (IN)  inpstring - Input string 
-    (IN)  str_len - Length of input string 
-    (OUT) result - Resultant interval 
-  RETURNS
-    OCI_SUCCESS on success
-    OCI_INVALID_HANDLE if 'err' is NULL.
-    OCI_ERROR if
-     	there are too many fields in the literal string
-	the year is out of range (-4713 to 9999)
-  	if the month is out of range (1 to 12)
- 	if the day of month is out of range (1 to 28...31)
-    	if hour is not in range (0 to 23)
-     	if hour is not in range (0 to 11)
-  	if minute is not in range (0 to 59)
-    	if seconds in minute not in range (0 to 59)
-   	if seconds in day not in range (0 to 86399)
-  	if the interval is invalid
-
- ---------------------- OCIIntervalGetDaySecond -------------------- 
-
-  DESCRIPTION
-     Gets values of day second interval
-  PARAMETERS
-	hndl (IN) - Session/Env handle.
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().     
-        day     (OUT) - number of days
-        hour    (OUT) - number of hours
-        min     (OUT) - number of mins
-        sec     (OUT) - number of secs
-        fsec    (OUT) - number of fractional seconds
-	result     (IN)  - resulting interval 
-  RETURNS
-	OCI_SUCCESS on success
-        OCI_INVALID_HANDLE if 'err' is NULL.
-
- ---------------------- OCIIntervalGetYearMonth -------------------- 
-
-  DESCRIPTION
-     Gets year month from an interval
-  PARAMETERS
-	hndl (IN) - Session/Env handle.
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().     
-	year    (OUT)   - year value
-	month   (OUT)   - month value
-	result     (IN)  - resulting interval 
-  RETURNS
-	OCI_SUCCESS on success
-        OCI_INVALID_HANDLE if 'err' is NULL.
-
-
----------------------- OCIIntervalAdd -------------------- 
-sword OCIIntervalAdd(dvoid *hndl, OCIError *err, OCIInterval *addend1, 
-			OCIInterval *addend2, OCIInterval *result );
-NAME OCIIntervalAdd - Adds two intervals 
-PARAMETERS
-hndl (IN) - Session/Env handle. 
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-addend1  (IN)   - Interval to be added 
-addend2  (IN)   - Interval to be added 
-result   (OUT)  - resulting interval (addend1 + addend2) 
-DESCRIPTION
-     Adds two intervals to produce a resulting interval
-RETURNS
-     OCI_SUCCESS on success
-     OCI_ERROR if:
-	the two input intervals are not mutually comparable.
-	the resulting year would go above SB4MAXVAL
-	the resulting year would go below SB4MINVAL
-     OCI_INVALID_HANDLE if 'err' is NULL.
-NOTES
-     The two input intervals must be mutually comparable
-
- ---------------------- OCIIntervalSubtract -------------------- 
-sword OCIIntervalSubtract(dvoid *hndl, OCIError *err, OCIInterval *minuend, 
-			    OCIInterval *subtrahend, OCIInterval *result );
-NAME - OCIIntervalSubtract - subtracts two intervals
-PARAMETERS
-hndl (IN) - Session/Env handle.
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().     
-minuend    (IN)   - interval to be subtracted from 
-subtrahend (IN)   - interval subtracted from minuend 
-result     (OUT)  - resulting interval (minuend - subtrahend) 
-DESCRIPTION
-     Subtracts two intervals and stores the result in an interval
-RETURNS
-	OCI_SUCCESS on success
-        OCI_INVALID_HANDLE if 'err' is NULL.
-	OCI_ERROR if:
-	   the two input intervals are not mutually comparable.
-	   the resulting leading field would go below SB4MINVAL	
-	   the resulting leading field would go above SB4MAXVAL
-
----------------------- OCIIntervalMultiply -------------------- 
-sword OCIIntervalMultiply(dvoid *hndl, OCIError *err, CONST OCIInterval *inter,
-			OCINumber *nfactor, OCIInterval *result );
-
-  DESCRIPTION
-     Multiplies an interval by an Oracle Number to produce an interval
-  PARAMETERS
-	hndl (IN) - Session/Env handle. 
-     err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-     ifactor  (IN)   - Interval to be multiplied 
-     nfactor  (IN)   - Oracle Number to be multiplied 
-     result   (OUT)  - resulting interval (ifactor * nfactor) 
-  RETURNS
-     OCI_SUCCESS on success
-     OCI_INVALID_HANDLE if 'err' is NULL.
-     OCI_ERROR if:
-	the resulting year would go above SB4MAXVAL
-	the resulting year would go below SB4MINVAL
-
-
- ---------------------- OCIIntervalSetDaySecond -------------------- 
-
-  DESCRIPTION
-     Sets day second interval
-  PARAMETERS
-	hndl (IN) - Session/Env handle.
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().     
-        day     (IN) - number of days
-        hour    (IN) - number of hours
-        min     (IN) - number of mins
-        sec     (IN) - number of secs
-        fsec    (IN) - number of fractional seconds
-	result     (OUT)  - resulting interval 
-  RETURNS
-	OCI_SUCCESS on success
-        OCI_INVALID_HANDLE if 'err' is NULL.
-
- ---------------------- OCIIntervalSetYearMonth -------------------- 
-
-  DESCRIPTION
-     Sets year month interval
-  PARAMETERS
-	hndl (IN) - Session/Env handle.
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().     
-	year    (IN)   - year value
-	month   (IN)   - month value
-	result     (OUT)  - resulting interval 
-  RETURNS
-	OCI_SUCCESS on success
-        OCI_INVALID_HANDLE if 'err' is NULL.
-
-
- ---------------------- OCIIntervalToNumber -------------------- 
-sword OCIIntervalToNumber(dvoid *hndl, OCIError *err, CONST OCIInterval *inter,
-			OCINumber *number, uword units );
-
-  DESCRIPTION
-    Converts an interval to an Oracle Number
-  PARAMETERS
-     hndl (IN) - Session/Env handle. 
-    err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-    (IN)  interval - Interval to be converted 
-    (OUT) number - Oracle number result   (in years for YEARMONTH interval
-                     and in days for DAYSECOND)
-  RETURNS
-    OCI_INVALID_HANDLE if 'err' is NULL.
-    OCI_SUCCESS on success 
-  NOTES
-    Fractional portions of the date (for instance, minutes and seconds if
-    the unit chosen is hours) will be included in the Oracle number produced.
-    Excess precision will be truncated.
- 
- ---------------------- OCIIntervalToText -------------------- 
-sword OCIIntervalToText( dvoid *hndl, OCIError *err, CONST OCIInterval *inter,
-                        ub1 lfprec, ub1 fsprec, OraText *buffer, 
-                        size_t buflen, size_t *resultlen );
-
-  DESCRIPTION
-    Given an interval, produces a string representing the interval.
-  PARAMETERS
-     hndl (IN) - Session/Env handle. 
-    err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-    (IN)  interval - Interval to be converted 
-    (IN)  lfprec  - Leading field precision. Number of digits used to
-                represent the leading field.
-    (IN)  fsprec  - Fractional second precision of the interval. Number of
-                digits used to represent the fractional seconds.
-    (OUT) buffer - buffer to hold result 
-    (IN)  buflen - length of above buffer 
-    (OUT) resultlen - length of result placed into buffer 
- 
-  RETURNS
-    OCI_SUCCESS on success
-    OCI_INVALID_HANDLE if 'err' is NULL.
-    OCI_ERROR 
-    	if the buffer is not large enough to hold the result
-  NOTES
-    The interval literal will be output as `year' or `[year-]month' for
-    YEAR-MONTH intervals and as `seconds' or `minutes[:seconds]' or
-    `hours[:minutes[:seconds]]' or `days[ hours[:minutes[:seconds]]]' for
-    DAY-TIME intervals (where optional fields are surrounded by brackets).
-
- ----------------------- OCIIntervalFromTZ --------------------- 
-sword OCIIntervalFromTZ(dvoid *hndl, OCIError *err, CONST oratext *inpstring,
-			size_t str_len, OCIInterval *results );
-
-  DESCRIPTION
-    Returns am OCIInmterval of type OCI_DTYPE_INTERVAL_DS with the region id
-    set and the current region offset or an absolute offset with the region id
-    set to 0.
-  PARAMETERS
-    hndl (IN) - Session/Env handle.
-    err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-    inpstring (IN) - pointer to the input string
-    str_len (IN) - inpstring length
-    result - Output Interval 
-  RETURNS
-     OCI_SUCCESS on success
-     OCI_INVALID_HANDLE if 'err' is NULL.
-     OCI_ERROR on error
-        Bad interval type
-        Timezone errors
-  NOTES
-     The input string must be of the form [+/-]TZH:TZM or 'TZR [TZD]'
-
-OCILdaToSvcCtx()
-Name
-OCI toggle version 7 Lda_Def to SerVice context handle
-Purpose
-Converts a V7 Lda_Def to a V8 service context handle.
-Syntax
-sword OCILdaToSvcCtx ( OCISvcCtx  **svchpp,
-                     OCIError   *errhp,
-                     Lda_Def    *ldap );
-Comments
-Converts a V7 Lda_Def to a V8 service context handle. The action of this call 
-can be reversed by passing the resulting service context handle to the 
-OCISvcCtxToLda() function.
-Parameters
-svchpp (IN/OUT) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-ldap (IN/OUT) - the V7 logon data area returned by OCISvcCtxToLda() from 
-this service context.
-Related Functions
-OCISvcCtxToLda()
-
-
-
-
-OCILobAppend()
-
-Name
-OCI Lob APpend
-
-Purpose
-Appends a LOB value at the end of another LOB. 
-
-Syntax
-sword OCILobAppend ( OCISvcCtx        *svchp,
-                   OCIError         *errhp,
-                   OCILobLocator    *dst_locp,
-                   OCILobLocator    *src_locp );
-Comments
-Appends a LOB value at the end of LOB. The data is 
-copied from the source to the destination at the end of the destination. The 
-source and the destination must already exist. The destination LOB is 
-extended to accommodate the newly written data.
-
-It is an error to extend the destination LOB beyond the maximum length 
-allowed or to try to copy from a NULL LOB. 
-
-Parameters
-svchp (IN) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-dst_locp (IN/OUT) - a locator uniquely referencing the destination LOB. 
-src_locp (IN/OUT) - a locator uniquely referencing the source LOB. 
-
-Related Functions
-OCILobTrim()
-OCIErrorGet()
-OCILobWrite()
-OCILobCopy()
-
-
-
-
-
-OCILobAssign()
-
-Name
-OCI Lob ASsiGn
-
-Purpose
-Assigns one LOB/FILE locator to another.
-
-Syntax
-sword OCILobAssign ( OCIEnv                *envhp, 
-                     OCIError              *errhp, 
-                     CONST OCILobLocator   *src_locp, 
-                     OCILobLocator         **dst_locpp );
-
-Comments
-Assign source locator to destination locator.  After the assignment, both 
-locators refer to the same LOB data.  For internal LOBs, the source locator's 
-LOB data gets copied to the destination locator's LOB data only when the 
-destination locator gets stored in the table.  Therefore, issuing a flush of 
-the object containing the destination locator will copy the LOB data. For FILEs
-only the locator that refers to the OS file is copied to the table. The OS file
-is not copied.
-
-Parameters
-envhp (IN/OUT) - OCI environment handle initialized in object mode.
-errhp (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-errhp and this function returns OCI_ERROR. Diagnostic information can be 
-obtained by calling OCIErrorGet().
-src_locp (IN) - LOB locator to copy from.
-dst_locpp (IN/OUT) - LOB locator to copy to.  The caller must allocate space 
-for the OCILobLocator by calling OCIDescriptorAlloc().
-Note: The only difference between this and OCILobLocatorAssign is that this
-takes an environment handle whereas OCILobLocatorAssign takes an OCI service
-handle
-
-See also
-OCIErrorGet()
-OCILobIsEqual()
-OCILobLocatorIsInit()
-OCILobLocatorAssign()
-
-
-
-OCILobCharSetForm()
-
-Name
-OCI Lob Get Character Set Form
-
-Purpose
-Gets the LOB locator's character set fpr,, if any.
-
-Syntax
-sword OCILobCharSetForm ( OCIEnv                    *envhp, 
-                          OCIError                  *errhp, 
-                          CONST OCILobLocator       *locp, 
-                          ub1                       *csfrm );
-
-Comments
-Returns the character set form of the input LOB locator in the csfrm output 
-parameter. 
-
-Parameters
-envhp (IN/OUT) - OCI environment handle initialized in object mode.
-errhp (IN/OUT) - error handle. The OCI error handle. If there is an error, it 
-is recorded in err and this function returns OCI_ERROR. Diagnostic information 
-can be obtained by calling OCIErrorGet().
-locp (IN) - LOB locator for which to get the character set form.
-csfrm(OUT) - character set form of the input LOB locator.  If the input 
-locator is for a BLOB or a BFILE, csfrm is set to 0 since there is no concept 
-of a character set for binary LOBs/FILEs.  The caller must allocate space for 
-the csfrm (ub1) and not write into the space.
-See also
-OCIErrorGet(), OCILobCharSetId(), OCILobLocatorIsInit
-
-
-
-
-OCILobCharSetId()
-
-Name
-OCI Lob get Character Set IDentifier
-
-Purpose
-Gets the LOB locator's character set ID, if any.
-
-Syntax
-sword OCILobCharSetId ( OCIEnv                    *envhp, 
-                        OCIError                  *errhp, 
-                        CONST OCILobLocator       *locp, 
-                        ub2                       *csid );
-
-Comments
-Returns the character set ID of the input LOB locator in the cid output 
-parameter. 
-
-Parameters
-envhp (IN/OUT) - OCI environment handle initialized in object mode.
-errhp (IN/OUT) - error handle. The OCI error handle. If there is an error, it 
-is recorded in err and this function returns OCI_ERROR. Diagnostic information 
-can be obtained by calling OCIErrorGet().
-locp (IN) - LOB locator for which to get the character set ID.
-csid (OUT) - character set ID of the input LOB locator.  If the input locator 
-is for a BLOB or a BFILE, csid is set to 0 since there is no concept of a 
-character set for binary LOBs/FILEs.  The caller must allocate space for the character set id of type ub2 and not write into the space.
-
-See also
-OCIErrorGet(), OCILobCharSetForm(), OCILobLocatorIsInit()
-
-
-
-
-OCILobCopy()
-
-Name
-OCI Lob Copy
-
-Purpose
-Copies a portion of a LOB value into another LOB value.
-
-Syntax
-sword OCILobCopy ( OCISvcCtx        *svchp,
-                   OCIError         *errhp,
-                   OCILobLocator    *dst_locp,
-                   OCILobLocator    *src_locp,
-                   ub4              amount,
-                   ub4              dst_offset,
-                   ub4              src_offset );
-
-Comments
-Copies a portion of a LOB value into another LOB as specified. The data 
-is copied from the source to the destination. The source (src_locp) and the 
-destination (dlopb) LOBs must already exist.
-If the data already exists at the destination's start position, it is 
-overwritten with the source data. If the destination's start position is 
-beyond the end of the current data, a hole is created from the end of the data
-to the beginning of the newly written data from the source. The destination 
-LOB is extended to accommodate the newly written data if it extends 
-beyond the current length of the destination LOB. 
-It is an error to extend the destination LOB beyond the maximum length 
-allowed or to try to copy from a NULL LOB.
-Parameters
-svchp (IN) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-dst_locp (IN/OUT) - a locator uniquely referencing the destination LOB. 
-src_locp (IN/OUT) - a locator uniquely referencing the source LOB. 
-amount (IN) - the number of character or bytes, as appropriate, to be copied.
-dst_offset (IN) - this is the absolute offset for the destination LOB. 
-For character LOBs it is the number of characters from the beginning of the 
-LOB at which to begin writing. For binary LOBs it is the number of bytes from 
-the beginning of the lob from which to begin reading. The offset starts at 1.
-src_offset (IN) - this is the absolute offset for the source LOB. 
-For character LOBs it is the number of characters from the beginning of the 
-LOB, for binary LOBs it is the number of bytes. Starts at 1.
-
-See Also 
-OCIErrorGet(), OCILobAppend(), OCILobWrite(), OCILobTrim()
-
-OCILobCreateTemporary()
-
-Name
-OCI Lob Create Temporary
-
-Purpose
-Create a Temporary Lob
-
-Syntax
-sword OCILobCreateTemporary(OCISvcCtx          *svchp,
-                            OCIError           *errhp,
-                            OCILobLocator      *locp,
-                            ub2                 csid,
-                            ub1                 csfrm,
-                            ub1                 lobtype,
-                            boolean             cache,
-                            OCIDuration         duration);
-
-
-Comments
-svchp (IN) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-locp (IN/OUT) - a locator which points to the temporary Lob
-csid (IN) - the character set id
-csfrm(IN) - the character set form
-lobtype (IN) - the lob type - one of the three constants OCI_TEMP_BLOB, 
-               OCI_TEMP_CLOB and OCI_TEMP_NCLOB
-cache(IN)-  TRUE if the temporary LOB goes through the cache; FALSE, if not.
-duration(IN)- duration of the temporary LOB; Can be a valid duration id or one 
-              of the values: OCI_DURATION_SESSION, OCI_DURATION_CALL
-	      Note: OCI_DURATION_TRANSACTION is not supported in 8.1. 
-Related functions
-OCILobFreeTemporary()
-OCILobIsTemporary()
-
-OCILobDisableBuffering()
-
-Name
-OCI Lob Disable Buffering
-
-Purpose
-Disable lob buffering for the input locator.
-
-
-Syntax
-sword OCILobDisableBuffering ( OCISvcCtx      *svchp,
-                               OCIError       *errhp,
-                               OCILobLocator  *locp);
-
-Comments
-
-Disable lob buffering for the input locator.  The next time data is
-read/written from/to the lob through the input locator, the lob
-buffering subsystem is *not* used.  
-
-Parameters
-svchp (IN) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-locp (IN/OUT) - a locator uniquely referencing the LOB. 
-
-Related Functions
-OCILobEnableBuffering()
-OCIErrorGet()
-OCILobFlush()
-
-
-
-
-OCILobEnableBuffering()
-
-Name
-OCI Lob Enable Buffering
-
-Purpose
-Enable lob buffering for the input locator.
-
-
-Syntax
-sword OCILobEnableBuffering ( OCISvcCtx      *svchp,
-                              OCIError       *errhp,
-                              OCILobLocator  *locp);
-
-Comments
-
-Enable lob buffering for the input locator.  The next time data is
-read/written from/to the lob through the input locator, the lob
-buffering subsystem is used.  
-
-Once lob buffering is enabled for a locator, if that locator is passed to 
-one of the following routines, an error is returned:
-        OCILobCopy, OCILobAppend, OCILobErase, OCILobGetLength, OCILobTrim
-
-Parameters
-svchp (IN) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-locp (IN/OUT) - a locator uniquely referencing the LOB. 
-
-Related Functions
-OCILobDisableBuffering()
-OCIErrorGet()
-OCILobWrite()
-OCILobRead()
-OCILobFlush()
-
-
-
-
-OCILobErase()
-
-Name
-OCI Lob ERase
-
-Purpose
-Erases a specified portion of the LOB data starting at a specified offset.
-
-Syntax
-sword OCILobErase ( OCISvcCtx       *svchp,
-                  OCIError        *errhp,
-                  OCILobLocator   *locp,
-                  ub4             *amount,
-                  ub4             offset );
-
-Comments
-Erases a specified portion of the LOB data starting at a specified offset.
-The actual number of characters/bytes erased is returned. The actual number 
-of characters/bytes and the requested number of characters/bytes will differ 
-if the end of the LOB data is reached before erasing the requested number of 
-characters/bytes.
-If a section of data from the middle of the LOB data is erased, a hole is 
-created. When data from that hole is read, 0's are returned. If the LOB is
-NULL, this routine will indicate that 0 characters/bytes were erased.
-
-Parameters
-svchp (IN) - the service context handle.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-locp (IN/OUT) - the LOB for which to erase a section of data.
-amount (IN/OUT) - On IN, the number of characters/bytes to erase. On OUT, 
-the actual number of characters/bytes erased.
-offset (IN) - absolute offset from the beginning of the LOB data from which to 
-start erasing data. Starts at 1.
-
-See Also
-OCIErrorGet(), OCILobRead(), OCILobWrite()
-
-
-
-
-OCILobFileClose()
-
-Name
-OCI Lob File CLoSe
-
-Purpose
-Closes a previously opened FILE.
-
-Syntax
-sword OCILobFileClose ( OCISvcCtx            *svchp,
-                        OCIError             *errhp,
-                        OCILobLocator        *filep );
-
-Comments
-Closes a previously opened FILE. It is an error if this function is called for
-an internal LOB. No error is returned if the FILE exists but is not opened.
-Parameters
-svchp (IN) - the service context handle.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-filep (IN/OUT) - a pointer to a FILE locator to be closed.
-
-See Also
-OCIErrorGet(), OCILobFileOpen(), OCILobFileCloseAll(), OCILobFileIsOpen(),
-OCILobFileExists(), CREATE DIRECTORY DDL
-
-
-
-
-
-
-OCILobFileCloseAll()
-
-Name
-OCI LOB FILE Close All
-
-Purpose
-Closes all open FILEs on a given service context.
-
-Syntax
-sword OCILobFileCLoseAll ( OCISvcCtx *svchp, 
-                           OCIError  *errhp );
-
-Comments
-Closes all open FILEs on a given service context.
-
-Parameters
-svchp (IN) - the service context handle.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-
-See also
-OCILobFileClose(),
-OCIErrorGet(), OCILobFileOpen(), OCILobFileIsOpen(),
-OCILobFileExists(), CREATE DIRECTORY DDL
-
-
-
-
-
-
-OCILobFileExists()
-
-Name
-OCI LOB FILE exists
-
-Purpose
-Tests to see if the FILE exists on the server
-
-Syntax
-sword OCILobFileExists ( OCISvcCtx     *svchp,
-                         OCIError      *errhp,
-                         OCILobLocator *filep,
-                         boolean       *flag );
-
-Comments
-Checks to see if a FILE exists for on the server.
-
-Parameters
-svchp (IN) - the OCI service context handle.
-errhp (IN/OUT) - error handle. The OCI error handle. If there is an error, 
-it is recorded in err and this function returns OCI_ERROR. Diagnostic 
-information can be obtained by calling OCIErrorGet().
-filep (IN) - pointer to the FILE locator that refers to the file.
-flag (OUT) - returns TRUE if the FILE exists; FALSE if it does not.
-
-See also
-OCIErrorGet, CREATE DIRECTORY (DDL)
-
-
-
-
-OCILobFileGetName()
-
-Name
-OCI LOB FILE Get file Name
-
-Purpose
-Gets the FILE locator's directory alias and file name.
-
-Syntax
-sword OCILobFileGetName ( OCIEnv                   *envhp,
-                          OCIError                 *errhp, 
-                          CONST OCILobLocator      *filep, 
-                          OraText                     *dir_alias,
-                          ub2                      *d_length, 
-                          OraText                     *filename, 
-                          ub2                      *f_length );
-
-Comments
-Returns the directory alias and file name associated with this file locator.  
-
-Parameters
-envhp (IN/OUT) - OCI environment handle initialized in object mode.
-errhp (IN/OUT) -The OCI error handle. If there is an error, it is recorded in 
-errhp and this function returns OCI_ERROR. Diagnostic information can be 
-obtained by calling OCIErrorGet().
-filep (IN) - FILE locator for which to get the directory alias and file name.
-dir_alias (OUT) - buffer into which the directory alias name is placed. The 
-caller must allocate enough space for the directory alias name and must not 
-write into the space.
-d_length (IN/OUT)                 
-        - IN: length of the input dir_alias string;
-        - OUT: length of the returned dir_alias string.
-filename (OUT) - buffer into which the file name is placed. The caller must 
-allocate enough space for the file name and must not write into the space.
-f_length (IN/OUT) 
-        - IN: length of the input filename string;
-         - OUT: lenght of the returned filename string.
-
-See also
-OCILobFileSetName(), OCIErrorGet()
-
-
-
-
-OCILobFileIsOpen()
-
-Name
-OCI LOB FILE Is Open?
-
-Purpose
-Tests to see if the FILE is open
-
-Syntax
-sword OCILobFileIsOpen ( OCISvcCtx *svchp,
-                         OCIError  *errhp,
-                         OCILobLocator *filep,
-                         boolean       *flag );
-
-Comments
-Checks to see if the FILE on the server is open for a given LobLocator.
-
-Parameters
-svchp (IN) - the OCI service context handle.
-errhp (IN/OUT) - error handle. The OCI error handle. If there is an error, it 
-is recorded in err and this function returns OCI_ERROR. Diagnostic information 
-can be obtained by calling OCIErrorGet().
-filep (IN) - pointer to the FILE locator being examined. If the input file 
-locator was never passed to OCILobFileOpen(), the file is considered not to 
-be opened by this locator. However, a different locator may have opened the 
-file. More than one file opens can be performed on the same file using 
-different locators.
-flag (OUT) - returns TRUE if the FILE is opened using this locator; FALSE if 
-it is not. 
-
-See also
-OCIErrorGet, OCILobFileOpen, OCILobFileClose, OCILobFileCloseAll, CREATE 
-DIRECTORY SQL command
-
-
-OCILobFileOpen()
-
-Name
-OCI LOB FILE open
-
-Purpose
-Opens a FILE for read-only access
-
-Syntax
-sword OCILobFileOpen ( OCISvcCtx            *svchp,
-                     OCIError             *errhp,
-                     OCILobLocator        *filep,
-                     ub1                  mode );
-
-Comments
-Opens a FILE. The FILE can be opened for read-only access only. FILEs may not 
-be written to throough ORACLE.
-
-Parameters 
-svchp (IN) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-filep (IN/OUT) - the FILE to open. Error if the locator does not refer to a 
-FILE. 
-mode (IN) - mode in which to open the file. The only valid mode is read-only - 
-OCI_FILE_READONLY. 
-
-See Also
-OCILobFileClose, OCIErrorGet, OCILobFileCloseAll, OCILobFileIsOpen, 
-OCILobFileSetName, CREATE DIRECTORY 
-
-
-
-
-OCILobFileSetName()
-
-Name
-OCI Lob File Set NaMe
-
-Purpose
-Sets directory alias and file name in the FILE locator.
-
-Syntax
-sword OCILobFileSetName ( OCIEnv             *envhp,
-                          OCIError           *errhp,
-                          OCILobLocator      **filepp,
-                          OraText               *dir_alias,
-                          ub2                d_length, 
-                          OraText               *filename, 
-                          ub2                f_length );
-Comments
-Sets the directory alias and file name in the LOB file locator.  
-Parameters
-envhp (IN/OUT) - OCI environment handle initialized in object mode.
-errhp (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-errhp and this function returns OCI_ERROR. Diagnostic information can be 
-obtained by calling OCIErrorGet().
-filepp (IN/OUT) - FILE locator for which to set the directory alias name.
-The caller must have already allocated space for the locator by
-calling OCIDescriptorAlloc().
-dir_alias (IN) - buffer that contains the directory alias name to set in the 
-locator.
-d_length (IN) - length of the input dir_alias parameter.
-filename (IN) - buffer that contains the file name is placed.
-f_length (IN) - length of the input filename parameter.
-See also
-OCILobFileGetName, OCIErrorGet, CREATE DIRECTORY
-
-
-
-
-OCILobFlushBuffer()
-
-Name
-OCI Lob Flush all Buffers for this lob.
-
-Purpose
-Flush/write all buffers for this lob to the server.
-
-
-Syntax
-sword OCILobFlushBuffer ( OCISvcCtx       *svchp,
-                          OCIError        *errhp,
-                          OCILobLocator   *locp,
-                          ub4              flag);
-
-Comments
-
-Flushes all buffers, associated with the lob referenced by the input
-locator, to the server.  This routine will actually write the data in
-the buffer to the lob in the database.  Lob buffering must have been
-enabled for the input lob locator.
-
-This routine, by default, does not free the buffer resources for
-reallocation to another buffered LOB operation. However, if you
-want to free the buffer explicitly, you can set the flag parameter
-to OCI_LOB_BUFFER_FREE.
-
-Parameters
-svchp (IN/OUT) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-locp (IN/OUT) - a locator uniquely referencing the LOB. 
-flag    (IN)     - to indicate if the buffer resources need to be freed
-                   after a flush. Default value is OCI_LOB_BUFFER_NOFREE.
-                   Set it to OCI_LOB_BUFFER_FREE if you want the buffer
-                   resources to be freed.
-
-Related Functions
-OCILobEnableBuffering()
-OCILobDisableBuffering()
-OCIErrorGet()
-OCILobWrite()
-OCILobRead()
-
-OCILobFreeTemporary()
-
-Name
-OCI Lob Free Temporary
-
-Purpose
-Free a temporary LOB
-
-Syntax
-sword OCILobFreeTemporary(OCISvcCtx          *svchp,
-                          OCIError           *errhp,
-                          OCILobLocator      *locp,
-
-Comments
-  Frees the contents of the temporary Lob this locator is pointing to. Note
-  that the locator itself is not freed until a OCIDescriptorFree is done.
-
-Parameters
-svchp (IN/OUT) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-locp (IN/OUT) - a locator uniquely referencing the LOB
-
-Related functions
-OCILobCreateTemporary()
-OCILobIsTemporary()
-
-Name
-OCI Lob/File Get Chunk Size
-
-Purpose
-When creating the table, the user can specify the chunking factor, which can
-be a multiple of Oracle blocks. This corresponds to the chunk size used by the
-LOB data layer when accessing/modifying the LOB value. Part of the chunk is
-used to store system-related information and the rest stores the LOB value.
-This function returns the amount of space used in the LOB chunk to store 
-the LOB value.
-
-Syntax
-sword OCILobGetChunkSize ( OCISvcCtx      *svchp,
-                           OCIError       *errhp,
-                           OCILobLocator  *locp,
-                           ub4            *chunksizep );
-
-Comments
- Performance will be improved if the user issues read/write
-requests using a multiple of this chunk size. For writes, there is an added 
-benefit since LOB chunks are versioned and, if all writes are done on chunk
-basis, no extra/excess versioning is done nor duplicated. Users could batch 
-up the write until they have enough for a chunk instead of issuing several
-write calls for the same chunk.
-
-Parameters
-svchp (IN) - the service context handle.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-locp (IN/OUT) - a LOB locator that uniquely references the LOB. For internal
-LOBs, this locator must be a locator that was obtained from the server 
-specified by svchp. For FILEs, this locator can be initialized by a Select or
-OCILobFileSetName.
-chunksizep (OUT) - On output, it is the length of the LOB if not NULL - for 
-character LOBs it is the number of characters, for binary LOBs it is the 
-number of bytes in the LOB.
-
-Related Functions
-
-
-OCILobGetLength()
-
-Name
-OCI Lob/File Length
-
-Purpose
-Gets the length of a LOB/FILE. 
-
-Syntax
-sword OCILobGetLength ( OCISvcCtx      *svchp,
-                        OCIError       *errhp,
-                        OCILobLocator  *locp,
-                        ub4            *lenp );
-
-Comments
-Gets the length of a LOB/FILE. If the LOB/FILE is NULL, the length is 
-undefined.
-
-Parameters
-svchp (IN) - the service context handle.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-locp (IN/OUT) - a LOB locator that uniquely references the LOB. For internal
-LOBs, this locator must be a locator that was obtained from the server 
-specified by svchp. For FILEs, this locator can be initialized by a Select or
-OCILobFileSetName.
-lenp (OUT) - On output, it is the length of the LOB if not NULL - for 
-character LOBs it is the number of characters, for binary LOBs it is the 
-number of bytes in the LOB.
-
-Related Functions
-OCIErrorGet, OCIFileSetName
-
-
-
-
-OCILobIsEqual()
-
-Name
-
-OCI Lob Is Equal
-
-Purpose
-Compares two LOB locators for equality.
-
-Syntax
-sword OCILobIsEqual ( OCIEnv                  *envhp,
-                      CONST OCILobLocator     *x,
-                      CONST OCILobLocator     *y,
-                      boolean                 *is_equal );
-
-Comments
-Compares the given LOB locators for equality.  Two LOB locators are equal if 
-and only if they both refer to the same LOB data.
-Two NULL locators are considered not equal by this function.
-Parameters
-envhp (IN) - the OCI environment handle.
-x (IN) - LOB locator to compare.
-y (IN) - LOB locator to compare.
-is_equal (OUT) - TRUE, if the LOB locators are equal; FALSE if they are not.
-
-See also
-OCILobAssign, OCILobLocatorIsInit
-OCILobLocatorAssign()
-OCILobIsTemporary()
-
-Name
-
-OCI Lob Is Temporary
-
-Purpose
-  Tests if this locator points to a temporary LOB
-
-Syntax
-sword OCILobIsTemporary(OCIEnv            *envp,
-                        OCIError          *errhp,
-                        OCILobLocator     *locp,
-                        boolean           *is_temporary);
-
-Comments
-Tests the locator to determine if it points to a temporary LOB.
-If so, is_temporary is set to TRUE. If not, is_temporary is set
-to FALSE.
-
-Parameters
-envp (IN) - the environment handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-locp (IN) - the locator to test for temporary LOB
-is_temporary(OUT) - TRUE, if the LOB locator points to a temporary LOB;
-                    FALSE, if not.
-
-See Also
-OCILobCreateTemporary, OCILobFreeTemporary
-
-
-
-OCILobLoadFromFile()
-
-Name
-OCI Lob Load From File
-
-Purpose
-Load/copy all or a portion of the file into an internal LOB.
-
-Syntax
-sword OCILobLoadFromFile ( OCISvcCtx        *svchp,
-                           OCIError         *errhp,
-                           OCILobLocator    *dst_locp,
-                           OCILobLocator    *src_filep,
-                           ub4              amount,
-                           ub4              dst_offset,
-                           ub4              src_offset );
-
-Comments
-Loads/copies a portion or all of a file value into an internal LOB as 
-specified.  The data is copied from the source file to the destination 
-internal LOB (BLOB/CLOB).  No character set conversions are performed 
-when copying the bfile data to a clob/nclob.  The bfile data must already
-be in the same character set as the clob/nclob in the database.  No
-error checking is performed to verify this.
-The source (src_filep) and the destination (dlopb) LOBs must already exist.
-If the data already exists at the destination's start position, it is 
-overwritten with the source data. If the destination's start position is 
-beyond the end of the current data, a hole is created from the end of the data
-to the beginning of the newly written data from the source. The destination 
-LOB is extended to accommodate the newly written data if it extends 
-beyond the current length of the destination LOB. 
-It is an error to extend the destination LOB beyond the maximum length 
-allowed or to try to copy from a NULL LOB.
-Parameters
-svchp (IN) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-dst_locp (IN/OUT) - a locator uniquely referencing the destination internal 
-LOB which may be of type blob, clob, or nclob. 
-src_filep (IN/OUT) - a locator uniquely referencing the source BFILE. 
-amount (IN) - the number of bytes to be copied.
-dst_offset (IN) - this is the absolute offset for the destination LOB. 
-For character LOBs it is the number of characters from the beginning of the 
-LOB at which to begin writing. For binary LOBs it is the number of bytes from 
-the beginning of the lob from which to begin reading. The offset starts at 1.
-src_offset (IN) - this is the absolute offset for the source BFILE.  It is the 
-number of bytes from the beginning of the LOB.  The offset starts at 1.
-
-See Also 
-OCIErrorGet(), OCILobAppend(), OCILobWrite(), OCILobTrim(), OCILobCopy()
-
-
-Name
-OCI Lob LOCATOR ASsiGn
-
-Purpose
-Assigns one LOB/FILE locator to another.
-
-Syntax
-sword OCILobLocatorAssign ( OCISvcCtx             *svchp, 
-                            OCIError              *errhp, 
-                            CONST OCILobLocator   *src_locp, 
-                            OCILobLocator         **dst_locpp );
-
-Comments
-Assign source locator to destination locator.  After the assignment, both 
-locators refer to the same LOB data.  For internal LOBs, the source locator's 
-LOB data gets copied to the destination locator's LOB data only when the 
-destination locator gets stored in the table.  Therefore, issuing a flush of 
-the object containing the destination locator will copy the LOB data. For 
-FILEs only the locator that refers to the OS file is copied to the table. The
-OS file is not copied.
-Note : the only difference between this and OCILobAssign is that this takes
-a OCI service handle pointer instead of a OCI environment handle pointer
-
-Parameters
-svchp (IN/OUT) - OCI service handle initialized in object mode.
-errhp (IN/OUT) - The OCI error handle. If there is an error, it is recorded 
-in errhp and this function returns OCI_ERROR. Diagnostic information can be 
-obtained by calling OCIErrorGet().
-src_locp (IN) - LOB locator to copy from.
-dst_locpp (IN/OUT) - LOB locator to copy to.  The caller must allocate space 
-for the OCILobLocator by calling OCIDescriptorAlloc().
-
-See also
-OCIErrorGet()
-OCILobIsEqual()
-OCILobLocatorIsInit()
-OCILobAssign()
-
-
-OCILobLocatorIsInit()
-
-Name
-OCI LOB locator is initialized?
-
-Purpose
-Tests to see if a given LOB locator is initialized.
-
-Syntax
-sword OCILobLocatorIsInit ( OCIEnv   *envhp,
-                            OCIError *errhp,
-                            CONST OCILobLocator *locp,
-                            boolean *is_initialized );
-
-Comments
-Tests to see if a given LOB locator is initialized.
-
-Parameters
-envhp (IN/OUT) - OCI environment handle initialized in object mode.
-errhp (IN/OUT) - error handle. The OCI error handle. If there is an error, it 
-is recorded in err and this function returns OCI_ERROR. Diagnostic information 
-can be obtained by calling OCIErrorGet().
-locp (IN) - the LOB locator being tested
-is_initialized (OUT) - returns TRUE if the given LOB locator is initialized; 
-FALSE if it is not.
-
-See also
-OCIErrorGet, OCILobIsEqual
-
-
-OCILobOpen()
-
-Name
-OCI Lob Open
-Purpose
- Open an internal LOB or BFILE locator.
-Syntax
-sword OCILobOpen( OCISvcCtx      *svchp,
-                  OCIError       *errhp,
-                  OCILobLocator  *locp,
-                  ub1             mode);
-
-Comments
-Opens an internal LOB or a Bfile. A LOB can be opened only once in a 
-transaction. A LOB opened in a transaction has to be closed before 
-committing the transaction. Otherwise, the transaction is rolled back.
-A LOB cannot be opened in read_write mode without starting a transaction.
-
-Parameters
-svchp (IN/OUT) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-locp (IN/OUT) - a LOB locator that uniquely references a LOB. 
-mode(IN) - mode can be OCI_LOB_READONLY, OCI_LOB_READWRITE
-
-Related functions
-OCILobClose(), OCIIsLobOpen()
-
-OCILobRead()
-
-Name
-OCI Lob/File ReaD
-
-Purpose
-Reads a portion of a LOB/FILE as specified by the call into a buffer. 
-
-Syntax
-sword OCILobRead ( OCISvcCtx       *svchp,
-                   OCIError        *errhp,
-                   OCILobLocator   *locp,
-                   ub4             offset,
-                   ub4             *amtp,
-                   dvoid           *bufp,
-                   ub4             bufl,
-                   dvoid           *ctxp,  
-                   OCICallbackLobRead (cbfp)
-                                   (
-                                    dvoid         *ctxp,
-                                    CONST dvoid   *bufp,
-                                    ub4           len,
-                                    ub1           piece )
-                   ub2             csid,
-                   ub1             csfrm );
-
-Comments
-Reads a portion of a LOB/FILE as specified by the call into a buffer. Data read
-from a hole is returned as 0s. It is an error to try to read from a NULL LOB/
-FILE. The OS FILE must already exist on the server and must have been opened
-using the input locator. Oracle must hav epermission to read the OS file and 
-user must have read permission on the directory object.
-
-Parameters
-svchp (IN/OUT) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-locp (IN/OUT) - a LOB locator that uniquely references a LOB. 
-offset (IN) - On input, it is the absolute offset, for character LOBs in the 
-number of characters from the beginning of the LOB, for binary LOBs it is the 
-number of bytes. Starts from 1.
-amtp (IN/OUT) - On input, the number of character or bytes to be read. On 
-output, the actual number of bytes or characters read. 
-If the amount of bytes to be read is larger than the buffer length it is 
-assumed that the LOB is being read in a streamed mode. On input if this value 
-is 0, then the data shall be read in streamed mode from the LOB until the end 
-of LOB. If the data is read in pieces, *amtp always contains the length of the last piece read.
-If a callback function is defined, then this callback function will be invoked 
-each time bufl bytes are read off the pipe. Each piece will be written into 
-bufp.
-If the callback function is not defined, then OCI_NEED_DATA error code will 
-be returned. The application must invoke the LOB read over and over again to 
-read more pieces of the LOB until the OCI_NEED_DATA error code is not 
-returned. The buffer pointer and the length can be different in each call 
-if the pieces are being read into different sizes and location. 
-bufp (IN) - the pointer to a buffer into which the piece will be read. The 
-length of the allocated memory is assumed to be bufl. 
-bufl (IN) - the length of the buffer in octets. 
-ctxp (IN) - the context for the call back function. Can be NULL.
-cbfp (IN) - a callback that may be registered to be called for each piece. If 
-this is NULL, then OCI_NEED_DATA will be returned for each piece. 
-The callback function must return OCI_CONTINUE for the read to continue. 
-If any other error code is returned, the LOB read is aborted. 
-  ctxp (IN) - the context for the call back function. Can be NULL.
-  bufp (IN) - a buffer pointer for the piece.
-  len (IN) - the length of length of current piece in bufp.
-  piece (IN) - which piece - OCI_FIRST_PIECE, OCI_NEXT_PIECE or 
-  OCI_LAST_PIECE.
-csid - the character set ID of the buffer data
-csfrm - the character set form of the buffer data
-
-Related Functions
-OCIErrorGet, OCILobWrite, OCILobFileOpen, OCILobFileSetName, CREATE DIRECTORY
-
-
-
-
-OCILobTrim()
-
-Name
-
-OCI Lob  Trim
-
-Purpose
-Trims the lob value to a shorter length
-
-Syntax
-sword OCILobTrim ( OCISvcCtx       *svchp,
-                 OCIError        *errhp,
-                 OCILobLocator   *locp,
-                 ub4             newlen );
-
-Comments
-Truncates LOB data to a specified shorter length. 
-
-Parameters
-svchp (IN) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-locp (IN/OUT) - a LOB locator that uniquely references the LOB. This locator 
-must be a locator that was obtained from the server specified by svchp. 
-newlen (IN) - the new length of the LOB data, which must be less than or equal
-to the current length. 
-
-Related Functions
-OCIErrorGet, OCILobWrite, OCiLobErase, OCILobAppend, OCILobCopy
-
-
-
-
-
-OCILobWrite()
-
-Name
-OCI Lob Write
-
-Purpose
-Writes a buffer into a LOB
-
-Syntax
-sword OCILobWrite ( OCISvcCtx       *svchp,
-                    OCIError        *errhp,
-                    OCILobLocator   *locp,
-                    ub4             offset,
-                    ub4             *amtp,
-                    dvoid           *bufp, 
-                    ub4             buflen,
-                    ub1             piece,
-                    dvoid           *ctxp,  
-                    OCICallbackLobWrite   (cbfp)
-                                    (
-                                    dvoid    *ctxp,
-                                    dvoid    *bufp,
-                                    ub4      *lenp,
-                                    ub1      *piecep ) 
-                    ub2             csid
-                    ub1             csfrm );
-
-
-Comments
-Writes a buffer into a LOB as specified. If LOB data already exists 
-it is overwritten with the data stored in the buffer.
-The buffer can be written to the LOB in a single piece with this call, or
-it can be provided piecewise using callbacks or a standard polling method.
-If this value of the piece parameter is OCI_FIRST_PIECE, data must be 
-provided through callbacks or polling.
-If a callback function is defined in the cbfp parameter, then this callback 
-function will be invoked to get the next piece after a piece is written to the 
-pipe. Each piece will be written from bufp.
-If no callback function is defined, then OCILobWrite() returns the 
-OCI_NEED_DATA error code. The application must all OCILobWrite() again 
-to write more pieces of the LOB. In this mode, the buffer pointer and the 
-length can be different in each call if the pieces are of different sizes and 
-from different locations. A piece value of OCI_LAST_PIECE terminates the 
-piecewise write. 
-
-Parameters
-svchp (IN/OUT) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-locp (IN/OUT) - a LOB locator that uniquely references a LOB. 
-offset (IN) - On input, it is the absolute offset, for character LOBs in 
-the number of characters from the beginning of the LOB, for binary LOBs it 
-is the number of bytes. Starts at 1.
-bufp (IN) - the pointer to a buffer from which the piece will be written. The 
-length of the allocated memory is assumed to be the value passed in bufl. Even 
-if the data is being written in pieces, bufp must contain the first piece of 
-the LOB when this call is invoked.
-bufl (IN) - the length of the buffer in bytes.
-Note: This parameter assumes an 8-bit byte. If your platform uses a 
-longer byte, the value of bufl must be adjusted accordingly.
-piece (IN) - which piece of the buffer is being written. The default value for
-this parameter is OCI_ONE_PIECE, indicating the buffer will be written in a 
-single piece.
-The following other values are also possible for piecewise or callback mode: 
-OCI_FIRST_PIECE, OCI_NEXT_PIECE and OCI_LAST_PIECE.
-amtp (IN/OUT) - On input, takes the number of character or bytes to be 
-written. On output, returns the actual number of bytes or characters written. 
-If the data is written in pieces, *amtp will contain the total length of the 
-pieces written at the end of the call (last piece written) and is undefined in
-between. 
-(Note it is different from the piecewise read case)
-ctxp (IN) - the context for the call back function. Can be NULL.
-cbfp (IN) - a callback that may be registered to be called for each piece in a 
-piecewise write. If this is NULL, the standard polling method will be used.
-The callback function must return OCI_CONTINUE for the write to continue. 
-If any other error code is returned, the LOB write is aborted. The 
-callback takes the following parameters:
-  ctxp (IN) - the context for the call back function. Can be NULL.
-  bufp (IN/OUT) - a buffer pointer for the piece.
-  lenp (IN/OUT) - the length of the buffer (in octets) and the length of 
-  current piece in bufp (out octets).
-  piecep (OUT) - which piece - OCI_NEXT_PIECE or OCI_LAST_PIECE.
-csid - the character set ID of the buffer data
-csfrm - the character set form of the buffer data
-Related Functions
-
-
-
-
-
-
-OCILobWriteAppend()
-
-Name
-OCI Lob Write Append
-
-Purpose
-Writes data to the end of a LOB value. This call provides the ability
-to get the length of the data and append it to the end of the LOB in
-a single round trip to the server.
-
-
-Syntax
-sword OCILobWriteAppend ( OCISvcCtx       *svchp,
-                    OCIError        *errhp,
-                    OCILobLocator   *locp,
-                    ub4             *amtp,
-                    dvoid           *bufp, 
-                    ub4             buflen,
-                    ub1             piece,
-                    dvoid           *ctxp,  
-                    OCICallbackLobWrite   (cbfp)
-                                    (
-                                    dvoid    *ctxp,
-                                    dvoid    *bufp,
-                                    ub4      *lenp,
-                                    ub1      *piecep ) 
-                    ub2             csid
-                    ub1             csfrm );
-
-
-Comments
-Writes a buffer to the end of a LOB as specified. If LOB data already exists 
-it is overwritten with the data stored in the buffer.
-The buffer can be written to the LOB in a single piece with this call, or
-it can be provided piecewise using callbacks or a standard polling method.
-If this value of the piece parameter is OCI_FIRST_PIECE, data must be 
-provided through callbacks or polling.
-If a callback function is defined in the cbfp parameter, then this callback 
-function will be invoked to get the next piece after a piece is written to the 
-pipe. Each piece will be written from bufp.
-If no callback function is defined, then OCILobWriteAppend() returns the 
-OCI_NEED_DATA error code. The application must all OCILobWriteAppend() again 
-to write more pieces of the LOB. In this mode, the buffer pointer and the 
-length can be different in each call if the pieces are of different sizes and 
-from different locations. A piece value of OCI_LAST_PIECE terminates the 
-piecewise write. 
-
-Parameters
-svchp (IN/OUT) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-locp (IN/OUT) - a LOB locator that uniquely references a LOB. 
-offset (IN) - On input, it is the absolute offset, for character LOBs in 
-the number of characters from the beginning of the LOB, for binary LOBs it 
-is the number of bytes. Starts at 1.
-bufp (IN) - the pointer to a buffer from which the piece will be written. The 
-length of the allocated memory is assumed to be the value passed in bufl. Even 
-if the data is being written in pieces, bufp must contain the first piece of 
-the LOB when this call is invoked.
-bufl (IN) - the length of the buffer in bytes.
-Note: This parameter assumes an 8-bit byte. If your platform uses a 
-longer byte, the value of bufl must be adjusted accordingly.
-piece (IN) - which piece of the buffer is being written. The default value for
-this parameter is OCI_ONE_PIECE, indicating the buffer will be written in a 
-single piece.
-The following other values are also possible for piecewise or callback mode: 
-OCI_FIRST_PIECE, OCI_NEXT_PIECE and OCI_LAST_PIECE.
-amtp (IN/OUT) - On input, takes the number of character or bytes to be 
-written. On output, returns the actual number of bytes or characters written. 
-If the data is written in pieces, *amtp will contain the total length of the 
-pieces written at the end of the call (last piece written) and is undefined in
-between. 
-(Note it is different from the piecewise read case)
-ctxp (IN) - the context for the call back function. Can be NULL.
-cbfp (IN) - a callback that may be registered to be called for each piece in a 
-piecewise write. If this is NULL, the standard polling method will be used.
-The callback function must return OCI_CONTINUE for the write to continue. 
-If any other error code is returned, the LOB write is aborted. The 
-callback takes the following parameters:
-  ctxp (IN) - the context for the call back function. Can be NULL.
-  bufp (IN/OUT) - a buffer pointer for the piece.
-  lenp (IN/OUT) - the length of the buffer (in octets) and the length of 
-  current piece in bufp (out octets).
-  piecep (OUT) - which piece - OCI_NEXT_PIECE or OCI_LAST_PIECE.
-csid - the character set ID of the buffer data
-csfrm - the character set form of the buffer data
-Related Functions
-
-
-
-
-
-OCILogoff()
-Name
-OCI simplified Logoff
-Purpose
-This function is used to terminate a session created with OCILogon() or
-OCILogon2().
-Syntax
-sword OCILogoff ( OCISvcCtx      *svchp
-                   OCIError       *errhp );
-Comments
-This call is used to terminate a session which was created with OCILogon() or
-OCILogon2().
-This call implicitly deallocates the server, authentication, and service 
-context handles.
-Note: For more information on logging on and off in an application, 
-refer to the section "Application Initialization, Connection, and 
-Authorization" on page 2-16.
-Parameters
-svchp (IN) - the service context handle which was used in the call to 
-OCILogon() or OCILogon2().
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-See Also
-OCILogon(), OCILogon2().
-
-
-
-
-
-
-OCILogon()
-Name
-OCI Service Context Logon
-Purpose
-This function is used to create a simple logon session.
-Syntax
-sword OCILogon ( OCIEnv          *envhp,
-                       OCIError        *errhp,
-                       OCISvcCtx       *svchp,
-                       CONST OraText      *username,
-                       ub4             uname_len,
-                       CONST OraText      *password,
-                       ub4             passwd_len,
-                       CONST OraText      *dbname,
-                       ub4             dbname_len );
-Comments
-This function is used to create a simple logon session for an application. 
-Note: Users requiring more complex session (e.g., TP monitor 
-applications) should refer to the section "Application Initialization, 
-Connection, and Authorization" on page 2-16.
-This call allocates the error and service context handles which are passed to 
-it. This call also implicitly allocates server and authentication handles 
-associated with the session.  These handles can be retrieved by calling 
-OCIAttrGet() on the service context handle.
-Parameters
-envhp (IN) - the OCI environment handle.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-svchp (OUT) - the service context pointer.
-username (IN) - the username.
-uname_len (IN) - the length of username.
-password (IN) - the user's password.
-passwd_len (IN) - the length of password.
-dbname (IN) - the name of the database to connect to.
-dbname_len (IN) - the length of dbname.
-See Also
-OCILogoff()
-
-
-
-
-
-OCILogon2()
-Name
-OCI Service Context Logon
-Purpose
-This function is used to create a logon session in connection pooling mode.
-Syntax
-sword OCILogon2 ( OCIEnv          *envhp,
-                       OCIError        *errhp,
-                       OCISvcCtx       **svchp,
-                       CONST OraText      *username,
-                       ub4             uname_len,
-                       CONST OraText      *password,
-                       ub4             passwd_len,
-                       CONST OraText      *dbname,
-                       ub4             dbname_len,
-                       ub4             mode);
-Comments
-This function is used to create a simple logon session for an application in
-Connection Pooling mode. The valid values for mode are currently OCI_POOL and
-OCI_DEFAULT. Call to this function with OCI_DEFAULT mode is equivalent to 
-OCILogon() call.
-This call allocates the error and service context handles which are passed to 
-it. This call also implicitly allocates server and authentication handles 
-associated with the session.  These handles can be retrieved by calling 
-OCIAttrGet() on the service context handle. This call assumes that 
-OCIConnectionPoolCreate() has already been called for the same dbname.
-Parameters
-envhp (IN) - the OCI environment handle.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-svchp (OUT) - the service context pointer.
-username (IN) - the username.
-uname_len (IN) - the length of username.
-password (IN) - the user's password. If this is null, it is assumed that a
-                proxy session has to be created and the required grants on 
-                the database are already done.
-passwd_len (IN) - the length of password.
-dbname (IN) - the name of the database to connect to.
-dbname_len (IN) - the length of dbname.
-mode (IN) - the mode for doing the server attach. Should be OCI_POOL for
-            using Connection Pooling.
-
-
-See Also
-OCILogoff()
-
-
-
-
-
-OCIMemoryFree()
-Name
-OCI FREE Memory
-Purpose
-Frees up storage associated with the pointer.
-Syntax
-void OCIMemoryFree ( CONST OCIStmt   *stmhp,
-                     dvoid           *memptr);
-Comments
-Frees up dynamically allocated data pointers associated with the pointer using 
-either the default memory free function or the registered memory free 
-function, as the case may be.
-A user-defined memory free function can be registered during the initial call 
-to OCIInitialize(). 
-This call is always successful. 
-Parameters
-stmhp (IN) - statement handle which returned this data buffer.
-memptr (IN) - pointer to data allocated by the client library. 
-Related Functions
-OCIInitialize()
-
-
-
-
-
-OCIParamGet()
-Name
-OCI Get PARaMeter
-Purpose
-Returns a descriptor of a parameter specified by position in the describe 
-handle or statement handle.
-Syntax
-sword OCIParamGet ( CONST dvoid       *hndlp,
-                  ub4         htype,
-                  OCIError    *errhp,
-                  dvoid    **parmdpp,
-                  ub4         pos );
-Comments
-This call returns a descriptor of a parameter specified by position in the 
-describe handle or statement handle. Parameter descriptors are always 
-allocated internally by the OCI library. They are read-only.
-OCI_NO_DATA may be returned if there are no parameter descriptors for this 
-position. 
-See Appendix B for more detailed information about parameter descriptor 
-attributes.
-Parameters
-hndlp (IN) - a statement handle or describe handle. The OCIParamGet() 
-function will return a parameter descriptor for this handle. 
-htype (IN) - the type of the handle passed in the handle parameter. Valid 
-types are OCI_HTYPE_DESCRIBE, for a describe handle OCI_HTYPE_STMT, for a 
-statement handle
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-parmdpp (OUT) - a descriptor of the parameter at the position given in the pos 
-parameter.
-pos (IN) - position number in the statement handle or describe handle. A 
-parameter descriptor will be returned for this position.
-Note: OCI_NO_DATA may be returned if there are no parameter 
-descriptors for this position. 
-Related Functions
-OCIAttrGet(), OCIAttrSet()
-
-
-
-
-
-OCIParamSet()
-Name
-OCI Parameter Set in handle
-Purpose
-Used to set a complex object retrieval descriptor into a complex object 
-retrieval handle.
-Syntax
-sword   OCIParamGet ( dvoid *hndlp,
-                       ub4 htyp,
-                      OCIError *errhp,
-                      CONST dvoid *dscp,
-                      ub4 dtyp,
-                      ub4 pos );
-Comments
-This call sets a given complex object retrieval descriptor into a complex 
-object retrieval handle.
-The handle must have been previously allocated using OCIHandleAlloc(), and 
-the descriptor must have been previously allocated using OCIDescAlloc(). 
-Attributes of the descriptor are set using OCIAttrSet().
-Parameters
-hndlp (IN/OUT) - handle pointer.
-htype (IN) - handle type.
-errhp (IN/OUT) - error handle.
-dscp (IN) - complex object retrieval descriptor pointer.
-dtyp (IN) - 
-pos (IN) - position number.
-See Also
-
-
-
-
-
-OCIPasswordChange()
-Name
-OCI Change PassWord
-Purpose
-This call allows the password of an account to be changed.
-Syntax
-sword OCIPasswordChange ( OCISvcCtx     *svchp,
-                        OCIError      *errhp,
-                        CONST OraText    *user_name,
-                        ub4           usernm_len,
-                        CONST OraText    *opasswd,
-                        ub4           opasswd_len,
-                        CONST OraText    *npasswd,
-                        sb4           npasswd_len,
-                        ub4           mode);
-Comments
-This call allows the password of an account to be changed. This call is 
-similar to OCISessionBegin() with the following differences:
-If the user authentication is already established, it authenticates 
-the account using the old password and then changes the 
-password to the new password
-If the user authentication is not established, it establishes a user 
-authentication and authenticates the account using the old 
-password, then changes the password to the new password.
-This call is useful when the password of an account is expired and 
-OCISessionBegin() returns an error or warning which indicates that the 
-password has expired. 
-Parameters
-svchp (IN/OUT) - a handle to a service context. The service context handle 
-must be initialized and have a server context handle associated with it.
-errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-user_name (IN) - specifies the user name. It points to a character string, 
-whose length is specified in usernm_len. This parameter must be NULL if the 
-service context has been initialized with an authentication handle.
-usernm_len (IN) - the length of the user name string specified in user_name. 
-For a valid user name string, usernm_len must be non-zero.
-opasswd (IN) - specifies the user's old password. It points to a character 
-string, whose length is specified in opasswd_len .
-opasswd_len (IN) - the length of the old password string specified in opasswd. 
-For a valid password string, opasswd_len must be non-zero.
-npasswd (IN) - specifies the user's new password. It points to a character 
-string, whose length is specified in npasswd_len which must be non-zero for a 
-valid password string. If the password complexity verification routine is 
-specified in the user's profile to verify the new password's complexity, the 
-new password must meet the complexity requirements of the verification 
-function.
-npasswd_len (IN)  - then length of the new password string specified in 
-npasswd. For a valid password string, npasswd_len must be non-zero.
-mode - pass as OCI_DEFAULT.
-Related Functions
-OCISessionBegin()
-
-
-----------------------------------OCIReset------------------------------------
-
-
-OCIReset()
-Name
-OCI Reset
-Purpose
-Resets the interrupted asynchronous operation and protocol. Must be called
-if a OCIBreak call had been issued while a non-blocking operation was in
-progress.
-Syntax
-sword OCIReset ( dvoid      *hndlp,
-                 OCIError   *errhp);
-Comments
-This call is called in non-blocking mode ONLY. Resets the interrupted
-asynchronous operation and protocol. Must be called if a OCIBreak call 
-had been issued while a non-blocking operation was in progress. 
-Parameters
-hndlp (IN) - the service context handle or the server context handle.
-errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-Related Functions
-
-
-OCIResultSetToStmt()
-Name
-OCI convert Result Set to Statement Handle
-Purpose
-Converts a descriptor to statement handle for fetching rows.
-Syntax
-sword OCIResultSetToStmt ( OCIResult     *rsetdp,
-                         OCIError      *errhp );
-Comments
-Converts a descriptor to statement handle for fetching rows.
-A result set descriptor can be allocated with a call to OCIDescAlloc().
-Parameters
-rsetdp (IN/OUT) - a result set descriptor pointer. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-Related Functions
-OCIDescAlloc()
-
-
-
-
-OCIServerAttach()
-Name
-OCI ATtaCH to server
-Purpose
-Creates an access path to a data source for OCI operations.
-Syntax
-sword OCIServerAttach ( OCIServer    *srvhp,
-                      OCIError     *errhp,
-                      CONST OraText   *dblink,
-                      sb4          dblink_len,
-                      ub4          mode);
-Comments
-This call is used to create an association between an OCI application and a 
-particular server. 
-This call initializes a server context handle, which must have been previously 
-allocated with a call to OCIHandleAlloc().
-The server context handle initialized by this call can be associated with a 
-service context through a call to OCIAttrSet(). Once that association has been 
-made, OCI operations can be performed against the server.
-If an application is operating against multiple servers, multiple server 
-context handles can be maintained. OCI operations are performed against 
-whichever server context is currently associated with the service context.
-Parameters
-srvhp (IN/OUT) - an uninitialized server context handle, which gets 
-initialized by this call. Passing in an initialized server handle causes an 
-error. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-dblink (IN) - specifies the database (server) to use. This parameter points to
-a character string which specifies a connect string or a service point. If the 
-connect string is NULL, then this call attaches to the default host. The length
-of connstr is specified in connstr_len. The connstr pointer may be freed by the
-caller on return.
-dblink_len (IN) - the length of the string pointed to by connstr. For a valid 
-connect string name or alias, connstr_len must be non-zero.
-mode (IN) - specifies the various modes of operation.  For release 8.0, pass as
-OCI_DEFAULT - in this mode, calls made to the server on this server context 
-are made in blocking mode. 
-Example
-See the description of OCIStmtPrepare() on page 13-96 for an example showing 
-the use of OCIServerAttach().
-Related Functions
-OCIServerDetach()
-
-
-
-OCIServerDetach()
-Name
-OCI DeTaCH server
-Purpose
-Deletes an access to a data source for OCI operations.
-Syntax
-sword OCIServerDetach ( OCIServer   *svrhp,
-                      OCIError    *errhp,
-                      ub4         mode); 
-Comments
-This call deletes an access to data source for OCI operations, which was 
-established by a call to OCIServerAttach(). 
-Parameters
-srvhp (IN) - a handle to an initialized server context, which gets reset to 
-uninitialized state. The handle is not de-allocated. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-mode (IN) - specifies the various modes of operation. The only valid mode is 
-OCI_DEFAULT for the default mode. 
-Related Functions
-OCIServerAttach()
-
-
-
-OCIServerVersion()
-Name
-OCI VERSion
-Purpose
-Returns the version string of the Oracle server.
-Syntax
-sword OCIServerVersion ( dvoid        *hndlp, 
-                       OCIError     *errhp, 
-                       OraText         *bufp,
-                       ub4          bufsz
-                       ub1          hndltype );
-Comments
-This call returns the version string of the Oracle server. 
-For example, the following might be returned as the version string if your 
-application is running against a 7.3.2 server:
-Oracle7 Server Release 7.3.2.0.0 - Production Release
-PL/SQL Release 2.3.2.0.0 - Production
-CORE Version 3.5.2.0.0 - Production
-TNS for SEQUENT DYNIX/ptx: Version 2.3.2.0.0 - Production
-NLSRTL Version 3.2.2.0.0 - Production
-
-Parameters
-hndlp (IN) - the service context handle or the server context handle.
-errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-bufp (IN) - the buffer in which the version information is returned.
-bufsz (IN) - the length of the buffer.
-hndltype (IN) - the type of handle passed to the function.
-Related Functions
-
-
-
-
-
-OCISessionBegin()
-Name
-OCI Session Begin and authenticate user
-Purpose
-Creates a user authentication and begins a user session for a given server.
-Syntax
-sword OCISessionBegin ( OCISvcCtx     *svchp,
-                      OCIError      *errhp,
-                      OCISession    *usrhp,
-                      ub4           credt,
-                      ub4           mode);
-
-Comments
-For Oracle8, OCISessionBegin() must be called for any given server handle 
-before requests can be made against it. Also, OCISessionBegin() only supports 
-authenticating the user for access to the Oracle server specified by the 
-server handle in the service context. In other words, after OCIServerAttach() 
-is called to initialize a server handle, OCISessionBegin() must be called to 
-authenticate the user for that given server. 
-When OCISessionBegin() is called for the first time for the given server 
-handle, the initialized authentication handle is called a primary 
-authentication context. A primary authentication context may not be created 
-with the OCI_MIGRATE mode. Also, only one primary authentication context can 
-be created for a given server handle and the primary authentication context c
-an only ever be used with that server handle. If the primary authentication 
-context is set in a service handle with a different server handle, then an 
-error will result.
-After OCISessionBegin() has been called for the server handle, and the primary 
-authentication context is set in the service handle, OCISessionBegin() may be 
-called again to initialize another authentication handle with different (or 
-the same) credentials. When OCISessionBegin() is called with a service handle 
-set with a primary authentication context, the returned authentication context
-in authp is called a user authentication context. As many user authentication 
-contexts may be initialized as desired.
-User authentication contexts may be created with the OCI_MIGRATE mode. 
-If the OCI_MIGRATE mode is not specified, then the user authentication 
-context can only ever be used with the same server handle set in svchp. If 
-OCI_MIGRATE mode is specified, then the user authentication may be set 
-with different server handles. However, the user authentication context is 
-restricted to use with only server handles which resolve to the same database 
-instance and that have equivalent primary authentication contexts. Equivalent 
-authentication contexts are those which were authenticated as the same 
-database user.
-OCI_SYSDBA, OCI_SYSOPER, and OCI_PRELIM_AUTH may only be used 
-with a primary authentication context.
-To provide credentials for a call to OCISessionBegin(), one of two methods are 
-supported. The first is to provide a valid username and password pair for 
-database authentication in the user authentication handle passed to 
-OCISessionBegin(). This involves using OCIAttrSet() to set the 
-OCI_ATTR_USERNAME and OCI_ATTR_PASSWORD attributes on the 
-authentication handle. Then OCISessionBegin() is called with 
-OCI_CRED_RDBMS.
-Note: When the authentication handle is terminated using 
-OCISessionEnd(), the username and password attributes remain 
-unchanged and thus can be re-used in a future call to OCISessionBegin(). 
-Otherwise, they must be reset to new values before the next 
-OCISessionBegin() call.
-The second type of credentials supported are external credentials. No 
-attributes need to be set on the authentication handle before calling 
-OCISessionBegin(). The credential type is OCI_CRED_EXT. This is equivalent 
-to the Oracle7 `connect /' syntax. If values have been set for 
-OCI_ATTR_USERNAME and OCI_ATTR_PASSWORD, then these are 
-ignored if OCI_CRED_EXT is used.
-Parameters
-svchp (IN) - a handle to a service context. There must be a valid server 
-handle set in svchp.
-errhp (IN) - an error handle to the retrieve diagnostic information.
-usrhp (IN/OUT) - a handle to an authentication context, which is initialized 
-by this call.
-credt (IN) - specifies the type of credentials to use for authentication. 
-Valid values for credt are:
-OCI_CRED_RDBMS - authenticate using a database username and 
-password pair as credentials. The attributes OCI_ATTR_USERNAME 
-and OCI_ATTR_PASSWORD should be set on the authentication 
-context before this call.
-OCI_CRED_EXT - authenticate using external credentials. No username 
-or password is provided.
-mode (IN) - specifies the various modes of operation. Valid modes are:
-OCI_DEFAULT - in this mode, the authentication context returned may 
-only ever be set with the same server context specified in svchp. This 
-establishes the primary authentication context.
-OCI_MIGRATE - in this mode, the new authentication context may be 
-set in a service handle with a different server handle. This mode 
-establishes the user authentication context. 
-OCI_SYSDBA - in this mode, the user is authenticated for SYSDBA 
-access.
-OCI_SYSOPER - in this mode, the user is authenticated for SYSOPER 
-access.
-OCI_PRELIM_AUTH - this mode may only be used with OCI_SYSDBA 
-or OCI_SYSOPER to authenticate for certain administration tasks.
-Related Functions
-OCISessionEnd()
-
-
-
-
-
-
-OCISessionEnd()
-Name
-OCI Terminate user Authentication Context
-Purpose
-Terminates a user authentication context created by OCISessionBegin()
-Syntax
-sword OCISessionEnd ( OCISvcCtx       *svchp,
-                    OCIError        *errhp,
-                    OCISession      *usrhp,
-                    ub4             mode);
-
-Comments
-The user security context associated with the service context is invalidated 
-by this call. Storage for the authentication context is not freed. The 
-transaction specified by the service context is implicitly committed. The 
-transaction handle, if explicitly allocated, may be freed if not being used.
-Resources allocated on the server for this user are freed.
-The authentication handle may be reused in a new call to OCISessionBegin().
-Parameters
-svchp (IN/OUT) - the service context handle. There must be a valid server 
-handle and user authentication handle associated with svchp.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-usrhp (IN) - de-authenticate this user. If this parameter is passed as NULL, the 
-user in the service context handle is de-authenticated.
-mode (IN) - the only valid mode is OCI_DEFAULT.
-Example
-In this example, an authentication context is destroyed.
-Related Functions
-OCISessionBegin()
-
-
-
-
-OCIStmtExecute()
-Name
-OCI EXECute
-Purpose
-This call associates an application request with a server.
-Syntax
-sword OCIStmtExecute ( OCISvcCtx           *svchp,
-                     OCIStmt             *stmtp,
-                     OCIError            *errhp,
-                     ub4                 iters,
-                     ub4                 rowoff,
-                     CONST OCISnapshot   *snap_in,
-                     OCISnapshot         *snap_out,
-                     ub4                 mode );
-Comments
-This function  is used to execute a prepared SQL statement.
-Using an execute call, the application associates a request with a server. On 
-success, OCI_SUCCESS is returned.
-If a SELECT statement is executed, the description of the select list follows 
-implicitly as a response. This description is buffered on the client side for 
-describes, fetches and define type conversions. Hence it is optimal to 
-describe a select list only after an execute. 
-Also for SELECT statements, some results are available implicitly. Rows will 
-be received and buffered at the end of the execute. For queries with small row 
-count, a prefetch causes memory to be released in the server if the end of 
-fetch is reached, an optimization that may result in memory usage reduction. 
-Set attribute call has been defined to set the number of rows to be prefetched
-per result set.
-For SELECT statements, at the end of the execute, the statement handle 
-implicitly maintains a reference to the service context on which it is 
-executed. It is the user's responsibility to maintain the integrity of the 
-service context. If the attributes of a service context is changed for 
-executing some operations on this service context, the service context must 
-be restored to have the same attributes, that a statement was executed with, 
-prior to a fetch on the statement handle. The implicit reference is maintained 
-until the statement handle is freed or the fetch is cancelled or an end of 
-fetch condition is reached.
-Note: If output variables are defined for a SELECT statement before a 
-call to OCIStmtExecute(), the number of rows specified by iters will be 
-fetched directly into the defined output buffers and additional rows 
-equivalent to the prefetch count will be prefetched. If there are no 
-additional rows, then the fetch is complete without calling 
-OCIStmtFetch().
-The execute call will return errors if the statement has bind data types that 
-are not supported in an Oracle7 server.
-Parameters
-svchp (IN/OUT) - service context handle. 
-stmtp (IN/OUT) - an statement handle - defines the statement and the 
-associated data to be executed at the server. It is invalid to pass in a 
-statement handle that has bind of data types only supported in release 8.0 
-when srvchp points to an Oracle7 server. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. If the statement is being 
-batched and it is successful, then this handle will contain this particular 
-statement execution specific errors returned from the server when the batch is 
-flushed.
-iters (IN) - the number of times this statement is executed for non-Select 
-statements. For Select statements, if iters is non-zero, then defines must 
-have been done for the statement handle. The execution fetches iters rows into 
-these predefined buffers and prefetches more rows depending upon the prefetch 
-row count. This function returns an error if iters=0 for non-SELECT 
-statements.
-rowoff (IN) - the index from which the data in an array bind is relevant for 
-this multiple row execution. 
-snap_in (IN) - this parameter is optional. if supplied, must point to a 
-snapshot descriptor of type OCI_DTYPE_SNAP.  The contents of this descriptor 
-must be obtained from the snap_out parameter of a previous call.  The 
-descriptor is ignored if the SQL is not a SELECT.  This facility allows 
-multiple service contexts to ORACLE to see the same consistent snapshot of the 
-database's committed data.  However, uncommitted data in one context is not 
-visible to another context even using the same snapshot.
-snap_out (OUT) - this parameter optional. if supplied, must point to a 
-descriptor of type OCI_DTYPE_SNAP. This descriptor is filled in with an 
-opaque representation which is the current ORACLE "system change 
-number" suitable as a snap_in input to a subsequent call to OCIStmtExecute().  
-This descriptor should not be used any longer than necessary in order to avoid 
-"snapshot too old" errors. 
-mode (IN) - The modes are:
-If OCI_DEFAULT_MODE, the default mode, is selected, the request is 
-immediately executed. Error handle contains diagnostics on error if any. 
-OCI_EXACT_FETCH - if the statement is a SQL SELECT, this mode is 
-only valid if the application has set the prefetch row count prior to this 
-call. In this mode, the OCI library will get up to the number of rows 
-specified (i.e., prefetch row count plus iters). If the number of rows 
-returned by the query is greater than this value, OCI_ERROR will be 
-returned with ORA-01422 as the implementation specific error in a 
-diagnostic record. If the number of rows returned by the query is 
-smaller than the prefetch row count, OCI_SUCCESS_WITH_INFO will 
-be returned with ORA-01403 as the implementation specific error. The 
-prefetch buffer size is ignored and the OCI library tries to allocate all the 
-space required to contain the prefetched rows. The exact fetch semantics 
-apply to only the top level rows. No more rows can be fetched for this 
-query at the end of the call. 
-OCI_KEEP_FETCH_STATE - the result set rows (not yet fetched) of this 
-statement executed in this transaction will be maintained when the 
-transaction is detached for migration. By default, a query is cancelled 
-when a transaction is detached for migration. This mode is the default 
-mode when connected to a V7 server. 
-Related Functions
-OCIStmtPrepare()
-
-
-
-
-
-OCIStmtFetch()
-Name
-OCI FetCH
-Purpose
-Fetches rows from a query.
-Syntax
-sword OCIStmtFetch ( OCIStmt     *stmtp,
-                   OCIError    *errhp, 
-                   ub4         nrows,
-                   ub2         orientation,
-                   ub4         mode);
-Comments
-The fetch call is a local call, if prefetched rows suffice. However, this is 
-transparent to the application. If LOB columns are being read, LOB locators 
-are fetched for subsequent LOB operations to be performed on these locators. 
-Prefetching is turned off if LONG columns are involved. 
-A fetch with nrows set to 0 rows effectively cancels the fetch for this 
-statement.
-Parameters
-stmtp (IN) - a statement (application request) handle.
-errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-nrows (IN) - number of rows to be fetched from the current position.
-orientation (IN) - for release 8.0, the only acceptable value is 
-OCI_FETCH_NEXT, which is also the default value. 
-mode (IN) - for release 8.0, beta-1, the following mode is defined.
-OCI_DEFAULT - default mode
-OCI_EOF_FETCH - indicates that it is the last fetch from the result set. 
-If nrows is non-zero, setting this mode effectively cancels fetching after 
-retrieving nrows, otherwise it cancels fetching immediately. 
-Related Functions
-OCIAttrGet()
-
-
-OCIStmtFetch2()
-Name
-OCI FetCH2
-Purpose
-Fetches rows from a query.
-Syntax
-sword OCIStmtFetch2 ( OCIStmt     *stmtp,
-                   OCIError    *errhp, 
-                   ub4         nrows,
-                   ub2         orientation,
-                   ub4         scrollOffset,
-                   ub4         mode);
-Comments
-The fetch call works similar to the OCIStmtFetch call with the 
-addition of the fetchOffset parameter. It can be used on any 
-statement handle, whether it is scrollable or not. For a 
-non-scrollable statement handle, the only acceptable value 
-will be OCI_FETCH_NEXT, and the fetchOffset parameter will be 
-ignored. Applications are encouraged to use this new call. 
-
-A fetchOffset with OCI_FETCH_RELATIVE is equivalent to 
-OCI_FETCH_CURRENT with a value of 0, is equivalent to 
-OCI_FETCH_NEXT with a value of 1, and equivalent to 
-OCI_FETCH_PRIOR with a value of -1. Note that the range of 
-accessible rows is [1,OCI_ATTR_ROW_COUNT] beyond which an 
-error could be raised if sufficient rows do not exist in 
-
-The fetch call is a local call, if prefetched rows suffice. However, this is 
-transparent to the application. If LOB columns are being read, LOB locators 
-are fetched for subsequent LOB operations to be performed on these locators. 
-Prefetching is turned off if LONG columns are involved. 
-A fetch with nrows set to 0 rows effectively cancels the fetch for this 
-statement.
-Parameters
-stmtp (IN) - a statement (application request) handle.
-errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-nrows (IN) - number of rows to be fetched from the current position.
-It defaults to 1 for orientation OCI_FETCH_LAST.
-orientation (IN) -  The acceptable values are as follows, with 
-OCI_FETCH_NEXT being the default value.
-OCI_FETCH_CURRENT gets the current row, 
-OCI_FETCH_NEXT gets the next row from the current position,
-OCI_FETCH_FIRST gets the first row in the result set,
-OCI_FETCH_LAST gets the last row in the result set, 
-OCI_FETCH_PRIOR gets the previous row from the current row in the result set, 
-OCI_FETCH_ABSOLUTE will fetch the row number (specified by fetchOffset 
-parameter) in the result set using absolute positioning,
-OCI_FETCH_RELATIVE will fetch the row number (specified by fetchOffset 
-parameter) in the result set using relative positioning.
-scrollOffset(IN) - offset used with the OCI_FETCH_ABSOLUTE and 
-OCI_FETCH_RELATIVE orientation parameters only. It specify
-the new current position for scrollable result set. It is 
-ignored for non-scrollable result sets. 
-mode (IN) - for release 8.0, beta-1, the following mode is defined.
-OCI_DEFAULT - default mode
-OCI_EOF_FETCH - indicates that it is the last fetch from the result set. 
-If nrows is non-zero, setting this mode effectively cancels fetching after 
-retrieving nrows, otherwise it cancels fetching immediately. 
-Related Functions
-OCIAttrGet()
-
-
-OCIStmtGetBindInfo()
-Name
-OCI Get Bind Parameters
-Purpose
-Gets the bind and indicator variable names.
-Syntax
-sword OCIStmtGetBindInfo ( OCIStmt      *stmtp,
-                     OCIError     *errhp,
-                     ub4          size,
-                     ub4          startloc,
-                     sb4          *found,
-                     OraText         *bvnp[],
-                     ub1          bvnl[],
-                     OraText         *invp[],
-                     ub1          inpl[],
-                     ub1          dupl[],
-                     OCIBind      *hndl[] );
-
-Comments
-Gets the bind and indicator variable names. It returns the information for all 
-the bind variables (even the duplicate ones) and sets the found parameter to 
-the total number of bind variables and not just the number of distinct bind 
-variables.
-The statement must have been prepared with a call to OCIStmtPrepare() prior 
-to this call. 
-This call is processed locally.
-Parameters
-stmtp (IN) - the statement handle.
-errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-size (IN) - the number of elements in each array.
-startloc (IN) - position of the  bind variable at which to start getting  bind 
-information.
-found (IN) - abs(found) gives the total number of bind variables in the 
-statement irrespective of the start position. Positive value if the number of 
-bind variables returned is less than the size provided, otherwise negative.
-bvnp (OUT) - array of pointers to hold bind variable names.
-bvnl (OUT) - array to hold the length of the each bvnp element.
-invp (OUT) - array of pointers to hold indicator variable names.
-inpl (OUT) - array of pointers to hold the length of the each invp element.
-dupl (OUT) - an array whose element value is 0 or 1 depending on whether the 
-bind position is duplicate of another.
-hndl  (OUT) - an array which returns the bind handle if binds have been done 
-for the bind position. No handle is returned for duplicates.
-Related Functions
-OCIStmtPrepare()
-
-
-
-OCIStmtGetPieceInfo()
-Name
-OCI Get Piece Information
-Purpose
-Returns piece information for a piecewise operation.
-Syntax
-sword OCIStmtGetPieceInfo( CONST OCIStmt  *stmtp,
-                         OCIError       *errhp,
-                         dvoid          **hndlpp,
-                         ub4            *typep,
-                         ub1            *in_outp,
-                         ub4            *iterp, 
-                         ub4            *idxp,
-                         ub1            *piecep );
-
-Comments
-When an execute/fetch call returns OCI_NEED_DATA to get/return a 
-dynamic bind/define value or piece, OCIStmtGetPieceInfo() returns the 
-relevant information: bind/define handle, iteration or index number and 
-which piece.
-See the section "Runtime Data Allocation and Piecewise Operations" on page 
-5-16 for more information about using OCIStmtGetPieceInfo().
-Parameters
-stmtp (IN) - the statement when executed returned OCI_NEED_DATA. 
-errhp (OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-hndlpp (OUT) - returns a pointer to the bind or define handle of the bind or 
-define whose runtime data is required or is being provided.
-typep (OUT) - the type of the handle pointed to by hndlpp: OCI_HTYPE_BIND 
-(for a bind handle) or OCI_HTYPE_DEFINE (for a define handle).
-in_outp (OUT) - returns OCI_PARAM_IN if the data is required for an IN bind 
-value. Returns OCI_PARAM_OUT if the data is available as an OUT bind 
-variable or a define position value.
-iterp (OUT) - returns the row number of a multiple row operation.
-idxp (OUT) - the index of an array element of a PL/SQL array bind operation.
-piecep (OUT) - returns one of the following defined values - 
-OCI_ONE_PIECE, OCI_FIRST_PIECE, OCI_NEXT_PIECE and 
-OCI_LAST_PIECE. The default value is always OCI_ONE_PIECE. 
-Related Functions
-OCIAttrGet(), OCIAttrGet(), OCIStmtExecute(), OCIStmtFetch(), 
-OCIStmtSetPieceInfo()
-
-
-
-
-OCIStmtPrepare()
-Name
-OCI Statement REQuest
-Purpose
-This call defines the SQL/PLSQL statement to be executed.
-Syntax
-sword OCIStmtPrepare ( OCIStmt      *stmtp,
-                     OCIError     *errhp,
-                     CONST OraText   *stmt, 
-                     ub4          stmt_len,
-                     ub4          language,
-                     ub4          mode);
-Comments
-This call is used to prepare a SQL or PL/SQL statement for execution. The 
-OCIStmtPrepare() call defines an application request. 
-This is a purely local call. Data values for this statement initialized in 
-subsequent bind calls will be stored in a bind handle which will hang off this 
-statement handle.
-This call does not create an association between this statement handle and any 
-particular server.
-See the section "Preparing Statements" on page 2-21 for more information 
-about using this call.
-Parameters
-stmtp (IN) - a statement handle.
-errhp (IN) - an error handle to retrieve diagnostic information.
-stmt (IN) - SQL or PL/SQL statement to be executed. Must be a null-
-terminated string. The pointer to the text of the statement must be available 
-as long as the statement is executed.
-stmt_len (IN) - length of the statement. Must not be zero.
-language (IN) - V7, V8, or native syntax. Possible values are:
-OCI_V7_SYNTAX - V7 ORACLE parsing syntax
-OCI_V8_SYNTAX - V8 ORACLE parsing syntax
-OCI_NTV_SYNTAX - syntax depending upon the version of the server. 
-mode (IN) - the only defined mode is OCI_DEFAULT for default mode. 
-Example
-This example demonstrates the use of OCIStmtPrepare(), as well as the OCI 
-application initialization calls.
-Related Functions
-OCIAttrGet(), OCIStmtExecute()
-
-
-OCIStmtPrepare2()
-Name
-OCI Statement REQuest with (a) early binding to svchp and/or
-(b) stmt caching
-Purpose
-This call defines the SQL/PLSQL statement to be executed.
-Syntax
-sword OCIStmtPrepare2 ( OCISvcCtx *svchp,
-                     OCIStmt      **stmtp,
-                     OCIError     *errhp,
-                     CONST OraText   *stmt,
-                     ub4          stmt_len,
-                     CONST OraText *key,
-                     ub4          key_len,
-                     ub4          language,
-                     ub4          mode);
-Comments
-This call is used to prepare a SQL or PL/SQL statement for execution. The
-OCIStmtPrepare() call defines an application request.
-This is a purely local call. Data values for this statement initialized in
-subsequent bind calls will be stored in a bind handle which will hang off this
-statement handle.
-This call creates an association between the statement handle and a service
-context. It differs from OCIStmtPrepare in that respect. It also supports
-stmt caching. The stmt will automatically be cached if the authp of the stmt
-has enabled stmt caching.
-Parameters
-svchp (IN) - the service context handle that contains the session that
-             this stmt handle belongs to.
-stmtp (OUT) - an unallocated stmt handle must be pased in. An allocated
-              and prepared  statement handle will be returned.
-errhp (IN) - an error handle to retrieve diagnostic information.
-stmt (IN) - SQL or PL/SQL statement to be executed. Must be a null-
-            terminated string. The pointer to the OraText of the statement 
-            must be available as long as the statement is executed.
-stmt_len (IN) - length of the statement. Must not be zero.
-key (IN) - This is only Valid for OCI Stmt Caching. It indicates the
-           key to search with. It thus optimizes the search in the cache.
-key_len (IN) - the length of the key. This, too, is onlly valid for stmt
-               caching.
-language (IN) - V7, V8, or native syntax. Possible values are:
-OCI_V7_SYNTAX - V7 ORACLE parsing syntax
-OCI_V8_SYNTAX - V8 ORACLE parsing syntax
-OCI_NTV_SYNTAX - syntax depending upon the version of the server.
-mode (IN) - the defined modes are OCI_DEFAULT and OCI_PREP2_CACHE_SEARCHONLY.
-Example
-Related Functions
-OCIStmtExecute(), OCIStmtRelease()
-
-
-OCIStmtRelease()
-Name
-OCI Statement Release. This call is used to relesae the stmt that
-was retreived using OCIStmtPrepare2(). If the stmt is release
-using this call, OCIHandleFree() must not be called on the stmt
-handle.
-Purpose
-This call releases the statement obtained by OCIStmtPrepare2
-Syntax
-sword OCIStmtRelease ( OCIStmt      *stmtp,
-                     OCIError     *errhp,
-                     cONST OraText *key,
-                     ub4          key_len,
-                     ub4          mode);
-Comments
-This call is used to release a handle obtained via OCIStmtPrepare2().
-It also frees the memory associated with the handle.
-This is a purely local call.
-Parameters
-stmtp (IN/OUT) - The statement handle to be released/freed.
-errhp (IN) - an error handle to retrieve diagnostic information.
-key (IN) - This is only Valid for OCI Stmt Caching. It indicates the
-           key to tag the stmt with.
-key_len (IN) - the length of the key. This, too, is only valid for stmt
-               caching.
-mode (IN) - the defined modes are OCI_DEFAULT for default mode and
-            OCI_STRLS_CACHE_DELETE (only used for Stmt Caching).
-Example
-Related Functions
-OCIStmtExecute(), OCIStmtPrepare2()
-
-
-OCIStmtSetPieceInfo()
-Name
-OCI Set Piece Information
-Purpose
-Sets piece information for a piecewise operation.
-Syntax
-sword OCIStmtSetPieceInfo ( dvoid             *hndlp,
-                          ub4               type,
-                          OCIError          *errhp,
-                          CONST dvoid       *bufp,
-                          ub4               *alenp, 
-                          ub1               piece,
-                          CONST dvoid       *indp, 
-                          ub2               *rcodep ); 
-Comments
-When an execute call returns OCI_NEED_DATA to get a dynamic IN/OUT 
-bind value or piece, OCIStmtSetPieceInfo() sets the piece information: the 
-buffer, the length, the indicator and which piece is currently being processed.
-For more information about using OCIStmtSetPieceInfo() see the section 
-"Runtime Data Allocation and Piecewise Operations" on page 5-16.
-Parameters
-hndlp (IN/OUT) - the bind/define handle.
-type (IN) - type of the handle. 
-errhp (OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-bufp (IN/OUT) - bufp is a pointer to a storage containing the data value or 
-the piece when it is an IN bind variable, otherwise bufp is a pointer to 
-storage for getting a piece or a value for OUT binds and define variables. For
-named data types or REFs, a pointer to the object or REF is returned.
-alenp (IN/OUT) - the length of the piece or the value. 
-piece (IN) - the piece parameter. The following are valid values: 
-OCI_ONE_PIECE, OCI_FIRST_PIECE, OCI_NEXT_PIECE, or 
-OCI_LAST_PIECE. 
-The default value is OCI_ONE_PIECE. This parameter is used for IN bind 
-variables only.
-indp (IN/OUT) - indicator. A pointer to a sb2 value or pointer to an indicator 
-structure for named data types (SQLT_NTY) and REFs (SQLT_REF), i.e., *indp 
-is either an sb2 or a dvoid * depending upon the data type.
-rcodep (IN/OUT) - return code. 
-Related Functions
-OCIAttrGet(), OCIAttrGet(), OCIStmtExecute(), OCIStmtFetch(), 
-OCIStmtGetPieceInfo()
-
-
-OCIFormatInit
-Name
-OCIFormat Package Initialize
-Purpose
-Initializes the OCIFormat package.
-Syntax
-sword OCIFormatInit(dvoid *hndl, OCIError *err);
-Comments
-This routine must be called before calling any other OCIFormat routine.
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
-Parameters
-hndl (IN/OUT) - OCI environment or session handle
-err (IN/OUT) - OCI error handle
-Related Functions
-OCIFormatTerm()
-
-
-OCIFormatString
-Name
-OCIFormat Package Format String
-Purpose
-Writes a text string into the supplied text buffer using the argument
-list submitted to it and in accordance with the format string given.
-Syntax
-sword OCIFormatString(dvoid *hndl, OCIError *err, text *buffer,
-                      sbig_ora bufferLength, sbig_ora *returnLength,
-                      CONST OraText *formatString, ...);
-Comments
-The first call to this routine must be preceded by a call to the
-OCIFormatInit routine that initializes the OCIFormat package
-for use.  When this routine is no longer needed then terminate
-the OCIFormat package by a call to the OCIFormatTerm routine.
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
-Parameters
-hndl         (IN/OUT) - OCI environment or session handle
-err          (IN/OUT) - OCI error handle
-buffer       (OUT)    - text buffer for the string
-bufferLength (IN)     - length of the text buffer
-returnLength (OUT)    - length of the formatted string
-formatString (IN)     - format specification string
-...          (IN)     - variable argument list
-Related Functions
-
-
-OCIFormatTerm 
-Name
-OCIFormat Package Terminate
-Purpose
-Terminates the OCIFormat package.
-Syntax
-sword OCIFormatTerm(dvoid *hndl, OCIError *err);
-Comments
-It must be called after the OCIFormat package is no longer being used.
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
-Parameters
-hndl (IN/OUT) - OCI environment or session handle
-err (IN/OUT) - OCI error handle
-Related Functions
-OCIFormatInit()
-
-
-OCIFormatTUb1
-Name
-OCIFormat Package ub1 Type
-Purpose
-Return the type value for the ub1 type.
-Syntax
-sword OCIFormatTUb1(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTUb2
-Name
-OCIFormat Package ub2 Type
-Purpose
-Return the type value for the ub2 type.
-Syntax
-sword OCIFormatTUb2(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTUb4
-Name
-OCIFormat Package ub4 Type
-Purpose
-Return the type value for the ub4 type.
-Syntax
-sword OCIFormatTUb4(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTUword
-Name
-OCIFormat Package uword Type
-Purpose
-Return the type value for the uword type.
-Syntax
-sword OCIFormatTUword(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTUbig_ora
-Name
-OCIFormat Package ubig_ora Type
-Purpose
-Return the type value for the ubig_ora type.
-Syntax
-sword OCIFormatTUbig_ora(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTSb1
-Name
-OCIFormat Package sb1 Type
-Purpose
-Return the type value for the sb1 type.
-Syntax
-sword OCIFormatTSb1(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTSb2
-Name
-OCIFormat Package sb2 Type
-Purpose
-Return the type value for the sb2 type.
-Syntax
-sword OCIFormatTSb2(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTSb4
-Name
-OCIFormat Package sb4 Type
-Purpose
-Return the type value for the sb4 type.
-Syntax
-sword OCIFormatTSb4(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTSword
-Name
-OCIFormat Package sword Type
-Purpose
-Return the type value for the sword type.
-Syntax
-sword OCIFormatTSword(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTSbig_ora
-Name
-OCIFormat Package sbig_ora Type
-Purpose
-Return the type value for the sbig_ora type.
-Syntax
-sword OCIFormatTSbig_ora(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTEb1
-Name
-OCIFormat Package eb1 Type
-Purpose
-Return the type value for the eb1 type.
-Syntax
-sword OCIFormatTEb1(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTEb2
-Name
-OCIFormat Package eb2 Type
-Purpose
-Return the type value for the eb2 type.
-Syntax
-sword OCIFormatTEb2(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTEb4
-Name
-OCIFormat Package eb4 Type
-Purpose
-Return the type value for the eb4 type.
-Syntax
-sword OCIFormatTEb4(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTEword
-Name
-OCIFormat Package eword Type
-Purpose
-Return the type value for the eword type.
-Syntax
-sword OCIFormatTEword(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTChar
-Name
-OCIFormat Package text Type
-Purpose
-Return the type value for the text type.
-Syntax
-sword OCIFormatTChar(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTText
-Name
-OCIFormat Package *text Type
-Purpose
-Return the type value for the *text type.
-Syntax
-sword OCIFormatTText(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTDouble
-Name
-OCIFormat Package double Type
-Purpose
-Return the type value for the double type.
-Syntax
-sword OCIFormatTDouble(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatDvoid
-Name
-OCIFormat Package dvoid Type
-Purpose
-Return the type value for the dvoid type.
-Syntax
-sword OCIFormatTDvoid(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTEnd
-Name
-OCIFormat Package end Type
-Purpose
-Return the list terminator's "type".
-Syntax
-sword OCIFormatTEnd(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCISvcCtxToLda()
-Name
-OCI toggle SerVice context handle to Version 7 Lda_Def
-Purpose
-Toggles between a V8 service context handle and a V7 Lda_Def.
-Syntax
-sword OCISvcCtxToLda ( OCISvcCtx    *srvhp,
-                     OCIError     *errhp,
-                     Lda_Def      *ldap );
-Comments
-Toggles between an Oracle8 service context handle and an Oracle7 Lda_Def.
-This function can only be called after a service context has been properly 
-initialized.
-Once the service context has been translated to an Lda_Def, it can be used in 
-release 7.x OCI calls (e.g., obindps(), ofen()).
-Note: If there are multiple service contexts which share the same server 
-handle, only one can be in V7 mode at any time.
-The action of this call can be reversed by passing the resulting Lda_Def to 
-the OCILdaToSvcCtx() function.
-Parameters
-svchp (IN/OUT) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-ldap (IN/OUT) - a Logon Data Area for V7-style OCI calls which is initialized 
-by this call. 
-Related Functions
-OCILdaToSvcCtx()
-
-
-
-
-OCITransCommit()
-Name
-OCI TX (transaction) CoMmit
-Purpose
-Commits the transaction associated with a specified service context.
-Syntax
-sword OCITransCommit ( OCISvcCtx    *srvcp,
-                     OCIError     *errhp,
-                     ub4          flags );
-Comments
-The transaction currently associated with the service context is committed. If 
-it is a distributed transaction that the server cannot commit, this call 
-additionally retrieves the state of the transaction from the database to be 
-returned to the user in the error handle.
-If the application has defined multiple transactions, this function operates 
-on the transaction currently associated with the service context. If the 
-application is working with only the implicit local transaction created when 
-database changes are made, that implicit transaction is committed.
-If the application is running in the object mode, then the modified or updated 
-objects in the object cache for this transaction are also committed.
-The flags parameter is used for one-phase commit optimization in distributed 
-transactions. If the transaction is non-distributed, the flags parameter is 
-ignored, and OCI_DEFAULT can be passed as its value. OCI applications 
-managing global transactions should pass a value of 
-OCI_TRANS_TWOPHASE to the flags parameter for a two-phase commit. The 
-default is one-phase commit.
-Under normal circumstances, OCITransCommit() returns with a status 
-indicating that the transaction has either been committed or rolled back. With 
-distributed transactions, it is possible that the transaction is now in-doubt 
-(i.e., neither committed nor aborted). In this case, OCITransCommit() 
-attempts to retrieve the status of the transaction from the server. 
-The status is returned.
-Parameters
-srvcp (IN) - the service context handle.
-errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-flags -see the "Comments" section above.
-Related Functions
-OCITransRollback()
-
-
-
-
-OCITransDetach()
-Name
-OCI TX (transaction) DeTach
-Purpose
-Detaches a transaction.
-Syntax
-sword OCITransDetach ( OCISvcCtx    *srvcp,
-                     OCIError     *errhp,
-                     ub4          flags);
-Comments
-Detaches a global transaction from the service context handle. The transaction 
-currently attached to the service context handle becomes inactive at the end 
-of this call. The transaction may be resumed later by calling OCITransStart(), 
-specifying  a flags value of OCI_TRANS_RESUME.
-When a transaction is detached, the value which was specified in the timeout 
-parameter of OCITransStart() when the transaction was started is used to 
-determine the amount of time the branch can remain inactive before being 
-deleted by the server's PMON process.
-Note: The transaction can be resumed by a different process than the one 
-that detached it, provided that the transaction has the same 
-authorization.
-Parameters
-srvcp (IN) - the service context handle. 
-errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-flags (IN) - you must pass a value of OCI_DEFAULT for this parameter.
-Related Functions
-OCITransStart()
-
-
-
-OCITransForget()
-Name
-OCI TX (transaction) ForGeT
-Purpose
-Causes the server to forget a heuristically completed global transaction.
-Syntax
-sword OCITransForget ( OCISvcCtx     *svchp, 
-                     OCIError      *errhp,
-                     ub4           flags);
-
-Comments
-
-Forgets a heuristically completed global transaction. The server deletes the 
-status of the transaction from the system's pending transaction table.
-The XID of the transaction to be forgotten is set as an attribute of the 
-transaction handle (OCI_ATTR_XID).
-Parameters
-srvcp (IN) - the service context handle - the transaction is rolled back.
-errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-flags (IN) - you must pass OCI_DEFAULT for this parameter.
-Related Functions
-OCITransCommit(), OCITransRollback()
-
-
-
-OCITransMultiPrepare() 
-Name
-OCI Trans(action) Multi-Branch Prepare
-Purpose
-Prepares a transaction with multiple branches in a single call.
-Syntax
-sword OCITransMultiPrepare ( OCISvcCtx    *svchp,
-                             ub4           numBranches,
-                             OCITrans     **txns,
-                             OCIError     **errhp);
-
-Comments
-
-Prepares the specified global transaction for commit.
-This call is valid only for distributed transactions.
-This call is an advanced performance feature intended for use only in
-situations where the caller is responsible for preparing all the branches
-in a transaction. 
-Parameters
-srvcp (IN) - the service context handle. 
-numBranches (IN) - This is the number of branches expected. It is also the
-array size for the next two parameters.
-txns (IN) - This is the array of transaction handles for the branches to
-prepare. They should all have the OCI_ATTR_XID set. The global transaction
-ID should be the same.
-errhp (IN) - This is the array of error handles. If OCI_SUCCESS is not
-returned, then these will indicate which branches received which errors.
-Related Functions
-OCITransPrepare()
-
-
-OCITransPrepare()
-Name
-OCI TX (transaction) PREpare
-Purpose
-Prepares a transaction for commit.
-Syntax
-sword OCITransPrepare ( OCISvcCtx    *svchp, 
-                      OCIError     *errhp,
-                      ub4          flags);
-
-Comments
-
-Prepares the specified global transaction for commit.
-This call is valid only for distributed transactions.
-The call returns OCI_SUCCESS_WITH_INFO if the transaction has not made 
-any changes. The error handle will indicate that the transaction is read-only. 
-The flag parameter is not currently used. 
-Parameters
-srvcp (IN) - the service context handle. 
-errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-flags (IN) - you must pass OCI_DEFAULT for this parameter.
-Related Functions
-OCITransCommit(), OCITransForget()
-
-
-
-
-OCITransRollback()
-Name
-OCI TX (transaction) RoLlback
-Purpose
-Rolls back the current transaction.
-Syntax
-sword OCITransRollback ( dvoid        *svchp, 
-                       OCIError     *errhp,
-                       ub4          flags );
-Comments
-The current transaction- defined as the set of statements executed since the 
-last OCITransCommit() or since OCISessionBegin()-is rolled back.
-If the application is running under object mode then the modified or updated 
-objects in the object cache for this transaction are also rolled back.
-An error is returned if an attempt is made to roll back a global transaction 
-that is not currently active.
-Parameters
-svchp (IN) - a service context handle. The transaction currently set in the 
-service context handle is rolled back.
-errhp -(IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-flags - you must pass a value of OCI_DEFAULT for this parameter.
-Related Functions
-OCITransCommit()
-
-
-
-
-OCITransStart()
-Name
-OCI TX (transaction) STart
-Purpose
-Sets the beginning of a transaction.
-Syntax
-sword OCITransStart ( OCISvcCtx    *svchp, 
-                    OCIError     *errhp, 
-                    uword        timeout,
-                    ub4          flags);
-
-Comments
-This function sets the beginning of a global or serializable transaction. The 
-transaction context currently associated with the service context handle is 
-initialized at the end of the call if the flags parameter specifies that a new 
-transaction should be started.
-The XID of the transaction is set as an attribute of the transaction handle 
-(OCI_ATTR_XID)
-Parameters
-svchp (IN/OUT) - the service context handle. The transaction context in the 
-service context handle is initialized at the end of the call if the flag 
-specified a new transaction to be started.
-errhp (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-err and this function returns OCI_ERROR. Diagnostic information can be 
-obtained by calling OCIErrorGet().
-timeout (IN) - the time, in seconds, to wait for a transaction to become 
-available for resumption when OCI_TRANS_RESUME is specified. When 
-OCI_TRANS_NEW is specified, this value is stored and may be used later by 
-OCITransDetach().
-flags (IN) - specifies whether a new transaction is being started or an 
-existing transaction is being resumed. Also specifies serializiability or 
-read-only status. More than a single value can be specified. By default, 
-a read/write transaction is started. The flag values are:
-OCI_TRANS_NEW - starts a new transaction branch. By default starts a 
-tightly coupled and migratable branch.
-OCI_TRANS_TIGHT - explicitly specifies a tightly coupled branch
-OCI_TRANS_LOOSE - specifies a loosely coupled branch
-OCI_TRANS_RESUME - resumes an existing transaction branch. 
-OCI_TRANS_READONLY - start a readonly transaction
-OCI_TRANS_SERIALIZABLE - start a serializable transaction
-Related Functions
-OCITransDetach()
-
-
-******************************************************************************/
-
-/*****************************************************************************
-                         ACTUAL PROTOTYPE DECLARATIONS
-******************************************************************************/
-/*-----------------------Dynamic Callback Function Pointers------------------*/
-typedef sb4 (*OCICallbackInBind)(/*_ dvoid *ictxp, OCIBind *bindp, ub4 iter,
-                                   ub4 index, dvoid **bufpp, ub4 *alenp,
-                                   ub1 *piecep, dvoid **indp _*/);
- 
-typedef sb4 (*OCICallbackOutBind)(/*_ dvoid *octxp, OCIBind *bindp, ub4 iter,
-                                    ub4 index, dvoid **bufpp, ub4 **alenp,
-                                    ub1 *piecep, dvoid **indp,
-                                    ub2 **rcodep _*/);
- 
-typedef sb4 (*OCICallbackDefine)(/*_ dvoid *octxp, OCIDefine *defnp, ub4 iter,
-                                   dvoid **bufpp, ub4 **alenp, ub1 *piecep,
-                                   dvoid **indp, ub2 **rcodep _*/);
-
-typedef sword (*OCIUserCallback)(/*_ dvoid *ctxp, dvoid *hndlp, ub4 type,
-                                     ub4 fcode, ub4 when, sword returnCode,
-                                     sb4 *errnop, va_list arglist _*/);
-
-typedef sword (*OCIEnvCallbackType)(/*_ OCIEnv *env, ub4 mode,
-                                       size_t xtramem_sz, dvoid *usrmemp,
-                                       OCIUcb *ucbDesc _*/); 
-
-typedef sb4 (*OCICallbackLobRead)(/*_ dvoid *ctxp,
-                                      CONST dvoid *bufp,
-                                      ub4 len,
-                                      ub1 piece _*/);
-
-/*
- * Called multiple times when the data is being read from the pipe
- * ctxp (IN) - is the context passed in by the user in OCILobRead call
- * bufp (IN) - the buffer containing the read data
- * len  (IN) - the length of the data in the buffer that is relevant
- * piece (IN) - one of the following, OCI_FIRST_PIECE, OCI_NEXT_PIECE
- */
-
-typedef sb4 (*OCICallbackLobWrite)(/*_ dvoid *ctxp,
-                                       dvoid *bufp,
-                                       ub4 *lenp,
-                                       ub1 *piece _*/);
-
-/*
- * Called multiple times when the data is being written to the pipe
- * ctxp (IN) - is the context passed in by the user in OCILobRead call
- * bufp (IN/OUT) - the buffer into which the data to be written is copied
- * lenp  (OUT) - the length of the data in the buffer that is relevant
- * piece (OUT) - one of the following, OCI_NEXT_PIECE or OCI_LAST_PIECE
- */
-
-/*--------------------------Failover Callback Structure ---------------------*/
-typedef sb4 (*OCICallbackFailover)(/*_ dvoid *svcctx, dvoid *envctx,
-                                       dvoid *fo_ctx, ub4 fo_type,
-                                       ub4 fo_event _*/);
-/* Called at failover time if client has registered it. */
-typedef struct
-{
-  OCICallbackFailover callback_function;
-  dvoid *fo_ctx;
-} 
-OCIFocbkStruct;
-
-
-
-sword   OCIInitialize(/*_ ub4 mode, dvoid *ctxp,
-                          dvoid *(*malocfp)(dvoid *ctxp, size_t size),
-                          dvoid *(*ralocfp)(dvoid *ctxp, dvoid *memptr,
-                                            size_t newsize),
-                          void (*mfreefp)(dvoid *ctxp, dvoid *memptr) _*/);
-
-sword   OCITerminate(ub4 mode);
-
-sword   OCIEnvCreate (/*_ OCIEnv **envp, ub4 mode, dvoid *ctxp,
-                 dvoid *(*malocfp)(dvoid *ctxp, size_t size),
-                 dvoid *(*ralocfp)(dvoid *ctxp, dvoid *memptr, size_t newsize),
-                 void   (*mfreefp)(dvoid *ctxp, dvoid *memptr),
-                 size_t xtramem_sz, dvoid **usrmempp _*/);
-
-sword   OCIEnvNlsCreate (/*_ OCIEnv **envp, ub4 mode, dvoid *ctxp,
-                 dvoid *(*malocfp)(dvoid *ctxp, size_t size),
-                 dvoid *(*ralocfp)(dvoid *ctxp, dvoid *memptr, size_t newsize),
-                 void   (*mfreefp)(dvoid *ctxp, dvoid *memptr),
-                 size_t xtramem_sz, dvoid **usrmempp,
-                 ub2 charset, ub2 ncharset _*/);
-
-sword   OCIFEnvCreate (/*_ OCIEnv **envp, ub4 mode, dvoid *ctxp,
-                 dvoid *(*malocfp)(dvoid *ctxp, size_t size),
-                 dvoid *(*ralocfp)(dvoid *ctxp, dvoid *memptr, size_t newsize),
-                 void   (*mfreefp)(dvoid *ctxp, dvoid *memptr),
-                 size_t xtramem_sz, dvoid **usrmempp, dvoid *fupg _*/);
-
-sword   OCIHandleAlloc(/*_ CONST dvoid *parenth, dvoid **hndlpp, 
-                           CONST ub4 type, CONST size_t xtramem_sz,
-                           dvoid **usrmempp _*/);
-
-sword   OCIHandleFree(/*_ dvoid *hndlp, CONST ub4 type _*/);
-
-sword   OCIDescriptorAlloc(/*_ CONST dvoid *parenth, dvoid **descpp, 
-                               CONST ub4 type, CONST size_t xtramem_sz, 
-                               dvoid **usrmempp _*/);
-
-sword   OCIDescriptorFree(/*_ dvoid *descp, CONST ub4 type _*/);
-
-sword   OCIEnvInit(/*_ OCIEnv **envp, ub4 mode,
-                       size_t xtramem_sz, dvoid **usrmempp _*/);
-
-sword   OCIServerAttach(/*_ OCIServer *srvhp, OCIError *errhp,
-                            CONST OraText *dblink, sb4 dblink_len, 
-                            ub4 mode _*/);
-
-sword   OCIServerDetach(/*_ OCIServer *srvhp, OCIError *errhp, ub4 mode _*/);
-
-sword   OCISessionBegin(/*_ OCISvcCtx *svchp, OCIError *errhp,
-                            OCISession *usrhp, ub4 credt, ub4 mode _*/);
-
-sword   OCISessionEnd(/*_ OCISvcCtx *svchp, OCIError *errhp,
-                          OCISession *usrhp, ub4 mode _*/);
-
-sword OCILogon       (/*_ OCIEnv *envhp, OCIError *errhp, OCISvcCtx **svchp, 
-			CONST OraText *username, ub4 uname_len, 
-			CONST OraText *password, ub4 passwd_len, 
-			CONST OraText *dbname, ub4 dbname_len _*/);
-
-sword OCILogon2       (/*_ OCIEnv *envhp, OCIError *errhp, OCISvcCtx **svchp,
-                        CONST OraText *username, ub4 uname_len,
-                        CONST OraText *password, ub4 passwd_len,
-                        CONST OraText *dbname, ub4 dbname_len,
-                        ub4 mode _*/);
-
-sword OCILogoff      (/*_ OCISvcCtx *svchp, OCIError *errhp _*/);
-
-sword OCIPasswordChange (/*_ OCISvcCtx *svchp, OCIError *errhp,
-                           CONST OraText *user_name, ub4 usernm_len,
-                           CONST OraText *opasswd, ub4 opasswd_len,
-                           CONST OraText *npasswd, ub4 npasswd_len, 
-                            ub4 mode _*/);
-
-sword   OCIStmtPrepare(/*_ OCIStmt *stmtp, OCIError *errhp, CONST OraText *stmt,
-                           ub4 stmt_len, ub4 language, ub4 mode _*/);
-
-sword OCIStmtPrepare2 (/*_ OCISvcCtx *svchp, OCIStmt **stmtp, OCIError *errhp,
-                     CONST OraText *stmt, ub4 stmt_len, CONST OraText *key,
-                     ub4 key_len, ub4 language, ub4 mode _*/);
-
-sword OCIStmtRelease (/*_ OCIStmt *stmtp, OCIError *errhp, CONST OraText *key,
-                       ub4 key_len, ub4 mode _*/);
-
-#if !defined(__STDC__) && !defined(__cplusplus)
-sword OCIBindByPos   (/*_ OCIStmt *stmtp, OCIBind **bindp, OCIError *errhp,
-			ub4 position, dvoid *valuep, sb4 value_sz,
-			ub2 dty, dvoid *indp, ub2 *alenp, ub2 *rcodep,
-			ub4 maxarr_len, ub4 *curelep, ub4 mode _*/);
-#endif /* __STDC__ */
-
-#if !defined(__STDC__) && !defined(__cplusplus)
-sword OCIBindByName  (/*_ OCIStmt *stmtp, OCIBind **bindp, OCIError *errhp,
-			CONST OraText *placeholder, sb4 placeh_len, 
-                        dvoid *valuep, sb4 value_sz, ub2 dty, 
-                        dvoid *indp, ub2 *alenp, ub2 *rcodep, 
-                        ub4 maxarr_len, ub4 *curelep, ub4 mode _*/);
-#endif /* __STDC__ */
-
-sword   OCIBindObject(/*_ OCIBind *bindp, OCIError *errhp,
-                          CONST OCIType *type, dvoid **pgvpp,
-                          ub4 *pvszsp, dvoid **indpp, ub4 *indszp _*/);
-
-sword   OCIBindDynamic(/*_ OCIBind *bindp, OCIError *errhp,
-                           dvoid *ictxp, OCICallbackInBind icbfp,
-                           dvoid *octxp, OCICallbackOutBind ocbfp _*/);
-
-sword   OCIBindArrayOfStruct(/*_ OCIBind *bindp, OCIError *errhp, ub4 pvskip,
-                                 ub4 indskip, ub4 alskip, ub4 rcskip _*/);
-
-sword   OCIStmtGetPieceInfo(/*_ OCIStmt *stmtp, OCIError *errhp,
-                                dvoid **hndlpp, ub4 *typep, ub1 *in_outp,
-                                ub4 *iterp, ub4 *idxp, ub1 *piecep _*/);
-
-#if !defined(__STDC__) && !defined(__cplusplus)
-sword   OCIStmtSetPieceInfo(/*_ dvoid *hndlp, ub4 type, OCIError *errhp,
-                                CONST dvoid *bufp, ub4 *alenp, ub1 piece,
-                                CONST dvoid *indp, ub2 *rcodep _*/);
-#endif /* __STDC__ */
-
-sword   OCIStmtExecute(/*_ OCISvcCtx *svchp, OCIStmt *stmtp, OCIError *errhp,
-                           ub4 iters, ub4 rowoff, CONST OCISnapshot *snap_in,
-                           OCISnapshot *snap_out, ub4 mode _*/);
-
-#if !defined(__STDC__) && !defined(__cplusplus)
-sword OCIDefineByPos (/*_ OCIStmt *stmtp, OCIDefine **defnp, OCIError *errhp,
-			ub4 position, dvoid *valuep, sb4 value_sz, ub2 dty,
-			dvoid *indp, ub2 *rlenp, ub2 *rcodep, ub4 mode _*/);
-#endif /* __STDC__ */
-
-sword   OCIDefineObject(/*_ OCIDefine *defnp, OCIError *errhp,
-                            CONST OCIType *type, dvoid **pgvpp,
-                            ub4 *pvszsp, dvoid **indpp, ub4 *indszp _*/);
-
-sword   OCIDefineDynamic(/*_ OCIDefine *defnp, OCIError *errhp,
-                             dvoid *octxp, OCICallbackDefine ocbfp _*/);
-
-sword   OCIDefineArrayOfStruct(/*_ OCIDefine *defnp, OCIError *errhp, 
-                                 ub4 pvskip, ub4 indskip, ub4 rlskip, 
-                                 ub4 rcskip _*/);
-
-#if !defined(__STDC__) && !defined(__cplusplus)
-sword   OCIStmtFetch(/*_ OCIStmt *stmtp, OCIError *errhp,
-                         ub4 nrows, ub2 orientation, ub4 mode _*/);
-#endif /* __STDC__ */
-
-#if !defined(__STDC__) && !defined(__cplusplus)
-sword   OCIStmtFetch2(/*_ OCIStmt *stmtp, OCIError *errhp,
-                         ub4 nrows, ub2 orientation, sb4 scrollOffset, ub4 mode _*/);
-#endif /* __STDC__ */
-
-sword   OCIStmtGetBindInfo(/*_ OCIStmt *stmtp, OCIError *errhp, ub4 size, 
-                               ub4 startloc, sb4 *found, 
-                               OraText *bvnp[], ub1 bvnl[], OraText *invp[],
-                               ub1 inpl[], ub1 dupl[], OCIBind *hndl[] _*/);
-
-#if !defined(__STDC__) && !defined(__cplusplus)
-sword   OCIDescribeAny(/*_ OCISvcCtx *svchp, OCIError *errhp,
-                           dvoid *objptr, ub4 objnm_len, ub1 objptr_typ,
-                           ub1 info_level, ub1 objtyp, OCIDescribe *dschp _*/);
-#endif /* __STDC__ */
-
-sword   OCIParamGet(/*_ CONST dvoid *hndlp, ub4 htype, OCIError *errhp,
-                        dvoid **parmdpp, ub4 pos _*/);
-
-sword   OCIParamSet(/*_ dvoid *hdlp, ub4 htyp, OCIError *errhp,
-                        CONST dvoid *dscp, ub4 dtyp, ub4 pos _*/);
-
-sword   OCITransStart(/*_ OCISvcCtx *svchp, OCIError *errhp,
-                          uword timeout, ub4 flags _*/);
-
-sword   OCITransDetach(/*_ OCISvcCtx *svchp, OCIError *errhp, ub4 flags _*/);
-
-sword   OCITransCommit(/*_ OCISvcCtx *svchp, OCIError *errhp, ub4 flags _*/);
-
-sword   OCITransRollback(/*_ OCISvcCtx *svchp, OCIError *errhp, ub4 flags _*/);
-
-sword   OCITransPrepare (/*_ OCISvcCtx *svchp, OCIError *errhp, ub4 flags _*/);
-
-sword   OCITransMultiPrepare (/*_ OCISvcCtx *svchp, ub4 numBranches, 
-                                  OCITrans **txns, OCIError **errhp _*/);
-
-sword   OCITransForget ( /*_ OCISvcCtx *svchp, OCIError *errhp, ub4 flags _*/);
-
-sword   OCIErrorGet   ( /*_ dvoid *hndlp, ub4 recordno, OraText *sqlstate,
-			    sb4 *errcodep, OraText *bufp, ub4 bufsiz, 
-			    ub4 type _*/ );
-
-sword   OCILobAppend  ( /*_ OCISvcCtx *svchp, OCIError *errhp, 
-                            OCILobLocator *dst_locp,
-                            OCILobLocator *src_locp _*/ );
-
-sword   OCILobAssign  ( /*_ OCIEnv *envhp, OCIError *errhp, 
-                            CONST OCILobLocator *src_locp, 
-                            OCILobLocator **dst_locpp _*/ );
-
-sword   OCILobCharSetForm  ( /*_ OCIEnv *envhp, OCIError *errhp, 
-                                 CONST OCILobLocator *locp, 
-                                 ub1 *csfrm _*/ );
-
-sword   OCILobCharSetId ( /*_ OCIEnv *envhp, OCIError *errhp, 
-                              CONST OCILobLocator *locp, ub2 *csid _*/ );
-
-sword   OCILobCopy  ( /*_ OCISvcCtx *svchp, OCIError *errhp, 
-                          OCILobLocator *dst_locp,
-		          OCILobLocator *src_locp, 
-                          ub4 amount, ub4 dst_offset, 
-                          ub4 src_offset _*/ );
-
-#if !defined(__STDC__) && !defined(__cplusplus)
-sword OCILobCreateTemporary(/*_ OCISvcCtx          *svchp,
-                            OCIError           *errhp,
-                            OCILobLocator      *locp,
-                            ub2                 csid,
-                            ub1                 csfrm,
-                            ub1                 lobtype,
-                            boolean             cache,
-                            OCIDuration         duration _*/);
-#endif /* __STDC__ */
-
-sword OCILobClose( /*_ OCISvcCtx        *svchp,
-                       OCIError         *errhp,
-                       OCILobLocator    *locp _*/);
-
-
-sword   OCILobDisableBuffering ( /*_ OCISvcCtx      *svchp,
-                                     OCIError       *errhp,
-                                     OCILobLocator  *locp _*/ );
-
-sword   OCILobEnableBuffering ( /*_ OCISvcCtx      *svchp,
-                                    OCIError       *errhp,
-                                    OCILobLocator  *locp _*/ );
-
-sword   OCILobErase  ( /*_ OCISvcCtx *svchp, OCIError *errhp, 
-                           OCILobLocator *locp,
-                           ub4 *amount, ub4 offset _*/ );
-
-sword   OCILobFileClose  ( /*_ OCISvcCtx *svchp, OCIError *errhp, 
-                               OCILobLocator *filep _*/ );
-
-sword   OCILobFileCloseAll (/*_ OCISvcCtx *svchp, OCIError *errhp _*/);
-
-sword   OCILobFileExists   (/*_ OCISvcCtx *svchp, OCIError *errhp, 
-			      OCILobLocator *filep,
-			      boolean *flag _*/);
- 
-sword   OCILobFileGetName  ( /*_ OCIEnv *envhp, OCIError *errhp, 
-                                 CONST OCILobLocator *filep,
-                                 OraText *dir_alias, ub2 *d_length, 
-                                 OraText *filename, ub2 *f_length _*/ );
-                            
-sword   OCILobFileIsOpen  (/*_ OCISvcCtx *svchp, OCIError *errhp, 
-                               OCILobLocator *filep,
-                               boolean *flag _*/);
-
-#if !defined(__STDC__) && !defined(__cplusplus)
-sword   OCILobFileOpen  ( /*_ OCISvcCtx *svchp, OCIError *errhp, 
-                            OCILobLocator *filep, ub1 mode _*/ );
-#endif /* __STDC__ */
-
-#if !defined(__STDC__) && !defined(__cplusplus)
-sword   OCILobFileSetName  ( /*_ OCIEnv *envhp, OCIError *errhp, 
-                                 OCILobLocator **filepp, 
-                                 CONST OraText *dir_alias, ub2 d_length, 
-                                 CONST OraText *filename, ub2 f_length _*/ );
-#endif /* __STDC__ */
-
-sword   OCILobFlushBuffer ( /*_ OCISvcCtx       *svchp,
-                                OCIError        *errhp,
-                                OCILobLocator   *locp,
-                                ub4              flag _*/ );
-
-sword OCILobFreeTemporary(/*_ OCISvcCtx          *svchp,
-                              OCIError           *errhp,
-                              OCILobLocator      *locp _*/);
-
-
-sword OCILobGetChunkSize(/*_ OCISvcCtx         *svchp,
-                             OCIError          *errhp,
-                             OCILobLocator     *locp,
-                             ub4               *chunksizep _*/);
-
-sword   OCILobGetLength  ( /*_ OCISvcCtx *svchp, OCIError *errhp, 
-                               OCILobLocator *locp,
-		               ub4 *lenp _*/ );
-
-sword   OCILobIsEqual  ( /*_ OCIEnv *envhp, CONST OCILobLocator *x, 
-                             CONST OCILobLocator *y, boolean *is_equal _*/ );
-
-sword OCILobIsOpen(/*_ OCISvcCtx     *svchp,
-                       OCIError      *errhp,
-                       OCILobLocator *locp,
-                       boolean       *flag _*/);
-
-sword OCILobIsTemporary(/*_ OCIEnv            *envp,
-                            OCIError          *errhp,
-                            OCILobLocator     *locp,
-                            boolean           *is_temporary _*/);
-
-sword   OCILobLoadFromFile  ( /*_ OCISvcCtx *svchp, OCIError *errhp, 
-                                  OCILobLocator *dst_locp,
-       	                          OCILobLocator *src_filep, 
-                                  ub4 amount, ub4 dst_offset, 
-                                  ub4 src_offset _*/ );
-
-sword   OCILobLocatorAssign  ( /*_ OCISvcCtx *svchp, OCIError *errhp, 
-                            CONST OCILobLocator *src_locp, 
-                            OCILobLocator **dst_locpp _*/ );
-
-
-sword   OCILobLocatorIsInit ( /*_ OCIEnv *envhp, OCIError *errhp, 
-                                CONST OCILobLocator *locp, 
-                                boolean *is_initialized _*/ );
-#if !defined(__STDC__) && !defined(__cplusplus)
-sword   OCILobOpen(/*_ OCISvcCtx        *svchp,
-                       OCIError         *errhp,
-                       OCILobLocator    *locp,
-                       ub1               mode _*/);
-#endif /* __STDC__ */
-
-#if !defined(__STDC__) && !defined(__cplusplus)
-sword   OCILobRead  ( /*_ OCISvcCtx *svchp, OCIError *errhp, 
-                          OCILobLocator *locp,
-                          ub4 *amtp, ub4 offset, dvoid *bufp, ub4 bufl, 
-                          dvoid *ctxp, 
-                          sb4 (*cbfp)( dvoid *ctxp, 
-                                       CONST dvoid *bufp, 
-                                       ub4 len, 
-                                       ub1 piece),
-                          ub2 csid, ub1 csfrm _*/ );
-#endif /* __STDC__ */
-
-sword   OCILobTrim  ( /*_ OCISvcCtx *svchp, OCIError *errhp, 
-                          OCILobLocator *locp,
-                          ub4 newlen _*/ );
-
-#if !defined(__STDC__) && !defined(__cplusplus)
-sword   OCILobWrite  ( /*_ OCISvcCtx *svchp, OCIError *errhp, 
-                         OCILobLocator *locp,
-                         ub4 *amtp, ub4 offset, dvoid *bufp, ub4 buflen, 
-                         ub1 piece, dvoid *ctxp, 
-                         sb4 (*cbfp)(dvoid *ctxp, 
-                                     dvoid *bufp, 
-                                     ub4 *len, 
-                                     ub1 *piece),
-                         ub2 csid, ub1 csfrm _*/ );
-#endif /* __STDC__ */
-
-#if !defined(__STDC__) && !defined(__cplusplus)
-sword OCILobWriteAppend(/*_
-OCISvcCtx         *svchp,
-OCIError          *errhp,
-OCILobLocator     *lobp,
-ub4              *amtp,
-dvoid            *bufp,
-ub4               bufl,
-ub1               piece,
-dvoid            *ctxp,
-sb4             (*cbfp)(dvoid  *ctxp,
-                        dvoid  *bufp,
-                        ub4    *len,
-                        ub1    *piece),
-ub2               csid,
-ub1               csfrm _*/);
-#endif /* __STDC__ */
-
-sword   OCIBreak ( /*_ dvoid *hndlp, OCIError *errhp _*/ );
-
-sword   OCIReset ( /*_ dvoid *hndlp, OCIError *errhp _*/ );
-
-#if !defined(__STDC__) && !defined(__cplusplus)
-sword   OCIServerVersion  ( /*_ dvoid *hndlp, OCIError *errhp, OraText *bufp, 
-                                ub4 bufsz, ub1 hndltype _*/ );
-
-sword   OCIServerRelease  ( /*_ dvoid *hndlp, OCIError *errhp, OraText *bufp,
-                                ub4 bufsz, ub1 hndltype, ub4 *version _*/ );
-
-#endif /* __STDC__ */
-
-sword   OCIAttrGet ( /*_ CONST dvoid *trgthndlp, ub4 trghndltyp, 
-                         dvoid *attributep, ub4 *sizep, ub4 attrtype, 
-                         OCIError *errhp _*/ );
-
-sword   OCIAttrSet ( /*_ dvoid *trgthndlp, ub4 trghndltyp, dvoid *attributep,
-                         ub4 size, ub4 attrtype, OCIError *errhp _*/ );
-
-sword   OCISvcCtxToLda ( /*_ OCISvcCtx *svchp, OCIError *errhp, 
-                             Lda_Def *ldap _*/ );
-
-sword   OCILdaToSvcCtx ( /*_ OCISvcCtx **svchpp, OCIError *errhp, 
-                             Lda_Def *ldap _*/ );
-
-sword   OCIResultSetToStmt ( /*_ OCIResult *rsetdp, OCIError *errhp _*/ );
-
-
-sword	OCIUserCallbackRegister(/*_ dvoid *hndlp, ub4 type, dvoid *ehndlp,
-                                    OCIUserCallback callback, dvoid *ctxp,
-                                    ub4 fcode, ub4 when, OCIUcb *ucbDesc _*/);
-
-sword	OCIUserCallbackGet(/*_ dvoid *hndlp, ub4 type, dvoid *ehndlp,
-                               ub4 fcode, ub4 when, OCIUserCallback *callbackp,
-                               dvoid **ctxpp, OCIUcb *ucbDesc _*/);
-
-sword   OCISharedLibInit(/*_ dvoid *metaCtx, dvoid *libCtx, ub4 argfmt,
-                             sword argc, dvoid *argv[],
-                             OCIEnvCallbackType envCallback _*/);
-
-sword   OCISecurityInitialize (/*_ OCISecurity *osshandle,
-                                 OCIError *error_handle _*/);
-
-sword   OCISecurityTerminate (/*_ OCISecurity *osshandle,
-				OCIError *error_handle _*/);
-
-sword OCISecurityOpenWallet(/*_ OCISecurity *osshandle,
-			      OCIError *error_handle,
-			      size_t wrllen,
-			      OraText *wallet_resource_locator,
-			      size_t pwdlen,
-			      OraText *password,
-			      nzttWallet *wallet _*/);
-
-sword OCISecurityCloseWallet(/*_ OCISecurity *osshandle,
-			       OCIError *error_handle,
-			       nzttWallet *wallet _*/);
-
-sword OCISecurityCreateWallet(/*_ OCISecurity *osshandle,
-				OCIError *error_handle,
-				size_t wrllen,
-				OraText *wallet_resource_locator,
-				size_t pwdlen,
-				OraText *password,
-				nzttWallet *wallet _*/);
-
-sword OCISecurityDestroyWallet(/*_ OCISecurity *osshandle,
-				 OCIError *error_handle,
-				 size_t wrllen,
-				 OraText *wallet_resource_locator,
-				 size_t pwdlen,
-				 OraText *password _*/);
-
-sword OCISecurityStorePersona(/*_ OCISecurity *osshandle,
-				OCIError *error_handle,
-				nzttPersona **persona,
-				nzttWallet *wallet _*/);
-
-sword OCISecurityOpenPersona(/*_ OCISecurity *osshandle,
-			       OCIError *error_handle,
-			       nzttPersona *persona _*/);
-
-sword OCISecurityClosePersona(/*_ OCISecurity *osshandle,
-				OCIError *error_handle,
-				nzttPersona *persona _*/);
-
-sword OCISecurityRemovePersona(/*_ OCISecurity *osshandle,
-				 OCIError *error_handle,
-				 nzttPersona **persona _*/);
-
-sword OCISecurityCreatePersona(/*_ OCISecurity *osshandle,
-				 OCIError *error_handle,
-				 nzttIdentType identity_type,
-				 nzttCipherType cipher_type,
-				 nzttPersonaDesc *desc,
-				 nzttPersona **persona _*/);
-
-sword OCISecuritySetProtection(/*_ OCISecurity *osshandle,
-				 OCIError *error_handle,
-				 nzttPersona *persona,
-				 nzttcef crypto_engine_function,
-				 nztttdufmt data_unit_format,
-				 nzttProtInfo *protection_info _*/);
-
-sword OCISecurityGetProtection(/*_ OCISecurity *osshandle,
-				 OCIError *error_handle,
-				 nzttPersona *persona,
-				 nzttcef crypto_engine_function,
-				 nztttdufmt * data_unit_format_ptr,
-				 nzttProtInfo *protection_info _*/);
-
-sword OCISecurityRemoveIdentity(/*_ OCISecurity *osshandle,
-				  OCIError *error_handle,
-				  nzttIdentity **identity_ptr _*/);
-
-sword OCISecurityCreateIdentity(/*_ OCISecurity *osshandle,
-				  OCIError *error_handle,
-				  nzttIdentType type,
-				  nzttIdentityDesc *desc,
-				  nzttIdentity **identity_ptr _*/);
-
-sword OCISecurityAbortIdentity(/*_ OCISecurity *osshandle,
-				 OCIError *error_handle,
-				 nzttIdentity **identity_ptr _*/);
-
-sword OCISecurityFreeIdentity(/*_ OCISecurity *osshandle,
-			       	  OCIError *error_handle,
-				  nzttIdentity **identity_ptr _*/);
-
-sword OCISecurityStoreTrustedIdentity(/*_ OCISecurity *osshandle,
-					OCIError *error_handle,
-					nzttIdentity **identity_ptr,
-					nzttPersona *persona _*/);
-
-sword OCISecuritySign(/*_ OCISecurity *osshandle,
-			OCIError *error_handle,
-			nzttPersona *persona,
-			nzttces signature_state,
-			size_t input_length,
-			ub1 *input,
-			nzttBufferBlock *buffer_block _*/);
-
-sword OCISecuritySignExpansion(/*_ OCISecurity *osshandle,
-				 OCIError *error_handle,
-				 nzttPersona *persona,
-				 size_t inputlen,
-				 size_t *signature_length _*/);
-
-sword OCISecurityVerify(/*_ OCISecurity *osshandle,
-			  OCIError *error_handle,
-			  nzttPersona *persona,
-			  nzttces signature_state,
-			  size_t siglen,
-			  ub1 *signature,
-			  nzttBufferBlock *extracted_message,
-			  boolean *verified,
-			  boolean *validated,
-			  nzttIdentity **signing_party_identity _*/);
-
-sword OCISecurityValidate(/*_ OCISecurity *osshandle,
-			    OCIError *error_handle,
-			    nzttPersona *persona,
-			    nzttIdentity *identity,
-			    boolean *validated _*/);
-
-sword OCISecuritySignDetached(/*_ OCISecurity *osshandle,
-				OCIError *error_handle,
-				nzttPersona *persona,
-				nzttces signature_state,
-				size_t input_length,
-				ub1 * input,
-				nzttBufferBlock *signature _*/);
-
-sword OCISecuritySignDetExpansion(/*_ OCISecurity *osshandle,
-				    OCIError    *error_handle,
-				    nzttPersona *persona,
-				    size_t       input_length,
-				    size_t *required_buffer_length _*/);
-
-sword OCISecurityVerifyDetached(/*_ OCISecurity *osshandle,
-				  OCIError *error_handle,
-				  nzttPersona *persona,
-				  nzttces signature_state,
-				  size_t data_length,
-				  ub1 *data,
-				  size_t siglen,
-				  ub1 *signature,
-				  boolean *verified,
-				  boolean *validated,
-				  nzttIdentity **signing_party_identity _*/);
-
-sword OCISecurity_PKEncrypt(/*_ OCISecurity *osshandle,
-			      OCIError *error_handle,
-			      nzttPersona *persona,
-			      size_t number_of_recipients,
-			      nzttIdentity *recipient_list,
-			      nzttces encryption_state,
-			      size_t input_length,
-			      ub1 *input,
-			      nzttBufferBlock *encrypted_data _*/);
-
-sword OCISecurityPKEncryptExpansion(/*_ OCISecurity *osshandle,
-				      OCIError *error_handle,
-				      nzttPersona *persona,
-				      size_t number_recipients,
-				      size_t input_length,
-				      size_t *buffer_length_required _*/);
-
-sword OCISecurityPKDecrypt(/*_ OCISecurity *osshandle,
-			     OCIError *error_handle,
-			     nzttPersona *persona,
-			     nzttces encryption_state,
-			     size_t input_length,
-			     ub1 *input,
-			     nzttBufferBlock *encrypted_data _*/);
-
-sword OCISecurityEncrypt(/*_ OCISecurity *osshandle,
-			   OCIError *error_handle,
-			   nzttPersona *persona,
-			   nzttces encryption_state,
-			   size_t input_length,
-			   ub1 *input,
-			   nzttBufferBlock *encrypted_data _*/);
-
-sword OCISecurityEncryptExpansion(/*_ OCISecurity *osshandle,
-				    OCIError *error_handle,
-				    nzttPersona *persona,
-				    size_t input_length,
-				    size_t *encrypted_data_length _*/);
-
-sword OCISecurityDecrypt(/*_ OCISecurity *osshandle,
-			   OCIError *error_handle,
-			   nzttPersona *persona,
-			   nzttces decryption_state,
-			   size_t input_length,
-			   ub1 *input,
-			   nzttBufferBlock *decrypted_data _*/);
-
-sword OCISecurityEnvelope(/*_ OCISecurity *osshandle,
-			    OCIError *error_handle,
-			    nzttPersona *persona,
-			    size_t number_of_recipients,
-			    nzttIdentity *identity,
-			    nzttces encryption_state,
-			    size_t input_length,
-			    ub1 *input,
-			    nzttBufferBlock *enveloped_data _*/);
-
-sword OCISecurityDeEnvelope(/*_ OCISecurity *osshandle,
-                                OCIError *error_handle,
-                                nzttPersona *persona,
-                                nzttces decryption_state,
-                                size_t input_length,
-                                ub1 *input,
-                                nzttBufferBlock *output_message,
-                                boolean *verified,
-                                boolean *validated,
-                                nzttIdentity **sender_identity _*/);
-
-sword OCISecurityKeyedHash(/*_ OCISecurity *osshandle,
-			     OCIError *error_handle,
-			     nzttPersona *persona,
-			     nzttces hash_state,
-			     size_t input_length,
-			     ub1 *input,
-			     nzttBufferBlock *keyed_hash _*/);
-
-sword OCISecurityKeyedHashExpansion(/*_ OCISecurity *osshandle,
-				      OCIError *error_handle,
-				      nzttPersona *persona,
-				      size_t input_length,
-				      size_t *required_buffer_length _*/);
-
-sword OCISecurityHash(/*_ OCISecurity *osshandle,
-			OCIError *error_handle,
-			nzttPersona *persona,
-			nzttces hash_state,
-			size_t input,
-			ub1 *input_length,
-			nzttBufferBlock *hash _*/);
-
-sword OCISecurityHashExpansion(/*_ OCISecurity *osshandle,
-				 OCIError *error_handle,
-				 nzttPersona *persona,
-				 size_t input_length,
-				 size_t *required_buffer_length _*/);
-
-sword OCISecuritySeedRandom(/*_ OCISecurity *osshandle,
-			      OCIError *error_handle,
-			      nzttPersona *persona,
-			      size_t seed_length,
-			      ub1 *seed _*/);
-
-sword OCISecurityRandomBytes(/*_ OCISecurity *osshandle,
-			       OCIError *error_handle,
-			       nzttPersona *persona,
-			       size_t number_of_bytes_desired,
-			       nzttBufferBlock *random_bytes _*/);
-
-sword OCISecurityRandomNumber(/*_ OCISecurity *osshandle,
-				OCIError *error_handle,
-				nzttPersona *persona,
-				uword *random_number_ptr _*/);
-
-sword OCISecurityInitBlock(/*_ OCISecurity *osshandle,
-			     OCIError *error_handle,
-			     nzttBufferBlock *buffer_block _*/);
-
-sword OCISecurityReuseBlock(/*_ OCISecurity *osshandle,
-			      OCIError *error_handle,
-			      nzttBufferBlock *buffer_block _*/);
-
-sword OCISecurityPurgeBlock(/*_ OCISecurity *osshandle,
-			      OCIError *error_handle,
-			      nzttBufferBlock *buffer_block _*/);
-
-sword OCISecuritySetBlock(/*_ OCISecurity *osshandle,
-			    OCIError *error_handle,
-			    uword flags_to_set,
-			    size_t buffer_length,
-			    size_t used_buffer_length,
-			    ub1 *buffer,
-			    nzttBufferBlock *buffer_block _*/);
-
-sword OCISecurityGetIdentity(/*_ OCISecurity  *osshandle,
-			       OCIError       *error_handle,
-			       size_t          namelen,
-			       OraText           *distinguished_name,
-			       nzttIdentity  **identity _*/);
-
-sword OCIAQEnq(/*_ OCISvcCtx *svchp, OCIError *errhp, OraText *queue_name,
-                     OCIAQEnqOptions *enqopt, OCIAQMsgProperties *msgprop, 
-                     OCIType *payload_tdo,dvoid **payload, dvoid **payload_ind,
-		     OCIRaw **msgid, ub4 flags _*/);
-
-sword OCIAQDeq(/*_ OCISvcCtx *svchp, OCIError *errhp, OraText *queue_name,
-		     OCIAQDeqOptions *deqopt, OCIAQMsgProperties *msgprop, 
-                     OCIType *payload_tdo,dvoid **payload, dvoid **payload_ind,
-		     OCIRaw **msgid, ub4 flags _*/);
-
-sword OCIAQListen(/*_ OCISvcCtx *svchp, OCIError *errhp, 
-		      OCIAQAgent **agent_list, ub4 num_agents,
-		      sb4 wait, OCIAQAgent **agent,
-		      ub4 flags _*/);
-
-sword OCIExtractInit(/*_ dvoid *hndl, OCIError *err _*/);
-
-sword OCIExtractTerm(/*_ dvoid *hndl, OCIError *err _*/);
-
-sword OCIExtractReset(/*_ dvoid *hndl, OCIError *err _*/);
-
-sword OCIExtractSetNumKeys(/*_ dvoid *hndl, OCIError *err, uword numkeys _*/);
-
-sword OCIExtractSetKey(/*_ dvoid *hndl, OCIError *err, CONST OraText *name, 
-                           ub1 type, ub4 flag, CONST dvoid *defval, 
-                           CONST sb4 *intrange, 
-                           CONST OraText *CONST *strlist _*/);
-
-sword OCIExtractFromFile(/*_ dvoid *hndl, OCIError *err, ub4 flag, 
-                             OraText *filename _*/);
-
-sword OCIExtractFromStr(/*_ dvoid *hndl, OCIError *err, ub4 flag, 
-                               OraText *input _*/);
-
-sword OCIExtractToInt(/*_ dvoid *hndl, OCIError *err, OraText *keyname, 
-                          uword valno, sb4 *retval _*/);
-
-sword OCIExtractToBool(/*_ dvoid *hndl, OCIError *err, OraText *keyname, 
-                           uword valno, ub1 *retval _*/);
-
-sword OCIExtractToStr(/*_ dvoid *hndl, OCIError *err, OraText *keyname, 
-                          uword valno, OraText *retval, uword buflen _*/);
-
-sword OCIExtractToOCINum(/*_ dvoid *hndl, OCIError *err, OraText *keyname, 
-                             uword valno, OCINumber *retval _*/);
-
-sword OCIExtractToList(/*_ dvoid *hndl, OCIError *err, uword *numkeys _*/);
-
-sword OCIExtractFromList(/*_ dvoid *hndl, OCIError *err, uword index, 
-                             OraText **name, ub1 *type, uword *numvals, 
-                             dvoid ***values _*/);
-
-/* Memory Related Service Interfaces */
-
-sword OCIMemoryAlloc(/*_ dvoid *hdl, OCIError *err, dvoid **mem,
-		OCIDuration dur, ub4 size, ub4 flags _*/);
- 
-sword OCIMemoryResize(/*_ dvoid *hdl, OCIError *err, dvoid **mem,
-                        ub4 newsize, ub4 flags _*/);
-
-sword OCIMemoryFree(/*_ dvoid *hdl, OCIError *err, dvoid *mem _*/);
-
-sword OCIContextSetValue(/*_ dvoid *hdl, OCIError *err, OCIDuration duration,
-                        ub1 *key, ub1 keylen, dvoid *ctx_value _*/);
- 
-sword OCIContextGetValue(/*_ dvoid *hdl, OCIError *err, ub1 *key,
-                        ub1 keylen, dvoid **ctx_value _*/);
- 
-sword OCIContextClearValue(/*_ dvoid *hdl, OCIError *err, ub1 *key, 
-                        ub1 keylen _*/);
- 
-sword OCIContextGenerateKey(/*_ dvoid *hdl, OCIError *err, ub4 *key _*/);
-
-sword OCIMemorySetCurrentIDs(/*_ dvoid *hdl, OCIError *err, 
-        ub4 curr_session_id, ub4 curr_trans_id, ub4 curr_stmt_id _*/);
- 
-sword OCIPicklerTdsCtxInit(/*_ OCIEnv *env, OCIError *err, 
-			OCIPicklerTdsCtx **tdsc _*/);
- 
-sword OCIPicklerTdsCtxFree(/*_ OCIEnv *env, OCIError *err, 
-			OCIPicklerTdsCtx *tdsc _*/);
- 
-sword OCIPicklerTdsInit(/*_ OCIEnv *env, OCIError *err, OCIPicklerTdsCtx *tdsc,
-			OCIPicklerTds **tdsh _*/);
- 
-sword OCIPicklerTdsFree(/*_ OCIEnv *env, OCIError *err, 
-			OCIPicklerTds *tdsh _*/);
- 
-sword OCIPicklerTdsCreateElementNumber(/*_ OCIEnv *env, OCIError *err,
-                                           OCIPicklerTds *tdsh, ub1 prec,
-                                           sb1 scale, 
-                                           OCIPicklerTdsElement *elt _*/);
- 
-sword OCIPicklerTdsCreateElementChar(/*_ OCIEnv *env, OCIError *err,
-                                         OCIPicklerTds *tdsh, ub2 len, 
-                                         OCIPicklerTdsElement *elt _*/);
- 
-sword OCIPicklerTdsCreateElementVarchar(/*_ OCIEnv *env, OCIError *err,
-                                            OCIPicklerTds *tdsh, ub2 len, 
-                                            OCIPicklerTdsElement *elt _*/);
-
-sword OCIPicklerTdsCreateElementRaw(/*_ OCIEnv *env, OCIError *err,
-                                        OCIPicklerTds *tdsh, ub2 len, 
-                                        OCIPicklerTdsElement *elt _*/);
- 
-sword OCIPicklerTdsCreateElement(/*_ OCIEnv *env, OCIError *err,
-                                OCIPicklerTds *tdsh, OCITypeCode dty, 
-				OCIPicklerTdsElement *elt _*/);
- 
-sword OCIPicklerTdsAddAttr(/*_ OCIEnv *env, OCIError *err,
-                               OCIPicklerTds *tdsh, 
-                               OCIPicklerTdsElement elt _*/);
- 
-sword OCIPicklerTdsGenerate(/*_ OCIEnv *env, OCIError *err,
-                                OCIPicklerTds *tdsh _*/);
- 
-sword OCIPicklerTdsGetAttr(/*_ OCIEnv *env, OCIError *err,
-                                CONST OCIPicklerTds *tdsh, ub1  attrno,
-                                OCITypeCode *typ, ub2  *len _*/);
- 
-sword OCIPicklerFdoInit(/*_ OCIEnv *env, OCIError *err,
-                                OCIPicklerFdo **fdoh _*/);
- 
-sword OCIPicklerFdoFree(/*_ OCIEnv *env, OCIError *err,
-                                OCIPicklerFdo *fdoh _*/);
- 
-sword OCIPicklerImageInit(/*_ OCIEnv *env, OCIError *err,
-                              OCIPicklerFdo *fdoh, OCIPicklerTds *tdsh,
-                              OCIPicklerImage **imgh _*/);
- 
-sword OCIPicklerImageFree(/*_ OCIEnv *env, OCIError *err,
-                                OCIPicklerImage *imgh _*/);
- 
-sword OCIPicklerImageAddScalar(/*_ OCIEnv *env, OCIError *err,
-                                   OCIPicklerImage *imgh, dvoid *scalar, 
-                                   ub4 len _*/);
- 
-sword OCIPicklerImageAddNullScalar(/*_ OCIEnv *env, OCIError *err,
-                                OCIPicklerImage *imgh _*/);
- 
-sword OCIPicklerImageGenerate(/*_ OCIEnv *env, OCIError *err,
-                                OCIPicklerImage *imgh _*/);
- 
-sword OCIPicklerImageGetScalarSize(/*_ OCIEnv *env, OCIError *err,
-                                OCIPicklerImage *imgh, 
-				ub4  attrno, ub4  *size _*/);
- 
-sword OCIPicklerImageGetScalar(/*_ OCIEnv *env, OCIError *err,
-                                OCIPicklerImage *imgh, ub4  attrno, 
-				dvoid *buf, ub4  *len, OCIInd *ind _*/);
-
-sword OCIPicklerImageCollBegin(/*_ OCIEnv *env, OCIError *err,
-                OCIPicklerImage *imgh, CONST OCIPicklerTds *colltdsh _*/);
- 
-sword OCIPicklerImageCollAddScalar(/*_  OCIEnv *env, OCIError *err,
-                OCIPicklerImage *imgh, dvoid *scalar,
-                ub4 buflen, OCIInd ind _*/);
- 
-sword OCIPicklerImageCollEnd(/*_ OCIEnv *env, OCIError *err,
-                OCIPicklerImage *imgh _*/);
- 
-/* should take svcctx for locator stuff */
-sword OCIPicklerImageCollBeginScan(/*_ OCIEnv *env, OCIError *err,
-                OCIPicklerImage *imgh, CONST OCIPicklerTds *coll_tdsh,
-                ub4 attrnum, ub4 startidx, OCIInd *ind _*/);
- 
-sword OCIPicklerImageCollGetScalarSize(/*_ OCIEnv *env, OCIError *err,
-                CONST OCIPicklerTds *coll_tdsh, ub4 *size _*/);
- 
-sword OCIPicklerImageCollGetScalar(/*_ OCIEnv *env, OCIError *err,
-                                       OCIPicklerImage *imgh, dvoid *buf,
-                                       ub4 *buflen, OCIInd *ind _*/);
-
-sword OCIAnyDataGetType(/*_ OCISvcCtx *svchp, OCIError *errhp, OCIAnyData *sdata,
-        OCITypeCode *tc, OCIType **type _*/);
-
-sword OCIAnyDataIsNull(/*_ OCISvcCtx *svchp, OCIError *errhp, OCIAnyData *sdata,
-        boolean *isnull _*/);
-
-sword OCIAnyDataConvert(/*_ OCISvcCtx *svchp, OCIError *errhp, OCITypeCode tc,
-        OCIType *type, OCIDuration dur, dvoid *ind, dvoid *data_val,
-        ub4 len, OCIAnyData **sdata _*/);
-
-sword OCIAnyDataBeginCreate(/*_ OCISvcCtx *svchp, OCIError *errhp, OCITypeCode tc,
-        OCIType *type, OCIDuration dur, OCIAnyData **sdata _*/);
-
-sword OCIAnyDataDestroy(/*_ OCISvcCtx *svchp, OCIError *errhp, OCIAnyData *sdata _*/);
-
-sword OCIAnyDataAttrSet(/*_ OCISvcCtx *svchp, OCIError *errhp, OCIAnyData *sdata,
-        OCITypeCode tc, OCIType *type, dvoid *ind, dvoid *attr_val,
-        ub4 length, boolean is_any _*/);
-
-sword OCIAnyDataCollAddElem(/*_ OCISvcCtx *svchp, OCIError *errhp,
-        OCIAnyData *sdata, OCITypeCode tc, OCIType *type, dvoid *ind,
-        dvoid *attr_val, ub4 length, boolean is_any, boolean last_elem _*/);
-
-sword OCIAnyDataEndCreate(/*_ OCISvcCtx *svchp, OCIError *errhp, OCIAnyData *sdata _*/);
-
-sword OCIAnyDataAccess(/*_ OCISvcCtx *svchp, OCIError *errhp, OCIAnyData *sdata,
-        OCITypeCode tc, OCIType *type, dvoid *ind, dvoid **attr_val,
-        ub4 *length _*/);
-
-sword OCIAnyDataGetCurrAttrNum(/*_ OCISvcCtx *svchp, OCIError *errhp, 
-		OCIAnyData *sdata, ub4 *attrnum _*/);
-
-sword OCIAnyDataAttrGet(/*_ OCISvcCtx *svchp, OCIError *errhp, OCIAnyData *sdata,
-  OCITypeCode tc, OCIType *type, dvoid *ind, dvoid **attr_val,
-        ub4 *length, boolean is_any _*/);
-
-sword OCIAnyDataCollGetElem(/*_ OCISvcCtx *svchp, OCIError *errhp, OCIAnyData *sdata,
-  OCITypeCode tc, OCIType *type, dvoid *ind, dvoid **celem_val,
-        ub4 *length, boolean is_any _*/);
-
-sword OCIFormatInit(/*_ dvoid *hndl, OCIError *err _*/);
-
-sword OCIFormatString(/*_ dvoid *hndl, OCIError *err, OraText *buffer,
-                          sbig_ora bufferLength, sbig_ora *returnLength,
-                          CONST OraText *formatString, ... _*/);
-
-sword OCIFormatTerm(/*_ dvoid *hndl, OCIError *err _*/);
-
-sword OCIFormatTUb1(/*_ void _*/);
-sword OCIFormatTUb2(/*_ void _*/);
-sword OCIFormatTUb4(/*_ void _*/);
-sword OCIFormatTUword(/*_ void _*/);
-sword OCIFormatTUbig_ora(/*_ void _*/);
-sword OCIFormatTSb1(/*_ void _*/);
-sword OCIFormatTSb2(/*_ void _*/);
-sword OCIFormatTSb4(/*_ void _*/);
-sword OCIFormatTSword(/*_ void _*/);
-sword OCIFormatTSbig_ora(/*_ void _*/);
-sword OCIFormatTEb1(/*_ void _*/);
-sword OCIFormatTEb2(/*_ void _*/);
-sword OCIFormatTEb4(/*_ void _*/);
-sword OCIFormatTEword(/*_ void _*/);
-sword OCIFormatTChar(/*_ void _*/);
-sword OCIFormatTText(/*_ void _*/);
-sword OCIFormatTDouble(/*_ void _*/);
-sword OCIFormatTDvoid(/*_ void _*/);
-sword OCIFormatTEnd(/*_ void _*/);
-
-sword OCIFileClose (/*_ dvoid  *hndl, OCIError *err, OCIFileObject *filep _*/);
-
-
-sword OCIFileExists (/*_ dvoid  *hndl, OCIError *err, OraText *filename,
-                     OraText *path, ub1 *flag _*/ );
-
-sword OCIFileFlush(/*_ dvoid *hndl, OCIError *err, OCIFileObject *filep _*/ );
-
-sword OCIFileGetLength(/*_ dvoid *hndl, OCIError *err, OraText *filename,
-                        OraText *path, ubig_ora *lenp _*/ );
-
-sword OCIFileInit (/*_ dvoid *hndl, OCIError *err _*/);
-
-sword OCIFileOpen (/*_ dvoid *hndl, OCIError *err, OCIFileObject **filep,
-                    OraText *filename, OraText *path, ub4 mode, ub4 create, 
-                    ub4 type _*/);
-
-sword OCIFileRead (/*_ dvoid *hndl, OCIError *err, OCIFileObject *filep,
-                    dvoid *bufp, ub4 bufl, ub4 *bytesread _*/);
-
-sword OCIFileSeek (/*_ dvoid *hndl, OCIError *err, OCIFileObject *filep,
-                     uword origin, ubig_ora offset, sb1 dir _*/);
-
-sword OCIFileTerm (/*_ dvoid *hndl, OCIError *err _*/);
-
-sword OCIFileWrite (/*_ dvoid *hndl, OCIError *err, OCIFileObject   *filep,
-                     dvoid *bufp, ub4 buflen, ub4 *byteswritten _*/);
-
-
-/*-------------------------- Extensions to XA interface ---------------------*/
-/* ------------------------- xaosvch ----------------------------------------*/
-/*
-   NAME
-     xaosvch  -  XA Oracle get SerViCe Handle
-   DESCRIPTION
-     Given a database name return the service handle that is used by the
-     XA library
-   NOTE
-     This macro has been provided for backward compatibilty with 8.0.2
-*/
-OCISvcCtx *xaosvch(/*_ OraText *dbname _*/);
-
-/* ------------------------- xaoSvcCtx --------------------------------------*/
-/*
-   NAME
-     xaoSvcCtx  -  XA Oracle get SerViCe ConTeXt
-   DESCRIPTION
-     Given a database name return the service handle that is used by the
-     XA library
-   NOTE
-     This routine has been provided for APs to get access to the service
-     handle that XA library uses. Without this routine APs must use SQLLIB
-     routine sqlld2 to get access to the Logon data area registered by the
-     XA library
-*/
-OCISvcCtx *xaoSvcCtx(/*_ OraText *dbname _*/);
-
-/* ------------------------- xaoEnv -----------------------------------------*/
-/*
-   NAME
-     xaoEnv  -  XA Oracle get ENvironment Handle
-   DESCRIPTION
-     Given a database name return the environment handle that is used by the
-     XA library
-   NOTE
-     This routine has been provided for APs to get access to the environment
-     handle that XA library uses. Without this routine APs must use SQLLIB
-     routine sqlld2 to get access to the Logon data area registered by the
-     XA library
-*/
-OCIEnv *xaoEnv(/*_ OraText *dbname _*/);
-
-/* ------------------------- xaosterr ---------------------------------------*/
-/*
-   NAME
-     xaosterr  -  XA Oracle get xa STart ERRor code
-   DESCRIPTION
-     Given an oracle error code return the XA error code
- */
-int xaosterr(/*_ OCISvcCtx *svch, sb4 error _*/);
-/*-------------------------- End Extensions ---------------------------------*/
-
-/*---------------------- Extensions to NLS cartridge service ----------------*/
-/* ----------------------- OCINlsGetInfo ------------------------------------*/
-/*
-   NAME
-     OCINlsGetInfo - Get NLS info from OCI environment handle
-   REMARKS
-     This function generates language information specified by item from OCI 
-     environment handle envhp into an array pointed to by buf within size 
-     limitation as buflen.
-   RETURNS
-     OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR on wrong item.
-   envhp(IN/OUT)
-     OCI environment handle.
-   errhp(IN/OUT)
-     The OCI error handle. If there is an error, it is record in errhp and 
-     this function returns a NULL pointer. Diagnostic information can be 
-     obtained by calling OCIErrorGet().
-   buf(OUT)
-     Pointer to the destination buffer.
-   buflen(IN)
-     The size of destination buffer. The maximum length for each information
-     is 32 bytes.
-   item(IN)
-     It specifies to get which item in OCI environment handle and can be one
-     of following values:
-       OCI_NLS_DAYNAME1 : Native name for Monday.
-       OCI_NLS_DAYNAME2 : Native name for Tuesday.
-       OCI_NLS_DAYNAME3 : Native name for Wednesday.
-       OCI_NLS_DAYNAME4 : Native name for Thursday.
-       OCI_NLS_DAYNAME5 : Native name for Friday.
-       OCI_NLS_DAYNAME6 : Native name for for Saturday.
-       OCI_NLS_DAYNAME7 : Native name for for Sunday.
-       OCI_NLS_ABDAYNAME1 : Native abbreviated name for Monday.
-       OCI_NLS_ABDAYNAME2 : Native abbreviated name for Tuesday.
-       OCI_NLS_ABDAYNAME3 : Native abbreviated name for Wednesday.
-       OCI_NLS_ABDAYNAME4 : Native abbreviated name for Thursday.
-       OCI_NLS_ABDAYNAME5 : Native abbreviated name for Friday.
-       OCI_NLS_ABDAYNAME6 : Native abbreviated name for for Saturday.
-       OCI_NLS_ABDAYNAME7 : Native abbreviated name for for Sunday.
-       OCI_NLS_MONTHNAME1 : Native name for January.
-       OCI_NLS_MONTHNAME2 : Native name for February.
-       OCI_NLS_MONTHNAME3 : Native name for March.
-       OCI_NLS_MONTHNAME4 : Native name for April.
-       OCI_NLS_MONTHNAME5 : Native name for May.
-       OCI_NLS_MONTHNAME6 : Native name for June.
-       OCI_NLS_MONTHNAME7 : Native name for July.
-       OCI_NLS_MONTHNAME8 : Native name for August.
-       OCI_NLS_MONTHNAME9 : Native name for September.
-       OCI_NLS_MONTHNAME10 : Native name for October.
-       OCI_NLS_MONTHNAME11 : Native name for November.
-       OCI_NLS_MONTHNAME12 : Native name for December.
-       OCI_NLS_ABMONTHNAME1 : Native abbreviated name for January.
-       OCI_NLS_ABMONTHNAME2 : Native abbreviated name for February.
-       OCI_NLS_ABMONTHNAME3 : Native abbreviated name for March.
-       OCI_NLS_ABMONTHNAME4 : Native abbreviated name for April.
-       OCI_NLS_ABMONTHNAME5 : Native abbreviated name for May.
-       OCI_NLS_ABMONTHNAME6 : Native abbreviated name for June.
-       OCI_NLS_ABMONTHNAME7 : Native abbreviated name for July.
-       OCI_NLS_ABMONTHNAME8 : Native abbreviated name for August.
-       OCI_NLS_ABMONTHNAME9 : Native abbreviated name for September.
-       OCI_NLS_ABMONTHNAME10 : Native abbreviated name for October.
-       OCI_NLS_ABMONTHNAME11 : Native abbreviated name for November.
-       OCI_NLS_ABMONTHNAME12 : Native abbreviated name for December.
-       OCI_NLS_YES : Native string for affirmative response.
-       OCI_NLS_NO : Native negative response. 
-       OCI_NLS_AM : Native equivalent string of AM.
-       OCI_NLS_PM : Native equivalent string of PM.
-       OCI_NLS_AD : Native equivalent string of AD.
-       OCI_NLS_BC : Native equivalent string of BC.
-       OCI_NLS_DECIMAL : decimal character.
-       OCI_NLS_GROUP : group separator.
-       OCI_NLS_DEBIT : Native symbol of debit.
-       OCI_NLS_CREDIT : Native sumbol of credit.
-       OCI_NLS_DATEFORMAT : Oracle date format.
-       OCI_NLS_INT_CURRENCY: International currency symbol.
-       OCI_NLS_LOC_CURRENCY : Locale currency symbol.
-       OCI_NLS_LANGUAGE : Language name.
-       OCI_NLS_ABLANGUAGE : Abbreviation for language name.
-       OCI_NLS_TERRITORY : Territory name.
-       OCI_NLS_CHARACTER_SET : Character set name.
-       OCI_NLS_LINGUISTIC : Linguistic name.
-       OCI_NLS_CALENDAR : Calendar name.
-       OCI_NLS_DUAL_CURRENCY : Dual currency symbol.
-*/
-sword OCINlsGetInfo(/*_ dvoid *envhp, OCIError *errhp, OraText *buf,
-                    size_t buflen, ub2 item _*/);
-
-/* ----------------------- OCINlsNumericInfoGet ----------------------------*/
-/*
-   NAME
-     OCINlsNumericInfoGet - Get NLS numeric info from OCI environment handle
-   REMARKS
-     This function generates numeric language information specified by item 
-     from OCI environment handle envhp into an output number variable.
-   RETURNS
-     OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR on wrong item.
-   envhp(IN/OUT)
-     OCI environment handle. If handle invalid, returns OCI_INVALID_HANDLE.
-   errhp(IN/OUT)
-     The OCI error handle. If there is an error, it is record in errhp and 
-     this function returns a NULL pointer. Diagnostic information can be 
-     obtained by calling OCIErrorGet().
-   val(OUT)
-     Pointer to the output number variable. On OCI_SUCCESS return, it will
-     contain the requested NLS numeric info.
-   item(IN)
-     It specifies to get which item in OCI environment handle and can be one
-     of following values:
-       OCI_NLS_CHARSET_MAXBYTESZ : Maximum character byte size for OCI
-                                   environment or session handle charset
-       OCI_NLS_CHARSET_FIXEDWIDTH: Character byte size for fixed-width charset;
-                                   0 for variable-width charset
-*/
-sword OCINlsNumericInfoGet(/*_ dvoid *envhp, OCIError *errhp, sb4 *val, 
-                           ub2 item _*/);
-
-/* ----------------------- OCINlsCharSetNameToId -----------------------------*/
-/*
-   NAME
-     OCINlsCharSetNameToId - Get Oracle charset id given Oracle charset name
-   REMARKS
-     This function will get the Oracle character set id corresponding to
-     the given Oracle character set name.
-   RETURNS
-     Oracle character set id for the given Oracle character set name if
-     character set name and OCI handle are valid; otherwise returns 0.
-   envhp(IN/OUT)
-     OCI environment handle.
-   name(IN)
-     Pointer to a null-terminated Oracle character set name whose id 
-     will be returned.
-*/
-ub2 OCINlsCharSetNameToId(/*_ dvoid *envhp, const oratext *name _*/);
-
-/* ----------------------- OCINlsCharSetIdToName -----------------------------*/
-/*
-   NAME
-     OCINlsCharSetIdToName - Get Oracle charset name given Oracle charset id
-   REMARKS
-     This function will get the Oracle character set name corresponding to
-     the given Oracle character set id.
-   RETURNS
-     OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
-   envhp(IN/OUT)
-     OCI environment handle. If handle invalid, returns OCI_INVALID_HANDLE.
-   buf(OUT)
-     Pointer to the destination buffer. On OCI_SUCCESS return, it will contain
-     the null-terminated string for character set name.
-   buflen(IN)
-     Size of destination buffer. Recommended size is OCI_NLS_MAXBUFSZ for
-     guarantee to store an Oracle character set name. If it's smaller than
-     the length of the character set name, the function will return OCI_ERROR.
-   id(IN)
-     Oracle character set id.
-*/
-sword OCINlsCharSetIdToName(/*_ dvoid *envhp, oratext *buf, size_t buflen, 
-                            ub2 id _*/);
-
-/* ----------------------- OCINlsNameMap ------------------------------------*/
-/*
-   NAME
-     OCINlsNameMap - Map NLS naming from Oracle to other standards and vice 
-                     versa
-   REMARKS
-     This function will map NLS naming from Oracle to other standards (such
-     as ISO, IANA) and vice versa.
-   RETURNS
-     OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
-   envhp(IN/OUT)
-     OCI environment handle. If handle invalid, returns OCI_INVALID_HANDLE.
-   buf(OUT)
-     Pointer to the destination buffer. On OCI_SUCCESS return, it will 
-     contain null-terminated string for requested mapped name.
-   buflen(IN)
-     The size of destination buffer. Recommended size is OCI_NLS_MAXBUFSZ
-     for guarantee to store an NLS name. If it is smaller than the length
-     of the name, the function will return OCI_ERROR.
-   srcbuf(IN)
-     Pointer to null-terminated NLS name. If it is not a valid name in its
-     define scope, the function will return OCI_ERROR.
-   flag(IN)
-     It specifies name mapping direction and can take the following values:
-       OCI_NLS_CS_IANA_TO_ORA : Map character set name from IANA to Oracle
-       OCI_NLS_CS_ORA_TO_IANA : Map character set name from Oracle to IANA
-       OCI_NLS_LANG_ISO_TO_ORA : Map language name from ISO to Oracle
-       OCI_NLS_LANG_ORA_TO_ISO : Map language name from Oracle to ISO
-       OCI_NLS_TERR_ISO_TO_ORA : Map territory name from ISO to Oracle
-       OCI_NLS_TERR_ORA_TO_ISO : Map territory name from Oracle to ISO
-       OCI_NLS_TERR_ISO3_TO_ORA : Map territory name from 3-letter ISO
-                                  abbreviation to Oracle
-       OCI_NLS_TERR_ORA_TO_ISO3 : Map territory name from Oracle to 3-letter
-                                  ISO abbreviation
-*/
-sword OCINlsNameMap(/*_ dvoid *envhp, oratext *buf, size_t buflen,
-                    const oratext *srcbuf, ub4 flag _*/);
-
-/* -------------------- OCIMultiByteToWideChar ------------------------------*/
-/*
-   NAME
-     OCIMultiByteToWideChar - Convert a null terminated multibyte string into 
-                              wchar
-   REMARKS
-     This routine converts an entire null-terminated string into the wchar 
-     format. The wchar output buffer will be null-terminated.
-   RETURNS
-     OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set of string.
-   dst (OUT)
-     Destination buffer for wchar.
-   src (IN)
-     Source string to be converted.
-   rsize (OUT)
-     Number of characters converted including null-terminator.
-     If it is a NULL pointer, no number return
-*/
-sword OCIMultiByteToWideChar(/*_ dvoid *envhp, OCIWchar *dst, 
-                            CONST OraText *src, size_t *rsize _*/);
-
-
-/* --------------------- OCIMultiByteInSizeToWideChar -----------------------*/
-/*
-   NAME
-     OCIMultiByteInSizeToWideChar - Convert a mulitbyte string in length into
-                                    wchar
-   REMARKS
-     This routine converts part of string into the wchar format. It will
-     convert as many complete characters as it can until it reaches output
-     buffer size or input buffer size or it reaches a null-terminator in
-     source string. The output buffer will be null-terminated if space permits.
-     If dstsz is zero, this function will only return number of characters not
-     including ending null terminator for converted string.
-   RETURNS
-     OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set of string.
-   dst (OUT)
-     Pointer to a destination buffer for wchar. It can be NULL pointer when
-     dstsz is zero.
-   dstsz(IN)
-     Destination buffer size in character. If it is zero, this function just
-     returns number of characters will be need for the conversion.
-   src (IN)
-     Source string to be converted.
-   srcsz(IN)
-     Length of source string in byte.
-   rsize(OUT)
-     Number of characters written into destination buffer, or number of
-     characters for converted string is dstsz is zero.
-     If it is NULL pointer, nothing to return.
-*/
-sword OCIMultiByteInSizeToWideChar(/*_ dvoid *envhp, OCIWchar *dst,
-                                  size_t dstsz, CONST OraText *src, 
-                                  size_t srcsz, size_t *rsize _*/);
-
-
-/* ---------------------- OCIWideCharToMultiByte ----------------------------*/
-/*
-   NAME
-     OCIWideCharToMultiByte - Convert a null terminated wchar string into
-                              multibyte
-   REMARKS
-     This routine converts an entire null-terminated wide character string into
-     multi-byte string. The output buffer will be null-terminated.
-   RETURNS
-     OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set of string.
-   dst (OUT)
-     Destination buffer for multi-byte string.
-   src (IN)
-     Source wchar string to be converted.
-   rsize (OUT)
-     Number of bytes written into the destination buffer.
-     If it is NULL pointer, nothing to return.
-*/
-sword OCIWideCharToMultiByte(/*_ dvoid *envhp, OraText *dst, 
-                            CONST OCIWchar *src, size_t *rsize _*/);
-
-
-/* ---------------------- OCIWideCharInSizeToMultiByte ----------------------*/
-/*
-   NAME
-     OCIWideCharInSizeToMultiByte - Convert a wchar string in length into 
-                                    mulitbyte
-   REMARKS
-     This routine converts part of wchar string into the multi-byte format.
-     It will convert as many complete characters as it can until it reaches
-     output buffer size or input buffer size or it reaches a null-terminator
-     in source string. The output buffer will be null-terminated if space
-     permits. If dstsz is zero, the function just returns the size of byte not 
-     including ending null-terminator need to store the converted string.
-   RETURNS
-     OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set of string.
-   dst (OUT)
-     Destination buffer for multi-byte. It can be NULL pointer if dstsz is zero.
-   dstsz(IN)
-     Destination buffer size in byte. If it is zero, it just returns the size
-     of bytes need for converted string.
-   src (IN)
-     Source wchar string to be converted.
-   srcsz(IN)
-     Length of source string in character.
-   rsize(OUT)
-     Number of bytes written into destination buffer, or number of bytes need
-     to store the converted string if dstsz is zero.
-     If it is NULL pointer, nothing to return.
-*/
-sword OCIWideCharInSizeToMultiByte(/*_ dvoid *envhp, OraText *dst,
-                                    size_t dstsz, CONST OCIWchar *src,
-                                    size_t srcsz, size_t *rsize _*/);
-
-
-
-/* ----------------------- OCIWideCharIsAlnum -------------------------------*/
-/*
-   NAME
-     OCIWideCharIsAlnum - test whether wc is a letter or decimal digit
-   REMARKS
-     It tests whether wc is a letter or decimal digit.
-   RETURNS
-     TRUE or FLASE.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar for testing.
-*/
-boolean OCIWideCharIsAlnum(/*_ dvoid *envhp, OCIWchar wc _*/);
-
-
-/* ----------------------- OCIWideCharIsAlpha -------------------------------*/
-/*
-   NAME
-     OCIWideCharIsAlpha - test whether wc is an alphabetic letter
-   REMARKS
-     It tests whether wc is an alphabetic letter
-   RETURNS
-     TRUE or FLASE.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar for testing.
-*/
-boolean OCIWideCharIsAlpha(/*_ dvoid *envhp, OCIWchar wc _*/);
-
-
-/* --------------------- OCIWideCharIsCntrl ---------------------------------*/
-/*
-   NAME
-     OCIWideCharIsCntrl - test whether wc is a control character
-   REMARKS
-     It tests whether wc is a control character.
-   RETURNS
-     TRUE or FLASE.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar for testing.
-*/
-boolean OCIWideCharIsCntrl(/*_ dvoid *envhp, OCIWchar wc _*/);
-
-
-/* ----------------------- OCIWideCharIsDigit -------------------------------*/
-/*
-   NAME
-     OCIWideCharIsDigit - test whether wc is a decimal digit character
-   REMARKS
-     It tests whether wc is a decimal digit character.
-   RETURNS
-     TRUE or FLASE.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar for testing.
-*/
-boolean OCIWideCharIsDigit(/*_ dvoid *envhp, OCIWchar wc _*/);
-
-
-/* ----------------------- OCIWideCharIsGraph -------------------------------*/
-/*
-   NAME
-     OCIWideCharIsGraph - test whether wc is a graph character
-   REMARKS
-     It tests whether wc is a graph character. A graph character is character
-     with a visible representation and normally includes alphabetic letter,
-     decimal digit, and punctuation.
-   RETURNS
-     TRUE or FLASE.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar for testing.
-*/
-boolean OCIWideCharIsGraph(/*_ dvoid *envhp, OCIWchar wc _*/);
-
-
-/* ----------------------- OCIWideCharIsLower -------------------------------*/
-/*
-   NAME
-     OCIWideCharIsLower - test whether wc is a lowercase letter
-   REMARKS
-     It tests whether wc is a lowercase letter.
-   RETURNS
-     TRUE or FLASE.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar for testing.
-*/
-boolean OCIWideCharIsLower(/*_ dvoid *envhp, OCIWchar wc _*/);
-
-
-/* ----------------------- OCIWideCharIsPrint -------------------------------*/
-/*
-   NAME
-     OCIWideCharIsPrint - test whether wc is a printable character
-   REMARKS
-     It tests whether wc is a printable character.
-   RETURNS
-     TRUE or FLASE.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar for testing.
-*/
-boolean OCIWideCharIsPrint(/*_ dvoid *envhp, OCIWchar wc _*/);
-
-
-/* ----------------------- OCIWideCharIsPunct -------------------------------*/
-/*
-   NAME
-     OCIWideCharIsPunct - test whether wc is a punctuation character
-   REMARKS
-     It tests whether wc is a punctuation character.
-   RETURNS
-     TRUE or FLASE.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar for testing.
-*/
-boolean OCIWideCharIsPunct(/*_ dvoid *envhp, OCIWchar wc _*/);
-
-
-/* ----------------------- OCIWideCharIsSpace -------------------------------*/
-/*
-   NAME
-     OCIWideCharIsSpace - test whether wc is a space character
-   REMARKS
-     It tests whether wc is a space character. A space character only causes
-     white space in displayed text(for example, space, tab, carriage return,
-     newline, vertical tab or form feed).
-   RETURNS
-     TRUE or FLASE.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar for testing.
-*/
-boolean OCIWideCharIsSpace(/*_ dvoid *envhp, OCIWchar wc _*/);
-
-
-/* ----------------------- OCIWideCharIsUpper -------------------------------*/
-/*
-   NAME
-     OCIWideCharIsUpper - test whether wc is a uppercase letter
-   REMARKS
-     It tests whether wc is a uppercase letter.
-   RETURNS
-     TRUE or FLASE.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar for testing.
-*/
-boolean OCIWideCharIsUpper(/*_ dvoid *envhp, OCIWchar wc _*/);
-
-
-/*----------------------- OCIWideCharIsXdigit -------------------------------*/
-/*
-   NAME
-     OCIWideCharIsXdigit - test whether wc is a hexadecimal digit
-   REMARKS
-     It tests whether wc is a hexadecimal digit ( 0-9, A-F, a-f ).
-   RETURNS
-     TRUE or FLASE.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar for testing.
-*/
-boolean OCIWideCharIsXdigit(/*_ dvoid *envhp, OCIWchar wc _*/);
-
-
-/* --------------------- OCIWideCharIsSingleByte ----------------------------*/
-/*
-   NAME
-     OCIWideCharIsSingleByte - test whether wc is a single-byte character
-   REMARKS
-     It tests whether wc is a single-byte character when converted into
-     multi-byte.
-   RETURNS
-     TRUE or FLASE.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar for testing.
-*/
-boolean OCIWideCharIsSingleByte(/*_ dvoid *envhp, OCIWchar wc _*/);
-
-
-/* ----------------------- OCIWideCharToLower -------------------------------*/
-/*
-   NAME
-     OCIWideCharToLower - Convert a wchar into the lowercase
-   REMARKS
-     If there is a lower-case character mapping for wc in the specified locale,
-     it will return the lower-case in wchar, else return wc itself.
-   RETURNS
-     A wchar
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar for lowercase mapping.
-*/
-OCIWchar OCIWideCharToLower(/*_ dvoid *envhp, OCIWchar wc _*/);
-
-
-/* ----------------------- OCIWideCharToUpper -------------------------------*/
-/*
-   NAME
-     OCIWideCharToUpper - Convert a wchar into the uppercase
-   REMARKS
-     If there is a upper-case character mapping for wc in the specified locale,
-     it will return the upper-case in wchar, else return wc itself.
-   RETURNS
-     A wchar
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar for uppercase mapping.
-*/
-OCIWchar OCIWideCharToUpper(/*_ dvoid *envhp, OCIWchar wc _*/);
-
-
-/* ----------------------- OCIWideCharStrcmp --------------------------------*/
-/*
-   NAME
-     OCIWideCharStrcmp - compare two null terminated wchar string
-   REMARKS
-     It compares two wchar string in binary ( based on wchar encoding value ),
-     linguistic, or case-insensitive.
-   RETURNS
-     0, if wstr1 == wstr2.
-     Positive, if wstr1 > wstr2.
-     Negative, if wstr1 < wstr2.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set.
-   wstr1(IN)
-     Pointer to a null-terminated wchar string.
-   wstr2(IN)
-     Pointer to a null-terminated wchar string.
-   flag(IN)
-     It is used to decide the comparison method. It can be taken one of the
-     following values:
-       OCI_NLS_BINARY : for the binary comparison, this is default value.
-       OCI_NLS_LINGUISTIC : for linguistic comparison specified in the locale.
-     This flag can be ORed with OCI_NLS_CASE_INSENSITIVE for case-insensitive
-     comparison.
-*/
-int OCIWideCharStrcmp(/*_ dvoid *envhp, CONST OCIWchar *wstr1, 
-                CONST OCIWchar *wstr2, int flag _*/);
-
-
-/* ----------------------- OCIWideCharStrncmp -------------------------------*/
-/*
-   NAME
-     OCIWideCharStrncmp - compare twe wchar string in length
-   REMARKS
-     This function is similar to OCIWideCharStrcmp(), except that at most len1
-     characters from wstr1 and len2 characters from wstr1 are compared. The
-     null-terminator will be taken into the comparison.
-   RETURNS
-     0, if wstr1 = wstr2
-     Positive, if wstr1 > wstr2
-     Negative, if wstr1 < wstr2
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wstr1(IN)
-     Pointer to the first wchar string
-   len1(IN)
-     The length for the first string for comparison
-   wstr2(IN)
-     Pointer to the second wchar string
-   len2(IN)
-     The length for the second string for comparison.
-   flag(IN)
-     It is used to decide the comparison method. It can be taken one of the
-     following values:
-       OCI_NLS_BINARY : for the binary comparison, this is default value.
-       OCI_NLS_LINGUISTIC : for linguistic comparison specified in the locale.
-     This flag can be ORed with OCI_NLS_CASE_INSENSITIVE for case-insensitive 
-     comparison.
-*/
-int OCIWideCharStrncmp(/*_ dvoid *envhp, CONST OCIWchar *wstr1, size_t len1,
-                 CONST OCIWchar *wstr2, size_t len2, int flag _*/);
-
-
-/* ----------------------- OCIWideCharStrcat --------------------------------*/
-/*
-   NAME
-     OCIWideCharStrcat - concatenate two wchar strings
-   REMARKS
-     This function appends a copy of the wchar string pointed to by wsrcstr,
-     including the null-terminator to the end of wchar string pointed to by
-     wdststr. It returns the number of character in the result string not
-     including the ending null-terminator.
-   RETURNS
-     number of characters in the result string not including the ending
-     null-terminator.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wdststr(IN/OUT)
-     Pointer to the destination wchar string for appending.
-   wsrcstr(IN)
-     Pointer to the source wchar string to append.
-*/
-size_t OCIWideCharStrcat(/*_ dvoid *envhp, OCIWchar *wdststr,
-                         CONST OCIWchar *wsrcstr _*/);
-
-
-/* ----------------------- OCIWideCharStrchr --------------------------------*/
-/*
-   NAME
-     OCIWideCharStrchr - Search the first occurrence of wchar in a wchar string
-   REMARKS
-     This function searchs for the first occurrence of wc in the wchar string
-     pointed to by wstr. It returns a pointer to the whcar if successful, or
-     a null pointer.
-   RETURNS
-     wchar pointer if successful, otherwise a null pointer.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wstr(IN)
-     Pointer to the wchar string to search
-   wc(IN)
-     Wchar to search for.
-*/
-OCIWchar *OCIWideCharStrchr(/*_ dvoid *envhp, CONST OCIWchar *wstr,
-                            OCIWchar wc _*/);
-
-
-/* ----------------------- OCIWideCharStrcpy --------------------------------*/
-/*
-   NAME
-     OCIWideCharStrcpy - copy a wchar string
-   REMARKS
-     This function copies the wchar string pointed to by wsrcstr, including the 
-     null-terminator, into the array pointed to by wdststr. It returns the
-     number of character copied not including the ending null-terminator.
-   RETURNS
-     number of characters copied not including the ending null-terminator.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wdststr(OUT)
-     Pointer to the destination wchar buffer.
-   wsrcstr(IN)
-     Pointer to the source wchar string.
-*/
-size_t OCIWideCharStrcpy(/*_ dvoid *envhp, OCIWchar *wdststr,
-                         CONST OCIWchar *wsrcstr _*/);
-
-
-/* ----------------------- OCIWideCharStrlen --------------------------------*/
-/*
-   NAME
-     OCIWideCharStrlen - Return number of character in a wchar string
-   REMARKS
-     This function computes the number of characters in the wchar string
-     pointed to by wstr, not including the null-terminator, and returns
-    this number. 
-   RETURNS
-     number of characters not including ending null-terminator.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wstr(IN)
-     Pointer to the source wchar string.
-*/
-size_t OCIWideCharStrlen(/*_ dvoid *envhp, CONST OCIWchar *wstr _*/);
-
-
-/* ----------------------- OCIWideCharStrncat -------------------------------*/
-/*
-   NAME
-     OCIWideCharStrncat - Concatenate wchar string in length
-   REMARKS
-     This function is similar to OCIWideCharStrcat(), except that at most n
-     characters from wsrcstr are appended to wdststr. Note that the
-     null-terminator in wsrcstr will stop appending. wdststr will be
-     null-terminated.. 
-   RETURNS
-     Number of characters in the result string not including the ending
-     null-terminator.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wdststr(IN/OUT)
-     Pointer to the destination wchar string for appending.
-   wsrcstr(IN)
-     Pointer to the source wchar string to append.
-   n(IN)
-     Number of characters from wsrcstr to append.
-*/
-size_t OCIWideCharStrncat(/*_ dvoid *envhp, OCIWchar *wdststr,
-                          CONST OCIWchar *wsrcstr, size_t n _*/);
-
-
-/* ----------------------- OCIWideCharStrncpy -------------------------------*/
-/*
-   NAME
-     OCIWideCharStrncpy - Copy wchar string in length
-   REMARKS
-     This function is similar to OCIWideCharStrcpy(), except that at most n
-     characters are copied from the array pointed to by wsrcstr to the array
-     pointed to by wdststr. Note that the null-terminator in wdststr will
-     stop coping and result string will be null-terminated.
-   RETURNS
-     number of characters copied not including the ending null-terminator.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wdststr(OUT)
-     Pointer to the destination wchar buffer.
-   wsrcstr(IN)
-     Pointer to the source wchar string.
-   n(IN)
-     Number of characters from wsrcstr to copy.
-*/
-size_t OCIWideCharStrncpy(/*_ dvoid *envhp, OCIWchar *wdststr,
-                          CONST OCIWchar *wsrcstr, size_t n _*/);
-
-
-/* ----------------------- OCIWideCharStrrchr -------------------------------*/
-/*
-   NAME
-     OCIWideCharStrrchr - search the last occurrence of a wchar in wchar string
-   REMARKS
-     This function searchs for the last occurrence of wc in the wchar string
-     pointed to by wstr. It returns a pointer to the whcar if successful, or
-     a null pointer.
-   RETURNS
-     wchar pointer if successful, otherwise a null pointer.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wstr(IN)
-     Pointer to the wchar string to search
-   wc(IN)
-     Wchar to search for.
-*/
-OCIWchar *OCIWideCharStrrchr(/*_ dvoid *envhp, CONST OCIWchar *wstr,
-                             OCIWchar wc _*/);
-
-
-/* --------------------- OCIWideCharStrCaseConversion -----------------------*/
-/*
-   NAME
-     OCIWideCharStrCaseConversion - convert a wchar string into lowercase or
-                                    uppercase
-   REMARKS
-     This function convert the wide char string pointed to by wsrcstr into the
-     uppercase or lowercase specified by flag and copies the result into the
-     array pointed to by wdststr. The result string will be null-terminated.
-   RETURNS
-     number of characters for result string not including null-terminator.
-   envhp(IN/OUT)
-     OCI environment handle.
-   wdststr(OUT)
-     Pointer to destination array.
-   wsrcstr(IN)
-     Pointer to source string.
-   flag(IN)
-     Specify the case to convert:
-       OCI_NLS_UPPERCASE : convert to uppercase.
-       OCI_NLS_LOWERCASE: convert to lowercase.
-     This flag can be ORed with OCI_NLS_LINGUISTIC to specify that the
-     linguistic setting in the locale will be used for case conversion.
-*/
-size_t OCIWideCharStrCaseConversion(/*_ dvoid *envhp, OCIWchar *wdststr,
-                                    CONST OCIWchar *wsrcstr, ub4 flag _*/);
-
-
-/*---------------------- OCIWideCharDisplayLength ---------------------------*/
-/*
-   NAME
-     OCIWideCharDisplayLength - Calculate the display length for a wchar
-   REMARKS
-     This function determines the number of column positions required for wc
-     in display. It returns number of column positions, or 0 if wc is 
-     null-terminator.
-   RETURNS
-     Number of display positions.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar character.
-*/
-size_t OCIWideCharDisplayLength(/*_ dvoid *envhp, OCIWchar wc  _*/);
-
-
-/*---------------------- OCIWideCharMultiByteLength -------------------------*/
-/*
-   NAME
-     OCIWideCharMultiByteLength - Determine byte size in multi-byte encoding
-   REMARKS
-     This function determines the number of byte required for wc in multi-byte
-     encoding. It returns number of bytes in multi-byte for wc.
-   RETURNS
-     Number of bytes.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar character.
-*/
-size_t OCIWideCharMultiByteLength(/*_ dvoid *envhp, OCIWchar wc _*/);
-
-
-/* ----------------------- OCIMultiByteStrcmp -------------------------------*/
-/*
-   NAME
-     OCIMultiByteStrcmp - Compare two multi-byte strings
-   REMARKS
-     It compares two multi-byte strings in binary ( based on encoding value ),
-     linguistic, or case-insensitive.
-   RETURNS
-     0, if str1 == str2.
-     Positive, if str1 > str2.
-     Negative, if str1 < str2.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set.
-   str1(IN)
-     Pointer to a null-terminated string.
-   str2(IN)
-     Pointer to a null-terminated string.
-   flag(IN)
-     It is used to decide the comparison method. It can be taken one of the
-     following values:
-       OCI_NLS_BINARY: for the binary comparison, this is default value.
-       OCI_NLS_LINGUISTIC: for linguistic comparison specified in the locale.
-     This flag can be ORed with OCI_NLS_CASE_INSENSITIVE for case-insensitive 
-     comparison.
-*/
-int OCIMultiByteStrcmp(/*_ dvoid *envhp, CONST OraText *str1,
-                       CONST OraText *str2, int flag _*/);
-
-
-/*----------------------- OCIMultiByteStrncmp -------------------------------*/
-/*
-   NAME
-     OCIMultiByteStrncmp - compare two strings in length
-   REMARKS
-     This function is similar to OCIMultiBytestrcmp(), except that at most len1 bytes
-     from str1 and len2 bytes from str2 are compared. The null-terminator will
-     be taken into the comparison.
-   RETURNS
-     0, if str1 = str2
-     Positive, if str1 > str2
-     Negative, if str1 < str2
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set.
-   str1(IN)
-     Pointer to the first string
-   len1(IN)
-     The length for the first string for comparison
-   str2(IN)
-     Pointer to the second string
-   len2(IN)
-     The length for the second string for comparison.
-   flag(IN)
-     It is used to decide the comparison method. It can be taken one of the
-     following values:
-       OCI_NLS_BINARY: for the binary comparison, this is default value.
-       OCI_NLS_LINGUISTIC: for linguistic comparison specified in the locale.
-     This flag can be ORed with OCI_NLS_CASE_INSENSITIVE for case-insensitive 
-     comparison.
-*/
-int OCIMultiByteStrncmp(/*_ dvoid *envhp, CONST OraText *str1, size_t len1,
-                        OraText *str2, size_t len2, int flag _*/);
-
-
-/*----------------------- OCIMultiByteStrcat --------------------------------*/
-/*
-   NAME
-     OCIMultiByteStrcat - concatenate multibyte strings
-   REMARKS
-     This function appends a copy of the multi-byte string pointed to by
-     srcstr, including the null-terminator to the end of string pointed to by
-     dststr. It returns the number of bytes in the result string not including
-     the ending null-terminator.
-   RETURNS
-     number of bytes in the result string not including the ending
-     null-terminator.
-   envhp(IN/OUT)
-     Pointer to OCI environment handle
-   dststr(IN/OUT)
-     Pointer to the destination multi-byte string for appending.
-   srcstr(IN)
-     Pointer to the source string to append.
-*/
-size_t OCIMultiByteStrcat(/*_ dvoid *envhp, OraText *dststr,
-                          CONST OraText *srcstr _*/);
-
-
-/*------------------------- OCIMultiByteStrcpy ------------------------------*/
-/*
-   NAME
-     OCIMultiByteStrcpy - copy multibyte string
-   REMARKS
-     This function copies the multi-byte string pointed to by srcstr,
-     including the null-terminator, into the array pointed to by dststr. It
-     returns the number of bytes copied not including the ending 
-     null-terminator.
-   RETURNS
-     number of bytes copied not including the ending null-terminator.
-   envhp(IN/OUT)
-     Pointer to the OCI environment handle.
-   srcstr(OUT)
-     Pointer to the destination buffer.
-   dststr(IN)
-     Pointer to the source multi-byte string.
-*/
-size_t OCIMultiByteStrcpy(/*_ dvoid *envhp, OraText *dststr,
-                          CONST OraText *srcstr _*/);
-
-
-/*----------------------- OCIMultiByteStrlen --------------------------------*/
-/*
-   NAME
-     OCIMultiByteStrlen - Calculate multibyte string length
-   REMARKS
-     This function computes the number of bytes in the multi-byte string
-     pointed to by str, not including the null-terminator, and returns this
-     number. 
-   RETURNS
-     number of bytes not including ending null-terminator.
-   str(IN)
-     Pointer to the source multi-byte string.
-*/
-size_t OCIMultiByteStrlen(/*_ dvoid *envhp, CONST OraText *str _*/);
-
-
-/*----------------------- OCIMultiByteStrncat -------------------------------*/
-/*
-   NAME
-     OCIMultiByteStrncat - concatenate string in length
-   REMARKS
-     This function is similar to OCIMultiBytestrcat(), except that at most n
-     bytes from srcstr are appended to dststr. Note that the null-terminator in
-     srcstr will stop appending and the function will append as many character
-     as possible within n bytes. dststr will be null-terminated. 
-   RETURNS
-     Number of bytes in the result string not including the ending
-     null-terminator.
-   envhp(IN/OUT)
-     Pointer to OCI environment handle.
-   srcstr(IN/OUT)
-     Pointer to the destination multi-byte string for appending.
-   dststr(IN)
-     Pointer to the source multi-byte string to append.
-   n(IN)
-     Number of bytes from srcstr to append.
-*/
-size_t OCIMultiByteStrncat(/*_ dvoid *envhp, OraText *dststr,
-                           CONST OraText *srcstr, size_t n _*/);
-
-
-/*----------------------- OCIMultiByteStrncpy -------------------------------*/
-/*
-   NAME
-     OCIMultiByteStrncpy - copy multibyte string in length
-   REMARKS
-     This function is similar to OCIMultiBytestrcpy(), except that at most n
-     bytes are copied from the array pointed to by srcstr to the array pointed
-     to by dststr. Note that the null-terminator in srcstr will stop coping and
-     the function will copy as many character as possible within n bytes. The 
-     result string will be null-terminated.
-   RETURNS
-     number of bytes copied not including the ending null-terminator.
-   envhp(IN/OUT)
-     Pointer to a OCI environment handle.
-   dststr(IN)
-     Pointer to the source multi-byte string.
-   srcstr(OUT)
-     Pointer to the destination buffer.
-   n(IN)
-     Number of bytes from srcstr to copy.
-*/
-size_t OCIMultiByteStrncpy(/*_ dvoid *envhp, OraText *dststr,
-                           CONST OraText *srcstr, size_t n _*/);
-
-
-/*----------------------- OCIMultiByteStrnDisplayLength ---------------------*/
-/*
-   NAME
-     OCIMultiByteStrnDisplayLength - calculate the display length for a
-                                     multibyt string
-   REMARKS
-     This function returns the number of display positions occupied by the 
-     complete characters within the range of n bytes.
-   RETURNS
-     number of display positions.
-   envhp(IN/OUT)
-     OCI environment handle.
-   str(IN)
-     Pointer to a multi-byte string.
-   n(IN)
-     Number of bytes to examine.
-*/
-size_t OCIMultiByteStrnDisplayLength(/*_ dvoid *envhp, CONST OraText *str1,
-                                     size_t n _*/);
-
-
-/*---------------------- OCIMultiByteStrCaseConversion  ---------------------*/
-/*
-   NAME
-     OCIMultiByteStrCaseConversion
-   REMARKS
-     This function convert the multi-byte string pointed to by srcstr into the
-     uppercase or lowercase specified by flag and copies the result into the
-     array pointed to by dststr. The result string will be null-terminated.
-   RETURNS
-     number of bytes for result string not including null-terminator.
-   envhp(IN/OUT)
-     OCI environment handle.
-   dststr(OUT)
-     Pointer to destination array.
-   srcstr(IN)
-     Pointer to source string.
-   flag(IN)
-     Specify the case to convert:
-       OCI_NLS_UPPERCASE: convert to uppercase.
-       OCI_NLS_LOWERCASE: convert to lowercase.
-     This flag can be ORed with OCI_NLS_LINGUISTIC to specify that the 
-     linguistic setting in the locale will be used for case conversion.
-*/
-size_t OCIMultiByteStrCaseConversion(/*_ dvoid *envhp, OraText *dststr,
-                                     CONST OraText *srcstr, ub4 flag _*/);
-
-
-/*------------------------- OCICharSetToUnicode -----------------------------*/
-/*
-   NAME
-     OCICharSetToUnicode - convert multibyte string into Unicode as UCS2
-   REMARKS
-     This function converts a multi-byte string pointed to by src to Unicode 
-     into the array pointed to by dst. The conversion will stop when it reach
-     to the source limitation or destination limitation. 
-     The function will return number of characters converted into Unicode.
-     If dstlen is zero, it will just return the number of characters for the
-     result without real conversion.
-   RETURNS
-     OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
-   envhp(IN/OUT)
-     Pointer to an OCI environment handle
-   dst(OUT)
-     Pointer to a destination buffer
-   dstlen(IN)
-     Size of destination buffer in character
-   src(IN)
-     Pointer to multi-byte source string.
-   srclen(IN)
-     Size of source string in bytes.
-   rsize(OUT)
-     Number of characters converted.
-     If it is a NULL pointer, nothing to return.
-*/
-sword OCICharSetToUnicode(/*_ dvoid *envhp, ub2 *dst, size_t dstlen,
-                        CONST OraText *src, size_t  srclen, size_t *rsize _*/);
-
-
-/*------------------------- OCIUnicodeToCharSet -----------------------------*/
-/*
-   NAME
-     OCIUnicodeToCharSet - convert Unicode into multibyte
-   REMARKS
-     This function converts a Unicode string pointed to by src to multi-byte
-     into the array pointed to by dst. The conversion will stop when it reach
-     to the source limitation or destination limitation. The function will
-     return number of bytes converted into multi-byte. If dstlen is zero, it
-     will just return the number of bytes for the result without real 
-     conversion. If a Unicode character is not convertible for the character
-     set specified in OCI environment handle, a replacement character will be
-     used for it. In this case, OCICharSetConversionIsReplacementUsed() will
-     return ture.
-   RETURNS
-     OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
-   envhp(IN/OUT)
-     Pointer to an OCI environment handle.
-   dst(OUT)
-     Pointer to a destination buffer.
-   dstlen(IN)
-     Size of destination buffer in byte.
-   src(IN)
-     Pointer to a Unicode string.
-   srclen(IN)
-     Size of source string in characters.
-   rsize(OUT)
-     Number of bytes converted.
-     If it is a NULL pointer, nothing to return.
-*/
-sword OCIUnicodeToCharSet(/*_ dvoid *envhp, OraText *dst, size_t dstlen, 
-                           CONST ub2 *src, size_t srclen, size_t *rsize _*/);
-
-
-/*----------------------- OCINlsCharSetConvert ------------------------------*/
-/*
-   NAME
-     OCINlsCharSetConvert - convert between any two character set.
-   REMARKS
-     This function converts a string pointed to by src in the character set
-     specified with srcid to the array pointed to by dst in the character set
-     specified with dstid. The conversion will stop when it reaches the source
-     limitation or destination limitation. The function will return the number
-     of bytes converted into the destination buffer. Even though either source
-     or destination character set id is OCI_UTF16ID, given and return data
-     length will be represented with the byte length as this function is
-     intended for generic purpose. Note the conversion will not stop at null
-     data.
-     To get character set id from name, OCINlsCharSetNameToId can be used.
-     To check if derived data in the destination buffer contains any
-     replacement character resulting from conversion failure,
-     OCICharSetConversionIsReplacementUsed can be used to get the status.
-     Data alignment should be guaranteed by a caller. For example, UTF-16 data
-     should be aligned to ub2 type.
-
-   RETURNS
-     OCI_SUCCESS or OCI_ERROR.
-   errhp(IN/OUT)
-     OCI error handle. If there is an error, it is recorded in errhp and this
-     function returns a NULL pointer. Diagnostic information can be obtained
-     by calling OCIErrorGet().
-   dstid(IN)
-     Character set id for the destination buffer.
-   dstp(OUT)
-     Pointer to the destination buffer.
-   dstlen(IN)
-     The maximum byte size of destination buffer.
-   srcid(IN)
-     Character set id for the source buffer.
-   srcp(IN)
-     Pointer to the source buffer.
-   srclen(IN)
-     The length byte size of source buffer.
-   rsize(OUT)
-     The number of characters converted. If it is a NULL pointer, nothing to
-     return.
-*/
-sword OCINlsCharSetConvert(/*_ dvoid *envhp, OCIError *errhp, 
-                        ub2 dstid, dvoid *dstp, size_t dstlen,
-                        ub2 srcid, CONST dvoid *srcp, size_t srclen,
-                        size_t *rsize _*/);
-
-/* ------------------- OCICharsetConversionIsReplacementUsed ----------------*/
-/*
-   NAME
-     OCICharsetConversionIsReplacementUsed - chech if replacement is used in 
-                                             conversion
-   REMARKS
-     This function indicates whether or not the replacement character was used
-     for nonconvertible characters in character set conversion in last invoke
-     of OCICharsetUcs2ToMb().
-   RETURNS
-     TRUE is the replacement character was used in last OCICharsetUcs2ToMb()
-     invoking, else FALSE.
-   envhp(IN/OUT)
-     OCI environment handle. This should be the first handle passed to 
-     OCICharsetUcs2ToMb().
-*/
-boolean OCICharSetConversionIsReplacementUsed(/*_ dvoid *envhp _*/);
-
-/*------------------- OCINlsEnvironmentVariableGet -----------------*/
-/*
-   NAME
-     OCINlsEnvironmentVariableGet - get a value of NLS environment variable.
-
-   DESCRIPTION
-     This function retrieves a value of NLS environment variable to the buffer
-     pointed to by val. Data type is determined by the parameter specified by
-     item. Either numeric data or string data can be retrieved.
-
-   RETURNS
-     OCI_SUCCESS or OCI_ERROR.
-
-   PARAMETERS
-   valp(OUT) -
-     Pointer to the buffer.
-   size(IN) -
-     Size of the buffer. This argument is only applicable to string data type,
-     but not to numerical data, in such case, it is ignored.
-   item(IN) -
-     NLS item value, which can be one of following values:
-       OCI_NLS_CHARSET_ID  - NLS_LANG character set id in ub2 data type.
-       OCI_NLS_NCHARSET_ID - NLS_NCHAR character set id in ub2 data type.
-   charset(IN) -
-     Character set id for retrieved string data. If it is 0, NLS_LANG will be
-     used. OCI_UTF16ID is a valid id. In case of numeric data, this argument
-     is ignored.
-   rsize(OUT) -
-     Size of return value.
-
-   NOTE
-     This functions is mainly used for retrieving character set id from either
-     NLS_LANG or NLS_NCHAR environment variables. If NLS_LANG is not set,
-     the default character set id is returned.
-     For future extension, the buffer is capable for storing other data types.
-*/
-sword OCINlsEnvironmentVariableGet(/*_ dvoid  *valp, size_t size, ub2 item,
-                                   ub2 charset, size_t *rsize _*/);
-
-
-/*------------------------- OCIMessageOpen ----------------------------------*/
-/*
-   NAME
-     OCIMessageOpen - open a locale message file
-   REMARKS
-     This function opens a message handle for facility of product in a language
-     pointed to by envhp. It first try to open the message file corresponding
-     to envhp for the facility. If it successes, it will use that file to
-     initialize a message handle, else it will use the default message file
-     which is for American language for the facility. The function return a
-     pointer pointed to a message handle into msghp parameter.
-   RETURNS
-     OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
-   envhp(IN/OUT)
-     A pointer to OCI environment handle for message language.
-   errhp(IN/OUT)
-     The OCI error handle. If there is an error, it is record in errhp and this
-     function returns a NULL pointer. Diagnostic information can be obtained by
-     calling OCIErrorGet().
-   msghp(OUT)
-     a message handle for return
-   product(IN)
-     A pointer to a product name. Product name is used to locate the directory
-     for message in a system dependent way. For example, in Solaris, the
-     directory of message files for the product `rdbms' is
-     `${ORACLE_HOME}/rdbms'.
-   facility(IN)
-     A pointer to a facility name in the product. It is used to construct a
-     message file name. A message file name follows the conversion with 
-     facility as prefix. For example, the message file name for facility
-     `img' in American language will be `imgus.msb' where `us' is the 
-     abbreviation of American language and `msb' as message binary file 
-     extension.
-   dur(IN)
-     Duration for memory allocation for the return message handle. It can be
-     the following values:
-        OCI_DURATION_CALL
-        OCI_DURATION_STATEMENT
-        OCI_DURATION_SESSION
-        OCI_DURATION_TRANSACTION
-     For the detail description, please refer to Memory Related Service
-     Interfaces section.
-*/
-sword OCIMessageOpen(/*_ dvoid *envhp, OCIError *errhp, OCIMsg **msghp,
-                      CONST OraText *product, CONST OraText *facility, 
-                      OCIDuration dur _*/);
- 
-
-/*------------------------- OCIMessageGet -----------------------------------*/
-/*
-   NAME
-     OCIMessageGet - get a locale message from a message handle
-   REMARKS
-     This function will get message with message number identified by msgno and
-     if buflen is not zero, the function will copy the message into the buffer
-     pointed to by msgbuf. If buflen is zero, the message will be copied into
-     a message buffer inside the message handle pointed to by msgh. For both
-     cases. it will return the pointer to the null-terminated message string.
-     If it cannot get the message required, it will return a NULL pointer.
-   RETURNS
-     A pointer to a null-terminated message string on success, otherwise a NULL
-     pointer.
-   msgh(IN/OUT)
-     Pointer to a message handle which was previously opened by OCIMessageOpen().
-   msgno(IN)
-     The message number for getting message.
-   msgbuf(OUT)
-     Pointer to a destination buffer to the message retrieved. If buflen is
-     zero, it can be NULL pointer.
-   buflen(IN)
-     The size of the above destination buffer.
-*/
-OraText *OCIMessageGet(/*_ OCIMsg *msgh, ub4 msgno, OraText *msgbuf,
-                        size_t buflen _*/);
-
-
-/*------------------------- OCIMessageClose ---------------------------------*/
-/*
-   NAME
-     OCIMessageClose - close a message handle
-   REMARKS
-     This function closes a message handle pointed to by msgh and frees any
-     memory associated with this handle.
-   RETURNS
-     OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
-   envhp(IN/OUT)
-     A pointer to OCI environment handle for message language.
-   errhp(IN/OUT)
-     The OCI error handle. If there is an error, it is record in errhp and this
-     function returns a NULL pointer. Diagnostic information can be obtained by
-     calling OCIErrorGet().
-   msghp(IN/OUT)
-     A pointer to a message handle which was previously opened by
-     OCIMessageOpen().
-*/
-sword OCIMessageClose(/*_ dvoid *envhp, OCIError *errhp, OCIMsg *msghp _*/);
-
-/*--------------- End of Extensions to NLS cartridge service ----------------*/
-
-/*----------------- Extensions to OCI Thread interface ---------------------*/
-/*****************************************************************************
-                              DESCRIPTION
-******************************************************************************
-1 Threads Interface
-
-The OCIThread package provides a number of commonly used threading
-primitives for use by Oracle customers.  It offers a portable interface to
-threading capabilities native to various platforms.  It does not implement
-threading on platforms which do not have native threading capability.
-
-OCIThread does not provide a portable implementation of multithreaded 
-facilities.  It only serves as a set of portable covers for native 
-multithreaded facilities.  Therefore, platforms that do not have native 
-support for multi-threading will only be able to support a limited 
-implementation of OCIThread.  As a result, products that rely on all of 
-OCIThread's functionality will not port to all platforms.  Products that must 
-port to all platforms must use only a subset of OCIThread's functionality.  
-This issue is discussed further in later sections of this document.
-
-The OCIThread API is split into four main parts.  Each part is described
-briefly here.  The following subsections describe each in greater detail.
-
- 1. Initialization and Termination Calls
-
-     These calls deal with the initialization and termination of OCIThread.
-     Initialization of OCIThread initializes the OCIThread context which is
-     a member of the OCI environment or session handle.  This context is 
-     required for other OCIThread calls.
-
- 2. Passive Threading Primitives
-
-     The passive threading primitives include primitives to manipulate mutual
-     exclusion (mutex) locks, thread ID's, and thread-specific data keys.
-
-     The reason that these primitives are described as 'passive' is that while
-     their specifications allow for the existence of multiple threads, they do
-     not require it.  This means that it is possible for these primitives to
-     be implemented according to specification in both single-threaded and
-     multi-threaded environments.
-
-     As a result, OCIThread clients that use only these primitives will not
-     require the existence of multiple threads in order to work correctly,
-     i.e., they will be able to work in single-threaded environments without 
-     branching code.
-
- 3. Active Threading Primitives
-
-     Active threading primitives include primitives dealing with the creation,
-     termination, and other manipulation of threads.
-
-     The reason that these primitives are described as 'active' is that they
-     can only be used in true multi-threaded environments.  Their
-     specifications explicitly require that it be possible to have multiple
-     threads.  If you need to determine at runtime whether or not you are in a
-     multi-threaded environment, call OCIThreadIsMulti() before calling an
-     OCIThread active primitive.
-
-
-1.1 Initialization & Termination
-==================================
-
-The types and functions described in this section are associated with the
-initialization and termination of the OCIThread package.  OCIThread must
-be properly initialized before any of its functionality can be used.
-OCIThread's process initialization function, 'OCIThreadProcessInit()',
-must be called with care; see below.
-
-The observed behavior of the initialization and termination functions is the
-same regardless of whether OCIThread is in single-threaded or multi-threaded
-environment.  It is OK to call the initialization functions from both generic
-and operating system specific (OSD) code.
-
-1.1.1 Types
-
-  OCIThreadContext - OCIThread Context
-  -------------------------------------
-
-    Most calls to OCIThread functions take the OCI environment or session 
-    handle as a parameter.  The OCIThread context is part of the OCI 
-    environment or session handle and it must be initialized by calling 
-    'OCIThreadInit()'.  Termination of the OCIThread context occurs by calling
-    'OCIThreadTerm()'.
-
-    The OCIThread context is a private data structure.  Clients must NEVER
-    attempt to examine the contents of the context.
-
-1.1.2  OCIThreadProcessInit
-
-  OCIThreadProcessInit - OCIThread Process INITialization
-  --------------------------------------------------------
-
-    Description
-
-      This function should be called to perform OCIThread process
-      initialization.
-
-    Prototype
-
-      void OCIThreadProcessInit();
-
-    Returns
-
-      Nothing.
-
-    Notes
-
-      Whether or not this function needs to be called depends on how OCI
-      Thread is going to be used.
-
-        * In a single-threaded application, calling this function is optional.
-          If it is called at all, the first call to it must occur before calls
-          to any other OCIThread functions.  Subsequent calls can be made
-          without restriction; they will not have any effect.
-
-        * In a multi-threaded application, this function MUST be called.  The
-          first call to it MUST occur 'strictly before' any other OCIThread
-          calls; i.e., no other calls to OCIThread functions (including other
-          calls to this one) can be concurrent with the first call.
-          Subsequent calls to this function can be made without restriction;
-          they will not have any effect.
-
-
-1.1.3 OCIThreadInit
-
-  OCIThreadInit - OCIThread INITialize
-  -------------------------------------
-
-    Description
-
-      This initializes OCIThread context.
-
-    Prototype
-
-      sword OCIThreadInit(dvoid *hndl, OCIError *err);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      It is illegal for OCIThread clients to try an examine the memory
-      pointed to by the returned pointer.
-
-      It is safe to make concurrent calls to 'OCIThreadInit()'.  Unlike
-      'OCIThreadProcessInit()',  there is no need to have a first call
-      that occurs before all the others.
-
-      The first time 'OCIThreadInit()' is called, it initilaizes the OCI
-      Thread context.  It also saves a pointer to the context in some system
-      dependent manner.  Subsequent calls to 'OCIThreadInit()' will return
-      the same context.
-
-      Each call to 'OCIThreadInit()' must eventually be matched by a call to
-      'OCIThreadTerm()'.
-
-  OCIThreadTerm - OCIThread TERMinate
-  ------------------------------------
-
-    Description
-
-      This should be called to release the OCIThread context.  It should be
-      called exactly once for each call made to 'OCIThreadInit()'.
-
-    Prototype
-
-      sword OCIThreadTerm(dvoid *hndl, OCIError *err);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      It is safe to make concurrent calls to 'OCIThreadTerm()'.
-
-      'OCIThreadTerm()' will not do anything until it has been called as
-      many times as 'OCIThreadInit()' has been called.  When that happens,
-      it terminates the OCIThread layer and frees the memory allocated for
-      the context.  Once this happens, the context should not be re-used.
-      It will be necessary to obtain a new one by calling 'OCIThreadInit()'.
-
-
-  OCIThreadIsMulti - OCIThread Is Multi-Threaded?
-  ------------------------------------------------
-
-    Description
-
-      This tells the caller whether the application is running in a
-      multi-threaded environment or a single-threaded environment.
-
-    Prototype
-      boolean OCIThreadIsMulti(void);
-
-    Returns
-
-      TRUE if the environment is multi-threaded;
-      FALSE if the environment is single-threaded.
-
-
-1.2 Passive Threading Primitives
-==================================
-
-1.2.1 Types
-
-The passive threading primitives deal with the manipulation of mutex, 
-thread ID's, and thread-specific data.  Since the specifications of these 
-primitives do not require the existence of multiple threads, they can be 
-used both on multithreaded and single-threaded platforms.
-
-1.2.1.1  OCIThreadMutex - OCIThread Mutual Exclusion Lock
------------------------------------------------------------
-
-  The type 'OCIThreadMutex' is used to represent a mutual exclusion lock
-  (mutex).  A mutex is typically used for one of two purposes: (i) to
-  ensure that only one thread accesses a given set of data at a time, or
-  (ii) to ensure that only one thread executes a given critical section of
-  code at a time.
-
-  Mutexes pointer can be declared as parts of client structures or as 
-  stand-alone variables.  Before they can be used, they must be initialized 
-  using 'OCIThreadMutexInit()'.  Once they are no longer needed, they must be
-  destroyed using 'OCIThreadMutexDestroy()'.  A mutex pointer must NOT be 
-  used after it is destroyed.
-
-  A thread can acquire a mutex by using either 'OCIThreadMutexAcquire()' or
-  'OCIThreadMutexTry()'.  They both ensure that only one thread at a time is
-  allowed to hold a given mutex.  A thread that holds a mutex can release it
-  by calling 'OCIThreadMutexRelease()'.
-
-
-1.2.1.2  OCIThreadKey - OCIThread Key for Thread-Specific Data
-----------------------------------------------------------------
-
-  A key can be thought of as a process-wide variable that has a
-  thread-specific value.  What this means is that all the threads in a
-  process can use any given key.  However, each thread can examine or modify
-  that key independently of the other threads.  The value that a thread sees
-  when it examines the key will always be the same as the value that it last
-  set for the key.  It will not see any values set for the key by the other
-  threads.
-
-  The type of the value held by a key is a 'dvoid *' generic pointer.
-
-  Keys can be created using 'OCIThreadKeyInit()'.  When a key is created, its
-  value is initialized to 'NULL' for all threads.
-
-  A thread can set a key's value using 'OCIThreadKeySet()'.  A thread can
-  get a key's value using 'OCIThreadKeyGet()'.
-
-  The OCIThread key functions will save and retrieve data SPECIFIC TO THE
-  THREAD.  When clients maintain a pool of threads and assign the threads to
-  different tasks, it *may not* be appropriate for a task to use OCIThread
-  key functions to save data associated with it.  Here is a scenario of how
-  things can fail: A thread is assigned to execute the initialization of a
-  task.  During the initialization, the task stored some data related to it
-  in the thread using OCIThread key functions.  After the initialization,
-  the thread is returned back to the threads pool.  Later, the threads pool
-  manager assigned another thread to perform some operations on the task,
-  and the task needs to retrieve those data it stored earlier in
-  initialization.  Since the task is running in another thread, it will not
-  be able to retrieve the same data back!  Applications that use thread
-  pools should be aware of this and be cautious when using OCIThread key
-  functions.
-
-
-1.2.1.3  OCIThreadKeyDestFunc - OCIThread Key Destructor Function Type
-------------------------------------------------------------------------
-
-  This is the type of a pointer to a key's destructor routine.  Keys can be
-  associated with a destructor routine when they are created (see
-  'OCIThreadKeyInit()').
-
-  A key's destructor routine will be called whenever a thread that has a
-  non-NULL value for the key terminates.
-
-  The destructor routine returns nothing and takes one parameter.  The
-  parameter will be the value that was set for key when the thread
-  terminated.
-
-  The destructor routine is guaranteed to be called on a thread's value
-  in the key after the termination of the thread and before process
-  termination.  No more precise guarantee can be made about the timing
-  of the destructor routine call; thus no code in the process may assume
-  any post-condition of the destructor routine.  In particular, the
-  destructor is not guaranteed to execute before a join call on the
-  terminated thread returns.
-
-
-1.2.1.4  OCIThreadId - OCIThread Thread ID
---------------------------------------------
-
-  Type 'OCIThreadId' is the type that will be used to identify a thread.
-  At any given time, no two threads will ever have the same 'OCIThreadId'.
-  However, 'OCIThreadId' values can be recycled; i.e., once a thread dies,
-  a new thread may be created that has the same 'OCIThreadId' as the one
-  that died.  In particular, the thread ID must uniquely identify a thread
-  T within a process, and it must be consistent and valid in all threads U
-  of the process for which it can be guaranteed that T is running
-  concurrently with U.  The thread ID for a thread T must be retrievable
-  within thread T.  This will be done via OCIThreadIdGet().
-
-  The 'OCIThreadId' type supports the concept of a NULL thread ID: the NULL
-  thread ID will never be the same as the ID of an actual thread.
-
-
-
-1.2.2 Function prototypes for passive primitives
---------------------------------------------------
-
-1.2.2.1 Mutex functions
--------------------------
-
-  OCIThreadMutexInit - OCIThread MuteX Initialize
-  -----------------------------------------------
-
-    Description
-
-      This allocate and initializes a mutex.  All mutexes must be 
-      initialized prior to use.
-
-    Prototype
-
-      sword OCIThreadMutexInit(dvoid *hndl, OCIError *err, 
-                               OCIThreadMutex **mutex);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        mutex(OUT):  The mutex to initialize.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      Multiple threads must not initialize the same mutex simultaneously.
-      Also, a mutex must not be reinitialized until it has been destroyed (see
-      'OCIThreadMutexDestroy()').
-
-  OCIThreadMutexDestroy - OCIThread MuteX Destroy
-  -----------------------------------------------
-
-    Description
-
-      This destroys and deallocate a mutex.  Each mutex must be destroyed 
-      once it is no longer needed.
-
-    Prototype
-
-      sword OCIThreadMutexDestroy(dvoid *hndl, OCIError *err,
-                                  OCIThreadMutex **mutex);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        mutex(IN/OUT):   The mutex to destroy.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      It is not legal to destroy a mutex that is uninitialized or is currently
-      held by a thread.  The destruction of a mutex must not occur concurrently
-      with any other operations on the mutex.  A mutex must not be used after
-      it has been destroyed.
-
-
-  OCIThreadMutexAcquire - OCIThread MuteX Acquire
-  -----------------------------------------------
-
-    Description
-
-      This acquires a mutex for the thread in which it is called.  If the mutex
-      is held by another thread, the calling thread is blocked until it can
-      acquire the mutex.
-
-    Prototype
-
-     sword OCIThreadMutexAcquire(dvoid *hndl, OCIError *err,
-                                 OCIThreadMutex *mutex);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error, it is 
-                     recorded in err and this function returns OCI_ERROR.  
-                     Diagnostic information can be obtained by calling 
-                     OCIErrorGet().
-
-        mutex(IN/OUT):   The mutex to acquire.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      It is illegal to attempt to acquire an uninitialized mutex.
-
-      This function's behavior is undefined if it is used by a thread to
-      acquire a mutex that is already held by that thread.
-
-
-
-  OCIThreadMutexRelease - OCIThread MuteX Release
-  -----------------------------------------------
-
-    Description
-
-      This releases a mutex.  If there are any threads blocked on the mutex,
-      one of them will acquire it and become unblocked.
-
-    Prototype
-
-      sword OCIThreadMutexRelease(dvoid *hndl, OCIError *err,
-                                  OCIThreadMutex *mutex);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        mutex(IN/OUT):   The mutex to release.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      It is illegal to attempt to release an uninitialized mutex.  It is also
-      illegal for a thread to release a mutex that it does not hold.
-
-
-  OCIThreadKeyInit - OCIThread KeY Initialize
-  -------------------------------------------
-
-    Description
-
-      This creates a key.  Each call to this routine allocate and generates 
-      a new key that is distinct from all other keys.
-
-    Prototype
-
-      sword OCIThreadKeyInit(dvoid *hndl, OCIError *err, OCIThreadKey **key,
-                             OCIThreadKeyDestFunc destFn);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        key(OUT):    The 'OCIThreadKey' in which to create the new key.
-
-        destFn(IN):  The destructor for the key.  NULL is permitted.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      Once this function executes successfully, a pointer to an allocated and 
-      initialized key is return.  That key can be used with 'OCIThreadKeyGet()'
-      and 'OCIThreadKeySet()'.  The initial value of the key will be 'NULL' for
-      all threads.
-
-      It is illegal for this function to be called more than once to create the
-      same key (i.e., to be called more than once with the same value for the
-      'key' parameter).
-
-      If the 'destFn' parameter is not NULL, the routine pointed to by 'destFn'
-      will be called whenever a thread that has a non-NULL value for the key
-      terminates.  The routine will be called with one parameter.  The
-      parameter will be the key's value for the thread at the time at which the
-      thread terminated.
-      If the key does not need a destructor function, pass NULL for 'destFn'.
-
-
-  OCIThreadKeyDestroy - OCIThread KeY DESTROY
-  -------------------------------------------
-
-   Description
-
-     Destroy and deallocate the key pointed to by 'key'.
-
-    Prototype
-
-      sword OCIThreadKeyDestroy(dvoid *hndl, OCIError *err, 
-                                OCIThreadKey **key);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        key(IN/OUT):  The 'OCIThreadKey' in which to destroy the key.
- 
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      This is different from the destructor function callback passed to the
-      key create routine.  This new destroy function 'OCIThreadKeyDestroy' is 
-      used to terminate any resources OCI THREAD acquired when it created 
-      'key'.  [The 'OCIThreadKeyDestFunc' callback type is a key VALUE 
-      destructor; it does in no way operate on the key itself.]
-
-      This must be called once the user has finished using the key.  Not
-      calling the key destroy function may result in memory leaks.
-
-
-
-
-1.2.2.2 Thread Key operations
--------------------------------
-
-  OCIThreadKeyGet - OCIThread KeY Get value
-  -----------------------------------------
-
-    Description
-
-      This gets the calling thread's current value for a key.
-
-    Prototype
-
-      sword OCIThreadKeyGet(dvoid *hndl, OCIError *err, OCIThreadKey *key,
-                            dvoid **pValue);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        key(IN):          The key.
-
-        pValue(IN/OUT):   The location in which to place the thread-specific
-                          key value.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      It is illegal to use this function on a key that has not been created
-      using 'OCIThreadKeyInit()'.
-
-      If the calling thread has not yet assigned a value to the key, 'NULL' is
-      placed in the location pointed to by 'pValue'.
-
-
-  OCIThreadKeySet - OCIThread KeY Set value
-  -----------------------------------------
-
-    Description
-
-      This sets the calling thread's value for a key.
-
-    Prototype
-
-      sword OCIThreadKeySet(dvoid *hndl, OCIError *err, OCIThreadKey *key,
-                            dvoid *value);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        key(IN/OUT): The key.
-
-        value(IN):   The thread-specific value to set in the key.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      It is illegal to use this function on a key that has not been created
-      using 'OCIThreadKeyInit()'.
-
-1.2.2.3  Thread Id
---------------------
-
-  OCIThreadIdInit - OCIThread Thread Id INITialize
-  --------------------------------------------------
-
-    Description
-
-      Allocate and initialize the thread id 'tid'.
-
-    Prototype
-
-      sword OCIThreadIdInit(dvoid *hndl, OCIError *err, OCIThreadId **tid);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        tid (OUT):   Pointer to the thread ID to initialize.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-
-  OCIThreadIdDestroy - OCIThread Thread Id DESTROY
-  --------------------------------------------------
-
-    Description
-
-      Destroy and deallocate the thread id 'tid'.
-
-    Prototype
-
-      sword OCIThreadIdDestroy(dvoid *hndl, OCIError *err, OCIThreadId **tid);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        tid(IN/OUT):        Pointer to the thread ID to destroy.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Note
-
-      'tid' should be initialized by OCIThreadIdInit().
-
-
-  OCIThreadIdSet - OCIThread Thread Id Set
-  -----------------------------------------
-
-    Description
-
-      This sets one 'OCIThreadId' to another.
-
-    Prototype
-
-      sword OCIThreadIdSet(dvoid *hndl, OCIError *err, 
-                           OCIThreadId *tidDest,
-                           OCIThreadId *tidSrc);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        tidDest(OUT):   This should point to the location of the 'OCIThreadId'
-                        to be set to.
-
-        tidSrc(IN):     This should point to the 'OCIThreadId' to set from.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      'tid' should be initialized by OCIThreadIdInit().
-
-
-  OCIThreadIdSetNull - OCIThread Thread Id Set Null
-  ---------------------------------------------------------
-
-    Description
-
-      This sets the NULL thread ID to a given 'OCIThreadId'.
-
-    Prototype
-
-      sword OCIThreadIdSetNull(dvoid *hndl, OCIError *err,
-                               OCIThreadId *tid);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error, it is 
-                     recorded in err and this function returns OCI_ERROR.  
-                     Diagnostic information can be obtained by calling 
-                     OCIErrorGet().
-
-        tid(OUT):    This should point to the 'OCIThreadId' in which to put
-                     the NULL thread ID.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      'tid' should be initialized by OCIThreadIdInit().
-
-
-  OCIThreadIdGet - OCIThread Thread Id Get
-  ------------------------------------------
-
-    Description
-
-      This retrieves the 'OCIThreadId' of the thread in which it is called.
-
-    Prototype
-
-      sword OCIThreadIdGet(dvoid *hndl, OCIError *err,
-                           OCIThreadId *tid);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        tid(OUT):    This should point to the location in which to place the
-                     ID of the calling thread.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      'tid' should be initialized by OCIThreadIdInit().
-
-      When OCIThread is used in a single-threaded environment,
-      OCIThreadIdGet() will always place the same value in the location
-      pointed to by 'tid'.  The exact value itself is not important.  The
-      important thing is that it is not the same as the NULL thread ID and
-      that it is always the same value.
-
-
-  OCIThreadIdSame - OCIThread Thread Ids Same?
-  ----------------------------------------------
-
-    Description
-
-      This determines whether or not two 'OCIThreadId's represent the same
-      thread.
-
-    Prototype
-
-      sword OCIThreadIdSame(dvoid *hndl, OCIError *err,
-                            OCIThreadId *tid1, OCIThreadId *tid2,
-                            boolean *result);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        tid1(IN):   Pointer to the first 'OCIThreadId'.
-
-        tid2(IN):   Pointer to the second 'OCIThreadId'.
-	
-	result(IN/OUT): Pointer to the result.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      If 'tid1' and 'tid2' represent the same thread, 'result' is set to TRUE.
-      Otherwise, 'result' is set to FALSE.
-
-      'result' is set to TRUE if both 'tid1' and 'tid2' are the NULL thread ID.
-
-      'ti1d' and 'tid2' should be initialized by OCIThreadIdInit().
-
-
-  OCIThreadIdNull - OCIThread Thread Id NULL?
-  ---------------------------------------------
-
-    Description
-
-      This determines whether or not a given 'OCIThreadId' is the NULL thread
-      ID.
-
-    Prototype
-
-      sword OCIThreadIdNull(dvoid *hndl, OCIError *err,
-                            OCIThreadId *tid,
-                            boolean *result);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        tid(IN):    Pointer to the 'OCIThreadId' to check.
-
-	result(IN/OUT): Pointer to the result.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      If 'tid' is the NULL thread ID, 'result' is set to TRUE.  Otherwise, 
-      'result' is set to FALSE.
-
-      'tid' should be initialized by OCIThreadIdInit().
-
-
-1.3 Active Threading Primitives
-=================================
-
-The active threading primitives deal with the manipulation of actual
-threads.  Because the specifications of most of these primitives require
-that it be possible to have multiple threads, they work correctly only in
-the enabled OCIThread; In the disabled OCIThread, they always return
-failure.  The exception is OCIThreadHandleGet(); it may be called in a 
-single-threaded environment, in which case it will have no effect.
-
-Active primitives should only be called by code running in a multi-threaded
-environment.  You can call OCIThreadIsMulti() to determine whether the 
-environment is multi-threaded or single-threaded.
-
-
-1.3.1  Types
---------------
-
-1.3.1.1    OCIThreadHandle - OCIThread Thread Handle
-------------------------------------------------------
-
-  Type 'OCIThreadHandle' is used to manipulate a thread in the active
-  primitives:  OCIThreadJoin()and OCIThreadClose().  A thread handle opened by
-  OCIThreadCreate() must be closed in a matching call to
-  OCIThreadClose().  A thread handle is invalid after the call to
-  OCIThreadClose().
-
-  The distinction between a thread ID and a thread handle in OCIThread usage
-  follows the distinction between the thread ID and the thread handle on
-  Windows NT.  On many platforms, the underlying native types are the same.
-
-
-1.3.2  Functions
-------------------
-
-  OCIThreadHndInit - OCIThread HaNDle Initialize
-  ----------------------------------------------
-
-    Description
-
-      Allocate and initialize the thread handle.
-
-    Prototype
-
-      sword OCIThreadHndInit(dvoid *hndl, OCIError *err, 
-                             OCIThreadHandle **thnd);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        thnd(OUT):   The address of pointer to the thread handle to initialize.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-
-  OCIThreadHndDestroy - OCIThread HaNDle Destroy
-  ----------------------------------------------
-
-    Description
-
-      Destroy and deallocate the thread handle.
-
-    Prototype
-
-      sword OCIThreadHndDestroy(dvoid *hndl, OCIError *err, 
-                                OCIThreadHandle **thnd);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        thnd(IN/OUT):  The address of pointer to the thread handle to destroy.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      'thnd' should be initialized by OCIThreadHndInit().
-
-
-  OCIThreadCreate - OCIThread Thread Create
-  -----------------------------------------
-
-    Description
-
-      This creates a new thread.
-
-    Prototype
-
-      sword OCIThreadCreate(dvoid *hndl, OCIError *err,
-                            void (*start)(dvoid *), dvoid *arg,
-                            OCIThreadId *tid, OCIThreadHandle *tHnd);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        start(IN):    The function in which the new thread should begin
-                      execution.
-
-        arg(IN):      The argument to give the function pointed to by 'start'.
-
-        tid(IN/OUT):  If not NULL, gets the ID for the new thread.
-
-        tHnd(IN/OUT): If not NULL, gets the handle for the new thread.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      The new thread will start by executing a call to the function pointed
-      to by 'start' with the argument given by 'arg'.  When that function
-      returns, the new thread will terminate.  The function should not
-      return a value and should accept one parameter, a 'dvoid *'.
-
-      The call to OCIThreadCreate() must be matched by a call to
-      OCIThreadClose() if and only if tHnd is non-NULL.
-
-      If tHnd is NULL, a thread ID placed in *tid will not be valid in the
-      calling thread because the timing of the spawned thread's termination
-      is unknown.
-
-      'tid' should be initialized by OCIThreadIdInit().
-
-      'thnd' should be initialized by OCIThreadHndInit().
-
-
-
-  OCIThreadJoin - OCIThread Thread Join
-  -------------------------------------
-
-    Description
-
-      This function allows the calling thread to 'join' with another thread.
-      It blocks the caller until the specified thread terminates.
-
-    Prototype
-
-      sword OCIThreadJoin(dvoid *hndl, OCIError *err, OCIThreadHandle *tHnd);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        tHnd(IN):    The 'OCIThreadHandle' of the thread to join with.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      'thnd' should be initialized by OCIThreadHndInit().
-
-      The result of multiple threads all trying to join with the same thread is
-      undefined.
-
-
-  OCIThreadClose - OCIThread Thread Close
-  ---------------------------------------
-
-   Description
-
-     This function should be called to close a thread handle.
-
-   Prototype
-
-     sword OCIThreadClose(dvoid *hndl, OCIError *err, OCIThreadHandle *tHnd);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        tHnd(IN/OUT):    The OCIThread thread handle to close.
-
-   Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-   Notes
-
-      'thnd' should be initialized by OCIThreadHndInit().
-
-      Both thread handle and the thread ID that was returned by the same call
-      to OCIThreadCreate() are invalid after the call to OCIThreadClose().
-
-
-
-  OCIThreadHandleGet - OCIThread Thread Get Handle
-  ------------------------------------------------
-
-    Description
-
-      Retrieve the 'OCIThreadHandle' of the thread in which it is called.
-
-    Prototype
-
-      sword OCIThreadHandleGet(dvoid *hndl, OCIError *err,
-                               OCIThreadHandle *tHnd);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        tHnd(IN/OUT):      If not NULL, the location to place the thread
-                           handle for the thread.
-
-     Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      'thnd' should be initialized by OCIThreadHndInit().   
-
-      The thread handle 'tHnd' retrieved by this function must be closed 
-      with OCIThreadClose() and destroyed by OCIThreadHndDestroy() after it
-      is used.
-
-
-
-
-1.4 Using OCIThread
-=====================
-
-This section summarizes some of the more important details relating to the use
-of OCIThread.
-
-  * Process initialization
-
-    OCIThread only requires that the process initialization function
-    ('OCIThreadProcessInit()') be called when OCIThread is being used in a
-    multi-threaded application.  Failing to call 'OCIThreadProcessInit()' in
-    a single-threaded application is not an error.
-
-  * OCIThread initialization
-
-    Separate calls to 'OCIThreadInit()' will all return the same OCIThread
-    context.
-
-    Also, remember that each call to 'OCIThreadInit()' must eventually be
-    matched by a call to 'OCIThreadTerm()'.
-
-  * Active vs. Passive Threading primitives
-
-    OCIThread client code written without using any active primitives can be
-    compiled and used without change on both single-threaded and
-    multi-threaded platforms.
-
-    OCIThread client code written using active primitives will only work
-    correctly on multi-threaded platforms.  In order to write a version of the
-    same application to run on single-threaded platform, it is necessary to 
-    branch the your code, whether by branching versions of the source file or 
-    by branching at runtime with the OCIThreadIsMulti() call.
-******************************************************************************/
-
-/*****************************************************************************
-                         ACTUAL PROTOTYPE DECLARATIONS
-******************************************************************************/
-
-void OCIThreadProcessInit(/*_ _*/);
-
-sword OCIThreadInit(/*_ dvoid *hndl, OCIError *err _*/);
-
-sword OCIThreadTerm(/*_ dvoid *hndl, OCIError *err _*/);
-
-boolean OCIThreadIsMulti(/*_ void _*/);
-
-sword OCIThreadMutexInit(/*_ dvoid *hndl, OCIError *err, 
-                             OCIThreadMutex **mutex _*/);
-
-sword OCIThreadMutexDestroy(/*_ dvoid *hndl, OCIError *err, 
-                                OCIThreadMutex **mutex _*/);
-
-sword OCIThreadMutexAcquire(/*_ dvoid *hndl, OCIError *err,
-                                OCIThreadMutex *mutex _*/);
-
-sword OCIThreadMutexRelease(/*_ dvoid *hndl, OCIError *err,
-                                OCIThreadMutex *mutex _*/);
-
-sword OCIThreadKeyInit(/*_ dvoid *hndl, OCIError *err, OCIThreadKey **key,
-                           OCIThreadKeyDestFunc destFn _*/);
-
-sword OCIThreadKeyDestroy(/*_ dvoid *hndl, OCIError *err, 
-                              OCIThreadKey **key _*/);
-
-sword OCIThreadKeyGet(/*_ dvoid *hndl, OCIError *err, OCIThreadKey *key,
-                          dvoid **pValue _*/);
-
-sword OCIThreadKeySet(/*_ dvoid *hndl, OCIError *err, OCIThreadKey *key,
-                          dvoid *value _*/);
-
-sword OCIThreadIdInit(/*_ dvoid *hndl, OCIError *err, OCIThreadId **tid _*/);
-
-sword OCIThreadIdDestroy(/*_ dvoid *hndl, OCIError *err, 
-                             OCIThreadId **tid _*/);
-
-sword OCIThreadIdSet(/*_ dvoid *hndl, OCIError *err, 
-                         OCIThreadId *tidDest, OCIThreadId *tidSrc _*/);
-
-sword OCIThreadIdSetNull(/*_ dvoid *hndl, OCIError *err, OCIThreadId *tid _*/);
-
-sword OCIThreadIdGet(/*_ dvoid *hndl, OCIError *err, OCIThreadId *tid _*/);
-
-sword OCIThreadIdSame(/*_ dvoid *hndl, OCIError *err,
-                          OCIThreadId *tid1, OCIThreadId *tid2,
-                          boolean *result _*/);
-
-sword OCIThreadIdNull(/*_ dvoid *hndl, OCIError *err,
-                          OCIThreadId *tid, boolean *result _*/);
-
-sword OCIThreadHndInit(/*_ dvoid *hndl, OCIError *err, 
-                           OCIThreadHandle **thnd _*/);
-
-sword OCIThreadHndDestroy(/*_ dvoid *hndl, OCIError *err, 
-                              OCIThreadHandle **thnd _*/);
-
-sword OCIThreadCreate(/*_ dvoid *hndl, OCIError *err,
-                          void (*start)(dvoid *), dvoid *arg,
-                          OCIThreadId *tid, OCIThreadHandle *tHnd _*/);
-
-sword OCIThreadJoin(/*_ dvoid *hndl, OCIError *err, OCIThreadHandle *tHnd _*/);
-
-sword OCIThreadClose(/*_ dvoid *hndl, OCIError *err, 
-                         OCIThreadHandle *tHnd _*/);
-
-sword OCIThreadHandleGet(/*_ dvoid *hndl, OCIError *err, 
-                             OCIThreadHandle *tHnd _*/);
-/*----------------- End OCI Thread interface Extensions ---------------------*/
-
-/*--------------- Begin OCI Client Notification Interfaces ------------------*/
-
-typedef ub4 (*OCISubscriptionNotify)(/*_ dvoid *ctx, OCISubscription *subscrhp,
-                                         dvoid *pay, ub4 payl,
-                                         dvoid *desc, ub4 mode _*/);
-
-sword OCISubscriptionRegister (/*_ OCISvcCtx *svchp, 
-                              OCISubscription **subscrhpp, ub2 count, 
-                              OCIError *errhp, ub4 mode _*/);
-
-sword OCISubscriptionPost (/*_ OCISvcCtx *svchp, OCISubscription **subscrhpp,
-                               ub2 count, OCIError *errhp, ub4 mode _*/);
-
-sword OCISubscriptionUnRegister (/*_ OCISvcCtx *svchp, 
-                                OCISubscription *subscrhp, OCIError *errhp, 
-                                ub4 mode _*/);
-
-sword OCISubscriptionDisable (/*_ OCISubscription *subscrhp,
-                                  OCIError *errhp, ub4 mode _*/);
-
-sword OCISubscriptionEnable (/*_ OCISubscription *subscrhp,
-                                 OCIError *errhp, ub4 mode _*/);
-
-/*------------------- End OCI Client Notification Interfaces ----------------*/
-
-/*----------------- Extensions to Datetime interfaces -----------------------*/
-
-sword OCIDateTimeGetTime(/*_ dvoid *hndl, OCIError *err, 
-			   OCIDateTime *datetime, ub1 *hour, ub1 *min, 
-			   ub1 *sec, ub4 *fsec_*/);
-
-sword OCIDateTimeGetDate(/*_dvoid *hndl, OCIError *err, 
-			   CONST OCIDateTime *date,
-			   sb2 *year, ub1 *month, ub1 *day _*/);
-
-sword OCIDateTimeGetTimeZoneOffset(/*_ dvoid *hndl,OCIError *err,
-                  CONST OCIDateTime   *datetime,sb1 *hour,sb1 *minute _*/);
-
-sword OCIDateTimeConstruct(/*_ dvoid  *hndl,OCIError *err,
-               OCIDateTime *datetime,
-               sb2 yr,ub1 mnth,ub1 dy,ub1 hr,ub1 mm,ub1 ss,ub4 fsec,
-               OraText  *timezone,size_t timezone_length _*/);
-
-sword OCIDateTimeSysTimeStamp(/*_ dvoid *hndl, OCIError *err, 
-                              OCIDateTime *sys_date _*/);
-
-sword OCIDateTimeAssign(/*_dvoid *hndl, OCIError *err, CONST OCIDateTime *from,
-			 OCIDateTime *to_*/);
-
-sword OCIDateTimeToText(/*_ dvoid *hndl, OCIError *err, 
-                  CONST OCIDateTime *date, CONST OraText *fmt, 
-                  ub1 fmt_length, ub1 fsprec, CONST OraText *lang_name, 
-                  size_t lang_length,
-                  ub4 *buf_size, OraText *buf _*/);
-
-sword OCIDateTimeFromText(/*_ dvoid *hndl, OCIError *err, CONST OraText *dstr,
-                     size_t d_str_length, CONST OraText *fmt, ub1 fmt_length, 
-                     CONST OraText *lang_name, size_t lang_length, 
-                     OCIDateTime *date _*/);
-
-sword OCIDateTimeCompare(/*_ dvoid *hndl, OCIError *err, 
-                     CONST OCIDateTime *date1, CONST OCIDateTime *date2, 
-                     sword *result _*/);
-
-sword OCIDateTimeCheck(/*_ dvoid *hndl, OCIError *err, CONST OCIDateTime *date,
-		 ub4 *valid _*/);
-
-sword OCIDateTimeConvert(/*_ dvoid *hndl, OCIError *err, OCIDateTime *indate, 
-                      OCIDateTime *outdate_*/);
-
-sword OCIDateTimeSubtract(/*_ dvoid *hndl, OCIError *err, OCIDateTime *indate1,
-        OCIDateTime *indate2,	 OCIInterval *inter_*/);
-
-sword OCIDateTimeIntervalAdd(/*_ dvoid *hndl, OCIError *err, 
-                        OCIDateTime *datetime, OCIInterval *inter, 
-                        OCIDateTime *outdatetime_*/);
-
-sword OCIDateTimeIntervalSub(/*_ dvoid *hndl, OCIError *err, 
-                        OCIDateTime *datetime, OCIInterval *inter, 
-                        OCIDateTime *outdatetime_*/);
-
-sword OCIIntervalSubtract(/*_ dvoid *hndl, OCIError *err, 
-       OCIInterval *minuend, OCIInterval *subtrahend, OCIInterval *result _*/);
-
-sword OCIIntervalAdd(/*_ dvoid *hndl, OCIError *err, OCIInterval *addend1, 
-			OCIInterval *addend2, OCIInterval *result _*/);
-
-sword OCIIntervalMultiply(/*_ dvoid *hndl, OCIError *err, 
-                        CONST OCIInterval *ifactor, OCINumber *nfactor, 
-                        OCIInterval *result _*/);
-
-sword OCIIntervalDivide(/*_ dvoid *hndl, OCIError *err, OCIInterval *dividend, 
-		OCINumber *divisor, OCIInterval *result _*/);
-
-sword OCIIntervalCompare(/*_ dvoid *hndl, OCIError *err, OCIInterval *inter1, 
-			OCIInterval *inter2, sword *result _*/);
-
-sword OCIIntervalFromNumber(/*_ dvoid *hndl, OCIError *err, 
-              OCIInterval *interval, OCINumber *number _*/);
-
-sword OCIIntervalFromText(/*_dvoid *hndl, OCIError *err, CONST OraText *inpstr,
-		size_t str_len, OCIInterval *result _*/);
-
-sword OCIIntervalToText(/*_  dvoid *hndl, OCIError *err,
-                     CONST OCIInterval *interval, ub1 lfprec, ub1 fsprec, 
-                     OraText *buffer, size_t buflen, size_t *resultlen _*/);
-
-sword OCIIntervalToNumber(/*_ dvoid *hndl, OCIError *err, 
-              CONST OCIInterval *interval, OCINumber *number _*/);
-
-sword OCIIntervalCheck(/*_dvoid *hndl, OCIError *err, CONST OCIInterval *inter,
-			 ub4 *valid _*/);
-
-sword OCIIntervalAssign(/*_ dvoid *hndl, OCIError *err, 
-                  CONST OCIInterval *inpinter, OCIInterval *outinter _*/);
-
-sword OCIIntervalSetYearMonth(/*_dvoid *hndl, OCIError *err, sb4 yr, sb4 mnth,
-                        OCIInterval *result _*/);
-
-sword OCIIntervalGetYearMonth(/*_dvoid *hndl, OCIError *err, sb4 *yr, sb4 *mnt,
-                        CONST OCIInterval *result _*/);
-
-sword OCIIntervalSetDaySecond(/*_dvoid *hndl, OCIError *err, sb4 dy, sb4 hr,
-                        sb4 mm, sb4 ss, sb4 fsec, OCIInterval *result _*/);
-
-sword OCIIntervalGetDaySecond(/*_dvoid *hndl, OCIError *err, sb4 *dy, sb4 *hr,
-                   sb4 *mm, sb4 *ss, sb4 *fsec, CONST OCIInterval *result _*/);
-
-sword OCIDateTimeToArray(/*_dvoid *hndl, OCIError *err,
-                         CONST OCIDateTime *datetime, CONST OCIInterval *reftz,
-                         ub1 *outarray, ub4 len, ub1 fsprec _*/);
-
-sword OCIDateTimeFromArray(/*_dvoid *hndl, OCIError *err, ub1 *inarray,
-                           ub4 len, ub1 type, OCIDateTime *datetime,
-                           CONST OCIInterval *reftz, ub1 fsprec _*/);
-
-sword OCIDateTimeGetTimeZoneName(/*_dvoid *hndl, OCIError *err,
-                                 CONST OCIDateTime *datetime, 
-                                 ub1 *buf, ub4 *buflen _*/);
-
-sword OCIIntervalFromTZ(/*_ dvoid *hndl, OCIError *err,
-                        CONST oratext *inpstring, size_t str_len,
-                        OCIInterval *result _*/);
-
-/*----------------- End Datetime interface Extensions -----------------------*/
-
-/*------------------------ OCIAnyDataSet interfaces -------------------------*/
-
-/*
-   NAME
-     OCIAnyDataSetBeginCreate - OCIAnyDataSet Begin Creation
-   PARAMETERS
-     svchp (IN/OUT) - The OCI service context.
-     errhp (IN/OUT) - The OCI error handle. If there is an error, it is
-                      recorded in errhp and this function returns OCI_ERROR.
-                      Diagnostic information can be obtained by calling
-                      OCIErrorGet().
-     typecode       - typecode corresponding to the OCIAnyDataSet.
-     type (IN)      - type corresponding to the OCIAnyDataSet. If the typecode
-                      corresponds to a built-in type (OCI_TYPECODE_NUMBER etc.)
-                      , this parameter can be NULL. It should be non NULL for
-                      user defined types (OCI_TYPECODE_OBJECT,
-                      OCI_TYPECODE_REF, collection types etc.)
-     dur (IN)       - duration for which OCIAnyDataSet is allocated.
-     data_set (OUT) - Initialized OCIAnyDataSet.
-     RETURNS        - error code
-   NOTES
-     This call allocates an OCIAnyDataSet for the duration of dur and
-     initializes it with the type information. The OCIAnyDataSet can hold
-     multiple instances of the given type. For performance reasons, the 
-     OCIAnyDataSet will end up pointing to the passed in OCIType parameter.
-     It is the responsibility of the caller to ensure that the OCIType is
-     longer lived (has allocation duration >= the duration of the OCIAnyData
-     if the OCIType is a transient one, allocation/pin duration >= duration of
-     the OCIAnyData if the OCIType is a persistent one).
-
-*/
-sword OCIAnyDataSetBeginCreate(/*_ OCISvcCtx *svchp, OCIError *errhp,
-     OCITypeCode typecode, CONST OCIType *type, OCIDuration dur,
-     OCIAnyDataSet ** data_set _*/);
-
-/*
-   NAME
-     OCIAnyDataSetDestroy  - OCIAnyDataSet Destroy
-   DESCRIPTION
-     This call frees the OCIAnyDataSet allocated using
-     OCIAnyDataSetBeginCreate().
-   RETURNS
-     error code.
-   PARAMETERS
-     svchp (IN/OUT)    - The OCI service context.
-     errhp (IN/OUT)    - The OCI Error handle.
-     data_set (IN/OUT) - OCIAnyDataSet to be freed.
-*/
-sword OCIAnyDataSetDestroy(/*_ OCISvcCtx *svchp, OCIError *errhp,
-     OCIAnyDataSet *data_set _*/);
-
-/*
-   NAME
-     OCIAnyDataSetAddInstance - OCIAnyDataSet Add an instance
-   DESCRIPTION
-     This call adds a new skeleton instance to the OCIAnyDataSet and all the
-     attributes of the instance are set to NULL. It returns this skeleton
-     instance through the OCIAnyData parameter which can be constructed
-     subsequently by invoking the OCIAnyData API.
-   RETURNS
-     error code.
-   PARAMETERS
-     svchp (IN/OUT)      - The OCI service context.
-     errhp (IN/OUT)      - The OCI Error handle.
-     data_set (IN/OUT)   - OCIAnyDataSet to which a new instance is added.
-     data (IN/OUT)       - OCIAnyData corresponding to the newly added
-                           instance. If (*data) is NULL, a new OCIAnyData will
-                           be allocated for same duration as the OCIAnyDataSet.
-                           If (*data) is not NULL, it will get reused. This
-                           OCIAnyData can be subseqently constructed using the
-                           OCIAnyDataConvert() call or it can be constructed
-                           piece-wise using the OCIAnyDataAttrSet and
-                           OCIAnyDataCollAddElem calls.
-   NOTES
-     No Destruction of the old value is done here. It is the responsibility of
-     the caller to destroy the old value pointed to by (*data) and set (*data)
-     to a null pointer before beginning to make a sequence of this call. No
-     deep copying (of OCIType information nor the data part.) is done in the
-     returned OCIAnyData. This OCIAnyData cannot be used beyond the allocation
-     duration of the OCIAnyDataSet (it is like a reference into the
-     OCIAnyDataSet). The returned OCIAnyData can be reused on subsequent calls
-     to this function, to sequentially add new data instances to the
-     OCIAnyDataSet.
-*/
-sword OCIAnyDataSetAddInstance(/*_ OCISvcCtx *svchp, OCIError *errhp,
-     OCIAnyDataSet *data_set, OCIAnyData **data _*/);
-
-/*
-   NAME
-     OCIAnyDataSetEndCreate - OCIAnyDataSet End Creation process.
-   DESCRIPTION
-     This call marks the end of OCIAnyDataSet creation. It should be called
-     after constructing all of its instance(s).
-   RETURNS
-     error code.
-   PARAMETERS
-     svchp (IN/OUT)        - The OCI service context.
-     errhp (IN/OUT)        - The OCI error handle. If there is an error, it is
-                             recorded in errhp and this function returns
-                             OCI_ERROR. Diagnostic information can be obtained
-                             by calling OCIErrorGet().
-     data_set (IN/OUT)     - OCIAnyDataSet that has been fully constructed.
-*/
-sword OCIAnyDataSetEndCreate(/*_ OCISvcCtx *svchp, OCIError *errhp,
-     OCIAnyDataSet *data_set _*/);
-
-/*
-   NAME
-     OCIAnyDataSetGetType - OCIAnyDataSet Get Type of an OCIAnyDataSet
-   DESCRIPTION
-     Gets the Type corresponding to an OCIAnyDataSet. It returns the actual
-     pointer to the type maintained inside an OCIAnyDataSet. No copying is
-     done for performance reasons. The client is responsible for not using
-     this type once the OCIAnyDataSet is freed (or its duration ends).
-   RETURNS
-     error code.
-   PARAMETERS
-     svchp (IN/OUT)      - The OCI service context.
-     errhp (IN/OUT)      - The OCI Error handle.
-     data_set (IN)       - Initialized OCIAnyDataSet.
-     tc (OUT)            - The typecode of the type.
-     type (OUT)          - The type corresponding to the OCIAnyDataSet. This
-                           could be null if the OCIAnyData corresponds to a
-                           built-in type.
-*/
-sword OCIAnyDataSetGetType (/*_ OCISvcCtx *svchp, OCIError *errhp,
-     OCIAnyDataSet *data_set, OCITypeCode *tc, OCIType **type _*/);
-
-/*
-  NAME
-    OCIAnyDataSetGetCount - OCIAnyDataSet Get Count of instances.
-  DESCRIPTION
-    This call gets the number of instances in the OCIAnyDataSet.
-  RETURNS
-    error code.
-  PARAMETERS
-    svchp (IN/OUT)      - OCI Service Context
-    errhp (IN/OUT)      - OCI Error handle
-    data_set (IN)       - Well formed OCIAnyDataSet.
-    count (OUT)         - number of instances in OCIAnyDataSet
-*/
-sword OCIAnyDataSetGetCount(/*_ OCISvcCtx *svchp, OCIError *errhp,
-     OCIAnyDataSet *data_set, ub4 *count _*/);
-
-/*
-  NAME
-    OCIAnyDataSetGetInstance - OCIAnyDataSet Get next instance.
-  DESCRIPTION
-    Only sequential access to the instances in an OCIAnyDataSet is allowed.
-    This call returns the OCIAnyData corresponding to an instance at the
-    current position and updates the current position. Subsequently, the
-    OCIAnyData access routines may be used to access the instance.
-  RETURNS
-    error code. Returns OCI_NO_DATA if the current position is at the end of
-    the set, OCI_SUCCESS otherwise.
-  PARAMETERS
-    svchp (IN/OUT)      - OCI Service Context
-    errhp (IN/OUT)      - OCI Error handle
-    data_set (IN)       - Well formed OCIAnyDataSet
-    data (IN/OUT)       - OCIAnyData corresponding to the instance. If (*data)
-                          is NULL, a new OCIAnyData will be allocated for same
-                          duration as the OCIAnyDataSet. If (*data) is not NULL
-                          , it will get reused. This OCIAnyData can be
-                          subsequently accessed using the OCIAnyDataAccess()
-                          call or piece-wise by using the OCIAnyDataAttrGet()
-                          call.
-  NOTE
-    No Destruction of the old value is done here. It is the responsibility of
-    the caller to destroy the old value pointed to by (*data) and set (*data)
-    to a null pointer before beginning to make a sequence of this call. No deep
-    copying (of OCIType information nor the data part.) is done in the returned
-    OCIAnyData. This OCIAnyData cannot be used beyond the allocation duration
-    of the OCIAnyDataSet (it is like a reference into the OCIAnyDataSet). The
-    returned OCIAnyData can be reused on subsequent calls to this function to
-    sequentially access the OCIAnyDataSet.
-*/
-sword OCIAnyDataSetGetInstance(/*_ OCISvcCtx *svchp, OCIError *errhp,
-     OCIAnyDataSet *data_set, OCIAnyData **data _*/);
-
-/*--------------------- End of OCIAnyDataSet interfaces ---------------------*/
-
-/*--------------------- Connection Pooling prototypes -----------------------*/
-sword OCIConnectionPoolCreate(/*_ OCIEnv *envhp, OCIError *errhp,
-                              OCICPool *poolhp,
-                              OraText **poolName, sb4 *poolNameLen,
-                              CONST OraText *dblink, sb4 dblinkLen,
-                              ub4 connMin, ub4 connMax, ub4 connIncr,
-                              CONST OraText *poolUserName, sb4 poolUserLen,
-                              CONST OraText *poolPassword, sb4 poolPassLen,
-                              ub4 mode _*/);
-
-sword OCIConnectionPoolDestroy(/*_ OCICPool *poolhp,
-                               OCIError *errhp, ub4 mode _*/);
-
-/*----------------- End of Connection Pooling prototypes --------------------*/
-
-/*-------------------- Session Pooling prototypes ---------------------------*/
-
-sword OCISessionPoolCreate (/*_ OCIEnv *envhp, OCIError *errhp, 
-                              OCISPool *spoolhp, 
-                              OraText **poolName, ub4 *poolNameLen, 
-                              CONST OraText *connStr, ub4 connStrLen,
-                              ub4 sessMin, ub4 sessMax, ub4 sessIncr,
-                              OraText *userid, ub4 useridLen,
-                              OraText *password, ub4 passwordLen,
-                              ub4 mode _*/);
-                                                  
-sword OCISessionPoolDestroy (/*_ OCISPool *spoolhp,
-                               OCIError *errhp,
-                               ub4 mode _*/);
-                             
-sword OCISessionGet (/*_ OCIEnv *envhp, OCIError *errhp, OCISvcCtx **svchp,
-                       OCIAuthInfo *authhp,
-                       OraText *poolName, ub4 poolName_len, 
-                       CONST OraText *tagInfo, ub4 tagInfo_len,
-                       OraText **retTagInfo, ub4 *retTagInfo_len,
-                       boolean *found, ub4 mode _*/);
-
-sword OCISessionRelease (/*_ OCISvcCtx *svchp, OCIError *errhp,
-                         OraText *tag, ub4 tag_len,
-                         ub4 mode _*/);
-
-/*-------------------- End Session Pooling prototypes -----------------------*/
-
-sword  OCIXMLTypeNew(/*_ OCISvcCtx *svchp, OCIError *errhp, OCIDuration dur,
-                     OraText *elname, ub4 elname_Len,
-                     OraText *schemaURL, ub4 schemaURL_Len,
-                     OCIXMLType **retInstance _*/);
-
-sword  OCIXMLTypeCreateFromSrc(/*_ OCISvcCtx *svchp, OCIError *errhp,
-                     OCIDuration dur, ub1 src_type, dvoid *src_ptr,
-                     sb4 ind, OCIXMLType **retInstance _*/);
-
-sword OCIXMLTypeExtract(/*_ OCIError *errhp,
-              OCIXMLType *doc, OCIDuration dur,
-              OraText *xpathexpr, ub4 xpathexpr_Len,
-              OraText *nsmap, ub4 nsmap_Len,
-              OCIXMLType **retDoc _*/);
-
-sword OCIXMLTypeTransform(/*_ OCIError *errhp, OCIDuration dur,
-               OCIXMLType *doc, OCIXMLType *xsldoc,
-               OCIXMLType **retDoc _*/);
-
-sword OCIXMLTypeExists(/*_ OCIError *errhp, OCIXMLType *doc,
-                 OraText *xpathexpr, ub4 xpathexpr_Len,
-                 OraText *nsmap, ub4 nsmap_Len,
-                 boolean *retval _*/);
-
-sword OCIXMLTypeIsSchemaBased(/*_ OCIError *errhp,
-                              OCIXMLType *doc, boolean *retval _*/);
-
-sword OCIXMLTypeGetSchema(/*_ OCIError *errhp, OCIXMLType *doc,
-             OCIXMLType **schemadoc,
-             OraText **schemaURL, ub4 *schemaURL_Len,
-             OraText **rootelem, ub4 *rootelem_Len _*/);
-
-sword OCIXMLTypeValidate(/*_ OCIError *errhp, OCIXMLType *doc,
-                   OraText *schemaURL, ub4 schemaURL_Len, boolean *retval _*/);
-
-sword OCIXMLTypeGetDOM(/*_ OCIError *errhp, OCIXMLType *doc, OCIDuration dur,
-                       OCIDOMDocument **retDom _*/);
-
-sword OCIXMLTypeGetFromDOM(/*_ OCIError *errhp, OCIDOMDocument *domdoc,
-                           OCIXMLType **retXMLType _*/);
-
-sword OCIDOMFree(/*_ OCIError *errhp, OCIDOMDocument *domdoc _*/);
-
-/*--------------------------------------------------------------------------- 
-  PRIVATE FUNCTIONS 
-  ---------------------------------------------------------------------------*/
-
-/* these calls are deprecated and should not be used */
-#ifdef NEVER 
-#if !defined(__STDC__) && !defined(__cplusplus)
-sword   OCIStmtBindByPos (/*_ OCIStmt *stmtp, OCIBind *bindp, OCIError *errhp, 
-                     ub4 position, dvoid *valuep, sb4 value_sz, ub2 dty, 
-                     dvoid *indp, ub2 *alenp, ub2 *rcodep, 
-                     ub4 maxarr_len, ub4 *curelep, ub4 mode _*/);
-
-sword   OCIStmtBindByName(/*_ OCIStmt *stmtp, OCIBind *bindp, OCIError *errhp,
-                    CONST OraText *placeholder, sb4 placeh_len, dvoid *valuep,
-                    sb4 value_sz, ub2 dty, dvoid *indp, ub2 *alenp,
-                    ub2 *rcodep, ub4 maxarr_len, ub4 *curelep, ub4 mode _*/);
-
-sword   ocidefn(/*_ OCIStmt *stmtp, OCIDefine *defnp, OCIError *errhp,
-                    ub4 position, dvoid *valuep, sb4 value_sz, ub2 dty,
-                    dvoid *indp, ub2 *rlenp, ub2 *rcodep, ub4 mode _*/);
-
-#endif /* __STDC__ */
-#endif /* NEVER */
-
-#endif                                                              /* ocikp */
diff --git a/src/terralib/drivers/OracleSpatial/OCI/include/ocikpr.h b/src/terralib/drivers/OracleSpatial/OCI/include/ocikpr.h
deleted file mode 100644
index b86b389..0000000
--- a/src/terralib/drivers/OracleSpatial/OCI/include/ocikpr.h
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * $Header: /home/terralib/src/terralib/drivers/OracleSpatial/OCI/include/ocikpr.h,v 1.3 2005/05/06 16:48:56 karine Exp $ 
- */
-
-/* Copyright (c) 1991, 1995, 1996, 1998 by Oracle Corporation */
-/*
-   NAME
-     ocikpr.h - header of K & R compilers
-   MODIFIED   (MM/DD/YY)
-    porangas   12/04/00 - Forward merge bug#974710 to 9i
-    sgollapu   05/19/98 - Change text to OraText
-    dchatter   04/21/96 -
-    dchatter   11/10/95 -  add ognfd() - get native fd
-    lchidamb   04/06/95 -  drop maxdsz from obindps/odefinps
-    slari      04/07/95 -  add opinit
-    dchatter   03/08/95 -  osetpi and ogetpi
-    lchidamb   12/09/94 -  add obindps() and odefinps()
-    dchatter   03/06/95 -  merge changes from branch 1.1.720.2
-    dchatter   11/14/94 -  merge changes from branch 1.1.720.1
-    dchatter   02/08/95 -  olog call; drop onblon
-    dchatter   10/31/94 -  new functions for non-blocking oci
-    rkooi2     11/27/92 -  Changing datatypes (in comments) and return types 
-    rkooi2     10/26/92 -  More portability mods 
-    rkooi2     10/18/92 -  Changed to agree with oci.c 
-    sjain      03/16/92 -  Creation 
-*/
-
-/*
- *  Declare the OCI functions.
- *  Prototype information is commented out.
- *  Use this header for non-ANSI C compilers.
- *  Note that you will need to include ocidfn.h in the .c files
- *    to get the definition for cda_def.
- */
-
-#ifndef OCIKPR
-#define OCIKPR
-
-#include <oratypes.h>
-
-/*
- * Oci BIND (Piecewise or with Skips) 
- */
-sword  obindps( /*_ struct cda_def *cursor, ub1 opcode, OraText *sqlvar, 
-		  sb4 sqlvl, ub1 *pvctx, sb4 progvl, 
-		  sword ftype, sword scale,
-		  sb2 *indp, ub2 *alen, ub2 *arcode, 
-		  sb4 pv_skip, sb4 ind_skip, sb4 alen_skip, sb4 rc_skip,
-		  ub4 maxsiz, ub4 *cursiz, 
-		  OraText *fmt, sb4 fmtl, sword fmtt _*/ );
-sword  obreak( /*_ struct cda_def *lda _*/ );
-sword  ocan  ( /*_ struct cda_def *cursor _*/ );
-sword  oclose( /*_ struct cda_def *cursor _*/ );
-sword  ocof  ( /*_ struct cda_def *lda _*/ );
-sword  ocom  ( /*_ struct cda_def *lda _*/ );
-sword  ocon  ( /*_ struct cda_def *lda _*/ );
-
-
-/*
- * Oci DEFINe (Piecewise or with Skips) 
- */
-sword  odefinps( /*_ struct cda_def *cursor, ub1 opcode, sword pos,ub1 *bufctx,
-		   sb4 bufl, sword ftype, sword scale, 
-		   sb2 *indp, OraText *fmt, sb4 fmtl, sword fmtt, 
-		   ub2 *rlen, ub2 *rcode,
-		   sb4 pv_skip, sb4 ind_skip, sb4 alen_skip, sb4 rc_skip _*/ );
-sword  odescr( /*_ struct cda_def *cursor, sword pos, sb4 *dbsize,
-                   sb2 *dbtype, sb1 *cbuf, sb4 *cbufl, sb4 *dsize,
-                   sb2 *prec, sb2 *scale, sb2 *nullok _*/ );
-sword  odessp( /*_ struct cda_def *cursor, OraText *objnam, size_t onlen,
-                   ub1 *rsv1, size_t rsv1ln, ub1 *rsv2, size_t rsv2ln,
-                   ub2 *ovrld, ub2 *pos, ub2 *level, OraText **argnam,
-                   ub2 *arnlen, ub2 *dtype, ub1 *defsup, ub1* mode,
-                   ub4 *dtsiz, sb2 *prec, sb2 *scale, ub1 *radix,
-                   ub4 *spare, ub4 *arrsiz _*/ );
-sword  oerhms( /*_ struct cda_def *lda, sb2 rcode, OraText *buf,
-                   sword bufsiz _*/ );
-sword  oermsg( /*_ sb2 rcode, OraText *buf _*/ );
-sword  oexec ( /*_ struct cda_def *cursor _*/ );
-sword  oexfet( /*_ struct cda_def *cursor, ub4 nrows,
-                   sword cancel, sword exact _*/ );
-sword  oexn  ( /*_ struct cda_def *cursor, sword iters, sword rowoff _*/ );
-sword  ofen  ( /*_ struct cda_def *cursor, sword nrows _*/ );
-sword  ofetch( /*_ struct cda_def *cursor _*/ );
-sword  oflng ( /*_ struct cda_def *cursor, sword pos, ub1 *buf,
-                   sb4 bufl, sword dtype, ub4 *retl, sb4 offset _*/ );
-sword  ogetpi( /*_ struct cda_def *cursor, ub1 *piecep, dvoid **ctxpp, 
-                   ub4 *iterp, ub4 *indexp _*/ );
-sword  opinit( /*_ ub4 mode _*/ );
-sword  olog  ( /*_ struct cda_def *lda, ub1 *hst, 
-                   OraText *uid, sword uidl,
-                   OraText *psw, sword pswl, 
-                   OraText *conn, sword connl, 
-                   ub4 mode _*/ );
-sword  ologof( /*_ struct cda_def *lda _*/ );
-sword  oopen ( /*_ struct cda_def *cursor, struct cda_def *lda,
-                   OraText *dbn, sword dbnl, sword arsize,
-                   OraText *uid, sword uidl _*/ );
-sword  oopt  ( /*_ struct cda_def *cursor, sword rbopt, sword waitopt _*/ );
-sword  oparse( /*_ struct cda_def *cursor, OraText *sqlstm, sb4 sqllen,
-                   sword defflg, ub4 lngflg _*/ );
-sword  orol  ( /*_ struct cda_def *lda _*/ );
-sword  osetpi( /*_ struct cda_def *cursor, ub1 piece, dvoid *bufp, 
-                   ub4 *lenp _*/ );
-void sqlld2  ( /*_ struct cda_def *lda, OraText *cname, sb4 *cnlen _*/ );
-void sqllda  ( /*_ struct cda_def *lda _*/ );
-
-/* non-blocking functions */
-sword onbset( /*_ struct cda_def *lda _*/ ); 
-sword onbtst( /*_ struct cda_def *lda _*/ ); 
-sword onbclr( /*_ struct cda_def *lda _*/ ); 
-sword ognfd ( /*_ struct cda_def *lda, dvoid *fdp _*/ );
-
-
-
-/* 
- * OBSOLETE FUNCTIONS 
- */
-
-/* 
- * OBSOLETE BIND CALLS-- use obindps() 
- */
-sword  obndra( /*_ struct cda_def *cursor, OraText *sqlvar, sword sqlvl,
-                 ub1 *progv, sword progvl, sword ftype, sword scale,
-                 sb2 *indp, ub2 *alen, ub2 *arcode, ub4 maxsiz,
-                 ub4 *cursiz, OraText *fmt, sword fmtl, sword fmtt _*/ );
-sword  obndrn( /*_ struct cda_def *cursor, sword sqlvn, ub1 *progv,
-                 sword progvl, sword ftype, sword scale, sb2 *indp,
-                 OraText *fmt, sword fmtl, sword fmtt _*/ );
-sword  obndrv( /*_ struct cda_def *cursor, OraText *sqlvar, sword sqlvl,
-                 ub1 *progv, sword progvl, sword ftype, sword scale,
-                 sb2 *indp, OraText *fmt, sword fmtl, sword fmtt _*/ );
-
-/* 
- * OBSOLETE DEFINE CALLS-- use odefinps() 
- */
-sword  odefin( /*_ struct cda_def *cursor, sword pos, ub1 *buf,
-                 sword bufl, sword ftype, sword scale, sb2 *indp,
-                 OraText *fmt, sword fmtl, sword fmtt, ub2 *rlen, 
-                 ub2 *rcode _*/ );
-
-
-/* older calls ; preferred equivalent calls above */
-sword  odsc  ( /*_ struct cda_def *cursor, sword pos, sb2 *dbsize,
-                   sb2 *fsize, sb2 *rcode, sb2 *dtype, sb1 *buf,
-                   sb2 *bufl, sb2 *dsize _*/ );
-sword  oname ( /*_ struct cda_def *cursor, sword pos, sb1 *tbuf,
-                   sb2 *tbufl, sb1 *buf, sb2 *bufl _*/ );
-sword  olon  ( /*_ struct cda_def *lda, OraText *uid, sword uidl,
-                   OraText *pswd, sword pswdl, sword audit _*/ );
-sword  orlon ( /*_ struct cda_def *lda, ub1 *hda, OraText *uid,
-                   sword uidl, OraText *pswd, sword pswdl, sword audit _*/ );
-sword  osql3 ( /*_ struct cda_def *cda, OraText *sqlstm, sword sqllen _*/ );
-
-
-
-
-
-
-
-#endif  /* OCIKPR */
-
-
-
-
-
-
-
diff --git a/src/terralib/drivers/OracleSpatial/OCI/include/ocixad.h b/src/terralib/drivers/OracleSpatial/OCI/include/ocixad.h
deleted file mode 100644
index 3f1eefa..0000000
--- a/src/terralib/drivers/OracleSpatial/OCI/include/ocixad.h
+++ /dev/null
@@ -1,316 +0,0 @@
-/* Copyright (c) 1999, 2001, Oracle Corporation.  All rights reserved.  */
- 
-/* 
-   NAME 
-     ocixad.h - OCI eXtensible Access Driver (for external tables)
-
-   DESCRIPTION 
-     Provides handles for XAD support.
-
-   RELATED DOCUMENTS 
-     External Tables Design specification (external_tab_ds.doc)
- 
-   EXPORT FUNCTION(S) 
-
-   INTERNAL FUNCTION(S)
-
-   EXAMPLES
-
-   NOTES
-     Currently these interfaces are for Oracle internal use only.
-
-   MODIFIED   (MM/DD/YY)
-   cmlim       08/10/01 - date cache: add XADSESSION attrs: DCACHE_SIZE 
-   abrumm      04/18/01 - define interface method signatures in OCIXAD
-   abrumm      02/20/01 - add attributes for ACCESS_PARM_TYPE
-   abrumm      01/18/01 - more OCI_ATTR_XADSESSION attributes
-   abrumm      10/09/00 - use oratypes.h, not s.h
-   abrumm      03/30/00 - external table support
-   abrumm      03/30/00 - Creation
-
-*/
-
-#ifndef OCIXAD_ORACLE
-#define OCIXAD_ORACLE
-
-#ifndef ORATYPES
-#include <oratypes.h>
-#endif
-
-#ifndef OCIDFN
-#include <ocidfn.h>
-#endif
-
-#ifndef OCI_ORACLE
-#include <oci.h>
-#endif
-
-#ifndef OCIEXTP_ORACLE
-#include <ociextp.h>
-#endif
-
-/*---------------------------------------------------------------------------
-                     PUBLIC TYPES AND CONSTANTS
-  ---------------------------------------------------------------------------*/
-
-/*----- Handles and descriptors for access driver operations (OCIXAD*)  -----*/
-typedef struct OCIXADSession      OCIXADSession;           /* session handle */
-typedef struct OCIXADTable        OCIXADTable;               /* table handle */
-typedef struct OCIXADField        OCIXADField;               /* field handle */
-typedef struct OCIXADGranule      OCIXADGranule;           /* granule handle */
-
-/*---------------- Access Driver method interface signatures ----------------*/
-
-/* Each of the following access driver methods are logically member functions
- * of the OCIXADSession handle.  As such, the first argument to the method is
- * the OCIXADSession handle (i.e. "this").
- *
- * An access driver writer must provide these entry points at configure
- * time via the OCIXADMethodEntry structure.
- */
-
-typedef sword (*OCIXADMethodOpen)(OCIXADSession *xadses,
-                                  OCIExtProcContext *withCtx,
-                                  OCIXADTable *xadtbl,
-                                  OCILobLocator *accessParm);
-
-typedef sword (*OCIXADMethodFetchInit)(OCIXADSession *xadses,
-                                       OCIExtProcContext *withCtx,
-                                       OCIXADTable *xadtbl,
-                                       OCINumber *gnum, ub4 maxRowCnt);
-
-typedef sword (*OCIXADMethodFetch)(OCIXADSession *xadses,
-                                   OCIExtProcContext *withCtx,
-                                   OCIXADTable *xadtbl, void *opaqueCtx,
-                                   ub4 rowCnt, sb4 rejctLmt,
-                                   sb4 *rejctCntp);
-
-typedef void (*OCIXADMethodPopulateInit)(OCIXADSession *xadses,
-                                         OCIExtProcContext *withCtx);
-
-typedef void (*OCIXADMethodPopulate)(OCIXADSession *xadses,
-                                     OCIExtProcContext *withCtx);
-
-typedef void (*OCIXADMethodPopulateTerm)(OCIXADSession *xadses,
-                                         OCIExtProcContext *withCtx);
-
-typedef sword  (*OCIXADMethodClose)(OCIXADSession *xadses,
-                                    OCIExtProcContext *withCtx,
-                                    OCIXADTable *xadtbl);
-
-typedef void (*OCIXADMethodErrorCallback)(OCIXADSession *xadses,
-                                          OCIExtProcContext *withCtx,
-                                          void *opaqueCtx, OCIError *errhp,
-                                          ub4 rowidx, ub2 colIdx);
-
-/* Access Driver Method Entry points provided at "configure" time. */
-struct OCIXADMethodEntry
-{
-  ub4                       Version_OCIXADMethodEntry;
-#define OCIXAD_METHOD_ENTRY_VERSION_1   100
-#define OCIXAD_METHOD_ENTRY_VERSION_CUR OCIXAD_METHOD_ENTRY_VERSION_1
-
-  OCIXADMethodOpen          Open_OCIXADMethodEntry;
-  OCIXADMethodFetchInit     FetchInit_OCIXADMethodEntry;
-  OCIXADMethodFetch         Fetch_OCIXADMethodEntry;
-  OCIXADMethodPopulateInit  PopulateInit_OCIXADMethodEntry;
-  OCIXADMethodPopulate      Populate_OCIXADMethodEntry;
-  OCIXADMethodPopulateTerm  PopulateTerm_OCIXADMethodEntry;
-  OCIXADMethodClose         Close_OCIXADMethodEntry;
-  OCIXADMethodErrorCallback ErrorCallback_OCIXADMethodEntry;
-};
-typedef struct OCIXADMethodEntry OCIXADMethodEntry;
-
-/* Each access driver type (e.g. "ORACLE_LOADER") must provide a
- * configure function (currently via the kpxdconf[] array).
- * The configure function must set the
- * OCI_ATTR_XADSESSION_METHOD_ENTRY_POINTS attribute of the passed in
- * 'hndl' argument.  The OCI_ATTR_XADSESSION_METHOD_ENTRY_POINTS attribute
- * is a pointer to an OCIXADMethodEntry structure.
- */
-typedef sword (*OCIXADConfig)(OraText *driverType,       /* driver type name */
-                              void     *hndl,        /* OCIXADSession handle */
-                              ub4       hndlType,             /* handle type */
-                              OCIError *errhp);          /* OCI error handle */
-
-/* Granule handle client callback prototypes for external tables.
- * The granulesPerSrc vector is allocated with numsrc_kpxg entries.
- * The access drivers granule info method (if present) should populate
- * each entry of the granulesPerSrc vector with the number of granules
- * for the corresponding source number.
- */
-typedef void (*OCIXADMethodGranuleInfo)(OCIXADGranule *xadgran,
-                                        OCIExtProcContext *withCtx,
-                                        ub4 *granulesPerSrc);
-
-/*------------------------------ OCIXADSession ------------------------------*/
-               /*----- Defines for OCIXADSession Attributes -----*/
-#define OCI_ATTR_XADSESSION_TABLE                 1
-#define OCI_ATTR_XADSESSION_LOCATIONS             2
-#define OCI_ATTR_XADSESSION_NAMES                 2 /* synonym for locations */
-#define OCI_ATTR_XADSESSION_DIRECTORIES           3
-#define OCI_ATTR_XADSESSION_GRANULE               4
-#define OCI_ATTR_XADSESSION_OPCODE                5
-#define OCI_ATTR_XADSESSION_CALLERID              6
-#define OCI_ATTR_XADSESSION_GRANULESIZE           7
-#define OCI_ATTR_XADSESSION_DATAMODE              8
-#define OCI_ATTR_XADSESSION_AGENT_NUMBER          9
-#define OCI_ATTR_XADSESSION_OPAQUECTX            10
-
-      /*----- OCIXADSession virtual methods (methods as attributes) -----*/
-#define OCI_ATTR_XADSESSION_METHOD_ENTRY_POINTS  11
-                                                        /* type for GET, SET */
-                              /* (OCIXADMethodEntry **, OCIXADMethodEntry *) */
-
-      /* more OCIXADSession Attributes (numbering starts after entry points) */
-                                                        /* type for GET, SET */
-#define OCI_ATTR_XADSESSION_DEFAULT_DIRECTORY    12     /* (text **, text *) */
-#define OCI_ATTR_XADSESSION_DRIVER_TYPE          13     /* (text **, text *) */
-#define OCI_ATTR_XADSESSION_SAMPLE_TYPE          14     /* (ub4 *,   ub4 *)  */
-#define OCI_ATTR_XADSESSION_SAMPLE_PERCENT       15     /* (ub4 *,   ub4 *)  */
-#define OCI_ATTR_XADSESSION_ACCESS_PARM_TYPE     16     /* (ub1 *,   ub1 *)  */
-#define OCI_ATTR_XADSESSION_DCACHE_SIZE          17     /* (ub4 *,   ub4 *)  */
-#define OCI_ATTR_XADSESSION_DCACHE_NUM           18     /* (ub4 *),  n/a  )  */
-#define OCI_ATTR_XADSESSION_DCACHE_DISABLE       19     /* (ub1 *),  n/a  )  */
-#define OCI_ATTR_XADSESSION_DCACHE_HITS          20     /* (ub4 *),  n/a  )  */
-#define OCI_ATTR_XADSESSION_DCACHE_MISSES        21     /* (ub4 *),  n/a  )  */
-
-
-             /*----- Values for OCI_ATTR_XADSESSION_OPCODE -----*/
-#define OCI_XADSESSION_OPCODE_FETCH               1
-#define OCI_XADSESSION_OPCODE_POPULATE            2
-
-            /*----- Values for OCI_ATTR_XADSESSION_CALLERID -----*/
-#define OCI_XADSESSION_CALLERID_QC                1     /* query coordinator */
-#define OCI_XADSESSION_CALLERID_SHADOW            2
-#define OCI_XADSESSION_CALLERID_SLAVE             3
-
-            /*----- Values for OCI_ATTR_XADSESSION_DATAMODE -----*/
-#define OCI_XADSESSION_DATAMODE_STREAM            1
-#define OCI_XADSESSION_DATAMODE_FIELD             2
-
-            /*----- Values for OCI_ATTR_XADSESSION_SAMPLE_TYPE -----*/
-#define OCI_XADSESSION_SAMPLE_NONE                0          /* not sampling */
-#define OCI_XADSESSION_SAMPLE_ROW                 1    /* row level sampling */
-#define OCI_XADSESSION_SAMPLE_BLOCK               2  /* block level sampling */
-
-           /*----- Values for OCI_ATTR_XADSESSION_ACCESS_PARM_TYPE -----*/
-#define OCI_XADSESSION_ACCESS_PARM_TYPE_CLOB      1    /* accessParm is CLOB */
-#define OCI_XADSESSION_ACCESS_PARM_TYPE_BLOB      2    /* accessParm is BLOB */
-
-/*------------------------------- OCIXADTable -------------------------------*/
-                /*----- Defines for OCIXADTable Attributes -----*/
-#define OCI_ATTR_XADTABLE_SESSION                 1
-#define OCI_ATTR_XADTABLE_NAME                    2
-#define OCI_ATTR_XADTABLE_COLUMNS                 3
-#define OCI_ATTR_XADTABLE_REF_COLUMNS             4
-#define OCI_ATTR_XADTABLE_FIELDS                  5
-#define OCI_ATTR_XADTABLE_NUM_FIELDS              6
-#define OCI_ATTR_XADTABLE_OPAQUECTX               7
-#define OCI_ATTR_XADTABLE_NUM_COLS                8
-#define OCI_ATTR_XADTABLE_NUM_REF_COLS            9
-#define OCI_ATTR_XADTABLE_SCHEMA                 10
-
-/*------------------------------- OCIXADField -------------------------------*/
-                /*----- Defines for OCIXADField Attributes -----*/
-#define OCI_ATTR_XADFIELD_COLUMN_NUM              1
-#define OCI_ATTR_XADFIELD_DATA_TYPE               2
-#define OCI_ATTR_XADFIELD_PRECISION               3
-#define OCI_ATTR_XADFIELD_SCALE                   4
-#define OCI_ATTR_XADFIELD_CHARSET_ID              5
-#define OCI_ATTR_XADFIELD_FORMAT_MASK             6
-#define OCI_ATTR_XADFIELD_ADDR                    7
-#define OCI_ATTR_XADFIELD_LENGTH                  8
-#define OCI_ATTR_XADFIELD_ISNULL                  9
-#define OCI_ATTR_XADFIELD_ISPARTIAL              10
-#define OCI_ATTR_XADFIELD_OPAQUECTX              11
-
-/*------------------------------ OCIXADGranule ------------------------------*/
-               /*----- Defines for OCIXADGranule Attributes -----*/
-#define OCI_ATTR_XADGRANULE_NUM_GRANULES          1
-#define OCI_ATTR_XADGRANULE_NUM_SRC               2
-#define OCI_ATTR_XADGRANULE_INTRA_SRC_CONCURRENCY 3
-#define OCI_ATTR_XADGRANULE_OPAQUECTX             4
-
-      /*----- OCIXADGranule virtual methods (methods as attributes) -----*/
-#define OCI_ATTR_XADGRANULE_INFO_METHOD           5
-
-
-/*---------------------------------------------------------------------------
-                     PRIVATE TYPES AND CONSTANTS
-  ---------------------------------------------------------------------------*/
-/* NONE */
-
-/*---------------------------------------------------------------------------
-                           EXPORT FUNCTIONS
-  ---------------------------------------------------------------------------*/
-
-/*-------------------------- OCIXADSession Methods --------------------------*/
-/* NONE */
-
-/*--------------------------- OCIXADTable Methods ---------------------------*/
-/*
-  NAME
-    OCIXADTableSetRowValues
-
-  DESCRIPTION
-    To set the individual column values for a row by iterating through the
-    OCIXADField handle vector which is attached to the passed in OCIXADTable
-    handle.  The OCIXADTableSetRowValues method is called once for complete
-    rows, multiple times for pieced rows.
-    The column array row index is returned as an OUT parameter (*rowIdxp).
-    
-  RETURNS
-    OCI_SUCCESS:  all column array entries set.
-    OCI_CONTINUE: a partial Field was encountered.
-    OCI_ERROR:    a partial field encountered for a column which
-                  does not allow partial fields (partials are only allowed
-                  for LOB and LONG columns).
-  NOTES
- */
-sword
-#if defined(__STDC__) || defined(__cplusplus)
-OCIXADTableSetRowValues(OCIXADTable *tblhp, ub4 *rowIdxp,OCIError *errhp);
-#else
-OCIXADTableSetRowValues(/*_ OCIXADTable *tblhp, ub4 *rowIdxp ,
-                            OCIError *errhp _*/);
-#endif
-
-
-/*--------------------------- OCIXADField Methods ---------------------------*/
-/*
-  NAME
-    OCIXADFieldSet
-
-  DESCRIPTION
-    Sets run-time (data dependent) attributes of the OCIXADField handle.
-    
-  RETURNS
-    OCI_SUCCESS:  Field attributes successfully set.
-    OCI_ERROR:    Invalid combination of flags,
-                  or NULL addr value for a non-NULL field,
-                  or length of zero for a non-NULL field,
-  NOTES
-    Basically for convenience and efficiency, so the application does
-    not have to do four OCIAttrSet calls to set these attributes.
- */
-sword
-#if defined(__STDC__) || defined(__cplusplus)
-OCIXADFieldSet(OCIXADField *fldhp, ub1 *addr, ub4 length, ub1 isnull,
-               ub1 ispartial);
-#else
-OCIXADFieldSet(/*_ OCIXADField *fldhp, ub1 *addr, ub4 length, ub1 isnull,
-                   ub1 ispartial _*/);
-#endif
-
-/*-------------------------- OCIXADGranule Methods --------------------------*/
-/* NONE */
-
-
-/*---------------------------------------------------------------------------
-                          INTERNAL FUNCTIONS
-  ---------------------------------------------------------------------------*/
-/* NONE */
-
-
-#endif                                                      /* OCIXAD_ORACLE */
diff --git a/src/terralib/drivers/OracleSpatial/OCI/include/ocixmldb.h b/src/terralib/drivers/OracleSpatial/OCI/include/ocixmldb.h
deleted file mode 100644
index 3057831..0000000
--- a/src/terralib/drivers/OracleSpatial/OCI/include/ocixmldb.h
+++ /dev/null
@@ -1,139 +0,0 @@
-/* Copyright (c) 2003, Oracle Corporation.  All rights reserved.  */
- 
-/* 
-   NAME 
-     ocixmldb.h - XDB public functions
-
-   DESCRIPTION 
-     This file contains XDB specific public functions required for DOM C-API. 
-
-   RELATED DOCUMENTS 
-
- 
-   EXPORT FUNCTION(S) 
-   struct xmlctx *OCIXmlDbInitXmlCtx(OCIEnv *, OCISvcCtx *, OCIError *,
-                               ocixmldbparam *params, int num_params);
-
-   void    OCIXmlDbFreeXmlCtx(struct xmlctx *xctx);
-
-
-  ------------------------------------------------------------------------
-   EXAMPLES
-   
-   NOTES
-
-   MODIFIED   (MM/DD/YY)
-   ataracha    05/28/03 - change names
-   ataracha    02/18/03 - add oratypes, remove XMLERR_*
-   imacky      02/01/03 - remove xml.h; xdbs fix
-   ataracha    01/24/03 - use "struct xmlctx" instead of xmlctx
-   imacky      01/28/03 - fix XMLERR defs
-   ataracha    01/21/03 - ataracha_uni_capi_cleanup
-   ataracha    01/09/03 - Creation
-
-*/
-
-#ifndef ORATYPES 
-#include <oratypes.h> 
-#endif
- 
-#ifndef OCI_ORACLE
-# include <oci.h>
-#endif
-
-#ifndef OCIXMLDB_ORACLE
-# define OCIXMLDB_ORACLE
-
-
-/*---------------------------------------------------------------------------
-                     PUBLIC TYPES AND CONSTANTS
-  ---------------------------------------------------------------------------*/
-
-#ifndef XMLCTX_DEFINED
-# define XMLCTX_DEFINED
-/* DATATYPE xmlctx - XML top-level context
-*/
-struct xmlctx; typedef struct xmlctx xmlctx;
-#endif
-
-typedef enum 
-{
-  XCTXINIT_OCIDUR  = 1,
-  XCTXINIT_ERRHDL  = 2
-} ocixmldbpname;
-
-typedef struct ocixmldbparam
-{
-  ocixmldbpname   name_ocixmldbparam;
-  void           *value_ocixmldbparam;
-} ocixmldbparam;
-
-#define NUM_OCIXMLDBPARAMS 2
-
-/*---------------------------------------------------------------------------
-                     PRIVATE TYPES AND CONSTANTS
-  ---------------------------------------------------------------------------*/
-
-
-/*---------------------------------------------------------------------------
-                           EXPORT FUNCTIONS
-  ---------------------------------------------------------------------------*/
-/*****************************************************************************
-                              DESCRIPTION
-
------------------------------OCIXmlDbInitXmlCtx---------------------------------
-Name
-OCIXmlDbInitXmlCtx
-Purpose
-To get a xmlctx structure initialized with error-handler and XDB callbacks. 
-Syntax
-struct xmlctx *OCIXmlDbInitXmlCtx (OCIEnv           *envhp,
-                                 OCISvcCtx        *svchp, 
-                                 OCIError         *err, 
-                                 params_ocixmldb *params,
-                                 int               num_params);
-Parameters
-envhp (IN) - The OCI environment handle
-svchp (IN) - The OCI service handle
-errhp (IN) - The OCI error handle
-params (IN)- This contains the following optional parameters :
-   (a) OCIDuration dur (IN - The OCI Duration (Default: OCI_DURATION_SESSION)
-   (b) void (*err_handler) (sword, (const oratext *) (IN) - 
-       Pointer to the error handling function (Default: null)
-num_params (IN) - Number of parameters to be read from parameter params.
-                  If the value of num_params exceeds the size of array 
-                  "params", unexpected behavior will result.
-
-Returns
-A pointer to xmlctx structure, with xdb context, error handler and callbacks 
-populated with appropriate values. This is later used for all API calls. NULL
-if no database connection available.
-
------------------------------OCIXmlDbFreeXmlCtx----------------------------
-Name
-OCIXmlDbFreeXmlCtx
-Pupose
-To free any allocations done during OCIXmlDbInitXmlCtx.
-Syntax
-void OCIXmlDbFreeXmlCtx (struct xmlctx *xctx)
-Parameters
-xctx (IN) - The xmlctx to terminate
-Returns
--
-******************************************************************************/
-
-struct xmlctx *OCIXmlDb_CtxInit(OCIEnv *, OCISvcCtx *, OCIError *, 
-                            ocixmldbparam *, int);
-
-void    OCIXmlDb_CtxFree(struct xmlctx *xctx);
-
-struct xmlctx *OCIXmlDbInitXmlCtx(OCIEnv *, OCISvcCtx *, OCIError *, 
-                            ocixmldbparam *, int);
-
-void    OCIXmlDbFreeXmlCtx(struct xmlctx *xctx);
-/*---------------------------------------------------------------------------
-                          INTERNAL FUNCTIONS
-  ---------------------------------------------------------------------------*/
-
-
-#endif                                              /* OCIXMLDB_ORACLE */
diff --git a/src/terralib/drivers/OracleSpatial/OCI/include/odci.h b/src/terralib/drivers/OracleSpatial/OCI/include/odci.h
deleted file mode 100644
index 550ee8f..0000000
--- a/src/terralib/drivers/OracleSpatial/OCI/include/odci.h
+++ /dev/null
@@ -1,657 +0,0 @@
-/*
- * $Header: /home/terralib/src/terralib/drivers/OracleSpatial/OCI/include/odci.h,v 1.3 2005/05/06 16:48:56 karine Exp $
- */
-
-/* Copyright (c) 1998, 2003, Oracle Corporation.  All rights reserved.  */
- 
-/* 
-   NAME 
-     odci.h - Oracle Data Cartridge Interface definitions
-
-   DESCRIPTION 
-     This file contains Oracle Data Cartridge Interface definitions. These
-     include the ODCI Types and Constants.
-
-   RELATED DOCUMENTS 
- 
-   INSPECTION STATUS 
-     Inspection date: 
-     Inspection status: 
-     Estimated increasing cost defects per page: 
-     Rule sets: 
- 
-   ACCEPTANCE REVIEW STATUS 
-     Review date: 
-     Review status: 
-     Reviewers: 
- 
-   PUBLIC FUNCTION(S) 
-     None.
-
-   PRIVATE FUNCTION(S)
-     None.
-
-   EXAMPLES
-
-   NOTES
-     - The constants defined here are replica of the constants defined 
-       in ODCIConst Package defined as part of catodci.sql. If you change
-       these do make the similar change in catodci.sql.
-
-   MODIFIED   (MM/DD/YY)
-   ayoaz       04/21/03 - add CursorNum to ODCIEnv
-   abrumm      12/30/02 - Bug #2223225: add define for
-                          ODCI_ARG_DESC_LIST_MAXSIZE
-   ayoaz       10/14/02 - Add Cardinality to ODCIArgDesc
-   ayoaz       09/11/02 - add ODCIQueryInfo to ODCIIndexCtx
-   yhu         09/19/02 - add ODCI_DEBUGGING_ON for ODCIEnv.EnvFlags
-   hsbedi      10/10/02 - add object number into ODCIExtTableInfo
-   ayoaz       08/30/02 - add ODCITable2 types
-   tchorma     07/29/02 - Add ODCIFuncCallInfo type for WITH COLUMN CONTEXT
-   hsbedi      06/29/02 - External table populate
-   yhu         07/20/01 - add parallel degree in ODCIIndexInfo.
-   abrumm      02/20/01 - ODCIExtTableInfo: add AccessParmBlob attribute
-   abrumm      01/18/01 - ODCIExtTableInfo: add default directory
-   spsundar    08/24/00 - Update attrbiute positions
-   abrumm      08/04/00 - external tables changes: ODCIExtTableInfo, constants
-   tchorma     09/11/00 - Add return code ODCI_FATAL
-   tchorma     08/08/00 - Add Update Block References Option for Alter Index
-   ayoaz       08/01/00 - Add ODCI_AGGREGATE_REUSE_CTX
-   spsundar    06/19/00 - add ODCIEnv type
-   abrumm      06/27/00 - add defines for ODCIExtTable flags
-   abrumm      06/04/00 - external tables: ODCIExtTableInfo change; add ODCIEnv
-   ddas        04/28/00 - extensible optimizer enhancements for 8.2
-   yhu         06/05/00 - add a bit in IndexInfoFlags for trans. tblspc
-   yhu         04/10/00 - add ODCIPartInfo & remove ODCIIndexPartList
-   abrumm      03/29/00 - external table support
-   spsundar    02/14/00 - update odci definitions for 8.2
-   nagarwal    03/07/99 - bug# 838308 - set estimate_stats=1
-   rmurthy     11/09/98 - add blocking flag
-   ddas        10/31/98 - add ODCI_QUERY_SORT_ASC and ODCI_QUERY_SORT_DESC
-   ddas        05/26/98 - fix ODCIPredInfo flag bits
-   rmurthy     06/03/98 - add macro for RegularCall
-   spsundar    05/08/98 - add constants related to ODCIIndexAlter options
-   rmurthy     04/30/98 - remove include s.h
-   rmurthy     04/20/98 - name fixes
-   rmurthy     04/13/98 - add C mappings for odci types
-   alsrivas    04/10/98 - adding defines for ODCI_INDEX1
-   jsriniva    04/04/98 - Creation
-
-*/
-
-#ifndef OCI_ORACLE
-# include <oci.h>
-#endif
-#ifndef ODCI_ORACLE
-# define ODCI_ORACLE
-
-/*---------------------------------------------------------------------------*/
-/*                         SHORT NAMES SUPPORT SECTION                       */
-/*---------------------------------------------------------------------------*/
-
-#ifdef SLSHORTNAME
-
-/* The following are short names that are only supported on IBM mainframes
- *   with the SLSHORTNAME defined.
- * With this all subsequent long names will actually be substituted with
- *  the short names here
- */
-
-#define ODCIColInfo_ref             odcicir
-#define ODCIColInfoList             odcicil
-#define ODCIColInfoList2            odcicil2
-#define ODCIIndexInfo_ref           odciiir
-#define ODCIPredInfo_ref            odcipir
-#define ODCIRidList                 odcirl
-#define ODCIIndexCtx_ref            odciicr
-#define ODCIObject_ref              odcior
-#define ODCIObjectList              odciol
-#define ODCIQueryInfo_ref           odciqir
-#define ODCIFuncInfo_ref            odcifir
-#define ODCICost_ref                odcicr
-#define ODCIArgDesc_ref             odciadr
-#define ODCIArgDescList             odciadl
-#define ODCIStatsOptions_ref        odcisor
-#define ODCIColInfo                 odcici
-#define ODCIColInfo_ind             odcicii
-#define ODCIIndexInfo               odciii
-#define ODCIIndexInfo_ind           odciiii
-#define ODCIPredInfo                odcipi
-#define ODCIPredInfo_ind            odcipii
-#define ODCIIndexCtx                odciic
-#define ODCIIndexCtx_ind            odciici
-#define ODCIObject                  odcio
-#define ODCIObject_ind              odcioi
-#define ODCIQueryInfo               odciqi
-#define ODCIQueryInfo_ind           odciqii
-#define ODCIFuncInfo                odcifi
-#define ODCIFuncInfo_infd           odcifii
-#define ODCICost                    odcic
-#define ODCICost_ind                odcici
-#define ODCIArgDesc                 odciad
-#define ODCIArgDesc_ind             odciadi
-#define ODCIStatsOptions            odciso
-#define ODCIStatsOptions_ind        odcisoi
-#define ODCIPartInfo                odcipti
-#define ODCIPartInfo_ind            odciptii
-#define ODCIPartInfo_ref            odciptir
-#define ODCIExtTableInfo            odcixt
-#define ODCIExtTableInfo_ind        odcixti
-#define ODCIExtTableInfo_ref        odcixtr
-#define ODCIExtTableQCInfo          odcixq
-#define ODCIExtTableQCInfo_ind      odcixqi
-#define ODCIExtTableQCInfo_ref      odcixqr
-#define ODCIFuncCallInfo            odcifc
-#define ODCIFuncCall_ind            odcifci
-#define ODCIFuncCall_ref            odcifcr
-
-#endif                                                        /* SLSHORTNAME */
-
-/*---------------------------------------------------------------------------
-                     PUBLIC TYPES AND CONSTANTS
-  ---------------------------------------------------------------------------*/
-
-/* Constants for Return Status */
-#define ODCI_SUCCESS             0
-#define ODCI_ERROR               1
-#define ODCI_WARNING             2
-#define ODCI_ERROR_CONTINUE      3
-#define ODCI_FATAL               4
-
-/* Constants for ODCIPredInfo.Flags */
-#define ODCI_PRED_EXACT_MATCH    0x0001
-#define ODCI_PRED_PREFIX_MATCH   0x0002
-#define ODCI_PRED_INCLUDE_START  0x0004
-#define ODCI_PRED_INCLUDE_STOP   0x0008
-#define ODCI_PRED_OBJECT_FUNC    0x0010
-#define ODCI_PRED_OBJECT_PKG     0x0020
-#define ODCI_PRED_OBJECT_TYPE    0x0040
-#define ODCI_PRED_MULTI_TABLE    0x0080
-
-/* Constants for QueryInfo.Flags */
-#define ODCI_QUERY_FIRST_ROWS    0x01
-#define ODCI_QUERY_ALL_ROWS      0x02
-#define ODCI_QUERY_SORT_ASC      0x04
-#define ODCI_QUERY_SORT_DESC     0x08
-#define ODCI_QUERY_BLOCKING      0x10
-
-/* Constants for ScnFlg(Func /w Index Context) */
-#define ODCI_CLEANUP_CALL        1
-#define ODCI_REGULAR_CALL        2
-
-/* Constants for ODCIFuncInfo.Flags */
-#define ODCI_OBJECT_FUNC         0x01
-#define ODCI_OBJECT_PKG          0x02
-#define ODCI_OBJECT_TYPE         0x04
-
-/* Constants for ODCIArgDesc.ArgType */
-#define ODCI_ARG_OTHER           1
-#define ODCI_ARG_COL             2                                 /* column */
-#define ODCI_ARG_LIT             3                                /* literal */
-#define ODCI_ARG_ATTR            4                       /* object attribute */
-#define ODCI_ARG_NULL            5
-#define ODCI_ARG_CURSOR          6
-
-/* Maximum size of ODCIArgDescList array */
-#define ODCI_ARG_DESC_LIST_MAXSIZE 32767
-
-/* Constants for ODCIStatsOptions.Options */
-#define ODCI_PERCENT_OPTION      1
-#define ODCI_ROW_OPTION          2
-
-/* Constants for ODCIStatsOptions.Flags */
-#define ODCI_ESTIMATE_STATS     0x01
-#define ODCI_COMPUTE_STATS      0x02
-#define ODCI_VALIDATE           0x04
-
-/* Constants for ODCIIndexAlter parameter alter_option */
-#define ODCI_ALTIDX_NONE               0
-#define ODCI_ALTIDX_RENAME             1
-#define ODCI_ALTIDX_REBUILD            2
-#define ODCI_ALTIDX_REBUILD_ONL        3
-#define ODCI_ALTIDX_MODIFY_COL         4
-#define ODCI_ALTIDX_UPDATE_BLOCK_REFS  5
-
-/* Constants for ODCIIndexInfo.IndexInfoFlags */
-#define ODCI_INDEX_LOCAL         0x0001
-#define ODCI_INDEX_RANGE_PARTN   0x0002
-#define ODCI_INDEX_HASH_PARTN    0x0004
-#define ODCI_INDEX_ONLINE        0x0008
-#define ODCI_INDEX_PARALLEL      0x0010
-#define ODCI_INDEX_UNUSABLE      0x0020
-#define ODCI_INDEX_ONIOT         0x0040
-#define ODCI_INDEX_TRANS_TBLSPC  0x0080
-#define ODCI_INDEX_FUNCTION_IDX  0x0100
-
-/* Constants for ODCIIndexInfo.IndexParaDegree */
-#define ODCI_INDEX_DEFAULT_DEGREE 32767
-
-/* Constants for ODCIEnv.EnvFlags */
-#define ODCI_DEBUGGING_ON        0x01
-
-/* Constants for ODCIEnv.CallProperty */
-#define ODCI_CALL_NONE           0
-#define ODCI_CALL_FIRST          1
-#define ODCI_CALL_INTERMEDIATE   2
-#define ODCI_CALL_FINAL          3
-
-/* Constants for ODCIExtTableInfo.OpCode */
-#define ODCI_EXTTABLE_INFO_OPCODE_FETCH           1
-#define ODCI_EXTTABLE_INFO_OPCODE_POPULATE        2
-
-/* Constants (bit definitions) for ODCIExtTableInfo.Flag */
-    /* sampling type: row or block */
-#define ODCI_EXTTABLE_INFO_FLAG_SAMPLE           0x00000001
-#define ODCI_EXTTABLE_INFO_FLAG_SAMPLE_BLOCK     0x00000002
-    /* AccessParmClob, AccessParmBlob discriminator */
-#define ODCI_EXTTABLE_INFO_FLAG_ACCESS_PARM_CLOB 0x00000004
-#define ODCI_EXTTABLE_INFO_FLAG_ACCESS_PARM_BLOB 0x00000008
-
-/* Constants for ODCIExtTableInfo.IntraSourceConcurrency */
-#define ODCI_TRUE  1
-#define ODCI_FALSE 0
-
-/* Constants (bit definitions) for ODCIExtTable{Open,Fetch,Populate,Close}
- * Flag argument.
- */
-#define ODCI_EXTTABLE_OPEN_FLAGS_QC     0x00000001  /* caller is Query Coord */
-#define ODCI_EXTTABLE_OPEN_FLAGS_SHADOW 0x00000002  /* caller is shadow proc */
-#define ODCI_EXTTABLE_OPEN_FLAGS_SLAVE  0x00000004  /* caller is slave  proc */
-
-#define ODCI_EXTTABLE_FETCH_FLAGS_EOS   0x00000001 /* end-of-stream on fetch */
-
-/* Constants for Flags argument to ODCIAggregateTerminate */
-#define ODCI_AGGREGATE_REUSE_CTX  1
-
-/*---------------------------------------------------------------------------
-                     ODCI TYPES
-  ---------------------------------------------------------------------------*/
-/*
- * These are C mappings for the OTS types defined in catodci.sql
- */
-
-typedef OCIRef   ODCIColInfo_ref;
-typedef OCIArray ODCIColInfoList;
-typedef OCIArray ODCIColInfoList2;
-typedef OCIRef   ODCIIndexInfo_ref;
-typedef OCIRef   ODCIPredInfo_ref;
-typedef OCIArray ODCIRidList;
-typedef OCIRef   ODCIIndexCtx_ref;
-typedef OCIRef   ODCIObject_ref;
-typedef OCIArray ODCIObjectList;
-typedef OCIRef   ODCIQueryInfo_ref;
-typedef OCIRef   ODCIFuncInfo_ref;
-typedef OCIRef   ODCICost_ref;
-typedef OCIRef   ODCIArgDesc_ref;
-typedef OCIArray ODCIArgDescList;
-typedef OCIRef   ODCIStatsOptions_ref;
-typedef OCIRef ODCIPartInfo_ref;
-typedef OCIRef   ODCIEnv_ref;
-typedef OCIRef   ODCIExtTableInfo_ref;             /* external table support */
-typedef OCIArray ODCIGranuleList;                  /* external table support */
-typedef OCIRef   ODCIExtTableQCInfo_ref;           /* external table support */
-typedef OCIRef   ODCIFuncCallInfo_ref;
-typedef OCIArray ODCINumberList;
- 
-struct ODCIColInfo
-{
-   OCIString* TableSchema;
-   OCIString* TableName;
-   OCIString* ColName;
-   OCIString* ColTypName;
-   OCIString* ColTypSchema;
-   OCIString* TablePartition;
-};
-typedef struct ODCIColInfo ODCIColInfo;
- 
-struct ODCIColInfo_ind
-{
-   OCIInd atomic;
-   OCIInd TableSchema;
-   OCIInd TableName;
-   OCIInd ColName;
-   OCIInd ColTypName;
-   OCIInd ColTypSchema;
-   OCIInd TablePartition;
-};
-typedef struct ODCIColInfo_ind ODCIColInfo_ind;
-
-struct ODCIFuncCallInfo
-{
-   struct ODCIColInfo ColInfo;
-};
-
-struct ODCIFuncCallInfo_ind
-{
-  struct ODCIColInfo_ind ColInfo;
-};
- 
-struct ODCIIndexInfo
-{
-   OCIString*       IndexSchema;
-   OCIString*       IndexName;
-   ODCIColInfoList* IndexCols;
-   OCIString*       IndexPartition;
-   OCINumber        IndexInfoFlags;
-   OCINumber        IndexParaDegree;
-};
-typedef struct ODCIIndexInfo ODCIIndexInfo;
- 
-struct ODCIIndexInfo_ind
-{
-   OCIInd atomic;
-   OCIInd IndexSchema;
-   OCIInd IndexName;
-   OCIInd IndexCols;
-   OCIInd IndexPartition;
-   OCIInd IndexInfoFlags;
-   OCIInd IndexParaDegree;
-};
-typedef struct ODCIIndexInfo_ind ODCIIndexInfo_ind;
- 
-struct ODCIPredInfo
-{
-   OCIString* ObjectSchema;
-   OCIString* ObjectName;
-   OCIString* MethodName;
-   OCINumber  Flags;
-};
-typedef struct ODCIPredInfo ODCIPredInfo;
- 
-struct ODCIPredInfo_ind
-{
-   OCIInd atomic;
-   OCIInd ObjectSchema;
-   OCIInd ObjectName;
-   OCIInd MethodName;
-   OCIInd Flags;
-};
-typedef struct ODCIPredInfo_ind ODCIPredInfo_ind;
- 
-struct ODCIObject
-{
-   OCIString* ObjectSchema;
-   OCIString* ObjectName;
-};
-typedef struct ODCIObject ODCIObject;
- 
-struct ODCIObject_ind
-{
-   OCIInd atomic;
-   OCIInd ObjectSchema;
-   OCIInd ObjectName;
-};
-typedef struct ODCIObject_ind ODCIObject_ind;
- 
-struct ODCIQueryInfo
-{
-   OCINumber       Flags;
-   ODCIObjectList* AncOps;
-};
-typedef struct ODCIQueryInfo ODCIQueryInfo;
-
- 
-struct ODCIQueryInfo_ind
-{
-   OCIInd atomic;
-   OCIInd Flags;
-   OCIInd AncOps;
-};
-typedef struct ODCIQueryInfo_ind ODCIQueryInfo_ind;
- 
-struct ODCIIndexCtx
-{
-   struct ODCIIndexInfo IndexInfo;
-   OCIString*           Rid;
-   struct ODCIQueryInfo QueryInfo;
-};
-typedef struct ODCIIndexCtx ODCIIndexCtx;
- 
-struct ODCIIndexCtx_ind
-{
-   OCIInd                   atomic;
-   struct ODCIIndexInfo_ind IndexInfo;
-   OCIInd                   Rid;
-   struct ODCIQueryInfo_ind QueryInfo;
-};
-typedef struct ODCIIndexCtx_ind ODCIIndexCtx_ind;
- 
-struct ODCIFuncInfo
-{
-   OCIString* ObjectSchema;
-   OCIString* ObjectName;
-   OCIString* MethodName;
-   OCINumber Flags;
-};
-typedef struct ODCIFuncInfo ODCIFuncInfo;
- 
-struct ODCIFuncInfo_ind
-{
-   OCIInd atomic;
-   OCIInd ObjectSchema;
-   OCIInd ObjectName;
-   OCIInd MethodName;
-   OCIInd Flags;
-};
-typedef struct ODCIFuncInfo_ind ODCIFuncInfo_ind;
- 
-struct ODCICost
-{
-   OCINumber  CPUcost;
-   OCINumber  IOcost;
-   OCINumber  NetworkCost;
-   OCIString* IndexCostInfo;
-};
-typedef struct ODCICost ODCICost;
- 
-struct ODCICost_ind
-{
-   OCIInd atomic;
-   OCIInd CPUcost;
-   OCIInd IOcost;
-   OCIInd NetworkCost;
-   OCIInd IndexCostInfo;
-};
-typedef struct ODCICost_ind ODCICost_ind;
- 
-struct ODCIArgDesc
-{
-   OCINumber  ArgType;
-   OCIString* TableName;
-   OCIString* TableSchema;
-   OCIString* ColName;
-   OCIString* TablePartitionLower;
-   OCIString* TablePartitionUpper;
-   OCINumber  Cardinality;
-};
-typedef struct ODCIArgDesc ODCIArgDesc;
- 
-struct ODCIArgDesc_ind
-{
-   OCIInd atomic;
-   OCIInd ArgType;
-   OCIInd TableName;
-   OCIInd TableSchema;
-   OCIInd ColName;
-   OCIInd TablePartitionLower;
-   OCIInd TablePartitionUpper;
-   OCIInd Cardinality;
-};
-typedef struct ODCIArgDesc_ind ODCIArgDesc_ind;
- 
-struct ODCIStatsOptions
-{
-   OCINumber Sample;
-   OCINumber Options;
-   OCINumber Flags;
-};
-typedef struct ODCIStatsOptions ODCIStatsOptions;
- 
-struct ODCIStatsOptions_ind
-{
-   OCIInd atomic;
-   OCIInd Sample;
-   OCIInd Options;
-   OCIInd Flags;
-};
-typedef struct ODCIStatsOptions_ind ODCIStatsOptions_ind;
-
-struct ODCIEnv
-{
-   OCINumber EnvFlags;
-   OCINumber CallProperty;
-   OCINumber DebugLevel;
-   OCINumber CursorNum;
-};
-typedef struct ODCIEnv ODCIEnv;
-
-struct ODCIEnv_ind
-{
-   OCIInd _atomic;
-   OCIInd EnvFlags;
-   OCIInd CallProperty;
-   OCIInd DebugLevel;
-   OCIInd CursorNum;
-};
-typedef struct ODCIEnv_ind ODCIEnv_ind;
- 
-struct ODCIPartInfo
-{
-   OCIString* TablePartition;
-   OCIString* IndexPartition;
-};
-typedef struct ODCIPartInfo ODCIPartInfo;
- 
-struct ODCIPartInfo_ind
-{
-   OCIInd atomic;
-   OCIInd TablePartition;
-   OCIInd IndexPartition;
-};
-typedef struct ODCIPartInfo_ind ODCIPartInfo_ind;
-
-/*---------- External Tables ----------*/
-struct ODCIExtTableInfo
-{
-   OCIString*       TableSchema;
-   OCIString*       TableName;
-   ODCIColInfoList* RefCols;
-   OCIClobLocator*  AccessParmClob;
-   OCIBlobLocator*  AccessParmBlob;
-   ODCIArgDescList* Locations;
-   ODCIArgDescList* Directories;
-   OCIString*       DefaultDirectory;
-   OCIString*       DriverType;
-   OCINumber        OpCode;
-   OCINumber        AgentNum;
-   OCINumber        GranuleSize;
-   OCINumber        Flag;
-   OCINumber        SamplePercent;
-   OCINumber        MaxDoP;
-   OCIRaw*          SharedBuf;
-   OCIString*       MTableName;
-   OCIString*       MTableSchema;
-   OCINumber        TableObjNo;
-};
-typedef struct ODCIExtTableInfo ODCIExtTableInfo;
-
-struct ODCIExtTableInfo_ind
-{
-   OCIInd _atomic;
-   OCIInd TableSchema;
-   OCIInd TableName;
-   OCIInd RefCols;
-   OCIInd AccessParmClob;
-   OCIInd AccessParmBlob;
-   OCIInd Locations;
-   OCIInd Directories;
-   OCIInd DefaultDirectory;
-   OCIInd DriverType;
-   OCIInd OpCode;
-   OCIInd AgentNum;
-   OCIInd GranuleSize;
-   OCIInd Flag;
-   OCIInd SamplePercent;
-   OCIInd MaxDoP;
-   OCIInd SharedBuf;
-   OCIInd MTableName;
-   OCIInd MTableSchema;
-   OCIInd TableObjNo;
-};
-typedef struct ODCIExtTableInfo_ind ODCIExtTableInfo_ind;
-
-struct ODCIExtTableQCInfo
-{
-   OCINumber        NumGranules;
-   OCINumber        NumLocations;
-   ODCIGranuleList* GranuleInfo;
-   OCINumber        IntraSourceConcurrency;
-   OCINumber        MaxDoP;
-   OCIRaw*          SharedBuf;
-};
-typedef struct ODCIExtTableQCInfo ODCIExtTableQCInfo;
-
-struct ODCIExtTableQCInfo_ind
-{
-   OCIInd _atomic;
-   OCIInd NumGranules;
-   OCIInd NumLocations;
-   OCIInd GranuleInfo;
-   OCIInd IntraSourceConcurrency;
-   OCIInd MaxDoP;
-   OCIInd SharedBuf;
-};
-typedef struct ODCIExtTableQCInfo_ind ODCIExtTableQCInfo_ind;
-
-/*********************************************************/
-/* Table Function Info types (used by ODCITablePrepare)  */
-/*********************************************************/
-
-struct ODCITabFuncInfo
-{
-  ODCINumberList*  Attrs;
-  OCIType*         RetType;
-};
-typedef struct ODCITabFuncInfo ODCITabFuncInfo;
-
-struct ODCITabFuncInfo_ind
-{
-  OCIInd _atomic;
-  OCIInd Attrs;
-  OCIInd RetType;
-};
-typedef struct ODCITabFuncInfo_ind ODCITabFuncInfo_ind;
-
-/*********************************************************************/
-/* Table Function Statistics types (used by ODCIStatsTableFunction)  */
-/*********************************************************************/
-
-struct ODCITabFuncStats
-{
-  OCINumber num_rows;
-};
-typedef struct ODCITabFuncStats ODCITabFuncStats;
-
-struct ODCITabFuncStats_ind
-{
-  OCIInd _atomic;
-  OCIInd num_rows;
-};
-typedef struct ODCITabFuncStats_ind ODCITabFuncStats_ind;
-
-/*---------------------------------------------------------------------------
-                     PRIVATE TYPES AND CONSTANTS
-  ---------------------------------------------------------------------------*/
-
-
-/*---------------------------------------------------------------------------
-                           PUBLIC FUNCTIONS
-  ---------------------------------------------------------------------------*/
-
-
-/*---------------------------------------------------------------------------
-                          PRIVATE FUNCTIONS
-  ---------------------------------------------------------------------------*/
-
-
-#endif                                              /* ODCI_ORACLE */
diff --git a/src/terralib/drivers/OracleSpatial/OCI/include/oratypes.h b/src/terralib/drivers/OracleSpatial/OCI/include/oratypes.h
deleted file mode 100644
index 4cd47bb..0000000
--- a/src/terralib/drivers/OracleSpatial/OCI/include/oratypes.h
+++ /dev/null
@@ -1,307 +0,0 @@
-/*
-  Copyright (c) 1982, 2003, Oracle.  All rights reserved.
-*/
-
-/*
- * $Header: /home/terralib/src/terralib/drivers/OracleSpatial/OCI/include/oratypes.h,v 1.3 2005/05/06 16:48:56 karine Exp $
- */
- 
-
- 
-#ifndef ORATYPES
-# define ORATYPES
-# define SX_ORACLE
-# define SX3_ORACLE 
-
-
-#ifndef ORASTDDEF
-# include <stddef.h>
-# define ORASTDDEF
-#endif
-
-#ifndef ORALIMITS
-# include <limits.h>
-# define ORALIMITS
-#endif
-
-
-#ifndef TRUE
-# define TRUE  1
-# define FALSE 0
-#endif
-
-
-#ifndef lint 
-typedef unsigned char  ub1;                   
-typedef   signed char  sb1;                  
-#else 
-#define ub1 unsigned char 
-#define sb1 signed char 
-#endif 
- 
-#define UB1MAXVAL ((ub1)UCHAR_MAX) 
-#define UB1MINVAL ((ub1)        0) 
-#define SB1MAXVAL ((sb1)SCHAR_MAX) 
-#define SB1MINVAL ((sb1)SCHAR_MIN) 
-#define MINUB1MAXVAL ((ub1)  255) 
-#define MAXUB1MINVAL ((ub1)    0) 
-#define MINSB1MAXVAL ((sb1)  127) 
-#define MAXSB1MINVAL ((sb1) -127) 
- 
- 
-
- 
-#ifndef lint 
-typedef unsigned short    ub2;                
-typedef   signed short    sb2;               
-#else 
-#define ub2  unsigned short 
-#define sb2  signed short 
-#endif
-
-#define UB2MAXVAL ((ub2)USHRT_MAX) 
-#define UB2MINVAL ((ub2)        0) 
-#define SB2MAXVAL ((sb2) SHRT_MAX) 
-#define SB2MINVAL ((sb2) SHRT_MIN) 
-#define MINUB2MAXVAL ((ub2) 65535) 
-#define MAXUB2MINVAL ((ub2)     0) 
-#define MINSB2MAXVAL ((sb2) 32767) 
-#define MAXSB2MINVAL ((sb2)-32767) 
-  
-
-
-
-#ifndef lint 
-typedef unsigned int  ub4;                   
-typedef   signed int  sb4;                   
-#else 
-#define eb4 int 
-#define ub4 unsigned int 
-#define sb4 signed int 
-#endif 
- 
-#define UB4MAXVAL ((ub4)UINT_MAX) 
-#define UB4MINVAL ((ub4)        0) 
-#define SB4MAXVAL ((sb4) INT_MAX) 
-#define SB4MINVAL ((sb4) INT_MIN) 
-#define MINUB4MAXVAL ((ub4) 4294967295) 
-#define MAXUB4MINVAL ((ub4)          0) 
-#define MINSB4MAXVAL ((sb4) 2147483647) 
-#define MAXSB4MINVAL ((sb4)-2147483647) 
-
-
-/* --- Signed/Unsigned eight-byte scalar (orasb8/oraub8) --- */
-
-#define ORAXB8_DEFINED
-#ifndef lint
- typedef unsigned _int64 oraub8;
- typedef signed _int64 orasb8;
- typedef oraub8 ub8;
- typedef orasb8 sb8;
-#else
-# define ub8 oraub8
-# define sb8 orasb8
-# define oraub8 unsigned _int64
-# define orasb8 signed _int64
-#endif /* !lint */
-
-#define ORAUB8MINVAL    ((oraub8)0)
-#define ORAUB8MAXVAL    ((oraub8)18446744073709551615)
-#define ORASB8MINVAL    ((orasb8)-9223372036854775808)
-#define ORASB8MAXVAL    ((orasb8) 9223372036854775807)
-
-#define MAXORAUB8MINVAL ((oraub8)0)
-#define MINORAUB8MAXVAL ((oraub8)18446744073709551615)
-#define MAXORASB8MINVAL ((orasb8)-9223372036854775807)
-#define MINORASB8MAXVAL ((orasb8) 9223372036854775807)
-
-
-#define UB1BITS          CHAR_BIT
-#define UB1MASK          ((1 << ((uword)CHAR_BIT)) - 1)
-
-
-#ifdef lint
-# define oratext unsigned char
-#else
-  typedef  unsigned char oratext;
-#endif
-
-
-#ifndef lint 
-typedef          char     eb1;
-typedef          short    eb2;               
-typedef          int      eb4;               
-#else
-# define         eb1      char
-# define         eb2      short
-# define         eb4      int
-#endif
-
-#define EB1MAXVAL      ((eb1)SCHAR_MAX) 
-#define EB1MINVAL      ((eb1)        0) 
-#define MINEB1MAXVAL   ((eb1)  127) 
-#define MAXEB1MINVAL   ((eb1)    0) 
-#define EB2MAXVAL      ((eb2) SHRT_MAX) 
-#define EB2MINVAL      ((eb2)        0) 
-#define MINEB2MAXVAL   ((eb2) 32767) 
-#define MAXEB2MINVAL   ((eb2)     0) 
-#define EB4MAXVAL      ((eb4) INT_MAX) 
-#define EB4MINVAL      ((eb4)        0) 
-#define MINEB4MAXVAL   ((eb4) 2147483647) 
-#define MAXEB4MINVAL   ((eb4)          0) 
-
-
-
-
-#ifndef lint 
-typedef         sb1  b1;                   
-#else 
-#define         b1 sb1 
-#endif  
-#define  B1MAXVAL  SB1MAXVAL 
-#define  B1MINVAL  SB1MINVAL 
- 
-#ifndef lint 
-typedef         sb2      b2;              
-#else 
-#define         b2 sb2 
-#endif  
-#define  B2MAXVAL  SB2MAXVAL 
-#define  B2MINVAL  SB2MINVAL 
- 
-#ifndef lint 
-typedef         sb4    b4;                
-#else 
-#define         b4 sb4 
-#endif  
-# define  B4MAXVAL  SB4MAXVAL 
-# define  B4MINVAL  SB4MINVAL 
- 
-
-#if !defined(LUSEMFC)
-# ifdef lint
-#  define text unsigned char
-# else
-   typedef oratext text;
-# endif
-#endif
-
-#ifdef lint
-# define OraText unsigned char
-#else
-  typedef oratext OraText;
-#endif
-
-#ifndef lint
-typedef          int eword;                  
-typedef unsigned int uword;                  
-typedef   signed int sword;                  
-#else
-#define eword int
-#define uword unsigned int
-#define sword signed int
-#endif 
-
-#define  EWORDMAXVAL  ((eword) INT_MAX)
-#define  EWORDMINVAL  ((eword)       0)
-#define  UWORDMAXVAL  ((uword)UINT_MAX)
-#define  UWORDMINVAL  ((uword)       0)
-#define  SWORDMAXVAL  ((sword) INT_MAX)
-#define  SWORDMINVAL  ((sword) INT_MIN)
-#define  MINEWORDMAXVAL  ((eword)  2147483647)
-#define  MAXEWORDMINVAL  ((eword)      0)
-#define  MINUWORDMAXVAL  ((uword)  4294967295)
-#define  MAXUWORDMINVAL  ((uword)           0)
-#define  MINSWORDMAXVAL  ((sword)  2147483647)
-#define  MAXSWORDMINVAL  ((sword) -2147483647)
-
- 
-#ifdef _WIN64
-
-#ifndef lint
-typedef unsigned _int64 ubig_ora;     
-typedef   signed _int64 sbig_ora;     
-#else
-#define ubig_ora unsigned _int64
-#define sbig_ora signed _int64
-#endif 
-
-#define UBIG_ORAMAXVAL ((ubig_ora)_UI64_MAX)
-#define UBIG_ORAMINVAL ((ubig_ora)        0)
-#define SBIG_ORAMAXVAL ((sbig_ora) _I64_MAX)
-#define SBIG_ORAMINVAL ((sbig_ora) _I64_MIN)
-#define MINUBIG_ORAMAXVAL ((ubig_ora) 4294967295)
-#define MAXUBIG_ORAMINVAL ((ubig_ora)          0)
-#define MINSBIG_ORAMAXVAL ((sbig_ora) 2147483647)
-#define MAXSBIG_ORAMINVAL ((sbig_ora)-2147483647)
-
-#else
-
-#ifndef lint
-typedef unsigned long  ubig_ora;             
-typedef   signed long  sbig_ora;             
-#else
-#define ubig_ora unsigned long
-#define sbig_ora signed long
-#endif 
-
-#define UBIG_ORAMAXVAL ((ubig_ora)ULONG_MAX)
-#define UBIG_ORAMINVAL ((ubig_ora)        0)
-#define SBIG_ORAMAXVAL ((sbig_ora) LONG_MAX)
-#define SBIG_ORAMINVAL ((sbig_ora) LONG_MIN)
-#define MINUBIG_ORAMAXVAL ((ubig_ora) 4294967295)
-#define MAXUBIG_ORAMINVAL ((ubig_ora)          0)
-#define MINSBIG_ORAMAXVAL ((sbig_ora) 2147483647)
-#define MAXSBIG_ORAMINVAL ((sbig_ora)-2147483647)
-
-#endif                                                             /* _WIN64 */
-
-#define UBIGORABITS      (UB1BITS * sizeof(ubig_ora))
-
-
-#undef CONST
-#define CONST const
-
-
-#define dvoid void
-
-
-typedef void (*lgenfp_t)( void );
-
-
-
-#ifndef ORASYS_TYPES
-# include <sys/types.h>
-# define ORASYS_TYPES
-#endif 
-
-
-
-#ifndef boolean
-# define boolean int
-#endif 
-
-
-
-#ifdef sparc
-# define SIZE_TMAXVAL SB4MAXVAL               
-#else
-# define SIZE_TMAXVAL UB4MAXVAL              
-#endif 
-
-#define MINSIZE_TMAXVAL (size_t)4294967295
-
-
-#if !defined(MOTIF) && !defined(LISPL)  && !defined(__cplusplus) && !defined(LUSEMFC)
-typedef  oratext *string;        
-#endif 
-
-#ifndef lint
-typedef unsigned short  utext;
-#else
-#define utext  unsigned short
-#endif
-
- 
-#endif 
-
diff --git a/src/terralib/drivers/OracleSpatial/OCI/include/ori.h b/src/terralib/drivers/OracleSpatial/OCI/include/ori.h
deleted file mode 100644
index 8a19577..0000000
--- a/src/terralib/drivers/OracleSpatial/OCI/include/ori.h
+++ /dev/null
@@ -1,2094 +0,0 @@
-/* Copyright (c) 1994, 2003, Oracle Corporation.  All rights reserved.  */
-
-/*
-  NAME
-    ORI - OCI navigational interface
-
-  DESCRIPTION
-
-    This section is intended to give a brief introduction to the navigational
-    interfaces.  Readers can refer to the documents listed in the section 
-    'RELATED DOCUMENTS' for more information. 
-
-    PURPOSE 
-       The Oracle Call Interface (OCI) supports navigational access of objects.
-       In the navigational paradigm, data is represented as a graph of objects 
-       connected by references.  Objects in the graph are reached by following
-       the references.
-
-    OBJECT ENVIRONMENT
-
-      The object environment is initialized when the OCI environment handle is
-      initialized with the object option.  An object environment contains a
-      heap which buffers type instances in memory.  The object environment also
-      contains an object cache which keeps track of the objects in the object 
-      environment.  Readers can refer to the "Functional Specification for 
-      Programmatic Interface" for more information about the object 
-      environment. 
-
-    INSTANCE, OBJECT AND VALUE
-
-      An OTS instance is an occurence of a type specified by the Oracle Type 
-      System (OTS). This section describes how an OTS instance can be 
-      represented in OCI. In OCI, an OTS instance can be classified based on
-      the type, the lifetime and referencability (see the figure below):
-
-      1) A persistent object is an instance of an object type. A persistent
-         object resides in a row of a table in the server and can exist longer
-         than the duration of a session (connection). Persistent objects can be
-         identified by object references which contain the object identifiers.
-         A persistent object is obtained by pinning its object reference.
-
-      2) A transient object is an instance of an object type. A transient 
-         object cannot exist longer than the duration of a session, and it is 
-         used to contain temporary computing results. Transient objects can 
-         also be identified by references which contain transient object
-         identifiers.
-
-      3) A value is an instance of an user-defined type (object type or 
-         collection type) or any built-in OTS type.  Unlike objects, values of 
-         object types are identified by memory pointers, rather than by 
-         references.  
-
-         A value can be standalone or embbeded.  A standalone value is usually
-         obtained by issuing a select statement.  OCI also allows the client
-         program to select a row of object table into a value by issuing a SQL
-         statement.  Thus, a referenceable object (in the database) can be 
-         represented as a value (which cannot be identified by a reference).
-         A standalone value can also be an out-of-line attribute in an object 
-         (e.g varchar, raw) or an out-of-line element in a collection (e.g.
-         varchar, raw, object).
-      
-         An embedded value is phyiscally included in a containing instance.
-         An embedded value can be an in-line attribute in an object (e.g.
-         number, nested object) or an in-line element in a collection.
-
-         All values are considered to be transient by OCI, e.g. OCI does not
-         support automatic flushing a value to the database, and the client has
-         to explicitly execute a SQL statement to store a value into the 
-         database. For embedded values, they are flushed when their containing
-         instance are flushed.
-
-
-                                OTS instance
-                                 |        |  
-                                 v        v
-                               object    value         (type)
-                               |    |
-                               v    v
-                       persistent  transient           (lifetime)
-                  
- 
-                     persistent obj   transient obj     value  
-      ---------------------------------------------------------------
-      |              |              |               |  object type, |
-      | type         | object type  |  object type  |  built-in,    |
-      |              |              |               |  collection   |
-      ---------------------------------------------------------------
-      | maximum      | until object |  session      | session       |
-      | lifetime     | is deleted   |               |               | 
-      ---------------------------------------------------------------
-      | referencable |    yes       |     yes       |    no         |    
-      ---------------------------------------------------------------
-      | embeddable   |    no        |     no        |    yes        |    
-      ---------------------------------------------------------------
-
-    REFERENCEABLE OBJECT, STANDALONE OBJECT, EMBEDDED OBJECT
-
-       In the reminding of this include file, the following term will be used:
-       1) The term 'object' can be generally referred to a persistent object,
-          a transient object, a standalone value of object type, or an embedded
-          value of object type.
-       2) The term 'referenceable object' refers to a persistent object or a 
-          transient object.
-       3) The term 'standalone object' refers to a persistent object, a
-          transient object or a standalone value of object type.
-       4) The term 'embedded object' referes to a embbeded value of object 
-          type.
-
-    META ATTRIBUTES 
-
-      There is a set of meta-attributes that are defined for standalone 
-      objects.  A meta-attribute can be transient or persistent. A 
-      transient meta-attribute is applicable to an instance only when it is 
-      in memory. A persistent meta-attribute can be applicable to an instance 
-      that is in the disk. 
-
-      The set of user visible meta-attributes for persistent objects are:
-      1) existent (persistent) : Does the object exist?
-      2) nullness (persistent) : Null information of the instance
-      3) locked   (persistent) : Is the object locked?
-      4) pinned    (transient) : Is the object being accessed by the client?
-      5) dirty     (transient) : Has the object been modified?
-      6) allocation duration (transient) : see below
-      7) pin duration        (transient) : see below
-
-      The set of user visible meta-attributes for transient objects are:
-      1) existent  (transient) : Does the object exist?
-      2) nullness  (transient) : Null information of the instance 
-      3) pinned    (transient) : Is the object being accessed by the client? 
-      4) dirty     (transient) : Has the object been modified?
-      4) allocation duration (transient) : see below
-      5) pin duration        (transient) : see below
-
-      The set of user visible meta-attributes for standalone values of object  
-      type or collections are:
-      1) allocation duration (transient) : see below
-      2) nullness            (transient) : Null information of the instance 
-                                           (of an object type)
-
-    NULLNESS OF AN INSTANCE 
-
-      Each standalone object is associated with a null structure which keeps 
-      the null information about the object.  A null indicates the absence of 
-      data. The null structure itself contains null indicators that represent:
-        1) atomic nullness : a null value that pertains to the whole object 
-        2) null status of the individual attribute in the object 
-
-      The layout of a null structure in memory resembles that of the object,
-      except that the null structure has additional indicators to represent 
-      the atomic nullness for each object. 
-
-      An non-existent object is different than an object that is atomically 
-      null. A atomically null object is an existing object that has no data. 
-
-    MEMORY LAYOUT OF AN OBJECT
-
-      A standalone object in memory is composed of a top level memory chunk, 
-      a null structure and optionally, a number of secondary memory chunks. 
-      For a DEPARTMENT object type,
-
-          OBJECT TYPE department
-          {
-              dep_name      varchar2(20),
-              budget        number,
-              manager       person,              /o person is an object type o/
-              employees     collection of person
-          }
-
-      Each instance of DEPARTMENT will has a top level memory chunk which
-      contains the top level attributes such as dep_name, budget, manager and
-      employees.  The attributes dep_name and employees are themselves pointers
-      to the additional memory (the secondary memory chunks). The secondary
-      memory is for the out-of-line attribute (e.g. varray).
-
-    CONSISTENCY MODEL
-
-      Each pin operation behaves like a distinct SQL select.  Thus, the object 
-      cache does not guarantee consistency for a graph of objects.  In order to
-      retrieve a consistent graph of objects, the user has to explicitly start 
-      a serializable transaction or a read-only transaction. 
-
-    DURATION
-      In OCI, a duration is used to specify 
-
-        1) the length of memory allocation of an instance 
-           When each instance is allocated, it is associate with an allocation
-           duration.  The memory occupied by the object is freed automatically 
-           at the end of its allocation duration. The allocation duration of an
-           instance cannot be changed.  
-
-        2) the length of pinning of an object
-           When each object is pinned, the client has to give a pin duration 
-           which specify the length of time that the object is intended to be
-           used.  It is an user error to specify a pin duration longer than an
-           allocation duration of the object. An object is completely unpinned 
-           at the end of its pin duration (see OCIObjectUnpin()). 
-
-      An OCI program can use the allocation duration and the pin duration to 
-      automatically free the memory of the instances:
-       1) Transient objects and values are freed at the end of the allocation
-          duration.
-       2) Persistent objects ARE freed at the end of the allocation duration.
-          Persistent objects CAN be freed at the end of the pin duration when
-          the objects are completely unpinned. The persistent objects are said
-          to be aged out. See OCIObjectUnpin() for more details.
-
-      There are 3 predefined duration: session, transaction, call.  The time 
-      spans of these durations are defined based on the programming model 
-      presented by OCI. The call duration is mapped to the transaction 
-      duration in the client-side environment. See oro.h for the macros defined
-      for these 3 durations.
-
-      A pin duration can be promoted. For example, if an object is pinned with
-      duration 1, and the object is later pinned with duration 2, the pin 
-      routine will try to find a duration that is longer or equal to the 
-      length of both duration 1 and duration 2.  The pin duration of the object
-      is set to the that duration. The object is automatically unpinned only 
-      after both duration 1 and duration 2 are terminated. 
-
-  RELATED DOCUMENTS
-    "Functional Specification for Oracle Object RDBMS" 
-    "Functional Specification for Programmatic Interfaces" 
-    "Functional Specification for the Oracle Type System (OTS)" 
-
-  INSPECTION STATUS 
-    Inspection date:
-    Inspection status:
-    Estimated increasing cost defects per page:
-    Rule sets:        
-
-  ACCEPTANCE REVIEW STATUS 
-    Review date:   
-    Review status:
-    Reviewers: 
-
-  PUBLIC FUNCTIONS
-    OCIObjectNew - OCI new a standalone instance 
-    OCIObjectPin - OCI pin an object by reference
-    OCIObjectUnpin - OCI unpin a referenceable object
-    OCIObjectPinCountReset - OCI reset the pin count of a referenceable object 
-    OCIObjectLock - OCI lock a persistent object
-    OCIObjectLockNoWait - OCI lock a persistent object
-    OCIObjectMarkUpdate - OCI mark a referenceable object as updated
-    OCIObjectUnmark - OCI unmark a dirtied referenceable object 
-    OCIObjectUnmarkByRef - OCI unmark a dirtied object by reference 
-    OCIObjectFree - OCI free a standalone instance 
-    OCIObjectMarkDelete - OCI mark a referenceable object as deleted 
-    OCIObjectMarkDeleteByRef - OCI mark a referenceable object as deleted by 
-                               giving a reference
-    OCIObjectFlush - OCI flush a persistent object
-    OCIObjectRefresh - OCI refresh a persistent object 
-    OCIObjectCopy - OCI CoPy one object to another
-    OCIObjectGetTypeRef - OCI get the Type Reference of a standalone object 
-    OCIObjectGetObjectRef - OCI get the Object's Reference 
-    OCIObjectGetInd - OCI get Null Structure of an standalone object 
-    OCIObjectExists - OCI get the existence of a referenceable object
-    OCIObjectGetProperty - get object property
-    OCIObjectIsLocked - OCI get the lock status of a referenceable object
-    OCIObjectIsDirty - OCI get the dirty status of a referenceable object
-    OCIObjectPinTable - OCI get Table object 
-    OCIObjectArrayPin - OCI pin array of objects 
-    OCIObjectGetPrimayKeyTypeRef - OCI get the Ref for the primary key OID's 
-                                   type 
-    OCIObjectMakeObjectRef - OCI Create a pk or sys generated REF  
-
-    OCIObjectGetNewOID - OCI Create a new Object ID
-
-    OCICacheFlush - OCI flsuh the modified persistent objects in the cache
-    OCICacheRefresh - OCI refresh persistent objects in the cache 
-    OCICacheUnpin - OCI unpin referenceable objects in the cache
-    OCICacheFree - OCI free all instances in the environment
-    OCICacheUnmark - OCI unmark all dirty referenceable objects in the cache 
-
-  PRIVATE FUNCTIONS
-    None
-
-  EXAMPLES 
-
-    The following types will be used in the examples in this section: 
-
-    OBJECT TYPE professor
-    (
-        varchar2  name;
-        number    department;
-        number    num_of_students; 
-    );
-
-    OBJECT TYPE course 
-    (
-        varchar2   name;
-        number     grade; 
-    );
-
-    OBJECT TYPE student
-    (
-        vstring      name;
-        number       department;
-        ref          advisor;                      /o advisor is a professor o/
-        collection   courses;
-    );
-
-    EXAMPLE 1
-
-      Here is a set of examples to illustrate the usages of some of the
-      orio and oric functions.  
-
-      OCIenv    *env;              /o OCI environment handle o/
-      OCIError  *err;              /o OCI error handle o/
-      OCISvcCtx *svc;              /o OCI service handle o/
-
-      dvoid   *stu_tbl;            /o pointer to the student table o/
-      OCIType *stu_tdo;            /o student type tdo o/
-
-      OCIRef    *stu2_ref;         /o object reference to student object o/
-      student   *stu1;             /o pointer to the student object o/
-      student   *stu2;             /o pointer to the student object o/
-      professor *pro;              /o pointer to the professor object o/
-
-      /o Initialize the OCI environment handle, error handle and service
-         handle and login to the database o/ 
-      ...
-
-      /o CREATE A PERSISTENT OBJECT o/
-
-      /o get the table object of student o/
-      if (OCIObjectPinTable(env, err, svc, "ORACLEU", sizeof("ORACLEU"), 
-          "STUDENT_TABLE", sizeof("STUDENT_TABLE"), (OCIRef *)0, 
-          OCI_DURATION_NULL, &stu_tbl) != OCI_SUCCESS)
-          /o error handling code o/ 
-
-      /o get type object of student o/
-      if (OCITypeByName(env, err, svc, "ORACLEU", sizeof("ORACLEU"), 
-          "STUDENT", sizeof("STUDENT"), OCI_DURATION_NULL, OCI_TYPEGET_HEADER,
-          &stu_tdo) != OCI_SUCCESS)
-          /o error handling code o/ 
-
-      /o create a persistent object 'mark' (of type student) o/ 
-      if (OCIObjectNew(env, err, svc, OCI_TYPECODE_ADT, stu_tdo, stu_tbl, 
-            OCI_DURATION_TRANS, (ub1)FALSE, (dvoid **)&stu1) != OCI_SUCCESS)
-          /o error handling code o/
-
-      /o RETRIEVE OBJECTS IN PERSISTENT STORES o/ 
-
-      /o Use OCI to retrieve a reference to student object 'joe'.
-       o The retrieved reference is bound to the variable stu2_ref.
-       o/ 
-
-      /o pin/retrieve the student "joe" by reference o/ 
-      if (OCIObjectPin(env, err, &stu2_ref, (OCIComplexObject *)0, OCI_PIN_ANY,
-                  OCI_DURATION_TRANS, OCI_LOCK_X, &stu2) != OCI_SUCCESS)
-          /o error handling code o/ 
-
-      /o pin/retrieve the advisor of student "joe" by reference o/ 
-      if (OCIObjectPin(env, err, &stu2->advisor, (OCIComplexObject *)0,
-          OCI_PIN_ANY, OCI_DURATION_TRANS, OCI_LOCK_X, &pro) != OCI_SUCCESS)
-          /o error handling code o/ 
-
-      /o MODIFY OBJECTS o/
-
-      /o initialize the newly created object "mark" o/
-      DISCARD OCIStringAssignText(env, err, "mark", sizeof("mark"), 
-                                    &stu1->name);
-      department = 522;
-      DISCARD OCINumberFromInt(err, &department, sizeof(department), 
-                                    OCI_NUMBER_UNSIGNED, &stu1->department);
-
-      /o assign advisor to student "mark" o/
-      DISCARD OCIRefAssign(env, err, &stu2->advisor, &stu1->advisor);
-
-      /o update student "joe". o/  
-      department = 533;
-      DISCARD OCINumberFromInt(err, &department, sizeof(department), 
-                                    OCI_NUMBER_UNSIGNED, &stu2->department);
-      DISCARD OCIObjectMarkUpdate(env, err, stu2);
-
-      /o UNPIN OBJECTS AFTER FINSIHED PROCESSING THEM o/ 
-
-      /o unpin the student object "mark" o/
-      if (OCIObjectUnpin(env, err, stu1) != OCI_SUCCESS)
-          /o error handling code o/ 
-
-      /o unpin the student object "joe" o/
-      if (OCIObjectUnpin(env, err, stu2) != OCI_SUCCESS)
-          /o error handling code o/ 
-
-      /o unpin the professor object o/
-      if (OCIObjectUnpin(env, err, pro) != OCI_SUCCESS)
-          /o error handling code o/ 
-
-      /o unpin the type object o/
-      if (OCIObjectUnpin(env, err, stu_tdo) != OCI_SUCCESS)
-          /o error handling code o/ 
-
-      /o unpin the table object o/
-      if (OCIObjectUnpin(env, err, stu_tbl) != OCI_SUCCESS)
-          /o error handling code o/ 
-
-      /o FLUSH MODIFIED OBJECTS BACK TO PERSISTENT STORE o/
-
-      if (OCICacheFlush(env, err, svc, (dvoid *)0, ((OCIRef*)(*)())0, 
-                       (OCIRef *)0) != OCI_SUCCESS)
-          /o error handling code o/
-
-      /o commit transaction o/
-
-    END OF EXAMPLE 1
-
-  NOTES
-    This file has been subsetted to contain only the routines that will
-    be in the first release.
-
-  MODIFIED
-    srseshad   03/12/03 - convert oci public api to ansi
-    aahluwal   06/03/02 - bug 2360115
-    bpalaval   02/09/01 - Change text to oratext.
-    rkasamse   06/21/00 - add ociobjectgetnewoid
-    rkasamse   05/24/00 - add OCIObjectSetData
-    whe        09/01/99 - 976457:check __cplusplus for C++ code
-    smuralid   10/29/98 - add comments for OCIObjectMakeObjectRef              
-    mkrishna   08/19/98 - change OCIGetPkTypeRef to OCIObjectGetPrimaryKeyTypeR
-    mkrishna   08/10/98 - add OCIObjectMakeObjectRef & OCIObjectGetPkTypeRef
-    rkasamse   06/22/98 - add comments for OCIDurationBegin(End)
-    pmitra     04/01/98 - OCIObjectLockNoWait added                            
-    pmitra     11/05/97 - [573769] OCIObjectArrayPin pos parameter cannot be NU
-    cxcheng    07/29/97 - fix compile for short names
-    skrishna   07/14/97 - add OCIObjectGetProperty
-    skrishna   04/30/97 - OCIObjectFlushRefresh: remove duplicate declaration
-    skrishna   04/24/97 - flag unsupported functions
-    sthakur    03/20/97 - modify flag argument to OCIObjectFree
-    skrishna   03/18/97 - fix ifdef for supporting ansi and k&r proto-types
-    cxcheng    02/19/97 - remove short names support
-    cxcheng    02/06/97 - take out short name support except with SLSHORTNAME
-    sthakur    12/20/96 - fix a typepo in OCIOBjectArrayPin
-    jboonleu   11/07/96 - modify comments
-    cxcheng    10/28/96 - more beautification changes
-    jboonleu   10/24/96 - add flag to OCIObjectFree
-    jboonleu   10/22/96 - change interface of OCICacheFlush
-    cxcheng    10/18/96 - rename OCIObjectPinArray to OCIObjectArrayPin
-    cxcheng    10/14/96 - more renaming of types
-    jboonleu   10/09/96 - add new interfaces
-    cxcheng    10/09/96 - more lint fixes
-    cxcheng    10/08/96 - more lint fixes
-    jboonleu   09/27/96 - fix lint errors
-    jboonleu   10/07/96 - beautify ori.h after conversion to long names
-    cxcheng    10/04/96 - replace short names with long names
-    sthakur    08/20/96 - add COR context to OCIObjectPin
-    mluong     07/17/96 - add back orioglk, oriogdr, oriogiv, and oriocur.
-    jboonleu   07/17/96 - rename refresh option to conherency option 
-    jboonleu   07/16/96 - change comment for cache consistency
-    jwijaya    07/03/96 - add ANSI prototypes
-    jboonleu   06/12/96 - update comment
-    jboonleu   05/08/96 -  change description of OCIDurationGetParent
-    jboonleu   05/01/96 -  add OROOCOSFN
-    skrishna   04/08/96 -  change ori*() to take OCIEnv* and OCIError* instead
-                           of oroenv*
-    jboonleu   01/04/96 -  interface change
-    jboonleu   10/24/95 -  support of variable ref
-    jboonleu   02/15/95 -  new interface
-    sthakur    01/05/95 -  pass username to origrgc 
-    skotsovo   12/07/94 -  update example 
-    jwijaya    11/15/94 -  rename ORONSPTAB to ORONSPEXT 
-    jwijaya    10/06/94 -  add namespace to oriopnm() 
-    jwijaya    10/02/94 -  connection handle -> connection number 
-    jboonleu   08/16/94 -  fix lint errors 
-    jboonleu   07/20/94 -  change interface of OCICacheFlush 
-    tanguyen   07/18/94 -  add oriocpe, change OCIObjectCopy to oriocps
-    tcheng     07/15/94 -  add init param maximum_sga_heap_size 
-    tcheng     07/13/94 -  change origini to get param string 
-    jboonleu   07/05/94 -  change sccs string from sccid to a comment 
-    jboonleu   07/01/94 -  Add examples to ORIO* and ORIC* functions 
-    tanguyen   06/30/94 -  Fix the ORI_ORACLE ifdef
-    skotsovo   06/27/94 -  include all public functions in public functions 
-                           list at top of header file
-    tcheng     06/27/94 -  modify comments according to new template 
-    tanguyen   06/24/94 -  fix comments for OCIObjectCopy 
-    tcheng     06/24/94 -  fix comments in origrgc()
-    tanguyen   06/21/94 -  fix comments and format 
-    tcheng     06/20/94 -  commenting origini/trm/err/rgc/urg() functions
-    tanguyen   06/16/94 -  fix descriptions of ref operations 
-    tanguyen   06/16/94 -  clarifies refs comparison 
-    tanguyen   05/12/94 -  adds more interfaces (OCIObjectMarkUpdate)
-    jwijaya    05/10/94 -  fix examples, add origurg, change origcon to origrgc
-    tanguyen   05/03/94 -  remove unnecessary 'type' argument from 
-                           'OCIObjectCopy'
-    tanguyen   03/08/94 -  clarifies comments
-    jwijaya    02/16/94 -  more questions
-    jwijaya    02/11/94 -  more comments
-    jwijaya    02/10/94 -  identify optional arguments
-    jwijaya    02/07/94 -  Creation
-*/
-
-
-#ifndef ORATYPES
-#include <oratypes.h>
-#endif
-#ifndef ORO_ORACLE
-#include <oro.h>
-#endif
-#ifndef OCI_ORACLE
-#include <oci.h>
-#endif
-#ifndef ORT_ORACLE
-#include <ort.h>
-#endif
-
-#ifndef ORI_ORACLE
-#define ORI_ORACLE
-
-/*---------------------------------------------------------------------------*/
-/*                         SHORT NAMES SUPPORT SECTION                       */
-/*---------------------------------------------------------------------------*/
-
-#ifdef SLSHORTNAME
-
-/* the following are short names that are only supported on IBM mainframes
-   with the SLSHORTNAME defined.
-   With this all subsequent long names will actually be substituted with
-   the short names here */
-
-#define OCIDurationBegin                 origbgu
-#define OCIDurationEnd                   origedu
-#define OCIDurationGetParent             origpdr
-#define OCICacheFlushRefresh             oricfrh
-#define OCICacheUnpin                    oricunp
-#define OCICacheFree                     oricfre
-#define OCICacheUnmark                   oricumk
-#define OCICacheGetObjects               oricgpr
-#define OCICacheRegister                 oricscb
-#define OCIObjectUnpin                   oriounp
-#define OCIObjectPinCountReset           orioupz
-#define OCIObjectLock                    oriolck
-#define OCIObjectLockNoWait              oriolnw
-#define OCIObjectMarkUpdate              orioupd
-#define OCIObjectUnmark                  orioumk
-#define OCIObjectUnmarkByRef             orioumr
-#define OCIObjectAlwaysLatest            oriomkl
-#define OCIObjectNotAlwaysLatest         oriouml
-#define OCIObjectMarkDeleteByRef         oriordl
-#define OCIObjectMarkDelete              oriopdl
-#define OCIObjectFlush                   oriofls
-#define OCIObjectFlushRefresh            oriofrh
-#define OCIObjectCopy                    oriocpy
-#define OCIObjectGetTypeRef              oriogtr
-#define OCIObjectGetObjectRef            oriogor
-#define OCIObjectGetInd                  oriogns
-#define OCIObjectExists                  oriogex
-#define OCIObjectGetProperty             oriogpr
-#define OCIObjectRefresh                 oriorfs
-#define OCIObjectPinTable                oriogtb
-#define OCIObjectGetPrimaryKeyTypeRef    oriogpf
-#define OCIObjectMakeObjectRef           oriomrf
-
-#define OCIObjectNew                     orionew
-#define OCIObjectPin                     oriopin
-#define OCIObjectFree                    oriofre
-#define OCIObjectArrayPin                orioapn
-#define OCIObjectIsDirty                 oriodrt
-#define OCIObjectIsDirtied               oriodrd
-#define OCIObjectIsLoaded                orioldd
-#define OCICacheFlush                    oricfls
-#define OCICacheRefresh                  oricrfs
-
-#endif                                                        /* SLSHORTNAME */
-
-/*---------------------------------------------------------------------------*/
-/*                       PUBLIC TYPES AND CONSTANTS                          */
-/*---------------------------------------------------------------------------*/
-
-/* Also see oro.h. */
-
-/*---------------------------------------------------------------------------*/
-/*                           PUBLIC FUNCTIONS                                */
-/*---------------------------------------------------------------------------*/
-/*---------------------------------------------------------------------------*/
-/*                       OBJECT/INSTANCE OPERATIONS                          */
-/*---------------------------------------------------------------------------*/
-
-/*--------------------------- OCIObjectNew ----------------------------------*/
-sword OCIObjectNew(    OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc,
-                       OCITypeCode typecode, OCIType *tdo, dvoid *table, 
-                       OCIDuration duration, boolean value, 
-                       dvoid **instance    );
-/*
-   NAME: OCIObjectNew - OCI new (create) a standalone instance
-   PARAMETERS:
-        env  (IN/OUT) - OCI environment handle initialized in object mode
-        err  (IN/OUT) - error handle. If there is an error, it is
-                        recorded in 'err' and this function returns OCI_ERROR.
-                        The error recorded in 'err' can be retrieved by calling
-                        OCIErrorGet().
-        svc      (IN) - OCI service handle.  
-        typecode (IN) - the typecode of the type of the instance. 
-        tdo      (IN, optional) - pointer to the type descriptor object. The 
-                        TDO describes the type of the instance that is to be 
-                        created. Refer to OCITypeByName() for obtaining a TDO. 
-                        The TDO is required for creating a named type (e.g. an
-                        object or a collection).
-        table (IN, optional) - pointer to a table object which specifies a 
-                        table in the server.  This parameter can be set to NULL
-                        if no table is given. See the description below to find
-                        out how the table object and the TDO are used together
-                        to determine the kind of instances (persistent, 
-                        transient, value) to be created. Also see 
-                        OCIObjectPinTable() for retrieving a table object.
-        duration (IN) - this is an overloaded parameter. The use of this
-                        parameter is based on the kind of the instance that is 
-                        to be created.
-                        a) persistent object. This parameter specifies the
-                           pin duration.
-                        b) transient object. This parameter specififes the 
-                           allocation duration and pin duration. 
-                        c) value. This parameter specifies the allocation
-                           duration. 
-        value    (IN)  - specifies whether the created object is a value.
-                         If TRUE, then a value is created. Otherwise, a 
-                         referenceable object is created.  If the instance is 
-                         not an object, then this parameter is ignored.
-        instance (OUT) - address of the newly created instance
-                  
-   REQUIRES:
-        - a valid OCI environment handle must be given.
-   DESCRIPTION:
-        This function creates a new instance of the type specified by the 
-        typecode or the TDO. Based on the parameters 'typecode' (or 'tdo'), 
-        'value' and 'table', different kinds of instances can be created:
-            
-                                     The parameter 'table' is not NULL?
-
-                                               yes              no
-             ----------------------------------------------------------------
-             | object type (value=TRUE)   |   value         |   value       |
-             ----------------------------------------------------------------
-             | object type (value=FALSE)  | persistent obj  | transient obj |
-       type  ----------------------------------------------------------------
-             | built-in type              |   value         |   value       |
-             ----------------------------------------------------------------
-             | collection type            |   value         |   value       |
-             ----------------------------------------------------------------
-
-        This function allocates the top level memory chunk of an OTS instance.
-        The attributes in the top level memory are initialized (e.g. an 
-        attribute of varchar2 is initialized to a vstring of 0 length). 
-
-        If the instance is an object, the object is marked existed but is 
-        atomically null. 
-
-        FOR PERSISTENT OBJECTS:
-        The object is marked dirty and existed.  The allocation duration for 
-        the object is session. The object is pinned and the pin duration is 
-        specified by the given parameter 'duration'.
-
-        FOR TRANSIENT OBJECTS:
-        The object is pinned. The allocation duration and the pin duration are 
-        specified by the given parameter 'duration'.
-
-        FOR VALUES:
-        The allocation duration is specified by the given parameter 'duration'.
-
-   RETURNS:
-        if environment handle or error handle is null, return 
-        OCI_INVALID_HANDLE.
-        if operation suceeds, return OCI_SUCCESS. 
-        if operation fails, return OCI_ERROR. 
- */
-
-/*--------------------------- OCIObjectPin ----------------------------------*/
-sword OCIObjectPin(    OCIEnv *env, OCIError *err, OCIRef *object_ref, 
-                       OCIComplexObject *corhdl, OCIPinOpt pin_option, 
-                       OCIDuration pin_duration, 
-                       OCILockOpt lock_option, dvoid **object    );
-/*
-   NAME: OCIObjectPin - OCI pin a referenceable object
-   PARAMETERS:
-        env        (IN/OUT) - OCI environment handle initialized in object mode
-        err        (IN/OUT) - error handle. If there is an error, it is
-                              recorded in 'err' and this function returns 
-                              OCI_ERROR. The error recorded in 'err' can be 
-                              retrieved by calling OCIErrorGet().
-        object_ref     (IN) - the reference to the object. 
-        corhdl         (IN) - handle for complex object retrieval. 
-        pin_option     (IN) - See description below.
-        pin_duration   (IN) - The duration of which the object is being accesed
-                              by a client. The object is implicitly unpinned at
-                              the end of the pin duration. 
-                              If OCI_DURATION_NULL is passed, there is no pin 
-                              promotion if the object is already loaded into 
-                              the cache. If the object is not yet loaded, then 
-                              the pin duration is set to OCI_DURATION_DEFAULT. 
-        lock_option    (IN) - lock option (e.g., exclusive). If a lock option
-                              is specified, the object is locked in the server.
-                              See 'oro.h' for description about lock option. 
-        object        (OUT) - the pointer to the pinned object.
-
-   REQUIRES:
-        - a valid OCI environment handle must be given.
-   DESCRIPTION:
-
-        This function pins a referenceable object instance given the object
-        reference. The process of pinning serves three purposes:
-
-        1) locate an object given its reference. This is done by the object
-           cache which keeps track of the objects in the object heap.  
-
-        2) notify the object cache that an object is being in use. An object 
-           can be pinned many times. A pinned object will remain in memory 
-           until it is completely unpinned (see OCIObjectUnpin()). 
-
-        3) notify the object cache that a persistent object is being in use 
-           such that the persistent object cannot be aged out.  Since a 
-           persistent object can be loaded from the server whenever is needed, 
-           the memory utilization can be increased if a completely unpinned 
-           persistent object can be freed (aged out), even before the 
-           allocation duration is expired.  
-
-        Also see OCIObjectUnpin() for more information about unpinning.
-
-        FOR PERSISTENT OBJECTS:
-
-        When pinning a persistent object, if it is not in the cache, the object
-        will be fetched from the persistent store. The allocation duration of
-        the object is session. If the object is already in the cache, it is
-        returned to the client.  The object will be locked in the server if a 
-        lock option is specified. 
-
-        This function will return an error for a non-existent object.  
-
-        A pin option is used to specify the copy of the object that is to be 
-        retrieved: 
-
-        1) If option is OCI_PIN_ANY (pin any), if the object is already 
-           in the environment heap, return this object. Otherwise, the object 
-           is retrieved from the database.  This option is useful when the 
-           client knows that he has the exclusive access to the data in a 
-           session.
-
-        2) If option is OCI_PIN_LATEST (pin latest), if the object is 
-           not cached, it is retrieved from the database.  If the object is 
-           cached, it is refreshed with the latest version. See 
-           OCIObjectRefresh() for more information about refreshing.
-
-        3) If option is OCI_PIN_RECENT (pin recent), if the object is loaded
-           into the cache in the current transaction, the object is returned.
-           If the object is not loaded in the current transaction, the object
-           is refreshed from the server.
-
-        FOR TRANSIENT OBJECTS:
-
-        This function will return an error if the transient object has already 
-        been freed. This function does not return an error if an exclusive 
-        lock is specified in the lock option. 
-
-   RETURNS:
-        if environment handle or error handle is null, return 
-        OCI_INVALID_HANDLE.
-        if operation suceeds, return OCI_SUCCESS. 
-        if operation fails, return OCI_ERROR. 
- */
-
-/*------------------------------ OCIObjectUnpin -----------------------------*/
-sword OCIObjectUnpin(    OCIEnv *env, OCIError *err, dvoid *object    );
-/*
-   NAME: OCIObjectUnpin - OCI unpin a referenceable object
-   PARAMETERS:
-        env   (IN/OUT) - OCI environment handle initialized in object mode
-        err   (IN/OUT) - error handle. If there is an error, it is
-                         recorded in 'err' and this function returns OCI_ERROR.
-                         The error recorded in 'err' can be retrieved by 
-                         calling OCIErrorGet().
-        object    (IN) - pointer to an object
-   REQUIRES:
-        - a valid OCI environment handle must be given.
-        - The specified object must be pinned.
-   DESCRIPTION:
-        This function unpins an object.  An object is completely unpinned when 
-          1) the object was unpinned N times after it has been pinned N times
-             (by calling OCIObjectPin()).
-          2) it is the end of the pin duration
-          3) the function OCIObjectPinCountReset() is called 
-
-        There is a pin count associated with each object which is incremented
-        whenever an object is pinned. When the pin count of the object is zero,
-        the object is said to be completely unpinned. An unpinned object can
-        be freed without error.
-
-        FOR PERSISTENT OBJECTS:
-        When a persistent object is completely unpinned, it becomes a candidate
-        for aging. The memory of an object is freed when it is aged out. Aging
-        is used to maximize the utilization of memory.  An dirty object cannot 
-        be aged out unless it is flushed.
-
-        FOR TRANSIENT OBJECTS:
-        The pin count of the object is decremented. A transient can be freed
-        only at the end of its allocation duration or when it is explicitly
-        deleted by calling OCIObjectFree().
-
-        FOR VALUE:
-        This function will return an error for value.
-
-   RETURNS:
-        if environment handle or error handle is null, return 
-        OCI_INVALID_HANDLE.
-        if operation suceeds, return OCI_SUCCESS. 
-        if operation fails, return OCI_ERROR. 
- */
-
-/*---------------------------- OCIObjectPinCountReset -----------------------*/
-sword OCIObjectPinCountReset(    OCIEnv *env, OCIError *err, dvoid *object   );
-/*
-   NAME: OCIObjectPinCountReset - OCI resets the pin count of a referenceable
-                                  object
-   PARAMETERS:
-        env   (IN/OUT) - OCI environment handle initialized in object mode
-        err   (IN/OUT) - error handle. If there is an error, it is
-                         recorded in 'err' and this function returns OCI_ERROR.
-                         The error recorded in 'err' can be retrieved by
-                         calling OCIErrorGet().
-        object    (IN) - pointer to an object
-   REQUIRES:
-        - a valid OCI environment handle must be given.
-        - The specified object must be pinned.
-   DESCRIPTION:
-        This function completely unpins an object.  When an object is 
-        completely unpinned, it can be freed without error.  
-
-        FOR PERSISTENT OBJECTS:
-        When a persistent object is completely unpinned, it becomes a candidate
-        for aging. The memory of an object is freed when it is aged out. Aging
-        is used to maximize the utilization of memory.  An dirty object cannot 
-        be aged out unless it is flushed.
-
-        FOR TRANSIENT OBJECTS:
-        The pin count of the object is decremented. A transient can be freed
-        only at the end of its allocation duration or when it is explicitly
-        freed by calling OCIObjectFree().
-
-        FOR VALUE:
-        This function will return an error for value.
-
-   RETURNS:
-        if environment handle or error handle is null, return 
-        OCI_INVALID_HANDLE.
-        if operation suceeds, return OCI_SUCCESS. 
-        if operation fails, return OCI_ERROR. 
- */
-
-/*--------------------------- OCIObjectLock ---------------------------------*/
-sword OCIObjectLock(    OCIEnv *env, OCIError *err, dvoid *object    );
-/*
-   NAME: OCIObjectLock - OCI lock a persistent object
-   PARAMETERS:
-        env   (IN/OUT) - OCI environment handle initialized in object mode
-        err   (IN/OUT) - error handle. If there is an error, it is
-                         recorded in 'err' and this function returns OCI_ERROR.
-                         The error recorded in 'err' can be retrieved by
-                         calling OCIErrorGet().
-        object    (IN) - pointer to the persistent object 
-   REQUIRES:
-        - a valid OCI environment handle must be given.
-        - The specified object must be pinned.
-   DESCRIPTION:
-        This function locks a persistent object at the server. Unlike
-        OCIObjectLockNoWait() this function waits if another user currently
-        holds a lock on the desired object. This function
-        returns an error if:
-          1) the object is non-existent.
-
-        This function will return an error for transient objects and values.
-        The lock of an object is released at the end of a transaction.
-
-   RETURNS:
-        if environment handle or error handle is null, return 
-        OCI_INVALID_HANDLE.
-        if operation suceeds, return OCI_SUCCESS. 
-        if operation fails, return OCI_ERROR. 
-*/
-
-/*------------------------ OCIObjectLockNoWait ------------------------------*/
-sword OCIObjectLockNoWait(    OCIEnv *env, OCIError *err, dvoid *object    );
-/*
-   NAME: OCIObjectLockNoWait - OCI lock a persistent object, do not wait for
-                               the lock, return error if lock not available
-   PARAMETERS:
-        env   (IN/OUT) - OCI environment handle initialized in object mode
-        err   (IN/OUT) - error handle. If there is an error, it is
-                         recorded in 'err' and this function returns OCI_ERROR.
-                         The error recorded in 'err' can be retrieved by
-                         calling OCIErrorGet().
-        object    (IN) - pointer to the persistent object 
-   REQUIRES:
-        - a valid OCI environment handle must be given.
-        - The specified object must be pinned.
-   DESCRIPTION:
-        This function locks a persistent object at the server. Unlike
-        OCIObjectLock() this function will not wait if another user holds
-        the lock on the desired object. This function returns an error if:
-          1) the object is non-existent.
-          2) the object is currently locked by another user in which
-             case this function returns with an error.
-
-        This function will return an error for transient objects and values.
-        The lock of an object is released at the end of a transaction.
-
-   RETURNS:
-        if environment handle or error handle is null, return 
-        OCI_INVALID_HANDLE.
-        if operation suceeds, return OCI_SUCCESS. 
-        if operation fails, return OCI_ERROR. 
-*/
-
-/*--------------------------- OCIObjectMarkUpdate ---------------------------*/
-sword OCIObjectMarkUpdate(    OCIEnv *env, OCIError *err, dvoid *object    );
-/*
-   NAME: OCIObjectMarkUpdate - OCI marks an object as updated
-   PARAMETERS:
-        env   (IN/OUT) - OCI environment handle initialized in object mode
-        err   (IN/OUT) - error handle. If there is an error, it is
-                         recorded in 'err' and this function returns OCI_ERROR.
-                         The error recorded in 'err' can be retrieved by
-                         calling OCIErrorGet().
-        object    (IN) - pointer to the persistent object 
-   REQUIRES:
-        - a valid OCI environment handle must be given.
-        - The specified object must be pinned.
-   DESCRIPTION:
-        FOR PERSISTENT OBJECTS:
-        This function marks the specified persistent object as updated. The
-        persistent objects will be written to the server when the object cache
-        is flushed.  The object is not locked or flushed by this function. It
-        is an error to update a deleted object.  
-
-        After an object is marked updated and flushed, this function must be
-        called again to mark the object as updated if it has been dirtied
-        after it is being flushed.
-
-        FOR TRANSIENT OBJECTS:
-        This function marks the specified transient object as updated. The
-        transient objects will NOT be written to the server. It is an error
-        to update a deleted object.
-
-        FOR VALUES:
-        It is an no-op for values.
-
-   RETURNS:
-        if environment handle or error handle is null, return 
-        OCI_INVALID_HANDLE.
-        if operation suceeds, return OCI_SUCCESS. 
-        if operation fails, return OCI_ERROR. 
- */
-
-/*----------------------------- OCIObjectUnmark -----------------------------*/
-sword OCIObjectUnmark(    OCIEnv *env, OCIError *err, dvoid *object    );
-/*
-   NAME: OCIObjectUnmark - OCI unmarks an object 
-   PARAMETERS:
-        env   (IN/OUT) - OCI environment handle initialized in object mode
-        err   (IN/OUT) - error handle. If there is an error, it is
-                         recorded in 'err' and this function returns OCI_ERROR.
-                         The error recorded in 'err' can be retrieved by
-                         calling OCIErrorGet().
-        object    (IN) - pointer to the persistent object
-   REQUIRES:
-        - a valid OCI environment handle must be given.
-        - The specified object must be pinned.
-   DESCRIPTION:
-        FOR PERSISTENT OBJECTS AND TRANSIENT OBJECTS:
-        This function unmarks the specified persistent object as dirty. Changes
-        that are made to the object will not be written to the server. If the
-        object is marked locked, it remains marked locked.  The changes that
-        have already made to the object will not be undone implicitly. 
- 
-        FOR VALUES:
-        It is an no-op for values.
- 
-   RETURNS:
-        if environment handle or error handle is null, return
-        OCI_INVALID_HANDLE.
-        if operation suceeds, return OCI_SUCCESS.
-        if operation fails, return OCI_ERROR.
- */
-
-/*----------------------------- OCIObjectUnmarkByRef ------------------------*/
-sword OCIObjectUnmarkByRef(    OCIEnv *env, OCIError *err, OCIRef *ref    );
-/*
-   NAME: OCIObjectUnmarkByRef - OCI unmarks an object by Ref
-   PARAMETERS:
-        env   (IN/OUT) - OCI environment handle initialized in object mode
-        err   (IN/OUT) - error handle. If there is an error, it is
-                         recorded in 'err' and this function returns OCI_ERROR.
-                         The error recorded in 'err' can be retrieved by
-                         calling OCIErrorGet().
-        ref   (IN) - reference of the object
-   REQUIRES:
-        - a valid OCI environment handle must be given.
-        - The specified object must be pinned.
-   DESCRIPTION:
-        FOR PERSISTENT OBJECTS AND TRANSIENT OBJECTS:
-        This function unmarks the specified persistent object as dirty. Changes
-        that are made to the object will not be written to the server. If the
-        object is marked locked, it remains marked locked.  The changes that
-        have already made to the object will not be undone implicitly.
- 
-        FOR VALUES:
-        It is an no-op for values.
- 
-   RETURNS:
-        if environment handle or error handle is null, return
-        OCI_INVALID_HANDLE.
-        if operation suceeds, return OCI_SUCCESS.
-        if operation fails, return OCI_ERROR.
- */
-
-/*--------------------------- OCIObjectFree ---------------------------------*/
-sword OCIObjectFree(    OCIEnv *env, OCIError *err, dvoid *instance, 
-                        ub2 flags   );
-/*
-   NAME: OCIObjectFree - OCI free (and unpin) an standalone instance 
-   PARAMETERS:
-        env    (IN/OUT) - OCI environment handle initialized in object mode
-        err    (IN/OUT) - error handle. If there is an error, it is
-                          recorded in 'err' and this function returns 
-                          OCI_ERROR.  The error recorded in 'err' can be 
-                          retrieved by calling OCIErrorGet().
-        instance   (IN) - pointer to a standalone instance.
-        flags      (IN) - If OCI_OBJECT_FREE_FORCE is set, free the object
-                          even if it is pinned or dirty.
-                          If OCI_OBJECT_FREE_NONULL is set, the null
-                          structure will not be freed. 
-   REQUIRES:
-        - a valid OCI environment handle must be given.
-        - The instance to be freed must be standalone.
-        - If the instance is a referenceable object, the object must be pinned.
-   DESCRIPTION:
-        This function deallocates all the memory allocated for an OTS instance,
-        including the null structure.
-
-        FOR PERSISTENT OBJECTS:
-        This function will return an error if the client is attempting to free 
-        a dirty persistent object that has not been flushed. The client should 
-        either flush the persistent object or set the parameter 'flag' to  
-        OCI_OBJECT_FREE_FORCE.
-
-        This function will call OCIObjectUnpin() once to check if the object 
-        can be completely unpin. If it succeeds, the rest of the function will 
-        proceed to free the object.  If it fails, then an error is returned 
-        unless the parameter 'flag' is set to OCI_OBJECT_FREE_FORCE.
- 
-        Freeing a persistent object in memory will not change the persistent 
-        state of that object at the server.  For example, the object will 
-        remain locked after the object is freed.
-
-        FOR TRANSIENT OBJECTS:
-
-        This function will call OCIObjectUnpin() once to check if the object 
-        can be completely unpin. If it succeeds, the rest of the function will 
-        proceed to free the object.  If it fails, then an error is returned 
-        unless the parameter 'flag' is set to OCI_OBJECT_FREE_FORCE. 
-
-        FOR VALUES:
-        The memory of the object is freed immediately. 
-
-   RETURNS:
-        if environment handle or error handle is null, return 
-        OCI_INVALID_HANDLE.
-        if operation suceeds, return OCI_SUCCESS. 
-        if operation fails, return OCI_ERROR. 
-*/
-
-/*----------------------- OCIObjectMarkDeleteByRef --------------------------*/
-sword OCIObjectMarkDeleteByRef(    OCIEnv *env, OCIError *err, 
-                                   OCIRef *object_ref);
-/*
-   NAME: OCIObjectMarkDeleteByRef - OCI "delete" (and unpin) an object given
-                                    a reference
-   PARAMETERS:
-        env     (IN/OUT) - OCI environment handle initialized in object mode
-        err     (IN/OUT) - error handle. If there is an error, it is
-                           recorded in 'err' and this function returns 
-                           OCI_ERROR.  The error recorded in 'err' can be 
-                           retrieved by calling OCIErrorGet().
-        object_ref  (IN) - ref of the object to be deleted
-
-   REQUIRES:
-        - a valid OCI environment handle must be given.
-   DESCRIPTION:
-        This function marks the object designated by 'object_ref' as deleted.
-
-        FOR PERSISTENT OBJECTS:
-        If the object is not loaded, then a temporary object is created and is 
-        marked deleted. Otherwise, the object is marked deleted.  
-
-        The object is deleted in the server when the object is flushed.
-
-        FOR TRANSIENT OBJECTS:
-        The object is marked deleted.  The object is not freed until it is
-        unpinned.
-
-   RETURNS:
-        if environment handle or error handle is null, return 
-        OCI_INVALID_HANDLE.
-        if operation suceeds, return OCI_SUCCESS. 
-        if operation fails, return OCI_ERROR. 
- */
-
-/*--------------------------- OCIObjectMarkDelete ---------------------------*/
-sword OCIObjectMarkDelete(    OCIEnv *env, OCIError *err, dvoid *instance    );
-/*
-   NAME: OCIObjectMarkDelete - OCI "delete" an instance given a Pointer 
-   PARAMETERS:
-        env    (IN/OUT) - OCI environment handle initialized in object mode
-        err    (IN/OUT) - error handle. If there is an error, it is
-                          recorded in 'err' and this function returns 
-                          OCI_ERROR.  The error recorded in 'err' can be 
-                          retrieved by calling OCIErrorGet().
-        instance   (IN) - pointer to the instance 
-   REQUIRES:
-        - a valid OCI environment handle must be given.
-        - The instance must be standalone.
-        - If the instance is a referenceable object, then it must be pinned.
-   DESCRIPTION:
-
-        FOR PERSISTENT OBJECTS:
-        The object is marked deleted.  The memory of the object is not freed.
-        The object is deleted in the server when the object is flushed.
-
-        FOR TRANSIENT OBJECTS:
-        The object is marked deleted.  The memory of the object is not freed.
-
-        FOR VALUES: 
-        This function frees a value immediately. 
-
-   RETURNS:
-        if environment handle or error handle is null, return 
-        OCI_INVALID_HANDLE.
-        if operation suceeds, return OCI_SUCCESS. 
-        if operation fails, return OCI_ERROR. 
- */
-
-/*---------------------------- OCIObjectFlush -------------------------------*/
-sword OCIObjectFlush(    OCIEnv *env, OCIError *err, dvoid *object    );
-/*
-   NAME: OCIObjectFlush - OCI flush a persistent object
-   PARAMETERS:
-        env    (IN/OUT) - OCI environment handle initialized in object mode
-        err    (IN/OUT) - error handle. If there is an error, it is
-                          recorded in 'err' and this function returns 
-                          OCI_ERROR.  The error recorded in 'err' can be 
-                          retrieved by calling OCIErrorGet().
-        object     (IN) - pointer to the persistent object 
-   REQUIRES:
-        - a valid OCI environment handle must be given.
-        - The specified object must be pinned.
-   DESCRIPTION:
-        This function flushes a modified persistent object to the server.
-        An exclusive lock is obtained implicitly for the object when flushed.
-
-        When the object is written to the server, triggers may be fired.
-        Objects can be modified by the triggers at the server.  To keep the  
-        objects in the object cache being coherent with the database, the
-        clients can free or refresh the objects in the cache. 
-
-        This function will return an error for transient objects and values.
-        
-   RETURNS:
-        if environment handle or error handle is null, return 
-        OCI_INVALID_HANDLE.
-        if operation suceeds, return OCI_SUCCESS. 
-        if operation fails, return OCI_ERROR. 
- */
-
-/*------------------------ OCIObjectRefresh ---------------------------------*/
-sword OCIObjectRefresh(    OCIEnv *env, OCIError *err, dvoid *object    );
-/*
-   NAME: OCIObjectRefresh - OCI refresh a persistent object
-   PARAMETERS:
-        env    (IN/OUT) - OCI environment handle initialized in object mode
-        err    (IN/OUT) - error handle. If there is an error, it is
-                          recorded in 'err' and this function returns 
-                          OCI_ERROR.  The error recorded in 'err' can be 
-                          retrieved by calling OCIErrorGet().
-        object     (IN) - pointer to the persistent object 
-   REQUIRES:
-        - a valid OCI environment handle must be given.
-        - The specified object must be pinned.
-   DESCRIPTION:
-        This function refreshes an unmarked object with data retrieved from the
-        latest snapshot in the server. An object should be refreshed when the 
-        objects in the cache are inconsistent with the objects at 
-        the server:
-        1) When an object is flushed to the server, triggers can be fired to
-           modify more objects in the server.  The same objects (modified by 
-           the triggers) in the object cache become obsolete.
-        2) When the user issues a SQL or executes a PL/SQL procedure to modify
-           any object in the server, the same object in the cache becomes
-           obsolete.
-
-        The object that is refreshed will be 'replaced-in-place'. When an
-        object is 'replaced-in-place', the top level memory of the object will 
-        be reused so that new data can be loaded into the same memory address. 
-        The top level memory of the null structre is also reused. Unlike the
-        top level memory chunk, the secondary memory chunks may be resized and
-        reallocated.  The client should be careful when holding onto a pointer 
-        to the secondary memory chunk (e.g. assigning the address of a 
-        secondary memory to a local variable), since this pointer can become 
-        invalid after the object is refreshed.
-
-        The object state will be modified as followed after being refreshed: 
-          - existent : set to appropriate value
-          - pinned   : unchanged 
-          - allocation duration : unchanged 
-          - pin duration : unchanged 
-        
-        This function is an no-op for transient objects or values.
-
-   RETURNS:
-        if environment handle or error handle is null, return 
-        OCI_INVALID_HANDLE.
-        if operation suceeds, return OCI_SUCCESS. 
-        if operation fails, return OCI_ERROR. 
- */
-
-/*---------------------------- OCIObjectCopy --------------------------------*/
-sword OCIObjectCopy(    OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc, 
-                        dvoid *source, dvoid *null_source,
-                        dvoid *target, dvoid *null_target, OCIType *tdo, 
-                        OCIDuration duration, ub1 option    );
-/*
-   NAME: OCIObjectCopy - OCI copy one instance to another
-   PARAMETERS:
-        env     (IN/OUT) - OCI environment handle initialized in object mode
-        err     (IN/OUT) - error handle. If there is an error, it is
-                           recorded in 'err' and this function returns 
-                           OCI_ERROR.  The error recorded in 'err' can be 
-                           retrieved by calling OCIErrorGet().
-        svc         (IN) - OCI service context handle
-        source      (IN) - pointer to the source instance 
-        null_source (IN) - pointer to the null structure of the source
-        target      (IN) - pointer to the target instance
-        null_target (IN) - pointer to the null structure of the target 
-        tdo         (IN) - the TDO for both source and target
-        duration    (IN) - allocation duration of the target memory
-        option      (IN) - specify the copy option:
-                        OROOCOSFN - Set Reference to Null. All references
-                        in the source will not be copied to the target. The
-                        references in the target are set to null. 
-   REQUIRES:
-        - a valid OCI environment handle must be given.
-        - If source or target is referenceable, it must be pinned.
-        - The target or the containing instance of the target must be already
-          be instantiated (e.g. created by OCIObjectNew()).
-        - The source and target instances must be of the same type. If the
-          source and target are located in a different databases, then the
-          same type must exist in both databases.
-   DESCRIPTION:
-        This function copies the contents of the 'source' instance to the
-        'target' instance. This function performs a deep-copy such that the 
-        data that is copied/duplicated include:
-        a) all the top level attributes (see the exceptions below)
-        b) all the secondary memory (of the source) that is reachable from the
-           top level attributes.
-        c) the null structure of the instance
-
-        Memory is allocated with the specified allocation duration. 
-
-        Certain data items are not copied: 
-        a) If the option OCI_OBJECTCOPY_NOREF is specified, then all references
-           in the source are not copied. Instead, the references in the target
-           are set to null.
-        b) If the attribute is a LOB, then it is set to null.
-
-   RETURNS:
-        if environment handle or error handle is null, return 
-        OCI_INVALID_HANDLE.
-        if operation suceeds, return OCI_SUCCESS. 
-        if operation fails, return OCI_ERROR. 
- */
-
-/*---------------------------- OCIObjectGetTypeRef --------------------------*/
-sword OCIObjectGetTypeRef(    OCIEnv *env, OCIError *err, dvoid *instance, 
-                              OCIRef *type_ref    );
-/*
-   NAME: OCIObjectGetTypeRef - get the type reference of a standalone object
-   PARAMETERS:
-        env   (IN/OUT) - OCI environment handle initialized in object mode
-        err   (IN/OUT) - error handle. If there is an error, it is
-                         recorded in 'err' and this function returns 
-                         OCI_ERROR.  The error recorded in 'err' can be 
-                         retrieved by calling OCIErrorGet().
-        instance  (IN) - pointer to an standalone instance 
-        type_ref (OUT) - reference to the type of the object.  The reference 
-                         must already be allocated.
-   REQUIRES:
-        - a valid OCI environment handle must be given.
-        - The instance must be standalone.
-        - If the object is referenceable, the specified object must be pinned.
-        - The reference must already be allocated.
-   DESCRIPTION:
-        This function returns a reference to the TDO of a standalone instance. 
-   RETURNS:
-        if environment handle or error handle is null, return 
-        OCI_INVALID_HANDLE.
-        if operation suceeds, return OCI_SUCCESS. 
-        if operation fails, return OCI_ERROR. 
- */
-
-/*--------------------------- OCIObjectGetObjectRef -------------------------*/
-sword OCIObjectGetObjectRef(    OCIEnv *env, OCIError *err, dvoid *object, 
-                                OCIRef *object_ref    );
-/*
-   NAME: OCIObjectGetObjectRef - OCI get the object reference of an 
-                                 referenceable object
-   PARAMETERS:
-        env     (IN/OUT) - OCI environment handle initialized in object mode
-        err     (IN/OUT) - error handle. If there is an error, it is
-                           recorded in 'err' and this function returns 
-                           OCI_ERROR.  The error recorded in 'err' can be 
-                           retrieved by calling OCIErrorGet().
-        object      (IN) - pointer to a persistent object
-        object_ref (OUT) - reference of the given object. The reference must 
-                           already be allocated.
-   REQUIRES:
-        - a valid OCI environment handle must be given.
-        - The specified object must be pinned.
-        - The reference must already be allocated.
-   DESCRIPTION:
-        This function returns a reference to the given object.  It returns an 
-        error for values. 
-   RETURNS:
-        if environment handle or error handle is null, return 
-        OCI_INVALID_HANDLE.
-        if operation suceeds, return OCI_SUCCESS. 
-        if operation fails, return OCI_ERROR. 
- */
-
-/*--------------------------- OCIObjectMakeObjectRef -----------------------*/
-sword OCIObjectMakeObjectRef(    OCIEnv *env, OCIError *err, 
-                                 CONST OCISvcCtx *svc, dvoid * table,
-                                 dvoid **values, ub4 array_len, 
-                                 OCIRef *object_ref    );
-/*
-   NAME: OCIObjectMakeObjectRef - OCI Create an object reference to a 
-                                 referenceable object.
-   PARAMETERS:
-        env     (IN/OUT) - OCI environment handle initialized in object mode
-        err     (IN/OUT) - error handle. If there is an error, it is
-                           recorded in 'err' and this function returns 
-                           OCI_ERROR.  The error recorded in 'err' can be 
-                           retrieved by calling OCIErrorGet().
-        svc         (IN) - the service context
-        table       (IN) - A pointer to the table object (must be pinned)
-        attrlist    (IN) - A list of values (OCI type values) from which
-                           the ref is to be created.
-        attrcnt     (IN)  - The length of the attrlist array. 
-        object_ref (OUT) - reference of the given object. The reference must 
-                           already be allocated. 
-   REQUIRES:
-        - a valid OCI environment handle must be given.
-        - The specified table object must be pinned.
-        - The reference must already be allocated.
-   DESCRIPTION:
-        This function creates a reference given the values that make up the 
-        reference and also a pointer to the table object. 
-        Based on the table's OID property, whether it is a pk based OID or
-        a system generated OID, the function creates a sys-generated REF or
-        a pk based REF.
-        In case of system generated REFs pass in a OCIRaw which is 16 bytes
-        long contatining the sys generated OID.
-        In case of PK refs pass in the OCI equivalent for numbers, chars etc..
-   RETURNS:
-        if environment handle or error handle is null, return 
-        OCI_INVALID_HANDLE.
-        if operation suceeds, return OCI_SUCCESS. 
-        if operation fails, return OCI_ERROR. 
- */
-
-/*--------------------------- OCIObjectGetPrimaryKeyTypeRef --------------- */ 
-sword OCIObjectGetPrimaryKeyTypeRef( OCIEnv *env, OCIError *err,
-                                     CONST OCISvcCtx *svc, dvoid *table, 
-                                     OCIRef *type_ref );
-/*
-   NAME: OCIObjectGetPrimaryKeyTypeRef - OCI get the REF to the pk OID type 
-   PARAMETERS:
-        env     (IN/OUT) - OCI environment handle initialized in object mode
-        err     (IN/OUT) - error handle. If there is an error, it is
-                           recorded in 'err' and this function returns 
-                           OCI_ERROR.  The error recorded in 'err' can be 
-                           retrieved by calling OCIErrorGet().
-        svc     (IN)     - the service context 
-        table   (IN)     - pointer to the table object
-        type_ref   (OUT) - reference of the pk type. The reference must 
-                           already be allocated.
-   REQUIRES:
-        - a valid OCI environment handle must be given.
-        - The specified table object must be pinned.
-        - The reference must already be allocated.
-   DESCRIPTION:
-        This function returns a reference to the pk type.  It returns an 
-        error for values.  If the table is not a Pk oid table/view, then
-        it returns error.
-   RETURNS:
-        if environment handle or error handle is null, return 
-        OCI_INVALID_HANDLE.
-        if operation suceeds, return OCI_SUCCESS. 
-        if operation fails, return OCI_ERROR. 
- */
-
-/*-------------------------- OCIObjectGetInd --------------------------------*/
-sword OCIObjectGetInd(    OCIEnv *env, OCIError *err, dvoid *instance, 
-                          dvoid **null_struct    );
-/*
-   NAME: OCIObjectGetInd - OCI get the null structure of a standalone object  
-   PARAMETERS:
-        env     (IN/OUT) - OCI environment handle initialized in object mode
-        err     (IN/OUT) - error handle. If there is an error, it is
-                           recorded in 'err' and this function returns 
-                           OCI_ERROR.  The error recorded in 'err' can be 
-                           retrieved by calling OCIErrorGet().
-        instance      (IN) - pointer to the instance 
-        null_struct (OUT) - null structure 
-   REQUIRES:
-        - a valid OCI environment handle must be given.
-        - The object must be standalone.
-        - If the object is referenceable, the specified object must be pinned.
-   DESCRIPTION:
-        This function returns the null structure of an instance. This function
-        will allocate the top level memory of the null structure if it is not
-        already allocated. If an null structure cannot be allocated for the 
-        instance, then an error is returned. This function only works for 
-        ADT or row type instance. 
-   RETURNS:
-        if environment handle or error handle is null, return 
-        OCI_INVALID_HANDLE.
-        if operation suceeds, return OCI_SUCCESS. 
-        if operation fails, return OCI_ERROR. 
- */
-
-/*------------------------- OCIObjectExists --------------------------------*/
-sword OCIObjectExists(OCIEnv *env, OCIError *err, dvoid *ins, boolean *exist); 
-/*
-   NAME: OCIObjectExist - OCI checks if the object exists 
-   PARAMETERS:
-        env       (IN/OUT) - OCI environment handle initialized in object mode
-        err       (IN/OUT) - error handle. If there is an error, it is
-                             recorded in 'err' and this function returns 
-                             OCI_ERROR.  The error recorded in 'err' can be 
-                             retrieved by calling OCIErrorGet().
-        ins           (IN) - pointer to an instance 
-        exist        (OUT) - return TRUE if the object exists
-   REQUIRES:
-        - a valid OCI environment handle must be given.
-        - The object must be standalone.
-        - if object is a referenceable, it must be pinned.
-   DESCRIPTION:
-        This function returns the existence of an instance. If the instance
-        is a value, this function always returns TRUE.
-   RETURNS:
-        if environment handle or error handle is null, return 
-        OCI_INVALID_HANDLE.
-        if operation suceeds, return OCI_SUCCESS. 
-        if operation fails, return OCI_ERROR. 
- */
-
-/*------------------------- OCIObjectGetProperty ---------------------------*/
-sword OCIObjectGetProperty(OCIEnv *envh, OCIError *errh, CONST dvoid *obj, 
-                           OCIObjectPropId propertyId,
-                           dvoid *property, ub4 *size );
-/*
-   NAME: OCIObjectGetProperty - OCIObject Get Property of given object
-   PARAMETERS:
-        env       (IN/OUT) - OCI environment handle initialized in object mode
-        err       (IN/OUT) - error handle. If there is an error, it is
-                             recorded in 'err' and this function returns
-                             OCI_ERROR.  The error recorded in 'err' can be
-                             retrieved by calling OCIErrorGet().
-        obj           (IN) - object whose property is returned
-        propertyId    (IN) - id which identifies the desired property
-        property     (OUT) - buffer into which the desired property is
-                             copied
-        size      (IN/OUT) - on input specifies the size of the property buffer
-                             passed by caller, on output will contain the 
-                             size in bytes of the property returned.
-                             This parameter is required for string type 
-                             properties only (e.g OCI_OBJECTPROP_SCHEMA,
-                             OCI_OBJECTPROP_TABLE). For non-string
-                             properties this parameter is ignored since
-                             the size is fixed.
-   DESCRIPTION:
-        This function returns the specified property of the object.
-        The desired property is identified by 'propertyId'. The property
-        value is copied into 'property' and for string typed properties
-        the string size is returned via 'size'. 
-        
-        Objects are classified as persistent, transient and value
-        depending upon the lifetime and referenceability of the object.
-        Some of the properties are applicable only to persistent
-        objects and some others only apply to persistent and 
-        transient objects. An error is returned if the user tries to 
-        get a property which in not applicable to the given object. 
-        To avoid such an error, the user should first check whether
-        the object is persistent or transient or value 
-        (OCI_OBJECTPROP_LIFETIME property) and then appropriately
-        query for other properties.
-
-        The different property ids and the corresponding type of 
-        'property' argument is given below.
-
-          OCI_OBJECTPROP_LIFETIME 
-            This identifies whether the given object is a persistent
-            object (OCI_OBJECT_PERSISTENT) or a 
-            transient object (OCI_OBJECT_TRANSIENT) or a
-            value instance (OCI_OBJECT_VALUE).
-            'property' argument must be a pointer to a variable of 
-            type OCIObjectLifetime.
-            
-          OCI_OBJECTPROP_SCHEMA
-            This returns the schema name of the table in which the 
-            object exists. An error is returned if the given object 
-            points to a transient instance or a value. If the input 
-            buffer is not big enough to hold the schema name an error 
-            is returned, the error message will communicate the 
-            required size. Upon success, the size of the returned 
-            schema name in bytes is returned via 'size'.
-            'property' argument must be an array of type text and 'size'
-            should be set to size of array in bytes by the caller.
-
-          OCI_OBJECTPROP_TABLE
-            This returns the table name in which the object exists. An 
-            error is returned if the given object points to a 
-            transient instance or a value. If the input buffer is not 
-            big enough to hold the table name an error is returned, 
-            the error message will communicate the required size. Upon 
-            success, the size of the returned table name in bytes is 
-            returned via 'size'. 'property' argument must be an array 
-            of type text and 'size' should be set to size of array in 
-            bytes by the caller.
-            
-          OCI_OBJECTPROP_PIN_DURATION
-            This returns the pin duration of the object.
-            An error is returned if the given object points to a value 
-            instance. Valid pin durations are: OCI_DURATION_SESSION and
-            OCI_DURATION_TRANS.
-            'property' argument must be a pointer to a variable of type 
-            OCIDuration.
-            
-          OCI_OBJECTPROP_ALLOC_DURATION
-            This returns the allocation duration of the object.
-            Valid allocation durations are: OCI_DURATION_SESSION and
-            OCI_DURATION_TRANS.
-            'property' argument must be a pointer to a variable of type 
-            OCIDuration.
-            
-          OCI_OBJECTPROP_LOCK
-            This returns the lock status of the 
-            object. The possible lock status is enumerated by OCILockOpt.
-            An error is returned if the given object points to a transient
-            or value instance.
-            'property' argument must be a pointer to a variable of 
-            type OCILockOpt.
-            Note, the lock status of an object can also be retrieved by
-            calling OCIObjectIsLocked().
-
-          OCI_OBJECTPROP_MARKSTATUS
-            This returns the status flag which indicates whether the
-            object is a new object, updated object and/or deleted object.
-            The following macros can be used to test the mark status
-            flag:
-
-              OCI_OBJECT_IS_UPDATED(flag)
-              OCI_OBJECT_IS_DELETED(flag)
-              OCI_OBJECT_IS_NEW(flag)
-              OCI_OBJECT_IS_DIRTY(flag)
-
-            An object is dirty if it is a new object or marked deleted or 
-            marked updated.
-            An error is returned if the given object points to a transient
-            or value instance. 'property' argument must be of type 
-            OCIObjectMarkStatus.
-            
-          OCI_OBJECTPROP_VIEW
-            This identifies whether the specified object is a view object
-            or not. If property value returned is TRUE, it indicates the
-            object is a view otherwise it is not.
-            'property' argument must be of type boolean.
-
-   RETURNS:
-        if environment handle or error handle is null, return
-        OCI_INVALID_HANDLE.
-        if operation suceeds, return OCI_SUCCESS.
-        if operation fails, return OCI_ERROR. Possible errors are TBD
- */
-
-/*---------------------------- OCIObjectIsLocked --------------------------*/
-sword OCIObjectIsLocked(    OCIEnv *env, OCIError *err, dvoid *ins,
-                              boolean *lock);
-/*
-   NAME: OCIObjectIsLocked - OCI get the lock status of a standalone object
-   PARAMETERS:
-        env       (IN/OUT) - OCI environment handle initialized in object mode
-        err       (IN/OUT) - error handle. If there is an error, it is
-                             recorded in 'err' and this function returns
-                             OCI_ERROR.  The error recorded in 'err' can be
-                             retrieved by calling OCIErrorGet().
-        ins           (IN) - pointer to an instance
-        lock         (OUT) - return value for the lock status.
-   REQUIRES:
-        - a valid OCI environment handle must be given.
-        - The instance must be standalone.
-        - If the object is referenceable, the specified object must be pinned.
-   DESCRIPTION:
-        This function returns the lock status of an instance. If the instance
-        is a value, this function always returns FALSE.
-   RETURNS:
-        if environment handle or error handle is null, return
-        OCI_INVALID_HANDLE.
-        if operation suceeds, return OCI_SUCCESS.
-        if operation fails, return OCI_ERROR.
- */
-
-/*------------------------- OCIObjectIsDirty ------------------------------*/
-sword OCIObjectIsDirty(    OCIEnv *env, OCIError *err, dvoid *ins,
-                           boolean *dirty);
-/*
-   NAME: OCIObjectIsDirty - OCI get the dirty status of a standalone object
-   PARAMETERS:
-        env       (IN/OUT) - OCI environment handle initialized in object mode
-        err       (IN/OUT) - error handle. If there is an error, it is
-                             recorded in 'err' and this function returns
-                             OCI_ERROR.  The error recorded in 'err' can be
-                             retrieved by calling OCIErrorGet().
-        ins           (IN) - pointer to an instance
-        dirty        (OUT) - return value for the dirty status.
-   REQUIRES:
-        - a valid OCI environment handle must be given.
-        - The instance must be standalone.
-        - if instance is an object, the instance must be pinned.
-   DESCRIPTION:
-        This function returns the dirty status of an instance. If the instance
-        is a value, this function always returns FALSE.
-   RETURNS:
-        if environment handle or error handle is null, return
-        OCI_INVALID_HANDLE.
-        if operation suceeds, return OCI_SUCCESS.
-        if operation fails, return OCI_ERROR.
- */
-
-/*--------------------------- OCIObjectPinTable -----------------------------*/
-sword OCIObjectPinTable(    OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc, 
-                  CONST oratext *schema_name, 
-                  ub4 s_n_length, CONST oratext *object_name, ub4 o_n_length, 
-                  CONST OCIRef *scope_obj_ref, OCIDuration pin_duration, 
-                  dvoid** object    );
-/*
-   NAME: OCIObjectPinTable - OCI get table object 
-   PARAMETERS:
-        env       (IN/OUT) - OCI environment handle initialized in object mode
-        err       (IN/OUT) - error handle. If there is an error, it is
-                             recorded in 'err' and this function returns 
-                             OCI_ERROR.  The error recorded in 'err' can be 
-                             retrieved by calling OCIErrorGet().
-        svc                     (IN) - OCI service context handle
-        schema_name   (IN, optional) - schema name of the table 
-        s_n_length    (IN, optional) - length of the schema name
-        object_name   (IN) - name of the table 
-        o_n_length    (IN) - length of the table name
-        scope_obj_ref (IN, optional) - reference of the scoping object
-        pin_duration  (IN) - pin duration. See description in OCIObjectPin(). 
-        object       (OUT) - the pinned table object
-   REQUIRES:
-        - a valid OCI environment handle must be given.
-   DESCRIPTION:
-        This function pin a table object with the specified pin duration. 
-        The client can unpin the object by calling OCIObjectUnpin(). See 
-        OCIObjectPin() and OCIObjectUnpin() for more information about pinning
-        and unpinning. 
-   RETURNS:
-        if environment handle or error handle is null, return 
-        OCI_INVALID_HANDLE.
-        if operation suceeds, return OCI_SUCCESS. 
-        if operation fails, return OCI_ERROR. 
- */
-
-/*------------------------- OCIObjectArrayPin -------------------------------*/
-sword OCIObjectArrayPin(OCIEnv *env, OCIError *err, OCIRef **ref_array, 
-                  ub4 array_size, OCIComplexObject **cor_array,
-                  ub4 cor_array_size, OCIPinOpt pin_option, 
-                  OCIDuration pin_duration, OCILockOpt lock, 
-                  dvoid **obj_array, ub4 *pos    );
-/*
-   NAME: OCIObjectArrayPin - ORIO array pin 
-   PARAMETERS:
-        env       (IN/OUT) - OCI environment handle initialized in object mode
-        err       (IN/OUT) - error handle. If there is an error, it is
-                             recorded in 'err' and this function returns 
-                             OCI_ERROR.  The error recorded in 'err' can be 
-                             retrieved by calling OCIErrorGet().
-        ref_array     (IN) - array of references to be pinned 
-        array_size    (IN) - number of elements in the array of references 
-        pin_option    (IN) - pin option. See OCIObjectPin().
-        pin_duration  (IN) - pin duration. See OCIObjectPin(). 
-        lock_option   (IN) - lock option. See OCIObjectPin().
-        obj_array    (OUT) - If this argument is not NULL, the pinned objects 
-                             will be returned in the array. The user must 
-                             allocate this array with element type being 
-                             'dvoid *'. The size of this array is identical to
-                             'array'. 
-        pos          (OUT) - If there is an error, this argument will contain
-                             the element that is causing the error.  Note that
-                             this argument is set to 1 for the first element in
-                             the ref_array. 
-   REQUIRE:
-        - a valid OCI environment handle must be given.
-        - If 'obj_array' is not NULL, then it must already be allocated and
-             the size of 'obj_array' is 'array_size'. 
-   DESCRIPTION:
-        This function pin an array of references.  All the pinned objects are 
-        retrieved from the database in one network roundtrip.  If the user 
-        specifies an output array ('obj_array'), then the address of the 
-        pinned objects will be assigned to the elements in the array. See
-        OCIObjectPin() for more information about pinning.
-   RETURNS:
-        if environment handle or error handle is null, return 
-        OCI_INVALID_HANDLE.
-        if operation suceeds, return OCI_SUCCESS. 
-        if operation fails, return OCI_ERROR. 
- */
-
-/*---------------------------------------------------------------------------*/
-/*                           HEAP/CACHE OPERATIONS                           */
-/*---------------------------------------------------------------------------*/
-
-/*--------------------------- OCICacheFlush ---------------------------------*/
-sword OCICacheFlush(    OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc, 
-                  dvoid *context, OCIRef *(*get)(dvoid *context, ub1 *last),
-                  OCIRef **ref  );
-/*
-   NAME: OCICacheFlush - OCI flush persistent objects 
-   PARAMETERS:
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                      recorded in 'err' and this function returns 
-                      OCI_ERROR.  The error recorded in 'err' can be 
-                      retrieved by calling OCIErrorGet().
-        svc      (IN) [optional] - OCI service context.  If null pointer is
-                      specified, then the dirty objects in all connections
-                      will be flushed.
-        context  (IN) [optional] - specifies an user context that is an 
-                      argument to the client callback function 'get'. This 
-                      parameter is set to NULL if there is no user context.
-        get      (IN) [optional] - an client-defined function which acts an 
-                      iterator to retrieve a batch of dirty objects that need 
-                      to be flushed. If the function is not NULL, this function
-                      will be called to get a reference of a dirty object.  
-                      This is repeated until a null reference is returned by 
-                      the client function or the parameter 'last' is set to 
-                      TRUE. The parameter 'context' is passed to get() 
-                      for each invocation of the client function.  This 
-                      parameter should be NULL if user callback is not given.
-                      If the object that is returned by the client function is
-                      not a dirtied persistent object, the object is ignored.
-                      All the objects that are returned from the client
-                      function must be from newed or pinned the same service 
-                      context, otherwise, an error is signalled. Note that the 
-                      returned objects are flushed in the order in which they
-                      are marked dirty.
-        ref     (OUT) [optional] - if there is an error in flushing the 
-                      objects, (*ref) will point to the object that
-                      is causing the error.  If 'ref' is NULL, then the object 
-                      will not be returned.  If '*ref' is NULL, then a 
-                      reference will be allocated and set to point to the 
-                      object.  If '*ref' is not NULL, then the reference of
-                      the object is copied into the given space. If the
-                      error is not caused by any of the dirtied object,
-                      the given ref is initalized to be a NULL reference
-                      (OCIRefIsNull(*ref) is TRUE).
-   REQUIRES:
-        - a valid OCI environment handle must be given.
-   DESCRIPTION:
-        This function flushes the modified persistent objects from the 
-        environment heap to the server. The objects are flushed in the order 
-        that they are marked updated or deleted. 
-
-        See OCIObjectFlush() for more information about flushing.
-
-   RETURNS:
-        if environment handle or error handle is null, return 
-        OCI_INVALID_HANDLE.
-        if operation suceeds, return OCI_SUCCESS. 
-        if operation fails, return OCI_ERROR. 
- */
-
-/*--------------------------- OCICacheRefresh -------------------------------*/
-sword OCICacheRefresh(OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc,
-                  OCIRefreshOpt option, dvoid *context,
-                  OCIRef *(*get)(dvoid *context), OCIRef **ref);
-/*
-   NAME: OCICacheRefresh - OCI ReFreSh persistent objects 
-   PARAMETERS:
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                       recorded in 'err' and this function returns 
-                       OCI_ERROR.  The error recorded in 'err' can be 
-                       retrieved by calling OCIErrorGet().
-        svc     (IN) [optional] - OCI service context.  If null pointer is
-                      specified, then the persistent objects in all connections
-                      will be refreshed. 
-        option   (IN) [optional] - if OCI_REFRESH_LOAD is specified, all
-                      objects that is loaded within the transaction are
-                      refreshed. If the option is OCI_REFERSH_LOAD and the
-                      parameter 'get' is not NULL, this function will ignore
-                      the parameter. 
-        context  (IN) [optional] - specifies an user context that is an 
-                      argument to the client callback function 'get'. This 
-                      parameter is set to NULL if there is no user context.
-        get      (IN) [optional] - an client-defined function which acts an 
-                      iterator to retrieve a batch of objects that need to be
-                      refreshed. If the function is not NULL, this function
-                      will be called to get a reference of an object.  If 
-                      the reference is not NULL, then the object will be 
-                      refreshed.  These steps are repeated until a null 
-                      reference is returned by this function.  The parameter
-                      'context' is passed to get() for each invocation of the
-                      client function.  This parameter should be NULL if user 
-                      callback is not given.
-        ref     (OUT) [optional] - if there is an error in refreshing the
-                      objects, (*ref) will point to the object that
-                      is causing the error.  If 'ref' is NULL, then the object
-                      will not be returned.  If '*ref' is NULL, then a
-                      reference will be allocated and set to point to the
-                      object.  If '*ref' is not NULL, then the reference of
-                      the object is copied into the given space. If the
-                      error is not caused by any of the object,
-                      the given ref is initalized to be a NULL reference
-                      (OCIRefIsNull(*ref) is TRUE).
-   REQUIRES:
-        - a valid OCI environment handle must be given.
-   DESCRIPTION:
-        This function refreshes all pinned persistent objects. All unpinned 
-        persistent objects are freed.  See OCIObjectRefresh() for more 
-        information about refreshing.
-   RETURNS:
-        if environment handle or error handle is null, return 
-        OCI_INVALID_HANDLE.
-        if operation suceeds, return OCI_SUCCESS. 
-        if operation fails, return OCI_ERROR. 
- */
-
-/*---------------------------- OCICacheUnpin --------------------------------*/
-sword OCICacheUnpin(    OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc    );
-/*
-   NAME: OCICacheUnpin - OCI UNPin objects 
-   PARAMETERS:
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                       recorded in 'err' and this function returns 
-                       OCI_ERROR.  The error recorded in 'err' can be 
-                       retrieved by calling OCIErrorGet().
-        svc     (IN) [optional] - OCI service context. If null pointer is
-                       specified, then the objects in all connections
-                       will be unpinned.
-   REQUIRES:
-        - a valid OCI environment handle must be given.
-   DESCRIPTION:
-        If a connection is specified, this function completely unpins the 
-        persistent objects in that connection. Otherwise, all persistent 
-        objects in the heap are completely unpinned. All transient objects in 
-        the heap are also completely unpinned. See OCIObjectUnpin() for more 
-        information about unpinning.
-   RETURNS:
-        if environment handle or error handle is null, return 
-        OCI_INVALID_HANDLE.
-        if operation suceeds, return OCI_SUCCESS. 
-        if operation fails, return OCI_ERROR. 
- */
-
-/*----------------------------- OCICacheFree --------------------------------*/
-sword OCICacheFree(    OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc    ); 
-/*
-   NAME: OCICacheFree - OCI FREe instances 
-   PARAMETERS:
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                       recorded in 'err' and this function returns 
-                       OCI_ERROR.  The error recorded in 'err' can be 
-                       retrieved by calling OCIErrorGet().
-        svc     (IN) [optional] - OCI service context. If null pointer is
-                       specified, then the objects in all connections
-                       will be freed.
-   REQUIRES:
-        - a valid OCI environment handle must be given.
-   DESCRIPTION:
-        If a connection is specified, this function frees the persistent 
-        objects, transient objects and values allocated for that connection.  
-        Otherwise, all persistent objects, transient objects and values in the 
-        heap are freed. Objects are freed regardless of their pin count.  See 
-        OCIObjectFree() for more information about freeing an instance.
-   RETURNS:
-        if environment handle or error handle is null, return 
-        OCI_INVALID_HANDLE.
-        if operation suceeds, return OCI_SUCCESS. 
-        if operation fails, return OCI_ERROR. 
-*/
-
-/*---------------------------- OCICacheUnmark -------------------------------*/
-sword OCICacheUnmark(    OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc    );
-/*
-   NAME: OCICacheUnmark - OCI Unmark all dirty objects
-   PARAMETERS:
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                       recorded in 'err' and this function returns
-                       OCI_ERROR.  The error recorded in 'err' can be
-                       retrieved by calling OCIErrorGet().
-        svc     (IN) [optional] - OCI service context. If null pointer is
-                       specified, then the objects in all connections
-                       will be unmarked. 
-   REQUIRES:
-        - a valid OCI environment handle must be given.
-   DESCRIPTION:
-        If a connection is specified, this function unmarks all dirty objects 
-        in that connection.  Otherwise, all dirty objects in the cache are
-        unmarked. See OCIObjectUnmark() for more information about unmarking
-        an object.
-   RETURNS:
-        if environment handle or error handle is null, return
-        OCI_INVALID_HANDLE.
-        if operation suceeds, return OCI_SUCCESS.
-        if operation fails, return OCI_ERROR.
- */
-
-
-sword OCIDurationBegin(    OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc, 
-                           OCIDuration parent, OCIDuration *dur    );
-/*
-   NAME: OCIDurationBegin - OCI DURATION BEGIN
-   PARAMETERS:
-        env  (IN/OUT) - OCI environment handle initialized in object mode
-                        This should be passed NULL, when cartridge services
-                        are to be used.
-        err  (IN/OUT) - error handle. If there is an error, it is
-                        recorded in 'err' and this function returns OCI_ERROR.
-                        The error recorded in 'err' can be retrieved by calling
-                       OCIErrorGet().
-        svc  (IN/OUT) - OCI service handle.  
-        parent   (IN) - parent for the duration to be started.
-        dur     (OUT) - newly created user duration 
-   REQUIRES:
-        - a valid OCI environment handle must be given for non-cartridge
-          services.
-        - For cartridge services, NULL should be given for environment handle
-        - A valid service handle must be given in all cases.
-   DESCRIPTION:
-        This function starts a new user duration.  A user can have multiple
-        active user durations simultaneously. The user durations do not have
-        to be nested.
- 
-        The object subsystem predefines 3 durations :
-          1) session     - memory allocated with session duration comes from
-                           the UGA heap (OCI_DURATION_SESSION). A session 
-                           duration terminates at the end of the user session.
-          2) transaction - memory allocated with transaction duration comes
-                           from the UGA heap (OCI_DURATION_TRANS). A trans-
-                           action duration terminates at the end of the user
-                           transaction.
-          3) call        - memory allocated with call duration comes from PGA
-                           heap (OCI_DURATION_CALL). A call duration terminates
-                           at the end of the user call.
- 
-        Each user duration has a parent duration.  A parent duration can be a
-        predefined duration or another user duration.  The relationship between
-        a user duration and its parent duration (child duration) are:
- 
-         1) An user duration is nested within the parent duration. When its
-             parent duration terminates, the user duration will also terminate.
-         2) The memory allocated with an user duration comes from the heap of
-             its parent duration. For example, if the parent duration of an
-             user duration is call, then the memory allocated with the user
-             duration will also come from the PGA heap.
-
-        This function can be used as both part of cartridge services as well 
-        as without cartridge services.
-        The difference in the function in the case of cartridge and 
-        non-cartridge services is:
-                In case of cartridge services, as descibed above a new user
-        duration is created as a child of the "parent" duration.
-                But when used for non-cartridge purposes, when a pre-defined
-        duration is passed in as parent, it is mapped to the cache duration
-        for that connection (which is created if not already present) and 
-        the new user duration will be child of the cache duration.
-
-   RETURNS:
-        if environment handle and service handle is null or if error 
-        handle is null return OCI_INVALID_HANDLE.
-        if operation suceeds, return OCI_SUCCESS.
-        if operation fails, return OCI_ERROR.
- */
-
-
-sword OCIDurationEnd(    OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc, 
-                         OCIDuration duration    );
-/*
-   NAME: OCIDurationEnd - OCI DURATION END
-   PARAMETERS:
-        env  (IN/OUT) - OCI environment handle initialized in object mode
-                        This should be passed NULL, when cartridge services
-                        are to be used.
-        err  (IN/OUT) - error handle. If there is an error, it is
-                        recorded in 'err' and this function returns OCI_ERROR.
-                        The error recorded in 'err' can be retrieved by calling
-                       OCIErrorGet().
-        svc  (IN/OUT) - OCI service handle.  
-        dur     (OUT) - a previously created user duration using 
-                        OCIDurationBegin()
-   REQUIRES:
-        - a valid OCI environment handle must be given for non-cartridge
-          services.
-        - For cartridge services, NULL should be given for environment handle
-        - A valid service handle must be given in all cases.
-   DESCRIPTION:
-        This function terminates a user duration.  All memory allocated for
-        this duration is freed.
-
-        This function can be used as both part of cartridge services as well 
-        as without cartridge services.  In both cased, the heap duration
-        is freed and all the allocated memory for that duration is freed.
-        The difference in the function in the case of cartridge and 
-        non-cartridge services is:
-                In case of non-cartridge services, if the duration is pre-
-        defined, the associated cache duration (see OCIDurationBegin())
-        is also terminated and the following is done.
-          1) The child durations are terminated.
-          2) All objects pinned for this duration are unpinned.
-          3) All instances allocated for this duration are freed.
-
-                In case of cartridge services, only the heap duration is
-        freed.  All the context entries allocated for that duration are 
-        freed from the context hash table..
-
-   RETURNS:
-        if environment handle and service handle is null or if error 
-        handle is null return OCI_INVALID_HANDLE.
-        if operation suceeds, return OCI_SUCCESS.
-        if operation fails, return OCI_ERROR.
- */
-
-/******************************************************************************
-**          DO  NOT  USE  THE  FUNCTIONS  BELOW!                             **
-**          UNSUPPORTED INTERFACE                                            **
-**          WILL BE REMOVED/CHANGED IN A FUTURE RELEASE                      **
-******************************************************************************/
-
-sword OCIDurationGetParent(    OCIEnv *env, OCIError *err, 
-                               OCIDuration duration, OCIDuration *parent    );
-
-sword OCIObjectAlwaysLatest(    OCIEnv *env, OCIError *err, dvoid *object    );
-
-sword OCIObjectNotAlwaysLatest(    OCIEnv *env, OCIError *err, 
-                                   dvoid *object    );
-
-sword OCIObjectFlushRefresh(    OCIEnv *env, OCIError *err, dvoid *object);
-
-sword OCIObjectIsLoaded(    OCIEnv *env, OCIError *err, dvoid *ins, 
-                              boolean *load);
-
-sword OCIObjectIsDirtied(    OCIEnv *env, OCIError *err, dvoid *ins,
-                              boolean *dirty);
-
-sword OCICacheGetObjects(       OCIEnv *env, OCIError *err,
-                                CONST OCISvcCtx *svc,
-                                OCIObjectProperty property,
-                                dvoid *client_context,
-                                void (*client_callback)(
-                                    dvoid *client_context,
-                                    dvoid *object  ));
-
-sword OCICacheRegister(      OCIEnv *env, OCIError *err,
-                             OCIObjectEvent event,
-                             dvoid *client_context,
-                             void (*client_callback)(
-                                    dvoid *client_context,
-                                    OCIObjectEvent event,
-                                    dvoid *object));
-
-sword OCICacheFlushRefresh(    OCIEnv *env, OCIError *err, 
-                               CONST OCISvcCtx *svc, dvoid *context,
-                               OCIRef *(*get)(dvoid *context, ub1 *last),
-                               OCIRef **ref    );
-
-sword OCIObjectSetData(OCIEnv *env, OCIError *err, dvoid *obj_hdr, 
-        dvoid *data);
-
-sword OCIObjectGetNewOID(OCIEnv *env, OCIError *err, OCISvcCtx *svc, 
-        ub1 *oid);
-
-
-#endif /* ORI_ORACLE */
diff --git a/src/terralib/drivers/OracleSpatial/OCI/include/orid.h b/src/terralib/drivers/OracleSpatial/OCI/include/orid.h
deleted file mode 100644
index c78bf96..0000000
--- a/src/terralib/drivers/OracleSpatial/OCI/include/orid.h
+++ /dev/null
@@ -1,372 +0,0 @@
-/* Copyright (c) 1994, 2003, Oracle Corporation.  All rights reserved.  */
-
-/*
-  Author:             Tin Nguyen
-  Date:               02/07/94
-  Source documents:   "Functional Specification for C Object Interface, Object
-                       Management Subsystem", "Oracle C Coding Standards
-                       version 2.2", and the header file template
-  Rule sets:          the generic and .h file rule sets
-  Quality status:     not exited
-  Identification tag: [ one or more letters to identify the .h file ] 
-  Revision code:      [ date of the last revision of the .h file ]
-
-  Note to the user of this header file:
-
-    Anything in this header file that is marked private is not supported and
-    must not be used.  Private sections are included in the header file to 
-    improve internal maintenance.
-
-  NAME
-
-    ORID - Oracle Object Interface for Dynamic Data Access
-
-  DESCRIPTION
-
-    This file contains declarations for C object interface functions including
-    the dynamic object data access operations that allow callers to dynamically
-    access and manipulate objects; these operations include getting and setting
-    attributes of an object.  These dynamic object operations are for accessing
-    and manipulation objects whose types are not known at compile-time.
-
-  RELATED DOCUMENTS
-  
-     Functional Specification for C Object Interface / Object Management System
-
-  PUBLIC FUNCTIONS
-
-    OCIObjectSetAttr - ORID SET attribute value
-    OCIObjectGetAttr - ORID GET attribute value
-
-  PRIVATE FUNCTIONS
-
-    None
-
-  EXAMPLES 
-
-    EXAMPLE 1
-
-    /o
-     o This example illustrates how an interative program can use the dynamic
-     o attribute access to display and modify attributes of an ADT instance.
-     o The interactive program does not know the type of the object at 
-     o compile time.
-     o/
-
-    void display(adt_ref, object, null_struct, names, names_count, 
-                          names_length, indexes, indexes_count)
-    {
-      /o Pin the ADT o/
-      if (OCIObjectPin(env, &adt_ref, OROOPOCUR, OROOPDTRA, OROOLMNON, &adt) 
-            != OROSTASUC)
-         /o error handling code o/ 
-
-      /o 
-       o Call the type manager to obtain all the attributes in the object.
-       o Display the content of each attribute in the ADT instance. If the 
-       o attribute is an array, display each element of the array. If the
-       o attribute is an ADT instance, recursively call this routine to
-       o display the embedded ADT instance.
-       o/ 
-      numAttrs = OCITypeAttrs(env, adt);
-      for (i= 1; i <= numAttrs; i++)
-      {
-         /o get attribute descriptor o/
-         if (ortgabp(env, adt, i, &ado_ref, &ado) != OROSTASUC)
-           /o error handling code o/ 
-
-         /o get attribute name o/
-         names[names_count] = OCITypeElemName(env, ado, 
-                   &names_length[names_count]);
-      
-         /o dynamically get the attr o/
-         if (OCIObjectGetAttr(env, object, null_struct, 0, adt_ref, names, 
-                     names_length, names_count+1, indexes, indexes_count, 0, 
-                     &null, &null_info, &attr) != OROSTASUC)
-            /o error handling code o/  
-
-         /o check if attribute is null o/
-         if (null) continue;
-
-         /o get typecode of attribute o/
-         typecode = OCITypeElemTypeCode(env, ado);
-
-         /o if attribute is a varray, display each element in varray o/
-         if (typecode == OCI_TYPECODE_VARRAY)
-         {
-            /o get the reference to the type of the element of the array o/ 
-            if (OCITypeElemParameterizedTyper(env, ado, &attr_type_ref) 
-               != OROSTASUC)
-               /o error handling code o/ 
-
-            /o get the size of array o/
-            if (orlasiz(env, &attr_type_ref, (orlva *)attr,  
-                         &numElm) != OROSTASUC)
-               /o error handling code o/  
-
-            /o get the typecode of the element of the array o/
-            if (ortty2r(env, attr_type_ref, &typecode) != OROSTASUC)
-               /o error handling code o/  
-
-            /o iterate the array o/
-            for (j=0; j < numElm; j++)
-            {
-              /o get an element in the array o/
-              if (OCIObjectGetAttr(env, attr, null_info, j+1, attr_type_ref,
-                  names, names_length, 0, indexes, 0, 0, &null, &null_info, 
-                  &element) != OROSTASUC)
-                  /o error handling code o/  
-
-              /o check if element is null o/
-              if (null) continue;
-
-              /o if attr is an ADT instance, recursively call this routine o/
-              if (typecode == OCI_TYPECODE_ADT || typecode == 
-                  OCI_TYPECODE_UNNAMEDADT) 
-              {
-                /o display the element as an adt o/
-                display(attr_type_ref, element, null_info, names, lengths, 
-                   0, indexes, 0);
-              }
-      
-              /o if attribute is scalar, print the value to the screen o/
-              else output_to_screen(element, typecode);
-            }
-         }
-
-         /o if attribute is an ADT instance, recursively call this routine o/
-         else if (typecode == OCI_TYPECODE_ADT || typecode == 
-              OCI_TYPECODE_UNNAMEDADT)
-         {
-            /o get the type ref of the attribute o/
-            if (ortgarf(env, ado, &attr_type_ref) != OROSTASUC)
-               /o error handling code o/ 
-
-             display(attr_type_ref, attr, null_info, 0, names, 0, names_length,
-                      indexes, 0);
-         }
-
-         /o if attribute is scalar, print the value to the screen o/
-         else output_to_screen(attr, typecode);
-      }
-    }
-
-    /o ******** main routine *********** o/
-    .... 
-
-    /o 
-     o Allocate the arrays for storing the path expression 
-     o/
-
-    /o get the tdo of type 'long' o/
-    if (orttypget(&env, con, "SYS", sizeof("SYS"), "SINT32", sizeof("SINT32"), 
-          OROOPDSES, &long_ref, &long_tdo) != OROSTASUC)
-          /o error handling code o/
-
-    /o get the tdo of type 'varchar' o/
-    if (orttypget(&env, con, "SYS", sizeof("SYS"), "SQL_VARCHAR2", 
-          sizeof("SQL_VARCHAR2"), OROOPDSES, &vchar_ref, &vchar_tdo) 
-          != OROSTASUC)
-          /o error handling code o/
-
-    /o allocate the varrays for the path expression o/ 
-    if (orlalloc(env, &vchar_ref, MAX_ARR_SIZE, &attr_names) != OROSTASUC)
-       /o error handling code o/ 
-
-    if (orlalloc(env, &long_ref, MAX_ARR_SIZE, &attr_name_lengths) 
-                != OROSTASUC)
-       /o error handling code o/ 
-
-    if (orlalloc(env, &long_ref, MAX_ARR_SIZE, &attr_name_indexes) 
-                != OROSTASUC)
-       /o error handling code o/ 
-
-    /o 
-     o Get an ADT instance. The ref to the ADT instance can be obtained
-     o by through ORI or OSCI. 
-     o/
-    if (OCIObjectPin(env, &obj_ref, OROOPOCUR, OROOPDTRA, OROOLMUPD, &object) 
-          != OROSTASUC)
-       /o error handling code o/ 
-
-    /o get the null structure of the ADT instance o/
-    if (OCIObjectGetInd(gp, object, &null_struct) != OROSTASUC)
-       /o error handling code o/ 
-
-    /o 
-     o Get the type of the ADT instance
-     o/
-
-    /o find out the type of the ADT instance o/
-    if (oriogto(env, object, &adt_ref) != OROSTASUC)
-       /o error handling code o/ 
-
-    /o display the object o/
-    display(adt_ref, object, null_struct, attr_names, 0, attr_names_lengths,
-                     attr_names_indexes, 0);
-
-    /o After the object is displayed, the program waits for the user to 
-     o respond.  The user modifies the values of an attribute and the
-     o program generates a path expression for the attribute and calls 
-     o OCIObjectSetAttr() to set the value. 
-     o/
-
-    if (OCIObjectSetAttr(env, object, null_struct, adt_ref, 
-                (text **)attr_names, (ub4 *)attr_name_lengths, 
-                attr_names_count, (ub4 *)attr_array_indexes, 
-                attr_array_indexes_count, 
-                (dvoid *)0, FALSE, (dvoid *)value) != OROSTASUC)
-       /o error handling code o/ 
-
-    END OF EXAMPLE 1
-
-  NOTES
-
-    This file has been subsetted to contain only the routines that will
-    be in the first release.
-
-  MODIFIED
-    srseshad   03/12/03  - convert oci public api to ansi
-    aahluwal   06/03/02  - bug 2360115
-    bpalaval   02/09/01  - Change text to oratext.
-    whe        09/01/99 -  976457:check __cplusplus for C++ code
-    sthakur    09/18/97 -  collection indexing not supported
-    cxcheng    08/05/97 -  fix compile with short names
-    skrishna   03/18/97 -  fix ifdef for supporting ansi and k&r proto-types
-    cxcheng    02/06/97 -  take out short name support except with SLSHORTNAME
-    cxcheng    10/17/96 -  final renaming of functions
-    jboonleu   10/07/96 -  beautify with OCI long names
-    cxcheng    10/07/96 -  change short names to long names for readability
-    jboonleu   09/27/96 -  fix lint
-    jwijaya    07/03/96 -  add ANSI prototypes
-    jboonleu   04/13/95 -  new interface
-    jwijaya    10/11/94 -  fix the sccs header and add namespace
-    tanguyen   08/22/94 -  fix example 
-    tanguyen   08/09/94 -  remove Sccsid declaration 
-    tanguyen   07/20/94 -  fix OCIObjectSetAttr and OCIObjectGetAttr to 
-                           use position descriptor 
-    tanguyen   07/18/94 -  change 'object' type to become ptr to object 
-    tanguyen   06/30/94 -  Fix the ORID_ORACLE ifdef 
-    tanguyen   06/27/94 -  update to template format 
-    skotsovo   05/12/94 -  replace ado with attribute position 
-    jweisz     05/11/94 -  test new checkin facility 
-    jwijaya    05/05/94 - orienv/ref/typ -> oroenv/ref/typ
-    jwijaya    02/07/94 - Creation
-
-*/
-
-#ifndef ORATYPES
-#include <oratypes.h>
-#endif
-#ifndef ORO_ORACLE
-#include <oro.h>
-#endif
-#ifndef OCI_ORACLE
-#include <oci.h>
-#endif
-
-#ifndef ORID_ORACLE
-#define ORID_ORACLE
-
-#ifdef SLSHORTNAME
-
-#define OCIObjectSetAttr oridset
-#define OCIObjectGetAttr oridget
-
-#endif /* SLSHORTNAME */
-
-/*---------------------------------------------------------------------------*/
-/*                           PUBLIC FUNCTIONS                                */
-/*---------------------------------------------------------------------------*/
-
-/*-------------------------- OCIObjectSetAttr ----------------------------*/
-sword OCIObjectSetAttr(    OCIEnv *env, OCIError *err, dvoid *instance, 
-                  dvoid *null_struct, struct OCIType *tdo, 
-                  CONST oratext **names, CONST ub4 *lengths, 
-                  CONST ub4 name_count, CONST ub4 *indexes, 
-                  CONST ub4 index_count, CONST OCIInd null_status, 
-                  CONST dvoid *attr_null_struct, CONST dvoid *attr_value    );
-/*
-   NAME: OCIObjectSetAttr - ORID SET value
-   PARAMETERS:
-        env  (IN) - OCI environment handle initialized in object mode
-        err  (IN) - error handle. If there is an error, it is
-                        recorded in 'err' and this function returns OCI_ERROR.
-                        The error recorded in 'err' can be retrieved by calling
-                        OCIErrorGet().
-        instance    (IN) - pointer to an ADT instance
-        null_struct (IN) - the null structure of the ADT instance or array
-        tdo         (IN) - pointer to the TDO
-        names       (IN) - array of attribute names. This is used to specify
-                           the names of the attributes in the path expression.
-        lengths     (IN) - array of lengths of attribute names.
-        name_count  (IN) - number of element in the array 'names'.
-        indexes     (IN) [OPTIONAL] - currently NOT SUPPORTED, pass (ub4 *)0.
-        index_count (IN) [OPTIONAL] - currently NOT SUPPORTED, pass (ub4)0.
-        attr_null_status (IN) - the null status of the attribute if the type of
-                                 attribute is primitive.
-        attr_null_struct (IN) - the null structure of an ADT or collection
-                                 attribute.
-        attr_value       (IN) - pointer to the attribute value.
-   REQUIRES:
-   DESCRIPTION:
-        This function set the attribute of the given object with the given 
-        value.  The position of the attribute is specified as a path 
-        expression which is an array of names and an array of indexes. 
-   RETURNS:
-        one of OROSTA*
-   EXAMPLES:
-        For path expression stanford.cs.stu[5].addr, the arrays will look like
-          names = {"stanford", "cs", "stu", "addr"} 
-          lengths = {8, 2, 3, 4}
-          indexes = {5}
-        
-        Also see the above example.
- */
-
-/*-------------------------- OCIObjectGetAttr ----------------------------*/
-sword OCIObjectGetAttr(    OCIEnv *env, OCIError *err, dvoid *instance, 
-                  dvoid *null_struct, struct OCIType *tdo, 
-                  CONST oratext **names, CONST ub4 *lengths, 
-                  CONST ub4 name_count, CONST ub4 *indexes, 
-                  CONST ub4 index_count, OCIInd *attr_null_status, 
-                  dvoid **attr_null_struct, dvoid **attr_value, 
-                  struct OCIType **attr_tdo    );
-/*
-   NAME: OCIObjectGetAttr - ORID GET value
-   PARAMETERS:
-        env  (IN) - OCI environment handle initialized in object mode
-        err  (IN) - error handle. If there is an error, it is
-                        recorded in 'err' and this function returns OCI_ERROR.
-                        The error recorded in 'err' can be retrieved by calling
-                        OCIErrorGet().
-        instance    (IN) - pointer to an ADT instance 
-        null_struct (IN) - the null structure of the ADT instance or array
-        tdo         (IN) - pointer to the TDO 
-        names       (IN) - array of attribute names. This is used to specify
-                           the names of the attributes in the path expression.
-        lengths     (IN) - array of lengths of attribute names. 
-        name_count  (IN) - number of element in the array 'names'.
-        indexes     (IN) [OPTIONAL] - currently NOT SUPPORTED, pass (ub4 *)0.
-        index_count (IN) [OPTIONAL] - currently NOT SUPPORTED, pass (ub4)0.
-        attr_null_status (OUT) - the null status of the attribute if the type 
-                                 of attribute is primitive. 
-        attr_null_struct (OUT) - the null structure of an ADT or collection
-                                 attribute.
-        attr_value       (OUT) - pointer to the attribute value.
-        attr_tdo         (OUT) - pointer to the TDO of the attribute.
-   REQUIRES:
-      - a valid OCI environment handle must be given.
-   DESCRIPTION:
-        This function gets a value from an ADT instance or from an array.
-        If the parameter 'instance' points to an ADT instance, then the path
-        expression specifies the location of the attribute in the ADT. 
-        It is assumed that the object is pinned and that the value returned 
-        is valid until the object is unpinned.
-   RETURNS:
-        one of OROSTA*
-   EXAMPLES:
-        See example in OCIObjectSetAttr(). Also see the above example.
- */
-
-#endif /* ORID_ORACLE */
diff --git a/src/terralib/drivers/OracleSpatial/OCI/include/orl.h b/src/terralib/drivers/OracleSpatial/OCI/include/orl.h
deleted file mode 100644
index f55d466..0000000
--- a/src/terralib/drivers/OracleSpatial/OCI/include/orl.h
+++ /dev/null
@@ -1,3628 +0,0 @@
-/* Copyright (c) 1993, 2003, Oracle Corporation.  All rights reserved.  */
-
-/*
-  Author:             Srinath Krishnaswamy
-  Date:               11/24/93
-  Source documents:   "Functional Specification for C Language Mapping of
-                      OTS Types, Object Management Subsystem", "Oracle C
-                      Coding Standards version 2.2", and the header file
-                      template
-  Rule sets:          the generic and .h file rule sets
-  Quality status:     not exited
-  Identification tag: [ one or more letters to identify the .h file ]
-  Revision code:      11/24/93
- 
-  NAME
-
-    ORL - ORacle's external C Language interface to primitive OTS types
- 
-  DESCRIPTION
-
-    This header file contains C langauge interface to the OTS primitive
-    types. The interface includes C mapping of OTS primitive types and
-    the prototype of the pre-defined operations on the primitive types.
- 
-    ***********************************************************************
-    *** NOTE: The OCI functions for objects requires the                ***
-    ***       application to be running in OBJECT mode. That is, during ***
-    ***       process initialization OCIInitialize(), the mode          ***
-    ***       specified should be OBJECT mode.                          ***
-    **                OCIInitialize(OCI_OBJECT, ..);                    ***
-    ***********************************************************************
-
-  RELATED DOCUMENTS
-
-    [1] Krishnaswamy, Srinath and Nguyen, Tin A., "Functional Specification
-        for C Language Mapping of OTS Types, Object Management Subsystem",
-        March 1994.
-    [2] Nguyen, Tin A., "The Open Type System", Oracle Corporation,
-        February 1994.
-    [3] Klein, Jonathan D., "Large Field Management", Oracle Corporation,
-        October 1993.
- 
-  PUBLIC FUNCTIONS
- 
-    OCI - OCI functions to manipulate Oracle Number, float and decimal
-      ARITHMETIC
-        OCINumberInc - OCINumber INCrement (optimized)
-        OCINumberDec - OCINumber DECrement (optimized)
-        OCINumberAdd - OCINumber ADD numbers
-        OCINumberSub - OCINumber SUBtract numbers
-        OCINumberMul - OCINumber MULtiply numbers
-        OCINumberDiv - OCINumber DIVide numbers
-        OCINumberMod - OCINumber MODulo division
-        OCINumberIntPower - OCINumber integer PoWeR
-        OCINumberShift - OCINumber decimal ShiFT number
-        OCINumberNeg - OCINumber NEGate number
-        OCINumberAbs - OCINumber ABSolute value
-        OCINumberCeil - OCINumber CEiling of number
-        OCINumberFloor - OCINumber FLooR of number
-        OCINumberSqrt - OCINumber SQuare Root of number
-        OCINumberSign - OCINumber get SIGN of number
-      NATIVE TYPE CONVERSION
-        OCINumberToInt  - OCINumber convert number TO machine-format Integer
-        OCINumberFromInt - OCINumber convert machine-format Integer TO Number
-        OCINumberToReal  - OCINumber convert number TO machine-format Real
-        OCINumberToRealArray  - OCINumber convert array of numbers TO
-                                machine-format Real
-        OCINumberFromReal - OCINumber convert machine-format Real TO Number
-      TEXT STRING CONVERSION
-        OCINumberToText  - OCINumber convert number TO String
-        OCINumberFromText - OCINumber convert String TO Number
-      COMPARISON
-        OCINumberCmp - OCINumber CoMPare numbers
-        OCINumberIsZero - OCINumber comparison with ZERo
-        OCINumberIsInt - OCINumber Is an Integer
-      ASSIGNMENT
-        OCINumberAssign - OCINumber ASsiGn number
-        OCINumberSetZero - OCINumber Set number to Zero value
-        OCINumberSetPi - OCINumber Set number to Pi
-      ROUNDING
-        OCINumberTrunc - OCINumber TRUncate an Oracle number
-        OCINumberRound - OCINumber ROUnd number
-        OCINumberPrec - OCINumber round to Precision digits
-      TRANSCENDENTAL
-        OCINumberSin - OCINumber SINe
-        OCINumberArcSin - OCINumber Arc SINe
-        OCINumberHypSin - OCINumber SiNe Hyperbolic
-        OCINumberCos - OCINumber COSine
-        OCINumberArcCos - OCINumber Arc COSine
-        OCINumberHypCos - OCINumber CoSine Hyperbolic
-        OCINumberTan - OCINumber TANgent
-        OCINumberArcTan - OCINumber Arc TANgent
-        OCINumberArcTan2 - OCINumber Arc TaNgent 2
-        OCINumberHypTan - OCINumber TaNgent Hyperbolic
-        OCINumberPower - OCINumber arbitrary Base EXponentiation
-        OCINumberExp - OCINumber EXPonentiation to base e
-        OCINumberLn  - OCINumber Logarithm Natural
-        OCINumberLog - OCINumber LOGarithm to arbitrary base
-
-    OCIDate - OCI functions to manipulate OCI Date
-      OCIDateToExternal - OCIDate convert date to external form
-      OCIDateFromExternal - OCIDate convert external form of date into OCIDate
-      OCIDateAssign - OCIDate Assignment
-      OCIDateToText  - OCIDate convert date TO String
-      OCIDateFromText - OCIDate convert String TO Date
-      OCIDateZoneToZone - OCIDate convert date from one time 
-                        Zone TO another Zone
-      OCIDateCompare - OCIDate CoMPare dates
-      OCIDateAddMonths - OCIDate ADd or subtract Months
-      OCIDateAddDays - OCIDate ADd or subtract Days
-      OCIDateLastDay - OCIDate get date of LaST day of month
-      OCIDateDaysBetween - OCIDate get number of days BeTWeen two dates
-      OCIDateNextDay - OCIDate get date of Next DaY
-      OCIDateCheck - OCIDate CHecK if the given date is valid
-      OCIDateSysDate - OCIDate get current SYStem date and time
-
-    OCIString - OCI String functions to manipulate Variable-length string
-      OCIStringAssign - OCIString Assign string to string
-      OCIStringAssignText - OCIString Assign Text string to string
-      OCIStringResize - OCIString ReSiZe string
-      OCIStringSize - OCIString get String Size
-      OCIStringPtr - OCIString get String PoinTeR
-      OCIStringAllocSize - OCIString get Allocated SiZe
- 
-    OCIRaw - OCI Raw functions to manipulate variable-length raW
-      OCIRawAssignRaw - OCIRaw Assign Raw (of type OCIRaw*) to raw
-                        (of type OCIRaw*)
-      OCIRawResize - OCIRaw Resize raw
-      OCIRawSize - OCIRaw get Raw Size
-      OCIRawPtr  - OCIRaw get Raw data Pointer
-      OCIRawAllocSize - OCIRaw get Allocated Size
-
-    OCIColl - OCI Collection generic functions. These functions can be 
-                used to manipulate both variable-length array (varray) and 
-                nested table.
-      OCICollSize  - OCIColl return current SIZe of the given collection
-                (in number of elements)
-      OCICollMax  - OCIColl return the MAXimum number of elements in the
-                collection (i.e. upper-bound)
-      OCICollGetElem  - OCIColl GET pointer to the element at the given 
-                position
-      OCICollAssignElem  - OCIColl assign to element at given index
-      OCICollAssign  - OCIColl ASsiGn collection; perform deep-copy of source 
-                collection to target collection
-      OCICollAppend  - OCIColl aPPend the given element to the end of the
-                collection
-      OCICollTrim  - OCIColl trim (delete) the given number of elements 
-                from the end of the collection
-      OCICollIsLocator - OCIColl indicates whether a collection is locator
-                         based or not.
-      OCIIterCreate  - OCIColl Create an ITerator to scan the collection 
-                elements
-      OCIIterDelete  - OCIColl Delete ITerator
-      OCIIterInit  - OCIColl Initialize ITerator to scan the given collection
-      OCIIterGetCurrent - OCIColl Iterator based, get CURrent 
-                collection element
-      OCIIterNext - OCIColl Iterator based, get NeXT collection element
-      OCIIterPrev - OCIColl Iterator based, get PReVious collection element
- 
-      OCITable - OCI functions to manipulate nested Table. The OCIColl*() and 
-                OCITable*() functions can be used to manipulate nested table
-      OCITableDelete(i) - OCITable if element(i) exists then the element is 
-                marked as deleted else the function returns false. So 
-                delete's create "holes".
-      OCITableExists(i) - OCITable return true iff an element at
-                position i EXIsts
-      OCITableFirst  - OCITable return the smallest value of i for which
-                exists(i) is true.
-      OCITableLast  - OCITable return the largest value of i for which 
-                exists(i) is true.
-      OCITableNext(i) - OCITable return pointer to the smallest position j, 
-                greater than i, such that OCITableExists(j) is true
-      OCITablePrev(i) - OCITable return pointer to the largest position j,
-                less than i, such that OCITableExists(j) is true
-      OCITableSize - OCITable return current SIZe of the given nested table not
-                including deleted elements
-
-    OCIRef - OCI functions to manipulate object Reference
-      OCIRefClear  - OCIRef CLeaR or nullify a ref
-      OCIRefAssign  - OCIRef ASsiGn a ref to another
-      OCIRefIsEqual  - OCIRef compare two refs for EQUality
-      OCIRefIsNull  - OCIRef test if a ref is NULl 
-      OCIRefFromHex  - OCIRef convert a Hexadecimal string TO a Ref
-      OCIRefToHex   - OCIRef convert a ref to a Hexadecimal string
-      OCIRefHexSize  - OCIRef get size of buffer in bytes to store hexadecimal
-                string
-
-  OBSOLETE: to be replaced by functions from oci.h:
-
-    ORLL - ORL functions to manipulate lob Locators
-      orllasg   - ORLL AsiGn one locator to another
-      orllequ   - ORLL compare two locators for EQUality
-      orlliini  - ORLL Is the locator INItialized?
-      orllgsz   - ORLL Get locator SiZe
-      orllgcid  - ORLL Get Character set ID
-
-      NOTE: The following are specific to FILE lobs:
-
-      orllsnm - ORLL Set directory alias and file NaMe in the locator
-      orllgnm - ORLL Get directory alias and file NaMe from the locator
- 
-  EXAMPLES
-
-    Examples are given in the description of each function where
-    relevant.
- 
-  NOTES
-
-    This file has been subsetted to contain ONLY the routines that will
-    be in the first release.
- 
-  QUESTIONS
-     
-  MODIFIED
-    srseshad   03/12/03 - convert oci public api to ansi
-    rpingte    11/21/02 - Add OCICollGetElemArray and OCINumberToRealArray
-    aahluwal   06/03/02 - bug 2360115
-    gayyappa   02/01/02 - fix 2210776 : change Dom to DOM 
-    whe        09/25/01 - add OCIXMLType & OCIDomDocument opaque types
-    bpalaval   02/09/01   - Change text to oratext.
-    rkasamse   09/20/99 -   lint changes
-    whe        09/01/99 -   976457:check __cplusplus for C++ code
-    hsbedi     08/11/99 -   Add macro
-    rxgovind   10/14/98 -  make non exposed calls (OCIRowType etc) private
-    rxgovind   06/09/98 -  update OCIRowTypeCreate
-    nmantrav   05/11/98 -  add OCIRowTypeGetCount
-    rxgovind   03/29/98 -  add OCIRowType and OCIRowData interfaces
-    jwijaya    05/06/98  - add OCICollIsLocator                                
-    rxgovind   03/18/98 -  opaque types: move to kolo.h
-    etucker    02/02/98 -  add comments for Dec and Inc
-    etucker    01/29/98 -  Finish core5 integration
-    rxgovind   11/11/97 -  opaque types
-    etucker    10/28/97 -  add ORLN functions for SDK
-    cxcheng    07/28/97 -  remove OCILobLocator #define
-    skmishra   05/13/97 -  stdcc compatibility changes
-    skrishna   04/25/97 -  rename OCINumber*(): Exp Power TanHyp Zero Init
-                           TanToArc Sqr Truncate and Compare 
-    skotsovo   03/31/97 -  remove OCILobLocatorSize
-    skrishna   03/25/97 -  remove orld2i and orldi2d
-    skrishna   03/18/97 -  fix ifdef for supporting ansi and k&r proto-types
-    cxcheng    02/06/97 -  take out short name support except with SLSHORTNAME
-    skrishna   01/06/97 -  update OCITableSize() comments
-    skrishna   12/27/96 -  fix OCIDateGet/OCIDateSet
-    skrishna   12/12/96 -  update OCICollGelElem comments
-    skrishna   11/07/96 -  OCICollGetElem: interface change
-    skrishna   11/05/96 -  add OCIDate Get/Set and OCIDateAssign
-    cxcheng    10/31/96 -  change OCINumberTanHyp to OCINumberHypTan
-    cxcheng    10/30/96 -  #define orll short names to long names
-    dchatter   10/26/96 -  fix some OCI file long names
-    cxcheng    10/24/96 -  remove unnecessary comment in front
-    cxcheng    10/14/96 -  disable long name mapping for LOB functions
-    skrishna   10/13/96 -  continue beautification
-    skotsovo   10/16/96 -  update ocilob names
-    cxcheng    10/09/96 -  add structure members in #define for date/time
-    cxcheng    10/09/96 -  more lint fixes
-    skrishna   10/09/96 -  continue beautification
-    cxcheng    10/09/96 -  more fixes
-    skrishna   10/09/96 -  change fixed-char rep. to orlvstr*
-    jwijaya    10/08/96 -  continue beautification
-    jwijaya    10/07/96 -  beautify
-    cxcheng    10/07/96 -  more changes
-    cxcheng    10/04/96 -  replace short names with long names
-    skrishna   10/01/96 -  orlcsiz, orltsiz: change prototype to take errhdl
-    skrishna   09/23/96 -  fix lint errors
-    skotsovo   09/23/96 -  remove orllmkcur().
-    jwijaya    09/17/96 -  comments on null ref
-    skrishna   09/19/96 -  change orlraw format
-    skotsovo   09/19/96 -  add orlliini and remove orllnul
-    skrishna   08/14/96 -  orlvstr: change format to ub4 followed by text
-    jboonleu   08/06/96 -  update comment
-    skotsovo   08/08/96 -  revert to locators instead of descriptors as input t
-    jboonleu   07/23/96 -  remove orlrcur
-    skrishna   07/06/96 -  add orltsiz
-    skrishna   07/05/96 -  add orld2i and orldi2d
-    jwijaya    07/03/96 -  add ANSI prototypes
-    skrishna   06/27/96 -  document default string format in orlds2d & orld2s
-    skrishna   06/25/96 -  change max date value
-    skrishna   06/18/96 -  modify orld2s() comments
-    skotsovo   06/13/96 -  orll functions take lob descriptors instead of locat
-    rxgovind   06/05/96 -  change prototype of orlrcur to take ocienvh
-    skrishna   05/30/96 -  support collection trimming
-    skrishna   05/30/96 -  remove orlralo/fre and orllalo/fre instead use 
-                           orionew/fre
-    skrishna   05/28/96 -  add orlt*() and modify orla*()
-    skotsovo   05/23/96 -  add orlbl typedefs for pro*c
-    jboonleu   05/14/96 -  add orlrcur
-    rxgovind   05/08/96 -  changes for 3gl callbacks
-    skotsovo   05/01/96 -  in orllasg, no need to alloc orlbl*
-    skrishna   04/21/96 -  merge changes from 960418 object branch into big
-    skrishna   04/17/96 -  rename orlrcpy to orlrasg
-    skrishna   04/12/96 -  add orlr2h and orlrh2r functions
-    skotsovo   04/15/96 -  add fnt to make the lob locator current
-    skrishna   04/08/96 -  change orl*() to take ocienvh* and ocierrh* instead
-                           of oroenv*
-    skotsovo   03/22/96 -  add locator functions
-    skotsovo   03/22/96 -  add locator functions
-    skrishna   02/27/96 -  remove mlslabel interface
-    skotsovo   02/20/96 -  remove orlbty and use dty type instead.
-    skotsovo   02/14/96 -  add text file lobs.
-    skrishna   01/31/96 -  update comments of orln2r, orldchk, orlds2d & orld2s
-    skrishna   01/31/96 -  change orld2s() and orln2s() to return string length
-    skrishna   01/21/96 -  remove old raw interface 
-    skrishna   12/14/95 -  add raw interface
-    skotsovo   01/03/96 -  change LOB offsets and lengths from ub4 to ubig_ora
-                           to support 64 bit machines.
-    skotsovo   10/30/95 -  add orlblsiz() to get lob locator size
-    skrishna   10/24/95 -  move ref functions from ori and update the ref
-                           functions to support variable-length ref
-    cxcheng    10/20/95 -  add more comments on number versions
-    cxcheng    10/13/95 -  add more number functions
-    cxcheng    08/29/95 -  Support for segmented varrays
-    cxcheng    08/18/95 -  modifiy orlmls structure
-    skrishna   06/06/95 -  rename orln, orld, orlvs and orlva to orlnum,
-                           orldat, orlvstr and orlvary respectively 
-    skrishna   11/15/94 -  remove orlnget() function 
-    skrishna   09/20/94 -  modify orldbtw() to return number of days only 
-    skrishna   08/24/94 -  change format string length type from ub4 to ub1 
-    skrishna   07/19/94 -  Rename orln2c & orlnc2n to orln2s & orlns2n 
-    skrishna   06/29/94 -  Add blob interface; add examples 
-    skrishna   06/23/94 -  Update comments and format 
-    skrishna   05/19/94 -  update varray append comments 
-    skrishna    05/05/94 -  Subsetting 
-    skrishna    11/24/93 -  Creation
-*/
-
-#ifndef ORATYPES
-#include <oratypes.h>
-#endif
-
-#ifndef ORO_ORACLE
-#include <oro.h>
-#endif
-
-#ifndef ORT_ORACLE
-#include <ort.h>
-#endif
-
-#ifndef OCI_ORACLE
-#include <oci.h>
-#endif
-
-#ifndef ORL_ORACLE
-#define ORL_ORACLE
-
-/*---------------------------------------------------------------------------*/
-/*                         SHORT NAMES SUPPORT SECTION                       */
-/*---------------------------------------------------------------------------*/
-
-#ifdef SLSHORTNAME
-
-/* the following are short names that are only supported on IBM mainframes
-   with the SLSHORTNAME defined.
-   With this all subsequent long names will actually be substituted with
-   the short names here */
-
-#define OCIArray                        orlvary
-#define OCIColl                         orlcol
-#define OCICollAppend                   orlcapp
-#define OCICollAssign                   orlcasg
-#define OCICollAssignElem               orlcase
-#define OCICollGetElem                  orlcget
-#define OCICollGetElemArray             orlcgeta
-#define OCICollMax                      orlcmax
-#define OCICollSize                     orlcsiz
-#define OCICollTrim                     orlctrm
-#define OCICollIsLocator                orlcilc
-#define OCIDate                         orldat
-#define OCIDateAddDays                  orldadd
-#define OCIDateAddMonths                orldadm
-#define OCIDateCheck                    orldchk
-#define OCIDateCompare                  orldcmp
-#define OCIDateDD                       day_orldat
-#define OCIDateDaysBetween              orldbtw
-#define OCIDateFromText                 orlds2d
-#define OCIDateLastDay                  orldlst
-#define OCIDateMM                       mon_orldat
-#define OCIDateNextDay                  orldndy
-#define OCIDateSysDate                  orldsys
-#define OCIDateTime                     time_orldat
-#define OCIDateYYYY                     gye_orldat
-#define OCIDateZoneToZone               orldz2z
-#define OCIIter                         orlcitr
-#define OCIIterCreate                   orlccit
-#define OCIIterDelete                   orlcdit
-#define OCIIterGetCurrent               orlcicur
-#define OCIIterInit                     orlciit
-#define OCIIterNext                     orlcinxt
-#define OCIIterPrev                     orlciprv
-#define OCINumber                       orlnum
-#define OCINumberAbs                    orlnabs
-#define OCINumberAdd                    orlnadd
-#define OCINumberArcCos                 orlnacos
-#define OCINumberArcSin                 orlnasin
-#define OCINumberArcTan                 orlnatan
-#define OCINumberAssign                 orlnasg
-#define OCINumberCeil                   orlncel
-#define OCINumberCos                    orlncos
-#define OCINumberDiv                    orlndiv
-#define OCINumberPower                  orlnbex
-#define OCINumberFloor                  orlnflr
-#define OCINumberFromInt                orlni2n
-#define OCINumberFromReal               orlnr2n
-#define OCINumberFromText               orlns2n
-#define OCINumberHypCos                 orlncsh
-#define OCINumberHypSin                 orlnsnh
-#define OCINumberSetZero                orlnini
-#define OCINumberSetPi                  orlnspi
-#define OCINumberInc                    orlninc
-#define OCINumberDec                    orlndec
-#define OCINumberIntPower               orlnpwr
-#define OCINumberLn                     orlnln
-#define OCINumberLog                    orlnlog
-#define OCINumberMod                    orlnmod
-#define OCINumberMul                    orlnmul
-#define OCINumberNeg                    orlnneg
-#define OCINumberPart                   orlnpart
-#define OCINumberExp                    orlnexp
-#define OCINumberRound                  orlnrou
-#define OCINumberPrec                   orlnpre
-#define OCINumberShift                  orlnsft
-#define OCINumberSign                   orlnsgn
-#define OCINumberSin                    orlnsin
-#define OCINumberSqrt                   orlnsqr
-#define OCINumberSub                    orlnsub
-#define OCINumberTan                    orlntan
-#define OCINumberHypTan                 orlntnh
-#define OCINumberArcTan2                orlnatn2
-#define OCINumberToInt                  orln2i
-#define OCINumberToReal                 orln2r
-#define OCINumberToRealArray            orln2ra
-#define OCINumberToText                 orln2s
-#define OCINumberTrunc                  orlntru
-#define OCINumberCmp                    orlncmp
-#define OCINumberIsZero                 orlnzer
-#define OCINumberIsInt                  orlnint
-#define OCIRaw                          orlraw
-#define OCIRawAllocSize                 orlwasz
-#define OCIRawAssignBytes               orlwabr
-#define OCIRawAssignRaw                 orlwarr
-#define OCIRawPtr                       orlwgrp
-#define OCIRawResize                    orlwrsz
-#define OCIRawSize                      orlwgsz
-#define OCIRefAssign                    orlrasg
-#define OCIRefClear                     orlrclr
-#define OCIRefFromHex                   orlrh2r
-#define OCIRefHexSize                   orlrhsz
-#define OCIRefIsEqual                   orlrequ
-#define OCIRefIsNull                    orlrnul
-#define OCIRefToHex                     orlr2h
-#define OCIString                       orlvstr
-#define OCIStringAllocSize              orlvasz
-#define OCIStringAssign                 orlvass
-#define OCIStringAssignText             orlvats
-#define OCIStringPtr                    orlvgsp
-#define OCIStringResize                 orlvrsz
-#define OCIStringSize                   orlvgsz
-#define OCITable                        orltbl
-#define OCITableDelete                  orltdel
-#define OCITableExists                  orltexi
-#define OCITableFirst                   orltfst
-#define OCITableLast                    orltlst
-#define OCITableNext                    orltnxt
-#define OCITablePrev                    orltprv
-#define OCITableSize                    orltsiz
-#define OCITime                         orldtm
-#define OCITimeHH                       orldtmhh
-#define OCITimeMI                       orldtmmm
-#define OCITimeSS                       orldtmss
-#define OCI_LOBMODE_READONLY            ORLBMORO
-#define OCI_LOBMODE_READWRITE           ORLBMORW
-
-#endif                                                        /* SLSHORTNAME */
-
-/*****************************************************************************/
-/*                         NUMBER/FLOAT/DECIMAL TYPE                         */
-/*****************************************************************************/
-
-#define OCI_NUMBER_SIZE 22
-struct OCINumber
-{
-  ub1 OCINumberPart[OCI_NUMBER_SIZE];
-};
-typedef struct OCINumber OCINumber;
-
-/* 
- * OCINumber - OCI Number mapping in c
- *
- * The OTS types: NUMBER, NUMERIC, INT, SHORTINT, REAL, DOUBLE PRECISION,
- * FLOAT and DECIMAL are represented by OCINumber.
- * The contents of OCINumber is opaque to clients. 
- *
- * For binding variables of type OCINumber in OCI calls (OCIBindByName(),
- * OCIBindByPos(), and OCIDefineByPos()) use the type code SQLT_VNU.
- */
-
-/*
-   EXAMPLE 
-
-   The following example shows how to manipulate an attribute of type 
-   oracle number.
-  
-     struct person
-     {
-       OCINumber sal;
-     };
-     typedef struct person person;
-
-     OCIError *err;
-     person* joe;
-     person* tom;
-     person* debbie;
-     OCINumber  *joesal;
-     OCINumber  *tomsal;
-     OCINumber *debsal;
-     sword   status;
-     int     inum;
-     double  dnum;
-     OCINumber ornum;
-     char    buffer[21];
-     ub4     buflen;
-     sword   result;
-     
-     /o See oci.h for an example of how to initialize OCIError.
-      o For this example, assume the OCIEnv and OCIError has been
-      o initialized.
-      o/
-
-     /o Pin joe, tom and debbie person objects in the object cache. See ori.h
-      o for an example on pinning objects. For this example, assume that
-      o joe, tom and debbie are pointing to pinned objects.
-      o/
-     joesal = &joe->sal;
-     tomsal = &tom->sal;
-     debsal = &debbie->sal;
-
-     /o initialize joe's salary to be $12,000 o/
-     inum = 12000;
-     status = OCINumberFromInt(err, &inum, sizeof(inum), OCI_NUMBER_SIGNED,
-                               joesal);
-     if (status != OCI_SUCCESS)
-                              /o goto to handle error from OCINumberFromInt o/;
-
-     /o initialize tom's salary to be same as joe o/
-     OCINumberAssign(err, joesal, tomsal);
-
-     /o initialize debbie's salary to be 20% more than joe's o/
-     dnum = 1.2;
-     status = OCINumberFromReal(err, &dnum, sizeof(double), &ornum);
-     if (status != OCI_SUCCESS)
-                            /o goto to handle error from OCINumberFromReal o/;
-     status = OCINumberMul(err, joesal, &ornum, debsal);
-     if (status != OCI_SUCCESS)  /o goto to handle error from OCINumberMul o/;
-
-     /o give tom a 50% raise o/
-     dnum = 1.5;
-     status = OCINumberFromReal(err, &dnum, sizeof(double), &ornum);
-     if (status != OCI_SUCCESS)
-                            /o goto to handle error from OCINumberFromReal o/;
-     status = OCINumberMul(err, tomsal, &ornum, tomsal);
-     if (status != OCI_SUCCESS)  /o goto to handle error from OCINumberMul o/;
-
-     /o double joe's salary o/
-     status = OCINumberAdd(err, joesal, joesal, joesal);
-     if (status != OCI_SUCCESS)  /o goto to handle error from OCINumberAdd o/;
-
-     /o get joe's salary in integer o/
-     status = OCINumberToInt(err, joesal, sizeof(inum), OCI_NUMBER_SIGNED,
-                             &inum);
-     if (status != OCI_SUCCESS)/o goto to handle error from OCINumberToInt o/;
-     /o inum is set to 24000 o/
-
-     /o get debbie's salary in double o/
-     status = OCINumberToReal(err, debsal, sizeof(dnum), &dnum);
-     if (status != OCI_SUCCESS)/o goto to handle error from OCINumberToReal o/;
-     /o dnum is set to 14400 o/
-
-     /o print tom's salary as DEM0001`8000.00 o/
-     buflen = sizeof(buffer);
-     status = OCINumberToText(err, tomsal, "C0999G9999D99", 13, 
-                 "NLS_NUMERIC_CHARACTERS='.`' NLS_ISO_CURRENCY='Germany'", 54,
-                 &buflen, buffer);
-     if (status != OCI_SUCCESS)/o goto to handle error from OCINumberToText o/;
-     printf("tom's salary = %s\n", buffer);
-
-     /o compare joe and tom's salary o/
-     status = OCINumberCmp(err, joesal, tomsal, &result);
-     if (status != OCI_SUCCESS)  /o goto to handle error from OCINumberCmp o/;
-     /o result is positive o/
-
-     /o read debbie's new salary from string o/
-     status = OCINumberFromText(err, "48`000.00", 9, "99G999D99", 9,
-                      "NLS_NUMERIC_CHARACTERS='.`'", 27, debsal);
-     if (status != OCI_SUCCESS)
-                            /o goto to handle error from OCINumberFromText o/;
-     /o debbie's salary is now 48000.00 o/
-
-*/
-
-/*----------------------------- OCINumberInc --------------------------------*/
-
-sword OCINumberInc(    OCIError *err, OCINumber *number    );
-/*
-   NAME: OCINumberInc - OCINumber INCrement numbers
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        number (IN/OUT) a positive Oracle number to be incremented
-   DESCRIPTION:
-        Increment Oracle number in place. It is assumed that the input is
-        an integer between 0 and 100^21-2. If the is input too large, it will
-        be treated as 0 - the result will be an Oracle number 1. If the input
-        is not a positive integer, the result will be unpredictable.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          any of the number arguments is null
- */
-
-/*----------------------------- OCINumberDec --------------------------------*/
-
-sword OCINumberDec(    OCIError *err, OCINumber *number    );
-/*
-   NAME: OCINumberDec - OCINumber DECrement numbers
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        number (IN/OUT) - a positive Oracle number to be decremented
-   DESCRIPTION:
-        Decrement Oracle number in place. It is assumed that the input is an
-        integer between 1 and 100^21-2. If the input is too large, it will be
-        treated as 1 - the result will be an Oracle number 0. If the input is
-        not a positive integer, the result will be unpredictable.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          any of the number arguments is null
- */
-
-/*-------------------------- OCINumberSetZero -------------------------------*/
-
-void OCINumberSetZero(    OCIError *err, OCINumber *num    );
-/*
-   NAME: OCINumberSetZero - OCINumber Set number to Zero value
-   PARAMETERS:
-        err (IN/OUT) - pointer to OCI error handle
-        num (OUT) - set to zero value
-   DESCRIPTION:
-        Initialize the given number to value 0.
- */
-
-/*--------------------------- OCINumberSetPi --------------------------------*/
-
-void OCINumberSetPi(    OCIError *err, OCINumber *num    );
-/*
-   NAME: OCINumberSetPi - OCINumber Set number to Pi
-        err (IN/OUT) - pointer to OCI error handle
-        num (OUT) - set to zero value
-   DESCRIPTION:
-        Initialize the given number to value Pi.
- */
-
-/*----------------------------- OCINumberAdd --------------------------------*/
-
-sword OCINumberAdd(    OCIError *err, CONST OCINumber *number1, 
-                       CONST OCINumber *number2, OCINumber *result    );
-/*
-   NAME: OCINumberAdd - OCINumber ADD numbers
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        number1, number2 (IN) - numbers to be added
-        result (OUT) - result of adding 'number1' with 'number2'
-   DESCRIPTION:
-        Add 'number1' with 'number2' and return result in 'result'.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          any of the number arguments is null
- */
-
-/*----------------------------- OCINumberSub --------------------------------*/
-
-sword OCINumberSub(    OCIError *err, CONST OCINumber *number1, 
-                       CONST OCINumber *number2, OCINumber *result    );
-/*
-   NAME: OCINumberSub - OCINumber SUBtract numbers
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        number1, number2 (IN) - 'number2' subtracted from 'number1'
-        result (OUT) - subtraction result
-   DESCRIPTION:
-        Subtract 'number2' from 'number1' and return result in 'result'.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          any of the number arguments is null
- */
-
-/*----------------------------- OCINumberMul --------------------------------*/
-
-sword OCINumberMul(    OCIError *err, CONST OCINumber *number1, 
-                       CONST OCINumber *number2, OCINumber *result    );
-/*
-   NAME: OCINumberMul - OCINumber MULtiply numbers
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        number1, number2 (IN) - numbers to be multiplied
-        result (OUT) - multiplication result
-   DESCRIPTION:
-        Multiply 'number1' with 'number2' and return result in 'result'.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          any of the number arguments is null
- */
-
-/*----------------------------- OCINumberDiv --------------------------------*/
-
-sword OCINumberDiv(    OCIError *err, CONST OCINumber *number1, 
-                       CONST OCINumber *number2, OCINumber *result    );
-/*
-   NAME: OCINumberDiv - OCINumber DIVide numbers
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        number1 (IN) - pointer to the numerator
-        number2 (IN) - pointer to the denominator
-        result (OUT) - division result
-   DESCRIPTION:
-        Divide 'number1' by 'number2' and return result in 'result'.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          any of the number arguments is null
-          underflow errorr
-          overflow errorr
-          divide by zero errorr
- */
-
-/*----------------------------- OCINumberMod --------------------------------*/
-
-sword OCINumberMod(    OCIError *err, CONST OCINumber *number1, 
-                       CONST OCINumber *number2, OCINumber *result    );
-/*
-   NAME: OCINumberMod - OCINumber MODulous
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        number1 (IN) - pointer to the numerator
-        number2 (IN) - pointer to the denominator
-        result (OUT) - remainder of the result
-   DESCRIPTION:
-        Finds the remainder of the division of two Oracle numbers.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          any of the number arguments is null
-          divide by zero errorr
- */
-
-/*------------------------ OCINumberIntPower --------------------------------*/
-
-sword OCINumberIntPower(    OCIError *err, CONST OCINumber *base,
-                            CONST sword exp, OCINumber *result    );
-/*
-   NAME: OCINumberIntPower - OCINumber takes an arbitary base to an arbitary
-                             integer PoWeR
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        base (IN) - base of the exponentiation
-        exp (IN) - exponent to which the base is to be raised
-        result (OUT) - output of exponentiation
-   DESCRIPTION:
-        Takes an arbitary base to an arbitary integer power.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          any of the number arguments is null
- */
-
-/*-------------------------- OCINumberShift ---------------------------------*/
-
-sword OCINumberShift(    OCIError *err, CONST OCINumber *number,
-                            CONST sword nDig, OCINumber *result    );
-/*
-   NAME: OCINumberShift - OCINumber multiplies by a power of 10.
-
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        number (IN) - Oracle Number to be shifted.
-        nDig   (IN) - number of decimal places to shift.
-        result (OUT) - shift result.
-   DESCRIPTION:
-        Multiplies number by 10^NDig and sets product to the result.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          any of the number arguments is null
- */
-
-/*----------------------------- OCINumberNeg --------------------------------*/
-
-sword OCINumberNeg(    OCIError *err, CONST OCINumber *number,
-                       OCINumber *result    );
-/*
-   NAME: OCINumberNeg - OCINumber NEGate number
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        number (IN) - number to be negated
-        result (OUT) - will contain negated value of 'number'
-   DESCRIPTION:
-        Negates an Oracle number.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          any of the number arguments is null
- */
-
-/*------------------------- OCINumberToText ---------------------------------*/
-
-sword OCINumberToText(    OCIError *err, CONST OCINumber *number, 
-                          CONST oratext *fmt, ub4 fmt_length,
-                          CONST oratext *nls_params, ub4 nls_p_length,
-                          ub4 *buf_size, oratext *buf    );
-/*
-   NAME: OCINumberToText - OCINumber convert number TO String 
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        number (IN) - Oracle number to be converted
-        fmt (IN) - conversion format
-        fmt_length (IN) - length of the 'fmt' parameter
-        nls_params (IN) - nls format specification, if null string 
-                i.e. (oratext *)0, then the default parameters for the 
-                session is used
-        nls_p_length (IN) - length of the 'nls_params' parameter
-        buf_size (IN/OUT) - size of the buffer must be passed as input by
-                the caller, this function will return the length of the 
-                resulting string in bytes via this parameter. The length 
-                does not include the terminating null ('\0').
-        buf (OUT) - buffer into which the converted string is placed. The
-                resulting string is null terminated.
-   DESCRIPTION:
-        Converts the given number to a character string 
-        according to the specified format. Refer to "TO_NUMBER" conversion
-        function described in "Oracle SQL Language Reference Manual" for a
-        description of format and NLS parameters.
-        The converted number string is stored in the buffer 'buf', up to 
-        a max of '*buf_size' bytes. Length of the resulting string is
-        returned via 'buf_size'.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          'number' or 'buf' is null
-          buffer too small
-          invalid format
-          invalid nls format
-          number to text translation for the given format causes overflow
- */
-
-/*-------------------------- OCINumberFromText ------------------------------*/
-
-sword OCINumberFromText(    OCIError *err, CONST oratext *str, 
-                          ub4 str_length, CONST oratext *fmt, ub4 fmt_length, 
-                          CONST oratext *nls_params, ub4 nls_p_length, 
-                          OCINumber *number    );
-/*
-   NAME: OCINumberFromText - OCINumber convert String TO Number
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        str (IN) - input string to be converted to Oracle number
-        str_length (IN) - size of the input string
-        fmt (IN) - conversion format
-        fmt_length (IN) - length of the 'fmt' parameter
-        nls_params (IN) - nls format specification, if null string 
-                i.e. (oratext *)0, then the default parameters for the 
-                session is used
-        nls_p_length (IN) - length of the 'nls_params' parameter
-        number (OUT) - given string converted to number
-   DESCRIPTION:
-        Converts the given string to a number
-        according to the specified format. Refer to "TO_NUMBER" conversion
-        function described in "Oracle SQL Language Reference Manual" for a
-        description of format and NLS parameters.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          'number' or 'str' is null
-          'str_length' is 0
-          invalid format
-          invalid nls format
-          invalid input string
- */
-
-/*-------------------------- OCINumberToInt ---------------------------------*/
-
-#define OCI_NUMBER_UNSIGNED 0                        /* Unsigned type -- ubX */
-#define OCI_NUMBER_SIGNED   2                          /* Signed type -- sbX */
-
-sword OCINumberToInt(    OCIError *err, CONST OCINumber *number,
-                         uword rsl_length, uword rsl_flag, dvoid *rsl    );
-/*
-   NAME: OCINumberToInt - OCINumber convert number TO Integer
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        number (IN) - number to be converted
-        rsl_length (IN) - size of the desired result
-        rsl_s_flag (IN) - flag denoting the desired sign of the output; valid 
-                values are OCI_NUMBER_UNSIGNED, OCI_NUMBER_SIGNED
-        rsl (OUT) - pointer to space for the result
-   DESCRIPTION:
-        Native type conversion function.
-        Converts the given Oracle number into an xbx (e.g. ub2, ub4, sb2 etc.)
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          'number' or 'rsl' is null
-          integer value of 'number' is too big -- overflow
-          integer value of 'number' is too small -- underflow
-          invalid sign flag value ('rsl_s_flag')
- */
-
-/*--------------------------- OCINumberFromInt ------------------------------*/
-
-sword OCINumberFromInt(    OCIError *err, CONST dvoid *inum, uword inum_length,
-                         uword inum_s_flag, OCINumber *number    );
-/*
-   NAME: OCINumberFromInt - OCINumber convert Integer TO Number 
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        inum (IN) - pointer to the integer to be converted
-        inum_length (IN) - size of the integer
-        inum_s_flag (IN) - flag that designates the sign of the integer; valid 
-                values are OCI_NUMBER_UNSIGNED, OCI_NUMBER_SIGNED
-        number (OUT) - given integer converted to Oracle number
-   DESCRIPTION:
-        Native type conversion function. Converts any Oracle standard
-        machine-native integer type (xbx) to an Oracle number.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          'number' or 'inum' is null
-          integer too BIG -- the number is too large to fit into an Oracle
-                number
-          invalid sign flag value ('inum_s_flag')
- */
-
-/*------------------------- OCINumberToReal ---------------------------------*/
-
-sword OCINumberToReal(    OCIError *err, CONST OCINumber *number,
-                          uword rsl_length, dvoid *rsl    );
-/*
-   NAME: OCINumberToReal - OCINumber convert number TO Real
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        number (IN) - number to be converted
-        rsl_length (IN) - is the size of the desired result, 
-                sizeof( float | double | long double)
-        rsl (OUT) - pointer to space for storing the result
-   DESCRIPTION:
-        Native type conversion function. Converts an Oracle number into a
-        machine-native real type. This function only converts numbers up to
-        LDBL_DIG, DBL_DIG, or FLT_DIG digits of precision and removes
-        trailing zeroes. The above constants are defined in float.h
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          'number' or 'rsl' is null
-          'rsl_length' is 0
- */
-
-/*------------------------- OCINumberToRealArray ----------------------------*/
-
-sword OCINumberToRealArray(  OCIError *err, CONST OCINumber **number,
-                             uword elems, uword rsl_length, dvoid *rsl    );
-/*
-   NAME: OCINumberToRealArray - OCINumber convert array of numbers TO Real
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        number (IN) - Pointer to array of number to be converted
-        elems (IN) - Upper bound of number array
-        rsl_length (IN) - is the size of the desired result,
-                                          sizeof( float | double | long double)
-        rsl (OUT) - pointer to array of space for storing the result
-   DESCRIPTION:
-        Native type conversion function. Converts an Oracle number into a
-        machine-native real type. This function only converts numbers up to
-        LDBL_DIG, DBL_DIG, or FLT_DIG digits of precision and removes
-        trailing zeroes. The above constants are defined in float.h
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          'number' or 'rsl' is null
-          'rsl_length' is 0
- */
-
-/*-------------------------- OCINumberFromReal ------------------------------*/
-
-sword OCINumberFromReal(    OCIError *err, CONST dvoid *rnum,
-                            uword rnum_length, OCINumber *number    );
-/*
-   NAME: OCINumberFromReal - OCINumber convert Real TO Number 
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        rnum (IN) - pointer to the floating point number to be converted
-        rnum_length (IN) - size of the desired result, i.e.
-                sizeof({float | double | long double})
-        number (OUT) - given float converted to Oracle number
-   DESCRIPTION:
-        Native type conversion function. Converts a machine-native floating
-        point type to an Oracle number.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          'number' or 'rnum' is null
-          'rnum_length' is 0
- */
-
-/*----------------------------- OCINumberCmp --------------------------------*/
-
-sword OCINumberCmp(    OCIError *err, CONST OCINumber *number1, 
-                       CONST OCINumber *number2, sword *result    );
-/*
-   NAME: OCINumberCmp - OCINumber CoMPare numbers 
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        number1, number2 (IN) - numbers to be compared
-        result (OUT) - 0 if equal, negative if number1 < number2, 
-                positive if number1 > number2 
-   DESCRIPTION:
-        The function OCINumberCmp compares two numbers.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-            'number1' or 'number2' or 'result' is null 
- */
-
-/*---------------------------- OCINumberSign --------------------------------*/
-
-sword OCINumberSign(    OCIError *err, CONST OCINumber *number,
-                        sword *result    );
-/*
-   NAME: OCINumberSign - OCINumber obtains SiGN of an Oracle number
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        number (IN) - number whose sign is returned
-        result (OUT) - 0 if number == 0, -1 if number < 0, 
-                1 if number > 0 
-   DESCRIPTION:
-        Obtains sign of an Oracle number
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-            'number' or 'result' is null
- */
-
-/*---------------------------- OCINumberIsZero ------------------------------*/
-
-sword OCINumberIsZero(    OCIError *err, CONST OCINumber *number,
-                          boolean *result    );
-/*
-   NAME: OCINumberIsZero - OCINumber comparison with ZERo
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        number (IN) - numbers to be compared
-        result (OUT) - set to TRUE if equal to zero else FALSE
-   DESCRIPTION:
-        Test if the given number is equal to zero.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-            'number' or 'result' is null
- */
-
-/*---------------------------- OCINumberIsInt -------------------------------*/
-
-sword OCINumberIsInt(    OCIError *err, CONST OCINumber *number,
-                          boolean *result    );
-/*
-   NAME: OCINumberIsInt - OCINumber Is Integer value.
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        number (IN) - number to be tested
-        result (OUT) - set to TRUE if integer value else FALSE
-   DESCRIPTION:
-        Test if the given number is an integer value.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-            'number' or 'result' is null
- */
-
-/*-------------------------- OCINumberAssign --------------------------------*/
- 
-sword OCINumberAssign(    OCIError *err, CONST OCINumber *from,
-                          OCINumber *to    );
-/*
-   NAME: OCINumberAssign - OCINumber ASsiGn number
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        from (IN) - number to be assigned
-        to (OUT) - number copied into
-   DESCRIPTION:
-        Assign number 'from' to 'to'.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          'from' or 'to' is null
- */
-
-/*----------------------------- OCINumberAbs --------------------------------*/
-
-sword OCINumberAbs(    OCIError *err, CONST OCINumber *number,
-                       OCINumber *result    );
-/*
-   NAME: OCINumberAbs - OCINumber compute ABSolute value
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        number (IN) - input number
-        result (OUT) - output which will contain the absolue value of the
-                input number
-   DESCRIPTION:
-        Computes the absolute value of an Oracle number.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          any of the number arguments is null
- */
-
-/*---------------------------- OCINumberCeil --------------------------------*/
-
-sword OCINumberCeil(    OCIError *err, CONST OCINumber *number,
-                        OCINumber *result    );
-/*
-   NAME: OCINumberCeil - OCINumber compute the CEiL value of an Oracle number
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        number (IN) - input number
-        result (OUT) - output which will contain the ceil value of the
-                input number
-   DESCRIPTION:
-        Computes the ceil value of an Oracle number.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          any of the number arguments is null
- */
-
-/*--------------------------- OCINumberFloor --------------------------------*/
-
-sword OCINumberFloor(    OCIError *err, CONST OCINumber *number, 
-                         OCINumber *result    );
-/*
-   NAME: OCINumberFloor - OCINumber compute the FLooR value of an Oracle number
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        number (IN) - input number
-        result (OUT) - output which will contain the floor value of the
-                input number
-   DESCRIPTION:
-        Computes the floor value of an Oracle number.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          any of the number arguments is null
- */
-
-/*----------------------------- OCINumberSqrt -------------------------------*/
-
-sword OCINumberSqrt(    OCIError *err, CONST OCINumber *number, 
-                       OCINumber *result    );
-/*
-   NAME: OCINumberSqrt - OCINumber compute the SQuare Root of an Oracle number
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        number (IN) - input number
-        result (OUT) - output which will contain the square root of the
-                input number
-   DESCRIPTION:
-        Computes the square root of an Oracle number.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          any of the number arguments is null
-          'number' is negative
- */
-
-/*--------------------------- OCINumberTrunc --------------------------------*/
-
-sword OCINumberTrunc(    OCIError *err, CONST OCINumber *number, 
-                         sword decplace, OCINumber *result    );
-/*
-   NAME: OCINumberTrunc - OCINumber TRUncate an Oracle number at a 
-                          specified decimal place
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        number (IN) - input number
-        decplace (IN) - number of decimal digits to the right of the 
-                decimal point to truncate at. Negative values are allowed.
-        result (OUT) - output of truncation
-   DESCRIPTION:
-        Truncate an Oracle number at a specified decimal place
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          any of the number arguments is null
- */
-
-/*----------------------------- OCINumberPower ------------------------------*/
-
-sword OCINumberPower(    OCIError *err, CONST OCINumber *base, 
-                         CONST OCINumber *number, OCINumber *result    );
-/*
-   NAME: OCINumberPower - OCINumber takes an arbitary Base to an 
-                          arbitary Power
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        base (IN) - base of the exponentiation
-        number (IN) - exponent to which the base is to be raised
-        result (OUT) - output of exponentiation
-   DESCRIPTION:
-        Takes an arbitary base to an arbitary power.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          any of the number arguments is null
- */
-
-/*--------------------------- OCINumberRound --------------------------------*/
-
-sword OCINumberRound(    OCIError *err, CONST OCINumber *number,
-                         sword decplace, OCINumber *result    );
-/*
-   NAME: OCINumberRound - OCINumber ROUnds an Oracle number to a specified 
-                  decimal place
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        number (IN) - round this number and return result in 'result'
-        decplace (IN) - number of decimal digits to the right of the 
-                decimal point to round to. Negative values are allowed.
-        result (OUT) - output of rounding
-   DESCRIPTION:
-        Rounds an Oracle number to a specified decimal place
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          any of the number arguments is null
- */
-
-/*--------------------------- OCINumberPrec ---------------------------------*/
-
-sword OCINumberPrec(    OCIError *err, CONST OCINumber *number,
-                         eword nDigs, OCINumber *result    );
-/*
-   NAME: OCINumberPrec - Rounds an Oracle number to a specified number of
-                         decimal digits.
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        number (IN) - number for which to set precision.
-        nDig   (IN) - number of decimal digits desired in the result.
-        result (OUT) - result.
-   DESCRIPTION:
-        Performs a floating point round with respect to the number
-        of digits.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          any of the number arguments is null
- */
-
-/*----------------------------- OCINumberSin --------------------------------*/
-
-sword OCINumberSin(    OCIError *err, CONST OCINumber *number,
-                       OCINumber *result    );
-/*
-   NAME: OCINumberSin - OCINumber takes the SINe of an Oracle number
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        number (IN) - argument of the sine in radians
-        result (OUT) - result of the sine
-   DESCRIPTION:
-        Takes the sine in radians of an Oracle number.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          any of the number arguments is null
- */
-
-/*-------------------------- OCINumberArcSin --------------------------------*/
-
-sword OCINumberArcSin(    OCIError *err, CONST OCINumber *number,
-                          OCINumber *result    );
-/*
-   NAME: OCINumberArcSin - OCINumber takes the Arc SINe of an Oracle number
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        number (IN) - argument of the arc sine
-        result (OUT) - result of the arc sine in radians
-   DESCRIPTION:
-        Takes the arc sine in radians of an Oracle number.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          any of the number arguments is null
-          'number' is < -1 or 'number' is > 1.
- */
-
-/*-------------------------- OCINumberHypSin --------------------------------*/
-
-sword OCINumberHypSin(    OCIError *err, CONST OCINumber *number, 
-                          OCINumber *result    );
-/*
-   NAME: OCINumberHypSin - OCINumber takes the SiNe Hyperbolic of an 
-                           Oracle number
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        number (IN) - argument of the sine hyperbolic
-        result (OUT) - result of the sine hyperbolic
-   DESCRIPTION:
-        Takes the hyperbolic sine of an Oracle number.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          any of the number arguments is null
-   NOTES:
-        An Oracle number overflow causes an unpredictable result value.
- */
-
-/*----------------------------- OCINumberCos --------------------------------*/
-
-sword OCINumberCos(    OCIError *err, CONST OCINumber *number, 
-                       OCINumber *result    );
-/*
-   NAME: OCINumberCos - OCINumber takes the COSine of an Oracle number
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        number (IN) - argument of the cosine in radians
-        result (OUT) - result of the cosine
-   DESCRIPTION:
-        Takes the cosine in radians of an Oracle number.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          any of the number arguments is null
- */
-
-/*-------------------------- OCINumberArcCos --------------------------------*/
-
-sword OCINumberArcCos(    OCIError *err, CONST OCINumber *number, 
-                          OCINumber *result    );
-/*
-   NAME: OCINumberArcCos - OCINumber takes the Arc COSine of an Oracle number
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        number (IN) - argument of the arc cosine
-        result (OUT) - result of the arc cosine in radians
-   DESCRIPTION:
-        Takes the arc cosine in radians of an Oracle number.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          any of the number arguments is null
-          'number' is < -1 or 'number' is > 1.
- */
-
-/*-------------------------- OCINumberHypCos --------------------------------*/
-
-sword OCINumberHypCos(    OCIError *err, CONST OCINumber *number, 
-                          OCINumber *result    );
-/*
-   NAME: OCINumberHypCos - OCINumber takes the CoSine Hyperbolic of an 
-                           Oracle number
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        number (IN) - argument of the cosine hyperbolic
-        result (OUT) - result of the cosine hyperbolic
-   DESCRIPTION:
-        Takes the hyperbolic cosine of an Oracle number.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          any of the number arguments is null
-   NOTES:
-        An Oracle number overflow causes an unpredictable result value.
- */
-
-/*----------------------------- OCINumberTan --------------------------------*/
-
-sword OCINumberTan(    OCIError *err, CONST OCINumber *number, 
-                       OCINumber *result    );
-/*
-   NAME: OCINumberTan - OCINumber takes the TANgent of an Oracle number
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        number (IN) - argument of the tangent in radians
-        result (OUT) - result of the tangent
-   DESCRIPTION:
-        Takes the tangent in radians of an Oracle number.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          any of the number arguments is null
- */
-
-/*-------------------------- OCINumberArcTan --------------------------------*/
-
-sword OCINumberArcTan(    OCIError *err, CONST OCINumber *number, 
-                          OCINumber *result    );
-/*
-   NAME: OCINumberArcTan - OCINumber takes the Arc TANgent of an Oracle number
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        number (IN) - argument of the arc tangent
-        result (OUT) - result of the arc tangent in radians
-   DESCRIPTION:
-        Takes the arc tangent in radians of an Oracle number.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          any of the number arguments is null
- */
-
-/*------------------------ OCINumberArcTan2 ---------------------------------*/
-
-sword OCINumberArcTan2(    OCIError *err, CONST OCINumber *number1, 
-                           CONST OCINumber *number2, OCINumber *result    );
-/*
-   NAME: OCINumberArcTan2 - OCINumber takes the ATan2 of 2 Oracle numbers
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        number1 (IN) - first argument of atan2(y,x) function which 
-                corresponds to 'y' parameter in the function
-        number2 (IN) - second argument of atan2(y,x) function which 
-                corresponds to 'x' parameter in the function
-        result (OUT) - result of the atan2() in radians
-   DESCRIPTION:
-        Takes the atan2(number1, number2).
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          any of the number arguments is null
-          'number2' is 0
- */
-
-/*----------------------------- OCINumberHypTan -----------------------------*/
-
-sword OCINumberHypTan(    OCIError *err, CONST OCINumber *number, 
-                          OCINumber *result    );
-/*
-   NAME: OCINumberHypTan - OCINumber takes the TaNgent Hyperbolic of an Oracle
-                           number
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        number (IN) - argument of the tangent hyperbolic
-        result (OUT) - result of the tangent hyperbolic
-   DESCRIPTION:
-        Takes the hyperbolic tangent of an Oracle number.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          any of the number arguments is null
-   NOTES:
-        An Oracle number overflow causes an unpredictable result value.
- */
-
-/*--------------------------- OCINumberExp ----------------------------------*/
-
-sword OCINumberExp(    OCIError *err, CONST OCINumber *number, 
-                       OCINumber *result    );
-/*
-   NAME: OCINumberExp - OCINumber EXPonential
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        number (IN) - e raised to this Oracle number power
-        result (OUT) - output of exponentiation
-   DESCRIPTION:
-        Raises e to the specified Oracle number power
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          any of the number arguments is null
- */
-
-/*----------------------------- OCINumberLn ---------------------------------*/
-
-sword OCINumberLn(    OCIError *err, CONST OCINumber *number, 
-                      OCINumber *result    );
-/*
-   NAME: OCINumberLn - OCINumber Logarithm Natural
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        number (IN) - logarithm of this number is computed
-        result (OUT) - logarithm result
-   DESCRIPTION:
-        Takes the logarithm of the given Oracle number with respect
-        to the given base.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          any of the number arguments is null
-          'number' is <= 0
- */
-
-/*----------------------------- OCINumberLog --------------------------------*/
-
-sword OCINumberLog(    OCIError *err, CONST OCINumber *base, 
-                       CONST OCINumber *number, OCINumber *result    );
-/*
-   NAME: OCINumberLog - OCINumber LOGarithm any base
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        base (IN) - base of the logarithm
-        number (IN) - opearnd
-        result (OUT) - logarithm result
-   DESCRIPTION:
-        Takes the logarithm with the specified base of an Oracle number.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          any of the number arguments is null
-          'number' is <= 0
-          'base' is <= 0
- */
-
-/*****************************************************************************/
-/*                             ORACLE DATE TYPE                              */
-/*****************************************************************************/
- 
-struct OCITime
-{
-  ub1 OCITimeHH;                          /* hours; range is 0 <= hours <=23 */
-  ub1 OCITimeMI;                     /* minutes; range is 0 <= minutes <= 59 */
-  ub1 OCITimeSS;                     /* seconds; range is 0 <= seconds <= 59 */
-};
-typedef struct OCITime OCITime;
-
-/* 
- * OCITime - OCI TiMe portion of date
- *
- * This structure should be treated as an opaque structure as the format
- * of this structure may change. Use OCIDateGetTime/OCIDateSetTime 
- * to manipulate time portion of OCIDate.
- */
-
-struct OCIDate
-{
-  sb2 OCIDateYYYY;         /* gregorian year; range is -4712 <= year <= 9999 */
-  ub1 OCIDateMM;                          /* month; range is 1 <= month < 12 */
-  ub1 OCIDateDD;                             /* day; range is 1 <= day <= 31 */
-  OCITime OCIDateTime;                                               /* time */
-};
-typedef struct OCIDate OCIDate;
-
-/* 
- * OCIDate - OCI oracle Date representation in C
- *
- * OCIDate represents the C mapping of Oracle date.
- *
- * This structure should be treated as an opaque structure as the format
- * of this structure may change. Use OCIDateGetDate/OCIDateSetDate
- * to access/initialize OCIDate.
- *
- * For binding variables of type OCIDate in OCI calls (OCIBindByName(),
- * OCIBindByPos(), and OCIDefineByPos()) use the type code SQLT_ODT.
- */
-
-/*
-   EXAMPLE 
-
-   The following example shows how to manipulate an attribute of type 
-   oracle date.
-  
-     #define FMT "Month dd, YYYY, HH:MI A.M."
-     #define LANG "American"
-
-     struct person
-     {
-       OCIDate start_date;
-     };
-     typedef struct person person;
-
-     OCIError *err;
-     person *joe;
-     sword status;                                           /o error status o/
-     
-     /o See oci.h for an example of how to initialize OCIError.
-      o For this example, assume the OCIEnv and OCIError has been
-      o initialized.
-      o/
-
-     /o Pin joe person object in the object cache. See ori.h
-      o for an example on pinning objects. For this example, assume that
-      o joe is pointing to the pinned object.
-      o/
-
-     /o set the start date of joe o/
-     OCIDateSetTime(&joe->start_date, 8, 0, 0);
-     OCIDateSetDate(&joe->start_date, 1990, 10, 5); 
-
-     /o check if the date is valid o/
-     uword invalid;
-     if (OCIDateCheck(err, &joe->start_date, &invalid) != OCI_SUCCESS)
-       /o error handling code o/
-     if (invalid)
-       /o error handling code o/
-
-     /o convert date for display purposes o/
-     char str[100];
-     ub4 strlen = sizeof(str);
-     if (OCIDateToText(err, &joe->start_date, FMT, sizeof(FMT)-1, LANG,
-                sizeof(LANG)-1, &strlen, str) != OCI_SUCCESS)
-       /o error handling code o/
-
- */
-
-/*--------------------------- OCIDateGetTime --------------------------------*/
-/* void OCIDateGetTime(/o_ CONST OCIDate *date, ub1 *hour, ub1 *min, 
-                           ub1 *sec _o/); */
-#define OCIDateGetTime(date, hour, min, sec) \
-  { \
-     *hour = (date)->OCIDateTime.OCITimeHH; \
-     *min = (date)->OCIDateTime.OCITimeMI; \
-     *sec = (date)->OCIDateTime.OCITimeSS; \
-  }
-/*
-   NAME: OCIDateGetTime - OCIDate Get Time portion of date
-   PARAMETERS:
-        date (IN) - Oracle date whose time data is retrieved
-        hour (OUT) - hour value returned
-        min (OUT) - minute value returned
-        sec (OUT) - second value returned
-   DESCRIPTION:
-        Return time inforamtion stored in the given date. The time
-        information returned is: hour, minute and seconds.
-   RETURNS:
-        NONE
- */
-
-/*--------------------------- OCIDateGetDate --------------------------------*/
-/* void OCIDateGetDate(/o_ CONST OCIDate *date, sb2 *year, ub1 *month, 
-                           ub1 *day _o/); */
-#define OCIDateGetDate(date, year, month, day) \
-  { \
-     *year = (date)->OCIDateYYYY; \
-     *month = (date)->OCIDateMM; \
-     *day = (date)->OCIDateDD; \
-  }
-/*
-   NAME: OCIDateGetDate - OCIDate Get Date (year, month, day) portion of date
-   PARAMETERS:
-        date (IN) - Oracle date whose year, month, day data is retrieved
-        year (OUT) - year value returned
-        month (OUT) - month value returned
-        day (OUT) - day value returned
-   DESCRIPTION:
-        Return year, month, day inforamtion stored in the given date.
-   RETURNS:
-        NONE
- */
-
-/*--------------------------- OCIDateSetTime --------------------------------*/
-/* void OCIDateSetTime(/o_ OCIDate *date, ub1 hour, ub1 min, 
-                           ub1 sec _o/); */
-#define OCIDateSetTime(date, hour, min, sec) \
-  { \
-     (date)->OCIDateTime.OCITimeHH = hour; \
-     (date)->OCIDateTime.OCITimeMI = min; \
-     (date)->OCIDateTime.OCITimeSS = sec; \
-  }
-/*
-   NAME: OCIDateSetTime - OCIDate Set Time portion of date
-   PARAMETERS:
-        date (OUT) - Oracle date whose time data is set
-        hour (IN) - hour value to be set 
-        min (IN) - minute value to be set
-        sec (IN) - second value to be set
-   DESCRIPTION:
-        Set the date with the given time inforamtion.
-   RETURNS:
-        NONE
- */
-
-/*--------------------------- OCIDateSetDate --------------------------------*/
-/* void OCIDateSetDate(/o_ OCIDate *date, sb2 year, ub1 month, ub1 day _o/); */
-#define OCIDateSetDate(date, year, month, day) \
-  { \
-     (date)->OCIDateYYYY = year; \
-     (date)->OCIDateMM = month; \
-     (date)->OCIDateDD = day; \
-  }
-/*
-   NAME: OCIDateSetDate - OCIDate Set Date (year, month, day) portion of date
-   PARAMETERS:
-        date (IN) - Oracle date whose year, month, day data is set
-        year (OUT) - year value to be set
-        month (OUT) - month value to be set
-        day (OUT) - day value to be set
-   DESCRIPTION:
-        Set the date with the given year, month, day inforamtion.
-   RETURNS:
-        NONE
- */
-
-/*--------------------------- OCIDateAssign ---------------------------------*/
-
-sword OCIDateAssign(    OCIError *err, CONST OCIDate *from, 
-                        OCIDate *to    );
-/*
-   NAME: OCIDateAssign - OCIDate Assignment
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        from (IN) - date to be assigned
-        to (OUT) - lhs of assignment
-   DESCRIPTION:
-        Performs date assignment.
-   RETURNS:
-        OCI_SUCCESS
- */
-
-/*--------------------------- OCIDateToText ---------------------------------*/
-
-sword OCIDateToText(    OCIError *err, CONST OCIDate *date, 
-                        CONST oratext *fmt, ub1 fmt_length, 
-                        CONST oratext *lang_name, ub4 lang_length, 
-                        ub4 *buf_size, oratext *buf    );
-/*
-   NAME: OCIDateToText - OCIDate convert date TO String 
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        date (IN) - Oracle date to be converted
-        fmt (IN) - conversion format, if null string pointer (oratext*)0, then
-                the date is converted to a character string in the
-                date format "DD-MON-YY".
-        fmt_length (IN) - length of the 'fmt' parameter
-        lang_name (IN) - specifies the language in which the names and 
-                abbreviations of months and days are returned;
-                default language of session is used if 'lang_name' 
-                is null i.e. (oratext *)0
-        lang_length (IN) - length of the 'nls_params' parameter
-        buf_size (IN/OUT) - size of the buffer; size of the resulting string
-                is returned via this parameter
-        buf (OUT) - buffer into which the converted string is placed
-   DESCRIPTION:
-        Converts the given date to a string according to the specified format.
-        Refer to "TO_DATE" conversion function described in
-        "Oracle SQL Language Reference Manual" for a description of format
-        and NLS arguments. The converted null-terminated date string is
-        stored in the buffer 'buf'.
- 
-        An error is reported upon overflow, e.g. trying to convert a number
-        of value 10 using format '9' causes an overflow.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          buffer too small
-          invalid format
-          unknown language
-          overflow error
- */
-
-/*---------------------------- OCIDateFromText ------------------------------*/
-
-sword OCIDateFromText(    OCIError *err, CONST oratext *date_str, 
-                        ub4 d_str_length, CONST oratext *fmt, ub1 fmt_length, 
-                        CONST oratext *lang_name, ub4 lang_length, 
-                        OCIDate *date    );
-/*
-   NAME: OCIDateFromText - OCIDate convert String TO Date
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        date_str (IN) - input string to be converted to Oracle date
-        d_str_length (IN) - size of the input string, if the length is -1
-                then 'date_str' is treated as a null terminated  string
-        fmt (IN) - conversion format; if 'fmt' is a null pointer, then
-                the string is expected to be in 'DD-MON-YY' format.
-        fmt_length (IN) - length of the 'fmt' parameter
-        lang_name (IN) - language in which the names and abbreviations of
-                days and months are specified, if null i.e. (oratext *)0,
-                the default language of session is used, 
-        lang_length (IN) - length of the 'lang_name' parameter
-        date (OUT) - given string converted to date
-   DESCRIPTION:
-        Converts the given string to Oracle date
-        according to the specified format. Refer to "TO_DATE" conversion
-        function described in "Oracle SQL Language Reference Manual" for a
-        description of format.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          invalid format
-          unknown language
-          invalid input string
-          <to be discovered>
- */
-
-/*----------------------------- OCIDateCompare ------------------------------*/
-
-sword OCIDateCompare(    OCIError *err, CONST OCIDate *date1, 
-                     CONST OCIDate *date2, sword *result    );
-/*
-   NAME: OCIDateCompare - OCIDate CoMPare dates
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        date1, date2 (IN) - dates to be compared
-        result (OUT) - comparison result, 0 if equal, -1 if date1 < date2, 
-                1 if date1 > date2
-   DESCRIPTION:
-        The function OCIDateCompare compares two dates. It returns -1 if date1 
-        is smaller than date2, 0 if they are equal, and 1 if date1 is greater 
-        than date2.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          invalid date
-          <to be discovered>
- */
-
-/*------------------------- OCIDateAddMonths --------------------------------*/
-
-sword OCIDateAddMonths(    OCIError *err, CONST OCIDate *date, sb4 num_months,
-                           OCIDate *result    );
-/*
-   NAME: OCIDateAddMonths - OCIDate ADd or subtract Months
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        date (IN) - 'num_months' added or subtracted from 'date'
-        num_months (IN) - number of months to be added or subtracted 
-                (a negative value will be subtracted)
-        result (IN/OUT) - result of adding or subtracting to 'date'
-   DESCRIPTION:
-        The function OCIDateAddDays adds or subtracts num_months from the 
-        date 'date'.
-          If the input 'date' is the last day of a month, then 
-        appropriate adjustments are made to ensure that the output date is 
-        also the last day of the month. For example, Feb. 28 + 1 month =
-        March 31, and November 30 - 3 months = August 31. Otherwise the
-        'result' date has the same day component as 'date'. 
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          invalid date
-          <to be discovered>
- */
-
-/*--------------------------- OCIDateAddDays --------------------------------*/
-
-sword OCIDateAddDays(    OCIError *err, CONST OCIDate *date, sb4 num_days,
-                         OCIDate *result    );
-/*
-   NAME: OCIDateAddDays - OCIDate ADd or subtract Days
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        date (IN) - 'num_days' added or subtracted from 'date'
-        num_days (IN) - number of days to be added or subtracted 
-                (a negative value will be subtracted)
-        result (IN/OUT) - result of adding or subtracting to 'date'
-   DESCRIPTION:
-        The function OCIDateAddDays adds or subtracts num_days from the 
-        date 'date'.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          invalid date
-          <to be discovered>
- */
-
-/*--------------------------- OCIDateLastDay --------------------------------*/
-
-sword OCIDateLastDay(    OCIError *err, CONST OCIDate *date, 
-                         OCIDate *last_day    );
-/*
-   NAME: OCIDateLastDay - OCIDate get date of the LaST day of the month
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        date (IN) - input date
-        last_day (OUT) - last day of the month in date 'date'
-   DESCRIPTION:
-        The function OCIDateLastDay returns the date of the last day of the
-        month in date 'date'.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          invalid date
-          <to be discovered>
- */
-
-/*----------------------- OCIDateDaysBetween --------------------------------*/
-
-sword OCIDateDaysBetween(    OCIError *err, CONST OCIDate *date1, 
-                             CONST OCIDate *date2, sb4 *num_days    );
-/*
-   NAME: OCIDateDaysBetween - OCIDate get number of days BeTWeen two dates
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        date1, date2 (IN) - input dates
-        num_days (OUT) - number of days between date1 and date2
-   DESCRIPTION:
-        The function OCIDateDaysBetween returns the number of days between 
-        date1 and date2. The time is ignored in this computation.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          invalid date
-          <to be discovered>
- */
-
-/*------------------------ OCIDateZoneToZone --------------------------------*/
-
-sword OCIDateZoneToZone(    OCIError *err, CONST OCIDate *date1,
-                            CONST oratext *zon1,
-                            ub4 zon1_length, CONST oratext *zon2, 
-                            ub4 zon2_length, OCIDate *date2    );
-/*
-   NAME: OCIDateZoneToZone - OCIDate convert date from one Zone TO another Zone
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        date1 (IN) - date to be converted
-        zon1 (IN) - zone of input date
-        zon1_length (IN) - length in bytes of string 'zon1'
-        zon2 (IN) - zone to be converted to
-        zon2_length (IN) - length in bytes of string 'zon2'
-        date2 (OUT) - converted date (in 'zon2')
-   DESCRIPTION:
-        Converts date from one time zone to another. Given date 'date1' 
-        in time zone 'zon1' returns date 'date2' in time zone 'zon2'.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          invlid date
-          invald input time zone
-          invald output time zone
-          <to be discovered>
- */
-
-/*--------------------------- OCIDateNextDay --------------------------------*/
-
-sword OCIDateNextDay(    OCIError *err, CONST OCIDate *date, 
-                         CONST oratext *day_p, ub4 day_length, 
-                         OCIDate *next_day    );
-/*
-   NAME: OCIDateNextDay - OCIDate get date of Next DaY
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        date (IN) - returned date should be later than this date
-        day (IN) - first day of week named by this is returned
-        day_length (IN) - length in bytes of string 'day'
-        next_day (OUT) - first day of the week named by 'day' later than 'date'
-   DESCRIPTION:
-        Returns the date of the first day of the
-        week named by 'day' that is later than date 'date'.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          invalid date
-          invalid day
-          <to be discovered>
- */
-
-/*----------------------------- OCIDateCheck --------------------------------*/
-
-/* Listing of error bits used by OCIDateCheck() */
-#define OCI_DATE_INVALID_DAY            0x1                       /* Bad DAy */
-#define OCI_DATE_DAY_BELOW_VALID        0x2   /* Bad DAy Low/high bit (1=low)*/
-#define OCI_DATE_INVALID_MONTH          0x4                     /* Bad MOnth */
-#define OCI_DATE_MONTH_BELOW_VALID      0x8 /* Bad MOnth Low/high bit (1=low)*/
-#define OCI_DATE_INVALID_YEAR           0x10                     /* Bad YeaR */
-#define OCI_DATE_YEAR_BELOW_VALID       0x20 /* Bad YeaR Low/high bit (1=low)*/
-#define OCI_DATE_INVALID_HOUR           0x40                     /* Bad HouR */
-#define OCI_DATE_HOUR_BELOW_VALID       0x80 /* Bad HouR Low/high bit (1=low)*/
-#define OCI_DATE_INVALID_MINUTE         0x100                  /* Bad MiNute */
-#define OCI_DATE_MINUTE_BELOW_VALID     0x200
-                                           /* Bad MiNute Low/high bit (1=low)*/
-#define OCI_DATE_INVALID_SECOND         0x400                  /* Bad SeCond */
-#define OCI_DATE_SECOND_BELOW_VALID     0x800
-                                           /* bad second Low/high bit (1=low)*/
-#define OCI_DATE_DAY_MISSING_FROM_1582  0x1000
-                                  /* Day is one of those "missing" from 1582 */
-#define OCI_DATE_YEAR_ZERO              0x2000    /* Year may not equal zero */
-#define OCI_DATE_INVALID_FORMAT         0x8000      /* Bad date format input */
-
-sword OCIDateCheck(    OCIError *err, CONST OCIDate *date, uword *valid    );
-/*
-   NAME: OCIDateCheck - OCIDate CHecK if the given date is valid
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        date (IN) - date to be checked
-        valid (OUT) -  returns zero for a valid date, otherwise 
-                the ORed combination of all error bits specified below:
-  
-   Macro name                   Bit number      Error
-   ----------                   ----------      -----
-   OCI_DATE_INVALID_DAY         0x1             Bad day
-   OCI_DATE_DAY_BELOW_VALID     0x2             Bad DAy Low/high bit (1=low)
-   OCI_DATE_INVALID_MONTH       0x4             Bad MOnth
-   OCI_DATE_MONTH_BELOW_VALID   0x8             Bad MOnth Low/high bit (1=low)
-   OCI_DATE_INVALID_YEAR        0x10            Bad YeaR
-   OCI_DATE_YEAR_BELOW_VALID    0x20            Bad YeaR Low/high bit (1=low)
-   OCI_DATE_INVALID_HOUR        0x40            Bad HouR
-   OCI_DATE_HOUR_BELOW_VALID    0x80            Bad HouR Low/high bit (1=low)
-   OCI_DATE_INVALID_MINUTE      0x100           Bad MiNute
-   OCI_DATE_MINUTE_BELOW_VALID  0x200           Bad MiNute Low/high bit (1=low)
-   OCI_DATE_INVALID_SECOND      0x400           Bad SeCond
-   OCI_DATE_SECOND_BELOW_VALID  0x800           bad second Low/high bit (1=low)
-   OCI_DATE_DAY_MISSING_FROM_1582 0x1000        Day is one of those "missing"
-                                                from 1582
-   OCI_DATE_YEAR_ZERO           0x2000          Year may not equal zero
-   OCI_DATE_INVALID_FORMAT      0x8000          Bad date format input
-  
-   So, for example, if the date passed in was 2/0/1990 25:61:10 in
-   (month/day/year hours:minutes:seconds format), the erroor returned
-   would be OCI_DATE_INVALID_DAY | OCI_DATE_DAY_BELOW_VALID |
-   OCI_DATE_INVALID_HOUR | OCI_DATE_INVALID_MINUTE
-
-   DESCRIPTION:
-        Check if the given date is valid.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          'date' and 'valid' pointers are NULL pointers
- */
-
-/*--------------------------- OCIDateSysDate --------------------------------*/
-
-sword OCIDateSysDate(    OCIError *err, OCIDate *sys_date    );
-/*
-   NAME: OCIDateSysDate - OCIDate get current SYStem date and time
-   PARAMETERS:
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        sys_date (OUT) - current system date and time
-   DESCRIPTION:
-        Returns the current system date and time.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-          <to be discovered>
- */
-
-/*****************************************************************************/
-/*                  FIXED-LENGTH STRING - CHAR (N)                           */
-/*****************************************************************************/
-
-/*
- * An ADT attribute declared as "x CHAR(n)" is mapped to "OCIString *x;".
- * The representation of OCIString * is shown below.
- */
-
-/*****************************************************************************/
-/*                  VARIABLE-LENGTH STRING                                   */
-/*****************************************************************************/
-
-/*
- * The variable-length string is represented in C as a pointer to OCIString
- * structure. The OCIString structure is opaque to the user. Functions are
- * provided to allow the user to manipulate a variable-length string.
- *     
- * A variable-length string can be declared as:
- *
- * OCIString *vstr;
- *
- * For binding variables of type OCIString* in OCI calls (OCIBindByName(),
- * OCIBindByPos() and OCIDefineByPos()) use the external type code SQLT_VST.
- */
-typedef struct OCIString OCIString;
-
-/*-------------------------- OCIStringAssign --------------------------------*/
- 
-sword OCIStringAssign(    OCIEnv *env, OCIError *err, CONST OCIString *rhs, 
-                          OCIString **lhs    );
-/*
-   NAME: OCIStringAssign - OCIString Assign String to String
-   PARAMETERS:
-        env (IN/OUT) - OCI environment handle initialized in object mode.
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        rhs (IN) - RHS of the assignment, the type of rhs is also OCIString
-        lhs (IN/OUT) - LHS of the assignment
-   DESCRIPTION:
-        Assign 'rhs' string to 'lhs' string. The 'lhs' string may be
-        resized depending upon the size of the 'rhs'. The assigned string is
-        null-terminated. The 'length' field will not include the extra byte
-        needed for null termination.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
-        OCI_ERROR if
-          out of space error
- */
- 
-/*---------------------- OCIStringAssignText --------------------------------*/
- 
-sword OCIStringAssignText(    OCIEnv *env, OCIError *err, CONST oratext *rhs, 
-                              ub4 rhs_len, OCIString **lhs    );
-/*
-   NAME: OCIStringAssignText - OCIString Assign Text string to String
-   PARAMETERS:
-        env (IN/OUT) - OCI environment handle initialized in object mode.
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        rhs (IN) - RHS of the assignment, the type of rhs is a text string
-        rhs_len (IN) - length of the 'rhs' string
-        lhs (IN/OUT) - LHS of the assignment
-   DESCRIPTION:
-        Assign 'rhs' string to 'lhs' string. The 'lhs' string may be
-        resized depending upon the size of the 'rhs'. The assigned string is
-        null-terminated. The 'length' field will not include the extra byte
-        needed for null termination.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
-        OCI_ERROR if
-          out of space error
- */
-
-/*-------------------------- OCIStringResize --------------------------------*/
-
-sword OCIStringResize(    OCIEnv *env, OCIError *err, ub4 new_size, 
-                          OCIString **str    );
-/*
-   NAME: OCIStringResize - OCIString ReSiZe string memory
-   PARAMETERS:
-        env (IN/OUT) - OCI environment handle initialized in object mode.
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        new_size (IN) - new memory size of the string in bytes
-        str (IN/OUT) - allocated memory for the string is freed from the 
-                OOCI heap
-   DESCRIPTION:
-        This function resizes the memory of the given variable-length string in
-        the object cache. The contents of the string are NOT preserved.
-        This function may allocate the string in a new memory region in
-        which case the original memory occupied by the given string will
-        be freed. If the input string is null (str == NULL), then this
-        function will allocate memory for the string.
- 
-        If the new_size is 0, then this function frees the memory occupied
-        by 'str' and a null pointer value is returned.
- 
-        NOTE: The caller must compute 'new_size' taking into account space
-        for the null character ('\0').
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
-        OCI_ERROR if
-          out of space error
- */
-
-/*---------------------------- OCIStringSize --------------------------------*/
-
-ub4 OCIStringSize(    OCIEnv *env, CONST OCIString *vs    );
-/*
-   NAME: OCIStringSize - OCIString Get String siZe
-   PARAMETERS:
-        env(IN) - pointer to OCI environment handle
-        vs (IN) - string whose size is returned
-   DESCRIPTION:
-        Return the size of the given string.
-   RETURNS:
-        size of the string in bytes is returned
- */
-
-/*----------------------------- OCIStringPtr --------------------------------*/
-
-oratext *OCIStringPtr(    OCIEnv *env, CONST OCIString *vs    );
-/*
-   NAME: OCIStringPtr - OCIString Get String Pointer
-   PARAMETERS:
-        env(IN) - pointer to OCI environment handle
-        vs (IN) - pointer to the text of this string is returned
-   DESCRIPTION:
-        Return the pointer to the text of the given string.
-   RETURNS:
-        pointer to the text of the string is returned
- */
-
-/*----------------------- OCIStringAllocSize --------------------------------*/
- 
-sword OCIStringAllocSize(    OCIEnv *env, OCIError *err, CONST OCIString *vs, 
-                             ub4 *allocsize    );
-/*
-   NAME: OCIStringAllocSize - OCIString get Allocated SiZe of string memory 
-                              in bytes
-   PARAMETERS:
-        env (IN/OUT) - OCI environment handle initialized in object mode.
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        vs (IN) - string whose allocated size in bytes is returned
-        allocsize (OUT) - allocated size of string memory in bytes is returned
-   DESCRIPTION:
-        Return the allocated size of the string memory in bytes. The
-        allocated size is >= actual string size.
-   REQUIRES:
-        vs is a non-null pointer
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
-        OCI_ERROR on error
- */
-
-/*****************************************************************************/
-/*                       VARIABLE-LENGTH RAW                                 */
-/*****************************************************************************/
-
-/*
- * The variable-length raw is represented in C as a pointer to OCIRaw
- * structure. The OCIRaw structure is opaque to the user. Functions are
- * provided to allow the user to manipulate a variable-length raw.
- *     
- * A variable-length raw can be declared as:
- *
- * OCIRaw *raw;
- *
- * For binding variables of type OCIRaw* in OCI calls (OCIBindByName(),
- * OCIBindByPos() and OCIDefineByPos()) use the external type code SQLT_LVB.
- */
-typedef struct OCIRaw OCIRaw;
-
-/*-------------------------- OCIRawAssignRaw --------------------------------*/
- 
-sword OCIRawAssignRaw(    OCIEnv *env, OCIError *err, CONST OCIRaw *rhs, 
-                          OCIRaw **lhs    );
-/*
-   NAME: OCIRawAssignRaw - OCIRaw Assign Raw (of type OCIRaw*) to
-                   Raw (of type OCIRaw*)
-   PARAMETERS:
-        env (IN/OUT) - OCI environment handle initialized in object mode.
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        rhs (IN) - RHS of the assignment, the type of rhs is also OCIRaw
-        lhs (IN/OUT) - LHS of the assignment
-   DESCRIPTION:
-        Assign 'rhs' raw to 'lhs' raw. The 'lhs' raw may be
-        resized depending upon the size of the 'rhs'.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
-        OCI_ERROR if
-          out of space error
- */
- 
-/*------------------------ OCIRawAssignBytes --------------------------------*/
- 
-sword OCIRawAssignBytes(    OCIEnv *env, OCIError *err, CONST ub1 *rhs, 
-                            ub4 rhs_len, OCIRaw **lhs    );
-/*
-   NAME: OCIRawAssignBytes - OCIRaw Assign raw Bytes (of type ub1*) to Raw 
-                   (of type OCIRaw*)
-   PARAMETERS:
-        env (IN/OUT) - OCI environment handle initialized in object mode.
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        rhs (IN) - RHS of the assignment, the type of rhs is ub1 *
-        rhs_len (IN) - length of the 'rhs' raw
-        lhs (IN/OUT) - LHS of the assignment
-   DESCRIPTION:
-        Assign 'rhs' raw to 'lhs' raw. The 'lhs' raw may be
-        resized depending upon the size of the 'rhs'.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
-        OCI_ERROR if
-          out of space error
- */
-
-/*---------------------------- OCIRawResize ---------------------------------*/
- 
-sword OCIRawResize(    OCIEnv *env, OCIError *err, ub4 new_size, 
-                       OCIRaw **raw    );
-/*
-   NAME: OCIRawResize - OCIRaw ReSiZe memory of variable-length raw
-   PARAMETERS:
-        env (IN/OUT) - OCI environment handle initialized in object mode.
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        new_size (IN) - new size of the raw data in bytes
-        raw (IN) - variable-length raw pointer; the raw is
-                resized to 'new_size'
-   DESCRIPTION:
-        This function resizes the memory of the given variable-length raw in
-        the object cache. 
-        The previous contents of the raw are NOT preserved.
-        This function may allocate the raw in a new memory region in
-        which case the original memory occupied by the given raw will
-        be freed. If the input raw is null (raw == NULL), then this
-        function will allocate memory for the raw data.
- 
-        If the new_size is 0, then this function frees the memory occupied
-        by 'raw' and a null pointer value is returned.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
-        OCI_ERROR if
-          out of space error
- */
-
-/*------------------------------- OCIRawSize --------------------------------*/
-
-ub4 OCIRawSize(    OCIEnv * env, CONST OCIRaw *raw    );
-/*
-   NAME: OCIRawSize - OCIRaw Get Raw siZe
-   PARAMETERS:
-        env (IN)  - pointer to OCI environment handle
-        raw (INT) - raw whose size is returned
-   DESCRIPTION:
-        Return the size of the given raw.
-   RETURNS:
-        size of the raw in bytes is returned
- */
-
-/*--------------------------------- OCIRawPtr -------------------------------*/
-ub1 *OCIRawPtr(    OCIEnv * env, CONST OCIRaw *raw    );
-/*
-   NAME: OCIRawPtr - OCIRaw Get Raw data Pointer
-   PARAMETERS:
-        env (IN) - pointer to OCI environment handle
-        raw (IN) - pointer to the data of this raw is returned
-   DESCRIPTION:
-        Return the pointer to the data of the given raw.
-   RETURNS:
-        pointer to the data of the raw is returned
- */
-
-/*------------------------------ OCIRawAllocSize ----------------------------*/
- 
-sword OCIRawAllocSize(    OCIEnv *env, OCIError *err, CONST OCIRaw *raw,
-                          ub4 *allocsize    );
-/*
-   NAME: OCIRawAllocSize - OCIRaw get Allocated SiZe of raw memory in bytes
-   PARAMETERS:
-        env (IN/OUT) - OCI environment handle initialized in object mode.
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        raw (IN) - raw whose allocated size in bytes is returned
-        allocsize (OUT) - allocated size of raw memory in bytes is returned
-   DESCRIPTION:
-        Return the allocated size of the raw memory in bytes. The
-        allocated size is >= actual raw size.
-   REQUIRES:
-        raw is a non-null pointer
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
-        OCI_ERROR upon error
- */
-
-/*****************************************************************************/
-/*                     OBJECT REFERENCE OPERATIONS                           */
-/*****************************************************************************/
-
-/* 
- * See the definition of OCIRef in oro.h.
- *
- * For binding variables of type OCIRef* in OCI calls (OCIBindByName(),
- * OCIBindByPos() and OCIDefineByPos()) use the code SQLT_REF.
- * 
- */
-
-/*---------------------------- OCIRefClear ----------------------------------*/
-void OCIRefClear(    OCIEnv *env, OCIRef *ref    );
-/*
-   NAME: OCIRefClear - OCIRef CLeaR or nullify a ref
-   PARAMETERS:
-        env (IN)     - pointer to OCI environment handle
-        ref (IN/OUT) - ref to clear
-   DESCRIPTION:
-        Clear or nullify the given ref. A ref is considered to be a null ref
-        if it does not contain a valid OID (and thus doesn't point to an
-        object). Logically, a null ref is a dangling ref.
-
-        Note that a null ref is still a valid SQL value and is not SQL-ly null.
-        It can be used as a valid non-null constant ref value for NOT NULL
-        column or attribute of a row in a table.
-        
-        If a null pointer value is passed as a ref,
-        then this function is a no-op.
- */
-
-/*--------------------------- OCIRefAssign ----------------------------------*/
-sword OCIRefAssign(    OCIEnv *env, OCIError *err, CONST OCIRef *source, 
-                       OCIRef **target    );
-/*
-   NAME: OCIRefAssign - OCIRef CoPY a ref to another
-   PARAMETERS:
-        env (IN/OUT) - OCI environment handle initialized in object mode.
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        source (IN) - ref to copy from
-        target (IN/OUT) - ref to copy to
-   DESCRIPTION:
-        Copy 'source' ref to 'target' ref; both then reference the same
-        object. If the target ref pointer is null (i.e. *target == NULL)
-        then the copy function will allocate memory for the target ref
-        in OOCI heap prior to the copy.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
-        OCI_ERROR if
-          1) out of memory
- */
-
-/*-------------------------- OCIRefIsEqual ----------------------------------*/
-boolean OCIRefIsEqual(    OCIEnv *env, CONST OCIRef *x, CONST OCIRef *y    );
-/*
-   NAME: OCIRefIsEqual - OCIRef compare two refs for EQUality
-   PARAMETERS:
-        env (IN) - pointer to OCI environment handle
-        x (IN)   - ref to compare
-        y (IN)   - ref to compare
-   DESCRIPTION:
-        Compare the given refs for equality.
-        Two refs are equal if and only if:
-          - they are both referencing the same persistent object, or
-          - they are both referencing the same transient object.
-
-        NOTE THAT TWO NULL REFS ARE CONSIDERED NOT EQUAL BY THIS FUNCTION.
-   RETURNS:
-        TRUE if the two refs are equal
-        FALSE if the two refs are not equal, or X is NULL, or Y is NULL
- */
-
-/*--------------------------- OCIRefIsNull ----------------------------------*/
-boolean OCIRefIsNull(    OCIEnv *env, CONST OCIRef *ref    );
-/*
-   NAME: OCIRefIsNull - OCIRef test if a ref is NULl
-   PARAMETERS:
-        env (IN) - pointer to OCI environment handle
-        ref (IN) - ref to test for null
-   DESCRIPTION:
-        Return TRUE if the given ref is null; otherwise, return FALSE.
-        A ref is null if and only if:
-        - it is supposed to be referencing a persistent object, but
-          its OID is null, or
-        - it is supposed to be referencing a transient object, but it is
-          currently not pointing to an object.
-        A ref is a dangling ref if the object that it points to does not
-        exist.
-   RETURNS:
-        TRUE if the given ref is NULL
-        FALSE if the given ref is not NULL
- */
-
-/*-------------------------- OCIRefHexSize ----------------------------------*/
-ub4 OCIRefHexSize(    OCIEnv *env, CONST OCIRef *ref    );
-/*
-   NAME: OCIRefHexSize - OCIRef Hexadecimal buffer SiZe in bytes
-   PARAMETERS:
-        env (IN) - pointer to OCI environment handle
-        ref (IN) - ref whose size in hexadecimal representation in bytes is
-                returned
-   DESCRIPTION:
-        Return the size of the buffer in bytes required for the hexadecimal
-        representation of the ref. A buffer of at-least this size must be
-        passed to ref-to-hex (OCIRefToHex) conversion function.
-   RETURNS:
-        size of hexadecimal representation of ref
- */
-
-/*-------------------------- OCIRefFromHex ---------------------------------*/
-sword OCIRefFromHex(    OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc, 
-                        CONST oratext *hex, ub4 length, OCIRef **ref    );
-/*
-   NAME:
-        OCIRefFromHex - OCIRef convert a Hexadecimal string TO a Ref
-   PARAMETERS:
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by
-                calling OCIErrorGet().
-        svc (IN) - OCI service context handle; if the resulting ref is
-                initialized with this service context
-        hex (IN) - hexadecimal string (that was produced by 'OCIRefToHex()"
-                previously) to be convert into a ref
-        length (IN) - length of the hexadecimal string
-        ref (IN/OUT) - ref is initialized with the given value ('hex').
-                If *ref is null, then space for the ref is allocated in the
-                object cache, otherwise the memory occupied by the given ref
-                is re-used.
-   DESCRIPTION:
-        Convert the given hexadecimal string into a ref. This function
-        ensures that the resulting ref is well formed. It does NOT ensure
-        that the object pointed to by the resulting ref exists or not.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
-        OCI_ERROR if
- */
-
-/*--------------------------- OCIRefToHex -----------------------------------*/
-sword OCIRefToHex(    OCIEnv *env, OCIError *err, CONST OCIRef *ref, 
-                      oratext *hex, ub4 *hex_length    );
-/*
-   NAME:
-        OCIRefToHex - OCIRef convert ref to a Hexadecimal string
-   PARAMETERS:
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by
-                calling OCIErrorGet().
-        ref (IN) - ref to be converted into a hexadecimal string; if the
-                ref is a null ref (i.e. OCIRefIsNull(ref) == TRUE) then
-                a zero hex_length value is returned
-        hex (OUT) - buffer that is large enough to contain the resulting
-                hexadecimal string; the contents of the string is opaque
-                to the caller
-        hex_length (IN/OUT) - on input specifies the size of the 'hex' buffer,
-                on output specifies the actual size of the hexadecimal
-                string being returned in 'hex'
-   DESCRIPTION:
-        Convert the given ref into a hexadecimal string, and return the length
-        of the string. The resulting string is opaque to the caller.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
-        OCI_ERROR if
-          the given buffer is not big enough to hold the resulting string
- */
-
-
-/*****************************************************************************/
-/*                          COLLECTION FUNCTIONS                             */
-/*****************************************************************************/
-
-/* 
-   The generic collection is represented by the type 'OCIColl'. The following
-   operations OCIColl*() are provided on a generic collection:
-     - get current size of collection
-     - get upper bound of collection
-     - get pointer to an element given its index
-     - set element at given index (assign element)
-     - append an element 
-     - trim the given number of elements from the end of the collection
-     - collection assignment
-
-   The following iterator based scanning functions are also provided on a
-   generic collection. These functions make use of an iterator which is
-   defined to be of type OCIIter.
-
-     - create an iterator for scanning collection
-     - destroy iterator
-     - reset iterator to the beginning of collection
-     - get pointer to current element pointed by iterator
-     - get pointer to next element
-     - get pointer to previous element
-
-   The collections variable-length array (varray) and nested table
-   are sub-types of generic collection. This means that the OCIColl*() 
-   functions can also be used to manipulate varray and nested table.
-
-   The varray is represented by OCIArray type and nested table by OCITable.
-   Besides OCIColl*() functions no additional functions are provided for
-   manipulating varrays. The OCIColl*() functions are a complete set of 
-   functions to manipulate varrays.
-
-   Besides OCIColl*() functions, the following functions OCITable*() can be 
-   used to manipulate nested table. The OCITable*() functions operate on 
-   nested tables only and should not be used on a varray.
-
-     - delete an element at index i. Note that the position
-       ordinals of the remaining elements of the table is not changed by the
-       delete operation. So delete creates "holes" in the table.
-     - check if an element exists at the given index i
-     - return the smallest value of i for which exists(i) is true
-     - return the largest value of i for which exists(i) is true
-     - return pointer to the smallest position j, greater than i, such that 
-       OCITableExists(j) is true
-     - return pointer to the largest position j, less than i, such that 
-       OCITableExists(j) is true
-
-   For binding variables of type OCIColl* or OCITable* in OCI calls
-   (OCIBindByName(), OCIBindByPos() and OCIDefineByPos()) use the external
-   type code SQLT_NTY.
- */
-
-/* OCIColl - generic collection type */
-typedef struct OCIColl OCIColl;
-
-/* OCIArray - varray collection type */
-typedef OCIColl OCIArray;
-
-/* OCITable - nested table collection type */
-typedef OCIColl OCITable;
-
-/* OCIIter - collection iterator */
-typedef struct OCIIter OCIIter;
-
-/*----------------------------- OCICollSize ---------------------------------*/
-
-sword OCICollSize( OCIEnv *env, OCIError *err, CONST OCIColl *coll, 
-                   sb4 *size );
-/*
-   NAME: OCICollSize - OCIColl return current SIZe of the given collection
-   PARAMETERS:
-        env(IN) - pointer to OCI environment handle
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        coll (IN) - collection whose number of elements is returned
-        size (OUT) - current number of elements in the collection
-   DESCRIPTION:
-          Returns the current number of elements in the given collection.
-
-          For collections of type nested table wherein 'delete element'
-          operation is allowed, the count returned by OCICollSize() will
-          NOT be decremented upon deleting elements. For example:
-
-            OCICollSize(...); 
-            // assume 'size' returned is equal to 5
-            OCITableDelete(...); // delete one element
-            OCICollSize(...);
-            // 'size' returned will still be 5
-
-          To get the count minus the deleted elements use OCITableSize(). 
-          Continuing the above example,
-
-            OCITableSize(...)
-            // 'size' returned will be equal to 4
-
-          Note, a trim operation (OCICollTrim) will decrement the count 
-          by the number of trimmed elements. Continuing the above example,
-
-            OCICollTrim(..,1..); // trim one element
-            OCICollSize(...);
-            // 'size' returned will be equal to 4
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
-        OCI_ERROR if
-          error during loading of collection into object cache
-          any of the input parameters is null
- */
-
-/*------------------------------ OCICollMax ---------------------------------*/
-
-sb4 OCICollMax(    OCIEnv *env, CONST OCIColl *coll    );
-/*
-   NAME: OCICollMax - OCIColl return MAXimum size (upper-bound) of the
-                   given collection (in number of elements)
-   PARAMETERS:
-        env(IN) - pointer to OCI environment handle
-        coll (IN) - collection whose upper-bound in number of elements 
-                is returned
-   DESCRIPTION:
-        Returns the max number of elements that the given collection can hold.
-        A value 0 indicates that the collection has no upper-bound.
-   REQUIRES:
-        coll must point to a valid collection descriptor
-   RETURNS:
-        upper-bound of the given collection
- */
-
-/*-------------------------- OCICollGetElem ---------------------------------*/
-
-sword OCICollGetElem(    OCIEnv *env, OCIError *err, CONST OCIColl *coll, 
-                         sb4 index, boolean *exists, dvoid **elem, 
-                         dvoid **elemind    );
-/*
-   NAME: OCICollGetElem - OCIColl GET pointer to the element at the given index
-   PARAMETERS:
-        env (IN/OUT) - OCI environment handle initialized in object mode.
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        coll (IN) - pointer to the element in this collection is returned
-        index (IN) - index of the element whose pointer is returned
-        exists (OUT) - set to FALSE if element at the specified index does 
-                not exist else TRUE
-        elem (OUT) - address of the desired element is returned
-        elemind (OUT) [optional] - address of the null indicator information 
-                is returned; if (elemind == NULL) then the null indicator
-                information will NOT be returned
-   DESCRIPTION:
-        Get the address of the element at the given position. Optionally
-        this function also returns the address of the element's null indicator
-        information.
- 
-        The following table describes for each collection element type
-        what the corresponding element pointer type is. The element pointer
-        is returned via the 'elem' parameter of OCICollGetElem().
- 
-           Element Type                       *elem is set to
-        -----------------------               ---------------
-         Oracle Number (OCINumber)              OCINumber*
-         Date (OCIDate)                         OCIDate*
-         Variable-length string (OCIString*)    OCIString**
-         Variable-length raw (OCIRaw*)          OCIRaw**
-         object reference (OCIRef*)             OCIRef**
-         lob locator (OCILobLocator*)           OCILobLocator**
-         object type (e.g. person)              person*
- 
-        The element pointer returned by OCICollGetElem() is in a form
-        such that it can not only be used to access the
-        element data but also is in a form that can be used as the target
-        (i.e left-hand-side) of an assignment statement.
- 
-        For example, assume the user is iterating over the elements of
-        a collection whose element type is object reference (OCIRef*). A call
-        to OCICollGetElem() returns pointer to a reference handle
-        (i.e. OCIRef**). After getting, the pointer to the collection
-        element, the user may wish to modify it by assigning a new reference.
-        This can be accomplished via the ref assignment function shown below:
- 
-        sword OCIRefAssign( OCIEnv *env, OCIError *err, CONST OCIRef *source,
-                            OCIRef **target );
- 
-        Note that the 'target' parameter of OCIRefAssign() is of type
-        'OCIRef**'. Hence OCICollGetElem() returns 'OCIRef**'.
-        If '*target == NULL' a new ref will be allocated by OCIRefAssign()
-        and returned via the 'target' parameter.
- 
-        Similarly, if the collection element was of type string (OCIString*),
-        OCICollGetElem() returns pointer to string handle
-        (i.e. OCIString**). If a new string is assigned, via
-        OCIStringAssign() or OCIStringAssignText() the type of the target
-        must be 'OCIString **'.
- 
-        If the collection element is of type Oracle number, OCICollGetElem()
-        returns OCINumber*. The prototype of OCINumberAssign() is shown below:
- 
-        sword OCINumberAssign(OCIError *err, CONST OCINumber *from,
-                              OCINumber *to);
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
-        OCI_ERROR if
-          any of the input parameters is null
- */
-
-/*------------------------- OCICollGetElemArray -----------------------------*/
-
-sword OCICollGetElemArray(  OCIEnv *env, OCIError *err, CONST OCIColl *coll, 
-                            sb4 index, boolean *exists, dvoid **elem, 
-                            dvoid **elemind, uword *nelems);
-/*
-   NAME: OCICollGetElemArray - OCIColl GET pointers to elements from given index
-   PARAMETERS:
-        env (IN/OUT) - OCI environment handle initialized in object mode.
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        coll (IN) - pointers to the elements in this collection is returned
-        index (IN) - starting index of the element
-        exists (OUT) - set to FALSE if element at the specified index does 
-                not exist else TRUE
-        elem (OUT) - address of the desired elements is returned
-        elemind (OUT) [optional] - address of the null indicators information 
-                is returned; if (elemind == NULL) then the null indicator
-                information will NOT be returned
-        nelems(IN/OUT) - Upper bound of elem and/or elemind array
-   DESCRIPTION:
-        Get the address of the elements from the given position. Optionally
-        this function also returns the address of the element's null indicator
-        information.
- 
-        The following table describes for each collection element type
-        what the corresponding element pointer type is. The element pointer
-        is returned via the 'elem' parameter of OCICollGetElem().
- 
-           Element Type                       *elem is set to
-        -----------------------               ---------------
-         Oracle Number (OCINumber)              OCINumber*
-         Date (OCIDate)                         OCIDate*
-         Variable-length string (OCIString*)    OCIString**
-         Variable-length raw (OCIRaw*)          OCIRaw**
-         object reference (OCIRef*)             OCIRef**
-         lob locator (OCILobLocator*)           OCILobLocator**
-         object type (e.g. person)              person*
- 
-        The element pointer returned by OCICollGetElem() is in a form
-        such that it can not only be used to access the
-        element data but also is in a form that can be used as the target
-        (i.e left-hand-side) of an assignment statement.
- 
-        For example, assume the user is iterating over the elements of
-        a collection whose element type is object reference (OCIRef*). A call
-        to OCICollGetElem() returns pointer to a reference handle
-        (i.e. OCIRef**). After getting, the pointer to the collection
-        element, the user may wish to modify it by assigning a new reference.
-        This can be accomplished via the ref assignment function shown below:
- 
-        sword OCIRefAssign( OCIEnv *env, OCIError *err, CONST OCIRef *source,
-                            OCIRef **target );
- 
-        Note that the 'target' parameter of OCIRefAssign() is of type
-        'OCIRef**'. Hence OCICollGetElem() returns 'OCIRef**'.
-        If '*target == NULL' a new ref will be allocated by OCIRefAssign()
-        and returned via the 'target' parameter.
- 
-        Similarly, if the collection element was of type string (OCIString*),
-        OCICollGetElem() returns pointer to string handle
-        (i.e. OCIString**). If a new string is assigned, via
-        OCIStringAssign() or OCIStringAssignText() the type of the target
-        must be 'OCIString **'.
- 
-        If the collection element is of type Oracle number, OCICollGetElem()
-        returns OCINumber*. The prototype of OCINumberAssign() is shown below:
- 
-        sword OCINumberAssign(OCIError *err, CONST OCINumber *from,
-                              OCINumber *to);
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
-        OCI_ERROR if
-          any of the input parameters is null
- */
-
-/*----------------------- OCICollAssignElem ---------------------------------*/
-
-sword OCICollAssignElem(    OCIEnv *env, OCIError *err, sb4 index, 
-                            CONST dvoid *elem, 
-                            CONST dvoid *elemind, OCIColl *coll    );
-/*
-   NAME: OCICollAssignElem - OCIColl ASsign Element
-   PARAMETERS:
-        env (IN/OUT) - OCI environment handle initialized in object mode.
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        index (IN) - index of the element whose is assigned to
-        elem (IN) - element which is assigned from (source element)
-        elemind (IN) [optional] - pointer to the element's null indicator 
-                information; if (elemind == NULL) then the null indicator
-                information of the assigned element will be set to non-null.
-        coll (IN/OUT) - collection to be updated
-   DESCRIPTION:
-        Assign the given element value 'elem' to the element at coll[index].
-        If the collection is of type nested table, the element at the given 
-        index may not exist (i.e. may have been deleted). In this case, the 
-        given element is inserted at index 'index'.
-        Otherwise, the element at index 'index' is updated with the value
-        of 'elem'.
-  
-        Note that the given element is deep-copied and 
-        'elem' is strictly an input parameter.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
-        OCI_ERROR if
-          any of the input parameters is null
-          out of memory error
-          given index is out of bounds of the given collection
- */
-
-/*--------------------------- OCICollAssign ---------------------------------*/
-
-sword OCICollAssign(    OCIEnv *env, OCIError *err, CONST OCIColl *rhs, 
-                        OCIColl *lhs    );
-/*
-   NAME: OCICollAssign - OCIColl ASsiGn collection
-   PARAMETERS:
-        env (IN/OUT) - OCI environment handle initialized in object mode.
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        rhs (IN) - collection to be assigned from
-        lhs (OUT) - collection to be assigned to
-   DESCRIPTION:
-        Assign 'rhs' to 'lhs'. The 'lhs' collection may be decreased or 
-        increased depending upon the size of 'rhs'. If the 'lhs' contains 
-        any elements then the elements will be deleted prior to the 
-        assignment. This function performs a deep-copy. The memory for the 
-        elements comes from the object cache.
- 
-        An error is returned if the element types of the lhs and rhs 
-        collections do not match. Also, an error is returned if the 
-        upper-bound of the lhs collection is less than the current number of 
-        elements in the rhs collection.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
-        OCI_ERROR if
-          any of the input parameters is null
-          out of memory error
-          type mis-match of lhs and rhs collections
-          upper-bound of lhs collection is less than the current number of 
-          elements in the rhs collection
- */
-
-/*--------------------------- OCICollAppend ---------------------------------*/
-
-sword OCICollAppend(    OCIEnv *env, OCIError *err, CONST dvoid *elem, 
-                        CONST dvoid *elemind, OCIColl *coll    );
-/*
-   NAME: OCICollAppend - OCIColl APPend collection
-   PARAMETERS:
-        env (IN/OUT) - OCI environment handle initialized in object mode.
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        elem (IN) - pointer to the element which is appended to the end
-                of the given collection
-        elemind (IN) [optional] - pointer to the element's null indicator 
-                information; if (elemind == NULL) then the null indicator
-                information of the appended element will be set to non-null.
-        coll (IN/OUT) - updated collection
-   DESCRIPTION:
-        Append the given element to the end of the given collection. 
-        Appending an element is equivalent to:
-          - increasing the size of the collection by 1 element
-          - updating (deep-copying) the last element's data with the given 
-            element's data
-  
-        Note that the pointer to the given element 'elem' will not be saved 
-        by this function. So 'elem' is strictly an input parameter.
-        An error is returned if the current size of the collection
-        is equal to the max size (upper-bound) of the collection prior to 
-        appending the element.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
-        OCI_ERROR if
-          any of the input parameters is null
-          out of memory error
-          current size of collection == max size of the collection
- */
-
-/*----------------------------- OCICollTrim ---------------------------------*/
-
-sword OCICollTrim(    OCIEnv *env, OCIError *err, sb4 trim_num, 
-                      OCIColl *coll    );
-/*
-   NAME: OCICollTrim - OCIColl Trim elements from the end of the collection
-   PARAMETERS:
-        env (IN/OUT) - OCI environment handle initialized in object mode.
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        trim_num (IN) - number of elements to trim
-        coll (IN/OUT) - 'trim_num' of elements are removed (freed) from the
-                end of the collection
-   DESCRIPTION:
-        Trim the collection by the given number of elements. The elements are 
-        removed from the end of the collection.
-  
-        An error is returned if the 'trim_num' is greater than the current 
-        size of the collection.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
-        OCI_ERROR if
-          any of the input parameters is null
-          'trim_num' is greater than the current size of the collection.
- */
-
-/*--------------------------- OCICollIsLocator ------------------------------*/
-
-sword OCICollIsLocator(OCIEnv *env, OCIError *err, CONST OCIColl *coll,
-                       boolean *result );
-/*
-Name: OCICollIsLocator - OCIColl indicates whether a collection is locator
-                         based or not.
-Parameters:
-        env(IN) - pointer to OCI environment handle
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        coll (IN) - collection item.
-        result (OUT) - TRUE if the collection item is a locator, FALSE
-                       otherwise
-Description:
-        Returns TRUE in the result OUT parameter if the collection item is a
-        locator, otherwise returns FALSE.
-Returns:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
-*/
-
-/*---------------------------- OCIIterCreate --------------------------------*/
-
-sword OCIIterCreate(    OCIEnv *env, OCIError *err, CONST OCIColl *coll, 
-                        OCIIter **itr    );
-/*
-   NAME: OCIIterCreate - OCIColl Create an ITerator to scan the collection
-                      elements
-   PARAMETERS:
-        env (IN/OUT) - OCI environment handle initialized in object mode.
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        coll (IN) - collection which will be scanned; the different 
-                collection types are varray and nested table
-        itr (OUT) - address to the allocated collection iterator is
-                returned by this function
-   DESCRIPTION:
-        Create an iterator to scan the elements of the collection. The
-        iterator is created in the object cache. The iterator is initialized
-        to point to the beginning of the collection.
-  
-        If the next function (OCIIterNext) is called immediately 
-        after creating the iterator then the first element of the collection 
-        is returned. 
-        If the previous function (OCIIterPrev) is called immediately after 
-        creating the iterator then "at beginning of collection" error is 
-        returned.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
-        OCI_ERROR if
-          any of the input parameters is null
-          out of memory error
- */
-
-/*----------------------------- OCIIterDelete ------------------------------*/
-
-sword OCIIterDelete(    OCIEnv *env, OCIError *err, OCIIter **itr    );
-/*
-   NAME: OCIIterDelete - OCIColl Delete ITerator
-   PARAMETERS:
-        env (IN/OUT) - OCI environment handle initialized in object mode.
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        itr (IN/OUT) - the allocated collection iterator is destroyed and
-                the 'itr' is set to NULL prior to returning
-   DESCRIPTION:
-        Delete the iterator which was previously created by a call to 
-        OCIIterCreate.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
-        OCI_ERROR if
-          any of the input parameters is null
-          to be discovered
- */
-
-/*----------------------------- OCIIterInit ---------------------------------*/
-
-sword OCIIterInit(    OCIEnv *env, OCIError *err, CONST OCIColl *coll, 
-                      OCIIter *itr    );
-/*
-   NAME: OCIIterInit - OCIColl Initialize ITerator to scan the given 
-                   collection
-   PARAMETERS:
-        env (IN/OUT) - OCI environment handle initialized in object mode.
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        coll (IN) - collection which will be scanned; the different 
-                collection types are varray and nested table
-        itr (IN/OUT) - pointer to an allocated  collection iterator
-   DESCRIPTION:
-        Initializes the given iterator to point to the beginning of the 
-        given collection. This function can be used to:
-  
-        a. reset an iterator to point back to the beginning of the collection 
-        b. reuse an allocated iterator to scan a different collection
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
-        OCI_ERROR if
-          any of the input parameters is null
- */
-
-/*------------------------ OCIIterGetCurrent --------------------------------*/
-
-sword OCIIterGetCurrent(    OCIEnv *env, OCIError *err, CONST OCIIter *itr, 
-                            dvoid **elem, dvoid **elemind    );
-/*
-   NAME: OCIIterGetCurrent - OCIColl Iterator based, get CURrent collection
-                    element
-   PARAMETERS:
-        env (IN/OUT) - OCI environment handle initialized in object mode.
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        itr (IN) - iterator which points to the current element
-        elem (OUT) - address of the element pointed by the iterator is returned
-        elemind (OUT) [optional] - address of the element's null indicator 
-                information is returned; if (elemind == NULL) then the null 
-                indicator information will NOT be returned
-   DESCRIPTION:
-        Returns pointer to the current element and its corresponding null
-        information.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
-        OCI_ERROR if
-          any of the input parameters is null
- */
-
-/*------------------------------ OCIIterNext --------------------------------*/
-
-sword OCIIterNext(    OCIEnv *env, OCIError *err, OCIIter *itr, 
-                      dvoid **elem, dvoid **elemind, boolean *eoc    );
-/*
-   NAME: OCIIterNext - OCIColl Iterator based, get NeXT collection element
-   PARAMETERS:
-        env (IN/OUT) - OCI environment handle initialized in object mode.
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        itr (IN/OUT) - iterator is updated to point to the next element
-        elem (OUT) - after updating the iterator to point to the next element,
-                address of the element is returned
-        elemind (OUT) [optional] - address of the element's null indicator 
-                information is returned; if (elemind == NULL) then the null 
-                indicator information will NOT be returned
-        eoc (OUT) - TRUE if iterator is at End Of Collection (i.e. next
-                element does not exist) else FALSE
-   DESCRIPTION:
-        Returns pointer to the next element and its corresponding null
-        information. The iterator is updated to point to the next element.
-  
-        If the iterator is pointing to the last element of the collection
-        prior to executing this function, then calling this function will 
-        set eoc flag to TRUE. The iterator will be left unchanged in this
-        situation.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
-        OCI_ERROR if
-          any of the input parameters is null
- */
-
-/*------------------------------ OCIIterPrev --------------------------------*/
-
-sword OCIIterPrev(    OCIEnv *env, OCIError *err, OCIIter *itr, 
-                      dvoid **elem, dvoid **elemind, boolean *boc    );
-/*
-   NAME: OCIIterPrev - OCIColl Iterator based, get PReVious collection element
-   PARAMETERS:
-        env (IN/OUT) - OCI environment handle initialized in object mode.
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        itr (IN/OUT) - iterator is updated to point to the previous 
-                element
-        elem (OUT) - after updating the iterator to point to the previous 
-                element, address of the element is returned
-        elemind (OUT) [optional] - address of the element's null indicator 
-                information is returned; if (elemind == NULL) then the null 
-                indicator information will NOT be returned
-        boc (OUT) - TRUE if iterator is at Beginning Of Collection (i.e.
-                previous element does not exist) else FALSE.
-   DESCRIPTION:
-        Returns pointer to the previous element and its corresponding null
-        information. The iterator is updated to point to the previous element.
-  
-        If the iterator is pointing to the first element of the collection
-        prior to executing this function, then calling this function will 
-        set 'boc' to TRUE. The iterator will be left unchanged in this 
-        situation.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
-        OCI_ERROR if
-          any of the input parameters is null
- */
-
-/*****************************************************************************/
-/*           FUNCTIONS WHICH OPERATE ONLY ON NESTED TABLE OCITable*()        */
-/*****************************************************************************/
-
-/*---------------------------- OCITableSize ---------------------------------*/
-
-sword OCITableSize( OCIEnv *env, OCIError *err, CONST OCITable *tbl, 
-                    sb4 *size);
-/*
-   NAME: OCITableSize - OCITable return current SIZe of the given 
-                   nested table (not including deleted elements)
-   PARAMETERS:
-        env(IN) - pointer to OCI environment handle
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        tbl (IN) - nested table whose number of elements is returned
-        size (OUT) - current number of elements in the nested table. The count
-                does not include deleted elements.
-   DESCRIPTION:
-        Returns the count of elements in the given nested table. 
-
-        The count returned by OCITableSize() will be decremented upon 
-        deleting elements from the nested table. So, this count DOES NOT 
-        includes any "holes" created by deleting elements. 
-        For example:
-
-            OCITableSize(...); 
-            // assume 'size' returned is equal to 5
-            OCITableDelete(...); // delete one element
-            OCITableSize(...);
-            // 'size' returned will be equal to 4
-
-        To get the count plus the count of deleted elements use 
-        OCICollSize(). Continuing the above example,
-
-            OCICollSize(...)
-            // 'size' returned will still be equal to 5
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
-        OCI_ERROR if
-          error during loading of nested table into object cache
-          any of the input parameters is null
- */
-
-/*---------------------- OCITableExists ---------------------------------*/
-
-sword OCITableExists(    OCIEnv *env, OCIError *err, CONST OCITable *tbl,
-                             sb4 index, boolean *exists    );
-/*
-   NAME: OCITableExists - OCITable test whether element at the given index
-                    EXIsts
-   PARAMETERS:
-        env (IN/OUT) - OCI environment handle initialized in object mode.
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        tbl (IN) - table in which the given index is checked
-        index (IN) - index of the element which is checked for existence
-        exists (OUT) - set to TRUE if element at given 'index' exists
-                else set to FALSE
-   DESCRIPTION:
-        Test whether an element exists at the given 'index'.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
-        OCI_ERROR if
-          any of the input parameters is null
- */
-
-/*--------------------------- OCITableDelete -------------------------------*/
-
-sword OCITableDelete(    OCIEnv *env, OCIError *err, sb4 index, 
-                      OCITable *tbl    );
-/*
-   NAME: OCITableDelete - OCITable DELete element at the specified index
-   PARAMETERS:
-        env (IN/OUT) - OCI environment handle initialized in object mode.
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        index (IN) - index of the element which must be deleted
-        tbl (IN) - table whose element is deleted
-   DESCRIPTION:
-        Delete the element at the given 'index'. Note that the position
-        ordinals of the remaining elements of the table is not changed by the
-        delete operation. So delete creates "holes" in the table.
-
-        An error is returned if the element at the specified 'index' has
-        been previously deleted.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
-        OCI_ERROR if
-          any of the input parameters is null
-          given index is not valid
- */
-
-/*--------------------------- OCITableFirst ---------------------------------*/
-
-sword OCITableFirst(    OCIEnv *env, OCIError *err, CONST OCITable *tbl, 
-                        sb4 *index     );
-/*
-   NAME: OCITableFirst - OCITable return FirST index of table
-   PARAMETERS:
-        env (IN/OUT) - OCI environment handle initialized in object mode.
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        tbl (IN) - table which is scanned
-        index (OUT) - first index of the element which exists in the given 
-                table is returned
-   DESCRIPTION:
-        Return the first index of the element which exists in the given 
-        table. 
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
-        OCI_ERROR if
-          table is empty
- */
-
-/*---------------------------- OCITableLast ---------------------------------*/
-
-sword OCITableLast(    OCIEnv *env, OCIError *err, CONST OCITable *tbl, 
-                       sb4 *index     );
-/*
-   NAME: OCITableFirst - OCITable return LaST index of table
-   PARAMETERS:
-        env (IN/OUT) - OCI environment handle initialized in object mode.
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        tbl (IN) - table which is scanned
-        index (OUT) - last index of the element which exists in the given 
-                table is returned
-   DESCRIPTION:
-        Return the last index of the element which exists in the given 
-        table. 
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
-        OCI_ERROR if
-          table is empty
- */
-
-/*---------------------------- OCITableNext ---------------------------------*/
-
-sword OCITableNext(    OCIEnv *env, OCIError *err, sb4 index, 
-                       CONST OCITable *tbl, sb4 *next_index,
-                       boolean *exists    );
-/*
-   NAME: OCITableNext - OCITable return NeXT available index of table
-   PARAMETERS:
-        env (IN/OUT) - OCI environment handle initialized in object mode.
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        index (IN) - starting at 'index' the index of the next element
-                which exists is returned
-        tbl (IN) - table which is scanned
-        next_index (OUT) - index of the next element which exists 
-                is returned
-        exists (OUT) - FALSE if no next index available else TRUE
-   DESCRIPTION:
-        Return the smallest position j, greater than 'index', such that 
-        exists(j) is TRUE.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
-        OCI_ERROR if
-          no next index available
- */
-
-/*---------------------------- OCITablePrev ---------------------------------*/
-
-sword OCITablePrev(    OCIEnv *env, OCIError *err, sb4 index, 
-                       CONST OCITable *tbl, sb4 *prev_index,
-                       boolean *exists    );
-/*
-   NAME: OCITablePrev - OCITable return PReVious available index of table
-   PARAMETERS:
-        env (IN/OUT) - OCI environment handle initialized in object mode.
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        index (IN) - starting at 'index' the index of the previous element
-                which exists is returned
-        tbl (IN) - table which is scanned
-        prev_index (OUT) - index of the previous element which exists 
-                is returned
-        exists (OUT) - FALSE if no next index available else TRUE
-   DESCRIPTION:
-        Return the largest position j, less than 'index', such that 
-        exists(j) is TRUE.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is NULL.
-        OCI_ERROR if
-          no previous index available
- */
-
-/*------------------------ OCINumberToLnx -----------------------------------*/
-/* void OCINumberToLnx(/o_ OCINumber *num _o/); */
-
-#define OCINumberToLnx(num) ((lnxnum_t *)num)
-
-/* 
-   NAME:   OCINumberToLnx
-   PARAMETERS:
-           num (IN) - OCINumber to convert ;
-   DESCRIPTION: 
-           Converts OCINumber to its internal lnx format 
-           This is not to be used in Public interfaces , but
-           has been provided due to special requirements from 
-           SQLPLUS development group as they require to call 
-           Core funtions directly . 
-*/
-
-/* OCI representation of XMLType */
-typedef struct OCIXMLType OCIXMLType;
-
-/* OCI representation of OCIDomDocument */
-typedef struct OCIDOMDocument OCIDOMDocument;
-
-#endif /* ORL_ORACLE */
diff --git a/src/terralib/drivers/OracleSpatial/OCI/include/oro.h b/src/terralib/drivers/OracleSpatial/OCI/include/oro.h
deleted file mode 100644
index e825a5c..0000000
--- a/src/terralib/drivers/OracleSpatial/OCI/include/oro.h
+++ /dev/null
@@ -1,883 +0,0 @@
-/* Copyright (c) 1994, 2003, Oracle Corporation.  All rights reserved.  */
-
-/*
-  NAME
-    OCI - Oracle Object Interface for External/Internal/Kernel Clients
-
-  DESCRIPTION
-    This header file contains Oracle object interface definitions which
-    can be included by external user applications, tools, as well as
-    the kernel.  It defines types and constants that are common to all
-    object interface which is being defined in several other header files
-    (e.g., ori.h, ort.h, and orl.h).
-
-  RELATED DOCUMENTS
-    TBD
-
-  INSPECTION STATUS [[ deletable if no inspection ]]
-    Inspection date:    [[ date of the last logging meeting ]]
-    Inspection status:  [[ exited, not exited, or N/A if exit is not a goal ]]
-    Estimated increasing cost defects per page:
-    Rule sets:          [[ rule sets inspected against or planned to be 
-                           inspected against ]]
-
-  ACCEPTANCE REVIEW STATUS [[ deletable if no approval review ]]
-    Review date:    [[ date of the meeting where issues were logged and the 
-                       approval status was decided ]] 
-    Review status:  [[ current status:  accepted, conditionally accepted, 
-                       major revision required, rejected ]]
-    Reviewers:      [[ names of the members on the review team ]]
-
-  PUBLIC FUNCTIONS
-
-  EXAMPLES
-    Examples are given in the description of each function or macro where
-    relevant.
-
-  MODIFIED
-    mnanal     06/09/03 - backout of fix 2836388
-    mnanal     05/14/03 - bug-2836388
-    srseshad   11/27/02 - Change OCI_TYPECODE_BFLOAT/BDOUBLE codes
-    rxgovind   10/09/02 - add OCI_TYPECODE_UROWID
-    mxyang     09/17/02 - grabtrans 'mmorsi_obj_float'
-    srseshad   09/11/02 - 
-    srseshad   09/01/02 - 
-    aahluwal   06/03/02 - bug 2360115
-    celsbern   10/19/01 - merge LOG to MAIN
-    rxgovind   10/16/01 - update typecodes
-    rxgovind   09/19/01 - add typecodes
-    rkasamse   08/15/01 - add OCI_DURATION_USER_CALLBACK
-    jchai      09/24/01 - add type code for PLS_INTEGER
-    porangas   08/22/01 - Fix bug#1776434
-    schatter   04/09/01 - merge 1456235: define OCI_DURATION_INVALID
-    rdani      10/12/00 - 1449943 NOCOPY and PIPELINE
-    ciyer      05/26/00 - short names for abstract, overriding
-    rkasamse   05/25/00 - OCCI enhancements
-    smuralid   05/11/00 - OCITypeMethodFlags - add NOT INSTANTIABLE, OVERRIDING
-    rxgovind   05/09/00 - add OCI_TYPECODE_NONE
-    tnbui      07/28/99 - Remove OCI_TYPECODE_TIMESTAMP_ITZ                    
-    tnbui      07/21/99 - TS LOCAL TZ                                          
-    thoang     06/21/99 - Add OCI_TYPECODE_TIMESTAMP_ITZ
-    thoang     03/04/99 - Add datetime datatypes
-    rkasamse   10/20/98 - add OCI_ATTR_CACHE_ARRAYFLUSH
-    rkasamse   10/29/98 - add OCI_DURATION_CALLOUT
-    rkasamse   04/28/98 - OCI_OBJECT_DETECTCHANGE -> OCI_ATTR_OBJECT_DETECTCHAN
-    rkasamse   04/28/98 - OCI_OBJECT_NEWNOTNULL -> OCI_ATTR_OBJECT_NEWNOTNULL  
-    rkasamse   04/23/98 - add OCI_OBJECT_DETECTCHANGE
-    rkasamse   04/03/98 - add OCI_OBJECT_NEWNOTNULL                            
-    pmitra     04/01/98 - OCI_LOCK_X_NOWAIT added                              
-    rxgovind   02/18/98 - add OCI_TYPECODE_OPAQUE
-    rkasamse   02/13/98 - Add OCI_DURATION_PROCESS
-    cxcheng    07/28/97 - fix compile with SLSHORTNAME
-    skrishna   07/14/97 - add OCIObjectGetProperty
-    cxcheng    04/30/97 - make OCITypeParamMode values consistent with PL/SQL
-    skrishna   04/28/97 - undocument OCIObjectProperty & OCIObjectEvent
-    cxcheng    03/29/97 - remove all remaining short names
-    sthakur    03/20/97 - add casts to constants
-    cxcheng    02/21/97 - temporarily put SLSHORTNAME for PL/SQL
-    cxcheng    02/06/97 - take out short name support except with SLSHORTNAME
-    lchidamb   01/20/97 - update OCIRef comments
-    sgollapu   11/19/96 - Add OCI type codes for BOOL,REC,and TAB
-    cxcheng    11/19/96 - more typecode changes
-    cxcheng    11/13/96 - add #include for ocidfn.h
-    cxcheng    11/13/96 - add OCI_TYPECODE_ADT for compatibility
-    cxcheng    11/12/96 - add SQLT_NCO for named collection
-    cxcheng    11/11/96 - more changes to typecodes
-    cxcheng    11/07/96 - #define OCI_TYPECODE_MLSLABEL to SQLT_LAB
-    cxcheng    11/06/96 - fix #define omission for OROTCNAT
-    cxcheng    10/30/96 - move OCI_TYPECODE_* to ocidfn.h as SQLT_*
-    cxcheng    10/28/96 - more beautification changes
-    jboonleu   10/29/96 - add flags for freeing object
-    dchatter   10/26/96 - delete redef of OCISvcCtx, OCIError, OCIEnv
-    cxcheng    10/15/96 - more changes
-    cxcheng    10/14/96 - more final fixes to constants
-    mluong     10/11/96 -
-    mluong     10/11/96 -  KOCON and KONSP are in lowercase
-    mluong     10/11/96 -  add some define per Calvin
-    cxcheng    10/09/96 -  add #define for OROOCOSFN to OCI_COPY_NOREF
-    jboonleu   10/08/96 -  change OROOCOSFN to OCICopyFlag
-    jboonleu   10/07/96 -  use new OCI names for cache options
-    cxcheng    10/07/96 -  add OROTCS02 for KOTTCBRI and OROTCS03 as spare
-    cxcheng    10/07/96 -  more lint fixes
-    cxcheng    10/02/96 -  move oronsp to ko.h as konsp
-    cxcheng    10/01/96 -  add long names for readability
-    cxcheng    10/01/96 -  remove orotty and orotal
-    rjenkins   09/28/96 -  2k char 4k varchar2
-    jboonleu   09/27/96 -  add macro used only in beta2
-    cxcheng    09/27/96 -  move oroenv to oroenv.h
-    cxcheng    09/24/96 -  remove unnecessary orotyp
-    cxcheng    09/25/96 -  add typecode OROTCS01 as placeholder for lob pointer
-    cxcheng    09/20/96 -  add TDO load option orotgo
-    jboonleu   09/18/96 -  add OROOPOREC
-    jboonleu   09/10/96 -  add OROOPODFL
-    jweisz     08/27/96 -  add SQL internal typecode OROTCS00
-    cxcheng    08/02/96 -  add PLSQL internal typecodes OROTCP..
-    cxcheng    08/01/96 -  add OROTCFAR to fill up space left by OROTCCAR
-    jboonleu   07/16/96 -  new pin option
-    cxcheng    06/18/96 -  add casts to OROTNOPRE and OROTNOSCL
-    cxcheng    05/29/96 -  change OROTCNPT back to OROTCDOM
-    vkrishna   05/27/96 -  add OROTCCAR
-    cxcheng    05/17/96 -  replace OROTCFAR with OROTCCAR
-    cxcheng    05/08/96 -  change orotmf from ub1 to ub2
-    cxcheng    05/07/96 -  fix public defines for method types
-    cxcheng    04/30/96 -  change OROTCDOM to OROTCNPT
-    cxcheng    04/15/96 -  remove obsolete OROTTYICT
-    jboonleu   04/12/96 -  add new pin option
-    sthakur    04/12/96 -  add indicator type and indicator status
-    cxcheng    04/10/96 -  add function parameter codes for ORT/KOT
-    cxcheng    04/03/96 -  replace OROTCFAR as OROTCCAR
-    jwijaya    03/29/96 -  add OROTTCCAR
-    jwijaya    03/27/96 -  better comments for orotc
-    cxcheng    02/23/96 -  add typecodes for SMALLINT and VARCHAR2
-    skrishna   02/22/96 -  add oroind - null indicator type
-    cxcheng    02/21/96 -  change lob character codes to OROTCCLB, OROTCBLB...
-    jboonleu   02/06/96 -  new value for predefined duration
-    cxcheng    01/12/96 -  add OROTCCLO, OROTCBLO, OROTCFIL to orotc
-    cxcheng    12/05/95 -  add OROTCDOM and OROTCAAT to orotc
-    skotsovo   10/30/95 -  reserve space for internal 'oid' type
-    jwijaya    10/20/95 -  support variable-length ref
-    cxcheng    10/03/95 -  add OROTMFOR for ordering function to orotmf
-    cxcheng    10/03/95 -  Adding the ordering function type to orotmf
-    jboonleu   09/28/95 -  set OROODTPRE 
-    jboonleu   09/25/95 -  add oroodt
-    skotsovo   03/10/95 -  update to only include release 1 
-    jboonleu   02/15/95 -  add OROOPOREC, remove orocro, oroolo
-    skotsovo   01/30/95 -  add default max lengths for varrays and vstrings 
-    skotsovo   01/24/95 -  categorize sint32, double, and real as number types 
-                           (with precision and scale) instead of scalar types.
-    skotsovo   12/20/94 -  add release 1 types 
-    skotsovo   12/12/94 -  update according to new ots doc
-    skotsovo   12/01/94 -  add default precision and scale 
-    jwijaya    11/15/94 -  rename ORONSPTAB to ORONSPEXT 
-    jwijaya    10/25/94 -  tint 
-    jwijaya    10/06/94 -  add namespace 
-    jwijaya    10/02/94 -  connection handle -> connection number 
-    skotsovo   09/12/94 -  keep 0 as uninitialized value for ORT consts 
-    skotsovo   08/24/94 -  fix orotec 
-    skotsovo   08/17/94 -  modify type code names 
-    skotsovo   08/12/94 -  fix 141 lint errors 
-    skotsovo   07/25/94 -  modify categorization of complex types (orotc) 
-    skotsovo   07/07/94 -  change typecode enum values & add decimal type
-    skotsovo   07/01/94 -  change order of typecodes 
-    jwijaya    06/15/94 -  review 
-    jboonleu   06/13/94 -  add comments for the object cache options
-    jwijaya    06/13/94 -  adhere to the header file template 
-    skotsovo   06/09/94 -  make ots scalar type names consistent with the ots 
-                           document 
-    jwijaya    06/07/94 -  include oratypes.h instead of s.h 
-    skotsovo   05/24/94 -  change typecodes 
-    jwijaya    05/23/94 -  fix comments of ororef 
-    skotsovo   05/19/94 -  remove type composition 
-    skotsovo   05/09/94 -  modified orotc according to new OTS document
-    jwijaya    05/03/94 -  oroid and ororef
-    jwijaya    01/26/94 -  Creation
-*/
-
-
-#ifndef ORATYPES
-#include <oratypes.h>
-#endif
-
-#ifndef OCIDFN_ORACLE
-#include <ocidfn.h>
-#endif
-
-#ifndef ORO_ORACLE
-#define ORO_ORACLE
-
-/*---------------------------------------------------------------------------*/
-/*                         SHORT NAMES SUPPORT SECTION                       */
-/*---------------------------------------------------------------------------*/
-
-#ifdef SLSHORTNAME
-
-/* the following are short names that are only supported on IBM mainframes
-   with the SLSHORTNAME defined.
-   With this all subsequent long names will actually be substituted with
-   the short names here */
-
-#define OCIDuration                     oroodt
-#define OCIInd                          oroind
-#define OCILockOpt                      oroolm
-#define OCIMarkOpt                      oroomo
-#define OCIObjectEvent                  orocev
-#define OCIObjectProperty               oroopr
-#define OCIPinOpt                       oroopo
-#define OCIRef                          ororef
-#define OCIRefreshOpt                   orooro
-#define OCITypeCode                     orotc
-#define OCITypeEncap                    orotec
-#define OCITypeGetOpt                   orotgo
-#define OCITypeMethodFlag               orotmf
-#define OCITypeParamMode                orotpm
-#define OCIObjectPropId                 oroopi
-#define OCIObjectLifetime               oroolft
-#define OCIObjectMarkstatus             oroomst
-#define OCI_LOCK_NONE                   OROOLMNUL
-#define OCI_LOCK_X                      OROOLMX
-#define OCI_LOCK_X_NOWAIT               OROOLMXNW
-#define OCI_MARK_DEFAULT                OROOMODFL
-#define OCI_MARK_NONE                   OROOMONON
-#define OCI_MARK_UPDATE                 OROOMOUPD
-#define OCI_OBJECTEVENT_AFTER_FLUSH     OROCEVAFL
-#define OCI_OBJECTEVENT_AFTER_REFRESH   OROCEVARF
-#define OCI_OBJECTEVENT_BEFORE_FLUSH    OROCEVBFL
-#define OCI_OBJECTEVENT_BEFORE_REFRESH  OROCEVBRF
-#define OCI_OBJECTEVENT_WHEN_LOCK       OROCEVWLK
-#define OCI_OBJECTEVENT_WHEN_MARK_DELETED OROCEVWDL
-#define OCI_OBJECTEVENT_WHEN_MARK_UPDATED OROCEVWUP
-#define OCI_OBJECTEVENT_WHEN_UNMARK     OROCEVWUM
-#define OCI_OBJECTPROP_DIRTIED          OROOPRDRT
-#define OCI_OBJECTPROP_LOADED           OROOPRLOD
-#define OCI_OBJECTPROP_LOCKED           OROOPRLCK
-#define OCI_PIN_ANY                     OROOPOANY
-#define OCI_PIN_DEFAULT                 OROOPODFL
-#define OCI_PIN_LATEST                  OROOPOLST
-#define OCI_PIN_RECENT                  OROOPOREC
-#define OCI_REFRESH_LOADED              OROOROLOD
-#define OCI_TYPEENCAP_PRIVATE           OROTECPVT
-#define OCI_TYPEENCAP_PUBLIC            OROTECPUB
-#define OCI_TYPEGET_ALL                 OROTGOALL
-#define OCI_TYPEGET_HEADER              OROTGOHDR
-#define OCI_TYPEMETHOD_CONSTANT         OROTMCON
-#define OCI_TYPEMETHOD_CONSTRUCTOR      OROTMCSTR
-#define OCI_TYPEMETHOD_DESTRUCTOR       OROTMDSTR
-#define OCI_TYPEMETHOD_INLINE           OROTMINL
-#define OCI_TYPEMETHOD_MAP              OROTMMAP
-#define OCI_TYPEMETHOD_OPERATOR         OROTMOP
-#define OCI_TYPEMETHOD_ORDER            OROTMOR
-#define OCI_TYPEMETHOD_RNDS             OROTMRDS
-#define OCI_TYPEMETHOD_RNPS             OROTMRPS
-#define OCI_TYPEMETHOD_SELFISH          OROTMSLF
-#define OCI_TYPEMETHOD_VIRTUAL          OROTMVRT
-#define OCI_TYPEMETHOD_WNDS             OROTMWDS
-#define OCI_TYPEMETHOD_WNPS             OROTMWPS
-#define OCI_TYPEMETHOD_ABSTRACT         OROTMABSTRACT
-#define OCI_TYPEMETHOD_OVERRIDING       OROTMOVERRIDING
-#define OCI_TYPEMETHOD_PIPELINED        OROTMPIPELINED
-#define OCI_TYPEPARAM_BYREF             OROTPMREF
-#define OCI_TYPEPARAM_IN                OROTPMIN
-#define OCI_TYPEPARAM_INOUT             OROTPMIO
-#define OCI_TYPEPARAM_OUT               OROTPMOUT
-#define OCI_TYPEPARAM_OUTNCPY           OROTPMOUTNCPY
-#define OCI_TYPEPARAM_INOUTNCPY         OROTPMIONCPY
-
-#endif                                                        /* SLSHORTNAME */
-
-
-/*---------------------------------------------------------------------------*/
-/*                    PUBLIC TYPES, CONSTANTS AND MACROS                     */
-/*---------------------------------------------------------------------------*/
-
-/*---------------------------------------------------------------------------*/
-/*                  GENERAL OBJECT TYPES, CONSTANTS, MACROS                  */
-/*---------------------------------------------------------------------------*/
-
-/*------------------------- OBJECT REFERENCE (REF) --------------------------*/
-
-typedef struct OCIRef OCIRef;
-/*
- * OCIRef - OCI object REFerence
- *
- * In the Oracle object runtime environment, an object is identified by an 
- * object reference (ref) which contains the object identifier plus other 
- * runtime information.  The contents of a ref is opaque to clients.  Use
- * OCIObjectNew() to construct a ref.
- */
-
-
-/*--------------------------- OBJECT INDICATOR ------------------------------*/
-
-typedef sb2 OCIInd;
-/*
- * OCIInd -- a variable of this type contains (null) indicator information
- */
-
-#define OCI_IND_NOTNULL (OCIInd)0                                /* not NULL */
-#define OCI_IND_NULL (OCIInd)(-1)                                    /* NULL */
-#define OCI_IND_BADNULL (OCIInd)(-2)                             /* BAD NULL */
-#define OCI_IND_NOTNULLABLE (OCIInd)(-3)                     /* not NULLable */
-
-/*---------------------------------------------------------------------------*/
-/*                               OBJECT CACHE                                */
-/*---------------------------------------------------------------------------*/
-
-/* To enable object change detection mode, set this to TRUE */
-#define OCI_ATTR_OBJECT_DETECTCHANGE            0x00000020
-
-/* To enable object creation with  non-NULL attributes by default, set the
-   following to TRUE.
-   By default, object is created with NULL attributes
-*/
-#define OCI_ATTR_OBJECT_NEWNOTNULL   0x00000010
-
-/* To enable sorting of the objects that belong to the same table
-   before being flushed through OCICacheFlush.
-   Please note that by enabling this object cache will not be flushing
-   the objects in the same order they were dirtied */
-#define OCI_ATTR_CACHE_ARRAYFLUSH 0x00000040
-
-/*--------------------------- OBJECT PIN OPTION -----------------------------*/
-
-enum OCIPinOpt
-{
-  /* 0 = uninitialized */
-  OCI_PIN_DEFAULT = 1,                                 /* default pin option */
-  OCI_PIN_ANY = 3,                          /* pin any copy of the object */
-  OCI_PIN_RECENT = 4,                    /* pin recent copy of the object */
-  OCI_PIN_LATEST = 5                     /* pin latest copy of the object */
-};
-typedef enum OCIPinOpt OCIPinOpt;
-
-/*
- * OCIPinOpt - OCI object Pin Option 
- *
- * In the Oracle object runtime environment, the program has the option to
- * specify which copy of the object to pin.  
- *
- * OCI_PINOPT_DEFAULT pins an object using the default pin option.  The default
- * pin option can be set as an attribute of the OCI environment handle 
- * (OCI_ATTR_PINTOPTION).  The value of the default pin option can be
- * OCI_PINOPT_ANY, OCI_PINOPT_RECENT, or OCI_PIN_LATEST. The default option
- * is initialized to OCI_PINOPT_ANY.
- *
- * OCI_PIN_ANY pins any copy of the object.  The object is pinned 
- * using the following criteria:
- *   If the object copy is not loaded, load it from the persistent store.
- *   Otherwise, the loaded object copy is returned to the program. 
- * 
- * OCI_PIN_RECENT pins the latest copy of an object.  The object is 
- * pinned using the following criteria:
- *   If the object is not loaded, load the object from the persistent store
- *       from the latest version.
- *   If the object is not loaded in the current transaction and it is not 
- *       dirtied, the object is refreshed from the latest version.
- *   Otherwise, the loaded object copy is returned to the program. 
- *
- * OCI_PINOPT_LATEST pins the latest copy of an object.  The object copy is 
- * pinned using the following criteria:
- *   If the object copy is not loaded, load it from the persistent store.
- *   If the object copy is loaded and dirtied, it is returned to the program.
- *   Otherwise, the loaded object copy is refreshed from the persistent store.
- */
-
-
-
-/*--------------------------- OBJECT LOCK OPTION ----------------------------*/
-
-enum OCILockOpt
-{
-  /* 0 = uninitialized */
-  OCI_LOCK_NONE = 1,                               /* null (same as no lock) */
-  OCI_LOCK_X = 2,                                          /* exclusive lock */
-  OCI_LOCK_X_NOWAIT = 3                      /* exclusive lock, do not wait  */
-};
-typedef enum OCILockOpt OCILockOpt;
-/*
- * OCILockOpt - OCI object LOCK Option 
- *
- * This option is used to specify the locking preferences when an object is
- * loaded from the server.
- */
-
-
-/*------------------------- OBJECT MODIFYING OPTION -------------------------*/
-
-enum OCIMarkOpt
-{
-  /* 0 = uninitialized */
-  OCI_MARK_DEFAULT = 1,        /* default (the same as OCI_MARK_NONE) */
-  OCI_MARK_NONE = OCI_MARK_DEFAULT,   /* object has not been modified */
-  OCI_MARK_UPDATE                               /* object is to be updated */
-};
-typedef enum OCIMarkOpt OCIMarkOpt;
-/*
- * OCIMarkOpt - OCI object Mark option
- *
- * When the object is marked updated, the client has to specify how the
- * object is intended to be changed.  
- */
-
-/*-------------------------- OBJECT Duration --------------------------------*/
- 
-typedef ub2 OCIDuration;
-
-#define  OCI_DURATION_INVALID 0xFFFF                     /* Invalid duration */
-#define  OCI_DURATION_BEGIN (OCIDuration)10
-                                           /* beginning sequence of duration */
-#define  OCI_DURATION_NULL (OCIDuration)(OCI_DURATION_BEGIN-1)
-                                                            /* null duration */
-#define  OCI_DURATION_DEFAULT (OCIDuration)(OCI_DURATION_BEGIN-2) /* default */
-#define  OCI_DURATION_USER_CALLBACK (OCIDuration)(OCI_DURATION_BEGIN-3)
-#define  OCI_DURATION_NEXT (OCIDuration)(OCI_DURATION_BEGIN-4)
-                                                    /* next special duration */
-#define  OCI_DURATION_SESSION (OCIDuration)(OCI_DURATION_BEGIN)
-                                                  /* the end of user session */
-#define  OCI_DURATION_TRANS (OCIDuration)(OCI_DURATION_BEGIN+1)
-                                              /* the end of user transaction */
-/******************************************************************************
-**  DO NOT USE OCI_DURATION_CALL. IT  IS UNSUPPORTED                         **
-**  WILL BE REMOVED/CHANGED IN A FUTURE RELEASE                              **
-******************************************************************************/
-#define  OCI_DURATION_CALL (OCIDuration)(OCI_DURATION_BEGIN+2)
-                                       /* the end of user client/server call */
-#define  OCI_DURATION_STATEMENT (OCIDuration)(OCI_DURATION_BEGIN+3)
-
-/* This is to be used only during callouts.  It is similar to that 
-of OCI_DURATION_CALL, but lasts only for the duration of a callout.
-Its heap is from PGA */
-#define  OCI_DURATION_CALLOUT (OCIDuration)(OCI_DURATION_BEGIN+4)
-
-#define  OCI_DURATION_LAST OCI_DURATION_CALLOUT 
-                                             /* last of predefined durations */
-
-/* This is not being treated as other predefined durations such as 
-   SESSION, CALL etc, because this would not have an entry in the duration
-   table and its functionality is primitive such that only allocate, free,
-   resize memory are allowed, but one cannot create subduration out of this
-*/ 
-#define  OCI_DURATION_PROCESS (OCIDuration)(OCI_DURATION_BEGIN-5) 
- 
-/*
- * OCIDuration - OCI object duration
- *
- * A client can specify the duration of which an object is pinned (pin
- * duration) and the duration of which the object is in memory (allocation
- * duration).  If the objects are still pinned at the end of the pin duration,
- * the object cache manager will automatically unpin the objects for the
- * client. If the objects still exist at the end of the allocation duration,
- * the object cache manager will automatically free the objects for the client.
- *
- * Objects that are pinned with the option OCI_DURATION_TRANS will get unpinned
- * automatically at the end of the current transaction.
- *
- * Objects that are pinned with the option OCI_DURATION_SESSION will get
- * unpinned automatically at the end of the current session (connection).
- *
- * The option OCI_DURATION_NULL is used when the client does not want to set
- * the pin duration.  If the object is already loaded into the cache, then the
- * pin duration will remain the same.  If the object is not yet loaded, the
- * pin duration of the object will be set to OCI_DURATION_DEFAULT.
- */
-
-/*----------------------------- OBJECT PROPERTY -----------------------------*/
- 
-/******************************************************************************
-**  DO NOT USE OCIObjectProperty. IT IS UNSUPPORTED                          **
-**  WILL BE REMOVED/CHANGED IN A FUTURE RELEASE                              **
-******************************************************************************/
-enum OCIObjectProperty
-{
-  /* 0 = uninitialized */
-  OCI_OBJECTPROP_DIRTIED = 1,                               /* dirty objects */
-  OCI_OBJECTPROP_LOADED,                /* objects loaded in the transaction */
-  OCI_OBJECTPROP_LOCKED                                    /* locked objects */
-};
-typedef enum OCIObjectProperty OCIObjectProperty;
-/*
- * OCIObjectProperty -- OCI Object Property
- * This specifies the properties of objects in the object cache.
- */
-
-/*------------------------- CACHE REFRESH OPTION ---------------------------*/
-
-enum OCIRefreshOpt
-{
-  /* 0 = uninitialized */
-  OCI_REFRESH_LOADED = 1        /* refresh objects loaded in the transaction */
-};
-typedef enum OCIRefreshOpt OCIRefreshOpt; 
-/*
- * OCIRefreshOpt - OCI cache Refresh Option
- * This option is used to specify the set of objects to be refreshed. 
- *
- * OCI_REFRESH_LOAD refreshes the objects that are loaded in the current  
- * transaction. 
- */
-
-/*-------------------------------- OBJECT EVENT -----------------------------*/
-
-/******************************************************************************
-**  DO NOT USE OCIObjectEvent. IT IS UNSUPPORTED                             **
-**  WILL BE REMOVED/CHANGED IN A FUTURE RELEASE                              **
-******************************************************************************/
-enum OCIObjectEvent
-{
-   /* 0 = uninitialized */
-   OCI_OBJECTEVENT_BEFORE_FLUSH = 1,            /* before flushing the cache */
-   OCI_OBJECTEVENT_AFTER_FLUSH,                  /* after flushing the cache */
-   OCI_OBJECTEVENT_BEFORE_REFRESH,            /* before refreshing the cache */
-   OCI_OBJECTEVENT_AFTER_REFRESH,              /* after refreshing the cache */
-   OCI_OBJECTEVENT_WHEN_MARK_UPDATED,    /* when an object is marked updated */
-   OCI_OBJECTEVENT_WHEN_MARK_DELETED,    /* when an object is marked deleted */
-   OCI_OBJECTEVENT_WHEN_UNMARK,          /* when an object is being unmarked */
-   OCI_OBJECTEVENT_WHEN_LOCK               /* when an object is being locked */
-};
-typedef enum OCIObjectEvent OCIObjectEvent;
-/*
- * OCIObjectEvent -- OCI Object Event 
- * This specifies the kind of event that is supported by the object
- * cache.  The program can register a callback that is invoked when the  
- * specified event occurs.
- */
-
-/*----------------------------- OBJECT COPY OPTION --------------------------*/
-#define OCI_OBJECTCOPY_NOREF (ub1)0x01 
-/*
- * OCIObjectCopyFlag - Object copy flag
- *
- * If OCI_OBJECTCOPY_NOREF is specified when copying an instance, the 
- * reference and lob will not be copied to the target instance.
- */
-
-/*----------------------------- OBJECT FREE OPTION --------------------------*/
-#define OCI_OBJECTFREE_FORCE      (ub2)0x0001
-#define OCI_OBJECTFREE_NONULL     (ub2)0x0002
-#define OCI_OBJECTFREE_HEADER     (ub2)0x0004
-/*
- * OCIObjectFreeFlag - Object free flag
- *
- * If OCI_OBJECTCOPY_FORCE is specified when freeing an instance, the instance
- * is freed regardless it is pinned or diritied.
- * If OCI_OBJECTCOPY_NONULL is specified when freeing an instance, the null 
- * structure is not freed.
- */
-
-/*----------------------- OBJECT PROPERTY ID -------------------------------*/
-
-typedef ub1 OCIObjectPropId;
-#define OCI_OBJECTPROP_LIFETIME 1       /* persistent or transient or value */
-#define OCI_OBJECTPROP_SCHEMA 2   /* schema name of table containing object */
-#define OCI_OBJECTPROP_TABLE 3     /* table name of table containing object */
-#define OCI_OBJECTPROP_PIN_DURATION 4             /* pin duartion of object */
-#define OCI_OBJECTPROP_ALLOC_DURATION 5         /* alloc duartion of object */
-#define OCI_OBJECTPROP_LOCK 6                      /* lock status of object */
-#define OCI_OBJECTPROP_MARKSTATUS 7                /* mark status of object */
-#define OCI_OBJECTPROP_VIEW 8            /* is object a view object or not? */
-
-/*
- * OCIObjectPropId - OCI Object Property Id
- * Identifies the different properties of objects.
- */
-
-/*----------------------- OBJECT LIFETIME ----------------------------------*/
-
-enum OCIObjectLifetime
-{
-   /* 0 = uninitialized */
-   OCI_OBJECT_PERSISTENT = 1,                          /* persistent object */
-   OCI_OBJECT_TRANSIENT,                                /* transient object */
-   OCI_OBJECT_VALUE                                         /* value object */
-};
-typedef enum OCIObjectLifetime OCIObjectLifetime;
-/*
- * OCIObjectLifetime - OCI Object Lifetime
- * Classifies objects depending upon the lifetime and referenceability 
- * of the object.
- */
-
-/*----------------------- OBJECT MARK STATUS -------------------------------*/
-
-typedef uword OCIObjectMarkStatus;
-#define OCI_OBJECT_NEW     0x0001                             /* new object */
-#define OCI_OBJECT_DELETED 0x0002                  /* object marked deleted */
-#define OCI_OBJECT_UPDATED 0x0004                  /* object marked updated */
-/*
- * OCIObjectMarkStatus - OCI Object Mark Status
- * Status of the object - new or updated or deleted
- */
-
-/* macros to test the object mark status */ 
-#define OCI_OBJECT_IS_UPDATED(flag) bit((flag), OCI_OBJECT_UPDATED)
-#define OCI_OBJECT_IS_DELETED(flag) bit((flag), OCI_OBJECT_DELETED)
-#define OCI_OBJECT_IS_NEW(flag) bit((flag), OCI_OBJECT_NEW)
-#define OCI_OBJECT_IS_DIRTY(flag) \
-  bit((flag), OCI_OBJECT_UPDATED|OCI_OBJECT_NEW|OCI_OBJECT_DELETED)
-
-/*---------------------------------------------------------------------------*/
-/*                               TYPE MANAGER                                */
-/*---------------------------------------------------------------------------*/
-
-/*------------------------------ TYPE CODE ----------------------------------*/
-
-/*
- * Type manager typecodes
- *
- * These are typecodes designed to be used with the type manager;
- * they also include longer, more readable versions of existing SQLT names.
- * Those types that are directly related to existing SQLT types are #define'd
- * to their SQLT equivalents.
- *
- * The type manager typecodes are designed to be useable for all OCI calls.
- * They are in the range from 192 to 320 for typecodes, so as not to conflict
- * with existing OCI SQLT typecodes (see ocidfn.h).
- */
-
-#define OCI_TYPECODE_REF         SQLT_REF        /* SQL/OTS OBJECT REFERENCE */
-#define OCI_TYPECODE_DATE        SQLT_DAT              /* SQL DATE  OTS DATE */
-#define OCI_TYPECODE_SIGNED8     27      /* SQL SIGNED INTEGER(8)  OTS SINT8 */
-#define OCI_TYPECODE_SIGNED16    28    /* SQL SIGNED INTEGER(16)  OTS SINT16 */
-#define OCI_TYPECODE_SIGNED32    29    /* SQL SIGNED INTEGER(32)  OTS SINT32 */
-#define OCI_TYPECODE_REAL        21                /* SQL REAL  OTS SQL_REAL */
-#define OCI_TYPECODE_DOUBLE      22  /* SQL DOUBLE PRECISION  OTS SQL_DOUBLE */
-#define OCI_TYPECODE_BFLOAT      SQLT_IBFLOAT       /* Binary float */ 
-#define OCI_TYPECODE_BDOUBLE     SQLT_IBDOUBLE  /* Binary double */
-#define OCI_TYPECODE_FLOAT       SQLT_FLT      /* SQL FLOAT(P)  OTS FLOAT(P) */
-#define OCI_TYPECODE_NUMBER      SQLT_NUM/* SQL NUMBER(P S)  OTS NUMBER(P S) */
-#define OCI_TYPECODE_DECIMAL     SQLT_PDN
-                                       /* SQL DECIMAL(P S)  OTS DECIMAL(P S) */
-#define OCI_TYPECODE_UNSIGNED8   SQLT_BIN
-                                       /* SQL UNSIGNED INTEGER(8)  OTS UINT8 */
-#define OCI_TYPECODE_UNSIGNED16  25  /* SQL UNSIGNED INTEGER(16)  OTS UINT16 */
-#define OCI_TYPECODE_UNSIGNED32  26  /* SQL UNSIGNED INTEGER(32)  OTS UINT32 */
-#define OCI_TYPECODE_OCTET       245                   /* SQL ???  OTS OCTET */
-#define OCI_TYPECODE_SMALLINT    246           /* SQL SMALLINT  OTS SMALLINT */
-#define OCI_TYPECODE_INTEGER     SQLT_INT        /* SQL INTEGER  OTS INTEGER */
-#define OCI_TYPECODE_RAW         SQLT_LVB          /* SQL RAW(N)  OTS RAW(N) */
-#define OCI_TYPECODE_PTR         32              /* SQL POINTER  OTS POINTER */
-#define OCI_TYPECODE_VARCHAR2    SQLT_VCS
-                                     /* SQL VARCHAR2(N)  OTS SQL_VARCHAR2(N) */
-#define OCI_TYPECODE_CHAR        SQLT_AFC    /* SQL CHAR(N)  OTS SQL_CHAR(N) */
-#define OCI_TYPECODE_VARCHAR     SQLT_CHR
-                                       /* SQL VARCHAR(N)  OTS SQL_VARCHAR(N) */
-#define OCI_TYPECODE_MLSLABEL    SQLT_LAB                    /* OTS MLSLABEL */
-#define OCI_TYPECODE_VARRAY      247         /* SQL VARRAY  OTS PAGED VARRAY */
-#define OCI_TYPECODE_TABLE       248              /* SQL TABLE  OTS MULTISET */
-#define OCI_TYPECODE_OBJECT      SQLT_NTY       /* SQL/OTS NAMED OBJECT TYPE */
-#define OCI_TYPECODE_OPAQUE       58                /*  SQL/OTS Opaque Types */
-#define OCI_TYPECODE_NAMEDCOLLECTION  SQLT_NCO
-                                            /* SQL/OTS NAMED COLLECTION TYPE */
-#define OCI_TYPECODE_BLOB        SQLT_BLOB    /* SQL/OTS BINARY LARGE OBJECT */
-#define OCI_TYPECODE_BFILE       SQLT_BFILE    /* SQL/OTS BINARY FILE OBJECT */
-#define OCI_TYPECODE_CLOB        SQLT_CLOB /* SQL/OTS CHARACTER LARGE OBJECT */
-#define OCI_TYPECODE_CFILE       SQLT_CFILE /* SQL/OTS CHARACTER FILE OBJECT */
-
-/* the following are ANSI datetime datatypes added in 8.1 */
-#define OCI_TYPECODE_TIME        SQLT_TIME                   /* SQL/OTS TIME */
-#define OCI_TYPECODE_TIME_TZ     SQLT_TIME_TZ             /* SQL/OTS TIME_TZ */
-#define OCI_TYPECODE_TIMESTAMP   SQLT_TIMESTAMP         /* SQL/OTS TIMESTAMP */
-#define OCI_TYPECODE_TIMESTAMP_TZ  SQLT_TIMESTAMP_TZ /* SQL/OTS TIMESTAMP_TZ */
-
-#define OCI_TYPECODE_TIMESTAMP_LTZ  SQLT_TIMESTAMP_LTZ /* TIMESTAMP_LTZ */
-
-#define OCI_TYPECODE_INTERVAL_YM SQLT_INTERVAL_YM   /* SQL/OTS INTRVL YR-MON */
-#define OCI_TYPECODE_INTERVAL_DS SQLT_INTERVAL_DS  /* SQL/OTS INTRVL DAY-SEC */
-#define OCI_TYPECODE_UROWID      SQLT_RDD                     /* Urowid type */
-
-
-#define OCI_TYPECODE_OTMFIRST    228     /* first Open Type Manager typecode */
-#define OCI_TYPECODE_OTMLAST     320                    /* last OTM typecode */
-#define OCI_TYPECODE_SYSFIRST    228     /* first OTM system type (internal) */
-#define OCI_TYPECODE_SYSLAST     235      /* last OTM system type (internal) */
-#define OCI_TYPECODE_PLS_INTEGER   266     /* type code for PLS_INTEGER */
-
-/* the following are PL/SQL-only internal. They should not be used */
-#define OCI_TYPECODE_ITABLE      SQLT_TAB             /* PLSQL indexed table */
-#define OCI_TYPECODE_RECORD      SQLT_REC                    /* PLSQL record */
-#define OCI_TYPECODE_BOOLEAN     SQLT_BOL                   /* PLSQL boolean */
-
-/* NOTE : The following NCHAR related codes are just short forms for saying
-   OCI_TYPECODE_VARCHAR2 with a charset form of SQLCS_NCHAR. These codes are
-   intended for use in the OCIAnyData API only and nowhere else. */
-#define OCI_TYPECODE_NCHAR       286
-#define OCI_TYPECODE_NVARCHAR2   287
-#define OCI_TYPECODE_NCLOB       288
-
-
-/* To indicate absence of typecode being specified */
-#define OCI_TYPECODE_NONE          0
-/* To indicate error has to be taken from error handle - reserved for
-   sqlplus use */
-#define OCI_TYPECODE_ERRHP         283
-
-/* The OCITypeCode type is interchangeable with the existing SQLT type
-   which is a ub2 */
-typedef ub2 OCITypeCode;
-
-
-/*----------------------- GET OPTIONS FOR TDO  ------------------------------*/
-
-enum OCITypeGetOpt
-{
-  OCI_TYPEGET_HEADER,
-                /* load only the header portion of the TDO when getting type */
-  OCI_TYPEGET_ALL       /* load all attribute and method descriptors as well */
-};
-typedef enum OCITypeGetOpt OCITypeGetOpt;
-
-/*
- * OCITypeGetOpt
- *
- * This is the flag passed to OCIGetTypeArray() to indicate how the TDO is
- * going to be loaded into the object cache.
- * OCI_TYPEGET_HEADER implies that only the header portion is to be loaded
- * initially, with the rest loaded in on a 'lazy' basis. Only the header is
- * needed for PL/SQL and OCI operations. OCI_TYPEGET_ALL implies that ALL
- * the attributes and methods belonging to a TDO will be loaded into the
- * object cache in one round trip. Hence it will take much longer to execute,
- * but will ensure that no more loading needs to be done when pinning ADOs
- * etc. This is only needed if your code needs to examine and manipulate
- * attribute and method information.
- *
- * The default is OCI_TYPEGET_HEADER.
- */
-
-
-/*------------------------ TYPE ENCAPSULTATION LEVEL ------------------------*/
-
-enum OCITypeEncap
-{
-  /* 0 = uninitialized */
-  OCI_TYPEENCAP_PRIVATE,                /* private: only internally visible */
-  OCI_TYPEENCAP_PUBLIC /* public: visible to both internally and externally */
-};
-typedef enum OCITypeEncap OCITypeEncap;
-/*
- * OCITypeEncap - OCI Encapsulation Level
- */
-
-
-/*---------------------------- TYPE METHOD FLAGS ----------------------------*/
-
-enum OCITypeMethodFlag
-{
-  OCI_TYPEMETHOD_INLINE = 0x0001,                                  /* inline */
-  OCI_TYPEMETHOD_CONSTANT = 0x0002,                              /* constant */
-  OCI_TYPEMETHOD_VIRTUAL = 0x0004,                                /* virtual */
-  OCI_TYPEMETHOD_CONSTRUCTOR = 0x0008,                        /* constructor */
-  OCI_TYPEMETHOD_DESTRUCTOR = 0x0010,                          /* destructor */
-  OCI_TYPEMETHOD_OPERATOR  = 0x0020,                             /* operator */
-  OCI_TYPEMETHOD_SELFISH = 0x0040,     /* selfish method (generic otherwise) */
-
-  OCI_TYPEMETHOD_MAP = 0x0080,                    /* map (relative ordering) */
-  OCI_TYPEMETHOD_ORDER  = 0x0100,               /* order (relative ordering) */
-  /* OCI_TYPEMETHOD_MAP and OCI_TYPEMETHOD_ORDER are mutually exclusive */
-
-  OCI_TYPEMETHOD_RNDS= 0x0200,               /* Read no Data State (default) */
-  OCI_TYPEMETHOD_WNDS= 0x0400,                        /* Write no Data State */
-  OCI_TYPEMETHOD_RNPS= 0x0800,                      /* Read no Process State */
-  OCI_TYPEMETHOD_WNPS= 0x1000,                     /* Write no Process State */
-  OCI_TYPEMETHOD_ABSTRACT = 0x2000,    /* abstract (not instantiable) method */
-  OCI_TYPEMETHOD_OVERRIDING = 0x4000,                   /* overriding method */
-  OCI_TYPEMETHOD_PIPELINED = 0x8000                   /* method is pipelined */
-};
-typedef enum OCITypeMethodFlag OCITypeMethodFlag;
-
-/* macros to test the type method flags */
-#define OCI_METHOD_IS_INLINE(flag) bit((flag), OCI_TYPEMETHOD_INLINE)
-#define OCI_METHOD_IS_CONSTANT(flag) bit((flag), OCI_TYPEMETHOD_CONSTANT)
-#define OCI_METHOD_IS_VIRTUAL(flag) bit((flag), OCI_TYPEMETHOD_VIRTUAL)
-#define OCI_METHOD_IS_CONSTRUCTOR(flag) bit((flag), OCI_TYPEMETHOD_CONSTRUCTOR)
-#define OCI_METHOD_IS_DESTRUCTOR(flag) bit((flag), OCI_TYPEMETHOD_DESTRUCTOR)
-#define OCI_METHOD_IS_OPERATOR(flag) bit((flag), OCI_TYPEMETHOD_OPERATOR)
-#define OCI_METHOD_IS_SELFISH(flag) bit((flag), OCI_TYPEMETHOD_SELFISH)
-#define OCI_METHOD_IS_MAP(flag) bit((flag), OCI_TYPEMETHOD_MAP)
-#define OCI_METHOD_IS_ORDER(flag) bit((flag), OCI_TYPEMETHOD_ORDER)
-#define OCI_METHOD_IS_RNDS(flag) bit((flag), OCI_TYPEMETHOD_RNDS)
-#define OCI_METHOD_IS_WNDS(flag) bit((flag), OCI_TYPEMETHOD_WNDS)
-#define OCI_METHOD_IS_RNPS(flag) bit((flag), OCI_TYPEMETHOD_RNPS)
-#define OCI_METHOD_IS_WNPS(flag) bit((flag), OCI_TYPEMETHOD_WNPS)
-#define OCI_METHOD_IS_ABSTRACT(flag) bit((flag), OCI_TYPEMETHOD_ABSTRACT)
-#define OCI_METHOD_IS_OVERRIDING(flag) bit((flag), OCI_TYPEMETHOD_OVERRIDING)
-#define OCI_METHOD_IS_PIPELINED(flag) bit((flag), OCI_TYPEMETHOD_PIPELINED)
-
-#define OCI_TYPEMETHOD_IS_INLINE(flag) bit((flag), OCI_TYPEMETHOD_INLINE)
-#define OCI_TYPEMETHOD_IS_CONSTANT(flag) bit((flag), OCI_TYPEMETHOD_CONSTANT)
-#define OCI_TYPEMETHOD_IS_VIRTUAL(flag) bit((flag), OCI_TYPEMETHOD_VIRTUAL)
-#define OCI_TYPEMETHOD_IS_CONSTRUCTOR(flag) \
-  bit((flag), OCI_TYPEMETHOD_CONSTRUCTOR)
-#define OCI_TYPEMETHOD_IS_DESTRUCTOR(flag) \
-  bit((flag), OCI_TYPEMETHOD_DESTRUCTOR)
-#define OCI_TYPEMETHOD_IS_OPERATOR(flag) bit((flag), OCI_TYPEMETHOD_OPERATOR)
-#define OCI_TYPEMETHOD_IS_SELFISH(flag) bit((flag), OCI_TYPEMETHOD_SELFISH)
-#define OCI_TYPEMETHOD_IS_MAP(flag) bit((flag), OCI_TYPEMETHOD_MAP)
-#define OCI_TYPEMETHOD_IS_ORDER(flag) bit((flag), OCI_TYPEMETHOD_ORDER)
-#define OCI_TYPEMETHOD_IS_RNDS(flag) bit((flag), OCI_TYPEMETHOD_RNDS)
-#define OCI_TYPEMETHOD_IS_WNDS(flag) bit((flag), OCI_TYPEMETHOD_WNDS)
-#define OCI_TYPEMETHOD_IS_RNPS(flag) bit((flag), OCI_TYPEMETHOD_RNPS)
-#define OCI_TYPEMETHOD_IS_WNPS(flag) bit((flag), OCI_TYPEMETHOD_WNPS)
-#define OCI_TYPEMETHOD_IS_ABSTRACT(flag) bit((flag), OCI_TYPEMETHOD_ABSTRACT)
-#define OCI_TYPEMETHOD_IS_OVERRIDING(flag) \
-  bit((flag), OCI_TYPEMETHOD_OVERRIDING)
-#define OCI_TYPEMETHOD_IS_PIPELINED(flag) bit((flag), OCI_TYPEMETHOD_PIPELINED)
-
-/* macros to set the type method flags */
-#define OCI_TYPEMETHOD_SET_INLINE(flag) bis((flag), OCI_TYPEMETHOD_INLINE)
-#define OCI_TYPEMETHOD_SET_CONSTANT(flag) bis((flag), OCI_TYPEMETHOD_CONSTANT)
-#define OCI_TYPEMETHOD_SET_VIRTUAL(flag) bis((flag), OCI_TYPEMETHOD_VIRTUAL)
-#define OCI_TYPEMETHOD_SET_CONSTRUCTOR(flag) \
-  bis((flag), OCI_TYPEMETHOD_CONSTRUCTOR)
-#define OCI_TYPEMETHOD_SET_DESTRUCTOR(flag) \
-  bis((flag), OCI_TYPEMETHOD_DESTRUCTOR)
-#define OCI_TYPEMETHOD_SET_OPERATOR(flag) bis((flag), OCI_TYPEMETHOD_OPERATOR)
-#define OCI_TYPEMETHOD_SET_SELFISH(flag) bis((flag), OCI_TYPEMETHOD_SELFISH)
-#define OCI_TYPEMETHOD_SET_MAP(flag) bis((flag), OCI_TYPEMETHOD_MAP)
-#define OCI_TYPEMETHOD_SET_ORDER(flag) bis((flag), OCI_TYPEMETHOD_ORDER)
-#define OCI_TYPEMETHOD_SET_RNDS(flag) bis((flag), OCI_TYPEMETHOD_RNDS)
-#define OCI_TYPEMETHOD_SET_WNDS(flag) bis((flag), OCI_TYPEMETHOD_WNDS)
-#define OCI_TYPEMETHOD_SET_RNPS(flag) bis((flag), OCI_TYPEMETHOD_RNPS)
-#define OCI_TYPEMETHOD_SET_WNPS(flag) bis((flag), OCI_TYPEMETHOD_WNPS)
-
-/* macros to clear the type method flags */
-#define OCI_TYPEMETHOD_CLEAR_INLINE(flag) bic((flag), OCI_TYPEMETHOD_INLINE)
-#define OCI_TYPEMETHOD_CLEAR_CONSTANT(flag) \
-  bic((flag), OCI_TYPEMETHOD_CONSTANT)
-#define OCI_TYPEMETHOD_CLEAR_VIRTUAL(flag) bic((flag), OCI_TYPEMETHOD_VIRTUAL)
-#define OCI_TYPEMETHOD_CLEAR_CONSTRUCTOR(flag) \
-  bic((flag), OCI_TYPEMETHOD_CONSTRUCTOR)
-#define OCI_TYPEMETHOD_CLEAR_DESTRUCTOR(flag) \
-  bic((flag), OCI_TYPEMETHOD_DESTRUCTOR)
-#define OCI_TYPEMETHOD_CLEAR_OPERATOR(flag) \
-  bic((flag), OCI_TYPEMETHOD_OPERATOR)
-#define OCI_TYPEMETHOD_CLEAR_SELFISH(flag) bic((flag), OCI_TYPEMETHOD_SELFISH)
-#define OCI_TYPEMETHOD_CLEAR_MAP(flag) bic((flag), OCI_TYPEMETHOD_MAP)
-#define OCI_TYPEMETHOD_CLEAR_ORDER(flag) bic((flag), OCI_TYPEMETHOD_ORDER)
-#define OCI_TYPEMETHOD_CLEAR_RNDS(flag) bic((flag), OCI_TYPEMETHOD_RNDS)
-#define OCI_TYPEMETHOD_CLEAR_WNDS(flag) bic((flag), OCI_TYPEMETHOD_WNDS)
-#define OCI_TYPEMETHOD_CLEAR_RNPS(flag) bic((flag), OCI_TYPEMETHOD_RNPS)
-#define OCI_TYPEMETHOD_CLEAR_WNPS(flag) bic((flag), OCI_TYPEMETHOD_WNPS)
-
-/*--------------------------- TYPE PARAMETER MODE ---------------------------*/
-
-enum OCITypeParamMode
-{
-  /* PL/SQL starts this from 0 */
-  OCI_TYPEPARAM_IN = 0,                                                /* in */
-  OCI_TYPEPARAM_OUT,                                                  /* out */
-  OCI_TYPEPARAM_INOUT,                                             /* in-out */
-  OCI_TYPEPARAM_BYREF,              /* call by reference (implicitly in-out) */
-  OCI_TYPEPARAM_OUTNCPY,                         /* OUT with NOCOPY modifier */
-  OCI_TYPEPARAM_INOUTNCPY                     /* IN OUT with NOCOPY modifier */
-};
-typedef enum OCITypeParamMode OCITypeParamMode;
-
-
-/*-------------------------------- DEFAULTS ---------------------------------*/
-
-/* default binary and decimal precision and scale */
-
-#define OCI_NUMBER_DEFAULTPREC ((ub1)0)            /* no precision specified */
-#define OCI_NUMBER_DEFAULTSCALE ((sb1)MAXSB1MINVAL)
-                                        /* no binary/decimal scale specified */
-
-/* default maximum length for varrays and vstrings (used in sql.bsq) */
-
-#define OCI_VARRAY_MAXSIZE 4000
-                          /* default maximum number of elements for a varray */
-#define OCI_STRING_MAXLEN  4000     /* default maximum length of a vstring */
-
-/*---------------------------------------------------------------------------*/
-/* This set of macro is used only in beta2. They should be removed as soon as
- * PLSQL has made the changes of not using these macros.
- */
- 
-/* Special duration for allocating memory only. No instance can be allocated
- * given these durations.
- */
-#define OCICoherency OCIRefreshOpt
-#define OCI_COHERENCY_NONE   (OCIRefreshOpt)2
-#define OCI_COHERENCY_NULL   (OCIRefreshOpt)4
-#define OCI_COHERENCY_ALWAYS (OCIRefreshOpt)5
-
-#endif /* ORO_ORACLE */
-
diff --git a/src/terralib/drivers/OracleSpatial/OCI/include/ort.h b/src/terralib/drivers/OracleSpatial/OCI/include/ort.h
deleted file mode 100644
index 3dda9fc..0000000
--- a/src/terralib/drivers/OracleSpatial/OCI/include/ort.h
+++ /dev/null
@@ -1,2593 +0,0 @@
-/* @(#)ort.h    1.44 95/07/07 */
-
-/* Copyright (c) 1994, 2003, Oracle Corporation.  All rights reserved.  */
-
-/* 
-  NAME
-
-    ORT - ORacle's external open Type interface to the open type manager (OTM)
-
-  DESCRIPTION
-
-    The open type manager interface includes dynamic type operations to
-    create, delete, update, and access types.  See the "Functional
-    Specification for Oracle Object Call Interface (Objects Project),
-    Version 1.0" for a user level description of the OTM.  For a more
-    detailed description, see the "Component Document for the Open Type
-    Manager, Version 1.0".
-
-    NOTE: MOST Of the functions in this header file are being desupported.
-          Please use the OCIDescribeAny interface as described in oci.h
-          instead.
-          The OCIType, OCITypeElem, OCITypeMethod abstract types continue
-          to be supported. The only two functions that remain to be documented
-          are OCITypeArrayByName and OCITypeArrayByRef.
-          All obsolete types/functions are marked accordingly below.
-
-  RELATED DOCUMENTS
-
-    For the functional specification for the OTM, see: 
-        [1] Kotsovolos, Susan, "Functional Specification for Oracle Object
-            Call Interface (Objects Project), Version 1.0", Oracle
-            Corporation, February 1995.
-    For the internal design of the OTM, see the following:
-        [2] Kotsovolos, Susan, "Component Document for the Open Type Manager",
-            Oracle Corporation, November 1994. 
-        [3] Kotsovolos, Susan, "Design for The Open Type Manager, Oracle 
-            Object Management Subsystem Version 1.0", Oracle Corporation, 
-            March 1994.
-        [4] Kotsovolos, Susan and Tin A. Nguyen, "The Open Type Manager",
-            Oracle Corporation, March 1994.
-        [5] Kotsovolos, Susan and Tin A. Nguyen, "Schema Evolution",
-            Oracle Corporation, March 1994.
-    For a description of the types the OTM must support, see:
-        [6] Nguyen, Tin A., "The Open Type System", Oracle Corporation, 
-            February 1994. 
-
-  INSPECTION STATUS 
-
-    Inspection date:    
-    Inspection status: 
-    Estimated increasing cost defects per page:
-    Rule sets:        
-
-  ACCEPTANCE REVIEW STATUS 
-
-    Review date:    
-    Review status:
-    Reviewers:  
-
-
-  **** ALL OBSOLETE FUNCTIONS/TYPES ARE MARKED ACCORDINGLY ***
-
-  EXPORT FUNCTIONS
-
-    None
-
-  PUBLIC DATA STRUCTURES
-
-      OCIType - type descriptor in the object cache
-      OCITypeElem - type element descriptor in the object cache
-            (used for attributes and paramters)
-      OCITypeCode  - Open Type System type code.
-      OCITypeMethod - method descriptor in the object cache
-      OCITypeParamMode - parameter modes (ie. IN, IN-OUT etc)
-
-  PUBLIC FUNCTIONS
-
-    ITERATOR (for OCITypeAttrNext and OCITypeMethodNext)
-
-      OCITypeIterNew  - ** OBSOLETE ** Create new instance of an iteraton.
-      OCITypeIterSet  - ** OBSOLETE ** Initialize iterator.
-      OCITypeIterFree - ** OBSOLETE ** Free instance of iterator.
-
-    TYPE GET
-
-      OCITypeByName      - ** OBSOLETE ** Get a type by name.
-      OCITypeArrayByName - Get an array of types by their names.
-      OCITypeByRef       - ** OBSOLETE ** Get a type by its CREF.
-      OCITypeArrayByRef  - Get an array of types by their CREFs.
-
-    TYPE ACCESSORS
-
-      OCITypeName     - ** OBSOLETE ** OCI Get a type's name.
-      OCITypeSchema   - ** OBSOLETE ** OCI Get a type's schema name.
-      OCITypeTypeCode - ** OBSOLETE ** OCI Get a type's type code.
-      OCITypeVersion  - ** OBSOLETE ** OCI Get a Type's user-readable Version.
-      OCITypeAttrs    - ** OBSOLETE ** OCI Get a Type's Number of Attributes.
-      OCITypeMethods  - ** OBSOLETE ** OCI Get a Type's Number of Methods.
-
-    TYPE ELEMENT ACCESSORS (they represent attributes/parameters/results)
-
-      OCITypeElemName      - ** OBSOLETE ** Get a type element's (only for
-                                attributes) name.
-      OCITypeElemType      - ** OBSOLETE ** Get a type element's type
-                                descriptor.
-      OCITypeElemTypeCode  - ** OBSOLETE ** Get a type element's typecode.
-      OCITypeElemParameterizedType - ** OBSOLETE ** Get a type element's
-                                        parameterized type's type descriptor.
-      OCITypeElemNumPrec   - ** OBSOLETE ** Get a number's precision.
-      OCITypeElemNumScale  - ** OBSOLETE ** Get a decimal or oracle Number's
-                                            Scale
-      OCITypeElemCharSetID - ** OBSOLETE ** Get a fixed or variable length
-                                            string's character set ID.
-      OCITypeElemCharSetForm - ** OBSOLETE ** Get a fixed or variable length
-                                              string's character set form (how
-                                              character set information has
-                                              been specified).
-      OCITypeElemLength    - ** OBSOLETE ** Get a raw, fixed or variable
-                                            length string's length.
-      OCITypeElemParamMode - ** OBSOLETE ** Get element's parameter's mode
-                                            (only valid for parameter).
-      OCITypeElemDefaultValue - ** OBSOLETE ** Get element's Default Value.
-
-    ATTRIBUTE ACCESSORS
-
-      OCITypeAttrByName - ** OBSOLETE ** Get an Attribute by Name.
-      OCITypeAttrNext   - ** OBSOLETE ** Get an Attribute by Iteration.
-
-    COLLECTION ACCESSORS
-
-      OCITypeCollTypeCode - ** OBSOLETE ** Get a named collection's typecode.
-      OCITypeCollElem     - ** OBSOLETE ** Get a named collection's element's
-                               type element information.
-      OCITypeCollSize     - ** OBSOLETE ** Get a named collection's size in
-                               number of elements.
-
-    METHOD ACCESSORS
-
-      OCITypeMethodOverload - ** OBSOLETE ** Get number of overloaded methods
-                                             with the given method name.
-                                             (no direct equivalent for
-                                              OCIDescribe interface)
-      OCITypeMethodByName   - ** OBSOLETE ** Get one or more methods by name.
-      OCITypeMethodNext     - ** OBSOLETE ** Iterate to the next method to
-                                             retrieve.
-      OCITypeMethodName     - ** OBSOLETE ** Get method's name.
-      OCITypeMethodEncap    - ** OBSOLETE ** Get method's encapsulation level. 
-      OCITypeMethodFlags    - ** OBSOLETE ** et method's flags.
-      OCITypeMethodMap      - ** OBSOLETE ** Get type's map function.
-      OCITypeMethodOrder    - ** OBSOLETE ** Get type's order function.
-      OCITypeMethodParams   - ** OBSOLETE ** Get a method's number of
-                                             parameters.
-
-    RESULT ACCESSORS
-
-      OCITypeResult - ** OBSOLETE ** OCI Get a method's Result.
-
-      See also ATTRIBUTE/PARAMETER/RESULT TYPE ACCESSORS.
-
-    PARAMETER ACCESSORS
-
-      OCITypeParamByPos  - ** OBSOLETE ** Get a Parameter in a method By
-                                          Position.
-      OCITypeParamByName - ** OBSOLETE ** Get a Parameter in a method By Name.
-      OCITypeParamPos    - ** OBSOLETE ** Get a Parameter's PoSition in a
-                                          method.
-
-  CALL GRAPHS:
-
-  Only type accessors are supported for 8.0.
-  ** OBSOLETE ** please use OCIDescribe interface
-
-  TYPE ACCESSOR EXAMPLE
-
-      CREATE TYPE CAR
-      (
-        name   vstring,
-        age    number,
-          number   car_age;                           /o Oracle number o/
-          weight   car_weight;                        /o abstract type o/
-
-        PUBLIC: 
-
-          /o methods o/
-          car(orlvs a_name, number an_age, WEIGHT a_weight);
-          ~car();
-          inline number get_age() const;
-          
-          /o relative ordering (map) functions o/
-          number car_map
-      );
-
-      /o the following code accesses the type created above o/
-
-      ub1      meth_flags;
-      ub4      i, j; 
-      ub4      text_len, position;
-      ub4      count;
-      ub4      length;
-      OCITypeCode    typecode;
-      OCIRef  *attr_ref;
-      OCIRef  *param_ref;
-      OCIType  *tdo, new_tdo, final_tdo;
-      OCITypeElem  *elem;
-      OCITypeIter  *iterator_ort;
-      oratext   (*names)[];
-      ub4      lengths[];
-      ub4     *positions;
-      oratext    *name;
-      oratext     name_buffer[M_IDEN];
-
-      /o initialize the references o/
-      DISCARD orlrini(env, err, (dvoid *)&attr_ref);
-      DISCARD orlrini(env, err, (dvoid *)&param_ref);
-
-      /o ----------------- GET INFORMATION ABOUT A TYPE ----------------- o/
-
-      /o start a transaction o/
-      
-      /o Pin the type until the end of the transaction.  Pinning the type is 
-       o required before using any type accessors. 
-       o/
-      if (OCITypeByName(env, err, svc, (oratext *)0, 0, "CAR", strlen("CAR"), 
-                  OCI_DURATION_TRANS, &car_ref, &car_tdo) != OCI_SUCCESS)
-        /o error o/ ;
-
-      /o get the type's name o/
-      if (!memcmp(OCITypeName(env, err, car_tdo, &text_len), "person",
-                              text_len))
-        /o do something o/ ;
-
-      /o get the type's schema name o/
-      if (!memcmp(OCITypeSchema(env, err, car_tdo, &text_len), "john",
-                  text_len))
-        /o do something o/ ;
-
-      /o get the type code of the type o/
-      if (OCITypeTypeCode(env, err, car_tdo) == OCI_TYPECODE_ADT)
-        /o do something o/ ; 
-
-      /o get the type version o/
-      if (!memcmp(OCITypeVersion(env, err, car_tdo, &text_len), "1", text_len))
-         /o do something o/  ;
-
-      /o ------- GET FLATTENED POSITION OF AN ATTRIBUTES IN A TYPE ------- o/
-
-      names = malloc(sizeof(oratext *) * 2);
-      names[0] = malloc(strlen("car_weight"));
-      names[1] = malloc(strlen("ounces"));
-      memcpy(names[0], "car_weight", strlen("car_weight"));
-      memcpy(names[1], "ounces", strlen("ounces"));
-
-      lengths = malloc(sizeof(ub4) * 2);
-      lengths[0] = strlen("car_weight");
-      lengths[1] = strlen("ounces");
-
-      /o ---------- GET IMMEDIATE ATTRIBUTES IN A TYPE ---------- o/
-
-      /o loop through all attributes in the type with iterator o/
-      if (OCITypeIterNew(env, err, car_tdo, &iterator_ort) != OCI_SUCCESS)
-        /o do something o/
-
-      while (OCITypeAttrNext(env, err, iterator_ort, &ado) != OCI_NO_DATA)
-      {
-        /o get the attribute's name o/
-        if (!memcmp(OCITypeElemName(env, err, ado, &text_len),
-                                    "tiger", text_len))
-          /o do something o/  ;
-
-        /o get the attribute's type descriptor o/
-        if (OCITypeElemType(env, err, ado, &tdo) != OCI_SUCCESS)
-          /o error o/ ;
-
-        /o get the attribute's type code o/
-        typecode = OCITypeElemTypeCode(env, err, ado);
-
-        switch (typecode)
-        {
-        /o scalar types o/
-        case OCI_TYPECODE_DATE:                                     /o date o/
-        case OCI_TYPECODE_SIGNED8:                                  /o byte o/
-        case OCI_TYPECODE_SIGNED16:                                /o short o/
-        case OCI_TYPECODE_UNSIGNED8:                       /o unsigned byte o/
-        case OCI_TYPECODE_UNSIGNED16:                     /o unsigned short o/
-        case OCI_TYPECODE_OCTET:                                   /o octet o/
-        case OCI_TYPECODE_TABLE:                            /o nested table o/
-        case OCI_TYPECODE_CLOB:                            /o character lob o/
-        case OCI_TYPECODE_BLOB:                               /o binary lob o/
-        case OCI_TYPECODE_CFILE:                   /o character file object o/
-        case OCI_TYPECODE_BFILE:                      /o binary file object o/
-
-          /o do something o/
-          break;
-
-        /o number types o/
-        case OCI_TYPECODE_NUMBER:                          /o oracle number o/
-        case OCI_TYPECODE_DECIMAL:                               /o decimal o/
-          {
-            /o get the scale of the number o/
-            if (OCITypeElemNumScale(env, err, ado) == 3)
-              /o do something o/ ;
-          }
-          /o fall through to get the precision o/
-
-        case OCI_TYPECODE_FLOAT:                                   /o float o/
-        case OCI_TYPECODE_SIGNED32:                                 /o long o/
-        case OCI_TYPECODE_UNSIGNED32:                      /o unsigned long o/
-        case OCI_TYPECODE_REAL:                                     /o real o/
-        case OCI_TYPECODE_DOUBLE:                                 /o double o/
-          {
-            /o get the precision of the number o/
-            if (OCITypeElemNumPrec(env, err, ado) == 2)
-              /o do something o/ ;
-          }
-          break;
-
-        /o string types o/
-        case OCI_TYPECODE_CHAR:                      /o fixed length string o/
-        case OCI_TYPECODE_VARCHAR2:               /o variable length string o/
-        case OCI_TYPECODE_RAW:                                       /o raw o/
-          {
-            /o get the length of the fixed or variable length string o/
-            if (OCITypeElemLength(env, err, ado) < 100)
-              /o do something o/
-          }
-          break;
-
-        /o parameterized types o/
-        case OCI_TYPECODE_REF:                          /o reference o/
-        case OCI_TYPECODE_PTR:                            /o pointer o/
-          {
-            /o get the type stored in the parameterized type o/
-            if (OCITypeElemParameterizedType(env, err, ado, &tdo)
-                 != OCI_SUCCESS)
-              /o error o/ ;
-
-            /o do something o/
-            if (OCI_TYPEELEM_IS_REF(OCITypeElemFlags(env, err, ado)))...
-          }
-          break;
-
-        /o domain type o/
-        case OCI_TYPECODE_NAMEDCOLLECTION:
-          switch (OCITypeCollTypeCode(env, err, tdo))
-          {
-          case OCI_TYPECODE_VARRAY:                   /o variable array o/
-            ub4   num_elems;
-            OCIType *element_type;
-
-            /o get the number of elements in the farray or the maximum number
-             o of elements in the varray.
-             o/
-            OCITypeCollSize(env, err, tdo, &num_elems);
-
-            /o get the type of the array o/
-            OCITypeElemType(env, err, tdo, &element_type);
-          }
-          break;
-
-          case OCI_TYPECODE_TABLE:                         /o multiset o/
-          {
-            OCIType *table_type;
-
-            /o get the type of the multiset o/
-            OCITypeElemType(env, err, tdo, &table_type);
-
-            /o do something o/
-          }
-        }
-
-        /o abstract type o/
-        case OCI_TYPECODE_ADT:                 /o abstract data type o/
-          {
-            /o get the adt information o/
-            if (OCITypeElemType(env, err, ado, &tdo) != OCI_SUCCESS)
-              /o error o/ ;
-
-            /o do something o/
-          }
-          break;
-
-        default:
-          DISCARD printf("Error:  invalid type code\n");
-
-        } /o end of typecode switch o/
-
-      } /o end of loop through all attributes in a type o/
-
-
-      /o ------------ GET THE IMMEDIATE METHODS OF A TYPE ------------ o/
-
-      /o loop through all methods in the type by reusing iterator o/
-      if (OCITypeIterSet(env, err, car_tdo, iterator_ort) != OCI_SUCCESS)
-        /o do something o/
-
-      while (OCITypeMethodNext(env, err, iterator_ort) != OCI_NO_DATA)
-      {
-        /o get the method's name o/
-        if (!memcmp(OCITypeMethodName(env, err, mdo, &text_len), "car",
-                    text_len))
-          /o do something o/  ;
-
-        /o get the method's encapsulation o/
-        if (OCITypeMethodEncap(env, err, mdo) == OCI_TYPEENCAP_PUBLIC)
-          /o do something o/  ;
-
-        /o get the method's flags o/
-        meth_flags = OCITypeMethodFlags(env, err, mdo);
-        if (meth_flags & OCI_TYPEMETHOD_VIRTUAL)  
-          /o do something o/  ;
-
-
-        /o ------------ GET THE PARAMETERS IN A METHOD ------------ o/
-
-        /o loop through all parameters in the method o/
-        count = OCITypeMethodParams(env, err, mdo);
-        for (j = 1; j <= count; j++)
-        {
-          /o get the parameter information by position o/
-          if (OCITypeParamByPos(env, err, mdo, i, &elem) != OCI_SUCCESS)
-            /o error o/ ;
-
-          /o get the parameter's name o/
-          if (!memcmp(OCITypeElemName(env, err, elem, &text_len), "an_age",
-                      text_len))
-            /o do something o/ ;
-
-          /o get the parameter's mode o/
-          if (OCITypeElemMode(env, err, elem) == OCI_PARAM_OUT)
-            /o do something o/ ;
-   
-          /o get the parameter's required flag o/
-          if (ortgprq(env, err, elem))
-            /o do something o/ ;
-        }
-      }
-
-      /o get a method by name o/
-      if (OCITypeMethodByName(env, err, car_tdo, "car_constructor", 
-                              strlen("car_constructor"), NULLP(OCIRef), &mdo) 
-                              != OCI_SUCCESS)
-        /o error o/ ;
-
-      /o get a parameter in a method by name o/
-      if (OCITypeParamByName(env, err, mdo, "an_age", strlen("an_age"), &elem) 
-                  != OCI_SUCCESS)
-        /o error o/ ;
-
-      /o get a parameter's typecode o/
-      typecode = OCITypeElemTypeCode(env, err, elem);
-   
-      /o get a parameter's type object o/
-      if (OCITypeElemType(env, err, elem, &tdo)) != OCI_SUCCESS)
-        /o error o/ ;
-
-      /o get a parameter's position in a method o/
-      if (ortgpps(env, err, mdo, "an_age", strlen("an_age"), 
-                  &position, NULLP(OCIRef), NULLP(OCITypeElem)) != OCI_SUCCESS)
-        /o error o/ ;
-
-      /o ------------ GET THE METHOD's RESULT ------------ o/
-     
-      /o get a method by name o/
-      if (OCITypeMethodByName(env, err, car_tdo, "get_age", strlen("get_age"),
-                  &mdo) != OCI_SUCCESS)
-        /o error o/ ;
-
-      /o get the typecode of the method's result o/
-      typecode = OCITypeElemTypeCode(env, err, mdo);
-
-
-      /o ----------------- END ---------------- o/
-
-      /o free the references implicitly allocated o/
-      DISCARD orlrfre(env, err, (dvoid *)&attr_ref);
-      DISCARD orlrfre(env, err, (dvoid *)&param_ref);
-
-  NOTES
-
-  MODIFIED
-    srseshad   03/12/03  - convert oci public api to ansi
-    aahluwal   06/03/02  - bug 2360115
-    skabraha   04/16/02  - fix compiler warnings
-    rkasamse   03/02/01  - do not use iterator : keyword in MSVB
-    bpalaval   02/09/01  - Change text to oratext.
-    rxgovind   01/31/00  - add OCIType interfaces for transient types
-    whe        09/01/99 -  976457:check __cplusplus for C++ code
-    cxcheng    05/06/97 -  make OCI_TYPE?? test macros return either 1 or 0
-    cxcheng    04/22/97 -  add comment on desupporting OCIType functions
-    skrishna   03/18/97 -  fix ifdef for supporting ansi and k&r proto-types
-    cxcheng    02/26/97 -  fix lint problem with oro names
-    cxcheng    02/06/97 -  take out short name support except with SLSHORTNAME
-    cxcheng    01/15/97 -  change prototype of OCITypeElemParameterizedType()
-    cxcheng    01/03/97 -  replace bit in OCI_TYPEPARAM_IS_REQUIRED with bitwis
-    cxcheng    12/31/96 -  replace OCI_PARAM_IS_REQUIRED with OCI_TYPEPARAM_IS_
-    cxcheng    12/09/96 -  add prototype for OCITypeElemExtTypeCode and OCIType
-    cxcheng    11/25/96 -  add schema name parameter to OCITypeVTInsert()
-    cxcheng    11/20/96 -  fix prototype for OCITypeByName()
-    cxcheng    11/11/96 -  fix prototype for OCITypeByName()
-    cxcheng    11/05/96 -  remove OCITypeElemExtTypeCode and OCITypeCollExtType
-    dchatter   10/28/96 -  change ortgatyp to be OCITypeArrayByName
-    cxcheng    10/25/96 -  fix problem with ortgatyp at end
-    cxcheng    10/22/96 -  add OCITypeByRef and OCITypeArrayByRef
-    cxcheng    10/20/96 -  remove ortgtyp() from #define section at end
-    cxcheng    10/18/96 -  rename OCITypeGetArray to OCITypeArrayByName
-    cxcheng    10/17/96 -  final change to prototype for OCI_TYPEPARAM_IS_REQUI
-    cxcheng    10/15/96 -  rename OCIEncapLevel and OCIMethodFlag
-    cxcheng    10/14/96 -  change prototype of OCITypeResult
-    mluong     10/11/96 -  fix compile error
-    jwijaya    10/10/96 -  fix bug on OCI_PARAM_IS_REQUIRED
-    cxcheng    10/09/96 -  more lint and link fixes
-    cxcheng    10/08/96 -  more lint fixes
-    cxcheng    10/07/96 -  more changes
-    cxcheng    10/04/96 -  replace short names with long names
-    cxcheng    10/01/96 -  change to long names for readability
-    cxcheng    09/27/96 -  rename ortgatyp() to ortgtya() for lint
-    cxcheng    09/20/96 -  add ortgatyp() for array get type
-    cxcheng    09/18/96 -  add array pin and iterator functions
-    cxcheng    08/09/96 -  add version table calls
-    cxcheng    07/22/96 -  add OCITypeElemType() to top
-    jwijaya    07/03/96 -  add ANSI prototypes
-    cxcheng    06/28/96 -  add OCITypeElemCharSetForm()
-    cxcheng    06/26/96 -  fix comment on OCITypeParamByPos()/ortgpps()
-    cxcheng    06/18/96 -  fix comments on OCITypeResult()
-    cxcheng    06/17/96 -  improve comments
-    skrishna   06/03/96 -  change OCITypeCollElem() prototype
-    vkrishna   05/29/96 -  replace OROTCFAR with OROTCCAR
-    cxcheng    05/28/96 -  fix comments, remove non-beta1 functions
-    cxcheng    05/02/96 -  fix prototype bugs
-    cxcheng    04/29/96 -  rename OCITypeElemm() to ortanct()
-    cxcheng    04/26/96 -  add ortgrbp and ortftyi,
-                           fix comments and examples
-    cxcheng    04/22/96 -  big merge to main branch
-    cxcheng    04/17/96 -  fix syntax
-    cxcheng    04/08/96 -  change prototype to ortaty()
-    skrishna   04/08/96 -  change ort*() to take OCIEnv* and OCIError* instead
-                           of oroenv*
-    cxcheng    03/28/96 -  add ortslob(), change ortsstr() prototype
-    cxcheng    03/13/96 -  change alter type interface
-    cxcheng    03/11/96 -  ORT interface changes
-    cxcheng    02/27/96 -  correct comments
-    jboonleu   02/09/96 -  rename oroopd to OCIDuration
-    cxcheng    01/19/96 -  change ORTCTYVAL to ORTCTYEMB for embedded ADT
-    cxcheng    02/14/96 -  add more comments
-    jboonleu   02/09/96 -  rename oroopd to OCIDuration
-    cxcheng    02/07/96 -  fix comments and examples
-    cxcheng    01/19/96 -  new ORT interface without korfc's
-    cxcheng    01/08/96 -  consolidate collection functions
-    cxcheng    12/14/95 -  remove obsolete ortgcol() and ortrelease()
-    jweisz     12/12/95 -  merge screwup: ortdth twice
-    cxcheng    12/05/95 -  change multiset interface for new standard
-    skotsovo   12/01/95 -  merge from /vobs/rdbms/public/ort.h@@/main/
-                           st_rdbms_big_dev/st_rdbms_obj/
-                           st_rdbms_jwijaya_variable_ref
-    cxcheng    11/13/95 -  add ortaty()/orteaty()
-    cxcheng    11/13/95 -  add new collection type accessors
-    skotsovo   10/30/95 -  add 'oid' type b/c extent type uses it.
-    skotsovo   10/24/95 -  update according to new variable length ref
-    cxcheng    10/05/95 -  add null support, change prototypes to calls
-    cxcheng    10/03/95 -  add OCITypeMethodOrder() to get ORDER method
-    cxcheng    09/28/95 -  add OCITypeElemm() for collection types support
-    skotsovo   06/05/95 -  add adt_type parameter to ortsab() 
-    skotsovo   05/10/95 -  ifdef'd out ortgafp() 
-    skotsovo   03/07/95 -  update interface to only include release 1
-    skotsovo   02/22/95 -  add multiset accessors 
-    skotsovo   02/09/95 -  update according to new ots doc 
-    skotsovo   01/31/95 -  add rest of release 1 types 
-    skotsovo   01/24/95 -  categorize sint32, double, and real as number types 
-                           (with precision and scale) instead of scalar types.
-    skotsovo   01/12/95 -  remove dependency from ortdty interface 
-    skotsovo   01/03/95 -  remove orotyp accessors 
-    skotsovo   12/12/94 -  update comments 
-    skotsovo   12/05/94 -  change OCITypeElemParameterizedTyper interface 
-    skotsovo   10/26/94 -  add type version table 
-    skotsovo   10/17/94 -  fix ortgafp() comments 
-    skotsovo   10/14/94 -  modify ortgafp() parameters 
-    skotsovo   10/14/94 -  add examples 
-    skotsovo   10/13/94 -  add a few new routines 
-    jwijaya    10/07/94 -  add namespace to pin by name 
-    jwijaya    10/02/94 -  connection handle -> connection number 
-    skotsovo   09/13/94 -  modify example to use updated oririni interface 
-    skotsovo   08/25/94 -  change scale to sb1 from sb2 
-    skotsovo   07/28/94 -  add ortbeg() and ortend() 
-    skotsovo   07/14/94 -  add decimal type & call graph
-    skotsovo   06/28/94 -  subset by removing miscellaneous functions 
-    skotsovo   06/28/94 -  consistently put comments before typedefs 
-    skotsovo   06/27/94 -  modify according to new header file template, add
-                           more examples, and change ortcty() to return a
-                           reference to the type
-    skotsovo   06/24/94 -  add functions to get type information from orotyp 
-    skotsovo   06/20/94 -  finish modifying according to header template 
-    skotsovo   06/09/94 -  modify according to header file template 
-    skotsovo   06/08/94 -  replace s.h with oratypes.h 
-    skotsovo   05/24/94 -  modify comments & update example
-    skotsovo   05/23/94 -  modify fnt names for create, alter and drop type 
-    skotsovo   05/18/94 -  remove ortdme() -- delete a method 
-    skotsovo   05/17/94 -  add tdo parameter to all type modifiers 
-    skotsovo   05/11/94 -  return text* instead of including it in arglist 
-    skotsovo   11/16/93 -  creation
-
-*/
-
-#ifndef ORATYPES
-#include <oratypes.h>
-#endif
-#ifndef ORO_ORACLE
-#include <oro.h>
-#endif
-#ifndef OCI_ORACLE
-#include <oci.h>
-#endif
-
-#ifndef ORT_ORACLE
-#define ORT_ORACLE
-
-/*---------------------------------------------------------------------------*/
-/*                         SHORT NAMES SUPPORT SECTION                       */
-/*---------------------------------------------------------------------------*/
-
-#ifdef SLSHORTNAME
-
-/* the following are short names that are only supported on IBM mainframes
-   with the SLSHORTNAME defined.
-   With this all subsequent long names will actually be substituted with
-   the short names here */
-
-#define OCITypeArrayByName              ortgatyp
-#define OCITypeAttrByName               ortgabn
-#define OCITypeAttrNext                 ortgabi
-#define OCITypeAttrs                    ortgtna
-#define OCITypeByRef                    ortgtbrf
-#define OCITypeCollElem                 ortgcel
-#define OCITypeCollExtTypeCode          ortgcsqt
-#define OCITypeCollSize                 ortgcne
-#define OCITypeCollTypeCode             ortgdttc
-#define OCITypeElem                     ortado
-#define OCITypeElemCharSetForm          ortgscform
-#define OCITypeElemCharSetID            ortgscid
-#define OCITypeElemDefaultValue         ortgpdv
-#define OCITypeElemExtTypeCode          ortgasqt
-#define OCITypeElemLength               ortgsl
-#define OCITypeElemName                 ortganm
-#define OCITypeElemNumPrec              ortgnp
-#define OCITypeElemNumScale             ortgns
-#define OCITypeElemParamMode            ortgpmo
-#define OCITypeElemParameterizedType    ortgpa
-#define OCITypeElemType                 ortgaty
-#define OCITypeElemTypeCode             ortgatc
-#define OCITypeIter                     ortitr
-#define OCITypeIterFree                 ortifre
-#define OCITypeIterNew                  ortinew
-#define OCITypeIterSet                  ortiset
-#define OCITypeMethod                   ortmdo
-#define OCITypeMethodByName             ortgmbn
-#define OCITypeMethodEncap              ortgmen
-#define OCITypeMethodFlags              ortgmfl
-#define OCITypeMethodMap                ortgmmap
-#define OCITypeMethodName               ortgmnm
-#define OCITypeMethodNext               ortgmbi
-#define OCITypeMethodOrder              ortgmor
-#define OCITypeMethodOverload           ortgmno
-#define OCITypeMethodParams             ortgmnp
-#define OCITypeMethods                  ortgtnm
-#define OCITypeName                     ortgtme
-#define OCITypeParamByName              ortgpbn
-#define OCITypeParamPos                 ortgpps
-#define OCITypeSchema                   ortgtsch
-#define OCITypeTypeCode                 ortgttc
-#define OCITypeVTInit                   ortvini
-#define OCITypeVTInsert                 ortvins
-#define OCITypeVTSelect                 ortvsel
-#define OCITypeVersion                  ortgtvn
-
-#endif                                                        /* SLSHORTNAME */
-
-
-/*============================*/        
-/* PUBLIC TYPES AND CONSTANTS */
-/*============================*/
-
-/*----------------------------- TYPE DESCRIPTION ----------------------------*/
-
-/*
- * OCIType - OCI Type Description Object 
- *
- * The contents of an 'OCIType' is private/opaque to clients.  Clients just 
- * need to declare and pass 'OCIType' pointers in to the type manage
- * functions.
- * The pointer points to the type in the object cache.  Thus, clients don't
- * need to allocate space for this type and must NEVER free the pointer to the
- * 'OCIType'.
- */
-
-typedef struct OCIType OCIType;
-
-/*------------------------- TYPE ELEMENT DESCRIPTION ------------------------*/
-
-
-/*
- * OCITypeElem - OCI Type Element object
- *
- * The contents of an 'OCITypeElem' is private/opaque to clients. Clients just 
- * need to declare and pass 'OCITypeElem' pointers in to the type manager 
- * functions.
- *
- * 'OCITypeElem' objects contains type element information such as the numeric
- * precision for example, for number objects, and the number of elements for
- * arrays.
- * They ARE used to describe type attributes, collection elements,
- * method parameters, and method results. Hence they are pass in or returned
- * by attribute, collection, and method parameter/result accessors.
- */
-
-typedef struct OCITypeElem OCITypeElem;
-
-
-/*--------------------------- METHOD DESCRIPTION ---------------------------*/
-
-
-/*
- * OCITypeMethod - OCI Method Description object 
- *
- * The contents of an 'OCITypeMethod' is private/opaque to clients.  Clients
- * just need to declare and pass 'OCITypeMethod' pointers in to the type
- * manager functions.
- * The pointer points to the method in the object cache.  Thus, clients don't
- * need to allocate space for this type and must NEVER free the pointer to 
- * the 'OCITypeMethod'.
- */
-
-typedef struct OCITypeMethod OCITypeMethod;
-
-
-/*--------------------------- TYPE ACCESS ITERATOR --------------------------*/
-
-/*
- * OCITypeIter- OCI Type Iterator
- *
- * The contents of an 'orti' is private/opaque to clients.  Clients just 
- * need to declare and pass 'orti' pointers in to the type manager functions.
- * The iterator is used to retreive MDO's and ADO's that belong to the TDO
- * one at a time. It needs to be allocated by the 'OCITypeIterNew()' function
- * call and deallocated with the 'OCITypeIterFree()' function call.
- */
-
-typedef struct OCITypeIter OCITypeIter;
-
-
-/*==================*/
-/* PUBLIC FUNCTIONS */
-/*==================*/
-
-/*--------------------------------------------------------------------------*/
-/*                                  ITERATOR                                */
-/*--------------------------------------------------------------------------*/
-
-/*-----------------------_- OCITypeIterNew ---------------------------------*/
-
-/* ** OBSOLETE ** */
-sword OCITypeIterNew(    OCIEnv *env, OCIError *err, OCIType *tdo, 
-                         OCITypeIter **iterator_ort    );
-
-/*
-  NAME: OCITypeIterNew - OCI Iterator NEW
-  PARAMETERS:
-       env (IN/OUT) - OCI environment handle initialized in object mode
-       err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-       tdo (IN) - pointer to the pinned type in the object cache to
-                initialize the iterator with
-       iterator_ort (OUT) - pointer to the pointer to the new iterator created
-  DESCRIPTION:
-       Create a new instance of a method/attribute iterator and initalize
-       it's values.
-  RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is null. 
-        OCI_ERROR if
-           1) any of the required parameters is null.
-           2) error while allocating space for the iterator.
-*/
-
-/*------------------------ OCITypeIterSet ---------------------------------*/
-
-/* ** OBSOLETE ** */
-sword OCITypeIterSet(    OCIEnv *env, OCIError *err, OCIType *tdo, 
-                  OCITypeIter *iterator_ort    );
-
-/*
-  NAME: OCITypeIterSet - OCI Iterator SET
-  PARAMETERS:
-       env (IN/OUT) - OCI environment handle initialized in object mode
-       err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-       tdo (IN) - pointer to the pinned type in the object cache to
-                initialize the iterator with
-       iterator_ort (IN/OUT) - pointer to the iterator to set
-  DESCRIPTION:
-       Initializes the iterator. This is used to reset the state of the
-       iterator.
-  RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is null. 
-        OCI_ERROR if
-           1) any of the required parameters is null.
-*/
-
-/*------------------------ OCITypeIterFree ---------------------------------*/
-
-/* ** OBSOLETE ** */
-sword OCITypeIterFree(    OCIEnv *env, OCIError *err, OCITypeIter
-                          *iterator_ort    );
-
-/*
-  NAME: OCITypeIterFree - OCI Iterator FREe
-  PARAMETERS:
-       env (IN/OUT) - OCI environment handle initialized in object mode
-       err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-       iterator_ort (IN/OUT) - pointer to the iterator to free
-  DESCRIPTION:
-       Free space allocated for the iterator.
-  RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is null. 
-        OCI_ERROR if
-           1) any of the required parameters is null.
-           2) error while freeing the iterator, probably bad iterator pointer.
-*/
-
-
-/*--------------------------------------------------------------------------*/
-/*                                  TYPE GET                                */
-/*--------------------------------------------------------------------------*/
-
-/* ** OBSOLETE ** */
-sword OCITypeByName(    OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc, 
-                        CONST oratext *schema_name, ub4 s_length,
-                        CONST oratext *type_name, ub4 t_length,
-                        CONST oratext *version_name, ub4 v_length,
-                        OCIDuration pin_duration, OCITypeGetOpt get_option,
-                        OCIType **tdo    );
-/*
-  NAME: OCITypeByName - OCI Get the most current version of an existing TYPe
-                  by name.
-  PARAMETERS:
-       env (IN/OUT) - OCI environment handle initialized in object mode
-       err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-       svc (IN) - OCI service handle
-       schema_name (IN, optional) - name of schema associated with the 
-                  type.  By default, the user's schema name is used.
-       s_length (IN) - length of the 'schema_name' parameter
-       type_name (IN) - name of the type to get
-       t_length (IN) - length of the 'type_name' parameter
-       version_name (IN, optional) - user readable version of the type.
-                  Pass (oratext *)0 for the most current version.
-       v_length (IN) - length of version_name in bytes. Should be 0 if
-                  the most current version is to be retrieved.
-       pin_duration (IN) - pin duration (e.g. until the end of current
-                  transaction).  See 'oro.h' for a description of
-                  each option.
-       get_option (IN) - options for loading the types. It can be one of two
-                   values:
-                  OCI_TYPEGET_HEADER for only the header to be loaded, or
-                  OCI_TYPEGET_ALL for the TDO and all ADO and MDOs to be
-                    loaded.
-       tdo (OUT) - pointer to the pinned type in the object cache
-  DESCRIPTION:
-       Get a pointer to a version of the existing type associated
-       with schema/type name.
-  RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is null. 
-        OCI_ERROR if
-           1) any of the required parameters is null.
-           2) the adt type associated with schema/type name does not exist.
-  NOTE:
-       Schema and type names are CASE-SENSITIVE. If they have been created
-       via SQL, you need to use uppercase names.
-*/
-
-sword OCITypeArrayByName(    OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc,
-                             ub4 array_len,
-                             CONST oratext *schema_name[], ub4 s_length[],
-                             CONST oratext *type_name[], ub4 t_length[],
-                             CONST oratext *version_name[], ub4 v_length[],
-                             OCIDuration pin_duration,
-                             OCITypeGetOpt get_option, OCIType **tdo    );
-
-/*
-  NAME: OCITypeArrayByName - OCI Get array of TYPes by name.
-  PARAMETERS:
-       env (IN/OUT) - OCI environment handle initialized in object mode
-       err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-       svc (IN) - OCI service handle
-       array_len (IN) - number of schema_name/type_name/version_name entries to
-                  be retrieved.
-       schema_name (IN, optional) - array of schema names associated with the
-                  types to be retrieved.  The array must have array_len
-                  elements if specified.
-                  If 0 is supplied, the default schema is assumed, otherwise
-                  it MUST have array_len number of elements.
-                  0 can be supplied for one or more of the entries to indicate
-                  that the default schema is desired for those entries.
-       s_length (IN) - array of schema_name lengths with each entry
-                  corresponding to the length of the corresponding schema_name
-                  entry in the schema_name array in bytes.
-                  The array must either have array_len number of elements or
-                  it MUST be 0 if schema_name is not specified.
-       type_name (IN) - array of the names of the types to retrieve. This
-                  MUST have array_len number of elements.
-       t_length (IN) - array of the lengths of type names in the type_name
-                  array in bytes.
-       version_name (IN) - array of the version names of the types to retrieve
-                  corresponding. This can be 0 to indicate retrieval of the
-                  most current versions, or it MUST have array_len number of
-                  elements.
-                  If 0 is supplied, the most current version is assumed,
-                  otherwise it MUST have array_len number of elements.
-                  0 can be supplied for one or more of the entries to indicate
-                  that the current version is desired for those entries.
-       v_length (IN) - array of the lengths of version names in the
-                  version_name array in bytes.
-       pin_duration (IN) - pin duration (e.g. until the end of current
-                  transaction) for the types retreieve.  See 'oro.h' for a
-                  description of each option.
-       get_option (IN) - options for loading the types. It can be one of two
-                   values:
-                  OCI_TYPEGET_HEADER for only the header to be loaded, or
-                  OCI_TYPEGET_ALL for the TDO and all ADO and MDOs to be
-                    loaded.
-       tdo (OUT) - output array for the pointers to each pinned type in the
-                  object cache. It must have space for array_len pointers.
-                  Use OCIObjectGetObjectRef() to obtain the CREF to each
-                  pinned type descriptor.
-  DESCRIPTION:
-       Get pointers to the existing types associated with the schema/type name
-       array. This is similar to OCITypeByName() except that all the TDO's are
-       retreived via a single network roundtrip.
-  RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is null. 
-        OCI_ERROR if
-           1) any of the required parameters is null.
-           2) one or more adt types associated with a schema/type name entry
-              does not exist.
-*/
-
-sword   OCITypeByRef(    OCIEnv *env, OCIError *err,
-                         CONST OCIRef *type_ref, OCIDuration pin_duration,
-                         OCITypeGetOpt get_option, OCIType **tdo    );
-
-/*
-  NAME: OCITypeArrayByRef - OCI Get array of TYPes by REF.
-  PARAMETERS:
-       env (IN/OUT) - OCI environment handle initialized in object mode
-       err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-       type_ref (IN) - OCIRef * pointing to the particular version of
-                  the type descriptor object to obtain.
-                  The array must have array_len elements if specified.
-       pin_duration (IN) - pin duration (e.g. until the end of current
-                  transaction) for the type to retreieve.  See 'oro.h' for a
-                  description of each option.
-       get_option (IN) - options for loading the type. It can be one of two
-                   values:
-                  OCI_TYPEGET_HEADER for only the header to be loaded, or
-                  OCI_TYPEGET_ALL for the TDO and all ADO and MDOs to be
-                    loaded.
-       tdo (OUT) - pointer to the pinned type in the object cache
-  DESCRIPTION:
-       Get pointers to the 
-       with the schema/type name array. This is similar to OCITypeByName()
-       except that all the TDO's are retreived via a single network roundtrip.
-  RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is null. 
-        OCI_ERROR if
-           1) any of the required parameters is null.
-           2) one or more adt types associated with a schema/type name entry
-              does not exist.
-*/
-
-sword   OCITypeArrayByRef(    OCIEnv *env, OCIError *err,
-                              ub4 array_len, CONST OCIRef **type_ref,
-                              OCIDuration pin_duration,
-                              OCITypeGetOpt get_option, OCIType **tdo    );
-
-/*
-  NAME: OCITypeArrayByRef - OCI Get array of TYPes by REF.
-  PARAMETERS:
-       env (IN/OUT) - OCI environment handle initialized in object mode
-       err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-       array_len (IN) - number of schema_name/type_name/version_name entries to
-                  be retrieved.
-       type_ref (IN) - array of OCIRef * pointing to the particular version of
-                  the type descriptor object to obtain.
-                  The array must have array_len elements if specified.
-       pin_duration (IN) - pin duration (e.g. until the end of current
-                  transaction) for the types retreieve.  See 'oro.h' for a
-                  description of each option.
-       get_option (IN) - options for loading the types. It can be one of two
-                   values:
-                  OCI_TYPEGET_HEADER for only the header to be loaded, or
-                  OCI_TYPEGET_ALL for the TDO and all ADO and MDOs to be
-                    loaded.
-       tdo (OUT) - output array for the pointers to each pinned type in the
-                  object cache. It must have space for array_len pointers.
-                  Use OCIObjectGetObjectRef() to obtain the CREF to each
-                  pinned type descriptor.
-  DESCRIPTION:
-       Get pointers to the 
-       with the schema/type name array. This is similar to OCITypeByName()
-       except that all the TDO's are retreived via a single network roundtrip.
-  RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is null. 
-        OCI_ERROR if
-           1) any of the required parameters is null.
-           2) one or more adt types associated with a schema/type name entry
-              does not exist.
-*/
-
-
-/*--------------------------------------------------------------------------*/
-/*                              TYPE ACCESSORS                              */
-/*--------------------------------------------------------------------------*/
-
-/*---------------------------- OCITypeName ---------------------------------*/
-
-/* ** OBSOLETE ** */
-oratext* OCITypeName(    OCIEnv *env, OCIError *err, CONST OCIType *tdo, 
-                      ub4 *n_length    );
-/*
-   NAME: OCITypeName -  ORT Get a Type's naME.
-   PARAMETERS:
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        tdo (IN) - pointer to to the type descriptor in the object cache
-        n_length (OUT) - length (in bytes) of the returned type name.  The
-               caller must allocate space for the ub4 before calling this
-               routine.
-   REQUIRES:
-        1) All type accessors require that the type be pinned before calling
-           any accessor.
-        2) All input parameters must not be NULL and must be valid.
-        3) 'n_length' must point to an allocated ub4.
-   DESCRIPTION:
-        Get the name of the type.
-   RETURNS:
-        the name of the type
-   NOTES:
-        The type descriptor, 'tdo', must be unpinned when the accessed 
-        information is no longer needed.
- */
-
-/*------------------------ OCITypeSchema ---------------------------------*/
-
-/* ** OBSOLETE ** */
-oratext* OCITypeSchema(    OCIEnv *env, OCIError *err, CONST OCIType *tdo, 
-                   ub4 *n_length    );
-/*
-   NAME: OCITypeSchema -  ORT Get a Type's SCHema name.
-   PARAMETERS:
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        tdo (IN) - pointer to to the type descriptor in the object cache
-        n_length (OUT) - length (in bytes) of the returned schema name.  The
-               caller must allocate space for the ub4 before calling this
-               routine.
-   REQUIRES:
-        1) All type accessors require that the type be pinned before calling
-           any accessor. 
-        2) All input parameters must not be NULL and must be valid.
-        3) 'n_length' must point to an allocated ub4.
-   DESCRIPTION:
-        Get the schema name of the type.
-   RETURNS:
-        the schema name of the type
-   NOTES:
-        The type descriptor, 'tdo', must be unpinned when the accessed 
-        information is no longer needed.
- */
-
-/*------------------------ OCITypeTypeCode ---------------------------------*/
-
-/* ** OBSOLETE ** */
-OCITypeCode OCITypeTypeCode(    OCIEnv *env, OCIError *err,
-                                CONST OCIType *tdo    );
-/*
-   NAME: OCITypeTypeCode - OCI Get a Type's Type Code.
-   PARAMETERS: 
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        tdo (IN) - pointer to to the type descriptor in the object cache
-   REQUIRES:
-        1) All type accessors require that the type be pinned before calling 
-           any accessor. 
-        2) All input parameters must not be NULL and must be valid.
-   DESCRIPTION:
-        Get the type code of the type.
-   RETURNS:
-        The type code of the type.
-   NOTES:
-        The type descriptor, 'tdo', must be unpinned when the accessed 
-        information is no longer needed.
- */
-
-/*----------------------- OCITypeCollTypeCode -------------------------------*/
-
-/* ** OBSOLETE ** */
-OCITypeCode OCITypeCollTypeCode(    OCIEnv *env, OCIError *err,
-                                    CONST OCIType *tdo    );
-/*
-   NAME: OCITypeCollTypeCode - OCI Get a Domain Type's Type Code.
-   PARAMETERS: 
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        tdo (IN) - pointer to to the type descriptor in the object cache
-   REQUIRES:
-        1) All type accessors require that the type be pinned before calling 
-           any accessor. 
-        2) All input parameters must not be NULL and must be valid.
-        3) 'tdo' MUST point to a named collection type.
-   DESCRIPTION:
-        Get the type code of the named collection type. For V8.0, named
-        collection types can only be variable length arrays and nested tables.
-   RETURNS:
-        OCI_TYPECODE_VARRAY for variable length array, and
-        OCI_TYPECODE_TABLE for nested tables.
-   NOTES:
-        The type descriptor, 'tdo', should be unpinned when the accessed 
-        information is no longer needed.
- */
-
-/*------------------------- OCITypeVersion ---------------------------------*/
-
-/* ** OBSOLETE ** */
-oratext* OCITypeVersion(    OCIEnv *env, OCIError *err, CONST OCIType *tdo, 
-                         ub4 *v_length    );
-/*
-   NAME: OCITypeVersion - OCI Get a Type's user-readable VersioN. 
-   PARAMETERS: 
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        tdo (IN) - pointer to to the type descriptor in the object cache
-        v_length (OUT) - length (in bytes) of the returned user-readable 
-               version.  The caller must allocate space for the ub4 before 
-               calling this routine.
-   REQUIRES:
-        1) All type accessors require that the type be pinned before calling 
-           any accessor. 
-        2) All input parameters must not be NULL and must be valid.
-        3) 'v_length' must point to an allocated ub4.
-   DESCRIPTION:
-        Get the user-readable version of the type.
-   RETURNS:
-        The user-readable version of the type
-   NOTES:
-        The type descriptor, 'tdo', must be unpinned when the accessed 
-        information is no longer needed.
- */
-
-/*--------------------------- OCITypeAttrs ---------------------------------*/
-
-/* ** OBSOLETE ** */
-ub4 OCITypeAttrs(    OCIEnv *env, OCIError *err, CONST OCIType *tdo    );
-/*
-   NAME: OCITypeAttrs - OCI Get a Type's Number of Attributes. 
-   PARAMETERS: 
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        tdo (IN) - pointer to to the type descriptor in the object cache
-   REQUIRES:
-        1) All type accessors require that the type be pinned before calling 
-           any accessor. 
-        2) All input parameters must not be NULL and must be valid.
-   DESCRIPTION:
-        Get the number of attributes in the type.
-   RETURNS:
-        The number of attributes in the type. 0 for ALL non-ADTs.
-   NOTES:
-        The type descriptor, 'tdo', must be unpinned when the accessed 
-        information is no longer needed.
- */
-
-/*------------------------- OCITypeMethods ---------------------------------*/
-
-/* ** OBSOLETE ** */
-ub4 OCITypeMethods(    OCIEnv *env, OCIError *err, CONST OCIType *tdo    );
-/*
-   NAME: OCITypeMethods - OCI Get a Type's Number of Methods. 
-   PARAMETERS: 
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        tdo (IN) - pointer to to the type descriptor in the object cache
-   REQUIRES:
-        1) All type accessors require that the type be pinned before calling 
-           any accessor. 
-        2) All input parameters must not be NULL and must be valid.
-   DESCRIPTION:
-        Get the number of methods in a type.
-   RETURNS:
-        The number of methods in the type
-   NOTES:
-        The type descriptor, 'tdo', must be unpinned when the accessed 
-        information is no longer needed.
- */
-
-
-/*--------------------------------------------------------------------------*/
-/*                     TYPE ELEMENT INFORMATION ACCESSORS                   */
-/*--------------------------------------------------------------------------*/
-
-/*------------------------ OCITypeElemName ---------------------------------*/
-
-/* ** OBSOLETE ** */
-oratext* OCITypeElemName(    OCIEnv *env, OCIError *err, 
-                           CONST OCITypeElem *elem, ub4 *n_length    );
-/*
-   NAME: OCITypeElemName - OCI Get an Attribute's NaMe. 
-   PARAMETERS: 
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        elem (IN) - pointer to the type element descriptor in the object cache
-        n_length (OUT) - length (in bytes) of the returned attribute name.  
-               The caller must allocate space for the ub4 before calling this 
-               routine.
-   REQUIRES:
-        1) All type accessors require that the type be pinned before calling 
-           any accessor. 
-        2) All input parameters must not be NULL and must be valid.
-        3) 'n_length' must point to an allocated ub4.
-   DESCRIPTION:
-        Get the name of the attribute.
-   RETURNS:
-        the name of the attribute and the length in n_length
-   NOTES:
-        The type must be unpinned when the accessed information is no 
-        longer needed.
- */
-
-/*------------------------ OCITypeElemTypeCode ------------------------------*/
-
-/* ** OBSOLETE ** */
-OCITypeCode OCITypeElemTypeCode(    OCIEnv *env, OCIError *err,
-                                    CONST OCITypeElem *elem    );
-/*
-   NAME: OCITypeElemTypeCode - OCI Get an Attribute's TypeCode. 
-   PARAMETERS: 
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        elem (IN) - pointer to the type element descriptor in the object cache
-   REQUIRES:
-        1) All type accessors require that the type be pinned before calling 
-           any accessor. 
-        2) All input parameters must not be NULL and must be valid.
-   DESCRIPTION:
-        Get the typecode of an attribute's type.
-   RETURNS:
-        the typecode of the attribute's type.  If this is a scalar type, the 
-        typecode sufficiently describes the scalar type and no further calls 
-        need to be made.  Valid scalar types include: OCI_TYPECODE_SIGNED8,
-        OCI_TYPECODE_UNSIGNED8, OCI_TYPECODE_SIGNED16, OCI_TYPECODE_UNSIGNED16,
-        OCI_TYPECODE_SIGNED32, OCI_TYPECODE_UNSIGNED32, OCI_TYPECODE_REAL,
-        OCI_TYPECODE_DOUBLE, OCI_TYPECODE_DATE,
-        OCI_TYPECODE_MLSLABEL, OROTCOID, OCI_TYPECODE_OCTET, or OROTCLOB.
-        This function converts the CREF (stored in the attribute) into a
-        typecode.
-   NOTES:
-       The type must be unpinned when the accessed information is no 
-       longer needed.
- */
-
-/*------------------------ OCITypeElemType ---------------------------------*/
-
-/* ** OBSOLETE ** */
-sword OCITypeElemType(    OCIEnv *env, OCIError *err, CONST OCITypeElem *elem, 
-                          OCIType **elem_tdo    );
-/*
-  PARAMETERS
-     env (IN/OUT) - OCI environment handle initialized in object mode
-     err (IN/OUT) - error handle. If there is an error, it is
-             recorded in 'err' and this function returns OCI_ERROR.
-             The error recorded in 'err' can be retrieved by calling
-             OCIErrorGet().
-     elem (IN) - pointer to the type element descriptor in the object cache
-     elem_tdo (OUT) - If the function completes successfully, 'elem_tdo'
-            points to the type descriptor (in the object cache) of the type of
-            the element.
-
-  REQUIRES
-     1) All type accessors require that the type be pinned before calling
-        any accessor.  This can be done by calling 'OCITypeByName()'.
-     2) if 'elem' is not null, it must point to a valid type element descriptor
-        in the object cache.
-
-  DESCRIPTION
-     Get the type tdo of the type of this element.
-  RETURNS
-     OCI_SUCCESS if the function completes successfully.
-     OCI_INVALID_HANDLE if 'env' or 'err' is null. 
-     OCI_ERROR if
-         1) any of the parameters is null.
-
-  NOTES
-     The type must be unpinned when the accessed information is no
-     longer needed.  This can be done by calling 'OCIObjectUnpin()'.
- */
-
-/*------------------------- OCITypeElemFlags -------------------------------*/
-
-/* ** OBSOLETE ** */
-ub4 OCITypeElemFlags(    OCIEnv *env, OCIError *err,
-                         CONST OCITypeElem *elem    );
-/*
-   NAME: OCITypeElemFlags - OCI Get a Elem's FLags
-                              (inline, constant, virtual, constructor,
-                              destructor). 
-   PARAMETERS: 
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        elem (IN) - pointer to the type element descriptor in the object cache
-   REQUIRES:
-        1) All type accessors require that the type be pinned before calling 
-           any accessor. 
-        2) All input parameters must not be NULL and must be valid.
-   DESCRIPTION:
-        Get the flags of a type element (attribute, parameter).
-   RETURNS:
-        The flags of the type element.
-   NOTES:
-        The flag bits are not externally documented. Use only the macros
-        in the last section (ie. OCI_TYPEPARAM_IS_REQUIRED, and
-        OCI_TYPEELEM_IS_REF) to test for them only. The type must be unpinned
-        when the accessed information is no longer needed.
- */
-
-/*------------------------ OCITypeElemNumPrec ------------------------------*/
-
-/* ** OBSOLETE ** */
-ub1 OCITypeElemNumPrec(    OCIEnv *env, OCIError *err,
-                           CONST OCITypeElem *elem    );
-/*
-   NAME: OCITypeElemNumPrec - Get a Number's Precision.  This includes float,
-                              decimal, real, double, and oracle number.
-   PARAMETERS: 
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        elem (IN) - pointer to the type element descriptor in the object cache
-   REQUIRES:
-        All input parameters must not be NULL and must be valid.
-   DESCRIPTION:
-        Get the precision of a float, decimal, long, unsigned long, real, 
-        double, or Oracle number type. 
-   RETURNS:
-        the precision of the float, decimal, long, unsigned long, real, double,
-        or Oracle number 
- */
-
-/*------------------------- OCITypeElemNumScale -----------------------------*/
-
-/* ** OBSOLETE ** */
-sb1 OCITypeElemNumScale(    OCIEnv *env, OCIError *err,
-                            CONST OCITypeElem *elem    );
-/*
-   NAME: OCITypeElemNumScale - Get a decimal or oracle Number's Scale 
-   PARAMETERS: 
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        elem (IN) - pointer to the type element descriptor in the object cache
-   REQUIRES:
-        All input parameters must not be NULL and must be valid.
-   DESCRIPTION:
-        Get the scale of a decimal, or Oracle number type. 
-   RETURNS:
-        the scale of the decimal, or Oracle number 
- */
-
-/*------------------------ OCITypeElemLength -------------------------------*/
-
-/* ** OBSOLETE ** */
-ub4 OCITypeElemLength(    OCIEnv *env, OCIError *err,
-                          CONST OCITypeElem *elem    );
-/*
-   NAME: OCITypeElemLength - Get a raw, fixed or variable length String's
-                             length in bytes.
-   PARAMETERS: 
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        elem (IN) - pointer to the type element descriptor in the object cache
-   REQUIRES:
-        All input parameters must not be NULL and must be valid.
-   DESCRIPTION:
-        Get the length of a raw, fixed or variable length string type. 
-   RETURNS:
-        length of the raw, fixed or variable length string
- */
-
-/*----------------------- OCITypeElemCharSetID -----------------------------*/
-
-/* ** OBSOLETE ** */
-ub2 OCITypeElemCharSetID(    OCIEnv *env, OCIError *err,
-                             CONST OCITypeElem *elem    );
-/*
-   NAME: OCITypeElemCharSetID - Get a fixed or variable length String's
-                                character set ID
-   PARAMETERS: 
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        elem (IN) - pointer to the type element descriptor in the object cache
-   REQUIRES:
-        All input parameters must not be NULL and must be valid.
-   DESCRIPTION:
-        Get the character set ID of a fixed or variable length string type. 
-   RETURNS:
-        character set ID of the fixed or variable length string
- */
-
-/*---------------------- OCITypeElemCharSetForm ----------------------------*/
-
-/* ** OBSOLETE ** */
-ub2 OCITypeElemCharSetForm(    OCIEnv *env, OCIError *err,
-                               CONST OCITypeElem *elem    );
-/*
-   NAME: OCITypeElemCharSetForm - Get a fixed or variable length String's
-                                  character set specification form.
-   PARAMETERS: 
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        elem (IN) - pointer to the attribute information in the object cache
-   REQUIRES:
-        All input parameters must not be NULL and must be valid.
-   DESCRIPTION:
-        Get the character form of a fixed or variable length string type.
-        The character form is an enumerated value that can be one of the
-        4 values below:
-               SQLCS_IMPLICIT for CHAR, VARCHAR2, CLOB w/o a specified set
-               SQLCS_NCHAR    for NCHAR, NCHAR VARYING, NCLOB
-               SQLCS_EXPLICIT for CHAR, etc, with "CHARACTER SET ..." syntax
-               SQLCS_FLEXIBLE for PL/SQL "flexible" parameters
-   RETURNS:
-        character form of the fixed or variable string
- */
-
-/*--------------------- OCITypeElemParameterizedType ------------------------*/
-
-/* ** OBSOLETE ** */
-sword OCITypeElemParameterizedType(    OCIEnv *env, OCIError *err,
-                                       CONST OCITypeElem *elem, 
-                                       OCIType **type_stored    );
-/*
-   NAME: OCITypeElemParameterizedType 
-   PARAMETERS: 
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        elem (IN) - pointer to the type element descriptor in the object cache
-        type_stored (OUT) - If the function completes successfully, 
-               and the parameterized type is complex, 'type_stored' is NULL.
-               Otherwise, 'type_stored' points to the type descriptor (in the 
-               object cache) of the type that is stored in the parameterized 
-               type.  The caller must allocate space for the OCIType* 
-               before calling this routine and must not write into the space.
-   REQUIRES:
-        All input parameters must be valid.
-   DESCRIPTION:
-        Get a descriptor to the parameter type of a parameterized type.
-        Parameterized types are types of the form:
-          REF T
-          VARRAY (n) OF T
-        etc, where T is the parameter in the parameterized type.
-        Additionally is_ref is set if the parameter is a PTR or REF.
-        For example, it is set for REF T or VARRAY(n) OF REF T.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is null. 
-        OCI_ERROR if
-            1) any of the parameters is null.
-            2) 'type_stored' is not NULL but points to NULL data.
-   NOTES:
-        Complex parameterized types will be in a future release (once 
-        typedefs are supported.  When setting the parameterized type 
-        information, the user must typedef the contents if it's a
-        complex parameterized type.  Ex. for varray<varray<car>>, use
-        'typedef varray<car> varcar' and then use varray<varcar>. 
- */
-
-/*----------------------- OCITypeElemExtTypeCode ----------------------------*/
- 
-/* ** OBSOLETE ** */
-OCITypeCode OCITypeElemExtTypeCode(    OCIEnv *env, OCIError *err,
-                                       CONST OCITypeElem *elem    );
-/*
-   NAME: OCITypeElemExtTypeCode - OCI Get an element's SQLT constant.
-   PARAMETERS:
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        elem (IN) - pointer to the type element descriptor in the object cache
-   REQUIRES:
-        1) All type accessors require that the type be pinned before calling
-           any accessor.
-        2) All input parameters must not be NULL and must be valid.
-   DESCRIPTION:
-        Get the internal Oracle typecode associated with an attribute's type.
-        This is the actual typecode for the attribute when it gets mapped
-        to a column in the Oracle database.
-   RETURNS:
-        The Oracle typecode associated with the attribute's type.
-   NOTES:
-        The type must be unpinned when the accessed information is no
-        longer needed.
- */
-
-/*--------------------------------------------------------------------------*/
-/*                           ATTRIBUTE ACCESSORS                            */
-/*--------------------------------------------------------------------------*/
-
-/*------------------------ OCITypeAttrByName -------------------------------*/
-
-/* ** OBSOLETE ** */
-sword OCITypeAttrByName(    OCIEnv *env, OCIError *err, CONST OCIType *tdo, 
-                            CONST oratext *name, ub4 n_length,
-                            OCITypeElem **elem    );
-/*
-   NAME: OCITypeAttrByName - OCI Get an Attribute By Name. 
-   PARAMETERS: 
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        tdo (IN) - pointer to to the type descriptor in the object cache
-        name (IN) - the attribute's name 
-        n_length (IN) - length (in bytes) of the 'name' parameter
-        elem (OUT) - If this function completes successfully, 'elem' points to 
-               the selected type element descriptor pertaining to the
-               attributein the object cache.
-   REQUIRES:
-        1) All type accessors require that the type be pinned before calling 
-           any accessor. 
-        2) if 'tdo' is not null, it must point to a valid type descriptor 
-           in the object cache.
-   DESCRIPTION:
-        Get an attribute given its name.  
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is null. 
-        OCI_ERROR if
-            1) any of the required parameters is null.
-            2) the type does not contain an attribute with the input 'name'. 
-            3) 'name' is NULL.
-   NOTES:
-        The type descriptor, 'tdo', must be unpinned when the accessed 
-        information is no longer needed.
-        Schema and type names are CASE-SENSITIVE. If they have been created
-        via SQL, you need to use uppercase names.
- */
-
-/*------------------------ OCITypeAttrNext ---------------------------------*/
-
-/* ** OBSOLETE ** */
-sword OCITypeAttrNext(    OCIEnv *env, OCIError *err, 
-                        OCITypeIter *iterator_ort, OCITypeElem **elem    );
-
-/*
-   NAME: OCITypeAttrNext - OCI Get an Attribute By Iteration.
-   PARAMETERS: 
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        iterator_ort (IN/OUT) - iterator for retrieving the next attribute;
-               see OCITypeIterNew() to initialize iterator.
-        elem (OUT) - If this function completes successfully, 'elem' points to 
-               the selected type element descriptor pertaining to the
-               attributein the object cache.
-   REQUIRES:
-        1) All type accessors require that the type be pinned before calling 
-            any accessor. 
-        2) if 'tdo' is not null, it must point to a valid type descriptor 
-           in the object cache.
-   DESCRIPTION:
-        Iterate to the next attribute to retrieve.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_NO_DATA if there are no more attributes to iterate on; use
-            OCITypeIterSet() to reset the iterator if necessary.
-        OCI_INVALID_HANDLE if 'env' or 'err' is null. 
-        OCI_ERROR if
-            1) any of the required parameters is null.
-   NOTES:
-        The type must be unpinned when the accessed information is no 
-        longer needed.
- */
-
-/*--------------------------------------------------------------------------*/
-/*                           COLLECTION ACCESSORS                           */
-/*--------------------------------------------------------------------------*/
-
-/*------------------------ OCITypeCollElem ---------------------------------*/
-
-/* ** OBSOLETE ** */
-sword OCITypeCollElem(    OCIEnv *env, OCIError *err, CONST OCIType *tdo,
-                          OCITypeElem **element    );
-/*
-   NAME: OCITypeCollElem
-   PARAMETERS: 
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        tdo (IN) - pointer to the type descriptor in the object cache
-        element (IN/OUT) - If the function completes successfully, this
-               points to the descriptor for the collection's element.
-               It is stored in the same format as an ADT attribute's
-               descriptor.
-               If *element is NULL, OCITypeCollElem() implicitly allocates a
-               new instance of OCITypeElem in the object cache. This instance
-               will be
-               automatically freed at the end of the session, and does not have
-               to be freed explicitly.
-               If *element is not NULL, OCITypeCollElem() assumes that it
-               points to a valid OCITypeElem descriptor and will copy the
-               results into it.
-   REQUIRES:
-        All input parameters must be valid.
-   DESCRIPTION:
-        Get a pointer to the descriptor (OCITypeElem) of the element of an
-        array or the rowtype of a nested table.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is null. 
-        OCI_ERROR if
-            1) any of the parameters is null.
-            2) the type TDO does not point to a valid collection's type.
-   NOTES:
-        Complex parameterized types will be in a future release (once 
-        typedefs are supported.  When setting the parameterized type 
-        information, the user must typedef the contents if it's a
-        complex parameterized type.  Ex. for varray<varray<car>>, use
-        'typedef varray<car> varcar' and then use varray<varcar>. 
- */
-
-/*------------------------ OCITypeCollSize ---------------------------------*/
-
-/* ** OBSOLETE ** */
-sword OCITypeCollSize(    OCIEnv *env, OCIError *err, CONST OCIType *tdo, 
-                          ub4 *num_elems    );
-/*
-   NAME: OCITypeCollSize - OCI Get a Collection's Number of Elements.
-   PARAMETERS: 
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        tdo (IN) - pointer to the type descriptor in the object cache
-        num_elems (OUT) - number of elements in collection
-   REQUIRES:
-        All input parameters must be valid. tdo points to an array type
-        defined as a domain.
-   DESCRIPTION:
-        Get the number of elements stored in a fixed array or the maximum 
-        number of elements in a variable array.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is null. 
-        OCI_ERROR if
-            1) any of the parameters is null.
-            2) 'tdo' does not point to a domain with a collection type.
-   NOTES:
-        Complex parameterized types will be in a future release (once 
-        typedefs are supported.  When setting the parameterized type 
-        information, the user must typedef the contents if it's a
-        complex parameterized type.  Ex. for varray<varray<car>>, use
-        'typedef varray<car> varcar' and then use varray<varcar>. 
- */
-
-/*------------------------ OCITypeCollExtTypeCode ---------------------------*/
- 
-/* ** OBSOLETE ** */
-sword OCITypeCollExtTypeCode(    OCIEnv *env, OCIError *err,
-                               CONST OCIType *tdo, OCITypeCode *sqt_code    );
-/*
-   NAME: ortcsqt - OCI Get a Collection element's DTY constant.
-   PARAMETERS:
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        tdo (IN) - pointer to the type descriptor in the object cache
-        sqt_code (OUT) - SQLT code of type element.
-   REQUIRES:
-        1) All type accessors require that the type be pinned before calling
-           any accessor.
-        2) All input parameters must not be NULL and must be valid.
-   DESCRIPTION:
-        Get the SQLT constant associated with an domain's element type.
-        The SQLT codes are defined in <sqldef.h> and are needed for OCI/OOCI
-        use.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is null.
-        OCI_ERROR if
-            1) any of the parameters is null.
-            2) 'tdo' does not point to a domain with a collection type.
-   NOTES:
-        The type must be unpinned when the accessed information is no
-        longer needed.
- */
- 
-
-/*--------------------------------------------------------------------------*/
-/*                             METHOD ACCESSORS                             */
-/*--------------------------------------------------------------------------*/
-
-/*------------------------- OCITypeMethodOverload --------------------------*/
-
-/* ** OBSOLETE ** */
-ub4 OCITypeMethodOverload(    OCIEnv *env, OCIError *err, CONST OCIType *tdo, 
-                              CONST oratext *method_name, ub4 m_length    );
-/*
-   NAME: OCITypeMethodOverload - OCI Get type's Number of Overloaded names
-                                 for the given method name.
-   PARAMETERS:
-        gp (IN/OUT) - pga environment handle.  Any errors are recorded here.
-        tdo (IN) - pointer to to the type descriptor in the object cache
-        method_name (IN) - the method's name
-        m_length (IN) - length (in bytes) of the 'method_name' parameter
-   REQUIRES:
-        1) All type accessors require that the type be pinned before calling
-           any accessor.
-        2) if 'tdo' is not null, it must point to a valid type descriptor
-           in the object cache.
-   DESCRIPTION:
-        Overloading of methods implies that more than one method may have the
-        same method name.  This routine returns the number of methods that
-        have the given method name.  If there are no methods with the input
-        method name, 'num_methods' is 0.  The caller uses this information when
-        allocating space for the array of mdo and/or position pointers before
-        calling 'OCITypeMethodByName()' or 'ortgmps()'.
-   RETURNS:
-        The number of methods with the given name. 0 if none contains the
-        name.
-   NOTES:
-        Schema and type names are CASE-SENSITIVE. If they have been created
-        via SQL, you need to use uppercase names.
- */
-
-/*------------------------ OCITypeMethodByName ------------------------------*/
-
-/* ** OBSOLETE ** */
-sword OCITypeMethodByName(    OCIEnv *env, OCIError *err, CONST OCIType *tdo, 
-                              CONST oratext *method_name, ub4 m_length,
-                              OCITypeMethod **mdos    );
-/*
-   NAME: OCITypeMethodByName - OCI Get one or more Methods with Name. 
-   PARAMETERS: 
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        tdo (IN) - pointer to to the type descriptor in the object cache
-        method_name (IN) - the methods' name  
-        m_length (IN) - length (in bytes) of the 'name' parameter
-        mdos (OUT) - If this function completes successfully, 'mdos' points to
-                the selected methods in the object cache.  The caller must
-                allocate space for the array of OCITypeMethod pointers before
-                calling this routine and must not write into the space.
-                The number of OCITypeMethod pointers that will be returned can
-                be obtained by calling 'OCITypeMethodOverload()'.
-   REQUIRES:
-        1) All type accessors require that the type be pinned before calling 
-           any accessor. 
-        2) if 'tdo' is not null, it must point to a valid type descriptor 
-           in the object cache.
-   DESCRIPTION:
-        Get one or more methods given the name.  
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is null. 
-        OCI_ERROR if
-            1) any of the required parameters is null.
-            2) No methods in type has name 'name'.
-            3) 'mdos' is not NULL but points to NULL data.
-   NOTES:
-        The type must be unpinned when the accessed information is no 
-        longer needed.
-        Schema and type names are CASE-SENSITIVE. If they have been created
-        via SQL, you need to use uppercase names.
- */
-
-/*------------------------ OCITypeMethodNext --------------------------------*/
-
-/* ** OBSOLETE ** */
-sword OCITypeMethodNext(    OCIEnv *env, OCIError *err, 
-                            OCITypeIter *iterator_ort,
-                            OCITypeMethod **mdo   );
-
-/*
-   NAME: OCITypeMethodNext - OCI Get a Method By Iteration.
-   PARAMETERS: 
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        iterator_ort (IN/OUT) - iterator for retrieving the next method;
-               see OCITypeIterNew() to set iterator.
-        mdo (OUT) - If this function completes successfully, 'mdo' points to 
-               the selected method descriptor in the object cache.  Positions 
-               start at 1.  The caller must allocate space for the
-               OCITypeMethod* before calling this routine and must not write 
-               nto the space. 
-   REQUIRES:
-         1) All type accessors require that the type be pinned before calling 
-            any accessor. 
-        2) if 'tdo' is not null, it must point to a valid type descriptor 
-           in the object cache.
-   DESCRIPTION:
-        Iterate to the next method to retrieve.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_NO_DATA if there are no more attributes to iterate on; use
-            OCITypeIterSet() to reset the iterator if necessary.
-        OCI_INVALID_HANDLE if 'env' or 'err' is null. 
-        OCI_ERROR if
-            1) any of the required parameters is null.
-            2) 'mdo' is not NULL but points to NULL data.
-   NOTES:
-        The type must be unpinned when the accessed information is no 
-        longer needed.
- */
-
-/*------------------------ OCITypeMethodName --------------------------------*/
-
-/* ** OBSOLETE ** */
-oratext *OCITypeMethodName(    OCIEnv *env, OCIError *err,
-                            CONST OCITypeMethod *mdo, ub4 *n_length    );
-/*
-   NAME: OCITypeMethodName - OCI Get a Method's NaMe. 
-   PARAMETERS: 
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        mdo (IN) - pointer to the method descriptor in the object cache
-        n_length (OUT) - length (in bytes) of the 'name' parameter.  The caller
-               must allocate space for the ub4 before calling this routine.
-   REQUIRES:
-        1) All type accessors require that the type be pinned before calling 
-           any accessor. 
-        2) All input parameters must not be NULL and must be valid.
-   DESCRIPTION:
-        Get the (non-unique) real name of the method.
-   RETURNS:
-        the non-unique name of the method or NULL if there is an error.
-   NOTES:
-        The type must be unpinned when the accessed information is no 
-        longer needed.
- */
-
-/*------------------------ OCITypeMethodEncap -------------------------------*/
-
-/* ** OBSOLETE ** */
-OCITypeEncap OCITypeMethodEncap(    OCIEnv *env, OCIError *err,
-                                    CONST OCITypeMethod *mdo    );
-/*
-   NAME: OCITypeMethodEncap - Get a Method's ENcapsulation (private/public). 
-   PARAMETERS: 
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        mdo (IN) - pointer to the method descriptor in the object cache
-   REQUIRES:
-        1) All type accessors require that the type be pinned before calling 
-           any accessor. 
-        2) All input parameters must not be NULL and must be valid.
-   DESCRIPTION:
-        Get the encapsulation (private, or public) of a method.
-   RETURNS:
-        the encapsulation (private, or public) of the method
-   NOTES:
-        The type must be unpinned when the accessed information is no 
-        longer needed.
- */
-
-/*------------------------ OCITypeMethodFlags -------------------------------*/
-
-/* ** OBSOLETE ** */
-OCITypeMethodFlag OCITypeMethodFlags(    OCIEnv *env, OCIError *err,
-                                         CONST OCITypeMethod *mdo    );
-/*
-   NAME: OCITypeMethodFlags - OCI Get a Method's FLags
-                              (inline, constant, virtual, constructor,
-                              destructor). 
-   PARAMETERS: 
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        mdo (IN) - pointer to the method descriptor in the object cache
-   REQUIRES:
-        1) All type accessors require that the type be pinned before calling 
-           any accessor. 
-        2) All input parameters must not be NULL and must be valid.
-   DESCRIPTION:
-        Get the flags (inline, constant, virutal, constructor, destructor) of
-        a method.
-   RETURNS:
-        the flags (inline, constant, virutal, constructor, destructor) of
-        the method
-   NOTES:
-        The type must be unpinned when the accessed information is no 
-        longer needed.
- */
-
-/*------------------------ OCITypeMethodMap ---------------------------------*/
-
-/* ** OBSOLETE ** */
-sword OCITypeMethodMap(    OCIEnv *env, OCIError *err, CONST OCIType *tdo, 
-                           OCITypeMethod **mdo    );
-/*
-   NAME: OCITypeMethodMap - OCI Get the Method's MAP function.
-   PARAMETERS: 
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        tdo (IN) - pointer to to the type descriptor in the object cache
-        mdo (OUT) - If this function completes successfully, and there is a 
-               map function for this type, 'mdo' points to the selected method 
-               descriptor in the object cache.  Otherwise, 'mdo' is null.
-   REQUIRES:
-        1) All type accessors require that the type be pinned before calling 
-           any accessor. 
-        2) All required input parameters must not be NULL and must be valid.
-   DESCRIPTION:
-        A type may have only one map function.  'OCITypeMethodMap()' finds
-        this function, if it exists, and returns a reference and a pointer to
-        the method descriptor in the object cache.  If the type does not have a
-        map (relative ordering) function, then 'mdo_ref' and 'mdo' are set
-        to null and an error is returned.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is null. 
-        OCI_ERROR if
-            the type does not contain a map function.
-   NOTES:
-        The type must be unpinned when the accessed information is no 
-        longer needed.
- */
-
-/*------------------------ OCITypeMethodOrder -------------------------------*/
-
-/* ** OBSOLETE ** */
-sword OCITypeMethodOrder(    OCIEnv *env, OCIError *err, CONST OCIType *tdo, 
-                             OCITypeMethod **mdo    );
-/*
-   NAME: OCITypeMethodOrder - OCI Get the Method's ORder function.
-   PARAMETERS: 
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        tdo (IN) - pointer to to the type descriptor in the object cache
-        mdo (OUT) - If this function completes successfully, and there is a 
-               map function for this type, 'mdo' points to the selected method 
-               descriptor in the object cache.  Otherwise, 'mdo' is null.
-   REQUIRES:
-        1) All type accessors require that the type be pinned before calling 
-           any accessor. 
-        2) All required input parameters must not be NULL and must be valid.
-   DESCRIPTION:
-        A type may have only one ORder or MAP function. 'OCITypeMethodOrder()'
-        finds this function, if it exists, and returns a ref and a pointer
-        to the method descriptor in the object cache.  If the type does not
-        have a map (relative ordering) function, then 'mdo_ref' and 'mdo' are
-        set to null and an error is returned.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is null. 
-        OCI_ERROR if
-            the type does not contain a map function.
-   NOTES:
-        The type must be unpinned when the accessed information is no 
-        longer needed.
- */
-
-/*------------------------ OCITypeMethodParams ------------------------------*/
-
-/* ** OBSOLETE ** */
-ub4 OCITypeMethodParams(    OCIEnv *env, OCIError *err,
-                            CONST OCITypeMethod *mdo    );
-/*
-   NAME: OCITypeMethodParams - OCI Get a Method's Number of Parameters. 
-   PARAMETERS: 
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        mdo (IN) - pointer to the method descriptor in the object cache
-   REQUIRES:
-        1) All type accessors require that the type be pinned before calling 
-           any accessor. 
-        2) All input parameters must not be NULL and must be valid.
-   DESCRIPTION:
-        Get the number of parameters in a method.
-   RETURNS:
-        the number of parameters in the method
-   NOTES:
-        The type must be unpinned when the accessed information is no 
-        longer needed.
- */
-
-
-/*--------------------------------------------------------------------------*/
-/*                             RESULT ACCESSORS                             */
-/*--------------------------------------------------------------------------*/
-
-/*-------------------------- OCITypeResult ---------------------------------*/
-
-/* ** OBSOLETE ** */
-sword OCITypeResult(    OCIEnv *env, OCIError *err, CONST OCITypeMethod *mdo,
-                        OCITypeElem **elem    );
-/*
-   NAME: OCITypeResult - OCI Get a method's result type descriptor.
-   PARAMETERS: 
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        mdo (IN) - pointer to the method descriptor in the object cache
-        elem (OUT) - If this function completes successfully, 'rdo' points to 
-               the selected result (parameter) descriptor in the object cache.
-   REQUIRES:
-        1) All type accessors require that the type be pinned before calling 
-           any accessor.
-        2) 'elem' MUST be the address of an OCITypeElem pointer.
-   DESCRIPTION:
-        Get the result of a method.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is null. 
-        OCI_ERROR if
-            1) any of the required parameters is null.
-            2) method returns no results.
-   NOTES:
-        The method must be unpinned when the accessed information is no 
-        longer needed.
- */
-
-
-/*--------------------------------------------------------------------------*/
-/*                           PARAMETER ACCESSORS                            */
-/*--------------------------------------------------------------------------*/
-
-/*------------------------ OCITypeParamByPos -------------------------------*/
-
-/* ** OBSOLETE ** */
-sword OCITypeParamByPos(    OCIEnv *env, OCIError *err,
-                            CONST OCITypeMethod *mdo, ub4 position, 
-                            OCITypeElem **elem    );
-/*
-   NAME: OCITypeParamByPos - OCI Get a Parameter in a method By Position. 
-   PARAMETERS: 
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        mdo (IN) - pointer to the method descriptor in the object cache
-        position (IN) - the parameter's position.  Positions start at 1.
-        elem (OUT) - If this function completes successfully, 'elem' points to 
-               the selected parameter descriptor in the object cache.
-   REQUIRES:
-        1) All type accessors require that the type be pinned before calling 
-           any accessor. 
-   DESCRIPTION:
-        Get a parameter given its position in the method.  Positions start 
-        at 1.  
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is null. 
-        OCI_ERROR if
-            1) any of the required parameters is null.
-            2) 'position' is not >= 1 and <= the number of parameters in the
-               method.
-   NOTES:
-        The type must be unpinned when the accessed information is no 
-        longer needed.
- */
-
-/*------------------------ OCITypeParamByName -------------------------------*/
-
-/* ** OBSOLETE ** */
-sword OCITypeParamByName(    OCIEnv *env, OCIError *err,
-                             CONST OCITypeMethod *mdo, 
-                             CONST oratext *name, ub4 n_length,
-                             OCITypeElem **elem    );
-/*
-   NAME: OCITypeParamByName - OCI Get a Parameter in a method By Name. 
-   PARAMETERS: 
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        mdo (IN) - pointer to the method descriptor in the object cache
-        name (IN) - the parameter's name
-        n_length (IN) - length (in bytes) of the 'name' parameter
-        elem (OUT) - If this function completes successfully, 'elem' points to 
-               the selected parameter descriptor in the object cache.
-   REQUIRES:
-        1) All type accessors require that the type be pinned before calling 
-           any accessor. 
-        2) if 'mdo' is not null, it must point to a valid method descriptor 
-           in the object cache.
-   DESCRIPTION:
-        Get a parameter given its name.  
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is null. 
-        OCI_ERROR if
-            1) any of the required parameters is null.
-            2) the method does not contain a parameter with the input 'name'. 
-   NOTES:
-        The type must be unpinned when the accessed information is no 
-        longer needed.
- */
-
-/*------------------------ OCITypeParamPos ---------------------------------*/
-
-/* ** OBSOLETE ** */
-sword OCITypeParamPos(    OCIEnv *env, OCIError *err,
-                          CONST OCITypeMethod *mdo, 
-                          CONST oratext *name, ub4 n_length, ub4 *position, 
-                          OCITypeElem **elem    );
-/*
-   NAME: OCITypeParamPos - OCI Get a parameter's position in a method
-   PARAMETERS: 
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        mdo (IN) - pointer to the method descriptor in the object cache
-        name (IN) - the parameter's name
-        n_length (IN) - length (in bytes) of the 'name' parameter
-        position (OUT) - If this function completes successfully, 'position' 
-               points to the position of the parameter in the method starting 
-               at position 1. position MUST point to space for a ub4.
-        elem (OUT) - If this function completes successfully, and 
-               the input 'elem' is not NULL, 'elem' points to the selected 
-               parameter descriptor in the object cache.
-   REQUIRES:
-        1) All type accessors require that the type be pinned before calling 
-           any accessor. 
-        2) if 'mdo' is not null, it must point to a valid method descriptor 
-           in the object cache.
-   DESCRIPTION:
-        Get the position of a parameter in a method.  Positions start at 1.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is null. 
-        OCI_ERROR if
-            1) any of the parameters is null.
-            2) the method does not contain a parameter with the input 'name'. 
-   NOTES:
-        The type must be unpinned when the accessed information is no 
-        longer needed.
- */
-
-/*------------------------ OCITypeParamElemMode -----------------------------*/
-
-/* ** OBSOLETE ** */
-OCITypeParamMode OCITypeElemParamMode(    OCIEnv *env, OCIError *err,
-                                          CONST OCITypeElem *elem    );
-/*
-   NAME: OCITypeElemParamMode - OCI Get a parameter's mode
-   PARAMETERS: 
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        elem (IN) - pointer to the parameter descriptor in the object cache
-                (represented by an OCITypeElem)
-   REQUIRES:
-        1) All type accessors require that the type be pinned before calling 
-           any accessor. 
-        2) All input parameters must not be NULL and must be valid.
-   DESCRIPTION:
-        Get the mode (in, out, or in/out) of the parameter.
-   RETURNS:
-        the mode (in, out, or in/out) of the parameter
-   NOTES:
-        The type must be unpinned when the accessed information is no 
-        longer needed.
- */
-
-/*------------------------- OCITypeElemDefaultValue -------------------------*/
-
-/* ** OBSOLETE ** */
-oratext* OCITypeElemDefaultValue(    OCIEnv *env, OCIError *err,
-                                  CONST OCITypeElem *elem,
-                                  ub4 *d_v_length    );
-/*
-   NAME: OCITypeElemDefaultValue - OCI Get the element's Default Value. 
-   PARAMETERS: 
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        elem (IN) - pointer to the parameter descriptor in the object cache
-                (represented by an OCITypeElem)
-        d_v_length (OUT) - length (in bytes) of the returned default value.
-               The caller must allocate space for the ub4 before calling this 
-               routine.
-   REQUIRES:
-        1) All type accessors require that the type be pinned before calling 
-           any accessor. 
-        2) All input parameters must not be NULL and must be valid.
-   DESCRIPTION:
-        Get the default value in text form (PL/SQL) of an element. For V8.0,
-        this only makes sense for a method parameter.
-   RETURNS:
-        The default value (text) of the parameter.
-   NOTES:
-        The type must be unpinned when the accessed information is no 
-        longer needed.
- */
- 
-
-/*--------------------------------------------------------------------------*/
-/*                           TYPE VERSION TABLE                             */
-/*--------------------------------------------------------------------------*/
-
-/* For V8.0, the type version table is meant to be an internal data structure
-   only for Oracle clients for type version maintanence purposes. A more
-   general version of the API may be made public in subsequent releases. */
-
-
-/*--------------------------- OCITypeVTInit --------------------------------*/
- 
-/* ** OBSOLETE ** */
-sword OCITypeVTInit(    OCIEnv *env, OCIError *err    );
-/*
-   NAME: OCITypeVTInit - OCI type Version table INItialize
-   PARAMETERS:
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-   REQUIRES:
-        none
-   DESCRIPTION:
-        Allocate space for and initialize the type version table and the type
-        version table's index.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is null.
-        OCI_ERROR if internal errors occurrs during initialization.
- */
- 
-/*--------------------------- OCITypeVTInsert -------------------------------*/
- 
-/* ** OBSOLETE ** */
-sword OCITypeVTInsert(    OCIEnv *env, OCIError *err, 
-                          CONST oratext *schema_name, ub4 s_n_length, 
-                          CONST oratext *type_name, ub4 t_n_length, 
-                          CONST oratext *user_version, ub4 u_v_length    );
-/*
-   NAME: OCITypeVTInsert - OCI type Version table INSert entry.
-   PARAMETERS:
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        schema_name (IN, optional) - name of schema associated with the 
-                  type.  By default, the user's schema name is used.
-        s_n_length (IN) - length of the 'schema_name' parameter
-        type_name (IN) - type name to insert
-        t_n_length (IN) - length (in bytes) of the 'type_name' parameter
-        user_version (IN) - user readable version of the type
-        u_v_length (IN) - length (in bytes) of the 'user_version' parameter
-   REQUIRES:
-        none
-   DESCRIPTION:
-        Insert an entry into the type version table and the type version
-        table's index.  The entry's type name and user readable version
-        fields are updated with the input values.  All other fields are
-        initialized to null.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is null.
-        OCI_ERROR if
-            1) any of the parameters is invalid.
-            2) an entry for 'type_name' has already been registered in the
-               type version table.
- */
-
-/*------------------------------ OCITypeVTSelect ----------------------------*/
-
-/* OCITypeVTSelect - OCI type VERSion table SELECT entry */
-/* ** OBSOLETE ** */
-sword OCITypeVTSelect(    OCIEnv *env, OCIError *err, 
-                          CONST oratext *schema_name, ub4 s_n_length, 
-                          CONST oratext *type_name, ub4 t_n_length, 
-                          oratext **user_version, ub4 *u_v_length,
-                        ub2 *version );
-/*
-   NAME: OCITypeVTSelect - OCI type Version table SELect entry.
-   PARAMETERS:
-        env (IN/OUT) - OCI environment handle initialized in object mode
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        schema_name (IN, optional) - name of schema associated with the 
-                  type.  By default, the user's schema name is used.
-        s_n_length (IN) - length of the 'schema_name' parameter
-        type_name (IN) - type name to select
-        t_n_length (IN) - length (in bytes) of the 'type_name' parameter
-        user_version (OUT, optional) - pointer to user readable version of the
-                 type
-        u_v_length (OUT, optional) - length (in bytes) of the 'user_version'
-                 parameter
-        version (OUT, optional) - internal type version
-   REQUIRES:
-        All input parameters must not be NULL and must be valid.
-   DESCRIPTION:
-        Select an entry in the type version table by name.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'env' or 'err' is null.
-        OCI_ERROR if
-            1) any of the parameters is invalid.
-            2) an entry with 'type_name' does not exist.
- */
-
-/* Compatibility function - following function prototype retained for 
-   compatibility only */
-sword ortgcty(    OCIEnv *env, OCIError *err, OCIType *coll_tdo,
-                  OCIType **collelem_tdo    );
-
-/*---------------------------------------------------------------------------*/
-/*               Transient Type Construction functions                       */
-/*---------------------------------------------------------------------------*/
-
-sword OCITypeBeginCreate(OCISvcCtx *svchp, OCIError *errhp, OCITypeCode tc,
-                         OCIDuration dur, OCIType **type);
-/*
-   NAME: OCITypeBeginCreate - OCI Type Begin Creation of a transient type.
-   REMARKS
-       Begins the construction process for a transient type. The type will be
-       anonymous (no name). To create a persistent named type, the CREATE TYPE
-       statement should be used from SQL. Transient types have no identity.
-       They are pure values.
-   PARAMETERS:
-       svchp (IN)       - The OCI Service Context.
-       errhp (IN/OUT)   - The OCI error handle. If there is an error, it is
-                          recorded in errhp and this function returns
-                          OCI_ERROR. Diagnostic information can be obtained by
-                          calling OCIErrorGet().
-       tc               - The TypeCode for the type. The Typecode could
-                          correspond to a User Defined Type or a Built-in type.
-                          Currently, the permissible values for User Defined 
-                          Types are OCI_TYPECODE_OBJECT for an Object Type
-                          (structured), OCI_TYPECODE_VARRAY for a VARRAY
-                          collection type or OCI_TYPECODE_TABLE for a nested
-                          table collection type. For Object types,
-                          OCITypeAddAttr() needs to be called to add each of
-                          the attribute types. For Collection types,
-                          OCITypeSetCollection() needs to be called.
-                          Subsequently, OCITypeEndCreate() needs to be called 
-                          to finish the creation process.
-                          The permissible values for Built-in type codes are
-                          specified in the user manual. Additional information
-                          on built-ins if any (like precision, scale for
-                          numbers, character set info for VARCHAR2s etc.) must
-                          be set with a subsequent call to OCITypeSetBuiltin().
-                          Subsequently OCITypeEndCreate() needs to be called
-                          to finish the creation process.
-       dur              - The allocation duration for the Type. Could be a
-                          predefined or a user defined duration.
-       type(OUT)        - The OCIType (Type Descriptor) that is being
-                          constructed.
-  RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_ERROR on error.
-*/
-
-
-sword OCITypeSetCollection(OCISvcCtx *svchp, OCIError *errhp, OCIType *type,
-                           OCIParam *collelem_info, ub4 coll_count);
-/*
-   NAME: OCITypeSetCollection - OCI Type Set Collection information
-   REMARKS :
-       Set Collection type information. This call can be called only if the
-       OCIType has been constructed with a collection typecode.
-   PARAMETERS:
-       svchp (IN)      -  The OCI Service Context.
-       errhp (IN/OUT)  -  The OCI error handle. If there is an error, it is 
-                          recorded in errhp and this function returns
-                          OCI_ERROR. Diagnostic information can be obtained by
-                          calling OCIErrorGet().
-       type(IN OUT)    -  The OCIType (Type Descriptor) that is being
-                          constructed.
-       collelem_info   -  collelem_info provides information on the collection
-                          element. It is obtained by allocating an OCIParam
-                          (parameter handle) and setting type information in
-                          the OCIParam using OCIAttrSet() calls.
-       coll_count      -  The count of elements in the collection. Pass 0 for
-                          a nested table (unbounded).
-  RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_ERROR on error.
-*/
-
-sword OCITypeSetBuiltin(OCISvcCtx *svchp, OCIError *errhp, OCIType *type,
-                        OCIParam *builtin_info);
-/*
-   NAME: OCITypeSetBuiltin - OCI Type Set Builtin information.
-   REMARKS:
-       Set Built-in type information. This call can be called only if the
-       OCIType has been constructed with a built-in typecode
-       (OCI_TYPECODE_NUMBER etc.).
-   PARAMETERS:
-       svchp (IN)       - The OCI Service Context.
-       errhp (IN/OUT)   - The OCI error handle. If there is an error, it is 
-                          recorded in errhp and this function returns
-                          OCI_ERROR. Diagnostic information can be obtained by
-                          calling OCIErrorGet().
-       type(IN OUT)     - The OCIType (Type Descriptor) that is being
-                          constructed.
-       builtin_info     - builtin_info provides information on the built-in
-                          (like precision, scale, charater set etc.). It is
-                          obtained by allocating an OCIParam (parameter handle)
-                          and setting type information in the OCIParam using
-                           OCIAttrSet() calls.
-  RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_ERROR on error.
-*/
-
-sword OCITypeAddAttr(OCISvcCtx *svchp, OCIError *errhp, OCIType *type,
-                     CONST oratext *a_name, ub4 a_length, 
-                     OCIParam *attr_info);
-/*
-   NAME: OCITypeAddAttr - OCI Type Add Attribute to an Object Type.
-   REMARKS:
-       Adds an attribute to an Object type (that was constructed earlier with
-       typecode OCI_TYPECODE_OBJECT).
-   PARAMETERS:
-       svchp (IN)       - The OCI Service Context
-       errhp (IN/OUT)   - The OCI error handle. If there is an error, it is
-                          recorded in errhp and this function returns
-                          OCI_ERROR. Diagnostic information can be obtained by
-                          calling OCIErrorGet().
-       type (IN/OUT)    - The Type description that is being constructed.
-       a_name(IN)       - Optional. gives the name of the attribute.
-       a_length         - Optional. gives length of attribute name.
-       attr_info        - Information on the attribute. It is obtained by
-                          allocating an OCIParam (parameter handle) and setting
-                          type information in the OCIParam using OCIAttrSet()
-                          calls.
-  RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_ERROR on error.
-*/
-
-sword OCITypeEndCreate(OCISvcCtx *svchp, OCIError *errhp, OCIType *type);
-/*
-   NAME: OCITypeEndCreate - OCI Type End Creation
-   REMARKS:
-       Finishes construction of a type description.Subsequently, only access
-       will be allowed.
-   PARAMETERS:
-       svchp (IN)       - The OCI Service Context
-       errhp (IN/OUT)   - The OCI error handle. If there is an error, it is
-                          recorded in errhp and this function returns
-                          OCI_ERROR. Diagnostic information can be obtained by
-                          calling OCIErrorGet().
-       type (IN/OUT)    - The Type description that is being constructed.
-   RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_ERROR on error.
-*/
-
-/*=========================*/
-/* PUBLIC MACROS AND FLAGS */
-/*=========================*/
-
-/*--------------------------------------------------------------------------*/
-/*                          TYPE ELEMENT FLAGS                              */
-/*--------------------------------------------------------------------------*/
-
-#define OCI_TYPEELEM_REF        0x8000                   /* element is a REF */
-#define OCI_TYPEPARAM_REQUIRED  0x0800              /* parameter is required */
-
-/* macros to test flags */
-#define OCI_TYPEELEM_IS_REF(elem_flag) \
-  (((elem_flag) & OCI_TYPEELEM_REF)!=0)
-#define OCI_TYPEPARAM_IS_REQUIRED(param_flag) \
-  (((param_flag) & OCI_TYPEPARAM_REQUIRED)!=0)
-
-
-#endif /* ORT_ORACLE */
-
diff --git a/src/terralib/drivers/OracleSpatial/TeOracleSpatial.cpp b/src/terralib/drivers/OracleSpatial/TeOracleSpatial.cpp
deleted file mode 100644
index 95938a9..0000000
--- a/src/terralib/drivers/OracleSpatial/TeOracleSpatial.cpp
+++ /dev/null
@@ -1,6810 +0,0 @@
-/************************************************************************************
-TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The library provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use
-of this library and its documentation.
-*************************************************************************************/
-
-#include "TeOracleSpatial.h"
-
-#include <zlib.h>
-#include <jpeg.h>
-#include <sys/stat.h>
-#include "TeSpatialOperations.h"
-#include "TeGeometryAlgorithms.h"
-
-
-#define MAX(a,b) a>b?a:b
-#define MIN(a,b) a<b?a:b
-
-string 
-getOracleSpatialRelation(int relation)
-{
-	string spatialRel="";
-	switch (relation)
-	{
-		case TeDISJOINT:
-		case TeINTERSECTS:
-			spatialRel = "ANYINTERACT";	
-		break;
-
-		case TeTOUCHES:
-			spatialRel = "TOUCH";
-		break;
-
-		case TeOVERLAPS:
-			spatialRel = "OVERLAPBDYINTERSECT";
-		break;
-
-		case TeCOVERS:
-			spatialRel = "COVERS"; 
-		break;
-
-		case TeCOVEREDBY:
-			spatialRel = "COVEREDBY";
-		break;
-		
-		case TeCONTAINS:
-			spatialRel = "CONTAINS";
-		break;
-		
-		case TeWITHIN:
-			spatialRel = "INSIDE";
-		break;
-		
-		case TeEQUALS:
-			spatialRel = "EQUAL";
-		break;
-		
-		case TeCROSSES:
-			spatialRel = "OVERLAPBDYDISJOINT";
-		break;
-		default:
-			spatialRel = "";
-		break;
-	}
-	
-	return spatialRel;
-}
-
-
-TeOracleSpatial::TeOracleSpatial() 
-{
-	Conn = new OCIConnection();  
-	dbmsName_ = "OracleSpatial";
-}
-
-
-TeOracleSpatial::~TeOracleSpatial() 
-{
-	delete (Conn); //disconnect
-	Conn = NULL;
-}
-
-void
-TeOracleSpatial::close () 
-{
-	clear();
-	Conn->Disconnect();
-	isConnected_ = false;
-}
-
-
-bool
-TeOracleSpatial::connect(const string& host, const string& user, const string& password, const string& database, int port)
-{
-	if (Conn->IsConnected())
-	{ 
-		delete (Conn);
-		Conn = new OCIConnection();
-	}
-
-	isConnected_ = false;
-	if (Conn->Connect(host.c_str(),user.c_str(),password.c_str()))
-	{
-		isConnected_ = true;
-		host_ = host;
-		user_ = user;
-		password_ = password;
-		database_ = database;
-		portNumber_ = port;
-		return true;
-	}
-	else
-	{
-		isConnected_ = false;
-		errorMessage_ = "Error connecting to database server!";
-		delete (Conn); //disconect
-		return false;
-	}
-}
-
-
-bool 
-TeOracleSpatial::tableExist(const string& table)
-{
-	bool	status;
-	TeOracleSpatialPortal *ocip = (TeOracleSpatialPortal*)getPortal();
-	if(!ocip)
-		return false;
-
-	string exist = " SELECT table_name FROM all_tables WHERE";
-	exist += " TABLE_NAME = '" + TeConvertToUpperCase(table) + "'";
-	exist += " AND OWNER = '" + TeConvertToUpperCase(user_) + "'";
-
-	if(!ocip->query(exist))
-	{
-		delete ocip;
-		return false;
-	}
-
-	if(ocip->fetchRow())
-		status = true;
-	else
-		status = false;
-
-	delete ocip;
-	return (status);
-}
-
-
-bool 
-TeOracleSpatial::columnExist(const string& table, const string& column, TeAttribute& attr)
-{
-	bool	status = false;
-	TeOracleSpatialPortal *ocip = (TeOracleSpatialPortal*)getPortal();
-	if(!ocip)
-		return false;
-
-	string exist = " SELECT DATA_TYPE, DATA_LENGTH, DATA_SCALE FROM ALL_TAB_COLUMNS WHERE";
-	exist += " TABLE_NAME = '" + TeConvertToUpperCase(table) + "'";
-	exist += " AND COLUMN_NAME = '" + TeConvertToUpperCase(column) + "'";
-	exist += " AND OWNER = '" + TeConvertToUpperCase(user_) + "'";
-
-	if(!ocip->query(exist))
-	{
-		delete ocip;
-		return false;
-	}
-	
-	if(ocip->fetchRow())
-	{	
-		attr.rep_.name_ = column;
-		
-		string	dataType = string(ocip->getData(0)); 
-		int		dataLength = atoi(ocip->getData(1)); 
-		int		dataScale = atoi(ocip->getData(2));
-		bool    number = false;
-		
-		if(dataType=="VARCHAR2")
-		{
-			attr.rep_.type_ = TeSTRING;
-			attr.rep_.numChar_ = dataLength;
-		}
-		else if (dataType=="BLOB")
-		{
-			attr.rep_.type_ = TeBLOB;
-			attr.rep_.numChar_ = dataLength;
-		}
-		else if (dataType=="NUMBER")
-		{
-			number = true;
-		}
-		else if (dataType=="SDO_GEOMETRY")
-		{
-			attr.rep_.type_ = TeOBJECT;
-			attr.rep_.numChar_ = dataLength;
-		}
-		else if (dataType== "CHAR")
-		{	
-			attr.rep_.type_ = TeCHARACTER;
-			attr.rep_.numChar_ = dataLength;
-		}
-		else if (dataType=="DATE")
-		{
-			attr.rep_.type_ = TeDATETIME;
-		}
-		else
-		{
-			attr.rep_.type_ = TeSTRING;
-			attr.rep_.numChar_ = dataLength;
-		}
-
-		if(number)
-		{
-			if(dataScale > 0)
-				attr.rep_.type_ = TeREAL;
-			else
-				attr.rep_.type_ = TeINT;
-		}
-		status = true;
-	}
-	
-	delete ocip;
-	return (status);
-}
-
-bool 
-TeOracleSpatial::execute (const string &q)
-{
-	bool result = Conn->Execute(q);
-	
-	if(!result)
-		errorMessage_ = Conn->getErrorMessage();
-
-	return result;
-}
-
-
-bool
-TeOracleSpatial::createTable(const string& table, TeAttributeList &attr)
-{
-	short	cont=0;
-	string pkeys ="";
-	bool	hasAutoNumber=false;
-	string	fieldName="";
-
-	if(tableExist(table))
-	{
-		errorMessage_= "Table already exist!";
-		return false;
-	}
-
-	TeAttributeList::iterator it = attr.begin();
-	string tablec;
-	tablec = "CREATE TABLE " + table +" (";
-	
-	while ( it != attr.end())
-	{
-		if (cont)
-			tablec += ", ";
-			
-		switch ((*it).rep_.type_)
-		{
-			case TeSTRING:
-				tablec += (*it).rep_.name_ + " VARCHAR2(" + Te2String((*it).rep_.numChar_) + ")";
-			break;
-			
-			case TeREAL:
-				if((*it).rep_.decimals_>0)
-					tablec += (*it).rep_.name_ +" NUMBER(*,"+ Te2String((*it).rep_.decimals_) +") ";
-				else
-					tablec += (*it).rep_.name_ +" NUMBER(*,38) ";
-			break;
-			
-			case TeINT:
-				tablec += (*it).rep_.name_ + " NUMBER(32) ";
-				if((*it).rep_.isAutoNumber_)
-				{
-					hasAutoNumber=true;
-					fieldName=(*it).rep_.name_;
-				}
-			break;
-
-			case TeDATETIME:
-				tablec += (*it).rep_.name_ + " DATE ";
-			break;
-
-			case TeCHARACTER:
-				tablec += (*it).rep_.name_ + " CHAR ";
-			break;
-
-			case TeBLOB:
-				tablec += (*it).rep_.name_ + " BLOB ";
-			break;
-
-			default:
-				tablec += (*it).rep_.name_ + " VARCHAR2(255) ";
-			break;
-		}
-
-		// check if column is part of primary key
-		if ((*it).rep_.isPrimaryKey_ && (*it).rep_.type_ != TeBLOB )
-		{
-			if (!pkeys.empty())
-				pkeys += ", ";
-			pkeys += (*it).rep_.name_;
-			tablec += " NOT NULL";
-		}
-
-		++it;
-		cont++;
-	}
-
-	if(!pkeys.empty())
-		tablec += ", PRIMARY KEY (" + pkeys + ") ";
-
-	tablec += ")";
-
-	if(!execute(tablec))
-	{
-		if(errorMessage_.empty())
-			errorMessage_ = "Error creating table " + table;
-
-		return false;
-	}
-
-	if(hasAutoNumber)
-	{
-		string dropSql = " DROP TRIGGER "+ getNameTrigger(table); 
-		execute(dropSql);
-		dropSql = " DROP SEQUENCE "+ getNameSequence(table); 
-		execute(dropSql);
-
-		if(!createSequence(table))
-		{
-			deleteTable(table);
-			return false;
-		}
-		
-		if(!createAutoIncrementTrigger(table,fieldName))
-		{
-			deleteTable(table);
-			string sql= "DROP SEQUENCE "+ getNameSequence(table);
-			execute(sql); 
-			return false;
-		}
-	}
-	return true;
-}
-
-
-TeDatabasePortal*  
-TeOracleSpatial::getPortal ()
-{
-	TeOracleSpatialPortal* ocip = new TeOracleSpatialPortal (this);
-	return ocip;
-}
-
-
-bool 
-TeOracleSpatial::addColumn (const string& table, TeAttributeRep &rep)
-{
-	if(!tableExist(table))
-		return false;
-
-	string field = TeGetExtension(rep.name_.c_str());
-	if(field.empty())
-		field = rep.name_;
-
-	string tab;
-	tab = " ALTER TABLE " + table + " ADD ( ";
-	tab += field + "  ";
-	
-	switch (rep.type_)
-	{
-		case TeSTRING:
-			tab += "VARCHAR2(" + Te2String(rep.numChar_) + ") ";
-			break;
-			
-		case TeREAL:
-			tab += "NUMBER(*,38)";	
-			break;
-			
-		case TeINT:
-			tab += "NUMBER(32)";
-			break;
-
-		case TeDATETIME:
-			tab += "DATE";
-
-		case TeCHARACTER:
-			tab += "CHAR";
-		
-		case TeBLOB:
-			tab += "BLOB";
-		
-		default:
-			tab += "VARCHAR2(" + Te2String(rep.numChar_) + ") ";
-			break;
-	}
-
-	tab += " ) ";
-
-	if(!Conn->Execute(tab))
-	{
-		if(errorMessage_.empty())
-			errorMessage_ = "Error inserting a column to table " + table + " !";
-		return false;
-	}
-
-	return true;
-}
-
-bool
-TeOracleSpatial::deleteTable (const string& table)
-{
-	int f =	table.find ("te_collection", std::string::npos);
-
-	if( table=="te_theme" ||
-		table=="te_layer" ||
-		table=="te_representation" ||
-		table=="te_tables_relation" ||
-		table=="te_layer_table" ||
-		table=="te_color_scheme" ||
-		table=="te_raster_metadata" ||
-		table=="te_projection" ||
-		table=="te_view" ||
-		table=="te_chart_params" ||
-		table=="te_legend" ||
-		table=="te_visual" ||
-		f == 0)
-	{
-		errorMessage_ = "N�o � poss�vel deletar tabelas do modelo!";
-		return false;
-	}
-
-	string del = "DROP TABLE " + table;
-	if(!execute(del))
-		return false;
-
-	string seq = "DROP SEQUENCE " + getNameSequence(table);
-	if(!execute(seq))
-		return false;
-
-	return true;
-}
- 
-
-bool 
-TeOracleSpatial::createViewTable ()
-{
-	string table;
-	table = "CREATE TABLE te_view ( ";
-	table += "view_id ";
-	table += "NUMBER(32) NOT NULL";
-	table += ", projection_id ";
-	table += "NUMBER(32) NOT NULL";
-	table += " CONSTRAINT view_proj UNIQUE ";
-	table += ", name ";
-	table += "VARCHAR2(255) NOT NULL";
-	table += ", user_name ";
-	table += "VARCHAR2(255) ";
-	table += ", visibility ";
-	table += "NUMBER(32) ";
-
-	table += ", PRIMARY KEY(view_id))";
-	
-	if(!execute(table))
-	{	
-		errorMessage_ = "Error creating table te_view!";
-		return false;
-	}
-	
-	//creates a sequence to table 
-	if(!createSequence("te_view"))
-	{
-		errorMessage_ = "Error creating sequence to table te_view!";
-		return false;
-	}
-
-	//creates index
-	createIndex ("te_view", "view_index", "name, user_name");
-	return true;
-}
-
-bool 
-TeOracleSpatial::createThemeTable ()
-{
-	string table;
-	table = "CREATE TABLE te_theme (";
-	table += "theme_id ";
-	table += "NUMBER(32) NOT NULL";
-	table += ", layer_id ";
-	table += "NUMBER(32) NULL";
-	table += ", view_id ";
-	table += "NUMBER(32) NULL";
-	table += ", name ";
-	table += "VARCHAR2(255) NOT NULL";
-	table += ", parent_id ";
-	table += "NUMBER(32) ";
-	table += ", priority ";
-	table += "NUMBER(32) ";	
-	table += ", node_type ";
-	table += "NUMBER(32) NOT NULL";	
-		
-	table += ", min_scale ";
-	table += "NUMBER(*,38)";
-	table += ", max_scale ";
-	table += "NUMBER(*,38)";
-
-	table += ", generate_attribute_where ";
-	table += "VARCHAR2(500)";
-	table += ", generate_spatial_where ";
-	table += "VARCHAR2(500)";
-	table += ", generate_temporal_where ";
-	table += "VARCHAR2(500)";
-	
-	table += ", collection_table ";
-	table += "VARCHAR2(255)";
-
-	table += ", visible_rep ";
-	table += "NUMBER(32) NULL";
-	table += ", enable_visibility ";
-	table += "NUMBER(32) NULL";
-
-	table += ", PRIMARY KEY (theme_id))";
-	
-	if(!execute(table))
-	{	
-		errorMessage_ = "Error creating table te_theme!";
-		return false;
-	}
-
-	//creates a sequence to the tabela
-	if(!createSequence("te_theme"))
-	{
-		errorMessage_ = "Error creating sequence to table te_theme!";
-		return false;
-	}
-
-	//creates index
-	createIndex ("te_theme", "theme_view_index", "view_id");
-	return true;
-}
-
-
-bool
-TeOracleSpatial::createGroupingTable()
-{
-	string table;
-	table = "CREATE TABLE te_grouping (";
-	table += "theme_id ";
-	table += "NUMBER(32) NOT NULL";
-	table += ", grouping_number ";
-	table += "NUMBER(32)";
-	table += ", grouping_attr ";
-	table += "VARCHAR2(255)";
-	table += ", grouping_attr_type ";
-	table += "NUMBER(32)";
-	table += ", grouping_mode ";
-	table += "NUMBER(32)";
-	table += ", grouping_norm_attr ";
-	table += "VARCHAR2(255)";
-	table += ", grouping_std_dev ";
-	table += "NUMBER(*,38) DEFAULT 0.0";
-	table += ", grouping_precision ";
-	table += "NUMBER(32)";
-	table += ", grouping_function ";
-	table += "VARCHAR2(20)";
-	table += ", PRIMARY KEY (theme_id))";
-	
-	if(!execute(table))
-	{	
-		if(errorMessage_.empty())
-			errorMessage_ = "Error creating table te_grouping!";
-		return false;
-	}
-	return true;
-}
-
-
-bool 
-TeOracleSpatial::createThemeTablesTable()
-{
-	string table = "CREATE TABLE te_theme_table  (";
-	table += " theme_table_id ";
-	table += " NUMBER(32) NOT NULL";
-	table += ", theme_id ";
-	table += " NUMBER(32) NOT NULL ";
-	table += ", table_id ";
-	table += " NUMBER(32) NOT NULL ";
-	table += ", relation_id ";
-	table += " NUMBER(32)";
-	table += ", table_order ";
-	table += " NUMBER(32) ";
-	table += ", PRIMARY KEY (theme_table_id) ";
-	table += ")";
-	
-	if(!execute(table))
-	{	
-		errorMessage_ = "Error creating table te_theme_table!";
-		return false;
-	}
-
-	//creates a sequence to the tabela
-	if(!createSequence("te_theme_table"))
-	{
-		errorMessage_ = "Error creating sequence to table te_theme_table!";
-		return false;
-	}
-
-	//creates index
-	createIndex ("te_theme_table", "theme_table_index", "theme_id");
-	return true;
-}
-
-
-bool 
-TeOracleSpatial::createLayerTable()
-{
-	string table;
-	table = "CREATE TABLE te_layer (";
-	table += "layer_id ";
-	table += "NUMBER(32) NOT NULL ";
-	table += ", projection_id ";
-	table += "NUMBER(32) NOT NULL ";
-	table += "CONSTRAINT layer_proj UNIQUE ";
-	table += ", name ";
-	table += "VARCHAR2(255) NOT NULL ";
-	table += ", lower_x ";
-	table += "NUMBER(*,38)";
-	table += ", lower_y ";
-	table += "NUMBER(*,38)";
-	table += ", upper_x ";
-	table += "NUMBER(*,38) ";
-	table += ", upper_y ";
-	table += "NUMBER(*,38) ";
-	table += ", initial_time ";
-	table += "DATE ";
-	table += ", final_time ";
-	table += "DATE ";
-
-	table += ", PRIMARY KEY (layer_id))";
-
-	if(!execute(table))
-	{
-		errorMessage_ = "Error creating table te_layer!";
-		return false;
-	}
-
-	//creates a sequence to table 
-	if(!createSequence("te_layer"))
-	{
-		errorMessage_ = "Error creating sequence to table te_layer!";
-		return false;
-	}
-
-	return true;
-}
-
-
-bool 
-TeOracleSpatial::createLayerTableTable()
-{
-	string table;
-	table = "CREATE TABLE te_layer_table (";
-	table += "table_id ";
-	table += " NUMBER(32) NOT NULL ";
-	table += ", layer_id ";
-	table += "NUMBER(32) ";
-	table += ", attr_table ";
-	table += "VARCHAR2(255) NOT NULL ";
-	table += ", unique_id ";
-	table += "VARCHAR2(255) ";
-	table += ", attr_link ";
-	table += "VARCHAR2(255) ";
-	table += ", attr_initial_time ";
-	table += "VARCHAR2(255) ";
-	table += ", attr_final_time ";
-	table += "VARCHAR2(255) ";
-	table += ", attr_time_unit ";
-	table += "NUMBER(32) ";
-	table += ", attr_table_type ";
-	table += "NUMBER(32) ";
-	table += ", user_name ";
-	table += "VARCHAR2(255) ";
-	table += ", initial_time ";
-	table += "DATE ";
-	table += ", final_time ";
-	table += "DATE ";
-
-	table += ", PRIMARY KEY (table_id))";
-
-	if(!execute(table))
-	{
-		errorMessage_ = "Error creating table te_layer_table!";
-		return false;
-	}
-
-	//creates a sequence to table 
-	if(!createSequence("te_layer_table"))
-	{
-		errorMessage_ = "Error creating sequence to table te_layer_table!";
-		return false;
-	}
-
-	return true;
-}
-
-
-bool 
-TeOracleSpatial::createTablesRelationTable()
-{
-	string table;
-	table = "CREATE TABLE te_tables_relation (";
-	table += "relation_id ";
-	table += "NUMBER(32) NOT NULL ";
-	table += ", related_table_id ";
-	table += "NUMBER(32) NOT NULL ";
-	table += ", related_attr ";
-	table += "VARCHAR2(255) NOT NULL";
-	table += ", external_table_name ";
-	table += "VARCHAR2(255) NOT NULL";
-	table += ", external_attr ";
-	table += "VARCHAR2(255) NOT NULL ";
-
-	table += ", PRIMARY KEY (relation_id))";
-
-	if(!execute(table))
-	{
-		errorMessage_ = "Error creating table te_tables_relation!";
-		return false;
-	}
-
-	//creates a sequence to table 
-	if(!createSequence("te_tables_relation"))
-	{
-		errorMessage_ = "Error creating sequence to table te_tables_relation!";
-		return false;
-	}
-
-	return true;
-}
-
-
-bool 
-TeOracleSpatial::createRepresentationTable ()
-{
-	string table;
-	table = "CREATE TABLE te_representation (";
-	table += " repres_id ";
-	table += " NUMBER(32) NOT NULL "; 
-	table += ", layer_id ";
-	table += "NUMBER(32) NOT NULL";
-	table += ", geom_type ";
-	table += "NUMBER(32) NOT NULL";
-	table += ", geom_table ";
-	table += "VARCHAR2(255) ";
-	table += ", description "; 
-	table += "VARCHAR2(255) ";
-	table += ", lower_x ";
-	table += "NUMBER(*,38) ";
-	table += ", lower_y ";
-	table += "NUMBER(*,38) ";
-	table += ", upper_x ";
-	table += "NUMBER(*,38) ";
-	table += ", upper_y ";
-	table += "NUMBER(*,38) ";
-	table += ", res_x ";
-	table += "NUMBER(*,38) ";
-	table += ", res_y ";
-	table += "NUMBER(*,38) ";
-	table += ", num_cols ";
-	table += "NUMBER(32)";
-	table += ", num_rows ";
-	table += "NUMBER(32)";
-	table += ", initial_time ";
-	table += "DATE";
-	table += ", final_time ";
-	table += "DATE";
-	
-	table += ", PRIMARY KEY (repres_id))";
-
-	if(!execute(table))
-	{	
-		errorMessage_ = "Error creating table te_representation!";
-		return false;
-	}
-	//creates a sequence to table 
-	if(!createSequence("te_representation"))
-	{
-		errorMessage_ = "Error creating sequence to table te_representation!";
-		return false;
-	}
-
-	//creates index
-	createIndex ("te_representation", "representation_index", "layer_id, geom_type");
-	return true;
-}
-
-
-bool 
-TeOracleSpatial::createLegendTable ()
-{
-	string table;
-	table = "CREATE TABLE te_legend (";
-	table += "  legend_id ";
-	table += "NUMBER(32) NOT NULL";
-	table += ", theme_id ";
-	table += "NUMBER(32) NOT NULL";
-	table += ", group_id ";
-	table += "NUMBER(32)";
-	table += ", num_objs ";
-	table += "NUMBER(32)";
-	table += ", lower_value ";
-	table += "VARCHAR2(255)";
-	table += ", upper_value ";
-	table += "VARCHAR2(255)";
-	table += ", label ";
-	table += "VARCHAR2(255)";
-
-	table += ", PRIMARY KEY (legend_id))";
-
-	if(!execute(table))
-	{
-		errorMessage_ = "Error creating table te_legend!";
-		return false;
-	}
-	
-	//creates a sequence to the table 
-	if(!createSequence("te_legend"))
-	{
-		errorMessage_ = "Error creating sequence to table te_legend!";
-		return false;
-	}
-
-	//creates index
-	createIndex ("te_legend", "legend_index", "theme_id");
-	return true;
-}
-
-
-
-bool 
-TeOracleSpatial::createVisualTable()
-{
-	string table;
-	table = "CREATE TABLE te_visual (";
-	table += "  legend_id ";
-	table += "NUMBER(32) NOT NULL";
-	table += ", geom_type ";
-	table += "NUMBER(32) NOT NULL";
-
-	table += ", lib_name ";
-	table += "VARCHAR2(255) ";
-	table += ", symb_id ";
-	table += "NUMBER(32) ";
-	table += ", red ";
-	table += "NUMBER(32) ";
-	table += ", green ";
-	table += "NUMBER(32) ";
-	table += ", blue ";
-	table += "NUMBER(32) ";
-	table += ", transparency ";
-	table += "NUMBER(32) ";
-	table += ", width ";
-	table += "NUMBER(32) ";
-	
-	table += ", contour_lib_name ";
-	table += "VARCHAR2(255) ";
-	table += ", contour_symb_id ";
-	table += "NUMBER(32) ";
-	table += ", contour_red ";
-	table += "NUMBER(32) ";
-	table += ", contour_green ";
-	table += "NUMBER(32) ";
-	table += ", contour_blue ";
-	table += "NUMBER(32) ";
-	table += ", contour_transp ";
-	table += "NUMBER(32) ";
-	table += ", contour_width ";
-	table += "NUMBER(32) ";
-
-	table += ", size_value ";
-	table += "NUMBER(32) ";
-	table += ", pt_angle ";
-	table += "NUMBER(32) ";
-	
-	table += ", family ";
-	table += "VARCHAR2(100)";
-	table += ", bold ";
-	table += "NUMBER(32) ";
-	table += ", italic ";
-	table += "NUMBER(32) ";
-	table += ", alignment_vert ";
-	table += "NUMBER(*,38)";
-	table += ", alignment_horiz ";
-	table += "NUMBER(*,38)";
-	table += ", tab_size ";
-	table += "NUMBER(32) ";
-	table += ", line_space ";
-	table += "NUMBER(32) ";
-	table += ", fixed_size ";
-	table += "NUMBER(32) ";
-
-	table += ", PRIMARY KEY (legend_id, geom_type))";
-
-	if(!execute(table))
-	{
-		errorMessage_ = "Error creating table te_visual!";
-		return false;
-	}
-	
-	return true;
-}
-
-bool 
-TeOracleSpatial::createVisualRasterTable()
-{
-	string create = "CREATE TABLE te_visual_raster (";
-	create += " theme_id		NUMBER(32) NOT NULL,";
-	create += " band_in			NUMBER(32) NOT NULL,";
-	create += " band_out		NUMBER(32), ";
-	create += " transf_type		NUMBER(32), ";
-	create += " param1			FLOAT,";
-	create += " param2			FLOAT,";
-	create += " lut_table		VARCHAR2(255), ";
-	create += " PRIMARY KEY (theme_id, band_in))";
-	
-	if(!execute(create))
-	{
-		errorMessage_ = "Error creating table te_visual_raster!";
-		return false;
-	}
-	
-	return true;
-}
-
-bool 
-TeOracleSpatial::createDatabaseTable()
-{
-	string create = "CREATE TABLE te_database (";
-	create += "db_version		VARCHAR(50) NOT NULL,";
-	create += "db_creation		DATE,";
-	create += "PRIMARY KEY (db_version))";
-	return (execute (create));
-}
-
-bool 
-TeOracleSpatial::createProjectionTable ()
-{
-	string table;
-	table = "CREATE TABLE te_projection (";
-	table += "projection_id ";
-	table += "NUMBER(32) NOT NULL";
-	table += ", name ";
-	table += "VARCHAR2(255) NOT NULL";
-	table += ", long0 ";
-	table += "NUMBER(*,38) DEFAULT 0.0000 NOT NULL ";
-	table += ", lat0 ";
-	table += "NUMBER(*,38) DEFAULT 0.0000 NOT NULL ";
-	table += ", offx ";
-	table += "NUMBER(*,38) DEFAULT 0.0000 NOT NULL ";
-	table += ", offy ";
-	table += "NUMBER(*,38) DEFAULT 0.0000 NOT NULL ";
-	table += ", stlat1 ";
-	table += "NUMBER(*,38) DEFAULT 0.0000 NOT NULL ";
-	table += ", stlat2 ";
-	table += "NUMBER(*,38) DEFAULT 0.0000 NOT NULL ";
-	table += ", unit ";
-	table += "VARCHAR2(100) ";
-	table += ", scale ";
-	table += "NUMBER(*,38) DEFAULT 0.0000 NOT NULL ";
-	table += ", hemis ";
-	table += "NUMBER(32) ";
-	table += ", datum ";
-	table += "VARCHAR2(100) ";
-	table += ", radius ";
-	table += "NUMBER(*,38) DEFAULT 0.0000 NOT NULL ";
-	table += ", flattening ";
-	table += "NUMBER(*,38) DEFAULT 0.0000 NOT NULL ";
-	table += ", dx ";
-	table += "NUMBER(*,38) DEFAULT 0.0000 NOT NULL ";
-	table += ", dy ";
-	table += "NUMBER(*,38) DEFAULT 0.0000 NOT NULL ";
-	table += ", dz ";
-	table += "NUMBER(*,38) DEFAULT 0.0000 NOT NULL ";
-	
-	table += ", PRIMARY KEY (projection_id))";
-
-	if(!execute(table))
-	{
-		errorMessage_ = "Error creating table te_projection!";
-		return false;
-	}
-	
-	//creates a sequence to table 
-	if(!createSequence("te_projection"))
-	{
-		errorMessage_ = "Error creating sequence to table te_projection!";
-		return false;
-	}
-
-	return true;
-}
-
-bool
-TeOracleSpatial::createRasterMetadataTable(const string& tableName)
-{
-	if(tableExist(tableName))
-	{
-		errorMessage_= "Table already exist!";
-		return false;
-	}
-	
-	string table;
-	table = "CREATE TABLE "+ tableName +" (";
-	table += " geom_id ";
-	table += "NUMBER(32) NOT NULL";
-	table += ", band_id ";
-	table += "NUMBER(32) NOT NULL";
-	table += ", min_value ";
-	table += "NUMBER(*,38) DEFAULT 0.0 ";
-	table += ", max_value ";
-	table += "NUMBER(*,38) DEFAULT 0.0 ";
-	table += ", num_bits ";
-	table += "NUMBER(32)";
-	table += ", data_type ";
-	table += "NUMBER(32)";
-	table += ", photometric_type ";
-	table += "NUMBER(32)";
-	table += ", compression_type ";
-	table += "NUMBER(32)";
-	table += ", dummy ";
-	table += "NUMBER(*,38) DEFAULT 0.0";
-	
-	table += ", PRIMARY KEY (geom_id, band_id))";
-
-	if(!execute(table))
-	{	
-		errorMessage_ = "Error creating table "+ tableName +"!";
-		return false;
-	}
-	
-	return true;
-}
-
-
-bool 
-TeOracleSpatial::createLUTTable(const string& table)
-{
-	
-	if(tableExist(table))
-	{
-		errorMessage_= "Table already exist!";
-		return false;
-	}
-	
-	string tab;
-	tab = "CREATE TABLE " + table + " ( ";
-	tab += "index_id ";
-	tab += "NUMBER(32) NOT NULL ";
-	tab += ", r_val ";
-	tab += "NUMBER(32) NOT NULL ";
-	tab += ", g_val ";
-	tab += "NUMBER(32) NOT NULL ";
-	tab += ", b_val ";
-	tab += "NUMBER(32) NOT NULL ";
-	
-	tab += ", PRIMARY KEY (index_id))";
-
-	if(!execute(tab))
-	{
-		errorMessage_ = "Error creating table " + table ;
-		return false;
-	}
-
-	//creates a sequence to table 
-	if(!createSequence(table))
-	{
-		deleteTable(table);
-		return false;
-	}
-
-	if(!createAutoIncrementTrigger(table,"index_id"))
-	{
-		deleteTable(table);
-		string sql= "DROP SEQUENCE "+ getNameSequence(table);
-		execute(sql); 
-		return false;
-	}
-
-	return true;
-}
-
-
-bool
-TeOracleSpatial::createCollectionTable(const string& tableName)
-{
-	
-	if(tableExist(tableName))
-	{
-		errorMessage_= "Table already exist!";
-		return false;
-	}
-	
-	string table = "CREATE TABLE "+ tableName +" (";
-	table += " c_object_id ";
-	table += "VARCHAR2(255) NOT NULL";
-	table += ", c_legend_id  ";
-	table += "NUMBER(32) ";
-	table += ", label_x ";
-	table += "NUMBER(*,38) ";
-	table += ", label_y ";
-	table += "NUMBER(*,38) ";
-	table += ", c_legend_own ";
-	table += "NUMBER(32) ";
-	table += ", c_object_status ";
-	table += "NUMBER(32) ";
-	
-	table += ", PRIMARY KEY (c_object_id))";
-
-	if(!execute(table))
-	{	
-		errorMessage_ = "Error creating table " + tableName + "!";
-		return false;
-	}
-
-	createIndex (tableName, tableName+"_index_1", "c_legend_id");
-	createIndex (tableName, tableName+"_index_2", "c_legend_own");
-	return true;
-}
-
-
-bool 
-TeOracleSpatial::createCellGeometry (const string& table)
-{
-	
-	if(tableExist(table))
-	{
-		errorMessage_= "Table already exist!";
-		return false;
-	}
-	
-	string tab;
-	tab = "CREATE TABLE " + table + "(";
-	tab += "geom_id ";
-	tab += "NUMBER(32) NOT NULL";
-	tab += ", object_id ";
-	tab += "VARCHAR2(255) NULL";
-	tab += ", col_number ";
-	tab += "NUMBER(32) NOT NULL";
-	tab += ", row_number ";
-	tab += "NUMBER(32) NOT NULL";
-	tab += ", spatial_data ";
-	tab += "MDSYS.SDO_GEOMETRY";	
-	tab += ", PRIMARY KEY (geom_id))";
-
-	if (!execute(tab))
-	{
-		errorMessage_ = "Error creating table " + table + " !" ;
-		return false;
-	}
-
-	//creates indexes
-	createIndex (table, table + "obj_idx", "object_id"); 	
-	createIndex(table, table + "rc_idx", "row_number, col_number"); 
-
-	//creates a sequence to table 
-	if(!createSequence(table))
-	{
-		deleteTable(table);
-		return false;
-	}
-
-	if(!createAutoIncrementTrigger(table,"geom_id"))
-	{
-		deleteTable(table);
-		string sql= "DROP SEQUENCE "+ getNameSequence(table);
-		execute(sql); 
-		return false;
-	}
-
-	return true;
-}
-
-
-bool 
-TeOracleSpatial::createTextGeometry (const string& table)
-{
-	
-	if(tableExist(table))
-	{
-		errorMessage_= "Table already exist!";
-		return false;
-	}
-	
-	string tab;
-	tab = "CREATE TABLE " + table +"(";
-	tab += "geom_id ";
-	tab += "NUMBER(32) NOT NULL";
-	tab += ", object_id ";
-	tab += "VARCHAR2(255) ";
-	tab += ", x ";
-	tab += "NUMBER(*,38) NULL";
-	tab += ", y ";
-	tab += "NUMBER(*,38) NULL";
-	tab += ", text_value ";
-	tab += "VARCHAR2(255) NULL";
-	tab += ", angle ";
-	tab += "NUMBER(*,38) ";
-	tab += ", height ";
-	tab += "NUMBER(*,38) ";
-	tab += ", alignment_vert ";
-	tab += "NUMBER(*,38) ";
-	tab += ", alignment_horiz ";
-	tab += "NUMBER(*,38) ";
-	
-	tab += ", PRIMARY KEY (geom_id))";
-
-	if(!execute(tab))
-	{
-		if(errorMessage_.empty())
-			errorMessage_ = "Error creating table  " + table + " !";
-		return false;
-	}
-
-	//creates indexes
-	createIndex(table, table + "obj_idx", "object_id");
-	createIndex(table, table + "xy_idx", "x,y"); 
-		
-	//creates a sequence to table 
-	if(!createSequence(table))
-	{
-		deleteTable(table);
-		return false;
-	}
-
-	if(!createAutoIncrementTrigger(table, "geom_id"))
-	{
-		deleteTable(table);
-		string sql= "DROP SEQUENCE "+ getNameSequence(table);
-		execute(sql); 
-		return false;
-	}
-
-	return true;
-}
-
-
-bool 
-TeOracleSpatial::createArcGeometry (const string& table)
-{
-	
-	if(tableExist(table))
-	{
-		errorMessage_= "Table already exist!";
-		return false;
-	}
-
-	string tab;
-	tab = "CREATE TABLE " + table +"(";
-	tab += "geom_id ";
-	tab += "NUMBER(32) NOT NULL";
-	tab += ", object_id ";
-	tab += "VARCHAR2(255) NULL";
-	tab += ", from_node ";
-	tab += "NUMBER(32) NOT NULL";
-	tab += ", to_node ";
-	tab += "NUMBER(32) NOT NULL";
-	
-	tab += ", PRIMARY KEY (geom_id))";
-
-	if(!execute(tab))
-	{
-		errorMessage_ = "Error creating table " + table ;
-		return false;
-	}
-
-	//creates indexes
-	createIndex(table, table + "obj_idx", "object_id");
-	createIndex(table, table + "fn_idx", "from_node"); 
-	createIndex(table, table + "tn_idx", "to_node"); 
-		
-	//creates a sequence to table 
-	if(!createSequence(table))
-	{
-		deleteTable(table);
-		return false;
-	}
-
-	if(!createAutoIncrementTrigger(table,"geom_id"))
-	{
-		deleteTable(table);
-		string sql= "DROP SEQUENCE "+ getNameSequence(table);
-		execute(sql); 
-		return false;
-	}
-	return true;
-}
-
-
-bool 
-TeOracleSpatial::createNodeGeometry (const string& table)
-{
-	if(tableExist(table))
-	{
-		errorMessage_= "Table already exist!";
-		return false;
-	}
-		
-	string tab;
-	tab = "CREATE TABLE " + table + " (";
-	tab += "geom_id ";
-	tab += "NUMBER(32) NOT NULL ";
-	tab += ", object_id ";
-	tab += "VARCHAR2(255) NULL";
-	tab += ", spatial_data ";
-	tab += "MDSYS.SDO_GEOMETRY";
-	tab += ", PRIMARY KEY (geom_id))";
-
-	if(!execute(tab))
-	{
-		errorMessage_ = "Error creating table  " + table + " !";
-		return false;
-	}
-	
-	//creates indexes
-	createIndex(table, table + "obj_idx", "object_id"); 
-				
-	///creates a sequence to table 
-	if(!createSequence(table))
-	{
-		deleteTable(table);
-		return false;
-	}
-
-	if(!createAutoIncrementTrigger(table,"geom_id"))
-	{
-		deleteTable(table);
-		string sql= "DROP SEQUENCE "+ getNameSequence(table);
-		execute(sql); 
-		return false;
-	}
-
-	return true;
-}
-
-
-bool 
-TeOracleSpatial::createRasterGeometry (const string& table)
-{
-	
-	if(tableExist(table))
-	{
-		errorMessage_= "Table already exist!";
-		return false;
-	}
-
-	string create = "CREATE TABLE " + table + " (";
-	create += "geom_id		NUMBER(32) NOT NULL,";
-	create += "object_id	VARCHAR2(255) NOT NULL,";
-	create += "raster_table VARCHAR2(255) NOT NULL,";
-	create += "lut_table	VARCHAR2(255) ,";
-	create += "res_x		NUMBER(*,38) DEFAULT 0.0,";
-	create += "res_y		NUMBER(*,38) DEFAULT 0.0,";
-	create += "num_bands	NUMBER(32),";
-	create += "num_cols		NUMBER(32),";
-	create += "num_rows		NUMBER(32),";
-	create += "block_height NUMBER(32),";
-	create += "block_width	NUMBER(32),";
-	create += "lower_x		NUMBER(*,38) DEFAULT 0.0,";
-	create += "lower_y		NUMBER(*,38) DEFAULT 0.0,";
-	create += "upper_x		NUMBER(*,38) DEFAULT 0.0,";
-	create += "upper_y		NUMBER(*,38) DEFAULT 0.0,";
-	create += "tiling_type  NUMBER(32),";
-	create += "PRIMARY KEY (geom_id))";
-	
-	if(!execute (create))
-	{
-		if(errorMessage_.empty())
-			errorMessage_ = "Error creating table " + table + " !" ;
-		return false;
-	}
-	
-	createIndex(table, table + "obj_idx", "object_id"); 
-	
-	if(!createSequence(table))
-	{
-		deleteTable(table);
-		return false;
-	}
-
-	if(!createAutoIncrementTrigger(table,"geom_id"))
-	{
-		deleteTable(table);
-		string sql= "DROP SEQUENCE "+ getNameSequence(table);
-		execute(sql); 
-		return false;
-	}
-	
-	return true;
-}
-
-bool 
-TeOracleSpatial::createRasterTable (const string& tableName)
-{
-	string tab;
-	tab = "CREATE TABLE "+ tableName + " ( ";
-	tab += "block_id ";
-	tab += " VARCHAR2(50) NOT NULL";
-	tab += ", band_id ";
-	tab += "NUMBER(32) NOT NULL";
-	tab += ", resolution_factor ";
-	tab += "NUMBER(32) ";
-	tab += ", subband ";
-	tab += "NUMBER(32) ";
-	tab += ", block_box ";
-	tab += "MDSYS.SDO_GEOMETRY ";
-	tab += ", block_size ";
-	tab += "NUMBER(32) ";
-	tab += ", spatial_data ";
-	tab += "BLOB ";
-	
-	tab += ", PRIMARY KEY (block_id))";
-
-	if(!execute(tab))
-	{
-		errorMessage_ = "Error creating table " + tableName ;
-		return false;
-	}
-	
-	createIndex(tableName, tableName + "band_idx", "band_id"); 
-	createIndex(tableName, tableName + "sbnd_idx", "subband");
-	createIndex(tableName, tableName + "rf_idx", "resolution_factor");
-	return true;
-}
-
-
-bool 
-TeOracleSpatial::createPolygonGeometry (const string& table)
-{
-	
-	if(tableExist(table))
-	{
-		errorMessage_= "Table already exist!";
-		return false;
-	}
-	
-	string tab;
-	tab = "CREATE TABLE " + table + " ( ";
-	tab += "geom_id ";
-	tab += "NUMBER(32) NOT NULL ";
-	tab += ", object_id ";
-	tab += "VARCHAR2(255) NULL";
-	tab += ", spatial_data ";
-	tab += "MDSYS.SDO_GEOMETRY";
-
-	tab += ", PRIMARY KEY (geom_id))";
-
-	if(!execute(tab))
-	{
-		if(errorMessage_.empty())
-			errorMessage_ = "Error creating table " + table ;
-		return false;
-	}
-
-	//creates indexes
-	createIndex(table, table + "obj_idx", "object_id");
-		
-	//creates a sequence to table 
-	if(!createSequence(table))
-	{
-		deleteTable(table);
-		return false;
-	}
-
-	//creates trigger
-	if(!createAutoIncrementTrigger(table, "geom_id"))
-	{
-		deleteTable(table);
-		string sql= "DROP SEQUENCE "+ getNameSequence(table);
-		execute(sql); 
-		return false;
-	}
-
-	return true;
-}
-
-
-bool 
-TeOracleSpatial::createLineGeometry (const string& table)
-{
-	
-	if(tableExist(table))
-	{
-		errorMessage_= "Table already exist!";
-		return false;
-	}
-	
-	string tab;
-	tab = "CREATE TABLE " + table + " ( ";
-	tab += "geom_id ";
-	tab += "NUMBER(32) NOT NULL";
-	tab += ", object_id ";
-	tab += "VARCHAR2(255)  NULL";
-	tab += ", spatial_data ";
-	tab += "MDSYS.SDO_GEOMETRY";
-	
-	tab += ", PRIMARY KEY (geom_id))";
-
-	if(!execute(tab))
-	{
-		if(errorMessage_.empty())
-			errorMessage_ = "Error creating table " + table + " !" ;
-		return false;
-	}
-
-	//creates indexes
-	createIndex(table, table + "obj_idx", "object_id");
-			
-	//creates a sequence to table 
-	if(!createSequence(table))
-	{
-		deleteTable(table);
-		return false;
-	}
-
-	//creates trigger
-	if(!createAutoIncrementTrigger(table, "geom_id"))
-	{
-		deleteTable(table);
-		string sql= "DROP SEQUENCE "+ getNameSequence(table);
-		execute(sql); 
-		return false;
-	}
-
-	return true;
-}
-
-
-bool 
-TeOracleSpatial::createPointGeometry (const string& table)
-{
-	
-	if(tableExist(table))
-	{
-		errorMessage_= "Table already exist!";
-		return false;
-	}
-
-	string tab;
-	tab = "CREATE TABLE " + table + " ( ";
-	tab += "geom_id ";
-	tab += "NUMBER(32) NOT NULL";
-	tab += ", object_id ";
-	tab += "VARCHAR2(255) NULL";
-	tab += ", spatial_data ";
-	tab += "MDSYS.SDO_GEOMETRY";
-	
-	tab += ", PRIMARY KEY (geom_id))";
-
-	if(!execute(tab))
-	{
-		if(errorMessage_.empty())
-			errorMessage_ = "Error creating table " + table + " !" ;
-		return false;
-	}	
-		
-	//creates indexes
-	createIndex(table, table + "obj_idx", "object_id");
-		
-	//creates a sequence to table 
-	if(!createSequence(table))
-	{
-		deleteTable(table);
-		return false;
-	}
-
-	if(!createAutoIncrementTrigger(table,"geom_id"))
-	{
-		deleteTable(table);
-		string sql= "DROP SEQUENCE "+ getNameSequence(table);
-		execute(sql); 
-		return false;
-	}
-
-	return true;
-}
-
-bool 
-TeOracleSpatial::insertRelationInfo(const int tableId, const string& tField,
-						  const string& rName, const string& rField, int& relId)
-{
-	TeOracleSpatialPortal *ocip = (TeOracleSpatialPortal*)getPortal();
-	if(!ocip)
-		return false;
-
-	relId = -1;
-	string sel = "SELECT relation_id FROM te_tables_relation WHERE";
-	sel += " table_id = " + Te2String(tableId);
-	sel += " AND attr_link = '" + tField + "'";
-	sel += " AND related_table = '" + rName + "'";
-	sel += " AND related_link = '" + rField + "'";
-	if (!ocip->query(sel))
-	{
-		delete ocip;
-		return false;
-	}
-
-	if (ocip->fetchRow())
-	{
-		relId = atoi(ocip->getData(0));
-		delete ocip;
-		return true;
-	}
-
-	string seq, ins;
-	seq = getNameSequence("te_tables_relation");	
-	ins = " INSERT INTO te_tables_relation ( "; 
-	ins += " relation_id, attr_link, table_id, ";
-	ins += " related_table, related_link) VALUES ( ";
-	ins += seq +".NEXTVAL "; 
-	ins += ",  " + Te2String(tableId);
-	ins += ", '" + escapeSequence(tField) + "'";
-	ins += ", '" +  escapeSequence(rName) + "'";
-	ins += ", '" +  escapeSequence(rField) + "'";
-	ins += ")";
-
-	if(!execute(ins))
-	{
-		if(errorMessage_.empty())
-			errorMessage_ = "Error inserting tables information!";   
-		delete ocip;
-		return false;
-	}
-
-	ins = "SELECT "+ seq +".CURRVAL FROM DUAL";
-	if (!ocip->query(ins))
-	{
-		if(errorMessage_.empty())
-			errorMessage_ = "Error in the sequence te_table_relation_seq!";  
-		delete ocip;
-		return false;
-	}
-
-	if(!ocip->fetchRow())
-	{
-		errorMessage_ = "Sequence value not found!";
-		delete ocip;
-		return false;
-	}
-
-	relId = atoi((const char*)ocip->getData(0));
-	delete ocip;
-	return true;
-}
-
-bool 
-TeOracleSpatial::insertTableInfo (int layerId, TeTable &table, const string& user)
-{
-	string ins, seq;
-
-	seq = getNameSequence("te_layer_table");
-	ins = "INSERT INTO te_layer_table ( "; 
-	ins += " table_id, layer_id, attr_table, unique_id, attr_link, ";
-	ins += " attr_initial_time, attr_final_time, attr_time_unit, ";
-	ins += " attr_table_type, user_name) VALUES ( ";
-	ins += seq + ".NEXTVAL "; 
-	
-	if(layerId>0)
-		ins += ", " + Te2String(layerId);
-	else
-		ins += ", " + NULL;
-	
-	ins += ", '" + escapeSequence(table.name()) + "'";
-	ins += ", '" + escapeSequence(table.uniqueName()) + "'";
-	ins += ", '" + escapeSequence(table.linkName()) + "'";
-	ins += ", '" + escapeSequence(table.attInitialTime()) + "'";
-	ins += ", '" + escapeSequence(table.attFinalTime()) + "'";
-	ins += ",  " + Te2String(table.attTimeUnit());
-	ins += ",  " + Te2String(table.tableType());
-	ins += ", '" +  escapeSequence(user) + "'";
-	ins += ")";
-
-	if(!execute(ins))
-	{
-		if(errorMessage_.empty())
-			errorMessage_ = "Error inserting tables information!";   
-		return false;
-	}
-
-	TeOracleSpatialPortal *ocip = (TeOracleSpatialPortal*)getPortal();
-	if(!ocip)
-		return false;
-
-	ins = "SELECT "+ seq +".CURRVAL FROM DUAL";
-	if (!ocip->query(ins))
-	{
-		if(errorMessage_.empty())
-			errorMessage_ = "Error in the sequence te_layer_table_seq!";  
-		delete ocip;
-		return false;
-	}
-
-	if(!ocip->fetchRow())
-	{
-		errorMessage_ = "Sequence value not found!";
-		delete ocip;
-		return false;
-	}
-
-	int index = atoi((const char*)ocip->getData(0));
-	table.setId(index);
-	delete ocip;
-	return true;
-}
-
-
-TeDBRelationType 
-TeOracleSpatial::existRelation(const string& tableName, const string& relName)
-{
-	TeOracleSpatialPortal  *ocip = (TeOracleSpatialPortal*)getPortal();
-	if(!ocip)
-		return TeNoRelation;
-	
-	string integ = " SELECT DELETE_RULE  ";
-	integ += " FROM   all_constraints ";
-	integ += " WHERE  CONSTRAINT_TYPE = 'R'"; 
-	integ += " AND    OWNER = '" + TeConvertToUpperCase(user_) + "'";
-	integ += " AND    CONSTRAINT_NAME = '" + TeConvertToUpperCase(relName) + "'";
-	
-	string temp = " AND    TABLE_NAME = '" + TeConvertToUpperCase(tableName) + "' ";   
-	integ += temp;
-	
-	if(!ocip->query(integ))
-	{
-		delete ocip;
-		return TeNoRelation;
-	}
-
-	string cascade;
-	if(ocip->fetchRow())
-	{
-		cascade = string(ocip->getData(0));
-		if(cascade== "CASCADE")
-		{
-			delete ocip;
-			return TeRICascadeDeletion;
-		}
-		
-		delete ocip;
-		return TeRINoCascadeDeletion;
-	}
-
-	delete ocip;
-	return TeNoRelation;	
-}
-
-
-bool 
-TeOracleSpatial::createRelation (const string& name, const string& table, const string& fieldName, const string& relatedTable, const string& relatedField, bool cascadeDeletion)
-{
-	string relation = "ALTER TABLE " + table + " ADD ";
-	relation += " CONSTRAINT " + name;
-	relation += " FOREIGN KEY ( " + fieldName + ") "; 
-	relation += " REFERENCES " + relatedTable + "(" + relatedField + ")";
-		
-	if (cascadeDeletion)
-		relation += " ON DELETE CASCADE ";
-
-	if(!execute(relation))
-		return false;
-
-	return true;
-}
-
-string 
-TeOracleSpatial::getSQLBoxWhere (TeBox &box, TeGeomRep rep)
-{
-	string wherebox;
-	string colname = "spatial_data";
-
-	if(rep == TeRASTER)
-		colname = "block_box";
-
-	if(rep == TeTEXT)
-	{
-		wherebox = TeDatabase::getSQLBoxWhere (box, rep);
-		return wherebox;
-	}
-
-	wherebox = "mdsys.sdo_filter (" + colname +",";
-	wherebox += "mdsys.sdo_geometry(2003,null,null,";
-	wherebox += "mdsys.sdo_elem_info_array(1,1003,3),";
-	wherebox += "mdsys.sdo_ordinate_array(";
-	wherebox += Te2String(box.x1(),10) + ", " + Te2String(box.y1(),10);
-	wherebox += ", " + Te2String(box.x2(),10) + ", " + Te2String(box.y2(),10) + ")),";
-	wherebox += "'mask=anyinteract querytype = window') = 'TRUE'";
-
-	return wherebox;
-}
-
-
-string 
-TeOracleSpatial::getSQLBoxWhere (const string& table1, const string& table2, TeGeomRep rep2, TeGeomRep rep1)
-{
-	string wherebox;
-	string colname1, colname2; 
-	colname1 = colname2 = "spatial_data";
-	
-	if(rep1 == TeRASTER) 
-		colname1 = "block_box";
-
-	if(rep2 == TeRASTER)
-		colname2 = "block_box";
-		
-	wherebox =  "MDSYS.SDO_FILTER ("+ table1 +"."+ colname1 +",";
-	wherebox += table2 +"."+ colname2 +", 'querytype = window') = 'TRUE'";  
-
-	return wherebox;
-}
-
-
-string 
-TeOracleSpatial::getSQLBoxSelect (const string& tableName, TeGeomRep rep)
-{
-	
-	string select;
-	string colname = "spatial_data";
-
-	if(rep == TeRASTER)
-		colname = "block_box";
-
-	select =  tableName +".* , ";
-	select += " SDO_GEOM.SDO_MIN_MBR_ORDINATE("+ tableName +"."+ colname +", 1) as lower_x,";
-	select += " SDO_GEOM.SDO_MIN_MBR_ORDINATE("+ tableName +"."+ colname +", 2) as lower_y,";
-	select += " SDO_GEOM.SDO_MAX_MBR_ORDINATE("+ tableName +"."+ colname +", 1) as upper_x,"; 
-	select += " SDO_GEOM.SDO_MAX_MBR_ORDINATE("+ tableName +"."+ colname +", 2) as upper_y ";
-	return select;
-}
-
-bool 
-TeOracleSpatial::getMBRSelectedObjects(string geomTable,string colGeom, string fromClause, string whereClause, string afterWhereClause, TeGeomRep /* repType */,TeBox &bout, const double& tol)
-{
-
-	TeOracleSpatialPortal* portal = (TeOracleSpatialPortal*)getPortal();
-	if (!portal)
-		return false;
-
-	string sql = "SELECT SDO_AGGR_MBR(" + colGeom + ") ";
-	sql += " FROM " + fromClause;
-	
-	if(!whereClause.empty())
-		sql += " WHERE " + whereClause;  
-	
-	if(!portal->query(sql)) 
-	{
-		delete portal;
-		return false;
-	}
-
-	if(!portal->fetchRow())
-	{
-		delete portal;
-		return false;
-	}
-
-	try
-	{
-		TeCoord2D coord1,coord2;
-		portal->GetCoordinates (1, coord1);
-		portal->GetCoordinates (2, coord2);
-		TeBox b(coord1.x()-tol, coord1.y()-tol, coord2.x()+tol, coord2.y()+tol);
-		bout = b;
-	}
-	
-	catch(...)
-	{
-		delete portal;
-		return false;
-	}
-	
-	delete portal;
-	return true;
-}
-
-
-string
-TeOracleSpatial::getSQLStatistics (TeGroupingAttr& attrs)
-{
-	string sql = "";
-	string virg = "";
-
-	TeGroupingAttr::iterator it = attrs.begin();
-	int count = 0;
-	while(it != attrs.end())
-	{
-		if(count>0)
-			virg = ",";
-
-		switch ((*it).second)
-		{
-			case TeSUM:
-				sql += virg +" SUM( "+ (*it).first.name_ +") AS SUM_"+ Te2String(count);
-				(*it).second = TeNOSTATISTIC;
-				++count;
-				break;
-			case TeMAXVALUE:
-				sql += virg +" MAX( "+ (*it).first.name_ +") AS MAX_"+ Te2String(count);
-				(*it).second = TeNOSTATISTIC;
-				++count;
-				break;
-			case TeMINVALUE:
-				sql += virg +" MIN( "+ (*it).first.name_ +") AS MIN_"+ Te2String(count);
-				(*it).second = TeNOSTATISTIC;
-				++count;
-				break;
-			case TeCOUNT:
-				sql += virg +" COUNT( "+ (*it).first.name_ +") AS COUNT_"+ Te2String(count);
-				(*it).second = TeNOSTATISTIC;
-				++count;
-				break;
-			case TeMEAN:
-				sql += virg +" AVG( "+ (*it).first.name_ +") AS AVG_"+ Te2String(count);
-				(*it).second = TeNOSTATISTIC;
-				++count;
-				break;
-			case TeSTANDARDDEVIATION:
-				sql += virg +" STDDEV( "+ (*it).first.name_ +") AS STDDEV_"+ Te2String(count);
-				(*it).second = TeNOSTATISTIC;
-				++count;
-				break;
-			case TeVARIANCE:
-				sql += virg +" VARIANCE( "+ (*it).first.name_ +") AS VAR_"+ Te2String(count);
-				(*it).second = TeNOSTATISTIC;
-				++count;
-				break;
-			default:
-				break;
-		}
-		++it;
-	}
-	return sql;
-}
-
-string 
-TeOracleSpatial::getSQLAutoNumber(const string& table)
-{
-	string aut = getNameSequence(table) +".NEXTVAL";
-	return aut;
-}
-
-bool 
-TeOracleSpatial::getMBRGeom(string tableGeom, string object_id, TeBox& box, string colGeom)
-{
-	TeOracleSpatialPortal* portal = (TeOracleSpatialPortal*)getPortal();
-	if (!portal)
-		return false;
-
-	string sql = "SELECT SDO_GEOM.SDO_MBR(" + tableGeom + "." + colGeom + ") ";
-	sql += " FROM " + tableGeom;
-	sql += " WHERE object_id = '" + object_id + "'";
-
-	if((!portal->query(sql)) || (!portal->fetchRow()))
-	{
-		delete portal;
-		return false;
-	}
-	
-	TeCoord2D coord1,coord2;
-	portal->GetCoordinates (1, coord1);
-	portal->GetCoordinates (2, coord2);
-	TeBox b(coord1.x(), coord1.y(), coord2.x(), coord2.y());
-	box = b;
-	
-	delete portal;
-	return true;
-}
-
-
-bool 
-TeOracleSpatial::insertRasterBlock(const string& table, const string& blockId, const TeCoord2D& ll, const TeCoord2D& ur, 
-								   unsigned char *buf,unsigned long size, int band, unsigned int res, unsigned int subband)
-{
-
-	if (blockId.empty()) // no block identifier provided
-	{
-		errorMessage_ = "bloco sem identificador";
-		return false;
-	}
-
-	TeOracleSpatialPortal* portal = (TeOracleSpatialPortal*) this->getPortal();
-	if (!portal)
-		return false;
-
-	bool update = false;
-	string q ="SELECT * FROM " + table; 
-	q += " WHERE block_id='" + blockId + "' FOR UPDATE ";
-
-	if (!portal->query (q))
-	{
-		delete portal;
-		return false;
-	}
-		// check if this block is alread in the database
-	if (portal->fetchRow())
-		update = true;
-
-	string sdo_geom = " MDSYS.SDO_GEOMETRY(2003, NULL, NULL";
-	sdo_geom += ", MDSYS.SDO_ELEM_INFO_ARRAY( 1, 1003, 3 )";
-	sdo_geom += ", MDSYS.SDO_ORDINATE_ARRAY( " ;
-	sdo_geom += Te2String(ll.x());
-	sdo_geom += ", " + Te2String(ll.y());
-	sdo_geom += ", " + Te2String(ur.x());
-	sdo_geom += ", " + Te2String(ur.y());
-	sdo_geom += ")) ";
-
-	try
-	{
-		if (!update)
-		{
-			portal->freeResult();
-
-			q = "INSERT INTO "+ table +" (block_id, band_id, subband, ";
-			q += " resolution_factor, block_box, block_size, spatial_data) VALUES ( ";
-			q += "'" + blockId + "'";
-			q += ", " + Te2String(band);
-			q += ", " + Te2String(subband);
-			q += ", " + Te2String(res);
-			q += ", " + sdo_geom;
-			q += ", " + Te2String(size);
-			q += ", EMPTY_BLOB()";
-			q += ")";
-	
-			if (!this->Conn->Execute(q))
-				return false;
-			
-			q = "SELECT * FROM " + table; 
-			q += " WHERE block_id= '" + blockId + "' FOR UPDATE ";
-			
-			if((!portal->query(q)) || (!portal->fetchRow()))
-			{
-				delete portal;
-				return false;
-			}
-		}
-		
-		portal->getCursor()->WriteBlob(buf, size);
-		portal->freeResult();		
-	}
-	catch(...)
-	{
-		errorMessage_ = "Oppps !";
-		delete portal;
-		return false;
-	}
-	delete portal;
-	return true;
-	
-}
-
-bool 
-TeOracleSpatial::insertBlob (const string& tableName, const string& /* columnBlob */, TeAttributeRep& columnId, const string& valueId, unsigned char* data, int size)
-{
-	
-	TeOracleSpatialPortal* portal = (TeOracleSpatialPortal*)getPortal();
-	if (!portal)
-		return false;
-
-	try
-	{
-		string q = "SELECT * FROM "+ tableName +" WHERE "+ columnId.name_ +" = ";
-	
-		switch (columnId.type_ )
-		{
-			case TeSTRING:
-				q += "'"+ valueId + "'";
-				break;
-			default:
-				q += valueId;
-				break;
-		}
-		q += " FOR UPDATE ";
-
-		if((!portal->query(q)) || (!portal->fetchRow()))
-		{
-			delete portal;
-			return false;
-		}
-				
-		portal->getCursor()->WriteBlob(data, size);
-		portal->freeResult();		
-	}
-
-	catch(...)
-	{
-		errorMessage_ = "Error!";
-		delete portal;
-		return false;
-	}
-
-	delete portal;
-	if(data)
-		delete []data;
-	return true;
-}
-	
-
-bool 
-TeOracleSpatial::insertBlob (const string& tableName, const string& columnBlob, TeAttributeRep& columnId, const string& valueId, const string& fileName)
-{
-	unsigned char	*cdata = 0;
-	int		size;
-	FILE	*fp = 0;
-	
-	struct	_stat stat;
-	int		result;
-	
-	result = _stat(fileName.c_str(), &stat);
-	
-	if( result != 0 )
-		return false;
-	
-	size = stat.st_size;
-
-	cdata = new unsigned char[size];
-	fp = fopen(fileName.c_str(), "rb");
-	fread(cdata, sizeof(unsigned char), size, fp); 
-
-	bool status = insertBlob (tableName, columnBlob, columnId,  valueId, cdata, size);
-
-	if(fp)
-		fclose(fp);
-
-	return status;
-}
-	
-
-bool 
-TeOracleSpatial::dropConceptualModel()
-{
-	//drop tables
-	string drop = "	DROP TABLE te_raster_metadata";
-	if(!execute(drop))
-		return false;
-
-	drop = "DROP TABLE te_representation";
-	if(!execute(drop))
-		return false;
-
-	drop = "DROP TABLE te_tables_relation";
-	if(!execute(drop))
-		return false;
-
-	drop = "DROP TABLE te_layer_table";
-	if(!execute(drop))
-		return false;
-
-	drop = "DROP TABLE te_visual";
-	if(!execute(drop))
-		return false;
-	
-	drop = "DROP TABLE te_legend";
-	if(!execute(drop))
-		return false;
-
-	drop = "DROP TABLE te_theme";
-	if(!execute(drop))
-		return false;
-	
-	drop = "DROP TABLE te_theme_table";
-	if(!execute(drop))
-		return false;
-	
-	drop = "DROP TABLE te_view";
-	if(!execute(drop))
-		return false;
-
-	drop = "DROP TABLE te_layer";
-	if(!execute(drop))
-		return false;
-
-	drop = "DROP TABLE te_projection";
-	if(!execute(drop))
-		return false;
-
-	//drop sequences
-	drop = "DROP SEQUENCE "+ getNameSequence("te_tables_relation"); 
-	if(!execute(drop))
-		return false;
-
-	drop = "DROP SEQUENCE "+ getNameSequence("te_layer_table");  
-	if(!execute(drop))
-		return false;
-
-	drop = "DROP SEQUENCE "+ getNameSequence("te_legend");
-	if(!execute(drop))
-		return false;
-
-	drop = "DROP SEQUENCE "+ getNameSequence("te_theme");
-	if(!execute(drop))
-		return false;
-
-	drop = "DROP SEQUENCE "+ getNameSequence("te_theme_table");
-	if(!execute(drop))
-		return false;
-
-	drop = "DROP SEQUENCE "+ getNameSequence("te_view"); 
-	if(!execute(drop))
-		return false;
-
-	drop = "DROP SEQUENCE "+ getNameSequence("te_layer");
-	if(!execute(drop))
-		return false;
-
-	drop = "DROP SEQUENCE "+ getNameSequence("te_projection");
-	if(!execute(drop))
-		return false;
-
-	drop = "DROP SEQUENCE "+ getNameSequence("te_representation");
-	if(!execute(drop))
-		return false;
-
-	TeOracleSpatialPortal* portal = (TeOracleSpatialPortal*)this->getPortal();
-		
-	//tabelas geometricas com SDO_GEOMETRY
-	string sql = "SELECT TABLE_NAME FROM USER_SDO_GEOM_METADATA ";
-	if(!portal->query(sql))
-	{
-		delete portal;
-		return false;
-	}
-	
-	while(portal->fetchRow())
-	{
-		string tableName = portal->getData(0);
-		string del = "drop table " + tableName;
-		this->execute (del);
-	}
-	
-	portal->freeResult();
-
-	sql = "DELETE USER_SDO_GEOM_METADATA ";
-	this->execute(sql);
-	
-	//spatial index
-	sql = "SELECT INDEX_NAME FROM USER_SDO_INDEX_INFO";
-	if(!portal->query(sql))
-	{
-		delete portal;
-		return false;
-	}
-	
-	while(portal->fetchRow())
-	{
-		string indexName = portal->getData(0);
-		string del = "drop index " + indexName;
-		this->execute(del);
-	}
-	
-	delete portal;
-	return true;
-}
-
-TeOracleSpatialPortal::TeOracleSpatialPortal ( TeOracleSpatial*  pDatabase) 
-{
-	cursor = new OCICursor(pDatabase->Conn);
-	db_ = pDatabase;
-}
-
-
-TeOracleSpatialPortal::~TeOracleSpatialPortal () 
-{
-	delete cursor;
-	cursor = NULL;
-}
-
-
-bool TeOracleSpatialPortal::isConnected()
-{
-	return (cursor->Conn()->IsConnected());
-}
-
-
-bool TeOracleSpatialPortal::isEOF() 
-{
-	if (!isConnected())
-		return true;
-
-	return false;
-}
-
-
-bool
-TeOracleSpatialPortal::moveFirst() 
-{
-	if (cursor->MoveFirst())
-		return true;
-	else
-		return false;
-}
-
-
-bool 
-TeOracleSpatialPortal::moveNext() 
-{
-	if(cursor->MoveNext())
-		return true;
-	return false;
-}
-
-
-bool TeOracleSpatialPortal::query (const string &q,TeCursorLocation /* l */ , TeCursorType /* t */, TeCursorEditType /* e */, TeCursorDataType /* dt */)  //Ok
-{
-	errorMessage_.clear ();
-
-	if (!cursor->isOpen())
-	{
-		if(!cursor->Open())
-		{
-			numRows_ = 0;
-			return false;
-		}
-	}
-
-	if (!cursor->Query(q))
-	{
-		this->errorMessage_ = cursor->getErrorMessage();
-		numRows_ = 0;
-		return false;
-	}
-	
-	numFields_= this->cursor->NumCol();
-	
-	attList_.clear ();
-	int i;
-	for(i = 1; i <= numFields_ ; i++)
-	{
-		TeAttribute attribute;
-
-		switch (cursor->ColType(i))
-		{
-			case 3: //INTEGER
-			attribute.rep_.type_ = TeINT;
-			break;
-
-			case 2:  //NUMBER
-			case 4: //FLOAT DOUBLE
-			attribute.rep_.type_ = TeREAL;
-			break;
-
-			case 12: //Date
-			attribute.rep_.type_ = TeDATETIME;
-			attribute.dateChronon_ = TeSECOND;
-			attribute.dateTimeFormat_ = "DD/MM/YYYY HH24:MI:SS";
-			break;
-
-			case 113: //Blob
-			attribute.rep_.type_ = TeBLOB;
-			break;
-
-			case 96: //CHAR
-			case 9: //VARCHAR:
-			case 1: //VARCHAR2:
-			attribute.rep_.type_ = TeSTRING;
-			break;
-
-			case 108: //OBJECT: // SDO_GEOMETRY
-			attribute.rep_.type_ = TeOBJECT;
-			break;
-			default :
-			attribute.rep_.type_ = TeUNKNOWN;
-			break;
-		} 
-		
-		//attribute.rep_.name_ = TeConvertToLowerCase(cursor->ColName(i)); 
-		attribute.rep_.name_ = cursor->ColName(i); 
-		attribute.rep_.numChar_ = cursor->ColSize(i);
-		attList_.push_back ( attribute );
-
-	}
-
-	curRow_=-1;
-	return true;
-}
-
-
-
-bool TeOracleSpatialPortal::querySDO (const string &q)  
-{
-	errorMessage_.clear ();
-
-	if (!cursor->isOpen())
-	{
-		if(!cursor->Open())
-		{
-			numRows_ = 0;
-			return false;
-		}
-	}
-
-	if (!cursor->QuerySDO(q))
-	{
-		this->errorMessage_ = cursor->getErrorMessage();
-		numRows_ = 0;
-		return false;
-	}
-	
-	numFields_= this->cursor->NumCol();
-	
-	attList_.clear ();
-	int i;
-	for(i = 1; i <= numFields_ ; i++)
-	{
-		TeAttribute attribute;
-
-		switch (cursor->ColType(i))
-		{
-			case 3: //INTEGER
-			attribute.rep_.type_ = TeINT;
-			break;
-
-			case 2:  //NUMBER
-			case 4: //FLOAT DOUBLE
-			attribute.rep_.type_ = TeREAL;
-			break;
-
-			case 12: //Date
-			attribute.rep_.type_ = TeDATETIME;
-			break;
-
-			case 113: //Blob
-			attribute.rep_.type_ = TeBLOB;
-			break;
-
-			case 96: //CHAR
-			case 9: //VARCHAR:
-			case 1: //VARCHAR2:
-			attribute.rep_.type_ = TeSTRING;
-			break;
-
-			case 108: //OBJECT: // SDO_GEOMETRY
-			attribute.rep_.type_ = TeOBJECT;
-			break;
-			default :
-			attribute.rep_.type_ = TeUNKNOWN;
-			break;
-		} 
-		
-		attribute.rep_.name_ = cursor->ColName(i); 
-		attribute.rep_.numChar_ = cursor->ColSize(i);
-		attList_.push_back ( attribute );
-	}
-
-	curRow_=-1;
-	return true;
-}
-
-
-void TeOracleSpatialPortal::freeResult () 
-{
-	cursor->FreeResult();
-}
-
-
-bool TeOracleSpatialPortal::fetchRow () 
-{
-	try
-	{	
-		if( !isConnected() )
-			return false;
-		if( numFields_ == 0/* || numRows_ < 1*/)
-			return false;
-		
-		if (curRow_ == -1)
-		{
-			if(moveFirst())
-				curRow_++;
-			else
-				return false;
-		}
-		else
-		if (moveNext())
-		{
-			curRow_++;
-			return true;
-		}
-		else
-			return false;
-	}
-	
-	catch(...) //_com_error &e)
-	{
-		return false;
-	}
-
-	return true;
-}
-
-bool TeOracleSpatialPortal ::fetchRow (int i)
-{
-	
-	if(curRow_ == i)
-		return true;
-
-	if (cursor->MoveTo(i))
-	{
-		curRow_ = cursor->CurrentRow()
-			;
-		return true;
-	}
-	
-	return false;
-}
-
-string  
-TeOracleSpatial::escapeSequence (const string& from)
-{
-	string aux = "";
-	unsigned int size = from.length ();
-	unsigned int i;
-
-	for(i=0; i < size; i++)
-	{
-		if(from[i] == 39) 
-			aux += from[i] + unsigned char(39);
-		else
-			aux += from[i];
-    }
-	return aux;
-}
-
-bool 
-TeOracleSpatial::insertTable(TeTable &table)
-{
-	string tableName = table.name();
-	int size = table.size();
-	TeAttributeList att = table.attributeList();
-	TeAttributeList::iterator it = att.begin();
-	TeAttributeList::iterator itEnd = att.end();
-
-	TeTableRow row;
-	int i;
-	unsigned int j;
-	for ( i = 0; i < size; i++  )
-	{
-		row = table[i];
-		it = att.begin();
-		string q = 	"INSERT INTO "+tableName+" VALUES(";
-		j = 1;
-		int jj = 0;
-		while ( it != itEnd )
-		{
-			if (j != 1)
-				q += ", ";
-
-  			string oracleFormat="";
-			string dateTime="";
-			if(((*it).rep_.type_==TeDATETIME) && (!row[jj].empty()))
-			{
-				TeTime t  (row[jj], (*it).dateChronon_, (*it).dateTimeFormat_, (*it).dateSeparator_,
-						   (*it).timeSeparator_, (*it).indicatorPM_);
-				
-				dateTime = t.getDateTime("DDsMMsYYYYsHHsmmsSS");
-				oracleFormat = " TO_DATE('" + dateTime + "', 'DD/MM/YYYY HH24:MI:SS')";
-			}
-			
-			switch ((*it).rep_.type_)
-  			{
-  				case TeSTRING:
-					q += "'"+ escapeSequence(row[jj]) +"'";
-  				break;
-  				case TeREAL:
-					q += row[jj]; 
-  				break;
-  				case TeINT:
-					q += row[jj];
-  				break;
-				case TeDATETIME:
-					q += oracleFormat;
-  				break;
-				case TeCHARACTER:
-					q += "'" + escapeSequence(row[jj]) + "'";
-  				break;
-				case TeBLOB:
-					q += " EMPTY_BLOB() ";
-				break;
-  				default:
-					q += "'"+ escapeSequence(row[jj]) +"'";
-  				break;
-  			}
-			++it;
-			j++;
-			jj++;
-		}
-		q += ")";
-		
-		if (!execute(q))
-			continue;
-	}
-	return true;
-}
-	
-	
-bool
-TeOracleSpatial::updateTable (TeTable &table)
-{
-	string tableName = table.name();
-	TeAttributeList att = table.attributeList();
-	TeAttributeList::iterator it = att.begin();
-
-	TeTableRow row;
-	unsigned int i;
-	unsigned int j;
-	string uniqueName = table.uniqueName();
-	string uniqueVal;
-	for ( i = 0; i < table.size(); i++  )
-	{
-		row = table[i];
-		it = att.begin();
-		string q = 	"UPDATE "+tableName+" SET ";
-		j = 1;
-		int jj = 0;
-		while ( it != att.end() )
-		{
-			string oracleFormat;
-			string dateTime; 
-			if((*it).rep_.type_==TeDATETIME)
-			{
-				TeTime t  (row[jj], (*it).dateChronon_, (*it).dateTimeFormat_, (*it).dateSeparator_,
-						   (*it).timeSeparator_, (*it).indicatorPM_);
-				
-				dateTime = t.getDateTime();
-				oracleFormat = "DD/MM/YYYY HH24:MI:SS"; 
-			}
-			
-			if (uniqueName != (*it).rep_.name_)
-			{
-				q += (*it).rep_.name_ + "=";
-  				switch ((*it).rep_.type_)
-  				{
-  					case TeSTRING:
-						q += "'"+escapeSequence(row[jj])+"'";
-  					break;
-  					case TeREAL:
-						q += row[jj];
-  					break;
-  					case TeINT:
-						q += row[jj];
-  					break;
-					case TeDATETIME:
-						q += " TO_DATE('" + dateTime + "', '"+ oracleFormat +"')";
-  					break;
-					case TeCHARACTER:
-						q += "'" + escapeSequence(row[jj]) + "'";
-  					break;
-  					default:
-						q += "'"+escapeSequence(row[jj])+"'";
-  					break;
-  				}
-				if (j<att.size())
-					q+= ",";
-			}
-			else
-				uniqueVal = row[jj];
-
-			++it;
-			j++;
-			jj++;
-		}
-		q += " WHERE " + uniqueName + " = " + uniqueVal;
-		if (!execute(q))
-			continue;
-	}
-	return true;
-}
-	
-
-bool 
-TeOracleSpatial::insertProjection (TeProjection *proj)
-{
-	string insert = "INSERT INTO te_projection (projection_id, name, long0, lat0,";
-	insert += " offx, offy, stlat1, stlat2, unit, scale, hemis, datum, ";
-	insert += " radius, flattening, dx , dy, dz ) VALUES ( ";
-	insert += "te_projection_seq.NEXTVAL";
-	insert += ", '" + escapeSequence(proj->name()) + "'";
-	insert += ", " + Te2String(proj->params().lon0*TeCRD,10);
-	insert += ", " + Te2String(proj->params().lat0*TeCRD,10);
-	insert += ", " + Te2String(proj->params().offx,10);
-	insert += ", " + Te2String(proj->params().offy,10);
-	insert += ", " + Te2String(proj->params().stlat1*TeCRD,10);
-	insert += ", " + Te2String(proj->params().stlat2*TeCRD,10);
-	insert += ", '" + escapeSequence(proj->params().units) + "'";
-	insert += ", " + Te2String(proj->params().scale,10);
-	insert += ", " + Te2String(proj->params().hemisphere);
-	insert += ", '" + escapeSequence(proj->params().datum.name()) + "'";
-	insert += ", " + Te2String(proj->params().datum.radius(),10);
-	insert += ", " + Te2String(proj->params().datum.flattening(),10);
-	insert += ", " + Te2String(proj->params().datum.xShift(),10);
-	insert += ", " + Te2String(proj->params().datum.yShift(),10);
-	insert += ", " + Te2String(proj->params().datum.zShift(),10);
-	insert += ")";
-
-	if(!execute(insert))
-	{
-		if(errorMessage_.empty())
-			errorMessage_ = "Error inserting in the table te_projection!";   
-		return false;
-	}
-
-	TeOracleSpatialPortal *ocip = (TeOracleSpatialPortal*) getPortal();
-	if(!ocip)
-		return false;
-
-	string seq = "SELECT te_projection_seq.CURRVAL FROM DUAL";
-	if(!ocip->query(seq))
-	{
-		if(errorMessage_.empty())
-			errorMessage_ = "Error in the sequence te_projection_seq!";  
-		delete ocip;
-		return false;
-	}
-
-	if(!ocip->fetchRow())
-	{
-		errorMessage_ = "Sequence value not found!";
-		delete ocip;
-		return false;
-	}
-
-	proj->id(atoi((const char*)ocip->getData(0))); 
-	delete ocip;
-
-	return true;
-}
-
-
-
-bool
-TeOracleSpatial::insertRepresentation (int layerId, TeRepresentation& rep)
-{
-	if (layerId <= 0)
-		return false;
-	
-	string ins;
-	TeOracleSpatialPortal *ocip = (TeOracleSpatialPortal*) getPortal();
-	if(!ocip)
-		return false;
-
-	try
-	{
-		ins = " INSERT INTO te_representation (repres_id, layer_id, geom_type, geom_table, ";
-		ins += " description, lower_x, lower_y, upper_x, upper_y, res_x, res_y, num_cols, ";
-		ins += " num_rows) VALUES (";
-		ins += " te_representation_seq.NEXTVAL ";
-		ins += ", " + Te2String(layerId);
-		ins += ", " + Te2String(static_cast<int>(rep.geomRep_));
-		ins += ", '" + escapeSequence(rep.tableName_) + "'";
-		ins += ", '" + escapeSequence(rep.description_) + "'";
-		ins += ", " + Te2String(rep.box_.x1(),10);
-		ins += ", " + Te2String(rep.box_.y1(),10);
-		ins += ", " + Te2String(rep.box_.x2(),10);
-		ins += ", " + Te2String(rep.box_.y2(),10);
-		ins += ", " + Te2String(rep.resX_,10);
-		ins += ", " + Te2String(rep.resY_,10);
-		ins += ", " + Te2String(rep.nCols_);
-		ins += ", " + Te2String(rep.nLins_);
-		ins += ")";
-
-		if(!execute(ins))
-		{
-			if(errorMessage_.empty())
-				errorMessage_ = "Error inserting in the table te_representation!";   
-			return false;
-		}
-		
-		string seq = "SELECT te_representation_seq.CURRVAL FROM DUAL";
-		if(!ocip->query(seq))
-		{
-			if(errorMessage_.empty())
-				errorMessage_ = "Error in the sequence te_representation_seq!";  
-			delete ocip;
-			return false;
-		}
-
-		if(!ocip->fetchRow())
-		{
-			errorMessage_ = "Sequence value not found!";
-			delete ocip;
-			return false;
-		}
-
-		int id = atoi((const char*)ocip->getData(0)); 
-		rep.id_ = id;
-	}
-
-	catch(...)
-	{
-		errorMessage_ = "Error inserting in the table te_representation!"; 
-		delete ocip;
-		return false;
-	}
-
-	delete ocip;
-	return true;
-}
-
-
-bool
-TeOracleSpatial::insertLegend (TeLegendEntry* leg)
-{
-	TeOracleSpatialPortal  *ocip = (TeOracleSpatialPortal*)getPortal();
-	if(!ocip)
-		return false;
-
-	try
-	{
-		string ins = "INSERT INTO te_legend (legend_id, theme_id, group_id, ";
-		ins += " num_objs, lower_value, upper_value, label) VALUES ( ";
-		ins += "te_legend_seq.NEXTVAL";
-		ins += ", " + Te2String(leg->theme());
-		ins += ", " + Te2String(leg->group());
-		ins += ", " + Te2String(leg->count());
-		ins += ", '" + escapeSequence(leg->from()) + "'";
-		ins += ", '" + escapeSequence(leg->to()) + "'";
-		ins += ", '" + escapeSequence(leg->label()) + "'";
-		ins += ")";
-			
-		if (!execute(ins))
-		{
-			if(errorMessage_.empty())
-				errorMessage_ = "Error inserting in the table te_legend!"; 
-			return false;
-		}
-
-		string seq = "SELECT te_legend_seq.CURRVAL FROM DUAL";
-		if(!ocip->query(seq))
-		{
-			if(errorMessage_.empty())
-				errorMessage_ = "Error in the sequence te_theme_seq!";  
-			delete ocip;
-			return false;
-		}
-
-		if(!ocip->fetchRow())
-		{
-			errorMessage_ = "Sequence value not found!";;
-			delete ocip;
-			return false;
-		}
-
-		int index = atoi((const char*)ocip->getData(0)); 
-		leg->id(index);
-	}
-	catch(...)
-	{
-		errorMessage_ = "Error inserting in the table te_legend!"; 
-		delete ocip;
-		return false;
-	}
-		
-	delete ocip;
-	legendMap_[leg->id()] = leg;
-	return insertVisual(leg);
-}
-
-
-bool 
-TeOracleSpatial::AllocateOrdinatesObject(TePolygon &poly, string& elInfo, OCICursor* cursor)
-{
-	int		totalsize, ni, size;
-	double	xult, yult;
-	short	orient;
-
-	ni = poly.size () - 1;
-
-	xult = -9999.99;
-	yult = -9999.99;
-
-	totalsize = 0;
-
-	try
-	{
-		//OCI: create the ordinates array
-		if(!cursor)
-			Conn->AllocateObjectOrdinates();
-		
-		for (int k = 0; k <= ni; k++ )
-		{
-			TeLinearRing ring ( poly[k] );
-			totalsize += ring.size();
-			size = ring.size();
-			orient = TeOrientation(ring);
-			
-			if (k==0)  //external polygon: UNCLOCKWISE
-			{
-				elInfo = "1, 1003, 1";
-				if(orient == TeCOUNTERCLOCKWISE)   
-				{
-					for (int i=0;i<size;i++)
-					{
-						if(xult != ring[i].x() || yult != ring[i].y())
-						{
-							if(cursor)
-							{
-								cursor->AppendOrdinates(ring[i].x());
-								cursor->AppendOrdinates (ring[i].y());	
-							}
-							else
-							{
-								Conn->AppendOrdinates(ring[i].x());
-								Conn->AppendOrdinates (ring[i].y());	
-							}
-						
-							xult = ring[i].x();
-							yult = ring[i].y();
-						}
-					}
-				}
-				//keep UNCLOCKWISE ring 
-				else
-				{
-					for (int i=0;i<size;i++)
-					{
-						if(xult != ring[size-1-i].x() || yult != ring[size-1-i].y())
-						{
-							if(cursor)
-							{
-								cursor->AppendOrdinates(ring[size-1-i].x());
-								cursor->AppendOrdinates (ring[size-1-i].y());
-							}
-							else
-							{
-								Conn->AppendOrdinates(ring[size-1-i].x());
-								Conn->AppendOrdinates (ring[size-1-i].y());
-							}
-							
-							xult = ring[size-1-i].x();
-							yult = ring[size-1-i].y();
-						}
-					}
-				}
-			}
-
-			else  //internal polygon: CLOCKWISE
-			{
-				int pos = ((totalsize - size) * 2) + 1; 
-				elInfo += ", " + Te2String(pos) + ", 2003, 1";
-						
-				if(orient == TeCLOCKWISE)   
-				{
-					for (int i=0;i<size;i++)
-					{
-						if(xult != ring[i].x() || yult != ring[i].y())
-						{
-							if(cursor)
-							{
-								cursor->AppendOrdinates(ring[i].x());
-								cursor->AppendOrdinates (ring[i].y());
-							}
-							else
-							{
-								Conn->AppendOrdinates(ring[i].x());
-								Conn->AppendOrdinates (ring[i].y());
-							}
-
-							xult = ring[i].x();
-							yult = ring[i].y();
-						}
-					}
-				}
-				//keep CLOCKWISE ring
-				else
-				{
-					for (int i=0;i<size;i++)
-					{
-						if(xult != ring[size-1-i].x() || yult != ring[size-1-i].y())
-						{
-							Conn->AppendOrdinates(ring[size-1-i].x());
-							Conn->AppendOrdinates (ring[size-1-i].y());
-							
-							xult = ring[size-1-i].x();
-							yult = ring[size-1-i].y();
-						}
-					}
-				}
-			}
-		}//for all rings
-	}
-	catch(...)
-	{
-		return false;
-	}
-	
-	return true;	
-}
-
-bool 
-TeOracleSpatial::AllocateOrdinatesObject(TeLine2D &line, OCICursor* cursor)
-{
-	int size = line.size();
-	double	xult, yult;
-	xult = -9999.99;
-	yult = -9999.99;
-
-	try
-	{
-		//OCI: create the ordinates array
-		if(!cursor)
-			Conn->AllocateObjectOrdinates ();
-
-		for (int i=0;i<size;i++)
-		{		
-			if(xult != line[i].x() || yult != line[i].y())
-			{
-				if(cursor)
-				{
-					cursor->AppendOrdinates(line[i].x());
-					cursor->AppendOrdinates(line[i].y());
-				}
-				else
-				{
-					Conn->AppendOrdinates(line[i].x());
-					Conn->AppendOrdinates(line[i].y());
-				}
-				xult = line[i].x();
-				yult = line[i].y();
-			}
-		}
-	}
-	catch(...)
-	{
-		return false;
-	}
-
-	return true;
-}
-
-
-bool 
-TeOracleSpatial::insertPolygon (const string& table, TePolygon &poly)
-{
-	
-	string	elinfo;
-	
-	if(!AllocateOrdinatesObject(poly, elinfo))
-		return false;
-	
-
-	string ins = "INSERT INTO " + table + " ( ";
-	ins += " geom_id, object_id, spatial_data) VALUES ( ";
-	ins += getNameSequence(table) +".NEXTVAL";
-	ins += ", '" + escapeSequence(poly.objectId()) + "'";
-	ins += ", MDSYS.SDO_GEOMETRY(2003, NULL, NULL";
-	ins += ", MDSYS.SDO_ELEM_INFO_ARRAY( " + elinfo + " )";
-	ins += ", :ordinates) ";
-	ins += " )";
-
-	if(!Conn->ExecuteSDOSTM(ins))
-	{
-		errorMessage_ = "Error inserting in the table " + table + "!"; 
-		return false;
-	}
-
-	/*
-	string seq = "SELECT "+ getNameSequence(table) +".CURRVAL FROM DUAL";
-	if(!ocip->query(seq))
-	{
-		if(errorMessage_.empty())
-			errorMessage_ = "Error in the sequence " + table + "_seq!";  
-		delete ocip;
-		return false;
-	}
-
-	if(!ocip->fetchRow())
-	{
-		errorMessage_ = "Sequence value not found!";
-		delete ocip;
-		return false;
-	}
-
-	int index = atoi((const char*)ocip->getData(0)); 
-	poly.geomId(index); 
-	delete ocip;
-	*/
-
-	return true;
-}
-
-bool 
-TeOracleSpatial::updatePolygon (const string& table, TePolygon &poly)
-{
-	if(!tableExist(table))
-	{	
-		errorMessage_ = "Table not exist!";
-		return false;
-	}
-	
-	string elinfo;
-
-	if(!AllocateOrdinatesObject(poly, elinfo))
-		return false;
-		
-	string sql;
-	sql =  "UPDATE " + table + " SET ";
-	sql += ", object_id = '" + poly.objectId() + "'";
-	sql += ", spatial_data = ";
-	sql += " MDSYS.SDO_GEOMETRY(2003, NULL, NULL";
-	sql += ", MDSYS.SDO_ELEM_INFO_ARRAY( " + elinfo + " )";
-	sql += ", :ordinates) ";
-	sql += " WHERE geom_id = " + poly.geomId();
-
-	//OCI
-	if(!Conn->ExecuteSDOSTM(sql))
-	{
-		errorMessage_ = "Error updating in the table " + table + "!"; 
-		return false;
-	}
-	
-	return true;
-}
-
-bool 
-TeOracleSpatial::selectPolygonSet (const string& table, const string& criteria, TePolygonSet &ps)
-{
-	TeOracleSpatialPortal *ocip = (TeOracleSpatialPortal*)getPortal();
-	if(!ocip)
-		return false;
-
-	string sql ="SELECT * FROM " + table;
-	if (!criteria.empty())
-		sql += " WHERE " + criteria;
-	sql += " ORDER BY object_id ASC ";
-	 
-	if (!ocip->query(sql) || !ocip->fetchRow())
-	{
-		delete ocip;
-		return false;
-	}
-	
-	bool flag = true;
-	do
-	{
-		TePolygon poly;
-		flag = ocip->fetchGeometry(poly);
-		ps.add(poly);
-	}
-	while (flag);
-
-	delete ocip;
-	return true;
-}
-
-bool 
-TeOracleSpatial::loadPolygonSet (const string& table, const string& geoid, TePolygonSet &ps)
-{
-	TeOracleSpatialPortal *ocip = (TeOracleSpatialPortal*)getPortal();
-	if(!ocip)
-		return false;
-
-	string q ="SELECT * FROM " + table;
-
-	if (geoid != "")
-		q += " WHERE object_id = '" + geoid +"'";
-	
-	if (!ocip->query(q) || !ocip->fetchRow())
-	{	
-		delete ocip;
-		return false;
-	}
-
-	bool flag = true;
-	do
-	{
-		TePolygon poly;
-		flag = ocip->fetchGeometry(poly);
-		ps.add(poly);
-	}
-	while (flag);
-	delete ocip;
-	return true;
-}
-
-
-bool 
-TeOracleSpatial::loadPolygonSet (const string& table, TeBox &box, TePolygonSet &ps)
-{
-	TeOracleSpatialPortal *ocip = (TeOracleSpatialPortal*)getPortal();
-	if(!ocip)
-		return false;
-
-	string q = "SELECT * FROM " + table;
-	q += this->getSQLBoxWhere (box, TePOLYGONS);
-	q += " ORDER BY object_id ";
-
-	if (!ocip->query(q) || !ocip->fetchRow())
-	{	
-		delete ocip;
-		return false;
-	}
-	bool flag = true;
-	do
-	{
-		TePolygon poly;
-		flag = ocip->fetchGeometry(poly);
-		ps.add(poly);
-	}
-	while (flag);
-	delete ocip;
-	return true;
-}
-
-bool 
-TeOracleSpatial::loadPolygonSet(TeTheme* theme, TePolygonSet &ps)
-{
-	string collTable = theme->collectionTable();
-	if (collTable.empty())
-		return false;
-
-	TeLayer* themeLayer = theme->layer();
-	if (!themeLayer->hasGeometry(TePOLYGONS))
-		return false;
-	
-	string polygonTable = themeLayer->tableName(TePOLYGONS);
-	if (polygonTable.empty())
-		return false;
-
-	string sql = "SELECT * FROM (" + polygonTable + " RIGHT JOIN " + collTable;
-	sql += " ON " + polygonTable + ".object_id = " + collTable + ".object_id)";
-	
-	TeOracleSpatialPortal *ocip = (TeOracleSpatialPortal*)getPortal();
-	if(!ocip)
-		return false;
-
-	if (!ocip->query(sql) || !ocip->fetchRow())
-	{
-		delete ocip;
-		return false;
-	}
-
-	bool flag = true;
-	do
-	{
-		TePolygon poly;
-		flag = ocip->fetchGeometry(poly);
-		ps.add ( poly );
-	}
-	while (flag);		
-	delete ocip;
-	return true;
-}
-
-TeDatabasePortal* 
-TeOracleSpatial::loadPolygonSet(const string& table, TeBox &box)
-{
-	TeOracleSpatialPortal *portal = (TeOracleSpatialPortal*)this->getPortal();
-	if (!portal)
-		return 0;
-
-	string q;
-	q = "SELECT * FROM " + table + " WHERE ";
-	q += this->getSQLBoxWhere (box, TePOLYGONS);
-	q += " ORDER BY object_id ";
-
-	if (!portal->query(q) || !portal->fetchRow())
-	{	
-		delete portal;
-		return 0;
-	}
-	else 
-		return portal;
-}
-
-
-//Spatial query
-//retornam um portal
-bool 
-TeOracleSpatial::spatialRelation(const string& actGeomTable, TeGeomRep /* actRep */, Keys& actIdsIn, TeDatabasePortal *portal, int relate, const string& actCollTable)
-{
-	string Ids = getStringIds(actIdsIn);
-	string actGeomColl = "spatial_data";
-	
-	string spatialRel = getOracleSpatialRelation(relate);
-	
-	//Montar a sql para passar para o Oracle
-	string sql = "SELECT geomTable1.* ";
-	sql += " FROM "+ actGeomTable +" geomTable1,";
-	sql += actGeomTable + " geomTable2 ";
-	
-	if(!actCollTable.empty())
-	{
-		sql += ", "+ actCollTable +" collTable ";
-		sql += " WHERE geomTable1.object_id = collTable.c_object_id AND ";
-	}
-	else
-		sql += " WHERE ";
-	
-	sql += " geomTable2.object_id IN (" + Ids + ") AND ";
-
-	if(relate==TeEQUALS)
-		sql += " geomTable1.object_id NOT IN (" + Ids + ") AND ";  
-	
-	if(relate==TeDISJOINT)
-		sql += " NOT ";  // NOT ANYINTERACT
-
-	sql += " SDO_RELATE(geomTable1."+ actGeomColl +", geomTable2."+ actGeomColl +", 'mask= "; 
-	sql += spatialRel + " querytype=WINDOW') = 'TRUE'";
-
-	portal->freeResult();
-	if(!((TeOracleSpatialPortal*)portal)->querySDO (sql)) 
-		return false;
-
-	return (portal->fetchRow());
-}
-
-bool 
-TeOracleSpatial::spatialRelation(const string& actGeomTable, TeGeomRep /* actRep */, Keys& actIdsIn, const string& visGeomTable, TeGeomRep /* visRep */, TeDatabasePortal *portal, int relate, const string& visCollTable)
-{
-	string Ids = getStringIds(actIdsIn);
-	string spatialRel = getOracleSpatialRelation(relate);
-	string actGeomColl = "spatial_data";
-	string visGeomColl = "spatial_data";
-	
-	//Montar a sql para passar para o Oracle
-	string sql = "SELECT geomTable1.* ";
-	sql += " FROM "+ visGeomTable +" geomTable1,";
-	sql += actGeomTable + " geomTable2 ";
-	
-	if(!visCollTable.empty())
-	{
-		sql += ", "+ visCollTable +" collTable";
-		sql += " WHERE geomTable1.object_id = collTable.c_object_id AND ";
-	}
-	else
-		sql += " WHERE ";
-	
-	sql += " geomTable2.object_id IN (" + Ids + ") AND ";
-
-	if(relate==TeDISJOINT)
-		sql += " NOT ";  // NOT ANYINTERACT
-
-	sql += " SDO_RELATE(geomTable1."+ visGeomColl +", geomTable2."+ actGeomColl +", 'mask= "; 
-	sql += spatialRel + " querytype=WINDOW') = 'TRUE'";
-
-	portal->freeResult();
-	if(!((TeOracleSpatialPortal*)portal)->querySDO(sql))
-		return false;
-	
-	return (portal->fetchRow());
-		
-}
-
-bool 
-TeOracleSpatial::spatialRelation(const string& actGeomTable, TeGeomRep /* actRep */, TeGeometry* geom, TeDatabasePortal *portal, int relate, const string& actCollTable) 
-{
-	portal->freeResult();
-	string elinfo, sdo;
-	
-	OCICursor	*cursor = ((TeOracleSpatialPortal*)portal)->getCursor();	
-	string spatialRel = getOracleSpatialRelation(relate);
-	string actGeomColl = "spatial_data";
-
-	if(geom->elemType()==TePOLYGONS)
-	{
-		TePolygon poly, *pPoly;
-		pPoly = new TePolygon();
-		pPoly = (TePolygon*)geom;
-		poly = *pPoly;
-
-		if(!AllocateOrdinatesObject(poly, elinfo, cursor))
-		{
-			delete cursor;
-			return false;
-		}
-
-		sdo = " MDSYS.SDO_GEOMETRY(2003, NULL, NULL, ";
-		sdo += " MDSYS.SDO_ELEM_INFO_ARRAY(" + elinfo + "), ";
-		sdo += " :ordinates)";
-
-		//delete pPoly;  //delete tamb�m o geom, talvez deixar para aplicacao
-	}
-	
-	else if (geom->elemType()==TeLINES)
-	{
-		TeLine2D line, *pLine;
-		pLine = new TeLine2D();
-		pLine = (TeLine2D*)geom;
-		line = *pLine;
-
-		if(!AllocateOrdinatesObject(line, cursor))
-		{
-			delete cursor;
-			return false;
-		}
-
-		elinfo = "1, 2, 1";
-
-		sdo = " MDSYS.SDO_GEOMETRY(2002, NULL, NULL, ";
-		sdo += " MDSYS.SDO_ELEM_INFO_ARRAY(" + elinfo + "), ";
-		sdo += " :ordinates)";
-
-		//delete pLine;  //delete tamb�m o geom
-	}
-	
-	else if (geom->elemType()==TePOINTS)
-	{
-		TePoint point, *pPoint;
-		pPoint = new TePoint();
-		pPoint = (TePoint*)geom;
-		point = *pPoint;
-		
-		sdo = " MDSYS.SDO_GEOMETRY(2001, NULL, ";
-		sdo += " MDSYS.SDO_POINT_TYPE( ";
-		sdo += Te2String(point.location().x());
-		sdo += ", " + Te2String(point.location().y());
-		sdo += ", NULL )";
-		sdo += ", NULL, NULL))";
-		
-		//delete pPoint;
-	}
-
-	else if (geom->elemType()==TeCELLS)
-	{
-		TeCell cell, *pCell;
-		pCell = new TeCell();
-		pCell = (TeCell*)geom;
-		cell = *pCell;
-
-		TeBox b = cell.box();
-		
-		sdo = " MDSYS.SDO_GEOMETRY(2003, NULL, NULL ";
-		sdo += ", MDSYS.SDO_ELEM_INFO_ARRAY( 1, 1003, 3 )";
-		sdo += ", MDSYS.SDO_ORDINATE_ARRAY( " ;
-		sdo += Te2String(b.lowerLeft().x());
-		sdo += ", " + Te2String(b.lowerLeft().y());
-		sdo += ", " + Te2String(b.upperRight().x());
-		sdo += ", " + Te2String(b.upperRight().y());
-		sdo += ")) ";
-
-		//delete pCell;
-	}
-	
-	//Montar a sql para passar para o Oracle
-	string sql = "SELECT geomTable.* ";
-	sql += " FROM " + actGeomTable + " geomTable ";
-
-	if(!actCollTable.empty())
-	{
-		sql += ", "+ actCollTable +" collTable ";
-		sql += " WHERE geomTable.object_id = collTable.c_object_id AND ";
-	}
-	else
-		sql += " WHERE ";
-	
-	
-	if(relate==TeDISJOINT)
-		sql += " NOT ";  // NOT ANYINTERACT
-
-	sql += " MDSYS.SDO_RELATE(geomTable."+ actGeomColl +", "+ sdo +", 'mask= "; 
-	sql += spatialRel + " querytype=WINDOW') = 'TRUE'";
-
-	if(!((TeOracleSpatialPortal*)portal)->querySDO(sql))
-		return false;
-
-	return (portal->fetchRow());
-	
-}
-
-
-//retornam um vetor de object_ids resultantes da consulta
-bool 
-TeOracleSpatial::spatialRelation(const string& actGeomTable, TeGeomRep /* actRep */, Keys& actIdsIn, Keys& actIdsOut, int relate, const string& actCollTable)
-{
-	TeOracleSpatialPortal* portal = (TeOracleSpatialPortal*) getPortal(); 
-		
-	string Ids = getStringIds(actIdsIn);
-	string spatialRel = getOracleSpatialRelation(relate);
-	string actGeomColl = "spatial_data";
-
-	//Montar a sql para passar para o Oracle
-	string sql = "SELECT geomTable1.object_id ";
-	sql += " FROM "+ actGeomTable +" geomTable1,";
-	sql += actGeomTable + " geomTable2 ";
-	
-	if(!actCollTable.empty())
-	{
-		sql += ", "+ actCollTable +" collTable ";
-		sql += " WHERE geomTable1.object_id = collTable.c_object_id AND ";
-	}
-	else
-		sql += " WHERE ";
-	
-	sql += " geomTable2.object_id IN (" + Ids + ") AND ";
-
-	if(relate==TeEQUALS)
-		sql += " geomTable1.object_id NOT IN (" + Ids + ") AND ";  
-	
-	if(relate==TeDISJOINT)
-		sql += " NOT ";  // NOT ANYINTERACT
-
-	sql += " SDO_RELATE(geomTable1."+ actGeomColl +", geomTable2."+ actGeomColl +", 'mask= "; 
-	sql += spatialRel + " querytype=WINDOW') = 'TRUE'";
-
-	if(!portal->query(sql))
-	{
-		delete portal;
-		return false;
-	}
-	
-	actIdsOut.clear();
-	while(portal->fetchRow())
-	{
-		string objId = portal->getData (0);
-		actIdsOut.push_back(objId);
-	}
-
-	sort(actIdsOut.begin(), actIdsOut.end());
-	unique(actIdsOut.begin(), actIdsOut.end());
-
-	delete portal;
-	return true;
-}
-
-
-bool 
-TeOracleSpatial::spatialRelation(const string& actGeomTable, TeGeomRep /* actRep */, Keys& actIdsIn, const string& visGeomTable, TeGeomRep /* visRep */, Keys& visIdsOut, int relate, const string& visCollTable)
-{
-	TeOracleSpatialPortal* portal = (TeOracleSpatialPortal*) getPortal(); 
-	
-	string Ids = getStringIds(actIdsIn);
-	string spatialRel = getOracleSpatialRelation(relate);
-	string actGeomColl = "spatial_data";
-	string visGeomColl = "spatial_data";
-	
-	//Montar a sql para passar para o Oracle
-	string sql = "SELECT geomTable1.object_id ";
-	sql += " FROM "+ visGeomTable +" geomTable1,";
-	sql += actGeomTable + " geomTable2 ";
-	
-	if(!visCollTable.empty())
-	{
-		sql += ", "+ visCollTable +" collTable";
-		sql += " WHERE geomTable1.object_id = collTable.c_object_id AND ";
-	}
-	else
-		sql += " WHERE ";
-	
-	sql += " geomTable2.object_id IN (" + Ids + ") AND ";
-
-	if(relate==TeDISJOINT)
-		sql += " NOT ";  // NOT ANYINTERACT
-
-	sql += " SDO_RELATE(geomTable1."+ visGeomColl +", geomTable2."+ actGeomColl +", 'mask= "; 
-	sql += spatialRel + " querytype=WINDOW') = 'TRUE'";
-
-	if(!portal->query(sql))
-	{
-		delete portal;
-		return false;
-	}
-	
-	visIdsOut.clear();
-	while(portal->fetchRow())
-	{
-		string objId = portal->getData (0);
-		visIdsOut.push_back(objId);
-	}
-
-	sort(visIdsOut.begin(), visIdsOut.end());
-	unique(visIdsOut.begin(), visIdsOut.end());
-
-	delete portal;
-	return true;
-}
-
-
-bool 
-TeOracleSpatial::spatialRelation(const string& actGeomTable, TeGeomRep actRep, TeGeometry* geom, Keys& actIdsOut, int relate, const string& actCollTable)
-{
-	TeOracleSpatialPortal* portal = (TeOracleSpatialPortal*) getPortal(); 
-		
-	if(!spatialRelation(actGeomTable, actRep, geom, portal, relate, actCollTable))
-	{
-		delete portal;
-		return false;
-	}
-		
-	actIdsOut.clear();
-	do
-	{
-		string objId = portal->getData ("object_id");
-		actIdsOut.push_back(objId);
-	}while(portal->fetchRow());
-
-	sort(actIdsOut.begin(), actIdsOut.end());
-	unique(actIdsOut.begin(), actIdsOut.end());
-
-	delete portal;
-	return true;
-}
-
-// metric functions
-bool
-TeOracleSpatial::calculateArea(const string& actGeomTable, TeGeomRep /* actRep */, Keys& actIdsIn, double &area)
-{
-	string Ids = getStringIds(actIdsIn);
-	string actGeomColl = "spatial_data";
-	
-	string sql = "SELECT SUM(SDO_GEOM.SDO_AREA(g."+ actGeomColl +", m.diminfo))";
-	sql += " FROM "+ actGeomTable +" g, USER_SDO_GEOM_METADATA m";
-	sql += " WHERE m.table_name = '"+ TeConvertToUpperCase(actGeomTable) +"'";
-	sql += " AND m.column_name = '"+ TeConvertToUpperCase(actGeomColl) +"'"; 
-	sql += " AND object_id IN ("+ Ids +")";
-
-	TeOracleSpatialPortal* portal = (TeOracleSpatialPortal*)getPortal();
-	
-	if(!portal->query(sql) || !portal->fetchRow())
-		return false;
-
-	area = portal->getDouble(0);
-	delete portal;
-	return true;
-}
-
-bool
-TeOracleSpatial::calculateLength(const string& actGeomTable, TeGeomRep /* actRep */, Keys& actIdsIn, double &length)
-{
-	string Ids = getStringIds(actIdsIn);
-	string actGeomColl = "spatial_data";
-	
-	string sql = "SELECT SUM(SDO_GEOM.SDO_LENGTH(g."+ actGeomColl +", m.diminfo))";
-	sql += " FROM "+ actGeomTable +" g, USER_SDO_GEOM_METADATA m";
-	sql += " WHERE m.table_name = '"+ TeConvertToUpperCase(actGeomTable) +"'";
-	sql += " AND m.column_name = '"+ TeConvertToUpperCase(actGeomColl) +"'"; 
-	sql += " AND object_id IN ("+ Ids +")";
-
-	TeOracleSpatialPortal* portal = (TeOracleSpatialPortal*)getPortal();
-	
-	if(!portal->query(sql) || !portal->fetchRow())
-		return false;
-
-	length = portal->getDouble(0);
-	delete portal;
-	return true;
-}
-
-
-//distancia entre objetos de um mesma tabela
-bool
-TeOracleSpatial::calculateDistance(const string& actGeomTable, TeGeomRep /* actRep */, Keys& Ids, double& distance)
-{
-	string Id1 = Ids[0];
-	string Id2 = Ids[1];
-	string actGeomColl = "spatial_data";
-
-	string sql = "SELECT MIN(SDO_GEOM.SDO_DISTANCE(g1."+ actGeomColl +", m.diminfo, ";
-	sql += " g2."+ actGeomColl +", m.diminfo))";
-	sql += " FROM "+ actGeomTable +" g1,"+ actGeomTable +" g2, USER_SDO_GEOM_METADATA m";
-	sql += " WHERE m.table_name = '"+ TeConvertToUpperCase(actGeomTable) +"'";
-	sql += " AND m.column_name = '"+ TeConvertToUpperCase(actGeomColl) +"'"; 
-	sql += " AND g1.object_id = '"+ Id1 +"'"; 
-	sql += " AND g2.object_id = '"+ Id2 +"'";
-
-	TeOracleSpatialPortal* portal = (TeOracleSpatialPortal*)getPortal();
-	
-	if(!portal->query(sql) || !portal->fetchRow())
-		return false;
-
-	distance = portal->getDouble(0);
-	delete portal;
-	return true;
-}
-
-
-//distancia entre objetos de duas tabelas distintas
-bool
-TeOracleSpatial::calculateDistance(const string& actGeomTable, TeGeomRep /* actRep */, const string& objId1, const string& visGeomTable, TeGeomRep /* visRep */, const string& objId2, double& distance)
-{
-	string actGeomColl = "spatial_data";
-	string visGeomColl = "spatial_data";
-	
-	string sql = "SELECT MIN(SDO_GEOM.SDO_DISTANCE(g1."+ actGeomColl +", m1.diminfo, ";
-	sql += " g2."+ visGeomColl +", m2.diminfo))";
-	sql += " FROM "+ actGeomTable +" g1,"+ visGeomTable +" g2, ";
-	sql += " USER_SDO_GEOM_METADATA m1, USER_SDO_GEOM_METADATA m2 ";
-	sql += " WHERE m1.table_name = '"+ TeConvertToUpperCase(actGeomTable) +"'";
-	sql += " AND m1.column_name = '"+ TeConvertToUpperCase(actGeomColl) +"'"; 
-	sql += " AND m2.table_name = '"+ TeConvertToUpperCase(visGeomTable) +"'";
-	sql += " AND m2.column_name = '"+ TeConvertToUpperCase(visGeomColl) +"'";
-	sql += " AND g1.object_id = '"+ objId1 +"'"; 
-	sql += " AND g2.object_id = '"+ objId2 +"'";
-
-	TeOracleSpatialPortal* portal = (TeOracleSpatialPortal*)getPortal();
-	
-	if(!portal->query(sql) || !portal->fetchRow())
-		return false;
-
-	distance = portal->getDouble(0);
-	delete portal;
-	return true;
-}
-
-/*
-bool 
-TeOracleSpatial::withinDistance(const string& actGeomTable, TeGeomRep actRep, const TeCoord2D& point, KeysToDist& IdsDistOut, const double& max_distance, const string& actCollTable)
-{
-	TeOracleSpatialPortal* portal = (TeOracleSpatialPortal*) getPortal(); 
-		
-	string Ids = getStringIds(actIdsIn);
-	string actGeomColl = "spatial_data";
-
-	//Montar a sql para passar para o Oracle
-	string sql = "SELECT geomTable1.object_id ";
-	sql += " FROM "+ actGeomTable +" geomTable1,";
-	sql += actGeomTable + " geomTable2 ";
-	
-	if(!actCollTable.empty())
-	{
-		sql += ", "+ actCollTable +" collTable ";
-		sql += " WHERE geomTable1.object_id = collTable.c_object_id AND ";
-	}
-	else
-		sql += " WHERE ";
-	
-	sql += " geomTable2.object_id IN (" + Ids + ") AND ";
-	sql += " SDO_WITHIN_DISTANCE(geomTable1."+ actGeomColl +", geomTable2."+ actGeomColl +", 'distance= "; 
-	sql += Te2String(max_distance) + " querytype=WINDOW') = 'TRUE'";
-
-	if(!portal->query(sql))
-	{
-		delete portal;
-		return false;
-	}
-	
-	actIdsOut.clear();
-	while(portal->fetchRow())
-	{
-		string objId = portal->getData (0);
-		actIdsOut.push_back(objId);
-	}
-
-	sort(actIdsOut.begin(), actIdsOut.end());
-	unique(actIdsOut.begin(), actIdsOut.end());
-
-	delete portal;
-	return true;
-}
-*/
-
-// functions that return a new geometry
-
-//Euclidean distance value: dist
-bool
-TeOracleSpatial::Buffer(const string& actGeomTable, TeGeomRep /* actRep */, Keys& actIds, TePolygonSet& bufferSet, double dist)
-{
-	string Ids = getStringIds(actIds);
-	string actGeomColl = "spatial_data";
-
-	string sql = "SELECT g.geom_id, g.object_id,";
-	sql += " SDO_GEOM.SDO_BUFFER(g."+ actGeomColl +", m.diminfo, "+ Te2String(dist) +")";
-	sql += " FROM "+ actGeomTable +" g, USER_SDO_GEOM_METADATA m";
-	sql += " WHERE m.table_name = '"+ TeConvertToUpperCase(actGeomTable) +"'";
-	sql += " AND m.column_name = '"+ TeConvertToUpperCase(actGeomColl) +"'"; 
-	sql += " AND object_id IN ("+ Ids +")";
-
-	TeOracleSpatialPortal* portal = (TeOracleSpatialPortal*)getPortal();
-	
-	if(!portal->query(sql) || !portal->fetchRow())
-		return false;
-
-	bool flag = true;
-	do 
-	{
-		TePolygonSet polySet;
-		flag = portal->fetchGeometry(polySet);
-		//teste c/ buffer com filhos
-		for(unsigned int i=0; i<polySet.size(); i++)
-			bufferSet.add(polySet[i]);
-
-	}while(flag);
-
-	delete portal;
-	return true;
-}
-
-bool 
-TeOracleSpatial::ConvexHull(const string& actGeomTable, TeGeomRep /* actRep */, Keys& actIds, TePolygonSet& convexHullSet)
-{
-	string Ids = getStringIds(actIds);
-	string actGeomColl = "spatial_data";
-	
-	string sql = "SELECT g.geom_id, g.object_id,";
-	sql += " SDO_GEOM.SDO_CONVEXHULL(g."+ actGeomColl +", m.diminfo )";
-	sql += " FROM "+ actGeomTable +" g, USER_SDO_GEOM_METADATA m";
-	sql += " WHERE m.table_name = '"+ TeConvertToUpperCase(actGeomTable) +"'";
-	sql += " AND m.column_name = '"+ TeConvertToUpperCase(actGeomColl) +"'"; 
-	sql += " AND object_id IN ("+ Ids +")";
-
-	TeOracleSpatialPortal* portal = (TeOracleSpatialPortal*)getPortal();
-	
-	if(!portal->query(sql) || !portal->fetchRow())
-		return false;
-
-	bool flag = true;
-	do 
-	{
-		TePolygon poly;
-		flag = portal->fetchGeometry(poly);
-		convexHullSet.add(poly);
-	}while(flag);
-
-	delete portal;
-	return true;
-}
-
-bool 
-TeOracleSpatial::Centroid(const string&  actGeomTable , TeGeomRep /* actRep */, TePointSet& centroidSet, Keys actIds, const string& /* actCollTable */)
-{
-	string Ids = getStringIds(actIds);
-	string actGeomColl = "spatial_data";
-	
-	string sql = "SELECT g.geom_id, g.object_id,";
-	sql += " SDO_GEOM.SDO_CENTROID(g."+ actGeomColl +", m.diminfo )";
-	sql += " FROM "+ actGeomTable +" g, USER_SDO_GEOM_METADATA m";
-	sql += " WHERE m.table_name = '"+ TeConvertToUpperCase(actGeomTable) +"'";
-	sql += " AND m.column_name = '"+ TeConvertToUpperCase(actGeomColl) +"'"; 
-	
-	//if empty it calculates the centroids to all geometries 
-	if(!Ids.empty())
-		sql += " AND object_id IN ("+ Ids +")";
-
-	TeOracleSpatialPortal* portal = (TeOracleSpatialPortal*)getPortal();
-	
-	if(!portal->query(sql) || !portal->fetchRow())
-	{
-		delete portal;
-		return false;
-	}
-
-	bool flag = true;
-	do 
-	{
-		TePoint point;
-		flag = portal->fetchGeometry(point);
-		centroidSet.add(point);
-	}while(flag);
-
-	delete portal;
-	return true;
-	
-}
-
-bool 
-TeOracleSpatial::nearestNeighbors(const string& actGeomTable, const string& actCollTable, TeGeomRep actRep, const string& objId1, Keys& actIdsOut, int numRes)
-{
-	TeOracleSpatialPortal* portal = (TeOracleSpatialPortal*) getPortal(); 
-	
-	if(!nearestNeighbors(actGeomTable, actCollTable, actRep, objId1, portal, numRes))
-	{
-		delete portal;
-		return false;
-	}
-		
-	actIdsOut.clear();
-	while(portal->fetchRow())
-	{
-		string objId = portal->getData ("object_id");
-		actIdsOut.push_back(objId);
-	}
-
-	sort(actIdsOut.begin(), actIdsOut.end());
-	unique(actIdsOut.begin(), actIdsOut.end());
-
-	delete portal;
-	return true;
-}
-
-
-bool 
-TeOracleSpatial::nearestNeighbors(const string& actGeomTable, TeGeomRep actRep, const string& objId1, const string& visGeomTable, const string& visCollTable, TeGeomRep visRep, Keys& visIdsOut, int numRes)
-{
-	TeOracleSpatialPortal* portal = (TeOracleSpatialPortal*) getPortal(); 
-	
-	if(!nearestNeighbors(actGeomTable, actRep, objId1, visGeomTable, visCollTable, visRep, portal, numRes))
-	{
-		delete portal;
-		return false;
-	}
-		
-	visIdsOut.clear();
-	while(portal->fetchRow())
-	{
-		string objId = portal->getData ("object_id");
-		visIdsOut.push_back(objId);
-	}
-
-	sort(visIdsOut.begin(), visIdsOut.end());
-	unique(visIdsOut.begin(), visIdsOut.end());
-
-	delete portal;
-	return true;
-}
-
-bool 
-TeOracleSpatial::nearestNeighbors(const string& actGeomTable, const string& actCollTable, TeGeomRep /* actRep */, const string& objId1, TeDatabasePortal* portal, int numRes)
-{
-	string actGeomColl = "spatial_data";
-
-	//select the spatial index
-	string index = " SELECT INDEX_NAME FROM USER_SDO_INDEX_INFO";
-	index += " WHERE TABLE_NAME = '"+ TeConvertToUpperCase(actGeomTable) +"'"; 
-
-	portal->freeResult();
-	if(!portal->query(index) || !portal->fetchRow())
-		return false;
-
-	string indexName = string(portal->getData(0));
-	string perf = "/*+ INDEX("+ TeConvertToUpperCase(actGeomTable) +" "+ indexName +") */ ";
-	
-	string sql = "SELECT "+ perf +"  geomTable1.* ";
-	sql += " FROM "+ actGeomTable +" geomTable1,";
-	sql += actGeomTable + " geomTable2 ";
-	
-	if(!actCollTable.empty())
-	{
-		sql += ", "+ actCollTable +" collTable ";
-		sql += " WHERE ";
-		sql += " geomTable1.object_id = collTable.c_object_id AND ";
-	}
-	else
-		sql += " WHERE ";
-		
-	sql += " SDO_NN(geomTable1."+ actGeomColl +", geomTable2."+ actGeomColl +", 'sdo_batch_size=10')='TRUE' AND ";
-	sql += " geomTable2.object_id = '" + objId1 + "' AND ";
-	sql += " geomTable1.object_id <> '"+ objId1 +"' AND ";
-	sql += " ROWNUM <= "+ Te2String(numRes);
-
-	portal->freeResult();
-	if(!((TeOracleSpatialPortal*)portal)->querySDO(sql))
-		return false;
-	
-	return true;
-}
-	
-bool 
-TeOracleSpatial::nearestNeighbors(const string& actGeomTable, TeGeomRep /* actRep */, const string& objId1, const string& visGeomTable, const string& visCollTable, TeGeomRep /* visRep */, TeDatabasePortal* portal, int numRes)
-{
-	string actGeomColl = "spatial_data";
-	string visGeomColl = "spatial_data";
-
-	//select the spatial index
-	string index = " SELECT INDEX_NAME FROM USER_SDO_INDEX_INFO";
-	index += " WHERE TABLE_NAME = '"+ TeConvertToUpperCase(visGeomTable) +"'"; 
-
-	portal->freeResult();
-	if(!portal->query(index) || !portal->fetchRow())
-		return false;
-
-	string indexName = string(portal->getData(0));
-	string perf = "/*+ INDEX("+ TeConvertToUpperCase(visGeomTable) +" "+ indexName +") */ ";
-	string nres = " ROWNUM <= "+ numRes;
-	
-	string sql = "SELECT "+ perf +"  geomTable1.* ";
-	sql += " FROM "+ visGeomTable +" geomTable1,";
-	sql += actGeomTable + " geomTable2 ";
-	
-	if(!visCollTable.empty())
-	{
-		sql += ", "+ visCollTable +" collTable";
-		sql += " WHERE ";
-		sql += " geomTable1.object_id = collTable.c_object_id AND ";
-	}
-	else
-		sql += " WHERE ";
-		
-	sql += " SDO_NN(geomTable1."+ actGeomColl +", geomTable2."+ actGeomColl;
-	sql += ", 'sdo_batch_size=10') = 'TRUE' AND ";
-	sql += " geomTable2.object_id = '" + objId1 + "' AND ";
-	sql += " ROWNUM <= "+ Te2String(numRes);
-	
-	portal->freeResult();
-	if(!((TeOracleSpatialPortal*)portal)->querySDO(sql))
-		return false;
-	
-	return true;
-}
-
-
-//Intersection entre dois objetos geogr�ficos de uma mesma tabela
-
-
-bool 
-TeOracleSpatial::geomIntersection(const string& actGeomTable, TeGeomRep /* actRep */, Keys& actIds, TeGeometryVect& geomVect)
-{
-	string actGeomColl = "spatial_data";
-	string Ids = getStringIds(actIds);
-
-	string sql = "SELECT SDO_GEOM.SDO_INTERSECTION(g1."+ actGeomColl +", m.diminfo, ";
-	sql += " g2."+ actGeomColl +", m.diminfo)";
-	sql += " FROM "+ actGeomTable +" g1,"+ actGeomTable +" g2, USER_SDO_GEOM_METADATA m";
-	sql += " WHERE m.table_name = '"+ TeConvertToUpperCase(actGeomTable) +"'";
-	sql += " AND m.column_name = '"+ TeConvertToUpperCase(actGeomColl) +"'"; 
-	sql += " AND object_id IN ("+ Ids +")";
-
-	TeOracleSpatialPortal* portal = (TeOracleSpatialPortal*)getPortal();
-	
-	if((!portal->query(sql))||(!portal->fetchRow()))
-		return false;
-
-	bool flag = true;
-	do 
-	{
-		bool result=false;
-		TeGeometry* geom = new TeGeometry(); 
-		TeGeometry* geom2 = geom;
-		flag = portal->getGeometry(&geom, result);
-		if(result)
-			geomVect.push_back (geom);
-		delete geom2;
-	}while(flag);
-		
-	delete portal;
-	return true;
-}
-
-
-bool 
-TeOracleSpatial::geomIntersection(const string& actGeomTable, TeGeomRep /* actRep */, const string& objId1, const string& visGeomTable, TeGeomRep /* visRep */, const string& objId2, TeGeometryVect& geomVect)
-{
-	string actGeomColl = "spatial_data";
-	string visGeomColl = "spatial_data";
-	
-	string sql = "SELECT SDO_GEOM.SDO_INTERSECTION(g1."+ actGeomColl +", m1.diminfo, ";
-	sql += " g2."+ visGeomColl +", m2.diminfo)";
-	sql += " FROM "+ actGeomTable +" g1,"+ visGeomTable +" g2, ";
-	sql += " USER_SDO_GEOM_METADATA m1, USER_SDO_GEOM_METADATA m2 ";
-	sql += " WHERE m1.table_name = '"+ TeConvertToUpperCase(actGeomTable) +"'";
-	sql += " AND m1.column_name = '"+ TeConvertToUpperCase(actGeomColl) +"'"; 
-	sql += " AND m2.table_name = '"+ TeConvertToUpperCase(visGeomTable) +"'";
-	sql += " AND m2.column_name = '"+ TeConvertToUpperCase(visGeomColl) +"'"; 
-	sql += " AND g1.object_id = '"+ objId1 +"'"; 
-	sql += " AND g2.object_id = '"+ objId2 +"'";
-
-	TeOracleSpatialPortal* portal = (TeOracleSpatialPortal*)getPortal();
-	
-	if(!portal->query(sql) || !portal->fetchRow())
-		return false;        
-
-	bool flag = true;
-	do 
-	{
-		bool result=false;
-		TeGeometry* geom = new TeGeometry(); 
-		TeGeometry* geom2 = geom;
-		flag = portal->getGeometry(&geom, result);
-		if(result)
-			geomVect.push_back (geom);
-		delete geom2;
-	}while(flag);
-		
-	delete portal;
-	return true;
-}
-
-
-bool 
-TeOracleSpatial::geomDifference(const string& actGeomTable, TeGeomRep /* actRep */, const string& objId1, const string& visGeomTable, TeGeomRep /* visRep */, const string& objId2, TeGeometryVect& geomVect)
-{
-	string actGeomColl = "spatial_data";
-	string visGeomColl = "spatial_data";
-
-	string sql = "SELECT SDO_GEOM.SDO_DIFFERENCE(g1."+ actGeomColl +", m1.diminfo, ";
-	sql += " g2."+ visGeomColl +", m2.diminfo)";
-	sql += " FROM "+ actGeomTable +" g1,"+ visGeomTable +" g2, ";
-	sql += " USER_SDO_GEOM_METADATA m1, USER_SDO_GEOM_METADATA m2 ";
-	sql += " WHERE m1.table_name = '"+ TeConvertToUpperCase(actGeomTable) +"'";
-	sql += " AND m1.column_name = '"+ TeConvertToUpperCase(actGeomColl) +"'"; 
-	sql += " AND m2.table_name = '"+ TeConvertToUpperCase(visGeomTable) +"'";
-	sql += " AND m2.column_name = '"+ TeConvertToUpperCase(visGeomColl) +"'"; 
-	sql += " AND g1.object_id = '"+ objId1 +"'"; 
-	sql += " AND g2.object_id = '"+ objId2 +"'";
-
-	TeOracleSpatialPortal* portal = (TeOracleSpatialPortal*)getPortal();
-	
-	if(!portal->query(sql) || !portal->fetchRow())
-		return false;
-
-	bool flag = true;
-	do 
-	{
-		bool result=false;
-		TeGeometry* geom = new TeGeometry(); 
-		TeGeometry* geom2 = geom;
-		flag = portal->getGeometry(&geom, result);
-		if(result)
-			geomVect.push_back (geom);
-		delete geom2;
-	}while(flag);
-		
-	delete portal;
-	return true;
-}
-
-bool 
-TeOracleSpatial::geomDifference(const string& actGeomTable, TeGeomRep /* actRep */, const string& objId1, const string& objId2, TeGeometryVect& geomVect)
-{
-	string actGeomColl = "spatial_data";
-
-	string sql = "SELECT SDO_GEOM.SDO_DIFFERENCE(g1."+ actGeomColl +", m.diminfo, ";
-	sql += " g2."+ actGeomColl +", m.diminfo)";
-	sql += " FROM "+ actGeomTable +" g1,"+ actGeomTable +" g2, USER_SDO_GEOM_METADATA m";
-	sql += " WHERE m.table_name = '"+ TeConvertToUpperCase(actGeomTable) +"'";
-	sql += " AND m.column_name = '"+ TeConvertToUpperCase(actGeomColl) +"'"; 
-	sql += " AND g1.object_id = '"+ objId1 +"'"; 
-	sql += " AND g2.object_id = '"+ objId2 +"'";
-
-	TeOracleSpatialPortal* portal = (TeOracleSpatialPortal*)getPortal();
-	
-	if(!portal->query(sql) || !portal->fetchRow())
-		return false;
-
-	bool flag = true;
-	do 
-	{
-		bool result=false;
-		TeGeometry* geom = new TeGeometry(); 
-		TeGeometry* geom2 = geom;
-		flag = portal->getGeometry(&geom, result);
-		if(result)
-			geomVect.push_back (geom);
-		delete geom2;
-	}while(flag);
-		
-	delete portal;
-	return true;
-}
-
-bool 
-TeOracleSpatial::geomXOr(const string& actGeomTable, TeGeomRep /* actRep */, const string& objId1, const string& objId2, TeGeometryVect& geomVect)
-{
-	string actGeomColl = "spatial_data";
-
-	string sql = "SELECT SDO_GEOM.SDO_XOR(g1."+ actGeomColl +", m.diminfo, ";
-	sql += " g2."+ actGeomColl +", m.diminfo)";
-	sql += " FROM "+ actGeomTable +" g1,"+ actGeomTable +" g2, USER_SDO_GEOM_METADATA m";
-	sql += " WHERE m.table_name = '"+ TeConvertToUpperCase(actGeomTable) +"'";
-	sql += " AND m.column_name = '"+ TeConvertToUpperCase(actGeomColl) +"'"; 
-	sql += " AND g1.object_id = '"+ objId1 +"'"; 
-	sql += " AND g2.object_id = '"+ objId2 +"'";
-
-	TeOracleSpatialPortal* portal = (TeOracleSpatialPortal*)getPortal();
-	
-	if(!portal->query(sql) || !portal->fetchRow())
-		return false;
-
-	bool flag = true;
-	do 
-	{
-		bool result=false;
-		TeGeometry* geom = new TeGeometry(); 
-		TeGeometry* geom2 = geom;
-		flag = portal->getGeometry(&geom, result);
-		if(result)
-			geomVect.push_back (geom);
-		delete geom2;
-	}while(flag);
-
-	delete portal;
-	return true;
-}
-
-
-bool 
-TeOracleSpatial::geomXOr(const string& actGeomTable, TeGeomRep /* actRep */, const string& objId1, const string& visGeomTable, TeGeomRep /* visRep */, const string& objId2, TeGeometryVect& geomVect)
-{
-	string actGeomColl = "spatial_data";
-	string visGeomColl = "spatial_data";
-
-	string sql = "SELECT SDO_GEOM.SDO_XOR(g1."+ actGeomColl +", m1.diminfo, ";
-	sql += " g2."+ visGeomColl +", m2.diminfo)";
-	sql += " FROM "+ actGeomTable +" g1,"+ visGeomTable +" g2, ";
-	sql += " USER_SDO_GEOM_METADATA m1, USER_SDO_GEOM_METADATA m2 ";
-	sql += " WHERE m1.table_name = '"+ TeConvertToUpperCase(actGeomTable) +"'";
-	sql += " AND m1.column_name = '"+ TeConvertToUpperCase(actGeomColl) +"'"; 
-	sql += " AND m2.table_name = '"+ TeConvertToUpperCase(visGeomTable) +"'";
-	sql += " AND m2.column_name = '"+ TeConvertToUpperCase(visGeomColl) +"'"; 
-	sql += " AND g1.object_id = '"+ objId1 +"'"; 
-	sql += " AND g2.object_id = '"+ objId2 +"'";
-
-	TeOracleSpatialPortal* portal = (TeOracleSpatialPortal*)getPortal();
-	
-	if(!portal->query(sql) || !portal->fetchRow())
-		return false;
-
-	bool flag = true;
-	do 
-	{
-		bool result=false;
-		TeGeometry* geom = new TeGeometry(); 
-		TeGeometry* geom2 = geom;
-		flag = portal->getGeometry(&geom, result);
-		if(result)
-			geomVect.push_back (geom);
-		delete geom2;
-	}while(flag);
-		
-	delete portal;
-	return true;
-}
-
-
-bool 
-TeOracleSpatial::geomUnion(const string& actGeomTable, TeGeomRep /* actRep */, Keys& actIds, TeGeometryVect& geomVect)
-{
-	string actGeomColl = "spatial_data";
-	string Ids = getStringIds(actIds);
-
-	string sql = "SELECT SDO_GEOM.SDO_UNION(g1."+ actGeomColl +", m.diminfo, ";
-	sql += " g2."+ actGeomColl +", m.diminfo)";
-	sql += " FROM "+ actGeomTable +" g1,"+ actGeomTable +" g2, USER_SDO_GEOM_METADATA m";
-	sql += " WHERE m.table_name = '"+ TeConvertToUpperCase(actGeomTable) +"'";
-	sql += " AND m.column_name = '"+ TeConvertToUpperCase(actGeomColl) +"'"; 
-	sql += " AND object_id IN ("+ Ids +")";
-
-	TeOracleSpatialPortal* portal = (TeOracleSpatialPortal*)getPortal();
-	
-	if(!portal->query(sql) || !portal->fetchRow())
-		return false;
-
-	bool flag = true;
-	do 
-	{
-		bool result=false;
-		TeGeometry* geom = new TeGeometry(); 
-		TeGeometry* geom2 = geom;
-		flag = portal->getGeometry(&geom, result);
-		if(result)
-			geomVect.push_back (geom);
-		delete geom2;
-	}while(flag);
-			
-	delete portal;
-	return true;
-}
-
-
-bool 
-TeOracleSpatial::geomUnion(const string& actGeomTable, TeGeomRep /* actRep */, const string& objId1, const string& visGeomTable, TeGeomRep /* visRep */, const string& objId2, TeGeometryVect& geomVect)
-{
-	string actGeomColl = "spatial_data";
-	string visGeomColl = "spatial_data";
-
-	string sql = "SELECT SDO_GEOM.SDO_UNION(g1."+ actGeomColl +", m1.diminfo, ";
-	sql += " g2."+ visGeomColl +", m2.diminfo)";
-	sql += " FROM "+ actGeomTable +" g1,"+ visGeomTable +" g2, ";
-	sql += " USER_SDO_GEOM_METADATA m1, USER_SDO_GEOM_METADATA m2 ";
-	sql += " WHERE m1.table_name = '"+ TeConvertToUpperCase(actGeomTable) +"'";
-	sql += " AND m1.column_name = '"+ TeConvertToUpperCase(actGeomColl) +"'"; 
-	sql += " AND m2.table_name = '"+ TeConvertToUpperCase(visGeomTable) +"'";
-	sql += " AND m2.column_name = '"+ TeConvertToUpperCase(visGeomColl) +"'"; 
-	sql += " AND g1.object_id = '"+ objId1 +"'"; 
-	sql += " AND g2.object_id = '"+ objId2 +"'";
-
-	TeOracleSpatialPortal* portal = (TeOracleSpatialPortal*)getPortal();
-	
-	if(!portal->query(sql) || !portal->fetchRow())
-		return false;
-
-	bool flag = true;
-	do 
-	{
-		bool result=false;
-		TeGeometry* geom = new TeGeometry(); 
-		TeGeometry* geom2 = geom;
-		flag = portal->getGeometry(&geom, result);
-		if(result)
-			geomVect.push_back (geom);
-		delete geom2;
-	}while(flag);
-		
-	delete portal;
-	return true;
-}
-
-
-//End Spatial Query
-
-
-bool
-TeOracleSpatialPortal::fetchGeometry (TePolygon& poly)
-{
-	int			elem,elemnext,i,k,elemType, sdoInterp;
-
-	try
-	{
-		int ndim = GetDimArraySize();
-
-		if(ndim==0)
-			return false;
-
-		vector<TeCoord2D> coordinates;
-		if(!cursor->GetCoordinates (coordinates))
-			return false;
-
-		//number of the oordinates in the SDO_GEOMETRY
-		int noords = NumberOfOrdinates();
-	
-		//Indicates the type of the SDO_GEOMETRY
-		int sdoEType;  
-		GetDimElement(2,sdoEType);
-	
-		int geomId = atoi(getData("geom_id"));
-		string objId = string(getData("object_id"));
-		
-		// 1005: compound polygon: Compound polygon with some vertices connected by straight
-		//line segments and some by circular arcs.
-		if((sdoEType==1005) || (sdoEType==2005))  
-		{					   
-			TeLine2D	lin;   
-			//nelem: number of elemnts
-			int nelem; 
-			GetDimElement(3,nelem);  
-			
-			//posinit is initial position in the vector 
-			int posinit=0; //1;
-			//ipoxmax: second element position in the ordinates array
-			int iposmax=7;			
-			
-			int posmax;
-			bool thisElemArc = false; 
-
-			//keep the last point of the element
-			//TePoint lastPoint;
-			
-			//for each element
-			for(elem=1; elem<=nelem; elem++)  
-			{
-				//to catch the last position of the element: iposmax
-				if(elem==nelem)
-					posmax = noords+1;
-				else
-					GetDimElement(iposmax, posmax);
-
-				//verify if the element is a arc 
-				GetDimElement((iposmax-1), elemType);
-				if(elemType == 2)
-					thisElemArc = true;   
-				else 
-					thisElemArc = false;
-
-				//ptSet: ordinates of the element
-				TePointSet ptSet;
-
-				//to catch all coords of the element
-				int pos=0;
-									
-				for(pos=posinit; pos<((posmax-1)/2);++pos)
-				{
-					TePoint pt(coordinates[pos]);
-					ptSet.add(pt);
-				}
-
-				if(thisElemArc) 
-				{
-					//pegar o pr�ximo
-					if(elem!=nelem)
-					{
-						TePoint pt(coordinates[pos]);
-						ptSet.add(pt);
-					}
-
-					int size = ptSet.size();
-					for(int s=1; (s+1)<size; s=s+2)
-					{
-						TeLine2D arc;
-						TeGenerateArc (ptSet[s-1], ptSet[s], ptSet[s+1], arc, 10);
-
-						int sz = arc.size();
-						for(int i=0; i<sz; i++)
-							lin.add(arc[i]);
-					}
-				}
-
-				else //line segment
-				{
-					int size = ptSet.size();
-					for(int s=0; s<size; s++)
-						lin.add(ptSet[s].location());
-				}
-
-				iposmax+=3;
-				posinit=pos;  //skip first coordinate: equal last point of previous element 
-			
-			} //for each element
-
-			TeLinearRing rg(lin);
-			rg.objectId(objId);
-			rg.geomId(geomId);
-			poly.add(rg);
-		}
-
-		else if((sdoEType==1003)||(sdoEType==2003))  //no complex
-		{
-			for(i=1;i<=ndim;i+=3)
-			{
-				TeLine2D	line;
-				GetDimElement(i,elem);	// oordinate position
-				if((i+3) > ndim)
-					elemnext = noords+1;
-				else
-					GetDimElement(i+3,elemnext);
-
-				GetDimElement(i+2,sdoInterp);	// sdo interpretation 
-				// sdoInterp = 3: Rectangle type
-				// sdoInterp = 2: Polygon made up of a connected sequence of circular arcs 
-
-				if(sdoInterp==2)
-				{
-					//para gerar o arco
-					TePoint pt1;
-					TePoint pt2;
-					TePoint pt3;
-										
-					int cont=0;
-					int k = elem/2;
-					while (k<(elemnext/2))
-					{
-						for(int i=0; i<3; i++)
-						{
-							TeCoord2D pt = coordinates[k];
-						
-							if(i==0)
-							{
-								if(!cont)
-									pt1.add(pt);
-								else
-								{
-									pt1.add(pt3.location());
-									pt2.add(pt);
-									++i;
-								}
-							}
-							else if (i==1)
-								pt2.add(pt);
-							else if (i==2)
-								pt3.add(pt);
-
-							++cont;
-							++k;
-						}
-
-						TeLine2D arc;
-						TeGenerateArc (pt1, pt2, pt3, arc, 20);
-						
-						int s = arc.size();
-						for(int j=0; j<s; j++)
-							line.add(arc[j]);
-					}
-				}
-				else
-				{
-					// ler os pontos
-					for(k=(elem/2);k<(elemnext/2);k++)
-					{
-						TeCoord2D pt = coordinates[k];
-						line.add(pt);
-					}
-
-					if(sdoInterp==3) // rectangle
-					{
-						double xmin,ymin, xmax, ymax;
-						xmin = line.box().x1();
-						ymin = line.box().y1();
-						xmax = line.box().x2();
-						ymax = line.box().y2();
-
-						line.clear();
-						TeCoord2D pt1(xmin,ymin);
-						line.add(pt1);
-						TeCoord2D pt2(xmin,ymax);
-						line.add(pt2);
-						TeCoord2D pt3(xmax,ymax);
-						line.add(pt3);
-						TeCoord2D pt4(xmax,ymin);
-						line.add(pt4);
-						line.add(pt1);
-					}
-				}
-
-				TeLinearRing ring(line);
-				ring.objectId (objId);
-				ring.geomId(geomId);
-				poly.add(ring);
-			}
-		}
-		poly.objectId(objId);
-		poly.geomId(geomId);
-		return(this->fetchRow());
-	}
-	catch(...)
-	{
-		errorMessage_ = cursor->getErrorMessage();
-		return false;
-	}
-}
-
-
-bool
-TeOracleSpatialPortal::getGeometry (TeGeometry** geom, bool& result)
-{
-	TeSDOGType gType;
-	bool flag=true;	
-	
-	try
-	{
-		this->GetGeometryType(gType);
-			
-		if(gType==TeSDOPOLYGON)
-		{
-			TePolygon   poly, *pol;
-			flag = this->fetchGeometry(poly); 
-			pol = new TePolygon();
-			*pol = poly;
-			*geom = pol;
-			result = true;
-			return flag;
-		}
-		else if(gType==TeSDOLINE)
-		{
-			TeLine2D	line, *lin;
-			flag = this->fetchGeometry(line); 
-			lin = new TeLine2D();
-			*lin = line;
-			*geom = lin;
-			result = true;
-			return flag;
-		}
-		else if(gType==TeSDOPOINT)
-		{
-			TePoint		point, *pnt;
-			flag = this->fetchGeometry(point); 
-			pnt = new TePoint();
-			*pnt = point;
-			*geom = pnt;
-			result = true;
-			return flag;
-		}
-
-		else if(gType==TeSDOMULTIPOLYGON)
-		{
-			TePolygonSet   polySet, *polSet;
-			flag = this->fetchGeometry(polySet); 
-			polSet = new TePolygonSet();
-			*polSet = polySet;
-			*geom = polSet;
-			result = true;
-			return flag;
-		}
-		else if(gType==TeSDOMULTILINE)
-		{
-			TeLineSet	lineSet, *linSet;
-			flag = this->fetchGeometry(lineSet); 
-			linSet = new TeLineSet();
-			*linSet = lineSet;
-			*geom = linSet;
-			result = true;
-			return flag;
-		}
-		else if(gType==TeSDOMULTIPOINT)
-		{
-			TePointSet		pointSet, *pntSet;
-			flag = this->fetchGeometry(pointSet); 
-			pntSet = new TePointSet();
-			*pntSet = pointSet;
-			*geom = pntSet;
-			result = true;
-			return flag;
-		}
-		
-	}
-	catch(...)
-	{
-		result = false;
-		return false;
-	}
-		
-	result = false;
-	return (this->fetchRow());
-}
-
-
-bool
-TeOracleSpatialPortal::fetchGeometry (TePolygonSet& polySet)
-{
-	int					elem,elemnext,i,k,sdoInterp;
-	vector<TeCoord2D>	coordinates;
-	
-	try
-	{
-		int ndim = GetDimArraySize();
-		if(ndim==0)
-			return false;
-		
-		TePolygonSet polyHoles;
-		TeSDOGType gType;
-		
-		GetGeometryType(gType);
-
-		if(gType==TeSDOPOLYGON)  
-		{
-			TePolygon poly;
-			bool res = fetchGeometry(poly);
-			polySet.add(poly);
-			return res;
-		}
-
-		if(!cursor->GetCoordinates(coordinates))
-			return false;
-
-		int noords = NumberOfOrdinates();
-	
-		int geomId = atoi(getData("geom_id"));
-		string objId = string(getData("object_id"));
-		
-		bool hasHole = false;
-
-		for(i=1;i<=ndim;i+=3)
-		{
-			int			eType;
-			TeLine2D	line;
-			TePolygon	poly;
-			GetDimElement(i,elem);	// oordinate position
-			if((i+3) > ndim)
-				elemnext = noords+1;
-			else
-				GetDimElement(i+3,elemnext);
-
-			GetDimElement(i+1, eType);		// sdo_etype do proximo elemento
-			GetDimElement(i+2,sdoInterp);	// sdo_interpretation
-			
-			if(eType==2003)
-				poly = polyHoles.last();
-
-			// ler os pontos
-			for(k=(elem/2);k<(elemnext/2);k++)
-			{
-				TeCoord2D pt(coordinates[k]);
-				line.add(pt);
-			}
-
-			if(sdoInterp == 3) // rectangle
-			{
-				
-				double xmin,ymin, xmax, ymax;
-				xmin = line.box().x1();
-				ymin = line.box().y1();
-				xmax = line.box().x2();
-				ymax = line.box().y2();
-
-				line.clear();
-				TeCoord2D pt1(xmin,ymin);
-				line.add(pt1);
-				TeCoord2D pt2(xmin,ymax);
-				line.add(pt2);
-				TeCoord2D pt3(xmax,ymax);
-				line.add(pt3);
-				TeCoord2D pt4(xmax,ymin);
-				line.add(pt4);
-				line.add(pt1);
-			}
-			TeLinearRing ring(line);
-			ring.objectId (objId);
-			ring.geomId(geomId);
-			
-			poly.add(ring);
-	
-			//verificar se o proximo � hole
-			hasHole=false;
-			if(i+4<ndim)
-			{
-				GetDimElement(i+4, eType);		// sdo_etype do proximo elemento
-				if(eType == 2003)
-					hasHole = true;
-			}
-			poly.objectId(objId);
-			poly.geomId(geomId);
-			
-			if(!hasHole)
-				polySet.add(poly);
-			else	
-				polyHoles.add(poly);
-		} //for
-
-		polySet.objectId(objId);
-		polySet.geomId(geomId);
-
-		return(this->fetchRow());
-	}
-	catch(...)
-	{
-		errorMessage_ = cursor->getErrorMessage();
-		return false;
-	}
-}
-
-
-bool
-TeOracleSpatial::insertLine (const string& table, TeLine2D &line)
-{
-	
-	string	elinfo = "1, 2, 1";
-	
-	if(!AllocateOrdinatesObject(line))
-		return false;
-
-	string ins = "INSERT INTO " + table + " ( ";
-	ins += " geom_id, object_id, spatial_data) VALUES ( ";
-	ins += getNameSequence(table) +".NEXTVAL";
-	ins += ", '" + escapeSequence(line.objectId()) + "'";
-	ins += ", MDSYS.SDO_GEOMETRY(2002, NULL, NULL";
-	ins += ", MDSYS.SDO_ELEM_INFO_ARRAY( " + elinfo + " )";
-	ins += ", :ordinates) ";
-	ins += " )";
-
-	//OCI
-	if(!Conn->ExecuteSDOSTM(ins))
-	{
-		errorMessage_ = "Error inserting in the table " + table + "!"; 
-		return false;
-	}
-
-	/*
-	string seq = "SELECT "+ getNameSequence(table) +".CURRVAL FROM DUAL";
-	if(!ocip->query(seq))
-	{
-		if(errorMessage_.empty())
-			errorMessage_ = "Error in the sequence " + table + "_seq!";  
-		delete ocip;
-		return false;
-	}
-
-	if(!ocip->fetchRow())
-	{
-		errorMessage_ = "Sequence value not found!";
-		delete ocip;
-		return false;
-	}
-
-	int index = atoi((const char*)ocip->getData(0)); 
-	line.geomId(index); 
-	delete ocip;
-	*/
-
-	return true;
-}
-
-
-bool 
-TeOracleSpatial::updateLine(const string& table, TeLine2D &line)
-{
-	string	elinfo = "1, 2, 1";
-	
-	if(!AllocateOrdinatesObject(line))
-		return false;
-	
-	string sql;
-	sql =  "UPDATE " + table + " SET ";
-	sql += "  object_id= '" + line.objectId() + "'";
-	sql += ", spatial_data = ";
-	sql += " MDSYS.SDO_GEOMETRY(2002, NULL, NULL";
-	sql += ", MDSYS.SDO_ELEM_INFO_ARRAY( " + elinfo + " )";
-	sql += ", :ordinates) ";
-	sql += " WHERE geom_id = " +  line.geomId ();
-
-	//OCI
-	if(!Conn->ExecuteSDOSTM(sql))
-	{
-		errorMessage_ = "Error updating in the table " + table + "!"; 
-		return false;
-	}
-	return true;
-}
-
-
-bool 
-TeOracleSpatial::loadLineSet (const string& table, const string& geoid, TeLineSet &ls)
-{
-	
-	TeOracleSpatialPortal *ocip = (TeOracleSpatialPortal*)getPortal();
-	if(!ocip)
-		return false;
-
-	string q ="SELECT * FROM " + table;
-	if (geoid != "")
-		q += " WHERE object_id = '" + geoid +"'";
-	
-	if (!ocip->query(q) || !ocip->fetchRow())
-	{	
-		delete ocip;
-		return false;
-	}
-
-	bool flag = true;
-	do 
-	{
-		TeLine2D line;
-		flag = ocip->fetchGeometry(line);
-		ls.add ( line );
-	}while(flag);
-
-	delete ocip;
-	return true;
-}
-
-bool 
-TeOracleSpatial::loadLineSet (const string& table, TeBox &bb, TeLineSet &linSet)
-{
-	TeOracleSpatialPortal *portal = (TeOracleSpatialPortal*)getPortal();
-	if (!portal)
-		return false;
-
-	string q;
-	q = "SELECT * FROM " + table + " WHERE ";
-	q += this->getSQLBoxWhere (bb, TeLINES);
-	q += " ORDER BY object_id";
-
-	if (!portal->query(q) || !portal->fetchRow())
-	{	
-		delete portal;
-		return false;
-	}
-	bool flag = true;
-	do
-	{
-		TeLine2D lin;
-		flag = portal->fetchGeometry(lin);
-		linSet.add(lin);
-	}
-	while (flag);
-	delete portal;
-	return true;
-}
-
-TeDatabasePortal* 
-TeOracleSpatial::loadLineSet (const string& table, TeBox &box)
-{
-	TeOracleSpatialPortal *portal = (TeOracleSpatialPortal*) getPortal();
-	if (!portal)
-		return 0;
-
-	string q;
-	q = "SELECT * FROM " + table + " WHERE ";
-	q += this->getSQLBoxWhere (box, TeLINES);
-	q += " ORDER BY object_id";
-
-	if (!portal->query(q) || !portal->fetchRow())
-	{	
-		delete portal;
-		return 0;
-	}
-	return portal;
-}
-
-bool 
-TeOracleSpatialPortal::fetchGeometry (TeLine2D& line)
-{
-	int					i;
-	vector<TeCoord2D>	coordinates;
-
-	try
-	{
-		if(!cursor->GetCoordinates(coordinates))
-			return false;
-		
-		int noords = NumberOfOrdinates();
-		if(noords==0)
-			return false;
-
-		for(i=0;i<noords/2;i++)
-			line.add(coordinates[i]);
-			
-		line.geomId (atoi(getData("geom_id")));
-		line.objectId(string(getData("object_id")));
-		return (this->fetchRow());
-	}
-	catch(...)
-	{
-		errorMessage_ = cursor->getErrorMessage();
-		return false;
-	}
-}
-
-
-bool 
-TeOracleSpatialPortal::fetchGeometry (TeLineSet& lineSet)
-{
-	vector<TeCoord2D>	coordinates;
-	int					elem,elemnext,i,k;
-
-	try
-	{
-		int ndim = GetDimArraySize();
-		if(ndim==0)
-			return false;
-		
-		int noords = NumberOfOrdinates();
-		int geomId = atoi(getData("geom_id"));
-		string objId = string(getData("object_id"));
-		
-		TeSDOGType gType;
-		GetGeometryType(gType);
-
-		if(gType==TeSDOLINE)  
-		{
-			TeLine2D line;
-			fetchGeometry(line);
-			lineSet.add(line);
-			return true;
-		}
-
-		if(!cursor->GetCoordinates(coordinates))
-			return false;
-
-		for(i=1;i<=ndim;i+=3)
-		{
-			TeLine2D	line;
-			GetDimElement(i,elem);		// oordinate position
-			if((i+3) > ndim)
-				elemnext = noords+1;
-			else
-				GetDimElement(i+3,elemnext);
-			
-			// ler os pontos
-			for(k=(elem/2);k<(elemnext/2);k++)
-			{
-				TeCoord2D pt(coordinates[k]);
-				line.add(pt);
-			}
-			line.objectId (objId);
-			line.geomId(geomId);
-			lineSet.add(line);
-		}
-
-		lineSet.objectId(objId);
-		lineSet.geomId(geomId);
-		
-		return (this->fetchRow());
-	}
-	catch(...)
-	{
-		errorMessage_ = cursor->getErrorMessage();
-		return false;
-	}
-}
-
-
-bool 
-TeOracleSpatial::insertPoint(const string& table, TePoint &point)
-{
-	
-	string ins = "INSERT INTO " + table + " ( ";
-	ins += " geom_id, object_id, spatial_data) ";
-	ins += " VALUES ( ";
-	ins += getNameSequence(table) +".NEXTVAL";
-	ins += ", '" + escapeSequence(point.objectId()) + "'";
-	ins += ", MDSYS.SDO_GEOMETRY(2001, NULL, ";
-	ins += "MDSYS.SDO_POINT_TYPE( ";
-	ins += Te2String(point.location().x());
-	ins += ", " + Te2String(point.location().y());
-	ins += ", NULL )";
-	ins += ", NULL, NULL)";
-	ins += " ) ";
-
-	if(!execute(ins))
-	{
-		if(errorMessage_.empty())
-			errorMessage_ = "Error inserting in the table " + table + "!"; 
-		return false;
-	}
-
-	TeOracleSpatialPortal	*ocip = (TeOracleSpatialPortal*)getPortal();
-	if(!ocip)
-		return false;
-
-	string seq = "SELECT "+ getNameSequence(table) +".CURRVAL FROM DUAL";
-	if(!ocip->query(seq))
-	{
-		if(errorMessage_.empty())
-			errorMessage_ = "Error in the sequence " + table + "_seq!";  
-		delete ocip;
-		return false;
-	}
-
-	if(!ocip->fetchRow())
-	{
-		errorMessage_ = "Sequence value not found!";
-		delete ocip;
-		return false;
-	}
-
-	int index = atoi((const char*)ocip->getData(0)); 
-	point.geomId(index); 
-	delete ocip;
-
-	return true;
-}
-
-
-bool 
-TeOracleSpatial::updatePoint (const string& table, TePoint &point)
-{
-	string sql;
-	sql =  "UPDATE " + table + " SET ";
-	sql += "object_id = '" + point.objectId() + "'";
-	sql += ", spatial_data = ";
-	sql += " MDSYS.SDO_GEOMETRY(2001, NULL";
-	sql += ", MDSYS.SDO_POINT_TYPE( ";
-	sql += Te2String(point.location ().x());
-	sql += ", " + Te2String(point.location ().y());
-	sql += ", NULL )";
-	sql += ", NULL, NULL)";
-	sql += " WHERE geom_id = " + Te2String(point.geomId());
-
-	if(!execute(sql))
-	{
-		if(errorMessage_.empty())
-			errorMessage_ = "Error updating in the table " + table + "!"; 
-		return false;
-	}
-
-	return true;
-}
-	
-
-bool 
-TeOracleSpatialPortal::fetchGeometry(TePoint& p)
-{
-	double		x,y;
-	
-	try
-	{
-		if(!GetPointXYZ(x,y))
-			return false;		//point in SDO_POINT
-
-		TeCoord2D c(x,y);
-		p.add(c);
-		p.objectId(string(getData("object_id")));
-		p.geomId(atoi(getData("geom_id")));
-		return(this->fetchRow());
-	}
-	catch(...)
-	{
-		errorMessage_ = cursor->getErrorMessage();
-		return false;
-	}
-}
-
-
-
-bool 
-TeOracleSpatial::insertText	(const string& table, TeText &text)
-{
-	
-	string ins = "INSERT INTO " + table + " (geom_id, ";
-	ins += " object_id, x, y, text_value, angle, height, alignment_vert, ";
-	ins += " alignment_horiz) VALUES ( ";
-	ins += getNameSequence(table) +".NEXTVAL";
-	ins += ", '" + escapeSequence(text.objectId()) + "'";
-	ins += ",  " + Te2String(text.location().x(),10);
-	ins += ",  " + Te2String(text.location().y(),10);
-	ins += ", '" + escapeSequence(text.textValue()) + "'";
-	ins += ",  " + Te2String(text.angle(),10);
-	ins += ",  " + Te2String(text.height(),10);
-	ins += ",  " + Te2String(text.alignmentVert(),10);
-	ins += ",  " + Te2String(text.alignmentHoriz(),10);
-	ins += " )";
-	
-	if(!execute(ins))
-	{
-		if(errorMessage_.empty())
-			errorMessage_ = "Error inserting in the table " + table + "!"; 
-		return false;
-	}
-
-	TeOracleSpatialPortal *ocip = (TeOracleSpatialPortal*)getPortal();
-	if(!ocip)
-		return false;
-
-	string seq = "SELECT "+ getNameSequence(table) +".CURRVAL FROM DUAL";
-	if(!ocip->query(seq))
-	{
-		if(errorMessage_.empty())
-			errorMessage_ = "Error in the sequence " + table + "_seq!";  
-		delete ocip;
-		return false;
-	}
-
-	if(!ocip->fetchRow())
-	{
-		errorMessage_ = "Sequence value not found!";
-		delete ocip;
-		return false;
-	}
-
-	int index = atoi((const char*)ocip->getData(0)); 
-	text.geomId(index); 
-	delete ocip;
-	return true;
-}
-
-
-bool 
-TeOracleSpatial::insertArc (const string& table, TeArc &arc)
-{
-	
-	string ins = "INSERT INTO " + table + " (geom_id, ";
-	ins += " object_id, from_node, to_node ) ";
-	ins += " VALUES ( ";
-	ins += getNameSequence(table) +".NEXTVAL";
-	ins += ", '" + escapeSequence(arc.objectId()) + "'";
-	ins += ",  " + Te2String(arc.fromNode().geomId());
-	ins += ",  " + Te2String(arc.toNode().geomId());
-	ins += " )";
-	
-	if(!execute(ins))
-	{
-		if(errorMessage_.empty())
-			errorMessage_ = "Error inserting in the table " + table + "!"; 
-		return false;
-	}
-
-	TeOracleSpatialPortal *ocip = (TeOracleSpatialPortal*)getPortal();
-	if(!ocip)
-		return false;
-
-	string seq = "SELECT "+ getNameSequence(table) +".CURRVAL FROM DUAL";
-	if(!ocip->query(seq))
-	{
-		if(errorMessage_.empty())
-			errorMessage_ = "Error in the sequence " + table + "_seq!";  
-		delete ocip;
-		return false;
-	}
-
-	if(!ocip->fetchRow())
-	{
-		errorMessage_ = "Sequence value not found!";
-		delete ocip;
-		return false;
-	}
-
-	int index = atoi((const char*)ocip->getData(0)); 
-	arc.geomId(index); 
-	delete ocip;
-
-	return true;
-}
-
-bool 
-TeOracleSpatialPortal::fetchGeometry(TePointSet& pointSet)
-{
-	double		x,y;
-	vector<TeCoord2D> coordinates;
-
-	x=y=-99999.;
-	try
-	{
-		int noords = NumberOfOrdinates();
-		if(noords==0)
-			return false;
-
-		TeSDOGType gType;
-		GetGeometryType(gType);
-
-		if(gType==TeSDOPOINT)  
-		{
-			TePoint point;
-			fetchGeometry(point);
-			pointSet.add(point);
-			return true;
-		}
-
-		if(!cursor->GetCoordinates(coordinates))
-			return false;
-
-		int geomId = atoi(getData("geom_id"));
-		string objId = string(getData("object_id"));
-		
-		for(int i=1;i<=noords/2;i++)
-		{
-			TePoint pt(coordinates[i-1]);
-			pt.geomId (geomId);
-			pt.objectId (objId);
-			pointSet.add(pt);
-		}
-		
-		pointSet.objectId(objId);
-		pointSet.geomId(geomId);
-		
-		return(this->fetchRow());
-	}
-	catch(...)
-	{
-		errorMessage_ = cursor->getErrorMessage();
-		return false;
-	}
-}
-	
-
-bool 
-TeOracleSpatial::insertNode (const string& table, TeNode &node)
-{	
-	string ins = "INSERT INTO " + table + " ( ";
-	ins += " geom_id, object_id, spatial_data) ";
-	ins += " VALUES ( ";
-	ins += getNameSequence(table) +".NEXTVAL";
-	ins += ", '" + escapeSequence(node.objectId()) + "'";
-	ins += ", MDSYS.SDO_GEOMETRY(2001, NULL, ";
-	ins += "MDSYS.SDO_POINT_TYPE( ";
-	ins += Te2String(node.location().x());
-	ins += ", " + Te2String(node.location ().y());
-	ins += ", NULL )";
-	ins += ", NULL, NULL)";
-	ins += " ) ";
-
-	if(!execute(ins))
-	{
-		if(errorMessage_.empty())
-			errorMessage_ = "Error inserting in the table " + table + "!"; 
-		return false;
-	}
-
-	TeOracleSpatialPortal *ocip = (TeOracleSpatialPortal*)getPortal();
-	if(!ocip)
-		return false;
-
-	string seq = "SELECT "+ getNameSequence(table) + ".CURRVAL FROM DUAL";
-	if(!ocip->query(seq))
-	{
-		if(errorMessage_.empty())
-			errorMessage_ = "Error in the sequence " + table + "_seq!";  
-		delete ocip;
-		return false;
-	}
-
-	if(!ocip->fetchRow())
-	{
-		errorMessage_ = "Sequence value not found!";
-		delete ocip;
-		return false;
-	}
-
-	int index = atoi((const char*)ocip->getData(0)); 
-	node.geomId(index); 
-	delete ocip;
-
-	return true;
-}
-	
-
-bool
-TeOracleSpatial::updateNode (const string& table, TeNode &node)
-{	
-	string sql;
-	sql =  "UPDATE " + table + " SET ";
-	sql += " object_id = '" + node.objectId() + "'";
-	sql += ", spatial_data = ";
-	sql += " MDSYS.SDO_GEOMETRY(2001, NULL";
-	sql += ", MDSYS.SDO_POINT_TYPE( ";
-	sql += Te2String(node.location ().x());
-	sql += ", " + Te2String(node.location ().y());
-	sql += ", NULL )";
-	sql += ", NULL, NULL)";
-	sql += " WHERE geom_id = " + Te2String(node.geomId());
-	
-	if(!execute(sql))
-	{
-		if(errorMessage_.empty())
-			errorMessage_ = "Error updating in the table " + table + "!"; 
-		return false;
-	}
-	return true;
-}
-
-bool 
-TeOracleSpatialPortal::fetchGeometry(TeNode& n)
-{
-	double	x,y;
-	x=y=-99999.;
-	try
-	{
-		if(!GetPointXYZ(x,y))
-			return false;
-
-		TeCoord2D point(x,y);
-		n.add(point);
-		n.geomId(atoi(getData("geom_id")));
-		n.objectId(string(getData("object_id")));
-		return(this->fetchRow());
-	}
-	catch(...)
-	{
-		errorMessage_ = cursor->getErrorMessage();
-		return false;
-	}
-}
-
-
-
-bool 
-TeOracleSpatial::insertCell (const string& table, TeCell &cell )
-{
-	
-	TeBox b = cell.box();
-
-	string ins = "INSERT INTO " + table + " ( ";
-	ins += " geom_id, object_id, col_number, row_number, spatial_data) ";
-	ins += " VALUES ( ";
-	ins += getNameSequence(table) +".NEXTVAL";
-	ins += ", '" + escapeSequence(cell.objectId ()) + "'";
-	ins += ",  " + Te2String(cell.column ());
-	ins += ",  " + Te2String(cell.line ());
-	ins += ", MDSYS.SDO_GEOMETRY(2003, NULL, NULL";
-	ins += ", MDSYS.SDO_ELEM_INFO_ARRAY( 1, 1003, 3 )";
-	ins += ", MDSYS.SDO_ORDINATE_ARRAY( " ;
-	ins += Te2String(b.lowerLeft().x());
-	ins += ", " + Te2String(b.lowerLeft().y());
-	ins += ", " + Te2String(b.upperRight().x());
-	ins += ", " + Te2String(b.upperRight().y());
-	ins += ")) ";
-	ins += " )";
-		
-	if(!execute(ins))
-	{
-		if(errorMessage_.empty())
-			errorMessage_ = "Error inserting in the table " + table + "!"; 
-		return false;
-	}
-
-	TeOracleSpatialPortal *ocip = (TeOracleSpatialPortal*)getPortal();
-	if(!ocip)
-		return false;
-
-	string seq = "SELECT "+ getNameSequence(table) +".CURRVAL FROM DUAL";
-	if(!ocip->query(seq))
-	{
-		if(errorMessage_.empty())
-			errorMessage_ = "Error in the sequence " + table + "_seq!";  
-		delete ocip;
-		return false;
-	}
-
-	if(!ocip->fetchRow())
-	{
-		errorMessage_ = "Sequence value not found!";
-		delete ocip;
-		return false;
-	}
-
-	int index = atoi((const char*)ocip->getData(0)); 
-	cell.geomId(index); 
-	delete ocip;
-	
-	return true;
-}
-
-
-bool 
-TeOracleSpatial::updateCell(const string& table, TeCell &cell)
-{
-	TeBox b = cell.box ();
-	
-	string sql;
-	sql =  "UPDATE " + table + " SET ";
-	sql += " object_id= '" + cell.objectId() + "'";
-	sql += " col_number= " + Te2String(cell.column ());
-	sql += " row_number= " + Te2String(cell.line ());
-	sql += " spatial_data= ";
-	sql += " MDSYS.SDO_GEOMETRY(2003, NULL, NULL";
-	sql += ", MDSYS.SDO_ELEM_INFO_ARRAY( 1, 1003, 3 )";
-	sql += ", MDSYS.SDO_ORDINATE_ARRAY( " ;
-	sql += Te2String(b.lowerLeft().x());
-	sql += ", " + Te2String(b.lowerLeft().y());
-	sql += ", " + Te2String(b.upperRight().x());
-	sql += ", " + Te2String(b.upperRight().y());
-	sql += ")) ";
-	sql += " WHERE geom_id = " +  cell.geomId ();
-	
-	if(!execute(sql))
-	{
-		if(errorMessage_.empty())
-			errorMessage_ = "Error updating in the table " + table + "!"; 
-		return false;
-	}
-	
-	return true;
-}
-
-
-char* TeOracleSpatialPortal ::getData (int i) 
-{
-
-	char* result;
-	if (i > numFields_ || i < 0)
-		return "";
-	
-	try
-	{
-		result = cursor->GetFieldValue(i+1);
-	}
-	catch(...)
-	{
-		errorMessage_ = "Error!";
-		return "";
-	}
-	return result;
-	
-}
-
-char* TeOracleSpatialPortal ::getData (const string &s)
-{
-	string	attstr;
-	char* result;
-
-	string fieldName;
-	size_t pos = s.find(".", string::npos,1);
-	if (pos != string::npos)
-		fieldName = s.substr(pos+1);
-	else
-		fieldName = s;
-
-	attstr = strupr((char*)(fieldName.c_str()));
-	int index = getColumnIndex (attstr);
-	if(index == -1)
-		return "";
-	else
-		result = getData(index);
-
-	return result;
-}
-
-
-int TeOracleSpatialPortal ::getInt (int i) 
-{
-	double field;
-	char* fieldChar;
-	
-	fieldChar = cursor->GetFieldValue(i+1);
-	field = atoi((const char*)fieldChar);
-
-	return (int)field;
-}
-
-int  
-TeOracleSpatialPortal::getInt (const string& s)
-{
-	string	attstr;
-
-	attstr = strupr((char*)(s.c_str()));
-	int index = getColumnIndex (attstr);
-	if(index == -1)
-		return (int)-1.;
-
-	return (getInt(index));
-}
-
-double TeOracleSpatialPortal ::getDouble (int i) 
-{
-	double field;
-	char* fieldChar;
-	
-	fieldChar = cursor->GetFieldValue(i+1);
-	field = atof((const char*)fieldChar);
-
-	return field;
-}
-
-double  
-TeOracleSpatialPortal::getDouble (const string& s)
-{
-	string	attstr;
-
-	attstr = strupr((char*)(s.c_str()));
-	int index = getColumnIndex (attstr);
-	if(index == -1)
-		return -1.;
-
-	return (getDouble(index));
-}
-
-
-bool
-TeOracleSpatialPortal::getBool(int i)
-{
-	char* fieldChar=0;
-	
-	fieldChar = cursor->GetFieldValue(i+1);
-	if(fieldChar == 0)
-		return false;
-	
-	return true;
-}
-
-
-bool    
-TeOracleSpatialPortal::getBool (const string& s)
-{
-	string	attstr;
-
-	attstr = strupr((char*)(s.c_str()));
-	int index = getColumnIndex (attstr);
-	if(index == -1)
-		return 0;
-
-	return (getBool(index));
-}
-
-bool
-TeOracleSpatial::insertMetadata(const string &table, const string &column, double tolx,double toly,TeBox &box,short /* srid */)
-{	
-	TeOracleSpatialPortal	*ocip = (TeOracleSpatialPortal*)getPortal();
-	if(!ocip)
-		return false;
-
-	string check = "SELECT * FROM USER_SDO_GEOM_METADATA ";
-	check += " WHERE TABLE_NAME = '" + TeConvertToUpperCase(table);
-	check += "' AND COLUMN_NAME = '" + TeConvertToUpperCase(column) + "'";
-	if(!ocip->query(check))
-	{
-		delete ocip;
-		return false;
-	}
-
-	if(ocip->fetchRow())
-	{
-		delete ocip;
-		return false;
-	}
-			
-	delete ocip;
-	
-	double xmin = box.x1();
-	double ymin = box.y1();
-	double xmax = box.x2();
-	double ymax = box.y2();
-
-	string inser = "INSERT INTO USER_SDO_GEOM_METADATA VALUES ( ";
-	inser += "'" + TeConvertToUpperCase(table) + "' ," ;
-	inser += "'" + TeConvertToUpperCase(column) + "' ," ; 
-	inser += " MDSYS.SDO_DIM_ARRAY(";
-	inser += " MDSYS.SDO_DIM_ELEMENT('X',";
-	inser += Te2String(xmin) + "," + Te2String(xmax,10) + "," + Te2String(tolx,10) + "), ";
-	inser += " MDSYS.SDO_DIM_ELEMENT('Y',";
-	inser += Te2String(ymin) + "," + Te2String(ymax,10) + "," + Te2String(toly,10) + ")), ";
-	inser += " NULL ) ";
-
-	if(!(execute(inser.c_str()))) 
-	{
-		if(errorMessage_.empty())
-			errorMessage_ = "Error inserting in the table USER_SDO_GEOM_METADATA! "; 
-		return false;
-	}
-
-	return true;
-}
-
-bool
-TeOracleSpatial::DeleteMetadata(const string &table, const string &column)
-{
-	string del = "DELETE FROM USER_SDO_GEOM_METADATA ";
-	del += " WHERE TABLE_NAME = '" + TeConvertToUpperCase(table);
-	del += "' AND COLUMN_NAME = '" + TeConvertToUpperCase(column) + "'";
-	if(!(execute(del.c_str ())))
-		return false;
-	return true;
-}
-
-
-bool
-TeOracleSpatial::createSpatialIndex(const string &table, const string &column,TeSpatialIndexType type, short level, short tile)
-{
-	TeOracleSpatialPortal  *ocip = (TeOracleSpatialPortal*)getPortal();
-	if(!ocip)
-		return false;
-
-	
-	string name;
-	if(table.size()>21)
-		name = TeConvertToUpperCase(table.substr(0,20)) + "_IDX";
-	else
-		name = TeConvertToUpperCase(table) + "_IDX";
-
-	
-	string index = "SELECT * FROM USER_SDO_INDEX_INFO";
-	index += " WHERE table_name = '" + TeConvertToUpperCase(table) + "'";
-	if(!ocip->query(index))
-	{
-		delete ocip;
-		return false;
-	}
-	
-	if(ocip->fetchRow())
-	{
-		errorMessage_ = "Spatial Index table already exist!";
-		delete ocip;
-		return false;
-	}
-		
-	delete ocip;
-
-	index = " CREATE INDEX " + name;
-	index += " ON " + table + "(" + column + ")";
-	index += " INDEXTYPE IS MDSYS.SPATIAL_INDEX ";
-	
-	if(type == TeQUADTREE)
-	{
-		if(level==0)
-			return false;
-
-		index += " PARAMETERS ('";
-		index += "SDO_LEVEL = " + Te2String(level);
-		index += " SDO_NUMTILES = " + Te2String(tile) + "'";
-	}
-
-	if(!execute(index))
-		return false;
-	
-	return true;
-}
-
-bool
-TeOracleSpatial::RebuildSpatialIndex(const string &table)
-{
-	TeOracleSpatialPortal *ocip = (TeOracleSpatialPortal*)getPortal();
-	if(!ocip)
-		return false;
-
-	string tabIndex;
-
-	string ind = "SELECT index_name FROM USER_SDO_INDEX_INFO";
-	ind += " WHERE table_name = '" + TeConvertToUpperCase(table) + "'";
-	if (!ocip->query(ind))
-	{
-		delete ocip;
-		return false;
-	}
-	
-	if(!ocip->fetchRow())
-	{
-		delete ocip;
-		return false;
-	}
-
-	tabIndex = string(ocip->getData(0));
-	delete ocip;
-		
-	string reb = "ALTER INDEX ";
-	reb += tabIndex + " REBUILD";
-	if(!execute(reb))
-		return false;
-
-	return true;
-}
-
-bool
-TeOracleSpatial::DeleteSpatialIndex(const string &table)
-{
-	TeOracleSpatialPortal	*ocip = (TeOracleSpatialPortal*)getPortal();
-	if(!ocip)
-		return false;
-
-	string tabIndex;
-
-	string ind = "SELECT index_name FROM USER_SDO_INDEX_INFO";
-	ind += " WHERE table_name = '"+ TeConvertToUpperCase(table) +"'";
-	if (!ocip->query(ind))
-	{
-		delete ocip;
-		return false;
-	}
-
-	if(!ocip->fetchRow())
-	{
-		delete ocip;
-		return false;
-	}
-
-	tabIndex = string(ocip->getData(0));
-	ocip->freeResult();
-	delete ocip;
-
-	string drop = "DROP INDEX "+ tabIndex;
-	if (!(execute(drop.c_str ())))
-		return false;
-	return true;
-}
-
-bool	
-TeOracleSpatial::createSequence(const string &tableName)
-{
-	string nameSeq = getNameSequence(tableName);
-	
-	string seq = " CREATE SEQUENCE " + nameSeq;
-	seq += " START WITH 1 INCREMENT BY 1 ORDER ";
-	if (!execute(seq))
-	{	
-		if(errorMessage_.empty())
-			errorMessage_ = "Error creating sequence to table " + tableName + " !";
-		return false;
-	}
-
-	return true;
-}
-
-bool
-TeOracleSpatial::createAutoIncrementTrigger(const string &tableName, const string &fieldName)
-{
-	string nameTri = getNameTrigger(tableName);
-	string nameSeq = getNameSequence(tableName);
-
-	string tri;
-	tri = "CREATE TRIGGER " + nameTri; 
-	tri += " BEFORE INSERT ON "+tableName; 
-	tri += " for each row";
-	tri += " begin";
-	tri += " select "+nameSeq+".nextval";
-	tri += " into :new."+fieldName;
-	tri += " from dual;";
-	tri += " end;";
-
-	if(!execute(tri))
-	{	
-		if(errorMessage_.empty())
-			errorMessage_ = "Error creating trigger to table " + tableName + " !";
-		return false;
-	}
-	return true;
-}
-
-string
-TeOracleSpatial::getNameSequence(const string &tableName)
-{
-	string name;
-	if(tableName.size()>21)
-		name = tableName.substr(0,20) + "_seq";
-	else
-		name = tableName + "_seq";
-
-	return name;
-}
-
-string
-TeOracleSpatial::getNameTrigger(const string &tableName)
-{
-	string name;
-	if(tableName.size()>21)
-		name = tableName.substr(0,20) + "_tri";
-	else
-		name = tableName + "_tri";
-
-	return name;
-}
-
-
-int 
-TeOracleSpatialPortal::GetDimArraySize()
-{
-	if(!cursor)
-		return 0;
-
-	return(cursor->GetDimArraySize());
-}
-
-bool 
-TeOracleSpatialPortal::GetDimElement(int i,int &elem)
-{
-	if(!cursor)
-		return false;
-
-	return (cursor->GetDimElement(i,elem));
-}
-
-int 
-TeOracleSpatialPortal::NumberOfOrdinates()
-{
-	if(!cursor)
-		return 0;
-
-	return(cursor->GetNumberOrdinates());
-}
-
-bool
-TeOracleSpatialPortal::GetCoordinates(int i,TeCoord2D& coord)
-{
-	if(!cursor)
-		return false;
-
-	return (cursor->GetCoordinates((i*2)-1,coord));
-}
-
-bool
-TeOracleSpatialPortal::GetGeometryType(TeSDOGType& gType)
-{
-	if(!cursor)
-		return false;
-
-	int type = cursor->GetGeometryType(); 
-	
-	switch(type)
-	{ 
-		case 2000:
-			gType=TeSDOUNKNOWN;
-			break;
-
-		case 2001:
-			gType=TeSDOPOINT;
-			break;
-
-		case 2002:
-			gType=TeSDOLINE;
-			break;
-
-		case 2003:
-			gType=TeSDOPOLYGON;
-			break;
-
-		case 2004:
-			gType=TeSDOCOLLECTION;
-			break;
-
-		case 2005:
-			gType=TeSDOMULTIPOINT;
-			break;
-
-		case 2006:
-			gType=TeSDOMULTILINE;
-			break;
-		
-		case 2007:
-			gType=TeSDOMULTIPOLYGON;
-			break;
-		default:
-			return false;
-	};
-	return true;
-}
-
-int
-TeOracleSpatialPortal::GetSpatialReferenceId()
-{
-	if(!cursor)
-		return -1;
-
-	return (cursor->GetSpatialReferenceId());
-}
-
-bool
-TeOracleSpatialPortal::GetPointXYZ (double& x,double& y)
-{
-	if(!cursor)
-		return false;
-
-	return (cursor->GetXYZcoord(x,y));
-}
-
-
-bool 
-TeOracleSpatial::insertLayer(TeLayer* layer)
-{	
-	int index;
-	TeProjection* proj = layer->projection();
-	if (!proj || !insertProjection(proj))
-	{
-		errorMessage_ = "N�o � poss�vel inserir layer sem proje��o";
-		return false;
-	}
-	string ins = "INSERT INTO te_layer (layer_id, projection_id, name ";
-	ins += ", lower_x, lower_y, upper_x, upper_y) ";
-	ins += " VALUES ( ";
-	ins += "te_layer_seq.NEXTVAL";
-	ins += ", " + Te2String(proj->id());
-	ins += ", '" + escapeSequence(layer->name()) + "'";
-	ins += ", " + Te2String(layer->box().x1(),10);
-	ins += ", " + Te2String(layer->box().y1(),10);
-	ins += ", " + Te2String(layer->box().x2(),10);
-	ins += ", " + Te2String(layer->box().y2(),10);
-	ins += ")";
-
-	if(!execute(ins))
-	{
-		if(errorMessage_.empty())
-			errorMessage_ = "Error inserting in the table te_layer!";   
-		return false;
-	}
-
-	TeOracleSpatialPortal *ocip = (TeOracleSpatialPortal*)getPortal();
-	if(!ocip)
-		return false;
-
-	ins = "SELECT te_layer_seq.CURRVAL FROM DUAL";
-	if (!ocip->query(ins))
-	{
-		if(errorMessage_.empty())
-			errorMessage_ = "Error in the sequence te_layer_seq!";  
-		delete ocip;
-		return false;
-	}
-
-	if(!ocip->fetchRow())
-	{
-		errorMessage_ = "Sequence value not found!";
-		delete ocip;
-		return false;
-	}
-
-	index = atoi((const char*)ocip->getData(0));
-	layer->id(index);
-	delete ocip;
-	layerMap_[layer->id()] = layer;
-	return true;
-}
-
-bool 
-TeOracleSpatial::deleteLayer (int layerId)
-{
-	//Delete attributes tables
-	if(!deleteLayerTable(layerId))
-		return false;
-
-	TeOracleSpatialPortal* portal = (TeOracleSpatialPortal*) this->getPortal();
-	if (!portal)
-		return false;
-
-	string geomTable;
-	string sql = "SELECT projection_id FROM te_layer WHERE layer_id = ";
-	sql += Te2String(layerId);
-
-	if (!portal->query(sql))
-	{	
-		delete portal;
-		return false;
-	}
-
-	if (!portal->fetchRow())
-	{
-		delete portal;
-		return false;
-	}
-	string projId = portal->getData("projection_id");
-	portal->freeResult();
-
-	// Get all representations that are associated to this layer
-	sql = "SELECT * FROM te_representation WHERE layer_id = "+ Te2String(layerId);
-	if (!portal->query (sql))
-	{
-		delete portal;
-		return false;
-	}
-
-	while (portal->fetchRow())
-	{	// Delete the geometry tables
-		geomTable = portal->getData("geom_table");
-	
-		// Delete lut table
-		TeGeomRep rep = TeGeomRep(atoi(portal->getData("geom_type")));
-		if (rep == TeRASTER)
-		{
-			TeOracleSpatialPortal* portal2 = (TeOracleSpatialPortal*)this->getPortal();
-			sql = "SELECT lut_table, raster_table FROM " + geomTable;
-			string tabName;
-			if (!portal2->query (sql))
-			{
-				delete portal2;
-				continue;
-			}
-
-			while (portal2->fetchRow())
-			{
-				// remove lut table
-				tabName = portal2->getData(0);
-				if (!tabName.empty() && this->tableExist(tabName))
-				{
-					sql = "DROP TABLE " + tabName;
-					this->execute(sql);
-
-					sql= "DROP SEQUENCE "+ getNameSequence(tabName);
-					this->execute(sql); 
-				}
-				// remove raster table
-				tabName = portal2->getData(1);
-				if (!tabName.empty() && this->tableExist(tabName))
-				{
-					sql = "DROP TABLE " + tabName;
-					this->execute(sql);
-
-					DeleteMetadata(tabName, "block_box");
-					DeleteSpatialIndex(tabName);
-				}
-			}
-			delete portal2;
-			// remove raster metadata table
-			tabName = geomTable + "_metadata";
-			if (!tabName.empty() && this->tableExist(tabName))
-			{
-				sql = "DROP TABLE " + tabName;
-				this->execute(sql);
-			}
-		}
-		if (this->tableExist(geomTable))
-		{
-			sql = "DROP TABLE " + geomTable;
-			if (!this->execute(sql) )
-			{
-				delete portal;
-				return false;
-			}
-			
-			sql= "DROP SEQUENCE "+ getNameSequence(geomTable);
-			this->execute(sql);
-			DeleteMetadata(geomTable, "spatial_data");
-			DeleteSpatialIndex(geomTable);
-		}
-	}
-
-	portal->freeResult();
-	if (existRelation("te_representation","fk_rep_layer_id") != TeRICascadeDeletion)
-	{
-		// Delete entries into representations table
-		sql = "DELETE FROM te_representation WHERE layer_id = " +Te2String(layerId);
-		if (!this->execute(sql) )
-		{
-			delete portal;
-			return false;
-		}
-	}
-
-	// delete layer themes
-	sql = "SELECT theme_id FROM te_theme WHERE layer_id=" + Te2String(layerId);
-	if (!portal->query (sql))
-	{
-		delete portal;
-		return false;
-	}
-	
-	int themeId;
-	while (portal->fetchRow())
-	{	
-		themeId = atoi(portal->getData("theme_id"));
-		this->deleteTheme(themeId);
-	}
-	
-	sql = "DELETE FROM te_layer WHERE layer_id=" + Te2String(layerId);
-	if (!this->execute(sql))
-	{
-		delete portal;
-		return false;
-	}
-
-	// delete layer projection
-	sql = "DELETE FROM te_projection WHERE projection_id = "+ projId;
-	if (!this->execute(sql))
-	{	
-		delete portal;
-		return false;
-	}
-
-	// remove all the items� themes associated to the layer to be removed
-	TeThemeMap::iterator it;
-	for (it = themeMap_.begin(); it != themeMap_.end(); ++it)
-	{
-		TeTheme *theme = it->second;
-		if (theme->layer()->id() == layerId)
-		{
-			themeMap_.erase(theme->id());
-			delete theme;
-		}
-	}
-
-	// Delete layer and its entry in the layer map
-	TeLayer* layer = layerMap_[layerId];
-	layerMap_.erase(layerId);
-	delete layer;
-
-	delete portal;
-	return true;
-}
-
-
-bool
-TeOracleSpatial::insertTheme (TeTheme *theme)
-{
-	double maxScale = theme->maxScale ();
-	if(maxScale==TeMAXFLOAT)
-		maxScale = 0.;
-
-	string ins = "INSERT INTO te_theme (theme_id, layer_id, view_id, name, ";
-	ins += " parent_id, priority, node_type, min_scale, max_scale, ";
-	ins += " generate_attribute_where, generate_spatial_where, generate_temporal_where, ";
-	ins += " collection_table, visible_rep, enable_visibility) VALUES (";
-	ins += "te_theme_seq.NEXTVAL";
-	ins += ", " + Te2String(theme->layerId());
-	ins += ", " + Te2String(theme->view());
-	ins += ", '" + escapeSequence(theme->name()) + "'";
-	ins += ", " + Te2String(theme->parentId ());
-	ins += ", " + Te2String(theme->priority());
-	ins += ", " + Te2String(theme->type ());
-	ins += ", " + Te2String (theme->minScale(),9);
-	ins += ", " + Te2String (maxScale);
-	ins += ", '" + escapeSequence(theme->attributeRest()) + "'";
-	ins += ", '" + escapeSequence(theme->spatialRest()) + "'";
-	ins += ", '" + escapeSequence(theme->temporalRest()) + "'";
-	ins += ", '" + escapeSequence(theme->collectionTable()) + "'";
-	ins += ", " + Te2String(theme->visibleRep());
-	ins += ", " + Te2String(theme->visibility());
-	ins += ")";
-
-	if(!execute(ins))
-	{
-		if(errorMessage_.empty())
-			errorMessage_ = "Error inserting in the table te_theme!";   
-		return false;
-	}
-
-	TeOracleSpatialPortal  *ocip = (TeOracleSpatialPortal*)getPortal();
-	if(!ocip)
-		return false;
-
-	string seq = "SELECT te_theme_seq.CURRVAL FROM DUAL";
-	if(!ocip->query(seq))
-	{
-		if(errorMessage_.empty())
-			errorMessage_ = "Error in the sequence te_theme_seq!";  
-		delete ocip;
-		return false;
-	}
-
-	if(!ocip->fetchRow())
-	{
-		errorMessage_ = "Sequence value not found!";
-		delete ocip;
-		return false;
-	}
-
-	int index = atoi((const char*)ocip->getData(0)); 
-	theme->id(index);
-	delete ocip;
-	string colName = theme->collectionTable(); 
-
-	//insert collection name
-	if(colName.empty())
-	{
-		colName = "te_collection_" + Te2String(index);
-		theme->collectionTable(colName);	
-		
-		ins = "UPDATE te_theme SET ";
-		ins += " collection_table = '" + escapeSequence(colName) + "'";
-		ins += " WHERE theme_id = " + Te2String (index);
-		
-		if(!execute(ins))
-		{
-			if(errorMessage_.empty())
-				errorMessage_ = "Error inserting in the table te_theme!";   
-			return false;
-		}
-	}
-	
-	bool status;
-
-	// insert grouping
-	int numSlices = 0;
-	if(theme->grouping())
-	{
-		if(!insertGrouping (theme->id(), theme->grouping()))
-			return false;
-		numSlices = theme->grouping()->groupNumSlices_;
-	}
-
-	// insert legend
-	theme->outOfCollectionLegend().group(-1); 
-	theme->outOfCollectionLegend().theme(theme->id()); 
-	status = insertLegend (&(theme->outOfCollectionLegend())); 
-	if (!status)
-		return status;
-
-	theme->withoutDataConnectionLegend().group(-2); 
-	theme->withoutDataConnectionLegend().theme(theme->id()); 
-	status = insertLegend (&(theme->withoutDataConnectionLegend())); 
-	if (!status)
-		return status;
-
-	theme->defaultLegend().group(-3); 
-	theme->defaultLegend().theme(theme->id()); 
-	status = insertLegend (&(theme->defaultLegend())); 
-	if (!status)
-		return status;
-
-	theme->pointingLegend().group(-4); 
-	theme->pointingLegend().theme(theme->id()); 
-	status = insertLegend (&(theme->pointingLegend())); 
-	if (!status)
-		return status;
-
-	theme->queryLegend().group(-5); 
-	theme->queryLegend().theme(theme->id()); 
-	status = insertLegend (&(theme->queryLegend())); 
-	if (!status)
-		return status;
-
-	theme->queryAndPointingLegend().group(-6); 
-	theme->queryAndPointingLegend().theme(theme->id()); 
-	status = insertLegend (&(theme->queryAndPointingLegend())); 
-	if (!status)
-		return status;
-
-	for (int i = 0; i < numSlices; i++)
-	{
-		theme->legend()[i].group(i);
-		theme->legend()[i].theme(theme->id());
-		status = insertLegend (&(theme->legend()[i]));
-		if (!status)
-			return status;
-	}
-	if (!status)
-		return status;
-
-	themeMap_[theme->id()] = theme;
-	return updateThemeTable(theme);
-}
-
-
-bool 
-TeOracleSpatial::insertThemeTable (int themeId, int tableId, int relationId, int tableOrder)
-{
-	string ins = "INSERT INTO te_theme_table ";
-	ins += " (theme_table_id, theme_id, table_id, relation_id, table_order)";
-	ins += " VALUES ( ";
-	ins += getNameSequence("te_theme_table") +".NEXTVAL ";
-	ins += ", "+ Te2String(themeId);
-	ins += ", "+ Te2String(tableId);
-	
-	if(relationId>0)
-		ins += ", "+ Te2String(relationId);
-	else
-		ins += ", null ";
-
-	ins += ", "+ Te2String(tableOrder);
-	ins += ")";
-
-	if(!execute(ins))
-	{
-		if(errorMessage_.empty())
-			errorMessage_ = "Error inserting in the table te_theme_table!";   
-		return false;
-	}
-
-	return true;
-}
-
-bool 
-TeOracleSpatial::insertThemeGroup(TeViewTree* tree)
-{
-	string ins = "INSERT INTO te_theme (theme_id, view_id, name, ";
-	ins += " parent_id, priority, node_type ) VALUES (";
-	ins += "te_theme_seq.NEXTVAL";
-	ins += ", " + Te2String(tree->view());
-	ins += ", '" + escapeSequence(tree->name()) + "'";
-	ins += ", " + Te2String(tree->parentId ());
-	ins += ", " + Te2String(tree->priority());
-	ins += ", " + Te2String(1);
-	ins += ")";
-
-	TeOracleSpatialPortal  *ocip = (TeOracleSpatialPortal*)getPortal();
-	if(!ocip)
-		return false;
-	
-	try
-	{
-		if(!execute(ins))
-		{
-			if(errorMessage_.empty())
-				errorMessage_ = "Error inserting in the table te_theme!";   
-			return false;
-		}
-
-		string seq = "SELECT te_theme_seq.CURRVAL FROM DUAL";
-		if(!ocip->query(seq))
-		{
-			if(errorMessage_.empty())
-				errorMessage_ = "Error in the sequence te_theme_seq!";  
-			delete ocip;
-			return false;
-		}
-
-		if(!ocip->fetchRow())
-		{
-			errorMessage_ = "Sequence value not found!";
-			delete ocip;
-			return false;
-		}
-
-		int index = atoi((const char*)ocip->getData(0)); 
-		tree->id(index);
-		
-	}
-	catch(...)
-	{
-		errorMessage_ = "Error inserting in the table te_theme!";
-		if(ocip)
-			delete ocip;
-		return false;
-	}
-
-	delete ocip;
-	return true;
-}
-
-bool 
-TeOracleSpatial::generateLabelPositions	(TeTheme *theme)
-{
-	
-	string	geomTable, upd;
-	string	collTable = theme->collectionTable();
-	
-	if((collTable.empty()) || (!tableExist(collTable)))
-		return false;
-
-	if( theme->layer()->hasGeometry(TeCELLS)    || 
-		theme->layer()->hasGeometry(TePOLYGONS) ||
-		theme->layer()->hasGeometry(TeLINES) )
-	{
-		geomTable = theme->layer()->tableName(TeCELLS);
-		
-		if(geomTable.empty())
-		{
-			geomTable = theme->layer()->tableName(TePOLYGONS);
-			if(geomTable.empty())
-				geomTable = theme->layer()->tableName(TeLINES);
-		}
-		
-		upd= " UPDATE " + collTable + " SET ";
-		upd += " label_x = (SELECT MAX(SDO_GEOM.SDO_MIN_MBR_ORDINATE( ";
-		upd += geomTable + ".spatial_data, 1) + (SDO_GEOM.SDO_MAX_MBR_ORDINATE( ";
-		upd += geomTable + ".spatial_data, 1) -  SDO_GEOM.SDO_MIN_MBR_ORDINATE( ";
-		upd += geomTable + ".spatial_data, 1))/2) ";
-		upd += "FROM " + geomTable + " WHERE object_id = c_object_id), ";
-		
-		upd += " label_y = (SELECT MAX(SDO_GEOM.SDO_MIN_MBR_ORDINATE( ";
-		upd += geomTable + ".spatial_data, 2) + (SDO_GEOM.SDO_MAX_MBR_ORDINATE( ";
-		upd += geomTable + ".spatial_data, 2) -  SDO_GEOM.SDO_MIN_MBR_ORDINATE( ";
-		upd += geomTable + ".spatial_data, 2))/2) ";
-		upd += "FROM " + geomTable + " WHERE object_id = c_object_id) ";
-
-		upd += " WHERE label_x IS NULL OR label_y IS NULL";
-
-	}
-	
-	else if (theme->layer()->hasGeometry(TePOINTS))
-	{
-		geomTable = theme->layer()->tableName(TePOINTS);
-		
-		upd= " UPDATE "+ collTable +" SET ";
-		upd += " label_x = (SELECT MAX(p.spatial_data.SDO_POINT.X) ";
-		upd += " FROM " + geomTable + " p WHERE object_id = c_object_id), ";
-		
-		upd += " label_y = (SELECT MAX(p.spatial_data.SDO_POINT.Y) ";
-		upd += " FROM " + geomTable + " p WHERE object_id = c_object_id) ";
-		upd += " WHERE label_x IS NULL OR label_y IS NULL";
-	}
-
-	if(!execute(upd))
-		return false;
-
-	return true;
-}
-
-
-bool 
-TeOracleSpatial::insertView(TeView *view)
-{
-	// save it�s projection
-	TeProjection* proj = view->projection();
-	if ( !proj || !insertProjection(proj))
-	{
-		errorMessage_ = "N�o � poss�vel inserir vista sem proje��o";
-		return false;
-	}
-
-	string ins = "INSERT INTO te_view (view_id, projection_id, name, user_name, visibility)";
-	ins += " VALUES (";
-	ins += "te_view_seq.NEXTVAL";
-	ins += ", " + Te2String(proj->id());
-	ins += ", '" + escapeSequence(view->name ()) + "'";
-	ins += ", '" + escapeSequence(view->user ()) + "'";
-	ins += ", " + Te2String((int)view->isVisible());
-	ins += " )";
-	
-	if(!execute (ins))
-	{
-		if(errorMessage_.empty())
-			errorMessage_ = "Error inserting in the table te_view!";   
-		return false;
-	}
-
-	TeOracleSpatialPortal *ocip = (TeOracleSpatialPortal*)getPortal();
-	if(!ocip)
-		return false;
-
-	ins = "SELECT te_view_seq.CURRVAL FROM DUAL";
-	if (!ocip->query(ins))
-	{
-		if(errorMessage_.empty())
-			errorMessage_ = "Error in the sequence te_view_seq!";  
-		delete ocip;
-		return false;
-	}
-
-	if(!ocip->fetchRow())
-	{
-		errorMessage_ = "Sequence value not found!";
-		delete ocip;
-		return false;
-	}
-
-	int index = atoi((const char*)ocip->getData(0));
-	view->id(index);
-	delete ocip;
-
-	int size = view->size();
-
-	for (int th=0; th<size; th++)
-	{
-		TeViewNode* node = view->get(th);
-		if (node->type() == TeTHEME)
-		{
-			TeTheme *theme = (TeTheme*) node;
-			insertTheme (theme);
-		}
-		else
-		{
-			TeViewTree* tree = (TeViewTree*)node;
-			insertViewTree (tree);
-		}
-	}
-
-	// Insert view in the view map
-	viewMap_[view->id()] = view;
-	return true;
-}
-
-
-
-bool
-TeOracleSpatial::insertViewTree (TeViewTree *tree)
-{
-	
-	string ins = "INSERT INTO te_theme (theme_id, view_id, name, ";
-	ins += " parent_id, node_type, priority) VALUES (";
-	ins += " te_theme_seq.NEXTVAL";
-	ins += ", " + Te2String(tree->view());
-	ins += ", '" + escapeSequence(tree->name()) + "'";
-	ins += ", " + Te2String(tree->parentId());
-	ins += ", " + Te2String(tree->type());
-	ins += ", " + Te2String(tree->priority());
-	ins += ")";
-	
-	if(!execute(ins))
-	{
-		if(errorMessage_.empty())
-			errorMessage_ = "Error inserting in the table te_theme!";
-		return false;
-	}
-
-	TeOracleSpatialPortal	*ocip = (TeOracleSpatialPortal*)getPortal();
-	if(!ocip)
-		return false;
-
-	string seq = "SELECT te_theme_seq.CURRVAL FROM DUAL";
-	if(!ocip->query(seq))
-	{
-		if(errorMessage_.empty())
-			errorMessage_ = "Error in the sequence te_theme_seq!";  
-		delete ocip;
-		return false;
-	}
-
-	if(!ocip->fetchRow())
-	{
-		errorMessage_ = "Sequence value not found!";
-		delete ocip;
-		return false;
-	}
-
-	int index = atoi((const char*)ocip->getData(0)); 
-	tree->id(index);
-	delete ocip;
-	
-	return true;
-}
-
-bool 
-TeOracleSpatial::locatePolygon (const string& table, TeCoord2D &pt, TePolygon & /* polygon */, const double& /* tol */)
-{
-	TeOracleSpatialPortal  *ocip = (TeOracleSpatialPortal*)getPortal();
-	if(!ocip)
-		return false;
-
-	string q = "SELECT * FROM " + table;
-	q += " WHERE MDSYS.SDO_RELATE (spatial_data,";
-	q += "MDSYS.SDO_GEOMETRY(2001,NULL, MDSYS.SDO_POINT_TYPE(";
-	q += Te2String(pt.x(),10) + ", " + Te2String(pt.y(), 10);
-	q += ", NULL), NULL, NULL), ";
-	q += " 'mask=contains querytype = window') = 'TRUE'";
-
-	if (!ocip->query(q) || !ocip->fetchRow())
-	{	
-		delete ocip;
-		return false;
-	}
-	
-//	bool flag = ocip->fetchGeometry(polygon);
-	delete ocip;
-	return true;
-}
-
-bool 
-TeOracleSpatial::locateLine (const string& table, TeCoord2D &pt, TeLine2D & /* line */, const double& tol)
-{
-
-	TeOracleSpatialPortal	*ocip = (TeOracleSpatialPortal*)getPortal();
-	if(!ocip)
-		return false;
-
-	TeBox box (pt.x()-tol,pt.y()-tol,pt.x()+tol,pt.y()+tol);
-	
-	string sdoGeom = "mdsys.sdo_geometry(2003,null,null,";
-	sdoGeom += "mdsys.sdo_elem_info_array(1,1003,3),";
-	sdoGeom += "mdsys.sdo_ordinate_array(";
-	sdoGeom += Te2String(box.x1(),10) + ", " + Te2String(box.y1(),10);
-	sdoGeom += ", " + Te2String(box.x2(),10) + ", " + Te2String(box.y2(),10) + "))";
-		
-	string q = "SELECT * FROM " + table;
-	q += " WHERE MDSYS.SDO_RELATE (spatial_data,";
-	q += sdoGeom +","; 
-	q += "'mask=anyinteract querytype = window') = 'TRUE'";
-
-	if (!ocip->query(q) || !ocip->fetchRow())
-	{
-		delete ocip;
-		return false;
-	}
-
-//	bool flag = ocip->fetchGeometry(line);
-	delete ocip;
-	return true;
-}
-
-bool 
-TeOracleSpatial::locatePoint (const string& table, TeCoord2D &pt, TePoint & /* point */, const double& tol)
-{
-	TeOracleSpatialPortal	*ocip = (TeOracleSpatialPortal*)getPortal();
-	if(!ocip)
-		return false;
-
-	
-	TeBox box (pt.x()-tol,pt.y()-tol,pt.x()+tol,pt.y()+tol);
-	
-	string sdoGeom = "mdsys.sdo_geometry(2003,null,null,";
-	sdoGeom += "mdsys.sdo_elem_info_array(1,1003,3),";
-	sdoGeom += "mdsys.sdo_ordinate_array(";
-	sdoGeom += Te2String(box.x1(),10) + ", " + Te2String(box.y1(),10);
-	sdoGeom += ", " + Te2String(box.x2(),10) + ", " + Te2String(box.y2(),10) + "))";
-		
-	string q = "SELECT * FROM " + table;
-	q += " WHERE MDSYS.SDO_RELATE (spatial_data,";
-	q += sdoGeom +","; 
-	q += "'mask=anyinteract querytype = window') = 'TRUE'";
-	
-	if (!ocip->query(q) || !ocip->fetchRow())
-	{
-		delete ocip;
-		return false;
-	}
-
-//	bool flag = ocip->fetchGeometry(point);
-	delete ocip;
-	return true;
-}
-
-bool	
-TeOracleSpatialPortal::fetchGeometry (TeCell& cell)
-{
-	TeCoord2D coord1,coord2;
-	try
-	{
-		GetCoordinates (1, coord1);
-		GetCoordinates (2, coord2);
-		TeBox b(coord1.x(), coord1.y(), coord2.x(), coord2.y());
-		
-		cell.setBox (b);
-		cell.geomId(atoi(getData("geom_id")));
-		cell.objectId (string(getData("object_id")));
-		cell.column(atoi(getData("col_number")));
-		cell.line(atoi(getData("row_number")));
-		return(this->fetchRow());
-	}
-	catch(...)
-	{
-		errorMessage_ = cursor->getErrorMessage();
-		return false;
-	}
-}
-
-bool 
-TeOracleSpatial::locateCell(const string& table, TeCoord2D &pt, TeCell & /* cell */, const double& /* tol */)
-{
-	TeOracleSpatialPortal  *ocip = (TeOracleSpatialPortal*)getPortal();
-	if(!ocip)
-		return false;
-
-	string q = "SELECT * FROM " + table;
-	q += " WHERE MDSYS.SDO_RELATE (spatial_data,";
-	q += "MDSYS.SDO_GEOMETRY(2001,NULL,MDSYS.SDO_POINT_TYPE(";
-	q += Te2String(pt.x(),10) + ", " + Te2String(pt.y(), 10);
-	q += ", NULL), NULL, NULL), ";
-	q += " 'mask=contains querytype = window') = 'TRUE'";
-
-	if (!ocip->query(q) || !ocip->fetchRow())
-	{	
-		delete ocip;
-		return false;
-	}
-	
-//	bool flag = ocip->fetchGeometry(cell);
-	delete ocip;
-	return true;
-}
-
-
-bool		
-TeOracleSpatialPortal::getBlob(const string& /* s */, unsigned char* &data, long& size)
-{
-	try
-	{
-		size = getCursor()->SizeBlob();
-		if(size>0)
-		{
-			data = new unsigned char[size];
-			cursor->ReadBlob((unsigned char*)data, size);
-		}
-	}
-	catch(...)
-	{
-		errorMessage_ = "Error getting media!";
-		return false;
-	}
-	return true;
-}
-
-
-TeTime 
-TeOracleSpatialPortal::getDate (int i) 
-{ 
-	TeTime temp;
-	string result;
-
-	if (i > numFields_ || i < 0)
-		return temp;
-	
-	try
-	{
-		result = cursor->GetFieldValue(i+1);
-	}
-	catch(...)
-	{
-		errorMessage_ = "Error!";
-		return temp;
-	}
-		
-	TeTime t(result, TeSECOND, "DDsMMsYYYYsHHsmmsSS");
-	return t;
-}
-	
-
-TeTime 
-TeOracleSpatialPortal::getDate (const string& s) 
-{ 
-	string	attstr;
-	string  result;
-	TeTime temp;
-
-	string fieldName;
-	size_t pos = s.find(".", string::npos,1);
-	if (pos != string::npos)
-		fieldName = s.substr(pos+1);
-	else
-		fieldName = s;
-
-	attstr = strupr((char*)(fieldName.c_str()));
-	int index = getColumnIndex (attstr);
-	if(index == -1)
-		return temp;
-	else
-		result = getData(index);
-
-	TeTime t(result, TeSECOND, "DDsMMsYYYYsHHsmmsSS") ;
-	return t;
-}
-
-string
-TeOracleSpatialPortal::getDateAsString(int i)
-{
-	TeTime t = this->getDate(i);
-	string date = t.getDateTime ();
-
-	if (!date.empty())
-	{		string tval = " TO_DATE ('"+ date +"','DDsMMsYYYYsHHsmmsSS') ";
-		return tval;
-	}
-	else
-		return "";
-}
-
-string 
-TeOracleSpatialPortal::getDateAsString(const string& s)
-{
-	TeTime t = this->getDate(s);
-	string date = t.getDateTime ();
-
-	if (!date.empty())
-	{		string tval = " TO_DATE ('"+ date +"','DDsMMsYYYYsHHsmmsSS') ";
-		return tval;
-	}
-	else
-		return "";
-}
-
- 
-bool
-TeOracleSpatialPortal::getRasterBlock(unsigned long& size, unsigned char* ptData)
-{
-	// gets the spatial data
-	// expects that the data size will be a block of double maximum
-	unsigned long	len;
-	try
-	{
-		// get the actual length of the compressed data
-		len = getCursor()->SizeBlob();
-		size = len;
-		if(len > 0)
-			getCursor()->ReadBlob(ptData, len);
-	}
-	catch(...)
-	{
-		size = 0;
-		errorMessage_ = "ERRO!";
-		return false;
-	}
-	return true;
-}
-
-string TeOracleSpatial::concatValues(vector<string>& values, const string& unionString)
-{
-	string concat = "";
-	
-	for(unsigned int i = 0; i < values.size(); ++i)
-	{
-		if(i != 0)
-		{
-			concat += " || ";
-
-			if(!unionString.empty())
-			{
-				concat += "'";
-				concat += unionString;
-				concat += "'";
-				concat += " || ";
-			}
-		}
-
-		concat += values[i];
-	}
-
-	return concat;
-}
-
-string TeOracleSpatial::toUpper(const string& value)
-{
-	string result  = "upper(";
-	       result += value;
-		   result += ")";
-
-	return result;
-}
\ No newline at end of file
diff --git a/src/terralib/drivers/OracleSpatial/TeOracleSpatial.h b/src/terralib/drivers/OracleSpatial/TeOracleSpatial.h
deleted file mode 100644
index 9fa3fd8..0000000
--- a/src/terralib/drivers/OracleSpatial/TeOracleSpatial.h
+++ /dev/null
@@ -1,392 +0,0 @@
-/************************************************************************************
-TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The library provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use
-of this library and its documentation.
-*************************************************************************************/
-
-#ifndef  __TERRALIB_INTERNAL_ORACLESPATIAL_H
-#define  __TERRALIB_INTERNAL_ORACLESPATIAL_H
-#if _MSC_VER > 1000
-#pragma once
-#endif 
-
-#include "connect.h"
-#include "cursor.h"
-#include <TeDatabase.h>
-
-#ifndef COMMIT
-#define COMMIT 1
-#define ROLLBACK 2
-#endif
-
-#ifdef AFX_DLL
-#define EXPORT_WIN __declspec( dllexport )
-#else
-#define EXPORT_WIN
-#endif
-
-//SDO_GEOMETRY types  (number of dimensions=2 and LRS=0)
-enum TeSDOGType  
-{ TeSDOUNKNOWN, TeSDOPOINT, TeSDOLINE, TeSDOPOLYGON,TeSDOCOLLECTION, 
-  TeSDOMULTIPOINT, TeSDOMULTILINE, TeSDOMULTIPOLYGON};
-
-//! A concrete implementation of a driver to the Oracle Spatial SGDB
-class EXPORT_WIN TeOracleSpatial : public TeDatabase
-{
-
-friend class TeOracleSpatialPortal;
-
-private:
-
-	//! Inserting geometric table in the metadata table USER_SDO_GEOM_METADATA  
-	bool	insertMetadata(const string &table, const string &column, double tolx,double toly,TeBox &box,short srid=0);
-
-	//! Deleting geometric table in the metadata table USER_SDO_GEOM_METADATA  
-	bool	DeleteMetadata(const string &table, const string &column);
-	
-	//! Create/Rebuild/Delete spatial index
-	bool	createSpatialIndex(const string &table, const string &column,TeSpatialIndexType type= TeRTREE,short level=0,short tile=0);
-	bool	RebuildSpatialIndex(const string &table);
-	bool	DeleteSpatialIndex(const string &table);
-
-	bool	createSequence(const string &seqName);
-	bool	createAutoIncrementTrigger(const string &tableName, const string &fieldName);
-	string	getNameSequence(const string &tableName);
-	string  getNameTrigger(const string &tableName);
-
-	//! Connection to ORACLE database   
-	OCIConnection  *Conn;  
-
-public:
-	
-	TeOracleSpatial();
-
-	~TeOracleSpatial();
-
-
-	string  escapeSequence(const string& from); 
-
-	bool newDatabase(const string& /*database*/, const string& /*user*/, const string& /*password*/, const string& /*host*/, const int& /*port=0*/, bool /*terralibModel=true*/) { return false; }
-
-	bool connect (const string& host, const string& user, const string& password, const string& database, int port = 0);
-
-	void  close();
-
-	bool tableExist(const string& table);
-
-	bool columnExist(const string& table, const string& column, TeAttribute& attr);
-
-	bool createTable (const string& table, TeAttributeList &attr);
-
-	bool addColumn (const string& table,TeAttributeRep &rep);
-
-	bool deleteTable (const string& table);
-
-	bool execute (const string &sql);
-	
-	TeDatabasePortal* getPortal ();
-
-	TeDBRelationType existRelation(const string& tableName, const string& relName);
-
-	bool createRelation (const string& name, const string& table, const string& fieldName, const string& relatedTable, const string& relatedField, bool cascadeDeletion);
-		
-	// --- create metadata tables 
-	bool createViewTable ();
-	
-	bool createThemeTable ();  
-
-	bool createGroupingTable();
-
-	bool createThemeTablesTable();
-
-	bool createLayerTable ();
-
-	bool createLayerTableTable ();
-
-	bool createTablesRelationTable();
-
-	bool createRepresentationTable();
-
-	bool createLegendTable();
-
-	bool createVisualRasterTable();
-
-	bool createVisualTable();
-
-	bool createDatabaseTable();
-	
-	bool createProjectionTable ();
-	
-	bool createRasterMetadataTable(const string& tableName);
-	
-	bool createLUTTable(const string& table);
-	
-	bool createCollectionTable(const string& tableName);
-	// ---
-
-	// --- create geometry tables
-	bool createCellGeometry (const string& table);
- 
-	bool createTextGeometry (const string& table);
-
-	bool createArcGeometry (const string& table);
-
-	bool createNodeGeometry (const string& table);
-
-	bool createRasterGeometry (const string& table);
-
-	bool createRasterTable (const string& tableName);
-
-	bool createPolygonGeometry (const string& table);
-
-	bool createLineGeometry (const string& table);
-
-	bool createPointGeometry (const string& table);
-	// -----
-
-	// ----- Insert/Update/Delete metadata tables
-	bool insertTableInfo (int layerId, TeTable &table, const string& user="");
-	bool insertRelationInfo(const int tableId, const string& tField, const string& rName, const string& rField, int& relId);
-
-	bool insertTable	(TeTable &table);
-	bool updateTable	(TeTable &table);
-	
-	bool insertProjection (TeProjection *proj);
-	
-	bool insertView		(TeView *view);	
-	bool insertViewTree (TeViewTree *tree);	
-
-	bool insertTheme		(TeTheme *theme);
-	bool insertThemeTable	(int themeId, int tableId, int relationId, int tableOrder);
-	bool insertThemeGroup	(TeViewTree* tree);
-	bool generateLabelPositions	(TeTheme *theme); 
-	
-	bool insertLayer	(TeLayer *layer);	
-	bool deleteLayer	(int layerId);
-	
-	bool insertRepresentation (int layerId, TeRepresentation& rep);
-
-	bool insertLegend	(TeLegendEntry *legend);	
-	// ----------------
-
-	// ----- Insert/Update/Delete geometry tables
-	//polygon
-	bool insertPolygon		(const string& table, TePolygon &p);	
-	bool updatePolygon		(const string& table, TePolygon &p);
-	bool locatePolygon		(const string& table, TeCoord2D &pt, TePolygon &polygon, const double& tol = 0.0);
-	
-	bool selectPolygonSet	(const string& table, const string& criteria, TePolygonSet &ps); 
-	bool loadPolygonSet		(const string& table, const string& geoid, TePolygonSet &ps);  
-	bool loadPolygonSet		(const string& table, TeBox &box, TePolygonSet &ps); 
-	bool loadPolygonSet		(TeTheme* theme, TePolygonSet &ps); 
-	TeDatabasePortal*		loadPolygonSet(const string& table, TeBox &box); 
-	
-	bool AllocateOrdinatesObject(TePolygon &poly, string& elInfo, OCICursor* cursor=0);
-	
-	//line
-	bool insertLine		(const string& table, TeLine2D &l);		
-	bool updateLine		(const string& table, TeLine2D &l);
-	bool locateLine		(const string& table, TeCoord2D &pt, TeLine2D &line, const double& tol = 0.0);
-
-	bool loadLineSet	(const string& table, const string& geoid, TeLineSet &ls); 
-	bool loadLineSet	(const string& table, TeBox &box, TeLineSet &linSet); 
-	TeDatabasePortal*   loadLineSet (const string& table, TeBox &box);
-	
-	bool AllocateOrdinatesObject(TeLine2D &line, OCICursor* cursor=0);
-			
-    //point
-	bool insertPoint	(const string& table, TePoint &p);	
-	bool updatePoint	(const string& table, TePoint &p);
-	bool locatePoint	(const string& table, TeCoord2D &pt, TePoint &point, const double& tol = 0.0);
-    
-	//text
-	bool insertText		(const string& table, TeText &t);	
-
-	//arc
-	bool insertArc		(const string& table,TeArc &arc);
-
-	//node
-	bool insertNode		(const string& table, TeNode &node);	
-	bool updateNode		(const string& table, TeNode &node);	
-
-	//cell
-	bool insertCell		(const string& table, TeCell &c);
-	bool updateCell		(const string& table, TeCell &c);
-	bool locateCell		(const string& table, TeCoord2D &pt, TeCell &cell, const double& tol = 0.0);
-	
-	//raster
-	bool insertRasterBlock(const string& table, const string& blockId, const TeCoord2D& ll, const TeCoord2D& ur, unsigned char *buf,unsigned long size, int band=0, unsigned int res=1, unsigned int subband=0);
-	// ----------
-
-	// ----- blob
-	bool insertBlob (const string& tableName, const string& columnBlob, TeAttributeRep& columnId, const string& valueId, unsigned char* data, int size);
-	bool insertBlob (const string& tableName, const string& columnBlob, TeAttributeRep& columnId, const string& valueId, const string& fileName);
-	// -----
-	
-	//---------- SQLs
-	string getSQLBoxWhere (TeBox &box, TeGeomRep rep); 
-	
-	string getSQLBoxWhere (const string& table1, const string& table2, TeGeomRep rep2, TeGeomRep rep1); 
-	
-	string getSQLBoxSelect (const string& tableName, TeGeomRep rep); 
-
-	string getSQLStatistics (TeGroupingAttr& attrs);
-
-	string  getSQLAutoNumber(const string& table);
-	// ------
-	
-	bool getMBRSelectedObjects(string geomTable,string colGeom, string fromClause, string whereClause, string afterWhereClause, TeGeomRep repType,TeBox &bout, const double& tol = 0.0);
-
-	bool dropConceptualModel();
-	
-	bool getMBRGeom(string tableGeom, string object_id, TeBox& box, string colGeom);
-
-	//Spatial query
-	//spatial relate between a set of geometry of the table actTable and all other geometry 
-	//return a portal
-	bool spatialRelation(const string& actGeomTable, TeGeomRep actRep, Keys& actIdsIn, TeDatabasePortal *portal, int relate, const string& actCollTable="");
-	bool spatialRelation(const string& actGeomTable, TeGeomRep actRep, Keys& actIdsIn, const string& visGeomTable, TeGeomRep visRep, TeDatabasePortal *portal, int relate, const string& visCollTable=""); 
-	bool spatialRelation(const string& actGeomTable, TeGeomRep actRep, TeGeometry* geom, TeDatabasePortal *portal, int relate, const string& actCollTable=""); 
-	
-	//spatial relate between a set of geometry of the table actTable and all other geometry 
-	//return a object_id vector
-	bool spatialRelation(const string& actGeomTable, TeGeomRep actRep, Keys& actIdsIn, Keys& actIdsOut, int relate, const string& actCollTable="");
-	bool spatialRelation(const string& actGeomTable, TeGeomRep actRep, Keys& actIdsIn, const string& visGeomTable, TeGeomRep visRep, Keys& visIdsOut, int relate, const string& visCollTable=""); 
-	bool spatialRelation(const string& actGeomTable, TeGeomRep actRep, TeGeometry* geom, Keys& actIdsOut, int relate, const string& actCollTable=""); 
-	
-	//metric functions
-	bool calculateArea(const string& actGeomTable, TeGeomRep actRep, Keys& actIdsOut, double &area);
-	bool calculateLength(const string& actGeomTable, TeGeomRep actRep, Keys& actIdsIn, double &length);
-	
-	bool calculateDistance(const string& actGeomTable, TeGeomRep actRep, Keys& Ids, double& distance);
-	bool calculateDistance(const string& actGeomTable, TeGeomRep actRep, const string& objId1, const string& visGeomTable, TeGeomRep visRep, const string& objId2, double& distance);
-
-	//fazer para TeGeometry*
-	//bool withinDistance(const string& actGeomTable, TeGeomRep actRep, const TeCoord2D& point, KeysToDist& IdsDistOut, const double& max_distance, const string& actCollTable="");
-
-	// functions that generate new geometry
-	bool Buffer(const string& actGeomTable, TeGeomRep actRep, Keys& actIds, TePolygonSet& bufferSet, double dist);
-	bool ConvexHull(const string& actGeomTable, TeGeomRep actRep, Keys& actIds, TePolygonSet& convexHullSet);
-	bool Centroid(const string&  actGeomTable , TeGeomRep actRep, TePointSet& centroidSet, Keys actIds = vector<string>(), const string& actCollTable = "");
-
-	//return the objects identificators of the nearest neighbors  
-	bool nearestNeighbors(const string& actGeomTable, const string& actCollTable, TeGeomRep actRep, const string& objId1, Keys& actIdsOut, int numRes=1);
-	bool nearestNeighbors(const string& actGeomTable, TeGeomRep actRep, const string& objId1, const string& visGeomTable, const string& visCollTable, TeGeomRep visRep, Keys& visIdsOut, int numRes=1); 
-
-	//return a portal with the nearest neighbors
-	bool nearestNeighbors(const string& actGeomTable, const string& actCollTable, TeGeomRep actRep, const string& objId1, TeDatabasePortal* portal, int numRes=1);
-	bool nearestNeighbors(const string& actGeomTable, TeGeomRep actRep, const string& objId1, const string& visGeomTable, const string& visCollTable, TeGeomRep visRep, TeDatabasePortal* portal, int numRes=1); 
-
-	bool geomIntersection(const string& actGeomTable, TeGeomRep actRep, Keys& actIds, TeGeometryVect& geomVect);
-	bool geomIntersection(const string& actGeomTable, TeGeomRep actRep, const string& objId1, const string& visGeomTable, TeGeomRep visRep, const string& objId2, TeGeometryVect& geomVect);
-
-	bool geomDifference(const string& actGeomTable, TeGeomRep actRep, const string& objId1, const string& objId2, TeGeometryVect& geomVect);
-	bool geomDifference(const string& actGeomTable, TeGeomRep actRep, const string& objId1, const string& visGeomTable, TeGeomRep visRep, const string& objId2, TeGeometryVect& geomVect);
-
-	bool geomUnion(const string& actGeomTable, TeGeomRep actRep, Keys& actIds, TeGeometryVect& geomVect);
-	bool geomUnion(const string& actGeomTable, TeGeomRep actRep, const string& objId1, const string& visGeomTable, TeGeomRep visRep, const string& objId2, TeGeometryVect& geomVect);
-
-	bool geomXOr(const string& actGeomTable, TeGeomRep actRep, const string& objId1, const string& objId2, TeGeometryVect& geomVect);
-	bool geomXOr(const string& actGeomTable, TeGeomRep actRep, const string& objId1, const string& visGeomTable, TeGeomRep visRep, const string& objId2, TeGeometryVect& geomVect);	
-
-	//! Concat values in a vector using unionString as the join between each value
-	string concatValues(vector<string>& values, const string& unionString);
-
-	//! Returns the SQL function for upper case
-	string toUpper(const string& value);
-	
-};
-
-//! A concrete implementation of a portal to a Oracle Spatial database
-class EXPORT_WIN TeOracleSpatialPortal : public TeDatabasePortal
-{
-private:
-	OCICursor		*cursor;
-	string		Value_;
-	long		curRow_;
-
-    bool isConnected ();
-    bool isEOF();
-
-	
-public:
-
-	TeOracleSpatialPortal(TeOracleSpatial *pDatabase);
-	~TeOracleSpatialPortal();
-
-	OCICursor*	getCursor() { return cursor; }
-
-    //! Move operations
-	bool moveFirst();
-    bool moveNext();
-
-	bool query ( const string &q,TeCursorLocation l = TeSERVERSIDE, TeCursorType t = TeUNIDIRECTIONAL, TeCursorEditType e = TeREADONLY, TeCursorDataType dt = TeTEXTCURSOR );
-	bool querySDO (const string &q);
-	
-	bool fetchRow ();
-	bool fetchRow (int i);
-
-	void freeResult ();
-
-	char* getData (int i);
-	char* getData (const string& s);
-
-	double getDouble (int i);
-	double getDouble (const string& s);
-	int	getInt (int i);
-	int	getInt (const string& s);
-
-	bool getBool (const string& s);
-	bool getBool (int i);
-
-	bool getGeometry (TeGeometry** geom, bool& result);
-	bool fetchGeometry (TePolygon& poly);
-	bool fetchGeometry (TePolygonSet& polySet);
-	bool fetchGeometry (TeLine2D& line);
-	bool fetchGeometry (TeLineSet& lineSet);
-	bool fetchGeometry (TeNode& n);
-	bool fetchGeometry (TePoint& p);
-	bool fetchGeometry (TePointSet& pointSet);
-	bool fetchGeometry (TeCell& cell);
-	
-	bool getRasterBlock(unsigned long& size, unsigned char*);
-	
-	bool getBlob(const string& s, unsigned char* &data, long& size);
-		
-	TeTime getDate (int i);
-	TeTime getDate (const string& s);
-
-	string getDateAsString(int i);
-	string getDateAsString(const string& s);
-
-	//! Oci geometry methods: Get SDO_GEOMETRY informations   
-	int			GetDimArraySize();
-	bool		GetDimElement(int i,int &elem);
-	int			NumberOfOrdinates();
-	bool		GetCoordinates(int i,TeCoord2D& coord);
-	bool		GetGeometryType(TeSDOGType& gType);
-	int			GetSpatialReferenceId();
-	bool		GetPointXYZ (double& x,double& y);
-};
-
-#endif 
-
-
-
diff --git a/src/terralib/drivers/OracleSpatial/connect.cpp b/src/terralib/drivers/OracleSpatial/connect.cpp
deleted file mode 100644
index 4187f64..0000000
--- a/src/terralib/drivers/OracleSpatial/connect.cpp
+++ /dev/null
@@ -1,425 +0,0 @@
-/************************************************************************************
-TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The library provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use
-of this library and its documentation.
-*************************************************************************************/
-
-
-#include "connect.h"
-#include "sdo_oci.h"
-
-
-OCIConnection::OCIConnection() 
-{
-	connected = false;
-
-	envhp = 0;
-	errhp = 0;
-	srvhp = 0;
-	svchp = 0;
-	usrhp = 0;
-	txnhp = 0;
-	stmthp = 0;
-	tdo_geometry = 0;
-	tdo_ordinates = 0;
-	ordinates = 0;
-}
-
-
-bool OCIConnection::Connect(const char* dblink, const char* username, const char* password) 
-{
-	sword status;
-
-	int mode = OCI_THREADED|OCI_OBJECT;
-	
-
-	//create and initialize the environment
-	status = SDO_OCIEnvCreate(&envhp, (ub4)mode, (dvoid *)0, 
-				      (dvoid*(*)(dvoid *ctxp, size_t size))0, 
-				      (dvoid*(*)(dvoid *ctxp, dvoid *memptr, size_t newsize))0, 
-				      (void (*)(dvoid *ctxp, dvoid *memptr))0, 
-					  (size_t)0, (dvoid**)0);
-	if(!CheckError(errhp, status))
-		return false;
-
-	// Allocate handles - errhp(OCIError) and srvhp (OCIServer)
-	status = SDO_OCIHandleAlloc((dvoid*)envhp, (dvoid**)&errhp, (ub4)OCI_HTYPE_ERROR,
-					   (size_t)0, (dvoid**)0);
-	if(!CheckError(errhp, status))
-		return false;
-
-	status = SDO_OCIHandleAlloc((dvoid*)envhp, (dvoid**)&srvhp, (ub4)OCI_HTYPE_SERVER,
-					   (size_t)0, (dvoid**)0);
-	if(!CheckError(errhp, status))
-		return false;
-
-	// Multiple Sessions or Connections
-	status = SDO_OCIServerAttach(srvhp, errhp, (text*)dblink, 
-						 (sb4)strlen(dblink), (ub4)OCI_DEFAULT);
-	if(!CheckError(errhp, status))
-		return false;
-
-	// Allocate handles: svchp(OCISvcCtx)
-	status = SDO_OCIHandleAlloc((dvoid*)envhp, (dvoid**)&svchp, (ub4)OCI_HTYPE_SVCCTX, 
-					   (size_t)0, (dvoid**)0);
-	if(!CheckError(errhp, status))
-		return false;
-
-	// Set the server attribute in the service context handle
-	status = SDO_OCIAttrSet((dvoid*)svchp, (ub4)OCI_HTYPE_SVCCTX, (dvoid*)srvhp, (ub4)0, 
-				   (ub4)OCI_ATTR_SERVER, errhp);
-	if(!CheckError(errhp, status))
-		return false;
-
-	/// Allocate a user session handle
-	status = SDO_OCIHandleAlloc((dvoid*)envhp, (dvoid**)&usrhp, (ub4)OCI_HTYPE_SESSION, 
-					   (size_t)0, (dvoid**)0);
-	if(!CheckError(errhp, status))
-		return false;
-
-	// set user name attribute in user session handle 
-	status = SDO_OCIAttrSet((dvoid*)usrhp, (ub4)OCI_HTYPE_SESSION, (dvoid*)username, 
-				   (ub4)strlen(username), (ub4)OCI_ATTR_USERNAME, errhp);
-	if(!CheckError(errhp, status))
-		return false;
-	
-	// set password attribute in user session handle
-	status = SDO_OCIAttrSet((dvoid*)usrhp, (ub4)OCI_HTYPE_SESSION, (dvoid*)password, 
-				   (ub4)strlen(password), (ub4)OCI_ATTR_PASSWORD, errhp);
-	if(!CheckError(errhp, status))
-		return false;
-
-	// Session begins - establishes a session for a user against a particular
-	// server. This call is required for the user to execute operations on the server.
-	status = SDO_OCISessionBegin(svchp, errhp, usrhp, OCI_CRED_RDBMS, 
-								 OCI_DEFAULT);
-	if(!CheckError(errhp, status))
-		return false;
-
-	// set the user session attribute in the service context handle
-	status = SDO_OCIAttrSet((dvoid*)svchp, (ub4)OCI_HTYPE_SVCCTX, (dvoid*)usrhp, (ub4)0, 
-				   (ub4)OCI_ATTR_SESSION, errhp);
-	if(!CheckError(errhp, status))
-		return false;
-
-	// allocate transaction handle 1 and set it in the service handle (OCITrans)
-	status = OCIHandleAlloc((dvoid *)envhp, (dvoid **)&txnhp, OCI_HTYPE_TRANS, 0, 0);
-	if(!CheckError(errhp, status))
-		return false;
-
-	status = OCIAttrSet((dvoid *)svchp, OCI_HTYPE_SVCCTX, (dvoid *)txnhp, 0,OCI_ATTR_TRANS, errhp);
-	if(!CheckError(errhp, status))
-		return false;
-
-	// locate stmthp
-	status = SDO_OCIHandleAlloc((dvoid*)envhp, (dvoid**)&stmthp, 
-								  (ub4)OCI_HTYPE_STMT, (size_t)0, (dvoid**)0);
-	if(!CheckError(errhp, status))
-		return false;
-
-	//load the tdo type to sdo_geometry (OCIType)
-	status = OCITypeByName(envhp, errhp, svchp, (const text *)
-			"MDSYS", (ub4) strlen((char *)"MDSYS"),
-			(const text *) "SDO_GEOMETRY",	(ub4) strlen((char *)"SDO_GEOMETRY"),
-			(text *)0, 0, OCI_DURATION_SESSION, OCI_TYPEGET_HEADER, &tdo_geometry);
-	if(!CheckError(errhp, status))
-		return false;
-
-	//load the tdo type to sdo_ordinates (OCIType)
-	status = OCITypeByName(envhp, errhp, svchp, (const text *)
-			"MDSYS", (ub4) strlen((char *)"MDSYS"),
-			(const text *) "SDO_ORDINATE_ARRAY", (ub4) strlen((char *)"SDO_ORDINATE_ARRAY"),
-			(text *)0, 0, OCI_DURATION_SESSION, OCI_TYPEGET_HEADER, &tdo_ordinates);
-	if(!CheckError(errhp, status))
-		return false;
-
-	connected = true;
-	return true;
-}
-
-
-void OCIConnection::Disconnect()  
-{
-	// Session ends
-	SDO_OCISessionEnd(svchp, errhp, usrhp, (ub4)OCI_DEFAULT);
-	SDO_OCIServerDetach(srvhp, errhp, (ub4)OCI_DEFAULT);
-
-	// Finalize svchp, srvhp, errhp and stmthp
-	SDO_OCIHandleFree((dvoid*)txnhp, (ub4)OCI_HTYPE_TRANS);
-	SDO_OCIHandleFree((dvoid*)srvhp, (ub4)OCI_HTYPE_SERVER);
-	SDO_OCIHandleFree((dvoid*)svchp, (ub4)OCI_HTYPE_SVCCTX);
-	SDO_OCIHandleFree((dvoid*)errhp, (ub4)OCI_HTYPE_ERROR);
-	SDO_OCIHandleFree((dvoid*)usrhp, (ub4)OCI_HTYPE_SESSION);
-	SDO_OCIHandleFree((dvoid*)stmthp, (ub4)OCI_HTYPE_STMT);
-
-	connected = false;		
-	envhp = 0;
-	errhp = 0;
-	srvhp = 0;
-	svchp = 0;
-	usrhp = 0;
-	txnhp = 0;
-	tdo_geometry = 0;
-	tdo_ordinates = 0;
-	ordinates = 0;
-	stmthp = 0;
-}
-
-
-bool OCIConnection::Prepare(const string& stmt)
-{	
-	if (!connected)
-		return false;
-	
-	ub4 size = stmt.size();
-	sword status = SDO_OCIStmtPrepare(svchp, (OCIStmt *)stmthp, errhp, (text*)stmt.c_str(), (ub4)size,  
-		(text*)0, (ub4)0, (ub4)OCI_NTV_SYNTAX, (ub4)OCI_DEFAULT);
-	if(!CheckError(errhp, status))
-		return false;
-
-	return true;
-}
-
-
-bool OCIConnection::BindByPos(int pos, void* value, int size, void* indicator, int type)
-{
-	if (!connected)
-		return false;
-
-	OCIBind *bindp = NULL;
-
-	sword status = SDO_OCIBindByPos(stmthp, &bindp, errhp, pos, (dvoid *)value, 
-								(sb4)size, type, (dvoid *)indicator, (ub2 *)0, 
-								(ub2 *)0, (ub4)0, (ub4 *)0, (ub4)OCI_DEFAULT);
-	if(!CheckError(errhp, status))
-		return false;
-	return true;
-}
-
-
-bool OCIConnection::BindByName(char* name, void* value, int size, void* indicator, int type)
-{
-	if (!connected)
-		return false;
-
-	OCIBind *bindp = NULL;
-	sword status = SDO_OCIBindByName(stmthp, &bindp, errhp, (text*)name, 
-								 (sb4)-1, (dvoid *)value, (sb4)size, type, 
-								 (dvoid *)indicator, (ub2 *)0, (ub2 *)0, 
-								 (ub4)0, (ub4 *)0, (ub4)OCI_DEFAULT);
-	if(!CheckError(errhp, status))
-		return false;
-	return true;
-}
-
-bool OCIConnection::BindOrdinates()
-{
-	OCIBind		*bnd1p = NULL;
-	
-	/* bind coordinate varray object */
-	sword status = OCIBindByName(stmthp, &bnd1p, errhp, 
-	    (text *)":ordinates", (sb4)-1, (dvoid *)0, (sb4)0, SQLT_NTY, (dvoid *)0, 
-		(ub2 *)0, (ub2 *)0, (ub4)0, (ub4 *)0, (ub4)OCI_DEFAULT);
-	if(!CheckError(errhp, status))
-		return false;
-
-	status = OCIBindObject(bnd1p, errhp, tdo_ordinates, (dvoid **)&ordinates, (ub4 *)0, 
-	    (dvoid **)0, (ub4 *)0);
-	if(!CheckError(errhp, status))
-		return false;
-
-	return true;
-}
-
-
-int OCIConnection::QueryType()  
-{	
-	ub2 querytype_;
-		
-	sword status = OCIAttrGet((dvoid *)stmthp, (ub4)OCI_HTYPE_STMT, (ub2 *)&querytype_,
-	(ub4*)NULL, (ub4)OCI_ATTR_STMT_TYPE, (OCIError *)errhp);
-	if(!CheckError(errhp, status))
-		return -1;
-	return (querytype_);
-}
-
-
-bool OCIConnection::AllocateObjectOrdinates()
-{
-	sword status = SDO_OCIObjectNew(envhp, errhp, svchp, OCI_TYPECODE_VARRAY, tdo_ordinates, (dvoid*)NULL, 
-					OCI_DURATION_SESSION, TRUE, (dvoid**)&ordinates);
-
-	if(!CheckError(errhp, status))
-		return false;
-
-	return true;
-}
-
-
-bool OCIConnection::AppendOrdinates(const double& val)
-{
-	
-	OCINumber	oci_number;
-	sword       status;
-	
-	status = OCINumberFromReal(errhp, (dvoid *)&(val), 
-		(uword)sizeof(double),&oci_number);
-
-	status = OCICollAppend(envhp, errhp, 
-		(dvoid *) &oci_number,
-		(dvoid *)0, (OCIColl *)ordinates);
-
-	if(!CheckError(errhp, status))
-		return false;
-
-	return true;
-}
-
-bool OCIConnection::TransStart()
-{
-	sword status = OCITransStart (svchp, errhp, 60, OCI_TRANS_NEW); 
-	if(!CheckError(errhp, status))
-		return false;
-
-	return true;
-}
-
-bool OCIConnection::TransRollback()
-{
-	sword status = OCITransRollback(svchp, errhp, (ub4) 0);
-	if(!CheckError(errhp, status))
-		return false;
-
-	return true;
-}
-
-bool OCIConnection::TransCommit()
-{
-	sword status = OCITransCommit(svchp, errhp, (ub4) 0);
-	if(!CheckError(errhp, status))
-		return false;
-
-	return true;
-}
-
-bool OCIConnection::Execute(const string& stm)
-{
-	if(!Prepare(stm))
-		return false;
-	
-	if ((QueryType()<0) || (QueryType()==1))
-		return false;  //return records (query)
-	
-	TransStart();
-	sword status = OCIStmtExecute(svchp, stmthp, errhp, (ub4)1, (ub4)0, (OCISnapshot *)NULL, 
-								  (OCISnapshot *)NULL, (ub4)OCI_DEFAULT);
-	
-	if(!CheckError(errhp, status))
-	{
-		TransRollback();
-		return false;
-	}
-
-	TransCommit();
-	return true; 
-}
-
-
-bool OCIConnection::ExecuteSDOSTM(const string& stm)  
-{
-	if(!Prepare(stm))
-		return false;
-
-	if(!BindOrdinates())
-		return false;
-
-	if((QueryType()<0) || (QueryType()==1))
-		return false;  //return records (query)
-		
-	TransStart();
-	sword status = OCIStmtExecute(svchp, stmthp, errhp, (ub4)1, (ub4)0, (OCISnapshot *)NULL, 
-								  (OCISnapshot *)NULL, (ub4)OCI_DEFAULT);
-	
-	if(!CheckError(errhp, status))
-	{		
-		OCIObjectFree(envhp, errhp, (dvoid *)ordinates, (ub2)OCI_OBJECTFREE_FORCE);
-		TransRollback();
-		return false;
-	}
-
-	TransCommit();
-	OCIObjectFree(envhp, errhp, (dvoid *)ordinates, (ub2)OCI_OBJECTFREE_FORCE);
-	return true; 
-}
-
-
-bool OCIConnection::CheckError(OCIError* errhp, int status) 
-{
-	char errbuf[512];
-	sb4 errcode = 0;
-	bool returnedVal = false;
-		
-	if (status == OCI_ERROR)
-	{
-		SDO_OCIErrorGet((dvoid*)errhp, (ub4)1, (text*)NULL, &errcode, 
-						(text*)errbuf, (ub4)sizeof(errbuf), OCI_HTYPE_ERROR);
-		errorMess = errbuf;
-		return false;
-	}
-
-	switch (status)
-	{ 
-		case OCI_SUCCESS:
-			errorMess = "Success!";
-			returnedVal = true;
-			break;
-
-		case OCI_SUCCESS_WITH_INFO:
-			errorMess = "Success with information!";
-			returnedVal = true;
-			break;
-
-		case OCI_NEED_DATA:
-			errorMess = "Need data!";
-			break;
-		
-		case OCI_NO_DATA:
-			errorMess = "No data!";
-			break;
-
-		//An invalid handle was passed as a parameter or a user callback is passed an
-		//invalid handle or invalid context. No further diagnostics are available.
-		case OCI_INVALID_HANDLE:
-			errorMess = "Invalid handle!";
-			break;
-
-		case OCI_STILL_EXECUTING:
-			errorMess = "Still executing!";
-			break;
-
-		case OCI_CONTINUE:
-			errorMess = "Continue!";
-			break;
-		default:
-			break;
-	}
-
-	return returnedVal;
-}
diff --git a/src/terralib/drivers/OracleSpatial/connect.h b/src/terralib/drivers/OracleSpatial/connect.h
deleted file mode 100644
index 14108f9..0000000
--- a/src/terralib/drivers/OracleSpatial/connect.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/************************************************************************************
-TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The library provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use
-of this library and its documentation.
-*************************************************************************************/
-
-#ifndef CONNECT_H
-#define CONNECT_H
-
-#include <oci.h>
-#include <string>
-
-using namespace std;
-
-//! This class represents a connection to ORACLE database.
-class OCIConnection
-{
-protected:
-	bool	     connected;		// if it is connected or not
-	string       errorMess;		// error message
-
-public:
-	// OCI connection handles
-	OCIEnv*			envhp;  //environment handle - ambiente       
-	OCIError*		errhp;	//environment handle - error handle
-
-	OCIServer*		srvhp;	//service context handle - identifica uma conexao com o banco
-	OCISvcCtx*		svchp;	//service context handle
-	OCISession*		usrhp;	//service context handle - define as permissoes e privilegios dos usuarios 
-	OCITrans*		txnhp;	//service context handle - transacao
-
-	OCIStmt*		stmthp;		// environment handle - statement handle
-
-	OCIType*		tdo_geometry; 	//describe the sdo_geometry type 
-	OCIType*		tdo_ordinates;  //describe the sdo_ordinates type 
-	OCIArray*		ordinates;		//store the ordinates to insert into database (bind)	
-
-public:
-	
-	//! Connection constructor
-	OCIConnection();
-
-	//! Connection destructor
-	~OCIConnection() { Disconnect(); }
-
-	//! Connect to ORACLE
-	bool Connect(const char* dblink, const char* username, const char* password);
-
-	//! Disconnect to ORACLE
-	void Disconnect();
-
-	//! Prepare the statement to be executed
-	bool Prepare(const string& stmt);
-
-	//! Bind
-	bool BindByPos(int pos, void* value, int size, void* indicator, int type);
-	bool BindByName(char* name, void* value, int size, void* indicator, int type);
-	bool BindOrdinates();
-
-	//! Append ordinates to be inserted or updated
-	bool AppendOrdinates(const double& val);
-
-	//! Locate memory to ordinates 
-	bool AllocateObjectOrdinates();
-
-	//! Return query type 
-	int	QueryType(void);
-
-	//! Starts a transaction 
-	bool TransStart();
-
-	//! Returns a transaction
-	bool TransRollback();
-
-	//! Commits a transaction
-	bool TransCommit();
-	
-	//! Execute only commands that do not return rows (INSERT, UPDATE, DELETE, etc)
-	bool Execute(const string& stm);
-	
-	//! Execute only commands that insert or update rows with SDO Objects 
-	bool ExecuteSDOSTM(const string& stm);
-
-	//! Check if there is an opened conection
-	bool IsConnected() { return connected; }
-
-	//! Check OCI error
-	bool CheckError(OCIError* errhp, int status);
-
-	//! Gets the error message
-	string getErrorMessage() { return errorMess; }
-};
-
-#endif
diff --git a/src/terralib/drivers/OracleSpatial/cursor.cpp b/src/terralib/drivers/OracleSpatial/cursor.cpp
deleted file mode 100644
index fae9b56..0000000
--- a/src/terralib/drivers/OracleSpatial/cursor.cpp
+++ /dev/null
@@ -1,1172 +0,0 @@
-/************************************************************************************
-TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The library provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use
-of this library and its documentation.
-*************************************************************************************/
-
-
-#include "cursor.h"
-#include "sdo_oci.h"
-#include "TeUtils.h"
-
-
-//Given a string, remove all blanks and tabs (rigth)
-char* StrClean(char *name)
-{
-    int j;
-	
-	if ((name == NULL)) /*SGError.Handler(NULLPOINTER,FATAL);*/ 
-		return 0;
-
-	for (j = strlen(name)-1; j>=0; j--)
-	{
-		if ( !((name[j]==' ') || (name[j]=='\t') || (name[j]== '\0')) ) 
-			break;
-	}
-	
-	name[j+1] = '\0';
-
-	return name;
-}
-
-
-OCICursor::OCICursor(OCIConnection* connec)
-{
-	int i;
-	conn = connec;
-	stmthpToQuery = NULL;
-	dschp = NULL;
-	fieldValue = "";
-	ordinates = 0;
-
-	isOpen_ = false;
-	for(i=0;i<MAX_ROWS;i++)
-	{
-		global_geom_obj[i] = NULL;
-		global_geom_ind[i] = NULL;
-		lobp[i] = NULL; 
-	}
-	
-	row_Index = -1;
-	rows_Fetched = 0;
-	rows_Mem = 0;
-	row_Cur = -1;
-	last_Row = false;
-	errorMessage = "";
-	numColls_ = -1;
-}
-
-bool OCICursor::Open()  
-{
-	
-	sword status;
-	if(isOpen_)
-		this->Close();
-	
-	isOpen_ = false;
-
-	// Initialize statement handle 
-	status = SDO_OCIHandleAlloc((dvoid*)conn->envhp, (dvoid**)&stmthpToQuery, 
-								  (ub4)OCI_HTYPE_STMT, (size_t)0, (dvoid**)0);
-	if(!CheckError(status))
-		return false;
-	
-	// describe spatial object types (OCIDescribe)
-	status = SDO_OCIHandleAlloc((dvoid*)conn->envhp, (dvoid**)&dschp, 
-								(ub4)OCI_HTYPE_DESCRIBE, (size_t)0, (dvoid **)0);
-	if(!CheckError(status))
-		return false;
-
-	status = SDO_OCIObjectNew(conn->envhp, conn->errhp, conn->svchp, OCI_TYPECODE_VARRAY, 
-					conn->tdo_ordinates, (dvoid*)NULL, OCI_DURATION_SESSION, TRUE, 
-					(dvoid**)&ordinates);
-
-	if(!CheckError(status))
-		return false;
-
-	isOpen_ = true;
-	return true;
-}
-
-void OCICursor::Close()
-{
-	// Finalize stmthpToQuery and dschp
-	if(isOpen_)
-	{
-		SDO_OCIHandleFree((dvoid *)stmthpToQuery, (ub4)OCI_HTYPE_STMT);
-		SDO_OCIHandleFree((dvoid*)dschp, (ub4)OCI_HTYPE_DESCRIBE);
-		FreeResult();
-		isOpen_ = false;
-	}
-	numColls_ = -1;
-	stmthpToQuery = NULL;
-	dschp = NULL;
-}
-
-void OCICursor::FreeResult()
-{	
-	int i;
-	if(global_geom_obj)
-	{
-		for(i=0;i<rows_Mem;i++)  // O que est� em mem�ria ou max rows??????
-		{
-		/// free the spatial object instance 
-			CheckError(OCIObjectFree(conn->envhp, conn->errhp, (dvoid *)global_geom_obj[i], 
-				   (ub2)OCI_OBJECTFREE_FORCE));
-
-			global_geom_obj[i] = NULL;
-			global_geom_ind[i] = NULL;
-		}
-	}
-
-	if (lobp)
-	{
-		for(i=0;i<MAX_ROWS;i++)
-		{
-			CheckError(OCIDescriptorFree((dvoid *) lobp, (ub4) OCI_DTYPE_LOB));
-			lobp[i] = NULL;
-		}
-	}
-
-	OCIObjectFree(conn->envhp, conn->errhp, (dvoid *)ordinates, (ub2)OCI_OBJECTFREE_FORCE);
-	ordinates = 0;
-
-	vector<void *>::iterator itb = buffers.begin();
-	for (itb; itb!=buffers.end(); itb++)
-		delete(*(itb));
-	
-	buffers.clear();
-	defines.clear(); // ver se o freestmtp desaloca os OCIDefines 
-	ind.clear();
-	colType_.clear();
-	colSize_.clear();
-	colScale_.clear();
-	colName_.clear();
-	numColls_ = -1;
-}
-
-
-void OCICursor::DefineByPos(int pos, void* value, int size, void* indicator, 
-						 int type)
-{
-	OCIDefine *defnp = NULL;
-
-	CheckError(SDO_OCIDefineByPos(stmthpToQuery, &defnp, conn->errhp, (ub4)pos, 
-								  (dvoid *)value, (sb4)size, type, 
-								  (dvoid *)indicator, (ub2 *)0, (ub2 *)0,
-								  (ub4)OCI_DEFAULT));
-}
-
-
-bool OCICursor::Fetch(int rows)
-{
-	sword status;
-	status = OCIStmtFetch(stmthpToQuery, conn->errhp, (ub4) rows, (ub4) OCI_FETCH_NEXT,
-                               (ub4) OCI_DEFAULT);
-
-	CheckError(status);
-
-	if (status == OCI_SUCCESS || status == OCI_SUCCESS_WITH_INFO)
-		return true;
-	else
-		return false;
-
-}
-
-bool OCICursor::AppendOrdinates(const double& val)
-{
-	
-	OCINumber	oci_number;
-	sword       status;
-
-	if(!ordinates)
-	{
-		status = SDO_OCIObjectNew(conn->envhp, conn->errhp, conn->svchp, OCI_TYPECODE_VARRAY, 
-					conn->tdo_ordinates, (dvoid*)NULL, OCI_DURATION_SESSION, TRUE, 
-					(dvoid**)&ordinates);
-
-		if(!CheckError(status))
-			return false;
-	}
-	
-	status = OCINumberFromReal(conn->errhp, (dvoid *)&(val), 
-		(uword)sizeof(double),&oci_number);
-
-	status = OCICollAppend(conn->envhp, conn->errhp, 
-		(dvoid *) &oci_number,
-		(dvoid *)0, (OCIColl *)ordinates);
-
-	if(!CheckError(status))
-		return false;
-
-	return true;
-}
-
-bool OCICursor::BindOrdinates()
-{
-	OCIBind		*bnd1p = NULL;
-	sword		status; 
-
-	if(!ordinates)
-	{
-		status = SDO_OCIObjectNew(conn->envhp, conn->errhp, conn->svchp, OCI_TYPECODE_VARRAY, 
-					conn->tdo_ordinates, (dvoid*)NULL, OCI_DURATION_SESSION, TRUE, 
-					(dvoid**)&ordinates);
-
-		if(!CheckError(status))
-			return false;
-	}
-	
-	/* bind coordinate varray object */
-	status = OCIBindByName(stmthpToQuery, &bnd1p, conn->errhp, 
-	    (text *)":ordinates", (sb4)-1, (dvoid *)0, (sb4)0, SQLT_NTY, (dvoid *)0, 
-		(ub2 *)0, (ub2 *)0, (ub4)0, (ub4 *)0, (ub4)OCI_DEFAULT);
-	if(!CheckError(status))
-		return false;
-
-	status = OCIBindObject(bnd1p, conn->errhp, conn->tdo_ordinates, (dvoid **)&ordinates, (ub4 *)0, 
-	    (dvoid **)0, (ub4 *)0);
-	if(!CheckError(status))
-		return false;
-
-	return true;
-}
-
-bool OCICursor::MoveFirst()
-{
-	// this is for scroolable cursor
-	sword status = OCIStmtFetch2(stmthpToQuery, conn->errhp, (ub4)MAX_ROWS, OCI_FETCH_FIRST, (sb4) 0, OCI_DEFAULT);
-
-	if (status == OCI_SUCCESS || status == OCI_SUCCESS_WITH_INFO  || status == OCI_NO_DATA)
-	{
-		OCIAttrGet((dvoid *)stmthpToQuery, (ub4)OCI_HTYPE_STMT,
-			     (dvoid *)&rows_Fetched, (ub4 *)0, 
-			     (ub4)OCI_ATTR_ROW_COUNT, conn->errhp);
-
-		if(!rows_Fetched)  
-			return false;
-
-		if(status == OCI_NO_DATA)
-			last_Row = true;
-
-		row_Index = 0;
-
-		if(rows_Fetched < MAX_ROWS)  
-			rows_Mem = rows_Fetched;
-		else
-			rows_Mem = MAX_ROWS;
-
-		row_Cur = 0;
-		return true;
-	}
-
-	return false;
-}
-
-bool OCICursor::MoveNext()
-{
-	sword status;
-	
-	if((row_Index+1) >= rows_Mem) 
-	{
-		if(last_Row)
-			return false;
-		
-		// this is for scroolable cursor
-		status = OCIStmtFetch2(stmthpToQuery, conn->errhp, (ub4) MAX_ROWS, /*OCI_DEFAULT*/ OCI_FETCH_NEXT, (sb4) 0, OCI_DEFAULT);
-
-		if (status == OCI_SUCCESS || status == OCI_SUCCESS_WITH_INFO || status == OCI_NO_DATA)
-		{
-		
-			OCIAttrGet((dvoid *)stmthpToQuery, (ub4)OCI_HTYPE_STMT,
-					 (dvoid *)&rows_Fetched, (ub4 *)0, 
-					 (ub4)OCI_ATTR_ROWS_FETCHED, conn->errhp);
-
-			if(!rows_Fetched)
-				return false;
-
-			if(status == OCI_NO_DATA)
-			{
-				if(last_Row)
-					return false;
-				else
-					last_Row = true;
-			}
-
-			row_Index = 0;
-
-			if(rows_Fetched < MAX_ROWS)
-				rows_Mem = rows_Fetched;
-			else
-				rows_Mem = MAX_ROWS;
-
-			row_Cur++;
-			return true;
-		}
-		else
-			return false;
-	}
-	else
-		row_Index++;
-
-	row_Cur++;
-	return true;
-}
-
-bool OCICursor::MoveLast()  
-{
-
-	sword status = OCIStmtFetch2(stmthpToQuery, conn->errhp, (ub4) 1, 
-                               OCI_FETCH_LAST, (sb4) 0, OCI_DEFAULT);
-	//podemos pegar informacao da ultima linha
-
-	if (status == OCI_SUCCESS || status == OCI_SUCCESS_WITH_INFO)
-	{
-		last_Row = true;
-		return true;
-	}
-	else
-		return false;
-
-}
-
-bool OCICursor::MoveTo(int pos) //begin in 0
-{
-	
-	sword status;
-	int auxPos = MAX_ROWS*int(pos/MAX_ROWS);
-
-	// row_Cur = absolute current row 
-	// row_Index = relative current row - client side
-	if(int(row_Cur/MAX_ROWS) == int(pos/MAX_ROWS)) 
-	{
-		row_Index = pos - (MAX_ROWS*int(pos/MAX_ROWS));
-		row_Cur = pos;
-		return true;
-	}
-
-	if(pos<row_Cur)
-	{
-		if(!MoveFirst())
-			return false;
-	}
-
-	status = OCIStmtFetch2(stmthpToQuery, conn->errhp, (ub4) MAX_ROWS, OCI_FETCH_ABSOLUTE, (sb4)auxPos+1, OCI_DEFAULT); 
-	row_Index = pos-auxPos;
-	row_Cur = pos;
-
-	CheckError(status);
-
-	if (status == OCI_SUCCESS || status == OCI_SUCCESS_WITH_INFO || status == OCI_NO_DATA)
-	{
-		OCIAttrGet((dvoid *)stmthpToQuery, (ub4)OCI_HTYPE_STMT,
-				 (dvoid *)&rows_Fetched, (ub4 *)0, 
-				 (ub4)OCI_ATTR_ROWS_FETCHED, conn->errhp);
-
-		if(!rows_Fetched)
-			return false;
-		
-		if(status == OCI_NO_DATA)
-			last_Row = true;
-		return true;
-	}
-
-	return false;
-
-	/*  // funciona mas fica lento
-	sword status;
-	// this part is for scroolable cursor
-	if(pos >= 0)
-	{
-		status = OCIStmtFetch2(stmthpToQuery, conn->errhp, (ub4) MAX_ROWS, 
-                      OCI_FETCH_ABSOLUTE, (sb4) pos+1, OCI_DEFAULT);
-	}
-	else
-	{
-		status = OCIStmtFetch2(stmthpToQuery, conn->errhp, (ub4) MAX_ROWS, 
-                      OCI_FETCH_RELATIVE, (sb4) pos+1, OCI_DEFAULT);
-	}
-
-	*/
-}
-
-// Throw CCursorException if OCI error found
-bool OCICursor::CheckError(sword status)
-{
-	sb4 errcode = 0;
-	char message[256];
-	bool returnedVal = false;
-
-	if (status == OCI_ERROR)
-	{
-		SDO_OCIErrorGet((dvoid*)conn->errhp, (ub4)1, (text*)NULL, &errcode, 
-						(text*)message, (ub4)256, OCI_HTYPE_ERROR);
-
-		errorMessage = message;
-		return false;
-	}
-	
-	switch (status)
-	{ 
-		case OCI_SUCCESS:
-			errorMessage = "Success!";
-			returnedVal = true;
-			break;
-
-		case OCI_SUCCESS_WITH_INFO:
-			errorMessage = "Success with information!";
-			returnedVal = true;
-			break;
-
-		case OCI_NEED_DATA:
-			errorMessage = "Need data!";
-			break;
-		
-		case OCI_NO_DATA:
-			errorMessage = "No data!";
-			break;
-
-		//An invalid handle was passed as a parameter or a user callback is passed an
-		//invalid handle or invalid context. No further diagnostics are available.
-		case OCI_INVALID_HANDLE:
-			errorMessage = "Invalid handle!";
-			break;
-
-		case OCI_STILL_EXECUTING:
-			errorMessage = "Still executing!";
-			break;
-
-		case OCI_CONTINUE:
-			errorMessage = "Continue!";
-			break;
-		default:
-			break;
-	}
-
-	return returnedVal;
-
-}
-
-
-bool OCICursor::Prepare(const string& stmt)
-{	
-	ub4 size = stmt.size();
-	sword status = SDO_OCIStmtPrepare(conn->svchp, (OCIStmt *)stmthpToQuery, conn->errhp, (text*)stmt.c_str(), (ub4)size,  
-		(text*)0, (ub4)0, (ub4)OCI_NTV_SYNTAX, (ub4)OCI_DEFAULT);
-	if(!CheckError(status))
-		return false;
-
-	return true;
-}
-
-
-int OCICursor::QueryType()  
-{	
-	ub2 querytype_;
-		
-	sword status = OCIAttrGet((dvoid *)stmthpToQuery, (ub4)OCI_HTYPE_STMT, (ub2 *)&querytype_,
-	(ub4*)NULL, (ub4)OCI_ATTR_STMT_TYPE, (OCIError *)conn->errhp);
-	if(!CheckError(status))
-		return -1;
-	return (querytype_);
-}
-
-bool OCICursor::Query(const string& query)
-{
-	if (!isOpen_)
-		Open();
-			
-	row_Index = -1;
-	rows_Fetched = 0;
-	rows_Mem = 0;
-	row_Cur = -1;
-	last_Row = false;
-
-	if(!Prepare(query))
-		return false;	
-	
-	// query type equal to 1 = OCI_STMT_SELECT
-	if(QueryType()!=1) 
-		return false;
-		
-	//iters equal to zero because the defines (OCIDefines) have not located yet 
-	sword status = OCIStmtExecute(conn->svchp, stmthpToQuery, conn->errhp, (ub4)0, (ub4)0, (OCISnapshot *)NULL, 
-								  (OCISnapshot *)NULL, OCI_STMT_SCROLLABLE_READONLY);
-	if (!CheckError(status))
-		return false;
-
-	loadCollDescription(); // load columns description
-	if(!AllocateCursor())
-		return false;
-	
-	return true; 
-}
-
-
-bool OCICursor::QuerySDO(const string& query)
-{
-	if (!isOpen_)
-		Open();
-
-	row_Index = -1;
-	rows_Fetched = 0;
-	rows_Mem = 0;
-	row_Cur = -1;
-	last_Row = false;
-
-	if(!Prepare(query))
-		return false;
-
-	if(!BindOrdinates())
-		return false;	
-
-	// query type equal to 1 = OCI_STMT_SELECT
-	if (QueryType() != 1) //must be executed by OCIConnection->execute()
-		return false;
-		
-	//iters equal to zero because the defines (OCIDefines) have not located yet 
-	sword status = OCIStmtExecute(conn->svchp, stmthpToQuery, conn->errhp, (ub4)0, (ub4)0, (OCISnapshot *)NULL, 
-								  (OCISnapshot *)NULL, OCI_STMT_SCROLLABLE_READONLY);
-	
-	if (!CheckError(status))
-		return false;
-	
-	loadCollDescription(); // load columns description
-	if(!AllocateCursor())
-		return false;
-
-	return true; 
-}
-
-
-int OCICursor::NumCol()  
-{	
-	if(numColls_>=0)
-		return numColls_;
-	
-	int numcols_;
-
-	/* Get the number of columns in the query */
-	CheckError(OCIAttrGet(stmthpToQuery, OCI_HTYPE_STMT, &numcols_,
-	0, OCI_ATTR_PARAM_COUNT, conn->errhp));
-	return (numcols_);
-}
-
-
-int OCICursor::NumRows()
-{
-	int numrows_ = 0;
-	
-	/* Get the number of rows in the query */
-	CheckError(SDO_OCIAttrGet((dvoid*)stmthpToQuery, (ub4)OCI_HTYPE_STMT, (dvoid*)&numrows_,
-	(ub4*)0, (ub4)OCI_ATTR_ROW_COUNT, (OCIError*)conn->errhp));
-	return (numrows_);
-
-}
-
-
-void OCICursor::loadCollDescription() 
-{
-	OCIParam* colhd=NULL;
-	//int		dtype;
-	ub2	dtype = 0;
-	string	colname;
-	//int		colsize;
-	ub2  colsize = (ub2) 0;
-	//int		colscale;
-	sb1  colscale = (sb1) 0;
-	
-	numColls_ = NumCol();
-
-	int i;
-	for(i=1; i<=numColls_; ++i)
-	{
-
-		// get parameter for i-th column
-		CheckError(SDO_OCIParamGet((dvoid*)stmthpToQuery, (ub4)OCI_HTYPE_STMT, (OCIError *)conn->errhp, (dvoid**)&colhd, (ub4)i));
-
-		// get data type 
-		CheckError(SDO_OCIAttrGet((dvoid *)colhd, (ub4)OCI_DTYPE_PARAM, (dvoid *)&dtype, (ub4*)0, (ub4)OCI_ATTR_DATA_TYPE, (OCIError *)conn->errhp));
-
-		// get coll name 
-		text *colname_ = NULL;
-		ub4	colnamesz_;
-				
-		CheckError(OCIAttrGet((dvoid *)colhd, (ub4)OCI_DTYPE_PARAM, (dvoid **)&colname_, (ub4*)&colnamesz_, (ub4)OCI_ATTR_NAME, (OCIError *)conn->errhp ));
-
-		char temp[100];
-		for(i=0;i<(int)colnamesz_;i++)
-			temp[i] = colname_[i];
-		temp[colnamesz_] = '\0';
-		colname = temp;
-
-		// retrieve the column size attribute
-		CheckError(SDO_OCIAttrGet((dvoid *)colhd, (ub4)OCI_DTYPE_PARAM, (dvoid *)&colsize, (ub4*)0, (ub4)OCI_ATTR_DATA_SIZE, (OCIError *)conn->errhp ));
-
-		// retrieve the column scale attribute
-		CheckError(SDO_OCIAttrGet((dvoid *)colhd, (ub4)OCI_DTYPE_PARAM, (dvoid *)&colscale, (ub4*)0, (ub4)OCI_ATTR_SCALE, (OCIError *)conn->errhp ));
-
-		colName_.push_back(colname);
-		colType_.push_back((int)dtype);
-		colSize_.push_back((int)colsize);
-		colScale_.push_back((int)colscale);
-	}
-}
-
-
-int OCICursor::ColType (int colnumber)   
-{
-	//first coll number is 1
-	if((colnumber==0) || (colnumber>(int)colType_.size()))
-		return 0;
-
-	return colType_[colnumber-1];
-}
-
-
-string OCICursor::ColName (int colnumber) 
-{	
-	//first coll number is 1
-	if((colnumber==0) || (colnumber>(int)colName_.size()))
-		return "";
-
-	return colName_[colnumber-1];
-}
-
-
-int OCICursor::ColSize (int colnumber) 
-{
-	//first coll number is 1
-	if((colnumber==0) || (colnumber>(int)colSize_.size()))
-		return 0;
-
-	return colSize_[colnumber-1];
-}
-
-
-int OCICursor::ColScale (int colnumber) 
-{
-	//first coll number is 1
-	if((colnumber==0) || (colnumber>(int)colScale_.size()))
-		return 0;
-
-	return colScale_[colnumber-1];
-}
-
-
- bool OCICursor::AllocateCursor()
- {
-	
-	int			size;
-	int			coltype=0;
-	int			colsize=0;
-	int			colscale=0;
-		
-	try
-	{
-		ind.resize(numColls_);
-
-		for(int nc=0; nc<numColls_; ++nc)
-		{
-			defines.push_back (0);
-			buffers.push_back (0);
-		}
-
-		for(int i=1; i<=numColls_;i++)
-		{
-			coltype = colType_[i-1];
-			colsize = colSize_[i-1];
-			colscale = colScale_[i-1];
-
-			switch (coltype)
-			{
-				case 3: //INTEGER
-			
-					buffers[i-1] = new signed int[MAX_ROWS];
-					colsize = sizeof(signed int);
-
-					if(!CheckError(SDO_OCIDefineByPos(stmthpToQuery, &(defines[i-1]), conn->errhp, (ub4)i, 
-							(dvoid *)(signed int*)buffers[i-1], (sb4)colsize, coltype, 
-							(dvoid *)&ind[i-1], (ub2 *)0, (ub2 *)0,(ub4)OCI_DEFAULT)))
-							return false; 
-
-					break;
-
-			
-				case 2: //NUMBER
-										
-					buffers[i-1] = (OCINumber *) new OCINumber[MAX_ROWS]; //();								
-					if(!CheckError(OCIDefineByPos(stmthpToQuery, &(defines[i-1]), conn->errhp, (ub4)i, 
-							(dvoid *)buffers[i-1], sizeof(OCINumber), SQLT_VNU, 
-							(dvoid *)&ind[i-1], (ub2 *)0, (ub2 *)0,(ub4)OCI_DEFAULT)))
-							return false; 
-			
-					break;
-							
-
-				case 4: //FLOAT DOUBLE
-					
-					buffers[i-1] = new double[MAX_ROWS];
-					colsize = sizeof(double);
-					coltype = 4;
-				
-					if(!CheckError(SDO_OCIDefineByPos(stmthpToQuery, &(defines[i-1]), conn->errhp, (ub4)i, 
-							(dvoid *)(double*)buffers[i-1], (sb4)colsize, coltype, 
-							(dvoid *)&ind[i-1], (ub2 *)0, (ub2 *)0, (ub4)OCI_DEFAULT)))
-							return false; 
-				
-				
-					break;
-
-				case 96: //CHAR
-				case 9: //VARCHAR:
-				case 1: //VARCHAR2:	
-					buffers[i-1] = (char *) new char[MAX_ROWS*(colsize+1)];
-			
-					if(!CheckError(SDO_OCIDefineByPos(stmthpToQuery, &(defines[i-1]), conn->errhp, (ub4)i, 
-							(dvoid *)buffers[i-1], (sb4)(colsize+1), SQLT_STR, 
-							(dvoid *)&ind[i-1], (ub2 *)0, (ub2 *)0,(ub4)OCI_DEFAULT)))
-							return false; 
-				
-					break;
-
-				case 12: //Date
-					buffers[i-1] = (OCIDate *) new OCIDate[MAX_ROWS]; //();								
-					if(!CheckError(OCIDefineByPos(stmthpToQuery, &(defines[i-1]), conn->errhp, (ub4)i, 
-							(dvoid *)buffers[i-1], sizeof(OCIDate), SQLT_ODT, 
-							(dvoid *)&ind[i-1], (ub2 *)0, (ub2 *)0,(ub4)OCI_DEFAULT)))
-							return false; 
-				
-					break;
-
-
-				case 108: //OBJECT SDO_GEOMETRY
-				
-					if(!CheckError(SDO_OCIObjectNew(conn->envhp, conn->errhp, conn->svchp,
-							OCI_TYPECODE_OBJECT, conn->tdo_geometry, (dvoid*)NULL, 
-							OCI_DURATION_SESSION, TRUE, 
-							(dvoid**)global_geom_obj)))
-							return false;
-					
-					defines[i-1] = NULL;
-								
-					if(!CheckError(SDO_OCIDefineByPos(stmthpToQuery, &(defines[i-1]), conn->errhp, (ub4)i, 
-							(dvoid *)0, (sb4)0, SQLT_NTY, (dvoid *)&ind[i-1],
-							(ub2 *)0, (ub2 *)0, (ub4)OCI_DEFAULT)))
-							return false;
-					
-					if(!CheckError(OCIDefineObject(defines[i-1], conn->errhp, conn->tdo_geometry, 
-							(dvoid **)global_geom_obj, (ub4 *)0, 
-							(dvoid **)global_geom_ind, (ub4 *)0)))
-							return false;
-
-					break;
-
-				case 113 :	//SQLT_BLOB
-
-					//  Allocate lob descriptors.
-					for(size=0;size<MAX_ROWS;size++)
-					{
-						if(!CheckError(OCIDescriptorAlloc((dvoid *) conn->envhp, (dvoid **) &lobp[size],
-							(ub4) OCI_DTYPE_LOB,
-							(size_t) 0, (dvoid **) 0)))
-							return false;
-					}
-					if(!CheckError(OCIDefineByPos (stmthpToQuery, &(defines[i-1]), conn->errhp, (ub4)i,
-							(dvoid *)lobp, 0 , SQLT_BLOB,
-							(dvoid *)&ind[i-1], (ub2 *)0, (ub2 *)0, OCI_DEFAULT)))
-							
-							return false;
-					break;
-
-				default:
-					break;
-			
-			} //switch
-	
-		} //for
-	}//try
-
-	catch(...) 
-	{
-		return false;
-	}
-
-	return true;
-}	
-
-char* OCICursor::GetFieldValue(int i)  //inicia em 1
-{ 
-	
-	int				tempInt;
-	double			tempDouble;
-	char			str[30];
-	unsigned int	size; 
-	string			tempDate;
-		
-	if(i < 1)
-		return (char*)0;
-
-	int coltype = colType_[i-1]; 
-	int colsize = colSize_[i-1]; 
-	
-	//OBS:	When the SQL use grouping functions (MAX, MIN, etc), the returned value always has
-	//		colscale equal to zero, even when it is double
-//	int colscale = colScale_[i-1]; 
-
-	int indica = ind[i-1].sbind[row_Index];
-
-	switch (coltype)
-		{
-			case 3: //INTEGER
-
-				if(indica == -1)
-					return "0";
-
-				tempInt = *((int*)buffers[i-1]+row_Index);
-				fieldValue = Te2String(tempInt);
-				return ((char*)fieldValue.c_str());
-				break;
-
-			case 2: //NUMBER
-				
-				if(indica == -1)
-					return "0";
-				
-				if(!CheckError(OCINumberToReal(conn->errhp, ((OCINumber *)buffers[i-1]+row_Index), 
-					(uword)sizeof(double), (dvoid *)&tempDouble)))
-					return "0";
-				
-				fieldValue = Te2String(tempDouble);
-				return ((char*)fieldValue.c_str());
-				break;
-				
-
-			case 4: //FLOAT DOUBLE
-					
-				if(indica == -1)
-					return "0";
-				
-				tempDouble = *((const double*)buffers[i-1]+row_Index);
-				fieldValue = Te2String(tempDouble);
-				return ((char*)fieldValue.c_str());
-				break;
-
-			case 96: //CHAR
-			case 9: //VARCHAR:
-			case 1: //VARCHAR2:
-				
-				if(indica == -1)
-					return "";
-
-				fieldValue = ((char*)buffers[i-1]+((colsize+1)*row_Index));
-				fieldValue = StrClean((char*)fieldValue.c_str());
-				return ((char*)fieldValue.c_str());
-				break;
-
-			case 12: //Date
-				
-				if(indica == -1)
-					return "";
-
-				fieldValue = "";
-				size = sizeof(OCIDate);
-																	
-				if(!CheckError(OCIDateToText(conn->errhp, ((OCIDate *)buffers[i-1]+row_Index), 
-					NULL, 0, NULL, 0, &size, (unsigned char*)tempDate.c_str())))
-					return "";
-				memcpy(str, tempDate.c_str(), size);
-				strncat((char*)fieldValue.c_str(), str, size);
-
-				return ((char*)fieldValue.c_str());
-				break;
-
-			case 108: //OBJECT SDO_GEOMETRY
-			default:
-				break;
-								
-		} //switch
-		
-	return (char*)0;
-}
-
-int OCICursor::GetDimArraySize()
-{
-	int ndim=-1;
-
-	// Get the size of the elem info array
-    CheckError(OCICollSize(conn->envhp, conn->errhp, 
-				(OCIColl *)(global_geom_obj[row_Index]->sdo_elem_info), 
-				&ndim));
-
-	return(ndim);
-}
-
-bool OCICursor::GetDimElement(int i,int &elem)
-{
-	int				exists;
-	OCINumber		*oci_number;
-	double			el;
-
-
-	OCICollGetElem(conn->envhp, conn->errhp, 
-	   (OCIColl *)(global_geom_obj[row_Index]->sdo_elem_info), 
-	   (sb4)i-1, (int *)&exists, 
-	   (dvoid **)&oci_number, (dvoid **)0);
-
-	OCINumberToReal(conn->errhp, oci_number, (uword)sizeof(double),
-		(dvoid *)&el);
-	
-	elem = (int)el;
-	return true;
-}
-
-
-int OCICursor::GetNumberOrdinates()
-{
-	int nOrds=-1;
-
-	/* Get the size of the ordinates array */
-    CheckError(OCICollSize(conn->envhp, conn->errhp, 
-				(OCIColl *)(global_geom_obj[row_Index]->sdo_ordinates), 
-				&nOrds));
-
-	return(nOrds);
-}
-
-bool OCICursor::GetCoordinates(int i, TeCoord2D& coord)
-{
-	int				exists;
-	OCINumber		*oci_number;
-	double			coor_x;
-	double			coor_y;
-
-	int pos = i;
-
-	OCICollGetElem(conn->envhp, conn->errhp, 
-	   (OCIColl *)(global_geom_obj[row_Index]->sdo_ordinates), 
-	   (sb4)(pos-1), (int *)&exists, 
-	   (dvoid **)&oci_number, (dvoid **)0);
-
-	OCINumberToReal(conn->errhp, oci_number, (uword)sizeof(double),
-		(dvoid *)&coor_x);
-	
-	pos++;
-
-	OCICollGetElem(conn->envhp, conn->errhp, 
-	   (OCIColl *)(global_geom_obj[row_Index]->sdo_ordinates),  
-	   (sb4)(pos-1), (int *)&exists, 
-	   (dvoid **)&oci_number, (dvoid **)0);
-
-	OCINumberToReal(conn->errhp, oci_number, (uword)sizeof(double),
-		(dvoid *)&coor_y);
-
-	coord.x(coor_x);
-	coord.y(coor_y);
-
-	return true;
-}
-
-
-bool OCICursor::GetCoordinates(vector<TeCoord2D>& result)
-{
-	
-	OCIIter		*iterator;
-	dvoid		*elem;
-	OCIInd		*elemind ;
-	double		ordinate1, ordinate2; 
-	OCINumber	*aux1;
-	OCINumber	*aux2;
-	boolean		eoc;
-
-	sword status = OCIIterCreate(conn->envhp, conn->errhp, 
-		(OCIArray *)(global_geom_obj[row_Index]->sdo_ordinates), &iterator);
-	if (status != OCI_SUCCESS)
-		return false;
-	
-	/* Get the first and second element of the clients varray */
-	status = OCIIterNext(conn->envhp, conn->errhp, iterator, &elem,
-		(dvoid **) &elemind, &eoc);
-	if (status != OCI_SUCCESS)
-	{
-		OCIIterDelete(conn->envhp, conn->errhp, &iterator);
-		return false;
-	}
-
-	aux1 = (OCINumber *)elem;
-	OCINumberToReal(conn->errhp, (OCINumber *)aux1, (uword)sizeof(double),
-					(dvoid *)&ordinate1);
-
-	status = OCIIterNext(conn->envhp, conn->errhp, iterator, &elem,
-				(dvoid **)&elemind, &eoc);
-	if (status != OCI_SUCCESS)
-	{
-		OCIIterDelete(conn->envhp, conn->errhp, &iterator);
-		return false;
-	}
-
-	aux2 = (OCINumber *)elem;
-	OCINumberToReal(conn->errhp, (OCINumber *) aux2, (uword)sizeof(double),
-					(dvoid *)&ordinate2);
-
-	TeCoord2D coord(ordinate1, ordinate2);
-	result.push_back (coord);
-	
-	while (!eoc && (status == OCI_SUCCESS))
-	{
-		status = OCIIterNext(conn->envhp, conn->errhp, iterator, &elem,
-				(dvoid **)&elemind, &eoc);
-		if (status != OCI_SUCCESS)
-		{
-			OCIIterDelete(conn->envhp, conn->errhp, &iterator);
-			return false;
-		}
-
-		aux1 = (OCINumber *)elem;
-		OCINumberToReal(conn->errhp, (OCINumber *)aux1, (uword)sizeof(double),
-					(dvoid *)&ordinate1);
-
-		status = OCIIterNext(conn->envhp, conn->errhp, iterator, &elem,
-				(dvoid **)&elemind, &eoc);
-		if (status != OCI_SUCCESS)
-		{
-			OCIIterDelete(conn->envhp, conn->errhp, &iterator);
-			return false;
-		}
-
-		aux2 = (OCINumber *)elem;
-		OCINumberToReal(conn->errhp, (OCINumber *) aux2, (uword)sizeof(double),
-					(dvoid *)&ordinate2);
-
-		TeCoord2D coord(ordinate1, ordinate2);
-		result.push_back (coord);
-	}
-
-	/* destroy the iterator */
-	status = OCIIterDelete(conn->envhp, conn->errhp, &iterator);
-	return true;
-}
-
-
-int
-OCICursor::GetGeometryType()
-{
-	int gtype=-1;
-
-	CheckError(OCINumberToInt(conn->errhp, &(global_geom_obj[row_Index]->sdo_gtype),
-				 (uword)sizeof(int), OCI_NUMBER_SIGNED,
-				 (dvoid *)&gtype));
-
-	return gtype;
-}
-
-int
-OCICursor::GetSpatialReferenceId()
-{
-	int srid=-1;
-
-	CheckError(OCINumberToInt(conn->errhp, &(global_geom_obj[row_Index]->sdo_srid),
-				 (uword)sizeof(int), OCI_NUMBER_SIGNED,
-				 (dvoid *)&srid));
-
-	return srid;
-}
-
-bool
-OCICursor::GetXYZcoord(double& x, double& y)
-{
-	if (global_geom_ind[row_Index]->sdo_point._atomic == OCI_IND_NOTNULL)
-	{
-		if (global_geom_ind[row_Index]->sdo_point.x == OCI_IND_NOTNULL)
-		{
-			if(!CheckError(OCINumberToReal(conn->errhp, &(global_geom_obj[row_Index]->sdo_point.x), 
-										 (uword)sizeof(double),(dvoid *)&x)))
-
-				return false;
-		}
-
-		if (global_geom_ind[row_Index]->sdo_point.y == OCI_IND_NOTNULL)
-		{
-			if(!CheckError(OCINumberToReal(conn->errhp, &(global_geom_obj[row_Index]->sdo_point.y), 
-										 (uword)sizeof(double),(dvoid *)&y)))
-				return false;
-		}
-
-		/*
-		if (z && (global_geom_ind[row_Index]->sdo_point.z == OCI_IND_NOTNULL))
-		{
-			if(!CheckError(OCINumberToReal(conn->errhp, &(global_geom_obj[row_Index]->sdo_point.z), 
-										 (uword)sizeof(double),(dvoid *)&z)))
-				return false;
-		}*/
-
-		return true;
-	}
-	else
-		return false;
-}
-
-
-bool
-OCICursor::WriteBlob(const unsigned char* buffer, unsigned int bufsize)
-{
-	
-	int		offset = 1;
-	sword	status;
-	
-	status = SDO_OCILobWrite(conn->svchp, conn->errhp, *lobp, &bufsize, offset,
-        (dvoid *) buffer, (ub4) bufsize, OCI_ONE_PIECE,
-        (dvoid *)0, (sb4 (*)(dvoid *, dvoid *, ub4 *, ub1 *)) 0,
-		(ub2) 0, (ub1) SQLCS_IMPLICIT);
-	
-	CheckError(status);
-	if (status == OCI_SUCCESS)
-		return true;
-
-	return false;
-}
-
-int 
-OCICursor::SizeBlob()
-{
-	ub4 lenp=0;
-	CheckError(OCILobGetLength(conn->svchp, conn->errhp, lobp[row_Index], &lenp));
-	return lenp;
-}
-
-
-bool
-OCICursor::ReadBlob(unsigned char* buffer, unsigned int bufsize)
-{
-	sword	status;
-	int		offset = 1;
-			
-	status = SDO_OCILobRead(conn->svchp, conn->errhp, lobp[row_Index], &bufsize, offset,
-              (dvoid *) buffer, (ub4)bufsize , (dvoid *) 0, 0, (ub2) 0, 
-			   (ub1) SQLCS_IMPLICIT);
-    
-	if (status == OCI_SUCCESS )
-      return true;
-
-	return false;
-}
-
-
-
diff --git a/src/terralib/drivers/OracleSpatial/cursor.h b/src/terralib/drivers/OracleSpatial/cursor.h
deleted file mode 100644
index f7e3864..0000000
--- a/src/terralib/drivers/OracleSpatial/cursor.h
+++ /dev/null
@@ -1,225 +0,0 @@
-/************************************************************************************
-TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The library provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use
-of this library and its documentation.
-*************************************************************************************/
-
-#ifndef OCICursor_H
-#define OCICursor_H
-
-#include <connect.h>
-#include <vector>
-#include <TeCoord2D.h>
-
-using namespace std;
-
-// Object SDO_GEOMETRY - Oracle Spatial
-#define TYPE_OWNER				"MDSYS"
-#define SDO_ORDINATE_ARRAY      TYPE_OWNER".SDO_ORDINATE_ARRAY"
-#define SDO_ELEM_INFO_ARRAY     TYPE_OWNER".SDO_ELEM_INFO_ARRAY"
-#define SDO_GEOMETRY			TYPE_OWNER".SDO_GEOMETRY"
-
-#define MAX_ROWS				500	// number of lines to be fetched into memory
-
-// type point in Oracle Spatial
-struct sdo_point_type
-{
-   OCINumber x;
-   OCINumber y;
-   OCINumber z;
-};
-
-typedef struct sdo_point_type sdo_point_type;
-
-//type geometry in oracle spatial
-struct sdo_geometry
-{
-   OCINumber       sdo_gtype;
-   OCINumber       sdo_srid;
-   sdo_point_type  sdo_point;
-   OCIArray        *sdo_elem_info;
-   OCIArray        *sdo_ordinates;
-};
-
-typedef struct sdo_geometry SDO_GEOMETRY_TYPE;
-
-
-//Indicator structures for SDO_GEOMETRY_TYPE
-struct sdo_point_type_ind
-{
-   OCIInd _atomic;
-   OCIInd x;
-   OCIInd y;
-   OCIInd z;
-};
-
-typedef struct sdo_point_type_ind sdo_point_type_ind;
-
-struct SDO_GEOMETRY_ind
-{
-   OCIInd                    _atomic;
-   OCIInd                    sdo_gtype;
-   OCIInd                    sdo_srid;
-   struct sdo_point_type_ind sdo_point;
-   OCIInd                    sdo_elem_info;
-   OCIInd                    sdo_ordinates;
-};
-
-typedef struct SDO_GEOMETRY_ind SDO_GEOMETRY_ind;
-
-struct sb2ind
-{
-	sb2		sbind[MAX_ROWS];
-};
-typedef struct sb2ind	indarray;
-
-
-//! Oracle generic Cursor class 
-
-class OCICursor
-{
-protected:
-	OCIConnection*		conn;			// pointer to connection, environment, etc
-	OCIStmt*			stmthpToQuery;  // OCI statement handle to query
-	OCIDescribe*		dschp;			//environment describe handle - contem informacoes sobre esquemas de objetos
-	bool				isOpen_;		// if the cursor is open or not (if the stmthpToQuery was allocated)
-	string				errorMessage;
-			
-	
-	//-------- buffers to store data in memory - client side
-	vector<void *>			buffers;	// buffer to store simple data type (varchar, number, date, etc)
-	vector <indarray>		ind;		// buffer to store null indicator
-				
-	SDO_GEOMETRY_TYPE*		global_geom_obj[MAX_ROWS];	// buffer to store spatial object  
-	SDO_GEOMETRY_ind*		global_geom_ind[MAX_ROWS];	// buffer to store spatial object indicator  
-
-	OCILobLocator*			lobp[MAX_ROWS];				// buffer to store blob
-	
-	vector<OCIDefine *>		defines;	// OCIDefine to link buffers in client side and the statement handle
-
-	string					fieldValue;
-
-	OCIArray*				ordinates;		//store the ordinates to be used in a query (bind)
-
-	//-------- information to handle the cursor
-	short				row_Index;		// relative current row index in the memory buffer
-	int					row_Cur;		// absolute current cursor row
-	int					rows_Fetched;	// rows fetched from database
-	int					rows_Mem;		// rows on memory buffer - client side
-	bool				last_Row;		// if is last row
-	
-
-	//-------- information about columns of the cursor
-	int					numColls_;  // number of columns
-	vector<string>		colName_;	// name of columns
-	vector<int>			colType_;	// type of columns
-	vector<int>			colSize_;	// size of columns
-	vector<int>			colScale_;  // sclae of columns
-
-public:
-	
-	//! Cursor constructor
-	OCICursor(OCIConnection* conn);
-
-	//! Cursor destructor
-	~OCICursor() { Close(); }
-
-	//! Open the Cursor
-	bool		Open();
-
-	
-	//! return the error message 
-	string			getErrorMessage() { return errorMessage;}
-	//! Check if the cursor is open
-	bool			isOpen()	{ return isOpen_; }
-	OCIConnection*	Conn()		{ return conn; }
-	//! Return the current row 
-	int				CurrentRow() { return row_Cur; }
-
-
-	//! Close the Cursor
-	void			Close();
-	
-	//! Define
-	void		DefineByPos(int pos, void* value, int size, void* indicator, int type);
-
-	//! Execute and Fetch
-	bool		Execute();
-	bool		Fetch(int rows);
-
-	bool		Query(const string& query);
-	bool		QuerySDO(const string& query);
-
-	//! Move operations
-	bool		MoveFirst();
-	bool		MoveNext();
-	bool		MoveTo(int pos);
-	bool		MoveLast();
-	
-	//! Return the columns number 
-	int			NumCol(void);
-
-	//! Return the rows number 
-	int			NumRows(void);
-	
-	//! Load all column descriptions (name, type, size and scale)
-	void		loadCollDescription (); 
-	
-	//! Return the column type (SQLT)
-	int			ColType (int colnumber);
-
-	//! Return the column name 
-	string		ColName (int colnumber);
-
-	//! Return the column size 
-	int			ColSize (int colnumber);
-
-	//! Return the column scale (number of digits after decimal point) 
-	int			ColScale (int colnumber);
-
-	bool		AppendOrdinates(const double& val);
-	bool		BindOrdinates();
-	
-	bool		Prepare(const string& stmt);
-	int			QueryType(); 
-
-	bool		AllocateCursor(void);
-	char*		GetFieldValue(int i);
-	int			GetDimArraySize();
-	bool		GetDimElement(int i,int &elem);
-	int			GetNumberOrdinates(void);
-	bool		GetCoordinates(int i,TeCoord2D& coord);
-	bool		GetCoordinates(vector<TeCoord2D>& result);
-	int			GetGeometryType();
-	int			GetSpatialReferenceId();
-	bool		GetXYZcoord (double& x, double& y);
-	void		FreeResult(void);
-
-	bool		WriteBlob(const unsigned char* buffer, unsigned int bufsize);
-	int			SizeBlob();
-	bool		ReadBlob(unsigned char* buffer, unsigned int bufsize);
-
-protected:
-	// Throws exception if error found
-	bool		CheckError(sword status);
-};
-
-#endif // OCICursor_H
-
diff --git a/src/terralib/drivers/OracleSpatial/ociap.h b/src/terralib/drivers/OracleSpatial/ociap.h
deleted file mode 100644
index 56ff182..0000000
--- a/src/terralib/drivers/OracleSpatial/ociap.h
+++ /dev/null
@@ -1,10097 +0,0 @@
-/*
- * $Header: /home/terralib/src/terralib/drivers/OracleSpatial/ociap.h,v 1.2 2002/12/13 13:35:48 karine Exp $
- */
-
-/* Copyright (c) 1996, 2002, Oracle Corporation.  All rights reserved.  */
- 
-/* NOTE:  See 'header_template.doc' in the 'doc' dve under the 'forms' 
-      directory for the header file template that includes instructions. 
-*/
- 
-/* 
-   NAME 
-     ociap.h - Oracle Call Interface - Ansi Prototypes
-
-   DESCRIPTION 
-     <short description of component this file declares/defines> 
-
-   RELATED DOCUMENTS 
- 
-   INSPECTION STATUS 
-     Inspection date: 
-     Inspection status: 
-     Estimated increasing cost defects per page: 
-     Rule sets: 
- 
-   ACCEPTANCE REVIEW STATUS 
-     Review date: 
-     Review status: 
-     Reviewers: 
- 
-   PUBLIC FUNCTION(S) 
-     <list of external functions declared/defined - with one-line descriptions>
-
-   PRIVATE FUNCTION(S)
-     <list of static functions defined in .c file - with one-line descriptions>
-
-   EXAMPLES
-
-   NOTES
-     <other useful comments, qualifications, etc.>
-
-   MODIFIED   (MM/DD/YY)
-   sichandr    02/12/02 - fix OCIXMLTypeExists
-   gayyappa    02/01/02 - fix 2210776 : change Dom to DOM 
-   sichandr    10/24/01 - OCISvcCtx for XMLType create routines
-   schandir    09/14/01 - Add prototypes for Stmt Caching
-   abande      09/04/01 - Add Prototypes for Session Pooling Methods
-   stakeda     09/12/01 - add OCINlsCharSetConvert
-   whe         08/28/01 - add OCIEnvNlsCreate
-   wzhang      08/22/01 - Add OCINlsCharSetNameToId.
-   whe         10/05/01 - add prototype for OCIXMLType functions
-   mdmehta     04/06/01 - Bug 1683763, OCIDateTimeToText: buf_size to ub4*
-   schandir    12/12/00 - modify the ociconnectionpoolcreate() interface.
-   porangas    12/04/00 - Forward merge bug#974710 to 9i
-   rpingte     11/29/00 - Fix bug# 1485795.
-   gtarora     11/30/00 - fix comment for OCILobIsTemporary
-   akatti      11/07/00 - [1198379]:add OCIRowidToChar
-   bpalaval    10/15/00 - Forward merge 892654.
-   kmohan      09/18/00 - add OCILogon2
-   etucker     07/28/00 - add OCIIntervalFromTZ
-   vjayaram    07/18/00 - add connection pooling changes
-   etucker     07/13/00 - add dls apis for oci
-   hmasaki     07/05/00 - fix 1230846: forward merge into 8.2
-   mbastawa    06/05/00 - add OCIStmtFetch2
-   rxgovind    06/07/00 - update OCIAnyData interfaces
-   rxgovind    05/04/00 - add OCIAnyDataSet interfaces
-   rkasamse    05/01/00 - remove attrno from OCIAnyDataAttrGet
-   rkasamse    03/13/00 - add prototype s for OCCIAnyData
-   slari       09/01/99 - remove OCIEnvCallback
-   slari       08/23/99 - add OCIUcb in user callback functions
-   dsaha       07/07/99 - Add OCIFEnvCreate for forms
-   vyanaman    06/21/99 - Change OCI DateTime/Interval APIs.
-   esoyleme    07/01/99 - expose MTS performance enhancements                  
-   whe         06/14/99 - bug727872:add CONST to match definitions
-   kkarun      02/23/99 - Fix OCIDateTime APIs
-   jiyang      12/07/98 - Add comments for OCI_NLS_DUAL_CURRENCY
-   aroy        12/01/98 - add OCIEnvCreate
-   slari       11/23/98 - use ORASTDARG
-   slari       11/21/98 - replace ellipsis by arglist in OCIUserCallback
-   thchang     10/20/98 - correct comment on OCILobCreateTemporary
-   slari       09/08/98 - allow envh to receive error info also in CallbackReg/
-   kkarun      09/02/98 - Change const to CONST
-   aroy        08/04/98 - add OCITerminate calls                               
-   nramakri    06/25/98 - remove CONST from some OCIPickler APIs
-   jiyang      06/22/98 - Fix a lint error
-   nmallava    06/08/98 - ociistemporary -> envhp
-   jhasenbe    05/27/98 - Remove definitions for U-Calls (Unicode)
-   nmallava    05/18/98 - add comments
-   sgollapu    05/19/98 - Change text to OraText
-   aroy        04/20/98 - merge forward 8.0.5 -> 8.1.3
-   nbhatt      05/14/98 -  aq listen call
-   lchidamb    03/02/98 - Client Notification prototypes
-   vyanaman    04/19/98 - System Timestamp
-   kkarun      04/17/98 - Add more Interval functions
-   vyanaman    04/17/98 - Fix min (proc error)
-   vyanaman    04/16/98 - Add get/set TZ
-   kkarun      04/13/98 - Add Datetime prototypes
-   rkasamse    04/13/98 - change OCIEnv* to dvoid* for context/memory cart serv
-   rkasamse    04/15/98 - chage pickler cart interface
-   slari       03/20/98 - change proto of OCIUserCallback
-   slari       02/17/98 - add OCIUserCallback
-   jiyang      04/02/98 - Accept both env and user handles for NLS
-   rkasamse    03/20/98 - remove prototypes for OCIMemoryDuration* functions.
-   tsaulys     03/20/98 - use environment or session handle
-   nmallava    04/09/98 - OCILobLocatorAssign
-   nmallava    04/07/98 - lobgetchunksize and writeappend apis
-   jhasenbe    04/06/98 - Add new interfaces for Unicode support
-   nmallava    03/17/98 - add interfaces
-   nmallava    03/16/98 - add open/close apis
-   nmallava    03/10/98 - add temporary lobs apis
-   sgollapu    07/10/97 - Add OCIReset
-   sgollapu    02/09/98 - OCI non-blocking
-   nramakri    01/16/98 - remove #ifdef NEVER clause for OCIExtract
-   rmurthy     01/08/98 - OCIContextGenerateKey: change ub1 to ub4
-   ewaugh      12/18/97 - Turn type wrappers into functions.
-   skabraha    12/02/97 - adding OCIFile functions
-   rhwu        12/02/97 - add OCI Thread
-   nramakri    12/15/97 - move to core4
-   nramakri    12/11/97 - modify OCIExtract prototype
-   ewaugh      12/10/97 - add OCIFormat prototypes
-   nmallava    12/17/97 - Add ilob open and close apis
-   rkasamse    12/03/97 - Change some of the function names for pickler cartrid
-   nramakri    11/12/97 - add OCIExtract prototypes
-   rkasamse    11/21/97 - add prototypes for memory cartridge services and cont
-   rkasamse    11/03/97 - Add pickler cartridge interfaces.
-   jiyang      11/11/97 - Add NLS service for cartridge
-   tanguyen    08/19/97 -
-   cxcheng     07/30/97 - replace OCISvcCtx with OCISvcCtx
-   schandra    06/25/97 - AQ OCI interface
-   bnainani    07/21/97 - add prototypes for Oracle XA extensions
-   esoyleme    05/13/97 - move failover callback prototype
-   skmishra    05/06/97 - stdc compiler fixes
-   skmishra    04/24/97 - C++ Compatibility changes
-   skotsovo    04/21/97 - make lob parameter names consistent
-   rwhitman    04/16/97 - Fix LOB prototypes - Olint OCI 8.0.3
-   ramkrish    04/15/97 - Add free flag to OCILobFlushBuffer
-   dchatter    04/10/97 - add nzt.h inclusion
-   cxcheng     04/09/97 - change objnamp from CONST text* to dvoid*
-   cxcheng     04/08/97 - fix prototype of OCIDescribeAny()
-   skotsovo    03/31/97 - remove OCILobLocatorSize
-   skotsovo    03/27/97 - add OCILobLoadFromFile
-   bcchang     02/18/97 - Fix syntax error
-   dchatter    01/13/97 - fix comments on LOB calls
-   aroy        01/10/97 - remove ocilobfilecreate delete
-   sgollapu    12/27/96 - Correct OCILogon prototype
-   dchatter    01/04/97 - comments to describe the functions
-   sgollapu    11/25/96 - Change OCILobFileIsExistent
-   schandra    11/18/96 - Remove xa.h include
-   sgollapu    11/09/96 - Change prototype of OCIDescribeAny
-   dchatter    10/31/96 - delete CONST from lob write cb fn
-   dchatter    10/30/96 - more changes
-   dchatter    10/26/96 - lob/file long name corrections
-   slari       10/16/96 - delete unused calls
-   rwessman    10/29/96 - Fixed OCISecurityGetIdentity prototype
-   bcchang     10/25/96 - Fix syntax error
-   sgollapu    10/22/96 - Add OCILogon and OCILogoff
-   rwessman    10/16/96 - Added cryptographic and digital signature functions
-   sgollapu    10/10/96 - Add ocibdp and ocibdn
-   rxgovind    10/07/96 - add oci file calls
-   skotsovo    10/01/96 - move orl lob fnts to oci
-   skotsovo    09/20/96 - in OCILobGetLength(), remove the 'isnull' parameter.
-   aroy        08/29/96 - change prototype for Nchar Lob support
-   dchatter    08/21/96 - OCIResultSetToStmt prototype change
-   sthakur     08/14/96 - add OCIParamSet
-   schandra    07/26/96 - TX OCI return values - sb4->sword
-   aroy        07/17/96 - terminology change: OCILobLocator => OCILobLocator
-   dchatter    07/01/96 - create ANSI prototypes
-   dchatter    07/01/96 - Creation
-
-*/
-
- 
-#ifndef OCIAP_ORACLE
-# define OCIAP_ORACLE
-
-# ifndef ORATYPES 
-#  include <oratypes.h> 
-# endif 
- 
-#ifndef ORASTDARG
-#include <stdarg.h>
-#define ORASTDARG
-#endif
-
-#ifndef OCIDFN
-#include <ocidfn.h>
-#endif
-
-#ifndef NZT_ORACLE
-#include <nzt.h>
-#endif /* NZT_ORACLE */
- 
-#ifndef OCI_ORACLE
-#include <oci.h>
-#endif
-
-#ifndef ORT_ORACLE
-#include <ort.h>
-#endif
-
-
-
-/*---------------------------------------------------------------------------
-                     PUBLIC TYPES AND CONSTANTS
-  ---------------------------------------------------------------------------*/
-
-
-/*---------------------------------------------------------------------------
-                     PRIVATE TYPES AND CONSTANTS
-  ---------------------------------------------------------------------------*/
-
-
-/*---------------------------------------------------------------------------
-                           PUBLIC FUNCTIONS
-  ---------------------------------------------------------------------------*/
-
-/*****************************************************************************
-                              DESCRIPTION
-******************************************************************************
-Note: the descriptions of the functions are alphabetically arranged. Please 
-maintain the arrangement when adding a new function description. The actual 
-prototypes are below this comment section and donot follow any alphabetical 
-ordering. 
-
-
---------------------------------OCIAttrGet------------------------------------
-
-OCIAttrGet()
-Name
-OCI Attribute Get
-Purpose
-This call is used to get a particular attribute of a handle. 
-Syntax
-sword OCIAttrGet ( CONST dvoid    *trgthndlp,
-                 ub4            trghndltyp,
-                 dvoid          *attributep,
-                 ub4            *sizep,
-                 ub4            attrtype,
-                 OCIError       *errhp );
-Comments
-This call is used to get a particular attribute of a handle.
-See Appendix B,  "Handle Attributes",  for a list of handle types and their 
-readable attributes.
-Parameters
-trgthndlp (IN) - is the pointer to a handle type. 
-trghndltyp (IN) - is the handle type. 
-attributep (OUT) - is a pointer to the storage for an attribute value. The 
-attribute value is filled in. 
-sizep (OUT) - is the size of the attribute value. 
-This can be passed in as NULL for most parameters as the size is well known. 
-For text* parameters, a pointer to a ub4 must be passed in to get the length 
-of the string. 
-attrtype (IN) - is the type of attribute.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-Related Functions
-OCIAttrSet()
-
---------------------------------OCIAttrSet------------------------------------
-
-
-OCIAttrSet()
-Name
-OCI Attribute Set
-Purpose
-This call is used to set a particular attribute of a handle or a descriptor. 
-Syntax
-sword OCIAttrSet ( dvoid       *trgthndlp,
-                 ub4         trghndltyp,
-                 dvoid       *attributep,
-                 ub4         size,
-                 ub4         attrtype,
-                 OCIError    *errhp );
-Comments
-This call is used to set a particular attribute of a handle or a descriptor. 
-See Appendix B for a list of handle types and their writeable attributes.
-Parameters
-trghndlp (IN/OUT) - the pointer to a handle type whose attribute gets 
-modified. 
-trghndltyp (IN/OUT) - is the handle type. 
-attributep (IN) - a pointer to an attribute value. 
-The attribute value is copied into the target handle. If the attribute value 
-is a pointer, then only the pointer is copied, not the contents of the pointer.
-size (IN) - is the size of an attribute value. This can be passed in as 0 for 
-most attributes as the size is already known by the OCI library. For text*
-attributes, a ub4 must be passed in set to the length of the string. 
-attrtype (IN) - the type of attribute being set.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-Related Functions
-OCIAttrGet()
-
-
-
---------------------------------OCIBindArrayOfStruct--------------------------
-
-
-
-OCIBindArrayOfStruct()
-Name
-OCI Bind for Array of Structures
-Purpose
-This call sets up the skip parameters for a static array bind.
-Syntax
-sword OCIBindArrayOfStruct ( OCIBind     *bindp,
-                           OCIError    *errhp,
-                           ub4         pvskip, 
-                           ub4         indskip, 
-                           ub4         alskip, 
-                           ub4         rcskip );
-Comments
-This call sets up the skip parameters necessary for a static array bind.
-This call follows a call to OCIBindByName() or OCIBindByPos(). The bind 
-handle returned by that initial bind call is used as a parameter for the 
-OCIBindArrayOfStruct() call.
-For information about skip parameters, see the section "Arrays of Structures" 
-on page 4-16.
-Parameters
-bindp (IN) - the handle to a bind structure. 
-errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-pvskip (IN) - skip parameter for the next data value. 
-indskip (IN) - skip parameter for the next indicator value or structure. 
-alskip (IN) - skip parameter for the next actual length value. 
-rcskip (IN) - skip parameter for the next column-level return code value. 
-Related Functions
-OCIAttrGet()
-
-
---------------------------------OCIBindByName---------------------------------
-
-OCIBindByName()
-Name
-OCI Bind by Name
-Purpose
-Creates an association between a program variable and a placeholder in a SQL 
-statement or PL/SQL block.
-Syntax
-sword OCIBindByName (
-              OCIStmt       *stmtp, 
-              OCIBind       **bindp,
-              OCIError      *errhp,
-              CONST OraText    *placeholder,
-              sb4           placeh_len,
-              dvoid         *valuep,
-              sb4           value_sz,
-              ub2           dty,
-              dvoid         *indp,
-              ub2           *alenp,
-              ub2           *rcodep,
-              ub4           maxarr_len,
-              ub4           *curelep, 
-              ub4           mode ); 
-Description
-This call is used to perform a basic bind operation. The bind creates an 
-association between the address of a program variable and a placeholder in a 
-SQL statement or PL/SQL block. The bind call also specifies the type of data 
-which is being bound, and may also indicate the method by which data will be 
-provided at runtime.
-This function also implicitly allocates the bind handle indicated by the bindp 
-parameter.
-Data in an OCI application can be bound to placeholders statically or 
-dynamically. Binding is static when all the IN bind data and the OUT bind 
-buffers are well-defined just before the execute. Binding is dynamic when the 
-IN bind data and the OUT bind buffers are provided by the application on 
-demand at execute time to the client library. Dynamic binding is indicated by 
-setting the mode parameter of this call to OCI_DATA_AT_EXEC.
-Related Functions: For more information about dynamic binding, see 
-the section "Runtime Data Allocation and Piecewise Operations" on 
-page 5-16.
-Both OCIBindByName() and OCIBindByPos() take as a parameter a bind handle, 
-which is implicitly allocated by the bind call A separate bind handle is 
-allocated for each placeholder the application is binding.
-Additional bind calls may be required to specify particular attributes 
-necessary when binding certain data types or handling input data in certain 
-ways:
-If arrays of structures are being utilized, OCIBindArrayOfStruct() must 
-be called to set up the necessary skip parameters.
-If data is being provided dynamically at runtime, and the application 
-will be using user-defined callback functions, OCIBindDynamic() must 
-be called to register the callbacks.
-If a named data type is being bound, OCIBindObject() must be called to 
-specify additional necessary information.
-Parameters
-stmth (IN/OUT) - the statement handle to the SQL or PL/SQL statement 
-being processed.
-bindp (IN/OUT) - a pointer to a pointer to a bind handle which is implicitly 
-allocated by this call.  The bind handle  maintains all the bind information for 
-this particular input value. The handle is feed implicitly when the statement 
-handle is deallocated.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-placeholder (IN) - the placeholder attributes are specified by name if ocibindn() 
-is being called.
-placeh_len (IN) - the length of the placeholder name specified in placeholder.
-valuep (IN/OUT) - a pointer to a data value or an array of data values of the 
-type specified in the dty parameter. An array of data values can be specified 
-for mapping into a PL/SQL table or for providing data for SQL multiple-row 
-operations. When an array of bind values is provided, this is called an array 
-bind in OCI terms. Additional attributes of the array bind (not bind to a 
-column of ARRAY type) are set up in OCIBindArrayOfStruct() call. 
-For a REF, named data type  bind, the valuep parameter is used only for IN 
-bind data. The pointers to OUT buffers are set in the pgvpp parameter 
-initialized by OCIBindObject(). For named data type and REF binds, the bind 
-values are unpickled into the Object Cache. The OCI object navigational calls 
-can then be used to navigate the objects and the refs in the Object Cache.
-If the OCI_DATA_AT_EXEC mode is specified in the mode parameter, valuep 
-is ignored for all data types. OCIBindArrayOfStruct() cannot be used and 
-OCIBindDynamic() must be invoked to provide callback functions if desired. 
-value_sz (IN) - the size of a data value. In the case of an array bind, this is the 
-maximum size of any element possible with the actual sizes being specified in 
-the alenp parameter. 
-If the OCI_DATA_AT_EXEC mode is specified, valuesz defines the maximum 
-size of the data that can be ever provided at runtime for data types other than 
-named data types or REFs. 
-dty (IN) - the data type of the value(s) being bound. Named data types 
-(SQLT_NTY) and REFs (SQLT_REF) are valid only if the application has been 
-initialized in object mode. For named data types, or REFs, additional calls 
-must be made with the bind handle to set up the datatype-specific attributes.
-indp (IN/OUT) - pointer to an indicator variable or array. For scalar data 
-types, this is a pointer to sb2 or an array of sb2s. For named data types, 
-this pointer is ignored and the actual pointer to the indicator structure or 
-an array of indicator structures is initialized by OCIBindObject(). 
-Ignored for dynamic binds.
-See the section "Indicator Variables" on page 2-43 for more information about 
-indicator variables.
-alenp (IN/OUT) - pointer to array of actual lengths of array elements. Each 
-element in alenp is the length of the data in the corresponding element in the 
-bind value array before and after the execute. This parameter is ignored for 
-dynamic binds.
-rcodep (OUT) - pointer to array of column level return codes. This parameter 
-is ignored for dynamic binds.
-maxarr_len (IN) - the maximum possible number of elements of type dty in a 
-PL/SQL binds. This parameter is not required for non-PL/SQL binds. If 
-maxarr_len is non-zero, then either OCIBindDynamic() or 
-OCIBindArrayOfStruct() can be invoked to set up additional bind attributes. 
-curelep(IN/OUT) - a pointer to the actual number of elements. This parameter 
-is only required for PL/SQL binds.
-mode (IN) - the valid modes for this parameter are:
-OCI_DEFAULT. This is default mode.
-OCI_DATA_AT_EXEC. When this mode is selected, the value_sz 
-parameter defines the maximum size of the data that can be ever 
-provided at runtime. The application must be ready to provide the OCI 
-library runtime IN data buffers at any time and any number of times. 
-Runtime data is provided in one of the two ways:
-callbacks using a user-defined function which must be registered 
-with a subsequent call to OCIBindDynamic(). 
-a polling mechanism using calls supplied by the OCI. This mode 
-is assumed if no callbacks are defined.
-For more information about using the OCI_DATA_AT_EXEC mode, see 
-the section "Runtime Data Allocation and Piecewise Operations" on 
-page 5-16.
-When the allocated buffers are not required any more, they should be 
-freed by the client. 
-Related Functions
-OCIBindDynamic(), OCIBindObject(), OCIBindArrayOfStruct(), OCIAttrGet()
-
-
-
--------------------------------OCIBindByPos-----------------------------------
-
-
-OCIBindByPos()
-Name
-OCI Bind by Position
-Purpose
-Creates an association between a program variable and a placeholder in a SQL 
-statement or PL/SQL block.
-Syntax
-sword OCIBindByPos ( 
-              OCIStmt      *stmtp, 
-              OCIBind      **bindp,
-              OCIError     *errhp,
-              ub4          position,
-              dvoid        *valuep,
-              sb4          value_sz,
-              ub2          dty,
-              dvoid        *indp,
-              ub2          *alenp,
-              ub2          *rcodep,
-              ub4          maxarr_len,
-              ub4          *curelep, 
-              ub4          mode);
-
-Description
-This call is used to perform a basic bind operation. The bind creates an 
-association between the address of a program variable and a placeholder in a 
-SQL statement or PL/SQL block. The bind call also specifies the type of data 
-which is being bound, and may also indicate the method by which data will be 
-provided at runtime.
-This function also implicitly allocates the bind handle indicated by the bindp 
-parameter.
-Data in an OCI application can be bound to placeholders statically or 
-dynamically. Binding is static when all the IN bind data and the OUT bind 
-buffers are well-defined just before the execute. Binding is dynamic when the 
-IN bind data and the OUT bind buffers are provided by the application on 
-demand at execute time to the client library. Dynamic binding is indicated by 
-setting the mode parameter of this call to OCI_DATA_AT_EXEC.
-Related Functions: For more information about dynamic binding, see 
-the section "Runtime Data Allocation and Piecewise Operations" on 
-page 5-16
-Both OCIBindByName() and OCIBindByPos() take as a parameter a bind handle, 
-which is implicitly allocated by the bind call A separate bind handle is 
-allocated for each placeholder the application is binding.
-Additional bind calls may be required to specify particular attributes 
-necessary when binding certain data types or handling input data in certain 
-ways:
-If arrays of structures are being utilized, OCIBindArrayOfStruct() must 
-be called to set up the necessary skip parameters.
-If data is being provided dynamically at runtime, and the application 
-will be using user-defined callback functions, OCIBindDynamic() must 
-be called to register the callbacks.
-If a named data type is being bound, OCIBindObject() must be called to 
-specify additional necessary information.
-Parameters
-stmth (IN/OUT) - the statement handle to the SQL or PL/SQL statement 
-being processed.
-bindp (IN/OUT) - a pointer to a pointer to a bind handle which is implicitly 
-allocated by this call.  The bind handle  maintains all the bind information for 
-this particular input value. The handle is feed implicitly when the statement 
-handle is deallocated.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-position (IN) - the placeholder attributes are specified by position if ocibindp() 
-is being called.
-valuep (IN/OUT) - a pointer to a data value or an array of data values of the 
-type specified in the dty parameter. An array of data values can be specified 
-for mapping into a PL/SQL table or for providing data for SQL multiple-row 
-operations. When an array of bind values is provided, this is called an array 
-bind in OCI terms. Additional attributes of the array bind (not bind to a 
-column of ARRAY type) are set up in OCIBindArrayOfStruct() call. 
-For a REF, named data type  bind, the valuep parameter is used only for IN 
-bind data. The pointers to OUT buffers are set in the pgvpp parameter 
-initialized by OCIBindObject(). For named data type and REF binds, the bind 
-values are unpickled into the Object Cache. The OCI object navigational calls 
-can then be used to navigate the objects and the refs in the Object Cache.
-If the OCI_DATA_AT_EXEC mode is specified in the mode parameter, valuep 
-is ignored for all data types. OCIBindArrayOfStruct() cannot be used and 
-OCIBindDynamic() must be invoked to provide callback functions if desired. 
-value_sz (IN) - the size of a data value. In the case of an array bind, this is the 
-maximum size of any element possible with the actual sizes being specified in 
-the alenp parameter. 
-If the OCI_DATA_AT_EXEC mode is specified, valuesz defines the maximum 
-size of the data that can be ever provided at runtime for data types other than 
-named data types or REFs. 
-dty (IN) - the data type of the value(s) being bound. Named data types 
-(SQLT_NTY) and REFs (SQLT_REF) are valid only if the application has been 
-initialized in object mode. For named data types, or REFs, additional calls 
-must be made with the bind handle to set up the datatype-specific attributes.
-indp (IN/OUT) - pointer to an indicator variable or array. For scalar data 
-types, this is a pointer to sb2 or an array of sb2s. For named data types, 
-this pointer is ignored and the actual pointer to the indicator structure or 
-an array of indicator structures is initialized by OCIBindObject(). Ignored 
-for dynamic binds.
-See the section "Indicator Variables" on page 2-43 for more information about 
-indicator variables.
-alenp (IN/OUT) - pointer to array of actual lengths of array elements. Each 
-element in alenp is the length of the data in the corresponding element in the 
-bind value array before and after the execute. This parameter is ignored for 
-dynamic binds.
-rcodep (OUT) - pointer to array of column level return codes. This parameter 
-is ignored for dynamic binds.
-maxarr_len (IN) - the maximum possible number of elements of type dty in a 
-PL/SQL binds. This parameter is not required for non-PL/SQL binds. If 
-maxarr_len is non-zero, then either OCIBindDynamic() or 
-OCIBindArrayOfStruct() can be invoked to set up additional bind attributes. 
-curelep(IN/OUT) - a pointer to the actual number of elements. This parameter 
-is only required for PL/SQL binds.
-mode (IN) - the valid modes for this parameter are:
-OCI_DEFAULT. This is default mode.
-OCI_DATA_AT_EXEC. When this mode is selected, the value_sz 
-parameter defines the maximum size of the data that can be ever 
-provided at runtime. The application must be ready to provide the OCI 
-library runtime IN data buffers at any time and any number of times. 
-Runtime data is provided in one of the two ways:
-callbacks using a user-defined function which must be registered 
-with a subsequent call to OCIBindDynamic() . 
-a polling mechanism using calls supplied by the OCI. This mode 
-is assumed if no callbacks are defined.
-For more information about using the OCI_DATA_AT_EXEC mode, see 
-the section "Runtime Data Allocation and Piecewise Operations" on 
-page 5-16.
-When the allocated buffers are not required any more, they should be 
-freed by the client. 
-Related Functions
-OCIBindDynamic(), OCIBindObject(), OCIBindArrayOfStruct(), OCIAttrGet()
-
-
-
--------------------------------OCIBindDynamic---------------------------------
-
-OCIBindDynamic()
-Name
-OCI Bind Dynamic Attributes
-Purpose
-This call is used to register user callbacks for dynamic data allocation. 
-Syntax
-sword OCIBindDynamic( OCIBind     *bindp,
-                    OCIError    *errhp,
-                    dvoid       *ictxp, 
-                    OCICallbackInBind         (icbfp)(
-                                dvoid            *ictxp,
-                                OCIBind          *bindp,
-                                ub4              iter, 
-                                ub4              index, 
-                                dvoid            **bufpp,
-                                ub4              *alenp,
-                                ub1              *piecep, 
-                                dvoid            **indp ),
-                    dvoid       *octxp,
-                    OCICallbackOutBind         (ocbfp)(
-                                dvoid            *octxp,
-                                OCIBind          *bindp,
-                                ub4              iter, 
-                                ub4              index, 
-                                dvoid            **bufp, 
-                                ub4              **alenpp,
-                                ub1              *piecep,
-                                dvoid            **indpp, 
-                                ub2              **rcodepp)   );
-Comments
-This call is used to register user-defined callback functions for providing 
-data for an UPDATE or INSERT if OCI_DATA_AT_EXEC mode was specified in a 
-previous call to OCIBindByName() or OCIBindByPos(). 
-The callback function pointers must return OCI_CONTINUE if it the call is 
-successful. Any return code other than OCI_CONTINUE signals that the client 
-wishes to abort processing immediately.
-For more information about the OCI_DATA_AT_EXEC mode, see the section 
-"Runtime Data Allocation and Piecewise Operations" on page 5-16.
-Parameters
-bindp (IN/OUT) - a bind handle returned by a call to OCIBindByName() or 
-OCIBindByPos(). 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-ictxp (IN) - the context pointer required by the call back function icbfp. 
-icbfp (IN) - the callback function which returns a pointer to the IN bind 
-value or piece at run time. The callback takes in the following parameters. 
-ictxp (IN/OUT) - the context pointer for this callback function. 
-bindp (IN) - the bind handle passed in to uniquely identify this bind 
-variable. 
-iter (IN) - 1-based execute iteration value. 
-index (IN) - index of the current array, for an array bind. 1 based not 
-greater than curele parameter of the bind call. 
-index (IN) - index of the current array, for an array bind. This parameter 
-is 1-based, and may not be greater than curele parameter of the bind call. 
-bufpp (OUT) - the pointer to the buffer. 
-piecep (OUT) - which piece of the bind value. This can be one of the 
-following values - OCI_ONE_PIECE, OCI_FIRST_PIECE, 
-OCI_NEXT_PIECE and OCI_LAST_PIECE.
-indp (OUT) - contains the indicator value. This is apointer to either an 
-sb2 value or a pointer to an indicator structure for binding named data 
-types. 
-indszp (OUT) - contains the indicator value size. A pointer containing 
-the size of either an sb2 or an indicator structure pointer. 
-octxp (IN) - the context pointer required by the callback function ocbfp. 
-ocbfp (IN) - the callback function which returns a pointer to the OUT bind 
-value or piece at run time. The callback takes in the following parameters. 
-octxp (IN/OUT) - the context pointer for this call back function. 
-bindp (IN) - the bind handle passed in to uniquely identify this bind 
-variable. 
-iter (IN) - 1-based execute iteration value. 
-index (IN) - index of the current array, for an array bind. This parameter 
-is 1-based, and must not be greater than curele parameter of the bind call. 
-bufpp (OUT) - a pointer to a buffer to write the bind value/piece. 
-buflp (OUT) - returns the buffer size. 
-alenpp (OUT) - a pointer to a storage for OCI to fill in the size of the bind 
-value/piece after it has been read. 
-piecep (IN/OUT) - which piece of the bind value. It will be set by the 
-library to be one of the following values - OCI_ONE_PIECE or 
-OCI_NEXT_PIECE. The callback function can leave it unchanged or set 
-it to OCI_FIRST_PIECE or OCI_LAST_PIECE. By default - 
-OCI_ONE_PIECE. 
-indpp (OUT) - returns a pointer to contain the indicator value which 
-either an sb2 value or a pointer to an indicator structure for named data 
-types. 
-indszpp (OUT) - returns a pointer to return the size of the indicator 
-value which is either size of an sb2 or size of an indicator structure. 
-rcodepp (OUT) - returns a pointer to contains the return code. 
-Related Functions
-OCIAttrGet()
-
-
----------------------------------OCIBindObject--------------------------------
-
-
-OCIBindObject()
-Name
-OCI Bind Object
-Purpose
-This function sets up additional attributes which are required for a named 
-data type (object)  bind.
-Syntax
-sword OCIBindObject ( OCIBind          *bindp,
-                    OCIError         *errhp, 
-                    CONST OCIType    *type,
-                    dvoid            **pgvpp, 
-                    ub4              *pvszsp, 
-                    dvoid            **indpp, 
-                    ub4              *indszp, );
-Comments
-This function sets up additional attributes which binding a named data type 
-or a REF. An error will be returned if this function is called when the OCI 
-environment has been initialized in non-object mode. 
-This call takes as a paramter a type descriptor object (TDO) of datatype 
-OCIType for the named data type being defined.  The TDO can be retrieved 
-with a call to OCITypeByName().
-If the OCI_DATA_AT_EXEC mode was specified in ocibindn() or ocibindp(), the 
-pointers to the IN buffers are obtained either using the callback icbfp 
-registered in the OCIBindDynamic() call or by the OCIStmtSetPieceInfo() call. 
-The buffers are dynamically allocated for the OUT data and the pointers to 
-these buffers are returned either by calling ocbfp() registered by the 
-OCIBindDynamic() or by setting the pointer to the buffer in the buffer passed 
-in by OCIStmtSetPieceInfo() called when OCIStmtExecute() returned 
-OCI_NEED_DATA. The memory of these client library- allocated buffers must be 
-freed when not in use anymore by using the OCIObjectFreee() call.
-Parameters
-bindp ( IN/OUT) - the bind handle returned by the call to OCIBindByName() 
-or OCIBindByPos(). 
-errhp ( IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-type ( IN) - points to the TDO which describes the type of the program 
-variable being bound. Retrieved by calling OCITypeByName().
-pgvpp ( IN/OUT) - points to a pointer to the program variable buffer. For an 
-array, pgvpp points to an array of pointers. When the bind variable is also an 
-OUT variable, the OUT Named Data Type value or REF is allocated 
-(unpickled) in the Object Cache, and a pointer to the value or REF is returned,
-At the end of execute, when all OUT values have been received, pgvpp points 
-to an array of pointer(s) to these newly allocated named data types in the 
-object cache. 
-pgvpp is ignored if the OCI_DATA_AT_EXEC mode is set. Then the Named 
-Data Type buffers are requested at runtime. For static array binds, skip 
-factors may be specified using the OCIBindArrayOfStruct() call. The skip 
-factors are used to compute the address of the next pointer to the value, the 
-indicator structure and their sizes.
-pvszsp ( IN/OUT) - points to the size of the program variable. The size of the 
-named data type is not required on input. For an array, pvszsp is an array of 
-ub4s. On return, for OUT bind variables, this points to size(s) of the Named 
-Data Types and REFs received. pvszsp is ignored if the OCI_DATA_AT_EXEC 
-mode is set. Then the size of the buffer is taken at runtime.
-indpp ( IN/OUT) - points to a pointer to the program variable buffer 
-containing the parallel indicator structure. For an array, points to an array of 
-pointers. When the bind variable is also an OUT bind variable, memory is 
-allocated in the object cache, to store the unpickled OUT indicator values. At 
-the end of the execute when all OUT values have been received, indpp points 
-to the pointer(s) to these newly allocated indicator structure(s). 
-indpp is ignored if the OCI_DATA_AT_EXEC mode is set. Then the indicator 
-is requested at runtime.
-indszp ( IN/OUT) - points to the size of the IN indicator structure program 
-variable. For an array, it is an array of sb2s. On return for OUT bind variables, 
-this points to size(s) of the received OUT indicator structures.
-indszp is ignored if the OCI_DATA_AT_EXEC mode is set. Then the indicator 
-size is requested at runtime.
-Related Functions
-OCIAttrGet()
-
-
-
-----------------------------------OCIBreak------------------------------------
-
-
-OCIBreak()
-Name
-OCI Break
-Purpose
-This call performs an immediate (asynchronous) abort of any currently 
-executing OCI function that is associated with a server .
-Syntax
-sword OCIBreak ( dvoid      *hndlp,
-                 OCIError   *errhp);
-Comments
-This call performs an immediate (asynchronous) abort of any currently 
-executing OCI function that is associated with a server. It is normally used 
-to stop a long-running OCI call being processed on the server.
-This call can take either the service context handle or the server context 
-handle as a parameter to identify the function to be aborted.
-Parameters
-hndlp (IN) - the service context handle or the server context handle.
-errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-Related Functions
-
------------------------------OCIConnectionPoolCreate --------------------------
-Name:
-OCIConnectionPoolCreate
-
-Purpose:
-Creates the connections in the pool
-
-Syntax:
-OCIConnectionPoolCreate (OCIEnv *envhp, OCIError *errhp, OCICPool *poolhp,
-                         OraText **poolName, sb4 *poolNameLen, 
-                         CONST Oratext *dblink, sb4 dblinkLen,
-                         ub4 connMin, ub4 connMax, ub4 connIncr,
-                         CONST OraText *poolUsername, sb4 poolUserLen,
-                         CONST OraText *poolPassword, sb4 poolPassLen, ub4 mode)
-Comments:
-This call is used to create a connection pool. conn_min connections
-to the database are started on calling OCIConnectionPoolCreate.
-
-Parameters:
-envhp (IN/OUT)  - A pointer to the environment where the Conencton Pool
-                  is to be created
-errhp (IN/OUT)  - An error handle which can be passed to OCIErrorGet().
-poolhp (IN/OUT) - An uninitialiazed pool handle.
-poolName (OUT) - The connection pool name. 
-poolNameLen (OUT) - The length of the connection pool name 
-dblink (IN/OUT) - Specifies the database(server) to connect. This will also
-                  be used as the default pool name.
-dblinkLen (IN)  - The length of the string pointed to by dblink.
-connMin (IN)    - Specifies the minimum number of connections in the
-                  Connection Pool at any instant.
-                  connMin number of connections are started when
-                  OCIConnectionPoolCreate() is called.
-connMax (IN)    - Specifies the maximum number of connections that can be
-                  opened to the database. Once this value is reached, no
-                  more connections are opened.
-connIncr (IN)   - Allows application to set the next increment for
-                  connections to be opened to the database if the current
-                  number of connections are less than conn_max.
-poolUsername (IN/OUT) - Connection pooling requires an implicit proxy
-                         session and this attribute provides a username
-                         for that session.
-poolUserLen (IN) - This represents the length of pool_username.
-poolPassword (IN/OUT) - The password for the parameter pool_username passed
-                        above.
-poolPassLen (IN) - This represents the length of pool_password.
-
-mode (IN) - The modes supported are OCI_DEFAULT and 
-OCI_CPOOL_REINITIALIZE 
-
-Related Functions
-OCIConnectionPoolDestroy()
-
----------------------------------------------------------------------------
-
-----------------------------OCIConnectionPoolDestroy-------------------------
-Name:
-OCIConnectionPoolDestroy
-
-Purpose:
-Terminates the connections in the pool
-
-Syntax:
-OCIConnectionPoolDestroy (OCICPool *poolhp, OCIError *errhp, ub4 mode)
-
-Comments:
-On calling OCIConnectionPoolDestroy, all the open connections in the pool
-are closed and the pool is destroyed.
-
-Parameters:
-poolhp (IN/OUT) - An initialiazed pool handle.
-errhp (IN/OUT)  - An error handle which can be passed to OCIErrorGet().
-mode (IN)       - Currently, OCIConnectionPoolDestroy() will support only
-                  the OCI_DEFAULT mode.
-
-Related Functions:
-OCIConnectionPoolCreate()
-
------------------------------------------------------------------------------
-----------------------------OCISessionPoolCreate-----------------------------
-Name: 
-OCISessionPoolCreate
-
-Purpose:
-Creates the sessions in the session pool.
-
-Syntax:
-sword OCISessionPoolCreate (OCIEnv *envhp, OCIError *errhp, OCISpool *spoolhp, 
-                      OraText **poolName, ub4 *poolNameLen, 
-                      CONST OraText *connStr, ub4 connStrLen,
-                      ub4 sessMin, ub4 sessMax, ub4 sessIncr,
-                      OraText *userid, 	ub4 useridLen,
-                      OraText *password, ub4 passwordLen,
-                      ub4 mode)
-
-Comments:
-When OCISessionPoolCreate is called, a session pool is initialized for
-the associated environment and the database specified by the
-connStr parameter. This pool is named uniquely and the name
-is returned to the user in the poolname parameter.
-
-Parameters:
-envhp (IN/OUT) - A pointer to the environment handle in which the session
-                 pool needs to be created.
-errhp (IN/OUT) - An error handle which can be passed to OCIErrorGet().
-spoolhp (IN/OUT) - A pointer to the session pool handle that is created.
-poolName (OUT) - Session pool name returned to the user.
-poolNameLen (OUT) - Length of the PoolName
-connStr (IN) - The TNS alias of the database to connect to.
-connStrLen (IN) - Length of the connStr.
-sessMin (IN) - Specifies the minimum number of sessions in the Session Pool.
-               These are the number of sessions opened in the beginning, if
-               in Homogeneous mode. Else, the parameter is ignored.
-sessMax (IN) - Specifies the maximum number of sessions in the Session Pool.
-               Once this value is reached, no more sessions are opened,
-               unless the OCI_ATTR_SPOOL_FORCEGET is set.
-userid (IN) - Specifies the userid with which to start up the sessions.
-useridLen (IN) - Length of userid.
-password (IN) - Specifies the password for the corresponding userid.
-passwordLen (IN) - Specifies the length of the password
-mode(IN) - May be OCI_DEFAULT, OCI_SPC_SPOOL_REINITIALIZE, or
-           OCI_SPC_SPOOL_HOMOGENEOUS.
-
-Returns:
-SUCCESS - If pool could be allocated and created successfully.
-ERROR - If above conditions could not be met.
-
-Related Functions:
-OCISessionPoolDestroy()
------------------------------------------------------------------------------
------------------------------OCISessionPoolDestroy---------------------------
-Name:
-OCISessionPoolDestroy
-
-Purpose:
-Terminates all the sessions in the session pool.
-
-Syntax:
-sword OCISessionPoolDestroy (OCISPool *spoolhp, OCIError *errhp, ub4 mode)
-
-Comments:
-spoolhp (IN/OUT) - The pool handle of the session pool to be destroyed.
-errhp (IN/OUT) - An error handle which can be passed to OCIErrorGet().
-mode (IN) - Currently only OCI_DEFAULT mode is supported.
-
-Returns:
-SUCCESS - All the sessions could be closed.
-ERROR - If the above condition is not met.
-
-Related Functions:
-OCISessionPoolCreate()
------------------------------------------------------------------------------
--------------------------------OCISessionGet---------------------------------
-Name:
-OCISessionGet
-
-Purpose:
-Get a session. This could be from a session pool, connection pool or
-a new standalone session.
-
-Syntax:
-sword OCISessionGet(OCIenv *envhp, OCIError *errhp, OCISvcCtx **svchp,
-                    OCIAuthInfo *authhp,
-                    OraText *poolName, ub4 poolName_len,
-                    CONST OraText *tagInfo, ub4 tagInfo_len,
-                    OraText **retTagInfo, ub4 *retTagInfo_len,
-                    boolean *found,
-                    ub4 mode)
-
-Comments:
-envhp (IN/OUT) - OCI environment handle.
-errhp (IN/OUT) - OCI error handle to be passed to OCIErrorGet().
-svchp (IN/OUT) - Address of an OCI service context pointer. This will be
-                 filled with a server and session handle, attached to the
-                 pool.
-authhp (IN/OUT) - OCI Authentication Information handle.
-poolName (IN) - This indicates the session/connection pool to get the
-                session/connection from in the OCI_SPOOL/OCI_CPOOL mode.
-                In the OCI_DEFAULT mode it refers to the connect string.
-poolName_len (IN) - length of poolName.
-tagInfo (IN) - indicates the tag of the session that the user wants. If the
-                   user wants a default session, he must specify a NULL here.
-                   Only used for Session Pooling.
-tagInfo_len (IN) - the length of tagInfo.
-retTagInfo (OUT) - This indicates the type of session that is returned to
-                   the user. Only used for Session Pooling.
-retTagInfo_len (OUT) - the length of retTagInfo.
-found (OUT) - set to true if the user gets a session he had requested, else
-              set to false. Only used for Session Pooling.
-mode (IN) - The supported modes are OCI_DEFAULT, OCI_CRED_PROXY and
-            OCI_GET_SPOOL_MATCHANY, OCI_SPOOL and OCI_CPOOL. OCI_SPOOL and
-            OCI_CPOOL are mutually exclusive.
-
-Returns:
-SUCCESS -  if a session was successfully returned into svchp.
-SUCCESS_WITH_INFO - if a session was successfully returned into svchp and the
-                    total number of sessions > maxsessions. Only valid for
-                    Session Pooling.
-ERROR - If a session could not be retrieved.
-
-Related Functions:
-OCISessionRelease()
------------------------------------------------------------------------------
----------------------------OCISessionRelease---------------------------------
-Name:
-OCISessionRelease
-
-Purpose:
-Release the session.
-
-Syntax:
-sword OCISessionRelease ( OCISvcCtx *svchp, OCIError *errhp,
-                          OraText *tag, ub4 tag_len,
-                          ub4 mode);
-
-Comments:
-svchp (IN/OUT) - The service context associated with the session/connection.
-errhp (IN/OUT) - OCI error handle to be passed to OCIErrorGet().
-tag (IN) - Only used for Session Pooling.
-           This parameter will be ignored unless mode OCI_RLS_SPOOL_RETAG is
-           specified. In this case, the session is labelled with this tag and
-           returned to the pool. If this is NULL, then the session is untagged.
-tag_len (IN) - Length of the tag. This is ignored unless mode 
-               OCI_RLS_SPOOL_RETAG is set.
-mode (IN) - The supported modes are OCI_DEFAULT, OCI_RLS_SPOOL_DROPSESS,
-            OCI_RLS_SPOOL_RETAG. The last 2 are only valid for Session Pooling.
-            When OCI_RLS_SPOOL_DROPSESS is specified, the session
-            will be removed from the session pool. If OCI_RLS_SPOOL_RETAG 
-            is set, the tag on the session will be altered. If this mode is 
-            not set, the tag and tag_len parameters will be ignored.
-
-Returns:
-ERROR - If the session could not be released successfully.
-SUCCESS - In all other cases.
-
-Related Functions:
-OCISessionGet().
------------------------------------------------------------------------------
-------------------------------OCIDateTimeAssign --------------------------
-sword OCIDateTimeAssign(dvoid *hndl, OCIError *err, CONST OCIDateTime *from, 
-		        OCIDateTime *to);
-NAME: OCIDateTimeAssign - OCIDateTime Assignment
-PARAMETERS:
-hndl (IN) - Session/Env handle.
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-from (IN) - datetime to be assigned
-to (OUT) - lhs of assignment
-DESCRIPTION:
-        Performs date assignment. The type of the output will be same as that
-	of input
-
-------------------------------OCIDateTimeCheck----------------------------
-sword OCIDateTimeCheck(dvoid *hndl, OCIError *err, CONST OCIDateTime *date, 
-		 ub4 *valid );
-NAME: OCIDateTimeCheck - OCIDateTime CHecK if the given date is valid
-PARAMETERS:
-hndl (IN) - Session/Env handle. 
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-date (IN) - date to be checked
-valid (OUT) -  returns zero for a valid date, otherwise 
-  		the ORed combination of all error bits specified below:
-   Macro name                   Bit number      Error
-   ----------                   ----------      -----
-   OCI_DATE_INVALID_DAY         0x1             Bad day
-   OCI_DATE_DAY_BELOW_VALID     0x2             Bad DAy Low/high bit (1=low)
-   OCI_DATE_INVALID_MONTH       0x4             Bad MOnth
-   OCI_DATE_MONTH_BELOW_VALID   0x8             Bad MOnth Low/high bit (1=low)
-   OCI_DATE_INVALID_YEAR        0x10            Bad YeaR
-   OCI_DATE_YEAR_BELOW_VALID    0x20            Bad YeaR Low/high bit (1=low)
-   OCI_DATE_INVALID_HOUR        0x40            Bad HouR
-   OCI_DATE_HOUR_BELOW_VALID    0x80            Bad HouR Low/high bit (1=low)
-   OCI_DATE_INVALID_MINUTE      0x100           Bad MiNute
-   OCI_DATE_MINUTE_BELOW_VALID	0x200           Bad MiNute Low/high bit (1=low)
-   OCI_DATE_INVALID_SECOND      0x400           Bad SeCond
-   OCI_DATE_SECOND_BELOW_VALID  0x800           bad second Low/high bit (1=low)
-   OCI_DATE_DAY_MISSING_FROM_1582 0x1000        Day is one of those "missing"
-                                                from 1582
-   OCI_DATE_YEAR_ZERO           0x2000          Year may not equal zero
-   OCI_DATE_INVALID_TIMEZONE    0x4000          Bad Timezone
-   OCI_DATE_INVALID_FORMAT      0x8000          Bad date format input
-
-   So, for example, if the date passed in was 2/0/1990 25:61:10 in
-   (month/day/year hours:minutes:seconds format), the error returned
-   would be OCI_DATE_INVALID_DAY | OCI_DATE_DAY_BELOW_VALID |
-   OCI_DATE_INVALID_HOUR | OCI_DATE_INVALID_MINUTE
-
-DESCRIPTION:
-  	Check if the given date is valid.
-RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-  	  'date' and 'valid' pointers are NULL pointers
-
-------------------------------- OCIDateTimeCompare----------------------------
-sword OCIDateTimeCompare(dvoid *hndl, OCIError *err, CONST OCIDateTime *date1, 
-                     CONST OCIDateTime *date2,  sword *result );
-NAME: OCIDateTimeCompare - OCIDateTime CoMPare dates
-PARAMETERS:
-hndl (IN) - Session/Env handle. 
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-date1, date2 (IN) - dates to be compared
-result (OUT) - comparison result, 0 if equal, -1 if date1 < date2, 
-  		1 if date1 > date2
-DESCRIPTION:
-The function OCIDateCompare compares two dates. It returns -1 if 
-date1 is smaller than date2, 0 if they are equal, and 1 if date1 is 
-greater than date2.
-RETURNS:
-       OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-  	  invalid date
-	  input dates are not mutually comparable
-
-------------------------------OCIDateTimeConvert----------------------
-sword OCIDateTimeConvert(dvoid *hndl, OCIError *err, OCIDateTime *indate, 
-				OCIDateTime *outdate);
-NAME: OCIDateTimeConvert - Conversion between different DATETIME types
-PARAMETERS:
-hndl (IN) - Session/Env handle. 
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-indate (IN) - pointer to input date
-outdate (OUT) - pointer to output datetime 
-DESCRIPTION: Converts one datetime type to another. The result type is
-       the type of the 'outdate' descriptor.
-RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-	OCI_ERROR if
-	    conversion not possible.
-   
----------------------------- OCIDateTimeFromText-----------------------
-sword OCIDateTimeFromText(dvoid *hndl, OCIError *err, CONST OraText *date_str, 
-             size_t d_str_length, CONST OraText *fmt, ub1 fmt_length,
-             CONST OraText *lang_name, size_t lang_length, OCIDateTime *date );
-NAME: OCIDateTimeFromText - OCIDateTime convert String FROM Date
-PARAMETERS:
-hndl (IN) - Session/Env handle. If Session Handle is passed, the 
-		    conversion takes place in session NLS_LANGUAGE and
-		    session NLS_CALENDAR, otherwise the default is used.
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-date_str (IN) - input string to be converted to Oracle date
-d_str_length (IN) - size of the input string, if the length is -1
-  		then 'date_str' is treated as a null terminated  string
-fmt (IN) - conversion format; if 'fmt' is a null pointer, then
-                the string is expected to be in the default format for
-		the datetime type.
-fmt_length (IN) - length of the 'fmt' parameter
-lang_name (IN) - language in which the names and abbreviations of
-  	        days and months are specified, if null i.e. (OraText *)0,
-  		the default language of session is used, 
-lang_length (IN) - length of the 'lang_name' parameter
-date (OUT) - given string converted to date
-DESCRIPTION:
-  	Converts the given string to Oracle datetime type set in the 
-        OCIDateTime descriptor according to the specified format. Refer to 
-        "TO_DATE" conversion function described in "Oracle SQL Language 
-        Reference Manual" for a description of format.
-RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-  	  invalid format
-  	  unknown language
-  	  invalid input string
-
---------------------------- OCIDateTimeGetDate-------------------------
-sword OCIDateTimeGetDate(dvoid *hndl, OCIError *err,  CONST OCIDateTime *date, 
-	                   sb2 *year, ub1 *month, ub1 *day );
-NAME: OCIDateTimeGetDate - OCIDateTime Get Date (year, month, day)  
-				portion of DATETIME. 
-PARAMETERS:
-hndl (IN) - Session/Env handle. 
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-datetime (IN) - Pointer to OCIDateTime 
-year      (OUT) - year value
-month     (OUT) - month value
-day       (OUT) - day value
-
---------------------------- OCIDateTimeGetTime ------------------------
-sword OCIDateTimeGetTime(dvoid *hndl, OCIError *err, OCIDateTime *datetime,
-		 ub1 *hour, ub1 *minute, ub1 *sec, ub4 *fsec);
-NAME: OCIDateTimeGetTime - OCIDateTime Get Time (hour, min, second, 
-			fractional second)  of DATETIME. 
-PARAMETERS:
-hndl (IN) - Session/Env handle. 
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-datetime (IN) - Pointer to OCIDateTime 
-hour      (OUT) - hour value
-minute       (OUT) - minute value
-sec       (OUT) - second value
-fsec      (OUT) - Fractional Second value
-
---------------------------- OCIDateTimeGetTimeZoneOffset ----------------------
-sword OCIDateTimeGetTimeZoneOffset(dvoid *hndl,OCIError *err,CONST 
-              OCIDateTime *datetime,sb1 *hour,sb1  *minute);
-
-NAME: OCIDateTimeGetTimeZoneOffset - OCIDateTime Get TimeZone (hour, minute)  
-                         portion of DATETIME. 
-PARAMETERS:
-hndl (IN) - Session/Env handle. 
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-datetime (IN) - Pointer to OCIDateTime 
-hour      (OUT) - TimeZone Hour value
-minute     (OUT) - TimeZone Minute value
-
---------------------------- OCIDateTimeSysTimeStamp---------------------
-sword OCIDateTimeSysTimeStamp(dvoid *hndl, OCIError *err, 
-              OCIDateTime *sys_date );
- 
-NAME: OCIDateTimeSysTimeStamp - Returns system date/time as a TimeStamp with 
-                      timezone
-PARAMETERS:
-hndl (IN) - Session/Env handle. 
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-sys_date (OUT) - Pointer to output timestamp
- 
-DESCRIPTION: 
-        Gets the system current date and time as a timestamp with timezone
-RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-
-
-------------------------------OCIDateTimeIntervalAdd----------------------
-sword OCIDateTimeIntervalAdd(dvoid *hndl, OCIError *err, OCIDateTime *datetime,
-	 OCIInterval *inter, OCIDateTime *outdatetime);
-NAME: OCIDateTimeIntervalAdd - Adds an interval to datetime
-PARAMETERS:
-hndl (IN) - Session/Env handle.
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-datetime (IN) - pointer to input datetime
-inter    (IN) - pointer to interval 
-outdatetime (IN) - pointer to output datetime. The output datetime 
-				will be of same type as input datetime
-DESCRIPTION: 
-	Adds an interval to a datetime to produce a resulting datetime
-RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-	OCI_ERROR if:
-		resulting date is before Jan 1, -4713
-		resulting date is after Dec 31, 9999
-
-------------------------------OCIDateTimeIntervalSub----------------------
-sword OCIDateTimeIntervalSub(dvoid *hndl, OCIError *err, OCIDateTime *datetime,
-              OCIInterval *inter, OCIDateTime *outdatetime);
-NAME: OCIDateTimeIntervalSub - Subtracts an interval from a datetime
-PARAMETERS:
-hndl (IN) - Session/Env handle. 
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-datetime (IN) - pointer to input datetime
-inter    (IN) - pointer to interval 
-outdatetime (IN) - pointer to output datetime. The output datetime 
-				will be of same type as input datetime
-DESCRIPTION: 
- 	Subtracts an interval from a datetime and stores the result in a
-     	datetime
-RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-	OCI_ERROR if:
-		resulting date is before Jan 1, -4713
-		resulting date is after Dec 31, 9999
-
---------------------------- OCIDateTimeConstruct-------------------------
-sword OCIDateTimeConstruct(dvoid  *hndl,OCIError *err,OCIDateTime *datetime,
-               sb2 year,ub1 month,ub1 day,ub1 hour,ub1 min,ub1 sec,ub4 fsec,
-               OraText  *timezone,size_t timezone_length);
-
-NAME: OCIDateTimeConstruct - Construct an OCIDateTime. Only the relevant
-       fields for the OCIDateTime descriptor types are used.
-PARAMETERS:
-        hndl (IN) - Session/Env handle. 
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-        datetime (IN) - Pointer to OCIDateTime 
-        year      (IN) - year value
-        month     (IN) - month value
-        day       (IN) - day value        
-        hour      (IN) - hour value
-        min       (IN) - minute value
-        sec       (IN) - second value
-        fsec      (IN) - Fractional Second value
-        timezone  (IN) - Timezone string
-        timezone_length(IN) - Length of timezone string
-
-DESCRIPTION:
-       Constructs a DateTime descriptor. The type of the datetime is the
-       type of the OCIDateTime descriptor. Only the relevant fields based
-       on the type are used. For Types with timezone, the date and time
-       fields are assumed to be in the local time of the specified timezone.
-       If timezone is not specified, then session default timezone is
-       assumed.
-RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_ERROR if datetime is not valid.
-
-------------------------------OCIDateTimeSubtract-----------------------
-sword OCIDateTimeSubtract(dvoid *hndl, OCIError *err, OCIDateTime *indate1, 
-		OCIDateTime *indate2, OCIInterval *inter);
-NAME: OCIDateTimeSubtract - subtracts two datetimes to return an interval
-PARAMETERS:
-hndl (IN) - Session/Env handle. 
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-indate1(IN) - pointer to subtrahend
-indate2(IN) - pointer to minuend
-inter  (OUT) - pointer to output interval
-DESCRIPTION: 
-	Takes two datetimes as input and stores their difference in an 
-        interval. The type of the interval is the type of the 'inter'
-        descriptor.
-RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-	OCI_ERROR if
-	   datetimes are not comparable.
-
---------------------------- OCIDateTimeToText--------------------------
-sword OCIDateTimeToText(dvoid *hndl, OCIError *err, CONST OCIDateTime *date, 
-                        CONST OraText *fmt, ub1 fmt_length, ub1 fsprec, 
-                        CONST OraText *lang_name, size_t lang_length, 
-                        ub4 *buf_size, OraText *buf );
-NAME: OCIDateTimeToText - OCIDateTime convert date TO String 
-PARAMETERS:
-hndl (IN) - Session/Env handle. If Session Handle is passed, the 
-		    conversion takes place in session NLS_LANGUAGE and
-		    session NLS_CALENDAR, otherwise the default is used.
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-date (IN) - Oracle datetime to be converted
-fmt (IN) - conversion format, if null string pointer (OraText*)0, then
-                the date is converted to a character string in the
-                default format for that type.
-fmt_length (IN) - length of the 'fmt' parameter
-fsprec (IN) - specifies the fractional second precision in which the
-               fractional seconds is returned.
-lang_name (IN) - specifies the language in which the names and 
-  	        abbreviations of months and days are returned;
-  	        default language of session is used if 'lang_name' 
-  		is null i.e. (OraText *)0
-lang_length (IN) - length of the 'nls_params' parameter
-buf_size (IN/OUT) - size of the buffer; size of the resulting string
-                is returned via this parameter
-buf (OUT) - buffer into which the converted string is placed
-DESCRIPTION:
-        Converts the given date to a string according to the specified format.
-        Refer to "TO_DATE" conversion function described in
-        "Oracle SQL Language Reference Manual" for a description of format
-        and NLS arguments. The converted null-terminated date string is
-        stored in the buffer 'buf'.
-RETURNS:
-        OCI_SUCCESS if the function completes successfully.
-        OCI_INVALID_HANDLE if 'err' is NULL.
-        OCI_ERROR if
-  	  buffer too small
-  	  invalid format
-  	  unknown language
-          overflow error
-
-----------------------------OCIDateTimeGetTimeZoneName------------------------
-sword OCIDateTimeGetTimeZoneName(dvoid *hndl, 
-                                 OCIError *err,
-                                 CONST OCIDateTime *datetime,
-                                 ub1 *buf,
-                                 ub4 *buflen);
-NAME OCIDateTimeGetTimeZoneName - OCI DateTime Get the Time Zone Name
-PARAMETERS:
-hndl (IN)      - Session/Env handle.
-err (IN/OUT)   - error handle. If there is an error, it is
-                 recorded in 'err' and this function returns OCI_ERROR.
-                 The error recorded in 'err' can be retrieved by calling
-                 OCIErrorGet().
-datetime (IN)   - Pointer to an OCIDateTime.
-buf (OUT)       - User allocated storage for name string.
-buflen (IN/OUT) - length of buf on input, length of name on out
-DESCRIPTION:
-        Returns either the timezone region name or the absolute hour and minute
-        offset. If the DateTime was created with a region id then the region 
-        name will be returned in the buf.  If the region id is zero, then the 
-        hour and minute offset is returned as "[-]HH:MM".
-RETURNS:
-       OCI_SUCCESS if the function completes successfully.
-       OCI_INVALID_HANDLE if 'err' is NULL.
-       OCI_ERROR if
-         buffer too small
-         error retrieving timezone data
-         invalid region 
-         invalid LdiDateTime type
-
----------------------------------OCIDateTimeToArray----------------------------
-sword OCIDateTimeToArray(dvoid *hndl, 
-                         OCIError *err,
-                         CONST OCIDateTime *datetime,
-                         CONST OCIInterval *reftz,
-                         ub1 *outarray,
-                         ub4 *len
-                         ub1 *fsprec);
-NAME OCIDateTimeToArray - OCI DateTime convert To Array format
-PARAMETERS:
-hndl (IN)      - Session/Env handle.
-err (IN/OUT)   - error handle. If there is an error, it is
-                 recorded in 'err' and this function returns OCI_ERROR.
-                 The error recorded in 'err' can be retrieved by calling
-                 OCIErrorGet().
-datetime (IN)   - Pointer to OCIDateTime to be converted.
-outarray (OUT)  - Result array storage
-len (OUT)        - pointer to  length of outarray.
-fsprec (IN)     - Number of fractional seconds digits.
-DESCRIPTION:
-        Returns an array representing the input DateTime descriptor.
-RETURNS:
-       OCI_SUCCESS if the function completes successfully.
-       OCI_INVALID_HANDLE if 'err' is NULL.
-       OCI_ERROR if
-         buffer too small
-         error retrieving timezone data
-         invalid region 
-         invalid LdiDateTime type
-
---------------------------------OCIDateTimeFromArray---------------------------
-sword OCIDateTimeFromArray(dvoid *hndl, 
-                         OCIError *err,
-                         ub1 *inarray,
-                         ub4 len
-                         ub1 type
-                         OCIDateTime *datetime,
-                         OCIInterval *reftz,
-                         ub1 fsprec);
-NAME OCIDateTimeFromArray - OCI DateTime convert From Array format
-PARAMETERS:
-hndl (IN)      - Session/Env handle.
-err (IN/OUT)   - error handle. If there is an error, it is
-                 recorded in 'err' and this function returns OCI_ERROR.
-                 The error recorded in 'err' can be retrieved by calling
-                 OCIErrorGet().
-inarray (IN)   - Pointer to input array representtion of DateTime
-len (IN)       - len of inarray.
-type (IN)      - One of SQLT_DATE, SQLT_TIME, SQLT_TIME_TZ, SQLT_TIMESTAMP,
-                 SQLT_TIMESTAMP_TZ, or SQLT_TIMESTAMP_LTZ.
-datetime (OUT) - Pointer to the result OCIDateTime.
-reftz (IN)     - timezone interval used with SQLT_TIMESTAMP_LTZ.
-fsprec (IN)    - fractionl seconds digits of precision (0-9).
-DESCRIPTION:
-        Returns a pointer to an OCIDateTime of type type converted from 
-        the inarray.
-RETURNS:
-       OCI_SUCCESS if the function completes successfully.
-       OCI_INVALID_HANDLE if 'err' is NULL.
-       OCI_ERROR if
-         buffer too small
-         error retrieving timezone data
-         invalid region 
-         invalid LdiDateTime type
-
-----------------------------------OCIRowidToChar-----------------------------
-Name
-OCIRowidToChar
-
-Purpose
-Converts physical/logical (universal) ROWID to chracter extended (Base 64) 
-representation into user provided buffer outbfp of length outbflp. After 
-execution outbflp contains amount of bytes converted.In case of truncation 
-error, outbflp contains required size to make this conversion successful
-and returns ORA-1405.
-
-Syntax
-sword OCIRowidToChar( OCIRowid *rowidDesc, 
-                      OraText *outbfp, 
-                      ub2 *outbflp, 
-                      OCIError *errhp)
-
-Comments
-After this conversion, ROWID in character format can be bound using
-OCIBindByPos or OCIBindByName call and used to query a row at a
-desired ROWID. 
-
-Parameters
-rowidDesc (IN)   - rowid DESCriptor which is allocated from OCIDescritorAlloc
-                   and populated by a prior SQL statement execution
-outbfp (OUT)     - pointer to the buffer where converted rowid in character 
-                   representation is stored after successful execution.
-outbflp (IN/OUT) - pointer to output buffer length variable.
-                   Before execution (IN mode) *outbflp contains the size of
-                   outbfp, after execution (OUT mode) *outbflp contains amount
-                   of bytes converted. In an event of truncation during 
-                   conversion *outbflp contains the required length to make
-                   conversion successful.
-errhp (IN/OUT)   - an error handle which can be passed to OCIErrorGet() for
-                   diagnostic information in the event of an error.
-
-------------------------------OCIDefineArrayOfStruct--------------------------
-
-
-OCIDefineArrayOfStruct()
-Name
-OCI Define for Array of Structures
-Purpose
-This call specifies additional attributes necessary for a static array define.
-Syntax
-sword OCIDefineArrayOfStruct ( OCIDefine   *defnp,
-                             OCIError    *errhp,
-                             ub4         pvskip, 
-                             ub4         indskip, 
-                             ub4         rlskip,
-                             ub4         rcskip );
-Comments
-This call specifies additional attributes necessary for an array define, used in 
-an array of structures (multi-row, multi-column) fetch.
-For more information about skip parameters, see the section "Skip Parameters" 
-on page 4-17.
-Parameters
-defnp (IN) - the handle to the define structure which was returned by a call 
-to OCIDefineByPos().
-errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-pvskip (IN) - skip parameter for the next data value.
-indskip (IN) - skip parameter for the next indicator location. 
-rlskip (IN) - skip parameter for the next return length value.
-rcskip (IN) - skip parameter for the next return code.
-Related Functions
-OCIAttrGet()
-
-
-
-
-
-OCIDefineByPos()
-Name
-OCI Define By Position
-Purpose
-Associates an item in a select-list with the type and output data buffer. 
-Syntax
-sb4 OCIDefineByPos ( 
-              OCIStmt     *stmtp, 
-              OCIDefine   **defnp,
-              OCIError    *errhp,
-              ub4         position,
-              dvoid       *valuep,
-              sb4         value_sz,
-              ub2         dty,
-              dvoid       *indp,
-              ub2         *rlenp,
-              ub2         *rcodep,
-              ub4         mode );
-Comments
-This call defines an output buffer which will receive data retreived from 
-Oracle. The define is a local step which is necessary when a SELECT statement 
-returns data to your OCI application.
-This call also implicitly allocates the define handle for the select-list item.
-Defining attributes of a column for a fetch is done in one or more calls. The 
-first call is to OCIDefineByPos(), which defines the minimal attributes 
-required to specify the fetch. 
-This call takes as a parameter a define handle, which must have been 
-previously allocated with a call to OCIHandleAlloc().
-Following the call to OCIDefineByPos() additional define calls may be 
-necessary for certain data types or fetch modes:
-A call to OCIDefineArrayOfStruct() is necessary to set up skip parameters 
-for an array fetch of multiple columns.
-A call to OCIDefineObject() is necessary to set up the appropriate 
-attributes of a named data type fetch. In this case the data buffer pointer 
-in ocidefn() is ignored.
-Both OCIDefineArrayOfStruct() and OCIDefineObject() must be called 
-after ocidefn() in order to fetch multiple rows with a column of named 
-data types.
-For a LOB define, the buffer pointer must be a lob locator of type 
-OCILobLocator , allocated by the OCIDescAlloc() call. LOB locators, and not 
-LOB values, are always returned for a LOB column. LOB values can then be 
-fetched using OCI LOB calls on the fetched locator.
-For NCHAR (fixed and varying length), the buffer pointer must point to an 
-array of bytes sufficient for holding the required NCHAR characters. 
-Nested table columns are defined and fetched like any other named data type. 
-If the mode parameter is this call is set to OCI_DYNAMIC_FETCH, the client 
-application can fetch data dynamically at runtime.
-Runtime data can be provided in one of two ways:
-callbacks using a user-defined function which must be registered with a 
-subsequent call to OCIDefineDynamic(). When the client library needs a 
-buffer to return the fetched data, the callback will be invoked and the 
-runtime buffers provided will return a piece or the whole data. 
-a polling mechanism using calls supplied by the OCI. This mode is 
-assumed if no callbacks are defined. In this case, the fetch call returns the 
-OCI_NEED_DATA error code, and a piecewise polling method is used 
-to provide the data.
-Related Functions: For more information about using the 
-OCI_DYNAMIC_FETCH mode, see the section "Runtime Data 
-Allocation and Piecewise Operations" on page 5-16 of Volume 1..
-For more information about the define step, see the section "Defining" 
-on page 2-30.
-Parameters
-stmtp (IN) - a handle to the requested SQL query operation.
-defnp (IN/OUT) - a pointer to a pointer to a define handle which is implicitly 
-allocated by this call.  This handle is used to  store the define information 
-for this column.
-errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-position (IN) - the position of this value in the select list. Positions are 
-1-based and are numbered from left to right. For example, in the SELECT 
-statement
-SELECT empno, ssn, mgrno FROM employees;
-empno is at position 1, ssn is at position 2, and mgrno is at position 3.
-valuep (IN/OUT) - a pointer to a buffer or an array of buffers of the type 
-specified in the dty parameter. A number of buffers can be specified when 
-results for more than one row are desired in a single fetch call.
-value_sz (IN) - the size of each valuep buffer in bytes. If the data is stored 
-internally in VARCHAR2 format, the number of characters desired, if different 
-from the buffer size in bytes, may be additionally specified by the using 
-OCIAttrSet(). 
-In an NLS conversion environment, a truncation error will be generated if the 
-number of bytes specified is insufficient to handle the number of characters 
-desired.
-dty (IN) - the data type. Named data type (SQLT_NTY) and REF (SQLT_REF) 
-are valid only if the environment has been intialized with in object mode. 
-indp - pointer to an indicator variable or array. For scalar data types, 
-pointer to sb2 or an array of sb2s. Ignored for named data types. For named 
-data types, a pointer to a named data type indicator structure or an array of 
-named data type indicator structures is associated by a subsequent 
-OCIDefineObject() call. 
-See the section "Indicator Variables" on page 2-43 for more information about 
-indicator variables.
-rlenp (IN/OUT) - pointer to array of length of data fetched. Each element in 
-rlenp is the length of the data in the corresponding element in the row after 
-the fetch. 
-rcodep (OUT) - pointer to array of column-level return codes
-mode (IN) - the valid modes are:
-OCI_DEFAULT. This is the default mode.
-OCI_DYNAMIC_FETCH. For applications requiring dynamically 
-allocated data at the time of fetch, this mode must be used. The user may 
-additionally call OCIDefineDynamic() to set up a callback function that 
-will be invoked to receive the dynamically allocated buffers and to set 
-up the memory allocate/free callbacks and the context for the callbacks. 
-valuep and value_sz are ignored in this mode. 
-Related Functions
-OCIDefineArrayOfStruct(), OCIDefineDynamic(), OCIDefineObject()
-
-
-
-
-OCIDefineDynamic()
-Name
-OCI Define Dynamic Fetch Attributes
-Purpose
-This call is used to set the additional attributes required if the 
-OCI_DYNAMIC_FETCH mode was selected in OCIDefineByPos(). 
-Syntax
-sword OCIDefineDynamic( OCIDefine   *defnp,
-                      OCIError    *errhp,
-                      dvoid       *octxp, 
-                      OCICallbackDefine (ocbfp)(
-                                  dvoid             *octxp,
-                                  OCIDefine         *defnp,
-                                  ub4               iter, 
-                                  dvoid             **bufpp,
-                                  ub4               **alenpp,
-                                  ub1               *piecep,
-                                  dvoid             **indpp,
-                                  ub2               **rcodep)  );
-Comments
-This call is used to set the additional attributes required if the 
-OCI_DYNAMIC_FETCH mode has been selected in a call to 
-OCIDefineByPos(). 
-When the OCI_DYNAMIC_FETCH mode is selected, buffers will be 
-dynamically allocated for REF, and named data type, values to receive the 
-data. The pointers to these buffers will be returned. 
-If OCI_DYNAMIC_FETCH mode was selected, and the call to 
-OCIDefineDynamic() is skipped, then the application can fetch data piecewise 
-using OCI calls.
-For more information about OCI_DYNAMIC_FETCH mode, see the section 
-"Runtime Data Allocation and Piecewise Operations" on page 5-16.
-Parameters
-defnp (IN/OUT) - the handle to a define structure returned by a call to 
-OCIDefineByPos().
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-octxp (IN) - points to a context for the callback function. 
-ocbfp (IN) - points to a callback function. This is invoked at runtime to get 
-a pointer to the buffer into which the fetched data or a piece of it will be 
-retreived. The callback also specifies the indicator, the return code and the 
-lengths of the data piece and indicator. The callback has the following 
-parameters:
-octxp (IN) - a context pointer passed as an argument to all the callback 
-functions.
-defnp (IN) - the define handle.
-iter (IN) - which row of this current fetch.
-bufpp (OUT) - returns a pointer to a buffer to store the column value, ie. 
-*bufp points to some appropriate storage for the column value.
-alenpp (OUT) - returns a pointer to the length of the buffer. *alenpp 
-contains the size of the buffer after return from callback. Gets set to 
-actual data size after fetch.
-piecep (IN/OUT) - returns a piece value, as follows:
-The IN value can be OCI_ONE_PIECE, OCI_FIRST_PIECE or 
-OCI_NEXT_PIECE.
-The OUT value can be OCI_ONE_PIECE if the IN value was 
-OCI_ONE_PIECE.
-The OUT value can be OCI_ONE_PIECE or OCI_FIRST_PIECE if 
-the IN value was OCI_FIRST_PIECE.
-The OUT value can only be OCI_NEXT_PIECE or 
-OCI_LAST_PIECE if the IN value was OCI_NEXT_PIECE. 
-indpp (IN) - indicator variable pointer
-rcodep (IN) - return code variable pointer
-Related Functions
-OCIAttrGet()
-OCIDefineObject()
-
-
-
-
-OCIDefineObject()
-Name
-OCI Define Named Data Type attributes
-Purpose
-Sets up additional attributes necessary for a Named Data Type define.
-Syntax
-sword OCIDefineObject ( OCIDefine       *defnp,
-                      OCIError        *errhp,
-                      CONST OCIType   *type,
-                      dvoid           **pgvpp, 
-                      ub4             *pvszsp, 
-                      dvoid           **indpp, 
-                      ub4             *indszp );
-Comments
-This call sets up additional attributes necessary for a Named Data Type define.An error will be returned if this function is called when the OCI environment 
-has been initialized in non-Object mode.
-This call takes as a paramter a type descriptor object (TDO) of datatype 
-OCIType for the named data type being defined.  The TDO can be retrieved 
-with a call to OCITypeByName().
-See the description of OCIInitialize() on page 13 - 43 for more information 
-about initializing the OCI process environment.
-Parameters
-defnp (IN/OUT) - a define handle previously allocated in a call to 
-OCIDefineByPos(). 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-type (IN, optional) - points to the Type Descriptor Object (TDO) which 
-describes the type of the program variable. Only used for program variables 
-of type SQLT_NTY. This parameter is optional, and may be passed as NULL 
-if it is not being used.
-pgvpp (IN/OUT) - points to a pointer to a program variable buffer. For an 
-array, pgvpp points to an array of pointers. Memory for the fetched named data 
-type instance(s) is dynamically allocated in the object cache. At the end of the 
-fetch when all the values have been received, pgvpp points to the pointer(s) to
-these newly allocated named data type instance(s). The application must call 
-OCIObjectMarkDel() to deallocate the named data type instance(s) when they 
-are no longer needed. 
-pvszsp (IN/OUT) - points to the size of the program variable. For an array, it 
-is an array of ub4s. On return points to the size(s) of unpickled fetched 
-values.
-indpp (IN/OUT) - points to a pointer to the program variable buffer 
-containing the parallel indicator structure. For an array, points to an array 
-of pointers. Memory is allocated to store the indicator structures in the 
-object cache. At the end of the fetch when all values have been received, 
-indpp points to the pointer(s) to these newly allocated indicator structure(s).
-indszp (IN/OUT) - points to the size(s) of the indicator structure program 
-variable. For an array, it is an array of ub4s. On return points to the size(s)
-of the unpickled fetched indicator values.
-Related Functions
-OCIAttrGet()
-
-
-
-OCIDescAlloc()
-Name
-OCI Get DESCriptor or lob locator
-Purpose
-Allocates storage to hold certain data types. The descriptors can be used as 
-bind or define variables.
-Syntax
-sword OCIDescAlloc ( CONST dvoid   *parenth,
-                   dvoid         **descpp, 
-                   ub4           type,
-                   size_t        xtramem_sz,
-                   dvoid         **usrmempp);
-Comments
-Returns a pointer to an allocated and initialized structure, corresponding to 
-the type specified in type. A non-NULL descriptor or LOB locator is returned 
-on success. No diagnostics are available on error.
-This call returns OCI_SUCCESS if successful, or OCI_INVALID_HANDLE if 
-an out-of-memory error occurs. 
-Parameters
-parenth (IN) - an environment handle. 
-descpp (OUT) - returns a descriptor or LOB locator of desired type. 
-type (IN) - specifies the type of descriptor or LOB locator to be allocated. 
-The specific types are:
-OCI_DTYPE_SNAP - specifies generation of snapshot descriptor of C 
-type - OCISnapshot
-OCI_DTYPE_LOB - specifies generation of a LOB data type locator of C 
-type - OCILobLocator
-OCI_DTYPE_RSET - specifies generation of a descriptor of C type 
-OCIResult that references a result set (a number of rows as a result of a 
-query). This descriptor is bound to a bind variable of data type 
-SQLT_RSET (result set). The descriptor has to be converted into a 
-statement handle using a function - OCIResultSetToStmt() - which can 
-then be passed to OCIDefineByPos() and OCIStmtFetch() to retrieve the 
-rows of the result set.
-OCI_DTYPE_ROWID - specifies generation of a ROWID descriptor of C 
-type OCIRowid.
-OCI_DTYPE_COMPLEXOBJECTCOMP - specifies generation of a 
-complex object retrieval descriptor of C type 
-OCIComplexObjectComp.
-xtramemsz (IN) - specifies an amount of user memory to be allocated for use 
-by the application. 
-usrmempp (OUT) - returns a pointer to the user memory of size xtramemsz 
-allocated by the call for the user. 
-Related Functions
-OCIDescFree()
-
-
-
-
-OCIDescFree()
-Name
-OCI Free DESCriptor
-Purpose
-Deallocates a previously allocated descriptor.
-Syntax
-sword OCIDescFree ( dvoid    *descp,
-                  ub4      type);
-Comments
-This call frees up storage associated with the descriptor, corresponding to the
-type specified in type. Returns OCI_SUCCESS or OCI_INVALID_HANDLE. 
-All descriptors must be explicitly deallocated. OCI will not deallocate a 
-descriptor if the environment handle is deallocated.
-Parameters
-descp (IN) - an allocated descriptor. 
-type (IN) - specifies the type of storage to be freed. The specific types are: 
-OCI_DTYPE_SNAP - snapshot descriptor
-OCI_DTYPE_LOB - a LOB data type descriptor
-OCI_DTYPE_RSET - a descriptor that references a result set (a number 
-of rows as a result of a query).
-OCI_DTYPE_ROWID - a ROWID descriptor
-OCI_DTYPE_COMPLEXOBJECTCOMP - a complex object retrieval 
-descriptor
-Related Functions
-OCIDescAlloc()
-
-
-
-OCIDescribeAny()
-Name
-OCI DeSCribe Any
-Purpose
-Describes existing schema objects.
-Syntax
-sword OCIDescribeAny ( OCISvcCtx     *svchp,
-                     OCIError      *errhp,
-                     dvoid         *objptr,
-                     ub4           objnm_len,
-		     ub1           objptr_typ,
-                     ub1 	   info_level,
-		     ub1           objtype,
-                     OCIDesc       *dschp );
-Comments
-This is a generic describe call that describes existing schema objects: tables,
-views, synonyms, procedures, functions, packages, sequences, and types. As a 
-result of this call, the describe handle is populated with the object-specific 
-attributes which can be obtained through an OCIAttrGet() call.
-An OCIParamGet() on the describe handle returns a parameter descriptor for a 
-specified position. Parameter positions begin with 1. Calling OCIAttrGet() on 
-the parameter descriptor returns the specific attributes of a stored procedure 
-or function parameter or a table column descriptor as the case may be. 
-These subsequent calls do not need an extra round trip to the server because 
-the entire schema object description cached on the client side by 
-OCIDescribeAny(). Calling OCIAttrGet() on the describe handle can also return 
-the total number of positions.
-See the section "Describing" on page 2-33 for more information about describe 
-operations.
-Parameters
-TO BE UPDATED
-svchp (IN/OUT) - a service context handle.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-objptr (IN) - the name of the object (a null-terminated string) to be 
-described. Only procedure or function names are valid when connected to an 
-Oracle7 Server.
-objptr_len (IN) - the length of the string. Must be non-zero.
-objptr_typ (IN) - Must be OCI_OTYPE_NAME, OCI_OTYPE_REF, or OCI_OTYPE_PTR.
-info_level (IN) - reserved for future extensions. Pass OCI_DEFAULT.
-objtype (IN/OUT) - object type.
-dschp (IN/OUT) - a describe handle that is populated with describe 
-information about the object after the call.
-Related Functions
-OCIAttrGet()
-
-
-
-OCIEnvCreate()
-Name
-OCI ENVironment CREATE
-Purpose
-This function creates and initializes an environment for the rest of
-the OCI functions to work under.  This call is a replacement for both
-the OCIInitialize and OCIEnvInit calls.
-Syntax
-sword OCIEnvCreate  ( OCIEnv        **envhpp, 
-                      ub4           mode, 
-                      CONST dvoid   *ctxp, 
-                      CONST dvoid   *(*malocfp) 
-                                    (dvoid *ctxp, 
-                                        size_t size), 
-                      CONST dvoid   *(*ralocfp) 
-                                    (dvoid *ctxp, 
-                                       dvoid *memptr, 
-                                       size_t newsize), 
-                      CONST void    (*mfreefp) 
-                                    ( dvoid *ctxp, 
-                                       dvoid *memptr))
-                      size_t    xtramemsz,
-                      dvoid     **usrmempp );
- 
-Comments
-This call creates an environment for all the OCI calls using the modes
-specified by the user. This call can be used instead of the two calls
-OCIInitialize and OCIEnvInit. This function returns an environment handle
-which is then used by the remaining OCI functions. There can be multiple
-environments in OCI each with its own environment modes.  This function 
-also performs any process level initialization if required by any mode.
-For example if the user wants to initialize an environment as OCI_THREADED,
-then all libraries that are used by OCI are also initialized in the
-threaded mode. 
-
-This call should be invoked before anny other OCI call and should be used
-instead of the OCIInitialize and OCIEnvInit calls. This is the recommended
-call, although OCIInitialize and OCIEnvInit calls will still be supported
-for backward compatibility. 
- 
-envpp (OUT) - a pointer to a handle to the environment. 
-mode (IN) - specifies initialization of the mode. The valid modes are:
-OCI_DEFAULT - default mode.
-OCI_THREADED - threaded environment. In this mode, internal data 
-structures are protected from concurrent accesses by multiple threads. 
-OCI_OBJECT - will use navigational object interface. 
-ctxp (IN) - user defined context for the memory call back routines. 
-malocfp (IN) - user-defined memory allocation function. If mode is 
-OCI_THREADED, this memory allocation routine must be thread safe.
-ctxp - context pointer for the user-defined memory allocation function.
-size - size of memory to be allocated by the user-defined memory 
-allocation function
-ralocfp (IN) - user-defined memory re-allocation function. If mode is 
-OCI_THREADED, this memory allocation routine must be thread safe.
-ctxp - context pointer for the user-defined memory reallocation 
-function.
-memp - pointer to memory block
-newsize - new size of memory to be allocated
-mfreefp (IN) - user-defined memory free function. If mode is 
-OCI_THREADED, this memory free routine must be thread safe.
-ctxp - context pointer for the user-defined memory free function.
-memptr - pointer to memory to be freed
-xtramemsz (IN) - specifies the amount of user memory to be allocated. 
-usrmempp (OUT) - returns a pointer to the user memory of size xtramemsz 
-allocated by the call for the user.
-
-Example
-
-Related Functions
-OCIInitialize, OCIEnvInit
-
-OCIEnvNlsCreate()
-Name
-OCI ENVironment CREATE with NLS info
-Purpose
-This function does almost everything OCIEnvCreate does, plus enabling setting
-of charset and ncharset programmatically, except OCI_UTF16 mode.
-Syntax
-sword OCIEnvNlsCreate(OCIEnv        **envhpp,
-                      ub4           mode,
-                      dvoid         *ctxp,
-                      dvoid         *(*malocfp)
-                                    (dvoid *ctxp,
-                                        size_t size),
-                      dvoid         *(*ralocfp)
-                                    (dvoid *ctxp,
-                                       dvoid *memptr,
-                                       size_t newsize),
-                      void          (*mfreefp)
-                                    (dvoid *ctxp,
-                                       dvoid *memptr),
-                      size_t        xtramemsz,
-                      dvoid         **usrmempp,
-                      ub2           charset,
-                      ub2           ncharset)
-Comments
-The charset and ncharset must be both zero or non-zero.
-The parameters have the same meaning as the ones in OCIEnvCreate().
-When charset or ncharset is non-zero, the corresponding character set will
-be used to replace the ones specified in NLS_LANG or NLS_NCHAR. Moreover,
-OCI_UTF16ID is allowed to be set as charset and ncharset.
-On the other hand, OCI_UTF16 mode is deprecated with this function. 
-Applications can achieve the same effects by setting 
-both charset and ncharset as OCI_UTF16ID.
-
-
-OCIEnvInit()
-Name
-OCI INITialize environment
-Purpose
-This call initializes the OCI environment handle.
-Syntax
-sword OCIEnvInit ( OCIEnv    **envp,
-                 ub4       mode,
-                 size_t    xtramemsz,
-                 dvoid     **usrmempp );
-Comments
-Initializes the OCI environment handle. No changes are done on an initialized 
-handle. If OCI_ERROR or OCI_SUCCESS_WITH_INFO is returned, the 
-environment handle can be used to obtain ORACLE specific errors and 
-diagnostics.
-This call is processed locally, without a server round-trip.
-Parameters
-envpp (OUT) - a pointer to a handle to the environment. 
-mode (IN) - specifies initialization of an environment mode. The only valid 
-mode is OCI_DEFAULT for default mode
-xtramemsz (IN) - specifies the amount of user memory to be allocated. 
-usrmempp (OUT) - returns a pointer to the user memory of size xtramemsz 
-allocated by the call for the user.
-Example
-See the description of OCISessionBegin() on page 13-84 for an example showing 
-the use of OCIEnvInit(). 
-Related Functions
-
-
-
-
-OCIErrorGet()
-Name
-OCI Get Diagnostic Record
-Purpose
-Returns an error message in the buffer provided and an ORACLE error.
-Syntax
-sword OCIErrorGet ( dvoid      *hndlp, 
-                  ub4        recordno,
-                  OraText       *sqlstate,
-                  ub4        *errcodep, 
-                  OraText       *bufp,
-                  ub4        bufsiz,
-                  ub4        type );
-Comments
-Returns an error message in the buffer provided and an ORACLE error. 
-Currently does not support SQL state. This call can be called a multiple 
-number of times if there are more than one diagnostic record for an error.
-The error handle is originally allocated with a call to OCIHandleAlloc().
-Parameters
-hndlp (IN) - the error handle, in most cases, or the environment handle (for 
-errors on OCIEnvInit(), OCIHandleAlloc()).
-recordno (IN) - indicates the status record from which the application seeks 
-info. Starts from 1. 
-sqlstate (OUT) - Not supported in Version 8.0.
-errcodep (OUT) - an ORACLE Error is returned.
-bufp (OUT) - the error message text is returned.
-bufsiz (IN) - the size of the buffer provide to get the error message.
-type (IN) - the type of the handle.
-Related Functions
-OCIHandleAlloc()
-
-OCIExtractInit
-Name
-OCI Extract Initialize 
-Purpose
-This function initializes the parameter manager. 
-Syntax
-sword OCIExtractInit(dvoid *hndl, OCIError *err);
-Comments
-It must be called before calling any other parameter manager routine. The NLS 
-information is stored inside the parameter manager context and used in 
-subsequent calls to OCIExtract routines.
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
-Parameters
-hndl (IN/OUT) - The OCI environment or session handle.
-err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-               err and this function returns OCI_ERROR. Diagnostic information 
-               can be obtained by calling OCIErrorGet().
-Related Functions
-OCIExtractTerm()
-
-OCIExtractTerm
-Name
-OCI Extract Terminate
-Purpose
-This function releases all dynamically allocated storage and may perform 
-other internal bookkeeping functions.
-Syntax
-sword OCIExtractTerm(dvoid *hndl, OCIError *err);
-Comments
-It must be called when the parameter manager is no longer being used.
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
-Parameters
-hndl (IN/OUT) - The OCI environment or session handle.
-err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-               err and this function returns OCI_ERROR. Diagnostic information 
-               can be obtained by calling OCIErrorGet().
-Related Functions
-OCIExtractInit()
-
-OCIExtractReset
-Name
-OCI Extract Reset
-Purpose
-The memory currently used for parameter storage, key definition storage, and 
-parameter value lists is freed and the structure is reinitialized.
-Syntax
-sword OCIExtractReset(dvoid *hndl, OCIError *err);
-Comments
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
-Parameters
-hndl (IN/OUT) - The OCI environment or session handle.
-err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-               err and this function returns OCI_ERROR. Diagnostic information 
-               can be obtained by calling OCIErrorGet().
-Related Functions
-
-OCIExtractSetNumKeys
-Name
-OCI Extract Set Number of Keys
-Purpose
-Informs the parameter manager of the number of keys that will be registered.
-Syntax
-sword OCIExtractSetNumKeys(dvoid *hndl, OCIError *err, uword numkeys);
-Comments
-This routine must be called prior to the first call of OCIExtractSetKey().  
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
-Parameters
-hndl (IN/OUT) - The OCI environment or session handle.
-err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-               err and this function returns OCI_ERROR. Diagnostic information 
-               can be obtained by calling OCIErrorGet().
-numkeys (IN) - The number of keys that will be registered with 
-               OCIExtractSetKey().
-Related Functions
-OCIExtractSetKey()
-
-OCIExtractSetKey
-Name
-OCI Extract Set Key definition
-Purpose
-Registers information about a key with the parameter manager.
-Syntax
-sword OCIExtractSetKey(dvoid *hndl, OCIError *err, CONST OraText *name, 
-                       ub1 type, ub4 flag, CONST dvoid *defval,                                        CONST sb4 *intrange, CONST OraText *CONST *strlist);
-Comments
-This routine must be called after calling OCIExtractSetKey() and before 
-calling OCIExtractFromFile() or OCIExtractFromStr().  
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
-Parameters
-hndl (IN/OUT) - The OCI environment or session handle.
-err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-               err and this function returns OCI_ERROR. Diagnostic information 
-               can be obtained by calling OCIErrorGet().
-name (IN) - The name of the key.
-type (IN) - The type of the key (OCI_EXTRACT_TYPE_INTEGER, 
-            OCI_EXTRACT_TYPE_OCINUM, OCI_EXTRACT_TYPE_STRING, or 
-            OCI_EXTRACT_TYPE_BOOLEAN).
-flag (IN) - Set to OCI_EXTRACT_MULTIPLE if the key can take multiple values 
-            or 0 otherwise.
-defval (IN) - Set to the default value for the key.  May be NULL if there is 
-               no default.  A string default must be a (text*) type, an 
-               integer default must be an (sb4*) type, and a boolean default 
-               must be a (ub1*) type.
-intrange (IN) - Starting and ending values for the allowable range of integer 
-                values.  May be NULL if the key is not an integer type or if 
-                all integer values are acceptable.
-strlist (IN) - List of all acceptable text strings for the key.  May be NULL 
-               if the key is not a string type or if all text values are 
-               acceptable.
-Related Functions
-OCIExtractSetNumKeys()
-
-OCIExtractFromFile
-Name
-OCI Extract parameters From File
-Purpose
-The keys and their values in the given file are processed. 
-Syntax
-sword OCIExtractFromFile(dvoid *hndl, OCIError *err, ub4 flag, 
-                         OraText *filename);
-Comments
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
-Parameters
-hndl (IN/OUT) - The OCI environment or session handle.
-err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-               err and this function returns OCI_ERROR. Diagnostic information 
-               can be obtained by calling OCIErrorGet().
-flag (IN) - Zero or has one or more of the following bits set: 
-           OCI_EXTRACT_CASE_SENSITIVE, OCI_EXTRACT_UNIQUE_ABBREVS, or 
-           OCI_EXTRACT_APPEND_VALUES. 
-filename (IN) - Null-terminated filename string.
-Related Functions
-
-OCIExtractFromStr
-Name
-OCI Extract parameters From String
-Purpose
-The keys and their values in the given string are processed. 
-Syntax
-sword OCIExtractFromStr(dvoid *hndl, OCIError *err, ub4 flag, OraText *input);
-Comments
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
-Parameters
-hndl (IN/OUT) - The OCI environment or session handle.
-err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-               err and this function returns OCI_ERROR. Diagnostic information 
-               can be obtained by calling OCIErrorGet().
-flag (IN) - Zero or has one or more of the following bits set: 
-           OCI_EXTRACT_CASE_SENSITIVE, OCI_EXTRACT_UNIQUE_ABBREVS, or 
-           OCI_EXTRACT_APPEND_VALUES. 
-input (IN) - Null-terminated input string.
-Related Functions
-
-OCIExtractToInt
-Name
-OCI Extract To Integer
-Purpose
-Gets the integer value for the specified key.
-Syntax
-sword OCIExtractToInt(dvoid *hndl, OCIError *err, OraText *keyname, uword valno, 
-                      sb4 *retval);
-Comments
-The valno'th value (starting with 0) is returned.
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, OCI_NO_DATA, or OCI_ERROR. 
-OCI_NO_DATA means that there is no valno'th value for this key.
-Parameters
-hndl (IN) - The OCI environment or session handle.
-err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-               err and this function returns OCI_ERROR. Diagnostic information 
-               can be obtained by calling OCIErrorGet().
-keyname (IN) - Key name.
-valno (IN) - Which value to get for this key.
-retval (OUT) - The actual integer value.
-Related Functions
-
-OCIExtractToBool
-Name
-OCI Extract To Boolean
-Purpose
-Gets the boolean value for the specified key. 
-Syntax
-sword OCIExtractToBool(dvoid *hndl, OCIError *err, OraText *keyname, 
-                       uword valno, ub1 *retval);
-Comments
-The valno'th value (starting with 0) is returned.
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, OCI_NO_DATA, or OCI_ERROR. 
-OCI_NO_DATA means that there is no valno'th value for this key.
-Parameters
-hndl (IN) - The OCI environment or session handle.
-err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-               err and this function returns OCI_ERROR. Diagnostic information 
-               can be obtained by calling OCIErrorGet().
-keyname (IN) - Key name.
-valno (IN) - Which value to get for this key.
-retval (OUT) - The actual boolean value.
-Related Functions
-
-OCIExtractToStr
-Name
-OCI Extract To String
-Purpose
-Gets the string value for the specified key.
-Syntax
-sword OCIExtractToStr(dvoid *hndl, OCIError *err, OraText *keyname, 
-                      uword valno, OraText *retval, uword buflen);
-Comments
-The valno'th value (starting with 0) is returned.
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, OCI_NO_DATA, or OCI_ERROR. 
-OCI_NO_DATA means that there is no valno'th value for this key.
-Parameters
-hndl (IN) - The OCI environment or session handle.
-err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-               err and this function returns OCI_ERROR. Diagnostic information 
-               can be obtained by calling OCIErrorGet().
-keyname (IN) - Key name.
-valno (IN) - Which value to get for this key.
-retval (OUT) - The actual null-terminated string value.
-buflen (IN) - The length of the buffer for retval.
-Related Functions
-
-Note: The following OCIExtract functions are unavailable in this release
-
-OCIExtractToOCINum
-Name
-OCI Extract To OCI Number
-Purpose
-Gets the OCINumber value for the specified key.
-Syntax
-sword OCIExtractToOCINum(dvoid *hndl, OCIError *err, OraText *keyname, 
-                         uword valno, OCINumber *retval);
-Comments
-The valno'th value (starting with 0) is returned.
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, OCI_NO_DATA, or OCI_ERROR. 
-OCI_NO_DATA means that there is no valno'th value for this key.
-Parameters
-hndl (IN) - The OCI environment or session handle.
-err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-               err and this function returns OCI_ERROR. Diagnostic information 
-               can be obtained by calling OCIErrorGet().
-keyname (IN) - Key name.
-valno (IN) - Which value to get for this key.
-retval (OUT) - The actual OCINumber value.
-Related Functions
-
-OCIExtractToList
-Name
-OCI Extract To parameter List
-Purpose
-Generates a list of parameters from the parameter structures that are stored 
-in memory. 
-Syntax
-sword OCIExtractToList(dvoid *hndl, OCIError *err, uword *numkeys);
-Comments
-Must be called before OCIExtractValues() is called.
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
-Parameters
-hndl (IN) - The OCI environment or session handle.
-err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-               err and this function returns OCI_ERROR. Diagnostic information 
-               can be obtained by calling OCIErrorGet().
-numkeys (OUT) - Number of distinct keys stored in memory.
-Related Functions
-OCIExtractFromList()
-
-OCIExtractFromList
-Name
-OCI Extract From parameter List
-Purpose
-Generates a list of values for the a parameter in the parameter list.
-Syntax
-sword OCIExtractFromList(dvoid *hndl, OCIError *err, uword index, OraText *name, 
-                         ub1 *type, uword *numvals, dvoid ***values);
-Comments
-Parameters are specified by an index. OCIExtractToList() must be called prior 
-to calling this routine to generate the parameter list from the parameter 
-structures that are stored in memory. 
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
-Parameters
-hndl (IN) - The OCI environment or session handle.
-err (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-               err and this function returns OCI_ERROR. Diagnostic information 
-               can be obtained by calling OCIErrorGet().
-name (OUT) - Name of the key for the current parameter.
-type (OUT) - Type of the current parameter (OCI_EXTRACT_TYPE_STRING, 
-             OCI_EXTRACT_TYPE_INTEGER, OCI_EXTRACT_TYPE_OCINUM, or 
-             OCI_EXTRACT_TYPE_BOOLEAN)
-numvals (OUT) - Number of values for this parameter.
-values (OUT) - The values for this parameter.
-Related Functions
-OCIExtractToList()
-
-
-************************  OCIFileClose() ***********************************
- 
-Name
- OCIFileClose - Oracle Call Interface FILE i/o CLOSE
-
-Purpose
- Close a previously opened file.
-
-Syntax
- sword OCIFileClose ( dvoid             *hndl, 
-             	      OCIError          *err,
-                      OCIFileObject     *filep )
-
-Comments
- This function will close a previously opened file. If the function succeeds
- then OCI_SUCCESS will be returned, else OCI_ERROR. 
- 
-Parameters
- hndl  (IN) - the OCI environment or session handle.
- err (OUT) - the OCI error handle
- filep (IN) - the OCIFile file object
-
-Related Functions
- OCIFileOpen.  
-
-
-
-********************* OCIFileExists() **************************************
-
-Name
- OCIFileExists - Oracle Call Interface FILE i/o EXIST
-
-Purpose
- Check to see if the file exists.
-
-Syntax
- sword OCIFileExists ( dvoid           *hndl, 
-            	      OCIError         *err, 
-                      OraText          *filename,
-                      OraText          *path,
-                      ub1              *flag )
-
-Comments
- This function will set the flag to TRUE if the file exists else it will
- be set to FALSE.
- The function will return OCI_ERROR if any error is encountered, else
- it will return OCI_ERROR. 
-
-Parameters
- hndl(IN) - OCI environment or session handle
- err(OUT) - OCI error handle
- filename(IN) - filename
- path(IN) - path of the file
- flag(OUT) - whether the file exists or not
-
-Related Functions.
- None.
-     
-
- **************************** OCIFileFlush() ******************************
-
-
-Name
- OCIFileFlush - Oracle Call Interface File i/o FLUSH
-
-Purpose
- Flush the buffers associated with the file to the disk.
-
-Syntax
- sword OCIFileFlush ( dvoid             *hndl, 
-             	      OCIError          *err,
-                      OCIFileObject     *filep )
-
-Comments
- The function will return OCI_ERROR if any error is encountered, else
- it will return OCI_ERROR.
-
-Parameters 
- hndl (IN) - the OCI environment or session handle.
- err (OUT) - the OCI error handle
- filep (IN) - the OCIFile file object
-
-Related Functions
- OCIFileOpen, OCIFileWrite
-
-
-
- *************************** OCIFileGetLength() ****************************
-
-Name
- OCIFileGetLength - Oracle Call Interface FILE i/o GET file LENGTH
-
-Purpose
- Get the length of a file.
-
-Syntax
- OCIFileGetLength(dvoid           *hndl, 
-	          OCIError        *err,
-                  OraText         *filename,
-                  OraText         *path,
-                  ubig_ora        *lenp )
-
-Comments
- The length of the file will be returned in lenp.
- The function will return OCI_ERROR if any error is encountered, else
- it will return OCI_ERROR.
- 
-Parameters
- hndl (IN) - the OCI environment or session handle.
- err (OUT) - the OCI error handle.  If  there is an error, it is recorded 
- in err and this function returns OCI_ERROR.  Diagnostic information can be 
- obtained by calling OCIErrorGet().
- filename (IN) - file name.
- path (IN) - path of the file.
- lenp (OUT) - On output, it is the length of the file in bytes.
- is the number of bytes in the file.
-
-Related Functions
- None.
-
-
-
-******************************** OCIFileInit() *****************************
-   
-Name
- OCIFileInit - Oracle Call Interface FILE i/o INITialize
-
-Purpose
- Initialize the OCI File I/O package and create the OCIFile context.
-
-Syntax
- sword OCIFileInit ( dvoid *hndl, 
-                     OCIError *err)
-
-Comments
- This function should be called before any of the OCIFile functions are
- used.
- The function will return OCI_ERROR if any error is encountered, else
- it will return OCI_ERROR.
- 
-Parameters
- hndl(IN) - OCI environment or session handle.
- err(OUT) - OCI error structure.
-
-Related Functions
- OCIFileTerm
-     
-
-
-********************************* OCIFileOpen() *****************************
-
-Name
- OCIFileOpen - Oracle Call Interface File i/o OPEN
-
-Purpose
-     Open a file.
-
-Syntax
- sword OCIFileOpen ( dvoid               *hndl, 
-	             OCIError            *err,
-                     OCIFileObject      **filep,
-                     OraText             *filename,
-                     OraText             *path,
-                     ub4                  mode,
-                     ub4                  create, 
-                     ub4                  type )
-
-Comments
- OCIFileOpen returns a handle to the open file in filep if the file is
- successfully opened. 
- If one wants to use the standard file objects (stdin, stdout & stderr)
- then OCIFileOpen whould be called with the type filed containing the 
- appropriate type (see the parameter type). If any of the standard files 
- are specified then filename, path, mode and create are ignored.
- The function will return OCI_ERROR if any error is encountered, else
- it will return OCI_ERROR.
-
-Parameters
- hndl (OUT) - the OCI environment or session handle.
- err (OUT) - the OCI error handle.  If  there is an error, it is recorded 
- in err and this function returns OCI_ERROR.  Diagnostic information can be 
- obtained by calling OCIErrorGet().
- filep (OUT) - the file object to be returned.
- filename (IN) - file name (NULL terminated string).
- path (IN) - path of the file (NULL terminated string).
- mode - mode in which to open the file (valid modes are OCI_FILE_READONLY,
- OCI_FILE_WRITEONLY, OCI_FILE_READ_WRITE).
- create - should the file be created if it does not exist. Valid values
- are: 
-     OCI_FILE_TRUNCATE - create a file regardless of whether or not it exists. 
-                        If the file already exists overwrite it.
-     OCI_FILE_EXIST - open it if it exists, else fail.
-     OCI_FILE_EXCL - fail if the file exists, else create.
-     OCI_FILE_CREATE - open the file if it exists, and create it if it doesn't.
-     OCI_FILE_APPEND - set the file pointer to the end of the file prior to 
-                      writing(this flag can be OR'ed with OCI_FILE_EXIST or
-                      OCI_FILE_CREATE).
-type - file type. Valid values are OCI_FILE_TEXT, OCI_FILE_BIN, 
-       OCI_FILE_STDIN, OCI_FILE_STDOUT and OCI_FILE_STDERR.
-       If any of the standard files are specified then filename, path, mode
-       and create are ignored.
-
-Related Functions.
- OCIFileClose
-
-
-
-************************** OCIFileRead() ************************************
-   
-Name
- OCIFileRead - Oracle Call Interface FILE i/o READ
-
-Purpose
- Read from a file into a buffer.
-
-Syntax
- sword OCIFileRead ( dvoid            *hndl, 
-          	     OCIError         *err,
-                     OCIFileObject    *filep,
-                     dvoid            *bufp,
-                     ub4               bufl,
-                     ub4              *bytesread )
-
-Comments
- Upto bufl bytes from the file will be read into bufp. The user should
- allocate memory for the buffer.
- The number of bytes read would be in bytesread.
- The function will return OCI_ERROR if any error is encountered, else
- it will return OCI_ERROR.
-
-Parameters
- hndl (IN) - the OCI environment or session handle.
- err (OUT) - the OCI error handle.  If  there is an error, it is recorded 
- in err and this function returns OCI_ERROR.  Diagnostic information can be 
- obtained by calling OCIErrorGet().
- filep (IN/OUT) - a File Object that uniquely references the file.
- bufp (IN) - the pointer to a buffer into which the data will be read. The 
- length of the allocated memory is assumed to be bufl. 
- bufl - the length of the buffer in bytes. 
- bytesread (OUT) - the number of bytes read.
-
-Related Functions
- OCIFileOpen, OCIFileSeek, OCIFileWrite
-
-
-
-****************************** OCIFileSeek() ******************************
-
-Name
- OCIFileSeek - Oracle Call Interface FILE i/o SEEK
-
-Purpose
- Perfom a seek to a byte position.
-
-Syntax
- sword OCIFileSeek ( dvoid           *hndl, 
-        	     OCIError        *err,  
-                     OCIFileObject   *filep,
-                     uword            origin,
-                     ubig_ora         offset,
-                     sb1              dir)
-
-Comments
- The function will return OCI_ERROR if any error is encountered, else
- it will return OCI_ERROR.
-
-Parameters
- hndl (IN) - the OCI environment or session handle.
- err (OUT) - the OCI error handle.  If  there is an error, it is recorded 
- in err and this function returns OCI_ERROR.  Diagnostic information can be 
- obtained by calling OCIErrorGet().
- filep (IN/OUT) - a file handle that uniquely references the file.
- origin - The starting point we want to seek from. NOTE: The starting 
- point may be OCI_FILE_SEEK_BEGINNING (beginning), OCI_FILE_SEEK_CURRENT 
- (current position), or OCI_FILE_SEEK_END (end of file). 
- offset - The number of bytes from the origin we want to start reading from. 
- dir - The direction we want to go from the origin. NOTE: The direction 
- can be either OCI_FILE_FORWARD or OCI_FILE_BACKWARD. 
- 
-Related Function
- OCIFileOpen, OCIFileRead, OCIFileWrite
-
-
-
-*************************** OCIFileTerm() **********************************
-
-Name
- OCIFileTerm - Oracle Call Interface FILE i/o TERMinate
-
-Purpose
- Terminate the OCI File I/O package and destroy the OCI File context.
-
-Syntax
- sword OCIFileTerm ( dvoid *hndl, 
-                     OCIError *err )
-
-Comments
- After this function has been called no OCIFile function should be used.
- The function will return OCI_ERROR if any error is encountered, else
- it will return OCI_ERROR.
- 
-Parameters
- hndl(IN) - OCI environment or session handle.
- err(OUT) - OCI error structure. 
-  
-Related Functions 
- OCIFileInit   
- 
-
-********************************* OCIFileWrite() **************************** 
-
-Name 
- OCIFileWrite - Oracle Call Interface FILE i/o WRITE
-
-Purpose
-  Write data from buffer into a file.
-
-Syntax
- sword OCIFileWrite ( dvoid            *hndl, 
-            	      OCIError         *err,  
-                      OCIFileObject    *filep,
-                      dvoid            *bufp, 
-                      ub4               buflen
-                      ub4              *byteswritten )
-
-Comments
- The number of bytes written will be in *byteswritten.
- The function will return OCI_ERROR if any error is encountered, else
- it will return OCI_ERROR.
-
-Parameters
- hndl (IN) - the OCI environment or session handle.
- err (OUT) - the OCI error handle.  If  there is an error, it is recorded 
- in err and this function returns OCI_ERROR.  Diagnostic information can be 
- obtained by calling OCIErrorGet().
- filep (IN/OUT) - a file handle that uniquely references the file.
- bufp (IN) - the pointer to a buffer from which the data will be written. 
- The length of the allocated memory is assumed to be the value passed
- in bufl. 
- bufl - the length of the buffer in bytes.
- byteswritten (OUT) - the number of bytes written.
- 
-Related Functions
- OCIFileOpen, OCIFileSeek, OCIFileRead 
-
-
-
-
-
-OCIHandleAlloc() 
-Name
-OCI Get HaNDLe
-Purpose
-This call returns a pointer to an allocated and initialized handle.
-Syntax
-sword OCIHandleAlloc ( CONST dvoid   *parenth,
-                     dvoid         **hndlpp, 
-                     ub4           type, 
-                     size_t        xtramem_sz,
-                     dvoid         **usrmempp);
-Comments
-Returns a pointer to an allocated and initialized structure, corresponding to 
-the type specified in type. A non-NULL handle is returned on success. Bind 
-handle and define handles are allocated with respect to a statement handle. All
-other handles are allocated with respect to an environment handle which is 
-passed in as a parent handle.
-No diagnostics are available on error. This call returns OCI_SUCCESS if 
-successful, or OCI_INVALID_HANDLE if an out-of-memory error occurs.
-Handles must be allocated using OCIHandleAlloc() before they can be passed 
-into an OCI call.
-Parameters
-parenth (IN) - an environment or a statement handle. 
-hndlpp (OUT) - returns a handle to a handle type. 
-type (IN) - specifies the type of handle to be allocated. The specific types 
-are: 
-OCI_HTYPE_ERROR - specifies generation of an error report handle of 
-C type OCIError
-OCI_HTYPE_SVCCTX - specifies generation of a service context handle 
-of C type OCISvcCtx
-OCI_HTYPE_STMT - specifies generation of a statement (application 
-request) handle of C type OCIStmt
-OCI_HTYPE_BIND - specifies generation of a bind information handle 
-of C type OCIBind
-OCI_HTYPE_DEFINE - specifies generation of a column definition 
-handle of C type OCIDefine
-OCI_HTYPE_DESCRIBE  - specifies generation of a select list 
-description handle of C type OCIDesc
-OCI_HTYPE_SERVER - specifies generation of a server context handle 
-of C type OCIServer
-OCI_HTYPE_SESSION - specifies generation of an authentication 
-context handle of C type OCISession
-OCI_HTYPE_TRANS - specifies generation of a transaction context
-handle of C type OCITrans
-OCI_HTYPE_COMPLEXOBJECT - specifies generation of a complex 
-object retrieval handle of C type OCIComplexObject
-OCI_HTYPE_SECURITY - specifies generation of a security handle of C 
-type OCISecurity
-xtramem_sz (IN) - specifies an amount of user memory to be allocated.
-usrmempp (OUT) - returns a pointer to the user memory of size xtramemsz 
-allocated by the call for the user. 
-Related Functions
-OCIHandleFree()
-
-
-
-OCIHandleFree()
-Name
-OCI Free HaNDLe
-Purpose
-This call explicitly deallocates a handle.
-Syntax
-sword OCIHandleFree ( dvoid     *hndlp,
-                    ub4       type);
-Comments
-This call frees up storage associated with a handle, corresponding to the type 
-specified in the type parameter.
-This call returns either OCI_SUCCESS or OCI_INVALID_HANDLE.
-All handles must be explicitly deallocated. OCI will not deallocate a child 
-handle if the parent is deallocated.
-Parameters
-hndlp (IN) - an opaque pointer to some storage.
-type (IN) - specifies the type of storage to be allocated. The specific types are:
-OCI_HTYPE_ENV - an environment handle
-OCI_HTYPE_ERROR - an error report handle
-OCI_HTYPE_SVCCTX - a service context handle
-OCI_HTYPE_STMT - a statement (application request) handle
-OCI_HTYPE_BIND - a bind information handle
-OCI_HTYPE_DEFINE - a column definition handle
-OCI_HTYPE_DESCRIBE  - a select list description handle
-OCI_HTYPE_SERVER - a server handle
-OCI_HTYPE_SESSION - a user authentication handle
-OCI_HTYPE_TRANS - a transaction handle
-OCI_HTYPE_COMPLEXOBJECT - a complex object retrieval handle
-OCI_HTYPE_SECURITY - a security handle
-Related Functions
-OCIHandleAlloc()
-
-
-
-
-OCIInitialize()
-Name
-OCI Process Initialize
-Purpose
-Initializes the OCI process environment.
-Syntax
-sword OCIInitialize ( ub4           mode,
-                    CONST dvoid   *ctxp, 
-                    CONST dvoid   *(*malocfp) 
-                                  ( dvoid *ctxp,
-                                    size_t size ),
-                    CONST dvoid   *(*ralocfp)
-                                  ( dvoid *ctxp,
-                                    dvoid *memp,
-                                    size_t newsize ),
-                    CONST void    (*mfreefp)
-                                  ( dvoid *ctxp,
-                                    dvoid *memptr ));
-Comments
-This call initializes the OCI process environment.
-OCIInitialize() must be invoked before any other OCI call. 
-Parameters
-mode (IN) - specifies initialization of the mode. The valid modes are:
-OCI_DEFAULT - default mode.
-OCI_THREADED - threaded environment. In this mode, internal data 
-structures are protected from concurrent accesses by multiple threads. 
-OCI_OBJECT - will use navigational object interface. 
-ctxp (IN) - user defined context for the memory call back routines. 
-malocfp (IN) - user-defined memory allocation function. If mode is 
-OCI_THREADED, this memory allocation routine must be thread safe.
-ctxp - context pointer for the user-defined memory allocation function.
-size - size of memory to be allocated by the user-defined memory 
-allocation function
-ralocfp (IN) - user-defined memory re-allocation function. If mode is 
-OCI_THREADED, this memory allocation routine must be thread safe.
-ctxp - context pointer for the user-defined memory reallocation 
-function.
-memp - pointer to memory block
-newsize - new size of memory to be allocated
-mfreefp (IN) - user-defined memory free function. If mode is 
-OCI_THREADED, this memory free routine must be thread safe.
-ctxp - context pointer for the user-defined memory free function.
-memptr - pointer to memory to be freed
-Example
-See the description of OCIStmtPrepare() on page 13-96 for an example showing 
-the use of OCIInitialize().
-Related Functions
-
---------------------------------OCITerminate------------------------------------
-
-OCITerminate()
-Name
-OCI process Terminate
-Purpose
-Do cleanup before process termination
-Syntax
-sword OCITerminate (ub4 mode);
-
-Comments
-This call performs  OCI related clean up before the OCI process terminates.
-If the process is running in shared mode then the OCI process is disconnected
-from the shared memory subsystem.
-
-OCITerminate() should be the last OCI call in any process.
-
-Parameters
-mode (IN) - specifies different termination modes.
-
-OCI_DEFAULT - default mode.
-
-Example
-
-Related Functions
-OCIInitialize()
-
----------------------- OCIIntervalAssign --------------------------------- 
-sword OCIIntervalAssign(dvoid *hndl, OCIError *err, 
-                    CONST OCIInterval *inpinter, OCIInterval *outinter );
-
-  DESCRIPTION
-    Copies one interval to another to create a replica
-  PARAMETERS
-     hndl (IN) - Session/Env handle.
-    err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-    (IN)  inpinter - Input Interval 
-    (OUT) outinter - Output Interval 
-  RETURNS
-     OCI_INVALID_HANDLE if 'err' is NULL.
-     OCI_SUCCESS otherwise
-
- ---------------------- OCIIntervalCheck ------------------------------------ 
-sword OCIIntervalCheck(dvoid *hndl, OCIError *err, CONST OCIInterval *interval,
-			 ub4 *valid );
-
-  DESCRIPTION
-    Checks the validity of an interval
-  PARAMETERS
-     hndl (IN) - Session/Env handle.
-    err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-    (IN)  interval - Interval to be checked 
-    (OUT) valid     - Zero if the interval is valid, else returns an Ored
-	combination of the following codes.
-
-   Macro name                   Bit number      Error
-   ----------                   ----------      -----
-   OCI_INTER_INVALID_DAY         0x1           Bad day
-   OCI_INTER_DAY_BELOW_VALID     0x2           Bad DAy Low/high bit (1=low)
-   OCI_INTER_INVALID_MONTH       0x4           Bad MOnth
-   OCI_INTER_MONTH_BELOW_VALID   0x8           Bad MOnth Low/high bit (1=low)
-   OCI_INTER_INVALID_YEAR        0x10          Bad YeaR
-   OCI_INTER_YEAR_BELOW_VALID    0x20          Bad YeaR Low/high bit (1=low)
-   OCI_INTER_INVALID_HOUR        0x40          Bad HouR
-   OCI_INTER_HOUR_BELOW_VALID    0x80          Bad HouR Low/high bit (1=low)
-   OCI_INTER_INVALID_MINUTE      0x100         Bad MiNute
-   OCI_INTER_MINUTE_BELOW_VALID	 0x200         Bad MiNute Low/high bit(1=low)
-   OCI_INTER_INVALID_SECOND      0x400         Bad SeCond
-   OCI_INTER_SECOND_BELOW_VALID  0x800         bad second Low/high bit(1=low)
-   OCI_INTER_INVALID_FRACSEC     0x1000        Bad Fractional second
-   OCI_INTER_FRACSEC_BELOW_VALID 0x2000        Bad fractional second Low/High
-
-	
-  RETURNS
-    OCI_SUCCESS if interval is okay
-    OCI_INVALID_HANDLE if 'err' is NULL.
-
- ---------------------- OCIIntervalCompare ----------------------------------- 
-sword OCIIntervalCompare(dvoid *hndl, OCIError *err, OCIInterval *inter1, 
-			OCIInterval *inter2, sword *result );
-
-  DESCRIPTION
-	Compares two intervals, returns 0 if equal, -1 if inter1 < inter2, 
-      	1 if inter1 > inter2
-  PARAMETERS
-     hndl (IN) - Session/Env handle. 
-     err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-     inter1  (IN)   - Interval to be compared 
-     inter2  (IN)   - Interval to be compared 
-     result  (OUT)  - 	comparison result, 0 if equal, -1 if inter1 < inter2, 
-                	1 if inter1 > inter2
-
-  RETURNS
-     OCI_SUCCESS on success
-     OCI_INVALID_HANDLE if 'err' is NULL.
-     OCI_ERROR if 
-	the two input datetimes are not mutually comparable.
-
----------------------- OCIIntervalDivide ------------------------------------ 
-sword OCIIntervalDivide(dvoid *hndl, OCIError *err, OCIInterval *dividend, 
-		OCINumber *divisor, OCIInterval *result );
- 
-  DESCRIPTION
-     Divides an interval by an Oracle Number to produce an interval
-  PARAMETERS
-	hndl (IN) - Session/Env handle. 
-     err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-     dividend  (IN)   - Interval to be divided 
-     divisor   (IN)   - Oracle Number dividing `dividend' 
-     result    (OUT)  - resulting interval (dividend / divisor) 
-  RETURNS
-     OCI_SUCCESS on success
-     OCI_INVALID_HANDLE if 'err' is NULL.
-
- ---------------------- OCIIntervalFromNumber -------------------- 
-sword OCIIntervalFromNumber(dvoid *hndl, OCIError *err, 
-               OCIInterval *inter, OCINumber *number);
-  DESCRIPTION
-    Converts an interval to an Oracle Number
-  PARAMETERS
-     hndl (IN) - Session/Env handle. 
-    err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-    (OUT)  interval - Interval to be converted 
-    (IN) number - Oracle number result  (in years for YEARMONTH interval
-                     and in days for DAYSECOND)
-  RETURNS
-    OCI_SUCCESS on success 
-    OCI_INVALID_HANDLE if 'err' is NULL.
-    OCI_ERROR on error.
-  NOTES
-    Fractional portions of the date (for instance, minutes and seconds if
-    the unit chosen is hours) will be included in the Oracle number produced.
-    Excess precision will be truncated.
- 
- ---------------------- OCIIntervalFromText --------------------------------- 
-sword OCIIntervalFromText( dvoid *hndl, OCIError *err, CONST OraText *inpstr, 
-		size_t str_len, OCIInterval *result );
-
-  DESCRIPTION
-    Given an interval string produce the interval represented by the string.
-    The type of the interval is the type of the 'result' descriptor.
-  PARAMETERS
-
-     hndl (IN) - Session/Env handle. 
-     err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-    (IN)  inpstr - Input string 
-    (IN)  str_len - Length of input string 
-    (OUT) result - Resultant interval 
-  RETURNS
-    OCI_SUCCESS on success
-    OCI_INVALID_HANDLE if 'err' is NULL.
-    OCI_ERROR if
-     	there are too many fields in the literal string
-	the year is out of range (-4713 to 9999)
-  	if the month is out of range (1 to 12)
- 	if the day of month is out of range (1 to 28...31)
-    	if hour is not in range (0 to 23)
-     	if hour is not in range (0 to 11)
-  	if minute is not in range (0 to 59)
-    	if seconds in minute not in range (0 to 59)
-   	if seconds in day not in range (0 to 86399)
-  	if the interval is invalid
-
-
- ---------------------- OCIIntervalGetDaySecond -------------------- 
-
-  DESCRIPTION
-     Gets values of day second interval
-  PARAMETERS
-	hndl (IN) - Session/Env handle.
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().     
-        day     (OUT) - number of days
-        hour    (OUT) - number of hours
-        min     (OUT) - number of mins
-        sec     (OUT) - number of secs
-        fsec    (OUT) - number of fractional seconds
-	result     (IN)  - resulting interval 
-  RETURNS
-	OCI_SUCCESS on success
-        OCI_INVALID_HANDLE if 'err' is NULL.
-
-
- ---------------------- OCIIntervalGetYearMonth -------------------- 
-
-  DESCRIPTION
-     Gets year month from an interval
-  PARAMETERS
-	hndl (IN) - Session/Env handle.
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().     
-	year    (OUT)   - year value
-	month   (OUT)   - month value
-	result     (IN)  - resulting interval 
-  RETURNS
-	OCI_SUCCESS on success
-        OCI_INVALID_HANDLE if 'err' is NULL.
-
-
-
--------------------------- OCIIntervalAdd ------------------------------
-sword OCIIntervalAdd(dvoid *hndl, OCIError *err, OCIInterval *addend1, 
-			OCIInterval *addend2, OCIInterval *result );
-NAME OCIIntervalAdd - Adds two intervals 
-PARAMETERS
-hndl (IN) - Session/Env handle. 
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-addend1  (IN)   - Interval to be added 
-addend2  (IN)   - Interval to be added 
-result   (OUT)  - resulting interval (addend1 + addend2) 
-DESCRIPTION
-     Adds two intervals to produce a resulting interval
-RETURNS
-     OCI_SUCCESS on success
-     OCI_ERROR if:
-	the two input intervals are not mutually comparable.
-	the resulting year would go above SB4MAXVAL
-	the resulting year would go below SB4MINVAL
-     OCI_INVALID_HANDLE if 'err' is NULL.
-NOTES
-     The two input intervals must be mutually comparable
-
- ---------------------- OCIIntervalSubtract ------------------------------- 
-sword OCIIntervalSubtract(dvoid *hndl, OCIError *err, OCIInterval *minuend, 
-			    OCIInterval *subtrahend, OCIInterval *result );
-NAME - OCIIntervalSubtract - subtracts two intervals
-PARAMETERS
-hndl (IN) - Session/Env handle.
-err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().     
-minuend    (IN)   - interval to be subtracted from 
-subtrahend (IN)   - interval subtracted from minuend 
-result     (OUT)  - resulting interval (minuend - subtrahend) 
-DESCRIPTION
-     Subtracts two intervals and stores the result in an interval
-RETURNS
-	OCI_SUCCESS on success
-        OCI_INVALID_HANDLE if 'err' is NULL.
-	OCI_ERROR if:
-	   the two input intervals are not mutually comparable.
-	   the resulting leading field would go below SB4MINVAL	
-	   the resulting leading field would go above SB4MAXVAL
-
----------------------- OCIIntervalMultiply --------------------------------- 
-sword OCIIntervalMultiply(dvoid *hndl, OCIError *err, CONST OCIInterval *inter,
-			OCINumber *nfactor, OCIInterval *result );
-
-  DESCRIPTION
-     Multiplies an interval by an Oracle Number to produce an interval
-  PARAMETERS
-	hndl (IN) - Session/Env handle. 
-     err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-     inter  (IN)   - Interval to be multiplied 
-     nfactor  (IN)   - Oracle Number to be multiplied 
-     result   (OUT)  - resulting interval (ifactor * nfactor) 
-  RETURNS
-     OCI_SUCCESS on success
-     OCI_INVALID_HANDLE if 'err' is NULL.
-     OCI_ERROR if:
-	the resulting year would go above SB4MAXVAL
-	the resulting year would go below SB4MINVAL
-
-
- ---------------------- OCIIntervalSetDaySecond -------------------- 
-
-  DESCRIPTION
-     Sets day second interval
-  PARAMETERS
-	hndl (IN) - Session/Env handle.
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().     
-        day     (IN) - number of days
-        hour    (IN) - number of hours
-        min     (IN) - number of mins
-        sec     (IN) - number of secs
-        fsec    (IN) - number of fractional seconds
-	result     (OUT)  - resulting interval 
-  RETURNS
-	OCI_SUCCESS on success
-        OCI_INVALID_HANDLE if 'err' is NULL.
-
-
- ---------------------- OCIIntervalSetYearMonth -------------------- 
-
-  DESCRIPTION
-     Sets year month interval
-  PARAMETERS
-	hndl (IN) - Session/Env handle.
-        err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().     
-	year    (IN)   - year value
-	month   (IN)   - month value
-	result     (OUT)  - resulting interval 
-  RETURNS
-	OCI_SUCCESS on success
-        OCI_INVALID_HANDLE if 'err' is NULL.
-
-
------------------------ OCIIntervalToNumber ---------------------------------
-sword OCIIntervalToNumber(dvoid *hndl, OCIError *err, CONST OCIInterval *inter,
-			  OCINumber *number);
-
-  DESCRIPTION
-    Converts an interval to an Oracle Number
-  PARAMETERS
-     hndl (IN) - Session/Env handle. 
-    err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-    (IN)  inter - Interval to be converted 
-    (OUT) number - Oracle number result  (in years for YEARMONTH interval
-                     and in days for DAYSECOND)
-  RETURNS
-    OCI_INVALID_HANDLE if 'err' is NULL.
-    OCI_SUCCESS on success 
-  NOTES
-    Fractional portions of the date (for instance, minutes and seconds if
-    the unit chosen is hours) will be included in the Oracle number produced.
-    Excess precision will be truncated.
- 
-------------------------------- OCIIntervalToText -------------------------
-sword OCIIntervalToText( dvoid *hndl, OCIError *err, CONST OCIInterval *inter,
-			ub1 lfprec, ub1 fsprec, OraText *buffer, 
-                        size_t buflen, size_t *resultlen );
-
-  DESCRIPTION
-    Given an interval, produces a string representing the interval.
-  PARAMETERS
-     hndl (IN) - Session/Env handle. 
-    err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-    (IN)  inter - Interval to be converted 
-    (IN)  lfprec  - Leading field precision. Number of digits used to
-                represent the leading field.
-    (IN)  fsprec  - Fractional second precision of the interval. Number of
-                digits used to represent the fractional seconds.
-    (OUT) buffer - buffer to hold result 
-    (IN)  buflen - length of above buffer 
-    (OUT) resultlen - length of result placed into buffer 
- 
-  RETURNS
-    OCI_SUCCESS on success
-    OCI_INVALID_HANDLE if 'err' is NULL.
-    OCI_ERROR 
-    	if the buffer is not large enough to hold the result
-  NOTES
-    The interval literal will be output as `year' or `[year-]month' for
-    YEAR-MONTH intervals and as `seconds' or `minutes[:seconds]' or
-    `hours[:minutes[:seconds]]' or `days[ hours[:minutes[:seconds]]]' for
-    DAY-TIME intervals (where optional fields are surrounded by brackets).
-
- ---------------------- OCIIntervalFromTZ -------------------- 
-sword OCIIntervalFromTZ(dvoid *hndl, OCIError *err, CONST oratext *inpstring,
-                        size_t str_len, OCIInterval *result);
-
-  DESCRIPTION
-    Retuns an OCI_DTYPE_INTERVAL_DS OCIInterval with the region id (if
-    the region is specified in the input string) set and the current
-    absolute offset or an absolut offset with the region id set to 0.
-  PARAMETERS
-    hndl (IN) - Session/Env handle.
-    err (IN/OUT) - error handle. If there is an error, it is
-                recorded in 'err' and this function returns OCI_ERROR.
-                The error recorded in 'err' can be retrieved by calling
-                OCIErrorGet().
-    inpstring (IN) - pointer to the input string
-    str_len (IN) - inpstring length
-    result - Output Interval 
-  RETURNS
-     OCI_SUCCESS on success
-     OCI_INVALID_HANDLE if 'err' is NULL.
-     OCI_ERROR on error
-        Bad interval type
-        Timezone errors
-  NOTES
-     The input string must be of the form [+/-]TZH:TZM or 'TZR [TZD]'
-
-OCILdaToSvcCtx()
-Name
-OCI toggle version 7 Lda_Def to SerVice context handle
-Purpose
-Converts a V7 Lda_Def to a V8 service context handle.
-Syntax
-sword OCILdaToSvcCtx ( OCISvcCtx  **svchpp,
-                     OCIError   *errhp,
-                     Lda_Def    *ldap );
-Comments
-Converts a V7 Lda_Def to a V8 service context handle. The action of this call 
-can be reversed by passing the resulting service context handle to the 
-OCISvcCtxToLda() function.
-Parameters
-svchpp (IN/OUT) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-ldap (IN/OUT) - the V7 logon data area returned by OCISvcCtxToLda() from 
-this service context.
-Related Functions
-OCISvcCtxToLda()
-
-
-
-
-OCILobAppend()
-
-Name
-OCI Lob APpend
-
-Purpose
-Appends a LOB value at the end of another LOB. 
-
-Syntax
-sword OCILobAppend ( OCISvcCtx        *svchp,
-                   OCIError         *errhp,
-                   OCILobLocator    *dst_locp,
-                   OCILobLocator    *src_locp );
-Comments
-Appends a LOB value at the end of LOB. The data is 
-copied from the source to the destination at the end of the destination. The 
-source and the destination must already exist. The destination LOB is 
-extended to accommodate the newly written data.
-
-It is an error to extend the destination LOB beyond the maximum length 
-allowed or to try to copy from a NULL LOB. 
-
-Parameters
-svchp (IN) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-dst_locp (IN/OUT) - a locator uniquely referencing the destination LOB. 
-src_locp (IN/OUT) - a locator uniquely referencing the source LOB. 
-
-Related Functions
-OCILobTrim()
-OCIErrorGet()
-OCILobWrite()
-OCILobCopy()
-
-
-
-OCILobAssign()
-
-Name
-OCI Lob ASsiGn
-
-Purpose
-Assigns one LOB/FILE locator to another.
-
-Syntax
-sword OCILobAssign ( OCIEnv                *envhp, 
-                     OCIError              *errhp, 
-                     CONST OCILobLocator   *src_locp, 
-                     OCILobLocator         **dst_locpp );
-
-Comments
-Assign source locator to destination locator.  After the assignment, both 
-locators refer to the same LOB data.  For internal LOBs, the source locator's 
-LOB data gets copied to the destination locator's LOB data only when the 
-destination locator gets stored in the table.  Therefore, issuing a flush of 
-the object containing the destination locator will copy the LOB data. For 
-FILEs only the locator that refers to the OS file is copied to the table. The
-OS file is not copied.
-Note: The only difference between this and OCILobLocatorAssign is that this
-takes an environment handle whereas OCILobLocatorAssign takes an OCI service
-handle
-
-Parameters
-envhp (IN/OUT) - OCI environment handle initialized in object mode.
-errhp (IN/OUT) - The OCI error handle. If there is an error, it is recorded 
-in errhp and this function returns OCI_ERROR. Diagnostic information can be 
-obtained by calling OCIErrorGet().
-src_locp (IN) - LOB locator to copy from.
-dst_locpp (IN/OUT) - LOB locator to copy to.  The caller must allocate space 
-for the OCILobLocator by calling OCIDescriptorAlloc().
-
-See also
-OCIErrorGet()
-OCILobIsEqual()
-OCILobLocatorIsInit()
-OCILobLocatorAssign()
-
-
-OCILobCharSetForm()
-
-Name
-OCI Lob Get Character Set Form
-
-Purpose
-Gets the LOB locator's character set fpr,, if any.
-
-Syntax
-sword OCILobCharSetForm ( OCIEnv                    *envhp, 
-                          OCIError                  *errhp, 
-                          CONST OCILobLocator       *locp, 
-                          ub1                       *csfrm );
-
-Comments
-Returns the character set form of the input LOB locator in the csfrm output 
-parameter. 
-
-Parameters
-envhp (IN/OUT) - OCI environment handle initialized in object mode.
-errhp (IN/OUT) - error handle. The OCI error handle. If there is an error, it 
-is recorded in err and this function returns OCI_ERROR. Diagnostic 
-information can be obtained by calling OCIErrorGet().
-locp (IN) - LOB locator for which to get the character set form.
-csfrm(OUT) - character set form of the input LOB locator.  If the input 
-locator is for a BLOB or a BFILE, csfrm is set to 0 since there is no concept 
-of a character set for binary LOBs/FILEs.  The caller must allocate space for 
-the csfrm (ub1) and not write into the space.
-See also
-OCIErrorGet(), OCILobCharSetId(), OCILobLocatorIsInit
-
-
-
-OCILobCharSetId()
-
-Name
-OCI Lob get Character Set IDentifier
-
-Purpose
-Gets the LOB locator's character set ID, if any.
-
-Syntax
-sword OCILobCharSetId ( OCIEnv                    *envhp, 
-                        OCIError                  *errhp, 
-                        CONST OCILobLocator       *locp, 
-                        ub2                       *csid );
-
-Comments
-Returns the character set ID of the input LOB locator in the cid output 
-parameter. 
-
-Parameters
-envhp (IN/OUT) - OCI environment handle initialized in object mode.
-errhp (IN/OUT) - error handle. The OCI error handle. If there is an error, it 
-is recorded in err and this function returns OCI_ERROR. Diagnostic 
-information can be obtained by calling OCIErrorGet().
-locp (IN) - LOB locator for which to get the character set ID.
-csid (OUT) - character set ID of the input LOB locator.  If the input locator 
-is for a BLOB or a BFILE, csid is set to 0 since there is no concept of a 
-character set for binary LOBs/FILEs.  The caller must allocate space for the 
-character set id of type ub2 and not write into the space.
-
-See also
-OCIErrorGet(), OCILobCharSetForm(), OCILobLocatorIsInit()
-
-
-
-OCILobCopy()
-
-Name
-OCI Lob Copy
-
-Purpose
-Copies a portion of a LOB value into another LOB value.
-
-Syntax
-sword OCILobCopy ( OCISvcCtx        *svchp,
-                   OCIError         *errhp,
-                   OCILobLocator    *dst_locp,
-                   OCILobLocator    *src_locp,
-                   ub4              amount,
-                   ub4              dst_offset,
-                   ub4              src_offset );
-
-Comments
-Copies a portion of a LOB value into another LOB as specified. The data 
-is copied from the source to the destination. The source (src_locp) and the 
-destination (dlopb) LOBs must already exist.
-If the data already exists at the destination's start position, it is 
-overwritten with the source data. If the destination's start position is 
-beyond the end of the current data, a hole is created from the end of the data
-to the beginning of the newly written data from the source. The destination 
-LOB is extended to accommodate the newly written data if it extends 
-beyond the current length of the destination LOB. 
-It is an error to extend the destination LOB beyond the maximum length 
-allowed or to try to copy from a NULL LOB.
-Parameters
-svchp (IN) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-dst_locp (IN/OUT) - a locator uniquely referencing the destination LOB. 
-src_locp (IN/OUT) - a locator uniquely referencing the source LOB. 
-amount (IN) - the number of character or bytes, as appropriate, to be copied.
-dst_offset (IN) - this is the absolute offset for the destination LOB. 
-For character LOBs it is the number of characters from the beginning of the 
-LOB at which to begin writing. For binary LOBs it is the number of bytes from 
-the beginning of the lob from which to begin reading. The offset starts at 1.
-src_offset (IN) - this is the absolute offset for the source LOB. 
-For character LOBs it is the number of characters from the beginning of the 
-LOB, for binary LOBs it is the number of bytes. Starts at 1.
-
-See Also 
-OCIErrorGet(), OCILobAppend(), OCILobWrite(), OCILobTrim()
-
-OCILobCreateTemporary()
-
-Name
-OCI Lob Create Temporary
-
-Purpose
-Create a Temporary Lob
-
-Syntax
-sword OCILobCreateTemporary(OCISvcCtx          *svchp,
-                            OCIError           *errhp,
-                            OCILobLocator      *locp,
-                            ub2                 csid,
-                            ub1                 csfrm,
-                            ub1                 lobtype,
-                            boolean             cache,
-                            OCIDuration         duration);
-
-
-Comments
-svchp (IN) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-locp (IN/OUT) - a locator which points to the temporary Lob
-csid (IN) - the character set id
-csfrm(IN) - the character set form
-lobtype (IN) - the lob type - one of the three constants OCI_TEMP_BLOB, 
-               OCI_TEMP_CLOB and OCI_TEMP_NCLOB
-cache(IN)-  TRUE if the temporary LOB goes through the cache; FALSE, if not.
-duration(IN)- duration of the temporary LOB; Can be a valid duration id or one 
-              of the values: OCI_DURATION_SESSION, OCI_DURATION_CALL
-              Note: OCI_DURATION_TRANSACTION is NOT supported in 8.1
-Related functions
-OCILobFreeTemporary()
-OCILobIsTemporary()
-
-OCILobDisableBuffering()
-
-Name
-OCI Lob Disable Buffering
-
-Purpose
-Disable lob buffering for the input locator.
-
-
-Syntax
-sword OCILobDisableBuffering ( OCISvcCtx      *svchp,
-                               OCIError       *errhp,
-                               OCILobLocator  *locp);
-
-Comments
-
-Disable lob buffering for the input locator.  The next time data is
-read/written from/to the lob through the input locator, the lob
-buffering subsystem is *not* used.  Note that this call does *not*
-implicitly flush the changes made in the buffering subsystem.  The 
-user must explicitly call OCILobFlushBuffer() to do this.
-
-Parameters
-svchp (IN) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-locp (IN/OUT) - a locator uniquely referencing the LOB. 
-
-Related Functions
-OCILobEnableBuffering()
-OCIErrorGet()
-OCILobFlushBuffer()
-
-
-
-
-OCILobEnableBuffering()
-
-Name
-OCI Lob Enable Buffering
-
-Purpose
-Enable lob buffering for the input locator.
-
-
-Syntax
-sword OCILobEnableBuffering ( OCISvcCtx      *svchp,
-                              OCIError       *errhp,
-                              OCILobLocator  *locp);
-
-Comments
-
-Enable lob buffering for the input locator.  The next time data is
-read/written from/to the lob through the input locator, the lob
-buffering subsystem is used.  
-
-Once lob buffering is enabled for a locator, if that locator is passed to 
-one of the following routines, an error is returned:
-        OCILobCopy, OCILobAppend, OCILobErase, OCILobGetLength, OCILobTrim
-
-Parameters
-svchp (IN) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-locp (IN/OUT) - a locator uniquely referencing the LOB. 
-
-Related Functions
-OCILobDisableBuffering()
-OCIErrorGet()
-OCILobWrite()
-OCILobRead()
-OCILobFlushBuffer()
-
-
-
-
-OCILobErase()
-
-Name
-OCI Lob ERase
-
-Purpose
-Erases a specified portion of the LOB data starting at a specified offset.
-
-Syntax
-sword OCILobErase ( OCISvcCtx       *svchp,
-                  OCIError        *errhp,
-                  OCILobLocator   *locp,
-                  ub4             *amount,
-                  ub4             offset );
-
-Comments
-Erases a specified portion of the LOB data starting at a specified offset.
-The actual number of characters/bytes erased is returned. The actual number 
-of characters/bytes and the requested number of characters/bytes will differ 
-if the end of the LOB data is reached before erasing the requested number of 
-characters/bytes.
-If a section of data from the middle of the LOB data is erased, a hole is 
-created. When data from that hole is read, 0's are returned. If the LOB is
-NULL, this routine will indicate that 0 characters/bytes were erased.
-
-Parameters
-svchp (IN) - the service context handle.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-locp (IN/OUT) - the LOB for which to erase a section of data.
-amount (IN/OUT) - On IN, the number of characters/bytes to erase. On OUT, 
-the actual number of characters/bytes erased.
-offset (IN) - absolute offset from the beginning of the LOB data from which 
-to start erasing data. Starts at 1.
-
-See Also
-OCIErrorGet(), OCILobRead(), OCILobWrite()
-
-OCILobOpen()
-
-Name
-OCI Lob Open
-
-Purpose
-Opens an internal or external Lob.
-
-Syntax
-sword OCILobOpen( OCISvcCtx        *svchp,
-                  OCIError         *errhp,
-                  OCILobLocator    *locp,
-                  ub1               mode );
-
-Comments
-It is an error if the same lob is opened more than once in
-the same transaction. Lobs are opened implicitly if they are
-not opened before using them. A LOB has to be closed before
-the transaction commits else the transaction is rolled back.
-Open locators are closed if the transaction aborts. Multiple 
-users can open the same lob on different locators.
-Parameters
-svchp (IN) - the service context handle.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-locp (IN/OUT) - locator points to the LOB to be opened
-mode (IN) - mode in which to open the lob. The valid modes are
-read-only - OCI_FILE_READONLY, read-write - OCI_FILE_READWRITE 
-
-OCILobClose()
-
-Name
-OCI Lob Close
-
-Purpose
-Closes an open internal or external Lob.
-
-Syntax
-sword OCILobClose( OCISvcCtx        *svchp,
-                   OCIError         *errhp,
-                   OCILobLocator    *locp );
-
-
-Comments
-It is an error if the lob is not open at this time. All LOBs
-that have been opened in a transaction have to be closed 
-before the transaction commits, else the transaction gets
-rolled back.
-
-Parameters
-svchp (IN) - the service context handle.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-locp  (IN)  - A locator that was opened using OCILobOpen()
-
-
-OCILobFileClose()
-
-Name
-OCI Lob File CLoSe
-
-Purpose
-Closes a previously opened FILE.
-
-Syntax
-sword OCILobFileClose ( OCISvcCtx            *svchp,
-                        OCIError             *errhp,
-                        OCILobLocator        *filep );
-
-Comments
-Closes a previously opened FILE. It is an error if this function is called for
-an internal LOB. No error is returned if the FILE exists but is not opened.
-Parameters
-svchp (IN) - the service context handle.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-filep (IN/OUT) - a pointer to a FILE locator to be closed.
-
-See Also
-OCIErrorGet(), OCILobFileOpen(), OCILobFileCloseAll(), OCILobFileIsOpen(),
-OCILobFileExists(), CREATE DIRECTORY DDL
-
-
-
-
-OCILobFileCloseAll()
-
-Name
-OCI LOB FILE Close All
-
-Purpose
-Closes all open FILEs on a given service context.
-
-Syntax
-sword OCILobFileCLoseAll ( OCISvcCtx *svchp, 
-                           OCIError  *errhp );
-
-Comments
-Closes all open FILEs on a given service context.
-
-Parameters
-svchp (IN) - the service context handle.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-
-See also
-OCILobFileClose(),
-OCIErrorGet(), OCILobFileOpen(), OCILobFileIsOpen(),
-OCILobFileExists(), CREATE DIRECTORY DDL
-
-
-
-
-OCILobFileExists()
-
-Name
-OCI LOB FILE exists
-
-Purpose
-Tests to see if the FILE exists on the server
-
-Syntax
-sword OCILobFileExists ( OCISvcCtx     *svchp,
-                         OCIError      *errhp,
-                         OCILobLocator *filep,
-                         boolean       *flag );
-
-Comments
-Checks to see if a FILE exists for on the server.
-
-Parameters
-svchp (IN) - the OCI service context handle.
-errhp (IN/OUT) - error handle. The OCI error handle. If there is an error, 
-it is recorded in err and this function returns OCI_ERROR. Diagnostic 
-information can be obtained by calling OCIErrorGet().
-filep (IN) - pointer to the FILE locator that refers to the file.
-flag (OUT) - returns TRUE if the FILE exists; FALSE if it does not.
-
-See also
-OCIErrorGet, CREATE DIRECTORY (DDL)
-
-
-
-
-OCILobFileGetName()
-
-Name
-OCI LOB FILE Get file Name
-
-Purpose
-Gets the FILE locator's directory alias and file name.
-
-Syntax
-sword OCILobFileGetName ( OCIEnv                   *envhp,
-                          OCIError                 *errhp, 
-                          CONST OCILobLocator      *filep, 
-                          OraText                     *dir_alias,
-                          ub2                      *d_length, 
-                          OraText                     *filename, 
-                          ub2                      *f_length );
-
-Comments
-Returns the directory alias and file name associated with this file locator.  
-
-Parameters
-envhp (IN/OUT) - OCI environment handle initialized in object mode.
-errhp (IN/OUT) -The OCI error handle. If there is an error, it is recorded in 
-errhp and this function returns OCI_ERROR. Diagnostic information can be 
-obtained by calling OCIErrorGet().
-filep (IN) - FILE locator for which to get the directory alias and file name.
-dir_alias (OUT) - buffer into which the directory alias name is placed. The 
-caller must allocate enough space for the directory alias name and must not 
-write into the space.
-d_length (IN/OUT)                 
-        - IN: length of the input dir_alias string;
-        - OUT: length of the returned dir_alias string.
-filename (OUT) - buffer into which the file name is placed. The caller must 
-allocate enough space for the file name and must not write into the space.
-f_length (IN/OUT) 
-        - IN: length of the input filename string;
-         - OUT: lenght of the returned filename string.
-
-See also
-OCILobFileSetName(), OCIErrorGet()
-
-
-
-
-OCILobFileIsOpen()
-
-Name
-OCI LOB FILE Is Open?
-
-Purpose
-Tests to see if the FILE is open
-
-Syntax
-sword OCILobFileIsOpen ( OCISvcCtx *svchp,
-                         OCIError  *errhp,
-                         OCILobLocator *filep,
-                         boolean       *flag );
-
-Comments
-Checks to see if the FILE on the server is open for a given LobLocator.
-
-Parameters
-svchp (IN) - the OCI service context handle.
-errhp (IN/OUT) - error handle. The OCI error handle. If there is an error, it 
-is recorded in err and this function returns OCI_ERROR. Diagnostic 
-information can be obtained by calling OCIErrorGet().
-filep (IN) - pointer to the FILE locator being examined. If the input file 
-locator was never passed to OCILobFileOpen(), the file is considered not to 
-be opened by this locator. However, a different locator may have opened the 
-file. More than one file opens can be performed on the same file using 
-different locators.
-flag (OUT) - returns TRUE if the FILE is opened using this locator; FALSE if 
-it is not. 
-
-See also
-OCIErrorGet, OCILobFileOpen, OCILobFileClose, OCILobFileCloseAll, CREATE 
-DIRECTORY SQL command
-
-
-OCILobFileOpen()
-
-Name
-OCI LOB FILE open
-
-Purpose
-Opens a FILE for read-only access
-
-Syntax
-sword OCILobFileOpen ( OCISvcCtx            *svchp,
-                     OCIError             *errhp,
-                     OCILobLocator        *filep,
-                     ub1                  mode );
-
-Comments
-Opens a FILE. The FILE can be opened for read-only access only. FILEs may not 
-be written to throough ORACLE.
-
-Parameters 
-svchp (IN) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-filep (IN/OUT) - the FILE to open. Error if the locator does not refer to a 
-FILE. 
-mode (IN) - mode in which to open the file. The only valid mode is 
-read-only - OCI_FILE_READONLY. 
-
-See Also
-OCILobFileClose, OCIErrorGet, OCILobFileCloseAll, OCILobFileIsOpen, 
-OCILobFileSetName, CREATE DIRECTORY 
-
-
-
-
-OCILobFileSetName()
-
-Name
-OCI Lob File Set NaMe
-
-Purpose
-Sets directory alias and file name in the FILE locator.
-
-Syntax
-sword OCILobFileSetName ( OCIEnv             *envhp,
-                          OCIError           *errhp,
-                          OCILobLocator      **filepp,
-                          OraText               *dir_alias,
-                          ub2                d_length, 
-                          OraText               *filename, 
-                          ub2                f_length );
-Comments
-Sets the directory alias and file name in the LOB file locator.  
-Parameters
-envhp (IN/OUT) - OCI environment handle initialized in object mode.
-errhp (IN/OUT) - The OCI error handle. If there is an error, it is recorded 
-in errhp and this function returns OCI_ERROR. Diagnostic information can be 
-obtained by calling OCIErrorGet().
-filepp (IN/OUT) - FILE locator for which to set the directory alias name.
-The caller must have already allocated space for the locator by calling
-OCIDescriptorAlloc().
-dir_alias (IN) - buffer that contains the directory alias name to set in the 
-locator.
-d_length (IN) - length of the input dir_alias parameter.
-filename (IN) - buffer that contains the file name is placed.
-f_length (IN) - length of the input filename parameter.
-See also
-OCILobFileGetName, OCIErrorGet, CREATE DIRECTORY
-
-
-
-
-OCILobFlushBuffer()
-
-Name
-OCI Lob Flush all Buffers for this lob.
-
-Purpose
-Flush/write all buffers for this lob to the server.
-
-
-Syntax
-sword OCILobFlushBuffer ( OCISvcCtx       *svchp,
-                          OCIError        *errhp,
-                          OCILobLocator   *locp,
-                          ub4              flag);
-
-Comments
-
-Flushes to the server, changes made to the buffering subsystem that 
-are associated with the lob referenced by the input locator.  This 
-routine will actually write the data in the buffer to the lob in 
-the database.  Lob buffering must have already been enabled for the 
-input lob locator.
-
-This routine, by default, does not free the buffer resources for
-reallocation to another buffered LOB operation. However, if you
-want to free the buffer explicitly, you can set the flag parameter
-to OCI_LOB_BUFFER_FREE.
-
-Parameters
-svchp (IN/OUT) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-locp (IN/OUT) - a locator uniquely referencing the LOB. 
-flag    (IN)     - to indicate if the buffer resources need to be freed
-                   after a flush. Default value is OCI_LOB_BUFFER_NOFREE.
-                   Set it to OCI_LOB_BUFFER_FREE if you want the buffer
-                   resources to be freed.
-Related Functions
-OCILobEnableBuffering()
-OCILobDisableBuffering()
-OCIErrorGet()
-OCILobWrite()
-OCILobRead()
-
-
-OCILobFreeTemporary()
-
-Name
-OCI Lob Free Temporary
-
-Purpose
-Free a temporary LOB
-
-Syntax
-sword OCILobFreeTemporary(OCISvcCtx          *svchp,
-                          OCIError           *errhp,
-                          OCILobLocator      *locp);
-
-Comments
-  Frees the contents of the temporary Lob this locator is pointing to. Note
-  that the locator itself is not freed until a OCIDescriptorFree is done.
-
-Parameters
-svchp (IN/OUT) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-locp (IN/OUT) - a locator uniquely referencing the LOB
-
-Related functions
-OCILobCreateTemporary()
-OCILobIsTemporary()
-
-
-Name
-OCI Lob/File Get Chunk Size
-
-Purpose
-When creating the table, the user can specify the chunking factor, which can
-be a multiple of Oracle blocks. This corresponds to the chunk size used by the
-LOB data layer when accessing/modifying the LOB value. Part of the chunk is
-used to store system-related information and the rest stores the LOB value.
-This function returns the amount of space used in the LOB chunk to store 
-the LOB value.
-
-Syntax
-sword OCILobGetChunkSize ( OCISvcCtx      *svchp,
-                           OCIError       *errhp,
-                           OCILobLocator  *locp,
-                           ub4            *chunksizep );
-
-Comments
- Performance will be improved if the user issues read/write
-requests using a multiple of this chunk size. For writes, there is an added 
-benefit since LOB chunks are versioned and, if all writes are done on chunk
-basis, no extra/excess versioning is done nor duplicated. Users could batch 
-up the write until they have enough for a chunk instead of issuing several
-write calls for the same chunk.
-
-Parameters
-svchp (IN) - the service context handle.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-locp (IN/OUT) - a LOB locator that uniquely references the LOB. For internal
-LOBs, this locator must be a locator that was obtained from the server 
-specified by svchp. For FILEs, this locator can be initialized by a Select or
-OCILobFileSetName.
-chunksizep (OUT) - On output, it is the length of the LOB if not NULL - for 
-character LOBs it is the number of characters, for binary LOBs it is the 
-number of bytes in the LOB.
-
-Related Functions
-
-OCILobGetLength()
-
-Name
-OCI Lob/File Length
-
-Purpose
-Gets the length of a LOB/FILE. 
-
-Syntax
-sword OCILobGetLength ( OCISvcCtx      *svchp,
-                        OCIError       *errhp,
-                        OCILobLocator  *locp,
-                        ub4            *lenp );
-
-Comments
-Gets the length of a LOB/FILE. If the LOB/FILE is NULL, the length is 
-undefined.
-
-Parameters
-svchp (IN) - the service context handle.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-locp (IN/OUT) - a LOB locator that uniquely references the LOB. For internal
-LOBs, this locator must be a locator that was obtained from the server 
-specified by svchp. For FILEs, this locator can be initialized by a Select or
-OCILobFileSetName.
-lenp (OUT) - On output, it is the length of the LOB if not NULL - for 
-character LOBs it is the number of characters, for binary LOBs it is the 
-number of bytes in the LOB.
-
-Related Functions
-OCIErrorGet, OCIFileSetName
-
-
-
-OCILobIsEqual()
-
-Name
-
-OCI Lob Is Equal
-
-Purpose
-Compares two LOB locators for equality.
-
-Syntax
-sword OCILobIsEqual ( OCIEnv                  *envhp,
-                      CONST OCILobLocator     *x,
-                      CONST OCILobLocator     *y,
-                      boolean                 *is_equal );
-
-Comments
-Compares the given LOB locators for equality.  Two LOB locators are equal if 
-and only if they both refer to the same LOB data.
-Two NULL locators are considered not equal by this function.
-Parameters
-envhp (IN) - the OCI environment handle.
-x (IN) - LOB locator to compare.
-y (IN) - LOB locator to compare.
-is_equal (OUT) - TRUE, if the LOB locators are equal; FALSE if they are not.
-
-See also
-OCILobAssign, OCILobLocatorIsInit
-OCILobLocatorAssign,
-OCILobIsOpen()
-
-Name
-
-OCI Lob Is Open
-sword OCILobIsOpen(svchp, errhp, locp, flag)
-OCISvcCtx     *svchp;
-OCIError      *errhp;
-OCILobLocator *locp;
-boolean       *flag;
-
-Comments
-   Checks if the LOB locator was opened before. flag is set to TRUE
-   if opened; FALSE otherwise 
-
-
-Parameters
-svchp (IN) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-locp (IN) - the locator to test for temporary LOB
-flag(OUT) - TRUE, if the LOB locator points to is open
-                    FALSE, if not.
-
-OCILobIsTemporary()
-
-Name
-
-OCI Lob Is Temporary
-
-Purpose
-  Tests if this locator points to a temporary LOB
-
-Syntax
-sword OCILobIsTemporary(OCIEnv            *envhp,
-                        OCIError          *errhp,
-                        OCILobLocator     *locp,
-                        boolean           *is_temporary);
-
-Comments
-Tests the locator to determine if it points to a temporary LOB.
-If so, is_temporary is set to TRUE. If not, is_temporary is set
-to FALSE.
-
-Parameters
-envhp (IN) - the environment handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-locp (IN) - the locator to test for temporary LOB
-is_temporary(OUT) - TRUE, if the LOB locator points to a temporary LOB;
-                    FALSE, if not.
-
-See Also
-OCILobCreateTemporary, OCILobFreeTemporary
-
-
-OCILobLoadFromFile()
-
-Name
-OCI Lob Load From File
-
-Purpose
-Load/copy all or a portion of the file into an internal LOB.
-
-Syntax
-sword OCILobLoadFromFile ( OCISvcCtx        *svchp,
-                           OCIError         *errhp,
-                           OCILobLocator    *dst_locp,
-                           OCILobLocator    *src_filep,
-                           ub4              amount,
-                           ub4              dst_offset,
-                           ub4              src_offset );
-
-Comments
-Loads/copies a portion or all of a file value into an internal LOB as 
-specified.  The data is copied from the source file to the destination 
-internal LOB (BLOB/CLOB).  No character set conversions are performed 
-when copying the bfile data to a clob/nclob.  The bfile data must already
-be in the same character set as the clob/nclob in the database.  No
-error checking is performed to verify this.
-The source (src_filep) and the destination (dst_locp) LOBs must already exist.
-If the data already exists at the destination's start position, it is 
-overwritten with the source data. If the destination's start position is 
-beyond the end of the current data, a hole is created from the end of the data
-to the beginning of the newly written data from the source. The destination 
-LOB is extended to accommodate the newly written data if it extends 
-beyond the current length of the destination LOB. 
-It is an error to extend the destination LOB beyond the maximum length 
-allowed or to try to copy from a NULL LOB.
-Parameters
-svchp (IN) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-dst_locp (IN/OUT) - a locator uniquely referencing the destination internal 
-LOB which may be of type blob, clob, or nclob. 
-src_filep (IN/OUT) - a locator uniquely referencing the source BFILE. 
-amount (IN) - the number of bytes to be copied.
-dst_offset (IN) - this is the absolute offset for the destination LOB. 
-For character LOBs it is the number of characters from the beginning of the 
-LOB at which to begin writing. For binary LOBs it is the number of bytes from 
-the beginning of the lob from which to begin reading. The offset starts at 1.
-src_offset (IN) - this is the absolute offset for the source BFILE.  It is 
-the number of bytes from the beginning of the LOB.  The offset starts at 1.
-
-See Also 
-OCIErrorGet(), OCILobAppend(), OCILobWrite(), OCILobTrim(), OCILobCopy()
-
-OCILobLocatorAssign()
-
-Name
-OCI Lob LOCATOR ASsiGn
-
-Purpose
-Assigns one LOB/FILE locator to another.
-
-Syntax
-sword OCILobLocatorAssign ( OCISvcCtx             *svchp, 
-                            OCIError              *errhp, 
-                            CONST OCILobLocator   *src_locp, 
-                            OCILobLocator         **dst_locpp );
-
-Comments
-Assign source locator to destination locator.  After the assignment, both 
-locators refer to the same LOB data.  For internal LOBs, the source locator's 
-LOB data gets copied to the destination locator's LOB data only when the 
-destination locator gets stored in the table.  Therefore, issuing a flush of 
-the object containing the destination locator will copy the LOB data. For 
-FILEs only the locator that refers to the OS file is copied to the table. The
-OS file is not copied.
-Note : the only difference between this and OCILobAssign is that this takes
-a OCI service handle pointer instead of a OCI environment handle pointer
-
-Parameters
-svchp (IN/OUT) - OCI service handle initialized in object mode.
-errhp (IN/OUT) - The OCI error handle. If there is an error, it is recorded 
-in errhp and this function returns OCI_ERROR. Diagnostic information can be 
-obtained by calling OCIErrorGet().
-src_locp (IN) - LOB locator to copy from.
-dst_locpp (IN/OUT) - LOB locator to copy to.  The caller must allocate space 
-for the OCILobLocator by calling OCIDescriptorAlloc().
-
-See also
-OCIErrorGet()
-OCILobIsEqual()
-OCILobLocatorIsInit()
-OCILobAssign()
-
-
-
-
-OCILobLocatorIsInit()
-
-Name
-OCI LOB locator is initialized?
-
-Purpose
-Tests to see if a given LOB locator is initialized.
-
-Syntax
-sword OCILobLocatorIsInit ( OCIEnv   *envhp,
-                            OCIError *errhp,
-                            CONST OCILobLocator *locp,
-                            boolean *is_initialized );
-
-Comments
-Tests to see if a given LOB locator is initialized.
-
-Parameters
-envhp (IN/OUT) - OCI environment handle initialized in object mode.
-errhp (IN/OUT) - error handle. The OCI error handle. If there is an error, it 
-is recorded in err and this function returns OCI_ERROR. Diagnostic 
-information can be obtained by calling OCIErrorGet().
-locp (IN) - the LOB locator being tested
-is_initialized (OUT) - returns TRUE if the given LOB locator is initialized; 
-FALSE if it is not.
-
-See also
-OCIErrorGet, OCILobIsEqual
-
-
-
-
-OCILobRead()
-
-Name
-OCI Lob/File ReaD
-
-Purpose
-Reads a portion of a LOB/FILE as specified by the call into a buffer. 
-
-Syntax
-sword OCILobRead ( OCISvcCtx       *svchp,
-                   OCIError        *errhp,
-                   OCILobLocator   *locp,
-                   ub4             offset,
-                   ub4             *amtp,
-                   dvoid           *bufp,
-                   ub4             bufl,
-                   dvoid           *ctxp,  
-                   OCICallbackLobRead (cbfp)
-                                   (
-                                    dvoid         *ctxp,
-                                    CONST dvoid   *bufp,
-                                    ub4           len,
-                                    ub1           piece )
-                   ub2             csid,
-                   ub1             csfrm );
-
-Comments
-Reads a portion of a LOB/FILE as specified by the call into a buffer. Data 
-read from a hole is returned as 0s. It is an error to try to read from a NULL
-LOB/FILE. The OS FILE must already exist on the server and must have been 
-opened using the input locator. Oracle must hav epermission to read the OS 
-file and user must have read permission on the directory object.
-
-Parameters
-svchp (IN/OUT) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-locp (IN/OUT) - a LOB locator that uniquely references a LOB. 
-offset (IN) - On input, it is the absolute offset, for character LOBs in the 
-number of characters from the beginning of the LOB, for binary LOBs it is the 
-number of bytes. Starts from 1.
-amtp (IN/OUT) - On input, the number of character or bytes to be read. On 
-output, the actual number of bytes or characters read. 
-If the amount of bytes to be read is larger than the buffer length it is 
-assumed that the LOB is being read in a streamed mode. On input if this value 
-is 0, then the data shall be read in streamed mode from the LOB until the end 
-of LOB. If the data is read in pieces, *amtp always contains the length of 
-the last piece read.  If a callback function is defined, then this callback 
-function will be invoked each time bufl bytes are read off the pipe. Each 
-piece will be written into bufp.
-If the callback function is not defined, then OCI_NEED_DATA error code will 
-be returned. The application must invoke the LOB read over and over again to 
-read more pieces of the LOB until the OCI_NEED_DATA error code is not 
-returned. The buffer pointer and the length can be different in each call 
-if the pieces are being read into different sizes and location. 
-bufp (IN) - the pointer to a buffer into which the piece will be read. The 
-length of the allocated memory is assumed to be bufl. 
-bufl (IN) - the length of the buffer in octets. 
-ctxp (IN) - the context for the call back function. Can be NULL.
-cbfp (IN) - a callback that may be registered to be called for each piece. If 
-this is NULL, then OCI_NEED_DATA will be returned for each piece. 
-The callback function must return OCI_CONTINUE for the read to continue. 
-If any other error code is returned, the LOB read is aborted. 
-  ctxp (IN) - the context for the call back function. Can be NULL.
-  bufp (IN) - a buffer pointer for the piece.
-  len (IN) - the length of length of current piece in bufp.
-  piece (IN) - which piece - OCI_FIRST_PIECE, OCI_NEXT_PIECE or 
-  OCI_LAST_PIECE.
-csid - the character set ID of the buffer data
-csfrm - the character set form of the buffer data
-
-Related Functions
-OCIErrorGet, OCILobWrite, OCILobFileOpen, OCILobFileSetName, CREATE DIRECTORY
-
-
-
-
-OCILobTrim()
-
-Name
-
-OCI Lob  Trim
-
-Purpose
-Trims the lob value to a shorter length
-
-Syntax
-sword OCILobTrim ( OCISvcCtx       *svchp,
-                 OCIError        *errhp,
-                 OCILobLocator   *locp,
-                 ub4             newlen );
-
-Comments
-Truncates LOB data to a specified shorter length. 
-
-Parameters
-svchp (IN) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-locp (IN/OUT) - a LOB locator that uniquely references the LOB. This locator 
-must be a locator that was obtained from the server specified by svchp. 
-newlen (IN) - the new length of the LOB data, which must be less than or equal
-to the current length. 
-
-Related Functions
-OCIErrorGet, OCILobWrite, OCiLobErase, OCILobAppend, OCILobCopy
-
-
-
-
-
-OCILobWrite()
-
-Name
-OCI Lob Write
-
-Purpose
-Writes a buffer into a LOB
-
-Syntax
-sword OCILobWrite ( OCISvcCtx       *svchp,
-                    OCIError        *errhp,
-                    OCILobLocator   *locp,
-                    ub4             offset,
-                    ub4             *amtp,
-                    dvoid           *bufp, 
-                    ub4             buflen,
-                    ub1             piece,
-                    dvoid           *ctxp,  
-                    OCICallbackLobWrite   (cbfp)
-                                    (
-                                    dvoid    *ctxp,
-                                    dvoid    *bufp,
-                                    ub4      *lenp,
-                                    ub1      *piecep ) 
-                    ub2             csid
-                    ub1             csfrm );
-
-
-Comments
-Writes a buffer into a LOB as specified. If LOB data already exists 
-it is overwritten with the data stored in the buffer.
-The buffer can be written to the LOB in a single piece with this call, or
-it can be provided piecewise using callbacks or a standard polling method.
-If this value of the piece parameter is OCI_FIRST_PIECE, data must be 
-provided through callbacks or polling.
-If a callback function is defined in the cbfp parameter, then this callback 
-function will be invoked to get the next piece after a piece is written to 
-the pipe. Each piece will be written from bufp.
-If no callback function is defined, then OCILobWrite() returns the 
-OCI_NEED_DATA error code. The application must all OCILobWrite() again 
-to write more pieces of the LOB. In this mode, the buffer pointer and the 
-length can be different in each call if the pieces are of different sizes and 
-from different locations. A piece value of OCI_LAST_PIECE terminates the 
-piecewise write. 
-
-Parameters
-svchp (IN/OUT) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-locp (IN/OUT) - a LOB locator that uniquely references a LOB. 
-offset (IN) - On input, it is the absolute offset, for character LOBs in 
-the number of characters from the beginning of the LOB, for binary LOBs it 
-is the number of bytes. Starts at 1.
-bufp (IN) - the pointer to a buffer from which the piece will be written. The 
-length of the allocated memory is assumed to be the value passed in bufl. 
-Even if the data is being written in pieces, bufp must contain the first 
-piece of the LOB when this call is invoked.
-bufl (IN) - the length of the buffer in bytes.
-Note: This parameter assumes an 8-bit byte. If your platform uses a 
-longer byte, the value of bufl must be adjusted accordingly.
-piece (IN) - which piece of the buffer is being written. The default value for
-this parameter is OCI_ONE_PIECE, indicating the buffer will be written in a 
-single piece.
-The following other values are also possible for piecewise or callback mode: 
-OCI_FIRST_PIECE, OCI_NEXT_PIECE and OCI_LAST_PIECE.
-amtp (IN/OUT) - On input, takes the number of character or bytes to be 
-written. On output, returns the actual number of bytes or characters written. 
-If the data is written in pieces, *amtp will contain the total length of the 
-pieces written at the end of the call (last piece written) and is undefined in
-between. 
-(Note it is different from the piecewise read case)
-ctxp (IN) - the context for the call back function. Can be NULL.
-cbfp (IN) - a callback that may be registered to be called for each piece in 
-a piecewise write. If this is NULL, the standard polling method will be used.
-The callback function must return OCI_CONTINUE for the write to continue. 
-If any other error code is returned, the LOB write is aborted. The 
-callback takes the following parameters:
-  ctxp (IN) - the context for the call back function. Can be NULL.
-  bufp (IN/OUT) - a buffer pointer for the piece.
-  lenp (IN/OUT) - the length of the buffer (in octets) and the length of 
-  current piece in bufp (out octets).
-  piecep (OUT) - which piece - OCI_NEXT_PIECE or OCI_LAST_PIECE.
-csid - the character set ID of the buffer data
-csfrm - the character set form of the buffer data
-Related Functions
-
-OCILobWriteAppend()
-
-Name
-OCI Lob Write Append
-
-Purpose
-Writes data to the end of a LOB value. This call provides the ability
-to get the length of the data and append it to the end of the LOB in
-a single round trip to the server.
-
-Syntax
-sword OCILobWriteAppend ( OCISvcCtx       *svchp,
-                    OCIError        *errhp,
-                    OCILobLocator   *locp,
-                    ub4             *amtp,
-                    dvoid           *bufp, 
-                    ub4             buflen,
-                    ub1             piece,
-                    dvoid           *ctxp,  
-                    OCICallbackLobWrite   (cbfp)
-                                    (
-                                    dvoid    *ctxp,
-                                    dvoid    *bufp,
-                                    ub4      *lenp,
-                                    ub1      *piecep ) 
-                    ub2             csid
-                    ub1             csfrm );
-
-
-Comments
-Writes a buffer to the end of a LOB as specified. If LOB data already exists 
-it is overwritten with the data stored in the buffer.
-The buffer can be written to the LOB in a single piece with this call, or
-it can be provided piecewise using callbacks or a standard polling method.
-If this value of the piece parameter is OCI_FIRST_PIECE, data must be 
-provided through callbacks or polling.
-If a callback function is defined in the cbfp parameter, then this callback 
-function will be invoked to get the next piece after a piece is written to the 
-pipe. Each piece will be written from bufp.
-If no callback function is defined, then OCILobWriteAppend() returns the 
-OCI_NEED_DATA error code. The application must all OCILobWriteAppend() again 
-to write more pieces of the LOB. In this mode, the buffer pointer and the 
-length can be different in each call if the pieces are of different sizes and 
-from different locations. A piece value of OCI_LAST_PIECE terminates the 
-piecewise write. 
-
-Parameters
-svchp (IN/OUT) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-locp (IN/OUT) - a LOB locator that uniquely references a LOB. 
-bufp (IN) - the pointer to a buffer from which the piece will be written. The 
-length of the allocated memory is assumed to be the value passed in bufl. Even 
-if the data is being written in pieces, bufp must contain the first piece of 
-the LOB when this call is invoked.
-bufl (IN) - the length of the buffer in bytes.
-Note: This parameter assumes an 8-bit byte. If your platform uses a 
-longer byte, the value of bufl must be adjusted accordingly.
-piece (IN) - which piece of the buffer is being written. The default value for
-this parameter is OCI_ONE_PIECE, indicating the buffer will be written in a 
-single piece.
-The following other values are also possible for piecewise or callback mode: 
-OCI_FIRST_PIECE, OCI_NEXT_PIECE and OCI_LAST_PIECE.
-amtp (IN/OUT) - On input, takes the number of character or bytes to be 
-written. On output, returns the actual number of bytes or characters written. 
-If the data is written in pieces, *amtp will contain the total length of the 
-pieces written at the end of the call (last piece written) and is undefined in
-between. 
-(Note it is different from the piecewise read case)
-ctxp (IN) - the context for the call back function. Can be NULL.
-cbfp (IN) - a callback that may be registered to be called for each piece in a 
-piecewise write. If this is NULL, the standard polling method will be used.
-The callback function must return OCI_CONTINUE for the write to continue. 
-If any other error code is returned, the LOB write is aborted. The 
-callback takes the following parameters:
-  ctxp (IN) - the context for the call back function. Can be NULL.
-  bufp (IN/OUT) - a buffer pointer for the piece.
-  lenp (IN/OUT) - the length of the buffer (in octets) and the length of 
-  current piece in bufp (out octets).
-  piecep (OUT) - which piece - OCI_NEXT_PIECE or OCI_LAST_PIECE.
-csid - the character set ID of the buffer data
-csfrm - the character set form of the buffer data
-Related Functions
-
-
-
-
-OCILogoff()
-Name
-OCI simplified Logoff
-Purpose
-This function is used to terminate a session created with OCILogon() or
-OCILogon2().
-Syntax
-sword OCILogoff ( OCISvcCtx      *svchp
-                   OCIError       *errhp );
-Comments
-This call is used to terminate a session which was created with OCILogon() or
-OCILogon2().  
-This call implicitly deallocates the server, authentication, and service 
-context handles.
-Note: For more information on logging on and off in an application, 
-refer to the section "Application Initialization, Connection, and 
-Authorization" on page 2-16.
-Parameters
-svchp (IN) - the service context handle which was used in the call to 
-OCILogon() or OCILogon2().
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-See Also
-OCILogon(), OCILogon2().
-
-
-
-
-
-
-OCILogon()
-Name
-OCI Service Context Logon
-Purpose
-This function is used to create a simple logon session.
-Syntax
-sword OCILogon ( OCIEnv          *envhp,
-                       OCIError        *errhp,
-                       OCISvcCtx       *svchp,
-                       CONST OraText      *username,
-                       ub4             uname_len,
-                       CONST OraText      *password,
-                       ub4             passwd_len,
-                       CONST OraText      *dbname,
-                       ub4             dbname_len );
-Comments
-This function is used to create a simple logon session for an application. 
-Note: Users requiring more complex session (e.g., TP monitor 
-applications) should refer to the section "Application Initialization, 
-Connection, and Authorization" on page 2-16.
-This call allocates the error and service context handles which are passed to 
-it. This call also implicitly allocates server and authentication handles 
-associated with the session.  These handles can be retrieved by calling 
-OCIAttrGet() on the service context handle.
-Parameters
-envhp (IN) - the OCI environment handle.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-svchp (OUT) - the service context pointer.
-username (IN) - the username.
-uname_len (IN) - the length of username.
-password (IN) - the user's password.
-passwd_len (IN) - the length of password.
-dbname (IN) - the name of the database to connect to.
-dbname_len (IN) - the length of dbname.
-See Also
-OCILogoff()
-
-
-
-
-
-OCILogon2()
-Name
-OCI Service Context Logon
-Purpose
-This function is used to create a logon session in connection pooling mode.
-Syntax
-sword OCILogon2 ( OCIEnv          *envhp,
-                       OCIError        *errhp,
-                       OCISvcCtx       **svchp,
-                       CONST OraText      *username,
-                       ub4             uname_len,
-                       CONST OraText      *password,
-                       ub4             passwd_len,
-                       CONST OraText      *dbname,
-                       ub4             dbname_len,
-                       ub4             mode);
-Comments
-This function is used to create a simple logon session for an application in
-Connection Pooling mode. The valid values for mode are currently OCI_POOL and
-OCI_DEFAULT. Call to this function with OCI_DEFAULT mode is equivalent to 
-OCILogon() call.
-This call allocates the error and service context handles which are passed to 
-it. This call also implicitly allocates server and authentication handles 
-associated with the session.  These handles can be retrieved by calling 
-OCIAttrGet() on the service context handle. This call assumes that 
-OCIConnectionPoolCreate() has already been called for the same dbname.
-Parameters
-envhp (IN) - the OCI environment handle.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-svchp (OUT) - the service context pointer.
-username (IN) - the username.
-uname_len (IN) - the length of username.
-password (IN) - the user's password. If this is null, it is assumed that a
-                proxy session has to be created and the required grants on 
-                the database are already done.
-passwd_len (IN) - the length of password.
-dbname (IN) - the name of the database to connect to.
-dbname_len (IN) - the length of dbname.
-mode (IN) - the mode for doing the server attach. Should be OCI_POOL for
-            using Connection Pooling.
-
-
-See Also
-OCILogoff()
-
-
-
-
-
-OCIMemoryFree()
-Name
-OCI FREE Memory
-Purpose
-Frees up storage associated with the pointer.
-Syntax
-void OCIMemoryFree ( CONST OCIStmt   *stmhp,
-                     dvoid           *memptr);
-Comments
-Frees up dynamically allocated data pointers associated with the pointer using 
-either the default memory free function or the registered memory free 
-function, as the case may be.
-A user-defined memory free function can be registered during the initial call 
-to OCIInitialize(). 
-This call is always successful. 
-Parameters
-stmhp (IN) - statement handle which returned this data buffer.
-memptr (IN) - pointer to data allocated by the client library. 
-Related Functions
-OCIInitialize()
-
-
-
-
-
-OCIParamGet()
-Name
-OCI Get PARaMeter
-Purpose
-Returns a descriptor of a parameter specified by position in the describe 
-handle or statement handle.
-Syntax
-sword OCIParamGet ( CONST dvoid       *hndlp,
-                  ub4         htype,
-                  OCIError    *errhp,
-                  dvoid    **parmdpp,
-                  ub4         pos );
-Comments
-This call returns a descriptor of a parameter specified by position in the 
-describe handle or statement handle. Parameter descriptors are always 
-allocated internally by the OCI library. They are read-only.
-OCI_NO_DATA may be returned if there are no parameter descriptors for this 
-position. 
-See Appendix B for more detailed information about parameter descriptor 
-attributes.
-Parameters
-hndlp (IN) - a statement handle or describe handle. The OCIParamGet() 
-function will return a parameter descriptor for this handle. 
-htype (IN) - the type of the handle passed in the handle parameter. Valid 
-types are OCI_HTYPE_DESCRIBE, for a describe handle OCI_HTYPE_STMT, for a 
-statement handle
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-parmdpp (OUT) - a descriptor of the parameter at the position given in the pos 
-parameter.
-pos (IN) - position number in the statement handle or describe handle. A 
-parameter descriptor will be returned for this position.
-Note: OCI_NO_DATA may be returned if there are no parameter 
-descriptors for this position. 
-Related Functions
-OCIAttrGet(), OCIAttrSet()
-
-
-
-
-
-OCIParamSet()
-Name
-OCI Parameter Set in handle
-Purpose
-Used to set a complex object retrieval descriptor into a complex object 
-retrieval handle.
-Syntax
-sword   OCIParamGet ( dvoid *hndlp,
-                       ub4 htyp,
-                      OCIError *errhp,
-                      CONST dvoid *dscp,
-                      ub4 dtyp,
-                      ub4 pos );
-Comments
-This call sets a given complex object retrieval descriptor into a complex 
-object retrieval handle.
-The handle must have been previously allocated using OCIHandleAlloc(), and 
-the descriptor must have been previously allocated using OCIDescAlloc(). 
-Attributes of the descriptor are set using OCIAttrSet().
-Parameters
-hndlp (IN/OUT) - handle pointer.
-htype (IN) - handle type.
-errhp (IN/OUT) - error handle.
-dscp (IN) - complex object retrieval descriptor pointer.
-dtyp (IN) - 
-pos (IN) - position number.
-See Also
-
-
-
-
-
-OCIPasswordChange()
-Name
-OCI Change PassWord
-Purpose
-This call allows the password of an account to be changed.
-Syntax
-sword OCIPasswordChange ( OCISvcCtx     *svchp,
-                        OCIError      *errhp,
-                        CONST OraText    *user_name,
-                        ub4           usernm_len,
-                        CONST OraText    *opasswd,
-                        ub4           opasswd_len,
-                        CONST OraText    *npasswd,
-                        sb4           npasswd_len,
-                        ub4           mode);
-Comments
-This call allows the password of an account to be changed. This call is 
-similar to OCISessionBegin() with the following differences:
-If the user authentication is already established, it authenticates 
-the account using the old password and then changes the 
-password to the new password
-If the user authentication is not established, it establishes a user 
-authentication and authenticates the account using the old 
-password, then changes the password to the new password.
-This call is useful when the password of an account is expired and 
-OCISessionBegin() returns an error or warning which indicates that the 
-password has expired. 
-Parameters
-svchp (IN/OUT) - a handle to a service context. The service context handle 
-must be initialized and have a server context handle associated with it.
-errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-user_name (IN) - specifies the user name. It points to a character string, 
-whose length is specified in usernm_len. This parameter must be NULL if the 
-service context has been initialized with an authentication handle.
-usernm_len (IN) - the length of the user name string specified in user_name. 
-For a valid user name string, usernm_len must be non-zero.
-opasswd (IN) - specifies the user's old password. It points to a character 
-string, whose length is specified in opasswd_len .
-opasswd_len (IN) - the length of the old password string specified in opasswd. 
-For a valid password string, opasswd_len must be non-zero.
-npasswd (IN) - specifies the user's new password. It points to a character 
-string, whose length is specified in npasswd_len which must be non-zero for a 
-valid password string. If the password complexity verification routine is 
-specified in the user's profile to verify the new password's complexity, the 
-new password must meet the complexity requirements of the verification 
-function.
-npasswd_len (IN)  - then length of the new password string specified in 
-npasswd. For a valid password string, npasswd_len must be non-zero.
-mode - pass as OCI_DEFAULT.
-Related Functions
-OCISessionBegin()
-
-
-----------------------------------OCIReset------------------------------------
-
-
-OCIReset()
-Name
-OCI Reset
-Purpose
-Resets the interrupted asynchronous operation and protocol. Must be called
-if a OCIBreak call had been issued while a non-blocking operation was in
-progress.
-Syntax
-sword OCIReset ( dvoid      *hndlp,
-                 OCIError   *errhp);
-Comments
-This call is called in non-blocking mode ONLY. Resets the interrupted
-asynchronous operation and protocol. Must be called if a OCIBreak call 
-had been issued while a non-blocking operation was in progress. 
-Parameters
-hndlp (IN) - the service context handle or the server context handle.
-errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-Related Functions
-
-
-OCIResultSetToStmt()
-Name
-OCI convert Result Set to Statement Handle
-Purpose
-Converts a descriptor to statement handle for fetching rows.
-Syntax
-sword OCIResultSetToStmt ( OCIResult     *rsetdp,
-                         OCIError      *errhp );
-Comments
-Converts a descriptor to statement handle for fetching rows.
-A result set descriptor can be allocated with a call to OCIDescAlloc().
-Parameters
-rsetdp (IN/OUT) - a result set descriptor pointer. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-Related Functions
-OCIDescAlloc()
-
-
-
-
-OCIServerAttach()
-Name
-OCI ATtaCH to server
-Purpose
-Creates an access path to a data source for OCI operations.
-Syntax
-sword OCIServerAttach ( OCIServer    *srvhp,
-                      OCIError     *errhp,
-                      CONST OraText   *dblink,
-                      sb4          dblink_len,
-                      ub4          mode);
-Comments
-This call is used to create an association between an OCI application and a 
-particular server. 
-This call initializes a server context handle, which must have been previously 
-allocated with a call to OCIHandleAlloc().
-The server context handle initialized by this call can be associated with a 
-service context through a call to OCIAttrSet(). Once that association has been 
-made, OCI operations can be performed against the server.
-If an application is operating against multiple servers, multiple server 
-context handles can be maintained. OCI operations are performed against 
-whichever server context is currently associated with the service context.
-Parameters
-srvhp (IN/OUT) - an uninitialized server context handle, which gets 
-initialized by this call. Passing in an initialized server handle causes an 
-error. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-dblink (IN) - specifies the database (server) to use. This parameter points to
-a character string which specifies a connect string or a service point. If the 
-connect string is NULL, then this call attaches to the default host. The length
-of connstr is specified in connstr_len. The connstr pointer may be freed by the
-caller on return.
-dblink_len (IN) - the length of the string pointed to by connstr. For a valid 
-connect string name or alias, connstr_len must be non-zero.
-mode (IN) - specifies the various modes of operation.  For release 8.0, pass as
-OCI_DEFAULT - in this mode, calls made to the server on this server context 
-are made in blocking mode. 
-Example
-See the description of OCIStmtPrepare() on page 13-96 for an example showing 
-the use of OCIServerAttach().
-Related Functions
-OCIServerDetach()
-
-
-
-OCIServerDetach()
-Name
-OCI DeTaCH server
-Purpose
-Deletes an access to a data source for OCI operations.
-Syntax
-sword OCIServerDetach ( OCIServer   *svrhp,
-                      OCIError    *errhp,
-                      ub4         mode); 
-Comments
-This call deletes an access to data source for OCI operations, which was 
-established by a call to OCIServerAttach(). 
-Parameters
-srvhp (IN) - a handle to an initialized server context, which gets reset to 
-uninitialized state. The handle is not de-allocated. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-mode (IN) - specifies the various modes of operation. The only valid mode is 
-OCI_DEFAULT for the default mode. 
-Related Functions
-OCIServerAttach()
-
-
-
-OCIServerVersion()
-Name
-OCI VERSion
-Purpose
-Returns the version string of the Oracle server.
-Syntax
-sword OCIServerVersion ( dvoid        *hndlp, 
-                       OCIError     *errhp, 
-                       OraText         *bufp,
-                       ub4          bufsz
-                       ub1          hndltype );
-Comments
-This call returns the version string of the Oracle server. 
-For example, the following might be returned as the version string if your 
-application is running against a 7.3.2 server:
-Oracle7 Server Release 7.3.2.0.0 - Production Release
-PL/SQL Release 2.3.2.0.0 - Production
-CORE Version 3.5.2.0.0 - Production
-TNS for SEQUENT DYNIX/ptx: Version 2.3.2.0.0 - Production
-NLSRTL Version 3.2.2.0.0 - Production
-
-Parameters
-hndlp (IN) - the service context handle or the server context handle.
-errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-bufp (IN) - the buffer in which the version information is returned.
-bufsz (IN) - the length of the buffer.
-hndltype (IN) - the type of handle passed to the function.
-Related Functions
-
-
-
-
-
-OCISessionBegin()
-Name
-OCI Session Begin and authenticate user
-Purpose
-Creates a user authentication and begins a user session for a given server.
-Syntax
-sword OCISessionBegin ( OCISvcCtx     *svchp,
-                      OCIError      *errhp,
-                      OCISession    *usrhp,
-                      ub4           credt,
-                      ub4           mode);
-
-Comments
-For Oracle8, OCISessionBegin() must be called for any given server handle 
-before requests can be made against it. Also, OCISessionBegin() only supports 
-authenticating the user for access to the Oracle server specified by the 
-server handle in the service context. In other words, after OCIServerAttach() 
-is called to initialize a server handle, OCISessionBegin() must be called to 
-authenticate the user for that given server. 
-When OCISessionBegin() is called for the first time for the given server 
-handle, the initialized authentication handle is called a primary 
-authentication context. A primary authentication context may not be created 
-with the OCI_MIGRATE mode. Also, only one primary authentication context can 
-be created for a given server handle and the primary authentication context c
-an only ever be used with that server handle. If the primary authentication 
-context is set in a service handle with a different server handle, then an 
-error will result.
-After OCISessionBegin() has been called for the server handle, and the primary 
-authentication context is set in the service handle, OCISessionBegin() may be 
-called again to initialize another authentication handle with different (or 
-the same) credentials. When OCISessionBegin() is called with a service handle 
-set with a primary authentication context, the returned authentication context
-in authp is called a user authentication context. As many user authentication 
-contexts may be initialized as desired.
-User authentication contexts may be created with the OCI_MIGRATE mode. 
-If the OCI_MIGRATE mode is not specified, then the user authentication 
-context can only ever be used with the same server handle set in svchp. If 
-OCI_MIGRATE mode is specified, then the user authentication may be set 
-with different server handles. However, the user authentication context is 
-restricted to use with only server handles which resolve to the same database 
-instance and that have equivalent primary authentication contexts. Equivalent 
-authentication contexts are those which were authenticated as the same 
-database user.
-OCI_SYSDBA, OCI_SYSOPER, and OCI_PRELIM_AUTH may only be used 
-with a primary authentication context.
-To provide credentials for a call to OCISessionBegin(), one of two methods are 
-supported. The first is to provide a valid username and password pair for 
-database authentication in the user authentication handle passed to 
-OCISessionBegin(). This involves using OCIAttrSet() to set the 
-OCI_ATTR_USERNAME and OCI_ATTR_PASSWORD attributes on the 
-authentication handle. Then OCISessionBegin() is called with 
-OCI_CRED_RDBMS.
-Note: When the authentication handle is terminated using 
-OCISessionEnd(), the username and password attributes remain 
-unchanged and thus can be re-used in a future call to OCISessionBegin(). 
-Otherwise, they must be reset to new values before the next 
-OCISessionBegin() call.
-The second type of credentials supported are external credentials. No 
-attributes need to be set on the authentication handle before calling 
-OCISessionBegin(). The credential type is OCI_CRED_EXT. This is equivalent 
-to the Oracle7 `connect /' syntax. If values have been set for 
-OCI_ATTR_USERNAME and OCI_ATTR_PASSWORD, then these are 
-ignored if OCI_CRED_EXT is used.
-Parameters
-svchp (IN) - a handle to a service context. There must be a valid server 
-handle set in svchp.
-errhp (IN) - an error handle to the retrieve diagnostic information.
-usrhp (IN/OUT) - a handle to an authentication context, which is initialized 
-by this call.
-credt (IN) - specifies the type of credentials to use for authentication. 
-Valid values for credt are:
-OCI_CRED_RDBMS - authenticate using a database username and 
-password pair as credentials. The attributes OCI_ATTR_USERNAME 
-and OCI_ATTR_PASSWORD should be set on the authentication 
-context before this call.
-OCI_CRED_EXT - authenticate using external credentials. No username 
-or password is provided.
-mode (IN) - specifies the various modes of operation. Valid modes are:
-OCI_DEFAULT - in this mode, the authentication context returned may 
-only ever be set with the same server context specified in svchp. This 
-establishes the primary authentication context.
-OCI_MIGRATE - in this mode, the new authentication context may be 
-set in a service handle with a different server handle. This mode 
-establishes the user authentication context. 
-OCI_SYSDBA - in this mode, the user is authenticated for SYSDBA 
-access.
-OCI_SYSOPER - in this mode, the user is authenticated for SYSOPER 
-access.
-OCI_PRELIM_AUTH - this mode may only be used with OCI_SYSDBA 
-or OCI_SYSOPER to authenticate for certain administration tasks.
-Related Functions
-OCISessionEnd()
-
-
-
-
-
-
-OCISessionEnd()
-Name
-OCI Terminate user Authentication Context
-Purpose
-Terminates a user authentication context created by OCISessionBegin()
-Syntax
-sword OCISessionEnd ( OCISvcCtx       *svchp,
-                    OCIError        *errhp,
-                    OCISession      *usrhp,
-                    ub4             mode);
-
-Comments
-The user security context associated with the service context is invalidated 
-by this call. Storage for the authentication context is not freed. The 
-transaction specified by the service context is implicitly committed. The 
-transaction handle, if explicitly allocated, may be freed if not being used.
-Resources allocated on the server for this user are freed.
-The authentication handle may be reused in a new call to OCISessionBegin().
-Parameters
-svchp (IN/OUT) - the service context handle. There must be a valid server 
-handle and user authentication handle associated with svchp.
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-usrhp (IN) - de-authenticate this user. If this parameter is passed as NULL, the 
-user in the service context handle is de-authenticated.
-mode (IN) - the only valid mode is OCI_DEFAULT.
-Example
-In this example, an authentication context is destroyed.
-Related Functions
-OCISessionBegin()
-
-
-
-
-OCIStmtExecute()
-Name
-OCI EXECute
-Purpose
-This call associates an application request with a server.
-Syntax
-sword OCIStmtExecute ( OCISvcCtx           *svchp,
-                     OCIStmt             *stmtp,
-                     OCIError            *errhp,
-                     ub4                 iters,
-                     ub4                 rowoff,
-                     CONST OCISnapshot   *snap_in,
-                     OCISnapshot         *snap_out,
-                     ub4                 mode );
-Comments
-This function  is used to execute a prepared SQL statement.
-Using an execute call, the application associates a request with a server. On 
-success, OCI_SUCCESS is returned.
-If a SELECT statement is executed, the description of the select list follows 
-implicitly as a response. This description is buffered on the client side for 
-describes, fetches and define type conversions. Hence it is optimal to 
-describe a select list only after an execute. 
-Also for SELECT statements, some results are available implicitly. Rows will 
-be received and buffered at the end of the execute. For queries with small row 
-count, a prefetch causes memory to be released in the server if the end of 
-fetch is reached, an optimization that may result in memory usage reduction. 
-Set attribute call has been defined to set the number of rows to be prefetched
-per result set.
-For SELECT statements, at the end of the execute, the statement handle 
-implicitly maintains a reference to the service context on which it is 
-executed. It is the user's responsibility to maintain the integrity of the 
-service context. If the attributes of a service context is changed for 
-executing some operations on this service context, the service context must 
-be restored to have the same attributes, that a statement was executed with, 
-prior to a fetch on the statement handle. The implicit reference is maintained 
-until the statement handle is freed or the fetch is cancelled or an end of 
-fetch condition is reached.
-Note: If output variables are defined for a SELECT statement before a 
-call to OCIStmtExecute(), the number of rows specified by iters will be 
-fetched directly into the defined output buffers and additional rows 
-equivalent to the prefetch count will be prefetched. If there are no 
-additional rows, then the fetch is complete without calling 
-OCIStmtFetch().
-The execute call will return errors if the statement has bind data types that 
-are not supported in an Oracle7 server.
-Parameters
-svchp (IN/OUT) - service context handle. 
-stmtp (IN/OUT) - an statement handle - defines the statement and the 
-associated data to be executed at the server. It is invalid to pass in a 
-statement handle that has bind of data types only supported in release 8.0 
-when srvchp points to an Oracle7 server. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. If the statement is being 
-batched and it is successful, then this handle will contain this particular 
-statement execution specific errors returned from the server when the batch is 
-flushed.
-iters (IN) - the number of times this statement is executed for non-Select 
-statements. For Select statements, if iters is non-zero, then defines must 
-have been done for the statement handle. The execution fetches iters rows into 
-these predefined buffers and prefetches more rows depending upon the prefetch 
-row count. This function returns an error if iters=0 for non-SELECT 
-statements.
-rowoff (IN) - the index from which the data in an array bind is relevant for 
-this multiple row execution. 
-snap_in (IN) - this parameter is optional. if supplied, must point to a 
-snapshot descriptor of type OCI_DTYPE_SNAP.  The contents of this descriptor 
-must be obtained from the snap_out parameter of a previous call.  The 
-descriptor is ignored if the SQL is not a SELECT.  This facility allows 
-multiple service contexts to ORACLE to see the same consistent snapshot of the 
-database's committed data.  However, uncommitted data in one context is not 
-visible to another context even using the same snapshot.
-snap_out (OUT) - this parameter optional. if supplied, must point to a 
-descriptor of type OCI_DTYPE_SNAP. This descriptor is filled in with an 
-opaque representation which is the current ORACLE "system change 
-number" suitable as a snap_in input to a subsequent call to OCIStmtExecute().  
-This descriptor should not be used any longer than necessary in order to avoid 
-"snapshot too old" errors. 
-mode (IN) - The modes are:
-If OCI_DEFAULT_MODE, the default mode, is selected, the request is 
-immediately executed. Error handle contains diagnostics on error if any. 
-OCI_EXACT_FETCH - if the statement is a SQL SELECT, this mode is 
-only valid if the application has set the prefetch row count prior to this 
-call. In this mode, the OCI library will get up to the number of rows 
-specified (i.e., prefetch row count plus iters). If the number of rows 
-returned by the query is greater than this value, OCI_ERROR will be 
-returned with ORA-01422 as the implementation specific error in a 
-diagnostic record. If the number of rows returned by the query is 
-smaller than the prefetch row count, OCI_SUCCESS_WITH_INFO will 
-be returned with ORA-01403 as the implementation specific error. The 
-prefetch buffer size is ignored and the OCI library tries to allocate all the 
-space required to contain the prefetched rows. The exact fetch semantics 
-apply to only the top level rows. No more rows can be fetched for this 
-query at the end of the call. 
-OCI_KEEP_FETCH_STATE - the result set rows (not yet fetched) of this 
-statement executed in this transaction will be maintained when the 
-transaction is detached for migration. By default, a query is cancelled 
-when a transaction is detached for migration. This mode is the default 
-mode when connected to a V7 server. 
-Related Functions
-OCIStmtPrepare()
-
-
-
-
-
-OCIStmtFetch()
-Name
-OCI FetCH
-Purpose
-Fetches rows from a query.
-Syntax
-sword OCIStmtFetch ( OCIStmt     *stmtp,
-                   OCIError    *errhp, 
-                   ub4         nrows,
-                   ub2         orientation,
-                   ub4         mode);
-Comments
-The fetch call is a local call, if prefetched rows suffice. However, this is 
-transparent to the application. If LOB columns are being read, LOB locators 
-are fetched for subsequent LOB operations to be performed on these locators. 
-Prefetching is turned off if LONG columns are involved. 
-A fetch with nrows set to 0 rows effectively cancels the fetch for this 
-statement.
-Parameters
-stmtp (IN) - a statement (application request) handle.
-errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-nrows (IN) - number of rows to be fetched from the current position.
-orientation (IN) - for release 8.0, the only acceptable value is 
-OCI_FETCH_NEXT, which is also the default value. 
-mode (IN) - for release 8.0, beta-1, the following mode is defined.
-OCI_DEFAULT - default mode
-OCI_EOF_FETCH - indicates that it is the last fetch from the result set. 
-If nrows is non-zero, setting this mode effectively cancels fetching after 
-retrieving nrows, otherwise it cancels fetching immediately. 
-Related Functions
-OCIAttrGet()
-
-OCIStmtFetch2()
-Name
-OCI FetCH2
-Purpose
-Fetches rows from a query.
-Syntax
-sword OCIStmtFetch2 ( OCIStmt     *stmtp,
-                   OCIError    *errhp, 
-                   ub4         nrows,
-                   ub2         orientation,
-                   ub4         scrollOffset,
-                   ub4         mode);
-Comments
-The fetch call works similar to the OCIStmtFetch call with the 
-addition of the fetchOffset parameter. It can be used on any 
-statement handle, whether it is scrollable or not. For a 
-non-scrollable statement handle, the only acceptable value 
-will be OCI_FETCH_NEXT, and the fetchOffset parameter will be 
-ignored. Applications are encouraged to use this new call. 
-
-A fetchOffset with OCI_FETCH_RELATIVE is equivalent to 
-OCI_FETCH_CURRENT with a value of 0, is equivalent to 
-OCI_FETCH_NEXT with a value of 1, and equivalent to 
-OCI_FETCH_PRIOR with a value of -1. Note that the range of 
-accessible rows is [1,OCI_ATTR_ROW_COUNT] beyond which an 
-error could be raised if sufficient rows do not exist in 
-
-The fetch call is a local call, if prefetched rows suffice. However, this is 
-transparent to the application. If LOB columns are being read, LOB locators 
-are fetched for subsequent LOB operations to be performed on these locators. 
-Prefetching is turned off if LONG columns are involved. 
-A fetch with nrows set to 0 rows effectively cancels the fetch for this 
-statement.
-Parameters
-stmtp (IN) - a statement (application request) handle.
-errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-nrows (IN) - number of rows to be fetched from the current position.
-It defaults to 1 for orientation OCI_FETCH_LAST.
-orientation (IN) -  The acceptable values are as follows, with 
-OCI_FETCH_NEXT being the default value.
-OCI_FETCH_CURRENT gets the current row, 
-OCI_FETCH_NEXT gets the next row from the current position,
-OCI_FETCH_FIRST gets the first row in the result set,
-OCI_FETCH_LAST gets the last row in the result set, 
-OCI_FETCH_PRIOR gets the previous row from the current row in the result set, 
-OCI_FETCH_ABSOLUTE will fetch the row number (specified by fetchOffset 
-parameter) in the result set using absolute positioning,
-OCI_FETCH_RELATIVE will fetch the row number (specified by fetchOffset 
-parameter) in the result set using relative positioning.
-scrollOffset(IN) - offset used with the OCI_FETCH_ABSOLUTE and 
-OCI_FETCH_RELATIVE orientation parameters only. It specify
-the new current position for scrollable result set. It is 
-ignored for non-scrollable result sets. 
-mode (IN) - for release 8.0, beta-1, the following mode is defined.
-OCI_DEFAULT - default mode
-OCI_EOF_FETCH - indicates that it is the last fetch from the result set. 
-If nrows is non-zero, setting this mode effectively cancels fetching after 
-retrieving nrows, otherwise it cancels fetching immediately. 
-Related Functions
-OCIAttrGet()
-
-
-
-OCIStmtGetPieceInfo()
-Name
-OCI Get Piece Information
-Purpose
-Returns piece information for a piecewise operation.
-Syntax
-sword OCIStmtGetPieceInfo( CONST OCIStmt  *stmtp,
-                         OCIError       *errhp,
-                         dvoid          **hndlpp,
-                         ub4            *typep,
-                         ub1            *in_outp,
-                         ub4            *iterp, 
-                         ub4            *idxp,
-                         ub1            *piecep );
-
-Comments
-When an execute/fetch call returns OCI_NEED_DATA to get/return a 
-dynamic bind/define value or piece, OCIStmtGetPieceInfo() returns the 
-relevant information: bind/define handle, iteration or index number and 
-which piece.
-See the section "Runtime Data Allocation and Piecewise Operations" on page 
-5-16 for more information about using OCIStmtGetPieceInfo().
-Parameters
-stmtp (IN) - the statement when executed returned OCI_NEED_DATA. 
-errhp (OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-hndlpp (OUT) - returns a pointer to the bind or define handle of the bind or 
-define whose runtime data is required or is being provided.
-typep (OUT) - the type of the handle pointed to by hndlpp: OCI_HTYPE_BIND 
-(for a bind handle) or OCI_HTYPE_DEFINE (for a define handle).
-in_outp (OUT) - returns OCI_PARAM_IN if the data is required for an IN bind 
-value. Returns OCI_PARAM_OUT if the data is available as an OUT bind 
-variable or a define position value.
-iterp (OUT) - returns the row number of a multiple row operation.
-idxp (OUT) - the index of an array element of a PL/SQL array bind operation.
-piecep (OUT) - returns one of the following defined values - 
-OCI_ONE_PIECE, OCI_FIRST_PIECE, OCI_NEXT_PIECE and 
-OCI_LAST_PIECE. The default value is always OCI_ONE_PIECE. 
-Related Functions
-OCIAttrGet(), OCIAttrGet(), OCIStmtExecute(), OCIStmtFetch(), 
-OCIStmtSetPieceInfo()
-
-
-
-
-OCIStmtPrepare()
-Name
-OCI Statement REQuest
-Purpose
-This call defines the SQL/PLSQL statement to be executed.
-Syntax
-sword OCIStmtPrepare ( OCIStmt      *stmtp,
-                     OCIError     *errhp,
-                     CONST OraText   *stmt, 
-                     ub4          stmt_len,
-                     ub4          language,
-                     ub4          mode);
-Comments
-This call is used to prepare a SQL or PL/SQL statement for execution. The 
-OCIStmtPrepare() call defines an application request. 
-This is a purely local call. Data values for this statement initialized in 
-subsequent bind calls will be stored in a bind handle which will hang off this 
-statement handle.
-This call does not create an association between this statement handle and any 
-particular server.
-See the section "Preparing Statements" on page 2-21 for more information 
-about using this call.
-Parameters
-stmtp (IN) - a statement handle.
-errhp (IN) - an error handle to retrieve diagnostic information.
-stmt (IN) - SQL or PL/SQL statement to be executed. Must be a null-
-terminated string. The pointer to the OraText of the statement must be available 
-as long as the statement is executed.
-stmt_len (IN) - length of the statement. Must not be zero.
-language (IN) - V7, V8, or native syntax. Possible values are:
-OCI_V7_SYNTAX - V7 ORACLE parsing syntax
-OCI_V8_SYNTAX - V8 ORACLE parsing syntax
-OCI_NTV_SYNTAX - syntax depending upon the version of the server. 
-mode (IN) - the only defined mode is OCI_DEFAULT for default mode. 
-Example
-This example demonstrates the use of OCIStmtPrepare(), as well as the OCI 
-application initialization calls.
-Related Functions
-OCIAttrGet(), OCIStmtExecute()
-
-
-OCIStmtPrepare2()
-Name
-OCI Statement REQuest with (a) early binding to svchp and/or
-(b) stmt caching
-Purpose
-This call defines the SQL/PLSQL statement to be executed.
-Syntax
-sword OCIStmtPrepare2 ( OCISvcCtx *svchp,
-                     OCIStmt      **stmtp,
-                     OCIError     *errhp,
-                     CONST OraText   *stmt,
-                     ub4          stmt_len,
-                     CONST OraText *key,
-                     ub4          key_len,
-                     ub4          language,
-                     ub4          mode);
-Comments
-This call is used to prepare a SQL or PL/SQL statement for execution. The
-OCIStmtPrepare() call defines an application request.
-This is a purely local call. Data values for this statement initialized in
-subsequent bind calls will be stored in a bind handle which will hang off this
-statement handle.
-This call creates an association between the statement handle and a service
-context. It differs from OCIStmtPrepare in that respect.It also supports
-stmt caching. The stmt will automatically be cached if the authp of the stmt
-has enabled stmt caching.
-Parameters
-svchp (IN) - the service context handle that contains the session that
-             this stmt handle belongs to.
-stmtp (OUT) - an unallocated stmt handle must be pased in. An allocated
-              and prepared  statement handle will be returned.
-errhp (IN) - an error handle to retrieve diagnostic information.
-stmt (IN) - SQL or PL/SQL statement to be executed. Must be a null-
-            terminated string. The pointer to the OraText of the statement 
-            must be available as long as the statement is executed.
-stmt_len (IN) - length of the statement. Must not be zero.
-key (IN) - This is only Valid for OCI Stmt Caching. It indicates the
-           key to search with. It thus optimizes the search in the cache.
-key_len (IN) - the length of the key. This, too, is onlly valid for stmt
-               caching.
-language (IN) - V7, V8, or native syntax. Possible values are:
-OCI_V7_SYNTAX - V7 ORACLE parsing syntax
-OCI_V8_SYNTAX - V8 ORACLE parsing syntax
-OCI_NTV_SYNTAX - syntax depending upon the version of the server.
-mode (IN) - the defined modes are OCI_DEFAULT and OCI_PREP2_CACHE_SEARCHONLY.
-Example
-Related Functions
-OCIStmtExecute(), OCIStmtRelease()
-
-
-OCIStmtRelease()
-Name
-OCI Statement Release. This call is used to relesae the stmt that
-was retreived using OCIStmtPrepare2(). If the stmt is release
-using this call, OCIHandleFree() must not be called on the stmt
-handle.
-Purpose
-This call releases the statement obtained by OCIStmtPrepare2
-Syntax
-sword OCIStmtRelease ( OCIStmt      *stmtp,
-                     OCIError     *errhp,
-                     cONST OraText *key,
-                     ub4          key_len,
-                     ub4          mode);
-Comments
-This call is used to release a handle obtained via OCIStmtPrepare2().
-It also frees the memory associated with the handle.
-This is a purely local call.
-Parameters
-stmtp (IN/OUT) - The statement handle to be released/freed.
-errhp (IN) - an error handle to retrieve diagnostic information.
-key (IN) - This is only Valid for OCI Stmt Caching. It indicates the
-           key to tag the stmt with.
-key_len (IN) - the length of the key. This, too, is only valid for stmt
-               caching.
-mode (IN) - the defined modes are OCI_DEFAULT for default mode and
-            OCI_STRLS_CACHE_DELETE (only used for Stmt Caching).
-Example
-Related Functions
-OCIStmtExecute(), OCIStmtPrepare2()
-
-
-OCIStmtSetPieceInfo()
-Name
-OCI Set Piece Information
-Purpose
-Sets piece information for a piecewise operation.
-Syntax
-sword OCIStmtSetPieceInfo ( dvoid             *hndlp,
-                          ub4               type,
-                          OCIError          *errhp,
-                          CONST dvoid       *bufp,
-                          ub4               *alenp, 
-                          ub1               piece,
-                          CONST dvoid       *indp, 
-                          ub2               *rcodep ); 
-Comments
-When an execute call returns OCI_NEED_DATA to get a dynamic IN/OUT 
-bind value or piece, OCIStmtSetPieceInfo() sets the piece information: the 
-buffer, the length, the indicator and which piece is currently being processed.
-For more information about using OCIStmtSetPieceInfo() see the section 
-"Runtime Data Allocation and Piecewise Operations" on page 5-16.
-Parameters
-hndlp (IN/OUT) - the bind/define handle.
-type (IN) - type of the handle. 
-errhp (OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-bufp (IN/OUT) - bufp is a pointer to a storage containing the data value or 
-the piece when it is an IN bind variable, otherwise bufp is a pointer to 
-storage for getting a piece or a value for OUT binds and define variables. For
-named data types or REFs, a pointer to the object or REF is returned.
-alenp (IN/OUT) - the length of the piece or the value. 
-piece (IN) - the piece parameter. The following are valid values: 
-OCI_ONE_PIECE, OCI_FIRST_PIECE, OCI_NEXT_PIECE, or 
-OCI_LAST_PIECE. 
-The default value is OCI_ONE_PIECE. This parameter is used for IN bind 
-variables only.
-indp (IN/OUT) - indicator. A pointer to a sb2 value or pointer to an indicator 
-structure for named data types (SQLT_NTY) and REFs (SQLT_REF), i.e., *indp 
-is either an sb2 or a dvoid * depending upon the data type.
-rcodep (IN/OUT) - return code. 
-Related Functions
-OCIAttrGet(), OCIAttrGet(), OCIStmtExecute(), OCIStmtFetch(), 
-OCIStmtGetPieceInfo()
-
-
-OCIFormatInit
-Name
-OCIFormat Package Initialize
-Purpose
-Initializes the OCIFormat package.
-Syntax
-sword OCIFormatInit(dvoid *hndl, OCIError *err);
-Comments
-This routine must be called before calling any other OCIFormat routine.
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
-Parameters
-hndl (IN/OUT) - OCI environment or session handle
-err (IN/OUT) - OCI error handle
-Related Functions
-OCIFormatTerm()
-
-
-OCIFormatString
-Name
-OCIFormat Package Format String
-Purpose
-Writes a text string into the supplied text buffer using the argument
-list submitted to it and in accordance with the format string given.
-Syntax
-sword OCIFormatString(dvoid *hndl, OCIError *err, OraText *buffer,
-                      sbig_ora bufferLength, sbig_ora *returnLength,
-                      CONST OraText *formatString, ...);
-Comments
-The first call to this routine must be preceded by a call to the
-OCIFormatInit routine that initializes the OCIFormat package
-for use.  When this routine is no longer needed then terminate
-the OCIFormat package by a call to the OCIFormatTerm routine.
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
-Parameters
-hndl         (IN/OUT) - OCI environment or session handle
-err          (IN/OUT) - OCI error handle
-buffer       (OUT)    - text buffer for the string
-bufferLength (IN)     - length of the text buffer
-returnLength (OUT)    - length of the formatted string
-formatString (IN)     - format specification string
-...          (IN)     - variable argument list
-Related Functions
-
-
-OCIFormatTerm 
-Name
-OCIFormat Package Terminate
-Purpose
-Terminates the OCIFormat package.
-Syntax
-sword OCIFormatTerm(dvoid *hndl, OCIError *err);
-Comments
-It must be called after the OCIFormat package is no longer being used.
-Returns OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
-Parameters
-hndl (IN/OUT) - OCI environment or session handle
-err (IN/OUT) - OCI error handle
-Related Functions
-OCIFormatInit()
-
-
-OCIFormatTUb1
-Name
-OCIFormat Package ub1 Type
-Purpose
-Return the type value for the ub1 type.
-Syntax
-sword OCIFormatTUb1(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTUb2
-Name
-OCIFormat Package ub2 Type
-Purpose
-Return the type value for the ub2 type.
-Syntax
-sword OCIFormatTUb2(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTUb4
-Name
-OCIFormat Package ub4 Type
-Purpose
-Return the type value for the ub4 type.
-Syntax
-sword OCIFormatTUb4(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTUword
-Name
-OCIFormat Package uword Type
-Purpose
-Return the type value for the uword type.
-Syntax
-sword OCIFormatTUword(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTUbig_ora
-Name
-OCIFormat Package ubig_ora Type
-Purpose
-Return the type value for the ubig_ora type.
-Syntax
-sword OCIFormatTUbig_ora(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTSb1
-Name
-OCIFormat Package sb1 Type
-Purpose
-Return the type value for the sb1 type.
-Syntax
-sword OCIFormatTSb1(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTSb2
-Name
-OCIFormat Package sb2 Type
-Purpose
-Return the type value for the sb2 type.
-Syntax
-sword OCIFormatTSb2(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTSb4
-Name
-OCIFormat Package sb4 Type
-Purpose
-Return the type value for the sb4 type.
-Syntax
-sword OCIFormatTSb4(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTSword
-Name
-OCIFormat Package sword Type
-Purpose
-Return the type value for the sword type.
-Syntax
-sword OCIFormatTSword(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTSbig_ora
-Name
-OCIFormat Package sbig_ora Type
-Purpose
-Return the type value for the sbig_ora type.
-Syntax
-sword OCIFormatTSbig_ora(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTEb1
-Name
-OCIFormat Package eb1 Type
-Purpose
-Return the type value for the eb1 type.
-Syntax
-sword OCIFormatTEb1(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTEb2
-Name
-OCIFormat Package eb2 Type
-Purpose
-Return the type value for the eb2 type.
-Syntax
-sword OCIFormatTEb2(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTEb4
-Name
-OCIFormat Package eb4 Type
-Purpose
-Return the type value for the eb4 type.
-Syntax
-sword OCIFormatTEb4(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTEword
-Name
-OCIFormat Package eword Type
-Purpose
-Return the type value for the eword type.
-Syntax
-sword OCIFormatTEword(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTChar
-Name
-OCIFormat Package text Type
-Purpose
-Return the type value for the text type.
-Syntax
-sword OCIFormatTChar(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTText
-Name
-OCIFormat Package *text Type
-Purpose
-Return the type value for the *text type.
-Syntax
-sword OCIFormatTText(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTDouble
-Name
-OCIFormat Package double Type
-Purpose
-Return the type value for the double type.
-Syntax
-sword OCIFormatTDouble(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatDvoid
-Name
-OCIFormat Package dvoid Type
-Purpose
-Return the type value for the dvoid type.
-Syntax
-sword OCIFormatTDvoid(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCIFormatTEnd
-Name
-OCIFormat Package end Type
-Purpose
-Return the list terminator's "type".
-Syntax
-sword OCIFormatTEnd(void);
-Comments
-None
-Parameters
-None
-Related Functions
-None
-
-
-OCISvcCtxToLda()
-Name
-OCI toggle SerVice context handle to Version 7 Lda_Def
-Purpose
-Toggles between a V8 service context handle and a V7 Lda_Def.
-Syntax
-sword OCISvcCtxToLda ( OCISvcCtx    *srvhp,
-                     OCIError     *errhp,
-                     Lda_Def      *ldap );
-Comments
-Toggles between an Oracle8 service context handle and an Oracle7 Lda_Def.
-This function can only be called after a service context has been properly 
-initialized.
-Once the service context has been translated to an Lda_Def, it can be used in 
-release 7.x OCI calls (e.g., obindps(), ofen()).
-Note: If there are multiple service contexts which share the same server 
-handle, only one can be in V7 mode at any time.
-The action of this call can be reversed by passing the resulting Lda_Def to 
-the OCILdaToSvcCtx() function.
-Parameters
-svchp (IN/OUT) - the service context handle. 
-errhp (IN/OUT) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error. 
-ldap (IN/OUT) - a Logon Data Area for V7-style OCI calls which is initialized 
-by this call. 
-Related Functions
-OCILdaToSvcCtx()
-
-
-
-
-OCITransCommit()
-Name
-OCI TX (transaction) CoMmit
-Purpose
-Commits the transaction associated with a specified service context.
-Syntax
-sword OCITransCommit ( OCISvcCtx    *srvcp,
-                     OCIError     *errhp,
-                     ub4          flags );
-Comments
-The transaction currently associated with the service context is committed. If 
-it is a distributed transaction that the server cannot commit, this call 
-additionally retrieves the state of the transaction from the database to be 
-returned to the user in the error handle.
-If the application has defined multiple transactions, this function operates 
-on the transaction currently associated with the service context. If the 
-application is working with only the implicit local transaction created when 
-database changes are made, that implicit transaction is committed.
-If the application is running in the object mode, then the modified or updated 
-objects in the object cache for this transaction are also committed.
-The flags parameter is used for one-phase commit optimization in distributed 
-transactions. If the transaction is non-distributed, the flags parameter is 
-ignored, and OCI_DEFAULT can be passed as its value. OCI applications 
-managing global transactions should pass a value of 
-OCI_TRANS_TWOPHASE to the flags parameter for a two-phase commit. The 
-default is one-phase commit.
-Under normal circumstances, OCITransCommit() returns with a status 
-indicating that the transaction has either been committed or rolled back. With 
-distributed transactions, it is possible that the transaction is now in-doubt 
-(i.e., neither committed nor aborted). In this case, OCITransCommit() 
-attempts to retrieve the status of the transaction from the server. 
-The status is returned.
-Parameters
-srvcp (IN) - the service context handle.
-errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-flags -see the "Comments" section above.
-Related Functions
-OCITransRollback()
-
-
-
-
-OCITransDetach()
-Name
-OCI TX (transaction) DeTach
-Purpose
-Detaches a transaction.
-Syntax
-sword OCITransDetach ( OCISvcCtx    *srvcp,
-                     OCIError     *errhp,
-                     ub4          flags);
-Comments
-Detaches a global transaction from the service context handle. The transaction 
-currently attached to the service context handle becomes inactive at the end 
-of this call. The transaction may be resumed later by calling OCITransStart(), 
-specifying  a flags value of OCI_TRANS_RESUME.
-When a transaction is detached, the value which was specified in the timeout 
-parameter of OCITransStart() when the transaction was started is used to 
-determine the amount of time the branch can remain inactive before being 
-deleted by the server's PMON process.
-Note: The transaction can be resumed by a different process than the one 
-that detached it, provided that the transaction has the same 
-authorization.
-Parameters
-srvcp (IN) - the service context handle. 
-errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-flags (IN) - you must pass a value of OCI_DEFAULT for this parameter.
-Related Functions
-OCITransStart()
-
-
-
-OCITransForget()
-Name
-OCI TX (transaction) ForGeT
-Purpose
-Causes the server to forget a heuristically completed global transaction.
-Syntax
-sword OCITransForget ( OCISvcCtx     *svchp, 
-                     OCIError      *errhp,
-                     ub4           flags);
-
-Comments
-
-Forgets a heuristically completed global transaction. The server deletes the 
-status of the transaction from the system's pending transaction table.
-The XID of the transaction to be forgotten is set as an attribute of the 
-transaction handle (OCI_ATTR_XID).
-Parameters
-srvcp (IN) - the service context handle - the transaction is rolled back.
-errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-flags (IN) - you must pass OCI_DEFAULT for this parameter.
-Related Functions
-OCITransCommit(), OCITransRollback()
-
-
-OCITransMultiPrepare() 
-Name
-OCI Trans(action) Multi-Branch Prepare
-Purpose
-Prepares a transaction with multiple branches in a single call.
-Syntax
-sword OCITransMultiPrepare ( OCISvcCtx    *svchp,
-                             ub4           numBranches,
-                             OCITrans     **txns,
-                             OCIError     **errhp);
-
-Comments
-
-Prepares the specified global transaction for commit.
-This call is valid only for distributed transactions.
-This call is an advanced performance feature intended for use only in
-situations where the caller is responsible for preparing all the branches
-in a transaction. 
-Parameters
-srvcp (IN) - the service context handle. 
-numBranches (IN) - This is the number of branches expected. It is also the
-array size for the next two parameters.
-txns (IN) - This is the array of transaction handles for the branches to
-prepare. They should all have the OCI_ATTR_XID set. The global transaction
-ID should be the same.
-errhp (IN) - This is the array of error handles. If OCI_SUCCESS is not
-returned, then these will indicate which branches received which errors.
-Related Functions
-OCITransPrepare()
-
-
-OCITransPrepare()
-Name
-OCI TX (transaction) PREpare
-Purpose
-Prepares a transaction for commit.
-Syntax
-sword OCITransPrepare ( OCISvcCtx    *svchp, 
-                      OCIError     *errhp,
-                      ub4          flags);
-
-Comments
-
-Prepares the specified global transaction for commit.
-This call is valid only for distributed transactions.
-The call returns OCI_SUCCESS_WITH_INFO if the transaction has not made 
-any changes. The error handle will indicate that the transaction is read-only. 
-The flag parameter is not currently used. 
-Parameters
-srvcp (IN) - the service context handle. 
-errhp (IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-flags (IN) - you must pass OCI_DEFAULT for this parameter.
-Related Functions
-OCITransCommit(), OCITransForget()
-
-
-
-
-OCITransRollback()
-Name
-OCI TX (transaction) RoLlback
-Purpose
-Rolls back the current transaction.
-Syntax
-sword OCITransRollback ( dvoid        *svchp, 
-                       OCIError     *errhp,
-                       ub4          flags );
-Comments
-The current transaction- defined as the set of statements executed since the 
-last OCITransCommit() or since OCISessionBegin()-is rolled back.
-If the application is running under object mode then the modified or updated 
-objects in the object cache for this transaction are also rolled back.
-An error is returned if an attempt is made to roll back a global transaction 
-that is not currently active.
-Parameters
-svchp (IN) - a service context handle. The transaction currently set in the 
-service context handle is rolled back.
-errhp -(IN) - an error handle which can be passed to OCIErrorGet() for 
-diagnostic information in the event of an error.
-flags - you must pass a value of OCI_DEFAULT for this parameter.
-Related Functions
-OCITransCommit()
-
-
-
-
-OCITransStart()
-Name
-OCI TX (transaction) STart
-Purpose
-Sets the beginning of a transaction.
-Syntax
-sword OCITransStart ( OCISvcCtx    *svchp, 
-                    OCIError     *errhp, 
-                    uword        timeout,
-                    ub4          flags);
-
-Comments
-This function sets the beginning of a global or serializable transaction. The 
-transaction context currently associated with the service context handle is 
-initialized at the end of the call if the flags parameter specifies that a new 
-transaction should be started.
-The XID of the transaction is set as an attribute of the transaction handle 
-(OCI_ATTR_XID)
-Parameters
-svchp (IN/OUT) - the service context handle. The transaction context in the 
-service context handle is initialized at the end of the call if the flag 
-specified a new transaction to be started.
-errhp (IN/OUT) - The OCI error handle. If there is an error, it is recorded in 
-err and this function returns OCI_ERROR. Diagnostic information can be 
-obtained by calling OCIErrorGet().
-timeout (IN) - the time, in seconds, to wait for a transaction to become 
-available for resumption when OCI_TRANS_RESUME is specified. When 
-OCI_TRANS_NEW is specified, this value is stored and may be used later by 
-OCITransDetach().
-flags (IN) - specifies whether a new transaction is being started or an 
-existing transaction is being resumed. Also specifies serializiability or 
-read-only status. More than a single value can be specified. By default, 
-a read/write transaction is started. The flag values are:
-OCI_TRANS_NEW - starts a new transaction branch. By default starts a 
-tightly coupled and migratable branch.
-OCI_TRANS_TIGHT - explicitly specifies a tightly coupled branch
-OCI_TRANS_LOOSE - specifies a loosely coupled branch
-OCI_TRANS_RESUME - resumes an existing transaction branch. 
-OCI_TRANS_READONLY - start a readonly transaction
-OCI_TRANS_SERIALIZABLE - start a serializable transaction
-Related Functions
-OCITransDetach()
-
-
-
-
-
-******************************************************************************/
-/*-----------------------Dynamic Callback Function Pointers------------------*/
- 
- 
-typedef sb4 (*OCICallbackInBind)(dvoid *ictxp, OCIBind *bindp, ub4 iter,
-                                  ub4 index, dvoid **bufpp, ub4 *alenp,
-                                  ub1 *piecep, dvoid **indp);
- 
-typedef sb4 (*OCICallbackOutBind)(dvoid *octxp, OCIBind *bindp, ub4 iter,
-                                 ub4 index, dvoid **bufpp, ub4 **alenp,
-                                 ub1 *piecep, dvoid **indp,
-                                 ub2 **rcodep);
- 
-typedef sb4 (*OCICallbackDefine)(dvoid *octxp, OCIDefine *defnp, ub4 iter,
-                                 dvoid **bufpp, ub4 **alenp, ub1 *piecep,
-                                 dvoid **indp, ub2 **rcodep);
-
-typedef sword (*OCIUserCallback)(dvoid *ctxp, dvoid *hndlp, ub4 type,
-                                 ub4 fcode, ub4 when, sword returnCode,
-                                 sb4 *errnop, va_list arglist);
-
-typedef sword (*OCIEnvCallbackType)(OCIEnv *env, ub4 mode,
-                                   size_t xtramem_sz, dvoid *usrmemp,
-                                   OCIUcb *ucbDesc); 
-
-typedef sb4 (*OCICallbackLobRead)(dvoid *ctxp, CONST dvoid *bufp,
-                                             ub4 len, ub1 piece);
-
-typedef sb4 (*OCICallbackLobWrite)(dvoid *ctxp, dvoid *bufp, 
-                                          ub4 *lenp, ub1 *piece);
-
-/*--------------------------Failover Callback Structure ---------------------*/
-typedef sb4 (*OCICallbackFailover)(dvoid *svcctx, dvoid *envctx,
-                                   dvoid *fo_ctx, ub4 fo_type,
-                                   ub4 fo_event);
-
-typedef struct
-{
-  OCICallbackFailover callback_function;
-  dvoid *fo_ctx;
-} 
-OCIFocbkStruct;
-
-/*****************************************************************************
-                         ACTUAL PROTOTYPE DECLARATIONS
-******************************************************************************/
-
-sword   OCIInitialize   (ub4 mode, dvoid *ctxp, 
-                 dvoid *(*malocfp)(dvoid *ctxp, size_t size),
-                 dvoid *(*ralocfp)(dvoid *ctxp, dvoid *memptr, size_t newsize),
-                 void   (*mfreefp)(dvoid *ctxp, dvoid *memptr) );
-
-sword   OCITerminate( ub4 mode);
-
-sword   OCIEnvCreate (OCIEnv **envp, ub4 mode, dvoid *ctxp,
-                 dvoid *(*malocfp)(dvoid *ctxp, size_t size),
-                 dvoid *(*ralocfp)(dvoid *ctxp, dvoid *memptr, size_t newsize),
-                 void   (*mfreefp)(dvoid *ctxp, dvoid *memptr),
-                 size_t xtramem_sz, dvoid **usrmempp);
-
-sword   OCIEnvNlsCreate (OCIEnv **envp, ub4 mode, dvoid *ctxp,
-                 dvoid *(*malocfp)(dvoid *ctxp, size_t size),
-                 dvoid *(*ralocfp)(dvoid *ctxp, dvoid *memptr, size_t newsize),
-                 void   (*mfreefp)(dvoid *ctxp, dvoid *memptr),
-                 size_t xtramem_sz, dvoid **usrmempp,
-                 ub2 charset, ub2 ncharset);
-
-sword   OCIFEnvCreate (OCIEnv **envp, ub4 mode, dvoid *ctxp,
-                 dvoid *(*malocfp)(dvoid *ctxp, size_t size),
-                 dvoid *(*ralocfp)(dvoid *ctxp, dvoid *memptr, size_t newsize),
-                 void   (*mfreefp)(dvoid *ctxp, dvoid *memptr),
-                 size_t xtramem_sz, dvoid **usrmempp, dvoid *fupg);
-
-sword   OCIHandleAlloc(CONST dvoid *parenth, dvoid **hndlpp, CONST ub4 type, 
-                       CONST size_t xtramem_sz, dvoid **usrmempp);
-
-sword   OCIHandleFree(dvoid *hndlp, CONST ub4 type);
-
-
-sword   OCIDescriptorAlloc(CONST dvoid *parenth, dvoid **descpp, 
-                           CONST ub4 type, CONST size_t xtramem_sz, 
-                           dvoid **usrmempp);
-
-sword   OCIDescriptorFree(dvoid *descp, CONST ub4 type);
-
-sword   OCIEnvInit (OCIEnv **envp, ub4 mode, 
-                    size_t xtramem_sz, dvoid **usrmempp);
-
-sword   OCIServerAttach  (OCIServer *srvhp, OCIError *errhp,
-                          CONST OraText *dblink, sb4 dblink_len, ub4 mode);
-
-sword   OCIServerDetach  (OCIServer *srvhp, OCIError *errhp, ub4 mode);
-
-sword   OCISessionBegin  (OCISvcCtx *svchp, OCIError *errhp, OCISession *usrhp,
-                          ub4 credt, ub4 mode);
-
-sword   OCISessionEnd   (OCISvcCtx *svchp, OCIError *errhp, OCISession *usrhp, 
-                         ub4 mode);
-
-sword   OCILogon (OCIEnv *envhp, OCIError *errhp, OCISvcCtx **svchp, 
-		  CONST OraText *username, ub4 uname_len, 
-		  CONST OraText *password, ub4 passwd_len, 
-		  CONST OraText *dbname, ub4 dbname_len);
-
-sword   OCILogon2 (OCIEnv *envhp, OCIError *errhp, OCISvcCtx **svchp,
-                  CONST OraText *username, ub4 uname_len,
-                  CONST OraText *password, ub4 passwd_len,
-                  CONST OraText *dbname, ub4 dbname_len,
-                  ub4 mode);
-
-sword   OCILogoff (OCISvcCtx *svchp, OCIError *errhp);
-
-
-sword   OCIPasswordChange   (OCISvcCtx *svchp, OCIError *errhp, 
-                             CONST OraText *user_name, ub4 usernm_len, 
-                             CONST OraText *opasswd, ub4 opasswd_len, 
-                             CONST OraText *npasswd, ub4 npasswd_len, ub4 mode);
-
-sword   OCIStmtPrepare   (OCIStmt *stmtp, OCIError *errhp, CONST OraText *stmt,
-                          ub4 stmt_len, ub4 language, ub4 mode);
-
-sword OCIStmtPrepare2 ( OCISvcCtx *svchp, OCIStmt **stmtp, OCIError *errhp,
-                     CONST OraText *stmt, ub4 stmt_len, CONST OraText *key,
-                     ub4 key_len, ub4 language, ub4 mode);
-
-sword OCIStmtRelease ( OCIStmt *stmtp, OCIError *errhp, CONST OraText *key,
-                       ub4 key_len, ub4 mode);
-
-sword   OCIBindByPos  (OCIStmt *stmtp, OCIBind **bindp, OCIError *errhp,
-		       ub4 position, dvoid *valuep, sb4 value_sz,
-		       ub2 dty, dvoid *indp, ub2 *alenp, ub2 *rcodep,
-		       ub4 maxarr_len, ub4 *curelep, ub4 mode);
-
-sword   OCIBindByName   (OCIStmt *stmtp, OCIBind **bindp, OCIError *errhp,
-			 CONST OraText *placeholder, sb4 placeh_len, 
-                         dvoid *valuep, sb4 value_sz, ub2 dty, 
-                         dvoid *indp, ub2 *alenp, ub2 *rcodep, 
-                         ub4 maxarr_len, ub4 *curelep, ub4 mode);
-
-sword   OCIBindObject  (OCIBind *bindp, OCIError *errhp, CONST OCIType *type, 
-			dvoid **pgvpp, ub4 *pvszsp, dvoid **indpp, 
-			ub4 *indszp);
-
-sword   OCIBindDynamic   (OCIBind *bindp, OCIError *errhp, dvoid *ictxp,
-			  OCICallbackInBind icbfp, dvoid *octxp,
-			  OCICallbackOutBind ocbfp);
-
-sword   OCIBindArrayOfStruct   (OCIBind *bindp, OCIError *errhp, 
-                                ub4 pvskip, ub4 indskip,
-                                ub4 alskip, ub4 rcskip);
-
-sword   OCIStmtGetPieceInfo   (OCIStmt *stmtp, OCIError *errhp, 
-                               dvoid **hndlpp, ub4 *typep,
-                               ub1 *in_outp, ub4 *iterp, ub4 *idxp, 
-                               ub1 *piecep);
-
-sword   OCIStmtSetPieceInfo   (dvoid *hndlp, ub4 type, OCIError *errhp, 
-                               CONST dvoid *bufp, ub4 *alenp, ub1 piece, 
-                               CONST dvoid *indp, ub2 *rcodep);
-
-sword   OCIStmtExecute  (OCISvcCtx *svchp, OCIStmt *stmtp, OCIError *errhp, 
-                         ub4 iters, ub4 rowoff, CONST OCISnapshot *snap_in, 
-                         OCISnapshot *snap_out, ub4 mode);
-
-sword   OCIDefineByPos  (OCIStmt *stmtp, OCIDefine **defnp, OCIError *errhp,
-			 ub4 position, dvoid *valuep, sb4 value_sz, ub2 dty,
-			 dvoid *indp, ub2 *rlenp, ub2 *rcodep, ub4 mode);
-
-sword   OCIDefineObject  (OCIDefine *defnp, OCIError *errhp, 
-                          CONST OCIType *type, dvoid **pgvpp, 
-                          ub4 *pvszsp, dvoid **indpp, ub4 *indszp);
-
-sword   OCIDefineDynamic   (OCIDefine *defnp, OCIError *errhp, dvoid *octxp,
-                            OCICallbackDefine ocbfp);
-
-sword   OCIDefineArrayOfStruct  (OCIDefine *defnp, OCIError *errhp, ub4 pvskip,
-                                 ub4 indskip, ub4 rlskip, ub4 rcskip);
-
-sword   OCIStmtFetch   (OCIStmt *stmtp, OCIError *errhp, ub4 nrows, 
-                        ub2 orientation, ub4 mode);
-
-sword   OCIStmtFetch2   (OCIStmt *stmtp, OCIError *errhp, ub4 nrows, 
-                        ub2 orientation, sb4 scrollOffset, ub4 mode);
-
-sword   OCIStmtGetBindInfo   (OCIStmt *stmtp, OCIError *errhp, ub4 size, 
-                              ub4 startloc,
-                              sb4 *found, OraText *bvnp[], ub1 bvnl[],
-                              OraText *invp[], ub1 inpl[], ub1 dupl[],
-                              OCIBind *hndl[]);
-
-sword   OCIDescribeAny  (OCISvcCtx *svchp, OCIError *errhp, 
-                         dvoid *objptr, 
-                         ub4 objnm_len, ub1 objptr_typ, ub1 info_level,
-			 ub1 objtyp, OCIDescribe *dschp);
-
-sword   OCIParamGet (CONST dvoid *hndlp, ub4 htype, OCIError *errhp, 
-                     dvoid **parmdpp, ub4 pos);
-
-sword   OCIParamSet(dvoid *hdlp, ub4 htyp, OCIError *errhp, CONST dvoid *dscp,
-                    ub4 dtyp, ub4 pos);
-
-sword   OCITransStart  (OCISvcCtx *svchp, OCIError *errhp, 
-                        uword timeout, ub4 flags );
-
-sword   OCITransDetach  (OCISvcCtx *svchp, OCIError *errhp, ub4 flags );
-
-sword   OCITransCommit  (OCISvcCtx *svchp, OCIError *errhp, ub4 flags);
-
-sword   OCITransRollback  (OCISvcCtx *svchp, OCIError *errhp, ub4 flags);
-
-sword   OCITransPrepare (OCISvcCtx *svchp, OCIError *errhp, ub4 flags);
-
-sword   OCITransMultiPrepare (OCISvcCtx *svchp, ub4 numBranches, 
-                              OCITrans **txns, OCIError **errhp);
-
-sword   OCITransForget (OCISvcCtx *svchp, OCIError *errhp, ub4 flags);
-
-sword   OCIErrorGet   (dvoid *hndlp, ub4 recordno, OraText *sqlstate,
-                       sb4 *errcodep, OraText *bufp, ub4 bufsiz, ub4 type);
-
-sword   OCILobAppend  (OCISvcCtx *svchp, OCIError *errhp, 
-                       OCILobLocator *dst_locp,
-                       OCILobLocator *src_locp);
-
-sword   OCILobAssign (OCIEnv *envhp, OCIError *errhp, 
-                      CONST OCILobLocator *src_locp, 
-                      OCILobLocator **dst_locpp);
-
-sword   OCILobCharSetForm (OCIEnv *envhp, OCIError *errhp, 
-                           CONST OCILobLocator *locp, ub1 *csfrm);
-
-sword   OCILobCharSetId (OCIEnv *envhp, OCIError *errhp, 
-                         CONST OCILobLocator *locp, ub2 *csid);
-
-sword   OCILobCopy (OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *dst_locp,
-                    OCILobLocator *src_locp, ub4 amount, ub4 dst_offset, 
-                    ub4 src_offset);
-
-sword OCILobCreateTemporary(OCISvcCtx          *svchp,
-                            OCIError           *errhp,
-                            OCILobLocator      *locp,
-                            ub2                 csid,
-                            ub1                 csfrm,
-                            ub1                 lobtype,
-                            boolean             cache,
-                            OCIDuration         duration);
-
-
-sword OCILobClose( OCISvcCtx        *svchp,
-                   OCIError         *errhp,
-                   OCILobLocator    *locp );
-
-
-sword   OCILobDisableBuffering (OCISvcCtx      *svchp,
-                                OCIError       *errhp,
-                                OCILobLocator  *locp);
-
-sword   OCILobEnableBuffering (OCISvcCtx      *svchp,
-                               OCIError       *errhp,
-                               OCILobLocator  *locp);
-
-sword   OCILobErase (OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *locp,
-                      ub4 *amount, ub4 offset);
-
-sword   OCILobFileClose (OCISvcCtx *svchp, OCIError *errhp, 
-                         OCILobLocator *filep);
-
-sword   OCILobFileCloseAll (OCISvcCtx *svchp, OCIError *errhp);
-
-sword   OCILobFileExists (OCISvcCtx *svchp, OCIError *errhp, 
-			  OCILobLocator *filep,
-			  boolean *flag);
-
-sword   OCILobFileGetName (OCIEnv *envhp, OCIError *errhp, 
-                           CONST OCILobLocator *filep, 
-                           OraText *dir_alias, ub2 *d_length, 
-                           OraText *filename, ub2 *f_length);
-
-sword   OCILobFileIsOpen (OCISvcCtx *svchp, OCIError *errhp, 
-                          OCILobLocator *filep,
-                          boolean *flag);
-
-sword   OCILobFileOpen (OCISvcCtx *svchp, OCIError *errhp, 
-                        OCILobLocator *filep,
-                        ub1 mode);
-
-sword   OCILobFileSetName (OCIEnv *envhp, OCIError *errhp, 
-                           OCILobLocator **filepp, 
-                           CONST OraText *dir_alias, ub2 d_length, 
-                           CONST OraText *filename, ub2 f_length);
-
-sword   OCILobFlushBuffer (OCISvcCtx       *svchp,
-                           OCIError        *errhp,
-                           OCILobLocator   *locp,
-                           ub4              flag);
-
-sword OCILobFreeTemporary(OCISvcCtx          *svchp,
-                          OCIError           *errhp,
-                          OCILobLocator      *locp);
-
-sword OCILobGetChunkSize(OCISvcCtx         *svchp,
-                         OCIError          *errhp,
-                         OCILobLocator     *locp,
-                         ub4               *chunksizep);
-
-sword   OCILobGetLength  (OCISvcCtx *svchp, OCIError *errhp, 
-                          OCILobLocator *locp,
-                          ub4 *lenp);
-
-sword   OCILobIsEqual  (OCIEnv *envhp, CONST OCILobLocator *x, 
-                        CONST OCILobLocator *y, 
-                        boolean *is_equal);
-
-sword OCILobIsOpen( OCISvcCtx     *svchp,
-                    OCIError      *errhp,
-                    OCILobLocator *locp,
-                    boolean       *flag);
-
-sword OCILobIsTemporary(OCIEnv            *envp,
-                        OCIError          *errhp,
-                        OCILobLocator     *locp,
-                        boolean           *is_temporary);
-
-sword   OCILobLoadFromFile (OCISvcCtx *svchp, OCIError *errhp, 
-                            OCILobLocator *dst_locp,
-       	                    OCILobLocator *src_filep, 
-                            ub4 amount, ub4 dst_offset, 
-                            ub4 src_offset);
-
-sword   OCILobLocatorAssign  (OCISvcCtx *svchp, OCIError *errhp, 
-                            CONST OCILobLocator *src_locp, 
-                            OCILobLocator **dst_locpp);
-
-
-sword   OCILobLocatorIsInit (OCIEnv *envhp, OCIError *errhp, 
-                             CONST OCILobLocator *locp, 
-                             boolean *is_initialized);
-
-sword   OCILobOpen( OCISvcCtx        *svchp,
-                   OCIError         *errhp,
-                   OCILobLocator    *locp,
-                   ub1               mode );
- 
-sword   OCILobRead  (OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *locp,
-                     ub4 *amtp, ub4 offset, dvoid *bufp, ub4 bufl, 
-                     dvoid *ctxp, sb4 (*cbfp)(dvoid *ctxp, 
-                                              CONST dvoid *bufp, 
-                                              ub4 len, 
-                                              ub1 piece),
-                     ub2 csid, ub1 csfrm);
-
-sword   OCILobTrim  (OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *locp,
-                     ub4 newlen);
-
-sword   OCILobWrite  (OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *locp,
-                      ub4 *amtp, ub4 offset, dvoid *bufp, ub4 buflen, 
-                      ub1 piece, dvoid *ctxp, 
-                      sb4 (*cbfp)(dvoid *ctxp, 
-                                  dvoid *bufp, 
-                                  ub4 *len, 
-                                  ub1 *piece),
-                      ub2 csid, ub1 csfrm);
-
-sword OCILobWriteAppend(OCISvcCtx *svchp, OCIError *errhp, 
-                        OCILobLocator *lobp, ub4 *amtp, 
-                        dvoid *bufp, ub4 bufl, ub1 piece, dvoid *ctxp,
-                       sb4 (*cbfp)(dvoid *ctxp, dvoid *bufp, ub4 *len, 
-                       ub1 *piece), 
-                      ub2 csid, ub1 csfrm);
-
-sword   OCIBreak (dvoid *hndlp, OCIError *errhp);
-
-sword   OCIReset (dvoid *hndlp, OCIError *errhp);
-
-sword   OCIServerVersion  (dvoid *hndlp, OCIError *errhp, OraText *bufp, 
-                           ub4 bufsz,
-                           ub1 hndltype);
-
-sword   OCIServerRelease  (dvoid *hndlp, OCIError *errhp, OraText *bufp,
-                           ub4 bufsz,
-                           ub1 hndltype, ub4 *version);
-
-sword   OCIAttrGet (CONST dvoid *trgthndlp, ub4 trghndltyp, 
-                    dvoid *attributep, ub4 *sizep, ub4 attrtype, 
-                    OCIError *errhp);
-
-sword   OCIAttrSet (dvoid *trgthndlp, ub4 trghndltyp, dvoid *attributep,
-                    ub4 size, ub4 attrtype, OCIError *errhp);
-
-sword   OCISvcCtxToLda (OCISvcCtx *svchp, OCIError *errhp, Lda_Def *ldap);
-
-sword   OCILdaToSvcCtx (OCISvcCtx **svchpp, OCIError *errhp, Lda_Def *ldap);
-
-sword   OCIResultSetToStmt (OCIResult *rsetdp, OCIError *errhp);
-
-sword OCIFileClose ( dvoid  *hndl, OCIError *err, OCIFileObject *filep );
-
-sword	OCIUserCallbackRegister(dvoid *hndlp, ub4 type, dvoid *ehndlp,
-                                    OCIUserCallback callback, dvoid *ctxp,
-                                    ub4 fcode, ub4 when, OCIUcb *ucbDesc);
-
-sword	OCIUserCallbackGet(dvoid *hndlp, ub4 type, dvoid *ehndlp,
-                               ub4 fcode, ub4 when, OCIUserCallback *callbackp,
-                               dvoid **ctxpp, OCIUcb *ucbDesc);
-
-sword   OCISharedLibInit(dvoid *metaCtx, dvoid *libCtx, ub4 argfmt, sword argc,
-                         dvoid *argv[], OCIEnvCallbackType envCallback);
-
-sword OCIFileExists ( dvoid  *hndl, OCIError *err, OraText *filename,
-                     OraText *path, ub1 *flag  );
-
-sword OCIFileFlush( dvoid *hndl, OCIError *err, OCIFileObject *filep  );
-
-
-sword OCIFileGetLength( dvoid *hndl, OCIError *err, OraText *filename,
-                        OraText *path, ubig_ora *lenp  );
-
-sword OCIFileInit ( dvoid *hndl, OCIError *err );
-
-sword OCIFileOpen ( dvoid *hndl, OCIError *err, OCIFileObject **filep,
-                    OraText *filename, OraText *path, ub4 mode, ub4 create, 
-                    ub4 type );
-
-sword OCIFileRead ( dvoid *hndl, OCIError *err, OCIFileObject *filep,
-                    dvoid *bufp, ub4 bufl, ub4 *bytesread );
-
-sword OCIFileSeek ( dvoid *hndl, OCIError *err, OCIFileObject *filep,
-                     uword origin, ubig_ora offset, sb1 dir );
-
-sword OCIFileTerm ( dvoid *hndl, OCIError *err );
-
-
-sword OCIFileWrite ( dvoid *hndl, OCIError *err, OCIFileObject   *filep,
-                     dvoid *bufp, ub4 buflen, ub4 *byteswritten );
-
-
-/*
- ** Initialize the security package
- */
-sword   OCISecurityInitialize (OCISecurity *sechandle, OCIError *error_handle);
-
-sword   OCISecurityTerminate (OCISecurity *sechandle, OCIError *error_handle);
-
-sword OCISecurityOpenWallet(OCISecurity *osshandle,
-                            OCIError *error_handle,
-                            size_t wrllen,
-                            OraText *wallet_resource_locator,
-                            size_t pwdlen,
-                            OraText *password,
-                            nzttWallet *wallet);
-
-sword OCISecurityCloseWallet(OCISecurity *osshandle,
-                             OCIError *error_handle,
-                             nzttWallet *wallet);
-
-sword OCISecurityCreateWallet(OCISecurity *osshandle,
-                              OCIError *error_handle,
-                              size_t wrllen,
-                              OraText *wallet_resource_locator,
-                              size_t pwdlen,
-                              OraText *password,
-                              nzttWallet *wallet);
-
-sword OCISecurityDestroyWallet(OCISecurity *osshandle,
-                               OCIError *error_handle,
-                               size_t wrllen,
-                               OraText *wallet_resource_locator,
-                               size_t pwdlen,
-                               OraText *password);
-
-sword OCISecurityStorePersona(OCISecurity *osshandle,
-                              OCIError *error_handle,
-                              nzttPersona **persona,
-                              nzttWallet *wallet);
-
-sword OCISecurityOpenPersona(OCISecurity *osshandle,
-                             OCIError *error_handle,
-                             nzttPersona *persona);
-
-sword OCISecurityClosePersona(OCISecurity *osshandle,
-                              OCIError *error_handle,
-                              nzttPersona *persona);
-
-sword OCISecurityRemovePersona(OCISecurity *osshandle,
-                               OCIError *error_handle,
-                               nzttPersona **persona);
-
-sword OCISecurityCreatePersona(OCISecurity *osshandle,
-                               OCIError *error_handle,
-                               nzttIdentType identity_type,
-                               nzttCipherType cipher_type,
-                               nzttPersonaDesc *desc,
-                               nzttPersona **persona);
-
-sword OCISecuritySetProtection(OCISecurity *osshandle,
-                               OCIError *error_handle,
-                               nzttPersona *persona,
-                               nzttcef crypto_engine_function,
-                               nztttdufmt data_unit_format,
-                               nzttProtInfo *protection_info);
-
-sword OCISecurityGetProtection(OCISecurity *osshandle,
-                               OCIError *error_handle,
-                               nzttPersona *persona,
-                               nzttcef crypto_engine_function,
-                               nztttdufmt * data_unit_format_ptr,
-                               nzttProtInfo *protection_info);
-
-sword OCISecurityRemoveIdentity(OCISecurity *osshandle,
-                                OCIError *error_handle,
-                                nzttIdentity **identity_ptr);
-
-sword OCISecurityCreateIdentity(OCISecurity *osshandle,
-                                OCIError *error_handle,
-                                nzttIdentType type,
-                                nzttIdentityDesc *desc,
-                                nzttIdentity **identity_ptr);
-
-sword OCISecurityAbortIdentity(OCISecurity *osshandle,
-                               OCIError *error_handle,
-                               nzttIdentity **identity_ptr);
-
-sword OCISecurityFreeIdentity(OCISecurity *osshandle,
-			      OCIError *error_handle,
-			      nzttIdentity **identity_ptr);
-
-
-sword OCISecurityStoreTrustedIdentity(OCISecurity *osshandle,
-                                      OCIError *error_handle,
-                                      nzttIdentity **identity_ptr,
-                                      nzttPersona *persona);
-
-sword OCISecuritySign(OCISecurity *osshandle,
-                      OCIError *error_handle,
-                      nzttPersona *persona,
-                      nzttces signature_state,
-                      size_t input_length,
-                      ub1 *input,
-                      nzttBufferBlock *buffer_block);
-
-sword OCISecuritySignExpansion(OCISecurity *osshandle,
-                               OCIError *error_handle,
-                               nzttPersona *persona,
-                               size_t inputlen,
-                               size_t *signature_length);
-
-sword OCISecurityVerify(OCISecurity *osshandle,
-                        OCIError *error_handle,
-                        nzttPersona *persona,
-                        nzttces signature_state,
-                        size_t siglen,
-                        ub1 *signature,
-                        nzttBufferBlock *extracted_message,
-                        boolean *verified,
-                        boolean *validated,
-                        nzttIdentity **signing_party_identity);
-
-sword OCISecurityValidate(OCISecurity *osshandle,
-                          OCIError *error_handle,
-                          nzttPersona *persona,
-                          nzttIdentity *sidentity,
-                          boolean *validated);
-
-sword OCISecuritySignDetached(OCISecurity *osshandle,
-                              OCIError *error_handle,
-                              nzttPersona *persona,
-                              nzttces signature_state,
-                              size_t input_length,
-                              ub1 * input,
-                              nzttBufferBlock *signature);
-
-sword OCISecuritySignDetExpansion(OCISecurity *osshandle,
-                                  OCIError *error_handle,
-                                  nzttPersona *persona,
-                                  size_t input_length,
-                                  size_t *required_buffer_length);
-
-sword OCISecurityVerifyDetached(OCISecurity *osshandle,
-                                OCIError *error_handle,
-                                nzttPersona *persona,
-                                nzttces signature_state,
-                                size_t data_length,
-                                ub1 *data,
-                                size_t siglen,
-                                ub1 *signature,
-                                boolean *verified,
-                                boolean *validated,
-                                nzttIdentity **signing_party_identity);
-
-sword OCISecurity_PKEncrypt(OCISecurity *osshandle,
-                            OCIError *error_handle,
-                            nzttPersona *persona,
-                            size_t number_of_recipients,
-                            nzttIdentity *recipient_list,
-                            nzttces encryption_state,
-                            size_t input_length,
-                            ub1 *input,
-                            nzttBufferBlock *encrypted_data);
-
-sword OCISecurityPKEncryptExpansion(OCISecurity *osshandle,
-                                    OCIError *error_handle,
-                                    nzttPersona *persona,
-                                    size_t number_recipients,
-                                    size_t input_length,
-                                    size_t *buffer_length_required);
-
-sword OCISecurityPKDecrypt(OCISecurity *osshandle,
-                           OCIError *error_handle,
-                           nzttPersona *persona,
-                           nzttces encryption_state,
-                           size_t input_length,
-                           ub1 *input,
-                           nzttBufferBlock *encrypted_data);
-
-sword OCISecurityEncrypt(OCISecurity *osshandle,
-                         OCIError *error_handle,
-                         nzttPersona *persona,
-                         nzttces encryption_state,
-                         size_t input_length,
-                         ub1 *input,
-                         nzttBufferBlock *encrypted_data);
-
-sword OCISecurityEncryptExpansion(OCISecurity *osshandle,
-                                  OCIError *error_handle,
-                                  nzttPersona *persona,
-                                  size_t input_length,
-                                  size_t *encrypted_data_length);
-
-sword OCISecurityDecrypt(OCISecurity *osshandle,
-                         OCIError *error_handle,
-                         nzttPersona *persona,
-                         nzttces decryption_state,
-                         size_t input_length,
-                         ub1 *input,
-                         nzttBufferBlock *decrypted_data);
-
-sword OCISecurityEnvelope(OCISecurity *osshandle,
-                          OCIError *error_handle,
-                          nzttPersona *persona,
-                          size_t number_of_recipients,
-                          nzttIdentity *sidentity,
-                          nzttces encryption_state,
-                          size_t input_length,
-                          ub1 *input,
-                          nzttBufferBlock *enveloped_data);
-
-sword OCISecurityDeEnvelope(OCISecurity *osshandle,
-                            OCIError *error_handle,
-                            nzttPersona *persona,
-                            nzttces decryption_state,
-                            size_t input_length,
-                            ub1 *input,
-                            nzttBufferBlock *output_message,
-                            boolean *verified,
-                            boolean *validated,
-                            nzttIdentity **sender_identity);
-
-sword OCISecurityKeyedHash(OCISecurity *osshandle,
-                           OCIError *error_handle,
-                           nzttPersona *persona,
-                           nzttces hash_state,
-                           size_t input_length,
-                           ub1 *input,
-                           nzttBufferBlock *keyed_hash);
-
-sword OCISecurityKeyedHashExpansion(OCISecurity *osshandle,
-                                    OCIError *error_handle,
-                                    nzttPersona *persona,
-                                    size_t input_length,
-                                    size_t *required_buffer_length);
-
-sword OCISecurityHash(OCISecurity *osshandle,
-                      OCIError *error_handle,
-                      nzttPersona *persona,
-                      nzttces hash_state,
-                      size_t input,
-                      ub1 *input_length,
-                      nzttBufferBlock *shash);
-
-sword OCISecurityHashExpansion(OCISecurity *osshandle,
-                               OCIError *error_handle,
-                               nzttPersona *persona,
-                               size_t input_length,
-                               size_t *required_buffer_length);
-
-sword OCISecuritySeedRandom(OCISecurity *osshandle,
-                            OCIError *error_handle,
-                            nzttPersona *persona,
-                            size_t seed_length,
-                            ub1 *seed);
-
-sword OCISecurityRandomBytes(OCISecurity *osshandle,
-                             OCIError *error_handle,
-                             nzttPersona *persona,
-                             size_t number_of_bytes_desired,
-                             nzttBufferBlock *random_bytes);
-
-sword OCISecurityRandomNumber(OCISecurity *osshandle,
-                              OCIError *error_handle,
-                              nzttPersona *persona,
-                              uword *random_number_ptr);
-
-sword OCISecurityInitBlock(OCISecurity *osshandle,
-                           OCIError *error_handle,
-                           nzttBufferBlock *buffer_block);
-
-sword OCISecurityReuseBlock(OCISecurity *osshandle,
-                            OCIError *error_handle,
-                            nzttBufferBlock *buffer_block);
-
-sword OCISecurityPurgeBlock(OCISecurity *osshandle,
-                            OCIError *error_handle,
-                            nzttBufferBlock *buffer_block);
-
-sword OCISecuritySetBlock(OCISecurity *osshandle,
-                          OCIError *error_handle,
-                          uword flags_to_set,
-                          size_t buffer_length,
-                          size_t used_buffer_length,
-                          ub1 *buffer,
-                          nzttBufferBlock *buffer_block);
-
-sword OCISecurityGetIdentity(OCISecurity   *osshandle,
-                             OCIError      *error_handle,
-                             size_t         namelen,
-                             OraText          *distinguished_name,
-                             nzttIdentity **sidentity);
-
-sword OCIAQEnq(OCISvcCtx *svchp, OCIError *errhp, OraText *queue_name,
-		 OCIAQEnqOptions *enqopt, OCIAQMsgProperties *msgprop,
-		 OCIType *payload_tdo, dvoid **payload, dvoid **payload_ind, 
-		 OCIRaw **msgid, ub4 flags); 
-
-sword OCIAQDeq(OCISvcCtx *svchp, OCIError *errhp, OraText *queue_name,
-		 OCIAQDeqOptions *deqopt, OCIAQMsgProperties *msgprop,
-		 OCIType *payload_tdo, dvoid **payload, dvoid **payload_ind, 
-		 OCIRaw **msgid, ub4 flags); 
-
-sword OCIAQListen(/*_ OCISvcCtx *svchp, OCIError *errhp, 
-		      OCIAQAgent **agent_list, ub4 num_agents,
-		      sb4 wait, OCIAQAgent **agent,
-		      ub4 flags _*/);
-
-sword OCIExtractInit(dvoid *hndl, OCIError *err);
-
-sword OCIExtractTerm(dvoid *hndl, OCIError *err);
-
-sword OCIExtractReset(dvoid *hndl, OCIError *err);
-
-sword OCIExtractSetNumKeys(dvoid *hndl, OCIError *err, uword numkeys);
-
-sword OCIExtractSetKey(dvoid *hndl, OCIError *err, CONST OraText *name, 
-                       ub1 type, ub4 flag, CONST dvoid *defval, 
-                       CONST sb4 *intrange, CONST OraText *CONST *strlist);
-
-sword OCIExtractFromFile(dvoid *hndl, OCIError *err, ub4 flag, 
-                         OraText *filename);
-
-sword OCIExtractFromStr(dvoid *hndl, OCIError *err, ub4 flag, OraText *input);
-
-sword OCIExtractToInt(dvoid *hndl, OCIError *err, OraText *keyname, 
-                      uword valno, sb4 *retval);
-
-sword OCIExtractToBool(dvoid *hndl, OCIError *err, OraText *keyname, 
-                       uword valno, ub1 *retval);
-
-sword OCIExtractToStr(dvoid *hndl, OCIError *err, OraText *keyname, 
-                      uword valno, OraText *retval, uword buflen);
-
-sword OCIExtractToOCINum(dvoid *hndl, OCIError *err, OraText *keyname, 
-                         uword valno, OCINumber *retval);
-
-sword OCIExtractToList(dvoid *hndl, OCIError *err, uword *numkeys);
-
-sword OCIExtractFromList(dvoid *hndl, OCIError *err, uword index, 
-			 OraText **name, 
-                         ub1 *type, uword *numvals, dvoid ***values);
-
-/* Memory Related Service Interfaces */
-
-sword OCIMemoryAlloc(dvoid *hdl, OCIError *err, dvoid **mem,
-	OCIDuration dur, ub4 size, ub4 flags);
-
-sword OCIMemoryResize(dvoid *hdl, OCIError *err, dvoid **mem,
-			ub4 newsize, ub4 flags);
-			
-sword OCIMemoryFree(dvoid *hdl, OCIError *err, dvoid *mem);
-
-sword OCIContextSetValue(dvoid *hdl, OCIError *err, OCIDuration duration,
-			ub1 *key, ub1 keylen, dvoid *ctx_value);
-
-sword OCIContextGetValue(dvoid *hdl, OCIError *err, ub1 *key,
-			ub1 keylen, dvoid **ctx_value);
-
-sword OCIContextClearValue(dvoid *hdl, OCIError *err, ub1 *key, 
-			ub1 keylen);
-
-sword OCIContextGenerateKey(dvoid *hdl, OCIError *err, ub4 *key);
-
-sword OCIMemorySetCurrentIDs(dvoid *hdl, OCIError *err, 
-	ub4 curr_session_id, ub4 curr_trans_id, ub4 curr_stmt_id);
-
-sword OCIPicklerTdsCtxInit(OCIEnv *env, OCIError *err, 
-                           OCIPicklerTdsCtx **tdsc);
-
-sword OCIPicklerTdsCtxFree(OCIEnv *env, OCIError *err, OCIPicklerTdsCtx *tdsc);
-
-sword OCIPicklerTdsInit(OCIEnv *env, OCIError *err, OCIPicklerTdsCtx *tdsc, 
-					OCIPicklerTds **tdsh);
-
-sword OCIPicklerTdsFree(OCIEnv *env, OCIError *err, OCIPicklerTds *tdsh);
-
-sword OCIPicklerTdsCreateElementNumber(OCIEnv *env, OCIError *err, 
-					OCIPicklerTds *tdsh, ub1 prec, 
-					sb1 scale, OCIPicklerTdsElement *elt);
-
-sword OCIPicklerTdsCreateElementChar(OCIEnv *env, OCIError *err, 
-				     OCIPicklerTds *tdsh, ub2 len, 
-				     OCIPicklerTdsElement *elt);
-
-sword OCIPicklerTdsCreateElementVarchar(OCIEnv *env, OCIError *err, 
-                                        OCIPicklerTds *tdsh, ub2 len, 
-                                        OCIPicklerTdsElement *elt);
-
-sword OCIPicklerTdsCreateElementRaw(OCIEnv *env, OCIError *err, 
-                                    OCIPicklerTds *tdsh, ub2 len, 
-                                    OCIPicklerTdsElement *elt);
-
-sword OCIPicklerTdsCreateElement(OCIEnv *env, OCIError *err, 
-                                 OCIPicklerTds *tdsh, OCITypeCode dty, 
-                                 OCIPicklerTdsElement *elt);
-
-sword OCIPicklerTdsAddAttr(OCIEnv *env, OCIError *err, 
-                           OCIPicklerTds *tdsh, OCIPicklerTdsElement elt);
-
-sword OCIPicklerTdsGenerate(OCIEnv *env, OCIError *err, 
-				OCIPicklerTds *tdsh);
-
-sword OCIPicklerTdsGetAttr(OCIEnv *env, OCIError *err, 
-				CONST OCIPicklerTds *tdsh, ub1  attrno,
-				OCITypeCode *typ, ub2  *len);
-
-sword OCIPicklerFdoInit(OCIEnv *env, OCIError *err, 
-				OCIPicklerFdo **fdoh);
-
-sword OCIPicklerFdoFree(OCIEnv *env, OCIError *err, 
-				OCIPicklerFdo *fdoh);
-
-sword OCIPicklerImageInit(OCIEnv *env, OCIError *err, 
-                          OCIPicklerFdo *fdoh, 
-                          OCIPicklerTds *tdsh,
-			  OCIPicklerImage **imgh);
-
-sword OCIPicklerImageFree(OCIEnv *env, OCIError *err, 
-				OCIPicklerImage *imgh);
- 
-sword OCIPicklerImageAddScalar(OCIEnv *env, OCIError *err,  
-                               OCIPicklerImage *imgh, dvoid *scalar, ub4  len);
- 
-sword OCIPicklerImageAddNullScalar(OCIEnv *env, OCIError *err, 
-				OCIPicklerImage *imgh);
- 
-sword OCIPicklerImageGenerate(OCIEnv *env, OCIError *err, 
-				OCIPicklerImage *imgh);
- 
-sword OCIPicklerImageGetScalarSize(OCIEnv *env, OCIError *err, 
-				OCIPicklerImage *imgh, 
-				ub4  attrno, ub4  *size);
- 
-sword OCIPicklerImageGetScalar(OCIEnv *env, OCIError *err, 
-				OCIPicklerImage *imgh, ub4  attrno, 
-				dvoid *buf, ub4  *len, OCIInd *ind);
-
-sword OCIPicklerImageCollBegin(OCIEnv *env, OCIError *err,
-                OCIPicklerImage *imgh, CONST OCIPicklerTds *colltdsh);
- 
-sword OCIPicklerImageCollAddScalar( OCIEnv *env, OCIError *err,
-                OCIPicklerImage *imgh, dvoid *scalar,
-                ub4 buflen, OCIInd ind);
- 
-sword OCIPicklerImageCollEnd(OCIEnv *env, OCIError *err,
-                OCIPicklerImage *imgh);
- 
-/* should take svcctx for locator stuff */
-sword OCIPicklerImageCollBeginScan(OCIEnv *env, OCIError *err,
-                OCIPicklerImage *imgh, CONST OCIPicklerTds *coll_tdsh,
-                ub4 attrnum, ub4 startidx, OCIInd *ind);
- 
-sword OCIPicklerImageCollGetScalarSize(OCIEnv *env, OCIError *err,
-                CONST OCIPicklerTds *coll_tdsh, ub4 *size);
- 
-sword OCIPicklerImageCollGetScalar(OCIEnv *env, OCIError *err,
-                                   OCIPicklerImage *imgh, dvoid *buf,
-                                   ub4 *buflen, OCIInd *ind);
-
-sword OCIAnyDataGetType(OCISvcCtx *svchp, OCIError *errhp, OCIAnyData *sdata,
-        OCITypeCode *tc, OCIType **type);
-
-sword OCIAnyDataIsNull(OCISvcCtx *svchp, OCIError *errhp, OCIAnyData *sdata,
-        boolean *isnull);
-
-sword OCIAnyDataConvert(OCISvcCtx *svchp, OCIError *errhp, OCITypeCode tc,
-        OCIType *type, OCIDuration dur, dvoid *ind, dvoid *data_val,
-        ub4 len, OCIAnyData **sdata);
-
-sword OCIAnyDataBeginCreate(OCISvcCtx *svchp, OCIError *errhp, OCITypeCode tc,
-        OCIType *type, OCIDuration dur, OCIAnyData **sdata);
-
-sword OCIAnyDataDestroy(OCISvcCtx *svchp, OCIError *errhp, OCIAnyData *sdata);
-
-sword OCIAnyDataAttrSet(OCISvcCtx *svchp, OCIError *errhp, OCIAnyData *sdata,
-        OCITypeCode tc, OCIType *type, dvoid *ind, dvoid *attr_val,
-        ub4 length, boolean is_any);
-
-sword OCIAnyDataCollAddElem(OCISvcCtx *svchp, OCIError *errhp,
-        OCIAnyData *sdata, OCITypeCode tc, OCIType *type, dvoid *ind,
-        dvoid *attr_val, ub4 length, boolean is_any, boolean last_elem);
-
-sword OCIAnyDataEndCreate(OCISvcCtx *svchp, OCIError *errhp,
-                          OCIAnyData *sdata);
-
-sword OCIAnyDataAccess(OCISvcCtx *svchp, OCIError *errhp, OCIAnyData *sdata,
-        OCITypeCode tc, OCIType *type, dvoid *ind, dvoid *attr_val,
-        ub4 *length);
-
-sword OCIAnyDataGetCurrAttrNum(OCISvcCtx *svchp, OCIError *errhp, OCIAnyData *sdata,
-			ub4 *attrnum);
-
-sword OCIAnyDataAttrGet(OCISvcCtx *svchp, OCIError *errhp, OCIAnyData *sdata,
-  OCITypeCode tc, OCIType *type, dvoid *ind, dvoid *attr_val,
-        ub4 *length, boolean is_any);
-
-sword OCIAnyDataCollGetElem(OCISvcCtx *svchp, OCIError *errhp,
-  OCIAnyData *sdata,
-  OCITypeCode tc, OCIType *type, dvoid *ind, dvoid *celem_val,
-  ub4 *length, boolean is_any);
-
-
-/*------------------------ OCIAnyDataSet interfaces -------------------------*/
-
-/*
-   NAME
-     OCIAnyDataSetBeginCreate - OCIAnyDataSet Begin Creation
-   PARAMETERS
-     svchp (IN/OUT) - The OCI service context.
-     errhp (IN/OUT) - The OCI error handle. If there is an error, it is
-                      recorded in errhp and this function returns OCI_ERROR.
-                      Diagnostic information can be obtained by calling
-                      OCIErrorGet().
-     typecode       - typecode corresponding to the OCIAnyDataSet.
-     type (IN)      - type corresponding to the OCIAnyDataSet. If the typecode
-                      corresponds to a built-in type (OCI_TYPECODE_NUMBER etc.)
-                      , this parameter can be NULL. It should be non NULL for
-                      user defined types (OCI_TYPECODE_OBJECT,
-                      OCI_TYPECODE_REF, collection types etc.)
-     dur (IN)       - duration for which OCIAnyDataSet is allocated.
-     data_set (OUT) - Initialized OCIAnyDataSet.
-     RETURNS        - error code
-   NOTES
-     This call allocates an OCIAnyDataSet for the duration of dur and
-     initializes it with the type information. The OCIAnyDataSet can hold
-     multiple instances of the given type. For performance reasons, the 
-     OCIAnyDataSet will end up pointing to the passed in OCIType parameter.
-     It is the responsibility of the caller to ensure that the OCIType is
-     longer lived (has allocation duration >= the duration of the OCIAnyData
-     if the OCIType is a transient one, allocation/pin duration >= duration of
-     the OCIAnyData if the OCIType is a persistent one).
-
-*/
-sword OCIAnyDataSetBeginCreate(OCISvcCtx *svchp, OCIError *errhp,
-     OCITypeCode typecode, CONST OCIType *type, OCIDuration dur,
-     OCIAnyDataSet ** data_set);
-
-/*
-   NAME
-     OCIAnyDataSetDestroy  - OCIAnyDataSet Destroy
-   DESCRIPTION
-     This call frees the OCIAnyDataSet allocated using
-     OCIAnyDataSetBeginCreate().
-   RETURNS
-     error code.
-   PARAMETERS
-     svchp (IN/OUT)    - The OCI service context.
-     errhp (IN/OUT)    - The OCI Error handle.
-     data_set (IN/OUT) - OCIAnyDataSet to be freed.
-*/
-sword OCIAnyDataSetDestroy(OCISvcCtx *svchp, OCIError *errhp,
-     OCIAnyDataSet *data_set);
-
-
-/*
-   NAME
-     OCIAnyDataSetAddInstance - OCIAnyDataSet Add an instance
-   DESCRIPTION
-     This call adds a new skeleton instance to the OCIAnyDataSet and all the
-     attributes of the instance are set to NULL. It returns this skeleton
-     instance through the OCIAnyData parameter which can be constructed
-     subsequently by invoking the OCIAnyData API.
-   RETURNS
-     error code.
-   PARAMETERS
-     svchp (IN/OUT)      - The OCI service context.
-     errhp (IN/OUT)      - The OCI Error handle.
-     data_set (IN/OUT)   - OCIAnyDataSet to which a new instance is added.
-     data (IN/OUT)       - OCIAnyData corresponding to the newly added
-                           instance. If (*data) is NULL, a new OCIAnyData will
-                           be allocated for same duration as the OCIAnyDataSet.
-                           If (*data) is not NULL, it will get reused. This
-                           OCIAnyData can be subseqently constructed using the
-                           OCIAnyDataConvert() call or it can be constructed
-                           piece-wise using the OCIAnyDataAttrSet and
-                           OCIAnyDataCollAddElem calls.
-   NOTES
-     No Destruction of the old value is done here. It is the responsibility of
-     the caller to destroy the old value pointed to by (*data) and set (*data)
-     to a null pointer before beginning to make a sequence of this call. No
-     deep copying (of OCIType information nor the data part.) is done in the
-     returned OCIAnyData. This OCIAnyData cannot be used beyond the allocation
-     duration of the OCIAnyDataSet (it is like a reference into the
-     OCIAnyDataSet). The returned OCIAnyData can be reused on subsequent calls
-     to this function, to sequentially add new data instances to the
-     OCIAnyDataSet.
-*/
-sword OCIAnyDataSetAddInstance(OCISvcCtx *svchp, OCIError *errhp,
-     OCIAnyDataSet *data_set, OCIAnyData **data);
-
-/*
-   NAME
-     OCIAnyDataSetEndCreate - OCIAnyDataSet End Creation process.
-   DESCRIPTION
-     This call marks the end of OCIAnyDataSet creation. It should be called
-     after constructing all of its instance(s).
-   RETURNS
-     error code.
-   PARAMETERS
-     svchp (IN/OUT)        - The OCI service context.
-     errhp (IN/OUT)        - The OCI error handle. If there is an error, it is
-                             recorded in errhp and this function returns
-                             OCI_ERROR. Diagnostic information can be obtained
-                             by calling OCIErrorGet().
-     data_set (IN/OUT)     - OCIAnyDataSet that has been fully constructed.
-*/
-sword OCIAnyDataSetEndCreate(OCISvcCtx *svchp, OCIError *errhp,
-     OCIAnyDataSet *data_set);
-
-/*
-   NAME
-     OCIAnyDataSetGetType - OCIAnyDataSet Get Type of an OCIAnyDataSet
-   DESCRIPTION
-     Gets the Type corresponding to an OCIAnyDataSet. It returns the actual
-     pointer to the type maintained inside an OCIAnyDataSet. No copying is
-     done for performance reasons. The client is responsible for not using
-     this type once the OCIAnyDataSet is freed (or its duration ends).
-   RETURNS
-     error code.
-   PARAMETERS
-     svchp (IN/OUT)      - The OCI service context.
-     errhp (IN/OUT)      - The OCI Error handle.
-     data_set (IN)       - Initialized OCIAnyDataSet.
-     tc (OUT)            - The typecode of the type.
-     type (OUT)          - The type corresponding to the OCIAnyDataSet. This
-                           could be null if the OCIAnyData corresponds to a
-                           built-in type.
-*/
-sword OCIAnyDataSetGetType (OCISvcCtx *svchp, OCIError *errhp,
-     OCIAnyDataSet *data_set, OCITypeCode *tc, OCIType **type);
-
-/*
-  NAME
-    OCIAnyDataSetGetCount - OCIAnyDataSet Get Count of instances.
-  DESCRIPTION
-    This call gets the number of instances in the OCIAnyDataSet.
-  RETURNS
-    error code.
-  PARAMETERS
-    svchp (IN/OUT)      - OCI Service Context
-    errhp (IN/OUT)      - OCI Error handle
-    data_set (IN)       - Well formed OCIAnyDataSet.
-    count (OUT)         - number of instances in OCIAnyDataSet
-*/
-sword OCIAnyDataSetGetCount(OCISvcCtx *svchp, OCIError *errhp,
-     OCIAnyDataSet *data_set, ub4 *count);
-
-/*
-  NAME
-    OCIAnyDataSetGetInstance - OCIAnyDataSet Get next instance.
-  DESCRIPTION
-    Only sequential access to the instances in an OCIAnyDataSet is allowed.
-    This call returns the OCIAnyData corresponding to an instance at the
-    current position and updates the current position. Subsequently, the
-    OCIAnyData access routines may be used to access the instance.
-  RETURNS
-    error code. Returns OCI_NO_DATA if the current position is at the end of
-    the set, OCI_SUCCESS otherwise.
-  PARAMETERS
-    svchp (IN/OUT)      - OCI Service Context
-    errhp (IN/OUT)      - OCI Error handle
-    data_set (IN)       - Well formed OCIAnyDataSet
-    data (IN/OUT)       - OCIAnyData corresponding to the instance. If (*data)
-                          is NULL, a new OCIAnyData will be allocated for same
-                          duration as the OCIAnyDataSet. If (*data) is not NULL
-                          , it will get reused. This OCIAnyData can be
-                          subsequently accessed using the OCIAnyDataAccess()
-                          call or piece-wise by using the OCIAnyDataAttrGet()
-                          call.
-  NOTE
-    No Destruction of the old value is done here. It is the responsibility of
-    the caller to destroy the old value pointed to by (*data) and set (*data)
-    to a null pointer before beginning to make a sequence of this call. No deep
-    copying (of OCIType information nor the data part.) is done in the returned
-    OCIAnyData. This OCIAnyData cannot be used beyond the allocation duration
-    of the OCIAnyDataSet (it is like a reference into the OCIAnyDataSet). The
-    returned OCIAnyData can be reused on subsequent calls to this function to
-    sequentially access the OCIAnyDataSet.
-*/
-sword OCIAnyDataSetGetInstance(OCISvcCtx *svchp, OCIError *errhp,
-     OCIAnyDataSet *data_set, OCIAnyData **data);
-
-/*--------------------- End of OCIAnyDataSet interfaces ---------------------*/
-
-sword OCIFormatInit(dvoid *hndl, OCIError *err);
-
-sword OCIFormatString(dvoid *hndl, OCIError *err, OraText *buffer,
-                      sbig_ora bufferLength, sbig_ora *returnLength,
-                      CONST OraText *formatString, ...);
-
-sword OCIFormatTerm(dvoid *hndl, OCIError *err);
-
-sword OCIFormatTUb1(void);
-sword OCIFormatTUb2(void);
-sword OCIFormatTUb4(void);
-sword OCIFormatTUword(void);
-sword OCIFormatTUbig_ora(void);
-sword OCIFormatTSb1(void);
-sword OCIFormatTSb2(void);
-sword OCIFormatTSb4(void);
-sword OCIFormatTSword(void);
-sword OCIFormatTSbig_ora(void);
-sword OCIFormatTEb1(void);
-sword OCIFormatTEb2(void);
-sword OCIFormatTEb4(void);
-sword OCIFormatTEword(void);
-sword OCIFormatTChar(void);
-sword OCIFormatTText(void);
-sword OCIFormatTDouble(void);
-sword OCIFormatTDvoid(void);
-sword OCIFormatTEnd(void);
-
-/*-------------------------- Extensions to XA interface ---------------------*/
-/* ------------------------- xaosvch ----------------------------------------*/
-/*
-   NAME
-     xaosvch  -  XA Oracle get SerViCe Handle
-   DESCRIPTION
-     Given a database name return the service handle that is used by the
-     XA library
-   NOTE
-     This macro has been provided for backward compatibilty with 8.0.2
-*/
-OCISvcCtx *xaosvch(OraText *dbname);
-
-/* ------------------------- xaoSvcCtx --------------------------------------*/
-/*
-   NAME
-     xaoSvcCtx  -  XA Oracle get SerViCe ConTeXt
-   DESCRIPTION
-     Given a database name return the service handle that is used by the
-     XA library
-   NOTE
-     This routine has been provided for APs to get access to the service
-     handle that XA library uses. Without this routine APs must use SQLLIB
-     routine sqlld2 to get access to the Logon data area registered by the
-     XA library
-*/
-OCISvcCtx *xaoSvcCtx(OraText *dbname);
-
-/* ------------------------- xaoEnv -----------------------------------------*/
-/*
-   NAME
-     xaoEnv  -  XA Oracle get ENvironment Handle
-   DESCRIPTION
-     Given a database name return the environment handle that is used by the
-     XA library
-   NOTE
-     This routine has been provided for APs to get access to the environment
-     handle that XA library uses. Without this routine APs must use SQLLIB
-     routine sqlld2 to get access to the Logon data area registered by the
-     XA library
-*/
-OCIEnv *xaoEnv(OraText *dbname);
-
-/* ------------------------- xaosterr ---------------------------------------*/
-/*
-   NAME
-     xaosterr  -  XA Oracle get xa STart ERRor code
-   DESCRIPTION
-     Given an oracle error code return the XA error code
- */
-int xaosterr(OCISvcCtx *svch, sb4 error);
-/*-------------------------- End Extensions ---------------------------------*/
-/*---------------------- Extensions to NLS cartridge service ----------------*/
-/* ----------------------- OCINlsGetInfo ------------------------------------*/
-/*
-   NAME
-     OCINlsGetInfo - Get NLS info from OCI environment handle
-   REMARKS
-     This function generates language information specified by item from OCI 
-     environment handle envhp into an array pointed to by buf within size 
-     limitation as buflen.
-   RETURNS
-     OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR on wrong item.
-   envhp(IN/OUT)
-     OCI environment handle.
-   errhp(IN/OUT)
-     The OCI error handle. If there is an error, it is record in errhp and 
-     this function returns a NULL pointer. Diagnostic information can be 
-     obtained by calling OCIErrorGet().
-   buf(OUT)
-     Pointer to the destination buffer.
-   buflen(IN)
-     The size of destination buffer. The maximum length for each information
-     is 32 bytes.
-   item(IN)
-     It specifies to get which item in OCI environment handle and can be one
-     of following values:
-       OCI_NLS_DAYNAME1 : Native name for Monday.
-       OCI_NLS_DAYNAME2 : Native name for Tuesday.
-       OCI_NLS_DAYNAME3 : Native name for Wednesday.
-       OCI_NLS_DAYNAME4 : Native name for Thursday.
-       OCI_NLS_DAYNAME5 : Native name for Friday.
-       OCI_NLS_DAYNAME6 : Native name for for Saturday.
-       OCI_NLS_DAYNAME7 : Native name for for Sunday.
-       OCI_NLS_ABDAYNAME1 : Native abbreviated name for Monday.
-       OCI_NLS_ABDAYNAME2 : Native abbreviated name for Tuesday.
-       OCI_NLS_ABDAYNAME3 : Native abbreviated name for Wednesday.
-       OCI_NLS_ABDAYNAME4 : Native abbreviated name for Thursday.
-       OCI_NLS_ABDAYNAME5 : Native abbreviated name for Friday.
-       OCI_NLS_ABDAYNAME6 : Native abbreviated name for for Saturday.
-       OCI_NLS_ABDAYNAME7 : Native abbreviated name for for Sunday.
-       OCI_NLS_MONTHNAME1 : Native name for January.
-       OCI_NLS_MONTHNAME2 : Native name for February.
-       OCI_NLS_MONTHNAME3 : Native name for March.
-       OCI_NLS_MONTHNAME4 : Native name for April.
-       OCI_NLS_MONTHNAME5 : Native name for May.
-       OCI_NLS_MONTHNAME6 : Native name for June.
-       OCI_NLS_MONTHNAME7 : Native name for July.
-       OCI_NLS_MONTHNAME8 : Native name for August.
-       OCI_NLS_MONTHNAME9 : Native name for September.
-       OCI_NLS_MONTHNAME10 : Native name for October.
-       OCI_NLS_MONTHNAME11 : Native name for November.
-       OCI_NLS_MONTHNAME12 : Native name for December.
-       OCI_NLS_ABMONTHNAME1 : Native abbreviated name for January.
-       OCI_NLS_ABMONTHNAME2 : Native abbreviated name for February.
-       OCI_NLS_ABMONTHNAME3 : Native abbreviated name for March.
-       OCI_NLS_ABMONTHNAME4 : Native abbreviated name for April.
-       OCI_NLS_ABMONTHNAME5 : Native abbreviated name for May.
-       OCI_NLS_ABMONTHNAME6 : Native abbreviated name for June.
-       OCI_NLS_ABMONTHNAME7 : Native abbreviated name for July.
-       OCI_NLS_ABMONTHNAME8 : Native abbreviated name for August.
-       OCI_NLS_ABMONTHNAME9 : Native abbreviated name for September.
-       OCI_NLS_ABMONTHNAME10 : Native abbreviated name for October.
-       OCI_NLS_ABMONTHNAME11 : Native abbreviated name for November.
-       OCI_NLS_ABMONTHNAME12 : Native abbreviated name for December.
-       OCI_NLS_YES : Native string for affirmative response.
-       OCI_NLS_NO : Native negative response. 
-       OCI_NLS_AM : Native equivalent string of AM.
-       OCI_NLS_PM : Native equivalent string of PM.
-       OCI_NLS_AD : Native equivalent string of AD.
-       OCI_NLS_BC : Native equivalent string of BC.
-       OCI_NLS_DECIMAL : decimal character.
-       OCI_NLS_GROUP : group separator.
-       OCI_NLS_DEBIT : Native symbol of debit.
-       OCI_NLS_CREDIT : Native sumbol of credit.
-       OCI_NLS_DATEFORMAT : Oracle date format.
-       OCI_NLS_INT_CURRENCY: International currency symbol.
-       OCI_NLS_LOC_CURRENCY : Locale currency symbol.
-       OCI_NLS_LANGUAGE : Language name.
-       OCI_NLS_ABLANGUAGE : Abbreviation for language name.
-       OCI_NLS_TERRITORY : Territory name.
-       OCI_NLS_CHARACTER_SET : Character set name.
-       OCI_NLS_LINGUISTIC : Linguistic name.
-       OCI_NLS_CALENDAR : Calendar name.
-       OCI_NLS_DUAL_CURRENCY : Dual currency symbol.
-*/
-sword OCINlsGetInfo(dvoid *envhp, OCIError *errhp, OraText *buf,
-                    size_t buflen, ub2 item);
-
-/* ----------------------- OCINlsNumericInfoGet -----------------------------*/
-/*
-   NAME
-     OCINlsNumericInfoGet - Get NLS numeric info from OCI environment handle
-   REMARKS
-     This function generates numeric language information specified by item 
-     from OCI environment handle envhp into an output number variable.
-   RETURNS
-     OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR on wrong item.
-   envhp(IN/OUT)
-     OCI environment handle. If handle invalid, returns OCI_INVALID_HANDLE.
-   errhp(IN/OUT)
-     The OCI error handle. If there is an error, it is record in errhp and 
-     this function returns a NULL pointer. Diagnostic information can be 
-     obtained by calling OCIErrorGet().
-   val(OUT)
-     Pointer to the output number variable. On OCI_SUCCESS return, it will
-     contain the requested NLS numeric info.
-   item(IN)
-     It specifies to get which item in OCI environment handle and can be one
-     of following values:
-       OCI_NLS_CHARSET_MAXBYTESZ : Maximum character byte size for OCI
-                                   environment or session handle charset
-       OCI_NLS_CHARSET_FIXEDWIDTH: Character byte size for fixed-width charset;
-                                   0 for variable-width charset 
-*/
-sword OCINlsNumericInfoGet(dvoid *envhp, OCIError *errhp, sb4 *val, ub2 item);
-
-/* ----------------------- OCINlsCharSetNameToId -----------------------------*/
-/*
-   NAME
-     OCINlsCharSetNameToId - Get Oracle charset id given Oracle charset name
-   REMARKS
-     This function will get the Oracle character set id corresponding to
-     the given Oracle character set name.
-   RETURNS
-     Oracle character set id for the given Oracle character set name if
-     character set name and OCI handle are valid; otherwise returns 0.
-   envhp(IN/OUT)
-     OCI environment handle.
-   name(IN)
-     Pointer to a null-terminated Oracle character set name whose id 
-     will be returned.
-*/
-ub2 OCINlsCharSetNameToId(dvoid *envhp, const oratext *name);
-
-/* ----------------------- OCINlsCharSetIdToName -----------------------------*/
-/*
-   NAME
-     OCINlsCharSetIdToName - Get Oracle charset name given Oracle charset id
-   REMARKS
-     This function will get the Oracle character set name corresponding to
-     the given Oracle character set id.
-   RETURNS
-     OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
-   envhp(IN/OUT)
-     OCI environment handle. If handle invalid, returns OCI_INVALID_HANDLE.
-   buf(OUT)
-     Pointer to the destination buffer. On OCI_SUCCESS return, it will contain
-     the null-terminated string for character set name.
-   buflen(IN)
-     Size of destination buffer. Recommended size is OCI_NLS_MAXBUFSZ for
-     guarantee to store an Oracle character set name. If it's smaller than
-     the length of the character set name, the function will return OCI_ERROR.
-   id(IN)
-     Oracle character set id.
-*/
-sword OCINlsCharSetIdToName(dvoid *envhp, oratext *buf, size_t buflen, ub2 id);
-
-/* ----------------------- OCINlsNameMap ------------------------------------*/
-/*
-   NAME
-     OCINlsNameMap - Map NLS naming from Oracle to other standards and vice 
-                     versa
-   REMARKS
-     This function will map NLS naming from Oracle to other standards (such
-     as ISO, IANA) and vice versa.
-   RETURNS
-     OCI_SUCCESS, OCI_INVALID_HANDLE, or OCI_ERROR
-   envhp(IN/OUT)
-     OCI environment handle. If handle invalid, returns OCI_INVALID_HANDLE.
-   buf(OUT)
-     Pointer to the destination buffer. On OCI_SUCCESS return, it will 
-     contain null-terminated string for requested mapped name.
-   buflen(IN)
-     The size of destination buffer. Recommended size is OCI_NLS_MAXBUFSZ
-     for guarantee to store an NLS name. If it is smaller than the length
-     of the name, the function will return OCI_ERROR.
-   srcbuf(IN)
-     Pointer to null-terminated NLS name. If it is not a valid name in its
-     define scope, the function will return OCI_ERROR.
-   flag(IN)
-     It specifies name mapping direction and can take the following values:
-       OCI_NLS_CS_IANA_TO_ORA : Map character set name from IANA to Oracle
-       OCI_NLS_CS_ORA_TO_IANA : Map character set name from Oracle to IANA
-       OCI_NLS_LANG_ISO_TO_ORA : Map language name from ISO to Oracle
-       OCI_NLS_LANG_ORA_TO_ISO : Map language name from Oracle to ISO
-       OCI_NLS_TERR_ISO_TO_ORA : Map territory name from ISO to Oracle
-       OCI_NLS_TERR_ORA_TO_ISO : Map territory name from Oracle to ISO
-       OCI_NLS_TERR_ISO3_TO_ORA : Map territory name from 3-letter ISO
-                                  abbreviation to Oracle
-       OCI_NLS_TERR_ORA_TO_ISO3 : Map territory name from Oracle to 3-letter
-                                  ISO abbreviation
-*/
-sword OCINlsNameMap(dvoid *envhp, oratext *buf, size_t buflen,
-                    const oratext *srcbuf, ub4 flag);
-
-/* -------------------- OCIMultiByteToWideChar ------------------------------*/
-/*
-   NAME
-     OCIMultiByteToWideChar - Convert a null terminated multibyte string into 
-                              wchar
-   REMARKS
-     This routine converts an entire null-terminated string into the wchar 
-     format. The wchar output buffer will be null-terminated.
-   RETURNS
-     OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set of string.
-   dst (OUT)
-     Destination buffer for wchar.
-   src (IN)
-     Source string to be converted.
-   rsize (OUT)
-     Number of characters converted including null-terminator.
-     If it is a NULL pointer, no number return
-*/
-sword OCIMultiByteToWideChar(dvoid *envhp, OCIWchar *dst, CONST OraText *src,
-                             size_t *rsize);
-
-
-/* --------------------- OCIMultiByteInSizeToWideChar -----------------------*/
-/*
-   NAME
-     OCIMultiByteInSizeToWideChar - Convert a mulitbyte string in length into
-                                    wchar
-   REMARKS
-     This routine converts part of string into the wchar format. It will
-     convert as many complete characters as it can until it reaches output
-     buffer size or input buffer size or it reaches a null-terminator in
-     source string. The output buffer will be null-terminated if space permits.
-     If dstsz is zero, this function will only return number of characters not
-     including ending null terminator for converted string.
-   RETURNS
-     OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set of string.
-   dst (OUT)
-     Pointer to a destination buffer for wchar. It can be NULL pointer when
-     dstsz is zero.
-   dstsz(IN)
-     Destination buffer size in character. If it is zero, this function just
-     returns number of characters will be need for the conversion.
-   src (IN)
-     Source string to be converted.
-   srcsz(IN)
-     Length of source string in byte.
-   rsize(OUT)
-     Number of characters written into destination buffer, or number of
-     characters for converted string is dstsz is zero.
-     If it is NULL pointer, nothing to return.
-*/
-sword OCIMultiByteInSizeToWideChar(dvoid *envhp, OCIWchar *dst,
-                                  size_t dstsz, CONST OraText *src, 
-                                  size_t srcsz, size_t *rsize);
-
-
-/* ---------------------- OCIWideCharToMultiByte ----------------------------*/
-/*
-   NAME
-     OCIWideCharToMultiByte - Convert a null terminated wchar string into
-                              multibyte
-   REMARKS
-     This routine converts an entire null-terminated wide character string into
-     multi-byte string. The output buffer will be null-terminated.
-   RETURNS
-     OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set of string.
-   dst (OUT)
-     Destination buffer for multi-byte string.
-   src (IN)
-     Source wchar string to be converted.
-   rsize (OUT)
-     Number of bytes written into the destination buffer.
-     If it is NULL pointer, nothing to return.
-*/
-sword OCIWideCharToMultiByte(dvoid *envhp, OraText *dst, CONST OCIWchar *src,
-                             size_t *rsize);
-
-
-/* ---------------------- OCIWideCharInSizeToMultiByte ----------------------*/
-/*
-   NAME
-     OCIWideCharInSizeToMultiByte - Convert a wchar string in length into 
-                                    mulitbyte
-   REMARKS
-     This routine converts part of wchar string into the multi-byte format.
-     It will convert as many complete characters as it can until it reaches
-     output buffer size or input buffer size or it reaches a null-terminator
-     in source string. The output buffer will be null-terminated if space
-     permits. If dstsz is zero, the function just returns the size of byte not 
-     including ending null-terminator need to store the converted string.
-   RETURNS
-     OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set of string.
-   dst (OUT)
-     Destination buffer for multi-byte. It can be NULL pointer if dstsz is
-     zero.
-   dstsz(IN)
-     Destination buffer size in byte. If it is zero, it just returns the size
-     of bytes need for converted string.
-   src (IN)
-     Source wchar string to be converted.
-   srcsz(IN)
-     Length of source string in character.
-   rsize(OUT)
-     Number of bytes written into destination buffer, or number of bytes need
-     to store the converted string if dstsz is zero.
-     If it is NULL pointer, nothing to return.
-*/
-sword OCIWideCharInSizeToMultiByte(dvoid *envhp, OraText *dst,
-                                    size_t dstsz, CONST OCIWchar *src,
-                                    size_t srcsz, size_t *rsize);
-
-
-
-/* ----------------------- OCIWideCharIsAlnum -------------------------------*/
-/*
-   NAME
-     OCIWideCharIsAlnum - test whether wc is a letter or decimal digit
-   REMARKS
-     It tests whether wc is a letter or decimal digit.
-   RETURNS
-     TRUE or FLASE.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar for testing.
-*/
-boolean OCIWideCharIsAlnum(dvoid *envhp, OCIWchar wc);
-
-
-/* ----------------------- OCIWideCharIsAlpha -------------------------------*/
-/*
-   NAME
-     OCIWideCharIsAlpha - test whether wc is an alphabetic letter
-   REMARKS
-     It tests whether wc is an alphabetic letter
-   RETURNS
-     TRUE or FLASE.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar for testing.
-*/
-boolean OCIWideCharIsAlpha(dvoid *envhp, OCIWchar wc);
-
-
-/* --------------------- OCIWideCharIsCntrl ---------------------------------*/
-/*
-   NAME
-     OCIWideCharIsCntrl - test whether wc is a control character
-   REMARKS
-     It tests whether wc is a control character.
-   RETURNS
-     TRUE or FLASE.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar for testing.
-*/
-boolean OCIWideCharIsCntrl(dvoid *envhp, OCIWchar wc);
-
-
-/* ----------------------- OCIWideCharIsDigit -------------------------------*/
-/*
-   NAME
-     OCIWideCharIsDigit - test whether wc is a decimal digit character
-   REMARKS
-     It tests whether wc is a decimal digit character.
-   RETURNS
-     TRUE or FLASE.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar for testing.
-*/
-boolean OCIWideCharIsDigit(dvoid *envhp, OCIWchar wc);
-
-
-/* ----------------------- OCIWideCharIsGraph -------------------------------*/
-/*
-   NAME
-     OCIWideCharIsGraph - test whether wc is a graph character
-   REMARKS
-     It tests whether wc is a graph character. A graph character is character
-     with a visible representation and normally includes alphabetic letter,
-     decimal digit, and punctuation.
-   RETURNS
-     TRUE or FLASE.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar for testing.
-*/
-boolean OCIWideCharIsGraph(dvoid *envhp, OCIWchar wc);
-
-
-/* ----------------------- OCIWideCharIsLower -------------------------------*/
-/*
-   NAME
-     OCIWideCharIsLower - test whether wc is a lowercase letter
-   REMARKS
-     It tests whether wc is a lowercase letter.
-   RETURNS
-     TRUE or FLASE.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar for testing.
-*/
-boolean OCIWideCharIsLower(dvoid *envhp, OCIWchar wc);
-
-
-/* ----------------------- OCIWideCharIsPrint -------------------------------*/
-/*
-   NAME
-     OCIWideCharIsPrint - test whether wc is a printable character
-   REMARKS
-     It tests whether wc is a printable character.
-   RETURNS
-     TRUE or FLASE.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar for testing.
-*/
-boolean OCIWideCharIsPrint(dvoid *envhp, OCIWchar wc);
-
-
-/* ----------------------- OCIWideCharIsPunct -------------------------------*/
-/*
-   NAME
-     OCIWideCharIsPunct - test whether wc is a punctuation character
-   REMARKS
-     It tests whether wc is a punctuation character.
-   RETURNS
-     TRUE or FLASE.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar for testing.
-*/
-boolean OCIWideCharIsPunct(dvoid *envhp, OCIWchar wc);
-
-
-/* ----------------------- OCIWideCharIsSpace -------------------------------*/
-/*
-   NAME
-     OCIWideCharIsSpace - test whether wc is a space character
-   REMARKS
-     It tests whether wc is a space character. A space character only causes
-     white space in displayed text(for example, space, tab, carriage return,
-     newline, vertical tab or form feed).
-   RETURNS
-     TRUE or FLASE.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar for testing.
-*/
-boolean OCIWideCharIsSpace(dvoid *envhp, OCIWchar wc);
-
-
-/* ----------------------- OCIWideCharIsUpper -------------------------------*/
-/*
-   NAME
-     OCIWideCharIsUpper - test whether wc is a uppercase letter
-   REMARKS
-     It tests whether wc is a uppercase letter.
-   RETURNS
-     TRUE or FLASE.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar for testing.
-*/
-boolean OCIWideCharIsUpper(dvoid *envhp, OCIWchar wc);
-
-
-/*----------------------- OCIWideCharIsXdigit -------------------------------*/
-/*
-   NAME
-     OCIWideCharIsXdigit - test whether wc is a hexadecimal digit
-   REMARKS
-     It tests whether wc is a hexadecimal digit ( 0-9, A-F, a-f ).
-   RETURNS
-     TRUE or FLASE.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar for testing.
-*/
-boolean OCIWideCharIsXdigit(dvoid *envhp, OCIWchar wc);
-
-
-/* --------------------- OCIWideCharIsSingleByte ----------------------------*/
-/*
-   NAME
-     OCIWideCharIsSingleByte - test whether wc is a single-byte character
-   REMARKS
-     It tests whether wc is a single-byte character when converted into
-     multi-byte.
-   RETURNS
-     TRUE or FLASE.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar for testing.
-*/
-boolean OCIWideCharIsSingleByte(dvoid *envhp, OCIWchar wc);
-
-
-/* ----------------------- OCIWideCharToLower -------------------------------*/
-/*
-   NAME
-     OCIWideCharToLower - Convert a wchar into the lowercase
-   REMARKS
-     If there is a lower-case character mapping for wc in the specified locale,
-     it will return the lower-case in wchar, else return wc itself.
-   RETURNS
-     A wchar
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar for lowercase mapping.
-*/
-OCIWchar OCIWideCharToLower(dvoid *envhp, OCIWchar wc);
-
-
-/* ----------------------- OCIWideCharToUpper -------------------------------*/
-/*
-   NAME
-     OCIWideCharToUpper - Convert a wchar into the uppercase
-   REMARKS
-     If there is a upper-case character mapping for wc in the specified locale,
-     it will return the upper-case in wchar, else return wc itself.
-   RETURNS
-     A wchar
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar for uppercase mapping.
-*/
-OCIWchar OCIWideCharToUpper(dvoid *envhp, OCIWchar wc);
-
-
-/* ----------------------- OCIWideCharStrcmp --------------------------------*/
-/*
-   NAME
-     OCIWideCharStrcmp - compare two null terminated wchar string
-   REMARKS
-     It compares two wchar string in binary ( based on wchar encoding value ),
-     linguistic, or case-insensitive.
-   RETURNS
-     0, if wstr1 == wstr2.
-     Positive, if wstr1 > wstr2.
-     Negative, if wstr1 < wstr2.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set.
-   wstr1(IN)
-     Pointer to a null-terminated wchar string.
-   wstr2(IN)
-     Pointer to a null-terminated wchar string.
-   flag(IN)
-     It is used to decide the comparison method. It can be taken one of the
-     following values:
-       OCI_NLS_BINARY : for the binary comparison, this is default value.
-       OCI_NLS_LINGUISTIC : for linguistic comparison specified in the locale.
-     This flag can be ORed with OCI_NLS_CASE_INSENSITIVE for case-insensitive
-     comparison.
-*/
-int OCIWideCharStrcmp(dvoid *envhp, CONST OCIWchar *wstr1, 
-                CONST OCIWchar *wstr2, int flag);
-
-
-/* ----------------------- OCIWideCharStrncmp -------------------------------*/
-/*
-   NAME
-     OCIWideCharStrncmp - compare twe wchar string in length
-   REMARKS
-     This function is similar to OCIWideCharStrcmp(), except that at most len1
-     characters from wstr1 and len2 characters from wstr1 are compared. The
-     null-terminator will be taken into the comparison.
-   RETURNS
-     0, if wstr1 = wstr2
-     Positive, if wstr1 > wstr2
-     Negative, if wstr1 < wstr2
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wstr1(IN)
-     Pointer to the first wchar string
-   len1(IN)
-     The length for the first string for comparison
-   wstr2(IN)
-     Pointer to the second wchar string
-   len2(IN)
-     The length for the second string for comparison.
-   flag(IN)
-     It is used to decide the comparison method. It can be taken one of the
-     following values:
-       OCI_NLS_BINARY : for the binary comparison, this is default value.
-       OCI_NLS_LINGUISTIC : for linguistic comparison specified in the locale.
-     This flag can be ORed with OCI_NLS_CASE_INSENSITIVE for case-insensitive 
-     comparison.
-*/
-int OCIWideCharStrncmp(dvoid *envhp, CONST OCIWchar *wstr1, size_t len1,
-                 CONST OCIWchar *wstr2, size_t len2, int flag);
-
-
-/* ----------------------- OCIWideCharStrcat --------------------------------*/
-/*
-   NAME
-     OCIWideCharStrcat - concatenate two wchar strings
-   REMARKS
-     This function appends a copy of the wchar string pointed to by wsrcstr,
-     including the null-terminator to the end of wchar string pointed to by
-     wdststr. It returns the number of character in the result string not
-     including the ending null-terminator.
-   RETURNS
-     number of characters in the result string not including the ending
-     null-terminator.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wdststr(IN/OUT)
-     Pointer to the destination wchar string for appending.
-   wsrcstr(IN)
-     Pointer to the source wchar string to append.
-*/
-size_t OCIWideCharStrcat(dvoid *envhp, OCIWchar *wdststr,
-                         CONST OCIWchar *wsrcstr);
-
-
-/* ----------------------- OCIWideCharStrchr --------------------------------*/
-/*
-   NAME
-     OCIWideCharStrchr - Search the first occurrence of wchar in a wchar string
-   REMARKS
-     This function searchs for the first occurrence of wc in the wchar string
-     pointed to by wstr. It returns a pointer to the whcar if successful, or
-     a null pointer.
-   RETURNS
-     wchar pointer if successful, otherwise a null pointer.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wstr(IN)
-     Pointer to the wchar string to search
-   wc(IN)
-     Wchar to search for.
-*/
-OCIWchar *OCIWideCharStrchr(dvoid *envhp, CONST OCIWchar *wstr,
-                            OCIWchar wc);
-
-
-/* ----------------------- OCIWideCharStrcpy --------------------------------*/
-/*
-   NAME
-     OCIWideCharStrcpy - copy a wchar string
-   REMARKS
-     This function copies the wchar string pointed to by wsrcstr, including the
-     null-terminator, into the array pointed to by wdststr. It returns the
-     number of character copied not including the ending null-terminator.
-   RETURNS
-     number of characters copied not including the ending null-terminator.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wdststr(OUT)
-     Pointer to the destination wchar buffer.
-   wsrcstr(IN)
-     Pointer to the source wchar string.
-*/
-size_t OCIWideCharStrcpy(dvoid *envhp, OCIWchar *wdststr,
-                         CONST OCIWchar *wsrcstr);
-
-
-/* ----------------------- OCIWideCharStrlen --------------------------------*/
-/*
-   NAME
-     OCIWideCharStrlen - Return number of character in a wchar string
-   REMARKS
-     This function computes the number of characters in the wchar string
-     pointed to by wstr, not including the null-terminator, and returns
-    this number. 
-   RETURNS
-     number of characters not including ending null-terminator.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wstr(IN)
-     Pointer to the source wchar string.
-*/
-size_t OCIWideCharStrlen(dvoid *envhp, CONST OCIWchar *wstr);
-
-
-/* ----------------------- OCIWideCharStrncat -------------------------------*/
-/*
-   NAME
-     OCIWideCharStrncat - Concatenate wchar string in length
-   REMARKS
-     This function is similar to OCIWideCharStrcat(), except that at most n
-     characters from wsrcstr are appended to wdststr. Note that the
-     null-terminator in wsrcstr will stop appending. wdststr will be
-     null-terminated.. 
-   RETURNS
-     Number of characters in the result string not including the ending
-     null-terminator.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wdststr(IN/OUT)
-     Pointer to the destination wchar string for appending.
-   wsrcstr(IN)
-     Pointer to the source wchar string to append.
-   n(IN)
-     Number of characters from wsrcstr to append.
-*/
-size_t OCIWideCharStrncat(dvoid *envhp, OCIWchar *wdststr,
-                          CONST OCIWchar *wsrcstr, size_t n);
-
-
-/* ----------------------- OCIWideCharStrncpy -------------------------------*/
-/*
-   NAME
-     OCIWideCharStrncpy - Copy wchar string in length
-   REMARKS
-     This function is similar to OCIWideCharStrcpy(), except that at most n
-     characters are copied from the array pointed to by wsrcstr to the array
-     pointed to by wdststr. Note that the null-terminator in wdststr will
-     stop coping and result string will be null-terminated.
-   RETURNS
-     number of characters copied not including the ending null-terminator.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wdststr(OUT)
-     Pointer to the destination wchar buffer.
-   wsrcstr(IN)
-     Pointer to the source wchar string.
-   n(IN)
-     Number of characters from wsrcstr to copy.
-*/
-size_t OCIWideCharStrncpy(dvoid *envhp, OCIWchar *wdststr,
-                          CONST OCIWchar *wsrcstr, size_t n);
-
-
-/* ----------------------- OCIWideCharStrrchr -------------------------------*/
-/*
-   NAME
-     OCIWideCharStrrchr - search the last occurrence of a wchar in wchar string
-   REMARKS
-     This function searchs for the last occurrence of wc in the wchar string
-     pointed to by wstr. It returns a pointer to the whcar if successful, or
-     a null pointer.
-   RETURNS
-     wchar pointer if successful, otherwise a null pointer.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wstr(IN)
-     Pointer to the wchar string to search
-   wc(IN)
-     Wchar to search for.
-*/
-OCIWchar *OCIWideCharStrrchr(dvoid *envhp, CONST OCIWchar *wstr,
-                             OCIWchar wc);
-
-
-/* --------------------- OCIWideCharStrCaseConversion -----------------------*/
-/*
-   NAME
-     OCIWideCharStrCaseConversion - convert a wchar string into lowercase or
-                                    uppercase
-   REMARKS
-     This function convert the wide char string pointed to by wsrcstr into the
-     uppercase or lowercase specified by flag and copies the result into the
-     array pointed to by wdststr. The result string will be null-terminated.
-   RETURNS
-     number of characters for result string not including null-terminator.
-   envhp(IN/OUT)
-     OCI environment handle.
-   wdststr(OUT)
-     Pointer to destination array.
-   wsrcstr(IN)
-     Pointer to source string.
-   flag(IN)
-     Specify the case to convert:
-       OCI_NLS_UPPERCASE : convert to uppercase.
-       OCI_NLS_LOWERCASE: convert to lowercase.
-     This flag can be ORed with OCI_NLS_LINGUISTIC to specify that the
-     linguistic setting in the locale will be used for case conversion.
-*/
-size_t OCIWideCharStrCaseConversion(dvoid *envhp, OCIWchar *wdststr,
-                                    CONST OCIWchar *wsrcstr, ub4 flag);
-
-
-/*---------------------- OCIWideCharDisplayLength ---------------------------*/
-/*
-   NAME
-     OCIWideCharDisplayLength - Calculate the display length for a wchar
-   REMARKS
-     This function determines the number of column positions required for wc
-     in display. It returns number of column positions, or 0 if wc is 
-     null-terminator.
-   RETURNS
-     Number of display positions.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar character.
-*/
-size_t OCIWideCharDisplayLength(dvoid *envhp, OCIWchar wc );
-
-
-/*---------------------- OCIWideCharMultiByteLength -------------------------*/
-/*
-   NAME
-     OCIWideCharMultiByteLength - Determine byte size in multi-byte encoding
-   REMARKS
-     This function determines the number of byte required for wc in multi-byte
-     encoding. It returns number of bytes in multi-byte for wc.
-   RETURNS
-     Number of bytes.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set .
-   wc(IN)
-     Wchar character.
-*/
-size_t OCIWideCharMultiByteLength(dvoid *envhp, OCIWchar wc);
-
-
-/* ----------------------- OCIMultiByteStrcmp -------------------------------*/
-/*
-   NAME
-     OCIMultiByteStrcmp - Compare two multi-byte strings
-   REMARKS
-     It compares two multi-byte strings in binary ( based on encoding value ),
-     linguistic, or case-insensitive.
-   RETURNS
-     0, if str1 == str2.
-     Positive, if str1 > str2.
-     Negative, if str1 < str2.
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set.
-   str1(IN)
-     Pointer to a null-terminated string.
-   str2(IN)
-     Pointer to a null-terminated string.
-   flag(IN)
-     It is used to decide the comparison method. It can be taken one of the
-     following values:
-       OCI_NLS_BINARY: for the binary comparison, this is default value.
-       OCI_NLS_LINGUISTIC: for linguistic comparison specified in the locale.
-     This flag can be ORed with OCI_NLS_CASE_INSENSITIVE for case-insensitive 
-     comparison.
-*/
-int OCIMultiByteStrcmp(dvoid *envhp, CONST OraText *str1,
-                       CONST OraText *str2, int flag);
-
-
-/*----------------------- OCIMultiByteStrncmp -------------------------------*/
-/*
-   NAME
-     OCIMultiByteStrncmp - compare two strings in length
-   REMARKS
-     This function is similar to OCIMultiBytestrcmp(), except that at most
-     len1 bytes from str1 and len2 bytes from str2 are compared. The
-     null-terminator will be taken into the comparison.
-   RETURNS
-     0, if str1 = str2
-     Positive, if str1 > str2
-     Negative, if str1 < str2
-   envhp(IN/OUT)
-     OCI environment handle to determine the character set.
-   str1(IN)
-     Pointer to the first string
-   len1(IN)
-     The length for the first string for comparison
-   str2(IN)
-     Pointer to the second string
-   len2(IN)
-     The length for the second string for comparison.
-   flag(IN)
-     It is used to decide the comparison method. It can be taken one of the
-     following values:
-       OCI_NLS_BINARY: for the binary comparison, this is default value.
-       OCI_NLS_LINGUISTIC: for linguistic comparison specified in the locale.
-     This flag can be ORed with OCI_NLS_CASE_INSENSITIVE for case-insensitive 
-     comparison.
-*/
-int OCIMultiByteStrncmp(dvoid *envhp, CONST OraText *str1, size_t len1,
-                        OraText *str2, size_t len2, int flag);
-
-
-/*----------------------- OCIMultiByteStrcat --------------------------------*/
-/*
-   NAME
-     OCIMultiByteStrcat - concatenate multibyte strings
-   REMARKS
-     This function appends a copy of the multi-byte string pointed to by
-     srcstr, including the null-terminator to the end of string pointed to by
-     dststr. It returns the number of bytes in the result string not including
-     the ending null-terminator.
-   RETURNS
-     number of bytes in the result string not including the ending
-     null-terminator.
-   envhp(IN/OUT)
-     Pointer to OCI environment handle
-   dststr(IN/OUT)
-     Pointer to the destination multi-byte string for appending.
-   srcstr(IN)
-     Pointer to the source string to append.
-*/
-size_t OCIMultiByteStrcat(dvoid *envhp, OraText *dststr,
-                          CONST OraText *srcstr);
-
-
-/*------------------------- OCIMultiByteStrcpy ------------------------------*/
-/*
-   NAME
-     OCIMultiByteStrcpy - copy multibyte string
-   REMARKS
-     This function copies the multi-byte string pointed to by srcstr,
-     including the null-terminator, into the array pointed to by dststr. It
-     returns the number of bytes copied not including the ending 
-     null-terminator.
-   RETURNS
-     number of bytes copied not including the ending null-terminator.
-   envhp(IN/OUT)
-     Pointer to the OCI environment handle.
-   srcstr(OUT)
-     Pointer to the destination buffer.
-   dststr(IN)
-     Pointer to the source multi-byte string.
-*/
-size_t OCIMultiByteStrcpy(dvoid *envhp, OraText *dststr,
-                          CONST OraText *srcstr);
-
-
-/*----------------------- OCIMultiByteStrlen --------------------------------*/
-/*
-   NAME
-     OCIMultiByteStrlen - Calculate multibyte string length
-   REMARKS
-     This function computes the number of bytes in the multi-byte string
-     pointed to by str, not including the null-terminator, and returns this
-     number. 
-   RETURNS
-     number of bytes not including ending null-terminator.
-   str(IN)
-     Pointer to the source multi-byte string.
-*/
-size_t OCIMultiByteStrlen(dvoid *envhp, CONST OraText *str);
-
-
-/*----------------------- OCIMultiByteStrncat -------------------------------*/
-/*
-   NAME
-     OCIMultiByteStrncat - concatenate string in length
-   REMARKS
-     This function is similar to OCIMultiBytestrcat(), except that at most n
-     bytes from srcstr are appended to dststr. Note that the null-terminator in
-     srcstr will stop appending and the function will append as many character
-     as possible within n bytes. dststr will be null-terminated. 
-   RETURNS
-     Number of bytes in the result string not including the ending
-     null-terminator.
-   envhp(IN/OUT)
-     Pointer to OCI environment handle.
-   srcstr(IN/OUT)
-     Pointer to the destination multi-byte string for appending.
-   dststr(IN)
-     Pointer to the source multi-byte string to append.
-   n(IN)
-     Number of bytes from srcstr to append.
-*/
-size_t OCIMultiByteStrncat(dvoid *envhp, OraText *dststr,
-                           CONST OraText *srcstr, size_t n);
-
-
-/*----------------------- OCIMultiByteStrncpy -------------------------------*/
-/*
-   NAME
-     OCIMultiByteStrncpy - copy multibyte string in length
-   REMARKS
-     This function is similar to OCIMultiBytestrcpy(), except that at most n
-     bytes are copied from the array pointed to by srcstr to the array pointed
-     to by dststr. Note that the null-terminator in srcstr will stop coping and
-     the function will copy as many character as possible within n bytes. The 
-     result string will be null-terminated.
-   RETURNS
-     number of bytes copied not including the ending null-terminator.
-   envhp(IN/OUT)
-     Pointer to a OCI environment handle.
-   dststr(IN)
-     Pointer to the source multi-byte string.
-   srcstr(OUT)
-     Pointer to the destination buffer.
-   n(IN)
-     Number of bytes from srcstr to copy.
-*/
-size_t OCIMultiByteStrncpy(dvoid *envhp, OraText *dststr,
-                           CONST OraText *srcstr, size_t n);
-
-
-/*----------------------- OCIMultiByteStrnDisplayLength ---------------------*/
-/*
-   NAME
-     OCIMultiByteStrnDisplayLength - calculate the display length for a
-                                     multibyt string
-   REMARKS
-     This function returns the number of display positions occupied by the 
-     complete characters within the range of n bytes.
-   RETURNS
-     number of display positions.
-   envhp(IN/OUT)
-     OCI environment handle.
-   str(IN)
-     Pointer to a multi-byte string.
-   n(IN)
-     Number of bytes to examine.
-*/
-size_t OCIMultiByteStrnDisplayLength(dvoid *envhp, CONST OraText *str1,
-                                     size_t n);
-
-
-/*---------------------- OCIMultiByteStrCaseConversion  ---------------------*/
-/*
-   NAME
-     OCIMultiByteStrCaseConversion
-   REMARKS
-     This function convert the multi-byte string pointed to by srcstr into the
-     uppercase or lowercase specified by flag and copies the result into the
-     array pointed to by dststr. The result string will be null-terminated.
-   RETURNS
-     number of bytes for result string not including null-terminator.
-   envhp(IN/OUT)
-     OCI environment handle.
-   dststr(OUT)
-     Pointer to destination array.
-   srcstr(IN)
-     Pointer to source string.
-   flag(IN)
-     Specify the case to convert:
-       OCI_NLS_UPPERCASE: convert to uppercase.
-       OCI_NLS_LOWERCASE: convert to lowercase.
-     This flag can be ORed with OCI_NLS_LINGUISTIC to specify that the 
-     linguistic setting in the locale will be used for case conversion.
-*/
-size_t OCIMultiByteStrCaseConversion(dvoid *envhp, OraText *dststr,
-                                     CONST OraText *srcstr, ub4 flag);
-
-
-/*------------------------- OCICharSetToUnicode -----------------------------*/
-/*
-   NAME
-     OCICharSetToUnicode - convert multibyte string into Unicode as UCS2
-   REMARKS
-     This function converts a multi-byte string pointed to by src to Unicode 
-     into the array pointed to by dst. The conversion will stop when it reach
-     to the source limitation or destination limitation. 
-     The function will return number of characters converted into Unicode.
-     If dstlen is zero, it will just return the number of characters for the
-     result without real conversion.
-   RETURNS
-     OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
-   envhp(IN/OUT)
-     Pointer to an OCI environment handle
-   dst(OUT)
-     Pointer to a destination buffer
-   dstlen(IN)
-     Size of destination buffer in character
-   src(IN)
-     Pointer to multi-byte source string.
-   srclen(IN)
-     Size of source string in bytes.
-   rsize(OUT)
-     Number of characters converted.
-     If it is a NULL pointer, nothing to return.
-*/
-sword OCICharSetToUnicode(dvoid *envhp, ub2 *dst, size_t dstlen,
-                          CONST OraText *src, size_t  srclen, size_t *rsize);
-
-
-/*------------------------- OCIUnicodeToCharSet -----------------------------*/
-/*
-   NAME
-     OCIUnicodeToCharSet - convert Unicode into multibyte
-   REMARKS
-     This function converts a Unicode string pointed to by src to multi-byte
-     into the array pointed to by dst. The conversion will stop when it reach
-     to the source limitation or destination limitation. The function will
-     return number of bytes converted into multi-byte. If dstlen is zero, it
-     will just return the number of bytes for the result without real 
-     conversion. If a Unicode character is not convertible for the character
-     set specified in OCI environment handle, a replacement character will be
-     used for it. In this case, OCICharSetConversionIsReplacementUsed() will
-     return ture.
-   RETURNS
-     OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
-   envhp(IN/OUT)
-     Pointer to an OCI environment handle.
-   dst(OUT)
-     Pointer to a destination buffer.
-   dstlen(IN)
-     Size of destination buffer in byte.
-   src(IN)
-     Pointer to a Unicode string.
-   srclen(IN)
-     Size of source string in characters.
-   rsize(OUT)
-     Number of bytes converted.
-     If it is a NULL pointer, nothing to return.
-*/
-sword OCIUnicodeToCharSet(dvoid *envhp, OraText *dst, size_t dstlen, 
-                           CONST ub2 *src, size_t srclen, size_t *rsize);
-
-/*----------------------- OCINlsCharSetConvert ------------------------------*/
-/*
-   NAME
-     OCINlsCharSetConvert - convert between any two character set.
-   REMARKS
-     This function converts a string pointed to by src in the character set
-     specified with srcid to the array pointed to by dst in the character set
-     specified with dstid. The conversion will stop when it reaches the source
-     limitation or destination limitation. The function will return the number
-     of bytes converted into the destination buffer. Even though either source
-     or destination character set id is OCI_UTF16ID, given and return data
-     length will be represented with the byte length as this function is
-     intended for generic purpose. Note the conversion will not stop at null
-     data.
-     To get character set id from name, OCINlsCharSetNameToId can be used.
-     To check if derived data in the destination buffer contains any
-     replacement character resulting from conversion failure,
-     OCICharSetConversionIsReplacementUsed can be used to get the status.
-     Data alignment should be guaranteed by a caller. For example, UTF-16 data
-     should be aligned to ub2 type.
-
-   RETURNS
-     OCI_SUCCESS or OCI_ERROR.
-   errhp(IN/OUT)
-     OCI error handle. If there is an error, it is recorded in errhp and this
-     function returns a NULL pointer. Diagnostic information can be obtained
-     by calling OCIErrorGet().
-   dstid(IN)
-     Character set id for the destination buffer.
-   dstp(OUT)
-     Pointer to the destination buffer.
-   dstlen(IN)
-     The maximum byte size of destination buffer.
-   srcid(IN)
-     Character set id for the source buffer.
-   srcp(IN)
-     Pointer to the source buffer.
-   srclen(IN)
-     The length byte size of source buffer.
-   rsize(OUT)
-     The number of characters converted. If it is a NULL pointer, nothing to
-     return.
-*/
-sword OCINlsCharSetConvert(dvoid *envhp, OCIError *errhp, 
-                        ub2 dstid, dvoid *dstp, size_t dstlen,
-                        ub2 srcid, CONST dvoid *srcp, size_t srclen,
-                        size_t *rsize);
-
-
-/* ------------------- OCICharsetConversionIsReplacementUsed ----------------*/
-/*
-   NAME
-     OCICharsetConversionIsReplacementUsed - chech if replacement is used in 
-                                             conversion
-   REMARKS
-     This function indicates whether or not the replacement character was used
-     for nonconvertible characters in character set conversion in last invoke
-     of OCICharsetUcs2ToMb().
-   RETURNS
-     TRUE is the replacement character was used in last OCICharsetUcs2ToMb()
-     invoking, else FALSE.
-   envhp(IN/OUT)
-     OCI environment handle. This should be the first handle passed to 
-     OCICharsetUcs2ToMb().
-*/
-boolean OCICharSetConversionIsReplacementUsed(dvoid *envhp);
-
-/*------------------- OCINlsEnvironmentVariableGet -----------------*/
-/*
-   NAME
-     OCINlsEnvironmentVariableGet - get a value of NLS environment variable.
-
-   DESCRIPTION
-     This function retrieves a value of NLS environment variable to the buffer
-     pointed to by val. Data type is determined by the parameter specified by
-     item. Either numeric data or string data can be retrieved.
-
-   RETURNS
-     OCI_SUCCESS or OCI_ERROR.
-
-   PARAMETERS
-   valp(OUT) -
-     Pointer to the buffer.
-   size(IN) -
-     Size of the buffer. This argument is only applicable to string data type,
-     but not to numerical data, in such case, it is ignored.
-   item(IN) -
-     NLS item value, which can be one of following values:
-       OCI_NLS_CHARSET_ID  - NLS_LANG character set id in ub2 data type.
-       OCI_NLS_NCHARSET_ID - NLS_NCHAR character set id in ub2 data type.
-   charset(IN) -
-     Character set id for retrieved string data. If it is 0, NLS_LANG will be
-     used. OCI_UTF16ID is a valid id. In case of numeric data, this argument
-     is ignored.
-   rsize(OUT) -
-     Size of return value.
-
-   NOTE
-     This functions is mainly used for retrieving character set id from either
-     NLS_LANG or NLS_NCHAR environment variables. If NLS_LANG is not set,
-     the default character set id is returned.
-     For future extension, the buffer is capable for storing other data types.
-*/
-sword OCINlsEnvironmentVariableGet(dvoid  *valp, size_t size, ub2 item,
-                                   ub2 charset, size_t *rsize);
-
-
-/*------------------------- OCIMessageOpen ----------------------------------*/
-/*
-   NAME
-     OCIMessageOpen - open a locale message file
-   REMARKS
-     This function opens a message handle for facility of product in a language
-     pointed to by envhp. It first try to open the message file corresponding
-     to envhp for the facility. If it successes, it will use that file to
-     initialize a message handle, else it will use the default message file
-     which is for American language for the facility. The function return a
-     pointer pointed to a message handle into msghp parameter.
-   RETURNS
-     OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
-   envhp(IN/OUT)
-     A pointer to OCI environment handle for message language.
-   errhp(IN/OUT)
-     The OCI error handle. If there is an error, it is record in errhp and this
-     function returns a NULL pointer. Diagnostic information can be obtained by
-     calling OCIErrorGet().
-   msghp(OUT)
-     a message handle for return
-   product(IN)
-     A pointer to a product name. Product name is used to locate the directory
-     for message in a system dependent way. For example, in Solaris, the
-     directory of message files for the product `rdbms' is
-     `${ORACLE_HOME}/rdbms'.
-   facility(IN)
-     A pointer to a facility name in the product. It is used to construct a
-     message file name. A message file name follows the conversion with 
-     facility as prefix. For example, the message file name for facility
-     `img' in American language will be `imgus.msb' where `us' is the 
-     abbreviation of American language and `msb' as message binary file 
-     extension.
-   dur(IN)
-     Duration for memory allocation for the return message handle. It can be
-     the following values:
-        OCI_DURATION_CALL
-        OCI_DURATION_STATEMENT
-        OCI_DURATION_SESSION
-        OCI_DURATION_TRANSACTION
-     For the detail description, please refer to Memory Related Service
-     Interfaces section.
-*/
-sword OCIMessageOpen(dvoid *envhp, OCIError *errhp, OCIMsg **msghp,
-                      CONST OraText *product, CONST OraText *facility, 
-                      OCIDuration dur);
- 
-
-/*------------------------- OCIMessageGet -----------------------------------*/
-/*
-   NAME
-     OCIMessageGet - get a locale message from a message handle
-   REMARKS
-     This function will get message with message number identified by msgno and
-     if buflen is not zero, the function will copy the message into the buffer
-     pointed to by msgbuf. If buflen is zero, the message will be copied into
-     a message buffer inside the message handle pointed to by msgh. For both
-     cases. it will return the pointer to the null-terminated message string.
-     If it cannot get the message required, it will return a NULL pointer.
-   RETURNS
-     A pointer to a null-terminated message string on success, otherwise a NULL
-     pointer.
-   msgh(IN/OUT)
-     Pointer to a message handle which was previously opened by
-     OCIMessageOpen().
-   msgno(IN)
-     The message number for getting message.
-   msgbuf(OUT)
-     Pointer to a destination buffer to the message retrieved. If buflen is
-     zero, it can be NULL pointer.
-   buflen(IN)
-     The size of the above destination buffer.
-*/
-OraText *OCIMessageGet(OCIMsg *msgh, ub4 msgno, OraText *msgbuf,
-                       size_t buflen);
-
-/*------------------------- OCIMessageClose ---------------------------------*/
-/*
-   NAME
-     OCIMessageClose - close a message handle
-   REMARKS
-     This function closes a message handle pointed to by msgh and frees any
-     memory associated with this handle.
-   RETURNS
-     OCI_SUCCESS, OCI_INVALID_HANDLE or OCI_ERROR
-   envhp(IN/OUT)
-     A pointer to OCI environment handle for message language.
-   errhp(IN/OUT)
-     The OCI error handle. If there is an error, it is record in errhp and this
-     function returns a NULL pointer. Diagnostic information can be obtained by
-     calling OCIErrorGet().
-   msghp(IN/OUT)
-     A pointer to a message handle which was previously opened by
-     OCIMessageOpen().
-*/
-sword OCIMessageClose(dvoid *envhp, OCIError *errhp, OCIMsg *msghp);
-
-/*--------------- End of Extensions to NLS cartridge service ----------------*/
-
-
-/*----------------- Extensions to OCI Thread interface ---------------------*/
-/*****************************************************************************
-                              DESCRIPTION
-******************************************************************************
-1 Threads Interface
-
-The OCIThread package provides a number of commonly used threading
-primitives for use by Oracle customers.  It offers a portable interface to
-threading capabilities native to various platforms.  It does not implement
-threading on platforms which do not have native threading capability.
-
-OCIThread does not provide a portable implementation of multithreaded 
-facilities.  It only serves as a set of portable covers for native 
-multithreaded facilities.  Therefore, platforms that do not have native 
-support for multi-threading will only be able to support a limited 
-implementation of OCIThread.  As a result, products that rely on all of 
-OCIThread's functionality will not port to all platforms.  Products that must 
-port to all platforms must use only a subset of OCIThread's functionality.  
-This issue is discussed further in later sections of this document.
-
-The OCIThread API is split into four main parts.  Each part is described
-briefly here.  The following subsections describe each in greater detail.
-
- 1. Initialization and Termination Calls
-
-     These calls deal with the initialization and termination of OCIThread.
-     Initialization of OCIThread initializes the OCIThread context which is
-     a member of the OCI environment or session handle.  This context is 
-     required for other OCIThread calls.
-
- 2. Passive Threading Primitives
-
-     The passive threading primitives include primitives to manipulate mutual
-     exclusion (mutex) locks, thread ID's, and thread-specific data keys.
-
-     The reason that these primitives are described as 'passive' is that while
-     their specifications allow for the existence of multiple threads, they do
-     not require it.  This means that it is possible for these primitives to
-     be implemented according to specification in both single-threaded and
-     multi-threaded environments.
-
-     As a result, OCIThread clients that use only these primitives will not
-     require the existence of multiple threads in order to work correctly,
-     i.e., they will be able to work in single-threaded environments without 
-     branching code.
-
- 3. Active Threading Primitives
-
-     Active threading primitives include primitives dealing with the creation,
-     termination, and other manipulation of threads.
-
-     The reason that these primitives are described as 'active' is that they
-     can only be used in true multi-threaded environments.  Their
-     specifications explicitly require that it be possible to have multiple
-     threads.  If you need to determine at runtime whether or not you are in a
-     multi-threaded environment, call OCIThreadIsMulti() before calling an
-     OCIThread active primitive.
-
-
-1.1 Initialization & Termination
-==================================
-
-The types and functions described in this section are associated with the
-initialization and termination of the OCIThread package.  OCIThread must
-be properly initialized before any of its functionality can be used.
-OCIThread's process initialization function, 'OCIThreadProcessInit()',
-must be called with care; see below.
-
-The observed behavior of the initialization and termination functions is the
-same regardless of whether OCIThread is in single-threaded or multi-threaded
-environment.  It is OK to call the initialization functions from both generic
-and operating system specific (OSD) code.
-
-1.1.1 Types
-
-  OCIThreadContext - OCIThread Context
-  -------------------------------------
-
-    Most calls to OCIThread functions take the OCI environment or session 
-    handle as a parameter.  The OCIThread context is part of the OCI 
-    environment or session handle and it must be initialized by calling 
-    'OCIThreadInit()'.  Termination of the OCIThread context occurs by calling
-    'OCIThreadTerm()'.
-
-    The OCIThread context is a private data structure.  Clients must NEVER
-    attempt to examine the contents of the context.
-
-1.1.2  OCIThreadProcessInit
-
-  OCIThreadProcessInit - OCIThread Process INITialization
-  --------------------------------------------------------
-
-    Description
-
-      This function should be called to perform OCIThread process
-      initialization.
-
-    Prototype
-
-      void OCIThreadProcessInit();
-
-    Returns
-
-      Nothing.
-
-    Notes
-
-      Whether or not this function needs to be called depends on how OCI
-      Thread is going to be used.
-
-        * In a single-threaded application, calling this function is optional.
-          If it is called at all, the first call to it must occur before calls
-          to any other OCIThread functions.  Subsequent calls can be made
-          without restriction; they will not have any effect.
-
-        * In a multi-threaded application, this function MUST be called.  The
-          first call to it MUST occur 'strictly before' any other OCIThread
-          calls; i.e., no other calls to OCIThread functions (including other
-          calls to this one) can be concurrent with the first call.
-          Subsequent calls to this function can be made without restriction;
-          they will not have any effect.
-
-
-1.1.3 OCIThreadInit
-
-  OCIThreadInit - OCIThread INITialize
-  -------------------------------------
-
-    Description
-
-      This initializes OCIThread context.
-
-    Prototype
-
-      sword OCIThreadInit(dvoid *hndl, OCIError *err);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      It is illegal for OCIThread clients to try an examine the memory
-      pointed to by the returned pointer.
-
-      It is safe to make concurrent calls to 'OCIThreadInit()'.  Unlike
-      'OCIThreadProcessInit()',  there is no need to have a first call
-      that occurs before all the others.
-
-      The first time 'OCIThreadInit()' is called, it initilaizes the OCI
-      Thread context.  It also saves a pointer to the context in some system
-      dependent manner.  Subsequent calls to 'OCIThreadInit()' will return
-      the same context.
-
-      Each call to 'OCIThreadInit()' must eventually be matched by a call to
-      'OCIThreadTerm()'.
-
-  OCIThreadTerm - OCIThread TERMinate
-  ------------------------------------
-
-    Description
-
-      This should be called to release the OCIThread context.  It should be
-      called exactly once for each call made to 'OCIThreadInit()'.
-
-    Prototype
-
-      sword OCIThreadTerm(dvoid *hndl, OCIError *err);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      It is safe to make concurrent calls to 'OCIThreadTerm()'.
-
-      'OCIThreadTerm()' will not do anything until it has been called as
-      many times as 'OCIThreadInit()' has been called.  When that happens,
-      it terminates the OCIThread layer and frees the memory allocated for
-      the context.  Once this happens, the context should not be re-used.
-      It will be necessary to obtain a new one by calling 'OCIThreadInit()'.
-
-
-  OCIThreadIsMulti - OCIThread Is Multi-Threaded?
-  ------------------------------------------------
-
-    Description
-
-      This tells the caller whether the application is running in a
-      multi-threaded environment or a single-threaded environment.
-
-    Prototype
-      boolean OCIThreadIsMulti(void);
-
-    Returns
-
-      TRUE if the environment is multi-threaded;
-      FALSE if the environment is single-threaded.
-
-
-1.2 Passive Threading Primitives
-==================================
-
-1.2.1 Types
-
-The passive threading primitives deal with the manipulation of mutex, 
-thread ID's, and thread-specific data.  Since the specifications of these 
-primitives do not require the existence of multiple threads, they can be 
-used both on multithreaded and single-threaded platforms.
-
-1.2.1.1  OCIThreadMutex - OCIThread Mutual Exclusion Lock
------------------------------------------------------------
-
-  The type 'OCIThreadMutex' is used to represent a mutual exclusion lock
-  (mutex).  A mutex is typically used for one of two purposes: (i) to
-  ensure that only one thread accesses a given set of data at a time, or
-  (ii) to ensure that only one thread executes a given critical section of
-  code at a time.
-
-  Mutexes pointer can be declared as parts of client structures or as 
-  stand-alone variables.  Before they can be used, they must be initialized 
-  using 'OCIThreadMutexInit()'.  Once they are no longer needed, they must be
-  destroyed using 'OCIThreadMutexDestroy()'.  A mutex pointer must NOT be 
-  used after it is destroyed.
-
-  A thread can acquire a mutex by using either 'OCIThreadMutexAcquire()' or
-  'OCIThreadMutexTry()'.  They both ensure that only one thread at a time is
-  allowed to hold a given mutex.  A thread that holds a mutex can release it
-  by calling 'OCIThreadMutexRelease()'.
-
-
-1.2.1.2  OCIThreadKey - OCIThread Key for Thread-Specific Data
-----------------------------------------------------------------
-
-  A key can be thought of as a process-wide variable that has a
-  thread-specific value.  What this means is that all the threads in a
-  process can use any given key.  However, each thread can examine or modify
-  that key independently of the other threads.  The value that a thread sees
-  when it examines the key will always be the same as the value that it last
-  set for the key.  It will not see any values set for the key by the other
-  threads.
-
-  The type of the value held by a key is a 'dvoid *' generic pointer.
-
-  Keys can be created using 'OCIThreadKeyInit()'.  When a key is created, its
-  value is initialized to 'NULL' for all threads.
-
-  A thread can set a key's value using 'OCIThreadKeySet()'.  A thread can
-  get a key's value using 'OCIThreadKeyGet()'.
-
-  The OCIThread key functions will save and retrieve data SPECIFIC TO THE
-  THREAD.  When clients maintain a pool of threads and assign the threads to
-  different tasks, it *may not* be appropriate for a task to use OCIThread
-  key functions to save data associated with it.  Here is a scenario of how
-  things can fail: A thread is assigned to execute the initialization of a
-  task.  During the initialization, the task stored some data related to it
-  in the thread using OCIThread key functions.  After the initialization,
-  the thread is returned back to the threads pool.  Later, the threads pool
-  manager assigned another thread to perform some operations on the task,
-  and the task needs to retrieve those data it stored earlier in
-  initialization.  Since the task is running in another thread, it will not
-  be able to retrieve the same data back!  Applications that use thread
-  pools should be aware of this and be cautious when using OCIThread key
-  functions.
-
-
-1.2.1.3  OCIThreadKeyDestFunc - OCIThread Key Destructor Function Type
-------------------------------------------------------------------------
-
-  This is the type of a pointer to a key's destructor routine.  Keys can be
-  associated with a destructor routine when they are created (see
-  'OCIThreadKeyInit()').
-
-  A key's destructor routine will be called whenever a thread that has a
-  non-NULL value for the key terminates.
-
-  The destructor routine returns nothing and takes one parameter.  The
-  parameter will be the value that was set for key when the thread
-  terminated.
-
-  The destructor routine is guaranteed to be called on a thread's value
-  in the key after the termination of the thread and before process
-  termination.  No more precise guarantee can be made about the timing
-  of the destructor routine call; thus no code in the process may assume
-  any post-condition of the destructor routine.  In particular, the
-  destructor is not guaranteed to execute before a join call on the
-  terminated thread returns.
-
-
-1.2.1.4  OCIThreadId - OCIThread Thread ID
---------------------------------------------
-
-  Type 'OCIThreadId' is the type that will be used to identify a thread.
-  At any given time, no two threads will ever have the same 'OCIThreadId'.
-  However, 'OCIThreadId' values can be recycled; i.e., once a thread dies,
-  a new thread may be created that has the same 'OCIThreadId' as the one
-  that died.  In particular, the thread ID must uniquely identify a thread
-  T within a process, and it must be consistent and valid in all threads U
-  of the process for which it can be guaranteed that T is running
-  concurrently with U.  The thread ID for a thread T must be retrievable
-  within thread T.  This will be done via OCIThreadIdGet().
-
-  The 'OCIThreadId' type supports the concept of a NULL thread ID: the NULL
-  thread ID will never be the same as the ID of an actual thread.
-
-
-
-1.2.2 Function prototypes for passive primitives
---------------------------------------------------
-
-1.2.2.1 Mutex functions
--------------------------
-
-  OCIThreadMutexInit - OCIThread MuteX Initialize
-  -----------------------------------------------
-
-    Description
-
-      This allocate and initializes a mutex.  All mutexes must be 
-      initialized prior to use.
-
-    Prototype
-
-      sword OCIThreadMutexInit(dvoid *hndl, OCIError *err, 
-                               OCIThreadMutex **mutex);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        mutex(OUT):  The mutex to initialize.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      Multiple threads must not initialize the same mutex simultaneously.
-      Also, a mutex must not be reinitialized until it has been destroyed (see
-      'OCIThreadMutexDestroy()').
-
-  OCIThreadMutexDestroy - OCIThread MuteX Destroy
-  -----------------------------------------------
-
-    Description
-
-      This destroys and deallocate a mutex.  Each mutex must be destroyed 
-      once it is no longer needed.
-
-    Prototype
-
-      sword OCIThreadMutexDestroy(dvoid *hndl, OCIError *err,
-                                  OCIThreadMutex **mutex);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        mutex(IN/OUT):   The mutex to destroy.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      It is not legal to destroy a mutex that is uninitialized or is currently
-      held by a thread.  The destruction of a mutex must not occur concurrently
-      with any other operations on the mutex.  A mutex must not be used after
-      it has been destroyed.
-
-
-  OCIThreadMutexAcquire - OCIThread MuteX Acquire
-  -----------------------------------------------
-
-    Description
-
-      This acquires a mutex for the thread in which it is called.  If the mutex
-      is held by another thread, the calling thread is blocked until it can
-      acquire the mutex.
-
-    Prototype
-
-     sword OCIThreadMutexAcquire(dvoid *hndl, OCIError *err,
-                                 OCIThreadMutex *mutex);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error, it is 
-                     recorded in err and this function returns OCI_ERROR.  
-                     Diagnostic information can be obtained by calling 
-                     OCIErrorGet().
-
-        mutex(IN/OUT):   The mutex to acquire.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      It is illegal to attempt to acquire an uninitialized mutex.
-
-      This function's behavior is undefined if it is used by a thread to
-      acquire a mutex that is already held by that thread.
-
-
-
-  OCIThreadMutexRelease - OCIThread MuteX Release
-  -----------------------------------------------
-
-    Description
-
-      This releases a mutex.  If there are any threads blocked on the mutex,
-      one of them will acquire it and become unblocked.
-
-    Prototype
-
-      sword OCIThreadMutexRelease(dvoid *hndl, OCIError *err,
-                                  OCIThreadMutex *mutex);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        mutex(IN/OUT):   The mutex to release.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      It is illegal to attempt to release an uninitialized mutex.  It is also
-      illegal for a thread to release a mutex that it does not hold.
-
-
-  OCIThreadKeyInit - OCIThread KeY Initialize
-  -------------------------------------------
-
-    Description
-
-      This creates a key.  Each call to this routine allocate and generates 
-      a new key that is distinct from all other keys.
-
-    Prototype
-
-      sword OCIThreadKeyInit(dvoid *hndl, OCIError *err, OCIThreadKey **key,
-                             OCIThreadKeyDestFunc destFn);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        key(OUT):    The 'OCIThreadKey' in which to create the new key.
-
-        destFn(IN):  The destructor for the key.  NULL is permitted.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      Once this function executes successfully, a pointer to an allocated and 
-      initialized key is return.  That key can be used with 'OCIThreadKeyGet()'
-      and 'OCIThreadKeySet()'.  The initial value of the key will be 'NULL' for
-      all threads.
-
-      It is illegal for this function to be called more than once to create the
-      same key (i.e., to be called more than once with the same value for the
-      'key' parameter).
-
-      If the 'destFn' parameter is not NULL, the routine pointed to by 'destFn'
-      will be called whenever a thread that has a non-NULL value for the key
-      terminates.  The routine will be called with one parameter.  The
-      parameter will be the key's value for the thread at the time at which the
-      thread terminated.
-      If the key does not need a destructor function, pass NULL for 'destFn'.
-
-
-  OCIThreadKeyDestroy - OCIThread KeY DESTROY
-  -------------------------------------------
-
-   Description
-
-     Destroy and deallocate the key pointed to by 'key'.
-
-    Prototype
-
-      sword OCIThreadKeyDestroy(dvoid *hndl, OCIError *err, 
-                                OCIThreadKey **key);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        key(IN/OUT):  The 'OCIThreadKey' in which to destroy the key.
- 
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      This is different from the destructor function callback passed to the
-      key create routine.  This new destroy function 'OCIThreadKeyDestroy' is 
-      used to terminate any resources OCI THREAD acquired when it created 
-      'key'.  [The 'OCIThreadKeyDestFunc' callback type is a key VALUE 
-      destructor; it does in no way operate on the key itself.]
-
-      This must be called once the user has finished using the key.  Not
-      calling the key destroy function may result in memory leaks.
-
-
-
-
-1.2.2.2 Thread Key operations
--------------------------------
-
-  OCIThreadKeyGet - OCIThread KeY Get value
-  -----------------------------------------
-
-    Description
-
-      This gets the calling thread's current value for a key.
-
-    Prototype
-
-      sword OCIThreadKeyGet(dvoid *hndl, OCIError *err, OCIThreadKey *key,
-                            dvoid **pValue);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        key(IN):          The key.
-
-        pValue(IN/OUT):   The location in which to place the thread-specific
-                          key value.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      It is illegal to use this function on a key that has not been created
-      using 'OCIThreadKeyInit()'.
-
-      If the calling thread has not yet assigned a value to the key, 'NULL' is
-      placed in the location pointed to by 'pValue'.
-
-
-  OCIThreadKeySet - OCIThread KeY Set value
-  -----------------------------------------
-
-    Description
-
-      This sets the calling thread's value for a key.
-
-    Prototype
-
-      sword OCIThreadKeySet(dvoid *hndl, OCIError *err, OCIThreadKey *key,
-                            dvoid *value);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        key(IN/OUT): The key.
-
-        value(IN):   The thread-specific value to set in the key.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      It is illegal to use this function on a key that has not been created
-      using 'OCIThreadKeyInit()'.
-
-1.2.2.3  Thread Id
---------------------
-
-  OCIThreadIdInit - OCIThread Thread Id INITialize
-  --------------------------------------------------
-
-    Description
-
-      Allocate and initialize the thread id 'tid'.
-
-    Prototype
-
-      sword OCIThreadIdInit(dvoid *hndl, OCIError *err, OCIThreadId **tid);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        tid (OUT):   Pointer to the thread ID to initialize.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-
-  OCIThreadIdDestroy - OCIThread Thread Id DESTROY
-  --------------------------------------------------
-
-    Description
-
-      Destroy and deallocate the thread id 'tid'.
-
-    Prototype
-
-      sword OCIThreadIdDestroy(dvoid *hndl, OCIError *err, OCIThreadId **tid);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        tid(IN/OUT):        Pointer to the thread ID to destroy.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Note
-
-      'tid' should be initialized by OCIThreadIdInit().
-
-
-  OCIThreadIdSet - OCIThread Thread Id Set
-  -----------------------------------------
-
-    Description
-
-      This sets one 'OCIThreadId' to another.
-
-    Prototype
-
-      sword OCIThreadIdSet(dvoid *hndl, OCIError *err, 
-                           OCIThreadId *tidDest,
-                           OCIThreadId *tidSrc);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        tidDest(OUT):   This should point to the location of the 'OCIThreadId'
-                        to be set to.
-
-        tidSrc(IN):     This should point to the 'OCIThreadId' to set from.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      'tid' should be initialized by OCIThreadIdInit().
-
-
-  OCIThreadIdSetNull - OCIThread Thread Id Set Null
-  ---------------------------------------------------------
-
-    Description
-
-      This sets the NULL thread ID to a given 'OCIThreadId'.
-
-    Prototype
-
-      sword OCIThreadIdSetNull(dvoid *hndl, OCIError *err,
-                               OCIThreadId *tid);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error, it is 
-                     recorded in err and this function returns OCI_ERROR.  
-                     Diagnostic information can be obtained by calling 
-                     OCIErrorGet().
-
-        tid(OUT):    This should point to the 'OCIThreadId' in which to put
-                     the NULL thread ID.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      'tid' should be initialized by OCIThreadIdInit().
-
-
-  OCIThreadIdGet - OCIThread Thread Id Get
-  ------------------------------------------
-
-    Description
-
-      This retrieves the 'OCIThreadId' of the thread in which it is called.
-
-    Prototype
-
-      sword OCIThreadIdGet(dvoid *hndl, OCIError *err,
-                           OCIThreadId *tid);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        tid(OUT):    This should point to the location in which to place the
-                     ID of the calling thread.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      'tid' should be initialized by OCIThreadIdInit().
-
-      When OCIThread is used in a single-threaded environment,
-      OCIThreadIdGet() will always place the same value in the location
-      pointed to by 'tid'.  The exact value itself is not important.  The
-      important thing is that it is not the same as the NULL thread ID and
-      that it is always the same value.
-
-
-  OCIThreadIdSame - OCIThread Thread Ids Same?
-  ----------------------------------------------
-
-    Description
-
-      This determines whether or not two 'OCIThreadId's represent the same
-      thread.
-
-    Prototype
-
-      sword OCIThreadIdSame(dvoid *hndl, OCIError *err,
-                            OCIThreadId *tid1, OCIThreadId *tid2,
-                            boolean *result);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        tid1(IN):   Pointer to the first 'OCIThreadId'.
-
-        tid2(IN):   Pointer to the second 'OCIThreadId'.
-	
-	result(IN/OUT): Pointer to the result.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      If 'tid1' and 'tid2' represent the same thread, 'result' is set to TRUE.
-      Otherwise, 'result' is set to FALSE.
-
-      'result' is set to TRUE if both 'tid1' and 'tid2' are the NULL thread ID.
-
-      'ti1d' and 'tid2' should be initialized by OCIThreadIdInit().
-
-
-  OCIThreadIdNull - OCIThread Thread Id NULL?
-  ---------------------------------------------
-
-    Description
-
-      This determines whether or not a given 'OCIThreadId' is the NULL thread
-      ID.
-
-    Prototype
-
-      sword OCIThreadIdNull(dvoid *hndl, OCIError *err,
-                            OCIThreadId *tid,
-                            boolean *result);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        tid(IN):    Pointer to the 'OCIThreadId' to check.
-
-	result(IN/OUT): Pointer to the result.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      If 'tid' is the NULL thread ID, 'result' is set to TRUE.  Otherwise, 
-      'result' is set to FALSE.
-
-      'tid' should be initialized by OCIThreadIdInit().
-
-
-1.3 Active Threading Primitives
-=================================
-
-The active threading primitives deal with the manipulation of actual
-threads.  Because the specifications of most of these primitives require
-that it be possible to have multiple threads, they work correctly only in
-the enabled OCIThread; In the disabled OCIThread, they always return
-failure.  The exception is OCIThreadHandleGet(); it may be called in a 
-single-threaded environment, in which case it will have no effect.
-
-Active primitives should only be called by code running in a multi-threaded
-environment.  You can call OCIThreadIsMulti() to determine whether the 
-environment is multi-threaded or single-threaded.
-
-
-1.3.1  Types
---------------
-
-1.3.1.1    OCIThreadHandle - OCIThread Thread Handle
-------------------------------------------------------
-
-  Type 'OCIThreadHandle' is used to manipulate a thread in the active
-  primitives:  OCIThreadJoin()and OCIThreadClose().  A thread handle opened by
-  OCIThreadCreate() must be closed in a matching call to
-  OCIThreadClose().  A thread handle is invalid after the call to
-  OCIThreadClose().
-
-  The distinction between a thread ID and a thread handle in OCIThread usage
-  follows the distinction between the thread ID and the thread handle on
-  Windows NT.  On many platforms, the underlying native types are the same.
-
-
-1.3.2  Functions
-------------------
-
-  OCIThreadHndInit - OCIThread HaNDle Initialize
-  ----------------------------------------------
-
-    Description
-
-      Allocate and initialize the thread handle.
-
-    Prototype
-
-      sword OCIThreadHndInit(dvoid *hndl, OCIError *err, 
-                             OCIThreadHandle **thnd);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        thnd(OUT):   The address of pointer to the thread handle to initialize.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-
-  OCIThreadHndDestroy - OCIThread HaNDle Destroy
-  ----------------------------------------------
-
-    Description
-
-      Destroy and deallocate the thread handle.
-
-    Prototype
-
-      sword OCIThreadHndDestroy(dvoid *hndl, OCIError *err, 
-                                OCIThreadHandle **thnd);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        thnd(IN/OUT):  The address of pointer to the thread handle to destroy.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      'thnd' should be initialized by OCIThreadHndInit().
-
-
-  OCIThreadCreate - OCIThread Thread Create
-  -----------------------------------------
-
-    Description
-
-      This creates a new thread.
-
-    Prototype
-
-      sword OCIThreadCreate(dvoid *hndl, OCIError *err,
-                            void (*start)(dvoid *), dvoid *arg,
-                            OCIThreadId *tid, OCIThreadHandle *tHnd);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        start(IN):    The function in which the new thread should begin
-                      execution.
-
-        arg(IN):      The argument to give the function pointed to by 'start'.
-
-        tid(IN/OUT):  If not NULL, gets the ID for the new thread.
-
-        tHnd(IN/OUT): If not NULL, gets the handle for the new thread.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      The new thread will start by executing a call to the function pointed
-      to by 'start' with the argument given by 'arg'.  When that function
-      returns, the new thread will terminate.  The function should not
-      return a value and should accept one parameter, a 'dvoid *'.
-
-      The call to OCIThreadCreate() must be matched by a call to
-      OCIThreadClose() if and only if tHnd is non-NULL.
-
-      If tHnd is NULL, a thread ID placed in *tid will not be valid in the
-      calling thread because the timing of the spawned thread's termination
-      is unknown.
-
-      'tid' should be initialized by OCIThreadIdInit().
-
-      'thnd' should be initialized by OCIThreadHndInit().
-
-
-
-  OCIThreadJoin - OCIThread Thread Join
-  -------------------------------------
-
-    Description
-
-      This function allows the calling thread to 'join' with another thread.
-      It blocks the caller until the specified thread terminates.
-
-    Prototype
-
-      sword OCIThreadJoin(dvoid *hndl, OCIError *err, OCIThreadHandle *tHnd);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        tHnd(IN):    The 'OCIThreadHandle' of the thread to join with.
-
-    Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      'thnd' should be initialized by OCIThreadHndInit().
-
-      The result of multiple threads all trying to join with the same thread is
-      undefined.
-
-
-  OCIThreadClose - OCIThread Thread Close
-  ---------------------------------------
-
-   Description
-
-     This function should be called to close a thread handle.
-
-   Prototype
-
-     sword OCIThreadClose(dvoid *hndl, OCIError *err, OCIThreadHandle *tHnd);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        tHnd(IN/OUT):    The OCIThread thread handle to close.
-
-   Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-   Notes
-
-      'thnd' should be initialized by OCIThreadHndInit().
-
-      Both thread handle and the thread ID that was returned by the same call
-      to OCIThreadCreate() are invalid after the call to OCIThreadClose().
-
-
-
-  OCIThreadHandleGet - OCIThread Thread Get Handle
-  ------------------------------------------------
-
-    Description
-
-      Retrieve the 'OCIThreadHandle' of the thread in which it is called.
-
-    Prototype
-
-      sword OCIThreadHandleGet(dvoid *hndl, OCIError *err,
-                               OCIThreadHandle *tHnd);
-
-        hndl(IN/OUT): The OCI environment or session handle.
-
-        err(IN/OUT): The OCI error handle.  If there is an error and OCI_ERROR
-                     is returned, the error is recorded in err and diagnostic 
-                     information can be obtained by calling OCIErrorGet().
-
-        tHnd(IN/OUT):      If not NULL, the location to place the thread
-                           handle for the thread.
-
-     Returns
-
-      OCI_SUCCESS, OCI_ERROR or OCI_INVALID_HANDLE.
-
-    Notes
-
-      'thnd' should be initialized by OCIThreadHndInit().   
-
-      The thread handle 'tHnd' retrieved by this function must be closed 
-      with OCIThreadClose() and destroyed by OCIThreadHndDestroy() after it
-      is used.
-
-
-
-
-1.4 Using OCIThread
-=====================
-
-This section summarizes some of the more important details relating to the use
-of OCIThread.
-
-  * Process initialization
-
-    OCIThread only requires that the process initialization function
-    ('OCIThreadProcessInit()') be called when OCIThread is being used in a
-    multi-threaded application.  Failing to call 'OCIThreadProcessInit()' in
-    a single-threaded application is not an error.
-
-  * OCIThread initialization
-
-    Separate calls to 'OCIThreadInit()' will all return the same OCIThread
-    context.
-
-    Also, remember that each call to 'OCIThreadInit()' must eventually be
-    matched by a call to 'OCIThreadTerm()'.
-
-  * Active vs. Passive Threading primitives
-
-    OCIThread client code written without using any active primitives can be
-    compiled and used without change on both single-threaded and
-    multi-threaded platforms.
-
-    OCIThread client code written using active primitives will only work
-    correctly on multi-threaded platforms.  In order to write a version of the
-    same application to run on single-threaded platform, it is necessary to 
-    branch the your code, whether by branching versions of the source file or 
-    by branching at runtime with the OCIThreadIsMulti() call.
-
-******************************************************************************/
-
-/*****************************************************************************
-                         ACTUAL PROTOTYPE DECLARATIONS
-******************************************************************************/
-
-void OCIThreadProcessInit();
-
-sword OCIThreadInit(dvoid *hndl, OCIError *err);
-
-sword OCIThreadTerm(dvoid *hndl, OCIError *err);
-
-boolean OCIThreadIsMulti();
-
-sword OCIThreadMutexInit(dvoid *hndl, OCIError *err,  
-                         OCIThreadMutex **mutex); 
-
-sword OCIThreadMutexDestroy(dvoid *hndl, OCIError *err, 
-                            OCIThreadMutex **mutex);
-
-sword OCIThreadMutexAcquire(dvoid *hndl, OCIError *err,
-                            OCIThreadMutex *mutex);
-
-sword OCIThreadMutexRelease(dvoid *hndl, OCIError *err,
-                            OCIThreadMutex *mutex);
-
-sword OCIThreadKeyInit(dvoid *hndl, OCIError *err, OCIThreadKey **key,
-                       OCIThreadKeyDestFunc destFn);
-
-sword OCIThreadKeyDestroy(dvoid *hndl, OCIError *err, 
-                          OCIThreadKey **key);
-
-sword OCIThreadKeyGet(dvoid *hndl, OCIError *err, OCIThreadKey *key,
-                      dvoid **pValue);
-
-sword OCIThreadKeySet(dvoid *hndl, OCIError *err, OCIThreadKey *key,
-                      dvoid *value);
-
-sword OCIThreadIdInit(dvoid *hndl, OCIError *err, OCIThreadId **tid);
-
-sword OCIThreadIdDestroy(dvoid *hndl, OCIError *err, OCIThreadId **tid);
-
-sword OCIThreadIdSet(dvoid *hndl, OCIError *err, 
-                     OCIThreadId *tidDest, OCIThreadId *tidSrc);
-
-sword OCIThreadIdSetNull(dvoid *hndl, OCIError *err, OCIThreadId *tid);
-
-sword OCIThreadIdGet(dvoid *hndl, OCIError *err, OCIThreadId *tid);
-
-sword OCIThreadIdSame(dvoid *hndl, OCIError *err,
-                      OCIThreadId *tid1, OCIThreadId *tid2,
-                      boolean *result);
-
-sword OCIThreadIdNull(dvoid *hndl, OCIError *err,
-                      OCIThreadId *tid, boolean *result);
-
-sword OCIThreadHndInit(dvoid *hndl, OCIError *err, OCIThreadHandle **thnd);
-
-sword OCIThreadHndDestroy(dvoid *hndl, OCIError *err, OCIThreadHandle **thnd);
-
-sword OCIThreadCreate(dvoid *hndl, OCIError *err,
-                      void (*start)(dvoid *), dvoid *arg,
-                      OCIThreadId *tid, OCIThreadHandle *tHnd);
-
-sword OCIThreadJoin(dvoid *hndl, OCIError *err, OCIThreadHandle *tHnd);
-
-sword OCIThreadClose(dvoid *hndl, OCIError *err, OCIThreadHandle *tHnd);
-
-sword OCIThreadHandleGet(dvoid *hndl, OCIError *err, OCIThreadHandle *tHnd);
-/*----------------- End OCI Thread interface Extensions ---------------------*/
-
-/*--------------- Begin OCI Client Notification Interfaces ------------------*/
-
-typedef ub4 (*OCISubscriptionNotify)(dvoid *ctx, OCISubscription *subscrhp, 
-				     dvoid *pay, ub4 payl, 
-				     dvoid *desc, ub4 mode);
-
-sword OCISubscriptionRegister(OCISvcCtx *svchp, OCISubscription **subscrhpp, 
-			      ub2 count, OCIError *errhp, ub4 mode);
-
-
-sword OCISubscriptionPost(OCISvcCtx *svchp, OCISubscription **subscrhpp, 
-			      ub2 count, OCIError *errhp, ub4 mode);
-
-sword OCISubscriptionUnRegister(OCISvcCtx *svchp, OCISubscription *subscrhp, 
-			      OCIError *errhp, ub4 mode);
-
-sword OCISubscriptionDisable(OCISubscription *subscrhp, 
-			   OCIError *errhp, ub4 mode);
-
-sword OCISubscriptionEnable(OCISubscription *subscrhp, 
-			  OCIError *errhp, ub4 mode);
-
-/*------------------- End OCI Publish/Subscribe Interfaces ------------------*/
-
-/*----------------- Extensions to Datetime interfaces -----------------------*/
-/*--------------------- Actual Prototypes -----------------------------------*/
-sword OCIDateTimeGetTime(dvoid *hndl, OCIError *err, OCIDateTime *datetime, 
-			 ub1 *hr, ub1 *mm, ub1 *ss, ub4 *fsec);
-
-sword OCIDateTimeGetDate(dvoid *hndl, OCIError *err,  CONST OCIDateTime *date, 
-		 sb2 *yr, ub1 *mnth, ub1 *dy );
-
-sword OCIDateTimeGetTimeZoneOffset(dvoid *hndl,OCIError *err,
-		  CONST OCIDateTime   *datetime,sb1 *hr,sb1 *mm);
-
-sword OCIDateTimeConstruct(dvoid  *hndl,OCIError *err,OCIDateTime *datetime,
-               sb2 yr,ub1 mnth,ub1 dy,ub1 hr,ub1 mm,ub1 ss,ub4 fsec,
-               OraText  *timezone,size_t timezone_length);
-
-sword OCIDateTimeSysTimeStamp(dvoid *hndl, OCIError *err, 
-			      OCIDateTime *sys_date );
-
-sword OCIDateTimeAssign(dvoid *hndl, OCIError *err, CONST OCIDateTime *from, 
-		       OCIDateTime *to);
-
-sword OCIDateTimeToText(dvoid *hndl, OCIError *err, CONST OCIDateTime *date, 
-                        CONST OraText *fmt, ub1 fmt_length, ub1 fsprec, 
-                        CONST OraText *lang_name, size_t lang_length, 
-                        ub4 *buf_size, OraText *buf );
-
-sword OCIDateTimeFromText(dvoid *hndl, OCIError *err, CONST OraText *date_str, 
-             size_t dstr_length, CONST OraText *fmt, ub1 fmt_length,
-             CONST OraText *lang_name, size_t lang_length, OCIDateTime *date );
-
-sword OCIDateTimeCompare(dvoid *hndl, OCIError *err, CONST OCIDateTime *date1, 
-                     CONST OCIDateTime *date2,  sword *result );
-
-sword OCIDateTimeCheck(dvoid *hndl, OCIError *err, CONST OCIDateTime *date, 
-		 ub4 *valid );
-
-sword OCIDateTimeConvert(dvoid *hndl, OCIError *err, OCIDateTime *indate,
-				OCIDateTime *outdate);
-
-sword OCIDateTimeSubtract(dvoid *hndl, OCIError *err, OCIDateTime *indate1, 
-		OCIDateTime *indate2,	 OCIInterval *inter);
-
-sword OCIDateTimeIntervalAdd(dvoid *hndl, OCIError *err, OCIDateTime *datetime,
-	 OCIInterval *inter, OCIDateTime *outdatetime);
-
-sword OCIDateTimeIntervalSub(dvoid *hndl, OCIError *err, OCIDateTime *datetime,
-	 OCIInterval *inter, OCIDateTime *outdatetime);
-
-sword OCIIntervalSubtract(dvoid *hndl, OCIError *err, OCIInterval *minuend, 
-			    OCIInterval *subtrahend, OCIInterval *result );
-
-sword OCIIntervalAdd(dvoid *hndl, OCIError *err, OCIInterval *addend1, 
-			OCIInterval *addend2, OCIInterval *result );
-
-sword OCIIntervalMultiply(dvoid *hndl, OCIError *err, CONST OCIInterval *inter,
-			OCINumber *nfactor, OCIInterval *result );
-
-sword OCIIntervalDivide(dvoid *hndl, OCIError *err, OCIInterval *dividend, 
-		OCINumber *divisor, OCIInterval *result );
-
-sword OCIIntervalCompare(dvoid *hndl, OCIError *err, OCIInterval *inter1, 
-			OCIInterval *inter2, sword *result );
-
-sword OCIIntervalFromNumber(dvoid *hndl, OCIError *err, OCIInterval *inter, 
-			OCINumber *number);
-
-sword OCIIntervalFromText( dvoid *hndl, OCIError *err, CONST OraText *inpstr, 
-		size_t str_len, OCIInterval *result );
-
-sword OCIIntervalToText( dvoid *hndl, OCIError *err, CONST OCIInterval *inter,
-                         ub1 lfprec, ub1 fsprec, 
-			OraText *buffer, size_t buflen, size_t *resultlen );
-
-sword OCIIntervalToNumber(dvoid *hndl, OCIError *err,CONST OCIInterval *inter, 
-			OCINumber *number);
-
-sword OCIIntervalCheck(dvoid *hndl, OCIError *err, CONST OCIInterval *interval,
-			 ub4 *valid );
-
-sword OCIIntervalAssign(dvoid *hndl, OCIError *err, CONST OCIInterval *ininter,
-			OCIInterval *outinter );
-
-sword OCIIntervalSetYearMonth(dvoid *hndl, OCIError *err, sb4 yr, sb4 mnth,
-                        OCIInterval *result );
-
-sword OCIIntervalGetYearMonth(dvoid *hndl, OCIError *err, sb4 *yr, sb4 *mnth,
-                        CONST OCIInterval *result );
-
-sword OCIIntervalSetDaySecond(dvoid *hndl, OCIError *err, sb4 dy, sb4 hr,
-                        sb4 mm, sb4 ss, sb4 fsec, OCIInterval *result );
-
-sword OCIIntervalGetDaySecond(dvoid *hndl, OCIError *err, sb4 *dy, sb4 *hr,
-                     sb4 *mm, sb4 *ss, sb4 *fsec, CONST OCIInterval *result );
-
-sword OCIDateTimeToArray(dvoid *hndl, OCIError *err,
-                         CONST OCIDateTime *datetime, CONST OCIInterval *reftz,
-                         ub1 *outarray, ub4 *len, ub1 fsprec);
-
-sword OCIDateTimeFromArray(dvoid *hndl, OCIError *err, ub1 *inarray, ub4 len,
-                           ub1 type, OCIDateTime *datetime,
-                           CONST OCIInterval *reftz, ub1 fsprec);
-
-sword OCIDateTimeGetTimeZoneName(dvoid *hndl, OCIError *err,
-                                 CONST OCIDateTime *datetime, 
-                                 ub1 *buf, ub4 *buflen);
-
-sword OCIIntervalFromTZ(dvoid *hndl, OCIError *err, CONST oratext *inpstring,
-                        size_t str_len, OCIInterval *result);
-
-/*----------------- End Datetime interface Extensions -----------------------*/
-
-/*----------------- Connection Pooling prototypes ---------------------------*/
-sword OCIConnectionPoolCreate(OCIEnv *envhp, OCIError *errhp, OCICPool *poolhp,
-                              OraText **poolName, sb4 *poolNameLen,  
-                              CONST OraText *dblink, sb4 dblinkLen,
-                              ub4 connMin, ub4 connMax, ub4 connIncr,
-                              CONST OraText *poolUserName, sb4 poolUserLen,
-                              CONST OraText *poolPassword, sb4 poolPassLen,
-                              ub4 mode);
-
-sword OCIConnectionPoolDestroy(OCICPool *poolhp,
-                               OCIError *errhp, ub4 mode);
-
-/*----------------- End Connection Pooling prototypes -----------------------*/
-
-/*-------------------- Session Pooling prototypes ---------------------------*/
-
-sword OCISessionPoolCreate (OCIEnv *envhp, OCIError *errhp, OCISPool *spoolhp, 
-                            OraText **poolName, ub4 *poolNameLen, 
-                            CONST OraText *connStr, ub4 connStrLen,
-                            ub4 sessMin, ub4 sessMax, ub4 sessIncr,
-                            OraText *userid, ub4 useridLen,
-                            OraText *password, ub4 passwordLen,
-                            ub4 mode);
-                                                  
-sword OCISessionPoolDestroy (OCISPool *spoolhp,
-                             OCIError *errhp,
-                             ub4 mode);
-                             
-sword OCISessionGet (OCIEnv *envhp, OCIError *errhp, OCISvcCtx **svchp,
-                     OCIAuthInfo *authhp,
-                     OraText *poolName, ub4 poolName_len, 
-                     CONST OraText *tagInfo, ub4 tagInfo_len,
-                     OraText **retTagInfo, ub4 *retTagInfo_len,
-                     boolean *found, ub4 mode);
-
-sword OCISessionRelease (OCISvcCtx *svchp, OCIError *errhp,
-                         OraText *tag, ub4 tag_len,
-                         ub4 mode);
-
-/*-------------------- End Session Pooling prototypes -----------------------*/
-
-sword  OCIXMLTypeNew(OCISvcCtx *svchp, OCIError *errhp, OCIDuration dur,
-                     OraText *elname, ub4 elname_Len,
-                     OraText *schemaURL, ub4 schemaURL_Len,
-                     OCIXMLType **retInstance);
-
-sword  OCIXMLTypeCreateFromSrc(OCISvcCtx *svchp, OCIError *errhp,
-                     OCIDuration dur, ub1 src_type, dvoid *src_ptr,
-                     sb4 ind, OCIXMLType **retInstance);
-
-sword OCIXMLTypeExtract(OCIError *errhp,
-              OCIXMLType *doc, OCIDuration dur,
-              OraText *xpathexpr, ub4 xpathexpr_Len,
-              OraText *nsmap, ub4 nsmap_Len,
-              OCIXMLType **retDoc);
-
-sword OCIXMLTypeTransform(OCIError *errhp, OCIDuration dur,
-               OCIXMLType *doc, OCIXMLType *xsldoc,
-               OCIXMLType **retDoc);
-
-sword OCIXMLTypeExists(OCIError *errhp, OCIXMLType *doc,
-                 OraText *xpathexpr, ub4 xpathexpr_Len,
-                 OraText *nsmap, ub4 nsmap_Len,
-                 boolean *retval);
-
-sword OCIXMLTypeIsSchemaBased(OCIError *errhp,
-                              OCIXMLType *doc, boolean *retval);
-
-sword OCIXMLTypeGetSchema(OCIError *errhp, OCIXMLType *doc,
-             OCIXMLType **schemadoc,
-             OraText **schemaURL, ub4 *schemaURL_Len,
-             OraText **rootelem, ub4 *rootelem_Len);
-
-sword OCIXMLTypeValidate(OCIError *errhp, OCIXMLType *doc,
-                   OraText *schemaURL, ub4 schemaURL_Len, boolean *retval);
-
-sword OCIXMLTypeGetDOM(OCIError *errhp, OCIXMLType *doc, OCIDuration dur,
-                       OCIDOMDocument **retDom);
-
-sword OCIXMLTypeGetFromDOM(OCIError *errhp, OCIDOMDocument *domdoc,
-                           OCIXMLType **retXMLType);
-
-sword OCIDOMFree(OCIError *errhp, OCIDOMDocument *domdoc);
-
-
-/*---------------------------------------------------------------------------
-                          PRIVATE FUNCTIONS
-  ---------------------------------------------------------------------------*/
-
-            /* the following functions are depracated and should not be used */
-#ifdef NEVER
-sword   OCIStmtBindByPos  (OCIStmt *stmtp, OCIBind *bindp, OCIError *errhp,
-                  ub4 position, dvoid *valuep, sb4 value_sz,
-                  ub2 dty, dvoid *indp, ub2 *alenp, ub2 *rcodep,
-                  ub4 maxarr_len, ub4 *curelep, ub4 mode);
-
-
-sword   OCIStmtBindByName  (OCIStmt *stmtp, OCIBind *bindp, OCIError *errhp,
-                  CONST OraText *placeholder, sb4 placeh_len, dvoid *valuep, 
-                  sb4 value_sz, ub2 dty, dvoid *indp, ub2 *alenp, 
-                  ub2 *rcodep, ub4 maxarr_len, ub4 *curelep, ub4 mode);
-
-sword   ocidefn  (OCIStmt *stmtp, OCIDefine *defnp, OCIError *errhp,
-                  ub4 position, dvoid *valuep, sb4 value_sz, ub2 dty,
-                  dvoid *indp, ub2 *rlenp, ub2 *rcodep, ub4 mode);
-#endif /* NEVER */
-
-#endif                                                       /* OCIAP_ORACLE */
diff --git a/src/terralib/drivers/OracleSpatial/sdo_oci.cpp b/src/terralib/drivers/OracleSpatial/sdo_oci.cpp
deleted file mode 100644
index 36194d2..0000000
--- a/src/terralib/drivers/OracleSpatial/sdo_oci.cpp
+++ /dev/null
@@ -1,3097 +0,0 @@
-/*	Delegate OCI calls -- Ran Wei, Oracle SDO, 9/10/1998
-	Copyright 1998, Oracle Corp. */
-
-
-
-#include <oci.h>
-#include <sdo_oci.h>
-
-//extern "C"
-//{
-//	#include <oci.h>
-//	#include "sdo_oci.h"
-//}
-
-
-
-
-
-/********************************************************************************/
-
-/* Part I -- OCI fundamental interfaces                                         */
-
-/********************************************************************************/
-
-/*
-Note: OCIEnvCreate() should be used instead of the
-OCIInitialize() and OCIEnvInit() calls.
-OCIInitialize() and OCIEnvInit() calls will be supported
-for backward compatibility.
-*/
-
-sword SDO_OCIEnvCreate(OCIEnv **envhpp, ub4 mode, dvoid *ctxp, 
-
-						 dvoid *(*malocfp)(dvoid *ctxp, size_t size),
-
-						dvoid *(*ralocfp)(dvoid *ctxp, dvoid *memptr, size_t newsize),
-
-						void (*mfreefp)(dvoid *ctxp, dvoid *memptr),
-						
-						size_t xtramensz, dvoid **usrmempp)
-
-{
-
-	return OCIEnvCreate (envhpp, mode, ctxp, malocfp, ralocfp,  mfreefp, xtramensz, usrmempp);
-}
-
-
-
-sword SDO_OCIInitialize(ub4 mode, dvoid *ctxp, 
-
-						dvoid *(*malocfp)(dvoid *ctxp, size_t size),
-
-						dvoid *(*ralocfp)(dvoid *ctxp, dvoid *memptr, size_t newsize),
-
-						void (*mfreefp)(dvoid *ctxp, dvoid *memptr))
-
-{
-
-	return OCIInitialize(mode, ctxp, malocfp, ralocfp, mfreefp);
-
-}
-
-
-
-sword SDO_OCIHandleAlloc(CONST dvoid *parenth, dvoid **hndlpp, ub4 type, 
-
-						 size_t xtramem_sz, dvoid **usrmempp)
-
-{
-
-	//aloca todas as handles do ambiente passado como parametro
-	return OCIHandleAlloc(parenth, hndlpp, type, xtramem_sz, usrmempp);
-
-}
-
-
-
-sword SDO_OCIHandleFree(dvoid *hndlp, ub4 type)
-
-{
-
-	return OCIHandleFree(hndlp, type);
-
-}
-
-
-
-sword SDO_OCIDescriptorAlloc(CONST dvoid *parenth, dvoid **descpp, ub4 type,
-
-							 size_t xtramem_sz, dvoid **usrmempp)
-
-{
-
-	return OCIDescriptorAlloc(parenth, descpp, type, xtramem_sz, usrmempp);
-
-}
-
-
-
-sword SDO_OCIDescriptorFree(dvoid *descp, ub4 type)
-
-{
-
-	return OCIDescriptorFree(descp, type);
-
-}
-
-
-
-sword SDO_OCIEnvInit(OCIEnv **envp, ub4 mode, size_t xtramem_sz, 
-
-					 dvoid **usrmempp)
-
-{
-
-	return OCIEnvInit(envp, mode, xtramem_sz, usrmempp);
-
-}
-
-
-
-sword SDO_OCIServerAttach(OCIServer *srvhp, OCIError *errhp,
-
-						  CONST text *dblink, sb4 dblink_len, ub4 mode)
-
-{
-
-	return OCIServerAttach(srvhp, errhp, dblink, dblink_len, mode);
-
-}
-
-
-
-sword SDO_OCIServerDetach(OCIServer *srvhp, OCIError *errhp, ub4 mode)
-
-{
-
-	return OCIServerDetach(srvhp, errhp, mode);
-
-}
-
-
-
-sword SDO_OCISessionBegin(OCISvcCtx *svchp, OCIError *errhp, 
-
-						  OCISession *usrhp, ub4 credt, ub4 mode)
-
-{
-
-	return OCISessionBegin(svchp, errhp, usrhp, credt, mode);
-
-}
-
-
-
-sword SDO_OCISessionEnd(OCISvcCtx *svchp, OCIError *errhp, 
-
-						OCISession *usrhp, ub4 mode)
-
-{
-
-	return OCISessionEnd(svchp, errhp, usrhp, mode);
-
-}
-
-
-
-sword SDO_OCILogon(OCIEnv *envhp, OCIError *errhp, OCISvcCtx **svchp, 
-
-				   CONST text *username, ub4 uname_len, CONST text *password, 
-
-				   ub4 passwd_len, CONST text *dbname, ub4 dbname_len)
-
-{
-
-	return OCILogon(envhp, errhp, svchp, username, uname_len, password, 
-
-				    passwd_len, dbname, dbname_len);
-
-}
-
-
-
-sword SDO_OCILogoff(OCISvcCtx *svchp, OCIError *errhp)
-
-{
-
-	return OCILogoff(svchp, errhp);
-
-}
-
-
-
-sword SDO_OCIPasswordChange(OCISvcCtx *svchp, OCIError *errhp, 
-
-							CONST text *user_name, ub4 usernm_len, 
-
-							CONST text *opasswd, ub4 opasswd_len, 
-
-							CONST text *npasswd, ub4 npasswd_len, ub4 mode)
-
-{
-
-	return OCIPasswordChange(svchp, errhp, user_name, usernm_len, 
-
-							 opasswd, opasswd_len, npasswd, npasswd_len, mode);
-
-}
-
-
-
-sword SDO_OCIStmtPrepare(OCISvcCtx * /* svchp */, OCIStmt *stmtp, OCIError *errhp, CONST OraText *stmt,
-
-						 ub4 stmt_len, CONST OraText * /* key */, ub4 /* keylen */, ub4 language, ub4 mode)
-
-{
-	//return OCIStmtPrepare2 (svchp, stmtp, errhp, stmt, stmt_len, key, keylen, language, mode );
-	
-	return OCIStmtPrepare(stmtp, errhp, stmt, stmt_len, language, mode);
-}
-
-
-
-sword SDO_OCIBindByPos(OCIStmt *stmtp, OCIBind **bindp, OCIError *errhp,
-
-					   ub4 position, dvoid *valuep, sb4 value_sz,
-
-					   ub2 dty, dvoid *indp, ub2 *alenp, ub2 *rcodep,
-
-					   ub4 maxarr_len, ub4 *curelep, ub4 mode)
-
-{
-
-	return OCIBindByPos(stmtp, bindp, errhp, position, valuep, value_sz,
-
-					    dty, indp, alenp, rcodep, maxarr_len, curelep, mode);
-
-}
-
-
-
-sword SDO_OCIBindByName(OCIStmt *stmtp, OCIBind **bindp, OCIError *errhp,
-
-						CONST text *placeholder, sb4 placeh_len, 
-
-						dvoid *valuep, sb4 value_sz, ub2 dty, 
-
-						dvoid *indp, ub2 *alenp, ub2 *rcodep, 
-
-						ub4 maxarr_len, ub4 *curelep, ub4 mode)
-
-{
-
-	return OCIBindByName(stmtp, bindp, errhp, placeholder, placeh_len, 
-
-						 valuep, value_sz, dty, indp, alenp, rcodep, 
-
-						 maxarr_len, curelep, mode);
-
-}
-
-
-
-sword SDO_OCIBindObject(OCIBind *bindp, OCIError *errhp, CONST OCIType *type, 
-
-						dvoid **pgvpp, ub4 *pvszsp, dvoid **indpp, ub4 *indszp)
-
-{
-
-	return OCIBindObject(bindp, errhp, type, pgvpp, pvszsp, indpp, indszp);
-
-}
-
-
-
-sword SDO_OCIBindDynamic(OCIBind *bindp, OCIError *errhp, dvoid *ictxp,
-
-						 OCICallbackInBind icbfp, dvoid *octxp,
-
-						 OCICallbackOutBind ocbfp)
-
-{
-
-	return OCIBindDynamic(bindp, errhp, ictxp, icbfp, octxp, ocbfp);
-
-}
-
-
-
-sword SDO_OCIBindArrayOfStruct(OCIBind *bindp, OCIError *errhp, 
-
-                               ub4 pvskip, ub4 indskip, ub4 alskip, ub4 rcskip)
-
-{
-
-	return OCIBindArrayOfStruct(bindp, errhp, pvskip, indskip, alskip, rcskip);
-
-}
-
-
-
-sword SDO_OCIStmtGetPieceInfo(OCIStmt *stmtp, OCIError *errhp, 
-
-                              dvoid **hndlpp, ub4 *typep, ub1 *in_outp, 
-
-							  ub4 *iterp, ub4 *idxp, ub1 *piecep)
-
-{
-
-	return OCIStmtGetPieceInfo(stmtp, errhp, hndlpp, typep, in_outp, iterp, 
-
-							   idxp, piecep);
-
-}
-
-
-
-sword SDO_OCIStmtSetPieceInfo(dvoid *hndlp, ub4 type, OCIError *errhp, 
-
-                              CONST dvoid *bufp, ub4 *alenp, ub1 piece, 
-
-                              CONST dvoid *indp, ub2 *rcodep)
-
-{
-
-	return OCIStmtSetPieceInfo(hndlp, type, errhp, bufp, alenp, piece, 
-
-							   indp, rcodep);
-
-}
-
-
-
-sword SDO_OCIStmtExecute(OCISvcCtx *svchp, OCIStmt *stmtp, OCIError *errhp, 
-
-						 ub4 iters, ub4 rowoff, CONST OCISnapshot *snap_in, 
-
-						 OCISnapshot *snap_out, ub4 mode)
-
-{
-
-	return OCIStmtExecute(svchp, stmtp, errhp, iters, rowoff, snap_in, 
-
-						  snap_out, mode);
-
-}
-
-
-
-sword SDO_OCIDefineByPos(OCIStmt *stmtp, OCIDefine **defnp, OCIError *errhp,
-
-						 ub4 position, dvoid *valuep, sb4 value_sz, ub2 dty,
-
-						 dvoid *indp, ub2 *rlenp, ub2 *rcodep, ub4 mode)
-
-{
-
-	return OCIDefineByPos(stmtp, defnp, errhp, position, valuep, value_sz, dty,
-
-						  indp, rlenp, rcodep, mode);
-
-}
-
-
-
-sword SDO_OCIDefineObject(OCIDefine *defnp, OCIError *errhp, 
-
-                          CONST OCIType *type, dvoid **pgvpp, 
-
-                          ub4 *pvszsp, dvoid **indpp, ub4 *indszp)
-
-{	
-
-	return OCIDefineObject(defnp, errhp, type, pgvpp, pvszsp, indpp, indszp);
-
-}
-
-
-
-sword SDO_OCIDefineDynamic(OCIDefine *defnp, OCIError *errhp, dvoid *octxp,
-
-                           OCICallbackDefine ocbfp)
-
-{
-
-	return OCIDefineDynamic(defnp, errhp, octxp, ocbfp);
-
-}
-
-
-
-sword SDO_OCIDefineArrayOfStruct(OCIDefine *defnp, OCIError *errhp, ub4 pvskip,
-
-                                 ub4 indskip, ub4 rlskip, ub4 rcskip)
-
-{
-
-	return OCIDefineArrayOfStruct(defnp, errhp, pvskip, indskip, rlskip, rcskip);
-
-}
-
-
-
-sword SDO_OCIStmtFetch(OCIStmt *stmtp, OCIError *errhp, ub4 nrows, 
-
-                       ub2 orientation, ub4 mode)
-
-{
-
-	return OCIStmtFetch(stmtp, errhp, nrows, orientation, mode);
-
-}
-
-
-
-sword SDO_OCIStmtGetBindInfo(OCIStmt *stmtp, OCIError *errhp, ub4 size, 
-
-                             ub4 startloc, sb4 *found, text *bvnp[], ub1 bvnl[],
-
-                             text *invp[], ub1 inpl[], ub1 dupl[], OCIBind *hndl[])
-
-{
-
-	return OCIStmtGetBindInfo(stmtp, errhp, size, startloc, found, bvnp, bvnl,
-
-                              invp, inpl, dupl, hndl);
-
-}
-
-
-
-sword SDO_OCIDescribeAny(OCISvcCtx *svchp, OCIError *errhp, dvoid *objptr, 
-
-                         ub4 objnm_len, ub1 objptr_typ, ub1 info_level,
-
-						 ub1 objtyp, OCIDescribe *dschp)
-
-{
-
-	return OCIDescribeAny(svchp, errhp, objptr, objnm_len, objptr_typ, info_level,
-
-						  objtyp, dschp);
-
-}
-
-
-
-sword SDO_OCIParamGet(CONST dvoid *hndlp, ub4 htype, OCIError *errhp, 
-
-                      dvoid **parmdpp, ub4 pos)
-
-{
-
-	return OCIParamGet(hndlp, htype, errhp, parmdpp, pos);
-
-}
-
-
-
-sword SDO_OCIParamSet(dvoid *hdlp, ub4 htyp, OCIError *errhp, CONST dvoid *dscp,
-
-                      ub4 dtyp, ub4 pos)
-
-{
-
-	return OCIParamSet(hdlp, htyp, errhp, dscp, dtyp, pos);
-
-}
-
-
-
-sword SDO_OCITransStart(OCISvcCtx *svchp, OCIError *errhp, uword timeout, ub4 flags)
-
-{
-
-	return OCITransStart(svchp, errhp, timeout, flags);
-
-}
-
-
-
-sword SDO_OCITransDetach(OCISvcCtx *svchp, OCIError *errhp, ub4 flags)
-
-{
-
-	return OCITransDetach(svchp, errhp, flags);
-
-}
-
-
-
-sword SDO_OCITransCommit(OCISvcCtx *svchp, OCIError *errhp, ub4 flags)
-
-{
-
-	return OCITransCommit(svchp, errhp, flags);
-
-}
-
-
-
-sword SDO_OCITransRollback(OCISvcCtx *svchp, OCIError *errhp, ub4 flags)
-
-{
-
-	return OCITransRollback(svchp, errhp, flags);
-
-}
-
-
-
-sword SDO_OCITransPrepare(OCISvcCtx *svchp, OCIError *errhp, ub4 flags)
-
-{
-
-	return OCITransPrepare(svchp, errhp, flags);
-
-}
-
-
-
-sword SDO_OCITransForget(OCISvcCtx *svchp, OCIError *errhp, ub4 flags)
-
-{
-
-	return OCITransForget(svchp, errhp, flags);
-
-}
-
-
-
-sword SDO_OCIErrorGet(dvoid *hndlp, ub4 recordno, text *sqlstate,
-
-                      sb4 *errcodep, text *bufp, ub4 bufsiz, ub4 type)
-
-{
-
-	return OCIErrorGet(hndlp, recordno, sqlstate, errcodep, bufp, bufsiz, type);
-
-}
-
-
-
-sword SDO_OCILobAppend(OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *dst_locp,
-
-                       OCILobLocator *src_locp)
-
-{
-
-	return OCILobAppend(svchp, errhp, dst_locp, src_locp);
-
-}
-
-
-
-sword SDO_OCILobAssign(OCIEnv *envhp, OCIError *errhp, CONST OCILobLocator *src_locp, 
-
-                       OCILobLocator **dst_locpp)
-
-{
-
-	return OCILobAssign(envhp, errhp, src_locp, dst_locpp);
-
-}
-
-
-
-sword SDO_OCILobCharSetForm(OCIEnv *envhp, OCIError *errhp, 
-
-							CONST OCILobLocator *locp, ub1 *csfrm)
-
-{
-
-	return OCILobCharSetForm(envhp, errhp, locp, csfrm);
-
-}
-
-
-
-sword SDO_OCILobCharSetId(OCIEnv *envhp, OCIError *errhp, 
-
-						  CONST OCILobLocator *locp, ub2 *csid)
-
-{
-
-	return OCILobCharSetId(envhp, errhp, locp, csid);
-
-}
-
-
-
-sword SDO_OCILobCopy(OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *dst_locp,
-
-                     OCILobLocator *src_locp, ub4 amount, ub4 dst_offset, 
-
-                     ub4 src_offset)
-
-{
-
-	return OCILobCopy(svchp, errhp, dst_locp, src_locp, amount, dst_offset, 
-
-                      src_offset);
-
-}
-
-
-
-sword SDO_OCILobDisableBuffering(OCISvcCtx *svchp, OCIError *errhp,
-
-								 OCILobLocator *locp)
-
-{
-
-	return OCILobDisableBuffering(svchp, errhp, locp);
-
-}
-
-
-
-sword SDO_OCILobEnableBuffering(OCISvcCtx *svchp, OCIError *errhp,
-
-								OCILobLocator *locp)
-
-{
-
-	return OCILobEnableBuffering(svchp, errhp, locp);
-
-}
-
-
-
-sword SDO_OCILobErase(OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *locp,
-
-                      ub4 *amount, ub4 offset)
-
-{
-
-	return OCILobErase(svchp, errhp, locp, amount, offset);
-
-}
-
-
-
-sword SDO_OCILobFileClose(OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *filep)
-
-{
-
-	return OCILobFileClose(svchp, errhp, filep);
-
-}
-
-
-
-sword SDO_OCILobFileCloseAll(OCISvcCtx *svchp, OCIError *errhp)
-
-{
-
-	return OCILobFileCloseAll(svchp, errhp);
-
-}
-
-
-
-sword SDO_OCILobFileExists(OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *filep,
-
-						   boolean *flag)
-
-{
-
-	return OCILobFileExists(svchp, errhp, filep, flag);
-
-}
-
-
-
-sword SDO_OCILobFileGetName(OCIEnv *envhp, OCIError *errhp, 
-
-							CONST OCILobLocator *filep, text *dir_alias, 
-
-							ub2 *d_length, text *filename, ub2 *f_length)
-
-{
-
-	return OCILobFileGetName(envhp, errhp, filep, dir_alias, d_length, 
-
-							 filename, f_length);
-
-}
-
-
-
-sword SDO_OCILobFileIsOpen(OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *filep,
-
-                           boolean *flag)
-
-{
-
-	return OCILobFileIsOpen(svchp, errhp, filep, flag);
-
-}
-
-
-
-sword SDO_OCILobFileOpen(OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *filep,
-
-                         ub1 mode)
-
-{
-
-	return OCILobFileOpen(svchp, errhp, filep, mode);
-
-}
-
-
-
-sword SDO_OCILobFileSetName(OCIEnv *envhp, OCIError *errhp, OCILobLocator **filepp, 
-
-                            CONST text *dir_alias, ub2 d_length, 
-
-                            CONST text *filename, ub2 f_length)
-
-{
-
-	return OCILobFileSetName(envhp, errhp, filepp, dir_alias, d_length, 
-
-                             filename, f_length);
-
-}
-
-
-
-sword SDO_OCILobFlushBuffer(OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *locp,
-
-                            ub4 flag)
-
-{
-
-	return OCILobFlushBuffer(svchp, errhp, locp, flag);
-
-}
-
-
-
-sword SDO_OCILobGetLength(OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *locp,
-
-                          ub4 *lenp)
-
-{
-
-	return OCILobGetLength(svchp, errhp, locp, lenp);
-
-}
-
-
-
-sword SDO_OCILobIsEqual(OCIEnv *envhp, CONST OCILobLocator *x, 
-
-						CONST OCILobLocator *y, boolean *is_equal)
-
-{
-
-	return OCILobIsEqual(envhp, x, y, is_equal);
-
-}
-
-
-
-sword SDO_OCILobLoadFromFile(OCISvcCtx *svchp, OCIError *errhp, 
-
-							 OCILobLocator *dst_locp, OCILobLocator *src_filep, 
-
-                             ub4 amount, ub4 dst_offset, ub4 src_offset)
-
-{
-
-	return OCILobLoadFromFile(svchp, errhp, dst_locp, src_filep, amount, 
-
-							  dst_offset, src_offset);
-
-}
-
-
-
-sword SDO_OCILobLocatorIsInit(OCIEnv *envhp, OCIError *errhp, 
-
-							  CONST OCILobLocator *locp, boolean *is_initialized)
-
-{
-
-	return OCILobLocatorIsInit(envhp, errhp, locp, is_initialized);
-
-}
-
-
-
-sword SDO_OCILobRead(OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *locp,
-
-                     ub4 *amtp, ub4 offset, dvoid *bufp, ub4 bufl, 
-
-                     dvoid *ctxp, sb4 (*cbfp)(dvoid *ctxp, CONST dvoid *bufp, 
-
-					 ub4 len, ub1 piece), ub2 csid, ub1 csfrm)
-
-{
-
-	return OCILobRead(svchp, errhp, locp, amtp, offset, bufp, bufl, 
-
-                      ctxp, cbfp, csid, csfrm);
-
-}
-
-
-
-sword SDO_OCILobTrim(OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *locp,
-
-                     ub4 newlen)
-
-{
-
-	return OCILobTrim(svchp, errhp, locp, newlen);
-
-}
-
-
-
-sword SDO_OCILobWrite(OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *locp,
-
-                      ub4 *amtp, ub4 offset, dvoid *bufp, ub4 buflen, ub1 piece, 
-
-					  dvoid *ctxp, sb4 (*cbfp)(dvoid *ctxp, dvoid *bufp, ub4 *len, 
-
-					  ub1 *piece), ub2 csid, ub1 csfrm)
-
-{
-
-	return OCILobWrite(svchp, errhp, locp, amtp, offset, bufp, buflen, piece, 
-
-					   ctxp, cbfp, csid, csfrm);
-
-}
-
-
-
-sword SDO_OCIBreak(dvoid *hndlp, OCIError *errhp)
-
-{
-
-	return OCIBreak(hndlp, errhp);
-
-}
-
-
-
-sword SDO_OCIServerVersion(dvoid *hndlp, OCIError *errhp, text *bufp, ub4 bufsz,
-
-                           ub1 hndltype)
-
-{
-
-	return OCIServerVersion(hndlp, errhp, bufp, bufsz, hndltype);
-
-}
-
-
-
-sword SDO_OCIAttrGet(CONST dvoid *trgthndlp, ub4 trghndltyp, dvoid *attributep, 
-
-					 ub4 *sizep, ub4 attrtype, OCIError *errhp)
-
-{
-
-	return OCIAttrGet(trgthndlp, trghndltyp, attributep, sizep, attrtype, errhp);
-
-}
-
-
-
-sword SDO_OCIAttrSet(dvoid *trgthndlp, ub4 trghndltyp, dvoid *attributep,
-
-					 ub4 size, ub4 attrtype, OCIError *errhp)
-
-{
-
-	return OCIAttrSet(trgthndlp, trghndltyp, attributep, size, attrtype, errhp);
-
-}
-
-
-
-sword SDO_OCISvcCtxToLda(OCISvcCtx *svchp, OCIError *errhp, Lda_Def *ldap)
-
-{
-
-	return OCISvcCtxToLda(svchp, errhp, ldap);
-
-}
-
-
-
-sword SDO_OCILdaToSvcCtx(OCISvcCtx **svchpp, OCIError *errhp, Lda_Def *ldap)
-
-{
-
-	return OCILdaToSvcCtx(svchpp, errhp, ldap);
-
-}
-
-
-
-sword SDO_OCIResultSetToStmt(OCIResult *rsetdp, OCIError *errhp)
-
-{
-
-	return OCIResultSetToStmt(rsetdp, errhp);
-
-}
-
-
-
-
-
-/********************************************************************************/
-
-/* Part II -- OCI navigational interfaces                                       */
-
-/********************************************************************************/
-
-sword SDO_OCIObjectNew(OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc,
-
-					   OCITypeCode typecode, OCIType *tdo, dvoid *table, 
-
-					   OCIDuration duration, boolean value, dvoid **instance)
-
-{
-
-	return OCIObjectNew(env, err, svc, typecode, tdo, table, duration, 
-
-						value, instance);
-
-}
-
-
-
-sword SDO_OCIObjectPin(OCIEnv *env, OCIError *err, OCIRef *object_ref, 
-
-					   OCIComplexObject *corhdl, OCIPinOpt pin_option, 
-
-					   OCIDuration pin_duration, OCILockOpt lock_option, 
-
-					   dvoid **object)
-
-{
-
-	return OCIObjectPin(env, err, object_ref, corhdl, pin_option, 
-
-					    pin_duration, lock_option, object);
-
-}
-
-
-
-sword SDO_OCIObjectUnpin(OCIEnv *env, OCIError *err, dvoid *object)
-
-{
-
-	return OCIObjectUnpin(env, err, object);
-
-}
-
-
-
-sword SDO_OCIObjectPinCountReset(OCIEnv *env, OCIError *err, dvoid *object)
-
-{
-
-	return OCIObjectPinCountReset(env, err, object);
-
-}
-
-
-
-sword SDO_OCIObjectLock(OCIEnv *env, OCIError *err, dvoid *object)
-
-{
-
-	return OCIObjectLock(env, err, object);
-
-}
-
-
-
-sword SDO_OCIObjectMarkUpdate(OCIEnv *env, OCIError *err, dvoid *object)
-
-{
-
-	return OCIObjectMarkUpdate(env, err, object);
-
-}
-
-
-
-sword SDO_OCIObjectUnmark(OCIEnv *env, OCIError *err, dvoid *object)
-
-{
-
-	return OCIObjectUnmark(env, err, object);
-
-}
-
-
-
-sword SDO_OCIObjectUnmarkByRef(OCIEnv *env, OCIError *err, OCIRef *ref)
-
-{
-
-	return OCIObjectUnmarkByRef(env, err, ref);
-
-}
-
-
-
-sword SDO_OCIObjectFree(OCIEnv *env, OCIError *err, dvoid *instance, 
-
-                        ub2 flags)
-
-{
-
-	return OCIObjectFree(env, err, instance, flags);
-
-}
-
-
-
-sword SDO_OCIObjectMarkDeleteByRef(OCIEnv *env, OCIError *err, OCIRef *object_ref)
-
-{
-
-	return OCIObjectMarkDeleteByRef(env, err, object_ref);
-
-}
-
-
-
-sword SDO_OCIObjectMarkDelete(OCIEnv *env, OCIError *err, dvoid *instance)
-
-{
-
-	return OCIObjectMarkDelete(env, err, instance);
-
-}
-
-
-
-sword SDO_OCIObjectFlush(OCIEnv *env, OCIError *err, dvoid *object)
-
-{
-
-	return OCIObjectFlush(env, err, object);
-
-}
-
-
-
-sword SDO_OCIObjectRefresh(OCIEnv *env, OCIError *err, dvoid *object)
-
-{
-
-	return OCIObjectRefresh(env, err, object);
-
-}
-
-
-
-sword SDO_OCIObjectCopy(OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc, 
-
-                        dvoid *source, dvoid *null_source, dvoid *target, 
-
-						dvoid *null_target, OCIType *tdo, OCIDuration duration, 
-
-						ub1 option)
-
-{
-
-	return OCIObjectCopy(env, err, svc, source, null_source, target, 
-
-						 null_target, tdo, duration, option);
-
-}
-
-
-
-sword SDO_OCIObjectGetTypeRef(OCIEnv *env, OCIError *err, dvoid *instance, 
-
-                              OCIRef *type_ref)
-
-{
-
-	return OCIObjectGetTypeRef(env, err, instance, type_ref);
-
-}
-
-
-
-sword SDO_OCIObjectGetObjectRef(OCIEnv *env, OCIError *err, dvoid *object, 
-
-                                OCIRef *object_ref)
-
-{
-
-	return OCIObjectGetObjectRef(env, err, object, object_ref);
-
-}
-
-
-
-sword SDO_OCIObjectGetInd(OCIEnv *env, OCIError *err, dvoid *instance, 
-
-                          dvoid **null_struct)
-
-{
-
-	return OCIObjectGetInd(env, err, instance, null_struct);
-
-}
-
-
-
-sword SDO_OCIObjectExists(OCIEnv *env, OCIError *err, dvoid *ins, boolean *exist)
-
-{
-
-	return OCIObjectExists(env, err, ins, exist);
-
-}
-
-
-
-sword SDO_OCIObjectGetProperty(OCIEnv *envh, OCIError *errh, CONST dvoid *obj, 
-
-							   OCIObjectPropId propertyId, dvoid *property, 
-
-							   ub4 *size)
-
-{
-
-	return OCIObjectGetProperty(envh, errh, obj, propertyId, property, size);
-
-}
-
-
-
-sword SDO_OCIObjectIsLocked(OCIEnv *env, OCIError *err, dvoid *ins, boolean *lock)
-
-{
-
-	return OCIObjectIsLocked(env, err, ins, lock);
-
-}
-
-
-
-sword SDO_OCIObjectIsDirty(OCIEnv *env, OCIError *err, dvoid *ins, boolean *dirty)
-
-{
-
-	return OCIObjectIsDirty(env, err, ins, dirty);
-
-}
-
-
-
-sword SDO_OCIObjectPinTable(OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc, 
-
-							CONST text *schema_name, ub4 s_n_length, 
-
-							CONST text *object_name, ub4 o_n_length, 
-
-							CONST OCIRef *scope_obj_ref, OCIDuration pin_duration, 
-
-							dvoid** object)
-
-{
-
-	return OCIObjectPinTable(env, err, svc, schema_name, s_n_length, 
-
-							 object_name, o_n_length, scope_obj_ref, pin_duration, 
-
-							 object);
-
-}
-
-
-
-sword SDO_OCIObjectArrayPin(OCIEnv *env, OCIError *err, OCIRef **ref_array, 
-
-							ub4 array_size, OCIComplexObject **cor_array,
-
-							ub4 cor_array_size, OCIPinOpt pin_option, 
-
-							OCIDuration pin_duration, OCILockOpt lock, 
-
-							dvoid **obj_array, ub4 *pos)
-
-{
-
-	return OCIObjectArrayPin(env, err, ref_array, array_size, cor_array,
-
-							 cor_array_size, pin_option, pin_duration, lock, 
-
-							 obj_array, pos);
-
-}
-
-
-
-sword SDO_OCICacheFlush(OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc, 
-
-						dvoid *context, OCIRef *(*get)(dvoid *context, ub1 *last),
-
-						OCIRef **ref)
-
-{
-
-	return OCICacheFlush(env, err, svc, context, get, ref);
-
-}
-
-
-
-sword SDO_OCICacheRefresh(OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc,
-
-						  OCIRefreshOpt option, dvoid *context,
-
-						  OCIRef *(*get)(dvoid *context), OCIRef **ref)
-
-{
-
-	return OCICacheRefresh(env, err, svc, option, context, get, ref);
-
-}
-
-
-
-sword SDO_OCICacheUnpin(OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc)
-
-{
-
-	return OCICacheUnpin(env, err, svc);
-
-}
-
-
-
-sword SDO_OCICacheFree(OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc)
-
-{
-
-	return OCICacheFree(env, err, svc);
-
-} 
-
-
-
-sword SDO_OCICacheUnmark(OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc)
-
-{
-
-	return OCICacheUnmark(env, err, svc);
-
-}
-
-
-
-sword SDO_OCIDurationBegin(OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc, 
-
-                           OCIDuration parent, OCIDuration *dur)
-
-{
-
-	return OCIDurationBegin(env, err, svc, parent, dur);
-
-}
-
-
-
-sword SDO_OCIDurationEnd(OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc, 
-
-                         OCIDuration duration)
-
-{
-
-	return OCIDurationEnd(env, err, svc, duration);
-
-}
-
-
-
-sword SDO_OCIDurationGetParent(OCIEnv *env, OCIError *err, 
-
-                               OCIDuration duration, OCIDuration *parent)
-
-{
-
-	return OCIDurationGetParent(env, err, duration, parent);
-
-}
-
-
-
-sword SDO_OCIObjectAlwaysLatest(OCIEnv *env, OCIError *err, dvoid *object)
-
-{
-
-	return OCIObjectAlwaysLatest(env, err, object);
-
-}
-
-
-
-sword SDO_OCIObjectNotAlwaysLatest(OCIEnv *env, OCIError *err, dvoid *object)
-
-{
-
-	return OCIObjectNotAlwaysLatest(env, err, object);
-
-}
-
-
-
-sword SDO_OCIObjectFlushRefresh(OCIEnv *env, OCIError *err, dvoid *object)
-
-{
-
-	return OCIObjectFlushRefresh(env, err, object);
-
-}
-
-
-
-sword SDO_OCIObjectIsLoaded(OCIEnv *env, OCIError *err, dvoid *ins, 
-
-							boolean *load)
-
-{
-
-	return OCIObjectIsLoaded(env, err, ins, load);
-
-}
-
-
-
-sword SDO_OCIObjectIsDirtied(OCIEnv *env, OCIError *err, dvoid *ins,
-
-							 boolean *dirty)
-
-{
-
-	return OCIObjectIsDirtied(env, err, ins, dirty);
-
-}
-
-
-
-sword SDO_OCICacheGetObjects(OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc,
-
-							 OCIObjectProperty property, dvoid *client_context,
-
-							 void (*client_callback)(dvoid *client_context,
-
-							 dvoid *object))
-
-{
-
-	return OCICacheGetObjects(env, err, svc, property, client_context,
-
-							  client_callback);
-
-}
-
-
-
-sword SDO_OCICacheRegister(OCIEnv *env, OCIError *err, OCIObjectEvent event,
-
-						   dvoid *client_context, void (*client_callback)(
-
-						   dvoid *client_context, OCIObjectEvent event,
-
-						   dvoid *object))
-
-{
-
-	return OCICacheRegister(env, err, event, client_context, client_callback);
-
-}
-
-
-
-sword SDO_OCICacheFlushRefresh(OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc, 
-
-							   dvoid *context, OCIRef *(*get)(dvoid *context, 
-
-							   ub1 *last), OCIRef **ref)
-
-{
-
-	return OCICacheFlushRefresh(env, err, svc, context, get, ref);
-
-}
-
-
-
-
-
-/********************************************************************************/
-
-/* Part III -- OCI primitive OTS interfaces                                     */
-
-/********************************************************************************/
-
-void SDO_OCINumberSetZero(OCIError *err, OCINumber *num)
-
-{
-
-	OCINumberSetZero(err, num);
-
-}
-
-
-
-sword SDO_OCINumberAdd(OCIError *err, CONST OCINumber *number1, 
-
-                       CONST OCINumber *number2, OCINumber *result)
-
-{
-
-	return OCINumberAdd(err, number1, number2, result);
-
-}
-
-
-
-sword SDO_OCINumberSub(OCIError *err, CONST OCINumber *number1, 
-
-                       CONST OCINumber *number2, OCINumber *result)
-
-{
-
-	return OCINumberSub(err, number1, number2, result);
-
-}
-
-
-
-sword SDO_OCINumberMul(OCIError *err, CONST OCINumber *number1, 
-
-                       CONST OCINumber *number2, OCINumber *result)
-
-{
-
-	return OCINumberMul(err, number1, number2, result);
-
-}
-
-
-
-sword SDO_OCINumberDiv(OCIError *err, CONST OCINumber *number1, 
-
-                       CONST OCINumber *number2, OCINumber *result)
-
-{
-
-	return OCINumberDiv(err, number1, number2, result);
-
-}
-
-
-
-sword SDO_OCINumberMod(OCIError *err, CONST OCINumber *number1, 
-
-                       CONST OCINumber *number2, OCINumber *result)
-
-{
-
-	return OCINumberMod(err, number1, number2, result);
-
-}
-
-
-
-sword SDO_OCINumberIntPower(OCIError *err, CONST OCINumber *base,
-
-                            CONST sword exp, OCINumber *result)
-
-{
-
-	return OCINumberIntPower(err, base, exp, result);
-
-}
-
-
-
-sword SDO_OCINumberNeg(OCIError *err, CONST OCINumber *number,
-
-                       OCINumber *result)
-
-{
-
-	return OCINumberNeg(err, number, result);
-
-}
-
-
-
-sword SDO_OCINumberToText(OCIError *err, CONST OCINumber *number, 
-
-                          CONST text *fmt, ub4 fmt_length,
-
-                          CONST text *nls_params, ub4 nls_p_length,
-
-                          ub4 *buf_size, text *buf)
-
-{
-
-	return OCINumberToText(err, number, fmt, fmt_length, nls_params, 
-
-						   nls_p_length, buf_size, buf);
-
-}
-
-
-
-sword SDO_OCINumberFromText(OCIError *err, CONST text *str, ub4 str_length, 
-
-							CONST text *fmt, ub4 fmt_length, 
-
-							CONST text *nls_params, ub4 nls_p_length, 
-
-							OCINumber *number)
-
-{
-
-	return OCINumberFromText(err, str, str_length, fmt, fmt_length, 
-
-							 nls_params, nls_p_length, number);
-
-}
-
-
-
-sword SDO_OCINumberToInt(OCIError *err, CONST OCINumber *number,
-
-                         uword rsl_length, uword rsl_flag, dvoid *rsl)
-
-{
-
-	return OCINumberToInt(err, number, rsl_length, rsl_flag, rsl);
-
-}
-
-
-
-sword SDO_OCINumberFromInt(OCIError *err, CONST dvoid *inum, uword inum_length,
-
-						   uword inum_s_flag, OCINumber *number)
-
-{
-
-	return OCINumberFromInt(err, inum, inum_length, inum_s_flag, number);
-
-}
-
-
-
-sword SDO_OCINumberToReal(OCIError *err, CONST OCINumber *number,
-
-                          uword rsl_length, dvoid *rsl)
-
-{
-
-	return OCINumberToReal(err, number, rsl_length, rsl);
-
-}
-
-
-
-sword SDO_OCINumberFromReal(OCIError *err, CONST dvoid *rnum,
-
-                            uword rnum_length, OCINumber *number)
-
-{
-
-	return OCINumberFromReal(err, rnum, rnum_length, number);
-
-}
-
-
-
-sword SDO_OCINumberCmp(OCIError *err, CONST OCINumber *number1, 
-
-                       CONST OCINumber *number2, sword *result)
-
-{
-
-	return OCINumberCmp(err, number1, number2, result);
-
-}
-
-
-
-sword SDO_OCINumberSign(OCIError *err, CONST OCINumber *number,
-
-                        sword *result)
-
-{
-
-	return OCINumberSign(err, number, result);
-
-}
-
-
-
-sword SDO_OCINumberIsZero(OCIError *err, CONST OCINumber *number,
-
-                          boolean *result)
-
-{
-
-	return OCINumberIsZero(err, number, result);
-
-}
-
-
-
-sword SDO_OCINumberAssign(OCIError *err, CONST OCINumber *from,
-
-                          OCINumber *to)
-
-{
-
-	return OCINumberAssign(err, from, to);
-
-}
-
-
-
-sword SDO_OCINumberAbs(OCIError *err, CONST OCINumber *number,
-
-                       OCINumber *result)
-
-{
-
-	return OCINumberAbs(err, number, result);
-
-}
-
-
-
-sword SDO_OCINumberCeil(OCIError *err, CONST OCINumber *number,
-
-                        OCINumber *result)
-
-{
-
-	return OCINumberCeil(err, number, result);
-
-}
-
-
-
-sword SDO_OCINumberFloor(OCIError *err, CONST OCINumber *number, 
-
-                         OCINumber *result)
-
-{
-
-	return OCINumberFloor(err, number, result);
-
-}
-
-
-
-sword SDO_OCINumberSqrt(OCIError *err, CONST OCINumber *number, 
-
-                        OCINumber *result)
-
-{
-
-	return OCINumberSqrt(err, number, result);
-
-}
-
-
-
-sword SDO_OCINumberTrunc(OCIError *err, CONST OCINumber *number, 
-
-                         sword decplace, OCINumber *result)
-
-{
-
-	return OCINumberTrunc(err, number, decplace, result);
-
-}
-
-
-
-sword SDO_OCINumberPower(OCIError *err, CONST OCINumber *base, 
-
-                         CONST OCINumber *number, OCINumber *result)
-
-{
-
-	return OCINumberPower(err, base, number, result);
-
-}
-
-
-
-sword SDO_OCINumberRound(OCIError *err, CONST OCINumber *number,
-
-                         sword decplace, OCINumber *result)
-
-{
-
-	return OCINumberRound(err, number, decplace, result);
-
-}
-
-
-
-sword SDO_OCINumberSin(OCIError *err, CONST OCINumber *number,
-
-                       OCINumber *result)
-
-{
-
-	return OCINumberSin(err, number, result);
-
-}
-
-
-
-sword SDO_OCINumberArcSin(OCIError *err, CONST OCINumber *number,
-
-                          OCINumber *result)
-
-{
-
-	return OCINumberArcSin(err, number, result);
-
-}
-
-
-
-sword SDO_OCINumberHypSin(OCIError *err, CONST OCINumber *number, 
-
-                          OCINumber *result)
-
-{
-
-	return OCINumberHypSin(err, number, result);
-
-}
-
-
-
-sword SDO_OCINumberCos(OCIError *err, CONST OCINumber *number, 
-
-                       OCINumber *result)
-
-{
-
-	return OCINumberCos(err, number, result);
-
-}
-
-
-
-sword SDO_OCINumberArcCos(OCIError *err, CONST OCINumber *number, 
-
-                          OCINumber *result)
-
-{
-
-	return OCINumberArcCos(err, number, result);
-
-}
-
-
-
-sword SDO_OCINumberHypCos(OCIError *err, CONST OCINumber *number, 
-
-                          OCINumber *result)
-
-{
-
-	return OCINumberHypCos(err, number, result);
-
-}
-
-
-
-sword SDO_OCINumberTan(OCIError *err, CONST OCINumber *number, 
-
-                       OCINumber *result)
-
-{
-
-	return OCINumberTan(err, number, result);
-
-}
-
-
-
-sword SDO_OCINumberArcTan(OCIError *err, CONST OCINumber *number, 
-
-                          OCINumber *result)
-
-{
-
-	return OCINumberArcTan(err, number, result);
-
-}
-
-
-
-sword SDO_OCINumberArcTan2(OCIError *err, CONST OCINumber *number1, 
-
-                           CONST OCINumber *number2, OCINumber *result)
-
-{
-
-	return OCINumberArcTan2(err, number1, number2, result);
-
-}
-
-
-
-sword SDO_OCINumberHypTan(OCIError *err, CONST OCINumber *number, 
-
-                          OCINumber *result)
-
-{
-
-	return OCINumberHypTan(err, number, result);
-
-}
-
-
-
-sword SDO_OCINumberExp(OCIError *err, CONST OCINumber *number, 
-
-                       OCINumber *result)
-
-{
-
-	return OCINumberExp(err, number, result);
-
-}
-
-
-
-sword SDO_OCINumberLn(OCIError *err, CONST OCINumber *number, 
-
-                      OCINumber *result)
-
-{
-
-	return OCINumberLn(err, number, result);
-
-}
-
-
-
-sword SDO_OCINumberLog(OCIError *err, CONST OCINumber *base, 
-
-                       CONST OCINumber *number, OCINumber *result)
-
-{
-
-	return OCINumberLog(err, base, number, result);
-
-}
-
-
-
-sword SDO_OCIDateAssign(OCIError *err, CONST OCIDate *from, OCIDate *to)
-
-{
-
-	return OCIDateAssign(err, from, to);
-
-}
-
-
-
-sword SDO_OCIDateToText(OCIError *err, CONST OCIDate *date, 
-
-                        CONST text *fmt, ub1 fmt_length, 
-
-                        CONST text *lang_name, ub4 lang_length, 
-
-                        ub4 *buf_size, text *buf)
-
-{
-
-	return OCIDateToText(err, date, fmt, fmt_length, lang_name, lang_length, 
-
-						 buf_size, buf);
-
-}
-
-
-
-sword SDO_OCIDateFromText(OCIError *err, CONST text *date_str, 
-
-						  ub4 d_str_length, CONST text *fmt, ub1 fmt_length, 
-
-						  CONST text *lang_name, ub4 lang_length, 
-
-						  OCIDate *date)
-
-{
-
-	return OCIDateFromText(err, date_str, d_str_length, fmt, fmt_length, 
-
-						   lang_name, lang_length, date);
-
-}
-
-
-
-sword SDO_OCIDateCompare(OCIError *err, CONST OCIDate *date1, 
-
-						 CONST OCIDate *date2, sword *result)
-
-{
-
-	return OCIDateCompare(err, date1, date2, result);
-
-}
-
-
-
-sword SDO_OCIDateAddMonths(OCIError *err, CONST OCIDate *date, sb4 num_months,
-
-                           OCIDate *result)
-
-{
-
-	return OCIDateAddMonths(err, date, num_months, result);
-
-}
-
-
-
-sword SDO_OCIDateAddDays(OCIError *err, CONST OCIDate *date, sb4 num_days,
-
-                         OCIDate *result)
-
-{
-
-	return OCIDateAddDays(err, date, num_days, result);
-
-}
-
-
-
-sword SDO_OCIDateLastDay(OCIError *err, CONST OCIDate *date, 
-
-                         OCIDate *last_day)
-
-{
-
-	return OCIDateLastDay(err, date, last_day);
-
-}
-
-
-
-sword SDO_OCIDateDaysBetween(OCIError *err, CONST OCIDate *date1, 
-
-                             CONST OCIDate *date2, sb4 *num_days)
-
-{
-
-	return OCIDateDaysBetween(err, date1, date2, num_days);
-
-}
-
-
-
-sword SDO_OCIDateZoneToZone(OCIError *err, CONST OCIDate *date1,
-
-                            CONST text *zon1, ub4 zon1_length, 
-
-							CONST text *zon2, ub4 zon2_length, OCIDate *date2)
-
-{
-
-	return OCIDateZoneToZone(err, date1, zon1, zon1_length, zon2, 
-
-							 zon2_length, date2);
-
-}
-
-
-
-sword SDO_OCIDateNextDay(OCIError *err, CONST OCIDate *date, CONST text *day_p, 
-
-                         ub4 day_length, OCIDate *next_day)
-
-{
-
-	return OCIDateNextDay(err, date, day_p, day_length, next_day);
-
-}
-
-
-
-
-
-sword SDO_OCIDateCheck(OCIError *err, CONST OCIDate *date, uword *valid)
-
-{
-
-	return OCIDateCheck(err, date, valid);
-
-}
-
-
-
-sword SDO_OCIDateSysDate(OCIError *err, OCIDate *sys_date)
-
-{
-
-	return OCIDateSysDate(err, sys_date);
-
-}
-
-
-
-sword SDO_OCIStringAssign(OCIEnv *env, OCIError *err, CONST OCIString *rhs, 
-
-                          OCIString **lhs)
-
-{
-
-	return OCIStringAssign(env, err, rhs, lhs);
-
-}
-
-
-
-sword SDO_OCIStringAssignText(OCIEnv *env, OCIError *err, CONST text *rhs, 
-
-                              ub4 rhs_len, OCIString **lhs)
-
-{
-
-	return OCIStringAssignText(env, err, rhs, rhs_len, lhs);
-
-}
-
-
-
-sword SDO_OCIStringResize(OCIEnv *env, OCIError *err, ub4 new_size, 
-
-                          OCIString **str)
-
-{
-
-	return OCIStringResize(env, err, new_size, str);
-
-}
-
-
-
-ub4 SDO_OCIStringSize(OCIEnv *env, CONST OCIString *vs)
-
-{
-
-	return OCIStringSize(env, vs);
-
-}
-
-
-
-text *SDO_OCIStringPtr(OCIEnv *env, CONST OCIString *vs)
-
-{
-
-	return OCIStringPtr(env, vs);
-
-}
-
-
-
-sword SDO_OCIStringAllocSize(OCIEnv *env, OCIError *err, CONST OCIString *vs, 
-
-                             ub4 *allocsize)
-
-{
-
-	return OCIStringAllocSize(env, err, vs, allocsize);
-
-}
-
-
-
-sword SDO_OCIRawAssignRaw(OCIEnv *env, OCIError *err, CONST OCIRaw *rhs, 
-
-                          OCIRaw **lhs)
-
-{
-
-	return OCIRawAssignRaw(env, err, rhs, lhs);
-
-}
-
-
-
-sword SDO_OCIRawAssignBytes(OCIEnv *env, OCIError *err, CONST ub1 *rhs, 
-
-                            ub4 rhs_len, OCIRaw **lhs)
-
-{
-
-	return OCIRawAssignBytes(env, err, rhs, rhs_len, lhs);
-
-}
-
-
-
-sword SDO_OCIRawResize(OCIEnv *env, OCIError *err, ub4 new_size, OCIRaw **raw)
-
-{
-
-	return OCIRawResize(env, err, new_size, raw);
-
-}
-
-
-
-ub4 SDO_OCIRawSize(OCIEnv *env, CONST OCIRaw *raw)
-
-{
-
-	return OCIRawSize(env, raw);
-
-}
-
-
-
-ub1 *SDO_OCIRawPtr(OCIEnv *env, CONST OCIRaw *raw)
-
-{
-
-	return OCIRawPtr(env, raw);
-
-}
-
-
-
-sword SDO_OCIRawAllocSize(OCIEnv *env, OCIError *err, CONST OCIRaw *raw,
-
-						  ub4 *allocsize)
-
-{
-
-	return OCIRawAllocSize(env, err, raw, allocsize);
-
-}
-
-
-
-void SDO_OCIRefClear(OCIEnv *env, OCIRef *ref)
-
-{
-
-	OCIRefClear(env, ref);
-
-}
-
-
-
-sword SDO_OCIRefAssign(OCIEnv *env, OCIError *err, CONST OCIRef *source, 
-
-                       OCIRef **target)
-
-{
-
-	return OCIRefAssign(env, err, source, target);
-
-}
-
-
-
-boolean SDO_OCIRefIsEqual(OCIEnv *env, CONST OCIRef *x, CONST OCIRef *y)
-
-{
-
-	return OCIRefIsEqual(env, x, y);
-
-}
-
-
-
-boolean SDO_OCIRefIsNull(OCIEnv *env, CONST OCIRef *ref)
-
-{
-
-	return OCIRefIsNull(env, ref);
-
-}
-
-
-
-ub4 SDO_OCIRefHexSize(OCIEnv *env, CONST OCIRef *ref)
-
-{
-
-	return OCIRefHexSize(env, ref);
-
-}
-
-
-
-sword SDO_OCIRefFromHex(OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc, 
-
-                        CONST text *hex, ub4 length, OCIRef **ref)
-
-{
-
-	return OCIRefFromHex(env, err, svc, hex, length, ref);
-
-}
-
-
-
-sword SDO_OCIRefToHex(OCIEnv *env, OCIError *err, CONST OCIRef *ref, 
-
-                      text *hex, ub4 *hex_length)
-
-{
-
-	return OCIRefToHex(env, err, ref, hex, hex_length);
-
-}
-
-
-
-sword SDO_OCICollSize(OCIEnv *env, OCIError *err, CONST OCIColl *coll, 
-
-					  sb4 *size)
-
-{
-
-	return OCICollSize(env, err, coll, size);
-
-}
-
-
-
-sb4 SDO_OCICollMax(OCIEnv *env, CONST OCIColl *coll)
-
-{
-
-	return OCICollMax(env, coll);
-
-}
-
-
-
-sword SDO_OCICollGetElem(OCIEnv *env, OCIError *err, CONST OCIColl *coll, 
-
-                         sb4 index, boolean *exists, dvoid **elem, 
-
-                         dvoid **elemind)
-
-{
-
-	return OCICollGetElem(env, err, coll, index, exists, elem, elemind);
-
-}
-
-
-
-sword SDO_OCICollAssignElem(OCIEnv *env, OCIError *err, sb4 index, 
-
-                            CONST dvoid *elem, 
-
-                            CONST dvoid *elemind, OCIColl *coll)
-
-{
-
-	return OCICollAssignElem(env, err, index, elem, elemind, coll);
-
-}
-
-
-
-sword SDO_OCICollAssign(OCIEnv *env, OCIError *err, CONST OCIColl *rhs, 
-
-                        OCIColl *lhs)
-
-{
-
-	return OCICollAssign(env, err, rhs, lhs);
-
-}
-
-
-
-sword SDO_OCICollAppend(OCIEnv *env, OCIError *err, CONST dvoid *elem, 
-
-                        CONST dvoid *elemind, OCIColl *coll)
-
-{
-
-	return OCICollAppend(env, err, elem, elemind, coll);
-
-}
-
-
-
-sword SDO_OCICollTrim(OCIEnv *env, OCIError *err, sb4 trim_num, 
-
-                      OCIColl *coll)
-
-{
-
-	return OCICollTrim(env, err, trim_num, coll);
-
-}
-
-
-
-sword SDO_OCIIterCreate(OCIEnv *env, OCIError *err, CONST OCIColl *coll, 
-
-                        OCIIter **itr)
-
-{
-
-	return OCIIterCreate(env, err, coll, itr);
-
-}
-
-
-
-sword SDO_OCIIterDelete(OCIEnv *env, OCIError *err, OCIIter **itr)
-
-{
-
-	return OCIIterDelete(env, err, itr);
-
-}
-
-
-
-sword SDO_OCIIterInit(OCIEnv *env, OCIError *err, CONST OCIColl *coll, 
-
-                      OCIIter *itr)
-
-{
-
-	return OCIIterInit(env, err, coll, itr);
-
-}
-
-
-
-sword SDO_OCIIterGetCurrent(OCIEnv *env, OCIError *err, CONST OCIIter *itr, 
-
-                            dvoid **elem, dvoid **elemind)
-
-{
-
-	return OCIIterGetCurrent(env, err, itr, elem, elemind);
-
-}
-
-
-
-sword SDO_OCIIterNext(OCIEnv *env, OCIError *err, OCIIter *itr, 
-
-                      dvoid **elem, dvoid **elemind, boolean *eoc)
-
-{
-
-	return OCIIterNext(env, err, itr, elem, elemind, eoc);
-
-}
-
-
-
-sword SDO_OCIIterPrev(OCIEnv *env, OCIError *err, OCIIter *itr, 
-
-                      dvoid **elem, dvoid **elemind, boolean *boc)
-
-{
-
-	return OCIIterPrev(env, err, itr, elem, elemind, boc);
-
-}
-
-
-
-sword SDO_OCITableSize(OCIEnv *env, OCIError *err, CONST OCITable *tbl, 
-
-					   sb4 *size)
-
-{
-
-	return OCITableSize(env, err, tbl, size);
-
-}
-
-
-
-sword SDO_OCITableExists(OCIEnv *env, OCIError *err, CONST OCITable *tbl,
-
-						 sb4 index, boolean *exists)
-
-{
-
-	return OCITableExists(env, err, tbl, index, exists);
-
-}
-
-
-
-sword SDO_OCITableDelete(OCIEnv *env, OCIError *err, sb4 index, OCITable *tbl)
-
-{
-
-	return OCITableDelete(env, err, index, tbl);
-
-}
-
-
-
-sword SDO_OCITableFirst(OCIEnv *env, OCIError *err, CONST OCITable *tbl, 
-
-                        sb4 *index)
-
-{
-
-	return OCITableFirst(env, err, tbl, index);
-
-}
-
-
-
-sword SDO_OCITableLast(OCIEnv *env, OCIError *err, CONST OCITable *tbl, 
-
-                       sb4 *index)
-
-{
-
-	return OCITableLast(env, err, tbl, index);
-
-}
-
-
-
-sword SDO_OCITableNext(OCIEnv *env, OCIError *err, sb4 index, 
-
-					   CONST OCITable *tbl, sb4 *next_index, boolean *exists)
-
-{
-
-	return OCITableNext(env, err, index, tbl, next_index, exists);
-
-}
-
-
-
-sword SDO_OCITablePrev(OCIEnv *env, OCIError *err, sb4 index, 
-
-                       CONST OCITable *tbl, sb4 *prev_index, boolean *exists)
-
-{
-
-	return OCITablePrev(env, err, index, tbl, prev_index, exists);
-
-}
-
-
-
-
-
-/********************************************************************************/
-
-/* Part IV -- OCI open type manager interfaces                                  */
-
-/********************************************************************************/
-
-sword SDO_OCITypeIterNew(OCIEnv *env, OCIError *err, OCIType *tdo, 
-
-                         OCITypeIter **iteratorOCI)
-
-{
-
-	return OCITypeIterNew(env, err, tdo, iteratorOCI);
-
-}
-
-
-
-sword SDO_OCITypeIterSet(OCIEnv *env, OCIError *err, OCIType *tdo, 
-
-						 OCITypeIter *iteratorOCI)
-
-{
-
-	return OCITypeIterSet(env, err, tdo, iteratorOCI);
-
-}
-
-
-
-sword SDO_OCITypeIterFree(OCIEnv *env, OCIError *err, OCITypeIter *iteratorOCI)
-
-{
-
-	return OCITypeIterFree(env, err, iteratorOCI);
-
-}
-
-
-
-sword SDO_OCITypeByName(OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc, 
-
-                        CONST text *schema_name, ub4 s_length,
-
-                        CONST text *type_name, ub4 t_length,
-
-                        CONST text *version_name, ub4 v_length,
-
-                        OCIDuration pin_duration, OCITypeGetOpt get_option,
-
-                        OCIType **tdo)
-
-{
-
-	return OCITypeByName(env, err, svc, schema_name, s_length, type_name, 
-
-						 t_length, version_name, v_length, pin_duration, 
-
-						 get_option, tdo);
-
-}
-
-
-
-sword SDO_OCITypeArrayByName(OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc,
-
-                             ub4 array_len, CONST text *schema_name[], 
-
-							 ub4 s_length[], CONST text *type_name[], 
-
-							 ub4 t_length[], CONST text *version_name[], 
-
-							 ub4 v_length[], OCIDuration pin_duration,
-
-                             OCITypeGetOpt get_option, OCIType *tdo[])
-
-{
-
-	return OCITypeArrayByName(env, err, svc, array_len, schema_name, s_length, 
-
-							  type_name, t_length, version_name, v_length, 
-
-							  pin_duration, get_option, tdo);
-
-}
-
-
-
-sword SDO_OCITypeByRef(OCIEnv *env, OCIError *err, CONST OCIRef *type_ref, 
-
-					   OCIDuration pin_duration,OCITypeGetOpt get_option, 
-
-					   OCIType **tdo)
-
-{
-
-	return OCITypeByRef(env, err, type_ref, pin_duration, get_option, tdo);
-
-}
-
-
-
-sword SDO_OCITypeArrayByRef(OCIEnv *env, OCIError *err, ub4 array_len, 
-
-							CONST OCIRef *type_ref[], OCIDuration pin_duration,
-
-							OCITypeGetOpt get_option, OCIType *tdo[])
-
-{
-
-	return OCITypeArrayByRef(env, err, array_len, type_ref, pin_duration,
-
-							 get_option, tdo);
-
-}
-
-
-
-text* SDO_OCITypeName(OCIEnv *env, OCIError *err, CONST OCIType *tdo, 
-
-                      ub4 *n_length)
-
-{
-
-	return OCITypeName(env, err, tdo, n_length);
-
-}
-
-
-
-text* SDO_OCITypeSchema(OCIEnv *env, OCIError *err, CONST OCIType *tdo, 
-
-						ub4 *n_length)
-
-{
-
-	return OCITypeSchema(env, err, tdo, n_length);
-
-}
-
-
-
-OCITypeCode SDO_OCITypeTypeCode(OCIEnv *env, OCIError *err, CONST OCIType *tdo)
-
-{
-
-	return OCITypeTypeCode(env, err, tdo);
-
-}
-
-
-
-OCITypeCode SDO_OCITypeCollTypeCode(OCIEnv *env, OCIError *err, 
-
-									CONST OCIType *tdo)
-
-{
-
-	return OCITypeCollTypeCode(env, err, tdo);
-
-}
-
-
-
-text* SDO_OCITypeVersion(OCIEnv *env, OCIError *err, CONST OCIType *tdo, 
-
-                         ub4 *v_length)
-
-{
-
-	return OCITypeVersion(env, err, tdo, v_length);
-
-}
-
-
-
-ub4 SDO_OCITypeAttrs(OCIEnv *env, OCIError *err, CONST OCIType *tdo)
-
-{
-
-	return OCITypeAttrs(env, err, tdo);
-
-}
-
-
-
-ub4 SDO_OCITypeMethods(OCIEnv *env, OCIError *err, CONST OCIType *tdo)
-
-{
-
-	return OCITypeMethods(env, err, tdo);
-
-}
-
-
-
-text* SDO_OCITypeElemName(OCIEnv *env, OCIError *err, CONST OCITypeElem *elem, 
-
-                          ub4 *n_length)
-
-{
-
-	return OCITypeElemName(env, err, elem, n_length);
-
-}
-
-
-
-OCITypeCode SDO_OCITypeElemTypeCode(OCIEnv *env, OCIError *err,
-
-                                    CONST OCITypeElem *elem)
-
-{
-
-	return OCITypeElemTypeCode(env, err, elem);
-
-}
-
-
-
-sword SDO_OCITypeElemType(OCIEnv *env, OCIError *err, CONST OCITypeElem *elem, 
-
-                          OCIType **elem_tdo)
-
-{
-
-	return OCITypeElemType(env, err, elem, elem_tdo);
-
-}
-
-
-
-ub4 SDO_OCITypeElemFlags(OCIEnv *env, OCIError *err, CONST OCITypeElem *elem)
-
-{
-
-	return OCITypeElemFlags(env, err, elem);
-
-}
-
-
-
-ub1 SDO_OCITypeElemNumPrec(OCIEnv *env, OCIError *err, CONST OCITypeElem *elem)
-
-{
-
-	return OCITypeElemNumPrec(env, err, elem);
-
-}
-
-
-
-sb1 SDO_OCITypeElemNumScale(OCIEnv *env, OCIError *err, CONST OCITypeElem *elem)
-
-{
-
-	return OCITypeElemNumScale(env, err, elem);
-
-}
-
-
-
-ub4 SDO_OCITypeElemLength(OCIEnv *env, OCIError *err, CONST OCITypeElem *elem)
-
-{
-
-	return OCITypeElemLength(env, err, elem);
-
-}
-
-
-
-ub2 SDO_OCITypeElemCharSetID(OCIEnv *env, OCIError *err, CONST OCITypeElem *elem)
-
-{
-
-	return OCITypeElemCharSetID(env, err, elem);
-
-}
-
-
-
-ub2 SDO_OCITypeElemCharSetForm(OCIEnv *env, OCIError *err, CONST OCITypeElem *elem)
-
-{
-
-	return OCITypeElemCharSetForm(env, err, elem);
-
-}
-
-
-
-sword SDO_OCITypeElemParameterizedType(OCIEnv *env, OCIError *err,
-
-                                       CONST OCITypeElem *elem, 
-
-									   OCIType **type_stored)
-
-{
-
-	return OCITypeElemParameterizedType(env, err, elem, type_stored);
-
-}
-
-
-
-OCITypeCode SDO_OCITypeElemExtTypeCode(OCIEnv *env, OCIError *err,
-
-                                       CONST OCITypeElem *elem)
-
-{
-
-	return OCITypeElemExtTypeCode(env, err, elem);
-
-}
-
-
-
-sword SDO_OCITypeAttrByName(OCIEnv *env, OCIError *err, CONST OCIType *tdo, 
-
-                            CONST text *name, ub4 n_length, OCITypeElem **elem)
-
-{
-
-	return OCITypeAttrByName(env, err, tdo, name, n_length, elem);
-
-}
-
-
-
-sword SDO_OCITypeAttrNext(OCIEnv *env, OCIError *err, OCITypeIter *iteratorOCI,
-
-                          OCITypeElem **elem)
-
-{
-
-	return OCITypeAttrNext(env, err, iteratorOCI, elem);
-
-}
-
-
-
-sword SDO_OCITypeCollElem(OCIEnv *env, OCIError *err, CONST OCIType *tdo,
-
-                          OCITypeElem **element)
-
-{
-
-	return OCITypeCollElem(env, err, tdo, element);
-
-}
-
-
-
-sword SDO_OCITypeCollSize(OCIEnv *env, OCIError *err, CONST OCIType *tdo, 
-
-                          ub4 *num_elems)
-
-{
-
-	return OCITypeCollSize(env, err, tdo, num_elems);
-
-}
-
-
-
-sword SDO_OCITypeCollExtTypeCode(OCIEnv *env, OCIError *err,
-
-                                 CONST OCIType *tdo, OCITypeCode *sqt_code)
-
-{
-
-	return OCITypeCollExtTypeCode(env, err, tdo, sqt_code);
-
-}
-
-
-
-ub4 SDO_OCITypeMethodOverload(OCIEnv *env, OCIError *err, CONST OCIType *tdo, 
-
-                              CONST text *method_name, ub4 m_length)
-
-{
-
-	return OCITypeMethodOverload(env, err, tdo, method_name, m_length);
-
-}
-
-
-
-sword SDO_OCITypeMethodByName(OCIEnv *env, OCIError *err, CONST OCIType *tdo, 
-
-                              CONST text *method_name, ub4 m_length,
-
-                              OCITypeMethod **mdos)
-
-{
-
-	return OCITypeMethodByName(env, err, tdo, method_name, m_length, mdos);
-
-}
-
-
-
-sword SDO_OCITypeMethodNext(OCIEnv *env, OCIError *err, OCITypeIter *iteratorOCI,
-
-                            OCITypeMethod **mdo)
-
-{
-
-	return OCITypeMethodNext(env, err, iteratorOCI, mdo);
-
-}
-
-
-
-text *SDO_OCITypeMethodName(OCIEnv *env, OCIError *err,
-
-                            CONST OCITypeMethod *mdo, ub4 *n_length)
-
-{
-
-	return OCITypeMethodName(env, err, mdo, n_length);
-
-}
-
-
-
-OCITypeEncap SDO_OCITypeMethodEncap(OCIEnv *env, OCIError *err,
-
-                                    CONST OCITypeMethod *mdo)
-
-{
-
-	return OCITypeMethodEncap(env, err, mdo);
-
-}
-
-
-
-OCITypeMethodFlag SDO_OCITypeMethodFlags(OCIEnv *env, OCIError *err,
-
-                                         CONST OCITypeMethod *mdo)
-
-{
-
-	return OCITypeMethodFlags(env, err, mdo);
-
-}
-
-
-
-sword SDO_OCITypeMethodMap(OCIEnv *env, OCIError *err, CONST OCIType *tdo, 
-
-                           OCITypeMethod **mdo)
-
-{
-
-	return OCITypeMethodMap(env, err, tdo, mdo);
-
-}
-
-
-
-sword SDO_OCITypeMethodOrder(OCIEnv *env, OCIError *err, CONST OCIType *tdo, 
-
-                             OCITypeMethod **mdo)
-
-{
-
-	return OCITypeMethodOrder(env, err, tdo, mdo);
-
-}
-
-
-
-ub4 SDO_OCITypeMethodParams(OCIEnv *env, OCIError *err,
-
-                            CONST OCITypeMethod *mdo)
-
-{
-
-	return OCITypeMethodParams(env, err, mdo);
-
-}
-
-
-
-sword SDO_OCITypeResult(OCIEnv *env, OCIError *err, CONST OCITypeMethod *mdo,
-
-                        OCITypeElem **elem)
-
-{
-
-	return OCITypeResult(env, err, mdo, elem);
-
-}
-
-
-
-sword SDO_OCITypeParamByPos(OCIEnv *env, OCIError *err, CONST OCITypeMethod *mdo, 
-
-							ub4 position, OCITypeElem **elem)
-
-{
-
-	return OCITypeParamByPos(env, err, mdo, position, elem);
-
-}
-
-
-
-sword SDO_OCITypeParamByName(OCIEnv *env, OCIError *err, CONST OCITypeMethod *mdo, 
-
-                             CONST text *name, ub4 n_length, OCITypeElem **elem)
-
-{
-
-	return OCITypeParamByName(env, err, mdo, name, n_length, elem);
-
-}
-
-
-
-sword SDO_OCITypeParamPos(OCIEnv *env, OCIError *err, CONST OCITypeMethod *mdo, 
-
-                          CONST text *name, ub4 n_length, ub4 *position, 
-
-                          OCITypeElem **elem)
-
-{
-
-	return OCITypeParamPos(env, err, mdo, name, n_length, position, elem);
-
-}
-
-
-
-OCITypeParamMode SDO_OCITypeElemParamMode(OCIEnv *env, OCIError *err,
-
-                                          CONST OCITypeElem *elem)
-
-{
-
-	return OCITypeElemParamMode(env, err, elem);
-
-}
-
-
-
-text* SDO_OCITypeElemDefaultValue(OCIEnv *env, OCIError *err,
-
-                                  CONST OCITypeElem *elem, ub4 *d_v_length)
-
-{
-
-	return OCITypeElemDefaultValue(env, err, elem, d_v_length);
-
-}
-
-
-
-sword SDO_OCITypeVTInit(OCIEnv *env, OCIError *err)
-
-{
-
-	return OCITypeVTInit(env, err);
-
-}
-
- 
-
-sword SDO_OCITypeVTInsert(OCIEnv *env, OCIError *err, CONST text *schema_name,
-
-						  ub4 s_n_length, CONST text *type_name, ub4 t_n_length, 
-
-						  CONST text *user_version, ub4 u_v_length)
-
-{
-
-	return OCITypeVTInsert(env, err, schema_name, s_n_length, type_name, 
-
-						   t_n_length, user_version, u_v_length);
-
-}
-
-
-
-sword SDO_OCITypeVTSelect(OCIEnv *env, OCIError *err, CONST text *schema_name,
-
-						  ub4 s_n_length, CONST text *type_name, ub4 t_n_length, 
-
-						  text **user_version, ub4 *u_v_length, ub2 *version)
-
-{
-
-	return OCITypeVTSelect(env, err, schema_name, s_n_length, type_name, 
-
-						   t_n_length, user_version, u_v_length, version);
-
-}
-
-
-
-
-
diff --git a/src/terralib/drivers/OracleSpatial/sdo_oci.h b/src/terralib/drivers/OracleSpatial/sdo_oci.h
deleted file mode 100644
index b030637..0000000
--- a/src/terralib/drivers/OracleSpatial/sdo_oci.h
+++ /dev/null
@@ -1,1541 +0,0 @@
-/* sdo_oci.c -- delegate OCI calls    ranwei  9/10/1998   */
-
-/* Copyright 1998, Oracle SDO                             */
-
-
-
-#ifndef SDO_OCI_H
-
-#define SDO_OCI_H
-
-
-
-/********************************************************************************/
-
-/* Part I -- OCI fundamental interfaces                                         */
-
-/********************************************************************************/
-
-//Creates and initializes an environment for OCI functions to work under.
-sword SDO_OCIEnvCreate(OCIEnv **envhpp, ub4 mode, dvoid *ctxp, 
-
-						dvoid *(*malocfp)(dvoid *ctxp, size_t size),
-
-						dvoid *(*ralocfp)(dvoid *ctxp, dvoid *memptr, size_t newsize),
-
-						void (*mfreefp)(dvoid *ctxp, dvoid *memptr),
-						
-						size_t xtramensz, dvoid **usrmempp); 
-
-
-
-sword SDO_OCIInitialize(ub4 mode, dvoid *ctxp, 
-
-						dvoid *(*malocfp)(dvoid *ctxp, size_t size),
-
-						dvoid *(*ralocfp)(dvoid *ctxp, dvoid *memptr, size_t newsize),
-
-						void (*mfreefp)(dvoid *ctxp, dvoid *memptr));
-
-
-
-sword SDO_OCIHandleAlloc(CONST dvoid *parenth, dvoid **hndlpp, ub4 type, 
-
-						 size_t xtramem_sz, dvoid **usrmempp);
-
-
-
-sword SDO_OCIHandleFree(dvoid *hndlp, ub4 type);
-
-
-
-sword SDO_OCIDescriptorAlloc(CONST dvoid *parenth, dvoid **descpp, ub4 type,
-
-							 size_t xtramem_sz, dvoid **usrmempp);
-
-
-
-sword SDO_OCIDescriptorFree(dvoid *descp, ub4 type);
-
-
-
-sword SDO_OCIEnvInit(OCIEnv **envp, ub4 mode, size_t xtramem_sz, 
-
-					 dvoid **usrmempp);
-
-
-
-sword SDO_OCIServerAttach(OCIServer *srvhp, OCIError *errhp,
-
-						  CONST text *dblink, sb4 dblink_len, ub4 mode);
-
-
-
-sword SDO_OCIServerDetach(OCIServer *srvhp, OCIError *errhp, ub4 mode);
-
-
-
-sword SDO_OCISessionBegin(OCISvcCtx *svchp, OCIError *errhp, 
-
-						  OCISession *usrhp, ub4 credt, ub4 mode);
-
-
-
-sword SDO_OCISessionEnd(OCISvcCtx *svchp, OCIError *errhp, 
-
-						OCISession *usrhp, ub4 mode);
-
-
-
-sword SDO_OCILogon(OCIEnv *envhp, OCIError *errhp, OCISvcCtx **svchp, 
-
-				   CONST text *username, ub4 uname_len, CONST text *password, 
-
-				   ub4 passwd_len, CONST text *dbname, ub4 dbname_len);
-
-
-
-sword SDO_OCILogoff(OCISvcCtx *svchp, OCIError *errhp);
-
-
-
-sword SDO_OCIPasswordChange(OCISvcCtx *svchp, OCIError *errhp, 
-
-							CONST text *user_name, ub4 usernm_len, 
-
-							CONST text *opasswd, ub4 opasswd_len, 
-
-							CONST text *npasswd, ub4 npasswd_len, ub4 mode);
-
-
-
-sword SDO_OCIStmtPrepare(OCISvcCtx *svchp, OCIStmt *stmtp, OCIError *errhp, CONST OraText *stmt,
-
-						 ub4 stmt_len, CONST OraText *key, ub4 keylen, ub4 language, ub4 mode);
-
-
-
-sword SDO_OCIBindByPos(OCIStmt *stmtp, OCIBind **bindp, OCIError *errhp,
-
-					   ub4 position, dvoid *valuep, sb4 value_sz,
-
-					   ub2 dty, dvoid *indp, ub2 *alenp, ub2 *rcodep,
-
-					   ub4 maxarr_len, ub4 *curelep, ub4 mode);
-
-
-
-sword SDO_OCIBindByName(OCIStmt *stmtp, OCIBind **bindp, OCIError *errhp,
-
-						CONST text *placeholder, sb4 placeh_len, 
-
-						dvoid *valuep, sb4 value_sz, ub2 dty, 
-
-						dvoid *indp, ub2 *alenp, ub2 *rcodep, 
-
-						ub4 maxarr_len, ub4 *curelep, ub4 mode);
-
-
-
-sword SDO_OCIBindObject(OCIBind *bindp, OCIError *errhp, CONST OCIType *type, 
-
-						dvoid **pgvpp, ub4 *pvszsp, dvoid **indpp, ub4 *indszp);
-
-
-
-sword SDO_OCIBindDynamic(OCIBind *bindp, OCIError *errhp, dvoid *ictxp,
-
-						 OCICallbackInBind icbfp, dvoid *octxp,
-
-						 OCICallbackOutBind ocbfp);
-
-
-
-sword SDO_OCIBindArrayOfStruct(OCIBind *bindp, OCIError *errhp, 
-
-                               ub4 pvskip, ub4 indskip, ub4 alskip, ub4 rcskip);
-
-
-
-sword SDO_OCIStmtGetPieceInfo(OCIStmt *stmtp, OCIError *errhp, 
-
-                              dvoid **hndlpp, ub4 *typep, ub1 *in_outp, 
-
-							  ub4 *iterp, ub4 *idxp, ub1 *piecep);
-
-
-
-sword SDO_OCIStmtSetPieceInfo(dvoid *hndlp, ub4 type, OCIError *errhp, 
-
-                              CONST dvoid *bufp, ub4 *alenp, ub1 piece, 
-
-                              CONST dvoid *indp, ub2 *rcodep);
-
-
-
-sword SDO_OCIStmtExecute(OCISvcCtx *svchp, OCIStmt *stmtp, OCIError *errhp, 
-
-						 ub4 iters, ub4 rowoff, CONST OCISnapshot *snap_in, 
-
-						 OCISnapshot *snap_out, ub4 mode);
-
-
-
-sword SDO_OCIDefineByPos(OCIStmt *stmtp, OCIDefine **defnp, OCIError *errhp,
-
-						 ub4 position, dvoid *valuep, sb4 value_sz, ub2 dty,
-
-						 dvoid *indp, ub2 *rlenp, ub2 *rcodep, ub4 mode);
-
-
-
-sword SDO_OCIDefineObject(OCIDefine *defnp, OCIError *errhp, 
-
-                          CONST OCIType *type, dvoid **pgvpp, 
-
-                          ub4 *pvszsp, dvoid **indpp, ub4 *indszp);
-
-
-
-sword SDO_OCIDefineDynamic(OCIDefine *defnp, OCIError *errhp, dvoid *octxp,
-
-                           OCICallbackDefine ocbfp);
-
-
-
-sword SDO_OCIDefineArrayOfStruct(OCIDefine *defnp, OCIError *errhp, ub4 pvskip,
-
-                                 ub4 indskip, ub4 rlskip, ub4 rcskip);
-
-
-
-sword SDO_OCIStmtFetch(OCIStmt *stmtp, OCIError *errhp, ub4 nrows, 
-
-                       ub2 orientation, ub4 mode);
-
-
-
-sword SDO_OCIStmtGetBindInfo(OCIStmt *stmtp, OCIError *errhp, ub4 size, 
-
-                             ub4 startloc, sb4 *found, text *bvnp[], ub1 bvnl[],
-
-                             text *invp[], ub1 inpl[], ub1 dupl[], OCIBind *hndl[]);
-
-
-
-sword SDO_OCIDescribeAny(OCISvcCtx *svchp, OCIError *errhp, dvoid *objptr, 
-
-                         ub4 objnm_len, ub1 objptr_typ, ub1 info_level,
-
-						 ub1 objtyp, OCIDescribe *dschp);
-
-
-
-sword SDO_OCIParamGet(CONST dvoid *hndlp, ub4 htype, OCIError *errhp, 
-
-                      dvoid **parmdpp, ub4 pos);
-
-
-
-sword SDO_OCIParamSet(dvoid *hdlp, ub4 htyp, OCIError *errhp, CONST dvoid *dscp,
-
-                      ub4 dtyp, ub4 pos);
-
-
-
-sword SDO_OCITransStart(OCISvcCtx *svchp, OCIError *errhp, uword timeout, ub4 flags);
-
-
-
-sword SDO_OCITransDetach(OCISvcCtx *svchp, OCIError *errhp, ub4 flags );
-
-
-
-sword SDO_OCITransCommit(OCISvcCtx *svchp, OCIError *errhp, ub4 flags);
-
-
-
-sword SDO_OCITransRollback(OCISvcCtx *svchp, OCIError *errhp, ub4 flags);
-
-
-
-sword SDO_OCITransPrepare(OCISvcCtx *svchp, OCIError *errhp, ub4 flags);
-
-
-
-sword SDO_OCITransForget(OCISvcCtx *svchp, OCIError *errhp, ub4 flags);
-
-
-
-sword SDO_OCIErrorGet(dvoid *hndlp, ub4 recordno, text *sqlstate,
-
-                      sb4 *errcodep, text *bufp, ub4 bufsiz, ub4 type);
-
-
-
-sword SDO_OCILobAppend(OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *dst_locp,
-
-                       OCILobLocator *src_locp);
-
-
-
-sword SDO_OCILobAssign(OCIEnv *envhp, OCIError *errhp, CONST OCILobLocator *src_locp, 
-
-                       OCILobLocator **dst_locpp);
-
-
-
-sword SDO_OCILobCharSetForm(OCIEnv *envhp, OCIError *errhp, 
-
-							CONST OCILobLocator *locp, ub1 *csfrm);
-
-
-
-sword SDO_OCILobCharSetId(OCIEnv *envhp, OCIError *errhp, 
-
-						  CONST OCILobLocator *locp, ub2 *csid);
-
-
-
-sword SDO_OCILobCopy(OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *dst_locp,
-
-                     OCILobLocator *src_locp, ub4 amount, ub4 dst_offset, 
-
-                     ub4 src_offset);
-
-
-
-sword SDO_OCILobDisableBuffering(OCISvcCtx *svchp, OCIError *errhp,
-
-								 OCILobLocator *locp);
-
-
-
-sword SDO_OCILobEnableBuffering(OCISvcCtx *svchp, OCIError *errhp,
-
-								OCILobLocator *locp);
-
-
-
-sword SDO_OCILobErase(OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *locp,
-
-                      ub4 *amount, ub4 offset);
-
-
-
-sword SDO_OCILobFileClose(OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *filep);
-
-
-
-sword SDO_OCILobFileCloseAll(OCISvcCtx *svchp, OCIError *errhp);
-
-
-
-sword SDO_OCILobFileExists(OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *filep,
-
-						   boolean *flag);
-
-
-
-sword SDO_OCILobFileGetName(OCIEnv *envhp, OCIError *errhp, 
-
-							CONST OCILobLocator *filep, text *dir_alias, 
-
-							ub2 *d_length, text *filename, ub2 *f_length);
-
-
-
-sword SDO_OCILobFileIsOpen(OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *filep,
-
-                           boolean *flag);
-
-
-
-sword SDO_OCILobFileOpen(OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *filep,
-
-                         ub1 mode);
-
-
-
-sword SDO_OCILobFileSetName(OCIEnv *envhp, OCIError *errhp, OCILobLocator **filepp, 
-
-                            CONST text *dir_alias, ub2 d_length, 
-
-                            CONST text *filename, ub2 f_length);
-
-
-
-sword SDO_OCILobFlushBuffer(OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *locp,
-
-                            ub4 flag);
-
-
-
-sword SDO_OCILobGetLength(OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *locp,
-
-                          ub4 *lenp);
-
-
-
-sword SDO_OCILobIsEqual(OCIEnv *envhp, CONST OCILobLocator *x, 
-
-						CONST OCILobLocator *y, boolean *is_equal);
-
-
-
-sword SDO_OCILobLoadFromFile(OCISvcCtx *svchp, OCIError *errhp, 
-
-							 OCILobLocator *dst_locp, OCILobLocator *src_filep, 
-
-                             ub4 amount, ub4 dst_offset, ub4 src_offset);
-
-
-
-sword SDO_OCILobLocatorIsInit(OCIEnv *envhp, OCIError *errhp, 
-
-							  CONST OCILobLocator *locp, boolean *is_initialized);
-
-
-
-sword SDO_OCILobRead(OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *locp,
-
-                     ub4 *amtp, ub4 offset, dvoid *bufp, ub4 bufl, 
-
-                     dvoid *ctxp, sb4 (*cbfp)(dvoid *ctxp, CONST dvoid *bufp, 
-
-					 ub4 len, ub1 piece), ub2 csid, ub1 csfrm);
-
-
-
-sword SDO_OCILobTrim(OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *locp,
-
-                     ub4 newlen);
-
-
-
-sword SDO_OCILobWrite(OCISvcCtx *svchp, OCIError *errhp, OCILobLocator *locp,
-
-                      ub4 *amtp, ub4 offset, dvoid *bufp, ub4 buflen, ub1 piece, 
-
-					  dvoid *ctxp, sb4 (*cbfp)(dvoid *ctxp, dvoid *bufp, ub4 *len, 
-
-					  ub1 *piece), ub2 csid, ub1 csfrm);
-
-
-
-sword SDO_OCIBreak(dvoid *hndlp, OCIError *errhp);
-
-
-
-sword SDO_OCIServerVersion(dvoid *hndlp, OCIError *errhp, text *bufp, ub4 bufsz,
-
-                           ub1 hndltype);
-
-
-
-sword SDO_OCIAttrGet(CONST dvoid *trgthndlp, ub4 trghndltyp, dvoid *attributep, 
-
-					 ub4 *sizep, ub4 attrtype, OCIError *errhp);
-
-
-
-sword SDO_OCIAttrSet(dvoid *trgthndlp, ub4 trghndltyp, dvoid *attributep,
-
-					 ub4 size, ub4 attrtype, OCIError *errhp);
-
-
-
-sword SDO_OCISvcCtxToLda(OCISvcCtx *svchp, OCIError *errhp, Lda_Def *ldap);
-
-
-
-sword SDO_OCILdaToSvcCtx(OCISvcCtx **svchpp, OCIError *errhp, Lda_Def *ldap);
-
-
-
-sword SDO_OCIResultSetToStmt(OCIResult *rsetdp, OCIError *errhp);
-
-
-
-
-
-/********************************************************************************/
-
-/* Part II -- OCI navigational interfaces                                       */
-
-/********************************************************************************/
-
-sword SDO_OCIObjectNew(OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc,
-
-					   OCITypeCode typecode, OCIType *tdo, dvoid *table, 
-
-					   OCIDuration duration, boolean value, dvoid **instance);
-
-
-
-sword SDO_OCIObjectPin(OCIEnv *env, OCIError *err, OCIRef *object_ref, 
-
-					   OCIComplexObject *corhdl, OCIPinOpt pin_option, 
-
-					   OCIDuration pin_duration, OCILockOpt lock_option, 
-
-					   dvoid **object);
-
-
-
-sword SDO_OCIObjectUnpin(OCIEnv *env, OCIError *err, dvoid *object);
-
-
-
-sword SDO_OCIObjectPinCountReset(OCIEnv *env, OCIError *err, dvoid *object);
-
-
-
-sword SDO_OCIObjectLock(OCIEnv *env, OCIError *err, dvoid *object);
-
-
-
-sword SDO_OCIObjectMarkUpdate(OCIEnv *env, OCIError *err, dvoid *object);
-
-
-
-sword SDO_OCIObjectUnmark(OCIEnv *env, OCIError *err, dvoid *object);
-
-
-
-sword SDO_OCIObjectUnmarkByRef(OCIEnv *env, OCIError *err, OCIRef *ref);
-
-
-
-sword SDO_OCIObjectFree(OCIEnv *env, OCIError *err, dvoid *instance, 
-
-                        ub2 flags);
-
-
-
-sword SDO_OCIObjectMarkDeleteByRef(OCIEnv *env, OCIError *err, OCIRef *object_ref);
-
-
-
-sword SDO_OCIObjectMarkDelete(OCIEnv *env, OCIError *err, dvoid *instance);
-
-
-
-sword SDO_OCIObjectFlush(OCIEnv *env, OCIError *err, dvoid *object);
-
-
-
-sword SDO_OCIObjectRefresh(OCIEnv *env, OCIError *err, dvoid *object);
-
-
-
-sword SDO_OCIObjectCopy(OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc, 
-
-                        dvoid *source, dvoid *null_source, dvoid *target, 
-
-						dvoid *null_target, OCIType *tdo, OCIDuration duration, 
-
-						ub1 option);
-
-
-
-sword SDO_OCIObjectGetTypeRef(OCIEnv *env, OCIError *err, dvoid *instance, 
-
-                              OCIRef *type_ref);
-
-
-
-sword SDO_OCIObjectGetObjectRef(OCIEnv *env, OCIError *err, dvoid *object, 
-
-                                OCIRef *object_ref);
-
-
-
-sword SDO_OCIObjectGetInd(OCIEnv *env, OCIError *err, dvoid *instance, 
-
-                          dvoid **null_struct);
-
-
-
-sword SDO_OCIObjectExists(OCIEnv *env, OCIError *err, dvoid *ins, boolean *exist);
-
-
-
-sword SDO_OCIObjectGetProperty(OCIEnv *envh, OCIError *errh, CONST dvoid *obj, 
-
-							   OCIObjectPropId propertyId, dvoid *property, 
-
-							   ub4 *size);
-
-
-
-sword SDO_OCIObjectIsLocked(OCIEnv *env, OCIError *err, dvoid *ins, boolean *lock);
-
-
-
-sword SDO_OCIObjectIsDirty(OCIEnv *env, OCIError *err, dvoid *ins, boolean *dirty);
-
-
-
-sword SDO_OCIObjectPinTable(OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc, 
-
-							CONST text *schema_name, ub4 s_n_length, 
-
-							CONST text *object_name, ub4 o_n_length, 
-
-							CONST OCIRef *scope_obj_ref, OCIDuration pin_duration, 
-
-							dvoid** object);
-
-
-
-sword SDO_OCIObjectArrayPin(OCIEnv *env, OCIError *err, OCIRef **ref_array, 
-
-							ub4 array_size, OCIComplexObject **cor_array,
-
-							ub4 cor_array_size, OCIPinOpt pin_option, 
-
-							OCIDuration pin_duration, OCILockOpt lock, 
-
-							dvoid **obj_array, ub4 *pos);
-
-
-
-sword SDO_OCICacheFlush(OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc, 
-
-						dvoid *context, OCIRef *(*get)(dvoid *context, ub1 *last),
-
-						OCIRef **ref);
-
-
-
-sword SDO_OCICacheRefresh(OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc,
-
-						  OCIRefreshOpt option, dvoid *context,
-
-						  OCIRef *(*get)(dvoid *context), OCIRef **ref);
-
-
-
-sword SDO_OCICacheUnpin(OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc);
-
-
-
-sword SDO_OCICacheFree(OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc); 
-
-
-
-sword SDO_OCICacheUnmark(OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc);
-
-
-
-sword SDO_OCIDurationBegin(OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc, 
-
-                           OCIDuration parent, OCIDuration *dur);
-
-
-
-sword SDO_OCIDurationEnd(OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc, 
-
-                         OCIDuration duration);
-
-
-
-sword SDO_OCIDurationGetParent(OCIEnv *env, OCIError *err, 
-
-                               OCIDuration duration, OCIDuration *parent);
-
-
-
-sword SDO_OCIObjectAlwaysLatest(OCIEnv *env, OCIError *err, dvoid *object);
-
-
-
-sword SDO_OCIObjectNotAlwaysLatest(OCIEnv *env, OCIError *err, dvoid *object);
-
-
-
-sword SDO_OCIObjectFlushRefresh(OCIEnv *env, OCIError *err, dvoid *object);
-
-
-
-sword SDO_OCIObjectIsLoaded(OCIEnv *env, OCIError *err, dvoid *ins, 
-
-							boolean *load);
-
-
-
-sword SDO_OCIObjectIsDirtied(OCIEnv *env, OCIError *err, dvoid *ins,
-
-							 boolean *dirty);
-
-
-
-sword SDO_OCICacheGetObjects(OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc,
-
-							 OCIObjectProperty property, dvoid *client_context,
-
-							 void (*client_callback)(dvoid *client_context,
-
-							 dvoid *object));
-
-
-
-sword SDO_OCICacheRegister(OCIEnv *env, OCIError *err, OCIObjectEvent event,
-
-						   dvoid *client_context, void (*client_callback)(
-
-						   dvoid *client_context, OCIObjectEvent event,
-
-						   dvoid *object));
-
-
-
-sword SDO_OCICacheFlushRefresh(OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc, 
-
-							   dvoid *context, OCIRef *(*get)(dvoid *context, 
-
-							   ub1 *last), OCIRef **ref);
-
-
-
-
-
-/********************************************************************************/
-
-/* Part III -- OCI primitive OTS interfaces                                     */
-
-/********************************************************************************/
-
-void SDO_OCINumberSetZero(OCIError *err, OCINumber *num);
-
-
-
-sword SDO_OCINumberAdd(OCIError *err, CONST OCINumber *number1, 
-
-                       CONST OCINumber *number2, OCINumber *result);
-
-
-
-sword SDO_OCINumberSub(OCIError *err, CONST OCINumber *number1, 
-
-                       CONST OCINumber *number2, OCINumber *result);
-
-
-
-sword SDO_OCINumberMul(OCIError *err, CONST OCINumber *number1, 
-
-                       CONST OCINumber *number2, OCINumber *result);
-
-
-
-sword SDO_OCINumberDiv(OCIError *err, CONST OCINumber *number1, 
-
-                       CONST OCINumber *number2, OCINumber *result);
-
-
-
-sword SDO_OCINumberMod(OCIError *err, CONST OCINumber *number1, 
-
-                       CONST OCINumber *number2, OCINumber *result);
-
-
-
-sword SDO_OCINumberIntPower(OCIError *err, CONST OCINumber *base,
-
-                            CONST sword exp, OCINumber *result);
-
-
-
-sword SDO_OCINumberNeg(OCIError *err, CONST OCINumber *number,
-
-                       OCINumber *result);
-
-
-
-sword SDO_OCINumberToText(OCIError *err, CONST OCINumber *number, 
-
-                          CONST text *fmt, ub4 fmt_length,
-
-                          CONST text *nls_params, ub4 nls_p_length,
-
-                          ub4 *buf_size, text *buf);
-
-
-
-sword SDO_OCINumberFromText(OCIError *err, CONST text *str, ub4 str_length, 
-
-							CONST text *fmt, ub4 fmt_length, 
-
-							CONST text *nls_params, ub4 nls_p_length, 
-
-							OCINumber *number);
-
-
-
-sword SDO_OCINumberToInt(OCIError *err, CONST OCINumber *number,
-
-                         uword rsl_length, uword rsl_flag, dvoid *rsl);
-
-
-
-sword SDO_OCINumberFromInt(OCIError *err, CONST dvoid *inum, uword inum_length,
-
-						   uword inum_s_flag, OCINumber *number);
-
-
-
-sword SDO_OCINumberToReal(OCIError *err, CONST OCINumber *number,
-
-                          uword rsl_length, dvoid *rsl);
-
-
-
-sword SDO_OCINumberFromReal(OCIError *err, CONST dvoid *rnum,
-
-                            uword rnum_length, OCINumber *number);
-
-
-
-sword SDO_OCINumberCmp(OCIError *err, CONST OCINumber *number1, 
-
-                       CONST OCINumber *number2, sword *result);
-
-
-
-sword SDO_OCINumberSign(OCIError *err, CONST OCINumber *number,
-
-                        sword *result);
-
-
-
-sword SDO_OCINumberIsZero(OCIError *err, CONST OCINumber *number,
-
-                          boolean *result);
-
-
-
-sword SDO_OCINumberAssign(OCIError *err, CONST OCINumber *from,
-
-                          OCINumber *to);
-
-
-
-sword SDO_OCINumberAbs(OCIError *err, CONST OCINumber *number,
-
-                       OCINumber *result);
-
-
-
-sword SDO_OCINumberCeil(OCIError *err, CONST OCINumber *number,
-
-                        OCINumber *result);
-
-
-
-sword SDO_OCINumberFloor(OCIError *err, CONST OCINumber *number, 
-
-                         OCINumber *result);
-
-
-
-sword SDO_OCINumberSqrt(OCIError *err, CONST OCINumber *number, 
-
-                        OCINumber *result);
-
-
-
-sword SDO_OCINumberTrunc(OCIError *err, CONST OCINumber *number, 
-
-                         sword decplace, OCINumber *result);
-
-
-
-sword SDO_OCINumberPower(OCIError *err, CONST OCINumber *base, 
-
-                         CONST OCINumber *number, OCINumber *result);
-
-
-
-sword SDO_OCINumberRound(OCIError *err, CONST OCINumber *number,
-
-                         sword decplace, OCINumber *result);
-
-
-
-sword SDO_OCINumberSin(OCIError *err, CONST OCINumber *number,
-
-                       OCINumber *result);
-
-
-
-sword SDO_OCINumberArcSin(OCIError *err, CONST OCINumber *number,
-
-                          OCINumber *result);
-
-
-
-sword SDO_OCINumberHypSin(OCIError *err, CONST OCINumber *number, 
-
-                          OCINumber *result);
-
-
-
-sword SDO_OCINumberCos(OCIError *err, CONST OCINumber *number, 
-
-                       OCINumber *result);
-
-
-
-sword SDO_OCINumberArcCos(OCIError *err, CONST OCINumber *number, 
-
-                          OCINumber *result);
-
-
-
-sword SDO_OCINumberHypCos(OCIError *err, CONST OCINumber *number, 
-
-                          OCINumber *result);
-
-
-
-sword SDO_OCINumberTan(OCIError *err, CONST OCINumber *number, 
-
-                       OCINumber *result);
-
-
-
-sword SDO_OCINumberArcTan(OCIError *err, CONST OCINumber *number, 
-
-                          OCINumber *result);
-
-
-
-sword SDO_OCINumberArcTan2(OCIError *err, CONST OCINumber *number1, 
-
-                           CONST OCINumber *number2, OCINumber *result);
-
-
-
-sword SDO_OCINumberHypTan(OCIError *err, CONST OCINumber *number, 
-
-                          OCINumber *result);
-
-
-
-sword SDO_OCINumberExp(OCIError *err, CONST OCINumber *number, 
-
-                       OCINumber *result);
-
-
-
-sword SDO_OCINumberLn(OCIError *err, CONST OCINumber *number, 
-
-                      OCINumber *result);
-
-
-
-sword SDO_OCINumberLog(OCIError *err, CONST OCINumber *base, 
-
-                       CONST OCINumber *number, OCINumber *result);
-
-
-
-sword SDO_OCIDateAssign(OCIError *err, CONST OCIDate *from, OCIDate *to);
-
-
-
-sword SDO_OCIDateToText(OCIError *err, CONST OCIDate *date, 
-
-                        CONST text *fmt, ub1 fmt_length, 
-
-                        CONST text *lang_name, ub4 lang_length, 
-
-                        ub4 *buf_size, text *buf);
-
-
-
-sword SDO_OCIDateFromText(OCIError *err, CONST text *date_str, 
-
-						  ub4 d_str_length, CONST text *fmt, ub1 fmt_length, 
-
-						  CONST text *lang_name, ub4 lang_length, 
-
-						  OCIDate *date);
-
-
-
-sword SDO_OCIDateCompare(OCIError *err, CONST OCIDate *date1, 
-
-						 CONST OCIDate *date2, sword *result);
-
-
-
-sword SDO_OCIDateAddMonths(OCIError *err, CONST OCIDate *date, sb4 num_months,
-
-                           OCIDate *result);
-
-
-
-sword SDO_OCIDateAddDays(OCIError *err, CONST OCIDate *date, sb4 num_days,
-
-                         OCIDate *result);
-
-
-
-sword SDO_OCIDateLastDay(OCIError *err, CONST OCIDate *date, 
-
-                         OCIDate *last_day);
-
-
-
-sword SDO_OCIDateDaysBetween(OCIError *err, CONST OCIDate *date1, 
-
-                             CONST OCIDate *date2, sb4 *num_days);
-
-
-
-sword SDO_OCIDateZoneToZone(OCIError *err, CONST OCIDate *date1,
-
-                            CONST text *zon1, ub4 zon1_length, 
-
-							CONST text *zon2, ub4 zon2_length, OCIDate *date2);
-
-
-
-sword SDO_OCIDateNextDay(OCIError *err, CONST OCIDate *date, CONST text *day_p, 
-
-                         ub4 day_length, OCIDate *next_day);
-
-
-
-
-
-sword SDO_OCIDateCheck(OCIError *err, CONST OCIDate *date, uword *valid);
-
-
-
-sword SDO_OCIDateSysDate(OCIError *err, OCIDate *sys_date);
-
-
-
-sword SDO_OCIStringAssign(OCIEnv *env, OCIError *err, CONST OCIString *rhs, 
-
-                          OCIString **lhs);
-
-
-
-sword SDO_OCIStringAssignText(OCIEnv *env, OCIError *err, CONST text *rhs, 
-
-                              ub4 rhs_len, OCIString **lhs);
-
-
-
-sword SDO_OCIStringResize(OCIEnv *env, OCIError *err, ub4 new_size, 
-
-                          OCIString **str);
-
-
-
-ub4 SDO_OCIStringSize(OCIEnv *env, CONST OCIString *vs);
-
-
-
-text *SDO_OCIStringPtr(OCIEnv *env, CONST OCIString *vs);
-
-
-
-sword SDO_OCIStringAllocSize(OCIEnv *env, OCIError *err, CONST OCIString *vs, 
-
-                             ub4 *allocsize);
-
-
-
-sword SDO_OCIRawAssignRaw(OCIEnv *env, OCIError *err, CONST OCIRaw *rhs, 
-
-                          OCIRaw **lhs);
-
-
-
-sword SDO_OCIRawAssignBytes(OCIEnv *env, OCIError *err, CONST ub1 *rhs, 
-
-                            ub4 rhs_len, OCIRaw **lhs);
-
-
-
-sword SDO_OCIRawResize(OCIEnv *env, OCIError *err, ub4 new_size, OCIRaw **raw);
-
-
-
-ub4 SDO_OCIRawSize(OCIEnv *env, CONST OCIRaw *raw);
-
-
-
-ub1 *SDO_OCIRawPtr(OCIEnv *env, CONST OCIRaw *raw);
-
-
-
-sword SDO_OCIRawAllocSize(OCIEnv *env, OCIError *err, CONST OCIRaw *raw,
-
-						  ub4 *allocsize);
-
-
-
-void SDO_OCIRefClear(OCIEnv *env, OCIRef *ref);
-
-
-
-sword SDO_OCIRefAssign(OCIEnv *env, OCIError *err, CONST OCIRef *source, 
-
-                       OCIRef **target);
-
-
-
-boolean SDO_OCIRefIsEqual(OCIEnv *env, CONST OCIRef *x, CONST OCIRef *y);
-
-
-
-boolean SDO_OCIRefIsNull(OCIEnv *env, CONST OCIRef *ref);
-
-
-
-ub4 SDO_OCIRefHexSize(OCIEnv *env, CONST OCIRef *ref);
-
-
-
-sword SDO_OCIRefFromHex(OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc, 
-
-                        CONST text *hex, ub4 length, OCIRef **ref);
-
-
-
-sword SDO_OCIRefToHex(OCIEnv *env, OCIError *err, CONST OCIRef *ref, 
-
-                      text *hex, ub4 *hex_length);
-
-
-
-sword SDO_OCICollSize(OCIEnv *env, OCIError *err, CONST OCIColl *coll, 
-
-					  sb4 *size);
-
-
-
-sb4 SDO_OCICollMax(OCIEnv *env, CONST OCIColl *coll);
-
-
-
-sword SDO_OCICollGetElem(OCIEnv *env, OCIError *err, CONST OCIColl *coll, 
-
-                         sb4 index, boolean *exists, dvoid **elem, 
-
-                         dvoid **elemind);
-
-
-
-sword SDO_OCICollAssignElem(OCIEnv *env, OCIError *err, sb4 index, 
-
-                            CONST dvoid *elem, 
-
-                            CONST dvoid *elemind, OCIColl *coll);
-
-
-
-sword SDO_OCICollAssign(OCIEnv *env, OCIError *err, CONST OCIColl *rhs, 
-
-                        OCIColl *lhs);
-
-
-
-sword SDO_OCICollAppend(OCIEnv *env, OCIError *err, CONST dvoid *elem, 
-
-                        CONST dvoid *elemind, OCIColl *coll);
-
-
-
-sword SDO_OCICollTrim(OCIEnv *env, OCIError *err, sb4 trim_num, 
-
-                      OCIColl *coll);
-
-
-
-sword SDO_OCIIterCreate(OCIEnv *env, OCIError *err, CONST OCIColl *coll, 
-
-                        OCIIter **itr);
-
-
-
-sword SDO_OCIIterDelete(OCIEnv *env, OCIError *err, OCIIter **itr);
-
-
-
-sword SDO_OCIIterInit(OCIEnv *env, OCIError *err, CONST OCIColl *coll, 
-
-                      OCIIter *itr);
-
-
-
-sword SDO_OCIIterGetCurrent(OCIEnv *env, OCIError *err, CONST OCIIter *itr, 
-
-                            dvoid **elem, dvoid **elemind);
-
-
-
-sword SDO_OCIIterNext(OCIEnv *env, OCIError *err, OCIIter *itr, 
-
-                      dvoid **elem, dvoid **elemind, boolean *eoc);
-
-
-
-sword SDO_OCIIterPrev(OCIEnv *env, OCIError *err, OCIIter *itr, 
-
-                      dvoid **elem, dvoid **elemind, boolean *boc);
-
-
-
-sword SDO_OCITableSize(OCIEnv *env, OCIError *err, CONST OCITable *tbl, 
-
-					   sb4 *size);
-
-
-
-sword SDO_OCITableExists(OCIEnv *env, OCIError *err, CONST OCITable *tbl,
-
-						 sb4 index, boolean *exists);
-
-
-
-sword SDO_OCITableDelete(OCIEnv *env, OCIError *err, sb4 index, OCITable *tbl);
-
-
-
-sword SDO_OCITableFirst(OCIEnv *env, OCIError *err, CONST OCITable *tbl, 
-
-                        sb4 *index);
-
-
-
-sword SDO_OCITableLast(OCIEnv *env, OCIError *err, CONST OCITable *tbl, 
-
-                       sb4 *index);
-
-
-
-sword SDO_OCITableNext(OCIEnv *env, OCIError *err, sb4 index, 
-
-					   CONST OCITable *tbl, sb4 *next_index, boolean *exists);
-
-
-
-sword SDO_OCITablePrev(OCIEnv *env, OCIError *err, sb4 index, 
-
-                       CONST OCITable *tbl, sb4 *prev_index, boolean *exists);
-
-
-
-
-
-/********************************************************************************/
-
-/* Part IV -- OCI open type manager interfaces                                  */
-
-/********************************************************************************/
-
-sword SDO_OCITypeIterNew(OCIEnv *env, OCIError *err, OCIType *tdo, 
-
-                         OCITypeIter **iteratorOCI);
-
-
-
-sword SDO_OCITypeIterSet(OCIEnv *env, OCIError *err, OCIType *tdo, 
-
-						 OCITypeIter *iteratorOCI);
-
-
-
-sword SDO_OCITypeIterFree(OCIEnv *env, OCIError *err, OCITypeIter *iteratorOCI);
-
-
-
-sword SDO_OCITypeByName(OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc, 
-
-                        CONST text *schema_name, ub4 s_length,
-
-                        CONST text *type_name, ub4 t_length,
-
-                        CONST text *version_name, ub4 v_length,
-
-                        OCIDuration pin_duration, OCITypeGetOpt get_option,
-
-                        OCIType **tdo);
-
-
-
-sword SDO_OCITypeArrayByName(OCIEnv *env, OCIError *err, CONST OCISvcCtx *svc,
-
-                             ub4 array_len, CONST text *schema_name[], 
-
-							 ub4 s_length[], CONST text *type_name[], 
-
-							 ub4 t_length[], CONST text *version_name[], 
-
-							 ub4 v_length[], OCIDuration pin_duration,
-
-                             OCITypeGetOpt get_option, OCIType *tdo[]);
-
-
-
-sword SDO_OCITypeByRef(OCIEnv *env, OCIError *err, CONST OCIRef *type_ref, 
-
-					   OCIDuration pin_duration,OCITypeGetOpt get_option, 
-
-					   OCIType **tdo);
-
-
-
-sword SDO_OCITypeArrayByRef(OCIEnv *env, OCIError *err, ub4 array_len, 
-
-							CONST OCIRef *type_ref[], OCIDuration pin_duration,
-
-							OCITypeGetOpt get_option, OCIType *tdo[]);
-
-
-
-text* SDO_OCITypeName(OCIEnv *env, OCIError *err, CONST OCIType *tdo, 
-
-                      ub4 *n_length);
-
-
-
-text* SDO_OCITypeSchema(OCIEnv *env, OCIError *err, CONST OCIType *tdo, 
-
-						ub4 *n_length);
-
-
-
-OCITypeCode SDO_OCITypeTypeCode(OCIEnv *env, OCIError *err, CONST OCIType *tdo);
-
-
-
-OCITypeCode SDO_OCITypeCollTypeCode(OCIEnv *env, OCIError *err, 
-
-									CONST OCIType *tdo);
-
-
-
-text* SDO_OCITypeVersion(OCIEnv *env, OCIError *err, CONST OCIType *tdo, 
-
-                         ub4 *v_length);
-
-
-
-ub4 SDO_OCITypeAttrs(OCIEnv *env, OCIError *err, CONST OCIType *tdo);
-
-
-
-ub4 SDO_OCITypeMethods(OCIEnv *env, OCIError *err, CONST OCIType *tdo);
-
-
-
-text* SDO_OCITypeElemName(OCIEnv *env, OCIError *err, CONST OCITypeElem *elem, 
-
-                          ub4 *n_length);
-
-
-
-OCITypeCode SDO_OCITypeElemTypeCode(OCIEnv *env, OCIError *err,
-
-                                    CONST OCITypeElem *elem);
-
-
-
-sword SDO_OCITypeElemType(OCIEnv *env, OCIError *err, CONST OCITypeElem *elem, 
-
-                          OCIType **elem_tdo);
-
-
-
-ub4 SDO_OCITypeElemFlags(OCIEnv *env, OCIError *err, CONST OCITypeElem *elem);
-
-
-
-ub1 SDO_OCITypeElemNumPrec(OCIEnv *env, OCIError *err, CONST OCITypeElem *elem);
-
-
-
-sb1 SDO_OCITypeElemNumScale(OCIEnv *env, OCIError *err, CONST OCITypeElem *elem);
-
-
-
-ub4 SDO_OCITypeElemLength(OCIEnv *env, OCIError *err, CONST OCITypeElem *elem);
-
-
-
-ub2 SDO_OCITypeElemCharSetID(OCIEnv *env, OCIError *err, CONST OCITypeElem *elem);
-
-
-
-ub2 SDO_OCITypeElemCharSetForm(OCIEnv *env, OCIError *err, CONST OCITypeElem *elem);
-
-
-
-sword SDO_OCITypeElemParameterizedType(OCIEnv *env, OCIError *err,
-
-                                       CONST OCITypeElem *elem, 
-
-									   OCIType **type_stored);
-
-
-
-OCITypeCode SDO_OCITypeElemExtTypeCode(OCIEnv *env, OCIError *err,
-
-                                       CONST OCITypeElem *elem);
-
-
-
-sword SDO_OCITypeAttrByName(OCIEnv *env, OCIError *err, CONST OCIType *tdo, 
-
-                            CONST text *name, ub4 n_length, OCITypeElem **elem);
-
-
-
-sword SDO_OCITypeAttrNext(OCIEnv *env, OCIError *err, OCITypeIter *iteratorOCI,
-
-                          OCITypeElem **elem);
-
-
-
-sword SDO_OCITypeCollElem(OCIEnv *env, OCIError *err, CONST OCIType *tdo,
-
-                          OCITypeElem **element);
-
-
-
-sword SDO_OCITypeCollSize(OCIEnv *env, OCIError *err, CONST OCIType *tdo, 
-
-                          ub4 *num_elems);
-
-
-
-sword SDO_OCITypeCollExtTypeCode(OCIEnv *env, OCIError *err,
-
-                                 CONST OCIType *tdo, OCITypeCode *sqt_code);
-
-
-
-ub4 SDO_OCITypeMethodOverload(OCIEnv *env, OCIError *err, CONST OCIType *tdo, 
-
-                              CONST text *method_name, ub4 m_length);
-
-
-
-sword SDO_OCITypeMethodByName(OCIEnv *env, OCIError *err, CONST OCIType *tdo, 
-
-                              CONST text *method_name, ub4 m_length,
-
-                              OCITypeMethod **mdos);
-
-
-
-sword SDO_OCITypeMethodNext(OCIEnv *env, OCIError *err, OCITypeIter *iteratorOCI,
-
-                            OCITypeMethod **mdo);
-
-
-
-text *SDO_OCITypeMethodName(OCIEnv *env, OCIError *err,
-
-                            CONST OCITypeMethod *mdo, ub4 *n_length);
-
-
-
-OCITypeEncap SDO_OCITypeMethodEncap(OCIEnv *env, OCIError *err,
-
-                                    CONST OCITypeMethod *mdo);
-
-
-
-OCITypeMethodFlag SDO_OCITypeMethodFlags(OCIEnv *env, OCIError *err,
-
-                                         CONST OCITypeMethod *mdo);
-
-
-
-sword SDO_OCITypeMethodMap(OCIEnv *env, OCIError *err, CONST OCIType *tdo, 
-
-                           OCITypeMethod **mdo);
-
-
-
-sword SDO_OCITypeMethodOrder(OCIEnv *env, OCIError *err, CONST OCIType *tdo, 
-
-                             OCITypeMethod **mdo);
-
-
-
-ub4 SDO_OCITypeMethodParams(OCIEnv *env, OCIError *err,
-
-                            CONST OCITypeMethod *mdo);
-
-
-
-sword SDO_OCITypeResult(OCIEnv *env, OCIError *err, CONST OCITypeMethod *mdo,
-
-                        OCITypeElem **elem);
-
-
-
-sword SDO_OCITypeParamByPos(OCIEnv *env, OCIError *err, CONST OCITypeMethod *mdo, 
-
-							ub4 position, OCITypeElem **elem);
-
-
-
-sword SDO_OCITypeParamByName(OCIEnv *env, OCIError *err, CONST OCITypeMethod *mdo, 
-
-                             CONST text *name, ub4 n_length, OCITypeElem **elem);
-
-
-
-sword SDO_OCITypeParamPos(OCIEnv *env, OCIError *err, CONST OCITypeMethod *mdo, 
-
-                          CONST text *name, ub4 n_length, ub4 *position, 
-
-                          OCITypeElem **elem);
-
-
-
-OCITypeParamMode SDO_OCITypeElemParamMode(OCIEnv *env, OCIError *err,
-
-                                          CONST OCITypeElem *elem);
-
-
-
-text* SDO_OCITypeElemDefaultValue(OCIEnv *env, OCIError *err,
-
-                                  CONST OCITypeElem *elem, ub4 *d_v_length);
-
-
-
-sword SDO_OCITypeVTInit(OCIEnv *env, OCIError *err);
-
- 
-
-sword SDO_OCITypeVTInsert(OCIEnv *env, OCIError *err, CONST text *schema_name,
-
-						  ub4 s_n_length, CONST text *type_name, ub4 t_n_length, 
-
-						  CONST text *user_version, ub4 u_v_length);
-
-
-
-sword SDO_OCITypeVTSelect(OCIEnv *env, OCIError *err, CONST text *schema_name,
-
-						  ub4 s_n_length, CONST text *type_name, ub4 t_n_length, 
-
-						  text **user_version, ub4 *u_v_length, ub2 *version);
-
-
-#endif /* SDO_OCI_H */
-
-
diff --git a/src/terralib/drivers/PAMDecoder/TeDecoderPAM.cpp b/src/terralib/drivers/PAMDecoder/TeDecoderPAM.cpp
new file mode 100755
index 0000000..75c8b2a
--- /dev/null
+++ b/src/terralib/drivers/PAMDecoder/TeDecoderPAM.cpp
@@ -0,0 +1,295 @@
+#include "TeDecoderPAM.h"
+
+#include <TeAgnostic.h>
+#include <TeUtils.h>
+
+extern "C"
+{
+  #include <pam.h>
+}
+
+#include <assert.h>
+#include <string.h>
+
+
+TeDecoderPAM::TeDecoderPAM ()
+{ 
+  initVars();
+  
+  params_.decoderIdentifier_ = "PAM";
+};
+
+
+TeDecoderPAM::TeDecoderPAM ( const TeRasterParams& par )
+{
+  initVars();
+  
+  params_ = par; 
+  params_.decoderIdentifier_ = "PAM"; 
+};
+
+
+
+TeDecoderPAM::~TeDecoderPAM ()
+{
+  /* Writing data to disk file */
+  
+  if ( ( ( params_.mode_ == 'c' ) || ( params_.mode_ == 'w') ) &&
+    ( params_.status_ == TeRasterParams::TeReadyToWrite ) &&
+    ( params_.nBands() > 0 ) && ( params_.nlines_ > 0 ) && 
+    ( params_.ncols_ > 0 ) && ( ! params_.fileName_.empty() ) ) {
+    
+    /* Defining the PAM Handler */
+    
+    pam pam_file_handler;
+    
+    pam_file_handler.size = sizeof( pam );
+    pam_file_handler.len = sizeof( pam );
+    
+    std::string extension = TeConvertToUpperCase( TeGetExtension( 
+      params_.fileName_.c_str() ) );
+      
+    if( extension == "PBM" ) {
+      pam_file_handler.format = PBM_FORMAT;
+      strcpy( pam_file_handler.tuple_type, "BLACKANDWHITE" );
+    } else if( extension == "PGM" ) {
+      pam_file_handler.format = PGM_FORMAT;
+      strcpy( pam_file_handler.tuple_type, "GRAYSCALE" );
+    } else if( extension == "PPM" ) {
+      pam_file_handler.format = PPM_FORMAT;
+      strcpy( pam_file_handler.tuple_type, "RGB" );
+    } else {
+      TEAGN_LOG_AND_THROW( "Invalid file format" )
+    }
+    
+    pam_file_handler.plainformat = 0;
+    
+    pam_file_handler.height = params_.nlines_;
+    pam_file_handler.width = params_.ncols_;
+    pam_file_handler.depth = params_.nBands();
+    
+    switch( params_.dataType_[ 0 ] ) {
+      case TeUNSIGNEDCHAR :
+      {
+        pam_file_handler.maxval = 255;
+        pam_file_handler.bytes_per_sample = 1;
+        break;
+      }
+      case TeUNSIGNEDSHORT :
+      {
+        pam_file_handler.maxval = 65535;
+        pam_file_handler.bytes_per_sample = 2;
+        break;
+      }      
+      default :
+      {
+        TEAGN_LOG_AND_THROW( "Invalid data type" )
+        break;
+      }
+    }
+    
+    pam_file_handler.allocation_depth = params_.nBands();    
+  
+    FILE* image_file_ptr = fopen( params_.fileName_.c_str(), "w" );
+    if( image_file_ptr != 0 ) {
+      pam_file_handler.file = image_file_ptr;
+      
+      pnm_writepaminit( &pam_file_handler );    
+      
+      /* encoding data into file */
+        
+      tuple* tuple_ptr = pnm_allocpamrow( &pam_file_handler );
+      if( tuple_ptr == 0 ) {
+        fclose( image_file_ptr );
+        TEAGN_LOG_AND_THROW( "TeDecoderPAM init error" )
+      }
+        
+      int line = 0;
+      int col = 0;
+      unsigned int channel = 0; 
+      double value = 0;
+        
+      TeProgressBase* prog_interf = TeProgress::instance();
+      if( prog_interf != 0 ) {
+        prog_interf->setMessage( "Encoding image" );
+        prog_interf->setTotalSteps( 100 );
+      }
+        
+      for( line = 0 ; line < pam_file_handler.height ; ++line ) {
+        if( prog_interf != 0 ) {
+          prog_interf->setProgress( (int)( 100.0 * ( (double)line) / 
+            ((double)pam_file_handler.height ) ) );
+        }
+        
+        for( col = 0 ; col < pam_file_handler.width ; ++col ) {
+        
+          for( channel = 0 ; channel < pam_file_handler.depth ; ++channel ) {
+          
+            getElement( col, line, value, channel );
+            tuple_ptr[ col ][ channel ] = (sample)value;
+          }
+        }        
+        
+        pnm_writepamrow( &pam_file_handler, tuple_ptr );
+      }
+        
+      if( prog_interf != 0 ) {
+        prog_interf->reset();
+      }
+        
+      pnm_freepamrow( tuple_ptr );      
+    
+      fclose( image_file_ptr );
+    }  
+  }
+  
+  /* Free the memory structures */
+
+  clear();
+}
+
+void TeDecoderPAM::init()
+{
+  clear();
+  
+  params_.status_ = TeRasterParams::TeNotReady;
+  
+  if (params_.mode_ == 'c' || params_.mode_ == 'w') // creating a new file
+  {
+    bool params_checks_ok = true;
+    
+    std::string extension = TeConvertToUpperCase( TeGetExtension( 
+      params_.fileName_.c_str() ) );
+      
+    /* Checking extension */  
+      
+    if( ( extension == "PPM" ) && ( params_.nBands() != 3 ) ) {
+      params_checks_ok = false;
+    }
+    
+    /* Checking data type */
+    
+    for( int band_index = 0 ; band_index < params_.nBands() ;
+      ++band_index ) {
+      
+      if( ( params_.dataType_[ band_index ] != TeUNSIGNEDCHAR ) &&
+        ( params_.dataType_[ band_index ] != TeUNSIGNEDSHORT ) ) {
+        
+        TEAGN_LOGERR( "Invalid data type ( band " + Te2String( band_index ) +
+          ")" )
+        
+        params_checks_ok = false;
+        break;
+      }
+    }
+    
+    if( params_checks_ok ) {
+      TeDecoderSmartMem::init();
+    }
+  } else if (params_.mode_ == 'r') {
+    /* Creating PAM handler */
+    
+    FILE* image_file_ptr = fopen( params_.fileName_.c_str(), "r" );
+    if( image_file_ptr != 0 ) {
+      pam pam_file_handler;
+      
+      pnm_readpaminit( image_file_ptr, &pam_file_handler, 
+        PAM_STRUCT_SIZE(tuple_type) );
+        
+      if( ( pam_file_handler.height != 0  && ( pam_file_handler.width != 0 ) 
+        ) ) {
+        /* updating the current parameters */
+        
+        if( pam_file_handler.bytes_per_sample == 1 ) {
+          params_.setDataType( TeUNSIGNEDCHAR, -1 );  
+        } else if( pam_file_handler.bytes_per_sample == 2 ) {
+          params_.setDataType( TeUNSIGNEDSHORT, -1 );  
+        } else  {
+          fclose( image_file_ptr );
+          TEAGN_LOG_AND_THROW( "Invalid bytes_per_sample value" )
+        }
+        
+        params_.nBands( pam_file_handler.depth );
+        
+        std::string tuple_type( pam_file_handler.tuple_type );
+        if( tuple_type.find( "RGB" ) < tuple_type.size() ) {
+          params_.setPhotometric( TeRasterParams::TeRGB );
+        } else {
+          params_.setPhotometric( TeRasterParams::TeMultiBand );
+        }
+        
+        params_.useDummy_ = false;
+        
+        params_.setNLinesNColumns( pam_file_handler.height, 
+          pam_file_handler.width );
+          
+        /* Creating the new memory data structures */
+        
+        TeDecoderSmartMem::init();
+        
+        if( params_.status_ != TeRasterParams::TeNotReady ) {
+          /* Decoding data into memory */
+          
+          tuple* tuple_ptr = pnm_allocpamrow( &pam_file_handler );
+          if( tuple_ptr == 0 ) {
+            fclose( image_file_ptr );
+            TEAGN_LOG_AND_THROW( "TeDecoderPAM init error" )
+          }
+          
+          int line = 0;
+          int col = 0;
+          unsigned int channel = 0; 
+          
+          TeProgressBase* prog_interf = TeProgress::instance();
+          if( prog_interf != 0 ) {
+            prog_interf->setMessage( "Decoding image" );
+            prog_interf->setTotalSteps( 100 );
+          }
+          
+          for( line = 0 ; line < pam_file_handler.height ; ++line ) {
+            if( prog_interf != 0 ) {
+              prog_interf->setProgress( (int)( 100.0 * ( (double)line ) / 
+                ( (double)pam_file_handler.height ) ) );
+            }
+          
+            pnm_readpamrow( &pam_file_handler, tuple_ptr );
+              
+            for( col = 0 ; col < pam_file_handler.width ; ++col ) {
+              for( channel = 0 ; channel < pam_file_handler.depth ; ++channel ) {
+                setElement( col, line, (double)tuple_ptr[ col ][ channel ], 
+                  channel );
+              }
+            }
+          }
+          
+          if( prog_interf != 0 ) {
+            prog_interf->reset();
+          }
+          
+          pnm_freepamrow( tuple_ptr );
+        
+          params_.status_ = TeRasterParams::TeReadyToRead;
+        }
+      }
+      
+      fclose( image_file_ptr );
+    }
+  }
+}
+
+
+bool registerPAMDecoder()
+{
+  static TeDecoderPAMFactory TeDecoderPAMFactory_instance("PAM");
+  
+  TeDecoderFactory::instanceName2Dec()["PBM"] = "PAM";  
+  TeDecoderFactory::instanceName2Dec()["pbm"] = "PAM";
+
+  TeDecoderFactory::instanceName2Dec()["PGM"] = "PAM";  
+  TeDecoderFactory::instanceName2Dec()["pgm"] = "PAM";
+
+  TeDecoderFactory::instanceName2Dec()["PPM"] = "PAM";  
+  TeDecoderFactory::instanceName2Dec()["ppm"] = "PAM";
+  
+  return true;  
+};
diff --git a/src/terralib/drivers/PAMDecoder/TeDecoderPAM.h b/src/terralib/drivers/PAMDecoder/TeDecoderPAM.h
new file mode 100755
index 0000000..0330369
--- /dev/null
+++ b/src/terralib/drivers/PAMDecoder/TeDecoderPAM.h
@@ -0,0 +1,85 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/** \file TeDecoderPAM.h
+ *  \brief Implements a decoder to read/write PAM (Portable Arbitrary Maps) 
+ * image files ( PBM, PGM, or PPM formats).
+ */
+#ifndef  TEDECODERPAM_H
+#define  TEDECODERPAM_H
+
+#include <TeDecoderSmartMem.h>
+#include <TeRasterMemManager.h>
+
+class TeDecoderPAMFactory;
+
+/** 
+ * @brief Implements a decoder to read/write PAM (Portable Arbitrary Maps) 
+ * image files (PBM, PGM, or PPM formats).
+ * @note No interleaving support.
+ * @note libnetpbm devel 10.26 linking required.
+ * @note Both TeDecoderPAM.h and TeDecoderPAM.cpp must be compiled into 
+ * application code.
+ * @note TeDecoderPAM.h must be included into application main.cpp to
+ * register the decoder with the TerraLib decoder factory.
+ * @note Only TeUNSIGNEDCHAR and TeUNSIGNEDSHORT supported formats.
+ */
+class TeDecoderPAM : public TeDecoderSmartMem
+{
+
+public:
+
+  //! @brief Empty constructor
+  TeDecoderPAM ();
+
+  //! @brief Constructor from parameters
+  TeDecoderPAM ( const TeRasterParams& par );
+
+  //! @brief Destructor
+  virtual ~TeDecoderPAM ();
+
+  //! @brief Initializes the internal structures of the decoder
+  virtual void  init  ();
+
+};
+
+//! Implements a factory to build decoder to MEMORY raster
+class TeDecoderPAMFactory : public TeDecoderFactory
+{
+public:
+
+  //! Factory constructor
+  TeDecoderPAMFactory(const string& name) : TeDecoderFactory(name) {}
+
+  //! Builds the object
+  virtual TeDecoder* build (const TeRasterParams& arg)
+  {  return new TeDecoderPAM(arg); }
+};
+
+bool registerPAMDecoder();
+
+namespace {
+  static bool register_result = registerPAMDecoder();
+};  
+  
+#endif
+
diff --git a/src/terralib/drivers/PostgreSQL/TePGInterface.cpp b/src/terralib/drivers/PostgreSQL/TePGInterface.cpp
old mode 100644
new mode 100755
index 78ae72d..4176d3c
--- a/src/terralib/drivers/PostgreSQL/TePGInterface.cpp
+++ b/src/terralib/drivers/PostgreSQL/TePGInterface.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -22,7 +22,8 @@ of this library and its documentation.
 *************************************************************************************/
 
 /*
- * TODO: 1. N�O PEGAR O DOBRO DE REGISTROS NA VOLTA (MOVE PREVIOUS) NO FUTURO!!!!
+ * TODO: 1. NAO PEGAR O DOBRO DE REGISTROS NA VOLTA (MOVE PREVIOUS) NO FUTURO!!!!
+ *       2. set datestyle = 'ISO, YMD'
  *
  */
 
@@ -30,7 +31,7 @@ of this library and its documentation.
 #include "TePGUtils.h"
 #include <stdexcept>
 #include <string>
-
+#include <climits>
 
 
 #include "TeUtils.h"
@@ -60,6 +61,26 @@ using namespace std;
 /*******************************
  * FUN��ES AUXILIARES          *
  *******************************/
+// swapp bytes
+unsigned int TePGSwapUInt(const unsigned int& uintVal)
+{
+	char uintIn[4], uintOut[4];
+
+	unsigned int outVal;
+
+	memcpy(uintIn,&uintVal,4);
+
+	uintOut[0] = uintIn[3];
+	uintOut[1] = uintIn[2];
+	uintOut[2] = uintIn[1];
+	uintOut[3] = uintIn[0];
+
+	memcpy (&outVal,uintOut,4);
+
+	return outVal;
+}
+
+
 // This function is the same parse_hex function in PostGIS rc3 source code.
 inline unsigned char parse_hex(char *str)
 {
@@ -173,6 +194,326 @@ inline unsigned char parse_hex(char *str)
 	return (unsigned char) ((result_high<<4) + result_low);
 }
 
+//Os trechos abaixo fram retirados do codigo fonte do Servidor PostgreSQL, pois aqui utilizamos cursores binarios
+// timestamp values are stored as seconds before or after midnight 2000-01-01
+#define UNIX_EPOCH_JDATE		2440588 /* == date2j(1970, 1, 1) */
+
+#define POSTGRES_EPOCH_JDATE	2451545 /* == date2j(2000, 1, 1) */
+#define MAXDATELEN		51		/* maximum possible length of an input date string (not counting tr. null) */
+#define MAXDATEFIELDS	25		/* maximum possible number of fields in a date string */
+
+typedef int TeDateADT;
+typedef long long int te_int64;
+typedef te_int64 te_pg_time_t;
+
+typedef int te_fsec_t;
+
+/* Decide if we need to decorate 64-bit constants */
+//#ifdef HAVE_LL_CONSTANTS
+#define INT64CONST(x)  ((te_int64) x##LL)
+//#else
+//#define INT64CONST(x)  ((te_int64) x)
+//#endif
+
+
+#define DT_NOBEGIN		(-INT64CONST(0x7fffffffffffffff) - 1)
+#define DT_NOEND		(INT64CONST(0x7fffffffffffffff))
+
+#define TIMESTAMP_NOBEGIN(j)	do {j = DT_NOBEGIN;} while (0)
+#define TIMESTAMP_IS_NOBEGIN(j) ((j) == DT_NOBEGIN)
+
+#define TIMESTAMP_NOEND(j)		do {j = DT_NOEND;} while (0)
+#define TIMESTAMP_IS_NOEND(j)	((j) == DT_NOEND)
+
+#define TIMESTAMP_NOT_FINITE(j) (TIMESTAMP_IS_NOBEGIN(j) || TIMESTAMP_IS_NOEND(j))
+
+#define TMODULO_INT64(t,q,u) \
+do { \
+	q = (t / u); \
+	if (q != 0) t -= (q * u); \
+} while(0)
+
+
+
+struct te_pg_tm
+{
+	int			tm_sec;
+	int			tm_min;
+	int			tm_hour;
+	int			tm_mday;
+	int			tm_mon;			/* origin 0, not 1 */
+	int			tm_year;		/* relative to 1900 */
+	int			tm_wday;
+	int			tm_yday;
+	int			tm_isdst;
+	long int	tm_gmtoff;
+	const char *tm_zone;
+};
+
+inline void j2date(int jd, int *year, int *month, int *day)
+{
+	unsigned int julian;
+	unsigned int quad;
+	unsigned int extra;
+	int			y;
+
+	julian = jd;
+	julian += 32044;
+	quad = julian / 146097;
+	extra = (julian - quad * 146097) * 4 + 3;
+	julian += 60 + quad * 3 + extra / 146097;
+	quad = julian / 1461;
+	julian -= quad * 1461;
+	y = julian * 4 / 1461;
+	julian = ((y != 0) ? ((julian + 305) % 365) : ((julian + 306) % 366))
+		+ 123;
+	y += quad * 4;
+	*year = y - 4800;
+	quad = julian * 2141 / 65536;
+	*day = julian - 7834 * quad / 256;
+	*month = (quad + 10) % 12 + 1;
+
+	return;
+}	/* j2date() */
+
+/* EncodeDateOnly()
+ * Encode date as local time.
+ */
+inline bool EncodeDateOnly(struct te_pg_tm* tm, char *str)
+{
+	if ((tm->tm_mon < 1) || (tm->tm_mon > 12))
+		return false;
+
+	/* compatible with ISO date formats */
+	if (tm->tm_year > 0)
+		sprintf(str, "%04d-%02d-%02d",
+				tm->tm_year, tm->tm_mon, tm->tm_mday);
+	else
+		sprintf(str, "%04d-%02d-%02d %s", -(tm->tm_year - 1), tm->tm_mon, tm->tm_mday, "BC");
+
+	
+	return true;
+}	/* EncodeDateOnly() */
+
+inline  int time2tm(te_int64 time, struct te_pg_tm * tm, te_fsec_t *fsec)
+{
+	tm->tm_hour = (int)((time / INT64CONST(3600000000)));
+	time -= (tm->tm_hour * INT64CONST(3600000000));
+	tm->tm_min = (int)((time / INT64CONST(60000000)));
+	time -= (tm->tm_min * INT64CONST(60000000));
+	tm->tm_sec = (int)((time / INT64CONST(1000000)));
+	time -= (tm->tm_sec * INT64CONST(1000000));
+	*fsec = (te_fsec_t)time;
+
+	return 0;
+}
+
+/* EncodeTimeOnly()
+ * Encode time fields only.
+ */
+inline bool EncodeTimeOnly(struct te_pg_tm * tm, te_fsec_t fsec, int *tzp, char *str)
+{
+	if ((tm->tm_hour < 0) || (tm->tm_hour > 24))
+		return false;
+
+	sprintf(str, "%02d:%02d", tm->tm_hour, tm->tm_min);
+
+	/*
+	 * Print fractional seconds if any.  The field widths here should be
+	 * at least equal to the larger of MAX_TIME_PRECISION and
+	 * MAX_TIMESTAMP_PRECISION.
+	 */
+	if(fsec != 0)
+	{
+		sprintf((str + strlen(str)), ":%02d.%06d", tm->tm_sec, fsec);
+
+		/* chop off trailing pairs of zeros... */
+		while ((strcmp((str + strlen(str) - 2), "00") == 0)
+			   && (*(str + strlen(str) - 3) != '.'))
+			*(str + strlen(str) - 2) = '\0';
+	}
+	else
+		sprintf((str + strlen(str)), ":%02d", tm->tm_sec);
+
+	if(tzp != NULL)
+	{
+		int			hour,
+					min;
+
+		hour = -(*tzp / 3600);
+		min = ((abs(*tzp) / 60) % 60);
+		sprintf((str + strlen(str)), ((min != 0) ? "%+03d:%02d" : "%+03d"), hour, min);
+	}
+
+	return true;
+}	/* EncodeTimeOnly() */
+
+inline void TrimTrailingZeros(char *str)
+{
+	size_t	len = strlen(str);
+
+	/* chop off trailing zeros... but leave at least 2 fractional digits */
+	while ((*(str + len - 1) == '0') && (*(str + len - 3) != '.'))
+	{
+		len--;
+		*(str + len) = '\0';
+	}
+}
+
+
+/* EncodeDateTime()
+ * Encode date and time interpreted as local time.
+ * Support several date styles:
+ *	Postgres - day mon hh:mm:ss yyyy tz
+ *	SQL - mm/dd/yyyy hh:mm:ss.ss tz
+ *	ISO - yyyy-mm-dd hh:mm:ss+/-tz
+ *	German - dd.mm.yyyy hh:mm:ss tz
+ * Variants (affects order of month and day for Postgres and SQL styles):
+ *	US - mm/dd/yyyy
+ *	European - dd/mm/yyyy
+ */
+inline bool EncodeDateTime(struct te_pg_tm * tm, te_fsec_t fsec, int *tzp, char ** /* tzn */, char *str)
+{
+	int			hour,
+				min;
+
+	if ((tm->tm_mon < 1) || (tm->tm_mon > 12))
+		return false;
+
+	/* Compatible with ISO-8601 date formats */
+
+	sprintf(str, "%04d-%02d-%02d %02d:%02d",
+		  ((tm->tm_year > 0) ? tm->tm_year : -(tm->tm_year - 1)),
+			tm->tm_mon, tm->tm_mday, tm->tm_hour, tm->tm_min);
+
+	/*
+		* Print fractional seconds if any.  The field widths here
+		* should be at least equal to MAX_TIMESTAMP_PRECISION.
+		*
+		* In float mode, don't print fractional seconds before 1 AD,
+		* since it's unlikely there's any precision left ...
+		*/
+
+	if (fsec != 0)
+	{
+		sprintf((str + strlen(str)), ":%02d.%06d", tm->tm_sec, fsec);
+		TrimTrailingZeros(str);
+	}
+	else
+        sprintf((str + strlen(str)), ":%02d", tm->tm_sec);
+
+	/*
+		* tzp == NULL indicates that we don't want *any* time zone
+		* info in the output string. *tzn != NULL indicates that we
+		* have alpha time zone info available. tm_isdst != -1
+		* indicates that we have a valid time zone translation.
+		*/
+	if ((tzp != NULL) && (tm->tm_isdst >= 0))
+	{
+		hour = -(*tzp / 3600);
+		min = ((abs(*tzp) / 60) % 60);
+		sprintf((str + strlen(str)), ((min != 0) ? "%+03d:%02d" : "%+03d"), hour, min);
+	}
+
+	if (tm->tm_year <= 0)
+		sprintf((str + strlen(str)), " BC");
+
+	return true;
+}
+
+
+/* EncodeSpecialTimestamp()
+ * Convert reserved timestamp data type to string.
+ */
+inline bool EncodeSpecialTimestamp(te_int64 dt, char *str)
+{
+	if (TIMESTAMP_IS_NOBEGIN(dt))
+		strcpy(str, "-infinity");
+	else if (TIMESTAMP_IS_NOEND(dt))
+		strcpy(str, "infinity");
+	else
+		return false;
+
+	return true;
+}	/* EncodeSpecialTimestamp() */
+
+inline  void dt2time(te_int64 jd, int *hour, int *min, int *sec, te_fsec_t *fsec)
+{
+
+	te_int64		time;
+
+	time = jd;
+
+	*hour = (int)((time / INT64CONST(3600000000)));
+	time -= ((*hour) * INT64CONST(3600000000));
+	*min = (int)((time / INT64CONST(60000000)));
+	time -= ((*min) * INT64CONST(60000000));
+	*sec = (int)((time / INT64CONST(1000000)));
+	*fsec = (te_fsec_t)(time - (*sec * INT64CONST(1000000)));
+
+	return;
+}	/* dt2time() */
+
+
+/*
+ * timestamp2tm() - Convert timestamp data type to POSIX time structure.
+ *
+ * Note that year is _not_ 1900-based, but is an explicit full value.
+ * Also, month is one-based, _not_ zero-based.
+ * Returns:
+ *	 0 on success
+ *	-1 on out of range
+ */
+bool timestamp2tm(te_int64 dt, int *tzp, struct te_pg_tm * tm, te_fsec_t *fsec, char **tzn)
+{
+	te_int64 date;
+	te_int64	time;
+
+	/*
+	 * If HasCTZSet is true then we have a brute force time zone
+	 * specified. Go ahead and rotate to the local time zone since we will
+	 * later bypass any calls which adjust the tm fields.
+	 */
+	//if (HasCTZSet && (tzp != NULL))
+	//{
+	//	dt -= CTimeZone * INT64CONST(1000000);
+	//
+	//}
+
+	time = dt;
+
+	TMODULO_INT64(time, date, INT64CONST(86400000000));
+
+	if (time < INT64CONST(0))
+	{
+		time += INT64CONST(86400000000);
+		date	  -=1;
+	}
+
+	/* add offset to go from J2000 back to standard Julian date */
+	date	  +=POSTGRES_EPOCH_JDATE;
+
+	/* Julian day routine does not work for negative Julian days */
+	if (date <0 || date > (te_int64) INT_MAX)
+		return false;
+
+	j2date((int) date, &tm->tm_year, &tm->tm_mon, &tm->tm_mday);
+	dt2time(time, &tm->tm_hour, &tm->tm_min, &tm->tm_sec, fsec);
+
+	/* Done if no TZ conversion wanted */
+	if (tzp == NULL)
+	{
+		tm->tm_isdst = -1;
+		tm->tm_gmtoff = 0;
+		tm->tm_zone = NULL;
+		if (tzn != NULL)
+			*tzn = NULL;
+		return true;
+	}
+
+	return false;
+//	return true;
+}
 
 /*******************************
  * Definicao de TePGConnection *
@@ -186,6 +527,13 @@ bool TePGConnection::open(const string& str_connection)
 	if(this->state())
 	{
 		int_connection_ = 1;
+
+		string off = "off";
+		string answer = PQparameterStatus(pg_connection_, "integer_datetimes");
+
+		if(answer == off)
+			isDateInt_ = false;
+
 		return true;
 	}
 	else
@@ -345,13 +693,62 @@ bool TePGConnection::rollBackTransaction(void)
 	return false;
 }
 
+int TePGConnection::exec_cmd_params(const char *command,
+								int nParams,
+								const Oid *paramTypes,
+								const char * const *paramValues,
+								const int *paramLengths,
+								const int *paramFormats,
+								int resultFormat)
+{
+	PGresult *result_temp;
+	int resp = -1;
+	result_temp = PQexecParams(pg_connection_,
+                       command, 
+                       nParams,
+                       paramTypes,
+                       paramValues,
+                       paramLengths,
+                       paramFormats,
+                       resultFormat);
+
+	//errorMessage_= PQresultErrorMessage(result_temp);
+    switch (PQresultStatus(result_temp))
+	{
+		case PGRES_EMPTY_QUERY: // The string sent to the backend was empty.
+				break;
+		case PGRES_COMMAND_OK: // Successful completion of a command returning no data
+			    resp = atoi(PQcmdTuples(result_temp));
+				last_oid_ = PQoidValue(result_temp);
+				break;
+		case PGRES_TUPLES_OK: // The query successfully executed
+				break;
+
+		case PGRES_COPY_OUT: // Copy Out (from server) data transfer started
+		case PGRES_COPY_IN: // Copy In (to server) data transfer started
+				break;
 
+		case PGRES_BAD_RESPONSE: // The server's response was not understood
+		case PGRES_NONFATAL_ERROR: // TODO: Is this one really an error?
+		case PGRES_FATAL_ERROR:
+			throw runtime_error("The server's response was not understood");
+
+		default:
+			throw logic_error("Internal lib TePGInterface error: ");
+	}
+
+	PQclear(result_temp);
+	result_temp = 0;
+	return resp;
+}
 /******************************
  * Definicao de TePGRecordset *
  ******************************/
 const int TePGRecordset::int_bof_ = -1;
 int TePGRecordset::openRecordSets_ = 0;
-set<int> TePGRecordset::freeCursorNumbers_;
+std::set<int> TePGRecordset::freeCursorNumbers_;
+TeMutex TePGRecordset::_mutexLock;
+
 //const int TePGRecordset::numRowsToRetrieve_ = 2000;
 
 TePGRecordset::TePGRecordset(const string& str_qry, TePGConnection* con_x,
@@ -369,7 +766,9 @@ TePGRecordset::TePGRecordset(const string& str_qry, TePGConnection* con_x,
 	else
 		isLittleEndian_ = true;
 
-	if(freeCursorNumbers_.empty())
+	recordSetId_ = TePGRecordset::getFreeCursor();
+
+	/*if(freeCursorNumbers_.empty())
 	{	// Se n�o houver cursores livres aberto => criar novo id
 		++openRecordSets_;
 		recordSetId_ = openRecordSets_;
@@ -379,7 +778,7 @@ TePGRecordset::TePGRecordset(const string& str_qry, TePGConnection* con_x,
 		set<int>::iterator it = freeCursorNumbers_.begin();
 		recordSetId_ = *it;
 		freeCursorNumbers_.erase(it);
-	}
+	}*/
 
 	if(!str_qry.empty() && conn_)
 		open(str_qry, conn_, cursorType_, cursorLocation_, cursorDataType_);
@@ -388,7 +787,8 @@ TePGRecordset::TePGRecordset(const string& str_qry, TePGConnection* con_x,
 TePGRecordset::~TePGRecordset()
 {	
 	// Deixa o id livre
-	freeCursorNumbers_.insert(recordSetId_);
+	//freeCursorNumbers_.insert(recordSetId_);
+	TePGRecordset::releaseCursor(recordSetId_);
 
 	close();
 }
@@ -547,7 +947,7 @@ bool TePGRecordset::movePrevious(void)
 				int_eof_ = recordCount();
 				int_index_current_ = 0;
 
-				if(this->recordCount() > 0 != numRowsToRetrieve_)
+				if(this->recordCount() != numRowsToRetrieve_)
 				{
 					firstFetch = true;
 				}
@@ -646,7 +1046,7 @@ bool TePGRecordset::moveNext(void)
 				int_eof_ = recordCount();
 				int_index_current_ = 0;
 
-				if(this->recordCount() > 0 != numRowsToRetrieve_)
+				if(this->recordCount() != numRowsToRetrieve_)
 				{
 					lastFetch = true;
 				}
@@ -816,7 +1216,7 @@ int TePGRecordset::getBytea(const int& field_num, char*& buff) const
 		unsigned char* ptData = PQunescapeBytea((unsigned char*)(value(field_num)), &newLen);
 
 		if(newLen <= 0)
-			return newLen;
+			return (int)newLen;
 		
 		if(!buff)
 			buff = new char[newLen];
@@ -825,25 +1225,111 @@ int TePGRecordset::getBytea(const int& field_num, char*& buff) const
 
 		TePGConnection::freeMem(ptData);
 
-		return newLen;
+		return (int)newLen;
 	}
 	else	// TeBINARYCURSOR
 	{
-		char* ptData = value(field_num);
+		unsigned int numBytes = PQgetlength(pg_recordset_, int_index_current_, field_num);
 
-		unsigned int numBytes;
-		memcpy(&numBytes, ptData, sizeof(int));
-		numBytes = ntohl(numBytes);
+		char* ptData = value(field_num);		
 
 		if(!buff)
 			buff = new char[numBytes];
 
-		memcpy(buff, ptData + sizeof(int), numBytes);
+		memcpy(buff, ptData, numBytes);
 
 		return numBytes;
 	}
 }
 
+void TePGRecordset::getByteALine2D(const int& field_num, TeLine2D& l) const
+{
+	char* ptDataAux = 0;
+
+	unsigned long newLen = getBytea(field_num, ptDataAux);
+
+	double* data = (double*) ptDataAux;
+
+	unsigned int npts = newLen / (2 * sizeof(double));
+
+	double x, y;
+
+	for(unsigned int k = 0; k < npts; ++k)
+	{
+		x = (*data++);
+		y = (*data++);
+		
+		TeCoord2D pt(x,y);
+
+		l.add(pt);
+	}
+
+	delete [] ptDataAux;
+}
+
+void TePGRecordset::getPGBox(const int& field_num, TeBox& b) const
+{
+	char* pgbox = value(field_num);
+
+	if(cursorDataType_ == TeBINARYCURSOR)
+	{
+		// POINT ARRAY IS SUPPOSED ALWAYS IN BIG ENDIAN
+		BIN_PG_POINT* pts = (BIN_PG_POINT*)(pgbox);
+
+		// endianness test
+		if(isLittleEndian_)
+		{
+			union
+			{
+				double dWord_;
+				unsigned int aux_[2];
+			} swapx1, swapy1, swapx2, swapy2;
+
+			// little-endian
+			swapx1.dWord_ = pts[0].x;
+			swapy1.dWord_ = pts[0].y;
+
+			swapx2.aux_[1] = ntohl(swapx1.aux_[0]);
+			swapx2.aux_[0] = ntohl(swapx1.aux_[1]);
+
+			swapy2.aux_[1] = ntohl(swapy1.aux_[0]);
+			swapy2.aux_[0] = ntohl(swapy1.aux_[1]);
+
+			double X2 = swapx2.dWord_;
+			double Y2 = swapy2.dWord_;
+
+			swapx1.dWord_ = pts[1].x;
+			swapy1.dWord_ = pts[1].y;
+
+			swapx2.aux_[1] = ntohl(swapx1.aux_[0]);
+			swapx2.aux_[0] = ntohl(swapx1.aux_[1]);
+
+			swapy2.aux_[1] = ntohl(swapy1.aux_[0]);
+			swapy2.aux_[0] = ntohl(swapy1.aux_[1]);
+
+			double X1 = swapx2.dWord_;
+			double Y1 = swapy2.dWord_;
+
+			TeBox baux(X1, Y1, X2, Y2);
+
+			b = baux;						
+		}
+		else
+		{
+			// big-endian!
+			double X2 = pts[0].x;
+			double Y2 = pts[0].y;
+			double X1 = pts[1].x;
+			double Y1 = pts[1].y;
+			TeBox baux(X1, Y1, X2, Y2);
+
+			b = baux;
+		}
+	}
+	else	//TeTEXTCURSOR
+		b = PGBoxRtree_decode(pgbox);
+}
+
 void TePGRecordset::getPGLine2D(const int& field_num, TeLine2D& l) const
 {
 	char* polygon = value(field_num);
@@ -929,7 +1415,7 @@ char* TePGRecordset::getWKBHeader(char* v, unsigned char &byteOrder, unsigned in
 	}
 	else if((byteOrder == 1) && !isLittleEndian_)
 	{
-			wkbType = htonl(wkbType);
+		wkbType = TePGSwapUInt(wkbType);
 	}	
 
 	numGeometries = 0;
@@ -961,7 +1447,7 @@ char* TePGRecordset::getWKBHeader(char* v, unsigned char &byteOrder, unsigned in
 		}
 		else if((byteOrder == 1) && !isLittleEndian_)
 		{
-			numGeometries = htonl(numGeometries);
+			numGeometries = TePGSwapUInt(numGeometries);
 		}
 	}
 
@@ -1038,11 +1524,11 @@ char* TePGRecordset::getWKBPoint(char* v, TeCoord2D& c) const
 			unsigned int aux_[2];
 		} swapx2, swapy2;
 
-		swapx2.aux_[1] = htonl(swapx1.aux_[0]);
-		swapx2.aux_[0] = htonl(swapx1.aux_[1]);
+		swapx2.aux_[1] = TePGSwapUInt(swapx1.aux_[0]);
+		swapx2.aux_[0] = TePGSwapUInt(swapx1.aux_[1]);
 
-		swapy2.aux_[1] = htonl(swapy1.aux_[0]);
-		swapy2.aux_[0] = htonl(swapy1.aux_[1]);
+		swapy2.aux_[1] = TePGSwapUInt(swapy1.aux_[0]);
+		swapy2.aux_[0] = TePGSwapUInt(swapy1.aux_[1]);
 		
 		c.x(swapx2.dWord_);
 		c.y(swapy2.dWord_);
@@ -1088,7 +1574,7 @@ char* TePGRecordset::getWKBLinearRing(char* v, int byteOrder, TeLine2D &line) co
 	}
 	else if((byteOrder == 1) && !isLittleEndian_)
 	{
-		numPoints = htonl(numPoints);
+		numPoints = TePGSwapUInt(numPoints);
 	}
 
 	for(unsigned int i = 0; i < numPoints; ++i)
@@ -1144,11 +1630,11 @@ char* TePGRecordset::getWKBLinearRing(char* v, int byteOrder, TeLine2D &line) co
 				unsigned int aux_[2];
 			} swapx2, swapy2;
 
-			swapx2.aux_[1] = htonl(swapx1.aux_[0]);
-			swapx2.aux_[0] = htonl(swapx1.aux_[1]);
+			swapx2.aux_[1] = TePGSwapUInt(swapx1.aux_[0]);
+			swapx2.aux_[0] = TePGSwapUInt(swapx1.aux_[1]);
 
-			swapy2.aux_[1] = htonl(swapy1.aux_[0]);
-			swapy2.aux_[0] = htonl(swapy1.aux_[1]);
+			swapy2.aux_[1] = TePGSwapUInt(swapy1.aux_[0]);
+			swapy2.aux_[0] = TePGSwapUInt(swapy1.aux_[1]);
 			
 			line.add(TeCoord2D(swapx2.dWord_, swapy2.dWord_));
 		}
@@ -1298,7 +1784,7 @@ void TePGRecordset::getWKBGeomColl(char* v, TeMultiGeometry &mg) const
 
 			v = getWKBPoint(v, coord);
 
-			mg.addGeometry(coord);
+			mg.addGeometry(TePoint(coord));
 		}
 		else if(geomType == 2)
 		{
@@ -1406,6 +1892,155 @@ void TePGRecordset::getPGISGeomColl(const int& field_num, TeMultiGeometry& m) co
 	getWKBGeomColl(value(field_num), m);
 }
 
+string TePGRecordset::getDate(const int& field_num) const
+{
+	if(cursorDataType_ == TeTEXTCURSOR)
+		return value(field_num);
+
+// for binary cursors only
+	struct te_pg_tm tt;
+	struct te_pg_tm *tm = &tt;
+    
+	TeDateADT date = getInt(field_num);
+
+	j2date(date + POSTGRES_EPOCH_JDATE,
+		   &(tm->tm_year), &(tm->tm_mon), &(tm->tm_mday));
+
+	char buf[MAXDATELEN + 1];
+	
+	string datestr = "";
+
+	if(EncodeDateOnly(tm, buf))
+        datestr = buf;
+	
+	return datestr;
+}
+
+string TePGRecordset::getTime(const int& field_num)
+{
+	if(cursorDataType_ == TeTEXTCURSOR)
+	{
+		string res = value(field_num);
+
+		return res;
+	}
+
+	te_int64 time;
+
+	if(this->conn_->isDateInt())
+	{
+        unsigned int h32;
+		unsigned int l32;
+
+		memcpy(&h32, value(field_num), sizeof(unsigned));
+		memcpy(&l32, value(field_num) + sizeof(unsigned), sizeof(unsigned));
+
+		h32 = ntohl(h32);
+		l32 = ntohl(l32);
+
+		time = h32;
+		time <<= 32;
+		time |= l32;
+	}
+	else
+	{
+		double t_aux = getDouble(field_num);
+
+		t_aux*=1000000;
+		time=(te_int64)t_aux;
+	}
+
+	struct te_pg_tm tt;
+	struct te_pg_tm *tm = &tt;
+	te_fsec_t fsec;
+
+	char buf[MAXDATELEN + 1];
+
+	string datestr = "";
+
+	time2tm(time, tm, &fsec);
+	
+	if(EncodeTimeOnly(tm, fsec, NULL, buf))
+        datestr = buf;
+	
+	return datestr;
+}
+
+string TePGRecordset::getTimeStamp(const int& field_num)
+{
+	if(cursorDataType_ == TeTEXTCURSOR)
+	{
+		string res = value(field_num);
+
+		return res;
+	}
+
+	te_int64 timestamp;
+
+	if(this->conn_->isDateInt())
+	{
+        unsigned int h32;
+		unsigned int l32;
+
+		memcpy(&h32, value(field_num), sizeof(unsigned));
+		memcpy(&l32, value(field_num) + sizeof(unsigned), sizeof(unsigned));
+
+		h32 = ntohl(h32);
+		l32 = ntohl(l32);
+
+		timestamp = h32;
+		timestamp <<= 32;
+		timestamp |= l32;
+	}
+	else
+	{
+		double t_aux = getDouble(field_num);
+
+		t_aux*=1000000;
+		timestamp=(te_int64)t_aux;
+	}
+
+	struct te_pg_tm tt;
+	struct te_pg_tm *tm = &tt;
+	te_fsec_t fsec;
+	char *tzn = NULL;
+
+	char buf[MAXDATELEN + 1];
+
+	string datestr = "";
+
+	if(TIMESTAMP_NOT_FINITE(timestamp))
+	{
+		if(EncodeSpecialTimestamp(timestamp, buf))
+			datestr = buf;
+	}
+	else if (timestamp2tm(timestamp, NULL, tm, &fsec, NULL))
+	{
+		if(EncodeDateTime(tm, fsec, NULL, &tzn, buf))
+			datestr = buf;
+	}
+        
+	
+	return datestr;
+}
+
+int TePGRecordset::getInt8(const int& field_num) const
+{
+	unsigned int h32;
+	unsigned int l32;
+
+	memcpy(&h32, value(field_num), sizeof(unsigned));
+	memcpy(&l32, value(field_num) + sizeof(unsigned), sizeof(unsigned));
+
+	h32 = ntohl(h32);
+	l32 = ntohl(l32);
+
+	te_int64 i64value = h32;
+	i64value <<= 32;
+	i64value |= l32;
+
+	return (int)i64value;
+}
 
 
 char* TePGRecordset::getData(const int& field_num)
@@ -1419,42 +2054,114 @@ char* TePGRecordset::getData(const int& field_num)
 		// chamar o conversor de tipo de dado de bin�rio p/ string p/ cada tipo!
 		switch(fieldType(field_num))
 		{
+			case PG_NAME_TYPE			:
+			case PG_TEXT_TYPE			:
+			case PG_VARCHAR_TYPE		:		if(isNull(field_num))  
+												{
+													data_ = "";
+												}
+												else
+												{
+													return value(field_num);
+												}
+
+												break;
+
+			case PG_INT8_TYPE			:		if(isNull(field_num))  
+												{
+													data_ = "";
+												}
+												else
+												{
+													data_ = Te2String(getInt8(field_num));
+												}
+												break;
+
 			case PG_BOOL_TYPE			:
 			case PG_BYTEA_TYPE			:
-			case PG_CHAR_TYPE			:
-			case PG_INT8_TYPE			:
-			case PG_INT2_TYPE			: break;
-
-			case PG_INT4_TYPE			: data_ = Te2String(getInt(field_num));
-										  break;
+			case PG_CHAR_TYPE			:			
+			case PG_INT2_TYPE			: 
+											break;
 
-			case PG_TEXT_TYPE			:
 			case PG_OID_TYPE			:
+			case PG_INT4_TYPE			: if(isNull(field_num))  
+										  {
+											  data_ = "";
+										  }
+										  else
+										  {
+                                              data_ = Te2String(getInt(field_num));
+										  }
+										  break;			
+			
+			case PG_PG_FLOAT4_TYPE      :
 			case PG_POINT_TYPE			:
 			case PG_LSEG_TYPE			:
 			case PG_PATH_TYPE			:
 			case PG_BOX_TYPE			:
 			case PG_POLYGON_TYPE		:
-			case PG_LINE_TYPE			:
-			case PG_PG_FLOAT4_TYPE		: break;
+			case PG_LINE_TYPE			: 
+											break;
+
+
+			case PG_FLOAT8_TYPE			: if(isNull(field_num))  
+										  {
+											  data_ = "";
+										  }
+										  else
+										  {
+											  data_ = Te2String(getDouble(field_num), 15);
+										  }
+										  break;
+
+			case PG_TIMESTAMP_TYPE		: if(isNull(field_num))  
+										  {
+											  data_ = "";
+										  }
+										  else
+										  {
+                                              data_ = getTimeStamp(field_num);
+										  }
+				                          break;
+
+		    case PG_DATE_TYPE			: if(isNull(field_num))  
+										  {
+											  data_ = "";
+										  }
+										  else
+										  {
+											  data_ = getDate(field_num);
+										  }
+				                          break;
+
+		    case PG_TIME_TYPE			: if(isNull(field_num))  
+										  {
+											  data_ = "";
+										  }
+										  else
+										  {
+											  data_ = getTime(field_num);	
+										  }
+										  break;
+
 
-			case PG_FLOAT8_TYPE			: data_ = Te2String(getDouble(field_num));
+			case PG_TIMESTAMPTZ_TYPE	:			
+			case PG_TIMETZ_TYPE			:
+										
+										  break;
+
+			case PG_INTERVAL_TYPE		: 
 										  break;
 
 			case PG_CIRCLE_TYPE			:
 			case PG_MONEY_TYPE			:
-			case PG_BPCHAR_TYPE			:
-			case PG_VARCHAR_TYPE		:
-			case PG_DATE_TYPE			:
-			case PG_TIME_TYPE			:
-			case PG_TIMESTAMP_TYPE		:
-			case PG_TIMESTAMPTZ_TYPE	:
-			case PG_INTERVAL_TYPE		:
-			case PG_TIMETZ_TYPE			:
+			case PG_BPCHAR_TYPE			:			
 			case PG_BIT_TYPE			:
 			case PG_VARBIT_TYPE			:
 			case PG_NUMERIC_TYPE		:
-			default						: break;
+			default						: 
+											
+											break;
 		}
 		
 		return (char*)data_.c_str();
@@ -1480,6 +2187,7 @@ int TePGRecordset::fieldSize(const int& field_num)
         str_qry += ")";
  switch(field_t)
        {
+		case 1042:	// CHAR(n)
         case 1043:   //VARCHAR(s) or CHARACTER VARYING(s)
         case 1700:   //NUMERIC(p,s) or DECIMAL(p,s)
                      result_temp = PQexec(conn_->c_ptr(), str_qry.c_str());
@@ -1575,6 +2283,249 @@ void TePGRecordset::freeRecordSet()
 	return;
 }
 
+char* TeLine2DToPGBinary(const TeLine2D &line, unsigned int &size)
+{
+	unsigned int numPts = line.size();
+	size = sizeof(int) + (numPts * sizeof(double) * 2);
+
+	char* p = new char[size];
+
+	char* paux = p;
+
+	//coloca o cabe�alho (Numero de pontos)
+	unsigned int numPts_net = htonl(numPts);
+
+	memcpy(p, &numPts_net, sizeof(int));
+	p += sizeof(int);
+
+	for(unsigned int i = 0; i < numPts ; ++i)
+	{
+		double swappedDoubleX = TeConvertToBigEndian(line[i].x());
+		double swappedDoubleY = TeConvertToBigEndian(line[i].y());
+
+		memcpy(p, &swappedDoubleX, sizeof(double));
+		p += sizeof(double);
+		
+		memcpy(p, &swappedDoubleY, sizeof(double));
+		p += sizeof(double);
+	}
+
+	return paux;
+}
+
+char* TeBoxToPGBinary(const TeBox &box, unsigned int &size)
+{
+	size = 4 * sizeof(double);
+
+	char* b = new char[size];
+	char* baux = b;
+
+	double swappedDoubleURX = TeConvertToBigEndian(box.upperRight().x());
+	double swappedDoubleURY = TeConvertToBigEndian(box.upperRight().y());
+
+	double swappedDoubleLFX = TeConvertToBigEndian(box.lowerLeft().x());
+	double swappedDoubleLFY = TeConvertToBigEndian(box.lowerLeft().y());
+
+	memcpy(b, &swappedDoubleURX, sizeof(double));
+	b += sizeof(double);
+	
+	memcpy(b, &swappedDoubleURY, sizeof(double));
+	b += sizeof(double);
+
+	memcpy(b, &swappedDoubleLFX, sizeof(double));
+	b += sizeof(double);
+	
+	memcpy(b, &swappedDoubleLFY, sizeof(double));
+	b += sizeof(double);
+
+	return baux;
+}
+
+double TeConvertToBigEndian(const double &value)
+{
+	double swappedValue;
+
+	union
+	{
+		double dWord_;
+		unsigned int aux_[2];
+	} swapIN, swapOUT;
+
+
+	// endianness test
+	if(((unsigned int) 1) == htonl((unsigned int) 1))
+	{
+		//isLittleEndian_ = false => doesn't need to swap bytes;	
+		swapIN.dWord_ = value;
+
+		memcpy(&swappedValue, &swapIN.dWord_, sizeof(double));
+	}		
+	else
+	{
+		//isLittleEndian_ = true  => swap bytes;
+		swapIN.dWord_ = value;
+
+		swapOUT.aux_[1] = htonl(swapIN.aux_[0]);
+		swapOUT.aux_[0] = htonl(swapIN.aux_[1]);
+	
+		memcpy(&swappedValue, &swapOUT.dWord_, sizeof(double));
+	}
+	return swappedValue;
+}
+
+
+char* TePointToWKBPoint(const TePoint &point, unsigned int &size)
+{
+	char byteOrder;
+	unsigned int wkbType = 1;//WKBPoint
+
+	// 0 = Big Endian (wkbXDR) e 1 = Little Endian (wkbNDR)
+	if(((unsigned int) 1) == htonl((unsigned int) 1))
+	{
+		byteOrder = 0;
+	}
+	else
+	{
+		byteOrder = 1;		
+	}
+
+	//cabecalho
+	size = sizeof(char) + sizeof(int) + (2 * sizeof(double));
+	
+	char* p = new char[size];
+	char* paux = p;
+
+	//byteOrder	
+	memcpy(p, &byteOrder , sizeof(char));
+	p += sizeof(char);
+
+	//WKBPoint
+	memcpy(p, &wkbType , sizeof(unsigned int));
+	p += sizeof(unsigned int);
+
+	double x = point.location().x();
+	double y = point.location().y();
+
+	memcpy(p, &x, sizeof(double));
+	p += sizeof(double);
+	memcpy(p, &y, sizeof(double));
+	p += sizeof(double);
+
+	return paux;
+}
+
+
+char* TeLine2DToWKBLineString(const TeLine2D &line, unsigned int &size)
+{
+	char byteOrder;
+	unsigned int wkbType = 2;//WKBLineString
+	unsigned int nPoints = line.size();
+
+	// 0 = Big Endian (wkbXDR) e 1 = Little Endian (wkbNDR)
+	if(((unsigned int) 1) == htonl((unsigned int) 1))
+	{
+		byteOrder = 0;
+	}
+	else
+	{
+		byteOrder = 1;		
+	}
+
+	size = sizeof(char) + sizeof(int) + sizeof(int) + (2 * sizeof(double) * nPoints);
+	
+	char* l = new char[size];
+	char* laux = l;
+
+	//byteOrder	
+	memcpy(l, &byteOrder , sizeof(char));
+	l += sizeof(char);
+
+	//WKBLineString
+	memcpy(l, &wkbType , sizeof(unsigned int));
+	l += sizeof(unsigned int);
+
+	//nPoints
+	memcpy(l, &nPoints , sizeof(unsigned int));
+	l += sizeof(unsigned int);
+
+	for(unsigned int i = 0; i < nPoints ; ++i)
+	{
+		double x = line[i].x();
+		double y = line[i].y();
+
+		memcpy(l, &x, sizeof(double));
+		l += sizeof(double);
+		
+		memcpy(l, &y, sizeof(double));
+		l += sizeof(double);
+	}
+
+	return laux;
+}
+
+
+char* TePolygonToWKBPolygon(const TePolygon &polygon, unsigned int &size)
+{
+	char byteOrder;
+	unsigned int wkbType = 3;//WKBPolygon
+	unsigned int nRings = polygon.size();
+
+	// 0 = Big Endian (wkbXDR) e 1 = Little Endian (wkbNDR)
+	if(((unsigned int) 1) == htonl((unsigned int) 1))
+	{
+		byteOrder = 0;
+	}
+	else
+	{
+		byteOrder = 1;		
+	}
+
+	//cabecalho
+	size = sizeof(char) + sizeof(int) + sizeof(int);
+	//rings
+	for(unsigned int i = 0; i < nRings ; ++i)
+	{
+		size += sizeof(int) + (2 * sizeof(double) * polygon[i].size());
+	}
+	
+	char* p = new char[size];
+	char* paux = p;
+
+	//byteOrder	
+	memcpy(p, &byteOrder , sizeof(char));
+	p += sizeof(char);
+
+	//WKBPolygon
+	memcpy(p, &wkbType , sizeof(unsigned int));
+	p += sizeof(unsigned int);
+
+	//nRings
+	memcpy(p, &nRings , sizeof(unsigned int));
+	p += sizeof(unsigned int);
+	
+	for(unsigned int i = 0; i < nRings ; ++i)
+	{
+		TeLinearRing ring = polygon[i];
+		unsigned int nPoints = ring.size();
+
+		memcpy(p, &nPoints, sizeof(int));
+		p += sizeof(int);
+		
+		for(unsigned int j = 0; j < nPoints; ++j)
+		{
+			double x = ring[j].x();
+			double y = ring[j].y();
+		
+			memcpy(p, &x, sizeof(double));
+			p += sizeof(double);
+			
+			memcpy(p, &y, sizeof(double));
+			p += sizeof(double);		
+		}
+	}
+
+	return paux;
+}
 
 
 
diff --git a/src/terralib/drivers/PostgreSQL/TePGInterface.h b/src/terralib/drivers/PostgreSQL/TePGInterface.h
old mode 100644
new mode 100755
index 48e2a10..eb898a8
--- a/src/terralib/drivers/PostgreSQL/TePGInterface.h
+++ b/src/terralib/drivers/PostgreSQL/TePGInterface.h
@@ -1,11 +1,6 @@
-//**************************************************************************
-//      Copyright � 2002 Gilberto Ribeiro de Queiroz - gribeiro at dpi.inpe.br
-//		Image Processing Division (DPI)
-//		National Institute of Spatial Research (INPE) - S�o Jos� dos Campos - Brazil
-//
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -25,25 +20,18 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TePGInterface.h
-    This file contains a database recordset and connection class to PostgreSQL.
+    \brief This file contains a database recordset and connection class to PostgreSQL.
+	\author Gilberto Ribeiro de Queiroz - gribeiro at dpi.inpe.br
  */
 
-/**
-  *@author Gilberto Ribeiro de Queiroz - gribeiro at dpi.inpe.br
-  */
 
-/**
-  *@description Este arquivo cont�m classes para navegar em resultados de consultas
-  *             e para estabelecimento de conex�o com o banco de dados.
-  */
 #ifndef  __TERRALIB_INTERNAL_PGINTERFACE_H
 #define  __TERRALIB_INTERNAL_PGINTERFACE_H
  
 /**
-  * TODO: 1. O caminhamento para tr�s est� na ordem errada.
-  *       2. Terminar a fun��o getData
+  * TODO: 1. O caminhamento para tras esta na ordem errada.
+  *       2. A funcao getData devera ser completada para tipos diferentes da TerraLib
   *
   */
 //extern "C"
@@ -60,18 +48,21 @@ of this library and its documentation.
 
 #include <stdlib.h>
 #include <string>
+#include <cstring>
 
 #include "TeDatabase.h"
 #include "TeMultiGeometry.h"
+#include <TeMutex.h>
 
 using namespace std;
 
 /***************************************************************************
- * Constantes num�ricas dos tipos de dados do PostgreSQL                   * 
+ * Constantes numericas dos tipos de dados do PostgreSQL                   * 
  ***************************************************************************/
 const Oid PG_BOOL_TYPE = 16;
 const Oid PG_BYTEA_TYPE = 17;
 const Oid PG_CHAR_TYPE = 18;
+const Oid PG_NAME_TYPE = 19;
 const Oid PG_INT8_TYPE = 20;
 const Oid PG_INT2_TYPE = 21;
 const Oid PG_INT4_TYPE = 23;
@@ -102,11 +93,11 @@ const Oid PG_NUMERIC_TYPE = 1700;
 
 
 /***************************************************************************
- * Classe respons�vel pela abertura e fechamento de uma conex�o com o      *
- * banco de dados. Al�m de abrir e fechar uma conex�o, permite que uma     *
+ * Classe responsavel pela abertura e fechamento de uma conexao com o      *
+ * banco de dados. Alem de abrir e fechar uma conexao, permite que uma     *
  * consulta seja executada, retornando um conjunto de registros, ou que um *
  * comando - insert, update, delete - seja executado diretamente,          *
- * retornando o n�mero de registros afetados pelo comando.                 *
+ * retornando o numero de registros afetados pelo comando.                 *
  ***************************************************************************/
 class TePGConnection
 {
@@ -116,12 +107,13 @@ class TePGConnection
         int int_connection_;	// A flag that indicates the state of a connection
         Oid last_oid_;			// Always stores the last OID resulted of a command
 		bool inTransaction_;
+		bool isDateInt_;		// Tells if server date format is int64 or double (IEEE754)
 
     public:
 
         // Constructor / Destructor
         TePGConnection(const string& str_connection = "")
-			: pg_connection_(0), int_connection_(0), last_oid_(0), inTransaction_(false)
+			: pg_connection_(0), int_connection_(0), last_oid_(0), inTransaction_(false), isDateInt_(true)
 		{
 			if(!str_connection.empty())
 				open(str_connection);
@@ -141,6 +133,11 @@ class TePGConnection
         Oid getOID(void) const { return last_oid_; }
 		PGconn* c_ptr(void) { return pg_connection_; }
 
+		bool isDateInt() const
+		{
+			return isDateInt_;
+		}
+
 		// Utilities functions - You must destroy the return string
 		static char* escapeString(const char* from, const size_t& fromLen, size_t& newLen)
 		{
@@ -163,6 +160,14 @@ class TePGConnection
 		bool commitTransaction(void);
 		bool rollBackTransaction(void);
 
+		int exec_cmd_params(const char *command,
+							 int nParams,
+							 const Oid *paramTypes,
+							 const char * const *paramValues,
+							 const int *paramLengths,
+							 const int *paramFormats,
+							 int resultFormat);
+
 	protected:
 
         // don't support copying of TePGConnection objects,
@@ -172,7 +177,7 @@ class TePGConnection
 };
 
 /***************************************************************************
- * Classe resposns�vel pela manipula��o de dados resultantes de uma        *
+ * Classe resposnsavel pela manipulacao de dados resultantes de uma        *
  * consulta.                                                               *
  ***************************************************************************/
 class TePGRecordset
@@ -182,6 +187,7 @@ class TePGRecordset
 		static const int int_bof_;
 		static int openRecordSets_;
 		static set<int> freeCursorNumbers_;
+		static TeMutex _mutexLock;
 		
         PGresult *pg_recordset_;
 		TePGConnection* conn_;
@@ -198,9 +204,9 @@ class TePGRecordset
 
 		string data_;
 
-		bool movingBackward_;	// M�rio
-		bool lastFetch;			// M�rio
-		bool firstFetch;		// M�rio
+		bool movingBackward_;	// Mario
+		bool lastFetch;			// Mario
+		bool firstFetch;		// Mario
 		
 
     public:
@@ -264,14 +270,23 @@ class TePGRecordset
 
         int fieldNum(const string& field_name) const
 		{
-			string fieldName(field_name);
+			int num = PQfnumber(pg_recordset_, field_name.c_str());
+
+			if(num < 0)
+			{
+				std::string::size_type ip = field_name.rfind('.');
+                
+				if(ip == std::string::npos)
+					return num;
 
-			size_t pos = field_name.find(".", string::npos, 1);
+				std::string::size_type len = field_name.size();
 
-			if(pos != string::npos)
-				fieldName = field_name.substr(pos + 1);
+				std::string fieldName = field_name.substr(ip + 1, len - ip - 1);
 
-			return PQfnumber(pg_recordset_, fieldName.c_str());
+				num = PQfnumber(pg_recordset_, fieldName.c_str());
+			}
+
+			return num;
 		}
 
 		Oid fieldType(const int& field_num) const { return PQftype(pg_recordset_, field_num); }
@@ -288,6 +303,8 @@ class TePGRecordset
 
 
 		// Datatype functions
+		
+		// when you use value, make sure to copy the value, otherwise, a sucessive call may destroy the pointer
 		char* value(const int& field_num) const { return PQgetvalue(pg_recordset_, int_index_current_, field_num); }
 		char* value(const string& field_name) const { return value(fieldNum(field_name)); }
 
@@ -300,18 +317,29 @@ class TePGRecordset
 				return atol(value(field_num));
 			else
 			{
-				unsigned int number;
-				memcpy(&number, value(field_num), sizeof(int));
+				if(fieldType(field_num) == PG_INT8_TYPE)
+				{
+					return getInt8(field_num);
+				}
+				else
+				{
+					unsigned int number;
 
-				if(isLittleEndian_)
-					number = ntohl(number);
+					memcpy(&number, value(field_num), sizeof(int));
+
+					if(isLittleEndian_)
+						number = ntohl(number);
 
-				return number;
+					return number;
+				}
 			}
 		}
 
 		int getInt(const string& field_name) const { return getInt(fieldNum(field_name)); }
 
+		int getInt8(const int& field_num) const ;
+		int getInt8(const string& field_name) const { return getInt8(fieldNum(field_name)); }
+
 		bool getBool(const int& field_num) const
 		{
 			if(cursorDataType_ == TeTEXTCURSOR) 
@@ -368,12 +396,30 @@ class TePGRecordset
 			}
 		}
 
-		double getDouble(const string& field_name) const { return getDouble(fieldNum(field_name)); }	
+		double getDouble(const string& field_name) const { return getDouble(fieldNum(field_name)); }
+
+		string getDate(const int& field_num) const;
+		string getDate(const string& field_name) const { return getDate(fieldNum(field_name)); }
+
+		string getTime(const int& field_num);
+		string getTime(const string& field_name) { return getTime(fieldNum(field_name)); }
+
+		string getTimeStamp(const int& field_num);
+		string getTimeStamp(const string& field_name) { return getTimeStamp(fieldNum(field_name)); }
+
+
 
 		char* getData(const int& field_num);
 		char* getData(const string& field_name) { return getData(fieldNum(field_name)); }
 
+		// TerraLib Geometric Types
+		void getByteALine2D(const int& field_num, TeLine2D& l) const;
+		void getByteALine2D(const string& field_name, TeLine2D& l) const { getByteALine2D(fieldNum(field_name), l); }
+
 		// PostgreSQL Geometric types
+		void getPGBox(const int& field_num, TeBox& b) const;
+		void getPGBox(const string& field_name, TeBox& b) const { getPGBox(fieldNum(field_name), b); }
+
 		void getPGLine2D(const int& field_num, TeLine2D& l) const;
 		void getPGLine2D(const string& field_name, TeLine2D& l) const { getPGLine2D(fieldNum(field_name), l); }
 
@@ -406,6 +452,33 @@ class TePGRecordset
         TePGRecordset(const TePGRecordset& c);
         TePGRecordset& operator=(const TePGRecordset& c);
 
+		static int getFreeCursor()
+		{
+			_mutexLock.lock();
+
+			int freeId = 0;
+			if(freeCursorNumbers_.empty())
+			{	// Se n�o houver cursores livres aberto => criar novo id
+				++openRecordSets_;
+				freeId = openRecordSets_;
+			}
+			else
+			{
+				set<int>::iterator it = freeCursorNumbers_.begin();
+				freeId = *it;
+				freeCursorNumbers_.erase(it);
+			}
+
+			_mutexLock.unLock();
+
+			return freeId;
+		}
+		static void releaseCursor(const int& idToRelease)
+		{
+			_mutexLock.lock();
+			freeCursorNumbers_.insert(idToRelease);
+			_mutexLock.unLock();
+		}
 
 		void freeRecordSet();
 
@@ -426,4 +499,14 @@ class TePGRecordset
 		char* getWKBLinearRing(char* v, int byteOrder, TeLine2D &line) const;
 };
 
+char* TeLine2DToPGBinary(const TeLine2D &line, unsigned int &size);
+char* TeBoxToPGBinary(const TeBox &box, unsigned int &size);
+
+char* TePointToWKBPoint(const TePoint &point, unsigned int &size);
+char* TeLine2DToWKBLineString(const TeLine2D &line, unsigned int &size);
+char* TePolygonToWKBPolygon(const TePolygon &polygon, unsigned int &size);
+
+double TeConvertToBigEndian(const double &value);
+
+
 #endif	//  __TERRALIB_INTERNAL_PGINTERFACE_H
diff --git a/src/terralib/drivers/PostgreSQL/TePGUtils.cpp b/src/terralib/drivers/PostgreSQL/TePGUtils.cpp
old mode 100644
new mode 100755
index 162f4cd..7f00fa9
--- a/src/terralib/drivers/PostgreSQL/TePGUtils.cpp
+++ b/src/terralib/drivers/PostgreSQL/TePGUtils.cpp
@@ -77,9 +77,9 @@ void Te2PgGeomPolygon(const TeLine2D& l, string& strPolygon)
 		if(i != 0u)
 			strPolygon += ",";
 
-		 strPolygon += Te2String(l[i].x_);
+		 strPolygon += Te2String(l[i].x_, 15);
 		 strPolygon += ",";
-		 strPolygon += Te2String(l[i].y_);
+		 strPolygon += Te2String(l[i].y_, 15);
 	}
 
 	strPolygon += ")";
@@ -172,9 +172,9 @@ TeCoord2D PGCoord_decode(char *str, char* *s)
 
 string PGCoord_encode(const TeCoord2D& c)
 {
-	string str_p  = Te2String(c.x());
+	string str_p  = Te2String(c.x(), 15);
 		   str_p += " ";
-		   str_p += Te2String(c.y());
+		   str_p += Te2String(c.y(), 15);
 
 	return str_p;
 }
@@ -410,6 +410,126 @@ string PGBox_encode(TeBox& b)
 	return str_b;
 }
 
+TeBox PGBoxRtree_decode(char *str)
+{
+	char *cp;	// I use this pointer to get the pointer address
+                // that strtod store in the second parameter.
+                // It is used to know if the conversion of a string
+                // to double ocurried normally
+
+	if(!str)
+		throw runtime_error("Invalid Coordinate!");
+
+	// SKIP WHITE SPACES
+	while(isspace((unsigned char)*str))
+		++str;
+
+	// SKIP THE FIRST '(' an go to number begin
+	if(*str != '(')
+			throw runtime_error("Invalid Box!");
+
+	++str;
+
+	while(isspace((unsigned char)*str))
+		++str;
+
+	double x2 = strtod(str, &cp);
+
+	if(cp <= str)								// If no conversion or there aren't more characters
+		throw runtime_error("Invalid format!");	// Error, because the coord y will not be extracted
+												// Otherwise, cp will point to the next caracter, that begin the list conversion of coord y
+
+	// SKIP WHITE SPACES AFTER X1 COORDINATE AND JUMP ',' AND WHITE SPACES
+	while(isspace((unsigned char) *cp))
+		++cp;
+
+	if(*cp != ',')
+			throw runtime_error("Invalid Box!");
+
+	++cp;
+
+	while(isspace((unsigned char) *cp))
+		++cp;
+
+	double y2 = strtod(cp, &str);
+	
+	if(str <= cp)
+		throw runtime_error("Invalid format!");
+
+	// SKIP WHITE SPACES AFTER Y1 COORDINATE AND JUMP ',' AND WHITE SPACES
+	while(isspace((unsigned char) *str))
+		++str;
+
+	if(*str != ')')
+		throw runtime_error("Invalid Box!");
+
+	++str;
+
+	while(isspace((unsigned char) *str))
+		++str;
+
+	if(*str != ',')
+		throw runtime_error("Invalid Box!");
+
+	++str;
+
+	while(isspace((unsigned char) *str))
+		++str;
+
+	if(*str != '(')
+		throw runtime_error("Invalid Box!");
+
+	++str;
+
+	while(isspace((unsigned char) *str))
+		++str;
+
+	double x1 = strtod(str, &cp);
+	
+	if(cp <= str)
+		throw runtime_error("Invalid format!");
+
+	// SKIP WHITE SPACES AFTER x2 COORDINATE AND JUMP ',' AND WHITE SPACES
+	while(isspace((unsigned char) *cp))
+		++cp;
+
+	if(*cp != ',')
+			throw runtime_error("Invalid Box!");
+
+	++cp;
+
+	while(isspace((unsigned char) *cp))
+		++cp;
+
+	double y1 = strtod(cp, &str);
+	
+	if(str <= cp)
+		throw runtime_error("Invalid format!");
+
+	while(isspace((unsigned char) *str))
+		++str;
+
+	if(*str != ')')
+		throw runtime_error("Invalid Box!");
+
+	return TeBox(x1, y1, x2, y2);
+}
+
+string PGBoxRtree_encode(const TeBox& b)
+{
+	string str_b  = "(";
+	       str_b += Te2String(b.upperRight().x(), 15);
+		   str_b += ", ";
+		   str_b += Te2String(b.upperRight().y(), 15);
+		   str_b += ", ";
+		   str_b += Te2String(b.lowerLeft().x(), 15);
+		   str_b += ", ";
+		   str_b += Te2String(b.lowerLeft().y(), 15);
+		   str_b += ")";	       
+
+	return str_b;
+}
+
 
 
 void PGConcatLineString(const TeLine2D& l, string& concatString)
@@ -443,25 +563,25 @@ TeBox PGBoxFromPolygon(char *str)
 string PGMakePolygon(const TeBox& box)
 {
 	string result  = "POLYGON((";
-		   result += Te2String(box.x1());
+		   result += Te2String(box.x1(), 15);
 	       result += " ";
-	       result += Te2String(box.y1());
+	       result += Te2String(box.y1(), 15);
 		   result += ", ";
-		   result += Te2String(box.x1());
+		   result += Te2String(box.x1(), 15);
 	       result += " ";
-	       result += Te2String(box.y2());
+	       result += Te2String(box.y2(), 15);
 		   result += ", ";
-		   result += Te2String(box.x2());
+		   result += Te2String(box.x2(), 15);
 	       result += " ";
-	       result += Te2String(box.y2());
+	       result += Te2String(box.y2(), 15);
 		   result += ", ";
-		   result += Te2String(box.x2());
+		   result += Te2String(box.x2(), 15);
 	       result += " ";
-	       result += Te2String(box.y1());
+	       result += Te2String(box.y1(), 15);
 		   result += ", ";
-		   result += Te2String(box.x1());
+		   result += Te2String(box.x1(), 15);
 	       result += " ";
-	       result += Te2String(box.y1());
+	       result += Te2String(box.y1(), 15);
 		   result += "))";
 
 	return result;
diff --git a/src/terralib/drivers/PostgreSQL/TePGUtils.h b/src/terralib/drivers/PostgreSQL/TePGUtils.h
old mode 100644
new mode 100755
index 9d42a16..8ab9c69
--- a/src/terralib/drivers/PostgreSQL/TePGUtils.h
+++ b/src/terralib/drivers/PostgreSQL/TePGUtils.h
@@ -1,7 +1,6 @@
-//**************************************************************************
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -22,19 +21,10 @@ indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
 /*! \file TePGUtils.h
-    This file contains a database driver to access PostGIS extension.
+    \brief This file contains utilities functions to read/write geometry fields (PostGIS and PostgreSQL).
+	\author Gilberto Ribeiro de Queiroz - gribeiro at dpi.inpe.br
  */
 
-/**
-  *@author Gilberto Ribeiro de Queiroz - gribeiro at dpi.inpe.br
-  */
-
-/**
-  *@description Este arquivo cont�m rotinas �teis que desenvolvi para convers�o 
-  *             entre os tipos de dados do PostGIS e da TerraLib. Estas fun��es
-  *             s�o parsers simples.
-  */
-
 #ifndef  __TERRALIB_INTERNAL_TePOSTGRESQLUTILS_H
 #define  __TERRALIB_INTERNAL_TePOSTGRESQLUTILS_H
 
@@ -58,25 +48,25 @@ of this library and its documentation.
 #define LDELIM_BOX			'('
 #define RDELIM_BOX			')'
 
-// DELIMITADORES PARA TIPOS GEOM�TRICOS DO POSTGRESQL
+// DELIMITADORES PARA TIPOS GEOMETRICOS DO POSTGRESQL
 #define LDELIM_PGGEOMPOLYGON       '('
 #define RDELIM_PGGEOMPOLYGON       ')'
 
 #define PGGEOMPOLYGON_COORDS_DELIM ','
 
 /*
- * Codificadores e decodificadores de tipos geom�tricos do PostgreSQL.
- * Essas fun��es s�o para o driver sem extens�o espacial.
+ * Codificadores e decodificadores de tipos geometricos do PostgreSQL.
+ * Essas funcoes sao para o driver sem extensao espacial.
  *
  */
 
-//! Decodifica uma coordenada no formato pol�gono dos tipos geom�tricos do PostgreSQL: (x1, y1)
+//! Decodifica uma coordenada no formato poligono dos tipos geometricos do PostgreSQL: (x1, y1)
 TeCoord2D PgGeomPolygonCoordDecode(char *str, char* *s);
 
-//! Transaforma a linha l em um pol�gono texto strPolygon
+//! Transaforma a linha l em um poligono texto strPolygon
 void Te2PgGeomPolygon(const TeLine2D& l, string& strPolygon);
 
-//! Transaforma um pol�gono texto strPolygon em uma linha
+//! Transaforma um poligono texto strPolygon em uma linha
 TeLine2D PgGeomPolygon2Te(char* strPolygon);
 
 /*
@@ -103,6 +93,10 @@ TeBox PGBox_decode(char *str);
 
 string PGBox_encode(TeBox& b);
 
+TeBox PGBoxRtree_decode(char *str);
+
+string PGBoxRtree_encode(const TeBox& b);
+
 void PGConcatLineString(const TeLine2D& l, string& concatString);
 
 TeBox PGBoxFromPolygon(char *str);
diff --git a/src/terralib/drivers/PostgreSQL/TePostGIS.cpp b/src/terralib/drivers/PostgreSQL/TePostGIS.cpp
old mode 100644
new mode 100755
index 5579907..bb92406
--- a/src/terralib/drivers/PostgreSQL/TePostGIS.cpp
+++ b/src/terralib/drivers/PostgreSQL/TePostGIS.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -31,12 +31,59 @@ TePostGIS::TePostGIS()
 	dbmsName_ = "PostGIS";
 }
 
+bool TePostGIS::newDatabase(const string& database, const string& user, const string& password, const string& host, const int& port, bool terralibModel)
+{
+	errorMessage_ = "";
+
+	string createDB  = "CREATE DATABASE ";
+	       createDB += "\"" + database + "\"";
+		   createDB += " TEMPLATE = template_postgis";
+
+	if(!connect(host, user, password, "template_postgis", port))
+	{
+		close();
+		return false;
+	}
+		
+	bool connected = false;
+	
+	if(execute(createDB))
+	{
+		connected = connect(host, user, password, database, port);
+	}
+	else
+	{
+		close();
+		return false;
+	}
+
+	if(terralibModel)
+	{
+		//create conceptual model
+		if(connected)
+		{
+			if(!createConceptualModel())
+			{
+				close();
+				return false;
+			}
+		}
+		else
+		{
+			close();
+			return false;
+		}
+	}
+
+	return true;
+}
+
 bool TePostGIS::connect(const string& host, const string& user, const string& password, const string& database, int port)
 {
 	if(!realConnect(host, user, password, database, port))
 		return false;
 
-	// See if PostGIS is present
+// see if PostGIS is present
 	TePGRecordset rec;
 
 	string sql = "SELECT postgis_version()";
@@ -52,7 +99,31 @@ bool TePostGIS::connect(const string& host, const string& user, const string& pa
 		return false;	
 	}
 
-	return true;
+// see if RTree GiST is present for box: it must be present
+	int version = PQserverVersion(tepg_connection_.c_ptr());
+	if(version >= 80100)
+	{
+		gistBoxOps_ = "box_ops";
+		return true;
+	}
+
+	sql = "SELECT opcname FROM pg_opclass WHERE (opcname = 'gist_box_ops') ORDER BY opcname DESC";
+
+	if(rec.open(sql.c_str(), &tepg_connection_) && rec.recordCount() > 0)
+	{
+		TePostgreSQL::gistBoxOps_ = rec.value(0);
+		rec.close();
+
+		return true;
+	}
+
+	rec.close();
+
+	this->close();
+
+	errorMessage_ = "GiST extension not found! Please, install R-Tree GiST in your database and try again!";
+
+	return false;	
 }
 
 bool TePostGIS::showDatabases(const string& host, const string& user, const string& password, vector<string>& dbNames, int port)
@@ -90,154 +161,210 @@ TeDatabasePortal* TePostGIS::getPortal()
 	return portal;
 }
 
-bool TePostGIS::createPolygonGeometry(const string& tableName)
+bool TePostGIS::createTable(const string& table, TeAttributeList &attr)
 {
 	errorMessage_ = "";
 
-	string create  = "CREATE TABLE " + tableName + " ";
-	       create += "(";
-		   create += " geom_id		SERIAL,";
-		   create += " object_id    VARCHAR(255) NULL,";
-		   create += " PRIMARY KEY (geom_id)";
-		   create += ")";
-
-	if(!this->execute(create))
-		return false;
-
-	create  = "SELECT AddGeometryColumn('";
-	create += database_;
-	create += "', '";
-	create += TeConvertToLowerCase(tableName);
-	create += "', 'spatial_data',";
-	create += " -1, 'POLYGON', 2)";
+	bool first = true;
 
+	TeAttributeList::iterator it = attr.begin();
 	
-	if(!execute(create))
-		return false;
-
-	//creates indexes
-	return createIndex(tableName, tableName + "obj_idx", "object_id");
-}
-
-bool TePostGIS::createLineGeometry(const string& tableName)
-{
-	errorMessage_ = "";
-
-	string create  = "CREATE TABLE " + tableName + " ";
-	       create += "(";
-		   create += " geom_id		SERIAL,";
-		   create += " object_id    VARCHAR(255) NULL,";
-		   create += " PRIMARY KEY (geom_id)";
-		   create += ")";
-
-	if(!this->execute(create))
-		return false;
-
-	create  = "SELECT AddGeometryColumn('";
-	create += database_;
-	create += "', '";
-	create += TeConvertToLowerCase(tableName);
-	create += "', 'spatial_data',";
-	create += " -1, 'LINESTRING', 2)";
-
-	if(!this->execute(create))
-		return false;
-
-	//creates indexes
-	return createIndex(tableName, tableName + "obj_idx", "object_id");
-}
-
-bool TePostGIS::createPointGeometry(const string& tableName)
-{
-	errorMessage_ = "";
-
-	string create  = "CREATE TABLE " + tableName + " ";
-	       create += "(";
-		   create += " geom_id		SERIAL,";
-		   create += " object_id	VARCHAR(255) NULL,";
-		   create += " PRIMARY KEY (geom_id)";
-		   create += ")";
+	string createTable ="CREATE TABLE " + table +" (";
+	
+	string type;
+	char	size[8];
 
-	if(!this->execute(create))
-		return false;
+	string pkeys;
 
-	create  = "SELECT AddGeometryColumn('";
-	create += database_;
-	create += "', '";
-	create += TeConvertToLowerCase(tableName);
-	create += "', 'spatial_data', ";
-	create += " -1, 'POINT', 2)";
+	vector<string> addGeomColumnsSQL;
+	string addGeomSQL = "";
 
-	if(!this->execute(create))
-		return false;
-
-	//creates indexes
-	return createIndex(tableName, tableName + "obj_idx", "object_id");
-}
+	while(it != attr.end())
+	{
+		switch ((*it).rep_.type_)
+		{
+			case TeSTRING:		if((*it).rep_.numChar_ > 0)
+								{
+									type = "VARCHAR(" + Te2String((*it).rep_.numChar_) + ")";
+								}
+								else
+								{
+									type = "TEXT";
+								}
+								break;
+
+			case TeREAL:		type = "FLOAT8";
+								break;
+
+			case TeINT:
+			case TeUNSIGNEDINT:
+								type = ((*it).rep_.isAutoNumber_) ? "SERIAL" : "INTEGER";
+								break;
+
+			case TeBLOB:		//type = "OID";
+				                type = "BYTEA";
+								break;
+
+			case TeDATETIME:	type = "TIMESTAMP(0)";
+								break;
+
+			case TeCHARACTER:	type = "CHAR ";
+								sprintf (size, "(%d)", (*it).rep_.numChar_);
+								type += string (size);
+								break;
+
+			case TePOINTTYPE:
+			case TePOINTSETTYPE:
+								addGeomSQL = "SELECT AddGeometryColumn('";
+								addGeomSQL += database_;
+								addGeomSQL += "', '";
+								addGeomSQL += TeConvertToLowerCase(table);
+								addGeomSQL += "', 'spatial_data', ";
+								addGeomSQL += " -1, 'POINT', 2)";
+
+								addGeomColumnsSQL.push_back(addGeomSQL);
+
+								++it;
+								continue;
+
+			case TeLINE2DTYPE:
+			case TeLINESETTYPE:							
+								addGeomSQL  = "SELECT AddGeometryColumn('";
+								addGeomSQL += database_;
+								addGeomSQL += "', '";
+								addGeomSQL += TeConvertToLowerCase(table);
+								addGeomSQL += "', 'spatial_data',";
+								addGeomSQL += " -1, 'LINESTRING', 2)";
+
+								addGeomColumnsSQL.push_back(addGeomSQL);
+
+								++it;
+								continue;
+
+			case TePOLYGONTYPE:
+			case TePOLYGONSETTYPE:
+								addGeomSQL  = "SELECT AddGeometryColumn('";
+								addGeomSQL += database_;
+								addGeomSQL += "', '";
+								addGeomSQL += TeConvertToLowerCase(table);
+								addGeomSQL += "', 'spatial_data',";
+								addGeomSQL += " -1, 'POLYGON', 2)";
+
+								addGeomColumnsSQL.push_back(addGeomSQL);
+
+								++it;
+								continue;
+
+			case TeCELLTYPE:
+			case TeCELLSETTYPE:
+								if(!first)
+									createTable += ", ";
+								else
+									first = false;
+
+								addGeomSQL  = "SELECT AddGeometryColumn('";
+								addGeomSQL += database_;
+								addGeomSQL += "', '";
+								addGeomSQL += TeConvertToLowerCase(table);
+								addGeomSQL += "', 'spatial_data',";
+								addGeomSQL += " -1, 'POLYGON', 2)";
+
+								addGeomColumnsSQL.push_back(addGeomSQL);
+
+								createTable += " col_number   INTEGER      NOT NULL,";
+								createTable += " row_number	INTEGER      NOT NULL ";
+								++it;
+								continue;					
+
+			case TeRASTERTYPE:
+								if(!first)
+									createTable += ", ";
+								else
+									first = false;
+
+								createTable += " block_box         BOX         NOT NULL,";
+								createTable += " band_id		     INTEGER     NOT NULL,";		   
+								createTable += " resolution_factor INTEGER     NOT NULL,";
+								createTable += " subband		     INTEGER     NOT NULL,";		   
+								createTable += " spatial_data      BYTEA,";
+								createTable += " block_size        INTEGER  NOT NULL ";
+		   						++it;
+								continue;
+
+			case TeNODETYPE:
+			case TeNODESETTYPE:
+								addGeomSQL = "SELECT AddGeometryColumn('";
+								addGeomSQL += database_;
+								addGeomSQL += "', '";
+								addGeomSQL += TeConvertToLowerCase(table);
+								addGeomSQL += "', 'spatial_data', ";
+								addGeomSQL += " -1, 'POINT', 2)";
+
+								addGeomColumnsSQL.push_back(addGeomSQL);
+
+								++it;
+								continue;
+
+			case TeTEXTTYPE:
+			case TeTEXTSETTYPE:
+
+			default:			type = "VARCHAR ";
+								sprintf (size, "(%d)", (*it).rep_.numChar_);
+								type += string (size);
+								break;
+		}
 
-bool TePostGIS::createCellGeometry(const string& tableName)
-{
-	errorMessage_ = "";
+		if(!((*it).rep_.defaultValue_.empty()))
+			type += " DEFAULT '" + (*it).rep_.defaultValue_ + "' ";
 
-	string create  = "CREATE TABLE " + tableName + " ";
-	       create += "(";
-		   create += " geom_id		SERIAL,";
-		   create += " object_id    VARCHAR(255) NULL,";
-	       create += " col_number   INT          NOT NULL,";
-	       create += " row_number	INT          NOT NULL,";
-	       create += " PRIMARY KEY (geom_id)";
-		   create += ")";
+		if(!((*it).rep_.null_))
+			type += " NOT NULL ";
+		
+		if(!first)
+			createTable += ",  ";
+		else
+			first = false;
 
-	if(!this->execute(create))
-		return false;
+		createTable += (*it).rep_.name_ + " ";
+		createTable += type;
 
-	create  = "SELECT AddGeometryColumn('";
-	create += database_;
-	create += "', '";
-	create += TeConvertToLowerCase(tableName);
-	create += "', 'spatial_data',";
-	create += " -1, 'POLYGON', 2)";
+		// check if column is part of primary key
+		if((*it).rep_.isPrimaryKey_ && (*it).rep_.type_ != TeBLOB )
+		{
+			if(!pkeys.empty())
+				pkeys += ", ";
+			
+			pkeys += (*it).rep_.name_;
+		}
 
-	if(!this->execute(create))
-		return false;
 
-	//creates indexes
-	if(!createIndex(tableName, tableName + "obj_idx", "object_id"))
-		return false;
+		++it;
+	}
 
-	return createIndex(tableName, tableName + "rc_idx", "row_number, col_number");
-}
+	if(!pkeys.empty())
+	{	string pk = ", PRIMARY KEY(";
+	           pk += pkeys;
+			   pk += ")";
 
+		createTable += pk;
+	}
 
-bool TePostGIS::createNodeGeometry(const string& tableName)
-{
-	errorMessage_ = "";
 
-	string create  = "CREATE TABLE " + tableName + " ";
-	       create += "(";
-		   create += " geom_id    SERIAL,";
-		   create += " object_id  VARCHAR(255) NULL,";
-		   create += " PRIMARY KEY (geom_id)";
-		   create += ")";
+	createTable += ");";
 
-	if(!this->execute(create))
+	if(!execute(createTable))
 		return false;
 
-	create  = "SELECT AddGeometryColumn('";
-	create += database_;
-	create += "', '";
-	create += TeConvertToLowerCase(tableName);
-	create += "', 'spatial_data',";
-	create += " -1, 'POINT', 2)";
-
-	if(!this->execute(create))
-		return false;
+	for(unsigned int i = 0; i < addGeomColumnsSQL.size(); ++i)
+	{
+		if(!execute(addGeomColumnsSQL[i]))
+			return false;
+	}
 
-	//creates indexes
-	return createIndex(tableName, tableName + "obj_idx", "object_id");
+	return true;
 }
 
-bool TePostGIS::generateLabelPositions(TeTheme *theme)
+bool TePostGIS::generateLabelPositions(TeTheme *theme, const std::string& objectId)
 {
 	string	geomTable, upd;
 	string	collTable = theme->collectionTable();
@@ -276,6 +403,9 @@ bool TePostGIS::generateLabelPositions(TeTheme *theme)
 		upd += " WHERE (label_x IS NULL) OR (label_y IS NULL)";
 	}	
 
+	if (!objectId.empty())
+		upd += " AND c_object_id='"+objectId+"'";
+		
 	return execute(upd);
 }
 
@@ -289,9 +419,7 @@ bool TePostGIS::selectPolygonSet(const string& table, const string& criteria, Te
 	if(!criteria.empty())
 		sql += " WHERE " + criteria;
 	
-	sql += " ORDER BY object_id ASC";
-	 
-	if(!portal->query(sql) || !portal->fetchRow())
+	if(!portal->query(sql, TeSERVERSIDE, TeUNIDIRECTIONAL, TeREADONLY, TeBINARYCURSOR) || !portal->fetchRow())
 	{
 		delete portal;
 		return false;
@@ -330,14 +458,14 @@ bool TePostGIS::loadPolygonSet(TeTheme* theme, TePolygonSet& ps)
 		return false;
 
 	string sql  = "SELECT * FROM (" + polygonTable + " RIGHT JOIN " + collTable;
-	       sql += " ON " + polygonTable + ".object_id = " + collTable + ".object_id)";
+	       sql += " ON " + polygonTable + ".object_id = " + collTable + ".c_object_id)";
 	
 	TeDatabasePortal *portal = this->getPortal();
 	
 	if(!portal)
 		return false;
 
-	if(!portal->query(sql) || !portal->fetchRow())
+	if(!portal->query(sql, TeSERVERSIDE, TeUNIDIRECTIONAL, TeREADONLY, TeBINARYCURSOR) || !portal->fetchRow())
 	{
 		delete portal;
 		return false;
@@ -367,7 +495,7 @@ bool TePostGIS::loadPolygonSet(const string& table, const string& geoid, TePolyg
 	if (!geoid.empty())
 		q += " WHERE object_id = '" + geoid +"'";
 	
-	if (!portal->query(q) || !portal->fetchRow())
+	if (!portal->query(q, TeSERVERSIDE, TeUNIDIRECTIONAL, TeREADONLY, TeBINARYCURSOR) || !portal->fetchRow())
 	{	
 		delete portal;
 		return false;
@@ -397,9 +525,8 @@ bool TePostGIS::loadPolygonSet(const string& table, TeBox& box, TePolygonSet& ps
 
 	string q = "SELECT * FROM " + table + " WHERE ";
 	       q += this->getSQLBoxWhere (box, TePOLYGONS);
-	       q += " ORDER BY object_id ASC";
 
-	if(!portal->query(q) || !portal->fetchRow())
+	if(!portal->query(q, TeSERVERSIDE, TeUNIDIRECTIONAL, TeREADONLY, TeBINARYCURSOR) || !portal->fetchRow())
 	{	
 		delete portal;
 		return false;
@@ -429,9 +556,8 @@ TeDatabasePortal* TePostGIS::loadPolygonSet(const string& table, TeBox& box)
 
 	string q = "SELECT * FROM " + table + " WHERE ";
 	       q += this->getSQLBoxWhere(box, TePOLYGONS);
-	       q += " ORDER BY object_id ASC";
 
-	if(!portal->query(q) || !portal->fetchRow())
+	if(!portal->query(q, TeSERVERSIDE, TeUNIDIRECTIONAL, TeREADONLY, TeBINARYCURSOR) || !portal->fetchRow())
 	{	
 		delete portal;
 		return 0;
@@ -454,15 +580,8 @@ bool TePostGIS::locatePolygon(const string& table, TeCoord2D& pt, TePolygon& pol
 	       sql += table;
 		   sql += " WHERE ";
 		   sql += getSQLBoxWhere(box, TePOLYGONS);
-		   //sql += " WHERE GeometryFromText('";
-		   //sql += PGPoint_encode(TePoint(pt));
-		   //sql += "', -1) && spatial_data) ";
-		   //AND intersects(GeometryFromText('";
-		   //sql += PGPoint_encode(TePoint(pt));
-		   //sql += "', -1), spatial_data)";
-
 	
-	if(!portal->query(sql) || !portal->fetchRow())
+	if(!portal->query(sql, TeSERVERSIDE, TeUNIDIRECTIONAL, TeREADONLY, TeBINARYCURSOR) || !portal->fetchRow())
 	{	
 		delete portal;
 		return false;
@@ -505,19 +624,11 @@ bool TePostGIS::locatePolygonSet(const string& table, TeCoord2D &pt, double tol,
 		   sql += " WHERE ";
 		   sql += getSQLBoxWhere(box, TePOLYGONS);
 
-			   //GeometryFromText('";
-		   //sql += PGPoint_encode(TePoint(pt));
-		   //sql += "', -1') && spatial_data) ";
-		   //AND intersects(GeometryFromText('";
-		   //sql += PGPoint_encode(TePoint(pt));
-		   //sql += "', -1), spatial_data)";
-
-	if (!portal->query(sql) || !portal->fetchRow())
+	if (!portal->query(sql, TeSERVERSIDE, TeUNIDIRECTIONAL, TeREADONLY, TeBINARYCURSOR) || !portal->fetchRow())
 	{	
 		delete portal;
 		return false;
-	}
-	
+	}	
 	bool flag = true;
 	
 	polygons.clear();
@@ -545,39 +656,57 @@ bool TePostGIS::insertPolygon(const string& table, TePolygon &p)
 {
 	errorMessage_ = "";
 
-	//TeRemoveDuplicatedCoordinates(p);
+	unsigned int sizeBinaryPolygon = 0;
+	char* binaryPolygon = TePolygonToWKBPolygon(p, sizeBinaryPolygon);
 
-	string sql  = "INSERT INTO " + table + " (object_id, spatial_data) VALUES('";
-	       sql += p.objectId();
-		   sql += "', ";
+	int nParams = 2;
+	Oid paramTypes[2];
+	const char *paramValues[2];
+	int paramLengths[2];
+	int paramFormats[2];
+	
+	//tipos dos parametros
+	paramTypes[0] = PG_VARCHAR_TYPE;
+	paramTypes[1] = 0;
 
-	sql += "GeometryFromText('POLYGON(";
+	string strOid = escapeSequence(p.objectId());
+	paramValues[0] = strOid.c_str();
+	paramValues[1] = binaryPolygon;
 
+	paramLengths[0] = 0;
+	paramLengths[1] = sizeBinaryPolygon;
+	
+	paramFormats[0] = 0;
+	paramFormats[1] = 1;
+	
 
-	for(register unsigned int i = 0; i < p.size(); ++i)
-	{
-		if(i != 0)
-		{
-			sql += ", ";
-		}
-			
-		PGConcatLineString(p[i], sql);
-	}
+	string command = "INSERT INTO ";
+			command += table;
+			command += " (object_id, spatial_data)";//::geometry
+			command += " VALUES ($1, $2::geometry)";
 	
-	sql += ")', -1)";	// end POLYGON
-	sql += ")";			// end SQL
+	int result = tepg_connection_.exec_cmd_params(command.c_str(),
+                    nParams,
+                    paramTypes,
+                    paramValues,
+                    paramLengths,
+                    paramFormats,
+                    0);
+
+	delete [] binaryPolygon;
 			
-	if(this->execute(sql))
+	if(result == 1)
 	{
-		sql = "SELECT currval('" + table + "_geom_id_seq')";
+		string sql = "SELECT currval('" + table + "_geom_id_seq')";
 		
 		TePGRecordset rec;
 		rec.open(sql.c_str(), &tepg_connection_);
 		if(rec.recordCount() > 0)
 		{
+			p.geomId(rec.getInt(0));
 			for(register unsigned int i = 0; i < p.size(); ++i)
 			{
-				p[i].geomId(atoi(rec.value(0)));
+				p[i].geomId(rec.getInt(0));
 			}
 		}
 
@@ -593,28 +722,46 @@ bool TePostGIS::updatePolygon(const string& table, TePolygon &p)
 {
 	errorMessage_ = "";
 
-	//TeRemoveDuplicatedCoordinates(p);
-
-	TePolygon::iterator it = p.begin();
-	TePolygon::iterator it_end = p.end();
+	unsigned int sizeBinaryPolygon = 0;
+	char* binaryPolygon = TePolygonToWKBPolygon(p, sizeBinaryPolygon);
 
-	string sql = "UPDATE " + table + " SET object_id = '";
-			   sql += p.objectId();
-			   sql += "', spatial_data = ";
+	int nParams = 2;
+	Oid paramTypes[2];
+	const char *paramValues[2];
+	int paramLengths[2];
+	int paramFormats[2];
+	
+	//tipos dos parametros
+	paramTypes[0] = PG_VARCHAR_TYPE;
+	paramTypes[1] = 0;
 
+	string strOid = escapeSequence(p.objectId());
+	paramValues[0] = strOid.c_str();
+	paramValues[1] = binaryPolygon;
 
-	sql += "GeometryFromText('POLYGON(";
-			   
-	for(; it != it_end; ++it)
-	{
-		PGConcatLineString(*it, sql);				
-	}
+	paramLengths[0] = 0;
+	paramLengths[1] = sizeBinaryPolygon;
+	
+	paramFormats[0] = 0;
+	paramFormats[1] = 1;
+	
+	string command = "UPDATE " + table + " SET";
+	command += " object_id = $1";
+	command += ", spatial_data = $2::geometry";
+	command += " WHERE geom_id = ";
+    command += Te2String(p.geomId());
+	
+	int result = tepg_connection_.exec_cmd_params(command.c_str(),
+                    nParams,
+                    paramTypes,
+                    paramValues,
+                    paramLengths,
+                    paramFormats,
+                    0);
 
-	sql += ")', -1)";	// end POLYGON
-    sql += " WHERE geom_id = ";
-    sql += Te2String(it->geomId());
+	delete [] binaryPolygon;
 
-	return this->execute(sql);
+	return (result == 1);
 }
 
 bool TePostGIS::loadLineSet(const string& table, const string& geoid, TeLineSet& ls)
@@ -626,7 +773,7 @@ bool TePostGIS::loadLineSet(const string& table, const string& geoid, TeLineSet&
 	if(!geoid.empty())
 		q += " WHERE object_id = '" + geoid +"'";
 
-	if(!portal->query(q) || !portal->fetchRow())
+	if(!portal->query(q, TeSERVERSIDE, TeUNIDIRECTIONAL, TeREADONLY, TeBINARYCURSOR) || !portal->fetchRow())
 	{	
 		delete portal;
 		return false;
@@ -654,10 +801,9 @@ bool TePostGIS::loadLineSet(const string& table, TeBox& box, TeLineSet& linSet)
 		return false;
 
 	string q  = "SELECT * FROM " + table + " WHERE ";
-	       q += this->getSQLBoxWhere (box, TeLINES);
-	       q += " ORDER BY object_id DESC";
+	       q += this->getSQLBoxWhere (box, TeLINES);       
 
-	if(!portal->query(q) || !portal->fetchRow())
+	if(!portal->query(q, TeSERVERSIDE, TeUNIDIRECTIONAL, TeREADONLY, TeBINARYCURSOR) || !portal->fetchRow())
 	{	
 		delete portal;
 		return false;
@@ -687,9 +833,9 @@ TeDatabasePortal* TePostGIS::loadLineSet(const string& table, TeBox& box)
 
 	string q  = "SELECT * FROM " + table + " WHERE ";
 	       q += this->getSQLBoxWhere (box, TeLINES);
-	       q += " ORDER BY object_id DESC";
+	       
 
-	if(!portal->query(q) || !portal->fetchRow())
+	if(!portal->query(q, TeSERVERSIDE, TeUNIDIRECTIONAL, TeREADONLY, TeBINARYCURSOR) || !portal->fetchRow())
 	{	
 		delete portal;
 
@@ -703,26 +849,54 @@ bool TePostGIS::insertLine(const string& table, TeLine2D& l)
 {
 	errorMessage_ = "";
 
-	//TeRemoveDuplicatedCoordinates(l);
+	unsigned int sizeBinaryRing = 0;
+	char* binaryRing = TeLine2DToWKBLineString(l, sizeBinaryRing);
+
+	int nParams = 2;
+	Oid paramTypes[2];
+	const char *paramValues[2];
+	int paramLengths[2];
+	int paramFormats[2];
+	
+	//tipos dos parametros
+	paramTypes[0] = PG_VARCHAR_TYPE;
+	paramTypes[1] = 0;
+
+	string strOid = escapeSequence(l.objectId());
+	paramValues[0] = strOid.c_str();
+	paramValues[1] = binaryRing;
 
-	string sql  = "INSERT INTO " + table + " (object_id, spatial_data) ";
-		   sql += "VALUES('";
-		   sql += l.objectId();
-		   sql += "', GeometryFromText('LINESTRING";
+	paramLengths[0] = 0;
+	paramLengths[1] = sizeBinaryRing;
+	
+	paramFormats[0] = 0;
+	paramFormats[1] = 1;
+	
 
-	PGConcatLineString(l, sql);
+	string command = "INSERT INTO ";
+			command += table;
+			command += " (object_id, spatial_data)";
+			command += " VALUES ($1, $2::geometry)";
 	
-	sql += "', -1))";
+	int result = tepg_connection_.exec_cmd_params(command.c_str(),
+                    nParams,
+                    paramTypes,
+                    paramValues,
+                    paramLengths,
+                    paramFormats,
+                    0);
 
-	if(this->execute(sql))
+	delete [] binaryRing;
+
+	if(result == 1)
 	{
-		sql = "SELECT currval('" + table + "_geom_id_seq')";
+		string sql = "SELECT currval('" + table + "_geom_id_seq')";
 
 		TePGRecordset rec;
 		rec.open(sql.c_str(), &tepg_connection_);
 
 		if(rec.recordCount() > 0)
-			l.geomId(atoi(rec.value(0)));
+			l.geomId(rec.getInt(0));
 
 		rec.close();
 	}
@@ -736,18 +910,46 @@ bool TePostGIS::updateLine(const string& table, TeLine2D& l)
 {
 	errorMessage_ = "";
 
-	//TeRemoveDuplicatedCoordinates(l);
+		unsigned int sizeBinaryRing = 0;
+	char* binaryRing = TeLine2DToWKBLineString(l, sizeBinaryRing);
 
-	string sql  = "UPDATE " + table + " SET object_id = '";
-		   sql += l.objectId();
-		   sql += "', spatial_data = GeometryFromText('LINESTRING";
+	int nParams = 2;
+	Oid paramTypes[2];
+	const char *paramValues[2];
+	int paramLengths[2];
+	int paramFormats[2];
+	
+	//tipos dos parametros
+	paramTypes[0] = PG_VARCHAR_TYPE;
+	paramTypes[1] = 0;
 
-	PGConcatLineString(l, sql);
+	string strOid = escapeSequence(l.objectId());
+	paramValues[0] = strOid.c_str();
+	paramValues[1] = binaryRing;
 
-	sql += "', -1) WHERE geom_id = ";
-	sql += Te2String(l.geomId());			
+	paramLengths[0] = 0;
+	paramLengths[1] = sizeBinaryRing;
+	
+	paramFormats[0] = 0;
+	paramFormats[1] = 1;
+
+	string command  = "UPDATE " + table + " SET";
+		   command += " obejct_id = $1";
+		   command += ", spatial_data = $2::geometry";
+		   command += " WHERE geom_id = ";
+		   command += Te2String(l.geomId());		
+	
+	int result = tepg_connection_.exec_cmd_params(command.c_str(),
+                    nParams,
+                    paramTypes,
+                    paramValues,
+                    paramLengths,
+                    paramFormats,
+                    0);
+
+	delete [] binaryRing;
 
-	return this->execute(sql);
+	return (result == 1);
 }
 
 bool TePostGIS::locateLine(const string& table, TeCoord2D &pt, TeLine2D &line, const double& tol)
@@ -756,26 +958,12 @@ bool TePostGIS::locateLine(const string& table, TeCoord2D &pt, TeLine2D &line, c
 
 	TeBox box (pt.x()-tol,pt.y()-tol,pt.x()+tol,pt.y()+tol);
 
-	//string geom  = "GeometryFromText('POLYGON((";
-	//     geom += Te2String(box.x1()) + " " + Te2String(box.y1()) + ", ";
-	//	   geom += Te2String(box.x2()) + " " + Te2String(box.y1()) + ", ";
-	//	   geom += Te2String(box.x2()) + " " + Te2String(box.y2()) + ", ";
-	//	   geom += Te2String(box.x1()) + " " + Te2String(box.y2()) + ", ";
-	//	   geom += Te2String(box.x1()) + " " + Te2String(box.y1());
-	  //     geom += "))', -1)";
-
 	string sql  = "SELECT * FROM ";
 	       sql += table;
 		   sql += " WHERE ";
 		   sql += this->getSQLBoxWhere(box, TeLINES);
-		  // sql += 
-		   //(" + geom + " && spatial_data) ";
-		   //AND intersects(";
-		   //sql += geom;
-		   //sql += ", spatial_data)";
-
 	
-	if(!portal->query(sql) || !portal->fetchRow())
+	if(!portal->query(sql, TeSERVERSIDE, TeUNIDIRECTIONAL, TeREADONLY, TeBINARYCURSOR) || !portal->fetchRow())
 	{
 		delete portal;
 		return false;
@@ -809,19 +997,52 @@ bool TePostGIS::insertPoint(const string& table, TePoint &p)
 {
 	errorMessage_ = "";
 
-	string sql  = "INSERT INTO " + table + " (object_id, spatial_data) VALUES('";
- 		   sql +=  p.objectId();
-		   sql += "', GeometryFromText('";
-		   sql += PGPoint_encode(p);
-		   sql += "', -1))";
+	unsigned int sizeBinaryPoint = 2 * sizeof(double);
+	char* binaryPoint = TePointToWKBPoint(p, sizeBinaryPoint);
 
-	if(this->execute(sql))
+	int nParams = 2;
+	Oid paramTypes[2];
+	const char *paramValues[2];
+	int paramLengths[2];
+	int paramFormats[2];
+	
+	//tipos dos parametros
+	paramTypes[0] = PG_VARCHAR_TYPE;
+	paramTypes[1] = 0;
+
+	string strOid = escapeSequence(p.objectId());
+	paramValues[0] = strOid.c_str();
+	paramValues[1] = binaryPoint;
+
+	paramLengths[0] = 0;
+	paramLengths[1] = sizeBinaryPoint;
+	
+	paramFormats[0] = 0;
+	paramFormats[1] = 1;
+	
+
+	string command = "INSERT INTO ";
+			command += table;
+			command += " (object_id, spatial_data)";
+			command += " VALUES ($1, $2::geometry)";
+	
+	int result = tepg_connection_.exec_cmd_params(command.c_str(),
+                    nParams,
+                    paramTypes,
+                    paramValues,
+                    paramLengths,
+                    paramFormats,
+                    0);
+
+	delete [] binaryPoint;
+
+	if(result == 1)
 	{
-		sql = "SELECT currval('" + table + "_geom_id_seq')";
+		string sql = "SELECT currval('" + table + "_geom_id_seq')";
 		TePGRecordset rec;
 		rec.open(sql.c_str(), &tepg_connection_);
 		if(rec.recordCount() > 0)
-			p.geomId(atoi(rec.value(0)));
+			p.geomId(rec.getInt(0));
 
 		rec.close();
 	}
@@ -835,14 +1056,46 @@ bool TePostGIS::updatePoint(const string& table, TePoint &p)
 {
 	errorMessage_ = "";
 
-	string sql  = "UPDATE " + table + " SET object_id = '";
-		   sql +=  p.objectId();
-		   sql += "', spatial_data = GeometryFromText('";
-		   sql += PGPoint_encode(p);
-		   sql += "', -1) WHERE geom_id = ";
-		   sql += Te2String(p.geomId());
+	unsigned int sizeBinaryPoint = 2 * sizeof(double);
+	char* binaryPoint = TePointToWKBPoint(p, sizeBinaryPoint);
 
-	return this->execute(sql);
+	int nParams = 2;
+	Oid paramTypes[2];
+	const char *paramValues[2];
+	int paramLengths[2];
+	int paramFormats[2];
+	
+	//tipos dos parametros
+	paramTypes[0] = PG_VARCHAR_TYPE;
+	paramTypes[1] = 0;
+
+	string strOid = escapeSequence(p.objectId());
+	paramValues[0] = strOid.c_str();
+	paramValues[1] = binaryPoint;
+
+	paramLengths[0] = 0;
+	paramLengths[1] = sizeBinaryPoint;
+	
+	paramFormats[0] = 0;
+	paramFormats[1] = 1;
+	
+	string command  = "UPDATE " + table + " SET";
+			command += "  object_id = $1";
+			command += ", spatial_data = $2::geometry";
+			command += " WHERE geom_id = ";
+			command += Te2String(p.geomId());
+	
+	int result = tepg_connection_.exec_cmd_params(command.c_str(),
+                    nParams,
+                    paramTypes,
+                    paramValues,
+                    paramLengths,
+                    paramFormats,
+                    0);
+
+	delete [] binaryPoint;
+	
+	return (result == 1);
 }
 
 bool TePostGIS::locatePoint(const string& table, TeCoord2D& pt, TePoint& point, const double& tol)
@@ -856,7 +1109,7 @@ bool TePostGIS::locatePoint(const string& table, TeCoord2D& pt, TePoint& point,
 		   sql += " WHERE ";
 		   sql += this->getSQLBoxWhere(bbox, TePOINTS);
 
-	if(!portal->query(sql) || !portal->fetchRow())
+	if(!portal->query(sql, TeSERVERSIDE, TeUNIDIRECTIONAL, TeREADONLY, TeBINARYCURSOR) || !portal->fetchRow())
 	{
 		delete portal;
 		return false;
@@ -887,20 +1140,57 @@ bool TePostGIS::insertNode(const string& table, TeNode& node)
 {
 	errorMessage_ = "";
 
-	string  sql = "INSERT INTO " + table + " (object_id, spatial_data) VALUES('";
-			sql += node.objectId();
-			sql += "', GeometryFromText('";
-			sql += PGNode_encode(node);
-			sql += "', -1))";
+	TePoint p;
+	TeCoord2D nodeCoord(node.location().x(), node.location().y());
+	p.add(nodeCoord);
+
+	unsigned int sizeBinaryPoint = 2 * sizeof(double);
+	char* binaryPoint = TePointToWKBPoint(p, sizeBinaryPoint);
+
+	int nParams = 2;
+	Oid paramTypes[2];
+	const char *paramValues[2];
+	int paramLengths[2];
+	int paramFormats[2];
+	
+	//tipos dos parametros
+	paramTypes[0] = PG_VARCHAR_TYPE;
+	paramTypes[1] = 0;
+
+	string strOid = escapeSequence(node.objectId());
+	paramValues[0] = strOid.c_str();
+	paramValues[1] = binaryPoint;
+
+	paramLengths[0] = 0;
+	paramLengths[1] = sizeBinaryPoint;
+	
+	paramFormats[0] = 0;
+	paramFormats[1] = 1;
+	
+
+	string command = "INSERT INTO ";
+			command += table;
+			command += " (object_id, spatial_data)";
+			command += " VALUES ($1, $2::geometry)";
+	
+	int result = tepg_connection_.exec_cmd_params(command.c_str(),
+                    nParams,
+                    paramTypes,
+                    paramValues,
+                    paramLengths,
+                    paramFormats,
+                    0);
+
+	delete [] binaryPoint;
 
-	if(!this->execute(sql))
+	if(result != 1)
 		return false;
 
-	sql = "SELECT currval('" + table + "_geom_id_seq')";
+	string sql = "SELECT currval('" + table + "_geom_id_seq')";
 	TePGRecordset rec;
 	rec.open(sql.c_str(), &tepg_connection_);
 	if(rec.recordCount() > 0)
-		node.geomId(atoi(rec.value(0)));
+		node.geomId(rec.getInt(0));
 
 	rec.close();
 
@@ -911,38 +1201,125 @@ bool TePostGIS::updateNode(const string& table, TeNode& node)
 {
 	errorMessage_ = "";
 
-	string  sql  = "UPDATE " + table + " SET object_id = '";
-		    sql += node.objectId();
-			sql += "', spatial_data = GeometryFromText('";
-			sql += PGNode_encode(node);
-			sql += "', -1) WHERE geom_id = ";
-			sql += Te2String(node.geomId());
+	TePoint p;
+	TeCoord2D nodeCoord(node.location().x(), node.location().y());
+	p.add(nodeCoord);
+
+	unsigned int sizeBinaryPoint = 2 * sizeof(double);
+	char* binaryPoint = TePointToWKBPoint(p, sizeBinaryPoint);
+
+	int nParams = 2;
+	Oid paramTypes[2];
+	const char *paramValues[2];
+	int paramLengths[2];
+	int paramFormats[2];
+	
+	//tipos dos parametros
+	paramTypes[0] = PG_VARCHAR_TYPE;
+	paramTypes[1] = 0;
+
+	string strOid = escapeSequence(node.objectId());
+	paramValues[0] = strOid.c_str();
+	paramValues[1] = binaryPoint;
 
-	return this->execute(sql);
+	paramLengths[0] = 0;
+	paramLengths[1] = sizeBinaryPoint;
+	
+	paramFormats[0] = 0;
+	paramFormats[1] = 1;
+	
+	string  command  = "UPDATE " + table + " SET";
+		    command += " object_id = $1";
+			command += ", spatial_data = $2::geometry";
+			command += " WHERE geom_id = ";
+			command += Te2String(node.geomId());
+	
+	int result = tepg_connection_.exec_cmd_params(command.c_str(),
+                    nParams,
+                    paramTypes,
+                    paramValues,
+                    paramLengths,
+                    paramFormats,
+                    0);
+
+	delete [] binaryPoint;
+
+	return (result == 1);
 }
 
 bool TePostGIS::insertCell(const string& table, TeCell &c)
 {
 	errorMessage_ = "";
 
-	string sql  = "INSERT INTO " + table + " (object_id, spatial_data, col_number, row_number) VALUES('";
-		   sql += c.objectId();
-		   sql += "', GeometryFromText('";
-		   sql += PGMakePolygon(c.box());
-		   sql += "', -1), ";
-		   sql += Te2String(c.column());
-		   sql += ", ";
-		   sql += Te2String(c.line());
-		   sql += ")";
-
-	if(!this->execute(sql))
+	TePolygon p;
+	TeLinearRing ring;
+	ring.add(TeCoord2D(c.box().x1(), c.box().y1()));
+	ring.add(TeCoord2D(c.box().x2(), c.box().y1()));
+	ring.add(TeCoord2D(c.box().x2(), c.box().y2()));
+	ring.add(TeCoord2D(c.box().x1(), c.box().y2()));
+	ring.add(TeCoord2D(c.box().x1(), c.box().y1()));
+
+	p.add(ring);
+
+	unsigned int sizeBinaryPolygon = 0;
+	char* binaryPolygon = TePolygonToWKBPolygon(p, sizeBinaryPolygon);
+
+	int nParams = 4;
+	Oid paramTypes[4];
+	const char *paramValues[4];
+	int paramLengths[4];
+	int paramFormats[4];
+	
+	//tipos dos parametros
+	paramTypes[0] = PG_VARCHAR_TYPE;
+	paramTypes[1] = 0;
+	paramTypes[2] = PG_INT4_TYPE;
+	paramTypes[3] = PG_INT4_TYPE;
+
+	string strOid = escapeSequence(c.objectId());
+	paramValues[0] = strOid.c_str();
+	paramValues[1] = binaryPolygon;
+
+	string strCol = Te2String(c.column());
+	paramValues[2] = strCol.c_str();		
+
+	string strRow = Te2String(c.line());
+	paramValues[3] = strRow.c_str();	
+
+	paramLengths[0] = 0;
+	paramLengths[1] = sizeBinaryPolygon;
+	paramLengths[2] = 0;
+	paramLengths[3] = 0;
+	
+	paramFormats[0] = 0;
+	paramFormats[1] = 1;
+	paramFormats[2] = 0;
+	paramFormats[3] = 0;
+
+	string command = "INSERT INTO ";
+			command += table;
+			command += " (object_id, spatial_data, col_number, row_number)";
+			command += " VALUES ($1, $2::geometry, $3, $4)";
+	
+	int result = tepg_connection_.exec_cmd_params(command.c_str(),
+                    nParams,
+                    paramTypes,
+                    paramValues,
+                    paramLengths,
+                    paramFormats,
+                    0);
+
+	delete [] binaryPolygon;
+
+	if(result != 1)
 		return false;
+		
 
-	sql = "SELECT currval('" + table + "_geom_id_seq')";
+	string sql = "SELECT currval('" + table + "_geom_id_seq')";
 	TePGRecordset rec;
 	rec.open(sql.c_str(), &tepg_connection_);
 	if(rec.recordCount() > 0)
-		c.geomId(atoi(rec.value(0)));
+		c.geomId(rec.getInt(0));
 	
 	rec.close();	
 
@@ -953,18 +1330,70 @@ bool TePostGIS::updateCell(const string& table, TeCell &c)
 {
 	errorMessage_ = "";
 
-	string sql  = "UPDATE " + table + " SET object_id = '";
-		   sql += c.objectId();
-		   sql += "', spatial_data = GeometryFromText('";
-		   sql += PGMakePolygon(c.box());
-		   sql += "', -1), col_number = ";
-		   sql += Te2String(c.column());
-		   sql += ", row_number = ";
-           sql += Te2String(c.line());
-		   sql += " WHERE geom_id = ";
-		   sql += Te2String(c.geomId());			
-
-	return this->execute(sql);
+	TePolygon p;
+	TeLinearRing ring;
+	ring.add(TeCoord2D(c.box().x1(), c.box().y1()));
+	ring.add(TeCoord2D(c.box().x2(), c.box().y1()));
+	ring.add(TeCoord2D(c.box().x2(), c.box().y2()));
+	ring.add(TeCoord2D(c.box().x1(), c.box().y2()));
+	ring.add(TeCoord2D(c.box().x1(), c.box().y1()));
+
+	p.add(ring);
+
+	unsigned int sizeBinaryPolygon = 0;
+	char* binaryPolygon = TePolygonToWKBPolygon(p, sizeBinaryPolygon);
+
+	int nParams = 4;
+	Oid paramTypes[4];
+	const char *paramValues[4];
+	int paramLengths[4];
+	int paramFormats[4];
+	
+	//tipos dos parametros
+	paramTypes[0] = PG_VARCHAR_TYPE;
+	paramTypes[1] = 0;
+	paramTypes[2] = PG_INT4_TYPE;
+	paramTypes[3] = PG_INT4_TYPE;
+
+	string strOid = escapeSequence(c.objectId());
+	paramValues[0] = strOid.c_str();
+	paramValues[1] = binaryPolygon;
+
+	string strCol = Te2String(c.column());
+	paramValues[2] = strCol.c_str();		
+
+	string strRow = Te2String(c.line());
+	paramValues[3] = strRow.c_str();	
+
+	paramLengths[0] = 0;
+	paramLengths[1] = sizeBinaryPolygon;
+	paramLengths[2] = 0;
+	paramLengths[3] = 0;
+	
+	paramFormats[0] = 0;
+	paramFormats[1] = 1;
+	paramFormats[2] = 0;
+	paramFormats[3] = 0;
+
+	string command  = "UPDATE " + table + " SET";
+			command += " object_id = $1";
+			command += ", spatial_data = $2::geometry";
+			command += ", col_number = $3";
+			command += ", row_number = $4";
+			command += " WHERE geom_id = ";
+			command += Te2String(c.geomId());
+	
+	int result = tepg_connection_.exec_cmd_params(command.c_str(),
+                    nParams,
+                    paramTypes,
+                    paramValues,
+                    paramLengths,
+                    paramFormats,
+                    0);
+
+	delete [] binaryPolygon;
+
+	return (result == 1);
 }
 
 bool TePostGIS::locateCell(const string& table, TeCoord2D& pt, TeCell& c, const double& tol)
@@ -976,16 +1405,10 @@ bool TePostGIS::locateCell(const string& table, TeCoord2D& pt, TeCell& c, const
 
 	string sql  ="SELECT * FROM ";
 	       sql += table;
-		   sql += "WHERE ";
+		   sql += " WHERE ";
 		   sql += this->getSQLBoxWhere(box, TeCELLS);
 
-		   //sql += " WHERE (GeometryFromText('";
-		   //sql += PGPoint_encode(TePoint(pt));
-		   //sql += "', -1) && spatial_data) AND intersects(GeometryFromText('";
-		   //sql += PGPoint_encode(TePoint(pt));
-		   //sql += ", spatial_data)";
-
-	if(!portal->query(sql) || !portal->fetchRow())
+	if(!portal->query(sql, TeSERVERSIDE, TeUNIDIRECTIONAL, TeREADONLY, TeBINARYCURSOR) || !portal->fetchRow())
 	{
 		delete portal;
 		return false;
@@ -998,22 +1421,57 @@ bool TePostGIS::locateCell(const string& table, TeCoord2D& pt, TeCell& c, const
 	return true;
 }
 
+bool TePostGIS::removeGeometry(const string& tableName, const TeGeomRep& rep, const int& geomId)
+{
+	if(tableName.empty())
+	{
+		return false;
+	}
+
+	std::string remove = "DELETE FROM " + tableName;
+	remove += " WHERE geom_id = " + geomId;
+
+	return this->execute(remove);
+}
+
 bool TePostGIS::createSpatialIndex(const string& table, const string& column, TeSpatialIndexType /*type*/, short /*level*/, short /*tile*/)
 {
-	string create = "CREATE INDEX sp_idx_" + table + " ON " + table + " USING GIST (" + column + " GIST_GEOMETRY_OPS)";
+// we need to find te type we are indexing: a box from PostgreSQL or a geometry from PostGIS.
+	string sql = "SELECT " + column + " FROM " + table + " WHERE 1 = 2";
+
+	TePGRecordset rec;
+
+	if(!rec.open(sql, &(TePostgreSQL::tepg_connection_)))
+	{
+		rec.close();
+		return false;
+	}
+
+	string create = "";
+
+	if(rec.fieldType(0) == PG_BOX_TYPE)
+	{
+		create = "CREATE INDEX sp_idx_" + table + " ON " + table + " USING GIST (" + column + " " + TePostgreSQL::gistBoxOps_ + ")";
+	}
+	else
+	{
+		create = "CREATE INDEX sp_idx_" + table + " ON " + table + " USING GIST (" + column + " GIST_GEOMETRY_OPS)";
+	}
+
+	rec.close();	
 
 	return this->execute(create);
 }
 
 string TePostGIS::getSQLBoxWhere(TeBox& box, TeGeomRep rep)
 {
-	if(rep == TeTEXT || rep == TeRASTER)
-	{
-		string wherebox = TeDatabase::getSQLBoxWhere (box, rep);
-		return wherebox;
-	}
+	if(rep == TeTEXT)
+		return TeDatabase::getSQLBoxWhere(box, rep);
 
 	string colname = "spatial_data";
+	
+	if(rep & TeRASTER)
+		return TePostgreSQL::getSQLBoxWhere(box, rep);
 
 	string wherebox  = "('" + PGBox_encode(box) + "'::box3d";
 		   wherebox += " && " + colname + ")";	
@@ -1023,141 +1481,134 @@ string TePostGIS::getSQLBoxWhere(TeBox& box, TeGeomRep rep)
 
 string TePostGIS::getSQLBoxWhere(const string& table1, const string& table2, TeGeomRep rep2, TeGeomRep rep1)
 {
-	if(rep1 == TeRASTER || rep2 == TeRASTER || rep1 == TeTEXT || rep2 == TeTEXT)
+	if((rep1 == TeTEXT) || (rep2 == TeTEXT))
 	{
-		string wherebox = TeDatabase::getSQLBoxWhere(table1, table2, rep2, rep1);
-
-		return wherebox;
+		return TeDatabase::getSQLBoxWhere(table1, table2, rep2, rep1);
 	}
 
-	string colname1 = "spatial_data";
-	string colname2 = "spatial_data";
+	string col1name = "spatial_data";
+	string col2name = "spatial_data";;
 
-	if(rep1 == TeRASTER)
-		colname1 = "block_box";
+	if(rep1 & TeRASTER)
+		col1name = "block_box";
 
-	if(rep2 == TeRASTER)
-		colname2 = "block_box";
+	if(rep2 & TeRASTER)
+		col2name = "block_box";
 
-	string wherebox  = table1;
-	       wherebox += "." + colname1 + " && ";
-		   wherebox += table2;
-		   wherebox += "." + colname2 + "";  
+	string wherebox  = "(";
+		   wherebox += table1;
+           wherebox += "." + col1name + " && ";
+           wherebox += table2;
+           wherebox += "." + col2name + ")";
 
 	return wherebox;
 }
 
 string TePostGIS::getSQLBoxSelect (const string& tableName, TeGeomRep rep)
 {
+	if(rep == TeTEXT)
+		return TeDatabase::getSQLBoxSelect(tableName, rep);
+
 	string colname = "spatial_data";
 
-	if(rep != TeRASTER)
-	{
+	if(rep & TeRASTER)
+		return TePostgreSQL::getSQLBoxSelect(tableName, rep);
+
+	string select  = tableName +".* , ";
+			select += "xmin("  + tableName + "." + colname + ") as lower_x, ";
+			select += "ymin("  + tableName + "." + colname + ") as lower_y, ";
+			select += "xmax("  + tableName + "." + colname + ") as upper_x, ";
+			select += "ymax("  + tableName + "." + colname + ") as upper_y ";
+
+	return select;
+}
 
-		string select  = tableName +".* , ";
-			   select += "xmin(" + colname + ") as lower_x, ";
-			   select += "ymin(" + colname + ") as lower_y, ";
-			   select += "xmax(" + colname + ") as upper_x, ";
-			   select += "ymax(" + colname + ") as upper_y ";
+bool TePostGIS::getMBRGeom(string tableGeom, string object_id, TeBox& box, string colGeom)
+{
+// we need to find the type we are computing bounding box: a box from PostgreSQL or a geometry from PostGIS.
+	string sql = "SELECT " + colGeom + " FROM " + tableGeom + " WHERE 1 = 2";
 
-		return select;
+	TePGRecordset rec;
+
+	if(!rec.open(sql, &(TePostgreSQL::tepg_connection_)))
+	{
+		rec.close();
+		return false;
 	}
-	else	// RASTER
+
+	if(rec.fieldType(0) == PG_BOX_TYPE)	// use the TePostgreSQL method
 	{
-		string select  = tableName +".* , ";
-			   select += "xmin(lower_x) as lower_x, ";
-			   select += "ymin(lower_y) as lower_y, ";
-			   select += "xmax(upper_x) as upper_x, ";
-			   select += "ymax(upper_y) as upper_y ";
+		rec.close();
 
-		return select;
+		return TePostgreSQL::getMBRGeom(tableGeom, object_id, box, colGeom);
 	}
-}
 
-bool TePostGIS::getMBRGeom(string tableGeom, string object_id, TeBox& box, string /*colGeom*/)
-{
+	rec.close();
+
+// if we are here, so it is a PostGIS geometry: in this case we can use the function extent
+
 	TeDatabasePortal* portal = getPortal();
 	if(!portal)
 		return false;
 
-	string sel = "SELECT extent(spatial_data) FROM " + tableGeom;
+	string sel = "SELECT extent(" +  colGeom + ") FROM " + tableGeom;
 	sel += " WHERE object_id = '" + object_id + "'";
 
-	if(!portal->query(sel))
-	{
-		delete portal;
-		return false;
-	}
-		
-	bool b = portal->fetchRow();
-	if(!b)
+	if(!portal->query(sel)|| !portal->fetchRow())
 	{
 		delete portal;
 		return false;
 	}
-	
+
 	box = PGBox_decode(portal->getData(0));
 
 	delete portal;
 	return true;
 }
 
-bool TePostGIS::getMBRSelectedObjects(string /*geomTable*/, string /*colGeom*/, string fromClause, string whereClause, string afterWhereClause, TeGeomRep repType, TeBox& bout, const double& /*tol*/)
+bool TePostGIS::getMBRSelectedObjects(string geomTable, string colGeom, string fromClause, string whereClause, string afterWhereClause, TeGeomRep repType, TeBox& bout, const double& tol)
 {
-	string colname = "spatial_data";
-
-	if(repType != TeRASTER)
-	{
-		string	fields = "extent(" + colname + ")";
-		string	query  = " SELECT " + fields;
-			    query += " FROM " + fromClause; 
-				query += " WHERE " + whereClause;
-		        query += afterWhereClause;
+	if(repType == TeTEXT)
+		return TeDatabase::getMBRSelectedObjects(geomTable, colGeom, fromClause, whereClause, afterWhereClause, repType, bout, tol);
 
-		TeDatabasePortal* portal = this->getPortal();
+	if(repType == TeRASTER)
+		return TePostgreSQL::getMBRSelectedObjects(geomTable, colGeom, fromClause, whereClause, afterWhereClause, repType, bout, tol);
 
-		if(portal->query(query) && portal->fetchRow())
-		{
-			TeBox aux(PGBox_decode(portal->getData(0)));
-			bout = aux;
-
-			delete portal;
-			return true;
-		}	
+	TeDatabasePortal* portal = getPortal();
+	
+	if (!portal)
+		return false;
 
-		delete portal;		
-	}
-	else
-	{
-		string	fields = "MIN(lower_x), MIN(lower_y), MAX(upper_x), MAX(upper_y)";
-		string	query  = " SELECT " + fields;
-			    query += " FROM " + fromClause; 
-				query += " WHERE " + whereClause;
-		        query += afterWhereClause;
+	string	fields = "extent(" + geomTable + "." + colGeom + ")::BOX3D";
+	string	query  = " SELECT " + fields;
+			query += " FROM " + fromClause; 
 
-		TeDatabasePortal* portal = this->getPortal();
+	if(!whereClause.empty())
+		query += " WHERE " + whereClause;		
 
-		if(portal->query(query) && portal->fetchRow())
-		{
-			double x1 = portal->getDouble(0);
-			double y1 = portal->getDouble(1);
-			double x2 = portal->getDouble(2);
-			double y2 = portal->getDouble(3);
+	if(portal->query(query) && portal->fetchRow())
 
-			TeBox aux(x1, y1, x2, y2);
-			bout = aux;
 
-			delete portal;
-			return true;
-		}	
+	{
+		TeBox aux(PGBox_decode(portal->getData(0)));
+		bout = aux;
 
 		delete portal;
-	}
+		return true;
+	}	
+
+	delete portal;	
 
 	return false;
 }
 
+string TePostGIS::getSpatialIdxColumn(TeGeomRep rep)
+{
+	if (rep == TeRASTER)
+		return "block_box";
 
+	return "spatial_data";
+}
 
 TePostGISPortal::TePostGISPortal(TeDatabase *pDatabase)
 {
@@ -1171,7 +1622,18 @@ bool TePostGISPortal::fetchGeometry(TePolygon& pol)
 	
 	tepg_recordset_.getPGISPolygon("spatial_data", pol);
 	pol.geomId(tepg_recordset_.getInt("geom_id"));
-	pol.objectId(tepg_recordset_.value("object_id"));	
+	pol.objectId(tepg_recordset_.getData("object_id"));	
+
+	return fetchRow();
+}
+
+bool TePostGISPortal::fetchGeometry(TePolygon& pol, const unsigned int& initIndex)
+{
+	errorMessage_ = "";
+	
+	tepg_recordset_.getPGISPolygon(initIndex+2, pol);
+	pol.geomId(tepg_recordset_.getInt(initIndex));
+	pol.objectId(tepg_recordset_.getData(initIndex+1));	
 
 	return fetchRow();
 }
@@ -1182,7 +1644,18 @@ bool TePostGISPortal::fetchGeometry(TeLine2D& line)
 
 	tepg_recordset_.getPGISLine("spatial_data", line);
 	line.geomId(tepg_recordset_.getInt("geom_id"));
-	line.objectId(tepg_recordset_.value("object_id"));
+	line.objectId(tepg_recordset_.getData("object_id"));
+
+	return fetchRow();
+}
+
+bool TePostGISPortal::fetchGeometry(TeLine2D& line, const unsigned int& initIndex)
+{
+	errorMessage_ = "";
+
+	tepg_recordset_.getPGISLine(initIndex+2, line);
+	line.geomId(tepg_recordset_.getInt(initIndex));
+	line.objectId(tepg_recordset_.getData(initIndex+1));
 
 	return fetchRow();
 }
@@ -1195,11 +1668,20 @@ bool TePostGISPortal::fetchGeometry(TeNode& n)
 	tepg_recordset_.getPGISPoint("spatial_data", p);
 	n.add(p.location());
 	n.geomId(tepg_recordset_.getInt("geom_id"));
-	n.objectId(tepg_recordset_.value("object_id"));
+	n.objectId(tepg_recordset_.getData("object_id"));
 
-	//n.add(PGPoint_decode(getData("spatial_data")).location());
-	//n.geomId(atoi(getData("geom_id")));
-	//n.objectId(string(getData("object_id")));
+	return fetchRow();
+}
+
+bool TePostGISPortal::fetchGeometry(TeNode& n, const unsigned int& initIndex)
+{
+	errorMessage_ = "";
+
+	TePoint p;
+	tepg_recordset_.getPGISPoint(initIndex+2, p);
+	n.add(p.location());
+	n.geomId(tepg_recordset_.getInt(initIndex));
+	n.objectId(tepg_recordset_.getData(initIndex+1));
 
 	return fetchRow();
 }
@@ -1210,7 +1692,18 @@ bool TePostGISPortal::fetchGeometry(TePoint& p)
 	
 	tepg_recordset_.getPGISPoint("spatial_data", p);
 	p.geomId(tepg_recordset_.getInt("geom_id"));
-	p.objectId(tepg_recordset_.value("object_id"));
+	p.objectId(tepg_recordset_.getData("object_id"));
+		
+	return fetchRow();
+}
+
+bool TePostGISPortal::fetchGeometry(TePoint& p, const unsigned int& initIndex)
+{
+	errorMessage_ = "";
+	
+	tepg_recordset_.getPGISPoint(initIndex+2, p);
+	p.geomId(tepg_recordset_.getInt(initIndex));
+	p.objectId(tepg_recordset_.getData(initIndex+1));
 		
 	return fetchRow();
 }
@@ -1223,11 +1716,27 @@ bool TePostGISPortal::fetchGeometry(TeCell& cell)
 	tepg_recordset_.getPGISPolygon("spatial_data", pol);
 
 	cell.geomId(tepg_recordset_.getInt("geom_id"));
-	cell.objectId(tepg_recordset_.value("object_id"));
+	cell.objectId(tepg_recordset_.getData("object_id"));
 	cell.setBox (pol.box());
 	cell.column(tepg_recordset_.getInt("col_number"));
 	cell.line(tepg_recordset_.getInt("row_number"));
 
+	return fetchRow();
+}
+
+bool TePostGISPortal::fetchGeometry(TeCell& cell, const unsigned int& initIndex)
+{
+	errorMessage_ = "";
+
+	TePolygon pol;
+	tepg_recordset_.getPGISPolygon(initIndex+2, pol);
+
+	cell.geomId(tepg_recordset_.getInt(initIndex));
+	cell.objectId(tepg_recordset_.getData(initIndex+1));
+	cell.setBox (pol.box());
+	cell.column(tepg_recordset_.getInt(initIndex+3));
+	cell.line(tepg_recordset_.getInt(initIndex+4));
 
 	return fetchRow();
 }
+
diff --git a/src/terralib/drivers/PostgreSQL/TePostGIS.h b/src/terralib/drivers/PostgreSQL/TePostGIS.h
old mode 100644
new mode 100755
index ad23b3f..ad36798
--- a/src/terralib/drivers/PostgreSQL/TePostGIS.h
+++ b/src/terralib/drivers/PostgreSQL/TePostGIS.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,37 +20,27 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TePostGIS.h
-    This file contains a database driver to access PostgreSQL server using PostGIS extension.
- */
-
-/**
-  *@author Gilberto Ribeiro de Queiroz - gribeiro at dpi.inpe.br
-  */
-
-/**
-  *@description This file contains the especifics routines of PostgreSQL.
-  */
-
-/*
- * TODO: 
- *       
- *       
- *
- */
-
+    \brief This file contains the especifics routines of PostgreSQL with PostGIS extension.
+*/
 #ifndef  __TERRALIB_INTERNAL_POSTGIS_H
 #define  __TERRALIB_INTERNAL_POSTGIS_H
 
 #include "TePostgreSQL.h"
-
+#include <TeDatabaseFactory.h>
 
 class TePostGISPortal;
 
 //! PostgreSQL with PostGIS extension database access class.
 /*!
 	This class contains the implementation of common methods for TerraLib access PostgreSQL using a PostGIS extension.    
+	From release 3.1 on, this driver makes use of RTree over GiST.
+    So, to use it you will need install RTRee GiST support in your database.
+	\note MAKE SURE you have UPGRADE your PostgreSQL database before use this driver.
+    If you need to upgrade without use TerraView, please look at 
+    TeUpdateDBVersion.cpp for the routines: updateDB302To310 and PostgreSQLUpdateDB302To310,
+    for a tip on how to upgrade by yourself.
+    \author Gilberto Ribeiro de Queiroz <gribeiro at dpi.inpe.br>    
  */	
 class TePostGIS : public TePostgreSQL
 {
@@ -66,34 +56,22 @@ class TePostGIS : public TePostgreSQL
 		{
 		}
 
+		//! Creates a new database based on "template1" and open a connection to the new one
+		bool newDatabase(const string& database, const string& user, const string& password, const string& host, const int& port = -1, bool terralibModel=true);
+
 		//! Opens a conection to a database server
-		bool connect(const string& host, const string& user, const string& password, const string& database, int port = 0);
+		bool connect(const string& host, const string& user, const string& password, const string& database, int port = -1);
 
-		bool showDatabases(const string& host, const string& user, const string& password, vector<string>& dbNames, int port = 0);
+		bool showDatabases(const string& host, const string& user, const string& password, vector<string>& dbNames, int port = -1);
 
 		//! Returns a portal associated to this database
 		TeDatabasePortal* getPortal();
 
-		//! Show the server databases (only for MySQL, Oracle and PostgreSQL)
-		//bool showDatabases(const string& host, const string& user, const string& password, vector<string>& dbNames, int port = 0);
-
-		//! Creates a table for a polygon geometries
-		bool createPolygonGeometry(const string& tableName);
-
-		//! Creates a table for line geometries
-		bool createLineGeometry(const string& tableName);
-
-		//! Creates a table for point geometries
-		bool createPointGeometry(const string& tableName);
-
-		//! Creates a table for cell geometries
-		bool createCellGeometry(const string& tableName);
-
-		//! Creates a table for a node geometries
-		bool createNodeGeometry(const string& tableName);
+		//! Creates a generic table
+		bool createTable(const string& table, TeAttributeList &attr);
 
 		//! Generate the label position (x,y) to each object of a theme
-		bool generateLabelPositions(TeTheme *theme);
+		bool generateLabelPositions(TeTheme *theme, const std::string& objectId = "");
 
 		//! Returns all polygons in a table given a criteria expressed as an SQL where statement
 		bool selectPolygonSet(const string& table, const string& criteria, TePolygonSet& ps);
@@ -158,9 +136,12 @@ class TePostGIS : public TePostgreSQL
 		//! Updates a cell
 		bool updateCell(const string& table, TeCell& c);
 
-		// Locates a cell
+		//! Locates a cell
 		bool locateCell(const string& table, TeCoord2D& pt, TeCell& c, const double& tol = 0.0);
 
+		//! Removes a geometry from the given tableName
+		virtual bool removeGeometry(const string& tableName, const TeGeomRep& rep, const int& geomId);
+
 		//! Creates a spatial index on column table
 		bool createSpatialIndex(const string& table, const string& column, TeSpatialIndexType type = TeRTREE, short level = 0, short tile = 0);
 
@@ -178,6 +159,9 @@ class TePostGIS : public TePostgreSQL
 
 		//! Return the box of a select objects set 
 		bool getMBRSelectedObjects(string geomTable, string colGeom, string fromClause, string whereClause, string afterWhereClause, TeGeomRep repType, TeBox& bout, const double& tol = 0.0);
+
+		//! Returns the name of the column that wiil be the spatially indexed, for a given type of geometry table 
+		string getSpatialIdxColumn(TeGeomRep rep);
 };
 
 
@@ -207,6 +191,58 @@ class TePostGISPortal : public TePostgreSQLPortal
 		bool fetchGeometry(TeNode& n);
 		bool fetchGeometry(TePoint& p);
 		bool fetchGeometry(TeCell& cell);
+
+		bool fetchGeometry(TePolygon& pol, const unsigned int& initIndex);
+		bool fetchGeometry(TeLine2D& line, const unsigned int& initIndex);
+		bool fetchGeometry(TeNode& n, const unsigned int& initIndex);
+		bool fetchGeometry(TePoint& p, const unsigned int& initIndex);
+		bool fetchGeometry(TeCell& cell, const unsigned int& initIndex);
+};
+
+
+/**
+ * @brief This is the class for TePostGIS driver factory.
+ * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+ * @ingroup DatabaseUtils
+ */
+class TePostGISFactory : public TeDatabaseFactory
+{
+  public :
+      
+    /**
+     * Default constructor
+     */
+    TePostGISFactory() : TeDatabaseFactory( std::string( "PostGIS" ) ) {};      
+      
+    /**
+     * Default Destructor
+     */
+    ~TePostGISFactory() {};
+      
+  protected :  
+  
+    /**
+     * Implementation for the abstract TeFactory::build.
+     *
+     * @param arg A const reference to the parameters used by the
+     * database.
+     * @return A pointer to the new generated database instance.
+     */
+    TeDatabase* build( const TeDatabaseFactoryParams& arg )
+    {
+      TePostGIS* instance_ptr = new TePostGIS();
+      
+      if( arg.host_ != "" ) {
+        instance_ptr->connect( arg.host_, arg.user_, arg.password_,
+          arg.database_, arg.port_ );
+      }
+  
+      return (TeDatabase*)instance_ptr;
+    }
+};
+
+namespace {
+  static TePostGISFactory TePostGISFactory_instance;
 };
 
 #endif	// __TERRALIB_INTERNAL_POSTGIS_H
diff --git a/src/terralib/drivers/PostgreSQL/TePostgreSQL.cpp b/src/terralib/drivers/PostgreSQL/TePostgreSQL.cpp
old mode 100644
new mode 100755
index 67bbb10..aff3b78
--- a/src/terralib/drivers/PostgreSQL/TePostgreSQL.cpp
+++ b/src/terralib/drivers/PostgreSQL/TePostgreSQL.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright © 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -26,22 +26,46 @@ of this library and its documentation.
 #include <sys/types.h>
 #include <sys/stat.h>
 
+#include "TeSpatialOperations.h"
+#include "TeGeometryAlgorithms.h"
+#include <TeTimeInterval.h>
+#include <TeProject.h>
+#include <string>
+using namespace std;
 
+// Create a block of doubles for the bytea
+unsigned char* getByteArray(const TeLine2D& l)
+{
+	unsigned int size = l.size();
+
+	double* points = new double[2 * size];
 
+	int iac = 0;
+
+	for(unsigned int i = 0; i < size; ++i)
+	{
+		points[iac++] = l[i].x();
+		points[iac++] = l[i].y();
+	}
 
+	size_t newLen = 0;
 
+	// N�mero de doubles = 2 * size
+	// N�mero de bytes = 2 * size * sizeof(double)
+	unsigned char* newbuf = TePGConnection::escapeBytea((unsigned char*)points, 2 * size * sizeof(double) , &newLen);
 
+	delete points;
 
-#include "TeSpatialOperations.h"
-#include "TeGeometryAlgorithms.h"
-#include <string>
-using namespace std;
+	return newbuf;
+}
 
 
 //----- TePostgreSQL methods ---
 TePostgreSQL::TePostgreSQL()
+	: transactionCounter_(0)
 {
 	errorMessage_ = "";
+	gistBoxOps_ = "";
 	dbmsName_ = "PostgreSQL";
 }
 
@@ -65,21 +89,29 @@ bool TePostgreSQL::newDatabase(const string& database, const string& user, const
 	errorMessage_ = "";
 
 	string createDB  = "CREATE DATABASE ";
-	       createDB += database;
+	       createDB += "\"" + database + "\"";
 
 	//if(!realConnect(host, user, password, "template1", port))
 	//	return false;	
 
 	if(!connect(host, user, password, "template1", port))
+	{
+		close();
 		return false;
+	}
 
 	
 	bool connected = false;
 	
 	if(execute(createDB))
+	{
 		connected = connect(host, user, password, database, port);
+	}
 	else
+	{
+		close();
 		return false;
+	}
 
 	if(terralibModel)
 	{
@@ -87,10 +119,16 @@ bool TePostgreSQL::newDatabase(const string& database, const string& user, const
 		if(connected)
 		{
 			if(!createConceptualModel())
+			{
+				close();
 				return false;
+			}
 		}
 		else
+		{
+			close();
 			return false;
+		}
 	}
 
 	return true;
@@ -101,7 +139,7 @@ bool TePostgreSQL::connect(const string& host, const string& user, const string&
 {
 	if(TePostgreSQL::realConnect(host, user, password, database, port))
 	{
-		// See if PostGIS is present
+// see if PostGIS is present
 		TePGRecordset rec;
 
 		string sql = "SELECT postgis_version()";
@@ -117,7 +155,31 @@ bool TePostgreSQL::connect(const string& host, const string& user, const string&
 			return false;	
 		}
 
-		return true;
+// see if RTree GiST is present for box: it must be present
+		int version = PQserverVersion(tepg_connection_.c_ptr());
+		if(version >= 80100)
+		{
+			gistBoxOps_ = "box_ops";
+			return true;
+		}
+
+		sql = "SELECT opcname FROM pg_opclass WHERE (opcname = 'gist_box_ops') ORDER BY opcname DESC";
+
+		if(rec.open(sql.c_str(), &tepg_connection_) && rec.recordCount() > 0)
+		{
+			gistBoxOps_ = rec.value(0);
+			rec.close();
+
+			return true;
+		}
+
+		rec.close();
+
+		this->close();
+
+		errorMessage_ = "GiST extension not found! Please, install R-Tree GiST in your database and try again!";
+
+		return false;	
 	}
 	
 	return false;
@@ -131,12 +193,17 @@ bool TePostgreSQL::realConnect(const string& host, const string& user, const str
 	user_             = (user == "")     ? (string("")) : (" user = " + user + " ");
 	password_         = (password == "") ? (string("")) : (" password = " + password + " ");
 	database_         = (database == "") ? (string("")) : (" dbname = " + database + " ");
-	string portNumber = (port == 0)      ? (string("")) : (" port = " + Te2String(port)  + " ");
+	string portNumber = (port <= 0)     ? (string("")) : (" port = " + Te2String(port)  + " ");
 
 	portNumber_ = port;
 
 	string connInfo = host_ + user_ + password_ + database_ + portNumber;
 
+	host_     = host;
+	user_     = user;
+	password_ = password;
+	database_ = database;
+
 	this->close();
 
 	if(!tepg_connection_.open(connInfo))
@@ -145,12 +212,7 @@ bool TePostgreSQL::realConnect(const string& host, const string& user, const str
 		return false;
 	}
 
-	isConnected_ = true;
-	
-	host_     = host;
-	user_     = user;
-	password_ = password;
-	database_ = database;	
+	isConnected_ = true;	
 
 	return true;
 }
@@ -161,7 +223,7 @@ bool TePostgreSQL::showDatabases(const string& host, const string& user, const s
 
 	if(realConnect(host, user, password, "template1", port))
 	{
-		string sql = "SELECT datname FROM pg_database WHERE datname NOT IN ('template0', 'template1') ORDER BY datname";
+		string sql = "SELECT datname FROM pg_database WHERE datname NOT IN ('template0', 'template1', 'template_postgis', 'postgres') ORDER BY datname";
 
 		TePostgreSQLPortal p(this);
 
@@ -183,12 +245,11 @@ bool TePostgreSQL::showDatabases(const string& host, const string& user, const s
 
 void TePostgreSQL::close(void)
 {
-	clear();
-
 	errorMessage_ = "";
 
 	tepg_connection_.close();
-	isConnected_ = false;	
+	isConnected_ = false;
+	transactionCounter_ = 0;
 
 	return;
 }
@@ -216,6 +277,9 @@ bool TePostgreSQL::listTables(vector<string>& tableList)
 
 bool TePostgreSQL::tableExist(const string& table)
 {
+	if (table.empty())
+		return false;
+
 	errorMessage_ = "";
 
 	TePGRecordset rec;
@@ -283,13 +347,17 @@ bool TePostgreSQL::columnExist(const string& table, const string& column, TeAttr
 			case 1042:
 						attr.rep_.type_ = TeCHARACTER;
 						attr.rep_.numChar_ = rec.getInt("atttypmod") - 4;
+						break;
 
 			case 1043:  //varchar(n)
-			case 25:    //text
 						attr.rep_.type_ = TeSTRING;
 						attr.rep_.numChar_ = rec.getInt("atttypmod") - 4;
 						break;
 
+			case 25:    //text
+						attr.rep_.type_ = TeSTRING;
+						break;
+
 			default:
 						attr.rep_.type_ = TeUNKNOWN;
 						attr.rep_.numChar_ = 0;
@@ -313,7 +381,6 @@ bool TePostgreSQL::createTable(const string& table, TeAttributeList &attr)
 	string createTable ="CREATE TABLE " + table +" (";
 	
 	string type;
-	char	size[8];
 
 	string pkeys;
 
@@ -321,15 +388,22 @@ bool TePostgreSQL::createTable(const string& table, TeAttributeList &attr)
 	{
 		switch ((*it).rep_.type_)
 		{
-			case TeSTRING:		type = "VARCHAR ";
-								sprintf (size, "(%d)", (*it).rep_.numChar_);
-								type += string(size);
+			case TeSTRING:		if((*it).rep_.numChar_ > 0)
+								{
+									type = "VARCHAR(" + Te2String((*it).rep_.numChar_) + ")";
+								}
+								else
+								{
+									type = "TEXT";
+								}
 								break;
 
 			case TeREAL:		type = "FLOAT8";
 								break;
 
-			case TeINT:			type = ((*it).rep_.isAutoNumber_) ? "SERIAL" : "INT";
+			case TeINT:
+			case TeUNSIGNEDINT:
+								type = ((*it).rep_.isAutoNumber_) ? "SERIAL" : "INTEGER";
 								break;
 
 			case TeBLOB:		//type = "OID";
@@ -339,16 +413,105 @@ bool TePostgreSQL::createTable(const string& table, TeAttributeList &attr)
 			case TeDATETIME:	type = "TIMESTAMP(0)";
 								break;
 
-			case TeCHARACTER:	type = "CHAR ";
-								sprintf (size, "(%d)", (*it).rep_.numChar_);
-								type += string (size);
+			case TeCHARACTER:	type = "CHAR(" + (((*it).rep_.numChar_ == 0)? std::string("1") : Te2String((*it).rep_.numChar_)) + ") ";
 								break;
 
-			default:			type = "VARCHAR ";
-								sprintf (size, "(%d)", (*it).rep_.numChar_);
-								type += string (size);
+			case TePOINTTYPE:
+			case TePOINTSETTYPE:
+								if(!first)
+									createTable += ", ";
+								else
+									first = false;
+
+								createTable += " spatial_box  BOX           NOT NULL,";
+								createTable += " x		      FLOAT8        DEFAULT 0.0,";
+								createTable += " y            FLOAT8        DEFAULT 0.0 ";
+								++it;
+								continue;
+
+			case TeLINE2DTYPE:
+			case TeLINESETTYPE:
+							if(!first)
+								createTable += ", ";
+							else
+								first = false;
+
+							createTable += " num_coords   INTEGER      NOT NULL,";
+							createTable += " spatial_box  BOX          NOT NULL,";
+							createTable += " ext_max      FLOAT8       NOT NULL,";
+							createTable += " spatial_data POLYGON ";
+							++it;
+							continue;
+
+			case TePOLYGONTYPE:
+			case TePOLYGONSETTYPE:
+							if(!first)
+								createTable += ", ";
+							else
+								first = false;
+
+							createTable += " num_coords   INTEGER      NOT NULL,";
+							createTable += " num_holes    INTEGER      NOT NULL,";
+							createTable += " parent_id    INTEGER      NOT NULL,";
+							createTable += " spatial_box  BOX          NOT NULL,";
+							createTable += " ext_max      FLOAT8       NOT NULL,";
+							createTable += " spatial_data POLYGON ";
+							++it;
+							continue;
+
+			case TeCELLTYPE:
+			case TeCELLSETTYPE:
+							if(!first)
+								createTable += ", ";
+							else
+								first = false;
+
+							createTable += " spatial_box  BOX          NOT NULL,";
+							createTable += " col_number   INTEGER      NOT NULL,";
+							createTable += " row_number	  INTEGER      NOT NULL ";
+							++it;
+							continue;					
+
+			case TeRASTERTYPE:
+							if(!first)
+								createTable += ", ";
+							else
+								first = false;
+
+							createTable += " block_box         BOX         NOT NULL,";
+							createTable += " band_id		     INTEGER     NOT NULL,";		   
+							createTable += " resolution_factor INTEGER     NOT NULL,";
+							createTable += " subband		     INTEGER     NOT NULL,";		   
+							createTable += " spatial_data      BYTEA,";
+							createTable += " block_size        INTEGER  NOT NULL ";
+		   					++it;
+							continue;
+
+			case TeNODETYPE:
+			case TeNODESETTYPE:
+							if(!first)
+								createTable += ", ";
+							else
+								first = false;
+
+							createTable += " spatial_box  BOX           NOT NULL,";
+							createTable += " x		    FLOAT8        DEFAULT 0.0,";
+							createTable += " y            FLOAT8        DEFAULT 0.0 ";
+							++it;
+							continue;
+
+			case TeTEXTTYPE:
+			case TeTEXTSETTYPE:
+
+			default:			type += "VARCHAR(" + Te2String((*it).rep_.numChar_) + ")";
 								break;
 		}
+
+		if(!((*it).rep_.defaultValue_.empty()))
+			type += " DEFAULT '" + (*it).rep_.defaultValue_ + "' ";
+
+		if(!((*it).rep_.null_))
+			type += " NOT NULL ";
 		
 		if(!first)
 			createTable += ",  ";
@@ -366,8 +529,6 @@ bool TePostgreSQL::createTable(const string& table, TeAttributeList &attr)
 			
 			pkeys += (*it).rep_.name_;
 		}
-		else
-			createTable += " NULL ";
 
 		++it;
 	}
@@ -398,20 +559,35 @@ bool TePostgreSQL::addColumn(const string& table, TeAttributeRep &rep)
 
 	switch(rep.type_)
 	{
-		case TeSTRING:	new_column += "VARCHAR(" + Te2String(rep.numChar_) + ")";
-						break;
-		case TeREAL:	new_column += "FLOAT8";
-						break;
-		case TeINT:		new_column += "INTEGER";
-						break;
-		case TeBLOB:	//new_column += "OID";
-						new_column += "BYTEA";
-						break;
-		default:		new_column += "VARCHAR";
-						break;
+		case TeSTRING:		if(rep.numChar_ > 0)
+							{
+								new_column += "VARCHAR(" + Te2String(rep.numChar_) + ")";
+							}
+							else
+							{
+								new_column += "TEXT";
+							}
+							
+							break;
+		case TeREAL:		new_column += "FLOAT8";
+							break;
+		case TeINT:			new_column += (rep.isAutoNumber_ ? "SERIAL" : "INTEGER");
+							break;
+		case TeDATETIME:	new_column += "TIMESTAMP(0)";
+							break;
+		case TeBLOB:		//new_column += "OID";
+							new_column += "BYTEA";
+							break;
+		default:			new_column += "VARCHAR";
+							break;
 	}
 
-	return this->execute(new_column);
+	if(!this->execute(new_column))
+        return false;
+
+	alterTableInfoInMemory(table);
+
+	return true;
 }
 
 bool TePostgreSQL::createRelation(const string& relName, const string& table, const string& fieldName, const string& relatedTable, const string& relatedField, bool cascadeDeletion)
@@ -455,11 +631,7 @@ bool TePostgreSQL::execute(const string &sql)
 {
 	try
 	{
-		//TeWriteToFile("EXECS.SQL", sql + "\n", "aw");
-
 		this->tepg_connection_.exec_cmd(sql);
-		
-		
 	}
 
 	catch(...)
@@ -479,712 +651,334 @@ TeDatabasePortal* TePostgreSQL::getPortal()
 	return portal;
 }
 
-bool TePostgreSQL::createDatabaseTable()
+bool TePostgreSQL::insertRelationInfo(const int tableId, const string& tField, const string& rTable, const string& rField, int& relId)
 {
-	string create  = "CREATE TABLE te_database ";
-           create += "(";
-           create += "  db_version		VARCHAR(50) NOT NULL,";
-           create += "  db_creation		TIMESTAMP   NULL,";
-           create += "  PRIMARY KEY (db_version)";
-           create += ")";
+	// check if relation already exists
+	TePostgreSQLPortal* portal = (TePostgreSQLPortal*)this->getPortal();
+
+	if(!portal)
+		return false;
+
+	relId = -1;
+	
+	string sel = "SELECT relation_id FROM te_tables_relation WHERE";
+	sel += " related_table_id = " + Te2String(tableId);
+	sel += " AND related_attr = '" + tField + "'";
+	sel += " AND external_table_name = '" + rTable + "'";
+	sel += " AND external_attr = '" + rField + "'";
 
-	if(!this->execute(create))
+	if(!portal->query(sel))
 	{
-		errorMessage_ = "Erro na cria��o da tabela database! Message: " + string(this->tepg_connection_.err_msg());
+		delete portal;
 		return false;
 	}
 
-	return true;
-}
-
-bool TePostgreSQL::createProjectionTable()
-{
-	errorMessage_ = "";
+	if(portal->fetchRow())
+	{
+		relId = atoi(portal->getData("relation_id"));
+		delete portal;
+		return true;
+	}
 
-	string create  = "CREATE TABLE te_projection ";
-	       create += "(";
-		   create += " projection_id    SERIAL,";
-		   create += " name				VARCHAR(255) NOT NULL,";
-		   create += " long0			FLOAT8       NOT NULL,";
-		   create += " lat0				FLOAT8       NOT NULL,";
-		   create += " offx				FLOAT8       NOT NULL,";
-		   create += " offy				FLOAT8       NOT NULL,";
-		   create += " stlat1			FLOAT8       NOT NULL,";
-		   create += " stlat2			FLOAT8       NOT NULL,";
-		   create += " unit				VARCHAR(50)  NOT NULL,";
-		   create += " scale			FLOAT8       NOT NULL,";
-		   create += " hemis			INTEGER      NOT NULL,";
-		   create += " datum			VARCHAR(255) NOT NULL,";
-		   create += " radius			FLOAT8       NOT NULL,";
-		   create += " flattening		FLOAT8       NOT NULL,";
-		   create += " dx				FLOAT8       NOT NULL,";
-		   create += " dy				FLOAT8       NOT NULL,";
-		   create += " dz				FLOAT8       NOT NULL,";
-		   create += " PRIMARY KEY (projection_id)";
-		   create += ")";
+	delete portal;
 
-	return this->execute(create);
-}
+	string sql =  "INSERT INTO te_tables_relation (related_table_id, related_attr, external_table_name, external_attr) VALUES(";
+	       sql += Te2String(tableId);
+		   sql += ", '";
+		   sql += tField;
+		   sql += "', '";
+		   sql += rTable;
+		   sql += "', '";
+		   sql += rField;
+		   sql += "')";
 
-bool TePostgreSQL::createLayerTable()
-{
-	errorMessage_ = "";
+	if(this->execute(sql))
+	{
+		sql = "SELECT currval('te_tables_relation_relation_id_seq')";
+		TePGRecordset rec;
+		rec.open(sql, &tepg_connection_);
 
-	string create  = "CREATE TABLE te_layer ";
-	       create += "(";
-		   create += " layer_id       SERIAL,";
-		   create += " projection_id  INTEGER       NOT NULL,";
-		   create += " name           VARCHAR(255)  NOT NULL,";
-		   create += " lower_x        FLOAT8        NULL,";
-		   create += " lower_y        FLOAT8        NULL,";
-		   create += " upper_x        FLOAT8		NULL,";
-		   create += " upper_y        FLOAT8		NULL,";
-		   create += " initial_time   TIMESTAMP(0)  NULL,";
-		   create += " final_time     TIMESTAMP(0)  NULL,";
-		   create += " PRIMARY KEY (layer_id)";
-		   create += ")";
+		if(rec.recordCount() > 0)
+			relId = rec.getInt(0);
 
-	if(!this->execute(create))
+		rec.close();
+	}
+	else
 		return false;
 
-	return createIndex("te_layer", "layer_projection_idx", "projection_id");
+	return true;
 }
 
-bool TePostgreSQL::createRepresentationTable()
+bool 
+TePostgreSQL::insertTable(TeTable &table)
 {
-	errorMessage_ = "";
-
-	string create  = "CREATE TABLE te_representation ";
-		   create += "(";
-		   create += " repres_id         SERIAL,";
-	       create += " layer_id          INTEGER      NOT NULL,";
-		   create += " geom_type         INTEGER      NOT NULL,";
-		   create += " geom_table        VARCHAR(255) NOT NULL,";
-		   create += " description       VARCHAR(255) NULL,";
-		   create += " lower_x           FLOAT8       NOT NULL,";
-		   create += " lower_y           FLOAT8       NOT NULL,";
-		   create += " upper_x           FLOAT8       NOT NULL,";
-   		   create += " upper_y           FLOAT8       NOT NULL,";
-		   create += " res_x             FLOAT8       NULL,";
-		   create += " res_y             FLOAT8       NULL,";
-		   create += " num_cols          INTEGER      NULL ,";
-		   create += " num_rows          INTEGER      NULL,";
-		   create += " initial_time      TIMESTAMP(0) NULL,";
-		   create += " final_time        TIMESTAMP(0) NULL,";		   
-		   create += " PRIMARY KEY (repres_id)";
-		   create += ")";
-
-	if(!execute(create))
+	string tableName = table.name();
+	int size = table.size();
+	TeAttributeList att = table.attributeList();
+	TeAttributeList::iterator it = att.begin();
+	TeAttributeList::iterator itEnd = att.end();
+	TeTableRow row;
+	
+	if (!beginTransaction())
 		return false;
 
-	return createIndex("te_representation", "repres_layer_geom_type_idx", "layer_id, geom_type");
-}
+	size_t newLen = 0;
+	unsigned char* newbuf = 0;
+	int i;
+	unsigned int j;
+	for ( i = 0; i < size; i++ )	
+	{
+		row = table[i];
+		it = att.begin();
+		string attrs;
+		string values;
+		j = 1;
+		int jj = 0;
+		while ( it != itEnd )
+		{
+			if (row[jj].empty() || (*it).rep_.isAutoNumber_)
+			{
+				++it;
+				j++;
+				jj++;
+				continue;
+			}
+			
+			if (!values.empty())
+			{
+				attrs += ", ";
+				values += ", ";
+			}			
+			attrs += (*it).rep_.name_;			
+			switch ((*it).rep_.type_)
+			{
+			case TeSTRING:
+				values += "'"+ escapeSequence( row[jj] ) +"'";
+				break;
+			case TeREAL:
+				{
+					std::string strValue = row[jj];
+					replace(strValue.begin(), strValue.end(), ',', '.');
+					values += strValue;
+				}
+				break;
+			case TeUNSIGNEDINT:
+			case TeINT:
+				values += row[jj];
+				break;
+			case TeDATETIME:
+				{
+					const string temp_dt = string(row[jj].c_str());
+					TeTime t(temp_dt, (*it).dateChronon_, (*it).dateTimeFormat_, (*it).dateSeparator_, (*it).timeSeparator_, (*it).indicatorPM_);
+					values += this->getSQLTime(t);
+				}
+				break;
+			case TeCHARACTER:
+				values += "'" + escapeSequence(row[jj]) + "'";
+				break;
+			case TeBLOB:
+				newbuf = TePGConnection::escapeBytea((unsigned char*)row[jj].c_str(), row[jj].size(), &newLen);
+				values += "'";
+				values += (char*)newbuf; 
+				values += "'";
+				TePGConnection::freeMem(newbuf);
+				newbuf = NULL;
+			default:
+				values += "'"+ escapeSequence(row[jj]) +"'";
+				break;
+			}
+			++it;
+			j++;
+			jj++;
+		}
 
-bool TePostgreSQL::createViewTable()
-{
-	errorMessage_ = "";
+		if (values.empty()) 
+			continue;
 
-	string create  = "CREATE TABLE te_view ";
-	       create += "(";
-	       create += " view_id			SERIAL,";
-	       create += " projection_id    INTEGER      NULL,";
-		   create += " name				VARCHAR(255) NOT NULL,";
-		   create += " user_name        VARCHAR(255) NULL,"; 
-		   create += " visibility       INTEGER      NULL,";
-		   create += " PRIMARY KEY (view_id)";
-		   create += ")";
+		string q = "INSERT INTO "+tableName + " ("+ attrs+") " + " VALUES ("+values+") ";
+		if (!execute(q)) 
+			continue;
+	}
 
-    if(!this->execute(create))
+	if (!commitTransaction())
+	{
+		rollbackTransaction();
+		if(newbuf)
+		{
+			TePGConnection::freeMem(newbuf);
+			newbuf = NULL;
+		}
 		return false;
-
-	return createIndex("te_view", "view_index", "name, user_name");
+	}
+	if(newbuf)
+	{
+		TePGConnection::freeMem(newbuf);
+		newbuf = NULL;
+	}
+	return true;
 }
 
-bool TePostgreSQL::createThemeTable()
+bool
+TePostgreSQL::updateTable(TeTable &table)
 {
-	errorMessage_ = "";
-
-	string create  = "CREATE TABLE te_theme ";
-	       create += "(";
-		   create += " theme_id                 SERIAL,";
-		   create += " layer_id                 INTEGER       NULL,";         
-		   create += " view_id                  INTEGER       NOT NULL,";
-		   create += " name                     VARCHAR(255)  NOT NULL,";
-		   create += " parent_id                INTEGER       NULL,";
-		   create += " priority                 INTEGER       NULL,";
-		   create += " node_type                INTEGER       NULL,";
-		   create += " min_scale                FLOAT8        NULL,";
-		   create += " max_scale                FLOAT8        NULL,";
-		   create += " generate_attribute_where VARCHAR(500)  NULL,";
-		   create += " generate_spatial_where   VARCHAR(500)  NULL,";
-		   create += " generate_temporal_where  VARCHAR(255)  NULL,";
-           create += " collection_table         VARCHAR(255)  NULL,";
-		   create += " visible_rep				INTEGER       NULL,";
-		   create += " enable_visibility		INTEGER       NULL,";
-		   create += " PRIMARY KEY (theme_id)";
-		   create += ")";
-
-	if(!execute(create))
-		return false;
-
-	if(!createIndex("te_theme", "theme_layer_idx", "layer_id"))
+	TeAttributeList& att = table.attributeList();
+	unsigned int i;
+	string uniqueVal;
+	bool isUniqueValString = false;
+	
+	if (!beginTransaction())
 		return false;
 
-	return createIndex("te_theme", "theme_view_idx", "view_id");
-}
+	string uniqueName = table.uniqueName(); // primary key explicitly defined or 
+	if (table.uniqueName().empty())			// check in the attribute list
+	{								
+		for (i=0; i<att.size(); ++i)
+			if (att[i].rep_.isPrimaryKey_)
+			{
+				uniqueName = att[i].rep_.name_;
+				table.setUniqueName(uniqueName);
+				break;
+			}
+	}
 
-bool TePostgreSQL::createGroupingTable()
-{
-    errorMessage_ = "";
+	size_t newLen = 0;
+	unsigned char* newbuf = 0;
+	TeAttributeList::iterator it;
+	TeTableRow row;
+	unsigned int j;
+	bool useComma = false;
+	for (i = 0; i < table.size(); i++  )
+	{
+		row = table[i];
+		it = att.begin();
+		string q;
+		j = 1;
+		int jj = 0;
+		while ( it != att.end() )
+		{
+			if (uniqueName != (*it).rep_.name_)
+			{
+				if ((*it).rep_.isAutoNumber_)
+				{
+					++it;
+					j++;
+					jj++;
+					continue;
+				}
+				if(useComma == true)
+				{
+					q += ", ";
+				}
+				else
+				{
+					useComma = true;
+				}				
+				
+				q += (*it).rep_.name_ + " = ";
+  				
+				if(row[jj].empty())
+				{
+					q += " null";
 
-	string create  = "CREATE TABLE te_grouping ";
-	       create += "(";
-		   create += " theme_id                 INTEGER       NOT NULL,";
-		   create += " grouping_number          INTEGER       NULL,";         
-		   create += " grouping_attr            VARCHAR(255)  NULL,";
-		   create += " grouping_attr_type       INTEGER       NULL,";
-		   create += " grouping_mode            INTEGER       NULL,";
-		   create += " grouping_norm_attr       VARCHAR(255)  NULL,";
-		   create += " grouping_std_dev         FLOAT8        DEFAULT 0.0,";
-		   create += " grouping_precision       INTEGER       NULL,";
-		   create += " grouping_function		VARCHAR(50)   NULL,";
-		   create += " PRIMARY KEY (theme_id)";
-		   create += ")";
+					++it;
+					j++;
+					jj++;
+					continue;
+				}
 
-	return execute(create);
+				switch ((*it).rep_.type_)
+  				{
+  					case TeSTRING:
+						q += "'"+escapeSequence(row[jj])+"'";
+  					break;
+  					case TeREAL:
+					{
+						std::string value = row[jj];
+						replace(value.begin(), value.end(), ',', '.');
+						q += value;
+					}
+  					break;
+  					case TeINT:
+					case TeUNSIGNEDINT:
+						q += row[jj];
+  					break;
+					case TeDATETIME:
+					{
+						const string temp_dt = string(row[jj].c_str());
+						TeTime t(temp_dt, (*it).dateChronon_, (*it).dateTimeFormat_, (*it).dateSeparator_, (*it).timeSeparator_, (*it).indicatorPM_);
+						q += this->getSQLTime(t);
+					}
+  					break;
+					case TeCHARACTER:
+						q += "'" + escapeSequence(row[jj]) + "'";
+  					break;
+					case TeBLOB:
+						newbuf = TePGConnection::escapeBytea((unsigned char*)row[jj].c_str(), row[jj].size(), &newLen);
+						q += "'";
+						q += (char*)newbuf; 
+						q += "'";
+						TePGConnection::freeMem(newbuf);
+						newbuf = NULL;
+					break;
+  					default:
+						q += "'"+escapeSequence(row[jj])+"'";
+  					break;
+  				}				
+			}
+			else
+			{
+				uniqueVal = row[jj];
+				isUniqueValString = ((*it).rep_.type_ == TeSTRING);
+			}
+			++it;
+			j++;
+			jj++;
+		}
+		if (q.empty())
+			continue;
+		
+		if (!uniqueName.empty() && !uniqueVal.empty())  
+		{
+			if(isUniqueValString)
+				q += " WHERE " + uniqueName + " = '" + uniqueVal +"'";
+			else
+				q += " WHERE " + uniqueName + " = " + uniqueVal;
+		}
+		string sql = "UPDATE "+ table.name() + " SET " + q;
+		if (!execute(sql))
+		{
+			rollbackTransaction();
+			if(newbuf)
+			{
+				TePGConnection::freeMem(newbuf);
+				newbuf = NULL;
+			}
+			return false;
+		}
+	}
+	if (!commitTransaction())
+	{
+		rollbackTransaction();
+		if(newbuf)
+		{
+			TePGConnection::freeMem(newbuf);
+			newbuf = NULL;
+		}
+		return false;
+	}
+	if(newbuf)
+	{
+		TePGConnection::freeMem(newbuf);
+		newbuf = NULL;
+	}
+	return true;
 }
 
-bool TePostgreSQL::createThemeTablesTable()
+bool TePostgreSQL::insertTableInfo(int layerId, TeTable& table, const string& user)
 {
 	errorMessage_ = "";
 
-	string create  = "CREATE TABLE te_theme_table ";
-	       create += "(";
-	       create += " theme_table_id	SERIAL,";
-	       create += " theme_id			INTEGER	 NOT NULL,";
-		   create += " table_id			INTEGER	 NOT NULL,";
-		   create += " relation_id      INTEGER  NULL,"; 
-		   create += " table_order      INTEGER  NOT NULL,";
-		   create += " PRIMARY KEY (theme_table_id)";
-		   create += ")";
-
-    if(!this->execute(create))
-		return false;
-
-	//creates indexes
-	if(!createIndex("te_theme_table", "te_theme_table_theme_idx", "theme_id"))
-		return false;
-
-	if(!createIndex("te_theme_table", "te_theme_table_table_idx", "table_id"))
-		return false;
-
-	return createIndex("te_theme_table", "te_theme_table_relation_idx", "relation_id");
-}
-
-bool TePostgreSQL::createLegendTable()
-{
-	errorMessage_ = "";
-
-	string create  = "CREATE TABLE te_legend ";
-	       create += "(";
-		   create += " legend_id		SERIAL,";
-		   create += " theme_id         INT          NOT NULL,";
-		   create += " group_id         INT          NULL,";
-		   create += " num_objs         INT          NULL,";
-		   create += " lower_value      VARCHAR(255) NULL,";
-		   create += " upper_value      VARCHAR(255) NULL,";
-		   create += " label			VARCHAR(255) NULL,";
-		   create += " PRIMARY KEY (legend_id)";
-		   create += ")";
-
-	if(!this->execute(create))
-		return false;
-
-	return createIndex("te_legend", "te_legend_theme_idx", "theme_id");
-}
-
-bool TePostgreSQL::createVisualTable()
-{
-	errorMessage_ = "";
-
-	string create  = "CREATE TABLE te_visual";
-	       create += "(";
-		   create += " legend_id		INT          NOT NULL,";
-		   create += " geom_type		INT          NOT NULL,";
-		   create += " lib_name         VARCHAR(255) NULL,";
-		   create += " symb_id          INTEGER      NULL,";
-		   create += " red              INT          NULL,";
-		   create += " green            INT          NULL,";
-		   create += " blue             INT          NULL,";
-		   create += " transparency     INT          NULL,";
-		   create += " width            INT          NULL,";
-		   create += " contour_lib_name VARCHAR(255) NULL,";
-		   create += " contour_symb_id  INTEGER      NULL,";
-		   create += " contour_red      INT          NULL,";
-		   create += " contour_green    INT          NULL,";
-		   create += " contour_blue     INT          NULL,";
-		   create += " contour_transp   INT          NULL,";
-		   create += " contour_width    INT          NULL,";
-		   create += " size_value       INT          NULL,";
-		   create += " pt_angle         INT          NULL,";
-		   create += " family           VARCHAR(255) NULL,";
-		   create += " bold             INT          NULL,";
-		   create += " italic           INT          NULL,";
-		   create += " alignment_vert   FLOAT8       NULL,";
-		   create += " alignment_horiz  FLOAT8       NULL,";
-		   create += " tab_size         INT          NULL,";
-		   create += " line_space       INT          NULL,";
-		   create += " fixed_size       INT          NULL,";		   
-		   create += " PRIMARY KEY (legend_id, geom_type)";
-		   create += ")";
-
-	return this->execute(create);
-}
-
-bool TePostgreSQL::createVisualRasterTable()
-{
-	string create  = "CREATE TABLE te_visual_raster (";
-	       create += " theme_id		INT NOT NULL,";
-	       create += " band_in		INT NOT NULL,";
-	       create += " band_out		INT,";
-	       create += " transf_type	INT,";
-	       create += " param1		FLOAT8,";
-	       create += " param2		FLOAT8,";
-	       create += " lut_table	VARCHAR(255),";
-	       create += " PRIMARY KEY (theme_id, band_in))";
-
-	return execute(create);
-}
-
-bool TePostgreSQL::createLayerTableTable()
-{
-	errorMessage_ = "";
-
-	string create  = "CREATE TABLE te_layer_table ";
-	       create += "(";
-		   create += " table_id          SERIAL,";
-		   create += " layer_id			 INT		   NULL,";
-		   create += " attr_table		 VARCHAR(255)  NOT NULL,";
-		   create += " unique_id         VARCHAR(255)  NULL,";
-		   create += " attr_link		 VARCHAR(255)  NULL,";
-		   create += " attr_initial_time VARCHAR(255)  NULL,";
-		   create += " attr_final_time   VARCHAR(255)  NULL,";
-		   create += " attr_time_unit    INT           NULL,";
-		   create += " attr_table_type   INT		   NULL,";
-		   create += " user_name         VARCHAR(255)  NULL,";
-		   create += " initial_time      TIMESTAMP(0)  NULL,";
-		   create += " final_time        TIMESTAMP(0)  NULL,";
-		   create += " PRIMARY KEY (table_id)";
-		   create += ")";
-
-	if(!execute(create))
-		return false;
-
-	return createIndex("te_layer_table", "te_layer_table_layer_idx", "layer_id");
-}
-
-bool TePostgreSQL::createTablesRelationTable()
-{
-	errorMessage_ = "";
-
-	string create  = "CREATE TABLE te_tables_relation ";
-	       create += "(";
-		   create += " relation_id		    SERIAL,";
-		   create += " related_table_id     INTEGER       NOT NULL,";
-		   create += " related_attr		    VARCHAR(255)  NOT NULL,";
-		   create += " external_table_name  VARCHAR(255)  NOT NULL,";
-		   create += " external_attr        VARCHAR(255)  NOT NULL,";
-		   create += " PRIMARY KEY (relation_id)";
-		   create += ")";
-
-	return this->execute(create);
-}
-
-bool TePostgreSQL::createPolygonGeometry(const string& tableName)
-{
-	errorMessage_ = "";
-
-	string create  = "CREATE TABLE " + tableName + " ";
-	       create += "(";
-		   create += " geom_id		SERIAL,";
-		   create += " object_id    VARCHAR(255) NULL,";
-		   create += " num_coords   INTEGER      NOT NULL,";
-		   create += " num_holes    INTEGER      NOT NULL,";
-		   create += " parent_id    INTEGER      NOT NULL,";
-		   create += " lower_x      FLOAT8       NOT NULL,";
-		   create += " lower_y      FLOAT8       NOT NULL,";
-		   create += " upper_x      FLOAT8       NOT NULL,";
-		   create += " upper_y      FLOAT8       NOT NULL,";
-		   create += " ext_max      FLOAT8       NOT NULL,";
-		   create += " spatial_data POLYGON,";
-		   create += " PRIMARY KEY (geom_id)";
-		   create += ")";
-
-	if(!this->execute(create))
-		return false;
-
-	//creates indexes
-	if(!createIndex(tableName, tableName + "_idx_obj_id", "object_id"))
-		return false;
-
-	if(!createIndex(tableName, tableName + "_idx_ext_max", "ext_max"))
-		return false;
-
-	if(!createIndex(tableName, tableName + "_idx_box", "lower_x, lower_y, upper_x, upper_y"))
-		return false;
-
-	return true;
-}
-
-bool TePostgreSQL::createLineGeometry(const string& tableName)
-{
-	errorMessage_ = "";
-
-	string create  = "CREATE TABLE " + tableName + " ";
-	       create += "(";
-		   create += " geom_id		SERIAL,";
-		   create += " object_id    VARCHAR(255) NULL,";
-		   create += " num_coords   INTEGER      NOT NULL,";
-		   create += " lower_x      FLOAT8       NOT NULL,";
-		   create += " lower_y      FLOAT8       NOT NULL,";
-		   create += " upper_x      FLOAT8       NOT NULL,";
-		   create += " upper_y      FLOAT8       NOT NULL,";
-		   create += " ext_max      FLOAT8       NOT NULL,";
-		   create += " spatial_data POLYGON,";
-		   create += " PRIMARY KEY (geom_id)";
-		   create += ")";
-
-	if(!this->execute(create))
-		return false;
-
-	if(!createIndex(tableName, tableName + "_idx_obj_id", "object_id"))
-		return false;
-
-	if(!createIndex(tableName, tableName + "_idx_ext_max", "ext_max"))
-		return false;
-
-	if(!createIndex(tableName, tableName + "_idx_box", "lower_x, lower_y, upper_x, upper_y"))
-		return false;
-
-	return true;
-}
-
-bool TePostgreSQL::createPointGeometry(const string& tableName)
-{
-	errorMessage_ = "";
-
-	string create  = "CREATE TABLE " + tableName + " ";
-	       create += "(";
-		   create += " geom_id		SERIAL,";
-		   create += " object_id	VARCHAR(255)  NULL,";
-		   create += " x		    FLOAT8         DEFAULT 0.0,";
-		   create += " y            FLOAT8        DEFAULT 0.0,";		   
-		   create += " PRIMARY KEY (geom_id)";
-		   create += ")";
-
-
-	if(!this->execute(create))
-		return false;
-	
-	if(!createIndex(tableName, tableName + "_idx_obj_id", "object_id"))
-		return false;
-
-	if(!createIndex(tableName, tableName + "_idx_xy", "x, y"))
-		return false;
-
-	return true;
-}
-
-bool TePostgreSQL::createCellGeometry(const string& tableName)
-{
-	errorMessage_ = "";
-
-	string create  = "CREATE TABLE " + tableName + " ";
-	       create += "(";
-		   create += " geom_id		SERIAL,";
-		   create += " object_id    VARCHAR(255) NULL,";
-		   create += " lower_x      FLOAT8       NOT NULL,";
-		   create += " lower_y      FLOAT8       NOT NULL,";
-		   create += " upper_x      FLOAT8       NOT NULL,";
-		   create += " upper_y      FLOAT8       NOT NULL,";
-	       create += " col_number   INTEGER      NOT NULL,";
-	       create += " row_number	INTEGER      NOT NULL,";
-	       create += " PRIMARY KEY (geom_id)";
-		   create += ")";
-
-	if(!this->execute(create))
-		return false;
-
-	if(!createIndex(tableName, tableName + "_idx_obj_id", "object_id"))
-		return false;
-
-	if(!createIndex(tableName, tableName + "_idx_box", "lower_x, lower_y, upper_x, upper_y"))
-		return false;
-
-	if(!createIndex(tableName, tableName + "_idx_rc", "row_number, col_number"))
-		return false;
-
-	return true;
-}
-
-bool TePostgreSQL::createTextGeometry(const string& tableName)
-{
-	errorMessage_ = "";
-
-	string create  = "CREATE TABLE " + tableName + " ";
-	       create += "(";
-		   create += " geom_id		   SERIAL,";
-		   create += " object_id       VARCHAR(255)  NULL,";
-		   create += " x			   FLOAT8        DEFAULT 0.0,";
-		   create += " y			   FLOAT8        DEFAULT 0.0,";
-		   create += " text_value      VARCHAR(255)  NULL,";
-		   create += " height		   FLOAT8        DEFAULT 0.0,";
-		   create += " angle		   FLOAT8        DEFAULT 0.0,";
-		   create += " alignment_vert  FLOAT8		 NULL,";
-		   create += " alignment_horiz FLOAT8		 NULL,";		   
-		   create += " PRIMARY KEY (geom_id)";
-		   create += ")";
-
-	if(!this->execute(create))
-		return false;
-
-	//creates indexes
-	if(!createIndex(tableName, tableName + "_idx_obj", "object_id"))
-		return false;
-
-	return createIndex(tableName, tableName + "_idx_xy", "x, y");
-}
-
-bool TePostgreSQL::createArcGeometry(const string& tableName)
-{
-	errorMessage_ = "";
-
-	string create  = "CREATE TABLE " + tableName + " ";
-	       create += "(";
-		   create += " geom_id    SERIAL,";
-		   create += " object_id  VARCHAR(255) NULL,";
-		   create += " from_node  INT          NOT NULL,";
-		   create += " to_node    INT          NOT NULL,";
-		   create += " PRIMARY KEY (geom_id)";
-		   create += ")";
-
-	if(!this->execute(create))
-		return false;
-
-	//creates indexes
-	if(!createIndex(tableName, tableName + "obj_idx", "object_id"))
-		return false;
-
-	if(!createIndex(tableName, tableName + "fn_idx", "from_node"))
-		return false;
-
-	return createIndex(tableName, tableName + "tn_idx", "to_node");
-}
-
-bool TePostgreSQL::createNodeGeometry(const string& tableName)
-{
-	errorMessage_ = "";
-
-	string create  = "CREATE TABLE " + tableName + " ";
-	       create += "(";
-		   create += " geom_id    SERIAL,";
-		   create += " object_id  VARCHAR(255) NULL,";
-		   create += " x		  FLOAT8       DEFAULT 0.0,";
-		   create += " y		  FLOAT8       DEFAULT 0.0,";
-		   create += " PRIMARY KEY (geom_id)";
-		   create += ")";
-
-	if(!this->execute(create))
-		return false;
-
-	if(!createIndex(tableName, tableName + "_idx_obj_id", "object_id"))
-		return false;
-
-	if(!createIndex(tableName, tableName + "_idx_xy", "x, y"))
-		return false;
-
-	return true;	
-}
-
-bool TePostgreSQL::createRasterGeometry(const string& tableName)
-{
-	errorMessage_ = "";
-
-	string create  = "CREATE TABLE " + tableName + " ";
-	       create += "(";
-		   create += " geom_id           SERIAL,";
-		   create += " object_id         VARCHAR(255) NULL,";
-		   create += " raster_table      VARCHAR(255) NULL,";
-		   create += " lut_table		 VARCHAR(255) NULL,";		   
-		   create += " res_x             FLOAT8       DEFAULT 0.0,";
-		   create += " res_y		     FLOAT8       DEFAULT 0.0,";		   
-		   create += " num_bands         INTEGER      NULL,";
-		   create += " num_cols          INTEGER      NULL,";
-		   create += " num_rows          INTEGER      NULL,";
-		   create += " block_height      INTEGER      NULL,";
-		   create += " block_width       INTEGER      NULL,";
-		   create += " lower_x           FLOAT8       NOT NULL,";
-		   create += " lower_y           FLOAT8       NOT NULL,";
-		   create += " upper_x           FLOAT8       NOT NULL,";
-		   create += " upper_y           FLOAT8       NOT NULL,";
-		   create += " tiling_type       INTEGER, ";
-		   create += " PRIMARY KEY (geom_id)";
-		   create += ")";
-
-	if(!this->execute(create))
-		return false;
-
-	//creates indexes
-	return createIndex(tableName, tableName + "_idx_obj", "object_id");
-}
-
-bool TePostgreSQL::createRasterMetadataTable(const string& tableName)
-{
-	errorMessage_ = "";
-
-	string create  = "CREATE TABLE " + tableName;
-	       create += "(";
-		   create += " geom_id          INTEGER       NOT NULL,";
-		   create += " band_id          INTEGER       NOT NULL,";
-		   create += " min_value        FLOAT8        DEFAULT 0.0,";
-		   create += " max_value        FLOAT8        DEFAULT 0.0,";
-		   create += " num_bits         INTEGER       NULL,";
-		   create += " data_type        INTEGER       NULL,";
-		   create += " photometric_type INTEGER       NULL,";
-		   create += " compression_type INTEGER       NULL,";
-		   create += " dummy            FLOAT8        DEFAULT 0.0,";
-		   create += " PRIMARY KEY (geom_id, band_id)";
-		   create += ")";
-
-	return this->execute(create);
-}
-
-bool TePostgreSQL::createRasterTable(const string& tableName)
-{
-	errorMessage_ = "";
-
-	string create  = "CREATE TABLE " + tableName + " ";
-	       create += "(";
-		   create += " block_id          VARCHAR(50) NOT NULL,";
-		   create += " lower_x           FLOAT8      NOT NULL,";
-	       create += " lower_y           FLOAT8      NOT NULL,";
-	       create += " upper_x           FLOAT8      NOT NULL,";
-	       create += " upper_y           FLOAT8      NOT NULL,";
-		   create += " band_id		     INTEGER     NOT NULL,";		   
-		   create += " resolution_factor INTEGER     NOT NULL,";
-		   create += " subband		     INTEGER     NOT NULL,";		   
-		   //create += " spatial_data      OID,";
-		   create += " spatial_data      BYTEA,";
-		   create += " block_size        INTEGER  NOT NULL,";
-		   create += " PRIMARY KEY (block_id)";
-		   create += ")";
-
-
-	if(!execute(create))
-		return false;
-
-	//creates indexes
-	if(!createIndex(tableName, tableName + "_idx_band", "band_id"))
-		return false;
-
-	if(!createIndex(tableName, tableName + "_idx_subband", "subband"))
-		return false;
-
-	if(!createIndex(tableName, tableName + "_idx_resfactor", "resolution_factor"))
-		return false;
-
-	if(!createIndex(tableName, tableName + "_idx_box", "lower_x, lower_y, upper_x, upper_y"))
-		return false;
-
-	return true;
-}
-
-bool TePostgreSQL::createCollectionTable(const string& tableName)
-{
-	errorMessage_ = "";
-
-	string create  = "CREATE TABLE " + tableName + " ";
-	       create += "(";
-		   create += " c_object_id		VARCHAR(255) NOT NULL,";
-		   create += " c_legend_id		INT          NULL,";
-		   create += " label_x			FLOAT8       NULL,";
-		   create += " label_y			FLOAT8       NULL,";
-           create += " c_legend_own     INT          NULL,";
-		   create += " c_object_status  INT          NULL,";
-		   create += " PRIMARY KEY (c_object_id)";
-		   create += ")";
-
-	if(!this->execute(create))
-		return false;
-
-	//creates indexes
-
-	return createIndex(tableName, tableName + "_idx_legend", "c_legend_id");
-}
-
-bool TePostgreSQL::insertRelationInfo(const int tableId, const string& tField, const string& rTable, const string& rField, int& relId)
-{
-	// check if relation already exists
-	TePostgreSQLPortal* portal = (TePostgreSQLPortal*)this->getPortal();
-
-	if(!portal)
-		return false;
-
-	relId = -1;
-	
-	string sel = "SELECT relation_id FROM te_tables_relation WHERE";
-	sel += " related_table_id = " + Te2String(tableId);
-	sel += " AND related_attr = '" + tField + "'";
-	sel += " AND external_table_name = '" + rTable + "'";
-	sel += " AND external_attr = '" + rField + "'";
-
-	if(!portal->query(sel))
-	{
-		delete portal;
-		return false;
-	}
-
-	if(portal->fetchRow())
-	{
-		relId = atoi(portal->getData("relation_id"));
-		delete portal;
-		return true;
-	}
-
-	delete portal;
-
-	string sql =  "INSERT INTO te_tables_relation (related_table_id, related_attr, external_table_name, external_attr) VALUES(";
-	       sql += Te2String(tableId);
-		   sql += ", '";
-		   sql += tField;
-		   sql += "', '";
-		   sql += rTable;
-		   sql += "', '";
-		   sql += rField;
-		   sql += "')";
-
-	if(this->execute(sql))
-	{
-		sql = "SELECT currval('te_tables_relation_relation_id_seq')";
-		TePGRecordset rec;
-		rec.open(sql, &tepg_connection_);
-
-		if(rec.recordCount() > 0)
-			relId = rec.getInt(0);
-
-		rec.close();
-	}
-	else
-		return false;
-
-	return true;
-}
-
-bool TePostgreSQL::insertTableInfo(int layerId, TeTable& table, const string& user)
-{
-	errorMessage_ = "";
-
-	if(table.name().empty())
+	if(table.name().empty())
 		return false;
 
 	if(table.id() <= 0)
@@ -1238,63 +1032,6 @@ bool TePostgreSQL::insertTableInfo(int layerId, TeTable& table, const string& us
 	return true;	
 }
 
-bool TePostgreSQL::insertTable(TeTable &table)
-{
-	string tableName = table.name();
-	TeAttributeList att = table.attributeList();
-	TeAttributeList::iterator it = att.begin();
-
-	TeTableRow row;
-	unsigned int i;
-	unsigned int j;
-	for ( i = 0; i < table.size(); i++  )
-	{
-		row = table[i];
-		it = att.begin();
-		string q = 	"INSERT INTO "+tableName+" values(";
-		j = 1;
-		int jj = 0;
-		string dt = "";
-		while ( it != att.end() )
-		{
-			if(((*it).rep_.type_==TeDATETIME) && (!row[jj].empty()))
-			{
-				const string temp_dt = string(row[jj].c_str());
-				TeTime t(temp_dt, (*it).dateChronon_, (*it).dateTimeFormat_, (*it).dateSeparator_, (*it).timeSeparator_, (*it).indicatorPM_);
-				dt=t.getDateTime("YYYYsMMsDDsHHsmmsSS", "-");
-			}
-
-  			switch ((*it).rep_.type_)
-  			{
-  				case TeSTRING:
-					q += "'"+this->escapeSequence(row[jj])+"'";
-  				break;
-  				case TeREAL:
-					q += "'"+row[jj]+"'";
-  				break;
-  				case TeINT:
-					q += "'"+row[jj]+"'";
-  				break;
-				case TeDATETIME:
-					q += "'"+dt+"'";   
-  				break;
-				default:
-					q += "'"+this->escapeSequence(row[jj])+"'";
-  				break;
-  			}
-			if (j<att.size())
-				q+= ",";
-			++it;
-			j++;
-			jj++;
-		}
-		q += ")";
-		if (!this->execute(q))
-//			return false;
-			continue;
-	}
-	return true;
-}
 
 bool TePostgreSQL::alterTable(const string& tableName, TeAttributeRep& rep, const string& oldColName)
 {
@@ -1316,7 +1053,14 @@ bool TePostgreSQL::alterTable(const string& tableName, TeAttributeRep& rep, cons
 		switch (rep.type_)
 		{
 			case TeSTRING:
-				tab += "VARCHAR(" + Te2String(rep.numChar_) + ") ";
+				if(rep.numChar_ > 0)
+				{
+					tab += "VARCHAR(" + Te2String(rep.numChar_) + ") ";
+				}
+				else
+				{
+					tab += "TEXT ";
+				}	
 				break;
 				
 			case TeREAL:
@@ -1324,7 +1068,7 @@ bool TePostgreSQL::alterTable(const string& tableName, TeAttributeRep& rep, cons
 				break;
 				
 			case TeINT:
-				tab += "INTEGER";
+				tab += (rep.isAutoNumber_ ? "SERIAL" : "INTEGER");
 				break;
 
 			case TeDATETIME:
@@ -1345,8 +1089,6 @@ bool TePostgreSQL::alterTable(const string& tableName, TeAttributeRep& rep, cons
 		}	
 	}
 
-	
-
 	if(!execute(tab))
 	{
 		if(errorMessage_.empty())
@@ -1418,13 +1160,37 @@ bool TePostgreSQL::alterTable(const string& tableName, TeAttributeRep& rep, cons
 				return false;
 		}
 	}
+	alterTableInfoInMemory(tableName);
 	return true;
 }
 
+bool TePostgreSQL::alterTable(const string& oldTableName, const string& newTableName)
+{
+	string sql = " ALTER TABLE "+ oldTableName +" RENAME TO "+ newTableName;
+	if(!this->execute(sql))
+		return false;
 
+	//update te_layer_table
+	sql = " UPDATE te_layer_table ";
+	sql += " SET attr_table = '"+ newTableName +"'";
+	sql += " WHERE attr_table = '"+ oldTableName +"'";
+	execute(sql);
+
+	//update te_tables_relation
+	sql = " UPDATE te_tables_relation ";
+	sql += " SET external_table_name = '"+ newTableName +"'";
+	sql += " WHERE external_table_name = '"+ oldTableName +"'";
+	execute(sql);
+	
+	alterTableInfoInMemory(newTableName, oldTableName);
+	return true;
+}
 
-bool TePostgreSQL::insertBlob (const string& tableName, const string& columnBlob, TeAttributeRep& columnId, const string& valueId, unsigned char* data, int size)
+bool TePostgreSQL::insertBlob (const string& tableName, const string& columnBlob, const string& whereClause, unsigned char* data, int size)
 {
+	if (whereClause.empty())
+		return false;
+
 	errorMessage_ = "";
 
 	TePostgreSQLPortal* portal = static_cast<TePostgreSQLPortal*>(this->getPortal());
@@ -1432,18 +1198,7 @@ bool TePostgreSQL::insertBlob (const string& tableName, const string& columnBlob
 	if(!portal)
 		return false;
 
-	string q = "SELECT * FROM "+ tableName +" WHERE "+ columnId.name_ +" = ";
-	
-	switch(columnId.type_ )
-	{
-		case TeSTRING:
-			q += "'"+ valueId + "'";
-			break;
-		default:
-			q += valueId;
-			break;
-	}
-
+	string q = "SELECT * FROM "+ tableName +" WHERE "+ whereClause;
 	if((!portal->query(q)) || (!portal->fetchRow()))
 	{
 		delete portal;
@@ -1465,20 +1220,12 @@ bool TePostgreSQL::insertBlob (const string& tableName, const string& columnBlob
 	       sql += " = '";
 	       sql += (char*)newbuf;
 		   sql += "' WHERE ";
-		   sql += columnId.name_;
-		   sql += " = ";
+		   sql += whereClause;
 
-	switch (columnId.type_ )
-	{	
-		case TeSTRING:  sql += "'"+ valueId + "'";
-						break;
-
-		default:		sql += valueId;
-	}
-
-	if(!execute(sql))
+	if (!TePostgreSQL::execute(sql))
 	{
 		TePGConnection::freeMem(newbuf);
+		newbuf = NULL;
 
 		errorMessage_ = "Couldn't update blob!";
 
@@ -1486,41 +1233,11 @@ bool TePostgreSQL::insertBlob (const string& tableName, const string& columnBlob
 	}
 
 	TePGConnection::freeMem(newbuf);
+	newbuf = NULL;
 
 	return true;
 }
 
-bool TePostgreSQL::insertBlob (const string& tableName, const string& columnBlob, TeAttributeRep& columnId, const string& valueId, const string& fileName)
-{
-	unsigned char	*cdata = 0;
-	int		size;
-	FILE	*fp = 0;
-	
-	struct	stat buf;
-	int		result;
-	
-	result = stat(fileName.c_str(), &buf);
-	
-	if(result != 0)
-		return false;
-	
-	size = buf.st_size;
-
-	cdata = new unsigned char[size];
-	fp = fopen(fileName.c_str(), "rb");
-	fread(cdata, sizeof(unsigned char), size, fp); 
-
-	bool status = insertBlob(tableName, columnBlob, columnId,  valueId, cdata, size);
-
-	if(fp)
-		fclose(fp);
-
-	if(cdata)
-		delete [] cdata;
-
-	return status;
-}
-
 bool TePostgreSQL::insertProjection(TeProjection *proj)
 {
 	errorMessage_ = "";
@@ -1533,35 +1250,35 @@ bool TePostgreSQL::insertProjection(TeProjection *proj)
 		   sql += "dx, dy, dz) VALUES('";
 		   sql += proj->name();
 		   sql += "', ";
-		   sql += Te2String(par.lon0*TeCRD);
+		   sql += Te2String(par.lon0*TeCRD, 15);
 		   sql += ", ";
-		   sql += Te2String(par.lat0*TeCRD);
+		   sql += Te2String(par.lat0*TeCRD, 15);
 		   sql += ", ";
-		   sql += Te2String(par.offx);
+		   sql += Te2String(par.offx, 15);
 		   sql += ", ";
-		   sql += Te2String(par.offy);
+		   sql += Te2String(par.offy, 15);
 		   sql += ", ";
-		   sql += Te2String(par.stlat1*TeCRD);
+		   sql += Te2String(par.stlat1*TeCRD, 15);
 		   sql += ", ";
-		   sql += Te2String(par.stlat2*TeCRD);
+		   sql += Te2String(par.stlat2*TeCRD, 15);
 		   sql += ", '";
 		   sql += par.units;
 		   sql += "', ";
-		   sql += Te2String(par.scale);
+		   sql += Te2String(par.scale, 15);
 		   sql += ", ";
 		   sql += Te2String(par.hemisphere);
 		   sql += ", '";
 		   sql += proj->datum().name();
 		   sql += "', ";
-		   sql += Te2String(proj->datum().radius());
+		   sql += Te2String(proj->datum().radius(), 15);
 		   sql += ", ";
-		   sql += Te2String(proj->datum().flattening());
+		   sql += Te2String(proj->datum().flattening(), 15);
 		   sql += ", ";
-		   sql += Te2String(proj->datum().xShift());
+		   sql += Te2String(proj->datum().xShift(), 15);
 		   sql += ", ";
-		   sql += Te2String(proj->datum().yShift());
+		   sql += Te2String(proj->datum().yShift(), 15);
 		   sql += ", ";
-		   sql += Te2String(proj->datum().zShift());
+		   sql += Te2String(proj->datum().zShift(), 15);
 		   sql += ")";
 
 	if(this->execute(sql))
@@ -1580,6 +1297,7 @@ bool TePostgreSQL::insertProjection(TeProjection *proj)
 	return true;	
 }
 
+
 bool TePostgreSQL::insertLayer(TeLayer *layer)
 {
 	errorMessage_ = "";
@@ -1587,23 +1305,26 @@ bool TePostgreSQL::insertLayer(TeLayer *layer)
 	TeProjection* proj = layer->projection();
 	if (!proj || !insertProjection(proj))
 	{
-		errorMessage_ = "N�o � poss�vel inserir layer sem proje��o";
+		errorMessage_ = "Error inserting projection!";
 		return false;
 	}
 
 	string sql  = "INSERT INTO te_layer (projection_id, name, lower_x, lower_y, upper_x, ";
-		   sql += "upper_y) VALUES(";
+		   sql += "upper_y, edition_time) VALUES(";
 		   sql += Te2String(proj->id());
 		   sql += ", '";
 		   sql += layer->name();
 	       sql += "', ";
-	       sql += Te2String(layer->box().x1());
+	       sql += Te2String(layer->box().x1(), 15);
 	       sql += ", ";
-	       sql += Te2String(layer->box().y1());
+	       sql += Te2String(layer->box().y1(), 15);
 	       sql += ", ";
-	       sql += Te2String(layer->box().x2());
+	       sql += Te2String(layer->box().x2(), 15);
 	       sql += ", ";
-	       sql += Te2String(layer->box().y2());
+	       sql += Te2String(layer->box().y2(), 15);
+		   sql += ", ";
+		   TeTime editionTime = layer->getEditionTime();
+		   sql += getSQLTime(editionTime);
 	       sql += ")";
 
 	if(this->execute(sql))
@@ -1620,11 +1341,49 @@ bool TePostgreSQL::insertLayer(TeLayer *layer)
 	else
 		return false;
 
-	layerMap_[layer->id()] = layer;
+	layerMap()[layer->id()] = layer;
+
+	return true;	
+}
+
+
+bool TePostgreSQL::insertProject(TeProject *project)
+{
+	errorMessage_ = "";
+
+	if (!project)
+		return false;
+
+	string sql  = "INSERT INTO te_project (name, description, current_view) VALUES(";
+		   sql += " '";
+		   sql += project->name();
+	       sql += "', '";
+		   sql += project->description();
+	       sql += "', ";
+		   sql += Te2String(project->getCurrentViewId());
+	       sql += ")";
 
+	if(this->execute(sql))
+	{
+		sql = "SELECT currval('te_project_project_id_seq')";
+		TePGRecordset rec;
+		rec.open(sql, &tepg_connection_);
+		if(rec.recordCount() > 0)
+		{
+			project->setId(rec.getInt(0));
+		}
+		rec.close();
+	}
+	else
+		return false;
+	projectMap()[project->id()] = project;
+	for (unsigned int i=0; i<project->getViewVector().size(); i++)
+		insertProjectViewRel(project->id(), project->getViewVector()[i]);
 	return true;	
 }
 
+
+
 bool TePostgreSQL::insertRepresentation(int layerId, TeRepresentation& rep)
 {	
 	errorMessage_ = "";
@@ -1643,17 +1402,17 @@ bool TePostgreSQL::insertRepresentation(int layerId, TeRepresentation& rep)
 		   sql += "', '";
 		   sql += rep.description_;		   
 		   sql += "', ";
-           sql += Te2String(rep.box_.x1());
+           sql += Te2String(rep.box_.x1(), 15);
 		   sql += ", ";
-		   sql += Te2String(rep.box_.y1());
+		   sql += Te2String(rep.box_.y1(), 15);
 		   sql += ", ";
-		   sql += Te2String(rep.box_.x2());
+		   sql += Te2String(rep.box_.x2(), 15);
 		   sql += ", ";
-		   sql += Te2String(rep.box_.y2());
+		   sql += Te2String(rep.box_.y2(), 15);
 		   sql += ", ";
-		   sql += Te2String(rep.resX_);
+		   sql += Te2String(rep.resX_, 15);
 		   sql += ", ";
-		   sql += Te2String(rep.resY_);
+		   sql += Te2String(rep.resY_, 15);
 		   sql += ", ";
 		   sql += Te2String(static_cast<long>(rep.nCols_));
 		   sql += ", ";
@@ -1680,22 +1439,30 @@ bool TePostgreSQL::insertView(TeView *view)
 {
 	errorMessage_ = "";
 
-	// save it�s projection
+	// save it�s projection
 	TeProjection* proj = view->projection();
 	if ( !proj || !insertProjection(proj))
 	{
-		errorMessage_ = "N�o � poss�vel inserir vista sem proje��o";
+		errorMessage_ = "Error inserting projection";
 		return false;
 	}
 
-	string sql  = "INSERT INTO te_view (projection_id, name, user_name, visibility) VALUES(";
+	string sql  = "INSERT INTO te_view (projection_id, name, user_name, visibility, lower_x, lower_y, upper_x, upper_y, current_theme) VALUES(";
 	       sql += Te2String(proj->id());
 		   sql += ", '";
 		   sql += view->name();
 		   sql += "', '";
 		   sql += view->user();
 		   sql += "', ";
-		   sql += Te2String(view->isVisible());
+		   sql += Te2String(view->isVisible()) + ", ";
+		   sql += Te2String(view->getCurrentBox().lowerLeft().x(),15) + ", ";
+		   sql += Te2String(view->getCurrentBox().lowerLeft().y(),15) + ", ";
+		   sql += Te2String(view->getCurrentBox().upperRight().x(),15) + ", ";
+		   sql += Te2String(view->getCurrentBox().upperRight().y(),15) + ", ";
+		   if(view->getCurrentTheme() == -1)
+				sql += "null ";
+		   else
+				sql += Te2String(view->getCurrentTheme());
 		   sql += ")";
 
 	if(this->execute(sql))
@@ -1727,7 +1494,7 @@ bool TePostgreSQL::insertView(TeView *view)
 		}
 	}
 
-	viewMap_[view->id()] = view;
+	viewMap()[view->id()] = view;
 
 	return true;
 }
@@ -1771,20 +1538,13 @@ bool TePostgreSQL::insertThemeGroup(TeViewTree* tree)
 {
 	errorMessage_ = "";
 
-	string sql  = "INSERT INTO te_theme (layer_id, view_id, name, parent_id, priority, node_type) VALUES(";
-	       sql += "1";
-		   sql += ", ";
+	string sql  = "INSERT INTO te_theme (name, parent_id, node_type, view_id, priority) VALUES(";
+	       sql += "'";
+		   sql += tree->name();
+		   sql += "', 1, 1, ";
 		   sql += Te2String(tree->view());
-		   sql += ", '";
-	       sql += tree->name();
-	       sql += "', ";
-	       sql += Te2String(tree->parentId());
-	       sql += ", ";
-		   sql += Te2String(tree->priority());
-	       sql += ", ";
-	       sql += "1";
-	       sql += ", ";
-	       
+		   sql += ", ";
+	       sql += Te2String(tree->priority());
 	       sql += ")";
 
 	if(this->execute(sql))
@@ -1801,17 +1561,21 @@ bool TePostgreSQL::insertThemeGroup(TeViewTree* tree)
 		return false;
 		
 	return true;	
-
 }
 
-bool TePostgreSQL::insertTheme(TeTheme *theme)
+bool TePostgreSQL::insertTheme(TeAbstractTheme *theme)
 {
 	errorMessage_ = "";
 
 	string sql  = "INSERT INTO te_theme (layer_id, view_id, name, parent_id, priority, node_type, ";
 	       sql += "min_scale, max_scale, generate_attribute_where, generate_spatial_where, ";
-		   sql += "generate_temporal_where, collection_table, visible_rep, enable_visibility) VALUES(";
-		   sql += Te2String(theme->layerId());
+		   sql += "generate_temporal_where, collection_table, visible_rep, enable_visibility, ";
+		   sql += "lower_x, lower_y, upper_x, upper_y, creation_time) VALUES(";
+		   
+		   if(theme->type()==TeTHEME)
+			   sql += Te2String(static_cast<TeTheme*>(theme)->layerId());
+		   else
+			   sql += " NULL ";
 		   sql += ", ";
 		   sql += Te2String(theme->view());
 		   sql += ", '";
@@ -1823,9 +1587,9 @@ bool TePostgreSQL::insertTheme(TeTheme *theme)
 		   sql += ", ";
 		   sql += Te2String(theme->type());
 		   sql += ", ";
-		   sql += Te2String(theme->minScale());
+		   sql += Te2String(theme->minScale(), 15);
 		   sql += ", ";
-		   sql += Te2String(theme->maxScale());
+		   sql += Te2String(theme->maxScale(), 15);
 		   sql += ", '";
 		   sql += escapeSequence(theme->attributeRest());
 		   sql += "', '";
@@ -1833,11 +1597,23 @@ bool TePostgreSQL::insertTheme(TeTheme *theme)
 		   sql += "', '";
 		   sql += escapeSequence(theme->temporalRest());
 		   sql += "', '";
-		   sql += theme->collectionTable();
+		   if(theme->type()==TeTHEME)
+				sql += static_cast<TeTheme*>(theme)->collectionTable();
 		   sql += "', ";
 		   sql += Te2String(theme->visibleRep());
 		   sql += ", ";
 		   sql += Te2String(theme->visibility());
+		   sql += ", ";
+		   sql += Te2String(theme->box().x1(), 15);
+		   sql += ", ";
+		   sql += Te2String(theme->box().y1(), 15);
+		   sql += ", ";
+		   sql += Te2String(theme->box().x2(), 15);
+		   sql += ", ";
+		   sql += Te2String(theme->box().y2(), 15);
+		   sql += ", ";
+		   TeTime creationTime = theme->getCreationTime();
+		   sql += getSQLTime(creationTime);
 		   sql += " )";
 
 	if(this->execute(sql))
@@ -1855,7 +1631,7 @@ bool TePostgreSQL::insertTheme(TeTheme *theme)
 		return false;
 
 
-	if(theme->collectionTable().empty())
+	if((theme->type()==TeTHEME || theme->type()==TeEXTERNALTHEME) && static_cast<TeTheme*>(theme)->collectionTable().empty())
 	{
 		sql  = "UPDATE te_theme SET collection_table = '";
 		sql += "te_collection_";
@@ -1863,7 +1639,7 @@ bool TePostgreSQL::insertTheme(TeTheme *theme)
 		sql += "' WHERE theme_id = ";
 		sql += Te2String(theme->id());
 
-		theme->collectionTable(string("te_collection_") + Te2String(theme->id()));
+		static_cast<TeTheme*>(theme)->collectionTable(string("te_collection_") + Te2String(theme->id()));
 
 		if(!this->execute(sql))
 			return false;
@@ -1874,11 +1650,11 @@ bool TePostgreSQL::insertTheme(TeTheme *theme)
 
 	// insert grouping
 	int numSlices = 0;
-	if(theme->grouping())
+	if(theme->grouping().groupMode_ != TeNoGrouping)
 	{
 		if(!insertGrouping (theme->id(), theme->grouping()))
 			return false;
-		numSlices = theme->grouping()->groupNumSlices_;
+		numSlices = theme->grouping().groupNumSlices_;
 	}
 		
 	// insert legend
@@ -1929,8 +1705,16 @@ bool TePostgreSQL::insertTheme(TeTheme *theme)
 	if (!status)
 		return status;
 
-	themeMap_[theme->id()] = theme;
-	return updateThemeTable(theme);
+	//insert metadata theme
+	if(!theme->saveMetadata(this))
+		return false;
+
+	themeMap()[theme->id()] = theme;
+
+	if(theme->type()==TeTHEME && !updateThemeTable(static_cast<TeTheme*>(theme)))
+		return false;
+
+	return true;
 }
 
 bool TePostgreSQL::insertThemeTable(int themeId, int tableId, int relationId, int tableOrder)
@@ -1974,7 +1758,7 @@ bool TePostgreSQL::insertThemeTable(int themeId, int tableId, int relationId, in
 	return true;	
 }
 
-bool TePostgreSQL::generateLabelPositions(TeTheme *theme)
+bool TePostgreSQL::generateLabelPositions(TeTheme *theme, const std::string& objectId)
 {
 	string	geomTable, upd;
 	string	collTable = theme->collectionTable();
@@ -1996,88 +1780,243 @@ bool TePostgreSQL::generateLabelPositions(TeTheme *theme)
 				geomTable = theme->layer()->tableName(TeLINES);
 
 				if(geomTable.empty())
-					geomTable = theme->layer()->tableName(TePOINTS);
+					return false;
 			}
 		}
 		
+		string lower_x =  "(((" + geomTable + ".spatial_box[1])[0]))";
+		string lower_y =  "(((" + geomTable + ".spatial_box[1])[1]))";
+		string upper_x =  "(((" + geomTable + ".spatial_box[0])[0]))";
+		string upper_y =  "(((" + geomTable + ".spatial_box[0])[1]))";
+		
 		upd  = " UPDATE " + collTable + " SET ";
-		upd += " label_x = (SELECT MAX(lower_x + (upper_x";
-		upd += " -  lower_x) / 2.0) ";
+		upd += " label_x = (SELECT MAX(" + lower_x + " + (" + upper_x;
+		upd += " - " + lower_x + ") / 2.0) ";
 		upd += "FROM " + geomTable + " WHERE object_id = c_object_id), ";
 		
-		upd += " label_y = (SELECT MAX(lower_y + (upper_y";
-		upd += " - lower_y) / 2.0) ";
+		upd += " label_y = (SELECT MAX(" + lower_y + " + (" + upper_y;
+		upd += " - " + lower_y + ") / 2.0) ";
 		upd += "FROM " + geomTable + " WHERE object_id = c_object_id) ";
 
-		upd += " WHERE (label_x IS NULL) OR (label_y IS NULL)";
-	}	
-	else
-		if(theme->layer()->hasGeometry(TePOINTS))
-		{
-			geomTable = theme->layer()->tableName(TePOINTS);
-		
-			upd  = " UPDATE " + collTable + " SET ";
-			upd += " label_x = (SELECT MAX(x)";
-			upd += " FROM " + geomTable + " WHERE object_id = c_object_id), ";
+		upd += " WHERE (label_x IS NULL) OR (label_y IS NULL)";
+	}	
+	else if(theme->layer()->hasGeometry(TePOINTS))
+	{
+		geomTable = theme->layer()->tableName(TePOINTS);
+	
+		upd  = " UPDATE " + collTable + " SET ";
+		upd += " label_x = (SELECT MAX(x)";
+		upd += " FROM " + geomTable + " WHERE object_id = c_object_id), ";
+
+
+		upd += " label_y = (SELECT MAX(y)";
+		upd += " FROM " + geomTable + " WHERE object_id = c_object_id) ";
+
+		upd += " WHERE (label_x IS NULL) OR (label_y IS NULL)";
+	}
+
+	if (!upd.empty())
+	{
+		if (!objectId.empty())
+		{
+			upd += " AND c_object_id='"+objectId+"'";
+		}
+		if(!execute(upd))
+			return false;
+	}
+
+	return true;
+}
+
+bool TePostgreSQL::insertLegend(TeLegendEntry *legend)
+{
+	errorMessage_ = "";
+
+	string sql  = "INSERT INTO te_legend (theme_id, group_id, num_objs, lower_value, upper_value, ";
+		   sql += "label) VALUES(";
+		   sql += Te2String(legend->theme());
+		   sql += ", ";
+		   sql += Te2String(legend->group());
+		   sql += ", ";
+	   	   sql += Te2String(legend->count());
+		   sql += ", '";
+		   sql += escapeSequence(legend->from());
+		   sql += "', '";
+		   sql += escapeSequence(legend->to());
+		   sql += "', '";
+		   sql += escapeSequence(legend->label());
+		   sql += "')";
+
+	if(this->execute(sql))
+	{
+		sql = "SELECT currval('te_legend_legend_id_seq')";
+		TePGRecordset rec;
+		rec.open(sql, &tepg_connection_);
+		if(rec.recordCount() > 0)
+		{
+			legend->id(rec.getInt(0));
+		}
+		rec.close();
+	}
+	else
+		return false;	
+
+	legendMap()[legend->id()] = legend;
+
+	return insertVisual(legend);
+}
+
+bool TePostgreSQL::loadPolygonSet(const string& table, TeBox& box, TePolygonSet& ps)
+{
+	TeDatabasePortal *portal = this->getPortal();
+
+	if(!portal)
+		return false;
+
+	string q = "SELECT * FROM " + table + " WHERE ";
+	       q += this->getSQLBoxWhere(box, TePOLYGONS);
+	       q += " ORDER BY parent_id, num_holes DESC, ext_max ASC";
+
+	if(!portal->query(q, TeSERVERSIDE, TeUNIDIRECTIONAL, TeREADONLY, TeBINARYCURSOR) || !portal->fetchRow())
+	{	
+		delete portal;
+		return false;
+	}
+	
+	bool flag = true;
+
+	do
+	{
+		TePolygon poly;
+		flag = portal->fetchGeometry(poly);
+		ps.add(poly);
+	}
+	while (flag);
+
+	delete portal;
+
+	return true;
+}
+
+TeDatabasePortal* TePostgreSQL::loadPolygonSet(const string& table, TeBox& box)
+{
+	TeDatabasePortal *portal = this->getPortal();
+	
+	if(!portal)
+		return 0;
+
+	string q = "SELECT * FROM " + table + " WHERE ";
+	       q += this->getSQLBoxWhere(box, TePOLYGONS);
+	       q += " ORDER BY parent_id, num_holes DESC, ext_max ASC";
+
+	if(!portal->query(q, TeSERVERSIDE, TeUNIDIRECTIONAL, TeREADONLY, TeBINARYCURSOR) || !portal->fetchRow())
+	{	
+		delete portal;
+		return 0;
+	}
+	else 
+		return portal;
+}
+
+bool TePostgreSQL::locatePolygon(const string& table, TeCoord2D& pt, TePolygon& polygon, const double& tol)
+{
+	TeDatabasePortal *portal = this->getPortal();
+
+	if (!portal)
+		return false;
+
+	TeBox box (pt.x()-tol,pt.y()-tol,pt.x()+tol,pt.y()+tol);
+
+
+	string sql  = "SELECT * FROM ";
+	       sql += table;
+		   sql += " WHERE ";
+		   sql += getSQLBoxWhere(box, TePOLYGONS);
+		   sql += " ORDER BY parent_id, num_holes DESC, ext_max ASC";
+		   
+	
+	if(!portal->query(sql, TeSERVERSIDE, TeUNIDIRECTIONAL, TeREADONLY, TeBINARYCURSOR) || !portal->fetchRow())
+	{	
+		delete portal;
+		return false;
+	}
+
+	bool flag = true;
+
+	do
+	{
+		TePolygon poly;
 
-			upd += " label_y = (SELECT MAX(y)";
-			upd += " FROM " + geomTable + " WHERE object_id = c_object_id) ";
+		flag = portal->fetchGeometry(poly);
 
-			upd += " WHERE (label_x IS NULL) OR (label_y IS NULL)";
+		if(TeWithin(TePoint(pt), poly))
+		{
+			polygon = poly;
+			delete portal;
+			return true;
 		}
-
-	return execute(upd);
+	}
+	while(flag);
+	
+	delete portal;
+	
+	return false;
 }
 
-bool TePostgreSQL::insertLegend(TeLegendEntry *legend)
+bool TePostgreSQL::locatePolygonSet(const string& table, TeCoord2D &pt, double tol, TePolygonSet &polygons)
 {
-	errorMessage_ = "";
+	TeDatabasePortal *portal = this->getPortal();
+	
+	if (!portal)
+		return false;
 
-	string sql  = "INSERT INTO te_legend (theme_id, group_id, num_objs, lower_value, upper_value, ";
-		   sql += "label) VALUES(";
-		   sql += Te2String(legend->theme());
-		   sql += ", ";
-		   sql += Te2String(legend->group());
-		   sql += ", ";
-	   	   sql += Te2String(legend->count());
-		   sql += ", '";
-		   sql += legend->from();
-		   sql += "', '";
-		   sql += legend->to();
-		   sql += "', '";
-		   sql += legend->label();
-		   sql += "')";
+	TeBox box (pt.x()-tol,pt.y()-tol,pt.x()+tol,pt.y()+tol);
 
-	if(this->execute(sql))
+
+	string sql  = "SELECT * FROM ";
+	       sql += table;
+		   sql += " WHERE ";
+		   sql += getSQLBoxWhere(box, TePOLYGONS);
+		   sql += " ORDER BY object_id, parent_id, num_holes DESC, ext_max ASC";
+
+	if (!portal->query(sql, TeSERVERSIDE, TeUNIDIRECTIONAL, TeREADONLY, TeBINARYCURSOR) || !portal->fetchRow())
+	{	
+		delete portal;
+		return false;
+	}
+	
+	bool flag = true;
+	
+	polygons.clear();
+	
+	do
 	{
-		sql = "SELECT currval('te_legend_legend_id_seq')";
-		TePGRecordset rec;
-		rec.open(sql, &tepg_connection_);
-		if(rec.recordCount() > 0)
-		{
-			legend->id(rec.getInt(0));
-		}
-		rec.close();
+		TePolygon poly;
+
+		flag = portal->fetchGeometry(poly);
+
+		if(TeWithin(TePoint(pt), poly))
+			polygons.add(poly);
 	}
-	else
-		return false;	
+	while (flag);
 
-	legendMap_[legend->id()] = legend;
+	delete portal;
 
-	return insertVisual(legend);
+	if(polygons.size())
+		return (true);
+
+	return false;
 }
 
 bool TePostgreSQL::insertPolygon(const string& table, TePolygon &p)
 {
 	errorMessage_ = "";
 
-	//TeRemoveDuplicatedCoordinates(p);
-
 	int parentId = 0;
 
 	for(unsigned int k = 0u; k < p.size(); ++k)
 	{
-		TeLinearRing ring = p[k];
+		TeLinearRing& ring = p[k];
 
 		TeBox b = ring.box();
 
@@ -2090,37 +2029,84 @@ bool TePostgreSQL::insertPolygon(const string& table, TePolygon &p)
 		if(k == 0u)
 			numberOfHoles = p.size() - 1u;
 
-		string strPol = "";
-
-		Te2PgGeomPolygon(ring, strPol);
-
-		string sql  = "INSERT INTO ";
-		       sql += table;
-			   sql += " (object_id, num_coords, num_holes, parent_id, lower_x, lower_y, upper_x, upper_y, ext_max, spatial_data) VALUES ('";
-			   sql += p.objectId();
-			   sql += "', ";
-			   sql += Te2String(ringSize);
-			   sql += ", ";
-			   sql += Te2String(numberOfHoles);
-			   sql += ", ";
-			   sql += Te2String(parentId);
-			   sql += ", ";
-			   sql += Te2String(b.lowerLeft().x());
-			   sql += ", ";
-			   sql += Te2String(b.lowerLeft().y());
-			   sql += ", ";
-			   sql += Te2String(b.upperRight().x());
-			   sql += ", ";
-			   sql += Te2String(b.upperRight().y());
-			   sql += ", ";
-			   sql += Te2String(extMax);
-			   sql += ", '";
-			   sql += strPol;
-			   sql += "')";
+		unsigned int sizeBinaryRing = 0;
+		unsigned int sizeBinaryBox = 0;
+		char* binaryRing = TeLine2DToPGBinary(ring, sizeBinaryRing);
+		char* binaryBox = TeBoxToPGBinary(b, sizeBinaryBox);
 
-		if(this->execute(sql))
+		int nParams = 7;
+		Oid paramTypes[7];
+		const char *paramValues[7];
+		int paramLengths[7];
+		int paramFormats[7];
+		
+		//tipos dos parametros
+		paramTypes[0] = PG_VARCHAR_TYPE;
+		paramTypes[1] = PG_INT4_TYPE;
+		paramTypes[2] = PG_INT4_TYPE;
+		paramTypes[3] = PG_INT4_TYPE;
+		paramTypes[4] = PG_BOX_TYPE;
+		paramTypes[5] = PG_FLOAT8_TYPE;
+		paramTypes[6] = PG_POLYGON_TYPE;
+
+		string strOid = escapeSequence(p.objectId());
+		paramValues[0] = strOid.c_str();
+
+		string strSize = Te2String(ringSize);
+		paramValues[1] = strSize.c_str();		
+
+		string strHoles = Te2String(numberOfHoles);
+		paramValues[2] = strHoles.c_str();
+
+		string strParent = Te2String(parentId);
+		paramValues[3] = strParent.c_str();		
+
+		paramValues[4] = binaryBox;
+
+		char* chrExtMax = new char[sizeof(double)];
+		double swappedDouble = TeConvertToBigEndian(extMax);
+		memcpy(chrExtMax, &swappedDouble, sizeof(double));
+		paramValues[5] = chrExtMax;
+
+		paramValues[6] = binaryRing;
+
+		paramLengths[0] = 0;
+		paramLengths[1] = 0;
+		paramLengths[2] = 0;
+		paramLengths[3] = 0;
+		paramLengths[4] = sizeBinaryBox;
+		paramLengths[5] = sizeof(double);
+		paramLengths[6] = sizeBinaryRing;
+		
+		paramFormats[0] = 0;
+		paramFormats[1] = 0;
+		paramFormats[2] = 0;
+		paramFormats[3] = 0;
+		paramFormats[4] = 1;
+		paramFormats[5] = 1;
+		paramFormats[6] = 1;
+		
+
+		string command = "INSERT INTO ";
+				command += table;
+				command += " (object_id, num_coords, num_holes, parent_id, spatial_box, ext_max, spatial_data)"; 
+				command += " VALUES ($1, $2, $3, $4,$5, $6, $7)";
+		
+		int result = tepg_connection_.exec_cmd_params(command.c_str(), 
+                       nParams,
+                       paramTypes,
+                       paramValues,
+                       paramLengths,
+                       paramFormats,
+                       0);
+
+		delete [] binaryRing;
+		delete [] binaryBox;
+		delete [] chrExtMax;
+
+		if(result == 1)
 		{
-			sql = "SELECT currval('" + table + "_geom_id_seq')";
+			string sql = "SELECT currval('" + table + "_geom_id_seq')";
 		
 			TePGRecordset rec;
 			rec.open(sql, &tepg_connection_);
@@ -2132,6 +2118,8 @@ bool TePostgreSQL::insertPolygon(const string& table, TePolygon &p)
 			{
 				parentId = ring.geomId();
 
+				p.geomId(ring.geomId());
+
 				string newSQL  = "UPDATE " + table + " SET parent_id = ";
 				       newSQL += Te2String(parentId);
 					   newSQL += " WHERE geom_id = ";
@@ -2154,13 +2142,11 @@ bool TePostgreSQL::updatePolygon(const string& table, TePolygon &p)
 {
 	errorMessage_ = "";
 
-	//TeRemoveDuplicatedCoordinates(p);
-
 	int parentId = 0;
 
 	for(unsigned int k = 0u; k < p.size(); ++k)
 	{
-		TeLinearRing ring = p[k];
+		TeLinearRing& ring = p[k];
 
 		TeBox b = ring.box();
 
@@ -2171,76 +2157,224 @@ bool TePostgreSQL::updatePolygon(const string& table, TePolygon &p)
 		unsigned int numberOfHoles = 0u;
 		
 		if(k == 0u)
+		{
+			parentId = ring.geomId();
+
 			numberOfHoles = p.size() - 1u;
+		}
 
-		string strPol = "";
-
-		Te2PgGeomPolygon(ring, strPol);
-
-		string sql  = "UPDATE " + table + " SET object_id = '";
-		       sql += p.objectId();
-			   sql += "', num_coords = ";
-			   sql += Te2String(ringSize);
-			   sql += ", num_holes = ";
-			   sql += Te2String(numberOfHoles);
-			   sql += ", parent_id = ";
-			   sql += Te2String(parentId);
-			   sql += ", lower_x = ";
-			   sql += Te2String(b.x1_);
-			   sql += ", lower_y = ";
-			   sql += Te2String(b.y1_);
-			   sql += ", upper_x = ";
-			   sql += Te2String(b.x2_);
-			   sql += ", upper_y = ";
-			   sql += Te2String(b.y2_);
-			   sql += ", ext_max = ";
-			   sql += Te2String(extMax);
-			   sql += ", spatial_data = '";
-			   sql += strPol;
-			   sql += "' WHERE geom_id = ";
-			   sql += Te2String(ring.geomId());
+		unsigned int sizeBinaryRing = 0;
+		unsigned int sizeBinaryBox = 0;
+		char* binaryRing = TeLine2DToPGBinary(ring, sizeBinaryRing);
+		char* binaryBox = TeBoxToPGBinary(b, sizeBinaryBox);
 
-		if(!this->execute(sql))
+		int nParams = 7;
+		Oid paramTypes[7];
+		const char *paramValues[7];
+		int paramLengths[7];
+		int paramFormats[7];
+		
+		//tipos dos parametros
+		paramTypes[0] = PG_VARCHAR_TYPE;
+		paramTypes[1] = PG_INT4_TYPE;
+		paramTypes[2] = PG_INT4_TYPE;
+		paramTypes[3] = PG_INT4_TYPE;
+		paramTypes[4] = PG_BOX_TYPE;
+		paramTypes[5] = PG_FLOAT8_TYPE;
+		paramTypes[6] = PG_POLYGON_TYPE;
+
+		string strOid = escapeSequence(p.objectId());
+		paramValues[0] = strOid.c_str();
+
+		string strSize = Te2String(ringSize);
+		paramValues[1] = strSize.c_str();		
+
+		string strHoles = Te2String(numberOfHoles);
+		paramValues[2] = strHoles.c_str();
+
+		string strParent = Te2String(parentId);
+		paramValues[3] = strParent.c_str();		
+
+		paramValues[4] = binaryBox;
+
+		char* chrExtMax = new char[sizeof(double)];
+		double swappedDouble = TeConvertToBigEndian(extMax);
+		memcpy(chrExtMax, &swappedDouble, sizeof(double));
+		paramValues[5] = chrExtMax;
+
+		paramValues[6] = binaryRing;
+
+		paramLengths[0] = 0;
+		paramLengths[1] = 0;
+		paramLengths[2] = 0;
+		paramLengths[3] = 0;
+		paramLengths[4] = sizeBinaryBox;
+		paramLengths[5] = sizeof(double);
+		paramLengths[6] = sizeBinaryRing;
+		
+		paramFormats[0] = 0;
+		paramFormats[1] = 0;
+		paramFormats[2] = 0;
+		paramFormats[3] = 0;
+		paramFormats[4] = 1;
+		paramFormats[5] = 1;
+		paramFormats[6] = 1;
+
+		string command  = "UPDATE " + table + " SET ";
+		command += "object_id = $1";
+		command += ", num_coords = $2";
+		command += ", num_holes = $3";
+		command += ", parent_id = $4";
+		command += ", spatial_box = $5";
+		command += ", ext_max = $6";
+		command += ", spatial_data = $7";
+		command += " WHERE geom_id = ";
+		command += Te2String(ring.geomId());
+		
+		int result = tepg_connection_.exec_cmd_params(command.c_str(), 
+                       nParams,
+                       paramTypes,
+                       paramValues,
+                       paramLengths,
+                       paramFormats,
+                       0);
+
+		delete [] binaryRing;
+		delete [] binaryBox;
+		delete [] chrExtMax;
+
+		if(result != 1)
+		{
 			return false;
+		}
+	}
+
+	return true;
+}
+
+bool TePostgreSQL::loadLineSet(const string& table, TeBox& box, TeLineSet& linSet)
+{
+	TeDatabasePortal *portal = this->getPortal();
+	
+	if(!portal)
+		return false;
+
+	string q  = "SELECT * FROM " + table + " WHERE ";
+	       q += this->getSQLBoxWhere (box, TeLINES);
+
+	if(!portal->query(q, TeSERVERSIDE, TeUNIDIRECTIONAL, TeREADONLY, TeBINARYCURSOR) || !portal->fetchRow())
+	{	
+		delete portal;
+		return false;
 	}
 
+	bool flag = true;
+
+	do
+	{
+		TeLine2D lin;
+		flag = portal->fetchGeometry(lin);
+		linSet.add(lin);
+	}
+	while (flag);
+
+	delete portal;
+
 	return true;
 }
 
+TeDatabasePortal* TePostgreSQL::loadLineSet(const string& table, TeBox& box)
+{
+	TeDatabasePortal *portal = this->getPortal();
+
+	if(!portal)
+		return 0;
+
+	string q  = "SELECT * FROM " + table + " WHERE ";
+	       q += this->getSQLBoxWhere (box, TeLINES);
+
+	if(!portal->query(q, TeSERVERSIDE, TeUNIDIRECTIONAL, TeREADONLY, TeBINARYCURSOR) || !portal->fetchRow())
+	{	
+		delete portal;
+
+		return 0;
+	}
+
+	return portal;
+}
+
 bool TePostgreSQL::insertLine(const string& table, TeLine2D& l)
 {
 	errorMessage_ = "";
 
-	//TeRemoveDuplicatedCoordinates(l);
+	double extMax = MAX(l.box().width(), l.box().height());
 
-	string strLine = "";
-		
-	Te2PgGeomPolygon(l, strLine);
+	unsigned int sizeBinaryRing = 0;
+	unsigned int sizeBinaryBox = 0;
+	char* binaryRing = TeLine2DToPGBinary(l, sizeBinaryRing);
+	char* binaryBox = TeBoxToPGBinary(l.box(), sizeBinaryBox);
 
-	double extMax = MAX(l.box().width(), l.box().height());
+	int nParams = 5;
+	Oid paramTypes[5];
+	const char *paramValues[5];
+	int paramLengths[5];
+	int paramFormats[5];
+	
+	//tipos dos parametros
+	paramTypes[0] = PG_VARCHAR_TYPE;
+	paramTypes[1] = PG_INT4_TYPE;
+	paramTypes[2] = PG_BOX_TYPE;
+	paramTypes[3] = PG_FLOAT8_TYPE;
+	paramTypes[4] = PG_POLYGON_TYPE;
 
-	string sql  = "INSERT INTO " + table + " (object_id, num_coords, lower_x, lower_y, upper_x, upper_y, ext_max, spatial_data) ";
-		   sql += "VALUES('";
-		   sql += l.objectId();
-		   sql += "', ";
-		   sql += Te2String(l.size());
-		   sql += ", ";
-		   sql += Te2String(l.box().x1_);
-		   sql += ", ";
-		   sql += Te2String(l.box().y1_);
-		   sql += ", ";
-		   sql += Te2String(l.box().x2_);
-		   sql += ", ";
-		   sql += Te2String(l.box().y2_);
-		   sql += ", ";
-		   sql += Te2String(extMax);
-		   sql += ", '";
-		   sql += strLine;
-		   sql += "')";
+	string strOid = escapeSequence(l.objectId());
+	paramValues[0] = strOid.c_str();
 
-	if(this->execute(sql))
+	string strSize = Te2String(l.size());
+	paramValues[1] = strSize.c_str();		
+
+	paramValues[2] = binaryBox;
+
+	char* chrExtMax = new char[sizeof(double)];
+	double swappedDouble = TeConvertToBigEndian(extMax);
+	memcpy(chrExtMax, &swappedDouble, sizeof(double));
+	paramValues[3] = chrExtMax;
+	
+	paramValues[4] = binaryRing;
+
+	paramLengths[0] = 0;
+	paramLengths[1] = 0;
+	paramLengths[2] = sizeBinaryBox;
+	paramLengths[3] = sizeof(double);
+	paramLengths[4] = sizeBinaryRing;
+	
+	paramFormats[0] = 0;
+	paramFormats[1] = 0;
+	paramFormats[2] = 1;
+	paramFormats[3] = 1;
+	paramFormats[4] = 1;
+	
+
+	string command = "INSERT INTO ";
+			command += table;
+			command += " (object_id, num_coords, spatial_box, ext_max, spatial_data)";
+			command += " VALUES ($1, $2, $3, $4, $5)";
+	
+	int result = tepg_connection_.exec_cmd_params(command.c_str(),
+                    nParams,
+                    paramTypes,
+                    paramValues,
+                    paramLengths,
+                    paramFormats,
+                    0);
+
+	delete [] binaryRing;
+	delete [] binaryBox;
+	delete [] chrExtMax;
+
+	if(result == 1)
 	{
-		sql = "SELECT currval('" + table + "_geom_id_seq')";
+		string sql = "SELECT currval('" + table + "_geom_id_seq')";
 
 		TePGRecordset rec;
 		rec.open(sql, &tepg_connection_);
@@ -2260,51 +2394,184 @@ bool TePostgreSQL::updateLine(const string& table, TeLine2D& l)
 {
 	errorMessage_ = "";
 
-	//TeRemoveDuplicatedCoordinates(l);
+	double extMax = MAX(l.box().width(), l.box().height());
+
+	unsigned int sizeBinaryRing = 0;
+	unsigned int sizeBinaryBox = 0;
+	char* binaryRing = TeLine2DToPGBinary(l, sizeBinaryRing);
+	char* binaryBox = TeBoxToPGBinary(l.box(), sizeBinaryBox);
 
-	string strLine = "";
+	int nParams = 5;
+	Oid paramTypes[5];
+	const char *paramValues[5];
+	int paramLengths[5];
+	int paramFormats[5];
 	
-	Te2PgGeomPolygon(l, strLine);
+	//tipos dos parametros
+	paramTypes[0] = PG_VARCHAR_TYPE;
+	paramTypes[1] = PG_INT4_TYPE;
+	paramTypes[2] = PG_BOX_TYPE;
+	paramTypes[3] = PG_FLOAT8_TYPE;
+	paramTypes[4] = PG_POLYGON_TYPE;
 
-	double extMax = MAX(l.box().width(), l.box().height());
+	string strOid = escapeSequence(l.objectId());
+	paramValues[0] = strOid.c_str();
 
-	string sql  = "UPDATE " + table + " SET  object_id = '";
-		   sql += l.objectId();
-		   sql += "', num_coords = ";
-		   sql += Te2String(l.size());
-		   sql += ", lower_x = ";
-		   sql += Te2String(l.box().x1_);
-		   sql += ", lower_y = ";
-		   sql += Te2String(l.box().y1_);
-		   sql += ", upper_x = ";
-		   sql += Te2String(l.box().x2_);
-		   sql += ", upper_y = ";
-		   sql += Te2String(l.box().y2_);
-		   sql += ", ext_max = ";
-		   sql += Te2String(extMax);
-		   sql += ", '";
-		   sql += strLine;
-		   sql += "' WHERE geom_id = ";
-		   sql += Te2String(l.geomId());			
+	string strSize = Te2String(l.size());
+	paramValues[1] = strSize.c_str();		
+
+	paramValues[2] = binaryBox;
+
+	char* chrExtMax = new char[sizeof(double)];
+	double swappedDouble = TeConvertToBigEndian(extMax);
+	memcpy(chrExtMax, &swappedDouble, sizeof(double));
+	paramValues[3] = chrExtMax;
+	
+	paramValues[4] = binaryRing;
+
+	paramLengths[0] = 0;
+	paramLengths[1] = 0;
+	paramLengths[2] = sizeBinaryBox;
+	paramLengths[3] = sizeof(double);
+	paramLengths[4] = sizeBinaryRing;
+	
+	paramFormats[0] = 0;
+	paramFormats[1] = 0;
+	paramFormats[2] = 1;
+	paramFormats[3] = 1;
+	paramFormats[4] = 1;
+
+	string command = "UPDATE " + table + " SET";
+		command += " object_id = $1";
+		command += ", num_coords = $2";
+		command += ", spatial_box = $3";
+		command += ", ext_max = $4";
+		command += ", spatial_data = $5";
+		command += " WHERE geom_id = ";
+		command += Te2String(l.geomId());
+	
+	int result = tepg_connection_.exec_cmd_params(command.c_str(), 
+                    nParams,
+                    paramTypes,
+                    paramValues,
+                    paramLengths,
+                    paramFormats,
+                    0);
+
+	delete [] binaryRing;
+	delete [] binaryBox;
+	delete [] chrExtMax;
+
+	return (result == 1);
+}
+
+bool TePostgreSQL::locateLine(const string& table, TeCoord2D &pt, TeLine2D &line, const double& tol)
+{
+	TeDatabasePortal* portal = this->getPortal();
+
+	TeBox box (pt.x()-tol,pt.y()-tol,pt.x()+tol,pt.y()+tol);
+
+	string sql  = "SELECT * FROM ";
+	       sql += table;
+		   sql += " WHERE ";
+		   sql += this->getSQLBoxWhere(box, TeLINES);
+
+	
+	if(!portal->query(sql, TeSERVERSIDE, TeUNIDIRECTIONAL, TeREADONLY, TeBINARYCURSOR) || !portal->fetchRow())
+	{
+		delete portal;
+		return false;
+	}
+
+	// Get all lines
+	TeLineSet ls;
+	int k;
+	bool flag = true;
+	do 
+	{
+		TeLine2D l;
+		flag = portal->fetchGeometry( l );
+		ls.add ( l );
+	} while(flag);
+
+	delete portal;
+
+	TeCoord2D paux;
+
+	if(TeNearest(pt, ls, k, paux, tol))
+	{
+		line = ls[k];
+		return true;
+	}
 
-	return this->execute(sql);
+	return false;
 }
 
 bool TePostgreSQL::insertPoint(const string& table, TePoint &p)
 {
 	errorMessage_ = "";
 
-	string sql  = "INSERT INTO " + table + " (object_id, x, y) VALUES('";
- 		   sql +=  p.objectId();
-		   sql += "', ";
-		   sql += Te2String(p.location().x_);
-		   sql += ", ";
-		   sql += Te2String(p.location().y_);
-		   sql += ")";
+	unsigned int sizeBinaryBox = 0;
+	char* binaryBox = TeBoxToPGBinary(p.box(), sizeBinaryBox);
 
-	if(this->execute(sql))
+	int nParams = 4;
+	Oid paramTypes[4];
+	const char *paramValues[4];
+	int paramLengths[4];
+	int paramFormats[4];
+	
+	//tipos dos parametros
+	paramTypes[0] = PG_VARCHAR_TYPE;
+	paramTypes[1] = PG_BOX_TYPE;
+	paramTypes[2] = PG_FLOAT8_TYPE;
+	paramTypes[3] = PG_FLOAT8_TYPE;
+
+	char* chrX = new char[sizeof(double)];
+	double swappedDoubleX = TeConvertToBigEndian(p.location().x_);
+	memcpy(chrX, &swappedDoubleX, sizeof(double));
+
+	char* chrY = new char[sizeof(double)];
+	double swappedDoubleY = TeConvertToBigEndian(p.location().y_);
+	memcpy(chrY, &swappedDoubleY, sizeof(double));
+
+	string strOid = escapeSequence(p.objectId());
+	paramValues[0] = strOid.c_str();
+
+	paramValues[1] = binaryBox;
+
+	paramValues[2] = chrX;
+
+	paramValues[3] = chrY;
+	
+	paramLengths[0] = 0;
+	paramLengths[1] = sizeBinaryBox;
+	paramLengths[2] = sizeof(double);
+	paramLengths[3] = sizeof(double);
+	
+	paramFormats[0] = 0;
+	paramFormats[1] = 1;
+	paramFormats[2] = 1;
+	paramFormats[3] = 1;
+	
+	
+	string command  = "INSERT INTO " + table + " (object_id, spatial_box, x, y)";
+	command += " VALUES($1, $2, $3, $4)";
+		
+	int result = tepg_connection_.exec_cmd_params(command.c_str(),
+                    nParams,
+                    paramTypes,
+                    paramValues,
+                    paramLengths,
+                    paramFormats,
+                    0);
+
+	delete [] binaryBox;
+	delete [] chrX;
+	delete [] chrY;
+
+	if(result == 1)
 	{
-		sql = "SELECT currval('" + table + "_geom_id_seq')";
+		string sql = "SELECT currval('" + table + "_geom_id_seq')";
 		TePGRecordset rec;
 		rec.open(sql, &tepg_connection_);
 		if(rec.recordCount() > 0)
@@ -2318,26 +2585,130 @@ bool TePostgreSQL::insertPoint(const string& table, TePoint &p)
 	return true;
 }
 
+bool TePostgreSQL::updatePoint(const string& table, TePoint &p)
+{
+	unsigned int sizeBinaryBox = 0;
+	char* binaryBox = TeBoxToPGBinary(p.box(), sizeBinaryBox);
+
+	int nParams = 4;
+	Oid paramTypes[4];
+	const char *paramValues[4];
+	int paramLengths[4];
+	int paramFormats[4];
+	
+	//tipos dos par�metros
+	paramTypes[0] = PG_VARCHAR_TYPE;
+	paramTypes[1] = PG_BOX_TYPE;
+	paramTypes[2] = PG_FLOAT8_TYPE;
+	paramTypes[3] = PG_FLOAT8_TYPE;
+
+	char* chrX = new char[sizeof(double)];
+	double swappedDoubleX = TeConvertToBigEndian(p.location().x_);
+	memcpy(chrX, &swappedDoubleX, sizeof(double));
+
+	char* chrY = new char[sizeof(double)];
+	double swappedDoubleY = TeConvertToBigEndian(p.location().y_);
+	memcpy(chrY, &swappedDoubleY, sizeof(double));
+
+	string strOid = escapeSequence(p.objectId());
+	paramValues[0] = strOid.c_str();
+
+	paramValues[1] = binaryBox;
+
+	paramValues[2] = chrX;
+
+	paramValues[3] = chrY;
+	
+	paramLengths[0] = 0;
+	paramLengths[1] = sizeBinaryBox;
+	paramLengths[2] = sizeof(double);
+	paramLengths[3] = sizeof(double);
+	
+	paramFormats[0] = 0;
+	paramFormats[1] = 1;
+	paramFormats[2] = 1;
+	paramFormats[3] = 1;
+
+	string command  = "UPDATE " + table + " SET ";
+	       command += " object_id = $1";
+	       command += ", spatial_box = $2";
+           command += ", x = $3";
+           command += ", y = $4";
+           command += " WHERE geom_id = " + Te2String(p.geomId());
+		
+	int result = tepg_connection_.exec_cmd_params(command.c_str(),
+                    nParams,
+                    paramTypes,
+                    paramValues,
+                    paramLengths,
+                    paramFormats,
+                    0);
+
+	delete [] binaryBox;
+	delete [] chrX;
+	delete [] chrY;
+
+	return (result == 1);
+}
+
+bool TePostgreSQL::locatePoint(const string& table, TeCoord2D& pt, TePoint& point, const double& tol)
+{
+	TeDatabasePortal* portal = this->getPortal();
+
+	TeBox bbox(pt.x() - tol, pt.y() - tol, pt.x() + tol, pt.y() + tol);
+
+	string sql  = "SELECT * FROM ";
+	       sql += table;
+		   sql += " WHERE ";
+		   sql += this->getSQLBoxWhere(bbox, TePOINTS);
+
+	if(!portal->query(sql, TeSERVERSIDE, TeUNIDIRECTIONAL, TeREADONLY, TeBINARYCURSOR) || !portal->fetchRow())
+	{
+		delete portal;
+		return false;
+	}
+
+	TePointSet ps;
+	
+	bool flag = true;
+
+	do 
+	{
+		TePoint point;
+		flag = portal->fetchGeometry(point);
+		ps.add(point);
+	}while(flag);
+
+	delete portal;
+	int k;
+	if(TeNearest(pt, ps, k, tol))
+	{
+		point = ps[k];
+		return true;
+	}
+	return false;
+}
+
 bool TePostgreSQL::insertText(const string& table, TeText& t)
 {
 	errorMessage_ = "";
 
 	string sql  = "INSERT INTO " + table + " (object_id, x, y, text_value, angle, height, alignment_vert, alignment_horiz) VALUES('";
-		   sql += t.objectId();
+		   sql += escapeSequence(t.objectId());
 		   sql += "', ";
-		   sql += Te2String(t.location().x());
+		   sql += Te2String(t.location().x(), 15);
 		   sql += ", ";
-		   sql += Te2String(t.location().y());
+		   sql += Te2String(t.location().y(), 15);
 		   sql += ", '";
 		   sql += escapeSequence(t.textValue());
 		   sql += "', ";
-		   sql += Te2String(t.angle());
+		   sql += Te2String(t.angle(), 15);
 		   sql += ", ";
-		   sql += Te2String(t.height());
+		   sql += Te2String(t.height(), 15);
 		   sql += ", ";
-		   sql += Te2String(t.alignmentVert());
+		   sql += Te2String(t.alignmentVert(), 15);
 		   sql += ", ";
-		   sql += Te2String(t.alignmentHoriz());
+		   sql += Te2String(t.alignmentHoriz(), 15);
 		   sql += ")";
 
 	if(this->execute(sql))
@@ -2362,7 +2733,7 @@ bool TePostgreSQL::insertArc(const string& table, TeArc& arc)
 	errorMessage_ = "";
 
 	string sql  = "INSERT INTO " + table + " (object_id, from_node, to_node) VALUES('";
-		   sql += arc.objectId();
+		   sql += escapeSequence(arc.objectId());
 		   sql += "', ";
 		   sql += Te2String(arc.fromNode().geomId());
 	       sql += ", ";
@@ -2390,18 +2761,68 @@ bool TePostgreSQL::insertNode(const string& table, TeNode& node)
 {
 	errorMessage_ = "";
 
-	string  sql = "INSERT INTO " + table + " (object_id, x, y) VALUES('";
-			sql += node.objectId();
-			sql += "', ";
-			sql += Te2String(node.location().x_);
-			sql += ", ";
-			sql += Te2String(node.location().y_);
-			sql += ")";
+	unsigned int sizeBinaryBox = 0;
+	char* binaryBox = TeBoxToPGBinary(node.box(), sizeBinaryBox);
 
-	if(!this->execute(sql))
+	int nParams = 4;
+	Oid paramTypes[4];
+	const char *paramValues[4];
+	int paramLengths[4];
+	int paramFormats[4];
+	
+	//tipos dos par�metros
+	paramTypes[0] = PG_VARCHAR_TYPE;
+	paramTypes[1] = PG_BOX_TYPE;
+	paramTypes[2] = PG_FLOAT8_TYPE;
+	paramTypes[3] = PG_FLOAT8_TYPE;
+
+	char* chrX = new char[sizeof(double)];
+	double swappedDoubleX = TeConvertToBigEndian(node.location().x_);
+	memcpy(chrX, &swappedDoubleX, sizeof(double));
+
+	char* chrY = new char[sizeof(double)];
+	double swappedDoubleY = TeConvertToBigEndian(node.location().y_);
+	memcpy(chrY, &swappedDoubleY, sizeof(double));
+
+	string strOid = escapeSequence(node.objectId());
+	paramValues[0] = strOid.c_str();
+
+	paramValues[1] = binaryBox;
+
+	paramValues[2] = chrX;
+
+	paramValues[3] = chrY;
+	
+	paramLengths[0] = 0;
+	paramLengths[1] = sizeBinaryBox;
+	paramLengths[2] = sizeof(double);
+	paramLengths[3] = sizeof(double);
+	
+	paramFormats[0] = 0;
+	paramFormats[1] = 1;
+	paramFormats[2] = 1;
+	paramFormats[3] = 1;
+	
+	
+	string command  = "INSERT INTO " + table + " (object_id, spatial_box, x, y)";
+	command += " VALUES($1, $2, $3, $4)";
+		
+	int result = tepg_connection_.exec_cmd_params(command.c_str(),
+                    nParams,
+                    paramTypes,
+                    paramValues,
+                    paramLengths,
+                    paramFormats,
+                    0);
+
+	delete [] binaryBox;
+	delete [] chrX;
+	delete [] chrY;
+
+	if(result != 1)
 		return false;
 
-	sql = "SELECT currval('" + table + "_geom_id_seq')";
+	string sql = "SELECT currval('" + table + "_geom_id_seq')";
 	TePGRecordset rec;
 	rec.open(sql, &tepg_connection_);
 	if(rec.recordCount() > 0)
@@ -2409,33 +2830,136 @@ bool TePostgreSQL::insertNode(const string& table, TeNode& node)
 
 	rec.close();
 
-	return true;
-}
+	return true;
+}
+
+bool TePostgreSQL::updateNode(const string& table, TeNode &node)
+{
+	unsigned int sizeBinaryBox = 0;
+	char* binaryBox = TeBoxToPGBinary(node.box(), sizeBinaryBox);
+
+	int nParams = 4;
+	Oid paramTypes[4];
+	const char *paramValues[4];
+	int paramLengths[4];
+	int paramFormats[4];
+	
+	//tipos dos par�metros
+	paramTypes[0] = PG_VARCHAR_TYPE;
+	paramTypes[1] = PG_BOX_TYPE;
+	paramTypes[2] = PG_FLOAT8_TYPE;
+	paramTypes[3] = PG_FLOAT8_TYPE;
+
+	char* chrX = new char[sizeof(double)];
+	double swappedDoubleX = TeConvertToBigEndian(node.location().x_);
+	memcpy(chrX, &swappedDoubleX, sizeof(double));
+
+	char* chrY = new char[sizeof(double)];
+	double swappedDoubleY = TeConvertToBigEndian(node.location().y_);
+	memcpy(chrY, &swappedDoubleY, sizeof(double));
+
+	string strOid = escapeSequence(node.objectId());
+	paramValues[0] = strOid.c_str();
+
+	paramValues[1] = binaryBox;
+
+	paramValues[2] = chrX;
+
+	paramValues[3] = chrY;
+	
+	paramLengths[0] = 0;
+	paramLengths[1] = sizeBinaryBox;
+	paramLengths[2] = sizeof(double);
+	paramLengths[3] = sizeof(double);
+	
+	paramFormats[0] = 0;
+	paramFormats[1] = 1;
+	paramFormats[2] = 1;
+	paramFormats[3] = 1;
+	
+	
+	string command = "UPDATE " + table + " SET ";
+    command += "  object_id = $1";
+    command += ", spatial_box = $2";
+	command += ", x = $3";
+	command += ", y = $4";
+    command += " WHERE geom_id = " + Te2String(node.geomId());
+		
+	int result = tepg_connection_.exec_cmd_params(command.c_str(),
+                    nParams,
+                    paramTypes,
+                    paramValues,
+                    paramLengths,
+                    paramFormats,
+                    0);
+
+	delete [] binaryBox;
+	delete [] chrX;
+	delete [] chrY;
+
+	return (result == 1);
+
+}
+
+bool TePostgreSQL::insertCell(const string& table, TeCell &c)
+{
+	errorMessage_ = "";
+
+	unsigned int sizeBinaryBox = 0;
+	char* binaryBox = TeBoxToPGBinary(c.box(), sizeBinaryBox);
+
+	int nParams = 4;
+	Oid paramTypes[4];
+	const char *paramValues[4];
+	int paramLengths[4];
+	int paramFormats[4];
+	
+	//tipos dos par�metros
+	paramTypes[0] = PG_VARCHAR_TYPE;
+	paramTypes[1] = PG_BOX_TYPE;
+	paramTypes[2] = PG_INT4_TYPE;
+	paramTypes[3] = PG_INT4_TYPE;
+
+	string strOid = escapeSequence(c.objectId());
+	paramValues[0] = strOid.c_str();
+
+	paramValues[1] = binaryBox;
+
+	string strCol = Te2String(c.column());
+	paramValues[2] = strCol.c_str();		
+
+	string strRow = Te2String(c.line());
+	paramValues[3] = strRow.c_str();		
 
-bool TePostgreSQL::insertCell(const string& table, TeCell &c)
-{
-	errorMessage_ = "";
+	
+	paramLengths[0] = 0;
+	paramLengths[1] = sizeBinaryBox;
+	paramLengths[2] = 0;
+	paramLengths[3] = 0;
+	
+	paramFormats[0] = 0;
+	paramFormats[1] = 1;
+	paramFormats[2] = 0;
+	paramFormats[3] = 0;
+	
+	
+	string command  = "INSERT INTO " + table + " (object_id, spatial_box, col_number, row_number)";
+	command += " VALUES($1, $2, $3, $4)";
+		
+	int result = tepg_connection_.exec_cmd_params(command.c_str(),
+                    nParams,
+                    paramTypes,
+                    paramValues,
+                    paramLengths,
+                    paramFormats,
+                    0);
 
-	string sql  = "INSERT INTO " + table + " (object_id, lower_x, lower_y, upper_x, upper_y, col_number, row_number) VALUES('";
-		   sql += c.objectId();
-		   sql += "', ";
-		   sql += Te2String(c.box().x1_);
-		   sql += ", ";
-		   sql += Te2String(c.box().y1_);
-		   sql += ", ";
-		   sql += Te2String(c.box().x2_);
-		   sql += ", ";
-		   sql += Te2String(c.box().y2_);
-		   sql += ", ";
-		   sql += Te2String(c.column());
-		   sql += ", ";
-		   sql += Te2String(c.line());
-		   sql += ")";
+	delete [] binaryBox;
 
-	if(!this->execute(sql))
+	if(result != 1)
 		return false;
 
-	sql = "SELECT currval('" + table + "_geom_id_seq')";
+	string sql = "SELECT currval('" + table + "_geom_id_seq')";
 	TePGRecordset rec;
 	rec.open(sql, &tepg_connection_);
 	if(rec.recordCount() > 0)
@@ -2446,6 +2970,20 @@ bool TePostgreSQL::insertCell(const string& table, TeCell &c)
 	return true;
 }
 
+bool TePostgreSQL::updateCell(const string& table, TeCell &c)
+{
+	TeBox b = c.box();
+
+	string sql;
+	sql = "UPDATE " + table + " SET ";
+	sql += "spatial_box = '" + PGBoxRtree_encode(b) + "', ";
+	sql += "col_number=" + Te2String(c.column()) + ", ";
+	sql += "row_number=" + Te2String(c.line());
+	sql += " WHERE geom_id = " + c.geomId();
+	
+	return (this->execute(sql));
+}
+
 bool TePostgreSQL::insertRasterBlock(const string& table, const string& blockId, const TeCoord2D& ll, const TeCoord2D& ur, unsigned char* buf, unsigned long size, int band, unsigned int res, unsigned int subband)
 {
 	errorMessage_ = "";
@@ -2492,29 +3030,17 @@ bool TePostgreSQL::insertRasterBlock(const string& table, const string& blockId,
 	if(!execute(sql))
 	{
 		TePGConnection::freeMem(newbuf);
+		newbuf = NULL;
 		errorMessage_ = "Couldn't insert/update a rasterblock!";
 		return false;
 	}
 
 	TePGConnection::freeMem(newbuf);
+	newbuf = NULL;
 
 	return true;
 }
 
-bool TePostgreSQL::createLUTTable(const string& name)
-{
-	errorMessage_ = "";
-
-	string create = "CREATE TABLE " + name + "(";
-	create += "index_id		SERIAL,";
-	create += "r_val		INTEGER NOT NULL,";
-	create += "g_val		INTEGER NOT NULL,";
-	create += "b_val		INTEGER NOT NULL,";
-	create += "PRIMARY KEY (index_id))";
-	
-	return execute(create);
-}
-
 string TePostgreSQL::getSQLStatistics(TeGroupingAttr& attrs)
 {
 	string sql = "";
@@ -2711,7 +3237,7 @@ string TePostgreSQL::getAutoNumberSQL(const string& table)
 	string sql = "SELECT adsrc FROM pg_class, pg_attrdef  WHERE lower(pg_class.relname) = lower('" + table + "') AND pg_attrdef.adnum = 1 AND pg_class.oid = pg_attrdef.adrelid";
 
 	if(!rec.open(sql, &tepg_connection_))
-		return false;
+		return "";
 
 	if(rec.recordCount() > 0)
 	{
@@ -2721,6 +3247,11 @@ string TePostgreSQL::getAutoNumberSQL(const string& table)
 		return "";
 }
 
+string TePostgreSQL::getSQLTime(TeTime& time)
+{
+	return "'" + time.getDateTime("YYYYsMMsDDsHHsmmsSS", "-") + "'";
+}
+
 string TePostgreSQL::concatValues(vector<string>& values, const string& unionString)
 {
 	string concat = "";
@@ -2755,26 +3286,210 @@ string TePostgreSQL::toUpper(const string& value)
 	return result;
 }
 
+string TePostgreSQL::leftString(const string& name, const int& length)
+{
+    string substringClause = "SUBSTRING(" + name+ ", 1, " + Te2String(length) + ")";
+    return substringClause;
+}
+
+bool TePostgreSQL::locateCell(const string& table, TeCoord2D& pt, TeCell& c, const double& tol)
+{
+	TeDatabasePortal* portal = this->getPortal();
+
+	TeBox box (pt.x()-tol,pt.y()-tol,pt.x()+tol,pt.y()+tol);
+
+
+	string sql  ="SELECT * FROM ";
+	       sql += table;
+		   sql += " WHERE ";
+		   sql += this->getSQLBoxWhere(box, TeCELLS);
+
+	if(!portal->query(sql, TeSERVERSIDE, TeUNIDIRECTIONAL, TeREADONLY, TeBINARYCURSOR) || !portal->fetchRow())
+	{
+		delete portal;
+		return false;
+	}
+
+	portal->fetchGeometry(c);
+
+	delete portal;
+
+	return true;
+}
+
+bool TePostgreSQL::createSpatialIndex(const string& table, const string& column, TeSpatialIndexType /* type */, short /* level */, short /* tile */)
+{
+	string create = "CREATE INDEX sp_idx_gist_" + table + " ON " + table + " USING GIST (" + column + " " + gistBoxOps_ + ")";
+
+	return this->execute(create);
+}
+
+string TePostgreSQL::getSQLBoxWhere(TeBox &box, TeGeomRep rep)
+{
+	if(rep == TeTEXT)
+		return TeDatabase::getSQLBoxWhere(box, rep);
+
+	string colname = "spatial_box";
+
+	if(rep & TeRASTER)
+		colname = "block_box";
+	
+
+	string urx = Te2String(box.x2(), 15);
+	string llx = Te2String(box.x1(), 15);
+	string ury = Te2String(box.y2(), 15);
+	string lly = Te2String(box.y1(), 15);
+
+	string wherebox  = " ( " + colname + " && '(" + urx + ", " + ury + ", " + llx + ", " + lly + ")'::box)";
+
+	return wherebox;
+}
+
+string TePostgreSQL::getSQLBoxWhere(const string& table1, const string& table2, TeGeomRep rep2, TeGeomRep rep1)
+{
+	if((rep1 == TeTEXT) || (rep2 == TeTEXT))
+	{
+		return TeDatabase::getSQLBoxWhere(table1, table2, rep2, rep1);
+	}
+	else
+	{
+		string col1name = "spatial_box";
+		string col2name = "spatial_box";;
+
+		if(rep1 & TeRASTER)
+			col1name = "block_box";
+
+		if(rep2 & TeRASTER)
+			col2name = "block_box";
+
+		string wherebox  = "(";
+		       wherebox += table1;
+               wherebox += "." + col1name + " && ";
+               wherebox += table2;
+               wherebox += "." + col2name + ")";
+
+	   return wherebox;
+	}
+}
+
+string TePostgreSQL::getSQLBoxSelect(const string& tableName, TeGeomRep rep)
+{
+	if(rep == TeTEXT)
+	{
+		return TeDatabase::getSQLBoxSelect(tableName, rep);
+	}
+	else
+	{
+		string colname = "spatial_box";
+
+		if(rep & TeRASTER)
+			colname = "block_box";
+
+		string select  = tableName + ".* , ";
+			   select += "((" + tableName + "." + colname + "[1])[0]) as lower_x, ";
+			   select += "((" + tableName + "." + colname + "[1])[1]) as lower_y, ";
+			   select += "((" + tableName + "." + colname + "[0])[0]) as upper_x, ";
+			   select += "((" + tableName + "." + colname + "[0])[1]) as upper_y ";
+
+		return select;
+	}
+}
+
+bool TePostgreSQL::getMBRGeom(string tableGeom, string object_id, TeBox& box, string colGeom)
+{		
+	TeDatabasePortal* portal = getPortal();
+
+	if(!portal)
+		return false;
+
+	string sel  = "SELECT MIN(";
+	       sel += "((" + tableGeom + "." + colGeom + "[1])[0])), MIN(";
+           sel += "((" + tableGeom + "." + colGeom + "[1])[1])), MAX(";
+           sel += "((" + tableGeom + "." + colGeom + "[0])[0])), MAX(";
+           sel += "((" + tableGeom + "." + colGeom + "[0])[1])) ";
+           sel += " FROM " + tableGeom;
+           sel += " WHERE object_id = '" + object_id + "'";
+
+	if(!(portal->query(sel)) || !(portal->fetchRow()))
+	{
+		delete portal;
+
+		return false;
+	}
+		
+	double xmin = portal->getDouble(0);
+	double ymin = portal->getDouble(1);
+	double xmax = portal->getDouble(2);
+	double ymax = portal->getDouble(3);
+				
+	TeBox bb(xmin, ymin, xmax, ymax);
+
+	box = bb;
+
+	delete portal;
+
+	return true;
+}
+
+bool TePostgreSQL::getMBRSelectedObjects(string geomTable, string colGeom, string fromClause, string whereClause, string afterWhereClause, TeGeomRep repType, TeBox& bout, const double& tol)
+{
+	if(repType == TeTEXT)
+		return TeDatabase::getMBRSelectedObjects(geomTable, colGeom, fromClause, whereClause, afterWhereClause, repType, bout, tol);
+
+	TeDatabasePortal* portal = getPortal();
+	
+	if (!portal)
+		return false;
+
+	colGeom = "spatial_box";
+
+	if(repType & TeRASTER)
+		colGeom = "block_box";
+
+	string sel  = "SELECT MIN(";
+	       sel += "((" + geomTable + "." + colGeom + "[1])[0])), MIN(";
+           sel += "((" + geomTable + "." + colGeom + "[1])[1])), MAX(";
+           sel += "((" + geomTable + "." + colGeom + "[0])[0])), MAX(";
+           sel += "((" + geomTable + "." + colGeom + "[0])[1])) ";
+           sel += " FROM " + fromClause;
+
+	if(!whereClause.empty())
+		sel += " WHERE " + whereClause;  
+	
+	if(!(portal->query(sel)) || !(portal->fetchRow())) 
+	{
+		delete portal;
+
+		return false;
+	}
+
+	double xmin = portal->getDouble(0);
+	double ymin = portal->getDouble(1);
+	double xmax = portal->getDouble(2);
+	double ymax = portal->getDouble(3);
+
+	TeBox b(xmin, ymin, xmax, ymax);
+
+	bout = b;
+	
+	delete portal;
+
+	return true;
+}
+
 void TePostgreSQL::getInsertRasterBlock(const string& table, const string& blockId, const TeCoord2D& ll, const TeCoord2D& ur, const int& band, const unsigned int& res, const unsigned int& subband, char* buf, const unsigned long& size, string& sql)
 {
-	sql += "INSERT INTO " + table + " (block_id, lower_x, lower_y, upper_x, upper_y, band_id, resolution_factor, subband, spatial_data, block_size) VALUES('";
+	sql += "INSERT INTO " + table + " (block_id, block_box, band_id, resolution_factor, subband, spatial_data, block_size) VALUES('";
 	sql += blockId;
+	sql += "', '";
+	sql += PGBoxRtree_encode(TeBox(ll, ur));
 	sql += "', ";
-	sql += Te2String(ll.x_);
-	sql += ", ";
-	sql += Te2String(ll.y_);
-	sql += ", ";
-	sql += Te2String(ur.x_);
-	sql += ", ";
-	sql += Te2String(ur.y_);
-	sql += ", ";
 	sql += Te2String(band);
 	sql += ", ";
 	sql += Te2String(res);
 	sql += ", ";
 	sql += Te2String(subband);
-	sql += ", '";
-	//sql += Te2String(obj_oid);
+	sql += ", E'";
 	sql += buf;
 	sql += "', ";
 	sql += Te2String(size);
@@ -2787,21 +3502,15 @@ void TePostgreSQL::getUpdateRasterBlock(const string& table, const string& block
 {
 	sql += "UPDATE ";
 	sql += table;
-	sql += " SET lower_x = ";
-	sql += Te2String(ll.x_);
-	sql += ", lower_y = ";
-	sql += Te2String(ll.y_);
-	sql += ", upper_x = ";
-	sql += Te2String(ur.x_);
-	sql += ", upper_y = ";
-	sql += Te2String(ur.y_);
-	sql += ", band_id = ";
+	sql += " SET block_box = '";
+	sql += PGBoxRtree_encode(TeBox(ll, ur));
+	sql += "', band_id = ";
 	sql += Te2String(band);
 	sql += ", resolution_factor = ";
 	sql += Te2String(res);
 	sql += ", subband = ";
 	sql += Te2String(subband);
-	sql += ", spatial_data = '";
+	sql += ", spatial_data = E'";
 	//sql += Te2String(static_cast<long>(obj_oid));;
 	sql += buf;
 	sql += "', block_size = ";
@@ -2828,6 +3537,43 @@ string TePostgreSQL::escapeSequence(const string& from)
 	return str;
 }
 
+string TePostgreSQL::getSpatialIdxColumn(TeGeomRep rep)
+{
+	if(rep == TeRASTER)
+		return "block_box";
+
+	return "spatial_box";
+}
+
+bool TePostgreSQL::beginTransaction()
+{
+	transactionCounter_++;
+
+	if (transactionCounter_ > 1)
+		return true;
+	else
+		return tepg_connection_.beginTransaction();
+}
+
+bool TePostgreSQL::commitTransaction()
+{
+	transactionCounter_--;
+
+	if (transactionCounter_ > 0)
+		return true;
+	else
+		return tepg_connection_.commitTransaction();
+}
+
+bool TePostgreSQL::rollbackTransaction()
+{
+	transactionCounter_--;
+
+	if (transactionCounter_ > 0)
+		return true;
+	else
+		return tepg_connection_.rollBackTransaction();
+}
 
 //----- TePostgreSQLPortal methods ---
 TePostgreSQLPortal::TePostgreSQLPortal() : con_(0), curRow_(-1)
@@ -2846,20 +3592,14 @@ TePostgreSQLPortal::~TePostgreSQLPortal()
 	con_ = 0;
 }
 
-bool TePostgreSQLPortal::query(const string &qry, TeCursorLocation l, TeCursorType t, TeCursorEditType /*e*/, TeCursorDataType dt)
+bool TePostgreSQLPortal::query(const string &qry, TeCursorLocation l, TeCursorType t, TeCursorEditType /* e */, TeCursorDataType dt)
 {
 	errorMessage_ = "";
 
 	freeResult();	
-		
-	
-	if(!tepg_recordset_.open(qry, con_, t, l, dt))
-	//{
-	//	TeWriteToFile("QUERYS.SQL", qry + "\n", "a");
 
+	if(!tepg_recordset_.open(qry, con_, t, l, dt))
 		return false;
-	//}
-
 
 	numRows_ = tepg_recordset_.recordCount();
 
@@ -2895,6 +3635,9 @@ bool TePostgreSQLPortal::query(const string &qry, TeCursorLocation l, TeCursorTy
 			case 1186:  //interval
 			case 1266:	//
 						attribute.rep_.type_ = TeDATETIME;
+						attribute.dateTimeFormat_ = "YYYYsMMsDDsHHsmmsSS24";
+						attribute.dateChronon_ = TeSECOND;
+						attribute.dateSeparator_ = "-";	
 						break;
 
 			//case 26:    //OID
@@ -2903,6 +3646,7 @@ bool TePostgreSQLPortal::query(const string &qry, TeCursorLocation l, TeCursorTy
 						break;
 			case 1042:
 						attribute.rep_.type_ = TeCHARACTER;
+						break;
 
 			case 1043:  //varchar(n)
 			case 25:    //text
@@ -2916,7 +3660,11 @@ bool TePostgreSQLPortal::query(const string &qry, TeCursorLocation l, TeCursorTy
 
 		attribute.rep_.name_ = tepg_recordset_.fieldName(i);
 		pair<int, int> len(tepg_recordset_.fieldSize(i), tepg_recordset_.fieldSizeFractionaryPart(i));
-		attribute.rep_.numChar_ = len.first + len.second;
+		
+		if(nType != 25) //text
+		{
+			attribute.rep_.numChar_ = len.first + len.second;
+		}
 		attList_.push_back(attribute);
 	}
 
@@ -2950,15 +3698,8 @@ bool TePostgreSQLPortal::fetchRow(int i)
 {
 	errorMessage_ = "";
 
-	//if(tepg_recordset_.recordCount() == 0)
-	//{
-	//	errorMessage_ = "The PostgreSQL portal is empty!";
-	//	return false;
-	//}
-
-	curRow_ = i;
-	return tepg_recordset_.moveTo(i + 1);
-	//return true;
+	curRow_ = i + 1;
+	return tepg_recordset_.moveTo(curRow_);
 }
 
 void TePostgreSQLPortal::freeResult()
@@ -3085,7 +3826,7 @@ bool TePostgreSQLPortal::getBool(const string& s)
 
 	try
 	{
-		if(tepg_recordset_.getInt(s))
+		if(tepg_recordset_.getBool(s))
 			return true;
 		else
 			return false;
@@ -3123,7 +3864,7 @@ TeTime TePostgreSQLPortal::getDate(int i)
 {
 	string s = getData(i);
 
-	TeTime t(s, TeSECOND, "YYYYsMMsDDsHHsmmsSS"); 
+	TeTime t(s, TeSECOND, "YYYYsMMsDDsHHsmmsSS", "-"); 
 
 	return t;
 }
@@ -3132,7 +3873,7 @@ TeTime TePostgreSQLPortal::getDate(const string& s)
 {
 	string ss = getData(s);
 
-	TeTime t(ss, TeSECOND, "YYYYsMMsDDsHHsmmsSS"); 
+	TeTime t(ss, TeSECOND, "YYYYsMMsDDsHHsmmsSS", "-"); 
 
 	return t;
 }
@@ -3215,7 +3956,7 @@ bool TePostgreSQLPortal::fetchGeometry(TePolygon& pol)
 
 	while(fetchRow())
 	{
-		if(atoi(this->getData("parent_id")) == parentId)
+		if(this->getInt("parent_id") == parentId)
 		{
 			int dummy;
 
@@ -3229,6 +3970,35 @@ bool TePostgreSQLPortal::fetchGeometry(TePolygon& pol)
 	return false;
 }
 
+bool TePostgreSQLPortal::fetchGeometry(TePolygon& pol, const unsigned int& initIndex)
+{
+	errorMessage_ = "";
+
+	int numberOfHoles;
+
+	TeLinearRing ring = this->getLinearRing(numberOfHoles, initIndex);
+
+	pol.objectId(ring.objectId());
+	pol.geomId(ring.geomId());
+	pol.add(ring);
+	int parentId = pol.geomId();
+
+	while(fetchRow())
+	{
+		if(this->getInt(initIndex+4) == parentId)
+		{
+			int dummy;
+
+			TeLinearRing ring = getLinearRing(dummy, initIndex);
+			pol.add(ring);
+		}
+		else
+			return true;
+	}
+
+	return false;
+}
+
 bool TePostgreSQLPortal::fetchGeometry(TeLine2D& line)
 {
 	errorMessage_ = "";
@@ -3237,7 +4007,24 @@ bool TePostgreSQLPortal::fetchGeometry(TeLine2D& line)
 
 	int geomId = tepg_recordset_.getInt("geom_id");
 
-	string objectId = tepg_recordset_.value("object_id");
+	string objectId = tepg_recordset_.getData("object_id");
+
+	line.objectId(objectId);
+	
+	line.geomId(geomId);
+
+	return fetchRow();
+}
+
+bool TePostgreSQLPortal::fetchGeometry(TeLine2D& line, const unsigned int& initIndex )
+{
+	errorMessage_ = "";
+
+	tepg_recordset_.getPGLine2D(initIndex+5, line); //spatial_data
+
+	int geomId = tepg_recordset_.getInt(initIndex);
+
+	string objectId = tepg_recordset_.getData(initIndex+1);
 
 	line.objectId(objectId);
 	
@@ -3259,21 +4046,47 @@ bool TePostgreSQLPortal::fetchGeometry(TeNode& n)
 	return fetchRow();
 }
 
+bool TePostgreSQLPortal::fetchGeometry(TeNode& n, const unsigned int& initIndex)
+{
+	errorMessage_ = "";
+	
+	TeCoord2D pt(getDouble(initIndex+3), getDouble(initIndex+4)); 
+
+	n.add(pt);
+	n.geomId(atoi(getData(initIndex)));
+	n.objectId(string(getData(initIndex+1)));
+
+	return fetchRow();
+}
+
 bool TePostgreSQLPortal::fetchGeometry(TePoint& p)
 {
 	errorMessage_ = "";
 
-	p.location().setXY(getDouble("x"), getDouble("y"));
+	TeCoord2D c(getDouble("x"), getDouble("y"));
+	p.add(c);
 	p.geomId(atoi(getData("geom_id")));
 	p.objectId(string(getData("object_id")));
 	
 	return fetchRow();
 }
 
+bool TePostgreSQLPortal::fetchGeometry(TePoint& p, const unsigned int& initIndex)
+{
+	errorMessage_ = "";
+
+	TeCoord2D c(getDouble(initIndex+3), getDouble(initIndex+4));
+	p.add(c);
+	p.geomId(atoi(getData(initIndex)));
+	p.objectId(string(getData(initIndex+1)));
+	
+	return fetchRow();
+}
+
 TeLinearRing TePostgreSQLPortal::getLinearRing(int& numberOfHoles)
 {
 	int geomId = tepg_recordset_.getInt("geom_id");
-	string objectId = tepg_recordset_.value("object_id");
+	string objectId = tepg_recordset_.getData("object_id");
 
 	numberOfHoles = tepg_recordset_.getInt("num_holes");	
 
@@ -3290,6 +4103,26 @@ TeLinearRing TePostgreSQLPortal::getLinearRing(int& numberOfHoles)
 	return ring;
 }
 
+TeLinearRing TePostgreSQLPortal::getLinearRing(int& numberOfHoles, const unsigned int& initIndex)
+{
+	int geomId = tepg_recordset_.getInt(initIndex);
+	string objectId = tepg_recordset_.getData(initIndex+1);
+
+	numberOfHoles = tepg_recordset_.getInt(initIndex+3);	
+
+	TeLine2D line;
+
+	tepg_recordset_.getPGLine2D(initIndex+7, line); //spatial_data
+
+	TeLinearRing ring = line;
+
+	ring.objectId(objectId);
+	
+	ring.geomId(geomId);
+
+	return ring;
+}
+
 string TePostgreSQLPortal::escapeSequence(const string& from)
 {
 	size_t newLen = 0;
@@ -3302,3 +4135,36 @@ string TePostgreSQLPortal::escapeSequence(const string& from)
 
 	return str;
 }
+
+bool TePostgreSQLPortal::fetchGeometry(TeCell& cell)
+{
+	errorMessage_ = "";
+
+	TeBox b;
+	tepg_recordset_.getPGBox("spatial_box", b);
+
+	cell.geomId(tepg_recordset_.getInt("geom_id"));
+	cell.objectId(tepg_recordset_.getData("object_id"));
+	cell.setBox (b);
+	cell.column(tepg_recordset_.getInt("col_number"));
+	cell.line(tepg_recordset_.getInt("row_number"));
+
+	return fetchRow();
+}
+
+bool TePostgreSQLPortal::fetchGeometry(TeCell& cell, const unsigned int& initIndex)
+{
+	errorMessage_ = "";
+
+	TeBox b;
+	tepg_recordset_.getPGBox(initIndex+2, b);
+
+	cell.geomId(tepg_recordset_.getInt(initIndex));
+	cell.objectId(tepg_recordset_.getData(initIndex+1));
+	cell.setBox (b);
+	cell.column(tepg_recordset_.getInt(initIndex+3));
+	cell.line(tepg_recordset_.getInt(initIndex+4));
+
+	return fetchRow();
+}
+
diff --git a/src/terralib/drivers/PostgreSQL/TePostgreSQL.h b/src/terralib/drivers/PostgreSQL/TePostgreSQL.h
old mode 100644
new mode 100755
index 30f108f..95c2d0e
--- a/src/terralib/drivers/PostgreSQL/TePostgreSQL.h
+++ b/src/terralib/drivers/PostgreSQL/TePostgreSQL.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,23 +20,14 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
-/*! \file TePostgreSQL.h
-    This file contains a database driver to access PostgreSQL server.
- */
-
-/**
-  *@author Gilberto Ribeiro de Queiroz - gribeiro at dpi.inpe.br
-  */
-
-/**
-  *@description This file contains the especifics routines of PostgreSQL.
-  */
+/*!
+ \file TePostgreSQL.h
+ \brief This file contains the especifics routines of PostgreSQL.
+*/
 
 /*
- * TODO: 01. Implementar o alterTable que n�o pode simplesmente alterar o tipo da coluna
- *		 02. No m�todo query do portal, determinar os campos que fazem parte da chave prim�ria
- *       03. Insert Blob
+ * TODO: 01. Implementar o alterTable que nao pode simplesmente alterar o tipo da coluna
+ *		 02. No metodo query do portal, determinar os campos que fazem parte da chave primaria
  *
  */
 
@@ -45,13 +36,20 @@ of this library and its documentation.
 
 #include "TeDatabase.h"
 #include "TePGInterface.h"
+#include <TeDatabaseFactory.h>
 
 
 class TePostgreSQLPortal;
 
 //! PostgreSQL database access class.
 /*!
-	This class contains the implementation of common methods for TerraLib access PostgreSQL.    
+	This class contains the implementation of common methods for TerraLib access PostgreSQL.   
+	\note MAKE SURE you have UPGRADE your PostgreSQL database before use this driver.
+    If you need to upgrade without use TerraView, please look at 
+    TeUpdateDBVersion.cpp for the routines: updateDB302To310 and PostgreSQLUpdateDB302To310,
+    for a tip on how to upgrade by yourself.
+    \author Gilberto Ribeiro de Queiroz <gribeiro at dpi.inpe.br>    
+
  */	
 class TePostgreSQL : public TeDatabase
 {
@@ -69,13 +67,13 @@ class TePostgreSQL : public TeDatabase
 		string errorMessage();
 
 		//! Creates a new database based on "template1" and open a connection to the new one
-		virtual bool newDatabase(const string& database, const string& user, const string& password, const string& host, const int& port = 0, bool terralibModel=true);
+		virtual bool newDatabase(const string& database, const string& user, const string& password, const string& host, const int& port = -1, bool terralibModel=true);
 
 		//! Opens a conection to a database server
-		virtual bool connect(const string& host, const string& user, const string& password, const string& database, int port = 0);
+		virtual bool connect(const string& host, const string& user, const string& password, const string& database, int port = -1);
 
 		//! Show the server databases (only for MySQL, Oracle and PostgreSQL)
-		virtual bool showDatabases(const string& host, const string& user, const string& password, vector<string>& dbNames, int port = 0);
+		virtual bool showDatabases(const string& host, const string& user, const string& password, vector<string>& dbNames, int port = -1);
 
 		//! Closes the conection
 		void close(void);
@@ -89,10 +87,10 @@ class TePostgreSQL : public TeDatabase
 	    bool columnExist(const string& table, const string& column, TeAttribute& attr);
 
 		//! Creates a generic table
-		bool createTable(const string& table, TeAttributeList &attr);
+		virtual bool createTable(const string& table, TeAttributeList &attr);
 
 		//! Adds an attribute field
-		bool addColumn(const string& table, TeAttributeRep &rep);
+		virtual bool addColumn(const string& table, TeAttributeRep &rep);
 
 		//! Creates a reationship between two tables
 		bool createRelation(const string& relName, const string& table, const string& fieldName, const string& relatedTable, const string& relatedField, bool cascadeDeletion);
@@ -100,108 +98,42 @@ class TePostgreSQL : public TeDatabase
 		//! Checks if a relation exist
 		TeDBRelationType existRelation(const string& tableName, const string& relName);
 
-		//! Executes a SQL command that doesn�t return a record set tipically a data definition comand
+		//! Executes a SQL command that doesnt return a record set tipically a data definition comand
 		bool execute(const string &sql);
 
 		//! Returns a portal associated to this database
 		virtual TeDatabasePortal* getPortal();
 
-		//! Creates a table to store version database information 
-		virtual bool createDatabaseTable();
-
-		//! Creates a table to stores projections
-		bool createProjectionTable();
-
-		//! Creates a table to store Layers information
-		bool createLayerTable();
-
-		//! Creates a table to store Representations information
-		bool createRepresentationTable();
-
-		//! Creates a table to store Views information
-		bool createViewTable();
-
-		//! Creates a table to store Themes information
-		bool createThemeTable();
-
-		//! Creates a table to store the groupings associated with a theme
-	    bool createGroupingTable();
-
-		//! Creates a table to store information about the attribute tables used by a theme
-		bool createThemeTablesTable();
-
-		//! Creates a table to store legends
-		bool createLegendTable();
-
-		//! Creates a table to store visual definitions
-		bool createVisualTable();
-
-		//! Creates a table to store raster visual definitions
-		bool createVisualRasterTable();
-
-		//! Creates a table to store information about the non-spatial tables associated to this layer
-		bool createLayerTableTable();
-
-		//! Creates a table to store information about the external tables related to non-spatial tables of layers
-		bool createTablesRelationTable();
-
-		//! Creates a table for a polygon geometries
-		virtual bool createPolygonGeometry(const string& tableName);
-
-		//! Creates a table for line geometries
-		virtual bool createLineGeometry(const string& tableName);
-
-		//! Creates a table for point geometries
-		virtual bool createPointGeometry(const string& tableName);
-
-		//! Creates a table for cell geometries
-		virtual bool createCellGeometry(const string& tableName);
-
-		//! Creates a table for a text geometries
-		bool createTextGeometry(const string& tableName);
-
-		//! Creates a table for a arc geometries
-		bool createArcGeometry(const string& tableName);
-
-		//! Creates a table for a node geometries
-		virtual bool createNodeGeometry(const string& tableName);
-
-		//! Creates a table for raster geometries
-		virtual bool createRasterGeometry(const string& tableName);	
-
-		//! Creates a table to store information about raster representation
-		bool createRasterMetadataTable(const string& tableName);
-
-		//! Creates a table for raster geometries
-	    virtual bool createRasterTable(const string& tableName);
-
-		//! Creates a table to store information about objects in a theme
-		bool createCollectionTable(const string& tableName);
+		//! Saves a table and its contents in the database
+		bool insertTable(TeTable &table);
 
+		//! Updates a table and its contents in the database
+		bool updateTable	(TeTable &table);
+		
 		//! Inserts information about a link to an external table
 		bool insertRelationInfo(const int tableId, const string& tField, const string& rTable, const string& rField, int& relId);
 
 		//! Insert information about a table related to a layer
 	    bool insertTableInfo(int layerId, TeTable& table, const string& user = "");
 
-		//! Saves a table and its contents in the database
-		bool insertTable(TeTable &table);
-
 		//! Alter a property of a table 
 		bool alterTable(const string& tableName, TeAttributeRep& rep, const string& oldColName="");
 
-		//! Saves a large binary objects (BLOB) in a row table 
-	    bool insertBlob (const string& tableName, const string& columnBlob, TeAttributeRep& columnId, const string& valueId, unsigned char* data, int size);
+		//! Alter a table name
+		bool alterTable(const string& oldTableName, const string& newTableName);
 
 	    //! Saves a large binary objects (BLOB) in a row table 
-	    bool insertBlob (const string& tableName, const string& columnBlob, TeAttributeRep& columnId, const string& valueId, const string& fileName);
-
+	   	bool insertBlob (const string& tableName, const string& columnBlob, const string& whereClause, unsigned char* data, int size);
+		
 		//! Insert information about a geographical projection
 		bool insertProjection(TeProjection *proj);
 
 		//! Insert information about a layer
 		bool insertLayer(TeLayer *layer);
 
+		//! Insert information about a project
+		bool insertProject(TeProject *proj);
+
 		//! Insert information about a geometrical representation
 		bool insertRepresentation(int layerId, TeRepresentation& rep);
 
@@ -215,32 +147,56 @@ class TePostgreSQL : public TeDatabase
 		bool insertThemeGroup(TeViewTree* tree);
 
 		//! Inserts theme information
-		bool insertTheme(TeTheme *theme);
+		bool insertTheme(TeAbstractTheme *theme);
 
 		//! Inserts information about a table used by a theme 
 		bool insertThemeTable(int themeId, int tableId, int relationId, int tableOrder);
 
 		//! Generate the label position (x,y) to each object of a theme
-		virtual bool generateLabelPositions(TeTheme *theme);
+		virtual bool generateLabelPositions(TeTheme *theme, const std::string& objectId = "");
 
 		//! Inserts legend information
 		bool insertLegend(TeLegendEntry *legend);		
 
+		//! Returns all polygons inside a given box
+		virtual bool loadPolygonSet(const string& table, TeBox& box, TePolygonSet& ps);
+
+		//! Returns a database portal to iterate over the polygons that are inside a given box
+		virtual TeDatabasePortal* loadPolygonSet(const string& table, TeBox& box);
+
+		//! Returns the first polygon that contais a given coordinate
+	    virtual bool locatePolygon(const string& table, TeCoord2D& pt, TePolygon& polygon, const double& tol = 0.0);		
+
+		//! Returns the polygons that contains a give coordinate
+		virtual bool locatePolygonSet  (const string& table, TeCoord2D &pt, double tol, TePolygonSet &polygons);
+
 		//! Inserts a polygon
 		virtual bool insertPolygon(const string& table, TePolygon& p);
 
 		//! Updates a polygon
 		virtual bool updatePolygon(const string& table, TePolygon& p);
 
+		virtual bool loadLineSet(const string& table, TeBox& box, TeLineSet& linSet);
+
+		virtual TeDatabasePortal* loadLineSet(const string& table, TeBox& box);
+
 		//! Inserts a line
 		virtual bool insertLine(const string& table, TeLine2D& l);
 
 		//! Updates a line
 		virtual bool updateLine(const string& table, TeLine2D& l);
 
+		//! Locates a line
+		virtual bool locateLine(const string& table, TeCoord2D& pt, TeLine2D& line, const double& tol = 0.0);
+
 		//! Inserts a point
 		virtual bool insertPoint(const string& table, TePoint& p);
 
+		virtual bool updatePoint(const string& table, TePoint& p);
+
+		//! Locates a point
+		virtual bool locatePoint(const string& table, TeCoord2D& pt, TePoint& point, const double& tol = 0.0);
+
 		//! Inserts text
 		bool insertText(const string& table, TeText& t);
 
@@ -249,16 +205,18 @@ class TePostgreSQL : public TeDatabase
 
 		//! Inserts a node
 		virtual bool insertNode(const string& table, TeNode& node);
+		virtual bool updateNode(const string& table, TeNode &node);
 
 		//! Inserts a cell
-		virtual bool insertCell(const string& table, TeCell& c);		
+		virtual bool insertCell(const string& table, TeCell& c);
+		virtual bool updateCell(const string& table, TeCell &c);
+
+		// Locates a cell
+		virtual bool locateCell(const string& table, TeCoord2D& pt, TeCell& c, const double& tol = 0.0);
 
 		//! Insert a raster block into the database
 		virtual bool insertRasterBlock(const string& table, const string& blockId, const TeCoord2D& ll, const TeCoord2D& ur, unsigned char* buf,unsigned long size, int band = 0, unsigned int res = 1, unsigned int subband = 0);
 
-		//! Creates a lookup table (used for pallete raster representations)
-		bool createLUTTable(const string& name);
-
 		//! Return a string SQL to calculate the statistics to each cell through database functions 
 		string getSQLStatistics(TeGroupingAttr& attrs);
 
@@ -271,12 +229,48 @@ class TePostgreSQL : public TeDatabase
 		//! Return the database function to generate autonumber values
 		string getAutoNumberSQL(const string& table);
 
+		//! Decodes a time structure into a time string that PostgreSQL can understand
+		string getSQLTime(TeTime& t);
+
 		//! Concat values in a vector using unionString as the join between each value
 	    string concatValues(vector<string>& values, const string& unionString);
 
 	    //! Returns the SQL function for upper case
 	    string toUpper(const string& value);
 
+		//! Returns the SQL function for substring that starts from left to right with informed length.
+        string leftString(const string& name, const int& length);
+
+		//! Creates a spatial index on column table
+		virtual bool createSpatialIndex(const string& table, const string& column, TeSpatialIndexType type = TeRTREE, short level = 0, short tile = 0);
+
+		//! Return a string that describes a where clause to return the geometries inside the box
+		virtual string getSQLBoxWhere(TeBox &box, TeGeomRep rep);
+
+		//! Returns a string that describes a where clause to return the geometries of the table2 that are inside the geometries box of the table1
+		virtual string getSQLBoxWhere(const string& table1, const string& table2, TeGeomRep rep2, TeGeomRep rep1 = TePOLYGONS);
+
+		//! Return a string SQL to be used in the clause SELECT to select the box (lower_x, lower_y, upper_x, upper_y)
+		virtual string getSQLBoxSelect(const string& tableName, TeGeomRep rep);
+
+		//! Returns the box of a specific geometry (object_id)  
+		virtual bool getMBRGeom(string tableGeom, string object_id, TeBox& box, string colGeom);
+
+		//! Return the box of a select objects set 
+		virtual bool getMBRSelectedObjects(string geomTable, string colGeom, string fromClause, string whereClause, string afterWhereClause, TeGeomRep repType, TeBox& bout, const double& tol = 0.0);
+
+		//! Returns the name of the column that wiil be the spatially indexed, for a given type of geometry table 
+		virtual string getSpatialIdxColumn(TeGeomRep rep);
+
+		//! Begins a transaction
+		bool beginTransaction(); 
+
+		//! Commits a transaction
+		bool commitTransaction();
+
+		//! Rollbacks a transaction
+		bool rollbackTransaction();
+
 	protected:
 
 		//! Returns a string with insert of a raster block
@@ -289,11 +283,17 @@ class TePostgreSQL : public TeDatabase
 		string escapeSequence(const string& from);
 
 		//! Opens a conection to a database server
-		bool realConnect(const string& host, const string& user, const string& password, const string& database, int port = 0);
+		bool realConnect(const string& host, const string& user, const string& password, const string& database, int port = -1);
 
 		//! Connection to a PostgreSQL server
 		TePGConnection tepg_connection_;
 
+		//! Choose GIST OPERATOR beteween PostgreSQL 8.0 and 8.1
+		string gistBoxOps_;
+
+		//! Keeps the number of opened transactions
+		int transactionCounter_;
+
 };
 
 
@@ -317,7 +317,7 @@ class TePostgreSQLPortal : public TeDatabasePortal
 		//! Executes a SQL query that opens a record set
 		virtual bool query(const string &qry, TeCursorLocation l = TeSERVERSIDE, TeCursorType t = TeUNIDIRECTIONAL, TeCursorEditType e = TeREADONLY, TeCursorDataType dt = TeTEXTCURSOR);
 
-		//! Fetchs the next row in a record set that should�ve been previously opened
+		//! Fetchs the next row in a record set that shouldve been previously opened
 		bool fetchRow();
 
 		//! Fetchs a particular row
@@ -374,6 +374,12 @@ class TePostgreSQLPortal : public TeDatabasePortal
 		virtual bool fetchGeometry(TeLine2D& line);
 		virtual bool fetchGeometry(TeNode& n);
 		virtual bool fetchGeometry(TePoint& p);
+		virtual	bool fetchGeometry (TeCell& cell);
+		virtual bool fetchGeometry(TePolygon& pol, const unsigned int& initIndex);
+		virtual bool fetchGeometry(TeLine2D& line, const unsigned int& initIndex);
+		virtual bool fetchGeometry(TeNode& n, const unsigned int& initIndex);
+		virtual bool fetchGeometry(TePoint& p, const unsigned int& initIndex);
+		virtual	bool fetchGeometry (TeCell& cell, const unsigned int& initIndex);
 
 
 	protected:
@@ -381,6 +387,9 @@ class TePostgreSQLPortal : public TeDatabasePortal
 		//! Return a linear ring and the number of holes in case of external ring
 		TeLinearRing getLinearRing(int& numberOfHoles);
 
+		//! Return a linear ring that begins in the portal i-th position and the number of holes in case of external ring
+		TeLinearRing getLinearRing(int& numberOfHoles, const unsigned int& i);
+
 		//! Escape special characters in a string to be used in a SQL statement
 		string escapeSequence(const string& from);
 
@@ -392,5 +401,57 @@ class TePostgreSQLPortal : public TeDatabasePortal
 
 };
 
+
+/**
+ * @brief This is the class for TePostgreSQL driver factory.
+ * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+ * @ingroup DatabaseUtils
+ */
+class TePostgreSQLFactory : public TeDatabaseFactory
+{
+  public :
+      
+    /**
+     * Default constructor
+     */
+    TePostgreSQLFactory() : TeDatabaseFactory( 
+      std::string( "PostgreSQL" ) ) {};      
+      
+    /**
+     * Default Destructor
+     */
+    ~TePostgreSQLFactory() {};
+      
+  protected :  
+  
+    /**
+     * Implementation for the abstract TeFactory::build.
+     *
+     * @param arg A const reference to the parameters used by the
+     * database.
+     * @return A pointer to the new generated database instance.
+     */
+    TeDatabase* build( const TeDatabaseFactoryParams& arg )
+    {
+      TePostgreSQL* instance_ptr = new TePostgreSQL();
+      
+      if( arg.host_ != "" ) {
+        instance_ptr->connect( arg.host_, arg.user_, arg.password_,
+          arg.database_, arg.port_ );
+      }
+  
+      return (TeDatabase*)instance_ptr;
+    }
+};
+
+namespace {
+  static TePostgreSQLFactory TePostgreSQLFactory_instance;
+}; 
+
 #endif	// __TERRALIB_INTERNAL_TePOSTGRESQL_H
 
+/*
+ *  Updates:
+ *      - 2007/03/26: Mario Rocco Added new method - string leftString(const string& name, const int& length);
+ */
+
diff --git a/src/terralib/drivers/PostgreSQL/includepg/ecpg_informix.h b/src/terralib/drivers/PostgreSQL/includepg/ecpg_informix.h
deleted file mode 100644
index 3e3fcfc..0000000
--- a/src/terralib/drivers/PostgreSQL/includepg/ecpg_informix.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * This file contains stuff needed to be as compatible to Informix as possible.
- *
- * $PostgreSQL: pgsql/src/interfaces/ecpg/include/ecpg_informix.h,v 1.16 2004/08/29 05:06:59 momjian Exp $
- */
-#ifndef _ECPG_INFORMIX_H
-#define _ECPG_INFORMIX_H
-
-#include <ecpglib.h>
-#include <pgtypes_date.h>
-#include <pgtypes_interval.h>
-#include <pgtypes_numeric.h>
-#include <pgtypes_timestamp.h>
-
-#define SQLNOTFOUND 100
-
-#define ECPG_INFORMIX_NUM_OVERFLOW	-1200
-#define ECPG_INFORMIX_NUM_UNDERFLOW -1201
-#define ECPG_INFORMIX_DIVIDE_ZERO	-1202
-#define ECPG_INFORMIX_BAD_YEAR		-1204
-#define ECPG_INFORMIX_BAD_MONTH		-1205
-#define ECPG_INFORMIX_BAD_DAY		-1206
-#define ECPG_INFORMIX_ENOSHORTDATE	-1209
-#define ECPG_INFORMIX_DATE_CONVERT	-1210
-#define ECPG_INFORMIX_OUT_OF_MEMORY -1211
-#define ECPG_INFORMIX_ENOTDMY		-1212
-#define ECPG_INFORMIX_BAD_NUMERIC	-1213
-#define ECPG_INFORMIX_BAD_EXPONENT	-1216
-#define ECPG_INFORMIX_BAD_DATE		-1218
-#define ECPG_INFORMIX_EXTRA_CHARS	-1264
-
-#ifdef __cplusplus
-extern		"C"
-{
-#endif
-
-extern int	rdatestr(date, char *);
-extern void rtoday(date *);
-extern int	rjulmdy(date, short *);
-extern int	rdefmtdate(date *, char *, char *);
-extern int	rfmtdate(date, char *, char *);
-extern int	rmdyjul(short *, date *);
-extern int	rstrdate(char *, date *);
-extern int	rdayofweek(date);
-
-extern int	rfmtlong(long, char *, char *);
-extern int	rgetmsg(int, char *, int);
-extern int	risnull(int, char *);
-extern int	rsetnull(int, char *);
-extern int	rtypalign(int, int);
-extern int	rtypmsize(int, int);
-extern int	rtypwidth(int, int);
-extern void rupshift(char *);
-
-extern int	byleng(char *, int);
-extern void ldchar(char *, int, char *);
-
-extern void ECPG_informix_set_var(int, void *, int);
-extern void *ECPG_informix_get_var(int);
-
-/* Informix defines these in decimal.h */
-int			decadd(decimal *, decimal *, decimal *);
-int			deccmp(decimal *, decimal *);
-void		deccopy(decimal *, decimal *);
-int			deccvasc(char *, int, decimal *);
-int			deccvdbl(double, decimal *);
-int			deccvint(int, decimal *);
-int			deccvlong(long, decimal *);
-int			decdiv(decimal *, decimal *, decimal *);
-int			decmul(decimal *, decimal *, decimal *);
-int			decsub(decimal *, decimal *, decimal *);
-int			dectoasc(decimal *, char *, int, int);
-int			dectodbl(decimal *, double *);
-int			dectoint(decimal *, int *);
-int			dectolong(decimal *, long *);
-
-/* Informix defines these in datetime.h */
-extern void dtcurrent(timestamp *);
-extern int	dtcvasc(char *, timestamp *);
-extern int	dtsub(timestamp *, timestamp *, interval *);
-extern int	dttoasc(timestamp *, char *);
-extern int	dttofmtasc(timestamp *, char *, int, char *);
-extern int	intoasc(interval *, char *);
-extern int	dtcvfmtasc(char *, char *, timestamp *);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif   /* ndef _ECPG_INFORMIX_H */
diff --git a/src/terralib/drivers/PostgreSQL/includepg/ecpgerrno.h b/src/terralib/drivers/PostgreSQL/includepg/ecpgerrno.h
deleted file mode 100644
index 87a30ef..0000000
--- a/src/terralib/drivers/PostgreSQL/includepg/ecpgerrno.h
+++ /dev/null
@@ -1,77 +0,0 @@
-#ifndef _ECPG_ERRNO_H
-#define _ECPG_ERRNO_H
-
-#include <errno.h>
-
-/* This is a list of all error codes the embedded SQL program can return */
-#define ECPG_NO_ERROR		0
-#define ECPG_NOT_FOUND		100
-
-/* system error codes returned by ecpglib get the correct number,
- * but are made negative
- */
-#define ECPG_OUT_OF_MEMORY	-ENOMEM
-
-/* first we have a set of ecpg messages, they start at 200 */
-#define ECPG_UNSUPPORTED		-200
-#define ECPG_TOO_MANY_ARGUMENTS		-201
-#define ECPG_TOO_FEW_ARGUMENTS		-202
-#define ECPG_TOO_MANY_MATCHES		-203
-#define ECPG_INT_FORMAT			-204
-#define ECPG_UINT_FORMAT		-205
-#define ECPG_FLOAT_FORMAT		-206
-#define ECPG_NUMERIC_FORMAT		-207
-#define ECPG_INTERVAL_FORMAT		-208
-#define ECPG_DATE_FORMAT		-209
-#define ECPG_TIMESTAMP_FORMAT		-210
-#define ECPG_CONVERT_BOOL		-211
-#define ECPG_EMPTY			-212
-#define ECPG_MISSING_INDICATOR		-213
-#define ECPG_NO_ARRAY			-214
-#define ECPG_DATA_NOT_ARRAY		-215
-#define ECPG_ARRAY_INSERT		-216
-
-#define ECPG_NO_CONN			-220
-#define ECPG_NOT_CONN			-221
-
-#define ECPG_INVALID_STMT		-230
-
-/* dynamic SQL related */
-#define ECPG_UNKNOWN_DESCRIPTOR		-240
-#define ECPG_INVALID_DESCRIPTOR_INDEX	-241
-#define ECPG_UNKNOWN_DESCRIPTOR_ITEM	-242
-#define ECPG_VAR_NOT_NUMERIC		-243
-#define ECPG_VAR_NOT_CHAR		-244
-
-/* finally the backend error messages, they start at 400 */
-#define ECPG_PGSQL			-400
-#define ECPG_TRANS			-401
-#define ECPG_CONNECT			-402
-#define ECPG_DUPLICATE_KEY		-403
-#define ECPG_SUBSELECT_NOT_ONE		-404
-
-/* for compatibility we define some different error codes for the same error
- * if adding a new one make sure to not double define it */
-#define ECPG_INFORMIX_DUPLICATE_KEY -239
-#define ECPG_INFORMIX_SUBSELECT_NOT_ONE -284
-
-/* backend WARNINGs, starting at 600 */
-#define ECPG_WARNING_UNRECOGNIZED	   -600
- /* WARNING:  (transaction aborted): queries ignored until END */
-
- /*
-  * WARNING:  current transaction is aborted, queries ignored until end of
-  * transaction block
-  */
-#define ECPG_WARNING_QUERY_IGNORED	   -601
- /* WARNING:  PerformPortalClose: portal "*" not found */
-#define ECPG_WARNING_UNKNOWN_PORTAL    -602
- /* WARNING:  BEGIN: already a transaction in progress */
-#define ECPG_WARNING_IN_TRANSACTION    -603
- /* WARNING:  AbortTransaction and not in in-progress state */
- /* WARNING:  COMMIT: no transaction in progress */
-#define ECPG_WARNING_NO_TRANSACTION    -604
- /* WARNING:  BlankPortalAssignName: portal * already exists */
-#define ECPG_WARNING_PORTAL_EXISTS	   -605
-
-#endif   /* !_ECPG_ERRNO_H */
diff --git a/src/terralib/drivers/PostgreSQL/includepg/ecpglib.h b/src/terralib/drivers/PostgreSQL/includepg/ecpglib.h
deleted file mode 100644
index 6145e79..0000000
--- a/src/terralib/drivers/PostgreSQL/includepg/ecpglib.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * this is a small part of c.h since we don't want to leak all postgres
- * definitions into ecpg programs
- */
-
-#ifndef _ECPGLIB_H
-#define _ECPGLIB_H
-
-#include "libpq-fe.h"
-#include "ecpgtype.h"
-#include <string.h>
-
-#ifndef __BEOS__
-#ifndef __cplusplus
-#ifndef bool
-#define bool char
-#endif   /* ndef bool */
-
-#ifndef true
-#define true	((bool) 1)
-#endif   /* ndef true */
-#ifndef false
-#define false	((bool) 0)
-#endif   /* ndef false */
-#endif   /* not C++ */
-#else							/* __BEOS__ */
-#include <SupportDefs.h>
-#endif   /* __BEOS__ */
-
-#ifndef TRUE
-#define TRUE	1
-#endif   /* TRUE */
-
-#ifndef FALSE
-#define FALSE	0
-#endif   /* FALSE */
-
-#ifdef __cplusplus
-extern		"C"
-{
-#endif
-
-struct sqlca_t;
-
-void		ECPGinit_sqlca(struct sqlca_t * sqlca);
-void		ECPGdebug(int, FILE *);
-bool		ECPGstatus(int, const char *);
-bool		ECPGsetcommit(int, const char *, const char *);
-bool		ECPGsetconn(int, const char *);
-bool		ECPGconnect(int, int, const char *, const char *, const char *, const char *, int);
-bool		ECPGdo(int, int, int, const char *, char *,...);
-bool		ECPGtrans(int, const char *, const char *);
-bool		ECPGdisconnect(int, const char *);
-bool		ECPGprepare(int, char *, char *);
-bool		ECPGdeallocate(int, int, char *);
-bool		ECPGdeallocate_one(int, char *);
-bool		ECPGdeallocate_all(int);
-char	   *ECPGprepared_statement(const char *);
-
-void		ECPGlog(const char *format,...);
-char	   *ECPGerrmsg(void);
-
- /* print an error message */
-void		sqlprint(void);
-
-/* define this for simplicity as well as compatibility */
-
-#define		  SQLCODE	 sqlca.sqlcode
-
-/* dynamic SQL */
-
-bool ECPGdo_descriptor(int line, const char *connection,
-				  const char *descriptor, const char *query);
-bool		ECPGdeallocate_desc(int line, const char *name);
-bool		ECPGallocate_desc(int line, const char *name);
-void		ECPGraise(int line, int code, const char *sqlstate, const char *str);
-void		ECPGraise_backend(int line, PGresult *result, PGconn *conn, int compat);
-bool		ECPGget_desc_header(int, char *, int *);
-bool		ECPGget_desc(int, char *, int,...);
-bool		ECPGset_desc_header(int, char *, int);
-bool		ECPGset_desc(int, char *, int,...);
-
-void		ECPGset_noind_null(enum ECPGttype, void *);
-bool		ECPGis_noind_null(enum ECPGttype, void *);
-bool		ECPGdescribe(int, bool, const char *,...);
-
-/* dynamic result allocation */
-void		ECPGfree_auto_mem(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif   /* _ECPGLIB_H */
diff --git a/src/terralib/drivers/PostgreSQL/includepg/ecpgtype.h b/src/terralib/drivers/PostgreSQL/includepg/ecpgtype.h
deleted file mode 100644
index 3d54402..0000000
--- a/src/terralib/drivers/PostgreSQL/includepg/ecpgtype.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * This file implements a data structure that is built and maintained by the
- * preprocessor.
- *
- * All types that can be handled for host variable declarations has to
- * be handled eventually.
- */
-
-/*
- * Here are all the types that we are to handle. Note that it is the type
- * that is registered and that has nothing whatsoever to do with the storage
- * class.
- *
- * Simple types
- * integers: char, short, int, long (signed and unsigned)
- * floats: float, double
- *
- * Complex types:
- * VARCHAR, VARCHAR2 - Strings with length (maxlen is given in the declaration)
- * Arrays of simple types and of VARCHAR, VARCHAR2 (size given in declaration)
- * Records build of simple types, arrays and other structs.
- *
- * Complicating things:
- * typedefs and struct names!
- *
- * Conclusion:
- * This is a typically recursive definition. A structure of typed list elements
- * would probably work fine:
- */
-
-#ifndef _ECPGTYPE_H
-#define _ECPGTYPE_H
-
-#ifdef __cplusplus
-extern		"C"
-{
-#endif
-
-enum ECPGttype
-{
-	ECPGt_char = 1, ECPGt_unsigned_char, ECPGt_short, ECPGt_unsigned_short,
-	ECPGt_int, ECPGt_unsigned_int, ECPGt_long, ECPGt_unsigned_long,
-	ECPGt_long_long, ECPGt_unsigned_long_long,
-	ECPGt_bool,
-	ECPGt_float, ECPGt_double,
-	ECPGt_varchar, ECPGt_varchar2,
-	ECPGt_numeric,				/* this is a decimal that stores its
-								 * digits in a malloced array */
-	ECPGt_decimal,				/* this is a decimal that stores its
-								 * digits in a fixed array */
-	ECPGt_date,
-	ECPGt_timestamp,
-	ECPGt_interval,
-	ECPGt_array,
-	ECPGt_struct,
-	ECPGt_union,
-	ECPGt_descriptor,			/* sql descriptor, no C variable */
-	ECPGt_char_variable,
-	ECPGt_const,				/* a constant is needed sometimes */
-	ECPGt_EOIT,					/* End of insert types. */
-	ECPGt_EORT,					/* End of result types. */
-	ECPGt_NO_INDICATOR			/* no indicator */
-};
-
- /* descriptor items */
-enum ECPGdtype
-{
-	ECPGd_count = 1,
-	ECPGd_data,
-	ECPGd_di_code,
-	ECPGd_di_precision,
-	ECPGd_indicator,
-	ECPGd_key_member,
-	ECPGd_length,
-	ECPGd_name,
-	ECPGd_nullable,
-	ECPGd_octet,
-	ECPGd_precision,
-	ECPGd_ret_length,
-	ECPGd_ret_octet,
-	ECPGd_scale,
-	ECPGd_type,
-	ECPGd_EODT,					/* End of descriptor types. */
-	ECPGd_cardinality
-};
-
-#define IS_SIMPLE_TYPE(type) ((type) >= ECPGt_char && (type) <= ECPGt_interval)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif   /* _ECPGTYPE_H */
diff --git a/src/terralib/drivers/PostgreSQL/includepg/libpq-fe.h b/src/terralib/drivers/PostgreSQL/includepg/libpq-fe.h
deleted file mode 100644
index f7f3797..0000000
--- a/src/terralib/drivers/PostgreSQL/includepg/libpq-fe.h
+++ /dev/null
@@ -1,503 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * libpq-fe.h
- *	  This file contains definitions for structures and
- *	  externs for functions used by frontend postgres applications.
- *
- * Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * $PostgreSQL: pgsql/src/interfaces/libpq/libpq-fe.h,v 1.116 2004/12/31 22:03:50 pgsql Exp $
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef LIBPQ_FE_H
-#define LIBPQ_FE_H
-
-#ifdef __cplusplus
-extern		"C"
-{
-#endif
-
-#include <stdio.h>
-
-/*
- * postgres_ext.h defines the backend's externally visible types,
- * such as Oid.
- */
-#include "postgres_ext.h"
-
-/* SSL type is needed here only to declare PQgetssl() */
-#ifdef USE_SSL
-#include <openssl/ssl.h>
-#endif
-
-/* Application-visible enum types */
-
-typedef enum
-{
-	/*
-	 * Although it is okay to add to this list, values which become unused
-	 * should never be removed, nor should constants be redefined - that
-	 * would break compatibility with existing code.
-	 */
-	CONNECTION_OK,
-	CONNECTION_BAD,
-	/* Non-blocking mode only below here */
-
-	/*
-	 * The existence of these should never be relied upon - they should
-	 * only be used for user feedback or similar purposes.
-	 */
-	CONNECTION_STARTED,			/* Waiting for connection to be made.  */
-	CONNECTION_MADE,			/* Connection OK; waiting to send.	   */
-	CONNECTION_AWAITING_RESPONSE,		/* Waiting for a response from the
-										 * postmaster.		  */
-	CONNECTION_AUTH_OK,			/* Received authentication; waiting for
-								 * backend startup. */
-	CONNECTION_SETENV,			/* Negotiating environment. */
-	CONNECTION_SSL_STARTUP,		/* Negotiating SSL. */
-	CONNECTION_NEEDED			/* Internal state: connect() needed */
-} ConnStatusType;
-
-typedef enum
-{
-	PGRES_POLLING_FAILED = 0,
-	PGRES_POLLING_READING,		/* These two indicate that one may	  */
-	PGRES_POLLING_WRITING,		/* use select before polling again.   */
-	PGRES_POLLING_OK,
-	PGRES_POLLING_ACTIVE		/* unused; keep for awhile for backwards
-								 * compatibility */
-} PostgresPollingStatusType;
-
-typedef enum
-{
-	PGRES_EMPTY_QUERY = 0,		/* empty query string was executed */
-	PGRES_COMMAND_OK,			/* a query command that doesn't return
-								 * anything was executed properly by the
-								 * backend */
-	PGRES_TUPLES_OK,			/* a query command that returns tuples was
-								 * executed properly by the backend,
-								 * PGresult contains the result tuples */
-	PGRES_COPY_OUT,				/* Copy Out data transfer in progress */
-	PGRES_COPY_IN,				/* Copy In data transfer in progress */
-	PGRES_BAD_RESPONSE,			/* an unexpected response was recv'd from
-								 * the backend */
-	PGRES_NONFATAL_ERROR,		/* notice or warning message */
-	PGRES_FATAL_ERROR			/* query failed */
-} ExecStatusType;
-
-typedef enum
-{
-	PQTRANS_IDLE,				/* connection idle */
-	PQTRANS_ACTIVE,				/* command in progress */
-	PQTRANS_INTRANS,			/* idle, within transaction block */
-	PQTRANS_INERROR,			/* idle, within failed transaction */
-	PQTRANS_UNKNOWN				/* cannot determine status */
-} PGTransactionStatusType;
-
-typedef enum
-{
-	PQERRORS_TERSE,				/* single-line error messages */
-	PQERRORS_DEFAULT,			/* recommended style */
-	PQERRORS_VERBOSE			/* all the facts, ma'am */
-} PGVerbosity;
-
-/* PGconn encapsulates a connection to the backend.
- * The contents of this struct are not supposed to be known to applications.
- */
-typedef struct pg_conn PGconn;
-
-/* PGresult encapsulates the result of a query (or more precisely, of a single
- * SQL command --- a query string given to PQsendQuery can contain multiple
- * commands and thus return multiple PGresult objects).
- * The contents of this struct are not supposed to be known to applications.
- */
-typedef struct pg_result PGresult;
-
-/* PGcancel encapsulates the information needed to cancel a running
- * query on an existing connection.
- * The contents of this struct are not supposed to be known to applications.
- */
-typedef struct pg_cancel PGcancel;
-
-/* PGnotify represents the occurrence of a NOTIFY message.
- * Ideally this would be an opaque typedef, but it's so simple that it's
- * unlikely to change.
- * NOTE: in Postgres 6.4 and later, the be_pid is the notifying backend's,
- * whereas in earlier versions it was always your own backend's PID.
- */
-typedef struct pgNotify
-{
-	char	   *relname;		/* notification condition name */
-	int			be_pid;			/* process ID of server process */
-	char	   *extra;			/* notification parameter */
-	/* Fields below here are private to libpq; apps should not use 'em */
-	struct pgNotify *next;		/* list link */
-} PGnotify;
-
-/* Function types for notice-handling callbacks */
-typedef void (*PQnoticeReceiver) (void *arg, const PGresult *res);
-typedef void (*PQnoticeProcessor) (void *arg, const char *message);
-
-/* Print options for PQprint() */
-typedef char pqbool;
-
-typedef struct _PQprintOpt
-{
-	pqbool		header;			/* print output field headings and row
-								 * count */
-	pqbool		align;			/* fill align the fields */
-	pqbool		standard;		/* old brain dead format */
-	pqbool		html3;			/* output html tables */
-	pqbool		expanded;		/* expand tables */
-	pqbool		pager;			/* use pager for output if needed */
-	char	   *fieldSep;		/* field separator */
-	char	   *tableOpt;		/* insert to HTML <table ...> */
-	char	   *caption;		/* HTML <caption> */
-	char	  **fieldName;		/* null terminated array of repalcement
-								 * field names */
-} PQprintOpt;
-
-/* ----------------
- * Structure for the conninfo parameter definitions returned by PQconndefaults
- *
- * All fields except "val" point at static strings which must not be altered.
- * "val" is either NULL or a malloc'd current-value string.  PQconninfoFree()
- * will release both the val strings and the PQconninfoOption array itself.
- * ----------------
- */
-typedef struct _PQconninfoOption
-{
-	char	   *keyword;		/* The keyword of the option			*/
-	char	   *envvar;			/* Fallback environment variable name	*/
-	char	   *compiled;		/* Fallback compiled in default value	*/
-	char	   *val;			/* Option's current value, or NULL		 */
-	char	   *label;			/* Label for field in connect dialog	*/
-	char	   *dispchar;		/* Character to display for this field in
-								 * a connect dialog. Values are: ""
-								 * Display entered value as is "*"
-								 * Password field - hide value "D"	Debug
-								 * option - don't show by default */
-	int			dispsize;		/* Field size in characters for dialog	*/
-} PQconninfoOption;
-
-/* ----------------
- * PQArgBlock -- structure for PQfn() arguments
- * ----------------
- */
-typedef struct
-{
-	int			len;
-	int			isint;
-	union
-	{
-		int		   *ptr;		/* can't use void (dec compiler barfs)	 */
-		int			integer;
-	}			u;
-} PQArgBlock;
-
-/* ----------------
- * Exported functions of libpq
- * ----------------
- */
-
-/* ===	in fe-connect.c === */
-
-/* make a new client connection to the backend */
-/* Asynchronous (non-blocking) */
-extern PGconn *PQconnectStart(const char *conninfo);
-extern PostgresPollingStatusType PQconnectPoll(PGconn *conn);
-
-/* Synchronous (blocking) */
-extern PGconn *PQconnectdb(const char *conninfo);
-extern PGconn *PQsetdbLogin(const char *pghost, const char *pgport,
-			 const char *pgoptions, const char *pgtty,
-			 const char *dbName,
-			 const char *login, const char *pwd);
-
-#define PQsetdb(M_PGHOST,M_PGPORT,M_PGOPT,M_PGTTY,M_DBNAME)  \
-	PQsetdbLogin(M_PGHOST, M_PGPORT, M_PGOPT, M_PGTTY, M_DBNAME, NULL, NULL)
-
-/* close the current connection and free the PGconn data structure */
-extern void PQfinish(PGconn *conn);
-
-/* get info about connection options known to PQconnectdb */
-extern PQconninfoOption *PQconndefaults(void);
-
-/* free the data structure returned by PQconndefaults() */
-extern void PQconninfoFree(PQconninfoOption *connOptions);
-
-/*
- * close the current connection and restablish a new one with the same
- * parameters
- */
-/* Asynchronous (non-blocking) */
-extern int	PQresetStart(PGconn *conn);
-extern PostgresPollingStatusType PQresetPoll(PGconn *conn);
-
-/* Synchronous (blocking) */
-extern void PQreset(PGconn *conn);
-
-/* request a cancel structure */
-extern PGcancel *PQgetCancel(PGconn *conn);
-
-/* free a cancel structure */
-extern void PQfreeCancel(PGcancel *cancel);
-
-/* issue a cancel request */
-extern int	PQcancel(PGcancel *cancel, char *errbuf, int errbufsize);
-
-/* backwards compatible version of PQcancel; not thread-safe */
-extern int	PQrequestCancel(PGconn *conn);
-
-/* Accessor functions for PGconn objects */
-extern char *PQdb(const PGconn *conn);
-extern char *PQuser(const PGconn *conn);
-extern char *PQpass(const PGconn *conn);
-extern char *PQhost(const PGconn *conn);
-extern char *PQport(const PGconn *conn);
-extern char *PQtty(const PGconn *conn);
-extern char *PQoptions(const PGconn *conn);
-extern ConnStatusType PQstatus(const PGconn *conn);
-extern PGTransactionStatusType PQtransactionStatus(const PGconn *conn);
-extern const char *PQparameterStatus(const PGconn *conn,
-				  const char *paramName);
-extern int	PQprotocolVersion(const PGconn *conn);
-extern int	PQserverVersion(const PGconn *conn);
-extern char *PQerrorMessage(const PGconn *conn);
-extern int	PQsocket(const PGconn *conn);
-extern int	PQbackendPID(const PGconn *conn);
-extern int	PQclientEncoding(const PGconn *conn);
-extern int	PQsetClientEncoding(PGconn *conn, const char *encoding);
-
-#ifdef USE_SSL
-/* Get the SSL structure associated with a connection */
-extern SSL *PQgetssl(PGconn *conn);
-#else
-extern void *PQgetssl(PGconn *conn);
-#endif
-
-/* Tell libpq whether it needs to initialize OpenSSL */
-extern void PQinitSSL(int do_init);
-
-/* Set verbosity for PQerrorMessage and PQresultErrorMessage */
-extern PGVerbosity PQsetErrorVerbosity(PGconn *conn, PGVerbosity verbosity);
-
-/* Enable/disable tracing */
-extern void PQtrace(PGconn *conn, FILE *debug_port);
-extern void PQuntrace(PGconn *conn);
-
-/* Override default notice handling routines */
-extern PQnoticeReceiver PQsetNoticeReceiver(PGconn *conn,
-					PQnoticeReceiver proc,
-					void *arg);
-extern PQnoticeProcessor PQsetNoticeProcessor(PGconn *conn,
-					 PQnoticeProcessor proc,
-					 void *arg);
-
-/*
- *	   Used to set callback that prevents concurrent access to
- *	   non-thread safe functions that libpq needs.
- *	   The default implementation uses a libpq internal mutex.
- *	   Only required for multithreaded apps that use kerberos
- *	   both within their app and for postgresql connections.
- */
-typedef void (*pgthreadlock_t) (int acquire);
-
-extern pgthreadlock_t PQregisterThreadLock(pgthreadlock_t newhandler);
-
-/* === in fe-exec.c === */
-
-/* Simple synchronous query */
-extern PGresult *PQexec(PGconn *conn, const char *query);
-extern PGresult *PQexecParams(PGconn *conn,
-			 const char *command,
-			 int nParams,
-			 const Oid *paramTypes,
-			 const char *const * paramValues,
-			 const int *paramLengths,
-			 const int *paramFormats,
-			 int resultFormat);
-extern PGresult *PQprepare(PGconn *conn, const char *stmtName,
-						   const char *query, int nParams,
-						   const Oid *paramTypes);
-extern PGresult *PQexecPrepared(PGconn *conn,
-			   const char *stmtName,
-			   int nParams,
-			   const char *const * paramValues,
-			   const int *paramLengths,
-			   const int *paramFormats,
-			   int resultFormat);
-
-/* Interface for multiple-result or asynchronous queries */
-extern int	PQsendQuery(PGconn *conn, const char *query);
-extern int PQsendQueryParams(PGconn *conn,
-				  const char *command,
-				  int nParams,
-				  const Oid *paramTypes,
-				  const char *const * paramValues,
-				  const int *paramLengths,
-				  const int *paramFormats,
-				  int resultFormat);
-extern int PQsendPrepare(PGconn *conn, const char *stmtName,
-						 const char *query, int nParams,
-						 const Oid *paramTypes);
-extern int PQsendQueryPrepared(PGconn *conn,
-					const char *stmtName,
-					int nParams,
-					const char *const * paramValues,
-					const int *paramLengths,
-					const int *paramFormats,
-					int resultFormat);
-extern PGresult *PQgetResult(PGconn *conn);
-
-/* Routines for managing an asynchronous query */
-extern int	PQisBusy(PGconn *conn);
-extern int	PQconsumeInput(PGconn *conn);
-
-/* LISTEN/NOTIFY support */
-extern PGnotify *PQnotifies(PGconn *conn);
-
-/* Routines for copy in/out */
-extern int	PQputCopyData(PGconn *conn, const char *buffer, int nbytes);
-extern int	PQputCopyEnd(PGconn *conn, const char *errormsg);
-extern int	PQgetCopyData(PGconn *conn, char **buffer, int async);
-
-/* Deprecated routines for copy in/out */
-extern int	PQgetline(PGconn *conn, char *string, int length);
-extern int	PQputline(PGconn *conn, const char *string);
-extern int	PQgetlineAsync(PGconn *conn, char *buffer, int bufsize);
-extern int	PQputnbytes(PGconn *conn, const char *buffer, int nbytes);
-extern int	PQendcopy(PGconn *conn);
-
-/* Set blocking/nonblocking connection to the backend */
-extern int	PQsetnonblocking(PGconn *conn, int arg);
-extern int	PQisnonblocking(const PGconn *conn);
-
-/* Force the write buffer to be written (or at least try) */
-extern int	PQflush(PGconn *conn);
-
-/*
- * "Fast path" interface --- not really recommended for application
- * use
- */
-extern PGresult *PQfn(PGconn *conn,
-	 int fnid,
-	 int *result_buf,
-	 int *result_len,
-	 int result_is_int,
-	 const PQArgBlock *args,
-	 int nargs);
-
-/* Accessor functions for PGresult objects */
-extern ExecStatusType PQresultStatus(const PGresult *res);
-extern char *PQresStatus(ExecStatusType status);
-extern char *PQresultErrorMessage(const PGresult *res);
-extern char *PQresultErrorField(const PGresult *res, int fieldcode);
-extern int	PQntuples(const PGresult *res);
-extern int	PQnfields(const PGresult *res);
-extern int	PQbinaryTuples(const PGresult *res);
-extern char *PQfname(const PGresult *res, int field_num);
-extern int	PQfnumber(const PGresult *res, const char *field_name);
-extern Oid	PQftable(const PGresult *res, int field_num);
-extern int	PQftablecol(const PGresult *res, int field_num);
-extern int	PQfformat(const PGresult *res, int field_num);
-extern Oid	PQftype(const PGresult *res, int field_num);
-extern int	PQfsize(const PGresult *res, int field_num);
-extern int	PQfmod(const PGresult *res, int field_num);
-extern char *PQcmdStatus(PGresult *res);
-extern char *PQoidStatus(const PGresult *res);	/* old and ugly */
-extern Oid	PQoidValue(const PGresult *res);	/* new and improved */
-extern char *PQcmdTuples(PGresult *res);
-extern char *PQgetvalue(const PGresult *res, int tup_num, int field_num);
-extern int	PQgetlength(const PGresult *res, int tup_num, int field_num);
-extern int	PQgetisnull(const PGresult *res, int tup_num, int field_num);
-
-/* Delete a PGresult */
-extern void PQclear(PGresult *res);
-
-/* For freeing other alloc'd results, such as PGnotify structs */
-extern void PQfreemem(void *ptr);
-
-/* Exists for backward compatibility.  bjm 2003-03-24 */
-#define PQfreeNotify(ptr) PQfreemem(ptr)
-
-/* Define the string so all uses are consistent. */
-#define PQnoPasswordSupplied	"fe_sendauth: no password supplied\n"
-
-/*
- * Make an empty PGresult with given status (some apps find this
- * useful). If conn is not NULL and status indicates an error, the
- * conn's errorMessage is copied.
- */
-extern PGresult *PQmakeEmptyPGresult(PGconn *conn, ExecStatusType status);
-
-
-/* Quoting strings before inclusion in queries. */
-extern size_t PQescapeString(char *to, const char *from, size_t length);
-extern unsigned char *PQescapeBytea(const unsigned char *bintext, size_t binlen,
-			  size_t *bytealen);
-extern unsigned char *PQunescapeBytea(const unsigned char *strtext,
-				size_t *retbuflen);
-
-
-
-/* === in fe-print.c === */
-
-extern void
-PQprint(FILE *fout,				/* output stream */
-		const PGresult *res,
-		const PQprintOpt *ps);	/* option structure */
-
-/*
- * really old printing routines
- */
-extern void
-PQdisplayTuples(const PGresult *res,
-				FILE *fp,		/* where to send the output */
-				int fillAlign,	/* pad the fields with spaces */
-				const char *fieldSep,	/* field separator */
-				int printHeader,	/* display headers? */
-				int quiet);
-
-extern void
-PQprintTuples(const PGresult *res,
-			  FILE *fout,		/* output stream */
-			  int printAttName, /* print attribute names */
-			  int terseOutput,	/* delimiter bars */
-			  int width);		/* width of column, if 0, use variable
-								 * width */
-
-
-/* === in fe-lobj.c === */
-
-/* Large-object access routines */
-extern int	lo_open(PGconn *conn, Oid lobjId, int mode);
-extern int	lo_close(PGconn *conn, int fd);
-extern int	lo_read(PGconn *conn, int fd, char *buf, size_t len);
-extern int	lo_write(PGconn *conn, int fd, char *buf, size_t len);
-extern int	lo_lseek(PGconn *conn, int fd, int offset, int whence);
-extern Oid	lo_creat(PGconn *conn, int mode);
-extern int	lo_tell(PGconn *conn, int fd);
-extern int	lo_unlink(PGconn *conn, Oid lobjId);
-extern Oid	lo_import(PGconn *conn, const char *filename);
-extern int	lo_export(PGconn *conn, Oid lobjId, const char *filename);
-
-/* === in fe-misc.c === */
-
-/* Determine length of multibyte encoded char at *s */
-extern int	PQmblen(const unsigned char *s, int encoding);
-
-/* Determine display length of multibyte encoded char at *s */
-extern int	PQdsplen(const unsigned char *s, int encoding);
-
-/* Get encoding id from environment variable PGCLIENTENCODING */
-extern int	PQenv2encoding(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif   /* LIBPQ_FE_H */
diff --git a/src/terralib/drivers/PostgreSQL/includepg/pg_config.h b/src/terralib/drivers/PostgreSQL/includepg/pg_config.h
deleted file mode 100644
index 4e87245..0000000
--- a/src/terralib/drivers/PostgreSQL/includepg/pg_config.h
+++ /dev/null
@@ -1,685 +0,0 @@
-/* src/include/pg_config.h.  Generated by configure.  */
-/* src/include/pg_config.h.in.  Generated from configure.in by autoheader.  */
-
-/* Define to the type of arg 1 of 'accept' */
-#define ACCEPT_TYPE_ARG1 unsigned int
-
-/* Define to the type of arg 2 of 'accept' */
-#define ACCEPT_TYPE_ARG2 struct sockaddr *
-
-/* Define to the type of arg 3 of 'accept' */
-#define ACCEPT_TYPE_ARG3 int
-
-/* Define to the return type of 'accept' */
-#define ACCEPT_TYPE_RETURN unsigned int PASCAL
-
-/* The alignment requirement of a `double'. */
-#define ALIGNOF_DOUBLE 8
-
-/* The alignment requirement of a `int'. */
-#define ALIGNOF_INT 4
-
-/* The alignment requirement of a `long'. */
-#define ALIGNOF_LONG 4
-
-/* The alignment requirement of a `long long int'. */
-#define ALIGNOF_LONG_LONG_INT 8
-
-/* The alignment requirement of a `short'. */
-#define ALIGNOF_SHORT 2
-
-/* Define to the default TCP port number on which the server listens and to
-   which clients will try to connect. This can be overridden at run-time, but
-   it's convenient if your clients have the right default compiled in.
-   (--with-pgport=PORTNUM) */
-#define DEF_PGPORT 5432
-
-/* Define to the default TCP port number as a string constant. */
-#define DEF_PGPORT_STR "5432"
-
-/* Define to 1 if you want National Language Support. (--enable-nls) */
-#define ENABLE_NLS 1
-
-/* Define to 1 to build client libraries as thread-safe code.
-   (--enable-thread-safety) */
-/* #undef ENABLE_THREAD_SAFETY */
-
-/* Define to 1 if getpwuid_r() takes a 5th argument. */
-/* #undef GETPWUID_R_5ARG */
-
-/* Define to 1 if gettimeofday() takes only 1 argument. */
-/* #undef GETTIMEOFDAY_1ARG */
-
-#ifdef GETTIMEOFDAY_1ARG
-# define gettimeofday(a,b) gettimeofday(a)
-#endif
-
-/* Define to 1 if you have the `atexit' function. */
-#define HAVE_ATEXIT 1
-
-/* Define to 1 if you have the `cbrt' function. */
-#define HAVE_CBRT 1
-
-/* Define to 1 if you have the `class' function. */
-/* #undef HAVE_CLASS */
-
-/* Define to 1 if you have the `crypt' function. */
-/* #undef HAVE_CRYPT */
-
-/* Define to 1 if you have the <crypt.h> header file. */
-/* #undef HAVE_CRYPT_H */
-
-/* Define to 1 if you have the declaration of `fdatasync', and to 0 if you
-   don't. */
-#define HAVE_DECL_FDATASYNC 0
-
-/* Define to 1 if you have the declaration of `snprintf', and to 0 if you
-   don't. */
-#define HAVE_DECL_SNPRINTF 1
-
-/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you
-   don't. */
-#define HAVE_DECL_VSNPRINTF 1
-
-/* Define to 1 if you have the <dld.h> header file. */
-/* #undef HAVE_DLD_H */
-
-/* Define to 1 if you have the `dlopen' function. */
-/* #undef HAVE_DLOPEN */
-
-/* Define to 1 if you have the <editline/history.h> header file. */
-/* #undef HAVE_EDITLINE_HISTORY_H */
-
-/* Define to 1 if you have the <editline/readline.h> header file. */
-/* #undef HAVE_EDITLINE_READLINE_H */
-
-/* Define to 1 if you have the <endian.h> header file. */
-/* #undef HAVE_ENDIAN_H */
-
-/* Define to 1 if you have the `fcvt' function. */
-#define HAVE_FCVT 1
-
-/* Define to 1 if you have the `fdatasync' function. */
-/* #undef HAVE_FDATASYNC */
-
-/* Define to 1 if you have finite(). */
-#define HAVE_FINITE 1
-
-/* Define to 1 if you have the `fpclass' function. */
-/* #undef HAVE_FPCLASS */
-
-/* Define to 1 if you have the `fp_class' function. */
-/* #undef HAVE_FP_CLASS */
-
-/* Define to 1 if you have the `fp_class_d' function. */
-/* #undef HAVE_FP_CLASS_D */
-
-/* Define to 1 if you have the <fp_class.h> header file. */
-/* #undef HAVE_FP_CLASS_H */
-
-/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
-/* #undef HAVE_FSEEKO */
-
-/* Define to 1 if your compiler understands __func__. */
-#define HAVE_FUNCNAME__FUNC 1
-
-/* Define to 1 if your compiler understands __FUNCTION__. */
-/* #undef HAVE_FUNCNAME__FUNCTION */
-
-/* Define to 1 if you have the `getaddrinfo' function. */
-/* #undef HAVE_GETADDRINFO */
-
-/* Define to 1 if you have the `gethostbyname_r' function. */
-/* #undef HAVE_GETHOSTBYNAME_R */
-
-/* Define to 1 if you have the `gethostname' function. */
-/* #undef HAVE_GETHOSTNAME */
-
-/* Define to 1 if you have the `getopt' function. */
-#define HAVE_GETOPT 1
-
-/* Define to 1 if you have the <getopt.h> header file. */
-#define HAVE_GETOPT_H 1
-
-/* Define to 1 if you have the `getopt_long' function. */
-#define HAVE_GETOPT_LONG 1
-
-/* Define to 1 if you have the `getpeereid' function. */
-/* #undef HAVE_GETPEEREID */
-
-/* Define to 1 if you have the `getpwuid_r' function. */
-/* #undef HAVE_GETPWUID_R */
-
-/* Define to 1 if you have the `getrusage' function. */
-/* #undef HAVE_GETRUSAGE */
-
-/* Define to 1 if you have the <history.h> header file. */
-/* #undef HAVE_HISTORY_H */
-
-/* Define to 1 if you have the <ieeefp.h> header file. */
-/* #undef HAVE_IEEEFP_H */
-
-/* Define to 1 if you have the `inet_aton' function. */
-/* #undef HAVE_INET_ATON */
-
-/* Define to 1 if the system has the type `int64'. */
-/* #undef HAVE_INT64 */
-
-/* Define to 1 if the system has the type `int8'. */
-/* #undef HAVE_INT8 */
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
-
-/* Define to 1 if you have the global variable 'int optreset'. */
-#define HAVE_INT_OPTRESET 1
-
-/* Define to 1 if you have the global variable 'int timezone'. */
-#define HAVE_INT_TIMEZONE 
-
-/* Define to 1 if you have support for IPv6. */
-/* #undef HAVE_IPV6 */
-
-/* Define to 1 if you have isinf(). */
-#define HAVE_ISINF 1
-
-/* Define to 1 if you have the <kernel/image.h> header file. */
-/* #undef HAVE_KERNEL_IMAGE_H */
-
-/* Define to 1 if you have the <kernel/OS.h> header file. */
-/* #undef HAVE_KERNEL_OS_H */
-
-/* Define to 1 if `e_data' is member of `krb5_error'. */
-/* #undef HAVE_KRB5_ERROR_E_DATA */
-
-/* Define to 1 if `text.data' is member of `krb5_error'. */
-/* #undef HAVE_KRB5_ERROR_TEXT_DATA */
-
-/* Define to 1 if `client' is member of `krb5_ticket'. */
-/* #undef HAVE_KRB5_TICKET_CLIENT */
-
-/* Define to 1 if `enc_part2' is member of `krb5_ticket'. */
-/* #undef HAVE_KRB5_TICKET_ENC_PART2 */
-
-/* Define to 1 if you have the <langinfo.h> header file. */
-/* #undef HAVE_LANGINFO_H */
-
-/* Define to 1 if you have the `bind' library (-lbind). */
-/* #undef HAVE_LIBBIND */
-
-/* Define to 1 if you have the `BSD' library (-lBSD). */
-/* #undef HAVE_LIBBSD */
-
-/* Define to 1 if you have the `compat' library (-lcompat). */
-/* #undef HAVE_LIBCOMPAT */
-
-/* Define to 1 if you have the `crypto' library (-lcrypto). */
-/* #undef HAVE_LIBCRYPTO */
-
-/* Define to 1 if you have the `cygipc' library (-lcygipc). */
-/* #undef HAVE_LIBCYGIPC */
-
-/* Define to 1 if you have the `des' library (-ldes). */
-/* #undef HAVE_LIBDES */
-
-/* Define to 1 if you have the `dl' library (-ldl). */
-/* #undef HAVE_LIBDL */
-
-/* Define to 1 if you have the `dld' library (-ldld). */
-/* #undef HAVE_LIBDLD */
-
-/* Define to 1 if you have the `eay32' library (-leay32). */
-#define HAVE_LIBEAY32 1
-
-/* Define to 1 if you have the `gen' library (-lgen). */
-/* #undef HAVE_LIBGEN */
-
-/* Define to 1 if you have the `IPC' library (-lIPC). */
-/* #undef HAVE_LIBIPC */
-
-/* Define to 1 if you have the `krb' library (-lkrb). */
-/* #undef HAVE_LIBKRB */
-
-/* Define to 1 if you have the `lc' library (-llc). */
-/* #undef HAVE_LIBLC */
-
-/* Define to 1 if you have the `ld' library (-lld). */
-/* #undef HAVE_LIBLD */
-
-/* Define to 1 if you have the `m' library (-lm). */
-#define HAVE_LIBM 1
-
-/* Define to 1 if you have the `nsl' library (-lnsl). */
-/* #undef HAVE_LIBNSL */
-
-/* Define to 1 if you have the `pam' library (-lpam). */
-/* #undef HAVE_LIBPAM */
-
-/* Define to 1 if you have the `PW' library (-lPW). */
-/* #undef HAVE_LIBPW */
-
-/* Define if you have a function readline library */
-/* #undef HAVE_LIBREADLINE */
-
-/* Define to 1 if you have the `resolv' library (-lresolv). */
-/* #undef HAVE_LIBRESOLV */
-
-/* Define to 1 if you have the `socket' library (-lsocket). */
-/* #undef HAVE_LIBSOCKET */
-
-/* Define to 1 if you have the `ssl' library (-lssl). */
-/* #undef HAVE_LIBSSL */
-
-/* Define to 1 if you have the `ssleay32' library (-lssleay32). */
-#define HAVE_LIBSSLEAY32 1
-
-/* Define to 1 if you have the `unix' library (-lunix). */
-/* #undef HAVE_LIBUNIX */
-
-/* Define to 1 if you have the `util' library (-lutil). */
-/* #undef HAVE_LIBUTIL */
-
-/* Define to 1 if you have the `wsock32' library (-lwsock32). */
-#define HAVE_LIBWSOCK32 1
-
-/* Define to 1 if you have the `z' library (-lz). */
-#define HAVE_LIBZ 1
-
-/* Define to 1 if constants of type 'long long int' should have the suffix LL.
-   */
-#define HAVE_LL_CONSTANTS 1
-
-/* Define to 1 if `long int' works and is 64 bits. */
-/* #undef HAVE_LONG_INT_64 */
-
-/* Define to 1 if `long long int' works and is 64 bits. */
-#define HAVE_LONG_LONG_INT_64 
-
-/* Define to 1 if you have the `memmove' function. */
-#define HAVE_MEMMOVE 1
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* Define to 1 if you have the <netinet/in.h> header file. */
-#define HAVE_NETINET_IN_H 1
-
-/* Define to 1 if you have the <netinet/tcp.h> header file. */
-/* #undef HAVE_NETINET_TCP_H */
-
-/* Define to 1 if you have the `on_exit' function. */
-/* #undef HAVE_ON_EXIT */
-
-/* Define to 1 if you have the <pam/pam_appl.h> header file. */
-/* #undef HAVE_PAM_PAM_APPL_H */
-
-/* Define to 1 if you have the `poll' function. */
-/* #undef HAVE_POLL */
-
-/* Define to 1 if you have the <poll.h> header file. */
-/* #undef HAVE_POLL_H */
-
-/* Define to 1 if you have the POSIX signal interface. */
-/* #undef HAVE_POSIX_SIGNALS */
-
-/* Define to 1 if you have the `pstat' function. */
-/* #undef HAVE_PSTAT */
-
-/* Define to 1 if the PS_STRINGS thing exists. */
-/* #undef HAVE_PS_STRINGS */
-
-/* Define if you have POSIX threads libraries and header files. */
-/* #undef HAVE_PTHREAD */
-
-/* Define to 1 if you have the <pwd.h> header file. */
-#define HAVE_PWD_H 1
-
-/* Define to 1 if you have the `random' function. */
-/* #undef HAVE_RANDOM */
-
-/* Define to 1 if you have the <readline.h> header file. */
-/* #undef HAVE_READLINE_H */
-
-/* Define to 1 if you have the <readline/history.h> header file. */
-/* #undef HAVE_READLINE_HISTORY_H */
-
-/* Define to 1 if you have the <readline/readline.h> header file. */
-/* #undef HAVE_READLINE_READLINE_H */
-
-/* Define to 1 if you have the `readlink' function. */
-/* #undef HAVE_READLINK */
-
-/* Define to 1 if you have the `replace_history_entry' function. */
-/* #undef HAVE_REPLACE_HISTORY_ENTRY */
-
-/* Define to 1 if you have the `rint' function. */
-#define HAVE_RINT 1
-
-/* Define to 1 if you have the global variable
-   'rl_completion_append_character'. */
-/* #undef HAVE_RL_COMPLETION_APPEND_CHARACTER */
-
-/* Define to 1 if you have the `rl_completion_matches' function. */
-/* #undef HAVE_RL_COMPLETION_MATCHES */
-
-/* Define to 1 if you have the `rl_filename_completion_function' function. */
-/* #undef HAVE_RL_FILENAME_COMPLETION_FUNCTION */
-
-/* Define to 1 if you have the <security/pam_appl.h> header file. */
-/* #undef HAVE_SECURITY_PAM_APPL_H */
-
-/* Define to 1 if you have the `setproctitle' function. */
-/* #undef HAVE_SETPROCTITLE */
-
-/* Define to 1 if you have the `setsid' function. */
-/* #undef HAVE_SETSID */
-
-/* Define to 1 if you have the `sigprocmask' function. */
-/* #undef HAVE_SIGPROCMASK */
-
-/* Define to 1 if you have sigsetjmp(). */
-/* #undef HAVE_SIGSETJMP */
-
-/* Define to 1 if the system has the type `sig_atomic_t'. */
-#define HAVE_SIG_ATOMIC_T 1
-
-/* Define to 1 if you have the `snprintf' function. */
-#define HAVE_SNPRINTF 1
-
-/* Define to 1 if you have spinlocks. */
-#define HAVE_SPINLOCKS 1
-
-/* Define to 1 if you have the `srandom' function. */
-/* #undef HAVE_SRANDOM */
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#define HAVE_STDINT_H 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the `strdup' function. */
-#define HAVE_STRDUP 1
-
-/* Define to 1 if you have the `strerror' function. */
-#define HAVE_STRERROR 1
-
-/* Define to 1 if you have the `strerror_r' function. */
-/* #undef HAVE_STRERROR_R */
-
-/* Define to 1 if cpp supports the ANSI # stringizing operator. */
-#define HAVE_STRINGIZE 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define to 1 if you have the `strtol' function. */
-#define HAVE_STRTOL 1
-
-/* Define to 1 if you have the `strtoll' function. */
-#define HAVE_STRTOLL 1
-
-/* Define to 1 if you have the `strtoq' function. */
-/* #undef HAVE_STRTOQ */
-
-/* Define to 1 if you have the `strtoul' function. */
-#define HAVE_STRTOUL 1
-
-/* Define to 1 if you have the `strtoull' function. */
-#define HAVE_STRTOULL 1
-
-/* Define to 1 if you have the `strtouq' function. */
-/* #undef HAVE_STRTOUQ */
-
-/* Define to 1 if the system has the type `struct addrinfo'. */
-/* #undef HAVE_STRUCT_ADDRINFO */
-
-/* Define to 1 if the system has the type `struct cmsgcred'. */
-/* #undef HAVE_STRUCT_CMSGCRED */
-
-/* Define to 1 if the system has the type `struct fcred'. */
-/* #undef HAVE_STRUCT_FCRED */
-
-/* Define to 1 if the system has the type `struct option'. */
-#define HAVE_STRUCT_OPTION 1
-
-/* Define to 1 if `sa_len' is member of `struct sockaddr'. */
-/* #undef HAVE_STRUCT_SOCKADDR_SA_LEN */
-
-/* Define to 1 if the system has the type `struct sockaddr_storage'. */
-#define HAVE_STRUCT_SOCKADDR_STORAGE 1
-
-/* Define to 1 if `ss_family' is member of `struct sockaddr_storage'. */
-#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
-
-/* Define to 1 if `ss_len' is member of `struct sockaddr_storage'. */
-/* #undef HAVE_STRUCT_SOCKADDR_STORAGE_SS_LEN */
-
-/* Define to 1 if `__ss_family' is member of `struct sockaddr_storage'. */
-/* #undef HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY */
-
-/* Define to 1 if `__ss_len' is member of `struct sockaddr_storage'. */
-/* #undef HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN */
-
-/* Define to 1 if the system has the type `struct sockaddr_un'. */
-/* #undef HAVE_STRUCT_SOCKADDR_UN */
-
-/* Define to 1 if the system has the type `struct sockcred'. */
-/* #undef HAVE_STRUCT_SOCKCRED */
-
-/* Define to 1 if `tm_zone' is member of `struct tm'. */
-/* #undef HAVE_STRUCT_TM_TM_ZONE */
-
-/* Define to 1 if you have the <SupportDefs.h> header file. */
-/* #undef HAVE_SUPPORTDEFS_H */
-
-/* Define to 1 if you have the `symlink' function. */
-#define HAVE_SYMLINK 1
-
-/* Define to 1 if you have the `sysconf' function. */
-/* #undef HAVE_SYSCONF */
-
-/* Define to 1 if you have the syslog interface. */
-/* #undef HAVE_SYSLOG */
-
-/* Define to 1 if you have the <sys/ipc.h> header file. */
-/* #undef HAVE_SYS_IPC_H */
-
-/* Define to 1 if you have the <sys/poll.h> header file. */
-/* #undef HAVE_SYS_POLL_H */
-
-/* Define to 1 if you have the <sys/pstat.h> header file. */
-/* #undef HAVE_SYS_PSTAT_H */
-
-/* Define to 1 if you have the <sys/select.h> header file. */
-/* #undef HAVE_SYS_SELECT_H */
-
-/* Define to 1 if you have the <sys/sem.h> header file. */
-/* #undef HAVE_SYS_SEM_H */
-
-/* Define to 1 if you have the <sys/shm.h> header file. */
-/* #undef HAVE_SYS_SHM_H */
-
-/* Define to 1 if you have the <sys/socket.h> header file. */
-#define HAVE_SYS_SOCKET_H 1
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/time.h> header file. */
-#define HAVE_SYS_TIME_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if you have the <sys/un.h> header file. */
-/* #undef HAVE_SYS_UN_H */
-
-/* Define to 1 if you have the <termios.h> header file. */
-/* #undef HAVE_TERMIOS_H */
-
-/* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use
-   `HAVE_STRUCT_TM_TM_ZONE' instead. */
-/* #undef HAVE_TM_ZONE */
-
-/* Define to 1 if you have the `towlower' function. */
-#define HAVE_TOWLOWER 1
-
-/* Define to 1 if you have the external array `tzname'. */
-/* #undef HAVE_TZNAME */
-
-/* Define to 1 if the system has the type `uint64'. */
-/* #undef HAVE_UINT64 */
-
-/* Define to 1 if the system has the type `uint8'. */
-/* #undef HAVE_UINT8 */
-
-/* Define to 1 if the system has the type `union semun'. */
-/* #undef HAVE_UNION_SEMUN */
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* Define to 1 if you have unix sockets. */
-/* #undef HAVE_UNIX_SOCKETS */
-
-/* Define to 1 if you have the `unsetenv' function. */
-/* #undef HAVE_UNSETENV */
-
-/* Define to 1 if you have the `utime' function. */
-#define HAVE_UTIME 1
-
-/* Define to 1 if you have the `utimes' function. */
-/* #undef HAVE_UTIMES */
-
-/* Define to 1 if you have the <utime.h> header file. */
-#define HAVE_UTIME_H 1
-
-/* Define to 1 if you have the `vsnprintf' function. */
-#define HAVE_VSNPRINTF 1
-
-/* Define to 1 if you have the `waitpid' function. */
-/* #undef HAVE_WAITPID */
-
-/* Define to 1 if you have the <wchar.h> header file. */
-#define HAVE_WCHAR_H 1
-
-/* Define to 1 if you have the `wcstombs' function. */
-#define HAVE_WCSTOMBS 1
-
-/* Define to 1 if you have the <wctype.h> header file. */
-#define HAVE_WCTYPE_H 1
-
-/* Define to the appropriate snprintf format for 64-bit ints, if any. */
-#define INT64_FORMAT "%I64d"
-
-/* Define to build with Kerberos 4 support. (--with-krb4) */
-/* #undef KRB4 */
-
-/* Define to build with Kerberos 5 support. (--with-krb5) */
-/* #undef KRB5 */
-
-/* Define to the location of locale files. */
-#define LOCALEDIR "/usr/local/pgsql/share/locale"
-
-/* Define as the maximum alignment requirement of any C data type. */
-#define MAXIMUM_ALIGNOF 8
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT "pgsql-bugs at postgresql.org"
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME "PostgreSQL"
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "PostgreSQL 8.0.1"
-
-/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME "postgresql"
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION "8.0.1"
-
-/* Define to the name of the PostgreSQL service principal in Kerberos.
-   (--with-krb-srvnam=NAME) */
-#define PG_KRB_SRVNAM "postgres"
-
-/* PostgreSQL version */
-#define PG_VERSION "8.0.1"
-
-/* A string containing the version number, platform, and C compiler */
-#define PG_VERSION_STR "PostgreSQL 8.0.1 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.4.2 (mingw-special)"
-
-/* Define to the necessary symbol if this constant uses a non-standard name on
-   your system. */
-/* #undef PTHREAD_CREATE_JOINABLE */
-
-/* The size of a `unsigned long', as computed by sizeof. */
-#define SIZEOF_UNSIGNED_LONG 4
-
-/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Define to 1 if strerror_r() returns a int. */
-/* #undef STRERROR_R_INT */
-
-/* Define to 1 if your <sys/time.h> declares `struct tm'. */
-/* #undef TM_IN_SYS_TIME */
-
-/* Define to the appropriate snprintf format for unsigned 64-bit ints, if any.
-   */
-#define UINT64_FORMAT "%I64u"
-
-/* Define to 1 to build with assertion checks. (--enable-cassert) */
-/* #undef USE_ASSERT_CHECKING */
-
-/* Define to 1 if you want 64-bit integer timestamp and interval support.
-   (--enable-integer-datetimes) */
-/* #undef USE_INTEGER_DATETIMES */
-
-/* Define to select named POSIX semaphores. */
-/* #undef USE_NAMED_POSIX_SEMAPHORES */
-
-/* Define to 1 to build with PAM support. (--with-pam) */
-/* #undef USE_PAM */
-
-/* Define to 1 to build with Rendezvous support. (--with-rendezvous) */
-/* #undef USE_RENDEZVOUS */
-
-/* Define to build with (Open)SSL support. (--with-openssl) */
-#define USE_SSL 1
-
-/* Define to select SysV-style semaphores. */
-#define USE_SYSV_SEMAPHORES 1
-
-/* Define to select SysV-style shared memory. */
-#define USE_SYSV_SHARED_MEMORY 1
-
-/* Define to select unnamed POSIX semaphores. */
-/* #undef USE_UNNAMED_POSIX_SEMAPHORES */
-
-/* Number of bits in a file offset, on hosts where this is settable. */
-/* #undef _FILE_OFFSET_BITS */
-
-/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
-/* #undef _LARGEFILE_SOURCE */
-
-/* Define for large files, on AIX-style hosts. */
-/* #undef _LARGE_FILES */
-
-/* Define to empty if `const' does not conform to ANSI C. */
-/* #undef const */
-
-/* Define as `__inline' if that's what the C compiler calls it, or to nothing
-   if it is not supported. */
-/* #undef inline */
-
-/* Define to empty if the C compiler does not understand signed types. */
-/* #undef signed */
-
-/* Define to empty if the keyword `volatile' does not work. Warning: valid
-   code using `volatile' can become incorrect without. Disable with care. */
-/* #undef volatile */
diff --git a/src/terralib/drivers/PostgreSQL/includepg/pg_config_manual.h b/src/terralib/drivers/PostgreSQL/includepg/pg_config_manual.h
deleted file mode 100644
index 040651f..0000000
--- a/src/terralib/drivers/PostgreSQL/includepg/pg_config_manual.h
+++ /dev/null
@@ -1,229 +0,0 @@
-/*------------------------------------------------------------------------
- * PostgreSQL manual configuration settings
- *
- * This file contains various configuration symbols and limits.  In
- * all cases, changing them is only useful in very rare situations or
- * for developers.	If you edit any of these, be sure to do a *full*
- * rebuild (and an initdb if noted).
- *
- * $PostgreSQL: pgsql/src/include/pg_config_manual.h,v 1.15 2004/09/10 14:27:37 momjian Exp $
- *------------------------------------------------------------------------
- */
-
-/*
- * Size of a disk block --- this also limits the size of a tuple.  You
- * can set it bigger if you need bigger tuples (although TOAST should
- * reduce the need to have large tuples, since fields can be spread
- * across multiple tuples).
- *
- * BLCKSZ must be a power of 2.  The maximum possible value of BLCKSZ
- * is currently 2^15 (32768).  This is determined by the 15-bit widths
- * of the lp_off and lp_len fields in ItemIdData (see
- * include/storage/itemid.h).
- *
- * Changing BLCKSZ requires an initdb.
- */
-#define BLCKSZ	8192
-
-/*
- * RELSEG_SIZE is the maximum number of blocks allowed in one disk
- * file.  Thus, the maximum size of a single file is RELSEG_SIZE *
- * BLCKSZ; relations bigger than that are divided into multiple files.
- *
- * RELSEG_SIZE * BLCKSZ must be less than your OS' limit on file size.
- * This is often 2 GB or 4GB in a 32-bit operating system, unless you
- * have large file support enabled.  By default, we make the limit 1
- * GB to avoid any possible integer-overflow problems within the OS.
- * A limit smaller than necessary only means we divide a large
- * relation into more chunks than necessary, so it seems best to err
- * in the direction of a small limit.  (Besides, a power-of-2 value
- * saves a few cycles in md.c.)
- *
- * Changing RELSEG_SIZE requires an initdb.
- */
-#define RELSEG_SIZE (0x40000000 / BLCKSZ)
-
-/*
- * XLOG_SEG_SIZE is the size of a single WAL file.	This must be a power of 2
- * and larger than BLCKSZ (preferably, a great deal larger than BLCKSZ).
- *
- * Changing XLOG_SEG_SIZE requires an initdb.
- */
-#define XLOG_SEG_SIZE	(16*1024*1024)
-
-/*
- * Maximum number of columns in an index and maximum number of
- * arguments to a function. They must be the same value.
- *
- * The minimum value is 8 (index creation uses 8-argument functions).
- * There is no specific upper limit, although large values will waste
- * system-table space and processing time.
- *
- * Changing these requires an initdb.
- */
-#define INDEX_MAX_KEYS		32
-#define FUNC_MAX_ARGS		INDEX_MAX_KEYS
-
-/*
- * Define this to make libpgtcl's "pg_result -assign" command process
- * C-style backslash sequences in returned tuple data and convert
- * PostgreSQL array values into Tcl lists.	CAUTION: This conversion
- * is *wrong* unless you install the routines in
- * contrib/string/string_io to make the server produce C-style
- * backslash sequences in the first place.
- */
-/* #define TCL_ARRAYS */
-
-/*
- * User locks are handled totally on the application side as long term
- * cooperative locks which extend beyond the normal transaction
- * boundaries.	Their purpose is to indicate to an application that
- * someone is `working' on an item.  Define this flag to enable user
- * locks.  You will need the loadable module user-locks.c to use this
- * feature.
- */
-#define USER_LOCKS
-
-/*
- * Define this if you want psql to _always_ ask for a username and a
- * password for password authentication.
- */
-/* #define PSQL_ALWAYS_GET_PASSWORDS */
-
-/*
- * Define this if you want to allow the lo_import and lo_export SQL
- * functions to be executed by ordinary users.	By default these
- * functions are only available to the Postgres superuser.	CAUTION:
- * These functions are SECURITY HOLES since they can read and write
- * any file that the PostgreSQL server has permission to access.  If
- * you turn this on, don't say we didn't warn you.
- */
-/* #define ALLOW_DANGEROUS_LO_FUNCTIONS */
-
-/*
- * MAXPGPATH: standard size of a pathname buffer in PostgreSQL (hence,
- * maximum usable pathname length is one less).
- *
- * We'd use a standard system header symbol for this, if there weren't
- * so many to choose from: MAXPATHLEN, MAX_PATH, PATH_MAX are all
- * defined by different "standards", and often have different values
- * on the same platform!  So we just punt and use a reasonably
- * generous setting here.
- */
-#define MAXPGPATH		1024
-
-/*
- * PG_SOMAXCONN: maximum accept-queue length limit passed to
- * listen(2).  You'd think we should use SOMAXCONN from
- * <sys/socket.h>, but on many systems that symbol is much smaller
- * than the kernel's actual limit.  In any case, this symbol need be
- * twiddled only if you have a kernel that refuses large limit values,
- * rather than silently reducing the value to what it can handle
- * (which is what most if not all Unixen do).
- */
-#define PG_SOMAXCONN	10000
-
-/*
- * You can try changing this if you have a machine with bytes of
- * another size, but no guarantee...
- */
-#define BITS_PER_BYTE		8
-
-/*
- * Preferred alignment for disk I/O buffers.  On some CPUs, copies between
- * user space and kernel space are significantly faster if the user buffer
- * is aligned on a larger-than-MAXALIGN boundary.  Ideally this should be
- * a platform-dependent value, but for now we just hard-wire it.
- */
-#define ALIGNOF_BUFFER	32
-
-/*
- * Disable UNIX sockets for those operating system.
- */
-#if defined(__QNX__) || defined(__BEOS__) || defined(WIN32)
-#undef HAVE_UNIX_SOCKETS
-#endif
-
-/*
- * Define this if your operating system supports link()
- */
-#if !defined(__QNX__) && !defined(__BEOS__) && \
-	!defined(WIN32) && !defined(__CYGWIN__)
-#define HAVE_WORKING_LINK 1
-#endif
-
-/*
- * This is the default directory in which AF_UNIX socket files are
- * placed.	Caution: changing this risks breaking your existing client
- * applications, which are likely to continue to look in the old
- * directory.  But if you just hate the idea of sockets in /tmp,
- * here's where to twiddle it.  You can also override this at runtime
- * with the postmaster's -k switch.
- */
-#define DEFAULT_PGSOCKET_DIR  "/tmp"
-
-/*
- * The random() function is expected to yield values between 0 and
- * MAX_RANDOM_VALUE.  Currently, all known implementations yield
- * 0..2^31-1, so we just hardwire this constant.  We could do a
- * configure test if it proves to be necessary.  CAUTION: Think not to
- * replace this with RAND_MAX.	RAND_MAX defines the maximum value of
- * the older rand() function, which is often different from --- and
- * considerably inferior to --- random().
- */
-#define MAX_RANDOM_VALUE  (0x7FFFFFFF)
-
-
-/*
- *------------------------------------------------------------------------
- * The following symbols are for enabling debugging code, not for
- * controlling user-visible features or resource limits.
- *------------------------------------------------------------------------
- */
-
-/*
- * Define this to cause pfree()'d memory to be cleared immediately, to
- * facilitate catching bugs that refer to already-freed values.  XXX
- * Right now, this gets defined automatically if --enable-cassert.	In
- * the long term it probably doesn't need to be on by default.
- */
-#ifdef USE_ASSERT_CHECKING
-#define CLOBBER_FREED_MEMORY
-#endif
-
-/*
- * Define this to check memory allocation errors (scribbling on more
- * bytes than were allocated).	Right now, this gets defined
- * automatically if --enable-cassert.  In the long term it probably
- * doesn't need to be on by default.
- */
-#ifdef USE_ASSERT_CHECKING
-#define MEMORY_CONTEXT_CHECKING
-#endif
-
-/*
- * Define this to force all parse and plan trees to be passed through
- * copyObject(), to facilitate catching errors and omissions in
- * copyObject().
- */
-/* #define COPY_PARSE_PLAN_TREES */
-
-/*
- * Enable debugging print statements for lock-related operations.
- */
-/* #define LOCK_DEBUG */
-
-/*
- * Enable debugging print statements for WAL-related operations; see
- * also the wal_debug GUC var.
- */
-/* #define WAL_DEBUG */
-
-/*
- * Other debug #defines (documentation, anyone?)
- */
-/* #define IPORTAL_DEBUG  */
-/* #define HEAPDEBUGALL  */
-/* #define ACLDEBUG */
-/* #define RTDEBUG */
-/* #define GISTDEBUG */
diff --git a/src/terralib/drivers/PostgreSQL/includepg/pg_config_os.h b/src/terralib/drivers/PostgreSQL/includepg/pg_config_os.h
deleted file mode 100644
index 9049fb4..0000000
--- a/src/terralib/drivers/PostgreSQL/includepg/pg_config_os.h
+++ /dev/null
@@ -1,244 +0,0 @@
-/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.42 2004/12/26 19:20:33 tgl Exp $ */
-
-/* undefine and redefine after #include */
-#undef mkdir
-
-#undef ERROR
-#include <windows.h>
-#include <winsock.h>
-#include <process.h>
-#include <signal.h>
-#include <errno.h>
-
-#undef near
-
-/* Must be here to avoid conflicting with prototype in windows.h */
-#define mkdir(a,b)	mkdir(a)
-
-
-#define fsync(a)	_commit(a)
-#define ftruncate(a,b)	chsize(a,b)
-
-#define USES_WINSOCK
-
-/* defines for dynamic linking on Win32 platform */
-#if defined(__MINGW32__) || defined(__CYGWIN__)
-
-#if __GNUC__ && ! defined (__declspec)
-#error You need egcs 1.1 or newer for compiling!
-#endif
-
-#ifdef BUILDING_DLL
-#define DLLIMPORT __declspec (dllexport)
-#else							/* not BUILDING_DLL */
-#define DLLIMPORT __declspec (dllimport)
-#endif
-
-#elif defined(WIN32_CLIENT_ONLY)
-
-#if defined(_DLL)
-#define DLLIMPORT __declspec (dllexport)
-#else							/* not _DLL */
-#define DLLIMPORT __declspec (dllimport)
-#endif
-
-#else							/* not CYGWIN, not MSVC, not MingW */
-
-#define DLLIMPORT
-#endif
-
-/*
- *	IPC defines
- */
-#undef HAVE_UNION_SEMUN
-#define HAVE_UNION_SEMUN 1
-
-#define IPC_RMID 256
-#define IPC_CREAT 512
-#define IPC_EXCL 1024
-#define IPC_PRIVATE 234564
-#define IPC_NOWAIT	2048
-#define IPC_STAT 4096
-
-#define EACCESS 2048
-#define EIDRM 4096
-
-#define SETALL 8192
-#define GETNCNT 16384
-#define GETVAL 65536
-#define SETVAL 131072
-#define GETPID 262144
-
-/*
- *	Shared memory
- */
-struct shmid_ds
-{
-	int			dummy;
-	int			shm_nattch;
-};
-
-int			shmdt(const void *shmaddr);
-void	   *shmat(int memId, void *shmaddr, int flag);
-int			shmctl(int shmid, int flag, struct shmid_ds * dummy);
-int			shmget(int memKey, int size, int flag);
-
-
-/*
- *	Semaphores
- */
-union semun
-{
-	int			val;
-	struct semid_ds *buf;
-	unsigned short *array;
-};
-
-struct sembuf
-{
-	int			sem_flg;
-	int			sem_op;
-	int			sem_num;
-};
-
-int			semctl(int semId, int semNum, int flag, union semun);
-int			semget(int semKey, int semNum, int flags);
-int			semop(int semId, struct sembuf * sops, int flag);
-
-
-/*
- * Signal stuff
- */
-#define WEXITSTATUS(w)	(((w) >> 8) & 0xff)
-#define WIFEXITED(w)	(((w) & 0xff) == 0)
-#define WIFSIGNALED(w)	(((w) & 0x7f) > 0 && (((w) & 0x7f) < 0x7f))
-#define WTERMSIG(w)		((w) & 0x7f)
-
-#define sigmask(sig) ( 1 << ((sig)-1) )
-
-/* Signal function return values */
-#undef SIG_DFL
-#undef SIG_ERR
-#undef SIG_IGN
-#define SIG_DFL ((pqsigfunc)0)
-#define SIG_ERR ((pqsigfunc)-1)
-#define SIG_IGN ((pqsigfunc)1)
-
-/* Some extra signals */
-#define SIGHUP				1
-#define SIGQUIT				3
-#define SIGTRAP				5
-#define SIGABRT				22	/* Set to match W32 value -- not UNIX
-								 * value */
-#define SIGKILL				9
-#define SIGPIPE				13
-#define SIGALRM				14
-#define SIGSTOP				17
-#define SIGTSTP				18
-#define SIGCONT				19
-#define SIGCHLD				20
-#define SIGTTIN				21
-#define SIGTTOU				22	/* Same as SIGABRT -- no problem, I hope */
-#define SIGWINCH			28
-#define SIGUSR1				30
-#define SIGUSR2				31
-
-struct timezone
-{
-	int			tz_minuteswest; /* Minutes west of GMT.  */
-	int			tz_dsttime;		/* Nonzero if DST is ever in effect.  */
-};
-
-/* for setitimer in backend/port/win32/timer.c */
-#define ITIMER_REAL 0
-struct itimerval
-{
-	struct timeval it_interval;
-	struct timeval it_value;
-};
-int			setitimer(int which, const struct itimerval * value, struct itimerval * ovalue);
-
-
-/*
- * Supplement to <sys/types.h>.
- *
- * Perl already has conflicting defines for uid_t and gid_t.
- */
-#ifndef PLPERL_HAVE_UID_GID
-typedef int uid_t;
-typedef int gid_t;
-#else
-/* These are redefined by perl. */
-#define uid_t int
-#define gid_t int
-#endif
-typedef long key_t;
-
-#ifdef WIN32_CLIENT_ONLY
-typedef int pid_t;
-#endif
-
-/*
- * Supplement to <sys/stat.h>.
- */
-#define lstat(path, sb)	stat((path), (sb))
-
-/*
- * Supplement to <errno.h>.
- */
-#undef EAGAIN
-#undef EINTR
-#define EINTR WSAEINTR
-#define EAGAIN WSAEWOULDBLOCK
-#define EMSGSIZE WSAEMSGSIZE
-#define EAFNOSUPPORT WSAEAFNOSUPPORT
-#define EWOULDBLOCK WSAEWOULDBLOCK
-#define ECONNRESET WSAECONNRESET
-#define EINPROGRESS WSAEINPROGRESS
-#define ENOBUFS WSAENOBUFS
-#define EPROTONOSUPPORT WSAEPROTONOSUPPORT
-#define ECONNREFUSED WSAECONNREFUSED
-#define EBADFD WSAENOTSOCK
-#define EOPNOTSUPP WSAEOPNOTSUPP
-
-
-/* In backend/port/win32/signal.c */
-extern DLLIMPORT HANDLE pgwin32_signal_event;
-extern HANDLE pgwin32_initial_signal_pipe;
-
-void		pgwin32_signal_initialize(void);
-HANDLE		pgwin32_create_signal_listener(pid_t pid);
-void		pgwin32_dispatch_queued_signals(void);
-void		pg_queue_signal(int signum);
-
-#ifndef FRONTEND
-#define pg_usleep(t) pgwin32_backend_usleep(t)
-void		pgwin32_backend_usleep(long microsec);
-#endif
-
-/* In backend/port/win32/socket.c */
-#ifndef FRONTEND
-#define socket(af, type, protocol) pgwin32_socket(af, type, protocol)
-#define accept(s, addr, addrlen) pgwin32_accept(s, addr, addrlen)
-#define connect(s, name, namelen) pgwin32_connect(s, name, namelen)
-#define select(n, r, w, e, timeout) pgwin32_select(n, r, w, e, timeout)
-#define recv(s, buf, len, flags) pgwin32_recv(s, buf, len, flags)
-#define send(s, buf, len, flags) pgwin32_send(s, buf, len, flags)
-
-SOCKET		pgwin32_socket(int af, int type, int protocol);
-SOCKET		pgwin32_accept(SOCKET s, struct sockaddr * addr, int *addrlen);
-int			pgwin32_connect(SOCKET s, const struct sockaddr * name, int namelen);
-int			pgwin32_select(int nfds, fd_set *readfs, fd_set *writefds, fd_set *exceptfds, const struct timeval * timeout);
-int			pgwin32_recv(SOCKET s, char *buf, int len, int flags);
-int			pgwin32_send(SOCKET s, char *buf, int len, int flags);
-
-const char *pgwin32_socket_strerror(int err);
-int pgwin32_waitforsinglesocket(SOCKET s, int what);
-
-/* in backend/port/win32/security.c */
-extern int	pgwin32_is_admin(void);
-extern int	pgwin32_is_service(void);
-#endif
-
-/* in backend/port/win32/error.c */
-extern void _dosmaperr(unsigned long);
diff --git a/src/terralib/drivers/PostgreSQL/includepg/pgtypes_date.h b/src/terralib/drivers/PostgreSQL/includepg/pgtypes_date.h
deleted file mode 100644
index 8a98c71..0000000
--- a/src/terralib/drivers/PostgreSQL/includepg/pgtypes_date.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef PGTYPES_DATETIME
-#define PGTYPES_DATETIME
-
-#include <pgtypes_timestamp.h>
-
-typedef long date;
-
-#ifdef __cplusplus
-extern		"C"
-{
-#endif
-
-extern date PGTYPESdate_from_asc(char *, char **);
-extern char *PGTYPESdate_to_asc(date);
-extern date PGTYPESdate_from_timestamp(timestamp);
-extern void PGTYPESdate_julmdy(date, int *);
-extern void PGTYPESdate_mdyjul(int *, date *);
-extern int	PGTYPESdate_dayofweek(date);
-extern void PGTYPESdate_today(date *);
-extern int	PGTYPESdate_defmt_asc(date *, char *, char *);
-extern int	PGTYPESdate_fmt_asc(date, char *, char *);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif   /* PGTYPES_DATETIME */
diff --git a/src/terralib/drivers/PostgreSQL/includepg/pgtypes_error.h b/src/terralib/drivers/PostgreSQL/includepg/pgtypes_error.h
deleted file mode 100644
index 4a1008a..0000000
--- a/src/terralib/drivers/PostgreSQL/includepg/pgtypes_error.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#define PGTYPES_NUM_OVERFLOW		301
-#define PGTYPES_NUM_BAD_NUMERIC		302
-#define PGTYPES_NUM_DIVIDE_ZERO		303
-
-#define PGTYPES_DATE_BAD_DATE		310
-#define PGTYPES_DATE_ERR_EARGS		311
-#define PGTYPES_DATE_ERR_ENOSHORTDATE	312
-#define PGTYPES_DATE_ERR_ENOTDMY	313
-#define PGTYPES_DATE_BAD_DAY		314
-#define PGTYPES_DATE_BAD_MONTH		315
-
-#define PGTYPES_TS_BAD_TIMESTAMP	320
-#define PGTYPES_TS_ERR_EINFTIME		321
-
-#define PGTYPES_INTVL_BAD_INTERVAL	330
diff --git a/src/terralib/drivers/PostgreSQL/includepg/pgtypes_interval.h b/src/terralib/drivers/PostgreSQL/includepg/pgtypes_interval.h
deleted file mode 100644
index fba723f..0000000
--- a/src/terralib/drivers/PostgreSQL/includepg/pgtypes_interval.h
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifndef PGTYPES_INTERVAL
-#define PGTYPES_INTERVAL
-
-typedef struct
-{
-#ifdef HAVE_INT64_TIMESTAMP
-	int64		time;			/* all time units other than months and
-								 * years */
-#else
-	double		time;			/* all time units other than months and
-								 * years */
-#endif
-	long		month;			/* months and years, after time for
-								 * alignment */
-} interval;
-
-#ifdef __cplusplus
-extern		"C"
-{
-#endif
-
-extern interval *PGTYPESinterval_from_asc(char *, char **);
-extern char *PGTYPESinterval_to_asc(interval *);
-extern int	PGTYPESinterval_copy(interval *, interval *);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif   /* PGTYPES_INTERVAL */
diff --git a/src/terralib/drivers/PostgreSQL/includepg/pgtypes_numeric.h b/src/terralib/drivers/PostgreSQL/includepg/pgtypes_numeric.h
deleted file mode 100644
index 7085672..0000000
--- a/src/terralib/drivers/PostgreSQL/includepg/pgtypes_numeric.h
+++ /dev/null
@@ -1,68 +0,0 @@
-#ifndef PGTYPES_NUMERIC
-#define PGTYPES_NUMERIC
-
-#define NUMERIC_POS						0x0000
-#define NUMERIC_NEG						0x4000
-#define NUMERIC_NAN						0xC000
-#define NUMERIC_MAX_PRECISION			1000
-#define NUMERIC_MAX_DISPLAY_SCALE		NUMERIC_MAX_PRECISION
-#define NUMERIC_MIN_DISPLAY_SCALE		0
-#define NUMERIC_MIN_SIG_DIGITS			16
-
-#define DECSIZE 30
-
-typedef unsigned char NumericDigit;
-typedef struct
-{
-	int			ndigits;		/* number of digits in digits[] - can be
-								 * 0! */
-	int			weight;			/* weight of first digit */
-	int			rscale;			/* result scale */
-	int			dscale;			/* display scale */
-	int			sign;			/* NUMERIC_POS, NUMERIC_NEG, or
-								 * NUMERIC_NAN */
-	NumericDigit *buf;			/* start of alloc'd space for digits[] */
-	NumericDigit *digits;		/* decimal digits */
-} numeric;
-
-typedef struct
-{
-	int			ndigits;		/* number of digits in digits[] - can be
-								 * 0! */
-	int			weight;			/* weight of first digit */
-	int			rscale;			/* result scale */
-	int			dscale;			/* display scale */
-	int			sign;			/* NUMERIC_POS, NUMERIC_NEG, or
-								 * NUMERIC_NAN */
-	NumericDigit digits[DECSIZE];		/* decimal digits */
-} decimal;
-
-#ifdef __cplusplus
-extern		"C"
-{
-#endif
-
-numeric    *PGTYPESnumeric_new(void);
-void		PGTYPESnumeric_free(numeric *);
-numeric    *PGTYPESnumeric_from_asc(char *, char **);
-char	   *PGTYPESnumeric_to_asc(numeric *, int);
-int			PGTYPESnumeric_add(numeric *, numeric *, numeric *);
-int			PGTYPESnumeric_sub(numeric *, numeric *, numeric *);
-int			PGTYPESnumeric_mul(numeric *, numeric *, numeric *);
-int			PGTYPESnumeric_div(numeric *, numeric *, numeric *);
-int			PGTYPESnumeric_cmp(numeric *, numeric *);
-int			PGTYPESnumeric_from_int(signed int, numeric *);
-int			PGTYPESnumeric_from_long(signed long int, numeric *);
-int			PGTYPESnumeric_copy(numeric *, numeric *);
-int			PGTYPESnumeric_from_double(double, numeric *);
-int			PGTYPESnumeric_to_double(numeric *, double *);
-int			PGTYPESnumeric_to_int(numeric *, int *);
-int			PGTYPESnumeric_to_long(numeric *, long *);
-int			PGTYPESnumeric_to_decimal(numeric *, decimal *);
-int			PGTYPESnumeric_from_decimal(decimal *, numeric *);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif   /* PGTYPES_NUMERIC */
diff --git a/src/terralib/drivers/PostgreSQL/includepg/pgtypes_timestamp.h b/src/terralib/drivers/PostgreSQL/includepg/pgtypes_timestamp.h
deleted file mode 100644
index 8b3bf94..0000000
--- a/src/terralib/drivers/PostgreSQL/includepg/pgtypes_timestamp.h
+++ /dev/null
@@ -1,33 +0,0 @@
-#ifndef PGTYPES_TIMESTAMP
-#define PGTYPES_TIMESTAMP
-
-#include <pgtypes_interval.h>
-
-#ifdef HAVE_INT64_TIMESTAMP
-typedef int64 timestamp;
-typedef int64 TimestampTz;
-
-#else
-typedef double timestamp;
-typedef double TimestampTz;
-#endif
-
-#ifdef __cplusplus
-extern		"C"
-{
-#endif
-
-extern timestamp PGTYPEStimestamp_from_asc(char *, char **);
-extern char *PGTYPEStimestamp_to_asc(timestamp);
-extern int	PGTYPEStimestamp_sub(timestamp *, timestamp *, interval *);
-extern int	PGTYPEStimestamp_fmt_asc(timestamp *, char *, int, char *);
-extern void PGTYPEStimestamp_current(timestamp *);
-extern int	PGTYPEStimestamp_defmt_asc(char *, char *, timestamp *);
-extern int  PGTYPEStimestamp_add_interval(timestamp *tin, interval *span, timestamp *tout);
-extern int  PGTYPEStimestamp_sub_interval(timestamp *tin, interval *span, timestamp *tout);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif   /* PGTYPES_TIMESTAMP */
diff --git a/src/terralib/drivers/PostgreSQL/includepg/postgres_ext.h b/src/terralib/drivers/PostgreSQL/includepg/postgres_ext.h
deleted file mode 100644
index efffad2..0000000
--- a/src/terralib/drivers/PostgreSQL/includepg/postgres_ext.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * postgres_ext.h
- *
- *	   This file contains declarations of things that are visible everywhere
- *	in PostgreSQL *and* are visible to clients of frontend interface libraries.
- *	For example, the Oid type is part of the API of libpq and other libraries.
- *
- *	   Declarations which are specific to a particular interface should
- *	go in the header file for that interface (such as libpq-fe.h).	This
- *	file is only for fundamental Postgres declarations.
- *
- *	   User-written C functions don't count as "external to Postgres."
- *	Those function much as local modifications to the backend itself, and
- *	use header files that are otherwise internal to Postgres to interface
- *	with the backend.
- *
- * $PostgreSQL: pgsql/src/include/postgres_ext.h,v 1.16 2004/08/29 05:06:55 momjian Exp $
- *
- *-------------------------------------------------------------------------
- */
-
-#ifndef POSTGRES_EXT_H
-#define POSTGRES_EXT_H
-
-/*
- * Object ID is a fundamental type in Postgres.
- */
-typedef unsigned int Oid;
-
-#ifdef __cplusplus
-#define InvalidOid		(Oid(0))
-#else
-#define InvalidOid		((Oid) 0)
-#endif
-
-#define OID_MAX  UINT_MAX
-/* you will need to include <limits.h> to use the above #define */
-
-
-/*
- * NAMEDATALEN is the max length for system identifiers (e.g. table names,
- * attribute names, function names, etc).  It must be a multiple of
- * sizeof(int) (typically 4).
- *
- * NOTE that databases with different NAMEDATALEN's cannot interoperate!
- */
-#define NAMEDATALEN 64
-
-
-/*
- * Identifiers of error message fields.  Kept here to keep common
- * between frontend and backend, and also to export them to libpq
- * applications.
- */
-#define PG_DIAG_SEVERITY		'S'
-#define PG_DIAG_SQLSTATE		'C'
-#define PG_DIAG_MESSAGE_PRIMARY 'M'
-#define PG_DIAG_MESSAGE_DETAIL	'D'
-#define PG_DIAG_MESSAGE_HINT	'H'
-#define PG_DIAG_STATEMENT_POSITION 'P'
-#define PG_DIAG_INTERNAL_POSITION 'p'
-#define PG_DIAG_INTERNAL_QUERY	'q'
-#define PG_DIAG_CONTEXT			'W'
-#define PG_DIAG_SOURCE_FILE		'F'
-#define PG_DIAG_SOURCE_LINE		'L'
-#define PG_DIAG_SOURCE_FUNCTION 'R'
-
-#endif
diff --git a/src/terralib/drivers/PostgreSQL/includepg/sql3types.h b/src/terralib/drivers/PostgreSQL/includepg/sql3types.h
deleted file mode 100644
index 6909f2c..0000000
--- a/src/terralib/drivers/PostgreSQL/includepg/sql3types.h
+++ /dev/null
@@ -1,48 +0,0 @@
-#ifndef _ECPG_SQL3TYPES_H
-#define _ECPG_SQL3TYPES_H
-
-/* SQL3 dynamic type codes
- *
- * Copyright (c) 2000, Christof Petig <christof.petig at wtal.de>
- *
- * $PostgreSQL: pgsql/src/interfaces/ecpg/include/sql3types.h,v 1.10 2004/08/29 05:06:59 momjian Exp $
- */
-
-/* chapter 13.1 table 2: Codes used for SQL data types in Dynamic SQL */
-
-enum
-{
-	SQL3_CHARACTER = 1,
-	SQL3_NUMERIC,
-	SQL3_DECIMAL,
-	SQL3_INTEGER,
-	SQL3_SMALLINT,
-	SQL3_FLOAT,
-	SQL3_REAL,
-	SQL3_DOUBLE_PRECISION,
-	SQL3_DATE_TIME_TIMESTAMP,
-	SQL3_INTERVAL,				/* 10 */
-	SQL3_CHARACTER_VARYING = 12,
-	SQL3_ENUMERATED,
-	SQL3_BIT,
-	SQL3_BIT_VARYING,
-	SQL3_BOOLEAN,
-	SQL3_abstract
-	/* the rest is xLOB stuff */
-};
-
-/* chapter 13.1 table 3: Codes associated with datetime data types in Dynamic SQL */
-
-enum
-{
-	SQL3_DDT_DATE = 1,
-	SQL3_DDT_TIME,
-	SQL3_DDT_TIMESTAMP,
-	SQL3_DDT_TIME_WITH_TIME_ZONE,
-	SQL3_DDT_TIMESTAMP_WITH_TIME_ZONE,
-
-	SQL3_DDT_ILLEGAL			/* not a datetime data type (not part of
-								 * standard) */
-};
-
-#endif   /* !_ECPG_SQL3TYPES_H */
diff --git a/src/terralib/drivers/PostgreSQL/includepg/sqlca.h b/src/terralib/drivers/PostgreSQL/includepg/sqlca.h
deleted file mode 100644
index aaf97d0..0000000
--- a/src/terralib/drivers/PostgreSQL/includepg/sqlca.h
+++ /dev/null
@@ -1,66 +0,0 @@
-#ifndef POSTGRES_SQLCA_H
-#define POSTGRES_SQLCA_H
-
-#ifndef DLLIMPORT
-#if  defined(WIN32) || defined(__CYGWIN__)
-#define DLLIMPORT __declspec (dllimport)
-#else
-#define DLLIMPORT
-#endif   /* __CYGWIN__ */
-#endif   /* DLLIMPORT */
-
-#define SQLERRMC_LEN	70
-
-#ifdef __cplusplus
-extern		"C"
-{
-#endif
-
-struct sqlca_t
-{
-	char		sqlcaid[8];
-	long		sqlabc;
-	long		sqlcode;
-	struct
-	{
-		int			sqlerrml;
-		char		sqlerrmc[SQLERRMC_LEN];
-	}			sqlerrm;
-	char		sqlerrp[8];
-	long		sqlerrd[6];
-	/* Element 0: empty						*/
-	/* 1: OID of processed tuple if applicable			*/
-	/* 2: number of rows processed				*/
-	/* after an INSERT, UPDATE or				*/
-	/* DELETE statement					*/
-	/* 3: empty						*/
-	/* 4: empty						*/
-	/* 5: empty						*/
-	char		sqlwarn[8];
-	/* Element 0: set to 'W' if at least one other is 'W'	*/
-	/* 1: if 'W' at least one character string		*/
-	/* value was truncated when it was			*/
-	/* stored into a host variable.				*/
-
-	/*
-	 * 2: if 'W' a (hopefully) non-fatal notice occurred
-	 */	/* 3: empty */
-	/* 4: empty						*/
-	/* 5: empty						*/
-	/* 6: empty						*/
-	/* 7: empty						*/
-
-	char		sqlstate[5];
-};
-
-struct sqlca_t *ECPGget_sqlca(void);
-
-#ifndef POSTGRES_ECPG_INTERNAL
-#define sqlca (*ECPGget_sqlca())
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/src/terralib/drivers/PostgreSQL/readme.txt b/src/terralib/drivers/PostgreSQL/readme.txt
new file mode 100755
index 0000000..517f5a9
--- /dev/null
+++ b/src/terralib/drivers/PostgreSQL/readme.txt
@@ -0,0 +1,44 @@
+Note to users of PostgreSQL driver:
+===================================
+
+1. The file "TePostgreSQL.h e TePostgreSQL.cpp" contains the especifics routines to access a PostgreSQL Server.
+
+2. This version, makes use of RTree over GiST.
+   So, it will be necessary installing this support, please, look the readme file in your GiST directory in the PostgreSQL contrib directory.
+
+2. The tables for Raster, Polygon, Line, Cell and Point will use a column of type box to allow the use of GiST.
+   An old database version can be upgraded by using TerraView or you can do via TerraLib API, with the 
+   routines in the file "TeUpdateDBVersion.cpp" (directory application):
+   - there are two specific routines to upgrade a existing database: updateDB302To310 and PostgreSQLUpdateDB302To310.
+
+   
+3. Any doubts or problems, please e-mail Gilberto Ribeiro de Queiroz at <gribeiro at dpi.inpe.br>
+
+
+Note to users of PostGIS driver:
+================================
+
+1. The file "TePostGIS.h e TePostGIS.cpp" contains the especifics routines to access a PostgreSQL Server with a installed PostGIS extension.
+
+2.This version, makes use of RTree over GiST.
+  So, it will be necessary installing this support, please, look the readme file in your GiST directory in the PostgreSQL contrib directory.
+
+3. The tables for Raster will use a column of type box to allow the use of R-Tree over GiST.
+   An old database version can be upgraded by using TerraView or you can do via TerraLib API, with the 
+   routines in the file "TeUpdateDBVersion.cpp" (directory application):
+   - there are two specific routines to upgrade a existing database: updateDB302To310 and PostgreSQLUpdateDB302To310.
+
+4. The table for Polygons, Lines, Cells and Points use PostGIS geometry type, so the index used were PostGIS R-Tree over GiST and they will be kept,
+   only raster tables will change.
+
+5. Any doubts or problems, please e-mail Gilberto Ribeiro de Queiroz at <gribeiro at dpi.inpe.br>
+
+
+Note to all users of PostgreSQL and PostGIS drivers:
+====================================================
+
+1. Now, the binary cursor are supporting dates, times and timestamp in binary mode.
+
+2. The files TePGUtils.h, TePGUtils.cpp, TePGInterface.h and TePGInterface.cpp are only for internal use, don't make use of it.
+
+
diff --git a/src/terralib/drivers/libjpeg/TeLibJpegWrapper.cpp b/src/terralib/drivers/libjpeg/TeLibJpegWrapper.cpp
new file mode 100755
index 0000000..350f09d
--- /dev/null
+++ b/src/terralib/drivers/libjpeg/TeLibJpegWrapper.cpp
@@ -0,0 +1,216 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+#include <stdio.h>
+
+extern "C" { 
+#include "jmemdstsrc.h"
+} 
+
+#include <string>
+using std::string;
+
+namespace Jpeg
+{
+	bool  ReadFileParams(const string& fileName, int& width, int& height, int& nChannels)
+	{
+		if (fileName.empty())
+			return false;
+
+		FILE* infile;
+		if ((infile = fopen(fileName.c_str(), "rb")) == 0) 
+			return false;
+			
+		struct jpeg_decompress_struct cinfo;
+		struct jpeg_error_mgr jerr;
+		cinfo.err = jpeg_std_error(&jerr);
+		jpeg_create_decompress(&cinfo);
+
+		jpeg_stdio_src(&cinfo, infile);
+		jpeg_read_header(&cinfo, true);
+		jpeg_calc_output_dimensions(&cinfo);
+		
+		width = cinfo.image_width;
+		height = cinfo.image_height;
+		nChannels = cinfo.num_components;
+		jpeg_destroy_decompress(&cinfo);
+		fclose(infile);
+		return true;
+	}
+
+	bool DecompressFile(const string& fileName, unsigned char* dstBuffer, int& width, int& height, int& nChannels)
+	{
+		if (!dstBuffer || fileName.empty())
+			return false;
+
+		FILE* infile;
+		if ((infile = fopen(fileName.c_str(), "rb")) == 0) 
+			return false;
+		
+		struct jpeg_error_mgr jerr;
+		struct jpeg_decompress_struct cinfo;
+		cinfo.err = jpeg_std_error(&jerr);
+		jpeg_create_decompress(&cinfo);
+		jpeg_stdio_src(&cinfo, infile);
+		jpeg_read_header(&cinfo, true);
+		jpeg_start_decompress(&cinfo);
+
+		width = cinfo.output_width; 
+		height = cinfo.output_height;
+		nChannels = cinfo.num_components;	
+
+		unsigned char* rowptr[1];
+		while (cinfo.output_scanline < cinfo.output_height)
+		{
+			rowptr[0] = &dstBuffer[cinfo.output_scanline*cinfo.output_width*cinfo.num_components];
+			jpeg_read_scanlines(&cinfo, rowptr, 1);
+		}
+		jpeg_finish_decompress(&cinfo);
+		jpeg_destroy_decompress(&cinfo);
+		fclose(infile);
+		return true;
+	}	
+
+	bool DecompressBuffer(unsigned char* srcBuffer, int size, unsigned char* dstBuffer, int& width, int& height, int& bpp)
+	{
+		if (!dstBuffer)
+			return false;
+
+		struct jpeg_error_mgr jerr;
+		struct jpeg_decompress_struct cinfo;
+
+		cinfo.err = jpeg_std_error(&jerr);
+		jpeg_create_decompress(&cinfo);
+
+		jpeg_mem_src (&cinfo, srcBuffer, size);
+
+		jpeg_read_header(&cinfo,true);
+		jpeg_start_decompress(&cinfo);
+		
+		width = cinfo.output_width;
+		height = cinfo.output_height;
+		bpp = cinfo.num_components;
+		unsigned char* rowptr[1];
+		while (cinfo.output_scanline < cinfo.output_height)
+		{
+			rowptr[0] = &dstBuffer[cinfo.output_scanline*cinfo.output_width*cinfo.num_components];
+			if (rowptr[0] == 0)
+			{
+				jpeg_finish_decompress(&cinfo);
+				jpeg_destroy_decompress(&cinfo);
+				return false;
+			}
+			if (jpeg_read_scanlines(&cinfo, rowptr, 1) != 1)
+			{
+				jpeg_finish_decompress(&cinfo);
+				jpeg_destroy_decompress(&cinfo);
+				return false;
+			}
+		}
+		jpeg_finish_decompress(&cinfo);
+		jpeg_destroy_decompress(&cinfo);
+		return true;
+	}
+
+	bool CompressToFile(unsigned char* buffer, int width, int height, int bpp, const string& fileName, int quality=75)
+	{
+		// check if input parameters are valid
+		if (fileName.empty() || !buffer || (bpp != 1 && bpp != 3) )
+			return false;
+		
+		// create the destination file
+		FILE* outfile = fopen(fileName.c_str(), "wb");
+		if (outfile == 0) 
+			return false;
+
+		// create access to source buffer as expected by jpeglib
+		JSAMPROW row_pointer[1];	
+		int row_stride = width*bpp;	
+
+		// create compress structure
+		struct jpeg_compress_struct cinfo;
+		struct jpeg_error_mgr jerr;
+		jpeg_create_compress(&cinfo);
+		cinfo.err = jpeg_std_error(&jerr);
+
+		// set the known parameters and default parameters
+		if (bpp == 3)
+			cinfo.in_color_space = JCS_RGB; 
+		else if (bpp == 1)
+			cinfo.in_color_space = JCS_GRAYSCALE; 
+		cinfo.image_width = width;
+		cinfo.image_height = height;
+		cinfo.input_components = bpp;
+		jpeg_set_defaults(&cinfo);
+	    jpeg_set_quality(&cinfo, quality, true);
+		jpeg_stdio_dest(&cinfo, outfile);
+
+		// decompress the data line by line
+		jpeg_start_compress(&cinfo, true);
+		while (cinfo.next_scanline < cinfo.image_height) 
+		{
+			row_pointer[0] = &buffer[cinfo.next_scanline * row_stride];
+			jpeg_write_scanlines(&cinfo, row_pointer, 1);
+		}
+
+		// release structures
+		jpeg_finish_compress(&cinfo);
+		jpeg_destroy_compress(&cinfo);
+
+		fclose(outfile);
+		return true;
+	}
+
+	bool CompressToBuffer(unsigned char* srcBuffer, int width, int height, int bpp, unsigned char* dstBuffer, int& len, int quality)
+	{
+		if (!srcBuffer || !dstBuffer || len<=0 )
+			return false;
+
+		JSAMPROW row_pointer[1];	
+		int row_stride = width*bpp;	
+
+		struct jpeg_error_mgr jerr;
+		struct jpeg_compress_struct cinfo;
+		jpeg_create_compress(&cinfo);
+		cinfo.err = jpeg_std_error(&jerr);
+		if (bpp == 3)
+			cinfo.in_color_space = JCS_RGB; 
+		else if (bpp == 1)
+			cinfo.in_color_space = JCS_GRAYSCALE; 
+		cinfo.image_width = width;
+		cinfo.image_height = height;
+		cinfo.input_components = bpp;
+		jpeg_set_defaults(&cinfo);
+	    jpeg_set_quality(&cinfo, quality, true);
+
+		jpeg_mem_dest(&cinfo,reinterpret_cast<void**>(&dstBuffer),reinterpret_cast<unsigned int*>(&len));
+		jpeg_start_compress(&cinfo,true);
+		while (cinfo.next_scanline < cinfo.image_height) 
+		{
+			row_pointer[0] = &srcBuffer[cinfo.next_scanline * row_stride];
+			jpeg_write_scanlines(&cinfo, row_pointer, 1);
+		}
+		jpeg_finish_compress(&cinfo);
+		jpeg_destroy_compress(&cinfo);
+		return true;
+	}
+}
diff --git a/src/terralib/drivers/libjpeg/TeLibJpegWrapper.h b/src/terralib/drivers/libjpeg/TeLibJpegWrapper.h
new file mode 100755
index 0000000..238046f
--- /dev/null
+++ b/src/terralib/drivers/libjpeg/TeLibJpegWrapper.h
@@ -0,0 +1,97 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeLibJpegWrapper.h
+    This file is a wrapper around libjpeg provinding higher level C++ calls to
+	some functionalities.
+*/
+#ifndef  __TERRALIB_DRIVER_LIBJPEG_WRAPPER_H
+#define  __TERRALIB_DRIVER_LIBJPEG_WRAPPER_H
+
+#include <TeDefines.h>
+#include <string>
+/** 
+ at brief A wrapper around the libjpeg provinding higher level C++ functions
+*/
+namespace Jpeg
+{
+	/** Reads the main informations about a JPEG image file 
+	  \param fileName	name of the file 
+      \param width		return the number of columns of the data
+      \param height		return the number of lines of the data
+	  \param nChannels	return the number of bands, or channels, of the data
+	  \return true or false whether the raster was imported successfully
+	*/
+	TL_DLL bool ReadFileParams(const std::string& fileName, int& width, int& height, int& nChannels);
+
+// --------------  Handles the compression and uncompression to/from files.
+
+	/** Reads and decompresses a JPEG image file to a buffer in memory 
+	  \param fileName	name of the file 
+	  \param dstBuffer	pointer to a buffer to return the decompressed data. The function 
+						assumes that it was allocated with enough space to hold the decompressed data
+      \param width		returns the number of columns of the data
+      \param height		returns the number of lines of the data
+	  \param nChannels	returns the number of bands, or channels, of the data
+	  \return true or false whether the decompressing was successfull or not
+	*/
+	TL_DLL bool DecompressFile(const std::string& fileName, unsigned char* dstBuffer, int& width, int& height, int& nChannels);
+
+	/** Compresses an image buffer to a JPEG image file 
+      \param buffer		address of the buffer that contains the image in memory
+	  \param width		width of image in pixels
+      \param height		height of image in pixels
+	  \param bpp		number of bytes per pixel (1 or 3)
+	  \param fileName	name of the compressed file 
+	  \param quality	image quality as a percentage value
+	  \return true or false whether the compressing was successfull or not
+	*/
+	TL_DLL bool CompressToFile(unsigned char* buffer, int width, int height, int bpp, const std::string& fileName, int quality=75);
+
+	/** Decompresses a JPEG image buffer to a buffer in memory 
+	  \param srcBuffer	memory address containing jpeg compressed data 
+	  \param size		size in bytes of the jpeg compressed data
+	  \param dstBuffer	pointer to a buffer to return the decompressed data. The function 
+						assumes that it was allocated with enough space to hold the decompressed data
+      \param width		return the number of columns of the data
+      \param height		return the number of lines of the data
+	  \param bpp		return the number of bytes per pixel
+	  \return true or false whether the decompressing was successfull or not
+	*/
+	TL_DLL bool DecompressBuffer(unsigned char* srcBuffer, int size, unsigned char* dstBuffer, int& width, int& height, int& bpp); 
+
+	/** Compresses an image buffer to a JPEG image in memory 
+      \param srcBuffer	address of the image in memory
+	  \param width		width of image in pixels
+      \param height		height of image in pixels
+	  \param bpp		number of bytes per pixel (1 or 3)
+	  \param dstBuffer	pointer to a buffer to buffer to return the compressed data. The function assumes that it was allocated 
+						with enough space to hold the compressed data
+	  \param len		returns the size of the compressed data. Initially this parameter should contain 
+						the size of the pre-allocated buffer
+	  \param quality	image quality as a percentage
+	  \return true or false whether the compressing was successfull or not
+	*/
+	TL_DLL bool CompressToBuffer(unsigned char* srcBuffer, int width, int height, int bpp, unsigned char* dstBuffer, int& len, int quality=75); 
+}
+#endif
+
diff --git a/src/terralib/drivers/libjpeg/jmemdst.c b/src/terralib/drivers/libjpeg/jmemdst.c
new file mode 100755
index 0000000..f868219
--- /dev/null
+++ b/src/terralib/drivers/libjpeg/jmemdst.c
@@ -0,0 +1,157 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+
+/* this is not a core library module, so it doesn't define JPEG_INTERNALS */
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "jmemdstsrc.h"
+/*
+ Initialize destination 
+ */
+METHODDEF(void)
+init_destination (j_compress_ptr cinfo)
+{
+	mem_dest_ptr dest = (mem_dest_ptr) cinfo->dest;
+
+	/* have the compresser write the image target memory */
+	dest->pub.next_output_byte = (*(dest->pTargetData));
+	dest->pub.free_in_buffer = dest->initialDataSize;
+}
+
+
+/* 
+ * change_target_buffer_size() enlarges pTargetData if needed
+ * it is used by empty_output_buffer() and term_destination()
+ */
+void change_target_buffer_size(j_compress_ptr cinfo, unsigned int new_size)
+{
+	mem_dest_ptr dest = (mem_dest_ptr)cinfo->dest;
+	JOCTET * new_ptr = NULL;
+	JOCTET * old_ptr = *(dest->pTargetData);
+	if(new_size == dest->initialDataSize)
+      return;
+	if(new_size < dest->initialDataSize && dest->bufferPreallocated && !dest->bufferSizeChanged)
+      return;
+	new_ptr = (JOCTET*)malloc(new_size);
+	if (new_ptr)
+	{
+		dest->initialDataSize = new_size;
+		dest->bufferSizeChanged = 1;
+		memcpy(new_ptr, old_ptr, *(dest->pNumBytes));
+		free(old_ptr);
+		*(dest->pTargetData) = new_ptr;
+   }
+   else if(!dest->bufferPreallocated)
+   {
+		free(old_ptr);
+		dest->initialDataSize = 0;
+		*(dest->pTargetData) = NULL;
+		*(dest->pNumBytes) = 0;
+//      ERROR!
+   }
+}
+
+/*
+ * Empty the output buffer --- called whenever buffer fills up.
+ */
+METHODDEF(boolean)
+empty_output_buffer (j_compress_ptr cinfo)
+{
+	mem_dest_ptr	dest = (mem_dest_ptr) cinfo->dest;
+	*(dest->pNumBytes) = dest->initialDataSize;
+
+	change_target_buffer_size(cinfo, dest->initialDataSize + OUTPUT_BUF_SIZE);
+
+	dest->pub.next_output_byte = *(dest->pTargetData) + *(dest->pNumBytes);
+	dest->pub.free_in_buffer = OUTPUT_BUF_SIZE;
+
+	return TRUE;
+}
+
+/*
+ * Terminate destination --- called by jpeg_finish_compress
+ */
+METHODDEF(void)
+term_destination (j_compress_ptr cinfo)
+{
+	mem_dest_ptr dest = (mem_dest_ptr)cinfo->dest;
+	if (dest->bufferSizeChanged)
+	{
+		unsigned int datacount = OUTPUT_BUF_SIZE - dest->pub.free_in_buffer;
+		*(dest->pNumBytes) += datacount;
+		change_target_buffer_size(cinfo, *(dest->pNumBytes));
+	}
+	else
+	{
+	   *(dest->pNumBytes) = dest->initialDataSize - dest->pub.free_in_buffer;
+	}
+   return;
+}
+
+/*
+ * Prepare for output to an allocated buffer.
+ * The caller is responsible for free()ing the buffer when they are done.
+ */
+
+GLOBAL(void)
+jpeg_mem_dest(j_compress_ptr cinfo, void **pTargetData, unsigned int *pNumBytes)
+{
+	mem_dest_ptr dest;	if(cinfo->dest == NULL)
+	{
+		cinfo->dest = (struct jpeg_destination_mgr *)
+        (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,
+        sizeof(mem_destination_mgr));
+	}
+
+	dest = (mem_dest_ptr) cinfo->dest;
+	dest->pub.init_destination = init_destination;
+	dest->pub.empty_output_buffer = empty_output_buffer;
+	dest->pub.term_destination = term_destination;
+   /* if the number of bytes > 0 and the data pointer is not NULL, then we
+      assume that space has been allocated, otherwise, we allocate here */
+	if (( *pNumBytes > 0 ) && (*pTargetData ))
+	{
+		dest->bufferPreallocated = 1;
+		dest->initialDataSize = *pNumBytes;
+	}
+	else
+	{
+		dest->bufferPreallocated = 0;
+		if(!((*pTargetData) = malloc(OUTPUT_BUF_SIZE * sizeof(JOCTET))))
+		{
+         /* malloc() failed - call jpeg error/exit subsystem */
+		// ERROR( cinfo, JERR_OUT_OF_MEMORY, 0);
+		}
+		else
+		{
+			dest->initialDataSize = OUTPUT_BUF_SIZE;
+		}
+   }
+
+   dest->pNumBytes = pNumBytes;
+   dest->pTargetData = (JOCTET**)pTargetData;
+   dest->bufferSizeChanged = 0;
+   *pNumBytes = 0;
+	return;
+}
diff --git a/src/terralib/drivers/libjpeg/jmemdstsrc.h b/src/terralib/drivers/libjpeg/jmemdstsrc.h
new file mode 100755
index 0000000..f8a3e21
--- /dev/null
+++ b/src/terralib/drivers/libjpeg/jmemdstsrc.h
@@ -0,0 +1,68 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file jmemdst.h
+    \brief This file complements the jpeglib source in order to allow the writting of a JPEG data to a buffer in memory
+	\note THIS IS FOR INTERNAL USE. DO NOT USE IT DIRECTLY.
+*/
+#ifndef  __TERRALIB_INTERNAL_DRIVER_JPEGLIB_MEMDST_H
+#define  __TERRALIB_INTERNAL_DRIVER_JPEGLIB_MEMDST_H
+
+#include "jpeglib.h"
+ 
+/*! Expanded data destination object for memory buffer output 
+	\note THIS IS FOR INTERNAL USE. DO NOT USE IT DIRECTLY.
+*/
+typedef struct 
+{
+  struct jpeg_destination_mgr pub;	/* public fields */
+  JOCTET **pTargetData;				/* memory buffer for jpeg output */
+  unsigned int *pNumBytes;			/* number of bytes in the buffer */
+  unsigned int initialDataSize;		/* size of the initially allocated buffer*/
+  int bufferPreallocated;			/* boolean indicating whether buffer was previously allocated */
+  int bufferSizeChanged;			/* boolean indicating whether buffer was changed inside the routine*/ 
+} mem_destination_mgr;
+
+typedef mem_destination_mgr * mem_dest_ptr;
+
+/*! try initial buffer size of 1M */
+#define OUTPUT_BUF_SIZE  ((unsigned int)1048576)
+
+//! Function to allows the writting of JPEG data to a memory buffer
+GLOBAL(void)
+jpeg_mem_dest(j_compress_ptr cinfo, void **pTargetData,	unsigned int *pNumBytes);
+
+// Expanded data source object for memory buffer input
+typedef struct
+{
+	struct jpeg_source_mgr pub;   
+	unsigned char* buffer;
+	unsigned int   bufsize;
+} my_source_mgr;
+
+typedef my_source_mgr* my_src_ptr;
+
+//! Function to allows the reading of JPEG data from a memory buffer
+GLOBAL(void)
+jpeg_mem_src (j_decompress_ptr cinfo, unsigned char* buffer, unsigned int bufsize);
+
+#endif   
diff --git a/src/terralib/drivers/libjpeg/jmemsrc.c b/src/terralib/drivers/libjpeg/jmemsrc.c
new file mode 100755
index 0000000..6857e3d
--- /dev/null
+++ b/src/terralib/drivers/libjpeg/jmemsrc.c
@@ -0,0 +1,94 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+#include <stdio.h>
+#include <stdlib.h>
+#include "jmemdstsrc.h"
+/*
+ Initialize source --- Nothing to do
+ */
+METHODDEF(void)
+init_source (j_decompress_ptr cinfo)
+{}
+
+
+/*
+ Fill the input buffer --- called whenever buffer is emptied.
+ */
+METHODDEF(boolean)
+fill_input_buffer (j_decompress_ptr cinfo)
+{
+	my_src_ptr src = (my_src_ptr) cinfo->src;
+
+	src->pub.next_input_byte = src->buffer;
+	src->pub.bytes_in_buffer = src->bufsize;
+
+	return TRUE;
+}
+
+/*
+ Skip data --- used to skip over a potentially large amount of
+ uninteresting data.
+ */
+METHODDEF(void)
+skip_input_data (j_decompress_ptr cinfo, long num_bytes)
+{
+	my_src_ptr src = (my_src_ptr) cinfo->src;
+
+	/* just move the ptr */
+	src->pub.next_input_byte += num_bytes;
+	src->pub.bytes_in_buffer -= num_bytes;
+}
+
+/*
+  Terminate source --- called by jpeg_finish_decompress
+ */
+METHODDEF(void)
+term_source (j_decompress_ptr cinfo)
+{}
+
+/*
+ Prepare for input from a memory buffer.
+ */
+GLOBAL(void)
+jpeg_mem_src (j_decompress_ptr cinfo, unsigned char* buffer, unsigned int bufsize)
+{
+	my_src_ptr src;
+
+	if (cinfo->src == NULL) {
+		cinfo->src = (struct jpeg_source_mgr *)
+		(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT,  sizeof(my_source_mgr));
+  }
+
+	src = (my_src_ptr) cinfo->src;
+	src->pub.init_source = init_source;
+	src->pub.fill_input_buffer = fill_input_buffer;
+	src->pub.skip_input_data = skip_input_data;
+	src->pub.resync_to_restart = jpeg_resync_to_restart; 
+	src->pub.term_source = term_source;
+	src->pub.bytes_in_buffer = 0; 
+	src->pub.next_input_byte = NULL; 
+
+	src->buffer = buffer;
+	src->bufsize = bufsize;
+}
+
diff --git a/src/terralib/drivers/qt/TeAddressNotifyFunctorWindow.h b/src/terralib/drivers/qt/TeAddressNotifyFunctorWindow.h
new file mode 100755
index 0000000..f5018cb
--- /dev/null
+++ b/src/terralib/drivers/qt/TeAddressNotifyFunctorWindow.h
@@ -0,0 +1,84 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeAddressNotifyFunctorWindow.h
+    \brief This file contains a notification window for address geocodofication.
+*/
+
+/**
+  *@author Gilberto Ribeiro de Queiroz and Ricardo Cartaxo
+  */
+
+#ifndef  __TERRALIB_INTERNAL_ADDRESSNOTIFYFUNCTORWINDOW_H
+#define  __TERRALIB_INTERNAL_ADDRESSNOTIFYFUNCTORWINDOW_H
+
+#include <TeAddressLocator.h>
+#include <addressChoiceWindow.h>
+#include <qcheckbox.h>
+
+//! A notification window for address geocodofication
+class TeAdressNotifyFunctorWindow : public TeAbstractAddressNotifyFunctor
+{
+	protected:
+
+		QDialog* w_;
+		bool selectFirst_;
+		bool selectAllVisible_;
+
+	public:
+
+		TeAdressNotifyFunctorWindow(QDialog* w, const bool& selectAllVisible = true)
+			: w_(w), selectFirst_(false), selectAllVisible_(selectAllVisible)
+		{			
+		}
+
+		virtual ~TeAdressNotifyFunctorWindow()
+		{
+		}
+		
+		int operator()(const TeAddress& searchedAddress, vector<TeAddressDescription>& foundAddresses)
+		{
+			if(selectFirst_)
+				return 0;
+
+			AddressChoiceWindow *addWindow = new AddressChoiceWindow(w_, "addWindow", true);
+		
+			addWindow->listSearchedAddress(searchedAddress);
+
+			addWindow->listFoundedAddressListBox(foundAddresses);
+
+			addWindow->selectAllCheckBoxVisible(selectAllVisible_);
+
+			if(addWindow->exec() != QDialog::Accepted)
+				return -1;
+
+			int ret = addWindow->getChoosedAddress();
+
+			selectFirst_ = addWindow->selectAllCheckBox->isOn();
+
+			delete addWindow;
+
+			return ret;
+		}
+};
+
+#endif	// __TERRALIB_INTERNAL_ADDRESSNOTIFYFUNCTORWINDOW_H
diff --git a/src/terralib/drivers/qt/TeDecoderQtImage.cpp b/src/terralib/drivers/qt/TeDecoderQtImage.cpp
new file mode 100755
index 0000000..cd7253e
--- /dev/null
+++ b/src/terralib/drivers/qt/TeDecoderQtImage.cpp
@@ -0,0 +1,125 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#include <TeDecoderQtImage.h>
+
+TeDecoderQtImage::TeDecoderQtImage ( const TeRasterParams& par )
+{
+	image_ = 0;
+	transp_ = 255;
+	params_ = par;
+}
+
+TeDecoderQtImage::~TeDecoderQtImage ()
+{
+	clear ();
+	transp_ = 255;
+}
+
+void
+TeDecoderQtImage::init()
+{
+	params_.status_= TeRasterParams::TeNotReady;
+	if (params_.mode_ == 'c')	// creating a new file
+	{
+		clear ();
+		image_ = new QImage (params_.ncols_,params_.nlines_,32);
+		params_.status_ = TeRasterParams::TeReadyToWrite;
+	}
+	else if (params_.mode_ == 'w')
+	{
+		if (image_)
+			params_.status_ = TeRasterParams::TeReadyToWrite;
+	}
+	else if (params_.mode_ == 'r')
+	{
+		if (image_)
+			params_.status_ = TeRasterParams::TeReadyToRead;	
+	}
+	image_->fill(0);
+}
+
+bool
+TeDecoderQtImage::clear()
+{
+	if (image_ != 0)
+		delete image_;
+	image_ = 0;
+	return true;
+}
+
+bool 
+TeDecoderQtImage::getElement (int col, int lin, double &val,int band)
+{
+	QRgb cell = image_->pixel(col, lin);
+	if (band == 0)
+	{
+		val = (double) qRed(cell);
+		return true;
+	}
+	if (band == 1)
+	{
+		val = (double) qGreen(cell);
+		return true;
+	}
+	if (band == 2)
+		val = (double) qBlue(cell);
+	return true;
+}
+
+bool 
+TeDecoderQtImage::setElement (int col, int lin, double val,int band )
+{
+	uchar* c = image_->scanLine(lin);
+	int pixel = col << 2;
+	c[pixel+2-band] = (uchar)val;
+	c[pixel+3] = transp_;
+	return true;
+}
+
+bool 
+TeDecoderQtImage::setElementRGB(int col, int lin, double Rval, double Gval, double Bval, unsigned int /*transp*/)
+{
+	unsigned int val = (transp_ << 24) | 
+		               static_cast<int>(Rval) << 16 | 
+					   static_cast<int>(Gval) << 8  |
+					   static_cast<int>(Bval);
+	image_->setPixel(col,lin,val);
+	return true;
+}
+
+bool 
+TeDecoderQtImage::setAlphaBufferToTransparent()
+{
+	int	i, j, p;
+	int width = image_->width();
+	int height = image_->height();
+
+	for(i=0; i<height; ++i)
+	{
+		uchar* c = image_->scanLine(i);
+		for(j=0; j<width; ++j)
+		{
+			p = (j << 2) + 3;
+			c[p] = 0;
+		}
+	}
+	return true;
+}
diff --git a/src/terralib/drivers/qt/TeDecoderQtImage.h b/src/terralib/drivers/qt/TeDecoderQtImage.h
new file mode 100755
index 0000000..c21cb71
--- /dev/null
+++ b/src/terralib/drivers/qt/TeDecoderQtImage.h
@@ -0,0 +1,74 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeDecoderQtImage.h
+    \brief This file contais the definitions of a decoder to a QTImage
+*/
+#ifndef __TERRALIB_INTERNAL_DECODERQTIMAGE_H
+#define __TERRALIB_INTERNAL_DECODERQTIMAGE_H
+
+#include "TeDecoder.h"
+#include <qimage.h>
+
+//! Implements a decoder to access a Qt image as a TeRaster
+class TeDecoderQtImage : public TeDecoder
+{
+public:
+	TeDecoderQtImage ( const TeRasterParams& );
+	~TeDecoderQtImage ();
+
+	bool setElement (int col, int lin, double val, int band = 0);
+	bool getElement (int col, int lin, double &val, int band = 0);
+
+	void init	();
+	bool clear	();
+	QImage*	getImage () { return image_; }
+
+	bool setElementRGB(int col, int lin, double Rval, double Gval, double Bval, unsigned int /*transp*/ = 255);
+
+	bool setAlphaBufferToTransparent();
+
+	void setTransparency(int t)
+	{ transp_ = t; }
+
+	unsigned int getTransparency()
+	{	return transp_; }
+
+private:
+
+	QImage*	image_;
+	unsigned int transp_;
+};
+
+//! Implements a factory to build TeQtDecoders
+class TeDecoderQtImageFactory : public TeDecoderFactory
+{
+public:
+
+	TeDecoderQtImageFactory(const string& name) : TeDecoderFactory(name) {}
+
+	virtual TeDecoder* build (const TeRasterParams& arg)
+	{  return new TeDecoderQtImage(arg); }
+};
+
+#endif
+
diff --git a/src/terralib/drivers/qt/TeGUIUtils.cpp b/src/terralib/drivers/qt/TeGUIUtils.cpp
new file mode 100755
index 0000000..647352b
--- /dev/null
+++ b/src/terralib/drivers/qt/TeGUIUtils.cpp
@@ -0,0 +1,272 @@
+#include "TeGUIUtils.h"
+#include <TeViewNode.h>
+#include <TeAppTheme.h>
+#include <TeView.h>
+#include <TeDatabase.h>
+
+bool fillThemeCombo(TeGeomRep tg, TeView* view, QComboBox* cBox, string selName, bool clear)
+{
+//	bool enableWindow = false;
+	
+	if (clear)
+		cBox->clear();
+	
+	int idx = 0;
+	int count = 0;
+
+	vector<TeViewNode *>& themeVec = view->themes();
+	for(unsigned int i=0; i<themeVec.size(); i++)
+	{
+		TeAbstractTheme* t = (TeAbstractTheme*)themeVec[i];
+		if(t->type() < 2 && t->visibleGeoRep() & tg)
+		{
+			cBox->insertItem(t->name().c_str());
+			if (!t->name().compare(selName)) 
+			{
+				idx = count;
+			}
+			count++;
+		}
+	}
+  
+	if (count > 0) 
+	{
+		cBox->setCurrentItem(idx);
+	}
+	
+	return (count > 0);
+}
+
+bool fillThemeCombo(vector<TeGeomRep>& tg, TeView* view, QComboBox* cBox, string selName, bool clear)
+{
+	if(clear)
+		cBox->clear();
+	
+	vector<TeViewNode *> themeVec = view->themes();
+	if (clear)
+		cBox->clear();
+	
+	int idx = 0;
+	int count = 0;
+	
+	for(unsigned int i=0; i<themeVec.size(); i++)
+	{
+		TeAbstractTheme* t = (TeAbstractTheme*)themeVec[i];
+		if (t->type() >= 2)
+			continue;
+
+		bool hasGeomRep = false;
+		for(unsigned int j=0; j<tg.size(); ++j)
+		{
+			if(t->visibleGeoRep() & tg[j])
+				hasGeomRep = true;
+		}
+		
+		if(hasGeomRep)
+		{
+			cBox->insertItem(t->name().c_str());
+			if (!t->name().compare(selName)) 
+			{
+				idx = count;
+			}
+			count++;
+		}
+	}
+  
+	if (count > 0) 
+	{
+		cBox->setCurrentItem(idx);
+	}
+	
+	return (count > 0);
+}
+
+bool fillThemeCombo( TeView* view, QComboBox* cBox, string selName, bool clear)
+{
+	vector<TeViewNode *> themeVec = view->themes();
+	
+	if (clear)
+		cBox->clear();
+	
+	int idx = 0;
+	int count = 0;
+	
+	for(unsigned int i=0; i<themeVec.size(); i++)
+	{
+		TeAbstractTheme* t = (TeAbstractTheme*)themeVec[i];
+		if (t->type() >= 2)
+			continue;
+		cBox->insertItem(t->name().c_str());
+		if (!t->name().compare(selName)) 
+		{
+			idx = count;
+		}
+		count++;
+	}
+  
+	if (count > 0) 
+	{
+		cBox->setCurrentItem(idx);
+	}
+	
+	return (count > 0);
+}
+
+
+bool fillTableCombo(TeView* view,
+                     QComboBox *cTableCombo, 
+                     QComboBox *cThemeCombo,
+                     string selName, bool clear, TeAttrTableType tableType)
+{
+	TeTable ttable;
+	string tableName;
+	string themeName =  string(cThemeCombo->currentText().ascii());
+	TeTheme* currTheme = view->get(themeName);
+
+	if (currTheme == NULL) 
+		return false;
+
+	TeAttrTableVector atvec;
+	currTheme->getAttTables(atvec, tableType);
+	
+	if (atvec.size() == 0)
+		return false;
+
+	if (clear)
+		cTableCombo->clear();
+	int idx = 0;
+	
+	for(unsigned int i=0; i<atvec.size(); i++)
+	{
+		TeTable ttable = atvec[i];
+		tableName = ttable.name();
+		cTableCombo->insertItem(tableName.c_str());
+		if(selName.compare(tableName)) 
+		{
+			idx = i;
+		}
+	}
+	
+	cTableCombo->setCurrentItem(idx);
+	return true;
+}
+
+
+bool fillColumnCombo(TeAttrDataType aType,
+                      TeTheme* theme,
+                      QComboBox *cColumnCombo, 
+                      QComboBox *cTableCombo,
+                      string selName, bool clear) 
+{
+
+//	bool done = false;
+  
+	TeAttributeList columns;
+	TeAttrTableVector atvec;
+  theme->getAttTables(atvec);
+
+	string tableName = string(cTableCombo->currentText().ascii());
+	unsigned int t;
+
+	for (t = 0; t < atvec.size(); t++) 
+	{
+		if (!tableName.compare(atvec[t].name()))
+			break;
+	}
+	
+	if (t == atvec.size())
+		return false;
+
+	TeTable ttable = atvec[t];
+	columns = ttable.attributeList();
+	
+	if (clear)
+		cColumnCombo->clear();
+	
+	int idx = 0;
+	int count = 0;
+	
+	for(unsigned int i=0; i<columns.size(); i++)
+	{
+		int type = columns[i].rep_.type_;
+		string colName = columns[i].rep_.name_;	
+		if ((aType == TeUNKNOWN) || (type == aType)) 
+		{
+			cColumnCombo->insertItem(colName.c_str());
+			if (!selName.compare(colName)) 
+			{
+				idx = count;
+			}
+			count++;
+		}
+	}
+	
+	if (count > 0) 
+		cColumnCombo->setCurrentItem(idx);
+	
+	return count> 0;
+}
+
+bool fillColumnCombo(vector<TeAttrDataType> &aTypeVec,
+                      TeTheme* theme,
+                      QComboBox *cColumnCombo, 
+                      QComboBox *cTableCombo,
+                      string selName, bool clear)
+{
+	if(clear)
+		cColumnCombo->clear();
+
+	for(unsigned int i = 0; i < aTypeVec.size(); i++)
+		fillColumnCombo(aTypeVec[i], theme, cColumnCombo, cTableCombo, selName, false);
+	
+	return true;
+}
+
+bool fillColumnCombo(vector<TeAttrDataType> &aTypeVec, TeTheme* theme,  QComboBox *cColumnCombo, bool clear)
+{
+	if(clear)
+		cColumnCombo->clear();
+	TeAttrTableVector attrTables = theme->attrTables();
+	for(unsigned int i=0; i<attrTables.size(); ++i)
+	{
+		TeAttributeList attrList = attrTables[i].attributeList();
+		for(unsigned int j=0; j<attrList.size(); ++j)
+		{
+			for(unsigned int type=0; type<aTypeVec.size(); ++type)
+			{
+				if(attrList[j].rep_.type_==aTypeVec[type])
+				{
+					string tableCol = attrTables[i].name()+"."+attrList[j].rep_.name_;
+					cColumnCombo->insertItem(tableCol.c_str());
+				}
+			}
+		}
+	}
+	return true;
+}
+
+bool fillLayerCombo(TeDatabase* db, TeGeomRep rep, QComboBox *lColumnCombo, const string& current, bool clear)
+{
+	int cur=0;
+	if (clear)
+		lColumnCombo->clear();
+	else
+		cur=lColumnCombo->count();
+
+	TeLayerMap& layerMap = db->layerMap();
+	TeLayerMap::iterator itlay = layerMap.begin();
+	int i=0;
+	while ( itlay != layerMap.end() )
+	{
+		if ((*itlay).second->geomRep() & rep)
+		{
+			lColumnCombo->insertItem((*itlay).second->name().c_str());
+			if ((*itlay).second->name() == current)
+				cur += i;
+			++i;
+		}
+		++itlay;
+	}
+	lColumnCombo->setCurrentItem(cur);
+	return i>0;
+}
diff --git a/src/terralib/drivers/qt/TeGUIUtils.h b/src/terralib/drivers/qt/TeGUIUtils.h
new file mode 100755
index 0000000..002d56c
--- /dev/null
+++ b/src/terralib/drivers/qt/TeGUIUtils.h
@@ -0,0 +1,60 @@
+#ifndef __GUIUTILSH
+#define __GUIUTILSH
+
+#include <TeDataTypes.h>
+#include <qcombobox.h>
+
+class TeView;
+class TeTheme;
+class TeDatabase;
+
+
+//! Fills the comboBox (cBox) with the themes that belong to the view and have a specific geometric representation   
+bool fillThemeCombo(TeGeomRep tg, 
+                TeView* view, 
+                QComboBox* cBox, 
+                string selName, bool clear=true);
+
+//! Fills the comboBox (cBox) with the themes that belong to the view and have the geometric representations   
+bool fillThemeCombo(vector<TeGeomRep>& tg, 
+                TeView* view, 
+                QComboBox* cBox, 
+                string selName, bool clear=true);
+
+
+//! Fills the comboBox (cBox) with all the themes that belong to the view    
+bool fillThemeCombo( TeView* view, 
+                QComboBox* cBox, 
+                string selName, bool clear=true);
+
+
+//! Fills the comboBox (cTableCombo) with the tables of the comboBox (cThemeCombo) current theme  
+bool fillTableCombo(TeView* view,
+                     QComboBox *cTableCombo, 
+                     QComboBox *cThemeCombo,
+                     string selName="", bool clear=true, TeAttrTableType tableType=TeAllAttrTypes);
+
+
+//! Fills the comboBox (cColumnCombo) with the specific type columns of the comboBox (cTableCombo) current table  
+bool fillColumnCombo(TeAttrDataType aType,
+                     TeTheme* theme,
+                     QComboBox *cColumnCombo, 
+                     QComboBox *cTableCombo,
+                     string selName, bool clear=true);
+
+//! Fills the comboBox (cColumnCombo) with columns of the comboBox (cTableCombo) current table  
+bool fillColumnCombo(vector<TeAttrDataType> &aTypeVec,
+                      TeTheme* theme,
+                      QComboBox *cColumnCombo, 
+                      QComboBox *cTableCombo,
+                      string selName="", bool clear=true);
+
+//! Fills the comboBox (cColumnCombo) with the all columns of specific types of the current theme  "tableName.columnName"
+bool fillColumnCombo(vector<TeAttrDataType> &aTypeVec,
+                     TeTheme* theme,
+                     QComboBox *cColumnCombo, bool clear=true);
+
+//! Fills the comboBox (lColumnCombo) with the all layers with specific representations
+bool fillLayerCombo(TeDatabase* db, TeGeomRep rep, QComboBox *lColumnCombo, const string& selName="", bool clear=true);
+
+#endif
diff --git a/src/terralib/application/qt/TeInitRasterQtDecoder.cpp b/src/terralib/drivers/qt/TeInitRasterQtDecoder.cpp
old mode 100644
new mode 100755
similarity index 100%
rename from src/terralib/application/qt/TeInitRasterQtDecoder.cpp
rename to src/terralib/drivers/qt/TeInitRasterQtDecoder.cpp
diff --git a/src/terralib/drivers/qt/TeQtAnimaThread.cpp b/src/terralib/drivers/qt/TeQtAnimaThread.cpp
new file mode 100755
index 0000000..ed32875
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtAnimaThread.cpp
@@ -0,0 +1,117 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+#include <TeQtAnimaThread.h>
+#include <TeQtCanvas.h>
+#include <qpainter.h>
+#include <qpaintdevice.h>
+#include <qlineedit.h>
+#include <qcheckbox.h>
+#include <qpushbutton.h>
+#include <qslider.h>
+#include <animation.h>
+#include <qdatetime.h>
+
+void TeQtAnimaThread::run()
+{
+	bool init = false;
+	stop_ = false;
+	frame_ = pauseFrame_;
+	frames_ = fileList_.count();
+	animation_->playingScrollBar->setMinValue(0);
+	animation_->playingScrollBar->setMaxValue(frames_-1);
+	animation_->playingScrollBar->setValue(frame_);
+	while(frame_ < frames_)
+	{
+		showFrame(frame_);
+		if(pause_)
+			frame_ = pauseFrame_;
+		if(pause_ || stop_)
+			break;
+
+		int t = 10000 / animation_->velocitySlider->value() - 10000 / animation_->velocitySlider->maxValue();
+		sleep(t);
+		frame_++;
+		if(frame_ == frames_)
+		{
+			if(animation_->loopCheckBox->isChecked())
+			{
+				sleep(t);
+				sleep(t);
+				frame_ = 0;
+			}
+			else
+				init = true;
+		}
+	}
+	if(init)
+	{
+		animation_->stopButton->setEnabled(false);
+		animation_->pauseButton->setEnabled(false);
+		animation_->playButton->setEnabled(true);
+		animation_->playingScrollBar->setEnabled(false);
+		showFrame(0);
+	}
+}
+
+void TeQtAnimaThread::showFrame(int i)
+{
+	if((unsigned int)i >= fileList_.count())
+		return;
+	pauseFrame_ = i;
+	QString s = *(fileList_.at(i));
+	QString ss = dir_.absPath() + "/" + s;
+	QPixmap pixmap(ss);
+	QRect rect = pixmap.rect();
+	QRect crect = canvas_->viewport()->rect();
+	rect = crect.intersect(rect);
+	QPaintDevice *device = canvas_->viewport();
+	bitBlt(device, 0, 0, &pixmap, 0, 0, rect.width(), rect.height(), Qt::CopyROP);
+	animation_->frameNumberLineEdit->setText(Te2String(pauseFrame_).c_str());
+	animation_->playingScrollBar->setValue(pauseFrame_);
+}
+
+void TeQtAnimaThread::setAnimation(Animation* a, QDir d)
+{
+	animation_ = a;
+	dir_ = d;
+	fileList_ = dir_.entryList(QDir::Files);
+}
+
+void TeQtAnimaThread::stop()
+{
+	if(pause_)
+		pause_=false;
+	stop_ = true; wait();
+}
+
+void TeQtAnimaThread::sleep(int t)
+{
+	QTime time;
+	time.start();
+
+	int vel = animation_->velocitySlider->value();
+	int frame = animation_->playingScrollBar->value();
+	while(time.elapsed() < t)
+	{
+		if(pause_ || stop_ || vel != animation_->velocitySlider->value() || frame != animation_->playingScrollBar->value())
+			break;
+	}
+}
diff --git a/src/terralib/application/qt/TeQtAnimaThread.h b/src/terralib/drivers/qt/TeQtAnimaThread.h
old mode 100644
new mode 100755
similarity index 100%
rename from src/terralib/application/qt/TeQtAnimaThread.h
rename to src/terralib/drivers/qt/TeQtAnimaThread.h
diff --git a/src/terralib/drivers/qt/TeQtBigTable.cpp b/src/terralib/drivers/qt/TeQtBigTable.cpp
new file mode 100755
index 0000000..8afe248
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtBigTable.cpp
@@ -0,0 +1,158 @@
+#include <TeQtBigTable.h>
+#include <TeQtDataSource.h>
+#include <qpainter.h>
+#include <qapplication.h>
+
+
+
+TeQtBigTable::TeQtBigTable(QWidget *parent, const char *name)
+        : QTable(parent, name)
+{
+}
+
+TeQtBigTable::TeQtBigTable(TeQtDataSource *dSource, QWidget *parent, const char *name)
+        : QTable(dSource->numRows(), dSource->numCols(), parent, name),
+          dataSource_(dSource), editor_(0)
+{
+	connect(dataSource_, SIGNAL(dataChanged()), this, SLOT(updateContents()));
+}
+
+void TeQtBigTable::setDataSource(TeQtDataSource *dSource)
+{
+	dataSource_ = dSource;
+
+	connect(dataSource_, SIGNAL(dataChanged()), this, SLOT(updateContents()));
+}
+
+void TeQtBigTable::updateContents()
+{
+	if (numRows() == 0 || numCols() == 0)
+	{
+		setNumRows(dataSource_->numRows());
+		setNumCols(dataSource_->numCols());
+	}
+	QTable::updateContents();
+}
+
+QString TeQtBigTable::text(int row, int col) const
+{
+	QVariant v(dataSource_->cell(row, col));
+	return v.toString();
+}
+    
+
+void TeQtBigTable::paintCell(QPainter *painter, int row, int col,
+                          const QRect &cr, bool selected, const QColorGroup &cg)
+{
+	QRect rect(0, 0, cr.width(), cr.height());
+	if (selected)
+	{
+		painter->fillRect(rect, cg.highlight());
+		painter->setPen(cg.highlightedText());
+	}
+	else
+	{
+		painter->fillRect(rect, cg.base());
+		painter->setPen(cg.text());
+	}
+
+	QTable::paintCell(painter, row, col, cr, selected, cg);
+
+	QVariant v(dataSource_->cell(row, col));
+	if (v.type() == QVariant::Pixmap)
+	{
+		QPixmap p = v.toPixmap();
+		painter->drawPixmap(0, 0, p);
+	}
+	else if (v.type() == QVariant::String || v.type() == QVariant::CString)
+	{
+		QString qs = v.toString();
+		bool ok;
+		qs.toDouble(&ok);
+		if (ok)
+			painter->drawText(0, 0, cr.width()-10, cr.height(), Qt::AlignRight | Qt::SingleLine, v.toString());
+		else
+			painter->drawText(0, 0, cr.width()-10, cr.height(), Qt::AlignLeft | Qt::SingleLine, v.toString());
+
+	}
+}
+
+QWidget* TeQtBigTable::createEditor(int row, int col, bool initFromCell) const
+{
+	QVariant v(dataSource_->cell(row, col));
+	if (v.type() == QVariant::Pixmap)
+		return 0;
+
+	editor_ = new QLineEdit(viewport());
+	if (initFromCell)
+		editor_->setText(text(row, col));
+	return editor_;
+}
+
+
+QWidget* TeQtBigTable::cellWidget(int row, int col) const
+{
+	if (row < 0 || col < 0)
+		return 0;
+	
+	if (row == currEditRow() && col == currEditCol())
+			return editor_;
+	else
+		return 0;
+}
+
+
+void TeQtBigTable::endEdit(int row, int col, bool /* accept */, bool replace)
+{
+	QTable::endEdit(row, col, false, replace);
+	if (editor_)
+	{
+		// Update the data that was edited in the table in the data source
+		dataSource_->setCell(row, col, editor_->text());
+	}
+	delete editor_;
+	editor_ = 0;
+}
+
+
+void TeQtBigTable::setCellContentFromEditor(int row, int col)
+{
+	if (editor_)
+		dataSource_->setCell(row, col, editor_->text());
+}
+
+void TeQtBigTable::adjustColumn(int col)
+{
+	int i, w, oldw;
+	QString txt;
+	QFontMetrics fm = fontMetrics();
+
+	txt = horizontalHeader()->label(col);
+	oldw = fm.width(txt) + 10;
+	oldw = QMAX(oldw, 30);
+
+	QVariant v(dataSource_->cell(0, col));
+	if (v.type() == QVariant::Pixmap)
+	{
+		QPixmap p = v.toPixmap();
+		w = p.width() + 10;
+		w = QMAX(w, oldw);
+		oldw = w;
+	}
+	else
+	{
+		for (i = 0; i < numRows(); ++i )
+		{
+			QString txt = text(i,col);
+			w = fm.width(txt) + 15;
+			w = QMAX(w, oldw);
+			oldw = w;
+		}
+	}
+	w = QMAX( w, QApplication::globalStrut().width() );
+	setColumnWidth(col, w);
+}
+
+
+
+
diff --git a/src/terralib/drivers/qt/TeQtBigTable.h b/src/terralib/drivers/qt/TeQtBigTable.h
new file mode 100755
index 0000000..265ac31
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtBigTable.h
@@ -0,0 +1,51 @@
+#ifndef TABLE_H
+#define TABLE_H
+
+#include <qtable.h>
+#include <qlineedit.h>
+#include <string>
+
+class TeQtDataSource;
+
+using namespace std;
+
+class TeQtBigTable : public QTable
+{
+	Q_OBJECT
+
+public:
+	TeQtBigTable(QWidget *parent = 0, const char *name = 0);
+	TeQtBigTable(TeQtDataSource *dSource, QWidget *parent = 0, const char *name = 0);
+
+	void setDataSource(TeQtDataSource *dSource);
+	TeQtDataSource* getDataSource() { return dataSource_; }
+
+	QString text(int row, int col) const;
+	QWidget *createEditor(int row, int col, bool initFromCell) const;
+	void setCellContentFromEditor(int row, int col);
+	QWidget *cellWidget(int row, int col) const;
+	void endEdit(int row, int col, bool accept, bool replace);
+
+	void resizeData(int) {}
+	QTableItem *item(int, int) { return 0; }
+	void setItem(int, int, QTableItem *) {}
+	void clearCell(int, int) {}
+	void insertWidget(int, int, QWidget *) {}
+	void clearCellWidget(int, int) {}
+
+	void adjustColumn(int col);
+
+public slots:
+	void updateContents();
+
+protected:
+	TeQtDataSource *dataSource_;
+	mutable QLineEdit *editor_;
+
+	virtual void paintCell(QPainter *painter, int row, int col,
+				   const QRect &cr, bool selected, const QColorGroup &cg);
+
+};
+
+
+#endif
diff --git a/src/terralib/drivers/qt/TeQtCanvas.cpp b/src/terralib/drivers/qt/TeQtCanvas.cpp
new file mode 100755
index 0000000..e93fa60
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtCanvas.cpp
@@ -0,0 +1,3411 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#include <TeQtCanvas.h>
+#include <TeDecoderMemory.h>
+#include <TeQtProgress.h>
+#include <TeVectorRemap.h>
+#include <TeGeometryAlgorithms.h>
+#include <TeDefines.h>
+#include <TeRasterRemap.h>
+#include <TeDecoderQtImage.h>
+
+#include <qpaintdevice.h> 
+#include <qpaintdevicemetrics.h> 
+#include <qapplication.h>
+
+#include <string>	
+#include <algorithm>	
+#include <time.h>
+
+
+TeQtCanvas::TeQtCanvas(QWidget *parent, const char *name)
+			: QScrollView(parent,name,WNorthWestGravity)
+{
+	pixmap0_ = 0;
+	pixmap1_ = 0;
+	pixmap2_ = 0;
+	backRaster_ = 0;
+	printerFactor_ = 1.;
+	numberOfPixmaps_ = 3;
+
+	canvasProjection_ = 0;
+	dataProjection_ = 0;
+	pointStyle_ = 0;
+	nodeStyle_ = 0;
+	pointSize_ = 3;
+	nodeSize_ = 4;
+	db_ = 0;
+
+	//Mounting the brushStyleMap
+	brushStyleMap_[TePolyTypeTransparent] = Qt::NoBrush;
+	brushStyleMap_[TePolyTypeFill] = Qt::SolidPattern;
+	brushStyleMap_[TePolyTypeHorizontal] = Qt::HorPattern;
+	brushStyleMap_[TePolyTypeVertical] = Qt::VerPattern;
+	brushStyleMap_[TePolyTypeFDiagonal] = Qt::FDiagPattern;
+	brushStyleMap_[TePolyTypeBDiagonal] = Qt::BDiagPattern;
+	brushStyleMap_[TePolyTypeCross] = Qt::CrossPattern;
+	brushStyleMap_[TePolyTypeDiagonalCross] = Qt::DiagCrossPattern;
+
+	//Mounting the penStyleMap
+	penStyleMap_[TeLnTypeContinuous] = Qt::SolidLine;
+	penStyleMap_[TeLnTypeDashed] = Qt::DashLine;
+	penStyleMap_[TeLnTypeDotted] = Qt::DotLine;
+	penStyleMap_[TeLnTypeDashDot] = Qt::DashDotLine;
+	penStyleMap_[TeLnTypeDashDotDot] = Qt::DashDotDotLine;
+	penStyleMap_[TeLnTypeNone] = Qt::NoPen;
+
+	setVScrollBarMode(QScrollView::Auto);
+	setHScrollBarMode(QScrollView::Auto);
+    viewport()->setMouseTracking(true);
+    viewport()->setFocusPolicy(StrongFocus);
+    viewport()->setBackgroundColor(backgroundColor());
+	setMargin(0);
+
+	width_ = viewport()->width();
+	height_ = viewport()->height();
+	popupCanvas_ = new QPopupMenu(this);
+}
+
+TeQtCanvas::~TeQtCanvas()
+{
+	if (dataProjection_)
+		delete dataProjection_;
+	if (canvasProjection_)
+		delete canvasProjection_;
+
+	if (backRaster_)
+		delete backRaster_;
+	backRaster_ = 0;
+
+	QPaintDevice* dev = painter_.device();
+	if(dev)
+		painter_.end();
+
+	if(pixmap0_)
+		delete pixmap0_;
+	pixmap0_ = 0;
+
+	if(pixmap1_)
+		delete pixmap1_;
+	pixmap1_ = 0;
+
+	if(pixmap2_)
+		delete pixmap2_;
+	pixmap2_ = 0;
+}
+
+void TeQtCanvas::setDataProjection ( TeProjection* proj )
+{	
+	if(dataProjection_)
+		delete dataProjection_;
+
+	if (proj == 0)
+		return;
+	dataProjection_ = TeProjectionFactory::make(proj->params());
+
+	canvasAndDataProjectionEqual_ = true;
+	if (canvasProjection_ && dataProjection_ && !(*canvasProjection_== *dataProjection_))
+	{
+		canvasAndDataProjectionEqual_ = false;
+		dataProjection_->setDestinationProjection(canvasProjection_);
+		canvasProjection_->setDestinationProjection(dataProjection_);
+	}
+}
+
+void TeQtCanvas::setProjection ( TeProjection* proj )
+{	
+	if (canvasProjection_)
+		delete canvasProjection_;
+	canvasProjection_ = TeProjectionFactory::make(proj->params()); 
+	params_.projection(canvasProjection_);
+
+	canvasAndDataProjectionEqual_ = true;
+	if(canvasProjection_ && dataProjection_ && !(*canvasProjection_== *dataProjection_))
+		canvasAndDataProjectionEqual_ = false;
+}
+
+void TeQtCanvas::plotOnWindow ()
+{
+	QPaintDevice* dev = painter_.device();
+	if(dev == viewport())
+		return;
+	if(dev)
+		painter_.end();
+	painter_.begin(viewport());
+}
+
+void TeQtCanvas::plotOnPixmap0 ()
+{
+	QPaintDevice* dev = painter_.device();
+	if(dev == pixmap0_)
+		return;
+	if(dev)
+		painter_.end();
+	painter_.begin(pixmap0_);
+}
+
+void TeQtCanvas::plotOnPixmap1 ()
+{
+	QPaintDevice* dev = painter_.device();
+	if(dev == pixmap1_)
+		return;
+	if(dev)
+		painter_.end();
+	painter_.begin(pixmap1_);
+}
+
+bool TeQtCanvas::setWorld(TeBox b, int w, int h, QPaintDevice *pd)
+{
+	xmin_= b.x1();
+	xmax_= b.x2();
+	ymin_= b.y1();
+	ymax_= b.y2();
+	if(setView(w, h, pd) == false)
+		return false;
+	bool extend = pd ? false : true;
+	setTransformation(xmin_, xmax_, ymin_, ymax_, extend);
+	params_.nBands(3);
+	double resx = pixelSize();
+	double resy = pixelSize();
+	TeBox box(getWorld());
+	params_.lowerLeftResolutionSize(box.x1_+0.5*resx,box.y1_+0.5*resy,resx,resy,width_,height_);
+	params_.projection();
+	params_.mode_ = 'w';
+	params_.decoderIdentifier_ = "";
+	return true;
+}
+
+void TeQtCanvas::setTransformation(double xmin, double xmax, double ymin, double ymax, bool extend)
+{
+	if (painter_.device() == 0)
+		return;
+	
+	xmin_= xmin;
+	xmax_= xmax;
+	ymin_= ymin;
+	ymax_= ymax;
+
+	double	dxw = xmax_ - xmin_;
+	double	dyw = ymax_ - ymin_;
+	double	dxv = width_;
+	double	dyv = height_;
+					
+	double	fx = dxv/dxw;
+	double	fy = dyv/dyw;
+
+	if (fx > fy)
+	{
+		f_ = fy;
+		if (extend)
+		{
+			dxw = width_/f_;
+			xmax_ = xmin_ + dxw;
+		}
+		else
+			width_ = (int)(f_*dxw + .5);
+	}
+	else
+	{
+		f_ = fx;
+		if (extend)
+		{
+			dyw = height_/f_;
+			ymax_ = ymin_ + dyw;
+		}
+		else
+			height_ = (int)(f_*dyw + .5);
+	}
+
+	wc_ = TeBox (xmin_,ymin_,xmax_,ymax_);
+	params_.boundingBoxResolution(xmin_,ymin_,xmax_,ymax_,params_.resx_,params_.resy_);
+
+	QPaintDeviceMetrics devMetric(viewport());
+	double wpixels = devMetric.width();
+	double wMM = devMetric.widthMM();
+	double wT = wMM;
+	if(canvasProjection_)
+	{
+		string unit = TeConvertToUpperCase(canvasProjection_->units());
+		if(unit == "METERS")
+			wT = wMM / 1000.;
+		else if(unit == "KILOMETERS")
+			wT = wMM / 1000000.;
+		else if(unit == "CENTIMETERS")
+			wT = wMM / 100.;
+		else if(unit == "MILLIMETERS")
+			wT = wMM;
+		else if(unit == "FEET")
+			wT = wMM / (12. * 25.4);
+		else if(unit == "INCHES")
+			wT = wMM / 25.4;
+		else if(unit == "DECIMALDEGREES")
+			wT = wMM / 110000000.;
+	}
+	double wp = wT / wpixels;
+	scaleApx_ = (1. / f_) / wp;
+}
+
+void TeQtCanvas::scaleApx(double scale)
+{
+	QPaintDeviceMetrics devMetric(viewport());
+	double wMM = devMetric.widthMM();
+	double wT = wMM;
+	if(canvasProjection_)
+	{
+		string unit = TeConvertToUpperCase(canvasProjection_->units());
+		if(unit == "METERS")
+			wT = wMM / 1000.;
+		else if(unit == "KILOMETERS")
+			wT = wMM / 1000000.;
+		else if(unit == "CENTIMETERS")
+			wT = wMM / 100.;
+		else if(unit == "MILLIMETERS")
+			wT = wMM;
+		else if(unit == "FEET")
+			wT = wMM / (12. * 25.4);
+		else if(unit == "INCHES")
+			wT = wMM / 25.4;
+		else if(unit == "DECIMALDEGREES")
+			wT = wMM / 110000000.;
+	}
+
+	double ff = scale / scaleApx_;
+	double xmin, ymin, xmax, ymax;
+	if(ff < 1)
+	{
+		double dx = (wc_.width() - (wc_.width() * ff)) / 2.;
+		double dy = (wc_.height() - (wc_.height() * ff)) / 2.;
+		xmin = xmin_ + dx;
+		ymin = ymin_ + dy;
+		xmax = xmax_ - dx;
+		ymax = ymax_ - dy;
+	}
+	else
+	{
+		double dx = ((wc_.width() * ff) - wc_.width()) / 2.;
+		double dy = ((wc_.height() * ff) - wc_.height()) / 2.;
+		xmin = xmin_ - dx;
+		ymin = ymin_ - dy;
+		xmax = xmax_ + dx;
+		ymax = ymax_ + dy;
+	}
+
+	TeBox box(xmin, ymin, xmax, ymax);
+	setWorld(box, contentsWidth(), contentsHeight());
+}
+
+double TeQtCanvas::mapVtoCW(int pixels)
+{
+	TeBox wbox = getDataWorld();
+	TeCoord2D wpc(wbox.x1_ + wbox.width()/2., wbox.y1_ + wbox.height()/2.);
+	QPoint pc = mapDWtoV(wpc);
+	QPoint qp(pc.x()+pixels, pc.y());
+	TeCoord2D wp = mapVtoCW(qp);
+	wpc = mapVtoCW(pc);
+	double d = fabs(wp.x() - wpc.x());
+	return d;
+}
+
+double TeQtCanvas::mapVtoDW(int pixels)
+{
+	TeBox wbox = getDataWorld();
+	TeCoord2D	wpc(wbox.x1_ + wbox.width()/2., wbox.y1_ + wbox.height()/2.);
+	QPoint pc = mapDWtoV(wpc);
+	QPoint qp(pc.x()+pixels, pc.y());
+	TeCoord2D	wp = mapVtoDW(qp);
+	wpc = mapVtoDW(pc);
+	double d = fabs(wp.x() - wpc.x());
+	return d;
+}
+
+TeCoord2D TeQtCanvas::mapVtoCW(const QPoint& p)
+{
+	TeCoord2D w((p.x()-x0_)/f_ + xmin_,
+		(height_ - y0_ - p.y())/f_ + ymin_);
+	return w;
+}
+
+TeCoord2D TeQtCanvas::mapVtoDW(const QPoint& v)
+{
+	TeCoord2D w((v.x()-x0_)/f_ + xmin_,
+		(height_ - y0_ - v.y())/f_ + ymin_);
+
+	if(canvasAndDataProjectionEqual_ == false)
+	{
+		canvasProjection_->setDestinationProjection(dataProjection_);
+		dataProjection_->setDestinationProjection(canvasProjection_);
+		w = canvasProjection_->PC2LL (w);
+		w = dataProjection_->LL2PC (w);
+	}
+	return w;
+}
+
+
+TeBox TeQtCanvas::getDataWorld()
+{
+	if(canvasAndDataProjectionEqual_ == false)
+	{
+		TeBox b = TeRemapBox(wc_, canvasProjection_, dataProjection_);
+		return b;
+	}
+	return wc_ ;
+}
+
+QPoint TeQtCanvas::mapDWtoV(const TeCoord2D& dw)
+{
+	TeCoord2D w = dw;
+	if(canvasAndDataProjectionEqual_ == false)
+	{
+		canvasProjection_->setDestinationProjection(dataProjection_);
+		dataProjection_->setDestinationProjection(canvasProjection_);
+		w = dataProjection_->PC2LL (w);
+		w = canvasProjection_->LL2PC (w);
+	}
+
+	QPoint v((int)((w.x() - xmin_)*f_ + 0.5)+x0_,
+		height_ - y0_ - (int)((w.y() - ymin_)*f_ + 0.5));
+	correctScrolling (v);
+	return v;
+}
+
+QPointArray TeQtCanvas::mapDWtoV(const TeLine2D& line)
+{
+ 	int i;
+	int np = line.size();
+ 	QPointArray parray(np);
+	TeCoord2D p;
+
+	if(canvasAndDataProjectionEqual_ == false)
+	{
+		canvasProjection_->setDestinationProjection(dataProjection_);
+		dataProjection_->setDestinationProjection(canvasProjection_);
+ 		for (i = 0 ; i < np; ++i)
+ 		{
+			p = line[i];
+			p = dataProjection_->PC2LL(p);
+			p = canvasProjection_->LL2PC(p);
+			QPoint v((int)((p.x() - xmin_)*f_ + 0.5)+x0_,
+				height_ - y0_ - (int)((p.y() - ymin_)*f_ + 0.5));
+			correctScrolling (v);
+ 			parray.setPoint(i, v);
+ 		}
+	}
+	else
+	{
+ 		for (i = 0 ; i < np; i++)
+ 		{
+			p = line[i];
+			QPoint v((int)((p.x() - xmin_)*f_ + 0.5)+x0_,
+				height_ - y0_ - (int)((p.y() - ymin_)*f_ + 0.5));
+			correctScrolling (v);
+ 			parray.setPoint(i, v);
+ 		}
+	}
+	return parray;
+}
+
+void TeQtCanvas::mapDWtoV(TeBox& w)
+{
+	TeCoord2D ll, ur;
+	if(canvasAndDataProjectionEqual_ == false)
+		w = TeRemapBox (w, dataProjection_, canvasProjection_);
+
+	ll = w.lowerLeft();
+	ur = w.upperRight();
+
+	QPoint p1((int)((ll.x() - xmin_)*f_ + 0.5)+x0_,
+		height_ - y0_ - (int)((ll.y() - ymin_)*f_ + 0.5));
+	correctScrolling (p1);
+
+	QPoint p2((int)((ur.x() - xmin_)*f_ + 0.5)+x0_,
+		height_ - y0_ - (int)((ur.y() - ymin_)*f_ + 0.5));
+	correctScrolling (p2);
+
+	w.x1_ = p1.x();
+	w.y1_ = p2.y();
+	w.x2_ = p2.x();
+	w.y2_ = p1.y();
+
+	//TeCoord2D ll, lr, ur, ul;
+	//if(canvasAndDataProjectionEqual_ == false)
+	//	TeBox TeRemapBox ( TeBox& box, TeProjection* projFrom, TeProjection* projTo)
+
+	//{
+	//	canvasProjection_->setDestinationProjection(dataProjection_);
+	//	dataProjection_->setDestinationProjection(canvasProjection_);
+	//	ll = dataProjection_->PC2LL (w.lowerLeft());
+	//	lr.x(w.upperRight().x());
+	//	lr.y(w.lowerLeft().y());
+	//	lr = dataProjection_->PC2LL (lr);
+	//	ur = dataProjection_->PC2LL (w.upperRight());
+	//	ul.x(w.lowerLeft().x());
+	//	ul.y(w.upperRight().y());
+	//	ul = dataProjection_->PC2LL (ul);
+
+	//	ll.x(std::min(ll.x(),ul.x()));
+	//	ll.y(std::min(ll.y(),lr.y()));
+	//	lr.x(std::max(lr.x(),ur.x()));
+	//	lr.y(std::min(ll.y(),lr.y()));
+	//	ur.x(std::max(ur.x(),lr.x()));
+	//	ur.y(std::max(ul.y(),ur.y()));
+	//	ul.x(std::min(ll.x(),ul.x()));
+	//	ul.y(std::max(ul.y(),ur.y()));
+
+	//	ll = canvasProjection_->LL2PC (ll);
+	//	lr = canvasProjection_->LL2PC (lr);
+	//	ur = canvasProjection_->LL2PC (ur);
+	//	ul = canvasProjection_->LL2PC (ul);
+	//	ll.x(std::min(ll.x(),ul.x()));
+	//	ll.y(std::min(ll.y(),lr.y()));
+	//	ur.x(std::max(ur.x(),lr.x()));
+	//	ur.y(std::max(ul.y(),ur.y()));
+	//}
+
+	//QPoint p1((int)((ll.x() - xmin_)*f_ + 0.5)+x0_,
+	//	height_ - y0_ - (int)((ll.y() - ymin_)*f_ + 0.5));
+	//correctScrolling (p1);
+
+	//QPoint p2((int)((ur.x() - xmin_)*f_ + 0.5)+x0_,
+	//	height_ - y0_ - (int)((ur.y() - ymin_)*f_ + 0.5));
+	//correctScrolling (p2);
+
+	//w.x1_ = p1.x();
+	//w.y1_ = p2.y();
+	//w.x2_ = p2.x();
+	//w.y2_ = p1.y();
+}
+
+void TeQtCanvas::mapCWtoDW(TeBox& box)
+{
+	TeCoord2D ll, ur;
+	if(canvasAndDataProjectionEqual_ == false)
+		box = TeRemapBox (box, canvasProjection_, dataProjection_);
+
+	//TeCoord2D boxll = box.lowerLeft();
+	//TeCoord2D boxur = box.upperRight();
+
+	//if(canvasAndDataProjectionEqual_ == false)
+	//{
+	//	canvasProjection_->setDestinationProjection(dataProjection_);
+	//	boxll = canvasProjection_->PC2LL(boxll);
+	//	boxll = dataProjection_->LL2PC(boxll);
+	//	boxur = canvasProjection_->PC2LL(boxur);
+	//	boxur = dataProjection_->LL2PC(boxur);
+	//}
+
+	//box = TeBox(boxll, boxur);
+}
+
+void TeQtCanvas::mapDWtoCW(TeBox& box)
+{
+	TeCoord2D ll, ur;
+	if(canvasAndDataProjectionEqual_ == false)
+		box = TeRemapBox (box, dataProjection_, canvasProjection_);
+
+	//TeCoord2D boxll = box.lowerLeft();
+	//TeCoord2D boxur = box.upperRight();
+
+	//if(canvasAndDataProjectionEqual_ == false)
+	//{
+	//	dataProjection_->setDestinationProjection(canvasProjection_);
+	//	boxll = dataProjection_->PC2LL(boxll);
+	//	boxll = canvasProjection_->LL2PC(boxll);
+	//	boxur = dataProjection_->PC2LL(boxur);
+	//	boxur = canvasProjection_->LL2PC(boxur);
+	//}
+
+	//box = TeBox(boxll, boxur);
+}
+
+void TeQtCanvas::mapCWtoV(TeBox& box)
+{
+	QPoint p1((int)((box.x1() - xmin_)*f_ + 0.5)+x0_,
+		height_ - y0_ - (int)((box.y1() - ymin_)*f_ + 0.5));
+	correctScrolling (p1);
+
+	QPoint p2((int)((box.x2() - xmin_)*f_ + 0.5)+x0_,
+		height_ - y0_ - (int)((box.y2() - ymin_)*f_ + 0.5));
+	correctScrolling (p2);
+
+// swap y value
+	box.x1_ = p1.x();
+	box.y1_ = p2.y();
+	box.x2_ = p2.x();
+	box.y2_ = p1.y();
+}
+
+void TeQtCanvas::mapVtoCW(TeBox& box)
+{
+	// swap y value
+	TeCoord2D w1((box.x1()-x0_)/f_ + xmin_,
+		(height_ - y0_ - box.y2())/f_ + ymin_);
+
+	TeCoord2D w2((box.x2()-x0_)/f_ + xmin_,
+		(height_ - y0_ - box.y1())/f_ + ymin_);
+
+	box = TeBox(w1, w2);
+}
+
+QPoint TeQtCanvas::mapCWtoV(const TeCoord2D& c)
+{
+	QPoint p((int)((c.x() - xmin_)*f_ + 0.5)+x0_,
+		height_ - y0_ - (int)((c.y() - ymin_)*f_ + 0.5));
+	correctScrolling (p);
+
+	return p;
+}
+
+void TeQtCanvas::setPolygonColor (int r, int g, int b)
+{
+	QRgb cor = qRgba(r, g, b, 50);
+	polygonColor_.setRgb(cor);
+	polygonBrush_.setColor (polygonColor_);
+}
+
+void TeQtCanvas::setPolygonStyle (int s, int t)
+{
+	polygonBrush_.setStyle(brushStyleMap_[(TePolyBasicType)s]);
+	polygonTransparency_ = t;
+}
+
+void TeQtCanvas::setPolygonLineColor (int r, int g, int b)
+{
+	QColor cor(r, g, b);
+	polygonPen_.setColor (cor);
+}
+
+void TeQtCanvas::setPolygonLineStyle (int s, int w)
+{
+	polygonPen_.setStyle(penStyleMap_[(TeLnBasicType)s]);
+	polygonPen_.setWidth(w);
+}
+
+void TeQtCanvas::setLineColor (int r, int g, int b)
+{
+	lineColor_.setRgb(r,g,b);
+	linePen_.setColor (lineColor_);
+}
+
+void TeQtCanvas::setLineStyle (int s, int w)
+{
+	linePen_.setStyle(penStyleMap_[(TeLnBasicType)s]);
+	linePen_.setWidth(w);
+}
+
+void TeQtCanvas::setTextColor (int r, int g, int b)
+{
+	textColor_.setRgb(r,g,b);
+	textPen_.setColor (textColor_);
+}
+
+void TeQtCanvas::setTextStyle (string& family, int size, bool bold, bool italic )
+{
+	textFont_.setFamily (family.c_str());
+	textFont_.setBold (bold);
+	textFont_.setItalic (italic);
+	if(size <= 0)
+		textSize_ = 1;
+	else
+		textSize_ = size;
+
+	if(pixmap0_ && pixmap1_ && (pixmap0_->rect() != pixmap1_->rect()))
+		textSize_ = (int)((double)textSize_ * printerFactor_ + .5);
+
+	textFont_.setPointSize (textSize_);
+}
+
+void TeQtCanvas::setTextSize (int size)
+{
+	if(size <= 0)
+		textSize_ = 1;
+	else
+		textSize_ = size;
+
+	if(pixmap0_ && pixmap1_ && (pixmap0_->rect() != pixmap1_->rect()))
+		textSize_ = (int)((double)textSize_ * printerFactor_ + .5);
+
+	textFont_.setPointSize (textSize_);
+}
+
+
+void TeQtCanvas::plotText (TeCoord2D &pt, string &str, double angle, double /*alignh*/, double /*alignv*/)
+{
+	painter_.setPen(textPen_);
+	painter_.setFont(textFont_);
+	QPoint p = mapDWtoV (pt);
+	if (angle != 0.)
+	{
+		painter_.save ();
+		painter_.translate (p.x(),p.y());
+		painter_.rotate (-angle);
+		painter_.drawText (0,-4,QString(str.c_str()));
+		painter_.restore ();
+	}
+	else
+		painter_.drawText (p,QString(str.c_str()));
+}
+
+void TeQtCanvas::plotXorTextDistance(vector<QPointArray> xorPointArrayVec, double unitConv, string unit)
+{
+	if(xorPointArrayVec.empty())
+		return;
+
+	QPoint a = xorPointArrayVec[0].point(0);
+	QPoint b = xorPointArrayVec[0].point(1);
+	TeCoord2D ppa = mapVtoCW(a);
+	TeCoord2D ppb = mapVtoCW(b);
+	double distance = sqrt((ppa.x()-ppb.x()) * (ppa.x()-ppb.x()) + (ppa.y()-ppb.y()) * (ppa.y()-ppb.y()));
+	string s;
+	if(unit == "Decimal Degrees")
+			s = Te2String(distance/unitConv,6) + "(" + unit + ")";
+	else
+			s = Te2String(distance/unitConv,1) + "(" + unit + ")";
+
+	double dy = (double)(b.y() - a.y());
+	double dx = (double)(b.x() - a.x());
+	distance = sqrt(dx * dx + dy * dy);
+	double txHeight = -7.;
+	double dd = distance / 2.;
+	double alfa = atan(dy/dx);
+	if(dx<0 && dy<0)
+		alfa = alfa - TePI;
+	else if(dy>0 && dx<0)
+		alfa = TePI + alfa;
+	double beta = atan(txHeight/dd);
+	double c = dd * cos(beta);
+
+	double gama = alfa + beta;
+	if((dx<0 && dy<0) || (dy>0 && dx<0))
+		gama = alfa - beta;
+
+	double x = c * cos(gama);
+	x += a.x();
+	double y = c * sin(gama);
+	y += a.y();
+	QPoint p((int)x, (int)y);
+	alfa = -alfa * 180. / TePI;
+	if((dx<0 && dy<0) || (dy>0 && dx<0))
+		alfa = 180. + alfa;
+			
+	QPen pen(QColor(239, 111, 63));
+	QFont font("Terminal", 12);
+	font.setStyleStrategy(QFont::PreferAntialias);
+	font.setBold(true);
+	QFontMetrics fm(font);
+	QRect rect = fm.boundingRect(s.c_str());
+	int xp = - rect.width()/2;
+	int yp = - rect.height()/2;
+
+	plotOnPixmap0();
+	painter_.setRasterOp (Qt::XorROP);
+	painter_.setPen(pen);
+	painter_.setFont(font);
+	if (alfa != 0.)
+	{
+		painter_.save ();
+		painter_.translate (p.x(),p.y());
+		painter_.rotate (-alfa);
+		painter_.drawText(xp, yp, rect.width(), rect.height(), Qt::AlignLeft|Qt::DontClip, s.c_str());
+		painter_.restore ();
+	}
+	else
+	{
+		xp = p.x() - rect.width()/2;
+		yp = p.y() - rect.height()/2;
+		painter_.drawText((int)x, (int)y, rect.width(), rect.height(), Qt::AlignLeft|Qt::DontClip, s.c_str());
+	}
+
+	plotOnWindow();
+	painter_.setRasterOp (Qt::XorROP);
+	painter_.setPen(pen);
+	painter_.setFont(font);
+	painter_.save ();
+	painter_.translate (-offset().x(), -offset().y());
+	if (alfa != 0.)
+	{
+		painter_.translate (p.x(),p.y());
+		painter_.rotate (-alfa);
+		painter_.drawText(xp, yp, rect.width(), rect.height(), Qt::AlignLeft|Qt::DontClip, s.c_str());
+	}
+	else
+	{
+		xp = p.x() - rect.width()/2;
+		yp = p.y() - rect.height()/2;
+		painter_.drawText(xp, yp, rect.width(), rect.height(), Qt::AlignLeft|Qt::DontClip, s.c_str());
+	}
+	painter_.restore ();
+}
+
+void TeQtCanvas::plotText (TeText& tx, TeVisual& visual)
+{
+	if(tx.textValue().empty())
+		return;
+
+	int	x, y;
+
+	TeCoord2D pt = tx.location();
+	QPoint p = mapDWtoV (pt);
+	double angle = tx.angle();
+
+	QRect brect = textRect(tx, visual);
+	painter_.setFont(textFont_);
+	painter_.setPen(textPen_);
+	painter_.setRasterOp (Qt::CopyROP);
+	string st = tx.textValue();
+
+	if (angle != 0.)
+	{
+		x = - brect.width()/2;
+		y = - brect.height()/2;
+		painter_.save ();
+		painter_.translate (p.x(), p.y());
+		painter_.rotate (-angle);
+		painter_.drawText(x, y, brect.width(), brect.height(), Qt::AlignLeft|Qt::DontClip, st.c_str());
+		painter_.restore ();
+	}
+	else
+	{
+		x = p.x() - brect.width()/2;
+		y = p.y() - brect.height()/2;
+		painter_.drawText(x, y, brect.width(), brect.height(), Qt::AlignLeft|Qt::DontClip, st.c_str());
+	}
+}
+
+QRect TeQtCanvas::textRect(TeText& tx, TeVisual visual)
+{
+	QRect rect;
+	if(tx.textValue().empty())
+		return rect;
+
+	int size;
+	int fixedSize = visual.fixedSize(); // font size is fixed
+	if(fixedSize == false && tx.height() > 0.)
+	{
+		TeBox wbox = getDataWorld();
+		TeCoord2D p1(wbox.x1_, wbox.y1_);
+		TeCoord2D p2(double(p1.x() + tx.height()), double(p1.y() + tx.height()));
+		TeBox box(p1, p2);
+		mapDWtoV(box);
+		size = int(box.height());
+		size = (int)((double)size / printerFactor_ + .5);
+	}
+	else
+		size = visual.size(); // font size
+	if(size == 0)
+		size = 1;
+
+	setTextSize(size);
+	textFont_.setFamily (visual.family().c_str());
+
+	TeCoord2D pt = tx.location();
+	QPoint p = mapDWtoV (pt);
+
+	string st = tx.textValue();
+	QFontMetrics fm(textFont_);
+	rect = fm.boundingRect(st.c_str());
+	QPoint cc = rect.center();
+	QPoint tr = p;
+	tr = tr - cc;
+	rect.setRight(rect.right()+tr.x());
+	rect.setLeft(rect.left()+tr.x());
+	rect.setTop(rect.top()+tr.y());
+	rect.setBottom(rect.bottom()+tr.y());
+	return rect;
+}
+
+void TeQtCanvas::plotXorPolyline (QPointArray& PA, bool cdev)
+{
+	QPoint o = offset();
+	QPen pen(QColor("green"));
+
+	plotOnPixmap0();
+	painter_.save ();
+	if(cdev == false)
+		painter_.translate(o.x(), o.y());
+	painter_.setRasterOp (Qt::XorROP);
+	painter_.setPen(pen);
+	painter_.drawPolyline(PA);
+	painter_.restore ();
+
+	plotOnWindow(); // do offset translation on window
+	painter_.save ();
+	if(cdev)
+		painter_.translate(-o.x(), -o.y());
+	painter_.setRasterOp (Qt::XorROP);
+	painter_.setPen(pen);
+	painter_.drawPolyline(PA);
+	painter_.restore ();
+
+	plotOnPixmap0();
+}
+
+void TeQtCanvas::plotTextRects (TeText& tx, TeVisual visual)
+{
+	if(tx.textValue().empty())
+		return;
+
+	QPoint o = offset();
+	QRect rect, l, r, t, b, c;
+
+	TeCoord2D pt = tx.location();
+	plotOnPixmap0();
+	QPoint p = mapDWtoV (pt);
+	double angle = tx.angle();
+
+	rect = textRect(tx, visual);
+	if(angle != 0.)
+	{
+		rect.setTop(rect.top()-p.y());
+		rect.setBottom(rect.bottom()-p.y());
+		rect.setLeft(rect.left()-p.x());
+		rect.setRight(rect.right()-p.x());
+	}
+
+	l = rect;
+	l.setTop(rect.top()+rect.height()/2-3);
+	l.setBottom(rect.top()+rect.height()/2+3);
+	l.setRight(rect.left() + 6);
+
+	r = rect;
+	r.setTop(l.top());
+	r.setBottom(l.bottom());
+	r.setLeft(rect.right() - 6);
+
+	t = rect;
+	t.setLeft(rect.left()+rect.width()/2-3);
+	t.setRight(rect.left()+rect.width()/2+3);
+	t.setBottom(rect.top() + 6);
+
+	b = rect;
+	b.setLeft(t.left());
+	b.setRight(t.right());
+	b.setTop(rect.bottom() - 6);
+
+	c.setLeft(rect.left()+rect.width()/2-3);
+	c.setRight(c.left() + 6);
+	c.setTop(rect.top()+rect.height()/2-3);
+	c.setBottom(c.top() + 6);
+
+	QPointArray parL(4);
+	parL.setPoint(0, l.bottomLeft());
+	parL.setPoint(1, l.bottomRight());
+	parL.setPoint(2, l.topRight());
+	parL.setPoint(3, l.topLeft());
+
+	QPointArray parR(4);
+	parR.setPoint(0, r.bottomRight());
+	parR.setPoint(1, r.bottomLeft());
+	parR.setPoint(2, r.topLeft());
+	parR.setPoint(3, r.topRight());
+
+	QPointArray parT(4);
+	parT.setPoint(0, t.topLeft());
+	parT.setPoint(1, t.bottomLeft());
+	parT.setPoint(2, t.bottomRight());
+	parT.setPoint(3, t.topRight());
+
+	QPointArray parB(4);
+	parB.setPoint(0, b.bottomLeft());
+	parB.setPoint(1, b.topLeft());
+	parB.setPoint(2, b.topRight());
+	parB.setPoint(3, b.bottomRight());
+
+	QBrush	brush(QColor("green"));
+
+	if (angle != 0.)
+	{
+		plotOnPixmap0();
+		painter_.save ();
+		painter_.setRasterOp (Qt::XorROP);
+		painter_.setBrush(Qt::NoBrush);
+		QPen pen(QColor("green"));
+		painter_.setPen(pen);
+		painter_.translate (p.x(), p.y());
+		painter_.rotate (-angle);
+		painter_.drawRect(rect);
+		painter_.drawPolyline(parL);
+		painter_.drawPolyline(parR);
+		painter_.drawPolyline(parT);
+		painter_.drawPolyline(parB);
+		painter_.fillRect(c, brush);
+		painter_.restore ();
+
+		plotOnWindow(); // do offset translation on window
+		painter_.save ();
+		painter_.setRasterOp (Qt::XorROP);
+		painter_.setBrush(Qt::NoBrush);
+		pen = QPen(QColor("green"));
+		painter_.setPen(pen);
+		painter_.translate (p.x()-o.x(), p.y()-o.y());
+		painter_.rotate (-angle);
+		painter_.drawRect(rect);
+		painter_.drawPolyline(parL);
+		painter_.drawPolyline(parR);
+		painter_.drawPolyline(parT);
+		painter_.drawPolyline(parB);
+		painter_.fillRect(c, brush);
+		painter_.restore ();
+	}
+	else
+	{
+		plotOnPixmap0();
+		painter_.save ();
+		painter_.setRasterOp (Qt::XorROP);
+		painter_.setBrush(Qt::NoBrush);
+		QPen pen(QColor("green"));
+		painter_.setPen(pen);
+		painter_.drawRect(rect);
+		painter_.drawPolyline(parL);
+		painter_.drawPolyline(parR);
+		painter_.drawPolyline(parT);
+		painter_.drawPolyline(parB);
+		painter_.fillRect(c, brush);
+		painter_.restore ();
+
+		plotOnWindow(); // do offset translation on window
+		painter_.save ();
+		painter_.setRasterOp (Qt::XorROP);
+		painter_.setBrush(Qt::NoBrush);
+		pen = QPen(QColor("green"));
+		painter_.setPen(pen);
+		painter_.translate (-o.x(), -o.y());
+		painter_.drawRect(rect);
+		painter_.drawPolyline(parL);
+		painter_.drawPolyline(parR);
+		painter_.drawPolyline(parT);
+		painter_.drawPolyline(parB);
+		painter_.fillRect(c, brush);
+		painter_.restore ();
+	}
+	plotOnPixmap0();
+}
+
+void TeQtCanvas::setArcColor (int r, int g, int b)
+{
+	arcColor_.setRgb(r,g,b);
+}
+
+void TeQtCanvas::setArcStyle (int s, int w )
+{
+	arcPen_.setStyle ((Qt::PenStyle)s);
+	arcPen_.setWidth(w);
+}
+
+void TeQtCanvas::setPointColor (int r, int g, int b)
+{
+	pointColor_.setRgb(r,g,b);
+}
+
+void TeQtCanvas::setPointStyle (int s, int w)
+{
+	pointStyle_ = (TePtBasicType) s;
+	pointSize_ = w;
+}
+
+void TeQtCanvas::plotPoint (TeCoord2D &pt)
+{	
+	pointPen_.setColor (pointColor_);
+	painter_.setPen(pointPen_);
+
+	QPoint p = mapDWtoV (pt);
+
+	plotMark(p,pointStyle_, pointSize_);
+}
+
+void TeQtCanvas::setNodeColor (int r, int g, int b)
+{
+	nodeColor_.setRgb(r,g,b);
+}
+
+void TeQtCanvas::setNodeStyle (int s, int w)
+{
+	nodeStyle_ = s;
+	nodeSize_ = w;
+}
+
+void TeQtCanvas::plotNode (TeNode &pt)
+{	
+	nodePen_.setColor (nodeColor_);
+	painter_.setPen(nodePen_);
+
+	QPoint p = mapDWtoV (pt.location());
+	plotMark(p,nodeStyle_, nodeSize_);
+}
+
+
+void TeQtCanvas::plotMark(QPoint &p, int s, int w)
+{
+	painter_.setPen(pointColor_);
+	if (s == TePtTypePlus)
+	{
+		painter_.drawLine (p.x()-w/2,p.y(),p.x()+w/2,p.y());
+		painter_.drawLine (p.x(),p.y()-w/2,p.x(),p.y()+w/2);
+	}
+	else if (s == TePtTypeStar)
+	{
+		painter_.save ();
+		painter_.translate (p.x(),p.y());
+		painter_.drawLine (0,-w/2,0,w/2);
+		painter_.rotate (45);
+		painter_.drawLine (0,-w/2,0,w/2);
+		painter_.rotate (-90);
+		painter_.drawLine (0,-w/2,0,w/2);
+		painter_.restore ();
+	}
+	else if (s == TePtTypeCircle)
+	{
+		painter_.setBrush(pointColor_);
+		painter_.drawChord (p.x()-w/2,p.y()-w/2,w,w,0,360*16);
+	}
+	else if (s == TePtTypeX)
+	{
+		painter_.drawLine (p.x()-w/2,p.y()-w/2,p.x()+w/2,p.y()+w/2);
+		painter_.drawLine (p.x()-w/2,p.y()+w/2,p.x()+w/2,p.y()-w/2);
+	}
+	else if (s == TePtTypeBox)
+	{
+		painter_.fillRect (p.x()-w/2,p.y()-w/2,w,w,pointColor_);
+	}
+	else if (s == TePtTypeDiamond)
+	{
+		QPointArray pa(5);
+		pa.setPoint(0, p.x()-w/2, p.y());
+		pa.setPoint(1, p.x(), p.y()-w/2);
+		pa.setPoint(2, p.x()+w/2, p.y());
+		pa.setPoint(3, p.x(), p.y()+w/2);
+ 		pa.setPoint(4, p.x()-w/2, p.y());
+		painter_.setBrush(pointColor_);
+		painter_.drawPolygon(pa);
+	}
+	else if (s == TePtTypeHollowCircle)
+	{
+		painter_.drawArc (p.x()-w/2,p.y()-w/2,w,w,0,360*16);
+	}
+	else if (s == TePtTypeHollowBox)
+	{
+		painter_.setBrush(Qt::NoBrush);
+		painter_.drawRect (p.x()-w/2,p.y()-w/2,w,w);
+	}
+	else if (s == TePtTypeHollowDiamond)
+	{
+		painter_.drawLine (p.x()-w/2,p.y(),p.x(),p.y()-w/2);
+		painter_.drawLine (p.x(),p.y()-w/2,p.x()+w/2,p.y());
+		painter_.drawLine (p.x()+w/2,p.y(),p.x(),p.y()+w/2);
+		painter_.drawLine (p.x(),p.y()+w/2,p.x()-w/2,p.y());
+	}
+}
+
+
+void TeQtCanvas::plotCell (TeCell &cell, const bool& restoreBackground)
+{
+	int w, h;
+	TeBox b = getDataWorld ();
+
+	if (!TeIntersects (b, cell.box ()))
+		return;
+
+	QPoint pfrom, pto;
+
+	pfrom = mapDWtoV (cell.box().lowerLeft());
+	pto   = mapDWtoV (cell.box().upperRight());
+
+	painter_.setBrush(polygonBrush_);
+	painter_.setPen (polygonPen_);
+
+	if(!restoreBackground && 
+		(polygonTransparency_ == 0 || 
+		polygonTransparency_ == 100 && polygonBrush_.style() == Qt::NoBrush))
+	{
+		if(polygonTransparency_ == 100 && polygonBrush_.style() != Qt::NoBrush)
+			painter_.setBrush(Qt::NoBrush);
+
+		if((w = pto.x() - pfrom.x()) <= 1)
+			w = 2;
+		if((h = pfrom.y() - pto.y()) <= 1)
+			h = 2;
+
+		painter_.drawRect( pfrom.x(), pto.y(), w+1, h+1);
+	}
+	else if(polygonBrush_.style() == Qt::HorPattern ||
+	polygonBrush_.style() == Qt::VerPattern ||
+	polygonBrush_.style() == Qt::CrossPattern ||
+	polygonBrush_.style() == Qt::BDiagPattern ||
+	polygonBrush_.style() == Qt::FDiagPattern ||
+	polygonBrush_.style() == Qt::DiagCrossPattern)
+	{
+		if((w = pto.x() - pfrom.x()) <= 1)
+			w = 2;
+		if((h = pfrom.y() - pto.y()) <= 1)
+			h = 2;
+
+		painter_.drawRect( pfrom.x(), pto.y(), w+1, h+1);
+	}
+	else
+	{
+		QRect devRect;
+		if(painter_.device() == viewport())
+			devRect = viewport()->rect();
+		else
+			devRect = pixmap0_->rect();
+
+		TeBox box = cell.box();
+		mapDWtoV(box); // data coordinate to viewport coordinate
+		if((w = (int)box.width()) <= 3)
+			w = 4;
+		if((h = (int)box.height()) <= 3)
+			h = 4;	
+
+		QRect polyRect((int)box.x1_, (int)box.y1_, w+1, h+1);
+		QRect interRect = devRect & polyRect;
+		QPoint pOffset = interRect.topLeft();
+
+		int width = interRect.width();
+		int height = interRect.height();
+
+		int r = width%8;
+		if(r)
+			width += (8-r);
+		r = height%8;
+		if(r)
+			height += (8-r);
+
+		QBitmap	bm;
+		bm.resize(width, height);
+		//Fill bitmap with 0-bits: clipping region
+		bm.fill(Qt::color0);
+		QPainter maskPainter(&bm);
+
+		// Draw cell with 1-bits: drawing region
+		QBrush bs(Qt::color1);
+		maskPainter.setBrush(bs);
+		QPen pen(Qt::color1, polygonPen_.width());
+		maskPainter.setPen(pen);
+		maskPainter.translate(-pOffset.x(), -pOffset.y());
+ 		maskPainter.drawRect( interRect );
+		maskPainter.end();
+
+		QRegion clipRegion(bm);
+		clipRegion.translate(pOffset.x(), pOffset.y());
+
+		int transp = 255 - (polygonTransparency_ * 255 / 100);
+		painter_.setClipRegion(clipRegion);
+		if(restoreBackground) // restore background from pixmap2_
+		{
+			painter_.drawPixmap(pOffset.x(), pOffset.y(), *pixmap2_, pOffset.x(),
+				pOffset.y(), interRect.width(), interRect.height());
+		}
+
+		// set alpha buffer and color
+		QImage img(interRect.width(), interRect.height(), 32);
+		unsigned int val = (transp << 24) | (polygonColor_.red() << 16) | (polygonColor_.green() << 8) | polygonColor_.blue();
+		img.fill(val);
+		img.setAlphaBuffer(true);
+
+		// plot transparency
+		painter_.drawPixmap(pOffset.x(), pOffset.y(), img);
+
+
+		// plot contours
+		painter_.setClipping(false);
+		painter_.setBrush(Qt::NoBrush);
+		painter_.drawRect( interRect );
+	}
+}
+//void TeQtCanvas::plotCell (TeCell &cell, const bool& restoreBackground)
+//{
+//	int w, h;
+//	TeBox b = getDataWorld ();
+//
+//	if (!TeIntersects (b, cell.box ()))
+//		return;
+//
+//	QPoint pfrom, pto;
+//
+//	pfrom = mapDWtoV (cell.box().lowerLeft());
+//	pto   = mapDWtoV (cell.box().upperRight());
+//
+//	painter_.setBrush(polygonBrush_);
+//	painter_.setPen (polygonPen_);
+//
+//	if((polygonTransparency_ == 0 && polygonBrush_.style() != Qt::NoBrush) || // 100% opaque or
+//		(polygonTransparency_ == 100 || polygonBrush_.style() == Qt::NoBrush)) // 100% transparent
+//	{
+//		if(polygonTransparency_ == 100 && polygonBrush_.style() != Qt::NoBrush)
+//			painter_.setBrush(Qt::NoBrush);
+//
+//		if((w = pto.x() - pfrom.x()) <= 1)
+//			w = 2;
+//		if((h = pfrom.y() - pto.y()) <= 1)
+//			h = 2;
+//
+//		//painter_.drawRect( pfrom.x()+1, pto.y()+1, w, h);
+//		painter_.drawRect( pfrom.x(), pto.y(), w+1, h+1);
+//	}
+//	else
+//	{
+//		QRect devRect;
+//		if(painter_.device() == viewport())
+//			devRect = viewport()->rect();
+//		else
+//			devRect = pixmap0_->rect();
+//
+//		TeBox box = cell.box();
+//		mapDWtoV(box); // data coordinate to viewport coordinate
+//		if((w = (int)box.width()) <= 3)
+//			w = 4;
+//		if((h = (int)box.height()) <= 3)
+//			h = 4;	
+//
+//		QRect polyRect((int)box.x1_, (int)box.y1_, w+1, h+1);
+//		QRect interRect = devRect & polyRect;
+//		QPoint pOffset = interRect.topLeft();
+//
+//		int width = interRect.width();
+//		int height = interRect.height();
+//
+//		int r = width%8;
+//		if(r)
+//			width += (8-r);
+//		r = height%8;
+//		if(r)
+//			height += (8-r);
+//
+//		QBitmap	bm;
+//		bm.resize(width, height);
+//		//Fill bitmap with 0-bits: clipping region
+//		bm.fill(Qt::color0);
+//		QPainter maskPainter(&bm);
+//
+//		// Draw cell with 1-bits: drawing region
+//		QBrush bs(Qt::color1, polygonBrush_.style());
+//		maskPainter.setBrush(bs);
+//		QPen pen(Qt::color1, polygonPen_.width());
+//		maskPainter.setPen(pen);
+//		maskPainter.translate(-pOffset.x(), -pOffset.y());
+// 		maskPainter.drawRect( interRect );
+//		maskPainter.end();
+//
+//		QRegion clipRegion(bm);
+//		clipRegion.translate(pOffset.x(), pOffset.y());
+//
+//		int transp = 255 - (polygonTransparency_ * 255 / 100);
+//		painter_.setClipRegion(clipRegion);
+//		// restore background from pixmap2_
+//		painter_.drawPixmap(pOffset.x(), pOffset.y(), *pixmap2_, pOffset.x(),
+//			pOffset.y(), interRect.width(), interRect.height());
+//
+//		// set alpha buffer and color
+//		QImage img(interRect.width(), interRect.height(), 32);
+//		unsigned int val = (transp << 24) | (polygonColor_.red() << 16) | (polygonColor_.green() << 8) | polygonColor_.blue();
+//		img.fill(val);
+//		img.setAlphaBuffer(true);
+//
+//		// plot transparency
+//		painter_.drawPixmap(pOffset.x(), pOffset.y(), img);
+//
+//
+//		// plot contours
+//		painter_.setClipping(false);
+//		painter_.setBrush(Qt::NoBrush);
+//		painter_.drawRect( interRect );
+//	}
+//}
+void TeQtCanvas::plotPolygon (const TePolygon &poly, const bool& restoreBackground)
+{
+	if(canvasAndDataProjectionEqual_)
+	{
+		if (!TeIntersects (wc_, poly.box ()))
+			return;
+	}
+	else
+	{
+		TeBox canvasBox = TeRemapBoxPC2Geodetic(wc_, canvasProjection_);
+		TeBox pBox = TeRemapBoxPC2Geodetic(poly.box(), dataProjection_);
+
+		if (!TeIntersects(canvasBox, pBox))
+			return;
+	}
+
+	int		i, k;
+ 	QPoint	p;
+	painter_.setBrush(polygonBrush_);
+	painter_.setPen (polygonPen_);
+
+	if(!restoreBackground && poly.size() == 1 && // no holes
+		(polygonTransparency_ == 0 || 
+		polygonBrush_.style() == Qt::NoBrush))
+		//polygonTransparency_ == 100 && polygonBrush_.style() == Qt::NoBrush))
+	{
+		TeLinearRing ring = poly[0];
+ 		QPointArray parray = mapDWtoV(ring);
+		painter_.drawPolygon( parray );
+	}
+	else if(polygonBrush_.style() == Qt::HorPattern ||
+	polygonBrush_.style() == Qt::VerPattern ||
+	polygonBrush_.style() == Qt::CrossPattern ||
+	polygonBrush_.style() == Qt::BDiagPattern ||
+	polygonBrush_.style() == Qt::FDiagPattern ||
+	polygonBrush_.style() == Qt::DiagCrossPattern)
+	{
+		TeLinearRing ring = poly[0];
+ 		QPointArray parray = mapDWtoV(ring);
+		painter_.drawPolygon( parray );
+	}
+	else
+	{
+		QRect devRect;
+		if(painter_.device() == viewport())
+			devRect = viewport()->rect();
+		else
+			devRect = pixmap0_->rect();
+
+		TeBox box = poly.box();
+		mapDWtoV(box); // data coordinate to viewport coordinate
+		if(box.width() <= 0 || box.height() <= 0)
+			return;
+		int w = (int)box.width();
+		int h = (int)box.height();
+		if(w < 4)
+			w = 4;
+		if(h < 4)
+			h = 4;
+
+		QRect polyRect((int)box.x1_, (int)box.y1_, w, h);
+		if(polyRect.intersects(devRect) == false)
+			return;
+		QRect interRect = devRect & polyRect;
+
+		if(painter_.hasClipping())
+		{
+			QRegion interRegion = QRegion(interRect);
+			QRegion pclip = painter_.clipRegion();
+			interRegion = interRegion.intersect(pclip);
+			interRect = interRegion.boundingRect();
+		}
+
+		QPoint pOffset = interRect.topLeft();
+		int width = interRect.width();
+		int height = interRect.height();
+
+		int r = width%8;
+		if(r)
+			width += (8-r);
+		r = height%8;
+		if(r)
+			height += (8-r);
+
+		if(width == 0)
+			width = 8;
+		if(height == 0)
+			height = 8;
+
+		QBitmap	bm;
+		bm.resize(width, height);
+		//Fill bitmap with 0-bits: clipping region
+		bm.fill(Qt::color0);
+		QPainter maskPainter(&bm);
+
+		TeLinearRing ring = poly[0];
+ 		QPointArray parray = mapDWtoV(ring);
+
+		// Draw polygon with 1-bits: drawing region
+		QBrush bs(Qt::color1);
+		maskPainter.setBrush(bs);
+		QPen pen(Qt::color1, polygonPen_.width());
+		maskPainter.setPen(pen);
+		maskPainter.translate(-pOffset.x(), -pOffset.y());
+ 		maskPainter.drawPolygon( parray );
+
+  		vector<QPointArray> holeVec;
+		if(poly.size() > 1)
+		{
+			// Draw holes with 0-bits: clipping region
+			maskPainter.setBrush(Qt::color0);
+			pen.setColor(Qt::color0);
+			maskPainter.setPen(pen);
+			for ( k = 1; k < (int)poly.size(); k++ )
+  			{
+  				ring = poly[k];
+  				QPointArray hole = mapDWtoV(ring);
+				holeVec.push_back(hole);
+  				maskPainter.drawPolygon( hole );
+  			}
+		}
+		maskPainter.end();
+
+		QRegion clipRegion(bm);
+		clipRegion.translate(pOffset.x(), pOffset.y());
+
+		painter_.setClipRegion(clipRegion);
+
+		if(restoreBackground && pixmap0_->rect() == pixmap2_->rect())
+		{
+			// restore background from pixmap2_
+			painter_.drawPixmap(pOffset.x(), pOffset.y(), *pixmap2_, pOffset.x(),
+				pOffset.y(), interRect.width(), interRect.height());
+		}
+
+		if(polygonBrush_.style() != Qt::CustomPattern)
+		{
+			if(polygonBrush_.style() == Qt::SolidPattern)
+			{
+				int transp = 255 - (polygonTransparency_ * 255 / 100);
+
+				// set alpha buffer and color
+				QImage img(interRect.width(), interRect.height(), 32);
+				unsigned int val = (transp << 24) | (polygonColor_.red() << 16) | (polygonColor_.green() << 8) | polygonColor_.blue();
+				img.fill(val);
+				img.setAlphaBuffer(true);
+
+				// plot transparency
+				painter_.drawPixmap(pOffset.x(), pOffset.y(), img);
+			}
+		}
+		//else // polygonBrush_.style() == Qt::CustomPattern
+		//{
+		//	QImage imag("c:\\terra2\\aplicativos\\ui\\images\\visual.jpg");
+
+		//	if(imag.depth() != 32)
+		//		imag = imag.convertDepth(32);
+		//	int i, j, k;
+		//	unsigned char* u = imag.bits();
+		//	j = imag.width() * imag.height();
+		//	for(i=0; i<j; ++i)
+		//	{
+		//		k = i * 4;
+		//		// if pattern color is white, transparency is total
+		//		if(u[k] == 255 && u[k+1] == 255 && u[k+2] == 255)
+		//			u[k+3] = 0;
+		//		else
+		//		{
+		//			// if polygonColor_ is black, do not change the color
+		//			if(polygonColor_.blue() != 0 || polygonColor_.green() != 0 || polygonColor_.red() != 0)
+		//			{
+		//				int peso = 1;
+		//				u[k] = (u[k] + peso * polygonColor_.blue()) / (1+peso);
+		//				u[k+1] = (u[k+1] + peso * polygonColor_.green()) / (1+peso);
+		//				u[k+2] = (u[k+2] + peso * polygonColor_.red()) / (1+peso);
+		//			}
+		//			u[k+3] = transp;
+		//		}
+		//	}
+		//	imag.setAlphaBuffer(true);
+
+		//	int xp = pOffset.x() / imag.width() * imag.width();
+		//	int yp = pOffset.y() / imag.height() * imag.height();
+
+		//	for(j=0; j<interRect.height()+imag.height(); j+=imag.height())
+		//	{
+		//		for(i=0; i<interRect.width()+imag.width(); i+=imag.width())
+		//			painter_.drawPixmap(xp+i, yp+j, imag);
+		//	}
+		//}
+
+		// plot contours
+		painter_.setClipping(false);
+		painter_.drawPolyline( parray );
+		for(i = 0; i< (int)holeVec.size(); i++)
+			painter_.drawPolyline( holeVec[i] );
+	}
+}
+
+//void TeQtCanvas::plotPolygon (const TePolygon &poly, const bool& restoreBackground)
+//{
+//	if(canvasAndDataProjectionEqual_)
+//	{
+//		if (!TeIntersects (wc_, poly.box ()))
+//			return;
+//	}
+//	else
+//	{
+//		TeBox canvasBox = TeRemapBoxPC2Geodetic(wc_, canvasProjection_);
+//		TeBox pBox = TeRemapBoxPC2Geodetic(poly.box(), dataProjection_);
+//
+//		if (!TeIntersects(canvasBox, pBox))
+//			return;
+//	}
+//
+//	int		i, k;
+// 	QPoint	p;
+//	painter_.setBrush(polygonBrush_);
+//	painter_.setPen (polygonPen_);
+//
+//	if(polygonTransparency_==100 || polygonBrush_.style() == Qt::NoBrush) // contour
+//	{
+//		TeLinearRing ring = poly[0];
+// 		QPointArray parray = mapDWtoV(ring);
+//		painter_.drawPolyline( parray );
+//
+//		for ( k = 1; k < (int)(poly.size()); k++ )
+//  		{
+//  			ring = poly[k];
+//  			QPointArray hole = mapDWtoV(ring);
+//  			painter_.drawPolyline( hole );
+//  		}
+//	}
+//	else if(!restoreBackground && poly.size() == 1 && // no holes
+//		polygonTransparency_ == 0  && // and is opaque
+//		!(polygonBrush_.style() == Qt::NoBrush || // and not is NOBrush or Pattern
+//		polygonBrush_.style() == Qt::CustomPattern))
+//	{
+//		TeLinearRing ring = poly[0];
+// 		QPointArray parray = mapDWtoV(ring);
+//		painter_.drawPolygon( parray );
+//	}
+//	else
+//	{
+//		QRect devRect;
+//		if(painter_.device() == viewport())
+//			devRect = viewport()->rect();
+//		else
+//			devRect = pixmap0_->rect();
+//
+//		TeBox box = poly.box();
+//		mapDWtoV(box); // data coordinate to viewport coordinate
+//		if(box.width() <= 0 || box.height() <= 0)
+//			return;
+//		int w = (int)box.width();
+//		int h = (int)box.height();
+//		if(w < 4)
+//			w = 4;
+//		if(h < 4)
+//			h = 4;
+//
+//		QRect polyRect((int)box.x1_, (int)box.y1_, w, h);
+//		if(polyRect.intersects(devRect) == false)
+//			return;
+//		QRect interRect = devRect & polyRect;
+//
+//		if(painter_.hasClipping())
+//		{
+//			QRegion interRegion = QRegion(interRect);
+//			QRegion pclip = painter_.clipRegion();
+//			interRegion = interRegion.intersect(pclip);
+//			interRect = interRegion.boundingRect();
+//		}
+//
+//		QPoint pOffset = interRect.topLeft();
+//		int width = interRect.width();
+//		int height = interRect.height();
+//
+//		int r = width%8;
+//		if(r)
+//			width += (8-r);
+//		r = height%8;
+//		if(r)
+//			height += (8-r);
+//
+//		if(width == 0)
+//			width = 8;
+//		if(height == 0)
+//			height = 8;
+//
+//		QBitmap	bm;
+//		bm.resize(width, height);
+//		//Fill bitmap with 0-bits: clipping region
+//		bm.fill(Qt::color0);
+//		QPainter maskPainter(&bm);
+//
+//		TeLinearRing ring = poly[0];
+// 		QPointArray parray = mapDWtoV(ring);
+//
+//		// Draw polygon with 1-bits: drawing region
+//		QBrush bs(Qt::color1);
+//		maskPainter.setBrush(bs);
+//		QPen pen(Qt::color1, polygonPen_.width());
+//		maskPainter.setPen(pen);
+//		maskPainter.translate(-pOffset.x(), -pOffset.y());
+// 		maskPainter.drawPolygon( parray );
+//
+//  		vector<QPointArray> holeVec;
+//		if(poly.size() > 1)
+//		{
+//			// Draw holes with 0-bits: clipping region
+//			maskPainter.setBrush(Qt::color0);
+//			pen.setColor(Qt::color0);
+//			maskPainter.setPen(pen);
+//			for ( k = 1; k < (int)poly.size(); k++ )
+//  			{
+//  				ring = poly[k];
+//  				QPointArray hole = mapDWtoV(ring);
+//				holeVec.push_back(hole);
+//  				maskPainter.drawPolygon( hole );
+//  			}
+//		}
+//		maskPainter.end();
+//
+//		QRegion clipRegion(bm);
+//		clipRegion.translate(pOffset.x(), pOffset.y());
+//
+//		painter_.setClipRegion(clipRegion);
+//
+//		if(restoreBackground)
+//		{
+//			if(pixmap0_->rect() == pixmap2_->rect())
+//			{
+//				// restore background from pixmap2_
+//				painter_.drawPixmap(pOffset.x(), pOffset.y(), *pixmap2_, pOffset.x(),
+//					pOffset.y(), interRect.width(), interRect.height());
+//			}
+//		}
+//
+//		if((polygonTransparency_ == 0 && polygonBrush_.style() == Qt::SolidPattern) || !(polygonBrush_.style() == Qt::SolidPattern || polygonBrush_.style() == Qt::CustomPattern))
+//		{
+//			painter_.drawPolygon( parray );
+//		}
+//		else
+//		{
+//			int transp = 255 - (polygonTransparency_ * 255 / 100);
+//
+//			if(polygonBrush_.style() == Qt::SolidPattern)
+//			{
+//				// set alpha buffer and color
+//				QImage img(interRect.width(), interRect.height(), 32);
+//				unsigned int val = (transp << 24) | (polygonColor_.red() << 16) | (polygonColor_.green() << 8) | polygonColor_.blue();
+//				img.fill(val);
+//				img.setAlphaBuffer(true);
+//
+//				// plot transparency
+//				painter_.drawPixmap(pOffset.x(), pOffset.y(), img);
+//			}
+//			else
+//			{
+//				painter_.drawPolygon( parray );
+//			}
+//			//else // polygonBrush_.style() == Qt::CustomPattern
+//			//{
+//			//	QImage imag("c:\\terra2\\aplicativos\\ui\\images\\visual.jpg");
+//	
+//			//	if(imag.depth() != 32)
+//			//		imag = imag.convertDepth(32);
+//			//	int i, j, k;
+//			//	unsigned char* u = imag.bits();
+//			//	j = imag.width() * imag.height();
+//			//	for(i=0; i<j; ++i)
+//			//	{
+//			//		k = i * 4;
+//			//		// if pattern color is white, transparency is total
+//			//		if(u[k] == 255 && u[k+1] == 255 && u[k+2] == 255)
+//			//			u[k+3] = 0;
+//			//		else
+//			//		{
+//			//			// if polygonColor_ is black, do not change the color
+//			//			if(polygonColor_.blue() != 0 || polygonColor_.green() != 0 || polygonColor_.red() != 0)
+//			//			{
+//			//				int peso = 1;
+//			//				u[k] = (u[k] + peso * polygonColor_.blue()) / (1+peso);
+//			//				u[k+1] = (u[k+1] + peso * polygonColor_.green()) / (1+peso);
+//			//				u[k+2] = (u[k+2] + peso * polygonColor_.red()) / (1+peso);
+//			//			}
+//			//			u[k+3] = transp;
+//			//		}
+//			//	}
+//			//	imag.setAlphaBuffer(true);
+//	
+//			//	int xp = pOffset.x() / imag.width() * imag.width();
+//			//	int yp = pOffset.y() / imag.height() * imag.height();
+//	
+//			//	for(j=0; j<interRect.height()+imag.height(); j+=imag.height())
+//			//	{
+//			//		for(i=0; i<interRect.width()+imag.width(); i+=imag.width())
+//			//			painter_.drawPixmap(xp+i, yp+j, imag);
+//			//	}
+//			//}
+//		}
+//
+//		// plot contours
+//		painter_.setClipping(false);
+//		painter_.drawPolyline( parray );
+//		for(i = 0; i< (int)holeVec.size(); i++)
+//			painter_.drawPolyline( holeVec[i] );
+//	}
+//}
+
+QRect TeQtCanvas::getLegendRect (QPoint p, const QPixmap* pix, string tx)
+{
+	QRect rect;
+	TeVisual visual;
+	TeColor cor(0, 0, 0);
+	visual.size(8);
+	visual.bold(true);
+	visual.color(cor);
+	visual.fixedSize(true);
+	setTextColor (cor.red_, cor.green_, cor.blue_);
+	string fam(visual.family());
+	setTextStyle (fam, visual.size(), visual.bold(), visual.italic());
+
+	if(pix)
+	{
+		int x = (int)(p.x()+pix->width()+3.*printerFactor_);
+		int y = (int)(p.y()+13.*printerFactor_);
+		QFontMetrics fm(textFont_);
+		rect = fm.boundingRect(tx.c_str());
+		rect.setRight(rect.right() + x);
+		rect.setLeft(rect.left() + x);
+		rect.setTop(rect.top() + y);
+		rect.setBottom(rect.bottom() + y);
+		QRect prect = pix->rect();
+		prect.setRight(prect.right() + p.x());
+		prect.setLeft(prect.left() + p.x());
+		prect.setTop(prect.top() + p.y());
+		prect.setBottom(prect.bottom() + p.y());
+		rect |= prect;
+	}
+	else
+	{
+		int x = (int)(p.x()+1.*printerFactor_);
+		int y = (int)(p.y()+13.*printerFactor_);
+		QFontMetrics fm(textFont_);
+		rect = fm.boundingRect(tx.c_str());
+		rect = fm.boundingRect(tx.c_str());
+		rect.setRight(rect.right() + x);
+		rect.setLeft(rect.left() + x);
+		rect.setTop(rect.top() + y);
+		rect.setBottom(rect.bottom() + y);
+	}
+	return rect;
+}
+
+void TeQtCanvas::plotLegend (QPoint p, const QPixmap* pix, string tx)
+{
+	TeVisual visual;
+	TeColor cor(0, 0, 0);
+	visual.fixedSize(true);
+	visual.size(8);
+	visual.bold(true);
+	visual.color(cor);
+	setTextColor (cor.red_, cor.green_, cor.blue_);
+	string fam = visual.family();
+	setTextStyle (fam, visual.size(), visual.bold(), visual.italic());
+	painter_.setFont(textFont_);
+	painter_.setPen(textPen_);
+
+	if(pix)
+	{
+		int x = (int)(p.x()+pix->width()+3.*printerFactor_);
+		int y = (int)(p.y()+13.*printerFactor_);
+		bitBlt (painter_.device(), p.x(), p.y(), pix, 0, 0, pix->width(), pix->height(), Qt::CopyROP, true);
+		painter_.drawText(x, y, tx.c_str());
+	}
+	else
+	{
+		int x = (int)(p.x()+1.*printerFactor_);
+		int y = (int)(p.y()+13.*printerFactor_);
+		painter_.drawText(x, y, tx.c_str());
+	}
+}
+
+bool TeQtCanvas::locateGraphicScale(const QPoint& p)
+{
+	return graphicScaleRect_.contains(p);
+}
+
+void TeQtCanvas::plotLegend (const QPoint& p, const TeColor& cor, const string& tx)
+{
+	TeVisual  v;
+	TeColor c = cor;
+	v.color(c);
+	c.init(0, 0, 0);
+	v.contourColor(c);
+	int	ww = (int)(21. * printerFactor_);
+	int	hh = (int)(16. * printerFactor_);
+
+	drawPolygonRep(p, ww, hh, v);
+
+	QPoint pos = p;
+	pos.setX(pos.x() + ww);
+	pos.setX((int)(pos.x() + 3.*printerFactor_));
+	pos.setY((int)(pos.y()+13.*printerFactor_));
+	painter_.setPen(textPen_);
+	painter_.drawText(pos, tx.c_str());
+}
+
+void TeQtCanvas::plotLegend (const QPoint& p, TeLegendEntry* leg, const string& tx)
+{
+	TeVisual visual;
+	TeColor cor(0, 0, 0);
+	visual.fixedSize(true);
+	visual.size(8);
+	visual.bold(true);
+	visual.color(cor);
+	setTextColor (cor.red_, cor.green_, cor.blue_);
+	string fam = visual.family();
+	setTextStyle (fam, visual.size(), visual.bold(), visual.italic());
+	painter_.setFont(textFont_);
+	painter_.setPen(textPen_);
+	QPoint pos = p;
+
+	int	ww = (int)(21. * printerFactor_);
+	int	hh = (int)(16. * printerFactor_);
+
+	if(leg == 0)
+	{
+		pos.setX(pos.x() + ww);
+		pos.setX((int)(pos.x() + 3.*printerFactor_));
+		pos.setY((int)(p.y()+13.*printerFactor_));
+		painter_.drawText(pos.x(), pos.y(), tx.c_str());
+		return;
+	}
+
+	// TePOLYGONS = 1, TeLINES = 2, TePOINTS = 4, TeCELLS = 256
+	bool hasPolygons = true;
+	bool hasCells = true;
+	bool hasLines = true;
+	bool hasPoints = true;
+
+	string s = leg->to();
+	if(s.find("mean = ") == string::npos)
+	{
+		TeGeomRepVisualMap& vm = leg->getVisualMap();
+		if(vm.find(TePOLYGONS) == vm.end())
+		{
+			hasPolygons = false;
+			hasCells = false;
+		}
+		if(vm.find(TeLINES) == vm.end())
+			hasLines = false;
+		if(vm.find(TePOINTS) == vm.end())
+			hasPoints = false;
+
+		if ((hasPolygons || hasCells) && (hasLines == false) && (hasPoints == false))
+			drawPolygonRep(pos, ww, hh, *(vm[TePOLYGONS]));
+		else if ((hasPolygons || hasCells) && (hasLines == true) && (hasPoints == false))
+		{
+			drawPolygonRep(pos, ww, hh, *(vm[TePOLYGONS]));
+			pos.setX(pos.x() + ww);
+			drawLineRep(pos, *(vm[TeLINES]));
+		}
+		else if ((hasPolygons || hasCells) && (hasLines == false) && (hasPoints == true))
+		{
+			drawPolygonRep(pos, ww, hh, *(vm[TePOLYGONS]));
+			pos.setX(pos.x() + ww);
+			drawPointRep(pos, *(vm[TePOINTS]));
+		}
+		else if ((hasPolygons || hasCells) && (hasLines == true) && (hasPoints == true))
+		{
+			drawPolygonRep(pos, ww, hh, *(vm[TePOLYGONS]));
+			pos.setX(pos.x() + ww);
+			drawLineRep(pos, *(vm[TeLINES]));
+			pos.setX(pos.x() + ww);
+			drawPointRep(pos, *(vm[TePOINTS]));
+		}
+		else if (hasPolygons == false && hasCells == false && hasLines == true && hasPoints == false)
+			drawLineRep(pos, *(vm[TeLINES]));
+		else if (hasPolygons == false && hasCells == false && hasLines == false && hasPoints == true)
+			drawPointRep(pos, *(vm[TePOINTS]));
+		else if (hasPolygons == false && hasCells == false && hasLines == true && hasPoints == true)
+		{
+			drawLineRep(pos, *(vm[TeLINES]));
+			pos.setX(pos.x() + ww);
+			drawPointRep(pos, *(vm[TePOINTS]));
+		}
+	}
+
+	pos.setX(pos.x() + ww);
+	pos.setX((int)(pos.x() + 3.*printerFactor_));
+	pos.setY((int)(p.y()+13.*printerFactor_));
+	painter_.setPen(textPen_);
+	painter_.drawText(pos, tx.c_str());
+}
+
+void TeQtCanvas::drawPolygonRep (QPoint p, int w, int h, TeVisual& v)
+{
+	QBrush brush;
+	brush.setStyle(brushStyleMap_[(TePolyBasicType)v.style()]);
+	QColor bcor(v.color().red_, v.color().green_, v.color().blue_);
+	brush.setColor(bcor);
+	painter_.setBrush(brush);
+
+	QPen pen;
+	pen.setStyle(penStyleMap_[(TeLnBasicType)v.contourStyle()]);
+	QColor pcor(v.contourColor().red_, v.contourColor().green_, v.contourColor().blue_);
+	pen.setColor(pcor);
+	int pwidth = (Qt::PenStyle) v.contourWidth();
+	pen.setWidth (pwidth);
+	painter_.setPen(pen);
+
+	QRect rect(p.x(), (int)(p.y()+2.*printerFactor_), w, (int)(h-2.*printerFactor_));
+
+	// set alpha buffer and color
+    int transp = v.transparency();
+	transp = (int)(2.55 * (double)(100 - transp));
+	QImage img(rect.width(), rect.height(), 32);
+	unsigned int val = (transp << 24) | (bcor.red() << 16) | (bcor.green() << 8) | bcor.blue();
+	img.fill(val);
+	img.setAlphaBuffer(true);
+
+	// plot transparency
+	painter_.drawPixmap(rect.x(), rect.y(), img);
+	painter_.setBrush(Qt::NoBrush);
+	painter_.drawRect(rect);
+}
+
+void TeQtCanvas::drawLineRep (QPoint p, TeVisual& v)
+{
+	QPen		pen;
+	QColor		cor;
+	TeColor		tcor;
+	uint		width;
+
+	tcor = v.color();
+	cor.setRgb(tcor.red_, tcor.green_, tcor.blue_);
+	pen.setColor(cor);
+	pen.setStyle(penStyleMap_[(TeLnBasicType)v.style()]);
+	width = v.width();
+	pen.setWidth (width);
+	painter_.setPen(pen);
+
+	painter_.moveTo((int)(p.x()+1.*printerFactor_), (int)(p.y()+5.*printerFactor_));
+	painter_.lineTo((int)(p.x()+3.*printerFactor_), (int)(p.y()+5.*printerFactor_));
+	painter_.lineTo((int)(p.x()+6.*printerFactor_), (int)(p.y()+6.*printerFactor_));
+	painter_.lineTo((int)(p.x()+8.*printerFactor_), (int)(p.y()+8.*printerFactor_));
+	painter_.lineTo((int)(p.x()+10.*printerFactor_), (int)(p.y()+9.*printerFactor_));
+	painter_.lineTo((int)(p.x()+14.*printerFactor_), (int)(p.y()+10.*printerFactor_));
+	painter_.lineTo((int)(p.x()+16.*printerFactor_), (int)(p.y()+10.*printerFactor_));
+	painter_.lineTo((int)(p.x()+18.*printerFactor_), (int)(p.y()+9.*printerFactor_));
+	painter_.lineTo((int)(p.x()+19.*printerFactor_), (int)(p.y()+9.*printerFactor_));
+	painter_.moveTo((int)(p.x()+2.*printerFactor_), (int)(p.y()+13.*printerFactor_));
+	painter_.lineTo((int)(p.x()+3.*printerFactor_), (int)(p.y()+12.*printerFactor_));
+	painter_.lineTo((int)(p.x()+5.*printerFactor_), (int)(p.y()+11.*printerFactor_));
+	painter_.lineTo((int)(p.x()+6.*printerFactor_), (int)(p.y()+11.*printerFactor_));
+	painter_.lineTo((int)(p.x()+9.*printerFactor_), (int)(p.y()+10.*printerFactor_));
+	painter_.lineTo((int)(p.x()+10.*printerFactor_), (int)(p.y()+9.*printerFactor_));
+}
+
+void TeQtCanvas::drawPointRep (QPoint pp, TeVisual& v)
+{
+	QColor		cor;
+	TeColor		tcor;
+
+	tcor = v.color();
+	cor.setRgb(tcor.red_, tcor.green_, tcor.blue_);
+	int s = v.style();
+	double	w = (double)v.size() * printerFactor_;
+
+	QPoint p = pp;
+	QPoint offset((int)(10.*printerFactor_), (int)(7.*printerFactor_));
+	p += offset;
+
+	painter_.setPen(cor);
+	if (s == TePtTypePlus)
+	{
+		painter_.drawLine ((int)(p.x()-w/2),p.y(),(int)(p.x()+w/2.),p.y());
+		painter_.drawLine (p.x(),(int)(p.y()-w/2.),p.x(),(int)(p.y()+w/2.));
+	}
+	else if (s == TePtTypeStar)
+	{
+		painter_.save ();
+		painter_.translate (p.x(),p.y());
+		painter_.drawLine (0,(int)(-w/2.),0,(int)(w/2.));
+		painter_.rotate (45);
+		painter_.drawLine (0,(int)(-w/2.),0,(int)(w/2.));
+		painter_.rotate (-90);
+		painter_.drawLine (0,(int)(-w/2.),0,(int)(w/2.));
+		painter_.restore ();
+	}
+	else if (s == TePtTypeCircle)
+	{
+		painter_.setBrush(cor);
+		painter_.drawChord ((int)(p.x()-w/2.),(int)(p.y()-w/2.),(int)w,(int)w,0,360*16);
+	}
+	else if (s == TePtTypeX)
+	{
+		painter_.drawLine ((int)(p.x()-w/2.),(int)(p.y()-w/2.),(int)(p.x()+w/2.),(int)(p.y()+w/2.));
+		painter_.drawLine ((int)(p.x()-w/2.),(int)(p.y()+w/2.),(int)(p.x()+w/2.),(int)(p.y()-w/2.));
+	}
+	else if (s == TePtTypeBox)
+	{
+		painter_.fillRect ((int)(p.x()-w/2.),(int)(p.y()-w/2.),(int)w,(int)w,cor);
+	}
+	else if (s == TePtTypeDiamond)
+	{
+		QPointArray pa(5);
+		pa.setPoint(0, (int)(p.x()-w/2.), p.y());
+		pa.setPoint(1, p.x(), (int)(p.y()-w/2.));
+		pa.setPoint(2, (int)(p.x()+w/2.), p.y());
+		pa.setPoint(3, p.x(), (int)(p.y()+w/2.));
+ 		pa.setPoint(4, (int)(p.x()-w/2.), p.y());
+		painter_.setBrush(cor);
+		painter_.drawPolygon(pa);
+	}
+	else if (s == TePtTypeHollowCircle)
+	{
+		painter_.drawArc ((int)(p.x()-w/2.),(int)(p.y()-w/2.),(int)w,(int)w,0,360*16);
+	}
+	else if (s == TePtTypeHollowBox)
+	{
+		painter_.setBrush(Qt::NoBrush);
+		painter_.drawRect ((int)(p.x()-w/2.),(int)(p.y()-w/2.),(int)w,(int)w);
+	}
+	else if (s == TePtTypeHollowDiamond)
+	{
+		painter_.drawLine ((int)(p.x()-w/2.),p.y(),p.x(),(int)(p.y()-w/2.));
+		painter_.drawLine (p.x(),(int)(p.y()-w/2.),(int)(p.x()+w/2.),p.y());
+		painter_.drawLine ((int)(p.x()+w/2.),p.y(),p.x(),(int)(p.y()+w/2.));
+		painter_.drawLine (p.x(),(int)(p.y()+w/2.),(int)(p.x()-w/2.),p.y());
+	}
+}
+
+void TeQtCanvas::plotLine (TeLine2D &line)
+{
+	TeBox b = getDataWorld ();
+	if (!TeIntersects (b, line.box ()))
+		return;
+	
+	linePen_.setColor (lineColor_);
+	painter_.setPen(linePen_);
+
+	QPointArray a = mapDWtoV(line);
+	painter_.drawPolyline( a );
+}
+
+void TeQtCanvas::plotArc (TeArc &arc)
+{
+	TeBox b = getDataWorld ();
+	if (!TeIntersects (b, arc.box ()))
+		return;
+	
+	arcPen_.setColor (arcColor_);
+	painter_.setPen(arcPen_);
+
+	QPoint pfrom, pto;
+
+	pfrom = mapDWtoV (arc.fromNode().location());
+	pto   = mapDWtoV (arc.toNode().location());
+
+	painter_.drawLine( pfrom, pto );
+
+	double ang = atan2 (double(pfrom.y()-pto.y()), double (pfrom.x()-pto.x()));
+	QPoint pm((int)((pto.x()+pfrom.x())/2.+0.5),(int)((pto.y()+pfrom.y())/2.+0.5));
+	
+	double ang1 = ang + 25.*TeCDR;
+	double ang2 = ang - 25.*TeCDR;
+	QPoint	p1((int)(10.*cos(ang1)+0.5),(int)(10.*sin(ang1)+.5)),
+			p2((int)(10.*cos(ang2)+0.5),(int)(10.*sin(ang2)+.5));
+	p1 += pm;
+	p2 += pm;
+	painter_.drawLine( pm, p1 );
+	painter_.drawLine( pm, p2 );
+	painter_.drawLine( p1, p2 );
+
+}
+
+void TeQtCanvas::plotPie (double x, double y, double w, double h, double a, double alen)
+{
+	int	dx, dy, dw, dh, da, df;
+
+	pieBrush_.setColor (pieColor_);
+	painter_.setBrush(pieBrush_);
+	painter_.setPen(linePen_);
+
+	TeCoord2D p(x, y);
+	QPoint	qp = mapDWtoV(p);
+	dx = qp.x();
+	dy = qp.y();
+
+	TeCoord2D pt(x+w, y+h);
+	QPoint	qpt = mapDWtoV(pt);
+	dw = abs(qpt.x() - dx);
+	dh = abs(qpt.y() - dy);
+
+	da = (int)(a * 16);
+	df = (int)(alen * 16);
+	painter_.drawPie(dx, dy-dh, dw, dh, da, df);
+}
+
+void TeQtCanvas::setPieColor (int r, int g, int b)
+{
+	pieColor_.setRgb(r, g, b);
+	pieBrush_.setStyle(Qt::SolidPattern);
+}
+
+void TeQtCanvas::plotRect (QRect& rect)
+{
+	rectBrush_.setColor (rectColor_);
+	painter_.setBrush(Qt::NoBrush);
+	painter_.setPen(linePen_);
+	painter_.drawRect(rect);
+}
+
+void TeQtCanvas::plotRect (double x, double y, double w, double h, int transp, bool legend)
+{
+	if(pixmap1_ == 0)
+		return;
+
+	int	dx, dy, dw, dh;
+
+	TeCoord2D p(x, y);
+	QPoint	qp;
+	if(legend)
+		qp = QPoint((int)p.x(), (int)p.y());
+	else
+		qp = mapDWtoV(p);
+	dx = qp.x();
+	dy = qp.y();
+
+	TeCoord2D pt(x+w, y+h);
+	QPoint	qpt;
+	if(legend)
+	{
+		qpt = QPoint((int)pt.x(), (int)pt.y());
+		dw = abs(qpt.x() - dx);
+		dh = abs(qpt.y() - dy);
+	}
+	else
+	{	
+//		qpt = mapDWtoV(pt);
+		TeBox b = wc_;
+		mapCWtoDW(b);
+		TeCoord2D center = b.center();
+		TeCoord2D cc = center;
+		cc.x_ += w;
+		dw = abs(mapDWtoV(center).x() - mapDWtoV(cc).x());
+		cc = center;
+		cc.y_ += h;
+		dh = abs(mapDWtoV(center).y() - mapDWtoV(cc).y());
+	}
+
+	if(transp == 0)
+	{
+		rectBrush_.setColor (rectColor_);
+		painter_.setBrush(rectBrush_);
+		painter_.setPen(linePen_);
+		painter_.drawRect(dx, dy-dh, dw, dh);
+	}
+	else
+	{
+		double alpha = transp / 100.;
+		double beta = 1 - alpha;
+		double red = rectColor_.red() * beta;
+		double green = rectColor_.green() * beta;
+		double blue = rectColor_.blue() * beta;
+
+		int r = dw%8;
+		if(r)
+			dw += (8-r);
+		r = dh%8;
+		if(r)
+			dh += (8-r);
+
+		QImage ima = pixmap0_->convertToImage();
+		QImage imap(dw, dh, 32);
+		int i, j;
+		int x = qp.x();
+		int	y = qp.y() - dh;
+		for(i=x; i-x<dw && i<ima.width(); i++)
+		{
+			if(i < 0)
+				continue;
+			for(j=y; j-y<dh && j<ima.height(); j++)
+			{
+				if(j < 0)
+					continue;
+				QRgb v = ima.pixel(i, j);
+				int r = (int)((double)qRed(v) * alpha + red);
+				int g = (int)((double)qGreen(v) * alpha + green);
+				int b = (int)((double)qBlue(v) * alpha + blue);
+				QRgb t = qRgb(r, g, b);
+				imap.setPixel(i-x, j-y, t);
+			}
+		}
+
+		QPixmap pm(dw, dh);
+		pm.convertFromImage(imap);
+		QRect rec = pm.rect();
+		rec &= painter_.viewport();
+		bitBlt (painter_.device(), x, y, &pm, 0, 0, rec.width(), rec.height(), Qt::CopyROP, true);
+	}
+}
+
+void TeQtCanvas::setRectColor (int r, int g, int b)
+{
+	rectColor_.setRgb(r, g, b);
+	rectBrush_.setStyle(Qt::SolidPattern);
+}
+
+static inline int blendComponent( int back, int fore, int falpha )
+{
+	int balpha = 255 - falpha;
+    int a = falpha + balpha -(falpha*balpha)/255;
+    return (falpha*fore + balpha*back -(balpha*falpha*fore)/255)/a;  
+}
+
+int d2dms(double v)
+{
+    double av;
+    int d, m, s;
+    av = fabs(v);
+    d = (int)av;
+    av = av - d;
+    av = av * 60;
+    m = (int)av;
+    av = av - m;
+    av = av * 60;
+    s = (int)av;
+    int gms = d * 10000 + m * 100 + s ;
+	return gms;
+}
+
+double dms2d (int vs)
+{
+	int v = abs(vs);
+	int dd = v/10000;
+	int dm = (v-dd*10000)/100;
+	int ds = v - dd*10000 - dm*100;
+	double d = dd + dm/60. + ds/3600.;
+	if (vs < 0)
+		d = -d;
+	return d;
+}
+
+string buildMosaicName (int x, int y, int delta)
+{
+	int		lad,lam,las,lod,lom,los,dd,dm,ds;
+	char	hemis,hemiss;
+	int		lx1,ly1;
+
+	hemis = 'S';
+	if (y>=0)hemis = 'N';
+	ly1 = abs(y);
+	lad = ly1/3600;
+	lam = (ly1-lad*3600)/60;
+	las = ly1 - lad*3600 - lam*60;
+
+	hemiss = 'O';
+	if (x>=0)hemis = 'E';
+	lx1 = abs(x);
+	lod = lx1/3600;
+	lom = (lx1-lod*3600)/60;
+	los = lx1 - lod*3600 - lom*60;
+
+	dd = delta/10000;
+	dm = (delta-dd*10000)/100;
+	ds = delta - dd*10000 - dm*100;
+
+	char name[128];
+	sprintf(name,"%c%02d%02d%02d%c%02d%02d%02d%02d%02d%02d",
+		hemis,lad,lam,las,hemiss,lod,lom,los,dd,dm,ds);
+	return string(name);
+}
+
+void TeQtCanvas::copyPixmap0ToPrinter()
+{
+	if (pixmap0_)
+	{
+		QPrinter printer;
+		if (printer.setup())
+		{
+			QPainter p(&printer);
+
+			QPaintDevice* dev = painter_.device();
+			if(dev == pixmap0_)
+				painter_.end();
+
+			p.drawPixmap(0, 0, *pixmap0_);
+			p.flush();
+			p.end();
+
+			if(dev && painter_.device() == 0)
+				painter_.begin(dev);
+		}
+	}
+}
+
+void TeQtCanvas::copyPixmapToWindow(QPixmap* p, int ulx, int uly, int w, int h)
+{
+	bitBlt (viewport(),ulx,uly,p,ulx,uly,w,h,Qt::CopyROP,true);
+}
+
+void TeQtCanvas::copyPixmap0To(QPaintDevice* dev)
+{
+	if (pixmap0_)
+	{
+		bitBlt (dev,0,0,pixmap0_,0,0,width_,height_,Qt::CopyROP,true);
+	}
+}
+
+void TeQtCanvas::copyPixmap0ToWindow()
+{
+	if (pixmap0_)
+	{
+		bitBlt (viewport(),0,0,pixmap0_,contentsX(),contentsY(),viewport()->rect().width(),viewport()->rect().height(),Qt::CopyROP,true);
+	}
+}
+
+void TeQtCanvas::copyPixmap1ToWindow()
+{
+	if (pixmap1_)
+	{
+		bitBlt (viewport(),0,0,pixmap1_,contentsX(),contentsY(),viewport()->rect().width(),viewport()->rect().height(),Qt::CopyROP,true);
+	}
+}
+
+void TeQtCanvas::copyPixmap0ToWindow(int ulx, int uly, int w, int h)
+{
+	if (pixmap0_)
+	{
+		bitBlt (viewport(),ulx,uly,pixmap0_,ulx,uly,w,h,Qt::CopyROP,true);
+	}
+}
+
+void TeQtCanvas::copyPanArea(int x, int y)
+{
+	if (pixmap0_)
+	{
+		QPaintDevice* dev = painter_.device();
+		if(dev)
+			painter_.end();
+		painter_.begin(viewport());
+		QRect a, b;
+		int vw = viewport()->width();
+		int vh = viewport()->height();
+
+		int xi = horizontalScrollBar()->value();
+		int yi = verticalScrollBar()->value();
+		bitBlt (viewport(), 0, 0, pixmap1_, xi+x, yi+y, vw, vh, Qt::CopyROP, true);
+
+		if((xi + x + vw) > contentsWidth())
+		{
+			int ww =  (xi + x + vw) - contentsWidth();
+			int xii = vw - ww;
+			QRect a(xii, 0, vw - xii, vh);
+			painter_.fillRect(a, painter_.backgroundColor());
+		}
+		if((xi + x) < 0)
+		{
+			QRect a(0, 0, -(xi + x), vh);
+			painter_.fillRect(a, painter_.backgroundColor());
+		}
+		if((yi + y + vh) > contentsHeight())
+		{
+			int hh =  (yi + y + vh) - contentsHeight();
+			int yii = vh - hh;
+			QRect a(0, yii, vw, vh - yii);
+			painter_.fillRect(a, painter_.backgroundColor());
+		}
+		if((yi + y) < 0)
+		{
+			QRect a(0, 0, vw, -(yi + y));
+			painter_.fillRect(a, painter_.backgroundColor());
+		}
+
+		painter_.end();
+		if(dev)
+			painter_.begin(dev);
+	}
+}
+
+void TeQtCanvas::copyPixmap0ToPixmap1()
+{
+	if (pixmap1_ && pixmap0_)
+		bitBlt (pixmap1_,0,0,pixmap0_,0,0,width_,height_,Qt::CopyROP,true);
+}
+
+void TeQtCanvas::copyPixmap0ToPixmap1(int ulx, int uly, int w, int h)
+{
+	if (pixmap1_ && pixmap0_)
+		bitBlt (pixmap1_,ulx,uly,pixmap0_,ulx,uly,w,h,Qt::CopyROP,true);
+}
+
+void TeQtCanvas::copyPixmap1ToPixmap0()
+{
+	if (pixmap1_ && pixmap0_)
+		bitBlt (pixmap0_,0,0,pixmap1_,0,0,width_,height_,Qt::CopyROP,true);
+}
+
+void TeQtCanvas::copyPixmap1ToPixmap0(int ulx, int uly, int w, int h)
+{
+	if (pixmap1_ && pixmap0_)
+		bitBlt (pixmap0_,ulx,uly,pixmap1_,ulx,uly,w,h,Qt::CopyROP,true);
+}
+
+void TeQtCanvas::copyPixmap1ToPixmap2()
+{
+	if (pixmap1_ && pixmap2_)
+	{
+		bitBlt (pixmap2_,0,0,pixmap1_,0,0,width_,height_,Qt::CopyROP,true);
+		qimage_.reset();
+		qimage_ = pixmap2_->convertToImage();
+	}
+}
+
+void TeQtCanvas::copyPixmap1ToPixmap2(int ulx, int uly, int w, int h)
+{
+	if (pixmap1_ && pixmap2_)
+	{
+		bitBlt (pixmap2_,ulx,uly,pixmap1_,ulx,uly,w,h,Qt::CopyROP,true);
+		qimage_.reset();
+		qimage_ = pixmap2_->convertToImage();
+	}
+}
+
+void TeQtCanvas::copyPixmap2ToPixmap1()
+{
+	if (pixmap1_ && pixmap2_)
+		bitBlt (pixmap1_,0,0,pixmap2_,0,0,width_,height_,Qt::CopyROP,true);
+}
+
+void TeQtCanvas::copyPixmap2ToPixmap1(int ulx, int uly, int w, int h)
+{
+	if (pixmap1_ && pixmap2_)
+		bitBlt (pixmap1_,ulx,uly,pixmap2_,ulx,uly,w,h,Qt::CopyROP,true);
+}
+
+void TeQtCanvas::plotRaster(TeRaster* raster, TeRasterTransform* transf, TeQtProgress *progress)
+{
+	int dt = CLOCKS_PER_SEC/2;
+	int dt2 = CLOCKS_PER_SEC; //* .000001;
+	clock_t	t0, t1, t2;
+	params_.fileName_ = raster->params().fileName_;
+
+	if (buildRaster ())
+	{
+		// Calculate the box of input image that intersects the box of the canvas
+		TeBox bboxBackRaster = backRaster_->params().boundingBox();		
+		TeBox bboxSearched = TeRemapBox(bboxBackRaster, backRaster_->projection(), raster->projection());
+		TeBox bboxIntersection;
+		if (!TeIntersection (raster->params().boundingBox(),bboxSearched,bboxIntersection))
+			return ;			// no intersection 
+
+		// fill QImage with zero (100% of transparency)
+		TeDecoderQtImage* decqt = reinterpret_cast<TeDecoderQtImage*>(backRaster_->decoder());
+		decqt->getImage()->setAlphaBuffer(false);
+		decqt->setAlphaBufferToTransparent();
+
+		// Create a remapping tool to back raster
+		TeRasterRemap remap;
+		if (transf)
+		{
+			remap.setTransformer(transf);
+//			unsigned int tt = transf->getTransparency();
+			decqt->setTransparency(transf->getTransparency());
+		}
+		remap.setOutput(backRaster_);
+		TeBox b = raster->params().boundingBox();
+		remap.setROI(b);
+
+		// Calculates best resolution level to display the input image on this canvas
+		//int res = raster->decoder()->bestResolution(params_.resx_/raster->params().resx_);
+		int res = raster->decoder()->bestResolution(bboxBackRaster, backRaster_->params().ncols_, backRaster_->params().nlines_, backRaster_->params().projection());
+		
+
+		// Check if raster blocks in best level of resolution that intersects the canvas box
+		TeRasterParams parBlock;	
+		if (raster->selectBlocks(bboxIntersection,res,parBlock))        
+		{
+			if (progress)
+				progress->setTotalSteps(raster->numberOfSelectedBlocks());
+			t2 = clock();
+			t0 = t1 = t2;
+			
+			// Process each block as an independent raster decoded in memory
+			TeRaster* block = new TeRaster;
+			remap.setInput(block);
+
+			TeDecoderMemory* decMem = new TeDecoderMemory(parBlock);
+			decMem->init();
+			// Portal of raster block selection behaves as portal of geometries
+			// use the "bool flag - do - while" scheme
+			int numBlockProcessed=0;
+			bool flag = true;
+			do
+			{
+				flag = raster->fetchRasterBlock(decMem);
+				block->setDecoder(decMem);
+				remap.apply();
+				numBlockProcessed++;
+				t2 = clock();
+				if (int(t2-t1) > dt)
+				{
+					t1 = t2;
+					if((int)(t2-t0) > dt2)	
+					{
+						if (progress)
+						{
+							if (progress->wasCancelled())
+								break;
+							else
+								progress->setProgress(numBlockProcessed);
+						}
+					}
+				}
+			} while (flag);
+			if (progress)
+				progress->reset();
+			decMem->clear();
+			delete block;
+			raster->clearBlockSelection();
+		}
+		else		// no blocks found try to remap the whole raster
+		{
+			remap.setInput(raster);
+			remap.apply(true);	
+		}
+		decqt->getImage()->setAlphaBuffer(true);
+		painter_.drawPixmap(0, 0, *(decqt->getImage()));
+	}
+}
+
+bool TeQtCanvas::buildRaster ()
+{
+	if (!backRaster_)
+	{
+		backRaster_ = new TeRaster();
+		params_.mode_ = 'c';
+		params_.useDummy_ = true;
+		params_.setDummy(255);
+		TeDecoderQtImage *dec = new TeDecoderQtImage(params_);
+		backRaster_->setDecoder (dec);
+		backRaster_->init();
+	}
+	return true;
+}
+
+void TeQtCanvas::endPrinting()
+{
+	QPaintDevice* dev = painter_.device();
+	if(dev)
+		painter_.end();
+	if(pixmap0_)
+		painter_.begin(pixmap0_);
+}
+
+void TeQtCanvas::plotGraphicScale(TeVisual& visual, double offsetX, double offsetY, double unitConv, const string& dunit)
+{
+	TeBox	box = getWorld();
+	if(box.isValid() == false)
+		return;
+
+	string unit = dunit;
+	if (dunit.empty())
+		unit = canvasProjection_->units();
+
+	double	w = box.width();
+	double www = w / unitConv;
+	double	dx = www / 9.;
+	long	idx = (long)dx;
+	//long	idx = TeRound(dx);
+	double	f;
+	double	fa = 1.;
+	int		fw, fh;
+
+	int	size = visual.size();
+	if(pixmap0_ && pixmap1_ && (pixmap0_->rect() != pixmap1_->rect()))
+		size = (int)((double)size * printerFactor_ + .5);
+	//	size = TeRound((double)size * printerFactor_);
+
+	int conta = 1000;
+	if(idx > 0)
+	{
+		while(--conta)
+		{
+			dx /= 10.;
+			fa *= 10.;
+			idx = (long)dx;
+	//		idx = TeRound(dx);
+			if(idx == 0)
+			{
+				idx = (long)(dx * 10.);
+				f = idx * fa / 10.;
+	//			idx = TeRound(dx * 10.);
+	//			f = TeRound((double)idx * fa / 10.);
+				break;
+			}
+		}
+	}
+	else
+	{
+		while(--conta)
+		{
+			dx *= 10.;
+			fa /= 10.;
+			idx = (long)dx;
+	//		idx = TeRound(dx);
+			if(idx > 0)
+			{
+				f = idx * fa;
+	//			f = TeRound((double)idx * fa);
+				break;
+			}
+		}
+	}
+	if(conta == 0)
+		return;
+
+	double fff = f * unitConv;
+	double space = fff * 3.;
+	double hini = box.x1_ + (w - space) / 2.;
+
+	TeColor	cor = visual.color();
+	string	family = visual.family();
+	bool	bold = visual.bold();
+	bool	italic = visual.italic();
+	QFont font(family.c_str(), size);
+	font.setBold (bold);
+	font.setItalic (italic);
+	painter_.setFont(font);
+
+	QFontMetrics fm(font);
+	QRect rect;
+	rect = fm.boundingRect(unit.c_str());
+	fh = rect.height();
+	double vini = box.y1_ + mapVtoCW(fh+6);
+
+	TeCoord2D wp(hini, vini);
+	int x = TeRound((wp.x() - xmin_)*f_) + x0_;
+	int y = height_ - y0_ - TeRound((wp.y() - ymin_)*f_);
+	QPoint p1(x, y);
+	correctScrolling (p1);
+
+	wp.x(wp.x() + fff);
+	x = TeRound((wp.x() - xmin_)*f_) + x0_;
+	y = height_ - y0_ - TeRound((wp.y() - ymin_)*f_);
+	QPoint p2(x, y);
+	correctScrolling (p2);
+
+	wp.x(wp.x() + fff);
+	x = TeRound((wp.x() - xmin_)*f_) + x0_;
+	y = height_ - y0_ - TeRound((wp.y() - ymin_)*f_);
+	QPoint p3(x, y);
+	correctScrolling (p3);
+
+	wp.x(wp.x() + fff);
+	x = TeRound((wp.x() - xmin_)*f_) + x0_;
+	y = height_ - y0_ - TeRound((wp.y() - ymin_)*f_);
+	QPoint p4(x, y);
+	correctScrolling (p4);
+
+	rect = fm.boundingRect("0");
+	fw = rect.width();
+	QPoint pp(p1);
+	bool setRect = false;
+	if(graphicScaleRect_.isValid())
+	{
+		x = TeRound((double)graphicScaleRect_.left() * printerFactor_ + (double)fw/2.);
+		y = TeRound((double)graphicScaleRect_.top() * printerFactor_ + (double)rect.height() + 8. * printerFactor_);
+		pp.setX(x);
+		pp.setY(y);
+	}
+	else
+	{
+		setRect = true;
+		offsetX = 0.;
+		offsetY = 0.;
+	}
+
+	x = TeRound((double)pixmap0_->width() * offsetX);
+	y = TeRound((double)pixmap0_->height() * offsetY);
+	if(x!=0 || y!=0)
+	{
+		graphicScaleRect_.setLeft(graphicScaleRect_.left() + x);
+		graphicScaleRect_.setRight(graphicScaleRect_.right() + x);
+		graphicScaleRect_.setTop(graphicScaleRect_.top() + y);
+		graphicScaleRect_.setBottom(graphicScaleRect_.bottom() + y);
+	}
+
+	QPoint offset(x, y);
+	pp += offset;
+
+	QPoint interval = p2 - p1;
+
+	p1 = pp;
+	p2 = p1 + interval;
+	p3 = p2 + interval;
+	p4 = p3 + interval;
+	if(setRect)
+	{
+		x = TeRound(((double)p1.x() - (double)fw/2.) / printerFactor_);
+		graphicScaleRect_.setLeft(x);
+	}
+
+	QPen pen(QColor(cor.red_, cor.green_, cor.blue_));
+	painter_.setPen(pen);
+
+	if(bold == false)
+	{
+		QPoint pa = p2;
+		QPoint pb = p3;
+		painter_.drawLine(pa, pb);
+
+		pa = p1;
+		pb = pa;
+		y = TeRound((double)pa.y() - 5. * printerFactor_);
+		pa.setY(y);
+		y = TeRound((double)pb.y() + 4. * printerFactor_);
+		pb.setY(y);
+		painter_.drawLine(pa, pb);
+
+		pa = p2; 
+		pb = pa;
+		y = TeRound((double)pa.y() - 5. * printerFactor_);
+		pa.setY(y);
+		y = TeRound((double)pb.y() + 4. * printerFactor_);
+		pb.setY(y);
+		painter_.drawLine(pa, pb);
+
+		pa = p3; 
+		pb = pa;
+		y = TeRound((double)pa.y() - 5. * printerFactor_);
+		pa.setY(y);
+		y = TeRound((double)pb.y() + 4. * printerFactor_);
+		pb.setY(y);
+		painter_.drawLine(pa, pb);
+
+		pa = p4; 
+		pb = pa;
+		y = TeRound((double)pa.y() - 5. * printerFactor_);
+		pa.setY(y);
+		y = TeRound((double)pb.y() + 4. * printerFactor_);
+		pb.setY(y);
+		painter_.drawLine(pa, pb);
+
+		pa = p1;
+		pb = p4;
+		y = TeRound((double)pa.y() - 1. * printerFactor_);
+		pa.setY(y);
+		y = TeRound((double)pb.y() - 1. * printerFactor_);
+		pb.setY(y);
+		painter_.drawLine(pa, pb);
+		y = TeRound((double)pa.y() + 2. * printerFactor_);
+		pa.setY(y);
+		y = TeRound((double)pb.y() + 2. * printerFactor_);
+		pb.setY(y);
+		painter_.drawLine(pa, pb);
+	}
+	else
+	{
+		QPoint pa = p2;
+		QPoint pb = p3;
+		painter_.drawLine(pa, pb);
+		y = TeRound((double)pa.y() - 1. * printerFactor_);
+		pa.setY(y);
+		y = TeRound((double)pb.y() - 1. * printerFactor_);
+		pb.setY(y);
+		painter_.drawLine(pa, pb);
+
+		pa = p1;
+		pb = pa;
+		y = TeRound((double)pa.y() - 5. * printerFactor_);
+		pa.setY(y);
+		y = TeRound((double)pb.y() + 4. * printerFactor_);
+		pb.setY(y);
+		painter_.drawLine(pa, pb);
+		x = TeRound((double)pa.x() - 1. * printerFactor_);
+		pa.setY(x);
+		x = TeRound((double)pb.x() - 1. * printerFactor_);
+		pb.setY(x);
+		painter_.drawLine(pa, pb);
+
+		pa = p2; 
+		pb = pa;
+		y = TeRound((double)pa.y() - 5. * printerFactor_);
+		pa.setY(y);
+		y = TeRound((double)pb.y() + 4. * printerFactor_);
+		pb.setY(y);
+		painter_.drawLine(pa, pb);
+		x = TeRound((double)pa.x() - 1. * printerFactor_);
+		pa.setY(x);
+		x = TeRound((double)pb.x() - 1. * printerFactor_);
+		pb.setY(x);
+		painter_.drawLine(pa, pb);
+
+		pa = p3; 
+		pb = pa;
+		y = TeRound((double)pa.y() - 5. * printerFactor_);
+		pa.setY(y);
+		y = TeRound((double)pb.y() + 4. * printerFactor_);
+		pb.setY(y);
+		painter_.drawLine(pa, pb);
+		x = TeRound((double)pa.x() - 1. * printerFactor_);
+		pa.setY(x);
+		x = TeRound((double)pb.x() - 1. * printerFactor_);
+		pb.setY(x);
+		painter_.drawLine(pa, pb);
+
+		pa = p4; 
+		pb = pa;
+		y = TeRound((double)pa.y() - 5. * printerFactor_);
+		pa.setY(y);
+		y = TeRound((double)pb.y() + 4. * printerFactor_);
+		pb.setY(y);
+		painter_.drawLine(pa, pb);
+		x = TeRound((double)pa.x() - 1. * printerFactor_);
+		pa.setY(x);
+		x = TeRound((double)pb.x() - 1. * printerFactor_);
+		pb.setY(x);
+		painter_.drawLine(pa, pb);
+
+		pa = p1;
+		pb = p4;
+		y = TeRound((double)pa.y() - 2. * printerFactor_);
+		pa.setY(y);
+		y = TeRound((double)pb.y() - 2. * printerFactor_);
+		pb.setY(y);
+		painter_.drawLine(pa, pb);
+		y = TeRound((double)pa.y() + 3. * printerFactor_);
+		pa.setY(y);
+		y = TeRound((double)pb.y() + 3. * printerFactor_);
+		pb.setY(y);
+		painter_.drawLine(pa, pb);
+	}
+
+	x = TeRound((double)p1.x()-(double)fw/2.);
+	y = TeRound((double)p1.y()-8.*printerFactor_);
+	painter_.drawText(x, y, "0");
+	if(setRect)
+	{
+		y = TeRound(((double)y - (double)rect.height()) / printerFactor_);
+		graphicScaleRect_.setTop(y);
+	}
+
+	char buf[50];
+	long n = (long)f;
+
+	if(n > 0)
+	{
+		sprintf(buf, "%ld", n);
+		QString s = buf;
+		rect = fm.boundingRect(s);
+		int fw1 = rect.width();
+
+		sprintf(buf, "%ld", n*2);
+		s = buf;
+		rect = fm.boundingRect(s);
+		int fw2 = rect.width();
+
+		sprintf(buf, "%ld", n*3);
+		s = buf;
+		rect = fm.boundingRect(s);
+		int fw3 = rect.width();
+
+		if((fw1 + fw2)/2 < p3.x()-p2.x() &&
+			(fw2 + fw3)/2 < p3.x()-p2.x())
+		{
+			sprintf(buf, "%ld", n);
+			QString s = buf;
+			rect = fm.boundingRect(s);
+			fw = rect.width();
+			x = TeRound((double)p2.x()-(double)fw/2.);
+			y = TeRound((double)p2.y()-8.*printerFactor_);
+			painter_.drawText(x, y, s);
+
+			sprintf(buf, "%ld", n*2);
+			s = buf;
+			rect = fm.boundingRect(s);
+			fw = rect.width();
+			x = TeRound((double)p3.x()-(double)fw/2.);
+			y = TeRound((double)p3.y()-8.*printerFactor_);
+			painter_.drawText(x, y, s);
+		}
+
+		sprintf(buf, "%ld", n*3);
+		s = buf;
+		rect = fm.boundingRect(s);
+		fw = rect.width();
+		x = TeRound((double)p4.x()-(double)fw/2.);
+		y = TeRound((double)p4.y()-8.*printerFactor_);
+		painter_.drawText(x, y, s);
+		if(setRect)
+		{
+			x = TeRound(((double)x + (double)fw) / printerFactor_);
+			graphicScaleRect_.setRight(x);
+		}
+	}
+	else
+	{
+		int nn=0;
+		int fn = (int)fa;
+		while(fn == 0)
+		{
+			fa *= 10.;
+			fn = TeRound(fa);
+			nn++;
+		}
+		sprintf (buf, "%.*f", nn, f);
+		QString s = buf;
+		rect = fm.boundingRect(s);
+		int fw1 = rect.width();
+
+		sprintf (buf, "%.*f", nn, f*2.);
+		s = buf;
+		rect = fm.boundingRect(s);
+		int fw2 = rect.width();
+
+		sprintf (buf, "%.*f", nn, f*3.);
+		s = buf;
+		rect = fm.boundingRect(s);
+		int fw3 = rect.width();
+
+		if((fw1 + fw2)/2 < p3.x()-p2.x() &&
+			(fw2 + fw3)/2 < p3.x()-p2.x())
+		{
+			sprintf (buf, "%.*f", nn, f);
+			QString s = buf;
+			rect = fm.boundingRect(s);
+			fw = rect.width();
+			x = TeRound((double)p2.x()-(double)fw/2.);
+			y = TeRound((double)p2.y()-8.*printerFactor_);
+			painter_.drawText(x, y, s);
+
+			sprintf (buf, "%.*f", nn, f*2.);
+			s = buf;
+			rect = fm.boundingRect(s);
+			fw = rect.width();
+			x = TeRound((double)p3.x()-(double)fw/2.);
+			y = TeRound((double)p3.y()-8.*printerFactor_);
+			painter_.drawText(x, y, s);
+		}
+
+		sprintf (buf, "%.*f", nn, f*3.);
+		s = buf;
+		rect = fm.boundingRect(s);
+		fw = rect.width();
+		x = TeRound((double)p4.x()-(double)fw/2.);
+		y = TeRound((double)p4.y()-8.*printerFactor_);
+		painter_.drawText(x, y, s);
+		x = TeRound((double)x + printerFactor_);
+		graphicScaleRect_.setRight(x);
+	}
+
+	int sw = p4.x() - p1.x();
+	rect = fm.boundingRect(unit.c_str());
+	fw = rect.width();
+	fh = rect.height();
+	int suini = TeRound(((double)(sw - fw)) / 2. + (double)p1.x());
+	y = TeRound((double)p1.y()+(double)fh+2.*printerFactor_);
+	painter_.drawText (suini, y, unit.c_str());
+	if(setRect)
+	{
+		y = TeRound((double)y / printerFactor_);
+		graphicScaleRect_.setBottom(y);
+	}
+}
+
+void TeQtCanvas::setClipRegion(int x, int y, int w, int h)
+{
+	QRegion region(x, y, w, h);
+	if(painter_.device())
+		painter_.setClipRegion(region);
+}
+
+void TeQtCanvas::setClipRegion(QRegion region)
+{
+	if(painter_.device())
+		painter_.setClipRegion(region);
+}
+
+void TeQtCanvas::setClipping(bool enable)
+{
+	if(painter_.device())
+		painter_.setClipping(enable);
+}
+
+void TeQtCanvas::clearRaster()
+{
+	if (backRaster_)
+		delete backRaster_;
+	backRaster_ = 0;
+}
+
+
+void TeQtCanvas::setMode (CursorMode m)
+{
+	cursorMode_ = m;
+	down_ = false;
+}
+
+void TeQtCanvas::clear()
+{
+	int ww, hh;
+	ww = viewport()->width();
+	hh = viewport()->height();
+
+	// Clear the window
+	QPaintDevice* dev = painter_.device();
+	if(dev)
+		painter_.end();
+	painter_.begin(viewport());
+	painter_.eraseRect(0, 0, ww, hh);
+	painter_.end();
+	if(dev)
+		painter_.begin(dev);
+}
+
+void TeQtCanvas::clear(TeBox box)
+{
+	mapCWtoV(box);
+
+	// Clear the window
+	plotOnWindow();
+	painter_.eraseRect((int)box.x1(), (int)box.y1(), (int)box.width(), (int)box.height());
+	plotOnPixmap0();
+}
+
+void TeQtCanvas::clearAll()
+{
+	// Clear the viewport
+	clear();
+
+	// Clear the pixmaps
+	if(pixmap0_)
+		pixmap0_->fill(paletteBackgroundColor());
+	if(pixmap1_)
+		pixmap1_->fill(paletteBackgroundColor());
+	if(pixmap2_)
+		pixmap2_->fill(paletteBackgroundColor());
+
+	if (backRaster_)
+		delete backRaster_;
+	backRaster_ = 0;
+}
+
+void TeQtCanvas::clearAll(TeBox box)
+{
+	// Clear the viewport area corresponding to the given box
+	clear(box);
+
+	// Clear the pixmap
+	mapCWtoV(box);
+
+	QPaintDevice* dev = painter_.device();
+	if(dev)
+		painter_.end();
+
+	if(pixmap0_)
+	{
+		painter_.begin(pixmap0_);
+		painter_.fillRect((int)box.x1(), (int)box.y1(), (int)box.width(), (int)box.height(), backgroundColor());
+		painter_.end();
+	}
+	if(pixmap1_)
+	{
+		painter_.begin(pixmap1_);
+		painter_.fillRect((int)box.x1(), (int)box.y1(), (int)box.width(), (int)box.height(), backgroundColor());
+		painter_.end();
+	}
+	if(pixmap2_)
+	{
+		painter_.begin(pixmap2_);
+		painter_.fillRect((int)box.x1(), (int)box.y1(), (int)box.width(), (int)box.height(), backgroundColor());
+		painter_.end();
+	}
+
+	if(dev)
+		painter_.begin(dev);
+}
+
+
+bool TeQtCanvas::setView(int w, int h, QPaintDevice *pd)
+{
+    int dpix, dpiy, ncolors, wmm, hmm, depth, pdepth;
+	int ww = w, hh = h;
+
+	x0_ = y0_ = 0;
+
+	if (pd == 0)
+	{
+		if (ww == 0)
+			ww = viewport()->width();
+		if (hh == 0)
+			hh = viewport()->height();
+		resizeContents (ww,hh);
+
+		QPaintDevice* dev = painter_.device();
+		if(dev)
+			painter_.end();
+
+		// Build new pixmaps if window has been resized
+		if ((pixmap0_ == 0 || width_ != ww || height_ != hh) ||
+			(pixmap0_ && (pixmap0_->width() != ww || pixmap0_->height() != hh)))
+		{
+			if (pixmap0_)
+				delete pixmap0_;
+			if(numberOfPixmaps_ > 0)
+				pixmap0_ = new QPixmap (ww,hh);
+			else
+				pixmap0_ = new QPixmap (0,0);
+
+			if (pixmap1_)
+				delete pixmap1_;
+			if(numberOfPixmaps_ > 1)
+				pixmap1_ = new QPixmap (ww,hh);
+			else
+				pixmap1_ = new QPixmap (0,0);
+
+			if (pixmap2_)
+				delete pixmap2_;
+			if(numberOfPixmaps_ > 2)
+				pixmap2_ = new QPixmap (ww,hh);
+			else
+				pixmap2_ = new QPixmap (0,0);
+
+			pdepth = pixmap0_->depth ();
+		}
+		painter_.begin(pixmap0_);
+		printerFactor_ = 1.;
+	}
+	else
+	{
+		QPaintDeviceMetrics pdm(pd);
+		if (ww == 0)
+			ww = pdm.width();
+		if (hh == 0)
+			hh = pdm.height ();
+
+		int pw = pixmap0_->rect().width();
+		int ph = pixmap0_->rect().height();
+		if((double)ww/(double)pw < (double)hh/(double)ph)
+			hh = (int)((double)ph * (double)ww/(double)pw);
+		else
+			ww = (int)((double)pw * (double)hh/(double)ph);
+
+		dpix = pdm.logicalDpiX();
+		dpiy = pdm.logicalDpiY();
+		ncolors = pdm.numColors();
+		wmm = pdm.widthMM ();
+		hmm = pdm.heightMM ();
+		depth = pdm.depth ();
+		QPaintDevice* dev = painter_.device();
+		if(dev)
+			painter_.end();
+
+		if (pixmap0_)
+			delete pixmap0_;
+		if(numberOfPixmaps_ > 0)
+			pixmap0_ = new QPixmap (ww,hh);
+		else
+			pixmap0_ = new QPixmap (0,0);
+
+		// plot is made on pixmap0 because printer don�t have transparency
+		painter_.begin(pixmap0_);
+		painter_.setClipRect( x0_, y0_, ww, hh );
+
+		printerFactor_ = (double)ww / (double)widthRef2PrinterFactor_;
+
+		if (pixmap1_)
+			delete pixmap1_;
+		pixmap1_ = new QPixmap (0,0);
+
+		if (pixmap2_)
+			delete pixmap2_;
+		pixmap2_ = new QPixmap (0,0);
+	}
+
+	if(numberOfPixmaps_ > 0 && (pixmap0_->width() == 0 || pixmap0_->height() == 0))
+		return false;
+	else if(numberOfPixmaps_ > 1 && (pixmap1_->width() == 0 || pixmap1_->height() == 0))
+		return false;
+	else if(numberOfPixmaps_ > 2 && (pixmap2_->width() == 0 || pixmap2_->height() == 0))
+		return false;
+
+	width_ = ww;
+	height_ = hh;
+	params_.ncols_ = width_;
+	params_.nlines_ = height_;
+
+	down_ = false;
+	xul_ = xmin_;
+	yul_ = ymax_;
+	xlr_ = xmax_;
+	ylr_ = ymin_;
+
+	if (pd == 0)
+		clearAll();
+	return true;
+}
+
+void TeQtCanvas::correctScrolling (QPoint &p)
+{
+	if(painter_.device() == viewport())
+	{
+		QPoint o (contentsX (), contentsY ());
+		p -= o;
+	}
+}
+
+void TeQtCanvas::initCursorArea(QPoint p)
+{
+	if (!pixmap0_)
+		return;
+
+	down_ = true;
+	TeCoord2D pw = mapVtoCW(p);
+	xul_ = pw.x();
+	yul_ = pw.y();
+	ixul_ = ixlr_ = p.x();
+	iyul_ = iylr_ = p.y();
+}
+
+void TeQtCanvas::contentsMousePressEvent( QMouseEvent* e)
+{
+	if (!pixmap0_)
+		return;
+
+	QPoint m = e->pos();
+	TeCoord2D p = mapVtoCW(m);
+
+	if(e->button() == LeftButton)
+	{
+		if (cursorMode_ == Area || cursorMode_ == Edit)
+		{
+			plotOnWindow();
+			down_ = true;
+			xul_ = p.x();
+			yul_ = p.y();
+			ixul_ = ixlr_ = e->pos().x();
+			iyul_ = iylr_ = e->pos().y();
+			plotOnPixmap0();
+			emit mouseMoved (p, e->state(), m);
+		}
+		else
+			emit mousePressed (p, e->state(), m);
+	}
+	else if(e->button() == RightButton)
+		emit mouseRightButtonPressed (p, e->state(), m);
+}
+
+void TeQtCanvas::contentsMouseMoveEvent ( QMouseEvent* e)
+{
+	if (!pixmap0_)
+		return;
+	plotOnWindow();
+	QPoint m = e->pos();
+	TeCoord2D p = mapVtoCW(m);
+	if (down_)
+	{
+		QPoint o = offset();
+		painter_.setPen (green);
+		painter_.setRasterOp (Qt::XorROP);
+		painter_.drawLine(ixul_-o.x(),iyul_-o.y(),ixlr_-o.x()-1,iyul_-o.y());            
+		painter_.drawLine(ixlr_-o.x(),iyul_-o.y(),ixlr_-o.x(),iylr_-o.y() -1);            
+		painter_.drawLine(ixlr_-o.x(),iylr_-o.y(),ixul_-o.x()-1,iylr_-o.y() );            
+		painter_.drawLine(ixul_-o.x(),iylr_-o.y(),ixul_-o.x(),iyul_-o.y()-1 );            
+		ixlr_ = e->pos().x();
+		iylr_ = e->pos().y();
+		painter_.drawLine(ixul_-o.x(),iyul_-o.y(),ixlr_-o.x()-1,iyul_-o.y());            
+		painter_.drawLine(ixlr_-o.x(),iyul_-o.y(),ixlr_-o.x(),iylr_ -o.y()-1);            
+		painter_.drawLine(ixlr_-o.x(),iylr_-o.y(),ixul_-o.x()-1,iylr_-o.y() );            
+		painter_.drawLine(ixul_-o.x(),iylr_-o.y(),ixul_-o.x(),iyul_-o.y()-1 );            
+		painter_.setRasterOp (Qt::CopyROP);
+	}
+	plotOnPixmap0();
+	emit mouseMoved (p, e->state(), m);
+}
+
+void TeQtCanvas::contentsMouseReleaseEvent( QMouseEvent* e)
+{
+	if (!pixmap0_)
+		return;
+	QPoint m = e->pos();
+	TeCoord2D p = mapVtoCW(m);
+	if (down_)
+	{
+		ixlr_ = e->pos().x();
+		iylr_ = e->pos().y();
+		xlr_ = p.x();
+		ylr_ = p.y();
+		if(xul_ > xlr_)
+		{
+			double a = xlr_;
+			xlr_ = xul_;
+			xul_ = a;
+		}
+		if(ylr_ > yul_)
+		{
+			double a = ylr_;
+			ylr_ = yul_;
+			yul_ = a;
+		}
+		down_ = false;
+
+		emit zoomArea();
+	}
+	emit mouseReleased (p, e->state(), m);
+}
+
+void TeQtCanvas::contentsMouseDoubleClickEvent ( QMouseEvent* e)
+{
+	if (!pixmap0_)
+		return;
+
+	QPoint m = e->pos();
+	TeCoord2D p = mapVtoCW(m);
+
+	if(e->button() == LeftButton)
+		emit mouseDoublePressed (p, e->state(), m);
+}
+
+
+void TeQtCanvas::contentsContextMenuEvent( QContextMenuEvent* e)
+{
+	QMouseEvent *m = (QMouseEvent *)e;
+	emit popupCanvasSignal(m);
+}
+
+
+void TeQtCanvas::leaveEvent ( QEvent * )
+{
+	emit mouseLeave();
+}
+
+void TeQtCanvas::keyPressEvent (QKeyEvent* e)
+{
+	emit keyPressed(e);
+}
+
+void TeQtCanvas::keyReleaseEvent (QKeyEvent* e)
+{
+	emit keyReleased(e);
+}
+
+void TeQtCanvas::viewportPaintEvent (QPaintEvent*)
+{
+	copyPixmapToWindow ();
+	emit paintEvent ();
+}
+
+void TeQtCanvas::resizeEvent ( QResizeEvent * e)
+{
+	QScrollView::resizeEvent(e);
+}
+
+void TeQtCanvas::copyPixmapToWindow()
+{
+	if (pixmap0_)
+	{
+		int cx = contentsX();
+		int cy = contentsY();
+		bitBlt (viewport(),0,0,pixmap0_,cx,cy,viewport()->rect().width(),viewport()->rect().height(),CopyROP,true);
+	}
+}
+
+int TeQtCanvas::mapDWtoV(double a)
+{
+	TeBox dbox = getDataWorld();
+	double dwidth = dbox.width();
+	int	pwidth = viewport()->width();
+
+	int d = (int)((double)pwidth * a / (double)dwidth);
+	return d;
+}
+
+
diff --git a/src/terralib/drivers/qt/TeQtCanvas.h b/src/terralib/drivers/qt/TeQtCanvas.h
new file mode 100755
index 0000000..0d56a9b
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtCanvas.h
@@ -0,0 +1,415 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#ifndef  __QTCANVAS_H
+#define  __QTCANVAS_H
+
+#include <TeDatabase.h>
+#include <TeRaster.h>
+
+#include <qpainter.h>
+#include <qbrush.h> 
+#include <qpixmap.h>
+#include <qimage.h>
+#include <qbitmap.h>
+#include <qprinter.h>
+#include <qscrollview.h>   
+#include <qpopupmenu.h>
+
+class TeQtProgress;
+
+#include <string>
+using namespace std;
+
+
+class TeQtCanvas : public QScrollView
+{
+   Q_OBJECT
+
+public:
+    enum CursorMode { Pointer, Area, Pan, Hand, SizeVer, SizeBDiag,
+		 UpArrow, Edit, Distance, Information, ZoomIn, ZoomOut };
+
+	// Constructor
+	TeQtCanvas(QWidget *parent=0, const char *name=0);
+
+	// Destructor
+	~TeQtCanvas();
+
+	// Set the initial position for the area cursor
+	void initCursorArea (QPoint p);
+
+	// Set the cursor type
+	void setMode (CursorMode);
+
+	// Get the cursor type
+	CursorMode getCursorMode() { return cursorMode_;}
+
+	// Get the cursor box in world coordinates
+	TeBox getCursorBox (){ return TeBox (xul_,ylr_,xlr_,yul_); }
+
+	// Copy the pixmap contents to the viewport
+	void copyPixmapToWindow();
+
+	// Set the dimensions of the paint device, according the box 
+	// given in world coordinates
+	bool setWorld(TeBox b, int w = 0, int h = 0, QPaintDevice *pd = 0);
+
+	// Set the dimensions of the paint device, creating or recreating the
+	// pixmaps accordingly
+	virtual bool setView(int w = 0, int h = 0, QPaintDevice* pd = 0);
+
+	// Adjust the box in world coordinates if the extend flag is true or set
+	// the canvas dimensions if the extend flag is false
+	void setTransformation(double xmin, double xmax, double ymin, double ymax, bool extend = true);
+
+	// Get the canvas box in world coordinates
+	TeBox getWorld() {return wc_ ;}
+
+	// Get the data box in world coordinates
+	TeBox getDataWorld();
+
+	// Clear the canvas viewport
+	void clear();
+
+	// Clear the viewport area corresponding to the given box 
+	void clear(TeBox box);
+
+	// Clear the viewport and all the pixmaps
+	void clearAll();
+
+	// Clear the area of the viewport and the area of all of the
+	// pixmaps corresponding to the given box 
+	void clearAll(TeBox box);
+
+	// Get the position of the viewport relative to the total canvas area
+	QPoint offset() {return QPoint(contentsX(), contentsY());}
+
+	// Map the given point in data world coordinates to 
+	// the corresponding point in the viewport
+	QPoint mapDWtoV(const TeCoord2D& dw);
+
+	// Map the given box in data world coordinates to 
+	// the corresponding box in the viewport
+	void mapDWtoV(TeBox& box);
+
+	// Map the points of a line in data world coordinates to
+	// the corresponding points in the viewport
+	QPointArray mapDWtoV(const TeLine2D&);
+
+	// Map the value in data world coordinates to 
+	// the corresponding value in the viewport
+	int mapDWtoV(double);
+
+	// Map the value in pixels in the viewport to 
+	// the corresponding value in the canvas world
+	double mapVtoCW(int);
+
+	// Map the point in the viewport to the 
+	// corresponding point in the canvas world
+	TeCoord2D mapVtoCW(const QPoint&);
+
+	// Map the box in the viewport to the 
+	// corresponding box in the canvas world
+	void mapVtoCW(TeBox& box);
+
+	// Map the value in pixels in the viewport to 
+	// the corresponding value in the data world
+	double mapVtoDW(int);
+
+	// Map the point in the viewport to the 
+	// corresponding point in the data world
+	TeCoord2D mapVtoDW(const QPoint&);
+
+	// Map the box in the canvas world coordinates to 
+	// the corresponding box in the data world coordinates
+	void mapCWtoDW(TeBox& box);
+
+	// Map the box in the data world coordinates to 
+	// the corresponding box in the canvas world coordinates
+	void mapDWtoCW(TeBox& box);
+
+	// Map the box in the canvas world coordinates to 
+	// the corresponding box in the viewport
+	void mapCWtoV(TeBox& box);
+
+	// Map the point in the canvas world coordinates to 
+	// the corresponding point in the viewport
+	QPoint mapCWtoV(const TeCoord2D& c);
+	 
+// Pixel size in world coordinates
+	double pixelSize () { return (xmax_-xmin_)/(double)width_; }
+
+// Set the projection of the next incoming data
+	void  setDataProjection ( TeProjection* proj );
+
+// Set the projection
+	void  setProjection ( TeProjection* proj);
+
+// Retrieve the canvas projection
+	TeProjection* projection() { return canvasProjection_; }
+
+// Retrieve flag that compare canvas projection and data projection
+	bool canvasAndDataProjectionEqual() {return canvasAndDataProjectionEqual_;};
+
+// Plotting primitives
+
+	QPainter* getPainter () {return &painter_;}
+	void plotOnWindow ();
+	void plotOnPixmap0 ();
+	void plotOnPixmap1 ();
+	virtual void copyPixmapToWindow(QPixmap*, int, int, int, int);
+	virtual void copyPixmap0ToPrinter();
+	virtual void copyPixmap0To(QPaintDevice*);
+	virtual void copyPixmap0ToWindow();
+	virtual void copyPixmap1ToWindow();
+	virtual void copyPixmap0ToWindow(int, int, int, int);
+	virtual void copyPixmap0ToPixmap1();
+	virtual void copyPixmap0ToPixmap1(int, int, int, int);
+	virtual void copyPixmap1ToPixmap0();
+	virtual void copyPixmap1ToPixmap0(int, int, int, int);
+	virtual void copyPixmap1ToPixmap2();
+	virtual void copyPixmap1ToPixmap2(int, int, int, int);
+	virtual void copyPixmap2ToPixmap1();
+	virtual void copyPixmap2ToPixmap1(int, int, int, int);
+	virtual void copyPanArea(int, int);
+
+	void plotPoint (TeCoord2D &p);
+	void plotPoint (TePoint &p){ plotPoint(p.location()); }
+
+	void setPointColor (int r, int g, int b);
+	void setPointStyle (int s, int w = 3);
+	void setPointPixmap (char* p);
+
+	void plotCell (TeCell &s, const bool& restoreBackground = false);
+
+	QRect getLegendRect (QPoint p, const QPixmap* pix, string tx);
+	void plotLegend (QPoint p, const QPixmap* pix, string tx);
+
+	void plotPolygon (const TePolygon &p, const bool& restoreBackground = false);
+	void setPolygonColor (int r, int g, int b);
+	void setPolygonStyle (int s, int width = 1);
+	void setPolygonLineColor (int r, int g, int b);
+	void setPolygonLineStyle (int s, int width = 1);
+
+	void plotLine (TeLine2D &l);
+	void setLineColor (int r, int g, int b);
+	void setLineStyle (int s, int w = 1);
+
+	void plotNode (TeNode &n);
+	void setNodeColor (int r, int g, int b);
+	void setNodeStyle (int s, int w = 4);
+	void setNodePixmap (char* p);
+
+	void plotArc (TeArc &a);
+	void setArcColor (int r, int g, int b);
+	void setArcStyle ( int s, int w = 1 );
+
+	void plotPie (double x, double y, double w, double h, double a, double alen);
+	void setPieColor (int r, int g, int b);
+	void plotRect (double x, double y, double w, double h, int transp=0, bool legend=false);
+	void plotRect (QRect&);
+	void setRectColor (int r, int g, int b);
+
+	void plotText (TeCoord2D &p, string &str, double angle = 0., double alignh = 0., double alignv = 0.);
+	void plotText (TeText &tx, TeVisual& visual);
+	QRect textRect (TeText &tx, TeVisual visual);
+	void plotTextRects (TeText &tx, TeVisual visual);
+	void setTextColor (int r, int g, int b);
+	void setTextSize (int size);
+	void setTextStyle (string& family, int size, bool bold, bool italic);
+	void textExtent ( string &str, int &w, int &h, double angle = 0.);
+	void plotXorPolyline (QPointArray& PA, bool cdev=true);
+	void plotXorTextDistance(vector<QPointArray> xorPointArrayVec, double unitConv, string unit);
+
+	void setDB (TeDatabase* db) { db_ = db; }
+	void plotRaster (TeRaster* raster, TeRasterTransform* transf, TeQtProgress *progress);
+	void clearRaster();
+	void endPrinting();
+
+	QPixmap* getPixmap0 () {return pixmap0_; }
+	QPixmap* getPixmap1 () {return pixmap1_; }
+	QPixmap* getPixmap2 () {return pixmap2_; }
+
+	void plotGraphicScale(TeVisual& visual, double offsetX, double offsetY, double unitConv=1, const string& dunit="");
+
+	void setClipRegion(int x, int y, int w, int h);
+	void setClipRegion(QRegion region);
+	void setClipping (bool enable);
+
+	TeRasterParams& getParams()
+	{	return params_; }
+
+	double scaleApx() {return scaleApx_;}
+	void scaleApx(double);
+
+	double printerFactor() {return printerFactor_;}
+	void widthRef2PrinterFactor(int w) {widthRef2PrinterFactor_ = w;}
+	void plotLegend (const QPoint& p, TeLegendEntry* leg, const string& tx);
+	void plotLegend (const QPoint& p, const TeColor& cor, const string& tx);
+	bool locateGraphicScale(const QPoint& p);
+	QRect& graphicScaleRect() { return graphicScaleRect_;}
+	void numberOfPixmaps(int n) {numberOfPixmaps_ = n;}
+	int numberOfPixmaps() {return numberOfPixmaps_;}
+	QPopupMenu* popupCanvas() { return popupCanvas_; }
+
+
+signals:
+	void mousePressed (TeCoord2D&, int, QPoint&);
+	void mouseDoublePressed (TeCoord2D&, int, QPoint&);
+	void mouseRightButtonPressed (TeCoord2D&, int, QPoint&);
+	void mouseMoved (TeCoord2D&, int, QPoint&);
+	void mouseReleased (TeCoord2D&, int, QPoint&);
+	void mouseLeave ();
+	void paintEvent ();
+	void popupCanvasSignal(QMouseEvent*);
+	void keyPressed(QKeyEvent*);
+	void keyReleased(QKeyEvent*);
+	void zoomArea();
+
+protected:
+
+	TeDatabase*	db_;
+
+	QPainter	painter_;
+	QImage		qimage_;
+	QPopupMenu* popupCanvas_;
+	QPixmap*	pixmap0_;
+	QPixmap*	pixmap1_;
+	QPixmap*	pixmap2_;
+	int			numberOfPixmaps_;
+
+	TeProjection*	canvasProjection_;
+	TeProjection*	dataProjection_;
+
+	TeRaster*		backRaster_;
+	TeRasterParams	params_;
+
+	double	printerFactor_;
+	int		widthRef2PrinterFactor_;
+	QRect	graphicScaleRect_;
+	bool	canvasAndDataProjectionEqual_;
+	
+	// Sizes and transformations
+	TeBox	wc_;
+	double 	xmin_;
+	double 	xmax_;
+	double 	ymin_;
+	double 	ymax_;	
+	int		x0_;
+	int		y0_;
+	int		width_;
+	int		height_;
+	double	f_;
+	double	scaleApx_;
+	int		scale_;
+	int		lx1_;
+	int		ly1_;
+	int		lx2_;
+	int		ly2_;
+
+// Area Cursor section
+	CursorMode cursorMode_;
+	bool	down_;
+	double 	xul_; // cursor world coordinates
+	double 	xlr_;
+	double 	yul_;
+	double 	ylr_;
+	int 	ixul_; // cursor screen coordinates
+	int 	ixlr_;
+	int 	iyul_;
+	int 	iylr_;
+
+// Pie
+	QBrush		pieBrush_;
+	QColor		pieColor_;
+	QBrush		rectBrush_;
+	QColor		rectColor_;
+	
+// Polygon
+	int			polygonTransparency_;
+	QBrush		polygonBrush_;
+	QPen		polygonPen_;
+	QColor		polygonColor_;
+	map<TePolyBasicType, Qt::BrushStyle> brushStyleMap_;
+	
+// Line
+	QPen		linePen_;
+	QColor		lineColor_;
+	map<TeLnBasicType, Qt::PenStyle> penStyleMap_;
+	
+// Point
+	int			pointStyle_;
+	int			pointSize_;
+	QPen		pointPen_;
+	QColor		pointColor_;
+	QPixmap*	pointPixmap_;
+
+// Arc
+	QPen		arcPen_;
+	QColor		arcColor_;
+	
+// Node
+	int			nodeStyle_;
+	int			nodeSize_;
+	QPen		nodePen_;
+	QColor		nodeColor_;
+	QPixmap*	nodePixmap_;
+
+// Text
+	QPen		textPen_;
+	QColor		textColor_;
+	QFont		textFont_;
+	int			textSize_;
+
+// Draw Representations
+	void drawPolygonRep (QPoint p, int w, int h, TeVisual& v);
+	void drawLineRep (QPoint p, TeVisual& v);
+	void drawPointRep (QPoint p, TeVisual& v);
+	void plotMark(QPoint &p, int s, int w);
+
+// Mouse events
+	void contentsMousePressEvent( QMouseEvent* );
+	void contentsMouseMoveEvent ( QMouseEvent* );
+	void contentsMouseReleaseEvent ( QMouseEvent* );
+	void contentsMouseDoubleClickEvent ( QMouseEvent* );
+	void contentsContextMenuEvent( QContextMenuEvent* );
+
+// Leave Event
+	void leaveEvent(QEvent*);
+
+// Key events
+	void keyPressEvent(QKeyEvent*);
+	void keyReleaseEvent(QKeyEvent*);
+
+// Other events
+	void viewportPaintEvent(QPaintEvent* e);
+	void resizeEvent(QResizeEvent*);
+
+// Correct scrolling when there are scrollbars
+	void correctScrolling(QPoint &p);
+
+// Build Raster
+	bool buildRaster();
+};
+
+#endif
+
diff --git a/src/terralib/drivers/qt/TeQtChartItem.cpp b/src/terralib/drivers/qt/TeQtChartItem.cpp
new file mode 100755
index 0000000..2ffdd14
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtChartItem.cpp
@@ -0,0 +1,87 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#include <qpixmap.h>
+#include <qpainter.h>
+#include <TeQtChartItem.h>
+#include <TeQtViewsListView.h>
+
+
+//Chart item constructor
+TeQtChartItem::TeQtChartItem(QListViewItem *parent,
+				QString text, TeColor color)
+	: TeQtCheckListItem(parent, text), color_(color)
+{
+	type_ = CHART;
+	name_ = text.latin1();
+	setRenameEnabled(0,true);
+	setSelected(false);
+	setEnabled(true);
+
+	order_ = parent->childCount();
+
+	//create pixmap
+	int	w = 21;
+	int	h = 16;
+
+	QPixmap pixmap(w, h);
+	pixmap.resize(w, h);
+	pixmap.fill();
+
+	QPainter p(&pixmap);
+	QBrush	 brush;
+	QColor	 qColor;
+
+	qColor.setRgb(color_.red_, color_.green_, color_.blue_);
+	brush.setColor(qColor);
+	brush.setStyle((Qt::BrushStyle)SolidPattern);
+
+	p.fillRect (1, 1, w-2, h-2, brush);
+	p.end();
+
+	setPixmap(0, pixmap);
+}
+
+void TeQtChartItem::changeColor(TeColor color)
+{
+	color_ = color;
+
+	int	w = 21;
+	int	h = 16;
+
+	QPixmap pixmap(w, h);
+	pixmap.resize(w, h);
+	pixmap.fill();
+
+	QPainter p(&pixmap);
+	QBrush	 brush;
+	QColor	 qColor;
+
+	qColor.setRgb(color_.red_, color_.green_, color_.blue_);
+	brush.setColor(qColor);
+	brush.setStyle((Qt::BrushStyle)SolidPattern);
+
+	p.fillRect (1, 1, w-2, h-2, brush);
+	p.end();
+
+	setPixmap(0, pixmap);
+	repaint();
+}
diff --git a/src/terralib/drivers/qt/TeQtChartItem.h b/src/terralib/drivers/qt/TeQtChartItem.h
new file mode 100755
index 0000000..db3f876
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtChartItem.h
@@ -0,0 +1,63 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#ifndef  __TERRALIB_INTERNAL_QTCHARTITEM_H
+#define  __TERRALIB_INTERNAL_QTCHARTITEM_H
+
+#include "TeQtCheckListItem.h"
+#include "TeVisual.h"
+
+
+class TeQtChartItem : public TeQtCheckListItem
+{
+public:
+    TeQtChartItem(QListViewItem *parent, QString text, TeColor color);
+
+	~TeQtChartItem () {}
+
+	TeColor color()
+		{ return color_; }
+
+	void changeColor(TeColor color);
+
+	string name() {return name_;}
+
+protected:
+	TeColor color_;
+	string name_;
+};
+
+
+class TeQtChartTitleItem : public TeQtCheckListItem
+{
+public:
+    TeQtChartTitleItem(QListViewItem *parent, QString text)
+	: TeQtCheckListItem(parent, text)
+	{
+		type_ = CHARTTITLE;
+		order_ = parent->childCount();
+	}
+
+	~TeQtChartTitleItem() {}
+};
+
+
+#endif
diff --git a/src/terralib/drivers/qt/TeQtCheckListItem.cpp b/src/terralib/drivers/qt/TeQtCheckListItem.cpp
new file mode 100755
index 0000000..32bc231
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtCheckListItem.cpp
@@ -0,0 +1,97 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#include <TeQtCheckListItem.h>
+#include <TeUtils.h>
+#include <vector>
+#include <cstdlib>
+
+
+int TeQtCheckListItem::compare (QListViewItem *i, int col, bool ascending) const
+{
+	int order1 = atoi(key(col, ascending).latin1());
+	int order2 = atoi(i->key(col, ascending).latin1());
+
+	if (order1 < order2)
+		return -1;
+	else if (order1 == order2)
+		return 0;
+	else 
+		return 1;
+}
+
+
+QString TeQtCheckListItem::key ( int /* col */, bool /* ascending */ ) const
+{
+	return Te2String(order_).c_str();
+}
+
+
+vector<QListViewItem*> TeQtCheckListItem::getChildren()
+{
+	vector<QListViewItem*> childrenVector;
+
+	QListViewItem *child = firstChild();
+    while (child)
+	{
+		childrenVector.push_back(child);
+        child = child->nextSibling();
+	}
+	return childrenVector;
+}
+
+
+void TeQtCheckListItem::unselectChildren()
+{
+	TeQtCheckListItem *item;
+	int n = childCount();
+	int i = 0;
+
+	if (n == 0)
+		return;
+
+	QListViewItemIterator it(this);
+	++it;
+	item = (TeQtCheckListItem*)(it.current());
+	while(item)
+	{
+		if (item->parent() == this)
+		{
+			item->setSelected(false);
+			item->repaint();
+			++i;
+		}
+		if (i == n)
+			break;
+		++it;
+		item = (TeQtCheckListItem*)(it.current());
+	}
+}
+
+
+bool TeQtCheckListItem::isChild(QListViewItem *item)
+{
+	if (item->parent() == this)
+		return true;
+	else
+		return false;
+}
+
diff --git a/src/terralib/drivers/qt/TeQtCheckListItem.h b/src/terralib/drivers/qt/TeQtCheckListItem.h
new file mode 100755
index 0000000..f2be92a
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtCheckListItem.h
@@ -0,0 +1,80 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#ifndef  __TERRALIB_INTERNAL_QTCHECKLISTITEM_H
+#define  __TERRALIB_INTERNAL_QTCHECKLISTITEM_H
+
+#include <qlistview.h>
+#include <vector>
+#include <qpainter.h>
+#include <qpalette.h>
+
+using namespace std;
+
+
+class TeQtCheckListItem : public QCheckListItem
+{
+
+public:
+	enum ItemType {DATABASE, INFOLAYER, VIEW, THEME, LEGENDTITLE, LEGEND, CHARTTITLE, CHART};
+
+    TeQtCheckListItem(QListView *parent, QString text, QCheckListItem::Type ctype = QCheckListItem::Controller)
+		: QCheckListItem(parent, text, ctype) {}
+ 
+	TeQtCheckListItem(QListViewItem *parent, QString text, QCheckListItem::Type ctype = QCheckListItem::Controller)
+		: QCheckListItem(parent, text, ctype) {}
+
+	TeQtCheckListItem(QCheckListItem *parent, QString text, QCheckListItem::Type ctype = QCheckListItem::Controller)
+	: QCheckListItem(parent, text, ctype) {}
+	
+	virtual ~TeQtCheckListItem() {}
+
+	ItemType getType() {return type_;}
+	
+	int order()
+		{return order_;}
+
+	void order(int order)
+		{order_ = order;}
+
+	virtual int compare(QListViewItem * i, int col, bool ascending) const;
+
+	virtual QString key(int column, bool ascending) const;
+
+	vector<QListViewItem*> getChildren();
+
+	void unselectChildren();
+
+	bool isChild(QListViewItem *item);
+
+	void cancelRename(int col)
+		{ QListViewItem::cancelRename(col); }
+
+	virtual void paintCell(QPainter* p, const QColorGroup& cg, int column, int width, int align)
+		{ QCheckListItem::paintCell(p, cg, column, width, align); }
+
+
+protected:
+	ItemType type_;
+	int order_;
+};
+
+#endif
diff --git a/src/terralib/drivers/qt/TeQtColorBar.cpp b/src/terralib/drivers/qt/TeQtColorBar.cpp
new file mode 100755
index 0000000..d91d97f
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtColorBar.cpp
@@ -0,0 +1,1100 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+************************************************************************************/
+
+#include <qcolordialog.h>
+#include <TeUtils.h>
+#include <TeColorUtils.h>
+#include <TeQtColorBar.h>
+#include <qcursor.h>
+#include <qpopupmenu.h>
+#include <qpainter.h>
+#include <help.h>
+#include <algorithm>
+
+TeQtColorBar::TeQtColorBar(QWidget* parent, const char* name)
+	:QFrame(parent, name)
+{
+	help_ = 0;
+	vertical_ = true;
+	upDown_ = false;
+	colorEdit_ = 0;
+
+	ftam_ = frameRect().width();
+	if(vertical_)
+		ftam_ = frameRect().height();
+
+	popupMenu_.insertItem(tr("Add Color..."), this, SLOT(addColorSlot()));
+	popupMenu_.insertItem(tr("Change Color..."), this, SLOT(changeColorSlot()));
+	popupMenu_.insertItem(tr("Remove Color"), this, SLOT(removeColorSlot()));
+	popupMenu_.insertItem(tr("Help..."), this, SLOT(helpSlot()));
+}
+
+void TeQtColorBar::setVerticalBar(bool b)
+{
+	vertical_ = b;
+
+	ftam_ = frameRect().width();
+	if(vertical_)
+		ftam_ = frameRect().height();
+}
+
+void TeQtColorBar::setColorBar(const vector<ColorBar>& colorBarVec)
+{
+	inputColorVec_.clear();
+	inputColorVec_ = colorBarVec;
+
+	sort(inputColorVec_.begin(), inputColorVec_.end());
+
+	if((int)inputColorVec_.empty() == false)
+		inputColorVec_[0].distance_ = 0.;
+
+	generateColorMap();
+}
+
+void TeQtColorBar::setColorBar(const vector<TeColor>& colorVec)
+{
+	int	i;
+
+	inputColorVec_.clear();
+	vector<ColorBar> cbVec;
+	ColorBar cb;
+
+	for(i=0; i<(int)colorVec.size(); i++)
+	{
+		cb.color(colorVec[i]);
+		cbVec.push_back(cb);
+	}
+	if(cbVec.size() == 1)
+	{
+		TeColor c = colorVec[0];
+		c.red_ = c.red_ / 5;
+		c.green_ = c.green_ / 5;
+		c.blue_ = c.blue_ / 5;
+
+		cb.color(c);
+		cbVec.push_back(cb);
+	}
+
+	for(i=0; i<(int)cbVec.size(); ++i)
+	{
+		cbVec[i].distance_ = (double)i;
+		inputColorVec_.push_back(cbVec[i]);
+	}
+
+	generateColorMap();
+}
+
+void TeQtColorBar::setColorBarFromNames(string colors)
+{
+	int	i;
+	if(colors.empty())
+		colors = tr("R").latin1();
+
+	vector<string> colorNameVec;
+	QString s = colors.c_str();
+	QStringList ss = QStringList::split("-",s,true);
+
+	for(i = 0; i < (int)ss.size(); i++)
+	{
+		QString a = ss[i];
+		if(tr("R") == a)
+			colorNameVec.push_back("RED");
+		else if(tr("G") == a)
+			colorNameVec.push_back("GREEN");
+		else if(tr("B") == a)
+			colorNameVec.push_back("BLUE");
+		else if(tr("Cy") == a)
+			colorNameVec.push_back("CYAN");
+		else if(tr("Or") == a)
+			colorNameVec.push_back("ORANGE");
+		else if(tr("Mg") == a)
+			colorNameVec.push_back("MAGENTA");
+		else if(tr("Y") == a)
+			colorNameVec.push_back("YELLOW");
+		else
+			colorNameVec.push_back("GRAY");
+	}
+
+	TeColor	RGB;
+	map<string, TeColor> mapcor;
+
+	RGB.name_ = "RED";
+	RGB.red_ = 240;
+	RGB.green_ = 0;
+	RGB.blue_ = 0;
+	mapcor["RED"] = RGB;
+
+	RGB.name_ = "GREEN";
+	RGB.red_ = 0;
+	RGB.green_ = 240;
+	RGB.blue_ = 0;
+	mapcor["GREEN"] = RGB;
+
+	RGB.name_ = "BLUE";
+	RGB.red_ = 0;
+	RGB.green_ = 0;
+	RGB.blue_ = 240;
+	mapcor["BLUE"] = RGB;
+
+	RGB.name_ = "YELLOW";
+	RGB.red_ = 255;
+	RGB.green_ = 255;
+	RGB.blue_ = 100;
+	mapcor["YELLOW"] = RGB;
+
+	RGB.name_ = "CYAN";
+	RGB.red_ = 100;
+	RGB.green_ = 255;
+	RGB.blue_ = 255;
+	mapcor["CYAN"] = RGB;
+
+	RGB.name_ = "MAGENTA";
+	RGB.red_ = 255;
+	RGB.green_ = 100;
+	RGB.blue_ = 255;
+	mapcor["MAGENTA"] = RGB;
+
+	RGB.name_ = "ORANGE";
+	RGB.red_ = 255;
+	RGB.green_ = 140;
+	RGB.blue_ = 0;
+	mapcor["ORANGE"] = RGB;
+
+	RGB.name_ = "GRAY";
+	RGB.red_ = 240;
+	RGB.green_ = 240;
+	RGB.blue_ = 240;
+	mapcor["GRAY"] = RGB;
+
+	RGB.name_ = "BLACK";
+	RGB.red_ = 0;
+	RGB.green_ = 0;
+	RGB.blue_ = 0;
+	mapcor["BLACK"] = RGB;
+
+	vector<ColorBar> cbVec;
+	for(i=0; i<(int)colorNameVec.size(); ++i)
+	{
+		ColorBar cb;
+		cb.color(mapcor[colorNameVec[i]]);
+		cbVec.push_back(cb);
+	}
+	if(inputColorVec_.size() == 1)
+	{
+		ColorBar cb;
+		TeColor c = inputColorVec_[0].cor_;
+
+		c.red_ = c.red_ / 5;
+		c.green_ = c.green_ / 5;
+		c.blue_ = c.blue_ / 5;
+
+		cb.color(c);
+		cbVec.push_back(cb);
+	}
+
+	inputColorVec_.clear();
+	for(i=0; i<(int)cbVec.size(); ++i)
+	{
+		cbVec[i].distance_ = (double)i;
+		inputColorVec_.push_back(cbVec[i]);
+	}
+
+	generateColorMap();
+}
+
+void TeQtColorBar::generateColorMap()
+{
+	sortByDistance();
+	generateColorBarMap(inputColorVec_, ftam_, colorMap_);
+	totalDistance_ = 1.;
+	if(inputColorVec_.empty() == false)
+		totalDistance_ = inputColorVec_[inputColorVec_.size()-1].distance_;
+}
+
+void TeQtColorBar::drawColorBar()
+{
+	if(colorMap_.empty())
+		return;
+
+	int	i, j = 0, size, tsize;
+	QColor cor;
+	map<int, vector<TeColor> > :: iterator it = colorMap_.begin();
+	QRect rect = frameRect();
+	int w = rect.width();
+	int	h = rect.height();
+	changeVec_.clear();
+	changeVec_.push_back(0);
+	QPainter painter(this);
+
+	tsize = w;
+	if(vertical_)
+		tsize = h;
+
+	while(it != colorMap_.end())
+	{
+		vector<TeColor>& colorVec = it->second;
+		size = (int)colorVec.size();
+
+		i = 0;
+		while(i < size)
+		{
+			cor.setRgb(colorVec[i].red_, colorVec[i].green_, colorVec[i].blue_);
+			painter.setPen(cor);
+			if(vertical_)
+			{
+				if(upDown_)
+				{
+					painter.lineTo(0, j);
+					painter.moveTo(w-7, j);
+				}
+				else
+				{
+					painter.lineTo(0, h-j);
+					painter.moveTo(w-7, h-j);
+				}
+			}
+			else
+			{
+				painter.lineTo(j, 7);
+				painter.moveTo(j, h);
+			}
+			i++;
+			j++;
+		}
+		it++;
+		if(it == colorMap_.end())
+		{
+			while(j < tsize)
+			{
+				if(vertical_)
+				{
+					if(upDown_)
+					{
+						painter.lineTo(0, j);
+						painter.moveTo(w-7, j);
+					}
+					else
+					{
+						painter.lineTo(0, h-j);
+						painter.moveTo(w-7, h-j);
+					}
+				}
+				else
+				{
+					painter.lineTo(j, 7);
+					painter.moveTo(j, h);
+				}
+				j++;
+			}
+		}
+		if(j-1 < 0)
+			changeVec_.push_back(0);
+		else if(j >= tsize)
+			changeVec_.push_back(tsize-1);
+		else
+			changeVec_.push_back(j);
+	}
+
+	painter.setPen(QColor(black));
+	painter.setBrush(QColor(white));
+
+	QRect ru(0, 0, w, 7);
+	if(vertical_)
+		ru.setRect(w-7, 0, 7, h);
+	painter.drawRect(ru);
+
+	QPointArray pa(4);
+	if(vertical_)
+	{
+		pa.setPoint(0, 0, 0);
+		pa.setPoint(1, 6, -3);
+		pa.setPoint(2, 6, 3);
+		pa.setPoint(3, 0, 0);
+		painter.drawPolygon(pa);
+		pa.translate(0, h-1);
+		painter.drawPolygon(pa);
+		pa.translate(0, -(h-1));
+		if(!upDown_)
+			pa.translate(0, h);
+
+	}
+	else
+	{
+		pa.setPoint(0, -3, 0);
+		pa.setPoint(1, 3, 0);
+		pa.setPoint(2, 0, 6);
+		pa.setPoint(3, -3, 0);
+		painter.drawPolygon(pa);
+		pa.translate(w-1, 0);
+		painter.drawPolygon(pa);
+		pa.translate(-(w-1), 0);
+	}
+
+	it = colorMap_.begin();
+	while(it != colorMap_.end())
+	{
+		j = it->second.size();
+		it++;
+		if(it != colorMap_.end())
+		{
+			if(vertical_)
+			{
+				if(upDown_)
+					pa.translate(0, j);
+				else
+					pa.translate(0, -j);
+			}
+			else
+				pa.translate(j, 0);
+			painter.drawPolygon(pa);
+		}
+	}
+
+	painter.setBrush(Qt::NoBrush);
+	painter.setPen(QColor(black));
+
+	double pd = (double)tsize / 10.;
+	int	t;
+	for(i=0; i<10; ++i)
+	{
+		t = 5;
+		if(i%2)
+			t = 3;
+
+		int a = TeRound((double)i * pd);
+		if(vertical_)
+		{
+			painter.moveTo(0, a);
+			painter.lineTo(t, a);
+		}
+		else
+		{
+			painter.moveTo(a, h);
+			painter.lineTo(a, h-t);
+		}
+	}
+
+	painter.drawRect(rect);
+}
+
+void TeQtColorBar::paintEvent(QPaintEvent*)
+{
+	drawColorBar();
+}
+
+void TeQtColorBar::mousePressEvent(QMouseEvent* e)
+{
+	if(colorMap_.empty())
+		return;
+	p_ = e->pos();
+	ind_ = getColorIndiceToChange();
+
+	if(e->button() == Qt::RightButton)
+	{
+		if(change_)
+		{
+			popupMenu_.setItemEnabled(popupMenu_.idAt(0), false); // add color
+			popupMenu_.setItemEnabled(popupMenu_.idAt(1), true); // change color
+			if(colorMap_.size() <= 1)
+				popupMenu_.setItemEnabled(popupMenu_.idAt(2), false); // remove color
+			else
+				popupMenu_.setItemEnabled(popupMenu_.idAt(2), true); // remove color
+		}
+		else
+		{
+			popupMenu_.setItemEnabled(popupMenu_.idAt(0), true); // add color
+			popupMenu_.setItemEnabled(popupMenu_.idAt(1), false); // change color
+			popupMenu_.setItemEnabled(popupMenu_.idAt(2), false); // remove color
+		}
+	
+		setCursor(QCursor(Qt::ArrowCursor));
+		QPoint	mp(e->globalPos().x(), e->globalPos().y());
+		popupMenu_.exec(mp);
+	}
+}
+
+void TeQtColorBar::mouseDoubleClickEvent(QMouseEvent* e)
+{
+	ind_ = getColorIndiceToChange();
+
+	if(change_)
+	{
+		if(vertical_)
+		{
+			if(e->pos().x() >= frameRect().width()-7)
+				changeColorSlot();
+			else
+				removeColorSlot();			
+		}
+		else
+		{
+			if(e->pos().y() <= 7)
+				changeColorSlot();
+			else
+				removeColorSlot();
+		}
+	}
+	else
+		addColorSlot();
+}
+
+void TeQtColorBar::mouseMoveEvent(QMouseEvent* e)
+{
+	if(colorMap_.empty())
+		return;
+	pa_ = e->pos();
+	if(e->state() == Qt::NoButton) // set cursor
+	{
+		ind_ = getColorIndiceToChange();
+		QCursor cursor;
+		if(distance_)
+		{
+			if(vertical_)
+				cursor.setShape(Qt::SplitVCursor);
+			else
+				cursor.setShape(Qt::SplitHCursor);
+		}
+		else if(change_ && brightness_)
+		{
+			if(vertical_)
+				cursor.setShape(Qt::SplitHCursor);
+			else
+				cursor.setShape(Qt::SplitVCursor);
+		}
+
+		setCursor(cursor);
+	}
+	else
+	{
+		if(((cursor().shape() == Qt::SplitVCursor) && vertical_) || ((cursor().shape() == Qt::SplitHCursor) && !vertical_))
+			changeDistance();
+		else if(((cursor().shape() == Qt::SplitVCursor) && !vertical_) || ((cursor().shape() == Qt::SplitHCursor) && vertical_))
+		{
+			if(e->state() & Qt::LeftButton)
+			{
+				if(e->state() == Qt::LeftButton)
+					changeBrightness();
+				else
+					changeHue();					
+			}
+			else if(e->state() == Qt::MidButton)
+				changeSaturation();
+		}
+		else
+		{
+			QCursor cursor(Qt::SizeVerCursor);
+			setCursor(cursor);
+
+			if(e->state() == Qt::LeftButton)
+				changeAllBrightness();
+			else if(e->state() == Qt::MidButton)
+				changeAllSaturation();
+		}
+	}
+	p_ = e->pos();
+}
+
+void TeQtColorBar::mouseReleaseEvent(QMouseEvent*)
+{
+	QCursor cursor;
+	setCursor(cursor);
+}
+
+void TeQtColorBar::leaveEvent(QEvent*)
+{
+}
+
+void TeQtColorBar::addColorSlot()
+{
+	int ind = ind_;
+	TeColor cor;
+
+  	bool isOK = false;
+	QColor inputColor(255, 255, 255);
+	QColor outputColor = QColorDialog::getRgba (inputColor.rgb(), &isOK, this);
+	if (isOK)
+	{
+		cor.init(outputColor.red(), outputColor.green(), outputColor.blue());
+		ColorBar cb;
+		double dist = (double)a_ * totalDistance_ / (double)(ftam_-1);
+		cb.color(cor);
+		cb.distance_ = dist;
+
+		vector<ColorBar> bcor = inputColorVec_;
+		inputColorVec_.clear();
+		int i;
+		for(i=0; i<(int)bcor.size(); ++i)
+		{
+			if(i == ind+1)
+				inputColorVec_.push_back(cb);
+			inputColorVec_.push_back(bcor[i]);
+		}
+		generateColorMap();
+		drawColorBar();
+		emit colorChangedSignal();
+	}	
+}
+
+void TeQtColorBar::changeColorSlot()
+{
+	int ind = ind_;
+
+	if((int)inputColorVec_.size() <= ind)
+		return;
+	ColorBar& cb = inputColorVec_[ind];
+	TeColor cor = cb.cor_;
+
+  	bool isOK = false;
+	QColor inputColor(cor.red_, cor.green_, cor.blue_);
+	QColor outputColor = QColorDialog::getRgba (inputColor.rgb(), &isOK, this);
+	if (isOK)
+	{
+		cor.init(outputColor.red(), outputColor.green(), outputColor.blue());
+		cb.color(cor);
+		generateColorMap();
+		drawColorBar();
+		emit colorChangedSignal();
+	}
+}
+
+void TeQtColorBar::removeColorSlot()
+{
+	int i;
+
+	if(ind_ == 0 || ind_ == (int)inputColorVec_.size()-1)
+		return;
+
+	vector<ColorBar> bcor = inputColorVec_;
+	inputColorVec_.clear();
+
+	for(i=0; i<(int)bcor.size(); ++i)
+	{
+		if(i == ind_)
+			continue;
+		inputColorVec_.push_back(bcor[i]);
+	}
+//	if(inputColorVec_.size() == 1)
+//		inputColorVec_.push_back(inputColorVec_[0]);
+
+	QCursor cursor;
+	setCursor(cursor);
+	generateColorMap();
+	drawColorBar();
+	emit colorChangedSignal();
+}
+
+int TeQtColorBar::getColorIndiceToChange()
+{
+	int	i, j, ind;
+	distance_ = false;
+	change_ = false;
+
+	fitMousePosition(p_);
+
+	limit_ = inf_ = sup_ = ind = -1;
+	for(i=0; i<(int)changeVec_.size(); ++i)
+	{
+		j = changeVec_[i];
+		if((a_ >= j-2) && (a_ <= j+2))
+		{
+			ind = i;
+			change_ = true;
+			distance_ = true;
+			break;
+		}
+	}
+
+	if(ind == 0)
+	{
+		for(i=1; i<(int)changeVec_.size()-1; ++i)
+		{
+			j = changeVec_[i];
+			if((a_ >= j-2) && (a_ <= j+2))
+			{
+				ind = i;
+				break;
+			}
+		}
+	}
+
+	if(ind == -1)
+	{
+		int jj;
+		for(i=0; i<(int)changeVec_.size()-1; ++i)
+		{
+			j = changeVec_[i];
+			jj = changeVec_[i+1];
+			if((a_ > j+2) && (a_ < jj-2))
+			{
+				ind = i;
+				break;
+			}
+		}
+	}
+	
+	if(brightness_ || ind == 0 || ind == (int)changeVec_.size() - 2)
+		distance_ = false;
+
+	if(distance_)
+	{
+		limit_ = ind - 1;
+		if((int)changeVec_.size() > limit_+2)
+		{
+			inf_ = changeVec_[limit_];
+			sup_ = changeVec_[limit_+2];
+			colorEdit_ = &(inputColorVec_[limit_+1]);
+		}
+	}
+
+	if(ind < 0)
+		ind = 0;
+	else if(ind > (int)inputColorVec_.size()-1)
+		ind = (int)inputColorVec_.size()-1;
+
+	return ind;
+}
+
+void TeQtColorBar::fitMousePosition(QPoint p)
+{
+	brightness_ = false;
+	QRect rect = frameRect();
+
+	if(vertical_)
+	{
+		ftam_ = rect.height();
+		if(upDown_)
+			a_ = p.y();
+		else
+			a_ = ftam_ - p.y();
+		b_ = p.x();
+
+		if(p.x() >= rect.width() - 7 && p.x() <= rect.width())
+			brightness_ = true;
+	}
+	else
+	{
+		ftam_ = rect.width();
+		a_ = p.x();
+		b_ = p.y();
+		if(p.y() <= 7)
+			brightness_ = true;
+	}
+
+	if(a_ < 0)
+		a_ = 0;
+	else if(a_ > ftam_)
+		a_ = ftam_;
+}
+
+void TeQtColorBar::changeDistance()
+{
+	fitMousePosition(pa_);
+	int nc = changeVec_[changeVec_.size()-1];
+
+	if(colorEdit_ && a_ >= nc) // end of bar
+	{
+		a_ = nc;
+		int t = (int)inputColorVec_.size();
+
+		colorEdit_->distance_ = totalDistance_;
+		double d = inputColorVec_[t-3].distance_;
+		d = d + (totalDistance_ - d) * .8;
+		inputColorVec_[t-1].distance_ = d;
+		QCursor cursor;
+		setCursor(cursor);
+		colorEdit_ = 0;
+	}
+	else if (a_ <= 0)
+	{
+		a_ = 0;
+
+		colorEdit_->distance_ = 0.;
+		int t = changeVec_[2];
+		double dist = .2 * (double)t * totalDistance_ / (double)(ftam_-1);
+		inputColorVec_[0].distance_ = dist;
+		QCursor cursor;
+		setCursor(cursor);
+		colorEdit_ = 0;
+
+	}
+	else
+	{
+		colorEdit_->distance_ = (double)a_ * totalDistance_ / (double)(ftam_-1);
+	}
+	generateColorMap();
+	drawColorBar();
+	emit colorChangedSignal();
+}
+
+void TeQtColorBar::sortByDistance()
+{
+	multimap<double, ColorBar> mMap;
+	typedef pair <double, ColorBar> myPair;	
+	int i;
+	double dist;
+
+	for(i=0; i<(int)inputColorVec_.size(); ++i)
+	{
+		double d = inputColorVec_[i].distance_;
+		if(&(inputColorVec_[i]) == colorEdit_)
+		{
+			dist = inputColorVec_[i].distance_;
+			inputColorVec_[i].distance_ = -1.;
+		}
+		mMap.insert(myPair(d, inputColorVec_[i]));
+	}
+
+	inputColorVec_.clear();
+	multimap<double, ColorBar>::iterator it;
+
+	for(it = mMap.begin(); it!= mMap.end(); it++)
+		inputColorVec_.push_back(it->second);
+
+	for(i=0; i<(int)inputColorVec_.size(); ++i)
+	{
+		ColorBar cb = inputColorVec_[i];
+		if(cb.distance_ == -1)
+		{
+			inputColorVec_[i].distance_ = dist;
+			colorEdit_ = &(inputColorVec_[i]);
+			break;
+		}
+	}
+}
+
+void TeQtColorBar::changeAllBrightness()
+{
+	double	dif;
+	int ind;
+
+	fitMousePosition(pa_);
+
+	if(vertical_)
+		dif = 6.*(double)(p_.x() - b_);
+	else
+		dif = 6.*(double)(p_.y() - b_);
+
+
+	for(ind=0; ind<(int)inputColorVec_.size(); ++ind)
+	{
+		ColorBar cb = inputColorVec_[ind];
+		cb.v_ += (int)dif;
+
+		int v = 1;
+		if(cb.s_ == 0 || cb.h_ == -1) // achromatic (grey)
+			v = 0;
+
+		if(cb.v_ > 255)
+			return;
+		if(cb.v_ < v)
+			return;
+	}
+
+	for(ind=0; ind<(int)inputColorVec_.size(); ++ind)
+	{
+		ColorBar& cb = inputColorVec_[ind];
+		cb.v_ += (int)dif;
+
+		int v = 1;
+		if(cb.s_ == 0 || cb.h_ == -1) // achromatic (grey)
+			v = 0;
+
+		if(cb.v_ > 255)
+			cb.v_ = 255;
+		if(cb.v_ < v)
+			cb.v_ = v;
+
+		QColor cor;
+		cor.setHsv(cb.h_, cb.s_, cb.v_);
+		TeColor tc(cor.red(), cor.green(),cor.blue());
+		cb.color(tc);
+	}
+	generateColorMap();
+	drawColorBar();
+	emit colorChangedSignal();
+}
+
+void TeQtColorBar::changeBrightness()
+{
+	double	dif;
+	int ind = ind_;
+
+	if((int)inputColorVec_.size() <= ind)
+		return;
+
+	ColorBar& cb = inputColorVec_[ind];
+
+	fitMousePosition(pa_);
+
+	if(vertical_)
+		dif = 6.*(double)(p_.x() - b_);
+	else
+		dif = 6.*(double)(p_.y() - b_);
+
+	cb.v_ += (int)dif;
+
+	int v = 1;
+	if(cb.s_ == 0 || cb.h_ == -1) // achromatic (grey)
+		v = 0;
+
+	if(cb.v_ > 255)
+		cb.v_ = 255;
+	if(cb.v_ < v)
+		cb.v_ = v;
+
+	QColor cor;
+	cor.setHsv(cb.h_, cb.s_, cb.v_);
+	TeColor tc(cor.red(), cor.green(),cor.blue());
+	cb.color(tc);
+	
+	generateColorMap();
+	drawColorBar();
+	emit colorChangedSignal();
+}
+
+void TeQtColorBar::changeAllSaturation()
+{
+	double	dif;
+	int ind;
+
+	fitMousePosition(pa_);
+
+	if(vertical_)
+		dif = 6.*(double)(p_.x() - b_);
+	else
+		dif = 6.*(double)(p_.y() - b_);
+
+	for(ind=0; ind<(int)inputColorVec_.size(); ++ind)
+	{
+		ColorBar cb = inputColorVec_[ind];
+
+		if(cb.s_ == 0 || cb.h_ == -1) // achromatic (grey)
+		{
+			cb.v_ += (int)dif;
+			if(cb.v_ > 255)
+				return;
+			if(cb.v_ < 0)
+				return;
+		}
+		else
+		{
+			cb.s_ -= (int)dif;
+			if(cb.s_ > 255)
+				return;
+			if(cb.s_ < 1)
+				return;
+		}
+	}
+
+	for(ind=0; ind<(int)inputColorVec_.size(); ++ind)
+	{
+		ColorBar& cb = inputColorVec_[ind];
+
+		if(cb.s_ == 0 || cb.h_ == -1) // achromatic (grey)
+		{
+			cb.v_ += (int)dif;
+			if(cb.v_ > 255)
+				cb.v_ = 255;
+			if(cb.v_ < 0)
+				cb.v_ = 0;
+		}
+		else
+		{
+			cb.s_ -= (int)dif;
+			if(cb.s_ > 255)
+				cb.s_ = 255;
+			if(cb.s_ < 1)
+				cb.s_ = 1;
+		}
+
+		QColor cor;
+		cor.setHsv(cb.h_, cb.s_, cb.v_);
+		TeColor tc(cor.red(), cor.green(),cor.blue());
+		cb.color(tc);
+	}
+	generateColorMap();
+	drawColorBar();
+	emit colorChangedSignal();
+}
+
+void TeQtColorBar::changeSaturation()
+{
+	double	dif;
+	int ind = ind_;
+
+	if((int)inputColorVec_.size() <= ind)
+		return;
+
+	ColorBar& cb = inputColorVec_[ind];
+
+	fitMousePosition(pa_);
+
+	if(vertical_)
+		dif = 6.*(double)(p_.x() - b_);
+	else
+		dif = 6.*(double)(p_.y() - b_);
+
+	if(cb.s_ == 0 || cb.h_ == -1) // achromatic (grey)
+	{
+		cb.v_ += (int)dif;
+		if(cb.v_ > 255)
+			cb.v_ = 255;
+		if(cb.v_ < 0)
+			cb.v_ = 0;
+	}
+	else
+	{
+		cb.s_ -= (int)dif;
+		if(cb.s_ > 255)
+			cb.s_ = 255;
+		if(cb.s_ < 1)
+			cb.s_ = 1;
+	}
+
+	QColor cor;
+	cor.setHsv(cb.h_, cb.s_, cb.v_);
+	TeColor tc(cor.red(), cor.green(),cor.blue());
+	cb.color(tc);
+	
+	generateColorMap();
+	drawColorBar();
+	emit colorChangedSignal();
+}
+
+void TeQtColorBar::changeHue()
+{
+	double	dif;
+	int ind = ind_;
+
+	if((int)inputColorVec_.size() <= ind)
+		return;
+
+	ColorBar& cb = inputColorVec_[ind];
+
+	fitMousePosition(pa_);
+
+	if(vertical_)
+		dif = (double)(p_.x() - b_);
+	else
+		dif = (double)(p_.y() - b_);
+
+	if(cb.h_ == -1)
+		cb.s_ = cb.v_;
+
+	cb.h_ += (int)dif;
+	if(cb.h_ == -1)
+	{
+		cb.s_ = 0;
+		cb.v_ = cb.cor_.red_;
+	}
+	else if(cb.h_ >= 360)
+		cb.h_ -= 360;
+	else if(cb.h_ < 0)
+		cb.h_ += 360;
+
+	QColor cor;
+	cor.setHsv(cb.h_, cb.s_, cb.v_);
+	TeColor tc(cor.red(), cor.green(),cor.blue());
+	cb.color(tc);
+	
+	generateColorMap();
+	drawColorBar();
+	emit colorChangedSignal();
+}
+
+void TeQtColorBar::invertColorBar()
+{
+	int	i;
+	vector<ColorBar> cbVec = inputColorVec_;
+	inputColorVec_.clear();
+
+	for(i=(int)cbVec.size()-1; i>=0; --i)
+	{
+		cbVec[i].distance_ = totalDistance_ - cbVec[i].distance_;
+		inputColorVec_.push_back(cbVec[i]);
+	}
+	generateColorMap();
+	drawColorBar();
+	emit colorChangedSignal();
+}
+
+void TeQtColorBar::clearColorBar()
+{
+	inputColorVec_.clear();
+	ColorBar cb;
+
+	QColor cor = paletteBackgroundColor();
+	TeColor c(cor.red(), cor.green(), cor.blue());
+	cb.color(c);
+	cb.distance_ = 0.;
+
+	inputColorVec_.push_back(cb);
+	cb.distance_ = 10.;
+	inputColorVec_.push_back(cb);
+
+	generateColorMap();
+	drawColorBar();
+	emit colorChangedSignal();
+}
+
+void TeQtColorBar::setEqualSpace()
+{
+	int i;
+
+	for(i=0; i<(int)inputColorVec_.size(); ++i)
+		inputColorVec_[i].distance_ = (double)i;
+
+	if((int)inputColorVec_.size()-1 >= 0)
+		totalDistance_ = inputColorVec_[inputColorVec_.size()-1].distance_;
+	generateColorMap();
+	drawColorBar();
+	emit colorChangedSignal();
+}
+
+void TeQtColorBar::resizeEvent(QResizeEvent*)
+{
+	ftam_ = frameRect().width();
+	if(vertical_)
+		ftam_ = frameRect().height();
+
+	generateColorMap();
+	drawColorBar();
+}
+
+void TeQtColorBar::helpSlot()
+{
+	if(help_)
+		delete help_;
+
+	help_ = new Help(this, "help", false);
+	help_->init("colorBar.htm");
+	if(help_->erro_ == false)
+	{
+		help_->show();
+		help_->raise();
+	}
+	else
+	{
+		delete help_;
+		help_ = 0;
+	}
+}
+
diff --git a/src/terralib/drivers/qt/TeQtColorBar.h b/src/terralib/drivers/qt/TeQtColorBar.h
new file mode 100755
index 0000000..c5a7c93
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtColorBar.h
@@ -0,0 +1,118 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+
+#ifndef  __TERRALIB_INTERNAL_QTCOLORBAR_H
+#define  __TERRALIB_INTERNAL_QTCOLORBAR_H
+
+#include <qframe.h>
+#include <TeVisual.h>
+#include <TeColorUtils.h>
+#include <qpopupmenu.h>
+#include <qcursor.h>
+#include <vector>
+#include <map>
+using namespace std;
+
+class Help;
+
+//struct ColorBar {
+//	TeColor icor_;
+//	TeColor cor_;
+//	double	distance_;
+//};
+
+class TeQtColorBar : public QFrame
+{
+	Q_OBJECT
+
+public:
+
+	TeQtColorBar( QWidget* parent, const char* name);
+	~TeQtColorBar() {}
+	void	setColorBar(const vector<TeColor>& colorVec);
+	void	setColorBar(const vector<ColorBar>& colorBarVec);
+	void	setColorBarFromNames(string colors);
+	void	drawColorBar();
+	void	setVerticalBar(bool b);
+	void	setUpDownBar(bool b) {upDown_ = b;}
+	void	invertColorBar();
+	void	clearColorBar();
+	void	setEqualSpace();
+	vector<ColorBar>	getInputColorVec() {return inputColorVec_;}
+
+public slots:
+
+	void	addColorSlot();
+	void	changeColorSlot();
+	void	removeColorSlot();
+	void	helpSlot();
+
+protected:
+
+    void	paintEvent(QPaintEvent*);
+	void	mousePressEvent(QMouseEvent*);
+	void	mouseMoveEvent(QMouseEvent*);
+	void	mouseReleaseEvent(QMouseEvent*);
+	void	mouseDoubleClickEvent(QMouseEvent*);
+	void	leaveEvent(QEvent*);
+	void	resizeEvent(QResizeEvent*);
+	void	generateColorMap();
+	int		getColorIndiceToChange();
+	void	fitMousePosition(QPoint);
+	void	changeDistance();
+	void	changeBrightness();
+	void	changeAllSaturation();
+	void	changeSaturation();
+	void	changeAllBrightness();
+	void	changeHue();
+	void	sortByDistance();
+	ColorBar* colorEdit_;
+//	vector<TeColor>	getColors(TeColor, TeColor, int);
+
+	QPopupMenu popupMenu_;
+	QPoint	p_;
+	QPoint	pa_;
+	int		a_;
+	int		b_;
+	int		ftam_;
+	int		ind_;
+	vector<ColorBar> inputColorVec_;
+	vector<int> changeVec_;
+	map<int, vector<TeColor> > colorMap_;
+	bool	vertical_;
+	bool	upDown_;
+	bool	brightness_;
+	bool	change_;
+	bool	distance_;
+	int		limit_, inf_, sup_;
+	double	totalDistance_;
+	Help*	help_;
+
+signals:
+	void mouseReleaseSignal(QMouseEvent*);
+	void mouseMoveSignal(QMouseEvent*);
+	void colorChangedSignal();
+};
+
+#endif // __TERRALIB_INTERNAL_QTCOLORBAR_H
+
diff --git a/src/terralib/drivers/qt/TeQtDataSource.h b/src/terralib/drivers/qt/TeQtDataSource.h
new file mode 100755
index 0000000..0fa84f1
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtDataSource.h
@@ -0,0 +1,24 @@
+#ifndef TEQTDATASOURCE_H
+#define TEQTDATASOURCE_H
+
+#include <qobject.h>
+#include <qvariant.h>
+
+class TeQtDataSource : public QObject
+{
+	Q_OBJECT
+public:
+	TeQtDataSource() {}
+	virtual ~TeQtDataSource() {}
+
+	virtual QVariant cell(int row, int col) = 0;
+	virtual void setCell(int row, int col, const QVariant &text) = 0;
+
+	virtual int numRows() const = 0;
+	virtual int numCols() const = 0;
+
+signals:
+	void dataChanged();
+};
+
+#endif
diff --git a/src/terralib/drivers/qt/TeQtDatabaseItem.cpp b/src/terralib/drivers/qt/TeQtDatabaseItem.cpp
new file mode 100755
index 0000000..fd7f044
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtDatabaseItem.cpp
@@ -0,0 +1,40 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#include <qpixmap.h>
+#include <TeQtDatabaseItem.h>
+#include <images/database.xpm>
+
+
+//Database item constructor
+TeQtDatabaseItem::TeQtDatabaseItem(QListView *parent,
+	QString text, TeDatabase *db)
+	: TeQtCheckListItem(parent,text), db_(db)
+{
+	type_ = DATABASE;
+	QPixmap p(database_xpm);
+	setPixmap(0,p);
+	sortChildItems(0, true);
+	setSelected(false);
+	setEnabled(true);
+}
+
+				
diff --git a/src/terralib/drivers/qt/TeQtDatabaseItem.h b/src/terralib/drivers/qt/TeQtDatabaseItem.h
new file mode 100755
index 0000000..cdbc744
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtDatabaseItem.h
@@ -0,0 +1,51 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#ifndef  __TERRALIB_INTERNAL_QTDATABASEITEM_H
+#define  __TERRALIB_INTERNAL_QTDATABASEITEM_H
+
+#include <TeQtCheckListItem.h>
+
+class TeDatabase;
+
+
+class TeQtDatabaseItem : public TeQtCheckListItem
+{
+public:
+    TeQtDatabaseItem(QListView *parent, QString text,
+					 TeDatabase *db);
+
+	~TeQtDatabaseItem () {}
+
+	int compare(QListViewItem * i, int col, bool ascending) const
+		{ return QListViewItem::compare(i, col, ascending); }
+
+	QString key(int col, bool ascending) const
+		{ return QListViewItem::key(col, ascending); }
+
+	TeDatabase*	getDatabase()
+		{return db_;}
+
+protected:
+	TeDatabase	*db_;
+};
+
+#endif
diff --git a/src/terralib/drivers/qt/TeQtDatabaseItemFCT.cpp b/src/terralib/drivers/qt/TeQtDatabaseItemFCT.cpp
new file mode 100755
index 0000000..d5a2cd6
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtDatabaseItemFCT.cpp
@@ -0,0 +1,40 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#include <qpixmap.h>
+#include <TeQtDatabaseItemFCT.h>
+//#include <../../../../../terraBase/src/ui/images/database.xpm>
+
+
+//Database item constructor
+TeQtDatabaseItem::TeQtDatabaseItem(QListView *parent,
+	QString text, const int& dbIdx)
+	: TeQtCheckListItem(parent,text), dbIdx_(dbIdx)
+{
+	type_ = DATABASE;
+	QPixmap p = QPixmap::fromMimeSource("database.bmp"); //(database_xpm);
+	setPixmap(0,p);
+	sortChildItems(0, true);
+	setSelected(false);
+	setEnabled(true);
+}
+
+				
diff --git a/src/terralib/drivers/qt/TeQtDatabaseItemFCT.h b/src/terralib/drivers/qt/TeQtDatabaseItemFCT.h
new file mode 100755
index 0000000..570d0e5
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtDatabaseItemFCT.h
@@ -0,0 +1,52 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#ifndef  __TERRALIB_INTERNAL_QTDATABASEITEM_H
+#define  __TERRALIB_INTERNAL_QTDATABASEITEM_H
+
+#include <TeQtCheckListItem.h>
+
+class TeDatabase;
+
+
+class TeQtDatabaseItem : public TeQtCheckListItem
+{
+public:
+    TeQtDatabaseItem(QListView *parent, QString text,
+					 const int& dbIdx);
+
+	~TeQtDatabaseItem () {}
+
+	int compare(QListViewItem * i, int col, bool ascending) const
+		{ return QListViewItem::compare(i, col, ascending); }
+
+	QString key(int col, bool ascending) const
+		{ return QListViewItem::key(col, ascending); }
+
+	int getDatabaseIdx(){
+		return dbIdx_;
+	};
+
+protected:
+	int dbIdx_;
+};
+
+#endif
diff --git a/src/terralib/drivers/qt/TeQtDatabasesListView.cpp b/src/terralib/drivers/qt/TeQtDatabasesListView.cpp
new file mode 100755
index 0000000..9d24624
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtDatabasesListView.cpp
@@ -0,0 +1,292 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#include <TeQtDatabasesListView.h>
+#include <TeQtCheckListItem.h>
+#include <TeQtDatabaseItem.h>
+#include <TeQtLayerItem.h>
+#include <qpopupmenu.h>
+
+
+TeQtDatabasesListView::TeQtDatabasesListView(QWidget *parent, const char *name)
+		: QListView(parent, name)
+{
+	currentDatabaseItem_ = 0;
+	currentLayerItem_ = 0;
+	popupItem_ = 0;
+	popupMenu_ = 0;
+	rightMouseWasClicked_ = false;
+
+	setSelectionMode(QListView::Multi);
+    setRootIsDecorated( TRUE );
+
+	popupMenu_ = new QPopupMenu(this);
+
+	// rename action
+	setDefaultRenameAction(QListView::Accept);
+
+	connect(this,SIGNAL(clicked(QListViewItem*)),
+			this,SLOT(clicked(QListViewItem*)));
+	connect(this,SIGNAL(contextMenuRequested(QListViewItem*,const QPoint&, int)),
+		    this,SLOT(contextMenuRequested(QListViewItem*,const QPoint&, int)));
+}
+
+
+TeQtDatabasesListView::~TeQtDatabasesListView()
+{
+	if (popupMenu_)
+		delete popupMenu_;
+}
+
+
+void TeQtDatabasesListView::selectItem(QListViewItem *item)
+{
+	rightMouseWasClicked_ = false;
+	clicked(item);
+}
+
+
+void TeQtDatabasesListView::selectLayerItem(TeLayer *layer)
+{
+	if (layer == 0)
+		currentLayerItem_ = 0;
+		//return;
+
+	QListViewItem		*item;
+	TeQtCheckListItem	*checkListItem;
+	TeQtLayerItem		*layerItem;
+	TeQtDatabaseItem	*dbItem;
+
+	unselectAllItems();
+	QListViewItemIterator it(this);
+	item = it.current();
+	while(item)
+	{
+		checkListItem = (TeQtCheckListItem*)item;
+		if (checkListItem->getType() == TeQtCheckListItem::INFOLAYER)
+		{
+			layerItem = (TeQtLayerItem*)item;
+			if (layerItem->getLayer() == layer)
+			{
+				if (layerItem == currentLayerItem_)
+					break;
+				else
+				{
+					item->setSelected(true);
+					item->repaint();
+					currentLayerItem_ = layerItem;
+
+					dbItem = (TeQtDatabaseItem*)item->parent();
+					dbItem->setSelected(true);
+					dbItem->repaint();
+					currentDatabaseItem_ = dbItem;
+					emit itemChanged(item);
+					return;
+				}
+			}
+		}
+		it++;
+		item = it.current();
+	}
+}
+
+
+void TeQtDatabasesListView::removeItem(QListViewItem *item)
+{
+	if (item == 0)
+		return;
+
+	TeQtCheckListItem *checkListItem = (TeQtCheckListItem*)item;
+
+	if(checkListItem->getType() == TeQtCheckListItem::DATABASE)
+	{
+		TeQtDatabaseItem* dbItem = (TeQtDatabaseItem*)item;
+
+		vector<QListViewItem*> childrenVector;
+		childrenVector = dbItem->getChildren();
+
+		unsigned int i;
+		TeQtLayerItem *layerItem;
+		for (i = 0; i < childrenVector.size(); ++i)
+		{
+			layerItem = (TeQtLayerItem*)childrenVector[i];
+			delete layerItem;
+			
+			emit( layerItemRemoved() );
+		}
+
+		if (currentDatabaseItem_ == dbItem)
+		{
+			currentDatabaseItem_ = 0;
+			currentLayerItem_ = 0;
+		}
+		delete dbItem;
+		
+		emit( databaseItemRemoved() );
+	}
+	else
+	{
+		// item is a layer
+		TeQtLayerItem *layerItem = (TeQtLayerItem*)item;
+		if (currentLayerItem_ == layerItem)
+			currentLayerItem_ = 0;
+		delete layerItem;
+		
+		emit( layerItemRemoved() );
+	}
+}
+
+
+void TeQtDatabasesListView::clicked(QListViewItem *item)
+{
+	unselectAllItems();
+	if (item == 0 || rightMouseWasClicked_ == true)
+	{
+		if (currentDatabaseItem_ != 0)
+		{
+			currentDatabaseItem_->setSelected(true);
+			currentDatabaseItem_->repaint();
+		}
+
+		if (currentLayerItem_ != 0)
+		{
+			currentLayerItem_->setSelected(true);
+			currentLayerItem_->repaint();
+		}
+
+		rightMouseWasClicked_ = false;
+		return;
+	}
+
+	TeQtCheckListItem *checkListItem = (TeQtCheckListItem*)item;
+	if (checkListItem->getType() == TeQtCheckListItem::DATABASE)
+	{
+		item->setSelected(true);
+		item->repaint();
+
+		TeQtDatabaseItem* dbItem = (TeQtDatabaseItem*)item;
+		if (dbItem != currentDatabaseItem_)
+		{
+			currentDatabaseItem_ = dbItem;
+			currentLayerItem_ = 0;
+			emit itemChanged(item);
+		}
+		else
+		{
+			if (currentLayerItem_ != 0)
+			{
+				currentLayerItem_->setSelected(true);
+				currentLayerItem_->repaint();
+			}
+		}
+	}
+	else if(checkListItem->getType() == TeQtCheckListItem::INFOLAYER)
+	{
+		TeQtDatabaseItem *dbItem = (TeQtDatabaseItem*)item->parent();
+		if (currentDatabaseItem_ != dbItem)
+		{
+			currentDatabaseItem_ = dbItem;
+			emit itemChanged(item->parent());
+		}
+
+		if (currentLayerItem_ != 0)
+		{
+			currentLayerItem_->setSelected(true);
+			currentLayerItem_->repaint();
+		}
+	}
+}
+
+
+void TeQtDatabasesListView::contextMenuRequested(QListViewItem *item, const QPoint&, int)
+{
+	popupItem_ = (TeQtCheckListItem*)item;
+
+	unselectAllItems();
+	if (currentDatabaseItem_)
+	{
+		currentDatabaseItem_->setSelected(true);
+		currentDatabaseItem_->repaint();
+	}
+
+	if (currentLayerItem_)
+	{
+		currentLayerItem_->setSelected(true);
+		currentLayerItem_->repaint();
+	}
+
+	emit popupSignal();
+}
+
+
+void TeQtDatabasesListView::contentsMousePressEvent(QMouseEvent *e)
+{
+	if (e->button() == Qt::RightButton)
+	{
+		rightMouseWasClicked_ = true;
+		popupMenu_->move(e->globalPos().x(), e->globalPos().y());
+	}
+	QListView::contentsMousePressEvent(e);
+}
+
+
+void TeQtDatabasesListView::unselectAllItems()
+{
+	QListViewItem *item;
+
+	QListViewItemIterator it(this);
+	item = it.current();
+	while(item)
+	{
+		item->setSelected(false);
+		item->repaint();
+		it++;
+		item = it.current();
+	}
+}
+
+vector<TeQtDatabaseItem*>  TeQtDatabasesListView::getDatabaseItemVec()
+{
+	vector<TeQtDatabaseItem*> databaseItemVec;
+
+	TeQtCheckListItem*	checkListItem;
+	TeQtDatabaseItem*	dbItem;
+
+	QListViewItemIterator it(this);
+	while(it.current())
+	{
+		checkListItem = (TeQtCheckListItem*)it.current();
+		if (checkListItem->getType() == TeQtCheckListItem::DATABASE)
+		{
+			dbItem = (TeQtDatabaseItem*)it.current();
+			databaseItemVec.push_back(dbItem);
+		}
+		++it;
+	}
+
+	return databaseItemVec;
+}
+
+
+
+
+
+
diff --git a/src/terralib/drivers/qt/TeQtDatabasesListView.h b/src/terralib/drivers/qt/TeQtDatabasesListView.h
new file mode 100755
index 0000000..f1486f1
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtDatabasesListView.h
@@ -0,0 +1,95 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#ifndef  __TERRALIB_INTERNAL_QTDATABASESLISTVIEW_H
+#define  __TERRALIB_INTERNAL_QTDATABASESLISTVIEW_H
+
+
+class QPopupMenu;
+class TeQtCheckListItem;
+class TeQtDatabaseItem;
+class TeQtLayerItem;
+class TeLayer;
+
+#include <qlistview.h>
+#include <vector>
+
+
+class TeQtDatabasesListView : public QListView
+{
+	Q_OBJECT
+
+public:
+    TeQtDatabasesListView(QWidget *parent = 0, const char *name = 0);
+
+	~TeQtDatabasesListView();
+
+	TeQtDatabaseItem* currentDatabaseItem() 
+		{ return currentDatabaseItem_; }
+
+	TeQtLayerItem* currentLayerItem() 
+		{ return currentLayerItem_; }
+
+	TeQtCheckListItem *popupItem()
+		{ return popupItem_; }
+
+	QPopupMenu* getPopupMenu()
+		{ return popupMenu_; }
+
+	void selectItem(QListViewItem *item);
+
+	void selectLayerItem(TeLayer *layer);
+
+	void removeItem(QListViewItem *item);
+
+	std::vector<TeQtDatabaseItem*>  getDatabaseItemVec();
+
+
+signals:
+	void itemChanged(QListViewItem*);
+	void popupSignal();
+	
+	/** @brief This signal will be emitted after a database item remotion 
+	  * @note Signals will be emitted for each children layer item removed */
+	void databaseItemRemoved();
+	
+	/** @brief This signal will be emitted after a layer item remotion */
+	void layerItemRemoved();
+
+protected slots:
+	virtual void clicked(QListViewItem *item);
+	void contextMenuRequested(QListViewItem*, const QPoint&, int);
+
+protected:
+	TeQtDatabaseItem	*currentDatabaseItem_;
+	TeQtLayerItem		*currentLayerItem_;
+	bool				rightMouseWasClicked_;
+	TeQtCheckListItem	*popupItem_;
+	QPopupMenu			*popupMenu_;
+
+	void contentsMousePressEvent(QMouseEvent *e);
+
+	void unselectAllItems();
+};
+
+
+#endif
+
diff --git a/src/terralib/drivers/qt/TeQtDatabasesListViewFCT.cpp b/src/terralib/drivers/qt/TeQtDatabasesListViewFCT.cpp
new file mode 100755
index 0000000..ee572f9
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtDatabasesListViewFCT.cpp
@@ -0,0 +1,326 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#include <TeQtDatabasesListViewFCT.h>
+#include <TeQtCheckListItem.h>
+#include <TeQtDatabaseItemFCT.h>
+#include <TeQtLayerItemFCT.h>
+#include <qpopupmenu.h>
+
+#include "TeLayer.h"
+
+
+TeQtDatabasesListView::TeQtDatabasesListView(QWidget *parent, const char *name)
+		: QListView(parent, name)
+{
+	currentDatabaseItem_ = 0;
+	currentLayerItem_ = 0;
+	rightMouseWasClicked_ = false;
+
+	setSelectionMode(QListView::Multi);
+    setRootIsDecorated( TRUE );
+
+	popupDatabase_ = new QPopupMenu(this);
+	popupLayer_ = new QPopupMenu(this);
+	popupOutItem_ = new QPopupMenu(this);
+
+	// rename action
+	setDefaultRenameAction(QListView::Accept);
+
+	connect(this,SIGNAL(clicked(QListViewItem*)),
+			this,SLOT(clicked(QListViewItem*)));
+	connect(this,SIGNAL(contextMenuRequested(QListViewItem*,const QPoint&, int)),
+		    this,SLOT(contextMenuRequested(QListViewItem*,const QPoint&, int)));
+}
+
+
+TeQtDatabasesListView::~TeQtDatabasesListView()
+{
+	if (popupDatabase_)
+		delete popupDatabase_;
+	if (popupLayer_)
+		delete popupLayer_;
+	if (popupOutItem_)
+		delete popupOutItem_;
+}
+
+
+void TeQtDatabasesListView::selectItem(QListViewItem *item)
+{
+	clicked(item);
+}
+
+
+void TeQtDatabasesListView::selectLayerItem(TeLayer *layer)
+{
+	if (layer == 0)
+		return;
+
+	QListViewItem		*item;
+	TeQtCheckListItem	*checkListItem;
+	TeQtLayerItem		*layerItem;
+	TeQtDatabaseItem	*dbItem;
+
+	unselectAllItems();
+	QListViewItemIterator it(this);
+	item = it.current();
+	while(item)
+	{
+		checkListItem = (TeQtCheckListItem*)item;
+		if (checkListItem->getType() == TeQtCheckListItem::INFOLAYER)
+		{
+			layerItem = (TeQtLayerItem*)item;
+			if (layerItem->getLayer() == layer)
+			{
+				if (layerItem == currentLayerItem_)
+					break;
+				else
+				{
+					item->setSelected(true);
+					item->repaint();
+					currentLayerItem_ = layerItem;
+
+					dbItem = (TeQtDatabaseItem*)item->parent();
+					dbItem->setSelected(true);
+					dbItem->repaint();
+					currentDatabaseItem_ = dbItem;
+					emit itemChanged(item);
+					return;
+				}
+			}
+		}
+		it++;
+		item = it.current();
+	}
+}
+
+
+void TeQtDatabasesListView::removeItem(QListViewItem *item)
+{
+	if (item == 0)
+		return;
+
+	TeQtCheckListItem *checkListItem = (TeQtCheckListItem*)item;
+
+	if(checkListItem->getType() == TeQtCheckListItem::DATABASE)
+	{
+		TeQtDatabaseItem* dbItem = (TeQtDatabaseItem*)item;
+
+		vector<QListViewItem*> childrenVector;
+		childrenVector = dbItem->getChildren();
+
+		unsigned int i;
+		TeQtLayerItem *layerItem;
+		for (i = 0; i < childrenVector.size(); ++i)
+		{
+			layerItem = (TeQtLayerItem*)childrenVector[i];
+			delete layerItem;
+		}
+
+		if (currentDatabaseItem_ == dbItem)
+		{
+			currentDatabaseItem_ = 0;
+			currentLayerItem_ = 0;
+		}
+		delete dbItem;
+	}
+	else
+	{
+		// item is a layer
+		TeQtLayerItem *layerItem = (TeQtLayerItem*)item;
+		if (currentLayerItem_ == layerItem)
+			currentLayerItem_ = 0;
+		delete layerItem;
+	}
+}
+
+
+void TeQtDatabasesListView::clicked(QListViewItem *item)
+{
+	unselectAllItems();
+	if (item == 0 || rightMouseWasClicked_ == true)
+	{
+		if (currentDatabaseItem_ != 0)
+		{
+			currentDatabaseItem_->setSelected(true);
+			currentDatabaseItem_->repaint();
+		}
+
+		if (currentLayerItem_ != 0)
+		{
+			currentLayerItem_->setSelected(true);
+			currentLayerItem_->repaint();
+		}
+
+		rightMouseWasClicked_ = false;
+		return;
+	}
+
+	TeQtCheckListItem *checkListItem = (TeQtCheckListItem*)item;
+	if (checkListItem->getType() == TeQtCheckListItem::DATABASE)
+	{
+		item->setSelected(true);
+		item->repaint();
+
+		TeQtDatabaseItem* dbItem = (TeQtDatabaseItem*)item;
+		if (dbItem != currentDatabaseItem_)
+		{
+			currentDatabaseItem_ = dbItem;
+			currentLayerItem_ = 0;
+			emit itemChanged(item);
+		}
+		else
+		{
+			if (currentLayerItem_ != 0)
+			{
+				currentLayerItem_->setSelected(true);
+				currentLayerItem_->repaint();
+			}
+		}
+	}
+	else if(checkListItem->getType() == TeQtCheckListItem::INFOLAYER)
+	{
+		item->parent()->setSelected(true);
+		item->parent()->repaint();
+		item->setSelected(true);
+		item->repaint();
+
+		TeQtDatabaseItem *dbItem = (TeQtDatabaseItem*)item->parent();
+		if (currentDatabaseItem_ != dbItem)
+		{
+			currentDatabaseItem_ = dbItem;
+			emit itemChanged(item->parent());
+		}
+
+		TeQtLayerItem* layerItem = (TeQtLayerItem*)item;
+		if (layerItem != currentLayerItem_)
+		{
+			currentLayerItem_ = layerItem;
+			emit itemChanged(item);
+		}
+	}
+}
+
+
+void TeQtDatabasesListView::contextMenuRequested(QListViewItem *item, const QPoint&, int)
+{
+	popupItem_ = (TeQtCheckListItem*)item;
+
+	unselectAllItems();
+	if (currentDatabaseItem_)
+	{
+		currentDatabaseItem_->setSelected(true);
+		currentDatabaseItem_->repaint();
+	}
+
+	if (currentLayerItem_)
+	{
+		currentLayerItem_->setSelected(true);
+		currentLayerItem_->repaint();
+	}
+
+	emit popupSignal();
+}
+
+
+void TeQtDatabasesListView::contentsMousePressEvent(QMouseEvent *e)
+{
+	if (e->button() == Qt::RightButton)
+	{
+		rightMouseWasClicked_ = true;
+		popupDatabase_->move(e->globalPos().x(), e->globalPos().y());
+		popupLayer_->move(e->globalPos().x(), e->globalPos().y());
+		popupOutItem_->move(e->globalPos().x(), e->globalPos().y());
+	}
+	QListView::contentsMousePressEvent(e);
+}
+
+
+void TeQtDatabasesListView::unselectAllItems()
+{
+	QListViewItem *item;
+
+	QListViewItemIterator it(this);
+	item = it.current();
+	while(item)
+	{
+		item->setSelected(false);
+		item->repaint();
+		it++;
+		item = it.current();
+	}
+}
+
+TeQtLayerItem* TeQtDatabasesListView::getLayerItem(const int& layerId) {
+	QListViewItem *item;
+
+	QListViewItemIterator it(this);
+	item = it.current();
+	while(item)
+	{
+		TeQtCheckListItem *checkListItem = (TeQtCheckListItem*)item;
+		if(checkListItem->getType() == TeQtCheckListItem::INFOLAYER) {
+			TeQtLayerItem* layerItem = (TeQtLayerItem*)checkListItem;
+			if (layerItem->getLayer()->id() == layerId)
+				return layerItem;
+		}
+
+		it++;
+		item = it.current();
+	}
+
+	return NULL;
+}
+
+TeQtDatabaseItem* TeQtDatabasesListView::getDbItem(const int& dbIdx) {
+	QListViewItem *item;
+
+	QListViewItemIterator it(this);
+	item = it.current();
+	while(item)
+	{
+		TeQtCheckListItem *checkListItem = (TeQtCheckListItem*)item;
+		if(checkListItem->getType() == TeQtCheckListItem::DATABASE) {
+			TeQtDatabaseItem* dbItem = (TeQtDatabaseItem*)checkListItem;
+			if (dbItem->getDatabaseIdx() == dbIdx)
+				return dbItem;
+		}
+
+		it++;
+		item = it.current();
+	}
+
+	return NULL;
+}
+
+void TeQtDatabasesListView::reset()
+{
+	unselectAllItems();
+	currentDatabaseItem_ = 0;
+	currentLayerItem_ = 0;
+}
+
+
+
+
+
+
+
diff --git a/src/terralib/drivers/qt/TeQtDatabasesListViewFCT.h b/src/terralib/drivers/qt/TeQtDatabasesListViewFCT.h
new file mode 100755
index 0000000..1244e86
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtDatabasesListViewFCT.h
@@ -0,0 +1,98 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#ifndef  __TERRALIB_INTERNAL_QTDATABASESLISTVIEW_H
+#define  __TERRALIB_INTERNAL_QTDATABASESLISTVIEW_H
+
+
+#include <qlistview.h>
+
+class QPopupMenu;
+class TeQtCheckListItem;
+class TeQtDatabaseItem;
+class TeQtLayerItem;
+class TeLayer;
+
+
+class TeQtDatabasesListView : public QListView
+{
+	Q_OBJECT
+
+public:
+    TeQtDatabasesListView(QWidget *parent = 0, const char *name = 0);
+
+	~TeQtDatabasesListView();
+
+	TeQtDatabaseItem* currentDatabaseItem() 
+		{ return currentDatabaseItem_; }
+
+	TeQtLayerItem* currentLayerItem() 
+		{ return currentLayerItem_; }
+
+	TeQtCheckListItem *popupItem()
+		{ return popupItem_; }
+
+	QPopupMenu* popupDatabase()
+		{ return popupDatabase_; }
+
+	QPopupMenu* popupLayer()
+		{ return popupLayer_; }
+
+	QPopupMenu* popupOutItem()
+		{ return popupOutItem_; }
+
+	void selectItem(QListViewItem *item);
+
+	void selectLayerItem(TeLayer *layer);
+
+	void removeItem(QListViewItem *item);
+
+	TeQtLayerItem* getLayerItem(const int& layerId);
+	TeQtDatabaseItem* getDbItem(const int& dbIdx);
+
+    void reset();
+
+signals:
+	void itemChanged(QListViewItem*);
+	void popupSignal();
+
+protected slots:
+	void clicked(QListViewItem *item);
+	void contextMenuRequested(QListViewItem*, const QPoint&, int);
+
+protected:
+	TeQtDatabaseItem	*currentDatabaseItem_;
+	TeQtLayerItem		*currentLayerItem_;
+	bool				rightMouseWasClicked_;
+	TeQtCheckListItem	*popupItem_;
+	QPopupMenu			*popupDatabase_;
+	QPopupMenu			*popupLayer_;
+	QPopupMenu			*popupOutItem_;
+
+	void contentsMousePressEvent(QMouseEvent *e);
+
+	void unselectAllItems();
+};
+
+
+#endif
+
+
diff --git a/src/terralib/drivers/qt/TeQtFrame.cpp b/src/terralib/drivers/qt/TeQtFrame.cpp
new file mode 100755
index 0000000..68f26f9
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtFrame.cpp
@@ -0,0 +1,59 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+************************************************************************************/
+
+
+#include <TeQtFrame.h>
+#include <qcursor.h>
+
+TeQtFrame::TeQtFrame(QWidget* parent, const char* name)
+	:QFrame(parent, name)
+{
+}
+
+void TeQtFrame::paintEvent(QPaintEvent*)
+{
+	emit paint2DSignal();
+}
+
+void TeQtFrame::mousePressEvent(QMouseEvent* e)
+{
+	p_ = e->pos();
+	emit setCursorSignal(p_);
+}
+
+void TeQtFrame::mouseMoveEvent(QMouseEvent* e)
+{
+	if(e->state() == Qt::NoButton)
+	{
+		QPoint p = e->pos();
+		emit setCursorSignal(p);
+	}
+	emit mouseMoveSignal(e);
+}
+
+void TeQtFrame::mouseReleaseEvent(QMouseEvent*e)
+{
+	emit mouseReleaseSignal(e);
+	QCursor c(Qt::ArrowCursor);
+	setCursor(c);
+}
+
+
diff --git a/src/terralib/drivers/qt/TeQtFrame.h b/src/terralib/drivers/qt/TeQtFrame.h
new file mode 100755
index 0000000..bdb13ae
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtFrame.h
@@ -0,0 +1,55 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+
+#ifndef  __TERRALIB_INTERNAL_QTFRAME_H
+#define  __TERRALIB_INTERNAL_QTFRAME_H
+
+#include <qframe.h>
+
+class TeQtFrame : public QFrame
+{
+	Q_OBJECT
+
+public:
+
+	TeQtFrame( QWidget* parent, const char* name);
+	~TeQtFrame() {}
+
+    QPoint	p_;
+
+protected:
+
+    void	paintEvent(QPaintEvent*);
+	void	mousePressEvent(QMouseEvent*);
+	void	mouseMoveEvent(QMouseEvent*);
+	void	mouseReleaseEvent(QMouseEvent*);
+
+signals:
+	void paint2DSignal();
+	void mouseReleaseSignal(QMouseEvent*);
+	void mouseMoveSignal(QMouseEvent*);
+	void setCursorSignal(const QPoint&);
+};
+
+#endif // __TERRALIB_INTERNAL_QTFRAME_H
+
diff --git a/src/terralib/drivers/qt/TeQtGLWidget.cpp b/src/terralib/drivers/qt/TeQtGLWidget.cpp
new file mode 100755
index 0000000..220b767
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtGLWidget.cpp
@@ -0,0 +1,1403 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+************************************************************************************/
+
+#include "TeQtGLWidget.h"
+#include "qframe.h"
+#include <qpainter.h>
+#include "TeDefines.h"
+#include "math.h"
+#include "TeUtils.h"
+#include <TeQtGrid.h>
+#include <TeExternalTheme.h>
+#include "TeDatabase.h"
+#include "TeDatabaseUtils.h"
+
+#if defined(Q_CC_MSVC)
+#pragma warning(disable:4305) // init: truncation from const double to float
+#endif
+
+TeQtGLWidget::TeQtGLWidget( QWidget* parent, const char* name, TeQtGrid* grid, string xField, string yField, string zField, QPaintDevice* xy, QPaintDevice* zx, QPaintDevice* yz, int selectedObjects, string func)
+    : QGLWidget( parent, name )
+{
+	setFocusPolicy(QWidget::StrongFocus);
+
+	xRot_ = yRot_ = zRot_ = 0.0;		// default object rotation
+    xOff_ = yOff_ = zOff_ = -0.2;		// default object Offset
+    xSize_ = ySize_ = zSize_ = 0.4;		// default object Size
+    scale_ = 1.;						// default object scale_
+	viewAngle_ = 60.;
+	xTranslation_ = 0.;
+	yTranslation_ = 0.;
+	zTranslation_ = -3.5;
+	frontLighting_ = true;
+	drawAxis_ = true;
+	xField_ = xField;
+	yField_ = yField;
+	zField_ = zField;
+	grid_ = grid;
+	theme_ = (TeTheme*)grid_->getTheme()->getTheme();
+
+	if(theme_->type() == TeTHEME)
+		db_ = theme_->layer()->database();
+	else if(theme_->type() == TeEXTERNALTHEME)
+		db_ = ((TeExternalTheme*)theme_)->getRemoteTheme()->layer()->database();
+
+	selectedObjects_ = selectedObjects;
+	function_ = func;
+	quality_ = 12;
+	addSelection_ = false;
+	keyPress_ = 0;
+
+	TeGeomRepVisualMap& vmap = theme_->defaultLegend().getVisualMap();
+	if(vmap.find(TePOLYGONS) != vmap.end())
+		defaultColor_ = QColor(vmap[TePOLYGONS]->color().red_, vmap[TePOLYGONS]->color().green_, vmap[TePOLYGONS]->color().blue_); 
+	else if(vmap.find(TeLINES) != vmap.end())
+		defaultColor_ = QColor(vmap[TeLINES]->color().red_, vmap[TeLINES]->color().green_, vmap[TeLINES]->color().blue_); 
+	else if(vmap.find(TePOINTS) != vmap.end())
+		defaultColor_ = QColor(vmap[TePOINTS]->color().red_, vmap[TePOINTS]->color().green_, vmap[TePOINTS]->color().blue_); 
+
+	TeGeomRepVisualMap& pmap = theme_->pointingLegend().getVisualMap();
+	if(pmap.find(TePOLYGONS) != vmap.end())
+		pointingColor_ = QColor(pmap[TePOLYGONS]->color().red_, pmap[TePOLYGONS]->color().green_, pmap[TePOLYGONS]->color().blue_); 
+	else if(pmap.find(TeLINES) != vmap.end())
+		pointingColor_ = QColor(pmap[TeLINES]->color().red_, pmap[TeLINES]->color().green_, pmap[TeLINES]->color().blue_); 
+	else if(pmap.find(TePOINTS) != vmap.end())
+		pointingColor_ = QColor(pmap[TePOINTS]->color().red_, pmap[TePOINTS]->color().green_, pmap[TePOINTS]->color().blue_); 
+
+	xyDevice_ = xy;
+	zxDevice_ = zx;
+	yzDevice_ = yz;
+}
+
+TeQtGLWidget::~TeQtGLWidget()
+{
+	deleteGLObject();
+}
+
+void TeQtGLWidget::paintGL()
+{
+	glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+
+	glMatrixMode(GL_PROJECTION); 
+	glLoadIdentity(); 
+	int w = width();
+	int h = height();
+
+	if (w <= h) 
+		gluPerspective(viewAngle_ * (GLfloat) h / (GLfloat) w, (GLfloat) h / (GLfloat) w, 1.0, 16.0); 
+	else 
+		gluPerspective(viewAngle_ * (GLfloat) w / (GLfloat) h, (GLfloat) w / (GLfloat) h, 1.0, 18.0); 
+
+	glMatrixMode(GL_MODELVIEW); 
+	glLoadIdentity(); 
+
+	glTranslatef(xTranslation_, yTranslation_, zTranslation_); 
+    glRotatef( xRot_, 1.0, 0.0, 0.0 ); 
+    glRotatef( yRot_, 0.0, 1.0, 0.0 ); 
+    glRotatef( zRot_, 0.0, 0.0, 1.0 );
+
+    glLineWidth( 1.0 );
+    qglColor( magenta );
+    glBegin( GL_LINE_LOOP );
+    glVertex3f( xOff_ + xSize_,  yOff_ + ySize_, zOff_ );
+    glVertex3f( xOff_ + xSize_, yOff_ + ySize_, zOff_ + zSize_ );
+    glVertex3f( xOff_, yOff_ + ySize_, zOff_ + zSize_ );
+    glVertex3f( xOff_, yOff_ + ySize_, zOff_ );
+    glEnd();
+
+    glBegin( GL_LINE_LOOP );
+    glVertex3f( xOff_ + xSize_,  yOff_, zOff_ );
+    glVertex3f( xOff_, yOff_, zOff_ );
+    glVertex3f( xOff_, yOff_, zOff_ + zSize_ );
+    glVertex3f( xOff_ + xSize_, yOff_, zOff_ + zSize_ );
+    glEnd();
+
+    glBegin( GL_LINES );
+    glVertex3f( xOff_ + xSize_,  yOff_ + ySize_, zOff_ );   glVertex3f( xOff_ + xSize_,  yOff_, zOff_ );
+    glVertex3f( xOff_ + xSize_, yOff_ + ySize_, zOff_ + zSize_ );   glVertex3f( xOff_ + xSize_,  yOff_, zOff_ + zSize_ );
+    glVertex3f( xOff_, yOff_ + ySize_, zOff_ + zSize_ );   glVertex3f( xOff_, yOff_, zOff_ + zSize_ );
+    glVertex3f( xOff_,  yOff_ + ySize_, zOff_ );   glVertex3f( xOff_, yOff_, zOff_ );
+    glEnd();
+
+
+	// draw white cube
+    qglColor( white );
+    glBegin( GL_LINE_LOOP );
+    glVertex3f( 1.0,  1.0, -1.0 );
+    glVertex3f( 1.0, 1.0, 1.0 );
+    glVertex3f( -1.0, 1.0, 1.0 );
+    glVertex3f( -1.0,  1.0, -1.0 );
+    glEnd();
+
+    glBegin( GL_LINES );
+	if(!drawAxis_)
+	{
+		glVertex3f( 1.0,  -1.0, -1.0 );	glVertex3f( -1.0, -1.0, -1.0 );
+		glVertex3f( -1.0, -1.0, -1.0 );	glVertex3f( -1.0, -1.0, 1.0 );
+	}
+    glVertex3f( -1.0, -1.0, 1.0 );	glVertex3f( 1.0,  -1.0, 1.0 );
+	glVertex3f( 1.0,  -1.0, 1.0 );	glVertex3f( 1.0,  -1.0, -1.0 );
+    glVertex3f( 1.0,  1.0, -1.0 );   glVertex3f( 1.0,  -1.0, -1.0 );
+    glVertex3f( 1.0, 1.0, 1.0 );   glVertex3f( 1.0,  -1.0, 1.0 );
+    glVertex3f( -1.0, 1.0, 1.0 );   glVertex3f( -1.0, -1.0, 1.0 );
+	if(!drawAxis_)
+		glVertex3f( -1.0,  1.0, -1.0 );   glVertex3f( -1.0, -1.0, -1.0 );
+    glEnd();
+
+
+	GLfloat mat_specular[] = { .1, .1, .1, 1.0 };
+	GLfloat mat_shininess[] = { 30.0 };
+	GLfloat light_Front[] = { 10.0, 10.0, 10.0, 1.0 };
+	GLfloat light_Back[] = { -10.0, -10.0, -10.0, 1.0 };
+	GLfloat lightHigh[] = { 1.0, 1.0, 1.0 };
+	GLfloat lightLow[] = { 0.5, 0.5, 0.5 };
+	GLfloat lmodel_ambient[] = { 0.1, 0.1, 0.1, 1.0 };
+
+	glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, mat_specular);
+	glMaterialfv(GL_FRONT_AND_BACK, GL_SHININESS, mat_shininess);
+	if(frontLighting_)
+	{
+		glLightfv(GL_LIGHT0, GL_POSITION, light_Front);
+		glLightfv(GL_LIGHT0, GL_DIFFUSE, lightHigh );
+		glLightfv(GL_LIGHT0, GL_SPECULAR, lightHigh );
+		glLightfv(GL_LIGHT1, GL_POSITION, light_Back);
+		glLightfv(GL_LIGHT1, GL_DIFFUSE, lightLow );
+		glLightfv(GL_LIGHT1, GL_SPECULAR, lightLow );
+	}
+	else
+	{
+		glLightfv(GL_LIGHT0, GL_POSITION, light_Front);
+		glLightfv(GL_LIGHT0, GL_DIFFUSE, lightLow );
+		glLightfv(GL_LIGHT0, GL_SPECULAR, lightLow );
+		glLightfv(GL_LIGHT1, GL_POSITION, light_Back);
+		glLightfv(GL_LIGHT1, GL_DIFFUSE, lightHigh );
+		glLightfv(GL_LIGHT1, GL_SPECULAR, lightHigh );
+	}
+	glLightModelfv(GL_LIGHT_MODEL_AMBIENT, lmodel_ambient);
+	glEnable(GL_LIGHT0);
+	glEnable(GL_LIGHT1);
+	glEnable(GL_LIGHTING);
+	glShadeModel (GL_SMOOTH);
+	glEnable(GL_DEPTH_TEST);
+	glEnable(GL_COLOR_MATERIAL);
+
+	if(drawAxis_)
+	{
+		// draw x axis
+		glLineWidth( 2.0 );
+		glBegin( GL_LINES );
+		qglColor( red );
+		glVertex3f( -1.0, -1.0, -1.0 );    glVertex3f( 1.5, -1.0, -1.0 );
+		glVertex3f( 1.4, -1.1, -1.0 );    glVertex3f( 1.5, -1.2, -1.0 );
+		glVertex3f( 1.5, -1.1, -1.0 );    glVertex3f( 1.4, -1.2, -1.0 );
+		glVertex3f( 1.35, -1.22, -1.0 );    glVertex3f( 1.55, -1.22, -1.0 );
+		glEnd();
+		glPushMatrix();
+		glRotatef(90, 0.0, 1.0, 0.0);
+		glTranslatef(1.0, -1.0, 1.4);
+		glCallList(cone_);
+		glPopMatrix();
+
+		// draw y axis
+		glBegin( GL_LINES );
+		qglColor( green );
+		glVertex3f( -1.0, -1.0, -1.0 );    glVertex3f( -1.0, 1.5, -1.0 );
+		glVertex3f( -1.2, 1.5, -1.0 );    glVertex3f( -1.15, 1.45, -1.0 );
+		glVertex3f( -1.1, 1.5, -1.0 );    glVertex3f( -1.2, 1.4, -1.0 );
+		glVertex3f( -1.05, 1.38, -1.0 );    glVertex3f( -1.25, 1.38, -1.0 );
+		glEnd();
+		glPushMatrix();
+		glRotatef(-90, 1.0, 0.0, 0.0);
+		glTranslatef( -1.0, 1.0, 1.4);
+		glCallList(cone_);
+		glPopMatrix();
+
+		// draw z axis
+		glBegin( GL_LINES );
+		qglColor( blue );
+		glVertex3f( -1.0, -1.0, -1.0 );    glVertex3f( -1.0, -1.0, 1.5 );
+		glVertex3f( -1.0, -1.1, 1.5 );    glVertex3f( -1.0, -1.1, 1.4 );
+		glVertex3f( -1.0, -1.1, 1.4 );    glVertex3f( -1.0, -1.2, 1.5 );
+		glVertex3f( -1.0, -1.2, 1.5 );    glVertex3f( -1.0, -1.2, 1.4 );
+		glVertex3f( -1.0, -1.22, 1.55 );    glVertex3f( -1.0, -1.22, 1.35 );
+		glEnd();
+		glPushMatrix();
+		glTranslatef(-1.0, -1.0, 1.4);
+		glCallList(cone_);
+		glPopMatrix();
+	}
+
+	glLineWidth( 1.0 );
+
+	GLfloat rp = (GLfloat)pointingColor_.red()/255.;
+ 	GLfloat gp = (GLfloat)pointingColor_.green()/255.;
+ 	GLfloat bp = (GLfloat)pointingColor_.blue()/255.;
+
+	GLfloat r = (GLfloat)defaultColor_.red()/255.;
+ 	GLfloat g = (GLfloat)defaultColor_.green()/255.;
+ 	GLfloat b = (GLfloat)defaultColor_.blue()/255.;
+
+	int i, size = (int)ballVec_.size();
+
+	glColor3f(r, g, b);
+	for(i=0; i<selIni_; ++i)
+	{
+		glPushMatrix();
+		if(ballVec_[i])
+			glCallList(ballVec_[i]);
+		glPopMatrix();
+	}
+
+	glColor3f(rp, gp, bp);
+	for(i=selIni_; i<size; ++i)
+	{
+		glPushMatrix();
+		if(ballVec_[i])
+			glCallList(ballVec_[i]);
+		glPopMatrix();
+	}
+
+	glFlush();
+	glDisable(GL_LIGHTING);
+}
+
+void TeQtGLWidget::initializeGL()
+{
+     makeObject();		// Generate an OpenGL display list
+}
+
+void TeQtGLWidget::resizeGL( int w, int h )
+{
+    glViewport( 0, 0, (GLint)w, (GLint)h );
+}
+
+void TeQtGLWidget::makeObject()
+{
+	deleteGLObject();
+
+	ballVec_.clear();
+	ballMap_.clear();
+	getValues();
+	draw2DPixmaps();
+
+    GLUquadricObj* qobj = gluNewQuadric();
+	//gluQuadricDrawStyle(qobj, GLU_FILL);
+
+	double	x, y, z;
+	double w = (max_ - min_) / 2.;
+	double wm = min_ + w;
+	int i, size = (int)xVec_.size();
+
+	for(i=0; i<size; ++i)
+	{
+		string id = idVec_[i];
+		int k = glGenLists( 1 );
+		ballVec_.push_back(k);
+		ballMap_[id] = k;
+
+		glNewList( k, GL_COMPILE );
+
+		x = xVec_[i];
+		y = yVec_[i];
+		z = zVec_[i];
+
+		glBegin( GL_COMPILE);
+		x = (x-wm)/w;
+		y = (y-wm)/w;
+		z = (z-wm)/w;
+		glPushMatrix();
+		glTranslatef (x, y, z);
+		gluSphere(qobj, /* radius */ .02, /* slices */ quality_, /* stacks */ quality_);
+		glPopMatrix();
+		glEnd();
+		glEndList();
+	}
+
+	cone_ = glGenLists( 1 );
+	glNewList( cone_, GL_COMPILE );
+	glBegin( GL_COMPILE);
+	glPushMatrix();
+	gluCylinder(qobj, .035, 0, .15, 12, 12);
+	glPopMatrix();
+	glEnd();
+	glEndList();
+
+	gluDeleteQuadric(qobj);
+
+	paint2D();
+}
+
+void TeQtGLWidget::getValues()
+{
+	idVec_.clear();
+
+	xVec_.clear();
+	yVec_.clear();
+	zVec_.clear();
+
+	TeDatabasePortal *portal = db_->getPortal();
+	double	a, b, c;
+	string CT, CA, from;
+
+	if(theme_->type() == TeTHEME)
+	{
+		CT = theme_->collectionTable();
+		CA = theme_->collectionAuxTable();
+		from = theme_->sqlGridFrom();
+	}
+	else if(theme_->type() == TeEXTERNALTHEME)
+	{
+		CT = ((TeExternalTheme*)theme_)->getRemoteTheme()->collectionTable();
+		CA = ((TeExternalTheme*)theme_)->getRemoteTheme()->collectionAuxTable();
+		from = ((TeExternalTheme*)theme_)->getRemoteTheme()->sqlGridFrom();
+	}
+
+	string id;
+	string atr;
+	if(function_ != "NONE")
+	{
+		id = CT + ".c_object_id";
+		atr = "MIN(" + id + "), " + function_ + "(" + xField_ + "), " + function_ + "(" + yField_ + "), " + function_ + "(" + zField_ + ")";
+	}
+	else
+	{
+		id = CA + ".unique_id";
+		atr = id + ", " + xField_ + ", " + yField_ + ", " + zField_;
+	}
+
+	if(theme_->type() == TeTHEME)
+	{
+		string query = "SELECT " + atr + from;
+
+		if(function_ == "NONE")
+		{
+			if(selectedObjects_ == TeAll)
+			{
+				query += " WHERE (grid_status = 0 OR grid_status = 2 OR (grid_status is null AND (c_object_status = 0 OR c_object_status = 2)))";
+			}
+			else if(selectedObjects_ == TeSelectedByQuery)
+			{
+				query += " WHERE (grid_status = 2  OR (grid_status is null AND c_object_status = 2))";
+			}
+			else if(selectedObjects_ == TeNotSelectedByQuery)
+			{
+				query += " WHERE (grid_status = 0 OR (grid_status is null AND c_object_status = 0))";
+			}
+			else if(selectedObjects_ == TeGrouped)
+				query += " WHERE ((c_legend_id <> 0) AND (grid_status = 0 OR grid_status = 2 OR (grid_status is null AND (c_object_status = 0 OR c_object_status = 2))))";
+			else if(selectedObjects_ == TeNotGrouped)
+				query += " WHERE ((c_legend_id = 0) AND (grid_status = 0 OR grid_status = 2 OR (grid_status is null AND (c_object_status = 0 OR c_object_status = 2))))";
+		}
+		else
+		{
+			if(selectedObjects_ == TeAll)
+			{
+				query += " WHERE (c_object_status = 0 OR c_object_status = 2)";
+			}
+			else if(selectedObjects_ == TeSelectedByQuery)
+			{
+				query += " WHERE (c_object_status = 2)";
+			}
+			else if(selectedObjects_ == TeNotSelectedByQuery)
+			{
+				query += " WHERE (c_object_status = 0)";
+			}
+			else if(selectedObjects_ == TeGrouped)
+				query += " WHERE ((c_legend_id <> 0) AND (c_object_status = 0 OR c_object_status = 2))";
+			else if(selectedObjects_ == TeNotGrouped)
+				query += " WHERE ((c_legend_id = 0) AND (c_object_status = 0 OR c_object_status = 2))";
+		}
+
+		if(function_ != "NONE")
+			query += " GROUP BY " + CT + ".c_object_id";
+		if(portal->query(query) == false)
+		{
+			delete portal;
+			return;
+		}
+
+		min_ = TeMAXFLOAT;
+		max_ = -TeMAXFLOAT;
+		string id, sa, sb, sc;
+		while(portal->fetchRow())
+		{
+			id = portal->getData(0);
+			sa = portal->getData(1);
+			sb = portal->getData(2);
+			sc = portal->getData(3);
+			if(sa.empty()==false && sb.empty()==false && sc.empty()==false)
+			{
+				a = atof(sa.c_str());
+				b = atof(sb.c_str());
+				c = atof(sc.c_str());
+				xVec_.push_back(a);
+				yVec_.push_back(b);
+				zVec_.push_back(c);
+				min_ = MIN(min_, a);
+				min_ = MIN(min_, b);
+				min_ = MIN(min_, c);
+				max_ = MAX(max_, a);
+				max_ = MAX(max_, b);
+				max_ = MAX(max_, c);
+				idVec_.push_back(id);
+			}
+		}
+		selIni_ = (int)xVec_.size();
+
+		query = "SELECT " + atr + from;
+		if(function_ == "NONE")
+		{
+			if(selectedObjects_ == TeAll)
+			{
+				query += " WHERE (grid_status = 1 OR grid_status = 3";
+				query += " OR (grid_status is null AND (c_object_status = 1 OR c_object_status = 3)))";
+			}
+			else if(selectedObjects_ == TeSelectedByQuery)
+			{
+				query += " WHERE (grid_status = 3  OR (grid_status is null AND c_object_status = 3))";
+			}
+			else if(selectedObjects_ == TeNotSelectedByQuery)
+			{
+				query += " WHERE ((grid_status = 1  OR (grid_status is null AND c_object_status = 1)))";
+			}
+			else if(selectedObjects_ == TeGrouped)
+			{
+				query += " WHERE ((c_legend_id <> 0) AND (grid_status = 1 OR grid_status = 3";
+				query += " OR (grid_status is null AND (c_object_status = 1 OR c_object_status = 3))))";
+			}
+			else if(selectedObjects_ == TeNotGrouped)
+			{
+				query += " WHERE ((c_legend_id = 0) AND (grid_status = 1 OR grid_status = 3";
+				query += " OR (grid_status is null AND (c_object_status = 1 OR c_object_status = 3))))";
+			}
+		}
+		else
+		{
+			if(selectedObjects_ == TeAll)
+			{
+				query += " WHERE (c_object_status = 1 OR c_object_status = 3)";
+			}
+			else if(selectedObjects_ == TeSelectedByQuery)
+			{
+				query += " WHERE (c_object_status = 3)";
+			}
+			else if(selectedObjects_ == TeNotSelectedByQuery)
+			{
+				query += " WHERE (c_object_status = 1)";
+			}
+			else if(selectedObjects_ == TeGrouped)
+			{
+				query += " WHERE ((c_legend_id <> 0) AND (c_object_status = 1 OR c_object_status = 3))";
+			}
+			else if(selectedObjects_ == TeNotGrouped)
+			{
+				query += " WHERE ((c_legend_id = 0) AND (c_object_status = 1 OR c_object_status = 3))";
+			}
+		}
+
+		if(function_ != "NONE")
+			query += " GROUP BY " + CT + ".c_object_id";
+
+		portal->freeResult();
+		if(portal->query(query) == false)
+		{
+			delete portal;
+			return;
+		}
+
+		while(portal->fetchRow())
+		{
+			id = portal->getData(0);
+			sa = portal->getData(1);
+			sb = portal->getData(2);
+			sc = portal->getData(3);
+			if(sa.empty()==false && sb.empty()==false && sc.empty()==false)
+			{
+				a = atof(sa.c_str());
+				b = atof(sb.c_str());
+				c = atof(sc.c_str());
+				xVec_.push_back(a);
+				yVec_.push_back(b);
+				zVec_.push_back(c);
+				min_ = MIN(min_, a);
+				min_ = MIN(min_, b);
+				min_ = MIN(min_, c);
+				max_ = MAX(max_, a);
+				max_ = MAX(max_, b);
+				max_ = MAX(max_, c);
+				idVec_.push_back(id);
+			}
+		}
+	}
+	else if(theme_->type() == TeEXTERNALTHEME)
+	{
+		string query = "SELECT " + atr + from;
+
+		string where;
+		if(function_ == "NONE")
+		{
+			if(selectedObjects_ == TeAll)
+			{
+				where = " WHERE (grid_status = 0 OR grid_status = 2 OR (grid_status is null AND (c_object_status = 0 OR c_object_status = 2)))";
+			}
+			else if(selectedObjects_ == TeSelectedByQuery)
+			{
+				where = " WHERE (grid_status = 2  OR (grid_status is null AND c_object_status = 2))";
+			}
+			else if(selectedObjects_ == TeNotSelectedByQuery)
+			{
+				where = " WHERE (grid_status = 0 OR (grid_status is null AND c_object_status = 0))";
+			}
+			else if(selectedObjects_ == TeGrouped)
+				where = " WHERE ((c_legend_id <> 0) AND (grid_status = 0 OR grid_status = 2 OR (grid_status is null AND (c_object_status = 0 OR c_object_status = 2))))";
+			else if(selectedObjects_ == TeNotGrouped)
+				where = " WHERE ((c_legend_id = 0) AND (grid_status = 0 OR grid_status = 2 OR (grid_status is null AND (c_object_status = 0 OR c_object_status = 2))))";
+		}
+		else
+		{
+			if(selectedObjects_ == TeAll)
+			{
+				where = " WHERE (c_object_status = 0 OR c_object_status = 2)";
+			}
+			else if(selectedObjects_ == TeSelectedByQuery)
+			{
+				where = " WHERE (c_object_status = 2)";
+			}
+			else if(selectedObjects_ == TeNotSelectedByQuery)
+			{
+				where = " WHERE (c_object_status = 0)";
+			}
+			else if(selectedObjects_ == TeGrouped)
+				where = " WHERE ((c_legend_id <> 0) AND (c_object_status = 0 OR c_object_status = 2))";
+			else if(selectedObjects_ == TeNotGrouped)
+				where = " WHERE ((c_legend_id = 0) AND (c_object_status = 0 OR c_object_status = 2))";
+		}
+
+		vector<string> sv = generateItemsInClauseVec(theme_, where);
+		vector<string>::iterator it;
+
+		min_ = TeMAXFLOAT;
+		max_ = -TeMAXFLOAT;
+		string id, sa, sb, sc;
+		for(it=sv.begin(); it!=sv.end(); ++it)
+		{
+			string sel = query + " WHERE " + CA + ".unique_id IN " + *it;
+
+			if(function_ != "NONE")
+				sel += " GROUP BY " + CT + ".c_object_id";
+
+			if(portal->query(sel) == false)
+			{
+				delete portal;
+				return;
+			}
+
+			while(portal->fetchRow())
+			{
+				id = portal->getData(0);
+				sa = portal->getData(1);
+				sb = portal->getData(2);
+				sc = portal->getData(3);
+				if(sa.empty()==false && sb.empty()==false && sc.empty()==false)
+				{
+					a = atof(sa.c_str());
+					b = atof(sb.c_str());
+					c = atof(sc.c_str());
+					xVec_.push_back(a);
+					yVec_.push_back(b);
+					zVec_.push_back(c);
+					min_ = MIN(min_, a);
+					min_ = MIN(min_, b);
+					min_ = MIN(min_, c);
+					max_ = MAX(max_, a);
+					max_ = MAX(max_, b);
+					max_ = MAX(max_, c);
+					idVec_.push_back(id);
+				}
+			}
+			portal->freeResult();
+		}
+
+		selIni_ = (int)xVec_.size();
+
+		query = "SELECT " + atr + from;
+		if(function_ == "NONE")
+		{
+			if(selectedObjects_ == TeAll)
+			{
+				where = " WHERE (grid_status = 1 OR grid_status = 3";
+				where += " OR (grid_status is null AND (c_object_status = 1 OR c_object_status = 3)))";
+			}
+			else if(selectedObjects_ == TeSelectedByQuery)
+			{
+				where = " WHERE (grid_status = 3  OR (grid_status is null AND c_object_status = 3))";
+			}
+			else if(selectedObjects_ == TeNotSelectedByQuery)
+			{
+				where = " WHERE ((grid_status = 1  OR (grid_status is null AND c_object_status = 1)))";
+			}
+			else if(selectedObjects_ == TeGrouped)
+			{
+				where = " WHERE ((c_legend_id <> 0) AND (grid_status = 1 OR grid_status = 3";
+				where += " OR (grid_status is null AND (c_object_status = 1 OR c_object_status = 3))))";
+			}
+			else if(selectedObjects_ == TeNotGrouped)
+			{
+				where = " WHERE ((c_legend_id = 0) AND (grid_status = 1 OR grid_status = 3";
+				where += " OR (grid_status is null AND (c_object_status = 1 OR c_object_status = 3))))";
+			}
+		}
+		else
+		{
+			if(selectedObjects_ == TeAll)
+			{
+				where = " WHERE (c_object_status = 1 OR c_object_status = 3)";
+			}
+			else if(selectedObjects_ == TeSelectedByQuery)
+			{
+				where = " WHERE (c_object_status = 3)";
+			}
+			else if(selectedObjects_ == TeNotSelectedByQuery)
+			{
+				where = " WHERE (c_object_status = 1)";
+			}
+			else if(selectedObjects_ == TeGrouped)
+			{
+				where = " WHERE ((c_legend_id <> 0) AND (c_object_status = 1 OR c_object_status = 3))";
+			}
+			else if(selectedObjects_ == TeNotGrouped)
+			{
+				where = " WHERE ((c_legend_id = 0) AND (c_object_status = 1 OR c_object_status = 3))";
+			}
+		}
+		
+		sv = generateItemsInClauseVec(theme_, where);
+
+		for(it=sv.begin(); it!=sv.end(); ++it)
+		{
+			string sel = query + " WHERE " + CA + ".unique_id IN " + *it;
+
+			if(function_ != "NONE")
+				sel += " GROUP BY " + CT + ".c_object_id";
+
+			if(portal->query(sel) == false)
+			{
+				delete portal;
+				return;
+			}
+
+			while(portal->fetchRow())
+			{
+				id = portal->getData(0);
+				sa = portal->getData(1);
+				sb = portal->getData(2);
+				sc = portal->getData(3);
+				if(sa.empty()==false && sb.empty()==false && sc.empty()==false)
+				{
+					a = atof(sa.c_str());
+					b = atof(sb.c_str());
+					c = atof(sc.c_str());
+					xVec_.push_back(a);
+					yVec_.push_back(b);
+					zVec_.push_back(c);
+					min_ = MIN(min_, a);
+					min_ = MIN(min_, b);
+					min_ = MIN(min_, c);
+					max_ = MAX(max_, a);
+					max_ = MAX(max_, b);
+					max_ = MAX(max_, c);
+					idVec_.push_back(id);
+				}
+			}
+			portal->freeResult();
+		}
+	}
+	delete portal;
+
+	min_ = min_ - (max_ - min_) * 0.0001;
+	max_ = max_ + (max_ - min_) * 0.0001;
+
+	if(ballVec_.empty() == false)
+	{
+		ballVec_.clear();
+		int i, size = (int)idVec_.size();
+		map<string, GLuint>::iterator it;
+
+		for(i=0; i<size; ++i)
+		{
+			string id = idVec_[i];
+			it = ballMap_.find(id);
+			if(it != ballMap_.end())
+				ballVec_.push_back(it->second);
+		}
+	}
+}
+
+void TeQtGLWidget::selectFromHexaedro()
+{
+	double x1, y1, z1, x2, y2, z2;
+	getCubeCoordinate(x1, y1, z1, x2, y2, z2);
+	string xmin = Te2String(x1, 6);
+	string ymin = Te2String(y1, 6);
+	string zmin = Te2String(z1, 6);
+	string xmax = Te2String(x2, 6);
+	string ymax = Te2String(y2, 6);
+	string zmax = Te2String(z2, 6);
+
+	string CT, CA, from;
+
+	if(theme_->type() == TeTHEME)
+	{
+		CT = theme_->collectionTable();
+		CA = theme_->collectionAuxTable();
+		from = theme_->sqlGridFrom();
+	}
+	else if(theme_->type() == TeEXTERNALTHEME)
+	{
+		CT = ((TeExternalTheme*)theme_)->getRemoteTheme()->collectionTable();
+		CA = ((TeExternalTheme*)theme_)->getRemoteTheme()->collectionAuxTable();
+		from = ((TeExternalTheme*)theme_)->getRemoteTheme()->sqlGridFrom();
+	}
+
+	string obj = CT + ".c_object_id";
+	string sel, atr, where;
+	bool func = false;
+
+	if(function_ != "NONE")
+	{
+		func = true;
+		atr = "MIN(" + obj + ") as objas, " + function_ + "(" + xField_ + ") as xas, ";
+		atr += function_ + "(" + yField_ + ") as yas, " + function_ + "(" + zField_ + ") as zas ";
+	}
+	else
+		atr = xField_ + ", " + yField_ + ", " + zField_;
+
+
+	if(func == false)
+	{
+		if(selectedObjects_ == TeAll)
+			where = " WHERE (grid_status >= 0 OR (grid_status is null AND c_object_status >= 0))";
+		else if(selectedObjects_ == TeSelectedByQuery)
+			where = " WHERE (grid_status >= 2  OR (grid_status is null AND c_object_status >= 2))";
+		else if(selectedObjects_ == TeNotSelectedByQuery)
+			where = " WHERE (grid_status <> 2 OR (grid_status is null AND c_object_status <> 2))";
+		else if(selectedObjects_ == TeGrouped)
+			where = " WHERE ((c_legend_id <> 0) AND (grid_status >= 0 OR (grid_status is null AND c_object_status >= 0)))";
+		else if(selectedObjects_ == TeNotGrouped)
+			where = " WHERE ((c_legend_id = 0) AND (grid_status >= 0 OR (grid_status is null AND c_object_status >= 0)))";
+	}
+	else
+	{
+		if(selectedObjects_ == TeAll)
+			where = " WHERE (c_object_status >= 0)";
+		else if(selectedObjects_ == TeSelectedByQuery)
+			where = " WHERE (c_object_status >= 2)";
+		else if(selectedObjects_ == TeNotSelectedByQuery)
+			where = " WHERE (c_object_status <> 2)";
+		else if(selectedObjects_ == TeGrouped)
+			where = " WHERE (c_legend_id <> 0 AND c_object_status >= 0)";
+		else if(selectedObjects_ == TeNotGrouped)
+			where = " WHERE (c_legend_id = 0 AND c_object_status >= 0)";
+	}
+
+	set<string> uniqueIdSet, objectIdSet;
+	TeDatabasePortal *portal = db_->getPortal();
+	if(theme_->type() == TeTHEME)
+	{
+		if(func)
+		{
+			sel = "SELECT objas, xas, yas, zas FROM (SELECT " + atr + from;
+			sel += where + " GROUP BY " + CT + ".c_object_id)";
+			sel += " WHERE ";
+			sel += "xas > " + xmin + " AND ";
+			sel += "xas < " + xmax + " AND ";
+			sel += "yas > " + ymin + " AND ";
+			sel += "yas < " + ymax + " AND ";
+			sel += "zas > " + zmin + " AND ";
+			sel += "zas < " + zmax;
+		}
+		else
+		{
+			sel = "SELECT " + CA + ".unique_id, " + CT + ".c_object_id, " + atr + from;
+			sel += where + " AND ";
+
+			sel += xField_ + " > " + xmin + " AND ";
+			sel += xField_ + " < " + xmax + " AND ";
+			sel += yField_ + " > " + ymin + " AND ";
+			sel += yField_ + " < " + ymax + " AND ";
+			sel += zField_ + " > " + zmin + " AND ";
+			sel += zField_ + " < " + zmax;
+		}
+
+		string val;
+		if(portal->query(sel))
+		{
+			while(portal->fetchRow())
+			{
+				if(func)
+						objectIdSet.insert(portal->getData(0));
+				else
+				{
+					val = portal->getData(0);
+					if(val.empty())
+						objectIdSet.insert(portal->getData(1));
+					else
+						uniqueIdSet.insert(val);
+				}
+			}
+		}
+	}
+	else if(theme_->type() == TeEXTERNALTHEME)
+	{
+		vector<string> sv = generateItemsInClauseVec(theme_, where);
+		vector<string>::iterator it;
+		string val;
+
+		for(it=sv.begin(); it!=sv.end(); ++it)
+		{
+			if(func)
+			{
+				sel = "SELECT objas, xas, yas, zas FROM (SELECT " + atr + from;
+				sel += " WHERE " + CA + ".unique_id IN " + *it;
+				sel += " GROUP BY " + CT + ".c_object_id)";
+				sel += " WHERE ";
+				sel += "xas > " + xmin + " AND ";
+				sel += "xas < " + xmax + " AND ";
+				sel += "yas > " + ymin + " AND ";
+				sel += "yas < " + ymax + " AND ";
+				sel += "zas > " + zmin + " AND ";
+				sel += "zas < " + zmax;
+			}
+			else
+			{
+				sel = "SELECT " + CA + ".unique_id, " + CT + ".c_object_id, " + atr + from;
+				sel += " WHERE " + CA + ".unique_id IN " + *it;
+				sel += " AND ";
+				sel += xField_ + " > " + xmin + " AND ";
+				sel += xField_ + " < " + xmax + " AND ";
+				sel += yField_ + " > " + ymin + " AND ";
+				sel += yField_ + " < " + ymax + " AND ";
+				sel += zField_ + " > " + zmin + " AND ";
+				sel += zField_ + " < " + zmax;
+			}
+
+			if(portal->query(sel))
+			{
+				while(portal->fetchRow())
+				{
+					if(func)
+							objectIdSet.insert(portal->getData(0));
+					else
+					{
+						val = portal->getData(0);
+						if(val.empty())
+							objectIdSet.insert(portal->getData(1));
+						else
+							uniqueIdSet.insert(val);
+					}
+				}
+			}
+			portal->freeResult();
+		}
+	}
+	delete portal;
+
+	if(addSelection_)
+		grid_->putColorOnGrid(uniqueIdSet, objectIdSet, "addPointing");
+	else
+		grid_->putColorOnGrid(uniqueIdSet, objectIdSet, "newPointing");
+}
+
+void TeQtGLWidget::setXRotation( int degrees )
+{
+	int graus = 360 * degrees / 99;
+    xRot_ = (GLfloat)(graus % 360);
+    updateGL();
+}
+
+void TeQtGLWidget::setYRotation( int degrees )
+{
+	int graus = 360 * degrees / 99;
+    yRot_ = (GLfloat)(graus % 360);
+    updateGL();
+}
+
+void TeQtGLWidget::setZRotation( int degrees )
+{
+	int graus = 360 * degrees / 99;
+    zRot_ = (GLfloat)(graus % 360);
+    updateGL();
+}
+
+void TeQtGLWidget::setXOffset( int offset )
+{
+	xOff_ = 2. * (double)offset / 99. - 1.;
+	if((xSize_ + xOff_) > 1.)
+	{
+		xOff_ = 1. - xSize_;
+		int newOffset = TeRound((xOff_ + 1.) * 99. / 2.);
+		emit setXOffsetSignal(newOffset);
+	}
+    updateGL();
+	paint2D();
+}
+
+void TeQtGLWidget::setYOffset( int offset )
+{
+	yOff_ = 2. * (double)offset / 99. - 1.;
+	if((ySize_ + yOff_) > 1.)
+	{
+		yOff_ = 1. - ySize_;
+		int newOffset = TeRound((yOff_ + 1.) * 99. / 2.);
+		emit setYOffsetSignal(newOffset);
+	}
+    updateGL();
+	paint2D();
+}
+
+void TeQtGLWidget::setZOffset( int offset )
+{
+	zOff_ = 2. * (double)offset / 99. - 1.;
+	if((zSize_ + zOff_) > 1.)
+	{
+		zOff_ = 1. - zSize_;
+		int newOffset = TeRound((zOff_ + 1.) * 99. / 2.);
+		emit setZOffsetSignal(newOffset);
+	}
+    updateGL();
+	paint2D();
+}
+
+
+void TeQtGLWidget::setXSize( int size )
+{
+	xSize_ = 2. * (double)size / 99.;
+	if((xSize_ + xOff_) > 1.)
+	{
+		xSize_ = 1. - xOff_;
+		int newSize = TeRound(xSize_ * 99. / 2.);
+		emit setXSizeSignal(newSize);
+	}
+    updateGL();
+	paint2D();
+}
+
+void TeQtGLWidget::setYSize( int size )
+{
+	ySize_ = 2. * (double)size / 99.;
+	if((ySize_ + yOff_) > 1.)
+	{
+		ySize_ = 1. - yOff_;
+		int newSize = TeRound(ySize_ * 99. / 2.);
+		emit setYSizeSignal(newSize);
+	}
+    updateGL();
+	paint2D();
+}
+
+void TeQtGLWidget::setZSize( int size )
+{
+	zSize_ = 2. * (double)size / 99.;
+	if((zSize_ + zOff_) > 1.)
+	{
+		zSize_ = 1. - zOff_;
+		int newSize = TeRound(zSize_ * 99. / 2.);
+		emit setZSizeSignal(newSize);
+	}
+    updateGL();
+	paint2D();
+}
+
+void TeQtGLWidget::setViewAngle( int a )
+{
+	viewAngle_ = 120. - (double)a;
+    updateGL();
+}
+
+void TeQtGLWidget::setLightingMode( int )
+{
+	frontLighting_ = !frontLighting_;
+    updateGL();
+}
+
+void TeQtGLWidget::mousePressEvent(QMouseEvent* e)
+{
+	mousePosition_ = e->pos();
+}
+
+void TeQtGLWidget::mouseMoveEvent(QMouseEvent* e)
+{
+	if(e->state() == Qt::NoButton)
+		return;
+
+	QPoint p = e->pos();
+	double w = (double)width();
+	double h = (double)height();
+	double dx = (double)(p.x() - mousePosition_.x());
+	double dy = (double)(mousePosition_.y() - p.y());
+
+	if(fabs(dx) <= 3.)
+		dx = 0.;
+	if(fabs(dy) <= 3.)
+		dy = 0.;
+	if(dx == 0. && dy == 0.)
+		return;
+
+	dx = dx * viewAngle_ / 40.;
+	dy = dy * viewAngle_ / 40.;
+
+	if(keyPress_ == 0)
+	{
+		if(e->state() == Qt::LeftButton)  // translation
+		{
+			xTranslation_ += 2. * (dx / w);
+			yTranslation_ += 2. * (dy / h);
+		}
+		else if(e->state() == (Qt::LeftButton | Qt::AltButton))// x and y and z rotation
+		{
+			xRot_ += dx;
+			if(xRot_ > 360.)
+				xRot_ = xRot_ - 360.;
+			else if(xRot_ < 0.)
+				xRot_ = 360. + xRot_;
+			emit setXRotationSignal(int(xRot_));
+	
+			yRot_ += dy;
+			if(yRot_ > 360.)
+				yRot_ = yRot_ - 360.;
+			else if(yRot_ < 0.)
+				yRot_ = 360. + yRot_;
+			emit setYRotationSignal(int(yRot_));
+
+			zRot_ += (dx+dy);
+			if(zRot_ > 360.)
+				zRot_ = zRot_ - 360.;
+			else if(zRot_ < 0.)
+				zRot_ = 360. + zRot_;
+			emit setZRotationSignal(int(zRot_));
+		}
+		else if(e->state() == Qt::MidButton) // zoom
+		{
+			viewAngle_ += dy;
+			if(viewAngle_ < 1.)
+				viewAngle_ = 1;
+			else if(viewAngle_ > 120.)
+				viewAngle_ = 120.;
+
+			int a = (int)(120. - viewAngle_);
+			emit setZoomSignal(a);
+		}
+	}
+	else if(keyPress_ == Qt::Key_X)
+	{
+		xRot_ += dy;
+		if(xRot_ > 360.)
+			xRot_ = xRot_ - 360.;
+		else if(xRot_ < 0.)
+			xRot_ = 360. + xRot_;
+		emit setXRotationSignal(int(xRot_));
+	}
+	else if(keyPress_ == Qt::Key_Y)
+	{
+		yRot_ += dy;
+		if(yRot_ > 360.)
+			yRot_ = yRot_ - 360.;
+		else if(yRot_ < 0.)
+			yRot_ = 360. + yRot_;
+		emit setYRotationSignal(int(yRot_));
+	}
+	else if(keyPress_ == Qt::Key_Z)
+	{
+		zRot_ += dy;
+		if(zRot_ > 360.)
+			zRot_ = zRot_ - 360.;
+		else if(zRot_ < 0.)
+			zRot_ = 360. + zRot_;
+		emit setZRotationSignal(int(zRot_));
+	}
+
+	mousePosition_ = p;
+    updateGL();
+}
+
+void TeQtGLWidget::mouseReleaseEvent(QMouseEvent*)
+{
+}
+
+void TeQtGLWidget::keyPressEvent(QKeyEvent* e)
+{
+	keyPress_ = e->key();
+	if(keyPress_ == Qt::Key_Shift || keyPress_ == Qt::Key_Control || keyPress_ == Qt::Key_Alt)
+		keyPress_ = 0;
+
+	if(keyPress_ == Qt::Key_R)
+	{
+		viewAngle_ = 60.;
+		xTranslation_ = 0.;
+		yTranslation_ = 0.;
+		zTranslation_ = -3.5;
+		xRot_ = yRot_ = zRot_ = 0;
+		emit setXRotationSignal(int(xRot_));
+		emit setYRotationSignal(int(yRot_));
+		emit setZRotationSignal(int(zRot_));
+	}
+}
+
+void TeQtGLWidget::keyReleaseEvent(QKeyEvent*)
+{
+	keyPress_ = 0;
+}
+
+void TeQtGLWidget::draw2DPixmaps()
+{
+	QRect r = ((QFrame*)(xyDevice_))->rect();
+	xyPixmap_.resize(r.width(), r.height());
+	zxPixmap_.resize(r.width(), r.height());
+	yzPixmap_.resize(r.width(), r.height());
+	xyPixmap_.fill(QColor(Qt::black));
+	zxPixmap_.fill(QColor(Qt::black));
+	yzPixmap_.fill(QColor(Qt::black));
+
+	QPainter xyPainter(&xyPixmap_);
+	QPainter zxPainter(&zxPixmap_);
+	QPainter yzPainter(&yzPixmap_);
+	QFont font;
+	int fsize = 10;
+	font.setPointSize(10);
+	font.setBold(true);
+	xyPainter.setFont(font);
+	zxPainter.setFont(font);
+	yzPainter.setFont(font);
+	QPen pen(QColor(red), 2);
+
+	double width = (double)r.width();
+	double w = max_ - min_;
+
+	xyPainter.setPen(pen);
+	xyPainter.drawLine(0, (int)(width - 1), (int)(width - 1), (int)(width - 1));
+	xyPainter.drawText((int)(width - fsize - 2), (int)(width - 5), "X");
+	pen.setColor(QColor(green));
+	xyPainter.setPen(pen);
+	xyPainter.drawLine(0, 0, 0, (int)(width - 1));
+	xyPainter.drawText(4, fsize + 3, "Y");
+
+	pen.setColor(QColor(blue));
+	zxPainter.setPen(pen);
+	zxPainter.drawLine(0, (int)(width - 1), (int)(width - 1), (int)(width - 1));
+	zxPainter.drawText((int)(width - fsize - 2), (int)(width - 5), "Z");
+	pen.setColor(QColor(red));
+	zxPainter.setPen(pen);
+	zxPainter.drawLine(0, 0, 0, (int)(width - 1));
+	zxPainter.drawText(4, fsize + 3, "X");
+
+	pen.setColor(QColor(green));
+	yzPainter.setPen(pen);
+	yzPainter.drawLine(0, (int)(width - 1), (int)(width - 1), (int)(width - 1));
+	yzPainter.drawText((int)(width - fsize - 2), (int)(width - 5), "Y");
+	pen.setColor(QColor(blue));
+	yzPainter.setPen(pen);
+	yzPainter.drawLine(0, 0, 0, (int)(width - 1));
+	yzPainter.drawText(4, fsize + 3, "Z");
+
+	int i, size = (int)xVec_.size();
+	double	v;
+	int	x, y, z;
+	QPointArray xypa(size);
+	QPointArray zxpa(size);
+	QPointArray yzpa(size);
+
+	pen.setColor(defaultColor_);
+	pen.setWidth(5);
+	xyPainter.setPen(pen);
+	zxPainter.setPen(pen);
+	yzPainter.setPen(pen);
+	for(i=0; i<size; ++i)
+	{
+		v = xVec_[i];
+		x = TeRound(width * (v - min_) / w);
+		v = yVec_[i];
+		y = TeRound(width * (v - min_) / w);
+		v = zVec_[i];
+		z = TeRound(width * (v - min_) / w);
+
+		// the vertical axis must be inverted
+		xypa.setPoint(i, x, (int)(width - y));
+		zxpa.setPoint(i, z, (int)(width - x));
+		yzpa.setPoint(i, y, (int)(width - z));
+	}
+	xyPainter.drawPoints(xypa, 0, selIni_);
+	zxPainter.drawPoints(zxpa, 0, selIni_);
+	yzPainter.drawPoints(yzpa, 0, selIni_);
+
+	pen.setColor(pointingColor_);
+	xyPainter.setPen(pen);
+	zxPainter.setPen(pen);
+	yzPainter.setPen(pen);
+
+	xyPainter.drawPoints(xypa, selIni_);
+	zxPainter.drawPoints(zxpa, selIni_);
+	yzPainter.drawPoints(yzpa, selIni_);
+}
+
+void TeQtGLWidget::paint2D()
+{
+	QPainter xyPainter(xyDevice_);
+	QPainter zxPainter(zxDevice_);
+	QPainter yzPainter(yzDevice_);
+	QPen pen(QColor(magenta), 1);
+	xyPainter.setPen(pen);
+	zxPainter.setPen(pen);
+	yzPainter.setPen(pen);
+	QRect r = xyPainter.viewport();
+
+	double width = (double)r.width();
+	double w = max_ - min_;
+	double ww = w / 2.;
+	double	v;
+	int	x1, x2, y1, y2, z1, z2;
+
+	bitBlt(xyDevice_, 0, 0, &xyPixmap_, 0, 0, (int)width, (int)width, Qt::CopyROP);
+	bitBlt(zxDevice_, 0, 0, &zxPixmap_, 0, 0, (int)width, (int)width, Qt::CopyROP);
+	bitBlt(yzDevice_, 0, 0, &yzPixmap_, 0, 0, (int)width, (int)width, Qt::CopyROP);
+
+	v = (xOff_ + 1.) * ww + min_;
+	x1 = TeRound(width * (v - min_) / w);
+	v = (yOff_ + 1.) * ww + min_;
+	y1 = TeRound(width * (v - min_) / w);
+	v = (xOff_ + xSize_ + 1.) * ww + min_;
+	x2 = TeRound(width * (v - min_) / w);
+	v = (yOff_ + ySize_ + 1.) * ww + min_;
+	y2 = TeRound(width * (v - min_) / w);
+	v = (zOff_ + 1.) * ww + min_;
+	z1 = TeRound(width * (v - min_) / w);
+	v = (zOff_ + zSize_ + 1.) * ww + min_;
+	z2 = TeRound(width * (v - min_) / w);
+
+	// the vertical axis must be inverted
+	xyPainter.drawRect(x1, (int)(width - y1 - (y2 - y1)), x2 - x1, y2 - y1);
+	zxPainter.drawRect(z1, (int)(width - x1 - (x2 - x1)), z2 - z1, x2 - x1);
+	yzPainter.drawRect(y1, (int)(width - z1 - (z2 - z1)), y2 - y1, z2 - z1);
+
+	xyPainter.flush();
+	zxPainter.flush();
+	yzPainter.flush();
+}
+
+void TeQtGLWidget::xOffsetReleased()
+{
+	drawSelecteds();
+}
+
+void TeQtGLWidget::yOffsetReleased()
+{
+	drawSelecteds();
+}
+
+void TeQtGLWidget::zOffsetReleased()
+{
+	drawSelecteds();
+}
+
+void TeQtGLWidget::xSizeReleased()
+{
+	drawSelecteds();
+}
+
+void TeQtGLWidget::ySizeReleased()
+{
+	drawSelecteds();
+}
+
+void TeQtGLWidget::zSizeReleased()
+{
+	drawSelecteds();
+}
+
+void TeQtGLWidget::drawSelecteds()
+{
+	selectFromHexaedro();
+	getValues();
+	draw2DPixmaps();
+	paint2D();
+	updateGL();
+}
+
+void TeQtGLWidget::getCubeCoordinate(double& x1, double& y1, double& z1, double& x2, double& y2, double& z2)
+{
+	double w = max_ - min_;
+	double ww = w / 2.;
+
+	x1 = (xOff_ + 1.) * ww + min_;
+	y1 = (yOff_ + 1.) * ww + min_;
+	z1 = (zOff_ + 1.) * ww + min_;
+	x2 = (xOff_ + xSize_ + 1.) * ww + min_;
+	y2 = (yOff_ + ySize_ + 1.) * ww + min_;
+	z2 = (zOff_ + zSize_ + 1.) * ww + min_;
+}
+
+void TeQtGLWidget::paint3D()
+{
+	updateGL();
+}
+
+void TeQtGLWidget::changeFunction(string function)
+{
+	function_ = function;
+	initGLObject();
+}
+
+void TeQtGLWidget::changeInputObjects(int v)
+{
+	selectedObjects_ = v;
+	initGLObject();
+}
+
+void TeQtGLWidget::changeQuality(int v)
+{
+	quality_ = TeRound(30. * (double)v / 99.) + 6;
+	initGLObject();
+}
+
+void TeQtGLWidget::updateSelection()
+{
+	getValues();
+	draw2DPixmaps();
+	paint2D();
+	updateGL();
+	addSelection_ = false;
+}
+
+void TeQtGLWidget::initGLObject()
+{
+	makeObject();
+	updateGL();
+}
+
+void TeQtGLWidget::deleteGLObject()
+{
+	int i, size = (int)ballVec_.size();
+
+	makeCurrent();
+	for(i=0; i<size; ++i)
+		glDeleteLists( ballVec_[i], 1 );
+	ballVec_.clear();
+	glDeleteLists (cone_, 1);
+}
diff --git a/src/terralib/drivers/qt/TeQtGLWidget.h b/src/terralib/drivers/qt/TeQtGLWidget.h
new file mode 100755
index 0000000..404a358
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtGLWidget.h
@@ -0,0 +1,151 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+
+#ifndef  __TERRALIB_INTERNAL_QTGLBOX_H
+#define  __TERRALIB_INTERNAL_QTGLBOX_H
+
+#include <qgl.h>
+#include <qpixmap.h>
+#include <TeDataTypes.h>
+#include <vector>
+using namespace std;
+
+class TeTheme;
+class TeDatabase;
+class TeQtGrid;
+
+class TeQtGLWidget : public QGLWidget
+{
+    Q_OBJECT
+
+public:
+
+    TeQtGLWidget( QWidget* parent, const char* name, TeQtGrid* grid, string xField, string yField, string zField, QPaintDevice* xy, QPaintDevice* xz, QPaintDevice* yz, int selectedObjects = TeAll, string func = "NONE");
+    ~TeQtGLWidget();
+	void drawAxis(bool b) {drawAxis_ = b; updateGL();}
+
+    GLfloat xRot_, yRot_, zRot_;
+	GLfloat xTranslation_, yTranslation_, zTranslation_;
+	GLfloat viewAngle_;
+	GLfloat xOff_, yOff_, zOff_;
+	GLfloat xSize_, ySize_, zSize_;
+	string xField_, yField_, zField_;
+	bool frontLighting_;
+	bool addSelection_;
+	TeTheme* theme_;
+	TeDatabase* db_;
+
+public slots:
+
+	// the values of degrees, offset, size, translation and angle are between 0 - 99.
+	// therefore it shoud be conveted to adequate value
+	
+    void	setXRotation( int degrees );
+    void	setYRotation( int degrees );
+    void	setZRotation( int degrees );
+
+    void	setXOffset( int offset );
+    void	setYOffset( int offset );
+    void	setZOffset( int offset );
+
+    void	setXSize( int size );
+    void	setYSize( int size );
+    void	setZSize( int size );
+
+    void	xOffsetReleased();
+    void	yOffsetReleased();
+    void	zOffsetReleased();
+
+    void	xSizeReleased();
+    void	ySizeReleased();
+    void	zSizeReleased();
+
+    void	setViewAngle( int angle );
+
+    void	setLightingMode( int m );
+
+	void	paint2D();
+	void	paint3D();
+	void	getCubeCoordinate(double& x1, double& y1, double& z1, double& x2, double& y2, double& z2);
+	void	drawSelecteds();
+	void	changeFunction(string function);
+	void	changeInputObjects(int v);
+	void	changeQuality(int v);
+	void	updateSelection();
+	void	deleteGLObject();
+	void	initGLObject();
+
+protected:
+
+    void	initializeGL();
+    void	paintGL();
+    void	resizeGL( int w, int h );
+	void	mousePressEvent(QMouseEvent*);
+	void	mouseMoveEvent(QMouseEvent*);
+	void	mouseReleaseEvent(QMouseEvent*);
+	void	keyPressEvent(QKeyEvent*);
+	void	keyReleaseEvent(QKeyEvent*);
+	void	draw2DPixmaps();
+    void	makeObject();
+	void	getValues();
+	void	selectFromHexaedro();
+
+signals:
+	void setXOffsetSignal(int);
+	void setYOffsetSignal(int);
+	void setZOffsetSignal(int);
+	void setXSizeSignal(int);
+	void setYSizeSignal(int);
+	void setZSizeSignal(int);
+	void setXRotationSignal(int);
+	void setYRotationSignal(int);
+	void setZRotationSignal(int);
+	void setZoomSignal(int);
+
+
+private:
+
+	int selIni_;
+	int quality_;
+	GLuint cone_;
+	vector<GLuint> ballVec_;
+	vector<string> idVec_;
+	map<string, GLuint> ballMap_;
+	GLfloat scale_;
+	GLfloat min_, max_;
+	QPoint mousePosition_;
+	vector<double> xVec_, yVec_, zVec_;
+	bool drawAxis_;
+	bool drawSelecteds_;
+	QPaintDevice *xyDevice_, *zxDevice_, *yzDevice_;
+	QPixmap xyPixmap_, zxPixmap_, yzPixmap_;
+	QColor defaultColor_;
+	QColor pointingColor_;
+	string function_;
+	int selectedObjects_;
+	TeQtGrid* grid_;
+	int	keyPress_;
+};
+
+
+#endif // __TERRALIB_INTERNAL_QTGLBOX_H
diff --git a/src/terralib/application/qt/TeQtGraph.cpp b/src/terralib/drivers/qt/TeQtGraph.cpp
old mode 100644
new mode 100755
similarity index 100%
rename from src/terralib/application/qt/TeQtGraph.cpp
rename to src/terralib/drivers/qt/TeQtGraph.cpp
diff --git a/src/terralib/application/qt/TeQtGraph.h b/src/terralib/drivers/qt/TeQtGraph.h
old mode 100644
new mode 100755
similarity index 100%
rename from src/terralib/application/qt/TeQtGraph.h
rename to src/terralib/drivers/qt/TeQtGraph.h
diff --git a/src/terralib/drivers/qt/TeQtGrid.cpp b/src/terralib/drivers/qt/TeQtGrid.cpp
new file mode 100755
index 0000000..e8e9f0e
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtGrid.cpp
@@ -0,0 +1,2941 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+************************************************************************************/
+#include "TeQtGrid.h"
+#include "TeWaitCursor.h"
+#include "TeApplicationUtils.h"
+#include "TeExternalTheme.h"
+#include <qtable.h>
+#include <qcolordialog.h>
+#include <qmessagebox.h>
+#include <qapplication.h>
+#include <qdragobject.h>
+#include <algorithm>
+
+TeQtGrid::TeQtGrid(QWidget* parent, const char* name)
+	: QTable(parent, name)
+{
+	autoPromote_ = true;
+	gridX_ = -1;
+	gridY_ = -1;
+	iLine_ = -1;
+	fLine_ = -1;
+	iCol_ = -1;
+	fCol_ = -1;
+	gridWidth_  = -1;
+	gridHeight_ = -1;
+	portal_ = 0;
+	theme_ = NULL;
+	doRepaint_ = true;
+	doRefresh_ = false;
+	shiftKeyPressed_ = false;
+	lastLinePressed_ = -1;
+	verticalEdition_ = true;
+	rowToEdit_ = -1;
+	colToEdit_ = -1;
+	editing_ = false;
+	showGridInformation_ = true;
+	columnDragEnabled_ = false;
+	mousePressedOnHorizontalHeader_ = false;
+
+	setNumCols(0);
+	setNumRows(0);
+	setSelectionMode(QTable::Multi);
+
+	popupHorizHeader_ = new QPopupMenu;
+	popupVertHeader_ = new QPopupMenu;
+	popupViewport_ = new QPopupMenu;
+
+	horizontalHeader()->setAcceptDrops(true);
+
+	verticalHeader()->installEventFilter(this);
+	horizontalHeader()->installEventFilter(this);
+
+    connect(verticalHeader(), SIGNAL(released(int)),
+	     this, SLOT(mouseReleasedOnVerticalHeaderSlot(int))); // NOTE: QT send the pressed position in your argument
+
+	verticalHeader()->setResizeEnabled(false);
+}
+
+
+TeQtGrid::~TeQtGrid()
+{
+	if (portal_)
+	{
+		portal_->freeResult();
+		delete portal_;
+		portal_ = 0;
+	}
+	if (popupHorizHeader_)
+		delete popupHorizHeader_;
+	if (popupVertHeader_)
+		delete popupVertHeader_;
+	if (popupViewport_)
+		delete popupViewport_;
+}
+
+
+void TeQtGrid::init (TeAppTheme *appTheme)
+{
+	int i, j, numRows, nCols, gs;
+	int collectionNumCols = 0;
+	char buf[20];
+	string oid, uid;
+	hide();
+	clear();
+
+	if ((appTheme == 0) || (appTheme->getTheme()->type() > 2))
+		return;
+
+	TeAttrTableVector attrTables; 
+	
+	TeTheme* theme = appTheme->getSourceTheme();
+	if (theme == 0)
+		return;
+	theme->getAttTables(attrTables);
+	if (attrTables.size() == 0)
+		return;
+
+	TeWaitCursor wait;
+
+	theme_ = appTheme;
+	CT_ = theme->collectionTable();
+	CTE_ = theme->collectionAuxTable();
+	db_ = theme->layer()->database();
+	sqlJoin_ = theme->sqlGridJoin();
+
+	// Mount the vector of indexes (indexName_) from the tables
+	theme->getAttTables(tableVector_);
+	for (i = 0; i < (int)tableVector_.size(); ++i)
+	{
+		TeTable t = tableVector_[i];
+		if(t.tableType() == TeAttrStatic || t.tableType() == TeAttrEvent)
+		{
+			if(tableVector_[i].linkName().empty())
+				indexVector_.push_back(tableVector_[i].name() + "." + tableVector_[i].uniqueName());
+			else
+				indexVector_.push_back(tableVector_[i].name() + "." + tableVector_[i].linkName());
+		}
+		else if(t.tableType() != TeAttrExternal)
+		{
+			if(tableVector_[i].uniqueName().empty() == false)
+				indexVector_.push_back(tableVector_[i].name() + "." + tableVector_[i].uniqueName());
+			if(tableVector_[i].linkName().empty() == false)
+				indexVector_.push_back(tableVector_[i].name() + "." + tableVector_[i].linkName());
+		}
+		else
+		{
+			if(tableVector_[i].uniqueName().empty() == false)
+				indexVector_.push_back(tableVector_[i].name() + "." + tableVector_[i].uniqueName());
+			if(tableVector_[i].linkName().empty() == false)
+				indexVector_.push_back(tableVector_[i].name() + "." + tableVector_[i].linkName());
+			if(tableVector_[i].relatedAttribute().empty() == false)
+				indexVector_.push_back(tableVector_[i].relatedTableName() + "." + tableVector_[i].relatedAttribute());
+		}
+	}
+
+	TeAttributeList collAttrList;
+	db_->getAttributeList(CT_, collAttrList);
+	collectionNumCols = collAttrList.size();
+
+	if (portal_)
+	{
+		portal_->freeResult();
+		delete portal_;
+	}
+	portal_= db_->getPortal();
+
+	//read the objects and their legends
+	//from the collection table
+	orderBy_ = CTE_ + ".unique_id ";
+	sql_ = sqlJoin_ + " ORDER BY " + orderBy_ + "ASC ";
+	if (!portal_->query(sql_))
+	{
+		portal_->freeResult();
+		delete portal_;
+		portal_ = 0;
+		wait.resetWaitCursor();
+		return;
+	}
+
+	TeAttributeList extAttList;
+	db_->getAttributeList(CTE_, extAttList);
+
+	TeAttributeList& attrList = portal_->getAttributeList();
+	TeAttributeList::iterator it = attrList.begin();
+	int index = 0;
+	while(it!=attrList.end())
+	{
+		if(TeConvertToUpperCase((*it).rep_.name_)== TeConvertToUpperCase(CTE_+".unique_id"))
+			uniqueIdPos_ = index;
+		else if (TeConvertToUpperCase((*it).rep_.name_)== "UNIQUE_ID")
+			uniqueIdPos_ = index;
+		else if(TeConvertToUpperCase((*it).rep_.name_)== TeConvertToUpperCase(CTE_+".grid_status"))
+			gridStatusPos_ = index;
+		else if(TeConvertToUpperCase((*it).rep_.name_)== "GRID_STATUS")
+			gridStatusPos_ = index;
+		++it;
+		++index;
+	}
+
+	objectIdPos_ = attrList.size() - extAttList.size() - 6;
+	resultIdPos_ = attrList.size() - extAttList.size() - 1;
+	i = 0;
+	int status;
+	while (portal_->fetchRow())
+	{
+		uid = portal_->getData(uniqueIdPos_);
+		oid = portal_->getData(objectIdPos_);
+
+		//if(theme->getProductId() != TeEXTERNALTHEME)
+		if(appTheme->getTheme()->getProductId() == TeTHEME)
+		{
+			gs = atoi(portal_->getData(gridStatusPos_));
+			status = portal_->getInt(resultIdPos_);
+		}
+		else if(appTheme->getTheme()->getProductId() == TeEXTERNALTHEME)
+		{
+			std::map<std::string, int >::iterator it = theme_->getTheme()->getItemStatusMap().find(uid);
+			if( it != theme_->getTheme()->getItemStatusMap().end())
+				gs = it->second; 
+			else
+				gs = 0;
+
+			//std::map<std::string, int>::iterator it2 = theme_->getTheme()->getObjLegendMap().find(oid);
+			//if( it2 != theme_->getTheme()->getObjLegendMap().end())
+			std::map<std::string, int>::iterator it2 = theme_->getTheme()->getObjStatusMap().find(oid);
+			if( it2 != theme_->getTheme()->getObjStatusMap().end())
+				status = it->second;
+			else
+				status = 0;
+		}
+	
+		if(uid.empty())
+		{
+			unique2ObjectMap_[oid] = oid;
+			ObjectInfo	info;
+			info.status_ = status;
+			objectMap_[oid] = info;
+			portalRow2UniqueIdVector_.push_back(oid);
+		}
+		else
+		{
+			unique2ObjectMap_[uid] = oid;
+
+			if(objectMap_.find(oid) == objectMap_.end())
+			{
+				ObjectInfo	info;
+				info.uniqueMap_[uid] = gs;
+				info.status_ = status;
+				objectMap_[oid] = info;
+			}
+			else
+			{
+				objectMap_[oid].uniqueMap_[uid] = gs;
+
+				if(objectMap_[oid].status_ == 0 && gs > 0)
+					objectMap_[oid].status_ = gs;
+				else if(objectMap_[oid].status_ == 1 && gs == 2)
+					objectMap_[oid].status_ = 3;
+				else if(objectMap_[oid].status_ == 2 && gs == 1)
+					objectMap_[oid].status_ = 3;
+			}
+			portalRow2UniqueIdVector_.push_back(uid);
+		}
+		gridToPortalRowVector_.push_back(i);
+		++i;
+	}
+	numRows = i;
+	
+	//get the column names
+
+	nCols = theme->sqlAttList().size();
+	vector<string> colNamesVector;
+	for (j = 0; j < nCols; ++j)
+		colNamesVector.push_back(theme->sqlAttList()[j].rep_.name_);
+
+	doRepaint_ = false; // don�t repaint
+	setNumRows(numRows);
+	setNumCols(nCols);
+
+	for (i = 0; i < nCols; ++i)
+		horizontalHeader()->setLabel(i, colNamesVector[i].c_str());
+
+	// Set the vector that will contain the order the
+	// grid columns will be shown
+	for (i = 0; i < nCols; i++)
+	{
+		gridToPortalColVector_.push_back(i);
+		gridColVisVector_.push_back(true);
+	}
+
+	// Set the minimum width of the vertical header of the grid
+	sprintf(buf, "%d", numRows);
+	int minw = strlen(buf) + 1;
+	if (minw < 3)
+		minw = 3;
+	verticalHeader()->setMinimumWidth(minw*9); // supposing char width of 9 pixels
+	setLeftMargin(minw*9);
+
+
+	doRepaint_ = true; // do repaint
+	doRefresh_ = true; // do refresh
+
+	refresh();
+	int visibleCols = 0;
+	int scVal = horizontalScrollBar()->value();
+	for(i=0; i<numCols(); i++)
+	{
+		if(visibleWidth() < columnPos(i) - scVal)
+			break;
+		visibleCols++;
+	}
+
+	for (i = 0; i < visibleCols; ++i)
+		adjustColumn(i);
+	refresh();
+	emit gridChangedSignal();
+	show();
+	gridInformation();
+}
+
+
+void TeQtGrid::initPortal()
+{
+	TeWaitCursor wait;
+
+	int i, j;
+	int nCols = numCols();
+
+	doRepaint_ = false; // do not repaint
+
+	for (j = 0; j < nCols; ++j)
+		horizontalHeader()->removeLabel(j);
+
+	TeAttributeList collAttrList;
+	db_->getAttributeList(CT_, collAttrList);
+
+	portal_= db_->getPortal();
+
+	//read the objects and their legends
+	//from the collection table
+	if (!portal_->query(sql_))
+	{
+		portal_->freeResult();
+		delete portal_;
+		portal_ = 0;
+		wait.resetWaitCursor();
+		return;
+	}
+
+	TeAttrTableVector cTableVec = tableVector_;
+	tableVector_.clear();
+	
+	TeTheme* theme = theme_->getSourceTheme();
+	if (theme == 0)
+		return;
+	theme->getAttTables(tableVector_);
+
+	TeAttributeList extAttList;
+	db_->getAttributeList(CTE_, extAttList);
+
+	TeAttributeList& attrList = portal_->getAttributeList();
+	uniqueIdPos_ = attrList.size() - 2;
+	objectIdPos_ = attrList.size() - extAttList.size() - 6;
+	gridStatusPos_ = attrList.size() - 1;
+	resultIdPos_ = attrList.size() - extAttList.size() - 1;
+	
+	//get the column names
+	nCols = theme->sqlAttList().size();
+	vector<string> colNamesVector;
+	for (j = 0; j < nCols; ++j)
+		colNamesVector.push_back(theme->sqlAttList()[j].rep_.name_);
+
+	setNumCols(nCols);
+
+	arrangeColumns(cTableVec);	
+	for(i=0; (unsigned int)i<gridColVisVector_.size(); i++)
+		showColumn(i);
+
+	for (i = 0; i < nCols; ++i)
+	{
+		j = gridToPortalColVector_[i];
+		horizontalHeader()->setLabel(i, colNamesVector[j].c_str());
+	}
+	doRepaint_ = true; // do repaint
+	doRefresh_ = true; // do refresh
+
+	for(i=0; (unsigned int)i<gridColVisVector_.size(); i++)
+	{
+		bool b = gridColVisVector_[i];
+		if(b == false)
+			hideColumn(i);
+	}
+	refresh();
+	int visibleCols = 0;
+	int scVal = horizontalScrollBar()->value();
+	for(i=0; i<numCols(); i++)
+	{
+		if(visibleWidth() < columnPos(i) - scVal)
+			break;
+		visibleCols++;
+	}
+
+	for (i = 0; i < visibleCols; ++i)
+		adjustColumn(i);
+	refresh();
+	emit gridChangedSignal();
+	show();
+	gridInformation();
+}
+
+void TeQtGrid::updatePortalContents()
+{
+	TeWaitCursor wait;
+
+	if (portal_ == 0)
+	{
+		wait.resetWaitCursor();
+		return;
+	}
+
+	portal_->freeResult();
+
+	if (!portal_->query(sql_))
+	{
+		portal_->freeResult();
+		delete portal_;
+		portal_ = 0;
+	}
+}
+
+void TeQtGrid::clear()
+{
+	gridX_ = -1;
+	gridY_ = -1;
+	iLine_ = -1;
+	fLine_ = -1;
+	iCol_ = -1;
+	fCol_ = -1;
+	gridWidth_  = -1;
+	gridHeight_ = -1;
+	rowToEdit_ = -1;
+	colToEdit_ = -1;
+
+	shiftKeyPressed_ = false;
+	lastLinePressed_ = -1;
+
+	gridToPortalRowVector_.clear();
+	gridToPortalColVector_.clear();
+	objectMap_.clear();
+	unique2ObjectMap_.clear();
+	portalRow2UniqueIdVector_.clear();
+	gridColVisVector_.clear();
+	indexVector_.clear();
+	tableVector_.clear();
+
+	if (portal_)
+	{
+		portal_->freeResult();
+		delete portal_;
+		portal_ = 0;
+	}
+	setNumRows(0);
+	setNumCols(0);
+}
+
+void TeQtGrid::clearPortal()
+{
+	if (portal_)
+	{
+		portal_->freeResult();
+		delete portal_;
+		portal_ = 0;
+	}
+}
+
+
+bool TeQtGrid::eventFilter(QObject *o, QEvent *e)
+{
+	if (doRepaint_ == false) // do not repaint
+		return true; // stop event
+	static int stx, sty;
+
+	if(o == horizontalHeader())
+	{
+		QMouseEvent *m = (QMouseEvent *)e;
+		int gridCol = columnAt(m->x() + contentsX());
+		if(portal_)
+		{
+			TeTable table = findTable(gridCol);
+			QString msg = tr("Table:") + " ";
+			msg += table.name().c_str();
+			if(table.tableType() == TeAttrStatic)
+				msg += " - " + tr("Table type: TeAttrStatic");
+			else if(table.tableType() == TeAttrExternal)
+				msg += "  " + tr("Table type: TeAttrExternal");
+			else if(table.tableType() == TeAttrEvent)
+				msg += " - " + tr("Table type: TeAttrEvent");
+			else if(table.tableType() == TeFixedGeomDynAttr)
+				msg += " - " + tr("Table type: TeFixedGeomDynAttr");
+			else if(table.tableType() == TeDynGeomDynAttr)
+				msg += " - " + tr("Table type: TeDynGeomDynAttr");
+
+			TeAttributeList& AL = portal_->getAttributeList();
+			int pcol = gridToPortalColVector_[gridCol];
+			if(AL.size() > (unsigned int)pcol)
+			{
+				msg += " - " + tr("Column:");
+				msg += " ";
+				msg += AL[pcol].rep_.name_.c_str();
+				if(AL[pcol].rep_.type_ == TeSTRING)
+				{
+					msg += " - " + tr("Column type: TeSTRING");
+					msg += " - " + tr("Num char:");
+					msg += " ";
+					msg += Te2String(AL[pcol].rep_.numChar_).c_str();
+				}
+				else if(AL[pcol].rep_.type_ == TeREAL)
+					msg += "  " + tr("Column type: TeREAL");
+				else if(AL[pcol].rep_.type_ == TeINT)
+					msg += " - " + tr("Column type: TeINT");
+				else if(AL[pcol].rep_.type_ == TeDATETIME)
+					msg += " - " + tr("Column type: TeDATETIME");
+				if(isIndex(pcol))
+					msg += " - " + tr("Column is not editable");
+				else
+					msg += " - " + tr("Column is editable");
+			}
+
+			displayGridInformation(msg);
+		}
+		
+		if (e->type() == QEvent::MouseButtonPress)
+		{
+			stx = sty = -1;
+			if (m->button() == RightButton)
+			{
+				if(gridCol < 0)
+					return false;
+
+				int portalColToPopup = gridToPortalColVector_[gridCol];
+				popupHorizHeader_->move(m->globalPos().x(), m->globalPos().y());
+				emit horizHeaderSignal(portalColToPopup);
+				return true;
+			}
+			if (m->button() == LeftButton)
+			{
+				stx = contentsX();
+				sty = contentsY();
+				if(sty != 0)
+					mousePressedOnHorizontalHeader_ = true;
+				int p = horizontalHeader()->sectionPos(gridCol);
+				int ss = horizontalHeader()->sectionSize(gridCol);
+				int x = m->x() + horizontalHeader()->offset();
+				if(abs(x-p) <= 3 || abs(x-(p+ss)) <= 3)
+					return false;
+				columnDragEnabled_ = true;
+				return false;
+			}
+		}
+		else if(e->type() == QEvent::DragEnter) {
+			QDragEnterEvent *dg = (QDragEnterEvent *)e;
+			dg->accept(QTextDrag::canDecode(dg));
+			return true;
+		}
+		else if(e->type() == QEvent::DragMove) {
+			return true;
+		}
+		else if(e->type() == QEvent::MouseMove) {
+			if (columnDragEnabled_)
+			{
+				columnDragEnabled_ = false;
+				clearSelection(true);
+				setSelectionMode(QTable::NoSelection);
+				string t = "swap:" + Te2String(gridCol);
+				QTextDrag* tDrag = new QTextDrag(t.c_str(), this, "gridswap");
+				tDrag->drag();
+			}
+			return false;
+		}
+		else if(e->type() == QEvent::Drop) {
+			QDragEnterEvent *dg = (QDragEnterEvent *)e;
+			dg->accept(QTextDrag::canDecode(dg));
+			QDropEvent *dp = (QDropEvent *)e;
+
+			QString tx;
+			string dragText;
+			if(QTextDrag::decode(dp, tx))
+				dragText = tx.latin1();
+
+			string fName = dragText;
+			int f = fName.find("-fieldName:");
+			if(f >= 0)
+			{
+				fName = fName.substr(f+strlen("-fieldName:"));
+
+				string table = dragText;
+				table = table.substr(0, f);
+				f = table.find("table:");
+				if(f == 0)
+					table = table.substr(strlen("table:"));
+
+				int col = columnAt(dg->pos().x() + contentsX());
+				string dropName;
+				if (col >= 0)				
+					dropName = horizontalHeader()->label(col).latin1();
+				emit linkTable(table, fName, dropName);
+			}
+			else // swap column
+			{
+//				f = fName.find("swap:", string::npos);
+				f = fName.find("swap:");
+				if(f >= 0)
+				{
+					TeWaitCursor wait;
+					string s = fName;
+					s = s.substr(strlen("swap:"));
+					int col1 = atoi(s.c_str());
+					int col2 = columnAt(dg->pos().x() + contentsX());
+					if(col1 < col2)
+						for(int i=col1; i<col2; i++)
+							swapColumns(i, i+1);
+					else
+						for(int i=col1; i>col2; i--)
+							swapColumns(i, i-1);
+					int w1 = columnWidth(col1);
+					int w2 = columnWidth(col2);
+					setColumnWidth(col1, w2);
+					setColumnWidth(col2, w1);
+					refresh();
+					QPoint p = dg->pos();
+					QMouseEvent* e = new QMouseEvent(QEvent::MouseButtonRelease, p, Qt::LeftButton, Qt::LeftButton);
+					QApplication::postEvent(horizontalHeader(), e);
+				}
+			}
+			return true;
+		}
+		else if (e->type() == QEvent::MouseButtonRelease)
+		{
+			columnDragEnabled_ = false;
+			setSelectionMode(QTable::Multi);
+			if(stx > -1 && sty > -1)
+				setContentsPos(stx, sty);
+			return false;
+		}
+	}
+	else if(o == verticalHeader())
+	{
+		if (e->type() == QEvent::MouseButtonDblClick)
+		{
+			QMouseEvent *m = (QMouseEvent *)e;
+			if (m->button() == LeftButton)
+			{
+				int lin = rowAt(m->y() + contentsY());
+				if (lin >= 0)
+				{
+					emit vertHeaderLeftDblClickSignal(lin);
+				}
+			}
+		}
+		else if (e->type() == QEvent::MouseButtonPress)
+		{
+			QMouseEvent *m = (QMouseEvent *)e;
+			if (m->button() == LeftButton)
+			{
+				stx = contentsX();
+				sty = contentsY();
+				return false;
+			}
+			else if (m->button() == RightButton)
+			{
+				int lin = rowAt(m->y() + contentsY());
+				if (lin < 0)
+					return false;
+
+				popupVertHeader_->move(m->globalPos().x(), m->globalPos().y());
+				emit vertHeaderSignal(lin);
+				return true;
+			}
+		}
+		else if (e->type() == QEvent::MouseButtonRelease)
+		{
+			QMouseEvent *m = (QMouseEvent *)e;
+			if (m->button() == LeftButton)
+			{
+				if (m->state() & Qt::ShiftButton)
+					shiftKeyPressed_ = true;
+				else
+					shiftKeyPressed_ = false;
+				int lin = m->y();
+				dragLineReleased_ = rowAt(lin + contentsY());
+				setContentsPos(stx, sty);
+			}
+			return false;
+		}
+	}
+	else if (o == viewport())
+	{
+		if (e->type() == QEvent::MouseButtonPress)
+		{
+			if(rowToEdit_ > -1 && colToEdit_ > -1)
+				endEdit(rowToEdit_, colToEdit_, true, true);
+			rowToEdit_ = -1;
+			colToEdit_ = -1;
+			editing_ = false;
+
+			QMouseEvent *m = (QMouseEvent *)e;
+			if (m->button() == RightButton)
+			{
+				popupViewport_->move(m->globalPos().x(), m->globalPos().y());
+				emit viewportSignal();
+				return true;
+			}
+		}
+		else if (e->type() == QEvent::MouseButtonDblClick)
+		{
+			if(theme_->getTheme()->type() != TeTHEME)
+				return true;
+
+			QMouseEvent *m = (QMouseEvent *)e;
+			if (m->button() == LeftButton)
+			{
+				int col = gridToPortalColVector_[currentColumn()];
+				if(isIndex(col))
+					return true;
+
+				refresh();
+				setEditMode(QTable::Editing, currentRow(), currentColumn());
+				beginEdit(currEditRow(), currEditCol(), false);
+				rowToEdit_ = currEditRow();
+				colToEdit_ = currEditCol();
+				return false;
+			}
+		}
+		else if (e->type() == QEvent::Enter)
+			gridInformation();
+	}
+	else
+	{
+		if (e->type() == QEvent::KeyPress)
+		{
+			if(rowToEdit_ == -1 || colToEdit_ == -1)
+				return true;
+
+			QKeyEvent *k = (QKeyEvent*)e;
+			if (k->state() & Qt::ControlButton)
+			{
+				if(k->key() == Qt::Key_PageDown)
+				{
+					scrollToNextPointedObjectSlot();
+					return true;
+				}
+				else if(k->key() == Qt::Key_PageUp)
+				{
+					scrollToPrevPointedObjectSlot();
+					return true;
+				}
+			}
+#ifdef WIN32
+			else if (k->state() & Qt::AltButton)
+#else
+			else if (k->state() & (Qt::AltButton | Qt::ControlButton))
+#endif
+			{
+				if(k->key() == Qt::Key_PageDown)
+				{
+					scrollToNextQueriedObjectSlot();
+					return true;
+				}
+				else if(k->key() == Qt::Key_PageUp)
+				{
+					scrollToPrevQueriedObjectSlot();
+					return true;
+				}
+			}
+			else if (k->key() == Qt::Key_Return)
+			{
+				editing_ = true;
+				endEdit(rowToEdit_, colToEdit_, true, true);
+				goToEditNewCell();
+				return true;
+			}
+		}
+	}
+
+	return QTable::eventFilter(o, e);
+}
+
+
+void TeQtGrid::mouseReleasedOnVerticalHeaderSlot(int lin)     
+{
+	TeWaitCursor wait;
+	string uid, oid;
+	int i, begin, end;
+	set<string> drawSet;
+	
+	if (shiftKeyPressed_ == false) // single toggle
+	{
+		portal_->fetchRow(gridToPortalRowVector_[lin]);
+		uid = portal_->getData(uniqueIdPos_);
+		oid = portal_->getData(objectIdPos_);
+		drawSet.insert(oid);
+		ObjectInfo& info = objectMap_[oid];
+		changeObjectStatus(info, uid, "pointing");
+	}
+	else	// set or reset grid lines (shift and pointing operation)
+	{
+		if (lastLinePressed_ != -1)
+		{
+			portal_->fetchRow(gridToPortalRowVector_[lastLinePressed_]);
+			uid = portal_->getData(uniqueIdPos_);
+			oid = portal_->getData(objectIdPos_);
+			ObjectInfo& info = objectMap_[oid];
+			int pointed = info.status_  & 0x1;
+			if(uid.empty() == false)
+				pointed = info.uniqueMap_[uid] & 0x1;
+
+			if (lin > lastLinePressed_)
+			{
+				begin = lastLinePressed_ + 1;
+				end = lin;
+			}
+			else if (lin < lastLinePressed_)
+			{
+				begin = lin;
+				end = lastLinePressed_ - 1;
+			}
+			else
+				begin = end = lin;
+
+			for (i = begin ; i <= end; ++i)
+			{
+				portal_->fetchRow(gridToPortalRowVector_[i]);
+				uid = portal_->getData(uniqueIdPos_);
+				oid = portal_->getData(objectIdPos_);
+				ObjectInfo& info = objectMap_[oid];
+				changeObjectStatus(info, uid, "shiftAndPointing", pointed);
+				drawSet.insert(oid);
+			}
+		}
+	}
+
+	if (lin != dragLineReleased_)
+	{
+		if (dragLineReleased_ == -1)
+		{
+			int ini, fim;
+			for (ini = iLine_; ini <= fLine_; ini++)
+				if (isRowSelected(ini, true))
+					break;
+
+			for (fim = fLine_; fim >= iLine_; fim--)
+				if (isRowSelected(fim, true))
+					break;
+
+			if (fim > lin)
+				dragLineReleased_ = fim;
+			else
+				dragLineReleased_ = ini;
+		}
+		portal_->fetchRow(gridToPortalRowVector_[lin]);
+		uid = portal_->getData(uniqueIdPos_);
+		oid = portal_->getData(objectIdPos_);
+		ObjectInfo& info = objectMap_[oid];
+		int pointed = info.status_  & 0x1;
+		if(uid.empty() == false)
+			pointed = info.uniqueMap_[uid] & 0x1;
+
+		if (lin < dragLineReleased_)
+		{
+			begin = lin + 1;
+			end = dragLineReleased_;
+		}
+		else
+		{
+			begin = dragLineReleased_;
+			end = lin - 1;
+		}
+
+		for (i = begin ; i <= end; ++i)
+		{
+			portal_->fetchRow(gridToPortalRowVector_[i]);
+			uid = portal_->getData(uniqueIdPos_);
+			oid = portal_->getData(objectIdPos_);
+			ObjectInfo& info = objectMap_[oid];
+			changeObjectStatus(info, uid, "shiftAndPointing", pointed);
+			drawSet.insert(oid);
+		}
+	}
+
+	lastLinePressed_ = lin;
+	clearSelection(true);
+
+	refresh();
+	if (saveObjectStatus(theme_, drawSet, objectMap_) == false)
+	{
+		QMessageBox::critical(this, tr("Error"),
+			tr("Fail to update the \"c_object_status\" and \"grid_status\" fields in the collection table!"));
+		return;
+	}
+	emit putColorOnObject(theme_, drawSet);
+	gridInformation();
+}
+
+
+void TeQtGrid::putColorOnGrid(set<string> uidSet, set<string> oidSet, string operation, string /* attrQuery */)     
+{
+	//if(uidSet.empty() && oidSet.empty())
+	//	return;
+
+	int	x, y;
+	string oid, uid;
+	set<string> drawSet;
+	set<string>::iterator it, nit;
+	list<string>::iterator vit;
+	map<string, int>::iterator uit;
+	map<string, ObjectInfo>::iterator oit;
+	set<string> auxSet;
+
+	for (it = oidSet.begin(); it != oidSet.end(); ++it)
+	{
+		ObjectInfo& info = objectMap_[*it];
+		if(info.uniqueMap_.size())
+		{
+			for(uit = info.uniqueMap_.begin(); uit != info.uniqueMap_.end(); uit++)
+				uidSet.insert(uit->first);
+		}
+		else
+			auxSet.insert(*it);
+	}
+	oidSet = auxSet;
+
+	if (operation == "newQuery" || operation == "filterQuery" || operation == "addQuery")
+	{
+		//get the unique ids that were queried before this query
+		list<string> oldUQueriedList, oldOQueriedList;
+		for(oit =  objectMap_.begin(); oit != objectMap_.end(); oit++)
+		{
+			ObjectInfo& info = oit->second;
+			if(info.uniqueMap_.size())
+			{
+				for(uit = info.uniqueMap_.begin(); uit != info.uniqueMap_.end(); uit++)
+				{
+					if(uit->second & 0x2)
+						oldUQueriedList.push_back(uit->first);
+				}
+			}
+			else
+			{
+				if(info.status_ & 0x2)
+					oldOQueriedList.push_back(oit->first);
+			}
+		}
+
+		if(operation == "newQuery")
+		{
+			// remove intersection (new and old set)
+			vit = oldUQueriedList.begin();
+			while(vit != oldUQueriedList.end())
+			{
+				if((nit = uidSet.find(*vit)) != uidSet.end())
+				{
+					vit = oldUQueriedList.erase(vit);
+					uidSet.erase(nit);
+				}
+				else
+					vit++;
+			}
+			vit = oldOQueriedList.begin();
+			while(vit != oldOQueriedList.end())
+			{
+				if((nit = oidSet.find(*vit)) != oidSet.end())
+				{
+					vit = oldOQueriedList.erase(vit);
+					oidSet.erase(nit);
+				}
+				else
+					vit++;
+			}
+
+			// reset old queried
+			for(vit = oldUQueriedList.begin(); vit != oldUQueriedList.end(); vit++)
+			{
+				oid = unique2ObjectMap_[*vit];
+				ObjectInfo& info = objectMap_[oid];
+				info.uniqueMap_[*vit] &= 0x1;
+				drawSet.insert(oid);
+			}
+			for(vit = oldOQueriedList.begin(); vit != oldOQueriedList.end(); vit++)
+			{
+				oid = *vit;
+				ObjectInfo& info = objectMap_[oid];
+				info.status_ &= 0x1;
+				drawSet.insert(oid);
+			}
+
+			// set new queried
+			for(nit = uidSet.begin(); nit != uidSet.end(); nit++)
+			{
+				oid = unique2ObjectMap_[*nit];
+				ObjectInfo& info = objectMap_[oid];
+				info.uniqueMap_[*nit] |= 0x2;
+				drawSet.insert(oid);
+			}
+			for(nit = oidSet.begin(); nit != oidSet.end(); nit++)
+			{
+				oid = *nit;
+				ObjectInfo& info = objectMap_[oid];
+				info.status_ |= 0x2;
+				for(uit = info.uniqueMap_.begin(); uit != info.uniqueMap_.end(); uit++)
+					uit->second |= 0x2;
+				drawSet.insert(oid);
+			}
+		}
+		else if(operation == "filterQuery")
+		{
+			// remove intersection (old set)
+			for (nit = uidSet.begin(); nit != uidSet.end(); nit++)
+				if((vit = std::find(oldUQueriedList.begin(), oldUQueriedList.end(), *nit)) != oldUQueriedList.end())
+					oldUQueriedList.erase(vit);
+			for (nit = oidSet.begin(); nit != oidSet.end(); nit++)
+				if((vit = std::find(oldOQueriedList.begin(), oldOQueriedList.end(), *nit)) != oldOQueriedList.end())
+					oldOQueriedList.erase(vit);
+
+			// reset old queried
+			for(vit = oldUQueriedList.begin(); vit != oldUQueriedList.end(); vit++)
+			{
+				oid = unique2ObjectMap_[*vit];
+				ObjectInfo& info = objectMap_[oid];
+				info.uniqueMap_[*vit] &= 0x1;
+				drawSet.insert(oid);
+			}
+			for(vit = oldOQueriedList.begin(); vit != oldOQueriedList.end(); vit++)
+			{
+				oid = *vit;
+				ObjectInfo& info = objectMap_[oid];
+				info.status_ &= 0x1;
+				for(uit = info.uniqueMap_.begin(); uit != info.uniqueMap_.end(); uit++)
+					uit->second &= 0x1;
+				drawSet.insert(oid);
+			}
+		}
+		else if(operation == "addQuery")
+		{
+			// remove intersection (new set)
+			for (vit = oldUQueriedList.begin(); vit != oldUQueriedList.end(); vit++)
+				if((nit = uidSet.find(*vit)) != uidSet.end())
+					uidSet.erase(nit);
+			for (vit = oldOQueriedList.begin(); vit != oldOQueriedList.end(); vit++)
+				if((nit = oidSet.find(*vit)) != oidSet.end())
+					oidSet.erase(nit);
+
+			// set new queried
+			for(nit = uidSet.begin(); nit != uidSet.end(); nit++)
+			{
+				oid = unique2ObjectMap_[*nit];
+				ObjectInfo& info = objectMap_[oid];
+				info.uniqueMap_[*nit] |= 0x2;
+				drawSet.insert(oid);
+			}
+			for(nit = oidSet.begin(); nit != oidSet.end(); nit++)
+			{
+				oid = *nit;
+				ObjectInfo& info = objectMap_[oid];
+				info.status_ |= 0x2;
+				for(uit = info.uniqueMap_.begin(); uit != info.uniqueMap_.end(); uit++)
+					uit->second |= 0x2;
+				drawSet.insert(oid);
+			}
+		}
+	}
+	else if (operation == "newPointing" || operation == "togglePointing" || operation == "addPointing")
+	{
+		list<string> oldUPointedList, oldOPointedList;
+		if(operation != "togglePointing")
+		{
+			//get the object ids that were pointed before this pointing
+			for(oit =  objectMap_.begin(); oit != objectMap_.end(); oit++)
+			{
+				ObjectInfo& info = oit->second;
+				if(info.uniqueMap_.size())
+				{
+					for(uit = info.uniqueMap_.begin(); uit != info.uniqueMap_.end(); uit++)
+					{
+						if(uit->second & 0x1)
+							oldUPointedList.push_back(uit->first);
+					}
+				}
+				else
+				{
+					if(info.status_ & 0x1)
+						oldOPointedList.push_back(oit->first);
+				}
+			}
+		}
+
+		if(operation == "newPointing")
+		{
+			// remove intersection (new and old set)
+			vit = oldUPointedList.begin();
+			while(vit != oldUPointedList.end())
+			{
+				if((nit = uidSet.find(*vit)) != uidSet.end())
+					vit = oldUPointedList.erase(vit);
+				else
+					vit++;
+			}
+			vit = oldOPointedList.begin();
+			while(vit != oldOPointedList.end())
+			{
+				if((nit = oidSet.find(*vit)) != oidSet.end())
+					vit = oldOPointedList.erase(vit);
+				else
+					vit++;
+			}
+
+			// reset old pointeds
+			for(vit = oldUPointedList.begin(); vit != oldUPointedList.end(); vit++)
+			{
+				oid = unique2ObjectMap_[*vit];
+				ObjectInfo& info = objectMap_[oid];
+				info.uniqueMap_[*vit] &= 0x2;
+				drawSet.insert(oid);
+			}
+			for(vit = oldOPointedList.begin(); vit != oldOPointedList.end(); vit++)
+			{
+				oid = *vit;
+				ObjectInfo& info = objectMap_[oid];
+				info.status_ &= 0x2;
+				drawSet.insert(oid);
+			}
+
+			// set new pointed
+			for(nit = uidSet.begin(); nit != uidSet.end(); nit++)
+			{
+				oid = unique2ObjectMap_[*nit];
+				ObjectInfo& info = objectMap_[oid];
+				info.uniqueMap_[*nit] |= 0x1;
+				drawSet.insert(oid);
+			}
+			for(nit = oidSet.begin(); nit != oidSet.end(); nit++)
+			{
+				oid = *nit;
+				ObjectInfo& info = objectMap_[oid];
+				info.status_ |= 0x1;
+				for(uit = info.uniqueMap_.begin(); uit != info.uniqueMap_.end(); uit++)
+					uit->second |= 0x1;
+				drawSet.insert(oid);
+			}
+		}
+		else if(operation == "togglePointing")
+		{
+			// toggle status (new pointed ids)
+			nit = oidSet.begin();
+			if(nit != oidSet.end())
+			{
+				oid = *nit;
+				ObjectInfo& info = objectMap_[oid];
+				int status = info.status_;
+
+				if(status & 0x1) // reset new pointed
+				{
+					while(nit != oidSet.end())
+					{
+						oid = *nit;
+						ObjectInfo& info = objectMap_[oid];
+						info.status_ &= 0x2;
+						for(uit = info.uniqueMap_.begin(); uit != info.uniqueMap_.end(); uit++)
+							uit->second &= 0x2;
+						nit++;
+						drawSet.insert(oid);
+					}
+				}
+				else // set new pointed
+				{
+					while(nit != oidSet.end())
+					{
+						oid = *nit;
+						ObjectInfo& info = objectMap_[oid];
+						info.status_ |= 0x1;
+						for(uit = info.uniqueMap_.begin(); uit != info.uniqueMap_.end(); uit++)
+							uit->second |= 0x1;
+						nit++;
+						drawSet.insert(oid);
+					}
+				}
+			}
+
+			nit = uidSet.begin();
+			if(nit != uidSet.end())
+			{
+				oid = unique2ObjectMap_[*nit];
+				ObjectInfo& info = objectMap_[oid];
+				int status = info.status_;
+
+				if(status & 0x1) // reset new pointed
+				{
+					for(nit = uidSet.begin(); nit != uidSet.end(); nit++)
+					{
+						oid = unique2ObjectMap_[*nit];
+						ObjectInfo& info = objectMap_[oid];
+						info.uniqueMap_[*nit] &= 0x2;
+						drawSet.insert(oid);
+					}
+				}
+				else // set new pointed
+				{
+					for(nit = uidSet.begin(); nit != uidSet.end(); nit++)
+					{
+						oid = unique2ObjectMap_[*nit];
+						ObjectInfo& info = objectMap_[oid];
+						info.uniqueMap_[*nit] |= 0x1;
+						drawSet.insert(oid);
+					}
+				}
+			}
+		}
+		else if(operation == "addPointing")
+		{
+			// remove intersection (new pointed ids)
+ // not erase (not optimize) - graphic plot need selectd objects
+
+			// set new pointeds
+			for(nit = uidSet.begin(); nit != uidSet.end(); nit++)
+			{
+				oid = unique2ObjectMap_[*nit];
+				ObjectInfo& info = objectMap_[oid];
+				info.uniqueMap_[*nit] |= 0x1;
+				drawSet.insert(oid);
+			}
+			for(nit = oidSet.begin(); nit != oidSet.end(); nit++)
+			{
+				oid = *nit;
+				ObjectInfo& info = objectMap_[oid];
+				info.status_ |= 0x1;
+				for(uit = info.uniqueMap_.begin(); uit != info.uniqueMap_.end(); uit++)
+					uit->second |= 0x1;
+				drawSet.insert(oid);
+			}
+		}
+	}
+
+	for(it = drawSet.begin(); it != drawSet.end(); it++)
+	{
+		oid = *it;
+		ObjectInfo& info = objectMap_[oid];
+		if(info.uniqueMap_.size())
+		{
+			set<int> statusSet;
+			uit = info.uniqueMap_.begin();
+			uid = uit->first;
+
+			while(uit != info.uniqueMap_.end())
+				statusSet.insert(uit++->second);
+			if(statusSet.find(3) != statusSet.end())
+				info.status_ = 3;
+			else if(statusSet.find(2) != statusSet.end() && statusSet.find(1) != statusSet.end())
+				info.status_ = 3;
+			else if(statusSet.find(2) != statusSet.end() && statusSet.find(1) == statusSet.end())
+				info.status_ = 2;
+			else if(statusSet.find(2) == statusSet.end() && statusSet.find(1) != statusSet.end())
+				info.status_ = 1;
+			else
+				info.status_ = 0;
+		}
+	}
+
+	// If it is not a query operation (i.e., a pointing operation), scroll the grid if the
+	// single object is not visible in the grid.
+	if (operation == "togglePointing")
+	{
+		vector<string>::iterator itpos;
+		if(uid.empty() == false)
+			itpos = std::find(portalRow2UniqueIdVector_.begin(), portalRow2UniqueIdVector_.end(), uid);
+		else
+			itpos = std::find(portalRow2UniqueIdVector_.begin(), portalRow2UniqueIdVector_.end(), oid);
+		int pos = 0;
+		if(itpos != portalRow2UniqueIdVector_.end())
+			pos = itpos - portalRow2UniqueIdVector_.begin();
+
+		vector<int>::iterator itpos2;
+		itpos2 = std::find(gridToPortalRowVector_.begin(),gridToPortalRowVector_.end(), pos);
+		pos = itpos2 - gridToPortalRowVector_.begin();
+
+		if (pos <= iLine_ || pos >= fLine_)
+		{
+			// if editing, end edit to enable vertical scrolling
+			if(editing_ && (rowToEdit_ > -1 && colToEdit_ > -1))
+			{
+				endEdit(rowToEdit_, colToEdit_, true, true);
+				rowToEdit_ = -1;
+				colToEdit_ = -1;
+				editing_ = false;
+			}
+			doRepaint_ = true;
+			x = contentsX();
+			y = rowPos(pos);
+			setContentsPos(x, y);
+		}
+	}
+
+	clearSelection(true);
+	refresh();
+
+	if (saveObjectStatus(theme_, drawSet, objectMap_) == false)
+	{
+		QMessageBox::critical(this, tr("Error"),
+			tr("Fail to update the \"c_object_status\" and \"grid_status\" fields in the collection table!"));
+		return;
+	}
+
+	emit putColorOnObject(theme_, drawSet);
+
+	if(autoPromote_)
+	{
+		// if editing, end edit to enable vertical scrolling
+		if(editing_ && (rowToEdit_ > -1 && colToEdit_ > -1))
+		{
+			endEdit(rowToEdit_, colToEdit_, true, true);
+			rowToEdit_ = -1;
+			colToEdit_ = -1;
+			editing_ = false;
+		}
+		if (operation == "newPointing" || operation == "addPointing")
+			promotePointedObjectsSlot();
+		else if(operation == "newQuery" || operation == "addQuery" || operation == "filterQuery")
+			promoteQueriedObjectsSlot();
+	}
+
+	gridInformation();
+}
+
+
+void TeQtGrid::drawContents (QPainter *qp, int clipx, int clipy, int clipw, int cliph)
+{
+	if(doRepaint_ == true)
+	{
+		update();
+		QTable :: drawContents(qp, clipx, clipy, clipw, cliph);
+	}
+}
+
+
+void TeQtGrid::update()
+{
+	if(portal_ == 0)
+		return;
+	int ie = currEditRow();
+	int je = currEditCol();
+	QString vale;
+	if(ie >= 0 && je >= 0)
+	{
+		setCellContentFromEditor(ie, je);
+		vale = text(ie, je);
+		if(vale.isEmpty())
+		{
+			int pos = gridToPortalRowVector_[ie];
+			if(portal_->fetchRow(pos))
+			{
+				string s = portal_->getData(gridToPortalColVector_[je]);
+				if(s.empty() == false)
+					vale = s.c_str();
+			}
+		}
+	}
+
+	int	i, j, pos;
+
+	int gridY = contentsY();
+	int gridX = contentsX();
+
+	if(mousePressedOnHorizontalHeader_ && gridY == 0)
+	{
+		setContentsPos(gridX_, gridY_);
+		gridY = gridY_;
+		mousePressedOnHorizontalHeader_ = false;
+	}
+
+	int gridHeight = visibleHeight(); 
+	int gridWidth = visibleWidth(); 
+
+	if (doRefresh_ == false && 
+		gridX_ == gridX && gridY_ == gridY &&
+		gridHeight_ == gridHeight && 
+		gridWidth_ == gridWidth)
+		return;
+
+	gridX_ = gridX;
+	gridY_ = gridY;
+	gridHeight_ = gridHeight;
+	gridWidth_ = gridWidth;
+		
+// clear cells
+	doRepaint_ = false; // do not repaint
+	if (iLine_ >= 0 && iCol_ >= 0)
+	{
+		for (i = iLine_; i <= fLine_; ++i)
+		{
+			for (j = iCol_; j <= fCol_; ++j)
+			{
+				if(item(i, j))
+					clearCell(i, j);
+			}
+		}
+	}
+
+	iLine_ = rowAt(gridY_);
+	iCol_  = columnAt(gridX_);
+	visibleLines_ = rowAt(gridHeight_);
+	if (visibleLines_ == -1)
+		visibleLines_ = numRows();
+
+	visibleCols_ = 0;
+	int scVal = horizontalScrollBar()->value();
+	for(i=iCol_; i<numCols(); i++)
+	{
+		if(gridWidth_ < columnPos(i) - scVal)
+			break;
+		visibleCols_++;
+	}
+
+	if (iLine_ < 0 || iCol_ < 0)
+	{
+		gridX_ = gridY_ = iLine_ = fLine_ = iCol_ = fCol_ = -1;
+		doRepaint_ = true;
+		return;
+	}
+
+	fLine_ = iLine_ + visibleLines_;
+	if (fLine_ > numRows() - 1)
+		fLine_ = numRows() - 1;
+	fCol_ = iCol_ + visibleCols_ - 1;
+
+	int status;
+	string st, oid, uid;
+	QColor qc;
+	TeColor color;
+	for (i = iLine_; i <= fLine_ ; ++i)
+	{
+		pos = gridToPortalRowVector_[i];
+		if (portal_->fetchRow(pos) == false)
+			return;
+
+		oid = portal_->getData(objectIdPos_);
+		uid = portal_->getData(uniqueIdPos_);
+
+		ObjectInfo& info = objectMap_[oid];
+		if(uid.empty() == false)
+			status = info.uniqueMap_[uid];
+		else
+			status = info.status_;
+
+		if (status == 1)
+			color = (theme_->getTheme())->pointingLegend().visual(TePOLYGONS)->color();
+		else if (status == 2)
+			color = (theme_->getTheme())->queryLegend().visual(TePOLYGONS)->color();
+		else if (status == 3)
+			color = (theme_->getTheme())->queryAndPointingLegend().visual(TePOLYGONS)->color();
+		qc = QColor(color.red_,color.green_,color.blue_);
+
+		for (j = iCol_; j <= fCol_; ++j)
+		{
+			if (gridColVisVector_[j] == true)
+			{
+				st = portal_->getData(gridToPortalColVector_[j]);
+				if(status != 0)
+				{
+					TeQtGridItem *ti;
+					if(ie == i && je == j)
+						ti = new TeQtGridItem( this, QTableItem::OnTyping, vale);
+					else
+						ti = new TeQtGridItem( this, QTableItem::OnTyping, st.c_str());
+
+					ti->setColor(qc);
+					setItem(i, j, ti );
+				}
+				else
+				{
+					if(ie == i && je == j)
+						setText(i, j, vale);
+					else
+						setText(i, j, st.c_str());
+				}
+			}
+
+			if(i == fLine_ && j == fCol_- 1)
+			{
+				doRepaint_ = true; // do repaint
+				doRefresh_ = true;
+				updateCell(i, j);
+			}
+		}
+	}
+
+	doRepaint_ = true; // do repaint
+	doRefresh_ = false;
+
+	if(ie >= 0 && je >= 0)
+		endEdit(ie, je, true, true);
+
+	if(rowToEdit_ > -1 && colToEdit_ > -1 && editing_)
+	{
+		setEditMode(QTable::Editing, rowToEdit_, colToEdit_);
+		beginEdit(rowToEdit_, colToEdit_, false);
+	}
+}
+
+
+void TeQtGrid::adjustColumns()
+{
+	int	i;
+	for (i = 0; i < numCols(); ++i)
+		adjustColumn(i);
+	refresh();
+}
+
+
+void TeQtGrid::swapColumns(int col1, int col2)
+{
+	int	nc = numCols();
+	vector<int>	cols;
+	int	n;
+
+	if (col1 == -1 || col2 == -1)
+	{
+		for(n = 0; n < nc; n++)
+			if (isColumnSelected(n, true) == true)
+				cols.push_back(n);
+		if(cols.size() != 2)
+		{
+			QMessageBox::warning(this, tr("Warning"),
+				tr("Select the two grid columns to be exchanged!"));
+			return;
+		}
+		col1 = cols[0];
+		col2 = cols[1];
+	}
+
+	int w1 = columnWidth(col1);
+	int w2 = columnWidth(col2);
+
+	int c1 = gridToPortalColVector_[col1];
+	int c2 = gridToPortalColVector_[col2];
+
+	gridToPortalColVector_[col1] = c2;
+	gridToPortalColVector_[col2] = c1;
+
+	QTable::swapColumns(col1, col2);
+	for (n=0; n<nc; n++)
+	{
+		string st = portal_->getAttribute(gridToPortalColVector_[n]).rep_.name_;
+		horizontalHeader()->setLabel(n, st.c_str());
+	}
+
+	setColumnWidth(col1, w2);
+	setColumnWidth(col2, w1);
+
+	refresh();
+}
+
+
+void TeQtGrid::setVisColumn(bool vis, int col)
+{
+	unsigned int nc = numCols();
+	unsigned int n;
+	vector<int>	cols;
+
+	if (vis == false)
+	{
+		if (col == -1)
+		{
+			for(n=0; n<nc; n++)
+				if (isColumnSelected(n, true) == true)
+					cols.push_back(n);
+			if(cols.size() == 0)
+			{
+				QMessageBox::warning(this, tr("Warning"),
+					tr("Select the grid column(s) to be hidden!"));
+				return;
+			}
+		}
+		else
+			cols.push_back(col);
+
+		for(n=0; n<cols.size(); n++)
+		{
+			showColumn(cols[n]); // it is a BUG in the QT 3.2.0 
+			hideColumn(cols[n]);
+			gridColVisVector_[cols[n]] = false;
+		}
+	}
+	else
+	{
+		for(n=0; n<nc; n++)
+		{
+			if(gridColVisVector_[n] == false)
+			{
+				gridColVisVector_[n] = true;
+				showColumn(n);
+				cols.push_back(n);
+			}
+		}
+	}
+	refresh();
+}
+
+void TeQtGrid::refresh()
+{
+	doRefresh_ = true;
+	repaint();
+	update();
+}
+
+
+void TeQtGrid::promotePointedObjectsSlot()
+{
+	TeWaitCursor	wait;
+	gridToPortalRowVector_.clear();
+	string	oid, uid;
+	TeDatabasePortal* portal = db_->getPortal();
+	vector<int> notByPointingVector;
+
+	unsigned int i=0;
+    int gs;
+	if (portal->query(sql_))
+	{
+		while (portal->fetchRow())
+		{
+			if(theme_->getTheme()->getProductId() == TeTHEME)
+			{
+				gs = atoi(portal->getData(gridStatusPos_));
+				if(gs &= 0x1)
+					gridToPortalRowVector_.push_back(i);
+				else
+					notByPointingVector.push_back(i);
+			}
+			else if(theme_->getTheme()->getProductId() == TeEXTERNALTHEME)
+			{
+				uid = portal->getData(uniqueIdPos_);
+				if(uid.empty() == false)
+				{
+					std::map<std::string, int >::iterator it = theme_->getTheme()->getItemStatusMap().find(uid);
+					if( it != theme_->getTheme()->getItemStatusMap().end())
+					{
+						if(it->second & 1)
+							gridToPortalRowVector_.push_back(i);
+						else
+							notByPointingVector.push_back(i);
+					}
+					else
+					{
+						notByPointingVector.push_back(i);
+					}
+				}
+				else
+				{
+					oid = portal->getData(objectIdPos_);
+					std::map<std::string, int >::iterator it = theme_->getTheme()->getObjStatusMap().find(oid);
+					if( it != theme_->getTheme()->getObjStatusMap().end())
+					{
+						if(it->second & 1)
+							gridToPortalRowVector_.push_back(i);
+						else
+							notByPointingVector.push_back(i);
+					}
+					else
+					{
+						notByPointingVector.push_back(i);
+					}
+				}
+			}		
+			++i;
+		}
+	}
+	delete portal;
+
+	for (i = 0; i < notByPointingVector.size(); ++i)
+		gridToPortalRowVector_.push_back(notByPointingVector[i]);
+	
+	doRepaint_ = true;
+
+	int x = contentsX();
+	int y = rowPos(0);
+	setContentsPos(x, y);
+
+	refresh();
+}
+
+
+void TeQtGrid::promoteQueriedObjectsSlot()
+{
+	TeWaitCursor	wait;
+	gridToPortalRowVector_.clear();
+	string	oid, uid, val;
+	TeDatabasePortal* portal = db_->getPortal();
+	vector<int> notByQueryVector;
+
+	unsigned int i=0;
+    int gs;
+	if (portal->query(sql_))
+	{
+		while (portal->fetchRow())
+		{
+			if(theme_->getTheme()->getProductId() == TeTHEME)
+			{
+				val =  portal->getData(gridStatusPos_);
+				if(val.empty())
+					gs = atoi(portal->getData(resultIdPos_));
+				else
+					gs = atoi(val.c_str());
+
+				if(gs &= 0x2)
+					gridToPortalRowVector_.push_back(i);
+				else
+					notByQueryVector.push_back(i);
+			}
+			else if(theme_->getTheme()->getProductId() == TeEXTERNALTHEME)
+			{
+				uid = portal->getData(uniqueIdPos_);
+				if(uid.empty() == false)
+				{
+					std::map<std::string, int >::iterator it = theme_->getTheme()->getItemStatusMap().find(uid);
+					if( it != theme_->getTheme()->getItemStatusMap().end())
+					{
+						if(it->second & 2)
+							gridToPortalRowVector_.push_back(i);
+						else
+							notByQueryVector.push_back(i);
+					}
+					else
+					{
+						notByQueryVector.push_back(i);
+					}
+				}
+				else
+				{
+					oid = portal->getData(objectIdPos_);
+					std::map<std::string, int >::iterator it = theme_->getTheme()->getObjStatusMap().find(oid);
+					if( it != theme_->getTheme()->getObjStatusMap().end())
+					{
+						if(it->second & 2)
+							gridToPortalRowVector_.push_back(i);
+						else
+							notByQueryVector.push_back(i);
+					}
+					else
+					{
+						notByQueryVector.push_back(i);
+					}
+				}
+			}		
+			++i;
+		}
+	}
+	delete portal;
+
+	for (i = 0; i < notByQueryVector.size(); ++i)
+		gridToPortalRowVector_.push_back(notByQueryVector[i]);
+	
+	doRepaint_ = true;
+
+	int x = contentsX();
+	int y = rowPos(0);
+	setContentsPos(x, y);
+
+	refresh();
+}
+
+
+void TeQtGrid::sortAscOrderSlot()    
+{
+	vector<int>	v;
+
+	sort(v, "ASC");
+}
+
+
+void TeQtGrid::sortDescOrderSlot()    
+{
+	vector<int>	v;
+
+	sort(v, "DESC");
+}
+
+
+void TeQtGrid::sort(vector<int> cols, string order)
+{
+	unsigned int nc = numCols();
+	unsigned int n;
+	string uid, oid;
+
+	if (portal_ == 0)
+		return;
+
+
+	if (cols.size() == 0)
+	{
+		for(n = 0; n < nc; ++n)
+			if (isColumnSelected(n, true) == true)
+				cols.push_back(n);
+	}
+
+	if (cols.size() == 0)
+	{
+		QMessageBox::warning(this, tr("Warning"),
+			tr("Select the grid column(s) to be sorted!"));
+		return;
+	}
+
+	orderBy_.clear();
+	for (n=0; n<cols.size(); n++)
+		orderBy_ += (horizontalHeader()->label(cols[n]) + " ").latin1() + order + ",";
+	orderBy_ = orderBy_.substr(0, orderBy_.size()-1);
+	doRepaint_ = true;
+
+	portal_->freeResult();
+	sql_ = sqlJoin_ + " ORDER BY " + orderBy_;
+	if (portal_->query(sql_) == false)
+	{
+		portal_->freeResult();
+		delete portal_;
+		portal_ = 0;
+		return;
+	}
+
+	gridToPortalRowVector_.clear();
+	portalRow2UniqueIdVector_.clear();
+	int i = 0;
+	while(portal_->fetchRow())
+	{
+		uid = portal_->getData(uniqueIdPos_);
+		if(uid.empty() == false)
+			portalRow2UniqueIdVector_.push_back(uid);
+		else
+		{
+			oid = portal_->getData(objectIdPos_);
+			portalRow2UniqueIdVector_.push_back(oid);
+		}
+		gridToPortalRowVector_.push_back(i);
+		++i;
+	}
+
+	refresh();
+}
+
+
+TeTable& TeQtGrid::findTable(int col) // grid column
+{
+	unsigned int i;
+    int nCols;
+	static	TeTable t;
+
+	int portalCol = gridToPortalColVector_[col];
+	TeAttributeList attrList;
+	
+	nCols = 0;
+	for (i = 0; i < tableVector_.size(); ++i)
+	{
+		attrList = tableVector_[i].attributeList();
+		nCols += attrList.size();
+		if (portalCol < nCols)
+			break;				
+	}
+	if(i == tableVector_.size())
+		return t;
+	return tableVector_[i];	
+}
+
+TeTable& TeQtGrid::findTable(string  colName)
+{
+	int	i;
+	for(i=0; i<numCols(); i++)
+	{
+		string cname = horizontalHeader()->label(i).latin1();
+		if(cname == colName)
+			break;
+	}
+	return findTable(i);
+}
+
+
+void TeQtGrid::setVerticalEdition(bool flag)
+{
+	verticalEdition_ = flag;				
+}
+
+bool TeQtGrid::writeCell()
+{
+	string	val;
+	QString qs;
+	unsigned int i;
+
+	if(rowToEdit_ == -1 || colToEdit_ == -1)
+		return false;
+
+	int portalRowToEdit = gridToPortalRowVector_[rowToEdit_];
+	int portalColToEdit = gridToPortalColVector_[colToEdit_];
+	endEdit(rowToEdit_, colToEdit_, true, false);
+
+	int col = gridToPortalColVector_[colToEdit_];
+	if(isIndex(col))
+		return false;
+
+	string colName = horizontalHeader()->label(colToEdit_).latin1();
+	qs = text(rowToEdit_, colToEdit_);
+//	if(qs.isEmpty() && db_->dbmsName() == "Ado")
+//		return false;
+	if(qs.isEmpty() == false)
+		val = qs.latin1();
+
+	TeAttributeList&	attrList = portal_->getAttributeList();
+	TeAttrDataType type = attrList[portalColToEdit].rep_.type_;
+
+	if (portal_->fetchRow(portalRowToEdit) == false)
+		return false;
+
+	TeWaitCursor wait;
+	TeTable& tableToEdit = findTable(colToEdit_);
+	string tableName = tableToEdit.name();
+	string linkName;
+	if(tableToEdit.tableType() == TeAttrStatic || tableToEdit.tableType() == TeAttrEvent)
+		linkName = tableToEdit.linkName();
+	else
+		linkName = tableToEdit.uniqueName();
+
+	i = linkName.find(".");
+	if(i == string::npos)
+		linkName = tableName + "." + linkName;
+
+	string id = portal_->getData(linkName);
+
+	string qString = "UPDATE " + tableName;
+	if(val.empty())
+	{
+		qString += " SET " + colName + " = null";
+		qString += " WHERE " + linkName + " = '" + id + "'";
+	}
+	else
+	{
+		if (type == TeSTRING || type == TeDATETIME)
+		{
+			qString += " SET " + colName + " = '" + db_->escapeSequence(val);
+			qString += "' WHERE " + linkName + " = '" + id + "'";
+		}
+		else
+		{
+			qString += " SET " + colName + " = " + val;
+			qString += " WHERE " + linkName + " = '" + id + "'";
+		}
+	}
+
+	if (db_->execute(qString) == false)
+		return false;
+
+	if(theme_ != NULL && theme_->getTheme() != NULL && (theme_->getTheme()->type() == TeTHEME || theme_->getTheme()->type() == TeEXTERNALTHEME))
+	{
+		TeTheme* teTheme = dynamic_cast<TeTheme*>(theme_->getTheme());
+		TeLayer* layer = teTheme->layer();
+		if(layer != NULL)
+		{
+			layer->updateLayerEditionTime();
+		}
+	}
+
+	if (db_->dbmsName() != "Ado")
+		arrangeGridToPortalRowVector(col);
+
+	return true;
+}
+
+
+void TeQtGrid::editNextRow()
+{
+	if (rowToEdit_ < numRows()-1)
+		++rowToEdit_;
+	else
+	{
+		rowToEdit_ = 0;
+		editNextColumn();
+	}
+}
+
+
+void TeQtGrid::editNextColumn()
+{
+	bool editavel = false;
+	while(editavel == false)
+	{
+		if (colToEdit_ == numCols()-1)
+		{
+			colToEdit_ = 0;
+			if (rowToEdit_ == numRows()-1)
+				rowToEdit_ = 0;
+			else
+				++rowToEdit_;
+		}
+		else
+			++colToEdit_;
+
+		int col = gridToPortalColVector_[colToEdit_];
+		if(isIndex(col))
+			editavel = false;
+		else
+			editavel = true;
+	}
+}
+
+void TeQtGrid::goToEditNewCell()
+{
+	int	x = contentsX();
+	int y = contentsY();
+
+	if(verticalEdition_ == true)
+		editNextRow();
+	else
+		editNextColumn();
+
+	if(rowToEdit_ >= fLine_)
+		y = rowPos(iLine_+1);
+	if(colToEdit_ >= fCol_)
+		x = columnPos(iCol_+1);
+
+	setContentsPos(x, y);
+	refresh();
+
+	int i = currEditRow();
+	int j = currEditCol();
+	if(i != rowToEdit_ || j != colToEdit_)
+	{
+		if(i > 0 && j > 0)
+			endEdit(i, j, true, true);
+		setEditMode(QTable::Editing, rowToEdit_, colToEdit_);
+		beginEdit(rowToEdit_, colToEdit_, false);
+	}
+}
+
+void TeQtGrid::removeQueryColorSlot()
+{
+	TeWaitCursor wait;
+
+	set<string> drawSet;
+	map<string, int>::iterator uit;
+
+	TeDatabase* db = theme_->getLocalDatabase();
+	
+	map<string, ObjectInfo>::iterator oit;
+	for(oit =  objectMap_.begin(); oit != objectMap_.end(); oit++)
+	{
+		ObjectInfo& info = oit->second;
+		if(info.status_ & 0x2)
+		{
+			for(uit = info.uniqueMap_.begin(); uit != info.uniqueMap_.end(); uit++)
+				uit->second &= 0x1;
+			info.status_ &= 0x1;
+			drawSet.insert(oit->first);
+		}
+	}
+
+	clearSelection(true);
+	refresh();
+	string s = "UPDATE " + ((TeTheme*)theme_->getTheme())->collectionTable();
+	s += " SET c_object_status = 0 WHERE c_object_status = 2";
+	db->execute(s);
+
+	s = "UPDATE " + ((TeTheme*)theme_->getTheme())->collectionTable();
+	s += " SET c_object_status = 1 WHERE c_object_status = 3";
+	db->execute(s);
+
+	s = "UPDATE " + ((TeTheme*)theme_->getTheme())->collectionAuxTable();
+	s += " SET grid_status = 0 WHERE grid_status = 2";
+	db->execute(s);
+
+	s = "UPDATE " + ((TeTheme*)theme_->getTheme())->collectionAuxTable();
+	s += " SET grid_status = 1 WHERE grid_status = 3";
+	db->execute(s);
+
+	theme_->getTheme()->removeQueryColor();
+	emit putColorOnObject(theme_, drawSet);
+}
+
+
+void TeQtGrid::removePointingColorSlot()
+{
+	TeWaitCursor wait;
+
+	set<string> drawSet;
+	map<string, int>::iterator uit;
+
+	map<string, ObjectInfo>::iterator oit;
+	for(oit =  objectMap_.begin(); oit != objectMap_.end(); oit++)
+	{
+		ObjectInfo& info = oit->second;
+		if(info.status_ & 0x1)
+		{
+			for(uit = info.uniqueMap_.begin(); uit != info.uniqueMap_.end(); uit++)
+				uit->second &= 0x2;
+			info.status_ &= 0x2;
+			drawSet.insert(oit->first);
+		}
+	}
+
+	clearSelection(true);
+	refresh();
+
+	TeDatabase* db = theme_->getLocalDatabase();
+
+	string s = "UPDATE " + ((TeTheme*)theme_->getTheme())->collectionTable();
+	s += " SET c_object_status = 0 WHERE c_object_status = 1";
+	db->execute(s);
+
+	s = "UPDATE " + ((TeTheme*)theme_->getTheme())->collectionTable();
+	s += " SET c_object_status = 2 WHERE c_object_status = 3";
+	db->execute(s);
+
+	s = "UPDATE " + ((TeTheme*)theme_->getTheme())->collectionAuxTable();
+	s += " SET grid_status = 0 WHERE grid_status = 1";
+	db->execute(s);
+
+	s = "UPDATE " + ((TeTheme*)theme_->getTheme())->collectionAuxTable();
+	s += " SET grid_status = 2 WHERE grid_status = 3";
+	db->execute(s);
+
+	theme_->getTheme()->removePointingColor();
+	emit putColorOnObject(theme_, drawSet);
+}
+
+
+void TeQtGrid::scrollToNextPointedObjectSlot()
+{
+	TeWaitCursor wait;
+
+	int	rowpos, portalpos, nrows = numRows();
+	int	x, y;
+	string oid, uid;
+
+	x = contentsX();
+	y = contentsY();
+	rowpos = rowAt(y);
+
+	if(rowpos == numRows() - 1)
+	{
+		wait.resetWaitCursor();
+		return;
+	}
+	rowpos++;
+
+	while(rowpos < nrows)
+	{
+		portalpos = gridToPortalRowVector_[rowpos];
+		portal_->fetchRow(portalpos);
+
+		oid = portal_->getData(objectIdPos_);
+		uid = portal_->getData(uniqueIdPos_);
+
+		ObjectInfo& info = objectMap_[oid];
+		int status = info.status_;
+		if(uid.empty() == false)
+			status = info.uniqueMap_[uid];
+
+
+		if (status & 0x1)
+			break;
+		rowpos++;
+	}
+
+
+	if (rowpos == nrows)
+	{
+		wait.resetWaitCursor();
+		return;
+	}
+
+	y = rowPos(rowpos);
+	setContentsPos (x, y);
+
+	clearSelection(true);
+	refresh();
+}
+
+
+void TeQtGrid::scrollToPrevPointedObjectSlot()
+{
+	TeWaitCursor wait;
+
+	int	rowpos, portalpos;
+	int	x, y;
+	string oid, uid;
+
+	x = contentsX();
+	y = contentsY();
+	rowpos = rowAt(y);
+
+	if(rowpos == 0)
+	{
+		wait.resetWaitCursor();
+		return;
+	}
+	rowpos--;
+
+	while(rowpos >= 0)
+	{
+		portalpos = gridToPortalRowVector_[rowpos];
+		portal_->fetchRow(portalpos);
+
+		oid = portal_->getData(objectIdPos_);
+		uid = portal_->getData(uniqueIdPos_);
+
+		ObjectInfo& info = objectMap_[oid];
+		int status = info.status_;
+		if(uid.empty() == false)
+			status = info.uniqueMap_[uid];
+
+		if (status & 0x1)
+			break;
+		rowpos--;
+	}
+
+
+	if (rowpos < 0)
+	{
+		wait.resetWaitCursor();
+		return;
+	}
+
+	y = rowPos(rowpos);
+	setContentsPos (x, y);
+
+	clearSelection(true);
+	refresh();
+}
+
+
+void TeQtGrid::scrollToNextQueriedObjectSlot()
+{
+	TeWaitCursor wait;
+
+	int	rowpos, portalpos, nrows = numRows();
+	int	x, y;
+	string oid, uid;
+
+	x = contentsX();
+	y = contentsY();
+	rowpos = rowAt(y);
+
+	if(rowpos == numRows() - 1)
+	{
+		wait.resetWaitCursor();
+		return;
+	}
+	rowpos++;
+
+	while(rowpos < nrows)
+	{
+		portalpos = gridToPortalRowVector_[rowpos];
+		portal_->fetchRow(portalpos);
+
+		oid = portal_->getData(objectIdPos_);
+		uid = portal_->getData(uniqueIdPos_);
+
+		ObjectInfo& info = objectMap_[oid];
+		int status = info.status_;
+		if(uid.empty() == false)
+			status = info.uniqueMap_[uid];
+
+		if (status & 0x2)
+			break;
+		rowpos++;
+	}
+
+
+	if (rowpos == nrows)
+	{
+		wait.resetWaitCursor();
+		return;
+	}
+
+	y = rowPos(rowpos);
+	setContentsPos (x, y);
+
+	clearSelection(true);
+	refresh();
+}
+
+
+void TeQtGrid::scrollToPrevQueriedObjectSlot()
+{
+	TeWaitCursor wait;
+
+	int	rowpos, portalpos;
+	int	x, y;
+	string oid, uid;
+
+	x = contentsX();
+	y = contentsY();
+	rowpos = rowAt(y);
+
+	if(rowpos == 0)
+	{
+		wait.resetWaitCursor();
+		return;
+	}
+	rowpos--;
+
+	while(rowpos >= 0)
+	{
+		portalpos = gridToPortalRowVector_[rowpos];
+		portal_->fetchRow(portalpos);
+
+		oid = portal_->getData(objectIdPos_);
+		uid = portal_->getData(uniqueIdPos_);
+
+		ObjectInfo& info = objectMap_[oid];
+		int status = info.status_;
+		if(uid.empty() == false)
+			status = info.uniqueMap_[uid];
+
+		if (status & 0x2)
+			break;
+		rowpos--;
+	}
+
+
+	if (rowpos < 0)
+	{
+		wait.resetWaitCursor();
+		return;
+	}
+
+	y = rowPos(rowpos);
+	setContentsPos (x, y);
+
+	clearSelection(true);
+	refresh();
+}
+
+void TeQtGrid::invertSelectionSlot()
+{
+	TeWaitCursor wait;
+
+	set<string> drawSet;
+	map<string, int>::iterator uit;
+	string oid, uid;
+
+	map<string, ObjectInfo>::iterator oit;
+	for(oit =  objectMap_.begin(); oit != objectMap_.end(); oit++)
+	{
+		ObjectInfo& info = oit->second;
+		if(info.status_ & 0x2)	//queried object -> sets it to selected
+		{
+			for(uit = info.uniqueMap_.begin(); uit != info.uniqueMap_.end(); uit++)
+				uit->second &= 0x1;
+			info.status_ &= 0x1;
+			for(uit = info.uniqueMap_.begin(); uit != info.uniqueMap_.end(); uit++)
+				uit->second |= 0x1;
+			info.status_ |= 0x1;
+		}
+		for(uit = info.uniqueMap_.begin(); uit != info.uniqueMap_.end(); uit++)
+			uit->second ^= 0x1;
+		info.status_ ^= 0x1;			 
+		drawSet.insert(oit->first);
+	}
+	refresh();
+	if (saveObjectStatus(theme_, drawSet, objectMap_) == false)
+	{
+		QMessageBox::critical(this, tr("Error"),
+			tr("Fail to update the \"c_legend_result\" and \"grid_status\" fields in the collection table!"));
+		return;
+	}
+	emit putColorOnObject(theme_, drawSet);
+}
+
+bool TeQtGrid::getVisColumn(int col)
+{
+	if(col < (int)gridColVisVector_.size())
+		return gridColVisVector_[col];
+	return false;
+}
+
+
+bool TeQtGrid::isIndex(int col) // portal column
+{
+	unsigned int i;
+	string cname = portal_->getAttribute(col).rep_.name_;
+
+	if(cname.find(".") == string::npos)
+	{
+		TeAttributeList attrList;		
+		int nCols = 0;
+		for (i = 0; i < tableVector_.size(); ++i)
+		{
+			attrList = tableVector_[i].attributeList();
+			nCols += attrList.size();
+			if (col < nCols)
+				break;				
+		}
+		
+		cname.insert(0, tableVector_[i].name() + ".");
+//		if(i>0)
+//			cname.insert(0, tableVector_[(i-1)].name() + ".");
+	}
+
+	cname = TeConvertToUpperCase(cname);
+	for(i=0; i<indexVector_.size(); i++)
+	{
+		string s = TeConvertToUpperCase(indexVector_[i]);
+		if(s.find(cname) != string::npos)
+			return true;
+	}
+	return false;
+}
+
+bool TeQtGrid::isDateTimeRegistered(int col) // portal column
+{
+	string cname = portal_->getAttribute(col).rep_.name_;
+	TeTable& t = findTable(cname);
+	string name = cname;
+	int f = name.find(".");
+	if(f >= 0)
+		name = name.substr(f+1);
+	if(t.attInitialTime() == name || t.attFinalTime() == name)
+		return true;
+	return false;
+}
+
+bool TeQtGrid::isSortBy(int col) // portal column
+{
+	string cname = portal_->getAttribute(col).rep_.name_;
+	cname += " ";
+
+//	if(orderBy_.find(cname, string::npos) == string::npos)
+	if(orderBy_.find(cname) == string::npos)
+		return false;
+	return true;
+}
+
+bool TeQtGrid::isExternalTable(int col) // portal column
+{
+	unsigned int c;
+	for(c=0; c<gridToPortalColVector_.size(); c++)
+	{
+		if(gridToPortalColVector_[c] == col)
+			break;
+	}
+
+	TeTable& T = findTable(c);
+	if(T.tableType() == TeAttrExternal)
+		return true;
+	else
+		return false;
+}
+
+string TeQtGrid::getObject(int row)
+{
+	int portalpos = gridToPortalRowVector_[row];
+	portal_->fetchRow(portalpos);
+
+	string oid = portal_->getData(objectIdPos_);
+	return oid;
+}
+
+void TeQtGrid::gridInformation()
+{
+	if(showGridInformation_ == false)
+		return;
+
+	int orows = 0, opointed = 0, oqueried = 0, opqs = 0;
+	int pointed = 0, queried = 0, pqs = 0;
+	int rows = numRows();
+	map<string, ObjectInfo>::iterator it = objectMap_.begin();
+
+	while (it != objectMap_.end())
+	{
+		orows++;
+		ObjectInfo& info = it->second;
+		int leg_res = info.status_;
+		if(leg_res == 1)
+			opointed++;
+		else if(leg_res == 2)
+			oqueried++;
+		else if(leg_res == 3)
+		{
+			opointed++;
+			oqueried++;
+			opqs++;
+		}
+
+		map<string, int> uMap = info.uniqueMap_;
+		if(uMap.size())
+		{
+			map<string, int>::iterator uit = uMap.begin();
+			while(uit != uMap.end())
+			{
+				int gStatus = uit->second;
+				if(gStatus == 1)
+					pointed++;
+				else if(gStatus == 2)
+					queried++;
+				else if(gStatus == 3)
+				{
+					pointed++;
+					queried++;
+					pqs++;
+				}
+				uit++;
+			}
+		}
+		it++;
+	}
+
+	string sorows = Te2String(orows);
+	string sopointed = Te2String(opointed);
+	string soqueried = Te2String(oqueried);
+	string sopqs = Te2String(opqs);
+	string srows = Te2String(rows);
+	string spointed = Te2String(pointed);
+	string squeried = Te2String(queried);
+	string spqs = Te2String(pqs);
+
+	if(orows != rows || opointed != pointed || oqueried != queried || opqs != pqs)
+	{
+		sorows += "/" + srows;
+		sopointed += "/" + spointed;
+		soqueried += "/" + squeried;
+		sopqs += "/" + spqs;
+	}
+
+	QString msg = tr("Number of Rows:") + " " + sorows.c_str() + ", " + tr("Pointed:") + " " + sopointed.c_str();
+	msg += ", " + tr("Queried:") + " " + soqueried.c_str() + ", " + tr("Pointed and Queried:") + " " + sopqs.c_str();
+	emit displayGridInformation(msg);
+}
+
+void TeQtGrid::endEdit(int row, int col, bool accept, bool replace)
+{
+	if(accept && replace)
+		writeCell();
+	else
+		QTable::endEdit(row, col, accept, replace);
+}
+
+
+void TeQtGrid::columnWidthChanged(int col)
+{
+	if(doRepaint_)
+		refresh();
+	QTable::columnWidthChanged(col);
+}
+
+void TeQtGrid::insertObjectIntoCollection(string newId, string newTId)
+{
+	doRepaint_ = false;
+	ObjectInfo	info;
+
+	string oid = newId;
+	string uid = newId;
+	if(newTId.empty() == false)
+	{
+		uid += newTId;
+		info.uniqueMap_[uid] = 1;
+		unique2ObjectMap_[uid] = oid;
+	}
+	else
+	{
+		info.uniqueMap_[oid] = 1;
+		unique2ObjectMap_[oid] = oid;
+	}
+
+	info.status_ = 1;
+	objectMap_[oid] = info;
+
+	portalRow2UniqueIdVector_.push_back(uid);
+
+	int numRows = portalRow2UniqueIdVector_.size();
+	gridToPortalRowVector_.push_back(numRows - 1);
+	doRepaint_ = true;
+	setNumRows(numRows);
+}
+
+void TeQtGrid::deletePointedLines()
+{
+	doRepaint_ = false;
+	unsigned int	i, j;
+	string oid, uid;
+	vector<string> oidVec;
+	map<string, vector<string> > uidMap;
+
+	map<string, ObjectInfo>::iterator it = objectMap_.begin();
+	while(it != objectMap_.end())
+	{
+		ObjectInfo	info = (*it).second;
+		if(info.status_ == 1 || info.status_ == 3)
+		{
+			oid = (*it).first;
+			uid.clear();
+			map<string, int>::iterator uit = info.uniqueMap_.begin();
+			vector<string> uidVec;
+			while(uit != info.uniqueMap_.end())
+			{
+				if((*uit).second == 1 || (*uit).second == 3)
+				{
+					uid = (*uit).first;
+					uidVec.push_back(uid);
+				}
+				uit++;
+			}
+
+			if(uidVec.size() == 0)
+			{
+				uidVec.push_back(oid);
+			}
+			uidMap[oid] = uidVec;
+			oidVec.push_back(oid);
+		}
+		it++;
+	}
+
+	vector<string> iVec;
+	for(i=0; i<oidVec.size(); i++)
+	{
+		oid = oidVec[i];
+		ObjectInfo&	info = objectMap_[oid];
+		vector<string> uidVec = uidMap[oid];
+
+		for(j=0; j<uidVec.size(); j++)
+		{
+			string s = uidVec[j];
+			iVec.push_back(s);
+			info.uniqueMap_.erase(s);
+			unique2ObjectMap_.erase(s);
+		}
+		if(info.uniqueMap_.size() == 0)
+			objectMap_.erase(oid);
+	}
+
+	vector<int> jVec;
+	vector<string> copy1(portalRow2UniqueIdVector_.begin(), portalRow2UniqueIdVector_.end());
+	portalRow2UniqueIdVector_.clear();
+	for(i=0; i<copy1.size(); i++)
+	{
+		string ps = copy1[i];
+		for(j=0; j<iVec.size(); j++)
+		{
+			string s = iVec[j];
+			if(ps == s)
+			{
+				jVec.push_back(i);
+				break;
+			}
+		}
+		if(j == iVec.size())
+			portalRow2UniqueIdVector_.push_back(ps);
+	}
+
+	vector<int> copy2(gridToPortalRowVector_.begin(), gridToPortalRowVector_.end());
+	gridToPortalRowVector_.clear();
+	for(i=0; i<copy2.size(); i++)
+	{
+		int ps = copy2[i];
+		for(j=0; j<jVec.size(); j++)
+		{
+			int s = jVec[j];
+			if(ps == s)
+				break;
+		}
+		if(j == jVec.size())
+			gridToPortalRowVector_.push_back(ps);
+	}
+
+	for(i=jVec.size()-1; (int)i>=0; i--)
+	{
+		int s = jVec[i];
+		for(j=0; j<gridToPortalRowVector_.size(); j++)
+		{
+			int ss = gridToPortalRowVector_[j];
+			if(ss >= s)
+				gridToPortalRowVector_[j] = ss - 1;
+		}
+	}
+
+	int numRows = portalRow2UniqueIdVector_.size();
+	doRepaint_ = true;
+	setNumRows(numRows);
+}
+
+bool TeQtGrid::hasPointedLine()
+{
+	map<string, ObjectInfo>::iterator it = objectMap_.begin();
+
+	while(it != objectMap_.end())
+	{
+		ObjectInfo	info = (*it).second;
+		if(info.status_ == 1 || info.status_ == 3)
+			return true;
+		it++;
+	}
+
+	return false;
+}
+
+void TeQtGrid::goToLastLine()
+{
+	int nRows = numRows();
+	int iniRow = nRows - visibleLines_;
+
+	doRepaint_ = true;
+	int x = columnAt(gridX_);
+	int y = rowPos(iniRow);
+	setContentsPos(x, y);
+	refresh();
+}
+
+void TeQtGrid::goToLastColumn()
+{
+	int x = contentsWidth() - visibleWidth();
+
+	doRepaint_ = true;
+	int y = contentsY();
+	setContentsPos(x, y);
+	refresh();
+}
+
+vector<int> TeQtGrid::getSelectedColumns()
+{
+	int i, j;
+	vector<int> colVec;
+
+	for (i = 0; i < numCols(); i++)
+	{
+		if(gridColVisVector_[i])
+		{
+			if (isColumnSelected(i, true) == true)
+			{
+				j = gridToPortalColVector_[i];
+				colVec.push_back(j);
+			}
+		}
+	}
+	return colVec;
+}
+
+void TeQtGrid::arrangeColumns(TeAttrTableVector cTableVec)
+{
+	int	i, j, k, m;
+	TeAttributeList CAL;
+	TeAttributeList	AL;
+	vector<int> cVec;
+
+	for(i=m=0; (unsigned int)i<cTableVec.size(); i++)
+	{
+		TeTable ct = cTableVec[i];
+		CAL = ct.attributeList();
+
+		TeTable t = tableVector_[i];
+		AL = t.attributeList();
+
+		if(AL.size() > CAL.size())
+		{
+			for(j=0; (unsigned int)j<AL.size(); j++, m++)
+			{
+				TeAttribute a = AL[j];
+				for(k=0; (unsigned int)k<CAL.size(); k++)
+				{
+					TeAttribute ca = CAL[k];
+					if(TeConvertToUpperCase(a.rep_.name_) == TeConvertToUpperCase(ca.rep_.name_))
+						break;
+				}
+				if((unsigned int)k == CAL.size())
+					cVec.push_back(m);
+			}
+		}
+		else if(AL.size() < CAL.size())
+		{
+			for(j=0; (unsigned int)j<CAL.size(); j++, m++)
+			{
+				TeAttribute a = CAL[j];
+				for(k=0; (unsigned int)k<AL.size(); k++)
+				{
+					TeAttribute ca = AL[k];
+					if(TeConvertToUpperCase(a.rep_.name_) == TeConvertToUpperCase(ca.rep_.name_))
+						break;
+				}
+				if((unsigned int)k == AL.size())
+					cVec.push_back(m);
+			}
+		}
+		else
+			m += (int)AL.size();
+	}
+
+//	TeAttributeList& attrList = portal_->getAttributeList();
+	int nCols = numCols();
+	int nOldCols = gridColVisVector_.size();
+	vector<bool> cVisVec(gridColVisVector_.begin(), gridColVisVector_.end());
+	vector<int> cSwapVec(gridToPortalColVector_.begin(), gridToPortalColVector_.end());
+	gridColVisVector_.clear();
+	gridToPortalColVector_.clear();
+
+	bool added = false;
+	if(nCols > nOldCols)
+		added = true;
+
+	std::sort(cVec.begin(), cVec.end());
+	if(cVec.size())
+	{
+		if(added)
+		{
+			for(i=nOldCols; i<nCols; i++)
+				cVisVec.push_back(true);
+			gridColVisVector_ = vector<bool>(cVisVec.begin(), cVisVec.end());
+
+			for(i=0; (unsigned int)i<cVec.size(); i++)
+			{
+				k = cVec[i];
+				for(j=0; (unsigned int)j<cSwapVec.size(); j++)
+				{
+					int v = cSwapVec[j];
+					if(v >= k)
+						cSwapVec[j] = v + 1;
+				}
+				cSwapVec.push_back(k);
+			}
+			gridToPortalColVector_ = vector<int>(cSwapVec.begin(), cSwapVec.end());
+		}
+		else
+		{
+			for(i=j=0; (unsigned int)i<cVec.size(); i++)
+			{
+				k = cVec[i];
+				while(j < k)
+				{
+					bool b = cVisVec[j];
+					gridColVisVector_.push_back(b);
+					j++;
+				}
+				j = k + 1;
+			}
+			while((unsigned int)j < cVisVec.size())
+			{
+				bool b = cVisVec[j];
+				gridColVisVector_.push_back(b);
+				j++;
+			}
+
+			for(i=0; (unsigned int)i<cVec.size(); i++)
+			{
+				k = cVec[i];
+				for(j=0; (unsigned int)j<cSwapVec.size(); j++)
+				{
+					int kk = cSwapVec[j];
+					if(kk != k)
+						gridToPortalColVector_.push_back(kk);
+				}
+				cSwapVec.clear();
+				cSwapVec = vector<int>(gridToPortalColVector_.begin(), gridToPortalColVector_.end());
+				gridToPortalColVector_.clear();
+			}
+
+			for(i = (int)cVec.size() - 1; i>=0; i--)
+			{
+				k = cVec[i];
+				for(j=0; (unsigned int)j<cSwapVec.size(); j++)
+				{
+					int v = cSwapVec[j];
+					if(v >= k)
+						cSwapVec[j] = v - 1;
+				}
+			}
+			gridToPortalColVector_ = vector<int>(cSwapVec.begin(), cSwapVec.end());
+		}
+	}
+	else
+	{
+		// Set the vector that will contain the order the
+		// grid columns will be shown
+		gridToPortalColVector_.clear();
+		gridColVisVector_.clear();
+		for (i = 0; i < nCols; i++)
+		{
+			gridToPortalColVector_.push_back(i);
+			gridColVisVector_.push_back(true);
+		}
+	}
+}
+
+void TeQtGrid::arrangeGridToPortalRowVector(int col)
+{
+	int i, p, pp;
+	string id, s, ss;
+
+	portal_->freeResult();
+	if (!portal_->query(sql_))
+	{
+		portal_->freeResult();
+		delete portal_;
+		portal_ = 0;
+		return;
+	}
+
+	if(isSortBy(col) == false)
+		return;
+
+	vector<int> cGridToPortal(gridToPortalRowVector_.begin(), gridToPortalRowVector_.end());
+	vector<string> cPortalToUnique(portalRow2UniqueIdVector_.begin(), portalRow2UniqueIdVector_.end());
+	gridToPortalRowVector_.clear();
+	portalRow2UniqueIdVector_.clear();
+
+	while (portal_->fetchRow())
+	{
+		id = portal_->getData(uniqueIdPos_);
+		if(id.empty())
+			id = portal_->getData(objectIdPos_);
+		portalRow2UniqueIdVector_.push_back(id);
+	}
+
+	vector<string>::iterator it;
+	for(i=0; (unsigned int)i<cGridToPortal.size(); i++)
+	{
+		p = cGridToPortal[i];
+		s = cPortalToUnique[p];
+		ss = portalRow2UniqueIdVector_[p];
+		if(s == ss)
+			gridToPortalRowVector_.push_back(p);
+		else
+		{
+			it = std::find(portalRow2UniqueIdVector_.begin(), portalRow2UniqueIdVector_.end(), s);
+			if(it != portalRow2UniqueIdVector_.end())
+				pp = it - portalRow2UniqueIdVector_.begin();
+
+			gridToPortalRowVector_.push_back(pp);
+		}
+	}
+}
+
+void TeQtGridItem::paint(QPainter* p, const QColorGroup& cg,
+						 const QRect& cr, bool selected)
+{
+    QColorGroup g(cg);
+	g.setColor( QColorGroup::Base, color_);
+	QTableItem :: paint(p, g, cr, selected);
+}
+
+
+
+
+
diff --git a/src/terralib/drivers/qt/TeQtGrid.h b/src/terralib/drivers/qt/TeQtGrid.h
new file mode 100755
index 0000000..454caad
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtGrid.h
@@ -0,0 +1,253 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#ifndef  __TERRALIB_INTERNAL_QTGRID_H
+#define  __TERRALIB_INTERNAL_QTGRID_H
+
+#include <qwidget.h>
+#include <qtable.h>
+#include <qcolor.h> 
+#include <qlabel.h>
+#include <qpopupmenu.h>
+#include <vector>
+#include <map>
+#include <set>
+#include <string>
+#include "TeDatabase.h"
+#include "TeAppTheme.h"
+#include "TeApplicationUtils.h"
+
+using namespace std;
+
+class TeQtGrid : public QTable
+{
+	Q_OBJECT
+
+protected:
+	TeDatabase				*db_;
+	TeAppTheme		*theme_;
+	TeDatabasePortal		*portal_;
+	string					sqlJoin_;
+	string					orderBy_;
+	string					sql_;
+	string					CT_;
+	string					CTE_;
+	vector<string>			indexVector_;
+	vector<TeTable>			tableVector_;
+	bool					editing_;
+	bool					doRefresh_;
+	bool					doRepaint_;
+	bool					shiftKeyPressed_;
+	bool					showGridInformation_;
+	int						uniqueIdPos_;
+	int						objectIdPos_;
+	int						resultIdPos_;
+	int						gridStatusPos_;
+	int						gridX_, gridY_;
+	int						iLine_, fLine_;
+	int						iCol_, fCol_;
+	int						gridWidth_, gridHeight_;
+	int						visibleLines_, visibleCols_;
+	long					lastLinePressed_;
+	long					dragLineReleased_;
+	map<string, ObjectInfo>	objectMap_;
+	map<string, string>		unique2ObjectMap_;
+	vector<int>				gridToPortalRowVector_;
+	vector<int>				gridToPortalColVector_;
+	vector<bool>			gridColVisVector_;
+	vector<string>			portalRow2UniqueIdVector_;
+	int						rowToEdit_;
+	int						colToEdit_;
+	bool					verticalEdition_;
+	QPopupMenu				*popupHorizHeader_;
+	QPopupMenu				*popupVertHeader_;
+	QPopupMenu				*popupViewport_;
+	bool					columnDragEnabled_;
+	bool					mousePressedOnHorizontalHeader_;
+
+	virtual bool eventFilter(QObject*, QEvent*);
+
+	virtual void drawContents (QPainter *qp, int clipx, int clipy,
+							   int clipw, int cliph);
+
+	//void sort(vector<int> cols, string order);
+
+	bool writeCell();
+
+	void editNextRow();
+
+	void editNextColumn();
+	
+	void update();
+
+	void goToEditNewCell();
+
+	virtual void endEdit(int row, int col, bool accept, bool replace);
+
+	void arrangeColumns(TeAttrTableVector cTableVec);
+	
+public:
+
+	bool autoPromote_;
+
+	TeQtGrid (QWidget* parent = 0, const char* name = 0);
+
+	~TeQtGrid();
+
+	void init(TeAppTheme *theme);
+
+	void initPortal();
+
+	void updatePortalContents();
+
+	QPopupMenu* popupHorizHeader()
+		{ return popupHorizHeader_; }
+
+	QPopupMenu* popupVertHeader()
+		{ return popupVertHeader_; }
+
+	QPopupMenu* popupViewport()
+		{ return popupViewport_; }
+
+	TeDatabasePortal* getPortal()
+		{ return portal_; }
+	TeAppTheme* getTheme() 
+    {  return theme_;} 
+
+
+	bool isIndex(int col);
+
+	bool isDateTimeRegistered(int col);
+
+	bool isSortBy(int col);
+
+	bool isExternalTable(int col);
+
+	TeTable& findTable(int col);
+
+	TeTable& findTable(string colName);
+
+	void adjustColumns();
+
+	void swapColumns(int col1 = -1, int col2 = -1);
+
+	int	getColumn(int col) {return gridToPortalColVector_[col];}
+
+	void setVisColumn (bool vis, int col=-1);
+
+	bool getVisColumn (int col);
+
+	void putColorOnGrid(set<string> uniqueIdSet, set<string> objectIdSet, string operation, string attrQuery = "");
+
+	void setVerticalEdition(bool flag);
+
+	void refresh();
+
+	void clear();
+
+	void clearPortal();
+
+	string	getObject(int row);
+
+	bool isVerticalEdition() { return verticalEdition_; }
+
+	bool showGridInformation() { return showGridInformation_;}
+
+	void showGridInformation(bool b) { showGridInformation_ = b;}
+
+	void gridInformation ();
+
+	void insertObjectIntoCollection(string newId, string newTId = "");
+
+	void goToLastLine();
+
+	void goToLastColumn();
+
+	bool hasPointedLine();
+
+	void deletePointedLines();
+
+	vector<int> getSelectedColumns();
+
+	void arrangeGridToPortalRowVector(int col);
+
+public slots:
+	void mouseReleasedOnVerticalHeaderSlot(int lin);
+
+	void promotePointedObjectsSlot();
+
+	void promoteQueriedObjectsSlot();
+
+	void sortAscOrderSlot();
+
+	void sortDescOrderSlot();
+
+	void sort(vector<int> cols, string order);
+
+	void removeQueryColorSlot();
+
+	void removePointingColorSlot();
+
+	void scrollToPrevPointedObjectSlot();
+
+	void scrollToNextPointedObjectSlot();
+
+	void scrollToPrevQueriedObjectSlot();
+
+	void scrollToNextQueriedObjectSlot();
+
+	void invertSelectionSlot();
+
+protected slots:
+	void columnWidthChanged(int col);
+
+signals:
+	void putColorOnObject(TeAppTheme*, set<string>&);
+	void horizHeaderSignal(int);
+	void vertHeaderSignal(int);
+	void viewportSignal();
+	void vertHeaderLeftDblClickSignal(int);
+	void linkTable(string, string, string);
+	void gridChangedSignal();
+	void displayGridInformation(QString);
+	void clearGridInformation();
+};
+
+
+
+
+class TeQtGridItem : public QTableItem
+{
+	QColor color_;
+
+public:
+    TeQtGridItem(QTable *t, EditType et, const QString &txt)
+		: QTableItem( t, et, txt )
+	{}
+
+	void setColor(QColor& c)
+	{ color_.setRgb(c.red(), c.green(), c.blue()); }
+
+    void paint(QPainter *p, const QColorGroup &cg,
+		       const QRect &cr, bool selected );
+};
+
+#endif
diff --git a/src/terralib/drivers/qt/TeQtGridSource.cpp b/src/terralib/drivers/qt/TeQtGridSource.cpp
new file mode 100755
index 0000000..954d69e
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtGridSource.cpp
@@ -0,0 +1,632 @@
+#include <TeQtGridSource.h>
+#include <TeAppTheme.h>
+
+
+bool TeQtGridSource::setPortal(TeAppTheme* theme)
+{
+	if (theme == 0)
+	{
+		errorMessage_ = "A theme must be passed to the setPortal function";
+		return false;
+	}
+
+	unsigned int i;
+	int k = 0;
+	string uid;
+
+	clearPortal();
+	uid2PortalRowMap_.clear();
+	grid2PortalRowVec_.clear();
+	portal2GridRowVec_.clear();
+	grid2PortalColVec_.clear();
+
+	theme_ = theme;
+
+	TeDatabase* db = ((TeTheme*)theme_->getTheme())->layer()->database();
+	portal_ = db->getPortal();
+
+	// Get the theme tables
+	vector<TeTable> tableVec;
+	((TeTheme*)theme_->getTheme())->getAttTables(tableVec);
+
+	orderBy_ = " ORDER BY ";
+	for (i = 0; i < tableVec.size(); ++i)
+	{
+		if (i != 0)
+			orderBy_ += ",";
+		orderBy_ += tableVec[i].name() + "." + tableVec[i].uniqueName();
+	}
+
+	string whereClause;
+//	string whereClause = ((TeTheme*)theme_->getTheme())->getWhereClause();
+	if (whereClause.empty() == false)
+		whereClause = " WHERE " + whereClause;
+	string q = ((TeTheme*)theme_->getTheme())->sqlJoin() + whereClause + orderBy_;
+
+	if (portal_->query(q) == false)
+	{
+		errorMessage_ = portal_->getDatabase()->errorMessage();
+		delete portal_;
+		portal_ = 0;
+		return false;
+	}
+
+	nRows_ = portal_->numRows();
+	nCols_ = portal_->numFields();
+
+	while (portal_->fetchRow())
+	{
+		uid = portal_->getData(tableVec[0].uniqueName());
+		for (i = 1; i < tableVec.size(); ++i)
+		{
+			string s = portal_->getData(tableVec[i].uniqueName());
+			if (s.empty() == true)
+				s = " ";
+
+			uid += s;
+		}
+		uid2PortalRowMap_[uid] = k;
+
+		grid2PortalRowVec_.push_back(k);
+		portal2GridRowVec_.push_back(k++);
+	}
+
+	// Initialize the relation between the grid columns and the portal columns
+	for (k = 0; k < nCols_; ++k)
+		grid2PortalColVec_.push_back(k);
+
+	// Set the grid colors vector
+	setGridColorsVec();
+
+	emit dataChanged();
+	emit setColNamesSignal();
+	return true;
+}
+
+
+bool TeQtGridSource::reloadPortal(bool updateGrid2PortalColRelation)
+{
+	if (portal_ != 0)
+		portal_->freeResult();
+	else
+	{
+		portal_ = ((TeTheme*)theme_->getTheme())->layer()->database()->getPortal();
+		if (portal_ == 0)
+		{
+			errorMessage_ = portal_->getDatabase()->errorMessage();
+			return false;
+		}
+	}
+
+	// Reload portal
+	string whereClause;
+//	string whereClause = ((TeTheme*)theme_->getTheme())->getWhereClause();
+	if (whereClause.empty() == false)
+		whereClause = " WHERE " + whereClause;
+
+	string q = ((TeTheme*)theme_->getTheme())->sqlJoin() + whereClause + orderBy_;
+	if (portal_->query(q) == false)
+	{
+		errorMessage_ = portal_->getDatabase()->errorMessage();
+		delete portal_;
+		portal_ = 0;
+		return false;
+	}
+
+	nRows_ = portal_->numRows();
+	nCols_ = portal_->numFields();
+
+	if (updateGrid2PortalColRelation == true)
+	{
+		grid2PortalColVec_.clear();
+		for (int i = 0; i < nCols_; ++i)
+			grid2PortalColVec_.push_back(i);
+	}
+
+	// Set the grid colors vector
+	setGridColorsVec();
+
+	emit dataChanged();
+	emit setColNamesSignal();
+	return true;
+}
+
+void TeQtGridSource::clearPortal()
+{
+	if (portal_)
+	{
+		delete portal_;
+		portal_ = 0;
+	}
+
+	errorMessage_.clear();
+	gridColorsVec_.clear();
+
+	nRows_ = nCols_ = 0;
+}
+
+
+bool TeQtGridSource::changePortalQuery(const string& orderBy)
+{
+	if (orderBy.empty() == true)
+	{
+		errorMessage_ = "The string that specifies the order must not be empty"; 
+		return false;
+	}
+
+	orderBy_ = orderBy;
+
+	portal_->freeResult();
+	string queryStr = ((TeTheme*)theme_->getTheme())->sqlJoin() + orderBy_;
+	if (portal_->query(queryStr) == false)
+	{
+		errorMessage_ = portal_->getDatabase()->errorMessage();
+		delete portal_;
+		portal_ = 0;
+		return false;
+	}
+
+	// Get the theme tables
+	vector<TeTable> tableVec;
+	((TeTheme*)theme_->getTheme())->getAttTables(tableVec);
+
+	unsigned int i;
+	int k = 0;
+	string uid;
+	while (portal_->fetchRow())
+	{
+		uid = portal_->getData(tableVec[0].uniqueName());
+		for (i = 1; i < tableVec.size(); ++i)
+			uid += portal_->getData(tableVec[i].uniqueName());
+		uid2PortalRowMap_[uid] = k;
+
+		grid2PortalRowVec_.push_back(k);
+		portal2GridRowVec_.push_back(k++);
+	}
+
+	// Initialize the relation between the grid columns and the portal columns
+	for (k = 0; k < nCols_; ++k)
+		grid2PortalColVec_.push_back(k);
+
+	// Set the grid colors vector
+	setGridColorsVec();
+
+	emit dataChanged();
+	return true;
+}
+
+QVariant TeQtGridSource::cell(int row, int col)
+{
+	QVariant v;
+	int portalRow = grid2PortalRowVec_[row];
+	int portalCol = grid2PortalColVec_[col];
+
+	if (portal_->fetchRow(portalRow))
+		v = portal_->getData(portalCol);
+
+	return v;
+}
+
+
+void TeQtGridSource::setCell(int row, int col, const QVariant &v)
+{
+	int portalRow = grid2PortalRowVec_[row];
+	int portalCol = grid2PortalColVec_[col];
+
+	// Get the name of the attribute that was edited
+	string attrNameEdited = ((TeTheme*)theme_->getTheme())->getAttribute(portalCol);
+
+	// Get the name of the theme table whose contents will be changed
+	string tableNameToEdit = ((TeTheme*)theme_->getTheme())->getTableName(attrNameEdited);
+
+	string newValue = v.toString().latin1();
+
+	// Find the unique name(primary key) of the table
+	TeTable table;
+	bool b = ((TeTheme*)theme_->getTheme())->getTable(table, tableNameToEdit);
+	if (b == false)
+	{
+		errorMessage_ = "There is no table with this name";
+		return;
+	}
+	string uniqueName = table.uniqueName();
+
+	// Check if the attribute to be edited is a primary key
+	// If positive, do not allow to edit this attribute
+	string attr;
+	size_t pos = attrNameEdited.find(".");
+	if (pos != string::npos)
+		attr = attrNameEdited.substr(pos + 1);
+	if (attr == uniqueName)
+	{
+		errorMessage_ = "This attribute cannot be edited because it is a primary key";
+		return;
+	}
+
+	// Find the name of the register corresponding to the unique name
+	string uniqueValue;
+	if (portal_->fetchRow(portalRow) == true)
+		uniqueValue = portal_->getData(uniqueName);
+
+	// Update the table in the database
+	TeDatabase* db = ((TeTheme*)theme_->getTheme())->layer()->database();
+	string q = "UPDATE " + tableNameToEdit + " SET " + attrNameEdited + " = '";
+	q += newValue + "' WHERE " + uniqueName + " = '" + uniqueValue + "'";
+	if (db->execute(q) == false)
+	{
+		errorMessage_ = db->errorMessage();
+		return;
+	}
+
+	// Update the portal due the changes in the database
+	portal_->freeResult();
+	string sqlJoin = ((TeTheme*)theme_->getTheme())->sqlJoin() + orderBy_;
+	if (portal_->query(sqlJoin) == false)
+	{
+		errorMessage_ = db->errorMessage();
+		delete portal_;
+		return;
+	}
+
+	emit dataChanged();
+}
+
+string TeQtGridSource::getUniqueId(int gridRow)
+{
+	string uid;
+	unsigned int i;
+
+	vector<TeTable> tableVec;
+	((TeTheme*)theme_->getTheme())->getAttTables(tableVec);
+
+	int portalRow = grid2PortalRowVec_[gridRow];
+	if (portal_->fetchRow(portalRow))
+	{
+		for (i = 0; i < tableVec.size(); ++i)
+		{
+			string s = portal_->getData(tableVec[i].uniqueName());
+			if (s.empty() == true)
+				s = " ";
+
+			uid += s;
+		}
+	}
+	return uid;
+}
+
+string TeQtGridSource::getObjectId(int gridRow)
+{
+	string objectId;
+
+	vector<TeTable> tableVec;
+	((TeTheme*)theme_->getTheme())->getAttTables(tableVec);
+
+	int portalRow = grid2PortalRowVec_[gridRow];
+	if (portal_->fetchRow(portalRow))
+		objectId = portal_->getData(tableVec[0].uniqueName());
+
+	return objectId;
+}
+
+void TeQtGridSource::setGridColorsVec()
+{
+	if (theme_ == 0)
+		return;
+
+	TeColor c;
+	QColor qc;
+
+	gridColorsVec_.clear();
+	gridColorsVec_.push_back(Qt::white);
+
+	c = ((TeTheme*)theme_->getTheme())->pointingLegend().visual(TePOLYGONS)->color();
+	qc = QColor(c.red_,c.green_,c.blue_);
+	gridColorsVec_.push_back(qc);
+
+	c = ((TeTheme*)theme_->getTheme())->queryLegend().visual(TePOLYGONS)->color();
+	qc = QColor(c.red_,c.green_,c.blue_);
+	gridColorsVec_.push_back(qc);
+
+	c = ((TeTheme*)theme_->getTheme())->queryAndPointingLegend().visual(TePOLYGONS)->color();
+	qc = QColor(c.red_,c.green_,c.blue_);
+	gridColorsVec_.push_back(qc);
+
+//	emit cellColorChanged();
+}
+
+QString TeQtGridSource::getPortalInfo(int gridCol)
+{
+	// Get the portal column relative to the given grid column
+	if (gridCol < 0)
+		return QString();
+
+	unsigned int portalCol = grid2PortalColVec_[gridCol];
+
+	// Get the attribute name and the table name associated to the portal column
+	string attrName = ((TeTheme*)theme_->getTheme())->getAttribute(portalCol);
+	string tableName = ((TeTheme*)theme_->getTheme())->getTableName(attrName);
+
+	// Get the representation of a table given an attribute name
+	TeTable table;
+
+	if (((TeTheme*)theme_->getTheme())->getTable(table, tableName) == false)
+		return QString();
+
+	QString qStr = tr("Table:") + " ";
+	qStr += tableName.c_str();
+	if(table.tableType() == TeAttrStatic)
+		qStr += " - " + tr("Table type: TeAttrStatic");
+	else if(table.tableType() == TeAttrExternal)
+		qStr += "  " + tr("Table type: TeAttrExternal");
+	else if(table.tableType() == TeAttrEvent)
+		qStr += " - " + tr("Table type: TeAttrEvent");
+	else if(table.tableType() == TeFixedGeomDynAttr)
+		qStr += " - " + tr("Table type: TeFixedGeomDynAttr");
+	else if(table.tableType() == TeDynGeomDynAttr)
+		qStr += " - " + tr("Table type: TeDynGeomDynAttr");
+
+	vector<TeAttribute>& attrVec = portal_->getAttributeList();
+	if(attrVec.size() > portalCol)
+	{
+		qStr += " - " + tr("Column:");
+		qStr += " ";
+		qStr += attrVec[portalCol].rep_.name_.c_str();
+
+		if(attrVec[portalCol].rep_.type_ == TeSTRING)
+		{
+			qStr += " - " + tr("Column type: TeSTRING");
+			qStr += " - " + tr("Num char:");
+			qStr += " ";
+			qStr += Te2String(attrVec[portalCol].rep_.numChar_).c_str();
+		}
+		else if(attrVec[portalCol].rep_.type_ == TeREAL)
+			qStr += "  " + tr("Column type: TeREAL");
+		else if(attrVec[portalCol].rep_.type_ == TeINT)
+			qStr += " - " + tr("Column type: TeINT");
+		else if(attrVec[portalCol].rep_.type_ == TeDATETIME)
+			qStr += " - " + tr("Column type: TeDATETIME");
+
+		// Get the single name of attrName
+		size_t pos = attrName.find(".");
+		if (pos != string::npos)
+			attrName = attrName.substr(pos + 1);
+
+		// Check if the attribute is editable
+		if(table.uniqueName() == attrName)
+			qStr += " - " + tr("Column is not editable");
+		else
+			qStr += " - " + tr("Column is editable");
+	}
+
+	return qStr;
+}
+
+
+vector<string> TeQtGridSource::getItemsToggled(int begin, int end)
+{
+	string item;
+	vector<string> itemVec;
+
+	// Get the theme tables
+	vector<TeTable> tableVec;
+	((TeTheme*)theme_->getTheme())->getAttTables(tableVec);
+
+	for (int i = begin; i <= end; ++i)
+	{
+		if (portal_->fetchRow(grid2PortalRowVec_[i]))
+		{
+			item = portal_->getData(tableVec[0].uniqueName());
+			for (unsigned j = 1; j < tableVec.size(); ++j)
+			{
+				string s = portal_->getData(tableVec[j].uniqueName());
+				if (s.empty() == true)
+					s = " ";
+
+				item += s;
+			}
+			itemVec.push_back(item);
+		}
+	}
+
+	return itemVec;
+}
+
+
+bool TeQtGridSource::isDateTimeRegistered(int gridCol)
+{
+	int portalCol = grid2PortalColVec_[gridCol];
+	string fullAttrName = ((TeTheme*)theme_->getTheme())->getAttribute(portalCol);
+
+	size_t pos = fullAttrName.find(".");
+	string tableName = fullAttrName.substr(0, pos);
+	string attrName = fullAttrName.substr(pos + 1);
+
+	// Get the representation of a table given an attribute name
+	TeTable table;
+	if (((TeTheme*)theme_->getTheme())->getTable(table, tableName) == false)
+		return false;
+
+	if(table.attInitialTime() == attrName || table.attFinalTime() == attrName)
+		return true;
+	return false;
+}
+
+
+void TeQtGridSource::sortColumns(const vector<int>& gridColsVec, const string& order)
+{
+	unsigned int i;
+	int portalCol;
+	string fullAttrName;
+
+	orderBy_ = " ORDER BY ";
+
+	for (i = 0; i < gridColsVec.size(); ++i)
+	{
+		portalCol = grid2PortalColVec_[gridColsVec[i]];
+		fullAttrName = ((TeTheme*)theme_->getTheme())->getAttribute(portalCol);
+
+		if (i != 0)
+			orderBy_ += ",";
+
+		orderBy_ += fullAttrName + " " + order;
+	}
+
+	reloadPortal();
+
+	// Update the relationships between the grid and portal rows
+	for (i = 0; i < grid2PortalRowVec_.size(); ++i)
+		grid2PortalRowVec_[i] = i;
+
+	for (i = 0; i < grid2PortalRowVec_.size(); ++i)
+		portal2GridRowVec_[i] = i;
+}
+
+
+/*
+void TeQtGridSource::sortColumns(const vector<int>& colsVec, const string& order)
+{
+	unsigned int i;
+	int portalCol;
+	string fullAttrName;
+
+	string orderBy = " ORDER BY ";
+
+	for (i = 0; i < colsVec.size(); ++i)
+	{
+		portalCol = grid2PortalColVec_[colsVec[i]];
+		fullAttrName = theme_->getAttribute(portalCol);
+
+		if (i != 0)
+			orderBy += ",";
+
+		orderBy += fullAttrName + " " + order;
+	}
+
+	changePortalQuery(orderBy);
+}
+*/
+
+
+
+
+int TeQtGridSource::getNextGridRowPointed(int gridRow)
+{
+	int i;
+	unsigned int j;
+	string oid, uid;
+	map<string, int>& uidStatusMap = ((TeTheme*)theme_->getTheme())->getItemStatusMap();
+
+	// Get the theme tables
+	vector<TeTable> tableVec;
+	((TeTheme*)theme_->getTheme())->getAttTables(tableVec);
+
+	for (i = gridRow; i < nRows_; ++i)
+	{
+		if (portal_->fetchRow(grid2PortalRowVec_[i]))
+		{
+			uid = oid = portal_->getData(tableVec[0].uniqueName());
+			for (j = 1; j < tableVec.size(); ++j)
+				uid += portal_->getData(tableVec[j].uniqueName());
+		}
+
+		int& uidStatus = uidStatusMap[uid];
+		if (uidStatus == TePOINTED || uidStatus == TePOINTED_QUERIED)
+			break;
+		else if (uidStatus == TeDEFAULT)
+			uidStatusMap.erase(uid);
+	}
+
+	return i;
+}
+
+
+int TeQtGridSource::getPrevGridRowPointed(int gridRow)
+{
+	int i;
+	unsigned int j;
+	string oid, uid;
+	map<string, int>& uidStatusMap = ((TeTheme*)theme_->getTheme())->getItemStatusMap();
+
+	// Get the theme tables
+	vector<TeTable> tableVec;
+	((TeTheme*)theme_->getTheme())->getAttTables(tableVec);
+
+	for (i = gridRow; i >= 0; --i)
+	{
+		if (portal_->fetchRow(grid2PortalRowVec_[i]))
+		{
+			uid = oid = portal_->getData(tableVec[0].uniqueName());
+			for (j = 1; j < tableVec.size(); ++j)
+				uid += portal_->getData(tableVec[j].uniqueName());
+		}
+
+		int& uidStatus = uidStatusMap[uid];
+		if (uidStatus == TePOINTED || uidStatus == TePOINTED_QUERIED)
+			break;
+		else if (uidStatus == TeDEFAULT)
+			uidStatusMap.erase(uid);
+	}
+
+	return i;
+}
+
+
+int TeQtGridSource::getNextGridRowQueried(int gridRow)
+{
+	int i;
+	unsigned int j;
+	string oid, uid;
+	map<string, int>& uidStatusMap = ((TeTheme*)theme_->getTheme())->getItemStatusMap();
+
+	// Get the theme tables
+	vector<TeTable> tableVec;
+	((TeTheme*)theme_->getTheme())->getAttTables(tableVec);
+
+	for (i = gridRow; i < nRows_; ++i)
+	{
+		if (portal_->fetchRow(grid2PortalRowVec_[i]))
+		{
+			uid = oid = portal_->getData(tableVec[0].uniqueName());
+			for (j = 1; j < tableVec.size(); ++j)
+				uid += portal_->getData(tableVec[j].uniqueName());
+		}
+
+		int& uidStatus = uidStatusMap[uid];
+		if (uidStatus == TeQUERIED || uidStatus == TePOINTED_QUERIED)
+			break;
+		else if (uidStatus == TeDEFAULT)
+			uidStatusMap.erase(uid);
+	}
+
+	return i;
+}
+
+int TeQtGridSource::getPrevGridRowQueried(int gridRow)
+{
+	int i;
+	unsigned int j;
+	string oid, uid;
+	map<string, int>& uidStatusMap = ((TeTheme*)theme_->getTheme())->getItemStatusMap();
+
+	// Get the theme tables
+	vector<TeTable> tableVec;
+	((TeTheme*)theme_->getTheme())->getAttTables(tableVec);
+
+	for (i = gridRow; i >= 0; --i)
+	{
+		if (portal_->fetchRow(grid2PortalRowVec_[i]))
+		{
+			uid = oid = portal_->getData(tableVec[0].uniqueName());
+			for (j = 1; j < tableVec.size(); ++j)
+				uid += portal_->getData(tableVec[j].uniqueName());
+		}
+
+		int& uidStatus = uidStatusMap[uid];
+		if (uidStatus == TeQUERIED || uidStatus == TePOINTED_QUERIED)
+			break;
+		else if (uidStatus == TeDEFAULT)
+			uidStatusMap.erase(uid);
+	}
+
+	return i;
+}
diff --git a/src/terralib/drivers/qt/TeQtGridSource.h b/src/terralib/drivers/qt/TeQtGridSource.h
new file mode 100755
index 0000000..695d6f5
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtGridSource.h
@@ -0,0 +1,87 @@
+#ifndef TEQTGRIDSOURCE_H
+#define TEQTGRIDSOURCE_H
+
+#include <TeQtDataSource.h>
+#include <TeDatabase.h>
+#include <string>
+
+#include <qcolor.h>
+
+class TeAppTheme;
+
+using namespace std;
+
+
+class TeQtGridSource : public TeQtDataSource
+{
+	Q_OBJECT
+
+public:
+	TeQtGridSource() : theme_(0), portal_(0), nRows_(0), nCols_(0)
+	{ }
+
+	~TeQtGridSource() {}
+
+	bool setPortal(TeAppTheme* theme);
+	bool reloadPortal(bool updateGrid2PortalColRelation = false);
+
+	TeAppTheme* getTheme() const { return theme_; }
+
+	bool changePortalQuery(const string& orderBy);
+
+	string& getOrderBy()
+	{ return orderBy_; }
+
+	void clearPortal();
+
+	QVariant cell(int row, int col);
+	void setCell(int row, int col, const QVariant &text);
+		
+	string getErrorMessage() const { return errorMessage_; }
+
+	int numRows() const { return nRows_; }
+	int numCols() const { return nCols_; }
+
+	string getUniqueId(int gridRow);
+	string getObjectId(int gridRow);
+	QString getPortalInfo(int gridCol);
+
+	vector<QColor>& gridColorsVec() { return gridColorsVec_; }
+
+	map<string, int>& uid2PortalRowMap() { return uid2PortalRowMap_; }
+	vector<int>& grid2PortalRowVec() { return grid2PortalRowVec_; }
+	vector<int>& portal2GridRowVec() { return portal2GridRowVec_; }
+	vector<int>& grid2PortalColVec() { return grid2PortalColVec_; }
+
+	vector<string> getItemsToggled(int begin, int end);
+	bool isDateTimeRegistered(int gridCol);
+	void sortColumns(const vector<int>& gridColsVec, const string& order);
+
+	int getNextGridRowPointed(int gridRow);
+	int getPrevGridRowPointed(int gridRow);
+	int getNextGridRowQueried(int gridRow);
+	int getPrevGridRowQueried(int gridRow);
+
+signals:
+	void setColNamesSignal();
+
+protected slots:
+	void setGridColorsVec();
+
+protected:
+	TeAppTheme* theme_;
+	TeDatabasePortal* portal_;
+	mutable string errorMessage_;
+	vector<QColor> gridColorsVec_;
+	map<string, int> uid2PortalRowMap_;
+	vector<int> grid2PortalRowVec_;
+	vector<int>	portal2GridRowVec_;
+	vector<int> grid2PortalColVec_;
+	string orderBy_;
+
+	int nRows_;
+	int nCols_;
+};
+
+
+#endif
diff --git a/src/terralib/application/qt/TeQtLatEdit.cpp b/src/terralib/drivers/qt/TeQtLatEdit.cpp
old mode 100644
new mode 100755
similarity index 100%
rename from src/terralib/application/qt/TeQtLatEdit.cpp
rename to src/terralib/drivers/qt/TeQtLatEdit.cpp
diff --git a/src/terralib/application/qt/TeQtLatEdit.h b/src/terralib/drivers/qt/TeQtLatEdit.h
old mode 100644
new mode 100755
similarity index 100%
rename from src/terralib/application/qt/TeQtLatEdit.h
rename to src/terralib/drivers/qt/TeQtLatEdit.h
diff --git a/src/terralib/drivers/qt/TeQtLayerItem.cpp b/src/terralib/drivers/qt/TeQtLayerItem.cpp
new file mode 100755
index 0000000..1621dcd
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtLayerItem.cpp
@@ -0,0 +1,43 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#include <TeQtLayerItem.h>
+#include <qpixmap.h>
+#include <images/infolayer.xpm>
+
+
+//Layer item constructor
+TeQtLayerItem::TeQtLayerItem(QListViewItem *parent, 
+		QString name, TeLayer* layer)
+		: TeQtCheckListItem(parent,name), layer_(layer) 
+{
+	type_ = INFOLAYER;
+	QPixmap p(infolayer_xpm);
+	setPixmap(0,p);
+	setRenameEnabled(0,true);
+	sortChildItems(0, true);
+	setSelected(false);
+	setEnabled(true);
+}
+
+
+
+				
diff --git a/src/terralib/drivers/qt/TeQtLayerItem.h b/src/terralib/drivers/qt/TeQtLayerItem.h
new file mode 100755
index 0000000..178f4d6
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtLayerItem.h
@@ -0,0 +1,49 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#ifndef  __TERRALIB_INTERNAL_QTLAYERITEM_H
+#define  __TERRALIB_INTERNAL_QTLAYERITEM_H
+
+#include <TeQtCheckListItem.h>
+
+class TeLayer;
+
+
+class TeQtLayerItem : public TeQtCheckListItem
+{
+public:
+    TeQtLayerItem(QListViewItem *parent, QString text, TeLayer* layer);
+
+	~TeQtLayerItem () {}
+
+	int compare(QListViewItem * i, int col, bool ascending) const
+		{ return QListViewItem::compare(i, col, ascending); }
+
+	QString key(int col, bool ascending) const
+		{ return QListViewItem::key(col, ascending); }
+
+	TeLayer* getLayer() {return layer_;}
+
+protected:
+	TeLayer	*layer_;
+};
+
+#endif
diff --git a/src/terralib/drivers/qt/TeQtLayerItemFCT.cpp b/src/terralib/drivers/qt/TeQtLayerItemFCT.cpp
new file mode 100755
index 0000000..0f8392b
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtLayerItemFCT.cpp
@@ -0,0 +1,44 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#include <TeQtLayerItemFCT.h>
+#include <qpixmap.h>
+//#include <../../../../../terraBase/src/ui/images/infolayer.xpm>
+
+
+//Layer item constructor
+TeQtLayerItem::TeQtLayerItem(QListViewItem *parent, 
+		QString name, TeLayer* layer)
+		: TeQtCheckListItem(parent,name), layer_(layer) 
+{
+	type_ = INFOLAYER;
+//	QPixmap p(infolayer_xpm);
+	QPixmap p = QPixmap::fromMimeSource("infolayer.bmp"); //(database_xpm);
+	setPixmap(0,p);
+	setRenameEnabled(0,true);
+	sortChildItems(0, true);
+	setSelected(false);
+	setEnabled(true);
+}
+
+
+
+				
diff --git a/src/terralib/drivers/qt/TeQtLayerItemFCT.h b/src/terralib/drivers/qt/TeQtLayerItemFCT.h
new file mode 100755
index 0000000..178f4d6
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtLayerItemFCT.h
@@ -0,0 +1,49 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#ifndef  __TERRALIB_INTERNAL_QTLAYERITEM_H
+#define  __TERRALIB_INTERNAL_QTLAYERITEM_H
+
+#include <TeQtCheckListItem.h>
+
+class TeLayer;
+
+
+class TeQtLayerItem : public TeQtCheckListItem
+{
+public:
+    TeQtLayerItem(QListViewItem *parent, QString text, TeLayer* layer);
+
+	~TeQtLayerItem () {}
+
+	int compare(QListViewItem * i, int col, bool ascending) const
+		{ return QListViewItem::compare(i, col, ascending); }
+
+	QString key(int col, bool ascending) const
+		{ return QListViewItem::key(col, ascending); }
+
+	TeLayer* getLayer() {return layer_;}
+
+protected:
+	TeLayer	*layer_;
+};
+
+#endif
diff --git a/src/terralib/drivers/qt/TeQtLegendItem.cpp b/src/terralib/drivers/qt/TeQtLegendItem.cpp
new file mode 100755
index 0000000..c58085f
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtLegendItem.cpp
@@ -0,0 +1,351 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#include <TeQtLegendItem.h>
+#include <TeQtViewsListView.h>
+#include <TeLegendEntry.h>
+#include <qpixmap.h>
+#include <qpainter.h>
+#include <qbitmap.h>
+#include <qimage.h>
+#include <qfontmetrics.h>
+
+
+//Legend item constructor
+TeQtLegendItem::TeQtLegendItem(QListViewItem *parent,
+				QString text, TeLegendEntry *legendEntry)
+	: TeQtCheckListItem(parent, text), legendEntry_(legendEntry)
+{
+	type_ = LEGEND;
+	setRenameEnabled(0,true);
+	setSelected(false);
+	setEnabled(true);
+
+	order_ = parent->childCount();
+
+//	if (legendEntry_ != 0)
+//		createPixmap();
+}
+
+
+QPixmap TeQtLegendItem::createPixmap()
+{
+	int	ww = 21;
+	int	pixh = 16;
+	int	pixw = ww;
+
+	QPixmap	pixmap(ww, pixh);
+	pixmap.fill();
+
+// TePOLYGONS = 1, TeLINES = 2, TePOINTS = 4, TeCELLS = 256
+	bool hasPolygons = true;
+	bool hasCells = true;
+	bool hasLines = true;
+	bool hasPoints = true;
+
+	if(legendEntry_->to().find("mean = ") == string::npos)
+	{
+		TeGeomRepVisualMap& vm = legendEntry_->getVisualMap();
+		if(vm.find(TePOLYGONS) == vm.end())
+		{
+			hasPolygons = false;
+			hasCells = false;
+		}
+		if(vm.find(TeLINES) == vm.end())
+			hasLines = false;
+		if(vm.find(TePOINTS) == vm.end())
+			hasPoints = false;
+
+		if ((hasPolygons || hasCells) && (hasLines == false) && (hasPoints == false))
+			drawPolygonRep(pixw, pixh, 0, &pixmap);
+		else if ((hasPolygons || hasCells) && (hasLines == true) && (hasPoints == false))
+		{
+			pixmap.resize(2*ww, pixh);
+			pixmap.fill();
+			drawPolygonRep(pixw, pixh, 0, &pixmap);
+			drawLineRep(ww, &pixmap);
+		}
+		else if ((hasPolygons || hasCells) && (hasLines == false) && (hasPoints == true))
+		{
+			pixmap.resize(2*ww, pixh);
+			pixmap.fill();
+			drawPolygonRep(pixw, pixh, 0, &pixmap);
+			drawPointRep(pixw, pixh, ww, &pixmap);
+		}
+		else if ((hasPolygons || hasCells) && (hasLines == true) && (hasPoints == true))
+		{
+			pixmap.resize(3*ww, pixh);
+			pixmap.fill();
+			drawPolygonRep(pixw, pixh, 0, &pixmap);
+			drawLineRep(ww, &pixmap);
+			drawPointRep(pixw, pixh, 2*ww, &pixmap);
+		}
+		else if (hasPolygons == false && hasCells == false && hasLines == true && hasPoints == false)
+			drawLineRep(0, &pixmap);
+		else if (hasPolygons == false && hasCells == false && hasLines == false && hasPoints == true)
+			drawPointRep(pixw, pixh, 0, &pixmap);
+		else if (hasPolygons == false && hasCells == false && hasLines == true && hasPoints == true)
+		{
+			pixmap.resize(2*ww, pixh);
+			pixmap.fill();
+			drawLineRep(0, &pixmap);
+			drawPointRep(pixw, pixh, ww, &pixmap);
+		}
+	}
+//	setPixmap(0, pixmap);
+	return pixmap;
+}
+
+
+void TeQtLegendItem::changeVisual(TeLegendEntry *legendEntry)
+{
+	legendEntry_ = legendEntry;
+//	createPixmap();
+}
+
+void TeQtLegendItem::paintCell(QPainter* p, const QColorGroup& /* cg */, int /* column */, int width , int align)
+{
+//	TeQtCheckListItem::paintCell(p, cg, column, width, align);
+	QPixmap pixmap = createPixmap();
+	QRect r(QPoint(0, 0), QPoint(width - 1, height() - 1));
+	p->fillRect(r, QBrush(Qt::white));
+
+	p->drawPixmap(0, 0, pixmap);
+	
+	QRect r1(QPoint(pixmap.width(), 0), QPoint(width - 1, height() - 1));
+	p->drawText(r1, align, text());
+
+	QListView* lv = listView();
+	QFontMetrics fm = lv->fontMetrics();
+	int w1 = lv->treeStepSize() * ( depth() + ( lv->rootIsDecorated() ? 1 : 0) ) + lv->itemMargin();
+	int w = pixmap.width() + fm.width(text()) + w1;
+	lv->setColumnWidth(0, QMAX(lv->columnWidth(0), w));
+}
+
+
+void TeQtLegendItem::drawPolygonRep(int w, int h, int offset, QPixmap *pixmap)
+{
+	QPainter p(pixmap);
+	QBrush	 brush;
+	QColor	 cor;
+	TeColor	 tcor;
+	Qt::BrushStyle	style;
+
+	TeVisual* visual = legendEntry_->visual(TePOLYGONS);
+	int transp = 255 - (visual->transparency() * 255 / 100);
+	tcor = visual->color();
+	cor.setRgb(tcor.red_, tcor.green_, tcor.blue_);
+	TeQtViewsListView* viewsListView = (TeQtViewsListView*) listView();
+	map<TePolyBasicType, Qt::BrushStyle>& brushMap = viewsListView->getBrushStyleMap();
+
+	style = brushMap[(TePolyBasicType)(legendEntry_->visual(TePOLYGONS)->style())];
+	brush.setStyle(style);
+	brush.setColor(cor);
+
+	QRect trect(offset+1, 1, w-2, h-2);
+	QRect rect(0, 0, offset+w-1, h-1);
+
+	int width = rect.width();
+	int height = rect.height();
+
+	int r = width%8;
+	if(r)
+		width += (8-r);
+	r = height%8;
+	if(r)
+		height += (8-r);
+
+	if(width == 0)
+		width = 8;
+	if(height == 0)
+		height = 8;
+
+	QBitmap	bm;
+	bm.resize(width, height);
+	//Fill bitmap with 0-bits: clipping region
+	bm.fill(Qt::color0);
+	QPainter maskPainter(&bm);
+
+	// Draw bitmap with 1-bits: drawing region
+	QBrush bs(Qt::color1, style);
+	QPen pen(Qt::color1, 1);
+	maskPainter.setPen(pen);
+ 	maskPainter.fillRect(trect, bs);
+	maskPainter.end();
+
+	QRegion clipRegion(bm);
+	p.setClipRegion(clipRegion);
+
+	if(visual->transparency() == 0)
+		p.fillRect(trect, brush);
+	else
+	{
+		// set alpha buffer and color
+		QImage img(rect.width(), rect.height(), 32);
+		unsigned int val = (transp << 24) | (cor.red() << 16) | (cor.green() << 8) | cor.blue();
+		img.fill(val);
+		img.setAlphaBuffer(true);
+
+		// plot transparency
+		p.drawPixmap(trect.x(), trect.y(), img);
+	}
+	p.setClipping(false);
+
+	Qt::PenStyle pstyle;
+	uint		pwidth;
+
+	tcor = visual->contourColor();
+	cor.setRgb(tcor.red_, tcor.green_, tcor.blue_);
+	pen.setColor(cor);
+
+	map<TeLnBasicType, Qt::PenStyle>& penMap = viewsListView->getPenStyleMap();
+	pstyle = penMap[(TeLnBasicType)(visual->contourStyle())];
+	pen.setStyle(pstyle);
+
+	pwidth = (Qt::PenStyle) visual->contourWidth();
+	pen.setWidth (pwidth);
+
+	p.setPen(pen);
+	p.drawRect (offset+1+pwidth/2,1+pwidth/2,w-2-pwidth/2,h-2-pwidth/2);
+
+	p.end();
+}
+
+void TeQtLegendItem::drawLineRep(int offset, QPixmap *pixmap)
+{
+	QPainter	p(pixmap);
+	QPen		pen;
+	QColor		cor;
+	TeColor		tcor;
+	Qt::PenStyle style;
+	uint		width;
+
+	TeVisual* visual = legendEntry_->visual(TeLINES);
+
+	tcor = visual->color();
+	cor.setRgb(tcor.red_, tcor.green_, tcor.blue_);
+	pen.setColor(cor);
+
+	TeQtViewsListView* viewsListView = (TeQtViewsListView*) listView();
+	map<TeLnBasicType, Qt::PenStyle>& penMap = viewsListView->getPenStyleMap();
+
+	style = penMap[(TeLnBasicType)(legendEntry_->visual(TeLINES)->style())];
+	pen.setStyle(style);
+
+	width = (Qt::PenStyle) legendEntry_->visual(TeLINES)->width();
+	pen.setWidth (width);
+
+	p.setPen(pen);
+	p.moveTo(offset+1, 5);
+	p.lineTo(offset+3, 5);
+	p.lineTo(offset+6, 6);
+	p.lineTo(offset+8, 8);
+	p.lineTo(offset+10, 9);
+	p.lineTo(offset+14, 10);
+	p.lineTo(offset+16, 10);
+	p.lineTo(offset+18, 9);
+	p.lineTo(offset+19, 9);
+	p.moveTo(offset+2, 13);
+	p.lineTo(offset+3, 12);
+	p.lineTo(offset+5, 11);
+	p.lineTo(offset+6, 11);
+	p.lineTo(offset+9, 10);
+	p.lineTo(offset+10, 9);
+	p.end();
+}
+
+
+void TeQtLegendItem::drawPointRep( int pw, int ph, int offset, QPixmap *pixmap)
+{
+	QPainter	painter(pixmap);
+	QColor		cor;
+	TeColor		tcor;
+
+	TeVisual* visual = legendEntry_->visual(TePOINTS);
+	tcor = visual->color();
+	cor.setRgb(tcor.red_, tcor.green_, tcor.blue_);
+	int s = visual->style();
+
+	int	w = visual->size();
+	QPoint	p;
+	p.setX(offset+pw/2);
+	p.setY(ph/2-1);
+
+	painter.setPen(cor);
+	if (s == TePtTypePlus)
+	{
+		painter.drawLine (p.x()-w/2,p.y(),p.x()+w/2,p.y());
+		painter.drawLine (p.x(),p.y()-w/2,p.x(),p.y()+w/2);
+	}
+	else if (s == TePtTypeStar)
+	{
+		painter.save ();
+		painter.translate (p.x(),p.y());
+		painter.drawLine (0,-w/2,0,w/2);
+		painter.rotate (45);
+		painter.drawLine (0,-w/2,0,w/2);
+		painter.rotate (-90);
+		painter.drawLine (0,-w/2,0,w/2);
+		painter.restore ();
+	}
+	else if (s == TePtTypeCircle)
+	{
+		painter.setBrush(cor);
+		painter.drawChord (p.x()-w/2,p.y()-w/2,w,w,0,360*16);
+	}
+	else if (s == TePtTypeX)
+	{
+		painter.drawLine (p.x()-w/2,p.y()-w/2,p.x()+w/2,p.y()+w/2);
+		painter.drawLine (p.x()-w/2,p.y()+w/2,p.x()+w/2,p.y()-w/2);
+	}
+	else if (s == TePtTypeBox)
+	{
+		painter.fillRect (p.x()-w/2,p.y()-w/2,w,w,cor);
+	}
+	else if (s == TePtTypeDiamond)
+	{
+		QPointArray pa(5);
+		pa.setPoint(0, p.x()-w/2, p.y());
+		pa.setPoint(1, p.x(), p.y()-w/2);
+		pa.setPoint(2, p.x()+w/2, p.y());
+		pa.setPoint(3, p.x(), p.y()+w/2);
+ 		pa.setPoint(4, p.x()-w/2, p.y());
+		painter.setBrush(cor);
+		painter.drawPolygon(pa);
+	}
+	else if (s == TePtTypeHollowCircle)
+	{
+		painter.drawArc (p.x()-w/2,p.y()-w/2,w,w,0,360*16);
+	}
+	else if (s == TePtTypeHollowBox)
+	{
+		painter.setBrush(Qt::NoBrush);
+		painter.drawRect (p.x()-w/2,p.y()-w/2,w,w);
+	}
+	else if (s == TePtTypeHollowDiamond)
+	{
+		painter.drawLine (p.x()-w/2,p.y(),p.x(),p.y()-w/2);
+		painter.drawLine (p.x(),p.y()-w/2,p.x()+w/2,p.y());
+		painter.drawLine (p.x()+w/2,p.y(),p.x(),p.y()+w/2);
+		painter.drawLine (p.x(),p.y()+w/2,p.x()-w/2,p.y());
+	}
+	painter.end();
+}
diff --git a/src/terralib/drivers/qt/TeQtLegendItem.h b/src/terralib/drivers/qt/TeQtLegendItem.h
new file mode 100755
index 0000000..07fcbd6
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtLegendItem.h
@@ -0,0 +1,73 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#ifndef  __TERRALIB_INTERNAL_QTLEGENDITEM_H
+#define  __TERRALIB_INTERNAL_QTLEGENDITEM_H
+
+#include <TeQtCheckListItem.h>
+
+class TeLegendEntry;
+
+
+class TeQtLegendItem : public TeQtCheckListItem
+{
+public:
+    TeQtLegendItem(QListViewItem *parent, QString text, TeLegendEntry *legendEntry);
+
+	~TeQtLegendItem() {}
+
+	TeLegendEntry* legendEntry()
+		{ return legendEntry_; }
+
+	void changeVisual(TeLegendEntry *legendEntry);
+
+	void paintCell(QPainter* p, const QColorGroup& cg, int column, int width, int align);
+
+protected:
+	TeLegendEntry *legendEntry_;
+
+	QPixmap createPixmap();
+
+	void drawPolygonRep(int w, int h, int offset, QPixmap *pixmap);
+
+	void drawLineRep(int offset, QPixmap *pixmap);
+
+	void drawPointRep(int w, int h, int offset, QPixmap *pixmap);
+};
+
+
+class TeQtLegendTitleItem : public TeQtCheckListItem
+{
+public:
+    TeQtLegendTitleItem(QListViewItem *parent, QString text)
+	: TeQtCheckListItem(parent, text)
+	{
+		type_ = LEGENDTITLE;
+		setRenameEnabled(0,true);
+		order_ = parent->childCount();
+	}
+
+	~TeQtLegendTitleItem() {}
+};
+
+
+
+#endif
diff --git a/src/terralib/drivers/qt/TeQtLegendSource.cpp b/src/terralib/drivers/qt/TeQtLegendSource.cpp
new file mode 100755
index 0000000..df7edcc
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtLegendSource.cpp
@@ -0,0 +1,848 @@
+#include <TeQtLegendSource.h>
+#include <TeLayer.h>
+#include <TeTheme.h>
+#include <TeColorUtils.h>
+#include <TeDataTypes.h>
+#include <TeGroupingAlgorithms.h>
+
+#include <qpixmap.h>
+#include <qbitmap.h>
+#include <qimage.h>
+#include <qpainter.h>
+
+
+TeQtLegendSource::TeQtLegendSource() : nRows_(0), nCols_(0)
+{
+	brushStyleMap_[TePolyTypeTransparent] = Qt::NoBrush;
+	brushStyleMap_[TePolyTypeFill] = Qt::SolidPattern;
+	brushStyleMap_[TePolyTypeHorizontal] = Qt::HorPattern;
+	brushStyleMap_[TePolyTypeVertical] = Qt::VerPattern;
+	brushStyleMap_[TePolyTypeFDiagonal] = Qt::FDiagPattern;
+	brushStyleMap_[TePolyTypeBDiagonal] = Qt::BDiagPattern;
+	brushStyleMap_[TePolyTypeCross] = Qt::CrossPattern;
+	brushStyleMap_[TePolyTypeDiagonalCross] = Qt::DiagCrossPattern;
+
+	//Mounting the penStyleMap
+	penStyleMap_[TeLnTypeContinuous] = Qt::SolidLine;
+	penStyleMap_[TeLnTypeDashed] = Qt::DashLine;
+	penStyleMap_[TeLnTypeDotted] = Qt::DotLine;
+	penStyleMap_[TeLnTypeDashDot] = Qt::DashDotLine;
+	penStyleMap_[TeLnTypeDashDotDot] = Qt::DashDotDotLine;
+	penStyleMap_[TeLnTypeNone] = Qt::NoPen;
+}
+
+
+void TeQtLegendSource::copyAppThemeContents(const TeAppTheme& appTheme)
+{
+	appTheme_ = appTheme;  // Make a copy of the theme	
+	db_ = appTheme_.getLocalDatabase();
+
+	// Set the number of lines
+	nRows_ = ((TeTheme*)appTheme_.getTheme())->legend().size();
+
+	// Set the number of columns
+	TeGroupingMode groupingMode = ((TeTheme*)appTheme_.getTheme())->grouping().groupMode_;
+	if (groupingMode == TeUniqueValue)
+		nCols_ = 4;
+	else
+		nCols_ = 5;
+}
+
+QVariant TeQtLegendSource::cell(int row, int col)
+{
+	QVariant v;
+	QString qs;
+
+	vector<TeLegendEntry>& legVec = ((TeTheme*)appTheme_.getTheme())->legend();
+
+	if(legVec.size() == 0)
+		return v;
+
+	TeGrouping& groupingParams = ((TeTheme*)appTheme_.getTheme())->grouping();
+	TeGroupingMode groupingMode = groupingParams.groupMode_;
+
+	if (col == 0)   // Create a pixmap in this column
+	{
+		QPixmap p;
+		p = createPixmap(row);
+		return p;
+	}
+
+	if (col == 1)
+	{
+		qs = legVec[row].slice().from_.c_str();
+		return qs;
+	}
+
+	if (col == 2)
+	{
+		if (groupingMode == TeUniqueValue)
+			qs = legVec[row].label().c_str();
+		else
+			qs = legVec[row].to().c_str();
+		return qs;
+	}
+	
+	if (col == 3)
+	{
+		if (groupingMode == TeUniqueValue)
+			qs = Te2String(legVec[row].slice().count_).c_str();
+		else
+			qs = legVec[row].label().c_str();
+		return qs;
+	}
+
+	if (col == 4)
+	{
+		qs = Te2String(legVec[row].slice().count_).c_str();
+		return qs;
+	}
+
+	return v;
+}
+
+QPixmap TeQtLegendSource::createPixmap(int row)
+{	
+	int		ww   = 21;		// individual width
+	int		tw   = 0;		// total width
+	int		pixh = 16;		
+	int		pixw = ww;
+
+	QPixmap	pixmap(ww, pixh);
+
+	bool hasPolygons = true;
+	bool hasLines = true;
+	bool hasPoints = true;
+
+	vector<TeLegendEntry>& legVec = ((TeTheme*)appTheme_.getTheme())->legend();
+	TeGeomRepVisualMap& vm = legVec[row].getVisualMap();
+	
+	if (vm.find(TePOLYGONS) == vm.end() && vm.find(TeCELLS) == vm.end())
+		hasPolygons = false;
+	else 
+		tw += ww;
+
+	if (vm.find(TeLINES) == vm.end())
+		hasLines = false;
+	else
+		tw += ww;
+
+	if (vm.find(TePOINTS) == vm.end())
+		hasPoints = false;
+	else
+		tw += ww;
+
+	pixmap.resize(tw, pixh);
+	pixmap.fill();
+
+	int wi = 0;
+	if (hasPolygons)
+	{
+		drawPolygonRep(pixw, pixh, wi, row, &pixmap);
+		wi	+= ww;
+	}
+	if (hasLines)
+	{
+		drawLineRep(wi, row,  &pixmap);
+		wi	+= ww;
+	}
+	if (hasPoints)
+	{
+		drawPointRep(pixw, pixh, wi, row, &pixmap);
+		wi	+= ww;
+	}
+	return pixmap;
+}
+
+void TeQtLegendSource::drawPolygonRep(int w, int h, int offset, int row, QPixmap *pixmap)
+{
+	QPainter p(pixmap);
+	QBrush	 brush;
+	QColor	 cor;
+	TeColor	 tcor;
+	Qt::BrushStyle	style;
+
+	vector<TeLegendEntry>& legVec = ((TeTheme*)appTheme_.getTheme())->legend();
+	TeGeomRepVisualMap& vm = legVec[row].getVisualMap();
+
+	int transp = 255 - (vm[TePOLYGONS]->transparency() * 255 / 100);
+	tcor = vm[TePOLYGONS]->color();
+	cor.setRgb(tcor.red_, tcor.green_, tcor.blue_);
+
+	style = brushStyleMap_[(TePolyBasicType)(vm[TePOLYGONS]->style())];
+	brush.setStyle(style);
+	brush.setColor(cor);
+
+	QRect trect(offset+1, 1, w-2, h-2);
+	QRect rect(0, 0, offset+w-1, h-1);
+
+	int width = rect.width();
+	int height = rect.height();
+
+	int r = width%8;
+	if(r)
+		width += (8-r);
+	r = height%8;
+	if(r)
+		height += (8-r);
+
+	if(width == 0)
+		width = 8;
+	if(height == 0)
+		height = 8;
+
+	QBitmap	bm;
+	bm.resize(width, height);
+	//Fill bitmap with 0-bits: clipping region
+	bm.fill(Qt::color0);
+	QPainter maskPainter(&bm);
+
+	// Draw bitmap with 1-bits: drawing region
+	QBrush bs(Qt::color1, style);
+	QPen pen(Qt::color1, 1);
+	maskPainter.setPen(pen);
+ 	maskPainter.fillRect(trect, bs);
+	maskPainter.end();
+
+	QRegion clipRegion(bm);
+	p.setClipRegion(clipRegion);
+
+	if(vm[TePOLYGONS]->transparency() == 0)
+		p.fillRect(trect, brush);
+	else
+	{
+		// set alpha buffer and color
+		QImage img(rect.width(), rect.height(), 32);
+		unsigned int val = (transp << 24) | (cor.red() << 16) | (cor.green() << 8) | cor.blue();
+		img.fill(val);
+		img.setAlphaBuffer(true);
+
+		// plot transparency
+		p.drawPixmap(trect.x(), trect.y(), img);
+	}
+	p.setClipping(false);
+
+	Qt::PenStyle pstyle;
+	uint		pwidth;
+
+	tcor = vm[TePOLYGONS]->contourColor();
+	cor.setRgb(tcor.red_, tcor.green_, tcor.blue_);
+	pen.setColor(cor);
+
+	pstyle = penStyleMap_[(TeLnBasicType)(vm[TePOLYGONS]->contourStyle())];
+	pen.setStyle(pstyle);
+
+	pwidth = (Qt::PenStyle) vm[TePOLYGONS]->contourWidth();
+	pen.setWidth (pwidth);
+
+	p.setPen(pen);
+	p.drawRect (offset+1+pwidth/2,1+pwidth/2,w-2-pwidth/2,h-2-pwidth/2);
+
+	p.end();
+}
+
+void TeQtLegendSource::drawLineRep(int offset, int row, QPixmap *pixmap)
+{
+	QPainter	p(pixmap);
+	QPen		pen;
+	QColor		cor;
+	TeColor		tcor;
+	Qt::PenStyle style;
+	uint		width;
+
+	vector<TeLegendEntry>& legVec = ((TeTheme*)appTheme_.getTheme())->legend();
+	TeGeomRepVisualMap& vm = legVec[row].getVisualMap();
+
+	tcor = vm[TeLINES]->color();
+	cor.setRgb(tcor.red_, tcor.green_, tcor.blue_);
+	pen.setColor(cor);
+
+	style = penStyleMap_[(TeLnBasicType)(vm[TeLINES]->style())];
+	pen.setStyle(style);
+
+	width = (Qt::PenStyle) vm[TeLINES]->width();
+	pen.setWidth (width);
+
+	p.setPen(pen);
+	p.moveTo(offset+1, 5);
+	p.lineTo(offset+3, 5);
+	p.lineTo(offset+6, 6);
+	p.lineTo(offset+8, 8);
+	p.lineTo(offset+10, 9);
+	p.lineTo(offset+14, 10);
+	p.lineTo(offset+16, 10);
+	p.lineTo(offset+18, 9);
+	p.lineTo(offset+19, 9);
+	p.moveTo(offset+2, 13);
+	p.lineTo(offset+3, 12);
+	p.lineTo(offset+5, 11);
+	p.lineTo(offset+6, 11);
+	p.lineTo(offset+9, 10);
+	p.lineTo(offset+10, 9);
+	p.end();
+}
+
+
+void TeQtLegendSource::drawPointRep(int pw, int ph, int offset, int row, QPixmap *pixmap)
+{
+	QPainter	painter(pixmap);
+	QColor		cor;
+	TeColor		tcor;
+
+	vector<TeLegendEntry>& legVec = ((TeTheme*)appTheme_.getTheme())->legend();
+	TeGeomRepVisualMap& vm = legVec[row].getVisualMap();
+
+	tcor = vm[TePOINTS]->color();
+	cor.setRgb(tcor.red_, tcor.green_, tcor.blue_);
+	int s = vm[TePOINTS]->style();
+	int	w = vm[TePOINTS]->size();
+	QPoint	p;
+	p.setX(offset+pw/2);
+	p.setY(ph/2-1);
+
+	painter.setPen(cor);
+	if (s == TePtTypePlus)
+	{
+		painter.drawLine (p.x()-w/2,p.y(),p.x()+w/2,p.y());
+		painter.drawLine (p.x(),p.y()-w/2,p.x(),p.y()+w/2);
+	}
+	else if (s == TePtTypeStar)
+	{
+		painter.save ();
+		painter.translate (p.x(),p.y());
+		painter.drawLine (0,-w/2,0,w/2);
+		painter.rotate (45);
+		painter.drawLine (0,-w/2,0,w/2);
+		painter.rotate (-90);
+		painter.drawLine (0,-w/2,0,w/2);
+		painter.restore ();
+	}
+	else if (s == TePtTypeCircle)
+	{
+		painter.setBrush(cor);
+		painter.drawChord (p.x()-w/2,p.y()-w/2,w,w,0,360*16);
+	}
+	else if (s == TePtTypeX)
+	{
+		painter.drawLine (p.x()-w/2,p.y()-w/2,p.x()+w/2,p.y()+w/2);
+		painter.drawLine (p.x()-w/2,p.y()+w/2,p.x()+w/2,p.y()-w/2);
+	}
+	else if (s == TePtTypeBox)
+	{
+		painter.fillRect (p.x()-w/2,p.y()-w/2,w,w,cor);
+	}
+	else if (s == TePtTypeDiamond)
+	{
+		QPointArray pa(5);
+		pa.setPoint(0, p.x()-w/2, p.y());
+		pa.setPoint(1, p.x(), p.y()-w/2);
+		pa.setPoint(2, p.x()+w/2, p.y());
+		pa.setPoint(3, p.x(), p.y()+w/2);
+ 		pa.setPoint(4, p.x()-w/2, p.y());
+		painter.setBrush(cor);
+		painter.drawPolygon(pa);
+	}
+	else if (s == TePtTypeHollowCircle)
+	{
+		painter.drawArc (p.x()-w/2,p.y()-w/2,w,w,0,360*16);
+	}
+	else if (s == TePtTypeHollowBox)
+	{
+		painter.setBrush(Qt::NoBrush);
+		painter.drawRect (p.x()-w/2,p.y()-w/2,w,w);
+	}
+	else if (s == TePtTypeHollowDiamond)
+	{
+		painter.drawLine (p.x()-w/2,p.y(),p.x(),p.y()-w/2);
+		painter.drawLine (p.x(),p.y()-w/2,p.x()+w/2,p.y());
+		painter.drawLine (p.x()+w/2,p.y(),p.x(),p.y()+w/2);
+		painter.drawLine (p.x(),p.y()+w/2,p.x()-w/2,p.y());
+	}
+	painter.end();
+}
+
+
+void TeQtLegendSource::setCell(int row, int col, const QVariant &v)
+{
+	// col = 0 (Color)
+	// col = 1 (From) mode != UniqueValue; (Value) mode = UniqueValue
+	// col = 2 (To) mode != UniqueValue; (Label) mode = UniqueValue
+	// col = 3 (Label) mode != UniqueValue; (Count) mode = UniqueValue
+	// col = 4 (Count) mode != UniqueValue 
+
+	if (col == 0)
+	{
+		emit dataChanged();
+		return;
+	}
+
+	vector<TeLegendEntry>& legVec = ((TeTheme*)appTheme_.getTheme())->legend();
+
+	TeGrouping& groupingParams = ((TeTheme*)appTheme_.getTheme())->grouping();
+	TeGroupingMode groupingMode = groupingParams.groupMode_;
+
+	if (groupingMode == TeUniqueValue)
+	{
+		if (legVec[row].label() == "Missing Data" && col == 2)
+			return;
+	}
+	else
+	{
+		if (legVec[row].from() == "Missing Data" && col == 1 ||
+			legVec[row].label() == "Missing Data" && col == 3 ||
+			legVec[row].to() == "" && col == 2)
+			return;
+	}
+
+	if (groupingMode == TeStdDeviation)
+	{
+		if (legVec[row].from().find("mean =") != string::npos  && col == 1 ||
+			legVec[row].label().find("mean =") != string::npos  && col == 3 ||
+			legVec[row].to() == "" && col == 2)
+			return;
+	}
+
+	// Check if the value changed is numeric
+	if(groupingMode != TeUniqueValue && (col == 1 || col == 2))
+	{
+		bool ok;
+		QString qs = v.toString();
+		qs.toDouble(&ok);
+		if(ok == false)
+			return;
+	}
+
+	QString qs = v.toString();
+	string newValue = qs.latin1();
+
+	// Check if the label was the value that was edited,
+	// in this case set it to the new value
+	if((groupingMode != TeUniqueValue && col == 3) ||
+		(groupingMode == TeUniqueValue && col == 2))
+	{
+		legVec[row].label(newValue);
+		return;
+	}
+
+	// The column edited is the "from" or "to" column for
+	// a grouping mode that is different of the "Unique Value" mode
+	vector<TeLegendEntry> tempLegVec = legVec;
+	dValuesVec_.clear();
+	((TeTheme*)appTheme_.getTheme())->buildGrouping(((TeTheme*)appTheme_.getTheme())->grouping(), TeAll, &dValuesVec_);
+	legVec = tempLegVec;
+	
+	if (col == 1)
+		legVec[row].from(newValue);
+	else if (col == 2)
+		legVec[row].to(newValue);
+
+	// Make the label value to be the same as (from ~ to)
+	if (col == 1 || col == 2)
+	{
+		string oldLabel = legVec[row].label();
+		string newLabel = legVec[row].slice().from_;
+		newLabel += " ~ ";
+		newLabel += legVec[row].slice().to_;
+		if ((newLabel != oldLabel) && (oldLabel.find(" ~ ") != string::npos))
+			legVec[row].label(newLabel);
+	}
+
+	// Recalculate the new count value
+	vector<TeSlice> sliceVec;
+	TeSlice slice(legVec[row].from(), legVec[row].to());
+	sliceVec.push_back(slice);
+	TeElemCountingBySlice(dValuesVec_.begin(), dValuesVec_.end(), sliceVec);
+	legVec[row].count(sliceVec[0].count_);
+
+	emit dataChanged();
+}
+    
+bool TeQtLegendSource::generateLegends(const TeGrouping& groupingParams, double minValue, double maxValue)
+{
+	((TeTheme*)appTheme_.getTheme())->grouping(groupingParams);
+
+	vector<TeLegendEntry>& legVec = ((TeTheme*)appTheme_.getTheme())->legend();
+
+	legVec.clear();	
+	dValuesVec_.clear();
+	mapObjValVec_.clear();
+
+	bool ret;
+	TeChronon chronon = groupingParams.groupChronon_;
+	if (chronon == TeNOCHRONON)
+		ret = ((TeTheme*)appTheme_.getTheme())->buildGrouping(groupingParams, TeAll, &dValuesVec_);
+	else
+		ret = ((TeTheme*)appTheme_.getTheme())->buildGrouping(groupingParams, chronon, mapObjValVec_);
+
+	if (ret == false)
+	{
+		errorMessage_ = tr("Fail to generate the legends");
+		nRows_ = 0;
+		return false;
+	}
+
+	// Set the number of rows
+	nRows_ = legVec.size();
+
+	// Set the number of columns
+	TeGroupingMode groupingMode = groupingParams.groupMode_;
+	if (groupingMode == TeUniqueValue)
+		nCols_ = 4;
+	else
+		nCols_ = 5;
+
+	// Change the legends if the minValue and maxValue are 
+	// different of zero
+
+	if (groupingMode == TeEqualSteps && (minValue == 0. && maxValue == 0.) == false)
+	{
+		double slice = (maxValue - minValue)/double(groupingParams.groupNumSlices_);
+		int i;
+		for (i = 0; i < groupingParams.groupNumSlices_; ++i)
+		{
+			string from = Te2String(minValue + double(i)*slice, groupingParams.groupPrecision_);
+			legVec[i].from(from);
+			string to = Te2String(minValue + double(i+1)*slice, groupingParams.groupPrecision_);
+			legVec[i].to(to);
+			string label = legVec[i].from() + " ~ " + legVec[i].to();
+			legVec[i].label(label);
+		}
+
+		// Recalculate the new count value
+		vector<TeSlice> sliceVec;
+		for (i = 0; i < groupingParams.groupNumSlices_; ++i)
+		{
+			TeSlice slice(legVec[i].from(), legVec[i].to());
+			sliceVec.push_back(slice);
+		}
+		TeElemCountingBySlice(dValuesVec_.begin(), dValuesVec_.end(), sliceVec);
+		for (unsigned int j = 0; j < sliceVec.size(); ++j)
+			legVec[j].count(sliceVec[j].count_);
+	}
+
+	return true;
+}
+
+void TeQtLegendSource::putColorOnLegend(vector<ColorBar>& iColorVec, vector<ColorBar>& iColorBVec)
+{
+	vector<TeLegendEntry>& legVec = ((TeTheme*)appTheme_.getTheme())->legend();
+	if(legVec.size() == 0)
+		return;
+
+	unsigned int i;
+	bool hasMissingData = false;
+
+	// Update the grouping colors of the theme
+	string groupingColors = getColors(iColorVec, iColorBVec, ((TeTheme*)appTheme_.getTheme())->grouping().groupMode_);
+	appTheme_.groupColor(groupingColors);
+
+//	vector<string> colorNameVec;
+//	getColorNameVector(groupingColors, colorNameVec);
+	vector<TeColor> colorVec;
+
+	int nColors = (int)legVec.size();
+	string s = legVec[legVec.size()-1].from();
+	if(s == "Missing Data")
+	{
+		hasMissingData = true;
+		nColors--;
+	}
+
+	TeGrouping& groupingParams = ((TeTheme*)appTheme_.getTheme())->grouping();
+	if (groupingParams.groupMode_ != TeStdDeviation)
+	{
+//		getColors(colorNameVec, nColors, colorVec);
+		colorVec = getColors(iColorVec, nColors);
+//		if (colorNameVec.size() == 1 && invertColor == true)
+//		{
+//			vector<TeColor> cVec;
+//			for (int k = colorVec.size() - 1; k >= 0; --k)
+//				cVec.push_back(colorVec[k]);
+//			colorVec = cVec;
+//		}
+	}
+	else
+	{
+		int leftColors = 0, rightColors = 0;
+
+		for(i = 0; i < legVec.size(); ++i)
+		{
+			string vv = legVec[i].label();
+			if (legVec[i].label().find("mean = ") != string::npos)
+				break;
+		}
+		leftColors = i;
+		rightColors = legVec.size() - i - 1;
+		if(hasMissingData)
+			rightColors--;
+
+		vector<TeColor> leftColorVec, rightColorVec;
+//		vector<string> leftColorNameVec, rightColorNameVec;
+//		if ((colorNameVec.size() % 2) == 0)
+//		{
+//			unsigned int a = colorNameVec.size()/2;
+//			for (i = 0; i < a; ++i)
+//				leftColorNameVec.push_back(colorNameVec[i]);
+//			for (; i < colorNameVec.size(); ++i)
+//				rightColorNameVec.push_back(colorNameVec[i]);
+//		}
+//		else
+//		{
+//			unsigned int a = colorNameVec.size()/2 + 1;
+//			for (i = 0; i < a; ++i)
+//				leftColorNameVec.push_back(colorNameVec[i]);
+//			for (i = a-1; i < colorNameVec.size(); ++i)
+//				rightColorNameVec.push_back(colorNameVec[i]);
+//		}
+//
+//		getColors(leftColorNameVec, leftColors, leftColorVec);
+//		getColors(rightColorNameVec, rightColors, rightColorVec);
+		leftColorVec = getColors(iColorVec, leftColors);
+		rightColorVec = getColors(iColorBVec, rightColors);
+
+//		if (leftColorNameVec.size() == 1 && invertColor == true)
+//		{
+//			vector<TeColor> cVec;
+//			for (int k = leftColorVec.size() - 1; k >= 0; --k)
+//				cVec.push_back(leftColorVec[k]);
+//			leftColorVec = cVec;
+//		}
+//
+//		if (rightColorNameVec.size() == 1 && invertColor == false)
+//		{
+//			vector<TeColor> cVec;
+//			for (int k = rightColorVec.size() - 1; k >= 0; --k)
+//				cVec.push_back(rightColorVec[k]);
+//			rightColorVec = cVec;
+//		}
+
+		for (i = 0; i < leftColorVec.size(); ++i)
+			colorVec.push_back(leftColorVec[i]);
+		colorVec.push_back(leftColorVec[i-1]);
+		for (i = 0; i < rightColorVec.size(); ++i)
+			colorVec.push_back(rightColorVec[i]);
+	}
+
+	if(hasMissingData)
+	{
+		TeColor	cor(255, 255, 255);
+		colorVec.push_back(cor);
+	}
+
+	int visRep = appTheme_.getTheme()->visibleRep();
+	for(i = 0; i < legVec.size(); i++)
+	{
+		string vv = legVec[i].label();
+		if (groupingParams.groupMode_ == TeStdDeviation &&
+			legVec[i].label().find("mean = ") != string::npos)
+			continue;
+
+		TeColor	cor = colorVec[i];
+		if (visRep & TePOINTS)
+		{
+			TeVisual* v = ((TeTheme*)appTheme_.getTheme())->defaultLegend().visual(TePOINTS);	
+			v->color(cor);
+			legVec[i].setVisual(v->copy(), TePOINTS); 
+		}
+
+		if (visRep & TeLINES)
+		{
+			TeVisual* v = ((TeTheme*)appTheme_.getTheme())->defaultLegend().visual(TeLINES);	
+			v->color(cor);
+			legVec[i].setVisual(v->copy(), TeLINES); 
+		}
+
+		if ((visRep & TePOLYGONS) || (visRep & TeCELLS))
+		{
+			TeVisual* v = ((TeTheme*)appTheme_.getTheme())->defaultLegend().visual(TePOLYGONS);	
+			v->color(cor);
+			legVec[i].setVisual(v->copy(), TePOLYGONS); 
+		}
+	}
+}
+
+void TeQtLegendSource::putColorOnLegend(string& groupingColors, bool invertColor)
+{
+	vector<TeLegendEntry>& legVec = ((TeTheme*)appTheme_.getTheme())->legend();
+	if(legVec.size() == 0)
+		return;
+
+	unsigned int i;
+	bool hasMissingData = false;
+
+	// Update the grouping colors of the theme
+	appTheme_.groupColor(groupingColors);
+
+	vector<string> colorNameVec;
+	getColorNameVector(groupingColors, colorNameVec);
+	vector<TeColor> colorVec;
+
+	int nColors = (int)legVec.size();
+	string s = legVec[legVec.size()-1].from();
+	if(s == "Missing Data")
+	{
+		hasMissingData = true;
+		nColors--;
+	}
+
+	TeGrouping& groupingParams = ((TeTheme*)appTheme_.getTheme())->grouping();
+	if (groupingParams.groupMode_ != TeStdDeviation)
+	{
+		getColors(colorNameVec, nColors, colorVec);
+		if (colorNameVec.size() == 1 && invertColor == true)
+		{
+			vector<TeColor> cVec;
+			for (int k = colorVec.size() - 1; k >= 0; --k)
+				cVec.push_back(colorVec[k]);
+			colorVec = cVec;
+		}
+	}
+	else
+	{
+		int leftColors = 0, rightColors = 0;
+
+		for(i = 0; i < legVec.size(); ++i)
+		{
+			string vv = legVec[i].label();
+			if (legVec[i].label().find("mean = ") != string::npos)
+				break;
+		}
+		leftColors = i;
+		rightColors = legVec.size() - i - 1;
+		if(hasMissingData)
+			rightColors--;
+
+		vector<TeColor> leftColorVec, rightColorVec;
+		vector<string> leftColorNameVec, rightColorNameVec;
+		if ((colorNameVec.size() % 2) == 0)
+		{
+			unsigned int a = colorNameVec.size()/2;
+			for (i = 0; i < a; ++i)
+				leftColorNameVec.push_back(colorNameVec[i]);
+			for (; i < colorNameVec.size(); ++i)
+				rightColorNameVec.push_back(colorNameVec[i]);
+		}
+		else
+		{
+			unsigned int a = colorNameVec.size()/2 + 1;
+			for (i = 0; i < a; ++i)
+				leftColorNameVec.push_back(colorNameVec[i]);
+			for (i = a-1; i < colorNameVec.size(); ++i)
+				rightColorNameVec.push_back(colorNameVec[i]);
+		}
+
+		getColors(leftColorNameVec, leftColors, leftColorVec);
+		getColors(rightColorNameVec, rightColors, rightColorVec);
+
+		if (leftColorNameVec.size() == 1 && invertColor == true)
+		{
+			vector<TeColor> cVec;
+			for (int k = leftColorVec.size() - 1; k >= 0; --k)
+				cVec.push_back(leftColorVec[k]);
+			leftColorVec = cVec;
+		}
+
+		if (rightColorNameVec.size() == 1 && invertColor == false)
+		{
+			vector<TeColor> cVec;
+			for (int k = rightColorVec.size() - 1; k >= 0; --k)
+				cVec.push_back(rightColorVec[k]);
+			rightColorVec = cVec;
+		}
+
+		for (i = 0; i < leftColorVec.size(); ++i)
+			colorVec.push_back(leftColorVec[i]);
+		colorVec.push_back(leftColorVec[i-1]);
+		for (i = 0; i < rightColorVec.size(); ++i)
+			colorVec.push_back(rightColorVec[i]);
+	}
+
+	if(hasMissingData)
+	{
+		TeColor	cor(255, 255, 255);
+		colorVec.push_back(cor);
+	}
+
+	for(i = 0; i < legVec.size(); i++)
+	{
+		string vv = legVec[i].label();
+		if (groupingParams.groupMode_ == TeStdDeviation &&
+			legVec[i].label().find("mean = ") != string::npos)
+			continue;
+
+		TeColor	cor = colorVec[i];
+		if(((TeTheme*)appTheme_.getTheme())->visibleRep() & TePOINTS)
+		{
+			TeVisual* v = ((TeTheme*)appTheme_.getTheme())->defaultLegend().visual(TePOINTS);	
+			v->color(cor);
+			legVec[i].setVisual(v->copy(), TePOINTS); 
+		}
+		if(((TeTheme*)appTheme_.getTheme())->visibleRep() & TeLINES)
+		{
+			TeVisual* v = ((TeTheme*)appTheme_.getTheme())->defaultLegend().visual(TeLINES);	
+			v->color(cor);
+			legVec[i].setVisual(v->copy(), TeLINES); 
+		}
+		if((((TeTheme*)appTheme_.getTheme())->visibleRep() & TePOLYGONS) || (((TeTheme*)appTheme_.getTheme())->visibleRep() & TeCELLS))
+		{
+			TeVisual* v = ((TeTheme*)appTheme_.getTheme())->defaultLegend().visual(TePOLYGONS);	
+			v->color(cor);
+			legVec[i].setVisual(v->copy(), TePOLYGONS); 
+		}
+	}
+}
+
+void TeQtLegendSource::getColorNameVector(string& groupingColors, vector<string>& colorNameVec)
+{
+	if(groupingColors.empty())
+		groupingColors = tr("R").latin1();
+
+	QString s = groupingColors.c_str();
+	QStringList ss = QStringList::split("-",s,true);
+
+	for(unsigned int i = 0; i < ss.size(); i++)
+	{
+		QString a = ss[i];
+		if(tr("R") == a)
+			colorNameVec.push_back("RED");
+		else if(tr("G") == a)
+			colorNameVec.push_back("GREEN");
+		else if(tr("B") == a)
+			colorNameVec.push_back("BLUE");
+		else if(tr("Cy") == a)
+			colorNameVec.push_back("CYAN");
+		else if(tr("Or") == a)
+			colorNameVec.push_back("ORANGE");
+		else if(tr("Mg") == a)
+			colorNameVec.push_back("MAGENTA");
+		else if(tr("Y") == a)
+			colorNameVec.push_back("YELLOW");
+		else
+			colorNameVec.push_back("GRAY");
+	}
+}
+
+void TeQtLegendSource::setLegends(const vector<TeLegendEntry>& inLegVec)
+{
+	vector<TeLegendEntry>& legVec = ((TeTheme*)appTheme_.getTheme())->legend();
+	legVec.clear();
+	legVec = inLegVec;
+	nRows_ = legVec.size();
+}
+
+void TeQtLegendSource::setGroupingParams(const TeGrouping& gParams)
+{
+	TeGrouping& groupingParams = ((TeTheme*)appTheme_.getTheme())->grouping();
+	groupingParams = gParams;
+
+	// Set the number of columns
+	TeGroupingMode groupingMode = groupingParams.groupMode_;
+	if (groupingMode == TeUniqueValue)
+		nCols_ = 4;
+	else
+		nCols_ = 5;
+}
+
+
+
+
diff --git a/src/terralib/drivers/qt/TeQtLegendSource.h b/src/terralib/drivers/qt/TeQtLegendSource.h
new file mode 100755
index 0000000..a15f9cd
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtLegendSource.h
@@ -0,0 +1,64 @@
+#ifndef TEQTLEGENDSOURCE_H
+#define TEQTLEGENDSOURCE_H
+
+#include <TeQtDataSource.h>
+#include <TeAppTheme.h>
+#include <TeColorUtils.h>
+#include <string>
+
+class TeDatabase;
+
+using namespace std;
+
+
+class TeQtLegendSource : public TeQtDataSource
+{
+	Q_OBJECT
+
+	public:
+	TeQtLegendSource();
+	~TeQtLegendSource() {}
+
+	QVariant cell(int row, int col);
+	void setCell(int row, int col, const QVariant &v);
+
+	bool generateLegends(const TeGrouping& groupingParams, double minValue = 0., double maxValue = 0.);
+	void putColorOnLegend(string& groupingColors, bool invertColor);
+	void putColorOnLegend(vector<ColorBar>& colorVec, vector<ColorBar>& colorBVec);
+	void getColorNameVector(string& groupingColors, vector<string>& colorNameVec);
+
+	QPixmap createPixmap(int row);
+	void drawPolygonRep(int w, int h, int offset, int row, QPixmap *pixmap);
+	void drawLineRep(int offset, int row, QPixmap *pixmap);
+	void drawPointRep(int pw, int ph, int offset, int row, QPixmap *pixmap);
+
+	void copyAppThemeContents(const TeAppTheme& appTheme);
+	TeAppTheme& getAppTheme() { return appTheme_; }
+	vector<map<string, string> >& mapObjValVec() { return mapObjValVec_; }
+	void setGroupingColors(const QString& gc)
+		{ appTheme_.groupColor(gc.latin1()); }
+
+	void setLegends(const vector<TeLegendEntry>& legVec);
+	void setGroupingParams(const TeGrouping& gParams);
+
+	int numRows() const { return nRows_; }
+	int numCols() const { return nCols_; }
+
+private:
+	TeDatabase* db_;
+	TeAppTheme	appTheme_;
+
+    vector<double> dValuesVec_;
+    vector<map<string, string> >mapObjValVec_;
+    map<TePolyBasicType, Qt::BrushStyle> brushStyleMap_;
+    map<TeLnBasicType, Qt::PenStyle> penStyleMap_;
+
+	QString errorMessage_;
+	QString groupingColors_;
+
+	int nRows_;
+	int nCols_;
+};
+
+
+#endif
diff --git a/src/terralib/application/qt/TeQtLongEdit.cpp b/src/terralib/drivers/qt/TeQtLongEdit.cpp
old mode 100644
new mode 100755
similarity index 100%
rename from src/terralib/application/qt/TeQtLongEdit.cpp
rename to src/terralib/drivers/qt/TeQtLongEdit.cpp
diff --git a/src/terralib/application/qt/TeQtLongEdit.h b/src/terralib/drivers/qt/TeQtLongEdit.h
old mode 100644
new mode 100755
similarity index 100%
rename from src/terralib/application/qt/TeQtLongEdit.h
rename to src/terralib/drivers/qt/TeQtLongEdit.h
diff --git a/src/terralib/drivers/qt/TeQtMethods.cpp b/src/terralib/drivers/qt/TeQtMethods.cpp
new file mode 100755
index 0000000..820be8c
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtMethods.cpp
@@ -0,0 +1,453 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+
+#include "TeSTElementSet.h"
+#include "TeQtMethods.h"
+#include "TeSkaterFunctions.h"
+#include "TeQtTerraStat.h"
+#include "TeQtGrid.h"
+#include "TeSTEFunctionsDB.h"
+#include "TeDatabaseUtils.h"
+#include <qobject.h>
+#include <qapplication.h>
+
+/////////////////////////////////////////////////////////////////////////////////////
+
+
+bool TeSkaterMethod::apply(vector<double>& het) 
+{
+  if (this->hasPop_) 
+  {
+    this->attrVector_.push_back(this->attrPop_);
+  }
+
+  //add the aggregate attribute in the attribute vetor
+  if(!aggrAttr_.empty())
+	  attrVector_.push_back(aggrAttr_);
+    
+  TeSTElementSet stoSet(regTheme_);
+
+	if(TeProgress::instance())
+	{
+		string caption = tr("Skater function").latin1();
+		TeProgress::instance()->setCaption(caption.c_str());
+	}
+
+  //verify if the theme has external table
+  TeAttrTableVector tables;
+  if(regTheme_->getAttTables(tables, TeAttrExternal))
+  {
+	  TeGroupingAttr grouping;
+	  for(unsigned int j=0; j<attrVector_.size(); ++j)
+	  { 
+		  	TeAttributeRep attrRep(attrVector_[j]);
+			pair<TeAttributeRep, TeStatisticType> attr(attrRep, TeMEAN);
+			grouping.push_back(attr);
+	  }
+
+	  if (!TeSTOSetBuildDB(&stoSet, grouping, true)) 
+	  {
+			QMessageBox::critical(NULL, tr("Error"), 
+				tr("Unexpected: Regions and attributes could not be loaded!"));
+			return false;
+	  }
+  }
+  else
+  {
+	  if (!TeSTOSetBuildDB(&stoSet, true, false, attrVector_)) 
+	  {
+			QMessageBox::critical(NULL, tr("Error"), 
+				tr("Unexpected: Regions and attributes could not be loaded!"));
+			return false;
+	  }
+  }
+
+	//containers to store information when the data will be aggregate by an attribute
+	map<string, TeSTElementSet* >	aggrAttrToElemSet;
+  
+	//get the distinct values of the attribute value
+	if(!aggrAttr_.empty())
+	{
+		TeSTElementSet::iterator it = stoSet.begin();
+		int index = stoSet.getAttributeIndex(aggrAttr_);
+		if(index<0)
+		{
+			QMessageBox::critical(NULL, tr("Error"), 
+				tr("It is no possible aggregate objects by attribute!"));
+			return false;
+		}
+
+		map<string, TeSTElementSet* >::iterator it2;
+		while(it!=stoSet.end())
+		{
+			//get the aggregate attribute
+			string val;
+			it->getPropertyValue(val, index);
+			it2 = aggrAttrToElemSet.find(val);
+			if( it2 == aggrAttrToElemSet.end()) 
+			{
+				TeSTElementSet* elemSet = new TeSTElementSet(regTheme_);
+				TeAttributeList fromAttList = stoSet.getAttributeList();
+				TeAttributeList toAttList;
+				for(unsigned int i=0; i< fromAttList.size(); ++i)
+				{
+					if((int)i == index)
+						continue;
+					toAttList.push_back (fromAttList[i]);
+				}
+
+				elemSet->setAttributeList(toAttList);
+				it->removePropertyValue(index);
+				elemSet->insertSTInstance(*it);
+				aggrAttrToElemSet[val] = elemSet;				
+			}
+			else
+			{
+				it->removePropertyValue(index);
+				it2->second->insertSTInstance(*it);
+			}
+
+			++it;
+		}
+	}
+	
+	double tol = TeGetPrecision(regTheme_->layer()->projection());
+	TePrecision::instance().setPrecision(tol);
+
+	//load prox matrix or construct one
+	TeGeneralizedProxMatrix<TeSTElementSet>*			proxMat=0;
+	TeProxMatrixConstructionStrategy<TeSTElementSet>*	constStrategy=0;
+
+	if(TeProgress::instance())
+	{
+		string msg = tr("Loading Proximity Matrix. Please, wait!").latin1();
+		TeProgress::instance()->setMessage(msg);
+	}
+	//-------------- Load prox matrix or create new
+	if(!loadDefaultGPM(regTheme_->layer()->database(), regTheme_->id(), proxMat))
+	{
+		TeGeomRep geomRep = TeGEOMETRYNONE;
+		if(regTheme_->layer()->hasGeometry (TePOLYGONS))
+			geomRep = TePOLYGONS;
+		else if (regTheme_->layer()->hasGeometry (TeCELLS))
+			geomRep = TeCELLS;
+
+		if(geomRep==TeGEOMETRYNONE)
+		{
+			QString msg = tr("The theme must have a geometric representation of polygons") + "\n";
+			msg += tr("or cells to create contiguity matrix!");
+			QMessageBox::warning(this, tr("Warning"), msg);
+			map<string, TeSTElementSet* >::iterator itSTElemSets = aggrAttrToElemSet.begin();
+			while(itSTElemSets != aggrAttrToElemSet.end())
+			{
+
+				if(itSTElemSets->second)
+					delete itSTElemSets->second;
+				++itSTElemSets;
+			}
+
+			aggrAttrToElemSet.clear();
+			return false;
+		}
+		
+		if(TeProgress::instance())
+		{
+			string msg = tr("Building the Proximity Matrix. Please, wait!").latin1();
+			TeProgress::instance()->setMessage(msg);
+		}
+		
+		//create matrix and save in the database
+		constStrategy = new TeProxMatrixLocalAdjacencyStrategy (&stoSet, geomRep); 
+		TeProxMatrixNoWeightsStrategy sw_no;
+		TeProxMatrixNoSlicingStrategy ss_no;
+		proxMat = new TeGeneralizedProxMatrix<TeSTElementSet>(constStrategy, &sw_no, &ss_no);
+		
+		if (!proxMat->constructMatrix())
+		{
+			QMessageBox::critical(this, tr("Error"), tr("Fail building the proximity matrix!"));
+			if(proxMat)
+				delete proxMat;
+			map<string, TeSTElementSet* >::iterator itSTElemSets = aggrAttrToElemSet.begin();
+			while(itSTElemSets != aggrAttrToElemSet.end())
+			{
+
+				if(itSTElemSets->second)
+					delete itSTElemSets->second;
+				++itSTElemSets;
+			}
+			aggrAttrToElemSet.clear();
+			return false;
+		}
+
+		//save in the database
+		bool savedMatrix = true;
+		if(!regTheme_->layer()->database()->tableExist("te_gpm"))
+		{
+			if(!createGPMMetadataTable(regTheme_->layer()->database()))
+			{
+				QMessageBox::warning(this, tr("Error"), 
+					tr("It was not possible to save proximity matrix in database!"));
+				savedMatrix = false;
+			}
+		}
+
+		string tableName = "te_neighbourhood_"+ Te2String(regTheme_->id());
+		string tempTable = tableName;
+		int count = 1;
+		while(savedMatrix && regTheme_->layer()->database()->tableExist(tempTable))
+		{
+			tempTable = tableName+"_"+Te2String(count);
+			++count;
+		}
+
+		if(savedMatrix && (!createNeighbourhoodTable(regTheme_->layer()->database(), tempTable)))
+		{
+			QMessageBox::warning(this, tr("Error"), 
+					tr("It was not possible to save proximity matrix in database!"));
+				savedMatrix = false;
+		}
+
+		proxMat->neighbourhood_table_=tempTable;
+		//load object ids
+		vector<string> objIds;
+		TeSTElementSet::iterator itAux = stoSet.begin();
+		while(itAux!=stoSet.end())
+		{
+			objIds.push_back(itAux->objectId());
+			++itAux;
+		}
+
+		if(savedMatrix && (!insertGPM(regTheme_->layer()->database(), proxMat, objIds)))
+		{
+			QMessageBox::warning(this, tr("Error"), 
+					tr("It was not possible to save proximity matrix in database!"));
+				savedMatrix = false;
+		}
+	}
+
+	//if the data must be aggregated by an attribute 
+	int numGroups = this->nClusters_;
+	if(!aggrAttr_.empty())
+	{
+		int step = 0;
+		if(TeProgress::instance())
+		{
+			TeProgress::instance()->reset();
+			string msg = tr("Calculating skater... Please, wait!").latin1();
+			TeProgress::instance()->setMessage(msg);
+			TeProgress::instance()->setTotalSteps(aggrAttrToElemSet.size());
+		}
+		
+		map<string, TeSTElementSet* >::iterator it = aggrAttrToElemSet.begin();
+		while(it != aggrAttrToElemSet.end())
+		{
+			this->nClusters_ = numGroups;
+			TeSTElementSet* elSet = it->second;
+			TeGeneralizedProxMatrix<TeSTElementSet>	tempGPM;
+			TeSTElementSet::iterator itSet = elSet->begin();
+			string v = it->first;
+			
+			//! Build the prox matrix only for the objects in each element set
+			bool objectWithoutNeig = false;
+			while(itSet != elSet->end())
+			{
+				TeNeighboursMap neigs = proxMat->getMapNeighbours(itSet->objectId());
+				TeNeighboursMap::iterator itN = neigs.begin();
+				while(itN != neigs.end())
+				{
+					string obj1 = itN->first;
+					string obj2 = itSet->objectId();
+					if(elSet->hasElement(itN->first))
+						tempGPM.connectObjects(itSet->objectId(), itN->first, itN->second);
+					++itN;
+				}
+				
+				if((tempGPM.getNeighbours(itSet->objectId()).size())<1)
+				{
+					objectWithoutNeig = true;
+					itSet = elSet->end();
+					continue;
+				}
+
+				++itSet;
+			}
+			
+			int numObjs = tempGPM.numberOfObjects(); 
+			if(objectWithoutNeig || numObjs<2)
+			{
+				++it;
+				continue;
+			}
+
+			if(numObjs < this->nClusters_)
+				this->nClusters_ = numObjs;
+
+			//! Skater function
+			if (!TeSkaterFunction(this->hasPop_, this->type_, this->nClusters_, this->minPop_, *elSet, &tempGPM, this->resName_, het) ) 
+			{
+				QMessageBox::critical(NULL, tr("Error"), tr("Choose a connected graph!"));
+				if(proxMat)
+					delete proxMat;
+			
+				map<string, TeSTElementSet* >::iterator itSTElemSets = aggrAttrToElemSet.begin();
+				while(itSTElemSets != aggrAttrToElemSet.end())
+				{
+
+					if(itSTElemSets->second)
+						delete itSTElemSets->second;
+					++itSTElemSets;
+				}
+				aggrAttrToElemSet.clear();
+				return false;
+			}
+
+			if (!insertPropertyColumn(*elSet, tableName_, resName_) ) 
+			{
+				QMessageBox::critical(NULL, tr("Error"), tr("Error storing results. Check result column name!"));
+				if(proxMat)
+					delete proxMat;
+
+				map<string, TeSTElementSet* >::iterator itSTElemSets = aggrAttrToElemSet.begin();
+				while(itSTElemSets != aggrAttrToElemSet.end())
+				{
+
+					if(itSTElemSets->second)
+						delete itSTElemSets->second;
+					++itSTElemSets;
+				}
+				aggrAttrToElemSet.clear();
+				return false;
+			}
+			
+			if(TeProgress::instance())
+			{
+				if (TeProgress::instance()->wasCancelled())
+				{
+					TeProgress::instance()->reset();
+					if(proxMat)
+						delete proxMat;
+
+					map<string, TeSTElementSet* >::iterator itSTElemSets = aggrAttrToElemSet.begin();
+					while(itSTElemSets != aggrAttrToElemSet.end())
+					{
+
+						if(itSTElemSets->second)
+							delete itSTElemSets->second;
+						++itSTElemSets;
+					}
+					aggrAttrToElemSet.clear();
+					return false;
+				}
+				else
+					TeProgress::instance()->setProgress(step);
+			}	
+			++step;
+			++it;
+		}
+		if (TeProgress::instance())
+			TeProgress::instance()->reset();
+	}
+	else
+	{
+		if (!TeSkaterFunction(this->hasPop_, this->type_, this->nClusters_, this->minPop_, stoSet, proxMat, this->resName_, het) ) 
+		{
+			QMessageBox::critical(NULL, tr("Error"), tr("Choose a connected graph!"));
+			if(proxMat)
+				delete proxMat;
+			map<string, TeSTElementSet* >::iterator itSTElemSets = aggrAttrToElemSet.begin();
+			while(itSTElemSets != aggrAttrToElemSet.end())
+			{
+
+				if(itSTElemSets->second)
+					delete itSTElemSets->second;
+				++itSTElemSets;
+			}
+			aggrAttrToElemSet.clear();
+			return false;
+		}
+
+		double h;
+		for(unsigned int i = 0; i < het.size(); i++) 
+		{
+			h = het[i];
+		}
+
+		if (!insertPropertyColumn(stoSet, tableName_, resName_) ) 
+		{
+			QMessageBox::critical(NULL, tr("Error"), tr("Error storing results. Check result column name!"));
+			if(proxMat)
+				delete proxMat;
+			map<string, TeSTElementSet* >::iterator itSTElemSets = aggrAttrToElemSet.begin();
+			while(itSTElemSets != aggrAttrToElemSet.end())
+			{
+
+				if(itSTElemSets->second)
+					delete itSTElemSets->second;
+				++itSTElemSets;
+			}
+			aggrAttrToElemSet.clear();
+			return false;
+		}
+	}
+
+  // ---------------------------------------------- load updated table from database 
+	// Update all the themes that uses this table
+	TeViewMap& viewMap = regTheme_->layer()->database()->viewMap();
+	TeViewMap::iterator it;
+	set<TeLayer*> layerSet;
+	for (it = viewMap.begin(); it != viewMap.end(); ++it)
+	{
+		TeView *view = it->second;
+		vector<TeViewNode*>& themesVector = view->themes();
+		for (unsigned int i = 0; i < themesVector.size(); ++i)
+		{
+			TeTheme* theme = (TeTheme*)themesVector[i];
+			if (theme->type() != TeTHEME)
+				continue;
+			if (theme->isThemeTable(tableName_) == true)
+			{
+				theme->loadThemeTables();
+				layerSet.insert(theme->layer());
+			}
+		}
+	}
+
+	// Update the layer tables affected
+	set<TeLayer*>::iterator setIt;
+	for (setIt = layerSet.begin(); setIt != layerSet.end(); ++setIt)
+		(*setIt)->loadLayerTables();
+
+	//delete pointers
+	map<string, TeSTElementSet* >::iterator itSTElemSets = aggrAttrToElemSet.begin();
+	while(itSTElemSets != aggrAttrToElemSet.end())
+	{
+
+		if(itSTElemSets->second)
+			delete itSTElemSets->second;
+		++itSTElemSets;
+	}
+	aggrAttrToElemSet.clear();
+	if(proxMat)
+		delete proxMat;
+	return true;
+}
+
diff --git a/src/terralib/drivers/qt/TeQtMethods.h b/src/terralib/drivers/qt/TeQtMethods.h
new file mode 100755
index 0000000..331dc57
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtMethods.h
@@ -0,0 +1,76 @@
+#ifndef  __TERRALIB_INTERNAL_QTTERRAMETHODS_H
+#define  __TERRALIB_INTERNAL_QTTERRAMETHODS_H
+/***
+ * Implementa suporte para as funcoes do TerraStat
+ * Objetivo -- soh nao manter a parte de geracao de eventos,
+ * etc no ui, que podera ser reaproveitado.
+ ****/
+
+#include "TeDatabase.h"
+#include "TeKernelParams.h"
+#include <qapplication.h>
+
+/////////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////////
+class TeAppTheme;
+class TeQtGrid;
+
+class TeSkaterMethod : public QWidget {
+
+	Q_OBJECT
+
+protected:
+  //Method params
+  TeTheme*			regTheme_;    //Tema de regioes
+  vector<string>	attrVector_;  //Atributos a serem utilizados
+  bool				hasPop_;       //Usa populacao
+  string			attrPop_;     //Atributo de populacao
+  int				type_;
+  int				minPop_;
+  int				nClusters_;
+  string			tableName_;
+  string			resName_;
+
+  string			aggrAttr_;	//aggregate attribute
+
+public:
+
+	//! Constructor
+	TeSkaterMethod():  regTheme_(0), hasPop_(false), attrPop_(""), 
+		nClusters_(0), tableName_(""), resName_(""), aggrAttr_("")
+	{ }
+		
+	bool setTheme(string name, TeView* view) {
+    regTheme_ = view->get(name);
+    return (regTheme_ != NULL);
+  }
+
+  void setAttrVector(const vector<string>& vec) {
+    attrVector_ = vec;
+  }
+
+  void setAggrAttr(const string& attrName) 
+  {
+    aggrAttr_ = attrName;
+  }
+
+  void setHasPop(bool hp, const string& pop) {
+    hasPop_ = hp;
+    attrPop_ = pop;
+  }
+
+  void setType(int t, int mp, int nc) {
+    type_ = t; minPop_= mp; nClusters_= nc;
+  }
+
+  void setResName(string r, string t) {
+    resName_ = r;
+    tableName_ = t;
+  }
+
+  //Aplica o metodo skater
+  bool apply(vector<double>& het);
+
+};
+
+#endif
diff --git a/src/terralib/drivers/qt/TeQtProgress.h b/src/terralib/drivers/qt/TeQtProgress.h
new file mode 100755
index 0000000..114ce84
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtProgress.h
@@ -0,0 +1,138 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#ifndef  __TERRALIB_INTERNAL_QTPROGRESS_H
+#define  __TERRALIB_INTERNAL_QTPROGRESS_H
+
+#include <qprogressdialog.h>
+#include <qapplication.h>
+#include <qcursor.h>
+#include <qaction.h>
+#include "TeProgress.h"
+#include <qeventloop.h>
+
+class TeQtProgress : public QProgressDialog, public TeProgressBase
+{
+	Q_OBJECT
+
+protected:
+	int		numberOfCursors_;	//<! Number of cursors that were pushed on application stack.
+
+	void enterEvent ( QEvent * )
+	{
+		if(QApplication::overrideCursor())
+		{
+			if(QApplication::overrideCursor()->shape() != Qt::ArrowCursor)
+			{
+				QApplication::setOverrideCursor( Qt::ArrowCursor );
+				numberOfCursors_++;
+			}
+		}
+	}
+
+	void leaveEvent ( QEvent * )
+	{
+		if(QApplication::overrideCursor())
+		{
+			if(QApplication::overrideCursor()->shape() == Qt::ArrowCursor)
+			{
+				QApplication::restoreOverrideCursor();
+				numberOfCursors_--;
+			}
+		}
+	}
+
+public:
+	TeQtProgress( QWidget * creator = 0, const char * name = 0, bool modal = FALSE, WFlags f = 0)
+		: QProgressDialog(creator, name, modal, f)	
+	{
+		numberOfCursors_ = 0;
+	}
+
+	~TeQtProgress() {}
+
+	void reset()
+	{
+		int i;
+		QProgressDialog::reset();
+		QProgressDialog::setLabelText("");
+		QProgressDialog::setCaption("");
+
+		//Restore all cursors that were set by TeQtProgress.
+		for (i=0; i<numberOfCursors_; i++)
+		{
+			if(QApplication::overrideCursor())
+				QApplication::restoreOverrideCursor();
+		}
+		numberOfCursors_ = 0;
+	}
+
+	void setTotalSteps (int steps)
+	{
+		QProgressDialog::setTotalSteps(steps);
+		if(QApplication::overrideCursor())
+		{
+			if(QApplication::overrideCursor()->shape() != Qt::WaitCursor)
+			{
+				QApplication::setOverrideCursor( Qt::WaitCursor );
+				numberOfCursors_++;
+			}
+		}
+		else
+		{
+			QApplication::setOverrideCursor( Qt::WaitCursor );
+			numberOfCursors_++;
+		}
+	}
+
+	void setMessage(const string& text)
+	{
+		QProgressDialog::setLabelText(text.c_str());
+	}
+
+	string getMessage()
+	{
+		return QProgressDialog::labelText().latin1();
+	}
+
+	void setProgress(int steps)
+	{
+		QProgressDialog::setProgress(steps);
+	}
+
+	 bool wasCancelled()
+	 {
+		 hasMouse();
+		 return QProgressDialog::wasCancelled();
+	 }
+
+	 void setCaption(const string& cap)
+	 {
+		 QProgressDialog::setCaption(cap.c_str());
+	 }
+
+	 void cancel() 
+	 {
+		 QProgressDialog::cancel();
+	 }
+
+};
+#endif
diff --git a/src/terralib/drivers/qt/TeQtShowMedia.cpp b/src/terralib/drivers/qt/TeQtShowMedia.cpp
new file mode 100755
index 0000000..3aaea01
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtShowMedia.cpp
@@ -0,0 +1,1983 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#include <TeQtShowMedia.h>
+#include <TeAttribute.h>
+#include <qfiledialog.h> 
+#include <qlineedit.h> 
+#include <qstring.h> 
+#include <qtextedit.h> 
+#include <qmessagebox.h>
+#include <qfile.h>
+#include <errno.h>
+#include <qprocess.h>
+#include <qapplication.h>
+
+#ifdef WIN32
+#include <windows.h>
+#include <process.h>
+#include <io.h>
+#include <direct.h>
+#else
+#include <unistd.h>
+#endif
+
+
+TeQtShowMedia :: TeQtShowMedia(QWidget* parent, const char* name)
+	: QTable(2, 2, parent, name)
+{
+	layer_ = 0;
+	db_ = 0;
+	cmdLocal_ = false;
+	row_ = -1;
+	popup_ = new QPopupMenu(this);
+	popup_->insertItem(tr("Show Media..."), this, SLOT(slotShow()));
+	popup_->insertItem(tr("Insert Media..."), this, SLOT(slotInsert(QString&)));
+	popup_->insertItem(tr("Insert URL..."), this, SLOT(slotInsertURL()));
+	popup_->insertItem(tr("Remove..."), this, SLOT(slotRemove()));
+	popup_->insertItem(tr("Set the Default Media"), this, SLOT(slotSetDefault()));
+	popup_->insertItem(tr("Description..."), this, SLOT(slotDescription()));
+
+	connect(this, SIGNAL(pressed(int, int, int, const QPoint&)),
+		 this, SLOT(slotpressed(int, int, int, const QPoint&)));
+
+	connect(this, SIGNAL(doubleClicked(int, int, int, const QPoint&)),
+		 this, SLOT(slotDoubleClicked(int, int, int, const QPoint&)));
+}
+
+TeQtShowMedia :: ~TeQtShowMedia()
+{
+}
+
+void TeQtShowMedia :: init(string objId, TeAppTheme* theme, TeQtGrid* grid)
+{
+	setNumRows(0);
+	id_ = objId;
+	nattrs_ = grid->numCols();
+	layer_ = ((TeTheme*)theme->getTheme())->layer();
+	table_ = layer_->mediaTable();
+	db_ = layer_->database();
+	TeDatabasePortal* portal = db_->getPortal();
+	row_ = -1;
+	
+	TeAttributeList	colAttrList;
+	db_->getAttributeList(((TeTheme*)theme->getTheme())->collectionTable(), colAttrList);
+
+	horizontalHeader()->setLabel(0, tr("Attribute"));
+	horizontalHeader()->setLabel(1, tr("Value"));
+
+	int	i, nMidias = 0;
+	if(table_.empty() == false)
+	{
+		string q = "SELECT COUNT(*) FROM " + table_;
+		q += " WHERE object_id = '" + id_ + "'";
+		if(portal->query(q))
+		{
+			if(portal->fetchRow())
+				nMidias = atoi(portal->getData(0));
+		}
+	}
+
+	string sel = ((TeTheme*)theme->getTheme())->sqlJoin() + " WHERE c_object_id = '" + id_ + "'";
+
+	portal->freeResult();
+	if(portal->query(sel))
+	{
+		int ncol = portal->getAttributeList().size() - colAttrList.size() + nMidias;
+
+		setNumRows(ncol);
+
+		if(portal->fetchRow())
+		{
+			for(i=0; i<grid->numCols(); i++)
+			{
+				string fname = portal->getAttribute(i).rep_.name_;
+				string data = portal->getData(i);
+				setText(i, 0, fname.c_str());
+				setText(i, 1, data.c_str());
+			}
+		}
+
+		if(table_.empty() == false)
+		{
+			string q = "SELECT media_name, media_table, show_default FROM " + table_;
+			q += " WHERE object_id = '" + id_ + "'";
+			portal->freeResult();
+			if(portal->query(q))
+			{
+				TeDatabasePortal* portal2 = db_->getPortal();
+				while(portal->fetchRow())
+				{
+					string type;
+					string mediaName = portal->getData(0);
+					string mediaTable = portal->getData(1);
+					bool showDefault = atoi(portal->getData(2));
+
+					string q = "SELECT media_type FROM " + mediaTable;
+					q += " WHERE media_name = '" + mediaName + "'";
+					portal2->freeResult();
+					if(portal2->query(q))
+					{
+						if(portal2->fetchRow())
+							type = portal2->getData(0);
+					}
+
+					string ss;
+					if(showDefault)
+						ss = "*media: "; // + type;
+					else
+						ss = "media: "; // + type;
+
+					setText(i, 0, ss.c_str());
+					setText(i, 1, mediaName.c_str());
+					i++;
+				}
+				delete portal2;
+			}
+		}
+		show();
+		moveDown();
+	}
+	delete portal;
+}
+
+bool TeQtShowMedia :: eventFilter(QObject* o, QEvent* e)
+{
+//	if (e->type() == QEvent::MouseButtonDblClick)
+//		return true;
+	return QTable::eventFilter(o, e);    // standard event processing
+}
+
+void TeQtShowMedia :: slotpressed( int row, int /* col */, int button, const QPoint & mousePos )
+{
+	if(button == RightButton)
+	{
+		cmdLocal_ = true;
+		row_ = row;
+		popup_->move(mousePos.x() + x() - contentsX(), mousePos.y() + y() - contentsY());
+		popup_->exec();
+		cmdLocal_ = false;
+	}
+}
+
+void TeQtShowMedia :: slotDoubleClicked( int row, int /* col */, int button, const QPoint & /*mousePos */)
+{
+	if(button == LeftButton)
+	{
+		row_ = row;
+		slotShow();
+	}
+}
+
+//void TeQtShowMedia :: slotShow()
+//{
+//	if(row_ > 0 && nattrs_ > row_)
+//		return;
+//
+//	string name;
+//	if(row_ >= 0)
+//		name = text(row_, 1).latin1();
+//
+//    size_t  pos;
+//    char    buf[300];
+//	vector<string>	varg;
+//    string  cmd, arg, sname;
+//	string	swdir;
+//	string	mediaTable;
+//	string	type;
+//
+//// load media data to archive from database
+//	TeDatabasePortal *portal = db_->getPortal();
+//	string query = "SELECT media_table, media_name FROM " + table_;
+//	if(row_ >= 0)
+//		query += " WHERE object_id = '" + id_ + "' AND media_name = '" + name + "'";
+//	else
+//		query += " WHERE object_id = '" + id_ + "' AND show_default = 1";
+//	if(portal->query(query))
+//	{
+//		if(portal->fetchRow())
+//		{
+//			mediaTable = portal->getData(0);
+//			name = portal->getData(1);
+//		}
+//	}
+//
+//	if(mediaTable.empty())
+//	{
+//		QMessageBox::warning(this, tr("Warning"),
+//			tr("There is no media to show!\nInsert one first."));
+//		delete portal;
+//		return;
+//	}
+//
+//	query = "SELECT * FROM " + mediaTable + " WHERE media_name = '" + name + "'";
+//	portal->freeResult();
+//	if(portal->query(query))
+//		if(portal->fetchRow())
+//			type = portal->getData("media_type");
+//
+//	if(type.empty())
+//	{
+//		QMessageBox::warning(this, tr("Warning"),
+//			tr("There is no media in the table!"));
+//		delete portal;
+//		return;
+//	}
+//
+//	string tempName =  name;
+//	if(type != "url")
+//	{
+//        size_t f;
+//#ifdef WIN32
+//		char wdir[100];
+//		GetWindowsDirectory((LPTSTR)wdir, 100);
+//		swdir = wdir;
+//		f = swdir.find(":\\");
+//		if(f != string::npos)
+//			swdir = swdir.substr(0, f);
+//		swdir.append(":\\TERRAVIEW_TEMP");
+//		if( access (swdir.c_str(), 06) == -1 ) // test if directory exists
+//		{
+//			if( errno == ENOENT )  // directory does not exist so create it
+//			{
+//				if ( _mkdir(swdir.c_str()) == -1)
+//				{
+//                    QString msg = tr("The directory ");
+//                    msg += swdir.c_str();
+//                    msg += tr(" could not be created");
+//            		QMessageBox::critical(this, tr("Error"),
+//            		    tr("The directory /tmp/TERRAVIEW_TEMP could not be created!"));
+//					delete portal;
+//					return;
+//				}
+//			}
+//		}
+//		swdir.append("\\");
+//#else
+//    	swdir = "/tmp/TERRAVIEW_TEMP";
+//		if( access (swdir.c_str(), F_OK) == -1 ) // test if directory exists
+//		{
+//			if( errno == ENOENT )  // directory does not exist so create it
+//			{
+//                char buf[20];
+//                sprintf(buf, "mkdir %s", swdir.c_str());
+//				if (system(buf) != 0)
+//				{
+//            		QMessageBox::critical(this, tr("Error"),
+//            		    tr("The directory /tmp/TERRAVIEW_TEMP could not be created!"));
+//            		delete portal;
+//            		return;
+//				}
+//			}
+//		}        
+//		swdir.append("/");
+//#endif
+//		f = tempName.rfind("/");
+//		if(f == string::npos)
+//			f = tempName.rfind("\\");
+//		if(f != string::npos)
+//			tempName = tempName.substr(f+1);
+//		tempName.insert(0, swdir);
+//
+//		pos = tempName.rfind(".");
+//		if (pos == string::npos)
+//		{
+//			tempName.append(".");
+//			tempName.append(type);
+//		}
+//		unsigned char *data = 0;
+//		long size;
+////		string description;
+////		string type;
+//		if((portal->getBlob("media_blob", data, size)) == false)
+//		{
+//			delete portal;
+//			return;
+//		}
+//		FILE *fp = fopen(tempName.c_str(), "wb");
+//		if(fp == 0)
+//		{
+//			delete portal;
+//			return;
+//		}
+//		if(fwrite(data, sizeof(unsigned char), size, fp) < (unsigned long)size)
+//		{
+//			delete portal;
+//			return;
+//		}
+//		if(data)
+//			delete []data;
+//		fclose(fp);
+//
+//		pos = tempName.rfind(".");
+//		if (pos == string::npos)
+//		{
+//			delete portal;
+//			return;
+//		}
+//
+//		memset (buf, 0, 300);
+//		tempName.copy (buf, tempName.size()-pos, pos);
+//	}
+//	else
+//		strcpy(buf, ".html");
+//
+//	delete portal;
+//
+//#ifdef WIN32
+//	if (TeConvertToUpperCase (buf) == ".EXE")
+//	{
+//		_spawnl (P_NOWAIT, tempName.c_str(), tempName.c_str(), NULL);
+//		return;
+//	}
+//	// if application is user defined find current application
+//	// else use default application
+//	string key = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts\\";
+//	key += buf;
+//
+//	string keycmd = getSystemKeyValue(HKEY_CURRENT_USER, key, "Application");
+//	if(keycmd.empty() == false)
+//	{
+//		string com = keycmd;
+//		key = "Applications\\" + com + "\\SHELL\\PLAY\\COMMAND";
+//		keycmd = getSystemKeyValue(HKEY_CLASSES_ROOT, key, "");
+//		if(keycmd.empty())
+//		{
+//			key = "Applications\\" + com + "\\SHELL\\OPEN\\COMMAND";
+//			keycmd = getSystemKeyValue(HKEY_CLASSES_ROOT, key, "");
+//			if(keycmd.empty())
+//			{
+//				key = "Applications\\" + com + "\\SHELL\\EDIT\\COMMAND";
+//				keycmd = getSystemKeyValue(HKEY_CLASSES_ROOT, key, "");
+//			}
+//		}
+//	}
+//	else
+//	{
+//		key = buf;
+//		keycmd = getSystemKeyValue(HKEY_CLASSES_ROOT, key, "");
+//		if(keycmd.size() <= 1)
+//		{
+//			key += "\\SHELL\\PLAY\\COMMAND";
+//			keycmd = getSystemKeyValue(HKEY_CLASSES_ROOT, key, "");
+//			if(keycmd.empty())
+//			{
+//				key = buf;
+//				key += "\\SHELL\\OPEN\\COMMAND";
+//				keycmd = getSystemKeyValue(HKEY_CLASSES_ROOT, key, "");
+//				if(keycmd.empty())
+//				{
+//					key = buf;
+//					key += "\\SHELL\\EDIT\\COMMAND";
+//					keycmd = getSystemKeyValue(HKEY_CLASSES_ROOT, key, "");
+//				}
+//			}
+//		}
+//		else
+//		{
+//			memset (buf, 0, 300);
+//			strcpy(buf, keycmd.c_str());
+//
+//			key = buf;
+//			key += "\\SHELL\\PLAY\\COMMAND";
+//			keycmd = getSystemKeyValue(HKEY_CLASSES_ROOT, key, "");
+//			if(keycmd.empty())
+//			{
+//				key = buf;
+//				key += "\\SHELL\\OPEN\\COMMAND";
+//				keycmd = getSystemKeyValue(HKEY_CLASSES_ROOT, key, "");
+//				if(keycmd.empty())
+//				{
+//					key = buf;
+//					key += "\\SHELL\\EDIT\\COMMAND";
+//					keycmd = getSystemKeyValue(HKEY_CLASSES_ROOT, key, "");
+//				}
+//			}
+//		}
+//	}
+//
+//	if(keycmd.empty())
+//	{
+//		QMessageBox::warning(this, tr("Warning"),
+//			tr("The media cannot be shown!\nCheck if there is a program defined to open it."));
+//		return;
+//	}
+//
+//// get command and arguments from keycmd
+//    getCommand(keycmd, cmd, varg);
+//	if((pos = tempName.find(" ")) != string::npos)
+//		tempName = "\"" + tempName + "\"";
+//
+//	char curdir[256];
+//	_getcwd(curdir, 256);
+//	_chdir(swdir.c_str());
+//
+//	if (varg.size() == 0)
+//		_spawnl (P_NOWAIT, cmd.c_str(), tempName.c_str(), NULL);
+//	else if (varg.size() == 1)
+//        _spawnl (P_NOWAIT, cmd.c_str(), varg[0].c_str(), tempName.c_str(), NULL);
+//	else if (varg.size() == 2)
+//	{
+//		const char* p = varg[1].c_str();
+//		if(varg[1] == "%L" || varg[1] == "%1")
+//			_spawnl (P_NOWAIT, cmd.c_str(), varg[0].c_str(), tempName.c_str(), NULL);
+//		else
+//			_spawnl (P_NOWAIT, cmd.c_str(), varg[0].c_str(), p, tempName.c_str(), NULL);
+//	}
+//	else if (varg.size() == 3)
+//	{
+//		const char* p = varg[1].c_str();
+//		const char* p1 = varg[2].c_str();
+//		size_t f = varg[0].find("/prefetch:");
+//		if(f != string::npos && (varg[2] == "%L" || varg[2] == "%1"))
+//			_spawnl (P_NOWAIT, cmd.c_str(), p, tempName.c_str(), NULL);
+//		else
+//			_spawnl (P_NOWAIT, cmd.c_str(), varg[0].c_str(), p, p1, tempName.c_str(), NULL);
+//
+//
+//	}
+//
+//	_chdir(curdir);
+//#else
+//    string command;
+//    //Mount the vector of directory paths that are
+//    //stored in the PATH environment variable
+//    string path =  getenv("PATH");
+//    vector<string> dirVector;
+//    string dirPath;
+//    size_t idx = 0;
+//    size_t len = path.find(':', idx);
+//    while (len != string::npos)
+//    {
+//        dirPath = path.substr(idx, len-idx);
+//        dirVector.push_back(dirPath);
+//        idx = len+1;
+//        len = path.find(':', idx);
+//    }
+//
+//
+//    // get the last directory path
+//    idx = path.rfind(':', path.size());
+//    dirPath = path.substr(idx+1, path.size());
+//    dirVector.push_back(dirPath);
+//       
+//	string fs; 
+//    if(type != "url")
+//	{
+//        bool exists = false;
+//        for (unsigned int i = 0; i < dirVector.size(); ++i)
+//        {
+//			QString qfs = dirVector[i].c_str();
+//			qfs += "/konqueror";
+//            QFile file(qfs);
+//            if (file.exists() == true)
+//            {
+//                exists = true;
+//                break;
+//            }
+//        }
+//        if (exists == true)
+//            command = "konqueror " + tempName + " &";
+//        else
+//        {
+//			QString msg = tr("The program konqueror used to display your media is not") + "\n";
+//			msg += tr("present in your PATH environment variable or KDE is not installed!");
+//            QMessageBox::warning(this, tr("Warning"), msg);
+//            return;
+//        }      
+//    }
+//    else
+//    {
+//        unsigned int i;
+//        for (i = 0; i < dirVector.size(); ++i)
+//        {
+//			QString qfs = dirVector[i].c_str();
+//			qfs += "/netscape";
+//            QFile file(qfs);
+//            if (file.exists() == true)
+//            {
+//                command = "netscape -remote 'openURL(" + tempName + ")' &";              
+//                break;
+//            }
+//        }
+//
+//        if (command.empty() == true)
+//        {
+//            for (i = 0; i < dirVector.size(); ++i)
+//            {
+//				QString qfs = dirVector[i].c_str();
+//				qfs += "/mozilla";
+//                QFile file(qfs);
+//                if (file.exists() == true)
+//                {
+//                    command = "mozilla -remote 'openURL(" + tempName + ")' &";
+//                    break;
+//                }
+//            }
+//        }
+//         
+//        if (command.empty() == true)
+//        {
+//            for (i = 0; i < dirVector.size(); ++i)
+//            {
+//				QString qfs = dirVector[i].c_str();
+//				qfs += "/konqueror";
+//				QFile file(qfs);
+//                if (file.exists() == true)
+//                {
+//                    command = "konqueror " + tempName + " &";
+//                    break;
+//                }
+//           }
+//        }
+//        
+//        if (command.empty() == true)
+//        {
+// 			QString msg = tr("The program konqueror used to display your media is not") + "\n";
+//			msg += tr("present in your PATH environment variable or KDE is not installed!");
+//            QMessageBox::warning(this, tr("Warning"), msg);
+//             return;
+//        }
+//    }
+//    
+//    system(command.c_str());
+//#endif
+//}
+
+void TeQtShowMedia :: slotShow()
+{
+	if(row_ > 0 && nattrs_ > row_)
+		return;
+
+	string name;
+	if(row_ >= 0)
+		name = text(row_, 1).latin1();
+
+    size_t  pos;
+    char    buf[300];
+	vector<string>	varg;
+    string  cmd, arg, sname;
+	string	swdir;
+	string	mediaTable;
+	string	type;
+
+// load media data to archive from database
+	TeDatabasePortal *portal = db_->getPortal();
+	string query = "SELECT media_table, media_name FROM " + table_;
+	if(row_ >= 0)
+		query += " WHERE object_id = '" + id_ + "' AND media_name = '" + name + "'";
+	else
+		query += " WHERE object_id = '" + id_ + "' AND show_default = 1";
+	if(portal->query(query))
+	{
+		if(portal->fetchRow())
+		{
+			mediaTable = portal->getData(0);
+			name = portal->getData(1);
+		}
+	}
+
+	if(mediaTable.empty())
+	{
+		QMessageBox::warning(this, tr("Warning"),
+			tr("There is no media to show!\nInsert one first."));
+		delete portal;
+		return;
+	}
+
+	query = "SELECT * FROM " + mediaTable + " WHERE media_name = '" + name + "'";
+	portal->freeResult();
+	if(portal->query(query))
+		if(portal->fetchRow())
+			type = portal->getData("media_type");
+
+	if(type.empty())
+	{
+		QMessageBox::warning(this, tr("Warning"),
+			tr("There is no media in the table!"));
+		delete portal;
+		return;
+	}
+
+	string tempName =  name;
+	if(type != "url")
+	{
+        size_t f;
+#ifdef WIN32
+		char wdir[100];
+		GetWindowsDirectory((LPTSTR)wdir, 100);
+		swdir = wdir;
+		f = swdir.find(":\\");
+		if(f != string::npos)
+			swdir = swdir.substr(0, f);
+		swdir.append(":\\TERRAVIEW_TEMP");
+		if( access (swdir.c_str(), 06) == -1 ) // test if directory exists
+		{
+			if( errno == ENOENT )  // directory does not exist so create it
+			{
+				if ( _mkdir(swdir.c_str()) == -1)
+				{
+                    QString msg = tr("The directory ");
+                    msg += swdir.c_str();
+                    msg += tr(" could not be created");
+            		QMessageBox::critical(this, tr("Error"),
+            		    tr("The directory /tmp/TERRAVIEW_TEMP could not be created!"));
+					delete portal;
+					return;
+				}
+			}
+		}
+		swdir.append("\\");
+#else
+    	swdir = "/tmp/TERRAVIEW_TEMP";
+		if( access (swdir.c_str(), F_OK) == -1 ) // test if directory exists
+		{
+			if( errno == ENOENT )  // directory does not exist so create it
+			{
+                char buf[20];
+                sprintf(buf, "mkdir %s", swdir.c_str());
+				if (system(buf) != 0)
+				{
+            		QMessageBox::critical(this, tr("Error"),
+            		    tr("The directory /tmp/TERRAVIEW_TEMP could not be created!"));
+            		delete portal;
+            		return;
+				}
+			}
+		}        
+		swdir.append("/");
+#endif
+		f = tempName.rfind("/");
+		if(f == string::npos)
+			f = tempName.rfind("\\");
+		if(f != string::npos)
+			tempName = tempName.substr(f+1);
+		tempName.insert(0, swdir);
+
+		pos = tempName.rfind(".");
+		if (pos == string::npos)
+		{
+			tempName.append(".");
+			tempName.append(type);
+		}
+		unsigned char *data = 0;
+		long size;
+//		string description;
+//		string type;
+		if((portal->getBlob("media_blob", data, size)) == false)
+		{
+			delete portal;
+			return;
+		}
+		FILE *fp = fopen(tempName.c_str(), "wb");
+		if(fp == 0)
+		{
+			delete portal;
+			return;
+		}
+		if(fwrite(data, sizeof(unsigned char), size, fp) < (unsigned long)size)
+		{
+			delete portal;
+			return;
+		}
+		if(data)
+			delete []data;
+		fclose(fp);
+
+		pos = tempName.rfind(".");
+		if (pos == string::npos)
+		{
+			delete portal;
+			return;
+		}
+
+		memset (buf, 0, 300);
+		tempName.copy (buf, tempName.size()-pos, pos);
+	}
+	else
+		strcpy(buf, ".html");
+
+	delete portal;
+
+#ifdef WIN32
+
+	if(isVistaOperatingSystem() == false)
+	{
+		//converte ASCII to UNICODE
+		wchar_t fName[256]; // file name
+		wchar_t dName[256]; // dir name
+		size_t tt = tempName.rfind("\\");
+		if(tt == string::npos)
+			tt = tempName.rfind("/");
+		if(tt == string::npos)
+			tt = 0;
+		int i;
+		for(i=0; i<(int)tt; ++i)
+			dName[i] = tempName.c_str()[i];
+		dName[i] = '\0';
+		for(i=(int)tt+1; i<(int)tempName.length(); ++i)
+			fName[i-((int)tt+1)] = tempName.c_str()[i];
+		fName[i-((int)tt+1)] = '\0';
+
+		//HINSTANCE hhhh = ShellExecute(NULL, L"open", fName , L"/Play", dName, SW_SHOWNORMAL);
+		SHELLEXECUTEINFO shExecInfo;
+		shExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
+		shExecInfo.fMask = NULL;
+		shExecInfo.hwnd = NULL;
+		shExecInfo.lpVerb = L"open";
+		shExecInfo.lpFile = fName;
+		shExecInfo.lpParameters = L"/Open";
+		shExecInfo.lpDirectory = dName;
+		shExecInfo.nShow = SW_SHOWNORMAL;
+		shExecInfo.hInstApp = NULL;
+
+		ShellExecuteEx(&shExecInfo);
+	}
+	else // windows VISTA
+	{
+		QProcess proc( this );
+		string cmdName;
+		if (TeConvertToUpperCase (buf) == ".EXE")
+		{
+			cmdName = tempName;
+			proc.addArgument(cmdName.c_str());
+			proc.start();
+			return;
+		}
+		// find user defined current application
+		string fileType = buf;
+		string key = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts\\";
+
+		key += fileType + "\\UserChoice"; // para vista dever ser essa opcao (testar)
+		string keyFile = getSystemKeyValue(HKEY_CURRENT_USER, key, "Progid"); // para vista dever ser essa opcao (testar)
+		if(keyFile.empty()) // para vista dever ser essa opcao (testar)
+			keyFile = getKeyFileFromProgId(fileType); // para vista dever ser essa opcao (testar)
+
+		keyFile += "\\shell\\open\\command";		
+		string keycmd = getSystemKeyValue(HKEY_CLASSES_ROOT, keyFile, "");
+		if(keycmd.size() <= 1)
+        {
+ 			QString msg = tr("Sorry! Problem to display midia.\nPlease verify if exist default program associated with this type of midia.");
+            QMessageBox::warning(this, tr("Warning"), msg);
+             return;
+		}
+
+		getCommandToQtProcess(keycmd, cmd);
+		cmdName = cmd;
+		size_t ft;
+		ft = cmdName.find("%");
+		if(ft != string::npos)
+			cmdName.replace(ft, 2, tempName);
+		else
+			cmdName += " " + tempName;
+
+		QString qCmd(cmdName.c_str());
+		qCmd = qCmd.simplifyWhiteSpace();
+		proc.addArgument(qCmd);
+		proc.start();
+
+		//proc.clearArguments();
+		//proc.addArgument( "\"C:\\Program Files\\Adobe\\Photoshop Album Starter Edition\\3.2\\Apps\\ComponentLauncher.exe\" module=jpegviewer bg params \"filepath=c:\\TERRAVIEW_TEMP\\winter.jpg\"" );
+		////proc.addArgument( "\"C:\\Program Files\\Adobe\\Photoshop Album Starter Edition\\3.2\\Apps\\ComponentLauncher.exe\" module=jpegviewer bg params filepath=c:\\TERRAVIEW_TEMP\\winter.jpg" );
+		//proc.start();
+
+	}
+  
+#else
+    string command;
+    //Mount the vector of directory paths that are
+    //stored in the PATH environment variable
+    string path =  getenv("PATH");
+    vector<string> dirVector;
+    string dirPath;
+    size_t idx = 0;
+    size_t len = path.find(':', idx);
+    while (len != string::npos)
+    {
+        dirPath = path.substr(idx, len-idx);
+        dirVector.push_back(dirPath);
+        idx = len+1;
+        len = path.find(':', idx);
+    }
+
+
+    // get the last directory path
+    idx = path.rfind(':', path.size());
+    dirPath = path.substr(idx+1, path.size());
+    dirVector.push_back(dirPath);
+       
+	string fs; 
+    if(type != "url")
+	{
+        bool exists = false;
+        for (unsigned int i = 0; i < dirVector.size(); ++i)
+        {
+			QString qfs = dirVector[i].c_str();
+			qfs += "/konqueror";
+            QFile file(qfs);
+            if (file.exists() == true)
+            {
+                exists = true;
+                break;
+            }
+        }
+        if (exists == true)
+            command = "konqueror " + tempName + " &";
+        else
+        {
+			QString msg = tr("The program konqueror used to display your media is not") + "\n";
+			msg += tr("present in your PATH environment variable or KDE is not installed!");
+            QMessageBox::warning(this, tr("Warning"), msg);
+            return;
+        }      
+    }
+    else
+    {
+        unsigned int i;
+        for (i = 0; i < dirVector.size(); ++i)
+        {
+			QString qfs = dirVector[i].c_str();
+			qfs += "/netscape";
+            QFile file(qfs);
+            if (file.exists() == true)
+            {
+                command = "netscape -remote 'openURL(" + tempName + ")' &";              
+                break;
+            }
+        }
+
+        if (command.empty() == true)
+        {
+            for (i = 0; i < dirVector.size(); ++i)
+            {
+				QString qfs = dirVector[i].c_str();
+				qfs += "/mozilla";
+                QFile file(qfs);
+                if (file.exists() == true)
+                {
+                    command = "mozilla -remote 'openURL(" + tempName + ")' &";
+                    break;
+                }
+            }
+        }
+         
+        if (command.empty() == true)
+        {
+            for (i = 0; i < dirVector.size(); ++i)
+            {
+				QString qfs = dirVector[i].c_str();
+				qfs += "/konqueror";
+				QFile file(qfs);
+                if (file.exists() == true)
+                {
+                    command = "konqueror " + tempName + " &";
+                    break;
+                }
+           }
+        }
+        
+        if (command.empty() == true)
+        {
+ 			QString msg = tr("The program konqueror used to display your media is not") + "\n";
+			msg += tr("present in your PATH environment variable or KDE is not installed!");
+            QMessageBox::warning(this, tr("Warning"), msg);
+             return;
+        }
+    }
+    
+    system(command.c_str());
+#endif
+
+}
+
+void TeQtShowMedia :: slotInsert(QString& dir)
+{
+	if(cmdLocal_ == false)
+		hide();
+	QFileDialog filed(dir, QString::null, 0, 0, true);
+	QString qfile = filed.getOpenFileName (QString::null, QString::null, 0, 0);
+
+	if(qfile.isEmpty())
+	{
+		QMessageBox::warning(this, tr("Warning"), tr("No media was selected!"));
+		show();
+		return;
+	}
+
+	string file = qfile.latin1();
+	dir = TeGetPath(file.c_str()).c_str();
+
+	string type;
+	size_t f = file.rfind(".");
+	if (f != string::npos)
+	{
+		type = file;
+		type = type.substr(f+1);
+	}
+
+	string mTable = "media_table_" + Te2String(layer_->id());
+	if(table_.empty())
+	{
+		string tname = "media_layer_" + Te2String(layer_->id());
+		if(createLayerMediaTable(db_, layer_->id(), tname) == false)
+		{
+			QMessageBox::critical(this, tr("Error"),
+				tr("Fail to create the table that will store media names!"));
+			return;
+		}
+		table_ = layer_->mediaTable();
+		if(createMediaTable(db_, mTable) == false)
+		{
+			QMessageBox::critical(this, tr("Error"),
+				tr("Fail to create the media table!"));
+			return;
+		}
+	}
+
+	int response = 1;
+
+	TeDatabasePortal *portal = db_->getPortal();
+	string sel = "SELECT media_name, object_id FROM "  + table_ + " WHERE media_table = '" + mTable + "'";
+	if(portal->query(sel))
+	{
+		while(portal->fetchRow())
+		{
+			string s = portal->getData(0);
+			if(s == file)
+			{
+				response = QMessageBox::question(this, tr("Question"),
+				tr("The media already exists! Do you wish to use it even so?"), tr("Yes"), tr("No"));
+				if(response == 1)
+				{
+					QMessageBox::warning(this, tr("Warning"),
+						tr("Rename the file and try again!"));
+					delete portal;
+					return;
+				}
+				else
+				{
+					string s = portal->getData(1);
+					if(s == id_)
+					{
+						QMessageBox::warning(this, tr("Warning"),
+							tr("There is already a media associated to this object!"));
+						delete portal;
+						return;
+					}
+				}
+				break;
+			}
+		}
+	}
+
+	if(response == 1)
+	{
+		if(insertMedia(db_, mTable, file, "", type) == false)
+		{
+			QString msg = tr("Fail to insert media:") + " ";
+			msg += db_->errorMessage().c_str();
+			QMessageBox::critical(this, tr("Error"), msg);
+			delete portal;
+			return;
+		}
+	}
+	if(insertMediaObjLayer(db_, layer_, id_, file, mTable) == false)
+	{
+		QMessageBox::critical(this, tr("Error"),
+			tr("Fail to insert the \"media_name\" field in the table!"));
+		delete portal;
+		return;
+	}
+
+	setNumRows(numRows() + 1);
+	setText(numRows()-1, 1, file.c_str());
+
+	int nmidias = 0;
+	string conta = "SELECT COUNT(*) FROM "  + table_ + " WHERE object_id = '" + id_ + "'";
+	portal->freeResult();
+	if(portal->query(conta))
+	{
+		if(portal->fetchRow())
+			nmidias = atoi(portal->getData(0));
+	}
+
+	string title = "media: ";
+
+	if(nmidias <= 1)
+	{
+		title = "*media: "; // + type;
+		string up = "UPDATE " + table_ + " SET show_default = 1 WHERE object_id = '" + id_ + "'";
+		db_->execute(up);
+	}
+	delete portal;
+	setText(numRows()-1, 0, title.c_str());
+
+	if(cmdLocal_ == false)
+		hide();
+	else
+	{
+		moveDown();
+		show();
+		raise();
+
+	}
+}
+
+void TeQtShowMedia :: moveDown()
+{
+	int x = contentsX();
+	int height = visibleHeight(); 
+	int nlins = rowAt(height);
+	int y = rowPos(numRows()-nlins);
+	setContentsPos(x, y);
+	adjustColumn(0);
+	adjustColumn(1);
+}
+
+void TeQtShowMedia :: slotRemove()
+{
+	if(nattrs_ > row_)
+		return;
+
+	int x = contentsX();
+	int y = contentsY();
+
+	vector<string> atr;
+	vector<string> val;
+	int	i;
+
+	for(i=0; i<numRows(); i++)
+	{
+		string a = text(i, 0).latin1();
+		atr.push_back(a);
+		string b = text(i, 1).latin1();
+		val.push_back(b);
+	}
+
+	string	name = val[row_];
+	vector<string>::iterator ait = atr.begin();
+	ait += row_;
+	atr.erase(ait, ait+1);
+	vector<string>::iterator vit = val.begin();
+	vit += row_;
+	val.erase(vit, vit+1);
+
+	setNumRows(0);
+	string mTable = "media_table_" + Te2String(layer_->id());
+	string remover = "DELETE FROM " + table_ + " WHERE object_id = '" + id_ + "'";
+	remover += " AND media_name = '" + name + "'" + " AND media_table = '" + mTable + "'";
+	db_->execute(remover);
+
+	bool aindaUsa = false;
+	TeDatabasePortal* portal = db_->getPortal();
+	string sel = "SELECT * FROM " + table_ + " WHERE media_name = '" + name + "'";
+	sel += " AND media_table = '" +  mTable + "'";
+	if(portal->query(sel))
+		if(portal->fetchRow())
+			aindaUsa = true;
+
+	if(aindaUsa == false)
+	{
+		string remover = "DELETE FROM " + mTable + " WHERE media_name = '" + name + "'";
+		db_->execute(remover);
+	}
+
+	string defname;
+	bool defshow = false;
+	sel = "SELECT media_name, show_default FROM " + table_ + " WHERE object_id = '" + id_ + "'";
+	portal->freeResult();
+	if(portal->query(sel))
+	{
+		while(portal->fetchRow())
+		{
+			defname = portal->getData(0);
+			defshow = atoi(portal->getData(1));
+			if(defshow)
+				break;
+		}
+	}
+	delete portal;
+
+	if(defshow ==  false && defname.empty() == false)
+	{
+		string up = "UPDATE " + table_ + " SET show_default = 1 WHERE media_name = '" + defname + "'";
+		db_->execute(up);
+	}
+
+	setNumRows(atr.size());
+
+	unsigned int k;
+	for(k=0; k<atr.size(); k++)
+	{
+		if(defshow ==  false && defname.empty() == false)
+		{
+			if(val[k] == defname)
+				atr[k].insert(0, "*");
+		}
+		setText(k, 0, atr[k].c_str());
+		setText(k, 1, val[k].c_str());
+	}
+	setContentsPos(x, y);
+	raise();
+}
+
+void TeQtShowMedia :: slotInsertURL()
+{
+	if(cmdLocal_ == false)
+		hide();
+
+	urlWindow_ = new URLWindow(this, "urlInsertion", true);
+	if (urlWindow_->exec() == QDialog::Rejected)
+	{
+		delete urlWindow_;
+		return;
+	}
+	QString qsite = urlWindow_->URLLineEdit->text();
+	delete urlWindow_;
+	if(qsite.isNull() || qsite.isEmpty())
+		return;
+
+	string site = qsite.latin1();
+	string type = "url";
+
+
+	string mTable = "media_table_" + Te2String(layer_->id());
+	if(table_.empty())
+	{
+		string tname = "media_layer_" + Te2String(layer_->id());
+		if(createLayerMediaTable(db_, layer_->id(), tname) == false)
+		{
+			QMessageBox::critical(this,tr("Error"),
+				tr("Fail to create the table to store media names!"));
+			return;
+		}
+		if(createMediaTable(db_, mTable) == false)
+		{
+			QMessageBox::critical(this, tr("Error"), tr("Fail to create the media tables!"));
+			return;
+		}
+	}
+
+
+	bool jatem = false;
+
+	TeDatabasePortal *portal = db_->getPortal();
+	string sel = "SELECT media_name, object_id FROM "  + table_ + " WHERE media_table = '" + mTable + "'";
+	if(portal->query(sel))
+	{
+		while(portal->fetchRow())
+		{
+			string s = portal->getData(0);
+			if(s == site)
+			{
+				jatem = true;
+				string ss = portal->getData(1);
+				if(ss == id_)
+				{
+					QMessageBox::warning(this, tr("Warning"),
+						tr("This URL is already associated to this object!"));
+					delete portal;
+					return;
+				}
+				break;
+			}
+		}
+	}
+
+	if(jatem == false)
+	{
+		if(insertMedia(db_, mTable, site, "", type, false) == false)
+		{
+			QMessageBox::critical(this, tr("Error"),
+				tr("Fail to insert the \"media_blob\" field in the table!"));
+			delete portal;
+			return;
+		}
+	}
+	if(insertMediaObjLayer(db_, layer_, id_, site, mTable) == false)
+	{
+		QMessageBox::critical(this, tr("Error"),
+			tr("Fail to insert the \"media_name\" field in the table!"));
+		delete portal;
+		return;
+	}
+
+	setNumRows(numRows() + 1);
+	setText(numRows()-1, 1, site.c_str());
+
+	int nmidias = 0;
+	string conta = "SELECT COUNT(*) FROM "  + table_ + " WHERE object_id = '" + id_ + "'";
+	portal->freeResult();
+	if(portal->query(conta))
+	{
+		if(portal->fetchRow())
+			nmidias = atoi(portal->getData(0));
+	}
+
+	string title;
+
+	if(nmidias <= 1)
+	{
+		title = "*media: "; // + type;
+		string up = "UPDATE " + table_ + " SET show_default = 1 WHERE object_id = '" + id_ + "'";
+		db_->execute(up);
+	}
+
+	delete portal;
+	setText(numRows()-1, 0, title.c_str());
+
+	if(cmdLocal_ == false)
+		hide();
+	else
+	{
+		moveDown();
+		show();
+		raise();
+	}
+}
+
+void TeQtShowMedia :: slotSetDefault()
+{
+	if(nattrs_ > row_)
+		return;
+
+	string media_name = text(row_, 1).latin1();
+	string mTable = "media_table_" + Te2String(layer_->id());
+	setDefaultMedia(db_, layer_, id_, media_name, mTable);
+
+	string type = text(row_, 0).latin1();
+//	int f = type.find("*", string::npos);
+	size_t f = type.find("*");
+	if(f != string::npos)
+		return;
+	else
+	{
+		int i;
+		for(i = nattrs_; i<numRows(); i++)
+		{
+			string s = text(i, 0).latin1();
+			f = s.find("*", 0);
+			if(f != string::npos)
+			{
+
+				setText(i, 0, "media:");
+				break;
+			}
+		}
+		setText(row_, 0, "*media:");
+	}
+
+	if(cmdLocal_ == false)
+		hide();
+	else
+		raise();
+}
+
+void TeQtShowMedia :: slotDescription()
+{
+	if(row_ > 0 && nattrs_ > row_)
+		return;
+
+	string mTable = "media_table_" + Te2String(layer_->id());
+	TeDatabasePortal *ptal = db_->getPortal();
+	string name;
+
+	if(row_ < 0)
+	{
+		if(table_.empty() == false)
+		{
+			string s = "SELECT media_name FROM " + table_ + " WHERE object_id = '" + id_ + "'";
+			s += " AND show_default = 1";
+			if(ptal->query(s))
+			{
+				if(ptal->fetchRow())
+					name = ptal->getData(0);
+			}
+		}
+	}
+	else
+		name = text(row_, 1).latin1();
+
+	string q = "SELECT * FROM " + mTable + " WHERE media_name = '" + name + "'";
+
+	string description = "";
+	ptal->freeResult();
+
+	if(db_->tableExist(mTable))
+	{
+		if(ptal->query(q))
+		{
+			if(ptal->fetchRow())
+				description = ptal->getData("description");
+		}
+	}
+	delete ptal;
+	descriptionWindow_ = new MediaDescription(this, "mediaDescription", true);
+	QString qdesc;
+	qdesc.setLatin1(description.c_str(), description.size());
+	descriptionWindow_->descriptionTextEdit->setText(qdesc);
+	descriptionWindow_->exec();
+
+	QString qtext = descriptionWindow_->descriptionTextEdit->text();
+	if(qtext.isEmpty() || qtext.isNull())
+		description.clear();
+	else
+		description = qtext.latin1();
+	if(description.size() > 255)
+	{
+		QMessageBox::warning(this, tr("Warning"),
+			tr("The description is longer than 255 caracteres!\nIt will be truncated."));
+		description = description.substr(0, 255);
+	}
+	if(description.empty() == false)
+		updateMediaDescription(db_, name, mTable, description);
+
+	delete descriptionWindow_;
+
+	if(cmdLocal_ == false)
+		hide();
+	else
+		raise();
+}
+
+#ifdef WIN32
+void TeQtShowMedia :: getCommand(string keycom, string& cmd, vector<string>& varg)
+{
+    string  s = keycom;
+    string  ss = keycom;
+    string  S = TeConvertToUpperCase(keycom);
+    unsigned int i;
+    size_t  pos, n;
+	string	arg;
+	bool	isDll = false;
+
+	varg.clear();
+    cmd.clear();
+    arg.clear();
+
+// find command
+	if((pos=s.find(".")) != string::npos)
+	{
+		if((n=s.find(" ", pos)) != string::npos)
+		{
+			s = s.substr(0, n);
+			S = S.substr(0, n);
+			ss = ss.substr(n);
+		}
+	}
+
+// remove ""
+	while((pos=s.find("\"")) != string::npos)
+	{
+		string cs = s, CS = S;
+		s = cs.substr(0, pos) + cs.substr(pos+1);
+		S = CS.substr(0, pos) + CS.substr(pos+1);
+	}
+// replace %SystemRoot%
+	if((pos=S.find("%SYSTEMROOT%")) != string::npos)
+	{
+		int len = strlen("%SystemRoot%");
+		string systemRoot = getSystemKeyValue(HKEY_LOCAL_MACHINE,
+			"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", "SystemRoot");
+		s.replace(pos, len, systemRoot);
+		S.replace(pos, len, systemRoot);
+	}
+
+// replace %ProgramFiles%
+	if((pos=S.find("%PROGRAMFILES%")) != string::npos)
+	{
+		int len = strlen("%ProgramFiles%");
+		string programFiles = getSystemKeyValue(HKEY_LOCAL_MACHINE,
+			"SOFTWARE\\Microsoft\\Windows\\CurrentVersion", "ProgramFilesDir");
+		s.replace(pos, len, programFiles);
+		S.replace(pos, len, programFiles);
+	}
+
+// replace %CommonProgramFiles%
+	if((pos=S.find("%COMMOMFILES%")) != string::npos)
+	{
+		int len = strlen("%CommonFiles%");
+		string commonFiles = getSystemKeyValue(HKEY_LOCAL_MACHINE,
+			"SOFTWARE\\Microsoft\\Windows\\CurrentVersion", "CommonFilesDir");
+		s.replace(pos, len, commonFiles);
+		S.replace(pos, len, commonFiles);
+	}
+
+// rundll32.exe
+	if((pos=S.find("RUNDLL32")) == 0)
+	{
+		string dllDirectory = getSystemKeyValue(HKEY_LOCAL_MACHINE,
+			"System\\ControlSet001\\Control\\Session Manager\\KnownDLLs", "DllDirectory");
+		string  DIR = TeConvertToUpperCase(dllDirectory);
+		if((pos=DIR.find("%SYSTEMROOT%")) != string::npos)
+		{
+
+			int len = strlen("%SystemRoot%");
+			string systemRoot = getSystemKeyValue(HKEY_LOCAL_MACHINE,
+			"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", "SystemRoot");
+			dllDirectory.replace(pos, len, systemRoot);
+		}
+		cmd = dllDirectory + "\\rundll32.exe";
+		isDll = true;
+	}
+	else
+		cmd = s;
+
+	string command = TeConvertToUpperCase(cmd);
+	bool percentOut = false;
+	if((pos=command.find("MSACCESS.EXE")) != string::npos)
+
+		percentOut = true;
+	if((pos=command.find("POWERPNT.EXE")) != string::npos)
+		percentOut = true;
+
+	s = ss; // arguments
+	if(isDll)
+	{
+		varg.push_back("rundll32.exe");
+		S = TeConvertToUpperCase(s);
+		if((pos=S.find("%SYSTEMROOT%")) != string::npos)
+		{
+			int len = strlen("%SystemRoot%");
+			string systemRoot = getSystemKeyValue(HKEY_LOCAL_MACHINE,
+			"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", "SystemRoot");
+			s.replace(pos, len, systemRoot);
+		}
+		if(s[0] == ' ')
+			s = s.substr(1);
+
+		for(i=0; i<s.size(); i++)
+			if(s[i] == '/' || s[i] == '-' || s[i]=='%')
+				break;
+		string arg = s;
+		arg = arg.substr(0, i-1);
+		varg.push_back(arg);
+		s = s.substr(i-1);
+	}
+
+// if runddl32 the option has "/" or "-" and termineted with " " 
+// else the option has "/", "-" or "%" and termineted with " "
+	if(s.find("=") == string::npos)
+	{
+		for(i=0; i<s.size(); i++)
+		{
+			if(isDll || percentOut)
+			{
+				if(s[i] == '/' || s[i] == '-')
+				{
+					if((pos=s.find(" ", i)) != string::npos)
+					{
+						string arg = s;
+
+						arg = arg.substr(0, pos);
+						arg = arg.substr(i, s.size() - i);
+						// remove ""
+						while((n=arg.find("\"")) != string::npos)
+						{
+							string carg = arg;
+							arg = carg.substr(0, n) + carg.substr(n+1);
+						}
+
+						varg.push_back(arg);
+						i = pos;
+					}
+					else
+					{
+						string arg = s;
+						arg = arg.substr(i);
+						// remove ""
+						while((n=arg.find("\"")) != string::npos)
+						{
+							string carg = arg;
+							arg = carg.substr(0, n) + carg.substr(n+1);
+						}
+
+						varg.push_back(arg);
+						break;
+					}
+				}
+			}
+			else
+			{
+				if(s[i] == '/' || s[i] == '-' || s[i] == '%')
+				{
+					if((pos=s.find(" ", i)) != string::npos)
+					{
+						string arg = s;
+						arg = arg.substr(0, pos);
+						arg = arg.substr(i);
+						// remove ""
+						while((n=arg.find("\"")) != string::npos)
+						{
+							string carg = arg;
+							arg = carg.substr(0, n) + carg.substr(n+1);
+						}
+
+						varg.push_back(arg);
+						i = pos;
+					}
+					else
+					{
+						string arg = s;
+						arg = arg.substr(i);
+						// remove ""
+						while((n=arg.find("\"")) != string::npos)
+						{
+							string carg = arg;
+							arg = carg.substr(0, n) + carg.substr(n+1);
+						}
+
+						varg.push_back(arg);
+						break;
+					}
+				}
+			}
+		}
+	}
+	else
+	{
+		int p = s.find("%1");
+		if(p != string::npos)
+		{
+		}
+	}
+}
+
+void TeQtShowMedia :: getCommandToQtProcess(string keycom, string& cmd)
+{
+    string  s = keycom;
+    string  S = TeConvertToUpperCase(keycom);
+    int		len;
+    size_t  pos;
+
+    cmd.clear();
+
+// replace %SystemRoot%
+	if((pos=S.find("%SYSTEMROOT%")) != string::npos)
+	{
+		len = strlen("%SystemRoot%");
+		string systemRoot = getSystemKeyValue(HKEY_LOCAL_MACHINE,
+			"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", "SystemRoot");
+		s.replace(pos, len, systemRoot);
+		S.replace(pos, len, systemRoot);
+	}
+
+// replace %ProgramFiles%
+	if((pos=S.find("%PROGRAMFILES%")) != string::npos)
+	{
+		len = strlen("%ProgramFiles%");
+		string programFiles = getSystemKeyValue(HKEY_LOCAL_MACHINE,
+			"SOFTWARE\\Microsoft\\Windows\\CurrentVersion", "ProgramFilesDir");
+		s.replace(pos, len, programFiles);
+		S.replace(pos, len, programFiles);
+	}
+
+// replace %CommonProgramFiles%
+	if((pos=S.find("%COMMOMFILES%")) != string::npos)
+	{
+		len = strlen("%CommonFiles%");
+		string commonFiles = getSystemKeyValue(HKEY_LOCAL_MACHINE,
+			"SOFTWARE\\Microsoft\\Windows\\CurrentVersion", "CommonFilesDir");
+		s.replace(pos, len, commonFiles);
+		S.replace(pos, len, commonFiles);
+	}
+
+// rundll32.exe
+	if((pos=S.find("RUNDLL32")) == 0) // se for no inicio
+	{
+		string dllDirectory = getSystemKeyValue(HKEY_LOCAL_MACHINE,
+			"System\\ControlSet001\\Control\\Session Manager\\KnownDLLs", "DllDirectory");
+		string  DIR = TeConvertToUpperCase(dllDirectory);
+		if((pos=DIR.find("%SYSTEMROOT%")) != string::npos)
+		{
+			len = strlen("%SystemRoot%");
+			string systemRoot = getSystemKeyValue(HKEY_LOCAL_MACHINE,
+			"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", "SystemRoot");
+			dllDirectory.replace(pos, len, systemRoot);
+		}
+		cmd = dllDirectory + "\\rundll32.exe";
+		len = strlen("RUNDLL32.EXE");
+		s.replace(0, len, cmd);
+	}
+	cmd = s;
+}
+
+string TeQtShowMedia :: getString(TCHAR* u, DWORD size)
+{
+	int	i;
+	char buf[512];
+
+	for(i = 0; i < (int)size; ++i)
+		buf[i] = u[i];
+	buf[i] = '\0';
+
+	string ret = buf;
+	return ret;
+}
+
+void TeQtShowMedia :: charToUnicode(const char* c, TCHAR* u)
+{
+	int i;
+	int len = strlen(c);
+	for(i=0; i < len; ++i)
+		u[i] = c[i];
+	u[i] = '\0';
+}
+
+string TeQtShowMedia :: QueryKey(HKEY hKey) 
+{ 
+	string ret;
+
+    TCHAR    achKey[512];   // buffer for subkey name
+    DWORD    cbName;                   // size of name string 
+    TCHAR    achClass[512] = TEXT("");  // buffer for class name 
+    DWORD    cchClassName = 512;  // size of class string 
+    DWORD    cSubKeys=0;               // number of subkeys 
+    DWORD    cbMaxSubKey;              // longest subkey size 
+    DWORD    cchMaxClass;              // longest class string 
+    DWORD    cValues;              // number of values for key 
+    DWORD    cchMaxValue;          // longest value name 
+    DWORD    cbMaxValueData;       // longest value data 
+    DWORD    cbSecurityDescriptor; // size of security descriptor 
+    FILETIME ftLastWriteTime;      // last write time 
+ 
+    DWORD i, retCode; 
+ 
+    TCHAR  achValue[512]; 
+    DWORD cchValue = 512; 
+ 
+    // Get the class name and the value count. 
+    retCode = RegQueryInfoKey(
+        hKey,                    // key handle 
+        achClass,                // buffer for class name 
+        &cchClassName,           // size of class string 
+        NULL,                    // reserved 
+        &cSubKeys,               // number of subkeys 
+        &cbMaxSubKey,            // longest subkey size 
+        &cchMaxClass,            // longest class string 
+        &cValues,                // number of values for this key 
+        &cchMaxValue,            // longest value name 
+        &cbMaxValueData,         // longest value data 
+        &cbSecurityDescriptor,   // security descriptor 
+        &ftLastWriteTime);       // last write time 
+ 
+    // Enumerate the subkeys, until RegEnumKeyEx fails.
+    
+    if (cSubKeys)
+    {
+		for (i=0; i<cSubKeys; i++) 
+		{ 
+			cbName = 512;
+			retCode = RegEnumKeyEx(hKey, i, achKey, &cbName, NULL, NULL, NULL, &ftLastWriteTime); 
+			if (retCode != ERROR_SUCCESS) 
+				return ret;
+		}
+    } 
+ 
+    // Enumerate the key values. 
+    if (cValues) 
+    {
+        cchValue = 512; 
+        achValue[0] = '\0'; 
+        retCode = RegEnumValue(hKey, cValues-1, achValue, &cchValue, NULL, NULL, NULL, NULL);
+
+        if (retCode == ERROR_SUCCESS ) 
+			ret = getString(achValue, cchValue);
+    }
+	return ret; 
+}
+
+string TeQtShowMedia :: getKeyFileFromProgId(string& fileType)
+{
+	string ret;
+	DWORD retCode;
+	TCHAR tkey[512];
+	string key = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts\\" + fileType + "\\OpenWithProgids";
+	charToUnicode(key.c_str(), tkey);
+
+	HKEY hTestKey;
+
+	retCode = RegOpenKeyEx(HKEY_CURRENT_USER, tkey, 0, KEY_READ, &hTestKey);
+	if(retCode == ERROR_SUCCESS)
+		ret = QueryKey(hTestKey);
+	RegCloseKey(hTestKey);
+	return ret;
+}
+
+string TeQtShowMedia :: getSystemKeyValue(HKEY hkey, string key, string value)
+{
+	HKEY    hk;
+	DWORD	DataSize = 1024;
+    DWORD   Type = REG_SZ;
+    char    buf[1024];
+    string  keycmd;
+
+    if (RegOpenKeyExA(hkey, key.c_str(), 0, KEY_READ, &hk) == ERROR_SUCCESS)
+	{
+		memset (buf, 0, 1024);
+		if (RegQueryValueExA(hk, value.c_str(), NULL, &Type, (LPBYTE)buf, &DataSize) == ERROR_SUCCESS)
+
+			keycmd = buf;
+	}
+	if(hk)
+		RegCloseKey (hk);
+	return keycmd;
+}
+
+bool TeQtShowMedia :: isVistaOperatingSystem()
+{
+   OSVERSIONINFO osvi;
+
+   ZeroMemory(&osvi, sizeof(OSVERSIONINFO));
+   osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+
+   GetVersionEx(&osvi);
+   if(osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 0)
+	   return true;
+
+	return false;
+}
+
+#endif
+
+void TeQtShowMedia :: slotShowFile(string file)
+{
+    size_t			pos;
+    string			cmd;
+
+	string tempName = file;
+
+	string type;
+	pos = file.rfind(".");
+	if (pos != string::npos)
+	{
+		type = file;
+		type = type.substr(pos);
+		type = TeConvertToUpperCase(type);
+	}
+
+#ifdef WIN32
+
+	if(type != ".URL")
+	{
+		pos = tempName.find("/");
+		while(pos != string::npos)
+		{
+			tempName.replace(pos, 1, "\\");
+			pos = tempName.find("/");
+		}
+	}
+	else
+	{
+		tempName = tempName.substr(0, tempName.size()-4);
+		type = ".HTM";
+	}
+
+	if(isVistaOperatingSystem() == false)
+	{
+		//converte ASCII to UNICODE
+		wchar_t fName[256]; // file name
+		wchar_t dName[256]; // dir name
+		size_t tt = tempName.rfind("\\");
+		if(tt == string::npos)
+			tt = tempName.rfind("/");
+		if(tt == string::npos)
+			tt = 0;
+		int i;
+		for(i=0; i<(int)tt; ++i)
+			dName[i] = tempName.c_str()[i];
+		dName[i] = '\0';
+		for(i=(int)tt+1; i<(int)tempName.length(); ++i)
+			fName[i-((int)tt+1)] = tempName.c_str()[i];
+		fName[i-((int)tt+1)] = '\0';
+
+		//HINSTANCE hhhh = ShellExecute(NULL, L"open", fName , L"/Play", dName, SW_SHOWNORMAL);
+		SHELLEXECUTEINFO shExecInfo;
+		shExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
+		shExecInfo.fMask = NULL;
+		shExecInfo.hwnd = NULL;
+		shExecInfo.lpVerb = L"open";
+		shExecInfo.lpFile = fName;
+		shExecInfo.lpParameters = L"/Open";
+		shExecInfo.lpDirectory = dName;
+		shExecInfo.nShow = SW_SHOWNORMAL;
+		shExecInfo.hInstApp = NULL;
+
+		ShellExecuteEx(&shExecInfo);
+	}
+	else // windows VISTA
+	{
+		QProcess proc( this );
+		string cmdName;
+		if (TeConvertToUpperCase (type) == ".EXE")
+		{
+			cmdName = tempName;
+			proc.addArgument(cmdName.c_str());
+			proc.start();
+			return;
+		}
+		// find user defined current application
+		string fileType = type;
+		string key = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\FileExts\\";
+
+		key += fileType + "\\UserChoice"; // para vista dever ser essa opcao (testar)
+		string keyFile = getSystemKeyValue(HKEY_CURRENT_USER, key, "Progid"); // para vista dever ser essa opcao (testar)
+		if(keyFile.empty()) // para vista dever ser essa opcao (testar)
+			keyFile = getKeyFileFromProgId(fileType); // para vista dever ser essa opcao (testar)
+
+		keyFile += "\\shell\\open\\command";		
+		string keycmd = getSystemKeyValue(HKEY_CLASSES_ROOT, keyFile, "");
+		if(keycmd.size() <= 1)
+        {
+ 			QString msg = tr("Sorry! Problem to display midia.\nPlease verify if exist default program associated with this type of midia.");
+            QMessageBox::warning(this, tr("Warning"), msg);
+             return;
+		}
+
+		getCommandToQtProcess(keycmd, cmd);
+		cmdName = cmd;
+		size_t ft;
+		ft = cmdName.find("%");
+		if(ft != string::npos)
+			cmdName.replace(ft, 2, tempName);
+		else
+			cmdName += " " + tempName;
+
+		QString qCmd(cmdName.c_str());
+		qCmd = qCmd.simplifyWhiteSpace();
+		proc.addArgument(qCmd);
+		proc.start();
+
+		//proc.clearArguments();
+		//proc.addArgument( "\"C:\\Program Files\\Adobe\\Photoshop Album Starter Edition\\3.2\\Apps\\ComponentLauncher.exe\" module=jpegviewer bg params \"filepath=c:\\TERRAVIEW_TEMP\\winter.jpg\"" );
+		////proc.addArgument( "\"C:\\Program Files\\Adobe\\Photoshop Album Starter Edition\\3.2\\Apps\\ComponentLauncher.exe\" module=jpegviewer bg params filepath=c:\\TERRAVIEW_TEMP\\winter.jpg" );
+		//proc.start();
+
+	}
+
+#else
+    string command;
+    string name = file;
+    //Mount the vector of directory paths that are
+    //stored in the PATH environment variable
+    string path =  getenv("PATH");
+    vector<string> dirVector;
+    string dirPath;
+    size_t idx = 0;
+    size_t len = path.find(':', idx);
+    while (len != string::npos)
+    {
+        dirPath = path.substr(idx, len-idx);
+        dirVector.push_back(dirPath);
+        idx = len+1;
+        len = path.find(':', idx);
+    }
+
+
+    // get the last directory path
+    idx = path.rfind(':', path.size());
+    dirPath = path.substr(idx+1, path.size());
+    dirVector.push_back(dirPath);
+       
+	string fs; 
+    if(type != ".URL")
+	{
+        bool exists = false;
+        for (unsigned int i = 0; i < dirVector.size(); ++i)
+        {
+			fs = dirVector[i] + "/konqueror";
+            QFile file(fs.c_str());
+            if (file.exists() == true)
+            {
+                exists = true;
+                break;
+            }
+        }
+        if (exists == true)
+            command = "konqueror " + name + " &";
+        else
+        {
+			QString msg = tr("The program konqueror used to display your media is not") + "\n";
+			msg += tr("present in your PATH environment variable or KDE is not installed!");
+            QMessageBox::warning(this, tr("Warning"), msg);
+             return;
+        }      
+    }
+    else
+    {
+		tempName = tempName.substr(0, tempName.size()-4);
+		name = tempName;
+
+        unsigned int i;
+        for (i = 0; i < dirVector.size(); ++i)
+        {
+			QString qfs = dirVector[i].c_str();
+			qfs += "/netscape";
+            QFile file(qfs);
+            if (file.exists() == true)
+            {
+                command = "netscape -remote 'openURL(" + name + ")' &";              
+                break;
+            }
+        }
+
+        if (command.empty() == true)
+        {
+            for (i = 0; i < dirVector.size(); ++i)
+            {
+				QString qfs = dirVector[i].c_str();
+				qfs += "/mozilla";
+                QFile file(qfs);
+                if (file.exists() == true)
+                {
+                    command = "mozilla -remote 'openURL(" + name + ")' &";
+                    break;
+                }
+            }
+        }
+         
+        if (command.empty() == true)
+        {
+            for (i = 0; i < dirVector.size(); ++i)
+            {
+				QString qfs = dirVector[i].c_str();
+				qfs += "/konqueror";
+				QFile file(qfs);
+                if (file.exists() == true)
+                {
+                    command = "konqueror " + name + " &";
+                    break;
+                }
+           }
+        }
+        
+        if (command.empty() == true)
+        {
+			QString msg = tr("The program konqueror used to display your media is not") + "\n";
+			msg += tr("present in your PATH environment variable or KDE is not installed!");
+            QMessageBox::warning(this, tr("Warning"), msg);
+             return;
+        }
+    }
+    
+    system(command.c_str());
+#endif
+}
diff --git a/src/terralib/drivers/qt/TeQtShowMedia.h b/src/terralib/drivers/qt/TeQtShowMedia.h
new file mode 100755
index 0000000..649234c
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtShowMedia.h
@@ -0,0 +1,83 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#ifndef  __TERRALIB_INTERNAL_QTSHOWMEDIA_H
+#define  __TERRALIB_INTERNAL_QTSHOWMEDIA_H
+
+#ifdef WIN32
+#include <windows.h>
+#endif
+#include <TeDatabase.h>
+#include <qtable.h>
+#include <urlWindow.h> 
+#include <mediaDescription.h> 
+#include <qpopupmenu.h>
+#include <TeDatabaseUtils.h>
+#include <TeQtGrid.h>
+#include <string>
+using namespace std;
+
+class TeQtShowMedia : public QTable
+{
+	Q_OBJECT
+	QPopupMenu*			popup_;
+	URLWindow*			urlWindow_;
+	MediaDescription*	descriptionWindow_;
+
+public:
+	int				row_;
+	string			id_;
+	string			table_;
+	TeDatabase*		db_;
+	TeLayer*		layer_;
+	int				nattrs_;
+	bool			cmdLocal_;
+	TeQtShowMedia(QWidget* parent = 0, const char* name = 0);
+
+	~TeQtShowMedia();
+	void moveDown();
+	void init(string objId, TeAppTheme* theme, TeQtGrid* grid);
+
+protected:
+	bool eventFilter(QObject*, QEvent*);
+#ifdef WIN32
+	void getCommand(string keycom, string& cmd, vector<string>& varg);
+	void getCommandToQtProcess(string keycom, string& cmd);
+	string getSystemKeyValue(HKEY hkey, string key, string value);
+	string TeQtShowMedia :: getString(TCHAR* u, DWORD size);
+	void charToUnicode(const char* c, TCHAR* u);
+	string QueryKey(HKEY hKey); 
+	string getKeyFileFromProgId(string& fileType);
+	bool isVistaOperatingSystem();
+#endif
+
+public slots:
+	void slotpressed(int, int, int, const QPoint&);
+	void slotDoubleClicked(int, int, int, const QPoint&);
+	void slotShow();
+	void slotShowFile(string file);
+	void slotInsert(QString& dir);
+	void slotInsertURL();
+	void slotRemove();
+	void slotSetDefault();
+	void slotDescription();
+};
+#endif
diff --git a/src/terralib/drivers/qt/TeQtTable.cpp b/src/terralib/drivers/qt/TeQtTable.cpp
new file mode 100755
index 0000000..9ab1954
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtTable.cpp
@@ -0,0 +1,314 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+************************************************************************************/
+#include "TeQtTable.h"
+#include <qmessagebox.h>
+#include <qapplication.h>
+#include <TeDatabase.h>
+
+TeQtTable::TeQtTable(QWidget* parent, QString name)
+	: QTable(parent, name)
+{
+	gridX_ = -1;
+	gridY_ = -1;
+	iLine_ = -1;
+	fLine_ = -1;
+	iCol_ = -1;
+	fCol_ = -1;
+	gridWidth_  = -1;
+	gridHeight_ = -1;
+	portal_ = 0;
+	db_ = 0;
+	doRepaint_ = true;
+
+	setNumCols(0);
+	setNumRows(0);
+	setSelectionMode(QTable::NoSelection);
+}
+
+TeQtTable::~TeQtTable()
+{
+	if (portal_)
+	{
+		delete portal_;
+		portal_ = 0;
+	}
+}
+
+
+void TeQtTable::openTable (TeDatabase* db, string& table)
+{
+	int i, numRows, nCols;
+
+	doRepaint_ = false; // don�t repaint
+
+	if (table.empty() || db == 0)
+		return;
+
+	db_ = db;
+
+	if (portal_)
+		delete portal_;
+	portal_= db_->getPortal();
+
+	string s = "SELECT COUNT(*) FROM " + table;
+	if (portal_->query(s) && portal_->fetchRow())
+		numRows = atoi(portal_->getData(0));
+
+	s = "SELECT * FROM " + table;
+	portal_->freeResult();
+	if (!portal_->query(s))
+	{
+		delete portal_;
+		portal_ = 0;
+		return;
+	}
+
+	TeAttributeList& attrList = portal_->getAttributeList();
+	
+	//get the column names
+	nCols = attrList.size();
+	setNumRows(numRows);
+	setNumCols(nCols);
+
+	for (i = 0; i < nCols; ++i)
+		horizontalHeader()->setLabel(i, attrList[i].rep_.name_.c_str());
+
+	// Set the minimum width of the vertical header of the grid
+	char buf[10];
+	sprintf(buf, "%d", numRows);
+	int minw = strlen(buf) + 1;
+	if (minw < 3)
+		minw = 3;
+	verticalHeader()->setMinimumWidth(minw*9); // supposing char width of 9 pixels
+	setLeftMargin(minw*9);
+
+
+	doRepaint_ = true; // do repaint
+
+	int visibleCols = 0;
+	int scVal = horizontalScrollBar()->value();
+	for(i=0; i<numCols(); i++)
+	{
+		if(visibleWidth() < columnPos(i) - scVal)
+			break;
+		visibleCols++;
+	}
+
+	repaint();
+}
+
+
+void TeQtTable::openSql(TeDatabase* db, string& sql)
+{
+	int i, numRows, nCols;
+
+	doRepaint_ = false; // don�t repaint
+
+	if (sql.empty() || db == 0)
+		return;
+
+	db_ = db;
+
+	if (portal_)
+		delete portal_;
+	portal_= db_->getPortal();
+
+	string s = sql;
+
+	if (!portal_->query(s))
+	{
+		delete portal_;
+		portal_ = 0;
+		return;
+	}
+
+	TeAttributeList& attrList = portal_->getAttributeList();
+	numRows = portal_->numRows();
+
+	if(numRows <= 0)
+	{
+		numRows = 0;
+		while (portal_->fetchRow())
+			++numRows;
+	}
+	
+	//get the column names
+	nCols = attrList.size();
+	setNumRows(numRows);
+	setNumCols(nCols);
+
+	for (i = 0; i < nCols; ++i)
+		horizontalHeader()->setLabel(i, attrList[i].rep_.name_.c_str());
+
+	// Set the minimum width of the vertical header of the grid
+	char buf[10];
+	sprintf(buf, "%d", numRows);
+	int minw = strlen(buf) + 1;
+	if (minw < 3)
+		minw = 3;
+	verticalHeader()->setMinimumWidth(minw*9); // supposing char width of 9 pixels
+	setLeftMargin(minw*9);
+
+
+	doRepaint_ = true; // do repaint
+
+	int visibleCols = 0;
+	int scVal = horizontalScrollBar()->value();
+	for(i=0; i<numCols(); i++)
+	{
+		if(visibleWidth() < columnPos(i) - scVal)
+			break;
+		visibleCols++;
+	}
+
+	repaint();
+}
+
+void TeQtTable::freePortal()
+{
+	gridX_ = -1;
+	gridY_ = -1;
+	iLine_ = -1;
+	fLine_ = -1;
+	iCol_ = -1;
+	fCol_ = -1;
+	gridWidth_  = -1;
+	gridHeight_ = -1;
+	portal_ = 0;
+	db_ = 0;
+	doRepaint_ = true;
+
+	if (portal_)
+	{
+		delete portal_;
+		portal_ = 0;
+	}
+
+	setNumRows(0);
+	setNumCols(0);
+}
+
+void TeQtTable::deletePortal()
+{
+	if (portal_)
+		delete portal_;
+	portal_ = 0;
+}
+
+void TeQtTable::drawContents (QPainter *qp, int clipx, int clipy, int clipw, int cliph)
+{
+	if(doRepaint_ == false)
+		return;
+
+	update();
+	QTable :: drawContents(qp, clipx, clipy, clipw, cliph);
+}
+
+void TeQtTable::update ()
+{
+	if(portal_ == 0)
+		return;
+
+	int	i, j;
+
+	int gridY = contentsY();
+	int gridX = contentsX();
+
+	int gridHeight = visibleHeight(); 
+	int gridWidth = visibleWidth(); 
+
+	if (gridX_ == gridX && gridY_ == gridY &&
+		gridHeight_ == gridHeight && 
+		gridWidth_ == gridWidth)
+		return;
+
+	gridX_ = gridX;
+	gridY_ = gridY;
+	gridHeight_ = gridHeight;
+	gridWidth_ = gridWidth;
+		
+// clear cells
+	doRepaint_ = false; // do not repaint
+	if (iLine_ >= 0 && iCol_ >= 0)
+	{
+		for (i = iLine_; i <= fLine_; ++i)
+		{
+			for (j = iCol_; j <= fCol_; ++j)
+			{
+				if(item(i, j))
+					clearCell(i, j);
+			}
+		}
+	}
+
+	iLine_ = rowAt(gridY_);
+	iCol_  = columnAt(gridX_);
+	int visibleLines = rowAt(gridHeight_);
+	if (visibleLines == -1)
+		visibleLines = numRows();
+
+	int visibleCols = 0;
+	int scVal = horizontalScrollBar()->value();
+	for(i=iCol_; i<numCols(); i++)
+	{
+		if(gridWidth_ < columnPos(i) - scVal)
+			break;
+		visibleCols++;
+	}
+
+	if (iLine_ < 0 || iCol_ < 0)
+	{
+		gridX_ = gridY_ = iLine_ = fLine_ = iCol_ = fCol_ = -1;
+		doRepaint_ = true;
+		return;
+	}
+
+	fLine_ = iLine_ + visibleLines;
+	if (fLine_ > numRows() - 1)
+		fLine_ = numRows() - 1;
+	fCol_ = iCol_ + visibleCols - 1;
+
+	for (i = iLine_; i <= fLine_ ; ++i)
+	{
+		if (!portal_->fetchRow(i))
+			return;
+
+		string s;
+		for (j = iCol_; j <= fCol_; ++j)
+		{
+			s = portal_->getData(j);
+			setText(i, j, s.c_str());
+
+			if(i == fLine_ && j == fCol_- 1)
+			{
+				doRepaint_ = true; // do repaint
+				updateCell(i, j);
+			}
+		}
+	}
+
+	doRepaint_ = true; // do repaint
+}
+
+
+
+
+
diff --git a/src/terralib/drivers/qt/TeQtTable.h b/src/terralib/drivers/qt/TeQtTable.h
new file mode 100755
index 0000000..f690bf1
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtTable.h
@@ -0,0 +1,69 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#ifndef TEQTTABLE_H
+#define TEQTTABLE_H
+
+#include <qtable.h>
+#include <string>
+using namespace std;
+
+class TeDatabase;
+class TeDatabasePortal;
+
+class TeQtTable : public QTable
+{
+protected:
+	TeDatabase			*db_;
+	TeDatabasePortal	*portal_;
+	int					gridX_, gridY_;
+	int					iLine_, fLine_;
+	int					iCol_, fCol_;
+	int					gridWidth_, gridHeight_;
+	bool				doRepaint_;
+
+	virtual void drawContents (QPainter *qp, int clipx, int clipy, int clipw, int cliph);
+
+	void update();
+
+public:
+
+    TeQtTable(QWidget *parent, QString name);
+
+	virtual ~TeQtTable();
+
+	virtual void endEdit(int row, int col, bool accept, bool replace)
+	{
+		QTable::endEdit(row, col, accept, replace);
+	}
+
+	void openTable(TeDatabase* db, string& table);
+
+	void openSql(TeDatabase* db, string& sql);
+
+	void freePortal();
+
+	void deletePortal();
+
+	TeDatabasePortal* getPortal() {return portal_;}
+};
+
+#endif
diff --git a/src/terralib/drivers/qt/TeQtTerraStat.cpp b/src/terralib/drivers/qt/TeQtTerraStat.cpp
new file mode 100755
index 0000000..e02fc77
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtTerraStat.cpp
@@ -0,0 +1,1276 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+
+#include "TeSTElementSet.h"
+#include "TeKernelParams.h"
+#include "TeQtTerraStat.h"
+#include "TeKernelFunctions.h"
+#include "TeStatDataStructures.h"
+#include "TeQtDatabasesListView.h"
+///#include "TeImportRaster.h"
+#include "TeDecoderDatabase.h"
+#include "TeQtViewsListView.h"
+#include "TeQtGrid.h"
+#include "TeSTEFunctionsDB.h"
+#include "TeWaitCursor.h"
+#include "TeColorUtils.h"
+#include "TeDatabaseUtils.h"
+#include "TeKernelParams.h"
+#include "TeQtLayerItem.h"
+#include "TeQtViewItem.h"
+#include "TeQtThemeItem.h"
+#include <qobject.h>
+#include <qapplication.h>
+
+
+string getKernelFunction (TeKernelFunctionType t)
+{
+	string result;
+
+	switch (t)
+	{
+		case TeKQuartic:
+      result = QObject::tr("Quartic").latin1();
+			break;
+		case TeKNormal:
+			result = QObject::tr("Normal").latin1();
+			break;
+		case TeKUniform:
+			result = QObject::tr("Uniform").latin1();
+			break;
+		case TeKTriangular:
+			result = QObject::tr("Triangular").latin1();
+			break;
+		case TeKNegExponential:
+			result = QObject::tr("NegExponential").latin1();
+			break;
+	}
+	return result;
+}
+
+string getKernelComputeType (TeKernelComputeType t)
+{
+	string result;
+
+	switch (t)
+	{
+		case TeKDensity:
+			result = QObject::tr("Density").latin1();
+			break;
+		case TeKProbability:
+			result = QObject::tr("Probability").latin1();
+			break;
+		case TeKMovingAverage:
+			result = QObject::tr("Spatial Moving Average").latin1();
+			break;
+	}
+	return result;
+}
+
+string getCombinationType (TeKernelCombinationType /* t */)
+{
+	string result;
+	result = "DESCONHECIDO";
+	return result;
+}
+
+
+/**
+ * Retorna legenda para kernel
+ **/
+bool getKernelLegend(TeKernelParams& par, vector<string>& result)
+{
+	string legend = QObject::tr("Kernel parameters").latin1();
+	result.push_back(legend); 
+	string numb = "";
+	
+	legend = QObject::tr("Event theme").ascii()+ numb +" : "+ par.eventThemeName1_ ;
+	result.push_back(legend);
+	
+	if(!par.intensityAttrName1_.empty())
+	{
+		legend = QObject::tr("Attribute name").ascii()+ numb +" : "+ par.intensityAttrTable1_+"."+ par.intensityAttrName1_;
+		result.push_back(legend);
+	}
+
+  if (par.radiusValue1_ > 0) {
+	  legend = QObject::tr("Radius value").ascii()+ numb +" : "+ Te2String(par.radiusValue1_);
+  }
+  else {
+    legend = QObject::tr("Adaptive radius").ascii();
+  }
+  result.push_back(legend);
+
+  legend = QObject::tr("Compute: ").ascii()+getKernelComputeType(par.computeType1_);
+  result.push_back(legend);
+
+  legend = QObject::tr("Function: ").ascii()+getKernelFunction(par.kernelFunction1_);
+  result.push_back(legend);
+
+  return true;
+}
+
+
+/**
+ * Grava uma coluna na tabela de atributos associada a um STOSet.
+ * Nome da coluna eh o mesmo nome da propriedade
+ **/
+bool insertPropertyColumn(TeSTElementSet& stoSet,
+                          const string& tableName,
+                          const string&  columnName) 
+{
+	
+	
+ 	vector<int> index;
+	int ind = stoSet.getAttributeIndex(columnName);
+	if(ind<0)
+	{
+		ind = stoSet.getAttributeIndex(tableName+"."+columnName);
+		if(ind>-1)
+			index.push_back (ind);
+	}
+	else
+		index.push_back (ind);
+  
+	if(!index.empty())
+	{
+		if (!TeUpdateDBFromSet (&stoSet, tableName, &index)) 
+			return false;
+	}
+	else
+	{
+		if (!TeUpdateDBFromSet (&stoSet, tableName)) 
+			return false;
+	}
+	return true;
+}
+
+/**
+ * Grava uma coluna na tabela de atributos associada a um STOSet.
+ * Nome da coluna eh o mesmo nome da propriedade
+ **/
+bool insertPropertyColumn(TeSTStatInstanceSet& stSet,
+                          int idxDoubleProp,
+                          TeTheme* theme,
+                          const string& tableName,
+                          const string& columnName) {
+
+  TeProperty prop;
+
+  prop.attr_.rep_.name_ = columnName;
+  prop.attr_.rep_.type_ = TeREAL;
+  double value;
+  TePropertyVector pVect;
+  pVect.push_back(prop);
+
+  //Constroi um de outro
+  TeSTElementSet rs(theme);
+  rs.addProperty(prop.attr_);
+
+  TeSTStatInstanceSet::iterator ito = stSet.begin();
+  while (ito != stSet.end()) {
+
+    //Cria uma nova propriedade no objeto
+    (*ito).getDoubleProperty(idxDoubleProp, value);
+    pVect[0].value_ = Te2String(value, STAT_PRECISION);
+    (*ito).properties(pVect);
+    rs.insertSTInstance(*ito);
+    ++ito;
+  }
+
+  return insertPropertyColumn(rs, tableName, columnName) ;
+}
+
+
+/***
+ * Cria um STOSet a partir de um tema e um conjunto de atributos,
+ * colocando todas as tabelas do TEMA
+ ***/
+bool createSTOSetFromTheme(TeTheme* theme, 
+                              vector<string>& attributes,
+                              TeSTElementSet* rs) 
+{
+	rs->setTheme(theme);
+	return TeSTOSetBuildDB(rs, true, false, attributes);
+}
+
+
+/***
+ * Cria um STOSet a partir de um tema e um conjunto de atributos,
+ * colocando todas as tabelas do TEMA
+ ***/
+bool createSTOStatSetFromTheme(TeTheme* theme, 
+                               vector<string>& attributes,
+                               int additionalDouble,
+                               TeSTStatInstanceSet* rs) {
+
+  TeSTElementSet stoSet(theme);
+   if (!TeSTOSetBuildDB(&stoSet, true, false, attributes))
+     return false;
+   rs->Copy(stoSet, attributes.size(), additionalDouble);
+   return true;
+
+}
+
+TeKernelMethod::~TeKernelMethod()
+{
+	if (evSet1_)
+		delete (TePointTInstanceSet *)evSet1_;
+	
+	if (evSet2_)
+		delete (TePointTInstanceSet *)evSet2_;
+	
+	if(regSet_ && (isGridEv_ || isGridReg_))
+	{
+		delete (TeKernelGridSupport*)regSet_ ;
+	}
+	else if (regSet_)
+	{
+		delete (TeSTStatInstanceSet*)regSet_;
+	}
+	regSet_=0;
+	evSet2_=0;
+	evSet1_=0;
+}
+
+void TeKernelMethod::error(TeKernelErrorType type, string message, QWidget* parent) {
+
+  QString title;
+  switch (type) {
+  case Uerror:
+	  title = tr("Unexpected Error");
+    break;
+  case Error:
+		title = tr("Error");
+    break;
+  case Warning:
+		title = tr("Warning");
+    break;
+  }
+
+  if (parent) {
+	  QMessageBox::information(parent, title, tr(message.c_str()));
+  }
+  else {
+    QMessageBox::information(0, (title), tr(message.c_str())); 
+  }
+
+}
+
+/**
+ * Defines name, theme pointer and id for a given theme 
+ * id = 0 -- support theme
+ * id = 1,2 -- first and second event theme
+ **/
+bool TeKernelMethod::setTheme(string name, int id, TeView* view) {
+  if (id == 0) {
+    params_.supportThemeName_ = name;
+    regTheme_ = view->get(params_.supportThemeName_);
+    if (evTheme1_ == NULL) {
+      return false;
+    }
+	params_.supportThemeId_ = regTheme_->id(); 
+  }
+  else if (id == 1) {
+    params_.eventThemeName1_ = name;
+
+    evTheme1_ = view->get(params_.eventThemeName1_);
+    if (evTheme1_ == NULL) {
+      return false;
+    }
+    params_.eventThemeId1_ = evTheme1_->id();
+    
+  }
+  else if (id == 2) {
+    params_.eventThemeName2_ = name;
+
+    evTheme2_ = view->get(params_.eventThemeName2_);
+    if (evTheme2_ == NULL) {
+      return false;
+    }
+    params_.eventThemeId2_ = evTheme2_->id();
+    
+  }
+  return true;
+}
+
+
+enum TeGridType {GridFromSupport, GridFromEvent, GridFromBoth};
+
+
+/**
+ * Generates support set from parameters
+ *   If grid, generate box
+ *   If theme, generate column
+ **/
+bool TeKernelMethod::generateSupportSet() {
+ 
+  
+  bool isGrid = isGridReg_ || isGridEv_;
+  bool isRatio = (params_.eventThemeId2_ > 0);
+
+  justOnePolygon_ = false;
+
+  //support set is from type TeKernelGridSupport
+  if (isGrid) 
+  {
+
+    //Computes grid boundary and defines if just one set.
+    TeGridType t;
+    TeBox      gridBound;
+
+    if (isGridEv_)
+    {
+      if (isRatio)
+        t = GridFromBoth;
+      else
+        t = GridFromEvent;
+    }
+    else
+      t = GridFromSupport;
+ 
+    if (db_ == NULL) {
+      error(Uerror, tr("There is no database. Please, contact support!").latin1());
+      return false;
+    }
+
+    TeBox bound1;
+    TeBox bound2;
+    
+    switch(t) {
+    case GridFromSupport:
+      if (regTheme_ == NULL) {
+		error(Uerror, tr("There is no support theme. Please, contact support!").latin1());
+        return false;
+      }
+	  gridBound = regTheme_->getThemeBox();
+      break;
+    case GridFromEvent:
+      if (evTheme1_ == NULL) {
+		error(Uerror, tr("There is no event theme. Please, contact support!").latin1());
+        return false;
+      }
+	  gridBound = evTheme1_->getThemeBox();
+      break;
+    case GridFromBoth:
+      if ((evTheme1_ == NULL) || (evTheme2_ == NULL)) {
+		error(Uerror, tr("There is no event theme. Please, contact support!").latin1());
+        return false;
+      }
+
+      bound1 = evTheme1_->getThemeBox();
+      bound2 = evTheme2_->getThemeBox();
+    
+      //Box is the rectangle that envolves both boxes
+      gridBound.x1_ = (bound1.x1_ < bound2.x1_) ? bound1.x1_ : bound2.x1_;
+      gridBound.y1_ = (bound1.y1_ < bound2.y1_) ? bound1.y1_ : bound2.y1_;
+      gridBound.x2_ = (bound1.x2_ > bound2.x2_) ? bound1.x2_ : bound2.x2_;
+      gridBound.y2_ = (bound1.y2_ < bound2.y2_) ? bound1.y2_ : bound2.y2_;
+
+      break;
+
+    default:
+		error(Uerror, tr("Invalid type. Please, contact support!").latin1());
+      return false;
+      break;
+    }
+    
+    
+    if (!gridBound.isValid()) {
+		error(Uerror, tr("Invalid grid box. Please, contact support!").latin1());
+        return false;
+    }
+
+
+    //Verifies if it has just one polygon
+    if (t == GridFromSupport) {
+
+      TeDatabasePortal* portal = this->db_->getPortal();
+
+      TeLayer* l = regTheme_->layer();
+
+      if (l->hasGeometry(TePOLYGONS))
+      {
+        string count = "SELECT COUNT(*) FROM " + l->tableName(TePOLYGONS);
+        count += ", " + regTheme_->collectionTable() + " WHERE ";
+        count += l->tableName(TePOLYGONS) + ".object_id = ";
+        count += regTheme_->collectionTable() + ".c_object_id";
+        portal->freeResult();
+        if(portal->query(count))
+        {
+          if(portal->fetchRow())
+          {
+            count = portal->getData(0);		
+          }
+          else {
+ 			error(Uerror, tr("There is no polygons. Please, contact support!").latin1());
+          }
+        }
+
+        int nPol = atoi(count.c_str());
+        this->justOnePolygon_ = (nPol == 1);
+		delete portal;
+      }
+    }
+
+    TeProjection* proj = db_->loadProjection(this->evTheme1_->layer()->projection()->id());
+
+    if (proj == NULL) {
+ 			error(Uerror, tr("There is no projection. Please, contact support!").latin1());
+       return false;
+    }
+	if (this->params_.eventThemeId2_ > 0) // if it is kernel ratio
+		regSet_ = new TeKernelGridSupport(gridBound, gridCols_, proj, 2);   
+	else
+		regSet_ = new TeKernelGridSupport(gridBound, gridCols_, proj);   
+  }
+  //Gera grid irregular a partir de poligonos do layer
+  else {
+    
+    //Define regioes a partir de tema -- aplicar restricao
+    if (regTheme_ == NULL) {
+ 		error(Uerror, tr("There is no support theme. Please, contact support!").latin1());
+      return false;
+    }
+
+	//Generates set from theme
+    vector<string> empty;
+    //TeSTStatInstanceSet* rs = new TeSTStatInstanceSet();
+	regSet_ = new TeSTStatInstanceSet();
+    createSTOStatSetFromTheme(regTheme_, empty, 2, (TeSTStatInstanceSet*)regSet_);
+    resName_ = string(this->params_.supportThemeAttr_);
+    //regSet_ = rs;
+  }
+  return true;
+}
+
+
+/**
+ * Generates event set from theme. If there is an attribute, set is initialize with it.
+ * Otherwise, just geometries are loaded. Geometries may be points or polygons
+ **/
+bool TeKernelMethod::generateEventSet(int which) {
+
+  bool     isPoint;
+  TeTheme* theme;
+  TeLayer* layer;
+  string   table;
+  string   column;
+    
+  if (which == 1) {
+    isPoint = this->isPoint1_;
+    theme = this->evTheme1_;
+    if (this->evTheme1_ == NULL) {
+ 		error(Uerror, tr("There is no event set for the kernel. Please, contact support!").latin1());
+      return false;
+    }
+    layer = this->evTheme1_->layer();
+    if (layer == NULL) {
+ 		error(Uerror, tr("There is no layer for the theme. Please, contact support!").latin1());
+      return false;
+    }
+    table = this->params_.intensityAttrTable1_;
+    column = this->params_.intensityAttrName1_;
+  }
+  else if (which == 2) {
+    isPoint = this->isPoint2_;
+    theme = this->evTheme2_;
+    if (this->evTheme2_ == NULL) {
+ 		error(Uerror, tr("There is no event set for the kernel. Please, contact support!").latin1());
+      return false;
+    }
+    layer = this->evTheme2_->layer();
+    if (layer == NULL) {
+ 		error(Uerror, tr("There is no layer for the theme. Please, contact support!").latin1());
+      return false;
+    }
+    table = this->params_.intensityAttrTable2_;
+    column = this->params_.intensityAttrName2_;
+  }
+  else {
+ 		error(Uerror, tr("Invalid event set. Please, contact support!").latin1());
+    return false;
+  }
+  
+  TeWaitCursor wait;
+
+  bool done;
+  vector<string> vecAttr;
+  if (column.compare("")) {
+      vecAttr.push_back(table+"."+column);
+  }
+ if (isPoint) {
+
+    //Generates set from theme
+    TePointTInstanceSet* evs = new TePointTInstanceSet();
+    if (vecAttr.size() == 0) {
+      done =  createSTOStatSetFromTheme(theme, vecAttr, 1, evs);
+      //Deve inicializar com 1 toda a propriedade
+      TePointTInstanceSet::iterator itev = evs->begin();
+      while (itev != evs->end()) {
+        (*itev).setDoubleProperty(0, 1.0);
+        ++itev;
+      }
+    }
+    else {
+      done = createSTOStatSetFromTheme(theme, vecAttr, 0, evs);
+    }
+
+    if (!done)
+      return false;
+    if (which == 1) {
+      evSet1_ = evs;
+    }
+    else {
+      evSet2_ = evs;
+    }
+
+  }
+  else {
+
+      //Generates set from theme
+    TePointTInstanceSet* evs = new TePointTInstanceSet();
+    if (vecAttr.size() == 0) {
+      done =  createSTOStatSetFromTheme(theme, vecAttr, 1, evs);
+      //Deve inicializar com 1 toda a propriedade
+      TePointTInstanceSet::iterator itev = evs->begin();
+      while (itev != evs->end()) {
+        (*itev).setDoubleProperty(0, 1.0);
+        ++itev;
+      }
+  }
+  else {
+      done = createSTOStatSetFromTheme(theme, vecAttr, 0, evs);
+    }
+    if (!done)
+      return false;
+    if (which == 1) {
+      evSet1_ = evs;
+    }
+    else {
+      evSet2_ = evs;
+    }
+  }
+  return true;
+}
+
+
+bool TeKernelMethod::call() 
+{
+  bool isGrid = this->isGridEv_ || this->isGridReg_;
+  bool isRatio = this->params_.eventThemeName2_.compare("");
+
+//  bool justOnePolygon = false;
+
+  double totalArea;
+  if (isGrid)  {
+    totalArea = ((TeKernelGridSupport *)regSet_)->totalArea();
+  }
+  else {
+    //SUBSTITUIR
+	  totalArea = TeGeometryArea(regTheme_->getThemeBox());
+  }
+
+  int  totalRegions;
+  if (isGrid) {
+      totalRegions = ((TeKernelGridSupport *)regSet_)->numObjects();
+  }
+  else {
+      totalRegions = ((TeSTStatInstanceSet *)regSet_)->numObjects();
+  }
+
+  if (TeProgress::instance())
+  {
+		TeProgress::instance()->setTotalSteps(totalRegions);
+  }
+
+  //Kernel de razao
+  if (isRatio) {
+   
+   
+    TeStatKernelRatio kerRatio;
+    kerRatio.numReg_ = totalRegions;
+    kerRatio.kComb_ = params_.combinationType_;
+    kerRatio.ktype_ = params_.computeType1_;
+    kerRatio.kfunc1_ = params_.kernelFunction1_;
+    kerRatio.radius1_ = params_.radiusValue1_;
+    kerRatio.kfunc2_ = params_.kernelFunction2_;
+    kerRatio.radius2_ = params_.radiusValue2_;
+    kerRatio.totalArea_ = totalArea;
+
+
+    //Colocar janela com parametros para o usuario confirmar
+
+    if (isGrid) {
+      //Verifica se o iterador eh para um unico poligono
+      if (justOnePolygon_) {
+        TeDatabasePortal* portal = db_->getPortal();
+
+        string count = "SELECT c_object_id FROM " + regTheme_->layer()->tableName(TePOLYGONS)+",";
+        count += regTheme_->collectionTable() + " WHERE ";
+        count += regTheme_->layer()->tableName(TePOLYGONS) + ".object_id = ";
+        count += regTheme_->collectionTable() + ".c_object_id";
+        portal->freeResult();
+        if(portal->query(count))
+        {
+          if(portal->fetchRow())
+          {
+            count = portal->getData(0);		
+          }
+          else {
+ 			      error(Uerror, tr("There is no polygons. Please, contact support!").latin1());
+            return false;
+          }
+        }
+		    delete portal;
+        TePolygonSet polygon;
+        if (!regTheme_->layer()->loadGeometrySet(count, polygon)) {
+ 		    	error(Uerror, tr("There is no polygon boundary. Please, contact support!").latin1());
+          return false;
+        }
+        boundary_ = polygon.first();
+        if (boundary_.empty()) {
+ 		    	error(Uerror, tr("There is no polygon boundary. Please, contact support!").latin1());
+          return false;
+        }
+        return kerRatio.apply(*((TePointTInstanceSet *)evSet1_),
+            *((TePointTInstanceSet *)evSet2_),
+            (*((TeKernelGridSupport *)regSet_)).begin(boundary_), 
+            (*((TeKernelGridSupport *)regSet_)).end(boundary_));
+      }
+      else {
+        return kerRatio.apply(*((TePointTInstanceSet *)evSet1_),
+            *((TePointTInstanceSet *)evSet2_),
+            (*((TeKernelGridSupport *)regSet_)).begin(), 
+            (*((TeKernelGridSupport *)regSet_)).end());
+      }
+    }
+    else {
+       return kerRatio.apply(*((TePointTInstanceSet *)evSet1_), 
+         *((TePointTInstanceSet *)evSet2_),
+          (*((TeSTStatInstanceSet *)regSet_)).begin(), 
+          (*((TeSTStatInstanceSet *)regSet_)).end());
+    }
+  }  
+  //Kernel normal com um unico conjunto
+  else {
+   
+    TeStatKernel kernel;
+    kernel.radius_ = params_.radiusValue1_;
+    kernel.kfunc_ =  params_.kernelFunction1_;
+    kernel.ktype_ = params_.computeType1_;
+    kernel.totalArea_ = totalArea;
+    kernel.numReg_ = totalRegions;
+
+    //Colocar janela com parametros para o usuario confirmar
+
+    if (isGrid) {
+      //Verifica se o iterador eh para um unico poligono
+      if (justOnePolygon_) {
+        TeDatabasePortal* portal = db_->getPortal();
+
+        string count = "SELECT c_object_id FROM " + regTheme_->layer()->tableName(TePOLYGONS)+",";
+        count += regTheme_->collectionTable() + " WHERE ";
+        count += regTheme_->layer()->tableName(TePOLYGONS) + ".object_id = ";
+        count += regTheme_->collectionTable() + ".c_object_id";
+        portal->freeResult();
+        if(portal->query(count))
+        {
+          if(portal->fetchRow())
+          {
+            count = portal->getData(0);		
+          }
+          else {
+ 			      error(Uerror, tr("There is no polygons. Please, contact support!").latin1());
+            return false;
+          }
+        }
+		    delete portal;
+        TePolygonSet polygon;
+        if (!regTheme_->layer()->loadGeometrySet(count, polygon)) {
+ 		    	error(Uerror, tr("There is no polygon boundary. Please, contact support!").latin1());
+          return false;
+        }
+        boundary_ = polygon.first();
+        if (boundary_.empty()) {
+ 		    	error(Uerror, tr("There is no polygon boundary. Please, contact support!").latin1());
+          return false;
+        }
+        return kernel.apply(*((TePointTInstanceSet *)evSet1_),
+            (*((TeKernelGridSupport *)regSet_)).begin(boundary_), 
+            (*((TeKernelGridSupport *)regSet_)).end(boundary_));
+      }
+      else {
+        return kernel.apply(*((TePointTInstanceSet *)evSet1_),
+            (*((TeKernelGridSupport *)regSet_)).begin(), 
+            (*((TeKernelGridSupport *)regSet_)).end());
+      }
+    }
+    else {
+       return kernel.apply(*((TePointTInstanceSet *)evSet1_), 
+          (*((TeSTStatInstanceSet *)regSet_)).begin(), 
+          (*((TeSTStatInstanceSet *)regSet_)).end());
+    }
+  }  
+  return true;
+}
+
+ 
+
+/**
+ * Apply kernel method based on parameters definition
+ *   Create event(s) set
+ *   Create support set
+ *   Execute suitable kernel method (basic, adaptive, ratio)
+ *   Returns support set region
+ **/
+bool TeKernelMethod::apply(void*& supportSet, QWidget* parent) 
+{
+	precision_ = -1;
+
+	//Verifies if there is an event theme
+	if (this->evTheme1_ == NULL) {
+		error(Uerror, tr("There is no event set for the kernel. Please, contact support!").latin1());
+		return false;
+	}
+
+	//Verifies if this theme has objects without geometries
+	TeGeomRep rep1 = TePOINTS;
+	if(!isPoint1_)
+		rep1 = TePOLYGONS;
+	if(this->evTheme1_->hasObjectsWithoutGeometries(rep1))
+	{
+		string errorMessage = tr("The theme ").latin1();
+		errorMessage += " - "+ this->evTheme1_->name() +" - "; 
+		errorMessage += tr("\n has occurrences/events without location. ").latin1();
+		errorMessage += tr("\n These occurrences should be removed to generate a valid kernel map.").latin1();  
+		errorMessage += tr("\n Would you like to remove them now? ").latin1();
+		
+		int response = QMessageBox::question(this, tr("Question"), QString(errorMessage.c_str()), tr("Yes"), tr("No")); 
+		if(response == 0)
+		{
+			//remove objetcs without geometries
+			if(!this->evTheme1_->removeObjectsWithoutGeometries(rep1))
+			{
+				QMessageBox::information(this, tr("Information"), 
+					tr("Occurrences/events without location could not be removed.\nTry to generate the theme again."));
+				return false;
+			}
+			
+			QMessageBox::information(this, tr("Information"), 
+					tr("Occurrences/events without location were removed from the theme."));
+		}
+		else
+		{
+			return false;
+		}
+	}
+
+	//Verifies if all themes are in the same projection
+	TeProjection* ev1 = this->evTheme1_->getThemeProjection();
+	if (this->regTheme_ != NULL) 
+	{
+		TeProjection* reg = regTheme_->getThemeProjection();
+		if (!(*reg == *ev1)) {
+			error(Warning,tr("All of the themes should be in the same projection!").latin1(),parent);
+			return false;
+		}
+	}
+
+	if (this->evTheme2_ != NULL) 
+	{
+		TeProjection* ev2 = this->evTheme2_->getThemeProjection();
+		if (!(*ev1 == *ev2)) {
+			error(Warning,tr("All of the themes should be in the same projection!").latin1(),parent);
+			return false;
+		}
+
+		//Verifies if this theme has objects without geometries
+		TeGeomRep rep2 = TePOINTS;
+		if(!isPoint2_)
+			rep2 = TePOLYGONS;
+		if(this->evTheme2_->hasObjectsWithoutGeometries(rep2))
+		{
+			string errorMessage = tr("The theme ").latin1();
+			errorMessage += " - "+ this->evTheme1_->name() +" - "; 
+			errorMessage += tr("\n has occurrences/events without location. ").latin1();
+			errorMessage += tr("\n These occurrences should be removed to generate a valid kernel map.").latin1();  
+			errorMessage += tr("\n Would you like to remove them now? ").latin1();
+			
+			int response = QMessageBox::question(this, tr("Question"), QString(errorMessage.c_str()), tr("Yes"), tr("No")); 
+			if(response == 0)
+			{
+				//remove objetcs without geometries
+				if(!this->evTheme2_->removeObjectsWithoutGeometries(rep2))
+				{
+					QMessageBox::information(this, tr("Information"), 
+					tr("Occurrences/events without location could not be removed.\nTry to generate the theme again."));
+					return false;
+				}
+				QMessageBox::information(this, tr("Information"), 
+					tr("Occurrences/events without location were removed from the theme."));
+			}
+		}
+	}
+
+	if (TeProgress::instance())
+	{
+		TeProgress::instance()->setTotalSteps(4);
+		TeProgress::instance()->setMessage(tr("Generating the support set...").latin1());
+		TeProgress::instance()->setProgress(1);
+	}
+	
+	// Generates support set
+	if (!this->generateSupportSet() ) {
+		if (TeProgress::instance())
+			TeProgress::instance()->reset();
+		error(Error, tr("It was not possible to create the support set!").latin1(), parent);
+		return false;
+	}
+	if (TeProgress::instance()) {
+		if (TeProgress::instance()->wasCancelled() ) {
+			TeProgress::instance()->reset();
+			return false;
+		}
+		else 
+		{
+			TeProgress::instance()->setMessage(tr("Generating the event set...").latin1());
+			TeProgress::instance()->setProgress(2);
+		}
+	}
+
+	// Generates first event set
+	if (!this->generateEventSet(1)) {
+		if (TeProgress::instance())
+			TeProgress::instance()->reset();
+		error(Error, tr("It was not possible to create the event set!").latin1(),parent);
+		return false;
+	}
+
+	if (TeProgress::instance()) {
+		if (TeProgress::instance()->wasCancelled()) {
+			TeProgress::instance()->reset();
+			return false;
+		}
+		else
+			TeProgress::instance()->setTotalSteps(4);
+	}
+
+
+	// Generates second event set
+	if (this->evTheme2_ != NULL) {
+		if (TeProgress::instance())
+		{
+			TeProgress::instance()->setTotalSteps(5);
+			TeProgress::instance()->setMessage(tr("Generating second event set...").latin1());
+			TeProgress::instance()->setProgress(3);
+		}
+		if (!this->generateEventSet(2)) {
+			if (TeProgress::instance())
+				TeProgress::instance()->reset();
+			error(Error, tr("It was not possible to create the event set 2!").latin1(),parent);
+			return false;
+		}
+	}
+
+	if (TeProgress::instance())
+	{
+		TeProgress::instance()->setTotalSteps(5);
+		TeProgress::instance()->setMessage(tr("Calculating Kernel Map...").latin1());
+		TeProgress::instance()->setProgress(4);
+	}
+
+	// Calls kernel functions
+	bool okKernel = this->call();
+	if (okKernel) 
+		supportSet = this->regSet_;
+
+  //Deallocate temporary values
+   if (this->evSet1_)
+  {
+      delete (TePointTInstanceSet *)this->evSet1_;
+	  evSet1_=0;
+  }
+
+  if (this->evSet2_)
+  {
+     delete (TePointTInstanceSet *)this->evSet2_;
+	 evSet2_=0;
+  }
+//    delete this->evSet2_;
+
+	return okKernel;
+}
+
+
+
+bool TeKernelMethod::getPrecision(int& prec) {
+
+  //Precisao ja foi calculada
+  if (precision_ >= 0) {
+    prec= precision_;
+    return true;
+  }
+
+  bool isGrid = isGridReg_ || isGridEv_;
+  if (isGrid) {
+    if (justOnePolygon_) {
+      if (this->getPrecision((*((TeKernelGridSupport *)regSet_)).begin(boundary_), 
+        (*((TeKernelGridSupport *)regSet_)).end(boundary_))) {
+        prec = precision_;
+        return true;
+      }
+      else
+        return false;
+    }
+    else {
+      if (this->getPrecision((*((TeKernelGridSupport *)regSet_)).begin(), 
+        (*((TeKernelGridSupport *)regSet_)).end())) {
+        prec = precision_;
+        return true;
+      }
+      else
+        return false;
+    }
+  }
+  if (this->getPrecision((*((TeSTStatInstanceSet *)regSet_)).begin(), 
+    (*((TeSTStatInstanceSet *)regSet_)).end())) {
+    prec = precision_;
+    return true;
+  }
+  else {
+    return false;
+  }
+
+}
+
+bool TeKernelMethod::setGridLayer(string name) {
+
+  this->resName_ = name;
+  this->gridLayer_ = NULL;
+
+  // Check whether there is a layer with this name in the database
+  TeLayerMap& layerMap = db_->layerMap();
+  TeLayerMap::iterator it;
+  for (it = layerMap.begin(); it != layerMap.end(); ++it)
+  {
+    if (it->second->name() == name)
+    {
+      this->gridLayer_ = it->second;
+      this->params_.generatedLayerId_ = it->second->id();
+      break;
+    }
+  }
+
+  //Vai criar uma nova -- verifica se nome esta ok
+  if (!gridLayer_)
+  {
+//    size_t pos = name.find("-",string::npos,1);
+    size_t pos = name.find("-", 0, 1);
+   if (pos != string::npos)
+    {
+		QMessageBox::warning( NULL, tr("Error"), 
+			tr("The layer name cannot have the \"-\" character!"));
+      return false;
+    }
+    char ch = name.at(0);
+    if (isdigit(ch))
+    {
+		QMessageBox::information( NULL, tr("Error"),
+			tr("The layer name cannot have numerical characters!"));
+      return false;
+    }
+  }
+
+  return true;
+}
+
+
+bool TeKernelMethod::createLayer(TeRaster* raster,
+                                 TerraViewBase* mWindow)
+{
+ 
+  TeQtDatabasesListView* dbView = mWindow->getDatabasesListView();
+  if (!isNewLayer())  {
+
+    //Recupera item associado ao layer para poder remover 
+    TeQtLayerItem* lItPrev = dbView->currentLayerItem();
+    dbView->selectLayerItem(gridLayer_);
+    TeQtLayerItem* layerItem = dbView->currentLayerItem();
+    if (lItPrev != layerItem) {
+      mWindow->removeItem((TeQtCheckListItem*)layerItem);
+      if (lItPrev != NULL)
+        dbView->selectLayerItem(lItPrev->getLayer());
+    }
+    else {
+      mWindow->removeItem(layerItem);
+    }
+  }
+  TeLayer* l = new TeLayer(resName_, db_, raster->projection());
+  int bw, bh;
+  if (raster->params().ncols_ > 512)
+  {
+	  bw = 256;
+	  bh = 256;
+  }
+  else
+  {
+	  bw = raster->params().ncols_;
+	  bh = raster->params().nlines_;
+  }
+
+  	// create a raster geometry in a TerraLib database
+	TeRasterParams pDB = raster->params();
+	pDB.fileName_ = "rasterkernel" + Te2String(l->id()); // the name of the raster table that will contain the blob's
+	pDB.nBands(1);
+	pDB.setDataType(TeDOUBLE);
+	pDB.setDummy(raster->params().dummy_[0]);
+	pDB.mode_ = 'c';
+	// parameters specific of the database decoder
+	pDB.decoderIdentifier_ = "DB";			// a database decoder 
+	pDB.database_ = db_;					// pointer to the database
+	pDB.tiling_type_ = TeRasterParams::TeNoExpansible;      
+	pDB.blockHeight_ = bh;					// we are storing the entire raster in one block
+	pDB.blockWidth_ = bw;
+	pDB.setPhotometric(TeRasterParams::TeMultiBand);	// the photometric interpretation of the raster
+	TeRaster rstDb(pDB);
+	rstDb.init();
+	if (rstDb.params().status_ == TeRasterParams::TeReadyToWrite)
+	{
+		double val;
+		int col, lin;
+		for (lin=0;lin<rstDb.params().nlines_;++lin)
+			for (col=0;col<rstDb.params().ncols_;++col)
+			{
+				raster->getElement(col,lin,val,0);
+				rstDb.setElement(col,lin,val,0);
+			}
+	}
+    l->addRasterGeometry(&rstDb,"O1");	
+	rstDb.clear();
+	l->raster(0);
+ 
+  params_.generatedLayerId_ = l->id();
+  
+  TeQtDatabaseItem *dbItem = dbView->currentDatabaseItem();
+  
+  TeQtLayerItem *layerItem = 
+    new TeQtLayerItem((QListViewItem*)dbItem,l->name().c_str(), l);
+  layerItem->setEnabled(true);
+  if (!dbView->isOpen(layerItem->parent()))
+				dbView->setOpen(layerItem->parent(),true);
+  mWindow->checkWidgetEnabling();
+
+  //Verifica se existe tema com mesmo nome e remove
+	TeQtViewItem* curViewItem = mWindow->getViewsListView()->currentViewItem();
+	vector<TeQtThemeItem*> themeItemVec = curViewItem->getThemeItemVec();
+	unsigned int i;
+	for (i = 0; i < themeItemVec.size(); ++i)
+	{
+		TeAppTheme* appTheme = themeItemVec[i]->getAppTheme();
+		TeTheme* theme = (TeTheme*)appTheme->getTheme();
+		if (theme && !resName_.compare(theme->name()))
+		{
+			TeQtViewsListView* viewList = mWindow->getViewsListView();
+			TeQtThemeItem* themeItem = viewList->getThemeItem(appTheme);
+			if (themeItem != NULL)
+				mWindow->removeItem((TeQtCheckListItem*)themeItem);
+		}
+	}
+	TeAttrTableVector ATV;
+  if (! mWindow->createTheme(resName_, mWindow->currentView(), l, "", ATV))
+    return false;
+
+
+  //Recupera apontador para o tema criado
+	themeItemVec = curViewItem->getThemeItemVec();
+	for (i = 0; i < themeItemVec.size(); i++)
+	{
+		TeAppTheme* appTheme = themeItemVec[i]->getAppTheme();
+		TeTheme* theme = (TeTheme*)appTheme->getTheme();
+		if (!resName_.compare(theme->name()))
+		{
+			this->rasterTheme_ = theme;
+		}
+	}
+
+
+  if (this->rasterTheme_ == NULL) {
+      QMessageBox::information( NULL, tr("Error"),
+		  tr("There is no theme with the raster representation!"));
+      return false;
+  }
+  return true;
+}
+
+bool TeKernelMethod::createColumn(TeAppTheme* currTheme,
+                         TeQtGrid* grid) 
+{
+
+	grid->clear();
+	if(!insertPropertyColumn(*((TeSTStatInstanceSet *)this->regSet_),
+      0, regTheme_, params_.supportThemeTable_, params_.supportThemeAttr_))
+	  return false;
+
+	 // ---------------------------------------------- load updated table from database 
+	// Update all the themes that uses this table
+
+	TeViewMap& viewMap = this->db_->viewMap();
+	TeViewMap::iterator it;
+	set<TeLayer*> layerSet;
+	for (it = viewMap.begin(); it != viewMap.end(); ++it)
+	{
+		TeView *view = it->second;
+		vector<TeViewNode*>& themesVector = view->themes();
+		for (unsigned int i = 0; i < themesVector.size(); ++i)
+		{
+			if(themesVector[i]->type() == TeTHEME)
+			{
+				TeTheme* theme = (TeTheme*)themesVector[i];
+				if (theme->isThemeTable(params_.supportThemeTable_) == true)
+				{
+					theme->loadThemeTables();
+					layerSet.insert(theme->layer());
+				}
+			}
+		}
+	}
+
+	// Update the layer tables affected
+	set<TeLayer*>::iterator setIt;
+	for (setIt = layerSet.begin(); setIt != layerSet.end(); ++setIt)
+		(*setIt)->loadLayerTables();
+
+	// ---------------------------------------------- grid 
+	if(currTheme!= NULL)
+	{
+		grid->init(currTheme);
+		grid->refresh();
+		grid->goToLastColumn();
+	}
+
+	return true;
+}
+
+//Alterando pois soh precisa internamente
+bool TeKernelMethod::createKernelLegends(int nColors, bool /* color */, TeAppTheme* appTheme)
+{
+  	int precision;
+	if (!getPrecision(precision)) 
+	{
+		QMessageBox::critical(NULL, tr("Error"), 
+		tr("Unexpected error in the evaluation of the kernel precision!"));
+		return false;
+	}
+	
+	precision=15; //teste
+  
+	// recupera o tema sobre o qual foi calculado kernel
+	TeTheme* theme = 0;
+	if (this->rasterTheme_ != NULL)
+		theme = this->rasterTheme_;
+	else
+		theme = this->regTheme_;
+
+	TeAttributeRep rep;				  
+	rep.type_ = TeREAL;
+
+	TeGrouping groupKernel;
+	groupKernel.groupNumSlices_ = nColors;
+	groupKernel.groupPrecision_ = precision;
+
+	if (theme->layer()->geomRep() & TeRASTER)    // suporte foi grade
+	{
+		groupKernel.groupMode_ = TeRasterSlicing;
+		rep.name_ = "0";
+	}
+	else										// suporte foi regioes
+	{
+		groupKernel.groupMode_ = TeEqualSteps;
+		rep.name_ = this->params_.supportThemeTable_ + "." + this->params_.supportThemeAttr_;
+	}
+	groupKernel.groupAttribute_ = rep;
+
+	if (!theme->buildGrouping(groupKernel))
+		return false;
+  
+	vector<string> colorRamp;
+	colorRamp.push_back("CYAN");
+	colorRamp.push_back("GREEN");
+	colorRamp.push_back("YELLOW");
+	colorRamp.push_back("ORANGE");
+	colorRamp.push_back("RED");
+
+	// cria rampa de cores default para dados de kernel e define visual de cada fatia
+	vector<TeColor> colorGrad;
+	getColors(colorRamp,10, colorGrad);
+	for (int g=0; g<theme->grouping().groupNumSlices_; g++)
+	{
+		TeVisual visual(TePOLYGONS);            
+		visual.color(colorGrad[g]);
+		if((theme->layer()->geomRep() & TePOLYGONS) || 
+		   (theme->layer()->geomRep() & TeCELLS) || 
+		   (theme->layer()->geomRep() & TeRASTER))
+		{
+			visual.transparency(theme->defaultLegend().visual(TePOLYGONS)->transparency());
+			visual.contourStyle(theme->defaultLegend().visual(TePOLYGONS)->contourStyle());
+			visual.contourWidth(theme->defaultLegend().visual(TePOLYGONS)->contourWidth());
+			visual.contourColor(theme->defaultLegend().visual(TePOLYGONS)->contourColor());	
+			theme->setGroupingVisual(g+1,visual.copy(),TePOLYGONS);
+		}
+		if(theme->layer()->geomRep() & TeLINES)
+		{
+			visual.style(theme->defaultLegend().visual(TeLINES)->style());
+			visual.width(theme->defaultLegend().visual(TeLINES)->width());
+			theme->setGroupingVisual(g+1,visual.copy(),TeLINES);
+		}
+		else if(theme->layer()->geomRep() & TePOINTS)
+		{
+			visual.style(theme->defaultLegend().visual(TePOINTS)->style());
+			visual.size(theme->defaultLegend().visual(TePOINTS)->size());
+			theme->setGroupingVisual(g+1,visual.copy(),TePOINTS);
+		}
+	}
+	colorGrad.clear();
+
+	// acrescenta algumas informacoes relativas ao theme application
+
+	std::string scores("Cy-G-Y-Or-R");
+	vector<ColorBar> bg =  getColorBarVector(scores, true);
+ 	string groupingColors = getColors(bg, bg,TeEqualSteps);
+	appTheme->groupColor(groupingColors);
+	appTheme->countObj(false);
+	appTheme->mixColor(true);
+	appTheme->groupColorDir(TeColorAscSatBegin);
+	if (!theme->saveGrouping())
+		return false;
+	if (!(theme->layer()->geomRep() & TeRASTER)  && !theme->saveLegendInCollection())
+		return false;
+	
+	theme->visibleRep(theme->visibleRep() | 0x40000000);
+	updateAppTheme(this->db_,appTheme);
+
+	if (this->rasterTheme_ != NULL)
+		appTheme->setAlias("0",tr("Kernel Values").latin1());
+	return true;
+}
+
diff --git a/src/terralib/drivers/qt/TeQtTerraStat.h b/src/terralib/drivers/qt/TeQtTerraStat.h
new file mode 100755
index 0000000..97fc4b8
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtTerraStat.h
@@ -0,0 +1,209 @@
+#ifndef  __TERRALIB_INTERNAL_QTTERRASTAT_H
+#define  __TERRALIB_INTERNAL_QTTERRASTAT_H
+/***
+ * Implementa suporte para as funcoes do TerraStat
+ * Objetivo -- soh nao manter a parte de geracao de eventos,
+ * etc no ui, que podera ser reaproveitado.
+ ****/
+
+#include "TeDatabase.h"
+#include "TeKernelParams.h"
+#include <qmessagebox.h>
+#include <terraViewBase.h>
+
+
+#define STAT_PRECISION   12
+/////////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////////
+
+class TeSTElementSet;
+class TeSTStatInstanceSet;
+
+/**
+ * Grava uma coluna na tabela de atributos associada a um STOSet.
+ * Nome da coluna eh o mesmo nome da propriedade
+ **/
+bool insertPropertyColumn(TeSTElementSet& stoSet,
+                          const string& tableName,
+                          const string& columnName);
+
+bool insertPropertyColumn(TeSTStatInstanceSet& stSet,
+                          int idxDoubleProp,
+                          TeTheme* theme,
+                          const string& tableName,
+                          const string& columnName);
+
+/***
+ * Cria um STOSet a partir de um tema e um conjunto de atributos,
+ * colocando todas as tabelas do TEMA
+ ***/
+bool createSTOSetFromTheme(TeTheme* theme, 
+                              vector<string>& attributes,
+                              TeSTElementSet* rs);
+
+
+/***
+ * Cria um STOSet a partir de um tema e um conjunto de atributos,
+ * colocando todas as tabelas do TEMA
+ ***/
+bool createSTOStatSetFromTheme(TeTheme* theme, 
+                               vector<string>& attributes,
+                               int additionalDouble,
+                               TeSTStatInstanceSet* rs);
+
+ 
+enum TeKernelErrorType {Uerror, Error, Warning};
+
+
+///Retorna legenda do kernel
+bool getKernelLegend(TeKernelParams& par, vector<string>& legend);
+
+/** Classe para aplicar o metodo de Kernel **/
+class TeKernelMethod : public QWidget {
+
+	Q_OBJECT
+
+protected:
+    TeTheme*       evTheme1_;
+    TeTheme*       evTheme2_;
+    TeTheme*       regTheme_;
+    TeTheme*       rasterTheme_;
+
+
+    /**
+     * Pointers to containers -- void since different types may apply
+     * should dispose them
+     **/
+    void*          evSet1_;
+    void*          evSet2_;
+    void*          regSet_;
+    int            precision_;
+    TeLayer*       gridLayer_;
+    bool           justOnePolygon_;
+    TePolygon      boundary_;
+
+    bool           call();
+    bool           generateEventSet(int which);
+    bool           generateSupportSet();
+    void           error(TeKernelErrorType type, string message, 
+						QWidget* parent = 0);
+
+
+    //Calcula a precisao para um conjunto de valores
+    template<typename SetIt> 
+    bool           getPrecision(SetIt itBegin, SetIt itEnd) {
+      
+      
+      SetIt it = itBegin;
+      
+      double max = -TeMAXFLOAT;
+      double min = TeMAXFLOAT;
+      
+      double kValue;
+      while (it != itEnd) {
+        
+        if ((*it).getDoubleProperty(0, kValue)) {
+          if (kValue > max)
+            max = kValue;
+          if ((kValue > 0) && (kValue < min))
+            min = kValue;
+        }
+        ++it;
+      }
+      
+      if (min == TeMAXFLOAT)
+        return false;
+      if (max == -TeMAXFLOAT)
+        return false;
+
+      double diff = max - min;
+
+      double prec = log10(diff);
+      //Diferenca esta antes da virgula
+      if (prec > 0) {
+        precision_ = 2;
+      }
+      else {
+        precision_ = (int)(ceil(fabs(prec)) + 3);
+      }
+      return true;
+    }
+    
+
+public:
+
+    TeKernelParams params_;
+
+    /** Geracao de conjuntos **/
+    bool           isPoint1_;
+    bool           isPoint2_;
+
+    bool			isGridEv_;
+    bool			isGridReg_;
+    int				gridCols_;
+	TeDatabase*		db_;
+    string			resName_; //Nome do layer ou da coluna gerada
+
+    TeKernelMethod():
+		evTheme1_(0),
+		evTheme2_(0),
+		regTheme_(0),
+		rasterTheme_(0),
+		evSet1_(0),
+		evSet2_(0),
+		regSet_(0),
+		precision_(-1),
+		isPoint1_(true),
+		isPoint2_(true),
+		isGridEv_(false),
+		isGridReg_(false),
+		gridCols_(0),
+		db_(0)
+		{}
+
+	~TeKernelMethod();
+
+    //Recupera tema e inicializa os parametros necessarios
+    bool setTheme(string name, int id, TeView* view); 
+
+    //Define nome de layer para criacao de grid
+    bool setGridLayer(string name);
+
+    //Verifica se layer eh nova
+    bool isNewLayer() {
+      return gridLayer_ == NULL;
+    }
+
+    //Cria layer de grid para criar uma nova
+    bool createLayer(TeRaster* raster, TerraViewBase* mWindow);
+
+    bool createColumn(TeAppTheme* currTheme, TeQtGrid* grid);
+
+    //Aplica o metodo de kernel
+    bool apply(void*& regSet, QWidget* parent);
+
+    //Recupera precisao dos dados
+    //Definida como prec(max - min) + 3
+    bool getPrecision(int& prec);
+
+    TeTheme* getTheme(int id) {
+      if (id == 0)
+        return (TeTheme *)regTheme_;
+      if (id == 1)
+        return evTheme1_;
+      if (id == 2)
+        return evTheme2_;
+      return NULL;
+    }
+
+    bool createKernelLegends(int nColors, bool color, TeAppTheme* appTheme);
+
+	TeTheme* regTheme()
+	{	return regTheme_; }
+
+	TeTheme* rasterTheme()
+	{	return rasterTheme_; }
+
+};
+
+#endif
diff --git a/src/terralib/drivers/qt/TeQtTextEdit.cpp b/src/terralib/drivers/qt/TeQtTextEdit.cpp
new file mode 100755
index 0000000..f739597
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtTextEdit.cpp
@@ -0,0 +1,862 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#include <TeQtTextEdit.h>
+#include <TeDefines.h>
+
+TeQtTextEdit::TeQtTextEdit()
+{
+	canvas_ = 0;
+	edit_ = false;
+	mode_ = 0;
+}
+
+TeQtTextEdit::TeQtTextEdit(TeText& tx, TeVisual v, TeQtCanvas* canvas)
+{
+	edit_ = true;
+	mode_ = 0;
+	canvas_ = canvas;
+	text_ = tx;
+	visual_ = v;
+	change();
+}
+
+TeQtTextEdit::~TeQtTextEdit ()
+{
+}
+
+void 
+TeQtTextEdit::change(QPoint p, bool apxAngle)
+{
+	double angle, dx, dy;
+
+	if(mode_ == 1) // change angle from left
+	{
+		dx = -(p.x() - pCenter_.x());
+		dy = p.y() - pCenter_.y();
+
+		if(apxAngle)
+		{
+			double fdx = fabs(dx);
+			double fdy = fabs(dy);
+			if(fdx < fdy)
+			{
+				if(4*fdx < fdy)
+					dx = 0.;
+				else
+				{
+					fdx = fdy;
+					if(dx >= 0)
+						dx = fdx;
+					else
+						dx = -fdx;
+				}
+			}
+			else
+			{
+				if(4*fdy < fdx)
+					dy = 0.;
+				else
+				{
+					fdy = fdx;
+					if(dy >= 0)
+						dy = fdy;
+					else
+						dy = -fdy;
+				}
+			}
+		}
+		if(dx == 0)
+		{
+			if(dy > 0)
+				angle = 90;
+			else
+				angle = 270;
+		}
+		else
+		{
+			if(dx > 0)
+				angle = atan(dy/dx) * 180. / TePI;
+			else
+				angle = atan(dy/dx) * 180. / TePI + 180;
+		}
+		text_.setAngle(angle);
+	}
+	else if(mode_ == 2) // change angle from right
+	{
+		dx = p.x() - pCenter_.x();
+		dy = -(p.y() - pCenter_.y());
+
+		if(apxAngle)
+		{
+			double fdx = fabs(dx);
+			double fdy = fabs(dy);
+			if(fdx < fdy)
+			{
+				if(4*fdx < fdy)
+					dx = 0.;
+				else
+				{
+					fdx = fdy;
+					if(dx >= 0)
+						dx = fdx;
+					else
+						dx = -fdx;
+				}
+			}
+			else
+			{
+				if(4*fdy < fdx)
+					dy = 0.;
+				else
+				{
+					fdy = fdx;
+					if(dy >= 0)
+						dy = fdy;
+					else
+						dy = -fdy;
+				}
+			}
+		}
+		if(dx == 0)
+		{
+			if(dy > 0)
+				angle = 90;
+			else
+				angle = 270;
+		}
+		else
+		{
+			if(dx > 0)
+				angle = atan(dy/dx) * 180. / TePI;
+			else
+				angle = atan(dy/dx) * 180. / TePI + 180;
+		}
+		text_.setAngle(angle);
+	}
+	else if(mode_ == 3 || mode_ == 4) // change size
+	{
+		if(visual_.fixedSize() == false)
+		{
+			double dx = fabs(double(pCenter_.x() - p.x()));
+			double dy = fabs(double(pCenter_.y() - p.y()));
+			int h = apx(sqrt(dx*dx + dy*dy));
+
+			double dh, hc, c = 1.;
+
+			hc = h * c;
+			dh = canvas_->mapVtoDW((int)hc);
+			text_.setHeight(dh);
+			QRect r = canvas_->textRect (text_, visual_);
+			while(r.height()/2 <= h-1)
+			{
+				c *= 1.01;
+				hc = h * c;
+				dh = canvas_->mapVtoDW((int)hc);
+				text_.setHeight(dh);
+				r = canvas_->textRect (text_, visual_);
+			}
+		}
+	}
+	else if(mode_ == 5) // change position
+	{
+		TeCoord2D pt = canvas_->mapVtoDW(p);
+		text_.add(pt);
+	}
+	change();
+}
+
+void 
+TeQtTextEdit::init(TeText& tx, TeVisual v, TeQtCanvas* canvas)
+{
+	edit_ = true;
+	mode_ = 0;
+	canvas_ = canvas;
+	text_ = tx;
+	visual_ = v;
+	change();
+}
+
+void 
+TeQtTextEdit::change()
+{
+	QRect rect = canvas_->textRect(text_, visual_);
+
+	pCenter_ = rect.center();
+
+	pLeft_ = rect.center();
+	pLeft_.setX(rect.left()+3);
+
+	pRight_ = rect.center();
+	pRight_.setX(rect.right()-3);
+
+	pTop_ = rect.center();
+	pTop_.setY(rect.top()+3);
+
+	pBottom_ = rect.center();
+	pBottom_.setY(rect.bottom()-3);
+
+	double angle = text_.angle();
+	if(angle == 0)
+	{
+//		canvas_->plotOnWindow();
+//		canvas_->plotTextRects(text_, visual_);
+//		canvas_->plotOnPixmap0();
+		return;
+	}
+
+	int	nx, ny;
+	double	d;
+
+	d = fabs(double(pRight_.x() - pCenter_.x()));
+	nx = pCenter_.x() + apx(cos(angle*TePI/180.) * d);
+	ny = pCenter_.y() - apx(sin(angle*TePI/180.) * d);
+	pRight_ = QPoint(nx, ny);
+
+	d = fabs(double(pLeft_.x() - pCenter_.x()));
+	nx = pCenter_.x() + apx(cos((180.+angle)*TePI/180.) * d);
+	ny = pCenter_.y() - apx(sin((180.+angle)*TePI/180.) * d);
+	pLeft_ = QPoint(nx, ny);
+
+	d = fabs(double(pTop_.y() - pCenter_.y()));
+	nx = pCenter_.x() + apx(cos((90.+angle)*TePI/180.) * d);
+	ny = pCenter_.y() - apx(sin((90.+angle)*TePI/180.) * d);
+	pTop_ = QPoint(nx, ny);
+
+	d = fabs(double(pBottom_.y() - pCenter_.y()));
+	nx = pCenter_.x() + apx(cos((270.+angle)*TePI/180.) * d);
+	ny = pCenter_.y() - apx(sin((270.+angle)*TePI/180.) * d);
+	pBottom_ = QPoint(nx, ny);
+
+//	canvas_->plotTextRects(text_, visual_);
+}
+
+int
+TeQtTextEdit::apx(double d)
+{
+	if(d >= 0)
+		return (int)(d+.5);
+	else
+		return (int)(d-.5);
+}
+
+int
+TeQtTextEdit::located(QPoint& p)
+{
+	QRect rLeft(0, 0, 6, 6), rRight(0, 0, 6, 6), rTop(0, 0, 6, 6), rBottom(0, 0, 6, 6), rCenter(0, 0, 6, 6);
+	rLeft.moveCenter(pLeft_);
+	rRight.moveCenter(pRight_);
+	rTop.moveCenter(pTop_);
+	rBottom.moveCenter(pBottom_);
+	rCenter.moveCenter(pCenter_);
+
+	mode_ = 0;
+	double d, m = TeMAXFLOAT;
+
+	if(rLeft.contains(p))
+	{
+		QPoint a(rLeft.left() + rLeft.width()/2, rLeft.left() + rLeft.height()/2);
+		d = (p.x()-a.x())*(p.x()-a.x()) + (p.y()-a.y())*(p.y()-a.y());
+		m = MIN(m, d);
+		if(m == d)
+			mode_ = 1;
+	}
+	if(rRight.contains(p))
+	{
+		QPoint a(rRight.left() + rRight.width()/2, rRight.left() + rRight.height()/2);
+		d = (p.x()-a.x())*(p.x()-a.x()) + (p.y()-a.y())*(p.y()-a.y());
+		m = MIN(m, d);
+		if(m == d)
+			mode_ = 2;
+	}
+	if(rTop.contains(p))
+	{
+		QPoint a(rTop.left() + rTop.width()/2, rTop.left() + rTop.height()/2);
+		d = (p.x()-a.x())*(p.x()-a.x()) + (p.y()-a.y())*(p.y()-a.y());
+		m = MIN(m, d);
+		if(m == d)
+			mode_ = 3;
+	}
+	if(rBottom.contains(p))
+	{
+		QPoint a(rBottom.left() + rBottom.width()/2, rBottom.left() + rBottom.height()/2);
+		d = (p.x()-a.x())*(p.x()-a.x()) + (p.y()-a.y())*(p.y()-a.y());
+		m = MIN(m, d);
+		if(m == d)
+			mode_ = 4;
+	}
+	if(rCenter.contains(p))
+	{
+		QPoint a(rCenter.left() + rCenter.width()/2, rCenter.left() + rCenter.height()/2);
+		d = (p.x()-a.x())*(p.x()-a.x()) + (p.y()-a.y())*(p.y()-a.y());
+		m = MIN(m, d);
+		mode_ = 5;
+	}
+
+	if(mode_ == 1)
+		pLeft_ = p;
+	else if(mode_ == 2)
+		pRight_ = p;
+	else if(mode_ == 3)
+		pTop_ = p;
+	else if(mode_ == 4)
+		pBottom_ = p;
+	else if(mode_ == 5)
+		pCenter_ = p;
+
+	return mode_;
+}
+
+bool
+TeQtTextEdit::isHotPoint(QPoint& p)
+{
+	QRect rLeft(0, 0, 6, 6), rRight(0, 0, 6, 6), rTop(0, 0, 6, 6), rBottom(0, 0, 6, 6), rCenter(0, 0, 6, 6);
+	rLeft.moveCenter(pLeft_);
+	rRight.moveCenter(pRight_);
+	rTop.moveCenter(pTop_);
+	rBottom.moveCenter(pBottom_);
+	rCenter.moveCenter(pCenter_);
+
+	mode_ = 0;
+	double d, m = TeMAXFLOAT;
+
+	if(rLeft.contains(p))
+	{
+		QPoint a(rLeft.left() + rLeft.width()/2, rLeft.left() + rLeft.height()/2);
+		d = (p.x()-a.x())*(p.x()-a.x()) + (p.y()-a.y())*(p.y()-a.y());
+		m = MIN(m, d);
+		if(m == d)
+			mode_ = 1;
+	}
+	if(rRight.contains(p))
+	{
+		QPoint a(rRight.left() + rRight.width()/2, rRight.left() + rRight.height()/2);
+		d = (p.x()-a.x())*(p.x()-a.x()) + (p.y()-a.y())*(p.y()-a.y());
+		m = MIN(m, d);
+		if(m == d)
+			mode_ = 2;
+	}
+	if(rTop.contains(p))
+	{
+		QPoint a(rTop.left() + rTop.width()/2, rTop.left() + rTop.height()/2);
+		d = (p.x()-a.x())*(p.x()-a.x()) + (p.y()-a.y())*(p.y()-a.y());
+		m = MIN(m, d);
+		if(m == d)
+			mode_ = 3;
+	}
+	if(rBottom.contains(p))
+	{
+		QPoint a(rBottom.left() + rBottom.width()/2, rBottom.left() + rBottom.height()/2);
+		d = (p.x()-a.x())*(p.x()-a.x()) + (p.y()-a.y())*(p.y()-a.y());
+		m = MIN(m, d);
+		if(m == d)
+			mode_ = 4;
+	}
+	if(rCenter.contains(p))
+	{
+		QPoint a(rCenter.left() + rCenter.width()/2, rCenter.left() + rCenter.height()/2);
+		d = (p.x()-a.x())*(p.x()-a.x()) + (p.y()-a.y())*(p.y()-a.y());
+		m = MIN(m, d);
+		mode_ = 5;
+	}
+
+	if(mode_ > 0)
+		return true;
+	return false;
+}
+
+void
+TeQtTextEdit::endEdit()
+{
+	edit_ = false;
+	mode_ = 0;
+}
+
+int
+TeQtTextEdit::mode()
+{
+	return mode_;
+}
+
+void
+TeQtTextEdit::mode(int mode)
+{
+	mode_ = mode;
+}
+
+bool
+TeQtTextEdit::edit()
+{
+	return edit_;
+}
+
+TeText
+TeQtTextEdit::text()
+{
+	return text_;
+}
+
+void
+TeQtTextEdit::text(TeText t)
+{
+	text_ = t;
+}
+
+void
+TeQtTextEdit::height(double h)
+{
+	text_.setHeight(h);
+}
+
+void
+TeQtTextEdit::angle(double a)
+{
+	text_.setAngle(a);
+}
+
+void
+TeQtTextEdit::addPosition(TeCoord2D p)
+{
+	TeCoord2D tp = text_.location();
+	tp += p;
+	text_.add(tp);
+}
+
+TeQtCanvas*
+TeQtTextEdit::canvas()
+{
+	return canvas_;
+}
+
+QRect
+TeQtTextEdit::getRect()
+{
+	QRect rect = canvas_->textRect(text_, visual_);
+	int	x1 = rect.left();
+	int	y1 = rect.top();
+	int	x2 = rect.right();
+	int	y2 = rect.bottom();
+
+	double angle = text_.angle() * -1;
+	if(!(angle == 0 || angle == 90 || angle == 180 || angle == 270))
+	{
+		double d, dx, dy, alfa, beta;
+		QPoint c = rect.center();
+		QPoint p, p1, p2, p3, p4;
+
+		p = QPoint(x1, y1);
+		dx = p.x() - c.x();
+		dy = p.y() - c.y();
+		alfa = atan(dy/dx) * 180. / TePI;
+		if(dx<0)
+			alfa = 180. + alfa;
+		else if(dx>=0 && dy<0)
+			alfa = 360. + alfa;
+		beta = alfa + angle;
+		d = sqrt(double((p.x()-c.x()) * (p.x()-c.x()) + (p.y()-c.y()) * (p.y()-c.y())));
+		p1.setX(c.x() + TeRound(cos(beta*TePI/180.) * d));
+		p1.setY(c.y() + TeRound(sin(beta*TePI/180.) * d));
+
+		p = QPoint(x1, y2);
+		dx = p.x() - c.x();
+		dy = p.y() - c.y();
+		alfa = atan(dy/dx) * 180. / TePI;
+		if(dx<0)
+			alfa = 180. + alfa;
+		else if(dx>=0 && dy<0)
+			alfa = 360. + alfa;
+		beta = alfa + angle;
+		d = sqrt(double((p.x()-c.x()) * (p.x()-c.x()) + (p.y()-c.y()) * (p.y()-c.y())));
+		p2.setX(c.x() + TeRound(cos(beta*TePI/180.) * d));
+		p2.setY(c.y() + TeRound(sin(beta*TePI/180.) * d));
+
+		p = QPoint(x2, y1);
+		dx = p.x() - c.x();
+		dy = p.y() - c.y();
+		alfa = atan(dy/dx) * 180. / TePI;
+		if(dx<0)
+			alfa = 180. + alfa;
+		else if(dx>=0 && dy<0)
+			alfa = 360. + alfa;
+		beta = alfa + angle;
+		d = sqrt(double((p.x()-c.x()) * (p.x()-c.x()) + (p.y()-c.y()) * (p.y()-c.y())));
+		p3.setX(c.x() + TeRound(cos(beta*TePI/180.) * d));
+		p3.setY(c.y() + TeRound(sin(beta*TePI/180.) * d));
+
+		p = QPoint(x2, y2);
+		dx = p.x() - c.x();
+		dy = p.y() - c.y();
+		alfa = atan(dy/dx) * 180. / TePI;
+		if(dx<0)
+			alfa = 180. + alfa;
+		else if(dx>=0 && dy<0)
+			alfa = 360. + alfa;
+		beta = alfa + angle;
+		d = sqrt(double((p.x()-c.x()) * (p.x()-c.x()) + (p.y()-c.y()) * (p.y()-c.y())));
+		p4.setX(c.x() + TeRound(cos(beta*TePI/180.) * d));
+		p4.setY(c.y() + TeRound(sin(beta*TePI/180.) * d));
+
+		x1 = MIN(p1.x(), p2.x());
+		x1 = MIN(x1, p3.x());
+		x1 = MIN(x1, p4.x());
+		y1 = MIN(p1.y(), p2.y());
+		y1 = MIN(y1, p3.y());
+		y1 = MIN(y1, p4.y());
+		x2 = MAX(p1.x(), p2.x());
+		x2 = MAX(x2, p3.x());
+		x2 = MAX(x2, p4.x());
+		y2 = MAX(p1.y(), p2.y());
+		y2 = MAX(y2, p3.y());
+		y2 = MAX(y2, p4.y());
+
+		rect.setLeft(x1);
+		rect.setTop(y1);
+		rect.setRight(x2);
+		rect.setBottom(y2);
+	}
+	return rect;
+//	QRect rect;
+//	int	x1, y1, x2, y2;
+
+//	x1 = pLeft_.x();
+//	x1 = MIN(x1, pRight_.x());
+//	x1 = MIN(x1, pTop_.x());
+//	x1 = MIN(x1, pBottom_.x());
+
+//	y1 = pLeft_.y();
+//	y1 = MIN(y1, pRight_.y());
+//	y1 = MIN(y1, pTop_.y());
+//	y1 = MIN(y1, pBottom_.y());
+
+//	x2 = pLeft_.x();
+//	x2 = MAX(x2, pRight_.x());
+//	x2 = MAX(x2, pTop_.x());
+//	x2 = MAX(x2, pBottom_.x());
+
+//	y2 = pLeft_.y();
+//	y2 = MAX(y2, pRight_.y());
+//	y2 = MAX(y2, pTop_.y());
+//	y2 = MAX(y2, pBottom_.y());
+
+//	if(text_.angle() == 0 || text_.angle() == 90 || text_.angle() == 180 || text_.angle() == 270)
+//		rect = QRect(x1-3, y1-3, x2-x1+7, y2-y1+7);
+//	else
+//	{
+//		int h = y2 - y1;
+//		int w = x2 - x1;
+//		int	d = h;
+//		if(w < h)
+//			d = w;
+//		x1 -= d;
+//		y1 -= d;
+//		x2 += d;
+//		y2 += d;
+//		rect = QRect(x1, y1, x2-x1, y2-y1);
+//	}
+//	return rect;
+}
+
+QRect
+TeQtTextEdit::getHRect()
+{
+	return canvas_->textRect(text_, visual_);
+}
+
+TeQtMultiTextEdit::TeQtMultiTextEdit()
+{
+	current_ = -1;
+	selMode_ = false;
+}
+
+TeQtMultiTextEdit::~TeQtMultiTextEdit()
+{
+}
+
+int
+TeQtMultiTextEdit::size()
+{
+	return textVec_.size();
+}
+
+void
+TeQtMultiTextEdit::push(TeQtTextEdit t)
+{
+	int geomId = t.text().geomId();
+	if(geomIdSet_.find(geomId) == geomIdSet_.end())
+	{
+		geomIdSet_.insert(geomId);
+		textVec_.push_back(t);
+		current_ = textVec_.size() - 1;
+	}
+}
+
+void
+TeQtMultiTextEdit::change()
+{
+	if(current_ == -1 || textVec_.empty())
+		return;
+
+//	canvas->plotOnWindow();
+	unsigned int i;
+	for(i=0; i<textVec_.size(); i++)
+	{
+		TeQtTextEdit& t = textVec_[i];
+		t.change();
+	}
+}
+
+void
+TeQtMultiTextEdit::change(QPoint p, bool apxAngle)
+{
+	if(current_ == -1 || textVec_.empty())
+		return;
+
+	TeQtTextEdit& t = textVec_[current_];
+	TeCoord2D pa = t.text().location();
+	t.change(p, apxAngle);
+	TeCoord2D pb = t.text().location();
+	TeCoord2D poffset(pb.x()-pa.x(), pb.y()-pa.y());
+
+	if(t.mode()==1 || t.mode()==2)
+		angle(t.text().angle());
+	else if(t.mode()==3 || t.mode()==4)
+		height(t.text().height());
+	else if(t.mode() == 5)
+		addPosition(poffset);
+	change();
+}
+
+int 
+TeQtMultiTextEdit::located(QPoint& p)
+{
+	unsigned int i;
+	int mode = 0;
+	for(i=0; i<textVec_.size(); i++)
+	{
+		TeQtTextEdit& t = textVec_[i];
+		mode = t.located(p);
+		if(mode)
+		{
+			current_ = i;
+			break;
+		}
+	}
+	return mode;
+}
+
+bool
+TeQtMultiTextEdit::isHotPoint(QPoint& p)
+{
+	if(textVec_.size() == 0)
+		return false;
+
+	unsigned int i;
+	for(i=0; i<textVec_.size(); i++)
+	{
+		TeQtTextEdit& t = textVec_[i];
+		if(t.isHotPoint(p))
+		{
+			current_ = i;
+			break;
+		}
+	}
+	if(i < textVec_.size())
+		return true;
+	return false;
+}
+
+void
+TeQtMultiTextEdit::endEdit()
+{
+	unsigned int i;
+	for(i=0; i<textVec_.size(); i++)
+	{
+		TeQtTextEdit& t = textVec_[i];
+		t.endEdit();
+	}
+	textVec_.clear();
+	geomIdSet_.clear();
+}
+
+int
+TeQtMultiTextEdit::mode()
+{
+	if(current_ >= 0 && textVec_.empty() == false)
+		return textVec_[current_].mode();
+	return 0;
+}
+
+void
+TeQtMultiTextEdit::mode(int m)
+{
+	if(current_ >= 0 && textVec_.empty() == false)
+		textVec_[current_].mode(m);
+}
+
+bool
+TeQtMultiTextEdit::selMode()
+{
+	return selMode_;
+}
+
+void
+TeQtMultiTextEdit::selMode(bool m)
+{
+	selMode_ = m;
+}
+
+bool
+TeQtMultiTextEdit::edit()
+{
+	if(current_ >= 0 && textVec_.empty() == false)
+		return textVec_[current_].edit();
+	return false;
+}
+
+TeText
+TeQtMultiTextEdit::text(int i)
+{
+	TeText t;
+	if(i<(int)textVec_.size())
+		return textVec_[i].text();
+	else
+		return t;
+}
+
+TeVisual
+TeQtMultiTextEdit::visual(int i)
+{
+	TeVisual v;
+	if(i<(int)textVec_.size())
+		return textVec_[i].visual();
+	else
+		return v;
+}
+
+void
+TeQtMultiTextEdit::height(double h)
+{
+	int i;
+	for(i=0; i<(int)textVec_.size(); i++)
+	{
+		if(i == current_)
+			continue;
+		TeQtTextEdit& t = textVec_[i];
+		t.height(h);
+	}
+}
+
+void
+TeQtMultiTextEdit::angle(double a)
+{
+	int i;
+	for(i=0; i<(int)textVec_.size(); i++)
+	{
+		if(i == current_)
+			continue;
+		TeQtTextEdit& t = textVec_[i];
+		t.angle(a);
+	}
+}
+
+void
+TeQtMultiTextEdit::addPosition(TeCoord2D p)
+{
+	int i;
+	for(i=0; i<(int)textVec_.size(); i++)
+	{
+		if(i == current_)
+			continue;
+		TeQtTextEdit& t = textVec_[i];
+		t.addPosition(p);
+	}
+}
+
+QRect
+TeQtMultiTextEdit::getRect()
+{
+	QRect	rect;
+	int i;
+	for(i=0; i<(int)textVec_.size(); i++)
+	{
+		TeQtTextEdit& t = textVec_[i];
+		rect = rect | t.getRect();
+	}
+	return rect;
+}
+
+int
+TeQtMultiTextEdit::getTextIndex(QPoint p)
+{
+	int i;
+	for(i=0; i<(int)textVec_.size(); i++)
+	{
+		TeQtTextEdit& t = textVec_[i];
+		QRect rect = t.getHRect();
+		TeText tx = t.text();
+		double angle = tx.angle() * -1;
+
+		if(angle == 0)
+		{
+			if(rect.contains(p, true))
+				return i;
+		}
+		else
+		{
+			double d, dx, dy, alfa, beta;
+			QPoint c = rect.center();
+
+			dx = p.x() - c.x();
+			dy = p.y() - c.y();
+			alfa = atan(dy/dx) * 180. / TePI;
+			if(dx<0)
+				alfa = 180. + alfa;
+			else if(dx>=0 && dy<0)
+				alfa = 360. + alfa;
+			beta = alfa - angle;
+			d = sqrt(double((p.x()-c.x()) * (p.x()-c.x()) + (p.y()-c.y()) * (p.y()-c.y())));
+			int x = c.x() + TeRound(cos(beta*TePI/180.) * d);
+			int y = c.y() + TeRound(sin(beta*TePI/180.) * d);
+
+			QPoint pp(x, y);
+			if(rect.contains(pp))
+				return i;
+		}
+	}
+	return -1;
+}
+
+void
+TeQtMultiTextEdit::updateText(int index, string t)
+{
+	TeText tx = textVec_[index].text();
+	tx.setTextValue(t);
+	textVec_[index].text(tx);
+	textVec_[index].change();
+}
+
+void
+TeQtMultiTextEdit::visual(const TeVisual& visual)
+{
+	unsigned int i;
+	for(i=0; i<textVec_.size(); i++)
+		textVec_[i].visual(visual);
+}
diff --git a/src/terralib/drivers/qt/TeQtTextEdit.h b/src/terralib/drivers/qt/TeQtTextEdit.h
new file mode 100755
index 0000000..fdc7472
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtTextEdit.h
@@ -0,0 +1,150 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#ifndef  __TERRALIB_INTERNAL_QTTEXTEDIT_H
+#define  __TERRALIB_INTERNAL_QTTEXTEDIT_H
+
+#include "TeCoord2D.h"
+#include "TeQtCanvas.h"
+#include "TeTheme.h"
+#include <qpoint.h>
+#include <set>
+
+class TeQtTextEdit
+{
+	QPoint				pLeft_;
+	QPoint				pRight_;
+	QPoint				pTop_;
+	QPoint				pBottom_;
+	QPoint				pCenter_;
+	bool				edit_;
+	int					mode_;
+	TeQtCanvas*			canvas_;
+	TeTheme*			theme_;
+	TeVisual			visual_;
+	TeText				text_;
+
+public:
+
+    TeQtTextEdit();
+    TeQtTextEdit(TeText& tx, TeVisual v, TeQtCanvas* canvas);
+
+	~TeQtTextEdit ();
+
+	void init(TeText& tx, TeVisual v, TeQtCanvas* canvas);
+
+	void change();
+
+	void change(QPoint p, bool apxAngle=false);
+
+	int	apx(double d);
+
+	int located(QPoint& p);
+
+	bool isHotPoint(QPoint& p);
+
+	void endEdit();
+
+	int mode();
+
+	void mode(int m);
+
+	bool edit();
+
+	TeText text();
+
+	void text(TeText t);
+
+	void height(double h);
+
+	void angle(double a);
+
+	void addPosition(TeCoord2D p);
+
+	TeQtCanvas*	canvas();
+
+	TeVisual	visual() {return visual_;}
+
+	void	visual(const TeVisual& visual) {visual_ = visual;}
+
+	QRect	getRect();
+
+	QRect	getHRect();
+};
+
+
+class TeQtMultiTextEdit
+{
+	vector<TeQtTextEdit> textVec_;
+	set<int>			 geomIdSet_;
+	int					 current_;
+	bool				 selMode_;
+
+public:
+
+    TeQtMultiTextEdit();
+	~TeQtMultiTextEdit();
+
+	int size();
+
+	void push(TeQtTextEdit t);
+
+	void change();
+
+	void change(QPoint p, bool apxAngle=false);
+
+	int located(QPoint& p);
+
+	bool isHotPoint(QPoint& p);
+
+	void endEdit();
+
+	int mode();
+
+	void mode(int m);
+
+	bool selMode();
+
+	void selMode(bool m);
+
+	bool edit();
+
+	TeText text(int i);
+
+	TeVisual visual(int i);
+
+	void visual(const TeVisual&);
+
+	void height(double h);
+
+	void angle(double a);
+
+	void addPosition(TeCoord2D p);
+
+	void clear() {textVec_.clear(); geomIdSet_.clear();}
+
+	QRect	getRect();
+
+	int getTextIndex(QPoint p);
+
+	void updateText(int index, string t);
+};
+#endif
diff --git a/src/terralib/drivers/qt/TeQtThemeItem.cpp b/src/terralib/drivers/qt/TeQtThemeItem.cpp
new file mode 100755
index 0000000..23c0d4e
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtThemeItem.cpp
@@ -0,0 +1,212 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#include <TeQtThemeItem.h>
+#include <TeQtViewsListView.h>
+#include <TeAppTheme.h>
+#include <TeQtLegendItem.h>
+#include <TeQtChartItem.h>
+#include <TeDatabase.h>
+#include <qpixmap.h>
+#include <images/theme.xpm>
+#include <images/fileTheme.xpm>
+#include <images/externalTheme.xpm>
+#include <images/invalidExternalTheme.xpm>
+#include <qimage.h>
+
+//Database item constructor
+TeQtThemeItem::TeQtThemeItem(QListViewItem *parent,
+	QString text, TeAppTheme* appTheme)
+	: TeQtCheckListItem(parent,text,CheckBox), appTheme_(appTheme)
+{
+	type_ = THEME;
+	TeAbstractTheme* absTheme = appTheme_->getTheme();
+
+	if (absTheme->type() == TeTHEME)
+		setPixmap(0, QPixmap(theme_xpm));
+	else if (absTheme->type() == TeFILETHEME)
+		setPixmap(0, QPixmap(fileTheme_xpm));
+	else if (absTheme->type() == TeEXTERNALTHEME)
+		setPixmap(0, QPixmap(externalTheme_xpm));
+
+	invalidThemeItem_ = false;
+	setRenameEnabled(0,true);
+	setSelected(false);
+	setEnabled(true);
+
+	order_ = absTheme->priority();
+}
+
+
+void TeQtThemeItem::setThemeItemAsInvalid()
+{
+	invalidThemeItem_ = true;
+	TeAbstractTheme* absTheme = appTheme_->getTheme();
+	if (absTheme->type() == TeEXTERNALTHEME)
+		setPixmap(0, QPixmap(invalidExternalTheme_xpm));
+}
+
+
+void TeQtThemeItem::stateChange(bool visible)
+{
+	TeQtViewsListView *lView = (TeQtViewsListView*)listView();
+	lView->checkItemStateChanged(this, visible);
+}
+
+
+void TeQtThemeItem::removeLegends()
+{
+	vector<QListViewItem*> legendVector = getChildren();
+	unsigned int i;
+	for (i = 0; i < legendVector.size(); ++i)
+	{
+		TeQtCheckListItem *checkItem = (TeQtCheckListItem*)legendVector[i];
+		if (checkItem->getType() == TeQtCheckListItem::LEGEND ||
+			checkItem->getType() == TeQtCheckListItem::LEGENDTITLE)
+			delete checkItem;
+	}
+}
+
+
+void TeQtThemeItem::removeCharts()
+{
+	vector<QListViewItem*> legendVector = getChildren();
+	unsigned int i;
+	for (i = 0; i < legendVector.size(); ++i)
+	{
+		TeQtCheckListItem *checkItem = (TeQtCheckListItem*)legendVector[i];
+		if (checkItem->getType() == TeQtCheckListItem::CHART ||
+			checkItem->getType() == TeQtCheckListItem::CHARTTITLE)
+			delete checkItem;
+	}
+}
+
+
+void TeQtThemeItem::getLegends(vector<const QPixmap*>& pixmapVector, vector<string>& labelVector, string& title)
+{
+	vector<QListViewItem*> legendVector = getChildren();
+	unsigned int i;
+	for (i = 0; i < legendVector.size(); ++i)
+	{
+		TeQtCheckListItem *checkItem = (TeQtCheckListItem*)legendVector[i];
+
+		if (checkItem->getType() == TeQtCheckListItem::LEGENDTITLE)
+		{
+			title = checkItem->text().latin1();
+		}
+		else if (checkItem->getType() == TeQtCheckListItem::LEGEND)
+		{
+			TeQtLegendItem *legendItem = (TeQtLegendItem*)checkItem;
+			pixmapVector.push_back(legendItem->pixmap(0));
+			labelVector.push_back(legendItem->text().latin1());
+		}
+	}
+}
+				
+TeQtCheckListItem* TeQtThemeItem::getLegendItem(TeLegendEntry* leg)
+{
+	vector<QListViewItem*> legendVector = getChildren();
+	unsigned int i;
+	for (i = 0; i < legendVector.size(); ++i)
+	{
+		TeQtCheckListItem *checkItem = (TeQtCheckListItem*)legendVector[i];
+
+		if (checkItem->getType() == TeQtCheckListItem::LEGEND)
+		{
+			TeQtLegendItem *legendItem = (TeQtLegendItem*)checkItem;
+			if(legendItem->legendEntry()->id() == leg->id())
+				return legendItem;
+		}
+	}
+	return (TeQtCheckListItem*)0;
+}
+
+void TeQtThemeItem::updateAlias()
+{
+	TeTheme* baseTheme = (TeTheme*)appTheme_->getTheme();
+	if(baseTheme->type() != TeTHEME)
+		return;
+
+	TeDatabase* db = baseTheme->layer()->database();
+	map<int, map<string, string> >& mapThemeAlias = db->mapThemeAlias();
+	map<string, string>& mapAA = mapThemeAlias[baseTheme->id()];
+
+	vector<QListViewItem*> itemVec = getChildren();
+
+	unsigned int i;
+	for (i = 0; i < itemVec.size(); ++i)
+	{
+		TeQtCheckListItem *checkItem = (TeQtCheckListItem*)itemVec[i];
+
+		if (checkItem->getType() == TeQtCheckListItem::LEGENDTITLE)
+		{
+			string attr, nattr;
+			if(baseTheme->grouping().groupMode_ != TeNoGrouping)
+			{
+				attr = baseTheme->grouping().groupAttribute_.name_;
+				nattr = baseTheme->grouping().groupNormAttribute_;
+			}
+
+			if(nattr.empty() || nattr == "NONE")
+			{
+				map<string, string>::iterator it = mapAA.find(attr);
+				if(it != mapAA.end())
+				{
+					string alias = it->second;
+					if(alias.empty())
+						checkItem->setText(0, attr.c_str());
+					else
+						checkItem->setText(0, alias.c_str());
+				}
+				else
+					checkItem->setText(0, attr.c_str());
+			}
+			else
+			{
+				string alias = attr;
+				map<string, string>::iterator it = mapAA.find(attr);
+				if(it != mapAA.end())
+					alias = it->second;
+
+				it = mapAA.find(nattr);
+				if(it != mapAA.end())
+					alias += "/" + it->second;
+				else
+					alias += "/" + nattr;
+
+				checkItem->setText(0, alias.c_str());
+			}
+		}
+		else if (checkItem->getType() == TeQtCheckListItem::CHART)
+		{
+			string attr = ((TeQtChartItem*)checkItem)->name();
+			map<string, string>::iterator it = mapAA.find(attr);
+			if(it != mapAA.end())
+			{
+				string alias = it->second;
+				checkItem->setText(0, alias.c_str());
+			}
+			else
+				checkItem->setText(0, attr.c_str());
+		}
+	}
+}
+
diff --git a/src/terralib/drivers/qt/TeQtThemeItem.h b/src/terralib/drivers/qt/TeQtThemeItem.h
new file mode 100755
index 0000000..41665d9
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtThemeItem.h
@@ -0,0 +1,64 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#ifndef  __TERRALIB_INTERNAL_QTTHEMEITEM_H
+#define  __TERRALIB_INTERNAL_QTTHEMEITEM_H
+
+#include <TeQtCheckListItem.h>
+
+class TeAppTheme;
+class TeLegendEntry;
+
+
+class TeQtThemeItem : public TeQtCheckListItem
+{
+
+public:
+    TeQtThemeItem(QListViewItem *parent, QString text, TeAppTheme* appTheme);
+
+	~TeQtThemeItem () {}
+
+	void setThemeItemAsInvalid();
+
+	bool isThemeItemInvalid()
+	{ return invalidThemeItem_; }
+
+	TeAppTheme* getAppTheme()
+		{return appTheme_;}
+
+	void removeLegends();
+
+	void removeCharts();
+
+	void getLegends(vector<const QPixmap*>& pixmapVector, vector<string>& labels, string& title);
+
+	TeQtCheckListItem* getLegendItem(TeLegendEntry* leg);
+
+	void updateAlias();
+
+protected:
+	TeAppTheme *appTheme_;
+	bool invalidThemeItem_;
+
+	virtual void stateChange(bool);
+};
+
+#endif
diff --git a/src/terralib/drivers/qt/TeQtThemeItemFCT.cpp b/src/terralib/drivers/qt/TeQtThemeItemFCT.cpp
new file mode 100755
index 0000000..b55116c
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtThemeItemFCT.cpp
@@ -0,0 +1,197 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#include <TeQtThemeItemFCT.h>
+#include <TeQtViewsListViewFCT.h>
+#include <TeQtLegendItem.h>
+#include <TeQtChartItem.h>
+#include <TeDatabase.h>
+#include <qpixmap.h>
+//#include <../../../../../terraBase/src/ui/images/theme.xpm>
+#include <qimage.h>
+
+//Database item constructor
+TeQtThemeItem::TeQtThemeItem(QListViewItem *parent,
+	QString text, TeTheme *theme)
+	: TeQtCheckListItem(parent,text,CheckBox), theme_(theme)
+{
+	type_ = THEME;
+//	QPixmap p(theme_xpm);
+	QPixmap p = QPixmap::fromMimeSource("theme.bmp"); //(database_xpm);
+	setPixmap(0,p);
+	setRenameEnabled(0,true);
+	setSelected(false);
+	setEnabled(true);
+
+	order_ = theme->priority();
+}
+
+
+void TeQtThemeItem::stateChange(bool visible)
+{
+	TeQtViewsListView *lView = (TeQtViewsListView*)listView();
+	lView->checkItemStateChanged(this, visible);
+}
+
+
+void TeQtThemeItem::removeLegends()
+{
+	vector<QListViewItem*> legendVector = getChildren();
+	unsigned int i;
+	for (i = 0; i < legendVector.size(); ++i)
+	{
+		TeQtCheckListItem *checkItem = (TeQtCheckListItem*)legendVector[i];
+		if (checkItem->getType() == TeQtCheckListItem::LEGEND ||
+			checkItem->getType() == TeQtCheckListItem::LEGENDTITLE)
+			delete checkItem;
+	}
+}
+
+
+void TeQtThemeItem::removeCharts()
+{
+	vector<QListViewItem*> legendVector = getChildren();
+	unsigned int i;
+	for (i = 0; i < legendVector.size(); ++i)
+	{
+		TeQtCheckListItem *checkItem = (TeQtCheckListItem*)legendVector[i];
+		if (checkItem->getType() == TeQtCheckListItem::CHART ||
+			checkItem->getType() == TeQtCheckListItem::CHARTTITLE)
+			delete checkItem;
+	}
+}
+
+
+void TeQtThemeItem::getLegends(vector<const QPixmap*>& pixmapVector, vector<string>& labelVector, string& title)
+{
+	vector<QListViewItem*> legendVector = getChildren();
+	unsigned int i;
+	for (i = 0; i < legendVector.size(); ++i)
+	{
+		TeQtCheckListItem *checkItem = (TeQtCheckListItem*)legendVector[i];
+
+		if (checkItem->getType() == TeQtCheckListItem::LEGENDTITLE)
+		{
+			title = checkItem->text().latin1();
+		}
+		else if (checkItem->getType() == TeQtCheckListItem::LEGEND)
+		{
+			TeQtLegendItem *legendItem = (TeQtLegendItem*)checkItem;
+			pixmapVector.push_back(legendItem->pixmap(0));
+			labelVector.push_back(legendItem->text().latin1());
+		}
+	}
+}
+				
+TeQtCheckListItem* TeQtThemeItem::getLegendItem(TeLegendEntry* leg)
+{
+	vector<QListViewItem*> legendVector = getChildren();
+	unsigned int i;
+	for (i = 0; i < legendVector.size(); ++i)
+	{
+		TeQtCheckListItem *checkItem = (TeQtCheckListItem*)legendVector[i];
+
+		if (checkItem->getType() == TeQtCheckListItem::LEGEND)
+		{
+			TeQtLegendItem *legendItem = (TeQtLegendItem*)checkItem;
+			if(legendItem->legendEntry()->id() == leg->id())
+				return legendItem;
+		}
+	}
+	return (TeQtCheckListItem*)0;
+}
+
+void TeQtThemeItem::updateAlias()
+{
+	TeDatabase* db = theme_->layer()->database();
+	map<int, map<string, string> >& mapThemeAlias = db->mapThemeAlias();
+	map<string, string>& mapAA = mapThemeAlias[theme_->id()];
+
+	vector<QListViewItem*> itemVec = getChildren();
+
+	unsigned int i;
+	for (i = 0; i < itemVec.size(); ++i)
+	{
+		TeQtCheckListItem *checkItem = (TeQtCheckListItem*)itemVec[i];
+
+		if (checkItem->getType() == TeQtCheckListItem::LEGENDTITLE)
+		{
+			string attr, nattr;
+			if(theme_->grouping().groupMode_ != TeNoGrouping)
+			{
+				attr = theme_->grouping().groupAttribute_.name_;
+				nattr = theme_->grouping().groupNormAttribute_;
+			}
+
+			if(nattr.empty() || nattr == "NONE")
+			{
+				map<string, string>::iterator it = mapAA.find(attr);
+				if(it != mapAA.end())
+				{
+					string alias = it->second;
+					if(alias.empty())
+						checkItem->setText(0, attr.c_str());
+					else
+						checkItem->setText(0, alias.c_str());
+				}
+				else
+					checkItem->setText(0, attr.c_str());
+			}
+			else
+			{
+				string alias = attr;
+				map<string, string>::iterator it = mapAA.find(attr);
+				if(it != mapAA.end())
+					alias = it->second;
+
+				it = mapAA.find(nattr);
+				if(it != mapAA.end())
+					alias += "/" + it->second;
+				else
+					alias += "/" + nattr;
+
+				checkItem->setText(0, alias.c_str());
+			}
+		}
+		else if (checkItem->getType() == TeQtCheckListItem::CHART)
+		{
+			string attr = ((TeQtChartItem*)checkItem)->name();
+			map<string, string>::iterator it = mapAA.find(attr);
+			if(it != mapAA.end())
+			{
+				string alias = it->second;
+				checkItem->setText(0, alias.c_str());
+			}
+			else
+				checkItem->setText(0, attr.c_str());
+		}
+	}
+}
+
+void TeQtThemeItem::setTheme(TeTheme* theme) {
+	if(theme_ != NULL)
+		delete theme_;
+
+	theme_ = theme;
+}
+
+
+
diff --git a/src/terralib/drivers/qt/TeQtThemeItemFCT.h b/src/terralib/drivers/qt/TeQtThemeItemFCT.h
new file mode 100755
index 0000000..144a679
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtThemeItemFCT.h
@@ -0,0 +1,59 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#ifndef  __TERRALIB_INTERNAL_QTTHEMEITEM_H
+#define  __TERRALIB_INTERNAL_QTTHEMEITEM_H
+
+#include <TeQtCheckListItem.h>
+
+class TeTheme;
+class TeLegendEntry;
+
+
+class TeQtThemeItem : public TeQtCheckListItem
+{
+public:
+    TeQtThemeItem(QListViewItem *parent, QString text, TeTheme* theme);
+
+	~TeQtThemeItem () {}
+
+	TeTheme* getTheme()
+		{return theme_;}
+
+	void removeLegends();
+
+	void removeCharts();
+
+	void getLegends(vector<const QPixmap*>& pixmapVector, vector<string>& labels, string& title);
+
+	TeQtCheckListItem* getLegendItem(TeLegendEntry* leg);
+
+	void updateAlias();
+
+	void setTheme(TeTheme* theme);
+
+protected:
+	TeTheme *theme_;
+
+	virtual void stateChange(bool);
+};
+
+#endif
diff --git a/src/terralib/drivers/qt/TeQtViewItem.cpp b/src/terralib/drivers/qt/TeQtViewItem.cpp
new file mode 100755
index 0000000..87815e9
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtViewItem.cpp
@@ -0,0 +1,75 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#include <TeQtViewItem.h>
+#include <TeQtThemeItem.h>
+#include <qpixmap.h>
+#include <images/view.xpm>
+
+
+//Database item constructor
+TeQtViewItem::TeQtViewItem(QListView *parent,
+	QString text, TeView *view)
+	: TeQtCheckListItem(parent,text), view_(view)
+{
+	type_ = VIEW;
+//	QPixmap p("images/view.bmp");
+	QPixmap p((const char**)view_xpm);
+	setPixmap(0,p);
+	setRenameEnabled(0,true);
+	setSelected(false);
+	setEnabled(true);
+	setDragEnabled(false);
+}
+
+void	
+TeQtViewItem::resetAll()
+{
+	vector<QListViewItem*> childrenVector = this->getChildren();
+	for (int i = 0; i < (int)childrenVector.size(); ++i)
+		((TeQtThemeItem*)childrenVector[i])->setOn(false);
+}
+
+vector<TeQtThemeItem*> TeQtViewItem::getThemeItemVec()
+{
+	vector<TeQtThemeItem*> themeItemVec;
+
+	TeQtCheckListItem*	checkListItem;
+	TeQtThemeItem*	themeItem;
+
+	QListViewItemIterator it(this);
+	++it; // Lauro
+	while(it.current())
+	{
+		checkListItem = (TeQtCheckListItem*)it.current();
+		if (checkListItem->getType() == TeQtCheckListItem::THEME)
+		{
+			themeItem = (TeQtThemeItem*)it.current();
+			themeItemVec.push_back(themeItem);
+		}
+		else if(checkListItem->getType() == TeQtCheckListItem::VIEW) // Lauro
+			break; // Lauro
+
+		++it;
+	}
+
+	return themeItemVec;
+}
diff --git a/src/terralib/drivers/qt/TeQtViewItem.h b/src/terralib/drivers/qt/TeQtViewItem.h
new file mode 100755
index 0000000..21bdd40
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtViewItem.h
@@ -0,0 +1,58 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#ifndef  __TERRALIB_INTERNAL_QTVIEWITEM_H
+#define  __TERRALIB_INTERNAL_QQTVIEWITEM_H
+
+#include <TeQtCheckListItem.h>
+
+class TeQtThemeItem;
+
+class TeView;
+
+class TeQtViewItem : public TeQtCheckListItem
+{
+public:
+    TeQtViewItem(QListView *parent, QString text,
+				 TeView *view);
+
+	~TeQtViewItem () {}
+
+	int compare(QListViewItem * i, int col, bool ascending) const
+		{ return QListViewItem::compare(i, col, ascending); }
+
+	QString key(int col, bool ascending) const
+		{ return QListViewItem::key(col, ascending); }
+
+	TeView*	getView() {return view_;}
+
+	void setView(TeView *view)
+		{ view_ = view; }
+
+	void resetAll();
+
+	vector<TeQtThemeItem*> getThemeItemVec();
+
+protected:
+	TeView	*view_;
+};
+
+#endif
diff --git a/src/terralib/drivers/qt/TeQtViewItemFCT.cpp b/src/terralib/drivers/qt/TeQtViewItemFCT.cpp
new file mode 100755
index 0000000..22137db
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtViewItemFCT.cpp
@@ -0,0 +1,50 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#include <TeQtViewItemFCT.h>
+#include <TeQtThemeItemFCT.h>
+#include <qpixmap.h>
+//#include <../../../../../terraBase/src/ui/images/view.xpm>
+
+
+//Database item constructor
+TeQtViewItem::TeQtViewItem(QListView *parent,
+	QString text, TeView *view)
+	: TeQtCheckListItem(parent,text), view_(view)
+{
+	type_ = VIEW;
+//	QPixmap p("images/view.bmp");
+//	QPixmap p((const char**)view_xpm);
+	QPixmap p = QPixmap::fromMimeSource("view.bmp"); //(database_xpm);
+	setPixmap(0,p);
+	setRenameEnabled(0,true);
+	setSelected(false);
+	setEnabled(true);
+	setDragEnabled(false);
+}
+
+void	
+TeQtViewItem::resetAll()
+{
+	vector<QListViewItem*> childrenVector = this->getChildren();
+	for (int i = 0; i < (int)childrenVector.size(); ++i)
+		((TeQtThemeItem*)childrenVector[i])->setOn(false);
+}
diff --git a/src/terralib/drivers/qt/TeQtViewItemFCT.h b/src/terralib/drivers/qt/TeQtViewItemFCT.h
new file mode 100755
index 0000000..16651c9
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtViewItemFCT.h
@@ -0,0 +1,54 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#ifndef  __TERRALIB_INTERNAL_QTVIEWITEM_H
+#define  __TERRALIB_INTERNAL_QQTVIEWITEM_H
+
+#include <TeQtCheckListItem.h>
+
+class TeView;
+
+class TeQtViewItem : public TeQtCheckListItem
+{
+public:
+    TeQtViewItem(QListView *parent, QString text,
+				 TeView *view);
+
+	~TeQtViewItem () {}
+
+	int compare(QListViewItem * i, int col, bool ascending) const
+		{ return QListViewItem::compare(i, col, ascending); }
+
+	QString key(int col, bool ascending) const
+		{ return QListViewItem::key(col, ascending); }
+
+	TeView*	getView() {return view_;}
+
+	void setView(TeView *view)
+		{ view_ = view; }
+
+	void resetAll();
+
+protected:
+	TeView	*view_;
+};
+
+#endif
diff --git a/src/terralib/drivers/qt/TeQtViewsListView.cpp b/src/terralib/drivers/qt/TeQtViewsListView.cpp
new file mode 100755
index 0000000..973e23a
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtViewsListView.cpp
@@ -0,0 +1,921 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright ? 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#include "TeQtViewsListView.h"
+#include "TeQtCheckListItem.h"
+#include "TeQtViewItem.h"
+#include "TeQtThemeItem.h"
+#include "TeAppTheme.h"
+#include "TeWaitCursor.h"
+#include <qapplication.h>
+#include <qpopupmenu.h>
+#include <qdragobject.h>
+#include <list>
+
+TeQtViewsListView::TeQtViewsListView(QWidget *parent, const char *name)
+		: QListView(parent, name)
+{
+	pressedThemeItem_ = 0;
+	currentViewItem_ = 0;
+	currentThemeItem_ = 0;
+	refThemeItemForVis_ = 0;
+	rightMouseWasClicked_ = false;
+	checkItemStateChanged_ = false;
+	leftButtonPressed_ = false;
+	drag_ = false;
+
+	setSelectionMode(QListView::Multi);
+    setRootIsDecorated( TRUE );
+//	setAcceptDrops(true);
+	viewport()->setAcceptDrops(true);
+
+	popupMenu_ = new QPopupMenu(this);
+
+	//Mounting the brushStyleMap
+	brushStyleMap_[TePolyTypeTransparent] = Qt::NoBrush;
+	brushStyleMap_[TePolyTypeFill] = Qt::SolidPattern;
+	brushStyleMap_[TePolyTypeHorizontal] = Qt::HorPattern;
+	brushStyleMap_[TePolyTypeVertical] = Qt::VerPattern;
+	brushStyleMap_[TePolyTypeFDiagonal] = Qt::FDiagPattern;
+	brushStyleMap_[TePolyTypeBDiagonal] = Qt::BDiagPattern;
+	brushStyleMap_[TePolyTypeCross] = Qt::CrossPattern;
+	brushStyleMap_[TePolyTypeDiagonalCross] = Qt::DiagCrossPattern;
+
+	//Mounting the penStyleMap
+	penStyleMap_[TeLnTypeContinuous] = Qt::SolidLine;
+	penStyleMap_[TeLnTypeDashed] = Qt::DashLine;
+	penStyleMap_[TeLnTypeDotted] = Qt::DotLine;
+	penStyleMap_[TeLnTypeDashDot] = Qt::DashDotLine;
+	penStyleMap_[TeLnTypeDashDotDot] = Qt::DashDotDotLine;
+	penStyleMap_[TeLnTypeNone] = Qt::NoPen;
+
+	// rename action
+	setDefaultRenameAction(QListView::Accept);
+
+	connect(this,SIGNAL(clicked(QListViewItem*)),
+			this,SLOT(clicked(QListViewItem*)));
+	connect(this,SIGNAL(contextMenuRequested(QListViewItem*,const QPoint&, int)),
+		    this,SLOT(contextMenuRequested(QListViewItem*,const QPoint&, int)));
+}
+
+
+TeQtViewsListView::~TeQtViewsListView()
+{
+	if (popupMenu_)
+		delete popupMenu_;
+}
+
+
+void TeQtViewsListView::selectItem(QListViewItem *item)
+{
+	checkItemStateChanged_ = false;
+	rightMouseWasClicked_ = false;
+	clicked(item);
+}
+
+
+void TeQtViewsListView::selectViewItem(TeView *view)
+{
+	if (view == 0)
+		return;
+
+	QListViewItem *child = firstChild();
+    while (child)
+	{
+		TeQtViewItem *viewItem = (TeQtViewItem*)child;
+		if (viewItem->getView() == view)
+		{
+			if (viewItem == currentViewItem_)
+				break;
+			else
+			{
+				unselectAllItems();
+				child->setSelected(true);
+				child->repaint();
+				currentViewItem_ = viewItem;
+				currentThemeItem_ = 0;
+				emit itemChanged(child);
+				return;
+			}
+		}
+        child = child->nextSibling();
+	}
+}
+
+
+TeQtViewItem* TeQtViewsListView::getViewItem(TeView *view)
+{
+	if (view == 0)
+		return 0;
+
+	QListViewItem *child = firstChild();
+    while (child)
+	{
+		TeQtViewItem *viewItem = (TeQtViewItem*)child;
+		if (viewItem->getView() == view)
+			return viewItem;
+		else
+			child = child->nextSibling();
+	}
+	return 0;
+}
+
+TeQtViewItem* TeQtViewsListView::getViewItem(TeQtThemeItem *themeItem)
+{
+	if (themeItem == 0)
+		return 0;
+
+	TeQtViewItem *viewItem = (TeQtViewItem*)themeItem->parent();
+
+	return viewItem;
+}
+
+
+TeQtThemeItem* TeQtViewsListView::getThemeItem(TeAppTheme* appTheme)
+{
+	if (appTheme == 0)
+		return 0;
+
+	QListViewItem *item;
+	QListViewItemIterator it(this);
+	item = it.current();
+	while(item)
+	{
+		TeQtCheckListItem *checkListItem = (TeQtCheckListItem*)item;
+		if (checkListItem->getType() == TeQtCheckListItem::THEME)
+		{
+			TeQtThemeItem* themeItem = (TeQtThemeItem*)item;
+			if (themeItem->getAppTheme() == appTheme)
+					return themeItem;
+		}
+		it++;
+		item = it.current();
+	}
+	return 0;
+}
+
+TeQtThemeItem* TeQtViewsListView::getThemeItem(int themeId)
+{
+	QListViewItem *item;
+	QListViewItemIterator it(this);
+	item = it.current();
+	while(item)
+	{
+		TeQtCheckListItem *checkListItem = (TeQtCheckListItem*)item;
+		if (checkListItem->getType() == TeQtCheckListItem::THEME)
+		{
+			TeQtThemeItem* themeItem = (TeQtThemeItem*)item;
+			if (themeItem->getAppTheme()->getTheme()->id() == themeId)
+					return themeItem;
+		}
+		it++;
+		item = it.current();
+	}
+	return 0;
+}
+
+
+void TeQtViewsListView::removeViewItem(TeView *view)
+{
+	QListViewItem *item;
+
+	QListViewItemIterator it(this);
+	item = it.current();
+	while(item)
+	{
+		TeQtCheckListItem *checkListItem = (TeQtCheckListItem*)item;
+		if (checkListItem->getType() == TeQtCheckListItem::VIEW)
+		{
+			TeQtViewItem* viewItem = (TeQtViewItem*)item;
+			if (viewItem->getView() == view)
+			{
+				if (viewItem == currentViewItem_)
+					currentViewItem_ = 0;
+				removeItem(item);
+				break;
+			}
+		}
+		it++;
+		item = it.current();
+	}	
+}
+
+
+void TeQtViewsListView::removeThemeItem(TeAppTheme* appTheme)
+{
+	QListViewItem *item;
+
+	QListViewItemIterator it(this);
+	item = it.current();
+	while(item)
+	{
+		TeQtCheckListItem *checkListItem = (TeQtCheckListItem*)item;
+		if (checkListItem->getType() == TeQtCheckListItem::THEME)
+		{
+			TeQtThemeItem* themeItem = (TeQtThemeItem*)item;
+			if (themeItem->getAppTheme() == appTheme)
+			{
+				if (themeItem == currentThemeItem_)
+					currentThemeItem_ = 0;
+				removeItem(item);
+				break;
+			}
+		}
+		it++;
+		item = it.current();
+	}	
+}
+
+void TeQtViewsListView::removeThemeItem(int themeId)
+{
+	QListViewItem *item;
+
+	QListViewItemIterator it(this);
+	item = it.current();
+	while(item)
+	{
+		TeQtCheckListItem *checkListItem = (TeQtCheckListItem*)item;
+		if (checkListItem->getType() == TeQtCheckListItem::THEME)
+		{
+			TeQtThemeItem* themeItem = (TeQtThemeItem*)item;
+			if (themeItem->getAppTheme()->getTheme()->id() == themeId)
+			{
+				if (themeItem == currentThemeItem_)
+					currentThemeItem_ = 0;
+				removeItem(item);
+				break;
+			}
+		}
+		it++;
+		item = it.current();
+	}	
+}
+
+void TeQtViewsListView::removeItem(QListViewItem *item)
+{
+	if (item == 0)
+		return;
+
+	TeQtCheckListItem *checkListItem = (TeQtCheckListItem*)item;
+
+	if(checkListItem->getType() == TeQtCheckListItem::VIEW)
+	{
+		TeQtViewItem* viewItem = (TeQtViewItem*)item;
+
+		vector<QListViewItem*> childrenVector;
+		childrenVector = viewItem->getChildren();
+
+		int i;
+		TeQtThemeItem *themeItem;
+		for (i = 0; i < (int)childrenVector.size(); ++i)
+		{
+			themeItem = (TeQtThemeItem*)childrenVector[i];
+			delete themeItem;
+		}
+
+		if (currentViewItem_ == viewItem)
+		{
+			currentViewItem_ = 0;
+			currentThemeItem_ = 0;
+		}
+		delete viewItem;
+	}
+	else if (checkListItem->getType() == TeQtCheckListItem::THEME)
+	{
+		TeQtThemeItem* themeItem = (TeQtThemeItem*)item;
+		if (currentThemeItem_ == themeItem)
+			currentThemeItem_ = 0;
+		delete themeItem;
+	}
+	else
+		delete item;
+}
+
+
+void TeQtViewsListView::checkItemStateChanged(QCheckListItem *checkListItem, bool visible)
+{
+	checkItemStateChanged_ = true;
+	emit checkListItemVisChanged(checkListItem, visible);
+}
+
+
+void TeQtViewsListView::openViewItems()
+{
+	QListViewItem *child = firstChild();
+	while (child)
+	{
+		setOpen(child, true);
+		child = child->nextSibling();
+	}
+}
+
+
+void TeQtViewsListView::reset()
+{
+	unselectAllItems();
+	currentViewItem_ = 0;
+	currentThemeItem_ = 0;
+}
+
+
+void TeQtViewsListView::setOn(QCheckListItem *item, bool visible)
+{
+	TeQtCheckListItem *checkListItem = (TeQtCheckListItem*)item;
+	if (checkListItem->getType() == TeQtCheckListItem::THEME)
+	{
+		TeQtThemeItem *themeItem = (TeQtThemeItem*)item;
+		themeItem->setOn(visible);
+		checkItemStateChanged_ = false;
+		emit checkListItemVisChanged(checkListItem, visible);
+	}
+}
+
+
+void TeQtViewsListView::clicked(QListViewItem *item)
+{
+	if(item == 0)
+		return;
+	if(drag_ && pressedThemeItem_)
+		return;
+
+	unselectAllItems();
+
+	TeQtCheckListItem *checkListItem = (TeQtCheckListItem*)item;
+
+	if(	checkItemStateChanged_ && (checkListItem->getType() == TeQtCheckListItem::THEME))
+	{
+		checkItemStateChanged_ = false;
+		TeQtThemeItem* themeItem = (TeQtThemeItem*)checkListItem;
+		if(themeItem->isThemeItemInvalid())
+			themeItem->setOn(false);
+
+		if(currentThemeItem_)
+		{
+			currentThemeItem_->parent()->setSelected(true);
+			currentThemeItem_->parent()->repaint();
+			currentThemeItem_->setSelected(true);
+			currentThemeItem_->repaint();
+			return;
+		}
+	}
+
+	if(checkListItem->getType() != TeQtCheckListItem::THEME)
+	{
+		if (rightMouseWasClicked_ == true || checkItemStateChanged_ == true ||
+			drag_ == true || checkListItem->getType() == TeQtCheckListItem::LEGEND ||
+			checkListItem->getType() == TeQtCheckListItem::CHART)
+		{
+			if (checkListItem->getType() == TeQtCheckListItem::LEGEND ||
+				checkListItem->getType() == TeQtCheckListItem::CHART)
+			{
+				checkListItem->setSelected(false);
+				checkListItem->repaint();
+			}
+
+			if (currentViewItem_ != 0)
+			{
+				currentViewItem_->setSelected(true);
+				currentViewItem_->repaint();
+			}
+
+			if (currentThemeItem_ != 0)
+			{
+				currentThemeItem_->setSelected(true);
+				currentThemeItem_->repaint();
+			}
+			rightMouseWasClicked_ = false;
+			checkItemStateChanged_ = false;
+			return;
+		}
+	}
+
+	if (checkListItem->getType() == TeQtCheckListItem::VIEW)
+	{
+		item->setSelected(true);
+		item->repaint();
+
+		TeQtViewItem *viewItem = (TeQtViewItem*)item;
+		if (viewItem != currentViewItem_)
+		{
+			currentViewItem_ = viewItem;
+			currentThemeItem_ = 0;
+			emit itemChanged(item);
+		}
+		else
+		{
+			if (currentThemeItem_ != 0)
+			{
+				currentThemeItem_->setSelected(true);
+				currentThemeItem_->repaint();
+			}
+		}
+	}
+	else if(checkListItem->getType() == TeQtCheckListItem::THEME)
+	{
+		TeQtThemeItem* themeItem = (TeQtThemeItem*)checkListItem;
+		if(themeItem->isThemeItemInvalid())
+			return;
+		item->parent()->setSelected(true);
+		item->parent()->repaint();
+		item->setSelected(true);
+		item->repaint();
+
+		TeQtViewItem *viewItem = (TeQtViewItem*)item->parent();
+		if (currentViewItem_ != viewItem && rightMouseWasClicked_ == false)
+		{
+			currentViewItem_ = viewItem;
+			emit itemChanged(item->parent());
+		}
+
+		themeItem = (TeQtThemeItem*)item;
+		if (themeItem != currentThemeItem_ && rightMouseWasClicked_ == false)
+		{
+			currentThemeItem_ = themeItem;
+			emit itemChanged(item);
+		}
+	}
+	rightMouseWasClicked_ = false;
+	checkItemStateChanged_ = false;
+}
+
+
+void TeQtViewsListView::contextMenuRequested(QListViewItem *item, const QPoint&, int)
+{
+	popupItem_ = (TeQtCheckListItem*)item;
+
+	unselectAllItems();
+	if (currentViewItem_)
+	{
+		currentViewItem_->setSelected(true);
+		currentViewItem_->repaint();
+	}
+
+	if (currentThemeItem_)
+	{
+		currentThemeItem_->setSelected(true);
+		currentThemeItem_->repaint();
+	}
+
+	emit popupSignal();	
+}
+
+void TeQtViewsListView::contentsMousePressEvent(QMouseEvent *e)
+{
+	rightMouseWasClicked_ = false;;
+	if (e->button() == RightButton)
+	{
+		rightMouseWasClicked_ = true;
+		popupMenu_->move(e->globalPos().x(), e->globalPos().y());
+	}
+	else if (e->button() == LeftButton)
+	{
+		QPoint p( contentsToViewport( e->pos() ) );
+		pressedPosition_ = p;
+		TeQtCheckListItem *item = (TeQtCheckListItem*)itemAt(p);
+		if (item != 0)
+		{
+			if(item->getType() == TeQtCheckListItem::THEME)
+			{
+				// don?t drag, if the user clicked into the root decoration of the item
+				int x = p.x();
+				int len = treeStepSize() * (item->depth() + (rootIsDecorated() ? 1 : 0)) + itemMargin();
+				if (x > len)
+//				if (p.x() > treeStepSize() * (item->depth() + (rootIsDecorated() ? 1 : 0)) + itemMargin())
+				{
+					pressedThemeItem_ = (TeQtThemeItem*)item;
+					themeOpen_ = isOpen(item);
+				}
+	
+				// Item was pressed inside the visibility box
+				if (x > len && x < len + 10)
+				{
+					if (e->state() & Qt::ShiftButton)
+					{
+						if (refThemeItemForVis_ == 0)
+							refThemeItemForVis_ = (TeQtThemeItem*)item;
+						else
+						{
+							TeQtThemeItem *themeItem = (TeQtThemeItem*)item;
+							if ((themeItem == refThemeItemForVis_) ||
+								(themeItem->parent() != refThemeItemForVis_->parent()))
+								return;
+
+							list<TeQtCheckListItem*> themeItemList;
+							list<TeQtCheckListItem*>::iterator it;
+							// find if the item pressed is below the reference item
+							TeQtCheckListItem *itemBelow = (TeQtCheckListItem*)refThemeItemForVis_->itemBelow();
+							while((itemBelow != 0) && (itemBelow->getType() == TeQtCheckListItem::THEME))
+							{
+								themeItemList.push_back(itemBelow);
+								if (itemBelow == themeItem)
+								{
+									for (it = themeItemList.begin(); it != themeItemList.end(); ++it)
+									{
+										TeQtCheckListItem *thItem = *it;
+										bool visible = refThemeItemForVis_->isOn();
+										setOn(thItem, visible);
+									}
+									refThemeItemForVis_ = 0;
+									return;
+								}
+								itemBelow = (TeQtCheckListItem*)itemBelow->itemBelow();
+							}
+
+							// find if the item pressed is above the reference item
+							themeItemList.clear();
+							TeQtCheckListItem *itemAbove = (TeQtCheckListItem*)refThemeItemForVis_->itemAbove();
+							while((itemAbove != 0) && (itemAbove->getType() == TeQtCheckListItem::THEME))
+							{
+								themeItemList.push_back(itemAbove);
+								if (itemAbove == themeItem)
+								{
+									for (it = themeItemList.begin(); it != themeItemList.end(); ++it)
+									{
+										TeQtCheckListItem* thItem = *it;
+										bool visible = refThemeItemForVis_->isOn();
+										setOn(thItem, visible);
+									}
+									refThemeItemForVis_ = 0;
+									return;
+								}
+								itemAbove = (TeQtCheckListItem*)itemAbove->itemAbove();
+							}
+						}
+					}
+					else
+						refThemeItemForVis_ = 0;
+				}
+			}
+			else
+			{
+				item->setSelected(false);
+				item->repaint();
+				pressedThemeItem_ = 0;
+			}
+			leftButtonPressed_ = true;
+		}
+	}
+
+	QListView::contentsMousePressEvent(e);
+}
+
+
+void TeQtViewsListView::contentsMouseReleaseEvent(QMouseEvent *e)
+{
+	leftButtonPressed_ = false;
+	QListView::contentsMouseReleaseEvent(e);
+
+	if(currentThemeItem_)
+	{
+		unselectAllItems();
+		currentThemeItem_->parent()->setSelected(true);
+		currentThemeItem_->parent()->repaint();
+		currentThemeItem_->setSelected(true);
+		repaint();
+	}
+	drag_ = false;
+}
+
+
+void TeQtViewsListView::unselectAllItems()
+{
+	QListViewItem *item;
+
+	QListViewItemIterator it(this);
+	item = it.current();
+	while(item)
+	{
+		setSelected(item,false);
+		item->repaint();
+		it++;
+		item = it.current();
+	}
+}
+
+
+void TeQtViewsListView::contentsMouseMoveEvent(QMouseEvent* e)
+{
+	QPoint p( contentsToViewport( e->pos() ) );
+    if (leftButtonPressed_)
+	{
+		QPoint pdif = pressedPosition_ - p;
+		if(abs(pdif.x()) > 2 || abs(pdif.y()) > 2)
+		{
+			drag_ = true;
+			leftButtonPressed_ = false;
+			if(pressedThemeItem_)
+			{
+				TeQtCheckListItem *item = (TeQtCheckListItem*)itemAt(p);
+				if (item && item->getType() == TeQtCheckListItem::THEME)
+				{
+	//				clicked(item);
+					QUriDrag* ud = new QUriDrag(viewport());
+					ud->drag();
+				}
+			}
+		}
+    }
+	if(drag_ && pressedThemeItem_)
+		pressedThemeItem_->setOpen(themeOpen_);
+}
+
+
+void TeQtViewsListView::contentsDragMoveEvent(QDragMoveEvent *e)
+{
+	if(pressedThemeItem_)
+		pressedThemeItem_->setOpen(themeOpen_);
+
+	if(e->source() != viewport())
+	{
+		e->ignore();
+		e->acceptAction(false);
+		return;
+	}
+
+    QPoint p = contentsToViewport(((QDragMoveEvent*)e)->pos());
+    TeQtCheckListItem *item = (TeQtCheckListItem*)itemAt(p);
+    if (item)
+	{
+		if (p.x() < treeStepSize() * (item->depth() + (rootIsDecorated() ? 1 : 0)) + itemMargin())
+		{
+			e->ignore();
+			e->acceptAction(false);
+		}
+		else
+		{
+			if(item->getType() == TeQtCheckListItem::THEME || item->getType() == TeQtCheckListItem::VIEW)
+			{
+				e->accept();
+				e->acceptAction();
+			}
+			else
+			{
+				e->ignore();
+				e->acceptAction(false);
+				if(currentThemeItem_)
+				{
+					unselectAllItems();
+					currentThemeItem_->parent()->setSelected(true);
+					currentThemeItem_->parent()->repaint();
+					currentThemeItem_->setSelected(true);
+					repaint();
+				}
+			}
+		}
+    }
+	else
+	{
+		e->ignore();
+		e->acceptAction(false);
+	}
+}
+
+
+void TeQtViewsListView::contentsDropEvent(QDropEvent *e)
+{
+	if(e->source() != viewport())
+	{
+		e->ignore();
+		e->acceptAction(false);
+		pressedThemeItem_ = 0;
+		if(currentThemeItem_)
+		{
+			unselectAllItems();
+			currentThemeItem_->parent()->setSelected(true);
+			currentThemeItem_->parent()->repaint();
+			currentThemeItem_->setSelected(true);
+			repaint();
+		}
+		return;
+	}
+
+	int itemPriority;
+	TeQtThemeItem *themeItem;
+	bool viewChanged = false;
+
+    QPoint p = contentsToViewport(((QDragMoveEvent*)e)->pos());
+	TeQtCheckListItem *dropItem = (TeQtCheckListItem*)itemAt(p);
+
+	if (dropItem == 0)
+	{
+		e->ignore();
+		e->acceptAction(false);
+		pressedThemeItem_ = 0;
+		if(currentThemeItem_)
+		{
+			unselectAllItems();
+			currentThemeItem_->parent()->setSelected(true);
+			currentThemeItem_->parent()->repaint();
+			currentThemeItem_->setSelected(true);
+			repaint();
+		}
+		return;
+	}
+
+	if (dropItem == pressedThemeItem_)
+	{
+		e->ignore();
+		e->acceptAction(false);
+		pressedThemeItem_ = 0;
+		if(currentThemeItem_)
+		{
+			unselectAllItems();
+			currentThemeItem_->parent()->setSelected(true);
+			currentThemeItem_->parent()->repaint();
+			currentThemeItem_->setSelected(true);
+			repaint();
+		}
+		return;
+	}
+
+	e->accept();
+	e->acceptAction();
+
+	//Set the view item of the pressed item and the drop item
+	TeQtViewItem *pressedViewItem = (TeQtViewItem*)pressedThemeItem_->parent();
+	TeQtViewItem *dropViewItem;
+	if(dropItem->getType() == TeQtCheckListItem::THEME)
+		dropViewItem = (TeQtViewItem*)dropItem->parent();
+	else
+		dropViewItem = (TeQtViewItem*)dropItem;
+
+	//set a flag to indicate whether there was a view change
+	if (pressedViewItem != dropViewItem)
+		viewChanged = true;
+
+	//update the priorities and move the items accordingly
+	if (viewChanged)
+	{
+		vector<QListViewItem*> themeItemVector = dropViewItem->getChildren();
+		for (unsigned int i = 0; i < themeItemVector.size(); ++i)
+		{
+			themeItem = (TeQtThemeItem*)themeItemVector[i];
+			if(pressedThemeItem_->text(0) == themeItem->text(0))
+			{
+				emit dragDropItems(0, 0, 0);
+				pressedThemeItem_ = 0;
+				return;
+			}
+		}
+
+		if (dropItem->getType() == TeQtCheckListItem::THEME)
+		{
+			TeQtThemeItem *dropThemeItem = (TeQtThemeItem*)dropItem;
+			itemPriority = dropThemeItem->order();
+			pressedThemeItem_->order(itemPriority);
+			themeItem = dropThemeItem;
+		}
+		else
+		{
+			itemPriority = 0;
+			pressedThemeItem_->order(itemPriority);
+			themeItem = (TeQtThemeItem*)dropViewItem->firstChild();
+		}
+
+		while (themeItem)
+		{
+			themeItem->order(++itemPriority);
+			themeItem = (TeQtThemeItem*)themeItem->nextSibling();
+		}
+		pressedViewItem->takeItem(pressedThemeItem_);
+		dropViewItem->insertItem(pressedThemeItem_);
+	}
+	else
+	{
+		if (dropItem->getType() == TeQtCheckListItem::THEME)
+		{
+			TeQtThemeItem *dropThemeItem = (TeQtThemeItem*)dropItem;
+			int pressedItemPriority = pressedThemeItem_->order();
+			int droppedItemPriority = dropThemeItem->order();
+			if (pressedItemPriority < droppedItemPriority)
+			{
+				itemPriority = pressedItemPriority;
+				pressedThemeItem_->order(droppedItemPriority);
+				themeItem = (TeQtThemeItem*)pressedThemeItem_->nextSibling();
+				while (themeItem != dropThemeItem)
+				{
+					themeItem->order(itemPriority++);
+					themeItem = (TeQtThemeItem*)themeItem->nextSibling();
+				}
+				dropThemeItem->order(itemPriority);
+			}
+			else
+			{
+				itemPriority = droppedItemPriority;
+				pressedThemeItem_->order(itemPriority);
+				themeItem = (TeQtThemeItem*)dropThemeItem;
+
+				while (themeItem != pressedThemeItem_)
+				{
+					themeItem->order(++itemPriority);
+					themeItem = (TeQtThemeItem*)themeItem->nextSibling();
+				}
+			}
+			pressedThemeItem_->moveItem(dropThemeItem);
+		}
+		else
+		{
+			itemPriority = 0;
+			pressedThemeItem_->order(itemPriority);
+			themeItem = (TeQtThemeItem*)dropItem->firstChild();
+			while (themeItem != pressedThemeItem_)
+			{
+				themeItem->order(++itemPriority);
+				themeItem = (TeQtThemeItem*)themeItem->nextSibling();
+			}
+			pressedViewItem->takeItem(pressedThemeItem_);
+			pressedViewItem->insertItem(pressedThemeItem_);
+			dropViewItem->setOpen(true);
+		}
+	}
+
+	if (pressedViewItem != dropViewItem)
+	{
+		// the drag and drop theme items belong to different views
+		if (pressedThemeItem_ == currentThemeItem_)
+		{
+			currentViewItem_ = dropViewItem;
+			clicked(pressedThemeItem_);
+		}
+	}
+
+//	emit dragDropItems(pressedViewItem, dropViewItem);
+	emit dragDropItems(pressedThemeItem_, pressedViewItem, dropViewItem);
+	pressedThemeItem_->setOpen(themeOpen_);
+
+	pressedThemeItem_ = 0;
+
+	if(currentThemeItem_)
+	{
+		unselectAllItems();
+		currentThemeItem_->parent()->setSelected(true);
+		currentThemeItem_->parent()->repaint();
+		currentThemeItem_->setSelected(true);
+		repaint();
+	}
+}
+
+vector<TeQtViewItem*> TeQtViewsListView::getViewItemVec()
+{
+	vector<TeQtViewItem*> viewItemVec;
+
+	TeQtCheckListItem*	checkListItem;
+	TeQtViewItem*		viewItem;
+
+	QListViewItemIterator it(this);
+	while(it.current())
+	{
+		checkListItem = (TeQtCheckListItem*)it.current();
+		if (checkListItem->getType() == TeQtCheckListItem::VIEW)
+		{
+			viewItem = (TeQtViewItem*)it.current();
+			viewItemVec.push_back(viewItem);
+		}
+		++it;
+	}
+
+	return viewItemVec;
+}
+
+vector<TeQtThemeItem*> TeQtViewsListView::getThemeItemVec()
+{
+	vector<TeQtThemeItem*> themeItemVec;
+
+	TeQtCheckListItem*	checkListItem;
+	TeQtThemeItem*		themeItem;
+
+	QListViewItemIterator it(this);
+	while(it.current())
+	{
+		checkListItem = (TeQtCheckListItem*)it.current();
+		if (checkListItem->getType() == TeQtCheckListItem::THEME)
+		{
+			themeItem = (TeQtThemeItem*)it.current();
+			themeItemVec.push_back(themeItem);
+		}
+		++it;
+	}
+
+	return themeItemVec;
+}
+
+
+
diff --git a/src/terralib/drivers/qt/TeQtViewsListView.h b/src/terralib/drivers/qt/TeQtViewsListView.h
new file mode 100755
index 0000000..b19d451
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtViewsListView.h
@@ -0,0 +1,135 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#ifndef  __TERRALIB_INTERNAL_QTVIEWSLISTVIEW_H
+#define  __TERRALIB_INTERNAL_QTVIEWSLISTVIEW_H
+
+#include <qlistview.h>
+#include <TeDataTypes.h>
+
+class QPopupMenu;
+class TeView;
+class TeQtThemeItem;
+class TeQtViewItem;
+class TeQtCheckListItem;
+class TeAppTheme;
+
+class TeQtViewsListView : public QListView
+{
+	Q_OBJECT
+
+public:
+
+    TeQtViewsListView(QWidget *parent = 0, const char *name = 0);
+
+	~TeQtViewsListView();
+
+	TeQtViewItem* currentViewItem() 
+	{ return currentViewItem_; }
+
+	TeQtThemeItem* currentThemeItem() 
+	{ return currentThemeItem_; }
+
+	TeQtCheckListItem *popupItem()
+		{ return popupItem_; }
+
+	QPopupMenu* getPopupMenu()
+		{ return popupMenu_; }
+
+	void selectItem(QListViewItem *item);
+
+	void selectViewItem(TeView *view);
+
+	TeQtViewItem* getViewItem(TeView *view);
+
+	TeQtViewItem* getViewItem(TeQtThemeItem* themeItem);
+
+	TeQtThemeItem* getThemeItem(TeAppTheme* appTheme);
+
+	TeQtThemeItem* getThemeItem(int themeId);
+
+	void removeViewItem(TeView *view);
+
+	void removeThemeItem(TeAppTheme* appTheme);
+
+	void removeThemeItem(int themeId);
+
+	void removeItem(QListViewItem *item);
+
+	void checkItemStateChanged(QCheckListItem*, bool);
+
+	void setOpenViewItem(QCheckListItem *checkListItem, bool visible)
+		{ setOpen(checkListItem, visible); }
+
+	void openViewItems();
+
+	void reset();
+
+	void setOn(QCheckListItem*, bool);
+
+	vector<TeQtViewItem*> getViewItemVec();
+
+	vector<TeQtThemeItem*> getThemeItemVec();
+
+	map<TePolyBasicType, Qt::BrushStyle>& getBrushStyleMap() {return brushStyleMap_;}
+	map<TeLnBasicType, Qt::PenStyle>& getPenStyleMap() {return penStyleMap_;}
+
+signals:
+	void itemChanged(QListViewItem*);
+	void popupSignal();
+	void checkListItemVisChanged(QCheckListItem*, bool);
+	void dragDropItems(TeQtThemeItem*, TeQtViewItem*, TeQtViewItem*);
+
+protected slots:
+	void clicked(QListViewItem *item);
+	void contextMenuRequested(QListViewItem*, const QPoint&, int);
+
+protected:
+	TeQtViewItem		*currentViewItem_;
+	TeQtThemeItem		*currentThemeItem_;
+	bool				rightMouseWasClicked_;
+	bool				checkItemStateChanged_;
+	bool				drag_;
+	bool				themeOpen_;
+	bool				leftButtonPressed_;
+	QPoint				pressedPosition_;
+	TeQtCheckListItem*	popupItem_;
+	QPopupMenu*			popupMenu_;
+	map<TePolyBasicType, Qt::BrushStyle>	brushStyleMap_;
+	map<TeLnBasicType, Qt::PenStyle>		penStyleMap_;
+	TeQtThemeItem		*pressedThemeItem_;
+	TeQtCheckListItem	*refThemeItemForVis_;  //reference theme item for visibility of another one
+
+	void contentsMousePressEvent(QMouseEvent *e);
+
+	void contentsMouseReleaseEvent(QMouseEvent *e);
+
+	void contentsMouseMoveEvent(QMouseEvent* e);
+
+	void contentsDragMoveEvent(QDragMoveEvent *e);
+
+	void contentsDropEvent(QDropEvent *e);
+
+	void unselectAllItems();
+};
+
+
+#endif
diff --git a/src/terralib/drivers/qt/TeQtViewsListViewFCT.cpp b/src/terralib/drivers/qt/TeQtViewsListViewFCT.cpp
new file mode 100755
index 0000000..57f65e1
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtViewsListViewFCT.cpp
@@ -0,0 +1,885 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#include "TeQtViewsListViewFCT.h"
+#include "TeQtCheckListItem.h"
+#include "TeQtViewItemFCT.h"
+#include "TeQtThemeItemFCT.h"
+#include "TeWaitCursor.h"
+#include <qapplication.h>
+#include <qpopupmenu.h>
+#include <qdragobject.h>
+#include <list>
+
+#include "TeView.h"
+
+TeQtViewsListView::TeQtViewsListView(QWidget *parent, const char *name)
+		: QListView(parent, name)
+{
+	pressedThemeItem_ = 0;
+	currentViewItem_ = 0;
+	currentThemeItem_ = 0;
+	refThemeItemForVis_ = 0;
+	rightMouseWasClicked_ = false;
+	checkItemStateChanged_ = false;
+	leftButtonPressed_ = false;
+	drag_ = false;
+
+	setSelectionMode(QListView::Multi);
+    setRootIsDecorated( TRUE );
+//	setAcceptDrops(true);
+	viewport()->setAcceptDrops(true);
+
+	popupView_ = new QPopupMenu(this);
+	popupTheme_ = new QPopupMenu(this);
+	popupLegendTitle_ = new QPopupMenu(this);
+	popupLegend_ = new QPopupMenu(this);
+	popupChartTitle_ = new QPopupMenu(this);
+	popupChart_ = new QPopupMenu(this);
+	popupOutItem_ = new QPopupMenu(this);
+
+	//Mounting the brushStyleMap
+	brushStyleMap_[TePolyTypeTransparent] = Qt::NoBrush;
+	brushStyleMap_[TePolyTypeFill] = Qt::SolidPattern;
+	brushStyleMap_[TePolyTypeHorizontal] = Qt::HorPattern;
+	brushStyleMap_[TePolyTypeVertical] = Qt::VerPattern;
+	brushStyleMap_[TePolyTypeFDiagonal] = Qt::FDiagPattern;
+	brushStyleMap_[TePolyTypeBDiagonal] = Qt::BDiagPattern;
+	brushStyleMap_[TePolyTypeCross] = Qt::CrossPattern;
+	brushStyleMap_[TePolyTypeDiagonalCross] = Qt::DiagCrossPattern;
+
+	//Mounting the penStyleMap
+	penStyleMap_[TeLnTypeContinuous] = Qt::SolidLine;
+	penStyleMap_[TeLnTypeDashed] = Qt::DashLine;
+	penStyleMap_[TeLnTypeDotted] = Qt::DotLine;
+	penStyleMap_[TeLnTypeDashDot] = Qt::DashDotLine;
+	penStyleMap_[TeLnTypeDashDotDot] = Qt::DashDotDotLine;
+	penStyleMap_[TeLnTypeNone] = Qt::NoPen;
+
+	// rename action
+	setDefaultRenameAction(QListView::Accept);
+
+	connect(this,SIGNAL(clicked(QListViewItem*)),
+			this,SLOT(clicked(QListViewItem*)));
+	connect(this,SIGNAL(contextMenuRequested(QListViewItem*,const QPoint&, int)),
+		    this,SLOT(contextMenuRequested(QListViewItem*,const QPoint&, int)));
+}
+
+
+TeQtViewsListView::~TeQtViewsListView()
+{
+	if (popupView_)
+		delete popupView_;
+	if (popupTheme_)
+		delete popupTheme_;
+	if (popupLegendTitle_)
+		delete popupLegendTitle_;
+	if (popupLegend_)
+		delete popupLegend_;
+	if (popupChartTitle_)
+		delete popupChartTitle_;
+	if (popupChart_)
+		delete popupChart_;
+	if (popupOutItem_)
+		delete popupOutItem_;
+}
+
+
+void TeQtViewsListView::selectItem(QListViewItem *item)
+{
+	checkItemStateChanged_ = false;
+	clicked(item);
+}
+
+
+void TeQtViewsListView::selectViewItem(TeView *view)
+{
+	if (view == 0)
+		return;
+
+	QListViewItem *child = firstChild();
+    while (child)
+	{
+		TeQtViewItem *viewItem = (TeQtViewItem*)child;
+		if (viewItem->getView() == view)
+		{
+			if (viewItem == currentViewItem_)
+				break;
+			else
+			{
+				unselectAllItems();
+				child->setSelected(true);
+				child->repaint();
+				currentViewItem_ = viewItem;
+				currentThemeItem_ = 0;
+				emit itemChanged(child);
+				return;
+			}
+		}
+        child = child->nextSibling();
+	}
+}
+
+
+TeQtViewItem* TeQtViewsListView::getViewItem(TeView *view)
+{
+	if (view == 0)
+		return 0;
+
+	QListViewItem *child = firstChild();
+    while (child)
+	{
+		TeQtViewItem *viewItem = (TeQtViewItem*)child;
+		if (viewItem->getView() == view)
+			return viewItem;
+		else
+			child = child->nextSibling();
+	}
+	return 0;
+}
+
+
+TeQtThemeItem* TeQtViewsListView::getThemeItem(TeTheme *theme)
+{
+	if (theme == 0)
+		return 0;
+
+	QListViewItem *item;
+	QListViewItemIterator it(this);
+	item = it.current();
+	while(item)
+	{
+		TeQtCheckListItem *checkListItem = (TeQtCheckListItem*)item;
+		if (checkListItem->getType() == TeQtCheckListItem::THEME)
+		{
+			TeQtThemeItem* themeItem = (TeQtThemeItem*)item;
+			if (themeItem->getTheme()->id() == theme->id())
+					return themeItem;
+		}
+		it++;
+		item = it.current();
+	}
+	return 0;
+}
+
+
+TeQtThemeItem* TeQtViewsListView::getThemeItem(const int& themeId)
+{
+	QListViewItem *item;
+	QListViewItemIterator it(this);
+	item = it.current();
+	while(item)
+	{
+		TeQtCheckListItem *checkListItem = (TeQtCheckListItem*)item;
+		if (checkListItem->getType() == TeQtCheckListItem::THEME)
+		{
+			TeQtThemeItem* themeItem = (TeQtThemeItem*)item;
+			if (themeItem->getTheme()->id() == themeId)
+					return themeItem;
+		}
+		it++;
+		item = it.current();
+	}
+	return 0;
+}
+
+TeQtViewItem* TeQtViewsListView::getViewItem(const int& viewId) 
+{
+	QListViewItem *item;
+	QListViewItemIterator it(this);
+	item = it.current();
+	while(item)
+	{
+		TeQtCheckListItem *checkListItem = (TeQtCheckListItem*)item;
+        if (checkListItem->getType() == TeQtCheckListItem::VIEW)
+		{
+			TeQtViewItem* viewItem = (TeQtViewItem*)item;
+            if (viewItem->getView()->id() == viewId)
+            {
+				return viewItem;
+            }
+		}
+		it++;
+		item = it.current();
+	}
+
+    item = NULL;
+	return 0;
+}
+
+
+void TeQtViewsListView::removeViewItem(TeView *view)
+{
+	QListViewItem *item;
+
+	QListViewItemIterator it(this);
+	item = it.current();
+	while(item)
+	{
+		TeQtCheckListItem *checkListItem = (TeQtCheckListItem*)item;
+		if (checkListItem->getType() == TeQtCheckListItem::VIEW)
+		{
+			TeQtViewItem* viewItem = (TeQtViewItem*)item;
+			if (viewItem->getView() == view)
+			{
+				if (viewItem == currentViewItem_)
+					currentViewItem_ = 0;
+				removeItem(item);
+				break;
+			}
+		}
+		it++;
+		item = it.current();
+	}	
+}
+
+
+void TeQtViewsListView::removeThemeItem(TeTheme *theme)
+{
+	QListViewItem *item;
+
+	QListViewItemIterator it(this);
+	item = it.current();
+	while(item)
+	{
+		TeQtCheckListItem *checkListItem = (TeQtCheckListItem*)item;
+		if (checkListItem->getType() == TeQtCheckListItem::THEME)
+		{
+			TeQtThemeItem* themeItem = (TeQtThemeItem*)item;
+			if (themeItem->getTheme() == theme)
+			{
+				if (themeItem == currentThemeItem_)
+					currentThemeItem_ = 0;
+				removeItem(item);
+				break;
+			}
+		}
+		it++;
+		item = it.current();
+	}	
+}
+
+
+void TeQtViewsListView::removeItem(QListViewItem *item)
+{
+	if (item == 0)
+		return;
+
+	TeQtCheckListItem *checkListItem = (TeQtCheckListItem*)item;
+
+	if(checkListItem->getType() == TeQtCheckListItem::VIEW)
+	{
+		TeQtViewItem* viewItem = (TeQtViewItem*)item;
+
+		vector<QListViewItem*> childrenVector;
+		childrenVector = viewItem->getChildren();
+
+		int i;
+		TeQtThemeItem *themeItem;
+		for (i = 0; i < (int)childrenVector.size(); ++i)
+		{
+			themeItem = (TeQtThemeItem*)childrenVector[i];
+			delete themeItem;
+		}
+
+		if (currentViewItem_ == viewItem)
+		{
+			currentViewItem_ = 0;
+			currentThemeItem_ = 0;
+		}
+		delete viewItem;
+	}
+	else if (checkListItem->getType() == TeQtCheckListItem::THEME)
+	{
+		TeQtThemeItem* themeItem = (TeQtThemeItem*)item;
+		if (currentThemeItem_ == themeItem)
+			currentThemeItem_ = 0;
+		delete themeItem;
+	}
+	else
+		delete item;
+}
+
+
+void TeQtViewsListView::checkItemStateChanged(QCheckListItem *checkListItem, bool visible)
+{
+	checkItemStateChanged_ = true;
+	emit checkListItemVisChanged(checkListItem, visible);
+}
+
+
+void TeQtViewsListView::openViewItems()
+{
+	QListViewItem *child = firstChild();
+	while (child)
+	{
+		setOpen(child, true);
+		child = child->nextSibling();
+	}
+}
+
+
+void TeQtViewsListView::reset()
+{
+	unselectAllItems();
+	currentViewItem_ = 0;
+	currentThemeItem_ = 0;
+}
+
+
+void TeQtViewsListView::setOn(QCheckListItem *item, bool visible)
+{
+	TeQtCheckListItem *checkListItem = (TeQtCheckListItem*)item;
+	if (checkListItem->getType() == TeQtCheckListItem::THEME)
+	{
+		TeQtThemeItem *themeItem = (TeQtThemeItem*)item;
+		themeItem->setOn(visible);
+		checkItemStateChanged_ = false;
+		emit checkListItemVisChanged(checkListItem, visible);
+	}
+}
+
+
+void TeQtViewsListView::clicked(QListViewItem *item)
+{
+	if(item == 0)
+		return;
+	if(drag_ && pressedThemeItem_)
+		return;
+
+	unselectAllItems();
+
+	TeQtCheckListItem *checkListItem = (TeQtCheckListItem*)item;
+
+	if(	checkItemStateChanged_ && (checkListItem->getType() == TeQtCheckListItem::THEME))
+	{
+		checkItemStateChanged_ = false;
+		if(currentThemeItem_)
+		{
+			currentThemeItem_->parent()->setSelected(true);
+			currentThemeItem_->parent()->repaint();
+			currentThemeItem_->setSelected(true);
+			currentThemeItem_->repaint();
+			return;
+		}
+	}
+
+	if(checkListItem->getType() != TeQtCheckListItem::THEME)
+	{
+		if (rightMouseWasClicked_ == true || checkItemStateChanged_ == true ||
+			drag_ == true || checkListItem->getType() == TeQtCheckListItem::LEGEND ||
+			checkListItem->getType() == TeQtCheckListItem::CHART)
+		{
+			if (checkListItem->getType() == TeQtCheckListItem::LEGEND ||
+				checkListItem->getType() == TeQtCheckListItem::CHART)
+			{
+				checkListItem->setSelected(false);
+				checkListItem->repaint();
+			}
+
+			if (currentViewItem_ != 0)
+			{
+				currentViewItem_->setSelected(true);
+				currentViewItem_->repaint();
+			}
+
+			if (currentThemeItem_ != 0)
+			{
+				currentThemeItem_->setSelected(true);
+				currentThemeItem_->repaint();
+			}
+			rightMouseWasClicked_ = false;
+			checkItemStateChanged_ = false;
+			return;
+		}
+	}
+
+	if (checkListItem->getType() == TeQtCheckListItem::VIEW)
+	{
+		item->setSelected(true);
+		item->repaint();
+
+		TeQtViewItem *viewItem = (TeQtViewItem*)item;
+		if (viewItem != currentViewItem_)
+		{
+			currentViewItem_ = viewItem;
+			currentThemeItem_ = 0;
+			emit itemChanged(item);
+		}
+		else
+		{
+			if (currentThemeItem_ != 0)
+			{
+				currentThemeItem_->setSelected(true);
+				currentThemeItem_->repaint();
+			}
+		}
+	}
+	else if(checkListItem->getType() == TeQtCheckListItem::THEME)
+	{
+		item->parent()->setSelected(true);
+		item->parent()->repaint();
+		item->setSelected(true);
+		item->repaint();
+
+		TeQtViewItem *viewItem = (TeQtViewItem*)item->parent();
+		if (currentViewItem_ != viewItem && rightMouseWasClicked_ == false)
+		{
+			currentViewItem_ = viewItem;
+			emit itemChanged(item->parent());
+		}
+
+		TeQtThemeItem* themeItem = (TeQtThemeItem*)item;
+		if (themeItem != currentThemeItem_ && rightMouseWasClicked_ == false)
+		{
+			currentThemeItem_ = themeItem;
+			emit itemChanged(item);
+		}
+	}
+	rightMouseWasClicked_ = false;
+	checkItemStateChanged_ = false;
+}
+
+
+void TeQtViewsListView::contextMenuRequested(QListViewItem *item, const QPoint&, int)
+{
+	popupItem_ = (TeQtCheckListItem*)item;
+
+	unselectAllItems();
+	if (currentViewItem_)
+	{
+		currentViewItem_->setSelected(true);
+		currentViewItem_->repaint();
+	}
+
+	if (currentThemeItem_)
+	{
+		currentThemeItem_->setSelected(true);
+		currentThemeItem_->repaint();
+	}
+
+	emit popupSignal();	
+}
+
+void TeQtViewsListView::contentsMousePressEvent(QMouseEvent *e)
+{
+	rightMouseWasClicked_ = false;;
+	if (e->button() == RightButton)
+	{
+		rightMouseWasClicked_ = true;
+		popupView_->move(e->globalPos().x(), e->globalPos().y());
+		popupTheme_->move(e->globalPos().x(), e->globalPos().y());
+		popupLegendTitle_->move(e->globalPos().x(), e->globalPos().y());
+		popupLegend_->move(e->globalPos().x(), e->globalPos().y());
+		popupChartTitle_->move(e->globalPos().x(), e->globalPos().y());
+		popupChart_->move(e->globalPos().x(), e->globalPos().y());
+		popupOutItem_->move(e->globalPos().x(), e->globalPos().y());
+	}
+	else if (e->button() == LeftButton)
+	{
+		QPoint p( contentsToViewport( e->pos() ) );
+		pressedPosition_ = p;
+		TeQtCheckListItem *item = (TeQtCheckListItem*)itemAt(p);
+		if (item != 0)
+		{
+			if(item->getType() == TeQtCheckListItem::THEME)
+			{
+				// don�t drag, if the user clicked into the root decoration of the item
+				int x = p.x();
+				int len = treeStepSize() * (item->depth() + (rootIsDecorated() ? 1 : 0)) + itemMargin();
+				if (x > len)
+//				if (p.x() > treeStepSize() * (item->depth() + (rootIsDecorated() ? 1 : 0)) + itemMargin())
+				{
+					pressedThemeItem_ = (TeQtThemeItem*)item;
+					themeOpen_ = isOpen(item);
+				}
+	
+				// Item was pressed inside the visibility box
+				if (x > len && x < len + 10)
+				{
+					if (e->state() & Qt::ShiftButton)
+					{
+						if (refThemeItemForVis_ == 0)
+							refThemeItemForVis_ = (TeQtThemeItem*)item;
+						else
+						{
+							TeQtThemeItem *themeItem = (TeQtThemeItem*)item;
+							if ((themeItem == refThemeItemForVis_) ||
+								(themeItem->parent() != refThemeItemForVis_->parent()))
+								return;
+
+							list<TeQtCheckListItem*> themeItemList;
+							list<TeQtCheckListItem*>::iterator it;
+							// find if the item pressed is below the reference item
+							TeQtCheckListItem *itemBelow = (TeQtCheckListItem*)refThemeItemForVis_->itemBelow();
+							while((itemBelow != 0) && (itemBelow->getType() == TeQtCheckListItem::THEME))
+							{
+								themeItemList.push_back(itemBelow);
+								if (itemBelow == themeItem)
+								{
+									for (it = themeItemList.begin(); it != themeItemList.end(); ++it)
+									{
+										TeQtCheckListItem *thItem = *it;
+										bool visible = refThemeItemForVis_->isOn();
+										setOn(thItem, visible);
+									}
+									refThemeItemForVis_ = 0;
+									return;
+								}
+								itemBelow = (TeQtCheckListItem*)itemBelow->itemBelow();
+							}
+
+							// find if the item pressed is above the reference item
+							themeItemList.clear();
+							TeQtCheckListItem *itemAbove = (TeQtCheckListItem*)refThemeItemForVis_->itemAbove();
+							while((itemAbove != 0) && (itemAbove->getType() == TeQtCheckListItem::THEME))
+							{
+								themeItemList.push_back(itemAbove);
+								if (itemAbove == themeItem)
+								{
+									for (it = themeItemList.begin(); it != themeItemList.end(); ++it)
+									{
+										TeQtCheckListItem* thItem = *it;
+										bool visible = refThemeItemForVis_->isOn();
+										setOn(thItem, visible);
+									}
+									refThemeItemForVis_ = 0;
+									return;
+								}
+								itemAbove = (TeQtCheckListItem*)itemAbove->itemAbove();
+							}
+						}
+					}
+					else
+						refThemeItemForVis_ = 0;
+				}
+			}
+			else
+			{
+				item->setSelected(false);
+				item->repaint();
+				pressedThemeItem_ = 0;
+			}
+			leftButtonPressed_ = true;
+		}
+	}
+
+	QListView::contentsMousePressEvent(e);
+}
+
+
+void TeQtViewsListView::contentsMouseReleaseEvent(QMouseEvent *e)
+{
+	leftButtonPressed_ = false;
+	QListView::contentsMouseReleaseEvent(e);
+
+	if(currentThemeItem_)
+	{
+		unselectAllItems();
+		currentThemeItem_->parent()->setSelected(true);
+		currentThemeItem_->parent()->repaint();
+		currentThemeItem_->setSelected(true);
+		repaint();
+	}
+	drag_ = false;
+}
+
+
+void TeQtViewsListView::unselectAllItems()
+{
+	QListViewItem *item;
+
+	QListViewItemIterator it(this);
+	item = it.current();
+	while(item)
+	{
+		setSelected(item,false);
+		item->repaint();
+		it++;
+		item = it.current();
+	}
+}
+
+
+void TeQtViewsListView::contentsMouseMoveEvent(QMouseEvent* e)
+{
+	QPoint p( contentsToViewport( e->pos() ) );
+    if (leftButtonPressed_)
+	{
+		QPoint pdif = pressedPosition_ - p;
+		if(abs(pdif.x()) > 2 || abs(pdif.y()) > 2)
+		{
+			drag_ = true;
+			leftButtonPressed_ = false;
+			if(pressedThemeItem_)
+			{
+				TeQtCheckListItem *item = (TeQtCheckListItem*)itemAt(p);
+				if (item && item->getType() == TeQtCheckListItem::THEME)
+				{
+	//				clicked(item);
+					QUriDrag* ud = new QUriDrag(viewport());
+					ud->drag();
+				}
+			}
+		}
+    }
+	if(drag_ && pressedThemeItem_)
+		pressedThemeItem_->setOpen(themeOpen_);
+}
+
+
+void TeQtViewsListView::contentsDragMoveEvent(QDragMoveEvent *e)
+{
+	if(pressedThemeItem_)
+		pressedThemeItem_->setOpen(themeOpen_);
+
+	if(e->source() != viewport())
+	{
+		e->ignore();
+		e->acceptAction(false);
+		return;
+	}
+
+    QPoint p = contentsToViewport(((QDragMoveEvent*)e)->pos());
+    TeQtCheckListItem *item = (TeQtCheckListItem*)itemAt(p);
+    if (item)
+	{
+		if (p.x() < treeStepSize() * (item->depth() + (rootIsDecorated() ? 1 : 0)) + itemMargin())
+		{
+			e->ignore();
+			e->acceptAction(false);
+		}
+		else
+		{
+			if(item->getType() == TeQtCheckListItem::THEME || item->getType() == TeQtCheckListItem::VIEW)
+			{
+				e->accept();
+				e->acceptAction();
+			}
+			else
+			{
+				e->ignore();
+				e->acceptAction(false);
+				if(currentThemeItem_)
+				{
+					unselectAllItems();
+					currentThemeItem_->parent()->setSelected(true);
+					currentThemeItem_->parent()->repaint();
+					currentThemeItem_->setSelected(true);
+					repaint();
+				}
+			}
+		}
+    }
+	else
+	{
+		e->ignore();
+		e->acceptAction(false);
+	}
+}
+
+
+void TeQtViewsListView::contentsDropEvent(QDropEvent *e)
+{
+	if(e->source() != viewport())
+	{
+		e->ignore();
+		e->acceptAction(false);
+		pressedThemeItem_ = 0;
+		if(currentThemeItem_)
+		{
+			unselectAllItems();
+			currentThemeItem_->parent()->setSelected(true);
+			currentThemeItem_->parent()->repaint();
+			currentThemeItem_->setSelected(true);
+			repaint();
+		}
+		return;
+	}
+
+	int itemPriority;
+	TeQtThemeItem *themeItem;
+	bool viewChanged = false;
+
+    QPoint p = contentsToViewport(((QDragMoveEvent*)e)->pos());
+	TeQtCheckListItem *dropItem = (TeQtCheckListItem*)itemAt(p);
+
+	if (dropItem == 0)
+	{
+		e->ignore();
+		e->acceptAction(false);
+		pressedThemeItem_ = 0;
+		if(currentThemeItem_)
+		{
+			unselectAllItems();
+			currentThemeItem_->parent()->setSelected(true);
+			currentThemeItem_->parent()->repaint();
+			currentThemeItem_->setSelected(true);
+			repaint();
+		}
+		return;
+	}
+
+	if (dropItem == pressedThemeItem_)
+	{
+		e->ignore();
+		e->acceptAction(false);
+		pressedThemeItem_ = 0;
+		if(currentThemeItem_)
+		{
+			unselectAllItems();
+			currentThemeItem_->parent()->setSelected(true);
+			currentThemeItem_->parent()->repaint();
+			currentThemeItem_->setSelected(true);
+			repaint();
+		}
+		return;
+	}
+
+	e->accept();
+	e->acceptAction();
+
+	//Set the view item of the pressed item and the drop item
+	TeQtViewItem *pressedViewItem = (TeQtViewItem*)pressedThemeItem_->parent();
+	TeQtViewItem *dropViewItem;
+	if(dropItem->getType() == TeQtCheckListItem::THEME)
+		dropViewItem = (TeQtViewItem*)dropItem->parent();
+	else
+		dropViewItem = (TeQtViewItem*)dropItem;
+
+	//set a flag to indicate whether there was a view change
+	if (pressedViewItem != dropViewItem)
+		viewChanged = true;
+
+	//update the priorities and move the items accordingly
+	if (viewChanged)
+	{
+		vector<QListViewItem*> themeItemVector = dropViewItem->getChildren();
+		for (unsigned int i = 0; i < themeItemVector.size(); ++i)
+		{
+			themeItem = (TeQtThemeItem*)themeItemVector[i];
+			if(pressedThemeItem_->text(0) == themeItem->text(0))
+			{
+				emit dragDropItems(0, 0, 0);
+				pressedThemeItem_ = 0;
+				return;
+			}
+		}
+
+		if (dropItem->getType() == TeQtCheckListItem::THEME)
+		{
+			TeQtThemeItem *dropThemeItem = (TeQtThemeItem*)dropItem;
+			itemPriority = dropThemeItem->order();
+			pressedThemeItem_->order(itemPriority);
+			themeItem = dropThemeItem;
+		}
+		else
+		{
+			itemPriority = 0;
+			pressedThemeItem_->order(itemPriority);
+			themeItem = (TeQtThemeItem*)dropViewItem->firstChild();
+		}
+
+		while (themeItem)
+		{
+			themeItem->order(++itemPriority);
+			themeItem = (TeQtThemeItem*)themeItem->nextSibling();
+		}
+		pressedViewItem->takeItem(pressedThemeItem_);
+		dropViewItem->insertItem(pressedThemeItem_);
+	}
+	else
+	{
+		if (dropItem->getType() == TeQtCheckListItem::THEME)
+		{
+			TeQtThemeItem *dropThemeItem = (TeQtThemeItem*)dropItem;
+			int pressedItemPriority = pressedThemeItem_->order();
+			int droppedItemPriority = dropThemeItem->order();
+			if (pressedItemPriority < droppedItemPriority)
+			{
+				itemPriority = pressedItemPriority;
+				pressedThemeItem_->order(droppedItemPriority);
+				themeItem = (TeQtThemeItem*)pressedThemeItem_->nextSibling();
+				while (themeItem != dropThemeItem)
+				{
+					themeItem->order(itemPriority++);
+					themeItem = (TeQtThemeItem*)themeItem->nextSibling();
+				}
+				dropThemeItem->order(itemPriority);
+			}
+			else
+			{
+				itemPriority = droppedItemPriority;
+				pressedThemeItem_->order(itemPriority);
+				themeItem = (TeQtThemeItem*)dropThemeItem;
+
+				while (themeItem != pressedThemeItem_)
+				{
+					themeItem->order(++itemPriority);
+					themeItem = (TeQtThemeItem*)themeItem->nextSibling();
+				}
+			}
+			pressedThemeItem_->moveItem(dropThemeItem);
+		}
+		else
+		{
+			itemPriority = 0;
+			pressedThemeItem_->order(itemPriority);
+			themeItem = (TeQtThemeItem*)dropItem->firstChild();
+			while (themeItem != pressedThemeItem_)
+			{
+				themeItem->order(++itemPriority);
+				themeItem = (TeQtThemeItem*)themeItem->nextSibling();
+			}
+			pressedViewItem->takeItem(pressedThemeItem_);
+			pressedViewItem->insertItem(pressedThemeItem_);
+			dropViewItem->setOpen(true);
+		}
+	}
+
+	if (pressedViewItem != dropViewItem)
+	{
+		// the drag and drop theme items belong to different views
+		if (pressedThemeItem_ == currentThemeItem_)
+		{
+			currentViewItem_ = dropViewItem;
+			clicked(pressedThemeItem_);
+		}
+	}
+
+//	emit dragDropItems(pressedViewItem, dropViewItem);
+	emit dragDropItems(pressedThemeItem_, pressedViewItem, dropViewItem);
+	pressedThemeItem_->setOpen(themeOpen_);
+
+	pressedThemeItem_ = 0;
+
+	if(currentThemeItem_)
+	{
+		unselectAllItems();
+		currentThemeItem_->parent()->setSelected(true);
+		currentThemeItem_->parent()->repaint();
+		currentThemeItem_->setSelected(true);
+		repaint();
+	}
+}
+
+
+
diff --git a/src/terralib/drivers/qt/TeQtViewsListViewFCT.h b/src/terralib/drivers/qt/TeQtViewsListViewFCT.h
new file mode 100755
index 0000000..d14221f
--- /dev/null
+++ b/src/terralib/drivers/qt/TeQtViewsListViewFCT.h
@@ -0,0 +1,154 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#ifndef  __TERRALIB_INTERNAL_QTVIEWSLISTVIEW_H
+#define  __TERRALIB_INTERNAL_QTVIEWSLISTVIEW_H
+
+#include <qlistview.h>
+#include <TeDataTypes.h>
+#include "TeTheme.h"
+
+class QPopupMenu;
+class TeView;
+class TeQtThemeItem;
+class TeQtViewItem;
+class TeQtCheckListItem;
+//class TeTheme;
+
+class TeQtViewsListView : public QListView
+{
+	Q_OBJECT
+
+public:
+
+    TeQtViewsListView(QWidget *parent = 0, const char *name = 0);
+
+	~TeQtViewsListView();
+
+	TeQtViewItem* currentViewItem() 
+	{ return currentViewItem_; }
+
+	TeQtThemeItem* currentThemeItem() 
+	{ return currentThemeItem_; }
+
+	TeQtCheckListItem *popupItem()
+		{ return popupItem_; }
+
+	QPopupMenu* popupView()
+		{ return popupView_; }
+
+	QPopupMenu* popupTheme()
+		{ return popupTheme_; }
+
+	QPopupMenu* popupLegendTitle()
+		{ return popupLegendTitle_; }
+
+	QPopupMenu* popupLegend()
+		{ return popupLegend_; }
+
+	QPopupMenu* popupChartTitle()
+		{ return popupChartTitle_; }
+
+	QPopupMenu* popupChart()
+		{ return popupChart_; }
+
+	QPopupMenu* popupOutItem()
+		{ return popupOutItem_; }
+
+	void selectItem(QListViewItem *item);
+
+	void selectViewItem(TeView *view);
+
+	TeQtViewItem* getViewItem(TeView *view);
+
+	TeQtThemeItem* getThemeItem(TeTheme *theme);
+
+	TeQtThemeItem* getThemeItem(const int& themeId);
+
+	TeQtViewItem* getViewItem(const int& viewId);
+
+    void removeViewItem(TeView *view);
+
+	void removeThemeItem(TeTheme *theme);
+
+	void removeItem(QListViewItem *item);
+
+	void checkItemStateChanged(QCheckListItem*, bool);
+
+	void setOpenViewItem(QCheckListItem *checkListItem, bool visible)
+		{ setOpen(checkListItem, visible); }
+
+	void openViewItems();
+
+	void reset();
+
+	void setOn(QCheckListItem*, bool);
+
+	map<TePolyBasicType, Qt::BrushStyle>& getBrushStyleMap() {return brushStyleMap_;}
+	map<TeLnBasicType, Qt::PenStyle>& getPenStyleMap() {return penStyleMap_;}
+
+signals:
+	void itemChanged(QListViewItem*);
+	void popupSignal();
+	void checkListItemVisChanged(QCheckListItem*, bool);
+	void dragDropItems(TeQtThemeItem*, TeQtViewItem*, TeQtViewItem*);
+
+protected slots:
+	void clicked(QListViewItem *item);
+	void contextMenuRequested(QListViewItem*, const QPoint&, int);
+
+protected:
+	TeQtViewItem		*currentViewItem_;
+	TeQtThemeItem		*currentThemeItem_;
+	bool				rightMouseWasClicked_;
+	bool				checkItemStateChanged_;
+	bool				drag_;
+	bool				themeOpen_;
+	bool				leftButtonPressed_;
+	QPoint				pressedPosition_;
+	TeQtCheckListItem	*popupItem_;
+	QPopupMenu			*popupView_;
+	QPopupMenu			*popupTheme_;
+	QPopupMenu			*popupLegendTitle_;
+	QPopupMenu			*popupLegend_;
+	QPopupMenu			*popupChartTitle_;
+	QPopupMenu			*popupChart_;
+	QPopupMenu			*popupOutItem_;
+	map<TePolyBasicType, Qt::BrushStyle>	brushStyleMap_;
+	map<TeLnBasicType, Qt::PenStyle>		penStyleMap_;
+	TeQtThemeItem		*pressedThemeItem_;
+	TeQtCheckListItem	*refThemeItemForVis_;  //reference theme item for visibility of another one
+
+	void contentsMousePressEvent(QMouseEvent *e);
+
+	void contentsMouseReleaseEvent(QMouseEvent *e);
+
+	void contentsMouseMoveEvent(QMouseEvent* e);
+
+	void contentsDragMoveEvent(QDragMoveEvent *e);
+
+	void contentsDropEvent(QDropEvent *e);
+
+	void unselectAllItems();
+};
+
+
+#endif
diff --git a/src/terralib/drivers/qt/TeWaitCursor.cpp b/src/terralib/drivers/qt/TeWaitCursor.cpp
new file mode 100755
index 0000000..ea8d896
--- /dev/null
+++ b/src/terralib/drivers/qt/TeWaitCursor.cpp
@@ -0,0 +1,59 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#include "TeWaitCursor.h"
+#include <qapplication.h>
+
+TeWaitCursor::TeWaitCursor ()
+{
+	if(QApplication::overrideCursor())
+	{
+		if(QApplication::overrideCursor()->shape() != Qt::WaitCursor)
+			QApplication::setOverrideCursor( Qt::WaitCursor );
+	}
+	else
+		QApplication::setOverrideCursor( Qt::WaitCursor );
+}
+
+TeWaitCursor::~TeWaitCursor ()
+{
+	if(QApplication::overrideCursor())
+		QApplication::restoreOverrideCursor();
+}
+
+
+void TeWaitCursor::setWaitCursor ()
+{
+	if(QApplication::overrideCursor())
+	{
+		if(QApplication::overrideCursor()->shape() != Qt::WaitCursor)
+			QApplication::setOverrideCursor( Qt::WaitCursor );
+	}
+	else
+		QApplication::setOverrideCursor( Qt::WaitCursor );
+}
+
+void TeWaitCursor::resetWaitCursor ()
+{
+	if(QApplication::overrideCursor())
+		QApplication::restoreOverrideCursor();
+}
+
diff --git a/src/terralib/drivers/qt/TeWaitCursor.h b/src/terralib/drivers/qt/TeWaitCursor.h
new file mode 100755
index 0000000..c984ea5
--- /dev/null
+++ b/src/terralib/drivers/qt/TeWaitCursor.h
@@ -0,0 +1,52 @@
+/************************************************************************************
+ TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeWaitCursor.h
+    \brief This file supports the definition of a waiting cursor using the Qt toolkit
+*/
+#ifndef  __TERRALIB_INTERNAL_WAITCURSOR_H
+#define  __TERRALIB_INTERNAL_WAITCURSOR_H
+
+#include <qcursor.h>
+
+/** @defgroup QtDriver Interfaces to Qt Toolkit
+	@ingroup Drivers
+	TerraLib routines build on top of Qt Toolkit
+	@{
+*/
+//! A waiting cursor
+class TeWaitCursor : public QCursor  {
+public: 
+	//! Constructor
+	TeWaitCursor();
+	
+	//! Destructor
+	~TeWaitCursor();
+
+	//! Instantiate a waiting cursor
+	void setWaitCursor();
+
+	//! Reset the waiting cursor
+	void resetWaitCursor();
+};
+/** @} */
+#endif
diff --git a/src/terralib/drivers/qt/resultVisual.h b/src/terralib/drivers/qt/resultVisual.h
new file mode 100755
index 0000000..be1a875
--- /dev/null
+++ b/src/terralib/drivers/qt/resultVisual.h
@@ -0,0 +1,37 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#ifndef RESULTVISUAL_H
+#define RESULTVISUAL_H
+
+
+#include <qwidget.h>
+
+class ResultVisual : public QWidget
+{
+public:
+	ResultVisual(QWidget *parent=0, const char *name=0)
+		:QWidget(parent,name) {}
+
+	~ResultVisual() {}
+};
+
+#endif
diff --git a/src/terralib/drivers/qwt/TeQwtPlot.cpp b/src/terralib/drivers/qwt/TeQwtPlot.cpp
new file mode 100755
index 0000000..f5c79bc
--- /dev/null
+++ b/src/terralib/drivers/qwt/TeQwtPlot.cpp
@@ -0,0 +1,41 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#include "TeQwtPlot.h"
+#include <qcursor.h>
+
+TeQwtPlot::TeQwtPlot(QWidget *p)
+:QwtPlot(p)
+{
+	cursor_ = new TeQwtPlotPicker(canvas());
+
+	QCursor cursorShape(Qt::ArrowCursor);
+	canvas()->setCursor(cursorShape);
+}
+
+TeQwtPlot::TeQwtPlot(const QwtText &title, QWidget *p)
+:QwtPlot(title, p)
+{
+	cursor_ = new TeQwtPlotPicker(canvas());
+
+	QCursor cursorShape(Qt::ArrowCursor);
+	canvas()->setCursor(cursorShape);
+}
diff --git a/src/terralib/drivers/qwt/TeQwtPlot.h b/src/terralib/drivers/qwt/TeQwtPlot.h
new file mode 100755
index 0000000..a7aca8f
--- /dev/null
+++ b/src/terralib/drivers/qwt/TeQwtPlot.h
@@ -0,0 +1,50 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#ifndef TEQWTPLOT_H
+#define TEQWTPLOT_H
+
+#include <qwt_plot.h>
+#include <qevent.h>
+#include <qpainter.h>
+#include "TeQwtPlotPicker.h"
+
+class TeQwtPlot:public QwtPlot
+{
+    Q_OBJECT
+
+public:
+
+	TeQwtPlot(QWidget *p = 0);
+	TeQwtPlot(const QwtText &title, QWidget *p = NULL);
+
+	virtual ~TeQwtPlot() {delete cursor_;}
+
+	void showCursor(bool b) {cursor_->show(b);}
+	void zoomActive(bool b) {cursor_->zoomActive(b);}
+	void cursorMode(int m) {cursor_->mode(m);}
+	TeQwtPlotPicker* cursor() {return cursor_;}
+
+private:
+	TeQwtPlotPicker* cursor_;
+};
+
+#endif
diff --git a/src/terralib/drivers/qwt/TeQwtPlotCurve.cpp b/src/terralib/drivers/qwt/TeQwtPlotCurve.cpp
new file mode 100755
index 0000000..7dc3e3b
--- /dev/null
+++ b/src/terralib/drivers/qwt/TeQwtPlotCurve.cpp
@@ -0,0 +1,53 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#include "TeQwtPlotCurve.h"
+#include <qwt_scale_map.h>
+#include <qwt_painter.h>
+#include <qpainter.h>
+
+
+void TeQwtPlotCurve::drawCurve(QPainter *p, int style,
+        const QwtScaleMap &xMap, const QwtScaleMap &yMap,
+        int from, int to) const
+{
+	if(style == UserCurve)
+	{
+		int y0 = yMap.transform(baseline());
+		QRect rect;
+		int w = xMap.transform(x(1)) - xMap.transform(x(0));
+		int w2 = w/2;
+
+		for (int i = from; i <= to; i++)
+		{
+			const int xi = xMap.transform(x(i));
+			const int yi = yMap.transform(y(i));
+			if(y0 < yi)
+				rect = QRect(xi-w2, y0, w, yi-y0);
+			else
+				rect = QRect(xi-w2, yi, w, y0-yi);
+			p->fillRect(rect, brush());
+			p->drawRect(rect);
+		}
+	}
+	else
+		QwtPlotCurve::drawCurve(p, style, xMap, yMap, from, to);
+}
diff --git a/src/terralib/drivers/qwt/TeQwtPlotCurve.h b/src/terralib/drivers/qwt/TeQwtPlotCurve.h
new file mode 100755
index 0000000..18af2b8
--- /dev/null
+++ b/src/terralib/drivers/qwt/TeQwtPlotCurve.h
@@ -0,0 +1,46 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#ifndef TEQWTPLOTCURVE_H
+#define TEQWTPLOTCURVE_H
+
+#include <qwt_plot_curve.h>
+#include <qbrush.h>
+
+class TeQwtPlotCurve : public QwtPlotCurve
+{
+public:
+
+	explicit TeQwtPlotCurve():QwtPlotCurve(){}
+	explicit TeQwtPlotCurve(const QwtText &title):QwtPlotCurve(title){}
+	explicit TeQwtPlotCurve(const QString &title):QwtPlotCurve(title){}
+	explicit TeQwtPlotCurve(const QwtPlotCurve &c):QwtPlotCurve(c){}
+
+	virtual ~TeQwtPlotCurve(){}
+
+protected:
+
+    void drawCurve(QPainter *p, int style,
+        const QwtScaleMap &xMap, const QwtScaleMap &yMap,
+        int from, int to) const;
+};
+
+#endif
diff --git a/src/terralib/drivers/qwt/TeQwtPlotPicker.cpp b/src/terralib/drivers/qwt/TeQwtPlotPicker.cpp
new file mode 100755
index 0000000..76e1e74
--- /dev/null
+++ b/src/terralib/drivers/qwt/TeQwtPlotPicker.cpp
@@ -0,0 +1,225 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#include "TeQwtPlotPicker.h"
+#include <qcursor.h>
+
+TeQwtPlotPicker::TeQwtPlotPicker(QwtPlotCanvas *c)
+	: QwtPlotPicker(c)
+{
+	rect_ = QRect(0, 0, 10, 10);
+	restoreArea_ = false;
+	show_ = false;
+	zoomActive_ = false;
+	mode_ = scatter;
+	histoCursorH_ = 5;
+	QPen pen(Qt::red);
+	painter_.begin(c);
+	QRect r = c->frameRect();
+	painter_.setPen(pen);
+	c->setCursor(QCursor(Qt::ArrowCursor));
+	setTrackerMode(QwtPlotPicker::AlwaysOn);
+}
+
+TeQwtPlotPicker::TeQwtPlotPicker(int xAxis, int yAxis, QwtPlotCanvas *c)
+	: QwtPlotPicker(xAxis, yAxis, c)
+{
+	rect_ = QRect(0, 0, 10, 10);
+	restoreArea_ = false;
+	show_ = false;
+	zoomActive_ = false;
+	mode_ = scatter;
+	histoCursorH_ = 5;
+	QPen pen(Qt::red);
+	painter_.begin(c);
+	QRect r = c->frameRect();
+	painter_.setPen(pen);
+	c->setCursor(QCursor(Qt::ArrowCursor));
+	setTrackerMode(QwtPlotPicker::AlwaysOn);
+}
+
+TeQwtPlotPicker::TeQwtPlotPicker(int xAxis, int yAxis, int selectionFlags, DisplayMode trackerMode, QwtPlotCanvas *c)
+	: QwtPlotPicker(xAxis, yAxis, selectionFlags, NoRubberBand, trackerMode, c)
+{
+	rect_ = QRect(0, 0, 10, 10);
+	restoreArea_ = false;
+	show_ = false;
+	zoomActive_ = false;
+	mode_ = scatter;
+	histoCursorH_ = 5;
+	QPen pen(Qt::red);
+	painter_.begin(c);
+	QRect r = c->frameRect();
+	painter_.setPen(pen);
+	c->setCursor(QCursor(Qt::ArrowCursor));
+}
+
+void TeQwtPlotPicker::widgetMousePressEvent(QMouseEvent *e)
+{
+	if(show_ == false)
+		return;
+
+	p_ = e->pos();
+
+	QwtDoubleRect dr = invTransform(rect_);
+
+	int buttom = e->button();
+	int state = e->state();
+		
+	emit mousePressedSignal(buttom, state, dr);
+}
+
+void TeQwtPlotPicker::widgetMouseReleaseEvent(QMouseEvent *e)
+{
+	if(show_ == false)
+		return;
+
+	p_ = e->pos();
+}
+
+void TeQwtPlotPicker::widgetMouseMoveEvent(QMouseEvent *e)
+{
+	const int cursor = canvas()->cursor().shape();
+
+	if(zoomActive_)
+	{
+		if(cursor != (int)Qt::CrossCursor)
+			canvas()->setCursor(QCursor(Qt::CrossCursor));
+	}
+	else
+	{
+		if(cursor != (int)Qt::ArrowCursor)
+			canvas()->setCursor(QCursor(Qt::ArrowCursor));
+	}
+
+	if(show_ == false)
+		return;
+
+	int d = histoCursorH_;
+
+	QPixmap *pixmap = canvas()->paintCache();
+
+	if(restoreArea_ && pixmap)
+	{
+		if(mode_ == scatter)
+			bitBlt(canvas(), rect_.left(), rect_.top(), pixmap, rect_.left()-2, rect_.top()-2, rect_.width(), rect_.height(), Qt::CopyROP);
+		else
+		{
+			int y = rect_.center().y();
+			rect_.setRect(rect_.left(), y-d, rect_.width(), d+d);
+			bitBlt(canvas(), rect_.left(), rect_.top(), pixmap, rect_.left()-2, rect_.top()-2, rect_.width(), rect_.height()+1, Qt::CopyROP);
+		}
+	}
+
+//#ifdef WIN32
+	if(e->state() == Qt::AltButton)
+//#else
+//	if(e->state() == (Qt::AltButton | Qt::ControlButton))
+//#endif
+	{
+		if(p_ != e->pos())
+		{
+			int dx = e->pos().x() - p_.x();
+			int dy = e->pos().y() - p_.y();
+			rect_.setWidth(rect_.width() + dx);
+			if(rect_.width() < 3)
+				rect_.setWidth(3);
+
+			rect_.setHeight(rect_.height() + dy);
+			if(rect_.height() < 3)
+				rect_.setHeight(3);
+
+			int y = rect_.center().y();
+			if(mode_ == histog)
+				rect_.setRect(rect_.left(), y-d, rect_.width(), d+d);
+		}
+	}
+
+	p_ = e->pos();
+	if(mode_ == histog)
+		rect_.setRect(rect_.left(), p_.y()-d, rect_.width(), d+d);
+
+	rect_.moveCenter(p_);
+	QRect rc = canvas()->rect();
+	rc.setRect(2, 2, rc.right()-3, rc.bottom()-3);
+	QRect rec = rc.intersect(rect_);
+	painter_.setClipping(false);
+	if(mode_ == scatter)
+		painter_.drawRect(rec);
+	else
+	{
+		int xi = rec.left();
+		int xf = rec.right();
+		int cy = rec.center().y();
+		painter_.drawLine(xi, cy, xf, cy);
+		painter_.drawLine(xi, cy-d, xi, cy+d);
+		painter_.drawLine(xf, cy-d, xf, cy+d);		
+	}
+	restoreArea_ = true;
+}
+
+void TeQwtPlotPicker::show(bool b)
+{
+	int d = histoCursorH_;
+
+	QPixmap *pixmap = canvas()->paintCache();
+	if(show_ && restoreArea_ && pixmap)
+	{
+		if(mode_ == scatter)
+			bitBlt(canvas(), rect_.left(), rect_.top(), pixmap, rect_.left()-2, rect_.top()-2, rect_.width(), rect_.height(), Qt::CopyROP);
+		else
+		{
+			int y = rect_.center().y();
+			rect_.setRect(rect_.left(), y-d, rect_.width(), d+d);
+			bitBlt(canvas(), rect_.left(), rect_.top(), pixmap, rect_.left()-2, rect_.top()-2, rect_.width(), rect_.height()+1, Qt::CopyROP);
+		}
+	}
+
+	restoreArea_ = false;
+	show_ = b;
+
+	if(b)
+		canvas()->setCursor(QCursor(Qt::ArrowCursor));
+	else
+		canvas()->setCursor(QCursor(Qt::crossCursor));
+	setEnabled(b);
+}
+
+void TeQwtPlotPicker::mode(int m)
+{
+	int d = histoCursorH_;
+
+	QPixmap *pixmap = canvas()->paintCache();
+	if(restoreArea_ && show_ && pixmap)
+	{
+		if(mode_ == scatter)
+			bitBlt(canvas(), rect_.left(), rect_.top(), pixmap, rect_.left()-2, rect_.top()-2, rect_.width(), rect_.height(), Qt::CopyROP);
+		else
+		{
+			int y = rect_.center().y();
+			rect_.setRect(rect_.left(), y-d, rect_.width(), d+d);
+			bitBlt(canvas(), rect_.left(), rect_.top(), pixmap, rect_.left()-2, rect_.top()-2, rect_.width(), rect_.height()+1, Qt::CopyROP);
+		}
+	}
+
+	restoreArea_ = false;
+	mode_ = m;
+}
diff --git a/src/terralib/drivers/qwt/TeQwtPlotPicker.h b/src/terralib/drivers/qwt/TeQwtPlotPicker.h
new file mode 100755
index 0000000..6d5b9c9
--- /dev/null
+++ b/src/terralib/drivers/qwt/TeQwtPlotPicker.h
@@ -0,0 +1,72 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#ifndef TEQWTPLOTPICKER_H
+#define TEQWTPLOTPICKER_H
+
+#include <qwt_plot_picker.h>
+#include <qpainter.h>
+#include <qpixmap.h>
+
+class TeQwtPlotPicker:public QwtPlotPicker
+{
+    Q_OBJECT
+
+public:
+
+	enum CursorMode
+    {
+        scatter,
+        histog
+	};
+
+	TeQwtPlotPicker(QwtPlotCanvas *c);
+	TeQwtPlotPicker(int xAxis, int yAxis, QwtPlotCanvas *c);
+	TeQwtPlotPicker(int xAxis, int yAxis, int selectionFlags, DisplayMode trackerMode, QwtPlotCanvas *c);
+
+	virtual ~TeQwtPlotPicker() {}
+
+	void setRect(const QRect& r) {rect_ = r;}
+	QRect& getRect() {return rect_;}
+	void setPen(QPen p) {painter_.setPen(p);}
+	void show(bool b);
+	void mode(int m);
+	void zoomActive(bool b) {zoomActive_ = b;}
+
+protected:
+
+    void widgetMousePressEvent(QMouseEvent *);
+    void widgetMouseReleaseEvent(QMouseEvent *);
+    void widgetMouseMoveEvent(QMouseEvent *); 
+
+	QRect rect_;
+    QPoint p_;
+	QPainter painter_;
+	bool restoreArea_;
+	bool show_;
+	bool zoomActive_;
+	int mode_;
+	int histoCursorH_;
+
+signals:
+	void mousePressedSignal(int, int, QwtDoubleRect);
+};
+#endif
diff --git a/src/terralib/drivers/qwt/TeQwtPlotZoomer.cpp b/src/terralib/drivers/qwt/TeQwtPlotZoomer.cpp
new file mode 100755
index 0000000..835e48b
--- /dev/null
+++ b/src/terralib/drivers/qwt/TeQwtPlotZoomer.cpp
@@ -0,0 +1,192 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#include "TeQwtPlotZoomer.h"
+#include "TeQwtPlot.h"
+#include "TeUtils.h"
+#include <qcursor.h>
+#include <math.h>
+
+TeQwtPlotZoomer::TeQwtPlotZoomer(QwtPlotCanvas *c)
+	:QwtPlotZoomer(c)
+{
+}
+
+TeQwtPlotZoomer::TeQwtPlotZoomer(int xAxis, int yAxis, QwtPlotCanvas *c)
+	:QwtPlotZoomer(xAxis, yAxis, c)
+{
+}
+
+TeQwtPlotZoomer::TeQwtPlotZoomer(int xAxis, int yAxis, int selectionFlags,
+        DisplayMode trackerMode, QwtPlotCanvas *c)
+    :QwtPlotZoomer(xAxis, yAxis, selectionFlags, trackerMode, c)
+{
+}
+
+TeQwtPlotZoomer::~TeQwtPlotZoomer()
+{
+}
+    
+void TeQwtPlotZoomer::widgetKeyPressEvent(QKeyEvent *e)
+{
+	int key = e->key();
+	uint i = zoomRectIndex();
+	if(i > 0)
+	{
+		QwtDoubleRect zr = zoomStack()[0];
+		QwtDoubleRect r = zoomStack()[i];
+		QwtDoublePoint c = r.center();
+		QwtDoublePoint dh(0., r.height()/10.);
+		QwtDoublePoint dw(r.width()/10., 0.);
+
+		if(key == Qt::Key_Left)
+			c -= dw;
+		else if(key == Qt::Key_Right)
+			c += dw;
+		else if(key == Qt::Key_Up) // inverted
+			c += dh;
+		else if(key == Qt::Key_Down) // inverted
+			c -= dh;
+
+		QwtDoubleRect rr = r;
+		r.moveCenter(c);
+		if(zr.contains(r) == false)
+		{
+			if(key == Qt::Key_Left)
+				r.setRect(zr.left(), rr.top(), rr.width(), rr.height());
+			else if(key == Qt::Key_Right)
+				r.setRect(zr.right()-rr.width(), rr.top(), rr.width(), rr.height());
+			else if(key == Qt::Key_Up) // inverted
+				r.setRect(rr.left(), zr.bottom()-rr.height(), rr.width(), rr.height());
+			else if(key == Qt::Key_Down) // inverted
+				r.setRect(rr.left(), zr.top(), rr.width(), rr.height());
+		}
+
+		zoom(r);
+		emit enableNextZoomSignal(false);
+	}
+
+	QwtPlotZoomer::widgetKeyPressEvent(e);
+	if(key == Qt::Key_Escape)
+		emit enablePreviousZoomSignal(false);
+}
+
+void TeQwtPlotZoomer::backward()
+{
+	uint i = zoomRectIndex();
+	if (i > 0)
+		zoom(-1);
+}
+
+void TeQwtPlotZoomer::forward()
+{
+	uint i = zoomRectIndex();
+	if (i < zoomStack().size() - 1 )
+		zoom(+1);
+}
+
+
+void TeQwtPlotZoomer::setEnabledSlot(bool b)
+{
+	QwtPlotZoomer::setEnabled(b);
+
+	QCursor cursor;
+	if (b)
+		cursor.setShape(Qt::CrossCursor);
+	else
+		cursor.setShape(Qt::ArrowCursor);
+
+	canvas()->setCursor(cursor);
+}
+
+void TeQwtPlotZoomer::widgetMouseReleaseEvent(QMouseEvent* e)
+{
+	QwtPlotZoomer::widgetMouseReleaseEvent(e);
+	emit enableNextZoomSignal(false);
+
+	uint i = zoomRectIndex();
+	if(i == 1)
+		emit enablePreviousZoomSignal(true);	
+}
+
+QwtDoubleRect TeQwtPlotZoomer::adjustRect(const QwtDoubleRect& r)
+{
+	QwtDoubleRect rec;
+	double dx = r.width();
+	double ldx = log10(dx);
+	int idx = (int)ldx;
+	double dy = r.height();
+	double ldy = log10(dy);
+	int idy = (int)ldy;
+	
+	if(ldx < 0)
+		idx--;
+	if(ldy < 0)
+		idy--;
+
+	double k = pow(10., double(idx));
+	double v = r.left();
+	int a = TeRound(v / k);
+	double v2 = (double)a * k;
+	if(v2 > v)
+	{
+		a = TeRound(v / k - .5);
+		v2 = (double)a * k;
+	}
+	rec.setLeft(v2);
+
+	v = r.right();
+	a = TeRound(v / k);
+	v2 = (double)a * k;
+	if(v2 < v)
+	{
+		a = TeRound(v / k + .5);
+		v2 = (double)a * k;
+	}
+	rec.setRight(v2);
+
+	k = pow(10., double(idy));
+	v = r.bottom();
+	a = TeRound(v / k);
+	v2 = (double)a * k;
+	if(v2 < v)
+	{
+		a = TeRound(v / k + .5);
+		v2 = (double)a * k;
+	}
+	rec.setBottom(v2);
+
+	v = r.top();
+	a = TeRound(v / k);
+	v2 = (double)a * k;
+	if(v2 > v)
+	{
+		a = TeRound(v / k - .5);
+		v2 = (double)a * k;
+	}
+	rec.setTop(v2);
+
+	return rec;
+}
+
+
+
+
diff --git a/src/terralib/drivers/qwt/TeQwtPlotZoomer.h b/src/terralib/drivers/qwt/TeQwtPlotZoomer.h
new file mode 100755
index 0000000..396b387
--- /dev/null
+++ b/src/terralib/drivers/qwt/TeQwtPlotZoomer.h
@@ -0,0 +1,58 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases
+using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+// vim: expandtab
+
+#ifndef TEQWTPLOTZOOMER_H
+#define TEQWTPLOTZOOMER_H
+
+#include <qwt_plot_zoomer.h>
+
+class TeQwtPlotZoomer: public QwtPlotZoomer
+{
+	Q_OBJECT
+
+public:
+    TeQwtPlotZoomer(QwtPlotCanvas *);
+    TeQwtPlotZoomer(int xAxis, int yAxis, QwtPlotCanvas *);
+    TeQwtPlotZoomer(int xAxis, int yAxis, int selectionFlags,
+        DisplayMode trackerMode, QwtPlotCanvas *);
+	virtual ~TeQwtPlotZoomer();
+
+	QwtDoubleRect adjustRect(const QwtDoubleRect&);
+
+signals:
+	void enablePreviousZoomSignal(bool);
+	void enableNextZoomSignal(bool);
+
+public slots:
+    void forward();
+    void backward();
+	void setEnabledSlot(bool);
+
+protected:
+    void widgetKeyPressEvent(QKeyEvent *);
+	void widgetMouseReleaseEvent(QMouseEvent *);
+
+};
+
+            
+#endif
diff --git a/src/terralib/drivers/shapelib/TeDriverSHPDBF.cpp b/src/terralib/drivers/shapelib/TeDriverSHPDBF.cpp
new file mode 100755
index 0000000..e183f3c
--- /dev/null
+++ b/src/terralib/drivers/shapelib/TeDriverSHPDBF.cpp
@@ -0,0 +1,2413 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+
+// STL 
+#include <string>
+#include <iostream>
+#include <vector>
+#include <list>
+#include <map>
+using namespace std;
+
+#include <assert.h>
+
+#ifdef WIN32
+#include <io.h>
+#else
+#include <unistd.h>
+#endif
+
+
+// TerraLib
+
+#include "TeDriverSHPDBF.h"
+#include "TeTable.h"
+#include "TeException.h"
+#include "TeUtils.h"
+#include "TeGeometry.h"
+#include "TeGeometryAlgorithms.h"
+#include "TeLayer.h"
+#include "TeProgress.h"
+#include "TeDatabase.h"
+#include "TeAsciiFile.h"
+
+// from SHAPELIB
+#include "shapefil.h" 
+
+bool
+TeGetSHPInfo(std::string shpfileName, unsigned int& nShapes, TeBox& box, TeGeomRep& rep)
+{
+	nShapes = 0;
+	rep = TeGEOMETRYNONE;
+	box = TeBox();
+
+	SHPHandle	hSHP;
+	hSHP = SHPOpen( shpfileName.c_str(), "rb" );
+
+	if( hSHP == 0 )
+		return false;
+
+	int		nShapeType, nentities=0;
+	double 	adfMinBound[4], adfMaxBound[4];
+
+	SHPGetInfo(hSHP, &nentities, &nShapeType, adfMinBound, adfMaxBound);
+	nShapes = nentities;
+	
+	box.x1_ = adfMinBound[0];
+	box.y1_ = adfMinBound[1];
+	box.x2_ = adfMaxBound[0];
+	box.y2_ = adfMaxBound[1];
+
+	switch (nShapeType) 
+	{
+		case SHPT_NULL:
+			rep = TeGEOMETRYNONE;
+		break;
+		// --- point geometries ---
+		case SHPT_POINTZ:	
+		case SHPT_MULTIPOINTZ:
+		case SHPT_POINTM:
+		case SHPT_MULTIPOINTM:
+		case SHPT_POINT:
+		case SHPT_MULTIPOINT:
+			rep = TePOINTS;
+		break;
+		// --- line geometries ---
+		case SHPT_ARCZ:
+		case SHPT_ARCM:
+		case SHPT_ARC:
+			rep = TeLINES;
+		break;
+		// --- polygon geometries ---
+		case SHPT_POLYGON:
+		case SHPT_POLYGONM:
+		case SHPT_POLYGONZ:
+			rep = TePOLYGONS;
+	}
+	SHPClose(hSHP);
+	return true;
+}
+
+bool
+TeSTOSetBuildSHP(TeSTElementSet& stoset, const string& fileName)
+{
+	// Read some information about the shapefile
+	string filePrefix = TeGetName(fileName.c_str());
+	string shpfileName = filePrefix + ".shp";
+
+	SHPHandle	hSHP;
+	hSHP = SHPOpen( shpfileName.c_str(), "rb" );
+
+	if( hSHP == 0 )
+		return false;
+
+	int		nShapeType, nEntities;
+	double 	adfMinBound[4], adfMaxBound[4];
+
+	SHPGetInfo(hSHP, &nEntities, &nShapeType, adfMinBound, adfMaxBound);
+
+	string dbffileName = filePrefix + ".dbf";
+    	DBFHandle hDBF = DBFOpen( dbffileName.c_str(), "rb" );
+    	if( hDBF == 0  || DBFGetFieldCount(hDBF) == 0)
+		return false;
+    
+	int natt = DBFGetFieldCount(hDBF);
+	TeAttributeList attList;
+	TeReadDBFAttributeList(shpfileName, attList);
+
+	TeAttributeRep repobjid;
+	repobjid.name_ = "object_id";
+	repobjid.numChar_ = 16;
+
+	TeAttribute attobjid;
+	attobjid.rep_ = repobjid;
+
+	TeProperty propobjid;
+	propobjid.attr_ = attobjid;
+	
+	int i,n;
+	SHPObject* psShape;
+	for (i=0; i<nEntities; i++)
+	{
+		string objectid = Te2String(i);
+		TeSTInstance curObj;
+		curObj.objectId(objectid);
+
+		TePropertyVector prop;
+		psShape = SHPReadObject(hSHP,i);
+		if (TeDecodeShape(psShape,curObj.geometries(),objectid))
+		{
+			propobjid.value_ = objectid;
+			prop.push_back(propobjid);
+			for(n=0;n<natt;n++)
+			{
+				string value = DBFReadStringAttribute(hDBF,i,n);
+				TeProperty p;
+				p.attr_ = attList[n];
+				p.value_ = value;
+				prop.push_back(p);
+			}
+			curObj.properties(prop);
+			stoset.insertSTInstance(curObj);
+			curObj.theme(0);
+		}
+		SHPDestroyObject(psShape);
+	}
+	return true;
+} 
+
+TeLayer* TeImportShape(const string& shpFileName, TeDatabase* db, const string& layerName)
+{
+	if (!db || shpFileName.empty()) 
+		return 0;
+
+	// check if format is complete (SHP, SHX e DBF files exist)
+	string filePrefix = TeGetName(shpFileName.c_str());
+	string ftest = filePrefix + ".dbf";
+	if (access(ftest.c_str(),04) == -1)
+	{
+		ftest = filePrefix + ".DBF";
+		if (access(ftest.c_str(),04) == -1)
+			return 0;
+	}
+	ftest = filePrefix + ".shx";
+	if (access(ftest.c_str(),04) == -1)
+	{
+		ftest = filePrefix + ".SHX";
+		if (access(ftest.c_str(),04) == -1)
+			return 0;
+	}
+
+	// found a valid layer name
+	string lName;
+	string baseName = TeGetBaseName(shpFileName.c_str());
+	if (layerName.empty())
+		lName = baseName;
+	else
+		lName = layerName;
+
+	string newLayerName = lName;
+	TeLayerMap& layerMap = db->layerMap();
+	TeLayerMap::iterator it;
+	bool flag = true;
+	int n = 1;
+	while (flag)
+	{
+		for (it = layerMap.begin(); it != layerMap.end(); ++it)
+		{
+			if (TeStringCompare(it->second->name(),newLayerName))
+				break;
+		}
+		if (it == layerMap.end())
+			flag = 0;
+		else
+			newLayerName = lName + "_" +Te2String(n);
+		n++;	
+	}
+
+	// find projection
+	TeLayer* newLayer = new TeLayer(newLayerName,db);
+	if (newLayer->id() <= 0 )
+		return 0;				// couldn�t create new layer
+
+	bool res = TeImportShape(newLayer,shpFileName);
+	if (res)
+		return newLayer;
+	else
+	{
+		db->deleteLayer(newLayer->id());
+		delete newLayer;
+		return 0;
+	}
+}
+
+bool TeImportShape (TeLayer* layer, const string& shpFileName, string attrTableName,  
+					string objectIdAtt, int unsigned chunkSize )
+{
+	double oldPrec = TePrecision::instance().precision();
+
+	if(layer)
+	{
+		TePrecision::instance().setPrecision(TeGetPrecision(layer->projection()));
+	}
+	else
+	{
+		TePrecision::instance().setPrecision(TeGetPrecision(0));
+	}
+
+	string filePrefix = TeGetName(shpFileName.c_str());
+	string shpFileN = filePrefix + ".shp";
+	string dbfFileN = filePrefix + ".dbf";
+
+	SHPHandle	hSHP = SHPOpen(shpFileN.c_str(),"rb");
+	if (hSHP == 0)
+	{
+		TePrecision::instance().setPrecision(oldPrec);
+		return false;
+	}
+
+    DBFHandle hDBF = DBFOpen(dbfFileN.c_str(), "rb");
+    if (hDBF == 0)
+    {
+		TePrecision::instance().setPrecision(oldPrec);
+		SHPClose(hSHP);
+		return false;
+    }
+
+	// Read some information about the shapefile
+	int nShapeType, nEntities;
+	// --- get the shape and decode it
+	double 	adfMinBound[4], adfMaxBound[4];
+	SHPGetInfo( hSHP, &nEntities, &nShapeType, adfMinBound, adfMaxBound );
+	string shpName = SHPTypeName( nShapeType );
+	if (shpName == "UnknownShapeType")
+	{
+		TePrecision::instance().setPrecision(oldPrec);
+		SHPClose(hSHP);
+		DBFClose(hDBF);
+		return false;
+	}
+
+	if (attrTableName.empty())
+	{
+		if (layer->name().empty())
+		{
+			TePrecision::instance().setPrecision(oldPrec);
+			return false;
+		}
+		else
+			attrTableName = layer->name();
+	}
+	
+	int linkCol=-1;
+    unsigned int j=0;
+	bool autoIndex = false;
+	int indexOffset = 0;  
+	
+	if (!layer->database()->beginTransaction())  
+		return false;
+
+	//read the attribute list information 
+	TeAttributeList attList;
+	TeReadDBFAttributeList(shpFileName, attList);
+
+	// if no geometry link name is given, creates one called 'object_id_'
+	string ext = "";
+	int count = 0;
+	if (objectIdAtt.empty())
+	{
+		objectIdAtt = "object_id_" + Te2String(layer->id());
+		string s2 = TeConvertToUpperCase(objectIdAtt);
+		while (true)
+		{
+			for (j=0; j<attList.size(); j++)
+			{
+				string s0 = attList[j].rep_.name_;
+				string s1 = TeConvertToUpperCase(s0);
+				if ( s1 == s2)
+					break;
+			}
+			if (j < attList.size())
+			{
+				++count;
+				objectIdAtt = "object_id_" + Te2String(count);
+			}
+			else
+				break;
+		}
+		TeAttribute at;
+		at.rep_.type_ = TeSTRING;
+		at.rep_.numChar_ = 16;
+		at.rep_.name_ = objectIdAtt;
+		at.rep_.isPrimaryKey_ = true;
+		attList.push_back(at);
+		linkCol = attList.size()-1;
+		autoIndex = true;
+	}
+	else
+	{
+		// check if given index is valid
+		TeAttributeList::iterator it = attList.begin();
+		while (it != attList.end())
+		{
+			if (TeConvertToUpperCase((*it).rep_.name_) == TeConvertToUpperCase(objectIdAtt))		// index found
+			{
+				if ((*it).rep_.type_ != TeSTRING)	// make sure it is a String type
+				{
+					(*it).rep_.type_ = TeSTRING;
+					(*it).rep_.numChar_ = 16;
+				}
+				(*it).rep_.isPrimaryKey_ = true;
+				linkCol=j;
+				break;
+			}
+			++it;
+			++j;
+		}
+		if (it == attList.end())			// index not found
+		{
+			objectIdAtt = "object_id_" + Te2String(layer->id());;
+			while (true)
+			{
+				for (j=0; j<attList.size(); j++)
+				{
+					if (TeConvertToUpperCase(attList[j].rep_.name_) == TeConvertToUpperCase(objectIdAtt))
+						break;
+				}
+				if (j < attList.size())
+				{
+					++count;
+					objectIdAtt = "object_id_" + Te2String(count);
+				}
+				else
+					break;
+			}
+			TeAttribute at;
+			at.rep_.type_ = TeSTRING;
+			at.rep_.numChar_ = 16;
+			at.rep_.name_ = objectIdAtt;
+			at.rep_.isPrimaryKey_ = true;
+			attList.push_back(at);
+			autoIndex = true;
+		}
+	}
+	if (autoIndex)
+	{
+	    linkCol = attList.size()-1;
+        indexOffset = layer->getNewObjectId(); 
+    }
+
+	TeTable attTable (attrTableName,attList,objectIdAtt,objectIdAtt,TeAttrStatic);
+	if (!layer->createAttributeTable(attTable))			// create the table in the database
+	{
+		SHPClose(hSHP);  
+		DBFClose(hDBF);  
+		layer->database()->rollbackTransaction();  
+		TePrecision::instance().setPrecision(oldPrec);
+		return false;
+	}
+	
+	string objid, value;
+	TePointSet points;
+	TeLineSet lines;
+	TePolygonSet polygons;
+	TeTableRow row;
+	SHPObject* psShape;
+
+	if(TeProgress::instance())
+	{
+		TeProgress::instance()->setTotalSteps(nEntities);
+		TeProgress::instance()->setProgress(j+1);
+	}
+
+	// OBS1: we discard Z and M values when available, because TerraLib
+	// doesn�t have the concept of 3D or measured geometries
+	// OBS2: non identified geometries are mapped to a object_id_
+	// "te_nulo"
+	switch (nShapeType) 
+	{
+		// --- null geometries ---
+	  case SHPT_NULL:							// read only the attributes
+		for (j=0; j<(unsigned int)nEntities; j++)
+		{
+		  row.clear();
+		  TeDBFRowDecode(hDBF,j,row);
+		  if (autoIndex)	// --- create automatic index if needed
+			  row.push_back(Te2String(j));
+		  if (row[linkCol].empty())
+			 row[linkCol] = "te_nulo";
+		  objid = row[linkCol];
+		  attTable.add(row);
+		  if ((j%chunkSize) == 0)
+		  {
+			  layer->saveAttributeTable(attTable);
+			  attTable.clear();
+			  if(TeProgress::instance())
+			  {
+				if (TeProgress::instance()->wasCancelled())
+					break;
+				else
+					TeProgress::instance()->setProgress(j+1);
+			  }	
+		  }
+		}
+		break;
+		// --- point geometries ---
+	  case SHPT_POINTZ:	
+	  case SHPT_MULTIPOINTZ:
+	  case SHPT_POINTM:
+	  case SHPT_MULTIPOINTM:
+	  case SHPT_POINT:
+	  case SHPT_MULTIPOINT:
+		  for (j=0; j<(unsigned int)nEntities; j++)
+		  {
+			  row.clear();
+			  TeDBFRowDecode(hDBF,j,row);
+			  if (autoIndex)	// --- create automatic index if needed
+				  row.push_back(Te2String(j));
+			  if (row[linkCol].empty())
+				 row[linkCol] = "te_nulo";
+			  objid = row[linkCol];
+			  attTable.add(row);
+			  psShape = SHPReadObject(hSHP,j);
+              TeSHPPointDecode(psShape,points,objid);
+     		  SHPDestroyObject(psShape);
+			  if ((j%chunkSize) == 0)
+			  {
+				  layer->addPoints(points);
+				  points.clear();
+				  layer->saveAttributeTable(attTable);
+				  attTable.clear();
+				  if(TeProgress::instance())
+				  {
+					if (TeProgress::instance()->wasCancelled())
+						break;
+					else
+						TeProgress::instance()->setProgress(j+1);
+				  }	
+			  }
+		  }
+		  break;
+		// --- line geometries ---
+	  case SHPT_ARCZ:
+	  case SHPT_ARCM:
+	  case SHPT_ARC:
+		  for (j=0; j<(unsigned int)nEntities; j++)
+		  {
+			  row.clear();
+			  TeDBFRowDecode(hDBF,j,row);
+			  if (autoIndex)	// --- create automatic index if needed
+				  row.push_back(Te2String(j));
+			  if (row[linkCol].empty())
+				 row[linkCol] = "te_nulo";
+			  objid = row[linkCol];
+			  attTable.add(row);
+			  psShape = SHPReadObject(hSHP,j);
+			  TeSHPPolyLineDecode(psShape,lines,objid);
+     		  SHPDestroyObject(psShape);
+			  if ((j%chunkSize) == 0)
+			  {
+			 	  layer->addLines(lines);
+				  lines.clear();
+				  layer->saveAttributeTable(attTable);
+				  attTable.clear();
+				  if(TeProgress::instance())
+				  {
+					if (TeProgress::instance()->wasCancelled())
+						break;
+					else
+						TeProgress::instance()->setProgress(j+1);
+				  }	
+			  }
+		  }
+		  break;
+	// --- polygon geometries ---
+	  case SHPT_POLYGON:
+	  case SHPT_POLYGONM:
+	  case SHPT_POLYGONZ:
+		  for (j=0; j<(unsigned int)nEntities; j++)
+		  {
+			  row.clear();
+			  TeDBFRowDecode(hDBF,j,row);
+			  if (autoIndex)	// --- create automatic index if needed
+				  row.push_back(Te2String(j));
+			  if (row[linkCol].empty())
+				 row[linkCol] = "te_nulo";
+			  objid = row[linkCol];
+			  attTable.add(row);
+			  psShape = SHPReadObject(hSHP,j);
+			  TeSHPPolygonDecode(psShape,polygons,objid);
+			  SHPDestroyObject(psShape);
+			  if ((j%chunkSize) == 0)
+			  {
+				  layer->addPolygons(polygons);
+				  polygons.clear();
+				  layer->saveAttributeTable(attTable);
+				  attTable.clear();
+				  if(TeProgress::instance())
+				  {
+					if (TeProgress::instance()->wasCancelled())
+						break;
+					else
+						TeProgress::instance()->setProgress(j+1);
+				  }
+			  }
+
+		  }
+		  break;
+	  default:
+		  /* todo: handle multipatch geometries */
+		  throw TeException ( UNHANDLED_SHP_TYPE );
+	}
+	if (points.size() > 0)
+	{
+		layer->addPoints(points);
+		points.clear();
+	}
+	if (lines.size() > 0)
+	{
+		layer->addLines(lines);
+		lines.clear();
+	}
+	if (polygons.size() > 0)
+	{
+		layer->addPolygons(polygons);
+		polygons.clear();
+	}
+	if (attTable.size() > 0)
+	{
+		layer->saveAttributeTable(attTable);
+		attTable.clear();
+	}
+	if(TeProgress::instance())
+		TeProgress::instance()->cancel();
+
+	SHPClose(hSHP);
+	DBFClose(hDBF);
+	
+	if (!layer->database()->commitTransaction())  
+		return false;
+
+	// Create the spatial indexes
+	int rep = layer->geomRep();
+	if (rep & TePOINTS)
+	{
+		layer->database()->insertMetadata(layer->tableName(TePOINTS),layer->database()->getSpatialIdxColumn(TePOINTS), 0.0005,0.0005,layer->box());
+		layer->database()->createSpatialIndex(layer->tableName(TePOINTS),layer->database()->getSpatialIdxColumn(TePOINTS), (TeSpatialIndexType)TeRTREE);
+	}
+	if (rep & TeLINES)
+	{
+		layer->database()->insertMetadata(layer->tableName(TeLINES),layer->database()->getSpatialIdxColumn(TeLINES), 0.0005,0.0005,layer->box());
+		layer->database()->createSpatialIndex(layer->tableName(TeLINES),layer->database()->getSpatialIdxColumn(TeLINES), (TeSpatialIndexType)TeRTREE);
+	}
+	if (rep & TePOLYGONS)
+	{
+		layer->database()->insertMetadata(layer->tableName(TePOLYGONS),layer->database()->getSpatialIdxColumn(TePOLYGONS), 0.0005,0.0005,layer->box());
+		layer->database()->createSpatialIndex(layer->tableName(TePOLYGONS),layer->database()->getSpatialIdxColumn(TePOLYGONS), (TeSpatialIndexType)TeRTREE);
+	}
+
+	TePrecision::instance().setPrecision(oldPrec);
+
+	return true;
+}
+
+bool TeImportShapeGeometry (TeLayer* layer, const string& shpFileName, string attrTableName,  
+					string objectIdAtt, int unsigned chunkSize )
+{
+
+	string filePrefix = TeGetName(shpFileName.c_str());
+	string shpFileN = filePrefix + ".shp";
+	string dbfFileN = filePrefix + ".dbf";
+
+	SHPHandle	hSHP = SHPOpen(shpFileN.c_str(),"rb");
+	if (hSHP == 0)
+		return false;
+
+    DBFHandle hDBF = DBFOpen(dbfFileN.c_str(), "rb");
+    if (hDBF == 0)
+    {
+		SHPClose(hSHP);
+		return false;
+    }
+
+	// Read some information about the shapefile
+	int nShapeType, nEntities;
+	// --- get the shape and decode it
+	double 	adfMinBound[4], adfMaxBound[4];
+	SHPGetInfo( hSHP, &nEntities, &nShapeType, adfMinBound, adfMaxBound );
+	string shpName = SHPTypeName( nShapeType );
+	if (shpName == "UnknownShapeType")
+	{
+		SHPClose(hSHP);
+		return false;
+	}
+
+	if (attrTableName.empty())
+	{
+		if (layer->name().empty())
+			return false;
+		else
+			attrTableName = layer->name();
+	}
+	
+	int linkCol=-1;
+    unsigned int j=0;
+	bool autoIndex = false;
+    int indexOffset = 0;
+
+	if (!layer->database()->beginTransaction())
+		return false;
+
+	//read the attribute list information 
+	TeAttributeList attList;
+  TeReadDBFAttributeList(shpFileName, attList);
+
+	// if no geometry link name is given, creates one called 'object_id_'
+	string ext = "";
+	int count = 0;
+	if (objectIdAtt.empty())
+	{
+		objectIdAtt = "object_id_" + Te2String(layer->id());
+		string s2 = TeConvertToUpperCase(objectIdAtt);
+		while (true)
+		{
+			for (j=0; j<attList.size(); j++)
+			{
+				string s0 = attList[j].rep_.name_;
+				string s1 = TeConvertToUpperCase(s0);
+				if ( s1 == s2)
+					break;
+			}
+			if (j < attList.size())
+			{
+				++count;
+				objectIdAtt = "object_id_" + Te2String(count);
+			}
+			else
+				break;
+		}
+		TeAttribute at;
+		at.rep_.type_ = TeSTRING;
+		at.rep_.numChar_ = 16;
+		at.rep_.name_ = objectIdAtt;
+		at.rep_.isPrimaryKey_ = true;
+		attList.push_back(at);
+		linkCol = attList.size()-1;
+		autoIndex = true;
+	}
+	else
+	{
+		// check if given index is valid
+		TeAttributeList::iterator it = attList.begin();
+		while (it != attList.end())
+		{
+			if (TeConvertToUpperCase((*it).rep_.name_) == TeConvertToUpperCase(objectIdAtt))		// index found
+			{
+				if ((*it).rep_.type_ != TeSTRING)	// make sure it is a String type
+				{
+					(*it).rep_.type_ = TeSTRING;
+					(*it).rep_.numChar_ = 16;
+				}
+				(*it).rep_.isPrimaryKey_ = true;
+				linkCol=j;
+				break;
+			}
+			++it;
+			++j;
+		}
+		if (it == attList.end())			// index not found
+		{
+			objectIdAtt = "object_id_" + Te2String(layer->id());;
+			while (true)
+			{
+				for (j=0; j<attList.size(); j++)
+				{
+					if (TeConvertToUpperCase(attList[j].rep_.name_) == TeConvertToUpperCase(objectIdAtt))
+						break;
+				}
+				if (j < attList.size())
+				{
+					++count;
+					objectIdAtt = "object_id_" + Te2String(count);
+				}
+				else
+					break;
+			}
+			TeAttribute at;
+			at.rep_.type_ = TeSTRING;
+			at.rep_.numChar_ = 16;
+			at.rep_.name_ = objectIdAtt;
+			at.rep_.isPrimaryKey_ = true;
+			attList.push_back(at);
+			autoIndex = true;
+		}
+	}
+	if (autoIndex)
+    {
+		linkCol = attList.size()-1;
+		indexOffset = layer->getNewObjectId();
+    }
+
+	TeTable attTable (attrTableName,attList,objectIdAtt,objectIdAtt,TeAttrStatic);
+
+	string objid, value;
+	TePointSet points;
+	TeLineSet lines;
+	TePolygonSet polygons;
+	TeTableRow row;
+	SHPObject* psShape;
+
+	if(TeProgress::instance())
+	{
+		TeProgress::instance()->setTotalSteps(nEntities);
+		TeProgress::instance()->setProgress(j+1);
+	}
+
+	// OBS1: we discard Z and M values when available, because TerraLib
+	// doesn�t have the concept of 3D or measured geometries
+	// OBS2: non identified geometries are mapped to a object_id_
+	// "te_nulo"
+	switch (nShapeType) 
+	{
+		// --- null geometries ---
+	  case SHPT_NULL:							// read only the attributes
+		for (j=0; j<(unsigned int)nEntities; j++)
+		{
+		  row.clear();
+		  TeDBFRowDecode(hDBF,j,row);
+		  if (autoIndex)	// --- create automatic index if needed
+			  row.push_back(Te2String(j + indexOffset));
+		  if (row[linkCol].empty())
+			 row[linkCol] = "te_nulo";
+		  objid = row[linkCol];
+
+		  if ((j%chunkSize) == 0)
+		  {
+			  if(TeProgress::instance())
+			  {
+				if (TeProgress::instance()->wasCancelled())
+					break;
+				else
+					TeProgress::instance()->setProgress(j+1);
+			  }	
+		  }
+		}
+		break;
+		// --- point geometries ---
+	  case SHPT_POINTZ:	
+	  case SHPT_MULTIPOINTZ:
+	  case SHPT_POINTM:
+	  case SHPT_MULTIPOINTM:
+	  case SHPT_POINT:
+	  case SHPT_MULTIPOINT:
+		  for (j=0; j<(unsigned int)nEntities; j++)
+		  {
+			  row.clear();
+			  TeDBFRowDecode(hDBF,j,row);
+			  if (autoIndex)	// --- create automatic index if needed
+				  row.push_back(Te2String(j + indexOffset));
+			  if (row[linkCol].empty())
+				 row[linkCol] = "te_nulo";
+			  objid = row[linkCol];
+
+			  psShape = SHPReadObject(hSHP,j);
+
+			  TeSHPPointDecode(psShape,points,objid);
+     		  SHPDestroyObject(psShape);
+			  if ((j%chunkSize) == 0)
+			  {
+				  if (!layer->addPoints(points))
+				  {
+					  SHPClose(hSHP);
+					  layer->database()->rollbackTransaction(); 
+					  return false;
+				  }
+				  points.clear();
+
+				  if(TeProgress::instance())
+				  {
+					  if (TeProgress::instance()->wasCancelled())
+						break;
+					else
+						TeProgress::instance()->setProgress(j+1);
+				  }	
+			  }
+		  }
+		  break;
+		// --- line geometries ---
+	  case SHPT_ARCZ:
+	  case SHPT_ARCM:
+	  case SHPT_ARC:
+		  for (j=0; j<(unsigned int)nEntities; j++)
+		  {
+			  row.clear();
+			  TeDBFRowDecode(hDBF,j,row);
+			  if (autoIndex)	// --- create automatic index if needed
+				  row.push_back(Te2String(j + indexOffset));
+			  if (row[linkCol].empty())
+				 row[linkCol] = "te_nulo";
+			  objid = row[linkCol];
+
+			  psShape = SHPReadObject(hSHP,j);
+
+			  TeSHPPolyLineDecode(psShape,lines,objid);
+		  
+			  SHPDestroyObject(psShape);
+			  if ((j%chunkSize) == 0)
+			  {
+				  if (!layer->addLines(lines))
+				  {
+					  SHPClose(hSHP);
+					  layer->database()->rollbackTransaction(); 
+					  return false;
+				  }
+				  lines.clear();
+
+				  if(TeProgress::instance())
+				  {
+					if (TeProgress::instance()->wasCancelled())
+						break;
+					else
+						TeProgress::instance()->setProgress(j+1);
+				  }	
+			  }
+		  }
+		  break;
+	// --- polygon geometries ---
+	  case SHPT_POLYGON:
+	  case SHPT_POLYGONM:
+	  case SHPT_POLYGONZ:
+
+		  for (j=0; j<(unsigned int)nEntities; j++)
+		  {
+			  row.clear();
+
+			  TeDBFRowDecode(hDBF,j,row);
+			  if (autoIndex)	// --- create automatic index if needed
+			    row.push_back(Te2String(j + indexOffset));
+			  if (row[linkCol].empty())
+				  row[linkCol] = "te_nulo";
+			  objid = row[linkCol];
+			  
+			  psShape = SHPReadObject(hSHP,j);
+
+			  TeSHPPolygonDecode(psShape,polygons,objid);
+
+			  SHPDestroyObject(psShape);
+			  if ((j%chunkSize) == 0)
+			  {
+
+				  if (!layer->addPolygons(polygons))
+				  {
+					  SHPClose(hSHP);
+					  layer->database()->rollbackTransaction(); 
+					  return false;
+				  }
+
+				  polygons.clear();
+
+				  if(TeProgress::instance())
+				  {
+					if (TeProgress::instance()->wasCancelled())
+						break;
+					else
+						TeProgress::instance()->setProgress(j+1);
+				  }
+			  }
+
+		  }
+		  break;
+	  default:
+		  // todo: handle multipatch geometries 
+		  throw TeException ( UNHANDLED_SHP_TYPE );
+	}
+	if (points.size() > 0)
+	{
+		if (!layer->addPoints(points))
+		{
+			SHPClose(hSHP);
+			layer->database()->rollbackTransaction(); 
+			return false;
+		}
+
+		points.clear();
+	}
+	if (lines.size() > 0)
+	{
+		if (!layer->addLines(lines))
+		{
+			SHPClose(hSHP);
+			layer->database()->rollbackTransaction();
+			return false;
+		}
+
+		lines.clear();
+	}
+	if (polygons.size() > 0)
+	{
+		if (!layer->addPolygons(polygons))
+		{
+			SHPClose(hSHP);
+			layer->database()->rollbackTransaction();
+			return false;
+		}
+		polygons.clear();
+	}
+	if(TeProgress::instance())
+		TeProgress::instance()->cancel();
+
+	SHPClose(hSHP);
+
+	if (!layer->database()->commitTransaction())
+		return false;
+
+	return true;
+}
+
+DBFHandle TeCreateDBFFile (const string& dbfFilename, TeAttributeList& attList)
+{
+	DBFHandle hDBF = DBFCreate( dbfFilename.c_str() );
+	if( hDBF == 0 )
+		return 0;
+	
+	int i =0;
+	TeAttributeList::iterator it=attList.begin();
+
+	while ( it != attList.end() )
+	{
+		TeAttribute at = (*it);
+		string atName = at.rep_.name_;
+
+		if (atName.size() > 10)
+		{
+			int extra = (int)(atName.size() - 10)/2;
+			int middle = (int)(atName.size()/2);
+			string str = atName.substr(0,middle-extra-1);
+			str += atName.substr(middle+extra);
+			atName = str;
+		}
+		if (at.rep_.type_ == TeSTRING )
+		{
+			if (DBFAddField( hDBF, atName.c_str(), FTString, at.rep_.numChar_, 0 ) == -1 )
+				return 0;
+		}
+		else if (at.rep_.type_ == TeINT)
+		{
+			if (DBFAddField( hDBF, atName.c_str(), FTInteger, 32, 0 ) == -1 )
+				return 0;
+		}
+		else if (at.rep_.type_ == TeREAL)
+		{
+			if (DBFAddField( hDBF, atName.c_str(), FTDouble, 40, 15 ) == -1 )
+				return 0;
+		}
+		// OBS: shapelib doesn�t deal with xBase field type for Date 
+		// we are transforming it to string
+		else if (at.rep_.type_ == TeDATETIME)
+		{
+			if (DBFAddField( hDBF, atName.c_str(), FTDate, 8, 0 ) == -1 )
+				return 0;
+		}
+		++i;
+		++it;
+	}
+	return hDBF;
+}
+
+bool TeExportPolygonSet2SHP( const TePolygonSet& ps,const std::string& base_file_name  )
+{
+    // creating files names
+    std::string dbfFilename = base_file_name + ".dbf";
+    std::string shpFilename = base_file_name + ".shp";
+
+    // creating polygons attribute list ( max attribute size == 25 )
+    TeAttributeList attList;
+    TeAttribute at;
+    at.rep_.type_ = TeSTRING;               //the id of the cell
+    at.rep_.numChar_ = 25;
+    at.rep_.name_ = "object_id_";
+    at.rep_.isPrimaryKey_ = true;
+	attList.push_back(at);
+    
+    /* DBF output file handle creation */
+	DBFHandle hDBF = TeCreateDBFFile (dbfFilename, attList);
+	if ( hDBF == 0 )
+		return false;
+    
+    /* SHP output file handle creation */
+    SHPHandle hSHP = SHPCreate( shpFilename.c_str(), SHPT_POLYGON );
+    if( hSHP == 0 ) 
+	{
+      DBFClose( hDBF );
+      return false;
+    }
+    
+    /* Writing polygons */
+    int iRecord = 0;
+    int totpoints = 0;
+    double  *padfX, *padfY;
+    SHPObject       *psObject;
+    int posXY, npoints, nelem;
+    int nVertices;
+    int* panParts;
+
+    TePolygonSet::iterator itps;
+    TePolygon poly;
+
+    for (itps = ps.begin() ; itps != ps.end() ; itps++ ) {
+      poly=(*itps);
+      totpoints = 0;
+      nVertices = poly.size();
+      for (unsigned int n=0; n<poly.size();n++) {
+        totpoints += poly[n].size();
+      }
+
+      panParts = (int *) malloc(sizeof(int) * nVertices);
+      padfX = (double *) malloc(sizeof(double) * totpoints);
+      padfY = (double *) malloc(sizeof(double) * totpoints);
+      posXY = 0;
+      nelem = 0;
+      
+      for (unsigned int l=0; l<poly.size(); ++l) {
+        if (l==0) {
+          if (TeOrientation(poly[l]) == TeCOUNTERCLOCKWISE) {
+            TeReverseLine(poly[l]);
+          }
+        } else {
+          if (TeOrientation(poly[l]) == TeCLOCKWISE) {
+            TeReverseLine(poly[l]);
+          }
+        }
+        
+        npoints = poly[l].size();
+        panParts[nelem]=posXY;
+        
+        for (int m=0; m<npoints; m++ ) {
+          padfX[posXY] = poly[l][m].x_;
+          padfY[posXY] = poly[l][m].y_;
+          posXY++;
+        }
+        nelem++;
+      }
+                
+      psObject = SHPCreateObject( SHPT_POLYGON, -1, nelem, panParts, NULL,
+        posXY, padfX, padfY, NULL, NULL );
+        
+      int shpRes = SHPWriteObject( hSHP, -1, psObject );
+      if (shpRes == -1 )
+	  {
+	      DBFClose( hDBF );
+		  SHPClose( hSHP );
+		  return false;
+	  }
+        
+      SHPDestroyObject( psObject );
+      free( panParts );
+      free( padfX );
+      free( padfY );
+
+      // writing attributes - same creation order
+      DBFWriteStringAttribute(hDBF, iRecord, 0, poly.objectId().c_str() );
+            
+      iRecord++;
+    }
+    
+    DBFClose( hDBF );
+    SHPClose( hSHP );
+    return true;  
+}
+
+
+bool
+TeExportQuerierToShapefile(TeQuerier* querier, const std::string& base)
+{
+	// check initial conditions
+	if (!querier)
+		return false;
+
+	if (!querier->loadInstances())
+		return false;
+
+	// Get the list of attributes defined by the input querier
+	bool onlyObjId = false;
+	TeAttributeList qAttList = querier->getAttrList();
+	if (qAttList.empty())
+	{
+		TeAttributeList qAttList;
+		TeAttribute at;
+		at.rep_.type_ = TeSTRING;               
+		at.rep_.numChar_ = 100;
+		at.rep_.name_ = "ID";
+		at.rep_.isPrimaryKey_ = true;
+		qAttList.push_back(at);
+		onlyObjId = true;
+	}
+
+	// Handles to each type of geometries that will be created if necessary
+	DBFHandle hDBFPol = 0;
+	SHPHandle hSHPPol = 0;
+	DBFHandle hDBFLin = 0;
+	SHPHandle hSHPLin = 0;
+	DBFHandle hDBFPt = 0;
+	SHPHandle hSHPPt = 0;
+
+	// Some auxiliary variables
+    int totpoints;
+    double*	padfX;
+	double*	padfY;
+    unsigned int nVertices;
+    int* panPart;
+    SHPObject *psObject;
+    unsigned int posXY, npoints, nelem;
+	int shpRes;
+
+	// progress information
+	if (TeProgress::instance())
+		TeProgress::instance()->setTotalSteps(querier->numElemInstances());
+	clock_t	t0, t1, t2;
+	t2 = clock();
+	t0 = t1 = t2;
+	int dt = CLOCKS_PER_SEC/2;
+	int dt2 = CLOCKS_PER_SEC; //* .000001;
+
+	// Loop through the instances writting their geometries and attributes
+	unsigned int iRecPol=0, iRecLin=0, iRecPt=0;
+	unsigned int n, l, m;
+	unsigned int nIProcessed = 0;
+	TeSTInstance st;
+	while(querier->fetchInstance(st))
+	{
+		totpoints = 0;
+		nVertices = 0;
+		if (st.hasPolygons())
+		{
+			TePolygonSet& polSet = st.getPolygons();
+			TePolygonSet::iterator itps;
+			int nVerticesCount = 0;
+			for (itps = polSet.begin(); itps != polSet.end(); ++itps) 
+			{
+				nVertices = (*itps).size();
+				nVerticesCount += nVertices;
+				for (n=0; n<nVertices;++n) 
+					totpoints += (*itps)[n].size();
+			}
+
+			panPart = (int *) malloc(sizeof(int) * nVerticesCount);
+			padfX = (double *) malloc(sizeof(double) * totpoints);
+			padfY = (double *) malloc(sizeof(double) * totpoints);
+
+			posXY = 0;
+			nelem = 0;
+			for (itps = polSet.begin(); itps != polSet.end(); ++itps) 
+			{
+				TePolygon poly = *itps;
+				for (l=0; l<poly.size(); ++l) 
+				{
+					if (l==0) 
+					{
+						if (TeOrientation(poly[l]) == TeCOUNTERCLOCKWISE) 
+							TeReverseLine(poly[l]);
+					}
+					else 
+					{
+						if (TeOrientation(poly[l]) == TeCLOCKWISE)
+							TeReverseLine(poly[l]);
+					}
+					npoints = poly[l].size();
+					panPart[nelem]=posXY;
+        
+					for (m=0; m<npoints; ++m) 
+					{
+						padfX[posXY] = poly[l][m].x_;
+						padfY[posXY] = poly[l][m].y_;
+						posXY++;
+					}
+					nelem++;
+				}
+			}
+			psObject = SHPCreateObject(SHPT_POLYGON, -1, nelem, panPart, NULL, posXY, padfX, padfY, NULL, NULL);
+			if (hSHPPol == 0)
+			{
+				string fname = base + "_pol.shp";
+				hSHPPol = SHPCreate(fname.c_str(), SHPT_POLYGON);
+   				assert (hSHPPol != 0);
+			}	
+			shpRes = SHPWriteObject(hSHPPol, -1, psObject);
+			SHPDestroyObject(psObject);
+			free(panPart);
+			free(padfX);
+			free(padfY);
+			assert(shpRes != -1);   
+			if (hDBFPol == 0)
+			{
+				hDBFPol = TeCreateDBFFile(base + "_pol.dbf", qAttList);
+				assert (hDBFPol != 0);
+			}
+			if (onlyObjId)
+			{
+				DBFWriteStringAttribute(hDBFPol, iRecPol, 0, st.objectId().c_str());
+			}
+			else
+			{
+				string val;
+				for (n=0; n<qAttList.size();++n) 
+				{
+					st.getPropertyValue(val,n);
+					if (qAttList[n].rep_.type_ == TeSTRING || qAttList[n].rep_.type_ == TeDATETIME)
+					{
+						DBFWriteStringAttribute(hDBFPol, iRecPol, n, val.c_str());
+					}
+					else if (qAttList[n].rep_.type_ == TeINT)
+					{
+						DBFWriteIntegerAttribute(hDBFPol, iRecPol, n, atoi(val.c_str()));
+					}
+					else if (qAttList[n].rep_.type_ == TeREAL)
+					{
+						DBFWriteDoubleAttribute(hDBFPol, iRecPol, n, atof(val.c_str()));
+					}
+				}
+			}
+			++iRecPol;
+		}
+		if (st.hasCells())
+		{
+			TeCellSet& cellSet = st.getCells();
+			nVertices = cellSet.size();
+			totpoints = nVertices*5;
+			panPart = (int *) malloc(sizeof(int) * nVertices);
+			padfX = (double *) malloc(sizeof(double) * totpoints);
+			padfY = (double *) malloc(sizeof(double) * totpoints);
+			posXY = 0;
+			nelem = 0;
+			TeCellSet::iterator itcs;
+			for (itcs=cellSet.begin(); itcs!=cellSet.end(); ++itcs)
+			{
+				panPart[nelem]=posXY;
+				padfX[posXY] = (*itcs).box().lowerLeft().x();
+				padfY[posXY] = (*itcs).box().lowerLeft().y();
+				posXY++;		
+				padfX[posXY] = (*itcs).box().upperRight().x();
+				padfY[posXY] = (*itcs).box().lowerLeft().y();
+				posXY++;		
+				padfX[posXY] = (*itcs).box().upperRight().x();
+				padfY[posXY] = (*itcs).box().upperRight().y();
+				posXY++;		
+				padfX[posXY] = (*itcs).box().lowerLeft().x();
+				padfY[posXY] = (*itcs).box().upperRight().y();
+				posXY++;		
+				padfX[posXY] = (*itcs).box().lowerLeft().x();
+				padfY[posXY] = (*itcs).box().lowerLeft().y();
+				++posXY;	
+				++nelem;
+			} 
+			psObject = SHPCreateObject(SHPT_POLYGON, -1, nelem, panPart, NULL,posXY, padfX, padfY, NULL, NULL);
+			if (hSHPPol == 0)
+			{
+				string fname = base + "_pol.shp";
+				hSHPPol = SHPCreate(fname.c_str(), SHPT_POLYGON);
+   				assert (hSHPPol != 0);
+			}	
+			shpRes = SHPWriteObject(hSHPPol, -1, psObject);
+			SHPDestroyObject(psObject);
+			free(panPart);
+			free(padfX);
+			free(padfY);
+			assert(shpRes != -1);
+			if (hDBFPol == 0)
+			{
+				hDBFPol = TeCreateDBFFile(base + "_pol.dbf", qAttList);
+				assert (hDBFPol != 0);
+			}
+
+			if (onlyObjId)
+			{
+				DBFWriteStringAttribute(hDBFPol, iRecPol, 0, st.objectId().c_str());
+			}
+			else
+			{
+				string val;
+				for (n=0; n<qAttList.size();++n) 
+				{
+					st.getPropertyValue(val,n);
+					if (qAttList[n].rep_.type_ == TeSTRING || qAttList[n].rep_.type_ == TeDATETIME)
+					{
+						DBFWriteStringAttribute(hDBFPol, iRecPol, n, val.c_str());
+					}
+					else if (qAttList[n].rep_.type_ == TeINT)
+					{
+						DBFWriteIntegerAttribute(hDBFPol, iRecPol, n, atoi(val.c_str()));
+					}
+					else if (qAttList[n].rep_.type_ == TeREAL)
+					{
+						DBFWriteDoubleAttribute(hDBFPol, iRecPol, n, atof(val.c_str()));
+					}
+				}
+			}
+			++iRecPol;
+		}
+		if (st.hasLines())
+		{
+			TeLineSet& lineSet = st.getLines();
+			nVertices = lineSet.size();
+			TeLineSet::iterator itls;
+			for (itls=lineSet.begin(); itls!=lineSet.end(); ++itls)
+				totpoints += (*itls).size();
+			panPart = (int *) malloc(sizeof(int) * nVertices);
+			padfX = (double *) malloc(sizeof(double) * totpoints);
+			padfY = (double *) malloc(sizeof(double) * totpoints);
+			posXY = 0;
+			nelem = 0;
+			for (itls=lineSet.begin(); itls!=lineSet.end(); ++itls)
+			{
+				panPart[nelem]=posXY;
+				for (l=0; l<(*itls).size(); ++l)
+				{
+					padfX[posXY] = (*itls)[l].x();
+					padfY[posXY] = (*itls)[l].y();
+					++posXY;
+				}
+				++nelem;
+			}
+			psObject = SHPCreateObject(SHPT_ARC, -1, nVertices, panPart, NULL,	posXY, padfX, padfY, NULL, NULL);
+			if (hSHPLin == 0)
+			{
+				string fname = base + "_lin.shp"; 
+				hSHPLin = SHPCreate(fname.c_str(), SHPT_ARC);
+   				assert (hSHPLin != 0);
+			}		
+			shpRes = SHPWriteObject(hSHPLin, -1, psObject);
+			SHPDestroyObject(psObject);
+			free(panPart);
+			free(padfX);
+			free(padfY);
+			assert(shpRes != -1);
+			if (hDBFLin == 0)
+			{
+				hDBFLin = TeCreateDBFFile(base + "_lin.dbf", qAttList);
+				assert (hDBFLin != 0);
+			}
+			if (onlyObjId)
+			{
+				DBFWriteStringAttribute(hDBFLin, iRecLin, 0, st.objectId().c_str());
+			}
+			else
+			{
+				string val;
+				for (n=0; n<qAttList.size();++n) 
+				{
+					st.getPropertyValue(val,n);
+					if (qAttList[n].rep_.type_ == TeSTRING || qAttList[n].rep_.type_ == TeDATETIME)
+					{
+						DBFWriteStringAttribute(hDBFLin, iRecLin, n, val.c_str());
+					}
+					else if (qAttList[n].rep_.type_ == TeINT)
+					{
+						DBFWriteIntegerAttribute(hDBFLin, iRecLin, n, atoi(val.c_str()));
+					}
+					else if (qAttList[n].rep_.type_ == TeREAL)
+					{
+						DBFWriteDoubleAttribute(hDBFLin, iRecLin, n, atof(val.c_str()));
+					}
+				}
+			}
+			++iRecLin;
+		}
+		if (st.hasPoints())
+		{
+			TePointSet& pointSet = st.getPoints();
+			nVertices = pointSet.size();
+			panPart = (int *) malloc(sizeof(int) * nVertices);
+			padfX = (double *) malloc(sizeof(double) * nVertices);
+			padfY = (double *) malloc(sizeof(double) * nVertices);
+			nelem = 0;
+			TePointSet::iterator itpts;
+			for (itpts=pointSet.begin(); itpts!=pointSet.end(); ++itpts)
+			{
+				panPart[nelem] = nelem;
+				padfX[nelem] = (*itpts).location().x();
+				padfY[nelem] = (*itpts).location().y();
+				++nelem;
+			}
+			psObject = SHPCreateObject(SHPT_POINT, -1, nVertices, panPart, NULL, nVertices, padfX, padfY, NULL, NULL );
+			if (hSHPPt == 0)
+			{
+				string fname = base + "_pt.shp";
+				hSHPPt = SHPCreate(fname.c_str(), SHPT_POINT);
+   				assert (hSHPPt != 0);
+			}		
+			shpRes = SHPWriteObject(hSHPPt, -1, psObject);
+			SHPDestroyObject(psObject);
+			free(panPart);
+			free(padfX);
+			free(padfY);
+			assert(shpRes != -1);
+			if (hDBFPt == 0)
+			{
+				hDBFPt = TeCreateDBFFile(base + "_pt.dbf", qAttList);
+				assert (hDBFPt != 0);
+			}
+			if (onlyObjId)
+			{
+				DBFWriteStringAttribute(hDBFPt, iRecPt, 0, st.objectId().c_str());
+			}
+			else
+			{
+				string val;
+				for (n=0; n<qAttList.size();++n) 
+				{
+					st.getPropertyValue(val,n);
+						if (qAttList[n].rep_.type_ == TeSTRING || qAttList[n].rep_.type_ == TeDATETIME)
+					{
+						DBFWriteStringAttribute(hDBFPt, iRecPt, n, val.c_str());
+					}
+					else if (qAttList[n].rep_.type_ == TeINT)
+					{
+						DBFWriteIntegerAttribute(hDBFPt, iRecPt, n, atoi(val.c_str()));
+					}
+					else if (qAttList[n].rep_.type_ == TeREAL)
+					{
+						DBFWriteDoubleAttribute(hDBFPt, iRecPt, n, atof(val.c_str()));
+					}
+				}
+			}
+			++iRecPt;
+		}
+		++nIProcessed;
+		if (TeProgress::instance() && int(t2-t1) > dt)
+		{
+			t1 = t2;
+			if(((int)(t2-t0) > dt2))
+			{
+				if (TeProgress::instance()->wasCancelled())
+					break;
+				else
+					TeProgress::instance()->setProgress(nIProcessed);
+			}
+		}
+
+	}
+	if (hDBFPol != 0)
+		DBFClose(hDBFPol);
+	if (hSHPPol != 0)
+        SHPClose(hSHPPol);
+	if (hDBFLin != 0)
+		DBFClose(hDBFLin);
+	if (hSHPLin != 0)
+        SHPClose(hSHPLin);
+	if (hDBFPt != 0)
+		DBFClose(hDBFPt);
+	if (hSHPPt != 0)
+        SHPClose(hSHPPt);
+
+	if (TeProgress::instance())
+		TeProgress::instance()->reset();
+	return true;
+}
+
+
+bool
+TeExportShapefile(TeLayer* layer, const string& shpFileName, const string& tableName, const string& restriction)
+{
+  	if (!layer || shpFileName.empty())
+		return false;
+
+	// check if asked table exist
+	TeAttrTableVector& vTables = layer->attrTables();
+	TeAttrTableVector::iterator it = vTables.begin();
+	while (it != vTables.end())
+	{
+		if (it->name() == tableName) 
+			break;
+		++it;
+	}
+	if (it == vTables.end())
+		return false;
+	TeAttrTableVector askedTable;
+	askedTable.push_back(*it);
+
+	TeTheme* tempTheme = new TeTheme();
+	tempTheme->attributeRest(restriction);
+	tempTheme->layer(layer);
+	tempTheme->collectionTable("");
+	tempTheme->collectionAuxTable("");
+	tempTheme->setAttTables(askedTable);
+
+	TeQuerierParams qPar(true, true);
+	qPar.setParams(tempTheme);
+
+	TeQuerier* tQuerier = new TeQuerier(qPar);
+	bool res = TeExportQuerierToShapefile(tQuerier, shpFileName);
+	delete tQuerier;
+	delete tempTheme;
+    return res ;
+}
+
+bool 
+TeExportLayerToShapefile(TeLayer* layer, const string& baseName)
+{
+  	if (!layer)
+		return false;
+
+	string fbase = baseName;
+	if (baseName.empty())
+		fbase = layer->name();
+
+	TeTheme* tempTheme = new TeTheme();
+	tempTheme->layer(layer);
+	tempTheme->collectionTable("");
+	tempTheme->collectionAuxTable("");
+	tempTheme->setAttTables(layer->attrTables());
+
+	TeQuerierParams qPar(true, true);
+	qPar.setParams(tempTheme);
+
+	TeQuerier* tQuerier = new TeQuerier(qPar);
+	bool res = TeExportQuerierToShapefile(tQuerier, baseName);
+	delete tQuerier;
+	delete tempTheme;
+    return res ;
+}
+
+
+bool 
+TeExportThemeToShapefile(TeTheme* theme, TeSelectedObjects selOb, const std::string& baseName)
+{
+	if (!theme)
+		return false;
+
+	string fbase = baseName;
+	if (baseName.empty())
+		fbase = theme->name();
+
+	TeQuerierParams qPar(true, true);
+	qPar.setParams(theme);
+	qPar.setSelecetObjs(selOb);
+
+	TeQuerier* tQuerier = new TeQuerier(qPar);
+	bool res = TeExportQuerierToShapefile(tQuerier, fbase);
+	delete tQuerier;
+	return res;
+}
+
+void TeDBFRowDecode(DBFHandle& hDBF, int nr, TeTableRow& row)
+{
+	string value;
+	int i;
+	for (i = 0; i < DBFGetFieldCount(hDBF); i++)
+	{
+		value =  DBFReadStringAttribute(hDBF,nr,i);
+		row.push_back(value); 
+	}
+}
+
+bool TeDecodeShape(SHPObject* psShape, TeMultiGeometry& geomestries, string& objectId)
+{
+	int shpType = psShape->nSHPType;
+	switch (shpType)
+	{
+		case SHPT_POLYGON:
+		case SHPT_POLYGONZ:
+			TeSHPPolygonDecode(psShape,geomestries.polygons_,objectId);
+			return true;
+		case SHPT_ARC:
+		case SHPT_ARCZ:
+			TeSHPPolyLineDecode(psShape,geomestries.lines_,objectId);
+			return true;
+		case SHPT_POINT:
+		case SHPT_POINTZ:
+		case SHPT_MULTIPOINT:
+		case SHPT_MULTIPOINTZ:
+			TeSHPPointDecode(psShape,geomestries.points_,objectId);
+			return true;
+	}
+	return false;
+}
+
+void TeSHPPointDecode(SHPObject* psShape, TePointSet& points, string& objid)
+{
+	int nv = psShape->nVertices;
+	for (int i = 0; i<nv; i++)
+	{
+		TePoint point(psShape->padfX[i], psShape->padfY[i]);
+		point.objectId(objid);
+		points.add(point);
+	}
+}
+
+
+void TeSHPPolyLineDecode(SHPObject* psShape, TeLineSet& lines, string& objid)
+{
+	int iPart,j=0,nextStart=0; 
+	for (iPart = 0; iPart < psShape->nParts; iPart++)
+	{
+		if (iPart == psShape->nParts-1)
+			nextStart = psShape->nVertices;
+		else 
+			nextStart = psShape->panPartStart[iPart+1];
+
+		TeLine2D line;
+		while (j<nextStart)
+		{
+			TeCoord2D pt ( psShape->padfX[j], psShape->padfY[j] );
+			line.add ( pt );
+			j++;
+		}
+		line.objectId (objid);	
+		lines.add ( line );
+	}
+}
+
+void
+TeSHPPolygonDecode(SHPObject* psShape, TePolygonSet& polys, string& objid)
+{
+	int iPart = 0;
+	vector<int> partStart;
+
+	// Build an array whose components point to the starting point
+	// of the rings that compose the polygon shape
+	for ( iPart = 0; iPart < psShape->nParts; iPart++ )
+		partStart.push_back ( psShape->panPartStart[iPart] );
+	partStart.push_back ( psShape->nVertices ); // point to the end
+
+	vector<TePolygon> pList;
+	vector<TeLinearRing> holes;
+	int j = 0;
+	iPart = 0;
+	while (j < psShape->nVertices)
+	{
+		TeLine2D line;
+		iPart++;						// while it doesn�t reach the start of next part
+		while ( j < partStart[iPart] )	// build a line from the coordinates
+		{
+			TeCoord2D pt ( psShape->padfX[j], psShape->padfY[j] );
+			line.add ( pt );
+			j++;
+		}								
+		if (!line.isRing())				// force the closing of opened rings
+			line.add(line[0]);
+
+		// decide if a ring is an outter ring or an inner ring based on its orientation
+		TeLinearRing ring(line);
+		short orient = TeOrientation(ring);
+		if(orient == TeCLOCKWISE)	// outter ring: start a new polygon
+		{
+			TePolygon p;
+			p.add(ring);
+			p.objectId(objid);
+			pList.push_back(p);
+		}
+		else	// COUNTERCLOCKWISE => inner ring: put on the list of holes
+			holes.push_back(ring);
+	} // read all vertices
+
+
+	// even though there are rings that are in counter clockwise orientation, 
+	// there aren't any clockwise orientation rings to be possible parents of 
+	// these inner rings. The decision here: treat all of them as outter rings...
+	if (pList.empty() && !holes.empty())
+	{
+		for (unsigned int i=0; i<holes.size(); ++i)
+		{
+			TePolygon p;
+			p.add(holes[i]);
+			p.objectId(objid);
+			polys.add(p);
+		}
+		return;
+	}
+
+	if (pList.size() == 1)	// shape has only one polygon that should
+	{						// contain all the inner rings
+		for(unsigned int i = 0; i < holes.size(); ++i)
+			pList[0].add(holes[i]);
+	}
+	else
+	{	// shape has multiple outter ring and inner rings
+		// we have to find a parent to each inner ring 
+		for(unsigned int i = 0; i < holes.size(); ++i)
+		{
+			vector<TePolygon> candidates;
+			TeLinearRing ring = holes[i];
+			
+			// step 1: consider as a inner ring parent candidate every polygon 
+			// that intercepts the ring MBR
+			unsigned int j = 0;
+			for(j = 0; j < pList.size(); ++j)
+			{
+				if(TeWithinOrCoveredByOrEquals(ring.box(), pList[j].box()))
+					candidates.push_back(pList[j]);
+			}
+
+			// if there is only one candidate this is the parent
+			if(candidates.size() == 1)
+			{
+				candidates[0].add(ring);
+				continue;
+			}
+
+			// step 2: refine the candidates to parent: consider only those 
+			// that contains the ring (not just its MBR)
+			vector<TePolygon> newCandidates;
+			for(j = 0; j < candidates.size(); ++j)
+			{
+				short rel = TeBOUNDARY;
+				bool inside = false;
+
+				unsigned int nthVert = ring.size();
+				unsigned int iVert = 0u;
+
+				while(iVert < nthVert)
+				{
+					rel = TeRelation(ring[iVert], candidates[j][0]);
+
+					if(rel & TeINSIDE)
+					{
+						inside = true;
+						newCandidates.push_back(candidates[j]);
+						break;
+					}
+					else if(rel & TeOUTSIDE)
+						break;
+					++iVert;
+				}
+
+				if(iVert == nthVert)	
+					break;
+			}
+			
+			// sort the new candidates according to their areas
+			int idxMinArea = 0;
+			double minArea = TeMAXFLOAT;
+			for(j = 0; j < newCandidates.size(); ++j)
+			{
+				if(TeGeometryArea(newCandidates[j].box()) < minArea)
+				{
+					idxMinArea = j;
+					minArea = TeGeometryArea(newCandidates[j].box());
+				}
+			}
+			// choose as parent the candidate that has the smaller area
+			if (!newCandidates.empty())
+				newCandidates[idxMinArea].add(ring);
+		}
+	}
+
+	// add polygons to the list passed as parameter
+	vector<TePolygon>::iterator it = pList.begin();
+	while (it != pList.end())
+	{
+		polys.add(*it);
+		++it;
+	}
+}
+
+//! Fills a vector with the values of choosen column named , to be used as object identifications
+/*!
+	\param dbfFileName DBF file name
+	\param indexes a vector that has the identification of the objects
+	\param objectIdAttr name of the attribute that has the identification of objects
+	\note if no objectIdAttr is provided or there is no column with this name return
+	an incremental sequence of numbers.
+*/
+void TeReadDBFIndexes(const string& dbfFileName, vector<string>& indexes, const string objectIdAttr="");
+
+
+bool TeReadDBFAttributeList ( const string& dbfFileName, TeAttributeList& attList )
+{
+	string filePrefix = TeGetName (dbfFileName.c_str()) ;
+	string fileName = filePrefix + ".dbf";
+
+/* -------------------------------------------------------------------- */
+/*      Open the file.                                                  */
+/* -------------------------------------------------------------------- */
+    DBFHandle hDBF = DBFOpen( fileName.c_str(), "rb" );
+    if( hDBF == NULL )
+    {
+			throw TeException ( UNABLE_TO_OPEN_DBF_FILE );
+    }
+    
+/* -------------------------------------------------------------------- */
+/*	If there is no data in this file let the user know.		*/
+/* -------------------------------------------------------------------- */
+    if( DBFGetFieldCount(hDBF) == 0 )
+    {
+			throw TeException ( NO_DATA_IN_DBF_FILE );
+    }
+
+/* -------------------------------------------------------------------- */
+/*	Get Attributes header definitions.									*/
+/* -------------------------------------------------------------------- */
+	TeAttribute attribute;
+    
+	char	szTitle[12];
+	int		nWidth, nDecimals;
+	int 	i;
+
+	vector<string> names;
+
+	for( i = 0; i < DBFGetFieldCount(hDBF); i++ )
+    {
+		DBFFieldType	eType = DBFGetFieldInfo( hDBF, i, szTitle, &nWidth, &nDecimals );
+
+		string atname = TeConvertToUpperCase(szTitle);
+	
+		vector<string>::iterator it = find(names.begin(),names.end(),atname);
+		if (it != names.end())
+		{
+			string newname = atname + "_" + Te2String(i);
+			int c = i+1;
+			while (true)
+			{
+				it = find(names.begin(),names.end(),newname);
+				if (it == names.end())
+					break;
+				newname = atname + "_" + Te2String(c);
+				++c;
+			}
+			atname = newname;
+		}
+		names.push_back(atname);
+		attribute.rep_.name_ = atname;
+
+        if( eType == FTDate )
+		{
+			attribute.rep_.type_     = TeDATETIME;
+			attribute.dateChronon_   = TeDAY;
+			attribute.dateTimeFormat_ = "YYYYMMDD";
+			attribute.dateSeparator_ = 'c';
+		}
+        else if( eType == FTString )
+		{
+			attribute.rep_.type_     = TeSTRING;
+			attribute.rep_.numChar_  = nWidth;
+		}
+		else if( eType == FTInteger )
+		{
+			if (nWidth > 9)
+			{
+				attribute.rep_.type_ = TeREAL;
+				attribute.rep_.numChar_ = nWidth;
+				attribute.rep_.decimals_ = 0;
+			}
+			else
+			{
+				attribute.rep_.type_ = TeINT;
+				attribute.rep_.numChar_ = nWidth;
+			}
+		}
+        else if( eType == FTDouble )
+		{
+            attribute.rep_.type_ = TeREAL;
+			attribute.rep_.numChar_ = nWidth;
+			attribute.rep_.decimals_ = nDecimals;
+		}
+
+		// keep track of the index name
+
+		attList.push_back ( attribute );
+    }
+	names.clear();
+    DBFClose( hDBF );
+	return true;
+}
+
+
+bool TeImportDBFTable(const string& dbFileName,TeDatabase* db, TeLayer* layer,TeAttrTableType tableType, string objectIdAtt)
+{
+	if (!db || dbFileName.empty())
+		return false;
+
+    DBFHandle hDBF = DBFOpen(dbFileName.c_str(), "rb" );
+    if( hDBF == NULL )
+		return false;
+
+	string tabName = TeGetBaseName(dbFileName.c_str());
+	int n=0;
+	while (db->tableExist(tabName))
+	{
+		tabName = TeGetBaseName(dbFileName.c_str()) + "_" + Te2String(n);
+		n++;
+	}
+	TeAttributeList attList;
+	TeReadDBFAttributeList (dbFileName, attList);
+
+	if (objectIdAtt.empty())
+		objectIdAtt = "object_id_";
+
+	// check if object id column is already in the list
+	unsigned int j;
+	for (j=0; j<attList.size(); j++)
+	{
+		if ( TeConvertToUpperCase(objectIdAtt) ==  TeConvertToUpperCase(attList[j].rep_.name_))
+		{
+			objectIdAtt = TeConvertToUpperCase(attList[j].rep_.name_);
+			attList[j].rep_.name_ =  objectIdAtt;
+			if (attList[j].rep_.type_ != TeSTRING)
+			{
+				attList[j].rep_.type_ = TeSTRING;
+				attList[j].rep_.numChar_ = 255;
+			}
+			attList[j].rep_.isPrimaryKey_ = true;
+			break;
+		}
+	}
+
+	// if not found create one automatically
+	bool createObjId = false;
+	if (j==attList.size())
+	{
+		TeAttribute at;
+		at.rep_.type_ = TeSTRING;
+		at.rep_.numChar_ = 16;
+		at.rep_.name_ = objectIdAtt;
+		at.rep_.isPrimaryKey_ = true;
+		attList.push_back(at);
+		createObjId = true;
+	}
+
+	if (!db->createTable(tabName,attList))
+	{
+	    DBFClose(hDBF);
+		return false;
+	}
+
+	TeTable table(tabName);
+	table.setAttributeList(attList);
+	table.setUniqueName(objectIdAtt);
+	if (layer)
+		table.setTableType(tableType);
+	else
+		table.setTableType(TeAttrExternal);
+
+	int nrec = DBFGetRecordCount(hDBF);
+	if (TeProgress::instance())
+		TeProgress::instance()->setTotalSteps(nrec);
+	int dt = CLOCKS_PER_SEC/4;
+	int dt2 = CLOCKS_PER_SEC * 5;
+	clock_t	t0, t1, t2;
+	t2 = clock();
+	t0 = t1 = t2;
+	int iRecord;
+	for (iRecord = 0; iRecord < nrec; iRecord++)
+    {
+		TeTableRow row;
+		int i;
+		for( i = 0; i < DBFGetFieldCount(hDBF); i++ )
+		{
+			string value =  DBFReadStringAttribute(hDBF, iRecord, i);
+			row.push_back ( value ); // inserts a value into the row
+		}
+		if (createObjId)
+			row.push_back(Te2String(iRecord));
+		table.add(row); 
+		if ((iRecord+1 % 100) == 0)
+		{
+			if (!db->insertTable(table))
+			{
+				DBFClose( hDBF );
+				table.clear();
+				if (TeProgress::instance())
+					TeProgress::instance()->reset();		
+				return false;
+			}
+			table.clear();
+			if (TeProgress::instance())
+			{
+				t2 = clock();
+				if (int(t2-t1) > dt)
+				{
+					t1 = t2;
+					if (TeProgress::instance()->wasCancelled())
+						break;
+					if ((int)(t2-t0) > dt2)
+						TeProgress::instance()->setProgress(iRecord);
+				}
+			}
+		}
+    }
+	if (table.size() > 0)
+	{
+		db->insertTable(table);
+		table.clear();
+	}
+	if (TeProgress::instance())
+		TeProgress::instance()->reset();		
+    DBFClose( hDBF );
+	if (iRecord == 0)
+		return false;
+	if (layer)
+		db->insertTableInfo(layer->id(),table);
+	else
+		db->insertTableInfo(0,table);
+
+	return true;
+}
+
+void TeReadSHPAttributes (const string& dbfFileName, TeTable& table)
+{
+	string filePrefix = TeGetName (dbfFileName.c_str()) ;
+	string fileName = filePrefix + ".dbf";
+
+/* -------------------------------------------------------------------- */
+/*	Get Attributes definitions.											*/
+/* -------------------------------------------------------------------- */
+	TeAttributeList attList;
+	TeReadDBFAttributeList ( fileName, attList );
+	table.setAttributeList( attList );
+
+/* -------------------------------------------------------------------- */
+/*      Open the file.                                                  */
+/* -------------------------------------------------------------------- */
+    DBFHandle hDBF = DBFOpen( fileName.c_str(), "rb" );
+    if( hDBF == NULL )
+    {
+			throw TeException ( UNABLE_TO_OPEN_DBF_FILE, fileName, true );
+    }
+    
+/* -------------------------------------------------------------------- */
+/*	If there is no data in this file let the user know.		*/
+/* -------------------------------------------------------------------- */
+    if( DBFGetFieldCount(hDBF) == 0 )
+    {
+			throw TeException ( NO_DATA_IN_DBF_FILE, fileName );
+    }
+
+/* -------------------------------------------------------------------- */
+/*	Read all the records 						                        */
+/* -------------------------------------------------------------------- */
+	for( int iRecord = 0; iRecord < DBFGetRecordCount(hDBF); iRecord++ )
+    {
+		TeTableRow row;
+		int 	i;
+
+		for( i = 0; i < DBFGetFieldCount(hDBF); i++ )
+		{
+			string value =  DBFReadStringAttribute( hDBF, iRecord, i ) ;
+			row.push_back ( value ); // inserts a value into the row
+		}
+		table.add ( row ); // adds a row to a table
+    }
+    DBFClose( hDBF );
+}
+
+
+bool TeReadDBFAttributes (const string& dbfFileName, TeTable& table, 
+						  int nrecords, int rinitial, bool createAuto)
+{
+	string filePrefix = TeGetName (dbfFileName.c_str()) ;
+	string fileName = filePrefix + ".dbf";
+
+// -------------------------------------------------------------------- 
+//      Open the file.                                                  
+// -------------------------------------------------------------------- 
+    DBFHandle hDBF = DBFOpen( fileName.c_str(), "rb" );
+    if( hDBF == NULL )
+    {
+			throw TeException ( UNABLE_TO_OPEN_DBF_FILE, fileName, true );
+    }
+    
+// -------------------------------------------------------------------- 
+//	If there is no data in this file let the user know.		
+// -------------------------------------------------------------------- 
+    if( DBFGetFieldCount(hDBF) == 0 )
+    {
+			throw TeException ( NO_DATA_IN_DBF_FILE, fileName );
+    }
+
+	if (rinitial >= DBFGetRecordCount(hDBF))
+		return false;
+
+	if (nrecords < 1 || nrecords > DBFGetRecordCount(hDBF))
+		nrecords = DBFGetRecordCount(hDBF);
+
+// -------------------------------------------------------------------- 
+//	Read all the records 						                        
+// -------------------------------------------------------------------- 
+	int count = 0;
+	for( int iRecord = rinitial; (iRecord < DBFGetRecordCount(hDBF) && count < nrecords); iRecord++ )
+    {
+		TeTableRow row;
+		int 	i;
+		for( i = 0; i < DBFGetFieldCount(hDBF); i++ )
+		{
+			string value =  DBFReadStringAttribute( hDBF, iRecord, i ) ;
+			row.push_back ( value ); // inserts a value into the row
+		}
+		
+		// if asked create a auto number extra column at the end
+		if (createAuto)
+			row.push_back(Te2String(iRecord));
+
+		table.add ( row ); // adds a row to a table
+		count++;
+    }
+    DBFClose( hDBF );
+	if (count > 0)
+		return true;
+	return false;
+}
+
+void
+TeImportDBFIndexes(const string& shpFileName, vector<string>& indexVect, const string objectIdAttr )
+{
+	string filePrefix = TeGetName(shpFileName.c_str());
+	string fileName = filePrefix + ".dbf";
+
+/* -------------------------------------------------------------------- */
+/*	Get index position.													*/
+/* -------------------------------------------------------------------- */
+	int i=0, indexPos=-1;
+
+	if (!objectIdAttr.empty())
+	{
+		TeAttributeList attList;
+		TeReadDBFAttributeList ( fileName, attList );
+		TeAttributeList::iterator it = attList.begin();
+		while ( it != attList.end() )
+		{
+			TeAttribute att = *it;
+			if (TeConvertToUpperCase(att.rep_.name_) == TeConvertToUpperCase(objectIdAttr))
+			{
+				indexPos = i;
+				break;
+			}
+			it++;
+			i++;
+		}
+	}
+
+/* -------------------------------------------------------------------- */
+/*      Open the file.                                                  */
+/* -------------------------------------------------------------------- */
+    DBFHandle hDBF = DBFOpen( fileName.c_str(), "rb" );
+    if( hDBF == NULL )
+    {
+			throw TeException ( UNABLE_TO_OPEN_DBF_FILE, fileName, true );
+    }
+    
+/* -------------------------------------------------------------------- */
+/*	If there is no data in this file let the user know.		*/
+/* -------------------------------------------------------------------- */
+	int nRecords = DBFGetFieldCount(hDBF);
+    if( nRecords  == 0 )
+    {
+			throw TeException ( NO_DATA_IN_DBF_FILE, fileName );
+    }
+
+/* -------------------------------------------------------------------- */
+/*	Read all the records 						                        */
+/* -------------------------------------------------------------------- */
+    
+	for( int iRecord = 0; iRecord < nRecords; iRecord++ )
+	{
+		if (indexPos == -1)
+			indexVect.push_back (Te2String(iRecord+1)); 
+		else
+			indexVect.push_back ( DBFReadStringAttribute( hDBF, iRecord, indexPos ) );
+	}
+
+    DBFClose( hDBF );
+}
+
+TeShapefileDriver::TeShapefileDriver(std::string fileName):
+	hSHP_(0),
+	hDBF_(0)
+{
+	// check if format is complete (SHP, SHX e DBF files exist)
+	string filePrefix = TeGetName(fileName.c_str());
+
+	shpFileName_ = filePrefix + ".shp";
+	if (access(shpFileName_.c_str(),04) == -1)
+	{
+		shpFileName_ = filePrefix + ".SHP";
+		if (access(shpFileName_.c_str(),04) == -1)
+			return;
+	}
+	dbfFileName_ = filePrefix + ".dbf";
+	if (access(dbfFileName_.c_str(),04) == -1)
+	{
+		dbfFileName_ = filePrefix + ".DBF";
+		if (access(dbfFileName_.c_str(),04) == -1)
+			return;
+	}
+	string ftest = filePrefix + ".shx";
+	if (access(ftest.c_str(),04) == -1)
+	{
+		ftest = filePrefix + ".SHX";
+		if (access(ftest.c_str(),04) == -1)
+			return;
+	}
+	hSHP_ = SHPOpen(shpFileName_.c_str(),"rb");
+	if (hSHP_==0)
+		return;
+
+    hDBF_ = DBFOpen(dbfFileName_.c_str(), "rb");
+    if (hDBF_==0)
+    {
+		SHPClose(hSHP_);
+		return ;
+    }
+}
+
+std::string
+TeShapefileDriver::getFileName()
+{
+	return shpFileName_;
+}
+
+TeShapefileDriver::~TeShapefileDriver()
+{
+	close();
+}
+
+bool
+TeShapefileDriver::isDataAccessible()
+{
+	return (hSHP_!=0 && hDBF_!=0);
+}
+
+TeProjection*
+TeShapefileDriver::getDataProjection()
+{
+	string filePrefix = TeGetName(shpFileName_.c_str());
+	string prjFileName_ = filePrefix + ".prj";
+	if (access(prjFileName_.c_str(),04) == -1)
+	{
+		prjFileName_ = filePrefix + ".PRJ";
+		if (access(prjFileName_.c_str(),04) == -1)
+		{
+			TeProjection* proj = new TeNoProjection();
+			return proj;
+		}
+	}
+	TeAsciiFile prjFile(prjFileName_);
+	string prjdesc = prjFile.readAll();
+	TeProjection* proj = TeGetTeProjectionFromWKT(prjdesc);
+	if (!proj)
+		proj = new TeNoProjection();
+	return proj;
+}
+
+bool 
+TeShapefileDriver::getDataInfo(unsigned int& nObjects , TeBox& ext, TeGeomRep& repres)
+{
+	if (!hSHP_)
+		return false;
+
+	int		nShapeType, nentities=0;
+	double 	adfMinBound[4], adfMaxBound[4];
+	SHPGetInfo(hSHP_, &nentities, &nShapeType, adfMinBound, adfMaxBound);
+	nObjects = nentities;
+	
+	ext.x1_ = adfMinBound[0];
+	ext.y1_ = adfMinBound[1];
+	ext.x2_ = adfMaxBound[0];
+	ext.y2_ = adfMaxBound[1];
+
+	switch (nShapeType) 
+	{
+		case SHPT_NULL:
+			repres = TeGEOMETRYNONE;
+		break;
+		// --- point geometries ---
+		case SHPT_POINTZ:	
+		case SHPT_MULTIPOINTZ:
+		case SHPT_POINTM:
+		case SHPT_MULTIPOINTM:
+		case SHPT_POINT:
+		case SHPT_MULTIPOINT:
+			repres = TePOINTS;
+		break;
+		// --- line geometries ---
+		case SHPT_ARCZ:
+		case SHPT_ARCM:
+		case SHPT_ARC:
+			repres = TeLINES;
+		break;
+		// --- polygon geometries ---
+		case SHPT_POLYGON:
+		case SHPT_POLYGONM:
+		case SHPT_POLYGONZ:
+			repres = TePOLYGONS;
+	}
+	return true;
+}
+
+bool 
+TeShapefileDriver::loadData(TeSTElementSet* dataSet)
+{
+	int		nShapeType, nentities=0;
+	double 	adfMinBound[4], adfMaxBound[4];
+	SHPGetInfo(hSHP_, &nentities, &nShapeType, adfMinBound, adfMaxBound);
+    
+	int natt = DBFGetFieldCount(hDBF_);
+	TeAttributeList attList;
+	TeReadDBFAttributeList(dbfFileName_, attList);
+
+	TeAttributeRep repobjid;
+	repobjid.name_ = "object_id";
+	repobjid.numChar_ = 16;
+
+	TeAttribute attobjid;
+	attobjid.rep_ = repobjid;
+
+	TeProperty propobjid;
+	propobjid.attr_ = attobjid;
+	
+	int i,n;
+	SHPObject* psShape;
+	for (i=0; i<nentities; ++i)
+	{
+		string objectid = Te2String(i);
+		TeSTInstance curObj;
+		curObj.objectId(objectid);
+
+		TePropertyVector prop;
+		psShape = SHPReadObject(hSHP_,i);
+		if (TeDecodeShape(psShape,curObj.geometries(),objectid))
+		{
+			propobjid.value_ = objectid;
+			prop.push_back(propobjid);
+			for(n=0;n<natt;++n)
+			{
+				string value = DBFReadStringAttribute(hDBF_,i,n);
+				TeProperty p;
+				p.attr_ = attList[n];
+				p.value_ = value;
+				prop.push_back(p);
+			}
+			curObj.properties(prop);
+			dataSet->insertSTInstance(curObj);
+			curObj.theme(0);
+		}
+		SHPDestroyObject(psShape);
+	}
+	return true;
+}
+
+bool 
+TeShapefileDriver::getDataAttributesList(TeAttributeList& attList)
+{
+	attList.clear();
+	TeReadDBFAttributeList(dbfFileName_,attList);
+	return (!attList.empty());
+}
+
+void 
+TeShapefileDriver::close()
+{	
+	if (hSHP_)
+	{
+		SHPClose(hSHP_);
+		hSHP_ = 0;
+	}
+	if (hDBF_)
+	{
+		DBFClose(hDBF_);
+		hDBF_ = 0;
+	}
+	shpFileName_.clear();
+	dbfFileName_.clear();
+}
+
+
diff --git a/src/terralib/drivers/shapelib/TeDriverSHPDBF.h b/src/terralib/drivers/shapelib/TeDriverSHPDBF.h
new file mode 100755
index 0000000..443094f
--- /dev/null
+++ b/src/terralib/drivers/shapelib/TeDriverSHPDBF.h
@@ -0,0 +1,277 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeSHPDBFDriver.h
+    \brief This file contains the header of the functions that deal with shapefile and dbf formats
+	using the shapelib library
+*/
+#ifndef __TERRALIB_INTERNAL_DBFSHPDRIVER_H
+#define __TERRALIB_INTERNAL_DBFSHPDRIVER_H
+
+#include <TeTable.h>
+#include <TeSTElementSet.h>
+#include <TeDataTypes.h>
+#include <TeMultiGeometry.h>
+#include <shapefil.h>
+
+#include <string>
+using namespace std;
+
+class TeLayer;
+class TeAsciiFile;
+class TeProjection;
+class TeDatabase;
+class TePolygonSet;
+class TeQuerier;
+class TeTheme;
+
+
+/** @defgroup Formats Geographical data formats
+ *  @ingroup Formats
+ *  Functions related to encoding/decoding of files in the formats supported by TerraLib
+ *  @{
+ */
+
+/** @defgroup DBF DBF tables
+ *  @ingroup Formats
+ *  Functions related to DBF table format
+ *  @{
+ */
+
+/** Reads the list of attributes specified in DBF file 
+   \param dbfFileName	DBF input file name
+   \param attList		returns the DBF list of attributes
+   \return TRUE if the list of attributes were was successfully read and FALSE otherwise
+*/
+bool TeReadDBFAttributeList(const string& dbfFileName, TeAttributeList& attList);
+
+/** Reads a set of records from a shapelib to a structure in memory
+	\param dbfFileName	DBF file name
+	\param table		to return the set of records in memory
+	\param nrecords		number of records to be read
+	\param rinitial		number of the initial record
+	\param createAuto	flag used to indicate if an auto number columns should be added to each record
+*/
+bool TeReadDBFAttributes (const string& dbfFileName, TeTable& table, 
+						  int nrecords=-1, int rinitial=0, bool createAuto=false);
+
+/** Imports a DBF table to a TerraLib database
+	This function imports a DBF to a TerraLib database. An attribute table can be associated to a
+	particular layer, or as an external table that will be linked to any layer when genereated a 
+	theme. A column called object_id_ will be added with unique values automatically generated.
+	\param dbfFileName	DBF file name
+	\param db			pointer to a TerraLib database
+	\param layer		pointer to a layer to which the table will associated
+	\param tableType	type of the attribute table
+*/
+bool TeImportDBFTable(const string& dbfFileName, TeDatabase* db, TeLayer* layer=0,TeAttrTableType tableType=TeAttrExternal, string objectIdAtt = "object_id_");
+
+//! Decodify a row of a DBF into a TeTableRow structure 
+/*! 
+	\param dbfHandle pointer to a DBF handler
+	\param nr number of the row
+	\param row reference to a row that will store the data
+*/
+void TeDBFRowDecode		(DBFHandle& dbfHandle, int nr, TeTableRow& row);
+/** @} */ // End of subgroup DBF format
+
+/** @defgroup Shape decode 
+ *  @ingroup SHP
+ *  Auxiliary functions to decode one shape using shapelib
+ *  @{
+ */
+//! Decodify a ShapeObject into a TerraLib point set
+/*! 
+	\param psShape pointer to a shapelib shape object 
+	\param ps TerraLib point set to receive the geometries
+	\param objectId TerraLib identifier to this object
+*/
+void TeSHPPointDecode	(SHPObject* psShape, TePointSet& ps, string& objectId);
+
+//! Decodify a ShapeObject into a TerraLib line set
+/*! 
+	\param psShape pointer to a shapelib shape object 
+	\param ps TerraLib line set to receive the geometries
+	\param objectId TerraLib identifier to this object
+*/
+void TeSHPPolyLineDecode(SHPObject* psShape, TeLineSet& ls, string& objectId);
+
+//! Decodify a ShapeObject into a TerraLib polygon set
+/*! 
+	\param psShape pointer to a shapelib shape object 
+	\param ps TerraLib polygon set to receive the geometries
+	\param objectId TerraLib identifier to this object
+*/
+void TeSHPPolygonDecode	(SHPObject* psShape, TePolygonSet& pols, string& objectId);
+
+//! Decodify a ShapeObject into a TerraLib multigeometry set
+/*! 
+	\param psShape pointer to a shapelib shape object 
+	\param geometries TerraLib multi geometry set to receive the geometries
+	\param objectId TerraLib identifier to this object
+*/
+bool TeDecodeShape(SHPObject* psShape, TeMultiGeometry& geomestries, string& objectId);
+/** @} */ // End of Shape decode group
+
+
+/** @defgroup SHP Shapefile format
+ *  @ingroup Formats
+ *  Functions related to Shapefile format. Uses some functions related to DBF attribute table format.
+ *  @{
+ */ 
+
+/** Get the metadata information of a shapefile
+	\param shpFileName	Shapefile name
+	\param nShapes		to return the number of shapes in the shapefile
+	\param box			to return the boundary box of the shapes contained in the shapefile
+	\param rep			to return the type of geometry exist in the shapefile
+	\return true if succeeds and and false otherwise
+*/
+bool
+TeGetSHPInfo(std::string shpfileName, unsigned int& nShapes, TeBox& box, TeGeomRep& rep);
+
+
+/** Imports a geo data in a shapefile format to a TerraLib database
+	\param shpFileName	Shapefile name
+	\param db			pointer to a TerraLib database
+	\param layerName	name of the layer that will contain the data (optional)
+	\return a pointer to created layer if the data was imported successfully and 0 otherwise
+*/
+TeLayer* TeImportShape(const string& shpFileName, TeDatabase* db, const string& layerName="");
+
+/** Imports a shapefile to a layer TerraLib
+	\param layer			pointer to a layer
+	\param shpFileName		shapefile file name
+	\param attrTableName	the name that the attribute table will be saved
+	\param objectIdAttr		name of the attribute that has the identification of objects
+	\param chunkSize		the number of objects in memory before save them in the layer
+*/
+bool TeImportShape (TeLayer* layer, const string& shpFileName, string attrTableName="",  
+					string objectIdAttr="", unsigned int  chunkSize = 60);
+
+/** Exports a querier to a shapefile
+	\param	querier		pointer to a valid querier
+	\param baseName		name of the output shapefile
+	\return TRUE if the data was successfully exported and FALSE otherwise
+*/
+bool TeExportQuerierToShapefile(TeQuerier* querier, const std::string& baseName);
+
+/** Exports a theme in a TerraLib database to a shapefile
+	\param theme		pointer to the layer
+	\param selOb		the objetct selection: TeALL, TePOINTED, TeQUERIED...
+	\param baseName		name of the output shapefile. If empty, the file will have the same name as the Theme.
+	\return TRUE if the data was successfully exported and FALSE otherwise
+*/
+bool TeExportThemeToShapefile(TeTheme* theme, TeSelectedObjects selOb = TeAll, const std::string& baseName="");
+
+/** Exports a layer in a TerraLib database to a shapefile
+   \param layer			pointer to the layer
+   \param baseName		name of the output shapefile. If empty, the file will have the same name as the Layer.
+   \return TRUE if the data was successfully exported and FALSE otherwise
+*/
+bool TeExportLayerToShapefile(TeLayer* layer, const string& baseName="");
+
+/** Exports a layer in a TerraLib database to a file in MID/MIF format
+   \deprecated This is an overloaded function, provided for compatibility. It behaves essentially like the above function.
+*/
+bool TeExportShapefile(TeLayer* layer, const string& shpFileName, const string& tableName, const string& restriction = "");
+
+/** Exports a TerraLib polygon set to a shapefile
+	Each polygon will be a shape. Only one attribute will be created: the object id of the polygon.
+   \param ps				the polygon set
+   \param base_file_name	the base file name used to build the shapefile
+   \return TRUE if the data was successfully exported and FALSE otherwise
+*/
+bool TeExportPolygonSet2SHP( const TePolygonSet& ps,const string& base_file_name  );
+
+//! Builds the spatial object set from database according to the restrictions previously defined
+/*! 
+	\param stoset the STOSet that will be filled 
+	\param fileName shape file name
+*/
+bool TeSTOSetBuildSHP(TeSTElementSet& stoset, const string& fileName);
+
+/** @} */ // End of subgroup SHAPEFILE format
+
+
+#include <TeGeoDataDriver.h>
+
+//! Concrete implementation of a driver shapefiles
+class TeShapefileDriver: public TeGeoDataDriver
+{
+	std::string shpFileName_;
+	std::string dbfFileName_;
+	SHPHandle	hSHP_;
+	DBFHandle	hDBF_;
+
+public:
+
+	//! Constructor from a file name
+	TeShapefileDriver(std::string fileName);
+
+	//! Destructor
+	~TeShapefileDriver();
+
+	std::string getFileName();
+
+	//! Returns true or false whether the data file is accessible
+	bool isDataAccessible();
+
+	//! Returns the spatial reference associated to the data as an instance of TeProjection 
+	TeProjection* getDataProjection();
+
+	//! Loads the minimum metadata information about the data
+	/*
+		\param nObjects to return the number of objects accessible in the data set
+		\param ext	to return the spatial extension of the geometries in the data set
+		\param repres to return the type of geometries in the file
+		\return true if or false whether it can retrieve the information or not
+	*/
+	bool getDataInfo(unsigned int& nObjects , TeBox& ext, TeGeomRep& repres);
+
+	//! Loads the list of descriptive attributes of the objetcts represented in the file
+	bool getDataAttributesList(TeAttributeList& attList);
+
+	//! Loads the data into an TeSTElementSet structure in memory
+	/*
+		\param dataSet to return data set
+		\return true if or false whether it can retrieve the information or not
+	*/
+	bool loadData(TeSTElementSet* dataSet);
+
+	//! Releases internal structures and invalidate the access to the data file
+	void close();
+};
+
+
+/** \example importShape.cpp
+ Shows how to import geographical data in shapefile format
+ */
+
+/** \example importDBF.cpp
+ Shows how to import a DBF table
+ */
+
+/** @} */ // End of group ImpExp format
+
+#endif
+
diff --git a/src/terralib/functions/TeExportDBF.cpp b/src/terralib/drivers/shapelib/TeExportDBF.cpp
old mode 100644
new mode 100755
similarity index 100%
rename from src/terralib/functions/TeExportDBF.cpp
rename to src/terralib/drivers/shapelib/TeExportDBF.cpp
diff --git a/src/terralib/drivers/shapelib/TeExportSHP.cpp b/src/terralib/drivers/shapelib/TeExportSHP.cpp
new file mode 100755
index 0000000..ac55d82
--- /dev/null
+++ b/src/terralib/drivers/shapelib/TeExportSHP.cpp
@@ -0,0 +1,663 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+
+#include "TeDriverSHPDBF.h"
+#include "TeTable.h"
+#include "TeException.h"
+#include "TeUtils.h"
+#include "TeLayer.h"
+#include "TeDatabase.h"
+#include "TeQuerier.h"
+
+#include <assert.h>
+#include <vector>
+
+DBFHandle TeCreateDBFFile (const string& dbfFilename, TeAttributeList& attList)
+{
+	DBFHandle hDBF = DBFCreate( dbfFilename.c_str() );
+	if( hDBF == 0 )
+		return 0;
+	
+	int i =0;
+	TeAttributeList::iterator it=attList.begin();
+
+	while ( it != attList.end() )
+	{
+		TeAttribute at = (*it);
+		string atName = at.rep_.name_;
+
+		if (atName.size() > 10)
+		{
+			int extra = (int)(atName.size() - 10)/2;
+			int middle = (int)(atName.size()/2);
+			string str = atName.substr(0,middle-extra-1);
+			str += atName.substr(middle+extra);
+			atName = str;
+		}
+		if (at.rep_.type_ == TeSTRING )
+		{
+			if (DBFAddField( hDBF, atName.c_str(), FTString, at.rep_.numChar_, 0 ) == -1 )
+				return 0;
+		}
+		else if (at.rep_.type_ == TeINT)
+		{
+			if (DBFAddField( hDBF, atName.c_str(), FTInteger, 32, 0 ) == -1 )
+				return 0;
+		}
+		else if (at.rep_.type_ == TeREAL)
+		{
+			if (DBFAddField( hDBF, atName.c_str(), FTDouble, 40, 15 ) == -1 )
+				return 0;
+		}
+		// OBS: shapelib doesn�t deal with xBase field type for Date 
+		// we are transforming it to string
+		else if (at.rep_.type_ == TeDATETIME)
+		{
+			if (DBFAddField( hDBF, atName.c_str(), FTDate, 8, 0 ) == -1 )
+				return 0;
+		}
+		++i;
+		++it;
+	}
+	return hDBF;
+}
+
+bool TeExportPolygonSet2SHP( const TePolygonSet& ps,const std::string& base_file_name  )
+{
+    // creating files names
+    std::string dbfFilename = base_file_name + ".dbf";
+    std::string shpFilename = base_file_name + ".shp";
+
+    // creating polygons attribute list ( max attribute size == 25 )
+    TeAttributeList attList;
+    TeAttribute at;
+    at.rep_.type_ = TeSTRING;               //the id of the cell
+    at.rep_.numChar_ = 25;
+    at.rep_.name_ = "object_id_";
+    at.rep_.isPrimaryKey_ = true;
+	attList.push_back(at);
+    
+    /* DBF output file handle creation */
+	DBFHandle hDBF = TeCreateDBFFile (dbfFilename, attList);
+	if ( hDBF == 0 )
+		return false;
+    
+    /* SHP output file handle creation */
+    SHPHandle hSHP = SHPCreate( shpFilename.c_str(), SHPT_POLYGON );
+    if( hSHP == 0 ) 
+	{
+      DBFClose( hDBF );
+      return false;
+    }
+    
+    /* Writing polygons */
+    int iRecord = 0;
+    int totpoints = 0;
+    double  *padfX, *padfY;
+    SHPObject       *psObject;
+    int posXY, npoints, nelem;
+    int nVertices;
+    int* panParts;
+
+    TePolygonSet::iterator itps;
+    TePolygon poly;
+
+    for (itps = ps.begin() ; itps != ps.end() ; itps++ ) {
+      poly=(*itps);
+      totpoints = 0;
+      nVertices = poly.size();
+      for (unsigned int n=0; n<poly.size();n++) {
+        totpoints += poly[n].size();
+      }
+
+      panParts = (int *) malloc(sizeof(int) * nVertices);
+      padfX = (double *) malloc(sizeof(double) * totpoints);
+      padfY = (double *) malloc(sizeof(double) * totpoints);
+      posXY = 0;
+      nelem = 0;
+      
+      for (unsigned int l=0; l<poly.size(); ++l) {
+        if (l==0) {
+          if (TeOrientation(poly[l]) == TeCOUNTERCLOCKWISE) {
+            TeReverseLine(poly[l]);
+          }
+        } else {
+          if (TeOrientation(poly[l]) == TeCLOCKWISE) {
+            TeReverseLine(poly[l]);
+          }
+        }
+        
+        npoints = poly[l].size();
+        panParts[nelem]=posXY;
+        
+        for (int m=0; m<npoints; m++ ) {
+          padfX[posXY] = poly[l][m].x_;
+          padfY[posXY] = poly[l][m].y_;
+          posXY++;
+        }
+        nelem++;
+      }
+                
+      psObject = SHPCreateObject( SHPT_POLYGON, -1, nelem, panParts, NULL,
+        posXY, padfX, padfY, NULL, NULL );
+        
+      int shpRes = SHPWriteObject( hSHP, -1, psObject );
+      if (shpRes == -1 )
+	  {
+	      DBFClose( hDBF );
+		  SHPClose( hSHP );
+		  return false;
+	  }
+        
+      SHPDestroyObject( psObject );
+      free( panParts );
+      free( padfX );
+      free( padfY );
+
+      // writing attributes - same creation order
+      DBFWriteStringAttribute(hDBF, iRecord, 0, poly.objectId().c_str() );
+            
+      iRecord++;
+    }
+    
+    DBFClose( hDBF );
+    SHPClose( hSHP );
+    return true;  
+}
+
+
+bool
+TeExportQuerierToShapefile(TeQuerier* querier, const std::string& base)
+{
+	// check initial conditions
+	if (!querier)
+		return false;
+
+	if (!querier->loadInstances())
+		return false;
+
+	// Get the list of attributes defined by the input querier
+	bool onlyObjId = false;
+	TeAttributeList qAttList = querier->getAttrList();
+	if (qAttList.empty())
+	{
+		TeAttributeList qAttList;
+		TeAttribute at;
+		at.rep_.type_ = TeSTRING;               
+		at.rep_.numChar_ = 100;
+		at.rep_.name_ = "ID";
+		at.rep_.isPrimaryKey_ = true;
+		qAttList.push_back(at);
+		onlyObjId = true;
+	}
+
+	// Handles to each type of geometries that will be created if necessary
+	DBFHandle hDBFPol = 0;
+	SHPHandle hSHPPol = 0;
+	DBFHandle hDBFLin = 0;
+	SHPHandle hSHPLin = 0;
+	DBFHandle hDBFPt = 0;
+	SHPHandle hSHPPt = 0;
+
+	// Some auxiliary variables
+    int totpoints;
+    double*	padfX;
+	double*	padfY;
+    unsigned int nVertices;
+    int* panPart;
+    SHPObject *psObject;
+    unsigned int posXY, npoints, nelem;
+	int shpRes;
+
+	// progress information
+	if (TeProgress::instance())
+		TeProgress::instance()->setTotalSteps(querier->numElemInstances());
+	clock_t	t0, t1, t2;
+	t2 = clock();
+	t0 = t1 = t2;
+	int dt = CLOCKS_PER_SEC/2;
+	int dt2 = CLOCKS_PER_SEC; //* .000001;
+
+	// Loop through the instances writting their geometries and attributes
+	unsigned int iRecPol=0, iRecLin=0, iRecPt=0;
+	unsigned int n, l, m;
+	unsigned int nIProcessed = 0;
+	TeSTInstance st;
+	while(querier->fetchInstance(st))
+	{
+		totpoints = 0;
+		nVertices = 0;
+		if (st.hasPolygons())
+		{
+			TePolygonSet& polSet = st.getPolygons();
+			TePolygonSet::iterator itps;
+			int nVerticesCount = 0;
+			for (itps = polSet.begin(); itps != polSet.end(); ++itps) 
+			{
+				nVertices = (*itps).size();
+				nVerticesCount += nVertices;
+				for (n=0; n<nVertices;++n) 
+					totpoints += (*itps)[n].size();
+			}
+
+			panPart = (int *) malloc(sizeof(int) * nVerticesCount);
+			padfX = (double *) malloc(sizeof(double) * totpoints);
+			padfY = (double *) malloc(sizeof(double) * totpoints);
+
+			posXY = 0;
+			nelem = 0;
+			for (itps = polSet.begin(); itps != polSet.end(); ++itps) 
+			{
+				TePolygon poly = *itps;
+				for (l=0; l<poly.size(); ++l) 
+				{
+					if (l==0) 
+					{
+						if (TeOrientation(poly[l]) == TeCOUNTERCLOCKWISE) 
+							TeReverseLine(poly[l]);
+					}
+					else 
+					{
+						if (TeOrientation(poly[l]) == TeCLOCKWISE)
+							TeReverseLine(poly[l]);
+					}
+					npoints = poly[l].size();
+					panPart[nelem]=posXY;
+        
+					for (m=0; m<npoints; ++m) 
+					{
+						padfX[posXY] = poly[l][m].x_;
+						padfY[posXY] = poly[l][m].y_;
+						posXY++;
+					}
+					nelem++;
+				}
+			}
+			psObject = SHPCreateObject(SHPT_POLYGON, -1, nelem, panPart, NULL, posXY, padfX, padfY, NULL, NULL);
+			if (hSHPPol == 0)
+			{
+				string fname = base + "_pol.shp";
+				hSHPPol = SHPCreate(fname.c_str(), SHPT_POLYGON);
+   				assert (hSHPPol != 0);
+			}	
+			shpRes = SHPWriteObject(hSHPPol, -1, psObject);
+			SHPDestroyObject(psObject);
+			free(panPart);
+			free(padfX);
+			free(padfY);
+			assert(shpRes != -1);   
+			if (hDBFPol == 0)
+			{
+				hDBFPol = TeCreateDBFFile(base + "_pol.dbf", qAttList);
+				assert (hDBFPol != 0);
+			}
+			if (onlyObjId)
+			{
+				DBFWriteStringAttribute(hDBFPol, iRecPol, 0, st.objectId().c_str());
+			}
+			else
+			{
+				string val;
+				for (n=0; n<qAttList.size();++n) 
+				{
+					st.getPropertyValue(val,n);
+					if (qAttList[n].rep_.type_ == TeSTRING || qAttList[n].rep_.type_ == TeDATETIME)
+					{
+						DBFWriteStringAttribute(hDBFPol, iRecPol, n, val.c_str());
+					}
+					else if (qAttList[n].rep_.type_ == TeINT)
+					{
+						DBFWriteIntegerAttribute(hDBFPol, iRecPol, n, atoi(val.c_str()));
+					}
+					else if (qAttList[n].rep_.type_ == TeREAL)
+					{
+						DBFWriteDoubleAttribute(hDBFPol, iRecPol, n, atof(val.c_str()));
+					}
+				}
+			}
+			++iRecPol;
+		}
+		if (st.hasCells())
+		{
+			TeCellSet& cellSet = st.getCells();
+			nVertices = cellSet.size();
+			totpoints = nVertices*5;
+			panPart = (int *) malloc(sizeof(int) * nVertices);
+			padfX = (double *) malloc(sizeof(double) * totpoints);
+			padfY = (double *) malloc(sizeof(double) * totpoints);
+			posXY = 0;
+			nelem = 0;
+			TeCellSet::iterator itcs;
+			for (itcs=cellSet.begin(); itcs!=cellSet.end(); ++itcs)
+			{
+				panPart[nelem]=posXY;
+				padfX[posXY] = (*itcs).box().lowerLeft().x();
+				padfY[posXY] = (*itcs).box().lowerLeft().y();
+				posXY++;		
+				padfX[posXY] = (*itcs).box().upperRight().x();
+				padfY[posXY] = (*itcs).box().lowerLeft().y();
+				posXY++;		
+				padfX[posXY] = (*itcs).box().upperRight().x();
+				padfY[posXY] = (*itcs).box().upperRight().y();
+				posXY++;		
+				padfX[posXY] = (*itcs).box().lowerLeft().x();
+				padfY[posXY] = (*itcs).box().upperRight().y();
+				posXY++;		
+				padfX[posXY] = (*itcs).box().lowerLeft().x();
+				padfY[posXY] = (*itcs).box().lowerLeft().y();
+				++posXY;	
+				++nelem;
+			} 
+			psObject = SHPCreateObject(SHPT_POLYGON, -1, nelem, panPart, NULL,posXY, padfX, padfY, NULL, NULL);
+			if (hSHPPol == 0)
+			{
+				string fname = base + "_pol.shp";
+				hSHPPol = SHPCreate(fname.c_str(), SHPT_POLYGON);
+   				assert (hSHPPol != 0);
+			}	
+			shpRes = SHPWriteObject(hSHPPol, -1, psObject);
+			SHPDestroyObject(psObject);
+			free(panPart);
+			free(padfX);
+			free(padfY);
+			assert(shpRes != -1);
+			if (hDBFPol == 0)
+			{
+				hDBFPol = TeCreateDBFFile(base + "_pol.dbf", qAttList);
+				assert (hDBFPol != 0);
+			}
+
+			if (onlyObjId)
+			{
+				DBFWriteStringAttribute(hDBFPol, iRecPol, 0, st.objectId().c_str());
+			}
+			else
+			{
+				string val;
+				for (n=0; n<qAttList.size();++n) 
+				{
+					st.getPropertyValue(val,n);
+					if (qAttList[n].rep_.type_ == TeSTRING || qAttList[n].rep_.type_ == TeDATETIME)
+					{
+						DBFWriteStringAttribute(hDBFPol, iRecPol, n, val.c_str());
+					}
+					else if (qAttList[n].rep_.type_ == TeINT)
+					{
+						DBFWriteIntegerAttribute(hDBFPol, iRecPol, n, atoi(val.c_str()));
+					}
+					else if (qAttList[n].rep_.type_ == TeREAL)
+					{
+						DBFWriteDoubleAttribute(hDBFPol, iRecPol, n, atof(val.c_str()));
+					}
+				}
+			}
+			++iRecPol;
+		}
+		if (st.hasLines())
+		{
+			TeLineSet& lineSet = st.getLines();
+			nVertices = lineSet.size();
+			TeLineSet::iterator itls;
+			for (itls=lineSet.begin(); itls!=lineSet.end(); ++itls)
+				totpoints += (*itls).size();
+			panPart = (int *) malloc(sizeof(int) * nVertices);
+			padfX = (double *) malloc(sizeof(double) * totpoints);
+			padfY = (double *) malloc(sizeof(double) * totpoints);
+			posXY = 0;
+			nelem = 0;
+			for (itls=lineSet.begin(); itls!=lineSet.end(); ++itls)
+			{
+				panPart[nelem]=posXY;
+				for (l=0; l<(*itls).size(); ++l)
+				{
+					padfX[posXY] = (*itls)[l].x();
+					padfY[posXY] = (*itls)[l].y();
+					++posXY;
+				}
+				++nelem;
+			}
+			psObject = SHPCreateObject(SHPT_ARC, -1, nVertices, panPart, NULL,	posXY, padfX, padfY, NULL, NULL);
+			if (hSHPLin == 0)
+			{
+				string fname = base + "_lin.shp"; 
+				hSHPLin = SHPCreate(fname.c_str(), SHPT_ARC);
+   				assert (hSHPLin != 0);
+			}		
+			shpRes = SHPWriteObject(hSHPLin, -1, psObject);
+			SHPDestroyObject(psObject);
+			free(panPart);
+			free(padfX);
+			free(padfY);
+			assert(shpRes != -1);
+			if (hDBFLin == 0)
+			{
+				hDBFLin = TeCreateDBFFile(base + "_lin.dbf", qAttList);
+				assert (hDBFLin != 0);
+			}
+			if (onlyObjId)
+			{
+				DBFWriteStringAttribute(hDBFLin, iRecLin, 0, st.objectId().c_str());
+			}
+			else
+			{
+				string val;
+				for (n=0; n<qAttList.size();++n) 
+				{
+					st.getPropertyValue(val,n);
+					if (qAttList[n].rep_.type_ == TeSTRING || qAttList[n].rep_.type_ == TeDATETIME)
+					{
+						DBFWriteStringAttribute(hDBFLin, iRecLin, n, val.c_str());
+					}
+					else if (qAttList[n].rep_.type_ == TeINT)
+					{
+						DBFWriteIntegerAttribute(hDBFLin, iRecLin, n, atoi(val.c_str()));
+					}
+					else if (qAttList[n].rep_.type_ == TeREAL)
+					{
+						DBFWriteDoubleAttribute(hDBFLin, iRecLin, n, atof(val.c_str()));
+					}
+				}
+			}
+			++iRecLin;
+		}
+		if (st.hasPoints())
+		{
+			TePointSet& pointSet = st.getPoints();
+			nVertices = pointSet.size();
+			panPart = (int *) malloc(sizeof(int) * nVertices);
+			padfX = (double *) malloc(sizeof(double) * nVertices);
+			padfY = (double *) malloc(sizeof(double) * nVertices);
+			nelem = 0;
+			TePointSet::iterator itpts;
+			for (itpts=pointSet.begin(); itpts!=pointSet.end(); ++itpts)
+			{
+				panPart[nelem] = nelem;
+				padfX[nelem] = (*itpts).location().x();
+				padfY[nelem] = (*itpts).location().y();
+				++nelem;
+			}
+			psObject = SHPCreateObject(SHPT_POINT, -1, nVertices, panPart, NULL, nVertices, padfX, padfY, NULL, NULL );
+			if (hSHPPt == 0)
+			{
+				string fname = base + "_pt.shp";
+				hSHPPt = SHPCreate(fname.c_str(), SHPT_POINT);
+   				assert (hSHPPt != 0);
+			}		
+			shpRes = SHPWriteObject(hSHPPt, -1, psObject);
+			SHPDestroyObject(psObject);
+			free(panPart);
+			free(padfX);
+			free(padfY);
+			assert(shpRes != -1);
+			if (hDBFPt == 0)
+			{
+				hDBFPt = TeCreateDBFFile(base + "_pt.dbf", qAttList);
+				assert (hDBFPt != 0);
+			}
+			if (onlyObjId)
+			{
+				DBFWriteStringAttribute(hDBFPt, iRecPt, 0, st.objectId().c_str());
+			}
+			else
+			{
+				string val;
+				for (n=0; n<qAttList.size();++n) 
+				{
+					st.getPropertyValue(val,n);
+						if (qAttList[n].rep_.type_ == TeSTRING || qAttList[n].rep_.type_ == TeDATETIME)
+					{
+						DBFWriteStringAttribute(hDBFPt, iRecPt, n, val.c_str());
+					}
+					else if (qAttList[n].rep_.type_ == TeINT)
+					{
+						DBFWriteIntegerAttribute(hDBFPt, iRecPt, n, atoi(val.c_str()));
+					}
+					else if (qAttList[n].rep_.type_ == TeREAL)
+					{
+						DBFWriteDoubleAttribute(hDBFPt, iRecPt, n, atof(val.c_str()));
+					}
+				}
+			}
+			++iRecPt;
+		}
+		++nIProcessed;
+		if (TeProgress::instance() && int(t2-t1) > dt)
+		{
+			t1 = t2;
+			if(((int)(t2-t0) > dt2))
+			{
+				if (TeProgress::instance()->wasCancelled())
+					break;
+				else
+					TeProgress::instance()->setProgress(nIProcessed);
+			}
+		}
+
+	}
+	if (hDBFPol != 0)
+		DBFClose(hDBFPol);
+	if (hSHPPol != 0)
+        SHPClose(hSHPPol);
+	if (hDBFLin != 0)
+		DBFClose(hDBFLin);
+	if (hSHPLin != 0)
+        SHPClose(hSHPLin);
+	if (hDBFPt != 0)
+		DBFClose(hDBFPt);
+	if (hSHPPt != 0)
+        SHPClose(hSHPPt);
+
+	if (TeProgress::instance())
+		TeProgress::instance()->reset();
+	return true;
+}
+
+
+bool
+TeExportShapefile(TeLayer* layer, const string& shpFileName, const string& tableName, const string& restriction)
+{
+  	if (!layer || shpFileName.empty())
+		return false;
+
+	// check if asked table exist
+	TeAttrTableVector& vTables = layer->attrTables();
+	TeAttrTableVector::iterator it = vTables.begin();
+	while (it != vTables.end())
+	{
+		if (it->name() == tableName) 
+			break;
+		++it;
+	}
+	if (it == vTables.end())
+		return false;
+	TeAttrTableVector askedTable;
+	askedTable.push_back(*it);
+
+	TeTheme* tempTheme = new TeTheme();
+	tempTheme->attributeRest(restriction);
+	tempTheme->layer(layer);
+	tempTheme->collectionTable("");
+	tempTheme->collectionAuxTable("");
+	tempTheme->setAttTables(askedTable);
+
+	TeQuerierParams qPar(true, true);
+	qPar.setParams(tempTheme);
+
+	TeQuerier* tQuerier = new TeQuerier(qPar);
+	bool res = TeExportQuerierToShapefile(tQuerier, shpFileName);
+	delete tQuerier;
+	delete tempTheme;
+    return res ;
+}
+
+bool 
+TeExportLayerToShapefile(TeLayer* layer, const string& baseName)
+{
+  	if (!layer)
+		return false;
+
+	string fbase = baseName;
+	if (baseName.empty())
+		fbase = layer->name();
+
+	TeTheme* tempTheme = new TeTheme();
+	tempTheme->layer(layer);
+	tempTheme->collectionTable("");
+	tempTheme->collectionAuxTable("");
+	tempTheme->setAttTables(layer->attrTables());
+
+	TeQuerierParams qPar(true, true);
+	qPar.setParams(tempTheme);
+
+	TeQuerier* tQuerier = new TeQuerier(qPar);
+	bool res = TeExportQuerierToShapefile(tQuerier, baseName);
+	delete tQuerier;
+	delete tempTheme;
+    return res ;
+}
+
+
+bool 
+TeExportThemeToShapefile(TeTheme* theme, TeSelectedObjects selOb, const std::string& baseName)
+{
+	if (!theme)
+		return false;
+
+	string fbase = baseName;
+	if (baseName.empty())
+		fbase = theme->name();
+
+	TeQuerierParams qPar(true, true);
+	qPar.setParams(theme);
+	qPar.setSelecetObjs(selOb);
+
+	TeQuerier* tQuerier = new TeQuerier(qPar);
+	bool res = TeExportQuerierToShapefile(tQuerier, fbase);
+	delete tQuerier;
+	return res;
+}
+
+
+
+
+
diff --git a/src/terralib/drivers/shapelib/TeImportDBF.cpp b/src/terralib/drivers/shapelib/TeImportDBF.cpp
new file mode 100755
index 0000000..bb3f89c
--- /dev/null
+++ b/src/terralib/drivers/shapelib/TeImportDBF.cpp
@@ -0,0 +1,441 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+
+#include <string>
+#include <iostream>
+
+#include "TeDriverSHPDBF.h"
+#include "TeTable.h"
+#include "TeException.h"
+#include "TeUtils.h"
+#include "TeLayer.h"
+#include "TeProgress.h"
+#include "TeDatabase.h"
+
+//! Fills a vector with the values of choosen column named , to be used as object identifications
+/*!
+	\param dbfFileName DBF file name
+	\param indexes a vector that has the identification of the objects
+	\param objectIdAttr name of the attribute that has the identification of objects
+	\note if no objectIdAttr is provided or there is no column with this name return
+	an incremental sequence of numbers.
+*/
+void TeReadDBFIndexes(const string& dbfFileName, vector<string>& indexes, const string objectIdAttr="");
+
+
+bool TeReadDBFAttributeList ( const string& dbfFileName, TeAttributeList& attList )
+{
+	string filePrefix = TeGetName (dbfFileName.c_str()) ;
+	string fileName = filePrefix + ".dbf";
+
+/* -------------------------------------------------------------------- */
+/*      Open the file.                                                  */
+/* -------------------------------------------------------------------- */
+    DBFHandle hDBF = DBFOpen( fileName.c_str(), "rb" );
+    if( hDBF == NULL )
+    {
+			throw TeException ( UNABLE_TO_OPEN_DBF_FILE );
+    }
+    
+/* -------------------------------------------------------------------- */
+/*	If there is no data in this file let the user know.		*/
+/* -------------------------------------------------------------------- */
+    if( DBFGetFieldCount(hDBF) == 0 )
+    {
+			throw TeException ( NO_DATA_IN_DBF_FILE );
+    }
+
+/* -------------------------------------------------------------------- */
+/*	Get Attributes header definitions.									*/
+/* -------------------------------------------------------------------- */
+	TeAttribute attribute;
+    
+	char	szTitle[12];
+	int		nWidth, nDecimals;
+	int 	i;
+
+	vector<string> names;
+
+	for( i = 0; i < DBFGetFieldCount(hDBF); i++ )
+    {
+		DBFFieldType	eType = DBFGetFieldInfo( hDBF, i, szTitle, &nWidth, &nDecimals );
+
+		string atname = TeConvertToUpperCase(szTitle);
+	
+		vector<string>::iterator it = find(names.begin(),names.end(),atname);
+		if (it != names.end())
+		{
+			string newname = atname + "_" + Te2String(i);
+			int c = i+1;
+			while (true)
+			{
+				it = find(names.begin(),names.end(),newname);
+				if (it == names.end())
+					break;
+				newname = atname + "_" + Te2String(c);
+				++c;
+			}
+			atname = newname;
+		}
+		names.push_back(atname);
+		attribute.rep_.name_ = atname;
+
+        if( eType == FTDate )
+		{
+			attribute.rep_.type_     = TeDATETIME;
+			attribute.dateChronon_   = TeDAY;
+			attribute.dateTimeFormat_ = "YYYYMMDD";
+			attribute.dateSeparator_ = 'c';
+		}
+        else if( eType == FTString )
+		{
+			attribute.rep_.type_     = TeSTRING;
+			attribute.rep_.numChar_  = nWidth;
+		}
+		else if( eType == FTInteger )
+		{
+			if (nWidth > 9)
+			{
+				attribute.rep_.type_ = TeREAL;
+				attribute.rep_.numChar_ = nWidth;
+				attribute.rep_.decimals_ = 0;
+			}
+			else
+			{
+				attribute.rep_.type_ = TeINT;
+				attribute.rep_.numChar_ = nWidth;
+			}
+		}
+        else if( eType == FTDouble )
+		{
+            attribute.rep_.type_ = TeREAL;
+			attribute.rep_.numChar_ = nWidth;
+			attribute.rep_.decimals_ = nDecimals;
+		}
+
+		// keep track of the index name
+
+		attList.push_back ( attribute );
+    }
+	names.clear();
+    DBFClose( hDBF );
+	return true;
+}
+
+
+bool TeImportDBFTable(const string& dbFileName,TeDatabase* db, TeLayer* layer,TeAttrTableType tableType, string objectIdAtt)
+{
+	if (!db || dbFileName.empty())
+		return false;
+
+    DBFHandle hDBF = DBFOpen(dbFileName.c_str(), "rb" );
+    if( hDBF == NULL )
+		return false;
+
+	string tabName = TeGetBaseName(dbFileName.c_str());
+	int n=0;
+	while (db->tableExist(tabName))
+	{
+		tabName = TeGetBaseName(dbFileName.c_str()) + "_" + Te2String(n);
+		n++;
+	}
+	TeAttributeList attList;
+	TeReadDBFAttributeList (dbFileName, attList);
+
+	if (objectIdAtt.empty())
+		objectIdAtt = "object_id_";
+
+	// check if object id column is already in the list
+	unsigned int j;
+	for (j=0; j<attList.size(); j++)
+	{
+		if ( TeConvertToUpperCase(objectIdAtt) ==  TeConvertToUpperCase(attList[j].rep_.name_))
+		{
+			objectIdAtt = TeConvertToUpperCase(attList[j].rep_.name_);
+			attList[j].rep_.name_ =  objectIdAtt;
+			if (attList[j].rep_.type_ != TeSTRING)
+			{
+				attList[j].rep_.type_ = TeSTRING;
+				attList[j].rep_.numChar_ = 255;
+			}
+			attList[j].rep_.isPrimaryKey_ = true;
+			break;
+		}
+	}
+
+	// if not found create one automatically
+	bool createObjId = false;
+	if (j==attList.size())
+	{
+		TeAttribute at;
+		at.rep_.type_ = TeSTRING;
+		at.rep_.numChar_ = 16;
+		at.rep_.name_ = objectIdAtt;
+		at.rep_.isPrimaryKey_ = true;
+		attList.push_back(at);
+		createObjId = true;
+	}
+
+	if (!db->createTable(tabName,attList))
+	{
+	    DBFClose(hDBF);
+		return false;
+	}
+
+	TeTable table(tabName);
+	table.setAttributeList(attList);
+	table.setUniqueName(objectIdAtt);
+	if (layer)
+		table.setTableType(tableType);
+	else
+		table.setTableType(TeAttrExternal);
+
+	int nrec = DBFGetRecordCount(hDBF);
+	if (TeProgress::instance())
+		TeProgress::instance()->setTotalSteps(nrec);
+	int dt = CLOCKS_PER_SEC/4;
+	int dt2 = CLOCKS_PER_SEC * 5;
+	clock_t	t0, t1, t2;
+	t2 = clock();
+	t0 = t1 = t2;
+	int iRecord;
+	for (iRecord = 0; iRecord < nrec; iRecord++)
+    {
+		TeTableRow row;
+		int i;
+		for( i = 0; i < DBFGetFieldCount(hDBF); i++ )
+		{
+			string value =  DBFReadStringAttribute(hDBF, iRecord, i);
+			row.push_back ( value ); // inserts a value into the row
+		}
+		if (createObjId)
+			row.push_back(Te2String(iRecord));
+		table.add(row); 
+		if ((iRecord+1 % 100) == 0)
+		{
+			if (!db->insertTable(table))
+			{
+				DBFClose( hDBF );
+				table.clear();
+				if (TeProgress::instance())
+					TeProgress::instance()->reset();		
+				return false;
+			}
+			table.clear();
+			if (TeProgress::instance())
+			{
+				t2 = clock();
+				if (int(t2-t1) > dt)
+				{
+					t1 = t2;
+					if (TeProgress::instance()->wasCancelled())
+						break;
+					if ((int)(t2-t0) > dt2)
+						TeProgress::instance()->setProgress(iRecord);
+				}
+			}
+		}
+    }
+	if (table.size() > 0)
+	{
+		db->insertTable(table);
+		table.clear();
+	}
+	if (TeProgress::instance())
+		TeProgress::instance()->reset();		
+    DBFClose( hDBF );
+	if (iRecord == 0)
+		return false;
+	if (layer)
+		db->insertTableInfo(layer->id(),table);
+	else
+		db->insertTableInfo(0,table);
+
+	return true;
+}
+
+void TeReadSHPAttributes (const string& dbfFileName, TeTable& table)
+{
+	string filePrefix = TeGetName (dbfFileName.c_str()) ;
+	string fileName = filePrefix + ".dbf";
+
+/* -------------------------------------------------------------------- */
+/*	Get Attributes definitions.											*/
+/* -------------------------------------------------------------------- */
+	TeAttributeList attList;
+	TeReadDBFAttributeList ( fileName, attList );
+	table.setAttributeList( attList );
+
+/* -------------------------------------------------------------------- */
+/*      Open the file.                                                  */
+/* -------------------------------------------------------------------- */
+    DBFHandle hDBF = DBFOpen( fileName.c_str(), "rb" );
+    if( hDBF == NULL )
+    {
+			throw TeException ( UNABLE_TO_OPEN_DBF_FILE, fileName, true );
+    }
+    
+/* -------------------------------------------------------------------- */
+/*	If there is no data in this file let the user know.		*/
+/* -------------------------------------------------------------------- */
+    if( DBFGetFieldCount(hDBF) == 0 )
+    {
+			throw TeException ( NO_DATA_IN_DBF_FILE, fileName );
+    }
+
+/* -------------------------------------------------------------------- */
+/*	Read all the records 						                        */
+/* -------------------------------------------------------------------- */
+	for( int iRecord = 0; iRecord < DBFGetRecordCount(hDBF); iRecord++ )
+    {
+		TeTableRow row;
+		int 	i;
+
+		for( i = 0; i < DBFGetFieldCount(hDBF); i++ )
+		{
+			string value =  DBFReadStringAttribute( hDBF, iRecord, i ) ;
+			row.push_back ( value ); // inserts a value into the row
+		}
+		table.add ( row ); // adds a row to a table
+    }
+    DBFClose( hDBF );
+}
+
+
+bool TeReadDBFAttributes (const string& dbfFileName, TeTable& table, 
+						  int nrecords, int rinitial, bool createAuto)
+{
+	string filePrefix = TeGetName (dbfFileName.c_str()) ;
+	string fileName = filePrefix + ".dbf";
+
+// -------------------------------------------------------------------- 
+//      Open the file.                                                  
+// -------------------------------------------------------------------- 
+    DBFHandle hDBF = DBFOpen( fileName.c_str(), "rb" );
+    if( hDBF == NULL )
+    {
+			throw TeException ( UNABLE_TO_OPEN_DBF_FILE, fileName, true );
+    }
+    
+// -------------------------------------------------------------------- 
+//	If there is no data in this file let the user know.		
+// -------------------------------------------------------------------- 
+    if( DBFGetFieldCount(hDBF) == 0 )
+    {
+			throw TeException ( NO_DATA_IN_DBF_FILE, fileName );
+    }
+
+	if (rinitial >= DBFGetRecordCount(hDBF))
+		return false;
+
+	if (nrecords < 1 || nrecords > DBFGetRecordCount(hDBF))
+		nrecords = DBFGetRecordCount(hDBF);
+
+// -------------------------------------------------------------------- 
+//	Read all the records 						                        
+// -------------------------------------------------------------------- 
+	int count = 0;
+	for( int iRecord = rinitial; (iRecord < DBFGetRecordCount(hDBF) && count < nrecords); iRecord++ )
+    {
+		TeTableRow row;
+		int 	i;
+		for( i = 0; i < DBFGetFieldCount(hDBF); i++ )
+		{
+			string value =  DBFReadStringAttribute( hDBF, iRecord, i ) ;
+			row.push_back ( value ); // inserts a value into the row
+		}
+		
+		// if asked create a auto number extra column at the end
+		if (createAuto)
+			row.push_back(Te2String(iRecord));
+
+		table.add ( row ); // adds a row to a table
+		count++;
+    }
+    DBFClose( hDBF );
+	if (count > 0)
+		return true;
+	return false;
+}
+
+void
+TeImportDBFIndexes(const string& shpFileName, vector<string>& indexVect, const string objectIdAttr )
+{
+	string filePrefix = TeGetName(shpFileName.c_str());
+	string fileName = filePrefix + ".dbf";
+
+/* -------------------------------------------------------------------- */
+/*	Get index position.													*/
+/* -------------------------------------------------------------------- */
+	int i=0, indexPos=-1;
+
+	if (!objectIdAttr.empty())
+	{
+		TeAttributeList attList;
+		TeReadDBFAttributeList ( fileName, attList );
+		TeAttributeList::iterator it = attList.begin();
+		while ( it != attList.end() )
+		{
+			TeAttribute att = *it;
+			if (TeConvertToUpperCase(att.rep_.name_) == TeConvertToUpperCase(objectIdAttr))
+			{
+				indexPos = i;
+				break;
+			}
+			it++;
+			i++;
+		}
+	}
+
+/* -------------------------------------------------------------------- */
+/*      Open the file.                                                  */
+/* -------------------------------------------------------------------- */
+    DBFHandle hDBF = DBFOpen( fileName.c_str(), "rb" );
+    if( hDBF == NULL )
+    {
+			throw TeException ( UNABLE_TO_OPEN_DBF_FILE, fileName, true );
+    }
+    
+/* -------------------------------------------------------------------- */
+/*	If there is no data in this file let the user know.		*/
+/* -------------------------------------------------------------------- */
+	int nRecords = DBFGetFieldCount(hDBF);
+    if( nRecords  == 0 )
+    {
+			throw TeException ( NO_DATA_IN_DBF_FILE, fileName );
+    }
+
+/* -------------------------------------------------------------------- */
+/*	Read all the records 						                        */
+/* -------------------------------------------------------------------- */
+    
+	for( int iRecord = 0; iRecord < nRecords; iRecord++ )
+	{
+		if (indexPos == -1)
+			indexVect.push_back (Te2String(iRecord+1)); 
+		else
+			indexVect.push_back ( DBFReadStringAttribute( hDBF, iRecord, indexPos ) );
+	}
+
+    DBFClose( hDBF );
+}
diff --git a/src/terralib/drivers/shapelib/TeImportSHP.cpp b/src/terralib/drivers/shapelib/TeImportSHP.cpp
new file mode 100755
index 0000000..07d13dc
--- /dev/null
+++ b/src/terralib/drivers/shapelib/TeImportSHP.cpp
@@ -0,0 +1,1370 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+
+// STL 
+#include <string>
+#include <iostream>
+#include <vector>
+#include <list>
+#include <map>
+
+#ifdef WIN32
+#include <io.h>
+#else
+#include <unistd.h>
+#endif
+
+using namespace std;
+
+// TerraLib
+
+#include "TeDriverSHPDBF.h"
+#include "TeTable.h"
+#include "TeStdFile.h"
+#include "TeException.h"
+#include "TeUtils.h"
+#include "TeGeometry.h"
+#include "TeGeometryAlgorithms.h"
+#include "TeLayer.h"
+#include "TeProgress.h"
+#include "TeDatabase.h"
+
+
+// from SHAPELIB
+#include "shapefil.h" 
+ 
+// Internal functions
+bool TeImportSHPGeometries (TeLayer* layer,const string& shpFileName, vector<string> &indexes, unsigned int chunckSize);
+void TeSHPPointDecode    (TeLayer*, SHPHandle, vector<string>&, unsigned int);
+void TeSHPPolyLineDecode (TeLayer*, SHPHandle, vector<string>&, unsigned int);
+void TeSHPPolygonDecode  (TeLayer*, SHPHandle, vector<string>&, unsigned int);
+
+TeLayer* TeImportShape(const string& shpFileName, TeDatabase* db, const string& layerName)
+{
+	if (!db || shpFileName.empty()) 
+		return 0;
+
+	// check if format is complete (SHP, SHX e DBF files exist)
+	string filePrefix = TeGetName(shpFileName.c_str());
+	string ftest = filePrefix + ".dbf";
+	if (access(ftest.c_str(),04) == -1)
+	{
+		ftest = filePrefix + ".DBF";
+		if (access(ftest.c_str(),04) == -1)
+			return 0;
+	}
+	ftest = filePrefix + ".shx";
+	if (access(ftest.c_str(),04) == -1)
+	{
+		ftest = filePrefix + ".SHX";
+		if (access(ftest.c_str(),04) == -1)
+			return 0;
+	}
+
+	// found a valid layer name
+	string lName;
+	string baseName = TeGetBaseName(shpFileName.c_str());
+	if (layerName.empty())
+		lName = baseName;
+	else
+		lName = layerName;
+
+	string newLayerName = lName;
+	TeLayerMap& layerMap = db->layerMap();
+	TeLayerMap::iterator it;
+	bool flag = true;
+	int n = 1;
+	while (flag)
+	{
+		for (it = layerMap.begin(); it != layerMap.end(); ++it)
+		{
+			if (TeStringCompare(it->second->name(),newLayerName))
+				break;
+		}
+		if (it == layerMap.end())
+			flag = 0;
+		else
+			newLayerName = lName + "_" +Te2String(n);
+		n++;	
+	}
+
+	// find projection
+	TeLayer* newLayer = new TeLayer(newLayerName,db);
+	if (newLayer->id() <= 0 )
+		return 0;				// couldn�t create new layer
+
+	bool res = TeImportShape(newLayer,shpFileName);
+	if (res)
+		return newLayer;
+	else
+	{
+		db->deleteLayer(newLayer->id());
+		delete newLayer;
+		return 0;
+	}
+}
+
+bool TeImportShape (TeLayer* layer, const string& shpFileName, string attrTableName,  
+					string objectIdAtt, int unsigned chunkSize )
+{
+	double oldPrec = TePrecision::instance().precision();
+
+	if(layer)
+	{
+		TePrecision::instance().setPrecision(TeGetPrecision(layer->projection()));
+	}
+	else
+	{
+		TePrecision::instance().setPrecision(TeGetPrecision(0));
+	}
+
+
+	string filePrefix = TeGetName(shpFileName.c_str());
+	string ftest = filePrefix + ".dbf";
+	if (access(ftest.c_str(),04) == -1)
+	{
+		ftest = filePrefix + ".DBF";
+		if (access(ftest.c_str(),04) == -1)
+			return 0;
+	}
+	string dbfFileN = ftest;
+
+	ftest = filePrefix + ".shx";
+	if (access(ftest.c_str(),04) == -1)
+	{
+		ftest = filePrefix + ".SHX";
+		if (access(ftest.c_str(),04) == -1)
+			return 0;
+	}
+
+	ftest = filePrefix + ".shp";
+	if (access(ftest.c_str(),04) == -1)
+	{
+		ftest = filePrefix + ".SHP";
+		if (access(ftest.c_str(),04) == -1)
+			return 0;
+	}
+	string shpFileN = ftest;
+
+	SHPHandle	hSHP = SHPOpen(shpFileN.c_str(),"rb");
+	if (hSHP == 0)
+	{
+		TePrecision::instance().setPrecision(oldPrec);
+		return false;
+	}
+
+    	DBFHandle hDBF = DBFOpen(dbfFileN.c_str(), "rb");
+    	if (hDBF == 0)
+    	{
+		TePrecision::instance().setPrecision(oldPrec);
+		SHPClose(hSHP);
+		return false;
+    	}
+
+	// Read some information about the shapefile
+	int nShapeType, nEntities;
+	// --- get the shape and decode it
+	double 	adfMinBound[4], adfMaxBound[4];
+	SHPGetInfo( hSHP, &nEntities, &nShapeType, adfMinBound, adfMaxBound );
+	string shpName = SHPTypeName( nShapeType );
+	if (shpName == "UnknownShapeType")
+	{
+		TePrecision::instance().setPrecision(oldPrec);
+		SHPClose(hSHP);
+		DBFClose(hDBF);
+		return false;
+	}
+
+	if (attrTableName.empty())
+	{
+		if (layer->name().empty())
+		{
+			TePrecision::instance().setPrecision(oldPrec);
+			return false;
+		}
+		else
+			attrTableName = layer->name();
+	}
+	
+	int linkCol=-1;
+    	unsigned int j=0;
+	bool autoIndex = false;
+	int indexOffset = 0;  
+	
+	if (!layer->database()->beginTransaction())  
+		return false;
+
+	//read the attribute list information 
+	TeAttributeList attList;
+	TeReadDBFAttributeList(shpFileName, attList);
+
+	// if no geometry link name is given, creates one called 'object_id_'
+	string ext = "";
+	int count = 0;
+	if (objectIdAtt.empty())
+	{
+		objectIdAtt = "object_id_" + Te2String(layer->id());
+		string s2 = TeConvertToUpperCase(objectIdAtt);
+		while (true)
+		{
+			for (j=0; j<attList.size(); j++)
+			{
+				string s0 = attList[j].rep_.name_;
+				string s1 = TeConvertToUpperCase(s0);
+				if ( s1 == s2)
+					break;
+			}
+			if (j < attList.size())
+			{
+				++count;
+				objectIdAtt = "object_id_" + Te2String(count);
+			}
+			else
+				break;
+		}
+		TeAttribute at;
+		at.rep_.type_ = TeSTRING;
+		at.rep_.numChar_ = 16;
+		at.rep_.name_ = objectIdAtt;
+		at.rep_.isPrimaryKey_ = true;
+		attList.push_back(at);
+		linkCol = attList.size()-1;
+		autoIndex = true;
+	}
+	else
+	{
+		// check if given index is valid
+		TeAttributeList::iterator it = attList.begin();
+		while (it != attList.end())
+		{
+			if (TeConvertToUpperCase((*it).rep_.name_) == TeConvertToUpperCase(objectIdAtt))		// index found
+			{
+				if ((*it).rep_.type_ != TeSTRING)	// make sure it is a String type
+				{
+					(*it).rep_.type_ = TeSTRING;
+					(*it).rep_.numChar_ = 16;
+				}
+				(*it).rep_.isPrimaryKey_ = true;
+				linkCol=j;
+				break;
+			}
+			++it;
+			++j;
+		}
+		if (it == attList.end())			// index not found
+		{
+			objectIdAtt = "object_id_" + Te2String(layer->id());;
+			while (true)
+			{
+				for (j=0; j<attList.size(); j++)
+				{
+					if (TeConvertToUpperCase(attList[j].rep_.name_) == TeConvertToUpperCase(objectIdAtt))
+						break;
+				}
+				if (j < attList.size())
+				{
+					++count;
+					objectIdAtt = "object_id_" + Te2String(count);
+				}
+				else
+					break;
+			}
+			TeAttribute at;
+			at.rep_.type_ = TeSTRING;
+			at.rep_.numChar_ = 16;
+			at.rep_.name_ = objectIdAtt;
+			at.rep_.isPrimaryKey_ = true;
+			attList.push_back(at);
+			autoIndex = true;
+		}
+	}
+	if (autoIndex)
+	{
+		linkCol = attList.size()-1;
+		indexOffset = layer->getNewObjectId(); 
+    	}
+
+	TeTable attTable (attrTableName,attList,objectIdAtt,objectIdAtt,TeAttrStatic);
+	if (!layer->createAttributeTable(attTable))			// create the table in the database
+	{
+		SHPClose(hSHP);  
+		DBFClose(hDBF);  
+		layer->database()->rollbackTransaction();  
+		TePrecision::instance().setPrecision(oldPrec);
+		return false;
+	}
+	
+	string objid, value;
+	TePointSet points;
+	TeLineSet lines;
+	TePolygonSet polygons;
+	TeTableRow row;
+	SHPObject* psShape;
+
+	if(TeProgress::instance())
+	{
+		TeProgress::instance()->setTotalSteps(nEntities);
+		TeProgress::instance()->setProgress(j+1);
+	}
+
+	// OBS1: we discard Z and M values when available, because TerraLib
+	// doesn�t have the concept of 3D or measured geometries
+	// OBS2: non identified geometries are mapped to a object_id_
+	// "te_nulo"
+	switch (nShapeType) 
+	{
+		// --- null geometries ---
+	  case SHPT_NULL:							// read only the attributes
+		for (j=0; j<(unsigned int)nEntities; j++)
+		{
+		  row.clear();
+		  TeDBFRowDecode(hDBF,j,row);
+		  if (autoIndex)	// --- create automatic index if needed
+			  row.push_back(Te2String(j));
+		  if (row[linkCol].empty())
+			 row[linkCol] = "te_nulo";
+		  objid = row[linkCol];
+		  attTable.add(row);
+		  if ((j%chunkSize) == 0)
+		  {
+			  layer->saveAttributeTable(attTable);
+			  attTable.clear();
+			  if(TeProgress::instance())
+			  {
+				if (TeProgress::instance()->wasCancelled())
+					break;
+				else
+					TeProgress::instance()->setProgress(j+1);
+			  }	
+		  }
+		}
+		break;
+		// --- point geometries ---
+	  case SHPT_POINTZ:	
+	  case SHPT_MULTIPOINTZ:
+	  case SHPT_POINTM:
+	  case SHPT_MULTIPOINTM:
+	  case SHPT_POINT:
+	  case SHPT_MULTIPOINT:
+		  for (j=0; j<(unsigned int)nEntities; j++)
+		  {
+			  row.clear();
+			  TeDBFRowDecode(hDBF,j,row);
+			  if (autoIndex)	// --- create automatic index if needed
+				  row.push_back(Te2String(j));
+			  if (row[linkCol].empty())
+				 row[linkCol] = "te_nulo";
+			  objid = row[linkCol];
+			  attTable.add(row);
+			  psShape = SHPReadObject(hSHP,j);
+              TeSHPPointDecode(psShape,points,objid);
+     		  SHPDestroyObject(psShape);
+			  if ((j%chunkSize) == 0)
+			  {
+				  layer->addPoints(points);
+				  points.clear();
+				  layer->saveAttributeTable(attTable);
+				  attTable.clear();
+				  if(TeProgress::instance())
+				  {
+					if (TeProgress::instance()->wasCancelled())
+						break;
+					else
+						TeProgress::instance()->setProgress(j+1);
+				  }	
+			  }
+		  }
+		  break;
+		// --- line geometries ---
+	  case SHPT_ARCZ:
+	  case SHPT_ARCM:
+	  case SHPT_ARC:
+		  for (j=0; j<(unsigned int)nEntities; j++)
+		  {
+			  row.clear();
+			  TeDBFRowDecode(hDBF,j,row);
+			  if (autoIndex)	// --- create automatic index if needed
+				  row.push_back(Te2String(j));
+			  if (row[linkCol].empty())
+				 row[linkCol] = "te_nulo";
+			  objid = row[linkCol];
+			  attTable.add(row);
+			  psShape = SHPReadObject(hSHP,j);
+			  TeSHPPolyLineDecode(psShape,lines,objid);
+     		  SHPDestroyObject(psShape);
+			  if ((j%chunkSize) == 0)
+			  {
+			 	  layer->addLines(lines);
+				  lines.clear();
+				  layer->saveAttributeTable(attTable);
+				  attTable.clear();
+				  if(TeProgress::instance())
+				  {
+					if (TeProgress::instance()->wasCancelled())
+						break;
+					else
+						TeProgress::instance()->setProgress(j+1);
+				  }	
+			  }
+		  }
+		  break;
+	// --- polygon geometries ---
+	  case SHPT_POLYGON:
+	  case SHPT_POLYGONM:
+	  case SHPT_POLYGONZ:
+		  for (j=0; j<(unsigned int)nEntities; j++)
+		  {
+			  row.clear();
+			  TeDBFRowDecode(hDBF,j,row);
+			  if (autoIndex)	// --- create automatic index if needed
+				  row.push_back(Te2String(j));
+			  if (row[linkCol].empty())
+				 row[linkCol] = "te_nulo";
+			  objid = row[linkCol];
+			  attTable.add(row);
+			  psShape = SHPReadObject(hSHP,j);
+			  TeSHPPolygonDecode(psShape,polygons,objid);
+			  SHPDestroyObject(psShape);
+			  if ((j%chunkSize) == 0)
+			  {
+				  layer->addPolygons(polygons);
+				  polygons.clear();
+				  layer->saveAttributeTable(attTable);
+				  attTable.clear();
+				  if(TeProgress::instance())
+				  {
+					if (TeProgress::instance()->wasCancelled())
+						break;
+					else
+						TeProgress::instance()->setProgress(j+1);
+				  }
+			  }
+
+		  }
+		  break;
+	  default:
+		  /* todo: handle multipatch geometries */
+		  throw TeException ( UNHANDLED_SHP_TYPE );
+	}
+	if (points.size() > 0)
+	{
+		layer->addPoints(points);
+		points.clear();
+	}
+	if (lines.size() > 0)
+	{
+		layer->addLines(lines);
+		lines.clear();
+	}
+	if (polygons.size() > 0)
+	{
+		layer->addPolygons(polygons);
+		polygons.clear();
+	}
+	if (attTable.size() > 0)
+	{
+		layer->saveAttributeTable(attTable);
+		attTable.clear();
+	}
+	if(TeProgress::instance())
+		TeProgress::instance()->cancel();
+
+	SHPClose(hSHP);
+	DBFClose(hDBF);
+	
+	if (!layer->database()->commitTransaction())  
+		return false;
+
+	// Create the spatial indexes
+	int rep = layer->geomRep();
+	if (rep & TePOINTS)
+	{
+		layer->database()->insertMetadata(layer->tableName(TePOINTS),layer->database()->getSpatialIdxColumn(TePOINTS), 0.0005,0.0005,layer->box());
+		layer->database()->createSpatialIndex(layer->tableName(TePOINTS),layer->database()->getSpatialIdxColumn(TePOINTS), (TeSpatialIndexType)TeRTREE);
+	}
+	if (rep & TeLINES)
+	{
+		layer->database()->insertMetadata(layer->tableName(TeLINES),layer->database()->getSpatialIdxColumn(TeLINES), 0.0005,0.0005,layer->box());
+		layer->database()->createSpatialIndex(layer->tableName(TeLINES),layer->database()->getSpatialIdxColumn(TeLINES), (TeSpatialIndexType)TeRTREE);
+	}
+	if (rep & TePOLYGONS)
+	{
+		layer->database()->insertMetadata(layer->tableName(TePOLYGONS),layer->database()->getSpatialIdxColumn(TePOLYGONS), 0.0005,0.0005,layer->box());
+		layer->database()->createSpatialIndex(layer->tableName(TePOLYGONS),layer->database()->getSpatialIdxColumn(TePOLYGONS), (TeSpatialIndexType)TeRTREE);
+	}
+
+	TePrecision::instance().setPrecision(oldPrec);
+
+	return true;
+}
+
+bool
+TeImportSHPGeometries(TeLayer* layer,const string& shpFileName, 
+					  vector<string> &indexes, unsigned int chunckSize)
+{
+
+	string filePrefix = TeGetName(shpFileName.c_str());
+	string fileName = filePrefix + ".shp";
+	//Open the        shapefile.                                      
+	SHPHandle	hSHP;
+	hSHP = SHPOpen( fileName.c_str(), "rb" );
+
+	if( hSHP == 0 )
+		return false;
+
+
+//    Get information about the file              
+	int		nShapeType, nEntities;
+	double 	adfMinBound[4], adfMaxBound[4];
+
+	SHPGetInfo( hSHP, &nEntities, &nShapeType, adfMinBound, adfMaxBound );
+
+//	choose the appropriate decoding function
+
+	string name  = SHPTypeName( nShapeType );
+
+	if ( name == "Arc" || name == "ArcZ" )
+	{
+		TeSHPPolyLineDecode ( layer, hSHP,indexes,chunckSize );
+	}
+	else if ( name == "Point" || name == "PointZ" ) 
+	{
+		TeSHPPointDecode ( layer, hSHP,indexes,chunckSize );
+    }
+	else if ( name == "Polygon" )
+	{
+		TeSHPPolygonDecode ( layer, hSHP,indexes,chunckSize );
+	}
+#if 0  // todo...
+	else if ( name ==  "MultiPoint" ) {}
+	else if ( name ==  "PolyLineZ") {}
+	else if ( name ==  "PolygonZ")  {}
+	else if ( name ==  "MultiPointZ") {}
+	else if ( name ==  "PointM"  ) {}
+	else if ( name ==  "PolyLineM" ) {}
+	else if ( name ==  "PolygonM") {}
+	else if ( name ==  "MultiPointM") {}
+#endif
+	else
+		throw TeException ( UNHANDLED_SHP_TYPE );
+
+    SHPClose( hSHP );
+	return true;
+
+
+}
+
+bool TeImportShapeGeometry (TeLayer* layer, const string& shpFileName, string attrTableName,  
+					string objectIdAtt, int unsigned chunkSize )
+{
+
+	string filePrefix = TeGetName(shpFileName.c_str());
+	string shpFileN = filePrefix + ".shp";
+	string dbfFileN = filePrefix + ".dbf";
+
+	SHPHandle	hSHP = SHPOpen(shpFileN.c_str(),"rb");
+	if (hSHP == 0)
+		return false;
+
+    DBFHandle hDBF = DBFOpen(dbfFileN.c_str(), "rb");
+    if (hDBF == 0)
+    {
+		SHPClose(hSHP);
+		return false;
+    }
+
+	// Read some information about the shapefile
+	int nShapeType, nEntities;
+	// --- get the shape and decode it
+	double 	adfMinBound[4], adfMaxBound[4];
+	SHPGetInfo( hSHP, &nEntities, &nShapeType, adfMinBound, adfMaxBound );
+	string shpName = SHPTypeName( nShapeType );
+	if (shpName == "UnknownShapeType")
+	{
+		SHPClose(hSHP);
+		return false;
+	}
+
+	if (attrTableName.empty())
+	{
+		if (layer->name().empty())
+			return false;
+		else
+			attrTableName = layer->name();
+	}
+	
+	int linkCol=-1;
+    unsigned int j=0;
+	bool autoIndex = false;
+    int indexOffset = 0;
+
+	if (!layer->database()->beginTransaction())
+		return false;
+
+	//read the attribute list information 
+	TeAttributeList attList;
+  TeReadDBFAttributeList(shpFileName, attList);
+
+	// if no geometry link name is given, creates one called 'object_id_'
+	string ext = "";
+	int count = 0;
+	if (objectIdAtt.empty())
+	{
+		objectIdAtt = "object_id_" + Te2String(layer->id());
+		string s2 = TeConvertToUpperCase(objectIdAtt);
+		while (true)
+		{
+			for (j=0; j<attList.size(); j++)
+			{
+				string s0 = attList[j].rep_.name_;
+				string s1 = TeConvertToUpperCase(s0);
+				if ( s1 == s2)
+					break;
+			}
+			if (j < attList.size())
+			{
+				++count;
+				objectIdAtt = "object_id_" + Te2String(count);
+			}
+			else
+				break;
+		}
+		TeAttribute at;
+		at.rep_.type_ = TeSTRING;
+		at.rep_.numChar_ = 16;
+		at.rep_.name_ = objectIdAtt;
+		at.rep_.isPrimaryKey_ = true;
+		attList.push_back(at);
+		linkCol = attList.size()-1;
+		autoIndex = true;
+	}
+	else
+	{
+		// check if given index is valid
+		TeAttributeList::iterator it = attList.begin();
+		while (it != attList.end())
+		{
+			if (TeConvertToUpperCase((*it).rep_.name_) == TeConvertToUpperCase(objectIdAtt))		// index found
+			{
+				if ((*it).rep_.type_ != TeSTRING)	// make sure it is a String type
+				{
+					(*it).rep_.type_ = TeSTRING;
+					(*it).rep_.numChar_ = 16;
+				}
+				(*it).rep_.isPrimaryKey_ = true;
+				linkCol=j;
+				break;
+			}
+			++it;
+			++j;
+		}
+		if (it == attList.end())			// index not found
+		{
+			objectIdAtt = "object_id_" + Te2String(layer->id());;
+			while (true)
+			{
+				for (j=0; j<attList.size(); j++)
+				{
+					if (TeConvertToUpperCase(attList[j].rep_.name_) == TeConvertToUpperCase(objectIdAtt))
+						break;
+				}
+				if (j < attList.size())
+				{
+					++count;
+					objectIdAtt = "object_id_" + Te2String(count);
+				}
+				else
+					break;
+			}
+			TeAttribute at;
+			at.rep_.type_ = TeSTRING;
+			at.rep_.numChar_ = 16;
+			at.rep_.name_ = objectIdAtt;
+			at.rep_.isPrimaryKey_ = true;
+			attList.push_back(at);
+			autoIndex = true;
+		}
+	}
+	if (autoIndex)
+    {
+		linkCol = attList.size()-1;
+		indexOffset = layer->getNewObjectId();
+    }
+
+	TeTable attTable (attrTableName,attList,objectIdAtt,objectIdAtt,TeAttrStatic);
+
+	string objid, value;
+	TePointSet points;
+	TeLineSet lines;
+	TePolygonSet polygons;
+	TeTableRow row;
+	SHPObject* psShape;
+
+	if(TeProgress::instance())
+	{
+		TeProgress::instance()->setTotalSteps(nEntities);
+		TeProgress::instance()->setProgress(j+1);
+	}
+
+	// OBS1: we discard Z and M values when available, because TerraLib
+	// doesn�t have the concept of 3D or measured geometries
+	// OBS2: non identified geometries are mapped to a object_id_
+	// "te_nulo"
+	switch (nShapeType) 
+	{
+		// --- null geometries ---
+	  case SHPT_NULL:							// read only the attributes
+		for (j=0; j<(unsigned int)nEntities; j++)
+		{
+		  row.clear();
+		  TeDBFRowDecode(hDBF,j,row);
+		  if (autoIndex)	// --- create automatic index if needed
+			  row.push_back(Te2String(j + indexOffset));
+		  if (row[linkCol].empty())
+			 row[linkCol] = "te_nulo";
+		  objid = row[linkCol];
+
+		  if ((j%chunkSize) == 0)
+		  {
+			  if(TeProgress::instance())
+			  {
+				if (TeProgress::instance()->wasCancelled())
+					break;
+				else
+					TeProgress::instance()->setProgress(j+1);
+			  }	
+		  }
+		}
+		break;
+		// --- point geometries ---
+	  case SHPT_POINTZ:	
+	  case SHPT_MULTIPOINTZ:
+	  case SHPT_POINTM:
+	  case SHPT_MULTIPOINTM:
+	  case SHPT_POINT:
+	  case SHPT_MULTIPOINT:
+		  for (j=0; j<(unsigned int)nEntities; j++)
+		  {
+			  row.clear();
+			  TeDBFRowDecode(hDBF,j,row);
+			  if (autoIndex)	// --- create automatic index if needed
+				  row.push_back(Te2String(j + indexOffset));
+			  if (row[linkCol].empty())
+				 row[linkCol] = "te_nulo";
+			  objid = row[linkCol];
+
+			  psShape = SHPReadObject(hSHP,j);
+
+			  TeSHPPointDecode(psShape,points,objid);
+     		  SHPDestroyObject(psShape);
+			  if ((j%chunkSize) == 0)
+			  {
+				  if (!layer->addPoints(points))
+				  {
+					  SHPClose(hSHP);
+					  layer->database()->rollbackTransaction(); 
+					  return false;
+				  }
+				  points.clear();
+
+				  if(TeProgress::instance())
+				  {
+					  if (TeProgress::instance()->wasCancelled())
+						break;
+					else
+						TeProgress::instance()->setProgress(j+1);
+				  }	
+			  }
+		  }
+		  break;
+		// --- line geometries ---
+	  case SHPT_ARCZ:
+	  case SHPT_ARCM:
+	  case SHPT_ARC:
+		  for (j=0; j<(unsigned int)nEntities; j++)
+		  {
+			  row.clear();
+			  TeDBFRowDecode(hDBF,j,row);
+			  if (autoIndex)	// --- create automatic index if needed
+				  row.push_back(Te2String(j + indexOffset));
+			  if (row[linkCol].empty())
+				 row[linkCol] = "te_nulo";
+			  objid = row[linkCol];
+
+			  psShape = SHPReadObject(hSHP,j);
+
+			  TeSHPPolyLineDecode(psShape,lines,objid);
+		  
+			  SHPDestroyObject(psShape);
+			  if ((j%chunkSize) == 0)
+			  {
+				  if (!layer->addLines(lines))
+				  {
+					  SHPClose(hSHP);
+					  layer->database()->rollbackTransaction(); 
+					  return false;
+				  }
+				  lines.clear();
+
+				  if(TeProgress::instance())
+				  {
+					if (TeProgress::instance()->wasCancelled())
+						break;
+					else
+						TeProgress::instance()->setProgress(j+1);
+				  }	
+			  }
+		  }
+		  break;
+	// --- polygon geometries ---
+	  case SHPT_POLYGON:
+	  case SHPT_POLYGONM:
+	  case SHPT_POLYGONZ:
+
+		  for (j=0; j<(unsigned int)nEntities; j++)
+		  {
+			  row.clear();
+
+			  TeDBFRowDecode(hDBF,j,row);
+			  if (autoIndex)	// --- create automatic index if needed
+			    row.push_back(Te2String(j + indexOffset));
+			  if (row[linkCol].empty())
+				  row[linkCol] = "te_nulo";
+			  objid = row[linkCol];
+			  
+			  psShape = SHPReadObject(hSHP,j);
+
+			  TeSHPPolygonDecode(psShape,polygons,objid);
+
+			  SHPDestroyObject(psShape);
+			  if ((j%chunkSize) == 0)
+			  {
+
+				  if (!layer->addPolygons(polygons))
+				  {
+					  SHPClose(hSHP);
+					  layer->database()->rollbackTransaction(); 
+					  return false;
+				  }
+
+				  polygons.clear();
+
+				  if(TeProgress::instance())
+				  {
+					if (TeProgress::instance()->wasCancelled())
+						break;
+					else
+						TeProgress::instance()->setProgress(j+1);
+				  }
+			  }
+
+		  }
+		  break;
+	  default:
+		  // todo: handle multipatch geometries 
+		  throw TeException ( UNHANDLED_SHP_TYPE );
+	}
+	if (points.size() > 0)
+	{
+		if (!layer->addPoints(points))
+		{
+			SHPClose(hSHP);
+			layer->database()->rollbackTransaction(); 
+			return false;
+		}
+
+		points.clear();
+	}
+	if (lines.size() > 0)
+	{
+		if (!layer->addLines(lines))
+		{
+			SHPClose(hSHP);
+			layer->database()->rollbackTransaction();
+			return false;
+		}
+
+		lines.clear();
+	}
+	if (polygons.size() > 0)
+	{
+		if (!layer->addPolygons(polygons))
+		{
+			SHPClose(hSHP);
+			layer->database()->rollbackTransaction();
+			return false;
+		}
+		polygons.clear();
+	}
+	if(TeProgress::instance())
+		TeProgress::instance()->cancel();
+
+	SHPClose(hSHP);
+
+	if (!layer->database()->commitTransaction())
+		return false;
+
+	return true;
+}
+
+
+void TeDBFRowDecode(DBFHandle& hDBF, int nr, TeTableRow& row)
+{
+	string value;
+	int i;
+	for (i = 0; i < DBFGetFieldCount(hDBF); i++)
+	{
+		value =  DBFReadStringAttribute(hDBF,nr,i);
+		row.push_back(value); 
+	}
+}
+
+void TeSHPPointDecode(SHPObject* psShape, TePointSet& points, string& objid)
+{
+	int nv = psShape->nVertices;
+	for (int i = 0; i<nv; i++)
+	{
+		TePoint point(psShape->padfX[i], psShape->padfY[i]);
+		point.objectId(objid);
+		points.add(point);
+	}
+}
+
+
+void TeSHPPolyLineDecode(SHPObject* psShape, TeLineSet& lines, string& objid)
+{
+	int iPart,j=0,nextStart=0; 
+	for (iPart = 0; iPart < psShape->nParts; iPart++)
+	{
+		if (iPart == psShape->nParts-1)
+			nextStart = psShape->nVertices;
+		else 
+			nextStart = psShape->panPartStart[iPart+1];
+
+		TeLine2D line;
+		while (j<nextStart)
+		{
+			TeCoord2D pt ( psShape->padfX[j], psShape->padfY[j] );
+			line.add ( pt );
+			j++;
+		}
+		line.objectId (objid);	
+		lines.add ( line );
+	}
+}
+
+void
+TeSHPPolygonDecode(SHPObject* psShape, TePolygonSet& polys, string& objid)
+{
+	int iPart = 0;
+	vector<int> partStart;
+
+	// Build an array whose components point to the starting point
+	// of the rings that compose the polygon shape
+	for ( iPart = 0; iPart < psShape->nParts; iPart++ )
+		partStart.push_back ( psShape->panPartStart[iPart] );
+	partStart.push_back ( psShape->nVertices ); // point to the end
+
+	vector<TePolygon> pList;
+	vector<TeLinearRing> holes;
+	int j = 0;
+	iPart = 0;
+	while (j < psShape->nVertices)
+	{
+		TeLine2D line;
+		iPart++;						// while it doesn�t reach the start of next part
+		while ( j < partStart[iPart] )	// build a line from the coordinates
+		{
+			TeCoord2D pt ( psShape->padfX[j], psShape->padfY[j] );
+			line.add ( pt );
+			j++;
+		}								
+		if (!line.isRing())				// force the closing of opened rings
+			line.add(line[0]);
+
+		// decide if a ring is an outter ring or an inner ring based on its orientation
+		TeLinearRing ring(line);
+		short orient = TeOrientation(ring);
+		if(orient == TeCLOCKWISE)	// outter ring: start a new polygon
+		{
+			TePolygon p;
+			p.add(ring);
+			p.objectId(objid);
+			pList.push_back(p);
+		}
+		else	// COUNTERCLOCKWISE => inner ring: put on the list of holes
+			holes.push_back(ring);
+	} // read all vertices
+
+
+	// even though there are rings that are in counter clockwise orientation, 
+	// there aren't any clockwise orientation rings to be possible parents of 
+	// these inner rings. The decision here: treat all of them as outter rings...
+	if (pList.empty() && !holes.empty())
+	{
+		for (unsigned int i=0; i<holes.size(); ++i)
+		{
+			TePolygon p;
+			p.add(holes[i]);
+			p.objectId(objid);
+			polys.add(p);
+		}
+		return;
+	}
+
+	if (pList.size() == 1)	// shape has only one polygon that should
+	{						// contain all the inner rings
+		for(unsigned int i = 0; i < holes.size(); ++i)
+			pList[0].add(holes[i]);
+	}
+	else
+	{	// shape has multiple outter ring and inner rings
+		// we have to find a parent to each inner ring 
+		for(unsigned int i = 0; i < holes.size(); ++i)
+		{
+			vector<TePolygon> candidates;
+			TeLinearRing ring = holes[i];
+			
+			// step 1: consider as a inner ring parent candidate every polygon 
+			// that intercepts the ring MBR
+			unsigned int j = 0;
+			for(j = 0; j < pList.size(); ++j)
+			{
+				if(TeWithinOrCoveredByOrEquals(ring.box(), pList[j].box()))
+					candidates.push_back(pList[j]);
+			}
+
+			// if there is only one candidate this is the parent
+			if(candidates.size() == 1)
+			{
+				candidates[0].add(ring);
+				continue;
+			}
+
+			// step 2: refine the candidates to parent: consider only those 
+			// that contains the ring (not just its MBR)
+			vector<TePolygon> newCandidates;
+			for(j = 0; j < candidates.size(); ++j)
+			{
+				short rel = TeBOUNDARY;
+				bool inside = false;
+
+				unsigned int nthVert = ring.size();
+				unsigned int iVert = 0u;
+
+				while(iVert < nthVert)
+				{
+					rel = TeRelation(ring[iVert], candidates[j][0]);
+
+					if(rel & TeINSIDE)
+					{
+						inside = true;
+						newCandidates.push_back(candidates[j]);
+						break;
+					}
+					else if(rel & TeOUTSIDE)
+						break;
+					++iVert;
+				}
+
+				if(iVert == nthVert)	
+					break;
+			}
+			
+			// sort the new candidates according to their areas
+			int idxMinArea = 0;
+			double minArea = TeMAXFLOAT;
+			for(j = 0; j < newCandidates.size(); ++j)
+			{
+				if(TeGeometryArea(newCandidates[j].box()) < minArea)
+				{
+					idxMinArea = j;
+					minArea = TeGeometryArea(newCandidates[j].box());
+				}
+			}
+			// choose as parent the candidate that has the smaller area
+			if (!newCandidates.empty())
+				newCandidates[idxMinArea].add(ring);
+		}
+	}
+
+	// add polygons to the list passed as parameter
+	vector<TePolygon>::iterator it = pList.begin();
+	while (it != pList.end())
+	{
+		polys.add(*it);
+		++it;
+	}
+}
+
+void
+TeSHPPointDecode( TeLayer* layer, SHPHandle hSHP, vector<string>& indexVect, unsigned int chunckSize  )
+{
+	int nEntities = hSHP->nRecords; // indicates how many point sets are there
+	TePointSet points;
+
+/* -------------------------------------------------------------------- */
+/*	Skim over the list of shapes, reading all the vertices.	            */
+/* -------------------------------------------------------------------- */
+	if(TeProgress::instance())
+		TeProgress::instance()->setTotalSteps(nEntities);
+
+    int j;
+	for(j= 0; j < nEntities; j++ )
+    {
+        SHPObject* psShape = SHPReadObject( hSHP, j );
+		
+		int i;
+		for (i = 0; i < ( psShape->nVertices ); i++ )
+		{
+			TePoint point;
+			TeCoord2D xy ( psShape->padfX[i], psShape->padfY[i] );
+			point.add ( xy );
+			point.objectId ( indexVect[j] );
+			points.add ( point );
+		}
+		// check if there is a chunk of points to be inserted into the database
+		if ( points.size() >= chunckSize )
+		{
+			layer->addPoints( points ); 
+			points.clear();
+			if(TeProgress::instance())
+			{
+				if (TeProgress::instance()->wasCancelled())
+						break;
+				else
+					TeProgress::instance()->setProgress(j+1);
+			}
+		}	
+		SHPDestroyObject( psShape );
+	}
+	layer->addPoints( points ); 
+	points.clear();
+	if(TeProgress::instance())
+		TeProgress::instance()->setProgress(j+1);
+}
+
+void
+TeSHPPolyLineDecode ( TeLayer*layer, SHPHandle hSHP, vector<string>& indexVect, unsigned int chunckSize )
+{
+	int nEntities = hSHP->nRecords; // indicates how many regions are there
+	TeLineSet lines;
+
+/* -------------------------------------------------------------------- */
+/*	Skim over the list of shapes, reading all the vertices.	            */
+/* -------------------------------------------------------------------- */
+	if(TeProgress::instance())
+		TeProgress::instance()->setTotalSteps(nEntities);
+
+	int i;
+    for(i = 0; i < nEntities; i++ )
+    {
+        SHPObject* psShape = SHPReadObject( hSHP, i );
+
+		// Build an array whose components point to the starting point
+		// of the rings that compose the shapepoly
+		int iPart;
+		vector<int> partStart;
+
+		// Build an array whose components point to the starting point
+		// of the segments that compose the shapeline
+		//
+		for ( iPart = 0; iPart < psShape->nParts; iPart++ )
+		{
+			partStart.push_back ( psShape->panPartStart[iPart] );
+		}
+		partStart.push_back ( psShape->nVertices ); // point to the end
+
+		iPart = 0;
+
+		int j = 0; 
+
+		while ( j < psShape->nVertices )
+		{
+			TeLine2D line;
+
+			iPart++;  // indicates the different segments of the line
+			// Read each segment
+			while ( j < partStart[iPart] )
+			{
+				TeCoord2D pt ( psShape->padfX[j], psShape->padfY[j] );
+				line.add ( pt );
+				j++;
+			}
+			// set the geometry Id for the line 
+			line.objectId ( indexVect[i] ); // set the object index
+			
+			lines.add ( line );
+		}
+		
+		// check if there is a chunk of lines to be inserted into the database
+		if ( lines.size() >= chunckSize )
+		{
+			layer->addLines( lines ); 
+			lines.clear();
+			if(TeProgress::instance())
+			{
+				if (TeProgress::instance()->wasCancelled())
+					break;
+				else
+					TeProgress::instance()->setProgress(i+1);
+			}
+		}		
+		SHPDestroyObject( psShape );
+	}
+	
+	// saves the remaining lines into the database
+	layer->addLines( lines ); 
+	lines.clear();
+	if(TeProgress::instance())
+		TeProgress::instance()->setProgress(i+1);
+}
+
+void
+TeSHPPolygonDecode ( TeLayer* layer, SHPHandle hSHP, vector<string>& indexVect, unsigned int chunckSize )
+{
+
+	int nEntities = hSHP->nRecords; // indicates how many regions are there
+	TePolygonSet polys;
+
+/* -------------------------------------------------------------------- */
+/*	Skim over the list of shapes, reading all the vertices.	            */
+/* -------------------------------------------------------------------- */
+	if(TeProgress::instance())
+		TeProgress::instance()->setMessage("Importando poligonos, aguarde...      ");
+
+	int i;
+    for(i = 0; i < nEntities; i++ )
+    {
+		SHPObject* psShape = SHPReadObject( hSHP, i );
+
+		int iPart;
+		vector<int> partStart;
+
+		// Auxiliary variables
+
+		list<TePolygon> pList;
+
+		// Build an array whose components point to the starting point
+		// of the rings that compose the shapepoly
+		//
+		for ( iPart = 0; iPart < psShape->nParts; iPart++ )
+		{
+			partStart.push_back ( psShape->panPartStart[iPart] );
+		}
+		partStart.push_back ( psShape->nVertices ); // point to the end
+
+		iPart = 0;
+
+		int j = 0;
+
+		while ( j < psShape->nVertices )
+		{
+			iPart++;  // indicates the different rings of the shapepoly
+			TeLine2D line;
+
+			// Read each ring
+			while ( j < partStart[iPart] )
+			{
+				TeCoord2D pt ( psShape->padfX[j], psShape->padfY[j] );
+				line.add ( pt );
+				j++;
+			}
+			// end of a ring
+
+			if (!line.isRing())
+			{
+				line.add(line[0]);
+//				throw TeException ( POLYSHAPE_IS_NOT_RING );
+			}
+
+			TeLinearRing ring ( line );
+
+			// Is it an OUTER or an INNER RING ?
+
+			bool inside = false;
+
+			list<TePolygon>::iterator it = pList.begin();
+
+
+			// Each ring is assigned to a polygon
+			// Each ring and polygon have a unique "geometrical index"
+			//
+			// All rings and polygons that are part of a same object
+			// have the same "object index"
+
+			while ( it != pList.end() )
+			{
+				TePolygon aux;
+				aux.add(ring);
+				if ( TeWithin ( aux, (*it)))
+				{
+					inside = true;
+					ring.objectId ( (*it)[0].objectId() ); // sets the object index
+					(*it).add ( ring );// add a closed region
+					break;
+				}
+				++it;
+			}
+			if ( ! inside )
+			{
+				TePolygon poly;
+				ring.objectId (indexVect[i]);
+				
+				// add a pair (objectId, geometryId) to the layer
+				poly.add ( ring ); // add an outer region
+				poly.objectId ( indexVect[i] ); // set the object index
+
+				pList.push_back ( poly );
+			}
+		} // read all vertices
+
+		list<TePolygon>::iterator it = pList.begin();
+
+		while ( it != pList.end() )
+		{
+			polys.add(*it);
+			++it;
+		}
+		if ( polys.size() >= chunckSize )
+		{
+			layer->addPolygons( polys ); 
+			polys.clear();
+			if(TeProgress::instance())
+			{
+				if (TeProgress::instance()->wasCancelled())
+						break;
+				else
+					TeProgress::instance()->setProgress(i+1);
+			}
+		}
+		SHPDestroyObject( psShape );
+	} // read all entities
+
+	// save the remaining polygons
+	layer->addPolygons( polys ); 
+	polys.clear();
+	if(TeProgress::instance())
+		TeProgress::instance()->setProgress(i+1);
+}
+
diff --git a/src/terralib/drivers/shapelib/TeQuerierSHP.cpp b/src/terralib/drivers/shapelib/TeQuerierSHP.cpp
new file mode 100755
index 0000000..0fd8576
--- /dev/null
+++ b/src/terralib/drivers/shapelib/TeQuerierSHP.cpp
@@ -0,0 +1,105 @@
+
+#include "TeQuerierSHP.h"
+#include "TeSTEFunctionsSHP.h"
+#include "TeSTInstance.h"
+
+bool 
+TeQuerierSHP::loadInstances(TeTSEntry* ) 
+{ 
+	// Read some information about the shapefile
+	string filePrefix = TeGetName(params_->fileName().c_str());
+	string shpfileName = filePrefix + ".shp";
+
+	hSHP = SHPOpen( shpfileName.c_str(), "rb" );
+	
+	if( hSHP == 0 )
+		return false;
+
+	double 	adfMinBound[4], adfMaxBound[4];
+	SHPGetInfo(hSHP, &nEntities, &nShapeType, adfMinBound, adfMaxBound);
+	
+	TeBox b(adfMinBound[0], adfMinBound[1], adfMaxBound[0], adfMaxBound[1]);
+	params_->box(b);
+
+	string dbffileName = filePrefix + ".dbf";
+    hDBF = DBFOpen( dbffileName.c_str(), "rb" );
+    if( hDBF == 0  || DBFGetFieldCount(hDBF) == 0)
+		return false;
+    
+	//load attribute list
+	TeReadDBFAttributeList(shpfileName, (*attrList_));
+
+	TeAttributeRep repobjid;
+	repobjid.name_ = "object_id";
+	repobjid.numChar_ = 16;
+
+	TeAttribute attobjid;
+	attobjid.rep_ = repobjid;
+
+	//insert objectId attribute in attribute list
+	attrList_->push_back(attobjid); 
+    curEntity = 0;
+	return true;
+}
+		
+bool 
+TeQuerierSHP::fetchInstance(TeSTInstance& stoi ) 
+{
+	if(curEntity>(nEntities-1))
+		return false;
+
+	//clear stoi
+	stoi.clear();
+
+	TeAttributeRep repobjid;
+	repobjid.name_ = "object_id";
+	repobjid.numChar_ = 16;
+	TeAttribute attobjid;
+	attobjid.rep_ = repobjid;
+	
+	TeProperty propobjid;
+	propobjid.attr_ = attobjid;
+	
+	SHPObject* psShape;
+	
+	string objectid = Te2String(curEntity);
+	stoi.objectId(objectid);
+	propobjid.value_ = objectid;
+		
+	TePropertyVector prop;
+	psShape = SHPReadObject(hSHP,curEntity);
+		
+	if (TeDecodeShape(psShape,stoi.geometries(),objectid))
+	{
+		int numCols = attrList_->size()-1; //the last column is the object id
+		for(int n=0;n<numCols;n++)
+		{
+			string value = DBFReadStringAttribute(hDBF,curEntity,n);
+			TeProperty p;
+			p.attr_ = (*attrList_)[n];
+			p.value_ = value;
+			prop.push_back(p);
+		}
+		prop.push_back(propobjid); // add the object id
+		stoi.properties(prop);
+		stoi.theme(0);
+	}
+	SHPDestroyObject(psShape);
+	++curEntity;
+	return true; 
+} 
+
+bool 
+TeQuerierSHP::loadGeometries(TeMultiGeometry&, unsigned int&) 
+{ 
+	return false; 
+}
+
+bool 
+TeQuerierSHP::loadGeometries(TeMultiGeometry&) 
+{ 
+	return false; 
+}
+
+
+
diff --git a/src/terralib/drivers/shapelib/TeQuerierSHP.h b/src/terralib/drivers/shapelib/TeQuerierSHP.h
new file mode 100755
index 0000000..d75cc69
--- /dev/null
+++ b/src/terralib/drivers/shapelib/TeQuerierSHP.h
@@ -0,0 +1,118 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeQuerierSHP.h
+	\brief This file contains a mechanism named "TeQuerierSHP" that is 
+	responsible for loading geometries and its attributes from a shapefile. 
+*/
+
+#ifndef  __TERRALIB_INTERNAL_QUERIER_SHP_H
+#define  __TERRALIB_INTERNAL_QUERIER_SHP_H
+
+#include "TeQuerierImpl.h"
+#include <shapefil.h>
+
+/*! \class TeQuerierSHP
+	\brief A class responsible for loading geometries and its attributes from a shape file.
+
+	This class implements a mechanism that is responsible for loading
+	geometries and its attributes from a shape file (.shp file). 
+	Each entity (geometries and attributes) of the shape file is 
+	represented through the TeSTInstance class.  
+
+	\sa
+	TeQuerierImpl TeQuerierParams TeSTInstance 
+*/
+class TeQuerierSHP : public TeQuerierImpl
+{
+	
+protected:
+
+	SHPHandle	hSHP;			//!< handle to the file that stores geometries (.shp) of the shapefile format 
+	DBFHandle	hDBF;			//!< handle to the file that stores attributes (.dbf) of the shapefile format 
+	int			nEntities;		//!< number of entities in the shape file
+	int			curEntity;		//!< current entity index used to traverse all entities of the shape file
+	int			nShapeType;		//!< geometry type of the shape file  
+	
+public:
+
+		//! Constructor from a set of parameters
+		TeQuerierSHP(TeQuerierParams* params): 
+			TeQuerierImpl(params),
+			nEntities(0),
+			curEntity(0),
+			nShapeType()
+		{ }
+
+		
+		//! Returns the file name 
+		string fileName () { return params_->fileName(); }
+
+		//! Load information about the geometries and attributes of the shape file 
+		bool loadInstances(TeTSEntry* ent = 0); 
+		
+		//! Gets the current entity and moves to the next one. Returns if there is a next entity. 
+		bool fetchInstance(TeSTInstance& stoi); 
+
+		//! Loads all geometries of the index-th geometry representation 
+		bool loadGeometries(TeMultiGeometry& geometries, unsigned int& index); 
+		
+		//! Loads all geometries 
+		bool loadGeometries(TeMultiGeometry& geometries); 
+};
+
+
+/*! \class TeQuerierSHPFactory
+	\brief A class that define a factory to build a querier strategy from shape file.
+
+	\sa
+	TeQuerierImplFactory TeQuerierSHP
+*/
+class TeQuerierSHPFactory : public TeQuerierImplFactory
+{
+public:
+
+	//! Constructor
+	TeQuerierSHPFactory(const string& name) : TeQuerierImplFactory(name) {}
+
+	//! Builds a shapefile querier
+	virtual TeQuerierImpl* build (const TeQuerierParams& arg)
+	{  
+		TeQuerierParams* tempArg = new TeQuerierParams();
+		*tempArg = arg;
+		return new TeQuerierSHP(tempArg); 
+	}
+};
+ 
+/** \example createSTElementSetFromShapeFile.cpp
+	Shows how to create a new Spatial Temporal Element Set (STElementSet) from a shapefile
+*/
+
+namespace 
+{
+  static TeQuerierSHPFactory querierSHP("querierSHP");
+};
+
+
+#endif
+
+
diff --git a/src/terralib/drivers/shapelib/TeSTEFunctionsSHP.cpp b/src/terralib/drivers/shapelib/TeSTEFunctionsSHP.cpp
new file mode 100755
index 0000000..4ea17e1
--- /dev/null
+++ b/src/terralib/drivers/shapelib/TeSTEFunctionsSHP.cpp
@@ -0,0 +1,126 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+#include "TeSTEFunctionsSHP.h"
+#include "TeSTElementSet.h"
+#include <vector>
+
+bool TeDecodeShape(SHPObject* psShape, TeMultiGeometry& geomestries, string& objectId)
+{
+	int shpType = psShape->nSHPType;
+	switch (shpType)
+	{
+		case SHPT_POLYGON:
+		case SHPT_POLYGONZ:
+			TeSHPPolygonDecode(psShape,geomestries.polygons_,objectId);
+			return true;
+		case SHPT_ARC:
+		case SHPT_ARCZ:
+			TeSHPPolyLineDecode(psShape,geomestries.lines_,objectId);
+			return true;
+		case SHPT_POINT:
+		case SHPT_POINTZ:
+		case SHPT_MULTIPOINT:
+		case SHPT_MULTIPOINTZ:
+			TeSHPPointDecode(psShape,geomestries.points_,objectId);
+			return true;
+	}
+	return false;
+}
+
+bool
+TeSTOSetBuildSHP(TeSTElementSet& stoset, const string& fileName)
+{
+	// Read some information about the shapefile
+	string filePrefix = TeGetName(fileName.c_str());
+	string shpfileName = filePrefix + ".shp";
+
+	SHPHandle	hSHP;
+	hSHP = SHPOpen( shpfileName.c_str(), "rb" );
+
+	if( hSHP == 0 )
+		return false;
+
+	int		nShapeType, nEntities;
+	double 	adfMinBound[4], adfMaxBound[4];
+
+	SHPGetInfo(hSHP, &nEntities, &nShapeType, adfMinBound, adfMaxBound);
+
+	string dbffileName = filePrefix + ".dbf";
+  DBFHandle hDBF = DBFOpen( dbffileName.c_str(), "rb" );
+  if( hDBF == 0  || DBFGetFieldCount(hDBF) == 0) {
+    SHPClose( hSHP );
+  
+		return false;
+	}
+    
+	int natt = DBFGetFieldCount(hDBF);
+	TeAttributeList attList;
+	TeReadDBFAttributeList(shpfileName, attList);
+
+	TeAttributeRep repobjid;
+	repobjid.name_ = "object_id";
+	repobjid.numChar_ = 16;
+
+	TeAttribute attobjid;
+	attobjid.rep_ = repobjid;
+
+	TeProperty propobjid;
+	propobjid.attr_ = attobjid;
+	
+	TeAttributeList attrs; 
+	attrs.push_back (attobjid);
+	for(unsigned int j=0; j<attList.size(); ++j)
+	  attrs.push_back(attList[j]);
+	 
+	stoset.setAttributeList(attrs); 	
+	
+	int i,n;
+	SHPObject* psShape;
+	for (i=0; i<nEntities; i++)
+	{
+		string objectid = Te2String(i);
+		TeSTInstance curObj;
+		curObj.objectId(objectid);
+
+		vector<string> prop; //values of the attributes
+		psShape = SHPReadObject(hSHP,i);
+		if (TeDecodeShape(psShape,curObj.geometries(),objectid))
+		{
+			prop.push_back(objectid);
+			for(n=0;n<natt;n++)
+			{
+				string value = DBFReadStringAttribute(hDBF,i,n);
+				prop.push_back(value);
+			}
+			curObj.setProperties(prop);
+			stoset.insertSTInstance(curObj);
+			curObj.theme(0);
+		}
+		SHPDestroyObject(psShape);
+	}
+	
+	DBFClose( hDBF );
+	SHPClose( hSHP );
+	
+	return true;
+} 
diff --git a/src/terralib/drivers/shapelib/TeSTEFunctionsSHP.h b/src/terralib/drivers/shapelib/TeSTEFunctionsSHP.h
new file mode 100755
index 0000000..b9ffaf8
--- /dev/null
+++ b/src/terralib/drivers/shapelib/TeSTEFunctionsSHP.h
@@ -0,0 +1,88 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeSTEFunctionsSHP.h
+    This file is a wrapper aroun shapelib to provide funcions to decodify shapefiles
+*/
+#ifndef  __TERRALIB_INTERNAL_TeSTEFUNCTIONSSHP_H
+#define  __TERRALIB_INTERNAL_TeSTEFUNCTIONSSHP_H
+
+#include <string>
+#include <TeAttribute.h>
+#include <shapefil.h>
+
+class TeSTElementSet; 
+class TeLineSet; 
+class TePolygonSet; 
+class TePointSet; 
+class TeMultiGeometry; 
+
+using namespace std;
+
+//! Builds the spatial object set from database according to the restrictions previously defined
+/*! 
+	\param stoset the STOSet that will be filled 
+	\param fileName shape file name
+*/
+bool TeSTOSetBuildSHP(TeSTElementSet& stoset, const string& fileName);
+
+
+//! Decodify a ShapeObject into a TerraLib point set
+/*! 
+	\param psShape pointer to a shapelib shape object 
+	\param ps TerraLib point set to receive the geometries
+	\param objectId TerraLib identifier to this object
+*/
+void TeSHPPointDecode	(SHPObject* psShape, TePointSet& ps, string& objectId);
+
+//! Decodify a ShapeObject into a TerraLib line set
+/*! 
+	\param psShape pointer to a shapelib shape object 
+	\param ps TerraLib line set to receive the geometries
+	\param objectId TerraLib identifier to this object
+*/
+void TeSHPPolyLineDecode(SHPObject* psShape, TeLineSet& ls, string& objectId);
+
+//! Decodify a ShapeObject into a TerraLib polygon set
+/*! 
+	\param psShape pointer to a shapelib shape object 
+	\param ps TerraLib polygon set to receive the geometries
+	\param objectId TerraLib identifier to this object
+*/
+void TeSHPPolygonDecode	(SHPObject* psShape, TePolygonSet& pols, string& objectId);
+
+//! Decodify a ShapeObject into a TerraLib multigeometry set
+/*! 
+	\param psShape pointer to a shapelib shape object 
+	\param geomestries TerraLib multi geometry set to receive the geometries
+	\param objectId TerraLib identifier to this object
+*/
+bool TeDecodeShape(SHPObject* psShape, TeMultiGeometry& geomestries, string& objectId);
+
+//! Decodify the attribute list definition from a dbf file into a TerraLib attribute list
+/*! 
+	\param dbfFilename name of the DBF file 
+	\param attList to return the list of attributes
+*/
+bool TeReadDBFAttributeList(const string& dbfFileName, TeAttributeList& attList);
+#endif
+
diff --git a/src/terralib/dtm/TeDTMAlgorithm.cpp b/src/terralib/dtm/TeDTMAlgorithm.cpp
new file mode 100755
index 0000000..aa943a2
--- /dev/null
+++ b/src/terralib/dtm/TeDTMAlgorithm.cpp
@@ -0,0 +1,73 @@
+#include "TeDTMAlgorithm.h"
+
+#include <TeAgnostic.h>
+
+TeDTMAlgorithm::TeDTMAlgorithm()
+{
+  progress_enabled_ = true;
+}
+
+
+TeDTMAlgorithm::~TeDTMAlgorithm()
+{
+}
+
+
+bool TeDTMAlgorithm::reset( const TeDTMParameters& params )
+{
+  if( checkParameters( params ) ) {
+    resetState( params );
+
+    /* This line must come after the ResetState line, because some algorithms
+       checks the difference between the current internal parameters and the
+       new supplied parameters */
+    params_.clear();
+    params_ = params;
+
+    return true;
+  } else {
+    TEAGN_LOG_AND_RETURN( "Invalid supplied parameters" );
+  }
+}
+
+
+bool TeDTMAlgorithm::apply()
+{
+  bool return_value = false;
+  
+  if( checkInternalParameters() ) {
+    return_value = runImplementation();
+  } else {
+    TEAGN_LOG_AND_RETURN( "Invalid supplied parameters" );
+  }
+  
+  return return_value;
+}
+
+
+const TeDTMParameters& TeDTMAlgorithm::getParameters() const
+{
+  return params_;
+}
+
+
+bool TeDTMAlgorithm::checkInternalParameters() const
+{
+  return checkParameters( params_ );
+}
+
+
+const TeDTMAlgorithm& TeDTMAlgorithm::operator=( 
+  const TeDTMAlgorithm& external )
+{
+  TEAGN_LOG_AND_THROW( "Algorithms cannot be copied" );  
+  
+  return external;
+}
+
+
+void TeDTMAlgorithm::toggleProgInt( bool enabled )
+{
+  progress_enabled_ = enabled;
+}
+
diff --git a/src/terralib/dtm/TeDTMAlgorithm.h b/src/terralib/dtm/TeDTMAlgorithm.h
new file mode 100755
index 0000000..7d1d1f9
--- /dev/null
+++ b/src/terralib/dtm/TeDTMAlgorithm.h
@@ -0,0 +1,147 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEDTMALGORITHM_HPP
+  #define TEDTMALGORITHM_HPP
+
+  #include "TeDTMParameters.h"
+
+/**
+ * @brief This is the base class for DTM algorithms.
+ * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+ * @ingroup TeDTMGeneralAlgoGroup
+ */
+  class DTM_DLL TeDTMAlgorithm
+  {
+    public :
+      
+      /**
+       * @brief Default Destructor
+       */
+      virtual ~TeDTMAlgorithm();
+
+      /**
+       * @brief Applies the algorithm following the current state and
+       * internal stored parameters.
+       *
+       * @return true if OK. false on error.
+       */
+      bool apply();
+
+      /**
+       * @brief Reset the internal state with new supplied parameters.
+       *
+       * @param params The new supplied parameters.
+       * @return true if parameters OK, false on error.
+       */
+      bool reset( const TeDTMParameters& params );
+
+      /**
+       * @brief Checks if the supplied parameters fits the requirements of each
+       * DTM algorithm implementation.
+       *
+       * @note Error log messages must be generated. No exceptions generated.
+       *
+       * @param parameters The parameters to be checked.
+       * @return true if the parameters are OK. false if not.
+       */
+      virtual bool checkParameters( 
+        const TeDTMParameters& parameters ) const = 0;
+
+      /**
+       * @brief Returns a reference to the current internal parameters.
+       *
+       * @return A reference to the current internal parameters.
+       */
+      const TeDTMParameters& getParameters() const;
+      
+      /**
+       * @brief Enable / Disable the progress interface.
+       *
+       * @param enabled Flag to enable ( true ) or disable ( false ).
+       */
+      void toggleProgInt( bool enabled );        
+
+    protected :
+      /**
+       * @brief Internal parameters reference
+       */
+      mutable TeDTMParameters params_;
+      
+      /**
+       * @brief The internal progress interface enabled state.
+       */
+      bool progress_enabled_;
+ 
+      /**
+       * @brief Default Constructor
+       */
+      TeDTMAlgorithm();
+
+      /**
+       * @brief Runs the current algorithm implementation.
+       *
+       * @return true if OK. false on error.
+       */
+      virtual bool runImplementation() = 0;
+
+      /**
+       * @brief Reset the internal state to the initial state.
+       *
+       * @param params The new parameters referente at initial state.
+       */
+      virtual void resetState( const TeDTMParameters& params ) = 0;
+      
+      /**
+       * @brief Checks if current internal parameters fits the requirements of each
+       * DTM algorithm implementation.
+       *
+       * @note Error log messages must be generated. No exceptions generated.
+       *
+       * @return true if the internal parameters are OK. false if not.
+       */
+      bool checkInternalParameters() const;
+                
+    private :
+    
+      /**
+       * @brief Alternative constructor.
+       *
+       * @note Algorithms cannot be copied.
+       */    
+      TeDTMAlgorithm( const TeDTMAlgorithm& ) {};
+    
+      /**
+       * @brief Operator = overload.
+       *
+       * @note Algorithms cannot be copied.
+       *
+       * @param external External algorithm reference.
+       * @return A const Algorithm reference.
+       */
+      const TeDTMAlgorithm& operator=( 
+        const TeDTMAlgorithm& external );
+  };
+
+#endif //TEDTMALGORITHM_HPP
diff --git a/src/terralib/dtm/TeDTMDefines.h b/src/terralib/dtm/TeDTMDefines.h
new file mode 100755
index 0000000..f0a04fa
--- /dev/null
+++ b/src/terralib/dtm/TeDTMDefines.h
@@ -0,0 +1,73 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+/**
+ * @defgroup DTMModule DTM Processing.
+ */  
+ 
+/**
+ * @defgroup DTMAlgorithms DTM Processing Algorithms.
+ * @ingroup DTMModule
+ */ 
+ 
+/**
+ * @defgroup TeDTMGeneralAlgoGroup General purpose DTM algorithms.
+ * @ingroup DTMAlgorithms
+ */ 
+ 
+/**
+ * @defgroup DTMAux DTM auxiliary classes/methods.
+ * @ingroup DTMModule
+ */    
+
+/**
+ * @file TeDTMDefines.hpp
+ * @brief This file contains a set of definitions used by DTM module.
+ * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+ */
+
+#ifndef TEDTMDEFINES_HPP
+  #define TEDTMDEFINES_HPP
+
+/** @defgroup DTM_AS_DLL macros.
+  @{
+ */
+#if defined( WIN32 ) || defined( __WIN32__ ) || defined ( _WIN32 ) || defined( WIN64 ) || defined( _WIN32_WCE )
+
+#if defined(_MSC_VER) /* MSVC Compiler */
+#pragma warning(disable: 4251)
+#endif
+
+#ifdef DTM_AS_DLL
+#define DTM_DLL __declspec(dllexport)
+#else
+#define DTM_DLL __declspec(dllimport)
+#endif
+
+#else
+#define DTM_DLL
+#endif
+/** @} */ 
+
+#endif
diff --git a/src/terralib/dtm/TeDTMParameters.cpp b/src/terralib/dtm/TeDTMParameters.cpp
new file mode 100755
index 0000000..f5a500e
--- /dev/null
+++ b/src/terralib/dtm/TeDTMParameters.cpp
@@ -0,0 +1,12 @@
+#include "TeDTMParameters.h"
+
+
+TeDTMParameters::TeDTMParameters()
+{
+}
+
+
+TeDTMParameters::~TeDTMParameters()
+{
+}
+
diff --git a/src/terralib/dtm/TeDTMParameters.h b/src/terralib/dtm/TeDTMParameters.h
new file mode 100755
index 0000000..6073cd5
--- /dev/null
+++ b/src/terralib/dtm/TeDTMParameters.h
@@ -0,0 +1,64 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+/**
+ *  @brief This file contains the class of structures and definitions
+ *   to deal with parameters used by all DTM classes.
+ */
+
+#ifndef TEDTMPARAMETERS_HPP
+  #define TEDTMPARAMETERS_HPP
+
+  #include <TeDTMDefines.h>
+  #include <TeMultiContainer.h>
+  
+  #include <string>
+
+  /**
+  * @brief This is the class to deal with parameters used by all DTM classes.
+  * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+  * @ingroup DTMAux
+  @note Do not use this class with polymorphic types !!
+  */
+  class DTM_DLL TeDTMParameters : public 
+    TeMultiContainer< std::string >
+  {
+    public :
+    
+      /**
+       * @brief Default Constructor
+       */
+      TeDTMParameters();
+      
+      /**
+       * @brief  Default Destructor
+       */
+      ~TeDTMParameters();
+  };
+
+/** @example TeDTMParameters_test.cpp
+ *    Shows how to use this class.
+ */  
+
+#endif //TEDTMPARAMETERS_HPP
diff --git a/src/terralib/functions/TeAddressLocator.cpp b/src/terralib/functions/TeAddressLocator.cpp
old mode 100644
new mode 100755
index 5d32a15..20b0e06
--- a/src/terralib/functions/TeAddressLocator.cpp
+++ b/src/terralib/functions/TeAddressLocator.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -1657,14 +1657,14 @@ bool TeAddressLocator::loadDictionary(const string& dictionaryFileName)
 			
 			string str1 = TeConvertToUpperCase(strList[0]);
 
-			str1.erase(0, 1);
-			str1.erase(str1.size() - 1, 1);
+			str1 = str1.substr(1);
+			str1 = str1.substr(0, str1.size() - 1);
 
 			for(unsigned int i = 1; i < strList.size(); ++i)
 			{
 				string str2 = TeConvertToUpperCase(strList[i]);
-				str2.erase(0, 1);
-				str2.erase(str2.size() - 1, 1);
+				str2 = str2.substr(1);
+				str2 = str2.substr(0, str2.size() - 1);
 
 				dictionary_.insert(TeGeocoderDictionary::value_type(str2, str1));
 			}
@@ -2460,7 +2460,7 @@ bool TeAddressLocator::addReportColumn(TeGeocodeTableMetadata& tableMetadata, pa
 	rep1.isPrimaryKey_ = false;
 	rep1.isAutoNumber_ = false;
 
-	TeAttributeList attrList = portal->AttributeList();
+	TeAttributeList& attrList = portal->getAttributeList();
 	validColumnName(rep1, attrList);
 
 	TeAttributeRep rep2;
diff --git a/src/terralib/functions/TeAddressLocator.h b/src/terralib/functions/TeAddressLocator.h
old mode 100644
new mode 100755
index 7009516..279bdce
--- a/src/terralib/functions/TeAddressLocator.h
+++ b/src/terralib/functions/TeAddressLocator.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,9 +20,8 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeAddressLocator.h
-    This file contains algorithms for address location generation.
+    \brief This file contains algorithms for address location generation.
 */
 
 /**
@@ -40,7 +39,12 @@ of this library and its documentation.
 
 using namespace std;
 
+/** @defgroup GeoCod Geocoding 
+    @{
+	Structures and classes supporting geocoding operations.
+ */
 
+//! A dictionary of geocoding parameters
 typedef multimap<string, string> TeGeocoderDictionary;
 
 
@@ -415,6 +419,6 @@ class TeAddressLocator
 		TeAddressLocator(const TeAddressLocator& other);
 		TeAddressLocator& operator=(const TeAddressLocator& other);
 };
-
+/** @} */
 #endif	// __TERRALIB_INTERNAL_ADDRESSLOCATOR_H
 
diff --git a/src/terralib/functions/TeCellAlgorithms.cpp b/src/terralib/functions/TeCellAlgorithms.cpp
old mode 100644
new mode 100755
index 042b8ae..90a8fa4
--- a/src/terralib/functions/TeCellAlgorithms.cpp
+++ b/src/terralib/functions/TeCellAlgorithms.cpp
@@ -27,6 +27,157 @@ of this library and its documentation.
 #include "TeProgress.h"
 #include "TeRepresentation.h"
 #include "TeGeneralizedProxMatrix.h"
+#include "TeOverlay.h"
+#include <TeDatabase.h>
+#include <TeQuerier.h>
+#include <TeQuerierParams.h>
+#include <TeSTEFunctionsDB.h>
+
+using namespace TeOVERLAY;
+
+// functions for working with the progress bar
+
+void TeFillCellStepLoadingData()
+{
+	if(TeProgress::instance())
+	{
+		TeProgress::instance()->setTotalSteps(2);
+		TeProgress::instance()->setMessage("Step 1/3: Loading data");
+		TeProgress::instance()->setProgress(1);
+	}
+	return;
+}
+
+void TeFillCellStepStartProcessing(int steps)
+{
+	if (TeProgress::instance())
+	{
+		TeProgress::instance()->reset();
+		TeProgress::instance()->setTotalSteps(steps);
+		TeProgress::instance()->setMessage("Step 2/3: Processing");
+	}
+}
+
+bool TeFillCellStepNextStep(int step)
+{
+	if(TeProgress::instance())
+	{
+		if (TeProgress::instance()->wasCancelled())
+		{
+			TeProgress::instance()->reset();
+			return false;
+		}
+		else
+			TeProgress::instance()->setProgress(step);
+	}
+	return true;
+}
+
+void TeFillCellStepWriting()
+{
+	if (TeProgress::instance())
+	{
+		TeProgress::instance()->reset();
+		TeProgress::instance()->setMessage("Step 3/3: Writing results");
+	}
+}
+
+// TeBoxRasterIterator functions
+TeBoxRasterIterator::TeBoxRasterIterator(TeRaster* raster_, TeBox box) 
+{ 
+	raster = raster_;
+	TeCoord2D l = raster->coord2Index(box.lowerLeft());
+	TeCoord2D r = raster->coord2Index(box.upperRight());
+
+	xo = (int)floor(l.x()); if(xo < 0) xo = 0;
+	yo = (int)floor(r.y()); if(yo < 0) yo = 0;
+	xf = (int)floor(r.x()); if(xf >= raster->params().ncols_)   xf = raster->params().ncols_ - 1;
+	yf = (int)floor(l.y()); if(yf >= raster->params().nlines_)  yf = raster->params().nlines_  - 1;
+
+	// in the case where the cell does not have intersection with any pixel of the raster
+	end_ = false;
+	if(xo >= raster->params().ncols_)  end_ = true;
+	if(yo >= raster->params().nlines_) end_ = true;
+	if(xf <= 0)                        end_ = true;
+	if(yf <= 0)                        end_ = true;
+}
+
+
+TeBoxRasterIterator&
+TeBoxRasterIterator::operator++() 
+{ 
+	x++;
+	if(x > xf)
+	{
+		x = xo;
+		y++;
+	}
+	return *this;
+}
+
+
+TeBoxRasterIterator 
+TeBoxRasterIterator::operator++(int) 
+{
+	x++;
+	if(x >= xf)
+	{
+		x = xo;
+		y++;
+	}
+	return *this;
+}
+
+double 
+TeBoxRasterIterator::operator*() 
+{ 
+	double value;
+	raster->getElement (x, y, value, 0);
+	return value;
+}
+
+bool 
+TeBoxRasterIterator::operator==(const TeBoxRasterIterator& rhs) const
+{
+	return (this->x == rhs.x && this->y == rhs.y);
+}
+
+bool 
+TeBoxRasterIterator::operator!=(const TeBoxRasterIterator& rhs) const
+{
+    return (this->x != rhs.x || this->y != rhs.y);
+}
+
+bool 
+TeBoxRasterIterator::getProperty(TeProperty& prop) 
+{
+	double value = 0.0;
+    prop.attr_.rep_.type_ = TeREAL;
+    prop.attr_.rep_.name_ = raster->params().fileName_;
+    prop.value_ = Te2String (value);
+
+	raster->getElement (x, y, value, 0);
+	prop.value_ = Te2String(value);
+    return true;
+}
+
+TeBoxRasterIterator 
+TeBoxRasterIterator::begin()
+{
+	if(end_) 
+		return end();
+	x = xo;
+	y = yo;
+	return *this;
+}
+
+TeBoxRasterIterator 
+TeBoxRasterIterator::end()
+{
+	y = yf+1;
+	x = xo;
+	return *this;
+}
 
 TeLayer* 
 TeCreateCells( const string& layerName, TeLayer* layerBase, 
@@ -96,13 +247,14 @@ TeCreateCells( const string& layerName, TeLayer* layerBase,
 
 	TeAttribute attribute;
 	TeAttributeList attList;
-	attribute.rep_.name_ = "object_id_";
+	attribute.rep_.name_ = "object_id";
 	attribute.rep_.type_ = TeSTRING;
 	attribute.rep_.numChar_ = 48;
 	attribute.rep_.isPrimaryKey_ = true;
 	attList.push_back ( attribute );
 	attribute.rep_.name_ = "Col";
 	attribute.rep_.type_ = TeINT;
+	attribute.rep_.isPrimaryKey_ = false;
 	attList.push_back ( attribute );
 	attribute.rep_.name_ = "Lin";
 	attribute.rep_.type_ = TeINT;
@@ -129,8 +281,9 @@ TeCreateCells( const string& layerName, TeLayer* layerBase,
 	repp->nCols_ = maxcols;
 	repp->nLins_ = maxlines;
 	db->updateRepresentation(newLayer->id(),*repp);
+
+	TeTable attTable (layerName,attList,"object_id","object_id",TeAttrStatic);
 	
-	TeTable attTable (layerName,attList,"object_id_","object_id_",TeAttrStatic);
 	newLayer->createAttributeTable(attTable);
 
 	TeCellSet cells;
@@ -170,6 +323,7 @@ TeCreateCells( const string& layerName, TeLayer* layerBase,
 					if (db->spatialRelation(polTableName, TePOLYGONS, 
 						(TePolygon*)&polBox, portal, TeINTERSECTS))
 					{
+						curPol.clear();
 						portal->fetchGeometry(curPol);
 						found = true;
 					}
@@ -224,6 +378,8 @@ TeCreateCells( const string& layerName, TeLayer* layerBase,
 	}
 }
 
+
+
 	
 TeLayer*
 TeCreateCells(const string& layerName,TeTheme* theme, double resX, double resY, TeBox& box)
@@ -273,7 +429,7 @@ TeCreateCells(const string& layerName,TeTheme* theme, double resX, double resY,
 
 	TeAttribute attribute;
 	TeAttributeList attList;
-	attribute.rep_.name_ = "object_id_";
+	attribute.rep_.name_ = "object_id";
 	attribute.rep_.type_ = TeSTRING;
 	attribute.rep_.isPrimaryKey_ = true;
 	attribute.rep_.numChar_ = 48;
@@ -310,7 +466,7 @@ TeCreateCells(const string& layerName,TeTheme* theme, double resX, double resY,
 	repp->nLins_ = maxlines;
 	db->updateRepresentation(newLayer->id(),*repp);
 
-	TeTable attTable (layerName,attList,"object_id_","object_id_",TeAttrStatic);
+	TeTable attTable (layerName,attList,"object_id","object_id",TeAttrStatic);
 	newLayer->createAttributeTable(attTable);
 
 	string polTableName = inputLayer->tableName(TePOLYGONS);
@@ -350,6 +506,7 @@ TeCreateCells(const string& layerName,TeTheme* theme, double resX, double resY,
 				if (db->spatialRelation(polTableName, TePOLYGONS, 
 					(TePolygon*)&polBox, portal, TeINTERSECTS, theme->collectionTable()))
 				{
+					curPol.clear();
 					portal->fetchGeometry(curPol);
 					found = true;
 				}
@@ -518,7 +675,7 @@ bool
 TeKeepStatistics(TeTable& tableAttrCell, TeDatabasePortal* portal)
 {
 	
-	TeAttributeList attr = portal->AttributeList();
+	TeAttributeList attr = portal->getAttributeList();
 
 	//Mount the update sql from portal
 	string insert = "INSERT INTO "+ tableAttrCell.name() +" VALUES ( ";
@@ -547,9 +704,6 @@ TeKeepStatistics(TeTable& tableAttrCell, TeDatabasePortal* portal)
 }	
 
 
-
-
-
 //////////////////////////////////////////////////////////////////////
 //
 //				Fill Cell Auxiliary Funcions
@@ -567,216 +721,838 @@ bool TeFillCellInitLoad (TeLayer* cell_layer, const string& cell_tablename, TeCe
 	// if dynamic table was not created, create it
 	TeTable table;
 	if (!cell_layer->getAttrTablesByName(cell_tablename, table, TeFixedGeomDynAttr))
-		if (!TeCreateBasicDymanicCellTable (cell_layer, cell_tablename))
+		if (!TeCreateBasicDynamicCellTable (cell_layer, cell_tablename))
 			return false;
 
 	return true;
 }
 
 
+void TeFillCellInitSTO (const TeCell& cell, TePropertyVector& result, TeSTElementSet& cellObjSet, TeAttrTableType atttype, TeTimeInterval& t)
+{
+	TeSTInstance cellObj;
+	cellObj.objectId (cell.objectId());
+	string uniqueId = cell.objectId();
+	cellObj.addUniqueId (uniqueId); 
+	
+	if(atttype != TeAttrStatic)
+	{
+		uniqueId += t.getInitialDate() + t.getInitialTime();
+		uniqueId += t.getFinalDate()   + t.getFinalTime  ();
+
+		cellObj.addUniqueId (uniqueId);
+		cellObj.timeInterval (t);
+	}
 
-void TeFillCellInitSTO (const TeCell& cell, TeTimeInterval& t, TePropertyVector& result, TeSTElementSet& cellObjSet)
+	TePropertyVector::iterator itProp = result.begin();
+	while (itProp != result.end())
+	{
+		cellObj.addPropertyValue (itProp->value_);
+		itProp++;
+	}
+	cellObjSet.insertSTInstance (cellObj);
+	return;
+}
+
+
+void TeFillCellInitSTO (const TeCell& cell, vector<string>& result, TeSTElementSet& cellObjSet, TeAttrTableType atttype, TeTimeInterval& t)
 {
+	TeSTInstance cellObj;
+	cellObj.objectId (cell.objectId());
+	string uniqueId = cell.objectId();
+	cellObj.addUniqueId (uniqueId); 
 
-		TeSTInstance cellObj;
-		cellObj.objectId (cell.objectId());
-		string uniqueId = cell.objectId();
-		cellObj.addUniqueId (uniqueId); // ANAP
+	if(atttype != TeAttrStatic)
+	{
 		uniqueId += t.getInitialDate() + t.getInitialTime();
-		uniqueId += t.getFinalDate() + t.getFinalTime() ;
+		uniqueId += t.getFinalDate()   + t.getFinalTime  ();
+
 		cellObj.addUniqueId (uniqueId);
 		cellObj.timeInterval (t);
-		TePropertyVector::iterator itProp = result.begin();
-		while (itProp != result.end())
-		{
-			cellObj.addProperty (*itProp);
-			itProp++;
-		}
-		cellObjSet.insertSTInstance (cellObj);
-		return;
-}
+	}
 
+	cellObj.setProperties(result);
+	cellObjSet.insertSTInstance (cellObj);
+	return;
+}
 
 
 bool
-TeCreateBasicDymanicCellTable (TeLayer* cell_layer, const string cell_tablename)
+TeCreateBasicDynamicCellTable (TeLayer* cell_layer, const string cell_tablename)
 {
 	if (!cell_layer) return false;
 
-		TeAttribute		attribute;
-		TeAttributeList attList;
-		TeAttributeList keyList;
-
-		// attr_id
-		attribute.rep_.name_ = "attr_id";
-		attribute.rep_.type_ = TeSTRING;
-		attribute.rep_.numChar_ = 48;
-		attribute.rep_.isPrimaryKey_ = true;
-		attList.push_back (attribute);
-		keyList.push_back(attribute);
-
-		// object_id
-		attribute.rep_.name_ = "object_id";
-		attribute.rep_.type_ = TeSTRING;
-		attribute.rep_.numChar_ = 48;
-		attList.push_back ( attribute );
+	TeAttribute		attribute;
+	TeAttributeList attList;
+	TeAttributeList keyList;
+
+	// attr_id
+	attribute.rep_.name_ = "attr_id";
+	attribute.rep_.type_ = TeSTRING;
+	attribute.rep_.numChar_ = 48;
+	attribute.rep_.isPrimaryKey_ = true;
+	attList.push_back (attribute);
+	keyList.push_back(attribute);
+
+	// object_id
+	attribute.rep_.name_ = "object_id";
+	attribute.rep_.type_ = TeSTRING;
+	attribute.rep_.isPrimaryKey_ = false;
+	attribute.rep_.numChar_ = 48;
+	attList.push_back ( attribute );
 	
+	//  initial_time
+	attribute.rep_.name_ = "initial_time";
+	attribute.rep_.type_ = TeDATETIME;   
+	attribute.dateTimeFormat_ = "YYYYsMMsDDsHHsmmsSS";
+	attribute.dateChronon_ = TeSECOND;
+	attribute.rep_.numChar_ = 48;
+	attList.push_back ( attribute );
 
-		//  initial_time
-		attribute.rep_.name_ = "initial_time";
-	 	attribute.rep_.type_ = TeDATETIME;   
-		attribute.dateTimeFormat_ = "YYYYsMMsDDsHHsMMsSS";
-		attribute.dateChronon_ = TeSECOND;
-		attribute.rep_.numChar_ = 48;
-		attList.push_back ( attribute );
-
-
-		//  final_time
-		attribute.rep_.name_ = "final_time";
-	 	attribute.rep_.type_ = TeDATETIME;  
-		attribute.dateTimeFormat_ = "YYYYsMMsDDsHHsMMsSS";
-		attribute.dateChronon_ = TeSECOND;
-		attribute.rep_.numChar_ = 48;
-		attList.push_back ( attribute );
+	//  final_time
+	attribute.rep_.name_ = "final_time";
+ 	attribute.rep_.type_ = TeDATETIME;  
+	attribute.dateTimeFormat_ = "YYYYsMMsDDsHHsmmsSS";
+	attribute.dateChronon_ = TeSECOND;
+	attribute.rep_.numChar_ = 48;
+	attList.push_back ( attribute );
 		
 	// Create table and initialize attributes
-
-		TeTable cells_attTable (cell_tablename);       
-		cells_attTable.setAttributeList(attList);
-		cells_attTable.setTableType(TeFixedGeomDynAttr);
-		cells_attTable.setLinkName("object_id");
-		cells_attTable.setUniqueName("attr_id");
-		cells_attTable.attInitialTime ("initial_time"); 
-		cells_attTable.attFinalTime ("final_time"); 
-		cells_attTable.attTimeUnit (TeSECOND); 
+	TeTable cells_attTable (cell_tablename);       
+	cells_attTable.setAttributeList(attList);
+	cells_attTable.setTableType(TeFixedGeomDynAttr);
+	cells_attTable.setLinkName("object_id");
+	cells_attTable.setUniqueName("attr_id");
+	cells_attTable.attInitialTime ("initial_time"); 
+	cells_attTable.attFinalTime ("final_time"); 
+	cells_attTable.attTimeUnit (TeSECOND); 
 			
-		if (!cell_layer->createAttributeTable(cells_attTable))
-			return false;
+	if (!cell_layer->createAttributeTable(cells_attTable))
+		return false;
 
-		TeAttributeList attr; 
-		cell_layer->database ()->getAttributeList (cell_tablename, attr);
+	TeAttributeList attr; 
+	cell_layer->database ()->getAttributeList (cell_tablename, attr);
 
-		return true;
+	return true;
 }
 
-
-
 //////////////////////////////////////////////////////////////////////
 //
 //					Fill Cell Operations
 //
 /////////////////////////////////////////////////////////////////////
 
-bool TeFillCellSpatialOperation (TeDatabase* db,
-										const string& input_layername, 
-										TeGeomRep rep,
-										const string& input_tablename, 
-										const string& input_attrname,
-										TeTimeInterval t,
-										const string& cell_layername, 
-										const string& cell_tablename, 
-										const string& output_columnName,
-										TeComputeAttrSpatialStrategy* operation)
+struct cellDist
+{
+	double distance;
+	TeCellSet::iterator ref;
+	bool done;
+	bool valid;
+};
+
 
+vector<vector<cellDist> > BuildNeighbors(TeCellSet cells)
+{
+	vector<vector<cellDist> > result;
+	int line = 0, column = 0;
+
+	// look for the number of lines and columns of the set
+	for(TeCellSet::iterator cell_it = cells.begin(); cell_it != cells.end(); cell_it++)
+	{
+		if( (*cell_it).column() > column) column = (*cell_it).column();
+		if( (*cell_it).line  () > line)   line   = (*cell_it).line  ();
+	} 
+	
+	line++;
+	column++;
+
+	// initialize the neighbors	
+	result.resize(line);
+	for(int i = 0; i < line; i++)
+	{
+		result[i].resize(column);
+		for(int j = 0; j < column; j++)
+		{
+			result[i][j].valid    = false;
+			result[i][j].done     = false;
+		    result[i][j].distance = 0;
+		}
+	}
+
+	// set the values for the ones that have a cell
+	for(TeCellSet::iterator cell_it = cells.begin(); cell_it != cells.end(); cell_it++)
+	{
+		result[ (*cell_it).line() ][ (*cell_it).column() ].ref   = cell_it;
+		result[ (*cell_it).line() ][ (*cell_it).column() ].valid = true;
+	} 
+	
+	return result;
+}
+
+struct procDist
+{
+	int line;
+	int column;
+	TeBox box;
+};
+
+
+bool CalculateDistance(unsigned int line, unsigned int column, TeBox box, TeTheme* theme, double r, TeGeomRep rep, vector<vector<cellDist> >& Neighbors, list<procDist>& procList)
+{
+	if( Neighbors[line][column].done || !Neighbors[line][column].valid )
+	{
+		return false;
+	}
+
+	TeCellSet::iterator cell_it = Neighbors[line][column].ref; 
+	
+	TeQuerierParams params(true, false);
+	params.setParams (theme);
+    params.setSpatialRest(box, TeWITHIN, rep);
+
+	TeQuerier querier(params);
+
+    querier.loadInstances();
+	int quant = querier.numElemInstances();
+	TeCoord2D p1 = (*cell_it).box().center();
+
+	double dist = TeMAXFLOAT;
+
+	if(rep == TePOINTS)
+	{
+		for(int i = 0; i < quant; i++)
+		{
+		    TeSTInstance sti;
+		    querier.fetchInstance(sti);
+			TeMultiGeometry mg = sti.geometries();
+	
+			double x = TeDistance(p1, mg.getPoints()[0].location());
+			if (dist > x) dist = x;
+		}
+	}
+	if(rep == TeLINES)
+	{
+		for(int i = 0; i < quant; i++)
+		{
+		    TeSTInstance sti;
+		    querier.fetchInstance(sti);
+			TeMultiGeometry mg = sti.geometries();
+
+			TeLineSet ls = mg.getLines();
+
+    		int line_index;
+		    TeCoord2D pinter;
+			double x;
+    		TeNearest (p1, ls, line_index, pinter, x);
+            if (dist > x) dist = x;
+		}
+	}
+	if(rep == TePOLYGONS)
+	{
+		for(int i = 0; i < quant; i++)
+		{
+		    TeSTInstance sti;
+		    querier.fetchInstance(sti);
+			TeMultiGeometry mg = sti.geometries();
+			TePolygonSet ps = mg.getPolygons();
+
+		    TePolygonSet box_ps, intersect;
+		    TePolygon pol = polygonFromBox((*cell_it).box());
+		    box_ps.add(pol);
+
+		    TeOverlay(box_ps, ps, intersect, TeINTERSECTION);
+			unsigned int kk = 0;
+		    if(!intersect.empty()) { dist = 0; kk = ps.size(); }
+		   
+			for (; kk < ps.size(); kk++)
+			{
+				TePolygon p = ps[kk];
+				for (unsigned int j = 0; j < p.size(); j++)
+				{
+					TeLinearRing l = p[j];
+					for (unsigned int k = 0; k < l.size(); k++)
+					{
+						double d = 	TeDistance (p1, l[k]);
+						if (dist > d) dist = d;
+					}
+				}
+			}
+		}
+	}
+
+	Neighbors[line][column].done     = true; 
+	Neighbors[line][column].distance = dist; 
+
+	TeBox searchbox(p1.x() - dist - 1.001*r, p1.y() - dist - 1.001*r,
+                    p1.x() + dist + 1.001*r, p1.y() + dist + 1.001*r);
+
+	procDist pd;
+	pd.box = searchbox;
+	if(line > 0)                         { pd.line = line-1; pd.column = column;   procList.push_back(pd); }
+	if(column > 0)                       { pd.line = line;   pd.column = column-1; procList.push_back(pd); }
+    if(line < Neighbors.size() - 1)      { pd.line = line+1; pd.column = column;   procList.push_back(pd); }
+	if(column < Neighbors[0].size() - 1) { pd.line = line;   pd.column = column+1; procList.push_back(pd); }
+	
+	return true;
+}
+
+bool TeFillCellDistanceOperation(TeTheme* theme,
+								 TeGeomRep rep,
+								 TeLayer* cell_layer,
+								 const string& cell_tablename,
+								 const string& output_columnName,
+								 TeTimeInterval t)
+{
+	TeFillCellStepLoadingData();
+
+	TeCellSet cells;
+	if (!TeFillCellInitLoad (cell_layer, cell_tablename, cells)) return false;
+
+	list<procDist> procList;
+	vector<vector<cellDist> > Neighbors = BuildNeighbors(cells);
+
+	TeFillCellStepStartProcessing(cells.size()*2);
+
+	TePropertyVector result;
+	TeCellSet::iterator cell_it = cells.begin();
+
+	double res = cells.resX();
+	if( res < cells.resY () ) res = cells.resY();
+	
+	procDist pd;
+
+	pd.line   = (*cell_it).line();
+	pd.column = (*cell_it).column();
+	pd.box    = theme->getThemeBox();
+
+	procList.push_back(pd);
+	int count = 0; // counting the progress
+
+	while(!procList.empty())
+	{
+		pd = procList.front();
+		procList.pop_front();
+		if(CalculateDistance(pd.line, pd.column, pd.box, theme, res, rep, Neighbors, procList))
+			if(!TeFillCellStepNextStep(++count)) return false;
+	}
+
+	TeTable table(cell_tablename);
+	cell_layer->database()->loadTableInfo(table);
+
+	TeSTElementSet cellObjSet (cell_layer);
+	//include the attribute description
+	TeAttribute attr;
+	attr.rep_.type_ = TeREAL;
+	attr.rep_.name_ = output_columnName;
+	cellObjSet.addProperty(attr);
+
+	while (cell_it != cells.end())
+	{
+	    string value_ = Te2String(Neighbors[(*cell_it).line()][(*cell_it).column()].distance);
+		vector<string> attrValues;
+		attrValues.push_back(value_);
+	    
+		TeFillCellInitSTO ((*cell_it), attrValues, cellObjSet, table.tableType(), t);
+		cell_it++;
+
+		if(!TeFillCellStepNextStep(++count)) return false;
+	}
+	
+	TeFillCellStepWriting();
+
+	if (!TeUpdateDBFromSet(&cellObjSet, cell_tablename))
+			return  false;
+
+	return true;
+}
+
+#include <sstream>
+
+bool TeFillCellSpatialOperation(TeDatabase* db,
+								TeComputeSpatialStrategy* operation,
+								const string& cell_layername,
+								const string& cell_tablename,
+								const string& output_columnName,
+								TeTimeInterval t)
 {
-	if (!operation) return false;
 	if (!db) return false;
 
-// Load input layers
-	TeLayer* input_layer = new TeLayer (input_layername);
+	TeFillCellStepLoadingData();
+
+	// Load input layer
+	TeLayer* cell_layer = new TeLayer (cell_layername);
+	if (!db->loadLayer (cell_layer))
+	{
+		 db->close();
+		 return false;
+	}
+
+	TeTable table(cell_tablename);
+	db->loadTableInfo(table);
+
+	TeCellSet cells;
+	if (!TeFillCellInitLoad (cell_layer, cell_tablename, cells)) return false;
+
+	TeSTElementSet cellObjSet (cell_layer);
+	//adds the new attribute description 
+	TeAttribute attr;
+	attr.rep_.name_ = output_columnName;
+	attr.rep_.type_ = operation->Type();
+	cellObjSet.addProperty(attr);
+
+	TeFillCellStepStartProcessing(cells.size());
+	TeCellSet::iterator cell_it = cells.begin();
+
+	int count = 0;
+	while (cell_it != cells.end())
+	{
+	    string value_ = operation->compute ((*cell_it).box());
+	    vector<string> attrValues;
+		attrValues.push_back (value_);
+	   
+		TeFillCellInitSTO ((*cell_it), attrValues, cellObjSet, table.tableType(), t);
+		cell_it++;
+
+		if(!TeFillCellStepNextStep(++count)) return false;
+	} 
+
+	TeFillCellStepWriting();
+	bool result = TeUpdateDBFromSet(&cellObjSet, cell_tablename);
+	cell_layer->loadLayerTables();
+
+	return result;
+}
+
+
+bool TeFillCellCategoryCountPercentageRasterOperation(TeDatabase* db,
+													  string raster_layername,
+													  string cell_layername,
+													  const string& cell_tablename,
+													  const string attrName,
+													  TeTimeInterval t)
+{
+	TeFillCellStepLoadingData();
+
+	map<string, string> classesMap;
+	vector< string > atts;
+	string value;
+
+	TeLayer* input_layer = new TeLayer (raster_layername);
 	if (!db->loadLayer (input_layer))
 	{
-		 cout << "\tLayer de entrada inexistente: " << input_layername << endl; 
 		 db->close();
 		 return false;
 	}
 
-// Load output cells layer with geometry previously created
+	atts.push_back(attrName);
+
+	vector<double> values;
+	bool found;
+	unsigned int i;
+	TeRaster* raster = input_layer->raster();
+	TeRaster::iterator rasterItBegin = raster->begin();
+	TeRaster::iterator rasterItEnd   = raster->end();
+
+	TeTable table(cell_tablename);
+	db->loadTableInfo(table);
+
 	TeLayer* cell_layer = new TeLayer (cell_layername);
 	if (!db->loadLayer (cell_layer))
 	{
-		 cout << "\tLayer de entrada inexistente: " << cell_layername << endl; 
 		 db->close();
 		 return false;
 	}
 
-// Initialize cell set
+	// Initialize cell set
 	TeCellSet cells;
 	if (!TeFillCellInitLoad (cell_layer, cell_tablename, cells)) return false;
 
-
-// Initialize object set to store cell properties
+	// Initialize object set to store cell properties
 	TeSTElementSet cellObjSet (cell_layer);
 
-// Initialize theme
+	// looking for the unique values in all the raster
+	TeFillCellStepStartProcessing(raster->params().nlines_ * raster->params().ncols_ + cells.size());
 
-	TeTheme* theme = new TeTheme ("", input_layer);
-	vector<string> attrTableNames;
-	attrTableNames.push_back (input_tablename);
-	TeAttrTableVector atts;
-	if (!input_layer->getAttrTablesByName(attrTableNames, atts)) return false;
-	theme->setAttTables (atts);
+	int count = 0;
+	while(rasterItBegin != rasterItEnd)
+	{
+		found = false;
+		for(i = 0; i < values.size(); ++i)
+			if(values[i] == (*rasterItBegin)[0])
+				found = true;
+		if(!found) 
+			values.push_back((*rasterItBegin)[0]);
+		++rasterItBegin;
+
+		if(!TeFillCellStepNextStep(++count)) return false;
+	}
 
-// Process
+	// Process
 	TePropertyVector result;
+	map<double, int> counter;
+
+	// set the propertyvector of the cell object set
+	for(i = 0; i < values.size(); i++)
+	{
+		stringstream str;
+
+		str << values[i];
+        string value_ =  str.str();
+        for (unsigned j = 0; j < value_.size(); j++)
+            if(value_[j] == '.' || value_[j] == '+')
+                value_[j] = '_';
+
+        TeProperty prop;
+        prop.attr_.rep_.name_ = attrName + value_;
+        prop.attr_.rep_.type_ = TeREAL;
+        prop.attr_.rep_.numChar_ = 48;
+
+        cellObjSet.addProperty(prop.attr_);
+	}
+
 	TeCellSet::iterator cell_it = cells.begin();
+	vector<string> vprop;
+
 	while (cell_it != cells.end())
 	{
-		// Set restrictions on a theme and create stoset
-		theme->setSpatialRest((*cell_it).box(), rep);	
-		result = operation->compute (theme, input_attrname, (*cell_it).box(), output_columnName);
-		TeFillCellInitSTO ((*cell_it), t, result, cellObjSet);
+		double total = 0.0;
+		TePolygon p = polygonFromBox((*cell_it).box());
+		TeRaster::iteratorPoly rasterItBegin(raster);
+		rasterItBegin = raster->begin(p, TeBBoxPixelInters, 0);
+		TeRaster::iteratorPoly rasterItEnd(raster);
+		rasterItEnd = raster->end(p, TeBBoxPixelInters, 0);
+
+		for(i = 0; i < values.size(); i++)
+			counter[values[i]] = 0;
+
+		while(rasterItBegin != rasterItEnd)
+		{
+			double pixel = (*rasterItBegin);
+			counter[pixel]++;
+			++rasterItBegin;
+			total++;
+		}		
+
+		//add the attribute values in the object set
+		vprop.clear();
+		for(i = 0; i < values.size(); i++)
+		{
+			stringstream str;
+			str << counter[values[i]] / total;
+			vprop.push_back(str.str());
+		}
+
+		TeFillCellInitSTO ((*cell_it), vprop, cellObjSet, table.tableType(), t);
 		cell_it++;
 
+		if(!TeFillCellStepNextStep(++count)) return false;
 	} 
 
-// Update DB
-	if (!TeUpdateDBFromSet(&cellObjSet, cell_tablename))
-			return  false;
-	return true;
+	TeFillCellStepWriting();
+	// Update DB
+	if (!TeUpdateDBFromSet (&cellObjSet, cell_tablename))
+		return  false;
+	return  true;
+}
+
+
+bool TeFillCellCategoryAreaPercentageOperation(TeTheme* theme,
+											   const string attrName,
+								 			   TeLayer* cell_layer,
+											   const string& cell_tablename,
+											   TeTimeInterval t)
+{
+	map<string, string> classesMap;
+	vector< string > atts;
+	string value;
+	TeQuerier* querier;
+	TeSTInstance sti;
+
+	atts.push_back(attrName);
+
+ 	TeQuerierParams params (false, atts);
+	params.setParams (theme);
+
+	querier = new TeQuerier(params);
+
+	querier->loadInstances();
+
+	while( querier->fetchInstance(sti) )
+	{
+		value = sti.getPropertyVector()[0].value_;
+		classesMap[value] = value;
+
+	}
+	delete querier;
+
+	return TeFillCellCategoryAreaPercentageOperation(theme, attrName, cell_layer, cell_tablename, classesMap, t);
 }
 
 
+bool TeFillCellCategoryAreaPercentageOperation(TeTheme* theme,
+											   const string attrName,
+								 			   TeLayer* cell_layer,
+											   const string& cell_tablename,
+											   map<string, string>& classesMap,
+											   TeTimeInterval t)
+{
+	TeFillCellStepLoadingData();
+
+	TeCellSet cells;
+	if (!TeFillCellInitLoad (cell_layer, cell_tablename, cells)) return false;
+
+	TeSTElementSet cellObjSet (cell_layer);
+
+	TeTable table(cell_tablename);
+	cell_layer->database()->loadTableInfo(table);
+
+	TeCellSet::iterator cell_it = cells.begin();
+
+	TeFillCellStepStartProcessing(cells.size());
+	int count = 0;
+	while (cell_it != cells.end())
+	{
+	    TeProperty  prop;
+
+		// COMPUTE
+    // convert input box to a polygonset
+	    TePolygonSet box_ps;
+	    TePolygon pol = polygonFromBox((*cell_it).box());
+	    box_ps.add(pol);
+	    map<string, double>  areaMap;
+	    double partial_area = 0.0;
+
+	    // Build stoset
+	    TeSTElementSet stos (theme);
+	    vector<string> attrNames;
+	    attrNames.push_back (attrName); 
+	    if (TeSTOSetBuildDB (&stos, true, false, attrNames))
+        {   
+        
+            // initialize areMap
+            map<string, string>::iterator itMap = classesMap.begin();
+            while (itMap != classesMap.end())
+            {
+                areaMap[(*itMap).second] = 0;
+                ++itMap;
+            }
+            partial_area = 0.0;
+            // iterate over all objects that intercept the box
+            TeSTElementSet::iterator it = stos.begin();
+            while (it != stos.end())
+            {
+                string category;
+                if ((*it).getPropertyValue (attrName, category))
+                {   
+                    TePolygonSet objGeom;  
+                    if ((*it).getGeometry(objGeom))
+                    {
+                        TePolygonSet intersect;
+                        TeOverlay(box_ps, objGeom, intersect, TeINTERSECTION);
+                        double intersectArea = TeGeometryArea (intersect);
+                        partial_area += intersectArea;
+                        areaMap[classesMap[category]] +=  intersectArea; // suppose objects are disjoint
+                    }
+                }
+                ++it;
+            }
+        }
+
+	    double areaTot = TeGeometryArea (box_ps);
+	    double perc_total = 0.0;
+	    double corrected_perc_total = 0.0;
+	    vector<double> vec_percent;
+
+		map <string, double>:: iterator areaIt = areaMap.begin();
+	    while(areaIt != areaMap.end())  
+	    {
+	        double percent = 0.0;
+	        if (areaTot != 0) percent = (*areaIt).second/areaTot;
+	        perc_total += percent;
+	        vec_percent.push_back (percent);
+			
+			//attribute list
+			TeAttribute at;
+			at.rep_.name_ = attrName + (*areaIt).first;
+			at.rep_.type_ = TeREAL;
+			cellObjSet.addProperty(at);
+	        ++areaIt;
+	    }
+
+		//fill the object set
+		int i= 0;
+	    areaIt = areaMap.begin();
+	    while(areaIt != areaMap.end())  
+	    {
+	        vector<string> values;
+			double percent = vec_percent[i];
+	        corrected_perc_total += percent;
+	        values.push_back(Te2String (percent));
+	        ++areaIt;
+	        i++;
+			TeFillCellInitSTO ((*cell_it), values, cellObjSet, table.tableType(), t);
+	    }
+
+		cell_it++;
+		if(!TeFillCellStepNextStep(++count)) return false;
+	} 
+
+	TeFillCellStepWriting();
+	bool result = TeUpdateDBFromSet(&cellObjSet, cell_tablename);
+	cell_layer->loadLayerTables();
+
+	return result;
+}
+
+bool TeFillCellNonSpatialOperation (TeTheme* theme,
+									TeGeomRep rep,
+									const string& input_attrname,
+									TeComputeAttrStrategy<TeSTElementSet::propertyIterator>* operation,
+									TeLayer* cell_layer,
+									const string& cell_tablename, 
+									const string& output_columnName,
+									TeTimeInterval t)
+{
+	TeFillCellStepLoadingData();
+
+	if (!theme)      return false;
+	if (!cell_layer) return false;
+	if (!operation)  return false;
+
+	string s = theme->name();
+	// Initialize cell set
+	TeCellSet cells;
+	if (!TeFillCellInitLoad (cell_layer, cell_tablename, cells)) return false;
+
+	TeTable table(cell_tablename);
+	cell_layer->database()->loadTableInfo(table);
+
+	// Initialize object set to store cell properties
+	TeSTElementSet cellObjSet (cell_layer);
+
+	// Process
+	TePropertyVector result;
+	TeCellSet::iterator cell_it = cells.begin();
+	bool firstIteration = true;
+	vector<string> attrNames;
+	attrNames.push_back (input_attrname);	
+	
+	TeSTElementSet stos (theme);
+	if (!TeSTOSetBuildDB (&stos, true, false, attrNames))
+		return false;
+    
+	TeFillCellStepStartProcessing(cells.size());
+	int count = 0;	
+	while (cell_it != cells.end())
+	{
+		vector<TeSTInstance*> boxResult;
+		stos.search((*cell_it).box(), boxResult);
+
+		TeSTElementSet elemSetTemp(theme, stos.getAttributeList());
+		for(unsigned int i=0; i<boxResult.size(); ++i)
+		{
+            bool intersects = true;
+			if(rep==TePOLYGONS) 
+			{
+				intersects = false;
+				TePolygonSet	pSet;
+				boxResult[i]->getGeometry(pSet);
+				for(unsigned int j=0; j<pSet.size(); ++j)
+				{
+					if(TeIntersects(pSet[j],TeMakePolygon((*cell_it).box())))
+					{
+						intersects = true;
+						j = pSet.size();
+					}
+				}
+			}
+			else if(rep==TeLINES) 
+			{
+				intersects = false;
+				TeLineSet		lSet;
+				boxResult[i]->getGeometry(lSet);
+				for(unsigned int j=0; j<lSet.size(); ++j)
+				{
+					if(TeIntersects(lSet[j],TeMakePolygon((*cell_it).box())))
+					{
+						intersects = true;
+						j = lSet.size();
+					}
+				}
+			}
+						
+			if(intersects)
+				elemSetTemp.insertSTInstance(*(boxResult[i]));
+		}
+		
+		result = operation->compute (elemSetTemp.begin(0), elemSetTemp.end(0), output_columnName);
+		
+		// if property not found, stos iterator will return zero to operation. 
+		// To check this, have to be less general and use getProperty inside the compute method.		
+		if(firstIteration)
+		{
+			//add the attribute definitions in the object set, only once
+			TePropertyVector::iterator it = result.begin();
+			while(it!=result.end())
+			{
+                cellObjSet.addProperty(it->attr_);
+				++it;
+			}
+		}
+
+		//add the attribute values in the object set
+		TePropertyVector::iterator it = result.begin();
+		vector<string> values;
+		while(it!=result.end())
+		{
+			values.push_back(it->value_);
+			++it;
+		}
+
+		TeFillCellInitSTO ((*cell_it), values, cellObjSet, table.tableType(), t);
+		cell_it++;
+		firstIteration = false;
+
+		if(!TeFillCellStepNextStep(++count)) return false;
+	} 
+
+	TeFillCellStepWriting();
+	// Update DB
+	if (!TeUpdateDBFromSet (&cellObjSet, cell_tablename))
+		return  false;
+	return  true;
+}
 
 bool TeFillCellNonSpatialOperation (TeDatabase* db,
 										const string& input_layername, 
 										TeGeomRep rep,
 										const string& input_tablename, 
 										const string& input_attrname,
-										TeTimeInterval t,
+										TeComputeAttrStrategy<TeSTElementSet::propertyIterator>* operation,
 										const string& cell_layername, 
 										const string& cell_tablename, 
 										const string& output_columnName,
-										TeComputeAttrStrategy<TeSTElementSet::propertyIterator>* operation)
+										TeTimeInterval t)
 {
 	if (!db) return false;
 
-// Load input layers
+	// Load input layers
 	TeLayer* input_layer = new TeLayer (input_layername);
 	if (!db->loadLayer (input_layer))
 	{
-		 cout << "\tLayer de entrada inexistente: " << input_layername << endl; 
 		 db->close();
 		 return false;
 	}
 
-// Load output cells layer with geometry previously created
+	// Load output cells layer with geometry previously created
 	TeLayer* cell_layer = new TeLayer (cell_layername);
 	if (!db->loadLayer (cell_layer))
 	{
-		 cout << "\tLayer de entrada inexistente: " << cell_layername << endl; 
 		 db->close();
 		 return false;
 	}
 
-// Initialize cell set
-	TeCellSet cells;
-	if (!TeFillCellInitLoad (cell_layer, cell_tablename, cells)) return false;
-
-// Initialize object set to store cell properties
-	TeSTElementSet cellObjSet (cell_layer);
-
-// Initialize theme
+	// Initialize theme
 	TeTheme* theme = new TeTheme ("", input_layer);
 	vector<string> attrTableNames;
 	attrTableNames.push_back (input_tablename);
@@ -784,142 +1560,129 @@ bool TeFillCellNonSpatialOperation (TeDatabase* db,
 	if (!input_layer->getAttrTablesByName(attrTableNames, atts)) return false;
 	theme->setAttTables (atts);
 
-// Process
-	TePropertyVector result;
-	TeCellSet::iterator cell_it = cells.begin();
-	while (cell_it != cells.end())
-	{
-		// Set restrictions on a theme and create stoset
-		theme->setSpatialRest((*cell_it).box(), rep);	
-		TeSTElementSet stos (theme);
-		vector<string> attrNames;
-		attrNames.push_back (input_attrname);	
-		if (TeSTOSetBuildDB (&stos, false, false, attrNames))
-				result = operation->compute (stos.begin(input_attrname), stos.end(input_attrname), output_columnName); 	// if property not found, stos iterator will return zero to operation. To check this, have to be less general and use getProperty inside the compute method.		
+	bool ret = TeFillCellNonSpatialOperation (theme,
+											  rep,
+											  input_attrname,
+											  operation,
+											  cell_layer,
+											  cell_tablename, 
+											  output_columnName,
+											  t);
 
-		TeFillCellInitSTO ((*cell_it), t, result, cellObjSet);	
-		cell_it++;
-
-	} 
-
-// Update DB
-	if (!TeUpdateDBFromSet (&cellObjSet, cell_tablename))
-			return  false;
-	return  true;
+	return ret;
 }
 
 
-
-
-
 bool TeFillCellNonSpatialRasterOperation (TeDatabase* db,
-										const string& input_raster_layername, 
-										TeTimeInterval t,
-										const string& cell_layername, 
-										const string& cell_tablename, 
-										const string& output_columnName,
-										TeComputeAttrStrategy<TeRaster::iteratorPoly>* operation)
+										  const string& input_raster_layername, 
+										  TeComputeAttrStrategy<TeBoxRasterIterator>* operation,
+										  const string& cell_layername, 
+										  const string& cell_tablename, 
+										  const string& output_columnName,
+										  TeTimeInterval t)
 {
+	TeFillCellStepLoadingData();
+
 	if (!db) return false;
 
-// Load input layers
+	// Load input layers
 	TeLayer* input_layer = new TeLayer (input_raster_layername);
 	if (!db->loadLayer (input_layer))
 	{
-		 cout << "\tLayer de entrada inexistente: " << input_raster_layername << endl; 
 		 db->close();
 		 return false;
 	}
 
+	TeTable table(cell_tablename);
+	db->loadTableInfo(table);
+
 	TeRaster* raster = input_layer->raster();
 	if (!raster) return false;
 
-
-// Load output cells layer with geometry previously created
+	// Load output cells layer with geometry previously created
 	TeLayer* cell_layer = new TeLayer (cell_layername);
 	if (!db->loadLayer (cell_layer))
 	{
-		 cout << "\tLayer de entrada inexistente: " << cell_layername << endl; 
 		 db->close();
 		 return false;
 	}
 
-
-// Initialize cell set
+	// Initialize cell set
 	TeCellSet cells;
 	if (!TeFillCellInitLoad (cell_layer, cell_tablename, cells)) return false;
 
-
-// Initialize object set to store cell properties
+	// Initialize object set to store cell properties
 	TeSTElementSet cellObjSet (cell_layer);
+	//include the attribute description
+	TeAttribute attr;
+	attr.rep_.type_ = TeREAL;
+	attr.rep_.name_ = output_columnName;
+	cellObjSet.addProperty(attr);
 
+	TeFillCellStepStartProcessing(cells.size());
 
-// Process
+	// Process
 	TePropertyVector result;
 	TeCellSet::iterator cell_it = cells.begin();
+
+	int count = 0;
 	while (cell_it != cells.end())
 	{
-		TePolygon p = TeBox2Polygon((*cell_it).box());
-		TeRaster::iteratorPoly rasterItBegin(raster);
-		rasterItBegin = raster->begin(p, TeBBoxPixelInters, 0);
-		TeRaster::iteratorPoly rasterItEnd(raster);
-		rasterItEnd = raster->end(p, TeBBoxPixelInters, 0);
-
+		TeBoxRasterIterator rasterItBegin(raster, (*cell_it).box());
+		rasterItBegin.begin();
+		TeBoxRasterIterator rasterItEnd(raster, (*cell_it).box());
+		rasterItEnd.end();
 		result = operation->compute (rasterItBegin, rasterItEnd, output_columnName);										
-		TeFillCellInitSTO ((*cell_it), t, result, cellObjSet);	
+		TeFillCellInitSTO ((*cell_it), result, cellObjSet, table.tableType(), t);
 		cell_it++;
+
+		if(!TeFillCellStepNextStep(++count)) return false;
 	} 
 
-// Update DB
+	TeFillCellStepWriting();
+	// Update DB
 	if (!TeUpdateDBFromSet (&cellObjSet, cell_tablename))
-			return  false;
+		return  false;
 	return  true;
 }
 
 
-
-bool TeFillCellAggregateOperation (  TeDatabase* db,
-										const string& input_layername, 
-										const string& input_tablename, 
-										TeTimeInterval t,
-										const string& cell_layername, 
-										const string& cell_tablename, 
-										vector<string>& attrNames,
-										TeComputeAttrStrategy<TeSTElementSet::propertyIterator>* operation)
+bool TeFillCellAggregateOperation ( TeDatabase* db,
+									const string& input_layername, 
+									const string& input_tablename, 
+									TeComputeAttrStrategy<TeSTElementSet::propertyIterator>* operation,
+									vector<string>& attrNames,
+									const string& cell_layername, 
+									const string& cell_tablename, 
+									TeTimeInterval t)
 {
 	if (!db) return false;
 
-
-// Load input layers
+	// Load input layers
 	TeLayer* input_layer = new TeLayer (input_layername);
 	if (!db->loadLayer (input_layer))
 	{
-		 cout << "\tLayer de entrada inexistente: " << input_layername << endl; 
 		 db->close();
 		 return false;
 	}
 
-
-// Load output cells layer with geometry previously created
+	// Load output cells layer with geometry previously created
 	TeLayer* cell_layer = new TeLayer (cell_layername);
 
 	if (!db->loadLayer (cell_layer))
 	{
-		 cout << "\tLayer de entrada inexistente: " << cell_layername << endl; 
 		 db->close();
 		 return false;
 	}
 
-// Initialize cell set
+	// Initialize cell set
 	TeCellSet cells;
 	if (!TeFillCellInitLoad (cell_layer, cell_tablename, cells)) return false;
 
-
-// Initialize object set to store cell properties
+	// Initialize object set to store cell properties
 	TeSTElementSet cellObjSet (cell_layer);
 
-// Initialize theme
-
+	// Initialize theme
 	TeTheme* theme = new TeTheme ("", input_layer);
 	vector<string> attrTableNames;
 	attrTableNames.push_back (input_tablename);
@@ -928,7 +1691,7 @@ bool TeFillCellAggregateOperation (  TeDatabase* db,
 	theme->setAttTables (atts);
 
 
-// Process
+	// Process
 	TeCellSet::iterator cell_it = cells.begin();
 	while (cell_it != cells.end())
 	{
@@ -942,7 +1705,7 @@ bool TeFillCellAggregateOperation (  TeDatabase* db,
 		cellObj.timeInterval (t);
 		
 		// Set restrictions on a theme and create stoset
-		theme->setSpatialRest((*cell_it).box(), TeCELLS); //????? TeWITHIN ok? ANAP	
+		theme->setSpatialRest((*cell_it).box(), TeCELLS); //????? TeWITHIN 	
 		TeSTElementSet stos (theme);
 		TeSTOSetBuildDB (&stos, true, false, attrNames);
 			
@@ -951,7 +1714,9 @@ bool TeFillCellAggregateOperation (  TeDatabase* db,
 		vector<string>::iterator attIt = attrNames.begin();
 		while (attIt != attrNames.end())
 		{
-			result = operation->compute (stos.begin(*attIt), stos.end(*attIt), (*attIt)); 	// if property not found, stos iterator will return zero to operation. To check this, have to be less general and use getProperty inside the compute method.		
+			result = operation->compute (stos.begin(*attIt), stos.end(*attIt), (*attIt));
+            // if property not found, stos iterator will return zero to operation. 
+            // To check this, have to be less general and use getProperty inside the compute method.		
 			TePropertyVector::iterator itProp = result.begin();
 			while (itProp != result.end())
 			{
@@ -965,35 +1730,30 @@ bool TeFillCellAggregateOperation (  TeDatabase* db,
 		cell_it++;
 	}
 
-// Update DB
-	if (!TeUpdateDBFromSet (&cellObjSet, cell_tablename))
-			return  false;
+	// Update DB
+	if (!TeUpdateDBFromSet (&cellObjSet, cell_tablename)) return  false;
 
 	return  true;
 }
 
 
-
-
-
-
 bool TeFillCellConnectionOperation (	TeDatabase* db,
 										TeSTElementSet objects,
 										TeGeomRep rep,
 										TeGraphNetwork* net,
-										const string& input_attrName,
+										const string& /*input_attrName*/,
 
 										TeTimeInterval t,
 										const string& cell_layername, 
 										const string& cell_tablename, 
-										const string& output_columnName,
+										const string& /*output_columnName*/,
 										
 								
 										TeComputeAttrStrategy<TeSTElementSet::propertyIterator>* operation,
-										double local_distance_factor,
-										double net_distance_factor,
-										double net_conn_factor,
-										double mult_factor)
+										double /*local_distance_factor*/,
+										double /*net_distance_factor*/,
+										double /*net_conn_factor*/,
+										double /*mult_factor*/)
 {
 
 	if (!operation) return false;
@@ -1006,21 +1766,21 @@ bool TeFillCellConnectionOperation (	TeDatabase* db,
 
 	if (!db->loadLayer (cell_layer))
 	{
-		 cout << "\tLayer de entrada inexistente: " << cell_layername << endl; 
 		 db->close();
 		 return false;
 	}
 
-// Initialize cell set
+	TeTable table(cell_tablename);
+	db->loadTableInfo(table);
+
+	// Initialize cell set
 	TeCellSet cells;
 	if (!TeFillCellInitLoad (cell_layer, cell_tablename, cells)) return false;
 
-
-// Initialize object set to store cell properties
+	// Initialize object set to store cell properties
 	TeSTElementSet cellObjSet (cell_layer);
 
-
-// Process
+	// Process
 	TePropertyVector result;
 	TeCellSet::iterator cell_it = cells.begin();
 	while (cell_it != cells.end())
@@ -1039,9 +1799,11 @@ bool TeFillCellConnectionOperation (	TeDatabase* db,
 
 	TeProxMatrixOpenNetworkStrategy2    sc_net (&cellObjSet, TeCELLS, &objects, rep, 0, TeMAXFLOAT, TeMAXFLOAT, net);
  //	TeProxMatrixConnectionStrenghtStrategy sw(4, 0.0, false);
+
+/* TODO: recolocar!!!
 	TeProxMatrixInverseDistanceStrategy sw (local_distance_factor, net_distance_factor, net_conn_factor, mult_factor, false);
 	TeProxMatrixNoSlicingStrategy ss_no;
-	TeGeneralizedProxMatrix mat  (&sc_net, &sw, &ss_no);
+	TeGeneralizedProxMatrix<TeSTElementSet> mat (&sc_net, &sw, &ss_no);
 
 	// initialize object set to store cell properties
 	TeSTElementSet cellObjSet2 (cell_layer);
@@ -1051,7 +1813,7 @@ bool TeFillCellConnectionOperation (	TeDatabase* db,
 		TeSTElementSet neigh = mat.getSTENeighbours((*cell_it2).objectId());	
 
 		result = operation->compute (neigh.begin(input_attrName), neigh.end(input_attrName), output_columnName); 	// if property not found, stos iterator will return zero to operation. To check this, have to be less general and use getProperty inside the compute method.		
-		TeFillCellInitSTO ((*cell_it2), t, result, cellObjSet2);	
+		TeFillCellInitSTO ((*cell_it), propvec, cellObjSet2, table.tableType(), t);
 		cell_it2++;
 	} 
 
@@ -1059,7 +1821,7 @@ bool TeFillCellConnectionOperation (	TeDatabase* db,
 // Update DB
 	if (!TeUpdateDBFromSet (&cellObjSet2, cell_tablename))
 			return  false;
-
+*/
 	return  true;
 }
 
diff --git a/src/terralib/functions/TeCellAlgorithms.h b/src/terralib/functions/TeCellAlgorithms.h
old mode 100644
new mode 100755
index 055c792..652fa5b
--- a/src/terralib/functions/TeCellAlgorithms.h
+++ b/src/terralib/functions/TeCellAlgorithms.h
@@ -29,240 +29,346 @@ of this library and its documentation.
 
 #include "TeSTElementSet.h"
 #include "TeComputeAttributeStrategies.h"
+#include <TeRaster.h>
 
 class TeDatabase; 
+class TeDatabasePortal;
 class TeLayer;
 class TeGraphNetwork;
-
+class TeTable;
 
 using namespace std;
 
-
-/** @defgroup CellAlg Functions to generate and operate on cell geometry 
- *  @{
+//! This class represents a raster iterator using a box as spatial restriction
+class TeBoxRasterIterator
+{
+	public:
+		//! Constructor
+		TeBoxRasterIterator(TeRaster* raster_, TeBox box); 
+
+	    //! Prefix move forward operator
+	    TeBoxRasterIterator& operator++();
+
+	    //! Prefix move forward operator
+	    TeBoxRasterIterator operator++(int);
+
+	    //! Dereferencing operator
+	    double operator*();
+
+		//! Equal operator
+        bool operator==(const TeBoxRasterIterator& rhs) const;
+
+		//! Differ operator
+        bool operator!=(const TeBoxRasterIterator& rhs) const; 
+
+		//! getProperty
+		bool getProperty(TeProperty& prop);
+        
+		//! Returns an iterator that points to the first position of the raster inside the box
+		TeBoxRasterIterator begin(); 
+		
+		//! Returns an iterator that points to the last position of the raster inside the box
+		TeBoxRasterIterator end();
+
+	private:
+		int xo, yo, xf, yf, x, y;
+		bool end_;
+		TeRaster* raster;
+};
+
+/** @defgroup CellSpaces Cell Spaces 
+  @{
  */
 
-/*!
-	\brief Creates a new layer with the cells that covers the polygons of a theme  
-	\param layerName name of the new layer with cell representations
-	\param theme pointer to the theme that has the polygons
-	\param resX X resolution of each cell
-	\param resY Y resolution of each cell
-	\param box bounding box of interest
+/** @defgroup CreateCells Cells generation
+    @ingroup CellSpaces
+  @{
+ */
+//! Creates a new layer with the cells that covers the polygons of a theme  
+/*	\param layerName	name of the new layer with cell representations
+	\param theme		pointer to the theme that has the polygons
+	\param resX			X resolution of each cell
+	\param resY			Y resolution of each cell
+	\param box			bounding box of interest
 	\return a pointer to the new layer created if success or null if fail
 */
 TeLayer* TeCreateCells(const string& layerName,TeTheme* theme, double resX, double resY, TeBox& box);
 
-/*!
-	\brief Creates a new layer with the cells that covers the entire bounding box, or the polygons  of a layer 
-	\param layerName name of the new layer with cell representations
-	\param layerBase pointer to the base layer
-	\param resX X resolution of each cell
-	\param resY Y resolution of each cell
-	\param mask flag that indicates if the cells should be created only over the polygons of the layer
-	\param box bounding box of interest
+//! Creates a new layer with the cells that covers the entire bounding box, or the polygons  of a layer 
+/*	\param layerName	name of the new layer with cell representations
+	\param layerBase	pointer to the base layer
+	\param resX			X resolution of each cell
+	\param resY			Y resolution of each cell
+	\param mask			flag that indicates if the cells should be created only over the polygons of the layer
+	\param box			bounding box of interest
 	\return a pointer to the new layer created if success or null if fail
 */
 TeLayer* TeCreateCells( const string& layerName, TeLayer* layerBase, 
 			   double resX, double resY, TeBox& box, bool mask = true);
 
+/** @} */ 
 
-/*!
-	\brief Calculates a set of statistics of cells of a theme 
-	\param themeOut			cell theme 
+/** @defgroup CellStatistics Cells statistics 
+    @ingroup CellSpaces
+  @{
+ */
+//! Calculates a set of statistics of cells of a theme 
+/*	\param themeOut			cell theme 
 	\param newAttrTable		new attribute table where the generated statistics will be kept 
 	\param stat				the structure that contains the statistics which will be generated 
 	\param themeIn			point or cell theme
-	\param db				a pointer to the database 
+	\param db				a pointer to the database
+	\return true if the operation was successfully done  
 */
 bool 
 TeCellStatistics(TeTheme* themeOut, TeTable& newAttrTable, TeGroupingAttr& stat, 
 				 TeTheme* themeIn, TeDatabase* db);
 
-
-/*!
-	\brief Saves the statistics accessible through a TeDatabasePortal in a database table 
-	\param tableAttrCell	attribute table name where the generated statistics will be kept 
+//! Saves the statistics accessible through a TeDatabasePortal in a database table 
+/*	\param tableAttrCell	attribute table name where the generated statistics will be kept 
 	\param portal			a pointer to the database portal that contains the generated statistics  
+	\return true if the operation was successfully done  
 */
 bool TeKeepStatistics(TeTable& tableAttrCell, TeDatabasePortal* portal);
 
+/** @} */ 
 
-/** @} */ // End of group CellAlg format
-
-
-//////////////////////////////////////////////////////////////////////
-//
-//					Fill Cell Function (headers)
-//
-/////////////////////////////////////////////////////////////////////
-/** @defgroup FillCellAlg Functions to fill one attribute (or group of related attributes) for all cells in the output layer based on a single input layer attribute for a given time interval. Specific operation to be applied is a parameter (Strategy pattern).
- *  @{
+/** @defgroup FillCellAlg Cells attributes generation
+    @ingroup CellSpaces
+	Fill one attribute (or group of related attributes) for all cells in the output layer 
+	based on a single input layer attribute for a given time interval. Specific operation to be applied is a parameter (Strategy pattern).
+  @{
  */
 
-/*!
-	\brief Computes the cell attribute based on a spatial operation (TeComputeAttrSpatialStrategy) over a vector input layer.
-	\param db						a pointer to the database in which input and output layers are stored
-	\param input_layername			name of input layer 
-	\param rep						input layer representation to be used
-	\param input_tablename			input layer attribute table to be used  
-	\param input_attrname			input layer attribute to be used to compute output attribute
-	\param t						time interval of output cells attributes
-	\param cell_layername			output cell layer  
+//! Calculates an attribute based on the exact Euclidean distance. This strategy is separated from the others because it 
+//! calculates the distance using an already calculated distance of one of its neighbours.
+/*	\param input_theme				a pointer to the input theme to calculate the distances
+	\param rep						input theme representation to be used
+	\param cell_layer				a pointer to the output cell layer  
 	\param cell_tablename			output cell attribute dynamic table; if does not exist, the table will be created by the function  
+	\param output_columnname		output attribute name   
+	\param time_interval			time interval of output cells attributes
+	\return true if the operation was successfully done  
+*/
+bool TeFillCellDistanceOperation(TeTheme* input_theme,
+								 TeGeomRep rep,
+								 TeLayer* cell_layer,
+								 const string& cell_tablename,
+								 const string& output_columnname,
+								 TeTimeInterval time_interval = TeTimeInterval());
+
+//! suppose that each cell is completely filled by the used geometry, and there is no overlapping geometries. Creates one attribute 
+//! for each unique value, and this values are used in the name of the created attributes, in the form attrName concatenated 
+//! with the value
+/*	\param input_theme				a pointer to the input theme to calculate the distances
+	\param rep						input theme representation to be used
+	\param cell_layer				a pointer to the output cell layer  
+	\param cell_tablename			output cell attribute table; if does not exist, the table will be created by the function  
 	\param output_columnName		output attribute name   
-	\param operation				operation to be applied (see TeComputeAttrSpatialStrategy hierarchy)  
+	\param time_interval			time interval of output cells attributes
+	\return true if the operation was successfully done  
+*/
+
+bool TeFillCellCategoryCountPercentageRasterOperation(TeDatabase* database,
+													  string raster_layername,
+													  string cell_layername,
+													  const string& cell_tablename,
+													  const string attrName,
+													  TeTimeInterval t);
+
+
+
+bool TeFillCellCategoryAreaPercentageOperation(TeTheme* theme,
+											   const string attrName,
+								 			   TeLayer* cell_layer,
+											   const string& cell_tablename,
+											   TeTimeInterval t = TeTimeInterval());
+
+
+bool TeFillCellCategoryAreaPercentageOperation(TeTheme* input_theme,
+											   const string attr_name,
+								 			   TeLayer* cell_layer,
+											   const string& cell_tablename,
+											   map<string, string>& classesMap,
+											   TeTimeInterval time_interval = TeTimeInterval());
+
+//! Computes an attribute based on a TeComputeSpatialStrategy 
+/*	\param db						the database which contains the layer of cells
+	\patam operation				the operation used to compute the attribute
+	\param cell_layername			the name of the layer of cells
+	\param cell_tablename			output cell attribute table; if does not exist, the table will be created by the function  
+	\param output_columnname		output attribute name
+	\param time_interval			time interval of output cells attributes
+	\return true if the operation was successfully done  
 */
-bool TeFillCellSpatialOperation (	TeDatabase* db,
-											const string& input_layername, 
-											TeGeomRep rep,
-											const string& input_tablename, 
-											const string& input_attrname,
-											TeTimeInterval t,
-											const string& cell_layername, 
-											const string& cell_tablename, 
-											const string& output_columnName,
-											TeComputeAttrSpatialStrategy* operation);
-
-
-											
-/*!
-	\brief Computes the cell attribute based on a non-spatial operation (TeComputeAttrStrategy) over a vector or cell input layer.
-	\param db						a pointer to the database in which input and output layers are stored
+bool TeFillCellSpatialOperation(TeDatabase* db,
+                        		TeComputeSpatialStrategy* operation,
+								const string& cell_layername,
+                        		const string& cell_tablename,
+                        		const string& output_columnname,
+								TeTimeInterval time_interval = TeTimeInterval());
+
+//! Computes the cell attribute based on a non-spatial operation (TeComputeAttrStrategy) over a vector or cell input layer.
+/*	\param db						a pointer to the database in which input and output layers are stored
 	\param input_layername			name of input layer 
 	\param rep						input layer representation to be used
 	\param input_tablename			input layer attribute table to be used  
 	\param input_attrname			input layer attribute to be used to compute output attribute
-	\param t						time interval of output cells attributes
+	\param operation				operation to be applied (see TeComputeAttrStrategy hierarchy)  
 	\param cell_layername			output cell layer  
 	\param cell_tablename			output cell attribute dynamic table; if does not exist, the table will be created by the function  
 	\param output_columnName		output attribute name   
-	\param operation				operation to be applied (see TeComputeAttrStrategy hierarchy)  
+	\param time_interval			time interval of output cells attributes
+	\return true if the operation was successfully done  
 */
-bool TeFillCellNonSpatialOperation (TeDatabase* db,
-										const string& input_layername, 
-										TeGeomRep rep,
-										const string& input_tablename, 
-										const string& input_attrname,
-										TeTimeInterval t,
-										const string& cell_layername, 
-										const string& cell_tablename, 
-										const string& output_columnName,
-										TeComputeAttrStrategy<TeSTElementSet::propertyIterator>* operation);
-
-/*!
-	\brief Computes the cell attribute based on a non-spatial operation (TeComputeSpatialStrategy) over a raster input layer.
-	\param db						a pointer to the database in which input and output layers are stored
-	\param input_raster_layername	name of input layer that contains a raster representation 
-	\param t						time interval of output cells attributes
+bool TeFillCellNonSpatialOperation(TeDatabase* db,
+									const string& input_layername, 
+									TeGeomRep rep,
+									const string& input_tablename, 
+									const string& input_attrname,
+									TeComputeAttrStrategy<TeSTElementSet::propertyIterator>* operation,
+									const string& cell_layername, 
+									const string& cell_tablename, 
+									const string& output_columnName,
+									TeTimeInterval time_interval = TeTimeInterval());
+
+//! Computes the cell attribute based on a non-spatial operation (TeComputeAttrStrategy) over a vector or cell input layer.
+/*	\param theme					a pointer to an input theme
+	\param rep						input theme representation to be used
+	\param input_tablename			input theme attribute table to be used  
+	\param input_attrname			input theme attribute to be used to compute output attribute
+	\param operation				operation to be applied (see TeComputeAttrStrategy hierarchy)  
 	\param cell_layername			output cell layer  
 	\param cell_tablename			output cell attribute dynamic table; if does not exist, the table will be created by the function  
 	\param output_columnName		output attribute name   
-	\param operation				operation to be applied (see TeComputeAttrStrategy hierarchy)  
+	\param time_interval			time interval of output cells attributes
+	\return true if the operation was successfully done  
 */
-
-bool TeFillCellNonSpatialRasterOperation (TeDatabase* db,
-										const string& input_raster_layername, 
-										TeTimeInterval t,
-										const string& cell_layername, 
-										const string& cell_tablename, 
-										const string& output_columnName,
-										TeComputeAttrStrategy<TeRaster::iteratorPoly>* operation);
-
-
-
-
-
-/*!
-	\brief Computes the cell attribute based on a non-spatial operation (TeComputeSpatialStrategy) over a certain attribute of a set of objects connected to each cell by a network.
-	\param db						a pointer to the database in which input and output layers are stored
-	\param objects					set of objects (e.g., ports) 
-	\param rep						objects representation type
-	\param net						netork to be used to verify and quantify cell connectivity to each cell
-	\param input_attrname			connected objects attribute to be used to compute output attribute
-	\param t						time interval of output cells attributes
+bool TeFillCellNonSpatialOperation (TeTheme* theme,
+									TeGeomRep rep,
+									const string& input_attrname,
+									TeComputeAttrStrategy<TeSTElementSet::propertyIterator>* operation,
+									TeLayer* cell_layer,
+									const string& cell_tablename, 
+									const string& output_columnName,
+									TeTimeInterval time_interval = TeTimeInterval());
+
+//! Computes the cell attribute based on a non-spatial operation (TeComputeSpatialStrategy) over a raster input layer.
+/*	\param db						a pointer to the database in which input and output layers are stored
+	\param input_raster_layername	name of input layer that contains a raster representation 
+	\param operation				operation to be applied (see TeComputeAttrStrategy hierarchy)  
 	\param cell_layername			output cell layer  
 	\param cell_tablename			output cell attribute dynamic table; if does not exist, the table will be created by the function  
 	\param output_columnName		output attribute name   
-	\param operation				operation to be applied (see TeComputeAttrStrategy hierarchy)  
-	\param local_distance_factor	multiplier used to compute connection strenght weights: local distance factor (see GPM documentation) 
-	\param net_distance_factor		multiplier used to compute connection strenght weights: distance to network factor (see GPM documentation) 
-	\param net_conn_factor			multiplier used to compute connection strenght weights: connection through network factor (see GPM documentation) 
-	\param mult_factor				multiplier used to compute connection strenght weights: weight multiplier factor (see GPM documentation) 
+	\param time_interval			time interval of output cells attributes
+	\return true if the operation was successfully done  
 */
-
-
-bool TeFillCellConnectionOperation (	TeDatabase* db,
-										TeSTElementSet objects,
-										TeGeomRep rep,
-										TeGraphNetwork* net,
-										const string& input_attrName,
-
-										TeTimeInterval t,
-
+bool TeFillCellNonSpatialRasterOperation(TeDatabase* db,
+										const string& input_raster_layername, 
+										TeComputeAttrStrategy<TeBoxRasterIterator>* operation,
 										const string& cell_layername, 
 										const string& cell_tablename, 
 										const string& output_columnName,
-										
-							
-										TeComputeAttrStrategy<TeSTElementSet::propertyIterator>* operation,
-										double local_distance_factor = 0.0,
-										double net_distance_factor = 0.25,
-										double net_conn_factor = 1.0,
-										double mult_factor = 1000000.0);
-
-/** @} */ // End of group FillCellAlg 
-
-		  
-/** @defgroup AgregateCellAlg Functions aggregate a set of attributes to coarse resolution cells for a given time interval. Specific (non-spatial) operation to be applied is a parameter (Strategy pattern).
-*  @{
+										TeTimeInterval time_interval = TeTimeInterval());
+
+//! Computes the cell attribute based on a non-spatial operation (TeComputeSpatialStrategy) over a certain attribute of a set of objects connected to each cell by a network.
+//! This function will change in the next version of TerraLib
+/*  \param db                       a pointer to the database in which input and output layers are stored
+    \param objects                  set of objects (e.g., ports) 
+    \param rep                      objects representation type
+    \param net                      netork to be used to verify and quantify cell connectivity to each cell
+    \param input_attrname           connected objects attribute to be used to compute output attribute
+    \param t                        time interval of output cells attributes
+    \param cell_layername           output cell layer  
+    \param cell_tablename           output cell attribute dynamic table; if does not exist, the table will be created by the function  
+    \param output_columnName        output attribute name   
+    \param operation                operation to be applied (see TeComputeAttrStrategy hierarchy)  
+    \param local_distance_factor    multiplier used to compute connection strenght weights: local distance factor (see GPM documentation) 
+    \param net_distance_factor      multiplier used to compute connection strenght weights: distance to network factor (see GPM documentation) 
+    \param net_conn_factor          multiplier used to compute connection strenght weights: connection through network factor (see GPM documentation) 
+    \param mult_factor              multiplier used to compute connection strenght weights: weight multiplier factor (see GPM documentation) 
 */
-
-
-/*!
-	\brief Computes a set of attributes for the output cell layer based on a non-spatial operation (TeComputeAttrSpatialStrategy) over a input cell layer.
-	\param db						a pointer to the database in which input and output layers are stored
+bool TeFillCellConnectionOperation (TeDatabase* db,
+                                    TeSTElementSet objects,
+                                    TeGeomRep rep,
+                                    TeGraphNetwork* net,
+                                    const string& /*input_attrName*/,
+                                    TeTimeInterval t,
+                                    const string& cell_layername,
+                                    const string& cell_tablename,
+                                    const string& /*output_columnName*/,
+                                    TeComputeAttrStrategy<TeSTElementSet::propertyIterator>* operation,
+                                    double /*local_distance_factor = 0.0*/,
+                                    double /*net_distance_factor = 0.25*/,
+                                    double /*net_conn_factor = 1.0*/,
+                                    double /*mult_factor = 1000000.0*/);
+
+
+
+//! Computes a set of attributes for the output cell layer based on a non-spatial operation (TeComputeAttrSpatialStrategy) over an input cell layer.
+/*	\param db						a pointer to the database in which input and output layers are stored
 	\param input_layername			name of input cell layer 
 	\param input_tablename			input layer attribute table to be used  
-	\param t						time interval of output cells attributes
+	\param operation				operation to be applied (see TeComputeAttrStrategy hierarchy)  
+	\param attrNames				names of input/output attribute names to be aggregated   
 	\param cell_layername			output cell layer  
 	\param cell_tablename			output cell attribute dynamic table; if does not exist, the table will be created by the function  
-	\param attrNames				names of input/output attribute names to be aggregated   
-	\param operation				operation to be applied (see TeComputeAttrStrategy hierarchy)  
+	\param time_interval			time interval of output cells attributes
+	\return true if the operation was successfully done  
+*/
+bool TeFillCellAggregateOperation(TeDatabase* db,
+									const string& input_layername, 
+									const string& input_tablename, 
+									TeComputeAttrStrategy<TeSTElementSet::propertyIterator>* operation,
+									vector<string>& attrNames,
+									const string& cell_layername, 
+									const string& cell_tablename, 
+									TeTimeInterval time_interval = TeTimeInterval());
+/** @} */ 
+
+/** @defgroup FillCellAux Fill cells auxiliary functions
+    @ingroup FillCellAlg
+*  @{
+*/
+//! Load cells geometries and verify/create dynamic attribute table if does not exists
+/*	\param cell_layer		a pointer to a layer of cells
+	\param cell_tablename	the name of the table in the layer of cells
+	\param cells			the object to be filled
+	\return if the function was successfully executed
 */
-
-
-bool TeFillCellAggregateOperation (  TeDatabase* db,
-										const string& input_layername, 
-										const string& input_tablename, 
-										TeTimeInterval t,
-										const string& cell_layername, 
-										const string& cell_tablename, 
-										vector<string>& attrNames,
-										TeComputeAttrStrategy<TeSTElementSet::propertyIterator>* operation);
-
-/** @} */ // End of group AgregateCellAlg 
-
-
-//////////////////////////////////////////////////////////////////////
-//
-//					Fill Cell Auxiliary Functions (headers)
-//
-/////////////////////////////////////////////////////////////////////
-
-
-// Load cells geometries and verify/create dynamic attribute table if does not exists
 bool TeFillCellInitLoad (TeLayer* cell_layer, const string& cell_tablename, TeCellSet& cells);
 
 
+//! Fills the cell object set for a temporal table 
+/*	\param cell			the cell which owns the attribute(s)
+	\param result		the result of an operation to be used to fill the set
+	\param cellObjSet	the set to be filled
+	\param atttype		the type of the table to be filled
+	\patam t			the time interval of the attribute(s)
+	\return if the function was successfully executed
+*/
+void TeFillCellInitSTO (const TeCell& cell, TePropertyVector& result, TeSTElementSet& cellObjSet, TeAttrTableType atttype, TeTimeInterval& t);
 
-// Init output cell sto
-void TeFillCellInitSTO (const TeCell& cell, TeTimeInterval& t, TePropertyVector& result, TeSTElementSet& cellObjSet);
 
-// Creates dymanic table
-bool TeCreateBasicDymanicCellTable (TeLayer* cell_layer, const string cell_tablename);
+//! Fills the cell object set for a temporal table 
+/*	\param cell			the cell which owns the attribute(s)
+	\param result		the result of an operation to be used to fill the set
+	\param cellObjSet	the set to be filled
+	\param atttype		the type of the table to be filled
+	\patam t			the time interval of the attribute(s)
+	\return if the function was successfully executed
+*/
+void TeFillCellInitSTO (const TeCell& cell, vector<string>& result, TeSTElementSet& cellObjSet, TeAttrTableType atttype, TeTimeInterval& t);
 
 
+//! Creates dymanic table
+/*	\param cell_layer			the layer where the table will be created
+	\param cell_table_name		the name of the new table
+	\return if the function was successfully executed
+*/
+bool TeCreateBasicDynamicCellTable (TeLayer* cell_layer, const string cell_tablename);
 
+/** @} */
+/** @} */
 #endif
 
diff --git a/src/terralib/functions/TeCoordAlgorithms.cpp b/src/terralib/functions/TeCoordAlgorithms.cpp
old mode 100644
new mode 100755
index bcc867d..2298f64
--- a/src/terralib/functions/TeCoordAlgorithms.cpp
+++ b/src/terralib/functions/TeCoordAlgorithms.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -23,6 +23,7 @@ of this library and its documentation.
 
 #include "TeCoordAlgorithms.h"
 #include <math.h>
+#include <cstdlib>
 
 bool TeLongDMS2DD(char hem, short& dg, short& mn, float& sc, double& grauDec)
 {
diff --git a/src/terralib/functions/TeCoordAlgorithms.h b/src/terralib/functions/TeCoordAlgorithms.h
old mode 100644
new mode 100755
index 0084ee6..cb1b045
--- a/src/terralib/functions/TeCoordAlgorithms.h
+++ b/src/terralib/functions/TeCoordAlgorithms.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,9 +20,8 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeCoordAlgorithms.h
-    This file contains some algorithms to deal with geographical coordinates
+    \brief This file contains algorithms to deal with geographical coordinates
 */
 #ifndef  __TERRALIB_INTERNAL_COORDALGORITHMS_H
 #define  __TERRALIB_INTERNAL_COORDALGORITHMS_H
diff --git a/src/terralib/functions/TeDriverBNA.h b/src/terralib/functions/TeDriverBNA.h
new file mode 100644
index 0000000..5e675d9
--- /dev/null
+++ b/src/terralib/functions/TeDriverBNA.h
@@ -0,0 +1,78 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeBNADriver.h
+    \brief This file contains functions to deal with the BNA format
+*/
+#ifndef __TERRALIB_INTERNAL_BNADRIVER_H
+#define __TERRALIB_INTERNAL_BNADRIVER_H
+
+#include "TeTable.h"
+#include "TeBox.h"
+#include "TeDataTypes.h"
+#include "TeGeometry.h" 
+
+#include <string>
+using namespace std;
+
+class TeLayer;
+class TeAsciiFile;
+class TeProjection;
+class TeDatabase;
+
+
+/** @defgroup BNA BNA format
+ *  @ingroup Formats
+ *  Functions related to BNA format (Atlas GIS BNA)
+ *  @{
+ */
+ 
+/** Imports a geo data in BNA format to a TerraLib database
+	\param bnaFileName	BNA file name
+	\param db			pointer to a TerraLib database
+	\param layerName	name of the layer that will contain the data (optional)
+	\return a pointer to created layer if the data was imported successfully and 0 otherwise
+*/
+TeLayer* TeImportBNA(const string& bnaFileName, TeDatabase* db, const string& layerName="");
+
+/** Imports a BNA file to a specific layer TerraLib
+	\param layer			pointer to a layer
+	\param bnaFileName		BNA file name
+	\param attrTableName	the name that the attribute table will be saved
+	\param attList			to return the list of attributes defined in the bna file, used only to name the fields
+	\param chunkSize		the number of objects in memory before save them to the layer
+	\param linkCol			name of the column that will contain the link to geometries
+	\return TRUE if the data was imported successfully and FALSE otherwise
+*/
+bool TeImportBNA(TeLayer* layer, const string& bnaFileName, string attrTableName,  
+				 TeAttributeList& attList, int unsigned chunkSize, const string& linkCol = "");
+
+/** Reads the attributes definition of a data in BNA format 
+	\param bnaFileName	BNA file name
+	\param attList		to return the attribute list
+	\return TRUE if the attribute list is successfully read and FALSE otherwise
+*/
+bool TeReadBNAAttributeList(const string& bnaFileName, TeAttributeList& attList);
+
+/** @} */ // End of subgroup BNA format
+#endif
+
diff --git a/src/terralib/functions/TeDriverCSV.h b/src/terralib/functions/TeDriverCSV.h
new file mode 100644
index 0000000..dc3bc5e
--- /dev/null
+++ b/src/terralib/functions/TeDriverCSV.h
@@ -0,0 +1,115 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeDriverCSV.h
+    \brief This file contains functions to deal with a file in CSV format
+*/
+#ifndef __TERRALIB_INTERNAL_DRIVERCSV_H
+#define __TERRALIB_INTERNAL_DRIVERCSV_H
+
+#include "TeTable.h"
+#include "TeBox.h"
+#include "TeDataTypes.h"
+
+#include <string>
+using namespace std;
+
+class TeLayer;
+class TeAsciiFile;
+class TeProjection;
+class TeDatabase;
+class TeQuerier;
+class TeTheme;
+
+/** @defgroup CSV format
+ *  @ingroup Formats
+ *  Functions related to CSV format
+ *  @{
+ */
+/** Creates an attribute table in a TerraLib database and imports a CSV file to this table 
+	\param csvFileName			CSV file name
+	\param attrTable			attribute table specifications
+	\param db					pointer to a TerraLib database
+	\param layer				pointer to a layer to which the table will associated
+	\param separator			character used to separate the data in the CSV file 
+	\param firstLineIsHeader	indicates if the first line is a header
+	\param chunkSize			number of objects in memory before save them in the database
+	\param createAutoNum		indicates if the table first attribute is an autonumber which must be generated  
+	\return TRUE if the data was imported successfully and FALSE otherwise
+*/
+bool TeImportCSVFile(const string& csvFileName, TeTable& attrTable, TeDatabase* db, TeLayer* layer=0, 
+					 const char& separator=',', const bool& firstLineIsHeader=false,   
+					 const unsigned int& chunkSize=100, const bool& createAutoNum = false);
+
+/** Imports a CSV file to a layer in a TerraLib database, its geometries (points) and attributes
+	\param csvFileName			CSV file name pointer to a layer
+	\param attributeX			attribute index which provides the coordinate X
+	\param attributeY			attribute index which provides the coordinate Y
+	\param attrTable			attribute table specifications
+	\param db					pointer to a TerraLib database
+	\param layer				pointer to an empty layer which will be filled from CSV file
+	\param separator			character used to separate the data in the CSV file 
+	\param firstLineIsHeader	indicates if the first line is a header
+	\param chunkSize			number of objects in memory before save them in the database
+	\param createAutoNum		indicates if the table first attribute is an autonumber which must be generated  
+	\return TRUE if the data was imported successfully and FALSE otherwise
+*/
+bool TeImportCSVFile(const string& csvFileName, const int& attributeX, const int& attributeY, 
+					 TeTable& attrTable, TeDatabase* db, TeLayer* layer, 
+					 const char& separator=',', const bool& firstLineIsHeader=false,   
+					 const unsigned int& chunkSize=100, const bool& createAutoNum = false);
+
+/** Exports a querier to a Comma-Separated Values data file
+	\param querier		pointer to a valid querier
+	\param filename		name of the output CSV file
+	\param sep			separator to be used
+	\return TRUE if the data was successfully exported and FALSE otherwise
+	This function can be used only when the querier access point representation data. First line contains the name
+	of the attributes.
+*/
+bool TeExportQuerierToCSV(TeQuerier* querier, const std::string& filename, const char& sep=';');
+
+/** Exports a layer in a TerraLib database to a file in ASCII CSV format
+	This function can be used only when the layers contains POINT representation. First line contains the name
+	of the attributes.
+   \param layer			pointer to the layer
+   \param filename		name of the output MID/MIF file
+   \param sep			separator to be used
+   \return TRUE if the data was successfully exported and FALSE otherwise
+*/
+bool TeExportLayerToCSV(TeLayer* layer, const string& filename="", const char& sep=';');
+
+/** Exports a theme in a TerraLib database to a file in ASCII CSV format
+ 	This function can be used only when the theme acontains POINT representation. First line contains the name
+	of the attributes.
+   \param theme			pointer to the theme
+   \param filename		name of the output MID/MIF file
+   \param selOb			selection of the objects that should be exported
+   \param sep			separator to be used
+   \return TRUE if the data was successfully exported and FALSE otherwise
+*/
+bool TeExportThemeToCSV(TeTheme* theme, TeSelectedObjects selOb, const std::string& filename="", const char& sep=';');
+
+/** @} */ // End of subgroup CSV format
+
+#endif
+
diff --git a/src/terralib/functions/TeDriverMIDMIF.h b/src/terralib/functions/TeDriverMIDMIF.h
new file mode 100644
index 0000000..070867b
--- /dev/null
+++ b/src/terralib/functions/TeDriverMIDMIF.h
@@ -0,0 +1,119 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeMIDMIFDriver.h
+    \brief This file contains functions to deal with the MID MIF data format
+*/
+#ifndef __TERRALIB_INTERNAL_TeMIDMIFDriver_H
+#define __TERRALIB_INTERNAL_TeMIDMIFDriver_H
+
+#include "TeTable.h"
+#include "TeBox.h"
+#include "TeDataTypes.h"
+#include "TeGeometry.h" 
+
+#include <string>
+using namespace std;
+
+class TeLayer;
+class TeAsciiFile;
+class TeProjection;
+class TeDatabase;
+class TePolygonSet;
+class TeQuerier;
+class TeTheme;
+
+/** @defgroup MIDMIF MID/MIF format
+ *  @ingroup Formats
+ *  Functions related to MID MIF format
+ *  @{
+ */
+ /** Imports a geo data in MID/MIF format to a TerraLib database
+	\param mifFileName	MIF file name
+	\param db			pointer to a TerraLib database
+	\param layerName	name of the layer that will contain the data (optional)
+	\return a pointer to created layer if the data was imported successfully and 0 otherwise
+*/
+TeLayer* TeImportMIF(const string& mifFileName, TeDatabase* db, const string& layerName="");
+
+/** Imports a MID/MIF file to a specific layer TerraLib
+	\param layer			pointer to a layer
+	\param mifFileName		MIF file name
+	\param attrTableName	the name that the attribute table will be saved
+	\param objectIdAttr		name of the attribute that has the identification of objects
+	\param chunkSize		the number of objects in memory before save them in the layer
+	\return TRUE if the data was imported successfully and FALSE otherwise
+*/
+bool TeImportMIF(TeLayer* layer, const string& mifFileName, string attrTableName="",  
+				 string objectIdAttr="", int unsigned chunkSize = 60);
+
+/** Reads the attributes definition of a data in MID/MIF format
+	\param mifFileName		MIF file name
+	\param attList			to return the list of attributes defined in the file
+*/
+void TeReadMIFAttributeList(const string& mifFileName, TeAttributeList& attList);
+
+/** Reads the geographical projection of a data in MID/MIF format
+	\param mifFileName		MIF file name
+	\return a pointer to a TeProjection
+*/
+TeProjection* TeReadMIFProjection(const string& mifFileName);
+
+/** Exports a querier to a MID/MIF file
+	\param	querier		pointer to a valid querier
+	\param baseName		name of the output MID/MIF file
+	\param proj			pointer to the projection of the geometries retrieved by the querier
+	\return TRUE if the data was successfully exported and FALSE otherwise
+*/
+bool TeExportQuerierToMIF(TeQuerier* querier, const std::string& base, TeProjection* proj);
+
+/** Exports a layer in a TerraLib database to a file in MID/MIF format
+   \param layer			pointer to the layer
+   \param baseName		name of the output MID/MIF file
+   \return TRUE if the data was successfully exported and FALSE otherwise
+*/
+bool TeExportLayerToMIF(TeLayer* layer, const string& baseName="");
+
+/** Exports a theme in a TerraLib database to a file in MID/MIF format
+   \param theme			pointer to the theme
+   \param baseName		name of the output MID/MIF file
+   \param selOb			selection of the objects that should be exported
+   \return TRUE if the data was successfully exported and FALSE otherwise
+*/
+bool TeExportThemeToMIF(TeTheme* theme, TeSelectedObjects selOb = TeAll, const string& baseName="");
+
+/** Exports a layer in a TerraLib database to a file in MID/MIF format
+   \param layer			pointer to the layer
+   \param mifFileName	name of the output MID/MIF file
+   \param tableName		name of the attribute table to be exported
+   \return true if the data was successfully exported and FALSE otherwise
+*/
+bool TeExportMIF(TeLayer* layer, const string& mifFileName, const string& tableName, const string& restriction = "");
+
+/** @} */ // End of subgroup MID/MIF format
+
+/** \example importMIDMIF.cpp
+ Shows how to import geographical data in MID/MIF format
+ */
+
+#endif
+
diff --git a/src/terralib/functions/TeDriverSPRING.h b/src/terralib/functions/TeDriverSPRING.h
new file mode 100644
index 0000000..2626aa8
--- /dev/null
+++ b/src/terralib/functions/TeDriverSPRING.h
@@ -0,0 +1,116 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeSPRINGDriver.h
+    \brief This file contains functions to deal with the SPRING GEO/TAB format
+*/
+#ifndef __TERRALIB_INTERNAL_SPRINGDriver_H
+#define __TERRALIB_INTERNAL_SPRINGDriver_H
+
+#include "TeTable.h"
+#include "TeBox.h"
+#include "TeDataTypes.h"
+#include "TeGeometry.h" 
+
+#include <string>
+using namespace std;
+
+class TeLayer;
+class TeSPRFile;
+class TeAsciiFile;
+class TeProjection;
+class TeDatabase;
+class TeTheme;
+class TeQuerier;
+
+/** @defgroup SPR SPRING GEO/TAB format
+   @ingroup Formats
+   Functions related to SPRING format
+   @{
+ */ 
+/** Imports a geo data in SPRING geo/tab format to a TerraLib database
+	\param geoFileName	GEO/TAB file name
+	\param db			pointer to a TerraLib database
+	\param layerName	name of the layer that will contain the data (optional)
+	\return a pointer to created layer if the data was imported successfully and 0 otherwise
+*/
+TeLayer* TeImportGEO(const string& geoFileName, TeDatabase* db, const string& layerName="");
+
+/** Imports a GEO/TAB data to a layer TerraLib
+    \param layer			pointer to a layer
+	\param geoFileName		GEO/TAB file name
+	\param attrTableName	the name that the attribute table will be saved
+	\param chunkSize the number of objects in memory before save them in the layer
+*/
+bool TeImportGEO(TeLayer* layer, const string& geoFileName, string attrTableName="", unsigned int chunkSize=60);
+
+/** Reads the list of attributes  of GEO/TAB file
+	\param geoFileName	DBF input file name
+	\param attList		to return the DBF list of attributes
+	\param labelName	to return the name of the column that is the link with geometries
+	\return true if the list of attributes were was successfully read and false otherwise
+*/
+void TeReadGeoAttributeList(const string& geoFileName, TeAttributeList& attList, string& labelName);
+
+/** Exports a layer in a TerraLib database to a file in ASCII SPRING format
+    \param layer		pointer to the layer
+    \param sprFileName	name of the output SPRING file
+    \param tableName	name of the attribute table to be exported
+    \param cat			Spring's category
+	\param name			name of the column that has the object identifier or class indication
+    \return TRUE if the data was successfully exported and FALSE otherwise
+    \note Parameter 'name' is the Object name if exporting to categories Cadastral or Network .
+   Is the name of the column that has the quote value if Numeric category or the name
+   of the column that has the class information if category Thematic.
+*/
+bool TeExportSPR(TeLayer* layer, const string& sprFileName, const string& tableName, 
+			 TeSpringModels cat, const string& name);
+
+/** Exports a theme in a TerraLib database to a file in MID/MIF format
+	\param theme			pointer to the theme
+	\param cat			Spring's category
+	\param name			name of the column that has the object identifier or class indication
+	\param selOb			selection of the objects that should be exported
+	\param baseName		name of the output MID/MIF file
+   \return TRUE if the data was successfully exported and FALSE otherwise
+*/
+bool TeExportThemeToSPRING(TeTheme* theme, TeSpringModels cat, const string& name, TeSelectedObjects selOb = TeAll, const string& baseName="");
+
+
+/** Exports a querier to a SCII Spring file
+	\param querier		pointer to a valid querier
+	\param baseName		name of the output SPRING file
+    \param cat			Spring's category
+	\param name			name of the column that has the object identifier or class indication
+	\param proj			projection of the data
+	\param objname		name of object category
+	\return TRUE if the data was successfully exported and FALSE otherwise
+*/
+bool TeExportQuerierToSPRING(TeQuerier* querier, const std::string& base, TeSpringModels cat, const string& name, TeProjection* proj=0);
+/** @} */ // End of subgroup SPRING format
+
+/** \example importGeoTab.cpp
+ Shows how to import geographical data in SPRING GEO/TAB format
+ */
+
+#endif
+
diff --git a/src/terralib/functions/TeExportCSV.cpp b/src/terralib/functions/TeExportCSV.cpp
new file mode 100644
index 0000000..ab08b23
--- /dev/null
+++ b/src/terralib/functions/TeExportCSV.cpp
@@ -0,0 +1,183 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+
+#include "TeException.h"
+#include "TeDriverCSV.h"
+#include "TeAsciiFile.h"
+
+#include "TeUtils.h"
+#include "TeLayer.h"
+#include "TeQuerier.h"
+
+bool TeExportQuerierToCSV(TeQuerier* querier, const std::string& filename, const char& sep)
+{
+	// check initial conditions
+	if (!querier || filename.empty())
+		return false;
+
+	if (!querier->loadInstances())
+		return false;
+	
+	// Get the list of attributes defined by the input querier
+	bool onlyObjId = false;
+	TeAttributeList qAttList = querier->getAttrList();
+	if (qAttList.empty())
+	{
+		TeAttributeList qAttList;
+		TeAttribute at;
+		at.rep_.type_ = TeSTRING;               
+		at.rep_.numChar_ = 100;
+		at.rep_.name_ = "ID";
+		at.rep_.isPrimaryKey_ = true;
+		qAttList.push_back(at);
+		onlyObjId = true;
+	}
+	string line = "COORD_X";
+	line += sep;
+	line += "COORD_Y";
+	line += sep;
+	line += qAttList[0].rep_.name_;
+	unsigned int i=0;
+	TeAsciiFile csv(filename, "w+");
+	for (i=1;i<qAttList.size();++i)
+	{
+		line += sep;
+		line += qAttList[i].rep_.name_;
+	}
+	csv.writeString(line);
+	csv.writeNewLine();
+
+	TePointSet		objectPoints;	// points of the region
+
+	// progress information
+	if (TeProgress::instance())
+		TeProgress::instance()->setTotalSteps(querier->numElemInstances());
+	clock_t	t0, t1, t2;
+	t2 = clock();
+	t0 = t1 = t2;
+	int dt = CLOCKS_PER_SEC/2;
+	int dt2 = CLOCKS_PER_SEC; //* .000001;
+	unsigned int nIProcessed = 0;
+	char aux[50];
+	TeSTInstance st;
+	while(querier->fetchInstance(st))
+	{
+		if (!st.hasPoints())
+			continue;
+
+		objectPoints = st.getPoints();
+		for (i=0;i<objectPoints.size();++i)
+		{
+			TeCoord2D xy = objectPoints[i].location();
+			sprintf(aux,"%.6f%c%.6f", xy.x(),sep, xy.y());
+			line = aux;
+			if (onlyObjId)
+			{
+				line += sep;
+				line += st.objectId();
+			}	
+			else
+			{
+				unsigned int aa = 0;
+				string val;
+				for (aa=0; aa<qAttList.size(); ++aa)
+				{
+					st.getPropertyValue(val,aa);
+					line += sep;
+					line += val;
+				}
+			}
+			csv.writeString(line);
+			csv.writeNewLine();
+		}
+		++nIProcessed;
+		t2 = clock();
+		if (TeProgress::instance() && int(t2-t1) > dt)
+		{
+			t1 = t2;
+			if(((int)(t2-t0) > dt2))
+			{
+				if (TeProgress::instance()->wasCancelled())
+					break;
+				else
+					TeProgress::instance()->setProgress(nIProcessed);
+			}
+		}
+	}
+	if (TeProgress::instance())
+		TeProgress::instance()->reset();
+	return true;
+}
+
+
+bool 
+TeExportThemeToCSV(TeTheme* theme, TeSelectedObjects selOb, const std::string& filename, const char& sep)
+{
+	if (!theme)
+		return false;
+
+	if (!(theme->visibleGeoRep() & TePOINTS))
+		return false;
+
+	string fbase = filename;
+	if (filename.empty())
+		fbase = theme->name();
+
+	TeQuerierParams qPar(true, true);
+	qPar.setParams(theme);
+	qPar.setSelecetObjs(selOb);
+
+	TeQuerier* tQuerier = new TeQuerier(qPar);
+	bool res = TeExportQuerierToCSV(tQuerier, filename, sep);
+	delete tQuerier;
+	return res;
+}
+
+bool 
+TeExportLayerToCSV(TeLayer* layer, const string& filename, const char& sep)
+{
+	if (!layer)
+		return false;
+
+	if (!layer->hasGeometry(TePOINTS))
+		return false;
+
+	string fbase = filename;
+	if (filename.empty())
+		fbase = layer->name();
+
+	TeTheme* tempTheme = new TeTheme();
+	tempTheme->layer(layer);
+	tempTheme->collectionTable("");
+	tempTheme->collectionAuxTable("");
+	tempTheme->setAttTables(layer->attrTables());
+
+	TeQuerierParams qPar(true, true);
+	qPar.setParams(tempTheme);
+
+	TeQuerier* tQuerier = new TeQuerier(qPar);
+	bool res = TeExportQuerierToCSV(tQuerier, filename, sep);
+	delete tQuerier;
+	delete tempTheme;
+    return res ;
+}
diff --git a/src/terralib/functions/TeExportMIF.cpp b/src/terralib/functions/TeExportMIF.cpp
old mode 100644
new mode 100755
index 3b9b238..8107618
--- a/src/terralib/functions/TeExportMIF.cpp
+++ b/src/terralib/functions/TeExportMIF.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -22,15 +22,12 @@ of this library and its documentation.
 *************************************************************************************/
 
 #include "TeException.h"
-#include "TeImportExport.h"
+#include "TeDriverMIDMIF.h"
 #include "TeAsciiFile.h"
 
 #include "TeUtils.h"
 #include "TeLayer.h"
-#include "TeTable.h"
-#include "TeGeometry.h"
-#include "TeDatabase.h"
-#include "TeGeometryAlgorithms.h"
+#include "TeQuerier.h"
 
 int TeExportMIFLineSet ( TeAsciiFile& mifFile, TeLineSet& ls);
 int TeExportMIFPointSet ( TeAsciiFile& mifFile, TePointSet& ps, bool isMulti=false);
@@ -41,224 +38,249 @@ void TeExportMIFAttributeList (TeAttributeList& attList, TeAsciiFile& mifFile);
 void TeExportMIFRow(TeTableRow& row, TeAsciiFile& midFile);
 TeProjInfo TeMIFProjectionInfo (const string& projName );
 
+
 bool
-TeExportMIF( TeLayer* layer, const string& mifFileName, const string& tableName)
+TeExportQuerierToMIF(TeQuerier* querier, const std::string& base, TeProjection* proj)
 {
-	if (!layer || mifFileName.empty() || tableName.empty())
-		return false;
-
-	// check if layer has the attribute table
-	TeTable tableE;
-	if (!layer->getAttrTablesByName(tableName,tableE))
+	// check initial conditions
+	if (!querier || base.empty())
 		return false;
 
-	// try to get some portals
-	TeDatabasePortal* portalObjs = layer->database()->getPortal();
-	TeDatabasePortal* portalGeoms = layer->database()->getPortal();
-
-	if (!portalObjs || !portalGeoms)
+	if (!querier->loadInstances())
 		return false;
-
-	// check if there is any object
-	string sql1 = "SELECT * FROM " + tableName;
-	if (!portalObjs->query(sql1) || !portalObjs->fetchRow())
+	
+	// Get the list of attributes defined by the input querier
+	bool onlyObjId = false;
+	TeAttributeList qAttList = querier->getAttrList();
+	if (qAttList.empty())
 	{
-		delete portalObjs;
-		delete portalGeoms;
-		return false;
+		TeAttributeList qAttList;
+		TeAttribute at;
+		at.rep_.type_ = TeSTRING;               
+		at.rep_.numChar_ = 100;
+		at.rep_.name_ = "ID";
+		at.rep_.isPrimaryKey_ = true;
+		qAttList.push_back(at);
+		onlyObjId = true;
 	}
-	clock_t	ti, tf;
-	int count = 0;
 
-	try 
+	TeAsciiFile mifFile(base+".MIF", "w+");
+	TeAsciiFile midFile(base+".MID", "w+");
+	
+	// write header;
+	mifFile.writeString("Version 300\n");
+	mifFile.writeString("Charset \"WindowsLatin1\" \n");
+	mifFile.writeString("Delimiter \";\"\n");
+	if (proj)
 	{
-		string link = tableE.linkName();
-		TeAsciiFile mifFile ( mifFileName+".MIF", "w+" );
-		TeAsciiFile midFile ( mifFileName+".MID", "w+" );
-		string sql2;
-
-		// write header;
-		mifFile.writeString("Version 300\n");
-		mifFile.writeString("Charset \"WindowsLatin1\" \n");
-		mifFile.writeString("Delimiter \";\"\n");
-		TeProjection* proj = layer->projection();
-		if (proj)
+		TeBox box = querier->getBox();
+		char txt[300];
+		sprintf(txt,"Bounds (%.5f, %5f) (%.5f, %5f)\n",box.x1_,box.y1_,box.x2_,box.y2_);
+		if (proj->name() == "NoProjection")
 		{
-			TeBox box = layer->box();
-			char txt[300];
-			sprintf(txt,"Bounds (%.5f, %5f) (%.5f, %5f)\n",box.x1_,box.y1_,box.x2_,box.y2_);
-			if (proj->name() == "NoProjection")
-			{
-				mifFile.writeString("CoordSys Nonearth\n");
-				mifFile.writeString("Units ");
-				mifFile.writeString(proj->units());
-				mifFile.writeNewLine();
-				mifFile.writeString(string(txt));
-			}
-			else if (proj->name() == "LatLong")
-			{
-				mifFile.writeString("CoordSys Earth Projection 1, 0 ");
-				mifFile.writeString(string(txt));
-
-			}
-			else
-			{
-				TeExportMIFProjection(layer->projection(), mifFile);
-				mifFile.writeString(" ");
-				mifFile.writeString(string(txt));
-			}
+			mifFile.writeString("CoordSys Nonearth\n");
+			mifFile.writeString("Units ");
+			mifFile.writeString(proj->units());
+			mifFile.writeNewLine();
+			mifFile.writeString(string(txt));
 		}
-		TeAttributeList attrList = tableE.attributeList();
-		TeExportMIFAttributeList(attrList,mifFile);
-
-		string geoid;
-		TeTableRow row;
-		mifFile.writeString("Data\n");
-
-		if(TeProgress::instance())
-			TeProgress::instance()->setTotalSteps(portalObjs->numRows());
-		ti = clock();
-		// Loop through all objects of the layer
-		do 
+		else if (proj->name() == "LatLong")
 		{
-			geoid = portalObjs->getData(link);
+			mifFile.writeString("CoordSys Earth Projection 1, 0 ");
+			mifFile.writeString(string(txt));
+		}
+		else
+		{
+			TeExportMIFProjection(proj, mifFile);
+			mifFile.writeString(" ");
+			mifFile.writeString(string(txt));
+		}
+	}
+	TeExportMIFAttributeList(qAttList,mifFile);
+	mifFile.writeString("Data\n");
+
+	TeTableRow row;
+	TePolygonSet	objectPols;		// polygons of the region
+	TeLineSet		objectLines;		// lines of the region
+	TePointSet		objectPoints;	// points of the region
+	TeCellSet		objectCells;	// points of the region
+
+	// progress information
+	if (TeProgress::instance())
+		TeProgress::instance()->setTotalSteps(querier->numElemInstances());
+	clock_t	t0, t1, t2;
+	t2 = clock();
+	t0 = t1 = t2;
+	int dt = CLOCKS_PER_SEC/2;
+	int dt2 = CLOCKS_PER_SEC; //* .000001;
+	unsigned int nIProcessed = 0;
+	TeSTInstance st;
+	while(querier->fetchInstance(st))
+	{
+		if (st.hasPolygons())
+			objectPols = st.getPolygons();
+		if (st.hasCells())
+			objectCells = st.getCells();
+		if (st.hasLines())
+			objectLines = st.getLines();
+		if (st.hasPoints())
+			objectPoints = st.getPoints();
+		
+		int col = 0;
+		if (objectPoints.size() > 0)
+			col++;
+		if (objectLines.size() > 0)
+			col++;
+		if (objectPols.size() > 0)
+			col++;
+		if (objectCells.size() > 0)
+			col++;
+		if (col == 0)
+		{
+			mifFile.writeString("NONE\n");
+		}
+		else
+		{
+			if (col > 1)	// it is a collection
+				mifFile.writeString("Collection " + Te2String(col) + "\n");
 
-			TePolygonSet	objectPols;		// polygons of the region
-			TeLineSet		objectLines;		// lines of the region
-			TePointSet		objectPoints;	// points of the region
-			TeCellSet		objectCells;	// points of the region
+			if (objectPols.size() > 0)
+				TeExportMIFPolygonSet(mifFile,objectPols);
 
-			// check if there is a polygon set geometry
-			bool flag = true;
-			if (layer->hasGeometry(TePOLYGONS))
-			{
-				sql2 = "SELECT * FROM " + layer->tableName(TePOLYGONS) + " WHERE object_id='" + geoid + "'";
-				if (portalGeoms->query(sql2) && portalGeoms->fetchRow())
-				{
-					do
-					{
-						TePolygon poly;
-						flag = portalGeoms->fetchGeometry(poly);
-						objectPols.add(poly);
-					} while (flag);
-				}
-				portalGeoms->freeResult();
-			}
+			if (objectLines.size() > 0)
+				TeExportMIFLineSet(mifFile,objectLines);
 
-			// check if there is a line set geometry
-			if (layer->hasGeometry(TeLINES))
-			{
-				sql2 = "SELECT * FROM " + layer->tableName(TeLINES) + " WHERE object_id='" + geoid + "'";
-				if (portalGeoms->query(sql2) && portalGeoms->fetchRow())
-				{
-					do
-					{
-						TeLine2D line;
-						flag = portalGeoms->fetchGeometry(line);
-						objectLines.add(line);
-					} while (flag);
-				}
-				portalGeoms->freeResult();
-			}
+			if (objectPoints.size() > 0)
+				TeExportMIFPointSet(mifFile,objectPoints,(col>1));
 
-			// check if there is a point set geometry
-			if (layer->hasGeometry(TePOINTS))
+			if (objectCells.size() > 0)
+				TeExportMIFCellSet(mifFile,objectCells,(col>1));
+				
+			objectCells.clear();
+			objectPols.clear();
+			objectPoints.clear();
+			objectLines.clear();
+		}
+
+		row.clear();	// export attributes
+		if (onlyObjId)
+		{
+			row.push_back(st.objectId());
+		}	
+		else
+		{
+			unsigned int aa = 0;
+			string val;
+			for (aa=0; aa<qAttList.size(); ++aa)
 			{
-				sql2 = "SELECT * FROM " + layer->tableName(TePOINTS) + " WHERE object_id='" + geoid + "'";
-				if (portalGeoms->query(sql2) && portalGeoms->fetchRow())
-				{
-					do
-					{
-						TePoint point;
-						flag = portalGeoms->fetchGeometry(point);
-						objectPoints.add(point);
-					} while (flag);
-				}
-				portalGeoms->freeResult();
+				st.getPropertyValue(val,aa);
+				row.push_back(val);
 			}
-			// check if there is a point set geometry
-			if (layer->hasGeometry(TeCELLS))
+			TeExportMIFRow(row,midFile);
+		}
+		++nIProcessed;
+		t2 = clock();
+		if (TeProgress::instance() && int(t2-t1) > dt)
+		{
+			t1 = t2;
+			if(((int)(t2-t0) > dt2))
 			{
-				sql2 = "SELECT * FROM " + layer->tableName(TeCELLS) + " WHERE object_id='" + geoid + "'";
-				if (portalGeoms->query(sql2) && portalGeoms->fetchRow())
-				{
-					do
-					{
-						TeCell cell;
-						flag = portalGeoms->fetchGeometry(cell);
-						objectCells.add(cell);
-					} while (flag);
-				}
-				portalGeoms->freeResult();
+				if (TeProgress::instance()->wasCancelled())
+					break;
+				else
+					TeProgress::instance()->setProgress(nIProcessed);
 			}
-			int col = 0;
-			if (objectPoints.size() > 0)
-				col++;
-			if (objectLines.size() > 0)
-				col++;
-			if (objectPols.size() > 0)
-				col++;
-			if (objectCells.size() > 0)
-				col++;
+		}
+	}
+	if (TeProgress::instance())
+		TeProgress::instance()->reset();
 
+	return true;
+}
 
 
-			row.clear();	// export attributes
-			for (int j = 0; j < portalObjs->numFields(); j++)
-				row.push_back ( portalObjs->getData (j) );
-			TeExportMIFRow(row,midFile);
+bool 
+TeExportThemeToMIF(TeTheme* theme, TeSelectedObjects selOb, const std::string& baseName)
+{
+	if (!theme)
+		return false;
 
-			if (col == 0)
-			{
-				mifFile.writeString("NONE\n");
-			}
-			else
-			{
-				if (col > 1)	// it is a collection
-					mifFile.writeString("Collection " + Te2String(col) + "\n");
+	string fbase = baseName;
+	if (baseName.empty())
+		fbase = theme->name();
 
-				if (objectPols.size() > 0)
-					TeExportMIFPolygonSet(mifFile,objectPols);
+	TeQuerierParams qPar(true, true);
+	qPar.setParams(theme);
+	qPar.setSelecetObjs(selOb);
 
-				if (objectLines.size() > 0)
-					TeExportMIFLineSet(mifFile,objectLines);
+	TeQuerier* tQuerier = new TeQuerier(qPar);
+	bool res = TeExportQuerierToMIF(tQuerier, fbase, theme->layer()->projection());
+	delete tQuerier;
+	return res;
+}
 
-				if (objectPoints.size() > 0)
-					TeExportMIFPointSet(mifFile,objectPoints,(col>1));
+bool 
+TeExportLayerToMIF(TeLayer* layer, const string& baseName)
+{
+  	if (!layer)
+		return false;
 
-				if (objectCells.size() > 0)
-					TeExportMIFCellSet(mifFile,objectCells,(col>1));
-				
-				objectCells.clear();
-				objectPols.clear();
-				objectPoints.clear();
-				objectLines.clear();
-			}
-			if (TeProgress::instance())
-			{
-				tf = clock();
-				if (((tf-ti)/CLOCKS_PER_SEC) > 3)
-					TeProgress::instance()->setProgress(count);
-				if (TeProgress::instance()->wasCancelled())
-					break;
-				ti = tf;
-			}
-			count++;
-		} while (portalObjs->fetchRow());
-		delete portalObjs;
-		delete portalGeoms;
-		return true;
-	}
-	catch(...)
-	{
-		if (portalObjs)
-			delete portalObjs;
-		if (portalGeoms)
-			delete portalGeoms;
+	string fbase = baseName;
+	if (baseName.empty())
+		fbase = layer->name();
+
+	TeTheme* tempTheme = new TeTheme();
+	tempTheme->layer(layer);
+	tempTheme->collectionTable("");
+	tempTheme->collectionAuxTable("");
+	tempTheme->setAttTables(layer->attrTables());
+
+	TeQuerierParams qPar(true, true);
+	qPar.setParams(tempTheme);
+
+	TeQuerier* tQuerier = new TeQuerier(qPar);
+	bool res = TeExportQuerierToMIF(tQuerier, baseName, layer->projection());
+	delete tQuerier;
+	delete tempTheme;
+    return res ;
+}
+
+bool
+TeExportMIF( TeLayer* layer, const string& mifFileName, const string& tableName, const string& restriction)
+{
+	if (!layer || mifFileName.empty() || tableName.empty())
 		return false;
+	
+	// check if asked table exist
+	TeAttrTableVector& vTables = layer->attrTables();
+	TeAttrTableVector::iterator it = vTables.begin();
+	while (it != vTables.end())
+	{
+		if (it->name() == tableName) 
+			break;
+		++it;
 	}
-	if(TeProgress::instance())
-		TeProgress::instance()->reset();
+	if (it == vTables.end())
+		return false;
+	TeAttrTableVector askedTable;
+	askedTable.push_back(*it);
+
+	TeTheme* tempTheme = new TeTheme();
+	tempTheme->attributeRest(restriction);
+	tempTheme->layer(layer);
+	tempTheme->collectionTable("");
+	tempTheme->collectionAuxTable("");
+	tempTheme->setAttTables(askedTable);
+
+	TeQuerierParams qPar(true, true);
+	qPar.setParams(tempTheme);
+
+	TeQuerier* tQuerier = new TeQuerier(qPar);
+	bool res = TeExportQuerierToMIF(tQuerier, mifFileName, layer->projection());
+	delete tQuerier;
+	delete tempTheme;
+    return res ;
+	return true;
 }
 
 void
@@ -469,7 +491,15 @@ TeExportMIFPolygonSet (TeAsciiFile& mifFile, TePolygonSet& polygons)
 	if (polygons.size() == 0)
 		return 0;
 	char aux[50];
-	sprintf(aux,"Region %d\n",polygons.size());
+
+	unsigned int nrings = 0;
+
+	for(unsigned int j = 0; j < polygons.size(); ++j)
+	{
+		nrings += polygons[j].size();
+	}
+
+	sprintf(aux,"Region %d\n",nrings);
 	mifFile.writeString(string(aux));
 	unsigned int i;
 	for (i = 0; i < polygons.size(); i++ )
diff --git a/src/terralib/functions/TeExportSHP.cpp b/src/terralib/functions/TeExportSHP.cpp
deleted file mode 100644
index e10373a..0000000
--- a/src/terralib/functions/TeExportSHP.cpp
+++ /dev/null
@@ -1,443 +0,0 @@
-/************************************************************************************
-TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The library provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use
-of this library and its documentation.
-*************************************************************************************/
-
-#include "shapefil.h"
-#include "TeImportExport.h"
-#include "TeTable.h"
-#include "TeException.h"
-#include "TeUtils.h"
-#include "TeLayer.h"
-#include "TeDatabase.h"
-#include <vector>
-
-
-DBFHandle TeCreateDBFFile (const string& dbfFilename, TeAttributeList& attList)
-{
-	DBFHandle hDBF = DBFCreate( dbfFilename.c_str() );
-	if( hDBF == 0 )
-		return 0;
-	
-	int i =0;
-	TeAttributeList::iterator it=attList.begin();
-
-	while ( it != attList.end() )
-	{
-		TeAttribute at = (*it);
-		string atName = at.rep_.name_;
-
-		if (atName.size() > 10)
-		{
-			int extra = (int)(atName.size() - 10)/2;
-			int middle = (int)(atName.size()/2);
-			string str = atName.substr(0,middle-extra-1);
-			str += atName.substr(middle+extra);
-			atName = str;
-		}
-
-		if (at.rep_.type_ == TeSTRING )
-		{
-			if (DBFAddField( hDBF, atName.c_str(), FTString, at.rep_.numChar_, 0 ) == -1 )
-				return 0;
-		}
-		else if (at.rep_.type_ == TeINT)
-		{
-			if (DBFAddField( hDBF, atName.c_str(), FTInteger, 10, 0 ) == -1 )
-				return 0;
-		}
-		else if (at.rep_.type_ == TeREAL)
-		{
-			if (DBFAddField( hDBF, atName.c_str(), FTDouble, 10, 5 ) == -1 )
-				return 0;
-		}
-		// OBS: shapelib doesn�t deal with xBase field type for Date 
-		// we are transforming it to string
-		else if (at.rep_.type_ == TeDATETIME)
-		{
-			if (DBFAddField( hDBF, atName.c_str(), FTDate, 8, 0 ) == -1 )
-				return 0;
-		}
-		++i;
-		++it;
-	}
-	return hDBF;
-}
-
-bool
-TeExportShapefile(TeLayer* layer, const string& shpFileName, const string& tableName)
-{
-  	if (!layer || shpFileName.empty() || tableName.empty())
-		return false;
-
-	// check if layer has the attribute table
-	TeTable tableE;
-	if (!layer->getAttrTablesByName(tableName,tableE))
-		return false;
-	string linkName = tableE.linkName();
-
-	TeDatabasePortal* portalObjs = layer->database()->getPortal();
-	if (!portalObjs)
-		return false;
-
-	vector<int> reps;
-	if (layer->hasGeometry(TePOINTS))
-		reps.push_back(SHPT_POINT);
-
-	if (layer->hasGeometry(TePOLYGONS) || layer->hasGeometry(TeCELLS) )
-		reps.push_back(SHPT_POLYGON);
-
-	if (layer->hasGeometry(TeLINES))
-		reps.push_back(SHPT_ARC);
-
-	if (reps.empty())
-	{
-		delete portalObjs;
-		return false;	// there are no geometrical representations
-	}
-
-	DBFHandle	hDBF;
-    SHPHandle	hSHP;
-
-	for (unsigned int i=0; i<reps.size(); i++)
-	{
-		string sql1 = "SELECT * FROM " + tableName;
-		if (!portalObjs->query(sql1) || !portalObjs->fetchRow())
-		{
-			delete portalObjs;
-			return false;
-		}
-		
-		string dbfFilename;
-		string shpFilename;
-		int nShapeType = reps[i];
-		switch (nShapeType)
-		{
-		case SHPT_POINT:
-			dbfFilename = shpFileName + "_point.dbf";
-			shpFilename = shpFileName + "_point.shp";
-			break;
-		case SHPT_POLYGON:
-			dbfFilename = shpFileName + "_pol.dbf";
-			shpFilename = shpFileName + "_pol.shp";
-			break;
-		case SHPT_ARC:
-			dbfFilename = shpFileName + "_lin.dbf";
-			shpFilename = shpFileName + "_lin.shp";
-		}
-
-		// create files
-		hSHP = SHPCreate( shpFilename.c_str(), nShapeType );
-		if( hSHP == 0 )
-		{
-			delete portalObjs;
-			return false;
-		}
-
-		TeAttributeList attList = portalObjs->AttributeList();
-		hDBF = TeCreateDBFFile(dbfFilename, attList);
-		if( hDBF == 0 )
-		{
-			delete portalObjs; 
-			return false;
-		}
-
-		TeDatabasePortal* portalGeoms = layer->database()->getPortal();
-		if (!portalGeoms)
-		{
-			delete portalObjs;
-			return false;
-		}
-
-		int count = 0;
-		if(TeProgress::instance())
-			TeProgress::instance()->setTotalSteps(portalObjs->numRows());
-		clock_t	ti, tf;
-
-		int iRecord = 0;
-		string geoid, sql2;
-		bool ok;
-		int	 nVertices, nParts, *panParts;
-		double	*padfX, *padfY;
-		SHPObject	*psObject;
-		int shpRes = 0;
-		ti = clock();
-		do 
-		{
-			geoid = portalObjs->getData(linkName);
-			nVertices = 0;
-			bool flag = true;
-			TePointSet pos;
-			TeLineSet lis;
-			TePolygonSet pols;
-			TeCellSet cells;
-			switch (nShapeType)
-			{
-			case SHPT_POINT:		// create a shapefile of points
-				sql2 = "SELECT * FROM " + layer->tableName(TePOINTS) + " WHERE object_id='" + geoid + "'";
-				ok = false;			
-				if (portalGeoms->query(sql2) && portalGeoms->fetchRow())
-				{
-					do 
-					{
-						TePoint point;
-						flag  = portalGeoms->fetchGeometry(point);
-						pos.add(point);
-						ok = true;
-					} while (flag);
-					nVertices = nParts = pos.size();
-					panParts = (int *) malloc(sizeof(int) * nParts);
-					padfX = (double *) malloc(sizeof(double) * nParts);
-					padfY = (double *) malloc(sizeof(double) * nParts);
-					for (int k=0;k<nParts;k++)
-					{
-						panParts[k] = k;
-						padfX[k] = pos[k].location().x();
-						padfY[k] = pos[k].location().y();
-					}
-					psObject = SHPCreateObject( nShapeType, -1, nParts, panParts, NULL,
-												nVertices, padfX, padfY, NULL, NULL );
-					shpRes = SHPWriteObject( hSHP, -1, psObject );
-					SHPDestroyObject( psObject );
-					free( panParts );
-					free( padfX );
-					free( padfY );
-					pos.clear();
-				}
-				portalGeoms->freeResult();
-				break;  
-			case SHPT_ARC:	// create a shapefile of lines
-				sql2 = "SELECT * FROM " + layer->tableName(TeLINES) + " WHERE object_id='" + geoid + "'";
-				ok = false;
-				int npoints;
-				if (portalGeoms->query(sql2) && portalGeoms->fetchRow())
-				{
-					npoints = 0;
-					do
-					{
-						TeLine2D line;
-						flag = portalGeoms->fetchGeometry(line);
-						lis.add(line);
-						ok = true;
-						npoints += line.size();
-					} while (flag);
-					nVertices = lis.size();
-					panParts = (int *) malloc(sizeof(int) * nVertices);
-					padfX = (double *) malloc(sizeof(double) * npoints);
-					padfY = (double *) malloc(sizeof(double) * npoints);
-					int posXY = 0;
-					for (int k=0; k<nVertices; k++)
-					{
-						int lineSize = lis[k].size();
-						panParts[k]=posXY;
-						for (int l=0; l<lineSize; l++ )
-						{
-							padfX[posXY] = lis[k][l].x();
-							padfY[posXY] = lis[k][l].y();
-							posXY++;
-						}
-					}
-					lis.clear();
-					psObject = SHPCreateObject( nShapeType, -1, nVertices, panParts, NULL,
-												posXY, padfX, padfY, NULL, NULL );
-					SHPWriteObject( hSHP, -1, psObject );
-					SHPDestroyObject( psObject );
-					free( panParts );
-					free( padfX );
-					free( padfY );
-				}
-				portalGeoms->freeResult();
-				break;
-			case SHPT_POLYGON: // create a shapefile of polygons
-				sql2 = "SELECT * FROM " + layer->tableName(TePOLYGONS) + " WHERE object_id='" + geoid + "'";
-				ok = false;
-				if (portalGeoms->query(sql2) && portalGeoms->fetchRow())
-				{
-					int totpoints;
-					nVertices = 0;
-					totpoints = 0;
-					do
-					{
-						TePolygon poly;
-						flag = portalGeoms->fetchGeometry(poly);
-						pols.add(poly);
-						ok = true;
-						nVertices += poly.size();
-						unsigned int n;
-						for (n=0; n<poly.size();n++)
-							totpoints += poly[n].size();
-					} while (flag);
-					panParts = (int *) malloc(sizeof(int) * nVertices);
-					padfX = (double *) malloc(sizeof(double) * totpoints);
-					padfY = (double *) malloc(sizeof(double) * totpoints);
-					
-					int posXY = 0;
-					int npolygons, nrings, npoints, nelem = 0;
-					npolygons = pols.size();
-					for (int k=0; k<npolygons; k++)
-					{
-						nrings = pols[k].size();
-
-						for (int l=0; l<nrings; ++l)
-						{
-							if (l==0)
-							{
-								if (TeOrientation(pols[k][l]) == TeCOUNTERCLOCKWISE)
-									TeReverseLine(pols[k][l]);
-							}
-							else
-							{
-								if (TeOrientation(pols[k][l]) == TeCLOCKWISE)
-									TeReverseLine(pols[k][l]);
-
-							}
-							
-							npoints = pols[k][l].size();
-							panParts[nelem]=posXY;
-							for (int m=0; m<npoints; m++ )
-							{
-								padfX[posXY] = pols[k][l][m].x();
-								padfY[posXY] = pols[k][l][m].y();
-								posXY++;
-							}
-							nelem++;
-						}
-					}
-					pols.clear();
-					psObject = SHPCreateObject( nShapeType, -1, nelem, panParts, NULL,
-												posXY, padfX, padfY, NULL, NULL );
-					shpRes = SHPWriteObject( hSHP, -1, psObject );
-					SHPDestroyObject( psObject );
-					free( panParts );
-					free( padfX );
-					free( padfY );
-				}
-				portalGeoms->freeResult();
-
-				// --- Cells are exported as polygons
-
-				sql2 = "SELECT * FROM " + layer->tableName(TeCELLS) + " WHERE object_id='" + geoid + "'";
-				if (portalGeoms->query(sql2) && portalGeoms->fetchRow())
-				{
-					int totpoints;
-					nVertices = 0;
-					totpoints = 0;
-					do
-					{
-						TeCell cell;
-						flag = portalGeoms->fetchGeometry(cell);
-						cells.add(cell);
-						ok = true;
-						nVertices += 1;
-						totpoints += 5;
-					} while (flag);
-					panParts = (int *) malloc(sizeof(int) * nVertices);
-					padfX = (double *) malloc(sizeof(double) * totpoints);
-					padfY = (double *) malloc(sizeof(double) * totpoints);
-					
-					int posXY = 0;
-					int ncells, nelem = 0;
-					ncells = cells.size();
-					for (int k=0; k<ncells; k++)
-					{
-						panParts[nelem]=posXY;
-						TeCell cell = cells[k];
-						TeCoord2D ll = cell.box().lowerLeft();
-						TeCoord2D ur = cell.box().upperRight();
-						padfX[posXY] = ll.x();
-						padfY[posXY] = ll.y();
-						posXY++;		
-						padfX[posXY] = ur.x();
-						padfY[posXY] = ll.y();
-						posXY++;		
-						padfX[posXY] = ur.x();
-						padfY[posXY] = ur.y();
-						posXY++;		
-						padfX[posXY] = ll.x();
-						padfY[posXY] = ur.y();
-						posXY++;		
-						padfX[posXY] = ll.x();
-						padfY[posXY] = ll.y();
-						posXY++;	
-						nelem++;
-					}
-					cells.clear();
-					psObject = SHPCreateObject( nShapeType, -1, nelem, panParts, NULL,
-												posXY, padfX, padfY, NULL, NULL );
-					SHPWriteObject( hSHP, -1, psObject );
-					SHPDestroyObject( psObject );
-					free( panParts );
-					free( padfX );
-					free( padfY );
-				}
-				portalGeoms->freeResult();
-			} // end - case geometry representation
-		
-			if (!ok)	// no geometry associated to this object
-				continue;
-
-			// write attributes
-			for (int j = 0; j < portalObjs->numFields(); j++)
-			{
-				int c = attList[j].rep_.type_;
-				if (c == TeSTRING)
-				{
-					DBFWriteStringAttribute(hDBF, iRecord, j, portalObjs->getData(j) );
-				}
-				else if (c == TeDATETIME)
-				{
-					TeTime time = portalObjs->getDate(j);
-					char dd[8];
-					sprintf(dd,"%04d%02d%02d",time.year(),time.month(),time.day());
-					DBFWriteDateAttribute(hDBF, iRecord, j, dd );
-				}
-				else if (c == TeINT)
-				{
-					DBFWriteIntegerAttribute(hDBF, iRecord, j, portalObjs->getInt(j) );
-				}
-				else if (c == TeREAL)
-				{
-					DBFWriteDoubleAttribute(hDBF, iRecord, j, portalObjs->getDouble(j));
-				}
-			}
-			iRecord++;
-			count++;
-			if (TeProgress::instance())
-			{
-				tf = clock();
-				if (((tf-ti)/CLOCKS_PER_SEC) > 3)
-					TeProgress::instance()->setProgress(count);
-				if (TeProgress::instance()->wasCancelled())
-					break;
-				ti = tf;
-			}
-		} while (portalObjs->fetchRow()); // end - for every object
-		DBFClose( hDBF );
-		SHPClose( hSHP );
-		portalObjs->freeResult();
-		delete portalGeoms;
-	} // end - for each representation
-	delete portalObjs;
-	if(TeProgress::instance())
-		TeProgress::instance()->reset();
-    return true ;
-}
-
diff --git a/src/terralib/functions/TeExportSPR.cpp b/src/terralib/functions/TeExportSPR.cpp
old mode 100644
new mode 100755
index 5b6293c..95af712
--- a/src/terralib/functions/TeExportSPR.cpp
+++ b/src/terralib/functions/TeExportSPR.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -22,7 +22,7 @@ of this library and its documentation.
 *************************************************************************************/
 
 #include "TeException.h"
-#include "TeImportExport.h"
+#include "TeDriverSPRING.h"
 #include "TeSPRFile.h"
 
 #include "TeDataTypes.h"
@@ -33,775 +33,460 @@ of this library and its documentation.
 #include "TeGeometryAlgorithms.h"
 #include "TeDatabase.h"
 #include "TeProgress.h"
+#include "TeQuerier.h"
 #include <time.h>
+#include <stdio.h>
 
 // --- Spring
 
-bool TeExportSPRMNTData			( TeLayer* layer, const string& sprFileName, const string& tabName, const string& attrQuoteName );
-bool TeExportSPRThematicData	( TeLayer* layer, const string& sprFileName, const string& tabName, const string& attThemeName );
-bool TeExportSPRNetworkData		( TeLayer* layer, const string& sprFileName, const string& objName);
-bool TeExportSPRCadastralData	( TeLayer* layer, const string& sprFileName, const string& objName);
-bool TeExportSPRTable			(TeLayer* layer, const string& sprFileName, const string& tabName, const string& objName,TeSpringModels cat);
-
-bool
-TeExportSPR (TeLayer* layer, const string& sprFileName, const string& tableName, TeSpringModels cat, const string& name)
+bool TeExportQuerierToSPRING(TeQuerier* querier, const std::string& base, TeSpringModels cat, const string& name, 
+							 TeProjection* proj)
 {
-	if (tableName.empty() || sprFileName.empty())
+	// check initial conditions
+	if (!querier || base.empty())
+		return false;
+
+	if (!querier->loadInstances())
 		return false;
-	switch (cat) 
+	
+	// try to open the files
+	std::string baseFileName = TeGetName(base.c_str());
+	TeSPRFile* sprFileSamp = 0;
+	TeSPRFile* sprFileLin = 0;
+	TeSPRFile* sprFilePt = 0;
+	TeSPRFile* sprFileLab = 0;
+	TeSPRFile* sprFileTab = 0;
+	TeSPRFile* sprFileNet = 0;
+	TeSPRFile* sprFileNetObj = 0;
+	try
 	{
-	case TeSPRMNT:
-		return TeExportSPRMNTData(layer,sprFileName,tableName, name);
-	case TeSPRThematic:
-		return TeExportSPRThematicData(layer,sprFileName,tableName,name);
-	case TeSPRNetwork:
-		if (TeExportSPRNetworkData(layer,sprFileName,name))
-			return TeExportSPRTable (layer,sprFileName,tableName,name,TeSPRNetwork);
-	default:
-		if (TeExportSPRCadastralData(layer,sprFileName,name))
-			return TeExportSPRTable (layer,sprFileName,tableName,name,TeSPRCadastral);
+		sprFileSamp = new TeSPRFile(baseFileName+"_L3D.spr", "w+");
+		sprFileLin = new TeSPRFile(baseFileName+"_L2D.spr", "w+");
+		sprFileLab = new TeSPRFile(baseFileName+"_LAB.spr", "w+");
+		sprFilePt = new TeSPRFile(baseFileName+"_P2D.spr", "w+");
+		sprFileTab = new TeSPRFile(baseFileName+"_TAB.spr", "w+");
+		sprFileNet = new TeSPRFile(baseFileName+"_NET.spr", "w+");
+		sprFileNetObj = new TeSPRFile(baseFileName+"_NETOBJ.spr", "w+");
+	}
+	catch (...)
+	{
+		return false;
 	}
-	return false;
-}
 
-bool TeExportSPRMNTData( TeLayer* layer, const string& sprFileName, const string& tabName, const string& attrQuoteName )
-{
-	clock_t	ti, tf;
-	int count;
-	TeDatabasePortal* portal = 0;
-	try{
-		
-		TeSPRFile sprFile ( sprFileName+".spr", "w+" );
-
-		if (attrQuoteName.empty() || tabName.empty())
-			return false;
-
-		if (!(layer->hasGeometry(TePOINTS) || 
-			layer->hasGeometry(TeLINES)))
-			return false;
-
-		// check if layer has the attribute table
-		TeTable tableE;
-		if (!layer->getAttrTablesByName(tabName,tableE))
-			return false;
-		string linkName = tableE.linkName();
-		if (linkName.empty())
-			return false;
-
-		TeDatabasePortal* portal = layer->database()->getPortal();
-		if (!portal)
-			return false;
-
-		// DTM/Network data can have POINTS 3D or contour line 3D, so the
-		// header SAMPLE should be written only once 
-		sprFile.writeSampleHeader();
-		if ( layer->projection() )
-			sprFile.writeProjection ( layer->projection() );
-		sprFile.writeBox ( layer->box() );
-		sprFile.writeInfoEnd();
-
-		string sql = "SELECT attT." + attrQuoteName + ", geoT.* FROM " + tabName + " attT, ";
-		bool flag = true;
-		if (layer->hasGeometry(TeLINES))
+	// verify if the specific column is present
+	unsigned int qpos = 0;
+	unsigned int aa = 0;
+	unsigned int nattr;
+	TeAttributeList qAttList = querier->getAttrList();
+	nattr = qAttList.size();
+	for (aa=0; aa<nattr; ++aa)
+	{
+		if (qAttList[aa].rep_.name_ == name)
 		{
-			sql += layer->tableName(TeLINES) + " geoT ";
-			sql += " WHERE attT." + linkName + "= geoT.object_id";
-			if (portal->query(sql) && portal->fetchRow())
-			{
-				if(TeProgress::instance())
-					TeProgress::instance()->setTotalSteps(portal->numRows());
-				ti = clock();
-				count = 0;
-				do 
-				{
-					TeLine2D line;
-					double quote = portal->getDouble(0);
-					flag = portal->fetchGeometry(line);
-					if (!line.empty())
-					{	
-						sprFile.writeLine3DHeader();
-						sprFile.writeSampleQuote( quote );
-						for (unsigned int k=0; k<line.size(); k++ )
-							sprFile.writePoint ( line[k] );
-						sprFile.writeEnd();
-					}
-					count++;
-					if (TeProgress::instance())
-					{
-						tf = clock();
-						if (((tf-ti)/CLOCKS_PER_SEC) > 3)
-							TeProgress::instance()->setProgress(count);
-						if (TeProgress::instance()->wasCancelled())
-							break;
-						ti = tf;
-					}
-				} while(flag);
-				if (count)
-					sprFile.writeEnd();
-			}
-			portal->freeResult();
+			qpos = aa;
+			break;
 		}
-		if (layer->hasGeometry(TePOINTS))
-		{
-			sql += layer->tableName(TePOINTS) + " geoT ";
-			sql += " WHERE attT." + linkName + "= geoT.object_id";
-			if (portal->query(sql) && portal->fetchRow())
-			{
-				if(TeProgress::instance())
-					TeProgress::instance()->setTotalSteps(portal->numRows());
-				ti = clock();
-				count = 0;
-				do 
-				{
-					TePoint xy;
-					if (count == 0)
-						sprFile.writePoint3DHeader();
-
-					double quote = portal->getDouble(0);
-					flag = portal->fetchGeometry(xy);
-
-					sprFile.writePoint3D( xy.location().x(), xy.location().y(), quote );
-					count++;
-					if (TeProgress::instance())
-					{
-						tf = clock();
-						if (((tf-ti)/CLOCKS_PER_SEC) > 3)
-							TeProgress::instance()->setProgress(count);
-						if (TeProgress::instance()->wasCancelled())
-							break;
-						ti = tf;
-					}
-				} while (flag);
-				if (count)
-					sprFile.writeEnd();
-			}
-		}
-		delete portal;
-		return true;
+	}	
+	if (cat != TeSPRNetwork && cat != TeSPRThematic && qpos == nattr)
+		return false;	
+	
+	// write headers
+	sprFileNet->writeString("NETWORK\n");
+	sprFileSamp->writeString("SAMPLE\n");
+	sprFileLin->writeString("LINES\n");
+	sprFilePt->writeString("POINT2D\n");
+	sprFileLab->writeString("POINTS\n");
+	sprFileNetObj->writeString("NETWORK_OBJECTS\n");
+
+	sprFileNet->writeString("INFO\n");
+	sprFileSamp->writeString("INFO\n");
+	sprFileLin->writeString("INFO\n");
+	sprFilePt->writeString("INFO\n");
+	sprFileLab->writeString("INFO\n");	
+	sprFileNetObj->writeString("INFO\n");
+	if (proj)
+	{
+		string projs = "// " + proj->name() + " " + proj->describe() + " DATUM "+ proj->datum().name() + "\n";
+		sprFileSamp->writeString(projs);
+		sprFileLin->writeString(projs);
+		sprFilePt->writeString(projs);
+		sprFileLab->writeString(projs);
+		sprFileNet->writeString(projs);
+		sprFileNetObj->writeString(projs);
 	}
-	catch(...)
+	TeBox bb = querier->getBox();
+	if (bb.isValid())
 	{
-		if (portal)
-			delete portal;
-		return false;
+		sprFileSamp->writeBox(bb);
+		sprFileLin->writeBox(bb);
+		sprFilePt->writeBox(bb);
+		sprFileLab->writeBox(bb);
+		sprFileNet->writeBox(bb);
+		sprFileNetObj->writeBox(bb);
 	}
-	if(TeProgress::instance())
-		TeProgress::instance()->reset();
-}
-
-bool TeExportSPRThematicData( TeLayer* layer, const string& sprFileName, const string& tabName, const string& attThemeName )
-{
-	if (attThemeName.empty() || tabName.empty())
-		return false;
-
-	if (!layer || !(layer->hasGeometry(TePOINTS) || layer->hasGeometry(TeLINES) || 
-		            layer->hasGeometry(TePOLYGONS) || layer->hasGeometry(TeCELLS)))
-		return false;
-
-	// check if layer has the attribute table
-	TeTable tableE;
-	if (!layer->getAttrTablesByName(tabName,tableE))
-		return false;
-	string linkName = tableE.linkName();
-	if (linkName.empty())
-		return false;
-
-	TeDatabasePortal* portal=0;
-	clock_t	ti, tf;
-	int count;
-
-	try{
-		portal = layer->database()->getPortal();
-		if (!portal)
-			return false;
-		TeSPRFile sprFile ( sprFileName+".spr", "w+" );
-		
-		unsigned int k;
-		bool flag = true;
-		
-		string sql = "SELECT attT." + attThemeName + ", geoT.* FROM " + tabName + " attT, ";
-		if (layer->hasGeometry(TePOINTS))
+	sprFileLab->writeString("SEPARATOR ;\n");
+	sprFileNetObj->writeString("SEPARATOR ;\n");
+	if (cat == TeSPRThematic || cat == TeSPRNetwork || cat == TeSPRCadastral)
+		sprFilePt->writeString("SEPARATOR ;\n");
+
+	sprFileSamp->writeInfoEnd();
+	sprFileLin->writeInfoEnd();
+	sprFilePt->writeInfoEnd();
+	sprFileLab->writeInfoEnd();
+	sprFileNet->writeInfoEnd();
+	sprFileNetObj->writeInfoEnd();
+
+	if (cat == TeSPRNetwork || cat == TeSPRCadastral)
+	{
+		sprFileTab->writeTableHeader(cat);
+		sprFileTab->writeString("CATEGORY_OBJ "); 	
+		sprFileTab->writeString(name); 
+		sprFileTab->writeString("\n"); 
+		sprFileTab->writeString("T_KEY ; TEXT; 50; 0\n");
+		sprFileTab->writeString("T_NAME ; TEXT; 50; 0\n");
+		TeAttributeList::iterator it = qAttList.begin();
+		for ( ;it != qAttList.end();++it )
 		{
-			sql += layer->tableName(TePOINTS) + " geoT ";
-			sql += " WHERE attT." + linkName + "= geoT.object_id";
-			if(portal->query(sql) && portal->fetchRow())
+			switch ((*it).rep_.type_)
 			{
-				if(TeProgress::instance())
-					TeProgress::instance()->setTotalSteps(portal->numRows());
-				ti = clock();
-				count = 0;
-				do 
-				{
-					if (count==0)
-					{
-						sprFile.writePointsHeader ( );
-						sprFile.writeProjection ( layer->projection() );
-						sprFile.writeBox ( layer->box() );
-						sprFile.writeInfoEnd();
-					}
-					string theme = portal->getData(attThemeName);
-					TePoint xy;
-					flag = portal->fetchGeometry(xy);
-					sprFile.writeThematicPoint(xy.location().x(), xy.location().y(), theme );
-					count++;
-					if (TeProgress::instance())
-					{
-						tf = clock();
-						if (((tf-ti)/CLOCKS_PER_SEC) > 3)
-							TeProgress::instance()->setProgress(count);
-						if (TeProgress::instance()->wasCancelled())
-							break;
-						ti = tf;
-					}
-				} while (flag);
+				case TeSTRING:
+					sprFileTab->writeTextParameterInfo((*it).rep_.name_, (*it).rep_.numChar_);
+					break;
+				case TeREAL:
+					sprFileTab->writeRealParameterInfo((*it).rep_.name_);
+					break;
+				case TeINT:
+					sprFileTab->writeIntParameterInfo((*it).rep_.name_);
+					break;
+				case TeCHARACTER:
+					sprFileTab->writeTextParameterInfo((*it).rep_.name_,1);
+					break;
+				case TeDATETIME:
+					sprFileTab->writeTextParameterInfo((*it).rep_.name_,25);
+				default:
+					break;
 			}
-			portal->freeResult();
-			if (count)
-				sprFile.writeEnd();
-		}
-		if (!layer->hasGeometry(TeLINES) && !layer->hasGeometry(TePOLYGONS) && !layer->hasGeometry(TeCELLS))
-		{
-			delete portal;
-			sprFile.writeEnd();
-			return true;
-		}
-		count = 0;
-		TeSPRFile labelFile(sprFileName+"_LAB.spr", "w+");
-		if (layer->hasGeometry(TeLINES))
+		}  
+		sprFileTab->writeInfoEnd();
+	}
+    
+	// variaveis auxiliares
+	TePolygonSet	objectPols;		// polygons of the region
+	TeLineSet		objectLines;	// lines of the region
+	TePointSet		objectPoints;	// points of the region
+	TeCellSet		objectCells;	// points of the region
+	unsigned int nlines2d=0, npoints2d=0, nsamps=0, nlabs=0, ntabs=0, nnetlines=1, nnetlabs=0;
+
+	bool writePointHeader = true;
+	bool endPointHeader = false;
+	unsigned int k, l;
+	unsigned int nIProcessed = 0;
+	TeSTInstance st;
+	string val;
+	clock_t	t0, t1, t2;
+	t2 = clock();
+	t0 = t1 = t2;
+	int dt = CLOCKS_PER_SEC/2;
+	int dt2 = CLOCKS_PER_SEC; //* .000001;
+	while(querier->fetchInstance(st))
+	{
+		if (st.hasPolygons())
+			objectPols = st.getPolygons();
+		if (st.hasCells())
+			objectCells = st.getCells();
+		if (st.hasLines())
+			objectLines = st.getLines();
+		if (st.hasPoints())
+			objectPoints = st.getPoints();
+
+		if (cat == TeSPRMNT ) 
 		{
-			sql += layer->tableName(TeLINES) + " geoT ";
-			sql += " WHERE attT." + linkName + "= geoT.object_id";
-			if (portal->query(sql) && portal->fetchRow())
+			st.getPropertyValue(val,qpos);
+			if (!objectLines.empty() && endPointHeader)
 			{
-				if(TeProgress::instance())
-					TeProgress::instance()->setTotalSteps(portal->numRows());
-				ti = clock();
-				count = 0;
-				do{
-					string theme = portal->getData(0);
-					TeLine2D line;
-					flag = portal->fetchGeometry(line);
-					if (!line.empty())
-					{
-						if (count == 0)
-						{
-							sprFile.writeLinesHeader ( );
-							if ( layer->projection() )
-								sprFile.writeProjection ( layer->projection() );
-							sprFile.writeBox ( layer->box() );
-							sprFile.writeInfoEnd();
-							labelFile.writeLabelHeader(TeSPRThematic);
-						}
-
-						for (k=0; k<line.size(); k++ )
-							sprFile.writePoint ( line[k] );
-						sprFile.writeEnd();
-						TeCoord2D pt = TeFindCentroid( line );
-						labelFile.writeThematicLabel(pt.x(), pt.y(),theme);
-						count++;
-						if (TeProgress::instance())
-						{
-							tf = clock();
-							if (((tf-ti)/CLOCKS_PER_SEC) > 3)
-								TeProgress::instance()->setProgress(count);
-							if (TeProgress::instance()->wasCancelled())
-								break;
-							ti = tf;
-						}
-					}
-				} while (flag);
+				sprFileSamp->writeEnd();
+				endPointHeader = false;
 			}
-			portal->freeResult();
-		}
 
-		if (layer->hasGeometry(TePOLYGONS))
-		{
-			sql += layer->tableName(TePOLYGONS) + " geoT ";
-			sql += " WHERE attT." + linkName + "= geoT.object_id";
-			if (portal->query(sql) && portal->fetchRow())
+			for (aa=0; aa<objectLines.size(); ++aa)
 			{
-				if(TeProgress::instance())
-					TeProgress::instance()->setTotalSteps(portal->numRows());
-				ti = clock();
-				count = 0;
-				do 
-				{
-					string theme = portal->getData(0);
-					TePolygon poly;
-					flag = portal->fetchGeometry(poly);
-					if (!poly.empty())
-					{
-						if (count == 0)
-						{
-							sprFile.writeLinesHeader ( );
-							if ( layer->projection() )
-								sprFile.writeProjection ( layer->projection() );
-							sprFile.writeBox ( layer->box() );
-							sprFile.writeInfoEnd();
-							labelFile.writeLabelHeader(TeSPRThematic);
-						}
-						for (k = 0; k < poly.size(); k++ )
-						{
-							TeLinearRing ring = poly[k]; 
-							
-							for (unsigned int l = 0 ; l < ring.size(); l++)
-								sprFile.writePoint ( ring[l] );
-							sprFile.writeEnd();
-						}
-
-						TeCoord2D pt = TeFindCentroid( poly );
-						labelFile.writeThematicLabel(pt.x(), pt.y(),theme);
-						count++;
-						if (TeProgress::instance())
-						{
-							tf = clock();
-							if (((tf-ti)/CLOCKS_PER_SEC) > 3)
-								TeProgress::instance()->setProgress(count);
-							if (TeProgress::instance()->wasCancelled())
-								break;
-							ti = tf;
-						}
-					}
-				} while (flag);
+				sprFileSamp->writeLine3DHeader();
+				sprFileSamp->writeString("HEIGHT ");
+				sprFileSamp->writeString(val);
+				sprFileSamp->writeString("\n");
+				for (l=0; l<objectLines[aa].size(); ++l)
+					sprFileSamp->writePoint(objectLines[aa][l]);
+				sprFileSamp->writeEnd();
+				++nsamps;
+			}
+			if (!objectPoints.empty() && writePointHeader)
+			{
+				sprFileSamp->writeString("POINT3D\n");
+				writePointHeader = false;
+				endPointHeader = true;
+			}
+			for (aa=0; aa<objectPoints.size(); ++aa)
+			{
+				sprFileSamp->writePoint3D(objectPoints[aa].location().x(), objectPoints[aa].location().y(), atof(val.c_str()));
+				++nsamps;
 			}
-			portal->freeResult();
 		}
-
-		if (layer->hasGeometry(TeCELLS))
+		else if (cat == TeSPRThematic)
 		{
-			sql += layer->tableName(TeCELLS) + " geoT ";
-			sql += " WHERE attT." + linkName + "= geoT.object_id";
-			if (portal->query(sql) && portal->fetchRow())
+			st.getPropertyValue(val,qpos);
+			for (aa=0; aa<objectLines.size(); ++aa)
 			{
-				if(TeProgress::instance())
-					TeProgress::instance()->setTotalSteps(portal->numRows());
-				ti = clock();
-				count = 0;
-				do 
+				for (l=0; l<objectLines[aa].size(); ++l)
+					sprFileLin->writePoint(objectLines[aa][l]);
+				sprFileLin->writeString("END\n");	
+				TeCoord2D pt = TeFindCentroid(objectLines[aa]);
+				sprFileLab->writeThematicLabel(pt.x(), pt.y(),val);
+				++nlines2d;
+				++nlabs;
+			}
+			for (aa=0; aa<objectPols.size(); ++aa)
+			{
+				for (l=0; l<objectPols[aa].size(); ++l)
 				{
-					string theme = portal->getData(0);
-					TeCell cell;
-					flag = portal->fetchGeometry(cell);
-					if (count == 0)
-					{
-						sprFile.writeLinesHeader ( );
-						if ( layer->projection() )
-							sprFile.writeProjection ( layer->projection() );
-						sprFile.writeBox ( layer->box() );
-						sprFile.writeInfoEnd();
-						labelFile.writeLabelHeader(TeSPRThematic);
-					}
-					TeCoord2D ll = cell.box().lowerLeft();
-					TeCoord2D ur = cell.box().upperRight();
-					sprFile.writePoint (ll);
-                    TeCoord2D p1(ur.x(), ll.y());
-					sprFile.writePoint (p1);
-					sprFile.writePoint (ur);
-                    TeCoord2D p2(ll.x(),ur.y());                   
-					sprFile.writePoint (p2);
-					sprFile.writePoint (ll);
-					sprFile.writeEnd();
-					TeCoord2D pt = TeFindCentroid(cell);
-					labelFile.writeThematicLabel(pt.x(), pt.y(),theme);
-					count++;
-					if (TeProgress::instance())
-					{
-						tf = clock();
-						if (((tf-ti)/CLOCKS_PER_SEC) > 3)
-							TeProgress::instance()->setProgress(count);
-						if (TeProgress::instance()->wasCancelled())
-							break;
-						ti = tf;
-					}
-				} while (flag);
+					for (k=0; k<objectPols[aa][l].size(); ++k)
+						sprFileLin->writePoint(objectPols[aa][l][k]);
+					sprFileLin->writeString("END\n");
+				}
+				TeCoord2D pt = TeFindCentroid(objectPols[aa]);
+				sprFileLab->writeThematicLabel(pt.x(),pt.y(),val);
+				++nlines2d;
+				++nlabs;
+			}
+			for (aa=0; aa<objectPoints.size(); ++aa)
+			{
+				sprFilePt->writeThematicLabel(objectPoints[aa].location().x(), objectPoints[aa].location().y(),val);
+				++npoints2d;
 			}
-			portal->freeResult();
-		}
-		sprFile.writeEnd();
-		labelFile.writeEnd();
-		delete portal;
-		return true;
-	}
-	catch(...)
-	{
-		if (portal)
-			delete portal;
-		return false;
-	}
-	if(TeProgress::instance())
-		TeProgress::instance()->reset();
-}
-
-
-bool TeExportSPRNetworkData(TeLayer* layer, const string& sprFileName, const string& objName)
-{
-	if (!layer || !(layer->hasGeometry(TePOINTS) || layer->hasGeometry(TeLINES)) )
-		return false;
 
-	TeDatabasePortal* portal = layer->database()->getPortal();
-	if (!portal)
-		return false;
-	clock_t	ti,tf;
-	int count;
-
-	try{
-		TeSPRFile sprFile ( sprFileName+".spr", "w+" );
-		sprFile.writeNetworkHeader();
-		if ( layer->projection() )
-			sprFile.writeProjection ( layer->projection() );
-		sprFile.writeBox ( layer->box() );
-		sprFile.writeInfoEnd();
-		bool flag;	;
-		if (layer->hasGeometry(TeLINES))
-		{
-			string sql = "SELECT * FROM " + layer->tableName(TeLINES);
-			if (portal->query(sql) && portal->fetchRow())
-			{		
-				if(TeProgress::instance())
-					TeProgress::instance()->setTotalSteps(portal->numRows());
-				ti = clock();
-				TeSPRFile labelFile(sprFileName+"_LAB.spr", "w+");
-				do 
-				{
-					TeLine2D line;
-					string objid = portal->getData("object_id");
-					flag = portal->fetchGeometry(line);
-					if (!line.empty())
-					{
-						sprFile.writeNetworkLineHeader(count++);
-						unsigned int k;
-						for (k=0; k<line.size(); k++ )
-							sprFile.writePoint ( line[k] );
-						sprFile.writeEnd();
-						if (count==0)
-							labelFile.writeLabelHeader(TeSPRNetwork);
-						TeCoord2D pt = TeFindCentroid( line );
-						labelFile.writeNetworkLabel(objid,pt.x(), pt.y(),objName);
-						count++;
-					}
-					count++;
-					if (TeProgress::instance())
-					{
-						tf = clock();
-						if (((tf-ti)/CLOCKS_PER_SEC) > 3)
-							TeProgress::instance()->setProgress(count);
-						if (TeProgress::instance()->wasCancelled())
-							break;
-						ti = tf;
-					}
-				}while (flag);
-				if (count>0)
-				{
-					sprFile.writeEnd();	 
-					labelFile.writeEnd();
-				}			
+			for (aa=0; aa<objectCells.size(); ++aa)
+			{
+				TeCoord2D ll = objectCells[aa].box().lowerLeft();
+				TeCoord2D ur = objectCells[aa].box().upperRight();
+				sprFileLin->writePoint (ll);
+                TeCoord2D p1(ur.x(), ll.y());
+				sprFileLin->writePoint (p1);
+				sprFileLin->writePoint (ur);
+                TeCoord2D p2(ll.x(),ur.y());                   
+				sprFileLin->writePoint (p2);
+				sprFileLin->writePoint (ll);
+				sprFileLin->writeEnd();
+				TeCoord2D pt = TeFindCentroid(objectCells[aa]);
+				sprFileLab->writeThematicLabel(pt.x(),pt.y(),val);
+				++nlines2d;
+				++nlabs;
 			}
-			portal->freeResult();
 		}
-	}
-	catch (...)
-	{
-		delete portal;
-		return false;
-	}
-	delete portal;
-	if(TeProgress::instance())
-		TeProgress::instance()->reset();
-	return true;
-}
-
-bool TeExportSPRCadastralData( TeLayer* layer, const string& sprFileName, const string& objName)
-{
-	if (!layer || !(layer->hasGeometry(TePOINTS) || layer->hasGeometry(TeLINES) || 
-					layer->hasGeometry(TePOLYGONS) || layer->hasGeometry(TeCELLS)))
-		return false;
-
-	TeDatabasePortal* portal= layer->database()->getPortal();
-	if (!portal)
-		return false;
-	bool flag;
-	clock_t	ti, tf;
-	int count = 0;
-	unsigned int k;
-	try {
-		
-		TeSPRFile sprFile ( sprFileName+".spr", "w+" );
-		if (layer->hasGeometry(TePOINTS))
+		else if (cat == TeSPRNetwork)
 		{
-			string sql = "SELECT * FROM " + layer->tableName(TePOINTS);
-			if (portal->query(sql) && portal->fetchRow())
+			for (aa=0; aa<objectLines.size(); ++aa)
 			{
-				if(TeProgress::instance())
-					TeProgress::instance()->setTotalSteps(portal->numRows());
-				ti = clock();
-				do
-				{
-					if (count==0)
-					{
-						sprFile.writePointsHeader ( );
-						sprFile.writeProjection ( layer->projection() );
-						sprFile.writeBox ( layer->box() );
-						sprFile.writeInfoEnd();
-					}
-					string objid = portal->getData("object_id");
-					TePoint xy;
-					flag = portal->fetchGeometry(xy);
-					sprFile.writeCadastralLabel(objid,xy.location().x(), xy.location().y(),objName);
-					count++;
-					if (TeProgress::instance())
-					{
-						tf = clock();
-						if (((tf-ti)/CLOCKS_PER_SEC) > 3)
-							TeProgress::instance()->setProgress(count);
-						if (TeProgress::instance()->wasCancelled())
-							break;
-						ti = tf;
-					}
-				} while (flag);
-				if (count)
-					sprFile.writeEnd();
+				sprFileNet->writeNetworkLineHeader(nnetlines);
+				for (l=0; l<objectLines[aa].size(); ++l)
+					sprFileNet->writePoint(objectLines[aa][l]);
+				sprFileNet->writeString("END\n");	
+				TeCoord2D pt = TeFindCentroid(objectLines[aa]);
+				sprFileNetObj->writeNetworkLabel(st.objectId(),pt.x(), pt.y(),name);
+				++nnetlines;
+				++nnetlabs;
+			}
+			
+			for (aa=0; aa<objectPoints.size(); ++aa)
+			{
+				sprFileNetObj->writeNetworkLabel(st.objectId(),objectPoints[aa].location().x(), objectPoints[aa].location().y(),name,false);
+				++nnetlabs;
 			}
-			portal->freeResult();
 		}
-
-		count = 0;
-		// if layer has lines, polygons or cells there should be one more file with labels
-		if (layer->hasGeometry(TeLINES) || layer->hasGeometry(TePOLYGONS)|| layer->hasGeometry(TeCELLS))
+		else 
 		{
-			TeSPRFile labelFile(sprFileName+"_LAB.spr", "w+");
-			if (layer->hasGeometry(TeLINES))
+			for (aa=0; aa<objectLines.size(); ++aa)
 			{
-				string sql = "SELECT * FROM " + layer->tableName(TeLINES);
-				if (portal->query(sql) && portal->fetchRow())
-				{
-					if(TeProgress::instance())
-						TeProgress::instance()->setTotalSteps(portal->numRows());
-					ti = clock();
-					do 
-					{
-						string objid = portal->getData("object_id");
-						TeLine2D line;
-						flag = portal->fetchGeometry(line);
-						if (!line.empty())
-						{
-							if (count == 0)
-							{
-								sprFile.writeLinesHeader ( );
-								if ( layer->projection() )
-									sprFile.writeProjection ( layer->projection() );
-								sprFile.writeBox ( layer->box() );
-								sprFile.writeInfoEnd();
-								labelFile.writeLabelHeader(TeSPRCadastral);
-							}
-							for (k=0; k<line.size(); k++ )
-								sprFile.writePoint ( line[k] );
-							sprFile.writeEnd();
-							TeCoord2D xy = TeFindCentroid( line );
-							labelFile.writeCadastralLabel(objid,xy.x(), xy.y(),objName);
-						} // end - polygon is not empty
-						count++;
-						if (TeProgress::instance())
-						{
-							tf = clock();
-							if (((tf-ti)/CLOCKS_PER_SEC) > 3)
-								TeProgress::instance()->setProgress(count);
-							if (TeProgress::instance()->wasCancelled())
-								break;
-							ti = tf;
-						}
-					} while (flag); // end - for every record
-				} // end - if there is any record
-			} // end - if has lines
-			portal->freeResult();
-			if (layer->hasGeometry(TePOLYGONS))
-			{
-				string sql = "SELECT * FROM " + layer->tableName(TePOLYGONS);
-				if (portal->query(sql) && portal->fetchRow())
-				{
-					if(TeProgress::instance())
-						TeProgress::instance()->setTotalSteps(portal->numRows());
-					ti = clock();
-					do 
-					{
-						string objid = portal->getData("object_id");
-						TePolygon poly;
-						flag = portal->fetchGeometry(poly);
-						if (!poly.empty())
-						{
-							if (count == 0)
-							{
-								sprFile.writeLinesHeader ( );
-								if ( layer->projection() )
-									sprFile.writeProjection ( layer->projection() );
-								sprFile.writeBox ( layer->box() );
-								sprFile.writeInfoEnd();
-								labelFile.writeLabelHeader(TeSPRCadastral);
-							}
-							for (k = 0; k < poly.size(); k++ )
-							{
-								TeLinearRing ring = poly[k]; 			
-								for (unsigned int l = 0 ; l < ring.size(); l++)
-									sprFile.writePoint ( ring[l] );
-								sprFile.writeEnd();
-							}
-							TeCoord2D xy = TeFindCentroid( poly );
-							labelFile.writeCadastralLabel(objid,xy.x(), xy.y(),objName);
-						} // end - poly not empty
-						count++;
-						if (TeProgress::instance())
-						{
-							tf = clock();
-							if (((tf-ti)/CLOCKS_PER_SEC) > 3)
-								TeProgress::instance()->setProgress(count);
-							if (TeProgress::instance()->wasCancelled())
-								break;
-							ti = tf;
-						}
-					} while (flag); // end - for every record
-				} // end - has any record
-			} // end - if has polygons
-			portal->freeResult();
-			if (layer->hasGeometry(TeCELLS))
+				for (l=0; l<objectLines[aa].size(); ++l)
+					sprFileLin->writePoint(objectLines[aa][l]);
+				sprFileLin->writeString("END\n");	
+				TeCoord2D pt = TeFindCentroid(objectLines[aa]);
+				sprFileLab->writeCadastralLabel(st.objectId(),pt.x(), pt.y(),name);
+				++nlines2d;
+				++nlabs;
+			}
+			for (aa=0; aa<objectPols.size(); ++aa)
 			{
-				string sql = "SELECT * FROM " + layer->tableName(TeCELLS);
-				if (portal->query(sql) && portal->fetchRow())
+				for (l=0; l<objectPols[aa].size(); ++l)
 				{
-					if(TeProgress::instance())
-						TeProgress::instance()->setTotalSteps(portal->numRows());
-					ti = clock();
-					do 
-					{
-						string objid = portal->getData("object_id");
-						TeCell cell;
-						flag = portal->fetchGeometry(cell);
-						if (count == 0)
-						{
-							sprFile.writeLinesHeader ( );
-							if ( layer->projection() )
-								sprFile.writeProjection ( layer->projection() );
-							sprFile.writeBox ( layer->box() );
-							sprFile.writeInfoEnd();
-							labelFile.writeLabelHeader(TeSPRCadastral);
-						}
-						TeCoord2D ll = cell.box().lowerLeft();
-						TeCoord2D ur = cell.box().upperRight();
-						sprFile.writePoint (ll);
-                        TeCoord2D p1(ur.x(),ll.y());
-						sprFile.writePoint (p1);
-						sprFile.writePoint (ur);
-                        TeCoord2D p2(ll.x(),ur.y());
-						sprFile.writePoint (p2);
-						sprFile.writePoint (ll);
-						sprFile.writeEnd();
-						TeCoord2D xy = TeFindCentroid(cell);
-						labelFile.writeCadastralLabel(objid,xy.x(), xy.y(),objName);
-						count++;
-						if (TeProgress::instance())
-						{
-							tf = clock();
-							if (((tf-ti)/CLOCKS_PER_SEC) > 3)
-								TeProgress::instance()->setProgress(count);
-							if (TeProgress::instance()->wasCancelled())
-								break;
-							ti = tf;
-						}
-					} while (flag);
+					for (k=0; k<objectPols[aa][l].size(); ++k)
+						sprFileLin->writePoint(objectPols[aa][l][k]);
+					sprFileLin->writeString("END\n");
 				}
+				TeCoord2D pt = TeFindCentroid(objectPols[aa]);
+				sprFileLab->writeCadastralLabel(st.objectId(),pt.x(), pt.y(),name);
+				++nlines2d;
+				++nlabs;
 			}
-			portal->freeResult();
-			if (count>0)
+			for (aa=0; aa<objectPoints.size(); ++aa)
 			{
-				sprFile.writeEnd();
-				labelFile.writeEnd();
+				sprFilePt->writeCadastralLabel(st.objectId(),objectPoints[aa].location().x(), objectPoints[aa].location().y(),name);
+				++npoints2d;
 			}
-		} // end - if has lines or polygons
-		delete portal;
-		return true;
-	}
-	catch (...)
-	{
-		delete portal;
-		return true;
+
+			for (aa=0; aa<objectCells.size(); ++aa)
+			{
+				TeCoord2D ll = objectCells[aa].box().lowerLeft();
+				TeCoord2D ur = objectCells[aa].box().upperRight();
+				sprFileLin->writePoint (ll);
+                TeCoord2D p1(ur.x(), ll.y());
+				sprFileLin->writePoint (p1);
+				sprFileLin->writePoint (ur);
+                TeCoord2D p2(ll.x(),ur.y());                   
+				sprFileLin->writePoint (p2);
+				sprFileLin->writePoint (ll);
+				sprFileLin->writeEnd();
+				TeCoord2D pt = TeFindCentroid(objectCells[aa]);
+				sprFileLab->writeCadastralLabel(st.objectId(),pt.x(), pt.y(),name);
+				++nlines2d;
+				++nlabs;
+			}
+		}
+		if (cat == TeSPRNetwork || cat == TeSPRCadastral)
+		{
+			string attline = st.objectId() + "; " + st.objectId();
+			for (aa=0; aa<nattr; ++aa)
+			{		
+				st.getPropertyValue(val,aa);
+				attline += "; ";
+				attline += val;
+			}
+			sprFileTab->writeString(attline);
+			sprFileTab->writeNewLine();
+			++ntabs;
+		}
+		++nIProcessed;
+		t2 = clock();
+		if (TeProgress::instance() && int(t2-t1) > dt)
+		{
+			t1 = t2;
+			if(((int)(t2-t0) > dt2))
+			{
+				if (TeProgress::instance()->wasCancelled())
+					break;
+				else
+					TeProgress::instance()->setProgress(nIProcessed);
+			}
+		}
 	}
-	if(TeProgress::instance())
-		TeProgress::instance()->reset();
-}
 
-bool TeExportSPRTable(TeLayer* layer, const string& sprFileName, const string& tabName, const string& objName, TeSpringModels cat)
-{
-	if (!layer || tabName.empty() || sprFileName.empty())
-		return false;
+	if (endPointHeader)
+		sprFileSamp->writeString("END\n");
 
-	string obj;
-	if (objName.empty())
-		obj = "Objeto";
+	vector<string> filesToDelete;
+	if (nnetlines == 1)
+		filesToDelete.push_back(sprFileNet->name());
 	else
-		obj = objName;
+		sprFileNet->writeEnd();
 
-	// check if layer has the attribute table
-	TeTable tableE;
-	if (!layer->getAttrTablesByName(tabName,tableE))
-		return false;
-	int index = tableE.attrLinkPosition();
-	if (index < 0)
-		return false;
+	if (nnetlabs == 0)
+		filesToDelete.push_back(sprFileNetObj->name());
+	else
+		sprFileNetObj->writeEnd();
+
+	if (nlines2d == 0)
+		filesToDelete.push_back(sprFileLin->name());
+	else
+		sprFileLin->writeEnd();
+
+	if (npoints2d==0)
+		filesToDelete.push_back(sprFilePt->name());
+	else
+		sprFilePt->writeEnd();
+
+	if (nsamps==0)
+		filesToDelete.push_back(sprFileSamp->name());
+	else
+		sprFileSamp->writeEnd();
+
+	if (ntabs==0)
+		filesToDelete.push_back(sprFileTab->name());
+	else
+		sprFileTab->writeEnd();
+
+	if (nlabs==0)
+		filesToDelete.push_back(sprFileLab->name());
+	else
+		sprFileLab->writeEnd();
+
+	delete sprFileLab;
+	delete sprFilePt;
+	delete sprFileLin;
+	delete sprFileTab;
+	delete sprFileSamp;
+	delete sprFileNet;
+	delete sprFileNetObj;
+
+	for (unsigned s=0; s<filesToDelete.size();++s)
+		remove(filesToDelete[s].c_str());
+
+	if (TeProgress::instance())
+		TeProgress::instance()->reset();
+	return true;
+}
 
-	// Try to get the table
-	TeDatabasePortal* portal = layer->database()->getPortal();
-	if (!portal)
+bool
+TeExportSPR (TeLayer* layer, const string& sprFileName, const string& tableName, TeSpringModels cat, const string& name)
+{
+	if (tableName.empty() || sprFileName.empty())
 		return false;
 
-	string sql = "SELECT * FROM " + tabName;
-	if (!portal->query(sql))
-	{
-		delete portal;
+  	if (!layer)
 		return false;
-	}
 
-	// retrieve the attribute information 
-	TeAttributeList attInfo = portal->AttributeList();
-
-	TeSPRFile tabFile(sprFileName+"_TAB.spr", "w+");
-
-	// write the attribute information ( skip the index if exists)
-	tabFile.writeTableHeader( cat );
-	tabFile.writeAttributeInfo (attInfo, obj, tableE.linkName());
-	tabFile.writeInfoEnd();
-	if(TeProgress::instance())
-		TeProgress::instance()->setTotalSteps(portal->numRows());
-	int count = 0;
-	clock_t	ti, tf;
-	ti = clock();
-	while (portal->fetchRow())
-	{	
-		TeTableRow row;
-		for (int j = 0; j < portal->numFields(); j++)
-			row.push_back ( portal->getData (j) ); 
-
-		string label = row[index];
-		tabFile.writeGeoId (label);
-		for (unsigned int col = 0; col < row.size(); col++)
-		{
-			if ( col == (unsigned int) index )						// skip the index - already written
-				continue;		
-			tabFile.writeValue(row[col], attInfo[col].rep_.type_); // write the value
-		}
-		tabFile.writeNewLine();
-		count++;
-		if (TeProgress::instance())
+	string fbase = sprFileName;
+	if (sprFileName.empty())
+		fbase = layer->name();
+
+	TeTheme* tempTheme = new TeTheme();
+	tempTheme->layer(layer);
+	tempTheme->collectionTable("");
+	tempTheme->collectionAuxTable("");
+	TeAttrTableVector& layerTables = layer->attrTables();
+	TeAttrTableVector aTable;
+	for (unsigned int nn=0; nn<layerTables.size(); ++nn)
+	{
+		if (layerTables[nn].name() == tableName)
 		{
-			tf = clock();
-			if (((tf-ti)/CLOCKS_PER_SEC) > 3)
-				TeProgress::instance()->setProgress(count);
-			if (TeProgress::instance()->wasCancelled())
-				break;
-			ti = tf;
+			aTable.push_back(layerTables[nn]);
+			break;
 		}
 	}
-	tabFile.writeEnd();
-	delete portal;
-	if(TeProgress::instance())
-		TeProgress::instance()->reset();
-	return true;
+	tempTheme->setAttTables(aTable);
+	TeQuerierParams qPar(true, true);
+	qPar.setParams(tempTheme);
+
+	TeQuerier* tQuerier = new TeQuerier(qPar);
+	bool res = TeExportQuerierToSPRING(tQuerier,fbase,cat,name,layer->projection());
+	delete tQuerier;
+	delete tempTheme;
+    return res ;
 }
 
+bool 
+TeExportThemeToSPRING(TeTheme* theme, TeSpringModels cat, const string& name, TeSelectedObjects selOb, const string& baseName)
+{
+	if (!theme)
+		return false;
+
+	string fbase = baseName;
+	if (baseName.empty())
+		fbase = theme->name();
+
+	TeQuerierParams qPar(true, true);
+	qPar.setParams(theme);
+	qPar.setSelecetObjs(selOb);
+
+	TeQuerier* tQuerier = new TeQuerier(qPar);
+	bool res = TeExportQuerierToSPRING(tQuerier,fbase,cat,name,theme->layer()->projection());
+	delete tQuerier;
+	return res;
+}
diff --git a/src/terralib/functions/TeGeoProcessingFunctions.cpp b/src/terralib/functions/TeGeoProcessingFunctions.cpp
old mode 100644
new mode 100755
index 6da13db..6e7b58f
--- a/src/terralib/functions/TeGeoProcessingFunctions.cpp
+++ b/src/terralib/functions/TeGeoProcessingFunctions.cpp
@@ -1,7 +1,7 @@
 /************************************************************************************
 TerraView - visualization and exploration of geographical databases
 using TerraLib.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright  2001-2007 INPE and Tecgraf/PUC-Rio.
 This file is part of TerraView. TerraView is free software; you can redistribute it 
 and/or modify it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or
@@ -25,12 +25,359 @@ this program and its documentation.
 #include "TeOverlay.h"
 #include "TeProgress.h"
 #include "TeVectorRemap.h"
-#include "TeApplicationUtils.h"
+#include "TeDatabase.h"
 #include "TeCellAlgorithms.h"
 #include "TeAsciiFile.h"
 
 
-bool changeAttrList(TeAttributeList& attrList)
+//-------------------------------- Auxiliary functions
+inline string getStringFromStatistic(TeStatisticType sType)
+{
+	string ss;
+
+	if(sType == TeSUM)
+		ss = "SUM";
+	else if(sType == TeMAXVALUE)
+		ss = "MAXVALUE";
+	else if(sType == TeMINVALUE)
+		ss = "MINVALUE";
+	else if(sType == TeCOUNT)
+		ss = "COUNT";
+	else if(sType == TeVALIDCOUNT)
+		ss = "VALIDCOUNT";
+	else if(sType == TeSTANDARDDEVIATION)
+		ss = "STANDARDDEVIATION";
+	else if(sType == TeKERNEL)
+		ss = "KERNEL";
+	else if(sType == TeMEAN)
+		ss = "MEAN";
+	else if(sType == TeVARIANCE)
+		ss = "VARIANCE";
+	else if(sType == TeSKEWNESS)
+		ss = "SKEWNESS";
+	else if(sType == TeKURTOSIS)
+		ss = "KURTOSIS";
+	else if(sType == TeAMPLITUDE)
+		ss = "AMPLITUDE";
+	else if(sType == TeMEDIAN)
+		ss = "MEDIAN";
+	else if(sType == TeVARCOEFF)
+		ss = "VARCOEFF";
+	else if(sType == TeMODE)
+		ss = "MODE";
+	else if(sType == TeNOSTATISTIC)
+		ss = "VALUE";
+	return ss;
+}
+
+
+inline int countNumGeometries(TeTheme* theme, TeSelectedObjects selOb)
+{
+	TeDatabase* db = theme->layer()->database();
+
+	string count;
+	TeGeomRep gRep = (TeGeomRep)(theme->visibleGeoRep() & ~TeTEXT); // TeTEXT not is considered;
+
+    if(gRep == TePOLYGONS)
+	{
+		string tableName = theme->layer()->tableName(TePOLYGONS);
+
+		//Calculate the number of polygons to be drawn
+		string selectPolyCount; 
+
+		if(db->dbmsName()=="SqlServerAdo")
+			selectPolyCount="SELECT COUNT(DISTINCT(parent_id)) FROM ";
+		else if(db->dbmsName() != "OracleSpatial" && db->dbmsName() != "PostGIS")
+			selectPolyCount = "SELECT DISTINCT parent_id FROM ";
+		else
+			selectPolyCount = "SELECT DISTINCT geom_id FROM ";
+
+		selectPolyCount += tableName + ", " + theme->collectionTable() + " WHERE c_object_id = object_id";
+
+		if(selOb == TeSelectedByPointing)
+		{
+			selectPolyCount += " AND (c_object_status = 1 OR c_object_status = 3)";
+
+		}
+		else if(selOb == TeSelectedByQuery)
+		{
+			selectPolyCount += " AND (c_object_status = 2 OR c_object_status = 3)";
+		}
+		
+		if(db->dbmsName() =="SqlServerAdo")
+			count = selectPolyCount;
+		else if(db->dbmsName() == "PostgreSQL" || db->dbmsName() == "PostGIS")
+			count = "SELECT COUNT(*) FROM (" + selectPolyCount + ") AS r";		
+		else 
+			count = "SELECT COUNT(*) FROM (" + selectPolyCount + ")";		
+	}
+	else if(gRep == TeLINES)
+	{
+		string tableName = theme->layer()->tableName(TeLINES);
+
+		count = "SELECT COUNT(*) FROM " + tableName + ", " + theme->collectionTable();
+		count += " WHERE object_id = c_object_id";
+
+		if(selOb == TeSelectedByPointing)
+		{
+			count += " AND (c_object_status = 1 OR c_object_status = 3)";
+
+		}
+		else if(selOb == TeSelectedByQuery)
+		{
+			count += " AND (c_object_status = 2 OR c_object_status = 3)";
+		}
+	}
+	else if(gRep == TePOINTS)
+	{
+		string tableName = theme->layer()->tableName(TePOINTS);
+
+		count = "SELECT COUNT(*) FROM " + tableName + ", " + theme->collectionTable();
+		count += " WHERE object_id = c_object_id";
+
+		if(selOb == TeSelectedByPointing)
+		{
+			count += " AND (c_object_status = 1 OR c_object_status = 3)";
+
+		}
+		else if(selOb == TeSelectedByQuery)
+		{
+			count += " AND (c_object_status = 2 OR c_object_status = 3)";
+		}
+	}
+	else if(gRep == TeCELLS)
+	{
+		string tableName = theme->layer()->tableName(TeCELLS);
+
+		count = "SELECT COUNT(*) FROM " + tableName + ", " + theme->collectionTable();
+		count += " WHERE object_id = c_object_id";
+
+		if(selOb == TeSelectedByPointing)
+		{
+			count += " AND (c_object_status = 1 OR c_object_status = 3)";
+
+		}
+		else if(selOb == TeSelectedByQuery)
+		{
+			count += " AND (c_object_status = 2 OR c_object_status = 3)";
+		}
+	}
+	else
+		return -1;
+
+	TeDatabasePortal* p = db->getPortal();
+
+	if(p && p->query(count) && p->fetchRow())
+	{
+		int result = p->getInt(0);
+
+		delete p;
+		
+		return result;
+
+	}
+	
+	if(p)
+		delete p;
+
+	return -1;			
+}
+
+// objectid cell, <objectid polygon, itersection area>
+inline void insertArea(const string& cellId, const string& polId, const double& area, map<string, map<string, double> >& cellMap)
+{
+	map<string, map<string, double> >::iterator it = cellMap.find(cellId);
+
+	if(it != cellMap.end())
+	{
+// inserts into an existing entry
+		map<string, double>::iterator itpol = it->second.find(polId);
+
+		if(itpol != it->second.end())
+		{
+// polid already in index... add area
+			itpol->second = itpol->second + area;
+		}
+		else
+		{
+// inserts polid and area
+			(it->second)[polId] = area;
+		}
+
+	}
+	else
+	{
+// inserts a new entry
+		map<string, double> polMap;
+		polMap.insert(pair<string, double>(polId, area));
+		cellMap[cellId] = polMap;
+	}
+}
+
+// objectid cell, <objectid polygon, itersection area>
+inline string getMaxIntersectionArea(map<string, double>& polMap)
+{
+	string strMax;
+	double maxArea = 0.0;
+
+	map<string, double>::iterator it = polMap.begin();
+
+	if(it != polMap.end())
+	{
+		strMax = it->first;
+		maxArea = it->second;
+
+		++it;
+
+		while(it != polMap.end())
+		{
+			if(it->second > maxArea)
+			{
+				strMax = it->first;
+				maxArea = it->second;
+			}
+
+			++it;
+		}
+	}
+
+    return strMax;
+}
+
+bool insertBoundaryCells(int newId, TeLayer* outPutLayer, map<string, map<string, double> >& cellMap, TeTheme* cellTheme, TeTheme* themeTrim = 0)
+{
+	int step = 0;
+	TeTable& attTable = outPutLayer->attrTables()[0];
+	TeCellSet outputCellSet;
+
+	outputCellSet.resX(cellTheme->layer()->getRepresentation(TeCELLS)->resX_);
+	outputCellSet.resY(cellTheme->layer()->getRepresentation(TeCELLS)->resY_);
+
+	attTable.clear();
+
+	if(TeProgress::instance())
+	{
+		string caption = "Overlay Intersection";
+		string msg = "Saving Boundary. Please, wait!";
+		TeProgress::instance()->setCaption(caption.c_str());
+		TeProgress::instance()->setMessage(msg);
+		TeProgress::instance()->setTotalSteps(cellMap.size());
+	}
+	map<string, map<string, double> >::iterator it = cellMap.begin();
+
+	while(it != cellMap.end())
+	{
+		++newId;
+		step++;
+
+		string newObjId = Te2String(newId);
+
+// get cell data
+		TeQuerierParams cellParams(true, true);
+		cellParams.setParams(cellTheme, it->first);
+
+		TeQuerier cellQuerier(cellParams);
+
+		if(!cellQuerier.loadInstances())
+			return  false;
+
+		TeSTInstance cellInst;
+
+		if(!cellQuerier.fetchInstance(cellInst))
+			return false;
+		
+		TeCellSet cs;
+
+		cellInst.getGeometry(cs);
+
+		cs[0].objectId(newObjId);
+
+		outputCellSet.add(cs[0]);		
+
+// monta a linha com os valores das colunas da celula
+		TeTableRow row;
+
+		row.push_back(newObjId);
+
+		vector<string>& attrs = cellInst.getProperties();
+
+		for(int p = 0; p < (int)attrs.size(); ++p)
+			row.push_back(attrs[p]);
+
+		if(themeTrim)
+		{
+			string polId = getMaxIntersectionArea(it->second);
+
+			if(polId.empty())
+				return false;
+
+
+			TeQuerierParams trimParams(false, true);
+			trimParams.setParams(themeTrim, polId);
+
+			TeQuerier trimQuerier(trimParams);
+
+			if(!trimQuerier.loadInstances())
+				return  false;
+
+			TeSTInstance trimInst;
+
+			if(!trimQuerier.fetchInstance(trimInst))
+				return false;
+
+			vector<string>& attrstrim = trimInst.getProperties();
+
+			for(int p = 0; p < (int)attrstrim.size(); ++p)
+				row.push_back(attrstrim[p]);
+		}
+
+		attTable.add(row);
+// salva a celula e os atributos
+
+		if((newId % 100) == 0)
+		{
+			outPutLayer->addCells(outputCellSet);
+			outputCellSet.clear();
+
+			outPutLayer->saveAttributeTable(attTable);
+			attTable.clear();
+
+			if(TeProgress::instance())
+			{
+				if(TeProgress::instance()->wasCancelled())
+				{
+					TeProgress::instance()->reset();
+					return false;
+				}
+				TeProgress::instance()->setProgress(step);
+			}
+		}
+       
+		++it;
+	}
+
+	if(outputCellSet.size() > 0)
+	{
+        outPutLayer->addCells(outputCellSet);
+		outputCellSet.clear();
+	}
+
+
+	if(attTable.size() > 0)
+	{
+        outPutLayer->saveAttributeTable(attTable);
+		attTable.clear();
+	}
+
+	if(TeProgress::instance())
+		TeProgress::instance()->reset();
+
+	return true;
+}
+
+
+
+inline bool changeAttrList(TeAttributeList& attrList)
 {
 	bool change = false;
 	
@@ -72,12 +419,12 @@ bool changeAttrList(TeAttributeList& attrList)
 }
 
 
-bool multiGeometryToLayer(TeMultiGeometry& mGeom, const string& newId, TeLayer* newLayer, TeProjection* proj=0)
+inline bool multiGeometryToLayer(TeMultiGeometry& mGeom, const string& newId, TeLayer* newLayer, TeProjection* proj=0, TeGeomRep geomRep=TeGEOMETRYNONE)
 {
-	bool flag = false;
+	bool flag = true;
 	TeProjection* projLayer = newLayer->projection();
 	
-	if(mGeom.hasPolygons())  
+	if(mGeom.hasPolygons() && (geomRep==TeGEOMETRYNONE || geomRep==TePOLYGONS))  
 	{
 		TePolygonSet polSet, polSetTemp;
 		mGeom.getGeometry (polSetTemp);
@@ -100,7 +447,7 @@ bool multiGeometryToLayer(TeMultiGeometry& mGeom, const string& newId, TeLayer*
 		polSet.objectId(newId);
 		flag = newLayer->addPolygons(polSet);
 	} 
-	else if (mGeom.hasLines())
+	else if (mGeom.hasLines() && (geomRep==TeGEOMETRYNONE || geomRep==TeLINES))
 	{
 		TeLineSet lineSet, lineSetTemp;
 		mGeom.getGeometry (lineSetTemp);
@@ -122,7 +469,7 @@ bool multiGeometryToLayer(TeMultiGeometry& mGeom, const string& newId, TeLayer*
 		lineSet.objectId (newId);
 		flag = newLayer->addLines(lineSet);
 	}
-	else if (mGeom.hasPoints())
+	else if (mGeom.hasPoints() && (geomRep==TeGEOMETRYNONE || geomRep==TePOINTS))
 	{
 		TePointSet pointSet, pointSetTemp;
 		mGeom.getGeometry (pointSetTemp);
@@ -144,7 +491,7 @@ bool multiGeometryToLayer(TeMultiGeometry& mGeom, const string& newId, TeLayer*
 		pointSet.objectId (newId);
 		flag = newLayer->addPoints(pointSet);
 	}
-	else if (mGeom.hasCells())
+	else if (mGeom.hasCells() && (geomRep==TeGEOMETRYNONE || geomRep==TeCELLS))
 	{
 		TeCellSet cellSet, cellSetTemp;
 		mGeom.getGeometry (cellSetTemp);
@@ -166,21 +513,22 @@ bool multiGeometryToLayer(TeMultiGeometry& mGeom, const string& newId, TeLayer*
 		cellSet.objectId (newId);
 		flag = newLayer->addCells(cellSet);
 	}
-	else 
-		return false;
+//	else 
+//		return false;
 
 	return flag;
 }
 
+//-------------------------------- Main functions
 
-
-bool TeGeoOpAggregation(TeLayer* newLayer, TeTheme* theme, vector<string> agregAttrVec, 
+bool TeGeoOpAggregation(TeLayer* newLayer, TeTheme* theme, vector<string>& agregAttrVec, 
 						TeGroupingAttr& attrMM, TeSelectedObjects selOb, TeAsciiFile* logFile)		
 {
 	int dt = CLOCKS_PER_SEC/4;
 	int dt2 = CLOCKS_PER_SEC * 5;
 	clock_t	t0, t1, t2;
-	int	i, j, offset, steps = 0;
+	unsigned int i, j;
+	int	offset, steps = 0;
 	TeStatisticValMap stat;
 	TeStatisticStringValMap sstat;
 	vector<string> valVec;
@@ -193,6 +541,8 @@ bool TeGeoOpAggregation(TeLayer* newLayer, TeTheme* theme, vector<string> agregA
 	string CT = theme->collectionTable();
 	string OID = CT + ".c_object_id";
 
+	TeGeomRep geomRepTheme = (TeGeomRep)(theme->visibleGeoRep() & ~TeTEXT); // TeTEXT not is considered;
+
 	TeAttributeList aList = theme->sqlAttList();
 	TeAttribute agregTeAttribute;
 	agregTeAttribute.rep_.type_ = TeSTRING;
@@ -203,7 +553,12 @@ bool TeGeoOpAggregation(TeLayer* newLayer, TeTheme* theme, vector<string> agregA
 	map<int, string> legendLabelMap;
 	int legIndex = -1;
 
-	for(j=0; j<(int)agregAttrVec.size(); ++j)
+	map<int, int> attrSQLPositionMap;	// dado o id do vetor attrMM ele devolve a posicao no portal. 
+
+/* acha o nome para a coluna (agregTeAttribute) que sempre eh acrescentada
+   ao layer de saida: a coluna formada pelos atributos usados para agrupar
+ */
+	for(j=0; j<agregAttrVec.size(); ++j)
 	{
 		string name;
 		if(agregAttrVec[j] == "CURRENT LEGEND")
@@ -214,7 +569,7 @@ bool TeGeoOpAggregation(TeLayer* newLayer, TeTheme* theme, vector<string> agregA
 		}
 		else
 		{	
-			for(i=0; i<(int)aList.size(); ++i)
+			for(i=0; i<aList.size(); ++i)
 			{
 				name = aList[i].rep_.name_;
 				if(name == agregAttrVec[j])
@@ -231,16 +586,22 @@ bool TeGeoOpAggregation(TeLayer* newLayer, TeTheme* theme, vector<string> agregA
 		else
 			agregTeAttribute.rep_.name_ += "_" + name;
 	}
+
 	if(agregTeAttribute.rep_.name_.size() > 30)
-		agregTeAttribute.rep_.name_.erase(30, agregTeAttribute.rep_.name_.size()-30);
+		agregTeAttribute.rep_.name_ = agregTeAttribute.rep_.name_.substr(0, 30);
 
+/* o usuario quer agrupar pela legenda?
+   - se sim, montamos o legendLabelMap
+ */
 	if(legIndex > -1)
 	{
 		TeLegendEntryVector& legVec = theme->legend();
-		for(i=0; i<(int)legVec.size(); ++i)
+		for(i=0; i<legVec.size(); ++i)
 			legendLabelMap[legVec[i].id()] = legVec[i].label();
 	}
 
+/* montagem da lista de atributos do novo layer
+ */
 	TeAttributeList attList;
 
 	TeAttribute at;
@@ -269,6 +630,9 @@ bool TeGeoOpAggregation(TeLayer* newLayer, TeTheme* theme, vector<string> agregA
 		ss = getStringFromStatistic(sType);
 		string sss = s + "_" + ss;
 
+		at.rep_ = it->first;
+		at.rep_.isPrimaryKey_ = false;
+
 		if(((db->dbmsName()=="OracleAdo") || 
 			(db->dbmsName()=="OracleSpatial") ) &&
 			(sss.size() > 30))
@@ -279,61 +643,84 @@ bool TeGeoOpAggregation(TeLayer* newLayer, TeTheme* theme, vector<string> agregA
 		else
 			at.rep_.name_ = sss;
 
-		at.rep_ = it->first;
-		at.rep_.isPrimaryKey_ = false;
+		
 		if(at.rep_.type_ == TeINT)
 			at.rep_.type_ = TeREAL;
 		attList.push_back(at);	
 	}
-
+	
+/* faz as alteracaoes necessarias nos nomes de campos, para evitar duplicacao de nomes
+   e cria a tabela de dados
+ */
 	changeAttrList(attList);
 	TeTable attTable(newLayer->name(), attList, "object_id_", "object_id_");
 
 	if(!newLayer->createAttributeTable(attTable))
         return false;
 
+/* monta a query de selecao dos atributos nao espaciais
+ */
 	string queryAtr  = "SELECT " + OID;
 
-	for(i=0; i<(int)agregAttrVec.size(); ++i)
-		queryAtr += ", " + agregAttrVec[i];
+	unsigned int lastAttrPos = 0;
 
-	for(it=attrMM.begin(); it!=attrMM.end(); ++it)
+	for(i=0; i<agregAttrVec.size(); ++i)
 	{
-		string s = it->first.name_;
+		lastAttrPos = i;
+		queryAtr += ", " + agregAttrVec[i];		
+	}
+
+	ss = "";
+
+	for(j=0; j<attrMM.size(); ++j)
+	{
+		string s = attrMM[j].first.name_;
+
+/* verifica se o atributo jah foi incluido no SELECT
+ */
 		bool existedName = false;
-		vector<string>::iterator it2 = agregAttrVec.begin();
-		while(it2!=agregAttrVec.end())
+		
+		for(i=0; i<agregAttrVec.size(); ++i)
 		{
-			if((*it2)==s)
+			if(s == agregAttrVec[i])
 			{
+				attrSQLPositionMap[j] = i;
 				existedName=true;
 				break;
 			}
-			++it2;
 		}
 
-		if((s != ss) && (!existedName))
+		if((!existedName) && (s != ss))
+		{
 			queryAtr += ", " + s;
+			++lastAttrPos;
+			attrSQLPositionMap[j] = lastAttrPos;
+		}
+
 		ss = s;
 	}
+
 	queryAtr += theme->sqlFrom();
+
 	if(selOb == TeSelectedByPointing)
-		queryAtr += " WHERE " + CT + ".c_object_status = 1 OR " + CT + ".c_object_status = 3";
+		queryAtr += " WHERE (" + CT + ".c_object_status = 1 OR " + CT + ".c_object_status = 3)";
 	else if(selOb == TeSelectedByQuery)
-		queryAtr += " WHERE " + CT + ".c_object_status = 2 OR " + CT + ".c_object_status = 3";
+		queryAtr += " WHERE (" + CT + ".c_object_status = 2 OR " + CT + ".c_object_status = 3)";
 	queryAtr += " ORDER BY ";
-	for(i=0; i<(int)agregAttrVec.size(); ++i)
+	for(i=0; i<agregAttrVec.size(); ++i)
 	{
 		queryAtr += agregAttrVec[i];
-		if(i<(int)agregAttrVec.size()-1)
+		if (i<agregAttrVec.size()-1)
 			queryAtr += ", ";
 	}
 
-	if(layer->hasGeometry(TePOLYGONS))
+/* monta outra query para os atributos espaciais
+ */
+	if(geomRepTheme == TePOLYGONS)
 		geoName = layer->tableName(TePOLYGONS);
-	else if(layer->hasGeometry(TeLINES))
+	else if(geomRepTheme == TeLINES)
 		geoName = layer->tableName(TeLINES);
-	else if(layer->hasGeometry(TePOINTS))
+	else if(geomRepTheme == TePOINTS)
 		geoName = layer->tableName(TePOINTS);
 	else
 		geoName = layer->tableName(TeCELLS);
@@ -354,7 +741,7 @@ bool TeGeoOpAggregation(TeLayer* newLayer, TeTheme* theme, vector<string> agregA
 
 	query += "WHERE ATR." + newOID + " = " + geoName + ".object_id";
 	query += " ORDER BY ";
-	for(i=0; i<(int)agregAttrVec.size(); ++i)
+	for(i=0; i<agregAttrVec.size(); ++i)
 	{
 		string newagre = TeGetExtension(agregAttrVec[i].c_str());
 
@@ -362,13 +749,13 @@ bool TeGeoOpAggregation(TeLayer* newLayer, TeTheme* theme, vector<string> agregA
 			newagre = agregAttrVec[i];
 
 		query += "ATR." + newagre;
-		if(i<(int)agregAttrVec.size()-1)
+		if(i<agregAttrVec.size()-1)
 			query += ", ";
 	}
 	query += ", " + geoName + ".object_id";
 
 
-	if(layer->hasGeometry(TePOLYGONS))
+	if(geomRepTheme == TePOLYGONS)
 	{
 		if(db->dbmsName() != "OracleSpatial" && db->dbmsName() != "PostGIS")
 			query += ", " + geoName + ".parent_id, " + geoName + ".num_holes DESC";
@@ -388,13 +775,13 @@ bool TeGeoOpAggregation(TeLayer* newLayer, TeTheme* theme, vector<string> agregA
 	portal->freeResult();
 	if(portal->query(query) && portal->fetchRow())
 	{
-		TeAttributeList portalAttList = portal->AttributeList();
+		TeAttributeList& portalAttList = portal->getAttributeList();
 
-		if(layer->hasGeometry(TePOLYGONS))
+		if(geomRepTheme == TePOLYGONS)
 			newLayer->addGeometry(TePOLYGONS);
-		else if(layer->hasGeometry(TeLINES))
+		else if(geomRepTheme == TeLINES)
 			newLayer->addGeometry(TeLINES);
-		else if(layer->hasGeometry(TePOINTS))
+		else if(geomRepTheme == TePOINTS)
 			newLayer->addGeometry(TePOINTS);
 		else
 			newLayer->addGeometry(TeCELLS);
@@ -406,13 +793,13 @@ bool TeGeoOpAggregation(TeLayer* newLayer, TeTheme* theme, vector<string> agregA
 		lastOid += "aaa";
 		string lastVal;
 
-		for(i=0; i<(int)agregAttrVec.size(); ++i)
+		for(i=0; i<agregAttrVec.size(); ++i)
 		{
 			string s = portal->getData(agregAttrVec[i]);
-			if(legIndex == i)
+			if(legIndex == (int)i)
 				s = legendLabelMap[atoi(s.c_str())];
 			lastVal += s;
-			if(i<(int)agregAttrVec.size() - 1)
+			if(i<agregAttrVec.size() - 1)
 				lastVal += "_";
 		}
 		
@@ -430,20 +817,19 @@ bool TeGeoOpAggregation(TeLayer* newLayer, TeTheme* theme, vector<string> agregA
 			t0 = t1 = t2;
 		}
 
-
 		TePrecision::instance().setPrecision(TeGetPrecision(layer->projection()));
 
 		do
 		{	
 			string oid = portal->getData(offset);
 			string currVal;
-			for(i=0; i<(int)agregAttrVec.size(); ++i)
+			for(i=0; i<agregAttrVec.size(); ++i)
 			{
 				string s = portal->getData(agregAttrVec[i]);
-				if(legIndex == i)
+				if (legIndex == (int)i)
 					s = legendLabelMap[atoi(s.c_str())];
 				currVal += s;
-				if(i<(int)agregAttrVec.size() - 1)
+				if (i<agregAttrVec.size() - 1)
 					currVal += "_";
 			}
 
@@ -458,7 +844,9 @@ bool TeGeoOpAggregation(TeLayer* newLayer, TeTheme* theme, vector<string> agregA
 				if(oid != lastOid)
 				{
 					count++;
-					for(j=3, i=offset+(int)agregAttrVec.size()+1; i<(int)portalAttList.size(); ++i, ++j)
+					//for(j=3, i=offset+(int)agregAttrVec.size()+1; i<(int)portalAttList.size(); ++i, ++j)
+					//offset + 1 = atributos da tabela de geometria + c_object_id
+					for(j=0, i=offset+1; i<portalAttList.size(); ++i, ++j)
 					{
 						string s = portal->getData(i);
 						TeAttrDataType aType = portalAttList[i].rep_.type_;
@@ -475,36 +863,17 @@ bool TeGeoOpAggregation(TeLayer* newLayer, TeTheme* theme, vector<string> agregA
 					}
 				}
 
-				if(layer->hasGeometry(TePOLYGONS))
+				if(geomRepTheme == TePOLYGONS)
 				{
 					flag = portal->fetchGeometry(p);
-					TePolygonSet psaux;
-					psaux.add(p);
-
-					TePolygonSet psauxOut;
-					if(!TeOVERLAY::TeUnion(ps, psaux, psauxOut))
-					{
-						// when the operation returns false, write in the log a possible
-						// inconsistency in the data
-						if (logFile)
-						{
-							string mess = "Possivel inconsistencia na uniao do objeto ";
-							mess += ps.objectId();
-							mess += " e ";
-							mess += p.objectId();
-							logFile->writeString(mess);
-							logFile->writeNewLine();
-						}
-					}
-					ps = psauxOut;
-					multGeom.setGeometry(ps);
+					multGeom.addGeometry(p);					
 				}
-				else if(layer->hasGeometry(TeLINES))
+				else if(geomRepTheme == TeLINES)
 				{
 					flag = portal->fetchGeometry(l);
 					multGeom.addGeometry(l);
 				}
-				else if(layer->hasGeometry(TePOINTS))
+				else if(geomRepTheme == TePOINTS)
 				{
 					flag = portal->fetchGeometry(pt);
 					multGeom.addGeometry(pt);
@@ -517,52 +886,104 @@ bool TeGeoOpAggregation(TeLayer* newLayer, TeTheme* theme, vector<string> agregA
 			}
 			else  
 			{
+				if(multGeom.hasPolygons())
+				{
+					TePolygonSet polSetValidHoles;
+			
+					if(!TeOVERLAY::TeValidPolygonHoles(multGeom.getPolygons(), polSetValidHoles))
+					{
+						if(TeProgress::instance())
+							TeProgress::instance()->reset();
+
+						delete portal;
+						return false; 
+					}
+
+					TePolygonSet psetOut;
+
+					if(!TeOVERLAY::TeUnion(polSetValidHoles, psetOut))
+					{
+						// when the operation returns false, write in the log a possible
+						// inconsistency in the data
+						if (logFile)
+						{
+							string mess = "Possivel inconsistencia na uniao dos objetos da classe: ";
+							mess += lastVal;
+							logFile->writeString(mess);
+							logFile->writeNewLine();
+						}
+					}
+
+					multGeom.setGeometry(psetOut);
+				}
+
 				if(!multiGeometryToLayer(multGeom, Te2String(objectId), newLayer))
 				{
+					if(TeProgress::instance())
+						TeProgress::instance()->reset();
+
 					delete portal;
 					return false; 
 				}
-				
+
+
+				std::map<int, TeStatisticValMap> statAux;
+				std::map<int, TeStatisticStringValMap> sstatAux;
+
 				valVec.push_back(Te2String(objectId));
 				valVec.push_back(lastVal);
 				valVec.push_back(Te2String(count));
 
-				i = 3;
-				it=attrMM.begin();
-				while(it != attrMM.end())
+				string currAttr = "";
+				int attPos = 0;
+				for(i=0; i<attrMM.size(); ++i)
 				{
-					TeAttributeRep atRep = it->first;
-					TeAttrDataType aType = atRep.type_;
-
-					stat.clear();
-					sstat.clear();
-					if(aType == TeREAL || aType == TeINT)
-						TeCalculateStatistics(doubleMap[i].begin(), doubleMap[i].end(), stat);
-					else
-						TeCalculateStatistics(stringMap[i].begin(), stringMap[i].end(), sstat);
+					if (currAttr != attrMM[i].first.name_)
+					{
+						stat.clear();
+						sstat.clear();
+						attPos = attrSQLPositionMap[i];		
+						currAttr = attrMM[i].first.name_;
+					}
 
-					int ssize = attrMM.count(atRep);
-					for(j=0; j<ssize; ++j)
+					if(attrMM[i].first.type_ == TeREAL || attrMM[i].first.type_ == TeINT)
 					{
-						TeStatisticType sType = it->second;
+						std::map<int, TeStatisticValMap>::iterator it = statAux.find(attPos);
 
-						if(aType == TeREAL || aType == TeINT)
+						if(it != statAux.end())
 						{
-							double d = stat[sType];
-							valVec.push_back(Te2String(d));
+							double d = (it->second)[attrMM[i].second];
+							valVec.push_back(Te2String(d, 16));
 						}
 						else
 						{
-							string s = sstat[sType];
+							TeCalculateStatistics(doubleMap[attPos].begin(), doubleMap[attPos].end(), stat);
+							statAux[attPos] = stat;
+							double d = stat[attrMM[i].second];
+							valVec.push_back(Te2String(d, 16));
+						}
+					}
+					else
+					{
+						std::map<int, TeStatisticStringValMap>::iterator it = sstatAux.find(attPos);
+
+						if(it != sstatAux.end())
+						{
+							string s = (it->second)[attrMM[i].second];
 							valVec.push_back(s);
 						}
-						it++;
+						else
+						{
+							TeCalculateStatistics(stringMap[attPos].begin(), stringMap[attPos].end(), sstat);
+							sstatAux[attPos] = sstat;
+							string s = sstat[attrMM[i].second];
+							valVec.push_back(s);
+						}						
 					}
-					i++;
 				}
 
 				TeTableRow row;
-				for(i=0; i<(int)valVec.size(); ++i)
+				for(i=0; i<valVec.size(); ++i)
 					row.push_back(valVec[i]);
 				attTable.add(row);
 
@@ -573,10 +994,10 @@ bool TeGeoOpAggregation(TeLayer* newLayer, TeTheme* theme, vector<string> agregA
 				ps.clear();
 				multGeom.clear();
 				
-				if(oid != lastOid)
+				if(oid != lastOid)	// poderia ser igual???? Veja que aqui estamos no else do bloco oid == lastOid!!!!
 				{
 					count++;
-					for(j=3, i=offset+(int)agregAttrVec.size()+1; i<(int)portalAttList.size(); ++i, ++j)
+					for(j=0, i=offset+1; i<portalAttList.size(); ++i, ++j)
 					{
 						string s = portal->getData(i);
 						TeAttrDataType aType = portalAttList[i].rep_.type_;
@@ -593,38 +1014,17 @@ bool TeGeoOpAggregation(TeLayer* newLayer, TeTheme* theme, vector<string> agregA
 					}
 				}
 
-				if(layer->hasGeometry(TePOLYGONS))
+				if(geomRepTheme == TePOLYGONS)
 				{
 					flag = portal->fetchGeometry(p);
-					TePolygonSet psaux;
-					psaux.add(p);
-
-					TePolygonSet psauxOut;
-
-					if(!TeOVERLAY::TeUnion(ps, psaux, psauxOut))
-					{
-						// when the operation returns false, write in the log a possible
-						// inconsistency in the data
-						if (logFile)
-						{
-							string mess = "Possivel inconsistencia na uniao do objeto ";
-							mess += ps.objectId();
-							mess += " e ";
-							mess += p.objectId();
-							logFile->writeString(mess);
-							logFile->writeNewLine();
-						}
-					}
-					ps = psauxOut;
-
-					multGeom.setGeometry(ps);
+					multGeom.addGeometry(p);					
 				}
-				else if(layer->hasGeometry(TeLINES))
+				else if(geomRepTheme == TeLINES)
 				{
 					flag = portal->fetchGeometry(l);
 					multGeom.addGeometry(l);
 				}
-				else if(layer->hasGeometry(TePOINTS))
+				else if(geomRepTheme == TePOINTS)
 				{
 					flag = portal->fetchGeometry(pt);
 					multGeom.addGeometry(pt);
@@ -665,52 +1065,101 @@ bool TeGeoOpAggregation(TeLayer* newLayer, TeTheme* theme, vector<string> agregA
 
 		if(!multGeom.empty())  
 		{
+			if(multGeom.hasPolygons())
+			{
+					TePolygonSet polSetValidHoles;
+					
+					if(!TeOVERLAY::TeValidPolygonHoles(multGeom.getPolygons(), polSetValidHoles))
+					{
+						if(TeProgress::instance())
+							TeProgress::instance()->reset();
+
+						delete portal;
+						return false; 
+					}
+
+					TePolygonSet psetOut;
+
+					if(!TeOVERLAY::TeUnion(polSetValidHoles, psetOut))
+					{
+						// when the operation returns false, write in the log a possible
+						// inconsistency in the data
+						if (logFile)
+						{
+							string mess = "Possivel inconsistencia na uniao dos objetos da classe: ";
+							mess += lastVal;
+							logFile->writeString(mess);
+							logFile->writeNewLine();
+						}
+					}
+
+					multGeom.setGeometry(psetOut);
+			}
+
 			if(!multiGeometryToLayer(multGeom, Te2String(objectId), newLayer))
 			{
+				if(TeProgress::instance())
+					TeProgress::instance()->reset();
+
 				delete portal;
 				return false; 
 			}
 
+			std::map<int, TeStatisticValMap> statAux;
+			std::map<int, TeStatisticStringValMap> sstatAux;
+
 			valVec.push_back(Te2String(objectId));
 			valVec.push_back(lastVal);
 			valVec.push_back(Te2String(count));
-
-			i = 3;
-			it=attrMM.begin();
-			while(it != attrMM.end())
+			string currAttr = "";
+			int attPos = 0;
+			for(i = 0; i <attrMM.size(); ++i)
 			{
-				TeAttributeRep atRep = it->first;
-				TeAttrDataType aType = atRep.type_;
+				if (currAttr != attrMM[i].first.name_)
+				{
+					stat.clear();
+					sstat.clear();
+					attPos = attrSQLPositionMap[i];		
+					currAttr = attrMM[i].first.name_;
+				}
+				if(attrMM[i].first.type_ == TeREAL || attrMM[i].first.type_ == TeINT)
+				{
+					std::map<int, TeStatisticValMap>::iterator it = statAux.find(attPos);
 
-				stat.clear();
-				sstat.clear();
-				if(aType == TeREAL || aType == TeINT)
-					TeCalculateStatistics(doubleMap[i].begin(), doubleMap[i].end(), stat);
+					if(it != statAux.end())
+					{
+						double d = (it->second)[attrMM[i].second];
+						valVec.push_back(Te2String(d, 16));
+					}
+					else
+					{
+                        TeCalculateStatistics(doubleMap[attPos].begin(), doubleMap[attPos].end(), stat);
+						statAux[attPos] = stat;
+						double d = stat[attrMM[i].second];
+						valVec.push_back(Te2String(d, 16));
+					}
+				}
 				else
-					TeCalculateStatistics(stringMap[i].begin(), stringMap[i].end(), sstat);
-
-				int ssize = attrMM.count(atRep);
-				for(j=0; j<ssize; ++j)
 				{
-					TeStatisticType sType = it->second;
+					std::map<int, TeStatisticStringValMap>::iterator it = sstatAux.find(attPos);
 
-					if(aType == TeREAL || aType == TeINT)
+					if(it != sstatAux.end())
 					{
-						double d = stat[sType];
-						valVec.push_back(Te2String(d));
+						string s = (it->second)[attrMM[i].second];
+						valVec.push_back(s);
 					}
 					else
 					{
-						string s = sstat[sType];
+                        TeCalculateStatistics(stringMap[attPos].begin(), stringMap[attPos].end(), sstat);
+						sstatAux[attPos] = sstat;
+						string s = sstat[attrMM[i].second];
 						valVec.push_back(s);
-					}
-					it++;
+					}						
 				}
-				i++;
-			}
+			}	
 
 			TeTableRow row;
-			for(i=0; i<(int)valVec.size(); ++i)
+			for(i=0; i<valVec.size(); ++i)
 				row.push_back(valVec[i]);
 			attTable.add(row);
 
@@ -735,8 +1184,8 @@ bool TeGeoOpAggregation(TeLayer* newLayer, TeTheme* theme, vector<string> agregA
 }
 
 
-bool TeGeoOpAdd(TeLayer* newLayer, TeTheme* theme, TeThemeVector themeVec, 
-				TeSelectedObjects selOb,TeAsciiFile* logFile)
+bool TeGeoOpAdd(TeLayer* newLayer, TeTheme* theme, vector<TeTheme*> themeVec, 
+				TeSelectedObjects selOb,TeAsciiFile* /* logFile */)
 {
 	
 	bool insertAttr = false;
@@ -757,6 +1206,8 @@ bool TeGeoOpAdd(TeLayer* newLayer, TeTheme* theme, TeThemeVector themeVec,
 	mainParams.setSelecetObjs(selOb);
 	TeQuerier* mainQuerier = new TeQuerier(mainParams);
 
+	TeGeomRep themeGeomRep = (TeGeomRep)(theme->visibleGeoRep() & ~TeTEXT); // TeTEXT not is considered;
+
 	if(!mainQuerier->loadInstances())
 		return false;
 
@@ -786,16 +1237,17 @@ bool TeGeoOpAdd(TeLayer* newLayer, TeTheme* theme, TeThemeVector themeVec,
 	while(mainQuerier->fetchInstance(st))
 	{
 		TeTableRow row;
-		TePropertyVector vect = st.getPropertyVector();
+		vector<string>& vect = st.getProperties();
 		row.push_back(Te2String(++newId));
 
 		//insert os valores do tema principal
 		for(int p=0; p<(int)vect.size();++p)
-			row.push_back(vect[p].value_);
+			row.push_back(vect[p]);
 
 		attrTable.add(row);
 				
-		if(!multiGeometryToLayer(st.geometries(), Te2String(newId), newLayer))
+		//insert in this layer only the visible geometries of the theme 
+		if(!multiGeometryToLayer(st.geometries(), Te2String(newId), newLayer, 0, themeGeomRep))
 			return false; 
 		
 		if((newId%100)==0)
@@ -821,7 +1273,6 @@ bool TeGeoOpAdd(TeLayer* newLayer, TeTheme* theme, TeThemeVector themeVec,
 
 	for(int i=0; i<(int)themeVec.size(); ++i)
 	{
-
 		TeTheme* temp = themeVec[i];
 		TeProjection* projTemp = temp->layer()->projection();
 		
@@ -831,6 +1282,8 @@ bool TeGeoOpAdd(TeLayer* newLayer, TeTheme* theme, TeThemeVector themeVec,
 		params.setSelecetObjs (selOb);
 		TeQuerier* querier = new TeQuerier(params);
 
+		TeGeomRep tempGeomRep = (TeGeomRep)(temp->visibleGeoRep() & ~TeTEXT); // TeTEXT not is considered;
+
 		if(!querier->loadInstances())
 			return false;
 
@@ -858,7 +1311,7 @@ bool TeGeoOpAdd(TeLayer* newLayer, TeTheme* theme, TeThemeVector themeVec,
 		while(querier->fetchInstance(st))
 		{
 			TeTableRow row;
-			TePropertyVector vect = st.getPropertyVector();
+			vector<string>& vect = st.getProperties();
 			row.push_back(Te2String(++newId));
 
 			//insert the values when the names are equals
@@ -868,12 +1321,12 @@ bool TeGeoOpAdd(TeLayer* newLayer, TeTheme* theme, TeThemeVector themeVec,
 				if(s<0)
 					row.push_back("");
 				else
-					row.push_back(vect[s].value_);
+					row.push_back(vect[s]);
 			}
 
 			attrTable.add(row);
 					
-			if(!multiGeometryToLayer(st.geometries(), Te2String(newId), newLayer, projTemp))
+			if(!multiGeometryToLayer(st.geometries(), Te2String(newId), newLayer, projTemp, tempGeomRep))
 				return false; 
 										
 			if((newId%100)==0)
@@ -909,26 +1362,35 @@ bool TeGeoOpOverlayIntersection(TeLayer* newLayer, TeTheme* theme, TeTheme* them
 	if((!newLayer) || (!theme) || (!themeTrim))
 		return false;
 
+// check the theme with less polygons
+	bool invert = false;
+
+	TeGeomRep geomRepTheme = (TeGeomRep)(theme->visibleGeoRep() & ~TeTEXT); // TeTEXT not is considered;
+	TeGeomRep geomRepThemeTrim = (TeGeomRep)(themeTrim->visibleGeoRep() & ~TeTEXT); // TeTEXT not is considered;
+
+	if((geomRepTheme == TePOLYGONS) && (geomRepThemeTrim==TePOLYGONS))
+	{
+		int themeCount = countNumGeometries(theme, selOb);
+		int themeTrimCount = countNumGeometries(themeTrim, selObTrim);
+
+		if(themeTrimCount > themeCount)
+		{
+			if(geomRepTheme == TePOLYGONS)
+			{
+				invert = true;
+
+				TeTheme* aux = theme;
+				theme = themeTrim;
+				themeTrim = aux;
+			}
+		}
+	}
+
 	bool insertAttr = false;
 	int dt = CLOCKS_PER_SEC/4;
 	int dt2 = CLOCKS_PER_SEC * 5;
 	clock_t	t0, t1, t2;
 		
-	TeLayer* layer = theme->layer();
-	TeLayer* layerTrim = themeTrim->layer();
-
-	TeProjection* proj = layer->projection();
-	TeProjection* projTrim = layerTrim->projection();
-
-	//Querier Trim
-	TeQuerierParams paramsTrim(true, true);
-	paramsTrim.setParams(themeTrim);
-	paramsTrim.setSelecetObjs(selObTrim);
-	TeQuerier  querierTrim(paramsTrim); 
-
-	if(!querierTrim.loadInstances())
-		return  false;
-
 	// ----------------- begin create attribute table
 
 	TeAttributeList attrList;
@@ -940,47 +1402,85 @@ bool TeGeoOpOverlayIntersection(TeLayer* newLayer, TeTheme* theme, TeTheme* them
 	at.rep_.isAutoNumber_ = false;
 	attrList.push_back(at);
 
-	//theme
-	TeQuerierParams paramsTemp(false, true);
-	paramsTemp.setParams(theme);
-	TeQuerier* querierTemp = new TeQuerier(paramsTemp);
+	TeAttrTableVector attrTablesAux;
 
-	if(!querierTemp->loadInstances())
-		return false;
+	if(invert)
+		themeTrim->getAttTables(attrTablesAux, TeAttrStatic);		
+	else
+		theme->getAttTables(attrTablesAux, TeAttrStatic);		
 
-	//get attribute list from querier
-	TeAttributeList attribs = querierTemp->getAttrList();
-	TeAttributeList::iterator it = attribs.begin();
-	while(it != attribs.end())
+	for(unsigned int idx = 0; idx < attrTablesAux.size(); ++idx)
 	{
-		attrList.push_back (*it);
-		++it;
+		TeAttributeList& attlistAux = attrTablesAux[idx].attributeList();
+
+		TeAttributeList::iterator it = attlistAux.begin();
+
+		while(it != attlistAux.end())
+		{
+			TeAttribute at = *it;
+			at.rep_.isPrimaryKey_ = false;
+
+			attrList.push_back(at);
+			++it;
+		}
 	}
-						
-	delete querierTemp;
 
-	//trim
-	attribs.clear();
-	attribs = querierTrim.getAttrList(); 
+	attrTablesAux.clear();
 
-	//fill attributes from Trim theme 
 	if(attrTrim)
 	{
-		it = attribs.begin();
-		while(it != attribs.end())
+		if(invert)
+			theme->getAttTables(attrTablesAux, TeAttrStatic);	
+		else
+			themeTrim->getAttTables(attrTablesAux, TeAttrStatic);	
+
+		for(unsigned int idx = 0; idx < attrTablesAux.size(); ++idx)
 		{
-			attrList.push_back (*it);
-			++it;
+			TeAttributeList& attlistAux = attrTablesAux[idx].attributeList();
+
+			TeAttributeList::iterator it = attlistAux.begin();
+
+			while(it != attlistAux.end())
+			{
+				TeAttribute at = *it;
+				at.rep_.isPrimaryKey_ = false;
+
+				attrList.push_back(at);
+				++it;
+			}
 		}
-	}
+	}	
 
 	changeAttrList(attrList);
+
 	attrList[0].rep_.isPrimaryKey_ = true;  //link attribute is primary key
 	
-	TeTable attrTable (newLayer->name(), attrList, attrList[0].rep_.name_, attrList[0].rep_.name_);
+	TeTable attrTable(newLayer->name(), attrList, attrList[0].rep_.name_, attrList[0].rep_.name_);
 
 	if(!newLayer->createAttributeTable(attrTable))
         return false;
+
+// query geometries
+
+	TeLayer* layer = theme->layer();
+	TeLayer* layerTrim = themeTrim->layer();
+
+	TeProjection* proj = layer->projection();
+	TeProjection* projTrim = layerTrim->projection();
+
+	//Querier Trim
+	TeQuerierParams paramsTrim(true, true);
+	paramsTrim.setParams(themeTrim);
+
+	if(invert)
+		paramsTrim.setSelecetObjs(selOb);
+	else
+		paramsTrim.setSelecetObjs(selObTrim);
+
+	TeQuerier  querierTrim(paramsTrim); 
+
+	if(!querierTrim.loadInstances())
+		return  false;
 	
 	// ----------------- End create attribute table
 	int numPolygonsTrim = querierTrim.numElemInstances();
@@ -1003,6 +1503,9 @@ bool TeGeoOpOverlayIntersection(TeLayer* newLayer, TeTheme* theme, TeTheme* them
 	TeSTInstance trim;
 	int newId = 0;
 
+// this map stores the id of boundary cells, that we need to decide atribute value
+	map<string, map<string, double> > cellMap;
+
 	while(querierTrim.fetchInstance(trim))
 	{
 		TePolygonSet polSet;
@@ -1010,13 +1513,13 @@ bool TeGeoOpOverlayIntersection(TeLayer* newLayer, TeTheme* theme, TeTheme* them
 			continue;
 
 		TeTableRow rowTrim;
-		if(attrTrim)
+		if(invert || attrTrim)
 		{
 			//fill attribute values from trim
-			TePropertyVector vecTrim = trim.getPropertyVector();
+			vector<string>& vecTrim = trim.getProperties();
 
 			for(int p=0; p<(int)vecTrim.size();++p)
-				rowTrim.push_back(vecTrim[p].value_);
+				rowTrim.push_back(vecTrim[p]);
 		}
 
 		TePolygonSet ps;
@@ -1033,18 +1536,39 @@ bool TeGeoOpOverlayIntersection(TeLayer* newLayer, TeTheme* theme, TeTheme* them
 				TePolygon pout;
 				TeVectorRemap (polyTrim, projTrim, pout, proj);
 				polyTrim = pout;
+				polyTrim.objectId(polSet[i].objectId());
 			}
 
+			// before intersection, valid polygon holes (union of holes)
 			TePolygonSet polyTrimSet;
-			polyTrimSet.add(polyTrim);
+			if(!TeOVERLAY::TeValidPolygonHoles(polyTrim, polyTrimSet))
+			{
+				// when the operation returns false, write in the log a possible
+				// inconsistency in the data
+				if (logFile)
+				{
+					string mess = "Nao foi possivel realizar a consistencia dos aneis internos ";
+					mess += polyTrim.objectId();
+					mess += " do tema " + themeTrim->name() + ".";
+					logFile->writeString(mess);
+					logFile->writeNewLine();
+				}
+
+				continue;
+			}
 
 			TeBox boxTrim = polyTrim.box();
 
 			//Querier - theme that will be clip
 			TeQuerierParams params(true, true);
 			params.setParams(theme);
-			params.setSelecetObjs(selOb);
-			params.setSpatialRest(boxTrim, TeINTERSECTS, TeGEOMETRYNONE);
+
+			if(invert)
+				params.setSelecetObjs(selObTrim);
+			else
+				params.setSelecetObjs(selOb);
+
+			params.setSpatialRest(boxTrim, TeINTERSECTS, geomRepTheme);
 
 			TeQuerier querier(params);
 
@@ -1055,56 +1579,98 @@ bool TeGeoOpOverlayIntersection(TeLayer* newLayer, TeTheme* theme, TeTheme* them
 			while(querier.fetchInstance(sti))
 			{
 				TeTableRow row;
-				TePropertyVector vect = sti.getPropertyVector();
+				vector<string>& vect = sti.getProperties();
 				row.push_back("");
 
-				//insert values of the theme that is been clip 
-				for(int p=0; p<(int)vect.size();++p)
-					row.push_back(vect[p].value_);
-
-				if(attrTrim)  
+				if(invert)
 				{
 					for(int i=0; i<(int)rowTrim.size(); ++i)
 						row.push_back(rowTrim[i]);
+
+					if(attrTrim)
+					{
+						//insert values of the theme that is been clip 
+						for(int p=0; p<(int)vect.size();++p)
+							row.push_back(vect[p]);
+					}
 				}
+				else
+				{
+					//insert values of the theme that is been clip 
+					for(int p=0; p<(int)vect.size();++p)
+						row.push_back(vect[p]);
+
+					if(attrTrim)
+					{
+						for(int i=0; i<(int)rowTrim.size(); ++i)
+							row.push_back(rowTrim[i]);
+					}
+				}	
 				
-				if(sti.hasPolygons())
+				if(sti.hasPolygons() && (geomRepTheme==TePOLYGONS))
 				{
-					TePolygonSet polSet;
-					sti.getGeometry (polSet);
+					TePolygonSet polSetTheme;
+					sti.getGeometry (polSetTheme);
+					TePolygonSet polSetAux;
+					TePolygonSet resultPS;
 
-					for(int j=0; j<(int)polSet.size(); ++j)
+					for(int j=0; j<(int)polSetTheme.size(); ++j)
 					{
-						TePolygonSet psAux, resultPS;
-						psAux.add(polSet[j]);
-						if(!TeOVERLAY::TeIntersection(polyTrimSet, psAux, resultPS))
+						if(TeIntersects(polSetTheme[j].box(), polyTrim.box()))
+							polSetAux.add(polSetTheme[j]);
+					}
+
+					// before intersection, valid polygon holes (union of holes)
+					TePolygonSet polSetValidHoles;
+					if(!TeOVERLAY::TeValidPolygonHoles(polSetAux, polSetValidHoles))
+					{
+						// when the operation returns false, write in the log a possible
+						// inconsistency in the data
+						if (logFile)
 						{
-							// when the operation returns false, write in the log a possible
-							// inconsistency in the data
-							if (logFile)
-							{
-								string mess = "Possivel inconsistencia na interseccao do objeto ";
-								mess += polyTrim.objectId();
-								mess += " do tema " + themeTrim->name() + " e ";
-								mess += polSet[j].objectId();
-								mess += theme->name();
-								logFile->writeString(mess);
-								logFile->writeNewLine();
-							}
+							string mess = "Nao foi possivel realizar a consistencia dos aneis internos ";
+							mess += polyTrim.objectId();
+							mess += " do tema " + themeTrim->name() + " e ";
+							mess += polSetTheme[0].objectId();
+							mess += theme->name();
+							logFile->writeString(mess);
+							logFile->writeNewLine();
 						}
-						
-						for(int c=0; c<(int)resultPS.size(); ++c)
+
+						continue;
+					}
+
+					if(!TeOVERLAY::TeIntersection(polyTrimSet, polSetValidHoles, resultPS))
+					{
+						// when the operation returns false, write in the log a possible
+						// inconsistency in the data
+						if (logFile)
 						{
-							newId++;
-							TePolygon paux = resultPS[c];
-							paux.objectId(Te2String(newId));
-							ps.add(paux);
-							row[0] = Te2String(newId);
-							attrTable.add(row);
+							string mess = "Possivel inconsistencia na interseccao do objeto ";
+							mess += polyTrim.objectId();
+							mess += " do tema " + themeTrim->name() + " e ";
+							mess += polSetTheme[0].objectId();
+							mess += theme->name();
+							logFile->writeString(mess);
+							logFile->writeNewLine();
 						}
 					}
+
+					if(resultPS.empty())
+						continue;
+
+					newId++;
+					string strnewid = Te2String(newId);
+					row[0] = strnewid;
+					attrTable.add(row);
+
+					for(int c=0; c<(int)resultPS.size(); ++c)
+					{							
+						resultPS[c].objectId(strnewid);
+						ps.add(resultPS[c]);
+					}
 				}
-				else if (sti.hasLines())
+				else if (sti.hasLines() && (geomRepTheme==TeLINES))
 				{
 					TeLineSet lineSet;
 					sti.getGeometry (lineSet);
@@ -1130,7 +1696,7 @@ bool TeGeoOpOverlayIntersection(TeLayer* newLayer, TeTheme* theme, TeTheme* them
 						}
 					}
 				}
-				else if (sti.hasPoints())
+				else if (sti.hasPoints() && (geomRepTheme==TePOINTS))
 				{
 					TePointSet pointSet;
 					sti.getGeometry (pointSet);
@@ -1147,14 +1713,18 @@ bool TeGeoOpOverlayIntersection(TeLayer* newLayer, TeTheme* theme, TeTheme* them
 						}
 					}
 				}
-				else if (sti.hasCells())
+				else if (sti.hasCells() && (geomRepTheme==TeCELLS))
 				{
 					TeCellSet cellSet;
-					sti.getGeometry (cellSet);
+					sti.getGeometry (cellSet);					
 
 					for(int j=0; j<(int)cellSet.size(); ++j)
 					{
-						if(TeIntersects(cellSet[j], polyTrim))
+						TePolygon pCell = TeMakePolygon(cellSet[j].box());
+						
+						short rel = TeRelation(pCell, polyTrim);
+
+						if((rel & TeWITHIN) || (rel & TeCOVEREDBY))
 						{
 							newId++;
 							cellSet[j].objectId(Te2String(newId));
@@ -1162,6 +1732,37 @@ bool TeGeoOpOverlayIntersection(TeLayer* newLayer, TeTheme* theme, TeTheme* them
 							row[0] = Te2String(newId);
 							attrTable.add(row);
 						}
+						else
+						{							
+							TePolygonSet pCells;
+							pCells.add(pCell);
+							TePolygonSet resultPS;
+
+							if(!TeOVERLAY::TeIntersection(pCells, polyTrimSet, resultPS))
+							{
+								// when the operation returns false, write in the log a possible
+								// inconsistency in the data
+								if(logFile)
+								{
+									string mess = "Possivel inconsistencia na interseccao do objeto ";
+									mess += polyTrim.objectId();
+									mess += " do tema " + themeTrim->name() + " e ";
+									mess += cellSet[j].objectId();
+									mess += theme->name();
+									logFile->writeString(mess);
+									logFile->writeNewLine();
+								}
+
+								continue;
+							}
+
+							if(resultPS.empty())
+								continue;
+
+							double area = TeGeometryArea(resultPS);
+
+							insertArea(cellSet[j].objectId(), polyTrim.objectId(), area, cellMap);
+						}
 					}
 
 				}
@@ -1169,14 +1770,18 @@ bool TeGeoOpOverlayIntersection(TeLayer* newLayer, TeTheme* theme, TeTheme* them
 		}//for each polygon of the Trim theme
 
 		//inserir a geometria no banco
-		if(layer->hasGeometry(TePOLYGONS) && ps.size())
+		if(geomRepTheme == TePOLYGONS && ps.size())
 			newLayer->addPolygons(ps);
-		else if(layer->hasGeometry(TeLINES) && ls.size())
+		else if(geomRepTheme == TeLINES && ls.size())
 			newLayer->addLines(ls);
-		else if(layer->hasGeometry(TePOINTS) && pts.size())
+		else if(geomRepTheme == TePOINTS && pts.size())
 			newLayer->addPoints(pts);
 		else if(cs.size())
+		{
+			cs.resX(theme->layer()->getRepresentation(TeCELLS)->resX_);
+			cs.resY(theme->layer()->getRepresentation(TeCELLS)->resY_);
 			newLayer->addCells(cs);
+		}
 
 		trim.clear();
 
@@ -1203,13 +1808,30 @@ bool TeGeoOpOverlayIntersection(TeLayer* newLayer, TeTheme* theme, TeTheme* them
 		}
 	} //while fetch instance querier Trim
 
-	if(TeProgress::instance())
-			TeProgress::instance()->reset();
-
 	newLayer->saveAttributeTable(attrTable); //save the last records!!!
 	if(attrTable.size()>0)
 		insertAttr = true;
 
+	if(TeProgress::instance())
+			TeProgress::instance()->reset();
+
+	if(!cellMap.empty())
+	{
+		bool res = false;
+		if(attrTrim)
+			res = insertBoundaryCells(newId, newLayer, cellMap, theme, themeTrim);
+		else
+			res = insertBoundaryCells(newId, newLayer, cellMap, theme, 0);
+
+		if(!res)
+		{
+			if(TeProgress::instance())
+				TeProgress::instance()->reset();
+
+			return false;
+		}
+	}
+
 	if(!newLayer->box().isValid())
 		return false;
 
@@ -1220,7 +1842,7 @@ bool TeGeoOpOverlayIntersection(TeLayer* newLayer, TeTheme* theme, TeTheme* them
 }
 
 bool TeGeoOpAssignDataLocationDistribute(TeTheme* themeMod, TeTheme* theme, const string& tableName, 
-										 const int& spatialRelation)
+										 const int& spatialRelation, const vector<string>& attributes)
 {
 	if((!themeMod) || (!themeMod->layer()) ||  (!theme))
 		return false;
@@ -1233,9 +1855,14 @@ bool TeGeoOpAssignDataLocationDistribute(TeTheme* themeMod, TeTheme* theme, cons
 	TeProjection* projMod = layerMod->projection();
 	TeProjection* proj = theme->layer()->projection();
 	
+	TeGeomRep geomRepThemeMod = (TeGeomRep)(themeMod->visibleGeoRep() & ~TeTEXT);
+	TeGeomRep geomRepTheme = (TeGeomRep)(theme->visibleGeoRep() & ~TeTEXT);
+
 	//Querier from theme 
 	TeQuerierParams params(true, true);
 	params.setParams(theme);
+	if (!attributes.empty())
+		params.setFillParams(true,false,attributes);
 	TeQuerier  querier(params); 
 
 	if(!querier.loadInstances())
@@ -1274,9 +1901,9 @@ bool TeGeoOpAssignDataLocationDistribute(TeTheme* themeMod, TeTheme* theme, cons
 	
 	// ----------------- End create attribute table
 	vector<string> objIds;
-	if( (theme->layer()->hasGeometry(TePOLYGONS)) || 
-		(theme->layer()->hasGeometry(TeCELLS))    ||
-		((themeMod->layer()->hasGeometry(TeLINES)) && (theme->layer()->hasGeometry(TeLINES)))) 
+	if( (geomRepTheme == TePOLYGONS) || 
+		(geomRepTheme == TeCELLS)    ||
+		((geomRepThemeMod == TeLINES) && (geomRepTheme == TeLINES))) 
 	{
 		int numElem = querier.numElemInstances();
 		
@@ -1307,10 +1934,10 @@ bool TeGeoOpAssignDataLocationDistribute(TeTheme* themeMod, TeTheme* theme, cons
 			row.push_back("");
 			emptyRow.push_back("");
 
-			TePropertyVector vec = sti.getPropertyVector();
+			vector<string>& vec = sti.getProperties();
 			for(int p=0; p<(int)vec.size();++p)
 			{
-				row.push_back(vec[p].value_);
+				row.push_back(vec[p]);
 				emptyRow.push_back ("");
 			}
 			
@@ -1326,12 +1953,12 @@ bool TeGeoOpAssignDataLocationDistribute(TeTheme* themeMod, TeTheme* theme, cons
 				if(!((*proj) == (*projMod)))
 				{
 					TeGeometry* gout; 
-					if(geoms[i]->elemType() == TePOLYGONS)
+					if(geoms[i]->elemType()==TePOLYGONS && geomRepTheme==TePOLYGONS)
 					{
 						gout = new TePolygon;
 						TeVectorRemap (*((TePolygon*)geoms[i]), proj, *((TePolygon*)gout), projMod);
 					}
-					else if (geoms[i]->elemType() == TeCELLS)
+					else if (geoms[i]->elemType() == TeCELLS && geomRepTheme==TeCELLS)
 					{
 						gout = new TeCell;
 						TeVectorRemap (*((TeCell*)geoms[i]), proj, *((TeCell*)gout), projMod);
@@ -1349,7 +1976,7 @@ bool TeGeoOpAssignDataLocationDistribute(TeTheme* themeMod, TeTheme* theme, cons
 				//querier that will be modified
 				TeQuerierParams paramsMod(false, false);
 				paramsMod.setParams(themeMod);
-				paramsMod.setSpatialRest(geoms[i], spatialRelation, TeGEOMETRYNONE);
+				paramsMod.setSpatialRest(geoms[i], spatialRelation, geomRepThemeMod);
 				TeQuerier querierMod(paramsMod);
 
 				if(!querierMod.loadInstances())
@@ -1434,6 +2061,8 @@ return false;
 	TeLayer* layer = theme->layer();
 	TeLayer* layerOverlay = themeOverlay->layer();
 
+	TeGeomRep geomRepTheme = (TeGeomRep)(theme->visibleGeoRep() & ~TeTEXT);
+	
 	TeProjection* proj = layer->projection();
 	TeProjection* projOverlay = layerOverlay->projection();
 
@@ -1525,10 +2154,10 @@ return false;
 
 		TeTableRow rowOverlay;
 		//fill attribute values from Overlay
-		TePropertyVector vecOverlay = Overlay.getPropertyVector();
+		vector<string>& vecOverlay = Overlay.getProperties();
 
 		for(int p=0; p<(int)vecOverlay.size();++p)
-			rowOverlay.push_back(vecOverlay[p].value_);
+			rowOverlay.push_back(vecOverlay[p]);
 
 		TePolygonSet ps;
 //		TeCellSet cs;
@@ -1554,7 +2183,7 @@ return false;
 			TeQuerierParams params(true, true);
 			params.setParams(theme);
 			params.setSelecetObjs(selOb);
-			params.setSpatialRest(boxOverlay, TeINTERSECTS, TeGEOMETRYNONE);
+			params.setSpatialRest(boxOverlay, TeINTERSECTS, geomRepTheme);
 
 			TeQuerier querier(params);
 
@@ -1565,17 +2194,17 @@ return false;
 			while(querier.fetchInstance(sti))
 			{
 				TeTableRow row;
-				TePropertyVector vect = sti.getPropertyVector();
+				vector<string>& vect = sti.getProperties();
 				row.push_back("");
 
 				//insert values of the theme that is been clip 
 				for(int p=0; p<(int)vect.size();++p)
-					row.push_back(vect[p].value_);
+					row.push_back(vect[p]);
 
 				for(int i=0; i<(int)rowOverlay.size(); ++i)
 					row.push_back(rowOverlay[i]);
 				
-				if(sti.hasPolygons())
+				if(sti.hasPolygons() && (geomRepTheme==TePOLYGONS))
 				{
 					TePolygonSet polSet;
 					sti.getGeometry (polSet);
@@ -1631,7 +2260,7 @@ return false;
 		}//for each polygon of the Overlay theme
 
 		//inserir a geometria no banco
-		if(layer->hasGeometry(TePOLYGONS) && ps.size())
+		if(geomRepTheme==TePOLYGONS && ps.size())
 			newLayer->addPolygons(ps);
 //		else if(cs.size())
 //			newLayer->addCells(cs);
@@ -1685,33 +2314,41 @@ bool TeGeoOpAssignByLocationCollect(TeTheme* restrTheme, TeTheme* srcTheme,
 	if(!restrTheme || !restrTheme->layer() ||		// no spatial restriction theme
 	   !srcTheme ||									// no source theme
 	   newTableName.empty() ||						// no output table name 
-	   measuresColl.empty())							// no set of measures to collect
-		return false;
-
-	// verifies that spatial restriction is given by polygons or cells
-	TeGeomRep restrRep = (TeGeomRep)(restrTheme->layer()->geomRep() & ~TeTEXT);
-	if (restrRep != TePOLYGONS && restrRep != TeCELLS)
-		return false;
-
-	int dt = CLOCKS_PER_SEC/4;
-	int dt2 = CLOCKS_PER_SEC * 5;
-	clock_t	t0, t1, t2;
+	   measuresColl.empty())
+	   return false;
+
+	// verifies if the souce and restriction themes are compatible
+	TeGeomRep restrRep = (TeGeomRep)(restrTheme->visibleGeoRep() & ~TeTEXT);
+	TeGeomRep srcRep =  (TeGeomRep)(srcTheme->visibleGeoRep() & ~TeTEXT);
+	TeRaster* rst = 0;
+	if (srcRep == TeRASTER)
+	{
+		if (restrRep != TePOINTS)
+			return false;
+		rst = srcTheme->layer()->raster();
+		if (!rst)
+			return false;
+	}
+	else
+	{
+		if (restrRep != TePOLYGONS && restrRep != TeCELLS)	// no set of measures to collect
+			return false;
+	}
 
 	TeProjection* restrProj = restrTheme->layer()->projection();
 	TeProjection* srcProj	= srcTheme->layer()->projection();
-
 	bool doRemap = !(*restrProj == *srcProj);
 
 	// try to retrieve the geometries of the spatial restriction theme
 	TeQuerierParams params(true, false);
 	params.setParams(restrTheme);
 	TeQuerier spatialRestrictions(params); 
-
 	if(!spatialRestrictions.loadInstances())
 		return false;
 
 	// there is at least one restriction geometry, so create the output table
 	// defines its attribute list
+
 	TeAttributeList attrList;
 	TeAttribute at;
 	at.rep_.type_ = TeSTRING;
@@ -1719,10 +2356,11 @@ bool TeGeoOpAssignByLocationCollect(TeTheme* restrTheme, TeTheme* srcTheme,
 	at.rep_.numChar_ = 255;
 	attrList.push_back(at);
 	vector<int>  countAttr;
-
 	int attrNum = 1;
+	vector<int> bandCollection;
+
 	TeGroupingAttr::iterator it = measuresColl.begin();		// for each different measure
-	while (it != measuresColl.end())								// create a new attribute
+	while (it != measuresColl.end())						// create a new attribute
 	{
 		at.rep_ = it->first;
 		at.rep_.isPrimaryKey_ = false;
@@ -1736,7 +2374,22 @@ bool TeGeoOpAssignByLocationCollect(TeTheme* restrTheme, TeTheme* srcTheme,
 		}
 		else
 			at.rep_.name_ = nameTemp;
-				
+
+		if (srcRep == TeRASTER)
+		{
+			int nn = at.rep_.name_.find("_");
+			int b = atoi(at.rep_.name_.substr(4,nn-4).c_str());
+			bandCollection.push_back(b);
+			if (rst->params().dataType_[b]== TeFLOAT || 
+				rst->params().dataType_[b]== TeDOUBLE)
+				at.rep_.type_ = TeREAL;
+			else
+				at.rep_.type_ = TeINT;
+			attrList.push_back(at);
+			++it;
+			continue;
+		}
+			
 		if (it->second == TeCOUNT || it->second == TeVALIDCOUNT)
 		{
 			at.rep_.type_ = TeINT;
@@ -1744,10 +2397,12 @@ bool TeGeoOpAssignByLocationCollect(TeTheme* restrTheme, TeTheme* srcTheme,
 		}
 		else if (at.rep_.type_ == TeINT)
 			at.rep_.type_ = TeREAL;
+
 		attrList.push_back(at);
 		++it;
 		++attrNum;
 	}	
+
 	changeAttrList(attrList);	// validates attribute list						
 	attrList[0].rep_.isPrimaryKey_ = true;
 	attrList[0].rep_.isAutoNumber_ = false;
@@ -1757,14 +2412,14 @@ bool TeGeoOpAssignByLocationCollect(TeTheme* restrTheme, TeTheme* srcTheme,
         return false;
 
 	//use function to point and cell
-	TeGeomRep srcRep = (TeGeomRep)(srcTheme->layer()->geomRep() & ~TeTEXT);
 	TeDatabase* db = restrTheme->layer()->database();
 	int spatialRes = TeOVERLAPS | TeWITHIN | TeCOVEREDBY | TeCROSSES;
 	bool sqlGroup = false;
 	
 	if( (*restrProj==*srcProj) && 
 		(((restrRep==TeCELLS) && (srcRep==TePOINTS)) ||
-		((restrRep==TeCELLS) && (srcRep==TeCELLS) && ((spatialRelation==TeINTERSECTS) || (spatialRelation==spatialRes)))))
+		((restrRep==TeCELLS) && (srcRep==TeCELLS) && ((spatialRelation==TeINTERSECTS) || 
+		(spatialRelation==spatialRes)))))
 	{
 		if(TeCellStatistics(restrTheme, measuresTable, measuresColl, srcTheme, restrTheme->layer()->database()))
 			sqlGroup = db->insertTableInfo(restrTheme->layer()->id(),measuresTable);
@@ -1772,8 +2427,11 @@ bool TeGeoOpAssignByLocationCollect(TeTheme* restrTheme, TeTheme* srcTheme,
 
 	if(sqlGroup)
 		return true;
-	
-	if(TeProgress::instance())								// sets the progress bar
+
+	int dt = CLOCKS_PER_SEC/4;
+	int dt2 = CLOCKS_PER_SEC * 5;
+	clock_t	t0, t1, t2;
+	if(TeProgress::instance())								// sets the progress bar
 	{
 		string caption = "Assign Data By Location";
 		string msg = "Executing collecting. Please, wait!";
@@ -1788,12 +2446,91 @@ bool TeGeoOpAssignByLocationCollect(TeTheme* restrTheme, TeTheme* srcTheme,
 	TePrecision::instance().setPrecision(tol);	
 
 	unsigned int nregions = 0;
-	TePolygonSet restrPols;
-	TeCellSet restrCells;
 	TeSTInstance restrInstance;
 
+	// a special case is when the source theme has a raster representation
+	if (srcRep == TeRASTER && restrRep == TePOINTS)
+	{
+		TePointSet restrPoints;
+		unsigned int npt;
+		unsigned int nbs;
+		while (spatialRestrictions.fetchInstance(restrInstance)) 
+		{
+			restrPoints.clear();
+			TeMultiGeometry mGeom;
+			restrInstance.getGeometry(mGeom);
+			restrPoints = mGeom.getPoints();
+			if (doRemap)
+			{
+				TePointSet restrPointAux;
+				TeVectorRemap(restrPoints,restrProj,restrPointAux,srcProj);
+				restrPoints.clear();
+				restrPoints = restrPointAux;
+			}
+			TeCoord2D lc;
+			double val;
+			string sval;
+
+			TeTableRow row;
+			int nrows = 0;
+			for (npt=0; npt<restrPoints.size(); ++npt)
+			{
+				row.clear();
+				row.push_back(restrInstance.objectId());	// identify the instance
+				for (nbs=0; nbs<bandCollection.size();++nbs)
+				{
+					TeCoord2D loc = restrPoints[npt].location();
+					lc = rst->params().coord2Index(loc);
+					if (rst->getElement(TeRoundRasterIndex(lc.x()),TeRoundRasterIndex(lc.y()),val,nbs))
+					{
+						if (rst->params().dataType_[0] == TeUNSIGNEDCHAR ||
+						    rst->params().dataType_[0] == TeCHAR)
+							sval = Te2String(static_cast<int>(val));
+						else
+							sval = Te2String(val,5);
+						row.push_back(sval);
+					}	
+					else
+						row.push_back("");
+				}
+			}
+			measuresTable.add(row);
+			row.clear();
+			nrows++;	
+			if (measuresTable.size()>100)	// saves chunks of 100 records
+			{
+				restrTheme->layer()->saveAttributeTable(measuresTable); 
+				measuresTable.clear();
+			}
+			++nregions;
+			t2 = clock();
+			if ( int(t2-t1) > dt && TeProgress::instance())
+			{
+				t1 = t2;
+				if(TeProgress::instance()->wasCancelled())
+				{
+					TeProgress::instance()->reset();
+					return false;
+				}
+				if((int)(t2-t0) > dt2)
+					TeProgress::instance()->setProgress(nregions);
+			}
+		}
+		if (measuresTable.size() > 0)	// saves remaining records
+		{
+			restrTheme->layer()->saveAttributeTable(measuresTable); 
+			measuresTable.clear();
+		}
+		if (TeProgress::instance())
+			TeProgress::instance()->reset();
+		return true;
+	}
+
+	TePolygonSet restrPols;
+	TeCellSet restrCells;
 	while(spatialRestrictions.fetchInstance(restrInstance)) // collect data for each geometry
-	{														// of the spatial restriction set
+	{	
+		// of the spatial restriction set
 		// defines a querier to select measures from objects that
 		// are delimited by the a geometry and a spatial restriction
 		TeQuerierParams par2(false,measuresColl);
@@ -1813,7 +2550,7 @@ bool TeGeoOpAssignByLocationCollect(TeTheme* restrTheme, TeTheme* srcTheme,
 				restrCells.clear();
 				restrCells = restrCellsAux;
 			}
-			par2.setSpatialRest(&restrCells,spatialRelation,TeGEOMETRYNONE);
+			par2.setSpatialRest(&restrCells,spatialRelation,srcRep);
 		}
 		else									// restriction is given by a cell set geometry
 		{
@@ -1825,7 +2562,7 @@ bool TeGeoOpAssignByLocationCollect(TeTheme* restrTheme, TeTheme* srcTheme,
 				restrPols.clear();
 				restrPols = restrPolsAux;
 			}
-			par2.setSpatialRest(&restrPols,spatialRelation,TeGEOMETRYNONE);
+			par2.setSpatialRest(&restrPols,spatialRelation,srcRep);
 		}
 		// creates a querier to retrieve the desired measures of the objects inside the 
 		// spatial restriction
@@ -1841,9 +2578,9 @@ bool TeGeoOpAssignByLocationCollect(TeTheme* restrTheme, TeTheme* srcTheme,
 			TeSTInstance sourceInstance;
 			unsigned int p;								// get the calculated attributes
 			sourceMeasures.fetchInstance(sourceInstance);
-			TePropertyVector vec = sourceInstance.getPropertyVector();
+			vector<string>& vec = sourceInstance.getProperties();
 			for(p=0; p<vec.size();++p)
-				row.push_back(vec[p].value_);
+				row.push_back(vec[p]);
 		}
 		else 
 		{
@@ -1913,13 +2650,13 @@ bool TeGeoOpOverlayDifference(TeLayer* newLayer, TeTheme* theme1,
 	if (layer1->getAttrTables(vetTables,TeAttrStatic))
 	{
 		for (t=0; t<vetTables.size(); ++t)
-			linkNames.push_back(vetTables[t].linkName());
+			linkNames.push_back(TeConvertToUpperCase(vetTables[t].linkName()));
 	}
 	vetTables.clear();
 	if (layer1->getAttrTables(vetTables,TeAttrEvent))
 	{
 		for (t=0; t<vetTables.size(); ++t)
-			linkNames.push_back(vetTables[t].linkName());
+			linkNames.push_back(TeConvertToUpperCase(vetTables[t].linkName()));
 	}
 
 	TeProjection* proj1 = layer1->projection();
@@ -1943,7 +2680,7 @@ bool TeGeoOpOverlayDifference(TeLayer* newLayer, TeTheme* theme1,
 	while (it != theme1AttrList.end())
 	{
 		attrList.push_back(*it);
-		vector<string>::iterator it2 = find(linkNames.begin(), linkNames.end(), (*it).rep_.name_);
+		vector<string>::iterator it2 = find(linkNames.begin(), linkNames.end(), TeConvertToUpperCase((*it).rep_.name_));
 		if (it2 != linkNames.end())
 			npk = aux1;
 		++it;
@@ -1952,7 +2689,7 @@ bool TeGeoOpOverlayDifference(TeLayer* newLayer, TeTheme* theme1,
 
 	// change attribute names if necessary and create a new attribute table
 	changeAttrList(attrList);
-	attrList[0].rep_.isPrimaryKey_ = true;  
+	attrList[npk].rep_.isPrimaryKey_ = true;
 	TeTable attrTable (newLayer->name(), attrList, attrList[npk].rep_.name_, attrList[npk].rep_.name_);
 	if(!newLayer->createAttributeTable(attrTable))
        return false;
@@ -1978,17 +2715,22 @@ bool TeGeoOpOverlayDifference(TeLayer* newLayer, TeTheme* theme1,
 	TeSTInstance elem1;
 	while(querier1.fetchInstance(elem1))	// for each object of theme 1
 	{
-		TePolygonSet polSet1;
-		if(!elem1.getGeometry(polSet1))
+		TePolygonSet polSet1Aux;
+		if(!elem1.getGeometry(polSet1Aux))
 			continue;
+		
+		TePolygonSet polSet1;
+		if(!TeOVERLAY::TeValidPolygonHoles(polSet1Aux, polSet1))
+			return false;
 
 		TePolygonSet resultAux;
 
 		// querier to the theme 2
+		TeGeomRep gRepTheme2 = (TeGeomRep)(theme2->visibleGeoRep() & ~TeTEXT); // TeTEXT not is considered;
 		TeQuerierParams params2(true,false);
 		params2.setParams(theme2);
 		params2.setSelecetObjs(selOb2);
-		params2.setSpatialRest(polSet1.box(), TeINTERSECTS, TeGEOMETRYNONE);
+		params2.setSpatialRest(polSet1.box(), TeINTERSECTS, gRepTheme2);
 
 		TeQuerier querier2(params2);
 		if(!querier2.loadInstances())
@@ -2029,17 +2771,37 @@ bool TeGeoOpOverlayDifference(TeLayer* newLayer, TeTheme* theme1,
 				}
 			}// for each intersection object of theme 2 
 
+			// before union, valid polygon holes (union of holes)
+			TePolygonSet polSetAux;
+			if(!TeOVERLAY::TeValidPolygonHoles(polSet2, polSetAux))
+				return false;
+
+			// Make union of all objects from theme 2 that intersects objects from theme 1
+			TePolygonSet bluePols;
+
+			if(!TeOVERLAY::TeUnion(polSetAux, bluePols))
+			{
+				if(logFile)
+				{
+					string mess = "Possivel inconsistencia na uniao dos obejtos do tema 2 que interceptam o objeto ";
+					mess += polSet1[0].objectId();
+					mess += " do tema " + theme1->name();
+					logFile->writeString(mess);
+					logFile->writeNewLine();
+				}
+			}
+
 			// try to recover the difference between the geometry of the current object
 			// from theme 1 and the geometries of the objects from theme 2 that intercept
 			// current object from theme 1
-			if(!TeOVERLAY::TeDifference(polSet1, polSet2, resultAux))
+			if(!TeOVERLAY::TeDifference(polSet1, bluePols, resultAux))
 			{
 				// when the operation returns false, writes in the error log file a possible
 				// inconsistency in the data
 				if (logFile)
 				{
 					string mess = "Possivel inconsistencia na diferenca do objeto ";
-					mess += polSet1.objectId();
+					mess += polSet1[0].objectId();
 					mess += " do tema " + theme1->name() + " e ";
 					if (!oids.empty())
 						mess += oids[0];
@@ -2055,14 +2817,14 @@ bool TeGeoOpOverlayDifference(TeLayer* newLayer, TeTheme* theme1,
 		if (!resultAux.empty())
 		{
 			TeTableRow row;
-			TePropertyVector vecOverlay = elem1.getPropertyVector();
+			vector<string>& vecOverlay = elem1.getProperties();
 
 			for (unsigned int p=0; p<vecOverlay.size();++p)
-				row.push_back(vecOverlay[p].value_);
+				row.push_back(vecOverlay[p]);
 			attrTable.add(row);
 			row.clear();
 			for (unsigned int l=0; l <resultAux.size(); l++)
-				resultAux[l].objectId(vecOverlay[npk].value_);
+				resultAux[l].objectId(vecOverlay[npk]);
 			newLayer->addPolygons(resultAux);
 		}
 		steps++;
@@ -2095,3 +2857,756 @@ bool TeGeoOpOverlayDifference(TeLayer* newLayer, TeTheme* theme1,
 		return false;
 	return true;
 }
+
+bool TeGeoOpBuffer(TeLayer* newLayer, TeTheme* themeIn, const TeSelectedObjects& selOb, const TeBUFFERREGION::TeBufferType& bufferType, const double& bufferDistance, 
+				   const unsigned int& bufferLevels, const unsigned int& numPoints, const bool& doUnion, const string& tableName, const string& attrName,
+				   TeAsciiFile* logFile)
+{
+	if(!newLayer || !themeIn)
+		return false;
+	
+	vector<string> attrs;
+	bool	distBasedOnAttr = false;
+	double	dist = bufferDistance;
+
+	//Verify if the distance is based on an attribute
+	if(!tableName.empty() && !attrName.empty())
+	{
+		attrs.push_back (tableName+"."+attrName);
+		distBasedOnAttr = true;
+	}
+	
+	TePrecision::instance().setPrecision(TeGetPrecision(newLayer->projection()) / 10.0);
+		
+	//define a list of attributes
+	TeAttributeList attList;
+	TeAttribute at;
+	at.rep_.type_ = TeSTRING;
+	at.rep_.numChar_ = 16;
+	at.rep_.name_ = "object_id_";
+	at.rep_.isPrimaryKey_ = true;
+	attList.push_back(at);
+
+	at.rep_.type_ = TeINT;       
+	at.rep_.name_ = "bufferLevel";
+	at.rep_.isPrimaryKey_ = false;
+	attList.push_back(at);  
+
+	if(!distBasedOnAttr || !doUnion)
+	{
+		at.rep_.type_ = TeREAL;       
+		at.rep_.name_ = "bufferDistance";
+		at.rep_.isPrimaryKey_ = false;
+		attList.push_back(at);  
+	}
+
+	TeTable attTable(newLayer->name()+"_Attr", attList, "object_id_", "object_id_");	
+
+	//create attribute table 
+	if (!newLayer->createAttributeTable(attTable))
+	{
+		// when the operation returns false, write in the log a possible
+		// inconsistency in the data
+		if (logFile)
+		{
+			string mess = "Error creating attribute table! ";
+			logFile->writeString(mess);
+			logFile->writeNewLine();
+		}
+		return false;
+	}
+
+	//insert a polygon representation in the new layer 		
+	if(!newLayer->addGeometry(TePOLYGONS, newLayer->name()+"_pols"))
+	{
+		// when the operation returns false, write in the log a possible
+		// inconsistency in the data
+		if (logFile)
+		{
+			string mess = "Error adding polygon table! ";
+			logFile->writeString(mess);
+			logFile->writeNewLine();
+		}
+		return false;
+	}
+   		
+	//querier to load all objects from database	
+	TeQuerierParams params(true,attrs);
+	params.setParams(themeIn);
+	params.setSelecetObjs(selOb);
+	TeQuerier querier(params);
+
+	if(!querier.loadInstances())
+	{
+		// when the operation returns false, write in the log a possible
+		// inconsistency in the data
+		if (logFile)
+		{
+			string mess = "Error loading objects from database! ";
+			logFile->writeString(mess);
+			logFile->writeNewLine();
+		}
+		return false;
+	}
+
+	//progress bar
+	int total = querier.numElemInstances();
+	if(TeProgress::instance())
+	{
+		string caption = "Buffer operation";
+		string msg;
+		if(doUnion)
+			msg = "Executing buffer operation. Please, wait!";
+		else
+			msg = "Executing buffer operation and saving the \n results in the database. Please, wait!";
+		TeProgress::instance()->setCaption(caption.c_str());
+		TeProgress::instance()->setMessage(msg);
+		TeProgress::instance()->setTotalSteps(total);
+	}
+	
+	vector<TePolygonSet>	result;
+	for(unsigned int j=0; j<bufferLevels; ++j)
+		result.push_back (TePolygonSet());
+
+	TeTableRow		row;
+	TeSTInstance	sti;
+	int count = 0;
+	while(querier.fetchInstance(sti))
+	{
+		TePolygonSet	polSetIn;
+		TeLineSet		lineSetIn;
+		TePointSet		pointSetIn;
+		TeCellSet		cellSetIn;
+		vector<TePolygonSet>	bufferResult;
+		
+		//progress bar
+		if(TeProgress::instance())
+		{
+			if(TeProgress::instance()->wasCancelled())
+			{
+				TeProgress::instance()->reset();
+				return false;
+			}
+			TeProgress::instance()->setProgress(count);
+		}
+
+		//get the distance
+		if(distBasedOnAttr)
+		{
+			dist = sti[0];
+			if(dist==0) //if there is no distance to this instance, continue
+			{
+				++count;
+				continue;
+			}
+		}
+		
+		bool bufferOperation = false;
+		if(sti.hasPolygons())
+		{
+			sti.getGeometry(polSetIn);
+			// generate the buffers of each polygon of the set (polSetIn) and do the union
+			// of the same distance buffers for each object
+			bufferOperation = TeBUFFERREGION::TeBufferRegion(polSetIn, dist, numPoints, bufferLevels, bufferType, bufferResult);
+		}
+		else if(sti.hasLines())
+		{
+			sti.getGeometry(lineSetIn);
+			// generate the buffers of each line of the set (lineSetIn) and do the union
+			// of the same distance buffers 
+			bufferOperation = TeBUFFERREGION::TeBufferRegion(lineSetIn, dist, numPoints, bufferLevels, bufferResult);
+		}
+		else if(sti.hasPoints())
+		{
+			sti.getGeometry(pointSetIn);
+			// generate the buffers of each point of the set (pointSetIn) and do the union
+			// of the same distance buffers 
+			bufferOperation = TeBUFFERREGION::TeBufferRegion(pointSetIn, dist, numPoints, bufferLevels, bufferResult);
+		}
+		else if(sti.hasCells())
+		{
+			sti.getGeometry(cellSetIn);
+			// generate the buffers of each cell of the set (cellSetIn) and do the union
+			// of the same distance buffers 
+			bufferOperation = TeBUFFERREGION::TeBufferRegion(cellSetIn, dist, numPoints, bufferLevels, bufferType, bufferResult);
+		}
+		else
+		{
+			if(TeProgress::instance())
+				TeProgress::instance()->reset();
+			return false;
+		}
+		
+		if(!bufferOperation)
+		{
+			if (logFile)
+			{	
+				string mess = "Error in the buffer operation over object_id:  ";
+				mess += sti.objectId();
+				logFile->writeString(mess);
+				logFile->writeNewLine();
+			}
+			++count;
+			continue;
+		}
+		
+		//Stores the buffer to do the union of each level 
+		if(doUnion) 
+		{
+			for(unsigned int level=0; level<bufferResult.size(); ++level)
+			{
+				for(unsigned int pol=0; pol<bufferResult[level].size(); ++pol)
+					result[level].add(bufferResult[level][pol]);
+			}
+		}
+		else
+		{
+			for(unsigned int level=0; level<bufferResult.size(); ++level)
+			{
+				string slevel = Te2String(level+1);
+				bufferResult[level].objectId(sti.objectId()+"_"+slevel);
+				//attribute
+				row.clear();
+				row.push_back(sti.objectId()+"_"+slevel);
+				row.push_back(slevel);
+				row.push_back(Te2String(dist*(level+1)));
+				attTable.add(row);
+				//geometry
+				for(unsigned int pol=0; pol<bufferResult[level].size(); ++pol)
+					result[level].add(bufferResult[level][pol]);
+			}
+
+			if(count%100==0)
+			{
+				//store buffer attribute and geometries
+				//saves attributes
+				if (!newLayer->saveAttributeTable(attTable))
+				{
+					if(logFile)
+					{
+						string mess = "Error saving attributes in the attribute table! ";
+						logFile->writeString(mess);
+						logFile->writeNewLine();
+					}
+					if(TeProgress::instance())
+						TeProgress::instance()->reset();
+					return false;
+				}
+				attTable.clear();
+				
+				//saves geometries
+				for(unsigned int level=0; level<bufferResult.size(); ++level)
+				{
+					if(!newLayer->addPolygons(result[level]))
+					{
+						if(logFile)
+						{
+							string mess = "Error saving buffers in the geometric table! ";
+							logFile->writeString(mess);
+							logFile->writeNewLine();
+						}
+						if(TeProgress::instance())
+						{
+							TeProgress::instance()->reset();
+						}
+						return false;
+					}
+					result[level].clear();
+				}
+				
+			}
+		}
+		++count;
+	}
+
+	if(doUnion)
+	{
+		//progress bar
+		if(TeProgress::instance())
+		{
+			string caption = "Dissolve operation";
+			TeProgress::instance()->setCaption(caption.c_str());
+			string msg = "Executing dissolve operation and saving the \n results in the database. Please, wait!";
+			TeProgress::instance()->setMessage(msg);
+			TeProgress::instance()->setTotalSteps((int)bufferLevels);
+		}
+			
+		//do the union for each level
+		int objId = 0;
+		TePolygonSet prevLevelPolSet;
+		for(unsigned int level=0; level<result.size(); ++level)
+		{
+			TePolygonSet curLevelPolSet;
+			if(!TeOVERLAY::TePairUnion(result[level], curLevelPolSet))
+			{
+				if(logFile)
+				{
+					string mess = "Error in the union of the buffers of the level ";
+					mess += Te2String(level+1) +" !";
+					logFile->writeString(mess);
+					logFile->writeNewLine();
+				}
+				if(TeProgress::instance())
+				{
+					TeProgress::instance()->reset();
+				}
+				return false;
+			}
+
+			if(level>0)
+			{
+				TePolygonSet auxPolSet;
+				//Difference between current level union and union of previous levels 
+				if(!TeOVERLAY::TeDifference (curLevelPolSet, prevLevelPolSet, auxPolSet))
+				{
+					if(logFile)
+					{
+						string mess = "Error in the difference between buffers of the level ";
+						mess += Te2String(level+1) +" and buffers of the level ";
+						mess += Te2String(level) +" !";
+						logFile->writeString(mess);
+						logFile->writeNewLine();
+					}
+					if(TeProgress::instance())
+					{
+						TeProgress::instance()->reset();
+					}
+					return false;
+				}
+
+				curLevelPolSet.clear();
+				for(unsigned int j=0; j< auxPolSet.size(); ++j)
+                    curLevelPolSet.add(auxPolSet[j]);
+
+				//Do the union between current level and previous levels
+				auxPolSet.clear();
+				if((level+1)<result.size())
+				{
+					if(!TeOVERLAY::TeUnion (curLevelPolSet, prevLevelPolSet, auxPolSet))
+					{
+						if(logFile)
+						{
+							string mess = "Error in the union between buffers of the level ";
+							mess += Te2String(level+1) +" and buffers of the level ";
+							mess += Te2String(level) +" !";
+							logFile->writeString(mess);
+							logFile->writeNewLine();
+						}
+
+						if(TeProgress::instance())
+						{
+							TeProgress::instance()->reset();
+						}
+
+						return false;
+					}
+
+					prevLevelPolSet.clear();
+					for(unsigned int j=0; j< auxPolSet.size(); ++j)
+						prevLevelPolSet.add(auxPolSet[j]);
+				}
+			}
+			else
+			{
+				for(unsigned int j=0; j< curLevelPolSet.size(); ++j)
+                    prevLevelPolSet.add(curLevelPolSet[j]);
+			}
+
+			for(unsigned int k=0; k<curLevelPolSet.size(); ++k)
+			{
+				string objectId = Te2String(objId);
+				++objId;
+				curLevelPolSet[k].objectId(objectId);
+				//attribute
+				row.clear();
+				row.push_back(objectId);
+				row.push_back(Te2String(level+1));
+				if(!distBasedOnAttr)
+					row.push_back(Te2String(dist*(level+1)));
+				attTable.add(row);
+			}
+			
+			//saves attributes
+			if (!newLayer->saveAttributeTable(attTable))
+			{
+				if(logFile)
+				{
+					string mess = "Error saving attributes in the attribute table! ";
+					logFile->writeString(mess);
+					logFile->writeNewLine();
+				}
+				if(TeProgress::instance())
+					TeProgress::instance()->reset();
+				return false;
+			}
+			attTable.clear();
+				
+			//saves geometries
+			if(!newLayer->addPolygons(curLevelPolSet))
+			{
+				if(logFile)
+				{
+					string mess = "Error saving buffers in the geometric table! ";
+					logFile->writeString(mess);
+					logFile->writeNewLine();
+				}
+				if(TeProgress::instance())
+					TeProgress::instance()->reset();
+				return false;
+			}
+
+			//progress bar
+			if(TeProgress::instance())
+			{
+				if(TeProgress::instance()->wasCancelled())
+				{
+					TeProgress::instance()->reset();
+					return false;
+				}
+				TeProgress::instance()->setProgress(level+1);
+			}
+		} //for
+	}
+	else
+	{
+		//saves attributes
+		if (!newLayer->saveAttributeTable(attTable))
+		{
+			if(logFile)
+			{
+				string mess = "Error saving attributes in the attribute table! ";
+				logFile->writeString(mess);
+				logFile->writeNewLine();
+			}
+			if(TeProgress::instance())
+				TeProgress::instance()->reset();
+			return false;
+		}
+		
+		//saves geometries
+		for(unsigned int level=0; level<result.size(); ++level)
+		{
+			if(!newLayer->addPolygons(result[level]))
+			{
+				if(logFile)
+				{
+					string mess = "Error saving buffers in the geometric table! ";
+					logFile->writeString(mess);
+					logFile->writeNewLine();
+				}
+				if(TeProgress::instance())
+					TeProgress::instance()->reset();
+				return false;
+			}
+			result[level].clear();
+		}
+	}
+	if(TeProgress::instance())
+		TeProgress::instance()->reset();
+	return true;
+}
+
+bool 
+TeGeoOpOverlayIntersection(TeLayer* newLayer, TeTheme* theme, TeTheme* themeTrim, TeSelectedObjects selObTrim, double backValue, TeAsciiFile* logFile)
+{
+	// check if the input parameters are valid
+	if((!newLayer) || (!theme) || (!themeTrim))
+		return false;
+
+	// check if the theme to be clipped has a raster geometry valid
+	TeRaster* rst = theme->layer()->raster();
+	if (!rst) 
+		return false;
+
+	//Querier Trim
+	TeQuerierParams paramsTrim(true, true);
+	paramsTrim.setParams(themeTrim);
+	paramsTrim.setSelecetObjs(selObTrim);
+	TeQuerier  querierTrim(paramsTrim); 
+	if(!querierTrim.loadInstances())
+		return  false;
+	
+	TeSTInstance trim;
+	TePolygonSet ps;
+	while(querierTrim.fetchInstance(trim))
+	{
+		TePolygonSet polSet;
+		if(!trim.getGeometry(polSet))
+			continue;
+		for(int i=0; i<(int)polSet.size(); ++i)
+		{
+			TePolygon polyTrim = polSet[i];
+			// before intersection, valid polygon holes (union of holes)
+			TePolygonSet polyTrimSet;
+			if(!TeOVERLAY::TeValidPolygonHoles(polyTrim, polyTrimSet))
+			{
+				// when the operation returns false, write in the log a possible
+				// inconsistency in the data
+				if (logFile)
+				{
+					string mess = "Nao foi possivel realizar a consistencia dos aneis internos ";
+					mess += polyTrim.objectId();
+					mess += " do tema " + themeTrim->name() + ".";
+					logFile->writeString(mess);
+					logFile->writeNewLine();
+				}
+				continue;
+			}
+			ps.add(polSet[i]);
+		}//for each polygon of the Trim theme
+	}
+
+	// there are no valid polygons to be used as mask to clip raster representation
+	if (ps.empty())
+		return false;
+
+	// finds a valid name for the table that contains the raster geometry
+	string rasterTableName = "RasterLayer" + Te2String(newLayer->id())+"_R_O1";
+	rasterTableName = newLayer->database()->getNewTableName(rasterTableName);
+
+	// tries to execute the clipping
+	TeRaster* rstClip = TeRasterClipping(rst, ps, themeTrim->layer()->projection(), rasterTableName, backValue, "DB");
+	newLayer->addRasterGeometry(rstClip,"O1");
+    return true;
+}
+
+bool TeGeoOpNearestNeighbour(TeTheme* inputTheme, TeSelectedObjects iselObj, 
+							 TeTheme* neighTheme, TeSelectedObjects nnselObj, 
+							 const string& distColName, const string& NNIDColName)
+{
+	if (!inputTheme || !neighTheme)
+		return false;
+
+	// retrieve the the centroids of all objects candidates to be the nearest neighbour
+	TeQuerierParams qPar(true, false);
+	qPar.setParams(neighTheme);
+	qPar.setSelecetObjs(iselObj);
+	TeQuerier* querier = new TeQuerier(qPar);
+	if (!querier->loadInstances())
+	{
+		delete querier;
+		return false;
+	}
+
+	TeProjection* pInput = inputTheme->layer()->projection();
+	TeProjection* pNeigh = neighTheme->layer()->projection();
+
+	bool doReproj = false;
+	if (!(*pInput == *pNeigh))
+	{
+		pNeigh->setDestinationProjection(pInput);
+		doReproj = true;
+	}
+		
+	string newDistCol = distColName;
+	if (newDistCol.empty())
+		newDistCol = "DIST";
+
+	int dt = CLOCKS_PER_SEC/4;
+	int dt2 = CLOCKS_PER_SEC * 5;
+	clock_t	t0, t1, t2;
+	if(TeProgress::instance())
+	{
+		TeProgress::instance()->setTotalSteps(querier->numElemInstances());
+		t2 = clock();
+		t0 = t1 = t2;
+	}
+	unsigned int step=0;
+	std::vector<std::pair<TeCoord2D, TePoint> > dataSet;
+	TeSTInstance st;
+	TeMultiGeometry multigeo;
+	string lastOID;
+	while(querier->fetchInstance(st))
+	{
+		TeCoord2D cc;
+		st.centroid(cc);
+		if (doReproj)
+		{
+			TeCoord2D ll = pNeigh->PC2LL(cc);
+			cc = pInput->LL2PC(cc);
+		}
+		TePoint pt(cc);
+		pt.objectId(st.objectId());
+		dataSet.push_back(std::pair<TeCoord2D, TePoint>(cc, pt)); 
+		t2 = clock();
+		if (((int(t2-t1) > dt) && TeProgress::instance()))
+		{
+			t1 = t2;
+			if(TeProgress::instance()->wasCancelled())
+			{
+				TeProgress::instance()->reset();
+				return false;
+			}
+			if((int)(t2-t0) > dt2)
+				TeProgress::instance()->setProgress(step);
+		}
+		++step;
+	}
+	if (TeProgress::instance())
+		TeProgress::instance()->reset();
+
+	step = 0;
+	TeBox candExt = querier->getBox();
+	delete querier;
+
+// create a spatial index of the centroids of the candidates
+	typedef TeSAM::TeAdaptativeKdTreeNode<TeCoord2D, std::vector<TePoint>, TePoint> KDNODE;
+	typedef TeSAM::TeAdaptativeKdTree<KDNODE> KDTREE;
+
+	unsigned int bucketSize = 3 * 1; //
+	KDTREE tree(candExt, bucketSize); 
+	tree.build(dataSet); 
+	dataSet.clear(); 
+
+//	verifies how to save the results
+	bool updateNNId = false;
+	TeAttribute attr;	
+	TeAttrTableVector attTables;
+	inputTheme->getAttTables(attTables, TeAttrStatic);
+
+	// always save the distance column
+	string tableName = "";
+	string dcolName = distColName;
+	unsigned int pos = distColName.find('.');
+	if (pos != std::string::npos)
+	{
+		tableName = distColName.substr(0,pos);
+		unsigned int nchars = distColName.size()-1;
+		dcolName = distColName.substr(pos+1,nchars);
+	}
+
+	string objectIdCol;
+	if (tableName.empty())
+	{
+		tableName = attTables[0].name();
+		objectIdCol = attTables[0].linkName();
+	}
+	else
+	{
+		TeAttrTableVector::iterator it = attTables.begin();
+		while (it != attTables.end())
+		{
+			if ((*it).name() == tableName)
+			{
+				objectIdCol = (*it).linkName();
+				break;
+			}
+			++it;
+		}
+	}
+
+	if (inputTheme->layer()->database()->columnExist(tableName,dcolName,attr))
+	{
+		if (attr.rep_.type_!= TeREAL)
+		{
+			inputTheme->layer()->database()->deleteColumn(tableName,dcolName);
+			attr.rep_.type_ = TeREAL;
+			if (!inputTheme->layer()->database()->addColumn(tableName,attr.rep_))
+			{
+				// can not create the distance column
+				delete querier;
+				return false;
+			}
+		}
+	}
+	else
+	{
+		attr.rep_.type_ = TeREAL;
+		attr.rep_.name_ = dcolName;
+		if (!inputTheme->layer()->database()->addColumn(tableName,attr.rep_))
+		{
+			// can not create the distance column
+			delete querier;
+			return false;
+		}
+	}
+
+	// save nn id only when requested
+	string nnidcol;
+	if (!NNIDColName.empty())
+	{
+		updateNNId = true;
+		nnidcol = NNIDColName;
+		pos = NNIDColName.find('.');
+		if (pos != std::string::npos)
+			nnidcol = NNIDColName.substr(pos+1,NNIDColName.size());
+
+		if (inputTheme->layer()->database()->columnExist(tableName,nnidcol,attr))
+		{
+			if (attr.rep_.type_!= TeSTRING)
+			{
+				inputTheme->layer()->database()->deleteColumn(tableName,nnidcol);
+				attr.rep_.type_ = TeSTRING;
+				attr.rep_.numChar_ = 100;
+				if (!inputTheme->layer()->database()->addColumn(tableName,attr.rep_))
+					updateNNId = false;
+			}
+		}
+		else
+		{
+			attr.rep_.type_ = TeSTRING;
+			attr.rep_.name_ = nnidcol;
+			attr.rep_.numChar_ = 100;
+			if (!inputTheme->layer()->database()->addColumn(tableName,attr.rep_))
+				updateNNId = false;
+		}
+	}
+
+// retrieve the objects to find the nearest neighbour 
+	qPar.setParams(inputTheme);
+	qPar.setSelecetObjs(nnselObj);
+	querier = new TeQuerier(qPar);
+	if (!querier->loadInstances())
+	{
+		delete querier;
+		return false;
+	}
+
+	std::vector<TePoint> report;
+	report.push_back(TePoint(TeMAXFLOAT, TeMAXFLOAT));
+	std::vector<double> sqrDists;
+	multigeo.clear();
+	lastOID = "";
+	string sql;
+
+	if(TeProgress::instance())
+	{
+		TeProgress::instance()->setTotalSteps(querier->numElemInstances());
+		t2 = clock();
+		t0 = t1 = t2;
+	}
+
+	while(querier->fetchInstance(st))
+	{
+		TeCoord2D cc;
+		st.centroid(cc);
+		tree.nearestNeighborSearch(cc, report, sqrDists, 1);
+		if (updateNNId)
+			sql = "UPDATE " + tableName + " SET " + nnidcol + "='" + report[0].objectId() + "', " + dcolName + "=" + Te2String(sqrt(sqrDists[0]),4);
+		else
+			sql = "UPDATE " + tableName + " SET " + dcolName + "=" + Te2String(sqrt(sqrDists[0]),4);
+		sql += " WHERE " + objectIdCol + "='" + st.objectId().c_str() + "'";
+		if (!inputTheme->layer()->database()->execute(sql))
+		{
+			delete querier;
+			return false;
+		}
+		if (((t2-t1) > dt) && (TeProgress::instance()))
+		{
+			t1 = t2;
+			if(TeProgress::instance()->wasCancelled())
+			{
+				TeProgress::instance()->reset();
+				return false;
+			}
+			if ((t2-t0) > dt2)
+				TeProgress::instance()->setProgress(step);
+		}
+		++step;
+	}
+	if (TeProgress::instance())
+		TeProgress::instance()->reset();
+	delete querier;
+	return true;
+}
+
diff --git a/src/terralib/functions/TeGeoProcessingFunctions.h b/src/terralib/functions/TeGeoProcessingFunctions.h
old mode 100644
new mode 100755
index 748e896..3035e5b
--- a/src/terralib/functions/TeGeoProcessingFunctions.h
+++ b/src/terralib/functions/TeGeoProcessingFunctions.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright  2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,32 +20,150 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeGeoProcessingFunctions.h
-    This file contains functions to generate new layers from 
-	spatial operations among themes 
+    \brief This file contains functions to generate new layers from spatial operations among themes 
 */
 
 #ifndef __TERRALIB_INTERNAL_GEOPROCESSING_H
-#define __TERRALIB_INTERNAL_GEOPROCESSING_H
-
-#include "TeDatabase.h" 
+#define __TERRALIB_INTERNAL_GEOPROCESSING_H 
 
-class TeAsciiFile;
+#include <vector>
+#include <string>
 
-bool TeGeoOpAggregation(TeLayer* newLayer, TeTheme* theme, vector<string> agregAttrVec, TeGroupingAttr& attrMM, TeSelectedObjects selOb, TeAsciiFile* logFile=0);		
+using std::vector;
+using std::string;
 
-bool TeGeoOpAdd(TeLayer* newLayer, TeTheme* theme, TeThemeVector themeVec, TeSelectedObjects selObj = TeAll, TeAsciiFile* logFile=0);
+#include <TeDataTypes.h>
+#include <TeAttribute.h>
+#include <TeBufferRegion.h>
 
+class TeAsciiFile;
+class TeTheme;
+class TeLayer;
+
+/** @defgroup GeoOp GeoProcessing functions
+	A set of functions that execute some common operations when dealing with geographical data
+ *  @{
+ */
+/** Agreggates the objects of a theme generating a new layer
+	\param newLayer			pointer to a valid layer already created in the database to store the result of the operation
+	\param theme			pointer to the theme being aggregated
+	\param agregAttrVect	a vector with the names of the attributes that should have the same value in order to aggregate two objects.
+	\param attrMM			the definition of the attributes (with the measures over it) that should passed to the new layer
+	\param selOb			a selection of the objects of the theme that should be aggregated
+	\param logFile			Optional: a pointer to a text file where error messages will be saved
+	\return true if it succeed and false otherwise
+*/
+bool TeGeoOpAggregation(TeLayer* newLayer, TeTheme* theme, vector<string>& agregAttrVec, TeGroupingAttr& attrMM, TeSelectedObjects selOb, TeAsciiFile* logFile=0);		
+
+/** Adds a set of themes generating a new layer
+	\param newLayer			pointer to a valid layer already created in the database to store the result of the operation
+	\param theme			pointer to the first theme being added: the new layer will have the same attributes as the this theme
+	\param themeVec			a vector of themes that should be added to the first one
+	\param selOb			a selection of the objects of the theme that should be added
+	\param logFile			Optional: a pointer to a text file where error messages will be saved
+	\return true if it succeed and false otherwise
+*/
+bool TeGeoOpAdd(TeLayer* newLayer, TeTheme* theme, vector<TeTheme*> themeVec, TeSelectedObjects selObj = TeAll, TeAsciiFile* logFile=0);
+
+/** Clips a theme generating a new layer
+	\param newLayer			pointer to a valid layer already created in the database to store the result of the operation
+	\param theme			pointer to the theme being clipped
+	\param themeTrim		pointer to the theme that has objects with polygon geometry that will be used as the mask for the clipping
+	\param selOb			a selection of the objects of the theme that should be clipped
+	\param selObTrim		a selection of the objects of the theme that should be used as mask
+	\param attrTrim			flag to indicate that the attributes of the mask theme should be included in the new layer
+	\param logFile			Optional: a pointer to a text file where error messages will be saved
+	\return true if it succeed and false otherwise
+*/
 bool TeGeoOpOverlayIntersection(TeLayer* newLayer, TeTheme* theme, TeTheme* themeTrim, TeSelectedObjects selOb, TeSelectedObjects selObTrim, bool attrTrim, TeAsciiFile* logFile=0);
 
-bool TeGeoOpOverlayUnion(TeLayer* newLayer, TeTheme* theme, TeTheme* themeOverlay, TeSelectedObjects selOb, TeSelectedObjects selObOverlay, TeAsciiFile* logFile=0);
+/** Clips a theme generated from a layer with raster representation generating a new layer
+	\param newLayer			pointer to a valid layer already created in the database to store the result of the operation
+	\param theme			pointer to the theme being clipped
+	\param themeTrim		pointer to the theme that has objects with polygon geometry that will be used as the mask for the clipping
+	\param selObTrim		a selection of the objects of the theme that should be used as mask
+	\param backValue		the value that should be used as the background
+	\param logFile			Optional: a pointer to a text file where error messages will be saved
+	\return true if it succeed and false otherwise
+*/
+bool TeGeoOpOverlayIntersection(TeLayer* newLayer, TeTheme* theme, TeTheme* themeTrim, TeSelectedObjects selObTrim, double backValue, TeAsciiFile* logFile=0);
 
-bool TeGeoOpAssignDataLocationDistribute(TeTheme* themeMod, TeTheme* theme, const string& tableName, const int& spatialRelation);
 
-bool TeGeoOpAssignByLocationCollect(TeTheme* restrTheme, TeTheme* srcTheme, const string& newTableName, TeGroupingAttr& measuresColl, const int& spatialRelation);
 
+/** Generates the geometrical difference between two themes (t1 - t2), generating a new layer
+	\param newLayer			pointer to a valid layer already created in the database to store the result of the operation
+	\param theme1			pointer to the first theme
+	\param theme2		    pointer to the second theme 
+	\param selOb			a selection of the objects of the first theme
+	\param selOb			a selection of the objects of the second theme
+	\param logFile			Optional: a pointer to a text file where error messages will be saved
+	\return true if it succeed and false otherwise
+*/
 bool TeGeoOpOverlayDifference(TeLayer* newLayer, TeTheme* theme1, TeTheme* theme2, TeSelectedObjects selOb1, TeSelectedObjects selOb2, TeAsciiFile* logFile=0);
 
+/** Assign Data By Location - Distribute: passes the attributes of the objects of a theme to the objects of a second theme based on a spatial relation
+	\param themeMod			pointer to theme that has the attributes that will be passed
+	\param theme			pointer to the theme that will receive the attributes
+	\param tableName		name of the table that will store the attributes passed from the first theme
+	\param spatialRelation	a spatial relation (or a combination of) that will be used as the criteria to pass the attributes between the themes
+	\param attributes		a list of attributes from the first theme that should be distributes to the second theme
+	\return true if it succeed and false otherwise
+*/
+bool TeGeoOpAssignDataLocationDistribute(TeTheme* themeMod, TeTheme* theme, const string& tableName, const int& spatialRelation, const vector<string>& attributes = vector<string>());
+
+/** Assign Data By Location - Collect: collects the attributes of the objects of a theme and assign it to second theme based on a spatial relation
+	\param restrTheme		pointer to theme that has the attributes that will be passed
+	\param srcTheme			pointer to the theme that has the attributes that will be collected 
+	\param newTableName		name of the table that will store the attributes collected
+	\param measuresColl		the definition of the attributes (with the measures over it) that should passed to first theme
+	\param spatialRelation	a spatial relation (or a combination of) that will be used as the criteria to pass the attributes between the themes
+	\return true if it succeed and false otherwise
+*/
+bool TeGeoOpAssignByLocationCollect(TeTheme* restrTheme, TeTheme* srcTheme, const string& newTableName, TeGroupingAttr& measuresColl, const int& spatialRelation);
+
+/** Generates a new layer with the buffers of the objects of a theme
+	\param newLayer			pointer to a new layer that will receive the buffers generated
+	\param themeIn			pointer to a source theme that will provide the objects to generate the buffers  
+	\param selOb			define which objects of the themeIn will be used
+	\param bufferType		define the buffer type: inside/outside/inside+outside
+	\param bufferDistance	the buffer distance in the same unit of the object geometries 
+	\param bufferLevels		the number of buffer rings
+	\param numPoints		the number of points that should be used to describe the curved corners of the buffer zone
+	\param doUnion			a flag to indicate if this function will dissolve barries among buffers
+	\param tableName		name of the attribute table that will provide an attribute that defines the buffer distance for each object
+	\param attrName			attribute name of the attribute table "tableName" that will provide the buffer distance for each object
+	\param logFile			Optional: a pointer to a text file where error messages will be saved
+	\return true if it succeed and false otherwise
+*/
+bool TeGeoOpBuffer(TeLayer* newLayer, TeTheme* themeIn, const TeSelectedObjects& selOb, const TeBUFFERREGION::TeBufferType& bufferType, const double& bufferDistance, 
+				   const unsigned int& bufferLevels, const unsigned int& numPoints, const bool& doUnion=false, const string& tableName="", const string& attrName="", 
+				   TeAsciiFile* logFile=0);
+
+/** \brief Calculates the distance to the nearest neighbour (NN)
+	This function calculates the distance of objetcs in the input theme to the nearest object in a neighbour candidates theme.
+	For complex geometries such as polygons, cells, lines, sets of geometries or multigeometries the NN is found
+	based on thedistance between the centroids of the geometries (for both input and for neighbour candidates objects).
+	If themes have different projections the distance will be computed using input theme projection.
+	
+	\param inputTheme		pointer to the theme that contains the objects to which the nearest neighbour are being searched
+	\param iselObj			a specific selection of the input theme  
+	\param neighTheme		pointer to the theme that contains the candidates to NN
+	\param nnselObj			a specific selection of NN theme
+	\param distColName		the name of the column that will contain the distance to the NN object. If empty, the name "DIST" will be used. If
+	the column should be created in a specific table, use the convention "tableName.colName", otherwise the first static table will be
+	sued. If the column exists its values will be updated, if it don't the column will be created.
+	\param NNIDColName		the name of the column that will contain the identification of the NN object. If empty the column won't be generated.
+	\return true if it succeed and false otherwise
+*/
+bool TeGeoOpNearestNeighbour(TeTheme* inputTheme, TeSelectedObjects iselObj, 
+							 TeTheme* neighTheme, TeSelectedObjects nnselObj, 
+							 const string& distColName = "", const string& NNIDColName = "");
+
+
+/** \internal */
+bool TeGeoOpOverlayUnion(TeLayer* newLayer, TeTheme* theme, TeTheme* themeOverlay, TeSelectedObjects selOb, TeSelectedObjects selObOverlay, TeAsciiFile* logFile=0);
+/** @} */ // End of group GeoOp 
+
 #endif
 
diff --git a/src/terralib/functions/TeImportBNA.cpp b/src/terralib/functions/TeImportBNA.cpp
old mode 100644
new mode 100755
index af5656c..0b50f7d
--- a/src/terralib/functions/TeImportBNA.cpp
+++ b/src/terralib/functions/TeImportBNA.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -33,7 +33,7 @@ of this library and its documentation.
 
 using namespace std;
 
-#include "TeImportExport.h"
+#include "TeDriverBNA.h"
 #include "TeTable.h"
 #include "TeGeometry.h"
 #include "TeAsciiFile.h"
@@ -217,6 +217,24 @@ bool TeImportBNA(TeLayer* layer, const string& bnaFileName, string attrTableName
 		
 		attTable.clear();
 	}	
+
+	// Create the spatial indexes
+	int rep = layer->geomRep();
+	if (rep & TePOINTS)
+	{
+		layer->database()->insertMetadata(layer->tableName(TePOINTS),layer->database()->getSpatialIdxColumn(TePOINTS), 0.0005,0.0005,layer->box());
+		layer->database()->createSpatialIndex(layer->tableName(TePOINTS),layer->database()->getSpatialIdxColumn(TePOINTS), (TeSpatialIndexType)TeRTREE);
+	}
+	if (rep & TeLINES)
+	{
+		layer->database()->insertMetadata(layer->tableName(TeLINES),layer->database()->getSpatialIdxColumn(TeLINES), 0.0005,0.0005,layer->box());
+		layer->database()->createSpatialIndex(layer->tableName(TeLINES),layer->database()->getSpatialIdxColumn(TeLINES), (TeSpatialIndexType)TeRTREE);
+	}
+	if (rep & TePOLYGONS)
+	{
+		layer->database()->insertMetadata(layer->tableName(TePOLYGONS),layer->database()->getSpatialIdxColumn(TePOLYGONS), 0.0005,0.0005,layer->box());
+		layer->database()->createSpatialIndex(layer->tableName(TePOLYGONS),layer->database()->getSpatialIdxColumn(TePOLYGONS), (TeSpatialIndexType)TeRTREE);
+	}
 	return true;
 }
 
@@ -403,8 +421,9 @@ bool TeBNARegionDecode(TeAsciiFile& bnaFile, TePolygonSet& temp, string& index,
 				else
 				{
 					for(j = 0; j < pVec.size(); ++j)
-					{						
-						if(TeWithin(p, pVec[j]))
+					{	
+						TePolygon paux = 	pVec[j];				
+						if(TeWithin(p, paux))
 						{
 							pVec[j].add(p[0]);
 							break;
diff --git a/src/terralib/functions/TeImportCSV.cpp b/src/terralib/functions/TeImportCSV.cpp
new file mode 100755
index 0000000..2422a2e
--- /dev/null
+++ b/src/terralib/functions/TeImportCSV.cpp
@@ -0,0 +1,252 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+
+#include <string>
+#include <iostream>
+
+#include "TeDriverCSV.h"
+#include "TeTable.h"
+#include "TeException.h"
+#include "TeUtils.h"
+#include "TeLayer.h"
+#include "TeProgress.h"
+#include "TeDatabase.h"
+#include "TeAsciiFile.h"
+
+
+inline bool TeReadCSVFile(const string& csvFileName, TeTable& attrTable, TeDatabase* db, TeLayer* layer, 
+					 const int& attributeX, const int& attributeY, const char& separator, 
+					 const bool& firstLineIsHeader, const unsigned int& chunkSize, 
+					 const bool& createAutoNum)
+{
+
+	//Get the indexes. There is already an attribute autoNumber.
+	int indexUniqueId, indexLink;
+	indexUniqueId = indexLink = -1;
+	indexLink = attrTable.attrLinkPosition();
+	indexUniqueId = attrTable.attrUniquePosition();
+	
+	//insert the data from csvFile
+	vector<string> row;
+	TeAsciiFile* csvFile = new TeAsciiFile(csvFileName);
+
+	unsigned int totalSteps = 0;
+	while(csvFile->isNotAtEOF())
+	{
+		csvFile->findNewLine();
+		++totalSteps;
+	}
+
+	csvFile->rewind();
+
+	if (TeProgress::instance())
+		TeProgress::instance()->setTotalSteps(totalSteps);
+		
+	// discard header row;
+	if (firstLineIsHeader && csvFile->isNotAtEOF())
+	{
+		csvFile->readStringListCSV(row,separator);
+		csvFile->findNewLine();
+		row.clear();
+	}
+
+	attrTable.clear();
+	
+	unsigned int nattr = attrTable.attributeList().size();
+	unsigned int nn=0;
+	vector<int> numCharsField;
+	for (nn=0; nn<nattr; ++nn)
+	{
+		if (attrTable.attributeList()[nn].rep_.type_ == TeSTRING)
+			numCharsField.push_back(attrTable.attributeList()[nn].rep_.numChar_);
+		else
+			numCharsField.push_back(-1);
+	}
+	if (createAutoNum)
+		--nattr;
+
+	unsigned int count = 0;
+	bool endOfFile = false;
+	while(!endOfFile)
+	{
+		unsigned int nrec = 0;
+
+		TePointSet ps;
+		//Gets chunkSize rows 
+		while (nrec < chunkSize && csvFile->isNotAtEOF())
+		{
+			TeTableRow trow;
+			csvFile->readStringListCSV(trow,separator);
+			if (trow.empty())
+			{
+				if(csvFile->isNotAtEOF())
+				{
+					csvFile->findNewLine();
+				}
+
+				break;
+			}
+			
+			for (nn=0; nn<nattr;++nn)
+			{
+				if (numCharsField[nn] > -1)
+				{
+					int nc = numCharsField[nn];
+					string aux = trow[nn].substr(0,nc);
+					trow[nn] = aux;
+				}
+			}
+
+			//if the first attribute is autonumber
+			if(createAutoNum)
+				trow.push_back (Te2String(count));
+            
+			//fill attributes 
+			attrTable.add(trow);
+
+			//fill points
+			if(attributeX>=0 && attributeY>=0 && layer)
+			{
+				TePoint p(atof(trow[attributeX].c_str()), atof(trow[attributeY].c_str()));
+				p.objectId(trow[indexLink]);
+				p.geomId(count);
+				ps.add(p);
+			}
+			csvFile->findNewLine();
+			trow.clear();
+			++nrec;
+			++count;
+		}
+		
+		endOfFile = !csvFile->isNotAtEOF();
+		//insert into attribute table
+		if (!db->insertTable(attrTable))
+		{
+			if (TeProgress::instance())
+				TeProgress::instance()->reset();
+			return false;
+		}
+		
+		//insert into point table
+		if(attributeX>=0 && attributeY>=0 && layer)
+		{
+			if(!layer->addPoints(ps))
+			{
+				if (TeProgress::instance())
+					TeProgress::instance()->reset();
+				return false;
+			}
+		}
+		attrTable.clear();
+		ps.clear();
+
+		if (TeProgress::instance())
+		{
+			if (TeProgress::instance()->wasCancelled())
+				break;
+			else
+				TeProgress::instance()->setProgress(count);
+		}
+	}
+	if (csvFile)
+	{
+		delete csvFile;
+		csvFile = 0; 
+	}
+
+
+	if (TeProgress::instance())
+		TeProgress::instance()->reset();
+	
+	//insert metadata : te_layer_table
+	int layerId = -1; //external table
+	if(layer)
+		layerId = layer->id();
+	
+	//attribute table metadata 
+	if(!db->insertTableInfo(layerId, attrTable))
+		return false;
+	
+	if(layer)
+		layer->addAttributeTable(attrTable);
+
+	//point table metadata 
+	if(attributeX>=0 && attributeY>=0 && layer)
+	{
+		 if(!db->insertMetadata(layer->tableName(TePOINTS),db->getSpatialIdxColumn(TePOINTS), 0.0005,0.0005,layer->box()))
+			return false;
+
+		 if(!db->createSpatialIndex(layer->tableName(TePOINTS),db->getSpatialIdxColumn(TePOINTS), (TeSpatialIndexType)TeRTREE))
+			return false;
+	}
+	return true;
+}
+
+
+bool TeImportCSVFile(const string& csvFileName, TeTable& attrTable, TeDatabase* db, TeLayer* layer, 
+					 const char& separator, const bool& firstLineIsHeader,  const unsigned int& chunkSize, 
+					 const bool& createAutoNum)
+{
+	//test database pointer
+	if(!db)
+		return false;
+	
+	//create attribute table
+	if(!db->createTable(attrTable.name(), attrTable.attributeList()))
+		return false;
+
+	//insert data
+	if(!TeReadCSVFile(csvFileName, attrTable, db, layer, -1, -1, separator, firstLineIsHeader, chunkSize, createAutoNum))
+	{
+		db->deleteTable(attrTable.name());
+		return false;
+	}
+	return true;
+}
+
+
+bool TeImportCSVFile(const string& csvFileName, const int& attributeX, const int& attributeY, 
+					 TeTable& attrTable, TeDatabase* db, TeLayer* layer, const char& separator, 
+					 const bool& firstLineIsHeader,  const unsigned int& chunkSize,  const bool& createAutoNum)
+{
+
+	//test database pointer
+	if(!db || !layer)
+		return false;
+	
+	//create attribute table
+	if(!db->createTable(attrTable.name(), attrTable.attributeList()))
+		return false;
+
+	//create geometry table
+	if(!layer->addGeometry(TePOINTS))
+		return false;
+		
+	//insert data
+	if(!TeReadCSVFile(csvFileName, attrTable, db, layer, attributeX, attributeY, separator, firstLineIsHeader, chunkSize, createAutoNum))
+	{
+		db->deleteTable(attrTable.name());
+		return false;
+	}
+	return true;
+}
diff --git a/src/terralib/functions/TeImportDBF.cpp b/src/terralib/functions/TeImportDBF.cpp
deleted file mode 100644
index 6183545..0000000
--- a/src/terralib/functions/TeImportDBF.cpp
+++ /dev/null
@@ -1,442 +0,0 @@
-/************************************************************************************
-TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The library provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use
-of this library and its documentation.
-*************************************************************************************/
-
-#include <string>
-#include <iostream>
-
-#include "shapefil.h"
-#include "TeImportExport.h"
-#include "TeTable.h"
-#include "TeException.h"
-#include "TeUtils.h"
-#include "TeLayer.h"
-#include "TeProgress.h"
-#include "TeDatabase.h"
-
-//! Fills a vector with the values of choosen column named , to be used as object identifications
-/*!
-	\param dbfFileName DBF file name
-	\param indexes a vector that has the identification of the objects
-	\param objectIdAttr name of the attribute that has the identification of objects
-	\note if no objectIdAttr is provided or there is no column with this name return
-	an incremental sequence of numbers.
-*/
-void TeReadDBFIndexes(const string& dbfFileName, vector<string>& indexes, const string objectIdAttr="");
-
-
-bool TeReadDBFAttributeList ( const string& dbfFileName, TeAttributeList& attList )
-{
-	string filePrefix = TeGetName (dbfFileName.c_str()) ;
-	string fileName = filePrefix + ".dbf";
-
-/* -------------------------------------------------------------------- */
-/*      Open the file.                                                  */
-/* -------------------------------------------------------------------- */
-    DBFHandle hDBF = DBFOpen( fileName.c_str(), "rb" );
-    if( hDBF == NULL )
-    {
-			throw TeException ( UNABLE_TO_OPEN_DBF_FILE );
-    }
-    
-/* -------------------------------------------------------------------- */
-/*	If there is no data in this file let the user know.		*/
-/* -------------------------------------------------------------------- */
-    if( DBFGetFieldCount(hDBF) == 0 )
-    {
-			throw TeException ( NO_DATA_IN_DBF_FILE );
-    }
-
-/* -------------------------------------------------------------------- */
-/*	Get Attributes header definitions.									*/
-/* -------------------------------------------------------------------- */
-	TeAttribute attribute;
-    
-	char	szTitle[12];
-	int		nWidth, nDecimals;
-	int 	i;
-
-	vector<string> names;
-
-	for( i = 0; i < DBFGetFieldCount(hDBF); i++ )
-    {
-		DBFFieldType	eType = DBFGetFieldInfo( hDBF, i, szTitle, &nWidth, &nDecimals );
-
-		string atname = TeConvertToUpperCase(szTitle);
-	
-		vector<string>::iterator it = find(names.begin(),names.end(),atname);
-		if (it != names.end())
-		{
-			string newname = atname + "_" + Te2String(i);
-			int c = i+1;
-			while (true)
-			{
-				it = find(names.begin(),names.end(),newname);
-				if (it == names.end())
-					break;
-				newname = atname + "_" + Te2String(c);
-				++c;
-			}
-			atname = newname;
-		}
-		names.push_back(atname);
-		attribute.rep_.name_ = atname;
-
-        if( eType == FTDate )
-		{
-			attribute.rep_.type_     = TeDATETIME;
-			attribute.dateChronon_   = TeDAY;
-			attribute.dateTimeFormat_ = "YYYYMMDD";
-			attribute.dateSeparator_ = 'c';
-		}
-        else if( eType == FTString )
-		{
-			attribute.rep_.type_     = TeSTRING;
-			attribute.rep_.numChar_  = nWidth;
-		}
-		else if( eType == FTInteger )
-		{
-			if (nWidth > 9)
-			{
-				attribute.rep_.type_ = TeREAL;
-				attribute.rep_.numChar_ = nWidth;
-				attribute.rep_.decimals_ = 0;
-			}
-			else
-			{
-				attribute.rep_.type_ = TeINT;
-				attribute.rep_.numChar_ = nWidth;
-			}
-		}
-        else if( eType == FTDouble )
-		{
-            attribute.rep_.type_ = TeREAL;
-			attribute.rep_.numChar_ = nWidth;
-			attribute.rep_.decimals_ = nDecimals;
-		}
-
-		// keep track of the index name
-
-		attList.push_back ( attribute );
-    }
-	names.clear();
-    DBFClose( hDBF );
-	return true;
-}
-
-
-bool TeImportDBFTable(const string& dbFileName,TeDatabase* db, TeLayer* layer,TeAttrTableType tableType, string objectIdAtt)
-{
-	if (!db || dbFileName.empty())
-		return false;
-
-    DBFHandle hDBF = DBFOpen(dbFileName.c_str(), "rb" );
-    if( hDBF == NULL )
-		return false;
-
-	string tabName = TeGetBaseName(dbFileName.c_str());
-	int n=0;
-	while (db->tableExist(tabName))
-	{
-		tabName = TeGetBaseName(dbFileName.c_str()) + "_" + Te2String(n);
-		n++;
-	}
-	TeAttributeList attList;
-	TeReadDBFAttributeList (dbFileName, attList);
-
-	if (objectIdAtt.empty())
-		objectIdAtt = "object_id_";
-
-	// check if object id column is already in the list
-	unsigned int j;
-	for (j=0; j<attList.size(); j++)
-	{
-		if ( TeConvertToUpperCase(objectIdAtt) ==  TeConvertToUpperCase(attList[j].rep_.name_))
-		{
-			objectIdAtt = TeConvertToUpperCase(attList[j].rep_.name_);
-			attList[j].rep_.name_ =  objectIdAtt;
-			if (attList[j].rep_.type_ != TeSTRING)
-			{
-				attList[j].rep_.type_ = TeSTRING;
-				attList[j].rep_.numChar_ = 255;
-			}
-			attList[j].rep_.isPrimaryKey_ = true;
-			break;
-		}
-	}
-
-	// if not found create one automatically
-	bool createObjId = false;
-	if (j==attList.size())
-	{
-		TeAttribute at;
-		at.rep_.type_ = TeSTRING;
-		at.rep_.numChar_ = 16;
-		at.rep_.name_ = objectIdAtt;
-		at.rep_.isPrimaryKey_ = true;
-		attList.push_back(at);
-		createObjId = true;
-	}
-
-	if (!db->createTable(tabName,attList))
-	{
-	    DBFClose(hDBF);
-		return false;
-	}
-
-	TeTable table(tabName);
-	table.setAttributeList(attList);
-	table.setUniqueName(objectIdAtt);
-	if (layer)
-		table.setTableType(tableType);
-	else
-		table.setTableType(TeAttrExternal);
-
-	int nrec = DBFGetRecordCount(hDBF);
-	if (TeProgress::instance())
-		TeProgress::instance()->setTotalSteps(nrec);
-	int dt = CLOCKS_PER_SEC/4;
-	int dt2 = CLOCKS_PER_SEC * 5;
-	clock_t	t0, t1, t2;
-	t2 = clock();
-	t0 = t1 = t2;
-	int iRecord;
-	for (iRecord = 0; iRecord < nrec; iRecord++)
-    {
-		TeTableRow row;
-		int i;
-		for( i = 0; i < DBFGetFieldCount(hDBF); i++ )
-		{
-			string value =  DBFReadStringAttribute(hDBF, iRecord, i);
-			row.push_back ( value ); // inserts a value into the row
-		}
-		if (createObjId)
-			row.push_back(Te2String(iRecord));
-		table.add(row); 
-		if ((iRecord+1 % 100) == 0)
-		{
-			if (!db->insertTable(table))
-			{
-				DBFClose( hDBF );
-				table.clear();
-				if (TeProgress::instance())
-					TeProgress::instance()->reset();		
-				return false;
-			}
-			table.clear();
-			if (TeProgress::instance())
-			{
-				t2 = clock();
-				if (int(t2-t1) > dt)
-				{
-					t1 = t2;
-					if (TeProgress::instance()->wasCancelled())
-						break;
-					if ((int)(t2-t0) > dt2)
-						TeProgress::instance()->setProgress(iRecord);
-				}
-			}
-		}
-    }
-	if (table.size() > 0)
-	{
-		db->insertTable(table);
-		table.clear();
-	}
-	if (TeProgress::instance())
-		TeProgress::instance()->reset();		
-    DBFClose( hDBF );
-	if (iRecord == 0)
-		return false;
-	if (layer)
-		db->insertTableInfo(layer->id(),table);
-	else
-		db->insertTableInfo(0,table);
-
-	return true;
-}
-
-void TeReadSHPAttributes (const string& dbfFileName, TeTable& table)
-{
-	string filePrefix = TeGetName (dbfFileName.c_str()) ;
-	string fileName = filePrefix + ".dbf";
-
-/* -------------------------------------------------------------------- */
-/*	Get Attributes definitions.											*/
-/* -------------------------------------------------------------------- */
-	TeAttributeList attList;
-	TeReadDBFAttributeList ( fileName, attList );
-	table.setAttributeList( attList );
-
-/* -------------------------------------------------------------------- */
-/*      Open the file.                                                  */
-/* -------------------------------------------------------------------- */
-    DBFHandle hDBF = DBFOpen( fileName.c_str(), "rb" );
-    if( hDBF == NULL )
-    {
-			throw TeException ( UNABLE_TO_OPEN_DBF_FILE, fileName, true );
-    }
-    
-/* -------------------------------------------------------------------- */
-/*	If there is no data in this file let the user know.		*/
-/* -------------------------------------------------------------------- */
-    if( DBFGetFieldCount(hDBF) == 0 )
-    {
-			throw TeException ( NO_DATA_IN_DBF_FILE, fileName );
-    }
-
-/* -------------------------------------------------------------------- */
-/*	Read all the records 						                        */
-/* -------------------------------------------------------------------- */
-	for( int iRecord = 0; iRecord < DBFGetRecordCount(hDBF); iRecord++ )
-    {
-		TeTableRow row;
-		int 	i;
-
-		for( i = 0; i < DBFGetFieldCount(hDBF); i++ )
-		{
-			string value =  DBFReadStringAttribute( hDBF, iRecord, i ) ;
-			row.push_back ( value ); // inserts a value into the row
-		}
-		table.add ( row ); // adds a row to a table
-    }
-    DBFClose( hDBF );
-}
-
-
-bool TeReadDBFAttributes (const string& dbfFileName, TeTable& table, 
-						  int nrecords, int rinitial, bool createAuto)
-{
-	string filePrefix = TeGetName (dbfFileName.c_str()) ;
-	string fileName = filePrefix + ".dbf";
-
-// -------------------------------------------------------------------- 
-//      Open the file.                                                  
-// -------------------------------------------------------------------- 
-    DBFHandle hDBF = DBFOpen( fileName.c_str(), "rb" );
-    if( hDBF == NULL )
-    {
-			throw TeException ( UNABLE_TO_OPEN_DBF_FILE, fileName, true );
-    }
-    
-// -------------------------------------------------------------------- 
-//	If there is no data in this file let the user know.		
-// -------------------------------------------------------------------- 
-    if( DBFGetFieldCount(hDBF) == 0 )
-    {
-			throw TeException ( NO_DATA_IN_DBF_FILE, fileName );
-    }
-
-	if (rinitial >= DBFGetRecordCount(hDBF))
-		return false;
-
-	if (nrecords < 1 || nrecords > DBFGetRecordCount(hDBF))
-		nrecords = DBFGetRecordCount(hDBF);
-
-// -------------------------------------------------------------------- 
-//	Read all the records 						                        
-// -------------------------------------------------------------------- 
-	int count = 0;
-	for( int iRecord = rinitial; (iRecord < DBFGetRecordCount(hDBF) && count < nrecords); iRecord++ )
-    {
-		TeTableRow row;
-		int 	i;
-		for( i = 0; i < DBFGetFieldCount(hDBF); i++ )
-		{
-			string value =  DBFReadStringAttribute( hDBF, iRecord, i ) ;
-			row.push_back ( value ); // inserts a value into the row
-		}
-		
-		// if asked create a auto number extra column at the end
-		if (createAuto)
-			row.push_back(Te2String(iRecord));
-
-		table.add ( row ); // adds a row to a table
-		count++;
-    }
-    DBFClose( hDBF );
-	if (count > 0)
-		return true;
-	return false;
-}
-
-void
-TeImportDBFIndexes(const string& shpFileName, vector<string>& indexVect, const string objectIdAttr )
-{
-	string filePrefix = TeGetName(shpFileName.c_str());
-	string fileName = filePrefix + ".dbf";
-
-/* -------------------------------------------------------------------- */
-/*	Get index position.													*/
-/* -------------------------------------------------------------------- */
-	int i=0, indexPos=-1;
-
-	if (!objectIdAttr.empty())
-	{
-		TeAttributeList attList;
-		TeReadDBFAttributeList ( fileName, attList );
-		TeAttributeList::iterator it = attList.begin();
-		while ( it != attList.end() )
-		{
-			TeAttribute att = *it;
-			if (TeConvertToUpperCase(att.rep_.name_) == TeConvertToUpperCase(objectIdAttr))
-			{
-				indexPos = i;
-				break;
-			}
-			it++;
-			i++;
-		}
-	}
-
-/* -------------------------------------------------------------------- */
-/*      Open the file.                                                  */
-/* -------------------------------------------------------------------- */
-    DBFHandle hDBF = DBFOpen( fileName.c_str(), "rb" );
-    if( hDBF == NULL )
-    {
-			throw TeException ( UNABLE_TO_OPEN_DBF_FILE, fileName, true );
-    }
-    
-/* -------------------------------------------------------------------- */
-/*	If there is no data in this file let the user know.		*/
-/* -------------------------------------------------------------------- */
-	int nRecords = DBFGetFieldCount(hDBF);
-    if( nRecords  == 0 )
-    {
-			throw TeException ( NO_DATA_IN_DBF_FILE, fileName );
-    }
-
-/* -------------------------------------------------------------------- */
-/*	Read all the records 						                        */
-/* -------------------------------------------------------------------- */
-    
-	for( int iRecord = 0; iRecord < nRecords; iRecord++ )
-	{
-		if (indexPos == -1)
-			indexVect.push_back (Te2String(iRecord+1)); 
-		else
-			indexVect.push_back ( DBFReadStringAttribute( hDBF, iRecord, indexPos ) );
-	}
-
-    DBFClose( hDBF );
-}
diff --git a/src/terralib/functions/TeImportExport.h b/src/terralib/functions/TeImportExport.h
old mode 100644
new mode 100755
index 1a6cadf..430f948
--- a/src/terralib/functions/TeImportExport.h
+++ b/src/terralib/functions/TeImportExport.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,255 +20,19 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeImportExport.h
-    This file contains functions to deal with the importing/exporting
-	of geographical data to and from  a TerraLib database in usual
-	formats
+    \brief This file contains functions to deal with the importing/exporting of geographical data to and from a TerraLib database
+	\deprecaded This is a deprecated file kept for compatibility reasons. You should use some of the files bellow instead.
 */
 #ifndef __TERRALIB_INTERNAL_IMPORTEXPORT_H
 #define __TERRALIB_INTERNAL_IMPORTEXPORT_H
 
-#include "TeTable.h"
-#include "TeBox.h"
-#include "TeDataTypes.h"
-
-#include <string>
-using namespace std;
-
-class TeLayer;
-class TeSPRFile;
-class TeAsciiFile;
-class TeProjection;
-class TeDatabase;
-
-/** @defgroup ImpExp Importing and Exporting Functions
- *  TerraLib importing and exporting functions
- *  @{
- */
-
-/** @defgroup MIDMIF Functions to deal with MID/MIF format
- *  @ingroup ImpExp
- *  Functions related to MID MIF format
- *  @{
- */
- 
-/*!	\fn TeLayer* TeImportMIF(const string& mifFileName, TeDatabase* db, const string& layerName="")
-	\brief Imports a geo data in MID/MIF format to a TerraLib database
-	\param mifFileName MIF file name
-	\param db pointer to a TerraLib database
-	\param layerName name of the layer that will contain the data (optional)
-	\return a pointer to created layer if the data was imported successfully and 0 otherwise
-*/
-TeLayer* TeImportMIF(const string& mifFileName, TeDatabase* db, const string& layerName="");
-
-/*!	\fn bool TeImportMIF(TeLayer* layer, const string& mifFileName, string attrTableName="", string objectIdAttr="", int unsigned chunkSize = 60)
-	\brief Imports a MID/MIF file to a specific layer TerraLib
-	\param layer pointer to a layer
-	\param mifFileName MIF file name
-	\param objectIdAttr name of the attribute that has the identification of objects
-	\param attrTableName the name that the attribute table will be saved
-	\param chunkSize the number of objects in memory before save them in the layer
-	\return TRUE if the data was imported successfully and FALSE otherwise
-*/
-bool TeImportMIF(TeLayer* layer, const string& mifFileName, string attrTableName="",  
-				 string objectIdAttr="", int unsigned chunkSize = 60);
-
-/*!	\fn void TeReadMIFAttributeList(const string& mifFileName, TeAttributeList& attList)
-	\brief Reads the attributes definition of a data in MID/MIF format
-*/
-void TeReadMIFAttributeList(const string& mifFileName, TeAttributeList& attList);
-
-/*!	\fn TeProjection* TeReadMIFProjection(const string& mifFileName)
-	\brief Reads the geographical projection of a data in MID/MIF format
-*/
-TeProjection* TeReadMIFProjection(const string& mifFileName);
-
-/*!\fn bool TeExportMIF (TeLayer* layer, const string& mifFileName, const string& tableName)
-   \brief Exports a layer in a TerraLib database to a file in MID/MIF format
-   \param layer pointer to the layer
-   \param mifFileName name of the output MID/MIF file
-   \param tableName name of the attribute table to be exported
-   \return TRUE if the data was successfully exported and FALSE otherwise
-*/
-bool TeExportMIF (TeLayer* layer, const string& mifFileName, const string& tableName);
-
-/** @} */ // End of subgroup MID/MIF format
-
-/** @defgroup SPR Functions to deal with SPRING GEO/TAB format
- *  @ingroup ImpExp
- *  Functions related to SPRING format
- *  @{
- */ 
-/*!	\fn TeLayer* TeImportGEO(const string& geoFileName, TeDatabase* db, const string& layerName="")
-	\brief Imports a geo data in SPRING geo/tab format to a TerraLib database
-	\param geoFileName GEO/TAB file name
-	\param db pointer to a TerraLib database
-	\param layerName name of the layer that will contain the data (optional)
-	\return a pointer to created layer if the data was imported successfully and 0 otherwise
-*/
-TeLayer* TeImportGEO(const string& geoFileName, TeDatabase* db, const string& layerName="");
-
-/*! \fn bool TeImportGEO(TeLayer* layer, const string& geoFileName, string attrTableName="", unsigned int chunkSize=60)
-	\brief Import a GEO/TAB data to a layer TerraLib
-    \param layer pointer to a layer
-	\param geoFileName GEO/TAB file name
-	\param attrTableName the name that the attribute table will be saved
-	\param chunkSize the number of objects in memory before save them in the layer
-*/
-bool TeImportGEO(TeLayer* layer, const string& geoFileName, string attrTableName="", unsigned int chunkSize=60);
-
-/*! \fn TeReadGeoAttributeList(const string& geoFileName,TeAttributeList& attList, string& labelName )
-    \brief Reads the list of attributes  of GEO/TAB file
-	\param geoFileName  DBF input file name
-	\param attList returns the DBF list of attributes
-	\param labelName returns the name of the column that is the link with geometries
-	\return TRUE if the list of attributes were was successfully read and FALSE otherwise
-*/
-void TeReadGeoAttributeList(const string& geoFileName,TeAttributeList& attList, string& labelName );
-
-/*! \fn TeExportSPR(TeLayer* layer, const string& sprFileName, const string& tableName, TeSpringModels cat, const string& name);
-	\brief Exports a layer in a TerraLib database to a file in ASCII SPRING format
-    \param layer pointer to the layer
-    \param sprFileName name of the output SPRING file
-    \param tableName name of the attribute table to be exported
-    \param cat Spring category
-	\param name name of the column that has label or class identifier
-    \return TRUE if the data was successfully exported and FALSE otherwise
-    \note Parameter 'name' is the Object name if exporting to categories Cadastral or Network .
-   Is the name of the column that has the quote value if Numeric category or the name
-   of the column that has the class information if category Thematic.
-*/
-bool TeExportSPR(TeLayer* layer, const string& sprFileName, const string& tableName, 
-			 TeSpringModels cat, const string& name);
-/** @} */ // End of subgroup SPRING format
-
-/** @defgroup DBF Functions to deal with DBF tables
- *  @ingroup ImpExp
- *  Functions related to DBF table format
- *  @{
- */
-
-/*! \fn bool TeReadDBFAttributeList(const string& dbfFileName, TeAttributeList& attList)
-   \brief Reads the list of attributes specified in DBF file 
-   \param dbfFileName  DBF input file name
-   \param attList returns the DBF list of attributes
-   \return TRUE if the list of attributes were was successfully read and FALSE otherwise
-*/
-bool TeReadDBFAttributeList(const string& dbfFileName, TeAttributeList& attList);
-
-/*! \fn bool TeReadDBFAttributes (const string& dbfFileName, TeTable& table, int nrecords=-1, int rinitial=0, bool createAuto=false)
-	\brief Reads a set of records from a shapelib to a structure in memory
-	\param dbfFileName DBF file name
-	\param table returns the set of records in memory
-	\param nrecords number of records to be read
-	\param rinitial number of the initial record
-	\param createAuto  flag used to indicate if an auto number columns should be added to each record
-*/
-bool TeReadDBFAttributes (const string& dbfFileName, TeTable& table, 
-						  int nrecords=-1, int rinitial=0, bool createAuto=false);
-
-/*! \fn bool TeImportDBFTable(const string& dbfFileName, TeDatabase* db, TeLayer* layer=0,TeAttrTableType tableType=TeAttrExternal)
-	\brief Imports a DBF table to a TerraLib database
-	This function imports a DBF to a TerraLib database. An attribute table can be associated to a
-	particular layer, or as an external table that will be linked to any layer when genereated a 
-	theme. A column called object_id_ will be added with unique values automatically generated.
-	\param dbfFileName DBF file name
-	\param db pointer to a TerraLib database
-	\param layer pointer to a layer to which the table will associated
-	\param tableType type of the attribute table
-*/
-bool TeImportDBFTable(const string& dbfFileName, TeDatabase* db, TeLayer* layer=0,TeAttrTableType tableType=TeAttrExternal, string objectIdAtt = "object_id_");
-
-/** @} */ // End of subgroup DBF format
-
-/** @defgroup SHP Functions to deal with Shapefile format
- *  @ingroup ImpExp
- *  Functions related to Shapefile format. Uses some functions related to DBF attribute table format.
- *  @{
- */ 
-/*!	\fn TeLayer* TeImportShape(const string& shpFileName, TeDatabase* db, const string& layerName="")
-	\brief Imports a geo data in a shapefile format to a TerraLib database
-	\param shpFileName Shapefile name
-	\param db pointer to a TerraLib database
-	\param layerName name of the layer that will contain the data (optional)
-	\return a pointer to created layer if the data was imported successfully and 0 otherwise
-*/
-TeLayer* TeImportShape(const string& shpFileName, TeDatabase* db, const string& layerName="");
-
-/*! \fn bool TeImportShape (TeLayer* layer, const string& shpFileName, string attrTableName="",string objectIdAttr="", unsigned int  chunkSize = 60)
-	\brief Import a shapefile to a layer TerraLib
-	\param layer pointer to a layer
-	\param shpFileName shapefile file name
-	\param attrTableName the name that the attribute table will be saved
-	\param objectIdAttr name of the attribute that has the identification of objects
-	\param chunkSize the number of objects in memory before save them in the layer
-*/
-bool TeImportShape (TeLayer* layer, const string& shpFileName, string attrTableName="",  
-					string objectIdAttr="", unsigned int  chunkSize = 60);
-
-/*! \fn bool TeExportShapefile(TeLayer* layer, const string& shpFileName, const string& tableName)
-   \brief Exports a layer in a TerraLib database to a file in MID/MIF format
-   \param layer pointer to the layer
-   \param shpFileName name of the output shapefile
-   \param tableName name of the attribute table to be exported
-   \return TRUE if the data was successfully exported and FALSE otherwise
-*/
-bool TeExportShapefile(TeLayer* layer, const string& shpFileName, const string& tableName);
-/** @} */ // End of subgroup SHAPEFILE format
-
-/** @defgroup BNA Functions to deal with BNA format
- *  @ingroup ImpExp
- *  Functions related to BNA format (Atlas GIS BNA)
- *  @{
- */
- 
-/*!	\fn TeLayer* TeImportBNA(const string& bnaFileName, TeDatabase* db, const string& layerName="")
-	\brief Imports a geo data in BNA format to a TerraLib database
-	\param bnaFileName BNA file name
-	\param db pointer to a TerraLib database
-	\param layerName name of the layer that will contain the data (optional)
-	\return a pointer to created layer if the data was imported successfully and 0 otherwise
-*/
-TeLayer* TeImportBNA(const string& bnaFileName, TeDatabase* db, const string& layerName="");
-
-/*!	\fn bool TeImportBNA(TeLayer* layer, const string& bnaFileName, string attrTableName="", string objectIdAttr="", int unsigned chunkSize = 60)
-	\brief Imports a BNA file to a specific layer TerraLib
-	\param layer pointer to a layer
-	\param bnaFileName BNA file name
-	\param attrTableName the name that the attribute table will be saved
-	\param attList List of attribute of the bna file, used only to name the fields
-	\param chunkSize the number of objects in memory before save them in the layer
-	\return TRUE if the data was imported successfully and FALSE otherwise
-*/
-bool TeImportBNA(TeLayer* layer, const string& bnaFileName, string attrTableName,  
-				 TeAttributeList& attList, int unsigned chunkSize, const string& linkCol = "");
-
-/*!	\fn bool TeReadBNAAttributeList(const string& bnaFileName, TeAttributeList& attList)
-	\brief Reads the attributes definition of a data in BNA format if attList is empty or says if attList size is coorect
-*/
-bool TeReadBNAAttributeList(const string& bnaFileName, TeAttributeList& attList);
-
-/** @} */ // End of subgroup BNA format
-
-/** \example ImportExample1.cpp
- * This is an example of how to import geographical data in MID/MIF format
- */
-
-/** \example ImportExample2.cpp
- * This is an example of how to import geographical data in shapefile format
- */
-
-/** \example ImportExample3.cpp
- * This is an example of how to import a DBF table
- */
-
-/** \example ImportExample4.cpp
- * This is an example of how to import geographical data in SPRING GEO/TAB format
- */
-
-
-/** @} */ // End of group ImpExp format
+// This is a deprecated file kept for compatibility reasons. You should use some of the files bellow instead.
 
+#include "TeDriverBNA.h"
+#include "TeDriverMIDMIF.h"
+#include "TeDriverCSV.h"
+#include "TeDriverSPRING.h"
+#include "TeDriverSHPDBF.h"
 #endif
 
diff --git a/src/terralib/functions/TeImportGeo.cpp b/src/terralib/functions/TeImportGeo.cpp
old mode 100644
new mode 100755
index a1ec105..6d842e6
--- a/src/terralib/functions/TeImportGeo.cpp
+++ b/src/terralib/functions/TeImportGeo.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -38,7 +38,7 @@ using namespace std;
 
 // TerraLib
 
-#include "TeImportExport.h"
+#include "TeDriverSPRING.h"
 
 #include "TeAsciiFile.h"
 #include "TeBox.h"
@@ -139,7 +139,28 @@ TeImportGEO(TeLayer* layer, const string& geoFileName, string attrTableName, uns
 		return false;
 
 	//Import the geometries
-	return TeImportGeoGeometries (layer,geoFileName,chunckSize);
+	if (!TeImportGeoGeometries (layer,geoFileName,chunckSize))
+		return false;
+
+	// Create the spatial indexes
+	int rep = layer->geomRep();
+	if (rep & TePOINTS)
+	{
+		layer->database()->insertMetadata(layer->tableName(TePOINTS),layer->database()->getSpatialIdxColumn(TePOINTS), 0.0005,0.0005,layer->box());
+		layer->database()->createSpatialIndex(layer->tableName(TePOINTS),layer->database()->getSpatialIdxColumn(TePOINTS), (TeSpatialIndexType)TeRTREE);
+	}
+	if (rep & TeLINES)
+	{
+		layer->database()->insertMetadata(layer->tableName(TeLINES),layer->database()->getSpatialIdxColumn(TeLINES), 0.0005,0.0005,layer->box());
+		layer->database()->createSpatialIndex(layer->tableName(TeLINES),layer->database()->getSpatialIdxColumn(TeLINES), (TeSpatialIndexType)TeRTREE);
+	}
+	if (rep & TePOLYGONS)
+	{
+		layer->database()->insertMetadata(layer->tableName(TePOLYGONS),layer->database()->getSpatialIdxColumn(TePOLYGONS), 0.0005,0.0005,layer->box());
+		layer->database()->createSpatialIndex(layer->tableName(TePOLYGONS),layer->database()->getSpatialIdxColumn(TePOLYGONS), (TeSpatialIndexType)TeRTREE);
+	}
+
+	return true;
 }
 
 void
diff --git a/src/terralib/functions/TeImportMIF.cpp b/src/terralib/functions/TeImportMIF.cpp
old mode 100644
new mode 100755
index 752cff3..e342436
--- a/src/terralib/functions/TeImportMIF.cpp
+++ b/src/terralib/functions/TeImportMIF.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -33,7 +33,6 @@ of this library and its documentation.
 
 using namespace std;
 
-#include "TeImportExport.h"
 #include "TeTable.h"
 #include "TeGeometry.h"
 #include "TeAsciiFile.h"
@@ -48,6 +47,8 @@ using namespace std;
 #include "TeGeometryAlgorithms.h"
 #include "TeDatabase.h"
 
+#include "TeDriverMIDMIF.h"
+
 void TeMIFRegionDecode ( TeAsciiFile& mifFile, TePolygonSet& temp, string& index);
 
 void TeMIFLineDecode (TeAsciiFile& mifFile, TeLineSet& temp, string& index);
@@ -132,12 +133,12 @@ TeLayer* TeImportMIF(const string& mifFileName, TeDatabase* db, const string& la
 	}
 
 	// find projection
-	TeProjection* mifProj = TeReadMIFProjection(mifFileName);
+	TeProjection* mifProj = TeReadMIFProjection(ftest);
 	TeLayer* newLayer = new TeLayer(newLayerName,db,mifProj);
 	if (newLayer->id() <= 0 )
-		return 0;				// couldn�t create new layer
+		return 0;				// couldn�t create new layer
 
-	bool res = TeImportMIF(newLayer,mifFileName);
+	bool res = TeImportMIF(newLayer,ftest);
 	delete mifProj;
 	if (res)
 		return newLayer;
@@ -162,6 +163,7 @@ TeImportMIF(TeLayer* layer, const string& mifFileName, string attrTableName,
 		if (access(ftest.c_str(),04) == -1)
 			return false;
 	}
+	string midfilename = ftest;
 
 	ftest = filePrefix + ".mif";
 	if (access(ftest.c_str(),04) == -1)
@@ -170,21 +172,22 @@ TeImportMIF(TeLayer* layer, const string& mifFileName, string attrTableName,
 		if (access(ftest.c_str(),04) == -1)
 			return false;
 	}
+	string miffilename = ftest;
 	
 
 	//-- Step 1: Read any adicional information (ex. projection) 
 	if (!layer->projection())
 	{
-		TeProjection* mifProj = TeReadMIFProjection(mifFileName);
+		TeProjection* mifProj = TeReadMIFProjection(miffilename);
 		if (mifProj)
 			layer->setProjection(mifProj);
 	}
 
-	char separator = TeReadMIFSeparator(mifFileName);
+	char separator = TeReadMIFSeparator(miffilename);
 
 	//read the attribute list information 
 	TeAttributeList attList;
-	TeReadMIFAttributeList(mifFileName, attList);
+	TeReadMIFAttributeList(miffilename, attList);
 
 	// define a TeAttributeTable
 	if (attrTableName.empty())
@@ -261,14 +264,11 @@ TeImportMIF(TeLayer* layer, const string& mifFileName, string attrTableName,
 		return false;
 
 	vector<string> objectIds;
-
-	string midFileName = filePrefix + ".mid";
-
 	int ncol = attList.size();
 	if (autoIndex)
 		ncol--;
 
-	TeAsciiFile midFile(midFileName);
+	TeAsciiFile midFile(midfilename);
 	int delta = 0;
 	while (TeReadMIFAttributes(midFile,attTable,ncol,chunkSize,delta, autoIndex))
 	{
@@ -286,7 +286,25 @@ TeImportMIF(TeLayer* layer, const string& mifFileName, string attrTableName,
 	}
 
 	// Import the geometries
-	bool res = TeImportMIFGeometries(layer,mifFileName,objectIds,chunkSize);
+	bool res = TeImportMIFGeometries(layer,miffilename,objectIds,chunkSize);
+	
+	// Create the spatial indexes
+	int rep = layer->geomRep();
+	if (rep & TePOINTS)
+	{
+		layer->database()->insertMetadata(layer->tableName(TePOINTS),layer->database()->getSpatialIdxColumn(TePOINTS), 0.0005,0.0005,layer->box());
+		layer->database()->createSpatialIndex(layer->tableName(TePOINTS),layer->database()->getSpatialIdxColumn(TePOINTS), (TeSpatialIndexType)TeRTREE);
+	}
+	if (rep & TeLINES)
+	{
+		layer->database()->insertMetadata(layer->tableName(TeLINES),layer->database()->getSpatialIdxColumn(TeLINES), 0.0005,0.0005,layer->box());
+		layer->database()->createSpatialIndex(layer->tableName(TeLINES),layer->database()->getSpatialIdxColumn(TeLINES), (TeSpatialIndexType)TeRTREE);
+	}
+	if (rep & TePOLYGONS)
+	{
+		layer->database()->insertMetadata(layer->tableName(TePOLYGONS),layer->database()->getSpatialIdxColumn(TePOLYGONS), 0.0005,0.0005,layer->box());
+		layer->database()->createSpatialIndex(layer->tableName(TePOLYGONS),layer->database()->getSpatialIdxColumn(TePOLYGONS), (TeSpatialIndexType)TeRTREE);
+	}
 	return res;
 }
 
@@ -333,10 +351,7 @@ bool TeReadMIFAttributes(TeAsciiFile& midFile, TeTable& attTable,
 char 
 TeReadMIFSeparator(const string& mifFileName)
 {
-	string filePrefix = TeGetName (mifFileName.c_str()) ;
-	string fileName = filePrefix + ".mif";
-
-	TeAsciiFile mifFile(fileName);
+	TeAsciiFile mifFile(mifFileName);
 	string name = mifFile.readString ();
 
 	while ( mifFile.isNotAtEOF() && !TeStringCompare(name,"Delimiter"))
@@ -354,10 +369,7 @@ TeReadMIFProjection(const string& mifFileName)
 {
 	TeProjection* proj = 0;
 
-	string filePrefix = TeGetName (mifFileName.c_str()) ;
-	string fileName = filePrefix + ".mif";
-
-	TeAsciiFile mifFile(fileName);
+	TeAsciiFile mifFile(mifFileName);
 	string name = mifFile.readString ();
 
 	while ( mifFile.isNotAtEOF() && !TeStringCompare(name,"CoordSys")
@@ -407,10 +419,7 @@ TeReadMIFProjection(const string& mifFileName)
 void
 TeReadMIFAttributeList ( const string& mifFileName, TeAttributeList& attList )
 {
-	string filePrefix = TeGetName (mifFileName.c_str()) ;
-	string fileName = filePrefix + ".mif";
-
-	TeAsciiFile mifFile(fileName);
+	TeAsciiFile mifFile(mifFileName);
 	string name = mifFile.readString ();
 	
 	while ( mifFile.isNotAtEOF() && !TeStringCompare(name,"Columns"))
@@ -463,19 +472,25 @@ bool
 TeImportMIFGeometries(TeLayer* layer,const string& mifFileName, 
 					  vector<string> &indexes, unsigned int chunckSize)
 {
-
-	string filePrefix = TeGetName (mifFileName.c_str()) ;
-	string fileName = filePrefix + ".mif";
-
 	TePointSet pointSet;
 	TeLineSet lineSet;
 	TePolygonSet polySet;
 	TeTextSet textSet;
 	string textTableName = layer->name() + "Texto";
 
+	double oldPrec = TePrecision::instance().precision();
 	try
 	{
-		TeAsciiFile mifFile(fileName);
+		if(layer)
+		{
+			TePrecision::instance().setPrecision(TeGetPrecision(layer->projection()));
+		}
+		else
+		{
+			TePrecision::instance().setPrecision(TeGetPrecision(0));
+		}
+
+		TeAsciiFile mifFile(mifFileName);
 		int n = 0;
 		while ( mifFile.isNotAtEOF()  )
 		{
@@ -605,8 +620,11 @@ TeImportMIFGeometries(TeLayer* layer,const string& mifFileName,
 	}
 	catch(...)
 	{
+		TePrecision::instance().setPrecision(oldPrec);
 		return false;
 	}
+
+	TePrecision::instance().setPrecision(oldPrec);
 	return true;
 }
 
@@ -671,7 +689,9 @@ TeMIFRegionDecode ( TeAsciiFile& mifFile, TePolygonSet& temp, string& index)
 			TePolygon p1;
 			p1.add(ring);
 			TePolygon p2 = (*it);
-			if (TeWithin(p1,p2))
+			short rel = TeRelation(p1, p2);
+
+			if((rel & TeWITHIN) || (rel & TeCOVEREDBY))
 			{
 				inside = true;
 				ring.objectId(p2[0].objectId());
diff --git a/src/terralib/functions/TeImportSHP.cpp b/src/terralib/functions/TeImportSHP.cpp
deleted file mode 100644
index cc83e65..0000000
--- a/src/terralib/functions/TeImportSHP.cpp
+++ /dev/null
@@ -1,882 +0,0 @@
-/************************************************************************************
-TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The library provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use
-of this library and its documentation.
-*************************************************************************************/
-
-// STL 
-#include <string>
-#include <iostream>
-#include <vector>
-#include <list>
-#include <map>
-
-#ifdef WIN32
-#include <io.h>
-#else
-#include <unistd.h>
-#endif
-
-using namespace std;
-
-// TerraLib
-
-#include "TeImportExport.h"
-#include "TeTable.h"
-#include "TeStdFile.h"
-#include "TeException.h"
-#include "TeUtils.h"
-#include "TeGeometry.h"
-#include "TeGeometryAlgorithms.h"
-#include "TeLayer.h"
-#include "TeProgress.h"
-#include "TeDatabase.h"
-
-
-// from SHAPELIB
-
-#include "shapefil.h" 
- 
-
-// Internal functions
-bool TeImportSHPGeometries (TeLayer* layer,const string& shpFileName, vector<string> &indexes, unsigned int chunckSize);
-void TeSHPPointDecode    (TeLayer*, SHPHandle, vector<string>&, unsigned int);
-void TeSHPPolyLineDecode (TeLayer*, SHPHandle, vector<string>&, unsigned int);
-void TeSHPPolygonDecode  (TeLayer*, SHPHandle, vector<string>&, unsigned int);
-
-// Functions to decode one shape
-void TeSHPPointDecode	(SHPObject*, TePointSet&,	string&);
-void TeSHPPolyLineDecode(SHPObject*, TeLineSet&,	string&);
-void TeSHPPolygonDecode	(SHPObject*, TePolygonSet&, string&);
-void TeDBFRowDecode		(DBFHandle&, int, TeTableRow&);
-
-TeLayer* TeImportShape(const string& shpFileName, TeDatabase* db, const string& layerName)
-{
-	if (!db || shpFileName.empty()) 
-		return 0;
-
-	// check if format is complete (SHP, SHX e DBF files exist)
-	string filePrefix = TeGetName(shpFileName.c_str());
-	string ftest = filePrefix + ".dbf";
-	if (access(ftest.c_str(),04) == -1)
-	{
-		ftest = filePrefix + ".DBF";
-		if (access(ftest.c_str(),04) == -1)
-			return 0;
-	}
-	ftest = filePrefix + ".shx";
-	if (access(ftest.c_str(),04) == -1)
-	{
-		ftest = filePrefix + ".SHX";
-		if (access(ftest.c_str(),04) == -1)
-			return 0;
-	}
-
-	// found a valid layer name
-	string lName;
-	string baseName = TeGetBaseName(shpFileName.c_str());
-	if (layerName.empty())
-		lName = baseName;
-	else
-		lName = layerName;
-
-	string newLayerName = lName;
-	TeLayerMap& layerMap = db->layerMap();
-	TeLayerMap::iterator it;
-	bool flag = true;
-	int n = 1;
-	while (flag)
-	{
-		for (it = layerMap.begin(); it != layerMap.end(); ++it)
-		{
-			if (TeStringCompare(it->second->name(),newLayerName))
-				break;
-		}
-		if (it == layerMap.end())
-			flag = 0;
-		else
-			newLayerName = lName + "_" +Te2String(n);
-		n++;	
-	}
-
-	// find projection
-	TeLayer* newLayer = new TeLayer(newLayerName,db);
-	if (newLayer->id() <= 0 )
-		return 0;				// couldn�t create new layer
-
-	bool res = TeImportShape(newLayer,shpFileName);
-	if (res)
-		return newLayer;
-	else
-	{
-		db->deleteLayer(newLayer->id());
-		delete newLayer;
-		return 0;
-	}
-}
-
-bool TeImportShape (TeLayer* layer, const string& shpFileName, string attrTableName,  
-					string objectIdAtt, int unsigned chunkSize )
-{
-	string filePrefix = TeGetName(shpFileName.c_str());
-	string shpFileN = filePrefix + ".shp";
-	string dbfFileN = filePrefix + ".dbf";
-
-	SHPHandle	hSHP = SHPOpen(shpFileN.c_str(),"rb");
-	if (hSHP == 0)
-		return false;
-
-    DBFHandle hDBF = DBFOpen(dbfFileN.c_str(), "rb");
-    if (hDBF == 0)
-    {
-		SHPClose(hSHP);
-		return false;
-    }
-
-	// Read some information about the shapefile
-	int nShapeType, nEntities;
-	// --- get the shape and decode it
-	double 	adfMinBound[4], adfMaxBound[4];
-	SHPGetInfo( hSHP, &nEntities, &nShapeType, adfMinBound, adfMaxBound );
-	string shpName = SHPTypeName( nShapeType );
-	if (shpName == "UnknownShapeType")
-	{
-		SHPClose(hSHP);
-		DBFClose(hDBF);
-		return false;
-	}
-
-	if (attrTableName.empty())
-	{
-		if (layer->name().empty())
-			return false;
-		else
-			attrTableName = layer->name();
-	}
-	
-	int linkCol=-1;
-    unsigned int j=0;
-	bool autoIndex = false;
-
-	//read the attribute list information 
-	TeAttributeList attList;
-	TeReadDBFAttributeList(shpFileName, attList);
-
-	// if no geometry link name is given, creates one called 'object_id_'
-	string ext = "";
-	int count = 0;
-	if (objectIdAtt.empty())
-	{
-		objectIdAtt = "object_id_" + Te2String(layer->id());
-		string s2 = TeConvertToUpperCase(objectIdAtt);
-		while (true)
-		{
-			for (j=0; j<attList.size(); j++)
-			{
-				string s0 = attList[j].rep_.name_;
-				string s1 = TeConvertToUpperCase(s0);
-				if ( s1 == s2)
-					break;
-			}
-			if (j < attList.size())
-			{
-				++count;
-				objectIdAtt = "object_id_" + Te2String(count);
-			}
-			else
-				break;
-		}
-		TeAttribute at;
-		at.rep_.type_ = TeSTRING;
-		at.rep_.numChar_ = 16;
-		at.rep_.name_ = objectIdAtt;
-		at.rep_.isPrimaryKey_ = true;
-		attList.push_back(at);
-		linkCol = attList.size()-1;
-		autoIndex = true;
-	}
-	else
-	{
-		// check if given index is valid
-		TeAttributeList::iterator it = attList.begin();
-		while (it != attList.end())
-		{
-			if (TeConvertToUpperCase((*it).rep_.name_) == TeConvertToUpperCase(objectIdAtt))		// index found
-			{
-				if ((*it).rep_.type_ != TeSTRING)	// make sure it is a String type
-				{
-					(*it).rep_.type_ = TeSTRING;
-					(*it).rep_.numChar_ = 16;
-				}
-				(*it).rep_.isPrimaryKey_ = true;
-				linkCol=j;
-				break;
-			}
-			++it;
-			++j;
-		}
-		if (it == attList.end())			// index not found
-		{
-			objectIdAtt = "object_id_" + Te2String(layer->id());;
-			while (true)
-			{
-				for (j=0; j<attList.size(); j++)
-				{
-					if (TeConvertToUpperCase(attList[j].rep_.name_) == TeConvertToUpperCase(objectIdAtt))
-						break;
-				}
-				if (j < attList.size())
-				{
-					++count;
-					objectIdAtt = "object_id_" + Te2String(count);
-				}
-				else
-					break;
-			}
-			TeAttribute at;
-			at.rep_.type_ = TeSTRING;
-			at.rep_.numChar_ = 16;
-			at.rep_.name_ = objectIdAtt;
-			at.rep_.isPrimaryKey_ = true;
-			attList.push_back(at);
-			autoIndex = true;
-		}
-	}
-	if (autoIndex)
-		linkCol = attList.size()-1;
-
-	TeTable attTable (attrTableName,attList,objectIdAtt,objectIdAtt,TeAttrStatic);
-	if (!layer->createAttributeTable(attTable))			// create the table in the database
-		return false;
-	
-	string objid, value;
-	TePointSet points;
-	TeLineSet lines;
-	TePolygonSet polygons;
-	TeTableRow row;
-	SHPObject* psShape;
-
-	if(TeProgress::instance())
-	{
-		TeProgress::instance()->setTotalSteps(nEntities);
-		TeProgress::instance()->setProgress(j+1);
-	}
-
-	// OBS1: we discard Z and M values when available, because TerraLib
-	// doesn�t have the concept of 3D or measured geometries
-	// OBS2: non identified geometries are mapped to a object_id_
-	// "te_nulo"
-	switch (nShapeType) 
-	{
-		// --- null geometries ---
-	  case SHPT_NULL:							// read only the attributes
-		for (j=0; j<(unsigned int)nEntities; j++)
-		{
-		  row.clear();
-		  TeDBFRowDecode(hDBF,j,row);
-		  if (autoIndex)	// --- create automatic index if needed
-			  row.push_back(Te2String(j));
-		  if (row[linkCol].empty())
-			 row[linkCol] = "te_nulo";
-		  objid = row[linkCol];
-		  attTable.add(row);
-		  if ((j%chunkSize) == 0)
-		  {
-			  layer->saveAttributeTable(attTable);
-			  attTable.clear();
-			  if(TeProgress::instance())
-			  {
-				if (TeProgress::instance()->wasCancelled())
-					break;
-				else
-					TeProgress::instance()->setProgress(j+1);
-			  }	
-		  }
-		}
-		break;
-		// --- point geometries ---
-	  case SHPT_POINTZ:	
-	  case SHPT_MULTIPOINTZ:
-	  case SHPT_POINTM:
-	  case SHPT_MULTIPOINTM:
-	  case SHPT_POINT:
-	  case SHPT_MULTIPOINT:
-		  for (j=0; j<(unsigned int)nEntities; j++)
-		  {
-			  row.clear();
-			  TeDBFRowDecode(hDBF,j,row);
-			  if (autoIndex)	// --- create automatic index if needed
-				  row.push_back(Te2String(j));
-			  if (row[linkCol].empty())
-				 row[linkCol] = "te_nulo";
-			  objid = row[linkCol];
-			  attTable.add(row);
-			  psShape = SHPReadObject(hSHP,j);
-              TeSHPPointDecode(psShape,points,objid);
-     		  SHPDestroyObject(psShape);
-			  if ((j%chunkSize) == 0)
-			  {
-				  layer->addPoints(points);
-				  points.clear();
-				  layer->saveAttributeTable(attTable);
-				  attTable.clear();
-				  if(TeProgress::instance())
-				  {
-					if (TeProgress::instance()->wasCancelled())
-						break;
-					else
-						TeProgress::instance()->setProgress(j+1);
-				  }	
-			  }
-		  }
-		  break;
-		// --- line geometries ---
-	  case SHPT_ARCZ:
-	  case SHPT_ARCM:
-	  case SHPT_ARC:
-		  for (j=0; j<(unsigned int)nEntities; j++)
-		  {
-			  row.clear();
-			  TeDBFRowDecode(hDBF,j,row);
-			  if (autoIndex)	// --- create automatic index if needed
-				  row.push_back(Te2String(j));
-			  if (row[linkCol].empty())
-				 row[linkCol] = "te_nulo";
-			  objid = row[linkCol];
-			  attTable.add(row);
-			  psShape = SHPReadObject(hSHP,j);
-			  TeSHPPolyLineDecode(psShape,lines,objid);
-     		  SHPDestroyObject(psShape);
-			  if ((j%chunkSize) == 0)
-			  {
-			 	  layer->addLines(lines);
-				  lines.clear();
-				  layer->saveAttributeTable(attTable);
-				  attTable.clear();
-				  if(TeProgress::instance())
-				  {
-					if (TeProgress::instance()->wasCancelled())
-						break;
-					else
-						TeProgress::instance()->setProgress(j+1);
-				  }	
-			  }
-		  }
-		  break;
-	// --- polygon geometries ---
-	  case SHPT_POLYGON:
-	  case SHPT_POLYGONM:
-	  case SHPT_POLYGONZ:
-		  for (j=0; j<(unsigned int)nEntities; j++)
-		  {
-			  row.clear();
-			  TeDBFRowDecode(hDBF,j,row);
-			  if (autoIndex)	// --- create automatic index if needed
-				  row.push_back(Te2String(j));
-			  if (row[linkCol].empty())
-				 row[linkCol] = "te_nulo";
-			  objid = row[linkCol];
-			  attTable.add(row);
-			  psShape = SHPReadObject(hSHP,j);
-			  TeSHPPolygonDecode(psShape,polygons,objid);
-			  SHPDestroyObject(psShape);
-			  if ((j%chunkSize) == 0)
-			  {
-				  layer->addPolygons(polygons);
-				  polygons.clear();
-				  layer->saveAttributeTable(attTable);
-				  attTable.clear();
-				  if(TeProgress::instance())
-				  {
-					if (TeProgress::instance()->wasCancelled())
-						break;
-					else
-						TeProgress::instance()->setProgress(j+1);
-				  }
-			  }
-
-		  }
-		  break;
-	  default:
-		  /* todo: handle multipatch geometries */
-		  throw TeException ( UNHANDLED_SHP_TYPE );
-	}
-	if (points.size() > 0)
-	{
-		layer->addPoints(points);
-		points.clear();
-	}
-	if (lines.size() > 0)
-	{
-		layer->addLines(lines);
-		lines.clear();
-	}
-	if (polygons.size() > 0)
-	{
-		layer->addPolygons(polygons);
-		polygons.clear();
-	}
-	if (attTable.size() > 0)
-	{
-		layer->saveAttributeTable(attTable);
-		attTable.clear();
-	}
-	if(TeProgress::instance())
-		TeProgress::instance()->cancel();
-
-	SHPClose(hSHP);
-	DBFClose(hDBF);
-	return true;
-}
-
-void TeDBFRowDecode(DBFHandle& hDBF, int nr, TeTableRow& row)
-{
-	string value;
-	int i;
-	for (i = 0; i < DBFGetFieldCount(hDBF); i++)
-	{
-		value =  DBFReadStringAttribute(hDBF,nr,i);
-		row.push_back(value); 
-	}
-}
-
-void TeSHPPointDecode(SHPObject* psShape, TePointSet& points, string& objid)
-{
-	int nv = psShape->nVertices;
-	for (int i = 0; i<nv; i++)
-	{
-		TePoint point(psShape->padfX[i], psShape->padfY[i]);
-		point.objectId(objid);
-		points.add(point);
-	}
-}
-
-
-void TeSHPPolyLineDecode(SHPObject* psShape, TeLineSet& lines, string& objid)
-{
-	int iPart,j=0,nextStart=0; 
-	for (iPart = 0; iPart < psShape->nParts; iPart++)
-	{
-		if (iPart == psShape->nParts-1)
-			nextStart = psShape->nVertices;
-		else 
-			nextStart = psShape->panPartStart[iPart+1];
-
-		TeLine2D line;
-		while (j<nextStart)
-		{
-			TeCoord2D pt ( psShape->padfX[j], psShape->padfY[j] );
-			line.add ( pt );
-			j++;
-		}
-		line.objectId (objid);	
-		lines.add ( line );
-	}
-}
-
-void
-TeSHPPolygonDecode(SHPObject* psShape, TePolygonSet& polys, string& objid)
-{
-	int iPart;
-	vector<int> partStart;
-
-	vector<TePolygon> pList;
-	vector<TePolygon>::iterator it;
-	vector<TeLinearRing> holes;
-
-	// Build an array whose components point to the starting point
-	// of the rings that compose the shapepoly
-	for ( iPart = 0; iPart < psShape->nParts; iPart++ )
-		partStart.push_back ( psShape->panPartStart[iPart] );
-	partStart.push_back ( psShape->nVertices ); // point to the end
-
-	iPart = 0;
-	int j = 0;
-	while ( j < psShape->nVertices )
-	{
-		TeLine2D line;
-		iPart++;						// while it doesn�t reach the start of next part
-		while ( j < partStart[iPart] )	// Read each ring
-		{
-			TeCoord2D pt ( psShape->padfX[j], psShape->padfY[j] );
-			line.add ( pt );
-			j++;
-		}								// end of a ring
-		if (!line.isRing())				// arbitrarily close opened rings
-			line.add(line[0]);
-
-		TeLinearRing ring(line);
-
-		it = pList.begin();
-
-		short orient = TeOrientation(ring);
-
-		if(orient == TeCLOCKWISE)	// outer ring?
-		{
-			TePolygon p;
-			p.add(ring);
-			p.objectId(objid);
-			pList.push_back(p);
-		}
-		else	// COUNTERCLOCKWISE => inner ring!
-		{
-			holes.push_back(ring);
-		}
-	} // read all vertices
-
-	if(pList.size() == 1)
-	{
-		for(unsigned int i = 0; i < holes.size(); ++i)
-		{
-			pList[0].add(holes[i]);
-		}
-	}
-	else
-	{
-		for(unsigned int i = 0; i < holes.size(); ++i)
-		{
-			TeLinearRing ring = holes[i];
-
-			vector<TePolygon> candidates;
-
-			unsigned int j = 0;
-
-			for(j = 0; j < pList.size(); ++j)
-			{
-				if(TeWithinOrCoveredByOrEquals(ring.box(), pList[j].box()))
-					candidates.push_back(pList[j]);
-			}
-
-			if(candidates.size() == 1)
-			{
-				candidates[0].add(ring);
-				continue;
-			}
-
-			vector<TePolygon> newCandidates;
-
-			for(j = 0; j < candidates.size(); ++j)
-			{
-				short rel = TeBOUNDARY;
-				bool inside = false;
-
-				unsigned int nthVert = ring.size();
-				unsigned int iVert = 0u;
-
-				while(iVert < nthVert)
-				{
-					rel = TeRelation(ring[iVert], candidates[j][0]);
-
-					if(rel & TeINSIDE)
-					{
-					
-						inside = true;
-						newCandidates.push_back(candidates[j]);
-						break;
-					}
-					else if(rel & TeOUTSIDE)
-					{
-						break;
-					}
-				
-					++iVert;
-				}
-
-				if(iVert == nthVert)	
-				{				
-					break;
-				}				
-			}
-
-			int idxMinArea = 0;
-			double minArea = TeMAXFLOAT;
-			for(j = 0; j < newCandidates.size(); ++j)
-			{
-				if(TeGeometryArea(newCandidates[j].box()) < minArea)
-				{
-					idxMinArea = j;
-					minArea = TeGeometryArea(newCandidates[j].box());
-				}
-			}
-
-			if(newCandidates.size())
-				newCandidates[idxMinArea].add(ring);
-		}
-	}
-
-	it = pList.begin();
-	while (it != pList.end())
-	{
-		polys.add(*it);
-		++it;
-	}
-}
-
-void
-TeSHPPointDecode( TeLayer* layer, SHPHandle hSHP, vector<string>& indexVect, unsigned int chunckSize  )
-{
-	int nEntities = hSHP->nRecords; // indicates how many point sets are there
-	TePointSet points;
-
-/* -------------------------------------------------------------------- */
-/*	Skim over the list of shapes, reading all the vertices.	            */
-/* -------------------------------------------------------------------- */
-	if(TeProgress::instance())
-		TeProgress::instance()->setTotalSteps(nEntities);
-
-    int j;
-	for(j= 0; j < nEntities; j++ )
-    {
-        SHPObject* psShape = SHPReadObject( hSHP, j );
-		
-		int i;
-		for (i = 0; i < ( psShape->nVertices ); i++ )
-		{
-			TePoint point;
-			TeCoord2D xy ( psShape->padfX[i], psShape->padfY[i] );
-			point.add ( xy );
-			point.objectId ( indexVect[j] );
-			points.add ( point );
-		}
-		// check if there is a chunk of points to be inserted into the database
-		if ( points.size() >= chunckSize )
-		{
-			layer->addPoints( points ); 
-			points.clear();
-			if(TeProgress::instance())
-			{
-				if (TeProgress::instance()->wasCancelled())
-						break;
-				else
-					TeProgress::instance()->setProgress(j+1);
-			}
-		}	
-		SHPDestroyObject( psShape );
-	}
-	layer->addPoints( points ); 
-	points.clear();
-	if(TeProgress::instance())
-		TeProgress::instance()->setProgress(j+1);
-}
-
-void
-TeSHPPolyLineDecode ( TeLayer*layer, SHPHandle hSHP, vector<string>& indexVect, unsigned int chunckSize )
-{
-	int nEntities = hSHP->nRecords; // indicates how many regions are there
-	TeLineSet lines;
-
-/* -------------------------------------------------------------------- */
-/*	Skim over the list of shapes, reading all the vertices.	            */
-/* -------------------------------------------------------------------- */
-	if(TeProgress::instance())
-		TeProgress::instance()->setTotalSteps(nEntities);
-
-	int i;
-    for(i = 0; i < nEntities; i++ )
-    {
-        SHPObject* psShape = SHPReadObject( hSHP, i );
-
-		// Build an array whose components point to the starting point
-		// of the rings that compose the shapepoly
-		int iPart;
-		vector<int> partStart;
-
-		// Build an array whose components point to the starting point
-		// of the segments that compose the shapeline
-		//
-		for ( iPart = 0; iPart < psShape->nParts; iPart++ )
-		{
-			partStart.push_back ( psShape->panPartStart[iPart] );
-		}
-		partStart.push_back ( psShape->nVertices ); // point to the end
-
-		iPart = 0;
-
-		int j = 0; 
-
-		while ( j < psShape->nVertices )
-		{
-			TeLine2D line;
-
-			iPart++;  // indicates the different segments of the line
-			// Read each segment
-			while ( j < partStart[iPart] )
-			{
-				TeCoord2D pt ( psShape->padfX[j], psShape->padfY[j] );
-				line.add ( pt );
-				j++;
-			}
-			// set the geometry Id for the line 
-			line.objectId ( indexVect[i] ); // set the object index
-			
-			lines.add ( line );
-		}
-		
-		// check if there is a chunk of lines to be inserted into the database
-		if ( lines.size() >= chunckSize )
-		{
-			layer->addLines( lines ); 
-			lines.clear();
-			if(TeProgress::instance())
-			{
-				if (TeProgress::instance()->wasCancelled())
-					break;
-				else
-					TeProgress::instance()->setProgress(i+1);
-			}
-		}		
-		SHPDestroyObject( psShape );
-	}
-	
-	// saves the remaining lines into the database
-	layer->addLines( lines ); 
-	lines.clear();
-	if(TeProgress::instance())
-		TeProgress::instance()->setProgress(i+1);
-}
-
-void
-TeSHPPolygonDecode ( TeLayer* layer, SHPHandle hSHP, vector<string>& indexVect, unsigned int chunckSize )
-{
-
-	int nEntities = hSHP->nRecords; // indicates how many regions are there
-	TePolygonSet polys;
-
-/* -------------------------------------------------------------------- */
-/*	Skim over the list of shapes, reading all the vertices.	            */
-/* -------------------------------------------------------------------- */
-	if(TeProgress::instance())
-		TeProgress::instance()->setMessage("Importando poligonos, aguarde...      ");
-
-	int i;
-    for(i = 0; i < nEntities; i++ )
-    {
-		SHPObject* psShape = SHPReadObject( hSHP, i );
-
-		int iPart;
-		vector<int> partStart;
-
-		// Auxiliary variables
-
-		list<TePolygon> pList;
-
-		// Build an array whose components point to the starting point
-		// of the rings that compose the shapepoly
-		//
-		for ( iPart = 0; iPart < psShape->nParts; iPart++ )
-		{
-			partStart.push_back ( psShape->panPartStart[iPart] );
-		}
-		partStart.push_back ( psShape->nVertices ); // point to the end
-
-		iPart = 0;
-
-		int j = 0;
-
-		while ( j < psShape->nVertices )
-		{
-			iPart++;  // indicates the different rings of the shapepoly
-			TeLine2D line;
-
-			// Read each ring
-			while ( j < partStart[iPart] )
-			{
-				TeCoord2D pt ( psShape->padfX[j], psShape->padfY[j] );
-				line.add ( pt );
-				j++;
-			}
-			// end of a ring
-
-			if (!line.isRing())
-			{
-				line.add(line[0]);
-//				throw TeException ( POLYSHAPE_IS_NOT_RING );
-			}
-
-			TeLinearRing ring ( line );
-
-			// Is it an OUTER or an INNER RING ?
-
-			bool inside = false;
-
-			list<TePolygon>::iterator it = pList.begin();
-
-
-			// Each ring is assigned to a polygon
-			// Each ring and polygon have a unique "geometrical index"
-			//
-			// All rings and polygons that are part of a same object
-			// have the same "object index"
-
-			while ( it != pList.end() )
-			{
-				TePolygon aux;
-				aux.add(ring);
-				if ( TeWithin ( aux, (*it)))
-				{
-					inside = true;
-					ring.objectId ( (*it)[0].objectId() ); // sets the object index
-					(*it).add ( ring );// add a closed region
-					break;
-				}
-				++it;
-			}
-			if ( ! inside )
-			{
-				TePolygon poly;
-				ring.objectId (indexVect[i]);
-				
-				// add a pair (objectId, geometryId) to the layer
-				poly.add ( ring ); // add an outer region
-				poly.objectId ( indexVect[i] ); // set the object index
-
-				pList.push_back ( poly );
-			}
-		} // read all vertices
-
-		list<TePolygon>::iterator it = pList.begin();
-
-		while ( it != pList.end() )
-		{
-			polys.add(*it);
-			++it;
-		}
-		if ( polys.size() >= chunckSize )
-		{
-			layer->addPolygons( polys ); 
-			polys.clear();
-			if(TeProgress::instance())
-			{
-				if (TeProgress::instance()->wasCancelled())
-						break;
-				else
-					TeProgress::instance()->setProgress(i+1);
-			}
-		}
-		SHPDestroyObject( psShape );
-	} // read all entities
-
-	// save the remaining polygons
-	layer->addPolygons( polys ); 
-	polys.clear();
-	if(TeProgress::instance())
-		TeProgress::instance()->setProgress(i+1);
-}
-
diff --git a/src/terralib/functions/TeImportSPR.cpp b/src/terralib/functions/TeImportSPR.cpp
old mode 100644
new mode 100755
diff --git a/src/terralib/functions/TeImportSPR.h b/src/terralib/functions/TeImportSPR.h
old mode 100644
new mode 100755
diff --git a/src/terralib/functions/TeInterpolation.cpp b/src/terralib/functions/TeInterpolation.cpp
new file mode 100755
index 0000000..5287a5f
--- /dev/null
+++ b/src/terralib/functions/TeInterpolation.cpp
@@ -0,0 +1,369 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+
+#include "TeInterpolation.h"
+
+#include "TeKdTree.h"
+#include "TeSTElementSet.h"
+#include "TeSTEFunctionsDB.h"
+#include "TeQuerierParams.h"
+#include "TeQuerier.h"
+#include "TeVectorRemap.h"
+
+
+//! Builds a KDTree from a theme with samples: the theme must have a point representation
+/*
+		\param sampleTheme          The theme with samples
+		\param sampleAttrTableName  Theme table with samples
+		\param sampleColumnName     Table column with sample values
+		\param tree				    The tree to store samples
+		\param destProjection		Destination projection
+		\return TRUE if the tree is built correct, otherwise returns FALSE
+ */
+template<class KDTREE> bool TeBuildKDTree(TeTheme* sampleTheme, const string& sampleAttrTableName,
+										  const string& sampleColumnName, KDTREE& tree, TeProjection* destProjection)
+{
+// verifies if we need to reproject the samples
+	bool doReprojection = false;
+
+	TeProjection* sampleProj = sampleTheme->layer()->projection();
+
+	if(sampleProj && destProjection && (!((*sampleProj) == (*destProjection))))
+		doReprojection = true;
+
+// if it is necessary to reproject, reproject the tree's box first
+    if(doReprojection)
+	{
+		TeBox baux = tree.getBox();
+		TeBox b = TeRemapBox(baux, sampleProj, destProjection);
+
+		tree.setBox(b);
+	}
+
+
+	vector<pair<TeCoord2D, TeSample> > dataSet;
+
+// load sample points
+	bool loadGeometries = true;
+
+    vector<string> attributes;
+
+	string attName = sampleAttrTableName + "." + sampleColumnName;
+
+    attributes.push_back(attName);
+
+	TeQuerierParams querierParams(loadGeometries, attributes);
+
+	querierParams.setParams(sampleTheme);
+
+	TeQuerier querier(querierParams);
+
+// load instances from theme based in the querier parameters
+	if(!querier.loadInstances())
+		return false;
+	
+	TeSTInstance sti;	
+
+// traverse all the instances
+	while(querier.fetchInstance(sti))	
+	{
+		TeProperty prop;
+
+// retrieves sample values
+		sti.getProperty(prop, attName);    
+		
+		if(sti.hasPoints())
+		{
+			TePointSet pointSet;
+
+			sti.getGeometry(pointSet);
+
+			TeCoord2D c = pointSet[0].location();
+
+// if it is necessary, do reprojection
+			if(doReprojection)
+			{
+				TeCoord2D caux;
+				TeVectorRemap(c, sampleProj, caux, destProjection);
+				c = caux;
+			}
+
+			TeSample sample(c, atof(prop.value_.c_str()));
+
+// put samples into auxiliary vector to build the tree
+			dataSet.push_back(pair<TeCoord2D, TeSample>(sample.location(), sample));
+		}
+	}
+
+	tree.build(dataSet);
+
+	return true;
+}
+
+bool TeCellInterpolate(TeTheme* inputTheme, const string& inputAttrTableName, const string& sampleColumnName,
+                       TeTheme* outputTheme, const string& outputAttrTableName, const string& outputColumnName,
+				       const TeInterpolationAlgorithm& algorithm,
+                       const unsigned int& numberOfNeighbors, const int& powValue, const double& boxRatio)
+{
+	if((inputTheme == 0) || (outputTheme == 0))
+		return false;
+
+	if(inputAttrTableName.empty() || outputAttrTableName.empty())
+		return false;
+
+	if(sampleColumnName.empty() || outputColumnName.empty())
+		return false;	
+
+// load the tree with samples
+	typedef TeSAM::TeAdaptativeKdTreeNode<TeCoord2D, vector<TeSample>, TeSample> KDNODE;
+	typedef TeSAM::TeAdaptativeKdTree<KDNODE> KDTREE;
+
+	unsigned int bucketSize = 2 * numberOfNeighbors;
+
+	TeBox mbr = inputTheme->layer()->box();
+
+	KDTREE tree(mbr, bucketSize);
+
+	if(!TeBuildKDTree(inputTheme, inputAttrTableName, sampleColumnName, tree, outputTheme->layer()->projection()))
+		return false;
+
+	if(tree.size() == 0)
+		return false;
+	
+	else if(outputTheme->visibleRep() & TeCELLS)
+	{
+		TeInterpolationAlgorithms<KDTREE> interpolationObj(tree);
+
+// load cells to be interpolated
+
+		bool loadGeometries = true;
+
+		vector<string> attributes;
+
+		TeQuerierParams querierParams(loadGeometries);
+
+		querierParams.setParams(outputTheme);
+
+		TeQuerier querier(querierParams);
+
+// load theme instances
+		querier.loadInstances();	
+		
+		TeSTInstance sti;	
+
+		TeSTElementSet elemSet(outputTheme);	
+
+// traverse all the instances
+		while(querier.fetchInstance(sti))	
+		{
+			TeProperty prop;
+
+			if(sti.hasCells())
+			{
+				TeCellSet cellSet;
+
+				sti.getGeometry(cellSet);
+
+				double value = -TeMAXFLOAT;
+
+// if the cell has more than one geometry, so emit an error!!!!!!
+				if((cellSet.size() > 1) || (cellSet.size() == 0))
+					return false;
+
+// do interpolation with the informed algorithm
+				if(algorithm == TeNNInterpolation)
+				{
+					value = interpolationObj.nearestNeighbor(cellSet[0].box().center());
+				}
+				else if(algorithm == TeAvgInterpolation)
+				{
+					value = interpolationObj.avgNearestNeighbor(cellSet[0].box().center(), numberOfNeighbors);
+				}
+				else if(algorithm == TeDistWeightAvgInterpolation)
+				{
+					value = interpolationObj.distWeightAvgNearestNeighbor(cellSet[0].box().center(), numberOfNeighbors, powValue);
+				}
+				else if(algorithm == TeAvgInBoxInterpolation)
+				{
+					TeCoord2D center = cellSet[0].box().center();
+
+					TeBox b(center.x_ - boxRatio, center.y_ - boxRatio, center.x_ + boxRatio, center.y_ + boxRatio);
+
+					value = interpolationObj.boxAvg(b);
+				}
+				else if(algorithm == TeDistWeightAvgInBoxInterpolation)
+				{
+					TeCoord2D center = cellSet[0].box().center();
+
+					TeBox b(center.x_ - boxRatio, center.y_ - boxRatio, center.x_ + boxRatio, center.y_ + boxRatio);
+
+					value = interpolationObj.boxDistWeightAvg(center, b, powValue);
+				}
+				else
+					return false;
+
+// stores the interpolated values
+				TeSTInstance inst;
+
+				inst.objectId(sti.objectId());
+				inst.uniqueId(sti.uniqueId());
+				inst.theme(outputTheme);
+
+				TeProperty prop;
+				prop.attr_.rep_.name_ = outputColumnName;
+				prop.attr_.rep_.type_ = TeREAL;
+				prop.value_ = Te2String(value, 15);
+
+				inst.addProperty(prop);
+
+				elemSet.insertSTInstance(inst);
+			}
+		}
+
+// store the interpolated values
+		return TeUpdateDBFromSet(&elemSet, outputAttrTableName);	
+	}	
+	
+	return false;
+}
+
+bool TeRasterInterpolate(TeTheme* inputTheme, const string& inputAttrTableName, const string& sampleColumnName,
+                         TeRaster* outputRaster, const int& band,
+				         const TeInterpolationAlgorithm& algorithm,
+                         const unsigned int& numberOfNeighbors, const int& powValue, const double& boxRatio)
+{
+	if((inputTheme == 0) || (outputRaster == 0))
+		return false;
+
+	if(inputAttrTableName.empty())
+		return false;
+
+	if(sampleColumnName.empty())
+		return false;	
+
+// load tree with samaples
+	typedef TeSAM::TeAdaptativeKdTreeNode<TeCoord2D, vector<TeSample>, TeSample> KDNODE;
+	typedef TeSAM::TeAdaptativeKdTree<KDNODE> KDTREE;
+
+// A minimum of MINBUCKETSIZE elements in each bucket
+	unsigned int bucketSize = 2 * numberOfNeighbors;
+
+	TeBox mbr = inputTheme->layer()->box();
+
+	KDTREE tree(mbr, bucketSize);
+
+	if(!TeBuildKDTree(inputTheme, inputAttrTableName, sampleColumnName, tree, outputRaster->projection()))
+		return false;
+
+	if(tree.size() == 0)
+		return false;
+
+	TeInterpolationAlgorithms<KDTREE> interpolationObj(tree);
+	
+	int nLines = outputRaster->params().nlines_;
+	int nCols = outputRaster->params().ncols_;
+
+	double value = -TeMAXFLOAT;
+
+	if(algorithm == TeNNInterpolation)
+	{
+		for(int i = 0; i < nLines; ++i)
+			for(int j = 0; j < nCols; ++j)
+			{
+				TeCoord2D cl(j, i);
+
+				TeCoord2D c = outputRaster->index2Coord(cl);
+
+				value = interpolationObj.nearestNeighbor(c);
+
+                outputRaster->setElement(j, i, value, band);
+			}		
+	}
+	else if(algorithm == TeAvgInterpolation)
+	{
+		for(int i = 0; i < nLines; ++i)
+		{
+			for(int j = 0; j < nCols; ++j)
+			{
+				TeCoord2D cl(j, i);
+
+				TeCoord2D c = outputRaster->index2Coord(cl);
+
+				value = interpolationObj.avgNearestNeighbor(c, numberOfNeighbors);
+
+                outputRaster->setElement(j, i, value, band);
+			}	
+		}
+	}
+	else if(algorithm == TeDistWeightAvgInterpolation)
+	{
+		for(int i = 0; i < nLines; ++i)
+			for(int j = 0; j < nCols; ++j)
+			{
+				TeCoord2D cl(j, i);
+
+				TeCoord2D c = outputRaster->index2Coord(cl);
+
+				value = interpolationObj.distWeightAvgNearestNeighbor(c, numberOfNeighbors, powValue);
+
+                outputRaster->setElement(j, i, value, band);
+			}
+	}
+	else if(algorithm == TeAvgInBoxInterpolation)
+	{
+		for(int i = 0; i < nLines; ++i)
+			for(int j = 0; j < nCols; ++j)
+			{
+				TeCoord2D cl(j, i);
+
+				TeCoord2D c = outputRaster->index2Coord(cl);
+
+				TeBox b(c.x_ - boxRatio, c.y_ - boxRatio, c.x_ + boxRatio, c.y_ + boxRatio);
+
+				value = interpolationObj.boxAvg(b);
+
+                outputRaster->setElement(j, i, value, band);
+			}
+	}
+	else if(algorithm == TeDistWeightAvgInBoxInterpolation)
+	{
+		for(int i = 0; i < nLines; ++i)
+			for(int j = 0; j < nCols; ++j)
+			{
+				TeCoord2D cl(j, i);
+
+				TeCoord2D c = outputRaster->index2Coord(cl);
+
+				TeBox b(c.x_ - boxRatio, c.y_ - boxRatio, c.x_ + boxRatio, c.y_ + boxRatio);
+
+				value = interpolationObj.boxDistWeightAvg(c, b, powValue);
+
+                outputRaster->setElement(j, i, value, band);
+			}
+	}
+	else
+		return false;
+
+
+    return true;
+}
diff --git a/src/terralib/functions/TeInterpolation.h b/src/terralib/functions/TeInterpolation.h
new file mode 100755
index 0000000..6e57fa5
--- /dev/null
+++ b/src/terralib/functions/TeInterpolation.h
@@ -0,0 +1,356 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+
+/*! \file TeInterpolation.h
+    This file contains routines for interpolation of cell themes and raster themes.	
+*/
+
+#ifndef  __TERRALIB_INTERNAL_INTERPOLATION_H
+#define  __TERRALIB_INTERNAL_INTERPOLATION_H
+
+#include "TeTheme.h"
+
+
+/*
+ * NOTE: You should call TeCellInterpolate or TeRasterInterpolate with the required parameters. Don't use
+ *       the class TeInterpolationAlgorithms, it is for internal use only!
+ *
+ */
+
+
+/** @defgroup InterpolationDataStructure Interpolation Algorithms and Data Structures
+ *  TerraLib Interpolation Data Structure.
+ *  @{
+ */
+
+/*! \enum TeInterpolationAlgorithm
+
+	Methods of interpolation, may be:
+    - TeNNInterpolation                  Interpolation that uses the nearest neighbor value
+	- TeAvgInterpolation                 Interpolation that uses the average of k-nearest neighbors values
+	- TeDistWeightAvgInterpolation       Interpolation with weight average (inverse of square distance or other) of k-nearest neighbors values
+	- TeAvgInBoxInterpolation			 Interpolation with simple average of elements in box
+	- TeDistWeightAvgInBoxInterpolation  Interpolation with weight average of elements in box
+*/ 
+enum TeInterpolationAlgorithm { TeNNInterpolation, TeAvgInterpolation, TeDistWeightAvgInterpolation,
+                                TeAvgInBoxInterpolation, TeDistWeightAvgInBoxInterpolation };
+
+//! Class that supports several types of interpolation methods
+/*!
+	Given a KdTree and a key, choose a method of interpolation.
+	
+	WARNING:	1. This class MUST BE USED ONLY BY in the routines below (TeCellInterpolate and TeRasterInterpolate) 
+	               and should NOT be used by anyone because the support and interfaces can be changed in future.
+				   THIS IS FOR INTERNAL USE ONLY.
+	
+				2. As in simple average as in weight average, if all neighbours aren't find the calculus considerates 
+	               the number of found neighbours.
+
+			    3. If an unexpected situation occurs so -TeMAXFLOAT is returned.
+
+				4. If a sample exist in the same position of a key, so the sample value is returned, i.e.,
+				   not all neighbours are considered.
+ */
+template<class ADAPTATIVEKDTREE> class TeInterpolationAlgorithms
+{
+	protected:
+
+		typedef typename ADAPTATIVEKDTREE::kdKey kdKey;
+		typedef typename ADAPTATIVEKDTREE::kdDataItem kdDataItem;
+		typedef typename ADAPTATIVEKDTREE::kdNode kdNode;
+
+		//! reference to an adptative kdtree 
+		const ADAPTATIVEKDTREE& kd_;
+
+	public:		
+
+		//! Constructor
+		TeInterpolationAlgorithms(const ADAPTATIVEKDTREE& kd)
+			: kd_(kd)
+		{
+		}
+
+		//! Destructor
+		~TeInterpolationAlgorithms()
+		{
+		}
+
+		//! Returns the nearest neighbor value
+		double nearestNeighbor(const kdKey& key)
+		{
+			vector<kdDataItem> report;
+			vector<double> sqrDists;
+
+			fillNNVector(report, 1);
+
+			kd_.nearestNeighborSearch(key, report, sqrDists, 1);
+
+			if(sqrDists[0] >= TeMAXFLOAT)
+				return -TeMAXFLOAT;
+			else
+				return report[0].value();
+		}
+
+		//! Simple Average of Nearest Neighbors. If an error occur returns -TeMAXFLOAT
+		double avgNearestNeighbor(const kdKey& key, const unsigned int& numberOfNeighbors)
+		{
+			vector<kdDataItem> report;
+			vector<double> sqrDists;
+
+			fillNNVector(report, numberOfNeighbors);
+
+			kd_.nearestNeighborSearch(key, report, sqrDists, numberOfNeighbors);
+
+			double numElements = numberOfNeighbors;
+
+			double sum = 0.0;
+
+			for(unsigned int i = 0; i < numberOfNeighbors; ++i)
+			{
+				if(sqrDists[i] >= TeMAXFLOAT)
+				{
+					--numElements;
+					continue;
+				}
+
+				if(sqrDists[i] == 0.0)
+					return report[i].value();
+
+				sum += report[i].value();
+			}
+
+			if(numElements > 0.0)
+                return sum / numElements;
+			else
+				return -TeMAXFLOAT;
+		}
+
+		//! Weight Average of Nearest Neighbors. If an error occur returns -TeMAXFLOAT
+		double distWeightAvgNearestNeighbor(const kdKey& key, const unsigned int& numberOfNeighbors, const int& powValue)
+		{
+			vector<kdDataItem> report;
+			vector<double> sqrDists;
+
+			fillNNVector(report, numberOfNeighbors);
+
+			kd_.nearestNeighborSearch(key, report, sqrDists, numberOfNeighbors);
+
+			double num = 0.0;
+			double den = 0.0;
+
+			if(powValue == 1.0)
+			{
+				for(unsigned int i = 0; i < numberOfNeighbors; ++i)
+				{
+					if(sqrDists[i] >= TeMAXFLOAT)
+						continue;
+
+					if(sqrDists[i] == 0.0)
+						return report[i].value();
+
+					double wi = 1.0 / (sqrt(sqrDists[i]));
+
+					num += (wi * report[i].value());
+					den += wi;
+				}
+			}
+			else if(powValue == 2.0)
+			{
+				for(unsigned int i = 0; i < numberOfNeighbors; ++i)
+				{
+					if(sqrDists[i] >= TeMAXFLOAT)
+						continue;
+
+					if(sqrDists[i] == 0.0)
+						return report[i].value();
+
+					double wi = 1.0 / (sqrDists[i]);
+
+					num += (wi * report[i].value());
+					den += wi;
+				}
+			}
+			else
+			{
+				for(unsigned int i = 0; i < numberOfNeighbors; ++i)
+				{
+					if(sqrDists[i] >= TeMAXFLOAT)
+						continue;
+
+					if(sqrDists[i] == 0.0)
+						return report[i].value();
+
+					double wi = 1.0 / pow(sqrt(sqrDists[i]), powValue);
+
+					num += (wi * report[i].value());
+					den += wi;
+				}
+			}
+
+			if(den != 0.0)
+                return num / den;
+			else
+				return -TeMAXFLOAT;
+		}
+
+		//! Simple Average of Elements in Box. If an error occur returns -TeMAXFLOAT
+		double boxAvg(const TeBox& box)
+		{
+			vector<kdNode*> report;
+
+			kd_.search(box, report);
+
+			unsigned int numberOfNodes = report.size();
+
+			unsigned int numElements = 0;
+
+			double sum = 0.0;
+
+			for(unsigned int i = 0; i < numberOfNodes; ++i)
+			{
+				unsigned int nodeSize = report[i]->getData().size();
+
+				for(unsigned int j = 0; j < nodeSize; ++j)
+				{
+					if(TeIntersects(report[i]->getData()[j].location(), box))
+					{
+                        sum += report[i]->getData()[j].value();
+						++numElements;
+					}
+				}				
+			}
+
+			if(numElements > 0)
+                return sum / double(numElements);
+			else
+				return -TeMAXFLOAT;
+		}
+
+		//! Distance Weight Average of Elements in Box. If an error occur returns -TeMAXFLOAT
+		double boxDistWeightAvg(const kdKey& key, const TeBox& box, const int& powValue)
+		{
+			vector<kdNode*> report;
+
+			kd_.search(box, report);
+
+			unsigned int numberOfNodes = report.size();
+
+			double num = 0.0;
+			double den = 0.0;
+
+			for(unsigned int i = 0; i < numberOfNodes; ++i)
+			{
+				unsigned int nodeSize = report[i]->getData().size();
+
+				for(unsigned int j = 0; j < nodeSize; ++j)
+				{
+					if(TeIntersects(report[i]->getData()[j].location(), box))
+					{
+						double wi = 1 / pow(TeDistance(key, report[i]->getData()[j].location()), powValue);
+						
+						num += wi * report[i]->getData()[j].value();
+						den += wi;
+					}
+				}				
+			}
+
+			if(den != 0.0)
+                return num / den;
+			else
+				return -TeMAXFLOAT;
+		}
+
+	protected:
+
+		//! Fills the nearest neighbour vector with default values
+		void fillNNVector(vector<kdDataItem>& report, const unsigned int& numberOfNeighbors) const
+		{
+			for(unsigned int i = 0; i < numberOfNeighbors; ++i)
+			{
+				TeCoord2D c(TeMAXFLOAT, TeMAXFLOAT);
+				kdDataItem item(c, -TeMAXFLOAT);
+
+				report.push_back(item);
+			}
+		}
+
+	private:
+
+		//! No copy allowed
+		TeInterpolationAlgorithms(const TeInterpolationAlgorithms& rhs);
+
+		//! No copy allowed
+		TeInterpolationAlgorithms& operator=(const TeInterpolationAlgorithms& rhs);		
+};
+
+
+
+//! Interpolates a cell theme
+/*
+		\param inputTheme			The theme with samples to be used: samples are treated as a layer of points with a column with a value (double or integer)
+		\param inputAttrTableName   Theme table with samples
+		\param sampleColumnName     Table column with sample values: must be int or double values
+		\param outputTheme          The theme where output will be stored: this theme must already exist
+		\param outputAttrTableName  Theme table where output will be stored: this table must already exist
+		\param outputColumnName     Table column where data will be stored: this column must already exist
+		\param algorithm		    Type of algorithm to be used: see enum TeInterpolationAlgorithm
+		\param numberOfNeighbors    Number of nearest neighbor to be used in interpolation
+		\param powValue			    Pow parameter for inverse distance function
+		\param boxRatio				Ratio of the box used to search samples
+		\return TRUE if there isn't an error during interpolation otherwise return FALSE
+ */
+bool TeCellInterpolate(TeTheme* inputTheme, const string& inputAttrTableName, const string& sampleColumnName,
+                       TeTheme* outputTheme, const string& outputAttrTableName, const string& outputColumnName,
+				       const TeInterpolationAlgorithm& algorithm = TeNNInterpolation,
+                       const unsigned int& numberOfNeighbors = 1, const int& powValue = 1, const double& boxRatio = 1.0);
+
+//! Interpolates a a raster
+/*
+		\param inputTheme			The theme with samples to be used: samples are treated as a layer of points with a column with a value (double or integer)
+		\param inputAttrTableName   Theme table with samples
+		\param sampleColumnName     Table column with sample values
+		\param outputRaster         A pointer to a raster where interpolated data will be stored: this raster mus already exist
+		\param band                 The band to be interpolated
+		\param algorithm		    Type of algorithm to be used: see enum TeInterpolationAlgorithm
+		\param numberOfNeighbors    Number of nearest neighbor to be used in interpolation
+		\param powValue			    Pow parameter for inverse distance function
+		\param boxRatio				Ratio of the box used to search samples
+		\return TRUE if there isn't an error during interpolation otherwise return FALSE
+ */
+bool TeRasterInterpolate(TeTheme* inputTheme, const string& inputAttrTableName, const string& sampleColumnName,
+                         TeRaster* outputRaster, const int& band = 0,
+				         const TeInterpolationAlgorithm& algorithm = TeNNInterpolation,
+                         const unsigned int& numberOfNeighbors = 1, const int& powValue = 1, const double& boxRatio = 1.0);
+
+		
+
+/** @} */ 
+
+
+
+
+#endif	// __TERRALIB_INTERNAL_INTERPOLATION_H
+
+
+
+
diff --git a/src/terralib/functions/TeLayerFunctions.cpp b/src/terralib/functions/TeLayerFunctions.cpp
old mode 100644
new mode 100755
index f71ecba..9172ea4
--- a/src/terralib/functions/TeLayerFunctions.cpp
+++ b/src/terralib/functions/TeLayerFunctions.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -25,6 +25,8 @@ of this library and its documentation.
 #include "TeImportRaster.h"
 #include "TeProgress.h"
 #include "TeRaster.h"
+#include "TeExternalTheme.h"
+#include "TeDatabaseUtils.h"
 
 
 bool TeCopyThemeToLayer(TeTheme* inTheme, TeLayer* outLayer, 
@@ -34,22 +36,28 @@ bool TeCopyThemeToLayer(TeTheme* inTheme, TeLayer* outLayer,
 		return false;
 
 	TeLayer* inLayer = inTheme->layer();
-
 	// both projection should be valid
 	// do not allow only one NoProjection 
 	TeProjection* pfrom = TeProjectionFactory::make(inTheme->layer()->projection()->params());
 	TeProjection* pto = TeProjectionFactory::make(outLayer->projection()->params());
+
+	if (!(*pfrom == *pto))
+	{
+		if (pfrom->name() == "NoProjection" || pto->name() == "NoProjection")
+		{
+			delete pfrom;
+			delete pto;
+			return false;
+		}
+	}
+
 	TeDatabasePortal* portal = inLayer->database()->getPortal();
 	if (!portal)
-	{
-		delete pfrom;
-		delete pto;
 		return false;
-	}
 
 	string sql;
-	bool res = false;
-	if (inLayer->hasGeometry(TeRASTER))
+	TeGeomRep rep = static_cast<TeGeomRep>(inLayer->geomRep());
+	if (rep & TeRASTER)
 	{
 		TeRepresentation* rep = inLayer->getRepresentation(TeRASTER);
 		sql = "SELECT object_id FROM " + rep->tableName_;
@@ -63,20 +71,52 @@ bool TeCopyThemeToLayer(TeTheme* inTheme, TeLayer* outLayer,
 				objid = portal->getData(0);
 				rst = inLayer->raster(objid);
 				par = rst->params();
-				res = TeImportRaster(outLayer,rst,par.blockWidth_,par.blockHeight_,par.compression_[0],
-									 objid,par.dummy_[0],par.useDummy_,par.tiling_type_);
+				if (!TeImportRaster(outLayer,rst,par.blockWidth_,par.blockHeight_,par.compression_[0],
+									 objid,par.dummy_[0],par.useDummy_,par.tiling_type_))
+				{
+					delete pfrom;
+					delete pto;
+					delete portal;
+					return false;
+				}
 			}
 		}
-
-		outLayer->database()->insertMetadata(outLayer->tableName(TeRASTER),"BLOCK_BOX", 0.0005,0.0005,outLayer->box());
-		outLayer->database()->createSpatialIndex(outLayer->tableName(TeRASTER),"BLOCK_BOX", (TeSpatialIndexType)TeRTREE);
+		// build the spatial index in the raster table
+		std::string spatialColumn = outLayer->database()->getSpatialIdxColumn(TeRASTER);
+		outLayer->database()->insertMetadata(outLayer->tableName(TeRASTER), spatialColumn, 0.0005,0.0005,outLayer->box());
+		outLayer->database()->createSpatialIndex(outLayer->tableName(TeRASTER), spatialColumn, (TeSpatialIndexType)TeRTREE);
 		portal->freeResult();
 	}
 
+	if (rep & TeRASTERFILE)
+	{
+		TeRepresentation* rep = inLayer->getRepresentation(TeRASTERFILE);
+		if (rep)
+		{
+			string inRepTableName = rep->tableName_;
+			rep->tableName_ = "RasterLayer" + Te2String(outLayer->id());
+			if (outLayer->database()->insertRepresentation(outLayer->id(),*rep))
+			{
+				sql = "INSERT INTO " + rep->tableName_ + " (object_id, raster_table, lut_table, res_x, res_y, num_bands, num_cols, num_rows, block_height, block_width, lower_x, lower_y, upper_x, upper_y, tiling_type) ";
+				sql += " SELECT object_id, raster_table, lut_table, res_x, res_y, num_bands, num_cols, num_rows, block_height, block_width, lower_x, lower_y, upper_x, upper_y, tiling_type FROM " + inRepTableName;
+				outLayer->database()->execute(sql);
+			}
+		}
+	}
+	
+	// check if there is any other vectorial representation
+	if (!((rep & TePOLYGONS) || (rep & TeLINES) || 
+		  (rep & TePOINTS)   || (rep & TeCELLS) ||
+		  (rep & TeTEXT)))
+	{
+		delete pfrom;
+		delete pto;
+		delete portal;
+		return true;
+	}
 
 	// this SQL selects instances of objects according to input, so it uses te_collection_aux
 	string inputInst;
-
 	// this SQL selects objects according to input, so it uses te_collection
 	string inputObj; 
 	if(selObj == 1) // queried
@@ -121,31 +161,27 @@ bool TeCopyThemeToLayer(TeTheme* inTheme, TeLayer* outLayer,
 		inputInst += " OR " + inTheme->collectionAuxTable() + ".grid_status = 1";
 		inputInst += " OR " + inTheme->collectionAuxTable() + ".grid_status = 3)";
 	}
-
-	if (!res)
+	// Initally test if there is any object selected
+	sql = "SELECT c_object_id FROM " + inTheme->collectionTable();
+	if (!inputObj.empty())
+		sql += " WHERE " + inputObj;
+	if (!portal->query(sql))
 	{
-		// Initally test if there is any object selected
-		sql = "SELECT c_object_id FROM " + inTheme->collectionTable();
-		if (!inputObj.empty())
-			sql += " WHERE " + inputObj;
-		if (!portal->query(sql))
-		{
-			delete portal;
-			delete pfrom;
-			delete pto;
-			return false;
-		}
-		if (!portal->fetchRow())
-		{
-			delete portal;
-			delete pfrom;
-			delete pto;
-			return true;
-		}
-		portal->freeResult();
+		delete portal;
+		delete pfrom;
+		delete pto;
+		return false; // error!
+	}
+	if (!portal->fetchRow())
+	{
+		delete portal;
+		delete pfrom;
+		delete pto;
+		return true; // there is no object selected
 	}
+	portal->freeResult();
 
-	unsigned int	n = 1;
+	unsigned int n = 1;
 	if (inLayer->hasGeometry(TePOINTS))
 	{
 		sql = "SELECT " + inLayer->tableName(TePOINTS) + ".* FROM ";
@@ -165,8 +201,9 @@ bool TeCopyThemeToLayer(TeTheme* inTheme, TeLayer* outLayer,
 			TeCopyPortalGeometriesToLayer<TePointSet>(portal,pfrom,outLayer);
 		portal->freeResult(); 
 
-		outLayer->database()->insertMetadata(outLayer->tableName(TePOINTS),"SPATIAL_DATA", 0.0005,0.0005,outLayer->box());
-		outLayer->database()->createSpatialIndex(outLayer->tableName(TePOINTS),"SPATIAL_DATA", (TeSpatialIndexType)TeRTREE);
+		std::string spatialColumn = outLayer->database()->getSpatialIdxColumn(TePOINTS);
+		outLayer->database()->insertMetadata(outLayer->tableName(TePOINTS), spatialColumn, 0.0005,0.0005,outLayer->box());
+		outLayer->database()->createSpatialIndex(outLayer->tableName(TePOINTS), spatialColumn, (TeSpatialIndexType)TeRTREE);
 	}
 	
 	if (inLayer->hasGeometry(TeLINES))
@@ -189,8 +226,9 @@ bool TeCopyThemeToLayer(TeTheme* inTheme, TeLayer* outLayer,
 			TeCopyPortalGeometriesToLayer<TeLineSet>(portal,pfrom,outLayer);
 		portal->freeResult(); 
 
-		outLayer->database()->insertMetadata(outLayer->tableName(TeLINES),"SPATIAL_DATA", 0.0005,0.0005,outLayer->box());
-		outLayer->database()->createSpatialIndex(outLayer->tableName(TeLINES),"SPATIAL_DATA", (TeSpatialIndexType)TeRTREE);
+		std::string spatialColumn = outLayer->database()->getSpatialIdxColumn(TeLINES);
+		outLayer->database()->insertMetadata(outLayer->tableName(TeLINES), spatialColumn, 0.0005,0.0005,outLayer->box());
+		outLayer->database()->createSpatialIndex(outLayer->tableName(TeLINES), spatialColumn, (TeSpatialIndexType)TeRTREE);
 	}
 	if (inLayer->hasGeometry(TePOLYGONS))
 	{
@@ -200,7 +238,7 @@ bool TeCopyThemeToLayer(TeTheme* inTheme, TeLayer* outLayer,
 		if (!inputObj.empty())
 			sql += " AND " + inputObj;
 
-		if (inLayer->database()->dbmsName() != "OracleSpatial")
+		if (inLayer->database()->dbmsName() != "OracleSpatial" && inLayer->database()->dbmsName() != "PostGIS")
 			sql += " ORDER BY object_id ASC, parent_id ASC, num_holes DESC";
 		else
 			sql += " ORDER BY object_id ASC"; 
@@ -216,8 +254,9 @@ bool TeCopyThemeToLayer(TeTheme* inTheme, TeLayer* outLayer,
 			TeCopyPortalGeometriesToLayer<TePolygonSet>(portal,pfrom,outLayer);
 		portal->freeResult(); 
 
-		outLayer->database()->insertMetadata(outLayer->tableName(TePOLYGONS),"SPATIAL_DATA", 0.0005,0.0005,outLayer->box());
-		outLayer->database()->createSpatialIndex(outLayer->tableName(TePOLYGONS),"SPATIAL_DATA", (TeSpatialIndexType)TeRTREE);
+		std::string spatialColumn = outLayer->database()->getSpatialIdxColumn(TePOLYGONS);
+		outLayer->database()->insertMetadata(outLayer->tableName(TePOLYGONS), spatialColumn, 0.0005,0.0005,outLayer->box());
+		outLayer->database()->createSpatialIndex(outLayer->tableName(TePOLYGONS), spatialColumn, (TeSpatialIndexType)TeRTREE);
 	}
 
 	if (inLayer->hasGeometry(TeCELLS))
@@ -239,8 +278,10 @@ bool TeCopyThemeToLayer(TeTheme* inTheme, TeLayer* outLayer,
 			TeCopyPortalGeometriesToLayer<TeCellSet>(portal,pfrom,outLayer);
 		portal->freeResult(); 
 
-		outLayer->database()->insertMetadata(outLayer->tableName(TeCELLS),"SPATIAL_DATA", 0.0005,0.0005,outLayer->box());
-		outLayer->database()->createSpatialIndex(outLayer->tableName(TeCELLS),"SPATIAL_DATA", (TeSpatialIndexType)TeRTREE);
+		std::string spatialColumn = outLayer->database()->getSpatialIdxColumn(TeCELLS);
+		outLayer->database()->insertMetadata(outLayer->tableName(TeCELLS), spatialColumn, 0.0005,0.0005,outLayer->box());
+		outLayer->database()->createSpatialIndex(outLayer->tableName(TeCELLS), spatialColumn, (TeSpatialIndexType)TeRTREE);
+		
 	}
 
 	if (inLayer->hasGeometry(TeTEXT))
@@ -269,9 +310,9 @@ bool TeCopyThemeToLayer(TeTheme* inTheme, TeLayer* outLayer,
 				k++;
 				newTextTable = textTables[j] + "_" + Te2String(k);
 			}
-			sql = "SELECT " + textTables[j] + ".* FROM ";
+			sql = "SELECT DISTINCT " + textTables[j] + ".* FROM ";
 			sql += textTables[j] + ", " + inTheme->collectionTable();
-			sql += " WHERE object_id = c_object_id";
+			sql += " WHERE object_id = c_object_id OR object_id = 'TE_NONE_ID'";
 			if(inputObj.empty() == false)
 				sql += " AND " + inputObj;
 			if (!portal->query(sql))
@@ -299,7 +340,6 @@ bool TeCopyThemeToLayer(TeTheme* inTheme, TeLayer* outLayer,
 			portal->freeResult();
 		}
 	}
-
 	delete pfrom;
 	delete pto;
 	portal->freeResult();
@@ -312,7 +352,7 @@ bool TeCopyThemeToLayer(TeTheme* inTheme, TeLayer* outLayer,
 	if (portal->query(sql) && portal->fetchRow())
 		hasExternal = true;
 	portal->freeResult();
-	
+
 	for (unsigned int i=0; i<attributeTables.size(); i++)
 	{
 		TeTable table = attributeTables[i];
@@ -333,73 +373,85 @@ bool TeCopyThemeToLayer(TeTheme* inTheme, TeLayer* outLayer,
 		}
 		string tfrom = table.name();
 		table.name(tname);
-		if (outLayer->createAttributeTable(table))
+		if (!outLayer->createAttributeTable(table))
 		{
-			string fieldsIn;
-			string fieldsOut;
-			vector<string> attNamesIn;
-			vector<string> attNamesOut;
-			table.attributeNames(attNamesOut);
-			for (n=0;n<attNamesOut.size()-1; n++)
-			{
-				fieldsOut += attNamesOut[n] + ",";
-				fieldsIn += tfrom + "." + attListIn[n].rep_.name_ + ",";
-			}
-			fieldsOut += attNamesOut[n];
-			fieldsIn += tfrom + "." + attListIn[n].rep_.name_;
+			delete portal;
+			return false;
+		}
+		string fieldsIn;
+		string fieldsOut;
+		vector<string> attNamesIn;
+		vector<string> attNamesOut;
+		table.attributeNames(attNamesOut);
+		for (n=0;n<attNamesOut.size()-1; n++)
+		{
+			fieldsOut += attNamesOut[n] + ",";
+			fieldsIn += tfrom + "." + attListIn[n].rep_.name_ + ",";
+		}
+		fieldsOut += attNamesOut[n];
+		fieldsIn += tfrom + "." + attListIn[n].rep_.name_;
 
-			if (!hasExternal)	// table might have temporal instances 
-			{
-				sql = "SELECT " + fieldsIn + " ";
-				sql += inTheme->sqlGridFrom();
-				if (!inputInst.empty())
-					sql += " WHERE " + inputInst;
-			}
-			else				// table doesn�t have temporal instances 
-			{
-				sql = "SELECT " + fieldsIn + " FROM " +  tfrom;
-				sql += ", " + inTheme->collectionTable() + " WHERE ";
-				sql += tfrom + "." + tlinkqueattr + "=" + inTheme->collectionTable() + ".c_object_id";
-				if (!inputObj.empty())
-					sql += " AND " + inputObj;
-			}
+		if (!hasExternal)	// table might have temporal instances 
+		{
+			sql = "SELECT " + fieldsIn + " ";
+			sql += inTheme->sqlGridFrom();
+			if (!inputInst.empty())
+				sql += " WHERE " + inputInst;
+		}
+		else				// table doesn�t have temporal instances 
+		{
+			sql = "SELECT " + fieldsIn + " FROM " +  tfrom;
+			sql += ", " + inTheme->collectionTable() + " WHERE ";
+			sql += tfrom + "." + tlinkqueattr + "=" + inTheme->collectionTable() + ".c_object_id";
+			if (!inputObj.empty())
+				sql += " AND " + inputObj;
+		}
 
-			if (inLayer->database() == outLayer->database())
-			{
-				string popule = "INSERT INTO " + table.name() + " ( " + fieldsOut + ") " + sql;
-				inLayer->database()->execute(popule);
-			}
-			else
+		if (inLayer->database() == outLayer->database())
+		{
+			string popule = "INSERT INTO " + table.name() + " ( " + fieldsOut + ") " + sql;
+			inLayer->database()->execute(popule);
+		}
+		else
+		{
+			if (portal->query(sql))
 			{
-				if (portal->query(sql))
+				int nr = 0;
+				while (portal->fetchRow())
 				{
-					int nr = 0;
-					while (portal->fetchRow())
+					TeTableRow row;
+					for(int i = 0; i < portal->numFields(); i++)
+						row.push_back(portal->getData(i));
+					table.add(row);
+					nr++;
+					if (nr % 100)
 					{
-						TeTableRow row;
-						for(int i = 0; i < portal->numFields(); i++)
-							row.push_back(portal->getData(i));
-						table.add(row);
-						nr++;
-						if (nr % 100)
+						if (!outLayer->saveAttributeTable(table))
 						{
-							outLayer->saveAttributeTable(table);
-							table.clear();
-							nr = 0;
+							delete portal;							
+							return false;
 						}
+						table.clear();
+						nr = 0;
+					}
+				}
+				if (table.size() >0)
+				{
+					if (!outLayer->saveAttributeTable(table))
+					{
+						delete portal;							
+						return false;
 					}
-					if (table.size() >0)
-						outLayer->saveAttributeTable(table);
-					table.clear();
 				}
+				table.clear();
 			}
 		}
-	}	
+		portal->freeResult();
+	}
 	delete portal;
 	return true;
 }
 
-
 bool TeCopyLayerToLayer(TeLayer* inLayer, TeLayer* outLayer, map<string,string> *txtTable)
 {
 	if (!inLayer || !outLayer)
@@ -409,13 +461,16 @@ bool TeCopyLayerToLayer(TeLayer* inLayer, TeLayer* outLayer, map<string,string>
 	// do not allow only one NoProjection 
 	TeProjection* pfrom = TeProjectionFactory::make(inLayer->projection()->params());
 	TeProjection* pto   = TeProjectionFactory::make(outLayer->projection()->params());
-	if (!pfrom || !pto || (pfrom->name() == "NoProjection" ||  pto->name() == "NoProjection") && 
-		!(pfrom->name() == pto->name()))
+	if (!(*pfrom == *pto))
 	{
-		delete pfrom;
-		delete pto;
-		return false;
+		if (pfrom->name() == "NoProjection" || pto->name() == "NoProjection")
+		{
+			delete pfrom;
+			delete pto;
+			return false;
+		}
 	}
+
 	TeDatabasePortal* portal = inLayer->database()->getPortal();
 	if (!portal)
 	{
@@ -447,6 +502,22 @@ bool TeCopyLayerToLayer(TeLayer* inLayer, TeLayer* outLayer, map<string,string>
 		portal->freeResult();
 	}
 
+	if (inLayer->hasGeometry(TeRASTERFILE)) // TODO : check the case when the databases are in different DBMS
+	{
+		TeRepresentation* rep = inLayer->getRepresentation(TeRASTERFILE);
+		if (rep)
+		{
+			string inRepTableName = rep->tableName_;
+			rep->tableName_ = "RasterLayer" + Te2String(outLayer->id());
+			if (outLayer->database()->insertRepresentation(outLayer->id(),*rep))
+			{
+				sql = "INSERT INTO " + rep->tableName_ + " (object_id, raster_table, lut_table, res_x, res_y, num_bands, num_cols, num_rows, block_height, block_width, lower_x, lower_y, upper_x, upper_y, tiling_type) ";
+				sql += " SELECT object_id, raster_table, lut_table, res_x, res_y, num_bands, num_cols, num_rows, block_height, block_width, lower_x, lower_y, upper_x, upper_y, tiling_type FROM " + inRepTableName;
+				outLayer->database()->execute(sql);
+			}
+		}
+	}
+
 	unsigned int	n = 1;
 	if (inLayer->hasGeometry(TePOINTS))
 	{
@@ -485,7 +556,7 @@ bool TeCopyLayerToLayer(TeLayer* inLayer, TeLayer* outLayer, map<string,string>
 	{
 		sql = "SELECT " + inLayer->tableName(TePOLYGONS) + ".* FROM ";
 		sql += inLayer->tableName(TePOLYGONS);
-		if (inLayer->database()->dbmsName() != "OracleSpatial")
+		if (inLayer->database()->dbmsName() != "OracleSpatial" && inLayer->database()->dbmsName() != "PostGIS")
 			sql += " ORDER BY object_id ASC, parent_id ASC, num_holes DESC";
 		else
 			sql += " ORDER BY object_id ASC"; 
@@ -653,8 +724,380 @@ bool TeCopyLayerToLayer(TeLayer* inLayer, TeLayer* outLayer, map<string,string>
 					table.clear();
 				}
 			}
+			portal->freeResult();
 		}
 	}	
 	delete portal;
 	return true;
 }
+
+bool TeCopyExternThemeToLayer(TeTheme* inTheme, TeLayer* outLayer, 
+							int selObj, map<string,string>*)
+{
+	if (!inTheme || !outLayer)
+		return false;
+
+	TeLayer* inLayer = ((TeExternalTheme*)(inTheme))->getRemoteTheme()->layer();
+	// both projection should be valid
+	// do not allow only one NoProjection 
+	TeProjection* pfrom = TeProjectionFactory::make(inLayer->projection()->params());
+	TeProjection* pto = TeProjectionFactory::make(outLayer->projection()->params());
+
+	if (!(*pfrom == *pto))
+	{
+		if (pfrom->name() == "NoProjection" || pto->name() == "NoProjection")
+		{
+			delete pfrom;
+			delete pto;
+			return false;
+		}
+	}
+
+	TeDatabasePortal* inPortal = inLayer->database()->getPortal();
+	if (!inPortal)
+		return false;
+
+	string sql;
+	TeGeomRep rep = static_cast<TeGeomRep>(inLayer->geomRep());
+	if (rep & TeRASTER)
+	{
+		TeRepresentation* rep = inLayer->getRepresentation(TeRASTER);
+		sql = "SELECT object_id FROM " + rep->tableName_;
+		if (inPortal->query(sql))
+		{
+			string objid;
+			TeRasterParams par;
+			TeRaster* rst;
+			while (inPortal->fetchRow())
+			{
+				objid = inPortal->getData(0);
+				rst = inLayer->raster(objid);
+				par = rst->params();
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+				if (!TeImportRaster(outLayer,rst,par.blockWidth_,par.blockHeight_,par.compression_[0],
+									 objid,par.dummy_[0],par.useDummy_,par.tiling_type_))
+				{
+					delete pfrom;
+					delete pto;
+					delete inPortal;
+					return false;
+				}
+			}
+		}
+		// build the spatial index in the raster table
+		std::string spatialColumn = outLayer->database()->getSpatialIdxColumn(TeRASTER);
+		outLayer->database()->insertMetadata(outLayer->tableName(TeRASTER), spatialColumn, 0.0005,0.0005,outLayer->box());
+		outLayer->database()->createSpatialIndex(outLayer->tableName(TeRASTER), spatialColumn, (TeSpatialIndexType)TeRTREE);
+		inPortal->freeResult();
+	}
+
+	if (rep & TeRASTERFILE)
+	{
+		TeRepresentation* rep = inLayer->getRepresentation(TeRASTERFILE);
+		if (rep)
+		{
+			string inRepTableName = rep->tableName_;
+			rep->tableName_ = "RasterLayer" + Te2String(outLayer->id());
+			if (outLayer->database()->insertRepresentation(outLayer->id(),*rep))
+			{
+				sql = "INSERT INTO " + rep->tableName_ + " (object_id, raster_table, lut_table, res_x, res_y, num_bands, num_cols, num_rows, block_height, block_width, lower_x, lower_y, upper_x, upper_y, tiling_type) ";
+				sql += " SELECT object_id, raster_table, lut_table, res_x, res_y, num_bands, num_cols, num_rows, block_height, block_width, lower_x, lower_y, upper_x, upper_y, tiling_type FROM " + inRepTableName;
+				outLayer->database()->execute(sql);
+			}
+		}
+	}
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+	
+	// check if there is any other vectorial representation
+	if (!((rep & TePOLYGONS) || (rep & TeLINES) || 
+		  (rep & TePOINTS)   || (rep & TeCELLS) ||
+		  (rep & TeTEXT)))
+	{
+		delete pfrom;
+		delete pto;
+		delete inPortal;
+		return true;
+	}
+
+	// this SQL selects instances of objects according to input, so it uses te_collection_aux
+	string inputInst;
+	// this SQL selects objects according to input, so it uses te_collection
+	string inputObj; 
+	vector<string> objectVec;
+	vector<string> itemVec;
+	map<string, int>::iterator it;
+	string extCollTable = ((TeExternalTheme*)(inTheme))->getRemoteTheme()->collectionTable();
+	string not_string;
+
+	if(selObj == 0) // all collection
+	{
+		objectVec = getObjects(inTheme, TeAll);
+		itemVec = getItems(inTheme, TeAll);
+	}
+	else if(selObj == 1) // queried
+	{
+		objectVec = getObjects(inTheme, TeSelectedByQuery);
+		itemVec = getItems(inTheme, TeSelectedByQuery);
+	}
+	else if(selObj == 2) // pointed
+	{
+		objectVec = getObjects(inTheme, TeSelectedByPointing);
+		itemVec = getItems(inTheme, TeSelectedByPointing);
+	}
+	else if(selObj == 3) // not queried
+	{
+		objectVec = getObjects(inTheme, TeNotSelectedByQuery);
+		itemVec = getItems(inTheme, TeNotSelectedByQuery);
+	}
+	else if(selObj == 4) // not pointed
+	{
+		objectVec = getObjects(inTheme, TeNotSelectedByPointing);
+		itemVec = getItems(inTheme, TeNotSelectedByPointing);
+	}
+	else if(selObj == 5) // pointed and queried
+	{
+		objectVec = getObjects(inTheme, TeSelectedByPointingAndQuery);
+		itemVec = getItems(inTheme, TeSelectedByPointingAndQuery);
+	}
+	else if(selObj == 6) // pointed or queried
+	{
+		objectVec = getObjects(inTheme, TeSelectedByPointingOrQuery);
+		itemVec = getItems(inTheme, TeSelectedByPointingOrQuery);
+	}
+	if (objectVec.empty())
+	{
+		delete inPortal;
+		delete pfrom;
+		delete pto;
+		return true; // there is no object selected
+	}
+  
+  std::vector< std::string >::iterator it_begin = objectVec.begin();
+  std::vector< std::string >::iterator it_end = objectVec.end();
+
+	vector<string> svec = generateInClauses(it_begin, it_end, inLayer->database());
+	unsigned int n = 1;
+	vector<string>::iterator sit;
+	inPortal->freeResult();
+
+	if (inLayer->hasGeometry(TePOINTS))
+	{
+		sql = "SELECT " + inLayer->tableName(TePOINTS) + ".* FROM ";
+		sql += inLayer->tableName(TePOINTS);
+		for(sit=svec.begin(); sit!=svec.end(); ++sit)
+		{
+			string s = sql + " WHERE object_id " + not_string + " IN " + *sit;
+		
+			if (!inPortal->query(s))
+			{
+				delete inPortal;
+				delete pfrom;
+				delete pto;
+				return false;
+			}
+			if (inPortal->fetchRow())
+				TeCopyPortalGeometriesToLayer<TePointSet>(inPortal,pfrom,outLayer);
+			inPortal->freeResult(); 
+		}
+
+		std::string spatialColumn = outLayer->database()->getSpatialIdxColumn(TePOINTS);
+		outLayer->database()->insertMetadata(outLayer->tableName(TePOINTS), spatialColumn, 0.0005,0.0005,outLayer->box());
+		outLayer->database()->createSpatialIndex(outLayer->tableName(TePOINTS), spatialColumn, (TeSpatialIndexType)TeRTREE);
+	}
+	
+	if (inLayer->hasGeometry(TeLINES))
+	{
+		sql = "SELECT " + inLayer->tableName(TeLINES) + ".* FROM ";
+		sql += inLayer->tableName(TeLINES);
+		for(sit=svec.begin(); sit!=svec.end(); ++sit)
+		{
+			string s = sql + " WHERE object_id IN " + *sit;
+			s += " ORDER BY ext_max DESC";
+
+			if (!inPortal->query(s))
+			{
+				delete inPortal;
+				delete pfrom;
+				delete pto;
+				return false;
+			}
+			if (inPortal->fetchRow())
+				TeCopyPortalGeometriesToLayer<TeLineSet>(inPortal,pfrom,outLayer);
+			inPortal->freeResult(); 
+		}
+
+		std::string spatialColumn = outLayer->database()->getSpatialIdxColumn(TeLINES);
+		outLayer->database()->insertMetadata(outLayer->tableName(TeLINES), spatialColumn, 0.0005,0.0005,outLayer->box());
+		outLayer->database()->createSpatialIndex(outLayer->tableName(TeLINES), spatialColumn, (TeSpatialIndexType)TeRTREE);
+	}
+	if (inLayer->hasGeometry(TePOLYGONS))
+	{
+		sql = "SELECT " + inLayer->tableName(TePOLYGONS) + ".* FROM ";
+		sql += inLayer->tableName(TePOLYGONS);
+		for(sit=svec.begin(); sit!=svec.end(); ++sit)
+		{
+			string s = sql + " WHERE object_id IN " + *sit;
+			if (inLayer->database()->dbmsName() != "OracleSpatial" && inLayer->database()->dbmsName() != "PostGIS")
+				s += " ORDER BY object_id ASC, parent_id ASC, num_holes DESC";
+			else
+				s += " ORDER BY object_id ASC"; 
+
+			if (!inPortal->query(s))
+			{
+				delete inPortal;
+				delete pfrom;
+				delete pto;
+				return false;
+			}
+			if (inPortal->fetchRow())
+				TeCopyPortalGeometriesToLayer<TePolygonSet>(inPortal,pfrom,outLayer);
+			inPortal->freeResult(); 
+		}
+
+		std::string spatialColumn = outLayer->database()->getSpatialIdxColumn(TePOLYGONS);
+		outLayer->database()->insertMetadata(outLayer->tableName(TePOLYGONS), spatialColumn, 0.0005,0.0005,outLayer->box());
+		outLayer->database()->createSpatialIndex(outLayer->tableName(TePOLYGONS), spatialColumn, (TeSpatialIndexType)TeRTREE);
+	}
+
+	if (inLayer->hasGeometry(TeCELLS))
+	{
+		sql = "SELECT " + inLayer->tableName(TeCELLS) + ".* FROM ";
+		sql += inLayer->tableName(TeCELLS);
+		for(sit=svec.begin(); sit!=svec.end(); ++sit)
+		{
+			string s = sql + " WHERE object_id IN " + *sit;
+
+			if (!inPortal->query(s))
+			{
+				delete inPortal;
+				delete pfrom;
+				delete pto;
+				return false;
+			}
+			if (inPortal->fetchRow())
+				TeCopyPortalGeometriesToLayer<TeCellSet>(inPortal,pfrom,outLayer);
+			inPortal->freeResult(); 
+		}
+
+		std::string spatialColumn = outLayer->database()->getSpatialIdxColumn(TeCELLS);
+		outLayer->database()->insertMetadata(outLayer->tableName(TeCELLS), spatialColumn, 0.0005,0.0005,outLayer->box());
+		outLayer->database()->createSpatialIndex(outLayer->tableName(TeCELLS), spatialColumn, (TeSpatialIndexType)TeRTREE);
+	}
+
+	inPortal->freeResult();
+
+	TeAttrTableVector attributeTables;
+	((TeExternalTheme*)(inTheme))->getRemoteTheme()->getAttTables(attributeTables);
+	sql = "SELECT table_id FROM te_theme_table WHERE theme_id = ";
+	bool hasExternal = false;
+	sql += Te2String(((TeExternalTheme*)(inTheme))->getRemoteTheme()->id()) + " AND relation_id > 0";
+	if (inPortal->query(sql) && inPortal->fetchRow())
+		hasExternal = true;
+
+	for (unsigned int i=0; i<attributeTables.size(); i++)
+	{
+		TeTable table = attributeTables[i];
+		if ((table.tableType() == TeAttrExternal) || table.attributeList().size() <= 0)
+			continue;
+
+		TeAttributeList attListIn = table.attributeList();
+		table.setId(-1);
+		n = 1;
+		string tname = table.name();
+		string tlinkqueattr = table.linkName();
+		while (true)
+		{
+			if (!outLayer->database()->tableExist(tname))
+				break;
+			n++;
+			tname = table.name() + "_" + Te2String(n);
+		}
+		string tfrom = table.name();
+		table.name(tname);
+		if (!outLayer->createAttributeTable(table))
+		{
+			delete inPortal;
+			return false;
+		}
+		string fieldsIn;
+		string fieldsOut;
+		vector<string> attNamesIn;
+		vector<string> attNamesOut;
+		table.attributeNames(attNamesOut);
+		for (n=0;n<attNamesOut.size()-1; n++)
+		{
+			fieldsOut += attNamesOut[n] + ",";
+			fieldsIn += tfrom + "." + attListIn[n].rep_.name_ + ",";
+		}
+		fieldsOut += attNamesOut[n];
+		fieldsIn += tfrom + "." + attListIn[n].rep_.name_;
+
+		if (hasExternal)	// table might have temporal instances 
+		{
+      std::vector< std::string >::iterator it_begin = itemVec.begin();
+      std::vector< std::string >::iterator it_end = itemVec.end();    
+    
+			svec = generateInClauses(it_begin, it_end, inLayer->database(), false);
+
+			sql = "SELECT " + fieldsIn;
+			sql += ((TeExternalTheme*)(inTheme))->getRemoteTheme()->sqlGridFrom();
+			sql += " WHERE unique_id IN ";
+		}
+		else				// table doesn�t have temporal instances 
+		{
+			sql = "SELECT " + fieldsIn;
+			sql += ((TeExternalTheme*)(inTheme))->getRemoteTheme()->sqlFrom();
+			sql += " WHERE " + tlinkqueattr + " IN " ;
+		}
+
+		for(sit=svec.begin(); sit!=svec.end(); ++sit)
+		{
+			string s = sql + *sit;
+
+			inPortal->freeResult();
+			if (inPortal->query(s))
+			{
+				int nr = 0;
+				while (inPortal->fetchRow())
+				{
+					TeTableRow row;
+					for(int i = 0; i < inPortal->numFields(); i++)
+						row.push_back(inPortal->getData(i));
+					table.add(row);
+					nr++;
+					if (nr % 100)
+					{
+						if (!outLayer->saveAttributeTable(table))
+						{
+							delete inPortal;							
+							return false;
+						}
+						table.clear();
+						nr = 0;
+					}
+				}
+				if (table.size() >0)
+				{
+					if (!outLayer->saveAttributeTable(table))
+					{
+						delete inPortal;							
+						return false;
+					}
+				}
+				table.clear();
+			}
+		}
+		inPortal->freeResult();
+	}
+	delete inPortal;
+	return true;
+}
+
diff --git a/src/terralib/functions/TeLayerFunctions.h b/src/terralib/functions/TeLayerFunctions.h
old mode 100644
new mode 100755
index 5db328c..716bdfe
--- a/src/terralib/functions/TeLayerFunctions.h
+++ b/src/terralib/functions/TeLayerFunctions.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,9 +20,8 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeLayerFunctions.h
-    This file contains functions to deal with layers 
+    \brief This file contains functions to manipulate layers 
 */
 #ifndef  __TERRALIB_INTERNAL_LAYERFUNCTIONS_H
 #define  __TERRALIB_INTERNAL_LAYERFUNCTIONS_H
@@ -34,8 +33,7 @@ of this library and its documentation.
 #include "TeProgress.h"
 
 
-//! Imports a geometry set to a layer, creating an empty attribute table
-/*!
+/** Imports a geometry set to a layer, creating an empty attribute table
 	This function imports a geometry set to a layer.
 	An attribute table is automatically created with only the object_id field.
 	If geometries don�t have object ids a unique identification will be automatically generated
@@ -106,8 +104,7 @@ bool TeImportGeometriesToLayer(TeLayer* layer, G& geomSet)
 	return true;
 }
 
-//! Copy the geometries retrieved in a portal to layer
-/*
+/** Copy the geometries retrieved in a portal to layer
 	\param portal pointer to a portal that has executed a query for geometries
 	\param proj pointer to the projection associated to the geometries
 	\param layer pointer to the destination layer 
@@ -150,7 +147,10 @@ TeCopyPortalGeometriesToLayer(TeDatabasePortal* portal, TeProjection* proj, TeLa
 			set1.add(elemO);
 		}
 		else
+		{
 			set1.add(elemI);
+			set1[set1.size()-1].objectId(elemI.objectId()); 
+		}
 
 		if (((n%100) == 0) || !flag)
 		{	
@@ -174,8 +174,7 @@ TeCopyPortalGeometriesToLayer(TeDatabasePortal* portal, TeProjection* proj, TeLa
 	return 0;
 }
 
-//! This function fills a layer with the objects selected in a theme
-/*
+/** This function fills a layer with the objects selected in a theme
 	\param inTheme pointer to the source theme
 	\param outLayer pointer to the destination layer (already created)
 	\param selObj flag to indicate with objects of the theme should be copied.
@@ -185,8 +184,17 @@ TeCopyPortalGeometriesToLayer(TeDatabasePortal* portal, TeProjection* proj, TeLa
 bool TeCopyThemeToLayer(TeTheme* inTheme, TeLayer* outLayer, 
 							int selObj, map<string,string> *txtTable=0);
 
-//! This function copies a layer to another
-/*
+/** This function fills a layer with the objects selected in a theme
+	\param inTheme pointer to the source theme
+	\param outLayer pointer to the destination layer (already created)
+	\param selObj flag to indicate with objects of the theme should be copied.
+	\param txtTable pointer to a map<string,string> to return the old and
+	new names of the text tables
+*/
+bool TeCopyExternThemeToLayer(TeTheme* inTheme, TeLayer* outLayer, 
+							int selObj, map<string,string> *txtTable=0);
+
+/** This function copies a extern layer to another local
 	\param inLayer pointer to the source theme
 	\param outLayer pointer to the destination layer (already created)
 	\param txtTable pointer to a map<string,string> to return the old and
@@ -194,4 +202,7 @@ bool TeCopyThemeToLayer(TeTheme* inTheme, TeLayer* outLayer,
 */
 bool TeCopyLayerToLayer(TeLayer* inLayer, TeLayer* outLayer, map<string,string> *txtTable=0);
 
+/** \example copyLayer.cpp
+	Shows how to duplicate a layer changing its projection.
+ */
 #endif
diff --git a/src/terralib/functions/TeMIFProjection.cpp b/src/terralib/functions/TeMIFProjection.cpp
old mode 100644
new mode 100755
index 0175a7c..34a815b
--- a/src/terralib/functions/TeMIFProjection.cpp
+++ b/src/terralib/functions/TeMIFProjection.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -32,6 +32,7 @@ of this library and its documentation.
 #include "TeProjection.h"
 #include "TeException.h"
 #include "TeUtils.h"
+#include <cstdlib>
 
 using namespace std;
 /*--- 
diff --git a/src/terralib/functions/TeMIFProjection.h b/src/terralib/functions/TeMIFProjection.h
old mode 100644
new mode 100755
index d05764c..1bfad7d
--- a/src/terralib/functions/TeMIFProjection.h
+++ b/src/terralib/functions/TeMIFProjection.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,7 +20,9 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
+/*! \file TeMIFProjection.h
+    \brief This file contains the support to decode projection definitions in MID/MIF formats 
+*/
 #ifndef  __TERRALIB_INTERNAL_MIFPROJECTION_H
 #define  __TERRALIB_INTERNAL_MIFPROJECTION_H
 
diff --git a/src/terralib/functions/TeMemoryZonal.cpp b/src/terralib/functions/TeMemoryZonal.cpp
new file mode 100644
index 0000000..c5e02a4
--- /dev/null
+++ b/src/terralib/functions/TeMemoryZonal.cpp
@@ -0,0 +1,90 @@
+
+#include "TeMemoryZonal.h"
+#include "TeRasterIteratorSet.h"
+
+bool TeMemoryZonal(TeRaster* raster, TePolygon& poly, TeStatisticsDimensionVect& result)
+{
+  TeRaster::iteratorPoly itBegin = raster->begin(poly, TeBoxPixelIn);
+  TeRaster::iteratorPoly itEnd = raster->end(poly, TeBoxPixelIn);
+  if (itBegin == itEnd)  // try an approximation for the special case it is a special case
+  {
+    TeCoord2D pll = raster->coord2Index(TeCoord2D(poly.box().lowerLeft()));
+    TeCoord2D pur = raster->coord2Index(TeCoord2D(poly.box().upperRight()));
+
+    TeCoord2D ii(TeRoundRasterIndex(pll.x()),TeRoundRasterIndex(pll.y()));
+    TeCoord2D jj(TeRoundRasterIndex(pur.x()),TeRoundRasterIndex(pur.y()));
+
+    TeCoord2D ll = raster->index2Coord(pll);
+    TeCoord2D ur = raster->index2Coord(pur);
+
+    ll.x_-= raster->params().resx_/2.;
+    ll.y_-= raster->params().resy_/2.;
+    
+    ur.x_+= raster->params().resx_/2.;
+    ur.y_+= raster->params().resy_/2.;
+
+    TeBox bb(ll,ur);
+    TePolygon pol = polygonFromBox(bb);
+    itBegin = raster->begin(pol, TeBoxPixelIn);
+    itEnd = raster->end(pol, TeBoxPixelIn);
+    if (itBegin == itEnd)
+      return false;
+  }
+  if(!TeCalculateStatistics (itBegin, itEnd, result))
+    return false;
+
+  return true;
+}
+
+
+bool TePolygonSetMemoryZonal(TeRaster* raster, TePolygonSet& ps, TeStatisticsDimensionVect& result)
+{
+  RasterIteratorSet<TeRaster::iteratorPoly> iset;
+
+  // Inclui em iset pares de iteradores para cada poligono do conjunto
+  for(int i=0, size=ps.size(); i<size; i++)
+  {
+    TePolygon& poly = ps[i];
+    TeRaster::iteratorPoly itBegin = raster->begin(poly, TeBoxPixelIn);
+    TeRaster::iteratorPoly itEnd   = raster->end(poly, TeBoxPixelIn);
+    if(itBegin == itEnd)  // try an approximation for the special case it is a special case
+    {
+      TeCoord2D pll = raster->coord2Index(TeCoord2D(poly.box().lowerLeft()));
+      TeCoord2D pur = raster->coord2Index(TeCoord2D(poly.box().upperRight()));
+
+      TeCoord2D ii(TeRoundRasterIndex(pll.x()),TeRoundRasterIndex(pll.y()));
+      TeCoord2D jj(TeRoundRasterIndex(pur.x()),TeRoundRasterIndex(pur.y()));
+
+      TeCoord2D ll = raster->index2Coord(pll);
+      TeCoord2D ur = raster->index2Coord(pur);
+
+      ll.x_-= raster->params().resx_/2.;
+      ll.y_-= raster->params().resy_/2.;
+    
+      ur.x_+= raster->params().resx_/2.;
+      ur.y_+= raster->params().resy_/2.;
+
+      TeBox bb(ll,ur);
+      TePolygon pol = polygonFromBox(bb);
+      itBegin = raster->begin(pol, TeBoxPixelIn);
+      itEnd = raster->end(pol, TeBoxPixelIn);
+      if(itBegin == itEnd)
+        continue;
+    }
+    iset.addIterator(itBegin, itEnd);
+  }
+  
+  // Calcula estt�sticas passando iterador que percorre todos os poligonos 
+  // recebidos.  
+  // Obs: typedef abaixo necess�rio para o gcc se entender com os tipos
+  typedef RasterIteratorSet<TeRaster::iteratorPoly>::iterator setIterator;
+  setIterator begin = iset.begin(); 
+  setIterator end   = iset.end(); 
+  if(!TeCalculateStatistics (begin, end, result))
+    return false;
+
+  return true;
+}                     
+
+
+
diff --git a/src/terralib/functions/TeMemoryZonal.h b/src/terralib/functions/TeMemoryZonal.h
new file mode 100644
index 0000000..edf52d9
--- /dev/null
+++ b/src/terralib/functions/TeMemoryZonal.h
@@ -0,0 +1,49 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeMemoryZonal.h
+    \brief This file contains functions for calculate statistics  
+*/
+
+#ifndef _MEMORY_ZONAL_H_
+#define _MEMORY_ZONAL_H_
+
+#include <TeRaster.h>
+#include <TeStatistics.h>
+
+/*! Returns the statistics about raster overed by polygon
+
+\param raster  Raster loaded to memory
+\param ps	   Polygon to define the statistic area 
+\param result  Statistic struct to return
+*/
+bool TeMemoryZonal(TeRaster* raster, TePolygon& poly, TeStatisticsDimensionVect& result);
+
+
+/*! Returns the statistics about raster overed by a polygon list
+\param raster Raster loaded to memory
+\param ps     Polygon list to define the statistic area
+\param result Statistic struct to return
+*/
+bool TePolygonSetMemoryZonal(TeRaster* raster, TePolygonSet& ps, TeStatisticsDimensionVect& result);
+                     
+#endif                     
diff --git a/src/terralib/functions/TeRasterIteratorSet.h b/src/terralib/functions/TeRasterIteratorSet.h
new file mode 100644
index 0000000..230b69e
--- /dev/null
+++ b/src/terralib/functions/TeRasterIteratorSet.h
@@ -0,0 +1,106 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeRasterIteratorSet.h
+*/
+
+#ifndef _RASTER_ITERATOR_SET_H_
+#define _RASTER_ITERATOR_SET_H_
+
+#include <vector>
+
+/*! Classe respons�vel por gerar um iterador que percorre em sequ�ncia
+    todos os pontos retornados por um conjunto de iteradores raster.
+
+Implementada para ser utilizada apenas com tipos descendentes de 
+TeRaster::iterator.
+
+Para utiliz�-la, use a fun��o addIterator para incluir no conjunto 
+iteradores para os pol�gonos a serem percorridos. Utilize as fun��es
+begin() e end() para obter um novo conjunto de iteradores que percorre
+os pontos dos poligonos, na ordem em que eles foram inseridos no conjunto.
+
+N�o faz nenhuma verifica��o de sobreposi��o entre os pontos retornados
+pelos iteradores de cada pol�gono.  Se houver, o novo iterador ir�
+passar mais de uma vez por cada ponto.
+*/    
+template <class It> 
+class RasterIteratorSet
+{
+public:
+
+  class iterator : public It
+	{
+	  public:
+	  
+	    iterator()
+	      : _set(NULL), _currIndex(0) {}
+	  
+	    iterator(RasterIteratorSet<It>* set, unsigned index, It current)
+	      : It(current), _set(set), _currIndex(index) {}
+
+			iterator& operator++()
+			{
+			  if(It::operator++() == _set->_endSet.at(_currIndex) && 
+			     _currIndex < (_set->_endSet.size()-1))
+			  {   
+			    _currIndex++;
+			    // Altera estado para aquele do novo iterador
+    			It* ptr = (It*)this;
+		  	  *ptr = _set->_beginSet.at(_currIndex);
+			  }  
+			  return *this;
+			}
+
+			bool operator==(const iterator& rhs) const
+			{
+			  return (It::operator==(rhs) && _set == rhs._set && _currIndex == rhs._currIndex);
+			}
+
+			bool operator!=(const iterator& rhs) const
+			{
+			  return (It::operator!=(rhs) || _set != rhs._set || _currIndex != rhs._currIndex);
+			}
+	  
+	  private:
+	    RasterIteratorSet<It>* _set;
+	    unsigned               _currIndex;
+	};
+		
+	RasterIteratorSet() {}
+			
+	void addIterator(It begin, It end)
+	{
+	  _beginSet.push_back(begin);
+	  _endSet.push_back(end);
+	}
+
+	iterator begin() { return _beginSet.size() ? iterator(this, 0, _beginSet.at(0)) : iterator(); }
+	iterator end()	 { int i = _endSet.size()-1; return i >= 0 ? iterator(this, i, _endSet.at(i)) : iterator(); }
+
+private:
+  std::vector<It> _beginSet;
+  std::vector<It> _endSet;	
+};			
+
+#endif
+
diff --git a/src/terralib/functions/TeSPRFile.cpp b/src/terralib/functions/TeSPRFile.cpp
old mode 100644
new mode 100755
index 266ad67..2913f3d
--- a/src/terralib/functions/TeSPRFile.cpp
+++ b/src/terralib/functions/TeSPRFile.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -32,12 +32,14 @@ of this library and its documentation.
 #include "TeDatum.h"
 #include "TeUtils.h"
 #include "TeDataTypes.h"
+
+#include <cstdlib>
   
 TeSPRFile::TeSPRFile ( const string& name, const char* mode, char separator): 	
-	TeAsciiFile ( name, mode  ) 
-{
-	separator_ = separator;
-}  
+	TeAsciiFile ( name, mode  ),
+	separator_(separator)
+{}
+
 
 void
 TeSPRFile::writeLabelHeader ( const int& option )	 
@@ -64,7 +66,7 @@ TeSPRFile::writeCadastralLabel ( const string& geoid, const double& x, const dou
 {
 	if (geoid != "")
 	{
-		fprintf ( file_, "%.10E %c %.10E %c %s %c %s %c %s \n", 
+		fprintf ( file_, "%.6f %c %.6f %c %s %c %s %c %s \n", 
 		(float)x, separator_, (float)y, separator_, geoid.c_str(), separator_, geoid.c_str(), separator_, objectCategory.c_str() );  
 	}
 }
@@ -73,18 +75,22 @@ void
 TeSPRFile::writeThematicLabel( const double& x, const double& y, const string& theme )
 {
 	if ( theme != "")
-		fprintf ( file_, "%.10E %c %.10E %c %s \n", 
+		fprintf ( file_, "%.6f %c %.6f %c %s \n", 
 		(float)x, separator_, (float)y, separator_, theme.c_str() );  
 }
 
 void  
 TeSPRFile::writeNetworkLabel ( const string& geoid, const double& x, const double& y,
-					   const string& objectCategory) 
+					   const string& objectCategory, bool isL) 
 {
 	if (geoid != "")
 	{
-		fprintf ( file_, "%.10E %c %.10E %c %s %c %s %c %s %c LINES\n", 
-		(float)x, separator_, (float)y, separator_, geoid.c_str(), separator_, geoid.c_str(), separator_, objectCategory.c_str(), separator_ );  
+		if (isL)
+			fprintf ( file_, "%.6f %c %.6f %c %s %c %s %c %s %c LINES\n", 
+			(float)x, separator_, (float)y, separator_, geoid.c_str(), separator_, geoid.c_str(), separator_, objectCategory.c_str(), separator_ );  
+		else
+			fprintf ( file_, "%.6f %c %.6f %c %s %c %s %c %s %c NODES\n", 
+			(float)x, separator_, (float)y, separator_, geoid.c_str(), separator_, geoid.c_str(), separator_, objectCategory.c_str(), separator_ );  
 	}
 
 }
@@ -94,10 +100,10 @@ void
 TeSPRFile::writeThematicPoint( const double& x, const double& y, const string& theme )
 {
 	if ( theme != "")
-		fprintf ( file_, "%.10E %c %.10E %c %s \n", 
+		fprintf ( file_, "%.6f %c %.6f %c %s \n", 
 		(float)x, separator_, (float)y, separator_, theme.c_str() );  
 	else
-		fprintf ( file_, "%.10E %c %.10E %c Nenhuma \n", 
+		fprintf ( file_, "%.6f %c %.6f %c Nenhuma \n", 
 		(float)x, separator_, (float)y, separator_ );  
 
 }
@@ -118,7 +124,7 @@ TeSPRFile::writeBox( TeBox& box )
 	TeCoord2D pt1 = box.lowerLeft();
 	TeCoord2D pt2 = box.upperRight();
 
-	fprintf ( file_, "%s %.10E %.10E %.10E %.10E \n", "BOX", pt1.x(), pt1.y(), pt2.x(),  pt2.y());
+	fprintf ( file_, "%s %.6f %.6f %.6f %.6f \n", "BOX", pt1.x(), pt1.y(), pt2.x(),  pt2.y());
 	fprintf ( file_, "%s\n", "// " );
 }
   
@@ -164,23 +170,18 @@ TeSPRFile::writeTableHeader (const int& /* dType */)
 {
 	fprintf(file_,"%s\n", "TABLE" );
 	fprintf(file_,"%s\n", "INFO");
-	fprintf(file_,"%s\n", "// SPRING Interchange File" );
 	fprintf(file_,"%s %c\n", "SEPARATOR ", separator_ );
-	fprintf(file_,"%s\n", "UNFORMATED ");
-	
+	fprintf(file_,"%s\n", "UNFORMATED ");	
  } 
  
 void 
 TeSPRFile::writeAttributeInfo( TeAttributeList& attList, const string& objCategory,
 							   const string& indexName ) 
 {
- 	fprintf(file_,"%s\n", "// Attribute Information" );  	// Write basic attribute info  	
 	fprintf (file_, "%s %s \n", "CATEGORY_OBJ", objCategory.c_str() ); 	
 	fprintf (file_, "%s%c%s%c%s%c%s \n", "T_KEY", separator_, "TEXT", separator_, "32", separator_, "0"); 	
-	fprintf (file_, "%s%c%s%c%s%c%s \n", "T_NAME", separator_, "TEXT", separator_, "32", separator_, "0");
 
 	TeAttributeList::iterator it = attList.begin();
-
 	for ( ;it != attList.end();++it )
 	{
 		string name = (*it).rep_.name_;
@@ -280,7 +281,7 @@ TeSPRFile::writeSample( const string& /* geoid */, const double& x,
  						  const double& y, const string& value) 
 {
 	fprintf ( file_, "%s \n", "POINT3D" );
-	fprintf ( file_, "%.10E %c %.10E %c %s \n", x, separator_, y, separator_, value.c_str() ); 
+	fprintf ( file_, "%.6f %c %.6f %c %s \n", x, separator_, y, separator_, value.c_str() ); 
 	fprintf ( file_, "%s \n", "END" );
 }
 
@@ -304,7 +305,7 @@ void
 TeSPRFile::writeArcHeader ( const string& geoid, const double& posImp, 
 		const double& negImp, const double& demand)
 {
-	fprintf ( file_, "%s %.10E %.10E %.10E \n", geoid.c_str(), posImp, negImp, demand ); 
+	fprintf ( file_, "%s %.6f %.6f %.6f \n", geoid.c_str(), posImp, negImp, demand ); 
 }
 
 
diff --git a/src/terralib/functions/TeSPRFile.h b/src/terralib/functions/TeSPRFile.h
old mode 100644
new mode 100755
index 67dadc6..58d4103
--- a/src/terralib/functions/TeSPRFile.h
+++ b/src/terralib/functions/TeSPRFile.h
@@ -1,6 +1,6 @@
 /************************************************************************************
  TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,7 +20,9 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
+/*! \file TeSPRFile.h
+    \brief This file contains the support to manipulate geographical data in ASCII SPRING format
+*/
 #ifndef  __TERRALIB_INTERNAL_SPRFILE_H
 #define  __TERRALIB_INTERNAL_SPRFILE_H
 
@@ -55,8 +57,8 @@ public:
 	{ fprintf ( file_,"LINE3D\n"); }
 
 	//! LINES - write Coord
-	void writeCoord ( const double& x, const double& y )
-	{ fprintf ( file_," %.10E %.10E\n", x, y ); }
+	void writeCoord ( const double& x, const double& y)
+{ 	fprintf ( file_," %.6f %.6f\n", x, y ); }
 
 	//! LABELS - write Header
 	void writeLabelHeader ( const int& option );
@@ -67,7 +69,7 @@ public:
 
 	//! NETWORK - write labels
 	void writeNetworkLabel ( const string& geoid, const double& x, const double& y,
-					   const string& objectCategory); 
+					   const string& objectCategory, bool isL=true); 
 
 	//! LABELS - write Theme
 	void writeThematicLabel( const double& x, const double& y, const string& theme );
@@ -84,7 +86,7 @@ public:
 
 	//! POINTS 3D - write Value
 	void writePoint3D( const double& x, const double& y, const double& quote )
-	{ fprintf ( file_," %.10E %.10E %.10E\n", x, y, quote ); }
+	{ fprintf ( file_," %.6f %.6f %.10E\n", x, y, quote ); }
 
 	//! POINTS - write Value
 	void writePoint ( TeCoord2D& p )
@@ -178,7 +180,6 @@ private:
 	TeSPRFile(const TeSPRFile&);
 	TeSPRFile& operator=(const TeSPRFile&){return *this;}
 	char	separator_;
-
 };
 
 #endif
diff --git a/src/terralib/functions/TeSTEFunctionsSHP.cpp b/src/terralib/functions/TeSTEFunctionsSHP.cpp
deleted file mode 100644
index eb0a880..0000000
--- a/src/terralib/functions/TeSTEFunctionsSHP.cpp
+++ /dev/null
@@ -1,214 +0,0 @@
-#include "TeSTEFunctionsSHP.h"
-#include "TeSTElementSet.h"
-#include <vector>
-
-#include "shapefil.h"
-
-bool TeDecodeShape(SHPObject* psShape, TePointSet& ps,const string& objectId);
-bool TeDecodeShape(SHPObject* psShape, TeLineSet& ps,const string& objectId);
-bool TeDecodeShape(SHPObject* psShape, TePolygonSet& ps,const string& objectId);
-
-bool TeDecodeShape(SHPObject* psShape, TeMultiGeometry& geomestries, const string& objectId)
-{
-	int shpType = psShape->nSHPType;
-	switch (shpType)
-	{
-		case SHPT_POLYGON:
-		case SHPT_POLYGONZ:
-			return TeDecodeShape(psShape,geomestries.polygons_,objectId);
-		case SHPT_ARC:
-		case SHPT_ARCZ:
-			return TeDecodeShape(psShape,geomestries.lines_,objectId);
-		case SHPT_POINT:
-		case SHPT_POINTZ:
-		case SHPT_MULTIPOINT:
-		case SHPT_MULTIPOINTZ:
-			return TeDecodeShape(psShape,geomestries.points_,objectId);
-	}
-	return false;
-}
-
-bool TeReadDBFAttributeList(const string& dbfFileName, TeAttributeList& attList);
-
-bool
-TeSTOSetBuildSHP(TeSTElementSet& stoset, const string& fileName)
-{
-	// Read some information about the shapefile
-	string filePrefix = TeGetName(fileName.c_str());
-	string shpfileName = filePrefix + ".shp";
-
-	SHPHandle	hSHP;
-	hSHP = SHPOpen( shpfileName.c_str(), "rb" );
-
-	if( hSHP == 0 )
-		return false;
-
-	int		nShapeType, nEntities;
-	double 	adfMinBound[4], adfMaxBound[4];
-
-	SHPGetInfo(hSHP, &nEntities, &nShapeType, adfMinBound, adfMaxBound);
-
-	string dbffileName = filePrefix + ".dbf";
-    DBFHandle hDBF = DBFOpen( dbffileName.c_str(), "rb" );
-    if( hDBF == 0  || DBFGetFieldCount(hDBF) == 0)
-		return false;
-    
-	int natt = DBFGetFieldCount(hDBF);
-	TeAttributeList attList;
-	TeReadDBFAttributeList(shpfileName, attList);
-
-	TeAttributeRep repobjid;
-	repobjid.name_ = "object_id";
-	repobjid.numChar_ = 16;
-
-	TeAttribute attobjid;
-	attobjid.rep_ = repobjid;
-
-	TeProperty propobjid;
-	propobjid.attr_ = attobjid;
-	
-	int i,n;
-	SHPObject* psShape;
-	for (i=0; i<nEntities; i++)
-	{
-		string objectid = Te2String(i);
-		TeSTInstance curObj;
-		curObj.objectId(objectid);
-		TeSTElement objInstances;
-		objInstances.objectId(objectid);
-
-		TePropertyVector prop;
-		psShape = SHPReadObject(hSHP,i);
-		if (TeDecodeShape(psShape,curObj.geometries(),objectid))
-		{
-			propobjid.value_ = objectid;
-			prop.push_back(propobjid);
-			for(n=0;n<natt;n++)
-			{
-				string value = DBFReadStringAttribute(hDBF,i,n);
-				TeProperty p;
-				p.attr_ = attList[n];
-				p.value_ = value;
-				prop.push_back(p);
-			}
-			curObj.properties(prop);
-			objInstances.insertSTInstance(curObj);
-			stoset.insertSTElement(objInstances);
-			curObj.theme(0);
-		}
-		SHPDestroyObject(psShape);
-	}
-	return true;
-} 
-
-bool TeDecodeShape(SHPObject* psShape, TePointSet& points,const string& objectId)
-{
-	int i;
-	for (i = 0; i < ( psShape->nVertices ); i++ )
-	{
-		TePoint point;
-		TeCoord2D xy ( psShape->padfX[i], psShape->padfY[i] );
-		point.add ( xy );
-		point.objectId(objectId);
-		points.add ( point );
-	}
-	return (i > 0);
-}
-
-bool TeDecodeShape(SHPObject* psShape, TeLineSet& lines, const string& objectId)
-{
-	vector<int> partStart;
-	int iPart;
-	for (iPart = 0; iPart < psShape->nParts; iPart++ )
-		partStart.push_back ( psShape->panPartStart[iPart] );
-	partStart.push_back ( psShape->nVertices ); // point to the end
-
-	iPart = 0;
-	int j = 0; 
-	while ( j < psShape->nVertices )
-	{
-		TeLine2D line;
-
-		iPart++;  // indicates the different segments of the line
-		while ( j < partStart[iPart] )	// Read each segment
-		{
-			TeCoord2D pt ( psShape->padfX[j], psShape->padfY[j] );
-			line.add ( pt );
-			j++;
-		}
-		line.objectId(objectId);
-		lines.add(line);
-	}
-	return (iPart > 0);
-
-}
-
-bool TeDecodeShape(SHPObject* psShape, TePolygonSet& polys, const string& objectId)
-{
-	int iPart, j;
-	vector<int> partStart;
-	list<TePolygon> pList;
-
-	// Build an array whose components point to the starting point
-	// of the rings that compose the shapepoly
-	for ( iPart = 0; iPart < psShape->nParts; iPart++ )
-		partStart.push_back ( psShape->panPartStart[iPart] );
-	partStart.push_back ( psShape->nVertices ); // point to the end
-
-	iPart = 0;
-	j = 0;
-	while ( j < psShape->nVertices )
-	{
-		iPart++;						// indicates the different rings of the shapepoly
-		TeLine2D line;
-		while ( j < partStart[iPart] )	// Read each ring
-		{
-			TeCoord2D pt ( psShape->padfX[j], psShape->padfY[j] );
-			line.add ( pt );
-			j++;
-		}	// end of a ring
-		if (!line.isRing())
-			line.add(line[0]);
-
-		TeLinearRing ring(line);
-		bool inside = false;		// Is it an OUTER or an INNER RING ?
-
-		list<TePolygon>::iterator it = pList.begin();
-		// Each ring is assigned to a polygon
-		// Each ring and polygon have a unique "geometrical index"
-		//
-		// All rings and polygons that are part of a same object
-		// have the same "object index"
-
-		while ( it != pList.end() )
-		{
-			TePolygon aux;
-			aux.add(ring);
-			if (TeWithin(aux,(*it)))
-			{
-				inside = true;
-				ring.objectId ( (*it)[0].objectId() );	// sets the object index
-				(*it).add ( ring );						// add a closed region
-				break;
-			}
-			++it;
-		}
-		if (!inside)
-		{
-			TePolygon poly;
-			ring.objectId (objectId);
-			poly.add(ring);						// add an outer region
-			poly.objectId(objectId);			// set the object index
-
-			pList.push_back ( poly );
-		}
-	}
-	list<TePolygon>::iterator it = pList.begin();
-	while ( it != pList.end() )
-	{
-		polys.add(*it);
-		++it;
-	}
-	return (iPart > 0);
-}
-
diff --git a/src/terralib/functions/TeSTEFunctionsSHP.h b/src/terralib/functions/TeSTEFunctionsSHP.h
deleted file mode 100644
index 4f20954..0000000
--- a/src/terralib/functions/TeSTEFunctionsSHP.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/************************************************************************************
-TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The library provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use
-of this library and its documentation.
-*************************************************************************************/
-
-#ifndef TeSpaceTimeObjectBuilderSHP_H
-#define TeSpaceTimeObjectBuilderSHP_H
-
-#include <string>
-
-class TeSTElementSet; 
-
-using namespace std;
-
-//! Builds the spatial object set from database according to the restrictions previously defined
-/*! 
-	\param stoset the STOSet that will be filled 
-	\param fileName shape file name
-*/
-bool TeSTOSetBuildSHP(TeSTElementSet& stoset, const string& fileName);
-
-#endif
-
diff --git a/src/terralib/functions/TeSimilarity.cpp b/src/terralib/functions/TeSimilarity.cpp
old mode 100644
new mode 100755
index f26354a..17ffa7c
--- a/src/terralib/functions/TeSimilarity.cpp
+++ b/src/terralib/functions/TeSimilarity.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
diff --git a/src/terralib/functions/TeThemeFunctions.cpp b/src/terralib/functions/TeThemeFunctions.cpp
old mode 100644
new mode 100755
index a35775d..07a00f2
--- a/src/terralib/functions/TeThemeFunctions.cpp
+++ b/src/terralib/functions/TeThemeFunctions.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -53,31 +53,22 @@ bool TeCreateThemeFromTheme(TeTheme* inTheme, const string& newThemeName, int se
 	newTheme->visibleRep(inTheme->visibleRep());
 
 	// save its definition in the database
+	// creates collection and collection_aux table
 	if (!newTheme->save())
 	{
 		delete newTheme;
 		newTheme = 0;
 	}
 
-	// this is a patch around TeTheme::save(). Auxiliary collection table is created
-	// with field "unique_id" of type auto-number. It has to be string.
-	TeAttribute at;
-	at.rep_.name_ = "unique_id";
-	at.rep_.type_ = TeSTRING;
-	at.rep_.numChar_ = 100;
-	at.rep_.isAutoNumber_ = false;
-	at.rep_.isPrimaryKey_ = true;
-	if (!curDb->alterTable(newTheme->collectionAuxTable(), at.rep_))
+	// if its a theme of raster data there's nothing else to be done
+	if (inTheme->layer()->hasGeometry(TeRASTER) || inTheme->layer()->hasGeometry(TeRASTERFILE))
 	{
-		curDb->deleteTheme(newTheme->id());
-		delete newTheme;
-		return 0;
+		TeBox tbox = curDb->getThemeBox(newTheme);
+		newTheme->setThemeBox(tbox);
+		curDb->updateTheme(newTheme);
+		return true;
 	}
 
-	// if its a theme of raster data there's nothing else to be done
-	if (inTheme->layer()->hasGeometry(TeRASTER))
-		return false;
-
 	// this SQL selects instances of objects according to input, so it uses te_collection_aux
 	string inputInst;
 
@@ -129,7 +120,10 @@ bool TeCreateThemeFromTheme(TeTheme* inTheme, const string& newThemeName, int se
 	// fills collection table from the selection requested
 	string sql = "INSERT INTO " + newTheme->collectionTable() + " ( ";
 	sql += " c_object_id, c_legend_id, label_x, label_y, c_legend_own, c_object_status ) ";
-	sql += " SELECT * FROM " + inTheme->collectionTable() + " WHERE " + inputObj;
+	sql += " SELECT * FROM " + inTheme->collectionTable();
+	
+	if(inputObj.empty() == false)
+		sql += " WHERE " + inputObj;
 	if (!curDb->execute(sql))
 	{
 		curDb->deleteTheme(newTheme->id());
@@ -149,21 +143,17 @@ bool TeCreateThemeFromTheme(TeTheme* inTheme, const string& newThemeName, int se
 		return false;
 	}
 
-	// fills auxiliary collection table from the selection requested
-	sql = "INSERT INTO " + newTheme->collectionAuxTable() + " ( ";
-	sql += " object_id, unique_id, grid_status ) ";
-	sql += " SELECT * FROM " + inTheme->collectionAuxTable() + " WHERE " + inputInst;
-	if (!curDb->execute(sql))
-	{
-		curDb->deleteTheme(newTheme->id());
-		return false;
-	}
-	sql = "UPDATE " + newTheme->collectionAuxTable() + " SET grid_status = 0";
-	if (!curDb->execute(sql))
+	//fills collectin aux
+	if(!newTheme->populateCollectionAux())
 	{
 		curDb->deleteTheme(newTheme->id());
 		return false;
 	}
+
+	TeBox tbox = curDb->getThemeBox(newTheme);
+	newTheme->setThemeBox(tbox);
+	curDb->updateTheme(newTheme);
+
 	return true;
 }
 
diff --git a/src/terralib/functions/TeThemeFunctions.h b/src/terralib/functions/TeThemeFunctions.h
old mode 100644
new mode 100755
diff --git a/src/terralib/image_processing/TePDIAlgorithm.cpp b/src/terralib/image_processing/TePDIAlgorithm.cpp
new file mode 100755
index 0000000..1ac8d69
--- /dev/null
+++ b/src/terralib/image_processing/TePDIAlgorithm.cpp
@@ -0,0 +1,143 @@
+#include "TePDIAlgorithm.hpp"
+
+#include <TeAgnostic.h>
+
+TePDIAlgorithm::TePDIAlgorithm()
+{
+  progress_enabled_ = true;
+}
+
+
+TePDIAlgorithm::~TePDIAlgorithm()
+{
+}
+
+
+bool TePDIAlgorithm::Reset( const TePDIParameters& params )
+{
+  if( CheckParameters( params ) ) {
+    ResetState( params );
+
+    /* This line must come after the ResetState line, because some algorithms
+       checks the difference between the current internal parameters and the
+       new supplied parameters */
+    params_.Clear();
+    params_ = params;
+
+    return true;
+  } else {
+    TEAGN_LOG_AND_RETURN( "Invalid supplied parameters" );
+  }
+}
+
+
+bool TePDIAlgorithm::Apply()
+{
+  bool return_value = false;
+  
+  if( CheckInternalParameters() ) {
+    #ifdef NDEBUG
+      try
+      {
+        return_value = RunImplementation();
+      }
+      catch( const TeException& exc )
+      {
+        TEAGN_LOGERR( "Exception raised from algorithm - " +
+          exc.message() );
+      }
+      catch(...)
+      {
+        TEAGN_LOGERR( "Unhandled exception raised from algorithm" );
+      }
+    #else
+      return_value = RunImplementation();
+    #endif
+    
+    StopProgInt();
+  } else {
+    TEAGN_LOG_AND_RETURN( "Invalid supplied parameters" );
+  }
+  
+  return return_value;
+}
+
+
+bool TePDIAlgorithm::Apply( const TePDIParameters& params )
+{
+  if( Reset( params ) )
+  {
+    return Apply();
+  }
+  
+  return false;
+}
+
+
+const TePDIParameters& TePDIAlgorithm::GetParameters() const
+{
+  return params_;
+}
+
+
+bool TePDIAlgorithm::CheckInternalParameters() const
+{
+  return CheckParameters( params_ );
+}
+
+
+const TePDIAlgorithm& TePDIAlgorithm::operator=( 
+  const TePDIAlgorithm& external )
+{
+  TEAGN_LOG_AND_THROW( "Algorithms cannot be copied" );  
+  
+  return external;
+}
+
+TePDIAlgorithm* TePDIAlgorithm::DefaultObject( const TePDIParameters& params )
+{
+  TEAGN_LOG_AND_THROW( "Trying to create an invalid algorithm instance" );
+  
+  TePDIParameters dummy_params = params;
+
+  return 0;
+}
+
+
+void TePDIAlgorithm::ToggleProgInt( bool enabled )
+{
+  progress_enabled_ = enabled;
+  
+  if( ! enabled ) {
+    pi_manager_.Toggle( false );
+  }
+}
+
+
+void TePDIAlgorithm::StartProgInt( const std::string& message, 
+  unsigned int steps )
+{
+  if( progress_enabled_ ) {
+    pi_manager_.Reset( message, steps );
+    pi_manager_.Toggle( true );
+  }
+}
+
+
+bool TePDIAlgorithm::UpdateProgInt( unsigned int step )
+{
+  return pi_manager_.Update( step );
+}
+
+
+bool TePDIAlgorithm::IncProgInt()
+{
+  return pi_manager_.Increment();
+}
+
+
+void TePDIAlgorithm::StopProgInt()
+{
+  pi_manager_.Toggle( false );
+}
+
diff --git a/src/terralib/image_processing/TePDIAlgorithm.hpp b/src/terralib/image_processing/TePDIAlgorithm.hpp
new file mode 100755
index 0000000..968135c
--- /dev/null
+++ b/src/terralib/image_processing/TePDIAlgorithm.hpp
@@ -0,0 +1,216 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIALGORITHM_HPP
+  #define TEPDIALGORITHM_HPP
+
+  #include "TePDIParameters.hpp"
+  #include "TePDIPIManager.hpp"
+  #include "TePDIDefines.hpp"
+  
+  #include <TeSharedPtr.h>
+  #include <TeProgress.h>
+
+/**
+ * @brief This is the base class for digital image processing
+ * algorithms.
+ * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+ * @ingroup TePDIGeneralAlgoGroup
+ */
+  class PDI_DLL TePDIAlgorithm
+  {
+    public :
+      /** @typedef TeSharedPtr< TePDIAlgorithm > pointer
+       * Type definition for an algorithm instance pointer. 
+       */
+      typedef TeSharedPtr< TePDIAlgorithm > pointer;
+      
+      /** @typedef const TeSharedPtr< TePDIAlgorithm > const_pointer
+       * Type definition for a const algorithm instance pointer. 
+       */
+      typedef const TeSharedPtr< TePDIAlgorithm > const_pointer;
+      
+      /**
+       * @brief Default Destructor
+       */
+      virtual ~TePDIAlgorithm();
+
+      /**
+       * @brief Applies the algorithm following the current state and
+       * internal stored parameters.
+       *
+       * @return true if OK. false on error.
+       */
+      bool Apply();
+      
+      /**
+       * @brief Applies the algorithm following the state defined by
+       * the supplied parameters.
+       * @param params The new supplied parameters.
+       * @return true if OK. false on error.
+       */
+      bool Apply( const TePDIParameters& params );      
+
+      /**
+       * @brief Reset the internal state with new supplied parameters.
+       *
+       * @param params The new supplied parameters.
+       * @return true if parameters OK, false on error.
+       */
+      bool Reset( const TePDIParameters& params );
+
+      /**
+       * @brief Checks if the supplied parameters fits the requirements of each
+       * PDI algorithm implementation.
+       *
+       * @note Error log messages must be generated. No exceptions generated.
+       *
+       * @param parameters The parameters to be checked.
+       * @return true if the parameters are OK. false if not.
+       */
+      virtual bool CheckParameters( 
+        const TePDIParameters& parameters ) const = 0;
+
+      /**
+       * @brief Returns a reference to the current internal parameters.
+       *
+       * @return A reference to the current internal parameters.
+       */
+      const TePDIParameters& GetParameters() const;
+      
+      /**
+       * @brief Returns a default object.
+       *
+       * @return A default object.
+       */
+      static TePDIAlgorithm* DefaultObject( const TePDIParameters& params );
+      
+      /**
+       * @brief Enable / Disable the progress interface.
+       *
+       * @param enabled Flag to enable ( true ) or disable ( false ).
+       */
+      void ToggleProgInt( bool enabled );        
+
+    protected :
+      /**
+       * @brief Internal parameters reference
+       */
+      mutable TePDIParameters params_;
+      
+      /**
+       * @brief The internal progress interface enabled state.
+       */
+      bool progress_enabled_;
+       
+      /**
+       * @brief The internal progress interface.
+       *
+       * @note Algorithms cannot be copied.
+       *
+       * @param external External algorithm reference.
+       * @return A const Algorithm reference.
+       */    
+      TePDIPIManager pi_manager_;      
+        
+      /**
+       * @brief Default Constructor
+       */
+      TePDIAlgorithm();
+
+      /**
+       * @brief Runs the current algorithm implementation.
+       *
+       * @return true if OK. false on error.
+       */
+      virtual bool RunImplementation() = 0;
+
+      /**
+       * @brief Reset the internal state to the initial state.
+       *
+       * @param params The new parameters referente at initial state.
+       */
+      virtual void ResetState( const TePDIParameters& params ) = 0;
+      
+      /**
+       * @brief Checks if current internal parameters fits the requirements of each
+       * PDI algorithm implementation.
+       *
+       * @note Error log messages must be generated. No exceptions generated.
+       *
+       * @return true if the internal parameters are OK. false if not.
+       */
+      bool CheckInternalParameters() const;
+      
+      /**
+       * @brief Start the progress interface.
+       *
+       * @param message Progress window message.
+       * @param steps Progress window total steps.
+       */
+      void StartProgInt( const std::string& message, 
+        unsigned int steps );
+        
+      /**
+       * @brief Update the current progress interface to the current step.
+       *
+       * @param step Current step.
+       * @return true if the interface was canceled, false otherwise.
+       */
+      bool UpdateProgInt( unsigned int step );
+      
+      /**
+       * @brief Increments the the current progress by one step.
+       * @return true if the interface was canceled, false otherwise.
+       */
+      bool IncProgInt();
+                
+      /**
+       * @brief Stop the progress interface.
+       *
+       */      
+      void StopProgInt();
+      
+    private :
+    
+      /**
+       * @brief Alternative constructor.
+       *
+       * @note Algorithms cannot be copied.
+       */    
+      TePDIAlgorithm( const TePDIAlgorithm& ) {};
+    
+      /**
+       * @brief Operator = overload.
+       *
+       * @note Algorithms cannot be copied.
+       *
+       * @param external External algorithm reference.
+       * @return A const Algorithm reference.
+       */
+      const TePDIAlgorithm& operator=( 
+        const TePDIAlgorithm& external );
+  };
+
+#endif //TEPDIALGORITHM_HPP
diff --git a/src/terralib/image_processing/TePDIAlgorithmFactory.cpp b/src/terralib/image_processing/TePDIAlgorithmFactory.cpp
new file mode 100755
index 0000000..9410587
--- /dev/null
+++ b/src/terralib/image_processing/TePDIAlgorithmFactory.cpp
@@ -0,0 +1,11 @@
+ 
+#include "TePDIAlgorithmFactory.hpp"
+
+TePDIAlgorithmFactory::TePDIAlgorithmFactory( const std::string& factoryName )
+: TeFactory< TePDIAlgorithm, TePDIParameters >( factoryName )
+{
+};      
+
+TePDIAlgorithmFactory::~TePDIAlgorithmFactory()
+{
+};
diff --git a/src/terralib/image_processing/TePDIAlgorithmFactory.hpp b/src/terralib/image_processing/TePDIAlgorithmFactory.hpp
new file mode 100755
index 0000000..4d4683e
--- /dev/null
+++ b/src/terralib/image_processing/TePDIAlgorithmFactory.hpp
@@ -0,0 +1,95 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef PDI_ALGORITHM_FACTORIES_REGISTERED
+  #define PDI_ALGORITHM_FACTORIES_REGISTERED
+
+  #include "TePDIArithmeticFactory.hpp"
+  #include "TePDIBDFilterFactory.hpp"
+  #include "TePDIColorTransformFactory.hpp"
+  #include "TePDIContrastFactory.hpp"
+  #include "TePDIMorfFilterFactory.hpp"
+  #include "TePDILinearFilterFactory.hpp"
+  #include "TePDIPrincipalComponentsFactory.hpp"
+  #include "TePDIRadarFrostFilterFactory.hpp"
+  #include "TePDIRadarKuanFilterFactory.hpp"
+  #include "TePDIRadarLeeFilterFactory.hpp"
+  #include "TePDIRaster2VectorFactory.hpp"
+  #include "TePDIRegGrowSegFactory.hpp"
+  #include "TePDIGeoMosaicFactory.hpp"
+  #include "TePDIBatchGeoMosaicFactory.hpp"
+  #include "TePDIFusionFactory.hpp"
+  #include "TePDIRegisterFactory.hpp"
+  #include "TePDIBlendingFactory.hpp"
+  #include "TePDIIsosegClasFactory.hpp"
+  #include "TePDIMixModelFactory.hpp"
+  #include "TePDIKMeansClasFactory.hpp"
+  #include "TePDIEMClasFactory.hpp"
+  #include "TePDISensorSimulator.hpp"
+  
+#endif 
+
+#ifndef TEPDIALGORITHMFACTORY_HPP
+  #define TEPDIALGORITHMFACTORY_HPP
+
+  #include <TeSharedPtr.h>
+  #include "TePDIAlgorithm.hpp"
+  #include "TePDIParameters.hpp"
+  #include "TePDIDefines.hpp"
+  
+  #include <TeFactory.h>
+  
+  #include <string>
+  
+  /**
+   * @brief This is the class for digital image processing algorithms factory.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIAlgorithmsFactories
+   */
+  class PDI_DLL TePDIAlgorithmFactory : 
+    public TeFactory< TePDIAlgorithm, TePDIParameters >
+  {
+    public :
+      typedef TeSharedPtr< TePDIAlgorithmFactory > pointer;
+      typedef const TeSharedPtr< TePDIAlgorithmFactory > const_pointer;
+      
+      /**
+       * @brief Default Destructor
+       */
+      virtual ~TePDIAlgorithmFactory();
+      
+    protected :
+      
+      /**
+       * @brief Default constructor
+       *
+       * @param factoryName Factory name.
+       */
+      TePDIAlgorithmFactory( const std::string& factoryName );
+  };
+  
+#endif
+
+
+
diff --git a/src/terralib/image_processing/TePDIArithmetic.cpp b/src/terralib/image_processing/TePDIArithmetic.cpp
new file mode 100755
index 0000000..6c40c18
--- /dev/null
+++ b/src/terralib/image_processing/TePDIArithmetic.cpp
@@ -0,0 +1,280 @@
+#include "TePDIArithmetic.hpp"
+
+#include <TeAgnostic.h>
+#include "TePDIUtils.hpp"
+
+
+TePDIArithmetic::TePDIArithmetic()
+{
+}
+
+
+TePDIArithmetic::~TePDIArithmetic()
+{
+}
+
+
+void TePDIArithmetic::ResetState( const TePDIParameters& params )
+{
+  TePDILevelRemap::ResetState( params );
+}
+
+
+bool TePDIArithmetic::CheckParameters( 
+  const TePDIParameters& parameters ) const
+{
+  /* Checking for the correct allowed algorithm types */
+
+  TePDIArithmetic::TePDIArithmeticType arithmetic_type;
+  if( ! parameters.GetParameter( "arithmetic_type", arithmetic_type ) ) {
+    TEAGN_LOGERR( "Missing parameter: arithmetic_type" );
+    return false;
+  }
+  if( ( arithmetic_type != TePDIAType1 ) &&
+      ( arithmetic_type != TePDIAType2 ) &&
+      ( arithmetic_type != TePDIAType3 ) &&
+      ( arithmetic_type != TePDIAType4 ) &&
+      ( arithmetic_type != TePDIAType5 ) ) {
+
+    TEAGN_LOGERR( "Invalid parameter: arithmetic_type" );
+    return false;
+  }
+
+  /* Checking input_image1 */
+
+  TePDITypes::TePDIRasterPtrType inRaster1;
+  if( ! parameters.GetParameter( "input_image1", inRaster1 ) ) {
+
+    TEAGN_LOGERR( "Missing parameter: input_image1" );
+    return false;
+  }
+  if( ! inRaster1.isActive() ) {
+
+    TEAGN_LOGERR( "Invalid parameter: input_image1 inactive" );
+    return false;
+  }
+  if( inRaster1->params().status_ == TeRasterParams::TeNotReady ) {
+
+    TEAGN_LOGERR( "Invalid parameter: input_image1 not ready" );
+    return false;
+  }
+  
+  /* Checking output_image */
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  if( ! parameters.GetParameter( "output_image", outRaster ) ) {
+
+    TEAGN_LOGERR( "Missing parameter: output_image" );
+    return false;
+  }
+  if( ! outRaster.isActive() ) {
+
+    TEAGN_LOGERR( "Invalid parameter: output_image inactive" );
+    return false;
+  }
+  if( outRaster->params().status_ == TeRasterParams::TeNotReady ) {
+
+    TEAGN_LOGERR( "Invalid parameter: output_image not ready" );
+    return false;
+  }
+  
+  /* Checking input_image2 */
+
+  TePDITypes::TePDIRasterPtrType inRaster2;
+  if( arithmetic_type != TePDIAType1 ) {
+    if( ! parameters.GetParameter( "input_image2", inRaster2 ) ) {
+
+      TEAGN_LOGERR( "Missing parameter: input_image2" );
+      return false;
+    }
+    if( ! inRaster2.isActive() ) {
+
+      TEAGN_LOGERR( "Invalid parameter: input_image2 inactive" );
+      return false;
+    }
+    if( inRaster2->params().status_ == TeRasterParams::TeNotReady ) {
+
+      TEAGN_LOGERR( "Invalid parameter: input_image2 not ready" );
+      return false;
+    }
+  }
+
+  if( arithmetic_type != TePDIAType1 ) {
+    TeRasterParams params1 = inRaster1->params();
+    TeRasterParams params2 = inRaster2->params();
+
+    TEAGN_TRUE_OR_RETURN( params1.ncols_ == params2.ncols_,
+      "Image1 and Imaga2 have different columns number" );
+    TEAGN_TRUE_OR_RETURN( params1.nlines_ == params2.nlines_,
+      "Image1 and Imaga2 have different lines number" );
+  }
+
+  /* channel parameters checking */
+
+  int img1_chan;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "img1_chan", img1_chan ),
+    "Missing parameter: img1_chan" );
+  TEAGN_TRUE_OR_RETURN( ( img1_chan < inRaster1->nBands() ) &&
+    ( img1_chan >= 0 ), "Invalid parameter: img1_chan" );
+
+  int img2_chan;
+  if( arithmetic_type != TePDIAType1 ) {
+    TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "img2_chan", img2_chan ),
+        "Missing parameter: img2_chan" );
+    TEAGN_TRUE_OR_RETURN( ( img2_chan < inRaster2->nBands() ) &&
+      ( img2_chan >= 0 ), "Invalid parameter: img2_chan" );
+  }
+
+  /* Checking for gain and offset */
+
+  TEAGN_TRUE_OR_RETURN(
+    parameters.CheckParameter< double >( "gain" ),
+    "Missing parameter: gain" );
+
+  TEAGN_TRUE_OR_RETURN(
+    parameters.CheckParameter< double >( "offset" ),
+    "Missing parameter: offset" );
+    
+  /* Checking photometric interpretation */
+  
+  TEAGN_TRUE_OR_RETURN( ( 
+    ( inRaster1->params().photometric_[ img1_chan ] == 
+      TeRasterParams::TeRGB ) ||
+    ( inRaster1->params().photometric_[ img1_chan ] == 
+      TeRasterParams::TeMultiBand ) ),
+    "Invalid paramter - input_image1 (invalid photometric interpretation)" );
+    
+  if( inRaster2.isActive() ) {
+    TEAGN_TRUE_OR_RETURN( ( 
+      ( inRaster2->params().photometric_[ img2_chan ] == 
+        TeRasterParams::TeRGB ) ||
+      ( inRaster2->params().photometric_[ img2_chan ] == 
+        TeRasterParams::TeMultiBand ) ),
+      "Invalid parameter - input_image2 (invalid photometric interpretation)" );    
+  }
+
+  return true;
+}
+
+
+bool TePDIArithmetic::RunImplementation()
+{
+  /* Parameters aquirement */
+
+  TePDIArithmeticType arithmetic_type;
+  params_.GetParameter( "arithmetic_type", arithmetic_type );
+
+  TePDITypes::TePDIRasterPtrType inRaster1;
+  params_.GetParameter( "input_image1", inRaster1 );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  params_.GetParameter( "output_image", outRaster );
+
+  TePDITypes::TePDIRasterPtrType inRaster2;
+  if( arithmetic_type != TePDIAType1 ) {
+    params_.GetParameter( "input_image2", inRaster2 );
+  }
+
+  int img1_chan;
+  params_.GetParameter( "img1_chan", img1_chan );
+
+  int img2_chan;
+  if( arithmetic_type != TePDIAType1 ) {
+   params_.GetParameter( "img2_chan", img2_chan );
+  }
+
+  double gain;
+  params_.GetParameter( "gain", gain );
+
+  double offset;
+  params_.GetParameter( "offset", offset );
+  
+  bool normalize_output_flag = false;
+  if( params_.CheckParameter< int >( "normalize_output" ) ) {
+    
+    int temp_int = 0;
+    params_.GetParameter( "normalize_output", temp_int );
+    if( temp_int == 1 ) {
+      normalize_output_flag = true;
+    }
+  }
+
+  /* Setting the output raster */
+  
+  TeRasterParams outRaster_params = outRaster->params();
+  
+  outRaster_params.nBands( 1 );
+  if( inRaster1->projection() != 0 ) {
+    TeSharedPtr< TeProjection > proj( TeProjectionFactory::make( 
+      inRaster1->projection()->params() ) );
+    outRaster_params.projection( proj.nakedPointer() );
+  }
+  
+  const TeBox bbox = inRaster1->params().boundingBox();
+  
+  outRaster_params.boundingBoxLinesColumns( bbox.x1(), bbox.y1(),
+    bbox.x2(), bbox.y2(), inRaster1->params().nlines_,
+    inRaster1->params().ncols_, TeBox::TeUPPERLEFT );
+  outRaster_params.setPhotometric( TeRasterParams::TeMultiBand, -1 );
+
+  TEAGN_TRUE_OR_RETURN( outRaster->init( outRaster_params ),
+    "Output raster reset error" );
+
+  /* Switching the arithmetic function pointer */
+
+  remap_func_3_ptr_type remap_func_3 = 0;
+  remap_func_4_ptr_type remap_func_4 = 0;
+
+  switch( arithmetic_type ) {
+    case TePDIAType1 :
+    {
+      remap_func_3 = &type1_arith;
+      break;
+    }
+    case TePDIAType2 :
+    {
+      remap_func_4 = &type2_arith;
+      break;
+    }
+    case TePDIAType3 :
+    {
+      remap_func_4 = &type3_arith;
+      break;
+    }
+    case TePDIAType4 :
+    {
+      remap_func_4 = &type4_arith;
+      break;
+    }
+    case TePDIAType5 :
+    {
+      remap_func_4 = &type5_arith;
+      break;
+    }
+    default :
+    {
+      TEAGN_LOG_AND_RETURN( "Invalid arithmetic type" );
+    }
+  }
+
+  /* Running remapping function */
+
+  if( remap_func_3 != 0 ) {
+    TEAGN_TRUE_OR_RETURN( RemapLevels( inRaster1, remap_func_3, img1_chan, 0, 
+      gain, offset, 
+      normalize_output_flag, outRaster ), "Level remapping error" );
+  } else if( remap_func_4 != 0 ) {
+    TEAGN_TRUE_OR_RETURN( RemapLevels( inRaster1, inRaster2, remap_func_4, 
+      img1_chan, img2_chan, 0,
+      gain, offset, normalize_output_flag, outRaster ), 
+      "Level remapping error" );
+  } else {
+    TEAGN_LOG_AND_RETURN( "Invalid remap function" );
+  }
+
+  return true;
+}
+
+
+
+
diff --git a/src/terralib/image_processing/TePDIArithmetic.hpp b/src/terralib/image_processing/TePDIArithmetic.hpp
new file mode 100755
index 0000000..1621953
--- /dev/null
+++ b/src/terralib/image_processing/TePDIArithmetic.hpp
@@ -0,0 +1,184 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIARITHMETIC_HPP
+  #define TEPDIARITHMETIC_HPP
+
+  #include "TePDILevelRemap.hpp"
+  #include "TePDIParameters.hpp"
+  #include "TePDITypes.hpp"
+  #include <TeSharedPtr.h>
+
+  /**
+   * @brief  This is the base class for level remapping algorithms.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   *
+   * @note The general required parameters are:
+   *
+   * @param arithmetic_type ( TePDIArithmetic::TePDIArithmeticType) - 
+   * Arithmetic type.
+   * @param input_image1 (TePDITypes::TePDIRasterPtrType).
+   * @param input_image2 (TePDITypes::TePDIRasterPtrType) - Not used by 
+   * TePDIAType1.
+   * @param img1_chan (int) - Band to process for image 1.
+   * @param img2_chan (int) - Band to process for image 2 - Not used by 
+   * TePDIAType1.
+   * @param gain ( double ).
+   * @param offset ( double ).
+   * @param output_image (TePDITypes::TePDIRasterPtrType).
+   *
+   * @note The following paramters are optional and will be used if present.
+   *
+   * @param normalize_output ( int = 1 ) - If present ( and with value 1 )
+   * output level normalization will be activated.
+   *
+   * @ingroup TePDIGeneralAlgoGroup
+   */
+  class PDI_DLL TePDIArithmetic : public TePDILevelRemap {
+    public :
+
+      /**
+       * @enum TePDIArithmeticType Arithmetic Types.
+       */       
+      enum TePDIArithmeticType{
+        /** @brief Gain * A + Offset */
+        TePDIAType1 = 1,
+        /** @brief Gain * ( A - B ) + Offset */
+        TePDIAType2 = 2,
+        /** @brief Gain * ( A + B ) + Offset */
+        TePDIAType3 = 3,
+        /** @brief Gain * ( A / B ) + Offset */
+        TePDIAType4 = 4,
+        /** @brief ( Gain * ( A - B ) / ( A + B ) ) + Offset */
+        TePDIAType5 = 5
+      };
+
+      /**
+       * @brief Default Constructor.
+       *
+       */
+      TePDIArithmetic();
+
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIArithmetic();
+
+      /**
+       * @brief Checks if the supplied parameters fits the requirements of each
+       * PDI algorithm implementation.
+       *
+       * @note Error log messages must be generated. No exceptions generated.
+       *
+       * @param parameters The parameters to be checked.
+       * @return true if the parameters are OK. false if not.
+       */
+      bool CheckParameters( const TePDIParameters& parameters ) const;
+
+    protected :
+      /**
+       * @brief Runs the current algorithm implementation.
+       *
+       * @return true if OK. false on error.
+       */
+      bool RunImplementation();
+
+      /**
+       * @brief Reset the internal state to the initial state.
+       *
+       * @param params The new parameters referente at initial state.
+       */
+      void ResetState( const TePDIParameters& params );
+
+      /**
+       * @brief Optmized binding function.
+       *
+       * @param level Input pixel level.
+       * @param gain Input gain.
+       * @param offset Input offset.
+       * @return Resultant value.
+       */      
+      inline static double type1_arith( double level, double gain, 
+        double offset ) { return ( gain * level ) + offset; };
+
+      /**
+       * @brief Optmized binding function.
+       *
+       * @param level1 Input pixel level 1.
+       * @param level2 Input pixel level 2.
+       * @param gain Input gain.
+       * @param offset Input offset.
+       * @return Resultant value.
+       */      
+      inline static double type2_arith( double level1, double level2, 
+        double gain,  double offset )
+        { return ( gain * ( level1 - level2 ) ) + offset; };
+
+      /**
+       * @brief Optmized binding function.
+       *
+       * @param level1 Input pixel level 1.
+       * @param level2 Input pixel level 2.
+       * @param gain Input gain.
+       * @param offset Input offset.
+       * @return Resultant value.
+       */      
+      inline static double type3_arith( double level1, double level2, 
+        double gain, double offset )
+        { return ( gain * ( level1 + level2 ) ) + offset; };
+
+      /**
+       * @brief Optmized binding function.
+       *
+       * @param level1 Input pixel level 1.
+       * @param level2 Input pixel level 2.
+       * @param gain Input gain.
+       * @param offset Input offset.
+       * @return Resultant value.
+       */      
+      inline static double type4_arith( double level1, double level2, 
+        double gain, double offset )
+        { return ( gain * ( level1 / level2 ) ) + offset; };
+
+      /**
+       * @brief Optmized binding function.
+       *
+       * @param level1 Input pixel level 1.
+       * @param level2 Input pixel level 2.
+       * @param gain Input gain.
+       * @param offset Input offset.
+       * @return Resultant value.
+       */      
+      inline static double type5_arith( double level1, double level2, 
+        double gain, double offset )
+        { return ( gain * ( level1 - level2 ) / ( level1 + level2 ) ) + 
+        offset; };
+
+  };
+
+/** @example TePDIArithmetic_test.cpp
+ *    Shows how to use this class.
+ */  
+  
+#endif //TEPDIARITHMETIC_HPP
diff --git a/src/terralib/image_processing/TePDIArithmeticFactory.cpp b/src/terralib/image_processing/TePDIArithmeticFactory.cpp
new file mode 100755
index 0000000..d4736be
--- /dev/null
+++ b/src/terralib/image_processing/TePDIArithmeticFactory.cpp
@@ -0,0 +1,25 @@
+ 
+#include "TePDIArithmeticFactory.hpp"
+#include "TePDIArithmetic.hpp"
+#include <TeAgnostic.h>
+
+TePDIArithmeticFactory::TePDIArithmeticFactory()
+: TePDIAlgorithmFactory( std::string( "TePDIArithmetic" ) )
+{
+};      
+
+TePDIArithmeticFactory::~TePDIArithmeticFactory()
+{
+};
+
+
+TePDIAlgorithm* TePDIArithmeticFactory::build ( const TePDIParameters& arg )
+{
+  TePDIAlgorithm* instance_ptr = new TePDIArithmetic();
+  
+  TEAGN_TRUE_OR_THROW( instance_ptr->Reset( arg ),
+    "Invalid parameters" );
+  
+  return instance_ptr;
+}
+
diff --git a/src/terralib/image_processing/TePDIArithmeticFactory.hpp b/src/terralib/image_processing/TePDIArithmeticFactory.hpp
new file mode 100755
index 0000000..aec16d0
--- /dev/null
+++ b/src/terralib/image_processing/TePDIArithmeticFactory.hpp
@@ -0,0 +1,69 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIARITHMETICFACTORY_HPP
+  #define TEPDIARITHMETICFACTORY_HPP
+
+  #include <TeSharedPtr.h>
+  #include "TePDIAlgorithmFactory.hpp"
+  #include "TePDIParameters.hpp"
+  
+  /**
+   * @brief This is the class for arithmetic algorithms factory.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIAlgorithmsFactories
+   */
+  class PDI_DLL TePDIArithmeticFactory : public TePDIAlgorithmFactory
+  {
+    public :
+      
+      /**
+       * @brief Default constructor
+       */
+      TePDIArithmeticFactory();      
+      
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIArithmeticFactory();
+      
+    protected :  
+      /**
+       * @brief Implementation for the abstract TeFactory::build.
+       *
+       * @param arg A const reference to the parameters used by the
+       * algorithm.
+       * @return A pointer to the new generated algorithm instance.
+       */
+      TePDIAlgorithm* build( const TePDIParameters& arg );
+      
+  };
+
+  namespace
+  {  
+    static TePDIArithmeticFactory TePDIArithmeticFactory_instance;
+  };
+
+#endif
+
diff --git a/src/terralib/image_processing/TePDIBDFilter.cpp b/src/terralib/image_processing/TePDIBDFilter.cpp
new file mode 100755
index 0000000..26de8d2
--- /dev/null
+++ b/src/terralib/image_processing/TePDIBDFilter.cpp
@@ -0,0 +1,454 @@
+#include "TePDIBDFilter.hpp"
+
+#include <TeAgnostic.h>
+#include "TePDIUtils.hpp"
+
+#include "math.h"
+
+TePDIBDFilter::TePDIBDFilter()
+{
+}
+
+
+TePDIBDFilter::~TePDIBDFilter()
+{
+}
+
+
+bool TePDIBDFilter::CheckParameters( 
+  const TePDIParameters& parameters ) const
+{
+  /* Checking for general required parameters */
+
+  TePDITypes::TePDIRasterPtrType inRaster;
+  if( ! parameters.GetParameter( "input_image", inRaster ) ) {
+
+    TEAGN_LOGERR( "Missing parameter: input_image" );
+    return false;
+  }
+  if( ! inRaster.isActive() ) {
+
+    TEAGN_LOGERR( "Invalid parameter: input_image inactive" );
+    return false;
+  }
+  if( inRaster->params().status_ == TeRasterParams::TeNotReady ) {
+
+    TEAGN_LOGERR( "Invalid parameter: input_image not ready" );
+    return false;
+  }
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  if( ! parameters.GetParameter( "output_image", outRaster ) ) {
+
+    TEAGN_LOGERR( "Missing parameter: output_image" );
+    return false;
+  }
+  if( ! outRaster.isActive() ) {
+
+    TEAGN_LOGERR( "Invalid parameter: output_image inactive" );
+    return false;
+  }
+  if( inRaster->params().status_ == TeRasterParams::TeNotReady ) {
+
+    TEAGN_LOGERR( "Invalid parameter: output_image not ready" );
+    return false;
+  }
+
+  /* Filter type checking */
+  TePDIBDType filter_type;
+  if( ! parameters.GetParameter( "filter_type", filter_type ) ) {
+
+    TEAGN_LOGERR( "Missing parameter: filter_type" );
+    return false;
+  }
+  if( ( filter_type != TePDISobel ) &&
+      ( filter_type != TePDIRoberts ) ) {
+
+    TEAGN_LOGERR( "Invalid parameter: filter_type" );
+    return false;
+  }
+
+  /* channels parameter checking */
+
+  std::vector< int > channels;
+  if( ! parameters.GetParameter( "channels", channels ) ) {
+
+    TEAGN_LOGERR( "Missing parameter: channels" );
+    return false;
+  }
+  for( unsigned int index = 0 ; index < channels.size() ; ++index ) {
+    if( channels[ index ] >= inRaster->nBands() ) {
+      TEAGN_LOGERR( "Invalid parameter: channels" );
+      return false;
+    }
+  }
+
+  /* Checking for number of iterations */
+  int iterations = 0;
+  if( ! parameters.GetParameter( "iterations", iterations ) ) {
+
+    TEAGN_LOGERR( "Missing parameter: iterations" );
+    return false;
+  }
+  TEAGN_TRUE_OR_RETURN( iterations > 0, "Invalid iterations number" );
+
+  /* Checking photometric interpretation */
+  
+  for( unsigned int channel = 0 ; channel < channels.size() ; ++channel ) {
+    TEAGN_TRUE_OR_RETURN( ( 
+      ( inRaster->params().photometric_[ channel ] == 
+        TeRasterParams::TeRGB ) ||
+      ( inRaster->params().photometric_[ channel ] == 
+        TeRasterParams::TeMultiBand ) ),
+    "Invalid parameter - input_image (invalid photometric interpretation)" );
+  }
+    
+  return true;
+}
+
+
+bool TePDIBDFilter::RunImplementation()
+{
+  TePDIBDType filter_type;
+  params_.GetParameter( "filter_type", filter_type );
+
+  switch( filter_type ) {
+    case TePDISobel :
+    {
+      return RunSobel();
+    }
+    case TePDIRoberts :
+    {
+      return RunRoberts();
+      break;
+    }
+    default :
+    {
+      TEAGN_LOG_AND_RETURN( "Invalid algorithm type" );
+    }
+  }
+}
+
+
+bool TePDIBDFilter::RunSobel()
+{
+  TePDITypes::TePDIRasterPtrType inRaster;
+  params_.GetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  params_.GetParameter( "output_image", outRaster );
+
+  std::vector< int > channels;
+  params_.GetParameter( "channels", channels );
+
+  int iterations = 0;
+  params_.GetParameter( "iterations", iterations );
+
+  /* Setting the output raster */
+
+  TeRasterParams outRaster_params = outRaster->params();
+  
+  outRaster_params.nBands( channels.size() );
+  if( inRaster->projection() != 0 ) {
+    TeSharedPtr< TeProjection > proj( TeProjectionFactory::make( 
+      inRaster->projection()->params() ) );  
+    outRaster_params.projection( proj.nakedPointer() );
+  }
+  outRaster_params.boxResolution( inRaster->params().box().x1(), 
+    inRaster->params().box().y1(), inRaster->params().box().x2(), 
+    inRaster->params().box().y2(), inRaster->params().resx_, 
+    inRaster->params().resy_ );  
+  outRaster_params.setPhotometric( TeRasterParams::TeMultiBand, -1 );
+  if( inRaster->params().useDummy_ ) {
+    outRaster_params.setDummy( inRaster->params().dummy_[ 0 ], -1 );
+  } else {
+    outRaster_params.setDummy( 0, -1 );
+  }
+    
+  TEAGN_TRUE_OR_RETURN( outRaster->init( outRaster_params ),
+    "Output raster reset error" );    
+    
+  /* Creating the temporary rasters */
+
+  TePDITypes::TePDIRasterPtrType aux_raster1;
+  TEAGN_TRUE_OR_RETURN( TePDIUtils::TeAllocRAMRaster( aux_raster1, 
+    outRaster->params(), TePDIUtils::TePDIUtilsAutoMemPol ),
+    "Unable to create auxiliary raster 1" );
+
+  TePDITypes::TePDIRasterPtrType aux_raster2;  
+  TEAGN_TRUE_OR_RETURN( TePDIUtils::TeAllocRAMRaster( aux_raster2, 
+    outRaster->params(), TePDIUtils::TePDIUtilsAutoMemPol ),
+    "Unable to create auxiliary raster 2" );
+    
+  /* Setting the convolution buffer initial state */
+
+  unsigned int raster_lines = (unsigned int)outRaster->params().nlines_;
+  unsigned int raster_columns = (unsigned int)outRaster->params().ncols_;
+
+  reset_conv_buf( 3, raster_columns );
+
+  /* Convolution Loop */
+
+  double output_level;
+  double vx, vy;
+
+  unsigned int conv_column_bound = raster_columns - 2;
+  unsigned int conv_line_bound = raster_lines - 2;
+
+  unsigned int raster_line;
+  unsigned int conv_buf_column;
+
+  TePDITypes::TePDIRasterPtrType source_raster;
+  TePDITypes::TePDIRasterPtrType target_raster;
+
+  double channel_min_level;
+  double channel_max_level;
+  
+  StartProgInt( "Sobel filter", channels.size() * iterations *
+     conv_line_bound );
+
+  for( unsigned int channels_index = 0 ;
+       channels_index < channels.size() ;
+       ++channels_index ) {
+
+    TEAGN_TRUE_OR_THROW(
+      TePDIUtils::TeCopyRasterPixels( inRaster, channels[ channels_index ],
+      aux_raster1, 0, false, false ), "Auxiliar Raster fill error" );
+
+    TEAGN_TRUE_OR_RETURN( TePDIUtils::TeGetRasterMinMaxBounds(
+      outRaster, channels[ channels_index ], channel_min_level,
+      channel_max_level ), "Unable to get raster channel level bounds" );
+
+    for( unsigned int iteration = 0 ; (int)iteration < iterations ; ++iteration ) {
+      /* Switching from input and output raster for more than 1 iteration */
+
+      if( iteration % 2 == 0 ) {
+        source_raster = aux_raster1;
+        target_raster = aux_raster2;
+      } else {
+        source_raster = aux_raster2;
+        target_raster = aux_raster1;
+      }
+
+      /* Fills the convolution buffer with the first "mask_lines" from the raster */
+
+      for( unsigned int line = 0 ; line < 2 ; ++line ) {
+        up_conv_buf( source_raster, line, 0 );
+      }
+
+      /* raster convolution */
+
+      for( raster_line = 0 ; raster_line < conv_line_bound ; ++raster_line ) {
+        /* Getting one more line from the source raster and adding to buffer */
+        
+        TEAGN_FALSE_OR_RETURN( UpdateProgInt( ( channels_index * iterations * 
+          conv_line_bound ) + ( iteration * conv_line_bound ) + raster_line ),
+          "Canceled by the user" );
+
+        up_conv_buf( source_raster, raster_line + 2, 0 );
+
+        for( conv_buf_column = 0 ; conv_buf_column < conv_column_bound ;
+             ++conv_buf_column ) {
+
+          vx = conv_buf_[ 2 ][ conv_buf_column ] +
+            ( 2 * conv_buf_[ 2 ][ conv_buf_column + 1 ] ) +
+            conv_buf_[ 2 ][ conv_buf_column + 2 ] -
+            conv_buf_[ 0 ][ conv_buf_column ] -
+            ( 2 * conv_buf_[ 0 ][ conv_buf_column + 1 ] ) -
+            conv_buf_[ 0 ][ conv_buf_column + 2 ];
+
+          vy = conv_buf_[ 0 ][ conv_buf_column + 2 ] +
+            ( 2 * conv_buf_[ 1 ][ conv_buf_column + 2 ] ) +
+            conv_buf_[ 2 ][ conv_buf_column + 2 ] -
+            conv_buf_[ 0 ][ conv_buf_column ] -
+            ( 2 * conv_buf_[ 1 ][ conv_buf_column ] ) -
+            conv_buf_[ 2 ][ conv_buf_column ];
+
+          output_level = sqrt( ( vx * vx ) + ( vy * vy ) );
+
+          /* Level range filtering */
+
+          if( output_level < channel_min_level ) {
+            output_level = channel_min_level;
+          } else if( output_level > channel_max_level ) {
+            output_level = channel_max_level;
+          }
+
+          TEAGN_TRUE_OR_RETURN( target_raster->setElement(
+            conv_buf_column + 1, raster_line +  1, output_level, 0 ),
+            "Pixel mapping error" );
+        }
+
+      }
+    }
+
+    /* Content copy from the target raster to the output raster */
+
+    TEAGN_TRUE_OR_RETURN( TePDIUtils::TeCopyRasterPixels( target_raster, 0,
+      outRaster, channels_index, false, false ), "Output raster fill error" );
+  }
+
+  return true;
+}
+
+
+bool TePDIBDFilter::RunRoberts()
+{
+  TePDITypes::TePDIRasterPtrType inRaster;
+  params_.GetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  params_.GetParameter( "output_image", outRaster );
+
+  std::vector< int > channels;
+  params_.GetParameter( "channels", channels );
+
+  int iterations = 0;
+  params_.GetParameter( "iterations", iterations );
+
+  /* Setting the output raster */
+    
+  TeRasterParams outRaster_params = outRaster->params();
+  
+  outRaster_params.nBands( channels.size() );
+  if( inRaster->projection() != 0 ) {
+    TeSharedPtr< TeProjection > proj( TeProjectionFactory::make( 
+      inRaster->projection()->params() ) );
+    outRaster_params.projection( proj.nakedPointer() );
+  }
+  outRaster_params.boxResolution( inRaster->params().box().x1(), 
+    inRaster->params().box().y1(), inRaster->params().box().x2(), 
+    inRaster->params().box().y2(), inRaster->params().resx_, 
+    inRaster->params().resy_ );
+  outRaster_params.setPhotometric( TeRasterParams::TeMultiBand, -1 );    
+  if( inRaster->params().useDummy_ ) {
+    outRaster_params.setDummy( inRaster->params().dummy_[ 0 ], -1 );
+  } else {
+    outRaster_params.setDummy( 0, -1 );
+  }
+  
+  TEAGN_TRUE_OR_RETURN( outRaster->init( outRaster_params ),
+    "Output raster reset error" );     
+    
+  /* Creating the temporary rasters */
+
+  TePDITypes::TePDIRasterPtrType aux_raster1;
+  TEAGN_TRUE_OR_RETURN( TePDIUtils::TeAllocRAMRaster( aux_raster1, 
+    outRaster->params(), TePDIUtils::TePDIUtilsAutoMemPol ),
+    "Unable to create auxiliary raster 1" );
+
+  TePDITypes::TePDIRasterPtrType aux_raster2;  
+  TEAGN_TRUE_OR_RETURN( TePDIUtils::TeAllocRAMRaster( aux_raster2, 
+    outRaster->params(), TePDIUtils::TePDIUtilsAutoMemPol ),
+    "Unable to create auxiliary raster 2" );    
+
+  /* Setting the convolution buffer initial state */
+
+  unsigned int raster_lines = (unsigned int)outRaster->params().nlines_;
+  unsigned int raster_columns = (unsigned int)outRaster->params().ncols_;
+
+  reset_conv_buf( 3, raster_columns );
+
+  /* Convolution Loop */
+
+  double output_level;
+  double diff1, diff2;
+
+  unsigned int conv_column_bound = raster_columns - 2;
+  unsigned int conv_line_bound = raster_lines - 2;
+
+  unsigned int raster_line;
+  unsigned int conv_buf_column;
+
+  TePDITypes::TePDIRasterPtrType source_raster;
+  TePDITypes::TePDIRasterPtrType target_raster;
+  
+  StartProgInt( "Roberts filter", channels.size() * iterations *
+     conv_line_bound );  
+
+  for( unsigned int channels_index = 0 ;
+       channels_index < channels.size() ;
+       ++channels_index ) {
+
+    TEAGN_TRUE_OR_THROW(
+      TePDIUtils::TeCopyRasterPixels( inRaster, channels[ channels_index ],
+      aux_raster1, 0, false, false ), "Auxiliar Raster fill error" );
+
+    double channel_min_level;
+    double channel_max_level;
+    TEAGN_TRUE_OR_RETURN( TePDIUtils::TeGetRasterMinMaxBounds(
+      outRaster, channels[ channels_index ], channel_min_level,
+      channel_max_level ), "Unable to get raster channel level bounds" );
+
+    for( unsigned int iteration = 0 ; (int)iteration < iterations ; ++iteration ) {
+      /* Switching from input and output raster for more than 1 iteration */
+
+      if( iteration % 2 == 0 ) {
+        source_raster = aux_raster1;
+        target_raster = aux_raster2;
+      } else {
+        source_raster = aux_raster2;
+        target_raster = aux_raster1;
+      }
+
+      /* Fills the convolution buffer with the first "mask_lines" from the raster */
+
+      for( unsigned int line = 0 ; line < 2 ; ++line ) {
+        up_conv_buf( source_raster, line, 0 );
+      }
+
+      /* raster convolution */
+
+      for( raster_line = 0 ; raster_line < conv_line_bound ; ++raster_line ) {
+        /* Getting one more line from the source raster and adding to buffer */
+        
+        TEAGN_FALSE_OR_RETURN( UpdateProgInt( ( channels_index * iterations * 
+          conv_line_bound ) + ( iteration * conv_line_bound ) + raster_line ),
+          "Canceled by the user" );
+
+        up_conv_buf( source_raster, raster_line + 2, 0 );
+
+        for( conv_buf_column = 0 ; conv_buf_column < conv_column_bound ;
+             ++conv_buf_column ) {
+
+          output_level = 0;
+
+          diff1 = conv_buf_[ 1 ][ conv_buf_column + 1 ] -
+            conv_buf_[ 2 ][ conv_buf_column + 2 ];
+
+          diff2 = conv_buf_[ 2 ][ conv_buf_column + 1 ] -
+            conv_buf_[ 1 ][ conv_buf_column + 2 ];
+
+          output_level = sqrt( ( diff1 * diff1 ) + ( diff2 * diff2 ) );
+
+          /* Level range filtering */
+
+          if( output_level < channel_min_level ) {
+            output_level = channel_min_level;
+          } else if( output_level > channel_max_level ) {
+            output_level = channel_max_level;
+          }
+
+          TEAGN_TRUE_OR_RETURN( target_raster->setElement(
+            conv_buf_column + 1, raster_line +  1, output_level, 0 ),
+            "Pixel mapping error" );
+        }
+      }
+    }
+
+    /* Content copy from the target raster to the output raster */
+
+    TEAGN_TRUE_OR_RETURN( TePDIUtils::TeCopyRasterPixels( target_raster, 0,
+      outRaster, channels_index, false, false ), "Output raster fill error" );
+  }
+
+  return true;
+}
+
+
+void TePDIBDFilter::ResetState( const TePDIParameters& params )
+{
+  TePDIBufferedFilter::ResetState( params );
+}
+
+
diff --git a/src/terralib/image_processing/TePDIBDFilter.hpp b/src/terralib/image_processing/TePDIBDFilter.hpp
new file mode 100755
index 0000000..d682d39
--- /dev/null
+++ b/src/terralib/image_processing/TePDIBDFilter.hpp
@@ -0,0 +1,116 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIBDFILTER_HPP
+  #define TEPDIBDFILTER_HPP
+
+  #include "TePDIBufferedFilter.hpp"
+  #include "TePDIParameters.hpp"
+  #include <TeSharedPtr.h>
+
+  /**
+   * @brief This is the class for border detection filter.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   *
+   * @note The general required parameters are:
+   *
+   * @param filter_type ( TePDIBDType ) - Edge detection type.
+   * @param input_image (TePDITypes::TePDIRasterPtrType) - Input image.
+   * @param output_image (TePDITypes::TePDIRasterPtrType) - Output image.
+   * @param channels (std::vector<int>) - Band(s) to process. For
+   * @param iterations (int) - Iterations number.
+   *
+   * @ingroup TePDIFiltersGroup
+   */
+  class PDI_DLL TePDIBDFilter : public TePDIBufferedFilter{
+    public :
+
+      /**
+       * @brief Edge detection types.
+       */  
+      enum TePDIBDType{
+        /** Sobel edge detector */
+        TePDISobel = 1,
+        /** Roberts edge detector */
+        TePDIRoberts = 2
+      };
+
+      /**
+       * @brief Default Constructor.
+       *
+       */
+      TePDIBDFilter();
+
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIBDFilter();
+
+      /**
+       * @brief Checks if the supplied parameters fits the requirements of each
+       * PDI algorithm implementation.
+       *
+       * @note Error log messages must be generated. No exceptions generated.
+       *
+       * @param parameters The parameters to be checked.
+       * @return true if the parameters are OK. false if not.
+       */
+      bool CheckParameters( const TePDIParameters& parameters ) const;
+
+    protected :
+
+      /**
+       * @brief Runs the current algorithm implementation.
+       *
+       * @return true if OK. false on error.
+       */
+      bool RunImplementation();
+
+      /**
+       * @brief Reset the internal state to the initial state.
+       *
+       * @param params The new parameters referente at initial state.
+       */
+      void ResetState( const TePDIParameters& params );
+
+      /**
+       * @brief Runs the Sobel algorithm implementation.
+       *
+       * @return true if OK. false on error.
+       */
+      bool RunSobel();
+
+      /**
+       * @brief Runs the Roberts algorithm implementation.
+       *
+       * @return true if OK. false on error.
+       */
+      bool RunRoberts();
+  };
+  
+/** @example TePDIBDFilter_test.cpp
+ *    Shows how to use this class.
+ */    
+
+#endif //TEPDIBDFILTER_HPP
diff --git a/src/terralib/image_processing/TePDIBDFilterFactory.cpp b/src/terralib/image_processing/TePDIBDFilterFactory.cpp
new file mode 100755
index 0000000..5c83fa8
--- /dev/null
+++ b/src/terralib/image_processing/TePDIBDFilterFactory.cpp
@@ -0,0 +1,24 @@
+ 
+#include "TePDIBDFilterFactory.hpp"
+#include "TePDIBDFilter.hpp"
+#include <TeAgnostic.h>
+
+TePDIBDFilterFactory::TePDIBDFilterFactory()
+: TePDIAlgorithmFactory( std::string( "TePDIBDFilter" ) )
+{
+};      
+
+TePDIBDFilterFactory::~TePDIBDFilterFactory()
+{
+};
+
+
+TePDIAlgorithm* TePDIBDFilterFactory::build ( const TePDIParameters& arg )
+{
+  TePDIAlgorithm* instance_ptr = new TePDIBDFilter();
+  
+  TEAGN_TRUE_OR_THROW( instance_ptr->Reset( arg ),
+    "Invalid parameters" );
+  
+  return instance_ptr;
+}
diff --git a/src/terralib/image_processing/TePDIBDFilterFactory.hpp b/src/terralib/image_processing/TePDIBDFilterFactory.hpp
new file mode 100755
index 0000000..e9cd9ee
--- /dev/null
+++ b/src/terralib/image_processing/TePDIBDFilterFactory.hpp
@@ -0,0 +1,67 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIBDFILTERFACTORY_HPP
+  #define TEPDIBDFILTERFACTORY_HPP
+
+  #include <TeSharedPtr.h>
+  #include "TePDIAlgorithmFactory.hpp"
+  #include "TePDIParameters.hpp"
+  
+  /**
+   * @brief This is the class for border detection algorithms factory.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIAlgorithmsFactories
+   */
+  class PDI_DLL TePDIBDFilterFactory : public TePDIAlgorithmFactory
+  {
+    public :
+      
+      /**
+       * @brief Default constructor
+       */
+      TePDIBDFilterFactory();      
+      
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIBDFilterFactory();
+      
+      protected :  
+      /**
+       * @brief Implementation for the abstract TeFactory::build.
+       *
+       * @param arg A const reference to the parameters used by the
+       * algorithm.
+       * @return A pointer to the new generated algorithm instance.
+       */
+      TePDIAlgorithm* build( const TePDIParameters& arg );
+      
+  };
+
+  namespace {
+    static TePDIBDFilterFactory TePDIBDFilterFactory_instance;
+  };  
+  
+#endif
diff --git a/src/terralib/image_processing/TePDIBaatz.cpp b/src/terralib/image_processing/TePDIBaatz.cpp
new file mode 100644
index 0000000..9d7539c
--- /dev/null
+++ b/src/terralib/image_processing/TePDIBaatz.cpp
@@ -0,0 +1,1373 @@
+#define MAX_FLT 3.4e38 /* maximum float value */
+
+// Internal includes
+#include <cstdlib>
+#include <iostream>
+#include <iomanip>
+#include <fstream>
+#include <time.h>
+#include <math.h>
+
+// TerraLib includes
+#include "TePDIBaatz.hpp"
+#include "TePDIRaster2Vector.hpp"
+#include "TePDIUtils.hpp"
+
+using namespace std;
+
+/**********************************************************************************/
+/* TerraLib main implementation for Baatz Segmentation                            */
+/**********************************************************************************/
+
+TePDIBaatz::TePDIBaatz()
+{
+}
+
+bool TePDIBaatz::CheckParameters( const TePDIParameters& parameters ) const
+{
+	// checking input_image
+    TePDITypes::TePDIRasterPtrType input_image;
+	TEAGN_TRUE_OR_RETURN(parameters.GetParameter( "input_image", input_image ),
+		"Missing parameter: input_image");
+	TEAGN_TRUE_OR_RETURN(input_image.isActive(),
+		"Invalid parameter: input_image inactive");
+	TEAGN_TRUE_OR_RETURN(input_image->params().status_ != TeRasterParams::TeNotReady ,
+		"Invalid parameter: input_image not ready");
+	vector<float> input_weights;
+  TEAGN_TRUE_OR_RETURN(parameters.GetParameter( "input_weights", input_weights ),
+    "Missing parameter: input_weights");
+  TEAGN_TRUE_OR_RETURN(input_weights.size() <= (unsigned) input_image->params().nBands() && input_weights.size() > 0,
+    "Input weights different from number of bands");
+  vector<unsigned> input_bands;
+  TEAGN_TRUE_OR_RETURN(parameters.GetParameter( "input_bands", input_bands ),
+    "Missing parameter: input_bands");
+  TEAGN_TRUE_OR_RETURN(input_bands.size() == input_weights.size(),
+    "Input bands with different size from input weights");
+  
+	// checking output_image
+    TePDITypes::TePDIRasterPtrType output_image;
+	TEAGN_TRUE_OR_RETURN(parameters.GetParameter( "output_image", output_image ),
+		"Missing parameter: output_image");
+
+	// checking thresholds
+	float scale;
+	TEAGN_TRUE_OR_RETURN(parameters.GetParameter( "scale", scale ),
+		"Missing parameter: scale");
+	TEAGN_TRUE_OR_RETURN(scale > 0,
+		"Parameter scale is > 0");
+	float compactness;
+	TEAGN_TRUE_OR_RETURN(parameters.GetParameter( "compactness", compactness ),
+		"Missing parameter: compactness");
+	TEAGN_TRUE_OR_RETURN(compactness > 0 && compactness <= 1,
+		"Parameter compactness is > 0 and <= 1");
+	float color;
+	TEAGN_TRUE_OR_RETURN(parameters.GetParameter( "color", color ),
+		"Missing parameter: color");
+	TEAGN_TRUE_OR_RETURN(color > 0 && color <= 1,
+		"Parameter color is > 0 and <= 1");
+
+	return true;
+}
+
+void TePDIBaatz::ResetState( const TePDIParameters& )
+{
+}
+     
+bool TePDIBaatz::RunImplementation()
+{
+    TePDITypes::TePDIRasterPtrType input_image;
+	params_.GetParameter( "input_image", input_image );
+
+  vector<float> input_weights;
+  params_.GetParameter( "input_weights", input_weights );
+
+  vector<unsigned> input_bands;
+  params_.GetParameter( "input_bands", input_bands );
+
+	/* retrieve input_image parameters */
+	int H = input_image->params().nlines_,
+		W = input_image->params().ncols_,
+		B = input_bands.size();
+
+	/* retrieve algorithm parameters */
+	float scale;
+	params_.GetParameter( "scale", scale );
+	float compactness;
+	params_.GetParameter( "compactness", compactness );
+	float color;
+	params_.GetParameter( "color", color );
+
+  struct segment **segments_ptr_vector = NULL;
+  struct segment *initial_segment = NULL;
+  struct segment *final_segment = NULL;
+  struct segmentation_parameters seg_parameters;
+
+	seg_parameters.sp = scale;
+	seg_parameters.wcmpt = compactness;
+	seg_parameters.wcolor = color;
+	seg_parameters.bands = B;
+	for (int i = 0; i < B; i++)
+		seg_parameters.wband[i] = input_weights[i];
+
+	/* run segmentation */
+/*
+	initialize_segments(&segments_ptr_vector, 
+		&initial_segment, &final_segment, input_image, H, W, progress_enabled_);
+	segmentation(segments_ptr_vector, 
+		initial_segment, final_segment, H, W, seg_parameters, progress_enabled_);
+*/
+/*
+	float **float_input_image = (float **) malloc( B * sizeof(float) );
+	for (int i = 0; i < B; i++)
+		float_input_image[i] = (float *) malloc( H * W * sizeof(float) );
+
+	int p = 0;
+	cout << "H: " << H << " W: " << W << " B: " << B << endl;
+	for (int i = 0; i < H; i++)
+		for (int j = 0; j < W; j++)
+		{
+			for (int k = 0; k < B; k++)
+			{
+				double pixel;
+				input_image->getElement(j, i, pixel, k);
+				float_input_image[k][p] = (float) pixel;
+			}
+			p++;
+		}
+*/
+	initialize_segments(&segments_ptr_vector, 
+		&initial_segment, &final_segment, input_image, input_bands, H, W, progress_enabled_);
+	segmentation(segments_ptr_vector, 
+		initial_segment, final_segment, H, W, seg_parameters, progress_enabled_);
+
+	/* write results */
+	TePDITypes::TePDIRasterPtrType output_image;
+	params_.GetParameter( "output_image", output_image );
+	TeRasterParams output_image_params = output_image->params();
+	output_image_params.nBands( 1 );
+	output_image_params.setDataType( TeUNSIGNEDLONG );
+	output_image_params.setNLinesNColumns( H, W );
+	output_image->init(output_image_params);
+	write_segments(output_image, initial_segment, 0, progress_enabled_); 
+/*
+	p = 0;
+	for (int i = 0; i < H; i++)
+		for (int j = 0; j < W; j++)
+		{
+			double pixel = (double) float_input_image[0][p++];
+			output_image->setElement(j, i, pixel);
+		}
+*/
+
+	/* generate output polygonset */
+	TePDITypes::TePDIPolSetMapPtrType output_polsets( 
+		new TePDITypes::TePDIPolSetMapType );
+	params_.GetParameter( "output_polsets", output_polsets );
+
+	TePDIParameters params_output;
+	params_output.SetParameter( "rotulated_image", output_image );
+	params_output.SetParameter( "channel", (unsigned int) 0 );
+	params_output.SetParameter( "output_polsets", output_polsets );
+
+	TePDIRaster2Vector raster2Vector;  
+
+	TEAGN_TRUE_OR_THROW( raster2Vector.Reset(params_output),
+		"Invalid Parameters for raster2Vector" );
+
+	TEAGN_TRUE_OR_THROW( raster2Vector.Apply(), 
+		"Apply error" );
+  
+  return true;
+}
+
+/**********************************************************************************/
+/* Internal main implementation for Baatz Segmentation                            */
+/**********************************************************************************/
+
+/* remove segment from list and conects segment list neighbours */
+void remove_segment(struct segment *aux_segment, 
+          struct segment **first_segment, 
+          struct segment **last_segment);
+
+/* merge neighbor with current_segment and removes neighbor segment */
+int merge_segment(struct segment_neighbor *curr_neighbor, 
+          struct segment *curr_segment, 
+          struct segment **first_segment, 
+          struct segment **last_segment,
+          struct segment **segments_ptr_vector, 
+          long int nrows, 
+          long int ncols); 
+
+/* identifies borderline pixels and change segment_matrix */
+void reset_pixels(struct segment_neighbor *curr_neighbor, 
+          struct segment *curr_segment, 
+          struct segment **segments_ptr_vector, 
+          long int nrows, 
+          long int ncols);
+ 
+/* creates list of segment's image neighbours */
+struct segment_neighbor* find_neighbors(struct segment *curr_segment, 
+                    struct segment **segments_ptr_vector, 
+                    long int nrows, 
+                    long int ncols); 
+
+/* finds the 4 neighbors of a pixel */
+void find_neighbor_pixels(unsigned long int pixel_id, 
+              long int nrows, 
+              long int ncols, 
+              long int *n0, 
+              long int *n1, 
+              long int *n2, 
+              long int *n3);
+ 
+/* frees list of segment's neighbors from memory */
+void free_neighbor_list(struct segment_neighbor **first_neighbor); 
+
+/* calcs mean and stddev of merging of curr_segment and curr_neighbor */
+float calc_color_stats (struct segment_neighbor *curr_neighbor, 
+            struct segment *curr_segment, 
+            // float **input_image, 
+            struct segmentation_parameters parameters);
+ 
+/* calcs spatial heterogeneity of merging of curr_segment and curr_neighbor */
+float calc_spatial_stats(struct segment_neighbor *curr_neighbor, 
+             struct segment *curr_segment, 
+             struct segment *segments_ptr_vector, 
+             long int nrows, 
+             long int ncols, 
+             struct segmentation_parameters parameters);
+ 
+/* calcs perimeter of merging of curr_segment and curr_neighbor */
+void calc_perimeter(struct segment_neighbor *curr_neighbor, 
+          struct segment *curr_segment, 
+          struct segment **segments_ptr_vector, 
+          long int nrows, 
+          long int ncols); 
+
+/* calcs bounding box of merging of curr_segment and curr_neighbor */
+void calc_bounding_box(struct segment_neighbor *curr_neighbor, 
+             struct segment *curr_segment); 
+
+/* mark all segments as unused */
+void reset_unused_segments_list(unsigned long int num_segments, 
+                 struct segment *first_segment); 
+
+/* search unused segment using a dither matrix */
+struct segment* find_unused_by_dither(struct segment **segments_ptr_vector, 
+                    int num_bits, 
+                    long int nrows, 
+                    long int ncols,
+                    unsigned long int *cell_count);
+
+/* finds col and row from a pixel id */
+void convert_pixel_id(unsigned long int pixel_id, 
+            long int ncols, 
+            long int *row, 
+            long int *col); 
+
+/**********************************************************************************/
+/* ranval: random number generator                                                */
+/**********************************************************************************/
+
+float ranval(float low, 
+       float high)
+{
+  float val;
+
+  val = (((float) rand())/RAND_MAX) * (high - low) + low;
+
+  return(val);
+}
+
+/**********************************************************************************/
+/* function dither_matrix_bits: calculate number of bits necessary to hold a      */
+/*                              coordinate subscript of dither (square) matrix    */
+/**********************************************************************************/
+unsigned long int dither_matrix_dimension(long int nrows,
+                      long int ncols,
+                      int *dither_bits)
+{
+  int num_bits;
+  unsigned long int max_dimension;
+  unsigned long int dither_dimension;
+  
+  if (nrows>ncols)
+    max_dimension=nrows*nrows;
+  else
+    max_dimension=ncols*ncols;
+
+  num_bits=0;
+  dither_dimension=1;
+
+  while (dither_dimension < max_dimension)
+  {
+    dither_dimension = dither_dimension*2;
+    num_bits++;
+  }
+
+  if (num_bits%2)
+  {
+    num_bits++;
+    dither_dimension = dither_dimension*2;
+  }
+
+  *dither_bits = num_bits;
+
+  return(dither_dimension);
+}
+
+/**********************************************************************************/
+/* function dither_matrix_conversion: converts an pixel index into a dither       */
+/*                                    matrix index                                */
+/**********************************************************************************/
+unsigned long int dither_matrix_conversion(int num_bits, 
+                       long int nrows, 
+                       long int ncols,
+                       unsigned long int *cell_count)
+{
+  long int row, col, irow, icol;
+  unsigned long int pixel_id;
+  unsigned long int aux_cell_count;
+  int i, j, k;
+  bool found;
+
+  aux_cell_count = *cell_count;
+  found = false;
+
+  while (!found) 
+  {
+    irow = icol = 0;
+    j = k = 1;
+    for (i=0;i<num_bits;i++)
+    {
+      if (i % 2)
+      {
+        icol = icol+(aux_cell_count&j)/k;
+      }
+      else
+      {
+        irow = irow+(aux_cell_count&j)/k;
+        k = k * 2;
+      }
+      j = j * 2;
+    }
+
+    row = col = 0;
+    j = 1;
+    for (i=0;i<(num_bits/2);i++)
+    {
+      k = k / 2;
+      if (irow & j) row = row+k;
+      if (icol & j) col = col+k;
+      j = j * 2;
+    }
+    
+    if ((col >= ncols)||(row >= nrows))
+    {
+      found = false;
+      aux_cell_count++;
+    }
+    else
+    {
+      pixel_id = (ncols*row)+col;
+      found = true;
+    }
+  }
+
+  *cell_count = aux_cell_count;
+  return(pixel_id);
+}
+
+/**********************************************************************************/
+/* function create_initial_segments: creates initial segment list                 */
+/**********************************************************************************/
+
+int initialize_segments(struct segment ***segments_ptr_vector, 
+            struct segment **first_segment, 
+            struct segment **last_segment, 
+            // float **input_image, 
+            TePDITypes::TePDIRasterPtrType input_image,
+            vector<unsigned> input_bands, 
+            long int nrows, 
+            long int ncols,
+            bool progress_enabled_)
+{
+  struct segment *aux_segment = 0;
+  struct segment *prev_segment;
+  struct segment_pixel *body_pixel;
+  unsigned long int id_pixel;
+  int row, col;
+  int allocate_memory, error;
+
+  error = 0;
+
+  /* allocate memory for segments matrix if it has not been created yet */
+  if (*segments_ptr_vector == NULL)
+  {
+  allocate_memory = true;
+  *segments_ptr_vector = (struct segment **) malloc(nrows*ncols * sizeof(struct segment *));
+  }
+  else
+  allocate_memory = false;
+
+  if(*segments_ptr_vector == NULL) error = 1;
+
+  row = 0;
+  col = 0;
+  id_pixel=0;
+  prev_segment = NULL;
+
+  TePDIPIManager pim("Initializing Data", nrows * ncols, progress_enabled_);
+  while ((id_pixel<(unsigned long)(nrows*ncols)) && (error!=1))
+  {
+
+  if (allocate_memory)
+  {
+      aux_segment = (struct segment*) malloc(sizeof(struct segment));
+    if(aux_segment == NULL) error = 1;
+    
+    body_pixel = (struct segment_pixel*) malloc(sizeof(struct segment_pixel));
+    if(body_pixel == NULL) error = 1;
+
+    aux_segment->next_original_segment = NULL;
+    aux_segment->original_pixel = body_pixel;
+  }
+  else
+  {
+    if (id_pixel==0)
+      aux_segment = *first_segment;
+    else
+      aux_segment = aux_segment->next_original_segment;
+    
+    body_pixel = aux_segment->original_pixel;
+  }
+
+  if (error!=1)
+  {
+    (*segments_ptr_vector)[id_pixel] = aux_segment;
+
+    aux_segment->id = id_pixel;
+    aux_segment->area = 1;
+    aux_segment->perimeter = 4;
+    aux_segment->b_box[0] = (float)row;
+    aux_segment->b_box[1] = (float)col;
+    aux_segment->b_box[2] = 1;
+    aux_segment->b_box[3] = 1;
+
+    for(unsigned b = 0; b < input_bands.size(); b++)
+    {
+      double pixel;
+      input_image->getElement(col, row, pixel, input_bands[b]);
+      aux_segment->avg_color[b] = (float) pixel;
+      aux_segment->std_color[b] = 0;
+      aux_segment->avg_color_square[b] = (float) (pixel * pixel);
+      aux_segment->color_sum[b] = (float) pixel;
+    }
+/*
+    for(int b = 0; b < NUM_BANDS; b++)
+    {
+      aux_segment->avg_color[b] = input_image[b][id_pixel];
+      aux_segment->std_color[b] = 0;
+      aux_segment->avg_color_square[b] = (float)(input_image[b][id_pixel])*(input_image[b][id_pixel]);
+      aux_segment->color_sum[b] = input_image[b][id_pixel];
+    }
+*/
+    aux_segment->used = false;
+
+    body_pixel->pixel_id = id_pixel;
+    body_pixel->borderline = true;
+    body_pixel->next_pixel = NULL;
+    aux_segment->pixel_list = body_pixel;
+    aux_segment->last_pixel = body_pixel;
+    
+    aux_segment->next_segment = NULL;
+    aux_segment->previous_segment = prev_segment;
+
+    if (prev_segment)
+    {
+      prev_segment->next_segment = aux_segment;
+      prev_segment->next_original_segment = aux_segment;
+
+      *last_segment = aux_segment;
+    }
+    else
+    {
+      *first_segment = aux_segment;
+    }
+
+    prev_segment = aux_segment;
+    
+    col++;
+    if (col==ncols)
+    {
+      col = 0;
+      row++;
+    }
+    
+      id_pixel++;
+    pim.Increment();
+  }
+  }
+  pim.Toggle(false);
+  if(error)
+  {
+    /* out of memory space */
+    return(1);
+  }
+  return(0);
+}
+
+/**********************************************************************************/
+/* function find_unused_by_dither : finds segment using dither matrix             */
+/**********************************************************************************/
+
+struct segment* find_unused_by_dither(struct segment **segments_ptr_vector, 
+                    int num_bits, 
+                    long int nrows, 
+                    long int ncols,
+                    unsigned long int *cell_count)
+
+{
+  struct segment *aux_segment;
+  unsigned long int pixel_id;
+  bool found;
+
+  found = false;
+
+  while (!found)
+  {
+  pixel_id=dither_matrix_conversion(num_bits, nrows, ncols, cell_count);
+  aux_segment = segments_ptr_vector[pixel_id];
+
+    if (aux_segment->used)
+    *cell_count=*cell_count+1;
+  else
+    found = true;
+  }
+  
+  return(aux_segment);
+}
+
+/**********************************************************************************/
+/* function convert_pixel_id: finds col and row from pixel id                     */
+/**********************************************************************************/
+
+void convert_pixel_id(unsigned long int pixel_id, 
+            long int ncols, 
+            long int *row, 
+            long int *col)
+{
+  *row = (long)floor((double)pixel_id / (double)ncols);
+  *col = pixel_id % ncols;
+}
+
+/**********************************************************************************/
+/* function free_neighbor_list: frees list of segment's neighbors from memory     */
+/**********************************************************************************/
+
+void free_neighbor_list(struct segment_neighbor **first_neighbor)
+{
+  struct segment_neighbor *aux_neighbor;
+  
+  while (*first_neighbor!=NULL)
+  {
+    aux_neighbor = (*first_neighbor)->next_neighbor;
+    free(*first_neighbor);
+    *first_neighbor = aux_neighbor;
+  }
+}
+
+/**********************************************************************************/
+/* function find_neighbors: creates list of segment's image neighbors             */
+/**********************************************************************************/
+
+struct segment_neighbor* find_neighbors(struct segment *curr_segment, 
+                    struct segment **segments_ptr_vector, 
+                    long int nrows, long int ncols)
+{
+  int i, not_in_neighbors_list;
+  long int neighbor_pixel[4][2]; /* first col contain pixel id, second contains segment id */
+  struct segment_neighbor *first_neighbor;
+  struct segment_neighbor *aux_neighbor;
+  struct segment_neighbor *new_neighbor;
+  struct segment_pixel *aux_pixel;
+  struct segment *aux_segment;
+   
+  aux_pixel = curr_segment->pixel_list;
+  first_neighbor = NULL;
+
+  /* for each outline pixel */
+  while (aux_pixel!=NULL)
+  {
+    if (aux_pixel->borderline==true)
+    {
+      find_neighbor_pixels(aux_pixel->pixel_id, nrows, ncols, 
+      neighbor_pixel[0], neighbor_pixel[1], neighbor_pixel[2], neighbor_pixel[3]);
+      /* finds segments to which pixel belongs to */
+      for (i=0;i<4;i++)
+      {
+        if (neighbor_pixel[i][0]!=-1)
+        {
+          aux_segment = segments_ptr_vector[neighbor_pixel[i][0]];
+          neighbor_pixel[i][1] = aux_segment->id;
+
+          if (neighbor_pixel[i][1] == (int) curr_segment->id)
+            neighbor_pixel[i][1]=-1;
+        }
+        else
+        {
+          neighbor_pixel[i][1]=-1;
+        }
+        /* if pixel segment is not yet in the list of segment neighbors, includes it */
+        if (neighbor_pixel[i][1]>-1)
+        {
+          not_in_neighbors_list = true;
+          aux_neighbor = first_neighbor;
+          while ((aux_neighbor!=NULL)&&(not_in_neighbors_list))
+          {
+            if (aux_neighbor->neighbor_id == (unsigned) neighbor_pixel[i][1])
+            {
+              not_in_neighbors_list = false;
+            }
+            else
+            {
+              aux_neighbor = aux_neighbor->next_neighbor;
+            }
+          }
+          if (not_in_neighbors_list)
+          {
+            new_neighbor = (struct segment_neighbor*) malloc(sizeof(struct segment_neighbor));
+            new_neighbor->neighbor_id = neighbor_pixel[i][1];
+            new_neighbor->neighbor = segments_ptr_vector[neighbor_pixel[i][1]];
+
+            if (first_neighbor==NULL)
+            {
+              new_neighbor->next_neighbor = NULL;
+            }
+            else
+            {
+              new_neighbor->next_neighbor = first_neighbor;
+            }
+            first_neighbor = new_neighbor;
+          }
+        }
+      }
+    }
+    aux_pixel = aux_pixel->next_pixel;
+  }
+  return (first_neighbor);
+}
+
+/**********************************************************************************/
+/* function find_neighbor_pixels: returns the ids of the (4) neighbors of a pixel */
+/**********************************************************************************/
+
+void find_neighbor_pixels(unsigned long int pixel_id, 
+              long int nrows, 
+              long int ncols, 
+              long int *n0, 
+              long int *n1, 
+              long int *n2, 
+              long int *n3)
+{
+  long int row, col;
+
+  convert_pixel_id(pixel_id, ncols, &row, &col);
+
+  *n0 = *n1 = *n2 = *n3 = -1;
+  
+  if (row>0)         *n0=((row-1)*ncols) + col;      
+
+  if (col>0)         *n1=(row*ncols) + (col-1);
+
+  if (row<(nrows-1)) *n2=((row+1)*ncols) + col;
+
+  if (col<(ncols-1)) *n3=(row*ncols) + (col+1);
+}
+
+/**********************************************************************************/
+/* function calc_color_stats: calculate the mean color and the standard deviation */
+/*           of the merging of two segments and writes it to the current neighbor */
+/**********************************************************************************/
+
+float calc_color_stats (struct segment_neighbor *curr_neighbor, 
+            struct segment *curr_segment, 
+            //float **input_image, 
+            struct segmentation_parameters parameters)
+{
+  float mean[NUM_BANDS], colorSum[NUM_BANDS];
+  float squarePixels[NUM_BANDS];
+  float stddev[NUM_BANDS];
+  float stddevNew[NUM_BANDS];
+  float sum_wband, wband_norm[NUM_BANDS];
+  float color_f[NUM_BANDS];
+  float color_h;
+  int b;
+  long int count;
+  count = 0;
+  float a_current, a_neighbor, a_sum;
+  struct segment *neighbor;
+
+  neighbor = curr_neighbor->neighbor;
+
+  a_current = curr_segment->area;
+  a_neighbor = neighbor->area;
+  a_sum = a_current+a_neighbor;
+  sum_wband = 0;
+
+  for (b = 0; b < parameters.bands; b++)
+  {
+    mean[b] = ((curr_segment->avg_color[b]*a_current)+(neighbor->avg_color[b]*a_neighbor))/a_sum;
+  squarePixels[b] = (curr_segment->avg_color_square[b])+(neighbor->avg_color_square[b]);
+  colorSum[b] = curr_segment->color_sum[b] + neighbor->color_sum[b];
+    stddev[b] = 0;
+  stddevNew[b] = 0;
+  sum_wband = sum_wband + parameters.wband[b];
+  }
+
+  for(b = 0; b < parameters.bands; b++)
+  {
+    stddevNew[b] = squarePixels[b] - 2*mean[b]*colorSum[b] + a_sum*mean[b]*mean[b];
+  }
+
+  /* stores stddev and mean in neighbor */
+  /* calculates color factor per band and total */
+  color_h = 0;
+  for (b = 0; b < parameters.bands; b++)
+  {
+    stddev[b] = sqrt(stddevNew[b]/a_sum);
+  wband_norm[b] = parameters.wband[b]; /* new implementation, bands already weighted */
+
+    color_f[b] = (a_current*curr_segment->std_color[b]) + 
+    (a_neighbor*neighbor->std_color[b]);
+    color_f[b] = wband_norm[b] * ((a_sum*stddev[b])-color_f[b]);
+    color_h = color_h + color_f[b];
+    
+    curr_neighbor->avg_color[b] = mean[b];
+    curr_neighbor->std_color[b] = stddev[b];
+  curr_neighbor->avg_color_square[b] = squarePixels[b];
+  curr_neighbor->color_sum[b] = colorSum[b];
+  }
+  return(color_h);
+}
+
+/**********************************************************************************/
+/* function calc_spatial_stats: calcs spatial heterogeneity of merging of         */
+/*                              curr_segment and curr_neighbor                    */
+/**********************************************************************************/
+
+float calc_spatial_stats(struct segment_neighbor *curr_neighbor, 
+             struct segment *curr_segment, 
+             struct segment **segments_ptr_vector, 
+             long int nrows, 
+             long int ncols, 
+             struct segmentation_parameters parameters)
+{
+  struct segment *neighbor;  
+  float spatial_h, smooth_f, compact_f;
+  float area[3], perimeter[3], b_box_len[3]; /* 0-current segment; 
+                          1-neighbor segment; 
+                        2-merged (new) segment */
+
+  neighbor = curr_neighbor->neighbor;
+
+  /* area */
+  area[0] = curr_segment->area;
+  area[1] = neighbor->area;
+  area[2] = area[0]+area[1];
+  curr_neighbor->area = area[2];
+  
+  /* perimeter */
+  perimeter[0] = curr_segment->perimeter;
+  perimeter[1] = neighbor->perimeter;
+  if (area[2]<4) /* valid only if pixel neighborhood==4 */
+  {
+    if (area[2]==2)
+    curr_neighbor->perimeter = 6;
+  else
+    curr_neighbor->perimeter = 8; 
+  }
+  else
+  {
+    calc_perimeter(curr_neighbor, curr_segment, segments_ptr_vector, nrows, ncols);
+  }
+  perimeter[2] = curr_neighbor->perimeter;
+  
+  /* bounding box lenght */
+  calc_bounding_box(curr_neighbor, curr_segment);
+  b_box_len[0] = curr_segment->b_box[2]*2 + curr_segment->b_box[3]*2;
+  b_box_len[1] = neighbor->b_box[2]*2 + neighbor->b_box[3]*2;
+  b_box_len[2] = curr_neighbor->b_box[2]*2 + curr_neighbor->b_box[3]*2;
+
+  /* smoothness factor */
+  smooth_f = (area[2]*perimeter[2]/b_box_len[2] - 
+    (area[1]*perimeter[1]/b_box_len[1] + area[0]*perimeter[0]/b_box_len[0]));
+  
+  /* compactness factor */
+  compact_f = (area[2]*perimeter[2]/sqrt(area[2]) - 
+    (area[1]*perimeter[1]/sqrt(area[1]) + area[0]*perimeter[0]/sqrt(area[0])));
+
+  /* spatial heterogeneity */
+  spatial_h = parameters.wcmpt*compact_f + (1-parameters.wcmpt)*smooth_f;
+  return(spatial_h);
+}
+
+/**********************************************************************************/
+/* function calc_perimeter: calculates the perimeter of merging of curr_segment   */
+/*                          and curr_neighbor                                     */
+/**********************************************************************************/
+
+void calc_perimeter(struct segment_neighbor *curr_neighbor, 
+          struct segment *curr_segment, 
+          struct segment **segments_ptr_vector, 
+          long int nrows, 
+          long int ncols)
+{
+  int i, j, k;
+  float perimeter_total;
+  unsigned long int neighbor_id, segment_id;
+  long int neighbor_pixel[4][2]; /* first col contain pixel id, second contains segment id */
+  struct segment_pixel *aux_pixel;
+  struct segment *aux_segment; 
+
+  perimeter_total = 0;
+
+  for (j=0;j<2;j++) /* once for the current segment, once for the neighbor segment */
+  {
+    neighbor_id = curr_neighbor->neighbor_id;
+    segment_id = curr_segment->id;
+    if (j==1)
+    {
+      aux_pixel = curr_segment->pixel_list;
+    }
+    else
+    {
+      aux_pixel = curr_neighbor->neighbor->pixel_list;
+    }
+    /* for each outline pixel */
+    while (aux_pixel!=NULL)
+    {
+      if (aux_pixel->borderline==true)
+      {
+        find_neighbor_pixels(aux_pixel->pixel_id, nrows, ncols, 
+      &neighbor_pixel[0][0], &neighbor_pixel[1][0], &neighbor_pixel[2][0], &neighbor_pixel[3][0]);
+        /* count how many of the surrounding pixels are from the own segment or neighbor */
+        k = 0;
+    for (i=0; i<4; i++)
+          if (neighbor_pixel[i][0]==-1) /* image limit */
+      k++;
+          else
+          {
+            aux_segment = segments_ptr_vector[neighbor_pixel[i][0]];
+            neighbor_pixel[i][1] = aux_segment->id;
+
+            if ((neighbor_pixel[i][1] != (int) segment_id)&&(neighbor_pixel[i][1] != (int) neighbor_id))
+              k++;
+          }
+        perimeter_total=perimeter_total+k; 
+      }
+      aux_pixel = aux_pixel->next_pixel;
+    }
+  }
+  curr_neighbor->perimeter = perimeter_total;
+
+
+}
+
+/**********************************************************************************/
+/* function calc_bounding_box: calcs bounding box of merging of curr_segment      */
+/*   and curr_neighbor                                                            */
+/**********************************************************************************/
+
+void calc_bounding_box(struct segment_neighbor *curr_neighbor, 
+             struct segment *curr_segment)
+{
+  float min_row[3], max_row[3], min_col[3], max_col[3];
+
+  min_row[0] = curr_segment->b_box[0];
+  max_row[0] = curr_segment->b_box[0]+curr_segment->b_box[2];
+  min_col[0] = curr_segment->b_box[1];
+  max_col[0] = curr_segment->b_box[1]+curr_segment->b_box[3];
+  
+  min_row[1] = curr_neighbor->neighbor->b_box[0];
+  max_row[1] = curr_neighbor->neighbor->b_box[0]+curr_neighbor->neighbor->b_box[2];
+  min_col[1] = curr_neighbor->neighbor->b_box[1];
+  max_col[1] = curr_neighbor->neighbor->b_box[1]+curr_neighbor->neighbor->b_box[3];
+
+  if (min_row[0]<min_row[1]) min_row[2]=min_row[0]; else min_row[2]=min_row[1];
+  if (min_col[0]<min_col[1]) min_col[2]=min_col[0]; else min_col[2]=min_col[1];
+  if (max_row[0]>max_row[1]) max_row[2]=max_row[0]; else max_row[2]=max_row[1];
+  if (max_col[0]>max_col[1]) max_col[2]=max_col[0]; else max_col[2]=max_col[1];
+
+  curr_neighbor->b_box[0] = min_row[2];
+  curr_neighbor->b_box[1] = min_col[2];
+  curr_neighbor->b_box[2] = max_row[2]-min_row[2];
+  curr_neighbor->b_box[3] = max_col[2]-min_col[2];
+}
+
+/**********************************************************************************/
+/* function reset_pixels: sets pixels from neighbor as belonging to current      */
+/*                         segment and corrects its outline                       */
+/**********************************************************************************/
+
+void reset_pixels(struct segment_neighbor *curr_neighbor, 
+          struct segment *curr_segment, 
+          struct segment **segments_ptr_vector, 
+          long int nrows, 
+          long int ncols)
+{
+  int i;
+  unsigned long int neighbor_id, segment_id;
+  long int neighbor_pixel[4][2]; /* first col contain pixel id, second col contains segment id */
+  struct segment_pixel *aux_pixel;
+  struct segment *aux_segment;
+
+  neighbor_id = curr_neighbor->neighbor_id;
+  segment_id = curr_segment->id;
+
+  /* for each pixel of the neighbor segment to be merged */
+  aux_pixel = curr_neighbor->neighbor->pixel_list;
+  while (aux_pixel!=NULL)
+  {
+    /* changes the value of the pixel in the segment matrix (assign it to the current segment) */
+    segments_ptr_vector[aux_pixel->pixel_id] = curr_segment;
+
+    /* if it is outline pixel, check if that must be changed */
+    if ((aux_pixel->borderline==true)&&(curr_segment->area>6)) /* curr_segment->area>6, 
+                                  only valid for pixel neighborhood==4 */
+    {
+      find_neighbor_pixels(aux_pixel->pixel_id, nrows, ncols, 
+      neighbor_pixel[0], neighbor_pixel[1], neighbor_pixel[2], neighbor_pixel[3]);
+      /* if pixel is surrounded by pixels of the same segment or of the merged neighbor, 
+       it's no longer a border pixel */
+      i=0;
+      while ((i<4)&&(i>-1))
+      {
+        if (neighbor_pixel[i][0]==-1) /* image limit */
+        {
+          i=-1;
+        }
+        else
+        {
+      aux_segment = segments_ptr_vector[neighbor_pixel[i][0]];
+          neighbor_pixel[i][1] = aux_segment->id;
+
+          if ((neighbor_pixel[i][1] != (int) segment_id)&&(neighbor_pixel[i][1] != (int) neighbor_id))
+          {
+            i=-1;
+          }
+          else
+          {
+            i++;
+          }
+        }
+      }
+      if (i!=-1) /* no longer outline pixel */
+      {
+        aux_pixel->borderline=false;
+      }
+    }
+    aux_pixel = aux_pixel->next_pixel;
+  }
+  
+  if (curr_segment->area>6) /* curr_segment->area>6, only valid for pixel neighborhood==4 */
+  {
+    /* for each outline pixel of the current segment */
+    aux_pixel = curr_segment->pixel_list;
+    while (aux_pixel!=NULL)
+    {
+      if (aux_pixel->borderline==true)
+      {
+        find_neighbor_pixels(aux_pixel->pixel_id, nrows, ncols, 
+      neighbor_pixel[0], neighbor_pixel[1], neighbor_pixel[2], neighbor_pixel[3]);
+        /* if pixel is surrounded by pixels of the same segment or of the merged neighbor, 
+       it's no longer a border pixel */
+        i=0;
+        while ((i<4)&&(i>-1))
+        {
+          if (neighbor_pixel[i][0]==-1) /* image limit */
+          {
+            i=-1;
+          }
+          else
+          {
+            aux_segment = segments_ptr_vector[neighbor_pixel[i][0]];
+            neighbor_pixel[i][1] = aux_segment->id;
+
+            if ((neighbor_pixel[i][1] != (int) segment_id)&&(neighbor_pixel[i][1] != (int) neighbor_id))
+            {
+              i=-1;
+            }
+            else
+            {
+              i++;
+            }
+          }
+        }
+        if (i!=-1) /* no longer outline pixel */
+        {
+          aux_pixel->borderline=false;
+        }
+      }
+      aux_pixel = aux_pixel->next_pixel;
+    }
+  }
+
+  /* include pixel list of neighbor in the list of curr_segment */
+  curr_segment->last_pixel->next_pixel = curr_neighbor->neighbor->pixel_list;
+  curr_segment->last_pixel = curr_neighbor->neighbor->last_pixel;
+  curr_neighbor->neighbor->pixel_list = NULL;
+}
+
+/**********************************************************************************/
+/* function remove_segment: remove segment from list                              */
+/**********************************************************************************/
+
+void remove_segment(struct segment *aux_segment, 
+          struct segment **first_segment, 
+          struct segment **last_segment)
+{
+  if (aux_segment==*first_segment)
+  {
+    *first_segment = aux_segment->next_segment;
+    (*first_segment)->previous_segment = NULL;
+  }
+  else
+  {
+    if (aux_segment==*last_segment)
+    {
+      *last_segment = aux_segment->previous_segment;
+      (*last_segment)->next_segment = NULL;
+    }
+    else
+    {
+      aux_segment->previous_segment->next_segment = aux_segment->next_segment;
+      aux_segment->next_segment->previous_segment = aux_segment->previous_segment;
+    }
+  }
+}
+
+
+/**********************************************************************************/
+/* function merge_segment: merge neighbor with current_segment and removes        */
+/*                         neighbor segment. Returns 0 if merged segment has been */
+/*                         used before, 1 otherwise.                              */
+/**********************************************************************************/
+
+int merge_segment(struct segment_neighbor *curr_neighbor, 
+          struct segment *curr_segment, 
+          struct segment **first_segment, 
+          struct segment **last_segment, 
+          struct segment **segments_ptr_vector, 
+          long int nrows, 
+          long int ncols)
+{
+  int i, not_used;
+  struct segment *neighbor;
+
+  neighbor = curr_neighbor->neighbor;
+
+  /* check if selected neighbor had already been used, if not set it as used */
+  if (neighbor->used)
+  {
+    not_used = false;
+  }
+  else
+  {
+    not_used = true;
+    neighbor->used = true;
+  }
+  
+  /* copy data from curr_neighbor to curr_seg */
+  curr_segment->area = curr_neighbor->area;
+  curr_segment->perimeter = curr_neighbor->perimeter;
+  for (i=0;i<4;i++)
+  {
+    curr_segment->b_box[i] = curr_neighbor->b_box[i];   
+  }
+  for (i=0;i<NUM_BANDS;i++)
+  {
+    curr_segment->avg_color[i] = curr_neighbor->avg_color[i];
+    curr_segment->std_color[i] = curr_neighbor->std_color[i];
+  curr_segment->avg_color_square[i] = curr_neighbor->avg_color_square[i];
+  curr_segment->color_sum[i] = curr_neighbor->color_sum[i];
+  }
+
+  /* sets pixels from neighbor as belonging to current segment and corrects outline */
+  reset_pixels(curr_neighbor, curr_segment, segments_ptr_vector, nrows, ncols);
+  
+  /* remove neighbor segment from list */
+  remove_segment(neighbor, first_segment, last_segment);
+
+  return(not_used);
+}
+
+/**********************************************************************************/
+/* function free_segment_list: remove all segment list and frees memory         */
+/**********************************************************************************/
+
+void free_segment_list(struct segment **initial_segment, 
+             struct segment ***segments_ptr_vector)
+{
+  struct segment *aux_segment;
+  struct segment *next_segment;
+  struct segment_pixel *aux_pixel;
+  struct segment_pixel *next_pixel;
+
+  /* frees segment list */
+  aux_segment=*initial_segment;
+  while (aux_segment!=NULL)
+  {
+    /* frees pixels lists */
+    aux_pixel = aux_segment->pixel_list;
+    while (aux_pixel!=NULL)
+    {
+      next_pixel = aux_pixel->next_pixel;
+      free(aux_pixel);
+      aux_pixel = next_pixel;
+    }
+    next_segment=aux_segment->next_original_segment;
+    free(aux_segment);
+    aux_segment=next_segment;
+  }
+  initial_segment=NULL;
+
+  /* frees segment vector */
+  if (segments_ptr_vector!=NULL)
+  {
+    free(*segments_ptr_vector);
+    *segments_ptr_vector=NULL;
+  }
+}
+
+/**********************************************************************************/
+/* function reset_unused_segments_list: mark all segments as unused                */
+/**********************************************************************************/
+
+void reset_unused_segments_list(unsigned long int num_segments, 
+                 struct segment *first_segment)
+{
+  unsigned long int i;
+  struct segment *aux_segment;
+
+  aux_segment = first_segment;
+
+  /* mark all segments as unused */
+  for (i=0; i<num_segments; i++)
+  {
+    aux_segment->used = false;
+    aux_segment = aux_segment->next_segment;
+  }
+}
+
+/**********************************************************************************/
+/* function write_segments: write output image                                    */
+/**********************************************************************************/
+
+void write_segments(// float **input_image, 
+          TePDITypes::TePDIRasterPtrType output_image,
+          struct segment *first_segment, 
+          int write_type,
+          bool progress_enabled_)
+{
+  int color[NUM_BANDS];
+  struct segment_pixel *aux_pixel;
+  struct segment *aux_segment;
+  long  ncols = output_image->params().ncols_,
+      nrows = output_image->params().nlines_,
+    col, row;
+
+  /* searches for first segment with a pixel list */
+  aux_segment = first_segment;
+  while (aux_segment->pixel_list==NULL)
+  {
+    aux_segment = aux_segment->next_original_segment;
+  }
+
+  /* for each segment */
+  TePDIPIManager pim("Writing segments", nrows * ncols, progress_enabled_);
+  while (aux_segment!=NULL)
+  {
+    /* define segment color */
+    switch (write_type)
+    {
+      case 0: /* random colors */
+        color[0] = (int) floor(ranval(0, 256));
+        //color[1] = (int) floor(ranval(0, 256));
+        //color[2] = (int) floor(ranval(0, 256));
+        break;
+      case 3: /* encoded segment id */
+        color[0] = (int) floor((double)aux_segment->id / 256.0);
+        //color[1] = ((int) aux_segment->id) % 256;
+        //color[2] = 0;
+        break;
+      default: /* average colors */
+        color[0] = (int) floor(aux_segment->avg_color[0]);
+        //color[1] = (int) floor(aux_segment->avg_color[1]);
+        //color[2] = (int) floor(aux_segment->avg_color[2]);
+        break;      
+    }
+
+    /* for each pixel of the segment */
+    aux_pixel = aux_segment->pixel_list;
+    while (aux_pixel!=NULL)
+    {
+   convert_pixel_id(aux_pixel->pixel_id, ncols, &row, &col);
+   output_image->setElement(col, row, color[0]);
+   // input_image[0][aux_pixel->pixel_id] = (unsigned char) color[0];
+     //input_image[1][aux_pixel->pixel_id] = (unsigned char) color[1];
+     //input_image[2][aux_pixel->pixel_id] = (unsigned char) color[2];
+     if (aux_pixel->borderline)
+      {
+        if (write_type==2)
+        {
+      convert_pixel_id(aux_pixel->pixel_id, ncols, &row, &col);
+      output_image->setElement(col, row, OUTLINE_COLOR_0);
+          // input_image[0][aux_pixel->pixel_id] = (unsigned char) OUTLINE_COLOR_0;
+          //input_image[1][aux_pixel->pixel_id] = (unsigned char) OUTLINE_COLOR_1;
+          //input_image[2][aux_pixel->pixel_id] = (unsigned char) OUTLINE_COLOR_2;
+        }
+        if (write_type==3)
+        {
+          //input_image[2][aux_pixel->pixel_id] = (unsigned char) 255;
+        }
+      }
+      aux_pixel = aux_pixel->next_pixel;
+    }
+    aux_segment=aux_segment->next_segment;
+  pim.Increment();
+  }
+  pim.Toggle(false);
+}
+
+/**********************************************************************************/
+/* function segmentation: performs the region growing segmentation                */
+/**********************************************************************************/
+
+float segmentation(//float **input_image, 
+           struct segment **segments_ptr_vector, 
+           struct segment *initial_segment, 
+           struct segment *final_segment, 
+           long int nrows, 
+           long int ncols, 
+           struct segmentation_parameters parameters,
+           bool progress_enabled_)
+{
+  int curr_step;
+  bool no_merges_prev_step = false;
+  float spectral_h, spatial_h;
+  float spectral_f, spatial_f;
+  float min_fusion_f, fusion_f, ssp;
+  long int num_segments, num_segments_unused;
+  unsigned long int num_pixels;
+  int dither_bits;
+  unsigned long int num_dither_cells, dither_cell_count;
+  struct segment *first_original_segment; /* first segment in segment list */
+  struct segment *first_segment; /* first not deleted segment in segment list */
+  struct segment *last_segment; /* last not deleted segment in segment list */
+  struct segment *curr_segment; /* current segment */
+  struct segment_neighbor *curr_neighbor; /* current neighbor */
+  struct segment_neighbor *first_neighbor; /* root of neighbor segment list */
+  struct segment_neighbor *best_neighbor = 0; /* lowest fusion factor to current segment */
+  float result;
+
+  /* initializes variables */
+  num_segments = num_pixels = nrows * ncols;
+  first_segment = initial_segment;
+  first_original_segment = initial_segment;
+  last_segment = final_segment;
+ 
+  /* square of scale parameter */
+  ssp = parameters.sp*parameters.sp;
+
+  /* calculate dimensions of dither matrix */
+  num_dither_cells = dither_matrix_dimension(nrows, ncols, &dither_bits);
+
+  cout<<endl;
+  curr_step = 0;
+
+  /* segmentation step */
+  TePDIPIManager pim("Segmenting image", MAX_STEPS, progress_enabled_);
+  while ((curr_step<MAX_STEPS) && (no_merges_prev_step!=true))
+  {
+    /* flag that indicates if there were merges in the step */
+    no_merges_prev_step = true;
+
+    /* mark all segments as not used */
+    num_segments_unused = num_segments;
+
+    /* initialize cell count for dither search */
+  dither_cell_count = 0;
+
+  /* while there are segments not used (num_segments_unused>0)*/
+    while (num_segments_unused>0)
+    {
+      /* select one segment and mark that segment as used */
+      curr_segment = find_unused_by_dither(segments_ptr_vector, 
+      dither_bits, nrows, ncols, &dither_cell_count);
+    dither_cell_count++;
+    
+    curr_segment->used = true;
+      num_segments_unused--;
+
+      first_neighbor = curr_neighbor = NULL;
+
+      /* find segment neighbors */
+      first_neighbor = find_neighbors(curr_segment, segments_ptr_vector, nrows, ncols);
+      curr_neighbor = first_neighbor;
+
+      /* calculate heterogeinity factors for each neighbor */
+      min_fusion_f =  (float) MAX_FLT;
+      while (curr_neighbor != NULL)
+      {
+        /* calculates spectral heterogeneity */
+        spectral_h = calc_color_stats(curr_neighbor, curr_segment, /* input_image, */ parameters);
+    spectral_f = parameters.wcolor * spectral_h;
+
+        if (spectral_f<ssp)
+    {
+      /* calculates spatial heterogeneity */
+      spatial_h = calc_spatial_stats(curr_neighbor, curr_segment, 
+        segments_ptr_vector, nrows, ncols, parameters);
+      spatial_f = (1-parameters.wcolor) * spatial_h;
+
+      /* calculates fusion factor and identify best neighbor */
+      fusion_f = spectral_f + spatial_f;
+      if (fusion_f<min_fusion_f)
+      {
+        min_fusion_f = fusion_f;
+        best_neighbor = curr_neighbor;  
+      }
+    }
+        curr_neighbor = curr_neighbor->next_neighbor; 
+      }
+
+      /* checks if merge of current segment with best neighbor is possible */
+      if (min_fusion_f<ssp)
+      {
+        /* merges current segment with best neighbor and removes best neighbor */
+        num_segments_unused = num_segments_unused - 
+      merge_segment(best_neighbor, curr_segment, &first_segment, &last_segment, 
+          segments_ptr_vector, nrows, ncols);
+        num_segments--;
+        no_merges_prev_step = false;
+      }
+      free_neighbor_list(&first_neighbor);
+    }
+    reset_unused_segments_list(num_segments, first_segment);
+    
+  curr_step++;
+  pim.Increment();
+    
+  //cout<<".";
+  }
+  pim.Toggle(false);
+  //cout<<"acabou" << endl;
+  /* returns (num.segments + segmentation steps/100) */
+  //result = (float)curr_step;
+  //result = num_segments+(result/100);
+  result=1;
+  //cout<<"acabou2" << endl;
+  return(result);
+}
+
diff --git a/src/terralib/image_processing/TePDIBaatz.hpp b/src/terralib/image_processing/TePDIBaatz.hpp
new file mode 100644
index 0000000..1f49b0d
--- /dev/null
+++ b/src/terralib/image_processing/TePDIBaatz.hpp
@@ -0,0 +1,221 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIBAATZ_HPP
+  #define TEPDIBAATZ_HPP
+
+  // Internal defines
+  #define MAX_STEPS 20 /* maximum number of segmentation steps */
+  #define NUM_BANDS 10 /* number of image bands */
+  #define POSITION_SEARCH 0.00 /* minimum percentage of unused segments for segment selection by pixel position */
+  #define OUTLINE_COLOR_0 255 /* segments' outline color for output image */
+  #define OUTLINE_COLOR_1 000
+  #define OUTLINE_COLOR_2 000
+
+  // TerraLib includes
+  #include "TePDIAlgorithm.hpp"
+  #include <TePDITypes.hpp>
+  #include <TePDIPIManager.hpp>
+  #include <TePDIUtils.hpp>
+  #include <TeSharedPtr.h>
+
+  /**
+    * @brief This is the class models an image segmentation process. 
+    * @author Thales Sehn Korting <tkorting at dpi.inpe.br>
+    * @author Gilson Costa <gilson at ele.puc-rio.br>
+    * @ingroup TePDISegmentationGroup
+    *
+    * Region Growing Segmentation, Baatz implementation
+    *
+    * @note The general required parameters :
+    *
+    * @param input_image (TePDITypes::TePDIRasterPtrType)
+    * @param input_weights (vector<float>) one weight for each input image channel
+    * @param input_bands (vector<unsigned>) used bands for input image
+    * @param scale (float) Parameter scale is > 0
+    * @param compactness (float) Parameter compactness is > 0 and <= 1
+    * @param color (float) Parameter color is > 0 and <= 1
+    * @param output_image (TePDITypes::TePDIRasterPtrType)
+    *
+    */
+
+/**********************************************************************************/
+/* TerraLib main class for Baatz Segmentation                                     */
+/**********************************************************************************/
+
+  class PDI_DLL TePDIBaatz : public TePDIAlgorithm {
+    public :
+      
+      /**
+       * @brief Default Constructor.
+       *
+       */
+      TePDIBaatz();
+
+      /**
+       * @brief Default Destructor
+       */
+	  ~TePDIBaatz() {};
+      
+      /**
+       * @brief Checks if the supplied parameters fits the requirements of 
+       * each PDI algorithm implementation.
+       *
+       * @note Error log messages must be generated. No exceptions generated.
+       *
+       * @param parameters The parameters to be checked.
+       * @return true if the parameters are OK. false if not.
+       */
+      bool CheckParameters( const TePDIParameters& parameters ) const;      
+
+  protected:    
+      /**
+       * @brief Reset the internal state to the initial state.
+       *
+       * @param params The new parameters referente at initial state.
+       */
+      void ResetState( const TePDIParameters& );    
+     
+      /**
+       * @brief Runs the current algorithm implementation.
+       *
+       * @return true if OK. false on error.
+       */
+      bool RunImplementation();
+      
+  };
+  
+/** @example TePDISegmentation_test.cpp
+ *    Shows how to use this class.
+ */    
+
+
+/**********************************************************************************/
+/* Internal definitions Baatz Segmentation                                        */
+/**********************************************************************************/
+
+/**********************************************************************************/
+/* type definitions                                                               */
+/**********************************************************************************/
+
+/* node of list of segments' pixels */
+struct segment_pixel 
+{
+  unsigned long int pixel_id; /* pixel id */
+  bool borderline; /* indicates if the pixel belongs to the border of the segment */
+  struct segment_pixel *next_pixel; /* next pixel */
+};
+
+/* node of segment list */
+struct segment 
+{
+  unsigned long int id; /* segment id */
+  float area; /* number of pixels in segment */
+  float perimeter; /*number of border pixels */
+  float b_box[4]; /* bounding box of the segment, relative to rows and cols */
+  float avg_color[NUM_BANDS]; /* average colors of pixels, one for each band */
+  float std_color[NUM_BANDS]; /* std of pixel colors, one for each band */
+  float avg_color_square[NUM_BANDS];
+  float color_sum[NUM_BANDS];
+  int used; /* indicate if segment has been used in segmentation step */
+  struct segment_pixel *pixel_list; /* list of indexes of the segment's pixels */
+  struct segment_pixel *last_pixel; /* pointer to the last pixel in the pixel list */
+  struct segment_pixel *original_pixel; /* pointer to original pixel of the segment */
+  struct segment *previous_segment; /* previous not deleted segment */
+  struct segment *next_segment; /* next not deleted segment */
+  struct segment *previous_unused_segment; /* previous unused segment */
+  struct segment *next_unused_segment; /* next unused segment */
+  struct segment *next_original_segment; /* next original segment */
+};
+
+/* node of segments' neighbours */
+struct segment_neighbor 
+{
+  float area; /* number of pixels in merged segment, neighbour plus original */
+  float perimeter; /*number of border pixels in merged segment, neighbour plus original */
+  float b_box[4]; /* bounding box of the segment of merged segment, neighbour plus original */
+  float avg_color[NUM_BANDS]; /* average colors of pixels of merged segment, one for each band */
+  float std_color[NUM_BANDS]; /* std of pixel colors of merged segment, one for each band */
+  float avg_color_square[NUM_BANDS];
+  float color_sum[NUM_BANDS];
+  unsigned long int neighbor_id; /* id of neighbor segment */
+  struct segment *neighbor; /* neighbor segment */
+  struct segment_neighbor *next_neighbor; /* next neighbor */
+};
+
+/* record of segmentation parameters */
+struct segmentation_parameters 
+{
+  float sp; /* scale parameter */
+  float wband[NUM_BANDS]; /* weight of image bands, between 0 and 1 */
+  float wcolor; /* factor of color/shape, between 0 and 1 */
+  float wcmpt; /* factor of compactness/smothness, between 0 and 1 */
+  int bands; /* number of bands */
+};
+
+/**********************************************************************************/
+/* function prototypes                                                            */
+/**********************************************************************************/
+
+/* returns random number between low and high */
+float randval(float low, 
+        float high); 
+
+/* read parameter file */
+int read_seg_parameters(char *parameter_file_name,
+            struct segmentation_parameters *parameters); 
+
+/* creates one segment for each pixel of input image */
+int initialize_segments(struct segment ***segments_ptr_vector, 
+            struct segment **first_segment, 
+            struct segment **last_segment, 
+            // float **input_image, 
+            TePDITypes::TePDIRasterPtrType input_image,
+            vector<unsigned> input_bands, 
+            long int nrows, 
+            long int ncols,
+            bool progress_enabled_);  
+
+/* performs the segmentation, returns (num.segments + segmentation steps/100) */
+float segmentation(// float **input_image, 
+           struct segment **segments_ptr_vector, 
+           struct segment *initial_segment, 
+           struct segment *final_segment, 
+           long int nrows, 
+           long int ncols, 
+           struct segmentation_parameters parameters,
+           bool progress_enabled_); 
+
+/* write output image */
+void write_segments(// float **input_image, 
+          TePDITypes::TePDIRasterPtrType output_image,
+          struct segment *initial_segment, 
+          int write_type,
+          bool progress_enabled_); 
+
+/* remove segments from memory */
+void free_segment_list(struct segment **initial_segment, 
+             struct segment ***segments_ptr_vector);
+
+#endif
diff --git a/src/terralib/image_processing/TePDIBatchGeoMosaic.cpp b/src/terralib/image_processing/TePDIBatchGeoMosaic.cpp
new file mode 100755
index 0000000..4a1606e
--- /dev/null
+++ b/src/terralib/image_processing/TePDIBatchGeoMosaic.cpp
@@ -0,0 +1,414 @@
+#include "TePDIBatchGeoMosaic.hpp"
+#include "TePDIGeoMosaic.hpp"
+#include "TePDIUtils.hpp"
+#include <TeAgnostic.h>
+
+#include <TeVectorRemap.h>
+
+
+TePDIBatchGeoMosaic::TePDIBatchGeoMosaic()
+{
+}
+
+
+TePDIBatchGeoMosaic::~TePDIBatchGeoMosaic()
+{
+}
+
+
+void TePDIBatchGeoMosaic::ResetState( const TePDIParameters& )
+{
+}
+
+
+bool TePDIBatchGeoMosaic::CheckParameters( const TePDIParameters& parameters ) const
+{
+  unsigned int index = 0;
+
+  /* Checking input_rasters */
+  
+  TePDITypes::TePDIRasterVectorType input_rasters;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "input_rasters", 
+    input_rasters ),
+    "Missing parameter: input_rasters" );
+  TEAGN_TRUE_OR_RETURN( ( input_rasters.size() > 1 ),
+    "Invalid parameter: input_rasters" );
+    
+  for( index = 0 ; index < input_rasters.size() ; ++index ) {
+    TEAGN_TRUE_OR_RETURN( input_rasters[ index ].isActive(),
+      "Invalid parameter: input_rasters[" +  Te2String( index ) + 
+      "] inactive" );
+      
+    TEAGN_TRUE_OR_RETURN( input_rasters[ index ]->params().status_ != 
+      TeRasterParams::TeNotReady, "Invalid parameter: input_rasters[" +
+      Te2String( index ) + "] not ready" );
+      
+    TEAGN_TRUE_OR_RETURN( ( input_rasters[ index ]->params().projection() != 0 ),
+      "Missing input_rasters[" + Te2String( index ) + "] projection" );
+      
+    TEAGN_TRUE_OR_RETURN( 
+      ( input_rasters[ index ]->params().projection()->name() != "NoProjection" ),
+      "Invalid input_rasters[" + Te2String( index ) + "] projection" );        
+  }
+  
+  /* Checking output_raster */
+  
+  TePDITypes::TePDIRasterPtrType output_raster;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "output_raster", 
+    output_raster ),
+    "Missing parameter: output_raster" );
+  TEAGN_TRUE_OR_RETURN( output_raster.isActive(),
+    "Invalid parameter: output_raster inactive" );
+  TEAGN_TRUE_OR_RETURN( output_raster->params().status_ != 
+    TeRasterParams::TeNotReady, "Invalid parameter: output_raster not ready" );
+
+  /* Checking for blending type */
+  
+  std::string blending_type;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "blending_type", 
+    blending_type ), "Missing parameter: blending_type" );
+    
+  /* Checking bands */
+  
+  std::vector< int > bands;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "bands", 
+    bands ), "Missing parameter: bands" );
+  TEAGN_TRUE_OR_RETURN( ( bands.size() >= input_rasters.size() ),
+    "Invalid parameter: bands" );
+  TEAGN_TRUE_OR_RETURN( ( ( bands.size() % input_rasters.size() ) == 0 ),
+    "Invalid paramter: bands" );
+    
+  unsigned int bands_per_raster = bands.size() / input_rasters.size();
+    
+  for( unsigned int bands_index = 0 ; bands_index < bands.size() ; 
+    ++bands_index ) {
+    
+    unsigned int current_raster_index = (unsigned int) floor( 
+      ( (double)bands_index ) / ( (double)bands_per_raster ) );
+    TEAGN_TRUE_OR_RETURN( (
+      ( bands[ bands_index ] >= 0 ) &&
+      ( bands[ bands_index ] < input_rasters[ current_raster_index ]->nBands() 
+      ) ), "Invalid parameter: bands[" + Te2String( bands_index ) + "]" );
+  }
+    
+  return true;
+}
+
+
+bool TePDIBatchGeoMosaic::RunImplementation()
+{
+  TePDITypes::TePDIRasterVectorType input_rasters;
+  params_.GetParameter( "input_rasters", input_rasters );
+
+  TePDITypes::TePDIRasterPtrType output_raster;
+  params_.GetParameter( "output_raster", output_raster );
+  
+  std::vector< int > bands;
+  params_.GetParameter( "bands", bands );
+  
+  /* Dumyy value definition */
+ 
+  const bool output_raster_uses_dummy = output_raster->params().useDummy_;
+  double output_raster_dummy = 0;
+  if( output_raster_uses_dummy ) {
+    output_raster_dummy = output_raster->params().dummy_[ 0 ];
+  }
+  
+  bool user_required_dummy = false;
+  double user_dummy = 0;
+  if( params_.CheckParameter< double >( "dummy_value" ) ) {
+    
+    params_.GetParameter( "dummy_value", user_dummy );
+    user_required_dummy = true;
+  }
+  
+  bool must_use_dummy = false;
+  double output_dummy_value = 0;
+  if( user_required_dummy ) {
+    must_use_dummy = true;
+    output_dummy_value = user_dummy;
+  } else if( output_raster_uses_dummy ) {
+    must_use_dummy = true;
+    output_dummy_value = output_raster_dummy;
+  }  
+  
+  /* Building a internal rasters list */
+  
+  std::list< TePDITypes::TePDIRasterPtrType > rasters_list;
+  
+  for( unsigned int index = 0 ; index < input_rasters.size() ; ++index ) {
+    rasters_list.push_back( input_rasters[ index ] );
+  }
+  
+  /* Processing each pair of rasters */
+  
+  TePDITypes::TePDIRasterPtrType result_raster; 
+    /* The final raster will be pointed by this */
+  
+  while( rasters_list.size() > 0 ) {
+    TePDITypes::TePDIRasterPtrType current_input_raster1;
+    TePDITypes::TePDIRasterPtrType current_input_raster2;
+    
+    std::vector< int > channels1;
+    std::vector< int > channels2;
+   
+    if( rasters_list.size() == input_rasters.size() ) {
+      TePDITypes::TePDIRasterPtrType found_raster1;
+      TePDITypes::TePDIRasterPtrType found_raster2;
+        
+      FindClosestRasters( rasters_list, found_raster1, found_raster2 );
+        
+      current_input_raster1 = found_raster1;
+      current_input_raster2 = found_raster2;
+      
+      findRastersChannels( current_input_raster1, params_, channels1 );
+      findRastersChannels( current_input_raster2, params_, channels2 );
+      
+      rasters_list.remove( found_raster1 );
+      rasters_list.remove( found_raster2 );
+    } else {
+      TePDITypes::TePDIRasterPtrType found_raster;
+        
+      FindClosestRaster( rasters_list, 
+        result_raster->params().box(),
+        result_raster->params().projection(),
+        found_raster );
+        
+      current_input_raster1 = result_raster;
+      current_input_raster2 = found_raster;
+      
+      /* building the channels list for the input mosaic */
+      
+      channels1.clear();
+        
+      for( int channels1_index = 0 ; 
+        channels1_index < result_raster->nBands() ; ++channels1_index ) {
+        
+        channels1.push_back( channels1_index );
+      }
+      
+      /* Retriving the channels vector for the new input rasters */      
+      
+      findRastersChannels( current_input_raster2, params_, channels2 );
+      
+      /* done */
+      
+      rasters_list.remove( found_raster );
+    }
+    
+    /* Guessing the output data type */
+    
+    TeDataType output_datatype = TeUNSIGNEDCHAR;
+    {
+      double r1_min = 0;
+      double r1_max = 0;
+      double r2_min = 0;
+      double r2_max = 0;
+
+      TePDIUtils::TeGetRasterMinMaxBounds( current_input_raster1, 0, r1_min,
+        r1_max );
+      TePDIUtils::TeGetRasterMinMaxBounds( current_input_raster2, 0, r2_min,
+        r2_max );
+        
+      if( ( r2_min < r1_min ) || ( r2_max > r1_max ) ) {
+        output_datatype = current_input_raster2->params().dataType_[ 0 ];
+      } else {
+        output_datatype = current_input_raster1->params().dataType_[ 0 ];
+      }
+    }
+    
+    /* Setting the output raster */
+    
+    TePDITypes::TePDIRasterPtrType current_output_raster;
+    
+    if( rasters_list.size() == 0 ) {
+      /* writing directly to the output raster */
+      
+      current_output_raster = output_raster;
+    } else {
+      /* writing to a internal buffered raster */
+      
+      TeRasterParams current_output_raster_params;
+      current_output_raster_params.nBands( 1 );
+      current_output_raster_params.nlines_ = 10;
+      current_output_raster_params.ncols_ = 10;
+      current_output_raster_params.dataType_[ 0 ] = output_datatype;
+      current_output_raster_params.setDummy( output_dummy_value, -1 );
+      if( must_use_dummy ) {
+        current_output_raster_params.useDummy_ = true;
+      } else {
+        current_output_raster_params.useDummy_ = false;
+      }
+      current_output_raster_params.setPhotometric( TeRasterParams::TeMultiBand,
+        -1 );
+        
+      TEAGN_TRUE_OR_RETURN( TePDIUtils::TeAllocRAMRaster( 
+        current_output_raster, current_output_raster_params, 
+        TePDIUtils::TePDIUtilsAutoMemPol ), 
+        "Unable to allocate temporary mem raster" );
+    }
+    
+    /* Building geomosaic parameters */
+    
+    TePDIParameters geo_mos_params = params_;
+    geo_mos_params.SetParameter( "mosaic_type", std::string( "geo_mosaic" ) );  
+    geo_mos_params.SetParameter( "input_raster1", current_input_raster1 );
+    geo_mos_params.SetParameter( "input_raster2", current_input_raster2 );
+    geo_mos_params.SetParameter( "output_raster", current_output_raster );
+    geo_mos_params.SetParameter( "keep_best_res", (int)1 );
+    geo_mos_params.SetParameter( "channels1", channels1 );
+    geo_mos_params.SetParameter( "channels2", channels2 );
+          
+    TePDIGeoMosaic geo_mos_instance;
+    
+    TEAGN_TRUE_OR_RETURN( geo_mos_instance.Reset( geo_mos_params ), 
+      "Geo-mosaic instance reset error" );
+      
+    TEAGN_TRUE_OR_RETURN( geo_mos_instance.Apply(),
+      "Unable to apply geographic mosaic strategy" );
+      
+    result_raster = current_output_raster;
+  } /* while */        
+  
+  return true;
+}
+
+
+void TePDIBatchGeoMosaic::FindClosestRaster( 
+  std::list< TePDITypes::TePDIRasterPtrType >& input_rasters,
+  const TeBox& reference_raster_box,
+  TeProjection* reference_raster_projection,
+  TePDITypes::TePDIRasterPtrType& closest_raster )
+{
+  TEAGN_TRUE_OR_THROW( ( input_rasters.size() > 0 ), 
+    "input_rasters.size() < 1" );
+  TEAGN_TRUE_OR_THROW( ( reference_raster_projection != 0 ),
+    "Invalid reference_raster_projection" );
+  
+  std::list< TePDITypes::TePDIRasterPtrType >::iterator it = 
+    input_rasters.begin();
+  
+  double best_distance = 0;
+  bool first_best_distance_found = false;
+  
+  double current_distance = 0;
+  TeBox current_box;
+  TeBox remapped_box;
+  
+  while( it != input_rasters.end() ) {
+    current_box = (*it)->params().box();
+    remapped_box = TeRemapBox( current_box,
+      (*it)->params().projection(),
+      reference_raster_projection );
+    
+    if( first_best_distance_found ) {
+      current_distance = 
+        TeDistance( remapped_box.center(), 
+        reference_raster_box.center() );
+          
+      if( current_distance < best_distance ) {
+        best_distance = current_distance;
+        closest_raster = *it;
+      }
+    } else {
+      best_distance = 
+        TeDistance( remapped_box.center(), 
+        reference_raster_box.center() );
+      
+      first_best_distance_found = true;
+      closest_raster = *it;
+    }  
+    
+    ++it;
+  }
+  
+  TEAGN_DEBUG_CONDITION( first_best_distance_found, "Best distance not found" );
+}
+
+void TePDIBatchGeoMosaic::FindClosestRasters( 
+  std::list< TePDITypes::TePDIRasterPtrType >& input_rasters,
+  TePDITypes::TePDIRasterPtrType& raster1,
+  TePDITypes::TePDIRasterPtrType& raster2 )
+{
+  TEAGN_TRUE_OR_THROW( ( input_rasters.size() > 1 ), 
+    "input_rasters.size() < 2" );
+    
+  double best_distance = 0;
+  bool best_distance_found = false;
+  double current_distance = 0;
+  TeBox current_box;
+  TeBox closest_raster_box;
+  TeBox closest_raster_box_reproj;
+  TePDITypes::TePDIRasterPtrType current_raster;
+  TePDITypes::TePDIRasterPtrType closest_raster;
+  std::list< TePDITypes::TePDIRasterPtrType > input_rasters_copy;
+  std::list< TePDITypes::TePDIRasterPtrType >::iterator input_rasters_it = 
+    input_rasters.begin();
+  
+  while( input_rasters_it != input_rasters.end() ) {
+    current_raster = *input_rasters_it;
+    current_box = current_raster->params().box();
+    
+    input_rasters_copy = input_rasters;
+    input_rasters_copy.remove( current_raster );
+    
+    FindClosestRaster( input_rasters_copy, current_box, 
+      current_raster->params().projection(),
+      closest_raster );
+      
+    closest_raster_box = closest_raster->params().box();  
+    closest_raster_box_reproj = TeRemapBox( closest_raster_box,
+      closest_raster->projection(), current_raster->projection() );
+    
+    current_distance = TeDistance( current_box.center(), 
+      closest_raster_box_reproj.center() );
+      
+    if( best_distance_found ) {
+      if( current_distance < best_distance ) {
+        best_distance = current_distance;
+        raster1 = current_raster;
+        raster2 = closest_raster;
+      }
+    } else {
+      best_distance = current_distance;
+      raster1 = current_raster;
+      raster2 = closest_raster;
+    }
+    
+    ++input_rasters_it;
+  }  
+}
+
+
+void TePDIBatchGeoMosaic::findRastersChannels( 
+  const TePDITypes::TePDIRasterPtrType& raster_ptr, 
+  const TePDIParameters& params,
+  std::vector< int >& channels )
+{
+  channels.clear();
+  
+  std::vector< int > bands;
+  TEAGN_TRUE_OR_THROW( params.GetParameter( "bands", bands ),
+    "Unable to extract parameter: bands" );
+    
+  TePDITypes::TePDIRasterVectorType input_rasters;
+  TEAGN_TRUE_OR_THROW( params.GetParameter( "input_rasters", input_rasters ),
+    "Unable to extract parameter: input_rasters" );
+    
+  unsigned int bands_per_raster = bands.size() / input_rasters.size();
+  
+  for( unsigned int rasters_index = 0 ; rasters_index < input_rasters.size() ;
+    ++rasters_index ) {
+    if( input_rasters[ rasters_index ] == raster_ptr ) {
+      unsigned int bands_start_index = ( rasters_index * bands_per_raster );
+      
+      for( unsigned int offset = 0 ; offset < bands_per_raster ; ++offset ) {
+        channels.push_back(  bands[ bands_start_index + offset ] );
+      }
+      
+      return;
+    }
+  }
+  
+  TEAGN_LOG_AND_THROW( "Unable to find the required rasters bands" );
+}
diff --git a/src/terralib/image_processing/TePDIBatchGeoMosaic.hpp b/src/terralib/image_processing/TePDIBatchGeoMosaic.hpp
new file mode 100755
index 0000000..86ec497
--- /dev/null
+++ b/src/terralib/image_processing/TePDIBatchGeoMosaic.hpp
@@ -0,0 +1,147 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIBATCHGEOMOSAIC_HPP
+  #define TEPDIBATCHGEOMOSAIC_HPP
+
+  #include "TePDIAlgorithm.hpp"
+  #include "TePDIParameters.hpp"
+  #include <TeSharedPtr.h>
+
+  /**
+   * @brief This is the class for Batch Geographic Mosaic
+   * ( geo-referenced rasters ) strategy.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   *
+   * @note The required parameters are:
+   * @param blending_type ( std::string ) - Blending type.
+   * type ( see each blending strategy documentation for other required
+   * parameters ).   
+   * @param input_rasters ( TePDITypes::TePDIRasterVectorType ) - 
+   * Input rasters vector (i.e if using two bands from each
+   * raster, the vector will follow the order [ raster0 raster0
+   * raster1 raster1 ...... ] ).
+   * @param bands ( std::vector< int > ) - The bands from each input_raster 
+   * following the order [Raster0 Band 0 - Raster0 Band 1 - ....
+   * RasterN Band 0 - RasterN Band 1 - .... - RasterN Band N ].
+   * @param output_raster ( TePDITypes::TePDIRasterPtrType ) - Output raster.
+   *
+   * @note The optional parameters are:
+   *
+   * @param dummy_value (double) - A dummy pixel value for use 
+   * in pixels where no data is available.
+   * @param auto_equalize ( int ) - If present ( any value ), input_raster2
+   * auto-equalizing will be made ( using overlap area reference ).    
+   *
+   * @note The output_raster pixel resolution will follow the best pixel 
+   * resolution found.
+   * @note Please check each blending strategy for other specific required
+   * parameters.
+   * @ingroup TePDIMosaicGroup
+   */
+  class PDI_DLL TePDIBatchGeoMosaic : public TePDIAlgorithm {
+    public :
+      
+      /**
+       * @brief Default Constructor.
+       *
+       */
+      TePDIBatchGeoMosaic();
+
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIBatchGeoMosaic();
+      
+      /**
+       * @brief Checks if the supplied parameters fits the requirements of 
+       * each PDI algorithm implementation.
+       *
+       * @note Error log messages must be generated. No exceptions generated.
+       *
+       * @param parameters The parameters to be checked.
+       * @return true if the parameters are OK. false if not.
+       */
+      bool CheckParameters( const TePDIParameters& parameters ) const;      
+
+    protected :
+    
+      /**
+       * @brief Reset the internal state to the initial state.
+       *
+       * @param params The new parameters referente at initial state.
+       */
+      void ResetState( const TePDIParameters& params );    
+     
+      /**
+       * @brief Runs the current algorithm implementation.
+       *
+       * @return true if OK. false on error.
+       */
+      bool RunImplementation();     
+      
+      /**
+       * @brief Locates the raster with the closest box ( relative boxes centers ).
+       *
+       * @param input_rasters A list with input rasters.
+       * @param reference_raster_box The reference raster box.
+       * @param reference_raster_projection Reference raster projection.
+       * @param closest_raster The returned closest raster.
+       */      
+      void FindClosestRaster( 
+        std::list< TePDITypes::TePDIRasterPtrType >& input_rasters,
+        const TeBox& reference_raster_box,
+        TeProjection* reference_raster_projection,
+        TePDITypes::TePDIRasterPtrType& closest_raster );      
+      
+      /**
+       * @brief Locates the two closest rasters ( relative boxes centers ).
+       *
+       * @param input_rasters A list with input rasters.
+       * @param raster1 The returned first raster.
+       * @param raster2 The returned second raster.
+       */      
+      void FindClosestRasters( 
+        std::list< TePDITypes::TePDIRasterPtrType >& input_rasters,
+        TePDITypes::TePDIRasterPtrType& raster1,
+        TePDITypes::TePDIRasterPtrType& raster2 );
+        
+      /**
+       * @brief Find the required raster channels inside the current parameters.
+       *
+       * @param raster_ptr The raster pointer.
+       * @param params A reference to the current parameters.
+       * @param channels The found channels.
+       */          
+      void findRastersChannels( 
+        const TePDITypes::TePDIRasterPtrType& raster_ptr,
+        const TePDIParameters& params,
+        std::vector< int >& channels );       
+  };
+  
+/** @example TePDIMosaic_test.cpp
+ *    Shows how to use this class.
+ */    
+
+#endif
diff --git a/src/terralib/image_processing/TePDIBatchGeoMosaicFactory.cpp b/src/terralib/image_processing/TePDIBatchGeoMosaicFactory.cpp
new file mode 100644
index 0000000..98c2732
--- /dev/null
+++ b/src/terralib/image_processing/TePDIBatchGeoMosaicFactory.cpp
@@ -0,0 +1,26 @@
+ 
+#include "TePDIBatchGeoMosaicFactory.hpp"
+#include "TePDIBatchGeoMosaic.hpp"
+#include <TeAgnostic.h>
+
+
+TePDIBatchGeoMosaicFactory::TePDIBatchGeoMosaicFactory()
+: TePDIAlgorithmFactory( std::string( "TePDIBatchGeoMosaic" ) )
+{
+}
+
+
+TePDIBatchGeoMosaicFactory::~TePDIBatchGeoMosaicFactory()
+{
+}
+
+
+TePDIAlgorithm* TePDIBatchGeoMosaicFactory::build ( const TePDIParameters& arg )
+{
+  TePDIAlgorithm* instance_ptr = new TePDIBatchGeoMosaic();
+  
+  TEAGN_TRUE_OR_THROW( instance_ptr->Reset( arg ),
+    "Invalid parameters" );
+  
+  return instance_ptr;
+}
diff --git a/src/terralib/image_processing/TePDIBatchGeoMosaicFactory.hpp b/src/terralib/image_processing/TePDIBatchGeoMosaicFactory.hpp
new file mode 100644
index 0000000..341ed56
--- /dev/null
+++ b/src/terralib/image_processing/TePDIBatchGeoMosaicFactory.hpp
@@ -0,0 +1,69 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIBATCHGEOMOSAICFACTORY_HPP
+  #define TEPDIBATCHGEOMOSAICFACTORY_HPP
+
+  #include <TeSharedPtr.h>
+  #include "TePDIAlgorithmFactory.hpp"
+  #include "TePDIParameters.hpp"
+  
+  /**
+   * @brief This is the class for image geographic batch mosaic algorithms 
+   * factory.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIAlgorithmsFactories
+   */
+  class PDI_DLL TePDIBatchGeoMosaicFactory : public TePDIAlgorithmFactory
+  {
+    public :
+      
+      /**
+       * @brief Default constructor
+       */
+      TePDIBatchGeoMosaicFactory();      
+      
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIBatchGeoMosaicFactory();
+      
+    protected :  
+      
+      /**
+       * @brief Implementation for the abstract TeFactory::build.
+       *
+       * @param arg A const reference to the parameters used by the
+       * algorithm.
+       * @return A pointer to the new generated algorithm instance.
+       */
+      TePDIAlgorithm* build( const TePDIParameters& arg );
+      
+  };
+
+  namespace {
+    static TePDIBatchGeoMosaicFactory TePDIBatchGeoMosaicFactory_instance;
+  };  
+  
+#endif
diff --git a/src/terralib/image_processing/TePDIBlendStratFactory.cpp b/src/terralib/image_processing/TePDIBlendStratFactory.cpp
new file mode 100755
index 0000000..d52b71d
--- /dev/null
+++ b/src/terralib/image_processing/TePDIBlendStratFactory.cpp
@@ -0,0 +1,12 @@
+ 
+#include "TePDIBlendStratFactory.hpp"
+
+TePDIBlendStratFactory::TePDIBlendStratFactory( 
+  const std::string& factoryName )
+: TeFactory< TePDIBlendingStrategy, TePDIParameters >( factoryName )
+{
+};      
+
+TePDIBlendStratFactory::~TePDIBlendStratFactory()
+{
+};
diff --git a/src/terralib/image_processing/TePDIBlendStratFactory.hpp b/src/terralib/image_processing/TePDIBlendStratFactory.hpp
new file mode 100755
index 0000000..b0ba315
--- /dev/null
+++ b/src/terralib/image_processing/TePDIBlendStratFactory.hpp
@@ -0,0 +1,67 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef PDI_BLEND_SF_REGISTERED
+  #define PDI_BLEND_SF_REGISTERED
+  
+  #include <TePDINoBlendSF.hpp>
+  #include <TePDIEuclidianBlendSF.hpp>
+
+#endif 
+
+#ifndef TEPDIBLENDSTRATFACTORY_HPP
+  #define TEPDIBLENDSTRATFACTORY_HPP
+
+  #include <TeSharedPtr.h>
+  #include <TePDIBlendingStrategy.hpp>
+  #include <TePDIParameters.hpp>
+  #include <TeFactory.h>
+
+  /**
+   * @brief This is the class for blending strategy factory.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIStrategyFactories
+   */
+  class PDI_DLL TePDIBlendStratFactory : 
+    public TeFactory< TePDIBlendingStrategy, TePDIParameters >
+  {
+    public :
+      
+      /**
+       * @brief Default Destructor
+       */
+      virtual ~TePDIBlendStratFactory();
+      
+    protected :
+      
+      /**
+       * @brief Default constructor
+       *
+       * @param factoryName Factory name.
+       */
+      TePDIBlendStratFactory( const std::string& factoryName );
+  };
+  
+#endif
+
diff --git a/src/terralib/image_processing/TePDIBlending.cpp b/src/terralib/image_processing/TePDIBlending.cpp
new file mode 100755
index 0000000..add6f6a
--- /dev/null
+++ b/src/terralib/image_processing/TePDIBlending.cpp
@@ -0,0 +1,1094 @@
+#include "TePDIBlending.hpp"
+
+#include <TePDIBlendStratFactory.hpp>
+#include <TePDIStatistic.hpp>
+#include <TePDIContrast.hpp>
+#include <TePDIUtils.hpp>
+#include <TeAgnostic.h>
+
+#include <TeOverlay.h>
+#include <TeGeometryAlgorithms.h>
+
+
+TePDIBlending::TePDIBlending()
+{
+}
+
+
+TePDIBlending::~TePDIBlending()
+{
+}
+
+
+void TePDIBlending::ResetState( const TePDIParameters& )
+{
+}
+
+
+bool TePDIBlending::CheckParameters( const TePDIParameters& parameters ) const
+{
+  /* Checking input_raster1 */
+  
+  TePDITypes::TePDIRasterPtrType input_raster1;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "input_raster1", 
+    input_raster1 ),
+    "Missing parameter: input_raster1" );
+  TEAGN_TRUE_OR_RETURN( input_raster1.isActive(),
+    "Invalid parameter: input_raster1 inactive" );
+  TEAGN_TRUE_OR_RETURN( input_raster1->params().status_ != 
+    TeRasterParams::TeNotReady, "Invalid parameter: input_raster1 not ready" );
+  TEAGN_TRUE_OR_RETURN( ( input_raster1->params().projection() != 0 ),
+    "Invalid parameter: input_raster1 do not have a projection" );
+    
+  /* Checking input_raster2 */
+  
+  TePDITypes::TePDIRasterPtrType input_raster2;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "input_raster2", 
+    input_raster2 ),
+    "Missing parameter: input_raster2" );
+  TEAGN_TRUE_OR_RETURN( input_raster2.isActive(),
+    "Invalid parameter: input_raster2 inactive" );
+  TEAGN_TRUE_OR_RETURN( input_raster2->params().status_ != 
+    TeRasterParams::TeNotReady, "Invalid parameter: input_raster2 not ready" );    
+  TEAGN_TRUE_OR_RETURN( ( input_raster2->params().projection() != 0 ),
+    "Invalid parameter: input_raster2 do not have a projection" );
+    
+  /* Checking output_raster */
+  
+  TePDITypes::TePDIRasterPtrType output_raster;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "output_raster", 
+    output_raster ),
+    "Missing parameter: output_raster" );
+  TEAGN_TRUE_OR_RETURN( output_raster.isActive(),
+    "Invalid parameter: output_raster inactive" );
+  TEAGN_TRUE_OR_RETURN( output_raster->params().status_ != 
+    TeRasterParams::TeNotReady, "Invalid parameter: output_raster not ready" );    
+    
+  /* channels1 parameter checking */
+
+  std::vector< int > channels1;
+  TEAGN_TRUE_OR_RETURN( 
+    parameters.GetParameter( "channels1", channels1 ), 
+    "Missing parameter: channels1" );
+  for( unsigned int channels1_index = 0 ; 
+    channels1_index < channels1.size() ; 
+    ++channels1_index ) {
+    
+    TEAGN_TRUE_OR_RETURN( ( channels1[ channels1_index ] >= 0 ) &&
+      ( channels1[ channels1_index ] < input_raster1->nBands() ),
+      "Invalid parameter: channels1" );
+  }
+  
+  /* channels2 parameter checking */
+
+  std::vector< int > channels2;
+  TEAGN_TRUE_OR_RETURN( 
+    parameters.GetParameter( "channels2", channels2 ), 
+    "Missing parameter: channels2" );
+  TEAGN_TRUE_OR_RETURN( ( channels2.size() == channels1.size() ),
+    "Size mismatch between channels1 and channels2" );
+  for( unsigned int channels2_index = 0 ; 
+    channels2_index < channels2.size() ; 
+    ++channels2_index ) {
+    
+    TEAGN_TRUE_OR_RETURN( ( channels2[ channels2_index ] >= 0 ) &&
+      ( channels2[ channels2_index ] < input_raster2->nBands() ),
+      "Invalid parameter: channels2" );
+  } 
+    
+  /* Checking raster polygons */
+  
+  TePDITypes::TePDIPolygonPtrType raster1_pol_ptr;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "raster1_pol_ptr", 
+    raster1_pol_ptr ), "Missing parameter : raster1_pol_ptr" );
+  TEAGN_TRUE_OR_RETURN( raster1_pol_ptr.isActive(),
+    "Invalid parameter : raster1_pol_ptr" )
+  TEAGN_TRUE_OR_RETURN(
+    ( ! input_raster1->begin( *raster1_pol_ptr, TeBoxPixelIn, 
+    0 ).end() ), "Invalid parameter : raster1_pol_ptr" )
+  TEAGN_TRUE_OR_RETURN( ( raster1_pol_ptr->size() == 1 ),
+    "Invalid parameter : raster1_pol_ptr" )
+    
+  TePDITypes::TePDIPolygonPtrType raster2_pol_ptr;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "raster2_pol_ptr", 
+    raster2_pol_ptr ), "Missing parameter : raster2_pol_ptr" );
+  TEAGN_TRUE_OR_RETURN( raster2_pol_ptr.isActive(),
+    "Invalid parameter : raster2_pol_ptr" )
+  TEAGN_TRUE_OR_RETURN(
+    ( ! input_raster2->begin( *raster2_pol_ptr, TeBoxPixelIn, 
+    0 ).end() ), "Invalid parameter : raster2_pol_ptr" )
+  TEAGN_TRUE_OR_RETURN( ( raster2_pol_ptr->size() == 1 ),
+    "Invalid parameter : raster2_pol_ptr" )
+    
+  /* Checking raster2 polygon offsets */
+  
+  double raster2_pol_offset_x = 0;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "raster2_pol_offset_x", 
+    raster2_pol_offset_x ), "Missing parameter : raster2_pol_offset_x" );  
+
+  double raster2_pol_offset_y = 0;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "raster2_pol_offset_y", 
+    raster2_pol_offset_y ), "Missing parameter : raster2_pol_offset_y" );
+    
+  /* Checking the blending_type parameter */ 
+  
+  std::string blending_type;
+  
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "blending_type", 
+    blending_type ), "Missing parameter: blending_type" );
+    
+  TePDIBlendStratFactory::TeFactoryMap::iterator fac_map_it = 
+    TePDIBlendStratFactory::instance().find( blending_type );
+    
+  TEAGN_TRUE_OR_RETURN( 
+    ( fac_map_it != TePDIBlendStratFactory::instance().end() ),
+    "Invalid parameter: blending_type" );
+       
+  return true;
+}
+
+
+bool TePDIBlending::RunImplementation()
+{
+  bool auto_equalize = false;
+  if( params_.CheckParameter< int >( "auto_equalize" ) ) {
+    
+    auto_equalize = true;
+  }
+  
+  /* Converting input rasters to multiband */
+  {
+    TePDITypes::TePDIRasterPtrType input_raster1;
+    params_.GetParameter( "input_raster1", input_raster1 );  
+    
+    TePDITypes::TePDIRasterPtrType input_raster2;
+    params_.GetParameter( "input_raster2", input_raster2 );  
+  
+    TePDITypes::TePDIRasterPtrType input_raster1_multiband;
+    
+    TEAGN_TRUE_OR_RETURN( TePDIUtils::convert2MultiBand( input_raster1,
+      progress_enabled_, input_raster1_multiband ), 
+      "Multi-band conversion error" );
+      
+    params_.SetParameter( "input_raster1", input_raster1_multiband );    
+  
+    TePDITypes::TePDIRasterPtrType input_raster2_multiband;
+    
+    TEAGN_TRUE_OR_RETURN( TePDIUtils::convert2MultiBand( input_raster2,
+      progress_enabled_, input_raster2_multiband ), 
+      "Multi-band conversion error" );
+      
+    params_.SetParameter( "input_raster2", input_raster2_multiband );   
+  }
+  
+  /* Reseting output raster */
+  
+  TEAGN_TRUE_OR_RETURN( resetOuputRaster(), "Output raster reset error" );
+  
+  /* Auto equalizing ( if required ) */
+  
+  if( auto_equalize ) {
+    TEAGN_TRUE_OR_RETURN( equalizeInputRaster2(),
+      "input_raster2 equalizing error" );
+  }
+  
+  short pols_relation = 0;   
+    
+  /* Rendering the non-intersected areas */
+  
+  TEAGN_TRUE_OR_RETURN( renderNonIntersectedAreas( pols_relation ), 
+    "Non-intersected area redering error" );     
+    
+  /* Calling the blending strategy */  
+  
+  if( ( pols_relation != TeDISJOINT ) && ( pols_relation != TeTOUCHES ) ) {
+    std::string blending_type;
+    params_.GetParameter( "blending_type", blending_type );  
+    
+    TePDIBlendingStrategy::pointer blending_strategy( 
+      TePDIBlendStratFactory::make( blending_type, params_ ) );
+        
+    TEAGN_TRUE_OR_RETURN( blending_strategy.isActive(), 
+      "Unable to buil blend strategy" );
+      
+    TEAGN_TRUE_OR_RETURN( blending_strategy->Apply( params_ ),
+      "Error applying blending strategy" );    
+  }
+  
+  return true;
+}
+
+
+bool TePDIBlending::renderNonIntersectedAreas( short& pols_relation )
+{
+  TePDITypes::TePDIRasterPtrType input_raster1;
+  params_.GetParameter( "input_raster1", input_raster1 );
+  TeRaster& input_raster1_ref = *( input_raster1.nakedPointer() );
+
+  TePDITypes::TePDIRasterPtrType input_raster2;
+  params_.GetParameter( "input_raster2", input_raster2 );  
+  TeRaster& input_raster2_ref = *( input_raster2.nakedPointer() );
+
+  TePDITypes::TePDIRasterPtrType output_raster;
+  params_.GetParameter( "output_raster", output_raster );
+  TeRaster& output_raster_ref = *( output_raster.nakedPointer() );
+
+  std::vector< int > channels1;
+  params_.GetParameter( "channels1", channels1 );
+  
+  std::vector< int > channels2;
+  params_.GetParameter( "channels2", channels2 );  
+  
+  /* Guessing dummy use */
+  
+  bool not_using_dummy = true;
+  double dummy_value = 0;
+  
+  if( params_.CheckParameter< double >( "dummy_value" ) ) {
+    
+    params_.GetParameter( "dummy_value", dummy_value );
+    
+    not_using_dummy = false;
+  }  
+  
+  /* Calculating intersecion polygons data */
+  
+  TePolygon new_raster1_polygon;
+  TePolygon new_raster2_polygon_ref_out;
+  TePolygon dummy_inter_pol;
+  TePolygon dummy_inter_pol_ref2;
+  double raster1_rel_index_offset_x = 0;
+  double raster1_rel_index_offset_y = 0;
+  double raster2_rel_index_offset_x = 0;
+  double raster2_rel_index_offset_y = 0;
+
+  TEAGN_TRUE_OR_RETURN( extractPolygons( params_, new_raster1_polygon,
+    new_raster2_polygon_ref_out, dummy_inter_pol, dummy_inter_pol_ref2,
+    pols_relation,
+    raster1_rel_index_offset_x, raster1_rel_index_offset_y,
+    raster2_rel_index_offset_x, raster2_rel_index_offset_y ),
+    "Error extracting intersection polygons" );
+  
+  /* Global vars */
+  
+  TeRaster::iteratorPoly input_raster1_it;
+  if( new_raster1_polygon.size() != 0 ) {
+    input_raster1_it =
+      output_raster->begin( new_raster1_polygon, TeBoxPixelIn, 0 );
+  }
+      
+  TeRaster::iteratorPoly input_raster2_it;
+  if( new_raster2_polygon_ref_out.size() != 0 ) {
+    input_raster2_it =
+    output_raster->begin( new_raster2_polygon_ref_out, TeBoxPixelIn, 0 );
+  }
+      
+  TePDIPIManager progress( "Rendering non-intersected area...", 
+    channels1.size() * ( input_raster1_it.nLinesInPoly() + 
+    input_raster2_it.nLinesInPoly() ), progress_enabled_ );    
+  
+  /* Transfering non-intersected areas */
+  
+  for( unsigned int channels_index = 0 ; channels_index < channels1.size() ;
+    ++channels_index ) {
+    
+    const unsigned int channel1 = channels1[ channels_index ];
+    const unsigned int channel2 = channels2[ channels_index ];
+
+    /* Transfering raster 1 - non-intersected area */
+    
+    if( new_raster1_polygon.size() != 0 ) {
+      input_raster1_it =
+        output_raster->begin( new_raster1_polygon, TeBoxPixelIn, 0 );
+    
+      unsigned int last_line = 0;  
+      unsigned int curr_line = 0;
+      unsigned int curr_col = 0;
+      double curr_value = 0;  
+      int offset_x = TeRound( raster1_rel_index_offset_x );
+      int offset_y = TeRound( raster1_rel_index_offset_y );
+      
+      while( ! input_raster1_it.end() ) {
+        curr_line = input_raster1_it.currentLine();
+        curr_col = input_raster1_it.currentColumn();
+          
+        if( input_raster1_ref.getElement( curr_col + offset_x, 
+            curr_line + offset_y, curr_value, channel1 ) ) {
+            
+          if( not_using_dummy || 
+            ( curr_value != dummy_value ) ) {
+            
+            TEAGN_TRUE_OR_RETURN( 
+              output_raster_ref.setElement( curr_col, curr_line, curr_value, 
+              channels_index ),
+              "Unable to write to output raster at line=" + 
+              Te2String( curr_line ) + 
+              " col=" + Te2String( curr_col ) );                    
+          }
+        }
+    
+        if( curr_line != last_line ) {
+          last_line = curr_line;
+          TEAGN_FALSE_OR_RETURN( progress.Increment(), 
+            "Canceled by the user" );
+        }
+        
+        ++input_raster1_it;
+      } 
+    }
+  
+    /* Transfering raster 2 - non-intersected area */
+    
+    if( new_raster2_polygon_ref_out.size() != 0 ) {
+      input_raster2_it =
+        output_raster->begin( new_raster2_polygon_ref_out, TeBoxPixelIn, 0 );
+    
+      unsigned int last_line = 0;  
+      unsigned int curr_line = 0;
+      unsigned int curr_col = 0;
+      double curr_value = 0;  
+      int offset_x = TeRound( raster2_rel_index_offset_x );
+      int offset_y = TeRound( raster2_rel_index_offset_y );
+        
+      while( ! input_raster2_it.end() ) {
+        curr_line = input_raster2_it.currentLine();
+        curr_col = input_raster2_it.currentColumn();
+          
+        if( input_raster2_ref.getElement( curr_col + offset_x, 
+            curr_line + offset_y , curr_value, channel2 ) ) {
+            
+          if( not_using_dummy || 
+            ( curr_value != dummy_value ) ) {
+          
+            TEAGN_TRUE_OR_RETURN( 
+              output_raster_ref.setElement( curr_col, curr_line, curr_value, 
+              channels_index ), "Unable to write to output raster at line=" + 
+              Te2String( curr_line ) + " col=" + Te2String( curr_col ) );
+          }
+        }
+    
+        if( curr_line != last_line ) {
+          last_line = curr_line;
+          TEAGN_FALSE_OR_RETURN( progress.Increment(), 
+            "Canceled by the user" );
+        }
+        
+        ++input_raster2_it;
+      }
+    }
+  }
+  
+  return true;
+}
+
+
+bool TePDIBlending::equalizeInputRaster2()
+{
+  TePDITypes::TePDIRasterPtrType input_raster1;
+  params_.GetParameter( "input_raster1", input_raster1 );
+
+  TePDITypes::TePDIRasterPtrType input_raster2;
+  params_.GetParameter( "input_raster2", input_raster2 );
+  
+  std::vector< int > channels1;
+  params_.GetParameter( "channels1", channels1 );  
+  
+  std::vector< int > channels2;
+  params_.GetParameter( "channels2", channels2 );  
+  
+  bool enable_multi_thread = params_.CheckParameter< int >( 
+    "enable_multi_thread" );
+  
+  /* Guessing dummy use */
+  
+  bool forced_dummy = false;
+  double dummy_value = 0;
+  
+  if( params_.CheckParameter< double >( "dummy_value" ) ) {
+    
+    params_.GetParameter( "dummy_value", dummy_value );
+    
+    forced_dummy = true;
+  }    
+  
+  /* Calculating intersecion polygons data */
+  
+  TePolygon new_raster1_polygon;
+  TePolygon new_raster2_polygon;
+  TePolygon inter_pol_ref1;
+  TePolygon int_pol_ref2;
+  double raster1_rel_index_offset_x = 0;
+  double raster1_rel_index_offset_y = 0;
+  double raster2_rel_index_offset_x = 0;
+  double raster2_rel_index_offset_y = 0;
+  short pols_relation = 0;
+
+  TEAGN_TRUE_OR_RETURN( TePDIBlending::extractPolygons( params_, 
+    new_raster1_polygon, new_raster2_polygon, inter_pol_ref1, int_pol_ref2,
+    pols_relation,
+    raster1_rel_index_offset_x, raster1_rel_index_offset_y,
+    raster2_rel_index_offset_x, raster2_rel_index_offset_y ),
+    "Error extracting intersection polygons" );  
+  
+  /* Defining the overlap polygon over raster1 ( raster1 world index )*/
+    
+  if( pols_relation != TeDISJOINT ) {
+    /* Creating the thread parameters */
+    
+    std::vector< double > mean_vector_raster1;
+    std::vector< double > mean_vector_raster2;
+    
+    std::vector< double > variance_vector_raster1;
+    std::vector< double > variance_vector_raster2;
+    
+    TeThreadParameters t1_params;
+    t1_params.store( "input_raster", input_raster1 );
+    t1_params.store( "input_pol", inter_pol_ref1 );
+    t1_params.store( "progress_enabled_flag", 
+      TePDIAlgorithm::progress_enabled_ );
+    t1_params.store( "input_channels", channels1 );
+    t1_params.store( "mean_vector_ptr", &mean_vector_raster1 );
+    t1_params.store( "variance_vector_ptr", &variance_vector_raster1 );
+
+    TeThreadParameters t2_params;
+    t2_params.store( "input_raster", input_raster2 );
+    t2_params.store( "input_pol", int_pol_ref2 );
+    t2_params.store( "progress_enabled_flag", 
+      TePDIAlgorithm::progress_enabled_ );
+    t2_params.store( "input_channels", channels2 );
+    t2_params.store( "mean_vector_ptr", &mean_vector_raster2 );
+    t2_params.store( "variance_vector_ptr", &variance_vector_raster2 );
+    
+    /* Starting both threads to generate the mean and variance vectors
+       from both rasters */
+
+    if( enable_multi_thread ) {
+      TeThreadFunctor thread1;
+      thread1.setStartFunctPtr( getMeanAndVarianceThreadEntry );
+      
+      TeThreadFunctor thread2;
+      thread2.setStartFunctPtr( getMeanAndVarianceThreadEntry );
+        
+      thread1.setParameters( t1_params );
+      TEAGN_TRUE_OR_RETURN( thread1.start(),
+        "Error starting thread1" );  
+      thread2.setParameters( t2_params );
+      TEAGN_TRUE_OR_RETURN( thread2.start(),
+        "Error starting thread2" );         
+    
+      TEAGN_TRUE_OR_RETURN( thread1.waitToFinish(),
+        "Error waiting for thread to finish" )  
+      TEAGN_TRUE_OR_RETURN( thread2.waitToFinish(),
+        "Error waiting for thread to finish" )          
+    } else {
+      TEAGN_TRUE_OR_RETURN( getMeanAndVarianceThreadEntry( t1_params ),
+        "Error calculatin mean and variance from raster 1" );      
+      TEAGN_TRUE_OR_RETURN( getMeanAndVarianceThreadEntry( t2_params ),
+        "Error calculatin mean and variance from raster 2" );         
+    }
+    
+    TEAGN_DEBUG_CONDITION( ( mean_vector_raster1.size() == channels1.size() ),
+      "Invalid mean vector size" )
+    TEAGN_DEBUG_CONDITION( ( mean_vector_raster2.size() == channels2.size() ),
+      "Invalid mean vector size" )
+
+    TEAGN_DEBUG_CONDITION( ( variance_vector_raster1.size() == channels1.size() ),
+      "Invalid variance vector size" )
+    TEAGN_DEBUG_CONDITION( ( variance_vector_raster2.size() == channels1.size() ),
+      "Invalid variance vector size" )
+  
+    /* Creating a new raster2 */
+      
+    TePDITypes::TePDIRasterPtrType new_input_raster2;
+    
+    TeRasterParams new_input_raster2_params = input_raster2->params();
+    new_input_raster2_params.nBands( channels2.size() );
+    if( forced_dummy ) {
+      new_input_raster2_params.setDummy( dummy_value, -1 );      
+    } else {
+      if( input_raster2->params().useDummy_ ) {
+        new_input_raster2_params.setDummy( 
+          input_raster2->params().dummy_[ 0 ], -1 );
+      }
+    }
+    
+    TEAGN_TRUE_OR_RETURN( TePDIUtils::TeAllocRAMRaster( new_input_raster2,
+      input_raster2->params(), TePDIUtils::TePDIUtilsAutoMemPol ), 
+      "Unable to allocate the new equalized raster2" );
+      
+    /* Equalizing data */
+        
+    std::vector< int > new_channels2;
+        
+    for( unsigned int channels_index = 0 ; 
+      channels_index < channels2.size() ; ++channels_index ) {
+      
+      TePDIParameters contra_params;
+      contra_params.SetParameter( "contrast_type",
+        TePDIContrast::TePDIContrastStat );
+      contra_params.SetParameter( "input_image", input_raster2 );
+      contra_params.SetParameter( "input_band", 
+        channels2[ channels_index] );
+      contra_params.SetParameter( "target_mean", 
+        mean_vector_raster1[ channels_index ] );
+      contra_params.SetParameter( "target_variance", 
+        variance_vector_raster1[ channels_index ] );
+      contra_params.SetParameter( "input_mean", 
+        mean_vector_raster2[ channels_index ] );
+      contra_params.SetParameter( "input_variance", 
+        variance_vector_raster2[ channels_index ] );        
+      contra_params.SetParameter( "output_image", new_input_raster2 );
+      contra_params.SetParameter( "output_band", (int)channels_index );
+      contra_params.SetParameter( "restrict_out_reset", (int)1 );
+      if( forced_dummy ) {
+        contra_params.SetParameter( "dummy_value", dummy_value );
+      }
+      if( forced_dummy ) {
+        contra_params.SetParameter( "dummy_value", dummy_value );
+      } else {
+        if( input_raster2->params().useDummy_ ) {
+          contra_params.SetParameter( "dummy_value", 
+            input_raster2->params().dummy_[ 0 ] );
+        }
+      }      
+        
+      TePDIContrast contra_instance;
+      TEAGN_TRUE_OR_RETURN( contra_instance.Reset( contra_params ),
+        "TePDIContrast reset error" );
+      TEAGN_TRUE_OR_RETURN( contra_instance.Apply(),
+        "TePDIContrast apply error" );            
+        
+      new_channels2.push_back( channels_index );
+    }        
+     
+    params_.SetParameter( "input_raster2", new_input_raster2 );
+    params_.SetParameter( "channels2", new_channels2 );  
+  }
+  
+  return true;
+}
+
+
+bool TePDIBlending::resetOuputRaster()
+{
+  TePDITypes::TePDIRasterPtrType input_raster1;
+  params_.GetParameter( "input_raster1", input_raster1 );
+  
+  TePDITypes::TePDIRasterPtrType input_raster2;
+  params_.GetParameter( "input_raster2", input_raster2 );  
+  
+  TePDITypes::TePDIRasterPtrType output_raster;
+  params_.GetParameter( "output_raster", output_raster );  
+  
+  TePDITypes::TePDIPolygonPtrType raster1_pol_ptr;
+  params_.GetParameter( "raster1_pol_ptr", raster1_pol_ptr );
+  TePolygon& raster1_polygon = ( *raster1_pol_ptr );
+
+  TePDITypes::TePDIPolygonPtrType raster2_pol_ptr;
+  params_.GetParameter( "raster2_pol_ptr", raster2_pol_ptr );
+  TePolygon& raster2_polygon = ( *raster2_pol_ptr );
+  
+  std::vector< int > channels1;
+  params_.GetParameter( "channels1", channels1 );  
+  
+  double raster2_pol_offset_x = 0;
+  params_.GetParameter( "raster2_pol_offset_x", raster2_pol_offset_x );
+
+  double raster2_pol_offset_y = 0;
+  params_.GetParameter( "raster2_pol_offset_y", raster2_pol_offset_y );  
+  
+  /* Dumyy value definition */
+ 
+  bool output_raster_uses_dummy = output_raster->params().useDummy_;
+  double output_raster_dummy = 0;
+  
+  if( output_raster_uses_dummy ) {
+    output_raster_dummy = output_raster->params().dummy_[ 0 ];
+  }
+  
+  if( params_.CheckParameter< double >( "dummy_value" ) ) {
+    
+    params_.GetParameter( "dummy_value", output_raster_dummy );
+    
+    output_raster_uses_dummy = true;
+  }  
+  
+  /* Building raster 2 polygon - reference raster1 */
+  
+  TePolygon raster2_polygon_ref1;
+  {
+    TePolygon raster2_polygon_indexed_ref2;
+    TePDIUtils::MapCoords2RasterIndexes( raster2_polygon,
+      input_raster2, raster2_polygon_indexed_ref2 );
+        
+    double r2_min_x = 
+      MIN( raster2_polygon_indexed_ref2.box().x1(),
+      raster2_polygon_indexed_ref2.box().x2() );
+    double r2_min_y = 
+      MIN( raster2_polygon_indexed_ref2.box().y1(),
+      raster2_polygon_indexed_ref2.box().y2() ); 
+     
+    for( unsigned int lr_index = 0 ; 
+      lr_index < raster2_polygon_indexed_ref2.size() ; ++lr_index ) {
+      for( unsigned int c2d_index = 0 ; 
+        c2d_index < raster2_polygon_indexed_ref2[ lr_index ].size() ; 
+        ++c2d_index ) {
+          
+        raster2_polygon_indexed_ref2[ lr_index ][ c2d_index ].x( 
+          raster2_polygon_indexed_ref2[ lr_index ][ c2d_index ].x() +
+          raster2_pol_offset_x - r2_min_x );
+        raster2_polygon_indexed_ref2[ lr_index ][ c2d_index ].y( 
+          raster2_polygon_indexed_ref2[ lr_index ][ c2d_index ].y() +
+          raster2_pol_offset_y - r2_min_y );
+      }
+    }
+  
+    TePDIUtils::MapRasterIndexes2Coords( raster2_polygon_indexed_ref2,
+      input_raster1, raster2_polygon_ref1 );
+  }  
+
+  /* Reseting output raster */
+  
+  TeBox global_box_ref1 = raster1_polygon.box();
+  updateBox( global_box_ref1, raster2_polygon_ref1.box() );
+  
+  TeRasterParams output_raster_params = output_raster->params();
+  
+  output_raster_params.nBands( channels1.size() );
+  if( input_raster1->projection() != 0 ) {
+    TeSharedPtr< TeProjection > proj( TeProjectionFactory::make( 
+      input_raster1->projection()->params() ) );  
+    output_raster_params.projection( proj.nakedPointer() );
+  }
+  output_raster_params.boxResolution( global_box_ref1.x1(), 
+    global_box_ref1.y1(), global_box_ref1.x2(), global_box_ref1.y2(), 
+    input_raster1->params().resx_, input_raster1->params().resy_ );
+  if( output_raster_uses_dummy ) {
+    output_raster_params.setDummy( output_raster_dummy, -1 );
+  } else {
+    output_raster_params.useDummy_ = false;
+  }
+  output_raster_params.setPhotometric( TeRasterParams::TeMultiBand );
+     
+  TEAGN_TRUE_OR_RETURN( output_raster->init( output_raster_params ),
+    "Output raster reset error" );  
+    
+  return true;
+}
+
+
+bool TePDIBlending::extractPolygons( const TePDIParameters& params, 
+  TePolygon& new_raster1_pol_ref1, TePolygon& new_raster2_pol_ref1, 
+  TePolygon& inter_pol_ref1, TePolygon& inter_pol_ref2,
+  short& relation, double& raster1_rel_index_offset_x,
+  double& raster1_rel_index_offset_y, double& raster2_rel_index_offset_x,
+  double& raster2_rel_index_offset_y )
+{
+  new_raster1_pol_ref1.clear();
+  new_raster2_pol_ref1.clear();
+  inter_pol_ref1.clear();
+  inter_pol_ref2.clear();
+  
+  /* Extracting the used parameter */
+  
+  TePDITypes::TePDIRasterPtrType input_raster1;
+  TEAGN_TRUE_OR_THROW( params.GetParameter( "input_raster1", input_raster1 ),
+    "Missing input_raster1" );
+  
+  TePDITypes::TePDIRasterPtrType input_raster2;
+  TEAGN_TRUE_OR_THROW(params.GetParameter( "input_raster2", input_raster2 ),
+    "Missing input_raster2" );  
+
+  TePDITypes::TePDIRasterPtrType output_raster;
+  TEAGN_TRUE_OR_THROW(params.GetParameter( "output_raster", output_raster ),
+    "Missing output_raster" ); 
+     
+  TePDITypes::TePDIPolygonPtrType raster1_pol_ptr;
+  TEAGN_TRUE_OR_THROW(params.GetParameter( "raster1_pol_ptr", 
+    raster1_pol_ptr ), "Missing raster1_pol_ptr" ); 
+  TePolygon& raster1_polygon = ( *raster1_pol_ptr ); 
+  
+  TePDITypes::TePDIPolygonPtrType raster2_pol_ptr;
+  TEAGN_TRUE_OR_THROW(params.GetParameter( "raster2_pol_ptr", 
+    raster2_pol_ptr ), "Missing raster2_pol_ptr" );  
+  TePolygon& raster2_polygon = ( *raster2_pol_ptr );
+  
+  double raster2_pol_offset_x = 0;
+  TEAGN_TRUE_OR_THROW(params.GetParameter( "raster2_pol_offset_x", 
+    raster2_pol_offset_x ), "Missing raster2_pol_offset_x" );  
+
+  double raster2_pol_offset_y = 0;
+  TEAGN_TRUE_OR_THROW(params.GetParameter( "raster2_pol_offset_y", 
+    raster2_pol_offset_y ), "Missing raster2_pol_offset_y" );
+
+  /* Raster1 positioning */
+  
+  double raster1_abs_index_offset_x = 0;/* related to output raster indexes */
+  double raster1_abs_index_offset_y = 0;/* related to output raster indexes */
+  {
+    TeBox pol1_box_indexed;
+    TePDIUtils::MapCoords2RasterIndexes( raster1_polygon.box(),
+      input_raster1, pol1_box_indexed );
+          
+    double r1_min_x_index_ref1 = MIN( pol1_box_indexed.x1(),
+      pol1_box_indexed.x2() );
+    double r1_min_y_index_ref1 = MIN( pol1_box_indexed.y1(),
+      pol1_box_indexed.y2() );      
+
+    TeCoord2D r1_UL_ref1_indexed( r1_min_x_index_ref1, r1_min_y_index_ref1 );  
+    TeCoord2D r1_UL_ref1( input_raster1->index2Coord( r1_UL_ref1_indexed ) );  
+    TeCoord2D r1_UL_refout_indexed( output_raster->coord2Index( r1_UL_ref1 ) );
+    
+    /* Calculating the absolute offset betweeen input raster1 and output raster
+       following output raster indexed units */    
+        
+    raster1_abs_index_offset_x = r1_UL_refout_indexed.x();  
+    raster1_abs_index_offset_y = r1_UL_refout_indexed.y();
+    
+    /* Calculating the relative offset betweeen input raster1 and output raster
+       following output raster indexed units */    
+      
+    raster1_rel_index_offset_x = r1_UL_ref1_indexed.x() -
+      raster1_abs_index_offset_x;
+    raster1_rel_index_offset_y = r1_UL_ref1_indexed.y() -
+      raster1_abs_index_offset_y;
+  }
+  
+  /* Raster2 positioning */
+  
+  TePolygon r2_pol_refout;
+  {
+    TePolygon r2_pol_ref2_indexed;
+    TePDIUtils::MapCoords2RasterIndexes( raster2_polygon,
+      input_raster2, r2_pol_ref2_indexed );
+      
+    double r2_min_x = MIN( r2_pol_ref2_indexed.box().x1(),
+      r2_pol_ref2_indexed.box().x2() );
+    double r2_min_y = MIN( r2_pol_ref2_indexed.box().y1(),
+      r2_pol_ref2_indexed.box().y2() );
+  
+    raster2_rel_index_offset_x = r2_min_x - raster1_abs_index_offset_x -
+      raster2_pol_offset_x;
+    raster2_rel_index_offset_y = r2_min_y - raster1_abs_index_offset_y -
+      raster2_pol_offset_y;
+      
+    TePolygon r2_pol_refout_indexed = r2_pol_ref2_indexed;
+        
+    for( unsigned int lr_index = 0 ; 
+      lr_index < r2_pol_refout_indexed.size() ; ++lr_index ) {
+      for( unsigned int c2d_index = 0 ; 
+        c2d_index < r2_pol_refout_indexed[ lr_index ].size() ; 
+        ++c2d_index ) {
+            
+        r2_pol_refout_indexed[ lr_index ][ c2d_index ].x( 
+          r2_pol_refout_indexed[ lr_index ][ c2d_index ].x() -
+          r2_min_x + raster1_abs_index_offset_x + raster2_pol_offset_x );
+        r2_pol_refout_indexed[ lr_index ][ c2d_index ].y( 
+          r2_pol_refout_indexed[ lr_index ][ c2d_index ].y() -
+          r2_min_y + raster1_abs_index_offset_y + raster2_pol_offset_y );          
+      }
+    }
+    
+    TePDIUtils::MapRasterIndexes2Coords( r2_pol_refout_indexed,
+      output_raster, r2_pol_refout );
+  }
+  
+  /* Defining the new rasters polygons and the intersection polygons */
+  
+  relation = TeRelation( raster1_polygon, 
+    r2_pol_refout );
+  
+  switch( relation ) {
+    case TeEQUALS :
+    {
+      inter_pol_ref1 = raster1_polygon;
+      
+      return true;
+      break;
+    }
+    case TeDISJOINT :
+    case TeTOUCHES :
+    {
+      new_raster1_pol_ref1 = raster1_polygon;
+      new_raster2_pol_ref1 = r2_pol_refout;
+    
+      break;
+    }
+    case TeOVERLAPS:
+    {
+      TePolygonSet r1_ps;
+      r1_ps.add( raster1_polygon );
+
+      TePolygonSet r2_ps;
+      r2_ps.add( r2_pol_refout );
+      
+      /* Calculating the new raster1 polygon  - following raster1 projected 
+         coords */
+      
+      {
+        TePolygonSet ps_new;
+        
+        TEAGN_TRUE_OR_THROW( TeOVERLAY::TeDifference( r1_ps, 
+          r2_ps, ps_new ),
+            "Unable to find the new input_raster1 polygon" );
+        
+        TEAGN_TRUE_OR_THROW( ( ps_new.size() == 1 ),
+          "Invalid polygon set size" );
+          
+        new_raster1_pol_ref1 = ps_new[ 0 ];
+      }      
+      
+      /* Calculating the new raster2 polygon  - following raster1 projected 
+         coords */
+      
+      {
+        TePolygonSet ps_new;
+        
+        TEAGN_TRUE_OR_THROW( TeOVERLAY::TeDifference( r2_ps, 
+          r1_ps, ps_new ),
+            "Unable to find the new input_raster1 polygon" );
+          
+        TEAGN_TRUE_OR_THROW( ( ps_new.size() == 1 ),
+          "Invalid polygon set size" );
+          
+        new_raster2_pol_ref1 = ps_new[ 0 ];
+      }    
+      
+      /* Calculating the intersection polygon  - following raster1 projected 
+         coords */
+      
+      {
+        TePolygonSet ps_new;
+        
+        TEAGN_TRUE_OR_THROW( TeOVERLAY::TeIntersection( r1_ps, r2_ps, 
+          ps_new ), "Unable to find polygons intersection" );
+        
+        TEAGN_TRUE_OR_THROW( ( ps_new.size() == 1 ),
+          "Invalid polygon set size" );
+          
+        inter_pol_ref1 = ps_new[ 0 ];
+      }
+
+      /* Calculating the intersection polygon  - following raster2 projected 
+         coords */
+            
+      {
+        TePolygon inter_pol_indexed_refout;
+        TePDIUtils::MapCoords2RasterIndexes( inter_pol_ref1,
+          output_raster, inter_pol_indexed_refout );
+          
+        for( unsigned int lr_index = 0 ; 
+          lr_index < inter_pol_indexed_refout.size() ; ++lr_index ) {
+          for( unsigned int c2d_index = 0 ; 
+            c2d_index < inter_pol_indexed_refout[ lr_index ].size() ; 
+            ++c2d_index ) {
+                
+            inter_pol_indexed_refout[ lr_index ][ c2d_index ].x( 
+              inter_pol_indexed_refout[ lr_index ][ c2d_index ].x() +
+              raster2_rel_index_offset_x );
+            inter_pol_indexed_refout[ lr_index ][ c2d_index ].y( 
+              inter_pol_indexed_refout[ lr_index ][ c2d_index ].y() +
+              raster2_rel_index_offset_y );          
+          }
+        }
+        
+        TePDIUtils::MapRasterIndexes2Coords( inter_pol_indexed_refout,
+          input_raster2, inter_pol_ref2 );        
+      }
+    
+      break;
+    }
+    case TeCONTAINS :
+    case TeCOVERS :    
+    {
+      TePolygonSet r1_ps;
+      r1_ps.add( raster1_polygon );
+
+      TePolygonSet r2_ps;
+      r2_ps.add( r2_pol_refout );
+      
+      /* Calculating the new raster1 polygon  - following raster1 projected 
+         coords */      
+          
+      {
+        TePolygonSet ps_new;
+        
+        TEAGN_TRUE_OR_THROW( TeOVERLAY::TeDifference( r1_ps, 
+          r2_ps, ps_new ),
+            "Unable to find the new input_raster1 polygon" );
+        
+        TEAGN_TRUE_OR_THROW( ( ps_new.size() == 1 ),
+          "Invalid polygon set size" );
+          
+        new_raster1_pol_ref1 = ps_new[ 0 ];
+      }
+      
+      inter_pol_ref1 = r2_pol_refout;
+      
+      /* Calculating the intersection polygon  - following raster2 projected 
+         coords */
+            
+      {
+        TePolygon inter_pol_indexed_refout;
+        TePDIUtils::MapCoords2RasterIndexes( inter_pol_ref1,
+          output_raster, inter_pol_indexed_refout );
+          
+        for( unsigned int lr_index = 0 ; 
+          lr_index < inter_pol_indexed_refout.size() ; ++lr_index ) {
+          for( unsigned int c2d_index = 0 ; 
+            c2d_index < inter_pol_indexed_refout[ lr_index ].size() ; 
+            ++c2d_index ) {
+                
+            inter_pol_indexed_refout[ lr_index ][ c2d_index ].x( 
+              inter_pol_indexed_refout[ lr_index ][ c2d_index ].x() +
+              raster2_rel_index_offset_x );
+            inter_pol_indexed_refout[ lr_index ][ c2d_index ].y( 
+              inter_pol_indexed_refout[ lr_index ][ c2d_index ].y() +
+              raster2_rel_index_offset_y );          
+          }
+        }
+        
+        TePDIUtils::MapRasterIndexes2Coords( inter_pol_indexed_refout,
+          input_raster2, inter_pol_ref2 );        
+      }   
+      
+      break;
+    }
+    case TeWITHIN :
+    case TeCOVEREDBY :
+    {
+      TePolygonSet r1_ps;
+      r1_ps.add( raster1_polygon );
+
+      TePolygonSet r2_ps;
+      r2_ps.add( r2_pol_refout );     
+      
+      /* Calculating the new raster2 polygon  - following raster1 projected 
+         coords */      
+
+      {
+        TePolygonSet ps_new;
+        
+        TEAGN_TRUE_OR_THROW( TeOVERLAY::TeDifference( r2_ps, 
+          r1_ps, ps_new ),
+            "Unable to find the new input_raster1 polygon" );
+          
+        TEAGN_TRUE_OR_THROW( ( ps_new.size() == 1 ),
+          "Invalid polygon set size" );
+          
+        new_raster2_pol_ref1 = ps_new[ 0 ];
+      }
+      
+      inter_pol_ref1 = raster1_polygon;
+      
+      /* Calculating the intersection polygon  - following raster2 projected 
+         coords */
+            
+      {
+        TePolygon inter_pol_indexed_refout;
+        TePDIUtils::MapCoords2RasterIndexes( inter_pol_ref1,
+          output_raster, inter_pol_indexed_refout );
+          
+        for( unsigned int lr_index = 0 ; 
+          lr_index < inter_pol_indexed_refout.size() ; ++lr_index ) {
+          for( unsigned int c2d_index = 0 ; 
+            c2d_index < inter_pol_indexed_refout[ lr_index ].size() ; 
+            ++c2d_index ) {
+                
+            inter_pol_indexed_refout[ lr_index ][ c2d_index ].x( 
+              inter_pol_indexed_refout[ lr_index ][ c2d_index ].x() +
+              raster2_rel_index_offset_x );
+            inter_pol_indexed_refout[ lr_index ][ c2d_index ].y( 
+              inter_pol_indexed_refout[ lr_index ][ c2d_index ].y() +
+              raster2_rel_index_offset_y );          
+          }
+        }
+        
+        TePDIUtils::MapRasterIndexes2Coords( inter_pol_indexed_refout,
+          input_raster2, inter_pol_ref2 );        
+      }       
+      
+      break;
+    }
+    default :
+    {
+      TEAGN_LOG_AND_THROW( "Invalid polygon relation" );
+      break;
+    }
+  }
+  
+  return true;
+}
+
+bool TePDIBlending::getMeanAndVarianceThreadEntry( const TeThreadParameters& pars )
+{
+  /* Retriving input parameters */
+  
+  TePDITypes::TePDIRasterPtrType input_raster;
+  TEAGN_TRUE_OR_RETURN( pars.retrive( "input_raster", input_raster ),
+    "Missing input_raster parameter" );  
+  
+  TePolygon input_pol;
+  TEAGN_TRUE_OR_RETURN( pars.retrive( "input_pol", input_pol ),
+    "Missing input_pol parameter" );
+    
+  bool progress_enabled_flag = false;
+  TEAGN_TRUE_OR_RETURN( pars.retrive( "progress_enabled_flag", 
+    progress_enabled_flag ),
+    "Missing progress_enabled_flag parameter" ); 
+    
+  std::vector< int > input_channels;   
+  TEAGN_TRUE_OR_RETURN( pars.retrive( "input_channels", 
+    input_channels ),
+    "Missing input_channels parameter" ); 
+        
+  /* Retriving output parameters */
+    
+  std::vector< double >* mean_vector_ptr = 0;
+  TEAGN_TRUE_OR_RETURN( pars.retrive( "mean_vector_ptr", mean_vector_ptr ),
+    "Missing mean_vector_ptr parameter" );
+  mean_vector_ptr->clear();
+  
+  std::vector< double >* variance_vector_ptr = 0;
+  TEAGN_TRUE_OR_RETURN( pars.retrive( "variance_vector_ptr", 
+    variance_vector_ptr ),
+    "Missing variance_vector_ptr parameter" );
+  variance_vector_ptr->clear();
+    
+  /* Generating algorithm parameters */
+    
+  TePDIParameters stat_params;
+    
+  TePDITypes::TePDIRasterVectorType rasters;
+  for( unsigned int channels_index = 0 ; 
+    channels_index < input_channels.size() ; ++channels_index ) {
+      
+    rasters.push_back( input_raster );
+  }
+  stat_params.SetParameter( "rasters", rasters );
+  
+  stat_params.SetParameter( "bands", input_channels );
+  
+  TePDITypes::TePDIPolygonSetPtrType polygonset_ptr( new TePolygonSet );
+  polygonset_ptr->add( input_pol );
+  stat_params.SetParameter( "polygonset", polygonset_ptr );
+  
+  /* Generating mean and variance vectors */
+  
+  TePDIStatistic stat_instance;
+  stat_instance.ToggleProgInt( progress_enabled_flag );
+
+  TEAGN_TRUE_OR_RETURN( stat_instance.Reset( stat_params ),
+    "TePDIStatistic reset error" );
+    
+  for( unsigned int channels_index = 0 ; 
+    channels_index < input_channels.size() ; ++channels_index ) {
+      
+    mean_vector_ptr->push_back( stat_instance.getMean( channels_index, 0 ) );
+    variance_vector_ptr->push_back( stat_instance.getVariance( channels_index, 
+      0 ) );
+  }
+  
+  return true;
+}
+
diff --git a/src/terralib/image_processing/TePDIBlending.hpp b/src/terralib/image_processing/TePDIBlending.hpp
new file mode 100755
index 0000000..327b01f
--- /dev/null
+++ b/src/terralib/image_processing/TePDIBlending.hpp
@@ -0,0 +1,197 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIBLENDING_HPP
+  #define TEPDIBLENDING_HPP
+
+  #include "TePDIAlgorithm.hpp"
+  #include "TePDIParameters.hpp"
+  
+  #include <TeSharedPtr.h>
+  #include <TeGeometry.h>
+  #include <TeThreadFunctor.h>
+
+  /**
+   * @brief This is the class for digital image blending.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup TePDIGeneralAlgoGroup
+   *
+   * @note The general required parameters:
+   * @param blending_type ( std::string ) - Blending type
+   * ( see TePDIBlendStratFactory for reference ).
+   * @param input_raster1 ( TePDITypes::TePDIRasterPtrType ) - 
+   *  Input raster 1.
+   * @param input_raster2 ( TePDITypes::TePDIRasterPtrType ) - 
+   *  Input raster 2.
+   * @param output_raster ( TePDITypes::TePDIRasterPtrType ) - Output raster.
+   * @param channels1 ( std::vector< int > ) - The channels to process from 
+   * input_raster1.
+   * @param channels2 ( std::vector< int > ) - The channels to process from 
+   * input_raster2.
+   * @param raster1_pol_ptr ( TePDITypes::TePDIPolygonPtrType ) - 
+   * Raster 1 polygon pointer ( related to
+   * input_raster1 world reference - Just 1 linear ring allowed ).
+   * @param raster2_pol_ptr ( TePDITypes::TePDIPolygonPtrType ) - 
+   * Raster 2 polygon pointer ( related to 
+   * input_raster2 world reference - Just 1 linear ring allowed ).
+   * @param raster2_pol_offset_x ( double ) - Raster 2 polygon box X offset 
+   * related to raster1 polygon box in input_raster1 matricial reference
+   * ( offset_x = pol2_x - pol1_x ).
+   * @param raster2_pol_offset_y ( double ) - Raster 2 polygon box Y offset 
+   * related to raster1 polygon box in input_raster1 matricial reference
+   * ( offset_y = pol2_y - pol1_y ). 
+   *
+   * @note The optional parameters are:
+   *
+   * @param auto_equalize ( int ) - If present ( any value ), input_raster2
+   * auto-equalizing will be made ( using overlap area reference ).
+   * @param dummy_value (double) - A dummy pixel value for use 
+   * in pixels where no data is available ( input pixels with
+   * dummy values will be ignored ).  
+   * @param enable_multi_thread (int) - If present(any value) will
+   * enable multi-threading.  
+   *
+   * @note The specific parameters: See each blending strategy for reference.
+   *
+   * @note The output_raster parameters will follow input_raster1 parameters
+   * ( box, resolution, projection ).
+   *
+   * @note All rasters will be converted to multi-band.
+   */
+  class PDI_DLL TePDIBlending : public TePDIAlgorithm {
+    public :
+    
+      /**
+       * @brief Default Constructor.
+       *
+       */
+      TePDIBlending();
+
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIBlending();
+      
+      /**
+       * @brief Checks if the supplied parameters fits the requirements of each
+       * PDI algorithm implementation.
+       *
+       * @note Error log messages must be generated. No exceptions generated.
+       *
+       * @param parameters The parameters to be checked.
+       * @return true if the parameters are OK. false if not.
+       */
+      bool CheckParameters( const TePDIParameters& parameters ) const;      
+      
+      /**
+       * @brief Calculate the polygons for rendering output image.
+       * @param params Algorithm parameters.
+       * @param new_raster1_pol_ref1 The new raster1 polygon
+       * ( reference - raster1 projected coords ).
+       * @param new_raster2_pol_ref1 The new raster2 polygon
+       * ( reference - raster1 projected coords ).
+       * @param inter_pol_ref1 The calculated intersection polygon
+       * ( reference - raster1 projected coords ).
+       * @param inter_pol_ref2 The calculated intersection polygon
+       * ( reference - raster2 projected coords ).
+       * @param relation The calculated polygons relation.
+       * @param raster1_rel_index_offset_x X offset between output and input
+       * raster 1 ( reference output_raster indexed units -> 
+       * input_x = output_x + offset ).
+       * @param raster1_rel_index_offset_y Y offset between output and input
+       * raster 1 ( reference output_raster indexed units -> 
+       * input_y = output_y + offset ).
+       * @param raster2_rel_index_offset_x X offset between output and input
+       * raster 2 ( reference output_raster indexed units -> 
+       * input_x = output_x + offset ).
+       * @param raster2_rel_index_offset_y Y offset between output and input
+       * raster 2 ( reference output_raster indexed units -> 
+       * input_y = output_y + offset ).
+       * @return true if ok, false on errors.
+       */
+      static bool extractPolygons( const TePDIParameters& params,
+        TePolygon& new_raster1_pol_ref1, TePolygon& new_raster2_pol_ref1,
+        TePolygon& inter_pol_ref1, TePolygon& inter_pol_ref2,
+        short& relation,
+        double& raster1_rel_index_offset_x,
+        double& raster1_rel_index_offset_y,
+        double& raster2_rel_index_offset_x,
+        double& raster2_rel_index_offset_y );
+
+    protected :
+    
+      /**
+       * @brief Reset the internal state to the initial state.
+       *
+       * @param params The new parameters referente at initial state.
+       */
+      void ResetState( const TePDIParameters& params );    
+     
+      /**
+       * @brief Runs the current algorithm implementation.
+       *
+       * @return true if OK. false on error.
+       */
+      bool RunImplementation();      
+
+      /**
+       * @brief Render into output raster the non-intersected areas.
+       * @param pols_relation The found raster polygons relation (output).  
+       * @return true if ok, false on errors.
+       */
+      bool renderNonIntersectedAreas( short& pols_relation );
+      
+      /**
+       * @brief Equalize the input_raster2.
+       * @return true if ok, false on errors.
+       */
+      bool equalizeInputRaster2();
+        
+      /**
+       * @brief Reset the output raster to the new geometry.
+       * @return true if ok, false on errors.
+       */
+      bool resetOuputRaster(); 
+      
+      /**
+       * @brief The mean and variance thread entry function.
+       * @param pars Thread parameters.
+       * @return true if ok, false on errors.
+       * @note The needed thread parameters are:
+       * * TePDITypes::TePDIRasterPtrType input_raster
+       * * TePolygon input_pol
+       * * bool progress_enabled_flag
+       * * std::vector< int > input_channels
+       * * std::vector< double >* mean_vector_ptr
+       * * std::vector< double >* variance_vector_ptr
+       */      
+      static bool getMeanAndVarianceThreadEntry( 
+        const TeThreadParameters& pars );
+  };
+  
+/** @example TePDIBlending_test.cpp
+ *    Shows how to use this class.
+ */    
+
+#endif
diff --git a/src/terralib/image_processing/TePDIBlendingFactory.cpp b/src/terralib/image_processing/TePDIBlendingFactory.cpp
new file mode 100755
index 0000000..c490222
--- /dev/null
+++ b/src/terralib/image_processing/TePDIBlendingFactory.cpp
@@ -0,0 +1,26 @@
+ 
+#include "TePDIBlendingFactory.hpp"
+#include "TePDIBlending.hpp"
+#include <TeAgnostic.h>
+
+
+TePDIBlendingFactory::TePDIBlendingFactory()
+: TePDIAlgorithmFactory( std::string( "TePDIBlending" ) )
+{
+};      
+
+
+TePDIBlendingFactory::~TePDIBlendingFactory()
+{
+};
+
+
+TePDIAlgorithm* TePDIBlendingFactory::build ( const TePDIParameters& arg )
+{
+  TePDIAlgorithm* instance_ptr = new TePDIBlending();
+  
+  TEAGN_TRUE_OR_THROW( instance_ptr->Reset( arg ),
+    "Invalid parameters" );
+  
+  return instance_ptr;
+}
diff --git a/src/terralib/image_processing/TePDIBlendingFactory.hpp b/src/terralib/image_processing/TePDIBlendingFactory.hpp
new file mode 100755
index 0000000..72b5812
--- /dev/null
+++ b/src/terralib/image_processing/TePDIBlendingFactory.hpp
@@ -0,0 +1,67 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIBLENDINGFACTORY_HPP
+  #define TEPDIBLENDINGFACTORY_HPP
+
+  #include <TeSharedPtr.h>
+  #include "TePDIAlgorithmFactory.hpp"
+  #include "TePDIParameters.hpp"
+  
+  /**
+   * @brief This is the class for blending algorithm factory.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIAlgorithmsFactories
+   */
+  class PDI_DLL TePDIBlendingFactory : public TePDIAlgorithmFactory
+  {
+    public :
+      
+      /**
+       * @brief Default constructor
+       */
+      TePDIBlendingFactory();      
+      
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIBlendingFactory();
+      
+      protected :  
+      /**
+       * @brief Implementation for the abstract TeFactory::build.
+       *
+       * @param arg A const reference to the parameters used by the
+       * algorithm.
+       * @return A pointer to the new generated algorithm instance.
+       */
+      TePDIAlgorithm* build( const TePDIParameters& arg );
+      
+  };
+
+  namespace {
+    static TePDIBlendingFactory TePDIBlendingFactory_instance;
+  };  
+  
+#endif
diff --git a/src/terralib/image_processing/TePDIBlendingStrategy.cpp b/src/terralib/image_processing/TePDIBlendingStrategy.cpp
new file mode 100755
index 0000000..d4cc0ef
--- /dev/null
+++ b/src/terralib/image_processing/TePDIBlendingStrategy.cpp
@@ -0,0 +1,22 @@
+#include "TePDIBlendingStrategy.hpp"
+#include <TeAgnostic.h>
+
+
+TePDIBlendingStrategy::TePDIBlendingStrategy()
+{
+};      
+
+
+TePDIBlendingStrategy::~TePDIBlendingStrategy()
+{
+};
+
+
+TePDIBlendingStrategy* TePDIBlendingStrategy::DefaultObject( 
+  const TePDIParameters& )
+{
+  TEAGN_LOG_AND_THROW( 
+    "Trying to build an invalid blending strategy instance" );
+  return 0; 
+}
+
diff --git a/src/terralib/image_processing/TePDIBlendingStrategy.hpp b/src/terralib/image_processing/TePDIBlendingStrategy.hpp
new file mode 100755
index 0000000..4f1c9e1
--- /dev/null
+++ b/src/terralib/image_processing/TePDIBlendingStrategy.hpp
@@ -0,0 +1,71 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIBLENDINGSTRATEGY_HPP
+  #define TEPDIBLENDINGSTRATEGY_HPP
+
+  #include "TePDIStrategy.hpp"
+
+  /**
+   * @brief This is the base class for blending strategies.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIStrategies
+   */
+  class PDI_DLL TePDIBlendingStrategy : public TePDIStrategy {
+    public:
+      /** @typedef TeSharedPtr< TePDIBlendingStrategy > pointer 
+          Type definition for a instance pointer */
+      typedef TeSharedPtr< TePDIBlendingStrategy > pointer;
+      
+      /** @typedef const TeSharedPtr< TePDIBlendingStrategy > const_pointer 
+          Type definition for a const instance pointer */
+      typedef const TeSharedPtr< TePDIBlendingStrategy > const_pointer;  
+      
+      /**
+       * @brief Default Destructor
+       */
+      virtual ~TePDIBlendingStrategy();      
+      
+      /**
+       * @brief Returns a default object.
+       *
+       * @return A default object.
+       */
+      static TePDIBlendingStrategy* DefaultObject( const TePDIParameters& );
+      
+    protected :
+      
+      /**
+       * @brief Default constructor
+       *
+       * @param factoryName Factory name.
+       */
+      TePDIBlendingStrategy();        
+  
+  };
+  
+#endif
+
+
+
diff --git a/src/terralib/image_processing/TePDIBufferedFilter.cpp b/src/terralib/image_processing/TePDIBufferedFilter.cpp
new file mode 100755
index 0000000..49c9daf
--- /dev/null
+++ b/src/terralib/image_processing/TePDIBufferedFilter.cpp
@@ -0,0 +1,173 @@
+#include "TePDIBufferedFilter.hpp"
+
+#include <TeAgnostic.h>
+
+TePDIBufferedFilter::TePDIBufferedFilter()
+{
+  init_conv_buf();
+  init_maskmatrix();
+}
+
+
+TePDIBufferedFilter::~TePDIBufferedFilter()
+{
+  reset_conv_buf( 0, 0 );
+  TePDIFilterMask::deleteWeightsMatrix( temp_maskmatrix_, temp_maskmatrix_lines_ );
+}
+
+
+void TePDIBufferedFilter::ResetState( const TePDIParameters& params )
+{
+  TePDIParameters dummy_params = params;
+
+  reset_conv_buf( 0, 0 );
+  TePDIFilterMask::deleteWeightsMatrix( temp_maskmatrix_, temp_maskmatrix_lines_ );
+}
+
+
+void TePDIBufferedFilter::init_conv_buf()
+{
+  conv_buf_ = 0;
+  conv_buf_lines_ = 0;
+  conv_buf_columns_ = 0;
+}
+
+
+void TePDIBufferedFilter::init_maskmatrix()
+{
+  temp_maskmatrix_ = 0;
+  temp_maskmatrix_lines_ = 0;
+  temp_maskmatrix_columns_ = 0;
+}
+
+
+void TePDIBufferedFilter::reset_conv_buf( unsigned int lines, unsigned int columns )
+{
+  if( conv_buf_ != 0 ) {
+    for( unsigned int line = 0 ; line < conv_buf_lines_ ; ++line ) {
+      delete[] conv_buf_[ line ];
+    }
+
+    delete[] conv_buf_;
+
+    conv_buf_ = 0;
+    conv_buf_lines_ = 0;
+    conv_buf_columns_ = 0;
+  }
+
+  if( ( lines > 0 ) && ( columns > 0 ) ) {
+    conv_buf_ = new double*[ lines ];
+
+    TEAGN_TRUE_OR_THROW( conv_buf_ != 0, "Memory allocation error" );
+
+    for( unsigned int line = 0 ; line < lines ; ++line ) {
+      conv_buf_[ line ] = new double[ columns ];
+
+      TEAGN_TRUE_OR_THROW( conv_buf_[ line ] != 0, "Memory allocation error" );
+    }
+
+    conv_buf_lines_ = lines;
+    conv_buf_columns_ = columns;
+  }
+}
+
+
+void TePDIBufferedFilter::up_conv_buf( TePDITypes::TePDIRasterPtrType& inRaster,
+  unsigned int line, unsigned int band )
+{
+  TEAGN_DEBUG_CONDITION( inRaster.isActive(), "Inactive pointer" );
+  
+  TeRaster* inRaster_nptr = inRaster.nakedPointer();
+
+  TEAGN_DEBUG_CONDITION( ( inRaster_nptr->params().nlines_ > (int)line ),
+    "Trying to get a non existent line from raster" );
+  TEAGN_DEBUG_CONDITION( ( inRaster_nptr->params().ncols_ == 
+    (int)conv_buf_columns_ ),
+    "Buffer columns number not equal to raster columns" );
+  TEAGN_DEBUG_CONDITION( ( (int)band < inRaster_nptr->params().nBands() ),
+    "Invalid Band" );
+    
+  bool dummy_used = inRaster_nptr->params().useDummy_;
+  double dummy_value = 0;
+  if( dummy_used ) {
+    dummy_value = inRaster_nptr->params().dummy_[ band ];
+  }
+
+  /* Buffer roll up */
+
+  conv_buf_roolup( 1 );
+
+  /* Updating the last line */
+
+  unsigned int conv_buf_last_line = conv_buf_lines_ - 1;
+
+  for( unsigned int bufcolumn = 0 ; bufcolumn < conv_buf_columns_ ; ++bufcolumn ) {
+    if( ! inRaster_nptr->getElement( bufcolumn, line,
+        conv_buf_[ conv_buf_last_line ][ bufcolumn ], band ) ) {
+        
+      TEAGN_TRUE_OR_THROW( dummy_used, "Unable to read from input raster" );
+      
+      conv_buf_[ conv_buf_last_line ][ bufcolumn ] = dummy_value;
+    }
+  }
+}
+
+
+void TePDIBufferedFilter::reset_maskmatrix( TePDIFilterMask::pointer& mask )
+{
+  TePDIFilterMask::deleteWeightsMatrix( temp_maskmatrix_, temp_maskmatrix_lines_ );
+
+  temp_maskmatrix_ = mask->getWeightsMatrix();
+  temp_maskmatrix_lines_ = mask->lines();
+  temp_maskmatrix_columns_ = mask->columns();
+}
+
+
+void TePDIBufferedFilter::conv_buf_estatistics( unsigned int start_line,
+  unsigned int start_column, unsigned int width, unsigned int height, double& mean,
+  double& variance )
+{
+  TEAGN_DEBUG_CONDITION( ( conv_buf_lines_ >= ( start_line + height ) ),
+    "Invalid convolution buffer lines" );
+  TEAGN_DEBUG_CONDITION( ( conv_buf_columns_ >= ( start_column + width ) ),
+    "Invalid convolution buffer columns" );
+
+  mean = 0;
+  variance = 0;
+
+  unsigned int line_bound = start_line + height;
+  unsigned int column_bound = start_column + width;
+  double buf_value;
+
+  for( unsigned int line = start_line ; line < line_bound ; ++line ) {
+    for( unsigned int column = start_column ; column < column_bound ; ++column ) {
+      buf_value = conv_buf_[ line ][ column ];
+      mean += buf_value;
+      variance += ( buf_value * buf_value );
+    }
+  }
+
+  mean =  mean / ((double)width)  / ((double)height);
+  variance = ( variance / ((double)width) / ((double)height) ) -
+             ( mean * mean );
+}
+
+
+void TePDIBufferedFilter::conv_buf_roolup( unsigned int count )
+{
+  TEAGN_DEBUG_CONDITION( ( conv_buf_lines_ > 0 ), "Invalid convolution buffer lines" );
+
+  double* first_buf_line_ptr;
+  unsigned int conv_buf_last_line = conv_buf_lines_ - 1;
+  unsigned int bufline;
+
+  for( unsigned int cur_count = 0 ; cur_count < count ; ++cur_count ) {
+    first_buf_line_ptr = conv_buf_[ 0 ];
+
+    for( bufline = 1 ; bufline < conv_buf_lines_ ; ++bufline ) {
+      conv_buf_[ bufline - 1 ] = conv_buf_[ bufline ];
+    }
+
+    conv_buf_[ conv_buf_last_line ] = first_buf_line_ptr;
+  }
+}
diff --git a/src/terralib/image_processing/TePDIBufferedFilter.hpp b/src/terralib/image_processing/TePDIBufferedFilter.hpp
new file mode 100755
index 0000000..1de293d
--- /dev/null
+++ b/src/terralib/image_processing/TePDIBufferedFilter.hpp
@@ -0,0 +1,152 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIBUFFEREDFILTER_HPP
+  #define TEPDIBUFFEREDFILTER_HPP
+
+  #include "TePDIAlgorithm.hpp"
+  #include "TePDIParameters.hpp"
+  #include "TePDITypes.hpp"
+  #include "TePDIFilterMask.hpp"
+  #include <TeSharedPtr.h>
+
+  /**
+   * @brief This is the base class for buffer based filters.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup TePDIFiltersGroup
+   */
+  class PDI_DLL TePDIBufferedFilter : public TePDIAlgorithm {
+    public :
+      /** @typedef Type definition for a instance pointer */
+      typedef TeSharedPtr< TePDIBufferedFilter > pointer;
+      /** @typedef Type definition for a const instance pointer */
+      typedef const TeSharedPtr< TePDIBufferedFilter > const_pointer;
+
+      /**
+       * @brief Default Destructor
+       */
+      virtual ~TePDIBufferedFilter();
+
+    protected :
+      /**
+       * @brief Convolution Buffer.
+       */
+      double** conv_buf_;
+
+      /**
+       * @brief Convolution Buffer lines.
+       */
+      unsigned int conv_buf_lines_;
+
+      /**
+       * @brief Convolution Buffer columns.
+       */
+      unsigned int conv_buf_columns_;
+
+      /**
+       * @brief Temporary representation of filter masks.
+       */
+      double** temp_maskmatrix_;
+
+      /**
+       * @brief Number of lines of the temporary representation of filter masks.
+       */
+      unsigned int temp_maskmatrix_lines_;
+
+      /**
+       * @brief Number of columns of the temporary representation of filter masks.
+       */
+      unsigned int temp_maskmatrix_columns_;
+
+      /**
+       * @brief Default Constructor.
+       *
+       */
+      TePDIBufferedFilter();
+
+      /**
+       * @brief Reset the internal state to the initial state.
+       *
+       * @param params The new parameters referente at initial state.
+       */
+      virtual void ResetState( const TePDIParameters& params );
+
+      /**
+       * @brief Initiates the convolution buffer.
+       */
+      void init_conv_buf();
+
+      /**
+       * @brief Initiates the internal filter mask matrix representation.
+       */
+      void init_maskmatrix();
+
+      /**
+       * @brief Resets the convolution buffer.
+       *
+       * @param lines Convolution buffer lines.
+       * @param columns Convolution buffer columns.
+       */
+      void reset_conv_buf( unsigned int lines, unsigned int columns );
+
+      /**
+       * @brief Resets the internal filter mask matrix representation..
+       *
+       * @param mask The new filter Mask.
+       */
+      void reset_maskmatrix( TePDIFilterMask::pointer& mask );
+
+      /**
+       * @brief Updates the convolution buffer with a new raster line.
+       *
+       * @param inRaster Input Raster.
+       * @param line Raster line.
+       * @param band Raster band.
+       */
+      void up_conv_buf( TePDITypes::TePDIRasterPtrType& inRaster, unsigned int line,
+        unsigned int band );
+
+      /**
+       * @brief Generates statistics of a suplied window inside the convolution buffer.
+       *
+       * @param start_line Convolution buffer start line.
+       * @param start_column Convolution buffer start column.
+       * @param width Window width.
+       * @param height Window height.
+       * @param mean Mean.
+       * @param variance variance.
+       */
+      void conv_buf_estatistics( unsigned int start_line, unsigned int start_column,
+        unsigned int width, unsigned int height, double& mean, double& variance );
+
+      /**
+       * @brief Rools up the convolution buffer count lines.
+       *
+       * @param count Count times to rool convolution buffer.
+       */
+      void conv_buf_roolup( unsigned int count );
+
+  };
+
+#endif //TEPDIBUFFEREDFILTER_HPP
diff --git a/src/terralib/image_processing/TePDICluster.cpp b/src/terralib/image_processing/TePDICluster.cpp
new file mode 100755
index 0000000..2e5b95a
--- /dev/null
+++ b/src/terralib/image_processing/TePDICluster.cpp
@@ -0,0 +1,349 @@
+#include "TePDICluster.hpp"
+
+#include <iostream>
+
+using namespace std;
+
+TePDICluster::TePDICluster(int nBands) : nbands(nBands), nElems(0)
+{
+  mean.clear();
+  variance.clear();
+  eVec.clear();
+  e2Vec.clear();
+
+  for(int i = 0; i < nbands; ++i)
+  {
+    mean.push_back(0);
+    variance.push_back(0);
+    eVec.push_back(0);
+    e2Vec.push_back(0);
+  }
+}
+
+TePDICluster::~TePDICluster()
+{
+}
+
+// Assignment operator
+const TePDICluster& TePDICluster::operator=(const TePDICluster& clu)
+{
+  id = clu.id;
+  nbands = clu.nbands;
+  area = clu.area;
+  nreg = clu.nreg;
+  mean.reserve(nbands);
+  covar = clu.covar;
+  lu = clu.lu;
+  lndet = clu.lndet;
+  initialized = clu.initialized;
+  nElems = clu.nElems;
+
+  for(int i = 0; i < nbands; i++)
+  {
+    mean.push_back(clu.mean[i]);
+  variance.push_back(clu.variance[i]);
+  eVec.push_back(clu.eVec[i]);
+  e2Vec.push_back(clu.e2Vec[i]);
+  }
+
+  return (*this);
+}
+
+// equal operator
+bool TePDICluster::operator==(TePDICluster clu)
+{
+  bool r = true;
+
+  r = r && (id == clu.id);
+  r = r && (nbands == clu.nbands);
+  r = r && (area == clu.area);
+  r = r && (nreg == clu.nreg);
+  r = r && (covar == clu.covar);
+  r = r && (lu == clu.lu);
+  r = r && (lndet == clu.lndet);
+  r = r && (initialized == clu.initialized);
+
+  for(int i = 0; i < nbands; i++)
+    r = r && (mean[i] == clu.mean[i]);
+
+  return r;
+}
+
+// Initialize cluster with its identifier and with statistics
+bool TePDICluster::Init(int ident, TePDIRegion reg)
+{
+  if(ident <= 0)
+    return false;
+
+  id = ident;
+  nbands = reg.GetNban();
+  area = (long) reg.GetArea();
+  nreg = 1;
+  mean.reserve(nbands);
+  mean = reg.GetMean();
+  initialized = true;
+
+  TEAGN_TRUE_OR_RETURN(covar.Init(nbands, nbands, 0.0), "Problem initializing covar Matrix");
+  covar = reg.GetCovar();
+  if(!covar.Initialized())
+    return false;
+  lndet = covar.Determinant();
+  lndet = ((lndet > 0.0) ? log(lndet) : 0.0);
+  if (!covar.CholeskyDecomp(lu))
+    lu.Init(nbands, 1.0);
+
+  return true;
+}
+
+// Add a region statistics to the cluster.
+bool TePDICluster::AddRegion(TePDIRegion reg)
+{
+  if(id <= 0)
+    return false;
+  if(nbands != reg.GetNban())
+    return false;
+
+  for(int i1 = 0; i1 < nbands; i1++)
+    mean[i1] = (mean[i1] * area + reg.Mean(i1) * reg.GetArea()) / (area + reg.GetArea());
+  area += reg.GetArea();
+  nreg++;
+
+  return true;
+}
+
+// Compute the Mahalanobis distance between the center of a region and the current cluster
+double TePDICluster::Distance(TePDIRegion reg)
+{
+  if (initialized == false)
+    return 100000.0;
+  if(nbands != reg.GetNban())
+    return 100000.0;
+
+
+  // Spring Method
+  double  dist = 0.0,
+      soma = 0.0;
+
+  for(int ban = 0; ban < nbands; ban++)
+  {
+    soma = 0.0;
+    for(int ban1 = 0; ban1 <= ban; ban1++)
+      soma += (mean[ban1] - reg.Mean(ban1)) * lu(ban, ban1);
+    dist += soma * soma;
+  }
+
+/*
+  // Hot method
+  TeMatrix  term_1, 
+        term_2, 
+        inverse, 
+        result, 
+        tmp;
+  double  dist = 0.0;
+
+  term_1.Init(1, nbands, 0.0);
+  term_2.Init(nbands, 1, 0.0);
+  inverse.Init(nbands, nbands, 0.0);
+  result.Init(1, 1, 0.0);
+  tmp.Init(nbands, 1, 0.0);
+
+  covar.Inverse(inverse);
+  for (int b = 0; b < nbands; b++)
+    term_1(0, b) = mean[b] - reg.Mean(b);
+  term_1.Transpose(term_2);
+  tmp = inverse * term_2;
+  result = term_1 * tmp;
+  dist = sqrt(result(0, 0));
+*/
+  return dist;
+}
+
+// Compute the Mahalanobis distance between the center of a cluster and the current cluster
+double TePDICluster::Distance(TePDICluster clu)
+{
+  if((initialized == false) || (clu.initialized == false))
+    return 100000.0;
+  if(nbands != clu.GetNban())
+    return 100000.0;
+
+  // Spring method
+  double  dist = 0.0,
+      sum = 0.0;
+
+  for(int ban = 0; ban < nbands; ban++)
+  {
+    sum = 0.0;
+    for(int ban1 = 0; ban1 <= ban; ban1++)
+      sum += (mean[ban1] - clu.mean[ban1]) * lu(ban, ban1);
+    dist += sum * sum;
+  }
+
+/*
+  // Hot Method
+  TeMatrix  term_1, 
+        term_2, 
+        inverse, 
+        result, 
+        tmp;
+  double  dist = 0.0;
+
+  term_1.Init(1, nbands, 0.0);
+  term_2.Init(nbands, 1, 0.0);
+  inverse.Init(nbands, nbands, 0.0);
+  result.Init(1, 1, 0.0);
+  tmp.Init(nbands, 1, 0.0);
+
+  covar.Inverse(inverse);
+  for (int b = 0; b < nbands; b++)
+    term_1(0, b) = mean[b] - clu.Mean(b);
+  term_1.Transpose(term_2);
+  tmp = inverse * term_2;
+  result = term_1 * tmp;
+  dist = sqrt(result(0, 0));
+*/
+  return dist;
+}
+
+// Returns the mean value.
+double TePDICluster::Mean(int ind)
+{
+  if (ind < nbands && ind >= 0)
+    return mean[ind];
+  return 0.0;
+}
+
+void TePDICluster::Merge(TePDICluster clu)
+{
+  for( int ban = 0; ban < nbands; ban++ )
+    mean[ban] = (mean[ban] * area + clu.mean[ban] * clu.area) / (area + clu.area);
+  if(area < clu.area)
+  {
+    lu = clu.lu;
+    covar = clu.covar;
+    lndet = clu.lndet;
+  }
+  nreg += clu.nreg;
+}
+
+void TePDICluster::add( vector<double> pixValue )
+{
+  for(int i = 0 ; i < nbands; i++ )
+  {
+    eVec[i]  += pixValue[i];
+    e2Vec[i] += pixValue[i]*pixValue[i];
+  }
+  
+  ++nElems;
+}
+
+double  TePDICluster::dist( vector<double> pixValue )const
+{
+  double dist = 0;
+  double diff = 0;
+  
+  for(int i = 0 ; i < nbands; i++ )
+  {
+    diff = pixValue[i] - mean[i];
+    dist += diff * diff;
+  }
+
+  return dist;
+}
+
+double TePDICluster::getVariance( int ind )const
+{
+  return variance[ind];
+}
+
+double TePDICluster::maxVar()const
+{
+  if( nElems <= 1 )
+    return 0;
+
+  double maxvar = 0;
+  
+  for(int i = 0 ; i < nbands; i++ )
+  {
+    if( variance[i] > maxvar )
+    {
+      maxvar = variance[i];
+    }
+  }
+
+  return maxvar;
+}
+
+int TePDICluster::maxVarBand()const
+{
+  if( nElems <= 1 )
+    return 0;
+
+  double maxvar = 0;
+  int ind = -1;
+  for(int i = 0 ; i < nbands; i++ )
+  {
+    if( variance[i] > maxvar )
+    {
+      maxvar = variance[i];
+      ind = i;
+    }
+  }
+
+  return ind;
+}
+
+void TePDICluster::resetCount()
+{
+  nElems = 0;
+  for(int i = 0 ; i < nbands; i++ )
+  {
+    eVec[i] = 0;
+    e2Vec[i] = 0;
+  }
+}
+
+void TePDICluster::updateStatistics()
+{
+  for(int i = 0 ; i < nbands; i++ )
+  {
+    double e2 = e2Vec[i] /(double)nElems;
+    double e  = eVec[i] /(double)nElems;
+    variance[i]  = nElems > 0 ? e2 - e * e : 0;
+    mean[i] = nElems > 0 ? e : 0; 
+  }
+}
+
+TePDICluster TePDICluster::splitLeft()const
+{
+  int band = maxVarBand();
+  if( band < 0 )
+    return TePDICluster(0);
+
+  TePDICluster result(*this);
+  result.mean[band] = mean[band] - sqrt(variance[band]);
+  result.resetCount();
+  return result;
+}
+
+TePDICluster TePDICluster::splitRight()const
+{
+  int band = maxVarBand();
+  if( band < 0 )
+    return TePDICluster(0);
+
+  TePDICluster result(*this);
+  result.mean[band] = mean[band] + sqrt(variance[band]);
+  result.resetCount();
+  return result;
+}
+
+void TePDICluster::clear()
+{
+  nbands = 0;
+  nElems = 0;
+  
+  mean.clear();
+  variance.clear();
+  eVec.clear();
+  e2Vec.clear();
+}
diff --git a/src/terralib/image_processing/TePDICluster.hpp b/src/terralib/image_processing/TePDICluster.hpp
new file mode 100755
index 0000000..d580b65
--- /dev/null
+++ b/src/terralib/image_processing/TePDICluster.hpp
@@ -0,0 +1,285 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDICLUSTER_HPP
+  #define TEPDICLUSTER_HPP
+  
+#include "TePDIRegion.hpp"
+#include <iostream>
+#include <vector>
+#include <TeAgnostic.h>  
+
+using namespace std;
+
+  /**
+   * @brief This is the class for dealing with image clusters.
+   * @author Thales Sehn Korting <tkorting at dpi.inpe.br>
+   * @ingroup PDIAux
+   *
+   */
+class PDI_DLL TePDICluster
+{
+  private:
+    /**
+    * @brief identifier
+    */
+    int id;
+
+    /**
+    * @brief number of bands
+    */
+    int nbands;
+      
+  /**
+    * @brief number of bands
+    */
+    int nElems;
+
+    /**
+    * @brief number of pixels for each band
+    */
+    long area;
+
+    /**
+    * @brief Number of regions
+    */
+    long nreg;
+
+    /**
+    * @brief variance value vector
+    */
+    vector<double> variance;
+
+  /**
+    * @brief eVec ( e ) value vector (used to calculate variance)
+    */
+    vector<double> eVec;
+
+  /**
+    * @brief e2Vec (e x e) value vector (used to calculate variance)
+    */
+    vector<double> e2Vec;
+
+  /**
+    * @brief mean value vector
+    */
+    vector<double> mean;
+
+    /**
+    * @brief covariance matrix
+    */
+    TeMatrix covar;
+
+    /**
+    * @brief lu decomposition of covariance matrix
+    */
+    TeMatrix lu;
+
+    /**
+    * @brief ln of determinant of covariance matrix
+    */
+    double lndet;
+
+    /**
+    * @brief flag if the cluster was initialized
+    */
+    bool initialized;
+
+  public:
+
+    /**
+    * Default constructor
+    */
+    TePDICluster()
+    { id = 0; nbands = 0; area = 0L; lndet = 0.0; initialized = false; };
+
+    /**
+    * Alternative constructor.
+    * @param nBands The bands number.
+    */
+    TePDICluster( int nBands );
+
+    /**
+    * Default Destructor
+    */
+    ~TePDICluster();
+
+    /**
+    * Assignment operator
+    */
+    const TePDICluster& operator=( const TePDICluster& clu);
+
+    /**
+    * Equal operator
+    */
+    bool operator==(TePDICluster clu);
+
+    /**
+    * Initialize cluster with its identifier and with statistics
+    *
+    * @param ident The id of the cluster
+    * @param reg The First Region to be inserted in the Cluster
+    */
+    bool Init(int ident, TePDIRegion reg);
+  
+    /**
+    * Add a region statistics to the cluster.
+    *
+    * @param reg The Region to be added
+    */
+    bool AddRegion(TePDIRegion reg);
+  
+    /**
+    * Compute the Mahalanobis distance between the center of a region and the current cluster
+    *
+    * @param reg The region to be computed the distance
+    */
+    double Distance(TePDIRegion reg);
+  
+    /**
+    * Compute the Mahalanobis distance between the center of a cluster and the current cluster
+    *
+    * @param clu The cluster to be computed the distance
+    */
+    double Distance(TePDICluster clu);
+  
+    /**
+    * Set new identification to cluster
+    *
+    * @param newid The new ID
+    */
+    void SetId( int newid )
+    { id = newid; }
+
+    /**
+    * Return  cluster identification
+    */
+    int GetId(){ return id; }
+
+    /**
+    * Get mean value vector
+    *
+    * @param ind The cluster ID to get the mean
+    */
+    double Mean(int ind);
+
+    /**
+    * Return cluster covariance matrix.
+    */
+    TeMatrix GetCovariance()
+    { return covar; }
+
+    /**
+    * Get cluster size in pixels.
+    */
+    long GetArea()
+    { return area; }
+
+    /**
+    * Get number o bands
+    */
+    int GetNban()
+    { return nbands; }
+
+    /**
+    * Gets the Ln of Det
+    */
+    double GetLnDet()
+    { return lndet; }
+
+    /**
+    * Merges two clusters
+    *
+    * @param clu The cluster to be merged
+    */
+    void Merge(TePDICluster clu);
+
+    /**
+    * Get if the cluster was initialized
+    */
+    bool GetInitialized()
+    { return initialized; }
+
+  /**
+    * Insert a new pixel value in cluster
+    */
+  void add( vector<double> pixValue );
+
+  /**
+    * Calculate a distance over pixel value
+    */
+  double  dist( vector<double> pixValue )const;
+
+  /**
+    * Get variance value vector
+    *
+    * @param ind The cluster ID to get the variance
+    */
+  double getVariance( int ind )const;
+
+  /**
+    * Get the value of major variance
+    *
+    */
+  double maxVar()const;
+
+  /**
+    * Get the band value of major variance
+    *
+    */
+  int maxVarBand()const;
+
+  /**
+    * reset values used to get the variance
+    *
+    */
+  void resetCount();
+
+  /**
+    * update the information about mean and variance
+    *
+    */
+  void updateStatistics();
+
+  /**
+    * split the cluster
+    *
+    */
+  TePDICluster splitLeft()const;
+
+  /**
+  * split the cluster
+    *
+    */
+  TePDICluster splitRight()const;
+
+  /**
+    * Clear cluster
+    *
+    */
+    void clear();
+
+};
+
+#endif
diff --git a/src/terralib/image_processing/TePDIColorTransform.cpp b/src/terralib/image_processing/TePDIColorTransform.cpp
new file mode 100755
index 0000000..e300fde
--- /dev/null
+++ b/src/terralib/image_processing/TePDIColorTransform.cpp
@@ -0,0 +1,586 @@
+#include "TePDIColorTransform.hpp"
+
+#include <TeAgnostic.h>
+#include "TePDIUtils.hpp"
+#include "TePDIMatrix.hpp"
+#include <TeDefines.h>
+
+#ifndef M_PI
+  #define M_PI       3.14159265358979323846
+#endif
+
+
+TePDIColorTransform::TePDIColorTransform()
+{
+}
+
+
+TePDIColorTransform::~TePDIColorTransform()
+{
+}
+
+
+void TePDIColorTransform::ResetState( const TePDIParameters& )
+{
+}
+
+
+bool TePDIColorTransform::CheckParameters( 
+  const TePDIParameters& parameters ) const
+{
+  /* Checking transformation type */
+  
+  ColorTransfTypes transf_type;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "transf_type", transf_type ),
+    "Missing parameter: transf_type" );
+  TEAGN_TRUE_OR_RETURN(
+    ( ( transf_type == Rgb2Ihs ) || ( transf_type == Ihs2Rgb ) ),
+    "Invalid parameter: transf_type" );
+    
+  /* Checking input_rasters and input_channels */
+  
+  TePDITypes::TePDIRasterVectorType input_rasters;
+  TEAGN_TRUE_OR_RETURN( 
+    parameters.GetParameter( "input_rasters", input_rasters ),
+    "Missing parameter: input_rasters" );
+    
+  TEAGN_TRUE_OR_RETURN( ( input_rasters.size() == 3 ),
+    "Invalid number of input rasters" );    
+    
+  std::vector< int > input_channels;
+  TEAGN_TRUE_OR_RETURN( 
+    parameters.GetParameter( "input_channels", input_channels ),
+    "Missing parameter: input_channels" );
+    
+  TEAGN_TRUE_OR_RETURN( ( input_channels.size() == 3 ), 
+    "Invalid number of input channels" );
+    
+  for( unsigned int index = 0 ; index < input_rasters.size() ; ++index ) {
+    TEAGN_TRUE_OR_RETURN( input_rasters[ index ].isActive(),
+      "Invalid parameter: raster " + 
+      Te2String( index ) + " inactive" );
+      
+    TEAGN_TRUE_OR_RETURN( 
+      input_rasters[ index ]->params().status_ != TeRasterParams::TeNotReady,
+      "Invalid parameter: raster " + 
+      Te2String( index ) + " not ready" );
+        
+    TEAGN_TRUE_OR_RETURN( 
+      input_rasters[ 0 ]->params().nlines_ == 
+      input_rasters[ index ]->params().nlines_,
+      "Lines number mismatch between raster 0 and raster " +
+      Te2String( index ) );
+      
+    TEAGN_TRUE_OR_RETURN( 
+      input_rasters[ 0 ]->params().ncols_ == 
+      input_rasters[ index ]->params().ncols_,
+      "Columns number mismatch between raster 0 and raster " +
+      Te2String( index ) );
+            
+    TEAGN_TRUE_OR_RETURN( 
+      input_channels[ index ] >= 0, "Invalid channel number (" + 
+      Te2String( index ) + ")" );
+    TEAGN_TRUE_OR_RETURN( 
+      input_channels[ index ] < input_rasters[ index ]->nBands(), 
+      "Invalid channel number (" + 
+      Te2String( index ) + ")" );
+      
+    /* Checking photometric interpretation */
+    
+    TEAGN_TRUE_OR_RETURN( ( 
+      ( input_rasters[ index ]->params().photometric_[ 
+        input_channels[ index ] ] == TeRasterParams::TeRGB ) ||
+      ( input_rasters[ index ]->params().photometric_[ 
+        input_channels[ index ] ] == TeRasterParams::TeMultiBand ) ),
+      "Invalid parameter - rasters (invalid photometric "
+      "interpretation)" );      
+  }    
+  
+  /* Checking output_rasters */
+  
+  TePDITypes::TePDIRasterVectorType output_rasters;
+  TEAGN_TRUE_OR_RETURN( 
+    parameters.GetParameter( "output_rasters", output_rasters ),
+    "Missing parameter: output_rasters" );
+    
+  TEAGN_TRUE_OR_RETURN( ( ( output_rasters.size() == 3 ) ||
+    ( output_rasters.size() == 1 ) ), 
+    "Invalid number of output rasters" );
+    
+  for( unsigned int index = 0 ; index < output_rasters.size() ; ++index ) {
+    TEAGN_TRUE_OR_RETURN( output_rasters[ index ].isActive(),
+      "Invalid parameter: output raster " + 
+      Te2String( index ) + " inactive" );
+      
+    TEAGN_TRUE_OR_RETURN( 
+      output_rasters[ index ]->params().status_ != TeRasterParams::TeNotReady,
+      "Invalid parameter: output raster " + 
+      Te2String( index ) + " not ready" );
+      
+    if( ( index != 0 ) && ( output_rasters.size() != 1 ) ) {
+      TEAGN_TRUE_OR_RETURN( 
+        ( output_rasters[ 0 ] != output_rasters[ index ] ),
+        "Cannot use the same output raster two more times" );    
+    }
+    
+    /* Checking input data type */
+    
+    if( transf_type == Rgb2Ihs ) {
+      TEAGN_TRUE_OR_RETURN( 
+        (
+          ( 
+            output_rasters[ index ]->params().dataType_[ 0 ] == TeDOUBLE 
+          )
+          ||
+          (
+            output_rasters[ index ]->params().dataType_[ 0 ] == TeFLOAT 
+          )
+        ), "Invalid output rasters data type" );  
+    }      
+  }     
+  
+  /* Checking  rgb_channels_min and rgbs_channel_max */
+  
+  if( ( transf_type == Ihs2Rgb ) || ( transf_type == Rgb2Ihs ) ) {
+    double rgb_channels_min = 0;
+    TEAGN_TRUE_OR_RETURN( 
+      parameters.GetParameter( "rgb_channels_min", rgb_channels_min ),
+      "Missing parameter: rgbs_channels_min" );  
+      
+    double rgb_channels_max = 0;
+    TEAGN_TRUE_OR_RETURN( 
+      parameters.GetParameter( "rgb_channels_max", rgb_channels_max ),
+      "Missing parameter: rgb_channels_max" );    
+      
+    TEAGN_TRUE_OR_RETURN( 
+      ( rgb_channels_max > rgb_channels_min ),
+      "Invalid parameters: rgb_channels_max - rgb_channels_min" );       
+  }
+  
+  return true;
+}
+
+
+bool TePDIColorTransform::RunImplementation()
+{
+  TePDITypes::TePDIRasterVectorType input_rasters;
+  params_.GetParameter( "input_rasters", input_rasters );
+    
+  std::vector< int > input_channels;
+  params_.GetParameter( "input_channels", input_channels );
+  
+  TePDITypes::TePDIRasterVectorType output_rasters;
+  params_.GetParameter( "output_rasters", output_rasters );
+
+  ColorTransfTypes transf_type;
+  params_.GetParameter( "transf_type", transf_type );
+  
+  std::vector< int > output_channels;
+  
+  /* Updating output raster geometries */
+  
+  TeRaster& ref_input_raster = *(input_rasters[ 0 ].nakedPointer() );
+  
+  if( output_rasters.size() == 1 ) {
+    TeRaster& output_raster = *( output_rasters[ 0 ].nakedPointer() );
+    
+    /* Generating the new output raster parameters */
+    
+    TeRasterParams output_raster_params = output_raster.params();
+    
+    output_raster_params.nBands( 3 );
+    if( ref_input_raster.projection() != 0 ) {
+      output_raster_params.projection( ref_input_raster.projection() );
+    }
+    output_raster_params.boxLinesColumns( 
+      ref_input_raster.params().box().x1(), 
+      ref_input_raster.params().box().y1(), 
+      ref_input_raster.params().box().x2(), 
+      ref_input_raster.params().box().y2(), 
+      ref_input_raster.params().nlines_, 
+      ref_input_raster.params().ncols_ );
+      
+    switch( transf_type ) {
+      case Rgb2Ihs :
+      {
+        output_raster_params.setPhotometric( TeRasterParams::TeMultiBand, -1 );
+
+        break;
+      }
+      case Ihs2Rgb :
+      {
+        output_raster_params.setPhotometric( TeRasterParams::TeRGB, -1 );
+
+        break;
+      }
+      default :
+      {
+        TEAGN_LOG_AND_RETURN( "Invalid transformation type" );
+        break;
+      }
+    }      
+      
+    TEAGN_TRUE_OR_RETURN( output_raster.init( output_raster_params ),
+      "Output raster reset error" );  
+      
+    /* updating the output_channels vector */
+      
+    output_channels.push_back( 0 );
+    output_channels.push_back( 1 );
+    output_channels.push_back( 2 );     
+    
+     /* updating the output_channels vector */
+
+    output_rasters.push_back( output_rasters[ 0 ] );   
+    output_rasters.push_back( output_rasters[ 0 ] );
+  } else {
+    /* output_rasters.size() == 3 */
+    
+    for( unsigned int index = 0 ; index < output_rasters.size() ; ++index ) {
+      TeRaster& output_raster = *( output_rasters[ index ].nakedPointer() );
+      
+      /* Generating the new output raster parameters */
+      
+      TeRasterParams output_raster_params = output_raster.params();
+      
+      output_raster_params.nBands( 1 );
+      if( ref_input_raster.projection() != 0 ) {
+        output_raster_params.projection( ref_input_raster.projection() );
+      }
+      output_raster_params.boxLinesColumns( 
+        ref_input_raster.params().box().x1(), 
+        ref_input_raster.params().box().y1(), 
+        ref_input_raster.params().box().x2(), 
+        ref_input_raster.params().box().y2(), 
+        ref_input_raster.params().nlines_, 
+        ref_input_raster.params().ncols_ );  
+      switch( transf_type ) {
+        case Rgb2Ihs :
+        {
+          output_raster_params.setPhotometric( TeRasterParams::TeMultiBand, -1 );
+
+          break;
+        }
+        case Ihs2Rgb :
+        {
+          output_raster_params.setPhotometric( TeRasterParams::TeRGB, -1 );
+
+          break;
+        }
+        default :
+        {
+          TEAGN_LOG_AND_RETURN( "Invalid transformation type" );
+          break;
+        }
+      }           
+        
+      TEAGN_TRUE_OR_RETURN( output_raster.init( output_raster_params ),
+        "Output raster reset error" );  
+    }
+
+    /* updating the output_channels vector */
+      
+    output_channels.push_back( 0 );
+    output_channels.push_back( 0 );
+    output_channels.push_back( 0 );       
+  }
+    
+  /* Calling the required color conversion */  
+
+  switch( transf_type ) {
+    case Rgb2Ihs :
+    {
+      double rgb_channels_min = 0;
+      params_.GetParameter( "rgb_channels_min", rgb_channels_min );
+        
+      double rgb_channels_max = 0;
+      params_.GetParameter( "rgb_channels_max", rgb_channels_max );
+          
+      return RunRgb2Ihs( input_rasters, input_channels, output_rasters,
+        output_channels, rgb_channels_min, rgb_channels_max );
+      break;
+    }
+    case Ihs2Rgb :
+    {
+      double rgb_channels_min = 0;
+      params_.GetParameter( "rgb_channels_min", rgb_channels_min );
+        
+      double rgb_channels_max = 0;
+      params_.GetParameter( "rgb_channels_max", rgb_channels_max );
+         
+      return RunIhs2Rgb( input_rasters, input_channels, output_rasters,
+        output_channels, rgb_channels_min, rgb_channels_max );
+      break;
+    }
+    default :
+    {
+      TEAGN_LOG_AND_RETURN( "Invalid transformation type" );
+      break;
+    }
+  }
+
+  return false;
+}
+
+
+bool TePDIColorTransform::RunRgb2Ihs(
+  TePDITypes::TePDIRasterVectorType& input_rasters,
+  std::vector< int >& input_channels,
+  TePDITypes::TePDIRasterVectorType& output_rasters,
+  std::vector< int >& output_channels,
+  const double rgb_channels_min, const double rgb_channels_max )
+{
+  TEAGN_DEBUG_CONDITION( ( input_rasters.size() == 3 ),
+    "Invalid vector size" )
+  TEAGN_DEBUG_CONDITION( ( input_channels.size() == 3 ),
+    "Invalid vector size" )
+  TEAGN_DEBUG_CONDITION( ( output_rasters.size() == 3 ),
+    "Invalid vector size" )
+  TEAGN_DEBUG_CONDITION( ( output_channels.size() == 3 ),
+    "Invalid vector size" )
+  TEAGN_DEBUG_CONDITION( ( rgb_channels_max >= rgb_channels_min ),
+    "Invalid rgb channels max/min" )    
+                
+  /* Extracting local references */
+  
+  TeRaster& input_raster0 = *( input_rasters[ 0 ].nakedPointer() ); 
+  TeRaster& input_raster1 = *( input_rasters[ 1 ].nakedPointer() ); 
+  TeRaster& input_raster2 = *( input_rasters[ 2 ].nakedPointer() );
+  
+  const int input_channel0 = input_channels[ 0 ];
+  const int input_channel1 = input_channels[ 1 ];
+  const int input_channel2 = input_channels[ 2 ];
+  
+  TeRaster& output_raster0 = *( output_rasters[ 0 ].nakedPointer() ); 
+  TeRaster& output_raster1 = *( output_rasters[ 1 ].nakedPointer() ); 
+  TeRaster& output_raster2 = *( output_rasters[ 2 ].nakedPointer() );
+  
+  const int output_channel0 = output_channels[ 0 ];
+  const int output_channel1 = output_channels[ 1 ];
+  const int output_channel2 = output_channels[ 2 ];    
+  
+  const unsigned int lines = ( unsigned int ) input_raster0.params().nlines_;
+  const unsigned int columns = ( unsigned int ) 
+    input_raster0.params().ncols_;
+    
+  const double rgb_channels_diff = rgb_channels_max - rgb_channels_min;
+  const double rgb_channels_norm_fac = ( rgb_channels_diff != 0.0 ) ? 
+    rgb_channels_diff : 1.0;
+  
+  /* Dummy use definition */
+  
+  double out_raster_dummy = 0;
+  if( output_raster0.params().useDummy_ ) {
+    out_raster_dummy = output_raster0.params().dummy_[ 0 ];
+  }
+  
+  /* Generating the non-normalized ihs matrixes */
+  
+  double red = 0, green = 0, blue = 0;
+  double hue = 0, sat = 0, light = 0;  
+  unsigned int line = 0;
+  unsigned int column = 0;
+  double teta = 0;
+  double red_norm = 0, green_norm = 0, blue_norm = 0;
+  double r_minus_g = 0, r_minus_b = 0;
+  double rgb_sum = 0;
+  double cosvalue = 0;
+  const double two_pi = 2.0 * ((double)M_PI);
+  
+  TePDIPIManager progress( "Converting RGB -> IHS...", lines,
+    progress_enabled_ ); 
+
+  for( line = 0 ; line < lines ; ++line ) {
+    for( column = 0 ; column < columns ; ++column ) {
+      if( input_raster0.getElement( column, line, red, input_channel0 ) && 
+          input_raster1.getElement( column, line, green, input_channel1 ) &&
+          input_raster2.getElement( column, line, blue, input_channel2 ) ) {
+          
+        red_norm = ( red - rgb_channels_min ) / rgb_channels_norm_fac;
+        green_norm = ( green - rgb_channels_min ) / rgb_channels_norm_fac;
+        blue_norm = ( blue - rgb_channels_min ) / rgb_channels_norm_fac;
+        
+        r_minus_g = red_norm - green_norm;
+        r_minus_b = red_norm - blue_norm;
+        
+        cosvalue =  ( 0.5 * ( r_minus_g + r_minus_b )  ) /
+          sqrt( ( r_minus_g * r_minus_g ) + ( r_minus_b * ( green_norm -
+          blue_norm ) ) );
+          
+        TEAGN_DEBUG_CONDITION( ( cosvalue >= (-1.0) ) &&
+          ( cosvalue <= (1.0) ), "Invalid cos value" )
+        
+        teta = acos( cosvalue );
+          
+        if( blue_norm > green_norm )
+        {
+          hue = two_pi - teta;
+        }
+        else
+        {
+          hue = teta;
+        }
+          
+        rgb_sum = red_norm + green_norm + blue_norm;
+        
+        sat = 1.0 - ( 3 * MIN( MIN( red_norm, green_norm ), blue_norm ) /
+          rgb_sum );
+          
+        light = rgb_sum / 3.0;
+      } else {
+        hue = sat = light = 0.0;
+      }
+      
+      TEAGN_TRUE_OR_RETURN( output_raster0.setElement(
+        column, line, light, output_channel0 ),
+        "Unable to write intensity channel for output_image" );
+      TEAGN_TRUE_OR_RETURN( output_raster1.setElement(
+        column, line, hue, output_channel1 ),
+        "Unable to write hue channel for output_image" );
+      TEAGN_TRUE_OR_RETURN( output_raster2.setElement(
+        column, line, sat, output_channel2 ),
+        "Unable to write saturation channel for output_image" ); 
+    }
+    
+    TEAGN_FALSE_OR_RETURN( progress.Increment(), 
+      "Canceled by the user" );    
+  }
+  
+  return true;
+}
+
+
+bool TePDIColorTransform::RunIhs2Rgb(
+  TePDITypes::TePDIRasterVectorType& input_rasters,
+  std::vector< int >& input_channels,
+  TePDITypes::TePDIRasterVectorType& output_rasters,
+  std::vector< int >& output_channels,
+  const double rgb_channels_min, const double rgb_channels_max )
+{
+  TEAGN_TRUE_OR_THROW( ( input_rasters.size() == 3 ),
+    "Invalid vector size" )
+  TEAGN_TRUE_OR_THROW( ( input_channels.size() == 3 ),
+    "Invalid vector size" )
+  TEAGN_TRUE_OR_THROW( ( output_rasters.size() == 3 ),
+    "Invalid vector size" )
+  TEAGN_TRUE_OR_THROW( ( output_channels.size() == 3 ),
+    "Invalid vector size" )
+                
+  /* Extracting local references */
+  
+  TeRaster& input_raster0 = *( input_rasters[ 0 ].nakedPointer() ); 
+  TeRaster& input_raster1 = *( input_rasters[ 1 ].nakedPointer() ); 
+  TeRaster& input_raster2 = *( input_rasters[ 2 ].nakedPointer() );
+  
+  const int input_channel0 = input_channels[ 0 ];
+  const int input_channel1 = input_channels[ 1 ];
+  const int input_channel2 = input_channels[ 2 ];
+  
+  TeRaster& output_raster0 = *( output_rasters[ 0 ].nakedPointer() ); 
+  TeRaster& output_raster1 = *( output_rasters[ 1 ].nakedPointer() ); 
+  TeRaster& output_raster2 = *( output_rasters[ 2 ].nakedPointer() );
+  
+  int output_channel0 = output_channels[ 0 ];
+  int output_channel1 = output_channels[ 1 ];
+  int output_channel2 = output_channels[ 2 ];  
+    
+  unsigned int lines = ( unsigned int ) input_raster0.params().nlines_;
+  unsigned int columns = ( unsigned int ) input_raster0.params().ncols_;
+
+  const double rgb_channels_diff = rgb_channels_max - rgb_channels_min;
+  const double rgb_channels_norm_fac = ( rgb_channels_diff != 0.0 ) ? 
+    rgb_channels_diff : 1.0;  
+ 
+  /* Dummy use definition */
+  
+  double out_raster_dummy = 0;
+  if( output_raster0.params().useDummy_ ) {
+    out_raster_dummy = output_raster0.params().dummy_[ 0 ];
+  }
+  
+  /* Raster convertion */
+  
+  const double pi_rat3 = M_PI / 3.0; // 60
+  const double two_pi_rat3 = 2.0 * M_PI / 3.0; // 120
+  const double four_pi_rat3 = 4.0 * M_PI / 3.0; // 240
+  
+  double red = 0, green = 0, blue = 0;
+  double hue = 0, sat = 0, lig = 0;
+  
+  StartProgInt( "Converting IHS -> RGB...", lines );
+  
+  for( unsigned int line = 0 ; line < lines ; ++line ) {
+    TEAGN_FALSE_OR_RETURN( UpdateProgInt( line ), "Canceled by the user" );
+  
+    for( unsigned int column = 0 ; column < columns ; ++column ) {
+      if( input_raster0.getElement( column, line, lig, input_channel0 ) &&
+          input_raster1.getElement( column, line, hue, input_channel1 ) &&
+          input_raster2.getElement( column, line, sat, input_channel2 ) ) {
+
+        /* Hue inside RG sector */
+        if( hue < two_pi_rat3 )
+        {
+          blue = lig * ( 1.0 - sat );
+          red = lig * ( 1.0 + ( sat * cos( hue ) / 
+            cos( pi_rat3 - hue ) ) );
+          green = ( 3.0 * lig ) - ( red + blue );
+        }
+        else if( hue < four_pi_rat3 )
+        { /* Hue inside GB sector */
+        
+          hue -= two_pi_rat3;
+          
+          red = lig * ( 1.0 - sat );
+          green = lig * ( 1.0 + ( sat * cos( hue ) / 
+            cos( pi_rat3 - hue ) ) );
+          blue = ( 3.0 * lig ) - ( red + green );
+        }
+        else
+        { /* Hue inside BR sector */
+        
+          hue -= four_pi_rat3;
+          
+          green = lig * ( 1.0 - sat );
+          blue = lig * ( 1.0 + ( sat * cos( hue ) / 
+            cos( pi_rat3 - hue ) ) );
+          red = ( 3.0 * lig ) - ( green + blue );
+        }
+        
+        red = ( red * rgb_channels_norm_fac ) + rgb_channels_min;
+        green = ( green * rgb_channels_norm_fac ) + rgb_channels_min;
+        blue = ( blue * rgb_channels_norm_fac ) + rgb_channels_min;
+        
+        red = MIN( red, rgb_channels_max );
+        green = MIN( green, rgb_channels_max );
+        blue = MIN( blue, rgb_channels_max );
+        
+        red = MAX( red, rgb_channels_min );
+        green = MAX( green, rgb_channels_min );
+        blue = MAX( blue, rgb_channels_min );        
+  
+        TEAGN_TRUE_OR_RETURN( output_raster0.setElement(
+          column, line, red, output_channel0 ),
+          "Unable to write red channel for output_image" );
+        TEAGN_TRUE_OR_RETURN( output_raster1.setElement(
+          column, line, green, output_channel1 ),
+          "Unable to write green channel for output_image" );
+        TEAGN_TRUE_OR_RETURN( output_raster2.setElement(
+          column, line, blue, output_channel2 ),
+          "Unable to write blue channel for output_image" );
+      } else {                    
+        TEAGN_TRUE_OR_RETURN( output_raster0.setElement(
+          column, line, out_raster_dummy, output_channel0 ),
+          "Unable to write red channel for output_image" );
+        TEAGN_TRUE_OR_RETURN( output_raster1.setElement(
+          column, line, out_raster_dummy, output_channel1 ),
+          "Unable to write green channel for output_image" );
+        TEAGN_TRUE_OR_RETURN( output_raster2.setElement(
+          column, line, out_raster_dummy, output_channel2 ),
+          "Unable to write blue channel for output_image" );
+      }
+    }
+  }
+
+  return true;
+}
+
diff --git a/src/terralib/image_processing/TePDIColorTransform.hpp b/src/terralib/image_processing/TePDIColorTransform.hpp
new file mode 100755
index 0000000..d1eafda
--- /dev/null
+++ b/src/terralib/image_processing/TePDIColorTransform.hpp
@@ -0,0 +1,152 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDICOLORTRANSFORM_HPP
+  #define TEPDICOLORTRANSFORM_HPP
+
+  #include "TePDIAlgorithm.hpp"
+
+  /**
+   * @brief This is the class for raster color transforms.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup TePDIGeneralAlgoGroup
+   *
+   * @note The general required parameters are:
+   *
+   * @param input_rasters ( TePDITypes::TePDIRasterVectorType ) - 
+   * A vector of all used input rasters ( NOTE: When two or more bands
+   * from the same raster are used, this raster must be inserted 
+   * two or three times inside the vector.
+   * @param input_channels ( std::vector< int > ) - A vector of all used 
+   * input rasters channels/bands.
+   * @param output_rasters ( TePDITypes::TePDIRasterVectorType ) - 
+   * A vector of all used output rasters ( Possible combinations:
+   * One raster with 3 channels, 3 rasters with one channel per raster. ).
+   * @param transf_type ( TePDIColorTransform::ColorTransfTypes ) - 
+   * Transformation type.
+   * @param rgb_channels_min (double) - The output RGB channels min level.
+   * @param rgb_channels_max (double) - The output RGB channels max level.
+   *
+   * @note Channels disposition for RGB images:
+   * input_rasters[ 0 ]=Red , input_rasters[ 1 ]=Green , 
+   * input_rasters[ 2 ]=Blue
+   *   
+   * @note Channels disposition for IHS images:
+   * input_rasters[ 0 ]=Intensity , input_rasters[ 1 ]=Hue , 
+   * input_rasters[ 2 ]=Saturation
+   *
+   * @note This algorithm generates and expects IHS images with the 
+   * following channels ranges: I:[0,1] H:[0,2pi] (radians) S:[0,1]
+   */
+  class PDI_DLL TePDIColorTransform : public TePDIAlgorithm {
+    public :
+
+      /**
+       * @enum ColorTransfTypes Color transformation types.
+       * @note Reference: Digital Image Processing - Gonzales.
+       */
+      enum ColorTransfTypes {
+        /** RGB -> IHS */
+        Rgb2Ihs = 1,
+        /** IHS -> RGB */
+        Ihs2Rgb = 2
+      };
+
+      /**
+       * @brief Default Constructor.
+       *
+       */
+      TePDIColorTransform();
+
+      /**
+       * @briefDefault Destructor
+       */
+      ~TePDIColorTransform();
+
+      /**
+       * @brief Checks if the supplied parameters fits the requirements of each
+       * PDI algorithm implementation.
+       *
+       * @note Error log messages must be generated. No exceptions generated.
+       *
+       * @param parameters The parameters to be checked.
+       * @return true if the parameters are OK. false if not.
+       */
+      bool CheckParameters( const TePDIParameters& parameters ) const;
+
+    protected :
+
+      /**
+       * @brief Runs the current algorithm implementation.
+       *
+       * @return true if OK. false on error.
+       */
+      bool RunImplementation();
+
+      /**
+       * @brief Reset the internal state to the initial state.
+       *
+       * @param params The new parameters referente at initial state.
+       */
+      void ResetState( const TePDIParameters& params );
+
+      /**
+       * @brief Runs the RGB -> IHS implementation.
+       * @param input_rasters Input rasters.
+       * @param input_channels Input rasters channels.
+       * @param output_rasters Output rasters.
+       * @param output_channels Output rasters channels.
+       * @param rgb_channels_min The output RGB channels min value.
+       * @param rgb_channels_max The output RGB channels max value.       
+       * @return true if OK. false if not.
+       */
+      bool RunRgb2Ihs( TePDITypes::TePDIRasterVectorType& input_rasters,
+        std::vector< int >& input_channels,
+        TePDITypes::TePDIRasterVectorType& output_rasters,
+        std::vector< int >& output_channels,
+        const double rgb_channels_min, const double rgb_channels_max );
+
+      /**
+       * @brief Runs the IHS -> RGB implementation.
+       * @param input_rasters Input rasters.
+       * @param input_channels Input rasters channels.
+       * @param output_rasters Output rasters.
+       * @param output_channels Output rasters channels.
+       * @param rgb_channels_min The output RGB channels min value.
+       * @param rgb_channels_max The output RGB channels max value.
+       * @return true if OK. false if not.
+       */
+      bool RunIhs2Rgb( TePDITypes::TePDIRasterVectorType& input_rasters,
+        std::vector< int >& input_channels,
+        TePDITypes::TePDIRasterVectorType& output_rasters,
+        std::vector< int >& output_channels,
+        const double rgb_channels_min, const double rgb_channels_max );
+
+  };
+  
+/** @example TePDIColorTransform_test.cpp
+ *    Shows how to use this class.
+ */    
+
+#endif //TEPDISTATISTIC_HPP
diff --git a/src/terralib/image_processing/TePDIColorTransformFactory.cpp b/src/terralib/image_processing/TePDIColorTransformFactory.cpp
new file mode 100755
index 0000000..7c1d81a
--- /dev/null
+++ b/src/terralib/image_processing/TePDIColorTransformFactory.cpp
@@ -0,0 +1,24 @@
+ 
+#include "TePDIColorTransformFactory.hpp"
+#include "TePDIColorTransform.hpp"
+#include <TeAgnostic.h>
+
+TePDIColorTransformFactory::TePDIColorTransformFactory()
+: TePDIAlgorithmFactory( std::string( "TePDIColorTransform" ) )
+{
+};      
+
+TePDIColorTransformFactory::~TePDIColorTransformFactory()
+{
+};
+
+
+TePDIAlgorithm* TePDIColorTransformFactory::build ( const TePDIParameters& arg )
+{
+  TePDIAlgorithm* instance_ptr = new TePDIColorTransform();
+  
+  TEAGN_TRUE_OR_THROW( instance_ptr->Reset( arg ),
+    "Invalid parameters" );
+  
+  return instance_ptr;
+}
diff --git a/src/terralib/image_processing/TePDIColorTransformFactory.hpp b/src/terralib/image_processing/TePDIColorTransformFactory.hpp
new file mode 100755
index 0000000..8c91084
--- /dev/null
+++ b/src/terralib/image_processing/TePDIColorTransformFactory.hpp
@@ -0,0 +1,67 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDICOLORTRANSFORMFACTORY_HPP
+  #define TEPDICOLORTRANSFORMFACTORY_HPP
+
+  #include <TeSharedPtr.h>
+  #include "TePDIAlgorithmFactory.hpp"
+  #include "TePDIParameters.hpp"
+  
+  /**
+   * @brief This is the class for color transform algorithms factory.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIAlgorithmsFactories
+   */
+  class PDI_DLL TePDIColorTransformFactory : public TePDIAlgorithmFactory
+  {
+    public :
+      
+      /**
+       * @brief Default constructor
+       */
+      TePDIColorTransformFactory();      
+      
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIColorTransformFactory();
+      
+      protected :  
+      /**
+       * @brief Implementation for the abstract TeFactory::build.
+       *
+       * @param arg A const reference to the parameters used by the
+       * algorithm.
+       * @return A pointer to the new generated algorithm instance.
+       */
+      TePDIAlgorithm* build( const TePDIParameters& arg );
+      
+  };
+
+  namespace {
+    static TePDIColorTransformFactory TePDIColorTransformFactory_instance;
+  };  
+  
+#endif
diff --git a/src/terralib/image_processing/TePDIContrast.cpp b/src/terralib/image_processing/TePDIContrast.cpp
new file mode 100755
index 0000000..534f9c7
--- /dev/null
+++ b/src/terralib/image_processing/TePDIContrast.cpp
@@ -0,0 +1,1739 @@
+#include "TePDIContrast.hpp"
+
+#include <TeAgnostic.h>
+#include <TePDITypes.hpp>
+#include <TePDIUtils.hpp>
+#include <TePDIHistogram.hpp>
+#include <TePDIMatrix.hpp>
+
+#include <math.h>
+#include <float.h>
+
+
+TePDIContrast::TePDIContrast()
+{
+}
+
+
+TePDIContrast::~TePDIContrast()
+{
+}
+
+
+bool TePDIContrast::RunImplementation()
+{
+  /* Getting general parameters */
+
+  TePDIContrastType contrast_type;
+  params_.GetParameter( "contrast_type", contrast_type );
+
+  TePDITypes::TePDIRasterPtrType inRaster;
+  int input_band = 0;
+  if( params_.CheckParameter< TePDITypes::TePDIRasterPtrType >( 
+    "input_image" ) ) {
+    
+    params_.GetParameter( "input_image", inRaster );
+    params_.GetParameter( "input_band", input_band );
+  }
+
+  int output_band = 0;
+  TePDITypes::TePDIRasterPtrType outRaster;
+  if( params_.CheckParameter< TePDITypes::TePDIRasterPtrType >( 
+    "output_image" ) ) {
+    
+    params_.GetParameter( "output_image", outRaster );
+    params_.GetParameter( "output_band", output_band );  
+  }  
+  
+  double min_level = 0;
+  double max_level = 0;
+  if( params_.CheckParameter< double >( "min_level" ) ) {
+    
+    params_.GetParameter( "min_level", min_level );
+  }
+  if( params_.CheckParameter< double >( "max_level" ) ) {
+    
+    params_.GetParameter( "max_level", max_level );
+  }
+  
+  TePDIRgbPalette::pointer palette;
+  if( params_.CheckParameter< TePDIRgbPalette::pointer >( "rgb_palette" ) ) {
+  
+    params_.GetParameter( "rgb_palette", palette );
+  }
+  
+  /* output dumyy value definition */
+ 
+  bool output_raster_uses_dummy = false;
+  double output_raster_dummy = 0;
+  
+  if( outRaster.isActive() ) {
+    output_raster_uses_dummy = outRaster->params().useDummy_;
+    
+    if( output_raster_uses_dummy ) {
+      output_raster_dummy = outRaster->params().dummy_[ 0 ];
+    }    
+  }
+  
+  if( params_.CheckParameter< double >( "dummy_value" ) ) {
+    
+    params_.GetParameter( "dummy_value", output_raster_dummy );
+    
+    output_raster_uses_dummy = true;
+  }  
+  
+  /* Reseting output raster */
+  
+  if( outRaster.isActive() ) {
+    switch( contrast_type ) {
+      case TePDIContrastSimpleSlicer :
+      {
+        bool output_reset_not_needed = true;
+        
+        if( ! params_.CheckParameter< int >( "restrict_out_reset" ) ) {
+          output_reset_not_needed = false;
+        }
+        
+        if( output_reset_not_needed &&
+          ( inRaster->params().nlines_ != outRaster->params().nlines_ ) ) {
+           
+          output_reset_not_needed = false; 
+        }
+        
+        if( output_reset_not_needed &&
+          ( inRaster->params().ncols_ != outRaster->params().ncols_ ) ) {
+           
+          output_reset_not_needed = false; 
+        }
+        
+        if( output_reset_not_needed &&
+          ( output_band >= outRaster->params().nBands() ) ) {
+           
+          output_reset_not_needed = false; 
+        }
+        
+        if( output_reset_not_needed &&
+          ( 
+            ( inRaster->projection() == outRaster->projection() ) ? 
+            false : 
+            ( 
+              ( inRaster->projection() == 0 ) ?
+              true :
+              (
+                ( outRaster->projection() == 0 ) ? 
+                true :
+                ( inRaster->projection()->name() == 
+                  outRaster->projection()->name() ) ? false : true
+              )
+            ) 
+          )        
+         ) {
+           
+          output_reset_not_needed = false; 
+        }
+        
+        if( output_reset_not_needed &&
+          ( inRaster->params().box() != outRaster->params().box() ) ) {
+           
+          output_reset_not_needed = false; 
+        }
+        
+        if( output_reset_not_needed &&
+          ( inRaster->params().photometric_[ 0 ] != TeRasterParams::TePallete 
+          ) ) {
+           
+          output_reset_not_needed = false; 
+        }        
+        
+        if( output_reset_not_needed &&
+            ( ( outRaster->params().useDummy_ == output_raster_uses_dummy ) ?
+              false :
+              ( outRaster->params().useDummy_ ? 
+                ( outRaster->params().dummy_[ 0 ] != output_raster_dummy ) :
+                false
+              ) 
+            )
+          ) {
+           
+          output_reset_not_needed = false; 
+        }   
+              
+        if( ! output_reset_not_needed ) {
+          
+          TeRasterParams new_outRaster_params = outRaster->params();
+          new_outRaster_params.nBands( output_band + 1 );
+          if( inRaster->projection() == 0 ) {
+            new_outRaster_params.projection( 0 );
+          } else {
+            TeSharedPtr< TeProjection > proj( TeProjectionFactory::make( 
+              inRaster->projection()->params() ) );          
+            new_outRaster_params.projection( proj.nakedPointer() );
+          }
+          new_outRaster_params.boxResolution( inRaster->params().box().x1(), 
+            inRaster->params().box().y1(), inRaster->params().box().x2(), 
+            inRaster->params().box().y2(), 
+            inRaster->params().resx_, inRaster->params().resy_ );
+            
+          new_outRaster_params.setPhotometric( TeRasterParams::TePallete );
+          
+          new_outRaster_params.lutr_.clear();
+          new_outRaster_params.lutg_.clear();
+          new_outRaster_params.lutb_.clear();
+
+          TePDIRgbPalette::iterator pal_it = palette->begin();
+          TePDIRgbPalette::iterator pal_it_end = palette->end();
+          for( unsigned int lut_index = 0 ; lut_index < palette->size() ;
+              ++lut_index ) {
+    
+            new_outRaster_params.lutr_.push_back( 
+              (unsigned short)pal_it->second.red_ );
+            new_outRaster_params.lutg_.push_back( 
+              (unsigned short)pal_it->second.green_ );
+            new_outRaster_params.lutb_.push_back( 
+              (unsigned short)pal_it->second.blue_ );
+
+            ++pal_it;
+          }
+          
+          if( output_raster_uses_dummy ) {
+            new_outRaster_params.setDummy( output_raster_dummy, -1 );
+          } else {
+            new_outRaster_params.useDummy_ = false;
+          }
+            
+          TEAGN_TRUE_OR_RETURN( outRaster->init( new_outRaster_params ),            
+            "Output raster reset error" );           
+        }
+      
+        break;
+      }  
+      default :
+      {
+        /* Reseting output raster */
+        
+        bool output_reset_not_needed = true;
+        
+        if( ! params_.CheckParameter< int >( "restrict_out_reset" ) ) {
+          output_reset_not_needed = false;
+        }
+        
+        if( output_reset_not_needed &&
+          ( inRaster->params().nlines_ != outRaster->params().nlines_ ) ) {
+           
+          output_reset_not_needed = false; 
+        }
+        
+        if( output_reset_not_needed &&
+          ( inRaster->params().ncols_ != outRaster->params().ncols_ ) ) {
+           
+          output_reset_not_needed = false; 
+        }
+        
+        if( output_reset_not_needed &&
+          ( output_band >= outRaster->params().nBands() ) ) {
+           
+          output_reset_not_needed = false; 
+        }
+        
+        if( output_reset_not_needed &&
+          ( 
+            ( inRaster->projection() == outRaster->projection() ) ? 
+            false : 
+            ( 
+              ( inRaster->projection() == 0 ) ?
+              true :
+              (
+                ( outRaster->projection() == 0 ) ? 
+                true :
+                ( inRaster->projection()->name() == 
+                  outRaster->projection()->name() ) ? false : true
+              )
+            ) 
+          )        
+         ) {
+           
+          output_reset_not_needed = false; 
+        }
+        
+        if( output_reset_not_needed &&
+          ( inRaster->params().box() != outRaster->params().box() ) ) {
+           
+          output_reset_not_needed = false; 
+        }
+        
+        if( output_reset_not_needed &&
+            ( ( outRaster->params().useDummy_ == output_raster_uses_dummy ) ?
+              false :
+              ( outRaster->params().useDummy_ ? 
+                ( outRaster->params().dummy_[ 0 ] != output_raster_dummy ) :
+                false
+              ) 
+            )
+          ) {
+           
+          output_reset_not_needed = false; 
+        }          
+        
+        if( ! output_reset_not_needed ) {
+        
+          TeRasterParams new_outRaster_params = outRaster->params();
+          new_outRaster_params.nBands( output_band + 1 );
+          if( inRaster->projection() == 0 ) {
+            new_outRaster_params.projection( 0 );
+          } else {
+            TeSharedPtr< TeProjection > proj( TeProjectionFactory::make( 
+              inRaster->projection()->params() ) );          
+            new_outRaster_params.projection( proj.nakedPointer() );
+          }
+          new_outRaster_params.boxResolution( inRaster->params().box().x1(), 
+            inRaster->params().box().y1(), inRaster->params().box().x2(), 
+            inRaster->params().box().y2(), 
+            inRaster->params().resx_, inRaster->params().resy_ );            
+            
+          if( output_raster_uses_dummy ) {
+            new_outRaster_params.setDummy( output_raster_dummy, -1 );
+          } else {
+            new_outRaster_params.useDummy_ = false;
+          }            
+          
+          new_outRaster_params.setPhotometric( TeRasterParams::TeMultiBand );
+            
+          TEAGN_TRUE_OR_RETURN( outRaster->init( new_outRaster_params ),
+            "Output raster reset error" );             
+        }
+        
+        break;
+      }
+    }
+  }
+  
+  /* Getting output channel range */
+  
+  double output_channel_min_level = 0;
+  double output_channel_max_level = 0;
+  
+  if( params_.CheckParameter< double >( "output_channel_min_level" ) ) {
+    params_.GetParameter( "output_channel_min_level",
+      output_channel_min_level );
+    params_.GetParameter( "output_channel_max_level",
+      output_channel_max_level );
+  } else {
+    TEAGN_TRUE_OR_RETURN( TePDIUtils::TeGetRasterMinMaxBounds(
+      outRaster, output_band, output_channel_min_level,
+      output_channel_max_level ), "Unable to get raster channel level bounds" );  
+  }
+      
+  /* Building a lut suitable for each algorithm */
+    
+  TePDITypes::TePDILutType lut;
+  bool hist_based_lut = false;
+  bool fixed_step_lut = false;
+  
+  switch( contrast_type ) {
+    case TePDIContrastMinMax :
+    {
+      TePDITypes::TePDILutType baselut;
+      TEAGN_TRUE_OR_RETURN( getBaseLut( baselut, hist_based_lut ),
+        "Error getting base lut" );
+      
+      lut = GetMinMaxLut( output_channel_min_level, output_channel_max_level,
+        baselut );
+  
+      break;
+    }
+    case TePDIContrastLinear :
+    {
+      TePDITypes::TePDILutType baselut;
+      TEAGN_TRUE_OR_RETURN( getBaseLut( baselut, hist_based_lut ),
+        "Error getting base lut" );
+            
+      lut = GetLinearLut( baselut,
+        min_level, max_level, output_channel_min_level, output_channel_max_level );
+  
+      break;
+    }
+    case TePDIContrastSquareRoot :
+    {
+      TePDITypes::TePDILutType baselut;
+      TEAGN_TRUE_OR_RETURN( getBaseLut( baselut, hist_based_lut ),
+        "Error getting base lut" );    
+    
+      lut = GetSquareRootLut( baselut,
+        min_level, max_level, output_channel_min_level, output_channel_max_level );
+  
+      break;
+    }
+    case TePDIContrastSquare :
+    {
+      TePDITypes::TePDILutType baselut;
+      TEAGN_TRUE_OR_RETURN( getBaseLut( baselut, hist_based_lut ),
+        "Error getting base lut" ); 
+            
+      lut = GetSquareLut( baselut,
+        min_level, max_level, output_channel_min_level, output_channel_max_level );
+  
+      break;
+    }
+    case TePDIContrastLog :
+    {
+      TePDITypes::TePDILutType baselut;
+      TEAGN_TRUE_OR_RETURN( getBaseLut( baselut, hist_based_lut ),
+        "Error getting base lut" ); 
+            
+      lut = GetLogLut( baselut,
+        min_level, max_level, output_channel_min_level, output_channel_max_level );
+  
+      break;
+    }
+    case TePDIContrastNegative :
+    {
+      TePDITypes::TePDILutType baselut;
+      TEAGN_TRUE_OR_RETURN( getBaseLut( baselut, hist_based_lut ),
+        "Error getting base lut" ); 
+            
+      lut = GetNegativeLut( baselut,
+        min_level, max_level, output_channel_min_level, output_channel_max_level );
+ 
+      break;
+    }
+    case TePDIContrastHistEqualizer :
+    {
+      TePDIHistogram::pointer histogram;
+      TEAGN_TRUE_OR_RETURN( getHistogram( histogram ), 
+        "Unable to get histogram" );
+        
+      fixed_step_lut = histogram->hasFixedStep();
+      hist_based_lut = true;
+    
+      lut = GetHistEqualizerLut( histogram,
+        output_channel_min_level, output_channel_max_level );
+  
+      break;
+    }
+    case TePDIContrastSimpleSlicer :
+    {
+      TePDIHistogram::pointer histogram;
+      TEAGN_TRUE_OR_RETURN( getHistogram( histogram ), 
+        "Unable to get histogram" );
+        
+      fixed_step_lut = histogram->hasFixedStep();
+      hist_based_lut = true;
+            
+      GetSimpleSlicerLut( histogram,
+        palette,  min_level, max_level, lut );
+  
+      break;
+    }
+    case TePDIContrastStat :
+    {
+      TePDIHistogram::pointer histogram;
+      TEAGN_TRUE_OR_RETURN( getHistogram( histogram ), 
+        "Unable to get histogram" );
+        
+      fixed_step_lut = histogram->hasFixedStep();
+      hist_based_lut = true;
+    
+      double target_mean = 0;
+      params_.GetParameter( "target_mean", target_mean );
+      
+      double target_variance = 0;
+      params_.GetParameter( "target_variance", target_variance );
+      GetStatLut( histogram, target_mean, target_variance,
+        output_channel_min_level, output_channel_max_level, lut );
+  
+      break;
+    }    
+    default :
+    {
+      TEAGN_LOG_AND_THROW( "Unsuported contrast type" );
+      break;
+    }
+  }
+  
+  /* Updating the output lut, if present */
+  
+  if( params_.CheckParameter< TePDITypes::TePDILutPtrType >( 
+    "outlut" ) ) {
+
+    TePDITypes::TePDILutPtrType outlut;  
+    params_.GetParameter( "outlut", outlut );
+    
+    *outlut = lut;
+  }    
+
+  /* Rendering output raster */
+  
+  if( outRaster.isActive() ) {
+    if( hist_based_lut ) {
+      TEAGN_TRUE_OR_RETURN( RemapLevels( inRaster, lut, input_band, 
+        output_band, outRaster, output_raster_uses_dummy, output_raster_dummy, 
+        fixed_step_lut ), "Level remapping error" );
+    } else {
+      TEAGN_TRUE_OR_RETURN( FullRangeLutRemapLevels( inRaster, lut, 
+        input_band, output_band, outRaster, output_raster_uses_dummy, 
+        output_raster_dummy ), "Level remapping error" );    
+    }
+  }
+  
+  /* Returning the generated histogram, if required */
+  
+  if( params_.CheckParameter< TePDIHistogram::pointer >( 
+    "output_original_histogram" ) ) {
+    
+    TePDIHistogram::pointer curr_histo_ptr;
+    TEAGN_TRUE_OR_RETURN( getHistogram( curr_histo_ptr ), 
+        "Unable to get histogram" );      
+  
+    TePDIHistogram::pointer output_original_histogram;
+    params_.GetParameter( "output_original_histogram", 
+      output_original_histogram );
+    
+    (*output_original_histogram) = (*curr_histo_ptr);
+  }
+  
+  /* Returning output_enhanced_histogram, if required */
+  
+  if( params_.CheckParameter< TePDIHistogram::pointer >( 
+    "output_enhanced_histogram" ) ) {
+    
+    TePDIHistogram::pointer curr_histo_ptr;
+    TEAGN_TRUE_OR_RETURN( getHistogram( curr_histo_ptr ), 
+        "Unable to get histogram" );      
+  
+    TePDIHistogram::pointer output_enhanced_histogram;
+    params_.GetParameter( "output_enhanced_histogram", 
+      output_enhanced_histogram );
+    
+    TePDIHistogram::iterator curr_histo_it = curr_histo_ptr->begin();
+    TePDIHistogram::iterator curr_histo_it_end = curr_histo_ptr->end();
+    TePDITypes::TePDILutType::iterator lut_it_end = lut.end();
+    TePDITypes::TePDILutType::iterator found_lut_mapping_it;
+    
+    while( curr_histo_it != curr_histo_it_end ) {
+      found_lut_mapping_it = lut.find( curr_histo_it->first );
+      
+      if( found_lut_mapping_it != lut_it_end ) {
+        (*output_enhanced_histogram)[ found_lut_mapping_it->second ]
+          += curr_histo_it->second;
+      }
+    
+      ++curr_histo_it;
+    }
+  }  
+  
+  return true;
+}
+
+
+bool TePDIContrast::CheckParameters( 
+  const TePDIParameters& parameters ) const
+{
+  /* Checking input raster */
+
+  if( parameters.CheckParameter< TePDITypes::TePDIRasterPtrType >( 
+    "input_image" ) ) {
+    
+    TePDITypes::TePDIRasterPtrType inRaster;
+    
+    if( ! parameters.GetParameter( "input_image", inRaster ) ) {
+  
+      TEAGN_LOGERR( "Missing parameter: input_image" );
+      return false;
+    }
+    if( ! inRaster.isActive() ) {
+  
+      TEAGN_LOGERR( "Invalid parameter: input_image inactive" );
+      return false;
+    }
+    if( inRaster->params().status_ == TeRasterParams::TeNotReady ) {
+  
+    TEAGN_LOGERR( "Invalid parameter: input_image not ready" );
+      return false;
+    }
+    
+    /* Checking input band */
+    
+    int input_band;
+    TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "input_band", input_band ),
+      "Missing parameter: input_band" );
+    TEAGN_TRUE_OR_RETURN( ( ( input_band >= 0 ) && 
+      ( input_band < inRaster->nBands() ) ),
+      "Invalid parameter: input_band" );     
+      
+    /* Checking photometric interpretation */
+    
+    TEAGN_TRUE_OR_RETURN( ( 
+      ( inRaster->params().photometric_[ input_band ] == 
+        TeRasterParams::TeRGB ) ||
+      ( inRaster->params().photometric_[ input_band ] == 
+        TeRasterParams::TeMultiBand ) ),
+    "Invalid parameter - input_image (invalid photometric interpretation)" );    
+  }
+        
+  /* checking output raster, if present */
+  
+  TePDITypes::TePDIRasterPtrType output_image;
+  if( parameters.CheckParameter< TePDITypes::TePDIRasterPtrType >( 
+    "output_image" ) ) {
+    
+    TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "output_image", 
+      output_image ),  "Missing parameter: output_image" );
+    TEAGN_TRUE_OR_RETURN( output_image.isActive(),
+      "Invalid parameter: output_image inactive" );
+    TEAGN_TRUE_OR_RETURN( output_image->params().status_ != 
+      TeRasterParams::TeNotReady, 
+      "Invalid parameter: output_image not ready" );
+      
+    /* Checking output_band */
+    
+    int output_band;
+    TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "output_band", 
+      output_band ), "Missing parameter: output_band" );
+    TEAGN_TRUE_OR_RETURN( ( output_band >= 0 ),
+      "Invalid parameter: output_band" ); 
+      
+    /* Input raster needed if output_image is present */
+    
+    TEAGN_TRUE_OR_RETURN( 
+      parameters.CheckParameter< TePDITypes::TePDIRasterPtrType >( 
+      "input_image" ), "Missing parameter: input_image" );
+  }
+
+  /* Checking for the correct allowed contrast types */
+
+  TePDIContrastType contrast_type;
+  if( ! parameters.GetParameter( "contrast_type", contrast_type ) ) {
+    TEAGN_LOGERR( "Missing parameter: contrast_type" );
+    return false;
+  }
+  TEAGN_CHECK_NOTEQUAL( contrast_type, 0, "Invalid Contrast type" );
+  if( ( contrast_type != TePDIContrastMinMax ) &&
+      ( contrast_type != TePDIContrastLinear ) &&
+      ( contrast_type != TePDIContrastSquareRoot ) &&
+      ( contrast_type != TePDIContrastSquare ) &&
+      ( contrast_type != TePDIContrastLog ) &&
+      ( contrast_type != TePDIContrastNegative ) &&
+      ( contrast_type != TePDIContrastHistEqualizer ) &&
+      ( contrast_type != TePDIContrastSimpleSlicer ) &&
+      ( contrast_type != TePDIContrastStat ) ) {
+
+    TEAGN_LOGERR( "Invalid parameter: contrast_type" );
+    return false;
+  }
+
+  /* Checking for min and max required parameters */
+
+  if( ( contrast_type == TePDIContrastLinear ) ||
+      ( contrast_type == TePDIContrastSquareRoot ) ||
+      ( contrast_type == TePDIContrastSquare ) ||
+      ( contrast_type == TePDIContrastLog ) ||
+      ( contrast_type == TePDIContrastNegative ) ||
+      ( contrast_type == TePDIContrastSimpleSlicer ) ) {
+
+    if( ! parameters.CheckParameter< double >( "min_level" ) ) {
+
+      TEAGN_LOGERR( "Missing parameter: min_level" );
+      return false;
+    }
+    if( ! parameters.CheckParameter< double >( "max_level" ) ) {
+
+      TEAGN_LOGERR( "Missing parameter: max_level" );
+      return false;
+    }
+  }
+
+  /* Checking for RGB Palette required parameters */
+
+  if( ( contrast_type == TePDIContrastSimpleSlicer ) ) {
+    TePDIRgbPalette::pointer rgb_palette;
+
+    if( ( ! parameters.GetParameter( "rgb_palette", rgb_palette ) ) ||
+        ( ! rgb_palette.isActive() ) ) {
+
+      TEAGN_LOGERR( "Missing parameter: rgb_palette" );
+      return false;
+    }
+  }
+  
+  /* checking outlut parameter */
+  
+  if( parameters.CheckParameter< TePDITypes::TePDILutPtrType >( 
+    "outlut" ) ) {
+
+    TePDITypes::TePDILutPtrType outlut;  
+    parameters.GetParameter( "outlut", outlut );
+    
+    TEAGN_TRUE_OR_RETURN( outlut.isActive(),
+      "Invalid parameter: outlut" );
+  }
+  
+  /* checking input_histogram */
+  
+  TePDIHistogram::pointer input_histogram;
+  
+  if( parameters.CheckParameter< TePDIHistogram::pointer >( 
+    "input_histogram" ) ) {
+  
+    parameters.GetParameter( "input_histogram", input_histogram );
+    TEAGN_TRUE_OR_RETURN( input_histogram.isActive(),
+      "Invalid parameter: input_histogram" );
+    TEAGN_TRUE_OR_RETURN( ( input_histogram->size() > 0 ),
+      "Invalid parameter: input_histogram" );
+  } else {
+    /* Input raster needed if input_histogram isn't present */
+    
+    TEAGN_TRUE_OR_RETURN( 
+      parameters.CheckParameter< TePDITypes::TePDIRasterPtrType >( 
+      "input_image" ), "Missing parameter: input_image" );
+  }
+  
+  /* checking output_original_histogram */
+  
+  TePDIHistogram::pointer output_original_histogram;
+  
+  if( parameters.CheckParameter< TePDIHistogram::pointer >( 
+    "output_original_histogram" ) ) {
+  
+    parameters.GetParameter( "output_original_histogram", 
+      output_original_histogram );
+    TEAGN_TRUE_OR_RETURN( output_original_histogram.isActive(),
+      "Invalid parameter: output_original_histogram" );
+  }
+
+  /* checking output_enhanced_histogram */
+  
+  TePDIHistogram::pointer output_enhanced_histogram;
+  
+  if( parameters.CheckParameter< TePDIHistogram::pointer >( 
+    "output_enhanced_histogram" ) ) {
+  
+    parameters.GetParameter( "output_enhanced_histogram", 
+      output_enhanced_histogram );
+    TEAGN_TRUE_OR_RETURN( output_enhanced_histogram.isActive(),
+      "Invalid parameter: output_enhanced_histogram" );
+  }  
+  
+  /* Checking target_mean and target_variance */
+  
+  if( ( contrast_type == TePDIContrastStat ) ) {
+    double target_mean = 0;
+    TEAGN_TRUE_OR_RETURN( 
+      parameters.GetParameter( "target_mean", target_mean ),
+      "Missing parameter: target_mean" );
+      
+    double target_variance = 0;
+    TEAGN_TRUE_OR_RETURN( 
+      parameters.GetParameter( "target_variance", target_variance ),
+      "Missing parameter: target_variance" );      
+  }
+  
+  /* Checking input_variance */
+  
+  /* if input_variance is zero the algoritm will fail in GetStatLut */
+  
+  double input_variance = 0;
+  
+  if( parameters.CheckParameter< double >( "input_variance" ) ) {
+    parameters.GetParameter( "input_variance", input_variance );
+    
+    TEAGN_TRUE_OR_RETURN( ( input_variance != 0 ),
+      "Invalid parameter - input_variance" )
+  }
+  
+  /* Checking output_channel_min_level and output_channel_max_level */
+  
+  if( ! output_image.isActive() ) {
+  
+    TEAGN_TRUE_OR_RETURN( 
+      parameters.CheckParameter< double >( "output_channel_min_level" ),
+      "Missing parameter: output_channel_min_level" );
+    TEAGN_TRUE_OR_RETURN( 
+      parameters.CheckParameter< double >( "output_channel_max_level" ),
+      "Missing parameter: output_channel_max_level" );
+  }
+  
+  return true;
+}
+
+
+void TePDIContrast::ResetState( const TePDIParameters& params )
+{
+  if( params != params_ ) {
+    histo_ptr_.reset();
+  }
+}
+
+
+TePDITypes::TePDILutType TePDIContrast::GetMinMaxLut(
+  double output_channel_min_level, double output_channel_max_level,
+  TePDITypes::TePDILutType& base_lut )
+{
+  TEAGN_TRUE_OR_THROW( base_lut.size() != 0, "Invalid base_lut" );
+  
+  double lut_max = (-1.0) * DBL_MAX;
+  double lut_min = DBL_MAX;
+  
+  TePDITypes::TePDILutType::iterator it = base_lut.begin();
+  TePDITypes::TePDILutType::iterator it_end = base_lut.end();
+  
+  while( it != it_end ) {
+    if( it->first < lut_min ) {
+      lut_min = it->first;
+    }
+    if( it->first > lut_max ) {
+      lut_max = it->first;
+    }
+  
+    ++it;
+  }
+
+  return GetLinearLut( base_lut, lut_min,
+    lut_max, output_channel_min_level, output_channel_max_level );
+}
+
+
+TePDITypes::TePDILutType TePDIContrast::GetLinearLut(
+  TePDITypes::TePDILutType& base_lut,
+  double min, double max,
+  double output_channel_min_level, double output_channel_max_level )
+{
+  TEAGN_CHECK_NOTEQUAL( base_lut.size(), 0, "Invalid base_lut size" );
+  TEAGN_TRUE_OR_THROW( max > min, "Invalid max and min values" );
+
+  /* Calculating parameters */
+
+  unsigned int levels = base_lut.size();
+
+  double a = 0;
+  double b = 0;
+
+  if( max == min ) {
+    a = (double)levels;
+    b = -1. * ((double)levels) * min;
+  } else {
+    a = ((double)levels) / ( max - min );
+    b = ( -1. * ((double)levels) * min ) / ( max - min );
+  }
+
+  /* Generating LUT map using the existing histogram levels */
+
+  TePDITypes::TePDILutType out_lut;
+
+  TePDITypes::TePDILutType::iterator base_lut_it = base_lut.begin();
+  TePDITypes::TePDILutType::iterator base_lut_it_end = base_lut.end();
+  
+  unsigned int progress = 0;
+  double mapped_level = 0;
+  StartProgInt( "Building Linear Lut...", base_lut.size() );
+
+  while( base_lut_it != base_lut_it_end ) {
+    UpdateProgInt( progress );
+    
+    if( base_lut_it->first <= min ) {
+      out_lut[ base_lut_it->first ] = output_channel_min_level;
+    } else if( base_lut_it->first >= max ) {
+      out_lut[ base_lut_it->first ] = output_channel_max_level;
+    } else {
+      mapped_level = ( a * base_lut_it->first ) + b;
+      
+      if( mapped_level < output_channel_min_level ) {
+        mapped_level = output_channel_min_level;
+      } else if( mapped_level > output_channel_max_level ) {
+        mapped_level = output_channel_max_level;
+      }
+      
+      out_lut[ base_lut_it->first ] = mapped_level;
+    }
+
+    ++progress;
+    ++base_lut_it;
+  }
+
+  return out_lut;
+}
+
+
+TePDITypes::TePDILutType TePDIContrast::GetSquareRootLut(
+  TePDITypes::TePDILutType& base_lut,
+  double min, double max,
+  double output_channel_min_level, double output_channel_max_level )
+{
+  TEAGN_CHECK_NOTEQUAL( base_lut.size(), 0, "Invalid base_lut size" );
+  TEAGN_TRUE_OR_THROW( min < max, "Invalid min and max values" );
+
+  unsigned int levels = base_lut.size();
+
+  double factor = ((double)levels) / sqrt( max - min );
+
+  /* Generating LUT map using the existing base lut levels */
+
+  TePDITypes::TePDILutType out_lut;
+
+  TePDITypes::TePDILutType::iterator base_lut_it = base_lut.begin();
+  TePDITypes::TePDILutType::iterator base_lut_it_end = base_lut.end();
+  
+  unsigned int progress = 0;
+  double mapped_level = 0;
+  StartProgInt( "Building Square Root Lut...", base_lut.size() );  
+
+  while( base_lut_it != base_lut_it_end ) {
+    UpdateProgInt( progress );
+    
+    if( base_lut_it->first <= min ) {
+      out_lut[ base_lut_it->first ] = output_channel_min_level;
+    } else if( base_lut_it->first >= max ) {
+      out_lut[ base_lut_it->first ] = output_channel_max_level;
+    } else {
+      mapped_level = factor * sqrt( base_lut_it->first - min );
+      
+      if( mapped_level < output_channel_min_level ) {
+        mapped_level = output_channel_min_level;
+      } else if( mapped_level > output_channel_max_level ) {
+        mapped_level = output_channel_max_level;
+      }      
+      
+      out_lut[ base_lut_it->first ] = mapped_level;
+    }
+
+    ++progress;
+    ++base_lut_it;
+  }
+
+  return out_lut;
+}
+
+
+TePDITypes::TePDILutType TePDIContrast::GetSquareLut(
+  TePDITypes::TePDILutType& base_lut,
+  double min, double max,
+  double output_channel_min_level, double output_channel_max_level )
+{
+  TEAGN_CHECK_NOTEQUAL( base_lut.size(), 0, "Invalid base_lut size" );
+  TEAGN_TRUE_OR_THROW( min < max, "Invalid min and max values" );
+
+  unsigned int levels = base_lut.size();
+
+  double factor = ((double)levels) / pow( (max - min), 2 );
+
+  /* Generating LUT map using the existing base lut levels */
+
+  TePDITypes::TePDILutType out_lut;
+
+  TePDITypes::TePDILutType::iterator base_lut_it = base_lut.begin();
+  TePDITypes::TePDILutType::iterator base_lut_it_end = base_lut.end();
+
+  unsigned int progress = 0;
+  double mapped_level = 0;
+  StartProgInt( "Building Square Lut...", base_lut.size() ); 
+    
+  while( base_lut_it != base_lut_it_end ) {
+    UpdateProgInt( progress );
+    
+    if( base_lut_it->first <= min ) {
+      out_lut[ base_lut_it->first ] = output_channel_min_level;
+    } else if( base_lut_it->first >= max ) {
+      out_lut[ base_lut_it->first ] = output_channel_max_level;
+    } else {
+      mapped_level = factor * pow( base_lut_it->first - min, 2 );
+      
+      if( mapped_level < output_channel_min_level ) {
+        mapped_level = output_channel_min_level;
+      } else if( mapped_level > output_channel_max_level ) {
+        mapped_level = output_channel_max_level;
+      }        
+      
+      out_lut[ base_lut_it->first ] = mapped_level;
+    }
+
+    ++progress;
+    ++base_lut_it;
+  }
+
+  return out_lut;
+}
+
+
+TePDITypes::TePDILutType TePDIContrast::GetLogLut(
+  TePDITypes::TePDILutType& base_lut,
+  double min, double max,
+  double output_channel_min_level, double output_channel_max_level )
+{
+  TEAGN_CHECK_NOTEQUAL( base_lut.size(), 0, "Invalid base_lut size" );
+  TEAGN_TRUE_OR_THROW( max > ( min+1 ), "Invalid min and max values" );
+
+  unsigned int levels = base_lut.size();
+
+  double factor = ((double)levels) / log10( max - min + 1 );
+
+  /* Generating LUT map using the existing base_lut levels */
+
+  TePDITypes::TePDILutType out_lut;
+
+  TePDITypes::TePDILutType::iterator base_lut_it = base_lut.begin();
+  TePDITypes::TePDILutType::iterator base_lut_it_end = base_lut.end();
+
+  unsigned int progress = 0;
+  double mapped_level = 0;
+  StartProgInt( "Building Log Lut...", base_lut.size() ); 
+    
+  while( base_lut_it != base_lut_it_end ) {
+    UpdateProgInt( progress );
+    
+    if( base_lut_it->first <= min ) {
+      out_lut[ base_lut_it->first ] = output_channel_min_level;
+    } else if( base_lut_it->first >= max ) {
+      out_lut[ base_lut_it->first ] = output_channel_max_level;
+    } else {
+      mapped_level = factor * log10( base_lut_it->first - min + 1 );
+      
+      if( mapped_level < output_channel_min_level ) {
+        mapped_level = output_channel_min_level;
+      } else if( mapped_level > output_channel_max_level ) {
+        mapped_level = output_channel_max_level;
+      }        
+    
+      out_lut[ base_lut_it->first ] = mapped_level;
+    }
+
+    ++progress;
+    ++base_lut_it;
+  }
+
+  return out_lut;
+}
+
+
+TePDITypes::TePDILutType TePDIContrast::GetNegativeLut(
+  TePDITypes::TePDILutType& base_lut,
+  double min, double max,
+  double output_channel_min_level, double output_channel_max_level )
+{
+  TEAGN_CHECK_NOTEQUAL( base_lut.size(), 0, "Invalid base_lut size" );
+  TEAGN_TRUE_OR_THROW( max > min, "Invalid max and min values" );
+
+  /* Calculating parameters */
+
+  unsigned int levels = base_lut.size();
+
+  double a = -1. * ((double)levels) / ( max - min );
+  double b = ( ((double)levels) * max ) / ( max - min );
+
+  /* Generating LUT map using the existing base_lut levels */
+
+  TePDITypes::TePDILutType out_lut;
+
+  TePDITypes::TePDILutType::iterator base_lut_it = base_lut.begin();
+  TePDITypes::TePDILutType::iterator base_lut_it_end = base_lut.end();
+
+  unsigned int progress = 0;
+  double mapped_level = 0;
+  StartProgInt( "Building Negative Lut...", base_lut.size() ); 
+    
+  while( base_lut_it != base_lut_it_end ) {
+    UpdateProgInt( progress );
+    
+    if( base_lut_it->first <= min ) {
+      out_lut[ base_lut_it->first ] = output_channel_max_level;
+    } else if( base_lut_it->first >= max ) {
+      out_lut[ base_lut_it->first ] = output_channel_min_level;
+    } else {
+      mapped_level = ( a * base_lut_it->first ) + b;
+      
+      if( mapped_level < output_channel_min_level ) {
+        mapped_level = output_channel_min_level;
+      } else if( mapped_level > output_channel_max_level ) {
+        mapped_level = output_channel_max_level;
+      }
+      
+      out_lut[ base_lut_it->first ] = mapped_level;
+    }
+
+    ++progress;
+    ++base_lut_it;
+  }
+
+  return out_lut;
+}
+
+TePDITypes::TePDILutType TePDIContrast::GetHistEqualizerLut(
+  TePDIHistogram::pointer hist,
+  double output_channel_min_level, double output_channel_max_level )
+{
+  TEAGN_TRUE_OR_THROW( hist->size() > 1, "Invalid histogram size" );
+  TEAGN_TRUE_OR_THROW( ( output_channel_max_level > output_channel_min_level ),
+    "Invalid paramters output_channel_max_level <= output_channel_min_level" );
+  TEAGN_TRUE_OR_THROW( ( hist->GetMaxCount() > 0 ),
+    "Invalid histogram" );
+    
+  /* Generating the accumulative matrix */
+
+  TePDIHistogram::iterator in_hist_it = hist->begin();
+  TePDIHistogram::iterator in_hist_it_end = hist->end();
+
+  TePDIMatrix< double > accumulative_matrix;
+  TEAGN_TRUE_OR_THROW( accumulative_matrix.Reset( hist->size(), 2 ),
+    "Matrix reset error" );
+    
+  accumulative_matrix( 0, 0 ) = in_hist_it->first;
+  accumulative_matrix( 0, 1 ) = (double)in_hist_it->second;
+  ++in_hist_it;
+  
+  unsigned int accumulative_matrix_line = 1;
+  double hist_population = (double)in_hist_it->second;
+  
+  StartProgInt( "Building Histogram Equalizer Lut...", 2 * hist->size() );
+  
+  while( in_hist_it != in_hist_it_end ) { 
+    accumulative_matrix( accumulative_matrix_line, 0 ) = in_hist_it->first;
+    accumulative_matrix( accumulative_matrix_line, 1 ) =
+      accumulative_matrix( accumulative_matrix_line - 1, 1 ) +
+      (double)in_hist_it->second;
+      
+     hist_population += (double)in_hist_it->second;
+  
+    ++accumulative_matrix_line;
+    ++in_hist_it;
+    
+    IncProgInt();
+  }
+  
+  /* Creating the look-up table */
+
+  double total_levels_nmb = (double)hist->size();
+  double mapped_level = 0;
+  TePDITypes::TePDILutType out_lut;
+  
+  for( accumulative_matrix_line = 0 ; 
+    accumulative_matrix_line < accumulative_matrix.GetLines() ;
+    ++accumulative_matrix_line ) {
+    
+    mapped_level = ( accumulative_matrix( accumulative_matrix_line, 1 ) *
+      total_levels_nmb ) / hist_population;
+      
+    if( mapped_level < output_channel_min_level ) {
+      mapped_level = output_channel_min_level;
+    } else if( mapped_level > output_channel_max_level ) {
+      mapped_level = output_channel_max_level;
+    }
+    
+    out_lut[ accumulative_matrix( accumulative_matrix_line, 0 ) ] = 
+      mapped_level;
+      
+    IncProgInt();  
+  }
+  
+  StopProgInt();
+  
+  return out_lut;
+}
+
+
+void TePDIContrast::GetSimpleSlicerLut(
+  TePDIHistogram::pointer hist,
+  TePDIRgbPalette::pointer in_palette,
+  double min,
+  double max,
+  TePDITypes::TePDILutType& out_lut )
+{
+  TEAGN_TRUE_OR_THROW( ( hist->size() > 0 ), "Invalid histogram size" );
+  TEAGN_TRUE_OR_THROW( max > min, "Invalid max and min values" );
+  TEAGN_TRUE_OR_THROW( in_palette->size() > 0,
+    "Invalid input palette size" );
+
+  out_lut.clear();
+
+  /* Extracting palette levels */
+
+  std::vector< double > palette_levels;
+  TePDIRgbPalette::iterator pal_it = in_palette->begin();
+  TePDIRgbPalette::iterator pal_it_end = in_palette->end();
+  
+  unsigned int progress = 0;
+  StartProgInt( "Building Simple Slicer Lut...", hist->size() +
+    in_palette->size() );    
+
+  while( pal_it != pal_it_end ) {
+    UpdateProgInt( progress );
+    
+    palette_levels.push_back( pal_it->first );
+
+    ++progress;
+    ++pal_it;
+  }
+
+  /* min and max adjusting to the supplied histogram range */
+
+  double in_hist_max = hist->GetMaxLevel();
+  double in_hist_min = hist->GetMinLevel();
+
+  min = ( min < in_hist_min ) ? in_hist_min : min;
+  max = ( max > in_hist_max ) ? in_hist_max : max;
+
+  /* Output LUT generation */
+
+  double slice_size = ( max - min ) / ((double)in_palette->size());
+
+  double first_pal_level = palette_levels[ 0 ];
+  double last_pal_level = palette_levels[ palette_levels.size() - 1 ];
+
+  TePDIHistogram::iterator in_hist_it = hist->begin();
+  TePDIHistogram::iterator in_hist_it_end = hist->end();
+
+  double current_level;
+  unsigned int current_slice;
+  
+  while( in_hist_it != in_hist_it_end ) {
+    UpdateProgInt( progress );
+    
+    current_level = in_hist_it->first;
+
+    if( current_level < min ) {
+      out_lut[ current_level ] = first_pal_level;
+    } else if ( current_level > max ) {
+      out_lut[ current_level ] = last_pal_level;
+    } else {
+      current_slice =
+        (unsigned int) floor( ( current_level - min ) / slice_size );
+        
+      TEAGN_DEBUG_CONDITION( ( current_slice < palette_levels.size() ),
+        "Invalid current_slice=" + Te2String( current_slice ) +
+        " for pallete_levels size=" + Te2String( palette_levels.size() ) );
+
+      out_lut[ current_level ] = palette_levels[ current_slice ];
+    }
+
+    ++progress;
+    ++in_hist_it;
+  }
+}
+
+
+void TePDIContrast::GetStatLut( TePDIHistogram::pointer hist,
+  double target_mean, double target_variance, double output_channel_min_level, 
+  double output_channel_max_level, TePDITypes::TePDILutType& out_lut )
+{
+  TEAGN_CHECK_NOTEQUAL( hist->size(), 0, "Invalid histogram size" );
+
+  out_lut.clear();
+  
+  TePDIHistogram::iterator in_hist_it;
+  TePDIHistogram::iterator in_hist_it_end = hist->end(); 
+  
+  /* Calculating the total pixels number */
+  
+  unsigned int total_pixels = 0;
+  
+  in_hist_it = hist->begin();
+  
+  while( in_hist_it != in_hist_it_end ) {
+    total_pixels += in_hist_it->second;
+        
+    ++in_hist_it;
+  }
+  
+  /* Calculating the current mean */ 
+  
+  double current_mean = 0;
+  
+  if( params_.CheckParameter< double >( "input_mean" ) ) {
+    params_.GetParameter( "input_mean", current_mean );
+  } else {
+    in_hist_it = hist->begin();
+    
+    while( in_hist_it != in_hist_it_end ) {
+      current_mean += ( in_hist_it->first * ((double)in_hist_it->second) );
+        
+      ++in_hist_it;
+    }
+  
+    current_mean = current_mean / ((double)total_pixels);
+  }
+    
+  /* Calculating the current variance */ 
+        
+  double current_variance = 0;
+  
+  if( params_.CheckParameter< double >( "input_variance" ) ) {
+    params_.GetParameter( "input_variance", current_variance );
+  } else {
+    double temp_double = 0;
+    
+    in_hist_it = hist->begin();
+    
+    while( in_hist_it != in_hist_it_end ) {
+      temp_double = ( in_hist_it->first - current_mean );
+      temp_double = temp_double * temp_double * ((double)in_hist_it->second);
+      
+      current_variance += temp_double;
+        
+      ++in_hist_it;
+    }
+    
+    current_variance = current_variance / ( (double) total_pixels );
+  }
+  
+  /* Creating levels map */
+  
+  double gain = sqrt( target_variance / current_variance );
+  double offset = target_mean - ( gain * current_mean );
+  
+  in_hist_it = hist->begin();
+  
+  double current_level = 0;
+  double mapped_level = 0;
+  
+  while( in_hist_it != in_hist_it_end ) {
+    current_level = in_hist_it->first;
+    mapped_level = ( current_level * gain ) + offset;
+
+    if( mapped_level < output_channel_min_level ) {
+      out_lut[ current_level ] = output_channel_min_level;
+    } else if ( mapped_level > output_channel_max_level ) {
+      out_lut[ current_level ] = output_channel_max_level;
+    } else {
+      out_lut[ current_level ] = mapped_level;
+    }    
+  
+    ++in_hist_it;
+  }
+}
+
+
+bool TePDIContrast::RemapLevels(
+  TePDITypes::TePDIRasterPtrType& inRaster,
+  TePDITypes::TePDILutType& lut,
+  int in_channel,
+  int out_channel,
+  TePDITypes::TePDIRasterPtrType& outRaster,
+  bool use_dummy, double dummy_value, bool fixed_step_lut )
+{
+  TEAGN_TRUE_OR_RETURN( inRaster.isActive(),
+    "inRaster inactive" );
+  TEAGN_TRUE_OR_RETURN( outRaster.isActive(),
+    "outRaster inactive" );
+  TEAGN_TRUE_OR_RETURN( 
+    inRaster->params().status_ != TeRasterParams::TeNotReady,
+    "inRaster not ready" );
+  TEAGN_TRUE_OR_RETURN( 
+    ( outRaster->params().status_ != TeRasterParams::TeNotReady ),
+    "outRaster not ready" );
+    
+  TEAGN_TRUE_OR_RETURN( ( inRaster->params().nlines_ ==
+    outRaster->params().nlines_ ),
+    "Lines number mismatch between input and output image" );
+  TEAGN_TRUE_OR_RETURN( ( inRaster->params().ncols_ ==
+    outRaster->params().ncols_ ),
+    "Columns number mismatch between input and output image" );
+  TEAGN_TRUE_OR_RETURN( in_channel < inRaster->nBands(), 
+    "Invalid input band" );
+  TEAGN_TRUE_OR_RETURN( out_channel < outRaster->nBands(), 
+    "Invalid output band" );
+  TEAGN_TRUE_OR_RETURN( ( lut.size() > 1 ), "Invalid lut" );
+
+  const int raster_lines = inRaster->params().nlines_;
+  const int raster_columns = inRaster->params().ncols_;
+  
+  /* Guessing dummy use */
+  
+  bool inRaster_uses_dummy = inRaster->params().useDummy_;
+  
+  bool outRaster_uses_dummy = outRaster->params().useDummy_;
+  double outRaster_dummy = 0;
+  if( outRaster_uses_dummy ) {
+    outRaster_dummy = outRaster->params().dummy_[ out_channel ];
+  } else {
+    outRaster_dummy = dummy_value;
+  }
+  
+  /* Loading lut */
+  
+  TePDIMatrix< double > lutmatrix;
+  TEAGN_TRUE_OR_RETURN( lutmatrix.Reset( 2, lut.size(), 
+    TePDIMatrix< double >::AutoMemPol ),
+    "Unable to create lut matrix" );
+  {
+    TePDITypes::TePDILutType::iterator it = lut.begin();;
+  
+    for( unsigned int lutcol = 0 ; lutcol < lutmatrix.GetColumns() ; 
+      ++lutcol ) {
+      
+      lutmatrix( 0, lutcol ) = it->first;
+      lutmatrix( 1, lutcol ) = it->second;
+      
+      ++it;
+    }
+  }
+  
+  /* Remapping levels */
+  
+  StartProgInt( "Remapping Levels...", raster_lines );
+
+  if( fixed_step_lut ) {
+    double current_level = 0;
+    const double lut_min_level = lutmatrix( 0, 0 );
+    const double lut_max_level = lutmatrix( 0, lutmatrix.GetColumns() - 1 );
+    unsigned int best_lut_index = 0;
+    const unsigned int lutmatrix_last_index = ( lutmatrix.GetColumns() - 1 );
+    
+    double lut_step = 0;
+    if( lutmatrix.GetColumns() > 1 ) {
+      lut_step = lutmatrix( 0, 1 ) - lutmatrix( 0, 0 );
+    }
+  
+    for( int line = 0 ; line < raster_lines ; ++line ) {
+      TEAGN_FALSE_OR_RETURN( UpdateProgInt( line ), "Canceled by the user" );
+    
+      for( int column = 0 ; column < raster_columns ; ++column ) {
+        if( inRaster->getElement( column, line, current_level,
+            in_channel ) ) {
+            
+          if( use_dummy && ( current_level == dummy_value ) ) {
+            TEAGN_TRUE_OR_RETURN( outRaster->setElement( column, line,
+              outRaster_dummy, out_channel ),
+              "Level remmaping error at " + Te2String( line ) +
+              "," + Te2String( column ) );           
+          } else {
+            /* Finding the mapping level from lut */
+            
+            if( current_level < lut_min_level ) {
+              best_lut_index = 0;
+            } else if( current_level > lut_max_level ) {
+              best_lut_index = lutmatrix_last_index;
+            } else {
+              best_lut_index = ( unsigned int ) ( TeRound( ( current_level - 
+                lut_min_level ) / lut_step ) );             
+            }
+            
+            /* Pixel Output level remapping */
+            
+            TEAGN_TRUE_OR_RETURN( outRaster->setElement( column, line,
+              lutmatrix( 1, best_lut_index ), out_channel ),
+              "Level remmaping error at " + Te2String( line ) +
+              "," + Te2String( column ) );
+          }
+        } else {
+          TEAGN_TRUE_OR_RETURN( inRaster_uses_dummy, "Raster read error" );
+            
+          TEAGN_TRUE_OR_RETURN( outRaster->setElement( column, line,
+            outRaster_dummy, out_channel ),
+            "Level remmaping error at " + Te2String( line ) +
+            "," + Te2String( column ) );          
+        }
+      }
+    }
+  } else {
+    double current_level;
+    unsigned int left_element_index;
+    unsigned int middle_element_index;
+    unsigned int right_element_index;
+    const unsigned int last_valid_index = lutmatrix.GetColumns() - 1;
+    const unsigned int lut_size = lutmatrix.GetColumns();
+    double middle_element_level;
+  
+    for( int line = 0 ; line < raster_lines ; ++line ) {
+      TEAGN_FALSE_OR_RETURN( UpdateProgInt( line ), "Canceled by the user" );
+    
+      for( int column = 0 ; column < raster_columns ; ++column ) {
+        if( inRaster->getElement( column, line, current_level,
+            in_channel ) ) {
+            
+          if( use_dummy && ( current_level == dummy_value ) ) {
+            TEAGN_TRUE_OR_RETURN( outRaster->setElement( column, line,
+              outRaster_dummy, out_channel ),
+              "Level remmaping error at " + Te2String( line ) +
+              "," + Te2String( column ) );           
+          } else {            
+            /* Finding the two best mapping levels from lut */
+            
+            if( lut_size == 1 ) {
+              right_element_index = left_element_index = 1;
+            } else {
+              left_element_index = 0;
+              right_element_index = last_valid_index;
+            
+              do {
+                middle_element_index =  left_element_index + 
+                  ( ( right_element_index - left_element_index ) / 2 );
+                middle_element_level = lutmatrix( 0, middle_element_index );
+                          
+                if( current_level == middle_element_level ) {
+                  left_element_index = right_element_index = 
+                    middle_element_index;
+                  break;
+                } else if( current_level < middle_element_level ) {
+                  right_element_index = middle_element_index;
+                } else {
+                  left_element_index = middle_element_index;
+                }          
+              } while( ( right_element_index - left_element_index ) > 1 );
+            }
+            
+            /* Pixel Output level aproximation and mapping */
+            
+            if( ( current_level - lutmatrix( 0, left_element_index ) ) <
+                ( lutmatrix( 0, right_element_index ) - current_level ) ) {
+    
+              TEAGN_TRUE_OR_RETURN( outRaster->setElement( column, line,
+                lutmatrix( 1, left_element_index ), out_channel ),
+                "Level remmaping error at " + Te2String( line ) +
+                "," + Te2String( column ) );
+            } else {
+              TEAGN_TRUE_OR_RETURN( outRaster->setElement( column, line,
+                lutmatrix( 1, right_element_index ), out_channel ),
+                "Level remmaping error at " + Te2String( line ) +
+                "," + Te2String( column ) );
+            }
+          }
+        } else {
+          TEAGN_TRUE_OR_RETURN( inRaster_uses_dummy, "Raster read error" );
+          
+          TEAGN_TRUE_OR_RETURN( outRaster->setElement( column, line,
+            outRaster_dummy, out_channel ),
+            "Level remmaping error at " + Te2String( line ) +
+            "," + Te2String( column ) );          
+        }
+      }
+    }
+  }
+  
+  StopProgInt();
+  
+  return true;
+}
+
+
+bool TePDIContrast::FullRangeLutRemapLevels( 
+  TePDITypes::TePDIRasterPtrType& inRaster, TePDITypes::TePDILutType& lut,
+  int in_channel, int out_channel, TePDITypes::TePDIRasterPtrType& outRaster, 
+  bool use_dummy, double dummy_value )
+{
+  TEAGN_TRUE_OR_RETURN( inRaster.isActive(),
+    "inRaster inactive" );
+  TEAGN_TRUE_OR_RETURN( outRaster.isActive(),
+    "outRaster inactive" );
+  TEAGN_TRUE_OR_RETURN( 
+    inRaster->params().status_ != TeRasterParams::TeNotReady,
+    "inRaster not ready" );
+  TEAGN_TRUE_OR_RETURN( 
+    ( outRaster->params().status_ != TeRasterParams::TeNotReady ),
+    "outRaster not ready" );
+    
+  TEAGN_TRUE_OR_RETURN( ( inRaster->params().nlines_ ==
+    outRaster->params().nlines_ ),
+    "Lines number mismatch between input and output image" );
+  TEAGN_TRUE_OR_RETURN( ( inRaster->params().ncols_ ==
+    outRaster->params().ncols_ ),
+    "Columns number mismatch between input and output image" );
+  TEAGN_TRUE_OR_RETURN( in_channel < inRaster->nBands(), 
+    "Invalid input band" );
+  TEAGN_TRUE_OR_RETURN( out_channel < outRaster->nBands(), 
+    "Invalid output band" );
+  TEAGN_TRUE_OR_RETURN( ( lut.size() > 1 ), "Invalid lut" );
+
+  const int raster_lines = inRaster->params().nlines_;
+  const int raster_columns = inRaster->params().ncols_;
+  
+  /* Guessing dummy use */
+  
+  bool inRaster_uses_dummy = inRaster->params().useDummy_;
+  
+  bool outRaster_uses_dummy = outRaster->params().useDummy_;
+  double outRaster_dummy = 0;
+  if( outRaster_uses_dummy ) {
+    outRaster_dummy = outRaster->params().dummy_[ out_channel ];
+  } else {
+    outRaster_dummy = dummy_value;
+  }
+  
+  /* Loading lut */
+  
+  TePDIMatrix< double > lutmatrix;
+  TEAGN_TRUE_OR_RETURN( lutmatrix.Reset( 2, lut.size(), 
+    TePDIMatrix< double >::AutoMemPol ),
+    "Unable to create lut matrix" );
+  {
+    TePDITypes::TePDILutType::iterator it = lut.begin();;
+  
+    for( unsigned int lutcol = 0 ; lutcol < lutmatrix.GetColumns() ; 
+      ++lutcol ) {
+      
+      lutmatrix( 0, lutcol ) = it->first;
+      lutmatrix( 1, lutcol ) = it->second;
+      
+      ++it;
+    }
+  }
+  
+  /* Remapping levels */
+  
+  TeRaster& inRaster_ref = *inRaster;
+  TeRaster& outRaster_ref = *outRaster;
+  int line = 0;
+  int column = 0 ;
+  double current_level = 0;
+  
+  StartProgInt( "Remapping Levels...", raster_lines );
+  
+  for( line = 0 ; line < raster_lines ; ++line ) {
+    TEAGN_FALSE_OR_RETURN( UpdateProgInt( line ), "Canceled by the user" );
+    
+    for( column = 0 ; column < raster_columns ; ++column ) {
+      if( inRaster_ref.getElement( column, line, current_level,
+        in_channel ) ) { 
+        
+        if( use_dummy && ( current_level == dummy_value ) ) {
+          TEAGN_TRUE_OR_RETURN( outRaster_ref.setElement( column, line,
+            outRaster_dummy, out_channel ),
+            "Level remmaping error at " + Te2String( line ) +
+            "," + Te2String( column ) );       
+        } else {
+          TEAGN_DEBUG_CONDITION( ( ( (unsigned int)current_level ) <
+            lutmatrix.GetColumns() ), "Level out of lut range" );
+          TEAGN_DEBUG_CONDITION( 
+            ( lutmatrix( 0, ( (unsigned int)current_level ) ) ==
+            ( (unsigned int)current_level ) ), 
+            "Requested value not found inside lut" );
+          
+          TEAGN_TRUE_OR_RETURN( outRaster_ref.setElement( column, line,
+            lutmatrix( 1, ( (unsigned int)current_level ) ), out_channel ),
+            "Level remmaping error at " + Te2String( line ) +
+            "," + Te2String( column ) );          
+        }
+      } else {
+        TEAGN_TRUE_OR_RETURN( inRaster_uses_dummy, "Raster read error" );
+            
+        TEAGN_TRUE_OR_RETURN( outRaster_ref.setElement( column, line,
+          outRaster_dummy, out_channel ),
+          "Level remmaping error at " + Te2String( line ) +
+          "," + Te2String( column ) );       
+      }
+    }
+  }
+  
+  StopProgInt();
+  
+  return true;  
+}
+
+
+bool TePDIContrast::getHistogram( TePDIHistogram::pointer& hist )
+{
+  if( ! histo_ptr_.isActive() ) {
+    if( params_.CheckParameter< TePDIHistogram::pointer >( 
+      "input_histogram" ) ) {
+    
+      params_.GetParameter( "input_histogram", histo_ptr_ );
+    } else {
+      /* No histogram supplied, we need to generate it */
+  
+      TePDITypes::TePDIRasterPtrType inRaster;
+      TEAGN_TRUE_OR_RETURN( params_.GetParameter( "input_image", inRaster ),
+        "Missing parameter : input_image" );
+      
+      int input_band = 0;
+      TEAGN_TRUE_OR_RETURN( params_.GetParameter( "input_band", input_band ),
+        "Missing parameter : input_band" );
+      
+      int histo_levels = 0;
+      if( ( inRaster->params().dataType_[ input_band ] == TeFLOAT ) ||
+        ( inRaster->params().dataType_[ input_band ] == TeDOUBLE ) ) {
+        
+        histo_levels = 256;
+      }
+      if( params_.CheckParameter< int >( "histo_levels" ) ) {
+        params_.GetParameter( "histo_levels", histo_levels );
+      }
+      
+      histo_ptr_.reset( new TePDIHistogram );
+      TEAGN_TRUE_OR_RETURN( 
+        histo_ptr_->reset( inRaster, input_band, 
+        (unsigned int)histo_levels, 
+        false, TeBoxPixelIn ), "Histogram generation error" );
+    }
+  }
+  
+  hist = histo_ptr_;
+  
+  return true;
+}
+
+bool TePDIContrast::getBaseLut( TePDITypes::TePDILutType& lut,
+  bool& hist_based_lut )
+{
+  lut.clear();
+  
+  if( params_.CheckParameter< TePDIHistogram::pointer >( 
+    "input_histogram" ) ) {
+  
+    TePDIHistogram::pointer hist;
+    TEAGN_TRUE_OR_RETURN( getHistogram( hist ), "Unable to get histogram" );    
+    
+    TePDIHistogram::iterator it = hist->begin();
+    TePDIHistogram::iterator it_end = hist->end();
+      
+    while( it != it_end ) {
+      lut[ it->first ] = it->first;
+    
+      ++it;
+    }
+      
+    hist_based_lut = true;    
+  } else {
+    TePDITypes::TePDIRasterPtrType inRaster;
+    params_.GetParameter( "input_image", inRaster );
+    
+    int input_band = 0;
+    params_.GetParameter( "input_band", input_band );
+      
+    switch( inRaster->params().dataType_[ input_band ] ) {
+      case TeBIT :
+      case TeUNSIGNEDCHAR :
+      case TeUNSIGNEDSHORT :
+      {
+        unsigned int lut_size = (unsigned int)( 
+          pow( 2.0, (double)( inRaster->params().elementSize( input_band ) * 
+          8 ) ) );
+      
+        for( unsigned int index = 0 ; index < lut_size ; ++index ) {
+          lut[ index ] = index;
+        }
+            
+        hist_based_lut = false;
+        
+        break;
+      }
+      case TeCHAR :
+      case TeSHORT :      
+      case TeINTEGER :
+      case TeLONG :
+      case TeUNSIGNEDLONG :
+      case TeFLOAT :
+      case TeDOUBLE :
+      {
+        TePDIHistogram::pointer hist;
+        TEAGN_TRUE_OR_RETURN( getHistogram( hist ), "Unable to get histogram" );
+        
+        TePDIHistogram::iterator it = hist->begin();
+        TePDIHistogram::iterator it_end = hist->end();
+        
+        while( it != it_end ) {
+          lut[ it->first ] = it->first;
+      
+          ++it;
+        }
+        
+        hist_based_lut = true;
+        
+        break;
+      }
+      default :
+      {
+        TEAGN_LOG_AND_THROW( "Invalid raster pixel type" );
+        break;
+      }
+    }
+  }
+  
+  return true;
+}
+
diff --git a/src/terralib/image_processing/TePDIContrast.hpp b/src/terralib/image_processing/TePDIContrast.hpp
new file mode 100755
index 0000000..1fcc619
--- /dev/null
+++ b/src/terralib/image_processing/TePDIContrast.hpp
@@ -0,0 +1,411 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDICONTRAST_HPP
+  #define TEPDICONTRAST_HPP
+
+  #include "TePDIAlgorithm.hpp"
+  #include "TePDIRgbPalette.hpp"
+  #include "TePDITypes.hpp"
+  #include <TeSharedPtr.h>
+  #include "TePDIHistogram.hpp"
+
+  /**
+   * @brief  This is the class for contrast image processing algorithms.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup TePDIGeneralAlgoGroup
+   *
+   * @note The general input parameters are:
+   *
+   * @param contrast_type ( TePDIContrast::TePDIContrastType ) - The contrast 
+   * to be generated.
+   * @param input_image (TePDITypes::TePDIRasterPtrType) - The input
+   * image.
+   * @param input_band ( int ) - Band to process from input_image.
+   *
+   * @note The specific input parameters ( by parameter type ):
+   *
+   * @param min_level (double) - Minimal level for Linear Luts.
+   * Required by: TePDIContrastLinear, TePDIContrastSquareRoot,
+   * TePDIContrastSquare, TePDIContrastLog, TePDIContrastNegative,
+   * TePDIContrastSimpleSlicer.
+   *
+   * @param max_level (double) - Minimal level for Linear Luts.
+   * Required by: TePDIContrastLinear, TePDIContrastSquareRoot,
+   * TePDIContrastSquare, TePDIContrastLog, TePDIContrastNegative,
+   * TePDIContrastSimpleSlicer.
+   *
+   * @param rgb_palette (TePDIRgbPalette::pointer) -
+   * Reference RGB palette.
+   * Required by: TePDIContrastSimpleSlicer.
+   *
+   * @param target_mean ( double ) - The target mean value.
+   * Required by: TePDIContrastStat.
+   *
+   * @param target_variance ( double ) - The target variance value.
+   * Required by: TePDIContrastStat.
+   *
+   * @note The following parameters are optional and will be used if present.
+   *
+   * @param output_image ( TePDITypes::TePDIRasterPtrType ) -
+   * The output image ( if not present, only the output LUT will be
+   * generated ).   
+   *
+   * @param output_band ( int ) - Band to save the result inside output_image
+   * (required if output_image is present).
+   *
+   * @param restrict_out_reset (int) - If present (any value),
+   * a restrictive output_image reset will be done
+   * ( output_image reset will not be done if all of the following 
+   * conditions are satisfied - Exact number of lines, exact number
+   * of columns, sufficient number of bands, same projection, same box,
+   * dummy value ), 
+   * this allows output_image data keeping since
+   * unused bands are not changed.
+   *
+   * @param outlut ( TePDITypes::TePDILutPtrType ) - The generated look-up
+   * table. NOTE: If the current input_image has floating point pixel values,
+   * the generated look-up table will have interpolated values.
+   *
+   * @param input_histogram ( TePDIHistogram::pointer ) - A pointer to an
+   * active histogram instance that will be used when generating the
+   * internal lut - The internal histogram generation will be disabled.
+   *
+   * @param output_original_histogram ( TePDIHistogram::pointer ) - A 
+   * pointer to an active output histogram instance that will be filled 
+   * with the internally generated histogram from the input image or
+   * using the supplied input histogram.
+   *
+   * @param output_enhanced_histogram ( TePDIHistogram::pointer ) - A 
+   * pointer to an active output histogram instance that will be filled 
+   * with the internally generated histogram from the input image or
+   * using the supplied input histogram.   
+   *
+   * @param histo_levels (int) - Number of histogram levels when internal
+   * histogram generation is needed ( if zero, the histogram levels
+   * will be automatically found. In this case, for floating point rasters the
+   * number of levels will be always 256 ).
+   *
+   * @param dummy_value (double) - A dummy pixel value for use 
+   * in pixels where no data is available.    
+   *
+   * @param input_mean ( double ) - Force the algorithm to use the supplied
+   * value as mean for the current raster (The internal mean calcule will
+   * be disabled ).
+   * Used by: TePDIContrastStat.
+   *
+   * @param input_variance ( double ) - Force the algorithm to use the supplied
+   * value as variance for the current raster ( The internal variance calcule
+   * will be disabled ).
+   * Used by: TePDIContrastStat.      
+   *
+   * @param output_channel_min_level ( double ) - Force the miminum output
+   * gray level to be the supplied value (required if 
+   * output_image is not present).
+   *
+   * @param output_channel_max_level ( double ) - Force the maximum output
+   * gray level to be the supplied value (required if 
+   * output_image is not present).
+   */
+  class PDI_DLL TePDIContrast : public TePDIAlgorithm {
+    public :
+
+      /**
+       * @enum Allowed contrast types.
+       */
+      enum TePDIContrastType{
+        /** The histogram range will be changed to the supplied 
+            min/max range ( linear function ). */
+        TePDIContrastMinMax = 1,
+        /** The histogram will be remapped using a linear function. */
+        TePDIContrastLinear = 2,
+        /** The histogram will be remapped using a square root function. */
+        TePDIContrastSquareRoot = 3,
+        /** The histogram will be remapped using a square function. */
+        TePDIContrastSquare = 4,
+        /** The histogram will be remapped using a logarithmic function. */
+        TePDIContrastLog = 5,
+        /** The histogram will be remapped using a linear inverse function. */
+        TePDIContrastNegative = 6,
+        /** The uniform histogram aproximation. */
+        TePDIContrastHistEqualizer = 7,
+        /** The histogram values will be splitted into slices and linked with
+            a RGB color table. */
+        TePDIContrastSimpleSlicer = 8,
+        /** Image mean and variance uniformization. */
+        TePDIContrastStat = 9
+      };
+
+      /**
+       * @brief Default Constructor.
+       *
+       */
+      TePDIContrast();
+
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIContrast();
+
+      /**
+       * @brief Checks if the supplied parameters fits the requirements of each
+       * PDI algorithm implementation.
+       *
+       * @note Error log messages must be generated. No exceptions generated.
+       *
+       * @param parameters The parameters to be checked.
+       * @return true if the parameters are OK. false if not.
+       */
+      bool CheckParameters( const TePDIParameters& parameters ) const;
+
+    protected :
+    
+      /**
+       * @brief A pointer to the current generated histogram.
+       */    
+      TePDIHistogram::pointer histo_ptr_;
+
+      /**
+       * @brief Runs the current algorithm implementation.
+       *
+       * @return true if OK. false on error.
+       */
+      bool RunImplementation();
+
+      /**
+       * @brief Reset the internal state to the initial state.
+       *
+       * @param params The new parameters referente at initial state.
+       */
+      void ResetState( const TePDIParameters& params );
+
+      /**
+       * @brief Build a min-max look-up table.
+       *
+       * @param channel_min_level The minimum channel possible level value.
+       * @param channel_max_level The maximum channel possible level value.
+       * @param base_lut Base lut.
+       * @return  The look-up table.
+       */
+      TePDITypes::TePDILutType GetMinMaxLut(
+        double channel_min_level, double channel_max_level,
+        TePDITypes::TePDILutType& base_lut );
+
+      /**
+       * @brief Build a Linear look-up table.
+       *
+       * @param min Minimal level value.
+       * @param max Maximum level value.
+       * @param channel_min_level The minimum channel possible level value.
+       * @param channel_max_level The maximum channel possible level value.
+       * @param base_lut Base lut.
+       * @return The look-up table.
+       */
+      TePDITypes::TePDILutType GetLinearLut(
+        TePDITypes::TePDILutType& base_lut,
+        double min, double max,
+        double channel_min_level, double channel_max_level );
+
+      /**
+       * @brief Build a Square Root look-up table.
+       *
+       * @param min Minimal level value.
+       * @param max Maximum level value.
+       * @param channel_min_level The minimum channel possible level value.
+       * @param channel_max_level The maximum channel possible level value.
+       * @param base_lut Base lut.
+       * @return The look-up table.
+       */
+      TePDITypes::TePDILutType GetSquareRootLut(
+        TePDITypes::TePDILutType& base_lut,
+        double min, double max,
+        double channel_min_level, double channel_max_level );
+
+      /**
+       * @brief Build a Square look-up table.
+       *
+       * @param min Minimal level value.
+       * @param max Maximum level value.
+       * @param channel_min_level The minimum channel possible level value.
+       * @param channel_max_level The maximum channel possible level value.
+       * @param base_lut Base lut.
+       * @return The look-up table.
+       */
+      TePDITypes::TePDILutType GetSquareLut(
+        TePDITypes::TePDILutType& base_lut,
+        double min, double max,
+        double channel_min_level, double channel_max_level );
+
+      /**
+       * @brief Build a Log look-up table.
+       *
+       * @param min Minimal level value.
+       * @param max Maximum level value.
+       * @param channel_min_level The minimum channel possible level value.
+       * @param channel_max_level The maximum channel possible level value.
+       * @param base_lut Base lut.
+       * @return The look-up table.
+       */
+      TePDITypes::TePDILutType GetLogLut(
+        TePDITypes::TePDILutType& base_lut,
+        double min, double max,
+        double channel_min_level, double channel_max_level );
+
+      /**
+       * @brief Build a Negative look-up table.
+       *
+       * @param min Minimal level value.
+       * @param max Maximum level value.
+       * @param channel_min_level The minimum channel possible level value.
+       * @param channel_max_level The maximum channel possible level value.
+       * @param base_lut Base lut.
+       * @return The look-up table.
+       */
+      TePDITypes::TePDILutType GetNegativeLut(
+        TePDITypes::TePDILutType& base_lut,
+        double min, double max,
+        double channel_min_level, double channel_max_level );
+
+      /**
+       * @brief Build a Histogram equalizer look-up table.
+       *
+       * @param channel_min_level The minimum channel possible level value.
+       * @param channel_max_level The maximum channel possible level value.       
+       * @param hist A LEVEL-ORDERED Base histogram.
+       * @return The look-up table.
+       */
+      TePDITypes::TePDILutType GetHistEqualizerLut(
+        TePDIHistogram::pointer hist,
+        double channel_min_level, double channel_max_level );
+
+      /**
+       * @brief Builds a Simple slicer look-up table.
+       *
+       * @param hist A LEVEL-ORDERED Base histogram.
+       * @param in_palette The reference RGB palette.
+       * @param min Minimal level value.
+       * @param max Maximum level value.
+       * @param out_lut The look-up table.
+       */
+      void GetSimpleSlicerLut(
+        TePDIHistogram::pointer hist,
+        TePDIRgbPalette::pointer in_palette,
+        double min,
+        double max,
+        TePDITypes::TePDILutType& out_lut );
+        
+      /**
+       * @brief Builds a mean and variance normalization lut.
+       *
+       * @param hist A LEVEL-ORDERED Base histogram.
+       * @param target_mean The target mean value.
+       * @param target_variance The target variance value.
+       * @param channel_min_level The minimum channel possible level value.
+       * @param channel_max_level The maximum channel possible level value.       
+       * @param out_lut The look-up table.
+       */
+      void GetStatLut( TePDIHistogram::pointer hist, double target_mean,
+        double target_variance, double channel_min_level, 
+        double channel_max_level, TePDITypes::TePDILutType& out_lut );        
+        
+      /**
+       * @brief Do level remapping from one raster to another.
+       *
+       * @param inRaster The input Raster.
+       * @param outRaster The Output Raster.
+       * @param lut The increasing level-ordered look-up table.
+       * @param in_channel in_raster channel to remap.
+       * @param out_channel out_raster channel to write on.
+       * @param use_dummy Force a new dummy value use ( input pixels with
+       * dummy values will be ignored ).
+       * @param dummy_value A dummy pixel value for use in pixels where no data 
+       * is available.
+       * @param fixed_step_lut A flag indication of a fixed step lut ( the
+       * internal optimized fixed step algorithm will be used )
+       * @return true if ok, false on errors.
+       */
+      bool RemapLevels(
+        TePDITypes::TePDIRasterPtrType& inRaster,
+        TePDITypes::TePDILutType& lut,
+        int in_channel,
+        int out_channel,
+        TePDITypes::TePDIRasterPtrType& outRaster,
+        bool use_dummy, double dummy_value,
+        bool fixed_step_lut );
+        
+      /**
+       * @brief Do level remapping from one raster to another.
+       *
+       * @note For luts having full channel range (contains mappings
+       * for all possible ordered gray scale values, starting from zero ).
+       *
+       * @param inRaster The input Raster.
+       * @param outRaster The Output Raster.
+       * @param lut The increasing level-ordered look-up table.
+       * @param in_channel in_raster channel to remap.
+       * @param out_channel out_raster channel to write on.
+       * @param use_dummy Force a new dummy value use ( input pixels with
+       * dummy values will be ignored ).
+       * @param dummy_value A dummy pixel value for use in pixels where no data 
+       * is available.
+       * @return true if ok, false on errors.
+       */
+      bool FullRangeLutRemapLevels(
+        TePDITypes::TePDIRasterPtrType& inRaster,
+        TePDITypes::TePDILutType& lut,
+        int in_channel,
+        int out_channel,
+        TePDITypes::TePDIRasterPtrType& outRaster,
+        bool use_dummy, double dummy_value );        
+        
+      /**
+       * @brief Returns a valid histogram using the given algorithm input 
+       * parameters.
+       *
+       * @param hist The generated Histogram.
+       * @return true if ok, false on errors.
+       */        
+      bool getHistogram( TePDIHistogram::pointer& hist );
+      
+      /**
+       * @brief Returns valid dummy base lut from the given algorithm input 
+       * parameters.
+       * @note The dummy lut contains dummy mappings for all grey levels
+       * following the algorithm input parameters.
+       *
+       * @param lut The generated dummy lut.
+       * @param hist_based_lut A false value means the lut has all
+       * possible gray levels ( including the unused ones ), true value means
+       * that the lut was build using the image histogram witch may contain
+       * only the used gray values or the interpolated values.
+       * @return true if ok, false on errors.
+       */        
+      bool getBaseLut( TePDITypes::TePDILutType& lut, bool& hist_based_lut );      
+  };
+  
+/** @example TePDIContrast_test.cpp
+ *    Shows how to use this class.
+ */    
+
+#endif //TEPDICONTRAST_HPP
diff --git a/src/terralib/image_processing/TePDIContrastFactory.cpp b/src/terralib/image_processing/TePDIContrastFactory.cpp
new file mode 100755
index 0000000..e630fac
--- /dev/null
+++ b/src/terralib/image_processing/TePDIContrastFactory.cpp
@@ -0,0 +1,24 @@
+ 
+#include "TePDIContrastFactory.hpp"
+#include "TePDIContrast.hpp"
+#include <TeAgnostic.h>
+
+TePDIContrastFactory::TePDIContrastFactory()
+: TePDIAlgorithmFactory( std::string( "TePDIContrast" ) )
+{
+};      
+
+TePDIContrastFactory::~TePDIContrastFactory()
+{
+};
+
+
+TePDIAlgorithm* TePDIContrastFactory::build ( const TePDIParameters& arg )
+{
+  TePDIAlgorithm* instance_ptr = new TePDIContrast();
+  
+  TEAGN_TRUE_OR_THROW( instance_ptr->Reset( arg ),
+    "Invalid parameters" );
+  
+  return instance_ptr;
+}
diff --git a/src/terralib/image_processing/TePDIContrastFactory.hpp b/src/terralib/image_processing/TePDIContrastFactory.hpp
new file mode 100755
index 0000000..c41748d
--- /dev/null
+++ b/src/terralib/image_processing/TePDIContrastFactory.hpp
@@ -0,0 +1,67 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDICONTRASTFACTORY_HPP
+  #define TEPDICONTRASTFACTORY_HPP
+
+  #include <TeSharedPtr.h>
+  #include "TePDIAlgorithmFactory.hpp"
+  #include "TePDIParameters.hpp"
+  
+  /**
+   * @brief This is the class for contrast algorithms factory.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIAlgorithmsFactories
+   */
+  class PDI_DLL TePDIContrastFactory : public TePDIAlgorithmFactory
+  {
+    public :
+      
+      /**
+       * @brief Default constructor
+       */
+      TePDIContrastFactory();      
+      
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIContrastFactory();
+      
+      protected :  
+      /**
+       * @brief Implementation for the abstract TeFactory::build.
+       *
+       * @param arg A const reference to the parameters used by the
+       * algorithm.
+       * @return A pointer to the new generated algorithm instance.
+       */
+      TePDIAlgorithm* build( const TePDIParameters& arg );
+      
+  };
+  
+  namespace {
+    static TePDIContrastFactory TePDIContrastFactory_instance;
+  };  
+
+#endif
diff --git a/src/terralib/image_processing/TePDICorrelationMatching.cpp b/src/terralib/image_processing/TePDICorrelationMatching.cpp
new file mode 100644
index 0000000..cf7a023
--- /dev/null
+++ b/src/terralib/image_processing/TePDICorrelationMatching.cpp
@@ -0,0 +1,1027 @@
+#include "TePDICorrelationMatching.hpp"
+
+#include "TePDIUtils.hpp"
+
+#include <TeThreadFunctor.h>
+#include <TeMutex.h>
+#include <TeCoord2D.h>
+
+#include <math.h>
+
+
+TePDICorrelationMatching::TePDICorrelationMatching()
+{
+}
+
+
+TePDICorrelationMatching::~TePDICorrelationMatching()
+{
+}
+
+
+bool TePDICorrelationMatching::RunImplementation()
+{
+  /* Retriving Parameters */
+  
+  TePDITypes::TePDIRasterPtrType input_image1_ptr;
+  params_.GetParameter( "input_image1_ptr", input_image1_ptr );  
+  
+  unsigned int input_channel1 = 0;
+  params_.GetParameter( "input_channel1", input_channel1 );   
+  
+  TePDITypes::TePDIRasterPtrType input_image2_ptr;
+  params_.GetParameter( "input_image2_ptr", input_image2_ptr );  
+  
+  unsigned int input_channel2 = 0;
+  params_.GetParameter( "input_channel2", input_channel2 );   
+
+  TeSharedPtr< TeCoordPairVect > out_tie_points_ptr;
+  params_.GetParameter( "out_tie_points_ptr", out_tie_points_ptr );   
+  
+  TeBox input_box1;
+  if( params_.CheckParameter< TeBox >( "input_box1" ) ) {
+    params_.GetParameter( "input_box1", input_box1 );
+  } else {
+    TeBox input_box1_proj = input_image1_ptr->params().box();
+    
+    TePDIUtils::MapCoords2RasterIndexes( input_box1_proj, input_image1_ptr,
+      input_box1 );
+  }
+  
+  TeBox input_box2;
+  if( params_.CheckParameter< TeBox >( "input_box2" ) ) {
+    params_.GetParameter( "input_box2", input_box2 );
+  } else {
+    TeBox input_box2_proj = input_image2_ptr->params().box();
+    
+    TePDIUtils::MapCoords2RasterIndexes( input_box2_proj, input_image2_ptr,
+      input_box2 );
+  }  
+  
+  bool enable_multi_thread = false;
+  if( params_.CheckParameter< int >( "enable_multi_thread" ) ) {
+    enable_multi_thread = true;
+  }
+  
+  double pixel_x_relation = 1.0;
+  if( params_.CheckParameter< double >( "pixel_x_relation" ) ) {
+    params_.GetParameter( "pixel_x_relation", pixel_x_relation );
+  }
+  
+  double pixel_y_relation = 1.0;
+  if( params_.CheckParameter< double >( "pixel_y_relation" ) ) {
+    params_.GetParameter( "pixel_y_relation", pixel_y_relation );
+  }  
+  
+  unsigned int max_size_opt = 0;
+  if( params_.CheckParameter< unsigned int >( "max_size_opt" ) ) {
+    params_.GetParameter( "max_size_opt", max_size_opt );
+  }   
+  
+  /* Calculating the number of allowed threads - this process
+     not included into the count */
+     
+  unsigned int max_threads = 0;
+  std::vector< TeThreadFunctor::pointer > threads_vector;
+  
+  if( enable_multi_thread ) {
+    max_threads = TeGetPhysProcNumber() - 1;
+    
+    for( unsigned int index = 0 ; index < max_threads ; ++index ) {
+      TeThreadFunctor::pointer aux_thread_ptr( new TeThreadFunctor );
+    
+      threads_vector.push_back( aux_thread_ptr );
+    }
+  }
+  
+  /* Calculating the box postion related values */
+  
+  const unsigned int orig_box1_x_off = (unsigned int)input_box1.lowerLeft().x();
+  const unsigned int orig_box1_y_off = (unsigned int)input_box1.upperRight().y();
+  const unsigned int orig_box1_nlines = 1 + (unsigned int)ABS( input_box1.height() );
+  const unsigned int orig_box1_ncols = 1 + (unsigned int)ABS( input_box1.width() );
+  
+  const unsigned int orig_box2_x_off = (unsigned int)input_box2.lowerLeft().x();
+  const unsigned int orig_box2_y_off = (unsigned int)input_box2.upperRight().y();
+  const unsigned int orig_box2_nlines = 1 + (unsigned int)ABS( input_box2.height() );
+  const unsigned int orig_box2_ncols = 1 + (unsigned int)ABS( input_box2.width() );
+    
+  /* Calculating the rescale factors 
+     rescaled_image = original_image * rescale_factor */
+  
+  double img1_x_rescale_factor = 1.0;
+  double img1_y_rescale_factor = 1.0;
+  double img2_x_rescale_factor = 1.0;
+  double img2_y_rescale_factor = 1.0;
+  {
+    double mean_pixel_relation = ( pixel_x_relation + pixel_y_relation ) /
+      2.0;
+      
+    if( mean_pixel_relation > 1.0 ) {
+      /* The image 1 has poor resolution - bigger pixel resolution values -
+         and image 2 needs to be rescaled down */
+      
+      img2_x_rescale_factor = 1.0 / pixel_x_relation;
+      img2_y_rescale_factor = 1.0 / pixel_y_relation;
+    } else if( mean_pixel_relation < 1.0 ) {
+      /* The image 2 has poor resolution - bigger pixel resolution values
+        and image 1 needs to be rescaled down */
+      
+      img1_x_rescale_factor = pixel_x_relation;
+      img1_y_rescale_factor = pixel_y_relation;
+    }
+  } 
+  
+  if( max_size_opt )
+  {
+    double resc_box1_size = 
+      ( (double)orig_box1_nlines  ) * img1_y_rescale_factor *
+      ( (double)orig_box1_ncols ) * img1_x_rescale_factor;
+    double resc_box2_size = 
+      ( (double)orig_box2_nlines  ) * img2_y_rescale_factor *
+      ( (double)orig_box2_ncols ) * img2_x_rescale_factor;
+    double max_size_opt_double = (double)max_size_opt;
+    
+    if( ( resc_box1_size > max_size_opt_double ) || 
+      ( resc_box2_size > max_size_opt_double ) )
+    {
+      double opt_rescale_factor = 1.0;
+      
+      if( resc_box1_size > resc_box2_size )
+      {
+        opt_rescale_factor = sqrt( resc_box1_size / max_size_opt_double );
+      }
+      else
+      {
+        opt_rescale_factor = sqrt( resc_box2_size / max_size_opt_double );
+      }
+      
+      img1_x_rescale_factor *= opt_rescale_factor;
+      img1_y_rescale_factor *= opt_rescale_factor;
+      img2_x_rescale_factor *= opt_rescale_factor;
+      img2_y_rescale_factor *= opt_rescale_factor;
+    }
+  }
+  
+  /* Checking if the small matrix fits inside the bigger one */
+  
+  {
+    unsigned int resc_box1_nlines = (unsigned int) ceil( 
+      ( (double)orig_box1_nlines ) * img1_y_rescale_factor );
+    unsigned int resc_box1_ncols = (unsigned int) ceil( 
+      ( (double)orig_box1_ncols ) * img1_x_rescale_factor );     
+    unsigned int resc_box2_nlines = (unsigned int) ceil( 
+      ( (double)orig_box2_nlines ) * img2_y_rescale_factor );
+    unsigned int resc_box2_ncols = (unsigned int) ceil( 
+      ( (double)orig_box2_ncols ) * img2_x_rescale_factor );   
+        
+    const unsigned int m1size = resc_box1_nlines * 
+      resc_box1_ncols;
+    const unsigned int m2size = resc_box2_nlines * 
+      resc_box2_ncols;      
+      
+    if( m1size < m2size )
+    {
+      if( ( resc_box1_ncols > resc_box2_ncols ) ||
+        ( resc_box1_nlines > resc_box2_nlines ) )
+      {
+        return true;
+      }
+    } 
+    else
+    {
+      if( ( resc_box2_ncols > resc_box1_ncols ) ||
+        ( resc_box2_nlines > resc_box1_nlines ) )
+      {
+        return true;
+      }    
+    }
+  }  
+  
+  /* Loading images */
+  
+  TeMutex glb_mem_lock; //global memory lock
+  
+  ImgMatrixT img1_matrix;
+  ImgMatrixT img2_matrix;
+ 
+  {
+    TeThreadParameters tparams1;
+    tparams1.store( "input_image_ptr", input_image1_ptr );
+    tparams1.store( "img_matrix_ptr", &img1_matrix );
+    tparams1.store( "img_x_rescale_factor", img1_x_rescale_factor );
+    tparams1.store( "img_y_rescale_factor", img1_y_rescale_factor );
+    tparams1.store( "box_x_off", orig_box1_x_off );
+    tparams1.store( "box_y_off", orig_box1_y_off );
+    tparams1.store( "box_nlines", orig_box1_nlines );
+    tparams1.store( "box_ncols", orig_box1_ncols );
+    tparams1.store( "input_channel", input_channel1 );
+    tparams1.store( "progress_enabled", progress_enabled_ );
+    tparams1.store( "glb_mem_lock_ptr", &glb_mem_lock );
+    
+    TeThreadParameters tparams2;
+    tparams2.store( "input_image_ptr", input_image2_ptr );
+    tparams2.store( "img_matrix_ptr", &img2_matrix );
+    tparams2.store( "img_x_rescale_factor", img2_x_rescale_factor );
+    tparams2.store( "img_y_rescale_factor", img2_y_rescale_factor );
+    tparams2.store( "box_x_off", orig_box2_x_off );
+    tparams2.store( "box_y_off", orig_box2_y_off );
+    tparams2.store( "box_nlines", orig_box2_nlines );
+    tparams2.store( "box_ncols", orig_box2_ncols );
+    tparams2.store( "input_channel", input_channel2 );
+    tparams2.store( "progress_enabled", progress_enabled_ );
+    tparams2.store( "glb_mem_lock_ptr", &glb_mem_lock );
+  
+    if( max_threads > 0 ) {
+      threads_vector[ 0 ]->setStartFunctPtr( loadImage );
+      threads_vector[ 0 ]->setParameters( tparams1 );
+      threads_vector[ 0 ]->start();
+   
+      if( ! loadImage( tparams2 ) ) {
+        threads_vector[ 0 ]->waitToFinish();
+        
+        TEAGN_LOG_AND_RETURN( "Unable to load image 2" )
+      } else {
+        threads_vector[ 0 ]->waitToFinish();
+        
+        TEAGN_TRUE_OR_RETURN( threads_vector[ 0 ]->getReturnValue(),
+          "Unable to load image 1" )
+      }
+    } else {
+      TEAGN_TRUE_OR_RETURN( loadImage( tparams1 ),
+        "Error loading image 1" )
+      TEAGN_TRUE_OR_RETURN( loadImage( tparams2 ),
+        "Error loading image 2" )
+    }
+  }
+  
+/* remove */        
+//matrix2Tiff( img1_matrix, "img1_matrix.tif", 
+//  std::vector< TeCoord2D >() );
+//matrix2Tiff( img2_matrix, "img2_matrix.tif",
+//  std::vector< TeCoord2D >() );
+/* remove */  
+  
+  /* Correlating areas */
+  
+  out_tie_points_ptr->clear();
+  
+  {
+    /* Switching the big and small matrixes */
+    
+    const unsigned int m1size = img1_matrix.GetColumns() * 
+      img1_matrix.GetLines();
+    const unsigned int m2size = img2_matrix.GetColumns() * 
+      img2_matrix.GetLines();      
+    
+    ImgMatrixT* big_matrix_ptr = 0;
+    ImgMatrixT* small_matrix_ptr = 0;
+      
+    if( m1size < m2size )
+    {
+      big_matrix_ptr = &img2_matrix;
+      small_matrix_ptr = &img1_matrix;
+    } 
+    else
+    {
+      big_matrix_ptr = &img1_matrix;
+      small_matrix_ptr = &img2_matrix;
+    }
+    
+    ImgMatrixT& big_matrix = *big_matrix_ptr;
+    ImgMatrixT& small_matrix = *small_matrix_ptr;
+    
+    const unsigned int small_mtx_lines = small_matrix.GetLines();
+    const unsigned int small_mtx_cols = small_matrix.GetColumns();    
+    
+    /* Iterating over each small matrix position over the bigger one */
+    
+    const unsigned int big_mtx_lines_bound = big_matrix.GetLines() -
+      small_mtx_lines;
+    const unsigned int big_mtx_cols_bound = big_matrix.GetColumns() -
+      small_mtx_cols;
+      
+    unsigned int big_mtx_line = 0;
+    unsigned int big_mtx_col = 0;
+    unsigned int small_mtx_line = 0;
+    unsigned int small_mtx_col = 0;
+    
+    double best_cor_value = (-1.0) * DBL_MAX;
+    unsigned int best_cor_bm_line = 0; /* UL point over big matrix */
+    unsigned int best_cor_bm_col = 0; /* UL point over big matrix */
+
+    double* big_matrix_line_ptr = 0;
+    double* small_matrix_line_ptr = 0;
+    
+    double sbsum = 0;
+    double ssum = 0;
+    double bsum = 0;
+    double spow2sum = 0;
+    double bpow2sum = 0;
+    const double elemsnmb = (double)( small_mtx_lines *
+       small_mtx_cols );
+       
+    double curr_cor_value = 0;
+        
+    TePDIPIManager progress( "Looking for the best correlation", 
+      big_mtx_lines_bound, progress_enabled_ );
+        
+    for( ; big_mtx_line < big_mtx_lines_bound ; ++big_mtx_line )
+    {
+      for( big_mtx_col = 0 ; big_mtx_col < big_mtx_cols_bound ; 
+        ++big_mtx_col )
+      {
+        sbsum = 0;
+        ssum = 0;
+        bsum = 0;
+        spow2sum = 0;
+        bpow2sum = 0;
+        
+        for( small_mtx_line = 0 ; small_mtx_line < small_mtx_lines ;
+          ++small_mtx_line )
+        {
+          big_matrix_line_ptr = big_matrix[ big_mtx_line + 
+            small_mtx_line ];
+          small_matrix_line_ptr = small_matrix[ small_mtx_line ];
+          
+          for( small_mtx_col = 0 ; small_mtx_col < small_mtx_cols ;
+            ++small_mtx_col )
+          {
+            const double& smelem = small_matrix_line_ptr[ 
+              small_mtx_col ];
+            const double& bmelem = big_matrix_line_ptr[
+              big_mtx_col + small_mtx_col ];
+              
+            sbsum += ( smelem * bmelem );
+            ssum += smelem;
+            bsum += bmelem;
+            spow2sum += ( smelem * smelem );
+            bpow2sum += ( bmelem * bmelem );
+          }
+        }
+        
+        curr_cor_value = ( ( elemsnmb * sbsum ) - ( ssum * bsum ) ) /
+          ( sqrt( ( elemsnmb * spow2sum ) - ( ssum * ssum ) ) * 
+          sqrt( ( elemsnmb * bpow2sum ) - ( bsum * bsum ) ) );
+          
+        if( curr_cor_value > best_cor_value )
+        {
+          best_cor_value = curr_cor_value;
+          best_cor_bm_line = big_mtx_line;
+          best_cor_bm_col = big_mtx_col;
+        }
+      }
+      
+      TEAGN_FALSE_OR_RETURN( progress.Increment(),
+        "Canceled by the user" );
+    }
+    
+    /* Copy the best correlation value to user output var */
+    
+    double* best_cor_value_ptr = 0;
+    if( params_.CheckParameter< double* >( "best_cor_value_ptr" ) ) {
+      params_.GetParameter( "best_cor_value_ptr", best_cor_value_ptr );
+      (*best_cor_value_ptr) = best_cor_value;
+    }      
+    
+    /* Generating tie-points */
+    
+    TeCoord2D ulpoint_img1;
+    TeCoord2D urpoint_img1;
+    TeCoord2D llpoint_img1;
+    TeCoord2D lrpoint_img1;
+    
+    TeCoord2D ulpoint_img2;
+    TeCoord2D urpoint_img2;
+    TeCoord2D llpoint_img2;
+    TeCoord2D lrpoint_img2;
+    
+    if( m1size < m2size )
+    {
+      ulpoint_img1.setXY( 0 , 0 );
+      llpoint_img1.setXY( 0, img1_matrix.GetLines() - 1 );
+      urpoint_img1.setXY( img1_matrix.GetColumns() - 1 , 0 );
+      lrpoint_img1.setXY( img1_matrix.GetColumns() - 1,
+        img1_matrix.GetLines() - 1 );
+        
+      ulpoint_img2.setXY( best_cor_bm_col, best_cor_bm_line );
+      llpoint_img2.setXY( 
+        best_cor_bm_col,
+        best_cor_bm_line + img1_matrix.GetLines() - 1 );
+      urpoint_img2.setXY( 
+        best_cor_bm_col + img1_matrix.GetColumns() - 1,
+        best_cor_bm_line );
+      lrpoint_img2.setXY( 
+        best_cor_bm_col + img1_matrix.GetColumns() - 1,
+        best_cor_bm_line + img1_matrix.GetLines() - 1 );
+    } 
+    else
+    {
+      ulpoint_img2.setXY( 0 , 0 );
+      llpoint_img2.setXY( 0, img2_matrix.GetLines() - 1 );
+      urpoint_img2.setXY( img2_matrix.GetColumns() - 1 , 0 );
+      lrpoint_img2.setXY( img2_matrix.GetColumns() - 1,
+        img2_matrix.GetLines() - 1 );
+        
+      ulpoint_img1.setXY( best_cor_bm_col, best_cor_bm_line );
+      llpoint_img1.setXY( 
+        best_cor_bm_col,
+        best_cor_bm_line + img2_matrix.GetLines() - 1 );
+      urpoint_img1.setXY( 
+        best_cor_bm_col + img2_matrix.GetColumns() - 1,
+        best_cor_bm_line );
+      lrpoint_img1.setXY( 
+        best_cor_bm_col + img2_matrix.GetColumns() - 1,
+        best_cor_bm_line + img2_matrix.GetLines() - 1 );        
+    }
+    
+        
+    /* Bringing points into input_image1_ptr 
+       reference */
+       
+    ulpoint_img1.setXY( 
+      ( ulpoint_img1.x() / img1_x_rescale_factor ) +
+      ( (double)orig_box1_x_off ),
+      ( ulpoint_img1.y() / img1_y_rescale_factor ) +
+      ( (double)orig_box1_y_off ) );
+    urpoint_img1.setXY( 
+      ( urpoint_img1.x() / img1_x_rescale_factor ) +
+      ( (double)orig_box1_x_off ),
+      ( urpoint_img1.y() / img1_y_rescale_factor ) +
+      ( (double)orig_box1_y_off ) );
+    llpoint_img1.setXY( 
+      ( llpoint_img1.x() / img1_x_rescale_factor ) +
+      ( (double)orig_box1_x_off ),
+      ( llpoint_img1.y() / img1_y_rescale_factor ) +
+      ( (double)orig_box1_y_off ) );
+    lrpoint_img1.setXY( 
+      ( lrpoint_img1.x() / img1_x_rescale_factor ) +
+      ( (double)orig_box1_x_off ),
+      ( lrpoint_img1.y() / img1_y_rescale_factor ) +
+      ( (double)orig_box1_y_off ) );                  
+
+    /* Bringing points into input_image2_ptr 
+       reference */
+   
+    ulpoint_img2.setXY( 
+      ( ulpoint_img2.x() / img2_x_rescale_factor ) +
+      ( (double)orig_box2_x_off ),
+      ( ulpoint_img2.y() / img2_y_rescale_factor ) +
+      ( (double)orig_box2_y_off ) );
+    urpoint_img2.setXY( 
+      ( urpoint_img2.x() / img2_x_rescale_factor ) +
+      ( (double)orig_box2_x_off ),
+      ( urpoint_img2.y() / img2_y_rescale_factor ) +
+      ( (double)orig_box2_y_off ) );
+    llpoint_img2.setXY( 
+      ( llpoint_img2.x() / img2_x_rescale_factor ) +
+      ( (double)orig_box2_x_off ),
+      ( llpoint_img2.y() / img2_y_rescale_factor ) +
+      ( (double)orig_box2_y_off ) );
+    lrpoint_img2.setXY( 
+      ( lrpoint_img2.x() / img2_x_rescale_factor ) +
+      ( (double)orig_box2_x_off ),
+      ( lrpoint_img2.y() / img2_y_rescale_factor ) +
+      ( (double)orig_box2_y_off ) );  
+         
+    /* Generating output tie-points */
+    
+    out_tie_points_ptr->push_back( TeCoordPair( ulpoint_img1,
+      ulpoint_img2 ) );
+    out_tie_points_ptr->push_back( TeCoordPair( urpoint_img1,
+      urpoint_img2 ) );
+    out_tie_points_ptr->push_back( TeCoordPair( llpoint_img1,
+      llpoint_img2 ) );
+    out_tie_points_ptr->push_back( TeCoordPair( lrpoint_img1,
+      lrpoint_img2 ) );
+      
+    TEAGN_DEBUG_CONDITION( checkTPs( *out_tie_points_ptr ),
+      "Invalid tie-points" )                     
+  }
+  
+  return true;
+}
+
+
+bool TePDICorrelationMatching::CheckParameters( 
+  const TePDIParameters& parameters ) const
+{
+  /* Checking input_image1_ptr */
+    
+  TePDITypes::TePDIRasterPtrType input_image1_ptr;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( 
+    "input_image1_ptr", input_image1_ptr ),
+    "Missing parameter: input_image1_ptr" );
+  TEAGN_TRUE_OR_RETURN( input_image1_ptr.isActive(),
+    "Invalid parameter: input_image1_ptr inactive" );
+  TEAGN_TRUE_OR_RETURN( input_image1_ptr->params().status_ != 
+    TeRasterParams::TeNotReady, 
+    "Invalid parameter: input_image1_ptr not ready" );
+    
+  /* Checking input_channel1 */
+    
+  unsigned int input_channel1 = 0;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( 
+    "input_channel1", input_channel1 ),
+    "Missing parameter: input_channel1" );
+  TEAGN_TRUE_OR_RETURN( 
+    ( ( (int)input_channel1 ) < 
+    input_image1_ptr->params().nBands() ),
+    "Invalid parameter: input_channel1" );
+  
+    
+  /* Checking input_image1_ptr */
+    
+  TePDITypes::TePDIRasterPtrType input_image2_ptr;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( 
+    "input_image2_ptr", input_image2_ptr ),
+    "Missing parameter: input_image2_ptr" );
+  TEAGN_TRUE_OR_RETURN( input_image2_ptr.isActive(),
+    "Invalid parameter: input_image2_ptr inactive" );
+  TEAGN_TRUE_OR_RETURN( input_image2_ptr->params().status_ != 
+    TeRasterParams::TeNotReady, 
+    "Invalid parameter: input_image2_ptr not ready" );    
+    
+  /* Checking input_channel2 */
+    
+  unsigned int input_channel2 = 0;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( 
+    "input_channel2", input_channel2 ),
+    "Missing parameter: input_channel2" );
+  TEAGN_TRUE_OR_RETURN( 
+    ( ( (int)input_channel2 ) < 
+    input_image2_ptr->params().nBands() ),
+    "Invalid parameter: input_channel2" );
+    
+  /* Checking out_tie_points_ptr */
+    
+  TeSharedPtr< TeCoordPairVect > out_tie_points_ptr;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( 
+    "out_tie_points_ptr", out_tie_points_ptr ),
+    "Missing parameter: out_tie_points_ptr" );
+  TEAGN_TRUE_OR_RETURN( out_tie_points_ptr.isActive(),
+    "Invalid parameter: out_tie_points_ptr inactive" );
+    
+  /* Checking input_box1 */
+    
+  TeBox input_box1;
+  if( parameters.CheckParameter< TeBox >( "input_box1" ) ) {
+    parameters.GetParameter( "input_box1", input_box1 );
+    
+    TEAGN_TRUE_OR_RETURN( ( input_box1.x1() >= 0 ),
+      "Invalid parameter : input_box1" )
+    TEAGN_TRUE_OR_RETURN( ( input_box1.x2() >= 0 ),
+      "Invalid parameter : input_box1" )      
+    TEAGN_TRUE_OR_RETURN( ( input_box1.y1() >= 0 ),
+      "Invalid parameter : input_box1" )
+    TEAGN_TRUE_OR_RETURN( ( input_box1.y2() >= 0 ),
+      "Invalid parameter : input_box1" )         
+      
+    TEAGN_TRUE_OR_RETURN( 
+      ( input_box1.x1() <= 
+        ( input_image1_ptr->params().ncols_ - 1 ) ),
+      "Invalid parameter : input_box1" )
+    TEAGN_TRUE_OR_RETURN( 
+      ( input_box1.x2() <= 
+        ( input_image1_ptr->params().ncols_ - 1 ) ),
+      "Invalid parameter : input_box1" )       
+      
+    TEAGN_TRUE_OR_RETURN( 
+      ( input_box1.y1() <= 
+        ( input_image1_ptr->params().nlines_ - 1 ) ),
+      "Invalid parameter : input_box1" )
+    TEAGN_TRUE_OR_RETURN( 
+      ( input_box1.y2() <= 
+        ( input_image1_ptr->params().nlines_ - 1 ) ),
+      "Invalid parameter : input_box1" )        
+  }
+    
+  /* Checking input_box2 */
+    
+  TeBox input_box2;
+  if( parameters.CheckParameter< TeBox >( "input_box2" ) ) {
+    parameters.GetParameter( "input_box2", input_box2 );
+    
+    TEAGN_TRUE_OR_RETURN( ( input_box2.x1() >= 0 ),
+      "Invalid parameter : input_box2" )
+    TEAGN_TRUE_OR_RETURN( ( input_box2.x2() >= 0 ),
+      "Invalid parameter : input_box2" )      
+    TEAGN_TRUE_OR_RETURN( ( input_box2.y1() >= 0 ),
+      "Invalid parameter : input_box2" )
+    TEAGN_TRUE_OR_RETURN( ( input_box2.y2() >= 0 ),
+      "Invalid parameter : input_box2" )         
+      
+    TEAGN_TRUE_OR_RETURN( 
+      ( input_box2.x1() <= 
+        ( input_image2_ptr->params().ncols_ - 1 ) ),
+      "Invalid parameter : input_box2" )
+    TEAGN_TRUE_OR_RETURN( 
+      ( input_box2.x2() <= 
+        ( input_image2_ptr->params().ncols_ - 1 ) ),
+      "Invalid parameter : input_box2" )       
+      
+    TEAGN_TRUE_OR_RETURN( 
+      ( input_box2.y1() <= 
+        ( input_image2_ptr->params().nlines_ - 1 ) ),
+      "Invalid parameter : input_box2" )
+    TEAGN_TRUE_OR_RETURN( 
+      ( input_box2.y2() <= 
+        ( input_image2_ptr->params().nlines_ - 1 ) ),
+      "Invalid parameter : input_box2" )        
+  }    
+    
+  /* Checking pixel_x_relation */
+  
+  double pixel_x_relation = 1.0;
+  if( parameters.CheckParameter< double >( "pixel_x_relation" ) ) {
+    parameters.GetParameter( "pixel_x_relation", pixel_x_relation );
+    
+    TEAGN_TRUE_OR_RETURN( ( pixel_x_relation != 0.0 ),
+      "Invalid parameter : pixel_x_relation" )
+  }
+  
+  /* Checking pixel_y_relation */
+  
+  double pixel_y_relation = 1.0;
+  if( parameters.CheckParameter< double >( "pixel_y_relation" ) ) {
+    parameters.GetParameter( "pixel_y_relation", pixel_y_relation );
+    
+    TEAGN_TRUE_OR_RETURN( ( pixel_y_relation != 0.0 ),
+      "Invalid parameter : pixel_y_relation" )
+  }   
+  
+  return true;
+}
+
+
+void TePDICorrelationMatching::ResetState( const TePDIParameters& )
+{
+}
+
+
+bool TePDICorrelationMatching::loadImage( const TeThreadParameters& params )
+{
+  /* Retriving parameters */
+  
+  TePDITypes::TePDIRasterPtrType input_image_ptr;
+  TEAGN_TRUE_OR_THROW( params.retrive( "input_image_ptr", input_image_ptr ),
+    "Missing thread parameter" )
+    
+  ImgMatrixT* img_matrix_ptr;
+  TEAGN_TRUE_OR_THROW( params.retrive( "img_matrix_ptr", img_matrix_ptr ),
+    "Missing thread parameter" )
+    
+  double img_x_rescale_factor = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "img_x_rescale_factor", 
+    img_x_rescale_factor ), "Missing thread parameter" )
+    
+  double img_y_rescale_factor = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "img_y_rescale_factor", 
+    img_y_rescale_factor ), "Missing thread parameter" )    
+    
+  unsigned int input_channel = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "input_channel", 
+    input_channel ), "Missing thread parameter" )  
+    
+  unsigned int box_x_off = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "box_x_off", 
+    box_x_off ), "Missing thread parameter" )  
+
+  unsigned int box_y_off = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "box_y_off", 
+    box_y_off ), "Missing thread parameter" )      
+    
+  unsigned int box_nlines = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "box_nlines", 
+    box_nlines ), "Missing thread parameter" )      
+    
+  unsigned int box_ncols = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "box_ncols", 
+    box_ncols ), "Missing thread parameter" )   
+    
+  bool progress_enabled = false;   
+  TEAGN_TRUE_OR_THROW( params.retrive( "progress_enabled", 
+    progress_enabled ), "Missing thread parameter" ) 
+    
+  TeMutex* glb_mem_lock_ptr = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "glb_mem_lock_ptr", 
+    glb_mem_lock_ptr ), "Missing thread parameter" )   
+  TeMutex& glb_mem_lock = *glb_mem_lock_ptr;
+         
+  /* Rescaling image */
+  
+  unsigned int nlines = (unsigned int) ceil( 
+    ( (double)box_nlines ) * img_y_rescale_factor );
+  unsigned int ncols = (unsigned int) ceil( 
+    ( (double)box_ncols ) * img_x_rescale_factor );    
+  
+  glb_mem_lock.lock();
+  
+  if( ! img_matrix_ptr->Reset( nlines, ncols, 
+    TePDIMatrix< double >::AutoMemPol ) )
+  {
+    TEAGN_LOGERR( "Unable to allocate space for the loaded image" )
+    glb_mem_lock.unLock();
+    return false;
+  }
+    
+  glb_mem_lock.unLock();
+    
+  unsigned int curr_out_line = 0;
+  unsigned int curr_out_col = 0;
+  unsigned int curr_input_line = 0;
+  unsigned int curr_input_col = 0;
+  double value = 0;
+  
+  TePDIPIManager progress( "Rescaling image", nlines, progress_enabled );
+  
+  for( curr_out_line = 0 ; curr_out_line < nlines ; 
+    ++curr_out_line ) {
+    
+    curr_input_line = 
+      TeRound( 
+        ( 
+          ( (double)curr_out_line ) / img_y_rescale_factor
+        ) 
+        +
+        ( (double) box_y_off )
+      );
+    
+    for( curr_out_col = 0 ; curr_out_col < ncols ; 
+      ++curr_out_col ) {
+      
+      curr_input_col = 
+        TeRound( 
+          ( 
+            ( (double)curr_out_col ) / img_x_rescale_factor
+          ) 
+          +
+          ( (double) box_x_off )
+        );        
+      
+      if( input_image_ptr->getElement( curr_input_col, curr_input_line, value, 
+        input_channel ) ) {
+        
+        img_matrix_ptr->operator()( curr_out_line, curr_out_col ) = value;
+      } else {
+        img_matrix_ptr->operator()( curr_out_line, curr_out_col ) = 0;
+      }
+    }
+    
+    TEAGN_FALSE_OR_RETURN( progress.Increment(),
+      "Canceled by the user" );
+  }
+        
+  return true;
+}
+
+
+void TePDICorrelationMatching::matrix2Tiff( 
+  const ImgMatrixT& input_matrix,
+  const std::string& out_file_name,
+  const std::vector< TeCoord2D >& maxima_points )
+{   
+  TEAGN_TRUE_OR_THROW( ( ! out_file_name.empty() ), "Invalid file name" )
+  TEAGN_TRUE_OR_THROW( ( input_matrix.GetLines() > 0 ), 
+    "Invalid matrix lines" )
+  TEAGN_TRUE_OR_THROW( ( input_matrix.GetColumns() > 0 ), 
+    "Invalid matrix cols" )
+    
+  /* Finding min and max */
+  const double dbl_max = DBL_MAX;
+  const double dbl_min = (-1.0) * dbl_max;
+  double mtx_min = dbl_max;
+  double mtx_max = dbl_min;
+  double mtx_diff = 1.0;
+  
+  {
+    for( unsigned int line = 0 ; 
+      line < input_matrix.GetLines() ; ++line ) 
+    {
+      for( unsigned int col = 0 ; 
+        col < input_matrix.GetColumns() ; 
+        ++col ) 
+      {
+        if( ( input_matrix( line, col ) > dbl_min ) &&
+          ( input_matrix( line, col ) < dbl_max ) )
+        {
+          if( input_matrix( line, col ) < mtx_min )
+          {
+            mtx_min = input_matrix( line, col );
+          } 
+          
+          if( input_matrix( line, col ) > mtx_max )
+          {
+            mtx_max = input_matrix( line, col );
+          }
+        }
+      }  
+    }
+    
+    if( mtx_max != mtx_min )
+    {
+      mtx_diff = mtx_max - mtx_min;
+    } 
+  }
+    
+  TeRasterParams params;
+  params.setNLinesNColumns( input_matrix.GetLines(),
+    input_matrix.GetColumns() );
+  params.nBands( 1 );
+  params.setDataType( TeUNSIGNEDCHAR, -1 );
+  params.nBands( 1 );
+  params.decoderIdentifier_ = "TIF";
+  params.mode_ = 'c';
+  params.fileName_ = out_file_name;
+  
+  TeRaster out_raster( params );
+  TEAGN_TRUE_OR_THROW( out_raster.init(), "Error init raster" );
+  
+  for( unsigned int line = 0 ; 
+    line < input_matrix.GetLines() ; ++line ) {
+    for( unsigned int col = 0 ; 
+      col < input_matrix.GetColumns() ; 
+      ++col ) {
+
+      TEAGN_TRUE_OR_THROW( out_raster.setElement( col, line, 
+        ( ( input_matrix( line, col ) - mtx_min ) / mtx_diff ) * 255.0, 0 ),
+        "Error writing raster" )
+    }  
+  }
+  
+  /* Draw maxima points */
+  
+  std::vector< TeCoord2D >::const_iterator maximas_it = 
+    maxima_points.begin();
+  std::vector< TeCoord2D >::const_iterator maximas_it_end = 
+    maxima_points.end();
+    
+  while( maximas_it != maximas_it_end ) {
+    int x = TeRound( maximas_it->x() );
+    TEAGN_TRUE_OR_THROW( ( x < (int)input_matrix.GetColumns() ),
+      "Invalid maxima column" )
+    TEAGN_TRUE_OR_THROW( ( x >= 0 ),
+      "Invalid maxima column" )      
+    
+    int y = TeRound( maximas_it->y() );
+    TEAGN_TRUE_OR_THROW( ( y < (int)input_matrix.GetLines() ),
+      "Invalid maxima line" )
+    TEAGN_TRUE_OR_THROW( ( y >= 0 ),
+      "Invalid maxima line" )      
+    
+    TEAGN_TRUE_OR_THROW( out_raster.setElement( x, y, 
+      255.0, 0 ),
+      "Error writing raster" )
+      
+    ++maximas_it;
+  }  
+}
+
+
+void TePDICorrelationMatching::raster2Tiff( 
+  const TePDITypes::TePDIRasterPtrType& input_raster_ptr,
+  unsigned int raster_channel,
+  const std::string& out_file_name,
+  const std::vector< TeCoord2D >& maxima_points,
+  const TeSharedPtr< TeCoordPairVect >& out_tie_points_ptr,
+  unsigned int tie_points_space )
+{   
+  TEAGN_TRUE_OR_THROW( ( ! out_file_name.empty() ), 
+    "Invalid file name" )
+  TEAGN_TRUE_OR_THROW( ( input_raster_ptr->params().nlines_ > 0 ), 
+    "Invalid matrix lines" )
+  TEAGN_TRUE_OR_THROW( ( input_raster_ptr->params().ncols_ > 0 ), 
+    "Invalid matrix cols" )
+    
+  TeRasterParams params;
+  params.setNLinesNColumns( input_raster_ptr->params().nlines_,
+    input_raster_ptr->params().ncols_ );
+  params.nBands( 1 );
+  params.setDataType( TeUNSIGNEDCHAR, -1 );
+  params.nBands( 1 );
+  params.decoderIdentifier_ = "TIF";
+  params.mode_ = 'c';
+  params.fileName_ = out_file_name;
+  
+  TeRaster out_raster( params );
+  TEAGN_TRUE_OR_THROW( out_raster.init(), "Error init raster" );
+  double value = 0;
+  
+  for( int line = 0 ; 
+    line < input_raster_ptr->params().nlines_ ; ++line ) {
+    for( int col = 0 ; 
+      col < input_raster_ptr->params().ncols_ ; 
+      ++col ) {
+      
+      input_raster_ptr->getElement( col, line, value, 
+        raster_channel );
+      
+
+      TEAGN_TRUE_OR_THROW( out_raster.setElement( col, line, 
+        value, 0 ),
+        "Error writing raster" )
+    }  
+  }
+  
+  /* Draw maxima points */
+  
+  std::vector< TeCoord2D >::const_iterator maximas_it = 
+    maxima_points.begin();
+  std::vector< TeCoord2D >::const_iterator maximas_it_end = 
+    maxima_points.end();
+    
+  while( maximas_it != maximas_it_end ) {
+    int x = TeRound( maximas_it->x() );
+    TEAGN_TRUE_OR_THROW( ( x < input_raster_ptr->params().ncols_ ),
+      "Invalid maxima column" )
+    TEAGN_TRUE_OR_THROW( ( x >= 0 ),
+      "Invalid maxima column" )      
+    
+    int y = TeRound( maximas_it->y() );
+    TEAGN_TRUE_OR_THROW( ( y < input_raster_ptr->params().nlines_ ),
+      "Invalid maxima line" )
+    TEAGN_TRUE_OR_THROW( ( y >= 0 ),
+      "Invalid maxima line" )      
+    
+    TEAGN_TRUE_OR_THROW( out_raster.setElement( x, y, 
+      255.0, 0 ),
+      "Error writing raster" )
+      
+    ++maximas_it;
+  }
+  
+  /* Draw tie-points */
+  
+  if( out_tie_points_ptr.isActive() ) {
+    TeCoordPairVect::iterator it = out_tie_points_ptr->begin();
+    TeCoordPairVect::iterator it_end = out_tie_points_ptr->end();
+    
+    while( it != it_end ) {
+      int x = 0;
+      int y = 0;
+      
+      if( tie_points_space == 0 ) {
+         x = TeRound( it->pt1.x() );
+         y = TeRound( it->pt1.y() );
+      } else {
+         x = TeRound( it->pt2.x() );
+         y = TeRound( it->pt2.y() );
+      }
+      
+      TEAGN_TRUE_OR_THROW( ( x < input_raster_ptr->params().ncols_ ),
+        "Invalid maxima column" )
+      TEAGN_TRUE_OR_THROW( ( x >= 0 ),
+        "Invalid maxima column" )      
+      TEAGN_TRUE_OR_THROW( ( y < input_raster_ptr->params().nlines_ ),
+        "Invalid maxima line" )
+      TEAGN_TRUE_OR_THROW( ( y >= 0 ),
+        "Invalid maxima line" )      
+      
+      TEAGN_TRUE_OR_THROW( out_raster.setElement( x, y, 
+        255.0, 0 ),
+        "Error writing raster" )    
+    
+      ++it;
+    }
+  
+  }
+}
+
+
+bool TePDICorrelationMatching::checkTPs( 
+  const TeCoordPairVect& tpsvec ) const
+{
+  for( unsigned int idx1 = 0 ; idx1 < tpsvec.size() ; ++idx1 )
+  { 
+    for( unsigned int idx2 = idx1 + 1 ; idx2 < tpsvec.size() ; 
+      ++idx2 )
+    {
+      TEAGN_TRUE_OR_RETURN( 
+        (
+          (
+            ( tpsvec[ idx1 ].pt1.x() != tpsvec[ idx2 ].pt1.x() ) ||
+            ( tpsvec[ idx1 ].pt1.y() != tpsvec[ idx2 ].pt1.y() ) 
+          ) &&
+          (
+            ( tpsvec[ idx1 ].pt2.x() != tpsvec[ idx2 ].pt2.x() ) ||
+            ( tpsvec[ idx1 ].pt2.y() != tpsvec[ idx2 ].pt2.y() ) 
+          )
+        ),
+        "Invalid tie-point" +
+        std::string( " index1=" ) + Te2String( idx1 ) +
+        " [" + Te2String( tpsvec[ idx1 ].pt1.x(), 9 ) + "," +
+        Te2String( tpsvec[ idx1 ].pt1.y(), 9 ) + " <-> " +
+        Te2String( tpsvec[ idx1 ].pt2.x(), 9 ) + "," +
+        Te2String( tpsvec[ idx1 ].pt2.y(), 9 ) + "]" +
+        std::string( " index2=" ) + Te2String( idx2 ) +
+        " [" + Te2String( tpsvec[ idx2 ].pt1.x(), 9 ) + "," +
+        Te2String( tpsvec[ idx2 ].pt1.y(), 9 ) + " <-> " +
+        Te2String( tpsvec[ idx2 ].pt2.x(), 9 ) + "," +
+        Te2String( tpsvec[ idx2 ].pt2.y(), 9 ) + "]" );
+    }
+  }
+  
+  return true;
+}
+
+
diff --git a/src/terralib/image_processing/TePDICorrelationMatching.hpp b/src/terralib/image_processing/TePDICorrelationMatching.hpp
new file mode 100644
index 0000000..7a8a79d
--- /dev/null
+++ b/src/terralib/image_processing/TePDICorrelationMatching.hpp
@@ -0,0 +1,187 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDICORRELATIONMATCHING_HPP
+  #define TEPDICORRELATIONMATCHING_HPP
+
+  #include "TePDIAlgorithm.hpp"
+  #include "TePDIMatrix.hpp"
+  
+  #include <TeThreadParameters.h>
+
+  /**
+   * @brief  Area matching using correlation ( only  
+   * offset distortion is supported ).
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @note Better used for searching a small image inside a big image.
+   * @ingroup PDIMatchingAlgorithms
+   *
+   * @note The required parameters are:
+   *
+   * @param input_image1_ptr (TePDITypes::TePDIRasterPtrType) - 
+   * The input image 1.
+   * @param input_channel1 ( unsigned int ) - Band to process 
+   * from input_image1.
+   *
+   * @param input_image2_ptr (TePDITypes::TePDIRasterPtrType) - 
+   * The input image 2.
+   * @param input_channel2 ( unsigned int ) - Band to process 
+   * from input_image2.
+   *
+   * @param out_tie_points_ptr ( TeSharedPtr< TeCoordPairVect > ) - The 
+   * output tie- points 
+   * where TeCoordPair.pt1 are input_image1 matricial
+   * indexes and TeCoordPair.pt2 are input_image2 matricial
+   * indexes.
+   *
+   * @note The Optional parameters are:
+   *
+   * @param input_box1 ( TeBox ) - Box (image matrix coords) to process 
+   * from input_image1 ( the entire image will be used if no box
+   * was supplied )
+   *
+   * @param input_box2 ( TeBox ) - Box (image matrix coords) to process 
+   * from input_image2 ( the entire image will be used if no box
+   * was supplied )   
+   *
+   * @param enable_multi_thread (int) - If present (any value) 
+   * a multi-threaded processing will be used; Some TeDecoders do
+   * not support multi-thread so use it with cation
+   * (default: multi-thread disabled).
+   *
+   * @param pixel_x_relation (double) - The pixel resolution relation 
+   * pixel_x_relation = img1_pixel_res_x / img2_pixel_res_x (default=1.0);
+   *
+   * @param pixel_y_relation (double) - The pixel resolution relation 
+   * pixel_y_relation = img1_pixel_res_y / img2_pixel_res_y (default=1.0);   
+   *
+   * @param max_size_opt (unsigned int) - The maximum image box allowed
+   * size (size = pixels number = lines * columns); when the images pixels number
+   * exceed this value a downsample will be performed for optimization
+   * (default value=0 wich means optimization disabled).
+   *
+   * @param best_cor_value_ptr (double*) - A pointer to an output double 
+   * variable where to store the best found correlation value.
+   */
+  class PDI_DLL TePDICorrelationMatching : public TePDIAlgorithm {
+    public :
+
+      /**
+       * @brief Default Constructor.
+       *
+       */
+      TePDICorrelationMatching();
+
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDICorrelationMatching();
+
+      /**
+       * @brief Checks if the supplied parameters fits the requirements of each
+       * PDI algorithm implementation.
+       *
+       * @note Error log messages must be generated. No exceptions generated.
+       *
+       * @param parameters The parameters to be checked.
+       * @return true if the parameters are OK. false if not.
+       */
+      bool CheckParameters( const TePDIParameters& parameters ) const;
+
+    protected :
+    
+      /**
+       * @typedef TePDIMatrix< double > ImgMatrixT
+       * @brief A type definition for a image matrix.
+       */    
+      typedef TePDIMatrix< double > ImgMatrixT;
+    
+      /**
+       * @brief Runs the current algorithm implementation.
+       *
+       * @return true if OK. false on error.
+       */
+      bool RunImplementation();
+
+      /**
+       * @brief Reset the internal state to the initial state.
+       *
+       * @param params The new parameters referente at initial 
+       * state.
+       */
+      void ResetState( const TePDIParameters& params );
+      
+      /**
+       * @brief A thread entry point to load raster data into
+       * a simple matrix.
+       * @param params The parameters needed for the thread 
+       * execution.
+       * @return true if OK, false on errors.
+       */
+      static bool loadImage( const TeThreadParameters& params );
+      
+      /**
+       * @brief Save the output matrix to a geotiff file.
+       * @param input_matrix Input matrix.
+       * @param out_file_name Output file name.
+       * @param maxima_points The maxima points to be
+       * filled with 255
+       */      
+      static void matrix2Tiff( 
+        const ImgMatrixT& input_matrix,
+        const std::string& out_file_name,
+        const std::vector< TeCoord2D >& maxima_points );
+        
+      /**
+       * @brief Save the output matrix to a geotiff file.
+       * @param input_raster Input raster.
+       * @param raster_channel Raster channel.
+       * @param out_file_name Output file name.
+       * @param maxima_points The maxima points to be drawed.
+       * @param out_tie_points_ptr The tie-points to be drawed.
+       * @param tie_points_space The tie-points space 
+       * (pt1 or pt2).
+       */      
+      static void raster2Tiff( 
+        const TePDITypes::TePDIRasterPtrType& input_raster_ptr,
+        unsigned int raster_channel,
+        const std::string& out_file_name,
+        const std::vector< TeCoord2D >& maxima_points,
+        const TeSharedPtr< TeCoordPairVect >& out_tie_points_ptr,
+        unsigned int tie_points_space );        
+        
+      /**
+       * @brief Check tie-points indexes for repeated values.
+       * @param maximas Tie-points vector.
+       * @return true if OK, false on errors.
+       */
+      bool checkTPs( 
+        const TeCoordPairVect& tpsvec ) const;         
+  };
+  
+/** @example TePDICorrelationMatching_test.cpp
+ *    Shows how to use this class.
+ */    
+
+#endif
diff --git a/src/terralib/image_processing/TePDIDecorrelationEnhancement.cpp b/src/terralib/image_processing/TePDIDecorrelationEnhancement.cpp
new file mode 100644
index 0000000..dae5f75
--- /dev/null
+++ b/src/terralib/image_processing/TePDIDecorrelationEnhancement.cpp
@@ -0,0 +1,170 @@
+#include "TePDIDecorrelationEnhancement.hpp"
+
+#include <TeAgnostic.h>
+#include "TePDIUtils.hpp"
+#include "TePDITypes.hpp"
+#include "TePDIStatistic.hpp"
+#include "TePDIPrincipalComponents.hpp"
+#include <TeMatrix.h>
+#include <TeUtils.h>
+#include <math.h>
+
+TePDIDecorrelationEnhancement::TePDIDecorrelationEnhancement()
+{
+}
+
+TePDIDecorrelationEnhancement::~TePDIDecorrelationEnhancement()
+{
+}
+
+void TePDIDecorrelationEnhancement::ResetState(const TePDIParameters&)
+{
+}
+
+bool TePDIDecorrelationEnhancement::CheckParameters(const TePDIParameters& parameters) const
+{
+/* Input rasters and bands checking */
+
+	TePDITypes::TePDIRasterVectorType input_rasters;
+	
+	TEAGN_TRUE_OR_RETURN(parameters.GetParameter("input_rasters", input_rasters), "Missing parameter: input_rasters");
+	TEAGN_TRUE_OR_RETURN(input_rasters.size() > 1, "Invalid input rasters number");
+	
+	std::vector<int> bands;
+	
+	TEAGN_TRUE_OR_RETURN(parameters.GetParameter("bands", bands), "Missing parameter: bands");
+	TEAGN_TRUE_OR_RETURN(bands.size() == input_rasters.size(), "Invalid parameter: bands number");
+
+	for( unsigned int input_rasters_index = 0 ; input_rasters_index < input_rasters.size(); ++input_rasters_index )
+	{
+		TEAGN_TRUE_OR_RETURN(input_rasters[input_rasters_index].isActive(), "Invalid parameter: input_raster " + Te2String(input_rasters_index) + " inactive");
+		TEAGN_TRUE_OR_RETURN(input_rasters[input_rasters_index]->params().status_ != TeRasterParams::TeNotReady, "Invalid parameter: input_raster " + Te2String(input_rasters_index) + " not ready");
+		TEAGN_TRUE_OR_RETURN(bands[input_rasters_index] < input_rasters[input_rasters_index]->nBands(), "Invalid parameter: bands[ " + Te2String(input_rasters_index) + " ]");
+		TEAGN_TRUE_OR_RETURN(input_rasters[input_rasters_index]->params().nlines_ == input_rasters[0]->params().nlines_, "Invalid parameter: input_raster " + Te2String(input_rasters_index) + " with imcompatible number of lines");
+		TEAGN_TRUE_OR_RETURN(input_rasters[input_rasters_index]->params().ncols_ == input_rasters[0]->params().ncols_, "Invalid parameter: input_raster " + Te2String( input_rasters_index ) + " with imcompatible number of columns" );
+		TEAGN_TRUE_OR_RETURN(((input_rasters[input_rasters_index]->params().photometric_[bands[input_rasters_index]] == TeRasterParams::TeRGB) || (input_rasters[input_rasters_index]->params().photometric_[bands[input_rasters_index]] == TeRasterParams::TeMultiBand)), "Invalid parameter - input_rasters (invalid photometric interpretation)");
+	}
+
+/* Output rasters checking */
+
+	TePDITypes::TePDIRasterVectorType output_rasters;
+
+	TEAGN_TRUE_OR_RETURN(parameters.GetParameter("output_rasters", output_rasters), "Missing parameter: output_rasters");
+	TEAGN_TRUE_OR_RETURN(output_rasters.size() > 1, "Invalid output rasters number");
+	TEAGN_TRUE_OR_RETURN(output_rasters.size() == input_rasters.size(), "Invalid parameter: output rasters size");
+
+	for(unsigned int input_rasters_index2 = 0; input_rasters_index2 < input_rasters.size(); ++input_rasters_index2)
+	{
+		TEAGN_TRUE_OR_RETURN(input_rasters[input_rasters_index2].isActive(), "Invalid parameter: input_raster " + Te2String(input_rasters_index2) + " inactive");
+		TEAGN_TRUE_OR_RETURN(input_rasters[input_rasters_index2]->params().status_ != TeRasterParams::TeNotReady, "Invalid parameter: input_raster " + Te2String(input_rasters_index2) + " not ready");
+	}
+
+	return true;
+}
+
+bool TePDIDecorrelationEnhancement::RunImplementation()
+{
+/********* Direct analysis *********/
+
+	TePDIPrincipalComponents::TePDIPCAType analysis_type = 
+	  TePDIPrincipalComponents::TePDIPCADirect;
+
+	TePDIParameters params_direct;
+
+	TePDITypes::TePDIRasterVectorType input_rasters;
+	TEAGN_TRUE_OR_RETURN(params_.GetParameter("input_rasters", input_rasters), "Missing parameter: input_rasters");
+
+	std::vector<int> bands_direct;
+	TEAGN_TRUE_OR_RETURN(params_.GetParameter("bands", bands_direct), "Missing parameter: bands");
+
+	TePDITypes::TePDIRasterVectorType output_rasters;
+	TEAGN_TRUE_OR_RETURN(params_.GetParameter("output_rasters", output_rasters), "Missing parameter: output_rasters");
+
+	TePDITypes::TePDIRasterVectorType output_rasters_direct;
+	for (unsigned b = 0; b < output_rasters.size(); b++)
+	{
+		TePDITypes::TePDIRasterPtrType outRaster_direct;
+		TEAGN_TRUE_OR_THROW(TePDIUtils::TeAllocRAMRaster(outRaster_direct, 1, 1, 1, false, TeDOUBLE, 0), "RAM Raster " + Te2String(b) + " Alloc error");
+		output_rasters_direct.push_back(outRaster_direct);
+	}
+	
+	TeSharedPtr<TeMatrix> covariance_matrix(new TeMatrix);
+	
+	params_direct.SetParameter("analysis_type", analysis_type);
+	params_direct.SetParameter("input_rasters", input_rasters);
+	params_direct.SetParameter("bands", bands_direct);
+	params_direct.SetParameter("output_rasters", output_rasters_direct);
+	params_direct.SetParameter("covariance_matrix", covariance_matrix);
+	
+	TePDIPrincipalComponents pc_direct;
+	pc_direct.ToggleProgInt( progress_enabled_ );
+	TEAGN_TRUE_OR_THROW(pc_direct.Reset(params_direct), "Invalid Parameters");
+	TEAGN_TRUE_OR_THROW(pc_direct.Apply(), "Apply error");
+	
+/********* Enhancing pca components **********/
+	std::vector< int > bands_enhancement;
+	for (unsigned b = 0; b < output_rasters_direct.size(); b++)
+		bands_enhancement.push_back(0);
+
+	TePDIStatistic stat;
+	stat.ToggleProgInt( progress_enabled_ );
+	
+	TePDIParameters stat_pars;
+	stat_pars.SetParameter("rasters", output_rasters_direct);
+	stat_pars.SetParameter("bands", bands_enhancement);
+	
+	TEAGN_TRUE_OR_RETURN(stat.Reset(stat_pars), "Unable to inialize the statistc module");
+
+	TeMatrix	std_matrix = stat.getStdDevMatrix(),
+			mean_matrix = stat.getMeanMatrix();
+	double	pixel,
+		gain,
+		offset;
+		
+  TePDIPIManager progress( "Enhancing PCA components", 
+    output_rasters_direct.size(), 
+    progress_enabled_ );
+
+	for (unsigned int b = 1; b < output_rasters_direct.size(); b++)
+	{
+		gain = std_matrix(0, 0) / std_matrix(b, 0);
+		offset = mean_matrix(0, b) - (gain * mean_matrix(0, b));
+		for (int i = 0; i < output_rasters_direct[0]->params().ncols_; i++)
+		{
+			for (int j = 0; j < output_rasters_direct[0]->params().nlines_; j++)
+				if (output_rasters_direct[b]->getElement(i, j, pixel))
+				{
+					pixel = gain * pixel + offset;
+					output_rasters_direct[b]->setElement(i, j, pixel);
+				}
+	  }
+	  
+    TEAGN_FALSE_OR_RETURN( progress.Increment(),
+      "Canceled by the user" );	  
+	}
+	
+	progress.Reset();
+
+/********* Inverse analysis *********/
+	analysis_type = TePDIPrincipalComponents::TePDIPCAInverse;
+	
+	TePDIParameters params_inverse;
+
+	std::vector< int > bands_inverse;
+	for (unsigned b = 0; b < output_rasters.size(); b++)
+		bands_inverse.push_back(0);
+
+	params_inverse.SetParameter("analysis_type", analysis_type);
+	params_inverse.SetParameter("input_rasters", output_rasters_direct);
+	params_inverse.SetParameter("bands", bands_inverse);
+	params_inverse.SetParameter("output_rasters", output_rasters);
+	params_inverse.SetParameter("covariance_matrix", covariance_matrix);
+	
+	TePDIPrincipalComponents pc_inverse;
+	pc_inverse.ToggleProgInt( progress_enabled_ );
+	TEAGN_TRUE_OR_THROW(pc_inverse.Reset(params_inverse), "Invalid Parameters");
+	TEAGN_TRUE_OR_THROW(pc_inverse.Apply(), "Apply error");
+
+	
+	return true;
+}
diff --git a/src/terralib/image_processing/TePDIDecorrelationEnhancement.hpp b/src/terralib/image_processing/TePDIDecorrelationEnhancement.hpp
new file mode 100644
index 0000000..5577e6d
--- /dev/null
+++ b/src/terralib/image_processing/TePDIDecorrelationEnhancement.hpp
@@ -0,0 +1,88 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIDECORRELATIONENHANCEMENT_HPP
+  #define TEPDIDECORRELATIONENHANCEMENT_HPP
+
+  #include "TePDIAlgorithm.hpp"
+
+  /**
+   * @brief This is the class for principal components generation.
+   * @author Felipe Castro da Silva <felipe at dpi.inpe.br>
+   * @ingroup TePDIGeneralAlgoGroup
+   *
+   * @note The required parameters are:
+   *
+   * @param input_rasters ( TePDITypes::TePDIRasterVectorType )
+   * @param output_rasters ( TePDITypes::TePDIRasterVectorType )
+   * @param bands ( std::vector< int > ) - The bands from each input raster.
+   *
+   */
+  class PDI_DLL TePDIDecorrelationEnhancement : public TePDIAlgorithm {
+    public :
+
+      /**
+       * @brief Default Constructor.
+       *
+       */
+      TePDIDecorrelationEnhancement();
+
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIDecorrelationEnhancement();
+
+      /**
+       * @brief Checks if the supplied parameters fits the requirements of each
+       * PDI algorithm implementation.
+       *
+       * @note Error log messages must be generated. No exceptions generated.
+       *
+       * @param parameters The parameters to be checked.
+       * @return true if the parameters are OK. false if not.
+       */
+      bool CheckParameters( const TePDIParameters& parameters ) const;
+      
+    protected :
+      
+      /**
+       * @brief Decide the direction of the analysis based on the analysis_type parameter.
+       *
+       * @return true if OK. false on error.
+       */
+      bool RunImplementation();
+
+      /**
+       * @brief Reset the internal state to the initial state.
+       *
+       * @param params The new parameters referente at initial state.
+       */
+      void ResetState( const TePDIParameters& params );
+  };
+  
+/** @example TePDIDecorrelationEnhancement_test.cpp
+ *    Shows how to use this class.
+ */    
+
+#endif //TEPDIPRINCIPALCOMPONENTS_HPP
diff --git a/src/terralib/image_processing/TePDIDefines.hpp b/src/terralib/image_processing/TePDIDefines.hpp
new file mode 100755
index 0000000..ef9566f
--- /dev/null
+++ b/src/terralib/image_processing/TePDIDefines.hpp
@@ -0,0 +1,128 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+/**
+ * @defgroup PDIModule Image Processing.
+ */  
+ 
+/**
+ * @defgroup PDIAlgorithms Image Processing Algorithms.
+ * @ingroup PDIModule
+ */ 
+ 
+/**
+ * @defgroup PDIAlgorithmsFactories Algorithms factories.
+ * @ingroup PDIModule
+ */   
+ 
+/**
+ * @defgroup TePDIMosaicGroup Mosaic algorithms.
+ * @ingroup PDIAlgorithms
+ */   
+ 
+/**
+ * @defgroup TePDISegmentationGroup Segmentation algorithms.
+ * @ingroup PDIAlgorithms
+ */
+ 
+/**
+ * @defgroup TePDIFiltersGroup Filtering algorithms.
+ * @ingroup PDIAlgorithms
+ */ 
+ 
+/**
+ * @defgroup TePDIGeneralAlgoGroup General purpose algorithms.
+ * @ingroup PDIAlgorithms
+ */ 
+ 
+/**
+ * @defgroup PDIStrategies Algorithm strategies.
+ * @ingroup PDIModule
+ */   
+ 
+/**
+ * @defgroup PDIStrategiesFactories Strategies factories.
+ * @ingroup PDIModule
+ */   
+ 
+/**
+ * @defgroup PDIClassificationAlgorithms Classification algorithms.
+ * @ingroup PDIAlgorithms
+ */  
+
+/**
+ * @defgroup PDIWaveletsAlgorithms Wavelets algorithms.
+ * @ingroup PDIAlgorithms
+ */  
+  
+/**
+ * @defgroup PDIBlendingStrategies Blending strategies.
+ * @ingroup PDIStrategies
+ */   
+ 
+/**
+ * @defgroup PDIAux Image processing auxiliary classes/methods.
+ * @ingroup PDIModule
+ */    
+ 
+/**
+ * @defgroup PDIFusionAlgorithms Image Fusion algorithms.
+ * @ingroup PDIAlgorithms
+ */   
+ 
+/**
+ * @defgroup PDIMatchingAlgorithms Image matching algorithms.
+ * @ingroup PDIAlgorithms
+ */  
+
+/**
+ * @file TePDIDefines.hpp
+ * @brief This file contains a set of definitions used by PDI module.
+ * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+ */
+
+#ifndef TEPDIDEFINES_HPP
+  #define TEPDIDEFINES_HPP
+  
+  #include <TeDefines.h>
+
+  /** @defgroup PDI_AS_DLL macros.
+    @{
+  */
+
+  #if TePLATFORM == TePLATFORMCODE_MSWINDOWS
+    #ifdef PDI_AS_DLL
+      #define PDI_DLL __declspec(dllexport)
+    #else
+      #define PDI_DLL __declspec(dllimport)
+    #endif  
+  #elif TePLATFORM == TePLATFORMCODE_LINUX
+    #define PDI_DLL
+  #else
+    #error "ERROR: Unsupported platform"
+  #endif
+
+  /** @} */ 
+
+#endif
diff --git a/src/terralib/image_processing/TePDIEMClas.cpp b/src/terralib/image_processing/TePDIEMClas.cpp
new file mode 100644
index 0000000..7f4c2af
--- /dev/null
+++ b/src/terralib/image_processing/TePDIEMClas.cpp
@@ -0,0 +1,428 @@
+#include "TePDIEMClas.hpp"
+#include "TePDIMathFunctions.hpp"
+#include "TePDIStrategyFactory.hpp"
+#include "TePDIAlgorithmFactory.hpp"
+#include "TePDIUtils.hpp"
+
+#include <TeBox.h>
+#include <TeUtils.h>
+#include <TeRasterParams.h>
+#include <TeRaster.h>
+#include <TeAgnostic.h>
+
+void TePDIEMClas::ResetState( const TePDIParameters& )
+{
+
+}
+
+TePDIEMClas::TePDIEMClas()
+{
+};
+
+TePDIEMClas::~TePDIEMClas()
+{
+};
+
+bool TePDIEMClas::CheckParameters(const TePDIParameters& parameters) const
+{
+  // Checking input_rasters
+  TePDITypes::TePDIRasterVectorType input_rasters;
+  TEAGN_TRUE_OR_RETURN(parameters.GetParameter("input_rasters", input_rasters), 
+    "Missing parameter: input_rasters");
+  TEAGN_TRUE_OR_RETURN(input_rasters.size() > 0, 
+    "Invalid input rasters number");
+
+  vector<int> bands;
+  TEAGN_TRUE_OR_RETURN(parameters.GetParameter("bands", bands), "Missing parameter: bands");
+  TEAGN_TRUE_OR_RETURN(bands.size() == input_rasters.size(), Te2String(input_rasters.size()) + " Invalid parameter: bands number " + Te2String(bands.size()));
+
+  for(unsigned int input_rasters_index = 0 ; input_rasters_index < input_rasters.size(); input_rasters_index++)
+  {
+    TEAGN_TRUE_OR_RETURN(input_rasters[input_rasters_index].isActive(), "Invalid parameter: input_raster " + Te2String(input_rasters_index) + " inactive");
+    TEAGN_TRUE_OR_RETURN(input_rasters[input_rasters_index]->params().status_ != TeRasterParams::TeNotReady, "Invalid parameter: input_raster " + Te2String(input_rasters_index) + " not ready");
+    TEAGN_TRUE_OR_RETURN(input_rasters[input_rasters_index]->params().nlines_ == input_rasters[0]->params().nlines_, "Invalid parameter: input_raster " + Te2String(input_rasters_index) + " with imcompatible number of lines");
+    TEAGN_TRUE_OR_RETURN(input_rasters[input_rasters_index]->params().ncols_ == input_rasters[0]->params().ncols_, "Invalid parameter: input_raster " + Te2String(input_rasters_index) + " with imcompatible number of columns");
+  }
+
+  int M;
+  TEAGN_TRUE_OR_RETURN(parameters.GetParameter("classes_to_find", M), "Missing parameter: classes_to_find");
+  double e;
+  TEAGN_TRUE_OR_RETURN(parameters.GetParameter("epsilon", e), "Missing parameter: epsilon");
+  TEAGN_TRUE_OR_RETURN(e > 0, "Parameter epsilon must be > 0");
+  double s;
+  TEAGN_TRUE_OR_RETURN(parameters.GetParameter("shift_threshold", s), "Missing parameter: shift_threshold");
+  TEAGN_TRUE_OR_RETURN(e > 0, "Parameter shift_threshold must be > 0");
+
+  // Checking output_raster
+  TePDITypes::TePDIRasterPtrType output_raster;
+  TEAGN_TRUE_OR_RETURN(parameters.GetParameter("output_raster", output_raster), "Missing parameter: output_raster");
+  TEAGN_TRUE_OR_RETURN(output_raster.isActive(), "Invalid parameter: output_raster inactive");
+  TEAGN_TRUE_OR_RETURN(output_raster->params().status_ != TeRasterParams::TeNotReady, "Invalid parameter: output_raster not ready");
+  return true;
+}
+
+bool TePDIEMClas::RunImplementation()
+{
+  // Setting the parameters
+  TePDITypes::TePDIRasterVectorType input_rasters;
+  params_.GetParameter("input_rasters", input_rasters);
+
+  vector<int> bands;
+  params_.GetParameter("bands", bands);
+
+  W = input_rasters[0]->params().ncols_;
+  H = input_rasters[0]->params().nlines_;
+  N = 0;
+  TOTAL_ATTRIBUTES = bands.size();
+  params_.GetParameter("classes_to_find", M);
+  
+  if( params_.CheckParameter< int >( "sx" ) )
+    params_.GetParameter("sx", SX);
+  else
+    SX = 1;
+    
+  if( params_.CheckParameter< int >( "sy" ) )
+    params_.GetParameter("sy", SY);
+  else
+    SY = 1;
+    
+  if( params_.CheckParameter< int >( "max_iterations" ) )
+    params_.GetParameter("max_iterations", MAX_ITERATIONS);
+  else
+    MAX_ITERATIONS = 3;
+    
+  if( params_.CheckParameter< double >( "epsilon" ) )
+    params_.GetParameter("epsilon", EPSILON);
+  else
+    EPSILON = 15.0;
+    
+  if( params_.CheckParameter< double >( "shift_threshold" ) )
+    params_.GetParameter("shift_threshold", SHIFT_THRESHOLD);
+  else
+    SHIFT_THRESHOLD = 40.0;
+
+  bool no_means = true;
+  TeSharedPtr<TeMatrix> input_means;
+  if( params_.CheckParameter< TeSharedPtr<TeMatrix> >( "input_means" ) ) {
+    params_.GetParameter("input_means", input_means);
+    no_means = false;
+  }
+
+  for (int i = 0; i < W; i+=SX)
+    for (int j = 0; j < H; j+=SY)
+      N++;
+  double  START_COVAR = 1000.0,
+      *variations = (double *) malloc(M * sizeof(double));
+
+  // Start the algorithm
+  vector<TeMatrix>  covars, // covariance matrix
+            old_covars, // to prevent problems in inverse function
+            means, // mean vectors
+            old_means, // to compare difference during the E-M process
+            X, // image points
+            original_X; // original image points (hole set)
+  vector<double>  P; // Probability for each cluster
+  double **P_C_x = (double **) malloc(M * sizeof(double)), // Probability a posteriori
+      **original_P_C_x = (double **) malloc(M * sizeof(double));
+
+  // Initializing data...
+  for (int i = 0; i < M; i++)
+  {
+    P_C_x[i] = (double *) malloc(N * sizeof(double));
+    original_P_C_x[i] = (double *) malloc(W * H * sizeof(double));
+    for (int j = 0; j < N; j++)
+      P_C_x[i][j] = 0.0;
+    for (int j = 0; j < W * H; j++)
+      original_P_C_x[i][j] = 0.0;
+  }
+  // initialize covariances, means and P
+  TeMatrix tmp_covar;
+  tmp_covar.Init(TOTAL_ATTRIBUTES, START_COVAR);
+  TeMatrix tmp_mean;
+
+  unsigned seed = (unsigned)time(0);
+  srand(seed);
+  for (int j = 0; j < M; j++)
+  {
+    double *random_means = (double *)malloc(TOTAL_ATTRIBUTES * sizeof(double));
+    if (no_means)
+    {
+      for (int r = 0; r < TOTAL_ATTRIBUTES; r++)
+        random_means[r] = rand() % 255;
+    }
+    else
+    {
+      for (int r = 0; r < TOTAL_ATTRIBUTES; r++)
+        random_means[r] = input_means->operator()(r, j);
+    }
+
+    tmp_mean.Init(TOTAL_ATTRIBUTES, 1, random_means);
+    means.push_back(tmp_mean);
+    old_means.push_back(tmp_mean);
+    covars.push_back(tmp_covar);
+    old_covars.push_back(tmp_covar);
+    P.push_back((double) 1 / M);
+	free(random_means);
+  }
+
+  // Generates the attributes vector
+  TeMatrix tmp_X;
+
+  double *tmp = (double*) malloc(TOTAL_ATTRIBUTES * sizeof(double));
+  for (int i = 0; i < W; i += SX)
+    for (int j = 0; j < H; j += SY)
+    {
+      for (int b = 0; b < TOTAL_ATTRIBUTES; b++)
+        input_rasters[b]->getElement(i, j, tmp[b], bands[b]);
+      tmp_X.Init(TOTAL_ATTRIBUTES, 1, tmp);
+      X.push_back(tmp_X);
+    }
+
+  TePDIPIManager p("Generating Attributes Vector", W, progress_enabled_);
+  // Store the hole set of pixels
+  for (int i = 0; i < W; i++)
+  {
+    for (int j = 0; j < H; j++)
+    {
+      for (int b = 0; b < TOTAL_ATTRIBUTES; b++)
+        input_rasters[b]->getElement(i, j, tmp[b], bands[b]);
+
+      tmp_X.Init(TOTAL_ATTRIBUTES, 1, tmp);
+      original_X.push_back(tmp_X);
+    }
+    p.Increment();
+  }
+  p.Toggle(false);
+  free(tmp);
+
+  // Start to estimate the data
+  int num_iterations = 0;
+  bool stop_condition = false;
+  TeMatrix  tmp_matrix,
+        tmp_inv,
+        tmp_trans,
+        tmp_prod;
+
+  TePDIPIManager p2("Estimating data", MAX_ITERATIONS, progress_enabled_);
+  while (stop_condition == false)
+  {
+    // Calculate P_C_x
+    for (int j = 0; j < M; j++)
+    {
+      for (int k = 0; k < N; k++)
+      {
+        double denom = 0.0;
+        for (int k1 = 0; k1 < M; k1++)
+        {
+          tmp_matrix = X[k] - means[k1];
+          if (!covars[k1].Inverse(tmp_inv))
+          {
+            covars[k1].Init(TOTAL_ATTRIBUTES, START_COVAR);
+            covars[k1].Inverse(tmp_inv);
+          }
+          tmp_matrix.Transpose(tmp_trans);
+          tmp_prod.Init();
+          tmp_prod = tmp_trans * tmp_inv * tmp_matrix;
+
+          denom += pow(covars[k1].Determinant(), -0.5) * exp(-0.5 * tmp_prod(0, 0)) * P[k1];
+        }
+
+        tmp_matrix = X[k] - means[j];
+
+
+        if (!covars[j].Inverse(tmp_inv))
+        {
+          covars[j].Init(TOTAL_ATTRIBUTES, START_COVAR);
+          covars[j].Inverse(tmp_inv);
+        }
+
+        tmp_matrix.Transpose(tmp_trans);
+        tmp_prod = tmp_trans * tmp_inv * tmp_matrix;
+
+        P_C_x[j][k] = pow(covars[j].Determinant(), -0.5) * exp(-0.5 * tmp_prod(0,0)) * P[j] / denom;
+      }
+    }
+
+    // Update means, covariances and Probabilities
+    for (int j = 0; j < M; j++)
+    {
+      double tmp_denom = 0.0;
+      TeMatrix  tmp_num_mean,
+            tmp_num_covar,
+            tmp_sub;
+      tmp_num_mean.Init(TOTAL_ATTRIBUTES, 1, 0.0);
+      tmp_num_covar.Init(TOTAL_ATTRIBUTES, 0.0);
+
+      for (int k = 1; k < N; k++)
+      {
+        // sum for mean numerator
+        tmp_num_mean = tmp_num_mean + P_C_x[j][k] * X[k];
+        // sum for both denominators
+        tmp_denom += P_C_x[j][k];
+        // sum for covar numerator
+        tmp_matrix = X[k] - means[j];
+        tmp_matrix.Transpose(tmp_trans);
+        tmp_prod = tmp_matrix * tmp_trans;
+        tmp_num_covar = tmp_num_covar + P_C_x[j][k] * tmp_prod;
+      }
+
+      means[j] =  (1 / tmp_denom) * tmp_num_mean;
+      covars[j] = (1 / tmp_denom) * tmp_num_covar;
+      P[j] = tmp_denom / N;
+
+      tmp_sub = means[j] - old_means[j];
+      tmp_sub.Transpose(tmp_trans);
+      tmp_prod = tmp_trans * tmp_sub;
+      variations[j] = sqrt(tmp_prod(0, 0));
+    }
+
+    TeMatrix  tmp_sub,
+          shift;
+
+    shift.Init(TOTAL_ATTRIBUTES, 1);
+    for (int a = 0; a < TOTAL_ATTRIBUTES; a++)
+      shift(a, 0) = rand() % 255;
+    for (int j = 0; j < M; j++)
+      for (int j1 = (j + 1); j1 < M; j1++)
+      {
+        tmp_sub = means[j] - means[j1];
+        tmp_sub.Transpose(tmp_trans);
+        tmp_prod = tmp_trans * tmp_sub;
+        if (sqrt(tmp_prod(0, 0)) < SHIFT_THRESHOLD)
+        {
+          for (int a = 0; a < TOTAL_ATTRIBUTES; a++)
+            shift(a, 0) = rand() % 255;
+
+          means[j1] = shift;
+          covars[j1] = tmp_covar;
+        }
+      }
+
+    double variation = 0.0;
+    for (int j = 0; j < M; j++)
+      if (variations[j] > variation)
+        variation = variations[j];
+
+    old_means = means;
+    old_covars = covars;
+    if (++num_iterations >= MAX_ITERATIONS)
+      stop_condition = true;
+	p2.Increment();
+    if (variation < EPSILON)
+      stop_condition = true;
+  }
+  p2.Toggle(false);
+  free(variations);
+
+  // Classifying input image
+  TePDIPIManager p3("Classifying input image", M, progress_enabled_);
+  double *class_covars_determinant = (double *) malloc(M * sizeof(double));
+  vector<TeMatrix> class_covars_inverse;
+  for (int j = 0; j < M; j++)
+  {
+    class_covars_determinant[j] = covars[j].Determinant();
+    covars[j].Inverse(tmp_inv);
+    class_covars_inverse.push_back(tmp_inv);
+  }
+  for (int j = 0; j < M; j++)
+  {
+    for (int k = 0; k < H * W; k++)
+    {
+      double denom = 0.0;
+
+      for (int k1 = 0; k1 < M; k1++)
+      {
+        tmp_matrix = original_X[k] - means[k1];
+        tmp_matrix.Transpose(tmp_trans);
+        tmp_prod = tmp_trans * class_covars_inverse[k1] * tmp_matrix;
+
+        denom += pow(class_covars_determinant[k1], -0.5) * exp(-0.5 * tmp_prod(0, 0)) * P[k1];
+      }
+
+      tmp_matrix = original_X[k] - means[j];
+      tmp_matrix.Transpose(tmp_trans);
+      tmp_prod = tmp_trans * class_covars_inverse[j] * tmp_matrix;
+
+      original_P_C_x[j][k] = pow(class_covars_determinant[j], -0.5) * exp(-0.5 * tmp_prod(0,0)) * P[j] / denom;
+    }
+    p3.Increment();
+  }
+  p3.Toggle(false);
+  free(class_covars_determinant);
+
+  // Setting the output raster 
+  TePDITypes::TePDIRasterPtrType output_raster;
+  params_.GetParameter("output_raster", output_raster);
+
+  TeRasterParams output_raster_params = output_raster->params();
+  output_raster_params.setDataType( TeUNSIGNEDCHAR );
+  output_raster_params.nBands( 1 );
+  if( input_rasters[0]->projection() != 0 ) 
+    output_raster_params.projection( input_rasters[0]->projection() );
+
+  output_raster_params.boxResolution( input_rasters[0]->params().box().x1(), 
+    input_rasters[0]->params().box().y1(), input_rasters[0]->params().box().x2(), 
+    input_rasters[0]->params().box().y2(), input_rasters[0]->params().resx_, 
+    input_rasters[0]->params().resy_ ); 
+
+  // Lut
+  output_raster_params.setPhotometric( TeRasterParams::TePallete );
+  output_raster_params.lutr_.clear();
+  output_raster_params.lutg_.clear();
+  output_raster_params.lutb_.clear();
+
+  vector<unsigned short> colors_R, colors_G, colors_B;
+  colors_R.push_back(0); colors_G.push_back(0); colors_B.push_back(255);
+  colors_R.push_back(0); colors_G.push_back(255); colors_B.push_back(0);
+  colors_R.push_back(255); colors_G.push_back(0); colors_B.push_back(0);
+  colors_R.push_back(0); colors_G.push_back(255); colors_B.push_back(255);
+  colors_R.push_back(255); colors_G.push_back(0); colors_B.push_back(255);
+  colors_R.push_back(255); colors_G.push_back(255); colors_B.push_back(0);
+  colors_R.push_back(255); colors_G.push_back(255); colors_B.push_back(255);
+  colors_R.push_back(0); colors_G.push_back(0); colors_B.push_back(0);
+  colors_R.push_back(200); colors_G.push_back(0); colors_B.push_back(0);
+  colors_R.push_back(0); colors_G.push_back(200); colors_B.push_back(0);
+  colors_R.push_back(0); colors_G.push_back(0); colors_B.push_back(200);
+  colors_R.push_back(0); colors_G.push_back(200); colors_B.push_back(200);
+  colors_R.push_back(200); colors_G.push_back(200); colors_B.push_back(0);
+  colors_R.push_back(200); colors_G.push_back(0); colors_G.push_back(200);
+  colors_R.push_back(184); colors_G.push_back(115); colors_B.push_back(51);
+  colors_R.push_back(217); colors_G.push_back(135); colors_B.push_back(25);
+  colors_R.push_back(133); colors_G.push_back(99); colors_B.push_back(99);
+  colors_R.push_back(217); colors_G.push_back(217); colors_B.push_back(25);
+  colors_R.push_back(207); colors_G.push_back(181); colors_B.push_back(59);
+  colors_R.push_back(205); colors_G.push_back(127); colors_B.push_back(50);
+  colors_R.push_back(230); colors_G.push_back(232); colors_B.push_back(250);
+  
+  unsigned color_index = 0;
+  for( int lut_index = 0 ; lut_index < M ; ++lut_index ) 
+  {
+    color_index = ( (unsigned) lut_index < colors_R.size() ? lut_index : 0 );
+    output_raster_params.lutr_.push_back( (unsigned short) colors_R[color_index] );
+    output_raster_params.lutg_.push_back( (unsigned short) colors_G[color_index] );
+    output_raster_params.lutb_.push_back( (unsigned short) colors_B[color_index] );
+  }
+
+  TEAGN_TRUE_OR_RETURN( output_raster->init( output_raster_params ), "Output raster reset error" );
+  output_raster->params().status_ = TeRasterParams::TeReadyToWrite;
+
+  TePDIPIManager p4("Generating output image", H * W, progress_enabled_);
+  int k = 0;
+  for (int c = 0; c < W; c++)
+    for (int l = 0; l < H; l++)
+    {
+      int  max = 0;
+      
+      for (int j = 0; j < M; j++)
+        if (original_P_C_x[j][k] > original_P_C_x[max][k])
+          max = j;
+      output_raster->setElement(c, l, max);
+      k++;
+      p4.Increment();
+    }
+  p4.Toggle(false);
+  free(original_P_C_x);
+  free(P_C_x);
+
+  return true;
+}
diff --git a/src/terralib/image_processing/TePDIEMClas.hpp b/src/terralib/image_processing/TePDIEMClas.hpp
new file mode 100644
index 0000000..a9795a3
--- /dev/null
+++ b/src/terralib/image_processing/TePDIEMClas.hpp
@@ -0,0 +1,142 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIEMCLAS_HPP
+  #define TEPDIEMCLAS_HPP
+
+#include "TePDIAlgorithm.hpp"
+
+#include "TePDIRegion.hpp"
+#include "TePDICluster.hpp"
+
+#include <string>
+#include <set>
+
+  /**
+   * @brief EM classification algorithm.
+   * @author Thales Sehn Korting <tkorting at dpi.inpe.br>
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIClassificationAlgorithms
+   *
+   * @note The required parameters are:
+   *
+   * @param input_rasters (TePDITypes::TePDIRasterVectorType) - Input rasters
+   * @param bands (vector<int>) - Input bands from each raster.
+   * @param classes_to_find (int) - The number of classes to find.
+   * @param output_raster (TePDITypes::TePDIRasterPtrType) - Output raster.
+   *
+   * @note The optional parameters are:
+   *
+   * @param sx (int) - Sampling Rate X (default: 1).
+   * @param sy (int) - Sampling Rate Y (default: 1).
+   * @param max_iterations (int) - The maximum number of iterations (default: 3).
+   * @param epsilon (double) - stop criteria (default: 15).
+   * @param shift_threshold (double) - minimum distance between clusters means (default: 40).
+   * @param input_means (TeMatrix) - initial Matrix of means for each cluster [bands x clusters]
+   */
+
+  class PDI_DLL TePDIEMClas : public TePDIAlgorithm
+  {
+    private:
+      /**
+      * Width, Height of image
+      */
+      long W, H;
+  
+      /**
+      * Total Instances and Total Attributes
+      */
+      int N, TOTAL_ATTRIBUTES;
+  
+      /**
+      * Total Classes to find
+      */
+      int M;
+  
+      /**
+      * Sampling Rate, in X and Y directions
+      */
+      int SX, SY;
+  
+      /**
+      * Limit of iterations
+      */
+      int MAX_ITERATIONS;
+  
+      /**
+      * Stop Condition
+      */
+      double EPSILON;
+
+      /**
+      * Threshold for shift
+      */
+      double SHIFT_THRESHOLD;
+  
+    public :
+  
+      typedef TeSharedPtr< TePDIEMClas > pointer;
+      typedef const TeSharedPtr< TePDIEMClas > const_pointer;
+  
+      /**
+      * Default constructor
+      *
+      * @param factoryName Factory name.
+      */
+      TePDIEMClas();
+  
+      /**
+      * Default Destructor
+      */
+      ~TePDIEMClas();
+  
+      /**
+      * Checks if the supplied parameters fits the requirements of each
+      * PDI strategy.
+      *
+      * Error log messages must be generated. No exceptions generated.
+      *
+      * @param parameters The parameters to be checked.
+      * @return true if the parameters are OK. false if not.
+      */
+      bool CheckParameters(const TePDIParameters& parameters) const;
+  
+    protected :
+  
+    /**
+    * @brief Reset the internal state to the initial state.
+    *
+    * @param params The new parameters referent at initial state.
+    */
+    void ResetState( const TePDIParameters& );
+  
+    /**
+    * Runs the algorithm implementation.
+    *
+    * @return true if OK. false on errors.
+    */
+    bool RunImplementation();
+  };
+
+#endif
diff --git a/src/terralib/image_processing/TePDIEMClasFactory.cpp b/src/terralib/image_processing/TePDIEMClasFactory.cpp
new file mode 100644
index 0000000..7312de9
--- /dev/null
+++ b/src/terralib/image_processing/TePDIEMClasFactory.cpp
@@ -0,0 +1,25 @@
+
+#include "TePDIEMClasFactory.hpp"
+#include "TePDIEMClas.hpp"
+#include <TeAgnostic.h>
+
+
+TePDIEMClasFactory::TePDIEMClasFactory()
+: TePDIAlgorithmFactory( std::string( "TePDIEMClas" ) )
+{
+}
+
+TePDIEMClasFactory::~TePDIEMClasFactory()
+{
+}
+
+
+TePDIAlgorithm* TePDIEMClasFactory::build ( const TePDIParameters& arg )
+{
+  TePDIAlgorithm* instance_ptr = new TePDIEMClas();
+  
+  TEAGN_TRUE_OR_THROW( instance_ptr->Reset( arg ),
+    "Invalid parameters" );
+  
+  return instance_ptr;
+}
diff --git a/src/terralib/image_processing/TePDIEMClasFactory.hpp b/src/terralib/image_processing/TePDIEMClasFactory.hpp
new file mode 100644
index 0000000..00e77e2
--- /dev/null
+++ b/src/terralib/image_processing/TePDIEMClasFactory.hpp
@@ -0,0 +1,68 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIEMCLASFACTORY_HPP
+  #define TEPDIEMCLASFACTORY_HPP
+
+  #include <TeSharedPtr.h>
+  #include "TePDIAlgorithmFactory.hpp"
+  #include "TePDIParameters.hpp"
+  
+  /**
+   * @brief This is the class for EM classification algorithm factory.
+   * @author Thales Sehn Korting <tkorting at dpi.inpe.br>
+   * @ingroup PDIAlgorithmsFactories
+   */
+  class PDI_DLL TePDIEMClasFactory : public TePDIAlgorithmFactory
+  {
+    public :
+      
+      /**
+       * @brief Default constructor
+       */
+      TePDIEMClasFactory();      
+      
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIEMClasFactory();
+      
+    protected :  
+      
+      /**
+       * @brief Implementation for the abstract TeFactory::build.
+       *
+       * @param arg A const reference to the parameters used by the
+       * algorithm.
+       * @return A pointer to the new generated algorithm instance.
+       */
+      TePDIAlgorithm* build( const TePDIParameters& arg );
+      
+  };
+
+  namespace {
+    static TePDIEMClasFactory TePDIEMClasFactory_instance;
+  };  
+  
+#endif
diff --git a/src/terralib/image_processing/TePDIEspecData.cpp b/src/terralib/image_processing/TePDIEspecData.cpp
new file mode 100644
index 0000000..7249077
--- /dev/null
+++ b/src/terralib/image_processing/TePDIEspecData.cpp
@@ -0,0 +1,95 @@
+#include "TePDIEspecData.hpp"
+#include <iostream>
+
+using namespace std;
+
+TePDIEspecData::TePDIEspecData()
+{
+};
+
+TePDIEspecData::~TePDIEspecData()
+{
+};
+
+bool TePDIEspecData::Init(int nband)
+{
+  int b;
+  int fat = (nband*nband + nband)/2;
+  
+  if( nban != nband )
+  {
+    //sum3 = new double[nband];
+    //sum4 = new double[nband];
+    //median = new double[nband];
+    //sum = new double[nband];
+    //sumbij = new double[fat];
+  }
+  
+  npix = 0;
+  nban = nband;
+  for ( b = 0; b < nban; b++)
+  {
+    sum.push_back(0.0);
+    //sum3[b] = 0.0;
+    //sum4[b] = 0.0;
+    //median[b] = 0.0;
+  }
+  for ( b = 0; b < fat; b++)
+    sumbij.push_back(0.0);
+    
+  return true;
+  
+}
+
+void TePDIEspecData::Add(double *pixel)
+{
+  npix++;
+  int k = 0;
+  double aux;
+  for (int b = 0; b < nban; b++)
+  {
+    sum[b] += (double) pixel[b];
+    aux = (double) pixel[b] * (double) pixel[b] * (double) pixel[b];
+    //sum3[b] += aux;
+    //sum4[b] += aux * (double) pixel[b];
+    for( int bo = 0; bo <= b; bo++, k++)
+      sumbij[k] = sumbij[k] + ((double) pixel[b] * (double) pixel[bo]);
+  }
+}
+
+float TePDIEspecData::Covar(int i, int j)const
+{
+  float cov = 0;
+  if(i < nban &&  j < nban && npix > 0)
+  {
+    int k;
+    if(i >= j)
+      k = (i * (i + 1)) / 2 + j;
+    else 
+      k = (j * (j + 1)) / 2 + i;
+    cov = (float) (sumbij[k] / (double) npix - sum[i] / (double) npix * sum[j] / (double) npix);
+  }
+  else cov = 0;
+
+  return cov;
+}
+
+TeMatrix TePDIEspecData::Covariance()const
+{
+  TeMatrix cov;
+  cov.Init(nban, nban, 0.0);
+
+  for(int i = 0; i < nban; i++)
+    for(int j = 0; j < nban; j++)
+      cov(i,j) = (double) Covar(i,j);
+
+  return cov;
+}
+
+float TePDIEspecData::Mean(int i)const
+{
+  if(i < nban && i >= 0 && npix > 0)
+    return (float) (sum[i] / npix);
+
+  return 0.0;
+}
diff --git a/src/terralib/image_processing/TePDIEspecData.hpp b/src/terralib/image_processing/TePDIEspecData.hpp
new file mode 100644
index 0000000..6fb05ce
--- /dev/null
+++ b/src/terralib/image_processing/TePDIEspecData.hpp
@@ -0,0 +1,67 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIESPECDATA_HPP
+  #define TEPDIESPECDATA_HPP
+
+#include "TePDIDefines.hpp"
+#include <vector>
+#include <TeMatrix.h>
+
+/**
+  * @brief Espectral data class.
+  * @author Thales Sehn Korting <tkorting at dpi.inpe.br>
+  * @ingroup PDIAux
+  */
+class PDI_DLL TePDIEspecData
+{
+  private:
+    int nban;               // Number of bands
+    long npix;              // Number of pixels = area
+    std::vector<double> sum;            // Sum of pixels values
+    //double* sum3;           // sum**3
+    //double* sum4;           // sum**4
+    std::vector<double> sumbij;         // sum of the produt of pixel values
+                // between bands i and j
+    //double* median;         // median value
+
+  public:
+    // constructor
+    TePDIEspecData();
+    // destructor
+    ~TePDIEspecData();
+
+    // initializer
+    bool Init(int nband);
+    // add a pixel
+    void Add(double *pixel);
+    // returns the covariance at i, j
+    float Covar(int i, int j)const;
+    // returns the covariance matrix
+    TeMatrix Covariance()const;
+    // returns the mean at band i
+    float Mean(int i)const;
+};
+
+#endif
diff --git a/src/terralib/image_processing/TePDIEuclidianBlendSF.cpp b/src/terralib/image_processing/TePDIEuclidianBlendSF.cpp
new file mode 100755
index 0000000..5e2e1a2
--- /dev/null
+++ b/src/terralib/image_processing/TePDIEuclidianBlendSF.cpp
@@ -0,0 +1,20 @@
+#include "TePDIEuclidianBlendSF.hpp"
+#include "TePDIEuclidianBlendStrategy.hpp"
+
+TePDIEuclidianBlendSF::TePDIEuclidianBlendSF()
+: TePDIBlendStratFactory( std::string( "euclidian_blending" ) )
+{
+};      
+
+TePDIEuclidianBlendSF::~TePDIEuclidianBlendSF()
+{
+};
+
+
+TePDIBlendingStrategy* TePDIEuclidianBlendSF::build ( const TePDIParameters& )
+{
+  TePDIBlendingStrategy* instance_ptr = new TePDIEuclidianBlendStrategy();
+  
+  return instance_ptr;
+}
+
diff --git a/src/terralib/image_processing/TePDIEuclidianBlendSF.hpp b/src/terralib/image_processing/TePDIEuclidianBlendSF.hpp
new file mode 100755
index 0000000..7752c28
--- /dev/null
+++ b/src/terralib/image_processing/TePDIEuclidianBlendSF.hpp
@@ -0,0 +1,67 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIEUCLIDIANBLENDSF_HPP
+  #define TEPDIEUCLIDIANBLENDSF_HPP
+
+  #include <TePDIBlendStratFactory.hpp>
+  
+  /**
+   * @brief This is the class for euclidian blending factory.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIStrategiesFactories
+   */
+  class PDI_DLL TePDIEuclidianBlendSF : public TePDIBlendStratFactory
+  {
+    public :
+      
+      /**
+       * @brief Default constructor
+       */
+      TePDIEuclidianBlendSF();      
+      
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIEuclidianBlendSF();
+      
+    protected :  
+      /**
+       * @brief Implementation for the abstract TeFactory::build.
+       *
+       * @param arg A const reference to the parameters used by the
+       * algorithm.
+       * @return A pointer to the new generated strategy instance.
+       */
+      TePDIBlendingStrategy* build( const TePDIParameters& arg );
+      
+  };
+
+  namespace
+  {  
+    static TePDIEuclidianBlendSF TePDIEuclidianBlendSF_instance;
+  };
+
+#endif
+
diff --git a/src/terralib/image_processing/TePDIEuclidianBlendStrategy.cpp b/src/terralib/image_processing/TePDIEuclidianBlendStrategy.cpp
new file mode 100755
index 0000000..328424c
--- /dev/null
+++ b/src/terralib/image_processing/TePDIEuclidianBlendStrategy.cpp
@@ -0,0 +1,988 @@
+ 
+#include "TePDIEuclidianBlendStrategy.hpp"
+#include "TePDIBlending.hpp"
+#include "TePDIUtils.hpp"
+#include "TePDIPIManager.hpp"
+#include <TeAgnostic.h>
+
+#include <TeUtils.h>
+#include <TeGeometryAlgorithms.h>
+#include <TeDefines.h>
+#include <TeOverlayUtils.h>
+#include <TeOverlay.h>
+
+#include <float.h>
+
+
+TePDIEuclidianBlendStrategy::TePDIEuclidianBlendStrategy()
+{
+};      
+
+TePDIEuclidianBlendStrategy::~TePDIEuclidianBlendStrategy()
+{
+};
+
+
+bool TePDIEuclidianBlendStrategy::CheckParameters( 
+  const TePDIParameters& parameters ) const
+{
+  /* Checking input_raster1 */
+  
+  TePDITypes::TePDIRasterPtrType input_raster1;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "input_raster1", 
+    input_raster1 ),
+    "Missing parameter: input_raster1" );
+  TEAGN_TRUE_OR_RETURN( input_raster1.isActive(),
+    "Invalid parameter: input_raster1 inactive" );
+  TEAGN_TRUE_OR_RETURN( input_raster1->params().status_ != 
+    TeRasterParams::TeNotReady, "Invalid parameter: input_raster1 not ready" );    
+    
+  /* Checking input_raster2 */
+  
+  TePDITypes::TePDIRasterPtrType input_raster2;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "input_raster2", 
+    input_raster2 ),
+    "Missing parameter: input_raster2" );
+  TEAGN_TRUE_OR_RETURN( input_raster2.isActive(),
+    "Invalid parameter: input_raster2 inactive" );
+  TEAGN_TRUE_OR_RETURN( input_raster2->params().status_ != 
+    TeRasterParams::TeNotReady, "Invalid parameter: input_raster2 not ready" );    
+    
+  /* Checking output_raster */
+  
+  TePDITypes::TePDIRasterPtrType output_raster;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "output_raster", 
+    output_raster ),
+    "Missing parameter: output_raster" );
+  TEAGN_TRUE_OR_RETURN( output_raster.isActive(),
+    "Invalid parameter: output_raster inactive" );
+  TEAGN_TRUE_OR_RETURN( output_raster->params().status_ != 
+    TeRasterParams::TeNotReady, "Invalid parameter: output_raster not ready" );    
+    
+  /* channels1 parameter checking */
+
+  std::vector< int > channels1;
+  TEAGN_TRUE_OR_RETURN( 
+    parameters.GetParameter( "channels1", channels1 ), 
+    "Missing parameter: channels1" );
+  for( unsigned int channels1_index = 0 ; 
+    channels1_index < channels1.size() ; 
+    ++channels1_index ) {
+    
+    TEAGN_TRUE_OR_RETURN( ( channels1[ channels1_index ] >= 0 ) &&
+      ( channels1[ channels1_index ] < input_raster1->nBands() ),
+      "Invalid parameter: channels1" );
+  }
+  
+  /* channels2 parameter checking */
+
+  std::vector< int > channels2;
+  TEAGN_TRUE_OR_RETURN( 
+    parameters.GetParameter( "channels2", channels2 ), 
+    "Missing parameter: channels2" );
+  TEAGN_TRUE_OR_RETURN( ( channels2.size() == channels1.size() ),
+    "Size mismatch between channels1 and channels2" );
+  for( unsigned int channels2_index = 0 ; 
+    channels2_index < channels2.size() ; 
+    ++channels2_index ) {
+    
+    TEAGN_TRUE_OR_RETURN( ( channels2[ channels2_index ] >= 0 ) &&
+      ( channels2[ channels2_index ] < input_raster2->nBands() ),
+      "Invalid parameter: channels2" );
+  }      
+    
+  /* Checking raster polygons */
+  
+  TePDITypes::TePDIPolygonPtrType raster1_pol_ptr;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "raster1_pol_ptr", 
+    raster1_pol_ptr ), "Missing parameter : raster1_pol_ptr" );
+  TEAGN_TRUE_OR_RETURN( raster1_pol_ptr.isActive(),
+    "Invalid parameter : raster1_pol_ptr" )
+  TEAGN_TRUE_OR_RETURN(
+    ( ! input_raster1->begin( *raster1_pol_ptr, TeBoxPixelIn, 
+    0 ).end() ), "Invalid parameter : raster1_pol_ptr" )
+  TEAGN_TRUE_OR_RETURN( ( raster1_pol_ptr->size() == 1 ),
+    "Invalid parameter : raster1_pol_ptr" )
+    
+  TePDITypes::TePDIPolygonPtrType raster2_pol_ptr;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "raster2_pol_ptr", 
+    raster2_pol_ptr ), "Missing parameter : raster2_pol_ptr" );
+  TEAGN_TRUE_OR_RETURN( raster2_pol_ptr.isActive(),
+    "Invalid parameter : raster2_pol_ptr" )
+  TEAGN_TRUE_OR_RETURN(
+    ( ! input_raster2->begin( *raster2_pol_ptr, TeBoxPixelIn, 
+    0 ).end() ), "Invalid parameter : raster2_pol_ptr" )
+  TEAGN_TRUE_OR_RETURN( ( raster2_pol_ptr->size() == 1 ),
+    "Invalid parameter : raster2_pol_ptr" )
+    
+  /* Checking raster2 polygon offsets */
+  
+  double raster2_pol_offset_x = 0;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "raster2_pol_offset_x", 
+    raster2_pol_offset_x ), "Missing parameter : raster2_pol_offset_x" );  
+
+  double raster2_pol_offset_y = 0;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "raster2_pol_offset_y", 
+    raster2_pol_offset_y ), "Missing parameter : raster2_pol_offset_y" );     
+    
+  return true;
+}
+
+
+bool TePDIEuclidianBlendStrategy::Implementation( 
+  const TePDIParameters& params )
+{
+  /* Extracting parameters */
+
+  TePDITypes::TePDIRasterPtrType input_raster1;
+  params.GetParameter( "input_raster1", input_raster1 );
+  TeRaster& input_raster1_ref = *( input_raster1.nakedPointer() );
+
+  TePDITypes::TePDIRasterPtrType input_raster2;
+  params.GetParameter( "input_raster2", input_raster2 );
+  TeRaster& input_raster2_ref = *( input_raster2.nakedPointer() );
+
+  TePDITypes::TePDIRasterPtrType output_raster;
+  params.GetParameter( "output_raster", output_raster );
+  TeRaster& output_raster_ref = *( output_raster.nakedPointer() );
+  
+  std::vector< int > channels1;
+  params.GetParameter( "channels1", channels1 );
+
+  std::vector< int > channels2;
+  params.GetParameter( "channels2", channels2 ); 
+  
+  TePDITypes::TePDIPolygonPtrType raster1_pol_ptr;
+  params.GetParameter( "raster1_pol_ptr", raster1_pol_ptr );
+  TePolygon& raster1_polygon = ( *raster1_pol_ptr );
+
+  TePDITypes::TePDIPolygonPtrType raster2_pol_ptr;
+  params.GetParameter( "raster2_pol_ptr", raster2_pol_ptr );
+  TePolygon& raster2_polygon = ( *raster2_pol_ptr );
+  
+  double raster2_pol_offset_x = 0;
+  params.GetParameter( "raster2_pol_offset_x", raster2_pol_offset_x );
+
+  double raster2_pol_offset_y = 0;
+  params.GetParameter( "raster2_pol_offset_y", raster2_pol_offset_y );
+
+  
+  /* Dumyy value definition */
+  
+  bool output_raster_uses_dummy = output_raster->params().useDummy_;
+  double output_raster_dummy_value = 0;
+  
+  if( output_raster_uses_dummy ) {
+    output_raster_dummy_value = output_raster->params().dummy_[ 0 ];
+  }
+  
+  if( params.CheckParameter< double >( "dummy_value" ) ) {
+    
+    params.GetParameter( "dummy_value", output_raster_dummy_value );
+    
+    output_raster_uses_dummy = true;
+  }  
+  
+  /* Blending lines draw */
+  
+  bool draw_blend_lines = false;
+  double blend_lines_value = 0;
+  
+  if( params.CheckParameter< double >( "draw_blend_lines" ) ) {
+    
+    params.GetParameter( "draw_blend_lines", blend_lines_value );
+    
+    draw_blend_lines = true;
+  }  
+  
+  /* Calculating intersecion polygons data */
+  
+  TePolygon new_raster1_polygon;
+  TePolygon new_raster2_polygon;
+  TePolygon int_pol_refout;
+  TePolygon int_pol_ref2;
+  double raster1_rel_index_offset_x = 0;
+  double raster1_rel_index_offset_y = 0;
+  double raster2_rel_index_offset_x = 0;
+  double raster2_rel_index_offset_y = 0;
+  short pols_relation = 0;
+
+  TEAGN_TRUE_OR_RETURN( TePDIBlending::extractPolygons( params, 
+    new_raster1_polygon, new_raster2_polygon, int_pol_refout, int_pol_ref2,
+    pols_relation,
+    raster1_rel_index_offset_x, raster1_rel_index_offset_y,
+    raster2_rel_index_offset_x, raster2_rel_index_offset_y ),
+    "Error extracting intersection polygons" );
+  
+  /* Global vars */
+  
+  TeRaster::iteratorPoly intersection_refout_it =
+    output_raster->begin( int_pol_refout, TeBoxPixelIn, 0 );
+  TEAGN_TRUE_OR_RETURN( ( ! intersection_refout_it.end() ), 
+    "Unable to create an iterator over raster2 area" );     
+  
+  TePDIPIManager progress( "Blending intersection...", 
+    intersection_refout_it.nLinesInPoly() * channels1.size(), 
+    progress_interface_enabled_ );   
+    
+  /* Blending intersection */
+  { 
+    unsigned int current_line = 0;
+    unsigned int current_col = 0;
+    unsigned int last_line = 0;
+    
+    double value1 = 0;      
+    double value2 = 0;      
+    double value3 = 0;
+    
+    bool got_raster1_element = false;
+    bool got_raster2_element = false;     
+    
+    int raster1_offset_x = TeRound( raster1_rel_index_offset_x );
+    int raster1_offset_y = TeRound( raster1_rel_index_offset_y );    
+    int raster2_offset_x = TeRound( raster2_rel_index_offset_x );
+    int raster2_offset_y = TeRound( raster2_rel_index_offset_y );    
+    
+    if( ( pols_relation == TeCONTAINS ) || ( pols_relation == TeCOVERS ) ||
+        ( pols_relation == TeWITHIN ) || ( pols_relation == TeCOVEREDBY ) ) {
+        
+      /* This is the case where one raster is inside onother */
+
+      for( unsigned int channels_index = 0 ; 
+        channels_index < channels1.size() ;
+        ++channels_index ) {
+    
+        intersection_refout_it =
+          output_raster->begin( int_pol_refout, TeBoxPixelIn, 0 );
+        TEAGN_TRUE_OR_RETURN( ( ! intersection_refout_it.end() ), 
+          "Unable to create an iterator over raster2 area" );    
+      
+        const unsigned int channel1 = channels1[ channels_index ];
+        const unsigned int channel2 = channels2[ channels_index ];              
+      
+        while( ! intersection_refout_it.end() ) {
+          current_line = intersection_refout_it.currentLine();
+          current_col = intersection_refout_it.currentColumn();    
+          
+          if( input_raster1_ref.getElement( current_col + raster1_offset_x, 
+              current_line + raster1_offset_y, value1, channel1 ) ) {
+                  
+            if( output_raster_uses_dummy &&
+              ( value1 == output_raster_dummy_value ) ) {
+            
+              got_raster1_element = false;
+            } else {
+              got_raster1_element = true;
+            }
+          } else {
+            got_raster1_element = false;
+          }
+                
+          if( input_raster2_ref.getElement( current_col + raster2_offset_x, 
+              current_line + raster2_offset_y, value2, channel2 ) ) {
+                  
+            if( output_raster_uses_dummy &&
+              ( value2 == output_raster_dummy_value ) ) {
+                
+              got_raster2_element = false;
+            } else {
+              got_raster2_element = true;
+            }
+          } else {
+            got_raster2_element = false;
+          }          
+        
+          if( got_raster1_element && got_raster2_element ) {
+            value3 = ( value1 + value2 ) / 2;
+            
+            if( ( ! output_raster_uses_dummy ) || 
+              ( value3 != output_raster_dummy_value ) ) {
+                  
+              TEAGN_TRUE_OR_RETURN( 
+                output_raster_ref.setElement( current_col, current_line, value3, 
+                channels_index ), "Unable to write to output raster" );
+            }            
+          } else if( got_raster1_element ) {
+            if( ( ! output_raster_uses_dummy ) || 
+              ( value1 != output_raster_dummy_value ) ) {
+                  
+              TEAGN_TRUE_OR_RETURN( 
+                output_raster_ref.setElement( current_col, current_line, value1, 
+                channels_index ), "Unable to write to output raster" );
+            }          
+          } else {
+            if( ( ! output_raster_uses_dummy ) || 
+              ( value2 != output_raster_dummy_value ) ) {
+                
+              TEAGN_TRUE_OR_RETURN( 
+                output_raster_ref.setElement( current_col, current_line, value2, 
+                channels_index ), "Unable to write to output raster" );
+            }          
+          }
+          
+          if( current_line != last_line ) {
+            last_line = current_line;
+            progress.Increment();
+          }    
+        
+          ++intersection_refout_it;
+        }
+      }
+    } else {
+    /* Raster1 positioning */
+    
+      double raster1_abs_index_offset_x = 0;// output raster */
+      double raster1_abs_index_offset_y = 0;
+      {
+        TeBox pol1_box_indexed;
+        TePDIUtils::MapCoords2RasterIndexes( raster1_polygon.box(),
+          input_raster1, pol1_box_indexed );
+              
+        double r1_min_x = MIN( pol1_box_indexed.x1(),
+          pol1_box_indexed.x2() );
+        double r1_min_y = MIN( pol1_box_indexed.y1(),
+          pol1_box_indexed.y2() );      
+    
+        TeCoord2D r1_UL_ref1_indexed( r1_min_x, r1_min_y );  
+        TeCoord2D r1_UL_ref1( input_raster1->index2Coord( r1_UL_ref1_indexed ) );  
+        TeCoord2D r1_UL_refout_indexed( output_raster->coord2Index( r1_UL_ref1 ) );
+            
+        raster1_abs_index_offset_x = r1_UL_refout_indexed.x();  
+        raster1_abs_index_offset_y = r1_UL_refout_indexed.y();
+      }      
+
+      /* Calculating the raster 2 polygon with output raster reference */
+    
+      TePolygon r2_pol_refout;
+      {
+        TePolygon r2_pol_ref2_indexed;
+        TePDIUtils::MapCoords2RasterIndexes( raster2_polygon,
+          input_raster2, r2_pol_ref2_indexed );
+          
+        double r2_min_x = MIN( r2_pol_ref2_indexed.box().x1(),
+          r2_pol_ref2_indexed.box().x2() );
+        double r2_min_y = MIN( r2_pol_ref2_indexed.box().y1(),
+          r2_pol_ref2_indexed.box().y2() );
+    
+        TePolygon r2_pol_refout_indexed = r2_pol_ref2_indexed;
+            
+        for( unsigned int lr_index = 0 ; 
+          lr_index < r2_pol_refout_indexed.size() ; ++lr_index ) {
+          for( unsigned int c2d_index = 0 ; 
+            c2d_index < r2_pol_refout_indexed[ lr_index ].size() ; 
+            ++c2d_index ) {
+                
+            r2_pol_refout_indexed[ lr_index ][ c2d_index ].x( 
+              r2_pol_refout_indexed[ lr_index ][ c2d_index ].x() -
+              r2_min_x + raster1_abs_index_offset_x + raster2_pol_offset_x );
+            r2_pol_refout_indexed[ lr_index ][ c2d_index ].y( 
+              r2_pol_refout_indexed[ lr_index ][ c2d_index ].y() -
+              r2_min_y + raster1_abs_index_offset_y + raster2_pol_offset_y );          
+          }
+        }
+        
+        TePDIUtils::MapRasterIndexes2Coords( r2_pol_refout_indexed,
+          output_raster, r2_pol_refout );
+      }    
+    
+      /* Calculating the two blending lines - output raster indexed reference*/
+
+      bool x_axis_parallels = false;
+      bool y_axis_parallels = false;
+      double line1_a = 0;
+      double line1_b = 0;
+      double line1_c = 0;
+      double line1_x = 0;
+      double line1_y = 0;
+      double line2_a = 0;
+      double line2_b = 0;
+      double line2_c = 0;
+      double line2_x = 0;
+      double line2_y = 0;
+      
+      TePolygon raster1_polygon_indexed;
+      TePDIUtils::MapCoords2RasterIndexes( raster1_polygon,
+        output_raster, raster1_polygon_indexed );      
+   
+      TePolygon r2_pol_refout_indexed;
+      TePDIUtils::MapCoords2RasterIndexes( r2_pol_refout,
+        output_raster, r2_pol_refout_indexed );      
+          
+      TePolygon int_pol_refout_indexed;
+      TePDIUtils::MapCoords2RasterIndexes( int_pol_refout,
+        output_raster, int_pol_refout_indexed );        
+          
+      generateBlendingLines( raster1_polygon_indexed, r2_pol_refout_indexed, 
+        int_pol_refout_indexed, 
+        line1_a, line1_b, line1_c,
+        line2_a, line2_b, line2_c );
+        
+      if( line1_a == 0.0 ) {
+        x_axis_parallels = true;
+        line1_y = ( -1 ) * ( line1_c / line1_b );
+        line2_y = ( -1 ) * ( line2_c / line2_b );
+      } else if( line1_b == 0.0 ) {
+        y_axis_parallels = true;
+        line1_x = ( -1 ) * ( line1_c / line1_a );
+        line2_x = ( -1 ) * ( line2_c / line2_a );
+      }
+      
+      /* Blending intersection */  
+    
+      double dist1 = 0;   
+      double dist2 = 0;
+      const double const_hip1 = sqrt( ( line1_a * line1_a ) + 
+        ( line1_b * line1_b ) );
+      const double const_hip2 = sqrt( ( line2_a * line2_a ) + 
+        ( line2_b * line2_b ) );
+        
+      for( unsigned int channels_index = 0 ; 
+        channels_index < channels1.size() ;
+        ++channels_index ) {
+    
+        intersection_refout_it =
+          output_raster->begin( int_pol_refout, TeBoxPixelIn, 0 );
+        TEAGN_TRUE_OR_RETURN( ( ! intersection_refout_it.end() ), 
+          "Unable to create an iterator over raster2 area" );    
+      
+        const unsigned int channel1 = channels1[ channels_index ];
+        const unsigned int channel2 = channels2[ channels_index ];        
+    
+        while( ! intersection_refout_it.end() ) {
+          current_line = intersection_refout_it.currentLine();
+          current_col = intersection_refout_it.currentColumn();
+          
+          if( input_raster1_ref.getElement( current_col + raster1_offset_x, 
+              current_line + raster1_offset_y, value1, channel1 ) ) {
+                  
+            if( output_raster_uses_dummy &&
+              ( value1 == output_raster_dummy_value ) ) {
+            
+              got_raster1_element = false;
+            } else {
+              got_raster1_element = true;
+            }
+          } else {
+            got_raster1_element = false;
+          }
+                
+          if( input_raster2_ref.getElement( current_col + raster2_offset_x, 
+              current_line + raster2_offset_y, value2, channel2 ) ) {
+                  
+            if( output_raster_uses_dummy &&
+              ( value2 == output_raster_dummy_value ) ) {
+                
+              got_raster2_element = false;
+            } else {
+              got_raster2_element = true;
+            }
+          } else {
+            got_raster2_element = false;
+          }        
+            
+          if( got_raster1_element && got_raster2_element ) {
+            if( x_axis_parallels ) {
+              dist1 = ABS( line1_y - ( (double)current_line ) );
+              dist2 = ABS( line2_y - ( (double)current_line ) );
+            } else if( y_axis_parallels ) {
+              dist1 = ABS( line1_x - ( (double)current_col ) );
+              dist2 = ABS( line2_x - ( (double)current_col ) );
+            } else {
+              dist1 = ABS( ( ( line1_a * ( (double)current_line ) ) +
+                ( line1_b * ( (double)current_col) ) + line1_c ) / 
+                const_hip1 );
+              dist2 = ABS( ( ( line2_a * ( (double)current_line ) ) +
+                ( line2_b * ( (double)current_col) ) + line2_c ) / 
+                const_hip2 );
+            }
+          
+            if( dist1 == 0.0 ) {
+              value3 = value1;
+            } else if( dist2 == 0.0 ) {
+              value3 = value2;
+            } else {
+              value3 = ( ( dist1 * value2 ) + ( dist2 * value1 ) ) /
+                ( dist1 + dist2 );
+            }
+                
+            TEAGN_TRUE_OR_RETURN( 
+              output_raster_ref.setElement( current_col, 
+              current_line,
+              value3, channels_index ), "Unable to write to output raster" );                 
+          } else if( got_raster1_element ) {
+            TEAGN_TRUE_OR_RETURN( 
+              output_raster_ref.setElement( current_col, 
+              current_line,
+              value1, channels_index ), "Unable to write to output raster" );
+          } else if( got_raster2_element ) {
+            TEAGN_TRUE_OR_RETURN( 
+              output_raster_ref.setElement( current_col, 
+              current_line,
+              value2, channels_index ), "Unable to write to output raster" );
+          }        
+          
+          ++intersection_refout_it;
+          
+          if( current_line != last_line ) {
+            last_line = current_line;
+            progress.Increment();
+          }
+        }   
+        
+        if( draw_blend_lines ) {
+          drawLine( output_raster, channels_index, blend_lines_value,
+            line1_a, line1_b, line1_c );
+          drawLine( output_raster, channels_index, blend_lines_value,
+            line2_a, line2_b, line2_c );
+        }
+      }
+    } 
+  }
+  
+  return true;
+}
+
+
+void TePDIEuclidianBlendStrategy::generateBlendingLines( 
+  const TePolygon& polygon1,  
+  const TePolygon& polygon2, const TePolygon& inter_pol, 
+  double& line1_a, double& line1_b, double& line1_c,
+  double& line2_a, double& line2_b, double& line2_c )
+{
+  const TeCoord2D centroid1 = TeFindCentroid( polygon1 );
+  const TeCoord2D centroid2 = TeFindCentroid( polygon2 );
+  const TeCoord2D inter_pol_centroid = TeFindCentroid( inter_pol );
+  
+  TePointSet pols_inter_points;
+  {
+    TeLineSet ls1;
+    TePDIUtils::makeSegmentSet( polygon1, ls1 );
+    
+    TeLineSet ls2;
+    TePDIUtils::makeSegmentSet( polygon2, ls2 );    
+    
+    TePDIUtils::TeSegSetIntersection( ls1, ls2, pols_inter_points );
+  }
+  
+  if( centroid1.x() == centroid2.x() ) {
+    /* Centroids are lined up ( y axis ) then
+       blending lines are X parallels */
+    
+    if( centroid1.y() > centroid2.y() ) {
+      line1_a = 0.0;
+      line1_b = -1.0;
+      line1_c = inter_pol.box().y2() ;
+      
+      line2_a = 0.0;
+      line2_b = -1.0;
+      line2_c = inter_pol.box().y1() ;
+    } else {
+      line1_a = 0.0;
+      line1_b = -1.0;
+      line1_c = inter_pol.box().y1() ;
+      
+      line2_a = 0.0;
+      line2_b = -1.0;
+      line2_c = inter_pol.box().y2() ;
+    }
+  } else if( centroid1.y() == centroid2.y() ) {
+    /* Centroids are lined up ( x axis ) then
+       blending lines are Y parallels */
+      
+    if( centroid1.x() > centroid2.x() ) {
+      line1_a = -1.0;
+      line1_b = 0.0;
+      line1_c = inter_pol.box().x2() ;
+      
+      line2_a = -1.0;
+      line2_b = 0.0;
+      line2_c = inter_pol.box().x1() ;
+    } else {
+      line1_a = -1.0;
+      line1_b = 0.0;
+      line1_c = inter_pol.box().x1() ;
+      
+      line2_a = -1.0;
+      line2_b = 0.0;
+      line2_c = inter_pol.box().x2() ;
+    } 
+    
+  } else if( pols_inter_points.size() == 2 ) {
+    /* This is the case where the intersection of the two polygons
+       occurs on just two points, these points will be used as
+       guides for the blending lines */
+  
+    const TeCoord2D& inter_point1 = pols_inter_points[ 0 ].elem();
+    const TeCoord2D& inter_point2 = pols_inter_points[ 1 ].elem();
+  
+    if( inter_point1.x() == inter_point2.x() ) {
+      /* Intersection points are lined up ( y axis ) then
+         blending lines are Y parallels */
+         
+      if( centroid1.x() > centroid2.x() ) {
+        line1_a = -1.0;
+        line1_b = 0.0;
+        line1_c = inter_pol.box().x2() ;
+        
+        line2_a = -1.0;
+        line2_b = 0.0;
+        line2_c = inter_pol.box().x1() ;
+      } else {
+        line1_a = -1.0;
+        line1_b = 0.0;
+        line1_c = inter_pol.box().x1() ;
+        
+        line2_a = -1.0;
+        line2_b = 0.0;
+        line2_c = inter_pol.box().x2() ;
+      }          
+    } else if( inter_point1.y() == inter_point2.y() ) {
+      /* Intersection points are lined up ( x axis ) then
+         blending lines are X parallels */
+        
+      if( centroid1.y() > centroid2.y() ) {
+        line1_a = 0.0;
+        line1_b = -1.0;
+        line1_c = inter_pol.box().y2() ;
+        
+        line2_a = 0.0;
+        line2_b = -1.0;
+        line2_c = inter_pol.box().y1() ;
+      } else {
+        line1_a = 0.0;
+        line1_b = -1.0;
+        line1_c = inter_pol.box().y1() ;
+        
+        line2_a = 0.0;
+        line2_b = -1.0;
+        line2_c = inter_pol.box().y2() ;
+      }
+    } else {
+      /* The intersection points are NOT lined up */
+    
+      /* Blending lines angular coef */
+    
+      const double blend_lines_m = ( inter_point2.y() - inter_point1.y() ) /
+        ( inter_point2.x() - inter_point1.x() ); 
+        
+      /* generating the equation for the parallel line passing 
+         throught the intersection polygon centroid */
+         
+      double ip_cent_para_line_a = 0;
+      double ip_cent_para_line_b = 0;
+      double ip_cent_para_line_c = 0;
+      {
+        double ip_centroid_para_line_q = inter_pol_centroid.y() -
+        ( blend_lines_m * inter_pol_centroid.x() ); 
+        
+        TeCoord2D aux_point( ( inter_pol_centroid.x() + 10 ), 
+          ( blend_lines_m * ( inter_pol_centroid.x() + 10 ) ) + 
+          ip_centroid_para_line_q );
+          
+        ip_cent_para_line_a = inter_pol_centroid.y() - aux_point.y();
+        ip_cent_para_line_b = aux_point.x() - inter_pol_centroid.x();
+        ip_cent_para_line_c = ( inter_pol_centroid.x() * aux_point.y() ) - 
+          ( aux_point.x() * inter_pol_centroid.y() );          
+      }        
+    
+      /* perpendicular line passing throught intersection polygon centroid 
+         coeficients  */      
+    
+      const double ipc_perp_line_m = ( -1.0 ) / blend_lines_m;    
+      
+      double ipc_perp_line_q = inter_pol_centroid.y() -
+        ( ipc_perp_line_m * inter_pol_centroid.x() );      
+      
+      /* Projecting each intersection polygon point over the perpendicular 
+         line passing throught intersection polygon centroid */
+      
+      std::vector< TeCoord2D > proj_points;
+      
+      for( unsigned int lr_index = 0 ; lr_index < inter_pol.size() ; 
+        ++lr_index  ) {
+        for( unsigned int coord_index = 0 ; 
+          coord_index < inter_pol[ lr_index ].size() ; ++coord_index  ) {
+          
+          /* projection line linear coef passing throught the current point */
+        
+          double proj_line_q = inter_pol[ lr_index ][ coord_index ].y() -
+            ( blend_lines_m * inter_pol[ lr_index ][ coord_index ].x() );
+            
+          /* Calculating intersection between the projection line and
+             the perpendicular line passing throught the intersection
+             polygon centroid */
+          
+          TeCoord2D int_point;
+          int_point.x( ( proj_line_q - ipc_perp_line_q ) / 
+            ( ipc_perp_line_m - blend_lines_m  ) );
+          int_point.y( ( ipc_perp_line_m * int_point.x() ) + ipc_perp_line_q );
+          
+          proj_points.push_back( int_point );
+        }
+      }
+      
+      TEAGN_TRUE_OR_THROW( ( proj_points.size() > 1 ), 
+        "Invalid projected points" );      
+        
+      /* Finding the two pivots for the two blending lines */
+    
+      TeCoord2D pivot1; /* related to polygon 1 */
+      TeCoord2D pivot2; /* related to polygon 2 */
+      {
+        /* Taking the two points  with the higher distance one to another */
+        
+        TeCoord2D proj_point1 = proj_points[ 0 ];
+        TeCoord2D proj_point2 = proj_points[ 1 ];
+        double higher_dist = TeDistance( proj_point1, proj_point2 );
+        
+        for( unsigned int proj_points_index = 2 ; 
+          proj_points_index < proj_points.size() ; ++proj_points_index ) {
+          
+          double dist1 = TeDistance( proj_points[ proj_points_index ], 
+            proj_point1 );
+          double dist2 = TeDistance( proj_points[ proj_points_index ], 
+            proj_point2 );
+            
+          if( dist1 > dist2 ) {
+            if( dist1 > higher_dist ) {
+              proj_point2 = proj_points[ proj_points_index ];
+              higher_dist = dist1;
+            }
+          } else {
+            if( dist2 > higher_dist ) {
+              proj_point1 = proj_points[ proj_points_index ];
+              higher_dist = TeDistance( proj_points[ proj_points_index ], 
+                proj_point2 );
+            }
+          }
+        }
+        
+        /* Association of the projected points with the correct polygons */     
+      
+        {
+          double rel_pos_proj_point1 = ( ip_cent_para_line_a * proj_point1.x() ) 
+            + ( ip_cent_para_line_b * proj_point1.y() ) + ip_cent_para_line_c;
+          double rel_pos_centroid1 = ( ip_cent_para_line_a * centroid1.x() ) 
+            + ( ip_cent_para_line_b * centroid1.y() ) + ip_cent_para_line_c;
+           
+          if( ( rel_pos_proj_point1 > 0 ) && ( rel_pos_centroid1 > 0 ) ) {
+            pivot1 = proj_point1;
+            pivot2 = proj_point2;        
+          } else {
+            pivot2 = proj_point1;
+            pivot1 = proj_point2;
+          }
+        }        
+      }
+      
+      /* Calculating blending line 1 equation */
+      
+      {
+        double line1_q = pivot1.y() -
+          ( blend_lines_m * pivot1.x() );
+          
+        TeCoord2D aux_point( ( pivot1.x() + 10 ), 
+          ( blend_lines_m * ( pivot1.x() + 10 ) ) + line1_q );
+          
+        line1_a = pivot1.y() - aux_point.y();
+        line1_b = aux_point.x() - pivot1.x();
+        line1_c = ( pivot1.x() * aux_point.y() ) - 
+          ( aux_point.x() * pivot1.y() );
+      }
+  
+      /* Calculating blending line 2 equation */
+      
+      {
+        double line2_q = pivot2.y() -
+          ( blend_lines_m * pivot2.x() );
+          
+        TeCoord2D aux_point( ( pivot2.x() + 10 ), 
+          ( blend_lines_m * ( pivot2.x() + 10 ) ) + line2_q );
+          
+        line2_a = pivot2.y() - aux_point.y();
+        line2_b = aux_point.x() - pivot2.x();
+        line2_c = ( pivot2.x() * aux_point.y() ) - 
+          ( aux_point.x() * pivot2.y() );
+      }        
+    }
+  } else {
+    /* This is the case where the polygons intersection gives us more than 
+       two points */
+       
+    /* line passing throught intersection polygon centroid coeficients -
+       this line is parallel with the line passing throught centroids */
+    
+    const double ipc_line_m = ( centroid2.y() - centroid1.y() ) /
+      ( centroid2.x() - centroid1.x() );
+    const double ipc_line_q = inter_pol_centroid.y() - 
+      ( ipc_line_m * inter_pol_centroid.x() );
+      
+    /* perpendicular line angular coeficient */
+    
+    const double perp_line_m = ( -1.0 ) / ipc_line_m;
+    
+    /* Projecting each intersection polygon point over the parallel line */
+    
+    std::vector< TeCoord2D > proj_points;
+    
+    for( unsigned int lr_index = 0 ; lr_index < inter_pol.size() ; 
+      ++lr_index  ) {
+      for( unsigned int coord_index = 0 ; 
+        coord_index < inter_pol[ lr_index ].size() ; ++coord_index  ) {
+        
+        /* perpendicular line linear coef passing throught the current point */
+      
+        double perp_line_q = inter_pol[ lr_index ][ coord_index ].y() -
+          ( perp_line_m * inter_pol[ lr_index ][ coord_index ].x() );
+          
+        /* Calculating the lines intersection */
+        
+        TeCoord2D int_point;
+        int_point.x( ( perp_line_q - ipc_line_q ) / 
+          ( ipc_line_m - perp_line_m  ) );
+        int_point.y( ( ipc_line_m * int_point.x() ) + ipc_line_q );
+        
+        proj_points.push_back( int_point );
+      }
+    }
+    
+    TEAGN_TRUE_OR_THROW( ( proj_points.size() > 1 ), 
+      "Invalid projected points" );
+      
+    /* Finding the two pivots for the two blending lines */
+    
+    TeCoord2D pivot1; /* related to polygon 1 */
+    TeCoord2D pivot2; /* related to polygon 2 */
+    {
+      /* Taking the two points  with the higher distance one to another */
+      
+      TeCoord2D proj_point1 = proj_points[ 0 ];
+      TeCoord2D proj_point2 = proj_points[ 1 ];
+      double higher_dist = TeDistance( proj_point1, proj_point2 );
+      
+      for( unsigned int proj_points_index = 2 ; 
+        proj_points_index < proj_points.size() ; ++proj_points_index ) {
+        
+        double dist1 = TeDistance( proj_points[ proj_points_index ], 
+          proj_point1 );
+        double dist2 = TeDistance( proj_points[ proj_points_index ], 
+          proj_point2 );
+          
+        if( dist1 > dist2 ) {
+          if( dist1 > higher_dist ) {
+            proj_point2 = proj_points[ proj_points_index ];
+            higher_dist = dist1;
+          }
+        } else {
+          if( dist2 > higher_dist ) {
+            proj_point1 = proj_points[ proj_points_index ];
+            higher_dist = TeDistance( proj_points[ proj_points_index ], 
+              proj_point2 );
+          }
+        }
+      }
+      
+      /* generating the equation for the perpendicular line passing 
+         throught the intersection polygon centroid */
+         
+      double ip_cent_perp_line_a = 0;
+      double ip_cent_perp_line_b = 0;
+      double ip_cent_perp_line_c = 0;
+      {
+        double ip_centroid_perp_line_q = inter_pol_centroid.y() -
+        ( perp_line_m * inter_pol_centroid.x() ); 
+        
+        TeCoord2D aux_point( ( inter_pol_centroid.x() + 10 ), 
+          ( perp_line_m * ( inter_pol_centroid.x() + 10 ) ) + 
+          ip_centroid_perp_line_q );
+          
+        ip_cent_perp_line_a = inter_pol_centroid.y() - aux_point.y();
+        ip_cent_perp_line_b = aux_point.x() - inter_pol_centroid.x();
+        ip_cent_perp_line_c = ( inter_pol_centroid.x() * aux_point.y() ) - 
+        ( aux_point.x() * inter_pol_centroid.y() );          
+      }
+        
+      /* Association of the projected points with the correct polygons */     
+      
+      {
+        double rel_pos_proj_point1 = ( ip_cent_perp_line_a * proj_point1.x() ) 
+          + ( ip_cent_perp_line_b * proj_point1.y() ) + ip_cent_perp_line_c;
+        double rel_pos_centroid1 = ( ip_cent_perp_line_a * centroid1.x() ) 
+          + ( ip_cent_perp_line_b * centroid1.y() ) + ip_cent_perp_line_c;
+         
+        if( ( rel_pos_proj_point1 > 0 ) && ( rel_pos_centroid1 > 0 ) ) {
+          pivot1 = proj_point1;
+          pivot2 = proj_point2;        
+        } else {
+          pivot2 = proj_point1;
+          pivot1 = proj_point2;
+        }
+      }
+    }
+    
+    /* Calculating blending line 1 equation */
+    
+    {
+      double line1_q = pivot1.y() -
+        ( perp_line_m * pivot1.x() );
+        
+      TeCoord2D aux_point( ( pivot1.x() + 10 ), 
+        ( perp_line_m * ( pivot1.x() + 10 ) ) + line1_q );
+        
+      line1_a = pivot1.y() - aux_point.y();
+      line1_b = aux_point.x() - pivot1.x();
+      line1_c = ( pivot1.x() * aux_point.y() ) - 
+        ( aux_point.x() * pivot1.y() );
+    }
+
+    /* Calculating blending line 2 equation */
+    
+    {
+      double line2_q = pivot2.y() -
+        ( perp_line_m * pivot2.x() );
+        
+      TeCoord2D aux_point( ( pivot2.x() + 10 ), 
+        ( perp_line_m * ( pivot2.x() + 10 ) ) + line2_q );
+        
+      line2_a = pivot2.y() - aux_point.y();
+      line2_b = aux_point.x() - pivot2.x();
+      line2_c = ( pivot2.x() * aux_point.y() ) - 
+        ( aux_point.x() * pivot2.y() );
+    }
+  }  
+}
+
+
+void TePDIEuclidianBlendStrategy::drawLine( 
+  const TePDITypes::TePDIRasterPtrType& raster, unsigned int channel,
+  double value, double line_a, double line_b, double line_c )
+{
+  double line_x = 0;
+  double line_y = 0;
+  
+  if( line_a == 0 ) {
+    /* horizontal parallels */
+    
+    line_y = ( -1.0 * line_c ) / line_b;
+  
+    for( line_x = 0 ; line_x < raster->params().ncols_ ; ++line_x ) {
+      raster->setElement( (int)line_x, (int)line_y, value, channel );
+    }             
+  } else if( line_b == 0 ) {
+    /* vertical parallels */
+    
+    line_x = ( -1.0 * line_c ) / line_a;
+  
+    for( line_y = 0 ; line_y < raster->params().nlines_ ; ++line_y ) {
+      
+      raster->setElement( (int)line_x, (int)line_y, value, channel );
+    }            
+  } else {
+    for( line_x = 0 ; line_x < raster->params().ncols_ ; ++line_x ) {
+
+      line_y = ( ( -1.0 * line_c ) + ( -1.0 * line_a * line_x ) ) / line_b;
+      
+      raster->setElement( (int)line_x, (int)line_y, value, channel );
+    }           
+  }
+}
diff --git a/src/terralib/image_processing/TePDIEuclidianBlendStrategy.hpp b/src/terralib/image_processing/TePDIEuclidianBlendStrategy.hpp
new file mode 100755
index 0000000..84d57d6
--- /dev/null
+++ b/src/terralib/image_processing/TePDIEuclidianBlendStrategy.hpp
@@ -0,0 +1,169 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIEUCLIDIANBLENDSTRATEGY_HPP
+  #define TEPDIEUCLIDIANBLENDSTRATEGY_HPP
+
+  #include <TeSharedPtr.h>
+  #include "TePDIBlendingStrategy.hpp"
+  #include "TePDIParameters.hpp"
+  
+  #include <string>
+
+  /**
+   * @brief This is the class for Euclidian blending strategy.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIBlendingStrategies
+   *
+   * @note The required parameters are:
+   * @param input_raster1 ( TePDITypes::TePDIRasterPtrType ) - 
+   *  Input raster 1.
+   * @param input_raster2 ( TePDITypes::TePDIRasterPtrType ) - 
+   *  Input raster 2.
+   * @param output_raster ( TePDITypes::TePDIRasterPtrType ) - Output raster.
+   * @param channels1 ( std::vector< int > ) - The channels to process from 
+   * input_raster1.
+   * @param channels2 ( std::vector< int > ) - The channels to process from 
+   * input_raster2.
+   * Raster 1 polygon pointer ( related to
+   * input_raster1 world reference - Just 1 linear ring allowed ).
+   * @param raster2_pol_ptr ( TePDITypes::TePDIPolygonPtrType ) - 
+   * Raster 2 polygon pointer ( related to 
+   * input_raster2 world reference - Just 1 linear ring allowed ).
+   * @param raster2_pol_offset_x ( double ) - Raster 2 polygon box X offset 
+   * related to raster1 polygon box in input_raster1 matricial reference
+   * ( offset_x = pol2_x - pol1_x ).
+   * @param raster2_pol_offset_y ( double ) - Raster 2 polygon box Y offset 
+   * related to raster1 polygon box in input_raster1 matricial reference
+   * ( offset_y = pol2_y - pol1_y ). 
+   *
+   * @note The optional parameters are:
+   *
+   * @param dummy_value (double) - A dummy pixel value for use 
+   * in pixels where no data is available ( input pixels with
+   * dummy values will be ignored ).  
+   * @param draw_blend_lines (double) - Draw the blending lines over
+   * the image using the supplied pixel value.
+   *
+   * @note The output_raster parameters will take the input_raster1 as
+   * reference.
+   * @note All input rasters must have the same dimensions.
+   *
+   */
+  class PDI_DLL TePDIEuclidianBlendStrategy : public TePDIBlendingStrategy
+  {
+    friend class TePDIEuclidianBlendSF;
+  
+    public :
+      
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIEuclidianBlendStrategy();
+      
+      /**
+       * @brief Checks if the supplied parameters fits the requirements of each
+       * PDI strategy.
+       *
+       * @note Error log messages must be generated. No exceptions generated.
+       *
+       * @param parameters The parameters to be checked.
+       * @return true if the parameters are OK. false if not.
+       */
+      bool CheckParameters( 
+        const TePDIParameters& parameters ) const;       
+      
+    protected :
+      
+      /**
+       * @brief Default constructor
+       *
+       * @param factoryName Factory name.
+       */
+      TePDIEuclidianBlendStrategy();
+      
+      /**
+       * @brief Runs the algorithm implementation.
+       *
+       * @return true if OK. false on errors.
+       */
+      bool Implementation( const TePDIParameters& params );
+
+      /**
+       * @brief Transfers the raster1 non-intersected ared to output raster.
+       *
+       * @return true if OK. false on errors.
+       */            
+      bool transferRaster1();
+      
+      /**
+       * @brief Generates the two blending lines equations ( a . X + b . y + c = 0 ).
+       *
+       * @note All geometries must be in the same reference system.
+       * @note If ( line1_a == 0 ) <--> X axis parallels (horizontal lines).
+       * @note If ( line1_b == 0 ) <--> Y axis parallels (vertical lines).
+       *
+       * @param polygon1 Raster1 polygon.
+       * @param polygon2 Raster2 polygon.
+       * @param inter_pol Intersection polygon.
+       * @param line1_a Blending line 1 ( related to raster1 polygon ) a 
+       * coefficient.
+       * @param line1_b Blending line 1 ( related to raster1 polygon ) b
+       * coefficient.
+       * @param line1_c Blending line 1 ( related to raster1 polygon ) c
+       * coefficient.
+       * @param line2_a Blending line 2 ( related to raster2 polygon ) a 
+       * coefficient.
+       * @param line2_b Blending line 2 ( related to raster2 polygon ) b
+       * coefficient.
+       * @param line2_c Blending line 2 ( related to raster2 polygon ) c
+       * coefficient.
+       */            
+      void generateBlendingLines( const TePolygon& polygon1,  
+        const TePolygon& polygon2, const TePolygon& inter_pol, 
+        double& line1_a, double& line1_b, double& line1_c,
+        double& line2_a, double& line2_b, double& line2_c );  
+     
+      /**
+       * @brief Draws a line over the supplied raster.
+       *
+       * @note If ( line_a == 0 ) <--> X axis parallels (horizontal lines).
+       * @note If ( line_b == 0 ) <--> Y axis parallels (vertical lines).
+       *
+       * @param raster Raster pointer.
+       * @param channel Raster channel.
+       * @param value The pixel value to draw.
+       * @param line_a Line 1 "a" coefficient.
+       * @param line_b Line 1 "b" coefficient.
+       * @param line_c Line 1 "c" coefficient.
+       */          
+      void drawLine( const TePDITypes::TePDIRasterPtrType& raster, 
+        unsigned int channel, double value, double line_a, double line_b, 
+        double line_c );          
+  };
+  
+#endif
+
+
+
diff --git a/src/terralib/image_processing/TePDIFilterMask.cpp b/src/terralib/image_processing/TePDIFilterMask.cpp
new file mode 100755
index 0000000..e75a23b
--- /dev/null
+++ b/src/terralib/image_processing/TePDIFilterMask.cpp
@@ -0,0 +1,657 @@
+#include "TePDIFilterMask.hpp"
+
+#include <TeAgnostic.h>
+
+
+TePDIFilterMask::TePDIFilterMask()
+{
+  reset( 0, 0 );
+}
+
+
+TePDIFilterMask::TePDIFilterMask( unsigned int width, double gain )
+{
+  reset( width, gain );
+}
+
+
+TePDIFilterMask::~TePDIFilterMask()
+{
+}
+
+
+void TePDIFilterMask::reset( unsigned int width, double gain )
+{
+  TEAGN_TRUE_OR_THROW( ( width % 2 != 0 ),
+    "Invalid width suplied, must be an odd number." );
+  TEAGN_TRUE_OR_THROW( width > 2,
+    "Invalid width suplied, must be greater than 2" );
+
+  weights_gain_ = gain;
+  weights_sum_ = 0;
+  internal_matrix_.Init( width, width, 0. );
+}
+
+
+unsigned int TePDIFilterMask::columns() const
+{
+  return (unsigned int) internal_matrix_.Ncol();
+}
+
+
+unsigned int TePDIFilterMask::lines() const
+{
+  return (unsigned int) internal_matrix_.Nrow();
+}
+
+
+void TePDIFilterMask::set( unsigned int line, unsigned int column,
+  double value )
+{
+  TEAGN_TRUE_OR_THROW( (int)line < internal_matrix_.Nrow(),
+    "Invalid line number" );
+  TEAGN_TRUE_OR_THROW( (int)column < internal_matrix_.Ncol(),
+    "Invalid columnLine number" );
+
+  weights_sum_ -= internal_matrix_( line, column );
+  internal_matrix_( line, column ) = value;
+  weights_sum_ += value;
+}
+
+
+double TePDIFilterMask::get( unsigned int line, unsigned int column ) const
+{
+  TEAGN_TRUE_OR_THROW( (int)line < internal_matrix_.Nrow(),
+    "Invalid line number" );
+  TEAGN_TRUE_OR_THROW( (int)column < internal_matrix_.Ncol(),
+    "Invalid columnLine number" );
+
+  return internal_matrix_( line, column ) + weights_gain_;
+}
+
+double TePDIFilterMask::getSum()
+{
+  return weights_sum_;
+}
+
+
+void TePDIFilterMask::operator=( const TePDIFilterMask& external )
+{
+  internal_matrix_ = external.internal_matrix_;
+  weights_sum_ = external.weights_sum_;
+  weights_gain_ = external.weights_gain_;
+}
+
+
+void TePDIFilterMask::normalize()
+{
+  if( weights_sum_ != 1. ) {
+
+    TEAGN_TRUE_OR_THROW( weights_sum_ != 0.,
+      "Trying to normalize a zero weights sum mask" );
+
+    for( int line = 0 ; line < internal_matrix_.Nrow() ; ++line ) {
+      for( int column = 0 ; column < internal_matrix_.Ncol() ;
+           ++column ) {
+
+        internal_matrix_( line, column ) /= weights_sum_;
+      }
+    }
+
+    weights_sum_ = 1.;
+  }
+}
+
+
+double** TePDIFilterMask::getWeightsMatrix() const
+{
+  TEAGN_TRUE_OR_THROW( internal_matrix_.Nrow() != 0,
+    "Cannot create a Weights Matrix from an empty mask." );
+  TEAGN_TRUE_OR_THROW( internal_matrix_.Ncol() != 0,
+    "Cannot create a Weights Matrix from an empty mask." );
+
+  double** outmatrix = new double*[ internal_matrix_.Nrow() ];
+  TEAGN_TRUE_OR_THROW( outmatrix != 0,
+    "Memory allocation error" );
+
+  for( int line = 0 ; line < internal_matrix_.Nrow() ; ++line ) {
+    outmatrix[ line ] = new double[ internal_matrix_.Ncol() ];
+
+    TEAGN_TRUE_OR_THROW( outmatrix[ line ] != 0,
+      "Memory allocation error" );
+  }
+
+  for( int linecounter = 0 ; linecounter < internal_matrix_.Nrow() ; ++linecounter ) {
+    for( int column = 0 ; column < internal_matrix_.Ncol() ;
+      ++column ) {
+      outmatrix[ linecounter ][ column ] = get( linecounter, column );
+    }
+  }
+
+  return outmatrix;
+}
+
+
+void TePDIFilterMask::deleteWeightsMatrix( double** matrix,
+  unsigned int lines )
+{
+  if( matrix != 0 ) {
+    for( unsigned int line = 0 ; line < lines ; ++line ) {
+      if( matrix[ line ] != 0 ) {
+        delete[] matrix[ line ];
+      }
+    }
+
+    delete[] matrix;
+  }
+}
+
+
+bool TePDIFilterMask::isMorfMask()
+{
+  double value;
+
+  bool zero_matrix = true;
+
+  if( weights_gain_ != 0 ) {
+    return false;
+  }
+
+  for( int line = 0 ; line < internal_matrix_.Nrow() ; ++line ) {
+    for( int column = 0 ; column < internal_matrix_.Ncol() ;
+         ++column ) {
+
+      value = internal_matrix_( line, column );
+
+      if( ( value != 1. ) && ( value != 0 ) ) {
+        return false;
+      }
+
+      if( zero_matrix ) {
+        if( value != 0 ) {
+          zero_matrix = false;
+        }
+      }
+    }
+  }
+
+  if( zero_matrix ) {
+    return false;
+  }
+
+  return true;
+}
+
+
+TePDIFilterMask::pointer TePDIFilterMask::create_Dummy()
+{
+  TePDIFilterMask::pointer outmask( new TePDIFilterMask( 3, 0 ) );
+
+  for( unsigned int line = 0 ; line < 3 ; ++line ) {
+    for( unsigned int column = 0 ; column < 3 ; ++column ) {
+      outmask->set( line, column, 0 );
+    }
+  }
+  outmask->set( 1, 1, 1. );
+
+  return outmask;
+}
+
+
+TePDIFilterMask::pointer TePDIFilterMask::create_Avg3x3( bool no_norm )
+{
+  TePDIFilterMask::pointer outmask( new TePDIFilterMask( 3, 0 ) );
+
+  for( unsigned int line = 0 ; line < 3 ; ++line ) {
+    for( unsigned int column = 0 ; column < 3 ; ++column ) {
+      outmask->set( line, column, 1. );
+    }
+  }
+
+  if( ! no_norm ) {
+    outmask->normalize();
+  }
+
+  return outmask;
+}
+
+
+TePDIFilterMask::pointer TePDIFilterMask::create_Avg5x5( bool no_norm )
+{
+  TePDIFilterMask::pointer outmask( new TePDIFilterMask( 5, 0 ) );
+
+  for( unsigned int line = 0 ; line < 5 ; ++line ) {
+    for( unsigned int column = 0 ; column < 5 ; ++column ) {
+      outmask->set( line, column, 1. );
+    }
+  }
+
+  if( ! no_norm ) {
+    outmask->normalize();
+  }
+
+  return outmask;
+}
+
+
+TePDIFilterMask::pointer TePDIFilterMask::create_Avg7x7( bool no_norm )
+{
+  TePDIFilterMask::pointer outmask( new TePDIFilterMask( 7, 0 ) );
+
+  for( unsigned int line = 0 ; line < 7 ; ++line ) {
+    for( unsigned int column = 0 ; column < 7 ; ++column ) {
+      outmask->set( line, column, 1. );
+    }
+  }
+
+  if( ! no_norm ) {
+    outmask->normalize();
+  }
+
+  return outmask;
+}
+
+
+TePDIFilterMask::pointer TePDIFilterMask::create_S()
+{
+  TePDIFilterMask::pointer outmask( new TePDIFilterMask( 3, 0 ) );
+
+  outmask->set( 0, 0, -1. );
+  outmask->set( 0, 1, -1. );
+  outmask->set( 0, 2, -1. );
+
+  outmask->set( 1, 0, 1. );
+  outmask->set( 1, 1, -2. );
+  outmask->set( 1, 2, 1. );
+
+  outmask->set( 2, 0, 1. );
+  outmask->set( 2, 1, 1. );
+  outmask->set( 2, 2, 1. );
+
+  return outmask;
+}
+
+
+TePDIFilterMask::pointer TePDIFilterMask::create_N()
+{
+  TePDIFilterMask::pointer outmask( new TePDIFilterMask( 3, 0 ) );
+
+  outmask->set( 0, 0, 1. );
+  outmask->set( 0, 1, 1. );
+  outmask->set( 0, 2, 1. );
+
+  outmask->set( 1, 0, 1. );
+  outmask->set( 1, 1, -2. );
+  outmask->set( 1, 2, 1. );
+
+  outmask->set( 2, 0, -1. );
+  outmask->set( 2, 1, -1. );
+  outmask->set( 2, 2, -1. );
+
+  return outmask;
+}
+
+
+TePDIFilterMask::pointer TePDIFilterMask::create_E()
+{
+  TePDIFilterMask::pointer outmask( new TePDIFilterMask( 3, 0 ) );
+
+  outmask->set( 0, 0, -1. );
+  outmask->set( 0, 1, 1. );
+  outmask->set( 0, 2, 1. );
+
+  outmask->set( 1, 0, -1. );
+  outmask->set( 1, 1, -2. );
+  outmask->set( 1, 2, 1. );
+
+  outmask->set( 2, 0, -1. );
+  outmask->set( 2, 1, 1. );
+  outmask->set( 2, 2, 1. );
+
+  return outmask;
+}
+
+
+TePDIFilterMask::pointer TePDIFilterMask::create_W()
+{
+  TePDIFilterMask::pointer outmask( new TePDIFilterMask( 3, 0 ) );
+
+  outmask->set( 0, 0, 1. );
+  outmask->set( 0, 1, 1. );
+  outmask->set( 0, 2, -1. );
+
+  outmask->set( 1, 0, 1. );
+  outmask->set( 1, 1, -2. );
+  outmask->set( 1, 2, -1. );
+
+  outmask->set( 2, 0, 1. );
+  outmask->set( 2, 1, 1. );
+  outmask->set( 2, 2, -1. );
+
+  return outmask;
+}
+
+
+TePDIFilterMask::pointer TePDIFilterMask::create_NW()
+{
+  TePDIFilterMask::pointer outmask( new TePDIFilterMask( 3, 0 ) );
+
+  outmask->set( 0, 0, 1. );
+  outmask->set( 0, 1, 1. );
+  outmask->set( 0, 2, 1. );
+
+  outmask->set( 1, 0, 1. );
+  outmask->set( 1, 1, -2. );
+  outmask->set( 1, 2, -1. );
+
+  outmask->set( 2, 0, 1. );
+  outmask->set( 2, 1, -1. );
+  outmask->set( 2, 2, -1. );
+
+  return outmask;
+}
+
+
+TePDIFilterMask::pointer TePDIFilterMask::create_SW()
+{
+  TePDIFilterMask::pointer outmask( new TePDIFilterMask( 3, 0 ) );
+
+  outmask->set( 0, 0, 1. );
+  outmask->set( 0, 1, -1. );
+  outmask->set( 0, 2, -1. );
+
+  outmask->set( 1, 0, 1. );
+  outmask->set( 1, 1, -2. );
+  outmask->set( 1, 2, -1. );
+
+  outmask->set( 2, 0, 1. );
+  outmask->set( 2, 1, 1. );
+  outmask->set( 2, 2, 1. );
+
+  return outmask;
+}
+
+
+TePDIFilterMask::pointer TePDIFilterMask::create_NE()
+{
+  TePDIFilterMask::pointer outmask( new TePDIFilterMask( 3, 0 ) );
+
+  outmask->set( 0, 0, 1. );
+  outmask->set( 0, 1, 1. );
+  outmask->set( 0, 2, 1. );
+
+  outmask->set( 1, 0, -1. );
+  outmask->set( 1, 1, -2. );
+  outmask->set( 1, 2, 1. );
+
+  outmask->set( 2, 0, -1. );
+  outmask->set( 2, 1, -1. );
+  outmask->set( 2, 2, 1. );
+
+  return outmask;
+}
+
+
+TePDIFilterMask::pointer TePDIFilterMask::create_SE()
+{
+  TePDIFilterMask::pointer outmask( new TePDIFilterMask( 3, 0 ) );
+
+  outmask->set( 0, 0, -1. );
+  outmask->set( 0, 1, -1. );
+  outmask->set( 0, 2, 1. );
+
+  outmask->set( 1, 0, -1. );
+  outmask->set( 1, 1, -2. );
+  outmask->set( 1, 2, 1. );
+
+  outmask->set( 2, 0, 1. );
+  outmask->set( 2, 1, 1. );
+  outmask->set( 2, 2, 1. );
+
+  return outmask;
+}
+
+
+TePDIFilterMask::pointer TePDIFilterMask::create_NDLow()
+{
+  TePDIFilterMask::pointer outmask( new TePDIFilterMask( 3, 0 ) );
+
+  outmask->set( 0, 0, 0 );
+  outmask->set( 0, 1, -1. );
+  outmask->set( 0, 2, 0 );
+
+  outmask->set( 1, 0, -1. );
+  outmask->set( 1, 1, 4. );
+  outmask->set( 1, 2, -1. );
+
+  outmask->set( 2, 0, 0 );
+  outmask->set( 2, 1, -1. );
+  outmask->set( 2, 2, 0 );
+
+  return outmask;
+}
+
+
+TePDIFilterMask::pointer TePDIFilterMask::create_NDMed()
+{
+  TePDIFilterMask::pointer outmask( new TePDIFilterMask( 3, 0 ) );
+
+  outmask->set( 0, 0, -1. );
+  outmask->set( 0, 1, -1. );
+  outmask->set( 0, 2, -1. );
+
+  outmask->set( 1, 0, -1. );
+  outmask->set( 1, 1, 8. );
+  outmask->set( 1, 2, -1. );
+
+  outmask->set( 2, 0, -1. );
+  outmask->set( 2, 1, -1. );
+  outmask->set( 2, 2, -1. );
+
+  return outmask;
+}
+
+
+TePDIFilterMask::pointer TePDIFilterMask::create_NDHigh()
+{
+  TePDIFilterMask::pointer outmask( new TePDIFilterMask( 3, 0 ) );
+
+  outmask->set( 0, 0, 1. );
+  outmask->set( 0, 1, -2. );
+  outmask->set( 0, 2, 1. );
+
+  outmask->set( 1, 0, -2. );
+  outmask->set( 1, 1, 4. );
+  outmask->set( 1, 2, -2. );
+
+  outmask->set( 2, 0, 1. );
+  outmask->set( 2, 1, -2. );
+  outmask->set( 2, 2, 1. );
+
+  return outmask;
+}
+
+
+TePDIFilterMask::pointer TePDIFilterMask::create_TMEnh( bool no_norm )
+{
+  TePDIFilterMask::pointer outmask( new TePDIFilterMask( 5, 0 ) );
+
+  outmask->set( 0, 0, 1. );
+  outmask->set( 0, 1, -3. );
+  outmask->set( 0, 2, -3. );
+  outmask->set( 0, 3, 1. );
+  outmask->set( 0, 4, 0 );
+
+  outmask->set( 1, 0, -3. );
+  outmask->set( 1, 1, 7. );
+  outmask->set( 1, 2, 7. );
+  outmask->set( 1, 3, -3. );
+  outmask->set( 1, 4, 0 );
+
+  outmask->set( 2, 0, -3. );
+  outmask->set( 2, 1, 7. );
+  outmask->set( 2, 2, 7. );
+  outmask->set( 2, 3, -3. );
+  outmask->set( 2, 4, 0 );
+
+  outmask->set( 3, 0, 1. );
+  outmask->set( 3, 1, -3. );
+  outmask->set( 3, 2, -3. );
+  outmask->set( 3, 3, 1. );
+  outmask->set( 3, 4, 0 );
+
+  outmask->set( 4, 0, 0 );
+  outmask->set( 4, 1, 0 );
+  outmask->set( 4, 2, 0 );
+  outmask->set( 4, 3, 0 );
+  outmask->set( 4, 4, 0 );
+
+  if( ! no_norm ) {
+    outmask->normalize();
+  }
+
+  return outmask;
+}
+
+
+TePDIFilterMask::pointer TePDIFilterMask::create_MorfD()
+{
+  TePDIFilterMask::pointer outmask( new TePDIFilterMask( 3, 0 ) );
+
+  outmask->set( 0, 0, 0 );
+  outmask->set( 0, 1, 0 );
+  outmask->set( 0, 2, 1. );
+
+  outmask->set( 1, 0, 0 );
+  outmask->set( 1, 1, 1. );
+  outmask->set( 1, 2, 0 );
+
+  outmask->set( 2, 0, 1. );
+  outmask->set( 2, 1, 0 );
+  outmask->set( 2, 2, 0 );
+
+  return outmask;
+}
+
+
+TePDIFilterMask::pointer TePDIFilterMask::create_MorfE()
+{
+  TePDIFilterMask::pointer outmask( new TePDIFilterMask( 3, 0 ) );
+
+  outmask->set( 0, 0, 1. );
+  outmask->set( 0, 1, 0 );
+  outmask->set( 0, 2, 0 );
+
+  outmask->set( 1, 0, 0 );
+  outmask->set( 1, 1, 1. );
+  outmask->set( 1, 2, 0 );
+
+  outmask->set( 2, 0, 0 );
+  outmask->set( 2, 1, 0 );
+  outmask->set( 2, 2, 1. );
+
+  return outmask;
+}
+
+
+TePDIFilterMask::pointer TePDIFilterMask::create_MorfM()
+{
+  TePDIFilterMask::pointer outmask( new TePDIFilterMask( 3, 0 ) );
+
+  outmask->set( 0, 0, 0 );
+  outmask->set( 0, 1, 1. );
+  outmask->set( 0, 2, 0 );
+
+  outmask->set( 1, 0, 0 );
+  outmask->set( 1, 1, 1. );
+  outmask->set( 1, 2, 0 );
+
+  outmask->set( 2, 0, 0 );
+  outmask->set( 2, 1, 1. );
+  outmask->set( 2, 2, 0 );
+
+  return outmask;
+}
+
+
+TePDIFilterMask::pointer TePDIFilterMask::create_MorfM_()
+{
+  TePDIFilterMask::pointer outmask( new TePDIFilterMask( 3, 0 ) );
+
+  outmask->set( 0, 0, 0 );
+  outmask->set( 0, 1, 0 );
+  outmask->set( 0, 2, 0 );
+
+  outmask->set( 1, 0, 1. );
+  outmask->set( 1, 1, 1. );
+  outmask->set( 1, 2, 1. );
+
+  outmask->set( 2, 0, 0 );
+  outmask->set( 2, 1, 0 );
+  outmask->set( 2, 2, 0 );
+
+  return outmask;
+}
+
+
+TePDIFilterMask::pointer TePDIFilterMask::create_MorfMPlus()
+{
+  TePDIFilterMask::pointer outmask( new TePDIFilterMask( 3, 0 ) );
+
+  outmask->set( 0, 0, 0 );
+  outmask->set( 0, 1, 1. );
+  outmask->set( 0, 2, 0 );
+
+  outmask->set( 1, 0, 1. );
+  outmask->set( 1, 1, 1. );
+  outmask->set( 1, 2, 1. );
+
+  outmask->set( 2, 0, 0 );
+  outmask->set( 2, 1, 1. );
+  outmask->set( 2, 2, 0 );
+
+  return outmask;
+}
+
+
+TePDIFilterMask::pointer TePDIFilterMask::create_MorfMtot()
+{
+  TePDIFilterMask::pointer outmask( new TePDIFilterMask( 3, 0 ) );
+
+  outmask->set( 0, 0, 1. );
+  outmask->set( 0, 1, 1. );
+  outmask->set( 0, 2, 1. );
+
+  outmask->set( 1, 0, 1. );
+  outmask->set( 1, 1, 1. );
+  outmask->set( 1, 2, 1. );
+
+  outmask->set( 2, 0, 1. );
+  outmask->set( 2, 1, 1. );
+  outmask->set( 2, 2, 1. );
+
+  return outmask;
+}
+
+
+TePDIFilterMask::pointer TePDIFilterMask::create_MorfMX()
+{
+  TePDIFilterMask::pointer outmask( new TePDIFilterMask( 3, 0 ) );
+
+  outmask->set( 0, 0, 1. );
+  outmask->set( 0, 1, 0 );
+  outmask->set( 0, 2, 1. );
+
+  outmask->set( 1, 0, 0 );
+  outmask->set( 1, 1, 1. );
+  outmask->set( 1, 2, 0 );
+
+  outmask->set( 2, 0, 1. );
+  outmask->set( 2, 1, 0 );
+  outmask->set( 2, 2, 1. );
+
+  return outmask;
+}
+
+
+
diff --git a/src/terralib/image_processing/TePDIFilterMask.hpp b/src/terralib/image_processing/TePDIFilterMask.hpp
new file mode 100755
index 0000000..df9d51a
--- /dev/null
+++ b/src/terralib/image_processing/TePDIFilterMask.hpp
@@ -0,0 +1,345 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIFILTERMASK_HPP
+  #define TEPDIFILTERMASK_HPP
+
+ #include "TePDIDefines.hpp"
+ #include <TeSharedPtr.h>
+
+  #include <TeMatrix.h>
+
+  /**
+   * @brief This is the class for image filtering mask.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIAux
+   */
+  class PDI_DLL TePDIFilterMask {
+    public :
+      /** @typedef TeSharedPtr< TePDIFilterMask > pointer
+          Type definition for a instance pointer */
+      typedef TeSharedPtr< TePDIFilterMask > pointer;
+      /** @typedef const TeSharedPtr< TePDIFilterMask > const_pointer 
+          Type definition for a const instance pointer */
+      typedef const TeSharedPtr< TePDIFilterMask > const_pointer;
+
+      /**
+       * @brief Default Constructor.
+       *
+       */
+      TePDIFilterMask();
+
+      /**
+       * @brief Alternative Constructor.
+       *
+       * @param width Mask width ( odd values ).
+       * @param gain Mask gain.
+       */
+      TePDIFilterMask( unsigned int width, double gain = 0 );
+
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIFilterMask();
+
+      /**
+       * @brief Resets the current mask.
+       *
+       * @param width Mask width.
+       * @param gain Mask gain.
+       */
+      void reset( unsigned int width, double gain = 0 );
+
+      /**
+       * @brief The current mask coluns number.
+       *
+       * @return Mask columns number.
+       */
+      unsigned int columns() const;
+
+      /**
+       * @brief The current mask lines number.
+       *
+       * @return Mask columns number.
+       */
+      unsigned int lines() const;
+
+      /**
+       * @brief Assingns a new value to the element.
+       *
+       * @param line Element line.
+       * @param column Element column.
+       * @param value Element velue.
+       */
+      void set( unsigned int line, unsigned int column, double value );
+
+      /**
+       * @brief Returns the required element value.
+       *
+       * @param line Element line.
+       * @param column Element column.
+       * @return The element value.
+       */
+      double get( unsigned int line, unsigned int column ) const;
+
+      /**
+       * @brief Returns the sum of the weights ( withour gain ).
+       *
+       * @return The sum of the weights ( withour gain ).
+       */
+      double getSum();
+
+      /**
+       * @brief Operator = overload.
+       *
+       * @param external External Mask reference.
+       */
+	  void operator=( const TePDIFilterMask& external );
+
+      /**
+       * @brief Normalizes the current mask.
+       */
+      void normalize();
+
+      /**
+       * @brief Return a simple matrix[line][column] with the current weights.
+       *
+       * @note No automatic deletion will be performed for the returned
+       * matrix.
+       *
+       * @return The weights matrix ( based on gain ).
+       */
+      double** getWeightsMatrix() const;
+
+      /**
+       * @brief Frees the memory of a weights matrix.
+       *
+       * @param matrix The weights matrix.
+       * @param lines The lines number.
+       */
+      static void deleteWeightsMatrix( double** matrix, unsigned int lines );
+
+
+      /**
+       * @brief Verify if the mask is a morfological filter mask.
+       *
+       * @return true if the mask is a morfological filter mask, false if not.
+       */
+      bool isMorfMask();
+
+      /**
+       * @brief Creates an dummy average mask.
+       *
+       * @return The created mask.
+       */
+      static TePDIFilterMask::pointer create_Dummy();
+      
+      /**
+       * @brief Creates an 3x3 average mask.
+       *
+       * @param no_norm if true, no normalization will be performed.
+       * @return The created mask.
+       */
+      static TePDIFilterMask::pointer create_Avg3x3( bool no_norm = false );
+
+      /**
+       * @brief Creates an 5x5 average mask.
+       *
+       * @param no_norm if true, no normalization will be performed.
+       * @return The created mask.
+       */
+      static TePDIFilterMask::pointer create_Avg5x5( bool no_norm = false );
+
+      /**
+       * @brief Creates an 7x7 average mask.
+       *
+       * @param no_norm if true, no normalization will be performed.
+       * @return The created mask.
+       */
+      static TePDIFilterMask::pointer create_Avg7x7( bool no_norm = false );
+
+      /**
+       * @brief Creates an 3x3 South mask.
+       *
+       * @return The created mask.
+       */
+      static TePDIFilterMask::pointer create_S();
+
+      /**
+       * @brief Creates an 3x3 North mask.
+       *
+       * @return The created mask.
+       */
+      static TePDIFilterMask::pointer create_N();
+
+      /**
+       * @brief Creates an 3x3 East mask.
+       *
+       * @return The created mask.
+       */
+      static TePDIFilterMask::pointer create_E();
+
+      /**
+       * @brief Creates an 3x3 West mask.
+       *
+       * @return The created mask.
+       */
+      static TePDIFilterMask::pointer create_W();
+
+      /**
+       * @brief Creates an 3x3 North-West mask.
+       *
+       * @return The created mask.
+       */
+      static TePDIFilterMask::pointer create_NW();
+
+      /**
+       * @brief Creates an 3x3 South-West mask.
+       *
+       * @return The created mask.
+       */
+      static TePDIFilterMask::pointer create_SW();
+
+      /**
+       * @brief Creates an 3x3 North-East mask.
+       *
+       * @return The created mask.
+       */
+      static TePDIFilterMask::pointer create_NE();
+
+      /**
+       * @brief Creates an 3x3 South-East mask.
+       *
+       * @return The created mask.
+       */
+      static TePDIFilterMask::pointer create_SE();
+
+      /**
+       * @brief Creates an non directional low frequencies pass filter mask.
+       *
+       * @return The created mask.
+       */
+      static TePDIFilterMask::pointer create_NDLow();
+
+      /**
+       * @brief Creates an non directional medium frequencies pass filter mask.
+       *
+       * @return The created mask.
+       */
+      static TePDIFilterMask::pointer create_NDMed();
+
+      /**
+       * @brief Creates an non directional high frequencies pass filter mask.
+       *
+       * @return The created mask.
+       */
+      static TePDIFilterMask::pointer create_NDHigh();
+
+      /**
+       * @brief Creates an filter mask for TM imagens enhancement.
+       *
+       * @param no_norm if true, no normalization will be performed.
+       * @return The created mask.
+       */
+      static TePDIFilterMask::pointer create_TMEnh( bool no_norm = false );
+
+      /**
+       * @brief Creates an morfological (D) filter mask.
+       *
+       * @param no_norm if true, no normalization will be performed.
+       * @return The created mask.
+       */
+      static TePDIFilterMask::pointer create_MorfD();
+
+      /**
+       * @brief Creates an morfological (E) filter mask.
+       *
+       * @param no_norm if true, no normalization will be performed.
+       * @return The created mask.
+       */
+      static TePDIFilterMask::pointer create_MorfE();
+
+      /**
+       * @brief Creates an morfological (M) filter mask.
+       *
+       * @param no_norm if true, no normalization will be performed.
+       * @return The created mask.
+       */
+      static TePDIFilterMask::pointer create_MorfM();
+
+      /**
+       * @brief Creates an morfological (M-) filter mask.
+       *
+       * @param no_norm if true, no normalization will be performed.
+       * @return The created mask.
+       */
+      static TePDIFilterMask::pointer create_MorfM_();
+
+      /**
+       * @brief Creates an morfological (M+) filter mask.
+       *
+       * @param no_norm if true, no normalization will be performed.
+       * @return The created mask.
+       */
+      static TePDIFilterMask::pointer create_MorfMPlus();
+
+      /**
+       * @brief Creates an morfological (Mtot) filter mask.
+       *
+       * @param no_norm if true, no normalization will be performed.
+       * @return The created mask.
+       */
+      static TePDIFilterMask::pointer create_MorfMtot();
+
+      /**
+       * @brief Creates an morfological (MX) filter mask.
+       *
+       * @param no_norm if true, no normalization will be performed.
+       * @return The created mask.
+       */
+      static TePDIFilterMask::pointer create_MorfMX();
+
+    protected :
+
+      /**
+       * @brief Internal weights matrix reference
+       */
+      mutable TeMatrix internal_matrix_;
+
+      /**
+       * @brief Internal matrix weights sum
+       */
+      double weights_sum_;
+
+      /**
+       * @brief Internal matrix weights gain
+       */
+      double weights_gain_;
+  };
+  
+/** @example TePDIFilterMask_test.cpp
+ *    Shows how to use this class.
+ */    
+
+#endif //TEPDIFILTERMASK_HPP
diff --git a/src/terralib/image_processing/TePDIFusion.cpp b/src/terralib/image_processing/TePDIFusion.cpp
new file mode 100755
index 0000000..667a8b7
--- /dev/null
+++ b/src/terralib/image_processing/TePDIFusion.cpp
@@ -0,0 +1,51 @@
+#include "TePDIFusion.hpp"
+#include "TePDIStrategyFactory.hpp"
+#include <TeAgnostic.h>
+
+
+TePDIFusion::TePDIFusion()
+{
+}
+
+
+TePDIFusion::~TePDIFusion()
+{
+}
+
+
+void TePDIFusion::ResetState( const TePDIParameters& params )
+{
+  TePDIParameters dummy_params = params;
+}
+
+
+bool TePDIFusion::CheckParameters( const TePDIParameters& parameters ) const
+{
+  std::string fusion_type;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "fusion_type", fusion_type ),
+    "Missing parameter : fusion_type" );
+
+  TePDIStrategy::pointer fusion_strategy(  
+    TePDIStrategyFactory::make( fusion_type, parameters ) );
+    
+  TEAGN_TRUE_OR_RETURN( fusion_strategy.isActive(), "Invalid strategy" );
+  
+  return fusion_strategy->CheckParameters( parameters );
+}
+
+
+bool TePDIFusion::RunImplementation()
+{
+  std::string fusion_type;
+  TEAGN_TRUE_OR_RETURN( params_.GetParameter( "fusion_type", fusion_type ),
+    "Missing parameter : fusion_type" );
+    
+  TePDIStrategy::pointer fusion_strategy(  
+    TePDIStrategyFactory::make( fusion_type, params_ ) );
+    
+  TEAGN_TRUE_OR_RETURN( fusion_strategy.isActive(), "Invalid strategy" );
+  
+  return fusion_strategy->Apply( params_ );
+}
+
+
diff --git a/src/terralib/image_processing/TePDIFusion.hpp b/src/terralib/image_processing/TePDIFusion.hpp
new file mode 100755
index 0000000..1d799ba
--- /dev/null
+++ b/src/terralib/image_processing/TePDIFusion.hpp
@@ -0,0 +1,96 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIFUSION_HPP
+  #define TEPDIFUSION_HPP
+
+  #include "TePDIAlgorithm.hpp"
+  #include "TePDIParameters.hpp"
+  #include <TeSharedPtr.h>
+
+  /**
+   * @brief This is the base class for image fusion algorithms.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIFusionAlgorithms
+   *
+   * @note The general required parameters:
+   * @param fusion_type ( std::string ) - Fusion type
+   * (See each fusion strategy for reference).
+   *
+   * @note The specific parameters: See each fusion strategy for reference.   
+   */
+  class PDI_DLL TePDIFusion : public TePDIAlgorithm{
+  
+    public :
+    
+      /** @typedef Type definition for a instance pointer */
+      typedef TeSharedPtr< TePDIFusion > pointer;
+      /** @typedef Type definition for a const instance pointer */
+      typedef const TeSharedPtr< TePDIFusion > const_pointer;
+      
+      /**
+       * @brief Default Constructor.
+       *
+       */
+      TePDIFusion();      
+
+      /**
+       * @brief Default Destructor
+       */
+      virtual ~TePDIFusion();
+
+      /**
+       * @brief Checks if the supplied parameters fits the requirements of each
+       * PDI algorithm implementation.
+       *
+       * @note Error log messages must be generated. No exceptions generated.
+       *
+       * @param parameters The parameters to be checked.
+       * @return true if the parameters are OK. false if not.
+       */
+      bool CheckParameters( const TePDIParameters& parameters ) const;   
+            
+    protected :
+    
+      /**
+       * @brief Reset the internal state to the initial state.
+       *
+       * @param params The new parameters referente at initial state.
+       */
+      void ResetState( const TePDIParameters& params );    
+     
+      /**
+       * @brief Runs the current algorithm implementation.
+       *
+       * @return true if OK. false on error.
+       */
+      bool RunImplementation();      
+  
+  };
+  
+/** @example TePDIFusion_test.cpp
+ *    Shows how to use this class.
+ */    
+
+#endif //TEPDIFUSION_HPP
diff --git a/src/terralib/image_processing/TePDIFusionFactory.cpp b/src/terralib/image_processing/TePDIFusionFactory.cpp
new file mode 100755
index 0000000..1ed8098
--- /dev/null
+++ b/src/terralib/image_processing/TePDIFusionFactory.cpp
@@ -0,0 +1,26 @@
+ 
+#include "TePDIFusionFactory.hpp"
+#include "TePDIFusion.hpp"
+#include <TeAgnostic.h>
+
+
+TePDIFusionFactory::TePDIFusionFactory()
+: TePDIAlgorithmFactory( std::string( "TePDIFusion" ) )
+{
+};      
+
+
+TePDIFusionFactory::~TePDIFusionFactory()
+{
+};
+
+
+TePDIAlgorithm* TePDIFusionFactory::build ( const TePDIParameters& arg )
+{
+  TePDIAlgorithm* instance_ptr = new TePDIFusion();
+  
+  TEAGN_TRUE_OR_THROW( instance_ptr->Reset( arg ),
+    "Invalid parameters" );
+  
+  return instance_ptr;
+}
diff --git a/src/terralib/image_processing/TePDIFusionFactory.hpp b/src/terralib/image_processing/TePDIFusionFactory.hpp
new file mode 100755
index 0000000..5db108b
--- /dev/null
+++ b/src/terralib/image_processing/TePDIFusionFactory.hpp
@@ -0,0 +1,67 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIFUSIONFACTORY_HPP
+  #define TEPDIFUSIONFACTORY_HPP
+
+  #include <TeSharedPtr.h>
+  #include "TePDIAlgorithmFactory.hpp"
+  #include "TePDIParameters.hpp"
+  
+  /**
+   * @brief This is the class for fusion algorithms factory.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIAlgorithmsFactories
+   */
+  class PDI_DLL TePDIFusionFactory : public TePDIAlgorithmFactory
+  {
+    public :
+      
+      /**
+       * @brief Default constructor
+       */
+      TePDIFusionFactory();      
+      
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIFusionFactory();
+      
+      protected :  
+      /**
+       * @brief Implementation for the abstract TeFactory::build.
+       *
+       * @param arg A const reference to the parameters used by the
+       * algorithm.
+       * @return A pointer to the new generated algorithm instance.
+       */
+      TePDIAlgorithm* build( const TePDIParameters& arg );
+      
+  };
+
+  namespace {
+    static TePDIFusionFactory TePDIFusionFactory_instance;
+  };  
+  
+#endif
diff --git a/src/terralib/image_processing/TePDIGarguetFusionSF.cpp b/src/terralib/image_processing/TePDIGarguetFusionSF.cpp
new file mode 100755
index 0000000..726ab4a
--- /dev/null
+++ b/src/terralib/image_processing/TePDIGarguetFusionSF.cpp
@@ -0,0 +1,21 @@
+#include "TePDIGarguetFusionSF.hpp"
+#include "TePDIGarguetFusionStrategy.hpp"
+
+TePDIGarguetFusionSF::TePDIGarguetFusionSF()
+: TePDIStrategyFactory( std::string( "garguet" ) )
+{
+};
+
+
+TePDIGarguetFusionSF::~TePDIGarguetFusionSF()
+{
+};
+
+
+TePDIStrategy* TePDIGarguetFusionSF::build ( const TePDIParameters& )
+{
+  TePDIStrategy* instance_ptr = new TePDIGarguetFusionStrategy();
+  
+  return instance_ptr;
+}
+
diff --git a/src/terralib/image_processing/TePDIGarguetFusionSF.hpp b/src/terralib/image_processing/TePDIGarguetFusionSF.hpp
new file mode 100755
index 0000000..755daba
--- /dev/null
+++ b/src/terralib/image_processing/TePDIGarguetFusionSF.hpp
@@ -0,0 +1,70 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIGARGUETFUSIONSF_HPP
+  #define TEPDIGARGUETFUSIONSF_HPP
+
+  #include <TeSharedPtr.h>
+  #include "TePDIStrategyFactory.hpp"
+  #include "TePDIParameters.hpp"
+  #include "TePDIStrategy.hpp"
+  
+  /**
+   * @brief This is the class for garguet fusion strategy factory.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIStrategiesFactories
+   */
+  class PDI_DLL TePDIGarguetFusionSF : public TePDIStrategyFactory
+  {
+    public :
+      
+      /**
+       * @brief Default constructor
+       */
+      TePDIGarguetFusionSF();      
+      
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIGarguetFusionSF();
+      
+    protected :  
+      /**
+       * @brief Implementation for the abstract TeFactory::build.
+       *
+       * @param arg A const reference to the parameters used by the
+       * algorithm.
+       * @return A pointer to the new generated strategy instance.
+       */
+      TePDIStrategy* build( const TePDIParameters& arg );
+      
+  };
+
+  namespace
+  {  
+    static TePDIGarguetFusionSF TePDIGarguetFusionSF_instance;
+  };
+
+#endif
+
diff --git a/src/terralib/image_processing/TePDIGarguetFusionStrategy.cpp b/src/terralib/image_processing/TePDIGarguetFusionStrategy.cpp
new file mode 100755
index 0000000..af70d50
--- /dev/null
+++ b/src/terralib/image_processing/TePDIGarguetFusionStrategy.cpp
@@ -0,0 +1,329 @@
+ 
+#include "TePDIGarguetFusionStrategy.hpp"
+#include "TePDIMathFunctions.hpp"
+#include "TePDIStrategyFactory.hpp"
+#include "TePDIMallatWavelets.hpp"
+#include "TePDIUtils.hpp"
+#include <TeAgnostic.h>
+
+#include <TeBox.h>
+#include <TeUtils.h>
+#include <TeRasterParams.h>
+#include <TeRasterRemap.h>
+
+TePDIGarguetFusionStrategy::TePDIGarguetFusionStrategy()
+{
+};      
+
+TePDIGarguetFusionStrategy::~TePDIGarguetFusionStrategy()
+{
+};
+
+
+bool TePDIGarguetFusionStrategy::CheckParameters( 
+  const TePDIParameters& parameters ) const
+{
+  /* Checking reference_raster */
+  
+  TePDITypes::TePDIRasterPtrType reference_raster;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "reference_raster", 
+    reference_raster ),
+    "Missing parameter: reference_raster" );
+  TEAGN_TRUE_OR_RETURN( reference_raster.isActive(),
+    "Invalid parameter: reference_raster inactive" );
+  TEAGN_TRUE_OR_RETURN( reference_raster->params().status_ != 
+    TeRasterParams::TeNotReady, 
+    "Invalid parameter: reference_raster not ready" );    
+    
+  /* Checking lowres_raster */
+  
+  TePDITypes::TePDIRasterPtrType lowres_raster;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "lowres_raster", 
+    lowres_raster ),
+    "Missing parameter: lowres_raster" );
+  TEAGN_TRUE_OR_RETURN( lowres_raster.isActive(),
+    "Invalid parameter: lowres_raster inactive" );
+  TEAGN_TRUE_OR_RETURN( lowres_raster->params().status_ != 
+    TeRasterParams::TeNotReady, "Invalid parameter: lowres_raster not ready" );    
+    
+  double max_low_res_raster_res =
+    MAX( lowres_raster->params().resx_, 
+    lowres_raster->params().resy_ );
+  double max_reference_raster_res =
+    MAX( reference_raster->params().resx_, 
+    reference_raster->params().resy_ );
+    
+  TEAGN_TRUE_OR_RETURN(     
+    ( max_low_res_raster_res > max_reference_raster_res ),
+    "Invalid low resolution raster resolution" );
+        
+  /* Checking output_raster */
+  
+  TePDITypes::TePDIRasterPtrType output_raster;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "output_raster", 
+    output_raster ),
+    "Missing parameter: output_raster" );
+  TEAGN_TRUE_OR_RETURN( output_raster.isActive(),
+    "Invalid parameter: output_raster inactive" );
+  TEAGN_TRUE_OR_RETURN( output_raster->params().status_ != 
+    TeRasterParams::TeNotReady, "Invalid parameter: output_raster not ready" );    
+    
+  /* Checking bands */    
+    
+  int reference_raster_band = 0;    
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "reference_raster_band", 
+    reference_raster_band ), "Missing parameter : reference_raster_band" );
+  TEAGN_TRUE_OR_RETURN( ( reference_raster->nBands() > reference_raster_band ),
+    "Invalid parameter : reference_raster_band" );
+    
+  int lowres_raster_band = 0;    
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "lowres_raster_band", 
+    lowres_raster_band ), "Missing parameter : lowres_raster_band" );
+  TEAGN_TRUE_OR_RETURN( ( lowres_raster->nBands() > lowres_raster_band ),
+    "Invalid parameter : lowres_raster_band" ); 
+    
+  /* Checking photometric interpretation */
+  
+  TEAGN_TRUE_OR_RETURN( ( 
+    ( reference_raster->params().photometric_[ reference_raster_band ] == 
+      TeRasterParams::TeRGB ) ||
+    ( reference_raster->params().photometric_[ reference_raster_band ] == 
+      TeRasterParams::TeMultiBand ) ),
+  "Invalid parameter - reference_raster (invalid photometric interpretation)" );   
+
+  TEAGN_TRUE_OR_RETURN( ( 
+    ( lowres_raster->params().photometric_[ lowres_raster_band ] == 
+      TeRasterParams::TeRGB ) ||
+    ( lowres_raster->params().photometric_[ lowres_raster_band ] == 
+      TeRasterParams::TeMultiBand ) ),
+  "Invalid parameter - lowres_raster (invalid photometric interpretation)" );   
+      
+  return true;
+}
+
+
+bool TePDIGarguetFusionStrategy::Implementation( const TePDIParameters& params )
+{
+  TePDITypes::TePDIRasterPtrType reference_raster;
+  params.GetParameter( "reference_raster", reference_raster );
+
+  TePDITypes::TePDIRasterPtrType lowres_raster;
+  params.GetParameter( "lowres_raster", lowres_raster );
+
+  TePDITypes::TePDIRasterPtrType output_raster;
+  params.GetParameter( "output_raster", output_raster );
+  
+  int reference_raster_band = 0;
+  params.GetParameter( "reference_raster_band", reference_raster_band );
+
+  int lowres_raster_band = 0;
+  params.GetParameter( "lowres_raster_band", lowres_raster_band );
+  
+  TePDITypes::TePDIRasterPtrType lowlow;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( lowlow, 1, 1, 1, false,
+    TeDOUBLE, 0 ), "Unable to create temporary low-low raster" );  
+  
+  /* Finding the best decomposition levels for reference raster */
+  
+  unsigned int rr_best_level = 0;
+  unsigned int rr_best_level_w = 0;
+  unsigned int rr_best_level_h = 0;
+  
+  TEAGN_TRUE_OR_RETURN( findBestDecimLevel( reference_raster,
+    lowres_raster, rr_best_level, rr_best_level_w,
+    rr_best_level_h ), 
+    "Unable to find the best decomposition level" )
+    
+ /* Building default wavelet filters  - Reference coef 07 */
+ 
+  double filters_scale = 0.71;
+  if( params.CheckParameter< double >( "filters_scale" ) ) {
+      
+    params.GetParameter( "filters_scale", filters_scale );
+  }
+    
+  std::vector< double > a_filter_l;
+  a_filter_l.push_back( -0.05 );
+  a_filter_l.push_back( 0.25 );
+  a_filter_l.push_back( 0.6 );
+  a_filter_l.push_back( 0.25 );
+  a_filter_l.push_back( -0.05 );
+  
+  std::vector< double > a_filter_h;
+  a_filter_h.push_back( 0.0107143 );
+  a_filter_h.push_back( -0.0535714 );
+  a_filter_h.push_back( -0.2607143 );
+  a_filter_h.push_back( 0.6071429 );
+  a_filter_h.push_back( -0.2607143 );
+  a_filter_h.push_back( -0.0535714 );
+  a_filter_h.push_back( 0.0107143 );
+  
+  std::vector< double > s_filter_l;
+  s_filter_l.push_back( -0.0107143 );
+  s_filter_l.push_back( -0.0535714 );
+  s_filter_l.push_back( 0.2607143 );
+  s_filter_l.push_back( 0.6071429 );
+  s_filter_l.push_back( 0.2607143 );
+  s_filter_l.push_back( -0.0535714 );
+  s_filter_l.push_back( -0.0107143 );
+  
+  std::vector< double > s_filter_h;
+  s_filter_h.push_back( -0.05 );
+  s_filter_h.push_back( -0.25 );
+  s_filter_h.push_back( 0.6 );
+  s_filter_h.push_back( -0.25 );
+  s_filter_h.push_back( -0.05 );
+  
+  /* Checking for user supplied wavelet filters */
+  
+  if( params.CheckParameter< std::vector< double > >( "a_filter_l" ) ) {
+      
+    params.GetParameter( "a_filter_l", a_filter_l );
+  }
+  if( params.CheckParameter< std::vector< double > >( "a_filter_h" ) ) {
+      
+    params.GetParameter( "a_filter_h", a_filter_h );
+  }  
+  if( params.CheckParameter< std::vector< double > >( "s_filter_l" ) ) {
+      
+    params.GetParameter( "s_filter_l", s_filter_l );
+  }
+  if( params.CheckParameter< std::vector< double > >( "s_filter_h" ) ) {
+      
+    params.GetParameter( "s_filter_h", s_filter_h );
+  }  
+
+  /* Bringing the low res raster to the correct size */
+
+  if( ( lowres_raster->params().nlines_ != (int)rr_best_level_h ) ||
+    ( lowres_raster->params().ncols_ != (int)rr_best_level_w ) ) {
+
+    TePDITypes::TePDIRasterPtrType resampled_raster;
+
+    TeRasterParams dummy_pars;
+    dummy_pars.setNLinesNColumns( 1, 1 );
+
+    TEAGN_TRUE_OR_RETURN( TePDIUtils::TeAllocRAMRaster( 
+      resampled_raster,
+      dummy_pars, TePDIUtils::TePDIUtilsAutoMemPol ),
+      "Unable create the new resampled raster" );
+
+    TePDIInterpolator::InterpMethod int_method = 
+      TePDIInterpolator::NNMethod;
+    if( 
+      ( ( (int)rr_best_level_h ) < 
+      lowres_raster->params().nlines_ ) ||
+      ( ( (int)rr_best_level_w ) < 
+      lowres_raster->params().ncols_ ) ) {
+
+      int_method = TePDIInterpolator::BicubicMethod;
+    }
+
+    TEAGN_TRUE_OR_RETURN( TePDIUtils::resampleRasterByLinsCols(
+      lowres_raster, resampled_raster, rr_best_level_h,
+      rr_best_level_w, progress_interface_enabled_,
+      TePDIInterpolator::NNMethod ),
+      "Error resampling low resolution raster" );
+
+    lowres_raster = resampled_raster;
+  }
+
+
+  /* starting filter */
+  
+  TePDIParameters params2;
+  params2.SetParameter( "filter_task", std::string( "SBSwap" ) );
+  params2.SetParameter( "input_image", reference_raster );
+  params2.SetParameter( "band", reference_raster_band );
+  params2.SetParameter( "output_image", output_raster );
+  params2.SetParameter( "a_filter_l", a_filter_l );
+  params2.SetParameter( "a_filter_h", a_filter_h );
+  params2.SetParameter( "s_filter_l", s_filter_l );
+  params2.SetParameter( "s_filter_h", s_filter_h );    
+  params2.SetParameter( "filters_scale", filters_scale );         
+  params2.SetParameter( "levels", (int)rr_best_level );  
+  params2.SetParameter( "sub_band", lowres_raster ); 
+  params2.SetParameter( "sub_band_index", (int)0 );  
+    
+  TePDIMallatWavelets filter2;
+  filter2.ToggleProgInt( progress_interface_enabled_ );
+  TEAGN_TRUE_OR_RETURN( filter2.Reset( params2 ),
+    "Unable to set wavelet filter 2 Parameters" );  
+  TEAGN_TRUE_OR_RETURN( filter2.Apply(), 
+    "Wavelet Filter apply error" );  
+    
+  return true;
+}
+
+
+bool TePDIGarguetFusionStrategy::findBestDecimLevel( 
+  const TePDITypes::TePDIRasterPtrType& reference_raster,
+  const TePDITypes::TePDIRasterPtrType& lowres_raster,
+  unsigned int& rr_level, 
+  unsigned int& rr_level_width,
+  unsigned int& rr_level_height )
+{
+  /* Default output values */
+
+  rr_level = rr_level_width = rr_level_height = 0;
+
+  /* Input checking */
+
+  TEAGN_TRUE_OR_THROW( reference_raster.isActive(), 
+    "reference_raster inactive" );
+  TEAGN_TRUE_OR_THROW( lowres_raster.isActive(), 
+    "lowres_raster inactive" );
+    
+  unsigned int rr_lines =   
+    reference_raster->params().nlines_ ;
+  unsigned int rr_cols = 
+    reference_raster->params().ncols_;
+
+  const unsigned long int rr_max_levels = MIN(
+    TePDIMathFunctions::DecimLevels( rr_lines ),
+    TePDIMathFunctions::DecimLevels( rr_cols ) );  
+  
+  if( rr_max_levels > 0 ) {
+    double rr_resx = reference_raster->params().resx_;
+    double rr_resy = reference_raster->params().resy_;
+    double lr_resx = lowres_raster->params().resx_;
+    double lr_resy = lowres_raster->params().resy_;
+    double curr_diff_y = 0;
+    double curr_diff_x = 0;
+    double curr_err = 0;
+    double best_err = DBL_MAX;
+    
+    for( unsigned long int curr_rr_level = 1 ; 
+      curr_rr_level <= rr_max_levels ; 
+      ++curr_rr_level ) {
+      
+      rr_lines = (unsigned int)
+        ceil( ( (double)rr_lines ) / 2 );
+      rr_cols = (unsigned int)
+        ceil( ( (double)rr_cols ) / 2 );
+      rr_resy *= 2.0;
+      rr_resx *= 2.0;   
+        
+      curr_diff_y = ABS( lr_resy - rr_resy );
+      curr_diff_x = ABS( lr_resx - rr_resx );
+
+      curr_err = MAX( curr_diff_x, curr_diff_y );
+          
+      if( curr_err < best_err ) {
+        best_err = curr_err;
+
+        rr_level = curr_rr_level;
+        rr_level_width = rr_cols;
+        rr_level_height = rr_lines;
+      }
+    }
+  }
+
+  if( rr_level > 0 ) {
+    return true;
+  } else {
+    return false;
+  }
+}
+
+
diff --git a/src/terralib/image_processing/TePDIGarguetFusionStrategy.hpp b/src/terralib/image_processing/TePDIGarguetFusionStrategy.hpp
new file mode 100755
index 0000000..a473949
--- /dev/null
+++ b/src/terralib/image_processing/TePDIGarguetFusionStrategy.hpp
@@ -0,0 +1,133 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIGARGUETFUSIONSTRATEGY_HPP
+  #define TEPDIGARGUETFUSIONSTRATEGY_HPP
+
+  #include <TeSharedPtr.h>
+  #include "TePDIStrategy.hpp"
+  #include "TePDIParameters.hpp"
+  
+  #include <string>
+
+  /**
+   * @brief This is the class for garguet fusion strategy.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIStrategies
+   *
+   * @note The required parameters are:
+   * @param fusion_type ( std::string ) : Must be "garguet".
+   * @param reference_raster ( TePDITypes::TePDIRasterPtrType ) - 
+   *  Reference raster ( higher quality ).
+   * @param lowres_raster ( TePDITypes::TePDIRasterPtrType ) - 
+   *  Low resolution raster ( will be improved ).
+   * @param output_raster ( TePDITypes::TePDIRasterPtrType ) - Output raster.
+   * @param reference_raster_band ( int ) - The band to process for 
+   * reference_raster.
+   * @param lowres_raster_band ( int ) - The band to process for lowres_raster.
+   *
+   * @note The following parameters are optional, and will be used if present:
+   *
+   * @param filters_scale ( double ) - The wavelet filters scale.
+   * @param a_filter_l ( std::vector< double > ) - Wavelet Analysis filter, 
+   * low pass, non
+   * normalized ( used in decomposition ).
+   * @param a_filter_h ( std::vector< double > ) - Wavelet Analysis filter, 
+   * high pass, non
+   * normalized ( used in decomposition ).
+   * @param s_filter_l ( std::vector< double > ) - Wavelet Synthesis filter, 
+   * low pass, non
+   * normalized ( used in recomposition ).
+   * @param s_filter_h ( std::vector< double > ) - Wavelet Synthesis filter, 
+   * high pass, non
+   * normalized ( used in recomposition ).    
+   *
+   */
+  class PDI_DLL TePDIGarguetFusionStrategy : public TePDIStrategy
+  {
+    friend class TePDIGarguetFusionSF;
+  
+    public :
+      
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIGarguetFusionStrategy();
+      
+      /**
+       * @brief Checks if the supplied parameters fits the requirements of each
+       * PDI strategy.
+       *
+       * @note Error log messages must be generated. No exceptions generated.
+       *
+       * @param parameters The parameters to be checked.
+       * @return true if the parameters are OK. false if not.
+       */
+      bool CheckParameters( 
+        const TePDIParameters& parameters ) const;       
+      
+    protected :
+      
+      /**
+       * @brief Default constructor
+       *
+       * @param factoryName Factory name.
+       */
+      TePDIGarguetFusionStrategy();
+      
+      /**
+       * @brief Runs the algorithm implementation.
+       *
+       * @return true if OK. false on errors.
+       */
+      bool Implementation( const TePDIParameters& params );
+      
+
+      /**
+      * @brief Find the best reference_raster decimation level 
+      * that comes close to lowres_raster.
+      *
+      * @param reference_raster Reference raster.
+      * @param lowres_raster Low resolution raster.
+      * @param rr_level Reference raster best decomposition level.
+      * @param rr_level_width Reference raster best decomposition level
+      * width (starting from level 1 - at least 1 decimation
+      * done)
+      * @param rr_level_height Reference raster best decomposition level
+      * height.      
+      * @return true if OK. false on errors.
+      */
+      bool findBestDecimLevel( 
+        const TePDITypes::TePDIRasterPtrType& reference_raster,
+        const TePDITypes::TePDIRasterPtrType& lowres_raster,
+        unsigned int& rr_level, 
+        unsigned int& rr_level_width,
+        unsigned int& rr_level_height );      
+   
+  };
+  
+#endif
+
+
+
diff --git a/src/terralib/image_processing/TePDIGeoMosaic.cpp b/src/terralib/image_processing/TePDIGeoMosaic.cpp
new file mode 100755
index 0000000..c2ace6a
--- /dev/null
+++ b/src/terralib/image_processing/TePDIGeoMosaic.cpp
@@ -0,0 +1,280 @@
+#include "TePDIGeoMosaic.hpp"
+#include "TePDIBlending.hpp"
+#include "TePDIUtils.hpp"
+#include <TeAgnostic.h>
+
+#include <TeVectorRemap.h>
+
+
+TePDIGeoMosaic::TePDIGeoMosaic()
+{
+}
+
+
+TePDIGeoMosaic::~TePDIGeoMosaic()
+{
+}
+
+
+void TePDIGeoMosaic::ResetState( const TePDIParameters& )
+{
+}
+
+
+bool TePDIGeoMosaic::CheckParameters( const TePDIParameters& parameters ) const
+{
+  /* Checking input_raster1 */
+  
+  TePDITypes::TePDIRasterPtrType input_raster1;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "input_raster1", 
+    input_raster1 ),
+    "Missing parameter: input_raster1" );
+  TEAGN_TRUE_OR_RETURN( input_raster1.isActive(),
+    "Invalid parameter: input_raster1 inactive" );
+  TEAGN_TRUE_OR_RETURN( input_raster1->params().status_ != 
+    TeRasterParams::TeNotReady, "Invalid parameter: input_raster1 not ready" );    
+    
+  /* Checking input_raster2 */
+  
+  TePDITypes::TePDIRasterPtrType input_raster2;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "input_raster2", 
+    input_raster2 ),
+    "Missing parameter: input_raster2" );
+  TEAGN_TRUE_OR_RETURN( input_raster2.isActive(),
+    "Invalid parameter: input_raster2 inactive" );
+  TEAGN_TRUE_OR_RETURN( input_raster2->params().status_ != 
+    TeRasterParams::TeNotReady, "Invalid parameter: input_raster2 not ready" );    
+    
+  /* channels1 parameter checking */
+
+  std::vector< int > channels1;
+  TEAGN_TRUE_OR_RETURN( 
+    parameters.GetParameter( "channels1", channels1 ), 
+    "Missing parameter: channels1" );
+  for( unsigned int channels1_index = 0 ; 
+    channels1_index < channels1.size() ; 
+    ++channels1_index ) {
+    
+    TEAGN_TRUE_OR_RETURN( ( channels1[ channels1_index ] >= 0 ) &&
+      ( channels1[ channels1_index ] < input_raster1->nBands() ),
+      "Invalid parameter: channels1" );
+  }
+  
+  /* channels2 parameter checking */
+
+  std::vector< int > channels2;
+  TEAGN_TRUE_OR_RETURN( 
+    parameters.GetParameter( "channels2", channels2 ), 
+    "Missing parameter: channels2" );
+  TEAGN_TRUE_OR_RETURN( ( channels2.size() == channels1.size() ),
+    "Size mismatch between channels1 and channels2" );
+  for( unsigned int channels2_index = 0 ; 
+    channels2_index < channels2.size() ; 
+    ++channels2_index ) {
+    
+    TEAGN_TRUE_OR_RETURN( ( channels2[ channels2_index ] >= 0 ) &&
+      ( channels2[ channels2_index ] < input_raster2->nBands() ),
+      "Invalid parameter: channels2" );
+  }     
+    
+  /* Checking output_raster */
+  
+  TePDITypes::TePDIRasterPtrType output_raster;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "output_raster", 
+    output_raster ),
+    "Missing parameter: output_raster" );
+  TEAGN_TRUE_OR_RETURN( output_raster.isActive(),
+    "Invalid parameter: output_raster inactive" );
+  TEAGN_TRUE_OR_RETURN( output_raster->params().status_ != 
+    TeRasterParams::TeNotReady, "Invalid parameter: output_raster not ready" );
+
+  /* Checking for blending type */
+  
+  std::string blending_type;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "blending_type", 
+    blending_type ), "Missing parameter: blending_type" );
+    
+  /* Checking rasters projections */
+  
+  TEAGN_TRUE_OR_RETURN( ( input_raster1->params().projection() != 0 ),
+    "Missing input_raster1 projection" );
+  TEAGN_TRUE_OR_RETURN( 
+    ( input_raster1->params().projection()->name() != "NoProjection" ),
+    "Invalid input_raster1 projection" );  
+  TEAGN_TRUE_OR_RETURN( ( input_raster2->params().projection() != 0 ),
+    "Missing input_raster2 projection" );
+  TEAGN_TRUE_OR_RETURN( 
+    ( input_raster2->params().projection()->name() != "NoProjection" ),
+    "Invalid input_raster2 projection" );      
+    
+  return true;
+}
+
+
+bool TePDIGeoMosaic::RunImplementation()
+{
+  TePDITypes::TePDIRasterPtrType input_raster1;
+  params_.GetParameter( "input_raster1", input_raster1 );
+
+  TePDITypes::TePDIRasterPtrType input_raster2;
+  params_.GetParameter( "input_raster2", input_raster2 );
+  
+  std::vector< int > channels1;
+  params_.GetParameter( "channels1", channels1 );
+
+  std::vector< int > channels2;
+  params_.GetParameter( "channels2", channels2 ); 
+
+  TePDITypes::TePDIRasterPtrType output_raster;
+  params_.GetParameter( "output_raster", output_raster );
+  
+  /* Input rasters swap using pixel resolution as reference */
+  
+  if( params_.CheckParameter< int >( "keep_best_res" ) ) {
+    
+    double raster1_x_res = 0;
+    double raster1_y_res = 0;
+    TePDIUtils::getGeodeticPixelRes( input_raster1->params(), 
+      raster1_x_res, raster1_y_res );    
+      
+    double raster2_x_res = 0;
+    double raster2_y_res = 0;
+    TePDIUtils::getGeodeticPixelRes( input_raster2->params(), 
+      raster2_x_res, raster2_y_res );      
+    
+    if( ( ( raster2_x_res <= raster1_x_res ) &&
+        ( raster2_y_res < raster1_y_res ) ) ||
+      ( ( raster2_x_res < raster1_x_res ) &&
+        ( raster2_y_res <= raster1_y_res ) ) ) 
+    {
+    
+      TePDITypes::TePDIRasterPtrType temp_raster_ptr = input_raster1;
+      input_raster1 = input_raster2;
+      input_raster2 = temp_raster_ptr;
+    }
+  }
+  
+  /* Dumyy value definition */
+ 
+  const bool output_raster_uses_dummy = output_raster->params().useDummy_;
+  double output_raster_dummy = 0;
+  if( output_raster_uses_dummy ) {
+    output_raster_dummy = output_raster->params().dummy_[ 0 ];
+  }
+  
+  bool user_required_dummy = false;
+  double user_dummy = 0;
+  if( params_.CheckParameter< double >( "dummy_value" ) ) {
+    
+    params_.GetParameter( "dummy_value", user_dummy );
+    user_required_dummy = true;
+  }
+  
+  bool must_use_dummy = false;
+  double output_dummy_value = 0;
+  if( user_required_dummy ) {
+    must_use_dummy = true;
+    output_dummy_value = user_dummy;
+  } else if( output_raster_uses_dummy ) {
+    must_use_dummy = true;
+    output_dummy_value = output_raster_dummy;
+  }
+  
+  /* Bringing input_raster2 to the same projection and resolution,
+     if needed */
+     
+  TePolygon input_raster2_pol_proj1;
+  
+  if( ( input_raster1->params().projection()->name() != 
+        input_raster2->params().projection()->name() ) ||
+      ( input_raster1->params().resx_ != 
+        input_raster2->params().resx_ ) ||        
+      ( input_raster1->params().resy_ != 
+        input_raster2->params().resy_ ) ) {
+        
+    /* input_raster2 reprojection */
+        
+    TePDITypes::TePDIRasterPtrType new_input_raster2;
+    TeRasterParams new_input_raster2_params = input_raster2->params();
+    new_input_raster2_params.setNLinesNColumns( 10, 10 );
+    TEAGN_TRUE_OR_RETURN( TePDIUtils::TeAllocRAMRaster( new_input_raster2, 
+      new_input_raster2_params, TePDIUtils::TePDIUtilsAutoMemPol ), 
+      "Unable to allocate new_input_raster2" );
+      
+    TEAGN_TRUE_OR_RETURN( TePDIUtils::reprojectRaster( input_raster2,
+      *( input_raster1->projection() ), input_raster1->params().resx_,
+      input_raster1->params().resy_, new_input_raster2 ),
+      "Raster reprojection error" );
+    
+    /* updating input_raster2_pol_proj1 */
+
+    TePolygon input_raster2_pol_proj2;
+    
+    TEAGN_TRUE_OR_RETURN( TePDIUtils::buildDetailedBBox( input_raster2,
+      input_raster2_pol_proj2 ), 
+      "Unable to build raster2 detailed bounding box" );
+    
+    TeVectorRemap( input_raster2_pol_proj2, input_raster2->projection(),
+      input_raster2_pol_proj1, input_raster1->projection() );         
+      
+    /* swapping raster */
+      
+    input_raster2 = new_input_raster2;
+  } else {
+    TeBox input_raster2_box_proj2 = input_raster2->params().boundingBox();
+    input_raster2_pol_proj1 = polygonFromBox( input_raster2_box_proj2 );
+  }
+  
+  /* Finding the offset between the two boxes */
+  
+  double raster2_pol_offset_x = 0;
+  double raster2_pol_offset_y = 0;
+  {
+    TeBox pol1_box_indexed;
+    TeBox input_raster_box = input_raster1->params().box();
+    TePDIUtils::MapCoords2RasterIndexes( 
+      input_raster_box, input_raster1, pol1_box_indexed );
+          
+    double p1_min_x = MIN( pol1_box_indexed.x1(),
+      pol1_box_indexed.x2() );
+    double p1_min_y = MIN( pol1_box_indexed.y1(),
+      pol1_box_indexed.y2() );      
+      
+    TeBox pol2_box_indexed;
+    TePDIUtils::MapCoords2RasterIndexes( input_raster2_pol_proj1.box(),
+      input_raster1, pol2_box_indexed );
+          
+    double p2_min_x = MIN( pol2_box_indexed.x1(),
+      pol2_box_indexed.x2() );
+    double p2_min_y = MIN( pol2_box_indexed.y1(),
+      pol2_box_indexed.y2() );       
+
+    raster2_pol_offset_x = p2_min_x - p1_min_x;
+    raster2_pol_offset_y = p2_min_y - p1_min_y;
+  }
+    
+  /* Creating blending parameters */
+    
+  TePDIParameters blend_params = params_;
+  blend_params.SetParameter( "input_raster1", input_raster1 );
+  blend_params.SetParameter( "input_raster2", input_raster2 );
+  
+  TeBox input_raster_box = input_raster1->params().boundingBox();
+  TePDITypes::TePDIPolygonPtrType raster1_pol_ptr( new TePolygon );
+  *raster1_pol_ptr = polygonFromBox( input_raster_box );
+  blend_params.SetParameter( "raster1_pol_ptr",  raster1_pol_ptr );
+    
+  TePDITypes::TePDIPolygonPtrType raster2_pol_ptr( 
+    &input_raster2_pol_proj1, true );
+  blend_params.SetParameter( "raster2_pol_ptr", raster2_pol_ptr );
+  
+  blend_params.SetParameter( "raster2_pol_offset_x", raster2_pol_offset_x );
+  blend_params.SetParameter( "raster2_pol_offset_y", raster2_pol_offset_y );
+  
+  TePDIBlending blend_instance;
+  TEAGN_TRUE_OR_RETURN( blend_instance.Reset( blend_params ), 
+    "Blending instance reset error" );
+  
+  return blend_instance.Apply();
+}
+
diff --git a/src/terralib/image_processing/TePDIGeoMosaic.hpp b/src/terralib/image_processing/TePDIGeoMosaic.hpp
new file mode 100755
index 0000000..23b85be
--- /dev/null
+++ b/src/terralib/image_processing/TePDIGeoMosaic.hpp
@@ -0,0 +1,110 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIGEOMOSAIC_HPP
+  #define TEPDIGEOMOSAIC_HPP
+
+  #include "TePDIAlgorithm.hpp"
+  #include "TePDIParameters.hpp"
+  #include <TeSharedPtr.h>
+
+  /**
+   * @brief This is the class for Geographic Mosaic ( geo-referenced rasters )
+   * strategy.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup TePDIMosaicGroup
+   *
+   * @note The required parameters are:
+   * @param blending_type ( std::string ) - Blending type.
+   * type ( see TePDIBlendStratFactory documentation for avaliable
+   * blending strategies ).   
+   * @param input_raster1 ( TePDITypes::TePDIRasterPtrType ) - 
+   *  Input raster 1.
+   * @param input_raster2 ( TePDITypes::TePDIRasterPtrType ) - 
+   *  Input raster 2.
+   * @param channels1 ( std::vector< int > ) - The channels to process from 
+   * input_raster1.
+   * @param channels2 ( std::vector< int > ) - The channels to process from 
+   * input_raster2. 
+   * @param output_raster ( TePDITypes::TePDIRasterPtrType ) - Output raster.
+   *
+   * @note The optional parameters are:
+   *
+   * @param dummy_value (double) - A dummy pixel value for use 
+   * in pixels where no data is available.     
+   * @param keep_best_res (int) - If present (any value) the best
+   * resolution raster will be used as reference.
+   * @param auto_equalize ( int ) - If present ( any value ), input_raster2
+   * auto-equalizing will be made ( using overlap area reference ).   
+   *
+   * @note The output_raster parameters will take the choosed reference
+   * raster parameters.
+   */
+  class PDI_DLL TePDIGeoMosaic : public TePDIAlgorithm {
+    public :
+      
+      /**
+       * @brief Default Constructor.
+       *
+       */
+      TePDIGeoMosaic();
+
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIGeoMosaic();
+      
+      /**
+       * @brief Checks if the supplied parameters fits the requirements of 
+       * each PDI algorithm implementation.
+       *
+       * @note Error log messages must be generated. No exceptions generated.
+       *
+       * @param parameters The parameters to be checked.
+       * @return true if the parameters are OK. false if not.
+       */
+      bool CheckParameters( const TePDIParameters& parameters ) const;      
+
+    protected :
+    
+      /**
+       * @brief Reset the internal state to the initial state.
+       *
+       * @param params The new parameters referente at initial state.
+       */
+      void ResetState( const TePDIParameters& params );    
+     
+      /**
+       * @brief Runs the current algorithm implementation.
+       *
+       * @return true if OK. false on error.
+       */
+      bool RunImplementation();      
+  };
+  
+/** @example TePDIMosaic_test.cpp
+ *    Shows how to use this class.
+ */    
+
+#endif
diff --git a/src/terralib/image_processing/TePDIGeoMosaicFactory.cpp b/src/terralib/image_processing/TePDIGeoMosaicFactory.cpp
new file mode 100644
index 0000000..1181bbe
--- /dev/null
+++ b/src/terralib/image_processing/TePDIGeoMosaicFactory.cpp
@@ -0,0 +1,26 @@
+ 
+#include "TePDIGeoMosaicFactory.hpp"
+#include "TePDIGeoMosaic.hpp"
+#include <TeAgnostic.h>
+
+
+TePDIGeoMosaicFactory::TePDIGeoMosaicFactory()
+: TePDIAlgorithmFactory( std::string( "TePDIGeoMosaic" ) )
+{
+}
+
+
+TePDIGeoMosaicFactory::~TePDIGeoMosaicFactory()
+{
+}
+
+
+TePDIAlgorithm* TePDIGeoMosaicFactory::build ( const TePDIParameters& arg )
+{
+  TePDIAlgorithm* instance_ptr = new TePDIGeoMosaic();
+  
+  TEAGN_TRUE_OR_THROW( instance_ptr->Reset( arg ),
+    "Invalid parameters" );
+  
+  return instance_ptr;
+}
diff --git a/src/terralib/image_processing/TePDIGeoMosaicFactory.hpp b/src/terralib/image_processing/TePDIGeoMosaicFactory.hpp
new file mode 100644
index 0000000..ef9648f
--- /dev/null
+++ b/src/terralib/image_processing/TePDIGeoMosaicFactory.hpp
@@ -0,0 +1,68 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIGEOMOSAICFACTORY_HPP
+  #define TEPDIGEOMOSAICFACTORY_HPP
+
+  #include <TeSharedPtr.h>
+  #include "TePDIAlgorithmFactory.hpp"
+  #include "TePDIParameters.hpp"
+  
+  /**
+   * @brief This is the class for image geographic mosaic algorithms factory.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIAlgorithmsFactories
+   */
+  class PDI_DLL TePDIGeoMosaicFactory : public TePDIAlgorithmFactory
+  {
+    public :
+      
+      /**
+       * @brief Default constructor
+       */
+      TePDIGeoMosaicFactory();      
+      
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIGeoMosaicFactory();
+      
+    protected :  
+      
+      /**
+       * @brief Implementation for the abstract TeFactory::build.
+       *
+       * @param arg A const reference to the parameters used by the
+       * algorithm.
+       * @return A pointer to the new generated algorithm instance.
+       */
+      TePDIAlgorithm* build( const TePDIParameters& arg );
+      
+  };
+
+  namespace {
+    static TePDIGeoMosaicFactory TePDIGeoMosaicFactory_instance;
+  };  
+  
+#endif
diff --git a/src/terralib/image_processing/TePDIHaralick.cpp b/src/terralib/image_processing/TePDIHaralick.cpp
new file mode 100755
index 0000000..9874135
--- /dev/null
+++ b/src/terralib/image_processing/TePDIHaralick.cpp
@@ -0,0 +1,605 @@
+#include "TePDIHaralick.hpp"
+
+#include <TeGeometryAlgorithms.h>
+#include <TeCoord2D.h>
+#include <TeAgnostic.h>
+
+#include <math.h>
+
+#define INSERT_CONCURRENCE( concpixel_line, concpixel_col ) \
+  { \
+    if( input_raster_->getElement( concpixel_col, concpixel_line, \
+      auxkey.second, band ) ) \
+    { \
+      auxkey.first = itp.operator*(band); \
+      ++( mat[ auxkey ] ); \
+      \
+      inverseAuxKey.first = auxkey.second; \
+      inverseAuxKey.second = auxkey.first; \
+      ++( mat[ inverseAuxKey ] ); \
+    } \
+  };
+  
+  
+TePDIHaralick::COMatrixCacheNodeT::COMatrixCacheNodeT()
+{
+};
+
+TePDIHaralick::COMatrixCacheNodeT::~COMatrixCacheNodeT()
+{
+};
+
+TePDIHaralick::TePDIHaralick( int dirmask )
+{
+  polygonset_.reset( new TePolygonSet );
+  dirmask_ = dirmask;
+}
+
+
+TePDIHaralick::~TePDIHaralick()
+{
+  clear();
+}
+
+
+void TePDIHaralick::ResetState( const TePDIParameters& params )
+{
+  clear();
+  
+  TEAGN_TRUE_OR_THROW( params.GetParameter( "input_raster", input_raster_ ),
+    "Missing parameter input_raster" )
+  TEAGN_TRUE_OR_THROW( params.GetParameter( "polygonset", polygonset_ ),
+    "Missing parameter polygonset" )
+}
+
+
+bool TePDIHaralick::RunImplementation()
+{
+  TEAGN_LOG_AND_THROW( "This function cannot be used for this class" );
+  return false;
+}
+
+
+bool TePDIHaralick::CheckParameters( 
+  const TePDIParameters& parameters ) const
+{
+  /* Checking input_raster1 */
+  
+  TePDITypes::TePDIRasterPtrType input_raster;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "input_raster", 
+    input_raster ),
+    "Missing parameter: input_raster" );
+  TEAGN_TRUE_OR_RETURN( input_raster.isActive(),
+    "Invalid parameter: input_raster inactive" );
+  TEAGN_TRUE_OR_RETURN( input_raster->params().status_ != 
+    TeRasterParams::TeNotReady, "Invalid parameter: input_raster not ready" );
+  
+  for( int band = 0 ; band < input_raster->params().nBands() ;
+    ++band )
+  {
+    TEAGN_TRUE_OR_RETURN( input_raster->params().dataType_[ band ] !=
+      TeFLOAT, "Invalid raster data type" )
+    TEAGN_TRUE_OR_RETURN( input_raster->params().dataType_[ band ] !=
+      TeDOUBLE, "Invalid raster data type" )
+  }
+
+  /* Checking the restriction polygon set */
+  
+  TePDITypes::TePDIPolygonSetPtrType polygonset;  
+  
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "polygonset", polygonset ),
+    "Missing parameter : polygonset" );
+  
+  TEAGN_TRUE_OR_RETURN( polygonset.isActive(), 
+    "Invalid parameter : polygonset" );
+    
+  TEAGN_TRUE_OR_RETURN( polygonset->size() > 0, 
+    "Invalid parameter : polygonset" );    
+      
+  return true;
+}
+
+
+bool TePDIHaralick::getEntropy( unsigned int band, unsigned int pol_index,
+  double& entropyValue )
+{
+  TEAGN_TRUE_OR_THROW( ( ((int)band) < input_raster_->params().nBands() ),
+    "Invalid raster band" );
+  TEAGN_TRUE_OR_THROW( pol_index < polygonset_->size(), 
+    "Invalid polygon index" );
+
+  COMatrixCacheNodeT const* nodePtr = getCOMatrixNodePtr( band, pol_index );
+   
+  if( nodePtr )
+  {
+    entropyValue = 0.0;
+  
+    COMatrixT::const_iterator itFirst = nodePtr->matrix_.begin();
+    COMatrixT::const_iterator itEnd = nodePtr->matrix_.end();
+  
+    while ( itFirst != itEnd )
+    {
+      const double& ocurrences = itFirst->second;
+      
+      entropyValue += ( ocurrences * log(ocurrences) );
+      
+      ++itFirst;
+    }
+    
+    entropyValue *= -1.0;
+  
+    return true;
+  }
+  else
+  {
+    return false;
+  }
+}
+
+
+
+bool TePDIHaralick::getEnergy( unsigned int band, unsigned int pol_index,
+  double& energyValue )
+{
+  TEAGN_TRUE_OR_THROW( ( ((int)band) < input_raster_->params().nBands() ),
+    "Invalid raster band" );
+  TEAGN_TRUE_OR_THROW( pol_index < polygonset_->size(), 
+    "Invalid polygon index" );
+
+  COMatrixCacheNodeT const* nodePtr = getCOMatrixNodePtr( band, pol_index );
+  
+  if( nodePtr == 0 )
+  {
+    return false;
+  }
+  else
+  {
+    energyValue = 0.0;
+  
+    COMatrixT::const_iterator itFirst = nodePtr->matrix_.begin();
+    COMatrixT::const_iterator itEnd = nodePtr->matrix_.end();
+      
+    while ( itFirst != itEnd )
+    {
+      energyValue += ( (itFirst->second) * (itFirst->second) );
+      ++itFirst;
+    }
+    
+    return true;
+  }
+}
+
+
+bool TePDIHaralick::getContrast( unsigned int band, unsigned int pol_index,
+  double& contrastValue )
+{
+  TEAGN_TRUE_OR_THROW( ( ((int)band) < input_raster_->params().nBands() ),
+    "Invalid raster band" );
+  TEAGN_TRUE_OR_THROW( pol_index < polygonset_->size(), 
+    "Invalid polygon index" );
+  
+  COMatrixCacheNodeT const* nodePtr = getCOMatrixNodePtr( band, pol_index );
+  
+  if( nodePtr )
+  {
+    contrastValue = 0.0;
+    
+    double dif = 0;
+    
+    COMatrixT::const_iterator itFirst;
+    const COMatrixT::const_iterator itEnd = nodePtr->matrix_.end();
+    double psum = 0;
+    
+    for( double value = nodePtr->matrixMinGray_ ; value <= 
+      nodePtr->matrixMaxGray_ ; ++value )
+    {
+      itFirst = nodePtr->matrix_.begin();
+      psum = 0;
+      
+      while ( itFirst != itEnd )
+      {
+        dif = ((itFirst->first.first) - (itFirst->first.second));
+        
+        if( ABS(dif) == value )
+        {
+          psum += itFirst->second;
+        }
+        
+        ++itFirst;
+      }
+      
+      contrastValue += ( value * value * psum );
+    }
+    
+    return true;
+  }
+  else
+  {
+    return false;
+  }
+}
+
+
+bool TePDIHaralick::getHomogeneity( unsigned int band, unsigned int pol_index,
+  double& homogeneityValue )
+{
+  TEAGN_TRUE_OR_THROW( ( ((int)band) < input_raster_->params().nBands() ),
+    "Invalid raster band" );
+  TEAGN_TRUE_OR_THROW( pol_index < polygonset_->size(), 
+    "Invalid polygon index" );
+
+  COMatrixCacheNodeT const* nodePtr = getCOMatrixNodePtr( band, pol_index );
+  
+  if( nodePtr )
+  {
+    homogeneityValue = 0.0;
+    
+    // The dif stores difference i - j.
+    double dif;
+    
+    COMatrixT::const_iterator itFirst = nodePtr->matrix_.begin();
+    COMatrixT::const_iterator itEnd = nodePtr->matrix_.end();
+      
+    while ( itFirst != itEnd )
+    {
+      dif = ((itFirst->first.first) - (itFirst->first.second));
+      
+      homogeneityValue += ( (itFirst->second) /
+        ( 1 + ( dif * dif ) ) );
+      
+      ++itFirst;
+    }
+    
+    return true;
+  }
+  else
+  {
+    return false;
+  }
+}
+
+
+bool TePDIHaralick::getQuiSquare( unsigned int band, unsigned int pol_index,
+  double& QuiSquareValue )
+{
+  TEAGN_TRUE_OR_THROW( ( ((int)band) < input_raster_->params().nBands() ),
+    "Invalid raster band" );
+  TEAGN_TRUE_OR_THROW( pol_index < polygonset_->size(), 
+    "Invalid polygon index" );
+
+  COMatrixCacheNodeT const* nodePtr = getCOMatrixNodePtr( band, pol_index );
+  
+  if( nodePtr )
+  {
+    QuiSquareValue = 0.0;
+  
+    // total_col stores the sum of the probabilities of column j
+    // total_ln stores the sum of the probabilities of line i
+    double total_col =  0.0, total_ln = 0.0;
+    
+    COMatrixT::const_iterator itFirst = nodePtr->matrix_.begin();
+    COMatrixT::const_iterator itEnd = nodePtr->matrix_.end();
+  
+    //iterators and map auxiliaries
+    COMatrixT::const_iterator itAux1 = nodePtr->matrix_.begin();
+        
+    map <double, double> totalLine;
+    map <double, double> totalColumn;
+  
+    while(itAux1 != itEnd)
+    { 
+      if (totalLine.find(itAux1->first.first)== totalLine.end())
+      {
+        totalLine[itAux1->first.first] = itAux1->second;
+      }
+      else
+      {
+        totalLine[itAux1->first.first] += itAux1->second;
+      }
+  
+      if (totalColumn.find(itAux1->first.second) == totalColumn.end())
+      {
+        totalColumn[itAux1->first.second] = itAux1->second;
+      }
+      else
+      {
+        totalColumn[itAux1->first.second] += itAux1->second;
+      }
+  
+      ++itAux1;
+  
+    }
+    
+    while ( itFirst != itEnd )
+    {
+      total_col = (totalColumn.find(itFirst->first.second))->second;
+      total_ln = (totalLine.find(itFirst->first.first))->second;
+  
+      QuiSquareValue += ((pow(itFirst->second,2)))/( total_col * total_ln);
+      ++itFirst;
+    }
+  
+    return true;
+  }
+  else
+  {
+    return false;
+  }
+}
+
+bool TePDIHaralick::getMean( unsigned int band, unsigned int pol_index,
+  double& meanValue )
+{
+  TEAGN_TRUE_OR_THROW( ( ((int)band) < input_raster_->params().nBands() ),
+    "Invalid raster band" );
+  TEAGN_TRUE_OR_THROW( pol_index < polygonset_->size(), 
+    "Invalid polygon index" );
+
+  COMatrixCacheNodeT const* nodePtr = getCOMatrixNodePtr( band, pol_index );
+  
+  if( nodePtr )
+  {
+    if( nodePtr->matrix_.size() )
+    {
+      double nn = nodePtr->matrixMaxGray_ - nodePtr->matrixMinGray_ + 1.0;
+      nn *= nn;
+          
+      COMatrixT::const_iterator itFirst = nodePtr->matrix_.begin();
+      COMatrixT::const_iterator itEnd = nodePtr->matrix_.end();
+      
+      meanValue = 0;
+        
+      while ( itFirst != itEnd )
+      {
+        meanValue += itFirst->second;
+        ++itFirst;
+      }
+      
+      meanValue /= nn;
+      
+      return true;
+    }
+    else
+    {
+      return false;
+    }
+  }
+  else
+  {
+    return false;
+  }  
+}
+
+bool TePDIHaralick::getDissimilarity( unsigned int band, 
+  unsigned int pol_index, double& dissimilarityValue )
+{
+  TEAGN_TRUE_OR_THROW( ( ((int)band) < input_raster_->params().nBands() ),
+    "Invalid raster band" );
+  TEAGN_TRUE_OR_THROW( pol_index < polygonset_->size(), 
+    "Invalid polygon index" );
+
+  COMatrixCacheNodeT const* nodePtr = getCOMatrixNodePtr( band, pol_index );
+  
+  if( nodePtr )
+  {
+    if( nodePtr->matrix_.size() )
+    {
+      dissimilarityValue = 0;
+      
+      COMatrixT::const_iterator itFirst = nodePtr->matrix_.begin();
+      COMatrixT::const_iterator itEnd = nodePtr->matrix_.end();
+        
+      while ( itFirst != itEnd )
+      {
+        dissimilarityValue += ( itFirst->second * (
+          ABS( itFirst->first.first - itFirst->first.second ) ) );
+        
+        ++itFirst;
+      }
+      
+      return true;
+    }
+    else
+    {
+      return false;
+    }
+  }
+  else
+  {
+    return false;
+  }
+}
+
+bool TePDIHaralick::getAngular2ndMoment( unsigned int band, 
+  unsigned int pol_index, double& ang2ndMomentValue )
+{
+  TEAGN_TRUE_OR_THROW( ( ((int)band) < input_raster_->params().nBands() ),
+    "Invalid raster band" );
+  TEAGN_TRUE_OR_THROW( pol_index < polygonset_->size(), 
+    "Invalid polygon index" );
+
+  COMatrixCacheNodeT const* nodePtr = getCOMatrixNodePtr( band, pol_index );
+  
+  if( nodePtr )
+  {
+    ang2ndMomentValue = 0;
+    
+    if( nodePtr->matrix_.size() )
+    {
+      COMatrixT::const_iterator itFirst = nodePtr->matrix_.begin();
+      COMatrixT::const_iterator itEnd = nodePtr->matrix_.end();
+        
+      while ( itFirst != itEnd )
+      {
+        ang2ndMomentValue += ( itFirst->second * itFirst->second );
+        
+        ++itFirst;
+      }
+      
+      return true;
+    }
+    else
+    {
+      return false;
+    }
+  }
+  else
+  {
+    return false;
+  }
+}
+
+bool TePDIHaralick::getStdDev( unsigned int band, 
+  unsigned int pol_index, double& stdDevValue )
+{
+  TEAGN_TRUE_OR_THROW( ( ((int)band) < input_raster_->params().nBands() ),
+    "Invalid raster band" );
+  TEAGN_TRUE_OR_THROW( pol_index < polygonset_->size(), 
+    "Invalid polygon index" );
+
+  COMatrixCacheNodeT const* nodePtr = getCOMatrixNodePtr( band, pol_index );
+  
+  if( nodePtr )
+  {
+    double mean = 0;
+    
+    if( ( nodePtr->matrix_.size() ) && getMean( band, pol_index, mean ) )
+    {
+      stdDevValue = 0;
+      
+      COMatrixT::const_iterator itFirst = nodePtr->matrix_.begin();
+      COMatrixT::const_iterator itEnd = nodePtr->matrix_.end();
+      double mean = 0;
+        
+      while ( itFirst != itEnd )
+      {
+        stdDevValue += ( itFirst->second * ( itFirst->first.first - mean ) );
+        
+        ++itFirst;
+      }
+      
+      stdDevValue = sqrt( stdDevValue );
+      
+      return true;
+    }
+    else
+    {
+      return false;
+    }
+  }
+  else
+  {
+    return false;
+  }
+}
+
+
+TePDIHaralick::COMatrixCacheNodeT const* TePDIHaralick::getCOMatrixNodePtr( 
+  unsigned int band, unsigned int pol_index )
+{
+  TEAGN_DEBUG_CONDITION( ( ((int)band) < input_raster_->params().nBands() ),
+    "Invalid raster band" );
+  TEAGN_DEBUG_CONDITION( ( pol_index < polygonset_->size() ), 
+    "Invalid polygon index" );
+    
+  COMatrixCacheKeyT key;
+  key.first = band;
+  key.second = pol_index;
+  const COMatrixCacheNodeT dummyNode;
+  COMatrixCacheT::iterator it = conc_matrix_cache_.find( key );
+  
+  if( it == conc_matrix_cache_.end() ) 
+  {
+    TePolygon& pol = (*polygonset_)[ pol_index ];
+
+    conc_matrix_cache_[ key ] = dummyNode;
+    COMatrixCacheNodeT& cacheNode = conc_matrix_cache_[ key ];
+  
+    TeRaster::iteratorPoly itp = input_raster_->begin(pol,TeBoxPixelIn, band);
+
+    COMatrixT& mat = cacheNode.matrix_;
+
+    COMatrixKeyT auxkey;
+    COMatrixKeyT inverseAuxKey;
+    
+    int curr_line = 0;
+    int curr_col = 0;
+    
+    //enquanto no acabar os pixels do polgono n
+    while ( ! itp.end() ) 
+    {
+      curr_line =  itp.currentLine();
+      curr_col = itp.currentColumn();
+    
+      if( dirmask_ & North ) 
+        INSERT_CONCURRENCE( curr_line - 1, curr_col )
+      if( dirmask_ & NorthEast ) 
+        INSERT_CONCURRENCE( curr_line - 1, curr_col + 1 )
+      if( dirmask_ & East ) 
+        INSERT_CONCURRENCE( curr_line, curr_col + 1 )
+      if( dirmask_ & SouthEast ) 
+        INSERT_CONCURRENCE( curr_line + 1, curr_col + 1 )        
+      if( dirmask_ & South ) 
+        INSERT_CONCURRENCE( curr_line + 1, curr_col )         
+      if( dirmask_ & SouthWest ) 
+        INSERT_CONCURRENCE( curr_line + 1, curr_col - 1 )        
+      if( dirmask_ & West ) 
+        INSERT_CONCURRENCE( curr_line, curr_col - 1 )         
+      if( dirmask_ & NorthWest ) 
+        INSERT_CONCURRENCE( curr_line - 1, curr_col - 1 )           
+    
+      ++itp;
+    } 
+      
+    /* Post-processing matrix */
+      
+    COMatrixT::iterator ccm_it = mat.begin();
+    const COMatrixT::iterator ccm_it_end = mat.end();
+
+    cacheNode.matrixMinGray_ = DBL_MAX;
+    cacheNode.matrixMaxGray_ = (-1.0) * DBL_MAX;
+    
+    double normFact = 0;
+      
+    while ( ccm_it != ccm_it_end )
+    {
+      if( ccm_it->first.first < cacheNode.matrixMinGray_ )
+        cacheNode.matrixMinGray_ = ccm_it->first.first;
+      if( ccm_it->first.second < cacheNode.matrixMinGray_ )
+        cacheNode.matrixMinGray_ = ccm_it->first.second;
+        
+      if( ccm_it->first.first > cacheNode.matrixMaxGray_ )
+        cacheNode.matrixMaxGray_ = ccm_it->first.first;
+      if( ccm_it->first.second > cacheNode.matrixMaxGray_ )
+        cacheNode.matrixMaxGray_ = ccm_it->first.second;
+      
+      normFact += ccm_it->second;
+      
+      ccm_it++;
+    } 
+      
+    ccm_it = mat.begin();
+      
+    while ( ccm_it != ccm_it_end )
+    {
+      ( ccm_it->second ) /= normFact;
+        
+      ++ccm_it;
+    }
+    
+    /* Updading concurrence matrix cache */
+
+    return &(cacheNode);  
+  } else {
+    return &(it->second);
+  }
+}
+
+void TePDIHaralick::clear()
+{
+  conc_matrix_cache_.clear();
+  input_raster_.reset();
+  polygonset_.reset();
+}
+
+
diff --git a/src/terralib/image_processing/TePDIHaralick.hpp b/src/terralib/image_processing/TePDIHaralick.hpp
new file mode 100755
index 0000000..350f65b
--- /dev/null
+++ b/src/terralib/image_processing/TePDIHaralick.hpp
@@ -0,0 +1,311 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIHARALICK_HPP
+  #define TEPDIHARALICK_HPP
+
+  #include "TePDIAlgorithm.hpp"
+  #include "TePDIParameters.hpp"
+  #include "TePDITypes.hpp"
+  
+  #include <map>
+
+  /**
+   * @brief This is the class for Haralick texture features over raster data.
+   * @author Vanessa Oliveira de Souza <vanessa at dpi.inpe.br>
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup TePDIGeneralAlgoGroup
+   * @note Reference 1 : Textural Features for Image Classification -
+   * Robert M. Haralick, K. Shanmugam, Its'hak Dinstein.
+   * @note Reference 2: Computer and Robot Vision - Robert M. Haralick - 
+   * Addison-Wesley Publishing Company
+   * @note Reference 3: Definiens Developer 7 Reference Book
+   *
+   * @note The general required parameters are:
+   *
+   * @param input_raster (TePDITypes::TePDIRasterPtrType) Input image -
+   * no floating point images allowed.
+   * @param polygonset ( TePDITypes::TePDIPolygonSetPtrType ) - Restriction 
+   * polygon set - The area where to do calcules over all rasters.
+   */
+  class PDI_DLL TePDIHaralick : public TePDIAlgorithm {
+    public :
+      
+      /** @enum DirectionT Concurrence matrix used directions */ 
+      enum DirectionT {
+        /** @brief North direction */
+        North = 1,
+        /** @brief NorthEast direction */
+        NorthEast = 2,
+        /** @brief East direction */
+        East = 4,
+        /** @brief SouthEast direction */
+        SouthEast = 8,
+        /** @brief South direction */
+        South = 16,
+        /** @brief SouthWest direction */
+        SouthWest = 32,
+        /** @brief West direction */
+        West = 64,
+        /** @brief NorthWest direction */
+        NorthWest = 128
+      };
+
+      /**
+       * @brief Default Constructor.
+       * @param dirmask Directions mask( DirectionT ), can be a single direction
+       * or a combination of multiple directions (using the OR operator),
+       *
+       */
+      TePDIHaralick( int dirmask = East );
+
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIHaralick();
+
+      /**
+       * @brief Checks if the supplied parameters fits the requirements of each
+       * PDI algorithm implementation.
+       *
+       * @note Error log messages must be generated. No exceptions generated.
+       *
+       * @param parameters The parameters to be checked.
+       * @return true if the parameters are OK. false if not.
+       */
+      bool CheckParameters( const TePDIParameters& parameters ) const;
+                
+      /**
+       * @brief GLCM Entropy of one polygon inside one band (Reference 1).
+       *
+       * @param band Raster band.
+       * @param pol_index The polygon index inside the polygon set
+       * ( if no polygon set is present, use de default zero value ).
+       * @param entropyValue The generated value.
+       * @return true if OK, false on errors.
+       */
+      bool getEntropy( unsigned int band, unsigned int pol_index,
+        double& entropyValue );
+        
+       /**
+        * @brief GLCM Energy of one polygon inside one band (Reference 2).
+        * The energy measures textural uniformity, that is, repetition of pairs of pixel in the image. 
+        * High values of energy indicate that the distribution of gray level in region in the image 
+        * has a constant distribution or a periodic form.
+        *
+        * @param band Raster band.
+        * @param pol_index The polygon index inside the polygon set
+        * ( if no polygon set is present, use de default zero value ).
+        * @param energyValue The generated value.
+        * @return true if OK, false on errors.
+        */
+      bool getEnergy( unsigned int band, unsigned int pol_index,
+        double& energyValue );
+  
+        /**
+        * @brief GLCM Contrast of one polygon inside one band (Reference 1).
+        * The contrast is a estimate of the local variations. 
+        * Average of the squares of the differences between pixels.
+        *
+        * @param band Raster band.
+        * @param pol_index The polygon index inside the polygon set
+        * ( if no polygon set is present, use de default zero value ).
+        * @param contrastValue The generated value.
+        * @return true if OK, false on errors.
+        */
+      bool getContrast( unsigned int band, unsigned int pol_index,
+        double& contrastValue );
+  
+        /**
+        * @brief GLCM Homogeneity (a.k.a. Inverse Difference Moment) of 
+        * one polygon inside one band (Reference 1).
+        * This measure of texture results in great values for regions with similar gray level. 
+        * The contrast and the homogeneity are inversely correlacionad
+        *
+        * @param band Raster band.
+        * @param pol_index The polygon index inside the polygon set
+        * ( if no polygon set is present, use de default zero value ).
+        * @param homogeneityValue The generated value.
+        * @return true if OK, false on errors.
+        */
+      bool getHomogeneity( unsigned int band, unsigned int pol_index,
+        double& homogeneityValue );
+  
+        /**
+        * @brief GLCM QuiSquare of one polygon inside one band.
+        * This measure can be understood as a normalization of the energy for the linear dependence 
+        * of the gray level tones in a region in the image. 
+        *        
+        * @param band Raster band.
+        * @param pol_index The polygon index inside the polygon set
+        * ( if no polygon set is present, use de default zero value ).
+        * @param QuiSquareValue The generated value.
+        * @return true if OK, false on errors.
+        */
+      bool getQuiSquare( unsigned int band, unsigned int pol_index,
+        double& QuiSquareValue );
+      
+        /**
+        * @brief GLCM Mean of one polygon inside one band (Reference 3).
+        * The GLCM mean is the average expressed in terms of the GLCM. 
+        *        
+        * @param band Raster band.
+        * @param pol_index The polygon index inside the polygon set
+        * ( if no polygon set is present, use de default zero value ).
+        * @param meanValue The generated value.
+        * @return true if OK, false on errors.
+        */
+      bool getMean( unsigned int band, unsigned int pol_index,
+        double& meanValue );        
+      
+        /**
+        * @brief GLCM Dissimilarity of one polygon inside one band
+        * (Reference 3).
+        * Similar to contrast, but increases linearly. High if the local region 
+        * has a high contrast.
+        *        
+        * @param band Raster band.
+        * @param pol_index The polygon index inside the polygon set
+        * ( if no polygon set is present, use de default zero value ).
+        * @param dissimilarityValue The generated value.
+        * @return true if OK, false on errors.
+        */
+      bool getDissimilarity( unsigned int band, unsigned int pol_index,
+        double& dissimilarityValue );      
+      
+       /**
+        * @brief GLCM angular second moment (Reference 1).
+        *        
+        * @param band Raster band.
+        * @param pol_index The polygon index inside the polygon set
+        * ( if no polygon set is present, use de default zero value ).
+        * @param ang2ndMomentValue The generated value.
+        * @return true if OK, false on errors.
+        */
+      bool getAngular2ndMoment( unsigned int band, unsigned int pol_index,
+        double& ang2ndMomentValue );      
+      
+       /**
+        * @brief GLCM standard deviation (Reference 3).
+        * GLCM standard deviation uses the GLCM, therefore it deals 
+        * specifically with the combinations of reference and neighbor pixels. 
+        * Thus, it is not the same as the simple standard deviation of gray 
+        * levels in the original image.       
+        * @param band Raster band.
+        * @param pol_index The polygon index inside the polygon set
+        * ( if no polygon set is present, use de default zero value ).
+        * @param ang2ndMomentValue The generated value.
+        * @return true if OK, false on errors.
+        */
+      bool getStdDev( unsigned int band, unsigned int pol_index,
+        double& stdDevValue );       
+  
+    protected :
+    
+      /**
+        * Concurrence matrix key type( A coord pair where x=first pixel value 
+        * and y=second pixel value).
+        */    
+      typedef std::pair< double, double > COMatrixKeyT;
+    
+      /** 
+        * Concurrence matrix type. 
+        * @param COMatrixKeyT A coord pair where x=first pixel value and 
+        * y=second pixel value.
+        * @param double The pair frequency ( The frequency field must be 
+        * double type due the matrix normalizing ).
+        */
+      typedef std::map< COMatrixKeyT, double > COMatrixT;
+      
+      /** 
+        * Concurrence matrix cache key type.
+        */
+      typedef std::pair< unsigned int, unsigned int > COMatrixCacheKeyT;
+      
+      /** Concurrence matrix cache node type. */
+      class COMatrixCacheNodeT
+      {
+        public :
+          
+          COMatrixT matrix_;
+          double matrixMinGray_;
+          double matrixMaxGray_;
+          
+          COMatrixCacheNodeT();
+          ~COMatrixCacheNodeT();
+      };
+      
+      /** 
+        * Concurrence matrix cache type.
+        */
+      typedef std::map< COMatrixCacheKeyT, COMatrixCacheNodeT > 
+        COMatrixCacheT;    
+ 
+      /** @brief Direction mask. */
+      int dirmask_;
+      
+      /** @brief Concurrent matrix cache. */
+      COMatrixCacheT conc_matrix_cache_;
+      
+      /** @brief Input raster pointer. */
+      TePDITypes::TePDIRasterPtrType input_raster_;
+      
+      /** @brief Polygon set pointer. */
+      TePDITypes::TePDIPolygonSetPtrType polygonset_;
+      
+      /**
+       * @brief Runs the current algorithm implementation.
+       *
+       * @return true if OK. false on error.
+       */
+      bool RunImplementation();      
+      
+      /**
+       * @brief Reset the internal state to the initial state.
+       *
+       * @param params The new parameters referente at initial state.
+       */
+      void ResetState( const TePDIParameters& params );      
+      
+      /**
+       * @brief Build a co-ocurrence matrix node using a supplied polygon.
+       *
+       * @param band Raster band.
+       * @param pol_index The polygon index inside the polygon set
+       * ( if no polygon set is present, use de default zero value ).
+       * @return The generated matrix node pointer o NULL on errors.
+       */      
+      COMatrixCacheNodeT const* getCOMatrixNodePtr( unsigned int band, 
+        unsigned int pol_index );
+      
+      // Clear all internal allocated resources.
+      void clear();
+   
+  };
+  
+/** @example TePDIHaralick_test.cpp
+ *    Shows how to use this class.
+ */    
+
+#endif
diff --git a/src/terralib/image_processing/TePDIHistogram.cpp b/src/terralib/image_processing/TePDIHistogram.cpp
new file mode 100755
index 0000000..d1a3a5f
--- /dev/null
+++ b/src/terralib/image_processing/TePDIHistogram.cpp
@@ -0,0 +1,1296 @@
+#include "TePDIHistogram.hpp"
+
+#include "TePDIUtils.hpp"
+#include "TePDIMatrix.hpp"
+#include <TeAgnostic.h>
+#include "TePDIPIManager.hpp"
+
+#include <TeUtils.h>
+#include <TePrecision.h>
+
+#include <float.h>
+#include <limits.h>
+
+
+TePDIHistogram::TePDIHistogram()
+{
+  init();
+}
+
+
+TePDIHistogram::TePDIHistogram( const TePDIHistogram& external )
+: TePDIHMapSpec()
+{
+  init();
+  
+  operator=( external );
+}
+
+
+TePDIHistogram::TePDIHistogram( 
+  const std::map< double, unsigned int >& external )
+{
+  init();
+  
+  operator=( external );
+}
+
+
+TePDIHistogram::~TePDIHistogram()
+{
+}
+
+
+bool TePDIHistogram::SetH(
+  const TePDITypes::TePDIRasterPtrType& in_raster,
+  unsigned int band,
+  bool zero_expansion,
+  TeStrategicIterator iterstrat,
+  const TeSharedPtr< TePolygonSet>& polsetptr )
+{
+  TEAGN_DEBUG_CONDITION( in_raster.isActive(),
+    "Inactive raster pointer" );
+  TEAGN_DEBUG_CONDITION( 
+    in_raster->params().status_ != TeRasterParams::TeNotReady,
+    "Raster not ready to read" );
+  TEAGN_DEBUG_CONDITION( (int)band < in_raster->nBands(),
+    "Invalid band" );
+  TEAGN_DEBUG_CONDITION( ( ! TePDIUtils::IsFloatBand( in_raster, band ) ),
+    "Unable to build non-interpolated histogram from float pixels type" );
+    
+  /* Optimization for 8 / 16 bit images */
+  
+  if( ( in_raster->params().dataType_[ band ] == TeUNSIGNEDCHAR ) ||
+    ( in_raster->params().dataType_[ band ] == TeCHAR ) ) {
+    return Set8BitH( in_raster, band, zero_expansion, 
+      iterstrat, polsetptr );
+  } else if( ( in_raster->params().dataType_[ band ] == TeUNSIGNEDSHORT ) ||
+    ( in_raster->params().dataType_[ band ] == TeSHORT ) ) {
+    return Set16BitH( in_raster, band, zero_expansion, 
+      iterstrat, polsetptr );
+  }
+  
+  TePDIHMapSpec::clear();
+  
+  const unsigned long int progress_steps = 
+    getProgressSteps( polsetptr, in_raster->params().resy_ );  
+
+  /* Dummy use check */
+  
+  bool in_raster_donot_uses_dummy = ! in_raster->params().useDummy_;
+  double in_raster_dummy = 0;
+  
+  if( ! in_raster_donot_uses_dummy ) {
+    in_raster_dummy = in_raster->params().dummy_[ band ];
+  }    
+    
+  /* Building initial unordered histogram */
+  
+  std::map< double, unsigned int > init_hist;
+  
+  {
+    TePDIPIManager progress( "Generating histogram", 
+      progress_steps, progress_int_enabled_ );
+  
+    double current_raster_level = 0;
+    TeRaster::iteratorPoly input_raster_it;
+    std::map< double, unsigned int >::iterator it;
+    unsigned int curr_line = 0;
+    unsigned int last_line = 0;
+    
+    for( unsigned int local_polset_index = 0 ; 
+      local_polset_index < polsetptr->size() ; 
+      ++local_polset_index ) {
+      
+      input_raster_it = in_raster->begin( 
+        (*polsetptr)[ local_polset_index ], iterstrat, 0 );
+      
+      while( ! input_raster_it.end() ) {
+        curr_line = input_raster_it.currentLine();
+      
+        current_raster_level = input_raster_it*( band );
+        
+        if( in_raster_donot_uses_dummy || 
+          ( current_raster_level != in_raster_dummy ) ) {
+          
+          it = init_hist.find( current_raster_level );
+            
+          if( it == init_hist.end() ) {
+            init_hist[ current_raster_level ] = 1;
+          } else {
+            it->second = it->second + 1;
+          }          
+        }
+        
+        if( curr_line != last_line ) {
+          TEAGN_FALSE_OR_RETURN( progress.Increment(), 
+            "Canceled by the user" );
+          
+          last_line = curr_line;
+        }
+        
+        ++input_raster_it;
+      }
+    }  
+  }
+  
+  if( init_hist.size() == 0 ) {
+    return true;
+  }
+  
+  /* Finding the lowest end highest level */
+
+  double lowest_level = init_hist.begin()->first;
+  double highest_level = lowest_level;
+  
+  {
+    std::map< double, unsigned int >::iterator it_end = init_hist.end();
+    --it_end;
+
+    highest_level = it_end->first;
+  }
+  
+  /* Doing zero expansion */
+  
+  if( zero_expansion ) {
+    if( 0. < lowest_level ) {
+      for( double index = 0. ; index < lowest_level ; ++index ) {
+        init_hist[ index ] = 0;
+      }
+    
+      lowest_level = 0.;
+    } else if( 0. > highest_level ) {
+      for( double index = highest_level + 1. ; index < 1. ; ++index ) {
+        init_hist[ index ] = 0;
+      }
+      
+      std::map< double, unsigned int >::iterator it_end = init_hist.end();
+      --it_end;
+    
+      highest_level = it_end->first;
+    }
+  }
+  
+  /* Building ordered histogram */
+  
+  {
+    double index = 0;
+    
+    for( index = lowest_level ; index <= highest_level ; ++index ) {
+      operator[]( index ) = 0;  
+    }
+  
+    std::map< double, unsigned int >::iterator it = init_hist.begin();
+    std::map< double, unsigned int >::iterator it_end = init_hist.end();
+    
+    while( it != it_end ) {
+      operator[]( it->first ) = it->second;
+    
+      ++it;
+    }
+  }
+
+  return true;
+}
+
+
+bool TePDIHistogram::reset(
+  const TePDITypes::TePDIRasterPtrType& in_raster,
+  unsigned int band,
+  unsigned int levels,
+  bool zero_expansion,
+  TeStrategicIterator iterstrat,
+  const TeSharedPtr< TePolygonSet>& polsetptr )
+{
+  TEAGN_TRUE_OR_RETURN( in_raster.isActive(),
+    "Inactive raster pointer" );
+  TEAGN_TRUE_OR_RETURN( 
+    in_raster->params().status_ != TeRasterParams::TeNotReady,
+    "Raster not ready to read" );
+  TEAGN_TRUE_OR_RETURN( (int)band < in_raster->nBands(),
+    "Invalid band" );
+    
+  /* Building the local restriction polygon set */
+  
+  TeSharedPtr< TePolygonSet> local_polsetptr;
+    
+  if( polsetptr.isActive() ) {
+    local_polsetptr = polsetptr;
+  } else {
+    local_polsetptr.reset( new TePolygonSet );
+    
+    TeBox rasterbox( in_raster->params().boundingBox() );
+    
+    local_polsetptr->add( polygonFromBox( rasterbox ) );
+  }
+  
+  /* For palette based rasters another algorithm is required */
+  
+  if( in_raster->params().photometric_[ band ] == 
+    TeRasterParams::TePallete ) {
+   
+    return SetPaletteBasedH( in_raster, band, zero_expansion,
+      iterstrat, local_polsetptr ); 
+  }
+    
+  /* Optimization - If the raster does not contains float pixels for 
+     this band, then we do not need an interpolated histogram */
+    
+  if( ( ! TePDIUtils::IsFloatBand( in_raster, band ) ) &&
+      ( levels == 0 ) ) {
+      
+    return SetH( in_raster, band, zero_expansion, iterstrat,
+      local_polsetptr );
+  }
+  
+  TePDIHMapSpec::clear();
+  
+  const unsigned long int progress_steps = 
+    getProgressSteps( local_polsetptr, in_raster->params().resy_ );
+  
+  /* Dummy use check */
+  
+  bool in_raster_donot_uses_dummy = ! in_raster->params().useDummy_;
+  double in_raster_dummy = 0;
+  
+  if( ! in_raster_donot_uses_dummy ) {
+    in_raster_dummy = in_raster->params().dummy_[ band ];
+  }
+  
+  /* Finding the lowest end highest level */
+  
+  double lowest_level = 0;
+  double highest_level = 0;  
+    
+  if ( in_raster->params().decoderIdentifier_ == "DB" ) {
+    lowest_level = in_raster->params().vmin_[ band ];
+    highest_level = in_raster->params().vmax_[ band ];
+
+    // Return if there is no pixel data to read 
+
+    if( in_raster->params().useDummy_ && ( lowest_level == in_raster_dummy ) &&
+      ( highest_level == in_raster_dummy ) )
+    {
+      return true;
+    }
+  } else {
+    lowest_level = DBL_MAX;
+    highest_level = ( -1.0 ) * DBL_MAX;  
+
+    bool lh_levels_set = false; // lowest_level and highest_level values set
+    
+    TeRaster::iteratorPoly input_raster_it;
+    TePDIPIManager progress( "Finding histogram range", progress_steps, 
+      progress_int_enabled_ );
+    double current_raster_level = 0;
+    unsigned int curr_line = 0;
+    unsigned int last_line = 0;    
+    
+    for( unsigned int local_polset_index = 0 ; 
+      local_polset_index < local_polsetptr->size() ; 
+      ++local_polset_index ) {
+      
+      input_raster_it = in_raster->begin( 
+        (*local_polsetptr)[ local_polset_index ], iterstrat, 0 );
+      
+      while( ! input_raster_it.end() ) {
+        current_raster_level = input_raster_it*( band );
+        curr_line = input_raster_it.currentLine();
+        
+        if( in_raster_donot_uses_dummy || 
+          ( current_raster_level != in_raster_dummy ) ) {
+
+          lh_levels_set = true;
+
+          if( current_raster_level > highest_level ) {
+            highest_level = current_raster_level;
+          }
+          if( current_raster_level < lowest_level ) {
+            lowest_level = current_raster_level;
+          }
+        }
+        
+        if( curr_line != last_line ) {
+          TEAGN_FALSE_OR_RETURN( progress.Increment(), 
+            "Canceled by the user" );
+          
+          last_line = curr_line;
+        }
+        
+        ++input_raster_it;
+      }
+    }
+
+    // Return if no pixel data was read 
+
+    if( ! lh_levels_set )
+    {
+      return true;
+    }
+  }
+  
+  if( zero_expansion &&
+      ( ! ( ( lowest_level <= 0.0 ) && ( highest_level >= 0.0 ) ) ) ) {
+  
+    if( lowest_level > 0.0 ) {
+      lowest_level = 0.0;
+    } else if ( highest_level < 0.0 ) {
+      highest_level = 0.0;
+    }
+  }  
+  
+  /* Calculating the histogram step and computed levels */
+
+  double step = 1;
+  unsigned int hist_computed_levels = 1;
+
+  if( highest_level != lowest_level )
+  {
+    if( levels == 0 ) {
+      /* Auto step feature */
+      TEAGN_TRUE_OR_RETURN( ( ( highest_level - lowest_level ) > 1.0 ),
+        "Histogram level range is too short for auto-step feature"
+        " lowest_level=" + Te2String( lowest_level ) + " highest_level=" +
+        Te2String( highest_level ) );
+  
+      hist_computed_levels = 1 +
+        ( unsigned int ) floor( highest_level - lowest_level );
+    } else {
+      hist_computed_levels = levels;
+    }
+  
+    TEAGN_TRUE_OR_RETURN( hist_computed_levels > 0,
+      "Invalid levels number" );
+  
+    step = ( highest_level - lowest_level ) /
+          ( (double)( hist_computed_levels - 1 ) );
+  }
+
+  /* Ordered Histogram buffer allocation */
+  
+  TePDIMatrix< double > hbuffer; /* line 0 - pixel level, 
+                                    line 1 - pixels count for that level */
+  TEAGN_TRUE_OR_RETURN( 
+    hbuffer.Reset( 2, hist_computed_levels, 
+    TePDIMatrix< double >::AutoMemPol ),
+    "Unable to create histogram internal buffer" );
+  {
+    hbuffer( 0, 0 ) = lowest_level;
+    hbuffer( 1, 0 ) = 0;
+        
+    for( unsigned int hbuffer_col = 1 ; 
+      ( hbuffer_col < hbuffer.GetColumns() ); 
+      ++hbuffer_col ) {
+    
+      hbuffer( 0, hbuffer_col ) = hbuffer( 0, hbuffer_col - 1 ) + step;
+      hbuffer( 1, hbuffer_col ) = 0;
+    }
+
+    // Fixing the last value precision
+
+    hbuffer( 0, hbuffer.GetColumns() - 1 ) = highest_level;
+  }
+  
+  /* Interpolated histogram generation */
+  
+  {
+    double current_raster_level = 0;
+    unsigned int found_index = 0;
+    
+    TePDIPIManager progress( "Generating interpolated histogram", 
+      progress_steps, progress_int_enabled_ );
+      
+    unsigned int curr_line = 0;
+    unsigned int last_line = 0;      
+
+    bool valid_pixel_found = false; // at least one valid pixel found
+    
+    for( unsigned int local_polset_index = 0 ; 
+      local_polset_index < local_polsetptr->size() ; 
+      ++local_polset_index ) {
+      
+      TeRaster::iteratorPoly input_raster_it = in_raster->begin( 
+        (*local_polsetptr)[ local_polset_index ], iterstrat, 0 );    
+    
+      while( ! input_raster_it.end() ) {
+        current_raster_level = input_raster_it*( band );
+        curr_line = input_raster_it.currentLine();
+        
+        if( in_raster_donot_uses_dummy || 
+          ( current_raster_level != in_raster_dummy ) ) {        
+
+          valid_pixel_found = true;
+
+          found_index = (unsigned int) TeRound( 
+            ( current_raster_level - lowest_level ) / step );          
+          
+          TEAGN_DEBUG_CONDITION( ( found_index < hist_computed_levels ),
+            "Invalid generated index position " + Te2String( found_index ) );
+        
+          hbuffer( 1, found_index ) = hbuffer( 1, found_index ) + 1;
+        }
+        
+        if( curr_line != last_line ) {
+          TEAGN_FALSE_OR_RETURN( progress.Increment(), 
+            "Canceled by the user" );
+          
+          last_line = curr_line;
+        }
+        
+        ++input_raster_it;
+      }
+    }
+
+    // Return if no valid pixel was read
+
+    if( ! valid_pixel_found )
+    {
+      return true;
+    }
+  }
+      
+  /* Transfering values from internal buffer to internal map */  
+  
+  for( unsigned int hbuffer_col = 0 ; hbuffer_col < hbuffer.GetColumns() ; 
+    ++hbuffer_col ) {
+    
+    operator[]( hbuffer( 0, hbuffer_col ) ) = 
+      ( unsigned int ) hbuffer( 1, hbuffer_col );
+  }
+  
+  return true;
+}
+
+
+bool TePDIHistogram::hasFixedStep() const
+{
+  TEAGN_TRUE_OR_THROW( size() > 0, "Trying to use an empty histogram" );
+  
+  const_iterator it = begin();
+  const_iterator it_end = end();
+  
+  std::vector< double > steps;
+  std::vector< double >::iterator steps_it;
+  std::vector< double >::iterator steps_it_end;
+  
+  double curr_step = 0;
+  double last_value = it->first;
+  bool step_found = false;
+  
+  ++it;
+  
+  while( it != it_end ) {
+    curr_step = it->first - last_value;
+    
+    steps_it = steps.begin();
+    steps_it_end = steps.end();
+    
+    step_found = false;
+    
+    while( steps_it != steps_it_end ) {
+      if( (*steps_it) == curr_step ) {
+        step_found = true;
+        break;
+      }
+      
+      ++steps_it;
+    }
+    
+    if( ! step_found ) {
+      steps.push_back( curr_step );
+    }
+    
+    last_value = it->first;
+    
+    ++it;
+  }
+  
+  return ( ( steps.size() <= 1 ) ? true : false );
+}
+
+
+bool TePDIHistogram::IsDiscrete() const
+{
+  TEAGN_TRUE_OR_THROW( size() > 0, "Trying to use an empty histogram" );
+  
+  const_iterator it = begin();
+  const_iterator it_end = end();
+
+  while( it != it_end ) {
+    if( (it->first) != ( (double)TeRound(it->first) ) ) {
+      return false;
+    }
+    
+    ++it;
+  }
+  
+  return true;
+}
+
+
+bool TePDIHistogram::Discretize()
+{
+  TEAGN_TRUE_OR_RETURN( size() > 0, "Trying to use an empty histogram" );
+  TEAGN_TRUE_OR_RETURN( ( ( GetMaxLevel() - GetMinLevel() ) > 1 ),
+    "The current histogram range do not allow discretization" );
+
+  if( IsDiscrete() ) {
+    return true;
+  }
+  
+  TePDIPIManager progress( "Discretizing histogram...", size() * 2,
+    progress_int_enabled_ );
+
+  unsigned int progress_step = 0; 
+
+  iterator it = begin();
+  iterator it_end = end();
+
+  TePDIHistogram temp_hist;
+
+  while( it != it_end ) {
+    progress.Update( progress_step );
+    ++progress_step;  
+  
+    temp_hist[ TeRound( it->first ) ] = 0;
+
+    ++it;
+  }
+  
+  it = begin();
+  
+  while( it != it_end ) {
+    progress.Update( progress_step );
+    ++progress_step;  
+  
+    temp_hist[ TeRound( it->first ) ] += it->second;
+
+    ++it;
+  }
+
+  TePDIHMapSpec::clear();
+  
+  operator=( temp_hist );
+
+  progress.Toggle( false );
+
+  return true;
+}
+
+
+double TePDIHistogram::GetMinLevel() const
+{
+  TEAGN_TRUE_OR_THROW( size() > 0, "Trying to use an empty histogram" );
+  
+  return begin()->first;
+}
+
+
+double TePDIHistogram::GetMaxLevel() const
+{
+  TEAGN_TRUE_OR_THROW( size() > 0, "Trying to use an empty histogram" );
+  
+  const_iterator it = end();
+  --it;
+  
+  return it->first;
+}
+
+
+unsigned int TePDIHistogram::GetMinCount() const
+{
+  TEAGN_TRUE_OR_THROW( size() > 0, "Trying to use an empty histogram" );
+  
+  const_iterator it = begin();
+  const_iterator it_end = end();
+  
+  unsigned int min_count = INT_MAX;
+
+  while( it != it_end ) {
+    if( (it->second) < min_count ) {
+      min_count = it->second;
+    }
+    
+    ++it;
+  }
+  
+  return min_count;  
+}
+
+
+unsigned int TePDIHistogram::GetMaxCount() const
+{
+  TEAGN_TRUE_OR_THROW( size() > 0, "Trying to use an empty histogram" );
+  
+  const_iterator it = begin();
+  const_iterator it_end = end();
+  
+  unsigned int max_count = 0;
+
+  while( it != it_end ) {
+    if( (it->second) > max_count ) {
+      max_count = it->second;
+    }
+    
+    ++it;
+  }
+  
+  return max_count;  
+}
+
+
+unsigned int TePDIHistogram::getTotalCount() const
+{
+  const_iterator it = begin();
+  const_iterator it_end = end();
+  
+  unsigned int total_count = 0;
+
+  while( it != it_end ) {
+    total_count += it->second;
+    
+    ++it;
+  }
+  
+  return total_count;  
+}
+
+
+void TePDIHistogram::clear()
+{
+  TePDIHMapSpec::clear();
+  init();
+}
+
+
+const TePDIHistogram& TePDIHistogram::operator=( 
+  const TePDIHistogram& external )
+{
+  clear();
+  
+  TePDIHMapSpec::operator=( external );
+
+  return *this;
+}
+
+
+const TePDIHistogram& TePDIHistogram::operator=( 
+  const std::map< double, unsigned int >& external )
+{
+  clear();
+  
+  std::map< double, unsigned int >::const_iterator ext_it = external.begin();
+  std::map< double, unsigned int >::const_iterator ext_it_end = 
+    external.end();
+    
+  if( ext_it != ext_it_end ) {
+    /* Verifying if the external histogram has floating point values 
+       and guessing min and max */
+    
+    bool has_floating_point_values = false;
+    
+    const double min = ext_it->first;
+      
+    while( ext_it != ext_it_end ) {
+      if( ext_it->first != TeRound( ext_it->first ) ) {
+        has_floating_point_values = true;
+      }
+      
+      ++ext_it;
+    }
+    
+    --ext_it;
+    const double max = ext_it->first;
+    
+    if( has_floating_point_values ) {
+      /* building primary interpolated histogram */
+    
+      double step_size = ( max - min ) / ( (double)external.size() - 1 );
+      
+      for( unsigned int step = 0 ; step < external.size() ; ++step ) {
+        operator[]( ( (double)step ) * step_size ) = 0;
+      }
+      
+      /* Interpolating values */
+      
+      ext_it = external.begin();
+      TePDIHistogram::iterator hist_it;
+      TePDIHistogram::iterator hist_it_aux;
+      double left_value = 0;
+      double right_value = 0;
+      double curr_value = 0;
+      
+      while( ext_it != ext_it_end ) {
+        curr_value = ext_it->first;
+      
+        hist_it = find( curr_value );
+        
+        if( hist_it == end() ) {
+          hist_it = upper_bound( curr_value );
+          
+          right_value = hist_it->first;
+          
+          hist_it_aux = hist_it;
+          --hist_it_aux;
+          left_value = hist_it_aux->first;
+          
+          if( ( right_value - curr_value ) > ( curr_value - left_value ) ) {
+            hist_it_aux->second += ext_it->second;
+          } else {
+            hist_it->second += ext_it->second;
+          }
+        } else {
+          hist_it->second += ext_it->second;
+        }
+        
+        ++ext_it;
+      }
+    } else {
+      /* Building discrete histogram */
+      
+      unsigned int min_ui = ( (unsigned int) min );
+      unsigned int max_ui = ( (unsigned int)max );
+      
+      unsigned int steps = 1 + max_ui - min_ui;
+      
+      if( steps == 1 ) {
+        operator[]( external.begin()->first ) = external.begin()->second;
+      } else {
+        for( unsigned int level = min_ui ; level <= max_ui ; ++level ) {
+          ext_it = external.find( (double)level );
+          
+          if( ext_it != ext_it_end ) {
+            operator[]( (double)level ) = ext_it->second;
+          } else {
+            operator[]( (double)level ) = 0;  
+          }
+        }
+      }
+    }
+  }
+  
+  return *this;
+}
+
+bool TePDIHistogram::operator==( const TePDIHistogram& external ) const
+{
+  if( size() == external.size() )
+  {
+    const_iterator myIt = begin();
+    const_iterator myIt_end = end();
+    const_iterator extIt = external.begin();
+    
+    while( myIt != myIt_end )
+    {
+      if( ( myIt->first != extIt->first ) || ( myIt->second != 
+        extIt->second ) )
+      {
+        return false;
+      }
+      
+      ++extIt;
+      ++myIt;
+    }
+    
+    return true;
+  }
+  else
+  {
+    return false;
+  }
+}
+
+unsigned int TePDIHistogram::size() const
+{
+  return (unsigned int)TePDIHMapSpec::size();
+}
+
+
+void TePDIHistogram::init()
+{
+  progress_int_enabled_ = true;
+}
+
+
+void TePDIHistogram::ToggleProgressInt( bool enabled )
+{
+  progress_int_enabled_ = enabled;
+}
+
+
+bool TePDIHistogram::SetPaletteBasedH(
+  const TePDITypes::TePDIRasterPtrType& in_raster,
+  unsigned int band,
+  bool zero_expansion,
+  TeStrategicIterator iterstrat,
+  const TeSharedPtr< TePolygonSet>& polsetptr )
+{
+  TEAGN_DEBUG_CONDITION( in_raster.isActive(),
+    "Inactive raster pointer" );
+  TEAGN_DEBUG_CONDITION( 
+    in_raster->params().status_ != TeRasterParams::TeNotReady,
+    "Raster not ready to read" );
+  TEAGN_DEBUG_CONDITION( ( (int)band < in_raster->nBands() ),
+    "Invalid band" );
+
+  TEAGN_TRUE_OR_RETURN( ( band < 3 ), "Invalid band" );
+  TEAGN_TRUE_OR_RETURN( (
+    ( in_raster->params().dataType_[ band ] == TeUNSIGNEDCHAR ) ||
+    ( in_raster->params().dataType_[ band ] == TeUNSIGNEDSHORT ) ||
+    ( in_raster->params().dataType_[ band ] == TeUNSIGNEDLONG ) ),
+    "Invalid pixel data type" );
+  TEAGN_TRUE_OR_RETURN( ( in_raster->params().photometric_[ band ] == 
+    TeRasterParams::TePallete ), "Incorrect photometric" )
+    
+  TePDIHMapSpec::clear();
+
+  const unsigned long int progress_steps = 
+    getProgressSteps( polsetptr, in_raster->params().resy_ );    
+
+  /* Dummy use check */
+  
+  bool in_raster_donot_uses_dummy = ! in_raster->params().useDummy_;
+  double in_raster_dummy = 0;
+  
+  if( ! in_raster_donot_uses_dummy ) {
+    in_raster_dummy = in_raster->params().dummy_[ band ];
+  }
+  
+  /* Defining the current lut pointer */
+  
+  vector< unsigned short >* lut_ptr = 0;
+  
+  if( band == 0 ) {
+    lut_ptr = &( in_raster->params().lutr_ );
+  } else if( band == 1 ) {
+    lut_ptr = &( in_raster->params().lutg_ );
+  } else {
+    lut_ptr = &( in_raster->params().lutb_ );
+  }
+    
+  /* Building initial unordered histogram */
+  
+  std::map< double, unsigned int > init_hist;
+  
+  {
+    TePDIPIManager progress( "Generating histogram", 
+      progress_steps, progress_int_enabled_ );
+  
+    double current_lut_index = 0;
+    unsigned short current_raster_level = 0;
+    TeRaster::iteratorPoly input_raster_it;
+    std::map< double, unsigned int >::iterator it;
+    unsigned int curr_line = 0;
+    unsigned int last_line = 0;
+    
+    for( unsigned int local_polset_index = 0 ; 
+      local_polset_index < polsetptr->size() ; 
+      ++local_polset_index ) {
+      
+      input_raster_it = in_raster->begin( 
+        (*polsetptr)[ local_polset_index ], iterstrat, 0 );
+      
+      while( ! input_raster_it.end() ) {
+        curr_line = input_raster_it.currentLine();
+      
+        current_lut_index = input_raster_it*( band );
+        
+        if( in_raster_donot_uses_dummy || 
+          ( current_lut_index != in_raster_dummy ) ) {
+          
+          TEAGN_DEBUG_CONDITION( ( ( ( unsigned long int )current_lut_index ) 
+            < lut_ptr->size() ), "Invalid lut index" )
+          
+          current_raster_level = (*lut_ptr)[ ( unsigned long int )
+            current_lut_index ];
+          
+          it = init_hist.find( current_raster_level );
+            
+          if( it == init_hist.end() ) {
+            init_hist[ current_raster_level ] = 1;
+          } else {
+            it->second = it->second + 1;
+          }          
+        }
+        
+        if( curr_line != last_line ) {
+          TEAGN_FALSE_OR_RETURN( progress.Increment(), 
+            "Canceled by the user" );
+          
+          last_line = curr_line;
+        }
+        
+        ++input_raster_it;
+      }
+    }  
+  }
+  
+  if( init_hist.size() == 0 ) {
+    return true;
+  }
+  
+  /* Finding the lowest end highest level */
+
+  double lowest_level = 0;
+  double highest_level = 0;
+  
+  {
+    std::map< double, unsigned int >::iterator it = init_hist.begin();
+    std::map< double, unsigned int >::iterator it_end = init_hist.end();
+    
+    lowest_level = highest_level = it->first;
+    
+    while( it != it_end ) {
+      if( it->first < lowest_level ) {
+        lowest_level = it->first;
+      }
+      
+      if( it->first > highest_level ) {
+        highest_level = it->first;
+      }
+          
+      ++it;
+    }
+  }
+  
+  /* Doing zero expansion */
+  
+  if( zero_expansion ) {
+    if( 0. < lowest_level ) {
+      for( double index = 0. ; index < lowest_level ; ++index ) {
+        init_hist[ index ] = 0;
+      }
+    
+      lowest_level = 0.;
+    } else if( 0. > highest_level ) {
+      for( double index = highest_level + 1. ; index < 1. ; ++index ) {
+        init_hist[ index ] = 0;
+      }
+      
+      std::map< double, unsigned int >::iterator it_end = init_hist.end();
+      --it_end;
+    
+      highest_level = it_end->first;
+    }
+  }
+  
+  /* Building ordered histogram */
+  
+  {
+    double index = 0;
+    
+    for( index = lowest_level ; index <= highest_level ; ++index ) {
+      operator[]( index ) = 0;  
+    }
+  
+    std::map< double, unsigned int >::iterator it = init_hist.begin();
+    std::map< double, unsigned int >::iterator it_end = init_hist.end();
+    
+    while( it != it_end ) {
+      operator[]( it->first ) = it->second;
+    
+      ++it;
+    }
+  }
+
+  return true;
+}
+
+
+bool TePDIHistogram::Set8BitH(
+  const TePDITypes::TePDIRasterPtrType& in_raster,
+  unsigned int band,
+  bool zero_expansion,
+  TeStrategicIterator iterstrat,
+  const TeSharedPtr< TePolygonSet>& polsetptr )
+{
+  TEAGN_DEBUG_CONDITION( in_raster.isActive(),
+    "Inactive raster pointer" );
+  TEAGN_DEBUG_CONDITION( 
+    in_raster->params().status_ != TeRasterParams::TeNotReady,
+    "Raster not ready to read" );
+  TEAGN_DEBUG_CONDITION( (int)band < in_raster->nBands(),
+    "Invalid band" );
+  TEAGN_DEBUG_CONDITION( ( ! TePDIUtils::IsFloatBand( in_raster, band ) ),
+    "Unable to build non-interpolated histogram from float pixels type" );
+  TEAGN_DEBUG_CONDITION( (
+    ( in_raster->params().dataType_[ band ] == TeUNSIGNEDCHAR ) ||
+    in_raster->params().dataType_[ band ] == TeCHAR ),
+    "Invalid pixel data type" );
+    
+  TePDIHMapSpec::clear();
+
+//  unsigned int in_lines_number = in_raster->params().nlines_;
+//  unsigned int in_columns_number = in_raster->params().ncols_;
+  const unsigned long int progress_steps = 
+    getProgressSteps( polsetptr, in_raster->params().resy_ );    
+    
+  /* Defining level offset based on data bype */
+  
+  unsigned int level_offset = 0;
+  
+  if( in_raster->params().dataType_[ band ] == TeCHAR ) {
+    level_offset = 127; /*( 256 / 2 ) - 1 */
+  }
+    
+  /* Building histogram */
+  
+  unsigned int init_hist[ 256 ];
+  unsigned int hist_index = 0;
+  
+  for( hist_index = 0 ; hist_index < 256 ; ++hist_index ) {
+    init_hist[ hist_index ] = 0;
+  }
+  
+  /* Analysing raster */
+  
+  {
+    TePDIPIManager progress( "Generating histogram", progress_steps, 
+      progress_int_enabled_ );
+    int int_pixel_value = 0;
+  
+    double current_raster_level = 0;
+    TeRaster::iteratorPoly input_raster_it;
+    std::map< double, unsigned int >::iterator it;
+    TeRaster& input_raster_ref = *in_raster;
+    
+    unsigned int curr_line = 0;
+    unsigned int curr_col = 0;
+    unsigned int last_line = 0;    
+    
+    for( unsigned int local_polset_index = 0 ; 
+      local_polset_index < polsetptr->size() ; 
+      ++local_polset_index ) {
+      
+      input_raster_it = input_raster_ref.begin( 
+        (*polsetptr)[ local_polset_index ], iterstrat, 0 );
+      
+      while( ! input_raster_it.end() ) {
+        curr_line = input_raster_it.currentLine();
+        curr_col = input_raster_it.currentColumn();
+        
+        if( input_raster_ref.getElement( curr_col, curr_line, 
+          current_raster_level, band ) ) 
+        {
+          int_pixel_value = ( int ) current_raster_level;
+          
+          TEAGN_DEBUG_CONDITION( ( int_pixel_value + level_offset ) < 256,
+            "Invalid histogram position" )
+            
+          ++( init_hist[ int_pixel_value + level_offset ] );
+        }
+        
+        if( curr_line != last_line ) {
+          TEAGN_FALSE_OR_RETURN( progress.Increment(), 
+            "Canceled by the user" );
+          
+          last_line = curr_line;
+        }
+        
+        ++input_raster_it;
+      }
+    }  
+  }  
+ 
+  
+  /* Finding the lowest end highest level indexes */
+
+  unsigned int lowest_index = 0;
+  unsigned int highest_index = 255;
+  
+  for( hist_index = 0 ; hist_index < 256 ; ++hist_index ) {
+    if( init_hist[ hist_index ] != 0 ) {
+      lowest_index = hist_index;
+      break;
+    }
+  }
+  for( hist_index = 0 ; hist_index < 256 ; ++hist_index ) {  
+    if( init_hist[ 255 - hist_index ] != 0 ) {
+      highest_index = 255 - hist_index;
+      break;
+    }
+  }
+  
+  if( zero_expansion ) {
+    if( in_raster->params().dataType_[ band ] == TeUNSIGNEDCHAR ) {
+      lowest_index = 0;
+    } else {
+      if( lowest_index > level_offset ) {
+        lowest_index = level_offset;
+      } else if( highest_index < level_offset ) {
+        highest_index = level_offset;
+      }
+    }
+  }
+  
+  /* Building ordered histogram */
+  
+  for( hist_index = lowest_index; hist_index <= highest_index ; 
+       ++hist_index ) {
+       
+    operator[]( ( (double)hist_index ) - ( (double)level_offset ) ) = 
+      init_hist[ hist_index ];
+  }
+  
+  return true;
+}
+
+
+bool TePDIHistogram::Set16BitH(
+  const TePDITypes::TePDIRasterPtrType& in_raster,
+  unsigned int band,
+  bool zero_expansion,
+  TeStrategicIterator iterstrat,
+  const TeSharedPtr< TePolygonSet>& polsetptr )
+{
+  TEAGN_DEBUG_CONDITION( in_raster.isActive(),
+    "Inactive raster pointer" );
+  TEAGN_DEBUG_CONDITION( 
+    in_raster->params().status_ != TeRasterParams::TeNotReady,
+    "Raster not ready to read" );
+  TEAGN_DEBUG_CONDITION( (int)band < in_raster->nBands(),
+    "Invalid band" );
+  TEAGN_DEBUG_CONDITION( ( ! TePDIUtils::IsFloatBand( in_raster, band ) ),
+    "Unable to build non-interpolated histogram from float pixels type" );
+  TEAGN_DEBUG_CONDITION( (
+    ( in_raster->params().dataType_[ band ] == TeSHORT ) ||
+    ( in_raster->params().dataType_[ band ] == TeUNSIGNEDSHORT ) ),
+    "Invalid pixel data type" );
+    
+  TePDIHMapSpec::clear();
+
+//  unsigned int in_lines_number = in_raster->params().nlines_;
+//  unsigned int in_columns_number = in_raster->params().ncols_;
+  const unsigned long int progress_steps = 
+    getProgressSteps( polsetptr, in_raster->params().resy_ );   
+  
+  /* Dummy use check */
+  
+  bool in_raster_donot_uses_dummy = ! in_raster->params().useDummy_;
+  double in_raster_dummy = 0;
+  
+  if( ! in_raster_donot_uses_dummy ) {
+    in_raster_dummy = in_raster->params().dummy_[ band ];
+  }     
+    
+  /* Defining level offset base on data bype */
+  
+  unsigned int level_offset = 0;
+  
+  if( in_raster->params().dataType_[ band ] == TeSHORT ) {
+    level_offset = 32767; /*( 256 / 2 ) - 1 */
+  }    
+    
+  /* Building histogram */
+  
+  unsigned int init_hist[ 65536 ];
+  unsigned int hist_index = 0;
+  
+  for( hist_index = 0 ; hist_index < 65536 ; ++hist_index ) {
+    init_hist[ hist_index ] = 0;
+  }
+  
+  /* Analysing raster */
+  
+  {
+    TePDIPIManager progress( "Generating histogram", progress_steps,
+      progress_int_enabled_ );
+    int int_pixel_value = 0;
+    
+    unsigned int curr_line = 0;
+    unsigned int last_line = 0;    
+  
+    double current_raster_level = 0;
+    TeRaster::iteratorPoly input_raster_it;
+    std::map< double, unsigned int >::iterator it;
+    
+    for( unsigned int local_polset_index = 0 ; 
+      local_polset_index < polsetptr->size() ; 
+      ++local_polset_index ) {
+      
+      input_raster_it = in_raster->begin( 
+        (*polsetptr)[ local_polset_index ], iterstrat, 0 );
+      
+      while( ! input_raster_it.end() ) {
+        current_raster_level = input_raster_it*( band );
+        curr_line = input_raster_it.currentLine();
+        
+        if( in_raster_donot_uses_dummy || 
+          ( current_raster_level != in_raster_dummy ) ) {
+          
+          int_pixel_value = ( int ) current_raster_level;
+            
+          init_hist[ int_pixel_value + level_offset ] = init_hist[ 
+            int_pixel_value + level_offset ] + 1;  
+        }
+        
+        if( curr_line != last_line ) {
+          TEAGN_FALSE_OR_RETURN( progress.Increment(), 
+            "Canceled by the user" );
+          
+          last_line = curr_line;
+        }
+        
+        ++input_raster_it;
+      }
+    }  
+  }    
+  
+  /* Finding the lowest end highest level indexes */
+
+  unsigned int lowest_index = 0;
+  unsigned int highest_index = 65535;
+  
+  for( hist_index = 0 ; hist_index < 65536 ; ++hist_index ) {
+    if( init_hist[ hist_index ] != 0 ) {
+      lowest_index = hist_index;
+      break;
+    }
+  }
+  for( hist_index = 0 ; hist_index < 65536 ; ++hist_index ) {  
+    if( init_hist[ 65535 - hist_index ] != 0 ) {
+      highest_index = 65535 - hist_index;
+      break;
+    }
+  }
+  
+  if( zero_expansion ) {
+    if( in_raster->params().dataType_[ band ] == TeUNSIGNEDSHORT ) {
+      lowest_index = 0;
+    } else {
+      if( lowest_index > level_offset ) {
+        lowest_index = level_offset;
+      } else if( highest_index < level_offset ) {
+        highest_index = level_offset;
+      }
+    }
+  }
+  
+  /* Building ordered histogram */
+  
+  for( hist_index = lowest_index; hist_index <= highest_index ; 
+       ++hist_index ) {
+       
+    operator[]( ( (double)hist_index ) - ( (double)level_offset ) ) = 
+      init_hist[ hist_index ];
+  }
+  
+  return true;  
+}
+
+
+unsigned long int TePDIHistogram::getProgressSteps( 
+  const TeSharedPtr< TePolygonSet>& polsetptr, double resy )
+{
+  unsigned long int steps = 0;
+
+  for( unsigned int ps_index = 0 ; ps_index < polsetptr->size() ; 
+    ++ps_index ) {
+    
+    const TeBox& polbox( (*polsetptr)[ ps_index ].box() );
+    steps += ( unsigned long int)ABS( ( polbox.y2() - polbox.y1() ) / resy );
+  }
+  
+  return steps;
+}
+
diff --git a/src/terralib/image_processing/TePDIHistogram.hpp b/src/terralib/image_processing/TePDIHistogram.hpp
new file mode 100755
index 0000000..6dde636
--- /dev/null
+++ b/src/terralib/image_processing/TePDIHistogram.hpp
@@ -0,0 +1,329 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIHISTOGRAM_HPP
+  #define TEPDIHISTOGRAM_HPP
+
+  #include "TePDITypes.hpp"
+  
+  #include <TeSharedPtr.h>
+  #include <TeGeometry.h>
+
+  #include <map>
+
+  /**
+   * @brief Base Histogram class (from std::map ).
+   * @ingroup PDIAux
+   */  
+  class PDI_DLL TePDIHMapSpec : public std::map< double, unsigned int > {};
+  
+  /**
+   * @brief This class deals with histograms and related tasks.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIAux
+   */
+  class PDI_DLL TePDIHistogram : public TePDIHMapSpec {
+    protected :
+    
+     /**
+      * @brief Base Histogram class (from std::map ).
+      * @ingroup PDIAux
+      */     
+      class PDI_DLL TePolygonSetPointer : public TeSharedPtr< TePolygonSet> {};
+      
+    public :
+      /** @typedef TeSharedPtr< TePDIHistogram > pointer
+       * Type definition for a instance pointer. */
+      typedef TeSharedPtr< TePDIHistogram > pointer;
+      /** @typedef const TeSharedPtr< TePDIHistogram > const_pointer
+       * Type definition for a const instance pointer. */
+      typedef const TeSharedPtr< TePDIHistogram > const_pointer;
+  
+      //! const_iterator type definition
+      typedef TePDIHMapSpec::const_iterator const_iterator;      
+
+      //! iterator type definition
+      typedef TePDIHMapSpec::iterator iterator;      
+
+      /**
+       * @brief Default Constructor
+       *
+       */
+      TePDIHistogram();
+      
+      /**
+       * @brief Alternative constructor.
+       *
+       * @param external External histogram reference.
+       *
+       */
+      TePDIHistogram( const TePDIHistogram& external );      
+      
+      /**
+       * @brief Alternative constructor from std::map.
+       *
+       * @param external External map reference.
+       *
+       */
+      TePDIHistogram( const std::map< double, unsigned int >& external );
+
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIHistogram();
+
+      /**
+       * @brief Generates a level-ordered histogram ( fixed step ).
+       *
+       * @note If the input raster has float data, the histogram will be
+       * interpolated.
+       *
+       * @param in_raster Input raster.
+       * @param band Band number.
+       * @param levels The number of interpolated levels, and if set to zero,
+       * the number of levels will be automaticlly found by using
+       * level step with value one.
+       * @param zero_expansion If true, the histogram will be expanded
+       * until it contains value zero.
+       * @param iterstrat The raster iteration strategy (if you
+       * do not know what this is use TeBoxPixelIn"
+       * @param polsetptr The restriction polygon set.
+       * @return true if the histogram has been generated, false on error.
+       */
+      bool reset(
+        const TePDITypes::TePDIRasterPtrType& in_raster,
+        unsigned int band, unsigned int levels,
+        bool zero_expansion, 
+        TeStrategicIterator iterstrat,
+        const TeSharedPtr< TePolygonSet>& polsetptr = TePolygonSetPointer() );
+        
+      /**
+       * @brief Histogram discrete verification.
+       *
+       * @return true if the histogram has only discrete levels.
+       */
+      bool IsDiscrete() const;
+      
+      /**
+       * @brief Histogram fixed step verification.
+       *
+       * @return true if the histogram has fixed step.
+       */
+      bool hasFixedStep() const;      
+
+      /**
+       * @brief Round the histogram levels to the near integer generating a
+       * descrete ( fixed step ) histogram.
+       *
+       * @return True if the process was concluded successfully, false if not.
+       */
+      bool Discretize();
+
+      /**
+       * @brief Histogram minimum level.
+       *
+       * @return The histogram minimum level.
+       */
+      double GetMinLevel() const;
+
+      /**
+       * @brief Histogram maximum level.
+       *
+       * @return The histogram maximum level.
+       */
+      double GetMaxLevel() const;
+
+      /**
+       * @brief Histogram minimum count (frequency) value for all levels.
+       *
+       * @return The histogram minimum count value.
+       */
+      unsigned int GetMinCount() const;
+
+      /**
+       * @brief Histogram maximum count (frequency) value for all levels.
+       *
+       * @return The histogram maximum count value.
+       */
+      unsigned int GetMaxCount() const;
+      
+      /**
+       * @brief Histogram total count ( the sum of all frequencies ).
+       *
+       * @return The histogram total count
+       */
+      unsigned int getTotalCount() const;
+
+      /**
+       * @brief std::map::clear() overload.
+       *
+       */
+      void clear();
+      
+      /**
+       * @brief operator= overload.
+       *
+       */
+      const TePDIHistogram& operator=( const TePDIHistogram& external );      
+      
+      /**
+       * @brief operator= overload for simple std:maps.
+       *
+       */
+      const TePDIHistogram& operator=( 
+        const std::map< double, unsigned int >& external );
+      
+      /**
+       * @brief Enable / Disable the progress interface.
+       *
+       * @param enabled Flag to enable ( true - default ) or disable ( false ).
+       */      
+      void ToggleProgressInt( bool enabled );
+      
+       // operator== overload.
+      bool operator==( const TePDIHistogram& external ) const;
+      
+      /**
+       * @brief Returns the histogram size.
+       * @return Returns the histogram size.
+       */
+      unsigned int size() const;      
+
+    protected :
+
+      /**
+       * @brief Progress interface enabled status.
+       */
+      bool progress_int_enabled_;
+      
+      /**
+       * @brief Reset the internal variables with default values.
+       */
+      void init();      
+
+      /**
+       * @brief Generates a level-ordered histogram ( fixed step ) from
+       * not floating point data type rasters.
+       *
+       * @note No trows generated.
+       *
+       * @param in_raster Input raster.
+       * @param band Band number.
+       * @param zero_expansion If true, the histogram will be expanded
+       * until it contains value zero.
+       * @param iterstrat The raster iteration strategy (if you
+       * do not know what this is use TeBoxPixelIn"       
+       * @param polsetptr The restriction polygon set.
+       * @return true if the histogram has been generated, false on error.
+       */
+      bool SetH(
+        const TePDITypes::TePDIRasterPtrType& in_raster,
+        unsigned int band, bool zero_expansion,
+        TeStrategicIterator iterstrat,
+        const TeSharedPtr< TePolygonSet>& polsetptr );      
+      
+      /**
+       * @brief Generates a level-ordered histogram ( fixed step )for an 
+       * palette based raster.
+       *
+       * @note No trows generated.
+       *
+       * @param in_raster Input raster.
+       * @param band Band number.
+       * @param zero_expansion If true, the histogram will be expanded
+       * until it contains value zero.
+       * @param iterstrat The raster iteration strategy (if you
+       * do not know what this is use TeBoxPixelIn"        
+       * @param polsetptr The restriction polygon set.
+       * @return true if the histogram has been generated, false on error.
+       */
+      bool SetPaletteBasedH(
+        const TePDITypes::TePDIRasterPtrType& in_raster,
+        unsigned int band,
+        bool zero_expansion,
+        TeStrategicIterator iterstrat,
+        const TeSharedPtr< TePolygonSet>& polsetptr );
+        
+      /**
+       * @brief Generates a level-ordered histogram ( fixed step )for an 8 
+       * bit raster.
+       *
+       * @note No trows generated.
+       *
+       * @param in_raster Input raster.
+       * @param band Band number.
+       * @param zero_expansion If true, the histogram will be expanded
+       * until it contains value zero.
+       * @param iterstrat The raster iteration strategy (if you
+       * do not know what this is use TeBoxPixelIn"         
+       * @param polsetptr The restriction polygon set.
+       * @return true if the histogram has been generated, false on error.
+       */
+      bool Set8BitH(
+        const TePDITypes::TePDIRasterPtrType& in_raster,
+        unsigned int band,
+        bool zero_expansion,
+        TeStrategicIterator iterstrat,
+        const TeSharedPtr< TePolygonSet>& polsetptr );        
+        
+      /**
+       * @brief Generates a level-ordered histogram (fixed step) for an 
+       * 16 bit raster.
+       *
+       * @note No trows generated.
+       *
+       * @param in_raster Input raster.
+       * @param band Band number.
+       * @param zero_expansion If true, the histogram will be expanded
+       * until it contains value zero.
+       * @param iterstrat The raster iteration strategy (if you
+       * do not know what this is use TeBoxPixelIn"         
+       * @param polsetptr The restriction polygon set.
+       * @return true if the histogram has been generated, false on error.
+       */
+      bool Set16BitH(
+        const TePDITypes::TePDIRasterPtrType& in_raster,
+        unsigned int band,
+        bool zero_expansion,
+        TeStrategicIterator iterstrat,
+        const TeSharedPtr< TePolygonSet>& polsetptr );
+        
+      /**
+       * @brief Calculate the number of progress steps when using
+       * a polygon iterator over a raster for the supplied 
+       * polygon set.
+       *
+       * @param polsetptr The polygon set pointer.
+       * @param resy Y axis resolution.
+       */        
+      unsigned long int getProgressSteps( 
+        const TeSharedPtr< TePolygonSet>& polsetptr, double resy );
+    
+  };
+  
+/** @example TePDIHistogram_test.cpp
+ *    Shows how to use this class.
+ */    
+
+#endif //TEPDIHISTOGRAM_HPP
diff --git a/src/terralib/image_processing/TePDIIHSFusionSF.cpp b/src/terralib/image_processing/TePDIIHSFusionSF.cpp
new file mode 100755
index 0000000..472219e
--- /dev/null
+++ b/src/terralib/image_processing/TePDIIHSFusionSF.cpp
@@ -0,0 +1,21 @@
+#include "TePDIIHSFusionSF.hpp"
+#include "TePDIIHSFusionStrategy.hpp"
+
+TePDIIHSFusionSF::TePDIIHSFusionSF()
+: TePDIStrategyFactory( std::string( "ihs" ) )
+{
+};
+
+
+TePDIIHSFusionSF::~TePDIIHSFusionSF()
+{
+};
+
+
+TePDIStrategy* TePDIIHSFusionSF::build ( const TePDIParameters& )
+{
+  TePDIStrategy* instance_ptr = new TePDIIHSFusionStrategy();
+  
+  return instance_ptr;
+}
+
diff --git a/src/terralib/image_processing/TePDIIHSFusionSF.hpp b/src/terralib/image_processing/TePDIIHSFusionSF.hpp
new file mode 100755
index 0000000..29b043d
--- /dev/null
+++ b/src/terralib/image_processing/TePDIIHSFusionSF.hpp
@@ -0,0 +1,70 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIIHSFUSIONSF_HPP
+  #define TEPDIIHSFUSIONSF_HPP
+
+  #include <TeSharedPtr.h>
+  #include "TePDIStrategyFactory.hpp"
+  #include "TePDIParameters.hpp"
+  #include "TePDIStrategy.hpp"
+  
+  /**
+   * @brief This is the class for IHS fusion strategy factory.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIStrategiesFactories
+   */
+  class PDI_DLL TePDIIHSFusionSF : public TePDIStrategyFactory
+  {
+    public :
+      
+      /**
+       * @brief Default constructor
+       */
+      TePDIIHSFusionSF();      
+      
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIIHSFusionSF();
+      
+    protected :  
+      /**
+       * @brief Implementation for the abstract TeFactory::build.
+       *
+       * @param arg A const reference to the parameters used by the
+       * algorithm.
+       * @return A pointer to the new generated strategy instance.
+       */
+      TePDIStrategy* build( const TePDIParameters& arg );
+      
+  };
+
+  namespace
+  {  
+    static TePDIIHSFusionSF TePDIIHSFusionSF_instance;
+  };
+
+#endif
+
diff --git a/src/terralib/image_processing/TePDIIHSFusionStrategy.cpp b/src/terralib/image_processing/TePDIIHSFusionStrategy.cpp
new file mode 100755
index 0000000..3030334
--- /dev/null
+++ b/src/terralib/image_processing/TePDIIHSFusionStrategy.cpp
@@ -0,0 +1,317 @@
+ 
+#include "TePDIIHSFusionStrategy.hpp"
+#include "TePDIUtils.hpp"
+#include <TeAgnostic.h>
+#include "TePDIColorTransform.hpp"
+#include "TePDIAlgorithmFactory.hpp"
+#include "TePDIPIManager.hpp"
+#include "TePDIStatistic.hpp"
+#include "TePDIContrast.hpp"
+
+#include <TeRasterRemap.h>
+
+
+TePDIIHSFusionStrategy::TePDIIHSFusionStrategy()
+{
+};      
+
+
+TePDIIHSFusionStrategy::~TePDIIHSFusionStrategy()
+{
+};
+
+
+bool TePDIIHSFusionStrategy::CheckParameters( 
+  const TePDIParameters& parameters ) const
+{
+  /* Checking input_raster1 */
+  
+  TePDITypes::TePDIRasterPtrType reference_raster;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "reference_raster", 
+    reference_raster ),
+    "Missing parameter: reference_raster" );
+  TEAGN_TRUE_OR_RETURN( reference_raster.isActive(),
+    "Invalid parameter: reference_raster inactive" );
+  TEAGN_TRUE_OR_RETURN( reference_raster->params().status_ != 
+    TeRasterParams::TeNotReady, 
+    "Invalid parameter: reference_raster not ready" );
+    
+  /* Checking input_raster2 */
+  
+  TePDITypes::TePDIRasterPtrType lowres_raster;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "lowres_raster", 
+    lowres_raster ),
+    "Missing parameter: lowres_raster" );
+  TEAGN_TRUE_OR_RETURN( lowres_raster.isActive(),
+    "Invalid parameter: lowres_raster inactive" );
+  TEAGN_TRUE_OR_RETURN( lowres_raster->params().status_ != 
+    TeRasterParams::TeNotReady, "Invalid parameter: lowres_raster not ready" );    
+  TEAGN_TRUE_OR_RETURN( ( lowres_raster->nBands() == 3 ),
+    "Invalid parameter: lowres_raster must have 3 bands ( RGB )" );       
+    
+  /* Checking output_raster */
+  
+  TePDITypes::TePDIRasterPtrType output_raster;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "output_raster", 
+    output_raster ),
+    "Missing parameter: output_raster" );
+  TEAGN_TRUE_OR_RETURN( output_raster.isActive(),
+    "Invalid parameter: output_raster inactive" );
+  TEAGN_TRUE_OR_RETURN( output_raster->params().status_ != 
+    TeRasterParams::TeNotReady, "Invalid parameter: output_raster not ready" );    
+    
+  /* Checking bands */    
+    
+  int reference_raster_band = 0;    
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "reference_raster_band", 
+    reference_raster_band ), "Missing parameter : reference_raster_band" );
+  TEAGN_TRUE_OR_RETURN( ( reference_raster->nBands() > reference_raster_band ),
+    "Invalid parameter : reference_raster_band" );
+    
+  /* Checking photometric interpretation */
+  
+  TEAGN_TRUE_OR_RETURN( ( 
+    ( reference_raster->params().photometric_[ reference_raster_band ] == 
+      TeRasterParams::TeRGB ) ||
+    ( reference_raster->params().photometric_[ reference_raster_band ] == 
+      TeRasterParams::TeMultiBand ) ),
+  "Invalid parameter - reference_raster (invalid photometric interpretation)" );   
+
+  for( int lowres_raster_band = 0 ; 
+    lowres_raster_band < lowres_raster->params().nBands() ; 
+    ++lowres_raster_band ) {
+    
+    TEAGN_TRUE_OR_RETURN( ( 
+      ( lowres_raster->params().photometric_[ lowres_raster_band ] == 
+        TeRasterParams::TeRGB ) ||
+      ( lowres_raster->params().photometric_[ lowres_raster_band ] == 
+        TeRasterParams::TeMultiBand ) ),
+    "Invalid parameter - lowres_raster (invalid photometric interpretation)" ); 
+  }  
+    
+  return true;
+}
+
+
+bool TePDIIHSFusionStrategy::Implementation( const TePDIParameters& params )
+{
+  TePDITypes::TePDIRasterPtrType reference_raster;
+  params.GetParameter( "reference_raster", reference_raster );
+  
+  TePDITypes::TePDIRasterPtrType lowres_raster;
+  params.GetParameter( "lowres_raster", lowres_raster );
+  
+  TePDITypes::TePDIRasterPtrType output_raster;
+  params.GetParameter( "output_raster", output_raster );
+    
+  int reference_raster_band = 0;    
+  params.GetParameter( "reference_raster_band", reference_raster_band );
+  
+  /* Bringing lowres_raster to reference_raster size */
+   
+  TePDITypes::TePDIRasterPtrType upsampled_raster;
+  
+  {
+    TeRasterParams upsampled_raster_params = lowres_raster->params();
+    upsampled_raster_params.setNLinesNColumns( 1, 1 );
+    
+    TEAGN_TRUE_OR_RETURN( TePDIUtils::TeAllocRAMRaster( upsampled_raster,
+      upsampled_raster_params, TePDIUtils::TePDIUtilsAutoMemPol ),
+      "Unable create the new upsampled raster RGB raster" );
+      
+	  TEAGN_TRUE_OR_RETURN( TePDIUtils::resampleRasterByLinsCols(
+	    lowres_raster, 
+		  upsampled_raster, 
+		  (unsigned int)reference_raster->params().nlines_, 
+		  (unsigned int)reference_raster->params().ncols_, 
+		  progress_interface_enabled_,
+		  TePDIInterpolator::NNMethod), "Raster resample error" );    
+/*      
+TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( upsampled_raster,
+  "TePDIIHSFusionStrategy_upsampled_raster.tif" ), 
+  "GeoTIF generation error" );     
+*/      
+  }
+   
+  /* Generating the IHS raster */
+  
+  TePDITypes::TePDIRasterPtrType ihs_raster;
+  TEAGN_TRUE_OR_RETURN( TePDIUtils::TeAllocRAMRaster( ihs_raster,
+    1, 10, 10, false, TeFLOAT, 0 ),
+    "Unable create the new ihs_raster raster RGB raster" );  
+    
+  double rgb_channels_min = 0;
+  double rgb_channels_max = 0;
+  TEAGN_TRUE_OR_RETURN( TePDIUtils::TeGetRasterMinMaxBounds( 
+    upsampled_raster,
+    0, rgb_channels_min, rgb_channels_max ),
+    "Unable to get channel range" )
+     
+  {
+    TePDIParameters rgb2ihs_params;
+    
+    TePDITypes::TePDIRasterVectorType input_rasters;
+    input_rasters.push_back( upsampled_raster );
+    input_rasters.push_back( upsampled_raster );
+    input_rasters.push_back( upsampled_raster );
+    rgb2ihs_params.SetParameter( "input_rasters", input_rasters );
+    
+    std::vector< int > input_channels;
+    input_channels.push_back( 0 );
+    input_channels.push_back( 1 );
+    input_channels.push_back( 2 );
+    rgb2ihs_params.SetParameter( "input_channels", input_channels );
+    
+    TePDITypes::TePDIRasterVectorType output_rasters;
+    output_rasters.push_back( ihs_raster );
+    rgb2ihs_params.SetParameter( "output_rasters", output_rasters );
+    
+    rgb2ihs_params.SetParameter( "transf_type", TePDIColorTransform::Rgb2Ihs );  
+
+    rgb2ihs_params.SetParameter( "rgb_channels_min", rgb_channels_min );
+    rgb2ihs_params.SetParameter( "rgb_channels_max", rgb_channels_max );    
+    
+    TePDIColorTransform transform_instance;
+    TEAGN_TRUE_OR_RETURN( transform_instance.Reset( rgb2ihs_params ),
+      "Error in IHS parameters" )
+      
+    transform_instance.ToggleProgInt( progress_interface_enabled_ );
+      
+    TEAGN_TRUE_OR_RETURN( transform_instance.Apply(), 
+      "Unable to build IHS color space" );
+  }
+  
+/*  
+TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( ihs_raster,
+  "TePDIIHSFusionStrategy_ihs_raster.tif" ), 
+  "GeoTIF generation error" );    
+*/
+
+  /* Free the anused raster */
+  
+  upsampled_raster.reset();  
+  
+  /* Bring the reference raster to the mean and variance of
+     the I channel */
+  
+  TePDITypes::TePDIRasterPtrType ref_rast_contrast;
+  
+  {
+    {
+      /* Get target stat params */
+      
+      TePDIParameters statparams;
+      
+      TePDITypes::TePDIRasterVectorType rasters;
+      rasters.push_back( ihs_raster );
+      statparams.SetParameter( "rasters", rasters );
+      
+      std::vector< int > bands;
+      bands.push_back( 0 ); // IHS raster I band
+      statparams.SetParameter( "bands", bands );
+      
+      TePDIStatistic stat;
+      stat.ToggleProgInt( progress_interface_enabled_ );
+      TEAGN_TRUE_OR_THROW( stat.Reset( statparams ),
+        "Invalid statistic algorithm parameters" )
+        
+      double target_mean = stat.getMean( 0 );
+      double target_variance = stat.getVariance( 0 );
+
+      /* Applying contrast to the reference raster */
+      
+      TePDIParameters contparams;
+      
+      contparams.SetParameter( "contrast_type", 
+        TePDIContrast::TePDIContrastStat );
+      contparams.SetParameter( "input_image", reference_raster );
+      contparams.SetParameter( "input_band", (int)reference_raster_band );
+      contparams.SetParameter( "target_mean", target_mean );
+      contparams.SetParameter( "target_variance", target_variance );
+      
+      TeRasterParams ref_rast_cont_params = reference_raster->params();
+      ref_rast_cont_params.setNLinesNColumns( 1, 1 );
+      ref_rast_cont_params.nBands( 1 );
+      ref_rast_cont_params.setDataType( TeFLOAT, -1 );
+      TEAGN_TRUE_OR_RETURN( TePDIUtils::TeAllocRAMRaster( ref_rast_contrast,
+        ref_rast_cont_params, TePDIUtils::TePDIUtilsAutoMemPol ),
+        "Unable create the new reference raster (contrast)" );  
+      contparams.SetParameter( "output_image", ref_rast_contrast );
+      
+      contparams.SetParameter( "output_band", (int)0 );
+      
+      TePDIContrast contra;
+      TEAGN_TRUE_OR_RETURN( contra.Apply( contparams ),
+        "Error applying contrast" )
+    }
+  
+  }
+    
+  /* Swapping reference_raster into ihs_raster I component */
+  {
+    const unsigned int lines_bound = ihs_raster->params().nlines_;
+    const unsigned int cols_bound = ihs_raster->params().ncols_;
+    unsigned int line = 0;
+    unsigned int col = 0;
+    TeRaster* inraster = ref_rast_contrast.nakedPointer();
+    TeRaster* outraster = ihs_raster.nakedPointer();
+    double value = 0;
+    
+    TePDIPIManager progress( "Swapping Intensity channel...", lines_bound,
+      progress_interface_enabled_ );
+    
+    for( line = 0; line < lines_bound ; ++line ) {
+      TEAGN_FALSE_OR_RETURN( progress.Increment(), "Canceled by the user" );
+    
+      for( col = 0; col < cols_bound ; ++col ) {
+        inraster->getElement( col, line, value, 0 );
+        
+        outraster->setElement( col, line, value, 0 );
+      }
+    }
+    
+    progress.Toggle( false );
+  }
+  
+/* 
+TEAGN_TRUE_OR_THROW( TePDIUtils::TeRaster2Geotiff( ihs_raster,
+  "TePDIIHSFusionStrategy_ihs_raster_swapped.tif" ), 
+  "GeoTIF generation error" );     
+*/  
+
+  /* Switching back to RBG space */
+  {
+    TePDIParameters ihs2rgb_params;
+    
+    TePDITypes::TePDIRasterVectorType input_rasters;
+    input_rasters.push_back( ihs_raster );
+    input_rasters.push_back( ihs_raster );
+    input_rasters.push_back( ihs_raster );
+    ihs2rgb_params.SetParameter( "input_rasters", input_rasters );
+    
+    std::vector< int >input_channels;
+    input_channels.push_back( 0 );
+    input_channels.push_back( 1 );
+    input_channels.push_back( 2 );
+    ihs2rgb_params.SetParameter( "input_channels", input_channels );
+    
+    TePDITypes::TePDIRasterVectorType output_rasters;
+    output_rasters.push_back( output_raster );    
+    ihs2rgb_params.SetParameter( "output_rasters", output_rasters );
+    
+    ihs2rgb_params.SetParameter( "transf_type", TePDIColorTransform::Ihs2Rgb );  
+    
+    ihs2rgb_params.SetParameter( "rgb_channels_min", rgb_channels_min );
+    ihs2rgb_params.SetParameter( "rgb_channels_max", rgb_channels_max );
+    
+    TePDIColorTransform transform_instance;
+    TEAGN_TRUE_OR_RETURN( transform_instance.Reset( ihs2rgb_params ),
+      "Error in IHS parameters" )    
+    
+    TEAGN_TRUE_OR_RETURN( transform_instance.Apply(), 
+      "Unable to build RGB color space" );      
+  }
+   
+  return true;
+}
+
diff --git a/src/terralib/image_processing/TePDIIHSFusionStrategy.hpp b/src/terralib/image_processing/TePDIIHSFusionStrategy.hpp
new file mode 100755
index 0000000..6feb7d3
--- /dev/null
+++ b/src/terralib/image_processing/TePDIIHSFusionStrategy.hpp
@@ -0,0 +1,92 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIIHSFUSIONSTRATEGY_HPP
+  #define TEPDIIHSFUSIONSTRATEGY_HPP
+
+
+  #include "TePDIStrategy.hpp"
+
+  /**
+   * @brief This is the class for IHS fusion strategy.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIStrategies
+   *
+   * @note The required parameters are:
+   * @param fusion_type ( std::string ) : Must be "ihs".
+   * @param reference_raster ( TePDITypes::TePDIRasterPtrType ) - 
+   *  Reference raster ( higher quality ).
+   * @param lowres_raster ( TePDITypes::TePDIRasterPtrType ) - 
+   *  Low resolution RGB raster with 3 channels ( will be improved  - 
+   * band0=Red, band1=Green, band2=Blue ).
+   * @param output_raster ( TePDITypes::TePDIRasterPtrType ) - Output raster.
+   * @param reference_raster_band ( int ) - The band to process from 
+   * reference_raster.
+   *
+   */
+  class PDI_DLL TePDIIHSFusionStrategy : public TePDIStrategy
+  {
+    friend class TePDIIHSFusionSF;
+  
+    public :
+      
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIIHSFusionStrategy();
+      
+      /**
+       * @brief Checks if the supplied parameters fits the requirements of each
+       * PDI strategy.
+       *
+       * @note Error log messages must be generated. No exceptions generated.
+       *
+       * @param parameters The parameters to be checked.
+       * @return true if the parameters are OK. false if not.
+       */
+      bool CheckParameters( 
+        const TePDIParameters& parameters ) const;       
+      
+    protected :
+      
+      /**
+       * @brief Default constructor
+       *
+       * @param factoryName Factory name.
+       */
+      TePDIIHSFusionStrategy();
+      
+      /**
+       * @brief Runs the algorithm implementation.
+       *
+       * @return true if OK. false on errors.
+       */
+      bool Implementation( const TePDIParameters& params );
+      
+  };
+  
+#endif
+
+
+
diff --git a/src/terralib/image_processing/TePDIInterpolator.cpp b/src/terralib/image_processing/TePDIInterpolator.cpp
new file mode 100755
index 0000000..6636073
--- /dev/null
+++ b/src/terralib/image_processing/TePDIInterpolator.cpp
@@ -0,0 +1,384 @@
+#include "TePDIInterpolator.hpp"
+
+#include "TePDIUtils.hpp"
+
+#include <TeAgnostic.h>
+#include <TeUtils.h>
+
+#include <math.h>
+
+#define BICUBIC_MODULE( x ) ( ( x < 0 ) ? ( -1 * x ) : x )
+#define BICUBIC_K1( x , a ) ( ( ( a + 2 ) * x * x * x ) - \
+  ( ( a + 3 ) * x * x ) + 1 )
+#define BICUBIC_K2( x , a ) ( ( a * x * x * x ) - ( 5 * a * x * x ) + \
+  ( 8 * a * x ) - ( 4 * a ) )
+#define BICUBIC_RANGES(x,a) \
+  ( ( ( 0 <= x ) && ( x <= 1 ) ) ? \
+    BICUBIC_K1(x,a) \
+  : ( ( ( 1 < x ) && ( x <= 2 ) ) ? \
+      BICUBIC_K2(x,a) \
+    : 0 ) )
+#define BICUBIC_KERNEL( x , a ) BICUBIC_RANGES( BICUBIC_MODULE(x) , a )
+
+TePDIInterpolator::TePDIInterpolator()
+{
+  init();
+}
+
+
+TePDIInterpolator::~TePDIInterpolator()
+{
+  clear();
+}
+
+
+void TePDIInterpolator::init()
+{
+  input_raster_params_nptr_ = 0;
+  interp_funct_ptr_ = 0;
+  bicubic_lines_bound_ = 0;
+  bicubic_columns_bound_ = 0;
+  bicubic_kernel_parameter_ = -1.0;
+  last_valid_line_ = 0;
+  last_valid_col_ = 0;
+  raster_uses_dummy_ = false;
+  nbands_ = 0;
+  dummy_value_ = 0;
+  input_raster_ptr_.reset();
+  input_raster_nptr_ = 0;
+  input_raster_max_chan_val_vec_ = 0;
+  input_raster_min_chan_val_vec_ = 0;
+}
+
+
+void TePDIInterpolator::clear()
+{
+  input_raster_ptr_.reset();
+
+  if( input_raster_max_chan_val_vec_ ) {
+    delete[] input_raster_max_chan_val_vec_;
+  }
+
+  if( input_raster_min_chan_val_vec_ ) {
+    delete[] input_raster_min_chan_val_vec_;
+  }
+
+  init();
+}
+
+
+bool TePDIInterpolator::reset( const TeSharedPtr< TeRaster >& input_raster,
+  InterpMethod method, double dummy_value )
+{
+  clear();
+
+  /* Checking input */
+
+  TEAGN_TRUE_OR_RETURN( input_raster.isActive(), "Inactive input raster" );
+  TEAGN_TRUE_OR_RETURN( input_raster->status(), "Input raster not ready" );
+  
+  if( method != NNMethod ) {
+    for( int band = 0 ; band < input_raster->params().nBands() ;
+      ++band ) {
+      TEAGN_TRUE_OR_RETURN( ( 
+        ( input_raster->params().photometric_[ band ] == 
+        TeRasterParams::TeMultiBand ) || 
+        ( input_raster->params().photometric_[ band ] == 
+        TeRasterParams::TeRGB ) ),
+      "Only NNMethod can be used on this raster" );
+    }
+  }
+
+  /* Getting input raster channel ranges */
+
+  input_raster_max_chan_val_vec_ = 
+    new double[ input_raster->nBands() ];
+  TEAGN_TRUE_OR_THROW( input_raster_max_chan_val_vec_,
+    "Vector allocation error" )
+
+  input_raster_min_chan_val_vec_ = 
+    new double[ input_raster->nBands() ];
+  TEAGN_TRUE_OR_THROW( input_raster_min_chan_val_vec_,
+    "Vector allocation error" )
+
+  for( int channel = 0 ; channel < input_raster->nBands() ;
+    ++channel ) {
+
+    TEAGN_TRUE_OR_RETURN( TePDIUtils::TeGetRasterMinMaxBounds( 
+      input_raster, channel, 
+      input_raster_min_chan_val_vec_[ channel ],
+      input_raster_max_chan_val_vec_[ channel ] ),
+      "Error getting channels bounds" );
+  }
+
+  /* Switching interpolation function pointer */
+  
+  switch( method ) {
+    case BicubicMethod :
+    {
+      TEAGN_TRUE_OR_RETURN( ( input_raster->params().nlines_ > 3 ), 
+        "Invalid raster lines number" );
+      TEAGN_TRUE_OR_RETURN( ( input_raster->params().ncols_ > 3 ), 
+        "Invalid raster columns number" );
+    
+      interp_funct_ptr_ = &TePDIInterpolator::bicubicInterpolation;
+      break;
+    }
+    case BilinearMethod :
+    {
+      TEAGN_TRUE_OR_RETURN( ( input_raster->params().nlines_ > 1 ), 
+        "Invalid raster lines number" );
+      TEAGN_TRUE_OR_RETURN( ( input_raster->params().ncols_ > 1 ), 
+        "Invalid raster columns number" );
+    
+      interp_funct_ptr_ = &TePDIInterpolator::bilinearInterpolation;
+      break;
+    }
+    case NNMethod :
+    {
+      TEAGN_TRUE_OR_RETURN( ( input_raster->params().nlines_ > 0 ), 
+        "Invalid raster lines number" );
+      TEAGN_TRUE_OR_RETURN( ( input_raster->params().ncols_ > 0 ), 
+        "Invalid raster columns number" );
+    
+      interp_funct_ptr_ = &TePDIInterpolator::nNInterpolation;
+      break;
+    }
+    default :
+    {
+      TEAGN_LOG_AND_RETURN( "Invalid interpolation method" );
+      break;
+    }
+  }
+  
+  input_raster_ptr_ = input_raster;
+  input_raster_nptr_ = input_raster_ptr_.nakedPointer();
+  input_raster_params_nptr_ = &(input_raster->params());
+  raster_uses_dummy_ = input_raster_params_nptr_->useDummy_;
+  nbands_ = input_raster_params_nptr_->nBands();
+  dummy_value_ = dummy_value;
+  
+  last_valid_line_ = (double)( input_raster_params_nptr_->nlines_ - 1 );
+  last_valid_col_ = (double)( input_raster_params_nptr_->ncols_ - 1 );
+  
+  bicubic_lines_bound_ = (double)( input_raster_params_nptr_->nlines_ - 2 );
+  bicubic_columns_bound_ = (double)( input_raster_params_nptr_->ncols_ - 2 );
+  
+  return true;
+}
+
+
+void TePDIInterpolator::interpolate( const double& line, const double& col, 
+  const unsigned int& band, double& value )
+{
+  TEAGN_TRUE_OR_THROW( interp_funct_ptr_, 
+    "Invalid interpolation function pointer" );
+  TEAGN_TRUE_OR_THROW( ( band < nbands_ ), "Invalid band" );
+    
+  if( ( col > last_valid_col_ ) || ( line > last_valid_line_ ) ||
+      ( col < 0 ) || ( line < 0 ) ) {
+ 
+    value = dummy_value_;
+  } else {
+    ( this->*( interp_funct_ptr_ ) )( line, col, band, value );
+  }
+}
+
+
+void TePDIInterpolator::nNInterpolation( const double& line, const double& col, 
+  const unsigned int& band, double& value )
+{
+  TEAGN_DEBUG_CONDITION( interp_funct_ptr_, 
+    "Invalid interpolation function pointer" );
+  TEAGN_DEBUG_CONDITION( ( band < nbands_ ), "Invalid band" );
+    
+  if( ! input_raster_nptr_->getElement( TeRound( col ), TeRound( line ), value, 
+    band ) ) {
+    
+    TEAGN_TRUE_OR_THROW( raster_uses_dummy_, 
+      "Unable to get raster element" );
+    
+    value = dummy_value_;
+  }
+}
+
+
+void TePDIInterpolator::bilinearInterpolation( const double& line, 
+  const double& col, const unsigned int& band, double& value )
+{
+  TEAGN_DEBUG_CONDITION( interp_funct_ptr_, 
+    "Invalid interpolation function pointer" );
+  TEAGN_DEBUG_CONDITION( ( band < nbands_ ), "Invalid band" );
+
+  bilinear_line_min_ = floor( line );
+  bilinear_line_max_ = ( ( bilinear_line_min_ == line ) ? bilinear_line_min_ : 
+    ( bilinear_line_min_ + 1.0 ) );
+  bilinear_col_min_ = floor( col );
+  bilinear_col_max_ = ( ( bilinear_col_min_ == col ) ? bilinear_col_min_ : 
+    ( bilinear_col_min_ + 1.0 ) );
+  
+  bilinear_diff_line_min_ = line - bilinear_line_min_;
+  bilinear_diff_line_max_ = line - bilinear_line_max_;
+  bilinear_diff_col_min_ = col - bilinear_col_min_;
+  bilinear_diff_col_max_ = col - bilinear_col_max_;
+  
+  bilinear_dist1_ = sqrt( ( bilinear_diff_line_min_ * bilinear_diff_line_min_ )
+    + ( bilinear_diff_col_min_ * bilinear_diff_col_min_ ) );
+  bilinear_dist2_ = sqrt( ( bilinear_diff_line_min_ * bilinear_diff_line_min_ )
+    + ( bilinear_diff_col_max_ * bilinear_diff_col_max_ ) );
+  bilinear_dist3_ = sqrt( ( bilinear_diff_line_max_ * bilinear_diff_line_max_ )
+    + ( bilinear_diff_col_min_ * bilinear_diff_col_min_ ) );
+  bilinear_dist4_ = sqrt( ( bilinear_diff_line_max_ * bilinear_diff_line_max_ )
+    + ( bilinear_diff_col_max_ * bilinear_diff_col_max_ ) );
+  
+  bilinear_weigh1_ = ( ( bilinear_dist1_ == 0 ) ? 1 : 
+    ( 1 / bilinear_dist1_ ) );
+  bilinear_weigh2_ = ( ( bilinear_dist2_ == 0 ) ? 1 : 
+    ( 1 / bilinear_dist2_ ) );
+  bilinear_weigh3_ = ( ( bilinear_dist3_ == 0 ) ? 1 : 
+    ( 1 / bilinear_dist3_ ) );
+  bilinear_weigh4_ = ( ( bilinear_dist4_ == 0 ) ? 1 : 
+    ( 1 / bilinear_dist4_ ) );
+  
+  bilinear_elem1_ = 0;
+  bilinear_elem2_ = 0;
+  bilinear_elem3_ = 0;
+  bilinear_elem4_ = 0;
+  
+  if( input_raster_nptr_->getElement( (unsigned int)bilinear_col_min_, 
+        (unsigned int)bilinear_line_min_, bilinear_elem1_, band ) &&
+      input_raster_nptr_->getElement( (unsigned int)bilinear_col_max_, 
+        (unsigned int)bilinear_line_min_, bilinear_elem2_, band ) &&        
+      input_raster_nptr_->getElement( (unsigned int)bilinear_col_min_, 
+        (unsigned int)bilinear_line_max_, bilinear_elem3_, band ) &&        
+      input_raster_nptr_->getElement( (unsigned int)bilinear_col_max_, 
+        (unsigned int)bilinear_line_max_, bilinear_elem4_, band ) ) {
+        
+      value = ( ( bilinear_elem1_ * bilinear_weigh1_ ) + 
+        ( bilinear_elem2_ * bilinear_weigh2_ ) +
+        ( bilinear_elem3_ * bilinear_weigh3_ ) + 
+        ( bilinear_elem4_ * bilinear_weigh4_ ) ) / 
+        ( bilinear_weigh1_ + bilinear_weigh2_ + bilinear_weigh3_ + 
+        bilinear_weigh4_ );
+  } else {
+    TEAGN_TRUE_OR_THROW( raster_uses_dummy_, 
+      "Unable to get raster element" );  
+  
+    value = dummy_value_;
+  }
+}
+
+
+void TePDIInterpolator::bicubicInterpolation( const double& line, 
+  const double& col, const unsigned int& band, double& value )
+{
+  TEAGN_DEBUG_CONDITION( interp_funct_ptr_, 
+    "Invalid interpolation function pointer" );
+  TEAGN_DEBUG_CONDITION( ( band < nbands_ ), "Invalid band" );
+  
+  if( ( col < 1 ) || ( line < 1 ) || ( col >= bicubic_columns_bound_ ) || 
+    ( line >= bicubic_lines_bound_ ) ) {
+    
+    /* Near neighborhood interpolation will be used */
+    
+    if( ! input_raster_nptr_->getElement( TeRound( col ), TeRound( line ), 
+      value, band ) ) {
+      
+      TEAGN_TRUE_OR_THROW( raster_uses_dummy_, 
+        "Unable to get raster element" );       
+      
+      value = dummy_value_;
+    }    
+  } else {
+    bicubic_grid_raster_line_ = ( (unsigned int)floor( line ) ) - 1;
+    bicubic_grid_raster_col_ = ( (unsigned int)floor( col ) ) - 1;
+    
+    /* retriving raster elements */
+    
+    for( bicubic_buffer_line_ = 0 ; bicubic_buffer_line_ < 4 ; 
+      ++bicubic_buffer_line_) {
+      for( bicubic_buffer_col_ = 0 ; bicubic_buffer_col_ < 4 ; 
+        ++bicubic_buffer_col_) {
+      
+        if( ! input_raster_nptr_->getElement( 
+          bicubic_grid_raster_col_ + bicubic_buffer_col_, 
+          bicubic_grid_raster_line_ + bicubic_buffer_line_, 
+          bicubic_buffer_[bicubic_buffer_line_][bicubic_buffer_col_], band ) 
+          ) {
+          
+          TEAGN_TRUE_OR_THROW( raster_uses_dummy_, 
+            "Unable to get raster element" );       
+      
+          value = dummy_value_;          
+          
+          return;
+        }
+      }
+    }
+    
+    /* Bicubic weights calcule for the required position */
+    
+    bicubic_offset_x_ = col - (double)( bicubic_grid_raster_col_ + 1 );
+    bicubic_offset_y_ = line - (double)( bicubic_grid_raster_line_ + 1 );    
+    
+    bicubic_h_weights_[0] = BICUBIC_KERNEL( 1.0 + bicubic_offset_x_, 
+      bicubic_kernel_parameter_ );
+    bicubic_h_weights_[1] = BICUBIC_KERNEL( bicubic_offset_x_, 
+      bicubic_kernel_parameter_ );
+    bicubic_h_weights_[2] = BICUBIC_KERNEL( 1.0 - bicubic_offset_x_, 
+      bicubic_kernel_parameter_ );
+    bicubic_h_weights_[3] = BICUBIC_KERNEL( 2.0 - bicubic_offset_x_, 
+      bicubic_kernel_parameter_ );
+      
+    bicubic_v_weights_[0] = BICUBIC_KERNEL( 1.0 + bicubic_offset_y_, 
+      bicubic_kernel_parameter_ );
+    bicubic_v_weights_[1] = BICUBIC_KERNEL( bicubic_offset_y_, 
+      bicubic_kernel_parameter_ );
+    bicubic_v_weights_[2] = BICUBIC_KERNEL( 1.0 - bicubic_offset_y_, 
+      bicubic_kernel_parameter_ );
+    bicubic_v_weights_[3] = BICUBIC_KERNEL( 2.0 - bicubic_offset_y_, 
+      bicubic_kernel_parameter_ );
+      
+    bicubic_h_weights_sum_ = bicubic_h_weights_[0] + bicubic_h_weights_[1] +
+      bicubic_h_weights_[2] + bicubic_h_weights_[3];
+    bicubic_v_weights_sum_ = bicubic_v_weights_[0] + bicubic_v_weights_[1] +
+      bicubic_v_weights_[2] + bicubic_v_weights_[3];
+    
+    /* interpolating the value */
+    
+    for( bicubic_buffer_line_ = 0 ; bicubic_buffer_line_ < 4 ; 
+      ++bicubic_buffer_line_) {
+      
+      bicubic_int_line_accum_ = 0;
+      
+      for( bicubic_buffer_col_ = 0 ; bicubic_buffer_col_ < 4 ; 
+        ++bicubic_buffer_col_) {
+        
+        bicubic_int_line_accum_ += 
+          bicubic_buffer_[bicubic_buffer_line_][bicubic_buffer_col_] *
+          bicubic_h_weights_[ bicubic_buffer_col_ ];
+      }
+      
+      bicubic_int_lines_values_[ bicubic_buffer_line_ ] = 
+        bicubic_int_line_accum_ / bicubic_h_weights_sum_;
+    }
+    
+    value = bicubic_int_lines_values_[ 0 ] * bicubic_v_weights_[ 0 ] +
+      bicubic_int_lines_values_[ 1 ] * bicubic_v_weights_[ 1 ] +
+      bicubic_int_lines_values_[ 2 ] * bicubic_v_weights_[ 2 ] +
+      bicubic_int_lines_values_[ 3 ] * bicubic_v_weights_[ 3 ];
+    value = value / bicubic_v_weights_sum_;
+
+    /* Checking channel bounds */
+
+    if( value > input_raster_max_chan_val_vec_[ band ] ) {
+      value = input_raster_max_chan_val_vec_[ band ];
+    }
+
+    if( value < input_raster_min_chan_val_vec_[ band ] ) {
+      value = input_raster_min_chan_val_vec_[ band ];
+    }
+  }
+}
+
+
diff --git a/src/terralib/image_processing/TePDIInterpolator.hpp b/src/terralib/image_processing/TePDIInterpolator.hpp
new file mode 100755
index 0000000..5b42833
--- /dev/null
+++ b/src/terralib/image_processing/TePDIInterpolator.hpp
@@ -0,0 +1,298 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIINTERPOLATOR_HPP
+  #define TEPDIINTERPOLATOR_HPP
+
+  #include "TePDIDefines.hpp"
+  #include <TeSharedPtr.h>
+  #include <TeRaster.h>
+  
+  /**
+   * @brief This is the class for pixel interpolation from an input raster.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIAux
+   */
+  class PDI_DLL TePDIInterpolator {
+    public :
+      /** @typedef TeSharedPtr< TePDIInterpolator > pointer 
+          Type definition for a instance pointer */
+      typedef TeSharedPtr< TePDIInterpolator > pointer;
+      /** @typedef const TeSharedPtr< TePDIInterpolator > const_pointer 
+          Type definition for a const instance pointer */
+      typedef const TeSharedPtr< TePDIInterpolator > const_pointer;
+      
+      /**
+       * @enum Allowed interpolation methods.
+       */      
+      enum InterpMethod {
+        /** Near neighborhood interpolation method. */
+        NNMethod = 1,
+        /** Bilinear interpolation method. */
+        BilinearMethod = 2,
+        /** Bicubic interpolation method. */
+        BicubicMethod = 3      
+      };
+
+      /**
+       * @brief Default Constructor.
+       *
+       */
+      TePDIInterpolator();
+
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIInterpolator();
+      
+      /**
+       * @brief Reset this interpolator instance.
+       *
+       * @param input_raster Input raster shared pointer.
+       * @param method Interpolation method (For pallete based rasters only
+       * the NNMethod can be used).
+       * @param dummy_value A pixel dummy value to use when the input_raster
+       * do not have dummy_values.
+       * @return true if OK, false on errors.
+       *
+       */
+      bool reset( const TeSharedPtr< TeRaster >& input_raster,
+        InterpMethod method, double dummy_value );
+        
+      /**
+       * @brief Interpolate a pixel value.
+       *
+       * @param line Line.
+       * @param col Column.
+       * @param band Band.
+       * @param value Interpolated value.
+       *
+       */
+      void interpolate( const double& line, const double& col, 
+        const unsigned int& band, double& value );        
+
+    protected :
+    
+      /**
+       * @brief Type definition for the a interpolation function pointer.
+       *
+       * @param line Line.
+       * @param col Column.
+       * @param band Band.
+       * @param value Interpolated value.
+       */      
+      typedef void (TePDIInterpolator::*InterpFunctPtr)( const double& line, 
+        const double& col, const unsigned int& band, double& value );
+
+      /**
+       * @brief Input raster naked pointer.
+       */
+      TeRasterParams* input_raster_params_nptr_;
+      
+      /**
+       * @brief The current interpolation function pointer.
+       */      
+      InterpFunctPtr interp_funct_ptr_;
+     
+      /**
+       * @brief The bicubic interpolation lines bound (not included).
+       */      
+      double bicubic_lines_bound_;      
+
+      /**
+       * @brief The bicubic interpolation columns bound (not included).
+       */      
+      double bicubic_columns_bound_;        
+      
+      /**
+       * @brief The bicubic kernel parameters.
+       */      
+      double bicubic_kernel_parameter_;        
+            
+      /**
+       * @brief The last valid line index ( included ).
+       */         
+      double last_valid_line_;
+
+      /**
+       * @brief The last valid column index ( included ).
+       */         
+      double last_valid_col_;
+
+      /**
+       * @brief The current raster dummy use status.
+       */      
+      bool raster_uses_dummy_;
+      
+      /**
+       * @brief The current raster bands number.
+       */      
+      unsigned int nbands_;      
+      
+      /**
+       * @brief The current raster bands number.
+       */      
+      double dummy_value_;       
+            
+      /**
+       * @brief Input raster shared pointer copy.
+       */
+      TeSharedPtr< TeRaster > input_raster_ptr_;      
+            
+      /**
+       * @brief Input raster shared naked pointer.
+       */
+      TeRaster* input_raster_nptr_;  
+
+      /**
+       * @brief Input raster maximum allowed channels values
+       * vector.
+       */
+      double* input_raster_max_chan_val_vec_;  
+
+      /**
+       * @brief Input raster minimum allowed channels values
+       * vector.
+       */
+      double* input_raster_min_chan_val_vec_; 
+      
+      /** @brief Internal bilinear function used variable. */      
+      double bilinear_line_min_;
+      /** @brief Internal bilinear function used variable. */      
+      double bilinear_line_max_;
+      /** @brief Internal bilinear function used variable. */      
+      double bilinear_col_min_;
+      /** @brief Internal bilinear function used variable. */      
+      double bilinear_col_max_;
+      /** @brief Internal bilinear function used variable. */      
+      double bilinear_diff_line_min_;
+      /** @brief Internal bilinear function used variable. */      
+      double bilinear_diff_line_max_;
+      /** @brief Internal bilinear function used variable. */      
+      double bilinear_diff_col_min_;
+      /** @brief Internal bilinear function used variable. */      
+      double bilinear_diff_col_max_;
+      /** @brief Internal bilinear function used variable. */      
+      double bilinear_dist1_;
+      /** @brief Internal bilinear function used variable. */      
+      double bilinear_dist2_;
+      /** @brief Internal bilinear function used variable. */      
+      double bilinear_dist3_;
+      /** @brief Internal bilinear function used variable. */      
+      double bilinear_dist4_;
+      /** @brief Internal bilinear function used variable. */      
+      double bilinear_weigh1_;
+      /** @brief Internal bilinear function used variable. */      
+      double bilinear_weigh2_;
+      /** @brief Internal bilinear function used variable. */      
+      double bilinear_weigh3_;
+      /** @brief Internal bilinear function used variable. */      
+      double bilinear_weigh4_;
+      /** @brief Internal bilinear function used variable. */      
+      double bilinear_elem1_;
+      /** @brief Internal bilinear function used variable. */      
+      double bilinear_elem2_;
+      /** @brief Internal bilinear function used variable. */      
+      double bilinear_elem3_;
+      /** @brief Internal bilinear function used variable. */      
+      double bilinear_elem4_;
+      
+      /** @brief Internal bicubic function used variable. */      
+      unsigned int bicubic_grid_raster_line_;
+      /** @brief Internal bicubic function used variable. */      
+      unsigned int bicubic_grid_raster_col_;
+      /** @brief Internal bicubic function used variable. */      
+      unsigned int bicubic_buffer_line_;
+      /** @brief Internal bicubic function used variable. */      
+      unsigned int bicubic_buffer_col_;
+      /** @brief Internal bicubic function used variable. */      
+      double bicubic_buffer_[4][4];
+      /** @brief Internal bicubic function used variable. */      
+      double bicubic_offset_x_;
+      /** @brief Internal bicubic function used variable. */      
+      double bicubic_offset_y_;
+      /** @brief Internal bicubic function used variable. */      
+      double bicubic_h_weights_[4];
+      /** @brief Internal bicubic function used variable. */      
+      double bicubic_v_weights_[4];
+      /** @brief Internal bicubic function used variable. */      
+      double bicubic_h_weights_sum_;
+      /** @brief Internal bicubic function used variable. */      
+      double bicubic_v_weights_sum_;
+      /** @brief Internal bicubic function used variable. */      
+      double bicubic_int_line_accum_;
+      /** @brief Internal bicubic function used variable. */      
+      double bicubic_int_lines_values_[4];
+
+      /**
+       * @brief Set default internal state.
+       */
+      void init();
+
+      /**
+       * @brief Clear all allocated resources and
+       * rollback to the initial state.
+       */
+      void clear();
+      
+      /**
+       * @brief Near neighborhood interpolation function.
+       *
+       * @param line Line.
+       * @param col Column.
+       * @param band Band.
+       * @param value Interpolated value.
+       */
+      void nNInterpolation( const double& line, const double& col,
+        const unsigned int& band, double& value );
+        
+      /**
+       * @brief Bilinear interpolation function.
+       *
+       * @param line Line.
+       * @param col Column.
+       * @param band Band.
+       * @param value Interpolated value.
+       */
+      void bilinearInterpolation( const double& line, const double& col, 
+        const unsigned int& band, double& value );
+        
+      /**
+       * @brief Bicubic interpolation function.
+       *
+       * @param line Line.
+       * @param col Column.
+       * @param band Band.
+       * @param value Interpolated value.
+       */
+      void bicubicInterpolation( const double& line, const double& col, 
+        const unsigned int& band, double& value );    
+
+  };
+  
+/** @example TePDIInterpolator_test.cpp
+ *    Shows how to use this class.
+ */    
+
+#endif //TEPDIFILTERMASK_HPP
diff --git a/src/terralib/image_processing/TePDIIsosegClas.cpp b/src/terralib/image_processing/TePDIIsosegClas.cpp
new file mode 100644
index 0000000..c568f39
--- /dev/null
+++ b/src/terralib/image_processing/TePDIIsosegClas.cpp
@@ -0,0 +1,397 @@
+#include "TePDIIsosegClas.hpp"
+#include "TePDIMathFunctions.hpp"
+#include "TePDIStrategyFactory.hpp"
+#include "TePDIAlgorithmFactory.hpp"
+#include "TePDIUtils.hpp"
+
+#include <TeBox.h>
+#include <TeUtils.h>
+#include <TeRasterParams.h>
+#include <TeRaster.h>
+#include <TeAgnostic.h>
+
+void TePDIIsosegClas::ResetState( const TePDIParameters& )
+{
+}
+
+TePDIIsosegClas::TePDIIsosegClas()
+{
+};
+
+TePDIIsosegClas::~TePDIIsosegClas()
+{
+};
+
+bool TePDIIsosegClas::SetThreshold(double t, int Nban)
+{
+  float ChiTab1[10][6] =
+  {
+    //     75.0%           90.0%           95.0%           99.0%           99.9%           100.%
+    {(float)1.32,    (float)2.71,    (float)3.84,    (float)6.64,    (float)10.83,   (float)10000.}, 
+    {(float)2.77,    (float)4.61,    (float)5.99,    (float)9.21,    (float)13.82,   (float)10000.}, 
+    {(float)4.11,    (float)6.25,    (float)7.82,    (float)11.35,   (float)16.27,   (float)10000.}, 
+    {(float)5.39,    (float)7.78,    (float)9.49,    (float)13.28,   (float)18.47,   (float)10000.}, 
+    {(float)6.63,    (float)9.24,    (float)11.07,   (float)15.09,   (float)20.52,   (float)10000.}, 
+    {(float)7.84,    (float)10.65,   (float)12.59,   (float)16.81,   (float)22.46,   (float)10000.}, 
+    {(float)9.04,    (float)12.02,   (float)14.07,   (float)18.48,   (float)24.32,   (float)10000.}, 
+    {(float)10.22,   (float)13.36,   (float)15.51,   (float)20.09,   (float)26.13,   (float)10000.}, 
+    {(float)11.39,   (float)14.68,   (float)16.92,   (float)21.67,   (float)27.88,   (float)10000.}, 
+    {(float)12.55,   (float)15.99,   (float)18.31,   (float)23.21,   (float)29.59,   (float)10000.}  
+  };
+
+  int  igl,
+    it;
+
+  if(t < 90.0)
+    it = 0;
+  else if(t < 95.0)
+    it = 1;
+  else if(t < 99.0)
+    it = 2;
+  else if(t < 99.9)
+    it = 3;
+  else it = 4;
+  
+  igl = Nban - 1;
+
+  threshold = ChiTab1[igl][it];
+
+  return true;
+}
+
+bool TePDIIsosegClas::MergeClusters()
+{
+  double dist = 0,
+      d1 = 0,
+      d2 = 0,
+      dmin = 0.0;
+  int  ic = 0,
+    ic_merge = 0,
+    ic_d1 = 0,
+    ic_d2 = 0;
+  bool flag = false;
+
+  // Remove the smallest clusters
+  while(clusters.size() > 1)
+  {
+    dmin = 0.0;
+    flag = false;
+    for(unsigned iclu1 = 0; iclu1 < clusters.size(); iclu1++)
+    {
+      for(unsigned iclu2 = 0; iclu2 < clusters.size(); iclu2++)
+      {
+        if(clusters[iclu1] == clusters[iclu2])
+          continue;
+
+        d1 = clusters[iclu1].Distance(clusters[iclu2]) + clusters[iclu1].GetLnDet();
+        d2 = clusters[iclu2].Distance(clusters[iclu1]) + clusters[iclu2].GetLnDet();
+        dist = ((d1 < d2) ? d2 : d1);
+        if(dist < dmin || (!flag))
+        {
+          ic_d1 = iclu1;
+          ic_d2 = iclu2;
+          flag = true;
+
+          dmin = dist;
+          ic = iclu2;
+          ic_merge = iclu1;
+        }
+      }
+    }
+    d1 = clusters[ic_d1].Distance(clusters[ic_d2]);
+    d2 = clusters[ic_d2].Distance(clusters[ic_d1]);
+    dist = ((d1 < d2) ? d2 : d1);
+
+    if(dist < threshold)
+    {
+      // merging two clusters
+      clusters[ic_d1].Merge(clusters[ic_d2]);
+
+      // setting new cluster id to the respective regions
+      int  id_old_cluster = clusters[ic_d2].GetId(),
+        id_new_cluster = clusters[ic_d1].GetId();
+      multimap<double, TePDIRegion, greater<double> >::iterator regions_it;
+      for (regions_it = regions.begin(); regions_it != regions.end(); ++regions_it)
+        if (regions_it->second.GetClass() == id_old_cluster)
+          regions_it->second.SetClass(id_new_cluster);
+
+      // arrange clusters vector
+      for (unsigned i = ic; i < (clusters.size() - 1); i++)
+        clusters[i] = clusters[i + 1];
+      clusters.pop_back();
+    }
+    else
+      break;
+  }
+
+  return true;
+}
+
+bool TePDIIsosegClas::GenerateClusters()
+{
+  int total_classes = 0,
+      total_classified = 0;
+
+  // loops until all the regions are classified
+  multimap<double, TePDIRegion, greater<double> >::iterator region_it,
+                                                            region_it_internal;
+
+  while (total_classified < total_regions)
+  {
+    // iterates over the regions, starting from the one with higher area, in descending order
+    for (region_it = regions.begin(); region_it != regions.end(); ++region_it)
+    {
+      TePDICluster tmp_cluster;
+
+      // if the region ins't classified, it's attributed to the class "total_classes"
+      if (region_it->second.GetClass() == 0)
+      {
+        ++total_classes;
+        int current_class = total_classes;
+        region_it->second.SetClass(current_class);
+
+        TEAGN_TRUE_OR_RETURN(tmp_cluster.Init(current_class, region_it->second), "Unable to init cluster");
+        total_classified++;
+        // searches for other regions with the same attributes, and put it into the same class
+        double dist = 0.0;
+        for (region_it_internal = regions.begin(); region_it_internal != regions.end(); ++region_it_internal)
+        {
+          if (region_it_internal->second.GetClass() == 0)
+          {
+            dist = tmp_cluster.Distance(region_it_internal->second);
+            if (dist <= threshold)
+            {
+              region_it_internal->second.SetClass(current_class);
+              TEAGN_TRUE_OR_RETURN(tmp_cluster.AddRegion(region_it_internal->second), "Unable to add region");
+              total_classified++;
+            }
+          }
+        }
+        clusters.push_back(tmp_cluster);
+      }
+    }
+  }
+
+  return true;
+}
+
+bool TePDIIsosegClas::CheckParameters(const TePDIParameters& parameters) const
+{
+  // Checking input_rasters
+  TePDITypes::TePDIRasterVectorType input_rasters;
+  TEAGN_TRUE_OR_RETURN(parameters.GetParameter("input_rasters", input_rasters), "Missing parameter: input_rasters");
+  TEAGN_TRUE_OR_RETURN(input_rasters.size() > 0, "Invalid input rasters number");
+
+  vector<int> bands;
+  TEAGN_TRUE_OR_RETURN(parameters.GetParameter("bands", bands), "Missing parameter: bands");
+  TEAGN_TRUE_OR_RETURN(bands.size() == input_rasters.size(), Te2String(input_rasters.size()) + " Invalid parameter: bands number " + Te2String(bands.size()));
+
+  for(unsigned int input_rasters_index = 0 ; input_rasters_index < input_rasters.size(); input_rasters_index++)
+  {
+    TEAGN_TRUE_OR_RETURN(input_rasters[input_rasters_index].isActive(), "Invalid parameter: input_raster " + Te2String(input_rasters_index) + " inactive");
+    TEAGN_TRUE_OR_RETURN(input_rasters[input_rasters_index]->params().status_ != TeRasterParams::TeNotReady, "Invalid parameter: input_raster " + Te2String(input_rasters_index) + " not ready");
+    TEAGN_TRUE_OR_RETURN(input_rasters[input_rasters_index]->params().nlines_ == input_rasters[0]->params().nlines_, "Invalid parameter: input_raster " + Te2String(input_rasters_index) + " with imcompatible number of lines");
+    TEAGN_TRUE_OR_RETURN(input_rasters[input_rasters_index]->params().ncols_ == input_rasters[0]->params().ncols_, "Invalid parameter: input_raster " + Te2String(input_rasters_index) + " with imcompatible number of columns");
+  }
+
+  // Checking input_polygonset
+  TePDITypes::TePDIPolygonSetPtrType input_polygonset;
+  TEAGN_TRUE_OR_RETURN(parameters.GetParameter("input_polygonset", input_polygonset), "Missing parameter: input_polygon");
+  TEAGN_TRUE_OR_RETURN(input_polygonset.isActive(), "Invalid parameter: input_poligonset inactive");
+  
+  // Checking acceptance_limiar
+  double  acceptance_limiar;
+  TEAGN_TRUE_OR_RETURN(parameters.GetParameter("acceptance_limiar", acceptance_limiar), "Missing parameter: acceptance_limiar");
+
+  // Checking output_raster
+  TePDITypes::TePDIRasterPtrType output_raster;
+  TEAGN_TRUE_OR_RETURN(parameters.GetParameter("output_raster", output_raster), "Missing parameter: output_raster");
+  TEAGN_TRUE_OR_RETURN(output_raster.isActive(), "Invalid parameter: output_raster inactive");
+  TEAGN_TRUE_OR_RETURN(output_raster->params().status_ != TeRasterParams::TeNotReady, "Invalid parameter: output_raster not ready");
+  return true;
+}
+
+// bool TePDIIsosegClas::Implementation(const TePDIParameters& params)
+bool TePDIIsosegClas::RunImplementation()
+{
+  // Setting the parameters
+  TePDITypes::TePDIRasterVectorType input_rasters;
+  params_.GetParameter("input_rasters", input_rasters);
+
+  vector<int> bands;
+  params_.GetParameter("bands", bands);
+
+  W = input_rasters[0]->params().ncols_;
+  H = input_rasters[0]->params().nlines_;
+
+  TePDITypes::TePDIPolygonSetPtrType input_polygonset;
+  params_.GetParameter("input_polygonset", input_polygonset);
+
+  TePDITypes::TePDIRasterPtrType output_raster;
+  params_.GetParameter("output_raster", output_raster);
+
+  double  acceptance_limiar;
+  params_.GetParameter("acceptance_limiar", acceptance_limiar);
+
+  /* Setting the output raster */
+  TeRasterParams output_raster_params = output_raster->params();
+
+  output_raster_params.setDataType( TeDOUBLE, -1 );
+  output_raster_params.nBands( 3 );
+  if( input_rasters[0]->projection() != 0 ) {
+    TeSharedPtr< TeProjection > proj( TeProjectionFactory::make( 
+      input_rasters[0]->projection()->params() ) );
+    output_raster_params.projection( proj.nakedPointer() );
+  }
+  output_raster_params.boxResolution( input_rasters[0]->params().box().x1(), 
+    input_rasters[0]->params().box().y1(), input_rasters[0]->params().box().x2(), 
+    input_rasters[0]->params().box().y2(), input_rasters[0]->params().resx_, 
+    input_rasters[0]->params().resy_ ); 
+  output_raster_params.setPhotometric( TeRasterParams::TeRGB, -1 );
+
+  TEAGN_TRUE_OR_RETURN( output_raster->init( output_raster_params ),
+    "Output raster reset error" );    
+
+  for (unsigned pols = 0; pols < input_polygonset->size(); pols++)
+  {
+    TePolygon polygon(input_polygonset->operator[](pols));
+
+    // this iterator "walks" in the image, on the region defined by a specific polygon
+    TeRaster::iteratorPoly it = input_rasters[0]->begin(polygon, TeBoxPixelIn, 0);
+    TeRaster::iteratorPoly it_end = input_rasters[0]->end(polygon, TeBoxPixelIn, 0);
+
+    long area = (long)TeGeometryArea(polygon);
+    // pixel vector for each band
+    vector<vector<double> > pixels_per_band(bands.size());
+    vector<double> sums(bands.size());
+    vector<double> tmp(1);
+    for (unsigned band = 0; band < bands.size(); band++)
+      pixels_per_band.push_back(tmp);
+
+    long npix = 0;
+    while(it != it_end)
+    {
+      int  i = it.currentColumn(),
+        j = it.currentLine();
+
+      bool result = false;
+      for (unsigned band = 0; band < bands.size(); band++)
+      {
+        double tmp_pixel = -1;
+        if ((i >= 0 && i < H) && (j >=0 && j < W))
+        {
+          input_rasters[band]->getElement(i, j, tmp_pixel, band);
+          // output_raster->setElement(i, j, 255, 0, 0);
+          pixels_per_band[band].push_back(tmp_pixel);
+          sums[band] += tmp_pixel;
+          result = true;
+        }
+      }
+      if (result)
+        npix++;
+      ++it;
+    }
+
+    vector<double> tmp_mean;
+    tmp_mean.reserve(bands.size());
+    for (unsigned band = 0; band < bands.size(); band++)
+    {
+      tmp_mean.push_back(sums[band]/npix);
+    }
+
+    // sets the covarariance matrix
+    TeMatrix tmp_covar;
+    int nbands = bands.size();
+    TEAGN_TRUE_OR_RETURN(tmp_covar.Init(nbands, nbands, 0.0), "Unable to Init tmp_covar");
+    double sum;
+    for(int i = 0; i < nbands; i++)
+      for(int j = 0; j < nbands; j++)
+      {
+        sum = 0.0;
+        for (int p = 0; p < npix; p++)
+          sum += (pixels_per_band[i][p] - tmp_mean[i]) * (pixels_per_band[j][p] - tmp_mean[j]);
+        tmp_covar(i,j) = (double)(sum / (npix - 1));
+      }
+
+    TePDIRegion tmp_region(pols);
+    TEAGN_TRUE_OR_RETURN(tmp_region.Init(bands.size(), npix, tmp_mean, tmp_covar), "Unable to Init tmp_region");
+    regions.insert(pair<double, TePDIRegion>(area, tmp_region));
+  }
+  total_regions = regions.size();
+
+  TEAGN_TRUE_OR_RETURN(SetThreshold(acceptance_limiar, bands.size()), "Unable to SetThreshold");
+  TEAGN_TRUE_OR_RETURN(GenerateClusters(), "Unable to GenerateClusters");
+  TEAGN_TRUE_OR_RETURN(MergeClusters(), "Unable to MergeClusters");
+
+  // paint output_raster with the correspondent classes
+  for (int pols = 0; pols < total_regions; pols++)
+  {
+    TePolygon polygon(input_polygonset->operator[](pols));
+
+    // this iterator "walks" in the image, on the region defined by a specific polygon
+    TeRaster::iteratorPoly it = input_rasters[0]->begin(polygon, TeBoxPixelIn, 0);
+    TeRaster::iteratorPoly it_end = input_rasters[0]->end(polygon, TeBoxPixelIn, 0);
+
+    // searches for the region with Id = pols
+    multimap<double, TePDIRegion, greater<double> >::iterator  regions_it,
+                        regions_tmp = regions.begin();
+    for (regions_it = regions.begin(); regions_it != regions.end(); ++regions_it)
+      if (regions_it->second.GetId() == pols)
+      {
+        regions_tmp = regions_it;
+        break;
+      }
+
+    unsigned  bit_class = regions_it->second.GetClass();
+
+    // here, a set of colors for up to 81 classes, C(3, 4) = tree bands, four levels
+    vector<int> levels;
+    levels.push_back(0);
+    levels.push_back(50);
+    levels.push_back(100);
+    levels.push_back(150);
+    levels.push_back(200);
+    levels.push_back(255);
+	int change = levels.size();
+    vector<int> colors_R, colors_G, colors_B;
+    for (int c = 0, i = 0, j = 0, k = 0; c < 81; c++)
+    {
+      colors_R.push_back(levels[i]);
+      colors_G.push_back(levels[j]);
+      colors_B.push_back(levels[k]);
+
+      i++;
+      if (i > change)
+      {
+        i = 0;
+        j++;
+      }
+      if (j > change)
+      {
+        j = 0;
+        k++;
+      }
+      if (k > change)
+        k = 0;
+    }
+
+	if (bit_class > colors_R.size())
+		bit_class = 0;
+
+    double  R = colors_R[bit_class],
+        G = colors_G[bit_class],
+        B = colors_B[bit_class];
+
+    // paint output_raster with specific color class
+    while(it != it_end)
+    {
+      int  i = it.currentColumn(),
+        j = it.currentLine();
+
+	  output_raster->setElement(i, j, R, G, B);
+      ++it;
+    }
+  }
+
+  return true;
+}
diff --git a/src/terralib/image_processing/TePDIIsosegClas.hpp b/src/terralib/image_processing/TePDIIsosegClas.hpp
new file mode 100644
index 0000000..43d963d
--- /dev/null
+++ b/src/terralib/image_processing/TePDIIsosegClas.hpp
@@ -0,0 +1,145 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIISOSEGCLAS
+  #define TEPDIISOSEGCLAS
+
+#include "TePDIAlgorithm.hpp"
+
+#include "TePDIRegion.hpp"
+#include "TePDICluster.hpp"
+
+#include <string>
+#include <set>
+
+  /**
+   * @brief Isoseg classification algorithm.
+   * @author Thales Sehn Korting <tkorting at dpi.inpe.br>
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIClassificationAlgorithms
+   *
+   * @note The required parameters are:
+   * @param input_rasters (TePDITypes::TePDIRasterVectorType) - Input rasters
+   * @param bands (vector<int>) - Input bands
+   * @param input_polygons (TePolygonSet) - Input polygonset
+   * @param acceptance_limiar (double) - Acceptance Limiar (90%, 95%, 99%, 100%)
+   * @param output_raster (TePDITypes::TePDIRasterPtrType) - Output raster.
+   *
+   */
+
+class PDI_DLL TePDIIsosegClas : public TePDIAlgorithm
+{
+  private:
+    /**
+    * Generates the Clusters, starting from the Region with higher area
+    * inserting into the same cluster other regions whose distance to this 
+    * Cluster is lower then the Threshold
+    *
+    * @return true if everything was done OK
+    */
+    bool GenerateClusters();
+
+    /**
+    * Merge similar clusters
+    *
+    * @return true if everything was done OK
+    */
+    bool MergeClusters();
+
+    /**
+    * Set the threshold value, based on the ChiTab1
+    */
+    bool SetThreshold(double t, int Nban);
+
+    /**
+    * Limiar of acceptance
+    */
+    double threshold;
+
+    /**
+    * Width and Height of image
+    */
+    long W, H;
+
+    /**
+    * Number of regions present in the PolygonSet
+    */
+    int total_regions;
+
+    /**
+    * Set of regions, ordered by area
+    */
+    multimap<double, TePDIRegion, greater<double> > regions;
+
+    /**
+    * Set of clusters
+    */
+    vector<TePDICluster> clusters;
+
+  public :
+
+    typedef TeSharedPtr< TePDIIsosegClas > pointer;
+    typedef const TeSharedPtr< TePDIIsosegClas > const_pointer;
+
+    /**
+    * Default constructor
+    *
+    * @param factoryName Factory name.
+    */
+    TePDIIsosegClas();
+
+    /**
+    * Default Destructor
+    */
+    ~TePDIIsosegClas();
+
+    /**
+    * Checks if the supplied parameters fits the requirements of each
+    * PDI strategy.
+    *
+    * Error log messages must be generated. No exceptions generated.
+    *
+    * @param parameters The parameters to be checked.
+    * @return true if the parameters are OK. false if not.
+    */
+    bool CheckParameters(const TePDIParameters& parameters) const;
+
+  protected :
+
+	/**
+	* @brief Reset the internal state to the initial state.
+	*
+	* @param params The new parameters referent at initial state.
+	*/
+	void ResetState( const TePDIParameters& );
+
+	/**
+	* @brief Runs the current algorithm implementation.
+	*
+	* @return true if OK. false on error.
+	*/
+	bool RunImplementation();
+};
+
+#endif
diff --git a/src/terralib/image_processing/TePDIIsosegClasFactory.cpp b/src/terralib/image_processing/TePDIIsosegClasFactory.cpp
new file mode 100644
index 0000000..8ff85df
--- /dev/null
+++ b/src/terralib/image_processing/TePDIIsosegClasFactory.cpp
@@ -0,0 +1,25 @@
+
+#include "TePDIIsosegClasFactory.hpp"
+#include "TePDIIsosegClas.hpp"
+#include <TeAgnostic.h>
+
+
+TePDIIsosegClasFactory::TePDIIsosegClasFactory()
+: TePDIAlgorithmFactory( std::string( "TePDIIsosegClas" ) )
+{
+}
+
+TePDIIsosegClasFactory::~TePDIIsosegClasFactory()
+{
+}
+
+
+TePDIAlgorithm* TePDIIsosegClasFactory::build ( const TePDIParameters& arg )
+{
+  TePDIAlgorithm* instance_ptr = new TePDIIsosegClas();
+  
+  TEAGN_TRUE_OR_THROW( instance_ptr->Reset( arg ),
+    "Invalid parameters" );
+  
+  return instance_ptr;
+}
diff --git a/src/terralib/image_processing/TePDIIsosegClasFactory.hpp b/src/terralib/image_processing/TePDIIsosegClasFactory.hpp
new file mode 100644
index 0000000..1dd4293
--- /dev/null
+++ b/src/terralib/image_processing/TePDIIsosegClasFactory.hpp
@@ -0,0 +1,68 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIISOSEGCLASFACTORY_HPP
+  #define TEPDIISOSEGCLASFACTORY_HPP
+
+  #include <TeSharedPtr.h>
+  #include "TePDIAlgorithmFactory.hpp"
+  #include "TePDIParameters.hpp"
+  
+  /**
+   * @brief This is the class for isoseg classification algorithm factory.
+   * @author Thales Sehn Korting <tkorting at dpi.inpe.br>
+   * @ingroup PDIAlgorithmsFactories
+   */
+  class PDI_DLL TePDIIsosegClasFactory : public TePDIAlgorithmFactory
+  {
+    public :
+      
+      /**
+       * @brief Default constructor
+       */
+      TePDIIsosegClasFactory();      
+      
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIIsosegClasFactory();
+      
+    protected :  
+      
+      /**
+       * @brief Implementation for the abstract TeFactory::build.
+       *
+       * @param arg A const reference to the parameters used by the
+       * algorithm.
+       * @return A pointer to the new generated algorithm instance.
+       */
+      TePDIAlgorithm* build( const TePDIParameters& arg );
+      
+  };
+
+  namespace {
+    static TePDIIsosegClasFactory TePDIIsosegClasFactory_instance;
+  };  
+  
+#endif
diff --git a/src/terralib/image_processing/TePDIJointHistogram.cpp b/src/terralib/image_processing/TePDIJointHistogram.cpp
new file mode 100755
index 0000000..c57c134
--- /dev/null
+++ b/src/terralib/image_processing/TePDIJointHistogram.cpp
@@ -0,0 +1,1026 @@
+#include "TePDIJointHistogram.hpp"
+
+#include "TePDIPIManager.hpp"
+
+#include <TeOverlay.h>
+#include <TeBox.h>
+#include <TeGeometry.h>
+#include <TeAgnostic.h>
+
+TePDIJointHistogram::TePDIJointHistogram()
+{
+  progressEnabled_ = true;
+
+  init_jhist_ = 0;
+  init_jhist_lines_ = 0;
+  init_jhist_cols_ = 0;
+  init_r1hist_ = 0;
+  init_r2hist_ = 0;
+}
+
+
+TePDIJointHistogram::TePDIJointHistogram( const TePDIJointHistogram& external )
+{
+  operator=( external );
+}
+
+
+TePDIJointHistogram::~TePDIJointHistogram()
+{
+  clear();
+}
+
+const TePDIJointHistogram& TePDIJointHistogram::operator=( const 
+  TePDIJointHistogram& external )    
+{
+  clear();
+
+  jHistContainer_ = external.jHistContainer_;
+  r1Histogram_ = external.r1Histogram_;
+  r2Histogram_ = external.r2Histogram_;
+  
+  return external;
+}
+
+void TePDIJointHistogram::toggleProgress( bool enabled )
+{
+  progressEnabled_ = enabled;
+}
+
+bool TePDIJointHistogram::update( TeRaster& inputRaster1, 
+  unsigned int inputRasterChn1, TeRaster& inputRaster2, 
+  unsigned int inputRasterChn2, TeStrategicIterator iterStrat, 
+  unsigned int levels, const TePolygonSet& restricPolSet )
+{
+  TEAGN_TRUE_OR_RETURN( inputRaster1.params().status_ != 
+    TeRasterParams::TeNotReady, "Raster1 not ready" )
+  TEAGN_TRUE_OR_RETURN( inputRaster2.params().status_ != 
+    TeRasterParams::TeNotReady, "Raster2 not ready" )
+    
+  TEAGN_TRUE_OR_RETURN( inputRaster1.params().resx_ ==
+    inputRaster2.params().resx_, "X resolution mismatch" )
+  TEAGN_TRUE_OR_RETURN( inputRaster1.params().resy_ ==
+    inputRaster2.params().resy_, "Y resolution mismatch" )
+      
+  TEAGN_TRUE_OR_RETURN( (int)inputRasterChn1 < inputRaster1.nBands(),
+    "Invalid channel" )
+  TEAGN_TRUE_OR_RETURN( (int)inputRasterChn2 < inputRaster2.nBands(),
+    "Invalid channel" )
+      
+  clear();
+    
+  // Calc the intersection between the restriction polygon set,
+  // and both rasters bounding box
+     
+  TePolygonSet interPS;
+  {
+    TePolygon pol1 = polygonFromBox( inputRaster1.params().boundingBox() );
+    TePolygon pol2 = polygonFromBox( inputRaster2.params().boundingBox() );
+    
+    TePolygonSet ps1;
+    ps1.add( pol1 );
+    
+    TePolygonSet ps2;
+    ps2.add( pol2 );
+    
+    TePolygonSet boxesInterPS;
+    TEAGN_TRUE_OR_RETURN( TeOVERLAY::TeIntersection( ps1, ps2, boxesInterPS ),
+      "Unable to find the intersection between both raster bounding boxes" );
+    
+    if( restricPolSet.size() == 0 )
+    {
+      interPS = boxesInterPS;
+    }
+    else
+    {
+      TEAGN_TRUE_OR_RETURN( TeOVERLAY::TeIntersection( boxesInterPS, restricPolSet, 
+        interPS ), "Unable to find the intersection between both raster bounding boxes" );
+    }
+  }
+    
+  // Pallete based rasters not supported
+    
+  if( ( inputRaster1.params().photometric_[ inputRasterChn1 ] == 
+    TeRasterParams::TePallete ) ||
+    ( inputRaster2.params().photometric_[ inputRasterChn2 ] == 
+    TeRasterParams::TePallete ) ) 
+  {
+    TEAGN_LOG_AND_RETURN( "Pallete based rasters not supported" )
+  }
+    
+  // Optimization for floating point rasters
+
+  if( ( inputRaster1.params().dataType_[ inputRasterChn1 ] == TeDOUBLE ) ||
+      ( inputRaster1.params().dataType_[ inputRasterChn1 ] == TeFLOAT ) ||
+      ( inputRaster2.params().dataType_[ inputRasterChn2 ] == TeDOUBLE ) ||
+      ( inputRaster2.params().dataType_[ inputRasterChn2 ] == TeFLOAT ) )
+  {
+    try
+    {
+      return updateFloat( inputRaster1, inputRasterChn1, inputRaster2, 
+        inputRasterChn2, iterStrat, levels, interPS );
+    }
+    catch(...)
+    {
+      TEAGN_LOG_AND_RETURN( "Not enought memory" );
+    }
+  }
+  
+  // Optmization for integer rasters
+		  
+  if( ( inputRaster1.params().dataType_[ inputRasterChn1 ] == TeINTEGER ) ||
+      ( inputRaster1.params().dataType_[ inputRasterChn1 ] == TeUNSIGNEDLONG ) ||
+      ( inputRaster1.params().dataType_[ inputRasterChn1 ] == TeLONG ) ||
+      ( inputRaster1.params().dataType_[ inputRasterChn1 ] == TeSHORT ) ||
+      ( inputRaster1.params().dataType_[ inputRasterChn1 ] == TeUNSIGNEDSHORT ) ||
+      ( inputRaster2.params().dataType_[ inputRasterChn2 ] == TeINTEGER ) ||
+      ( inputRaster2.params().dataType_[ inputRasterChn2 ] == TeUNSIGNEDLONG ) ||
+      ( inputRaster2.params().dataType_[ inputRasterChn2 ] == TeLONG ) ||
+      ( inputRaster2.params().dataType_[ inputRasterChn2 ] == TeSHORT ) ||
+      ( inputRaster2.params().dataType_[ inputRasterChn2 ] == TeUNSIGNEDSHORT ) )
+  {
+    return updateInteger( inputRaster1, inputRasterChn1, inputRaster2, 
+      inputRasterChn2, iterStrat, interPS );
+  }  
+  
+  // Optimization for 8 bits or 16 bits
+  
+  if( ( ( inputRaster1.params().dataType_[ inputRasterChn1 ] == TeCHAR ) ||
+      ( inputRaster1.params().dataType_[ inputRasterChn1 ] == TeUNSIGNEDCHAR ) ) &&
+      ( ( inputRaster2.params().dataType_[ inputRasterChn2 ] == TeCHAR ) ||
+      ( inputRaster2.params().dataType_[ inputRasterChn2 ] == TeUNSIGNEDCHAR ) ) )
+  {
+    return update8Bits( inputRaster1, inputRasterChn1, inputRaster2, 
+      inputRasterChn2, iterStrat, interPS );
+  }  
+  
+  TEAGN_LOG_AND_THROW( "Invalid data type" );
+  return false;
+}
+
+void TePDIJointHistogram::clear()
+{
+  jHistContainer_.clear();
+  r1Histogram_.clear();
+  r2Histogram_.clear();
+
+  clearTempHistBuffers();
+}
+
+const TePDIHistogram& TePDIJointHistogram::getRaster1Hist() const
+{
+  return r1Histogram_;
+}
+
+const TePDIHistogram& TePDIJointHistogram::getRaster2Hist() const
+{
+  return r2Histogram_;
+}
+
+TePDIJointHistogram::const_iterator TePDIJointHistogram::begin() const
+{
+  return jHistContainer_.begin();
+}
+
+TePDIJointHistogram::const_iterator TePDIJointHistogram::end() const
+{
+  return jHistContainer_.end();
+}
+
+unsigned int TePDIJointHistogram::size() const
+{
+  return (unsigned int)jHistContainer_.size();
+}
+
+void TePDIJointHistogram::getInverseJHist( TePDIJointHistogram& external )
+{
+  external.clear();
+  external.r1Histogram_ = r2Histogram_;
+  external.r2Histogram_ = r1Histogram_;
+
+  ConteinerT::const_iterator cit = jHistContainer_.begin();
+  ConteinerT::const_iterator cit_end = jHistContainer_.end();
+  std::pair< double, double > tempPair;
+  while( cit != cit_end )
+  {
+    tempPair.first = cit->first.second;
+    tempPair.second = cit->first.first;
+    external.jHistContainer_[ tempPair ] = cit->second;
+    
+    ++cit;
+  }
+}
+
+unsigned long int TePDIJointHistogram::getFreqSum() const
+{
+  ConteinerT::const_iterator cit = jHistContainer_.begin();
+  ConteinerT::const_iterator cit_end = jHistContainer_.end();
+
+  unsigned long int sum = 0;
+
+  while( cit != cit_end )
+  {
+    sum += (unsigned long int)cit->second;
+    
+    ++cit;
+  }
+  
+  return sum;
+}
+
+bool TePDIJointHistogram::updateFloat( TeRaster& inputRaster1, 
+  unsigned int inputRasterChn1, TeRaster& inputRaster2, 
+  unsigned int inputRasterChn2, TeStrategicIterator iterStrat, 
+  unsigned int levels, const TePolygonSet& restricPolSet )
+{
+  const unsigned long int progress_steps = 
+    getProgressSteps( restricPolSet, inputRaster1.params().resy_ );   
+  
+  /* Finding raster 1 lowest end highest levels */
+  
+  double r1_lowest_level = 0;
+  double r1_highest_level = 0;  
+    
+  if ( inputRaster1.params().decoderIdentifier_ == "DB" ) {
+    r1_lowest_level = inputRaster1.params().vmin_[ inputRasterChn1 ];
+    r1_highest_level = inputRaster1.params().vmax_[ inputRasterChn1 ];
+
+    // Return if there is no pixel data to read 
+
+    if( inputRaster1.params().useDummy_ && ( r1_lowest_level == 
+      inputRaster1.params().dummy_[ inputRasterChn1 ] ) && ( r1_highest_level == 
+      inputRaster1.params().dummy_[ inputRasterChn1 ] ) )
+    {
+      return true;
+    }
+  } else {
+    r1_lowest_level = DBL_MAX;
+    r1_highest_level = ( -1.0 ) * DBL_MAX;  
+
+    bool lh_levels_set = false; // lowest_level and highest_level values set
+    
+    TeRaster::iteratorPoly input_raster_it;
+    TePDIPIManager progress( "Finding histogram range", progress_steps, 
+      progressEnabled_ );
+    double current_raster_level = 0;
+    unsigned int curr_line = 0;
+    unsigned int curr_col = 0;
+    unsigned int last_line = 0;    
+    
+    for( unsigned int local_polset_index = 0 ; local_polset_index < 
+      restricPolSet.size() ; ++local_polset_index ) 
+    {
+      input_raster_it = inputRaster1.begin( restricPolSet[ local_polset_index ], 
+        iterStrat, 0 );
+      
+      while( ! input_raster_it.end() ) {
+        curr_line = input_raster_it.currentLine();
+        curr_col = input_raster_it.currentColumn();
+        
+        if( inputRaster1.getElement( curr_col, curr_line, current_raster_level,
+          inputRasterChn1 ) )
+        {
+          lh_levels_set = true;
+
+          if( current_raster_level > r1_highest_level ) {
+            r1_highest_level = current_raster_level;
+          }
+          if( current_raster_level < r1_lowest_level ) {
+            r1_lowest_level = current_raster_level;
+          }
+        }
+        
+        if( curr_line != last_line ) {
+          TEAGN_FALSE_OR_RETURN( progress.Increment(), 
+            "Canceled by the user" );
+          
+          last_line = curr_line;
+        }
+        
+        ++input_raster_it;
+      }
+    }
+
+    // Return if no pixel data was read 
+
+    if( ! lh_levels_set )
+    {
+      return true;
+    }
+  }   
+   
+  /* Finding raster 2 lowest end highest levels */
+  
+  double r2_lowest_level = 0;
+  double r2_highest_level = 0;  
+    
+  if ( inputRaster2.params().decoderIdentifier_ == "DB" ) {
+    r2_lowest_level = inputRaster2.params().vmin_[ inputRasterChn2 ];
+    r2_highest_level = inputRaster2.params().vmax_[ inputRasterChn2 ];
+
+    // Return if there is no pixel data to read 
+
+    if( inputRaster2.params().useDummy_ && ( r2_lowest_level == 
+      inputRaster2.params().dummy_[ inputRasterChn2 ] ) && ( r2_highest_level == 
+      inputRaster2.params().dummy_[ inputRasterChn2 ] ) )
+    {
+      return true;
+    }
+  } else {
+    r2_lowest_level = DBL_MAX;
+    r2_highest_level = ( -1.0 ) * DBL_MAX;  
+
+    bool lh_levels_set = false; // lowest_level and highest_level values set
+    
+    TeRaster::iteratorPoly input_raster_it;
+    TePDIPIManager progress( "Finding histogram range", progress_steps, 
+      progressEnabled_ );
+    double current_raster_level = 0;
+    unsigned int curr_line = 0;
+    unsigned int curr_col = 0;
+    unsigned int last_line = 0;    
+    
+    for( unsigned int local_polset_index = 0 ; local_polset_index < 
+      restricPolSet.size() ; ++local_polset_index ) 
+    {
+      input_raster_it = inputRaster2.begin( restricPolSet[ local_polset_index ], 
+        iterStrat, 0 );
+      
+      while( ! input_raster_it.end() ) {
+        curr_line = input_raster_it.currentLine();
+        curr_col = input_raster_it.currentColumn();
+        
+        if( inputRaster2.getElement( curr_col, curr_line, current_raster_level,
+          inputRasterChn2 ) )
+        {
+          lh_levels_set = true;
+
+          if( current_raster_level > r2_highest_level ) {
+            r2_highest_level = current_raster_level;
+          }
+          if( current_raster_level < r2_lowest_level ) {
+            r2_lowest_level = current_raster_level;
+          }
+        }
+        
+        if( curr_line != last_line ) {
+          TEAGN_FALSE_OR_RETURN( progress.Increment(), 
+            "Canceled by the user" );
+          
+          last_line = curr_line;
+        }
+        
+        ++input_raster_it;
+      }
+    }
+
+    // Return if no pixel data was read 
+
+    if( ! lh_levels_set )
+    {
+      return true;
+    }
+  }      
+     
+  /* Calculating the raster 1 histogram step and computed levels */
+
+  double r1_step = 1;
+  unsigned int r1_hist_computed_levels = 1;
+
+  if( r1_highest_level != r1_lowest_level )
+  {
+    if( levels == 0 ) {
+      /* Auto step feature */
+      TEAGN_TRUE_OR_RETURN( ( ( r1_highest_level - r1_lowest_level ) > 1.0 ),
+        "Histogram level range is too short for auto-step feature"
+        " lowest_level=" + Te2String( r1_lowest_level ) + " highest_level=" +
+        Te2String( r1_highest_level ) );
+  
+      r1_hist_computed_levels = 1 +
+        ( unsigned int ) floor( r1_highest_level - r1_lowest_level );
+    } else {
+      r1_hist_computed_levels = levels;
+    }
+  
+    TEAGN_TRUE_OR_RETURN( r1_hist_computed_levels > 0,
+      "Invalid levels number" );
+  
+    r1_step = ( r1_highest_level - r1_lowest_level ) /
+          ( (double)( r1_hist_computed_levels - 1 ) );
+  }
+  
+  /* Calculating the raster 2 histogram step and computed levels */
+
+  double r2_step = 1;
+  unsigned int r2_hist_computed_levels = 1;
+
+  if( r2_highest_level != r2_lowest_level )
+  {
+    if( levels == 0 ) {
+      /* Auto step feature */
+      TEAGN_TRUE_OR_RETURN( ( ( r2_highest_level - r2_lowest_level ) > 1.0 ),
+        "Histogram level range is too short for auto-step feature"
+        " lowest_level=" + Te2String( r2_lowest_level ) + " highest_level=" +
+        Te2String( r2_highest_level ) );
+  
+      r2_hist_computed_levels = 1 +
+        ( unsigned int ) floor( r2_highest_level - r2_lowest_level );
+    } else {
+      r2_hist_computed_levels = levels;
+    }
+  
+    TEAGN_TRUE_OR_RETURN( r2_hist_computed_levels > 0,
+      "Invalid levels number" );
+  
+    r2_step = ( r2_highest_level - r2_lowest_level ) /
+      ( (double)( r2_hist_computed_levels - 1 ) );
+  }  
+     
+   /* Building initial histograms */
+   
+   init_jhist_ = new unsigned int*[ r1_hist_computed_levels ];
+   init_jhist_lines_ = r1_hist_computed_levels;
+
+   init_r1hist_ = new unsigned int[ r1_hist_computed_levels ];
+   init_r2hist_ = new unsigned int[ r2_hist_computed_levels ];
+   {
+     unsigned int hist_index1 = 0;
+     unsigned int hist_index2 = 0;
+     
+     for( hist_index1 = 0 ; hist_index1 < r1_hist_computed_levels ; ++hist_index1 )
+     {
+       init_r1hist_[ hist_index1 ] = 0;
+       init_jhist_[ hist_index1 ] = new unsigned int[ r2_hist_computed_levels ];
+       
+       for( hist_index2 = 0 ; hist_index2 < r2_hist_computed_levels ; ++hist_index2 )
+       {
+         init_jhist_[ hist_index1 ][ hist_index2 ] = 0;
+       }
+     }
+       
+     for( hist_index2 = 0 ; hist_index2 < r2_hist_computed_levels ; ++hist_index2 )
+     {
+       init_r2hist_[ hist_index2 ] = 0;
+     }
+   }
+     
+   /* Analysing raster */
+   
+   {
+     const unsigned long int progress_steps = 
+       getProgressSteps( restricPolSet, inputRaster1.params().resy_ ); 
+     
+     TePDIPIManager progress( "Generating histogram", progress_steps, 
+       progressEnabled_ );
+   
+     TeRaster::iteratorPoly r1_it;
+     TeRaster::iteratorPoly r2_it;
+     
+     long int r1_line = 0;
+     long int r1_col = 0;
+     long int last_r1_line = 0;
+     
+     long int r2_line_off = 0;
+     long int r2_col_off = 0;
+     
+     double r1_value_double = 0;
+     double r2_value_double = 0;
+     unsigned int r1_value_int = 0;
+     unsigned int r2_value_int = 0;
+     
+     bool gotvalue1 = false;
+     bool gotvalue2 = false;
+     
+     for( unsigned int polset_index = 0 ; polset_index < 
+       restricPolSet.size() ; ++polset_index ) 
+     {
+       r1_it = inputRaster1.begin( restricPolSet[ polset_index ], 
+         iterStrat, 0 );
+       r2_it = inputRaster2.begin( restricPolSet[ polset_index ], 
+         iterStrat, 0 );
+       
+       if( ( ! r1_it.end() ) && ( ! r2_it.end() ) )
+       {
+         r1_line = r1_it.currentLine();
+         r1_col = r1_it.currentColumn();
+         
+         r2_line_off = r1_line - r2_it.currentLine();
+         r2_col_off = r1_col - r2_it.currentColumn();         
+  
+         while( ! r1_it.end() ) {
+           gotvalue1 = inputRaster1.getElement( r1_col, r1_line, 
+             r1_value_double, inputRasterChn1 );
+           gotvalue2 = inputRaster2.getElement( r1_col - r2_col_off, 
+             r1_line - r2_line_off, r2_value_double, inputRasterChn2 );
+           
+           if( gotvalue1 )
+           {
+             r1_value_int = (unsigned int) TeRound( ( r1_value_double - 
+               r1_lowest_level ) / r1_step );
+             TEAGN_DEBUG_CONDITION( r1_value_int < r1_hist_computed_levels,
+               "Invalid histogram index");
+
+             ++( init_r1hist_[ r1_value_int ] );
+           }
+           
+           if( gotvalue2 )
+           {
+             r2_value_int = (unsigned int) TeRound( ( r2_value_double - 
+               r2_lowest_level ) / r2_step );
+             TEAGN_DEBUG_CONDITION( r2_value_int < r2_hist_computed_levels,
+               "Invalid histogram index");
+           
+             ++( init_r2hist_[ r2_value_int ] );
+             
+             if( gotvalue1 )
+             {
+               ++( init_jhist_[ r1_value_int ][ r2_value_int ] );          
+             }             
+           }
+           
+           if( r1_line != last_r1_line ) {
+             TEAGN_FALSE_OR_RETURN( progress.Increment(), 
+               "Canceled by the user" );
+             
+             last_r1_line = r1_line;
+           }
+           
+           ++r1_it;
+           r1_line = r1_it.currentLine();
+           r1_col = r1_it.currentColumn();           
+         }
+       }
+     }  
+   }    
+  
+   /* Building ordered joint histogram */
+   
+   {
+     unsigned int hist_index1 = 0;
+     unsigned int hist_index2 = 0;
+     std::pair< double, double > temp_pair;
+     
+     for( hist_index1 = 0 ; hist_index1 < r1_hist_computed_levels ; 
+       ++hist_index1 )
+     {
+       if( hist_index1 == ( r1_hist_computed_levels - 1 ) )
+       {
+         temp_pair.first = r1_highest_level;
+       }
+       else
+       {
+         temp_pair.first = ( r1_step * (double)hist_index1 ) + 
+           r1_lowest_level;
+       }
+       
+       for( hist_index2 = 0 ; hist_index2 < r2_hist_computed_levels ;
+         ++hist_index2 )
+       { 
+         if( hist_index2 == ( r2_hist_computed_levels - 1 ) )
+         {
+           temp_pair.second = r2_highest_level;
+         }
+         else
+         {
+           temp_pair.second = ( r2_step * (double)hist_index2 ) + 
+             r2_lowest_level;
+         }     
+           
+         jHistContainer_[ temp_pair ] = init_jhist_[ hist_index1 ][ 
+           hist_index2 ];
+       }
+     }
+   }
+      
+   /* Building ordered raster 1 histogram */
+   
+   {
+     for( unsigned int hist_index = 0 ; hist_index < r1_hist_computed_levels ; 
+       ++hist_index )
+     {
+       if( hist_index == ( r1_hist_computed_levels - 1 ) )
+       {
+         r1Histogram_[ r1_highest_level ] = init_r1hist_[ hist_index ];
+       }
+       else
+       {
+         r1Histogram_[ ( r1_step * (double)hist_index ) + r1_lowest_level ] =
+           init_r1hist_[ hist_index ];
+       }
+     }
+   }   
+   
+   /* Building ordered raster 2 histogram */
+   
+   {
+     for( unsigned int hist_index = 0 ; hist_index < r2_hist_computed_levels ; 
+       ++hist_index )
+     {
+       if( hist_index == ( r2_hist_computed_levels - 1 ) )
+       {
+         r2Histogram_[ r2_highest_level ] = init_r2hist_[ hist_index ];
+       }
+       else
+       {
+         r2Histogram_[ ( r2_step * (double)hist_index ) + r2_lowest_level ] =
+           init_r2hist_[ hist_index ];
+       }
+     }
+   }  
+
+   clearTempHistBuffers(); 
+      
+   return true;
+}
+
+bool TePDIJointHistogram::updateInteger( TeRaster& inputRaster1, 
+  unsigned int inputRasterChn1, TeRaster& inputRaster2, 
+  unsigned int inputRasterChn2, TeStrategicIterator iterStrat, 
+  const TePolygonSet& restricPolSet )
+{
+   /* Analysing raster */
+   
+   {
+     const unsigned long int progress_steps = 
+       getProgressSteps( restricPolSet, inputRaster1.params().resy_ ); 
+     
+     TePDIPIManager progress( "Generating histogram", progress_steps, 
+       progressEnabled_ );
+   
+     TeRaster::iteratorPoly r1_it;
+     TeRaster::iteratorPoly r2_it;
+     
+     long int r1_line = 0;
+     long int r1_col = 0;
+     long int last_r1_line = 0;
+     
+     long int r2_line_off = 0;
+     long int r2_col_off = 0;
+     
+     bool gotvalue1 = false;
+     bool gotvalue2 = false;
+
+     std::pair< double, double > tempPair;
+     
+     for( unsigned int polset_index = 0 ; polset_index < 
+       restricPolSet.size() ; ++polset_index ) 
+     {
+       r1_it = inputRaster1.begin( restricPolSet[ polset_index ], 
+         iterStrat, 0 );
+       r2_it = inputRaster2.begin( restricPolSet[ polset_index ], 
+         iterStrat, 0 );
+       
+       if( ( ! r1_it.end() ) && ( ! r2_it.end() ) )
+       {
+         r1_line = r1_it.currentLine();
+         r1_col = r1_it.currentColumn();
+         
+         r2_line_off = r1_line - r2_it.currentLine();
+         r2_col_off = r1_col - r2_it.currentColumn();         
+  
+         while( ! r1_it.end() ) {
+           gotvalue1 = inputRaster1.getElement( r1_col, r1_line, 
+             tempPair.first, inputRasterChn1 );
+           gotvalue2 = inputRaster2.getElement( r1_col - r2_col_off, 
+             r1_line - r2_line_off, tempPair.second, inputRasterChn2 );
+           
+           if( gotvalue1 )
+           {
+             ++( r1Histogram_[ tempPair.first ] );
+           }
+           
+           if( gotvalue2 )
+           {
+             ++( r2Histogram_[ tempPair.second ] );
+             
+             if( gotvalue1 )
+             {
+               ++( jHistContainer_[ tempPair ] );          
+             }             
+           }
+           
+           if( r1_line != last_r1_line ) {
+             TEAGN_FALSE_OR_RETURN( progress.Increment(), 
+               "Canceled by the user" );
+             
+             last_r1_line = r1_line;
+           }
+           
+           ++r1_it;
+           r1_line = r1_it.currentLine();
+           r1_col = r1_it.currentColumn();           
+         }
+       }
+     }  
+   }    
+
+   clearTempHistBuffers();
+   
+   return true;
+}
+
+bool TePDIJointHistogram::update8Bits( TeRaster& inputRaster1, 
+  unsigned int inputRasterChn1, TeRaster& inputRaster2, 
+  unsigned int inputRasterChn2, TeStrategicIterator iterStrat, 
+  const TePolygonSet& restricPolSet )
+{
+   /* Defining level offset based on data bype */
+   
+   unsigned int level_offset1 = 0;
+   
+   if( inputRaster1.params().dataType_[ inputRasterChn1 ] == TeCHAR ) {
+     level_offset1 = 127; /*( 256 / 2 ) - 1 */
+   }
+   
+   unsigned int level_offset2 = 0;
+   
+   if( inputRaster2.params().dataType_[ inputRasterChn2 ] == TeCHAR ) {
+     level_offset2 = 127; /*( 256 / 2 ) - 1 */
+   }   
+     
+   /* Building initial histograms */
+   
+   init_jhist_ = new unsigned int*[ 256 ];
+   init_jhist_lines_ = 256;
+
+   init_r1hist_ = new unsigned int[ 256 ];
+   init_r2hist_ = new unsigned int[ 256 ];
+   {
+     unsigned int hist_index1 = 0;
+     unsigned int hist_index2 = 0;
+     
+     for( hist_index1 = 0 ; hist_index1 < 256 ; ++hist_index1 )
+     {
+       init_r1hist_[ hist_index1 ] = 0;
+       init_jhist_[ hist_index1 ] = new unsigned int[ 256 ];
+       
+       for( hist_index2 = 0 ; hist_index2 < 256 ; ++hist_index2 )
+       {
+         init_jhist_[ hist_index1 ][ hist_index2 ] = 0;
+       }
+     }
+
+     for( hist_index2 = 0 ; hist_index2 < 256 ; ++hist_index2 )
+     {
+       init_r2hist_[ hist_index2 ] = 0;
+     }
+   }
+   
+   /* Analysing raster */
+   
+   {
+     const unsigned long int progress_steps = 
+       getProgressSteps( restricPolSet, inputRaster1.params().resy_ ); 
+     
+     TePDIPIManager progress( "Generating histogram", progress_steps, 
+       progressEnabled_ );
+   
+     TeRaster::iteratorPoly r1_it;
+     TeRaster::iteratorPoly r2_it;
+     
+     long int r1_line = 0;
+     long int r1_col = 0;
+     long int last_r1_line = 0;
+     
+     long int r2_line_off = 0;
+     long int r2_col_off = 0;
+     
+     double r1_value_double = 0;
+     double r2_value_double = 0;
+     int r1_value_int = 0;
+     int r2_value_int = 0;
+     
+     bool gotvalue1 = false;
+     bool gotvalue2 = false;
+     
+     for( unsigned int polset_index = 0 ; polset_index < 
+       restricPolSet.size() ; ++polset_index ) 
+     {
+       r1_it = inputRaster1.begin( restricPolSet[ polset_index ], 
+         iterStrat, 0 );
+       r2_it = inputRaster2.begin( restricPolSet[ polset_index ], 
+         iterStrat, 0 );
+       
+       if( ( ! r1_it.end() ) && ( ! r2_it.end() ) )
+       {
+         r1_line = r1_it.currentLine();
+         r1_col = r1_it.currentColumn();
+         
+         r2_line_off = r1_line - r2_it.currentLine();
+         r2_col_off = r1_col - r2_it.currentColumn();         
+  
+         while( ! r1_it.end() ) {
+           gotvalue1 = inputRaster1.getElement( r1_col, r1_line, 
+             r1_value_double, inputRasterChn1 );
+           gotvalue2 = inputRaster2.getElement( r1_col - r2_col_off, 
+             r1_line - r2_line_off, r2_value_double, inputRasterChn2 );
+           
+           if( gotvalue1 )
+           {
+             r1_value_int = ( int ) r1_value_double;
+             TEAGN_DEBUG_CONDITION( (r1_value_int + level_offset1) < 256,
+               "Invalid histogram index");
+
+             ++( init_r1hist_[ r1_value_int + level_offset1 ] );
+           }
+           
+           if( gotvalue2 )
+           {
+             r2_value_int = ( int ) r2_value_double;
+             TEAGN_DEBUG_CONDITION( (r2_value_int + level_offset2) < 256,
+               "Invalid histogram index");
+           
+             ++( init_r2hist_[ r2_value_int + level_offset2 ] );
+             
+             if( gotvalue1 )
+             {
+               ++( init_jhist_[ r1_value_int + level_offset1 ][ r2_value_int + 
+                 level_offset2 ] );          
+             }             
+           }
+           
+           if( r1_line != last_r1_line ) {
+             TEAGN_FALSE_OR_RETURN( progress.Increment(), 
+               "Canceled by the user" );
+             
+             last_r1_line = r1_line;
+           }
+           
+           ++r1_it;
+           r1_line = r1_it.currentLine();
+           r1_col = r1_it.currentColumn();           
+         }
+       }
+     }  
+   }    
+  
+   // locating the first and last non-null joint histogram position 
+  
+   unsigned int first_nonnul_jh_idx1 = 256;
+   unsigned int first_nonnul_jh_idx2 = 256;
+   unsigned int last_nonnul_jh_idx1 = 256;
+   unsigned int last_nonnul_jh_idx2 = 256;
+   {
+     unsigned int hist_index1 = 0;
+     unsigned int hist_index2 = 0;
+     
+     for( hist_index1 = 0 ; hist_index1 < 256 ; ++hist_index1 )
+     {
+       for( hist_index2 = 0 ; hist_index2 < 256 ; ++hist_index2 )
+       {
+         if( init_jhist_[ hist_index1 ][ hist_index2 ] != 0 )
+         {
+           if( first_nonnul_jh_idx1 == 256 )
+           {
+             first_nonnul_jh_idx1 = last_nonnul_jh_idx1 = hist_index1;
+           }
+           else
+           {
+             last_nonnul_jh_idx1 = hist_index1;
+           }
+           
+           if( first_nonnul_jh_idx2 == 256 )
+           {
+             first_nonnul_jh_idx2 = last_nonnul_jh_idx2 = hist_index2;
+           }
+           else
+           {
+             last_nonnul_jh_idx2 = hist_index2;
+           }           
+         }
+       }
+     }
+   }   
+   
+   /* Building ordered joint histogram */
+   
+   if( first_nonnul_jh_idx1 != 256 )
+   {
+     unsigned int hist_index1 = 0;
+     unsigned int hist_index2 = 0;
+     std::pair< double, double > temp_pair;
+     
+     for( hist_index1 = first_nonnul_jh_idx2 ; hist_index1 <= last_nonnul_jh_idx1 ; 
+       ++hist_index1 )
+     {
+       for( hist_index2 = first_nonnul_jh_idx2 ; hist_index2 <= last_nonnul_jh_idx2 ;
+         ++hist_index2 )
+       { 
+         temp_pair.first = ( (double)hist_index1 ) - ( (double)level_offset1 );
+         temp_pair.second = ( (double)hist_index2 ) - ( (double)level_offset2 );
+           
+         jHistContainer_[ temp_pair ] = init_jhist_[ hist_index1 ][ hist_index2 ];
+       }
+     }
+   }
+      
+   // locating the first and last non-null histograms position
+  
+   unsigned int first_nonnul_h_idx1 = 256;
+   unsigned int first_nonnul_h_idx2 = 256;
+   unsigned int last_nonnul_h_idx1 = 256;
+   unsigned int last_nonnul_h_idx2 = 256;
+   {
+     for( unsigned int hist_index = 0 ; hist_index < 256 ; ++hist_index )
+     {
+       if( init_r1hist_[ hist_index ] != 0 )
+       {
+         if( first_nonnul_h_idx1 == 256 )
+         {
+           first_nonnul_h_idx1 = last_nonnul_h_idx1 = hist_index;
+         }
+         else
+         {
+           last_nonnul_h_idx1 = hist_index;
+         }
+       }
+       
+       if( init_r2hist_[ hist_index ] != 0 )
+       {
+         if( first_nonnul_h_idx2 == 256 )
+         {
+           first_nonnul_h_idx2 = last_nonnul_h_idx2 = hist_index;
+         }
+         else
+         {
+           last_nonnul_h_idx2 = hist_index;
+         }
+       }      
+     }
+   }   
+   
+   /* Building ordered raster 1 histogram */
+   
+   if( first_nonnul_h_idx1 != 256 )
+   {
+     unsigned int hist_index = 0;
+     
+     for( hist_index = first_nonnul_h_idx1 ; hist_index <= last_nonnul_h_idx1 ; 
+       ++hist_index )
+     {
+       r1Histogram_[ ( (double)hist_index ) - ( (double)level_offset1 ) ] =
+         init_r1hist_[ hist_index ];
+     }
+   }   
+   
+   /* Building ordered raster 2 histogram */
+   
+   if( first_nonnul_h_idx2 != 256 )
+   {
+     unsigned int hist_index = 0;
+     
+     for( hist_index = first_nonnul_h_idx2 ; hist_index <= last_nonnul_h_idx2 ; 
+       ++hist_index )
+     {
+       r2Histogram_[ ( (double)hist_index ) - ( (double)level_offset2 ) ] =
+         init_r2hist_[ hist_index ];
+     }
+   }    
+
+   clearTempHistBuffers();
+   
+   return true;
+}
+
+unsigned long int TePDIJointHistogram::getProgressSteps( 
+  const TePolygonSet& polset, double resy )
+{
+  unsigned long int steps = 0;
+
+  for( unsigned int ps_index = 0 ; ps_index < polset.size() ; 
+    ++ps_index ) {
+    
+    const TeBox& polbox( polset[ ps_index ].box() );
+    steps += ( unsigned long int)ABS( ( polbox.y2() - polbox.y1() ) / resy );
+  }
+  
+  return steps;
+}
+
+void TePDIJointHistogram::clearTempHistBuffers()
+{
+  if( init_jhist_ )
+  {
+    for( unsigned int line = 0 ; line < init_jhist_lines_ ; ++line )
+    {
+      if( init_jhist_[ line ] ) delete[]( init_jhist_[ line ] );
+    }
+
+    delete[]( init_jhist_ );
+
+    init_jhist_ = 0;
+    init_jhist_lines_ = 0;
+  }
+
+  if( init_r1hist_ )
+  {
+    delete[]( init_r1hist_ );
+    init_r1hist_ = 0;
+  }
+
+  if( init_r2hist_ )
+  {
+    delete[]( init_r2hist_ );
+    init_r2hist_ = 0;
+	}
+}
diff --git a/src/terralib/image_processing/TePDIJointHistogram.hpp b/src/terralib/image_processing/TePDIJointHistogram.hpp
new file mode 100755
index 0000000..0ed8a6f
--- /dev/null
+++ b/src/terralib/image_processing/TePDIJointHistogram.hpp
@@ -0,0 +1,191 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIJOINTHISTOGRAM_HPP
+  #define TEPDIJOINTHISTOGRAM_HPP
+
+  #include "TePDIHistogram.hpp"
+  #include "TePDITypes.hpp"
+
+  #include <map>
+  
+  class TePDIHistogram;
+  
+  /**
+   * @brief Raster joint histogram.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIAux
+   */
+  class PDI_DLL TePDIJointHistogram
+  {
+    public :
+      
+      //! Joint histogram container type definition.
+      typedef std::map< std::pair< double, double >, unsigned int > ConteinerT;
+      
+      //! Iterator type definition.
+      typedef ConteinerT::iterator iterator;
+      
+      //! Const-Iterator type definition.
+      typedef ConteinerT::const_iterator const_iterator;
+        
+      TePDIJointHistogram();
+      
+      TePDIJointHistogram( const TePDIJointHistogram& external );      
+
+       ~TePDIJointHistogram();
+      
+      const TePDIJointHistogram& operator=( const TePDIJointHistogram& external );      
+      
+      /**
+       * @brief Enable / Disable the progress interface.
+       *
+       * @param enabled Flag to enable ( true - default ) or disable ( false ).
+       */      
+      void toggleProgress( bool enabled );
+
+      /**
+       * @brief Update the current histogram reading data from the supplied
+       * rasters.
+       *
+       * @param input1Raster Input raster.
+       * @param input1RasterChn Input raster channel/band number.
+       * @param input2Raster Input raster.
+       * @param input2RasterChn Input raster channel/band number.
+       * @param iterStrat The raster iteration strategy (if you
+       * do not know what this is use TeBoxPixelIn).
+       * @param levels The number of histogram levels, and if set to zero,
+       * the number of levels will be automaticlly found by using
+       * level step with value one.
+       * @param restricPolSet The restriction polygon set.
+       * @return true if OK, false on errors.
+       * @note Pallete based rasters not supported.
+       * @note Only rasters with the same pixel resolution must be used.
+       * @note Floating point rasters will generate an aproximated histogram
+           with the number of gray levels configured by the parameter levels.
+       */
+      bool update( TeRaster& inputRaster1, 
+        unsigned int inputRasterChn1, TeRaster& inputRaster2, 
+        unsigned int inputRasterChn2, TeStrategicIterator iterStrat, 
+        unsigned int levels,
+        const TePolygonSet& restricPolSet = TePolygonSet() );
+      
+      /**
+       * @brief Clear the current histogram contents.
+       */      
+      void clear();      
+      
+      //!  Return a reference to raster 1 histogram.
+      /*!
+        \return A reference to raster 1 histogram.
+      */
+      const TePDIHistogram& getRaster1Hist() const;
+      
+      //!  Return a reference to raster 2 histogram.
+      /*!
+        \return A reference to raster 2 histogram.
+      */
+      const TePDIHistogram& getRaster2Hist() const;
+      
+      //! Returns an iterator pointing to the beginning of the joint histogram.
+      const_iterator begin() const;
+      
+      //! Returns an iterator pointing to the end of the joint histogram.
+      const_iterator end() const;
+      
+      //! Returns the histogram size.
+      unsigned int size() const;
+
+      //! Generate a inversed joint histogram from the current one.
+      /*!
+          \param external A external output histogram.
+          \note The inversed histogram has swapped raster1 and raster2 
+          values.
+      */
+      void getInverseJHist( TePDIJointHistogram& external );
+      
+      //! Returns the sum of all pixel velues frequencies.
+      /*! \return The sum of all pixel velues frequencies. */
+      unsigned long int getFreqSum() const;      
+      
+    protected :
+      
+      //! Progress enabled flag.
+      bool progressEnabled_;
+
+      //! Internal container.
+      ConteinerT jHistContainer_;
+      
+      //! Raster1 histogram.
+      TePDIHistogram r1Histogram_;
+      
+      //! Raster2 histogram.
+      TePDIHistogram r2Histogram_;
+
+      // Internal used variables to store temporary histogram buffers.
+	    unsigned int** init_jhist_;
+      unsigned int init_jhist_lines_;
+      unsigned int init_jhist_cols_;
+	    unsigned int* init_r1hist_;
+	    unsigned int* init_r2hist_;
+      
+      // Just like the Update method, but for floating point rasters.
+      bool updateFloat( TeRaster& inputRaster1, 
+          unsigned int inputRasterChn1, TeRaster& inputRaster2, 
+          unsigned int inputRasterChn2, TeStrategicIterator iterStrat, 
+          unsigned int levels, const TePolygonSet& restricPolSet );
+      
+      // Just like the Update method, but for integer rasters.
+      bool updateInteger( TeRaster& inputRaster1, 
+          unsigned int inputRasterChn1, TeRaster& inputRaster2, 
+          unsigned int inputRasterChn2, TeStrategicIterator iterStrat, 
+          const TePolygonSet& restricPolSet );
+      
+      // Just like the Update method, but for 8 bits rasters.
+      bool update8Bits( TeRaster& inputRaster1, 
+          unsigned int inputRasterChn1, TeRaster& inputRaster2, 
+          unsigned int inputRasterChn2, TeStrategicIterator iterStrat, 
+          const TePolygonSet& restricPolSet ); 
+      
+      /**
+       * @brief Calculate the number of progress steps when using
+       * a polygon iterator over a raster for the supplied 
+       * polygon set.
+       *
+       * @param polset The polygon set.
+       * @param resy Y axis resolution.
+       */        
+      unsigned long int getProgressSteps( 
+        const TePolygonSet& polset, double resy );     
+
+      //! Clear the internal temporary histogram buffers ( init_jhist_, init_jhist_lines_, init_jhist_cols_, init_r1hist_, init_r2hist_.
+      void clearTempHistBuffers();
+    
+  };
+  
+/** @example TePDIJointHistogram_test.cpp
+ *    Shows how to use this class.
+ */    
+
+#endif
diff --git a/src/terralib/image_processing/TePDIKMeansClas.cpp b/src/terralib/image_processing/TePDIKMeansClas.cpp
new file mode 100644
index 0000000..a6523b7
--- /dev/null
+++ b/src/terralib/image_processing/TePDIKMeansClas.cpp
@@ -0,0 +1,344 @@
+#include "TePDIKMeansClas.hpp"
+#include "TePDIStrategyFactory.hpp"
+#include "TePDIAlgorithmFactory.hpp"
+#include "TePDIUtils.hpp"
+
+#include <TeAgnostic.h>
+
+TePDIKMeansClas::TePDIKMeansClas()
+{
+};
+
+TePDIKMeansClas::~TePDIKMeansClas()
+{
+  tuple.clear();
+  clusters.clear();
+};
+
+void TePDIKMeansClas::ResetState( const TePDIParameters& )
+{
+
+}
+
+bool TePDIKMeansClas::CheckParameters(const TePDIParameters& parameters) const
+{
+// Checking input_rasters
+  TePDITypes::TePDIRasterPtrType input_raster;
+  TEAGN_TRUE_OR_RETURN(parameters.GetParameter("input_raster", input_raster), "Missing parameter: input_raster");
+  TEAGN_TRUE_OR_RETURN(input_raster->params().nBands() > 0, "Invalid input rasters number");
+
+// Checking output_raster
+  TePDITypes::TePDIRasterPtrType output_raster;
+  TEAGN_TRUE_OR_RETURN(parameters.GetParameter("output_raster", output_raster), "Missing parameter: output_raster");
+  TEAGN_TRUE_OR_RETURN(output_raster.isActive(), "Invalid parameter: output_raster inactive");
+  TEAGN_TRUE_OR_RETURN(output_raster->params().status_ != TeRasterParams::TeNotReady, "Invalid parameter: output_raster not ready");
+
+// Checking nClass
+  int nClass = 0;
+  TEAGN_TRUE_OR_RETURN(parameters.GetParameter("classes_number", nClass), "Missing parameter: classes_number");
+  TEAGN_TRUE_OR_RETURN( ( nClass > 0 ) , "Invalid parameter - classes_number" );
+
+// Checking bands
+  vector<int> bands;
+  TEAGN_TRUE_OR_RETURN(parameters.GetParameter("bands", bands), "Missing parameter: bands");
+  TEAGN_TRUE_OR_RETURN(bands.size() > 0, " Invalid parameter: bands number ");
+  for( unsigned int bands_index = 0 ; bands_index < bands.size() ; 
+    ++bands_index ) {
+    
+    TEAGN_TRUE_OR_RETURN( 
+      ( bands[ bands_index ] < input_raster->params().nBands() ),
+      "Invalid parameter : bands[" + Te2String( bands_index ) + "]" )  
+  }
+  
+  return true;
+}
+
+bool TePDIKMeansClas::RunImplementation()
+{
+// Getting raster vector
+  params_.GetParameter("input_raster", input_raster);
+  
+// Getting output raster
+  params_.GetParameter("output_raster", output_raster);
+
+  /* Setting the output raster */
+  TeRasterParams output_raster_params = output_raster->params();
+
+  output_raster_params.setDataType( TeUNSIGNEDCHAR );
+  output_raster_params.nBands( 1 );
+  if( input_raster->projection() != 0 ) 
+  {
+    output_raster_params.projection( input_raster->projection() );
+  }
+
+  output_raster_params.boxResolution( input_raster->params().box().x1(), 
+    input_raster->params().box().y1(), input_raster->params().box().x2(), 
+    input_raster->params().box().y2(), input_raster->params().resx_, 
+    input_raster->params().resy_ ); 
+  
+  TEAGN_TRUE_OR_RETURN( output_raster->init( output_raster_params ), 
+    "Output raster reset error" );
+
+  output_raster->params().status_ = TeRasterParams::TeReadyToWrite;
+
+// Getting bands
+  params_.GetParameter("bands", bands);
+  n_Bands = bands.size();
+
+// Getting number of classe
+  params_.GetParameter("classes_number", n_Class);
+
+// Checking nIter
+  int nIter = 0;
+  if( params_.CheckParameter< int >( "iterations_number" ) ) 
+  {
+    params_.GetParameter( "iterations_number", nIter );
+  }
+  n_Iter = nIter <= 0 ? 10 : nIter;
+
+// Checking initial line
+  int lineBegin = 0;
+  if( params_.CheckParameter< int >( "line_begin" ) ) 
+  {
+    params_.GetParameter( "line_begin", lineBegin );
+  }
+  initial_line = lineBegin <= 0 || lineBegin >=  input_raster->params().nlines_ ? 0 : lineBegin;
+  
+// Checking end line
+  int lineEnd = 0;
+  if( params_.CheckParameter< int >( "line_end" ) ) 
+  {
+    params_.GetParameter( "line_end", lineEnd );
+  }
+  end_line = lineEnd <= 0 || lineEnd >= input_raster->params().nlines_ ? input_raster->params().nlines_ - 1 : lineEnd;
+
+// Checking initial column
+  int columnBegin = 0;
+  if( params_.CheckParameter< int >( "column_begin" ) ) 
+  {
+    params_.GetParameter( "column_begin", columnBegin );
+  }
+  initial_column = columnBegin <= 0 || columnBegin >= input_raster->params().ncols_ ? 0 : columnBegin;
+
+// Checking end column
+  int columnEnd = 0;
+  if( params_.CheckParameter< int >( "column_end" ) ) 
+  {
+    params_.GetParameter( "column_end", columnEnd );
+  }
+  end_column = columnEnd <= 0 || columnEnd >= input_raster->params().ncols_ ? input_raster->params().ncols_ - 1 : columnEnd;
+
+// Checking fSamp
+  int fSamp = 0;
+  if( params_.CheckParameter< int >( "sample" ) ) 
+  {
+    params_.GetParameter( "sample", fSamp );
+  }
+  
+  int defaultSamp = ( (end_line - initial_line + 1)*( end_column - initial_column + 1) ) / (256*256);
+  
+  if( defaultSamp <= 0 )
+    defaultSamp = 1;
+
+  f_Samp = fSamp == 0 ? defaultSamp : fSamp;
+
+//initialization of cluster vector
+  for( int i = 0; i < 256; ++i )
+  {
+    clusters.push_back(0);
+  }
+  
+  classifyPixels(initial_line, end_line, columnBegin, end_column);
+
+
+  return true;
+}
+
+void TePDIKMeansClas::GenerateClassificationParameters()
+{  
+// Creates first Cluster
+  clusters[0] =  new TePDICluster( n_Bands );
+
+  tuple.clear();
+
+  TePDIPIManager progress("Generating Classification Parameters", end_line,
+    progress_enabled_ );
+
+  for( int lin = initial_line; lin <= end_line; lin += f_Samp )
+  {
+    for( int col = initial_column; col <= end_column; col += f_Samp )
+    {
+      for( int band = 0; band < n_Bands; ++band )
+      {
+        double value;
+        input_raster->getElement(col,lin, value, bands[band]);
+        tuple.push_back(value);
+      }
+
+      clusters[0]->add(tuple);
+
+      tuple.clear();
+    }
+    progress.Increment();
+  }
+
+  progress.Toggle(false);
+
+  clusters[0]->updateStatistics();
+
+// Generates other clusters 
+  class_count = 1;
+  while( class_count < n_Class )
+  {
+    if( !split() )
+      break;
+  }
+
+  kmeans();
+
+  return;
+}
+
+  
+bool TePDIKMeansClas::split()
+{
+//Selects class with biggest variance
+  TePDICluster* splitCluster = clusters[0];
+  for( int indclass = 1; indclass < class_count; ++indclass )
+  {
+    if( splitCluster->maxVar() < clusters[indclass]->maxVar() )
+    {
+      splitCluster = clusters[indclass];
+    }
+  }
+
+  if( splitCluster->splitRight().GetNban() <= 0 )
+    return false;
+
+// Splits Cluster
+  clusters[class_count++] = new TePDICluster( splitCluster->splitRight() );
+  *splitCluster = splitCluster->splitLeft();
+
+// Classify Samples
+  classifySamples();
+
+  return true;
+}
+  
+void TePDIKMeansClas::kmeans()
+{
+  if( class_count <= 1 )
+    return;
+
+  TePDIPIManager progress("Classifying Samples", n_Iter, progress_enabled_ );
+
+  for( int iter = 0; iter < n_Iter; ++iter )
+  {
+    classifySamples();
+    progress.Increment();
+  }
+  
+  progress.Toggle(false);
+
+  return;
+}
+
+void TePDIKMeansClas::classifySamples()
+{
+  int indclass;
+
+// Reset Counts
+  for( indclass = 0; indclass < class_count; ++indclass )
+  {
+    clusters[indclass]->resetCount();
+  }
+
+  tuple.clear();
+
+
+// Classification of samples
+  for( int lin = initial_line; lin <= end_line; lin += f_Samp )
+  {
+    for( int col = initial_column; col <= end_column; col += f_Samp )
+    {
+      for( int band = 0; band < n_Bands; ++band )
+      {
+        double value;
+        input_raster->getElement(col, lin, value, bands[band]);
+        tuple.push_back(value);
+      }
+
+      TePDICluster* bestCluster = clusters[0];
+      
+      double distance = bestCluster->dist( tuple );
+
+      for( int indclass = 1; indclass < class_count; ++indclass )
+      {
+        if( clusters[indclass]->dist( tuple ) < distance )
+        {
+          bestCluster = clusters[indclass];
+          distance = clusters[indclass]->dist( tuple );
+        }
+      }
+
+      bestCluster->add( tuple );
+
+      tuple.clear();
+    }
+  }
+
+// Update Statistics
+  for( indclass = 0; indclass < class_count; ++indclass )
+  {
+    clusters[indclass]->updateStatistics();
+  }
+
+  return;
+}
+
+
+int TePDIKMeansClas::classifyPixels( int l1, int l2, int c1, int c2)
+{
+  vector<double> pixel;
+
+  GenerateClassificationParameters();
+
+  TePDIPIManager progress("Classifying Pixels", l2, progress_enabled_ );
+
+  for( int lin = l1; lin <= l2; lin++ )
+  {
+    for( int col = c1; col <= c2; col++ )
+    {
+      for( int ban = 0; ban < n_Bands; ban++ )
+      {
+        double value;
+        input_raster->getElement(col, lin, value, bands[ban]);
+        pixel.push_back(value);
+      }
+
+      double dist = 0;
+      double distance = clusters[0]->dist( pixel );
+      int besttheme = 0;
+      for(int indclass = 0; indclass < class_count; ++indclass )
+      {
+        if( ( dist = clusters[indclass]->dist( pixel ) ) < distance )
+        {
+          distance  = dist;
+          besttheme = indclass;
+        }
+      }
+
+      pixel.clear();
+
+      output_raster->setElement(col, lin, besttheme);
+    }
+
+    progress.Increment();
+  }
+
+  progress.Toggle(false);
+
+  pixel.clear();
+
+  return class_count;
+}
diff --git a/src/terralib/image_processing/TePDIKMeansClas.hpp b/src/terralib/image_processing/TePDIKMeansClas.hpp
new file mode 100644
index 0000000..08fe35c
--- /dev/null
+++ b/src/terralib/image_processing/TePDIKMeansClas.hpp
@@ -0,0 +1,208 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIKMEANSCLAS_HPP
+  #define TEPDIKMEANSCLAS_HPP
+
+#include "TePDIAlgorithm.hpp"
+
+#include "TePDIRegion.hpp"
+#include "TePDICluster.hpp"
+
+#include <string>
+#include <set>
+
+  /**
+   * @brief Kmeans classification algorithm.
+   * @author Eric Silva Abreu <eric at dpi.inpe.br>
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIClassificationAlgorithms
+   *
+   * @note The required parameters are:
+   * @param input_raster (TePDITypes::TePDIRasterPtrType) - Input raster.
+   * @param output_raster (TePDITypes::TePDIRasterPtrType) - Output raster.
+   * @param bands (vector<int>) - input bands.
+   * @param classes_number (int) - number of classes.
+   *
+   * @note The optional parameters are:
+   *
+   * @param sample (int) - ???? (default 1).
+   * @param iterations_number (int) - number of iterations (default 10).
+   * @param line_begin (int) - initial line to do classfication (default 0).
+   * @param line_end (int) - end line to do classfication(default: the last raster line).
+   * @param column_begin (int) - initial column to do classfication (default 0).
+   * @param column_end (int) - end column to do classfication (default : the last raster column).   
+   */
+
+class PDI_DLL TePDIKMeansClas : public TePDIAlgorithm
+{
+  private :
+
+  /**
+    * @brief Generate classificatin paramters.
+    */   
+  void GenerateClassificationParameters();
+  
+  /**
+    * @brief Start the clusters classifying process.
+    */    
+  void classifySamples();
+  
+  /**
+    * @brief Start the clusters splitting process.
+    */    
+  bool split();
+  
+  /**
+    * @brief Start the kmeans algorithm.
+    */  
+  void kmeans();
+
+  /**
+    * @brief Classify pixels.
+    *
+    * @param l1 Starting line.
+    * @param l2 Ending line.
+    * @param c1 Starting column.
+    * @param c2 Ending column.
+    * @return The classes count.
+    */
+  int classifyPixels( int l1, int l2, int c1, int c2);
+
+  /**
+    * Number of classes
+    */
+    int n_Class;
+
+  /**
+    * class count
+    */
+    int class_count;
+
+  /**
+    * Number of bands
+    */
+    int n_Bands;
+
+  /**
+    * Number of iterations
+    */
+    int n_Iter;
+
+  /**
+    * Sample
+    */
+    int f_Samp;
+
+  /**
+    * initial line to do classfication
+    */
+    int initial_line;
+
+  /**
+    * end line to do classfication
+    */
+    int end_line;
+
+  /**
+    * initial column to do classfication
+    */
+    int initial_column;
+
+  /**
+    * end column to do classfication
+    */
+    int end_column;
+
+  /**
+    * pixel value of each input raster
+    */
+  vector<int> bands;
+
+  /**
+    * Set of clusters
+    */
+    vector<TePDICluster*> clusters;
+
+  /**
+    * pixel value of each input raster
+    */
+  vector<double> tuple;
+
+  /**
+    * input rasters
+    */
+  TePDITypes::TePDIRasterPtrType input_raster;
+
+  /**
+    * output raster
+    */
+  TePDITypes::TePDIRasterPtrType output_raster;
+
+  public :
+
+    typedef TeSharedPtr< TePDIKMeansClas > pointer;
+    typedef const TeSharedPtr< TePDIKMeansClas > const_pointer;
+
+    /**
+    * Default constructor
+    *
+    * @param factoryName Factory name.
+    */
+    TePDIKMeansClas();
+
+    /**
+    * Default Destructor
+    */
+    ~TePDIKMeansClas();
+
+    /**
+    * Checks if the supplied parameters fits the requirements of each
+    * PDI strategy.
+    *
+    * Error log messages must be generated. No exceptions generated.
+    *
+    * @param parameters The parameters to be checked.
+    * @return true if the parameters are OK. false if not.
+    */
+    bool CheckParameters(const TePDIParameters& parameters) const;
+
+  protected :
+
+  /**
+  * @brief Reset the internal state to the initial state.
+  *
+  * @param params The new parameters referent at initial state.
+  */
+  void ResetState( const TePDIParameters& );
+
+  /**
+  * @brief Runs the current algorithm implementation.
+  *
+  * @return true if OK. false on error.
+  */
+  bool RunImplementation();
+};
+
+#endif
diff --git a/src/terralib/image_processing/TePDIKMeansClasFactory.cpp b/src/terralib/image_processing/TePDIKMeansClasFactory.cpp
new file mode 100644
index 0000000..b6efc9d
--- /dev/null
+++ b/src/terralib/image_processing/TePDIKMeansClasFactory.cpp
@@ -0,0 +1,25 @@
+
+#include "TePDIKMeansClasFactory.hpp"
+#include "TePDIKMeansClas.hpp"
+#include <TeAgnostic.h>
+
+
+TePDIKMeansClasFactory::TePDIKMeansClasFactory()
+: TePDIAlgorithmFactory( std::string( "TePDIKMeansClas" ) )
+{
+}
+
+TePDIKMeansClasFactory::~TePDIKMeansClasFactory()
+{
+}
+
+
+TePDIAlgorithm* TePDIKMeansClasFactory::build ( const TePDIParameters& arg )
+{
+  TePDIAlgorithm* instance_ptr = new TePDIKMeansClas();
+  
+  TEAGN_TRUE_OR_THROW( instance_ptr->Reset( arg ),
+    "Invalid parameters" );
+  
+  return instance_ptr;
+}
diff --git a/src/terralib/image_processing/TePDIKMeansClasFactory.hpp b/src/terralib/image_processing/TePDIKMeansClasFactory.hpp
new file mode 100644
index 0000000..fc56587
--- /dev/null
+++ b/src/terralib/image_processing/TePDIKMeansClasFactory.hpp
@@ -0,0 +1,68 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIKMEANSCLASFACTORY_HPP
+  #define TEPDIKMEANSCLASFACTORY_HPP
+
+  #include <TeSharedPtr.h>
+  #include "TePDIAlgorithmFactory.hpp"
+  #include "TePDIParameters.hpp"
+  
+  /**
+   * @brief This is the class for kmeans classification algorithm factory.
+   * @author Eric Silva Abreu <eric at dpi.inpe.br>
+   * @ingroup PDIAlgorithmsFactories
+   */
+  class PDI_DLL TePDIKMeansClasFactory : public TePDIAlgorithmFactory
+  {
+    public :
+      
+      /**
+       * @brief Default constructor
+       */
+      TePDIKMeansClasFactory();      
+      
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIKMeansClasFactory();
+      
+    protected :  
+      
+      /**
+       * @brief Implementation for the abstract TeFactory::build.
+       *
+       * @param arg A const reference to the parameters used by the
+       * algorithm.
+       * @return A pointer to the new generated algorithm instance.
+       */
+      TePDIAlgorithm* build( const TePDIParameters& arg );
+      
+  };
+
+  namespace {
+    static TePDIKMeansClasFactory TePDIKMeansClasFactory_instance;
+  };  
+  
+#endif
diff --git a/src/terralib/image_processing/TePDILevelRemap.cpp b/src/terralib/image_processing/TePDILevelRemap.cpp
new file mode 100755
index 0000000..cc96c39
--- /dev/null
+++ b/src/terralib/image_processing/TePDILevelRemap.cpp
@@ -0,0 +1,520 @@
+#include "TePDILevelRemap.hpp"
+
+#include <TeAgnostic.h>
+#include "TePDIUtils.hpp"
+#include "TePDIStatistic.hpp"
+#include "TePDIMatrix.hpp"
+
+#include <TeUtils.h>
+#include <TeDefines.h>
+
+#include <math.h>
+#include <float.h>
+
+TePDILevelRemap::TePDILevelRemap()
+{
+}
+
+
+TePDILevelRemap::~TePDILevelRemap()
+{
+}
+
+
+
+void TePDILevelRemap::ResetState( const TePDIParameters& params )
+{
+  TePDIParameters dummy_params = params;
+
+  histo_cache_.clear();
+}
+
+
+bool TePDILevelRemap::RemapLevels(
+  TePDITypes::TePDIRasterPtrType& inRaster,
+  remap_func_3_ptr_type remapp_func,
+  int in_channel,
+  int out_channel,
+  double gain,
+  double offset,
+  bool normalize_output,
+  TePDITypes::TePDIRasterPtrType& outRaster )
+{
+  TEAGN_TRUE_OR_THROW( inRaster.isActive(),
+    "inRaster inactive" );
+  TEAGN_TRUE_OR_THROW( outRaster.isActive(),
+    "outRaster inactive" );
+  TEAGN_TRUE_OR_THROW( 
+    ( inRaster->params().status_ != TeRasterParams::TeNotReady ),
+    "inRaster not ready" );
+  TEAGN_TRUE_OR_THROW( 
+    ( outRaster->params().status_ != TeRasterParams::TeNotReady ),
+    "outRaster not ready" );
+  TEAGN_CHECK_EQUAL( inRaster->params().nlines_,
+    outRaster->params().nlines_,
+    "Lines number mismatch between input and output image" );
+  TEAGN_CHECK_EQUAL( inRaster->params().ncols_,
+    outRaster->params().ncols_,
+    "Columns number mismatch between input and output image" );
+  TEAGN_TRUE_OR_THROW( in_channel < inRaster->nBands(), "Invalid input band" );
+  TEAGN_TRUE_OR_THROW( out_channel < outRaster->nBands(), "Invalid output band" );
+  
+  if( normalize_output ) {
+    TEAGN_TRUE_OR_THROW( 
+      ( outRaster->params().dataType_[ out_channel ] != TeDOUBLE ),
+      "Cannot apply normalization for TeDOUBLE pixel type output bands" );
+  }
+  
+  TeRaster* inRasterNPtr = inRaster.nakedPointer();
+  TeRaster* outRasterNPtr = outRaster.nakedPointer();
+  const int in_raster_lines = inRaster->params().nlines_;
+  const int in_raster_columns = inRaster->params().ncols_;  
+  
+  /* Guessing channel bounds */
+  
+  double in_channel_min_level = 0;
+  double in_channel_max_level = 0;
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeGetRasterMinMaxBounds(
+    inRaster, in_channel, in_channel_min_level,
+    in_channel_max_level ), 
+    "Unable to get raster input channel level bounds" );  
+
+  double out_channel_min_level = 0;
+  double out_channel_max_level = 0;
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeGetRasterMinMaxBounds(
+    outRaster, out_channel, out_channel_min_level,
+    out_channel_max_level ), 
+    "Unable to get raster output channel level bounds" );
+    
+  /* Guessing dummy use */
+  
+  bool inRaster_uses_dummy = inRaster->params().useDummy_;
+  double inRaster_dummy = 0;
+  if( inRaster_uses_dummy ) {
+    inRaster_dummy = inRaster->params().dummy_[ in_channel ];
+  }
+  
+  bool outRaster_uses_dummy = outRaster->params().useDummy_;
+  double outRaster_dummy = 0;
+  if( outRaster_uses_dummy ) {
+    outRaster_dummy = outRaster->params().dummy_[ out_channel ];
+  }
+  
+  /* Level remapping */
+  
+  if( normalize_output ) {
+    /* Guessing normalization factors */
+  
+    double norm_min_level = DBL_MAX;
+    double norm_max_level = -1.0 * norm_min_level;
+    double norm_factor = 0;
+    double norm_off = 0;
+    
+    double current_level = 0;
+    
+    TePDIMatrix< double > mapped_matrix;
+    TEAGN_TRUE_OR_THROW( mapped_matrix.Reset( in_raster_lines, 
+      in_raster_columns, TePDIMatrix< double >::AutoMemPol ),
+      "Mapped levels matrix reset error" );
+    
+    StartProgInt( "Guessing normalization factors...", in_raster_lines );
+    
+    int line = 0;
+    int column = 0;
+      
+    for( line = 0 ; line < in_raster_lines ; ++line ) {
+      TEAGN_FALSE_OR_RETURN( UpdateProgInt( line ), "Canceled by the user" );
+    
+      for( column = 0 ; column < in_raster_columns ; ++column ) {
+        if( ! inRasterNPtr->getElement( column, line, current_level, 
+          in_channel ) ) {
+          
+          TEAGN_TRUE_OR_RETURN( inRaster_uses_dummy, "Raster read error" );
+          
+          current_level = inRaster_dummy;
+        }
+        
+        current_level = remapp_func( current_level, gain, offset ); 
+          
+        mapped_matrix( line, column ) = current_level;
+          
+        if( current_level < norm_min_level ) {
+          norm_min_level = current_level;
+        } 
+        if( current_level > norm_max_level ) {
+          norm_max_level = current_level;
+        }                  
+      }
+    }
+       
+    StopProgInt();
+    
+    norm_factor = ( out_channel_max_level - out_channel_min_level ) /
+      ( norm_max_level - norm_min_level );
+    norm_off = out_channel_min_level - norm_min_level;
+    
+    /* Output Level remapping */
+    
+    double output_level = 0;
+    double matrix_level = 0;
+    
+    StartProgInt( "Remapping Levels...", in_raster_lines );
+  
+    for( line = 0 ; line < in_raster_lines ; ++line ) {
+      TEAGN_FALSE_OR_RETURN( UpdateProgInt( line ), "Canceled by the user" );
+    
+      for( column = 0 ; column < in_raster_columns ; ++column ) {
+        matrix_level = mapped_matrix( line, column );
+        output_level = ( matrix_level + norm_off ) * norm_factor;
+        
+        TEAGN_TRUE_OR_RETURN( outRasterNPtr->setElement( column, line,
+          output_level, out_channel ),
+          "Level remmaping error at " + Te2String( line ) +
+          "," + Te2String( column ) );            
+      }
+    }
+    
+    StopProgInt();
+  } else {
+    /* Level remapping */
+  
+    double current_level;
+    double output_level;
+    
+    StartProgInt( "Remapping Levels...", in_raster_lines );
+  
+    int line = 0;
+    int column = 0;
+    for( line = 0 ; line < in_raster_lines ; ++line ) {
+      TEAGN_FALSE_OR_RETURN( UpdateProgInt( line ), "Canceled by the user" );
+    
+      for( column = 0 ; column < in_raster_columns ; ++column ) {
+        if( inRasterNPtr->getElement( column, line, current_level,
+            in_channel ) ) {
+  
+          /* Finding mapped level by using the level remapping function */
+  
+          output_level = remapp_func( current_level, gain, offset );
+  
+          /* Level range filtering */
+          
+          if( output_level < out_channel_min_level ) {
+            output_level = out_channel_min_level;
+          } else if( output_level > out_channel_max_level ) {
+            output_level = out_channel_max_level;
+          }
+  
+          TEAGN_TRUE_OR_RETURN( outRasterNPtr->setElement( column, line,
+            output_level, out_channel ),
+            "Level remmaping error at " + Te2String( line ) +
+            "," + Te2String( column ) );
+        } else {
+          TEAGN_TRUE_OR_RETURN( inRaster_uses_dummy, "Raster read error" );
+            
+          TEAGN_TRUE_OR_RETURN( outRasterNPtr->setElement( column, line,
+            outRaster_dummy, out_channel ),
+            "Level remmaping error at " + Te2String( line ) +
+            "," + Te2String( column ) );          
+        }
+      }
+    }
+    
+    StopProgInt();
+  }
+  
+  return true;
+}
+
+
+bool TePDILevelRemap::RemapLevels(
+  TePDITypes::TePDIRasterPtrType& inRaster1,
+  TePDITypes::TePDIRasterPtrType& inRaster2,
+  remap_func_4_ptr_type remapp_func,
+  int in_channel1,
+  int in_channel2,
+  int out_channel,
+  double gain,
+  double offset,
+  bool normalize_output,
+  TePDITypes::TePDIRasterPtrType& outRaster )
+{
+  TEAGN_TRUE_OR_THROW( inRaster1.isActive(),
+    "inRaster1 inactive" );
+  TEAGN_TRUE_OR_THROW( inRaster2.isActive(),
+    "inRaster2 inactive" );
+  TEAGN_TRUE_OR_THROW( outRaster.isActive(),
+    "outRaster inactive" );
+  TEAGN_TRUE_OR_THROW( 
+    ( inRaster1->params().status_ != TeRasterParams::TeNotReady ),
+    "inRaster1 not ready" );
+  TEAGN_TRUE_OR_THROW( 
+    ( inRaster2->params().status_ != TeRasterParams::TeNotReady ),
+    "inRaster2 not ready" );
+  TEAGN_TRUE_OR_THROW( 
+    ( outRaster->params().status_ != TeRasterParams::TeNotReady ),
+    "outRaster not ready" );
+  TEAGN_CHECK_EQUAL( inRaster1->params().nlines_,
+    outRaster->params().nlines_,
+    "Lines number mismatch between input1 and output image" );
+  TEAGN_CHECK_EQUAL( inRaster1->params().ncols_,
+    outRaster->params().ncols_,
+    "Columns number mismatch between input1 and output image" );
+  TEAGN_CHECK_EQUAL( inRaster2->params().nlines_,
+    outRaster->params().nlines_,
+    "Lines number mismatch between input2 and output image" );
+  TEAGN_CHECK_EQUAL( inRaster2->params().ncols_,
+    outRaster->params().ncols_,
+    "Columns number mismatch between input2 and output image" );
+  TEAGN_TRUE_OR_THROW( in_channel1 < inRaster1->nBands(), "Invalid input1 band" );
+  TEAGN_TRUE_OR_THROW( in_channel2 < inRaster2->nBands(), "Invalid input2 band" );
+  TEAGN_TRUE_OR_THROW( out_channel < outRaster->nBands(), "Invalid output band" );
+  
+  if( normalize_output ) {
+    TEAGN_TRUE_OR_THROW( 
+      ( outRaster->params().dataType_[ out_channel ] != TeDOUBLE ),
+      "Cannot apply normalization for TeDOUBLE pixel type output bands" );
+  }
+  
+  TeRaster* inRaster1NPtr = inRaster1.nakedPointer();
+  TeRaster* inRaster2NPtr = inRaster2.nakedPointer();
+  TeRaster* outRasterNPtr = outRaster.nakedPointer();
+  const int in_raster_lines = inRaster1->params().nlines_;
+  const int in_raster_columns = inRaster1->params().ncols_;    
+  
+  /* Guessing dummy use */
+  
+  bool inRaster1_uses_dummy = inRaster1->params().useDummy_;
+  bool inRaster2_uses_dummy = inRaster2->params().useDummy_;
+  bool outRaster_uses_dummy = outRaster->params().useDummy_;
+  double outRaster_dummy = 0;
+  if( outRaster_uses_dummy ) {
+    outRaster_dummy = outRaster->params().dummy_[ out_channel ];
+  }   
+  
+  /* Guessing channel bounds */
+  
+  double in_channel1_min_level = 0;
+  double in_channel1_max_level = 0;
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeGetRasterMinMaxBounds(
+    inRaster1, in_channel1, in_channel1_min_level,
+    in_channel1_max_level ), 
+    "Unable to get raster1 input channel level bounds" );  
+    
+  double in_channel2_min_level = 0;
+  double in_channel2_max_level = 0;
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeGetRasterMinMaxBounds(
+    inRaster2, in_channel2, in_channel2_min_level,
+    in_channel2_max_level ), 
+    "Unable to get raster2 input channel level bounds" );  
+
+  double out_channel_min_level = 0;
+  double out_channel_max_level = 0;
+
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeGetRasterMinMaxBounds(
+    outRaster, out_channel, out_channel_min_level,
+    out_channel_max_level ), 
+    "Unable to get raster output channel level bounds" );
+    
+  /* Level remapping */
+    
+  if( normalize_output ) {
+    /* Guessing normalization factors */
+    
+    double norm_factor = 0;
+    double norm_off = 0;
+    
+    TePDIMatrix< double > mapped_matrix;
+    TEAGN_TRUE_OR_THROW( mapped_matrix.Reset( in_raster_lines, 
+      in_raster_columns, TePDIMatrix< double >::AutoMemPol ),
+      "Mapped levels matrix reset error" );    
+  
+    StartProgInt( "Guessing normalization factors...", in_raster_lines );
+  
+    double norm_min_level = DBL_MAX;
+    double norm_max_level = -1.0 * norm_min_level;
+    int line = 0;
+    int column = 0;
+    double value1 = 0;
+    double value2= 0;
+    bool got_element1 = false;
+    bool got_element2 = false;
+    double mapped_level = 0;
+    
+    for( line = 0 ; line < in_raster_lines ; ++line ) {
+      TEAGN_FALSE_OR_RETURN( UpdateProgInt( line ), "Canceled by the user" );
+  
+      for( column = 0 ; column < in_raster_columns ; ++column ) {
+        got_element1 = inRaster1NPtr->getElement( column, line, value1, 
+          in_channel1 );
+        got_element2 = inRaster2NPtr->getElement( column, line, value2, 
+          in_channel2 );
+          
+        if( got_element1 && got_element2 ) {
+          mapped_level = remapp_func( value1, value2 , gain, offset );    
+        
+          mapped_matrix( line, column ) = mapped_level;
+            
+          if( mapped_level < norm_min_level ) {
+            norm_min_level = mapped_level;
+          } 
+          if( mapped_level > norm_max_level ) {
+            norm_max_level = mapped_level;
+          }
+        } else {
+          if( got_element1 ) {
+            TEAGN_TRUE_OR_RETURN( inRaster2_uses_dummy, 
+              "Raster2 read error" );
+          } else {
+            TEAGN_TRUE_OR_RETURN( inRaster1_uses_dummy, 
+              "Raster1 read error" );
+          }        
+        
+          mapped_matrix( line, column ) = outRaster_dummy;
+        }
+      }
+    }
+     
+    StopProgInt();
+    
+    norm_factor = ( out_channel_max_level - out_channel_min_level ) /
+      ( norm_max_level - norm_min_level );
+    norm_off = out_channel_min_level - norm_min_level;
+    
+    /* Remapping levels */
+    
+    double output_level = 0;
+    
+    StartProgInt( "Remapping Levels...", in_raster_lines );
+    
+    for( line = 0 ; line < in_raster_lines ; ++line ) {
+      TEAGN_FALSE_OR_RETURN( UpdateProgInt( line ), "Canceled by the user" );
+    
+      for( column = 0 ; column < in_raster_columns ; ++column ) {
+        output_level = mapped_matrix( line, column );
+              
+        output_level = ( output_level + norm_off ) * norm_factor;
+        
+        TEAGN_TRUE_OR_RETURN( outRasterNPtr->setElement( column, line,
+          output_level, out_channel ),
+          "Level remmaping error at " + Te2String( line ) +
+          "," + Te2String( column ) );        
+      }  
+    }
+  } else {
+    int line = 0;
+    int column = 0;  
+    double current_level1 = 0;
+    double current_level2 = 0;
+    double output_level = 0;
+    bool got_element1 = false;
+    bool got_element2 = false;
+    
+    StartProgInt( "Remapping Levels...", in_raster_lines );
+  
+    for( line = 0 ; line < in_raster_lines ; ++line ) {
+      TEAGN_FALSE_OR_RETURN( UpdateProgInt( line ), "Canceled by the user" );
+    
+      for( column = 0 ; column < in_raster_columns ; ++column ) {
+        got_element1 = inRaster1NPtr->getElement( column, line, 
+          current_level1, in_channel1 );
+        got_element2 = inRaster2NPtr->getElement( column, line, 
+          current_level2, in_channel2 );
+              
+        if( got_element1 && got_element2 ) {
+  
+          /* Finding mapped level by using the level remapping function */
+  
+          output_level = remapp_func( current_level1, current_level2 , gain, 
+            offset );
+  
+          /* Level range filtering */
+          
+          if( output_level < out_channel_min_level ) {
+            output_level = out_channel_min_level;
+          } else if( output_level > out_channel_max_level ) {
+            output_level = out_channel_max_level;
+          }
+
+          TEAGN_TRUE_OR_RETURN( outRasterNPtr->setElement( column, line,
+            output_level, out_channel ),
+            "Level remmaping error at " + Te2String( line ) +
+            "," + Te2String( column ) );
+        } else {
+          if( got_element1 ) {
+            TEAGN_TRUE_OR_RETURN( inRaster2_uses_dummy, 
+              "Raster2 read error" );
+          } else {
+            TEAGN_TRUE_OR_RETURN( inRaster1_uses_dummy, 
+              "Raster1 read error" );
+          }
+            
+          TEAGN_TRUE_OR_RETURN( outRaster->setElement( column, line,
+            outRaster_dummy, out_channel ),
+            "Level remmaping error at " + Te2String( line ) +
+            "," + Te2String( column ) );
+        }
+      }  
+    }
+  }
+  
+  return true;
+}
+
+
+void TePDILevelRemap::BuildHistograms(
+  TePDITypes::TePDIRasterPtrType& inRaster,
+  unsigned int histo_levels,
+  std::vector< int >& channels,
+  bool force )
+{
+  TEAGN_TRUE_OR_THROW( inRaster.isActive(),
+    "inRaster inactive" );
+  TEAGN_TRUE_OR_THROW( inRaster->params().status_ != TeRasterParams::TeNotReady,
+    "inRaster not ready" );
+
+  std::pair< TeRaster*, unsigned int  > mapkey;
+  mapkey.first = inRaster.nakedPointer();
+
+  for( unsigned int channels_index = 0 ; channels_index < channels.size() ;
+       ++channels_index ) {
+
+    TEAGN_TRUE_OR_THROW( channels[ channels_index ] < inRaster->nBands(),
+      "Trying to creat histogram from an invalid band" );
+
+    mapkey.second = channels_index;
+
+    if( ( histo_cache_.find( mapkey ) ==  histo_cache_.end() ) || force ) {
+
+      TePDIHistogram::pointer temp_hist( new TePDIHistogram );
+
+      TEAGN_TRUE_OR_THROW( temp_hist->reset( inRaster,
+        channels[ channels_index ], histo_levels, false,
+        TeBoxPixelIn ),
+        "Histogram Generation Error" );
+
+      histo_cache_[ mapkey ] = temp_hist;
+    }
+  }
+}
+
+
+TePDIHistogram::pointer TePDILevelRemap::GetHistRef(
+  TePDITypes::TePDIRasterPtrType& inRaster,
+  unsigned int band )
+{
+  std::pair< TeRaster*, unsigned int  > mapkey;
+  mapkey.first = inRaster.nakedPointer();
+  mapkey.second = band;
+
+  TEAGN_TRUE_OR_THROW(
+    ( histo_cache_.find( mapkey ) != histo_cache_.end() ),
+    "Histogram not stored inside cache" );
+
+  return histo_cache_[ mapkey ];
+}
+
+
diff --git a/src/terralib/image_processing/TePDILevelRemap.hpp b/src/terralib/image_processing/TePDILevelRemap.hpp
new file mode 100755
index 0000000..f96fc03
--- /dev/null
+++ b/src/terralib/image_processing/TePDILevelRemap.hpp
@@ -0,0 +1,183 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDILEVELREMAP_HPP
+  #define TEPDILEVELREMAP_HPP
+
+  #include "TePDIAlgorithm.hpp"
+  #include "TePDIHistogram.hpp"
+  #include "TePDIParameters.hpp"
+  #include <TeSharedPtr.h>
+  #include "TePDITypes.hpp"
+
+  /**
+   * @brief This is the base class for level remapping algorithms.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup TePDIGeneralAlgoGroup
+   */
+  class PDI_DLL TePDILevelRemap : public TePDIAlgorithm {
+    public :
+      /** @typedef Type definition for a instance pointer */
+      typedef TeSharedPtr< TePDILevelRemap > pointer;
+      /** @typedef Type definition for a const instance pointer */
+      typedef const TeSharedPtr< TePDILevelRemap > const_pointer;
+
+      /**
+       * @brief Default Destructor
+       */
+      virtual ~TePDILevelRemap();
+
+    protected :
+      /**
+       * @brief A level remap function pointer ( 3 arguments ).
+       *
+       * @param double Level to be remapped.
+       * @param double Gain.
+       * @param double Offset.
+       * @return The remapped level.
+       */
+      typedef double (*remap_func_3_ptr_type)( double, double, double );
+
+      /**
+       * @brief A level remap function pointer ( 4 arguments ).
+       *
+       * @param double Input Level 1 ( from image 1 ) to be remapped.
+       * @param double Input Level 2 ( from image 2 ) to be remapped.
+       * @param double Gain.
+       * @param double Offset.
+       * @return The remapped level.
+       */
+      typedef double (*remap_func_4_ptr_type)( double, double, double,
+        double );
+
+      /**
+       * @brief A cache of level ordered histograms to avoid rebuilding
+       * histograms all the times.
+       *
+       * @param TeRaster A raster naked pointer reference.
+       * @param unsigned int Raster band.
+       * @param TePDIHistogram::pointer A Histogram shared pointer reference.
+       */
+      std::map< std::pair< TeRaster*, unsigned int  >,
+                TePDIHistogram::pointer > histo_cache_;
+
+      /**
+       * @brief Default Constructor.
+       *
+       */
+      TePDILevelRemap();
+
+      /**
+       * @brief Reset the internal state to the initial state.
+       *
+       * @param params The new parameters referente at initial state.
+       */
+      virtual void ResetState( const TePDIParameters& params );
+
+      /**
+       * @brief Do level remapping from one raster to another.
+       *
+       * @param inRaster The input Raster.
+       * @param outRaster The Output Raster.
+       * @param remapp_func The level remapping function pointer.
+       * @param in_channel in_raster channel to remap.
+       * @param out_channel out_raster channel to write on.
+       * @param gain Level Gain.
+       * @param offset Level Offset.
+       * @param normalize_output Do output normalization following the output
+       * raster channel allowed values range.
+       * @return true if ok, false on errors.
+       */
+      bool RemapLevels(
+        TePDITypes::TePDIRasterPtrType& inRaster,
+        remap_func_3_ptr_type remapp_func,
+        int in_channel,
+        int out_channel,
+        double gain,
+        double offset,
+        bool normalize_output,
+        TePDITypes::TePDIRasterPtrType& outRaster );
+
+      /**
+       * @brief Do level remapping from two input rasters to another.
+       *
+       * @param inRaster1 The input Raster 1.
+       * @param inRaster2 The input Raster 2.
+       * @param outRaster The Output Raster.
+       * @param remapp_func The level remapping function pointer.
+       * @param in_channel1 in_raster1 channel to remap.
+       * @param in_channel2 in_raster2 channel to remap.
+       * @param out_channel out_raster channel to write on.
+       * @param gain Level Gain.
+       * @param offset Level Offset.
+       * @param normalize_output Do output normalization following the output
+       * raster channel allowed values range
+       * @return true if ok, false on errors.
+       */
+      bool RemapLevels(
+        TePDITypes::TePDIRasterPtrType& inRaster1,
+        TePDITypes::TePDIRasterPtrType& inRaster2,
+        remap_func_4_ptr_type remapp_func,
+        int in_channel1,
+        int in_channel2,
+        int out_channel,
+        double gain,
+        double offset,
+        bool normalize_output,
+        TePDITypes::TePDIRasterPtrType& outRaster );
+
+      /**
+       * @brief Build level ordered histograms from the required raster channels.
+       *
+       * @note The result histograms will remain inside the protected
+       * object histo_cache_
+       *
+       * @param inRaster The input Raster.
+       * @param histo_levels Number of histogram interpolated levels.
+       * @param channels Channels to use for histogram generation.
+       * @param force Force histogram regeneratin even if already in cache.
+       */
+      void BuildHistograms(
+        TePDITypes::TePDIRasterPtrType& inRaster,
+        unsigned int histo_levels,
+        std::vector< int >& channels,
+        bool force = false );
+
+      /**
+       * @brief Returns the histogram reference stored inside the histogram cache.
+       *
+       * @note The result histograms will remain inside the protected
+       * object histo_cache_
+       *
+       * @param inRaster The input Raster.
+       * @param band Band number.
+       * @return The histogram reference.
+       */
+      TePDIHistogram::pointer GetHistRef(
+        TePDITypes::TePDIRasterPtrType& inRaster,
+        unsigned int band );
+
+  };
+
+#endif //TEPDILEVELREMAP_HPP
diff --git a/src/terralib/image_processing/TePDILinearFilter.cpp b/src/terralib/image_processing/TePDILinearFilter.cpp
new file mode 100755
index 0000000..d46f4b3
--- /dev/null
+++ b/src/terralib/image_processing/TePDILinearFilter.cpp
@@ -0,0 +1,373 @@
+#include "TePDILinearFilter.hpp"
+
+#include <TeAgnostic.h>
+#include "TePDIUtils.hpp"
+
+#include <TeUtils.h>
+
+#include "math.h"
+
+TePDILinearFilter::TePDILinearFilter()
+{
+}
+
+
+TePDILinearFilter::~TePDILinearFilter()
+{
+}
+
+
+bool TePDILinearFilter::CheckParameters( 
+  const TePDIParameters& parameters ) const
+{
+  /* Checking for general required parameters */
+
+  TePDITypes::TePDIRasterPtrType inRaster;
+  if( ! parameters.GetParameter( "input_image", inRaster ) ) {
+
+    TEAGN_LOGERR( "Missing parameter: input_image" );
+    return false;
+  }
+  if( ! inRaster.isActive() ) {
+
+    TEAGN_LOGERR( "Invalid parameter: input_image inactive" );
+    return false;
+  }
+  if( inRaster->params().status_ == TeRasterParams::TeNotReady ) {
+
+    TEAGN_LOGERR( "Invalid parameter: input_image not ready" );
+    return false;
+  }
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  if( ! parameters.GetParameter( "output_image", outRaster ) ) {
+
+    TEAGN_LOGERR( "Missing parameter: output_image" );
+    return false;
+  }
+  if( ! outRaster.isActive() ) {
+
+    TEAGN_LOGERR( "Invalid parameter: output_image inactive" );
+    return false;
+  }
+  if( inRaster->params().status_ == TeRasterParams::TeReadyToWrite ) {
+
+    TEAGN_LOGERR( "Invalid parameter: output_image not ready" );
+    return false;
+  }
+
+  /* channels parameter checking */
+
+  std::vector< int > channels;
+  if( ! parameters.GetParameter( "channels", channels ) ) {
+
+    TEAGN_LOGERR( "Missing parameter: channels" );
+    return false;
+  }
+  for( unsigned int index = 0 ; index < channels.size() ; ++index ) {
+    if( channels[ index ] >= inRaster->nBands() ) {
+      TEAGN_LOGERR( "Invalid parameter: channels" );
+      return false;
+    }
+  }
+
+  /* Filter mask checking */
+  TePDIFilterMask::pointer mask;
+
+  if( ! parameters.GetParameter( "filter_mask", mask ) ) {
+
+    TEAGN_LOGERR( "Missing parameter: filter_mask" );
+    return false;
+  }
+  if( ! mask.isActive() ) {
+
+    TEAGN_LOGERR( "Invalid parameter: filter_mask inactive" );
+    return false;
+  }
+  if( mask->columns() < 3 ) {
+    TEAGN_WATCH( mask->columns() );
+    TEAGN_LOGERR( "Invalid parameter: filter_mask with invalid colunms number" );
+    return false;
+  }
+  if( mask->lines() < 3 ) {
+    TEAGN_WATCH( mask->lines() );
+    TEAGN_LOGERR( "Invalid parameter: filter_mask with invalid lines number" );
+    return false;
+  }
+  if( ( (int)mask->lines() > inRaster->params().nlines_ ) ||
+      ( (int)mask->columns() > inRaster->params().ncols_ ) ){
+    TEAGN_LOGERR( "Invalid parameter: filter_mask do not fit inside input image" );
+    return false;
+  }
+
+  /* Checking for number of iterations */
+  int iterations = 0;
+  if( ! parameters.GetParameter( "iterations", iterations ) ) {
+
+    TEAGN_LOGERR( "Missing parameter: iterations" );
+    return false;
+  }
+  TEAGN_TRUE_OR_RETURN( iterations > 0, "Invalid iterations number" );
+
+  /* Checking photometric interpretation */
+  
+  for( unsigned int channels_index = 0 ; channels_index < channels.size() ; 
+    ++channels_index ) {
+    
+    TEAGN_TRUE_OR_RETURN( ( 
+      ( inRaster->params().photometric_[ channels[ channels_index ] ] == 
+        TeRasterParams::TeRGB ) ||
+      ( inRaster->params().photometric_[ channels[ channels_index ] ] == 
+        TeRasterParams::TeMultiBand ) ),
+    "Invalid parameter - input_image "
+    "(invalid photometric interpretation)" );
+  }  
+  
+  return true;
+}
+
+
+bool TePDILinearFilter::RunImplementation()
+{
+  TePDITypes::TePDIRasterPtrType inRaster;
+  params_.GetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  params_.GetParameter( "output_image", outRaster );
+
+  std::vector< int > channels;
+  params_.GetParameter( "channels", channels );
+
+  TePDIFilterMask::pointer mask;
+  params_.GetParameter( "filter_mask", mask );
+
+  int iterations = 0;
+  params_.GetParameter( "iterations", iterations );
+  
+  bool inRaster_uses_dummy = inRaster->params().useDummy_;
+
+  /* checking for the optional parameter level offset */
+
+  double level_offset;
+  if( params_.CheckParameter< double >( "level_offset" ) ) {
+    
+    params_.GetParameter( "level_offset", level_offset );
+  } else {
+    level_offset = 0;
+  }
+
+  /* Resetting the output raster */
+  
+  TeRasterParams outRaster_params = outRaster->params();
+  
+  outRaster_params.nBands( channels.size() );
+  if( inRaster->projection() != 0 ) {
+    outRaster_params.projection( inRaster->projection() );
+  }
+  outRaster_params.boundingBoxLinesColumns( 
+    inRaster->params().boundingBox().x1(), 
+    inRaster->params().boundingBox().y1(), 
+    inRaster->params().boundingBox().x2(), 
+    inRaster->params().boundingBox().y2(), 
+    inRaster->params().nlines_,
+    inRaster->params().ncols_ );
+  if( inRaster->params().useDummy_ ) {
+    outRaster_params.setDummy( inRaster->params().dummy_[ 0 ], -1 );
+  } else {
+    outRaster_params.setDummy( 0, -1 );
+  }
+  outRaster_params.setPhotometric( TeRasterParams::TeMultiBand );
+  
+  TEAGN_TRUE_OR_RETURN( outRaster->init( outRaster_params ),
+    "Output raster reset error" );       
+
+  /* Creating the temporary rasters with one band each */
+
+  TePDITypes::TePDIRasterPtrType aux_raster1;
+  TePDITypes::TePDIRasterPtrType aux_raster2;
+  {
+    TeRasterParams aux_raster_params = inRaster->params();
+    aux_raster_params.nBands( channels.size() );
+    
+    if( iterations > 1 ) {
+      TEAGN_TRUE_OR_RETURN( TePDIUtils::TeAllocRAMRaster( aux_raster1, 
+        aux_raster_params, TePDIUtils::TePDIUtilsAutoMemPol ), 
+        "Unable to create auxiliary raster 1" );
+    }
+  
+    if( iterations > 2 ) {
+      TEAGN_TRUE_OR_RETURN( TePDIUtils::TeAllocRAMRaster( aux_raster2, 
+        aux_raster_params, TePDIUtils::TePDIUtilsAutoMemPol ), 
+        "Unable to create auxiliary raster 2" );      
+    }        
+  }
+  
+  /* Updating the global temporary representation of mask weights */
+
+  reset_maskmatrix( mask );
+
+  /* Setting the convolution buffer initial state */
+
+  unsigned int raster_lines = (unsigned int)outRaster->params().nlines_;
+  unsigned int raster_columns = (unsigned int)outRaster->params().ncols_;
+
+  reset_conv_buf( temp_maskmatrix_lines_, raster_columns );
+
+  /* Convolution Loop */
+
+  double output_level;
+
+  unsigned int mask_middle_off_lines =
+    (unsigned int) floor( ((double)temp_maskmatrix_lines_) / 2. );
+  unsigned int mask_middle_off_columns =
+    (unsigned int) floor( ((double)temp_maskmatrix_columns_) / 2. );
+
+  unsigned int conv_column_bound = raster_columns - temp_maskmatrix_columns_ + 1;
+  unsigned int conv_line_bound = raster_lines - temp_maskmatrix_lines_ + 1;
+
+  unsigned int mask_line;  
+  unsigned int mask_column;
+  unsigned int raster_line;
+  unsigned int conv_buf_column;
+
+  double out_channel_min_level = 0;
+  double out_channel_max_level = 0;
+  
+  double dummy_value = 0;
+
+  TePDITypes::TePDIRasterPtrType source_raster;
+  TePDITypes::TePDIRasterPtrType target_raster;
+  
+  TePDIPIManager progress( "Linear filter", channels.size() * iterations *
+     conv_line_bound, progress_enabled_ );  
+     
+  unsigned int current_input_channel =0;
+  unsigned int curr_out_channel = 0;     
+
+  for( int iteration = 0 ; (int)iteration < iterations ; ++iteration ) {
+    /* Defining the source and target rasters */
+      
+    if( iteration == 0 ) {
+      /* The first iteration */
+      
+      source_raster = inRaster;
+      
+      if( iterations > 1 ) {
+        target_raster = aux_raster1;
+      } else {
+        target_raster = outRaster;
+      }
+    } else if ( iteration == ( iterations - 1 ) ) {
+      /* The last iteration */
+      
+      source_raster = target_raster;        
+      target_raster = outRaster;
+    } else {
+      /* The intermediary iteration */
+      
+      if( iteration == 1 ) {
+        source_raster = target_raster;
+        target_raster = aux_raster2;
+      } else {
+        TePDITypes::TePDIRasterPtrType swap_ptr = source_raster;
+        source_raster = target_raster;
+        target_raster = swap_ptr;
+      }
+    }
+    
+    for( unsigned int channels_index = 0 ; channels_index < channels.size() ;
+      ++channels_index ) {
+       
+      /* Defining the source channel and target channel */
+        
+      if( iteration == 0 ) {
+        /* The first iteration */
+        
+        current_input_channel = channels[ channels_index ];
+        curr_out_channel = channels_index;
+      } else if ( iteration == ( iterations - 1 ) ) {
+        /* The last iteration */
+        
+        current_input_channel = channels_index;
+        curr_out_channel = channels_index;
+      } else {
+        /* The intermediary iteration */
+
+        current_input_channel = channels_index;
+        curr_out_channel = channels_index;
+      }        
+          
+      if( inRaster_uses_dummy ) {
+        dummy_value = inRaster->params().dummy_[ current_input_channel ];
+      }
+
+      TEAGN_TRUE_OR_RETURN( TePDIUtils::TeGetRasterMinMaxBounds(
+        outRaster, channels_index, out_channel_min_level,
+        out_channel_max_level ), "Unable to get raster channel level bounds" ); 
+       
+
+      /* Fills the convolution buffer with the first "mask_lines" from the 
+         raster */
+
+      for( unsigned int line = 0 ; line < ( temp_maskmatrix_lines_ - 1 ); 
+        ++line ) {
+        
+        up_conv_buf( source_raster, line, current_input_channel );
+      }
+
+      /* raster convolution */
+
+      for( raster_line = 0 ; raster_line < conv_line_bound ; ++raster_line ) {
+        /* Getting one more line from the source raster and adding to buffer */
+        
+        TEAGN_FALSE_OR_RETURN( progress.Increment(),
+          "Canceled by the user" );
+          
+        up_conv_buf( source_raster, raster_line + temp_maskmatrix_lines_ - 1,
+          current_input_channel );
+
+        for( conv_buf_column = 0 ; conv_buf_column < conv_column_bound ;
+             ++conv_buf_column ) {
+
+          output_level = level_offset;
+
+          for( mask_line = 0; mask_line < temp_maskmatrix_lines_ ; ++mask_line ) {
+            for( mask_column = 0; mask_column < temp_maskmatrix_columns_ ;
+                 ++mask_column ) {
+              output_level += temp_maskmatrix_[ mask_line ][ mask_column ] *
+                conv_buf_[ mask_line ][ conv_buf_column + mask_column ];
+            }
+          }
+
+          /* Level range filtering */
+
+          if( output_level < out_channel_min_level ) {
+            output_level = out_channel_min_level;
+          } else if( output_level > out_channel_max_level ) {
+            output_level = out_channel_max_level;
+          }
+
+          TEAGN_TRUE_OR_RETURN( target_raster->setElement(
+            conv_buf_column + mask_middle_off_columns,
+            raster_line +  mask_middle_off_lines, output_level, 
+            curr_out_channel ),
+            "Pixel mapping error at line=" + 
+            Te2String( raster_line +  mask_middle_off_lines ) + " column=" +
+            Te2String( conv_buf_column + mask_middle_off_columns ) 
+            + " channel=" + Te2String( curr_out_channel ) +
+            " iteration=" + Te2String( iteration ) );
+        }
+      }
+    }
+  }
+
+  return true;
+}
+
+
+void TePDILinearFilter::ResetState( const TePDIParameters& params )
+{
+  TePDIBufferedFilter::ResetState( params );
+}
+
+
diff --git a/src/terralib/image_processing/TePDILinearFilter.hpp b/src/terralib/image_processing/TePDILinearFilter.hpp
new file mode 100755
index 0000000..f6c0f3c
--- /dev/null
+++ b/src/terralib/image_processing/TePDILinearFilter.hpp
@@ -0,0 +1,96 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDILINEARFILTER_HPP
+  #define TEPDILINEARFILTER_HPP
+
+  #include "TePDIBufferedFilter.hpp"
+  #include "TePDIParameters.hpp"
+  #include <TeSharedPtr.h>
+
+  /**
+   * @brief This is the class for image Linear filtering processing.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup TePDIFiltersGroup
+   *
+   * @note The general required parameters are:
+   *
+   * @param input_image (TePDITypes::TePDIRasterPtrType),
+   * @param output_image (TePDITypes::TePDIRasterPtrType),
+   * @param channels (std::vector<int>) - Band(s) to process.
+   * @param filter_mask (TePDIFilterMask::pointer) Filter mask,
+   * @param iterations (int) - Iterations number,
+   * @param level_offset (int - optional ) - Level offset to be applied after
+   * pixel value calcule.
+   */
+  class PDI_DLL TePDILinearFilter : public TePDIBufferedFilter{
+    public :
+      /** @typedef Type definition for a instance pointer */
+      typedef TeSharedPtr< TePDILinearFilter > pointer;
+      /** @typedef Type definition for a const instance pointer */
+      typedef const TeSharedPtr< TePDILinearFilter > const_pointer;
+
+      /**
+       * @brief Default Constructor.
+       *
+       */
+      TePDILinearFilter();
+
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDILinearFilter();
+
+      /**
+       * @brief Checks if the supplied parameters fits the requirements of each
+       * PDI algorithm implementation.
+       *
+       * @note Error log messages must be generated. No exceptions generated.
+       *
+       * @param parameters The parameters to be checked.
+       * @return true if the parameters are OK. false if not.
+       */
+      bool CheckParameters( const TePDIParameters& parameters ) const;
+
+    protected :
+      /**
+       * @brief Runs the current algorithm implementation.
+       *
+       * @return true if OK. false on error.
+       */
+      bool RunImplementation();
+
+      /**
+       * @brief Reset the internal state to the initial state.
+       *
+       * @param params The new parameters referente at initial state.
+       */
+      void ResetState( const TePDIParameters& params );
+  };
+  
+/** @example TePDILinearFilter_test.cpp
+ *    Shows how to use this class.
+ */    
+
+#endif //TEPDILINEARFILTER_HPP
diff --git a/src/terralib/image_processing/TePDILinearFilterFactory.cpp b/src/terralib/image_processing/TePDILinearFilterFactory.cpp
new file mode 100755
index 0000000..9b764af
--- /dev/null
+++ b/src/terralib/image_processing/TePDILinearFilterFactory.cpp
@@ -0,0 +1,25 @@
+ 
+#include "TePDILinearFilterFactory.hpp"
+#include "TePDILinearFilter.hpp"
+#include <TeAgnostic.h>
+
+TePDILinearFilterFactory::TePDILinearFilterFactory()
+: TePDIAlgorithmFactory( std::string( "TePDILinearFilter" ) )
+{
+};      
+
+TePDILinearFilterFactory::~TePDILinearFilterFactory()
+{
+};
+
+
+TePDIAlgorithm* TePDILinearFilterFactory::build ( const TePDIParameters& arg )
+{
+  TePDIAlgorithm* instance_ptr = new TePDILinearFilter();
+  
+  TEAGN_TRUE_OR_THROW( instance_ptr->Reset( arg ),
+    "Invalid parameters" );
+  
+  return instance_ptr;
+}
+
diff --git a/src/terralib/image_processing/TePDILinearFilterFactory.hpp b/src/terralib/image_processing/TePDILinearFilterFactory.hpp
new file mode 100755
index 0000000..72fc661
--- /dev/null
+++ b/src/terralib/image_processing/TePDILinearFilterFactory.hpp
@@ -0,0 +1,67 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDILINEARFILTERFACTORY_HPP
+  #define TEPDILINEARFILTERFACTORY_HPP
+
+  #include "TePDIAlgorithmFactory.hpp"
+  
+  /**
+   * @brief This is the class for linear filter factory.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIAlgorithmsFactories
+   */
+  class PDI_DLL TePDILinearFilterFactory : public TePDIAlgorithmFactory
+  {
+    public :
+     
+      /**
+       * @brief Default constructor
+       */
+      TePDILinearFilterFactory();      
+      
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDILinearFilterFactory();
+      
+    protected :  
+      /**
+       * @brief Implementation for the abstract TeFactory::build.
+       *
+       * @param arg A const reference to the parameters used by the
+       * algorithm.
+       * @return A pointer to the new generated algorithm instance.
+       */
+      TePDIAlgorithm* build( const TePDIParameters& arg );
+      
+  };
+
+  namespace
+  {  
+    static TePDILinearFilterFactory TePDILinearFilterFactory_instance;
+  };
+
+#endif
+
diff --git a/src/terralib/image_processing/TePDIMIMatching.cpp b/src/terralib/image_processing/TePDIMIMatching.cpp
new file mode 100644
index 0000000..25e0b87
--- /dev/null
+++ b/src/terralib/image_processing/TePDIMIMatching.cpp
@@ -0,0 +1,1238 @@
+#include "TePDIMIMatching.hpp"
+
+#include "TePDIUtils.hpp"
+#include "TePDIMatrix.hpp"
+#include <TeThreadFunctor.h>
+#include <TeMutex.h>
+#include <TeCoord2D.h>
+
+#include <math.h>
+#include <limits.h>
+
+
+TePDIMIMatching::TePDIMIMatching()
+{
+}
+
+
+TePDIMIMatching::~TePDIMIMatching()
+{
+}
+
+
+bool TePDIMIMatching::RunImplementation()
+{
+  /* Retriving Parameters */
+  
+  TePDITypes::TePDIRasterPtrType input_image1_ptr;
+  params_.GetParameter( "input_image1_ptr", input_image1_ptr );  
+  
+  unsigned int input_channel1 = 0;
+  params_.GetParameter( "input_channel1", input_channel1 );   
+  
+  TePDITypes::TePDIRasterPtrType input_image2_ptr;
+  params_.GetParameter( "input_image2_ptr", input_image2_ptr );  
+  
+  unsigned int input_channel2 = 0;
+  params_.GetParameter( "input_channel2", input_channel2 );   
+
+  TeSharedPtr< TeCoordPairVect > out_tie_points_ptr;
+  params_.GetParameter( "out_tie_points_ptr", out_tie_points_ptr );   
+  
+  TeBox input_box1;
+  if( params_.CheckParameter< TeBox >( "input_box1" ) ) {
+    params_.GetParameter( "input_box1", input_box1 );
+  } else {
+    TeBox input_box1_proj = input_image1_ptr->params().box();
+    
+    TePDIUtils::MapCoords2RasterIndexes( input_box1_proj, input_image1_ptr,
+      input_box1 );
+  }
+  
+  TeBox input_box2;
+  if( params_.CheckParameter< TeBox >( "input_box2" ) ) {
+    params_.GetParameter( "input_box2", input_box2 );
+  } else {
+    TeBox input_box2_proj = input_image2_ptr->params().box();
+    
+    TePDIUtils::MapCoords2RasterIndexes( input_box2_proj, input_image2_ptr,
+      input_box2 );
+  }  
+  
+  bool enable_multi_thread = false;
+  if( params_.CheckParameter< int >( "enable_multi_thread" ) ) {
+    enable_multi_thread = true;
+  }
+  
+  double pixel_x_relation = 1.0;
+  if( params_.CheckParameter< double >( "pixel_x_relation" ) ) {
+    params_.GetParameter( "pixel_x_relation", pixel_x_relation );
+  }
+  
+  double pixel_y_relation = 1.0;
+  if( params_.CheckParameter< double >( "pixel_y_relation" ) ) {
+    params_.GetParameter( "pixel_y_relation", pixel_y_relation );
+  }  
+  
+  unsigned int max_size_opt = 0;
+  if( params_.CheckParameter< unsigned int >( "max_size_opt" ) ) {
+    params_.GetParameter( "max_size_opt", max_size_opt );
+  }   
+  
+  /* Calculating the number of allowed threads - this process
+     not included into the count */
+     
+  unsigned int max_threads = 0;
+  std::vector< TeThreadFunctor::pointer > threads_vector;
+  
+  if( enable_multi_thread ) {
+    max_threads = TeGetPhysProcNumber() - 1;
+    
+    for( unsigned int index = 0 ; index < max_threads ; ++index ) {
+      TeThreadFunctor::pointer aux_thread_ptr( new TeThreadFunctor );
+    
+      threads_vector.push_back( aux_thread_ptr );
+    }
+  }
+  
+  /* Calculating the box postion related values */
+  
+  const unsigned int orig_box1_x_off = (unsigned int)input_box1.lowerLeft().x();
+  const unsigned int orig_box1_y_off = (unsigned int)input_box1.upperRight().y();
+  const unsigned int orig_box1_nlines = 1 + (unsigned int)ABS( input_box1.height() );
+  const unsigned int orig_box1_ncols = 1 + (unsigned int)ABS( input_box1.width() );
+  
+  const unsigned int orig_box2_x_off = (unsigned int)input_box2.lowerLeft().x();
+  const unsigned int orig_box2_y_off = (unsigned int)input_box2.upperRight().y();
+  const unsigned int orig_box2_nlines = 1 + (unsigned int)ABS( input_box2.height() );
+  const unsigned int orig_box2_ncols = 1 + (unsigned int)ABS( input_box2.width() );
+    
+  /* Calculating the rescale factors 
+     rescaled_image = original_image * rescale_factor */
+  
+  double img1_x_rescale_factor = 1.0;
+  double img1_y_rescale_factor = 1.0;
+  double img2_x_rescale_factor = 1.0;
+  double img2_y_rescale_factor = 1.0;
+  {
+    double mean_pixel_relation = ( pixel_x_relation + pixel_y_relation ) /
+      2.0;
+      
+    if( mean_pixel_relation > 1.0 ) {
+      /* The image 1 has poor resolution - bigger pixel resolution values -
+         and image 2 needs to be rescaled down */
+      
+      img2_x_rescale_factor = 1.0 / pixel_x_relation;
+      img2_y_rescale_factor = 1.0 / pixel_y_relation;
+    } else if( mean_pixel_relation < 1.0 ) {
+      /* The image 2 has poor resolution - bigger pixel resolution values
+        and image 1 needs to be rescaled down */
+      
+      img1_x_rescale_factor = pixel_x_relation;
+      img1_y_rescale_factor = pixel_y_relation;
+    }
+  } 
+  
+  if( max_size_opt )
+  {
+    double resc_box1_size = 
+      ( (double)orig_box1_nlines  ) * img1_y_rescale_factor *
+      ( (double)orig_box1_ncols ) * img1_x_rescale_factor;
+    double resc_box2_size = 
+      ( (double)orig_box2_nlines  ) * img2_y_rescale_factor *
+      ( (double)orig_box2_ncols ) * img2_x_rescale_factor;
+    double max_size_opt_double = (double)max_size_opt;
+    
+    if( ( resc_box1_size > max_size_opt_double ) || 
+      ( resc_box2_size > max_size_opt_double ) )
+    {
+      double opt_rescale_factor = 1.0;
+      
+      if( resc_box1_size > resc_box2_size )
+      {
+        opt_rescale_factor = sqrt( resc_box1_size / max_size_opt_double );
+      }
+      else
+      {
+        opt_rescale_factor = sqrt( resc_box2_size / max_size_opt_double );
+      }
+      
+      img1_x_rescale_factor *= opt_rescale_factor;
+      img1_y_rescale_factor *= opt_rescale_factor;
+      img2_x_rescale_factor *= opt_rescale_factor;
+      img2_y_rescale_factor *= opt_rescale_factor;
+    }
+  }
+  
+  /* Checking if the small matrix fits inside the bigger one */
+  
+  {
+    unsigned int resc_box1_nlines = (unsigned int) ceil( 
+      ( (double)orig_box1_nlines ) * img1_y_rescale_factor );
+    unsigned int resc_box1_ncols = (unsigned int) ceil( 
+      ( (double)orig_box1_ncols ) * img1_x_rescale_factor );     
+    unsigned int resc_box2_nlines = (unsigned int) ceil( 
+      ( (double)orig_box2_nlines ) * img2_y_rescale_factor );
+    unsigned int resc_box2_ncols = (unsigned int) ceil( 
+      ( (double)orig_box2_ncols ) * img2_x_rescale_factor );   
+        
+    const unsigned int m1size = resc_box1_nlines * 
+      resc_box1_ncols;
+    const unsigned int m2size = resc_box2_nlines * 
+      resc_box2_ncols;      
+      
+    if( m1size < m2size )
+    {
+      if( ( resc_box1_ncols > resc_box2_ncols ) ||
+        ( resc_box1_nlines > resc_box2_nlines ) )
+      {
+        return true;
+      }
+    } 
+    else
+    {
+      if( ( resc_box2_ncols > resc_box1_ncols ) ||
+        ( resc_box2_nlines > resc_box1_nlines ) )
+      {
+        return true;
+      }    
+    }
+  }  
+  
+  /* Loading images */
+  
+  TeMutex glb_mem_lock; //global memory lock
+  
+  ImgMatrixT img1_matrix;
+  ImgMatrixT img2_matrix;
+ 
+  {
+    TeThreadParameters tparams1;
+    tparams1.store( "input_image_ptr", input_image1_ptr );
+    tparams1.store( "img_matrix_ptr", &img1_matrix );
+    tparams1.store( "img_x_rescale_factor", img1_x_rescale_factor );
+    tparams1.store( "img_y_rescale_factor", img1_y_rescale_factor );
+    tparams1.store( "box_x_off", orig_box1_x_off );
+    tparams1.store( "box_y_off", orig_box1_y_off );
+    tparams1.store( "box_nlines", orig_box1_nlines );
+    tparams1.store( "box_ncols", orig_box1_ncols );
+    tparams1.store( "input_channel", input_channel1 );
+    tparams1.store( "progress_enabled", progress_enabled_ );
+    tparams1.store( "glb_mem_lock_ptr", &glb_mem_lock );
+    
+    TeThreadParameters tparams2;
+    tparams2.store( "input_image_ptr", input_image2_ptr );
+    tparams2.store( "img_matrix_ptr", &img2_matrix );
+    tparams2.store( "img_x_rescale_factor", img2_x_rescale_factor );
+    tparams2.store( "img_y_rescale_factor", img2_y_rescale_factor );
+    tparams2.store( "box_x_off", orig_box2_x_off );
+    tparams2.store( "box_y_off", orig_box2_y_off );
+    tparams2.store( "box_nlines", orig_box2_nlines );
+    tparams2.store( "box_ncols", orig_box2_ncols );
+    tparams2.store( "input_channel", input_channel2 );
+    tparams2.store( "progress_enabled", progress_enabled_ );
+    tparams2.store( "glb_mem_lock_ptr", &glb_mem_lock );
+  
+    if( max_threads > 0 ) {
+      threads_vector[ 0 ]->setStartFunctPtr( loadImage );
+      threads_vector[ 0 ]->setParameters( tparams1 );
+      threads_vector[ 0 ]->start();
+   
+      if( ! loadImage( tparams2 ) ) {
+        threads_vector[ 0 ]->waitToFinish();
+        
+        TEAGN_LOG_AND_RETURN( "Unable to load image 2" )
+      } else {
+        threads_vector[ 0 ]->waitToFinish();
+        
+        TEAGN_TRUE_OR_RETURN( threads_vector[ 0 ]->getReturnValue(),
+          "Unable to load image 1" )
+      }
+    } else {
+      TEAGN_TRUE_OR_RETURN( loadImage( tparams1 ),
+        "Error loading image 1" )
+      TEAGN_TRUE_OR_RETURN( loadImage( tparams2 ),
+        "Error loading image 2" )
+    }
+  }
+  
+/* remove */        
+//matrix2Tiff( img1_matrix, "img1_matrix.tif", 
+//  std::vector< TeCoord2D >() );
+//matrix2Tiff( img2_matrix, "img2_matrix.tif",
+//  std::vector< TeCoord2D >() );
+/* remove */  
+  
+  /* Correlating areas */
+  
+  out_tie_points_ptr->clear();
+  
+  {
+    /* Switching the big and small matrixes */
+    
+    const unsigned int m1size = img1_matrix.GetColumns() * 
+      img1_matrix.GetLines();
+    const unsigned int m2size = img2_matrix.GetColumns() * 
+      img2_matrix.GetLines();      
+    
+    ImgMatrixT* big_matrix_ptr = 0;
+    ImgMatrixT* small_matrix_ptr = 0;
+      
+    if( m1size < m2size )
+    {
+      big_matrix_ptr = &img2_matrix;
+      small_matrix_ptr = &img1_matrix;
+    } 
+    else
+    {
+      big_matrix_ptr = &img1_matrix;
+      small_matrix_ptr = &img2_matrix;
+    }
+    
+    ImgMatrixT& big_matrix = *big_matrix_ptr;
+    ImgMatrixT& small_matrix = *small_matrix_ptr;
+    
+    const unsigned int small_mtx_lines = small_matrix.GetLines();
+    const unsigned int small_mtx_cols = small_matrix.GetColumns();
+    const unsigned int big_mtx_lines = big_matrix.GetLines();
+    const unsigned int big_mtx_cols = big_matrix.GetColumns();    
+    const double elements_nmb = (double)( small_mtx_cols *
+      small_mtx_lines );    
+    
+    /* Generating small matrix histogram */
+    
+    std::vector< unsigned int > small_mtx_histo;
+    long int small_mtx_min = LONG_MAX;
+    long int small_mtx_max = (-1) * small_mtx_min;
+    unsigned int small_mtx_histo_size = 0;
+    {
+      unsigned int line = 0;
+      unsigned int col = 0;
+      double* small_matrix_line_ptr = 0;
+      long int elem = 0;
+      
+      for( ; line < small_mtx_lines ; ++line )
+      {
+        small_matrix_line_ptr = small_matrix[ line ];
+        
+        for( col = 0 ; col < small_mtx_cols ; ++col )
+        {
+          elem = (long int)small_matrix_line_ptr[ col ];
+          
+          if( elem > small_mtx_max )
+          {
+            small_mtx_max = elem;
+          }
+          
+          if( elem < small_mtx_min )
+          {
+            small_mtx_min = elem;
+          }
+          
+        }
+      }
+      
+      if( small_mtx_max >= small_mtx_min )
+      {
+        small_mtx_histo_size = (unsigned int)(
+          small_mtx_max - small_mtx_min + 1 );
+          
+        small_mtx_histo.resize( small_mtx_histo_size );
+        
+        for( line = 0 ; line < small_mtx_lines ; ++line )
+        {
+          small_matrix_line_ptr = small_matrix[ line ];
+          
+          for( col = 0 ; col < small_mtx_cols ; ++col )
+          {
+            elem = (long int)small_matrix_line_ptr[ col ];
+            elem -= small_mtx_min;
+            
+            small_mtx_histo[ elem ] += 1;
+          }
+        }
+      }      
+    }
+    
+    /* Calc the small matrix entropy */
+    
+    double small_mtx_entropy = 0.0;
+    const double log2 = log( (double)2.0 );
+    
+    {
+      double prob = 0.0;
+      const unsigned int small_mtx_histo_size = (unsigned int)
+        small_mtx_histo.size();
+
+      for( unsigned int hidx = 0 ; hidx < small_mtx_histo_size ; ++hidx )
+      {
+        prob = ( (double)(small_mtx_histo[ hidx ] ) ) / elements_nmb;
+        
+        if( prob > 0.0 ) {
+          small_mtx_entropy += ( prob * ( log( prob ) / log2 ) );
+        }        
+      }
+      
+      small_mtx_entropy *= (-1.0);
+    }
+
+    /* Pre-initiating big matrix histogram */
+    
+    std::vector< unsigned int > big_mtx_histo;
+    long int big_mtx_min = LONG_MAX;
+    long int big_mtx_max = (-1) * big_mtx_min;
+    unsigned int big_mtx_histo_size = 0;
+    {
+      unsigned int line = 0;
+      unsigned int col = 0;
+      double* big_matrix_line_ptr = 0;
+      long int elem = 0;
+      
+      for( ; line < big_mtx_lines ; ++line )
+      {
+        big_matrix_line_ptr = big_matrix[ line ];
+        
+        for( col = 0 ; col < big_mtx_cols ; ++col )
+        {
+          elem = (long int)big_matrix_line_ptr[ col ];
+          
+          if( elem > big_mtx_max )
+          {
+            big_mtx_max = elem;
+          }
+          
+          if( elem < big_mtx_min )
+          {
+            big_mtx_min = elem;
+          }
+          
+        }
+      }
+      
+      if( big_mtx_max >= big_mtx_min )
+      {
+        big_mtx_histo_size = (unsigned int)( 
+          big_mtx_max - big_mtx_min + 1 );
+          
+        big_mtx_histo.resize( big_mtx_histo_size );
+      }      
+    }
+
+    /* Pre-initiating joint histogram matrix */
+    
+    TePDIMatrix< unsigned int > joint_histo_mtx;
+    TEAGN_TRUE_OR_RETURN( joint_histo_mtx.Reset( small_mtx_histo_size,
+      big_mtx_histo_size, TePDIMatrix< unsigned int >::AutoMemPol ), 
+      "Error allocating joint histogram" )
+    
+    /* Iterating over each small matrix position over the bigger one */
+    
+    const unsigned int big_mtx_lines_bound = big_matrix.GetLines() -
+      small_mtx_lines;
+    const unsigned int big_mtx_cols_bound = big_matrix.GetColumns() -
+      small_mtx_cols;
+      
+    unsigned int big_mtx_line = 0;
+    unsigned  int big_mtx_col = 0;
+    unsigned int small_mtx_line = 0;
+    unsigned int small_mtx_col = 0;
+    
+    double* big_matrix_line_ptr = 0;
+    double* small_matrix_line_ptr = 0;
+    
+    double prob = 0.0;
+    double bmtx_crop_entropy = 0;
+    double curr_jentropy = 0;
+    double curr_mi = 0;
+    long int big_mtx_ele = 0;
+    long int small_mtx_ele = 0;
+    
+    double best_mi = DBL_MAX * ( -1.0 );
+    unsigned int best_mi_lin = 0;
+    unsigned int best_mi_col = 0;
+    
+    unsigned int big_mtx_histo_idx = 0;
+    unsigned int joint_histo_mtx_line = 0;
+    unsigned int joint_histo_mtx_col = 0;
+    unsigned int* joint_histo_line_ptr = 0;
+    
+    TePDIPIManager progress( "Looking for the best matching", 
+      big_mtx_lines_bound, progress_enabled_ );
+        
+    for( ; big_mtx_line < big_mtx_lines_bound ; ++big_mtx_line )
+    {
+      for( big_mtx_col = 0 ; big_mtx_col < big_mtx_cols_bound ; 
+        ++big_mtx_col )
+      {
+        /* Cleaning big_mtx_histo */
+        
+        for( big_mtx_histo_idx = 0 ; big_mtx_histo_idx < 
+          big_mtx_histo_size ; ++big_mtx_histo_idx )
+        {
+          big_mtx_histo[ big_mtx_histo_idx ] = 0;
+        }
+        
+        /* Cleaning joint_histo_mtx */
+        
+        for( joint_histo_mtx_line = 0; joint_histo_mtx_line <
+          small_mtx_histo_size ; ++joint_histo_mtx_line )
+        {
+          joint_histo_line_ptr = joint_histo_mtx[ 
+            joint_histo_mtx_line ];
+            
+          for( joint_histo_mtx_col = 0; joint_histo_mtx_col <
+            big_mtx_histo_size ; ++joint_histo_mtx_col )
+          {
+            joint_histo_line_ptr[ joint_histo_mtx_col ] = 0;
+          }
+        }
+          
+        /* Generating histograms for the current position */
+        
+        for( small_mtx_line = 0 ; small_mtx_line < small_mtx_lines ;
+          ++small_mtx_line )
+        {
+          big_matrix_line_ptr = big_matrix[ big_mtx_line + 
+            small_mtx_line ];
+          small_matrix_line_ptr = small_matrix[ small_mtx_line ];
+          
+          for( small_mtx_col = 0 ; small_mtx_col < small_mtx_cols ;
+            ++small_mtx_col )
+          {
+            big_mtx_ele = (long int)big_matrix_line_ptr[ big_mtx_col + 
+              small_mtx_col ];
+            small_mtx_ele = (long int)small_matrix_line_ptr[ 
+              small_mtx_col ];              
+              
+            big_mtx_histo_idx = big_mtx_ele - big_mtx_min;
+            big_mtx_histo[ big_mtx_histo_idx ] += 1;
+            
+            joint_histo_mtx_line = small_mtx_ele - small_mtx_min;
+            joint_histo_mtx( joint_histo_mtx_line, big_mtx_histo_idx ) 
+              += 1;
+          }
+        }
+
+        /* Calc the entropy for the current position */
+        
+        bmtx_crop_entropy = 0.0;
+        
+        for( big_mtx_histo_idx = 0 ; big_mtx_histo_idx < 
+          big_mtx_histo_size ; ++big_mtx_histo_idx )
+        {
+          prob = ( (double)( big_mtx_histo[ big_mtx_histo_idx ] ) ) / 
+            elements_nmb;
+          
+          if( prob > 0.0 ) {
+            bmtx_crop_entropy += ( prob * ( log( prob ) / log2 ) );
+          }        
+        }        
+        
+        bmtx_crop_entropy *= (-1.0);
+        
+        /* Calc the joint entropy for the current position */
+        
+        curr_jentropy = 0.0;
+        
+        for( joint_histo_mtx_line = 0; joint_histo_mtx_line <
+          small_mtx_histo_size ; ++joint_histo_mtx_line )
+        {
+          joint_histo_line_ptr = joint_histo_mtx[ 
+            joint_histo_mtx_line ];
+            
+          for( joint_histo_mtx_col = 0; joint_histo_mtx_col <
+            big_mtx_histo_size ; ++joint_histo_mtx_col )
+          {
+            prob = ( (double)( joint_histo_line_ptr[ 
+              joint_histo_mtx_col ] ) ) / elements_nmb;
+            
+            if( prob > 0.0 ) {
+              curr_jentropy += ( prob * ( log( prob ) / log2 ) );
+            }               
+          }
+        }        
+        
+        curr_jentropy *= (-1.0);
+        
+        /* Is this the best position ??? */
+        
+        curr_mi = small_mtx_entropy + bmtx_crop_entropy -
+          curr_jentropy;
+        
+        if( curr_mi > best_mi )
+        {
+          best_mi = curr_mi;
+          best_mi_col = big_mtx_col;
+          best_mi_lin = big_mtx_line;
+        } 
+      }
+      
+      TEAGN_FALSE_OR_RETURN( progress.Increment(),
+        "Canceled by the user" );
+    }
+    
+    /* Copy the best MI to user output var */
+    
+    double* best_mi_ptr = 0;
+    if( params_.CheckParameter< double* >( "best_mi_ptr" ) ) {
+      params_.GetParameter( "best_mi_ptr", best_mi_ptr );
+      (*best_mi_ptr) = best_mi;
+    }       
+    
+    /* Generating tie-points */
+    
+    TeCoord2D ulpoint_img1;
+    TeCoord2D urpoint_img1;
+    TeCoord2D llpoint_img1;
+    TeCoord2D lrpoint_img1;
+    
+    TeCoord2D ulpoint_img2;
+    TeCoord2D urpoint_img2;
+    TeCoord2D llpoint_img2;
+    TeCoord2D lrpoint_img2;
+    
+    if( m1size < m2size )
+    {
+      ulpoint_img1.setXY( 0 , 0 );
+      llpoint_img1.setXY( 0, img1_matrix.GetLines() - 1 );
+      urpoint_img1.setXY( img1_matrix.GetColumns() - 1 , 0 );
+      lrpoint_img1.setXY( img1_matrix.GetColumns() - 1,
+        img1_matrix.GetLines() - 1 );
+        
+      ulpoint_img2.setXY( best_mi_col, best_mi_lin );
+      llpoint_img2.setXY( 
+        best_mi_col,
+        best_mi_lin + img1_matrix.GetLines() - 1 );
+      urpoint_img2.setXY( 
+        best_mi_col + img1_matrix.GetColumns() - 1,
+        best_mi_lin );
+      lrpoint_img2.setXY( 
+        best_mi_col + img1_matrix.GetColumns() - 1,
+        best_mi_lin + img1_matrix.GetLines() - 1 );
+    } 
+    else
+    {
+      ulpoint_img2.setXY( 0 , 0 );
+      llpoint_img2.setXY( 0, img2_matrix.GetLines() - 1 );
+      urpoint_img2.setXY( img2_matrix.GetColumns() - 1 , 0 );
+      lrpoint_img2.setXY( img2_matrix.GetColumns() - 1,
+        img2_matrix.GetLines() - 1 );
+        
+      ulpoint_img1.setXY( best_mi_col, best_mi_lin );
+      llpoint_img1.setXY( 
+        best_mi_col,
+        best_mi_lin + img2_matrix.GetLines() - 1 );
+      urpoint_img1.setXY( 
+        best_mi_col + img2_matrix.GetColumns() - 1,
+        best_mi_lin );
+      lrpoint_img1.setXY( 
+        best_mi_col + img2_matrix.GetColumns() - 1,
+        best_mi_lin + img2_matrix.GetLines() - 1 );        
+    }
+    
+        
+    /* Bringing points into input_image1_ptr 
+       reference */
+       
+    ulpoint_img1.setXY( 
+      ( ulpoint_img1.x() / img1_x_rescale_factor ) +
+      ( (double)orig_box1_x_off ),
+      ( ulpoint_img1.y() / img1_y_rescale_factor ) +
+      ( (double)orig_box1_y_off ) );
+    urpoint_img1.setXY( 
+      ( urpoint_img1.x() / img1_x_rescale_factor ) +
+      ( (double)orig_box1_x_off ),
+      ( urpoint_img1.y() / img1_y_rescale_factor ) +
+      ( (double)orig_box1_y_off ) );
+    llpoint_img1.setXY( 
+      ( llpoint_img1.x() / img1_x_rescale_factor ) +
+      ( (double)orig_box1_x_off ),
+      ( llpoint_img1.y() / img1_y_rescale_factor ) +
+      ( (double)orig_box1_y_off ) );
+    lrpoint_img1.setXY( 
+      ( lrpoint_img1.x() / img1_x_rescale_factor ) +
+      ( (double)orig_box1_x_off ),
+      ( lrpoint_img1.y() / img1_y_rescale_factor ) +
+      ( (double)orig_box1_y_off ) );                  
+
+    /* Bringing points into input_image2_ptr 
+       reference */
+   
+    ulpoint_img2.setXY( 
+      ( ulpoint_img2.x() / img2_x_rescale_factor ) +
+      ( (double)orig_box2_x_off ),
+      ( ulpoint_img2.y() / img2_y_rescale_factor ) +
+      ( (double)orig_box2_y_off ) );
+    urpoint_img2.setXY( 
+      ( urpoint_img2.x() / img2_x_rescale_factor ) +
+      ( (double)orig_box2_x_off ),
+      ( urpoint_img2.y() / img2_y_rescale_factor ) +
+      ( (double)orig_box2_y_off ) );
+    llpoint_img2.setXY( 
+      ( llpoint_img2.x() / img2_x_rescale_factor ) +
+      ( (double)orig_box2_x_off ),
+      ( llpoint_img2.y() / img2_y_rescale_factor ) +
+      ( (double)orig_box2_y_off ) );
+    lrpoint_img2.setXY( 
+      ( lrpoint_img2.x() / img2_x_rescale_factor ) +
+      ( (double)orig_box2_x_off ),
+      ( lrpoint_img2.y() / img2_y_rescale_factor ) +
+      ( (double)orig_box2_y_off ) );  
+         
+    /* Generating output tie-points */
+    
+    out_tie_points_ptr->push_back( TeCoordPair( ulpoint_img1,
+      ulpoint_img2 ) );
+    out_tie_points_ptr->push_back( TeCoordPair( urpoint_img1,
+      urpoint_img2 ) );
+    out_tie_points_ptr->push_back( TeCoordPair( llpoint_img1,
+      llpoint_img2 ) );
+    out_tie_points_ptr->push_back( TeCoordPair( lrpoint_img1,
+      lrpoint_img2 ) );
+      
+    TEAGN_DEBUG_CONDITION( checkTPs( *out_tie_points_ptr ),
+      "Invalid tie-points" )                     
+  }
+  
+  return true;
+}
+
+
+bool TePDIMIMatching::CheckParameters( 
+  const TePDIParameters& parameters ) const
+{
+  /* Checking input_image1_ptr */
+    
+  TePDITypes::TePDIRasterPtrType input_image1_ptr;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( 
+    "input_image1_ptr", input_image1_ptr ),
+    "Missing parameter: input_image1_ptr" );
+  TEAGN_TRUE_OR_RETURN( input_image1_ptr.isActive(),
+    "Invalid parameter: input_image1_ptr inactive" );
+  TEAGN_TRUE_OR_RETURN( input_image1_ptr->params().status_ != 
+    TeRasterParams::TeNotReady, 
+    "Invalid parameter: input_image1_ptr not ready" );
+    
+  /* Checking input_channel1 */
+    
+  unsigned int input_channel1 = 0;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( 
+    "input_channel1", input_channel1 ),
+    "Missing parameter: input_channel1" );
+  TEAGN_TRUE_OR_RETURN( 
+    ( ( (int)input_channel1 ) < 
+    input_image1_ptr->params().nBands() ),
+    "Invalid parameter: input_channel1" );
+    
+  /* Checking input_image1_ptr */
+    
+  TePDITypes::TePDIRasterPtrType input_image2_ptr;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( 
+    "input_image2_ptr", input_image2_ptr ),
+    "Missing parameter: input_image2_ptr" );
+  TEAGN_TRUE_OR_RETURN( input_image2_ptr.isActive(),
+    "Invalid parameter: input_image2_ptr inactive" );
+  TEAGN_TRUE_OR_RETURN( input_image2_ptr->params().status_ != 
+    TeRasterParams::TeNotReady, 
+    "Invalid parameter: input_image2_ptr not ready" );    
+    
+  /* Checking input_channel2 */
+    
+  unsigned int input_channel2 = 0;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( 
+    "input_channel2", input_channel2 ),
+    "Missing parameter: input_channel2" );
+  TEAGN_TRUE_OR_RETURN( 
+    ( ( (int)input_channel2 ) < 
+    input_image2_ptr->params().nBands() ),
+    "Invalid parameter: input_channel2" );
+    
+  /* Checking out_tie_points_ptr */
+    
+  TeSharedPtr< TeCoordPairVect > out_tie_points_ptr;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( 
+    "out_tie_points_ptr", out_tie_points_ptr ),
+    "Missing parameter: out_tie_points_ptr" );
+  TEAGN_TRUE_OR_RETURN( out_tie_points_ptr.isActive(),
+    "Invalid parameter: out_tie_points_ptr inactive" );
+    
+  /* Checking input_box1 */
+    
+  TeBox input_box1;
+  if( parameters.CheckParameter< TeBox >( "input_box1" ) ) {
+    parameters.GetParameter( "input_box1", input_box1 );
+    
+    TEAGN_TRUE_OR_RETURN( ( input_box1.x1() >= 0 ),
+      "Invalid parameter : input_box1" )
+    TEAGN_TRUE_OR_RETURN( ( input_box1.x2() >= 0 ),
+      "Invalid parameter : input_box1" )      
+    TEAGN_TRUE_OR_RETURN( ( input_box1.y1() >= 0 ),
+      "Invalid parameter : input_box1" )
+    TEAGN_TRUE_OR_RETURN( ( input_box1.y2() >= 0 ),
+      "Invalid parameter : input_box1" )         
+      
+    TEAGN_TRUE_OR_RETURN( 
+      ( input_box1.x1() <= 
+        ( input_image1_ptr->params().ncols_ - 1 ) ),
+      "Invalid parameter : input_box1" )
+    TEAGN_TRUE_OR_RETURN( 
+      ( input_box1.x2() <= 
+        ( input_image1_ptr->params().ncols_ - 1 ) ),
+      "Invalid parameter : input_box1" )       
+      
+    TEAGN_TRUE_OR_RETURN( 
+      ( input_box1.y1() <= 
+        ( input_image1_ptr->params().nlines_ - 1 ) ),
+      "Invalid parameter : input_box1" )
+    TEAGN_TRUE_OR_RETURN( 
+      ( input_box1.y2() <= 
+        ( input_image1_ptr->params().nlines_ - 1 ) ),
+      "Invalid parameter : input_box1" )        
+  }
+    
+  /* Checking input_box2 */
+    
+  TeBox input_box2;
+  if( parameters.CheckParameter< TeBox >( "input_box2" ) ) {
+    parameters.GetParameter( "input_box2", input_box2 );
+    
+    TEAGN_TRUE_OR_RETURN( ( input_box2.x1() >= 0 ),
+      "Invalid parameter : input_box2" )
+    TEAGN_TRUE_OR_RETURN( ( input_box2.x2() >= 0 ),
+      "Invalid parameter : input_box2" )      
+    TEAGN_TRUE_OR_RETURN( ( input_box2.y1() >= 0 ),
+      "Invalid parameter : input_box2" )
+    TEAGN_TRUE_OR_RETURN( ( input_box2.y2() >= 0 ),
+      "Invalid parameter : input_box2" )         
+      
+    TEAGN_TRUE_OR_RETURN( 
+      ( input_box2.x1() <= 
+        ( input_image2_ptr->params().ncols_ - 1 ) ),
+      "Invalid parameter : input_box2" )
+    TEAGN_TRUE_OR_RETURN( 
+      ( input_box2.x2() <= 
+        ( input_image2_ptr->params().ncols_ - 1 ) ),
+      "Invalid parameter : input_box2" )       
+      
+    TEAGN_TRUE_OR_RETURN( 
+      ( input_box2.y1() <= 
+        ( input_image2_ptr->params().nlines_ - 1 ) ),
+      "Invalid parameter : input_box2" )
+    TEAGN_TRUE_OR_RETURN( 
+      ( input_box2.y2() <= 
+        ( input_image2_ptr->params().nlines_ - 1 ) ),
+      "Invalid parameter : input_box2" )        
+  }    
+    
+  /* Checking pixel_x_relation */
+  
+  double pixel_x_relation = 1.0;
+  if( parameters.CheckParameter< double >( "pixel_x_relation" ) ) {
+    parameters.GetParameter( "pixel_x_relation", pixel_x_relation );
+    
+    TEAGN_TRUE_OR_RETURN( ( pixel_x_relation != 0.0 ),
+      "Invalid parameter : pixel_x_relation" )
+  }
+  
+  /* Checking pixel_y_relation */
+  
+  double pixel_y_relation = 1.0;
+  if( parameters.CheckParameter< double >( "pixel_y_relation" ) ) {
+    parameters.GetParameter( "pixel_y_relation", pixel_y_relation );
+    
+    TEAGN_TRUE_OR_RETURN( ( pixel_y_relation != 0.0 ),
+      "Invalid parameter : pixel_y_relation" )
+  }   
+  
+  /* Checking img1 data type */
+    
+  TEAGN_TRUE_OR_RETURN( 
+    ( ( input_image1_ptr->params().dataType_[ input_channel1 ] != 
+    TeFLOAT ) && ( input_image1_ptr->params().dataType_[ 
+    input_channel1 ] != TeDOUBLE ) ),
+    "Invalid parameter: invalid input_image1 data type" );    
+  
+  /* Checking img2 data type */
+    
+  TEAGN_TRUE_OR_RETURN( 
+    ( ( input_image2_ptr->params().dataType_[ input_channel2 ] != 
+    TeFLOAT ) && ( input_image2_ptr->params().dataType_[ 
+    input_channel2 ] != TeDOUBLE ) ),
+    "Invalid parameter: invalid input_image2 data type" );    
+  
+  return true;
+}
+
+
+void TePDIMIMatching::ResetState( const TePDIParameters& )
+{
+}
+
+
+bool TePDIMIMatching::loadImage( const TeThreadParameters& params )
+{
+  /* Retriving parameters */
+  
+  TePDITypes::TePDIRasterPtrType input_image_ptr;
+  TEAGN_TRUE_OR_THROW( params.retrive( "input_image_ptr", input_image_ptr ),
+    "Missing thread parameter" )
+    
+  ImgMatrixT* img_matrix_ptr;
+  TEAGN_TRUE_OR_THROW( params.retrive( "img_matrix_ptr", img_matrix_ptr ),
+    "Missing thread parameter" )
+    
+  double img_x_rescale_factor = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "img_x_rescale_factor", 
+    img_x_rescale_factor ), "Missing thread parameter" )
+    
+  double img_y_rescale_factor = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "img_y_rescale_factor", 
+    img_y_rescale_factor ), "Missing thread parameter" )    
+    
+  unsigned int input_channel = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "input_channel", 
+    input_channel ), "Missing thread parameter" )  
+    
+  unsigned int box_x_off = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "box_x_off", 
+    box_x_off ), "Missing thread parameter" )  
+
+  unsigned int box_y_off = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "box_y_off", 
+    box_y_off ), "Missing thread parameter" )      
+    
+  unsigned int box_nlines = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "box_nlines", 
+    box_nlines ), "Missing thread parameter" )      
+    
+  unsigned int box_ncols = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "box_ncols", 
+    box_ncols ), "Missing thread parameter" )   
+    
+  bool progress_enabled = false;   
+  TEAGN_TRUE_OR_THROW( params.retrive( "progress_enabled", 
+    progress_enabled ), "Missing thread parameter" ) 
+    
+  TeMutex* glb_mem_lock_ptr = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "glb_mem_lock_ptr", 
+    glb_mem_lock_ptr ), "Missing thread parameter" )   
+  TeMutex& glb_mem_lock = *glb_mem_lock_ptr;
+         
+  /* Rescaling image */
+  
+  unsigned int nlines = (unsigned int) ceil( 
+    ( (double)box_nlines ) * img_y_rescale_factor );
+  unsigned int ncols = (unsigned int) ceil( 
+    ( (double)box_ncols ) * img_x_rescale_factor );    
+  
+  glb_mem_lock.lock();
+  
+  if( ! img_matrix_ptr->Reset( nlines, ncols, 
+    TePDIMatrix< double >::AutoMemPol ) )
+  {
+    TEAGN_LOGERR( "Unable to allocate space for the loaded image" )
+    glb_mem_lock.unLock();
+    return false;
+  }
+    
+  glb_mem_lock.unLock();
+    
+  unsigned int curr_out_line = 0;
+  unsigned int curr_out_col = 0;
+  unsigned int curr_input_line = 0;
+  unsigned int curr_input_col = 0;
+  double value = 0;
+  
+  TePDIPIManager progress( "Rescaling image", nlines, progress_enabled );
+  
+  for( curr_out_line = 0 ; curr_out_line < nlines ; 
+    ++curr_out_line ) {
+    
+    curr_input_line = 
+      TeRound( 
+        ( 
+          ( (double)curr_out_line ) / img_y_rescale_factor
+        ) 
+        +
+        ( (double) box_y_off )
+      );
+    
+    for( curr_out_col = 0 ; curr_out_col < ncols ; 
+      ++curr_out_col ) {
+      
+      curr_input_col = 
+        TeRound( 
+          ( 
+            ( (double)curr_out_col ) / img_x_rescale_factor
+          ) 
+          +
+          ( (double) box_x_off )
+        );        
+      
+      if( input_image_ptr->getElement( curr_input_col, curr_input_line, value, 
+        input_channel ) ) {
+        
+        img_matrix_ptr->operator()( curr_out_line, curr_out_col ) = value;
+      } else {
+        img_matrix_ptr->operator()( curr_out_line, curr_out_col ) = 0;
+      }
+    }
+    
+    TEAGN_FALSE_OR_RETURN( progress.Increment(),
+      "Canceled by the user" );
+  }
+        
+  return true;
+}
+
+
+void TePDIMIMatching::matrix2Tiff( 
+  const ImgMatrixT& input_matrix,
+  const std::string& out_file_name,
+  const std::vector< TeCoord2D >& maxima_points )
+{   
+  TEAGN_TRUE_OR_THROW( ( ! out_file_name.empty() ), "Invalid file name" )
+  TEAGN_TRUE_OR_THROW( ( input_matrix.GetLines() > 0 ), 
+    "Invalid matrix lines" )
+  TEAGN_TRUE_OR_THROW( ( input_matrix.GetColumns() > 0 ), 
+    "Invalid matrix cols" )
+    
+  /* Finding min and max */
+  const double dbl_max = DBL_MAX;
+  const double dbl_min = (-1.0) * dbl_max;
+  double mtx_min = dbl_max;
+  double mtx_max = dbl_min;
+  double mtx_diff = 1.0;
+  
+  {
+    for( unsigned int line = 0 ; 
+      line < input_matrix.GetLines() ; ++line ) 
+    {
+      for( unsigned int col = 0 ; 
+        col < input_matrix.GetColumns() ; 
+        ++col ) 
+      {
+        if( ( input_matrix( line, col ) > dbl_min ) &&
+          ( input_matrix( line, col ) < dbl_max ) )
+        {
+          if( input_matrix( line, col ) < mtx_min )
+          {
+            mtx_min = input_matrix( line, col );
+          } 
+          
+          if( input_matrix( line, col ) > mtx_max )
+          {
+            mtx_max = input_matrix( line, col );
+          }
+        }
+      }  
+    }
+    
+    if( mtx_max != mtx_min )
+    {
+      mtx_diff = mtx_max - mtx_min;
+    } 
+  }
+    
+  TeRasterParams params;
+  params.setNLinesNColumns( input_matrix.GetLines(),
+    input_matrix.GetColumns() );
+  params.nBands( 1 );
+  params.setDataType( TeUNSIGNEDCHAR, -1 );
+  params.nBands( 1 );
+  params.decoderIdentifier_ = "TIF";
+  params.mode_ = 'c';
+  params.fileName_ = out_file_name;
+  
+  TeRaster out_raster( params );
+  TEAGN_TRUE_OR_THROW( out_raster.init(), "Error init raster" );
+  
+  for( unsigned int line = 0 ; 
+    line < input_matrix.GetLines() ; ++line ) {
+    for( unsigned int col = 0 ; 
+      col < input_matrix.GetColumns() ; 
+      ++col ) {
+
+      TEAGN_TRUE_OR_THROW( out_raster.setElement( col, line, 
+        ( ( input_matrix( line, col ) - mtx_min ) / mtx_diff ) * 255.0, 0 ),
+        "Error writing raster" )
+    }  
+  }
+  
+  /* Draw maxima points */
+  
+  std::vector< TeCoord2D >::const_iterator maximas_it = 
+    maxima_points.begin();
+  std::vector< TeCoord2D >::const_iterator maximas_it_end = 
+    maxima_points.end();
+    
+  while( maximas_it != maximas_it_end ) {
+    int x = TeRound( maximas_it->x() );
+    TEAGN_TRUE_OR_THROW( ( x < (int)input_matrix.GetColumns() ),
+      "Invalid maxima column" )
+    TEAGN_TRUE_OR_THROW( ( x >= 0 ),
+      "Invalid maxima column" )      
+    
+    int y = TeRound( maximas_it->y() );
+    TEAGN_TRUE_OR_THROW( ( y < (int)input_matrix.GetLines() ),
+      "Invalid maxima line" )
+    TEAGN_TRUE_OR_THROW( ( y >= 0 ),
+      "Invalid maxima line" )      
+    
+    TEAGN_TRUE_OR_THROW( out_raster.setElement( x, y, 
+      255.0, 0 ),
+      "Error writing raster" )
+      
+    ++maximas_it;
+  }  
+}
+
+
+void TePDIMIMatching::raster2Tiff( 
+  const TePDITypes::TePDIRasterPtrType& input_raster_ptr,
+  unsigned int raster_channel,
+  const std::string& out_file_name,
+  const std::vector< TeCoord2D >& maxima_points,
+  const TeSharedPtr< TeCoordPairVect >& out_tie_points_ptr,
+  unsigned int tie_points_space )
+{   
+  TEAGN_TRUE_OR_THROW( ( ! out_file_name.empty() ), 
+    "Invalid file name" )
+  TEAGN_TRUE_OR_THROW( ( input_raster_ptr->params().nlines_ > 0 ), 
+    "Invalid matrix lines" )
+  TEAGN_TRUE_OR_THROW( ( input_raster_ptr->params().ncols_ > 0 ), 
+    "Invalid matrix cols" )
+    
+  TeRasterParams params;
+  params.setNLinesNColumns( input_raster_ptr->params().nlines_,
+    input_raster_ptr->params().ncols_ );
+  params.nBands( 1 );
+  params.setDataType( TeUNSIGNEDCHAR, -1 );
+  params.nBands( 1 );
+  params.decoderIdentifier_ = "TIF";
+  params.mode_ = 'c';
+  params.fileName_ = out_file_name;
+  
+  TeRaster out_raster( params );
+  TEAGN_TRUE_OR_THROW( out_raster.init(), "Error init raster" );
+  double value = 0;
+  
+  for( int line = 0 ; 
+    line < input_raster_ptr->params().nlines_ ; ++line ) {
+    for( int col = 0 ; 
+      col < input_raster_ptr->params().ncols_ ; 
+      ++col ) {
+      
+      input_raster_ptr->getElement( col, line, value, 
+        raster_channel );
+      
+
+      TEAGN_TRUE_OR_THROW( out_raster.setElement( col, line, 
+        value, 0 ),
+        "Error writing raster" )
+    }  
+  }
+  
+  /* Draw maxima points */
+  
+  std::vector< TeCoord2D >::const_iterator maximas_it = 
+    maxima_points.begin();
+  std::vector< TeCoord2D >::const_iterator maximas_it_end = 
+    maxima_points.end();
+    
+  while( maximas_it != maximas_it_end ) {
+    int x = TeRound( maximas_it->x() );
+    TEAGN_TRUE_OR_THROW( ( x < input_raster_ptr->params().ncols_ ),
+      "Invalid maxima column" )
+    TEAGN_TRUE_OR_THROW( ( x >= 0 ),
+      "Invalid maxima column" )      
+    
+    int y = TeRound( maximas_it->y() );
+    TEAGN_TRUE_OR_THROW( ( y < input_raster_ptr->params().nlines_ ),
+      "Invalid maxima line" )
+    TEAGN_TRUE_OR_THROW( ( y >= 0 ),
+      "Invalid maxima line" )      
+    
+    TEAGN_TRUE_OR_THROW( out_raster.setElement( x, y, 
+      255.0, 0 ),
+      "Error writing raster" )
+      
+    ++maximas_it;
+  }
+  
+  /* Draw tie-points */
+  
+  if( out_tie_points_ptr.isActive() ) {
+    TeCoordPairVect::iterator it = out_tie_points_ptr->begin();
+    TeCoordPairVect::iterator it_end = out_tie_points_ptr->end();
+    
+    while( it != it_end ) {
+      int x = 0;
+      int y = 0;
+      
+      if( tie_points_space == 0 ) {
+         x = TeRound( it->pt1.x() );
+         y = TeRound( it->pt1.y() );
+      } else {
+         x = TeRound( it->pt2.x() );
+         y = TeRound( it->pt2.y() );
+      }
+      
+      TEAGN_TRUE_OR_THROW( ( x < input_raster_ptr->params().ncols_ ),
+        "Invalid maxima column" )
+      TEAGN_TRUE_OR_THROW( ( x >= 0 ),
+        "Invalid maxima column" )      
+      TEAGN_TRUE_OR_THROW( ( y < input_raster_ptr->params().nlines_ ),
+        "Invalid maxima line" )
+      TEAGN_TRUE_OR_THROW( ( y >= 0 ),
+        "Invalid maxima line" )      
+      
+      TEAGN_TRUE_OR_THROW( out_raster.setElement( x, y, 
+        255.0, 0 ),
+        "Error writing raster" )    
+    
+      ++it;
+    }
+  
+  }
+}
+
+
+bool TePDIMIMatching::checkTPs( 
+  const TeCoordPairVect& tpsvec ) const
+{
+  for( unsigned int idx1 = 0 ; idx1 < tpsvec.size() ; ++idx1 )
+  { 
+    for( unsigned int idx2 = idx1 + 1 ; idx2 < tpsvec.size() ; 
+      ++idx2 )
+    {
+      TEAGN_TRUE_OR_RETURN( 
+        (
+          (
+            ( tpsvec[ idx1 ].pt1.x() != tpsvec[ idx2 ].pt1.x() ) ||
+            ( tpsvec[ idx1 ].pt1.y() != tpsvec[ idx2 ].pt1.y() ) 
+          ) &&
+          (
+            ( tpsvec[ idx1 ].pt2.x() != tpsvec[ idx2 ].pt2.x() ) ||
+            ( tpsvec[ idx1 ].pt2.y() != tpsvec[ idx2 ].pt2.y() ) 
+          )
+        ),
+        "Invalid tie-point" +
+        std::string( " index1=" ) + Te2String( idx1 ) +
+        " [" + Te2String( tpsvec[ idx1 ].pt1.x(), 9 ) + "," +
+        Te2String( tpsvec[ idx1 ].pt1.y(), 9 ) + " <-> " +
+        Te2String( tpsvec[ idx1 ].pt2.x(), 9 ) + "," +
+        Te2String( tpsvec[ idx1 ].pt2.y(), 9 ) + "]" +
+        std::string( " index2=" ) + Te2String( idx2 ) +
+        " [" + Te2String( tpsvec[ idx2 ].pt1.x(), 9 ) + "," +
+        Te2String( tpsvec[ idx2 ].pt1.y(), 9 ) + " <-> " +
+        Te2String( tpsvec[ idx2 ].pt2.x(), 9 ) + "," +
+        Te2String( tpsvec[ idx2 ].pt2.y(), 9 ) + "]" );
+    }
+  }
+  
+  return true;
+}
+     
+        
+
diff --git a/src/terralib/image_processing/TePDIMIMatching.hpp b/src/terralib/image_processing/TePDIMIMatching.hpp
new file mode 100644
index 0000000..69a64ce
--- /dev/null
+++ b/src/terralib/image_processing/TePDIMIMatching.hpp
@@ -0,0 +1,190 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIMIMATCHING_HPP
+  #define TEPDIMIMATCHING_HPP
+
+  #include "TePDIAlgorithm.hpp"
+  #include "TePDIMatrix.hpp"
+  
+  #include <TeThreadParameters.h>
+  
+  #include <map>
+
+  /**
+   * @brief Mutual Information image area matching ( only  
+   * offset distortion is supported ).
+   * @note Better used for searching a small image inside a big image.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @author Etore Marcari Junior <etore at dpi.inpe.br>
+   * @ingroup PDIMatchingAlgorithms
+   *
+   * @note The required parameters are:
+   *
+   * @param input_image1_ptr (TePDITypes::TePDIRasterPtrType) - 
+   * The input image 1.
+   * @param input_channel1 ( unsigned int ) - Band to process 
+   * from input_image1.
+   *
+   * @param input_image2_ptr (TePDITypes::TePDIRasterPtrType) - 
+   * The input image 2.
+   * @param input_channel2 ( unsigned int ) - Band to process 
+   * from input_image2.
+   *
+   * @param out_tie_points_ptr ( TeSharedPtr< TeCoordPairVect > ) - The 
+   * output tie- points 
+   * where TeCoordPair.pt1 are input_image1 matricial
+   * indexes and TeCoordPair.pt2 are input_image2 matricial
+   * indexes.
+   *
+   * @note The Optional parameters are:
+   *
+   * @param input_box1 ( TeBox ) - Box (image matrix coords) to process 
+   * from input_image1 ( the entire image will be used if no box
+   * was supplied )
+   *
+   * @param input_box2 ( TeBox ) - Box (image matrix coords) to process 
+   * from input_image2 ( the entire image will be used if no box
+   * was supplied )   
+   *
+   * @param enable_multi_thread (int) - If present (any value) 
+   * a multi-threaded processing will be used; Some TeDecoders do
+   * not support multi-thread so use it with cation
+   * (default: multi-thread disabled).
+   *
+   * @param pixel_x_relation (double) - The pixel resolution relation 
+   * pixel_x_relation = img1_pixel_res_x / img2_pixel_res_x (default=1.0);
+   *
+   * @param pixel_y_relation (double) - The pixel resolution relation 
+   * pixel_y_relation = img1_pixel_res_y / img2_pixel_res_y (default=1.0);   
+   *
+   * @param max_size_opt (unsigned int) - The maximum image box allowed
+   * size (size = pixels number = lines * columns); when the images pixels number
+   * exceed this value a downsample will be performed for optimization
+   * (default value=0 wich means optimization disabled).
+   *
+   * @param best_mi_ptr (double*) - A pointer to an output double 
+   * variable where to store the best found MI value.
+   */
+  class PDI_DLL TePDIMIMatching : public TePDIAlgorithm {
+    public :
+
+      /**
+       * @brief Default Constructor.
+       *
+       */
+      TePDIMIMatching();
+
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIMIMatching();
+
+      /**
+       * @brief Checks if the supplied parameters fits the requirements of each
+       * PDI algorithm implementation.
+       *
+       * @note Error log messages must be generated. No exceptions generated.
+       *
+       * @param parameters The parameters to be checked.
+       * @return true if the parameters are OK. false if not.
+       */
+      bool CheckParameters( const TePDIParameters& parameters ) const;
+
+    protected :
+    
+      /**
+       * @typedef TePDIMatrix< double > ImgMatrixT
+       * @brief A type definition for a image matrix.
+       */    
+      typedef TePDIMatrix< double > ImgMatrixT;
+    
+      /**
+       * @brief Runs the current algorithm implementation.
+       *
+       * @return true if OK. false on error.
+       */
+      bool RunImplementation();
+
+      /**
+       * @brief Reset the internal state to the initial state.
+       *
+       * @param params The new parameters referente at initial 
+       * state.
+       */
+      void ResetState( const TePDIParameters& params );
+      
+      /**
+       * @brief A thread entry point to load raster data into
+       * a simple matrix.
+       * @param params The parameters needed for the thread 
+       * execution.
+       * @return true if OK, false on errors.
+       */
+      static bool loadImage( const TeThreadParameters& params );
+      
+      /**
+       * @brief Save the output matrix to a geotiff file.
+       * @param input_matrix Input matrix.
+       * @param out_file_name Output file name.
+       * @param maxima_points The maxima points to be
+       * filled with 255
+       */      
+      static void matrix2Tiff( 
+        const ImgMatrixT& input_matrix,
+        const std::string& out_file_name,
+        const std::vector< TeCoord2D >& maxima_points );
+        
+      /**
+       * @brief Save the output matrix to a geotiff file.
+       * @param input_raster Input raster.
+       * @param raster_channel Raster channel.
+       * @param out_file_name Output file name.
+       * @param maxima_points The maxima points to be drawed.
+       * @param out_tie_points_ptr The tie-points to be drawed.
+       * @param tie_points_space The tie-points space 
+       * (pt1 or pt2).
+       */      
+      static void raster2Tiff( 
+        const TePDITypes::TePDIRasterPtrType& input_raster_ptr,
+        unsigned int raster_channel,
+        const std::string& out_file_name,
+        const std::vector< TeCoord2D >& maxima_points,
+        const TeSharedPtr< TeCoordPairVect >& out_tie_points_ptr,
+        unsigned int tie_points_space );        
+        
+      /**
+       * @brief Check tie-points indexes for repeated values.
+       * @param maximas Tie-points vector.
+       * @return true if OK, false on errors.
+       */
+      bool checkTPs( 
+        const TeCoordPairVect& tpsvec ) const;         
+  };
+  
+/** @example TePDIMIMatching_test.cpp
+ *    Shows how to use this class.
+ */    
+
+#endif
diff --git a/src/terralib/image_processing/TePDIMMIOMatching.cpp b/src/terralib/image_processing/TePDIMMIOMatching.cpp
new file mode 100644
index 0000000..a1ccd00
--- /dev/null
+++ b/src/terralib/image_processing/TePDIMMIOMatching.cpp
@@ -0,0 +1,2783 @@
+#include "TePDIMMIOMatching.hpp"
+
+#include "TePDIInterpolator.hpp"
+#include "TePDIUtils.hpp"
+#include "TePDITypes.hpp"
+
+#include <TeThreadJobsManager.h>
+#include <TeFunctionCallThreadJob.h>
+#include <TeCoord2D.h>
+#include <TeGTFactory.h>
+#include <TeDefines.h>
+#include <TeMutex.h>
+#include <TeUtils.h>
+
+#include <math.h>
+#include <limits.h>
+#include <TeRTree.h>
+
+#include <map>
+
+#define BICUBIC_MODULE( x ) ( ( x < 0 ) ? ( -1 * x ) : x )
+#define BICUBIC_K1( x , a ) ( ( ( a + 2 ) * x * x * x ) - \
+  ( ( a + 3 ) * x * x ) + 1 )
+#define BICUBIC_K2( x , a ) ( ( a * x * x * x ) - ( 5 * a * x * x ) + \
+  ( 8 * a * x ) - ( 4 * a ) )
+#define BICUBIC_RANGES(x,a) \
+  ( ( ( 0 <= x ) && ( x <= 1 ) ) ? \
+    BICUBIC_K1(x,a) \
+  : ( ( ( 1 < x ) && ( x <= 2 ) ) ? \
+      BICUBIC_K2(x,a) \
+    : 0 ) )
+#define BICUBIC_KERNEL( x , a ) BICUBIC_RANGES( BICUBIC_MODULE(x) , a )
+
+TePDIMMIOMatching::TePDIMMIOMatching()
+{
+  input_channel1_ = 0;
+  input_channel2_ = 0;
+  matching_method_ = NormCrossCorrMethod;
+}
+
+
+TePDIMMIOMatching::~TePDIMMIOMatching()
+{
+}
+
+bool TePDIMMIOMatching::CheckParameters( const TePDIParameters& parameters ) const
+{
+  /* Checking input_image1_ptr */
+    
+  TePDITypes::TePDIRasterPtrType input_image1_ptr;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( 
+    "input_image1_ptr", input_image1_ptr ),
+    "Missing parameter: input_image1_ptr" );
+  TEAGN_TRUE_OR_RETURN( input_image1_ptr.isActive(),
+    "Invalid parameter: input_image1_ptr inactive" );
+  TEAGN_TRUE_OR_RETURN( input_image1_ptr->params().status_ != 
+    TeRasterParams::TeNotReady, 
+    "Invalid parameter: input_image1_ptr not ready" );
+  
+  /* Checking matching method */
+  
+  FeatMatchingMethod matching_method = TePDIMMIOMatching::NormCrossCorrMethod;
+  if( parameters.CheckParameter< FeatMatchingMethod >( 
+    "matching_method" ) ) 
+  {
+    parameters.GetParameter( "matching_method", matching_method );
+    
+    TEAGN_TRUE_OR_RETURN( 
+      ( ( matching_method == TePDIMMIOMatching::EuclidianDistMethod ) ||
+      ( matching_method == TePDIMMIOMatching::NormCrossCorrMethod ) ),
+      "Invalid parameter : matching_method" );
+  }     
+    
+  /* Checking input_channel1 */
+    
+  unsigned int input_channel1 = 0;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( 
+    "input_channel1", input_channel1 ),
+    "Missing parameter: input_channel1" );
+  TEAGN_TRUE_OR_RETURN( 
+    ( ( (int)input_channel1 ) < 
+    input_image1_ptr->params().nBands() ),
+    "Invalid parameter: input_channel1" );
+  
+    
+  /* Checking input_image1_ptr */
+    
+  TePDITypes::TePDIRasterPtrType input_image2_ptr;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( 
+    "input_image2_ptr", input_image2_ptr ),
+    "Missing parameter: input_image2_ptr" );
+  TEAGN_TRUE_OR_RETURN( input_image2_ptr.isActive(),
+    "Invalid parameter: input_image2_ptr inactive" );
+  TEAGN_TRUE_OR_RETURN( input_image2_ptr->params().status_ != 
+    TeRasterParams::TeNotReady, 
+    "Invalid parameter: input_image2_ptr not ready" );    
+    
+  /* Checking input_channel2 */
+    
+  unsigned int input_channel2 = 0;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( 
+    "input_channel2", input_channel2 ),
+    "Missing parameter: input_channel2" );
+  TEAGN_TRUE_OR_RETURN( 
+    ( ( (int)input_channel2 ) < 
+    input_image2_ptr->params().nBands() ),
+    "Invalid parameter: input_channel2" );
+    
+  /* Checking out_tie_points_ptr */
+    
+  TeSharedPtr< TeCoordPairVect > out_tie_points_ptr;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( 
+    "out_tie_points_ptr", out_tie_points_ptr ),
+    "Missing parameter: out_tie_points_ptr" );
+  TEAGN_TRUE_OR_RETURN( out_tie_points_ptr.isActive(),
+    "Invalid parameter: out_tie_points_ptr inactive" );
+    
+  /* Checking gt_params */
+    
+  TeGTParams gt_params;
+  if( parameters.CheckParameter< TeGTParams >( "gt_params" ) ) {
+    parameters.GetParameter( "gt_params", gt_params );
+    
+    TEAGN_TRUE_OR_RETURN( ( TeGTFactory::instance().find( 
+      gt_params.transformation_name_ ) != 
+      TeGTFactory::instance().end() ),
+      "Invalid parameter : gt_params" )
+  }   
+  
+  /* Checking out_gt_params */
+  
+  TeGTParams::pointer out_gt_params_ptr;
+  if( parameters.CheckParameter< TeGTParams::pointer >( 
+    "out_gt_params_ptr" ) ) 
+  {
+    parameters.GetParameter( "out_gt_params_ptr", out_gt_params_ptr );
+    
+    TEAGN_TRUE_OR_RETURN( ( out_gt_params_ptr.isActive() ),
+      "Invalid parameter : out_gt_params_ptr" )
+  }      
+    
+  /* Checking input_box1 */
+    
+  TeBox input_box1;
+  if( parameters.CheckParameter< TeBox >( "input_box1" ) ) {
+    parameters.GetParameter( "input_box1", input_box1 );
+    
+    TEAGN_TRUE_OR_RETURN( ( input_box1.x1() >= 0 ),
+      "Invalid parameter : input_box1" )
+    TEAGN_TRUE_OR_RETURN( ( input_box1.x2() >= 0 ),
+      "Invalid parameter : input_box1" )      
+    TEAGN_TRUE_OR_RETURN( ( input_box1.y1() >= 0 ),
+      "Invalid parameter : input_box1" )
+    TEAGN_TRUE_OR_RETURN( ( input_box1.y2() >= 0 ),
+      "Invalid parameter : input_box1" )         
+      
+    TEAGN_TRUE_OR_RETURN( 
+      ( input_box1.x1() <= 
+        ( input_image1_ptr->params().ncols_ - 1 ) ),
+      "Invalid parameter : input_box1" )
+    TEAGN_TRUE_OR_RETURN( 
+      ( input_box1.x2() <= 
+        ( input_image1_ptr->params().ncols_ - 1 ) ),
+      "Invalid parameter : input_box1" )       
+      
+    TEAGN_TRUE_OR_RETURN( 
+      ( input_box1.y1() <= 
+        ( input_image1_ptr->params().nlines_ - 1 ) ),
+      "Invalid parameter : input_box1" )
+    TEAGN_TRUE_OR_RETURN( 
+      ( input_box1.y2() <= 
+        ( input_image1_ptr->params().nlines_ - 1 ) ),
+      "Invalid parameter : input_box1" )        
+  }
+    
+  /* Checking input_box2 */
+    
+  TeBox input_box2;
+  if( parameters.CheckParameter< TeBox >( "input_box2" ) ) {
+    parameters.GetParameter( "input_box2", input_box2 );
+    
+    TEAGN_TRUE_OR_RETURN( ( input_box2.x1() >= 0 ),
+      "Invalid parameter : input_box2" )
+    TEAGN_TRUE_OR_RETURN( ( input_box2.x2() >= 0 ),
+      "Invalid parameter : input_box2" )      
+    TEAGN_TRUE_OR_RETURN( ( input_box2.y1() >= 0 ),
+      "Invalid parameter : input_box2" )
+    TEAGN_TRUE_OR_RETURN( ( input_box2.y2() >= 0 ),
+      "Invalid parameter : input_box2" )         
+      
+    TEAGN_TRUE_OR_RETURN( 
+      ( input_box2.x1() <= 
+        ( input_image2_ptr->params().ncols_ - 1 ) ),
+      "Invalid parameter : input_box2" )
+    TEAGN_TRUE_OR_RETURN( 
+      ( input_box2.x2() <= 
+        ( input_image2_ptr->params().ncols_ - 1 ) ),
+      "Invalid parameter : input_box2" )       
+      
+    TEAGN_TRUE_OR_RETURN( 
+      ( input_box2.y1() <= 
+        ( input_image2_ptr->params().nlines_ - 1 ) ),
+      "Invalid parameter : input_box2" )
+    TEAGN_TRUE_OR_RETURN( 
+      ( input_box2.y2() <= 
+        ( input_image2_ptr->params().nlines_ - 1 ) ),
+      "Invalid parameter : input_box2" )        
+  }    
+    
+  /* Checking max_tie_points */
+  
+  unsigned int max_tie_points = 0;
+  if( parameters.CheckParameter< unsigned int >( "max_tie_points" ) ) {
+    parameters.GetParameter( "max_tie_points", max_tie_points );
+    
+    TEAGN_TRUE_OR_RETURN( ( max_tie_points > 0 ),
+      "Invalid parameter : max_tie_points" )    
+  }
+  
+  /* Checking corr_window_width */
+  
+  unsigned int corr_window_width = 0;
+  if( parameters.CheckParameter< unsigned int >( 
+    "corr_window_width" ) ) {
+    
+    parameters.GetParameter( "corr_window_width", 
+      corr_window_width );
+      
+    TEAGN_TRUE_OR_RETURN( ( ( corr_window_width % 2 ) > 0 ),
+      "Invalid parameter : corr_window_width" )      
+    
+    TEAGN_TRUE_OR_RETURN( ( corr_window_width >= 13 ),
+      "Invalid parameter : corr_window_width" )
+  }    
+  
+  /* Checking moravec_window_width */
+  
+  unsigned int moravec_window_width = corr_window_width / 2;
+  if( parameters.CheckParameter< unsigned int >( 
+    "moravec_window_width" ) ) {
+    
+    parameters.GetParameter( "moravec_window_width", 
+      moravec_window_width );
+      
+    TEAGN_TRUE_OR_RETURN( ( ( moravec_window_width % 2 ) > 0 ),
+      "Invalid parameter : moravec_window_width" )      
+    
+    TEAGN_TRUE_OR_RETURN( ( moravec_window_width >= 3 ),
+      "Invalid parameter : corr_window_width" )
+  }   
+  
+  /* Checking pixel_x_relation */
+  
+  double pixel_x_relation = 1.0;
+  if( parameters.CheckParameter< double >( "pixel_x_relation" ) ) {
+    parameters.GetParameter( "pixel_x_relation", pixel_x_relation );
+    
+    TEAGN_TRUE_OR_RETURN( ( pixel_x_relation != 0.0 ),
+      "Invalid parameter : pixel_x_relation" )
+  }
+  
+  /* Checking pixel_y_relation */
+  
+  double pixel_y_relation = 1.0;
+  if( parameters.CheckParameter< double >( "pixel_y_relation" ) ) {
+    parameters.GetParameter( "pixel_y_relation", pixel_y_relation );
+    
+    TEAGN_TRUE_OR_RETURN( ( pixel_y_relation != 0.0 ),
+      "Invalid parameter : pixel_y_relation" )
+  }
+  
+  /* Checking variance_min_thrs */
+  
+  double variance_min_thrs = 0;
+  if( parameters.CheckParameter< double >( "variance_min_thrs" ) ) {
+    parameters.GetParameter( "variance_min_thrs", variance_min_thrs );
+    
+    TEAGN_TRUE_OR_RETURN( ( ( variance_min_thrs >= 0.0 ) &&
+      ( variance_min_thrs <= 3.0 ) ),
+      "Invalid parameter : variance_min_thrs" )
+  }  
+  
+  return true;
+}
+
+bool TePDIMMIOMatching::RunImplementation()
+{
+  /* Retriving Parameters */
+
+  TeSharedPtr< TeCoordPairVect > out_tie_points_ptr;
+  params_.GetParameter( "out_tie_points_ptr", out_tie_points_ptr );
+  
+  double pixel_x_relation = 1.0;
+  if( params_.CheckParameter< double >( "pixel_x_relation" ) ) {
+    params_.GetParameter( "pixel_x_relation", pixel_x_relation );
+  }
+  
+  double pixel_y_relation = 1.0;
+  if( params_.CheckParameter< double >( "pixel_y_relation" ) ) {
+    params_.GetParameter( "pixel_y_relation", pixel_y_relation );
+  }    
+  
+  TeGTParams gt_params;
+  gt_params.out_rem_strat_ = TeGTParams::LWAOutRemotion;
+  gt_params.max_dmap_error_ = 2.0;
+  gt_params.max_imap_error_ = 2.0;
+  gt_params.transformation_name_ = "affine";
+  if( params_.CheckParameter< TeGTParams >( "gt_params" ) ) {
+    params_.GetParameter( "gt_params", gt_params );
+  }
+  
+  bool enable_multi_thread = false;
+  if( params_.CheckParameter< int >( "enable_multi_thread" ) ) {
+    enable_multi_thread = true;
+  }
+  
+  bool skip_geom_filter = false;
+  if( params_.CheckParameter< int >( "skip_geom_filter" ) ) {
+    skip_geom_filter = true;
+  }  
+  
+  bool enable_upsampled_filter = false;
+  if( params_.CheckParameter< int >( "enable_upsampled_filter" ) ) {
+    enable_upsampled_filter = true;
+  }    
+  
+  unsigned int max_tie_points = 1000;
+  if( params_.CheckParameter< unsigned int >( "max_tie_points" ) ) {
+    params_.GetParameter( "max_tie_points", max_tie_points );
+  }    
+  
+  unsigned int corr_window_width = 13;
+  if( params_.CheckParameter< unsigned int >( 
+    "corr_window_width" ) ) {
+    
+    params_.GetParameter( "corr_window_width", corr_window_width );
+  }    
+  
+  unsigned int moravec_window_width = 11;
+  if( params_.CheckParameter< unsigned int >( "moravec_window_width" ) ) 
+  {
+    params_.GetParameter( "moravec_window_width", 
+      moravec_window_width );
+  }     
+  
+  double variance_min_thrs = 1.0;
+  if( params_.CheckParameter< double >( "variance_min_thrs" ) ) {
+    params_.GetParameter( "variance_min_thrs", variance_min_thrs );
+  }    
+  
+  // Do wee need to process what images ??
+  
+  const bool processImg1 = img1featMtx_.IsEmpty();
+  const bool processImg2 = img2featMtx_.IsEmpty();
+  
+  // The original boxes postion over the original images
+  
+  const unsigned int orig_box1_x_off = (unsigned int)
+    input_box1_.lowerLeft().x();
+  const unsigned int orig_box1_y_off = (unsigned int)
+    input_box1_.upperRight().y();
+  const unsigned int orig_box1_nlines = 1 + (unsigned int)
+    ABS( input_box1_.height() );
+  const unsigned int orig_box1_ncols = 1 + (unsigned int)
+    ABS( input_box1_.width() );
+  
+  const unsigned int orig_box2_x_off = (unsigned int)
+    input_box2_.lowerLeft().x();
+  const unsigned int orig_box2_y_off = (unsigned int)
+    input_box2_.upperRight().y();
+  const unsigned int orig_box2_nlines = 1 + (unsigned int)
+    ABS( input_box2_.height() );
+  const unsigned int orig_box2_ncols = 1 + (unsigned int)
+    ABS( input_box2_.width() );  
+  
+  /* Calculating the rescale factors 
+     factor = rescaled_orignal_image / original_image */
+  
+  double i1XRescFact = 1.0;
+  double i1YRescFact = 1.0;
+  double i2XRescFact = 1.0;
+  double i2YRescFact = 1.0;
+  {
+    double mean_pixel_relation = ( pixel_x_relation + pixel_y_relation ) /
+      2.0;
+      
+    if( mean_pixel_relation > 1.0 ) {
+      /* The image 1 has poor resolution - bigger pixel resolution values -
+         and image 2 needs to be rescaled down */
+      
+      i2XRescFact = 1.0 / pixel_x_relation;
+      i2YRescFact = 1.0 / pixel_y_relation;
+    } else if( mean_pixel_relation < 1.0 ) {
+      /* The image 2 has poor resolution - bigger pixel resolution values
+        and image 1 needs to be rescaled down */
+      
+      i1XRescFact = pixel_x_relation;
+      i1YRescFact = pixel_y_relation;
+    }
+  }   
+  
+  /* Calculating the max tie-points to be generated for each image
+     trying to keep the same tie-point density for both images */
+     
+  unsigned int img1MaxTps = max_tie_points;
+  unsigned int img2MaxTps = max_tie_points;
+  
+  {
+    double resc_box1_nlines =  ( (double)orig_box1_nlines  ) * 
+      i1YRescFact;
+    double resc_box1_ncols =  ( (double)orig_box1_ncols ) * 
+      i1XRescFact;
+    double resc_box2_nlines =  ( (double)orig_box2_nlines  ) * 
+      i2YRescFact;
+    double resc_box2_ncols =  ( (double)orig_box2_ncols ) * 
+      i2XRescFact;
+      
+    double resc_box1_area = resc_box1_nlines * resc_box1_ncols;
+    double resc_box2_area = resc_box2_nlines * resc_box2_ncols;
+      
+    if( resc_box1_area > resc_box2_area )
+    {
+      img1MaxTps = (unsigned int)( 
+        resc_box1_area / 
+        ( resc_box2_area / ( (double)max_tie_points ) ) );
+    }
+    else if( resc_box1_area < resc_box2_area )
+    {
+      img2MaxTps = (unsigned int)( 
+        resc_box2_area / 
+        ( resc_box1_area / ( (double)max_tie_points ) ) ); 
+    }
+  }
+  
+  // Moravec specific variables
+  
+  // factor = original_image / downsampled_image
+  const double moravecDownSampleFactor = 1.5;
+  // factor = original_image / upsampled_image
+  const double moravecUpSampleFactor = 0.5;
+  
+  const double moravecRepeatabilityMinTolerance = 3.0;
+
+  unsigned int moravecDSWindowSize = (unsigned int)( 
+    moravec_window_width / moravecDownSampleFactor );
+  if( ( moravecDSWindowSize % 2 ) == 0 ) ++moravecDSWindowSize;
+  TEAGN_DEBUG_CONDITION( moravecDSWindowSize > 2, 
+    "Invalid moravecDSWindowSize ")
+
+  unsigned int moravecUSWindowSize = (unsigned int)( 
+    moravec_window_width / moravecUpSampleFactor );
+  if( ( moravecUSWindowSize % 2 ) == 0 ) ++moravecUSWindowSize;
+  TEAGN_DEBUG_CONDITION( moravecUSWindowSize > 2, 
+    "Invalid moravecUSWindowSize ")
+       
+  /* Calculating the number of allowed threads - this process
+     not included into the count */
+  
+  if( enable_multi_thread )
+  {
+    jobsMan_.setAutoMaxSimulJobs();
+  }
+  else
+  {
+    jobsMan_.setMaxSimulJobs( 0 );
+  }
+  
+ /* Loading images */
+  
+  TeSharedPtr< TePDIMtxDoubleAdptInt > img1_matrix_ptr;
+  TeSharedPtr< TePDIMtxDoubleAdptInt > img1_matrix_ds_ptr; // Downsampled version
+  TeSharedPtr< TePDIMtxDoubleAdptInt > img1_matrix_us_ptr; // Upsampled version  
+
+  if( processImg1 )
+  {
+    createImgMatrix( input_image1_ptr_->params().dataType_[input_channel1_],
+      img1_matrix_ptr );
+    createImgMatrix( input_image1_ptr_->params().dataType_[input_channel1_],
+      img1_matrix_ds_ptr );
+    if( enable_upsampled_filter )
+    {
+      createImgMatrix( input_image1_ptr_->params().dataType_[input_channel1_],
+        img1_matrix_us_ptr );
+    }
+  }
+  
+  TeSharedPtr< TePDIMtxDoubleAdptInt > img2_matrix_ptr;
+  TeSharedPtr< TePDIMtxDoubleAdptInt > img2_matrix_ds_ptr; // Downsampled version
+  TeSharedPtr< TePDIMtxDoubleAdptInt > img2_matrix_us_ptr; // Upsampled version
+
+  if( processImg2 )
+  {
+    createImgMatrix( input_image2_ptr_->params().dataType_[input_channel2_],
+      img2_matrix_ptr );
+    createImgMatrix( input_image2_ptr_->params().dataType_[input_channel2_],
+      img2_matrix_ds_ptr );
+    if( enable_upsampled_filter )
+    {
+      createImgMatrix( input_image2_ptr_->params().dataType_[input_channel2_],
+        img2_matrix_us_ptr );  
+    }
+  }
+ 
+  {
+    LoadImageParams img1pars;
+    img1pars.input_image_ptr_ = input_image1_ptr_;
+    img1pars.input_image_channel_ = input_channel1_;
+    img1pars.img_matrix_ptr_ = img1_matrix_ptr.nakedPointer();
+    img1pars.img_matrix_ds_ptr_ = img1_matrix_ds_ptr.nakedPointer();
+    img1pars.img_matrix_us_ptr_ = img1_matrix_us_ptr.nakedPointer();
+    img1pars.in_box_x_off_ = orig_box1_x_off;
+    img1pars.in_box_y_off_ = orig_box1_y_off;
+    img1pars.in_box_nlines_ = orig_box1_nlines;
+    img1pars.in_box_ncols_ = orig_box1_ncols;
+    img1pars.progress_enabled_ = progress_enabled_;
+    img1pars.glb_mem_lock_ptr_ = &globalMutex_;
+    img1pars.origImgXRescFact_ = i1XRescFact;
+    img1pars.origImgYRescFact_ = i1YRescFact;
+    img1pars.moravecDownSampleFactor_ = moravecDownSampleFactor;
+    img1pars.moravecUpSampleFactor_ = moravecUpSampleFactor;
+    img1pars.returnValue_ = true;
+    img1pars.generateUpsampledImage_ = enable_upsampled_filter;
+    
+    LoadImageParams img2pars = img1pars;
+    img2pars.input_image_ptr_ = input_image2_ptr_;
+    img1pars.input_image_channel_ = input_channel2_;
+    img2pars.img_matrix_ptr_ = img2_matrix_ptr.nakedPointer();
+    img2pars.img_matrix_ds_ptr_ = img2_matrix_ds_ptr.nakedPointer();
+    img2pars.img_matrix_us_ptr_ = img2_matrix_us_ptr.nakedPointer();
+    img2pars.in_box_x_off_ = orig_box2_x_off;
+    img2pars.in_box_y_off_ = orig_box2_y_off;
+    img2pars.in_box_nlines_ = orig_box2_nlines;
+    img2pars.in_box_ncols_ = orig_box2_ncols;    
+    img2pars.origImgXRescFact_ = i2XRescFact;
+    img2pars.origImgYRescFact_ = i2YRescFact;
+    
+    if( processImg1 )
+    {    
+      TeFunctionCallThreadJob job1;
+      job1.jobFunc_ = loadImage;
+      job1.jobFuncParsPtr_ = (void*)&img1pars;
+      jobsMan_.executeJob( job1 );
+    }
+
+    if( processImg2 )
+    {    
+      TeFunctionCallThreadJob job2;
+      job2.jobFunc_ = loadImage;
+      job2.jobFuncParsPtr_ = (void*)&img2pars;
+      jobsMan_.executeJob( job2 );
+    }
+    
+    jobsMan_.waitAllToFinish();
+    
+    TEAGN_TRUE_OR_RETURN( img1pars.returnValue_, "Error loading image" )
+    TEAGN_TRUE_OR_RETURN( img2pars.returnValue_, "Error loading image" )
+  }  
+
+/* 
+matrix2Tiff( *img1_matrix_ptr, "img1_matrix_ptr_loaded.tif" );
+matrix2Tiff( *img1_matrix_ds_ptr, "img1_matrix_ds_ptr_loaded.tif" );
+matrix2Tiff( *img1_matrix_us_ptr, "img1_matrix_us_ptr_loaded.tif" );
+matrix2Tiff( *img2_matrix_ptr, "img2_matrix_ptr_loaded.tif" );
+matrix2Tiff( *img2_matrix_ds_ptr, "img2_matrix_ds_ptr_loaded.tif" );
+matrix2Tiff( *img2_matrix_us_ptr, "img2_matrix_us_ptr_loaded.tif" );
+*/
+  
+  // Extracting maximas from all images
+  
+  MaximasListT img1ds_maximas_list;
+  MaximasListT img1us_maximas_list;
+  MaximasListT img2ds_maximas_list;
+  MaximasListT img2us_maximas_list;
+  
+  {
+    // Creating job execution parameters 
+    
+    TeFunctionCallThreadJob dummyJob;
+    dummyJob.jobFunc_ = extractLocalMaximas;
+    
+    ExtractLocalMaximasParams img1pars;
+    img1pars.imgMatrixPtr_ = img1_matrix_ptr.nakedPointer();
+    img1pars.outMaximasListPtr_ = &img1_maximas_list_;
+    img1pars.moravecWindowSize_ = moravec_window_width;
+    img1pars.maximasNumber_ = img1MaxTps;
+    img1pars.moravecMinVarianceThreshold_ = variance_min_thrs;
+    img1pars.seachSubImagesNmb_ = 9;
+    img1pars.returnValue_ = true;
+    img1pars.progressEnabled_ = progress_enabled_;
+    img1pars.glbMutexptr_ = &globalMutex_;
+    
+    ExtractLocalMaximasParams img1dspars = img1pars;
+    img1dspars.imgMatrixPtr_ = img1_matrix_ds_ptr.nakedPointer();
+    img1dspars.outMaximasListPtr_ = &img1ds_maximas_list;
+    img1dspars.moravecWindowSize_ = moravecDSWindowSize;
+
+    ExtractLocalMaximasParams img1uspars = img1pars;
+    img1uspars.imgMatrixPtr_ = img1_matrix_us_ptr.nakedPointer();
+    img1uspars.outMaximasListPtr_ = &img1us_maximas_list;
+    img1uspars.moravecWindowSize_ = moravecUSWindowSize;
+    
+    ExtractLocalMaximasParams img2pars = img1pars;;
+    img2pars.imgMatrixPtr_ = img2_matrix_ptr.nakedPointer();
+    img2pars.outMaximasListPtr_ = &img2_maximas_list_;
+    img2pars.maximasNumber_ = img2MaxTps;
+    
+    ExtractLocalMaximasParams img2dspars = img2pars;
+    img2dspars.imgMatrixPtr_ = img2_matrix_ds_ptr.nakedPointer();
+    img2dspars.outMaximasListPtr_ = &img2ds_maximas_list;
+    img2dspars.moravecWindowSize_ = moravecDSWindowSize;
+
+    ExtractLocalMaximasParams img2uspars = img2pars;
+    img2uspars.imgMatrixPtr_ = img2_matrix_us_ptr.nakedPointer();
+    img2uspars.outMaximasListPtr_ = &img2us_maximas_list;
+    img2uspars.moravecWindowSize_ = moravecUSWindowSize;
+    
+    // Starting jobs
+    
+    if( processImg1 )
+    {
+      dummyJob.jobFuncParsPtr_ = (void*)&img1pars;
+      jobsMan_.executeJob( dummyJob );     
+      
+      dummyJob.jobFuncParsPtr_ = (void*)&img1dspars;
+      jobsMan_.executeJob( dummyJob ); 
+      
+      if( enable_upsampled_filter )
+      {
+        dummyJob.jobFuncParsPtr_ = (void*)&img1uspars;
+        jobsMan_.executeJob( dummyJob ); 
+      }
+    }
+    
+    if( processImg2 )
+    {
+      dummyJob.jobFuncParsPtr_ = (void*)&img2pars;
+      jobsMan_.executeJob( dummyJob );     
+      
+      dummyJob.jobFuncParsPtr_ = (void*)&img2dspars;
+      jobsMan_.executeJob( dummyJob );   
+      
+      if( enable_upsampled_filter )
+      {
+        dummyJob.jobFuncParsPtr_ = (void*)&img2uspars;
+        jobsMan_.executeJob( dummyJob );   
+      }
+    }
+    
+    // Waiting all jobs to finish
+    
+    jobsMan_.waitAllToFinish();
+    
+    TEAGN_TRUE_OR_RETURN( img1pars.returnValue_, 
+      "Error loocking for maximas" )
+    TEAGN_TRUE_OR_RETURN( img1dspars.returnValue_,
+      "Error loocking for maximas" )
+    TEAGN_TRUE_OR_RETURN( img1uspars.returnValue_, 
+      "Error loocking for maximas" )
+    TEAGN_TRUE_OR_RETURN( img2pars.returnValue_, 
+      "Error loocking for maximas" )
+    TEAGN_TRUE_OR_RETURN( img2dspars.returnValue_, 
+      "Error loocking for maximas" )
+    TEAGN_TRUE_OR_RETURN( img2uspars.returnValue_, 
+      "Error loocking for maximas" )
+  }
+  
+/*
+matrix2Tiff( *img1_matrix_ptr, "img1_matrix_ptr_max.tif",
+  img1_maximas_list_ );
+matrix2Tiff( *img1_matrix_ds_ptr, "img1_matrix_ds_ptr_max.tif",
+  img1ds_maximas_list );
+matrix2Tiff( *img1_matrix_us_ptr, "img1_matrix_us_ptr_max.tif",
+  img1us_maximas_list );
+matrix2Tiff( *img2_matrix_ptr, "img2_matrix_ptr_max.tif",
+  img2_maximas_list_ );
+matrix2Tiff( *img2_matrix_ds_ptr, "img2_matrix_ds_ptr_max.tif",
+  img2ds_maximas_list );
+matrix2Tiff( *img2_matrix_us_ptr, "img2_matrix_us_ptr_max.tif",
+  img2us_maximas_list );  
+*/
+
+  // Applying moravec repeatability filter 
+  
+  if( processImg1 )
+  {
+    MaximasListT auxList;
+    
+    moravecRepeatability( img1_maximas_list_, img1ds_maximas_list,
+      img1_matrix_ds_ptr->getNCols(),
+      img1_matrix_ds_ptr->getNLines(), 
+      moravecRepeatabilityMinTolerance / moravecDownSampleFactor, 
+      moravecDownSampleFactor, auxList );
+    
+    if( enable_upsampled_filter )
+    {
+      moravecRepeatability( auxList, img1us_maximas_list,
+        img1_matrix_us_ptr->getNCols(),
+        img1_matrix_us_ptr->getNLines(), 
+        moravecRepeatabilityMinTolerance / moravecUpSampleFactor, 
+        moravecUpSampleFactor, img1_maximas_list_ );    
+    }
+    else
+    {
+      img1_maximas_list_ = auxList;
+    }
+  }
+  
+  if( processImg2 )
+  {
+    MaximasListT auxList;
+    
+    moravecRepeatability( img2_maximas_list_, img2ds_maximas_list,
+      img2_matrix_ds_ptr->getNCols(),
+      img2_matrix_ds_ptr->getNLines(), 
+      moravecRepeatabilityMinTolerance / moravecDownSampleFactor, 
+      moravecDownSampleFactor, auxList );
+    
+    if( enable_upsampled_filter )
+    {
+      moravecRepeatability( auxList, img2us_maximas_list,
+        img2_matrix_us_ptr->getNCols(),
+        img2_matrix_us_ptr->getNLines(), 
+        moravecRepeatabilityMinTolerance / moravecUpSampleFactor, 
+        moravecUpSampleFactor, img2_maximas_list_ );
+    }
+    else
+    {
+      img2_maximas_list_ = auxList;
+    }
+  }
+/*  
+matrix2Tiff( *img1_matrix_ptr, "img1_matrix_ptr_max_repeat.tif",
+  img1_maximas_list_ );
+matrix2Tiff( *img2_matrix_ptr, "img2_matrix_ptr_max_repeat.tif",
+  img2_maximas_list_ );
+*/
+  
+  img1us_maximas_list.clear();
+  img1ds_maximas_list.clear();  
+  img2us_maximas_list.clear();
+  img2ds_maximas_list.clear();
+  
+  img1_matrix_ds_ptr.reset();
+  img1_matrix_us_ptr.reset();
+  img2_matrix_ds_ptr.reset();
+  img2_matrix_us_ptr.reset();  
+  
+  // filtering out points closer to images borders to avoid
+  // correlation windows generation errors 
+
+  
+  {
+    /* The radius of a feature window rotated by 90 degrees. 
+     * over the input image */
+    const unsigned int winRadius = (unsigned int)
+      (
+        ceil( 
+          sqrt( 
+            2 
+            * 
+            ( 
+              ( (double)corr_window_width ) 
+              *
+              ( (double)corr_window_width )
+            )
+          ) / 2.0
+        )
+      );
+    
+    unsigned int img1FistValidLine = winRadius;
+    unsigned int img1FistValidCol = winRadius;
+    unsigned int img2FistValidLine = winRadius;
+    unsigned int img2FistValidCol = winRadius;
+    
+    // Removing maximas outside the image 1 allowed bondaries
+    
+    if( processImg1 )
+    {
+      unsigned int img1LinesBound = img1_matrix_ptr->getNLines() - winRadius;
+      unsigned int img1ColsBound = img1_matrix_ptr->getNCols() - winRadius;
+    
+      MaximasListT::iterator maxIt = img1_maximas_list_.begin();
+      MaximasListT::iterator maxItEnd = img1_maximas_list_.end();
+      MaximasListT::iterator maxAuxIt;
+      
+      while( maxIt != maxItEnd )
+      {
+        if( ( maxIt->first < img1FistValidCol ) ||
+          ( maxIt->first >= img1ColsBound ) || 
+          ( maxIt->second < img1FistValidLine ) ||
+          ( maxIt->second >= img1LinesBound ) )
+        {
+          maxAuxIt = maxIt;
+          ++maxIt;
+          img1_maximas_list_.erase( maxAuxIt );
+        }
+        else
+        {
+          ++maxIt;
+        }
+      }
+    }
+    
+    // Removing maximas outside the image 2 allowed bondaries
+    
+    if( processImg2 )
+    {
+      unsigned int img2LinesBound = img2_matrix_ptr->getNLines() - winRadius;
+      unsigned int img2ColsBound = img2_matrix_ptr->getNCols() - winRadius;
+    
+      MaximasListT::iterator maxIt = img2_maximas_list_.begin();
+      MaximasListT::iterator maxItEnd = img2_maximas_list_.end();
+      MaximasListT::iterator maxAuxIt;
+      
+      while( maxIt != maxItEnd )
+      {
+        if( ( maxIt->first < img2FistValidCol ) ||
+          ( maxIt->first >= img2ColsBound ) || 
+          ( maxIt->second < img2FistValidLine ) ||
+          ( maxIt->second >= img2LinesBound ) )
+        {
+          maxAuxIt = maxIt;
+          ++maxIt;
+          img2_maximas_list_.erase( maxAuxIt );
+        }
+        else
+        {
+          ++maxIt;
+        }
+      }
+    }
+  }
+  
+/*
+matrix2Tiff( *img1_matrix_ptr, "img1_matrix_ptr_max_outremoved.tif",
+  img1_maximas_list_ );
+matrix2Tiff( *img2_matrix_ptr, "img2_matrix_ptr_max_outremoved.tif",
+  img2_maximas_list_ );  
+*/
+  
+  /* Generating features matrix */
+  
+  {
+    GenerateCorrelationFeaturesParams params1;
+    
+    switch( matching_method_ )
+    {
+      case EuclidianDistMethod :
+      {
+        params1.normalizeWindows_ = true;
+        break;
+      }      
+      case NormCrossCorrMethod :
+      {
+        params1.normalizeWindows_ = true;
+        break;
+      }
+      default :
+      {
+        TEAGN_LOG_AND_THROW( "Invalid correlation method" );
+        break;
+      }
+    }
+    
+    params1.imgMatrixPtr_ = img1_matrix_ptr.nakedPointer();
+    params1.inMaximasListPtr_ = &img1_maximas_list_;
+    params1.featMtxPtr_ = &img1featMtx_;
+    params1.returnValue_ = true;
+    params1.glbMemLockPtr_ = &globalMutex_;
+    params1.corrWindowsWidth_ = corr_window_width;
+    params1.progressEnabled_ = progress_enabled_;
+    
+    GenerateCorrelationFeaturesParams params2 = params1;
+    params2.imgMatrixPtr_ = img2_matrix_ptr.nakedPointer();
+    params2.inMaximasListPtr_ = &img2_maximas_list_;
+    params2.featMtxPtr_ = &img2featMtx_;
+    
+    // Starting jobs
+    
+    TeFunctionCallThreadJob dummyJob;
+    dummyJob.jobFunc_ = generateCorrelationFeatures;
+   
+    // Starting jobs
+    
+    if( processImg1 )
+    {
+      dummyJob.jobFuncParsPtr_ = (void*)&params1;
+      jobsMan_.executeJob( dummyJob );     
+    }
+    
+    if( processImg2 )
+    {
+      dummyJob.jobFuncParsPtr_ = (void*)&params2;
+      jobsMan_.executeJob( dummyJob );       
+    }
+    
+    // Waiting all jobs to finish
+    
+    jobsMan_.waitAllToFinish();
+    
+    TEAGN_TRUE_OR_RETURN( params1.returnValue_, 
+      "Error generating correlation features" )
+    TEAGN_TRUE_OR_RETURN( params2.returnValue_,
+      "Error generating correlation features" )    
+  }
+  
+/*  
+features2Tiff( corr_window_width, img1_maximas_list_, img1featMtx, 
+  "img1feat" );
+features2Tiff( corr_window_width, img2_maximas_list_, img2featMtx, 
+  "img2feat" ); 
+*/
+  
+  // Generating tie-points (images boxes reference)
+  
+  TEAGN_TRUE_OR_RETURN( matchFeatures( matching_method_, img1featMtx_,
+    img1_maximas_list_, img2featMtx_, img2_maximas_list_, *out_tie_points_ptr
+    ), "Error generating tie-points" );
+  
+/*  
+matrix2Tiff( *img1_matrix_ptr, "img1_matrix_ptr_tps.tif",
+  *out_tie_points_ptr, true );
+matrix2Tiff( *img2_matrix_ptr, "img2_matrix_ptr_tps.tif",
+  *out_tie_points_ptr, false );      
+*/  
+  
+  img1_matrix_ds_ptr.reset();
+  img1_matrix_us_ptr.reset();  
+    
+  // Bring tie-points to original images reference
+    
+  {
+    for( unsigned int tpsVecIdx = 0 ; tpsVecIdx < 
+      out_tie_points_ptr->size() ; ++tpsVecIdx )
+    {
+      TeCoordPair& coordPair = out_tie_points_ptr->operator[]( tpsVecIdx );
+      
+      coordPair.pt1.x( ( coordPair.pt1.x() / i1XRescFact ) + (double)orig_box1_x_off );
+      coordPair.pt1.y( ( coordPair.pt1.y() / i1YRescFact ) + (double)orig_box1_y_off );
+      
+      coordPair.pt2.x( ( coordPair.pt2.x() / i2XRescFact ) + (double)orig_box2_x_off );
+      coordPair.pt2.y( ( coordPair.pt2.y() / i2YRescFact ) + (double)orig_box2_y_off );
+    }
+  }
+  
+  /* Doing geometrical filtering using user supplied 
+     geometrical transformation parameters */
+     
+  if( ! skip_geom_filter ) {
+    gt_params.tiepoints_ = (*out_tie_points_ptr);
+       
+    TeGeometricTransformation::pointer trans_ptr( 
+      TeGTFactory::make( gt_params ) );
+    if( trans_ptr->reset( gt_params ) ) {
+      trans_ptr->getParameters( gt_params );
+      
+      /* updating the output tie points */
+      
+      (*out_tie_points_ptr) = gt_params.tiepoints_;
+      
+      /* updating the output gt_params, if available */
+      
+      TeGTParams::pointer out_gt_params_ptr;
+      if( params_.CheckParameter< TeGTParams::pointer >( 
+        "out_gt_params_ptr" ) ) 
+      {
+        params_.GetParameter( "out_gt_params_ptr", out_gt_params_ptr );
+        
+        *out_gt_params_ptr = gt_params;
+      }       
+    } else {
+      out_tie_points_ptr->clear();
+    }
+  }
+  
+  // So far.... so good !!
+  
+  return true;
+}
+
+
+void TePDIMMIOMatching::ResetState( const TePDIParameters& params )
+{
+  // Do we need to re-process input image 1 ??
+  
+  FeatMatchingMethod matching_method = NormCrossCorrMethod;
+  if( params.CheckParameter< FeatMatchingMethod >( 
+    "matching_method" ) ) 
+  {
+    params.GetParameter( "matching_method", matching_method );
+  }   
+  
+  TePDITypes::TePDIRasterPtrType input_image1_ptr;
+  params.GetParameter( "input_image1_ptr", input_image1_ptr ); 
+  
+  unsigned int input_channel1 = 0;
+  params.GetParameter( "input_channel1", input_channel1 );
+  
+  TeBox input_box1;
+  if( params.CheckParameter< TeBox >( "input_box1" ) ) {
+    params.GetParameter( "input_box1", input_box1 );
+  } else {
+    TeBox input_box1_proj = input_image1_ptr->params().box();
+    
+    TePDIUtils::MapCoords2RasterIndexes( input_box1_proj, input_image1_ptr,
+      input_box1 );
+  }   
+  
+  if( ( matching_method_ != matching_method ) || ( input_image1_ptr != 
+    input_image1_ptr_ ) || ( input_channel1 != 
+    input_channel1_ ) || ( input_box1 != input_box1_ ) )
+  {
+    img1featMtx_.Reset();
+    img1_maximas_list_.clear();
+  }
+  
+  // Do we need to re-process input image 2 ??
+  
+  TePDITypes::TePDIRasterPtrType input_image2_ptr;
+  params.GetParameter( "input_image2_ptr", input_image2_ptr ); 
+  
+  unsigned int input_channel2 = 0;
+  params.GetParameter( "input_channel2", input_channel2 );
+  
+  TeBox input_box2;
+  if( params.CheckParameter< TeBox >( "input_box2" ) ) {
+    params.GetParameter( "input_box2", input_box2 );
+  } else {
+    TeBox input_box2_proj = input_image2_ptr->params().box();
+    
+    TePDIUtils::MapCoords2RasterIndexes( input_box2_proj, input_image2_ptr,
+      input_box2 );
+  }    
+  
+  if( ( matching_method_ != matching_method ) || ( input_image2_ptr != 
+    input_image2_ptr_ ) || ( input_channel2 != 
+    input_channel2_ ) || ( input_box2 != input_box2_ ) )
+  {
+    img2featMtx_.Reset();
+    img2_maximas_list_.clear();
+  }
+  
+  matching_method_ = matching_method;
+  input_image1_ptr_ = input_image1_ptr;
+  input_channel1_ = input_channel1;
+  input_box1_ = input_box1;  
+  input_image2_ptr_ = input_image2_ptr;
+  input_channel2_ = input_channel2; 
+  input_box2_ = input_box2;
+}
+
+
+void TePDIMMIOMatching::loadImage( void * paramsPtr )
+{
+ /* Retriving parameters */
+  
+  LoadImageParams& params = *( (LoadImageParams*) paramsPtr );
+  
+  params.returnValue_ = false;
+  
+  // Loading original image box
+  
+  const unsigned int origBoxRescNLines = (unsigned int)(
+    params.in_box_nlines_ * params.origImgYRescFact_ );
+  const unsigned int origBoxRescNCols = (unsigned int)(
+    params.in_box_ncols_ * params.origImgXRescFact_ );
+  
+  {
+    // Allocating resources 
+    
+    params.glb_mem_lock_ptr_->lock();
+    
+    if( ! params.img_matrix_ptr_->reset( origBoxRescNLines, 
+      origBoxRescNCols ) )
+    {
+      TEAGN_LOGERR( "Unable to allocate space for the loaded image" )
+      params.glb_mem_lock_ptr_->unLock();
+      return;
+    }
+      
+    params.glb_mem_lock_ptr_->unLock();
+    
+    // Interpolator - if needed
+    
+    TePDIInterpolator::InterpMethod intMethod = 
+      TePDIInterpolator::NNMethod;
+    if( ( params.origImgXRescFact_ != 1.0 ) || 
+      ( params.origImgYRescFact_ != 1.0 ) )
+    {
+      intMethod = TePDIInterpolator::BicubicMethod;
+    }
+    
+    TePDIInterpolator interp;
+    TEAGN_TRUE_OR_THROW( interp.reset( params.input_image_ptr_,
+      intMethod,
+      params.input_image_ptr_->params().useDummy_ ?
+      params.input_image_ptr_->params().dummy_[ params.input_image_channel_ ] : 
+      0 ), "Interpolator error" );    
+      
+    unsigned int curr_out_line = 0;
+    unsigned int curr_out_col = 0;
+    unsigned int curr_input_line = 0;
+    unsigned int curr_input_col = 0;
+    double value = 0;
+    TeRaster& inputRasterRef = (*params.input_image_ptr_);
+    
+    TePDIPIManager progress( "Loading image data", params.in_box_nlines_, 
+       params.progress_enabled_ );
+    
+    for( curr_out_line = 0 ; curr_out_line < origBoxRescNLines ; 
+      ++curr_out_line ) {
+      
+      curr_input_line = (unsigned int)( ( ( (double)curr_out_line ) / 
+        params.origImgYRescFact_ ) + ( (double) params.in_box_y_off_ ) );      
+      
+      for( curr_out_col = 0 ; curr_out_col < origBoxRescNCols ; 
+        ++curr_out_col ) {
+        
+        curr_input_col = (unsigned int)( ( ( (double)curr_out_col ) / 
+            params.origImgXRescFact_ ) + ( (double) params.in_box_x_off_ ) );        
+        
+        inputRasterRef.getElement( curr_input_col, curr_input_line,
+          value, params.input_image_channel_ );
+        
+        params.img_matrix_ptr_->setValue( curr_out_line, curr_out_col, 
+          value );
+      }
+      
+      if( progress.Increment() )
+      {
+        TEAGN_LOGMSG( "Canceled by the user" );
+        return;
+      }
+    }
+  }
+  
+  // Retriving raster channel max and min channel allowed values
+  
+  double rasterChnMin = 0;
+  double rasterChnMax = 0;
+  
+  if( ! TePDIUtils::TeGetRasterMinMaxBounds( 
+    params.input_image_ptr_,
+    params.input_image_channel_, rasterChnMin, rasterChnMax ) )
+  {
+     TEAGN_LOGERR( "Error getting channels bounds" );  
+     return;
+  }
+  
+  // Loading downsampled image box
+  
+  {
+    const unsigned int out_box_nlines = (unsigned int)
+      ( ((double)origBoxRescNLines) / params.moravecDownSampleFactor_ );
+    const unsigned int out_box_ncols = (unsigned int)
+      ( ((double)origBoxRescNCols) / params.moravecDownSampleFactor_ );
+    
+    if( ! bicubicResampleMatrix( *( params.img_matrix_ptr_ ), out_box_nlines,
+      out_box_ncols, params.progress_enabled_, *(params.glb_mem_lock_ptr_),
+      rasterChnMin, rasterChnMax, *( params.img_matrix_ds_ptr_ ) ) )
+    {
+      TEAGN_LOGERR( "Error generating downsampled image" );
+      return;
+    }
+  }
+  
+  // Loading upsampled image box
+  
+  if( params.generateUpsampledImage_ )
+  {
+    // Calculating sizes for resampled boxes
+    
+    const unsigned int out_box_nlines = (unsigned int)
+      ( ((double)origBoxRescNLines) / params.moravecUpSampleFactor_ );
+    const unsigned int out_box_ncols = (unsigned int)
+      ( ((double)origBoxRescNCols) / params.moravecUpSampleFactor_ );
+    
+    if( ! bicubicResampleMatrix( *( params.img_matrix_ptr_ ), out_box_nlines,
+      out_box_ncols, params.progress_enabled_, *(params.glb_mem_lock_ptr_),
+      rasterChnMin, rasterChnMax, *( params.img_matrix_us_ptr_ ) ) )
+    {
+      TEAGN_LOGERR( "Error generating downsampled image" );
+      return;
+    }
+  }    
+  
+  params.returnValue_ = true;
+}
+
+void TePDIMMIOMatching::createImgMatrix( TeDataType dataType, 
+  TeSharedPtr< TePDIMtxDoubleAdptInt >& matrixPtr )
+{
+  switch( dataType )
+  {
+    case TeDOUBLE :
+    {
+      matrixPtr.reset( new TePDIMtxDoubleAdpt< double >( 
+        TePDIMtxDoubleAdpt< double >::AutoMemPol ) );
+      break;
+    }
+    case TeFLOAT :
+    {
+      matrixPtr.reset( new TePDIMtxDoubleAdpt< float >( 
+        TePDIMtxDoubleAdpt< float >::AutoMemPol ) );
+      break;
+    }
+    case TeLONG :
+    {
+      matrixPtr.reset( new TePDIMtxDoubleAdpt< long int >( 
+        TePDIMtxDoubleAdpt< long int >::AutoMemPol ) );
+      break;
+    }
+    case TeUNSIGNEDLONG :
+    {
+      matrixPtr.reset( new TePDIMtxDoubleAdpt< unsigned long int >( 
+        TePDIMtxDoubleAdpt< unsigned long int >::AutoMemPol ) );
+      break;
+    }
+    case TeINTEGER :
+    {
+      matrixPtr.reset( new TePDIMtxDoubleAdpt< int >( 
+        TePDIMtxDoubleAdpt< int >::AutoMemPol ) );
+      break;
+    }
+    case TeSHORT :
+    {
+      matrixPtr.reset( new TePDIMtxDoubleAdpt< short int >( 
+        TePDIMtxDoubleAdpt< short int >::AutoMemPol ) );
+      break;
+    }
+    case TeUNSIGNEDSHORT :
+    {
+      matrixPtr.reset( new TePDIMtxDoubleAdpt< unsigned short int >( 
+        TePDIMtxDoubleAdpt< unsigned short int >::AutoMemPol ) );
+      break;
+    }
+    case TeCHAR :
+    {
+      matrixPtr.reset( new TePDIMtxDoubleAdpt< char >( 
+        TePDIMtxDoubleAdpt< char >::AutoMemPol ) );
+      break;
+    }
+    case TeUNSIGNEDCHAR :
+    {
+      matrixPtr.reset( new TePDIMtxDoubleAdpt< unsigned char >( 
+        TePDIMtxDoubleAdpt< unsigned char >::AutoMemPol ) );
+      break;
+    }
+    case TeBIT :
+    {
+      matrixPtr.reset( new TePDIMtxDoubleAdpt< unsigned char >( 
+        TePDIMtxDoubleAdpt< unsigned char >::AutoMemPol ) );
+      break;
+    }
+    default :
+    {
+      TEAGN_LOG_AND_THROW( "Invalid data type ");
+      break;
+    }
+  }
+}
+
+void TePDIMMIOMatching::extractLocalMaximas( void * paramsPtr )
+{
+ /* Retriving parameters */
+  
+  ExtractLocalMaximasParams params = *( (ExtractLocalMaximasParams*) 
+    paramsPtr );
+    
+  TEAGN_DEBUG_CONDITION( params.seachSubImagesNmb_ > 0,
+    "Invalid params.seachSubImagesNmb_" );
+    
+  ( (ExtractLocalMaximasParams*) paramsPtr )->returnValue_ = false;
+  
+  /* Fixing parameters */
+   
+  unsigned int sqrtSI = (unsigned int)ceil( sqrt( 
+    (double)params.seachSubImagesNmb_ ) );
+  if( sqrtSI == 0 ) sqrtSI = 1;
+  
+  params.seachSubImagesNmb_ = sqrtSI * sqrtSI;
+  
+  params.maximasNumber_ = MAX( params.maximasNumber_, 
+    params.seachSubImagesNmb_ );
+  params.maximasNumber_ = params.maximasNumber_ / 
+    params.seachSubImagesNmb_;  
+    
+  if( params.moravecWindowSize_ % 2 == 0 ) ++params.moravecWindowSize_;
+  
+  /* Calling the maximas extraction for each sub-image */
+  
+  const unsigned int subWindowMaxWidth = params.imgMatrixPtr_->getNCols() / 
+    sqrtSI;
+  const unsigned int subWindowMaxHeight = params.imgMatrixPtr_->getNLines() / 
+    sqrtSI;
+    
+  if( ( subWindowMaxWidth > 0 ) && ( subWindowMaxHeight > 0 ) )
+  {
+    unsigned int windColBound = 0;
+    unsigned int windLinBound = 0;
+    unsigned int windWidth = 0;
+    unsigned int windHeight = 0;
+    
+    MaximasMapT maximasMap;
+      
+    TePDIPIManager progress( "Finding local maximas",
+      ( ( params.imgMatrixPtr_->getNLines() - ( sqrtSI * 
+      params.moravecWindowSize_ ) ) / params.moravecWindowSize_ ) * sqrtSI, 
+      params.progressEnabled_ );
+      
+    for( unsigned int line = 0 ; line < params.imgMatrixPtr_->getNLines() ;
+      line += subWindowMaxHeight )
+    {
+      windLinBound = MIN( line + subWindowMaxHeight, 
+        params.imgMatrixPtr_->getNLines() );
+      windHeight = windLinBound - line;
+      
+      if( windHeight > params.moravecWindowSize_ )
+      {
+        for( unsigned int col = 0 ; col < params.imgMatrixPtr_->getNCols() ; 
+          col += subWindowMaxWidth ) 
+        {
+          windColBound = MIN( col + subWindowMaxWidth, 
+            params.imgMatrixPtr_->getNCols() );
+          windWidth = windColBound - col;
+          
+          if( windWidth > params.moravecWindowSize_ )
+          {
+            if( ! extractLocalMaximas( params, col, line, windWidth, 
+              windHeight, maximasMap, progress ) )
+            {
+              return;
+            }
+          }
+        }
+      }
+    }
+    
+    // Filtering out maximis below the variance threshold
+    
+    if( maximasMap.size() > 0 )
+    {
+      if( params.moravecMinVarianceThreshold_ > 0.0 )
+      {
+        double mean = 0;
+        MaximasMapT::iterator it = maximasMap.begin();
+        const MaximasMapT::iterator itEnd = maximasMap.end();  
+        while( it != itEnd ) 
+        {
+          mean += it->first ;
+          ++it;
+        }    
+        mean /= (double)( maximasMap.size() );
+        
+        double stddev = 0;
+        double diff = 0;
+        it = maximasMap.begin();
+        while( it != itEnd ) 
+        {
+          diff = it->first - mean;
+          stddev += ( diff * diff );
+          
+          ++it;
+        }
+        stddev /= (double)( maximasMap.size() );
+        stddev = sqrt( stddev );
+        
+        const double minAllowedVariance = mean - ( ( stddev / 2.0 ) *   
+          params.moravecMinVarianceThreshold_ );
+        
+        it = maximasMap.begin();
+        
+        while( it != itEnd ) 
+        {
+          if( it->first >= minAllowedVariance )
+            params.outMaximasListPtr_->push_back( it->second );
+          
+          ++it;
+        }
+      }
+      else
+      {
+        MaximasMapT::iterator it = maximasMap.begin();
+        MaximasMapT::iterator itEnd = maximasMap.end();  
+        
+        while( it != itEnd ) 
+        {
+          params.outMaximasListPtr_->push_back( it->second );
+          
+          ++it;
+        }
+      }
+    }
+  }
+    
+  // So far... so good !
+  
+  ( (ExtractLocalMaximasParams*) paramsPtr )->returnValue_ = true;
+}
+
+bool TePDIMMIOMatching::extractLocalMaximas( 
+  ExtractLocalMaximasParams& params,
+  unsigned int xStart, unsigned int yStart, unsigned int width,
+  unsigned int height, MaximasMapT& outMaximasMap,
+  TePDIPIManager& progress )
+{
+  TEAGN_DEBUG_CONDITION( width > params.moravecWindowSize_, 
+    "invalid block size" )
+  TEAGN_DEBUG_CONDITION( height > params.moravecWindowSize_, 
+    "invalid block size" )
+  TEAGN_DEBUG_CONDITION( ( params.moravecWindowSize_ % 2 ), 
+    "invalid moravec window size" )
+    
+    
+  // Allocating the variance values buffer
+  
+  const int windRad = (unsigned int)( params.moravecWindowSize_ / 
+    2 );    
+    
+  const unsigned int bufferLines = params.moravecWindowSize_;
+  const unsigned int bufferCols = width - ( 2 * windRad );
+  
+  TePDIMatrix< double > buffer( TePDIMatrix< double >::RAMMemPol );
+  if( ! buffer.Reset( bufferLines, bufferCols ) )
+  {
+    TEAGN_LOGERR( "Error allocating internal buffer" )
+    return false;
+  }
+
+  // Iterating over image (reference: window center) looking for maximas
+  
+  // The found maximas coords ordered by diretional variance
+  MaximasMapT maximasData;
+  
+  // Buffer over input 
+  const unsigned int imgBufStartLinesBound = yStart + height - windRad -  
+    params.moravecWindowSize_  + 1;
+  const unsigned int imgBufStartCol = xStart + windRad;
+  
+  // Internal buffer block variables
+  const unsigned int bufBlockStartLinesBound = bufferCols - ( bufferCols % 
+    params.moravecWindowSize_ ) - params.moravecWindowSize_  + 1;
+  unsigned int bufBlockStartCol = 0;
+  unsigned int bufBlockCol = 0;
+  unsigned int bufBlockLin = 0;
+
+  int offset = 0;
+  double hor_var = 0;
+  double ver_var = 0;
+  double diag_var = 0;
+  double adiag_var = 0;
+  double min_var = 0;
+  double centerValue = 0;
+  double neightValue = 0;
+  double diffValue = 0;  
+  
+  TePDIMtxDoubleAdptInt& imgMatrix = *(params.imgMatrixPtr_);
+  
+  unsigned int bufLine = 0;
+  unsigned int bufCol = 0;
+  unsigned int im_line = 0;
+  unsigned int im_col = 0;
+
+  std::pair< double, std::pair< unsigned int, unsigned int > > 
+    maxVarDataPair;
+  
+  // Starting from the first valid pixel where the variances can
+  // be calculated
+  for( unsigned int imgBufStartLine = windRad + yStart ; 
+    imgBufStartLine < imgBufStartLinesBound ; 
+    imgBufStartLine += params.moravecWindowSize_ )
+  {
+    // Generating variance information for the current buffer
+    // position over input image
+    
+    for( bufLine = 0 ; bufLine < bufferLines ; ++bufLine )
+    {
+      im_line = bufLine + imgBufStartLine;
+        
+      for( bufCol = 0 ; bufCol < bufferCols ; ++bufCol )
+      {        
+        im_col = bufCol + imgBufStartCol;
+        
+        imgMatrix.getValue( im_line, im_col, centerValue );
+        
+        hor_var = 0;
+        ver_var = 0;
+        diag_var = 0;
+        adiag_var = 0;
+    
+        for( offset = -windRad ; offset <= windRad ; ++offset )
+        {
+          imgMatrix.getValue( im_line, im_col + offset, neightValue );
+          diffValue = neightValue - centerValue;
+          hor_var += ( diffValue * diffValue );
+          
+          imgMatrix.getValue( im_line + offset, im_col, neightValue );
+          diffValue = neightValue - centerValue;
+          ver_var += ( diffValue * diffValue );
+
+          imgMatrix.getValue( im_line + offset, im_col + offset, neightValue );
+          diffValue = neightValue - centerValue;
+          diag_var += ( diffValue * diffValue );
+        
+          imgMatrix.getValue( im_line - offset, im_col + offset, neightValue );
+          diffValue = neightValue - centerValue;
+          adiag_var += ( diffValue * diffValue );
+        }
+        
+        min_var = MIN( hor_var, MIN( ver_var, MIN( diag_var, adiag_var ) ) );
+        
+        buffer[ bufLine ][ bufCol ] = min_var;
+      }
+    }
+    
+    // Selecting the higher variance levels for each window of 
+    // moravecWindowSize_ X moravecWindowSize_ from inside the 
+    // current buffer
+    
+    for( bufBlockStartCol = 0 ; bufBlockStartCol < 
+      bufBlockStartLinesBound ; bufBlockStartCol += params.moravecWindowSize_ )
+    {
+      maxVarDataPair.first = DBL_MAX * (-1.0);
+        
+      for( bufBlockLin = 0 ; bufBlockLin < params.moravecWindowSize_ ; 
+        ++bufBlockLin )
+      {
+        im_line = bufBlockLin + imgBufStartLine;
+        
+        for( bufBlockCol = 0 ; bufBlockCol < params.moravecWindowSize_ ; 
+          ++bufBlockCol )
+        {  
+          const double& bufElement = buffer[ bufBlockLin ][ bufBlockCol + 
+            bufBlockStartCol ];
+          
+          if( bufElement > maxVarDataPair.first )
+          {
+            im_col = bufBlockCol + bufBlockStartCol + imgBufStartCol;
+            
+            maxVarDataPair.first = bufElement;
+            maxVarDataPair.second.second = im_line;
+            maxVarDataPair.second.first = im_col;
+          }
+        }
+      }
+      
+      // Adding maxima point to the ordered maximas list
+
+      maximasData.insert( maxVarDataPair );
+    }
+    
+    if( progress.Increment() )
+    {
+      TEAGN_LOGERR( "Canceled by the user");
+      return false;
+    }
+  }  
+  
+  // Inserting params.maximasNumber_ maximas with higher directional 
+  // variance into output map
+  
+  unsigned int addedMaximas = 0;
+  
+  MaximasMapT::reverse_iterator it = maximasData.rbegin();  
+  MaximasMapT::reverse_iterator itEnd = maximasData.rend();  
+    
+  while( ( it != itEnd ) && ( addedMaximas < params.maximasNumber_ ) )
+  {
+    outMaximasMap.insert( *it );
+    
+    ++addedMaximas;
+    ++it;
+  }
+  
+  return true;
+}
+
+void TePDIMMIOMatching::moravecRepeatability( const MaximasListT& inputList,
+  const MaximasListT& constraintList, 
+  unsigned int constraintImageWidth,
+  unsigned int constraintImageHeight,  
+  double moravecRepeatabilityMinTolerance, 
+  double moravecReSampleFactor, 
+  MaximasListT& outputList )
+{
+  TEAGN_DEBUG_CONDITION( moravecRepeatabilityMinTolerance > 0,
+    "Invalid moravecRepeatabilityMinTolerance ")
+  TEAGN_DEBUG_CONDITION( moravecReSampleFactor > 0,
+    "Invalid moravecReSampleFactor ")
+      
+  outputList.clear();
+  
+  // Criating an RTree for seach optmization
+  
+  const TeBox myTreeBBox( -1.0, -1.0, (double)(constraintImageWidth),
+    (double)(constraintImageHeight) );  
+  
+  TeSAM::TeRTree<MaximasListNodeT const*, 8, 4> myTree( myTreeBBox );
+  
+  {
+    MaximasListT::const_iterator cListIt = constraintList.begin();
+    MaximasListT::const_iterator cListItEnd = constraintList.end();
+    TeBox auxBox;
+    
+    while( cListIt != cListItEnd )
+    {
+      auxBox.x1_ = (double)(cListIt->first) - moravecRepeatabilityMinTolerance;
+      auxBox.y1_ = (double)(cListIt->second) - moravecRepeatabilityMinTolerance;
+      
+      auxBox.x2_ = (double)(cListIt->first) + moravecRepeatabilityMinTolerance;
+      auxBox.y2_ = (double)(cListIt->second) + moravecRepeatabilityMinTolerance;
+      
+      myTree.insert( auxBox, &(*cListIt) );
+          
+      ++cListIt;
+    }
+  }
+  
+  // Iterating over input list
+  
+  MaximasListT::const_iterator iListIt = inputList.begin();
+  MaximasListT::const_iterator iListItEnd = inputList.end();
+  std::vector< MaximasListNodeT const* > resultVec;
+  TeBox auxBox;
+    
+  while( iListIt != iListItEnd )
+  {
+    const MaximasListNodeT& iListEle = *iListIt;
+    
+    auxBox.x1_ = auxBox.x2_ = iListEle.first / moravecReSampleFactor;
+    auxBox.y1_ = auxBox.y2_ = iListEle.second / moravecReSampleFactor;
+    
+    if( myTree.search( auxBox, resultVec ) )
+    {
+      outputList.push_back( iListEle );  
+    }
+    
+    ++iListIt;  
+  }
+  
+  return;
+}
+
+void TePDIMMIOMatching::generateCorrelationFeatures( void * paramsPtr )
+{
+  /* Retriving parameters */
+  
+  GenerateCorrelationFeaturesParams& params = 
+    *( (GenerateCorrelationFeaturesParams*) paramsPtr );
+  
+  const TePDIMtxDoubleAdptInt& img_matrix = *(params.imgMatrixPtr_);
+  
+  TePDIMatrix< double >& img_features_matrix = *( params.featMtxPtr_);
+  
+  params.returnValue_ = false;
+    
+  if( params.inMaximasListPtr_->size() > 0 ) {
+    /* Allocating output matrix */
+       
+    params.glbMemLockPtr_->lock();
+    
+    if( ! params.featMtxPtr_->Reset( params.inMaximasListPtr_->size(),
+      params.corrWindowsWidth_ * params.corrWindowsWidth_,
+      TePDIMatrix< double >::RAMMemPol ) )
+    {
+      TEAGN_LOGERR( "Error allocating image features matrix" )
+      params.glbMemLockPtr_->unLock();
+      return;
+    }
+      
+    params.glbMemLockPtr_->unLock();
+      
+    /* variables related to the current window over the hole image */
+    unsigned int curr_window_x_start = 0;
+    unsigned int curr_window_y_start = 0;
+    unsigned int curr_window_x_center = 0;
+    unsigned int curr_window_y_center = 0;
+    unsigned int curr_window_x_bound = 0;
+    unsigned int curr_window_y_bound = 0;
+    
+    /*used on the rotation calcule */
+
+    const unsigned int wind_radius = params.corrWindowsWidth_ / 2;
+    // output window radius
+    const double wind_radius_double = (double)wind_radius;
+
+    const unsigned int img_features_matrix_cols = 
+      params.featMtxPtr_->GetColumns();
+    unsigned int curr_x = 0;
+    unsigned int curr_y = 0;
+    double curr_x_minus_radius = 0;
+    double curr_y_minus_radius = 0;
+    unsigned int curr_offset = 0;
+    double int_x_dir = 0;
+    double int_y_dir = 0;
+    double int_norm = 0;
+    double rotated_curr_x = 0;/* rotaded coord - window ref */
+    double rotated_curr_y = 0;/* rotaded coord - window ref */
+    
+     /* the found rotation parameters */
+    double rot_cos = 0;
+    double rot_sin = 0;
+    
+    /* the coords rotated but in the hole image reference */
+    int rotated_curr_x_img = 0;
+    int rotated_curr_y_img = 0;
+    
+    /* current window mean and standart deviation */
+    double curr_wind_mean = 0.0;
+    double curr_wind_stddev = 0.0;
+    double curr_wind_stddev_aux = 0.0;
+    
+    // used on intensity vector calcule
+    double imgMatrixValue1 = 0;
+    double imgMatrixValue2 = 0;
+    
+    TePDIPIManager progress( "Generating correlation windows",
+      params.inMaximasListPtr_->size(), params.progressEnabled_ );
+    
+    MaximasListT::const_iterator maximIt = params.inMaximasListPtr_->begin();
+    MaximasListT::const_iterator maximItEnd = params.inMaximasListPtr_->end();
+    unsigned int maximasListIndex = 0;
+      
+    while( maximIt != maximItEnd ) {
+      
+      /* Calculating the current window position */
+     
+      curr_window_x_center = maximIt->first;
+      curr_window_y_center = maximIt->second;
+      curr_window_x_start = curr_window_x_center - wind_radius;
+      curr_window_y_start = curr_window_y_center - wind_radius;
+      curr_window_x_bound = curr_window_x_start + params.corrWindowsWidth_;
+      curr_window_y_bound = curr_window_y_start + params.corrWindowsWidth_;
+        
+      /* Estimating the intensity vector X direction */
+      
+      for( curr_offset = 0 ; curr_offset < wind_radius ;
+        ++curr_offset ) {      
+
+        for( curr_y = curr_window_y_start ; curr_y < curr_window_y_bound ; 
+          ++curr_y ) 
+        {
+          img_matrix.getValue( curr_y, curr_window_x_bound - 1 - curr_offset, 
+             imgMatrixValue1 );
+          img_matrix.getValue( curr_y, curr_window_x_start + curr_offset, 
+             imgMatrixValue2 );
+        
+          int_x_dir += imgMatrixValue1 - imgMatrixValue2;
+        }
+      }
+      
+      int_x_dir /= ( 2.0 * ( (double) wind_radius ) );
+      
+      /* Estimating the intensity vector y direction */
+      
+      for( curr_offset = 0 ; curr_offset < wind_radius ;
+        ++curr_offset ) {      
+
+        for( curr_x = curr_window_x_start ; 
+          curr_x < curr_window_x_bound ;
+          ++curr_x ) 
+        {
+          img_matrix.getValue( curr_window_y_start + curr_offset, curr_x , 
+            imgMatrixValue1 );
+          img_matrix.getValue( curr_window_y_bound - 1 - curr_offset, 
+            curr_x, imgMatrixValue2 );          
+        
+          int_y_dir += imgMatrixValue1 - imgMatrixValue2;
+        }
+      }      
+      
+      int_y_dir /= ( 2.0 * ( (double) wind_radius ) );
+      
+      /* Calculating the rotation parameters - 
+         counterclockwise rotation 
+         
+         | u |    |cos  -sin|   |X|
+         | v | == |sin   cos| x |Y|
+      */
+      int_norm = sqrt( ( int_x_dir * int_x_dir ) + 
+        ( int_y_dir * int_y_dir ) );
+      
+      if( int_norm != 0.0 ) {
+        rot_cos = int_x_dir / int_norm;
+        rot_sin = int_y_dir / int_norm;
+      } else {
+        /* No rotation */
+        rot_cos = 1.0;
+        rot_sin = 0.0;
+      }
+      
+      /* Generating the rotated window data and inserting it into 
+         the img_features_matrix by setting the intensity vector
+         to the direction (1,0) by a clockwise rotation
+         using the inverse matrix 
+      
+         | u |    |cos   sin|   |X|
+         | v | == |-sin  cos| x |Y|
+      */
+         
+      for( curr_y = 0 ; curr_y < params.corrWindowsWidth_ ; ++curr_y ) 
+      {
+        for( curr_x = 0 ; curr_x < params.corrWindowsWidth_ ; ++curr_x ) 
+        {
+          /* briging the window to the coord system center */
+          
+          curr_x_minus_radius = ((double)curr_x) - 
+            wind_radius_double;
+          curr_y_minus_radius = ((double)curr_y) - 
+            wind_radius_double;
+          
+          /* rotating the centered window */
+          
+          rotated_curr_x = 
+            ( ( rot_cos * curr_x_minus_radius ) + 
+            ( rot_sin * curr_y_minus_radius ) );
+          
+          rotated_curr_y =
+            ( ( -1.0 * rot_sin * curr_x_minus_radius ) + 
+            ( rot_cos * curr_y_minus_radius ) );
+            
+          /* bringing the window back to its original
+             location with the correct new scale */ 
+            
+          rotated_curr_x += wind_radius_double;
+          rotated_curr_y += wind_radius_double;
+          
+          /* copy the new rotated window to the output vector */
+            
+          rotated_curr_x_img = curr_window_x_start +
+            TeRound( rotated_curr_x );
+          rotated_curr_y_img = curr_window_y_start +
+            TeRound( rotated_curr_y );                        
+           
+          if( ( rotated_curr_x_img > 0 ) &&  
+            ( rotated_curr_x_img < (int)img_matrix.getNCols() ) &&
+            ( rotated_curr_y_img > 0 ) &&
+            ( rotated_curr_y_img < (int)img_matrix.getNLines() ) )
+          {
+            img_matrix.getValue( rotated_curr_y_img, rotated_curr_x_img, 
+              imgMatrixValue1 ); 
+          }
+          else
+          {
+            TEAGN_LOGERR( "Invalid matrix position -> rotated_curr_y_img=" +
+              Te2String( rotated_curr_y_img ) + " img_matrix.getNLines()=" +
+              Te2String( img_matrix.getNLines() ) + " Processing point [" + Te2String( curr_window_x_center, 1 ) +
+              "," + Te2String( curr_window_y_center, 1 ) + "] ");
+          
+            imgMatrixValue1 = 0;
+          }
+            
+          img_features_matrix( maximasListIndex, ( curr_y * 
+            params.corrWindowsWidth_ ) + curr_x ) = imgMatrixValue1;
+
+        }
+      }
+      
+      /* Normalizing the generated window by subtracting its mean
+         and dividing by its standard deviation */      
+      
+      if( params.normalizeWindows_ )
+      {
+        curr_wind_mean = 0.0;
+        
+        for( curr_x = 0 ; curr_x < img_features_matrix_cols ; 
+          ++curr_x ) {
+          
+          curr_wind_mean += img_features_matrix( maximasListIndex,
+            curr_x );
+        }
+        
+        curr_wind_mean /= ( (double)img_features_matrix_cols  );
+        
+        curr_wind_stddev = 0.0;  
+        
+        for( curr_x = 0 ; curr_x < img_features_matrix_cols ; 
+          ++curr_x ) {
+          
+          curr_wind_stddev_aux = img_features_matrix( 
+            maximasListIndex, curr_x ) - curr_wind_mean;
+            
+          curr_wind_stddev += ( curr_wind_stddev_aux *
+            curr_wind_stddev_aux );
+        }      
+        
+        curr_wind_stddev /= ( (double)img_features_matrix_cols  );
+        curr_wind_stddev = sqrt( curr_wind_stddev );
+        
+        if( curr_wind_stddev == 0.0 ) {
+          for( curr_x = 0 ; curr_x < img_features_matrix_cols ; 
+            ++curr_x ) {
+            
+            double& curr_value = img_features_matrix( 
+              maximasListIndex, curr_x );
+            
+            curr_value -= curr_wind_mean;
+          } 
+        } else {
+          for( curr_x = 0 ; curr_x < img_features_matrix_cols ; 
+            ++curr_x ) {
+            
+            double& curr_value = img_features_matrix( 
+              maximasListIndex, curr_x );
+            
+            curr_value -= curr_wind_mean;
+            curr_value /= curr_wind_stddev;
+          }
+        }
+      }
+      
+      /* Finished !! */
+     
+      if( progress.Increment() )
+      {
+        TEAGN_LOGERR( "Canceled by the user" );
+        return;
+      }
+      
+      ++maximasListIndex;
+      ++maximIt;
+    }
+  }    
+  
+  params.returnValue_ = true;
+}
+
+bool TePDIMMIOMatching::matchFeatures( FeatMatchingMethod matching_method,
+  const TePDIMatrix< double >& img1featMtx,
+  const MaximasListT& img1_maximas_list,
+  const TePDIMatrix< double >& img2featMtx,
+  const MaximasListT& img2_maximas_list,
+  TeCoordPairVect& tiePointsVec )
+{
+  if( ( img1featMtx.GetLines() == 0 ) || ( img2featMtx.GetLines() == 0 ) )
+  {
+    return true;
+  }
+  
+  TEAGN_DEBUG_CONDITION( ( img1featMtx.GetLines() == 
+    img1_maximas_list.size() ), "Size mismatch" )
+  TEAGN_DEBUG_CONDITION( ( img2featMtx.GetLines() == 
+    img2_maximas_list.size() ), "Size mismatch" )    
+  TEAGN_DEBUG_CONDITION( ( img1featMtx.GetColumns() == 
+    img2featMtx.GetColumns() ), "Size mismatch" )
+    
+  tiePointsVec.clear();
+  
+  // Init matching matrix
+  
+  TePDIMatrix<double> matchMatrix;
+  TEAGN_TRUE_OR_RETURN( matchMatrix.Reset( img1_maximas_list.size(),
+    img2_maximas_list.size(), TePDIMatrix<double>::RAMMemPol ),
+    "Error allocating memory" );  
+  
+  const unsigned int mMCols = matchMatrix.GetColumns();
+  const unsigned int mMLines = matchMatrix.GetLines();  
+  
+  {
+    const double negativeInfinite = DBL_MAX * (-1.0);
+    double* linePtr = 0;
+    unsigned int col = 0;
+    
+    for( unsigned int line =0 ; line < mMLines ; ++line )
+    {
+      linePtr = matchMatrix[ line ];
+      
+      for( col =0 ; col < mMCols ; ++col )
+        linePtr[ col ] = negativeInfinite;
+    }
+  }
+  
+  const unsigned long int maxJobs = jobsMan_.getMaxSimulJobs() ?
+      jobsMan_.getMaxSimulJobs() : 1;
+  
+  switch( matching_method )
+  {
+    case EuclidianDistMethod :
+    {
+      // Spawning jobs
+      
+      std::vector< CalcEuclidianDistanceMtxParams > jobsParamsVec;  
+      
+      CalcEuclidianDistanceMtxParams auxPars;      
+      auxPars.img1FeatMtxPtr_ = &img1featMtx;
+      auxPars.img2FeatMtxPtr_ = &img2featMtx;
+      auxPars.matchMatrixPtr_ = &matchMatrix;
+      auxPars.progressEnabled_ = progress_enabled_;
+      auxPars.glbMutexptr_ = &globalMutex_;
+      auxPars.returnValue_ = false;
+      
+      TeFunctionCallThreadJob dummyJob;
+      dummyJob.jobFunc_ = calcEuclidianDistanceMtx;
+      
+      unsigned int jobidx = 0;
+      jobsParamsVec.resize( maxJobs );
+      
+      for( jobidx = 0 ; jobidx < maxJobs ; ++jobidx )
+      {
+        jobsParamsVec[ jobidx ] = auxPars;
+        dummyJob.jobFuncParsPtr_ = &( jobsParamsVec[ jobidx ] );
+        
+        jobsMan_.executeJob( dummyJob );
+      }
+      
+      // Waiting jobs to finish
+      
+      jobsMan_.waitAllToFinish();
+      
+      for( jobidx = 0 ; jobidx < maxJobs ; ++jobidx )
+      {
+        TEAGN_TRUE_OR_RETURN( jobsParamsVec[ jobidx ].returnValue_, 
+          "Error calculating euclidian distance" );
+      }      
+      
+      break;
+    }    
+    case NormCrossCorrMethod :
+    {
+      // Spawning jobs
+      
+      std::vector< CalcCCorrelationMtxParams > jobsParamsVec;  
+      
+      CalcCCorrelationMtxParams auxPars;      
+      auxPars.img1FeatMtxPtr_ = &img1featMtx;
+      auxPars.img2FeatMtxPtr_ = &img2featMtx;
+      auxPars.matchMatrixPtr_ = &matchMatrix;
+      auxPars.progressEnabled_ = progress_enabled_;
+      auxPars.glbMutexptr_ = &globalMutex_;
+      auxPars.returnValue_ = false;
+      
+      TeFunctionCallThreadJob dummyJob;
+      dummyJob.jobFunc_ = calcCCorrelationMtx;
+
+      unsigned int jobidx = 0;
+      jobsParamsVec.resize( maxJobs );
+      
+      for( jobidx = 0 ; jobidx < maxJobs ; ++jobidx )
+      {
+        jobsParamsVec[ jobidx ] = auxPars;
+        dummyJob.jobFuncParsPtr_ = &( jobsParamsVec[ jobidx ] );
+        
+        jobsMan_.executeJob( dummyJob );
+      }
+      
+      // Waiting jobs to finish
+      
+      jobsMan_.waitAllToFinish();
+      
+      for( jobidx = 0 ; jobidx < maxJobs ; ++jobidx )
+      {
+        TEAGN_TRUE_OR_RETURN( jobsParamsVec[ jobidx ].returnValue_, 
+          "Error calculating euclidian distance" );
+      }      
+      
+      break;
+    }
+    default :
+    {
+      TEAGN_LOG_AND_THROW( "Invalid method")
+      break;
+    }
+  }
+  
+  // Finding best matchings
+  
+  // Feature 1 desires to match with the feature 2 with the index
+  // indicated by this vector
+  std::vector< unsigned int> feat1Tofeat2( matchMatrix.GetLines(),
+    matchMatrix.GetColumns() );  
+  
+  // Feature 2 desires to match with the feature 1 with the index
+  // indicated by this vector
+  std::vector< unsigned int> feat2Tofeat1( matchMatrix.GetColumns(),
+    matchMatrix.GetLines() );     
+  
+  switch( matching_method )
+  {
+    case EuclidianDistMethod :
+    {  
+      // minimum values found on each column
+      std::vector< double > colsMinsVec( matchMatrix.GetColumns(), 
+        DBL_MAX );
+      
+      // minimum values found on each line
+      std::vector< double > linesMinsVec( matchMatrix.GetLines(), 
+        DBL_MAX );
+      
+      double const* linePtr = 0;
+      unsigned int mMLine =0;
+      unsigned int mMCol =0;
+      
+      TePDIPIManager progress( "Matching features",
+        mMLines, progress_enabled_ );       
+      
+      for( mMLine =0 ; mMLine < mMLines ; ++mMLine )
+      {
+        linePtr = matchMatrix[ mMLine ];
+        
+        for( mMCol =0 ; mMCol < mMCols ; ++mMCol )
+        {
+          const double& value = linePtr[ mMCol ];
+          
+          if( value < linesMinsVec[ mMLine ] )
+          {
+            linesMinsVec[ mMLine ] = value;
+            feat1Tofeat2[ mMLine ] = mMCol;
+          }
+          
+          if( value < colsMinsVec[ mMCol ] )
+          {
+            colsMinsVec[ mMCol ] = value;
+            feat2Tofeat1[ mMCol ] = mMLine;
+          }          
+        }
+        
+        if( progress.Increment() )
+        {
+          TEAGN_LOGERR( "Canceled by the user" );
+          return false;
+        }           
+      }
+      
+      break;
+    }
+    case NormCrossCorrMethod :
+    {
+     // maximum values found on each column
+      std::vector< double > colsMaxsVec( matchMatrix.GetColumns(), 
+        (-1.0) * DBL_MAX );
+      
+      // maximum values found on each line
+      std::vector< double > linesMaxsVec( matchMatrix.GetLines(), 
+        (-1.0) * DBL_MAX );
+      
+      double const* linePtr = 0;
+      unsigned int mMLine =0;
+      unsigned int mMCol =0;
+      
+      TePDIPIManager progress( "Matching features",
+        mMLines, progress_enabled_ );       
+      
+      for( mMLine =0 ; mMLine < mMLines ; ++mMLine )
+      {
+        linePtr = matchMatrix[ mMLine ];
+        
+        for( mMCol =0 ; mMCol < mMCols ; ++mMCol )
+        {
+          const double& value = linePtr[ mMCol ];
+          
+          if( value > linesMaxsVec[ mMLine ] )
+          {
+            linesMaxsVec[ mMLine ] = value;
+            feat1Tofeat2[ mMLine ] = mMCol;
+          }
+          
+          if( value > colsMaxsVec[ mMCol ] )
+          {
+            colsMaxsVec[ mMCol ] = value;
+            feat2Tofeat1[ mMCol ] = mMLine;
+          }          
+        }
+        
+        if( progress.Increment() )
+        {
+          TEAGN_LOGERR( "Canceled by the user" );
+          return false;
+        }           
+      }
+      
+      break;
+    }
+    default :
+    {
+      TEAGN_LOG_AND_THROW( "Invalid method")
+      break;
+    }
+  }
+  
+  // Generating tie-points
+  
+  {
+    MaximasListT::const_iterator mList1It = img1_maximas_list.begin();
+    MaximasListT::const_iterator mList2It;
+    TeCoordPair dummyCPair;
+    
+    for( unsigned int feat1Tofeat2_idx = 0 ; feat1Tofeat2_idx < 
+      feat1Tofeat2.size() ; ++feat1Tofeat2_idx )
+    {
+      // feature1 wants to match with the feature 2 with index
+      // feat1Tofeat2[ feat1Tofeat2_idx ]
+      if( feat1Tofeat2[ feat1Tofeat2_idx ] < feat2Tofeat1.size() )
+      {
+        // does feature 2 wants to match back ??
+        if( feat2Tofeat1[ feat1Tofeat2[ feat1Tofeat2_idx ] ] ==
+          feat1Tofeat2_idx )
+        { // Great !!! we hava a match
+        
+          // move an iterator to the correct maximas list 2 position
+          
+          mList2It = img2_maximas_list.begin();
+          for( unsigned int maxList2dx = 0 ; maxList2dx < 
+            feat1Tofeat2[ feat1Tofeat2_idx ] ; ++maxList2dx )
+          {
+            ++mList2It;
+          }
+          
+          // Generating the new tie-point
+          
+          dummyCPair.pt1.x( mList1It->first );
+          dummyCPair.pt1.y( mList1It->second );
+          dummyCPair.pt2.x( mList2It->first );
+          dummyCPair.pt2.y( mList2It->second );
+          
+          tiePointsVec.push_back( dummyCPair );
+        }
+      }
+      
+      ++mList1It;
+    }
+  }
+  
+  return true;
+}
+
+void TePDIMMIOMatching::calcEuclidianDistanceMtx( void * paramsPtr )
+{
+  CalcEuclidianDistanceMtxParams& params = 
+    *((CalcEuclidianDistanceMtxParams*)paramsPtr );
+  
+  params.returnValue_ = false;
+  
+  TEAGN_DEBUG_CONDITION( params.matchMatrixPtr_->GetLines() ==
+    params.img1FeatMtxPtr_->GetLines(), "Size mismatch" )
+  TEAGN_DEBUG_CONDITION( params.matchMatrixPtr_->GetColumns() ==
+    params.img2FeatMtxPtr_->GetLines(), "Size mismatch" )
+  TEAGN_DEBUG_CONDITION( params.img1FeatMtxPtr_->GetColumns() ==
+    params.img2FeatMtxPtr_->GetColumns(), "Size mismatch" )    
+    
+  TePDIMatrix< double >& matchMatrix = *params.matchMatrixPtr_;
+  const TePDIMatrix< double >& img1FeatMtx = *(params.img1FeatMtxPtr_);
+  const TePDIMatrix< double >& img2FeatMtx = *(params.img2FeatMtxPtr_);
+  const unsigned int matchMatrixLines = matchMatrix.GetLines();
+  const unsigned int matchMatrixCols = matchMatrix.GetColumns();
+  unsigned int notProcLine = 0;
+  unsigned int notProcCol = 0;
+  const double negativeInfinite = DBL_MAX * (-1.0);
+  double const* feat1Ptr = 0;
+  double const* feat2Ptr = 0;
+  double eucDist = 0;
+  double diff = 0;
+  unsigned int featCol = 0;
+  const unsigned int featSize = img1FeatMtx.GetColumns();
+  double* mMLinePtr = 0;
+  
+  // Loocking for a not processed cell
+  
+  TePDIPIManager progress( "Calculating Euclidian distance matrix",
+    matchMatrixLines, params.progressEnabled_ );  
+  
+  for( notProcLine = 0 ; notProcLine < matchMatrixLines ; ++notProcLine )
+  {
+    mMLinePtr = matchMatrix[ notProcLine ];
+    
+    for( notProcCol = 0 ; notProcCol < matchMatrixCols ; ++notProcCol )
+    {
+      params.glbMutexptr_->lock();
+      
+      double& mMElem = mMLinePtr[ notProcCol ];
+      
+      if( mMElem == negativeInfinite )
+      {
+        // mark as under processing 
+        mMElem = 0;
+        
+        params.glbMutexptr_->unLock();
+        
+        // Calculating distance
+        
+        feat1Ptr = img1FeatMtx[ notProcLine ];
+        feat2Ptr = img2FeatMtx[ notProcCol ];
+        
+        eucDist = 0;
+        
+        for( featCol = 0 ; featCol < featSize ; ++featCol )
+        {
+          diff = feat1Ptr[ featCol ] - feat2Ptr[ featCol ];
+          
+          diff *= diff;
+          
+          eucDist += diff;
+        }
+        
+        mMElem = sqrt( eucDist );
+      }
+      else
+      {
+        params.glbMutexptr_->unLock();
+      }
+    }
+    
+    if( progress.Increment() )
+    {
+      TEAGN_LOGERR( "Canceled by the user" );
+      return;
+    }    
+  }
+  
+  params.returnValue_ = true;
+}
+
+void TePDIMMIOMatching::calcCCorrelationMtx( void * paramsPtr )
+{
+  CalcCCorrelationMtxParams& params = 
+    *((CalcCCorrelationMtxParams*)paramsPtr );
+  
+  params.returnValue_ = false;
+  
+  TEAGN_DEBUG_CONDITION( params.matchMatrixPtr_->GetLines() ==
+    params.img1FeatMtxPtr_->GetLines(), "Size mismatch" )
+  TEAGN_DEBUG_CONDITION( params.matchMatrixPtr_->GetColumns() ==
+    params.img2FeatMtxPtr_->GetLines(), "Size mismatch" )
+  TEAGN_DEBUG_CONDITION( params.img1FeatMtxPtr_->GetColumns() ==
+    params.img2FeatMtxPtr_->GetColumns(), "Size mismatch" )    
+    
+  TePDIMatrix< double >& matchMatrix = *params.matchMatrixPtr_;
+  const TePDIMatrix< double >& img1FeatMtx = *(params.img1FeatMtxPtr_);
+  const TePDIMatrix< double >& img2FeatMtx = *(params.img2FeatMtxPtr_);
+  const unsigned int matchMatrixLines = matchMatrix.GetLines();
+  const unsigned int matchMatrixCols = matchMatrix.GetColumns();
+  unsigned int notProcLine = 0;
+  unsigned int notProcCol = 0;
+  const double negativeInfinite = DBL_MAX * (-1.0);
+  double const* feat1Ptr = 0;
+  double const* feat2Ptr = 0;
+  double sumAA = 0;
+  double sumBB = 0;
+  double ccorrelation = 0;
+  double cc_norm = 0;
+  unsigned int featCol = 0;
+  const unsigned int featSize = img1FeatMtx.GetColumns();
+  double* mMLinePtr = 0;
+  
+  // Loocking for a not processed cell
+  
+  TePDIPIManager progress( "Calculating correlation matrix",
+    matchMatrixLines, params.progressEnabled_ );  
+  
+  for( notProcLine = 0 ; notProcLine < matchMatrixLines ; ++notProcLine )
+  {
+    mMLinePtr = matchMatrix[ notProcLine ];
+    
+    for( notProcCol = 0 ; notProcCol < matchMatrixCols ; ++notProcCol )
+    {
+      params.glbMutexptr_->lock();
+      
+      double& mMElem = mMLinePtr[ notProcCol ];
+      
+      if( mMElem == negativeInfinite )
+      {
+        // mark as under processing 
+        mMElem = 0;
+        
+        params.glbMutexptr_->unLock();
+        
+        feat1Ptr = img1FeatMtx[ notProcLine ];
+        feat2Ptr = img2FeatMtx[ notProcCol ];        
+        
+        sumAA = 0;
+        sumBB = 0;   
+        
+        for( featCol = 0 ; featCol < featSize ; ++featCol )
+        {
+          sumAA += feat1Ptr[ featCol ] * feat1Ptr[ featCol ];
+          sumBB += feat2Ptr[ featCol ] * feat2Ptr[ featCol ];
+        }
+        
+        cc_norm = sqrt( sumAA * sumBB );
+        
+        if( cc_norm == 0.0 )
+        {
+          mMElem = 0;
+        }
+        else
+        {
+          ccorrelation = 0;
+          
+          for( featCol = 0 ; featCol < featSize ; ++featCol )
+          {
+            ccorrelation += ( feat1Ptr[ featCol ] * feat2Ptr[ featCol ] ) / cc_norm;
+          }
+          
+          mMElem = ABS( ccorrelation );
+        }
+      }
+      else
+      {
+        params.glbMutexptr_->unLock();
+      }
+    }
+    
+    if( progress.Increment() )
+    {
+      TEAGN_LOGERR( "Canceled by the user" );
+      return;
+    }    
+  }
+  
+  params.returnValue_ = true;
+}
+
+void TePDIMMIOMatching::matrix2Tiff( 
+  const TePDIMtxDoubleAdptInt& input_matrix,
+  const std::string& out_file_name,
+  const MaximasListT& maxima_points )
+{   
+  TEAGN_TRUE_OR_THROW( ( ! out_file_name.empty() ), "Invalid file name" )
+  TEAGN_TRUE_OR_THROW( ( input_matrix.getNLines() > 0 ), 
+    "Invalid matrix lines" )
+  TEAGN_TRUE_OR_THROW( ( input_matrix.getNCols() > 0 ), 
+    "Invalid matrix cols" )
+    
+  double value = 0;
+    
+  TeRasterParams params;
+  params.setNLinesNColumns( input_matrix.getNLines(),
+    input_matrix.getNCols() );
+  params.nBands( 1 );
+  params.setDataType( TeUNSIGNEDCHAR, -1 );
+  params.nBands( 1 );
+  params.decoderIdentifier_ = "TIF";
+  params.mode_ = 'c';
+  params.fileName_ = out_file_name;
+  
+  TeRaster out_raster( params );
+  TEAGN_TRUE_OR_THROW( out_raster.init(), "Error init raster" );
+  
+  for( unsigned int line = 0 ; 
+    line < input_matrix.getNLines() ; ++line ) {
+    for( unsigned int col = 0 ; 
+      col < input_matrix.getNCols() ; 
+      ++col ) 
+    {
+      input_matrix.getValue( line, col, value );
+      TEAGN_TRUE_OR_THROW( out_raster.setElement( col, line, 
+        MIN( value, 254.0 ), 0 ),
+        "Error writing raster" )
+    }  
+  }
+  
+  /* Draw maxima points */
+  
+  MaximasListT::const_iterator maximas_it = 
+    maxima_points.begin();
+  MaximasListT::const_iterator maximas_it_end = 
+    maxima_points.end();
+    
+  while( maximas_it != maximas_it_end ) {
+    const unsigned int& x = maximas_it->first;
+    
+    TEAGN_TRUE_OR_THROW( ( ((int)x) < (int)input_matrix.getNCols() ),
+      "Invalid maxima column" )
+    const unsigned int& y = maximas_it->second;
+    TEAGN_TRUE_OR_THROW( ( ((int)y) < (int)input_matrix.getNLines() ),
+      "Invalid maxima line" )
+    
+    TEAGN_TRUE_OR_THROW( out_raster.setElement( x, y, 
+      255.0, 0 ),
+      "Error writing raster" )
+      
+    ++maximas_it;
+  }  
+}
+
+void TePDIMMIOMatching::matrix2Tiff( 
+  const TePDIMtxDoubleAdptInt& input_matrix,
+  const std::string& out_file_name,
+  const TeCoordPairVect& tiepoints,
+  bool usePt1 )
+{   
+  TEAGN_TRUE_OR_THROW( ( ! out_file_name.empty() ), "Invalid file name" )
+  TEAGN_TRUE_OR_THROW( ( input_matrix.getNLines() > 0 ), 
+    "Invalid matrix lines" )
+  TEAGN_TRUE_OR_THROW( ( input_matrix.getNCols() > 0 ), 
+    "Invalid matrix cols" )
+    
+  double value = 0;
+    
+  TeRasterParams params;
+  params.setNLinesNColumns( input_matrix.getNLines(),
+    input_matrix.getNCols() );
+  params.nBands( 1 );
+  params.setDataType( TeUNSIGNEDCHAR, -1 );
+  params.nBands( 1 );
+  params.decoderIdentifier_ = "TIF";
+  params.mode_ = 'c';
+  params.fileName_ = out_file_name;
+  
+  TeRaster out_raster( params );
+  TEAGN_TRUE_OR_THROW( out_raster.init(), "Error init raster" );
+  
+  for( unsigned int line = 0 ; 
+    line < input_matrix.getNLines() ; ++line ) {
+    for( unsigned int col = 0 ; 
+      col < input_matrix.getNCols() ; 
+      ++col ) 
+    {
+      input_matrix.getValue( line, col, value );
+      TEAGN_TRUE_OR_THROW( out_raster.setElement( col, line, 
+        MIN( value, 254.0 ), 0 ),
+        "Error writing raster" )
+    }  
+  }
+  
+  /* Draw maxima points */
+  
+  TeCoordPairVect::const_iterator it = 
+    tiepoints.begin();
+  TeCoordPairVect::const_iterator it_end = 
+    tiepoints.end();
+  
+  int tpx = 0;
+  int tpy = 0;
+    
+  while( it != it_end ) {
+    if( usePt1 )
+    {
+      tpx = (int)it->pt1.x();
+      tpy = (int)it->pt1.y();
+    }
+    else
+    {
+      tpx = (int)it->pt2.x();
+      tpy = (int)it->pt2.y();
+    }
+    
+    TEAGN_TRUE_OR_THROW( ( tpx < (int)input_matrix.getNCols() ),
+      "Invalid maxima column" )
+    TEAGN_TRUE_OR_THROW( ( tpx >= 0 ),
+      "Invalid maxima column" )
+    TEAGN_TRUE_OR_THROW( ( tpy < (int)input_matrix.getNLines() ),
+      "Invalid maxima line" )
+    TEAGN_TRUE_OR_THROW( ( tpy >= 0 ),
+      "Invalid maxima line" )           
+    
+    TEAGN_TRUE_OR_THROW( out_raster.setElement( tpx, tpy, 
+      255.0, 0 ),
+      "Error writing raster" )
+      
+    ++it;
+  }  
+}
+
+void TePDIMMIOMatching::features2Tiff( 
+  unsigned int corr_window_width,
+  const MaximasListT& img_maxima_points,
+  TePDIMatrix< double >& img_features_matrix,
+  const std::string& filenameaddon )
+{
+  TEAGN_TRUE_OR_THROW( ( img_features_matrix.GetLines() ==
+    img_maxima_points.size() ), 
+    "Invalid matrix lines" )
+  TEAGN_TRUE_OR_THROW( ( img_features_matrix.GetColumns() ==
+    ( corr_window_width * corr_window_width ) ), 
+    "Invalid matrix columns" )
+  TEAGN_TRUE_OR_THROW( ( corr_window_width > 0 ),
+    "Invalid corr_window_width" )   
+    
+  MaximasListT::const_iterator maxIt = img_maxima_points.begin();
+
+  for( unsigned int curr_wind_index = 0 ; 
+    curr_wind_index < img_features_matrix.GetLines() ;
+    ++curr_wind_index ) {
+    
+    // finding feature min and max
+    
+    double featMin = DBL_MAX;
+    double featMax = -1.0 * featMin;
+    
+    for( unsigned int fcol = 0 ; fcol < img_features_matrix.GetColumns();
+      ++fcol )
+    {
+      if( img_features_matrix( curr_wind_index, fcol ) < featMin )
+      {
+        featMin = img_features_matrix( curr_wind_index, fcol );
+      }
+      if( img_features_matrix( curr_wind_index, fcol ) > featMax )
+      {
+        featMax = img_features_matrix( curr_wind_index, fcol );
+      }
+    }
+    
+    double featRange = ( featMin != featMax ) ? ( featMax - featMin ) : 1.0;
+    double featMultFac = 255.0 / featRange;
+    
+    // saving output
+    
+    TeRasterParams params;
+    params.setNLinesNColumns( corr_window_width,
+      corr_window_width );
+    params.nBands( 1 );
+    params.setDataType( TeUNSIGNEDCHAR, -1 );
+    params.nBands( 1 );
+    params.decoderIdentifier_ = "TIF";
+    params.mode_ = 'c';
+    params.fileName_ = filenameaddon + "_" + Te2String( maxIt->first, 0 ) + 
+      "_" + Te2String( maxIt->second, 0 ) + ".tif";
+    
+    TeRaster out_raster( params );
+    TEAGN_TRUE_OR_THROW( out_raster.init(), "Error init raster" );
+    
+    for( unsigned int line = 0 ; line < corr_window_width ; ++line ) {
+      for( unsigned int col = 0 ; col < corr_window_width ; ++col ) {
+
+        TEAGN_TRUE_OR_THROW( out_raster.setElement( col, line, 
+          ( img_features_matrix( curr_wind_index, ( line * 
+          corr_window_width ) + col ) - featMin ) * featMultFac, 0 ), 
+          "Error writing raster" )
+      }  
+    }
+    
+    ++maxIt;
+  }
+}
+
+bool TePDIMMIOMatching::bicubicResampleMatrix( const TePDIMtxDoubleAdptInt& inputMatrix,
+  unsigned int outLines, unsigned int outCols, bool progressEnabled,
+  TeMutex& globalMutex, double outMinValue, double outMaxValue,
+  TePDIMtxDoubleAdptInt& outputMatrix )
+{
+  globalMutex.lock();
+  
+  if( ! outputMatrix.reset( outLines, outCols ) )
+  {
+    globalMutex.unLock();
+    
+    TEAGN_LOGERR( "Output matrix reset error" );
+  }
+  
+  globalMutex.unLock();
+  
+  const unsigned int inLines = inputMatrix.getNLines();
+  const unsigned int inCols = inputMatrix.getNCols();
+  const int lastInLineIdx = inLines - 1;
+  const int lastInColIdx = inCols - 1;
+  const double yResFact = ((double)outLines) / ((double)inLines);
+  const double xResFact = ((double)outCols) / ((double)inCols);
+  const double bicubic_columns_bound = ((double)inCols) - 2;
+  const double bicubic_lines_bound = ((double)inLines) - 2;
+  const double bicubic_kernel_parameter = -1.0;
+  
+  double inputLine = 0;
+  double inputCol = 0;
+  unsigned int outLine = 0;
+  unsigned int outCol = 0;
+  double value = 0;
+  unsigned int  bicubic_grid_input_line = 0;
+  unsigned int  bicubic_grid_input_col = 0;
+  unsigned int  bicubic_buffer_line = 0;
+  unsigned int  bicubic_buffer_col = 0;  
+  double bicubic_offset_x;
+  double bicubic_offset_y;
+  double bicubic_h_weights[4];
+  double bicubic_v_weights[4];  
+  double bicubic_h_weights_sum = 0;
+  double bicubic_v_weights_sum = 0;
+  double bicubic_int_line_accum = 0;
+  double bicubic_int_lines_values[4];
+  int correctedInputLine = 0;
+  int correctedInputCol = 0;
+  
+  TePDIPIManager progress( "Resampling", outLines, 
+     progressEnabled );  
+  
+  for( outLine = 0 ; outLine < outLines ; ++outLine )
+  {
+    inputLine =  ((double)outLine) / yResFact;
+    
+    for( outCol = 0 ; outCol < outCols ; ++outCol )
+    {
+      inputCol =  ((double)outCol) / xResFact;
+      
+      if( ( inputCol < 1.0 ) || ( inputLine < 1.0 ) || ( inputCol >= 
+        bicubic_columns_bound ) || ( inputLine >= bicubic_lines_bound ) ) 
+      {
+        /* Near neighborhood interpolation will be used */
+        
+        correctedInputLine = (int)TeRound( inputLine );
+        correctedInputLine = MAX( 0, correctedInputLine );
+        correctedInputLine = MIN( lastInLineIdx, correctedInputLine );
+        
+        correctedInputCol = (int)TeRound( inputCol );
+        correctedInputCol = MAX( 0, correctedInputCol );
+        correctedInputCol = MIN( lastInColIdx, correctedInputCol );        
+        
+        inputMatrix.getValue( correctedInputLine, correctedInputCol, value );
+        outputMatrix.setValue( outLine , outCol, value );
+      } else {
+        bicubic_grid_input_line = ( (unsigned int)floor( inputLine ) ) - 1;
+        bicubic_grid_input_col = ( (unsigned int)floor( inputCol ) ) - 1;
+        
+        /* Bicubic weights calcule for the required position */
+        
+        bicubic_offset_x = inputCol - (double)( bicubic_grid_input_col + 1 );
+        bicubic_offset_y = inputLine - (double)( bicubic_grid_input_line + 1 );    
+        
+        bicubic_h_weights[0] = BICUBIC_KERNEL( 1.0 + bicubic_offset_x, 
+          bicubic_kernel_parameter );
+        bicubic_h_weights[1] = BICUBIC_KERNEL( bicubic_offset_x, 
+          bicubic_kernel_parameter );
+        bicubic_h_weights[2] = BICUBIC_KERNEL( 1.0 - bicubic_offset_x, 
+          bicubic_kernel_parameter );
+        bicubic_h_weights[3] = BICUBIC_KERNEL( 2.0 - bicubic_offset_x, 
+          bicubic_kernel_parameter );
+          
+        bicubic_v_weights[0] = BICUBIC_KERNEL( 1.0 + bicubic_offset_y, 
+          bicubic_kernel_parameter );
+        bicubic_v_weights[1] = BICUBIC_KERNEL( bicubic_offset_y, 
+          bicubic_kernel_parameter );
+        bicubic_v_weights[2] = BICUBIC_KERNEL( 1.0 - bicubic_offset_y, 
+          bicubic_kernel_parameter );
+        bicubic_v_weights[3] = BICUBIC_KERNEL( 2.0 - bicubic_offset_y, 
+          bicubic_kernel_parameter );
+          
+        bicubic_h_weights_sum = bicubic_h_weights[0] + bicubic_h_weights[1] +
+          bicubic_h_weights[2] + bicubic_h_weights[3];
+        bicubic_v_weights_sum = bicubic_v_weights[0] + bicubic_v_weights[1] +
+          bicubic_v_weights[2] + bicubic_v_weights[3];
+        
+        /* interpolating the value */
+        
+        for( bicubic_buffer_line = 0 ; bicubic_buffer_line < 4 ; 
+          ++bicubic_buffer_line) {
+          
+          bicubic_int_line_accum = 0;
+          
+          for( bicubic_buffer_col = 0 ; bicubic_buffer_col < 4 ; 
+            ++bicubic_buffer_col ) 
+          {
+            inputMatrix.getValue( bicubic_grid_input_line + bicubic_buffer_line, 
+                bicubic_grid_input_col + bicubic_buffer_col,
+                value );            
+            
+            bicubic_int_line_accum += value * 
+              bicubic_h_weights[ bicubic_buffer_col ];
+          }
+          
+          bicubic_int_lines_values[ bicubic_buffer_line ] = 
+            bicubic_int_line_accum / bicubic_h_weights_sum;
+        }
+        
+        value = bicubic_int_lines_values[ 0 ] * bicubic_v_weights[ 0 ] +
+          bicubic_int_lines_values[ 1 ] * bicubic_v_weights[ 1 ] +
+          bicubic_int_lines_values[ 2 ] * bicubic_v_weights[ 2 ] +
+          bicubic_int_lines_values[ 3 ] * bicubic_v_weights[ 3 ];
+        value = value / bicubic_v_weights_sum;
+        
+        if( value > outMaxValue )
+        {
+          outputMatrix.setValue( outLine , outCol, outMaxValue );
+        }
+        else if( value < outMinValue )
+        {
+          outputMatrix.setValue( outLine , outCol, outMinValue );
+        }
+        else
+        {  
+          outputMatrix.setValue( outLine , outCol, value );
+        }
+      }
+    }
+    
+    if( progress.Increment() )
+    {
+      TEAGN_LOGMSG( "Canceled by the user" );
+      return false;
+    }
+  }
+ 
+  return true;
+}
+
+
diff --git a/src/terralib/image_processing/TePDIMMIOMatching.hpp b/src/terralib/image_processing/TePDIMMIOMatching.hpp
new file mode 100644
index 0000000..d89784a
--- /dev/null
+++ b/src/terralib/image_processing/TePDIMMIOMatching.hpp
@@ -0,0 +1,492 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIMMIOMATCHING_HPP
+  #define TEPDIMMIOMATCHING_HPP
+
+  #include "TePDIAlgorithm.hpp"
+  #include "TePDIMtxDoubleAdpt.hpp"
+
+  #include <TeThreadJobsManager.h>
+  #include <TeMutex.h>
+
+  #include <list>
+
+  /*!
+      \class TePDIMMIOMatching
+      \brief Modified Moravec Interest Operator based image area matching.
+      \author Emiliano F. Castejon <castejon at dpi.inpe.br>.
+      \ingroup PDIMatchingAlgorithms
+     
+      \note The required parameters are:
+     
+      \param input_image1_ptr (TePDITypes::TePDIRasterPtrType) - 
+      The input image 1.
+      \param input_channel1 ( unsigned int ) - Band to process 
+      from input_image1.
+     
+      \param input_image2_ptr (TePDITypes::TePDIRasterPtrType) - 
+      The input image 2.
+      \param input_channel2 ( unsigned int ) - Band to process 
+      from input_image2.
+     
+      \param out_tie_points_ptr ( TeSharedPtr< TeCoordPairVect > ) - The 
+      output tie- points correlation_method
+      where TeCoordPair.pt1 are input_image1 matricial
+      indexes and TeCoordPair.pt2 are input_image2 matricial
+      indexes.
+     
+      \note The Optional parameters are:
+      
+      \param matching_method (FeatMatchingMethod) Features matching method
+      (default: TePDIMMIOMatching::NormCrossCorrMethod).    
+     
+      \param pixel_x_relation (double) - The pixel resolution relation 
+      pixel_x_relation = img1_pixel_res_x / img2_pixel_res_x (default=1.0).
+     
+      \param pixel_y_relation (double) - The pixel resolution relation 
+      pixel_y_relation = img1_pixel_res_y / img2_pixel_res_y (default=1.0).   
+      
+      \param gt_params ( TeGTParams ) - The geometric transformation
+      parameters to be used (if not supplied, the dafult TeGTParams
+      will be used - affine transformation, max direct mapping
+      error = 2 pixels, max inverse mapping error = 2 pixels,
+      LWAOutRemotion outliers remotion ).
+     
+      \param out_gt_params_ptr ( TeGTParams::pointer ) - The output 
+      parameters of internally generated geometric transformation 
+      (only valid when geometrical filtering is enabled).
+     
+      \param input_box1 ( TeBox ) - Box (image matrix coords) to process 
+      from input_image1 ( the entire image will be used if no box
+      was supplied ).
+     
+      \param input_box2 ( TeBox ) - Box (image matrix coords) to process 
+      from input_image2 ( the entire image will be used if no box
+      was supplied ).
+     
+      \param enable_multi_thread (int) - If present (any value) 
+      a multi-threaded processing will be used; Some TeDecoders do
+      not support multi-thread so use it with cation
+      (default: multi-thread disabled).
+     
+      \param max_tie_points (unsigned int) - The maximum number
+      of generated tie-points (default=1000).
+     
+      \param skip_geom_filter (int) - If present (any value) 
+      will disable the geometric filtering
+      ( default: geometric filtering enabled ). 
+  
+      \param enable_upsampled_filter (int) - If present (any value) 
+      will enable the upsampled image Moravec repeatability filter
+      ( default: upsampled filtering disable - only the downsampled
+      image filter will be applied ).  
+     
+      \param corr_window_width (unsigned int) - The correlation 
+      window width used to correlate points between 
+      images (Must be an odd number, minimum 13, default: 13).  
+  
+      \param moravec_window_width (unsigned int) - The Moravec
+      window width used to locate canditate tie-points
+      (Must be an odd number, minimum 10, default: 11 ).  
+      
+      \param variance_min_thrs (double) - Variance minimum value threshold( tie-points
+      with directional variance values below this threshold will be eliminated ) - Allowed
+      range  [0,3] - with higher values more points with low directional variance will be acquired - 
+      default:1.
+      
+      \example TePDIMMIOMatching_test.cpp Shows how to use this class.
+  */
+  class PDI_DLL TePDIMMIOMatching : public TePDIAlgorithm {
+    public :
+      
+      /*! Features matching methods. */
+      enum FeatMatchingMethod
+      {
+        /*! Features nuclidian distance method */
+        EuclidianDistMethod = 1,      
+        /*! Features normalized cross-correlation method */
+        NormCrossCorrMethod = 2
+      };
+
+      TePDIMMIOMatching();
+
+      ~TePDIMMIOMatching();
+
+      // Overloaded
+      bool CheckParameters( const TePDIParameters& parameters ) const;
+
+    protected :
+      
+      /*! Maximas list node type 
+         \param unsigned int (first) Column - X.
+         \param unsigned int (second) Line - Y.
+       */
+      typedef std::pair< unsigned int, unsigned int > MaximasListNodeT;      
+      
+      /*! Maximas list type 
+       */
+      typedef std::list< MaximasListNodeT > MaximasListT;
+      
+      /*! Ordered maximas map type 
+         \param unsigned int (first) Column - X.
+         \param unsigned int (second) Line - Y.
+       */
+      typedef std::multimap< double, std::pair< unsigned int, unsigned int > > 
+        MaximasMapT;      
+      
+      struct LoadImageParams
+      {
+        TePDITypes::TePDIRasterPtrType input_image_ptr_;
+        unsigned int input_image_channel_;
+        TePDIMtxDoubleAdptInt* img_matrix_ptr_;
+        TePDIMtxDoubleAdptInt* img_matrix_ds_ptr_;
+        TePDIMtxDoubleAdptInt* img_matrix_us_ptr_;
+        unsigned int in_box_x_off_;
+        unsigned int in_box_y_off_;
+        unsigned int in_box_nlines_;
+        unsigned int in_box_ncols_;
+        bool progress_enabled_;
+        TeMutex* glb_mem_lock_ptr_;
+        double origImgXRescFact_; // factor = rescaled_orignal_image / original_image
+        double origImgYRescFact_; // factor = rescaled_orignal_image / original_image
+        double moravecDownSampleFactor_; // factor = rescaled_original_img / ds_image
+        double moravecUpSampleFactor_; // factor = rescaled_original_img / us_image
+        bool returnValue_; // true if OK.
+        bool generateUpsampledImage_;
+      };
+      
+      struct ExtractLocalMaximasParams 
+      {
+        /*! Input image matrix */
+        TePDIMtxDoubleAdptInt* imgMatrixPtr_;
+        
+        /*! The output list where the found maximas index coords will be 
+            appended */
+        MaximasListT* outMaximasListPtr_;
+        
+        unsigned int moravecWindowSize_;
+        
+        unsigned int maximasNumber_;
+        
+        double moravecMinVarianceThreshold_;
+        
+        /*! Number of sub-images to seach (power of 2). */
+        unsigned seachSubImagesNmb_; // Number of sub-images to seach.
+        
+        //Job return value.
+        bool returnValue_;
+        
+        /*! Is progress interface enabled ?? */
+        bool progressEnabled_;
+        
+        /*! Global mutex pointer */
+        TeMutex* glbMutexptr_;     
+      };
+      
+      struct GenerateCorrelationFeaturesParams
+      {
+        /*! Input image matrix */
+        TePDIMtxDoubleAdptInt const* imgMatrixPtr_;
+        
+        /*! Input maximas list */
+        MaximasListT const* inMaximasListPtr_;
+        
+        /*! Output features matrix pointer */
+        TePDIMatrix< double >* featMtxPtr_;
+        
+        /*! Execution return value (true if OK, false on errors).*/
+        bool returnValue_;
+        
+        /* A mutex object pointer to sync large memory allocations */
+        TeMutex* glbMemLockPtr_; // To sync large memory allocations
+        
+        /*! The generated correlation windows width.*/
+        unsigned int corrWindowsWidth_;
+        
+        /*! Is progress interface enabled ?? */
+        bool progressEnabled_;
+        
+        /*! If true, the generated windows will be normalized between -1 
+         * and + 1. 
+         */
+        bool normalizeWindows_;
+      };
+      
+      struct CalcEuclidianDistanceMtxParams
+      {
+        /*! Image 1 features matrix pointer. */
+        TePDIMatrix< double > const* img1FeatMtxPtr_;
+        
+        /*! Image 2 features matrix pointer. */
+        TePDIMatrix< double > const* img2FeatMtxPtr_;
+
+        /*! Output matching matrix. */
+        TePDIMatrix<double>* matchMatrixPtr_;
+  
+        /*! Is progress interface enabled ?? */
+        bool progressEnabled_;
+        
+        /*! Global mutex pointer */
+        TeMutex* glbMutexptr_;
+  
+        /*! Execution return value (true if OK, false on errors).*/
+        bool returnValue_;
+      };
+      
+      struct CalcCCorrelationMtxParams
+      {
+        /*! Image 1 features matrix pointer. */
+        TePDIMatrix< double > const* img1FeatMtxPtr_;
+        
+        /*! Image 2 features matrix pointer. */
+        TePDIMatrix< double > const* img2FeatMtxPtr_;
+
+        /*! Output matching matrix. */
+        TePDIMatrix<double>* matchMatrixPtr_;
+  
+        /*! Is progress interface enabled ?? */
+        bool progressEnabled_;
+        
+        /*! Global mutex pointer */
+        TeMutex* glbMutexptr_;
+  
+        /*! Execution return value (true if OK, false on errors).*/
+        bool returnValue_;
+      };      
+      
+      /*! Internal threaded jobs manager. */
+      TeThreadJobsManager jobsMan_;
+      
+      /*! A global syncronization mutex. */
+      TeMutex globalMutex_;
+      
+      /*! A pointer to the input image 1. */
+      TePDITypes::TePDIRasterPtrType input_image1_ptr_;
+      
+      /*! Input image 1 channel. */
+      unsigned int input_channel1_;
+      
+      /*! Input image 1 box (indexed). */
+      TeBox input_box1_;
+      
+      /*! A pointer to the input image 2. */
+      TePDITypes::TePDIRasterPtrType input_image2_ptr_;
+      
+      /*! Input image 2 channel. */
+      unsigned int input_channel2_;
+      
+      /*! Input image 2 box (indexed). */
+      TeBox input_box2_;
+      
+      /*! Image 1 features matrix (each matrix line is a stacked version of one 
+       * correlation window
+       */ 
+      TePDIMatrix< double > img1featMtx_;
+      
+      /*! Image 2 features matrix (each matrix line is a stacked version of one 
+       * correlation window
+       */ 
+      TePDIMatrix< double > img2featMtx_;      
+
+      /*! Image 1 maximas list. */       
+      MaximasListT img1_maximas_list_;
+
+      /*! Image 2 maximas list. */       
+      MaximasListT img2_maximas_list_;
+      
+      /*! Feature matching mathod. */
+      FeatMatchingMethod matching_method_;
+      
+      // Overloaded
+      bool RunImplementation();
+
+      // Overloaded
+      void ResetState( const TePDIParameters& params );
+      
+      /**
+        \brief A job function load raster data into
+        a simple matrix.
+        \param paramsPtr The parameters needed for the thread 
+        execution (a pointer to a LoadImageParams struct).
+       */
+      static void loadImage( void * paramsPtr ); 
+      
+      /*! Instantiate an image matrix capable of store pixel data
+         of the supplied type.
+        \param dataType Pixel type.
+        \param matrixPtr A pointer for the new created matrix.
+       */
+      static void createImgMatrix( TeDataType dataType, 
+        TeSharedPtr< TePDIMtxDoubleAdptInt >& matrixPtr );
+     
+      /*!
+        \brief Extract local interest maxima points using a Modified
+        Moravec Interest Operator aproach.
+        \param paramsPtr The parameters needed for the thread 
+        execution (a pointer to a ExtractLocalMaximasParams struct).
+       */
+      static void extractLocalMaximas( void * paramsPtr );
+      
+      /*!
+        \brief Extract local interest maxima points from an image
+        sub-region using a Modified Moravec Interest Operator aproach.
+        \param paramsPtr The parameters needed for the thread
+        execution (a pointer to a ExtractLocalMaximasParams struct).
+        \param xStart Image sub-region initial X coordinate. 
+        \param yStart Image sub-region initial y coordinate.
+        \param width Image sub-region width.
+        \param height Image sub-region height.
+        \param progres Progress interface manager reference.
+        \param return true if OK, false on errors.
+       */      
+      static bool extractLocalMaximas( ExtractLocalMaximasParams& params,
+        unsigned int xStart, unsigned int yStart, unsigned int width,
+        unsigned int height, MaximasMapT& outMaximasMap,
+        TePDIPIManager& progress );
+      
+      /*! 
+        \brief Applies a Moravec repeatability constraint over an image
+        maximas list.
+        \param inputList Original image maximas list.
+        \param constraintList Constraint list.
+        \param constraintImageWidth Constraint image width.
+        \param constraintImageHeight Constraint image height.
+        \param moravecRepeatabilityMinTolerance Error tolerance (pixels)
+        - constraint image reference.
+        \param moravecReSampleFactor Moravec resample factor 
+        (factor = inputList_scal / constraintList_scale).
+        \param outputList Output maximas list from input list.
+       */
+      void moravecRepeatability( const MaximasListT& inputList,
+        const MaximasListT& constraintList, 
+        unsigned int constraintImageWidth,
+        unsigned int constraintImageHeight,
+        double moravecRepeatabilityMinTolerance, 
+        double moravecReSampleFactor, 
+        MaximasListT& outputList );      
+      
+      /*!
+        \brief Generate correlation features.
+        \param paramsPtr The parameters needed for the thread 
+        execution (a pointer to a ExtractLocalMaximasParams struct).
+       */
+      static void generateCorrelationFeatures( void * paramsPtr );    
+      
+      /*! 
+        \brief Features matching and tie-points generation.
+        \param matching_method Features matching method.
+        \param img1featMtx Image 1 features matrix.
+        \param img1_maximas_list Image 1 maximas list.
+        \param img2featMtx Image 2 features matrix.
+        \param img2_maximas_list Image 2 maximas list.
+        \param tiePointsVec Output tie-points vector.
+        \return true if OK, false on errors.
+       */      
+      bool matchFeatures( FeatMatchingMethod matching_method,
+        const TePDIMatrix< double >& img1featMtx,
+        const MaximasListT& img1_maximas_list,
+        const TePDIMatrix< double >& img2featMtx,
+        const MaximasListT& img2_maximas_list,
+        TeCoordPairVect& tiePointsVec );
+      
+      /*!
+        \brief Calc euclidian distance matrix for the supplied features.
+        \param paramsPtr The parameters needed for the thread 
+        execution (a pointer to a CalcEuclidianDistanceMtxParams struct).
+       */
+      static void calcEuclidianDistanceMtx( void * paramsPtr );   
+      
+      /*!
+        \brief cross-correlation matrix calcule (absolute values).
+        \param paramsPtr The parameters needed for the thread 
+        execution (a pointer to a CalcInvCCorrelationMtxParams struct).
+       */
+      static void calcCCorrelationMtx( void * paramsPtr );      
+      
+      /*!
+        \brief Save the output matrix to a geotiff file.
+        \param input_matrix Input matrix.
+        \param out_file_name Output file name.
+        \param maxima_points The maxima points to be
+        filled with 255
+       */      
+      static void matrix2Tiff( 
+        const TePDIMtxDoubleAdptInt& input_matrix,
+        const std::string& out_file_name,
+        const MaximasListT& maxima_points = MaximasListT() );
+      
+      /*!
+        \brief Save the output matrix to a geotiff file.
+        \param input_matrix Input matrix.
+        \param out_file_name Output file name.
+        \param tiepoints The tie oints to be
+        filled with 255
+        \param usePt1 Use pt1 from tiepoints, otherwise use pt1
+       */      
+      static void matrix2Tiff( 
+        const TePDIMtxDoubleAdptInt& input_matrix,
+        const std::string& out_file_name,
+        const TeCoordPairVect& tiepoints,
+        bool usePt1 );      
+      
+      /*!
+        \brief Save the generated features to tif files.
+        \param corr_window_width The correlation windows width.
+        \param img_maxima_points The image maxima points
+        (these are the correlation matrix centers).
+        \param img_features_matrix The output image
+        features matrix ( each line is a stacked version
+        of one rotated correlation window ).
+        \filenameaddon A string to be appended to the
+        file name of each feature file.
+        \return true if OK, false on errors.
+       */          
+      static void features2Tiff( 
+        unsigned int corr_window_width,
+        const MaximasListT& img_maxima_points,
+        TePDIMatrix< double >& img_features_matrix,
+        const std::string& filenameaddon );      
+
+      /*!
+        \brief Input matrix bicubic resample.
+        \param inputMatrix Input matrix.
+        \param outLines Output number of lines.
+        \param outCols Output number of columns.
+        \param progressEnabled Progress enabled flag.
+        \param globalMutex Global mutex.
+        \param outMinValue The allowed output min value.
+        \param outMaxValue The allowed output max value.
+        \param outputMatrix Output matrix.
+        \return true if OK, false on errors.
+       */      
+      static bool bicubicResampleMatrix( const TePDIMtxDoubleAdptInt& inputMatrix,
+        unsigned int outLines, unsigned int outCols, bool progressEnabled,
+        TeMutex& globalMutex, double outMinValue, double outMaxValue,
+        TePDIMtxDoubleAdptInt& outputMatrix );
+      
+  };
+
+
+#endif
diff --git a/src/terralib/image_processing/TePDIMallatWavelets.cpp b/src/terralib/image_processing/TePDIMallatWavelets.cpp
new file mode 100644
index 0000000..9bb0d3e
--- /dev/null
+++ b/src/terralib/image_processing/TePDIMallatWavelets.cpp
@@ -0,0 +1,2017 @@
+#include "TePDIMallatWavelets.hpp"
+
+#include "TePDIUtils.hpp"
+#include "TePDIStrategyFactory.hpp"
+#include "TePDIMathFunctions.hpp"
+#include "TePDIPIManager.hpp"
+
+#include <TeAgnostic.h>
+#include <TeUtils.h>
+#include <TeDefines.h>
+
+#include <math.h>
+#include <float.h>
+
+
+TePDIMallatWavelets::TePDIMallatWavelets()
+{
+  shift_histogram_flag_ = false;
+  input_image_mean_ = 0;
+}
+
+
+TePDIMallatWavelets::~TePDIMallatWavelets()
+{
+}
+
+
+bool TePDIMallatWavelets::CheckParameters( 
+  const TePDIParameters& parameters ) const
+{
+  std::string filter_task;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "filter_task", filter_task ),
+    "Missing parameter: filter_task" );
+    
+  /* Checking filters */
+  
+  std::vector< double > a_filter_l;
+  TEAGN_TRUE_OR_RETURN( 
+    parameters.GetParameter( "a_filter_l", a_filter_l ),
+    "Missing parameter: a_filter_l" );
+  TEAGN_TRUE_OR_RETURN( a_filter_l.size() > 1, 
+    "Invalid parameter: a_filter_l" );
+    
+  std::vector< double > a_filter_h;
+  TEAGN_TRUE_OR_RETURN( 
+    parameters.GetParameter( "a_filter_h", a_filter_h ),
+    "Missing parameter: a_filter_h" );
+  TEAGN_TRUE_OR_RETURN( a_filter_h.size() > 1, 
+    "Invalid parameter: a_filter_h" );    
+    
+  std::vector< double > s_filter_l;
+  TEAGN_TRUE_OR_RETURN( 
+    parameters.GetParameter( "s_filter_l", s_filter_l ),
+    "Missing parameter: s_filter_l" );
+  TEAGN_TRUE_OR_RETURN( s_filter_l.size() > 1, 
+    "Invalid parameter: s_filter_l" );
+    
+  std::vector< double > s_filter_h;
+  TEAGN_TRUE_OR_RETURN( 
+    parameters.GetParameter( "s_filter_h", s_filter_h ),
+    "Missing parameter: s_filter_h" );
+  TEAGN_TRUE_OR_RETURN( s_filter_h.size() > 1, 
+    "Invalid parameter: s_filter_h" );
+    
+  unsigned int max_filter_size = ( unsigned int )
+    MAX( a_filter_l.size(), MAX( a_filter_h.size(), MAX( s_filter_l.size(), 
+    s_filter_h.size() ) ) );
+    
+  /* Checking filters scale */        
+  
+  double filters_scale = 0;
+  TEAGN_TRUE_OR_RETURN( 
+    parameters.GetParameter( "filters_scale", filters_scale ),
+    "Missing parameter: filters_scale" );
+  TEAGN_TRUE_OR_RETURN( filters_scale != 0, "filters scale cannot be zero" );
+  
+  /* Additional checking for each task */
+  
+  if( filter_task == "SBExtract" ) {
+      /* Checking input_raster */
+  
+      TePDITypes::TePDIRasterPtrType input_image;
+      TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "input_image", 
+        input_image ),  "Missing parameter: input_image" );
+      TEAGN_TRUE_OR_RETURN( input_image.isActive(),
+        "Invalid parameter: input_image inactive" );
+      TEAGN_TRUE_OR_RETURN( input_image->params().status_ != 
+        TeRasterParams::TeNotReady, 
+        "Invalid parameter: input_image not ready" );
+    
+      TEAGN_TRUE_OR_RETURN( ( input_image->params().nlines_ > 1 ), 
+        "Invalid input_image lines number" );
+      TEAGN_TRUE_OR_RETURN( ( input_image->params().ncols_ > 1 ), 
+        "Invalid input_image columns number" );
+    
+      /* Checking input band */
+  
+      int band;
+      TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "band", band ),
+        "Missing parameter: band" );
+      TEAGN_TRUE_OR_RETURN( band < input_image->nBands(),
+        "Invalid parameter: band" );
+        
+      /* Checking photometric interpretation */
+  
+      TEAGN_TRUE_OR_RETURN( ( 
+        ( input_image->params().photometric_[ band ] == 
+          TeRasterParams::TeRGB ) ||
+        ( input_image->params().photometric_[ band ] == 
+          TeRasterParams::TeMultiBand ) ),
+        "Invalid parameter: input_image "
+        "( invalid photometric interpretation" );
+        
+      /* checking for the output lowlow raster */
+    
+      TePDITypes::TePDIRasterPtrType sub_band;
+      TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "sub_band", sub_band ),
+        "Missing parameter: sub_band" );
+      TEAGN_TRUE_OR_RETURN( sub_band.isActive(),
+        "Invalid parameter: sub_band inactive pointer" );
+      TEAGN_TRUE_OR_RETURN( sub_band->params().status_ != 
+        TeRasterParams::TeNotReady, "Invalid parameter: sub_band not ready" );        
+      
+      int sub_band_index = 0;
+      TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "sub_band_index", 
+        sub_band_index ), "Missing parameter: sub_band" );
+      TEAGN_TRUE_OR_RETURN( ( ( sub_band_index >= 0 ) && 
+        ( sub_band_index < 4 ) ), "Invalid parameter: sub_band_index" );
+        
+      /* Checking decomposition levels number */
+      
+      int max_levels = (int)( MIN(
+          TePDIMathFunctions::DecimLevels( input_image->params().nlines_ ),
+          TePDIMathFunctions::DecimLevels( input_image->params().ncols_ ) ) );
+    
+      int levels = 0;
+      TEAGN_TRUE_OR_RETURN( 
+        parameters.GetParameter( "levels", levels ),
+        "Missing parameter: levels" );
+      TEAGN_TRUE_OR_RETURN( ( levels > 0 ) && ( levels <= max_levels ),
+        "Invalid parameter: levels" );
+      TEAGN_TRUE_OR_RETURN( 
+        ( TePDIMathFunctions::DecimLevelSize(
+        levels, MIN( input_image->params().nlines_,
+        input_image->params().ncols_ ) ) >= max_filter_size ),
+        "Invalid parameter: The current \"levels\" parameter and "
+        "input filters are incompatible" );
+    } else if( filter_task == "SBSwap" ) {
+      /* Checking input_raster */
+  
+      TePDITypes::TePDIRasterPtrType input_image;
+      TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "input_image", 
+        input_image ), "Missing parameter: input_image" );
+      TEAGN_TRUE_OR_RETURN( input_image.isActive(),
+        "Invalid parameter: input_image inactive" );
+      TEAGN_TRUE_OR_RETURN( input_image->params().status_ != 
+        TeRasterParams::TeNotReady, 
+        "Invalid parameter: input_image not ready" );
+    
+      TEAGN_TRUE_OR_RETURN( ( input_image->params().nlines_ > 1 ), 
+        "Invalid input_image lines number" );
+      TEAGN_TRUE_OR_RETURN( ( input_image->params().ncols_ > 1 ), 
+        "Invalid input_image columns number" );
+    
+      /* Checking input band */
+  
+      int band;
+      TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "band", band ),
+        "Missing parameter: band" );
+      TEAGN_TRUE_OR_RETURN( band < input_image->nBands(),
+        "Invalid parameter: band" );
+        
+      /* Checking photometric interpretation */
+  
+      TEAGN_TRUE_OR_RETURN( ( 
+        ( input_image->params().photometric_[ band ] == 
+          TeRasterParams::TeRGB ) ||
+        ( input_image->params().photometric_[ band ] == 
+          TeRasterParams::TeMultiBand ) ),
+        "Invalid parameter: input_image "
+        "( invalid photometric interpretation" );        
+        
+      /* Checking decomposition levels number */   
+  
+      int max_levels = (int)( MIN(
+          TePDIMathFunctions::DecimLevels( input_image->params().nlines_ ),
+          TePDIMathFunctions::DecimLevels( input_image->params().ncols_ ) ) );
+    
+      int levels = 0;
+      TEAGN_TRUE_OR_RETURN( 
+        parameters.GetParameter( "levels", levels ),
+        "Missing parameter: levels" );
+      TEAGN_TRUE_OR_RETURN( ( levels > 0 ) && ( levels <= max_levels ),
+        "Invalid parameter: levels" );
+      TEAGN_TRUE_OR_RETURN( 
+        ( TePDIMathFunctions::DecimLevelSize(
+        levels, MIN( input_image->params().nlines_,
+        input_image->params().ncols_ ) ) >= max_filter_size ),
+        "Invalid parameter: The current \"levels\" parameter and "
+        "input filters are incompatible" );                
+            
+      /* Checking output_raster */
+  
+      TePDITypes::TePDIRasterPtrType output_image;
+      TEAGN_TRUE_OR_RETURN( 
+        parameters.GetParameter( "output_image", output_image ),
+        "Missing parameter: output_image" );
+      TEAGN_TRUE_OR_RETURN( output_image.isActive(),
+        "Invalid parameter: output_image inactive" );
+      TEAGN_TRUE_OR_RETURN( output_image->params().status_ != 
+        TeRasterParams::TeNotReady, 
+        "Invalid parameter: output_image not ready" );    
+        
+      /* checking for the sub-band */
+    
+      TePDITypes::TePDIRasterPtrType sub_band;
+      TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "sub_band", sub_band ),
+        "Missing parameter: sub_band" );
+      TEAGN_TRUE_OR_RETURN( sub_band.isActive(),
+        "Invalid parameter: sub_band inactive pointer" );
+      TEAGN_TRUE_OR_RETURN( sub_band->params().status_ != 
+        TeRasterParams::TeNotReady, "Invalid parameter: sub_band not ready" );       
+        
+      TEAGN_TRUE_OR_RETURN( ( ((unsigned int)sub_band->params().nlines_) == 
+        TePDIMathFunctions::DecimLevelSize( levels,
+        input_image->params().nlines_ ) ),
+        "Invalid parameter: Sub_band lines mismatch for the choosen "
+        "decomposition level" );
+      TEAGN_TRUE_OR_RETURN( ( ( (unsigned int)sub_band->params().ncols_) == 
+        TePDIMathFunctions::DecimLevelSize( levels,
+        input_image->params().ncols_ ) ),
+        "Invalid parameter: Sub_band columns mismatch for the choosen "
+        "decomposition level" );
+        
+      /* checking sub-band index */
+                
+      int sub_band_index = 0;
+      TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "sub_band_index", 
+        sub_band_index ), "Missing parameter: sub_band" );
+      TEAGN_TRUE_OR_RETURN( ( ( sub_band_index >= 0 ) && 
+        ( sub_band_index < 4 ) ), "Invalid parameter: sub_band_index" );       
+    } else if( filter_task == "GetPyramid" ) {
+      /* Checking input_raster */
+  
+      TePDITypes::TePDIRasterPtrType input_image;
+      TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "input_image", 
+        input_image ), "Missing parameter: input_image" );
+      TEAGN_TRUE_OR_RETURN( input_image.isActive(),
+        "Invalid parameter: input_image inactive" );
+      TEAGN_TRUE_OR_RETURN( input_image->params().status_ != 
+        TeRasterParams::TeNotReady, 
+        "Invalid parameter: input_image not ready" );
+    
+      TEAGN_TRUE_OR_RETURN( ( input_image->params().nlines_ > 1 ), 
+        "Invalid input_image lines number" );
+      TEAGN_TRUE_OR_RETURN( ( input_image->params().ncols_ > 1 ), 
+        "Invalid input_image columns number" );
+    
+      /* Checking input band */
+  
+      int band;
+      TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "band", band ),
+        "Missing parameter: band" );
+      TEAGN_TRUE_OR_RETURN( band < input_image->nBands(),
+        "Invalid parameter: band" );
+        
+      /* Checking photometric interpretation */
+  
+      TEAGN_TRUE_OR_RETURN( ( 
+        ( input_image->params().photometric_[ band ] == 
+          TeRasterParams::TeRGB ) ||
+        ( input_image->params().photometric_[ band ] == 
+          TeRasterParams::TeMultiBand ) ),
+        "Invalid parameter: input_image "
+        "( invalid photometric interpretation" );        
+        
+      /* Checking decomposition levels number */   
+  
+      int max_levels = (int)( MIN(
+          TePDIMathFunctions::DecimLevels( input_image->params().nlines_ ),
+          TePDIMathFunctions::DecimLevels( input_image->params().ncols_ ) ) );
+    
+      int levels = 0;
+      TEAGN_TRUE_OR_RETURN( 
+        parameters.GetParameter( "levels", levels ),
+        "Missing parameter: levels" );
+      TEAGN_TRUE_OR_RETURN( ( levels > 0 ) && ( levels <= max_levels ),
+        "Invalid parameter: levels" );
+      TEAGN_TRUE_OR_RETURN( 
+        ( TePDIMathFunctions::DecimLevelSize(
+        levels, MIN( input_image->params().nlines_,
+        input_image->params().ncols_ ) ) >= max_filter_size ),
+        "Invalid parameter: The current \"levels\" parameter and "
+        "input filters are incompatible" );
+        
+      /* Checking for the pyramid reference */
+      
+      TePDITypes::TePDIRasterVectorPtrType pyramid;
+      TEAGN_TRUE_OR_RETURN( 
+        parameters.GetParameter( "pyramid", pyramid ),
+        "Missing parameter: pyramid" );
+      TEAGN_TRUE_OR_RETURN( 
+        pyramid.isActive(), "Inactive parameter: pyramid" );
+    } else if( filter_task == "RecomposePyramid" ) {
+      /* Checking input_raster */
+  
+      TePDITypes::TePDIRasterPtrType input_image;
+      
+      if( parameters.CheckParameter< TePDITypes::TePDIRasterPtrType >( 
+        "input_image" ) ) {
+        
+        TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "input_image", 
+          input_image ), "Missing parameter: input_image" );
+        TEAGN_TRUE_OR_RETURN( input_image.isActive(),
+          "Invalid parameter: input_image inactive" );
+        TEAGN_TRUE_OR_RETURN( input_image->params().status_ != 
+          TeRasterParams::TeNotReady, 
+          "Invalid parameter: input_image not ready" );
+      
+        TEAGN_TRUE_OR_RETURN( ( input_image->params().nlines_ > 1 ), 
+          "Invalid input_image lines number" );
+        TEAGN_TRUE_OR_RETURN( ( input_image->params().ncols_ > 1 ), 
+          "Invalid input_image columns number" );
+      
+        /* Checking input band */
+    
+        int band;
+        TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "band", band ),
+          "Missing parameter: band" );
+        TEAGN_TRUE_OR_RETURN( band < input_image->nBands(),
+          "Invalid parameter: band" );
+          
+        /* Checking photometric interpretation */
+    
+        TEAGN_TRUE_OR_RETURN( ( 
+          ( input_image->params().photometric_[ band ] == 
+            TeRasterParams::TeRGB ) ||
+          ( input_image->params().photometric_[ band ] == 
+            TeRasterParams::TeMultiBand ) ),
+          "Invalid parameter: input_image "
+          "( invalid photometric interpretation" );          
+      }
+      
+      /* Checking output_raster */
+  
+      TePDITypes::TePDIRasterPtrType output_image;
+      TEAGN_TRUE_OR_RETURN( 
+        parameters.GetParameter( "output_image", output_image ),
+        "Missing parameter: output_image" );
+      TEAGN_TRUE_OR_RETURN( output_image.isActive(),
+        "Invalid parameter: output_image inactive" );
+      TEAGN_TRUE_OR_RETURN( output_image->params().status_ != 
+        TeRasterParams::TeNotReady, 
+        "Invalid parameter: output_image not ready" );          
+      
+      /* Checking for the pyramid reference */
+      
+      TePDITypes::TePDIRasterVectorPtrType pyramid;
+      TEAGN_TRUE_OR_RETURN( 
+        parameters.GetParameter( "pyramid", pyramid ),
+        "Missing parameter: pyramid" );
+      TEAGN_TRUE_OR_RETURN( 
+        pyramid.isActive(), "Inactive parameter: pyramid" );      
+      
+      TEAGN_TRUE_OR_RETURN( ( ( pyramid->size() % 4 ) == 0 ),
+        "Invalid input pyramid size" );
+        
+      unsigned int py_levels = pyramid->size() / 4;
+      unsigned int py_sb00_index = 0;
+      for( unsigned int level = 1 ; level <= py_levels ; ++level ) {
+        py_sb00_index = ( level - 1 ) * 4;
+        
+        TEAGN_TRUE_OR_RETURN( (
+          ( (*pyramid)[ py_sb00_index ]->params().nlines_ ==
+            (*pyramid)[ py_sb00_index + 1 ]->params().nlines_ ) &&
+          ( (*pyramid)[ py_sb00_index ]->params().nlines_ ==
+            (*pyramid)[ py_sb00_index + 2 ]->params().nlines_ ) &&
+          ( (*pyramid)[ py_sb00_index ]->params().nlines_ ==
+            (*pyramid)[ py_sb00_index + 3 ]->params().nlines_ ) &&
+          ( (*pyramid)[ py_sb00_index ]->params().ncols_ ==
+            (*pyramid)[ py_sb00_index + 1 ]->params().ncols_ ) &&
+          ( (*pyramid)[ py_sb00_index ]->params().ncols_ ==
+            (*pyramid)[ py_sb00_index + 2 ]->params().ncols_ ) &&
+          ( (*pyramid)[ py_sb00_index ]->params().ncols_ ==
+            (*pyramid)[ py_sb00_index + 3 ]->params().ncols_ ) ),
+          "Dimensions mismatch detected between same level sub-bands"
+          " inside input pyramid" );
+            
+        TEAGN_TRUE_OR_RETURN( (
+          ( (*pyramid)[ py_sb00_index ]->nBands() == 1 ) &&
+          ( (*pyramid)[ py_sb00_index + 1 ]->nBands() == 1 ) &&
+          ( (*pyramid)[ py_sb00_index + 2 ]->nBands() == 1 ) &&
+          ( (*pyramid)[ py_sb00_index + 3 ]->nBands() == 1 ) ),
+          "Invalid number of bands detected inside input pyramid" );
+          
+        /* Checking the correct dimensions between levels */
+        
+        if( level != py_levels ) {
+          TEAGN_TRUE_OR_RETURN( (
+            ( (*pyramid)[ py_sb00_index ]->params().nlines_ >
+            ( 2 * ( (*pyramid)[ py_sb00_index + 4 ]->params().nlines_ - 
+            1 ) ) ) 
+            && ( (*pyramid)[ py_sb00_index ]->params().ncols_ >
+            ( 2 * ( (*pyramid)[ py_sb00_index + 4 ]->params().ncols_ - 
+            1 ) ) ) ),
+            "Dimensions mismatch detected between levels inside input pyramid" 
+            );
+        }
+      }
+      
+      if( input_image.isActive() ) {
+        TEAGN_TRUE_OR_RETURN(
+          ( (*pyramid)[ 0 ]->params().nlines_ == 
+          ( (int)ceil( ((double)input_image->params().nlines_) / 2 ) ) &&
+          ( (*pyramid)[ 0 ]->params().ncols_) == 
+          ( (int)ceil( ((double)input_image->params().ncols_ ) / 2 ) ) ) , 
+          "The supplied pyramid and reference image are not compatible" );
+      }
+    } else { 
+      TEAGN_LOG_AND_RETURN( "Invalid filter_task parameter" );
+    }
+  
+  return true;  
+}
+
+
+bool TePDIMallatWavelets::RunImplementation()
+{
+  std::string filter_task;
+  params_.GetParameter( "filter_task", filter_task );
+
+  if( filter_task == "SBExtract" ) {
+      TEAGN_TRUE_OR_RETURN( Decompose( params_ ), 
+        "Unable to do Wavelet decomposition" );
+        
+      TePDITypes::TePDIRasterPtrType sub_band;
+      params_.GetParameter( "sub_band", sub_band );
+      
+      int sub_band_index = 0;
+      params_.GetParameter( "sub_band_index", sub_band_index );
+      
+      TEAGN_TRUE_OR_RETURN( GetSubBand(  pyramid_.size() - 1,
+        sub_band_index, sub_band ),
+        "Unable to copy sub-band to output raster" );
+        
+      pyramid_.clear();
+    } else if( filter_task == "SBSwap" ) {
+      TEAGN_TRUE_OR_RETURN( Decompose( params_ ), 
+        "Unable to do Wavelet decomposition" );
+        
+      TePDITypes::TePDIRasterPtrType sub_band;
+      params_.GetParameter( "sub_band", sub_band );
+      
+      int sub_band_index = 0;
+      params_.GetParameter( "sub_band_index", sub_band_index );      
+      
+      TEAGN_TRUE_OR_RETURN( ChangeSubBand( pyramid_.size() - 1,
+        sub_band_index, sub_band ), "Sub-band swap error" );
+        
+      TEAGN_TRUE_OR_RETURN( Recompose( pyramid_.size() - 1, params_ ),
+        "Recomposition error" );
+        
+      pyramid_.clear();
+    } else if( filter_task == "GetPyramid" ) {
+      TEAGN_TRUE_OR_RETURN( Decompose( params_ ), 
+        "Unable to do Wavelet decomposition" );
+        
+      TePDITypes::TePDIRasterVectorPtrType pyramid;
+      params_.GetParameter( "pyramid", pyramid );
+        
+      for( unsigned int level = 1 ; level < pyramid_.size() ; ++level ) {
+        TePDITypes::TePDIRasterPtrType sub_band00;
+        TePDITypes::TePDIRasterPtrType sub_band01;
+        TePDITypes::TePDIRasterPtrType sub_band10;
+        TePDITypes::TePDIRasterPtrType sub_band11;
+        
+        TEAGN_TRUE_OR_RETURN(
+          TePDIUtils::TeAllocRAMRaster( sub_band00, 1, 1, 1, false, TeDOUBLE, 
+          0 ), "Unable to allocate temporary sub-band00 raster" );
+        TEAGN_TRUE_OR_RETURN(
+          TePDIUtils::TeAllocRAMRaster( sub_band01, 1, 1, 1, false, TeDOUBLE, 
+          0 ), "Unable to allocate temporary sub-band01 raster" );
+        TEAGN_TRUE_OR_RETURN(
+          TePDIUtils::TeAllocRAMRaster( sub_band10, 1, 1, 1, false, TeDOUBLE, 
+          0 ), "Unable to allocate temporary sub-band10 raster" );
+        TEAGN_TRUE_OR_RETURN(
+          TePDIUtils::TeAllocRAMRaster( sub_band11, 1, 1, 1, false, TeDOUBLE, 
+          0 ), "Unable to allocate temporary sub-band11 raster" );
+      
+        TEAGN_TRUE_OR_RETURN( GetSubBand( level, 0, sub_band00 ),
+          "Unable to copy sub-band00 to output raster" );
+        pyramid->push_back( sub_band00 );        
+        TEAGN_TRUE_OR_RETURN( GetSubBand( level, 1, sub_band01 ),
+          "Unable to copy sub-band01 to output raster" );
+        pyramid->push_back( sub_band01 );
+        TEAGN_TRUE_OR_RETURN( GetSubBand( level, 2, sub_band10 ),
+          "Unable to copy sub-band10 to output raster" );
+        pyramid->push_back( sub_band10 );
+        TEAGN_TRUE_OR_RETURN( GetSubBand( level, 3, sub_band11 ),
+          "Unable to copy sub-band11 to output raster" );
+        pyramid->push_back( sub_band11 );
+      }
+      
+      pyramid_.clear();
+    } else if( filter_task == "RecomposePyramid" ) {
+      pyramid_.clear();
+      
+      TePDITypes::TePDIRasterPtrType input_image;
+      if( params_.CheckParameter< TePDITypes::TePDIRasterPtrType >( 
+        "input_image" ) ) {
+        
+        params_.GetParameter( "input_image", input_image );
+      }      
+      
+      TePDITypes::TePDIRasterVectorPtrType pyramid;
+      params_.GetParameter( "pyramid", pyramid );
+      
+      const unsigned int levels = ( pyramid->size() - 1 ) / 3;
+      unsigned int sblines = 0;
+      unsigned int sbcols = 0;
+      unsigned int py_sb00_index = 0;
+    
+      for( unsigned int level = 1 ; level <= levels ; ++level ) {
+        py_sb00_index = ( level - 1 ) * 4;
+      
+        if( ( level == 1 ) && ( input_image.isActive() ) ) {
+          sblines = ( unsigned int )
+            ceil( ( (double)input_image->params().nlines_ ) / 2 );
+          sbcols = ( unsigned int )
+            ceil( ( (double)input_image->params().ncols_ ) / 2 );
+        } else {
+          sblines = (*pyramid)[ py_sb00_index + 1 ]->params().nlines_;
+          sbcols = (*pyramid)[ py_sb00_index + 1 ]->params().ncols_;
+        }
+        
+        TEAGN_TRUE_OR_RETURN( AllocateTopLevel( level, sblines, sbcols ),
+          "Unable to allocate the new pyramid level " +
+          Te2String( level ) );
+          
+        TEAGN_TRUE_OR_RETURN( ChangeSubBand( level,
+          0, (*pyramid)[ py_sb00_index ] ), "Unable to copy pyramid data at"
+          "level " + Te2String( level ) + " sub-band 00" );
+        TEAGN_TRUE_OR_RETURN( ChangeSubBand( level,
+          1, (*pyramid)[ py_sb00_index + 1 ] ), "Unable to copy pyramid data at"
+          "level " + Te2String( level ) + " sub-band 01" );
+        TEAGN_TRUE_OR_RETURN( ChangeSubBand( level,
+          2, (*pyramid)[ py_sb00_index + 2 ] ), "Unable to copy pyramid data at"
+          "level " + Te2String( level ) + " sub-band 10" );
+        TEAGN_TRUE_OR_RETURN( ChangeSubBand( level,
+          3, (*pyramid)[ py_sb00_index + 3 ] ), "Unable to copy pyramid data at"
+          "level " + Te2String( level ) + " sub-band 11" );
+      }
+      
+      TEAGN_TRUE_OR_RETURN( Recompose( pyramid_.size() - 1, params_ ),
+        "Recomposition error" ); 
+        
+      pyramid_.clear();     
+    } else {
+      TEAGN_LOG_AND_THROW( "Invalid filter task" );
+    }    
+  
+  return true;
+}
+
+
+
+
+void TePDIMallatWavelets::ResetState( const TePDIParameters& )
+{
+  shift_histogram_flag_ = false;
+  input_image_mean_ = 0;
+}
+
+
+bool TePDIMallatWavelets::Decompose( const TePDIParameters& params )
+{
+  /* Retriving parameters */
+    
+  TePDITypes::TePDIRasterPtrType input_image;
+  params.GetParameter( "input_image", input_image );
+  
+  int band;
+  params.GetParameter( "band", band );  
+  
+  int levels = 0;
+  params.GetParameter( "levels", levels );
+  
+  /* Guessing dummy use */
+  
+  bool input_image_uses_dummy = input_image->params().useDummy_;
+  double input_image_dummy = 0;
+  if( input_image_uses_dummy ) {
+    input_image_dummy = input_image->params().dummy_[ band ];
+  }
+  
+  /* Generationg subband pyramid level 0 */
+    
+  const unsigned int inputlines = input_image->params().nlines_;
+  const unsigned int inputcolumns = input_image->params().ncols_;
+  
+  pyramid_.clear();
+    
+  TePDIMatrix<double> subband0;
+  
+  TePDIMatrix< TePDIMatrix< double > > levelzeromatrix( 1, 1 ); 
+  levelzeromatrix( 0, 0 ) = subband0;
+  
+  pyramid_.push_back( levelzeromatrix );
+  
+  TEAGN_TRUE_OR_RETURN( 
+    pyramid_[ 0 ]( 0, 0 ).Reset( inputlines, inputcolumns,
+    TePDIMatrix<double>::AutoMemPol ),
+    "Unable to create level 0 sub-band" );
+    
+  double pixel_value;
+  TePDIMatrix< double >& l0matrix = pyramid_[ 0 ]( 0, 0 );
+  
+  input_image_mean_ = 0;
+  
+  unsigned int inputline;
+  unsigned int inputcolumn;
+  
+  for( inputline = 0 ; inputline < inputlines ; ++inputline ) {
+    for( inputcolumn = 0 ; inputcolumn < inputcolumns ; ++inputcolumn ) {
+      if( input_image->getElement( inputcolumn, inputline, pixel_value, 
+          band ) ) {
+  
+        l0matrix( inputline, inputcolumn ) = pixel_value;
+        input_image_mean_ += pixel_value;
+      } else {
+        TEAGN_TRUE_OR_RETURN( input_image_uses_dummy, "Raster read error" );
+      
+        l0matrix( inputline, inputcolumn ) = input_image_dummy;
+        input_image_mean_ += input_image_dummy;        
+      }
+    }
+  }
+  
+  input_image_mean_ = 
+    input_image_mean_ / ( (double)( inputlines * inputcolumns ) );  
+  
+  if( shift_histogram_flag_ ) {
+  
+    /* Removing mean */  
+    
+    for( inputline = 0 ; inputline < inputlines ; ++inputline ) {
+      for( inputcolumn = 0 ; inputcolumn < inputcolumns ; ++inputcolumn ) {
+        l0matrix( inputline, inputcolumn ) = 
+        l0matrix( inputline, inputcolumn ) - input_image_mean_;
+      }
+    }  
+  }
+  
+  /* Generating the other subband pyramid levels */
+  
+  for( int level = 1 ; level <= levels ; ++level ) {
+    TEAGN_TRUE_OR_RETURN( GenerateLevel( level, params ),
+      "Unable to generate level " + 
+      Te2String( level ) );
+  }
+  
+  return true;  
+}
+
+
+bool TePDIMallatWavelets::Recompose( unsigned int ref_level,
+  const TePDIParameters& params )
+{
+  TePDITypes::TePDIRasterPtrType input_image;
+  if( params.CheckParameter< TePDITypes::TePDIRasterPtrType >( 
+    "input_image" ) ) {
+      
+    params.GetParameter( "input_image", input_image );    
+  }
+
+  TEAGN_TRUE_OR_RETURN( ( ( pyramid_.size() > ref_level ) &&
+    ( ref_level > 0 ) ), 
+    "Invalid reference level" );
+    
+  /* Retriving the systesis filters */
+  
+  
+  std::vector< double > s_filter_l;
+  std::vector< double > s_filter_h;
+  int lowshift;
+  int highshift;
+  
+  TEAGN_TRUE_OR_RETURN( GetSynthesisFilters( s_filter_l, s_filter_h,
+    lowshift, highshift, params ),
+    "Unable to get synthesis filters" );  
+  
+  /* Reconstruction of levels */
+  
+  TePDIMatrix< double > rec_result;
+  
+  {
+    TePDIMatrix< double > temp_llsb;
+    
+    unsigned int llsblines;
+    unsigned int llsbcols;
+    
+    TePDIPIManager progress( "Recomposing levels...", ref_level,
+      progress_enabled_ );
+    
+    for( unsigned int level = ref_level ; level != 0 ; --level ) {
+      TEAGN_FALSE_OR_RETURN( progress.Increment(), "Canceled by the user" );
+    
+      if( level == 1 ) {
+        if( pyramid_[ 0 ]( 0, 0 ).IsEmpty() ) {
+          llsblines = ( ( pyramid_[ 1 ]( 0, 0 ).GetLines() - 1 ) * 2 ) + 1;
+          llsbcols = ( ( pyramid_[ 1 ]( 0, 0 ).GetColumns() - 1 ) * 2 ) + 1;
+        } else {
+          llsblines = pyramid_[ 0 ]( 0, 0 ).GetLines();
+          llsbcols = pyramid_[ 0 ]( 0, 0 ).GetColumns();
+        }
+      } else {
+        llsblines = pyramid_[ level - 1 ]( 0, 1 ).GetLines();
+        llsbcols = pyramid_[ level - 1 ]( 0, 1 ).GetColumns();
+      }
+      
+      TEAGN_TRUE_OR_RETURN( temp_llsb.Reset( llsblines, llsbcols,
+        TePDIMatrix<double>::AutoMemPol ),
+        "Unable to allocate memory for low-low sub-band reconstruction "
+        "at level " + Te2String( level ) );    
+      
+      if( level == ref_level ) {
+        TEAGN_TRUE_OR_RETURN( ReconstructLL( pyramid_[ level ]( 0, 0 ), 
+          pyramid_[ level ]( 0, 1 ), pyramid_[ level ]( 1, 0 ),
+          pyramid_[ level ]( 1, 1 ), s_filter_l, 
+          s_filter_h, lowshift, highshift, temp_llsb ),
+          "Low-Low sub-band reconstruction error at level "
+          + Te2String( level ) );
+      } else {
+        TEAGN_TRUE_OR_RETURN( ReconstructLL( rec_result, 
+          pyramid_[ level ]( 0, 1 ), pyramid_[ level ]( 1, 0 ),
+          pyramid_[ level ]( 1, 1 ), s_filter_l, 
+          s_filter_h, lowshift, highshift, temp_llsb ),
+          "Low-Low sub-band reconstruction error at level "
+          + Te2String( level ) ); 
+      }
+      
+      rec_result = temp_llsb;
+    }
+    
+    progress.Toggle( false );
+  }
+  
+  /* Retriving output raster reference from parameters */
+  
+  TePDITypes::TePDIRasterPtrType output_image;
+  params.GetParameter( "output_image", output_image );
+    
+  /* Updating output raster geo parameters if available */
+  
+  if( input_image.isActive() ) {
+    TeRasterParams output_image_params = output_image->params();
+    
+    output_image_params.nBands( 1 );
+    
+    if( input_image->projection() != 0 ) {
+      TeSharedPtr< TeProjection > proj( TeProjectionFactory::make( 
+        input_image->projection()->params() ) );    
+      output_image_params.projection( proj.nakedPointer() );
+    }    
+    
+    output_image_params.boxResolution( input_image->params().box().x1(), 
+      input_image->params().box().y1(), input_image->params().box().x2(), 
+      input_image->params().box().y2(), 
+      input_image->params().resx_, input_image->params().resy_ );    
+    
+    TEAGN_TRUE_OR_RETURN( output_image->init( output_image_params ),
+      "Output raster reset error" );
+  } else {
+    TeRasterParams output_image_params = output_image->params();
+    
+    output_image_params.nBands( 1 );
+    
+    output_image_params.setNLinesNColumns( rec_result.GetLines(),
+      rec_result.GetColumns() );
+    
+    TEAGN_TRUE_OR_RETURN( output_image->init( output_image_params ),
+      "Output raster reset error" );  
+  }
+    
+  double channel_min_level = 0;
+  double channel_max_level = 0;
+  
+  TEAGN_TRUE_OR_RETURN( TePDIUtils::TeGetRasterMinMaxBounds(
+    output_image, 0, channel_min_level,
+    channel_max_level ), "Unable to get output raster channel level bounds" );    
+ 
+  unsigned int line, column;
+  double value;
+  
+  for( line = 0 ; line < rec_result.GetLines() ; ++line ) {
+    for( column = 0 ; column < rec_result.GetColumns() ; ++column ) {
+      value = rec_result( line, column );
+      
+      if( shift_histogram_flag_ ) {
+        value += input_image_mean_;
+      }
+      
+      /* Level range filtering */
+
+      if( value < channel_min_level ) {
+        value = channel_min_level;
+      } else if( value > channel_max_level ) {
+        value = channel_max_level;
+      }  
+            
+      TEAGN_TRUE_OR_RETURN( 
+        output_image->setElement( column, line, value, 0 ),
+        "Unable to set output raster element" );
+    }
+  }  
+  
+  return true;
+}
+
+
+bool TePDIMallatWavelets::GetSubBand( unsigned int level, 
+  unsigned int subband, 
+  const TePDITypes::TePDIRasterPtrType& sb_raster ) const
+{
+  TEAGN_TRUE_OR_RETURN( pyramid_.size() > level, 
+    "Invalid level number" );
+  TEAGN_TRUE_OR_RETURN( sb_raster.isActive(), 
+    "Inactive sub-band raster" );
+    
+    
+  TePDIMatrix< double >* sb_ptr = 0;
+    
+  switch( subband ) {
+    case 0 :
+    {
+      sb_ptr = &( pyramid_[ level ]( 0 , 0 ) );
+      break;
+    }
+    case 1 :
+    {
+      sb_ptr = &( pyramid_[ level ]( 0 , 1 ) );
+      break;
+    }
+    case 2 :
+    {
+      sb_ptr = &( pyramid_[ level ]( 1 , 0 ) );
+      break;
+    }
+    case 3 :
+    {
+      sb_ptr = &( pyramid_[ level ]( 1 , 1 ) );
+      break;
+    }
+    default :
+    {
+      TEAGN_LOG_AND_RETURN( "Invalid subband" );
+    }
+  }
+  
+  unsigned int lines = sb_ptr->GetLines();
+  unsigned int columns = sb_ptr->GetColumns();
+      
+  TeRasterParams sb_raster_params = sb_raster->params();
+  sb_raster_params.setDataType( TeDOUBLE, -1 );
+  sb_raster_params.nBands( 1 );
+  sb_raster_params.setNLinesNColumns( lines, columns );
+  TEAGN_TRUE_OR_RETURN( sb_raster->init( sb_raster_params ),
+    "Unable to reset sb_raster" );   
+        
+  unsigned int line;
+  unsigned int col;
+      
+  for( line = 0; line < lines ; ++line ) {
+    for( col = 0; col < columns ; ++col ) {
+      TEAGN_TRUE_OR_RETURN( sb_raster->setElement( col, line,
+        (*sb_ptr)( line, col ), 0 ),
+        "Unable to copy pixel value into low-low output raster" );
+    }
+  }    
+  
+  return true;
+}
+
+
+bool TePDIMallatWavelets::ChangeSubBand( 
+  unsigned int level, unsigned int subband_index,
+  const TePDITypes::TePDIRasterPtrType& newsband )
+{
+  TEAGN_TRUE_OR_RETURN( pyramid_.size() > level, "Invalid level number" );
+  TEAGN_TRUE_OR_RETURN( newsband.isActive(), 
+    "The new sub-band is inactive" );
+    
+  TePDIMatrix< double >* target_sb = 0;
+    
+  switch( subband_index ) {
+    case 0 :
+    {
+      target_sb = &( pyramid_[ level ]( 0, 0 ) );
+      
+      break;
+    }
+    case 1 :
+    {
+      target_sb = &( pyramid_[ level ]( 0, 1 ) );
+      
+      break;
+
+    }
+    case 2 :
+    {
+      target_sb = &( pyramid_[ level ]( 1, 0 ) );
+      
+      break;
+
+    }
+    case 3 :
+    {
+      target_sb = &( pyramid_[ level ]( 1, 1 ) );
+      
+      break;
+
+    }
+    default :
+    {
+      TEAGN_LOG_AND_RETURN( "Invalid subband" );
+    }
+  }
+  
+  const int sblines = (int)target_sb->GetLines();
+  const int sbcols = (int)target_sb->GetColumns();
+  const int raster_lines = newsband->params().nlines_;
+  const int raster_cols = newsband->params().ncols_;  
+  
+  TEAGN_TRUE_OR_RETURN( 
+    ( ( sblines == raster_lines ) && ( sbcols == raster_cols ) ),
+    "Incompatible sub-band dimensions" );  
+  
+  int line;
+  int col;
+      
+  for( line = 0; line < sblines ; ++line ) {
+    for( col = 0; col < sbcols ; ++col ) {
+      if( ( line < raster_lines ) && ( col < raster_cols ) ) {
+        TEAGN_TRUE_OR_RETURN( newsband->getElement( col, line,
+          (*target_sb)( line, col ), 0 ),
+          "Unable to copy pixel value from input raster" );
+      } else {
+        (*target_sb)( line, col ) = 0;
+      }
+    }
+  }    
+  
+  return true;
+}
+
+
+bool TePDIMallatWavelets::GenerateLevel( unsigned int level,
+  const TePDIParameters& params )
+{
+  TEAGN_TRUE_OR_RETURN( level > 0, "Invalid level" );
+  TEAGN_TRUE_OR_RETURN( pyramid_.size() >= level, 
+    "Not enought generated levels to generate the new required level" );
+    
+  const unsigned int subblines = ( unsigned int )
+    ceil( ( (double)pyramid_[ level - 1 ]( 0 , 0 ).GetLines() ) / 2 );
+  const unsigned int subbcolumns = ( unsigned int )
+    ceil( ( (double)pyramid_[ level - 1 ]( 0, 0 ).GetColumns() ) / 2 );
+
+  /* Deleting all higher levels */
+     
+  while( pyramid_.size() > ( level + 1 ) ) {
+    pyramid_.pop_back();
+  }
+  
+  /* Allocating space for the new level, if it doesn't exists */
+  
+  TEAGN_TRUE_OR_RETURN( AllocateTopLevel( level, subblines, subbcolumns ),
+    "Unable to allocate memory for the new level" );
+    
+  /* Retriving the analysis filters */
+  
+  std::vector< double > a_filter_l;
+  std::vector< double > a_filter_h;
+  int lowshift = 0;
+  int highshift = 0;
+  
+  TEAGN_TRUE_OR_RETURN( GetAnalysisFilters( a_filter_l, a_filter_h,
+     lowshift, highshift, params ), "Unable to retrive analysis filters" );
+  
+  /* Applying filters */
+  
+  TePDIMatrix< double > temp_sb;
+  TEAGN_TRUE_OR_RETURN( 
+    temp_sb.Reset( pyramid_[ level - 1 ]( 0 , 0 ).GetLines(), subbcolumns,
+    TePDIMatrix<double>::AutoMemPol ),
+    "Unable to create temporary sub-band" );
+    
+  TePDIPIManager progress( "Generating sub-bands for level " + 
+    Te2String( level ), 8, progress_enabled_ );
+    
+  ApplyHorizontalFilter( 
+    pyramid_[ level - 1 ]( 0, 0 ), a_filter_l, lowshift, temp_sb );
+  TEAGN_FALSE_OR_RETURN( progress.Increment(), "Canceled by the user" );
+  ApplyVerticalFilter( 
+    temp_sb, a_filter_l, lowshift, pyramid_[ level ]( 0, 0 ) );
+  TEAGN_FALSE_OR_RETURN( progress.Increment(), "Canceled by the user" );
+    
+  ApplyHorizontalFilter( 
+    pyramid_[ level - 1 ]( 0, 0 ), a_filter_l, lowshift, temp_sb );
+  progress.Increment();
+  ApplyVerticalFilter( 
+    temp_sb, a_filter_h, highshift, pyramid_[ level ]( 0, 1 ) );
+  TEAGN_FALSE_OR_RETURN( progress.Increment(), "Canceled by the user" );
+      
+  ApplyHorizontalFilter( 
+    pyramid_[ level - 1 ]( 0, 0 ), a_filter_h, highshift, temp_sb );
+  progress.Increment();
+  ApplyVerticalFilter( 
+    temp_sb, a_filter_l, lowshift, pyramid_[ level ]( 1, 0 ) );
+  TEAGN_FALSE_OR_RETURN( progress.Increment(), "Canceled by the user" );
+
+  ApplyHorizontalFilter( 
+    pyramid_[ level - 1 ]( 0, 0 ), a_filter_h, highshift, temp_sb );
+  progress.Increment();
+  ApplyVerticalFilter( 
+    temp_sb, a_filter_h, highshift, pyramid_[ level ]( 1, 1 ) );
+  TEAGN_FALSE_OR_RETURN( progress.Increment(), "Canceled by the user" );
+    
+  progress.Toggle( false );
+  
+  return true;
+}
+
+
+void TePDIMallatWavelets::ApplyVerticalFilter( 
+  const TePDIMatrix< double >& inMatrix, 
+  const std::vector< double >& filter,
+  int filter_shift,
+  TePDIMatrix< double >& outMatrix ) const
+{
+  TEAGN_TRUE_OR_THROW( inMatrix.GetLines() > outMatrix.GetLines(),
+    "inMatrix lines number must be greater than outMatrix lines number" );
+  TEAGN_TRUE_OR_THROW( inMatrix.GetColumns() == outMatrix.GetColumns(),
+    "inMatrix columns != outMatrix columns" );
+  TEAGN_TRUE_OR_THROW( inMatrix.GetLines() > filter.size(),
+    "inMatrix lines < filter size" );
+    
+  const unsigned int filter_size = filter.size();
+  const unsigned int makeeven = filter_shift % 2;
+  const unsigned int in_lines = inMatrix.GetLines();
+  const unsigned int in_columns = inMatrix.GetColumns();
+  const unsigned int vitual_in_lines_start = 
+    ( filter_size - 1 );/* The index where start the apply of
+    filter index 0 */
+  const unsigned int vitual_in_lines_bound = 
+    in_lines + vitual_in_lines_start;
+  
+  unsigned int virtual_in_line;
+  unsigned int in_column;
+  unsigned filter_index;
+  double out_level;
+  
+  for( in_column = 0 ; in_column < in_columns ; ++in_column ) {
+       
+    for( virtual_in_line = vitual_in_lines_start + makeeven; 
+         virtual_in_line < vitual_in_lines_bound ; 
+         virtual_in_line += 2 ) {
+         
+      out_level = 0;  
+    
+      for( filter_index = 0 ; filter_index < filter_size ; ++filter_index ) {
+        
+        out_level +=
+          inMatrix( ( virtual_in_line - filter_index ) % in_lines, 
+          in_column ) * filter[ filter_index ];
+      }
+      
+      outMatrix( ( ( virtual_in_line - vitual_in_lines_start + 
+        filter_shift ) % in_lines ) / 2, in_column ) = out_level;
+    }
+  }
+}
+
+
+void TePDIMallatWavelets::ApplyHorizontalFilter( 
+  const TePDIMatrix< double >& inMatrix,
+  const std::vector< double >& filter,
+  int filter_shift,
+  TePDIMatrix< double >& outMatrix ) const
+{
+  TEAGN_TRUE_OR_THROW( inMatrix.GetColumns() > outMatrix.GetColumns(),
+    "inMatrix columns  < outMatrix columns" );
+  TEAGN_TRUE_OR_THROW( inMatrix.GetLines() == outMatrix.GetLines(),
+    "inMatrix lines != outMatrix lines" );
+  TEAGN_TRUE_OR_THROW( inMatrix.GetColumns() > filter.size(),
+    "inMatrix columns < filter size" );
+    
+  const unsigned int filter_size = filter.size();
+  const unsigned int makeeven = filter_shift % 2;
+  const unsigned int in_lines = inMatrix.GetLines();
+  const unsigned int in_columns = inMatrix.GetColumns();
+  const unsigned int virtual_in_column_start = 
+    ( filter_size - 1 ) ;/* The index where start the apply of
+    filter index 0 */
+  const unsigned int virtual_in_columns_bound = 
+    in_columns + virtual_in_column_start;
+
+  unsigned virtual_in_column;  
+  unsigned int in_line;
+  unsigned int filter_index;
+  double out_level;
+  
+  for( in_line = 0 ; in_line < in_lines ; ++in_line ) {
+       
+    for( virtual_in_column = virtual_in_column_start + makeeven; 
+         virtual_in_column < virtual_in_columns_bound ; 
+         virtual_in_column += 2 ) {
+         
+      out_level = 0;  
+    
+      for( filter_index = 0 ; filter_index < filter_size ; ++filter_index ) {
+        
+        out_level += 
+          inMatrix( in_line, ( virtual_in_column -  
+            filter_index ) % in_columns ) * filter[ filter_index ];
+      }
+      
+      outMatrix( in_line, 
+        ( ( virtual_in_column - virtual_in_column_start + 
+        filter_shift ) % in_columns ) / 2 ) = out_level;
+    }
+  }
+}
+
+
+bool TePDIMallatWavelets::BuildSuperimposedLevel( unsigned int level,
+  TePDIMatrix< double >& level_matrix, bool normalize, double min_norm_level, 
+  double max_norm_level ) const
+{
+  TEAGN_TRUE_OR_RETURN( ( ! level_matrix.IsEmpty() ), 
+    "level_matrix is empty" );
+  TEAGN_TRUE_OR_RETURN( ( level > 0 ) && ( level < pyramid_.size() ),
+    "Invalid level" );
+    
+  if( level == ( pyramid_.size() - 1 ) ) {
+    if( normalize ) {
+      TePDIMatrix< double > sb00( pyramid_[ level ]( 0, 0 ).GetLines(),
+        pyramid_[ level ]( 0, 0 ).GetColumns() );
+      TePDIMatrix< double > sb01( pyramid_[ level ]( 0, 1 ).GetLines(),
+        pyramid_[ level ]( 0, 1 ).GetColumns() );
+      TePDIMatrix< double > sb10( pyramid_[ level ]( 1, 0 ).GetLines(),
+        pyramid_[ level ]( 1, 0 ).GetColumns() );
+      TePDIMatrix< double > sb11( pyramid_[ level ]( 1, 1 ).GetLines(),
+        pyramid_[ level ]( 1, 1 ).GetColumns() );
+      
+      TEAGN_TRUE_OR_RETURN( NormalizeMatrix( 
+        pyramid_[ level ]( 0, 0 ), sb00,
+        min_norm_level, max_norm_level ), "Matrix normalization error" );
+      TEAGN_TRUE_OR_RETURN( NormalizeMatrix( 
+        pyramid_[ level ]( 0, 1 ), sb01,
+        min_norm_level, max_norm_level ), "Matrix normalization error" );
+      TEAGN_TRUE_OR_RETURN( NormalizeMatrix( 
+        pyramid_[ level ]( 1, 0 ), sb10,
+        min_norm_level, max_norm_level ), "Matrix normalization error" );
+      TEAGN_TRUE_OR_RETURN( NormalizeMatrix( 
+        pyramid_[ level ]( 1, 1 ), sb11,
+        min_norm_level, max_norm_level ), "Matrix normalization error" );
+      
+      TEAGN_TRUE_OR_RETURN( AgregateSubBands( sb00, sb01, sb10, sb11,
+        level_matrix ), "Unable to agregate sub-bands at level " +
+        Te2String( level ) );
+    } else {
+      TEAGN_TRUE_OR_RETURN( AgregateSubBands( pyramid_[ level ]( 0, 0 ),
+        pyramid_[ level ]( 0, 1 ), pyramid_[ level ]( 1, 0 ),
+        pyramid_[ level ]( 1, 1 ), level_matrix ), 
+        "Unable to agregate sub-bands at level " +
+        Te2String( level ) );    
+    };
+      
+    return true;
+  } else {
+    TePDIMatrix< double > sb00;
+    TEAGN_TRUE_OR_RETURN( sb00.Reset( pyramid_[ level ]( 0, 1 ).GetLines(),
+      pyramid_[ level ]( 0, 1 ).GetColumns(), 
+      TePDIMatrix<double>::AutoMemPol ),
+      "Unable to allocate memory for sub-band [0,0] at level " +
+      Te2String( level ) );
+    
+    TEAGN_TRUE_OR_RETURN( BuildSuperimposedLevel( level + 1, sb00, normalize,
+      min_norm_level, max_norm_level ),
+      "Unable to build superimposed level " +
+      Te2String( level ) );
+      
+    if( normalize ) {
+      TePDIMatrix< double > sb01( pyramid_[ level ]( 0, 1 ).GetLines(),
+        pyramid_[ level ]( 0, 1 ).GetColumns() );
+      TePDIMatrix< double > sb10( pyramid_[ level ]( 1, 0 ).GetLines(),
+        pyramid_[ level ]( 1, 0 ).GetColumns() );
+      TePDIMatrix< double > sb11( pyramid_[ level ]( 1, 1 ).GetLines(),
+        pyramid_[ level ]( 1, 1 ).GetColumns() );
+      
+      TEAGN_TRUE_OR_RETURN( NormalizeMatrix( 
+        pyramid_[ level ]( 0, 1 ), sb01,
+        min_norm_level, max_norm_level ), "Matrix normalization error" );
+      TEAGN_TRUE_OR_RETURN( NormalizeMatrix( 
+        pyramid_[ level ]( 1, 0 ), sb10,
+        min_norm_level, max_norm_level ), "Matrix normalization error" );
+      TEAGN_TRUE_OR_RETURN( NormalizeMatrix( 
+        pyramid_[ level ]( 1, 1 ), sb11,
+        min_norm_level, max_norm_level ), "Matrix normalization error" );      
+      
+      TEAGN_TRUE_OR_RETURN( AgregateSubBands( sb00, sb01, sb10, sb11,
+        level_matrix ), "Unable to agregate sub-bands at level " +
+        Te2String( level ) );
+    } else {
+      TEAGN_TRUE_OR_RETURN( AgregateSubBands( sb00, pyramid_[ level ]( 0, 1 ),
+        pyramid_[ level ]( 1, 0 ), pyramid_[ level ]( 1, 1 ), level_matrix ),
+        "Unable to agregate sub-bands at level " +
+        Te2String( level ) );      
+    }  
+      
+    return true;
+  }
+}
+
+
+bool TePDIMallatWavelets::AgregateSubBands(
+  const TePDIMatrix< double >& upper_left,
+  const TePDIMatrix< double >& upper_right,
+  const TePDIMatrix< double >& lower_left,
+  const TePDIMatrix< double >& lower_right,
+  TePDIMatrix< double >& result ) const
+{
+  TEAGN_TRUE_OR_RETURN( 
+    ( ! result.IsEmpty() ), "result matrix is empty" );
+
+  TEAGN_CHECK_EPS( upper_left.GetColumns(), lower_left.GetColumns(), 0,
+    "Size mismatch" );
+  TEAGN_CHECK_EPS( upper_right.GetColumns(), lower_right.GetColumns(), 0,
+    "Size mismatch" );
+  TEAGN_CHECK_EPS( upper_left.GetLines(), upper_right.GetLines(), 0,
+    "Size mismatch" );
+  TEAGN_CHECK_EPS( lower_left.GetLines(), lower_right.GetLines(), 0,
+    "Size mismatch" );
+    
+  unsigned int line = 0;
+  unsigned int column = 0;
+  const unsigned int lines_offset = upper_left.GetLines();
+  const unsigned int columns_offset = upper_left.GetColumns();
+  unsigned int lines_bound = 0;
+  unsigned int columns_bound = 0;
+  
+  /* Copying the upper_left sub-band */
+
+  lines_bound = 
+    MIN( result.GetLines(), upper_left.GetLines() );
+  columns_bound = 
+    MIN( result.GetColumns(), upper_left.GetColumns() );
+  
+  for( line = 0 ; line < lines_bound ; ++line ) {
+    for( column = 0 ; column < columns_bound ; ++column ) {
+      result( line, column ) = upper_left( line, column );
+    }
+  }
+  
+  /* Copying the upper_right sub-band */
+    
+  if( columns_offset < result.GetColumns() ) {
+    lines_bound = MIN( result.GetLines(), upper_right.GetLines() );
+    columns_bound = MIN( result.GetColumns() - columns_offset, 
+        upper_right.GetColumns() );  
+    
+    for( line = 0 ; line < lines_bound ; ++line ) {
+      for( column = 0 ; column < columns_bound ; ++column ) {
+        result( line, column + columns_offset ) = 
+          upper_right( line, column );
+      }
+    }
+  }
+  
+  /* Copying the lower_left sub-band */
+  
+  if( lines_offset < result.GetLines() ) {
+    lines_bound = 
+      MIN( result.GetLines() - lines_offset, 
+      lower_left.GetLines() );
+    columns_bound =
+      MIN( result.GetColumns(), lower_left.GetColumns() );   
+    
+    for( line = 0 ; line < lines_bound ; ++line ) {
+      for( column = 0 ; column < columns_bound ; ++column ) {
+        result( line + lines_offset, column ) = 
+          lower_left( line, column );
+      }
+    }
+  }
+  
+  /* Copying the lower_right sub-band */
+    
+  if( ( lines_offset < result.GetLines() ) &&
+      ( columns_offset < result.GetColumns() ) ) {
+  
+    lines_bound = MIN( 
+      result.GetLines() - lines_offset, lower_right.GetLines() );
+    columns_bound = MIN( 
+      result.GetColumns() - columns_offset, lower_right.GetColumns() );    
+    
+    for( line = 0 ; line < lines_bound ; ++line ) {
+      for( column = 0 ; column < columns_bound ; ++column ) {
+        result( line + lines_offset, column + columns_offset ) = 
+          lower_right( line, column );
+      }
+    }
+  }
+  
+  return true;          
+}
+
+
+bool TePDIMallatWavelets::PushLevel( unsigned int level, 
+  const TePDIMatrix< double >& sb0, const TePDIMatrix< double >& sb1, 
+  const TePDIMatrix< double >& sb2, const TePDIMatrix< double >& sb3 )
+{
+  TEAGN_TRUE_OR_RETURN( level > 0, "Invalid level" );
+  
+  TEAGN_TRUE_OR_RETURN( 
+    ( sb0.GetLines() == sb1.GetLines() ) &&
+    ( sb1.GetLines() == sb2.GetLines() ) &&
+    ( sb2.GetLines() == sb3.GetLines() ) &&
+    ( sb0.GetColumns() == sb1.GetColumns() ) &&
+    ( sb1.GetColumns() == sb2.GetColumns() ) &&
+    ( sb2.GetColumns() == sb3.GetColumns() ),
+    "All sub-bands must have the same dimensions" );
+    
+  TEAGN_TRUE_OR_RETURN( AllocateTopLevel( level, sb0.GetLines(), 
+    sb0.GetColumns() ), "Unable to allocate memory for the new level" );
+  
+  pyramid_[ level ]( 0, 0 ) = sb0;
+  pyramid_[ level ]( 0, 1 ) = sb1;
+  pyramid_[ level ]( 1, 0 ) = sb2;
+  pyramid_[ level ]( 1, 1 ) = sb3;
+  
+  return true;
+}
+
+
+bool TePDIMallatWavelets::AllocateTopLevel( unsigned int level, 
+  unsigned int sblines, unsigned int sbcolumns )
+{
+  /* Checking if the required levels already exists */
+
+  if( pyramid_.size() > 1 ) {
+    TEAGN_TRUE_OR_RETURN( 
+      ( ( level == pyramid_.size() ) || ( ( level + 1 ) == pyramid_.size() ) ),
+      "Invalid level" );
+  
+    if( ( level + 1 ) == pyramid_.size() ) {
+      if( ( pyramid_[ level ]( 0, 0 ).GetLines() == sblines ) &&
+        ( pyramid_[ level ]( 0, 0 ).GetColumns() == sbcolumns ) ) {
+        
+        return true;
+      }
+    }
+  } else {
+    TEAGN_TRUE_OR_RETURN( level == 1, "Invalid level" );
+  }
+  
+  /* Creating a dummy level 0 if necessary */
+  
+  if( pyramid_.size() == 0 ) {
+    TePDIMatrix<double> subband0;
+  
+    TePDIMatrix< TePDIMatrix< double > > levelzeromatrix( 1, 1 ); 
+    levelzeromatrix( 0, 0 ) = subband0;
+  
+    pyramid_.push_back( levelzeromatrix );  
+  }
+  
+  /* Checking if the supplied level dimensions are correct */
+  
+  if( level > 1 ) {
+    sblines = ( unsigned int )
+      ceil( ( (double)pyramid_[ level - 1 ]( 0 , 0 ).GetLines() ) / 2 );
+    sbcolumns = ( unsigned int )
+      ceil( ( (double)pyramid_[ level - 1 ]( 0, 0 ).GetColumns() ) / 2 );           
+  } else {
+    TEAGN_TRUE_OR_RETURN( ( sblines > 0 ) && ( sbcolumns > 0 ),
+      "Number of lines and number of columns must not be zero" );
+  }
+  
+  /* Allocating the new level */
+      
+  TePDIMatrix< TePDIMatrix< double > > newlevel;
+  pyramid_.push_back( newlevel );
+  
+  if( ! pyramid_[ level ].Reset( 2, 2 ) ) {
+    pyramid_.pop_back();
+    TEAGN_LOG_AND_RETURN( 
+      "Unable to create level " + Te2String( level ) );
+  }
+  
+  /* Allocating the new sub-bands for the new level */
+  
+  TePDIMatrix< double > tempsb;
+  
+  pyramid_[ level ]( 0, 0 ) = tempsb;
+  pyramid_[ level ]( 0, 1 ) = tempsb;
+  pyramid_[ level ]( 1, 0 ) = tempsb;
+  pyramid_[ level ]( 1, 1 ) = tempsb;
+  
+    
+  if( pyramid_[ level ]( 0, 0 ).Reset( sblines, sbcolumns, 
+    TePDIMatrix<double>::AutoMemPol ) &&
+    pyramid_[ level ]( 0, 1 ).Reset( sblines, sbcolumns, 
+    TePDIMatrix<double>::AutoMemPol ) &&
+    pyramid_[ level ]( 1, 0 ).Reset( sblines, sbcolumns,
+    TePDIMatrix<double>::AutoMemPol ) &&
+    pyramid_[ level ]( 1, 1 ).Reset( sblines, sbcolumns,
+    TePDIMatrix<double>::AutoMemPol ) ) {
+    
+    /* Fill the new level with 0's */
+    {
+      TePDIMatrix< double >& sb00_ref = pyramid_[ level ]( 0, 0 );
+      TePDIMatrix< double >& sb01_ref = pyramid_[ level ]( 0, 1 );
+      TePDIMatrix< double >& sb10_ref = pyramid_[ level ]( 1, 0 );
+      TePDIMatrix< double >& sb11_ref = pyramid_[ level ]( 1, 1 );
+    
+      unsigned int line;
+      unsigned int col;
+      
+      for( line = 0 ; line < sblines ; ++line ) {
+        for( col = 0 ; col < sbcolumns ; ++col ) {
+          sb00_ref( line, col ) = 0;
+          sb01_ref( line, col ) = 0;
+          sb10_ref( line, col ) = 0;
+          sb11_ref( line, col ) = 0;
+        }
+      }
+    }
+    
+    return true;    
+  } else {
+    pyramid_.pop_back();
+    TEAGN_LOG_AND_RETURN( "Unable to allocate all sub-bands into pyramid" );
+  }
+}
+
+
+bool TePDIMallatWavelets::GetAFiltersShift( 
+  const std::vector< double >& a_lowfilter,
+  const std::vector< double >& a_highfilter,
+  int& lowshift, int& highshift ) const
+{
+  const unsigned int fsizel = a_lowfilter.size();
+  const unsigned int fsizeh = a_highfilter.size();
+  
+  TEAGN_TRUE_OR_RETURN( fsizel > 1, "Low Filter size < 2" );
+  TEAGN_TRUE_OR_RETURN( fsizeh > 1, "High Filter size < 2" );
+  
+  lowshift = ( fsizel - 1 ) / 2;
+  highshift = ( fsizeh - 1 ) / 2;
+  
+  if( lowshift <= highshift ) {
+    highshift = lowshift;
+  } 
+    
+  if( lowshift == 0 ) lowshift = 1;
+  if( highshift == 0 ) highshift = 1;
+  
+  /* This is for odd symstric filters with different lenghts */
+  
+  if( ( ( lowshift % 2 ) != 0 ) && ( ( highshift % 2 ) == 0 ) ) {
+    --lowshift;
+  }
+  
+  if( ( ( lowshift % 2 ) == 0 ) && ( ( highshift % 2 ) != 0 ) ) {
+    --highshift;
+  }
+  
+  /* This is for non-symmetrical filters */
+  
+  if( ( a_lowfilter[ 0 ] != a_lowfilter[ fsizel - 1 ] ) && 
+    ( ( fsizel % 2 ) == 0 ) ) {
+    
+    /* updating the lowshift with the index of the higher absolute value 
+       inside the low filter */
+       
+    bool hindex_found = false;
+    double lowf_hav = 0; /* higher absolute value inside low filter */
+    
+    for( unsigned int lindex = 0 ; lindex < fsizel ; ++lindex ) {
+      if( hindex_found ) {
+        if( ABS( a_lowfilter[ lindex ] ) > lowf_hav ) {
+          lowf_hav = ABS( a_lowfilter[ lindex ] );
+          lowshift = lindex;
+        }
+      } else {
+        hindex_found = true;
+        lowf_hav = ABS( a_lowfilter[ lindex ] );
+        lowshift = lindex;
+      }
+    }
+    
+    lowshift = fsizel - lowshift - 1;
+    highshift = fsizel - lowshift - 1;
+    
+    if( ( lowshift % 2 ) != ( highshift % 2 ) ) {
+      ++highshift;
+    }
+  }
+  
+  return true;
+}
+
+
+bool TePDIMallatWavelets::GetSFiltersShift( 
+  const std::vector< double >& a_lowfilter,
+  const std::vector< double >& a_highfilter,
+  const std::vector< double >& s_lowfilter,
+  const std::vector< double >& s_highfilter,
+  int& lowshift, int& highshift ) const
+{
+  const unsigned int afsizel = a_lowfilter.size();
+  const unsigned int afsizeh = a_highfilter.size();
+  const unsigned int sfsizel = s_lowfilter.size();
+  const unsigned int sfsizeh = s_highfilter.size();
+  
+  TEAGN_TRUE_OR_RETURN( afsizel > 1, "Analysis Low Filter size < 2" );
+  TEAGN_TRUE_OR_RETURN( afsizeh > 1, "Analysis High Filter size < 2" );
+  TEAGN_TRUE_OR_RETURN( sfsizel > 1, "Syntesis Low Filter size < 2" );
+  TEAGN_TRUE_OR_RETURN( sfsizeh > 1, "Syntesis High Filter size < 2" );
+  
+  lowshift = ( sfsizel - 1 ) / 2;
+  highshift = ( sfsizeh - 1 ) / 2;
+    
+  if( lowshift == 0 ) lowshift = 1;
+  if( highshift == 0 ) highshift = 1;
+  
+  /* This is for odd symstric filters with different lenghts */
+  
+  if( ( ( lowshift % 2 ) != 0 ) && ( ( highshift % 2 ) == 0 ) ) {
+    ++highshift;
+  }
+  
+  if( ( ( lowshift % 2 ) == 0 ) && ( ( highshift % 2 ) != 0 ) ) {
+    ++lowshift;
+  }
+  
+  /* General case for even lenght filters */
+  
+  if( ( ( afsizel % 2 ) == 0 ) && ( ( afsizeh % 2 ) == 0 ) &&
+      ( ( sfsizel % 2 ) == 0 ) && ( ( sfsizeh % 2 ) == 0 ) ) {
+      
+    ++lowshift;
+    ++highshift;
+  }
+  
+  /* This is for non-symmetrical filters */
+  
+  if( s_lowfilter[ 0 ] != s_lowfilter[ sfsizel - 1 ] ) {
+    
+    /* updating the lowshift with the index of the higher absolute value 
+       inside the low filter */
+    
+    bool hav_found = false;
+    double lowf_hav = 0; /* low filter highest value */
+    
+    for( unsigned int lindex = 0 ; lindex < sfsizel ; ++lindex ) {
+      if( hav_found ) {
+        if( ABS( s_lowfilter[ lindex ] ) > lowf_hav ) {
+          lowf_hav = ABS( s_lowfilter[ lindex ] );
+          lowshift = lindex;
+        }
+      } else {
+        hav_found = true;
+        lowf_hav = ABS( s_lowfilter[ lindex ] );
+        lowshift = lindex;
+      }
+    }
+    
+    lowshift = sfsizel - lowshift - 1;
+    highshift = sfsizel - lowshift - 2;
+    
+    if( ( lowshift % 2 ) != ( highshift % 2 ) ) {
+      --highshift;
+    }
+  }
+  
+  return true;
+}
+
+
+
+bool TePDIMallatWavelets::ReconstructLL( 
+  const TePDIMatrix< double >& sb00_in,
+  const TePDIMatrix< double >& sb01_in,
+  const TePDIMatrix< double >& sb10_in,
+  const TePDIMatrix< double >& sb11_in,
+  const std::vector< double >& s_low_filter,
+  const std::vector< double >& s_high_filter,
+  int lowshift, int highshift,
+  TePDIMatrix< double >& sb00_out ) const
+{
+  TEAGN_TRUE_OR_RETURN( ( ! sb00_out.IsEmpty() ), 
+    "Output sub-band ( 0 , 0 ) is empty" );
+    
+  TEAGN_TRUE_OR_RETURN( 
+    ( ( sb00_in.GetLines() == sb01_in.GetLines() ) && 
+      ( sb01_in.GetLines() == sb10_in.GetLines() ) &&
+      ( sb10_in.GetLines() == sb11_in.GetLines() ) &&
+      ( sb00_in.GetColumns() == sb01_in.GetColumns() ) &&
+      ( sb01_in.GetColumns() == sb10_in.GetColumns() ) &&
+      ( sb10_in.GetColumns() == sb11_in.GetColumns() ) ), 
+    "Dimensions mismatch detected between input sub-bands" );
+    
+  /* Allocating space for temporary sub-bands */    
+    
+  TePDIMatrix< double > tempsb1;
+  TEAGN_TRUE_OR_RETURN( tempsb1.Reset( sb00_out.GetLines(), 
+    sb00_out.GetColumns(), TePDIMatrix<double>::AutoMemPol ), 
+    "Unable to allocate memory for temporary sub-band 1" );
+  
+  TePDIMatrix< double > tempsb2;
+  TEAGN_TRUE_OR_RETURN( tempsb2.Reset( sb00_out.GetLines(), 
+    sb00_out.GetColumns(), TePDIMatrix<double>::AutoMemPol ), 
+    "Unable to allocate memory for temporary sub-band 2" );
+    
+  /* Cleanning output data */
+  
+  for( unsigned int outline = 0 ; outline < sb00_out.GetLines() ; ++outline ) {
+    for( unsigned int outcolumn = 0 ; outcolumn < sb00_out.GetColumns() ; 
+      ++outcolumn ) {
+  
+       sb00_out( outline, outcolumn ) = 0.0;
+    }
+  }
+    
+  /* Processing sub-band [ 0, 0 ] */
+
+  TEAGN_TRUE_OR_RETURN( UpSampleMatrix( sb00_in, tempsb1 ), 
+    "Upsample error" );
+  TEAGN_TRUE_OR_RETURN( ApplyHorizontalRFilter( 
+    tempsb1, s_low_filter, lowshift, tempsb2 ), 
+    "Horizontal filter apply error" );
+  TEAGN_TRUE_OR_RETURN( ApplyVerticalRFilter( 
+    tempsb2, s_low_filter, lowshift, tempsb1 ), 
+    "Vertical filter apply error" );    
+  TEAGN_TRUE_OR_RETURN( AddMatrixes( tempsb1, sb00_out, sb00_out ), 
+    "Addition error" );    
+
+  /* Processing sub-band [ 0, 1 ] */
+
+  TEAGN_TRUE_OR_RETURN( UpSampleMatrix( sb01_in, tempsb1 ), 
+    "Upsample error" );
+  TEAGN_TRUE_OR_RETURN( ApplyHorizontalRFilter( 
+    tempsb1, s_low_filter, lowshift, tempsb2 ), 
+    "Horizontal filter apply error" );
+  TEAGN_TRUE_OR_RETURN( ApplyVerticalRFilter( 
+    tempsb2, s_high_filter, highshift, tempsb1 ), 
+    "Vertical filter apply error" );    
+  TEAGN_TRUE_OR_RETURN( AddMatrixes( tempsb1, sb00_out, sb00_out ), 
+    "Addition error" );    
+
+  /* Processing sub-band [ 1, 0 ] */
+
+  TEAGN_TRUE_OR_RETURN( UpSampleMatrix( sb10_in, tempsb1 ), 
+    "Upsample error" );
+  TEAGN_TRUE_OR_RETURN( ApplyHorizontalRFilter( 
+    tempsb1, s_high_filter, highshift, tempsb2 ), 
+    "Horizontal filter apply error" );
+  TEAGN_TRUE_OR_RETURN( ApplyVerticalRFilter( 
+    tempsb2, s_low_filter, lowshift, tempsb1 ), 
+    "Vertical filter apply error" );    
+  TEAGN_TRUE_OR_RETURN( AddMatrixes( tempsb1, sb00_out, sb00_out ), 
+    "Addition error" );      
+
+  /* Processing sub-band [ 1, 1 ] */
+
+  TEAGN_TRUE_OR_RETURN( UpSampleMatrix( sb11_in, tempsb1 ), 
+    "Upsample error" );
+  TEAGN_TRUE_OR_RETURN( ApplyHorizontalRFilter( 
+    tempsb1, s_high_filter, highshift, tempsb2 ), 
+    "Horizontal filter apply error" );
+  TEAGN_TRUE_OR_RETURN( ApplyVerticalRFilter( 
+    tempsb2, s_high_filter, highshift, tempsb1 ), 
+    "Vertical filter apply error" );    
+  TEAGN_TRUE_OR_RETURN( AddMatrixes( tempsb1, sb00_out, sb00_out ), 
+    "Addition error" );
+
+  return true;
+}
+
+
+bool TePDIMallatWavelets::UpSampleMatrix( const TePDIMatrix< double >& in,
+  TePDIMatrix< double >& out ) const
+{
+  TEAGN_TRUE_OR_RETURN( ( ! out.IsEmpty() ), 
+    "Invalid output matrix" );
+    
+  const unsigned int outlines = out.GetLines();
+  const unsigned int outcolumns = out.GetColumns();
+  
+  const unsigned int inlines = in.GetLines();
+  const unsigned int incolumns = in.GetColumns();
+  
+  const unsigned int required_out_lines = ( 2 * ( inlines - 1 ) ) + 1;
+  const unsigned int required_out_columns = ( 2 * ( incolumns - 1 ) ) + 1;
+  
+  TEAGN_TRUE_OR_RETURN( ( outlines >= required_out_lines ), 
+    "Insuficient output lines" );
+  TEAGN_TRUE_OR_RETURN( ( outcolumns >= required_out_columns ), 
+    "Insuficient output columns" );
+    
+  unsigned int line;
+  unsigned int column;
+  
+  /* Cleanning output matrix */
+
+  for( line = 0 ; line < outlines ; ++line ) {
+    for( column = 0 ; column < outcolumns ; ++column ) {
+      out( line, column ) = 0.;
+    }
+  }
+    
+  /* Transfering values to output */
+  
+  for( line = 0 ; line < inlines ; ++line ) {
+    for( column = 0 ; column < incolumns ; ++column ) {
+       out( line * 2, column * 2 ) = in( line, column ) * 4;
+    }
+  }   
+  
+  return true; 
+}
+
+
+bool TePDIMallatWavelets::AddMatrixes( const TePDIMatrix< double >& in1,
+  const TePDIMatrix< double >& in2, TePDIMatrix< double >& res ) const
+{
+  TEAGN_TRUE_OR_RETURN( in1.GetLines() == in2.GetLines(),
+    "in1 lines != in2 lines" );
+  TEAGN_TRUE_OR_RETURN( in1.GetColumns() == in2.GetColumns(),
+    "in1 columns != in2 columns" );
+  
+  TEAGN_TRUE_OR_RETURN( in1.GetLines() == res.GetLines(),
+    "in1 lines != res lines" );
+  TEAGN_TRUE_OR_RETURN( in1.GetColumns() == res.GetColumns(),
+    "in1 columns != res columns" );
+        
+  const unsigned int lines = in1.GetLines();
+  const unsigned int columns = in1.GetColumns();
+  
+  unsigned int line;
+  unsigned int column;
+  
+  for( line = 0 ; line < lines ; ++line ) {
+    for( column = 0 ; column < columns ; ++column ) {
+      res( line, column ) = in1( line, column ) + in2( line, column );
+    }
+  } 
+  
+  return true;   
+}
+
+
+bool TePDIMallatWavelets::ApplyVerticalRFilter( 
+  const TePDIMatrix< double >& inMatrix, 
+  const std::vector< double >& filter,
+  int filter_shift,
+  TePDIMatrix< double >& outMatrix ) const
+{
+  TEAGN_TRUE_OR_RETURN( inMatrix.GetLines() == outMatrix.GetLines(),
+    "inMatrix lines != outMatrix lines" );
+  TEAGN_TRUE_OR_RETURN( inMatrix.GetColumns() == outMatrix.GetColumns(),
+    "inMatrix columns != outMatrix columns" );
+  TEAGN_TRUE_OR_RETURN( inMatrix.GetLines() > filter.size(),
+    "inMatrix lines < filter size" );
+
+  const unsigned int in_lines = inMatrix.GetLines();
+  const unsigned int in_columns = inMatrix.GetColumns();
+  const unsigned int filter_size = filter.size();
+  unsigned int virtual_in_line_start = filter_size - 1;
+  unsigned int virtual_in_lines_bound = in_lines + virtual_in_line_start;  
+  
+  unsigned int virtual_in_line;
+  unsigned int in_column;
+  unsigned int filter_index;
+  double out_level;
+  int ircli; /* input raster convolution line index */
+  
+  for( in_column = 0 ; in_column < in_columns ; ++in_column ) {
+       
+    for( virtual_in_line = virtual_in_line_start ; 
+         virtual_in_line < virtual_in_lines_bound ; 
+         ++virtual_in_line ) {
+    
+      out_level = 0;  
+    
+      for( filter_index = 0 ; filter_index < filter_size ; ++filter_index ) {
+        
+        ircli = ( virtual_in_line - filter_index ) % in_lines;
+        
+        if( ircli % 2 == 0 ) {
+          out_level += 
+            inMatrix( ircli, in_column ) * filter[ filter_index ];
+        }
+      }
+      
+      outMatrix( ( virtual_in_line - virtual_in_line_start + 
+        filter_shift ) % in_lines, in_column ) = out_level;
+    }
+  }
+  
+  return true;
+}
+
+
+bool TePDIMallatWavelets::ApplyHorizontalRFilter( 
+  const TePDIMatrix< double >& inMatrix,
+  const std::vector< double >& filter,
+  int filter_shift,
+  TePDIMatrix< double >& outMatrix ) const
+{
+  TEAGN_TRUE_OR_RETURN( inMatrix.GetColumns() == outMatrix.GetColumns(),
+    "inMatrix columns != outMatrix columns" );
+  TEAGN_TRUE_OR_RETURN( inMatrix.GetLines() == outMatrix.GetLines(),
+    "inMatrix lines != outMatrix lines" );
+  TEAGN_TRUE_OR_RETURN( inMatrix.GetColumns() > filter.size(),
+    "inMatrix columns < filter size" );
+
+  const unsigned int in_lines = inMatrix.GetLines();
+  const unsigned int in_columns = inMatrix.GetColumns();
+  const unsigned int filter_size = filter.size();
+  unsigned int virtual_in_column_start = filter_size - 1;
+  unsigned int virtual_in_columns_bound = in_columns + virtual_in_column_start;
+  
+  unsigned int virtual_in_column;
+  unsigned int in_line;
+  unsigned int filter_index;
+  double out_level;
+  int ircci; /* input raster convolution column index */
+  
+  for( in_line = 0 ; in_line < in_lines ; in_line += 2 ) {
+       
+    for( virtual_in_column = virtual_in_column_start ; 
+         virtual_in_column < virtual_in_columns_bound ; 
+         ++virtual_in_column ) {
+    
+      out_level = 0;  
+    
+      for( filter_index = 0 ; filter_index < filter_size ; ++filter_index ) {
+        
+        ircci = ( virtual_in_column - filter_index ) % in_columns;
+        
+        if( ircci % 2 == 0 ) {
+          out_level += 
+            inMatrix( in_line, ircci ) * filter[ filter_index ];
+        }
+      }
+      
+      outMatrix( in_line, ( virtual_in_column - virtual_in_column_start + 
+        filter_shift ) % in_columns ) = out_level;
+    }
+  }
+  
+  return true;
+}
+
+
+bool TePDIMallatWavelets::GetAnalysisFilters( std::vector< double >& low_filter,
+  std::vector< double >& high_filter, int& low_shift, int& high_shift,
+  const TePDIParameters& params ) const
+{
+  /* Retriving the analysis filters and normalizing */
+  
+  double filters_scale = 0;
+  params.GetParameter( "filters_scale", filters_scale );  
+  
+  params.GetParameter( "a_filter_l", low_filter );
+    
+  params.GetParameter( "a_filter_h", high_filter );
+  
+  double factor = sqrt( 2.0 ) * sqrt( filters_scale );
+  
+  for( unsigned int a_filter_l_i = 0 ; a_filter_l_i < low_filter.size() ;
+       ++a_filter_l_i ) {
+       
+       low_filter[ a_filter_l_i ] *= factor;
+  }
+  
+  for( unsigned int a_filter_h_i = 0 ; a_filter_h_i < high_filter.size() ;
+       ++a_filter_h_i ) {
+       
+       high_filter[ a_filter_h_i ] *= factor;
+  }  
+  
+  /* Calculating filters shift */
+  
+  TEAGN_TRUE_OR_RETURN( GetAFiltersShift( low_filter, high_filter, low_shift, 
+    high_shift ), "Unable to calculate filters shift" );
+    
+  return true;
+}
+
+
+bool TePDIMallatWavelets::GetSynthesisFilters( std::vector< double >& low_filter,
+  std::vector< double >& high_filter, int& low_shift, int& high_shift,
+  const TePDIParameters& params ) const
+{
+  /* Retriving the analysis filters */
+  
+  std::vector< double > a_low_filter;
+  std::vector< double > a_high_filter;
+  int a_low_shift;
+  int a_high_shift;
+  
+  TEAGN_TRUE_OR_RETURN( GetAnalysisFilters( a_low_filter, a_high_filter,
+    a_low_shift, a_high_shift, params ), "Unable to get analysis filters" );
+    
+  /* Retriving the synthesis filters */
+  
+  double filters_scale = 0;
+  params.GetParameter( "filters_scale", filters_scale );  
+  
+  params.GetParameter( "s_filter_l", low_filter );
+    
+  params.GetParameter( "s_filter_h", high_filter );
+  
+  double factor = 1 / ( sqrt( 2.0 ) * sqrt( filters_scale ) );
+  
+  for( unsigned int s_filter_l_i = 0 ; s_filter_l_i < low_filter.size() ;
+       ++s_filter_l_i ) {
+       
+       low_filter[ s_filter_l_i ] *= factor;
+  }
+  
+  for( unsigned int s_filter_h_i = 0 ; s_filter_h_i < high_filter.size() ;
+       ++s_filter_h_i ) {
+       
+       high_filter[ s_filter_h_i ] *= factor;
+  }  
+  
+  /* Calculating filters shift */
+  
+  TEAGN_TRUE_OR_RETURN( GetSFiltersShift( a_low_filter, a_high_filter,
+    low_filter, high_filter, low_shift, high_shift ), 
+    "Unable to calculate filters shift" );
+    
+  return true;
+}
+
+
+bool TePDIMallatWavelets::NormalizeMatrix( 
+    const TePDIMatrix< double >& input, 
+    TePDIMatrix< double >& output, double min, double max ) const
+{
+  TEAGN_TRUE_OR_RETURN( min < max, "Invalid range" );
+  TEAGN_TRUE_OR_RETURN( 
+    ( ( ( max / 4. ) - ( min / 4. ) ) < ( DBL_MAX / 2. ) ),
+    "min and max are out of allowed range" );
+      
+  TEAGN_TRUE_OR_RETURN( ( input.GetLines() == output.GetLines() ),
+    "input lines != output lines" );
+  TEAGN_TRUE_OR_RETURN( ( input.GetColumns() == output.GetColumns() ),
+    "input columns != output columns" );
+  
+  const unsigned int lines = input.GetLines();
+  const unsigned int columns = input.GetColumns();
+    
+  if( ( lines == 0 ) || ( columns == 0 ) ) {
+    return true;
+  }
+    
+  unsigned int line;
+  unsigned int column;
+  double value;   
+    
+  /* Finding the current min and max */
+  
+  double cmin = input( 0, 0 );
+  double cmax = cmin;
+    
+  for( line = 0 ; line < lines ; ++line ) {
+    for( column = 0 ; column < columns ; ++column ) {
+      value = input( line, column );
+      
+      if( value < cmin ) {
+        cmin = value;
+      }
+      if( value > cmax ) {
+        cmax = value;
+      }
+    }
+  }
+    
+  TEAGN_TRUE_OR_RETURN( 
+    ( ( ( cmax / 4. ) - ( cmin / 4. ) ) < ( DBL_MAX / 2. ) ),
+    "current image min and max are out of allowed range" );
+    
+  double offset = min - cmin;
+  double scale = ( cmax - cmin ) / ( max - min );
+    
+  if( scale == 0 ) return true;
+    
+  /* Remapping values */
+      
+  for( line = 0 ; line < lines ; ++line ) {
+    for( column = 0 ; column < columns ; ++column ) {
+      output( line, column ) = ( input( line, column ) / scale ) + offset;
+    }
+  }
+    
+  return true;
+}  
+
+
+
diff --git a/src/terralib/image_processing/TePDIMallatWavelets.hpp b/src/terralib/image_processing/TePDIMallatWavelets.hpp
new file mode 100644
index 0000000..5748035
--- /dev/null
+++ b/src/terralib/image_processing/TePDIMallatWavelets.hpp
@@ -0,0 +1,485 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIMALLATWAVELETS_HPP
+  #define TEPDIMALLATWAVELETS_HPP
+
+  #include "TePDIAlgorithm.hpp"
+  #include "TePDIMatrix.hpp"
+
+  /**
+   * @brief Mallat wavelts algorithm.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIWaveletsAlgorithms
+   *
+   * @note The general required parameters:
+   *
+   * @param filter_task ( std::string ) - Task to be 
+   * accomplished - see below.
+   * @param filters_scale ( double ) - The filters scale.
+   * @param a_filter_l ( std::vector< double > ) - Analysis filter, low pass, non
+   * normalized ( used in decomposition ).
+   * @param a_filter_h ( std::vector< double > ) - Analysis filter, high pass, non
+   * normalized ( used in decomposition ).
+   * @param s_filter_l ( std::vector< double > ) - Synthesis filter, low pass, non
+   * normalized ( used in recomposition ).
+   * @param s_filter_h ( std::vector< double > ) - Synthesis filter, high pass, non
+   * normalized ( used in recomposition ). 
+   *
+   * @note The input parameters for filter_task="SBExtract" are:
+   * 
+   * @param input_image ( TePDITypes::TePDIRasterPtrType ) - Input Image.
+   * @param band ( int ) - Input band from input_image.   
+   * @param sub_band ( TePDITypes::TePDIRasterPtrType ) - The extracted  
+   * sub-band raster reference.
+   * @param sub_band_index ( int ) - Sub-band index [ 0, 1, 2, 3 ].
+   * @param levels ( int ) - The number of decomposition levels.
+   *
+   * @note The input parameters for filter_task="SBSwap" are:
+   *
+   * @param input_image ( TePDITypes::TePDIRasterPtrType ) - Input Image.
+   * @param band ( int ) - Input band from input_image.   
+   * @param output_image ( TePDITypes::TePDIRasterPtrType ) - Output Image.
+   * @param sub_band ( TePDITypes::TePDIRasterPtrType ) - The new  
+   * sub-band raster reference.
+   * @param sub_band_index ( int ) - Sub-band index [ 0, 1, 2, 3 ].
+   * @param levels ( int ) - The number of decomposition levels.
+   *
+   * @note The input parameters for filter_task="GetPyramid" are:
+   * 
+   * @param input_image ( TePDITypes::TePDIRasterPtrType ) - Input Image.
+   * @param band ( int ) - Input band from input_image.   
+   * @param sub_band ( TePDITypes::TePDIRasterPtrType ) - The extracted  
+   * sub-band raster reference.
+   * @param sub_band_index ( int ) - Sub-band index [ 0, 1, 2, 3 ].
+   * @param levels ( int ) - The number of decomposition levels.
+   * @param pyramid ( TePDITypes::TePDIRasterVectorPtrType ) - The generated
+   * pyramid following the format :
+   * [raster0][raster1][raster2][raster3]....[raster( levels*4 - 1 )]
+   * where: raster0->sub-band00 of level1, raster1->sub-band01 of level1,
+   * raster2->sub-band10 of level1, raster3->sub-band11 of level1,
+   * raster4->sub-band00 of level2,  ....., raster(n-1)->sub-band11 of the
+   * last level.
+   *
+   * @note The input parameters for filter_task="RecomposePyramid" are:
+   * 
+   * @param input_image ( TePDITypes::TePDIRasterPtrType - Optional ):
+   * Reference Input Image.
+   * @param band ( int - Optional ) - Input band from input_image.   
+   * @param pyramid ( TePDITypes::TePDIRasterVectorPtrType ) - The input
+   * pyramid following the format:
+   * [raster0][raster1][raster2][raster3]....[raster( levels*4 - 1 )]
+   * where: raster0->sub-band00 of level1, raster1->sub-band01 of level1,
+   * raster2->sub-band10 of level1, raster3->sub-band11 of level1,
+   * raster4->sub-band00 of level2,  ....., raster(n-1)->sub-band11 of the
+   * last level.
+   * @param output_image ( TePDITypes::TePDIRasterPtrType ) - Output Image.
+   *
+   * @note Each decomposed level will follow the structure ( matricial indexes ):
+   * index 0 = [ 0, 0 ] = Low-Low filtered - upper-left .
+   * index 1 = [ 0, 1 ] = Low-High filtered - upper-right.
+   * index 2 = [ 1, 0 ] = High-Low filtered - bottom-left.
+   * index 3 = [ 1, 1 ] = High-High filtered - bottom-right.
+   *
+   */
+  class PDI_DLL TePDIMallatWavelets : public TePDIAlgorithm {
+    public :
+
+      /**
+       * @brief Default Constructor.
+       *
+       */
+      TePDIMallatWavelets();
+
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIMallatWavelets();
+
+      /**
+       * @brief Checks if the supplied parameters fits the requirements of each
+       * PDI algorithm implementation.
+       *
+       * @note Error log messages must be generated. No exceptions generated.
+       *
+       * @param parameters The parameters to be checked.
+       * @return true if the parameters are OK. false if not.
+       */
+      bool CheckParameters( const TePDIParameters& parameters ) const;
+
+    protected :
+
+      /**
+       * @brief Histogram shift flag.
+       *
+       */
+      bool shift_histogram_flag_;
+      
+      /**
+       * @brief The input image mean ( used for histogram shift ).
+       *
+       */
+      double input_image_mean_;
+    
+      /**
+       * @brief Internal pyramidal structure of decomposed bands.
+       *
+       * @note The index 0 corresponds to the full original input image.
+       */
+      mutable std::vector< TePDIMatrix< TePDIMatrix< double > > > pyramid_;    
+    
+      /**
+       * @brief Runs the current algorithm implementation.
+       *
+       * @return true if OK. false on error.
+       */
+      bool RunImplementation();
+
+      /**
+       * @brief Reset the internal state to the initial state.
+       *
+       * @param params The new parameters referente at initial 
+       * state.
+       */
+      void ResetState( const TePDIParameters& params );
+      
+      /**
+       * @brief Do Wavelet decomposition using input_image and levels number 
+       * parameters.
+       *
+       * @note No output image will be generated by this function. 
+       * To decompose and generate output image use Apply()
+       * ( using Apply() the generated image will be
+       * saved inside the output_image parameter );
+       *
+       * @param params The current strategy parameters reference.
+       * @return true if no erros ocurred.
+       */
+      bool Decompose( const TePDIParameters& params );
+      
+      /**
+       * @brief Do Wavelet recomposition to output_image parameter and the current
+       * internal state.
+       *
+       * @note If a input_image exists, it will be used to guess the
+       * recomposed image dimensions.
+       *
+       * @param ref_level The reference level used for image reconstruction
+       * ( starting from 1 ), this level will be used to reconstruct the
+       * first LL sub-band used by the other levels.
+       * @param params The current strategy parameters reference.
+       * @return true if no erros ocurred.
+       */
+      bool Recompose( unsigned int ref_level, const TePDIParameters& params );
+
+      /**
+       * @brief Returns a copy of one genereted sub-band.
+       *
+       * @param level Sub-band decomposition level ( starting from 1 ).
+       * @param subband Sub-band index [ 0 - top left, 1 - top right, 
+       * 2 - bottom left, 3 - bottom right ].
+       * @param sb_raster The raster where the sub-band data will be copied.
+       * @return true if ok, false on errors.
+       */
+      bool GetSubBand( unsigned int level, 
+        unsigned int subband, 
+        const TePDITypes::TePDIRasterPtrType& sb_raster ) const;
+        
+      /**
+       * @brief Change one genereted sub-band by another one.
+       *
+       * @note Both sub-bands must have the same number of lines and
+       * columns.
+       *
+       * @param level Sub-band decomposition level ( starting from 1 ).
+       * @param subband_index Old Sub-band index 
+       * [ 0 - top left, 1 - top right, 2 - bottom left, 3 - bottom right ].
+       * @param newsband The new sub-band data.
+       * @return true if ok, false on errors.
+       */        
+      bool ChangeSubBand( unsigned int level, unsigned int subband_index,
+        const TePDITypes::TePDIRasterPtrType& newsband );
+        
+        
+      /**
+       * @brief Push a new level at pyramid level's top.
+       *
+       * @param level Sub-band level ( starting from 1 ).
+       * @param sb0 Sub-band 0 ( top left ) data. 
+       * @param sb1 Sub-band 1 ( top right ) data. 
+       * @param sb2 Sub-band 2 ( bottom left ) data. 
+       * @param sb3 Sub-band 3 ( bottom right ) data. 
+       * @return true if ok, false on errors.
+       */           
+      bool PushLevel( unsigned int level, 
+        const TePDIMatrix< double >& sb0,
+        const TePDIMatrix< double >& sb1,
+        const TePDIMatrix< double >& sb2,
+        const TePDIMatrix< double >& sb3 );      
+      
+      /**
+       * @brief Retrive the analysis filters from the internal parameters.
+       *
+       * @param low_filter The low filter.
+       * @param high_filter The high filter.
+       * @param low_shift The low filter shift.
+       * @param high_shift The high filter shift.
+       * @param params The current strategy parameters reference.
+       * @return true if ok, false on errors.
+       */
+      bool GetAnalysisFilters( std::vector< double >& low_filter,
+        std::vector< double >& high_filter,
+        int& low_shift,
+        int& high_shift,
+        const TePDIParameters& params ) const;
+      
+      /**
+       * @brief Retrive the synthesis filters from the internal parameters.
+       *
+       * @param low_filter The low filter.
+       * @param high_filter The high filter.
+       * @param low_shift The low filter shift.
+       * @param high_shift The high filter shift.
+       * @param params The current strategy parameters reference.
+       * @return true if ok, false on errors.
+       */
+      bool GetSynthesisFilters( std::vector< double >& low_filter,
+        std::vector< double >& high_filter,
+        int& low_shift,
+        int& high_shift,
+        const TePDIParameters& params ) const;        
+        
+      /**
+       * @brief Generates one level of Wavelet decomposition, using the data from
+       * the preceding level.
+       *
+       * @param level Decomposition level ( starting from 1 ).
+       * @param params The current strategy parameters reference.
+       * @return true if ok, false on errors.
+       */
+      bool GenerateLevel( unsigned int level, const TePDIParameters& params );
+      
+      /**
+       * @brief Applies a vertical filter.
+       *
+       * @param inMatrix Input matrix.
+       * @param filter Filter to apply.
+       * @param filter_shift Filter shift.
+       * @param outMatrix Output matrix.
+       */
+      void ApplyVerticalFilter( 
+        const TePDIMatrix< double >& inMatrix,
+        const std::vector< double >& filter,
+        int filter_shift,
+        TePDIMatrix< double >& outMatrix ) const;
+        
+      /**
+       * @brief Applies a horizontal filter.
+       *
+       * @param inMatrix Input matrix.
+       * @param filter Filter to apply.
+       * @param filter_shift Filter shift.
+       * @param outMatrix Output matrix.
+       */
+      void ApplyHorizontalFilter( 
+        const TePDIMatrix< double >& inMatrix,
+        const std::vector< double >& filter,
+        int filter_shift, 
+        TePDIMatrix< double >& outMatrix ) const;    
+        
+      /**
+       * @brief Recursive build of a simperimposed level ( 
+       * a level where the sub-band 0 is a
+       * composition of all higher levels ).
+       *
+       * @param level Decomposition level ( starting from 1 ).
+       * @param level_matrix The user pre-initiated resultant level matrix.
+       * @param normalize If true, grayscale level normalization will be 
+       * performed.
+       * @param min_norm_level Minimal grayscale level used for 
+       * grayscale range normalization.
+       * @param max_norm_level Maximum grayscale level used for 
+       * grayscale range normalization.
+       * @return true if ok, false on error.
+       */
+      bool BuildSuperimposedLevel( unsigned int level,
+        TePDIMatrix< double >& level_matrix, bool normalize = false,
+        double min_norm_level = 0, double max_norm_level = 0 ) const;
+      
+      /**
+       * @brief Build a agregated matrix using 4 sub-bands of identical dimensions.
+       *
+       * @param upper_left Uppper-left sub-band.
+       * @param upper_right Uppper-right sub-band.
+       * @param lower_left Lower-left sub-band.
+       * @param lower_right Lower-right sub-band.
+       * @param result The user pre-initiated result matrix where all data 
+       * will be stored.
+       * @return true if ok, false on error.
+       */          
+      bool AgregateSubBands(
+        const TePDIMatrix< double >& upper_left,
+        const TePDIMatrix< double >& upper_right,
+        const TePDIMatrix< double >& lower_left,
+        const TePDIMatrix< double >& lower_right,
+        TePDIMatrix< double >& result ) const;
+        
+      /**
+       * @brief Allocate space for a new level at pyrimid's top.
+       * @param level Level number.
+       * @param sblines Sub-bands lines number 
+       * ( only required if level == 1 ).
+       * @param sbcolumns Sub-bands columns number 
+       * ( only required if level == 1 ).
+       * @return true if ok, false on error.
+       */      
+      bool AllocateTopLevel( unsigned int level, unsigned int sblines = 0,
+        unsigned int sbcolumns = 0 );
+        
+      /**
+       * @brief Compute the analysis inversed filters reference shift ( offset ).
+       *
+       * @param a_lowfilter The analysis low filter reference.
+       * @param a_highfilter The analysis high filter reference.
+       * @param lowshift The computed shift for lowfilter.
+       * @param highshift The computed shift for highfilter.
+       * @return true if ok, false on errors.
+       */      
+      bool GetAFiltersShift( 
+        const std::vector< double >& a_lowfilter,
+        const std::vector< double >& a_highfilter,
+        int& lowshift, int& highshift ) const;
+        
+      /**
+       * @brief Compute the syntesis inversed filters reference shift ( offset ).
+       *
+       * @param s_lowfilter The syntesis low filter reference.
+       * @param s_highfilter The syntesis high filter reference.
+       * @param a_lowfilter The analysis low filter reference.
+       * @param a_highfilter The analysis high filter reference.
+       * @param lowshift The computed shift for lowfilter.
+       * @param highshift The computed shift for highfilter.
+       * @return true if ok, false on errors.
+       */      
+      bool GetSFiltersShift( 
+        const std::vector< double >& a_lowfilter,
+        const std::vector< double >& a_highfilter,
+        const std::vector< double >& s_lowfilter,
+        const std::vector< double >& s_highfilter,
+        int& lowshift, int& highshift ) const;        
+
+      /**
+       * @brief Reconstruct the Low-low ( 0, 0 ) sub-band.
+       *
+       * @param sb00_in A reference to the input sub-band ( 0, 0 ).
+       * @param sb01_in A reference to the input sub-band ( 0, 1 ).
+       * @param sb10_in A reference to the input sub-band ( 1, 0 ).
+       * @param sb11_in A reference to the input sub-band ( 1, 1 ).
+       * @param s_low_filter Low Synthesis filter.
+       * @param s_high_filter High Synthesis filter.
+       * @param lowshift Low filter shift.
+       * @param highshift High filter shift.
+       * @param sb00_out A reference to the generated sub-band ( user 
+       * initiated matrix ).
+       * @return true if ok, false on errors.
+       */                   
+      bool ReconstructLL( 
+        const TePDIMatrix< double >& sb00_in,
+        const TePDIMatrix< double >& sb01_in,
+        const TePDIMatrix< double >& sb10_in,
+        const TePDIMatrix< double >& sb11_in,
+        const std::vector< double >& s_low_filter,
+        const std::vector< double >& s_high_filter,
+        int lowshift, int highshift,
+        TePDIMatrix< double >& sb00_out ) const;
+        
+      /**
+       * @brief Up-samples a matrix.
+       *
+       * @param in Input matrix.
+       * @param out A user initiated output matrix.
+       * @return true if ok, false on errors.
+       */        
+      bool UpSampleMatrix( const TePDIMatrix< double >& in,
+        TePDIMatrix< double >& out ) const;
+        
+      /**
+       * @brief Matrix addition.
+       *
+       * @param in1 Input matrix 1.
+       * @param in2 Input matrix 2.
+       * @param res Result matrix.
+       * @return true if ok, false on errors.
+       */        
+      bool AddMatrixes( const TePDIMatrix< double >& in1,
+        const TePDIMatrix< double >& in2, TePDIMatrix< double >& res ) const;  
+        
+      /**
+       * @brief Applies a reconstruction vertical filter.
+       *
+       * @param inMatrix A Input matrix filtered with ApplyHorizontalRFilter.
+       * @param filter Filter to apply.
+       * @param filter_shift Filter shift.
+       * @param outMatrix Output matrix.
+       * @return true if ok, false on errors.
+       */
+      bool ApplyVerticalRFilter( 
+        const TePDIMatrix< double >& inMatrix,
+        const std::vector< double >& filter,
+        int filter_shift,
+        TePDIMatrix< double >& outMatrix ) const;
+        
+      /**
+       * @brief Applies a reconstruction horizontal filter.
+       *
+       * @param inMatrix An upsampled Input matrix.
+       * @param filter Filter to apply.
+       * @param filter_shift Filter shift.
+       * @param outMatrix Output matrix.
+       * @return true if ok, false on errors.
+       */
+      bool ApplyHorizontalRFilter( 
+        const TePDIMatrix< double >& inMatrix,
+        const std::vector< double >& filter,
+        int filter_shift,
+        TePDIMatrix< double >& outMatrix ) const;    
+        
+      /**
+       * @brief Do matrix normalization using the supplied ranges.
+       *
+       * @param input The input matrix.
+       * @param output The output matrix.
+       * @param min The mininum reference value.
+       * @param max The maxumum reference value.
+       */      
+      bool NormalizeMatrix( const TePDIMatrix< double >& input, 
+        TePDIMatrix< double >& output, double min, 
+        double max ) const;      
+  };
+  
+/** @example TePDIWavelets_test.cpp
+ *    Shows how to use this class.
+ */    
+
+#endif
diff --git a/src/terralib/image_processing/TePDIMathFunctions.cpp b/src/terralib/image_processing/TePDIMathFunctions.cpp
new file mode 100755
index 0000000..9336464
--- /dev/null
+++ b/src/terralib/image_processing/TePDIMathFunctions.cpp
@@ -0,0 +1,31 @@
+#include "TePDIMathFunctions.hpp"
+#include <TeAgnostic.h>
+
+#include <math.h>
+
+namespace TePDIMathFunctions {
+
+  unsigned long int DecimLevelSize( unsigned long int level,
+    unsigned long int elements )
+  {
+    TEAGN_TRUE_OR_THROW( ( level <= DecimLevels( elements ) ),
+      "Invalid required level for the current elements number" );
+    
+    unsigned long int current_level = 0;
+    unsigned long int size = elements;
+      
+    do {
+      if( size < 2 ) {
+        break;
+      } else {
+        size = ( ( size + ( size % 2 ) ) / 2 );
+      }
+        
+      ++current_level;
+    } while( current_level != level );
+      
+    return size;
+  }
+  
+}
+
diff --git a/src/terralib/image_processing/TePDIMathFunctions.hpp b/src/terralib/image_processing/TePDIMathFunctions.hpp
new file mode 100755
index 0000000..5ebda61
--- /dev/null
+++ b/src/terralib/image_processing/TePDIMathFunctions.hpp
@@ -0,0 +1,80 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIMATHFUNCTIONS_HPP
+  #define TEPDIMATHFUNCTIONS_HPP
+  
+  #include "TePDIDefines.hpp"
+  #include <TeCoord2D.h>
+  #include <TeBox.h>
+  #include <TeGeometry.h>
+  
+    /**
+     * @brief This namespace contains mathematic functions used by PDI 
+     * algorithms. 
+     * @note THEY SHOLD NOT BE USED BY ANYONE. The support and interfaces 
+     * can be changed in future. THIS IS FOR INTERNAL USE ONLY.     
+     * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+     * @ingroup PDIModule
+     */
+  namespace TePDIMathFunctions
+  {
+      
+    /**
+     * @brief Returns the number of decimation levels for a given number of elements.
+     *
+     * @param elements Elements number.
+     * @return The decimation levels.
+     */    
+    template< typename T >
+    unsigned long int DecimLevels( const T& elements )
+    {
+      if( elements < 2 )
+      {
+        return 0;
+      } else if( elements == 3 ) {
+        return 2;
+      } else {
+        return ( 1 + DecimLevels( ( elements + 
+          ( elements % 2 ) ) / 2 ) );
+      }
+    }
+    
+    /**
+     * @brief Returns the number of elements of a decimation level.
+     *
+     * @param level The decimation level (starting from 1).
+     * @param elements The initial elements number.
+     * @return The number of elements for the required level.
+     */    
+    PDI_DLL unsigned long int DecimLevelSize( unsigned long int level,
+      unsigned long int elements );
+    
+  };
+  
+/** @example TePDIMathFunctions_test.cpp
+ *    Shows how to use this namespace functions.
+ */    
+
+#endif
diff --git a/src/terralib/image_processing/TePDIMatrix.hpp b/src/terralib/image_processing/TePDIMatrix.hpp
new file mode 100755
index 0000000..54db510
--- /dev/null
+++ b/src/terralib/image_processing/TePDIMatrix.hpp
@@ -0,0 +1,829 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIMATRIX_HPP
+  #define TEPDIMATRIX_HPP
+  
+  #include <TeAgnostic.h>
+  #include <TeSharedPtr.h>
+  #include <TeTempFilesRemover.h>
+  #include <TeUtils.h>
+  
+  #include <vector>
+  #include <string>
+  
+
+  /**
+   * @brief This is the template class to deal with a generic matrix.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIAux
+   */
+  template< class T >
+  class TePDIMatrix {
+    public :
+      /** @typedef TeSharedPtr< TePDIMatrix< T > > pointer 
+          Type definition for a instance pointer */
+      typedef TeSharedPtr< TePDIMatrix< T > > pointer;
+      
+      /**
+       * @brief Memory polycy.
+       */
+      enum MemoryPolicy {
+        /**
+         * Automatic memory policy ( Try to use RAM or DISK, if there is no 
+         * avaliable RAM ) -
+         * DO NOT USE AutoMemPol FOR COMPLEX DATA TYPES !
+         * 
+         */
+        AutoMemPol,
+        /**
+         * RAM memory policy.
+         */
+        RAMMemPol,
+        /**
+         * Disk memory policy ( virtual mapped memory ) -
+         *  DO NOT USE DiskMemPol FOR COMPLEX DATA TYPES !
+         */
+        DiskMemPol
+      };
+      
+      /**
+       * @brief Default Constructor.
+       * @note The default mamory policy is RAMMemPol.
+       */
+      TePDIMatrix();      
+      
+      /**
+       * @brief Alternative Constructor.
+       *
+       * @param lines Number of lines.
+       * @param columns Number of columns.
+       * @param mp Memory policy.
+       */
+      TePDIMatrix( unsigned int lines, unsigned int columns, 
+        MemoryPolicy mp );
+      
+      /**
+       * @brief Alternative Constructor.
+       *
+       * @param mp Memory policy.
+       */
+      TePDIMatrix( MemoryPolicy mp );      
+        
+      /**
+       * @brief Alternative Constructor.
+       *
+       * @param lines Number of lines.
+       * @param columns Number of columns.
+       * @note The default mamory policy is RAMMemPol.
+       */
+      TePDIMatrix( unsigned int lines, unsigned int columns );        
+
+      /**
+       * @brief Alternative Constructor.
+       *
+       * @param external External object reference.
+       * @param mp Memory policy.
+       */
+      TePDIMatrix( const TePDIMatrix< T >& external );
+
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIMatrix();
+      
+      /**
+       * @brief Reset the active instance the the new parameters.
+       *
+       * @param lines Number of lines.
+       * @param columns Number of columns.
+       * @return true if OK, false on error.
+       */
+      bool Reset( unsigned int lines = 0, 
+        unsigned int columns = 0 );      
+
+      /**
+       * @brief Reset the active instance the the new parameters.
+       *
+       * @param lines Number of lines.
+       * @param columns Number of columns.
+       * @param mp Memory policy.
+       * @return true if OK, false on error.
+       */
+      bool Reset( unsigned int lines, unsigned int columns,
+        MemoryPolicy mp );
+      
+      /**
+       * @brief The number of current matrix lines.
+       *
+       * @return The number of current matrix lines.
+       */
+      unsigned int GetLines() const;
+      
+      /**
+       * @brief The number of current matrix columns.
+       *
+       * @return The number of current matrix columns
+       */
+      unsigned int GetColumns() const;
+      
+      /**
+       * @brief Empty Matrix verification.
+       *
+       * @return true if the matrix is empty.
+       */
+      bool IsEmpty() const;
+
+      /**
+       * @brief Operator = overload.
+       *
+       * @note The external memory policy will be used as reference.
+       *
+       * @param external External instance reference.
+       * @return A reference to the current matrix.
+       */
+      const TePDIMatrix< T >& operator=( 
+        const TePDIMatrix< T >& external );
+
+      /**
+       * @brief Operator () overload.
+       *
+       * @param line Line number.
+       * @param column Column number.
+       * @return A reference to the required element.
+       */
+      inline T& operator()( const unsigned int& line, 
+        const unsigned int& column )
+      {
+        TEAGN_DEBUG_CONDITION( ( line < totalLines_ ),
+          "Invalid line" )
+        TEAGN_DEBUG_CONDITION( ( column < totalColumns_ ),
+          "Invalid columns" )
+            
+        return scanLine( line )[ column ];      
+      };
+      
+      /**
+       * @brief Operator () overload.
+       *
+       * @param line Line number.
+       * @param column Column number.
+       * @return A const reference to the required element.
+       */
+      inline const T& operator()( const unsigned int& line, 
+        const unsigned int& column ) const
+      {
+        TEAGN_DEBUG_CONDITION( ( line < totalLines_ ),
+          "Invalid line" )
+        TEAGN_DEBUG_CONDITION( ( column < totalColumns_ ),
+          "Invalid columns" )
+          
+        return scanLine( line )[ column ];      
+      }; 
+      
+      /**
+       * @brief Operator [] overload.
+       *
+       * @param line Line number.
+       * @param column Column number.
+       * @return A pointer to the required line.
+       * @note The returned pointer is garanteed to 
+       * be valid until an acess to another line occurs.
+       */
+      inline T* operator[]( const unsigned int& line )
+      {
+        TEAGN_DEBUG_CONDITION( ( line < totalLines_ ),
+          "Invalid line" )
+      
+        return scanLine( line );      
+      };
+      
+      /**
+       * @brief Operator [] overload.
+       *
+       * @param line Line number.
+       * @param column Column number.
+       * @return A pointer to the required line.
+       * @note The returned pointer is garanteed to 
+       * be valid until an acess to another line occurs.
+       */
+      inline T const* operator[]( const unsigned int& line ) const
+      {
+        TEAGN_DEBUG_CONDITION( ( line < totalLines_ ),
+          "Invalid line" )
+      
+        return scanLine( line );      
+      };      
+            
+    protected :
+    
+      /**
+       * @brief File tiles data node.
+       */         
+      class DiskLinesVecNodeT
+      {
+        public :
+          
+          FILE* filePtr_;
+          unsigned int fileOff_;
+          std::string fullFilePath_;
+          
+          DiskLinesVecNodeT()
+          {
+            filePtr_ = 0;
+            fileOff_ = 0;
+          }
+      };
+      
+      typedef std::vector< DiskLinesVecNodeT > DiskLinesVecT;
+      
+      /**
+       * @brief Max bytes per temp file (for swapped tiles only).
+       */
+      unsigned long int maxTmpFileSize_;      
+      
+      /**
+       * @brief The total lines number.
+       */
+      unsigned int totalLines_;
+      
+      /**
+       * @brief The total columns number.
+       */
+      unsigned int totalColumns_;     
+      
+      /**
+       * @brief The current used memory policy.
+       */
+      MemoryPolicy currentMemPolicy_;
+      
+      /**
+       * @brief The index of the current active disk line copy in RAM
+       * ( default -1 , no disk line active ).
+       */     
+      mutable long int curDiskLineIdx_;    
+        
+      /**
+       * @brief A pointer to the RAM memory used for disk lines swap..
+       */     
+      T* currDiskLinePtr_;
+      
+      /**
+       * @brief The lines size (bytes).
+       */     
+      unsigned int linesSize_;      
+
+      /**
+       * @brief The lines pointers vector (RAM + disk lines).
+       */
+      mutable std::vector< T* > linesPtrsVec_;     
+       
+      /**
+       * @brief The disk lines data vector.
+       */      
+      DiskLinesVecT diskLinesVec_;    
+     
+      /**
+       * @brief Reset the internal variables to the initial state.
+       */      
+      void init();
+      
+      /**
+       * @brief Clear all allocated resources and go back to the initial
+       * state.
+       */      
+      void clear();
+      
+      /**
+       * @brief Allocate disk lines.
+       * @param startingLineIdx Starting line index.
+       * @return true if OK, false on errors.
+       */    
+      bool allocateDiskLines( 
+        unsigned int startingLineIdx );      
+      
+      /**
+       * @brief Returns a pointer to the required line.
+       *
+       * @param line Line number.
+       * @param column Column number.
+       * @return A pointer to the required line.
+       * @note The returned pointer is garanteed to 
+       * be valid until an acess to another line occurs
+       */
+      T* scanLine( const unsigned int& line ) const;
+        
+      /**
+       * @brief Create a new disk file.
+       * @param filename The file name.
+       * @param size The file size.
+       * @param fileptr The file pointer.
+       * @return true if OK. false on errors.
+       */
+      bool createNewDiskFile( unsigned long int size,
+        const std::string& filename, FILE** fileptr ) const;      
+  };
+
+  template< class T >
+  void TePDIMatrix< T >::init()
+  {
+    maxTmpFileSize_ = ( 1024 * 1024 * 100 );
+    totalLines_ = 0;
+    totalColumns_ = 0;  
+    currentMemPolicy_ = RAMMemPol;
+    curDiskLineIdx_ = -1;
+    currDiskLinePtr_ = 0;
+    linesSize_ = 0;
+  }
+  
+
+  template< class T >
+  void TePDIMatrix< T >::clear()
+  {
+    if( curDiskLineIdx_ > -1 )
+    {
+      delete[] currDiskLinePtr_;
+      linesPtrsVec_[ curDiskLineIdx_ ] = 0;
+    }
+    
+    const unsigned int linesPtrsVecSize = linesPtrsVec_.size();
+    for( unsigned int linesPtrsVecIdx = 0 ; linesPtrsVecIdx < linesPtrsVecSize ;
+      ++linesPtrsVecIdx ) {
+     
+      if( linesPtrsVec_[ linesPtrsVecIdx ] ) {
+        delete[] linesPtrsVec_[ linesPtrsVecIdx ];
+      }
+    }  
+      
+    linesPtrsVec_.clear();
+    
+    const unsigned int diskLinesVecSize = diskLinesVec_.size();
+    for( unsigned int diskLinesVecIdx = 0 ; diskLinesVecIdx <
+      diskLinesVecSize ; ++diskLinesVecIdx )
+    {
+      TeTempFilesRemover::instance().removeFile( diskLinesVec_[ 
+        diskLinesVecIdx ].fullFilePath_ ); 
+    }
+    
+    diskLinesVec_.clear();
+  
+    init();
+  }  
+  
+
+  template< class T >
+  TePDIMatrix< T >::TePDIMatrix()
+  {
+    init();
+  }    
+  
+  
+  template< class T >
+  TePDIMatrix< T >::TePDIMatrix( unsigned int lines, 
+    unsigned int columns, MemoryPolicy mp )
+  {
+    init();
+    
+    TEAGN_TRUE_OR_THROW( Reset( lines, columns, mp ),
+      "Unable to initiate the matrix object" );
+  }  
+  
+  template< class T >
+  TePDIMatrix< T >::TePDIMatrix( MemoryPolicy mp )
+  {
+    init();
+    
+    currentMemPolicy_ = mp;
+  }    
+  
+  template< class T >
+  TePDIMatrix< T >::TePDIMatrix( unsigned int lines, 
+    unsigned int columns )
+  {
+    init();
+    
+    TEAGN_TRUE_OR_THROW( Reset( lines, columns, RAMMemPol ),
+      "Unable to initiate the matrix object" );
+  }   
+  
+  
+  template< class T >
+  TePDIMatrix< T >::TePDIMatrix( const TePDIMatrix< T >& external )
+  {
+    init();
+    
+    operator=( external );
+  }
+
+
+  template< class T >
+    TePDIMatrix< T >::~TePDIMatrix()
+  {
+    clear();
+  }
+
+  
+  template< class T >
+  bool TePDIMatrix< T >::Reset( unsigned int lines, 
+    unsigned int columns )
+  {
+    return Reset( lines, columns, currentMemPolicy_ );
+  }  
+
+  template< class T >
+  bool TePDIMatrix< T >::Reset( unsigned int lines, 
+    unsigned int columns,
+    MemoryPolicy mp )
+  {
+    /* Update the old buffer if necessary */
+    
+    if( ( lines != totalLines_ ) || ( columns != totalColumns_ ) ||
+        ( currentMemPolicy_ != mp ) ) {
+    
+      /* free the old resources */
+      
+      clear();
+    
+      /* Allocate the new resources */
+      
+      totalLines_ = lines;
+      totalColumns_ = columns;       
+      linesSize_ = sizeof( T ) * totalColumns_;
+      
+      currentMemPolicy_ = mp;
+      
+      if( ( lines != 0 ) && ( columns != 0 ) ) {
+        /* Guessing the memory source, if in automatic mode */
+     
+        unsigned int line = 0;
+        
+        /* Allocating the main lines pointers vector */
+        
+        try
+        {
+          linesPtrsVec_.resize( totalLines_, 0 );
+        }
+        catch(...)
+        {
+          clear();
+          TEAGN_LOG_AND_RETURN( "Memory allocation error" );
+        }
+        
+        if( linesPtrsVec_.size() != totalLines_ ) {
+          clear();
+          TEAGN_LOG_AND_RETURN( "Memory allocation error" );
+        }
+        
+        /* Allocating the disk lines data vector */
+        
+        try
+        {
+          diskLinesVec_.resize( totalLines_ );
+        }
+        catch(...)
+        {
+          clear();
+          TEAGN_LOG_AND_RETURN( "Memory allocation error" );
+        }
+        
+        if( diskLinesVec_.size() != totalLines_ ) {
+          clear();
+          TEAGN_LOG_AND_RETURN( "Memory allocation error" );
+        }        
+        
+        /* Allocating the RAM file swap area */
+        
+        try
+        {
+          currDiskLinePtr_ = new T[ totalColumns_ ];
+        }
+        catch(...)
+        {
+          clear();
+          TEAGN_LOG_AND_RETURN( "Memory allocation error" );
+        }
+        
+        if( currDiskLinePtr_ == 0 ) {
+          clear();
+          TEAGN_LOG_AND_RETURN( "Memory allocation error" );
+        }    
+
+        /* Allocating lines */
+
+        switch( currentMemPolicy_ ) {
+          case RAMMemPol :
+          {
+            T* new_line_ptr = 0;
+        
+            for( line = 0 ; line < totalLines_ ; ++line ) {
+              try {
+                new_line_ptr = new T[ totalColumns_ ];
+              }
+              catch(...) {
+                clear();
+                
+                TEAGN_LOG_AND_RETURN( "Memory allocation error" );               
+              }
+              
+              if( new_line_ptr == 0 ) {
+                clear();
+                
+                TEAGN_LOG_AND_RETURN( "Memory allocation error" );              
+              } 
+              
+              linesPtrsVec_[ line ] = new_line_ptr;
+            }
+            
+            break;
+          }
+          case DiskMemPol :
+          {
+            if( ! allocateDiskLines( 0 ) ) {
+              clear();
+              
+              TEAGN_LOG_AND_RETURN( 
+                "Error allocating mapped memory lines" )
+            }
+              
+            break;
+          }       
+          case AutoMemPol :
+          {
+            const unsigned long int freeVm = TeGetFreeVirtualMemory();
+            unsigned long int lineBytes = sizeof( T ) * totalColumns_;
+            const unsigned long int maxRam  = (unsigned long int)
+              ( 0.90 * ( (double)( freeVm ) ) );    
+            unsigned long int maxRamLines = (unsigned long int)
+              ( ( (double)maxRam ) / ( (double) lineBytes ) ); 
+              
+            T* new_line_ptr = 0;
+        
+            for( unsigned int line = 0 ; line < totalLines_ ; ++line ) 
+            {
+              if( line < maxRamLines ) 
+              {
+                try {
+                  new_line_ptr = new T[ totalColumns_ ];
+                }
+                catch(...) 
+                {
+                  if( allocateDiskLines( line ) )
+                  {
+                    return true;
+                  }
+                  else 
+                  {
+                    clear();
+                    
+                    TEAGN_LOG_AND_RETURN( 
+                      "Error allocating mapped memory lines" )
+                  }
+                }
+                
+                if( new_line_ptr == 0 ) {
+                  if( allocateDiskLines( line ) )
+                  {
+                    return true;
+                  }
+                  else 
+                  {
+                    clear();
+                    
+                    TEAGN_LOG_AND_RETURN( 
+                      "Error allocating mapped memory lines" )
+                  }         
+                } 
+                
+                linesPtrsVec_[ line ] = new_line_ptr;
+              } else { // ( line >= maxRamLines )
+                if( allocateDiskLines( line ) ) 
+                {
+                  return true;
+                } 
+                else 
+                {
+                  clear();
+                  
+                  TEAGN_LOG_AND_RETURN( 
+                    "Error allocating mapped memory lines" )
+                }              
+              }
+            }
+            
+            break;
+          }                 
+          default :
+          {
+            TEAGN_LOG_AND_THROW( "Invalid memory policy" );
+            break;
+          }
+        }
+      }
+    }
+    
+    return true;
+  }
+  
+  
+  template< class T >
+  unsigned int TePDIMatrix< T >::GetLines() const
+  {
+    return totalLines_;
+  }
+
+  
+  template< class T >
+  unsigned int TePDIMatrix< T >::GetColumns() const
+  {
+    return totalColumns_;
+  }
+  
+  
+  template< class T >
+  bool TePDIMatrix< T >::IsEmpty() const
+  {
+    return ( totalLines_ == 0 ) ? true : false;
+  }
+  
+
+  template< class T >
+  const TePDIMatrix< T >& TePDIMatrix< T >::operator=(
+    const TePDIMatrix< T >& external )
+  {
+    TEAGN_TRUE_OR_THROW( 
+      Reset( external.totalLines_, external.totalColumns_,
+      external.currentMemPolicy_ ),
+      "Unable to initiate the matrix object" );
+    
+    unsigned int line;
+    unsigned int column;
+    T const* inLinePtr = 0;
+    T* outLinePtr = 0;
+    
+    for( line = 0 ; line < totalLines_ ; ++line ) 
+    {
+      inLinePtr = external.scanLine( line );
+      outLinePtr = scanLine( line );
+      
+      for( column = 0 ; column < totalColumns_ ; ++column ) {
+        outLinePtr[ column ] = inLinePtr[ column ];
+      }
+    }
+
+    return *this;
+  }
+  
+  template< class T >
+  bool TePDIMatrix< T >::allocateDiskLines( unsigned int startingLineIdx )
+  {
+    TEAGN_DEBUG_CONDITION( diskLinesVec_.size() == totalLines_,
+      "Invalid disk lines vector size" );
+    
+    const unsigned int lineBytes = sizeof( T ) * totalColumns_;
+    const unsigned int linesPerfile = ( unsigned long int )
+      floor( ( (double)maxTmpFileSize_ ) / ( (double) lineBytes ) );    
+    const unsigned long int fileSize = (unsigned long int)
+      ( linesPerfile * lineBytes );
+    
+    unsigned int currFileLines = linesPerfile + 1;
+    DiskLinesVecNodeT dummyNode;
+     
+    for( unsigned long int lineIdx = startingLineIdx ; lineIdx < 
+      totalLines_ ; ++lineIdx )
+    {
+      if( currFileLines >= linesPerfile )
+      {
+        TEAGN_TRUE_OR_RETURN( TeGetTempFileName( dummyNode.fullFilePath_ ),
+          "Unable to create temporary file name" );
+        TEAGN_TRUE_OR_RETURN( createNewDiskFile( fileSize, 
+          dummyNode.fullFilePath_, &(dummyNode.filePtr_) ), 
+          "Error creating temporary file" );
+        
+        TeTempFilesRemover::instance().addFile( dummyNode.fullFilePath_,
+          dummyNode.filePtr_ );        
+        
+        currFileLines = 0;
+      }
+      
+      dummyNode.fileOff_ = currFileLines * lineBytes;
+      diskLinesVec_[ lineIdx ] = dummyNode;
+      
+      ++currFileLines;
+    } 
+    
+    return true;
+  }
+  
+  template< class T >
+  T* TePDIMatrix< T >::scanLine( const unsigned int& line ) const
+  {
+    TEAGN_DEBUG_CONDITION( line < linesPtrsVec_.size(),
+      "Invalid tile index" );
+      
+    T* line_ptr = linesPtrsVec_[ line ];
+      
+    if( line_ptr ) {
+      return line_ptr;
+    } else {
+      /* flush the current disk line from RAM */
+      
+      if( curDiskLineIdx_ > -1 )
+      {
+        TEAGN_DEBUG_CONDITION( curDiskLineIdx_ < (long int)diskLinesVec_.size(),
+          "Invalid disk tile index" );
+        TEAGN_DEBUG_CONDITION( curDiskLineIdx_ < (long int)linesPtrsVec_.size(),
+          "Invalid disk tile index" );
+        TEAGN_DEBUG_CONDITION( currDiskLinePtr_,
+          "Invalid swap line pointer" );
+        
+        const DiskLinesVecNodeT& node = diskLinesVec_[ curDiskLineIdx_ ];
+        
+        TEAGN_TRUE_OR_THROW( 0 == fseek( node.filePtr_, 
+          (long)( node.fileOff_ ), SEEK_SET ),
+          "File seek error" );        
+        
+        TEAGN_TRUE_OR_THROW( 1 == fwrite( (void*)currDiskLinePtr_, 
+          (size_t)( linesSize_ ), 1, node.filePtr_ ),
+          "File write error" )
+            
+        linesPtrsVec_[ curDiskLineIdx_ ] = 0;
+      }
+      
+      // Read the required line into RAM
+      
+      TEAGN_DEBUG_CONDITION( line < (unsigned int)diskLinesVec_.size(),
+        "Invalid disk tile index" );      
+      const DiskLinesVecNodeT& node = diskLinesVec_[ line ];
+      
+      TEAGN_TRUE_OR_THROW( 0 == fseek( node.filePtr_, 
+        (long)( node.fileOff_ ), SEEK_SET ),
+        "File seek error" );
+      
+      TEAGN_TRUE_OR_THROW( 1 == fread( (void*)currDiskLinePtr_, 
+        (size_t)( linesSize_ ), 1, node.filePtr_ ),
+        "File read error" )      
+          
+      curDiskLineIdx_ =  line;   
+      linesPtrsVec_[ curDiskLineIdx_ ] = currDiskLinePtr_;
+      
+      return currDiskLinePtr_;
+    }
+  } 
+
+  template< class T >
+  bool TePDIMatrix< T >::createNewDiskFile( unsigned long int size,
+    const std::string& filename, FILE** fileptr ) const
+  {
+    TEAGN_TRUE_OR_RETURN( ! filename.empty(),
+      "Invalid file name" );
+      
+    (*fileptr) = fopen( filename.c_str(), "wb+" );
+    TEAGN_TRUE_OR_RETURN( (*fileptr) != 0, "Invalid file pointer" )
+    
+    long seekoff = (long)( size - 1 );
+    
+    if( 0 != fseek( (*fileptr), seekoff, SEEK_SET ) )
+    {
+      fclose( (*fileptr) );
+      TEAGN_LOGERR( "File seek error" );
+      return false;
+    }
+  
+    unsigned char c = '\0';
+    if( 1 != fwrite( &c, 1, 1, (*fileptr) ) )
+    {
+      fclose( (*fileptr) );
+      TEAGN_LOGERR( "File write error" );
+      return false;
+    }
+      
+    return true;
+  }  
+  
+/** @example TePDIMatrix_test.cpp
+ *    Shows how to use this class.
+ */    
+  
+#endif //TEPDIMATRIX_HPP
+
diff --git a/src/terralib/image_processing/TePDIMatrixFunctions.cpp b/src/terralib/image_processing/TePDIMatrixFunctions.cpp
new file mode 100755
index 0000000..c26471e
--- /dev/null
+++ b/src/terralib/image_processing/TePDIMatrixFunctions.cpp
@@ -0,0 +1,140 @@
+#include "TePDIMatrixFunctions.hpp"
+#include <TeAgnostic.h>
+
+#include "math.h"
+
+namespace TePDIMatrixFunctions {
+
+  double GetCorrelation( const TePDIMatrix< double >& matrix1,
+    const TePDIMatrix< double >& matrix2 )
+  {
+    const unsigned int lines_bound = 
+      MIN( matrix1.GetLines(), matrix2.GetLines() );
+    const unsigned int cols_bound = 
+      MIN( matrix1.GetColumns(), matrix2.GetColumns() );
+      
+    if( ( lines_bound == 0 ) || ( cols_bound == 0 ) ) {
+      return 0;
+    } else {
+      unsigned int line = 0;
+      unsigned int col = 0;
+      
+      double M1XM2 = 0;
+      double M1XM1 = 0;
+      double M2XM2 = 0;
+      double M1SUM = 0;
+      double M2SUM = 0;
+      
+      double element1 = 0;
+      double element2 = 0;
+      
+      for( line = 0; line < lines_bound ; ++line ) {
+        for( col = 0 ; col < cols_bound ; ++col ) {
+          element1 = matrix1( line, col );
+          element2 = matrix2( line, col );
+        
+          M1XM2 += element1 * element2;
+          M1XM1 += element1 * element1;
+          M2XM2 += element2 * element2;
+          M1SUM += element1;
+          M2SUM += element2;
+        }
+      }
+      
+      const double elements = ( double )( lines_bound * cols_bound );
+      double mean1 = M1SUM / elements;
+      double mean2 = M2SUM / elements;
+      
+      double var1 = sqrt( ( M1XM1 / elements ) - ( mean1 * mean1 ) );
+      double var2 = sqrt( ( M2XM2 / elements ) - ( mean2 * mean2 ) );
+      
+      if( ( var1 != 0 ) && ( var2 != 0 ) ) {
+        return ( ( ( M1XM2 / elements ) - ( mean1 * mean2 ) ) /
+          ( var1 * var2 ) );
+      } else {
+        return 0;
+      }
+    }
+  }
+  
+  
+  bool Abs( const TePDIMatrix< double >& inMatrix, 
+    TePDIMatrix< double >& absMatrix )
+  {
+    const unsigned int lines_bound = inMatrix.GetLines();
+    const unsigned int cols_bound = inMatrix.GetColumns();
+    unsigned int line = 0;
+    unsigned int col = 0;
+    
+    TEAGN_TRUE_OR_RETURN( absMatrix.Reset( lines_bound, cols_bound ),
+      "Unable to reset output matrix" );
+    
+    for( line = 0 ; line < lines_bound ; ++line ) {
+      for( col = 0 ; col < cols_bound ; ++col ) {
+        absMatrix( line, col ) = ABS( inMatrix( line, col ) );
+      }
+    }
+    
+    return true;
+  }
+
+  
+  bool WhereIsGreater( const TePDIMatrix< double >& inMatrix1,
+    const TePDIMatrix< double >& inMatrix2,
+    TePDIMatrix< double >& gtMatrix )
+  {
+    const unsigned int m1lines = inMatrix1.GetLines();
+    const unsigned int m2lines = inMatrix2.GetLines();
+    const unsigned int m1cols = inMatrix1.GetColumns();
+    const unsigned int m2cols = inMatrix2.GetColumns();
+    
+    unsigned int line = 0;
+    unsigned int col = 0;
+    
+    TEAGN_TRUE_OR_RETURN( gtMatrix.Reset( m1lines, m1cols ),
+      "Unable to reset output matrix" );
+    
+    for( line = 0 ; line < m1lines ; ++line ) {
+      for( col = 0 ; col < m1cols ; ++col ) {
+        if( ( line < m2lines ) && ( col < m2cols ) ) {
+          if( inMatrix1( line, col ) > inMatrix2( line, col ) ) {
+            gtMatrix( line, col ) = 1.;
+          } else {
+            gtMatrix( line, col ) = 0;
+          }
+        } else {
+          gtMatrix( line, col ) = 0;
+        }
+      }
+    }
+    
+    return true;  
+  }
+  
+  
+  bool Negate( const TePDIMatrix< double >& inMatrix,
+    TePDIMatrix< double >& negMatrix )
+  {
+    const unsigned int lines_bound = inMatrix.GetLines();
+    const unsigned int cols_bound = inMatrix.GetColumns();
+    unsigned int line = 0;
+    unsigned int col = 0;
+    
+    TEAGN_TRUE_OR_RETURN( negMatrix.Reset( lines_bound, cols_bound ),
+      "Unable to reset output matrix" );
+    
+    for( line = 0 ; line < lines_bound ; ++line ) {
+      for( col = 0 ; col < cols_bound ; ++col ) {
+        if( inMatrix( line, col ) == 0 ) {
+          negMatrix( line, col ) = 1.0;
+        } else {
+          negMatrix( line, col ) = 0.0;
+        }
+      }
+    }
+    
+    return true;
+  }  
+
+}
+
diff --git a/src/terralib/image_processing/TePDIMatrixFunctions.hpp b/src/terralib/image_processing/TePDIMatrixFunctions.hpp
new file mode 100755
index 0000000..bbbfe77
--- /dev/null
+++ b/src/terralib/image_processing/TePDIMatrixFunctions.hpp
@@ -0,0 +1,92 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIMATRIXFUNCTIONS_HPP
+  #define TEPDIMATRIXFUNCTIONS_HPP
+  
+  #include "TePDIMatrix.hpp"
+  #include "TePDITypes.hpp"
+  
+  /**
+   * @brief This namespace contains functions for TePDIMatrix manipulation.
+   * @note THEY SHOLD NOT BE USED BY ANYONE. The support and interfaces 
+   * can be changed in future. THIS IS FOR INTERNAL USE ONLY.     
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIModule
+   */
+  namespace TePDIMatrixFunctions
+  {
+    /**
+     * @brief Matrices correlation.
+     * 
+     * @param matrix1 Input matrix 1.
+     * @param matrix2 Input matrix 2.
+     * @return The correlation between the two matrix.
+     * @note The calcule will only be made for elements that exists in both
+     * matrices.
+     */
+    PDI_DLL double GetCorrelation( const TePDIMatrix< double >& matrix1,
+      const TePDIMatrix< double >& matrix2 );
+      
+    /**
+     * @brief Absolute values matrix generation.
+     * 
+     * @param inMatrix Input matrix.
+     * @param absMatrix Output matrix.
+     * @return true if ok, false on errors.
+     */
+    PDI_DLL bool Abs( const TePDIMatrix< double >& inMatrix,
+      TePDIMatrix< double >& absMatrix );
+      
+    /**
+     * @brief Locates all inMatrix1 elements there are greater than
+     * inMatrix2 elements. These elements positions will be marked with
+     * value 1 in gtMatrix. The other positions will be marked with 0's.
+     * 
+     * @param inMatrix1 Input matrix.
+     * @param inMatrix2 Input matrix.
+     * @param gtMatrix Output matrix.
+     * @return true if ok, false on errors.
+     */
+   PDI_DLL bool WhereIsGreater( const TePDIMatrix< double >& inMatrix1,
+      const TePDIMatrix< double >& inMatrix2,
+      TePDIMatrix< double >& gtMatrix );
+      
+    /**
+     * @brief Locates all inMatrix1 zero elements. These elements positions will be 
+     * marked with value 1 in negMatrix. The other positions will be marked 
+     * with 0's. 
+     * @param inMatrix Input matrix.
+     * @param negMatrix Output matrix.
+     * @return true if ok, false on errors.
+     */
+   PDI_DLL bool Negate( const TePDIMatrix< double >& inMatrix,
+      TePDIMatrix< double >& negMatrix );       
+  };
+  
+/** @example TePDIMatrixFunctions_test.cpp
+ *    Shows how to use this namespace functions.
+ */    
+
+#endif
diff --git a/src/terralib/image_processing/TePDIMixModel.cpp b/src/terralib/image_processing/TePDIMixModel.cpp
new file mode 100755
index 0000000..da1c9e9
--- /dev/null
+++ b/src/terralib/image_processing/TePDIMixModel.cpp
@@ -0,0 +1,42 @@
+#include <TePDIMixModel.hpp>
+#include <TePDIMixModelStratFactory.hpp>
+
+TePDIMixModel::TePDIMixModel()
+{
+}
+
+
+TePDIMixModel::~TePDIMixModel()
+{
+}
+
+void TePDIMixModel::ResetState(const TePDIParameters& params)
+{
+	TePDIParameters dummy_params = params;
+}
+
+
+bool TePDIMixModel::CheckParameters(const TePDIParameters& parameters) const
+{
+	std::string mixmodel_type;
+	TEAGN_TRUE_OR_RETURN(parameters.GetParameter("mixmodel_type", mixmodel_type), "Missing parameter : mixmodel_type");
+
+	TePDIMixModelStrategy::pointer mixmodel_strategy(TePDIMixModelStratFactory::make(mixmodel_type, parameters));
+	
+	TEAGN_TRUE_OR_RETURN(mixmodel_strategy.isActive(), "Invalid strategy");
+
+	return mixmodel_strategy->CheckParameters(parameters);
+}
+
+
+bool TePDIMixModel::RunImplementation()
+{
+	std::string mixmodel_type;
+	TEAGN_TRUE_OR_RETURN(params_.GetParameter("mixmodel_type", mixmodel_type), "Missing parameter : mixmodel_type");
+	
+	TePDIMixModelStrategy::pointer mixmodel_strategy(TePDIMixModelStratFactory::make(mixmodel_type, params_));
+	
+	TEAGN_TRUE_OR_RETURN(mixmodel_strategy.isActive(), "Invalid strategy");
+	
+	return mixmodel_strategy->Apply(params_);
+}
diff --git a/src/terralib/image_processing/TePDIMixModel.hpp b/src/terralib/image_processing/TePDIMixModel.hpp
new file mode 100755
index 0000000..f57a64e
--- /dev/null
+++ b/src/terralib/image_processing/TePDIMixModel.hpp
@@ -0,0 +1,98 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+
+#ifndef TEPDIMIXMODEL_HPP
+#define TEPDIMIXMODEL_HPP
+
+#include <TePDIStrategyFactory.hpp>
+#include <TeAgnostic.h>
+#include <TePDIAlgorithm.hpp>
+#include <TePDIParameters.hpp>
+#include <TeSharedPtr.h>
+
+/**
+* @brief This is the base class for image mixmodel algorithms.
+* @author Felipe Castro da Silva <felipe at dpi.inpe.br>
+* @ingroup TePDIGeneralAlgoGroup
+*
+* @note The general required parameters:
+* @param mixmodel_type (std::string) - MixModel Strategy type
+*
+* @note The specific parameters: See each mixmodel strategy for reference.   
+*/
+
+class PDI_DLL TePDIMixModel : public TePDIAlgorithm
+{
+	
+	public :
+		
+/*		typedef TeSharedPtr< TePDIMixModel > pointer;
+		typedef const TeSharedPtr< TePDIMixModel > const_pointer;*/
+		
+		/**
+		* Default Constructor.
+		*
+		*/
+		TePDIMixModel();
+		
+		/**
+		* Default Destructor
+		*/
+		virtual ~TePDIMixModel();
+		
+		/**
+		* Checks if the supplied parameters fits the requirements of each
+		* PDI algorithm implementation.
+		*
+		* Error log messages will be generated. No exceptions generated.
+		*
+		* @param parameters The parameters to be checked.
+		* @return true if the parameters are OK. false if not.
+		*/
+		bool CheckParameters( const TePDIParameters& parameters ) const;
+
+	protected :
+	
+		/**
+		* Reset the internal state to the initial state.
+		*
+		* @param params The new parameters referente at initial state.
+		*/
+		void ResetState( const TePDIParameters& params );
+
+		/**
+		* Runs the current algorithm implementation.
+		*
+		* @return true if OK. false on error.
+		*/
+		bool RunImplementation();
+
+};
+  
+/** @example TePDIMixModel_test.cpp
+ *    Shows how to use this class.
+ */
+
+#endif
diff --git a/src/terralib/image_processing/TePDIMixModelComponent.cpp b/src/terralib/image_processing/TePDIMixModelComponent.cpp
new file mode 100755
index 0000000..19bc82f
--- /dev/null
+++ b/src/terralib/image_processing/TePDIMixModelComponent.cpp
@@ -0,0 +1,49 @@
+#include <TePDIMixModelComponent.hpp>
+
+TePDIMixModelComponent::TePDIMixModelComponent(string l)
+{
+	label = l;
+}
+
+TePDIMixModelComponent::~TePDIMixModelComponent()
+{
+}
+
+bool TePDIMixModelComponent::insertPixel(unsigned int bn, double p)
+{
+	pixels.insert(pair<unsigned int, double>(bn, p));
+
+	return true;
+}
+
+bool TePDIMixModelComponent::removePixel(unsigned int bn)
+{
+	map<unsigned int, double>::iterator it = pixels.find(bn);
+
+	if (it == pixels.end())
+		return false;
+
+	pixels.erase(bn);
+
+	return true;
+}
+
+double TePDIMixModelComponent::getPixel(unsigned int bn)
+{
+	map<unsigned int, double>::iterator it = pixels.find(bn);
+
+	if (it == pixels.end())
+		return -1.0;
+
+	return it->second;
+}
+
+unsigned TePDIMixModelComponent::getSize()
+{
+	return pixels.size();
+}
+
+void TePDIMixModelComponent::clearPixels()
+{
+	pixels.clear();
+}
diff --git a/src/terralib/image_processing/TePDIMixModelComponent.hpp b/src/terralib/image_processing/TePDIMixModelComponent.hpp
new file mode 100755
index 0000000..478a1a9
--- /dev/null
+++ b/src/terralib/image_processing/TePDIMixModelComponent.hpp
@@ -0,0 +1,88 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+
+#ifndef TEPDIMIXMODELCOMPONENT_HPP
+#define TEPDIMIXMODELCOMPONENT_HPP
+
+#include "TePDIDefines.hpp"
+#include <string>
+#include <map>
+
+using namespace std;
+
+/**
+* @brief This is the class contains the component information for mixmodel algorithms.
+* @author Felipe Castro da Silva <felipe at dpi.inpe.br>
+* @ingroup PDIMixModel
+*/
+
+class PDI_DLL TePDIMixModelComponent
+{
+	public:
+/**
+* Default constructor.
+* @param l name of the component (e.g. cloud, vegetation, ...).
+*/
+		TePDIMixModelComponent(string l);
+/**Default destructor.*/
+		~TePDIMixModelComponent();
+
+/**
+* Insert pixel.
+* @param bn band number where the pixel will be stored.
+* @param p pixel value.
+* @return true if pixel was inserted, false if not.
+*/
+		bool insertPixel(unsigned int bn, double p);
+/**
+* Remove pixel.
+* @param bn band number of the pixel to be removed.
+* @return true if pixel was removed, false if not.
+*/
+		bool removePixel(unsigned int bn);
+/**
+* Return pixel value.
+* @param bn pixel band number.
+* @return if bn exists, pixel value, if note -1.0.
+*/
+		double getPixel(unsigned int bn);
+/**
+* Return bands number.
+* @return bands number in the component.
+*/
+		unsigned getSize();
+/**Clear all the component.*/
+		void clearPixels();
+
+	private:
+/**The component name (e.g. cloud, vegetation, ...).*/
+		string label;
+/**Store band number and pixel value.*/
+		map<unsigned int, double> pixels;
+};
+
+#endif
+
+
diff --git a/src/terralib/image_processing/TePDIMixModelComponentList.cpp b/src/terralib/image_processing/TePDIMixModelComponentList.cpp
new file mode 100755
index 0000000..1bd978e
--- /dev/null
+++ b/src/terralib/image_processing/TePDIMixModelComponentList.cpp
@@ -0,0 +1,79 @@
+#include <TePDIMixModelComponentList.hpp>
+
+TePDIMixModelComponentList::TePDIMixModelComponentList()
+{
+}
+
+TePDIMixModelComponentList::~TePDIMixModelComponentList()
+{
+}
+
+bool TePDIMixModelComponentList::insertComponent(unsigned int cn, TePDIMixModelComponent c)
+{
+	components.insert(pair<unsigned int, TePDIMixModelComponent>(cn, c));
+
+	return true;
+}
+
+bool TePDIMixModelComponentList::insertComponent(unsigned int cn, string l)
+{
+	components.insert(pair<unsigned int, TePDIMixModelComponent>(cn, TePDIMixModelComponent(l)));
+
+	return true;
+}
+
+bool TePDIMixModelComponentList::removeComponent(unsigned int cn)
+{
+	components.erase(cn);
+
+	return true;
+}
+
+unsigned int TePDIMixModelComponentList::getSize()
+{
+	return components.size();
+}
+
+bool TePDIMixModelComponentList::insertPixel(unsigned int cn, unsigned int bn, double p)
+{
+	map<unsigned int, TePDIMixModelComponent>::iterator it = components.find(cn);
+
+	if (it == components.end())
+		return false;
+
+	it->second.insertPixel(bn, p);
+
+	return true;
+}
+
+bool TePDIMixModelComponentList::removePixel(unsigned int cn, unsigned int bn)
+{
+	map<unsigned int, TePDIMixModelComponent>::iterator it = components.find(cn);
+
+	if (it == components.end())
+		return false;
+
+	it->second.removePixel(bn);
+
+	return true;
+}
+
+double TePDIMixModelComponentList::getPixel(unsigned int cn, unsigned int bn)
+{
+	map<unsigned int, TePDIMixModelComponent>::iterator it = components.find(cn);
+
+	if (it == components.end())
+		return -1.0;
+
+	return it->second.getPixel(bn);
+}
+
+int TePDIMixModelComponentList::getComponentSize(unsigned cn)
+{
+	map<unsigned int, TePDIMixModelComponent>::iterator it = components.find(cn);
+
+	if (it == components.end())
+		return -1;
+
+	return it->second.getSize();
+}
diff --git a/src/terralib/image_processing/TePDIMixModelComponentList.hpp b/src/terralib/image_processing/TePDIMixModelComponentList.hpp
new file mode 100755
index 0000000..a0e0493
--- /dev/null
+++ b/src/terralib/image_processing/TePDIMixModelComponentList.hpp
@@ -0,0 +1,107 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIMIXMODELCOMPONENTLIST_HPP
+#define TEPDIMIXMODELCOMPONENTLIST_HPP
+
+#include <string>
+#include <map>
+
+#include <TeSharedPtr.h>
+#include <TePDIMixModelComponent.hpp>
+
+using namespace std;
+
+/**
+* @brief This is the class contains the list of components for mixmodel algorithms.
+* @author Felipe Castro da Silva <felipe at dpi.inpe.br>
+* @ingroup PDIMixModel
+*/
+
+class PDI_DLL TePDIMixModelComponentList
+{
+	public:
+/**Default constructor.*/
+		TePDIMixModelComponentList();
+/**Default destructor.*/
+		~TePDIMixModelComponentList();
+/**
+* Insert component.
+* @param cn component number where the component will be stored.
+* @param c component to be stored.
+* @return true if the component was inserted, false if not.
+*/
+		bool insertComponent(unsigned cn, TePDIMixModelComponent c);
+/**
+* Insert a blank component called l.
+* @param cn component number where the component will be stored.
+* @param l name of the component (e.g. cloud, vegetation, ...).
+* @return true if the component was inserted, false if not.
+*/
+		bool insertComponent(unsigned cn, string l);
+/**
+* Remove component.
+* @param cn component number to be removed.
+* @return true if the component was removed, false if not.
+*/
+		bool removeComponent(unsigned cn);
+/**
+* Return component list size.
+* @return return the componentlist size.
+*/
+		unsigned getSize();
+/**
+* Insert pixel.
+* @param cn component number where the pixel will be stored.
+* @param bn band number where the pixel will be stored.
+* @param p value of the pixel.
+* @return true if the pixel was inserted, false if not.
+*/
+		bool insertPixel(unsigned cn, unsigned bn, double p);
+/**
+* Remove pixel.
+* @param cn component number where the pixel will be removed.
+* @param bn band number where the pixel will be removed.
+* @return true if the pixel was removed, false if not.
+*/
+		bool removePixel(unsigned cn, unsigned bn);
+/**
+* Return pixel value.
+* @param cn component number.
+* @param bn band number.
+* @return if cn and bn exist, pixel value, if not -1.0
+*/
+		double getPixel(unsigned cn, unsigned bn);
+/**
+* Return component size.
+* @param cn component number.
+* @return if cn exists, component size, if not -1.
+*/
+		int getComponentSize(unsigned cn);
+	private:
+/**Store component number and component.*/
+		map<unsigned, TePDIMixModelComponent> components;
+};
+
+#endif
diff --git a/src/terralib/image_processing/TePDIMixModelFactory.cpp b/src/terralib/image_processing/TePDIMixModelFactory.cpp
new file mode 100755
index 0000000..a3aea71
--- /dev/null
+++ b/src/terralib/image_processing/TePDIMixModelFactory.cpp
@@ -0,0 +1,21 @@
+#include "TePDIMixModelFactory.hpp"
+#include "TePDIMixModel.hpp"
+#include "TeAgnostic.h"
+
+
+TePDIMixModelFactory::TePDIMixModelFactory():TePDIAlgorithmFactory(std::string("TePDIMixModel"))
+{
+};
+
+TePDIMixModelFactory::~TePDIMixModelFactory()
+{
+};
+
+TePDIAlgorithm* TePDIMixModelFactory::build (const TePDIParameters& arg)
+{
+	TePDIAlgorithm* instance_ptr = new TePDIMixModel();
+	
+	TEAGN_TRUE_OR_THROW(instance_ptr->Reset(arg), "Invalid parameters");
+	
+	return instance_ptr;
+}
diff --git a/src/terralib/image_processing/TePDIMixModelFactory.hpp b/src/terralib/image_processing/TePDIMixModelFactory.hpp
new file mode 100755
index 0000000..577f4c2
--- /dev/null
+++ b/src/terralib/image_processing/TePDIMixModelFactory.hpp
@@ -0,0 +1,59 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIMIXMODELFACTORY_HPP
+#define TEPDIMIXMODELFACTORY_HPP
+
+#include <TeSharedPtr.h>
+#include "TePDIAlgorithmFactory.hpp"
+#include "TePDIParameters.hpp"
+
+/**
+* @brief This is the class for mixmodel algorithms factory.
+* @author Felipe Castro da Silva <felipe at dpi.inpe.br>
+* @ingroup PDIAlgorithmsFactories
+*/
+
+class PDI_DLL TePDIMixModelFactory : public TePDIAlgorithmFactory
+{
+	public :
+/**
+* Default constructor.
+*/
+		TePDIMixModelFactory();
+/**Default destructor.*/
+		~TePDIMixModelFactory();
+
+	protected :
+/**
+* Implementation for the abstract TeFactory::build.
+* @param arg A const reference to the parameters used by the algorithm.
+* @return A pointer to the new generated algorithm instance.
+*/
+	TePDIAlgorithm* build( const TePDIParameters& arg );
+};
+
+namespace{static TePDIMixModelFactory TePDIMixModelFactory_instance;};
+
+#endif
diff --git a/src/terralib/image_processing/TePDIMixModelSpectralBand.cpp b/src/terralib/image_processing/TePDIMixModelSpectralBand.cpp
new file mode 100755
index 0000000..f124ced
--- /dev/null
+++ b/src/terralib/image_processing/TePDIMixModelSpectralBand.cpp
@@ -0,0 +1,39 @@
+#include <TePDIMixModelSpectralBand.hpp>
+
+TePDIMixModelSpectralBand::TePDIMixModelSpectralBand(unsigned int s, unsigned int b, double ll, double ul, string l)
+{
+	sensor = s;
+	band = b;
+	lowerlimit = ll;
+	upperlimit = ul;
+	label = l;
+}
+
+TePDIMixModelSpectralBand::~TePDIMixModelSpectralBand()
+{
+}
+
+unsigned int TePDIMixModelSpectralBand::getSensor()
+{
+	return sensor;
+}
+
+unsigned int TePDIMixModelSpectralBand::getBand()
+{
+	return band;
+}
+
+double TePDIMixModelSpectralBand::getLowerLimit()
+{
+	return lowerlimit;
+}
+
+double TePDIMixModelSpectralBand::getUpperLimit()
+{
+	return upperlimit;
+}
+
+string TePDIMixModelSpectralBand::getLabel()
+{
+	return label;
+}
diff --git a/src/terralib/image_processing/TePDIMixModelSpectralBand.hpp b/src/terralib/image_processing/TePDIMixModelSpectralBand.hpp
new file mode 100755
index 0000000..e6822a6
--- /dev/null
+++ b/src/terralib/image_processing/TePDIMixModelSpectralBand.hpp
@@ -0,0 +1,98 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIMIXMODELSPECTRALBAND_HPP
+#define TEPDIMIXMODELSPECTRALBAND_HPP
+
+#include "TePDIDefines.hpp"
+#include <string>
+
+using namespace std;
+
+/**
+* @brief This is the class contains the spectral band information for mixmodel algorithms.
+* @author Felipe Castro da Silva <felipe at dpi.inpe.br>
+* @ingroup PDIMixModel
+*/
+
+class PDI_DLL TePDIMixModelSpectralBand
+{
+	public:
+/**
+* Default constructor.
+* @param s sensor number.
+* @param b band number.
+* @param ll lower spectral range bound.
+* @param ul upper spectral range bound.
+* @note In "princo" strategy case, the parameters s, ll and ul, can be zero.
+* @param l spectral band name (e.g. CBERS_RED, CBERS_BLUE, CBERS_GREEN, ...).
+*/
+		TePDIMixModelSpectralBand(unsigned int s, unsigned int b, double ll, double ul, string l);
+/**Default constructor.*/
+		~TePDIMixModelSpectralBand();
+/**
+* Return the sensor.
+* @return sensor number.
+*/
+		unsigned int getSensor();
+/**
+* Return band number.
+* @return band number.
+*/
+		unsigned int getBand();
+/**
+* Return lower spectral range bound.
+* @return lower spectral range bound.
+*/
+		double getLowerLimit();
+/**
+* Return upper spectral range bound.
+* @return upper spectral range bound.
+*/
+		double getUpperLimit();
+/**
+* Return spectral band name.
+* @return spectral band name.
+*/
+		string getLabel();
+
+	private:
+    /** @brief Sensor number.*/	
+		unsigned int	sensor;
+
+    /** @brief Band number.*/			
+		unsigned int	band;
+
+    /** @brief Lower spectral range bound.*/			
+		double	lowerlimit;
+
+    /** @brief Upper spectral range bound.*/			
+		double	upperlimit;
+
+    /** @brief Spectral band name.*/			
+		string label;
+
+};
+
+#endif
diff --git a/src/terralib/image_processing/TePDIMixModelSpectralBandList.cpp b/src/terralib/image_processing/TePDIMixModelSpectralBandList.cpp
new file mode 100755
index 0000000..864874c
--- /dev/null
+++ b/src/terralib/image_processing/TePDIMixModelSpectralBandList.cpp
@@ -0,0 +1,54 @@
+#include <TePDIMixModelSpectralBandList.hpp>
+
+TePDIMixModelSpectralBandList::TePDIMixModelSpectralBandList()
+{
+}
+
+TePDIMixModelSpectralBandList::~TePDIMixModelSpectralBandList()
+{
+}
+
+bool TePDIMixModelSpectralBandList::insertSpectralBand(TePDIMixModelSpectralBand sb)
+{
+	bands.push_back(sb);
+
+	return true;
+}
+
+bool TePDIMixModelSpectralBandList::loadSpectralBandsFromFile(string filename)
+{
+	FILE *fsb = fopen(filename.c_str(), "r");
+
+	if (fsb != NULL)
+	{
+		TEAGN_LOGERR("ok\n");
+		unsigned int	s,
+				b;
+		double	ll,
+			ul;
+		char l[256];
+		while (fscanf(fsb, "%d %d %lf %lf %s", &s, &b, &ll, &ul, l) >= 5)
+		{
+			insertSpectralBand(TePDIMixModelSpectralBand(s, b, ll, ul, l));
+		}
+		fclose(fsb);
+		return true;
+	}
+	else
+		return false;
+}
+
+unsigned int TePDIMixModelSpectralBandList::getSize()
+{
+	return bands.size();
+}
+
+string TePDIMixModelSpectralBandList::getSpectralBandLabel(unsigned int b)
+{
+	return bands[b].getLabel();
+}
+
+TePDIMixModelSpectralBand TePDIMixModelSpectralBandList::getSpectralBand(unsigned int b)
+{
+	return bands[b];
+}
diff --git a/src/terralib/image_processing/TePDIMixModelSpectralBandList.hpp b/src/terralib/image_processing/TePDIMixModelSpectralBandList.hpp
new file mode 100755
index 0000000..dc44d95
--- /dev/null
+++ b/src/terralib/image_processing/TePDIMixModelSpectralBandList.hpp
@@ -0,0 +1,83 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIMIXMODELSPECTRALBANDLIST_HPP
+#define TEPDIMIXMODELSPECTRALBANDLIST_HPP
+
+#include <string>
+#include <vector>
+
+#include <TeAgnostic.h>
+#include <TePDIMixModelSpectralBand.hpp>
+
+using namespace std;
+
+/**
+* @brief This is the class contains the list of spectral bands for mixmodel algorithms.
+* @author Felipe Castro da Silva <felipe at dpi.inpe.br>
+* @ingroup PDIMixModel
+*/
+
+class PDI_DLL TePDIMixModelSpectralBandList
+{
+	public:
+/**Default constructor.*/
+		TePDIMixModelSpectralBandList();
+/**Default destructor.*/
+		~TePDIMixModelSpectralBandList();
+/**
+* Insert spectral band.
+* @param sb spectral band to be stored.
+* @return true if the spectral band was inserted, false if not.
+*/
+		bool insertSpectralBand(TePDIMixModelSpectralBand sb);
+/**
+* Load spectral band file.
+* @note This file have the following format: sensor_number band_number lower_spectral_range_bound upper_spectral_range_bound spectral_band_name (e.g. 160 1 0.450000 0.520000 Landsat5-TM1)
+* @param filename file name with spectral bands information.
+* @return true if the file was loaded sucessfully, false if not.
+*/
+		bool loadSpectralBandsFromFile(string filename);
+/**
+* Return spectral band list size.
+* @return return the spectralbandlist size.
+*/
+		unsigned int getSize();
+/**
+* Return spectral band name.
+* @param b band number.
+* @return return the spectral band name.
+*/
+		string getSpectralBandLabel(unsigned int b);
+/**
+* Return spectral band.
+* @param b band number.
+* @return return the spectral band.
+*/
+		TePDIMixModelSpectralBand getSpectralBand(unsigned int b);
+	private:
+/**Store the spectral bands*/
+		vector<TePDIMixModelSpectralBand> bands;
+};
+#endif
diff --git a/src/terralib/image_processing/TePDIMixModelStratFactory.cpp b/src/terralib/image_processing/TePDIMixModelStratFactory.cpp
new file mode 100644
index 0000000..6fa0fc3
--- /dev/null
+++ b/src/terralib/image_processing/TePDIMixModelStratFactory.cpp
@@ -0,0 +1,12 @@
+ 
+#include "TePDIMixModelStratFactory.hpp"
+
+TePDIMixModelStratFactory::TePDIMixModelStratFactory( 
+  const std::string& factoryName )
+: TeFactory< TePDIMixModelStrategy, TePDIParameters >( factoryName )
+{
+};      
+
+TePDIMixModelStratFactory::~TePDIMixModelStratFactory()
+{
+};
diff --git a/src/terralib/image_processing/TePDIMixModelStratFactory.hpp b/src/terralib/image_processing/TePDIMixModelStratFactory.hpp
new file mode 100644
index 0000000..c3d0ac5
--- /dev/null
+++ b/src/terralib/image_processing/TePDIMixModelStratFactory.hpp
@@ -0,0 +1,66 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef PDI_MIXMODEL_SF_REGISTERED
+  #define PDI_MIXMODEL_SF_REGISTERED
+  
+  #include <TePDIPrincoMixModelSF.hpp>
+  
+#endif 
+
+#ifndef TEPDIMIXMODELSTRATFACTORY_HPP
+  #define TEPDIMIXMODELSTRATFACTORY_HPP
+
+  #include <TeSharedPtr.h>
+  #include <TePDIMixModelStrategy.hpp>
+  #include <TePDIParameters.hpp>
+  #include <TeFactory.h>
+
+  /**
+   * @brief This is the class for blending strategy factory.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIStrategyFactories
+   */
+  class PDI_DLL TePDIMixModelStratFactory : 
+    public TeFactory< TePDIMixModelStrategy, TePDIParameters >
+  {
+    public :
+      
+      /**
+       * @brief Default Destructor
+       */
+      virtual ~TePDIMixModelStratFactory();
+      
+    protected :
+      
+      /**
+       * @brief Default constructor
+       *
+       * @param factoryName Factory name.
+       */
+      TePDIMixModelStratFactory( const std::string& factoryName );
+  };
+  
+#endif
+
diff --git a/src/terralib/image_processing/TePDIMixModelStrategy.cpp b/src/terralib/image_processing/TePDIMixModelStrategy.cpp
new file mode 100644
index 0000000..ecf41fe
--- /dev/null
+++ b/src/terralib/image_processing/TePDIMixModelStrategy.cpp
@@ -0,0 +1,22 @@
+#include "TePDIMixModelStrategy.hpp"
+#include <TeAgnostic.h>
+
+
+TePDIMixModelStrategy::TePDIMixModelStrategy()
+{
+};      
+
+
+TePDIMixModelStrategy::~TePDIMixModelStrategy()
+{
+};
+
+
+TePDIMixModelStrategy* TePDIMixModelStrategy::DefaultObject( 
+  const TePDIParameters& )
+{
+  TEAGN_LOG_AND_THROW( 
+    "Trying to build an invalid mixmodel strategy instance" );
+  return 0; 
+}
+
diff --git a/src/terralib/image_processing/TePDIMixModelStrategy.hpp b/src/terralib/image_processing/TePDIMixModelStrategy.hpp
new file mode 100644
index 0000000..8edcef6
--- /dev/null
+++ b/src/terralib/image_processing/TePDIMixModelStrategy.hpp
@@ -0,0 +1,72 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIMIXMODELSTRATEGY_HPP
+  #define TEPDIMIXMODELSTRATEGY_HPP
+
+  #include "TePDIStrategy.hpp"
+
+  /**
+   * @brief This is the base class for mix models strategies.
+   * @author Felipe Castro da Silva <felipe at dpi.inpe.br>
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIStrategies
+   */
+  class PDI_DLL TePDIMixModelStrategy : public TePDIStrategy {
+    public:
+      /** @typedef TeSharedPtr< TePDIMixModelStrategy > pointer 
+          Type definition for a instance pointer */
+      typedef TeSharedPtr< TePDIMixModelStrategy > pointer;
+      
+      /** @typedef const TeSharedPtr< TePDIMixModelStrategy > const_pointer 
+          Type definition for a const instance pointer */
+      typedef const TeSharedPtr< TePDIMixModelStrategy > const_pointer;  
+      
+      /**
+       * @brief Default Destructor
+       */
+      virtual ~TePDIMixModelStrategy();      
+      
+      /**
+       * @brief Returns a default object.
+       *
+       * @return A default object.
+       */
+      static TePDIMixModelStrategy* DefaultObject( const TePDIParameters& );
+      
+    protected :
+      
+      /**
+       * @brief Default constructor
+       *
+       * @param factoryName Factory name.
+       */
+      TePDIMixModelStrategy();        
+  
+  };
+  
+#endif
+
+
+
diff --git a/src/terralib/image_processing/TePDIMorfFilter.cpp b/src/terralib/image_processing/TePDIMorfFilter.cpp
new file mode 100755
index 0000000..db48111
--- /dev/null
+++ b/src/terralib/image_processing/TePDIMorfFilter.cpp
@@ -0,0 +1,1335 @@
+#include "TePDIMorfFilter.hpp"
+
+#include <TeAgnostic.h>
+#include "TePDIFilterMask.hpp"
+#include "TePDIUtils.hpp"
+
+#include "math.h"
+
+
+TePDIMorfFilter::TePDIMorfFilter()
+{
+  double_buffer_ = 0;
+}
+
+
+TePDIMorfFilter::~TePDIMorfFilter()
+{
+  if( double_buffer_ ) {
+    delete[] double_buffer_;
+  }
+}
+
+
+bool TePDIMorfFilter::CheckParameters( 
+  const TePDIParameters& parameters ) const
+{
+  /* Checking for general required parameters */
+
+  TePDITypes::TePDIRasterPtrType inRaster;
+  if( ! parameters.GetParameter( "input_image", inRaster ) ) {
+
+    TEAGN_LOGERR( "Missing parameter: input_image" );
+    return false;
+  }
+  if( ! inRaster.isActive() ) {
+
+    TEAGN_LOGERR( "Invalid parameter: input_image inactive" );
+    return false;
+  }
+  if( inRaster->params().status_ == TeRasterParams::TeNotReady ) {
+
+    TEAGN_LOGERR( "Invalid parameter: input_image not ready" );
+    return false;
+  }
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  if( ! parameters.GetParameter( "output_image", outRaster ) ) {
+
+    TEAGN_LOGERR( "Missing parameter: output_image" );
+    return false;
+  }
+  if( ! outRaster.isActive() ) {
+
+    TEAGN_LOGERR( "Invalid parameter: output_image inactive" );
+    return false;
+  }
+  if( inRaster->params().status_ == TeRasterParams::TeNotReady ) {
+
+    TEAGN_LOGERR( "Invalid parameter: output_image not ready" );
+    return false;
+  }
+
+  /* Filter type checking */
+  TePDIMorfType filter_type;
+  if( ! parameters.GetParameter( "filter_type", filter_type ) ) {
+
+    TEAGN_LOGERR( "Missing parameter: filter_type" );
+    return false;
+  }
+  if( ( filter_type != TePDIMDilationType ) &&
+      ( filter_type != TePDIMErosionType ) &&
+      ( filter_type != TePDIMMedianType ) &&
+      ( filter_type != TePDIMModeType ) ) {
+
+    TEAGN_LOGERR( "Invalid parameter: filter_type" );
+    return false;
+  }
+
+  /* channels parameter checking */
+
+  std::vector< int > channels;
+  if( ! parameters.GetParameter( "channels", channels ) ) {
+
+    TEAGN_LOGERR( "Missing parameter: channels" );
+    return false;
+  }
+  for( unsigned int index = 0 ; index < channels.size() ; ++index ) {
+    if( channels[ index ] >= inRaster->nBands() ) {
+      TEAGN_LOGERR( "Invalid parameter: channels" );
+      return false;
+    }
+  }
+
+  /* Filter mask checking */
+
+  TePDIFilterMask::pointer mask;
+
+  if( ! parameters.GetParameter( "filter_mask", mask ) ) {
+
+    TEAGN_LOGERR( "Missing parameter: filter_mask" );
+    return false;
+  }
+  if( ! mask.isActive() ) {
+
+    TEAGN_LOGERR( "Invalid parameter: filter_mask inactive" );
+    return false;
+  }
+  if( mask->columns() < 3 ) {
+    TEAGN_WATCH( mask->columns() );
+    TEAGN_LOGERR( "Invalid parameter: filter_mask with invalid colunms number" );
+    return false;
+  }
+  if( mask->lines() < 3 ) {
+    TEAGN_WATCH( mask->lines() );
+    TEAGN_LOGERR( "Invalid parameter: filter_mask with invalid lines number" );
+    return false;
+  }
+  if( ( (int)mask->lines() > inRaster->params().nlines_ ) ||
+      ( (int)mask->columns() > inRaster->params().ncols_ ) ){
+    TEAGN_LOGERR( "Invalid parameter: filter_mask do not fit inside input image" );
+    return false;
+  }
+  TEAGN_TRUE_OR_RETURN(
+    mask->isMorfMask(), "Invalid mask: Not a morfological mask" );
+
+  /* Checking for number of iterations */
+
+  int iterations = 0;
+  if( ! parameters.GetParameter( "iterations", iterations ) ) {
+
+    TEAGN_LOGERR( "Missing parameter: iterations" );
+    return false;
+  }
+  TEAGN_TRUE_OR_RETURN( iterations > 0, "Invalid iterations number" );
+
+  return true;
+}
+
+
+bool TePDIMorfFilter::RunImplementation()
+{
+  TePDIMorfType filter_type;
+  params_.GetParameter( "filter_type", filter_type );
+
+  switch( filter_type ) {
+    case TePDIMDilationType :
+    {
+      return RunDilation();
+      break;
+    }
+    case TePDIMErosionType :
+    {
+      return RunErosion();
+      break;
+    }
+    case TePDIMMedianType :
+    {
+      return RunMedian();
+      break;
+    }
+    case TePDIMModeType :
+    {
+      return RunMode();
+      break;
+    }    
+    default :
+    {
+      TEAGN_LOG_AND_RETURN( "Invalid algorithm type" );
+    }
+  }
+}
+
+
+bool TePDIMorfFilter::RunDilation()
+{
+  TePDITypes::TePDIRasterPtrType inRaster;
+  params_.GetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  params_.GetParameter( "output_image", outRaster );
+
+  std::vector< int > channels;
+  params_.GetParameter( "channels", channels );
+
+  TePDIFilterMask::pointer mask;
+  params_.GetParameter( "filter_mask", mask );
+
+  int iterations = 0;
+  params_.GetParameter( "iterations", iterations );
+  
+  bool inRaster_uses_dummy = inRaster->params().useDummy_;
+
+  /* Setting the output raster */
+
+  TeRasterParams outRaster_params = outRaster->params();
+  
+  outRaster_params.nBands( channels.size() );
+  if( inRaster->projection() != 0 ) {
+    TeSharedPtr< TeProjection > proj( TeProjectionFactory::make( 
+      inRaster->projection()->params() ) );  
+    outRaster_params.projection( proj.nakedPointer() );
+  }
+  outRaster_params.boxResolution( inRaster->params().box().x1(), 
+    inRaster->params().box().y1(), inRaster->params().box().x2(), 
+    inRaster->params().box().y2(), inRaster->params().resx_, 
+    inRaster->params().resy_ ); 
+    
+  outRaster_params.setPhotometric( TeRasterParams::TeMultiBand, -1 ); 
+  
+  if( inRaster->params().useDummy_ ) {
+    outRaster_params.setDummy( inRaster->params().dummy_[ 0 ], -1 );
+  } else {
+    outRaster_params.setDummy( 0, -1 );
+  }  
+
+  TEAGN_TRUE_OR_RETURN( outRaster->init( outRaster_params ),
+    "Output raster reset error" );    
+
+  /* Creating the temporary rasters with one band each */
+
+  TePDITypes::TePDIRasterPtrType aux_raster1;
+  if( iterations > 1 ) {
+    TEAGN_TRUE_OR_RETURN( TePDIUtils::TeAllocRAMRaster( outRaster, 
+      aux_raster1, 1, true, false, TeDOUBLE ), 
+      "Unable to create auxiliary raster 1" );
+  }
+
+  TePDITypes::TePDIRasterPtrType aux_raster2;
+  if( iterations > 2 ) {
+    TEAGN_TRUE_OR_RETURN( TePDIUtils::TeAllocRAMRaster( outRaster, 
+      aux_raster2, 1, true, false, TeDOUBLE ), 
+      "Unable to create auxiliary raster 2" );
+  }
+
+  /* Updating the global temporary representation of mask weights */
+
+  reset_maskmatrix( mask );
+
+  /* Setting the convolution buffer initial state */
+
+  unsigned int raster_lines = (unsigned int)outRaster->params().nlines_;
+  unsigned int raster_columns = (unsigned int)outRaster->params().ncols_;
+
+  reset_conv_buf( temp_maskmatrix_lines_, raster_columns );
+
+  /* Convolution Loop */
+  
+  double output_level = 0; /* the value generated by each pixel mask calcule */
+
+  double max_gen_level = 0;/* The maximum value generated by each mask convolution */
+
+  unsigned int mask_middle_off_lines =
+    (unsigned int) floor( ((double)temp_maskmatrix_lines_) / 2. );
+  unsigned int mask_middle_off_columns =
+    (unsigned int) floor( ((double)temp_maskmatrix_columns_) / 2. );
+
+  unsigned int conv_column_bound = raster_columns - temp_maskmatrix_columns_ + 1;
+  unsigned int conv_line_bound = raster_lines - temp_maskmatrix_lines_ + 1;
+
+  unsigned int mask_line = 0;
+  unsigned int mask_column = 0;
+  unsigned int raster_line = 0;
+  unsigned int conv_buf_column = 0;
+
+  double out_channel_min_level = 0;
+  double out_channel_max_level = 0;
+  
+  double dummy_value = 0;
+  double curr_buf_value = 0;
+
+  TePDITypes::TePDIRasterPtrType source_raster;
+  TePDITypes::TePDIRasterPtrType target_raster;
+  
+  StartProgInt( "Dilation", channels.size() * iterations *
+     conv_line_bound );  
+
+  for( unsigned int channels_index = 0 ;
+       channels_index < channels.size() ;
+       ++channels_index ) {
+       
+    unsigned int current_input_channel =0;
+    unsigned int curr_out_channel = 0;
+       
+    if( inRaster_uses_dummy ) {
+      dummy_value = inRaster->params().dummy_[ current_input_channel ];
+    }
+
+    TEAGN_TRUE_OR_RETURN( TePDIUtils::TeGetRasterMinMaxBounds(
+      outRaster, channels_index, out_channel_min_level,
+      out_channel_max_level ), "Unable to get raster channel level bounds" );
+
+    for( int iteration = 0 ; (int)iteration < iterations ; ++iteration ) {
+      if( iteration == 0 ) {
+        /* The first iteration */
+        
+        source_raster = inRaster;
+        current_input_channel = channels[ channels_index ];
+        
+        if( iterations > 1 ) {
+          target_raster = aux_raster1;
+          curr_out_channel = 0;
+        } else {
+          target_raster = outRaster;
+          curr_out_channel = channels[ channels_index ];
+        }
+      } else if ( iteration == ( iterations - 1 ) ) {
+        /* The last iteration */
+        
+        current_input_channel = 0;
+        source_raster = target_raster;
+        
+        target_raster = outRaster;
+        curr_out_channel = channels[ channels_index ];
+      } else {
+        /* The intermediary iteration */
+        
+        if( iteration == 1 ) {
+          source_raster = target_raster;
+          current_input_channel = 0;
+        
+          target_raster = aux_raster1;
+          curr_out_channel = 0;
+        } else {        
+          TePDITypes::TePDIRasterPtrType swap_ptr = source_raster;
+          source_raster = target_raster;
+          current_input_channel = 0;
+            
+          target_raster = swap_ptr;
+          curr_out_channel = 0;
+        }
+      }
+
+      /* Fills the convolution buffer with the first "mask_lines" from the raster */
+
+      for( unsigned int line = 0 ; line < ( temp_maskmatrix_lines_ - 1 ); 
+        ++line ) {
+        
+        up_conv_buf( source_raster, line, current_input_channel );
+      }
+
+      /* raster convolution */
+
+      for( raster_line = 0 ; raster_line < conv_line_bound ; ++raster_line ) {
+        /* Getting one more line from the source raster and adding to buffer */
+
+        TEAGN_FALSE_OR_RETURN( UpdateProgInt( ( channels_index * iterations * 
+          conv_line_bound ) +
+          ( iteration * conv_line_bound ) + raster_line ),
+          "Canceled by the user" );
+        
+        up_conv_buf( source_raster, raster_line + temp_maskmatrix_lines_ - 1,
+          current_input_channel );
+
+        for( conv_buf_column = 0 ; conv_buf_column < conv_column_bound ;
+             ++conv_buf_column ) {
+
+          output_level = 0;
+          
+          if( inRaster_uses_dummy ) {
+            max_gen_level = dummy_value;
+            
+            for( mask_line = 0; mask_line < temp_maskmatrix_lines_ ; 
+              ++mask_line ) {
+              for( mask_column = 0; mask_column < temp_maskmatrix_columns_ ;
+                  ++mask_column ) {
+                  
+                curr_buf_value = conv_buf_[ mask_line ][ conv_buf_column + 
+                  mask_column ];
+                  
+                if( curr_buf_value != dummy_value ) {
+                  output_level = temp_maskmatrix_[ mask_line ][ mask_column ] *
+                    curr_buf_value;
+                    
+                  if( max_gen_level == dummy_value ) {
+                    max_gen_level = output_level;
+                  } else {
+                    if( output_level > max_gen_level ) {
+                      max_gen_level = output_level;
+                    }
+                  }
+                }
+              }
+            }
+          } else {
+            max_gen_level = out_channel_min_level;
+            
+            for( mask_line = 0; mask_line < temp_maskmatrix_lines_ ; 
+              ++mask_line ) {
+              
+              for( mask_column = 0; mask_column < temp_maskmatrix_columns_ ;
+                  ++mask_column ) {
+                output_level = temp_maskmatrix_[ mask_line ][ mask_column ] *
+                  conv_buf_[ mask_line ][ conv_buf_column + mask_column ];
+  
+                if( output_level > max_gen_level ) {
+                  max_gen_level = output_level;
+                }
+              }
+            }
+          }
+
+          /* Level range filtering */
+
+          if( max_gen_level < out_channel_min_level ) {
+            max_gen_level = out_channel_min_level;
+          } else if( max_gen_level > out_channel_max_level ) {
+            max_gen_level = out_channel_max_level;
+          }
+
+          TEAGN_TRUE_OR_RETURN( target_raster->setElement(
+            conv_buf_column + mask_middle_off_columns,
+            raster_line +  mask_middle_off_lines, max_gen_level, 
+            curr_out_channel ), "Pixel mapping error" );
+        }
+      }
+    }
+  }
+
+  return true;
+
+}
+
+bool TePDIMorfFilter::RunErosion()
+{
+  TePDITypes::TePDIRasterPtrType inRaster;
+  params_.GetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  params_.GetParameter( "output_image", outRaster );
+
+  std::vector< int > channels;
+  params_.GetParameter( "channels", channels );
+
+  TePDIFilterMask::pointer mask;
+  params_.GetParameter( "filter_mask", mask );
+
+  int iterations = 0;
+  params_.GetParameter( "iterations", iterations );
+  
+  bool inRaster_uses_dummy = inRaster->params().useDummy_;
+
+  /* Setting the output raster */
+
+  TeRasterParams outRaster_params = outRaster->params();
+  
+  outRaster_params.nBands( channels.size() );
+  if( inRaster->projection() != 0 ) {
+    TeSharedPtr< TeProjection > proj( TeProjectionFactory::make( 
+      inRaster->projection()->params() ) );  
+    outRaster_params.projection( proj.nakedPointer() );
+  }
+  outRaster_params.boxResolution( inRaster->params().box().x1(), 
+    inRaster->params().box().y1(), inRaster->params().box().x2(), 
+    inRaster->params().box().y2(), inRaster->params().resx_, 
+    inRaster->params().resy_ );
+    
+  outRaster_params.setPhotometric( TeRasterParams::TeMultiBand, -1 );   
+  
+  if( inRaster->params().useDummy_ ) {
+    outRaster_params.setDummy( inRaster->params().dummy_[ 0 ], -1 );
+  } else {
+    outRaster_params.setDummy( 0, -1 );
+  }  
+
+  TEAGN_TRUE_OR_RETURN( outRaster->init( outRaster_params ),
+    "Output raster reset error" );    
+
+  /* Creating the temporary rasters with one band each */
+
+  TePDITypes::TePDIRasterPtrType aux_raster1;
+  if( iterations > 1 ) {
+    TEAGN_TRUE_OR_RETURN( TePDIUtils::TeAllocRAMRaster( outRaster, 
+      aux_raster1, 1, true, false, TeDOUBLE ), 
+      "Unable to create auxiliary raster 1" );
+  }
+
+  TePDITypes::TePDIRasterPtrType aux_raster2;
+  if( iterations > 2 ) {
+    TEAGN_TRUE_OR_RETURN( TePDIUtils::TeAllocRAMRaster( outRaster, 
+      aux_raster2, 1, true, false, TeDOUBLE ), 
+      "Unable to create auxiliary raster 2" );
+  }
+
+  /* Updating the global temporary representation of mask weights */
+
+  reset_maskmatrix( mask );
+
+  /* Setting the convolution buffer initial state */
+
+  unsigned int raster_lines = (unsigned int)outRaster->params().nlines_;
+  unsigned int raster_columns = (unsigned int)outRaster->params().ncols_;
+
+  reset_conv_buf( temp_maskmatrix_lines_, raster_columns );
+
+  /* Convolution Loop */
+
+  double output_level; /* the value generated by each pixel mask calcule */
+
+  double min_gen_level; /* The minimal value generated by each mask convolution */
+
+  unsigned int mask_middle_off_lines =
+    (unsigned int) floor( ((double)temp_maskmatrix_lines_) / 2. );
+  unsigned int mask_middle_off_columns =
+    (unsigned int) floor( ((double)temp_maskmatrix_columns_) / 2. );
+
+  unsigned int conv_column_bound = raster_columns - temp_maskmatrix_columns_ + 1;
+  unsigned int conv_line_bound = raster_lines - temp_maskmatrix_lines_ + 1;
+
+  unsigned int mask_line;
+  unsigned int mask_column;
+  unsigned int raster_line;
+  unsigned int conv_buf_column;
+
+  double out_channel_min_level;
+  double out_channel_max_level;
+  
+  double dummy_value = 0;
+  double curr_buf_value = 0;
+  double curr_mask_value = 0;
+
+  TePDITypes::TePDIRasterPtrType source_raster;
+  TePDITypes::TePDIRasterPtrType target_raster;
+
+  StartProgInt( "Erosion", channels.size() * iterations *
+     conv_line_bound );  
+
+  for( unsigned int channels_index = 0 ;
+       channels_index < channels.size() ;
+       ++channels_index ) {
+       
+    unsigned int current_input_channel = channels[ channels_index ];
+    unsigned int curr_out_channel = 0;
+    
+    if( inRaster_uses_dummy ) {
+      dummy_value = inRaster->params().dummy_[ current_input_channel ];
+    }    
+
+    TEAGN_TRUE_OR_RETURN( TePDIUtils::TeGetRasterMinMaxBounds(
+      outRaster, channels_index, out_channel_min_level,
+      out_channel_max_level ), "Unable to get raster channel level bounds" );
+
+    for( int iteration = 0 ; (int)iteration < iterations ; ++iteration ) {
+      if( iteration == 0 ) {
+        /* The first iteration */
+        
+        source_raster = inRaster;
+        current_input_channel = channels[ channels_index ];
+        
+        if( iterations > 1 ) {
+          target_raster = aux_raster1;
+          curr_out_channel = 0;
+        } else {
+          target_raster = outRaster;
+          curr_out_channel = channels[ channels_index ];
+        }
+      } else if ( iteration == ( iterations - 1 ) ) {
+        /* The last iteration */
+        
+        current_input_channel = 0;
+        source_raster = target_raster;
+        
+        target_raster = outRaster;
+        curr_out_channel = channels[ channels_index ];
+      } else {
+        /* The intermediary iteration */
+        
+        if( iteration == 1 ) {
+          source_raster = target_raster;
+          current_input_channel = 0;
+        
+          target_raster = aux_raster1;
+          curr_out_channel = 0;
+        } else {        
+          TePDITypes::TePDIRasterPtrType swap_ptr = source_raster;
+          source_raster = target_raster;
+          current_input_channel = 0;
+            
+          target_raster = swap_ptr;
+          curr_out_channel = 0;
+        }
+      }
+
+      /* Fills the convolution buffer with the first "mask_lines" from the raster */
+
+      for( unsigned int line = 0 ; line < ( temp_maskmatrix_lines_ - 1 ); ++line ) {
+        up_conv_buf( source_raster, line, current_input_channel );
+      }
+
+      /* raster convolution */
+
+      for( raster_line = 0 ; raster_line < conv_line_bound ; ++raster_line ) {
+        /* Getting one more line from the source raster and adding to buffer */
+
+        TEAGN_FALSE_OR_RETURN( UpdateProgInt( ( channels_index * iterations * 
+          conv_line_bound ) +
+          ( iteration * conv_line_bound ) + raster_line ),
+          "Canceled by the user" );
+                  
+        up_conv_buf( source_raster, raster_line + temp_maskmatrix_lines_ - 1,
+          current_input_channel );
+
+        for( conv_buf_column = 0 ; conv_buf_column < conv_column_bound ;
+             ++conv_buf_column ) {
+
+          output_level = 0;
+          
+          if( inRaster_uses_dummy ) {
+            min_gen_level = dummy_value;
+            
+            for( mask_line = 0; mask_line < temp_maskmatrix_lines_ ; 
+              ++mask_line ) {
+              for( mask_column = 0; mask_column < temp_maskmatrix_columns_ ;
+                  ++mask_column ) {
+                  
+                curr_buf_value = conv_buf_[ mask_line ][ conv_buf_column + 
+                  mask_column ];
+                curr_mask_value = temp_maskmatrix_[ mask_line ][ mask_column ];
+                  
+                if( ( curr_buf_value != dummy_value ) &&
+                  ( curr_mask_value != 0 ) ) {
+                  
+                  output_level = curr_buf_value * curr_mask_value;;
+                 
+                  if( min_gen_level == dummy_value ) {
+                    min_gen_level = output_level;
+                  } else {
+                    if( output_level < min_gen_level ) {
+                      min_gen_level = output_level;
+                    }
+                  } 
+                }
+              }
+            }
+          } else {
+            min_gen_level = out_channel_max_level;
+            
+            for( mask_line = 0; mask_line < temp_maskmatrix_lines_ ; 
+              ++mask_line ) {
+              for( mask_column = 0; mask_column < temp_maskmatrix_columns_ ;
+                  ++mask_column ) {
+  
+                output_level = temp_maskmatrix_[ mask_line ][ mask_column ] *
+                  conv_buf_[ mask_line ][ conv_buf_column + mask_column ];
+  
+                if( ( output_level < min_gen_level ) &&
+                    ( temp_maskmatrix_[ mask_line ][ mask_column ] != 0 ) ) {
+  
+                  min_gen_level = output_level;
+                }
+              }
+            }
+          }
+
+          /* Level range filtering */
+
+          if( min_gen_level < out_channel_min_level ) {
+            min_gen_level = out_channel_min_level;
+          } else if( min_gen_level > out_channel_max_level ) {
+            min_gen_level = out_channel_max_level;
+          }
+
+          TEAGN_TRUE_OR_RETURN( target_raster->setElement(
+            conv_buf_column + mask_middle_off_columns,
+            raster_line +  mask_middle_off_lines, min_gen_level, 
+            curr_out_channel ), "Pixel mapping error" );
+        }
+      }
+    }
+  }
+
+  return true;
+}
+
+bool TePDIMorfFilter::RunMedian()
+{
+  TePDITypes::TePDIRasterPtrType inRaster;
+  params_.GetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  params_.GetParameter( "output_image", outRaster );
+
+  std::vector< int > channels;
+  params_.GetParameter( "channels", channels );
+
+  TePDIFilterMask::pointer mask;
+  params_.GetParameter( "filter_mask", mask );
+
+  int iterations = 0;
+  params_.GetParameter( "iterations", iterations );
+  
+  bool inRaster_uses_dummy = inRaster->params().useDummy_;
+
+  /* Setting the output raster */
+
+  TeRasterParams outRaster_params = outRaster->params();
+  
+  outRaster_params.nBands( channels.size() );
+  if( inRaster->projection() != 0 ) {
+    TeSharedPtr< TeProjection > proj( TeProjectionFactory::make( 
+      inRaster->projection()->params() ) );  
+    outRaster_params.projection( proj.nakedPointer() );
+  }
+  outRaster_params.boxResolution( inRaster->params().box().x1(), 
+    inRaster->params().box().y1(), inRaster->params().box().x2(), 
+    inRaster->params().box().y2(), inRaster->params().resx_, 
+    inRaster->params().resy_ );  
+    
+  outRaster_params.setPhotometric( TeRasterParams::TeMultiBand, -1 ); 
+  
+  if( inRaster->params().useDummy_ ) {
+    outRaster_params.setDummy( inRaster->params().dummy_[ 0 ], -1 );
+  } else {
+    outRaster_params.setDummy( 0, -1 );
+  }  
+
+  TEAGN_TRUE_OR_RETURN( outRaster->init( outRaster_params ),
+    "Output raster reset error" );    
+    
+
+  /* Creating the temporary rasters with one band each */
+
+  TePDITypes::TePDIRasterPtrType aux_raster1;
+  if( iterations > 1 ) {
+    TEAGN_TRUE_OR_RETURN( TePDIUtils::TeAllocRAMRaster( outRaster, 
+      aux_raster1, 1, true, false, TeDOUBLE ), 
+      "Unable to create auxiliary raster 1" );
+  }
+
+  TePDITypes::TePDIRasterPtrType aux_raster2;
+  if( iterations > 2 ) {
+    TEAGN_TRUE_OR_RETURN( TePDIUtils::TeAllocRAMRaster( outRaster, 
+      aux_raster2, 1, true, false, TeDOUBLE ), 
+      "Unable to create auxiliary raster 2" );
+  }
+
+  /* Updating the global temporary representation of mask weights */
+
+  reset_maskmatrix( mask );
+
+  /* Setting the convolution buffer initial state */
+
+  unsigned int raster_lines = (unsigned int)outRaster->params().nlines_;
+  unsigned int raster_columns = (unsigned int)outRaster->params().ncols_;
+
+  reset_conv_buf( temp_maskmatrix_lines_, raster_columns );
+
+  /* A vector to store the mask apply results for a given convolution */
+
+  if( double_buffer_ ) {
+    delete[] double_buffer_;
+  }
+
+  double_buffer_ =
+    new double[ temp_maskmatrix_lines_ * temp_maskmatrix_columns_ ];
+
+//  const unsigned int mask_apply_restult_median_pos =
+//    ( temp_maskmatrix_lines_ * temp_maskmatrix_columns_ ) -
+//    (int)ceil( mask->getSum() / 2 );
+
+  /* Bubble sort alg parameters */
+
+//  unsigned int fixed_bubble_end_bound =
+//    ( temp_maskmatrix_lines_ * temp_maskmatrix_columns_ ) - 1;/* not included */
+  unsigned int temp_bubble_bound; // the position before the last valid 
+                                  // element index inside double buf
+  unsigned int bubble_index;
+  double temp_bubble_swap;
+
+  /* Finding mask middle pixel offset */
+
+  unsigned int mask_middle_off_lines =
+    (unsigned int) floor( ((double)temp_maskmatrix_lines_) / 2. );
+  unsigned int mask_middle_off_columns =
+    (unsigned int) floor( ((double)temp_maskmatrix_columns_) / 2. );
+
+  unsigned int conv_column_bound = raster_columns - temp_maskmatrix_columns_ + 1;
+  unsigned int conv_line_bound = raster_lines - temp_maskmatrix_lines_ + 1;
+
+  unsigned int mask_line;
+  unsigned int mask_column;
+  unsigned int raster_line;
+  unsigned int conv_buf_column;
+
+  double out_channel_min_level;
+  double out_channel_max_level;
+  
+  unsigned int next_db_element_index = 0; // next double buffer element index,
+                                          // points to the position after the
+                                          // last valid buffer element.
+  double curr_mask_value = 0;
+  double curr_cb_value = 0; // current convolution buffer value
+  double dummy_value = 0;
+
+  TePDITypes::TePDIRasterPtrType source_raster;
+  TePDITypes::TePDIRasterPtrType target_raster;
+  
+  StartProgInt( "Median", channels.size() * iterations *
+     conv_line_bound );    
+
+  for( unsigned int channels_index = 0 ;
+       channels_index < channels.size() ;
+       ++channels_index ) {
+       
+    unsigned int current_input_channel = channels[ channels_index ];
+    unsigned int curr_out_channel = 0;
+       
+    if( inRaster_uses_dummy ) {
+      dummy_value = inRaster->params().dummy_[ current_input_channel ];
+    }        
+
+    TEAGN_TRUE_OR_RETURN( TePDIUtils::TeGetRasterMinMaxBounds(
+      outRaster, channels_index, out_channel_min_level,
+      out_channel_max_level ), "Unable to get raster channel level bounds" );
+
+    for( int iteration = 0 ; (int)iteration < iterations ; ++iteration ) {
+      if( iteration == 0 ) {
+        /* The first iteration */
+        
+        source_raster = inRaster;
+        current_input_channel = channels[ channels_index ];
+        
+        if( iterations > 1 ) {
+          target_raster = aux_raster1;
+          curr_out_channel = 0;
+        } else {
+          target_raster = outRaster;
+          curr_out_channel = channels[ channels_index ];
+        }
+      } else if ( iteration == ( iterations - 1 ) ) {
+        /* The last iteration */
+        
+        current_input_channel = 0;
+        source_raster = target_raster;
+        
+        target_raster = outRaster;
+        curr_out_channel = channels[ channels_index ];
+      } else {
+        /* The intermediary iteration */
+        
+        if( iteration == 1 ) {
+          source_raster = target_raster;
+          current_input_channel = 0;
+        
+          target_raster = aux_raster1;
+          curr_out_channel = 0;
+        } else {        
+          TePDITypes::TePDIRasterPtrType swap_ptr = source_raster;
+          source_raster = target_raster;
+          current_input_channel = 0;
+            
+          target_raster = swap_ptr;
+          curr_out_channel = 0;
+        }
+      }
+
+      /* Fills the convolution buffer with the first "mask_lines" from the raster */
+
+      for( unsigned int line = 0 ; line < ( temp_maskmatrix_lines_ - 1 ) ; ++line ) {
+        up_conv_buf( source_raster, line, current_input_channel );
+      }
+
+      /* raster convolution */
+
+      for( raster_line = 0 ; raster_line < conv_line_bound ; ++raster_line ) {
+        /* Getting one more line from the source raster and adding to buffer */
+        
+        TEAGN_FALSE_OR_RETURN( UpdateProgInt( ( channels_index * iterations * 
+          conv_line_bound ) +
+          ( iteration * conv_line_bound ) + raster_line ),
+          "Canceled by the user" );
+
+        up_conv_buf( source_raster, raster_line + temp_maskmatrix_lines_ - 1,
+          current_input_channel );
+
+        for( conv_buf_column = 0 ; conv_buf_column < conv_column_bound ;
+             ++conv_buf_column ) {
+
+          /* Finding convolution weights apply result */
+          
+          next_db_element_index = 0;
+          
+          if( inRaster_uses_dummy ) {
+            for( mask_line = 0; mask_line < temp_maskmatrix_lines_ ; ++mask_line ) {
+              for( mask_column = 0; mask_column < temp_maskmatrix_columns_ ;
+                  ++mask_column ) {
+                  
+                curr_mask_value = temp_maskmatrix_[ mask_line ][ mask_column ];
+                curr_cb_value = conv_buf_[ mask_line ][ conv_buf_column + 
+                  mask_column ];
+                  
+                if( ( curr_mask_value != 0 ) && 
+                  ( curr_cb_value != dummy_value ) ) {
+                  
+                  double_buffer_[ next_db_element_index ] =
+                    curr_mask_value * curr_cb_value;
+                    
+                  ++next_db_element_index;
+                }
+              }
+            }
+          } else {
+            for( mask_line = 0; mask_line < temp_maskmatrix_lines_ ; ++mask_line ) {
+              for( mask_column = 0; mask_column < temp_maskmatrix_columns_ ;
+                  ++mask_column ) {
+                  
+                curr_mask_value = temp_maskmatrix_[ mask_line ][ mask_column ];
+                  
+                if( curr_mask_value != 0 ) {
+                  double_buffer_[ next_db_element_index ] =
+                    curr_mask_value *
+                    conv_buf_[ mask_line ][ conv_buf_column + mask_column ];
+                    
+                  ++next_db_element_index;
+                }
+              }
+            }
+          }
+
+          if( next_db_element_index == 0 ) {
+            TEAGN_TRUE_OR_RETURN( target_raster->setElement(
+              conv_buf_column + mask_middle_off_columns,
+              raster_line +  mask_middle_off_lines, dummy_value, 
+              curr_out_channel ), "Pixel mapping error" );           
+          } else if( next_db_element_index == 1 ) {
+            TEAGN_TRUE_OR_RETURN( target_raster->setElement(
+              conv_buf_column + mask_middle_off_columns,
+              raster_line +  mask_middle_off_lines,
+              double_buffer_[ 0 ], curr_out_channel ),
+              "Pixel mapping error" );          
+          } else {
+            /* Sorting the results */
+
+            temp_bubble_bound = next_db_element_index - 1;
+  
+            while( temp_bubble_bound > 0 ) {
+              for( bubble_index = 0 ; bubble_index < temp_bubble_bound ;
+                ++bubble_index ) {
+  
+                if( double_buffer_[ bubble_index ] >
+                    double_buffer_[ bubble_index + 1 ] ) {
+  
+                    temp_bubble_swap = double_buffer_[ bubble_index ];
+                    double_buffer_[ bubble_index ] =
+                      double_buffer_[ bubble_index + 1 ];
+                    double_buffer_[ bubble_index + 1 ] = temp_bubble_swap;
+                }
+              }
+  
+              --temp_bubble_bound;
+            }
+  
+            TEAGN_TRUE_OR_RETURN( target_raster->setElement(
+              conv_buf_column + mask_middle_off_columns,
+              raster_line +  mask_middle_off_lines,
+              double_buffer_[ ( next_db_element_index - 1 ) / 2 ], 
+              curr_out_channel ), "Pixel mapping error" );
+          }
+        }
+      }
+    }
+  }
+
+  return true;
+}
+
+
+bool TePDIMorfFilter::RunMode()
+{
+  TePDITypes::TePDIRasterPtrType inRaster;
+  params_.GetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  params_.GetParameter( "output_image", outRaster );
+
+  std::vector< int > channels;
+  params_.GetParameter( "channels", channels );
+
+  TePDIFilterMask::pointer mask;
+  params_.GetParameter( "filter_mask", mask );
+
+  int iterations = 0;
+  params_.GetParameter( "iterations", iterations );
+  
+  bool inRaster_uses_dummy = inRaster->params().useDummy_;
+
+  /* Setting the output raster */
+
+  TeRasterParams outRaster_params = outRaster->params();
+  
+  outRaster_params.nBands( channels.size() );
+  if( inRaster->projection() != 0 ) {
+    TeSharedPtr< TeProjection > proj( TeProjectionFactory::make( 
+      inRaster->projection()->params() ) );  
+    outRaster_params.projection( proj.nakedPointer() );
+  }
+  outRaster_params.boxResolution( inRaster->params().box().x1(), 
+    inRaster->params().box().y1(), inRaster->params().box().x2(), 
+    inRaster->params().box().y2(), inRaster->params().resx_, 
+    inRaster->params().resy_ );  
+    
+  outRaster_params.setPhotometric( TeRasterParams::TeMultiBand, -1 ); 
+  
+  if( inRaster->params().useDummy_ ) {
+    outRaster_params.setDummy( inRaster->params().dummy_[ 0 ], -1 );
+  } else {
+    outRaster_params.setDummy( 0, -1 );
+  }  
+
+  TEAGN_TRUE_OR_RETURN( outRaster->init( outRaster_params ),
+    "Output raster reset error" );    
+    
+
+  /* Creating the temporary rasters with one band each */
+
+  TePDITypes::TePDIRasterPtrType aux_raster1;
+  if( iterations > 1 ) {
+    TEAGN_TRUE_OR_RETURN( TePDIUtils::TeAllocRAMRaster( outRaster, 
+      aux_raster1, 1, true, false, TeDOUBLE ), 
+      "Unable to create auxiliary raster 1" );
+  }
+
+  TePDITypes::TePDIRasterPtrType aux_raster2;
+  if( iterations > 2 ) {
+    TEAGN_TRUE_OR_RETURN( TePDIUtils::TeAllocRAMRaster( outRaster, 
+      aux_raster2, 1, true, false, TeDOUBLE ), 
+      "Unable to create auxiliary raster 2" );
+  }
+
+  /* Updating the global temporary representation of mask weights */
+
+  reset_maskmatrix( mask );
+
+  /* Setting the convolution buffer initial state */
+
+  unsigned int raster_lines = (unsigned int)outRaster->params().nlines_;
+  unsigned int raster_columns = (unsigned int)outRaster->params().ncols_;
+
+  reset_conv_buf( temp_maskmatrix_lines_, raster_columns );
+
+  /* Bubble sort alg parameters */
+
+  std::map< double, unsigned int > freqmap;
+  std::map< double, unsigned int >::iterator freqmap_it;
+  std::map< double, unsigned int >::iterator freqmap_it_end;
+  double freqmap_highest_freq_value = 0;
+  unsigned int freqmap_highest_freq = 0;
+
+  /* Finding mask middle pixel offset */
+
+  unsigned int mask_middle_off_lines =
+    (unsigned int) floor( ((double)temp_maskmatrix_lines_) / 2. );
+  unsigned int mask_middle_off_columns =
+    (unsigned int) floor( ((double)temp_maskmatrix_columns_) / 2. );
+
+  unsigned int conv_column_bound = raster_columns - temp_maskmatrix_columns_ + 1;
+  unsigned int conv_line_bound = raster_lines - temp_maskmatrix_lines_ + 1;
+
+  unsigned int mask_line = 0;
+  unsigned int mask_column = 0;
+  unsigned int raster_line = 0;
+  unsigned int raster_col = 0;
+  unsigned int conv_buf_column = 0;
+
+  double out_channel_min_level = 0;
+  double out_channel_max_level = 0;
+  
+//  unsigned int next_db_element_index = 0; // next double buffer element index,
+                                          // points to the position after the
+                                          // last valid buffer element.
+//  double curr_mask_value = 0;
+//  double curr_cb_value = 0; // current convolution buffer value
+  double dummy_value = 0;
+  double pixel_value = 0;
+  double mask_apply_result = 0.0;
+
+  TePDITypes::TePDIRasterPtrType source_raster;
+  TePDITypes::TePDIRasterPtrType target_raster;
+  
+  StartProgInt( "Mede", channels.size() * iterations *
+     conv_line_bound );    
+
+  for( unsigned int channels_index = 0 ;
+       channels_index < channels.size() ;
+       ++channels_index ) {
+       
+    unsigned int current_input_channel = channels[ channels_index ];
+    unsigned int curr_out_channel = 0;
+       
+    if( inRaster_uses_dummy ) {
+      dummy_value = inRaster->params().dummy_[ current_input_channel ];
+    }
+    else
+    {
+      dummy_value = 0;
+    }
+
+    TEAGN_TRUE_OR_RETURN( TePDIUtils::TeGetRasterMinMaxBounds(
+      outRaster, channels_index, out_channel_min_level,
+      out_channel_max_level ), 
+      "Unable to get raster channel level bounds" );
+
+    for( int iteration = 0 ; (int)iteration < iterations ; 
+      ++iteration ) 
+    {
+      if( iteration == 0 ) {
+        /* The first iteration */
+        
+        source_raster = inRaster;
+        current_input_channel = channels[ channels_index ];
+        
+        if( iterations > 1 ) {
+          target_raster = aux_raster1;
+          curr_out_channel = 0;
+        } else {
+          target_raster = outRaster;
+          curr_out_channel = channels[ channels_index ];
+        }
+      } else if ( iteration == ( iterations - 1 ) ) {
+        /* The last iteration */
+        
+        current_input_channel = 0;
+        source_raster = target_raster;
+        
+        target_raster = outRaster;
+        curr_out_channel = channels[ channels_index ];
+      } else {
+        /* The intermediary iteration */
+        
+        if( iteration == 1 ) {
+          source_raster = target_raster;
+          current_input_channel = 0;
+        
+          target_raster = aux_raster1;
+          curr_out_channel = 0;
+        } else {        
+          TePDITypes::TePDIRasterPtrType swap_ptr = source_raster;
+          source_raster = target_raster;
+          current_input_channel = 0;
+            
+          target_raster = swap_ptr;
+          curr_out_channel = 0;
+        }
+      }
+      
+      /* Copying the first and the last cols image pixels */
+      
+      for( raster_line = 0 ; raster_line < raster_lines ; 
+        ++raster_line ) 
+      {
+        if( source_raster->getElement( 0, raster_line, pixel_value,
+          current_input_channel ) )
+        {
+          TEAGN_TRUE_OR_RETURN( target_raster->setElement(
+            0, raster_line, pixel_value, curr_out_channel ), 
+            "Pixel writing error" );        
+        }
+        else
+        {
+          TEAGN_TRUE_OR_RETURN( target_raster->setElement(
+            0, raster_line, dummy_value, curr_out_channel ), 
+            "Pixel writing error" );        
+        }
+        
+        if( source_raster->getElement( raster_columns - 1, 
+          raster_line, pixel_value,
+          current_input_channel ) )
+        {
+          TEAGN_TRUE_OR_RETURN( target_raster->setElement(
+            raster_columns - 1, raster_line, pixel_value, 
+            curr_out_channel ), 
+            "Pixel writing error" );        
+        }
+        else
+        {
+          TEAGN_TRUE_OR_RETURN( target_raster->setElement(
+            raster_columns - 1, raster_line, dummy_value, 
+            curr_out_channel ), 
+            "Pixel writing error" );        
+        }        
+      }      
+      
+      /* Copying the first and the last line image pixels */
+      
+      for( raster_col = 0 ; raster_col < raster_columns ; 
+        ++raster_col ) 
+      {
+        if( source_raster->getElement( raster_col, 0, pixel_value,
+          current_input_channel ) )
+        {
+          TEAGN_TRUE_OR_RETURN( target_raster->setElement(
+            raster_col, 0, pixel_value, curr_out_channel ), 
+            "Pixel writing error" );        
+        }
+        else
+        {
+          TEAGN_TRUE_OR_RETURN( target_raster->setElement(
+            raster_col, 0, dummy_value, curr_out_channel ), 
+            "Pixel writing error" );        
+        }
+        
+        if( source_raster->getElement( raster_col, 
+          raster_lines - 1, pixel_value,
+          current_input_channel ) )
+        {
+          TEAGN_TRUE_OR_RETURN( target_raster->setElement(
+            raster_col, raster_lines - 1, pixel_value, 
+            curr_out_channel ), 
+            "Pixel writing error" );        
+        }
+        else
+        {
+          TEAGN_TRUE_OR_RETURN( target_raster->setElement(
+            raster_col, raster_lines - 1, dummy_value, 
+            curr_out_channel ), 
+            "Pixel writing error" );        
+        }        
+      }       
+
+      /* Fills the convolution buffer with the first "mask_lines" from the raster */
+
+      for( unsigned int line = 0 ; line < ( temp_maskmatrix_lines_ - 1 ) ; ++line ) {
+        up_conv_buf( source_raster, line, current_input_channel );
+      }
+      
+      /* raster convolution */
+
+      for( raster_line = 0 ; raster_line < conv_line_bound ; 
+        ++raster_line ) 
+      {
+        /* Getting one more line from the source raster and adding to buffer */
+        
+        TEAGN_FALSE_OR_RETURN( UpdateProgInt( 
+          ( channels_index * iterations * 
+          conv_line_bound ) +
+          ( iteration * conv_line_bound ) + raster_line ),
+          "Canceled by the user" );
+
+        up_conv_buf( source_raster, raster_line + temp_maskmatrix_lines_ - 1,
+          current_input_channel );
+
+        for( conv_buf_column = 0 ; conv_buf_column < 
+          conv_column_bound ; ++conv_buf_column ) 
+        {
+          freqmap.clear();
+          
+          /* Finding convolution weights apply result */
+          
+          if( inRaster_uses_dummy ) {
+            for( mask_line = 0; mask_line < temp_maskmatrix_lines_ ; ++mask_line ) {
+              for( mask_column = 0; mask_column < temp_maskmatrix_columns_ ;
+                  ++mask_column ) {
+                  
+                const double& curr_mask_value = 
+                  temp_maskmatrix_[ mask_line ][ mask_column ];
+                const double& curr_cb_value = 
+                  conv_buf_[ mask_line ][ conv_buf_column + 
+                  mask_column ];
+                
+                  
+                if( ( curr_mask_value != 0 ) && 
+                  ( curr_cb_value != dummy_value ) ) {
+                  
+                  mask_apply_result = curr_mask_value *
+                    curr_cb_value;
+                    
+                  freqmap[ mask_apply_result ] += 1;
+                }
+              }
+            }
+          } else {
+            for( mask_line = 0; mask_line < temp_maskmatrix_lines_ ; ++mask_line ) {
+              for( mask_column = 0; mask_column < temp_maskmatrix_columns_ ;
+                  ++mask_column ) {
+                  
+                const double& curr_mask_value = 
+                  temp_maskmatrix_[ mask_line ][ mask_column ];
+                  
+                if( curr_mask_value != 0 ) {
+                  freqmap[ conv_buf_[ mask_line ][ 
+                    conv_buf_column + mask_column ] ] += 1;
+                }
+              }
+            }
+          }
+
+          if( freqmap.size() == 0 ) {
+            TEAGN_TRUE_OR_RETURN( target_raster->setElement(
+              conv_buf_column + mask_middle_off_columns,
+              raster_line +  mask_middle_off_lines, dummy_value, 
+              curr_out_channel ), "Pixel mapping error" );           
+          } 
+          else 
+          {
+            /* Finding the high frequency value */
+            freqmap_highest_freq = 0;
+            freqmap_it = freqmap.begin();
+            freqmap_it_end = freqmap.end();
+            
+            while( freqmap_it != freqmap_it_end )
+            {
+              if( freqmap_it->second > freqmap_highest_freq )
+              {
+                freqmap_highest_freq = freqmap_it->second;
+                freqmap_highest_freq_value = freqmap_it->first;
+              }
+            
+              ++freqmap_it;
+            }
+            
+            TEAGN_TRUE_OR_RETURN( target_raster->setElement(
+              conv_buf_column + mask_middle_off_columns,
+              raster_line +  mask_middle_off_lines,
+              freqmap_highest_freq_value, curr_out_channel ),
+              "Pixel mapping error" );          
+          }
+        }
+      }
+    }
+  }
+
+  return true;
+}
+
+
+void TePDIMorfFilter::ResetState( const TePDIParameters& params )
+{
+  TePDIBufferedFilter::ResetState( params );
+
+  if( double_buffer_ ) {
+    delete[] double_buffer_;
+    double_buffer_ = 0;
+  }
+}
+
+
diff --git a/src/terralib/image_processing/TePDIMorfFilter.hpp b/src/terralib/image_processing/TePDIMorfFilter.hpp
new file mode 100755
index 0000000..622662a
--- /dev/null
+++ b/src/terralib/image_processing/TePDIMorfFilter.hpp
@@ -0,0 +1,138 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIMORFFILTER_HPP
+  #define TEPDIMORFFILTER_HPP
+
+  #include "TePDIBufferedFilter.hpp"
+  #include "TePDIParameters.hpp"
+  #include <TeSharedPtr.h>
+
+  /**
+   * @brief This is the class for morfological filter.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup TePDIFiltersGroup
+   *
+   * @note The general required parameters are:
+   *
+   * @param filter_type ( TePDIMorfType ),
+   * @param input_image (TePDITypes::TePDIRasterPtrType),
+   * @param output_image (TePDITypes::TePDIRasterPtrType),
+   * @param channels (std::vector<int>) - input_image Band(s) to process.
+   * @param iterations (int) - Iterations number.
+   * @param filter_mask ( TePDIFilterMask::pointer ) Morfological filter mask.
+   */
+  class PDI_DLL TePDIMorfFilter : public TePDIBufferedFilter {
+    public :
+
+      /** @enum Morfological filters types */
+      enum TePDIMorfType{
+        /** @brief Dilation */
+        TePDIMDilationType = 1,
+        /** @brief Erosion */
+        TePDIMErosionType = 2,
+        /** @brief Median */        
+        TePDIMMedianType = 3,
+        /** @brief Mode */        
+        TePDIMModeType = 4
+      };
+
+      /**
+       * @brief Default Constructor.
+       *
+       */
+      TePDIMorfFilter();
+
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIMorfFilter();
+
+      /**
+       * @brief Checks if the supplied parameters fits the requirements of each
+       * PDI algorithm implementation.
+       *
+       * @note Error log messages must be generated. No exceptions generated.
+       *
+       * @param parameters The parameters to be checked.
+       * @return true if the parameters are OK. false if not.
+       */
+      bool CheckParameters( const TePDIParameters& parameters ) const;
+
+    protected :
+      /**
+       * @brief A buffer to store temporary double values.
+       *
+       */
+      double* double_buffer_;
+
+      /**
+       * @brief Runs the current algorithm implementation.
+       *
+       * @return true if OK. false on error.
+       */
+      bool RunImplementation();
+
+      /**
+       * @brief Runs the dilation algorithm implementation.
+       *
+       * @return true if OK. false on error.
+       */
+      bool RunDilation();
+
+      /**
+       * @brief Runs the erosion algorithm implementation.
+       *
+       * @return true if OK. false on error.
+       */
+      bool RunErosion();
+
+      /**
+       * @brief Runs the median algorithm implementation.
+       *
+       * @return true if OK. false on error.
+       */
+      bool RunMedian();
+      
+      /**
+       * @brief Runs the mode algorithm implementation.
+       *
+       * @return true if OK. false on error.
+       */
+      bool RunMode();      
+
+      /**
+       * @brief Reset the internal state to the initial state.
+       *
+       * @param params The new parameters referente at initial state.
+       */
+      void ResetState( const TePDIParameters& params );
+
+  };
+
+/** @example TePDIMorfFilter_test.cpp
+ *    Shows how to use this class.
+ */  
+   
+#endif //TEPDIMORFFILTER_HPP
diff --git a/src/terralib/image_processing/TePDIMorfFilterFactory.cpp b/src/terralib/image_processing/TePDIMorfFilterFactory.cpp
new file mode 100755
index 0000000..908e935
--- /dev/null
+++ b/src/terralib/image_processing/TePDIMorfFilterFactory.cpp
@@ -0,0 +1,24 @@
+ 
+#include "TePDIMorfFilterFactory.hpp"
+#include "TePDIMorfFilter.hpp"
+#include <TeAgnostic.h>
+
+TePDIMorfFilterFactory::TePDIMorfFilterFactory()
+: TePDIAlgorithmFactory( std::string( "TePDIMorfFilter" ) )
+{
+};      
+
+TePDIMorfFilterFactory::~TePDIMorfFilterFactory()
+{
+};
+
+
+TePDIAlgorithm* TePDIMorfFilterFactory::build ( const TePDIParameters& arg )
+{
+  TePDIAlgorithm* instance_ptr = new TePDIMorfFilter();
+  
+  TEAGN_TRUE_OR_THROW( instance_ptr->Reset( arg ),
+    "Invalid parameters" );
+  
+  return instance_ptr;
+}
diff --git a/src/terralib/image_processing/TePDIMorfFilterFactory.hpp b/src/terralib/image_processing/TePDIMorfFilterFactory.hpp
new file mode 100755
index 0000000..41d467e
--- /dev/null
+++ b/src/terralib/image_processing/TePDIMorfFilterFactory.hpp
@@ -0,0 +1,67 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIMORFFILTERFACTORY_HPP
+  #define TEPDIMORFFILTERFACTORY_HPP
+
+  #include <TeSharedPtr.h>
+  #include "TePDIAlgorithmFactory.hpp"
+  #include "TePDIParameters.hpp"
+  
+  /**
+   * @brief This is the class for morfological filters algorithms factory.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIAlgorithmsFactories
+   */
+  class PDI_DLL TePDIMorfFilterFactory : public TePDIAlgorithmFactory
+  {
+    public :
+      
+      /**
+       * @brief Default constructor
+       */
+      TePDIMorfFilterFactory();      
+      
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIMorfFilterFactory();
+      
+      protected :  
+      /**
+       * @brief Implementation for the abstract TeFactory::build.
+       *
+       * @param arg A const reference to the parameters used by the
+       * algorithm.
+       * @return A pointer to the new generated algorithm instance.
+       */
+      TePDIAlgorithm* build( const TePDIParameters& arg );
+      
+  };
+
+  namespace {
+    static TePDIMorfFilterFactory TePDIMorfFilterFactory_instance;
+  };  
+  
+#endif
diff --git a/src/terralib/image_processing/TePDIMtxDoubleAdpt.hpp b/src/terralib/image_processing/TePDIMtxDoubleAdpt.hpp
new file mode 100644
index 0000000..e154024
--- /dev/null
+++ b/src/terralib/image_processing/TePDIMtxDoubleAdpt.hpp
@@ -0,0 +1,140 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIMTXDOUBLEADPT_HPP
+  #define TEPDIMTXDOUBLEADPT_HPP
+
+  #include "TePDIMatrix.hpp"
+
+  /*!
+    \brief Matrix double adapter interface.
+    \author Emiliano F. Castejon <castejon at dpi.inpe.br>
+    \ingroup PDIAux
+   */
+  class TePDIMtxDoubleAdptInt
+  {
+    public :
+      
+      virtual ~TePDIMtxDoubleAdptInt() {};
+    
+      /*! \brief Read values from the internal representation converting
+       * to double.
+       * \param lin Line.
+       * \param col Column.
+       * \param value The readed value. 
+       */
+      virtual void getValue( const unsigned int& lin, 
+        const unsigned int col, double& value ) const = 0;
+      
+      /*! \brief Write double values converting to the internal 
+       * representation.
+       * \param lin Line.
+       * \param col Column.
+       * \param value The value to write. 
+       */
+      virtual void setValue( const unsigned int& lin, 
+        const unsigned int col, const double& value ) = 0;
+      
+      /*! \brief Reallocate memory following the internal memory 
+       * policy.
+       * \param lines The new lines number.
+       * \param columns The new columns number.
+       * \return true if OK. 
+       */
+      virtual bool reset( unsigned int lines = 0, 
+         unsigned int columns = 0 ) = 0;
+      
+      /*! Return the number of matrix lines.
+       * \return The number of Matrix lines.
+       */
+      virtual unsigned int getNLines() const = 0;
+      
+      /*! Return the number of matrix columns.
+       * \return The number of Matrix columns.
+       */
+      virtual unsigned int getNCols() const = 0;      
+      
+    protected :
+      
+      TePDIMtxDoubleAdptInt() {};
+      TePDIMtxDoubleAdptInt( const TePDIMtxDoubleAdptInt& ) {};
+  };
+  
+  /*!
+    \brief Matrix double adapter.
+    \author Emiliano F. Castejon <castejon at dpi.inpe.br>
+    \ingroup PDIAux
+   */
+  template< class T >
+  class TePDIMtxDoubleAdpt : public TePDIMatrix< T >,
+    public TePDIMtxDoubleAdptInt
+  {
+    public :
+      
+      /*! Forward declaration for memory policy */
+      typedef typename TePDIMatrix< T >::MemoryPolicy MemoryPolicy;
+      
+      TePDIMtxDoubleAdpt() {};
+      
+      TePDIMtxDoubleAdpt( MemoryPolicy mp ) 
+      : TePDIMatrix< T >( mp ) 
+      {};
+      
+      ~TePDIMtxDoubleAdpt() {};
+
+      // Overloaded.
+      inline void getValue( const unsigned int& lin, 
+        const unsigned int col, double& value ) const
+      {
+        value = (double)( TePDIMatrix< T >::scanLine( lin )[ col ] );
+      };
+      
+      // Overloaded.
+      inline void setValue( const unsigned int& lin, 
+        const unsigned int col, const double& value )
+      {
+        ( TePDIMatrix< T >::scanLine( lin )[ col ] ) = (T)value;  
+      };
+      
+      // Overloaded.
+      inline bool reset( unsigned int lines = 0, 
+        unsigned int columns = 0 )
+      {
+        return TePDIMatrix< T >::Reset( lines, columns );
+      };
+      
+      // Overloaded
+      inline unsigned int getNLines() const
+      {
+        return TePDIMatrix< T >::GetLines();
+      };
+      
+      // Overloaded
+      inline unsigned int getNCols() const
+      {
+        return TePDIMatrix< T >::GetColumns();          
+      };
+  };
+
+#endif
diff --git a/src/terralib/image_processing/TePDINoBlendSF.cpp b/src/terralib/image_processing/TePDINoBlendSF.cpp
new file mode 100755
index 0000000..a50c878
--- /dev/null
+++ b/src/terralib/image_processing/TePDINoBlendSF.cpp
@@ -0,0 +1,20 @@
+#include "TePDINoBlendSF.hpp"
+#include "TePDINoBlendStrategy.hpp"
+
+TePDINoBlendSF::TePDINoBlendSF()
+: TePDIBlendStratFactory( std::string( "no_blending" ) )
+{
+};      
+
+TePDINoBlendSF::~TePDINoBlendSF()
+{
+};
+
+
+TePDIBlendingStrategy* TePDINoBlendSF::build ( const TePDIParameters& )
+{
+  TePDIBlendingStrategy* instance_ptr = new TePDINoBlendStrategy();
+  
+  return instance_ptr;
+}
+
diff --git a/src/terralib/image_processing/TePDINoBlendSF.hpp b/src/terralib/image_processing/TePDINoBlendSF.hpp
new file mode 100755
index 0000000..f4b84de
--- /dev/null
+++ b/src/terralib/image_processing/TePDINoBlendSF.hpp
@@ -0,0 +1,67 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDINOBLENDSF_HPP
+  #define TEPDINOBLENDSF_HPP
+
+  #include <TePDIBlendStratFactory.hpp>
+  
+  /**
+   * @brief This is the class for no blending factory.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIStrategiesFactories
+   */
+  class PDI_DLL TePDINoBlendSF : public TePDIBlendStratFactory
+  {
+    public :
+      
+      /**
+       * @brief Default constructor
+       */
+      TePDINoBlendSF();      
+      
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDINoBlendSF();
+      
+    protected :  
+      /**
+       * @brief Implementation for the abstract TeFactory::build.
+       *
+       * @param arg A const reference to the parameters used by the
+       * algorithm.
+       * @return A pointer to the new generated strategy instance.
+       */
+      TePDIBlendingStrategy* build( const TePDIParameters& arg );
+      
+  };
+
+  namespace
+  {  
+    static TePDINoBlendSF TePDINoBlendSF_instance;
+  };
+
+#endif
+
diff --git a/src/terralib/image_processing/TePDINoBlendStrategy.cpp b/src/terralib/image_processing/TePDINoBlendStrategy.cpp
new file mode 100755
index 0000000..9d5c761
--- /dev/null
+++ b/src/terralib/image_processing/TePDINoBlendStrategy.cpp
@@ -0,0 +1,265 @@
+ 
+#include "TePDINoBlendStrategy.hpp"
+#include "TePDIBlending.hpp"
+#include "TePDIUtils.hpp"
+#include "TePDIStrategyFactory.hpp"
+#include "TePDIPIManager.hpp"
+#include <TeAgnostic.h>
+
+#include <TeBox.h>
+#include <TeUtils.h>
+#include <TeOverlay.h>
+
+TePDINoBlendStrategy::TePDINoBlendStrategy()
+{
+};      
+
+TePDINoBlendStrategy::~TePDINoBlendStrategy()
+{
+};
+
+
+bool TePDINoBlendStrategy::CheckParameters( 
+  const TePDIParameters& parameters ) const
+{
+  /* Checking input_raster1 */
+  
+  TePDITypes::TePDIRasterPtrType input_raster1;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "input_raster1", 
+    input_raster1 ),
+    "Missing parameter: input_raster1" );
+  TEAGN_TRUE_OR_RETURN( input_raster1.isActive(),
+    "Invalid parameter: input_raster1 inactive" );
+  TEAGN_TRUE_OR_RETURN( input_raster1->params().status_ != 
+    TeRasterParams::TeNotReady, "Invalid parameter: input_raster1 not ready" );    
+    
+  /* Checking input_raster2 */
+  
+  TePDITypes::TePDIRasterPtrType input_raster2;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "input_raster2", 
+    input_raster2 ),
+    "Missing parameter: input_raster2" );
+  TEAGN_TRUE_OR_RETURN( input_raster2.isActive(),
+    "Invalid parameter: input_raster2 inactive" );
+  TEAGN_TRUE_OR_RETURN( input_raster2->params().status_ != 
+    TeRasterParams::TeNotReady, "Invalid parameter: input_raster2 not ready" );    
+    
+  /* Checking output_raster */
+  
+  TePDITypes::TePDIRasterPtrType output_raster;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "output_raster", 
+    output_raster ),
+    "Missing parameter: output_raster" );
+  TEAGN_TRUE_OR_RETURN( output_raster.isActive(),
+    "Invalid parameter: output_raster inactive" );
+  TEAGN_TRUE_OR_RETURN( output_raster->params().status_ != 
+    TeRasterParams::TeNotReady, "Invalid parameter: output_raster not ready" );    
+    
+  /* channels1 parameter checking */
+
+  std::vector< int > channels1;
+  TEAGN_TRUE_OR_RETURN( 
+    parameters.GetParameter( "channels1", channels1 ), 
+    "Missing parameter: channels1" );
+  for( unsigned int channels1_index = 0 ; 
+    channels1_index < channels1.size() ; 
+    ++channels1_index ) {
+    
+    TEAGN_TRUE_OR_RETURN( ( channels1[ channels1_index ] >= 0 ) &&
+      ( channels1[ channels1_index ] < input_raster1->nBands() ),
+      "Invalid parameter: channels1" );
+  }
+  
+  /* channels2 parameter checking */
+
+  std::vector< int > channels2;
+  TEAGN_TRUE_OR_RETURN( 
+    parameters.GetParameter( "channels2", channels2 ), 
+    "Missing parameter: channels2" );
+  TEAGN_TRUE_OR_RETURN( ( channels2.size() == channels1.size() ),
+    "Size mismatch between channels1 and channels2" );
+  for( unsigned int channels2_index = 0 ; 
+    channels2_index < channels2.size() ; 
+    ++channels2_index ) {
+    
+    TEAGN_TRUE_OR_RETURN( ( channels2[ channels2_index ] >= 0 ) &&
+      ( channels2[ channels2_index ] < input_raster2->nBands() ),
+      "Invalid parameter: channels2" );
+  }       
+    
+  /* Checking raster polygons */
+  
+  TePDITypes::TePDIPolygonPtrType raster1_pol_ptr;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "raster1_pol_ptr", 
+    raster1_pol_ptr ), "Missing parameter : raster1_pol_ptr" );
+  TEAGN_TRUE_OR_RETURN( raster1_pol_ptr.isActive(),
+    "Invalid parameter : raster1_pol_ptr" )
+  TEAGN_TRUE_OR_RETURN(
+    ( ! input_raster1->begin( *raster1_pol_ptr, TeBoxPixelIn, 
+    0 ).end() ), "Invalid parameter : raster1_pol_ptr" )
+  TEAGN_TRUE_OR_RETURN( ( raster1_pol_ptr->size() == 1 ),
+    "Invalid parameter : raster1_pol_ptr" )
+    
+  TePDITypes::TePDIPolygonPtrType raster2_pol_ptr;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "raster2_pol_ptr", 
+    raster2_pol_ptr ), "Missing parameter : raster2_pol_ptr" );
+  TEAGN_TRUE_OR_RETURN( raster2_pol_ptr.isActive(),
+    "Invalid parameter : raster2_pol_ptr" )
+  TEAGN_TRUE_OR_RETURN(
+    ( ! input_raster2->begin( *raster2_pol_ptr, TeBoxPixelIn, 
+    0 ).end() ), "Invalid parameter : raster2_pol_ptr" )
+  TEAGN_TRUE_OR_RETURN( ( raster2_pol_ptr->size() == 1 ),
+    "Invalid parameter : raster2_pol_ptr" )
+    
+  /* Checking raster2 polygon offsets */
+  
+  double raster2_pol_offset_x = 0;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "raster2_pol_offset_x", 
+    raster2_pol_offset_x ), "Missing parameter : raster2_pol_offset_x" );  
+
+  double raster2_pol_offset_y = 0;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "raster2_pol_offset_y", 
+    raster2_pol_offset_y ), "Missing parameter : raster2_pol_offset_y" );    
+    
+  return true;
+}
+
+
+bool TePDINoBlendStrategy::Implementation( const TePDIParameters& params )
+{
+  /* Extracting parameters */
+
+  TePDITypes::TePDIRasterPtrType input_raster1;
+  params.GetParameter( "input_raster1", input_raster1 );
+  TeRaster& input_raster1_ref = *( input_raster1.nakedPointer() );
+
+  TePDITypes::TePDIRasterPtrType input_raster2;
+  params.GetParameter( "input_raster2", input_raster2 );
+  TeRaster& input_raster2_ref = *( input_raster2.nakedPointer() );
+
+  TePDITypes::TePDIRasterPtrType output_raster;
+  params.GetParameter( "output_raster", output_raster );
+  TeRaster& output_raster_ref = *( output_raster.nakedPointer() );
+  
+  std::vector< int > channels1;
+  params.GetParameter( "channels1", channels1 );
+
+  std::vector< int > channels2;
+  params.GetParameter( "channels2", channels2 ); 
+ 
+  /* Dummy definition */
+  
+  const bool no_force_dummy = ! params.CheckParameter< double >( "dummy_value" );
+  double forced_dummy_value = 0;
+  if( ! no_force_dummy ) {
+    params.GetParameter( "dummy_value", forced_dummy_value );
+  }    
+  
+  /* Calculating intersecion polygons data */
+  
+  TePolygon new_raster1_polygon;
+  TePolygon new_raster2_polygon;
+  TePolygon int_pol_refout;
+  TePolygon int_pol_ref2;
+  double raster1_rel_index_offset_x = 0;
+  double raster1_rel_index_offset_y = 0;
+  double raster2_rel_index_offset_x = 0;
+  double raster2_rel_index_offset_y = 0;
+  short pols_relation = 0;
+
+  TEAGN_TRUE_OR_RETURN( TePDIBlending::extractPolygons( params, 
+    new_raster1_polygon, new_raster2_polygon, int_pol_refout, int_pol_ref2,
+    pols_relation,
+    raster1_rel_index_offset_x, raster1_rel_index_offset_y,
+    raster2_rel_index_offset_x, raster2_rel_index_offset_y ),
+    "Error extracting intersection polygons" );
+  
+  /* Global vars */
+  
+  TeRaster::iteratorPoly intersection_refout_it =
+    output_raster->begin( int_pol_refout, TeBoxPixelIn, 0 );
+  TEAGN_TRUE_OR_RETURN( ( ! intersection_refout_it.end() ), 
+    "Unable to create an iterator over raster2 area" );       
+  
+  TePDIPIManager progress( "Rendering intersection...", 
+    intersection_refout_it.nLinesInPoly() * channels1.size(),
+    progress_interface_enabled_ );
+    
+  /* Rendering intersection */
+  
+  int raster1_offset_x = TeRound( raster1_rel_index_offset_x );
+  int raster1_offset_y = TeRound( raster1_rel_index_offset_y );    
+  int raster2_offset_x = TeRound( raster2_rel_index_offset_x );
+  int raster2_offset_y = TeRound( raster2_rel_index_offset_y );    
+  
+  for( unsigned int channels_index = 0 ; channels_index < channels1.size() ;
+    ++channels_index ) {
+    
+    const unsigned int channel1 = channels1[ channels_index ];
+    const unsigned int channel2 = channels2[ channels_index ];  
+  
+    unsigned int curr_line = 0;
+    unsigned int curr_col = 0;
+    unsigned int last_line = 0; 
+    
+    double value = 0;
+    
+    intersection_refout_it =
+      output_raster->begin( int_pol_refout, TeBoxPixelIn, 0 );
+  
+    while( ! intersection_refout_it.end() ) {
+      curr_line = intersection_refout_it.currentLine();
+      curr_col = intersection_refout_it.currentColumn();
+            
+      if( input_raster2_ref.getElement( curr_col + raster2_offset_x, 
+        curr_line + raster2_offset_y, value, channel2 ) ) {
+        
+        if( no_force_dummy || ( value != forced_dummy_value ) ) {
+          TEAGN_TRUE_OR_RETURN( 
+              output_raster_ref.setElement( curr_col, curr_line, value, 
+              channels_index ),
+              "Unable to write to output raster at line=" + 
+              Te2String( curr_line ) + 
+              " col=" + Te2String( curr_col ) );          
+        } else {
+          if( input_raster1_ref.getElement( curr_col + raster1_offset_x, 
+            curr_line + raster1_offset_y, value, channel1 ) ) {
+            
+            if( no_force_dummy || ( value != forced_dummy_value ) ) {
+              TEAGN_TRUE_OR_RETURN( 
+                output_raster_ref.setElement( curr_col, curr_line, value, 
+                channels_index ),
+                "Unable to write to output raster at line=" + 
+                Te2String( curr_line ) + 
+                " col=" + Te2String( curr_col ) );            
+            }
+          }     
+        }
+      } else {
+        if( input_raster1_ref.getElement( curr_col + raster1_offset_x, 
+          curr_line + raster1_offset_y, value, channel1 ) ) {
+          
+          if( no_force_dummy || ( value != forced_dummy_value ) ) {
+            TEAGN_TRUE_OR_RETURN( 
+              output_raster_ref.setElement( curr_col, curr_line, value, 
+              channels_index ),
+              "Unable to write to output raster at line=" + 
+              Te2String( curr_line ) + 
+              " col=" + Te2String( curr_col ) );            
+          }
+        }
+      }
+      
+      if( curr_line != last_line ) {
+        last_line = curr_line;
+        progress.Increment();
+      }      
+    
+      ++intersection_refout_it;
+    }
+  }
+  
+  return true;
+}
+
+
diff --git a/src/terralib/image_processing/TePDINoBlendStrategy.hpp b/src/terralib/image_processing/TePDINoBlendStrategy.hpp
new file mode 100755
index 0000000..d92a0f4
--- /dev/null
+++ b/src/terralib/image_processing/TePDINoBlendStrategy.hpp
@@ -0,0 +1,116 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDINOBLENDSTRATEGY_HPP
+  #define TEPDINOBLENDSTRATEGY_HPP
+
+  #include <TeSharedPtr.h>
+  #include "TePDIBlendingStrategy.hpp"
+  #include "TePDIParameters.hpp"
+  
+  #include <string>
+
+  /**
+   * @brief This is the class for no blending strategy.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIBlendingStrategies
+   *
+   * @note The required parameters are:
+   * @param input_raster1 ( TePDITypes::TePDIRasterPtrType ) - 
+   *  Input raster 1.
+   * @param input_raster2 ( TePDITypes::TePDIRasterPtrType ) - 
+   *  Input raster 2.
+   * @param output_raster ( TePDITypes::TePDIRasterPtrType ) - Output raster.
+   * @param channels1 ( std::vector< int > ) - The channels to process from 
+   * input_raster1.
+   * @param channels2 ( std::vector< int > ) - The channels to process from 
+   * input_raster2.
+   * Raster 1 polygon pointer ( related to
+   * input_raster1 world reference - Just 1 linear ring allowed ).
+   * @param raster2_pol_ptr ( TePDITypes::TePDIPolygonPtrType ) - 
+   * Raster 2 polygon pointer ( related to 
+   * input_raster2 world reference - Just 1 linear ring allowed ).
+   * @param raster2_pol_offset_x ( double ) - Raster 2 polygon box X offset 
+   * related to raster1 polygon box in input_raster1 matricial reference
+   * ( offset_x = pol2_x - pol1_x ).
+   * @param raster2_pol_offset_y ( double ) - Raster 2 polygon box Y offset 
+   * related to raster1 polygon box in input_raster1 matricial reference
+   * ( offset_y = pol2_y - pol1_y ). 
+   *
+   * @note The optional parameters are:
+   *
+   * @param dummy_value (double) - A dummy pixel value for use 
+   * in pixels where no data is available ( input pixels with
+   * dummy values will be ignored ).  
+   *
+   * @note The output_raster parameters will take the input_raster1 as
+   * reference.
+   * @note All input rasters must have the same dimensions.
+   *
+   */
+  class PDI_DLL TePDINoBlendStrategy : public TePDIBlendingStrategy
+  {
+    friend class TePDINoBlendSF;
+  
+    public :
+      
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDINoBlendStrategy();
+      
+      /**
+       * @brief Checks if the supplied parameters fits the requirements of each
+       * PDI strategy.
+       *
+       * @note Error log messages must be generated. No exceptions generated.
+       *
+       * @param parameters The parameters to be checked.
+       * @return true if the parameters are OK. false if not.
+       */
+      bool CheckParameters( 
+        const TePDIParameters& parameters ) const;       
+      
+    protected :
+      
+      /**
+       * @brief Default constructor
+       *
+       * @param factoryName Factory name.
+       */
+      TePDINoBlendStrategy();
+      
+      /**
+       * @brief Runs the algorithm implementation.
+       *
+       * @return true if OK. false on errors.
+       */
+      bool Implementation( const TePDIParameters& params );
+     
+  };
+  
+#endif
+
+
+
diff --git a/src/terralib/image_processing/TePDIOFMatching.cpp b/src/terralib/image_processing/TePDIOFMatching.cpp
new file mode 100644
index 0000000..cefb0b6
--- /dev/null
+++ b/src/terralib/image_processing/TePDIOFMatching.cpp
@@ -0,0 +1,2560 @@
+#include "TePDIOFMatching.hpp"
+
+#include "TePDIUtils.hpp"
+
+#include <TeThreadFunctor.h>
+#include <TeMutex.h>
+#include <TeCoord2D.h>
+#include <TeGTFactory.h>
+#include <TeDefines.h>
+
+#include <math.h>
+
+#ifndef M_PI
+  #define M_PI       3.14159265358979323846
+#endif
+#ifndef M_PI_2
+  #define M_PI_2     1.57079632679489661923
+#endif
+#ifndef M_PI_4
+  #define M_PI_4     0.785398163397448309616
+#endif
+
+TePDIOFMatching::TePDIOFMatching()
+{
+}
+
+
+TePDIOFMatching::~TePDIOFMatching()
+{
+}
+
+
+bool TePDIOFMatching::RunImplementation()
+{
+  /* Retriving Parameters */
+  
+  TePDITypes::TePDIRasterPtrType input_image1_ptr;
+  params_.GetParameter( "input_image1_ptr", input_image1_ptr );  
+  
+  unsigned int input_channel1 = 0;
+  params_.GetParameter( "input_channel1", input_channel1 );   
+  
+  TePDITypes::TePDIRasterPtrType input_image2_ptr;
+  params_.GetParameter( "input_image2_ptr", input_image2_ptr );  
+  
+  unsigned int input_channel2 = 0;
+  params_.GetParameter( "input_channel2", input_channel2 );   
+
+  TeSharedPtr< TeCoordPairVect > out_tie_points_ptr;
+  params_.GetParameter( "out_tie_points_ptr", out_tie_points_ptr );   
+  
+  TeGTParams gt_params;
+  gt_params.out_rem_strat_ = TeGTParams::LWAOutRemotion;
+  gt_params.max_dmap_error_ = 1.0;
+  gt_params.max_imap_error_ = 1.0;
+  gt_params.transformation_name_ = "affine";
+  if( params_.CheckParameter< TeGTParams >( "gt_params" ) ) {
+    params_.GetParameter( "gt_params", gt_params );
+  }
+  
+  TeBox input_box1;
+  if( params_.CheckParameter< TeBox >( "input_box1" ) ) {
+    params_.GetParameter( "input_box1", input_box1 );
+  } else {
+    TeBox input_box1_proj = input_image1_ptr->params().box();
+    
+    TePDIUtils::MapCoords2RasterIndexes( input_box1_proj, input_image1_ptr,
+      input_box1 );
+  }
+  
+  TeBox input_box2;
+  if( params_.CheckParameter< TeBox >( "input_box2" ) ) {
+    params_.GetParameter( "input_box2", input_box2 );
+  } else {
+    TeBox input_box2_proj = input_image2_ptr->params().box();
+    
+    TePDIUtils::MapCoords2RasterIndexes( input_box2_proj, input_image2_ptr,
+      input_box2 );
+  }  
+  
+  bool enable_multi_thread = false;
+  if( params_.CheckParameter< int >( "enable_multi_thread" ) ) {
+    enable_multi_thread = true;
+  }
+  
+  bool skip_geom_filter = false;
+  if( params_.CheckParameter< int >( "skip_geom_filter" ) ) {
+    skip_geom_filter = true;
+  }  
+  
+  double pixel_x_relation = 1.0;
+  if( params_.CheckParameter< double >( "pixel_x_relation" ) ) {
+    params_.GetParameter( "pixel_x_relation", pixel_x_relation );
+  }
+  
+  double pixel_y_relation = 1.0;
+  if( params_.CheckParameter< double >( "pixel_y_relation" ) ) {
+    params_.GetParameter( "pixel_y_relation", pixel_y_relation );
+  }  
+  
+  unsigned int max_tie_points = 529;
+  if( params_.CheckParameter< unsigned int >( "max_tie_points" ) ) {
+    params_.GetParameter( "max_tie_points", max_tie_points );
+  }    
+  
+  double corr_sens = 0.5;
+  if( params_.CheckParameter< double >( "corr_sens" ) ) {
+    params_.GetParameter( "corr_sens", corr_sens );
+  }    
+  
+  unsigned int corr_window_width = 21;
+  if( params_.CheckParameter< unsigned int >( 
+    "corr_window_width" ) ) {
+    
+    params_.GetParameter( "corr_window_width", corr_window_width );
+  }     
+  
+  unsigned int max_size_opt = 0;
+  if( params_.CheckParameter< unsigned int >( "max_size_opt" ) ) {
+    params_.GetParameter( "max_size_opt", max_size_opt );
+  }   
+  
+  double maximas_sens = 0;
+  if( params_.CheckParameter< double >( "maximas_sens" ) ) {
+    params_.GetParameter( "maximas_sens", maximas_sens );
+  }      
+  
+  /* Calculating the number of allowed threads - this process
+     not included into the count */
+     
+  unsigned int max_threads = 0;
+  std::vector< TeThreadFunctor::pointer > threads_vector;
+  
+  if( enable_multi_thread ) {
+    max_threads = TeGetPhysProcNumber() - 1;
+    
+    for( unsigned int index = 0 ; index < max_threads ; ++index ) {
+      TeThreadFunctor::pointer aux_thread_ptr( new TeThreadFunctor );
+    
+      threads_vector.push_back( aux_thread_ptr );
+    }
+  }
+  
+  /* Calculating the box postion related values */
+  
+  const unsigned int orig_box1_x_off = (unsigned int)input_box1.lowerLeft().x();
+  const unsigned int orig_box1_y_off = (unsigned int)input_box1.upperRight().y();
+  const unsigned int orig_box1_nlines = 1 + (unsigned int)ABS( input_box1.height() );
+  const unsigned int orig_box1_ncols = 1 + (unsigned int)ABS( input_box1.width() );
+  
+  const unsigned int orig_box2_x_off = (unsigned int)input_box2.lowerLeft().x();
+  const unsigned int orig_box2_y_off = (unsigned int)input_box2.upperRight().y();
+  const unsigned int orig_box2_nlines = 1 + (unsigned int)ABS( input_box2.height() );
+  const unsigned int orig_box2_ncols = 1 + (unsigned int)ABS( input_box2.width() );
+    
+  /* Calculating the rescale factors 
+     rescaled_image = original_image * rescale_factor */
+  
+  double img1_x_rescale_factor = 1.0;
+  double img1_y_rescale_factor = 1.0;
+  double img2_x_rescale_factor = 1.0;
+  double img2_y_rescale_factor = 1.0;
+  {
+    double mean_pixel_relation = ( pixel_x_relation + pixel_y_relation ) /
+      2.0;
+      
+    if( mean_pixel_relation > 1.0 ) {
+      /* The image 1 has poor resolution - bigger pixel resolution values -
+         and image 2 needs to be rescaled down */
+      
+      img2_x_rescale_factor = 1.0 / pixel_x_relation;
+      img2_y_rescale_factor = 1.0 / pixel_y_relation;
+    } else if( mean_pixel_relation < 1.0 ) {
+      /* The image 2 has poor resolution - bigger pixel resolution values
+        and image 1 needs to be rescaled down */
+      
+      img1_x_rescale_factor = pixel_x_relation;
+      img1_y_rescale_factor = pixel_y_relation;
+    }
+  } 
+  
+  if( max_size_opt )
+  {
+    double resc_box1_size = 
+      ( (double)orig_box1_nlines  ) * img1_y_rescale_factor *
+      ( (double)orig_box1_ncols ) * img1_x_rescale_factor;
+    double resc_box2_size = 
+      ( (double)orig_box2_nlines  ) * img2_y_rescale_factor *
+      ( (double)orig_box2_ncols ) * img2_x_rescale_factor;
+    double max_size_opt_double = (double)max_size_opt;
+    
+    if( ( resc_box1_size > max_size_opt_double ) || 
+      ( resc_box2_size > max_size_opt_double ) )
+    {
+      double opt_rescale_factor = 1.0;
+      
+      if( resc_box1_size > resc_box2_size )
+      {
+        opt_rescale_factor = sqrt( resc_box1_size / max_size_opt_double );
+      }
+      else
+      {
+        opt_rescale_factor = sqrt( resc_box2_size / max_size_opt_double );
+      }
+      
+      img1_x_rescale_factor *= opt_rescale_factor;
+      img1_y_rescale_factor *= opt_rescale_factor;
+      img2_x_rescale_factor *= opt_rescale_factor;
+      img2_y_rescale_factor *= opt_rescale_factor;
+    }
+  }
+  
+  /* Calculating the max tie-points to be generated for each image
+     trying to keep the same tie-point density for both images */
+     
+  unsigned int img1_max_tps = 0;
+  unsigned int img2_max_tps = 0;
+  
+  {
+    double resc_box1_nlines =  ( (double)orig_box1_nlines  ) * 
+      img1_y_rescale_factor;
+    double resc_box1_ncols =  ( (double)orig_box1_ncols ) * 
+      img1_x_rescale_factor;
+    double resc_box2_nlines =  ( (double)orig_box2_nlines  ) * 
+      img2_y_rescale_factor;
+    double resc_box2_ncols =  ( (double)orig_box2_ncols ) * 
+      img2_x_rescale_factor;
+      
+    double resc_box1_area = resc_box1_nlines * resc_box1_ncols;
+    double resc_box2_area = resc_box2_nlines * resc_box2_ncols;
+      
+    if( resc_box1_area > resc_box2_area )
+    {
+      img2_max_tps = max_tie_points;
+      
+      img1_max_tps = (unsigned int)( 
+        resc_box1_area / 
+        ( resc_box2_area / ( (double)max_tie_points ) ) );
+    }
+    else
+    {
+      img1_max_tps = max_tie_points;
+      
+      img2_max_tps = (unsigned int)( 
+        resc_box2_area / 
+        ( resc_box1_area / ( (double)max_tie_points ) ) ); 
+    }
+  }
+  
+  /* Loading images */
+  
+  TeMutex glb_mem_lock; //global memory lock
+  
+  ImgMatrixT img1_matrix;
+  ImgMatrixT img2_matrix;
+ 
+  {
+    TeThreadParameters tparams1;
+    tparams1.store( "input_image_ptr", input_image1_ptr );
+    tparams1.store( "img_matrix_ptr", &img1_matrix );
+    tparams1.store( "img_x_rescale_factor", img1_x_rescale_factor );
+    tparams1.store( "img_y_rescale_factor", img1_y_rescale_factor );
+    tparams1.store( "box_x_off", orig_box1_x_off );
+    tparams1.store( "box_y_off", orig_box1_y_off );
+    tparams1.store( "box_nlines", orig_box1_nlines );
+    tparams1.store( "box_ncols", orig_box1_ncols );
+    tparams1.store( "input_channel", input_channel1 );
+    tparams1.store( "progress_enabled", progress_enabled_ );
+    tparams1.store( "glb_mem_lock_ptr", &glb_mem_lock );
+    
+    TeThreadParameters tparams2;
+    tparams2.store( "input_image_ptr", input_image2_ptr );
+    tparams2.store( "img_matrix_ptr", &img2_matrix );
+    tparams2.store( "img_x_rescale_factor", img2_x_rescale_factor );
+    tparams2.store( "img_y_rescale_factor", img2_y_rescale_factor );
+    tparams2.store( "box_x_off", orig_box2_x_off );
+    tparams2.store( "box_y_off", orig_box2_y_off );
+    tparams2.store( "box_nlines", orig_box2_nlines );
+    tparams2.store( "box_ncols", orig_box2_ncols );
+    tparams2.store( "input_channel", input_channel2 );
+    tparams2.store( "progress_enabled", progress_enabled_ );
+    tparams2.store( "glb_mem_lock_ptr", &glb_mem_lock );
+  
+    if( max_threads > 0 ) {
+      threads_vector[ 0 ]->setStartFunctPtr( loadImage );
+      threads_vector[ 0 ]->setParameters( tparams1 );
+      threads_vector[ 0 ]->start();
+   
+      if( ! loadImage( tparams2 ) ) {
+        threads_vector[ 0 ]->waitToFinish();
+        
+        TEAGN_LOG_AND_RETURN( "Unable to load image 2" )
+      } else {
+        threads_vector[ 0 ]->waitToFinish();
+        
+        TEAGN_TRUE_OR_RETURN( threads_vector[ 0 ]->getReturnValue(),
+          "Unable to load image 1" )
+      }
+    } else {
+      TEAGN_TRUE_OR_RETURN( loadImage( tparams1 ),
+        "Error loading image 1" )
+      TEAGN_TRUE_OR_RETURN( loadImage( tparams2 ),
+        "Error loading image 2" )
+    }
+  }
+  
+/* remove */        
+//matrix2Tiff( img1_matrix, "img1_matrix.tif", 
+//  std::vector< TeCoord2D >() );
+//matrix2Tiff( img2_matrix, "img2_matrix.tif",
+//  std::vector< TeCoord2D >() );
+/* remove */  
+  
+  /* Generating the correlation windows and the maxima points */
+  
+  std::vector< TeCoord2D > img1_maxima_points;
+  std::vector< TeCoord2D > img2_maxima_points;
+  
+  ImgMatrixT img1_features_matrix;/* each line is a stacked version
+                                     of one rotated correlation 
+                                     window */
+  ImgMatrixT img2_features_matrix;/* each line is a stacked version
+                                     of one rotated correlation 
+                                     window */
+  {
+    TeThreadParameters tparams1;
+    tparams1.store( "img_matrix_ptr", &img1_matrix );
+    tparams1.store( "corr_window_width", corr_window_width );
+    tparams1.store( "img_maxima_points_ptr", &img1_maxima_points );
+    tparams1.store( "img_features_matrix_ptr", &img1_features_matrix );
+    tparams1.store( "progress_enabled", progress_enabled_ );
+    tparams1.store( "max_points", img1_max_tps );
+    tparams1.store( "glb_mem_lock_ptr", &glb_mem_lock );
+    tparams1.store( "maximas_sens", maximas_sens );
+    
+    TeThreadParameters tparams2;
+    tparams2.store( "img_matrix_ptr", &img2_matrix );
+    tparams2.store( "corr_window_width", corr_window_width );
+    tparams2.store( "img_maxima_points_ptr", &img2_maxima_points );
+    tparams2.store( "img_features_matrix_ptr", &img2_features_matrix );    
+    tparams2.store( "progress_enabled", progress_enabled_ );
+    tparams2.store( "max_points", img2_max_tps );
+    tparams2.store( "glb_mem_lock_ptr", &glb_mem_lock );
+    tparams2.store( "maximas_sens", maximas_sens );
+    
+    if( max_threads > 0 ) {
+      threads_vector[ 0 ]->setStartFunctPtr( generateFeatures );
+      threads_vector[ 0 ]->setParameters( tparams1 );
+      threads_vector[ 0 ]->start();
+    
+      if( ! generateFeatures( tparams2 ) ) {
+        threads_vector[ 0 ]->waitToFinish();
+        
+        TEAGN_LOG_AND_RETURN( "Unable to the correlation windows from image 2" )
+      } else {
+        threads_vector[ 0 ]->waitToFinish();
+        
+        TEAGN_TRUE_OR_RETURN( threads_vector[ 0 ]->getReturnValue(),
+          "Unable to the correlation windows from image 1" )
+      }      
+    } else {
+      TEAGN_TRUE_OR_RETURN( generateFeatures( tparams1 ),
+        "Error generating the correlation windows from image 1" )
+      TEAGN_TRUE_OR_RETURN( generateFeatures( tparams2 ),
+        "Error generating the correlation windows from image 2" )        
+    }
+    
+    if( ( img1_maxima_points.size() == 0 ) ||
+      ( img2_maxima_points.size() == 0 ) )
+    {
+      /* No maximas found in one image */
+      
+      return true;
+    }
+    
+/* remove */
+//matrix2Tiff( img1_matrix, "img1_matrix_with_maxima_points.tif", 
+//  img1_maxima_points );
+//matrix2Tiff( img2_matrix, "img2_matrix_with_maxima_points.tif", 
+//  img2_maxima_points );
+/* remove */
+    
+    /* Bringing img1_maxima_points into input_image1_ptr 
+       reference */
+ 
+    std::vector< TeCoord2D >::iterator maximas_it = 
+      img1_maxima_points.begin();
+    std::vector< TeCoord2D >::iterator maximas_it_end = 
+      img1_maxima_points.end();
+      
+    while( maximas_it != maximas_it_end ) {
+      (*maximas_it) = 
+        TeCoord2D( 
+          ( (*maximas_it).x() / img1_x_rescale_factor ) +
+            ( (double)orig_box1_x_off ),
+          ( (*maximas_it).y() / img1_y_rescale_factor ) +
+            ( (double)orig_box1_y_off )
+        );
+        
+      TEAGN_DEBUG_CONDITION( 
+        ( maximas_it->x() < input_image1_ptr->params().ncols_ ),
+        "Invalid x coord generated" )
+      TEAGN_DEBUG_CONDITION( 
+        ( maximas_it->x() >= 0 ),
+        "Invalid x coord generated" )        
+      TEAGN_DEBUG_CONDITION( 
+        ( maximas_it->y() < input_image1_ptr->params().nlines_ ),
+        "Invalid y coord generated" )
+      TEAGN_DEBUG_CONDITION( 
+        ( maximas_it->y() >= 0 ),
+        "Invalid y coord generated" )           
+        
+      ++maximas_it;
+    }
+    
+    /* Bringing img2_maxima_points into input_image2_ptr 
+       reference */    
+    
+    maximas_it = img2_maxima_points.begin();
+    maximas_it_end = img2_maxima_points.end();
+      
+    while( maximas_it != maximas_it_end ) {
+      (*maximas_it) = 
+        TeCoord2D( 
+          ( (*maximas_it).x() / img2_x_rescale_factor ) +
+            ( (double)orig_box2_x_off ),
+          ( (*maximas_it).y() / img2_y_rescale_factor ) +
+            ( (double)orig_box2_y_off )
+        );
+      
+      TEAGN_DEBUG_CONDITION( 
+        ( maximas_it->x() < input_image2_ptr->params().ncols_ ),
+        "Invalid x coord generated" )
+      TEAGN_DEBUG_CONDITION( 
+        ( maximas_it->x() >= 0 ),
+        "Invalid x coord generated" )         
+      TEAGN_DEBUG_CONDITION( 
+        ( maximas_it->y() < input_image2_ptr->params().nlines_ ),
+        "Invalid y coord generated" ) 
+      TEAGN_DEBUG_CONDITION( 
+        ( maximas_it->y() >= 0 ),
+        "Invalid y coord generated" )                 
+        
+      ++maximas_it;
+    }    
+  }
+  
+  TEAGN_DEBUG_CONDITION( ( img1_maxima_points.size() ==
+    img1_features_matrix.GetLines() ),
+    "Features number mismatch" );
+  TEAGN_DEBUG_CONDITION( ( img2_maxima_points.size() ==
+    img2_features_matrix.GetLines() ),
+    "Features number mismatch" ); 
+    
+  TEAGN_DEBUG_CONDITION( checkMaximaPoints( img1_maxima_points ),
+    "Invalid img1 maximas" )
+  TEAGN_DEBUG_CONDITION( checkMaximaPoints( img2_maxima_points ),
+    "Invalid img2 maximas" )
+    
+  /* Free anused resources */
+  
+  img1_matrix.Reset();
+  img2_matrix.Reset();
+
+/* remove */
+//raster2Tiff( input_image1_ptr, input_channel1,
+//  "orig_img1_plus_all_maximas.tif",
+//  img1_maxima_points,TeSharedPtr< TeCoordPairVect >(), 0 );
+//raster2Tiff( input_image2_ptr, input_channel2,
+//  "orig_img2_plus_all_maximas.tif",
+//  img2_maxima_points, TeSharedPtr< TeCoordPairVect >(), 0 ); 
+/* remove */
+  
+  
+/* remove */
+//features2Tiff( corr_window_width, img1_maxima_points, 
+//  img1_features_matrix, "img1" );
+//features2Tiff( corr_window_width, img2_maxima_points, 
+//  img2_features_matrix, "img2" );
+/* remove */   
+  
+  /* Matching the correlation windows */
+  
+  /* A vector with the matrix 2 features indexes with
+    the best correlation value for each matrix 1 element 
+    features2_indexes size = img1_features_matrix size */
+  std::vector< unsigned int > features2_indexes;
+  
+  /* A vector with the matrix 1 features indexes with
+    the best correlation value for each matrix 2 element 
+    features1_indexes size = img2_features_matrix size */
+  std::vector< unsigned int > features1_indexes;
+      
+  {
+    /* lock objects for the two vectors */
+    TeMutex features2_indexes_lock;
+    TeMutex features1_indexes_lock;
+   
+    TeThreadParameters tparams;
+    tparams.store( "features2_indexes_ptr", &features2_indexes );
+    tparams.store( "features1_indexes_ptr", &features1_indexes );
+    tparams.store( "features2_indexes_lock_ptr", 
+      &features2_indexes_lock );
+    tparams.store( "features1_indexes_lock_ptr", 
+      &features1_indexes_lock );      
+    tparams.store( "img1_features_matrix_ptr", 
+      &img1_features_matrix );
+    tparams.store( "img2_features_matrix_ptr", 
+      &img2_features_matrix );
+    tparams.store( "progress_enabled", progress_enabled_ );
+    tparams.store( "corr_sens", corr_sens );
+    
+    if( max_threads > 0 ) 
+    {
+      for( unsigned int thr_vec_ind = 0 ;
+        thr_vec_ind < threads_vector.size() ; ++thr_vec_ind ) {
+        
+        threads_vector[ thr_vec_ind ]->setStartFunctPtr( 
+          locateBestFeaturesMatching );
+          
+        threads_vector[ thr_vec_ind ]->setParameters( tparams );
+        threads_vector[ thr_vec_ind ]->start();
+      }
+        
+      if( ! locateBestFeaturesMatching( tparams ) ) {
+        for( unsigned int thr_vec_ind = 0 ;
+          thr_vec_ind < threads_vector.size() ; ++thr_vec_ind ) {
+          
+          threads_vector[ thr_vec_ind ]->waitToFinish();
+        }
+        
+        TEAGN_LOG_AND_RETURN( 
+          "Error locating the features matching for matrix 1" )
+      } else {
+        bool one_thread_returned_error = false;
+        
+        for( unsigned int thr_vec_ind = 0 ;
+          thr_vec_ind < threads_vector.size() ; ++thr_vec_ind ) {
+          
+          threads_vector[ thr_vec_ind ]->waitToFinish();
+          
+          if( ! threads_vector[ thr_vec_ind ]->getReturnValue() ) {
+            one_thread_returned_error = true;
+          }
+        }
+        
+        TEAGN_TRUE_OR_RETURN( ( ! one_thread_returned_error ),
+          "Error locating the features matching" )
+      }      
+    } else {
+      TEAGN_TRUE_OR_RETURN( locateBestFeaturesMatching( tparams ),
+        "Error locating the features matching" );
+    }
+  }
+  
+  TEAGN_DEBUG_CONDITION( ( img1_maxima_points.size() ==
+    features2_indexes.size() ),
+    "Features number mismatch" );
+  TEAGN_DEBUG_CONDITION( ( img2_maxima_points.size() ==
+    features1_indexes.size() ),
+    "Features number mismatch" );
+    
+  /* Free anused resources */
+  
+  img1_features_matrix.Reset();  
+  img2_features_matrix.Reset();
+    
+  /* Generating tie-points */
+  
+  out_tie_points_ptr->clear();
+   
+  {
+    unsigned int features2_indexes_size = features2_indexes.size();
+    unsigned int features1_indexes_size = features1_indexes.size();
+  
+    unsigned int f1i_index = 0;//index over features1_indexes
+    unsigned int f2i_index = 0;//index over features2_indexes
+ 
+    /* features1_indexes pointed indexes */
+    unsigned int f1_pointed_index = 0;
+    /* features2_indexes pointed indexes */
+    unsigned int f2_pointed_index = 0;
+    
+    /* Getting the matchings priorizing the pointings
+       indicated by features2_indexes */
+  
+    for( f2i_index = 0 ; f2i_index < features2_indexes_size ;
+      ++f2i_index ) {
+      
+      f2_pointed_index = features2_indexes[ f2i_index ];
+      
+      if( f2_pointed_index < features1_indexes_size ) {
+        f1_pointed_index = features1_indexes[ f2_pointed_index ];
+          
+        if( f1_pointed_index == f2i_index ) {
+         
+          out_tie_points_ptr->push_back( TeCoordPair(
+            img1_maxima_points[ f2i_index ],
+            img2_maxima_points[ f2_pointed_index ] ) ); 
+            
+          /* Invalidating the pointings to avoid duplicated 
+            matches */
+            
+          features2_indexes[ f2i_index ] = features1_indexes_size;
+          features1_indexes[ f2_pointed_index ] =
+            features2_indexes_size;
+        }
+      }
+    }
+    
+    /* Getting the remaining matchings priorizing the pointings
+       indicated by features1_indexes */
+    
+    for( f1i_index = 0 ; f1i_index < features1_indexes_size ;
+      ++f1i_index ) {
+      
+      f1_pointed_index = features1_indexes[ f1i_index ];
+      
+      if( f1_pointed_index < features2_indexes_size ) {
+        
+        f2_pointed_index = features2_indexes[ f1_pointed_index ];
+        
+        if( f2_pointed_index == f1i_index ) {
+         
+          out_tie_points_ptr->push_back( TeCoordPair(
+            img1_maxima_points[ f1_pointed_index ],
+            img2_maxima_points[ f1i_index ] ) ); 
+            
+          /* Invalidating the pointings to avoid duplicated 
+            matches */
+            
+          features2_indexes[ f1_pointed_index ] = features1_indexes_size;
+          features1_indexes[ f1i_index ] = features2_indexes_size;            
+        }
+      }
+    }    
+
+  }
+  
+  TEAGN_DEBUG_CONDITION( checkTPs( *out_tie_points_ptr ),
+    "Invalid tie-points" )
+  
+  /* Free anused resources */
+  
+  img1_maxima_points.clear();
+  img2_maxima_points.clear();  
+  
+  features2_indexes.clear();
+  features1_indexes.clear();
+  
+/* remove */
+//raster2Tiff( input_image1_ptr, input_channel1,
+//  "orig_img1_plus_all_tp.tif",
+//  std::vector< TeCoord2D >(), out_tie_points_ptr, 0 );
+//raster2Tiff( input_image2_ptr, input_channel2,
+//  "orig_img2_plus_all_tp.tif",
+//  std::vector< TeCoord2D >(), out_tie_points_ptr, 1 );  
+/* remove */     
+  
+  /* Doing geometrical filtering using user supplied 
+     geometrical transformation parameters */
+     
+  if( ! skip_geom_filter ) {
+    gt_params.tiepoints_ = (*out_tie_points_ptr);
+       
+    TeGeometricTransformation::pointer trans_ptr( 
+      TeGTFactory::make( gt_params ) );
+    if( trans_ptr->reset( gt_params ) ) {
+      trans_ptr->getParameters( gt_params );
+      
+      /* updating the output tie points */
+      
+      (*out_tie_points_ptr) = gt_params.tiepoints_;
+      
+      /* updating the output gt_params, if available */
+      
+      TeGTParams::pointer out_gt_params_ptr;
+      if( params_.CheckParameter< TeGTParams::pointer >( 
+        "out_gt_params_ptr" ) ) 
+      {
+        params_.GetParameter( "out_gt_params_ptr", out_gt_params_ptr );
+        
+        *out_gt_params_ptr = gt_params;
+      }       
+    } else {
+      out_tie_points_ptr->clear();
+    }
+  }
+  
+/* remove */
+//raster2Tiff( input_image1_ptr, input_channel1,
+//  "orig_img1_plus_filtered_tp.tif",
+//  std::vector< TeCoord2D >(), out_tie_points_ptr, 0 );
+//raster2Tiff( input_image2_ptr, input_channel2,
+//  "orig_img2_plus_filtered_tp.tif",
+//  std::vector< TeCoord2D >(), out_tie_points_ptr, 1 );  
+/* remove */   
+  
+  return true;
+}
+
+
+bool TePDIOFMatching::CheckParameters( 
+  const TePDIParameters& parameters ) const
+{
+  /* Checking input_image1_ptr */
+    
+  TePDITypes::TePDIRasterPtrType input_image1_ptr;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( 
+    "input_image1_ptr", input_image1_ptr ),
+    "Missing parameter: input_image1_ptr" );
+  TEAGN_TRUE_OR_RETURN( input_image1_ptr.isActive(),
+    "Invalid parameter: input_image1_ptr inactive" );
+  TEAGN_TRUE_OR_RETURN( input_image1_ptr->params().status_ != 
+    TeRasterParams::TeNotReady, 
+    "Invalid parameter: input_image1_ptr not ready" );
+    
+  /* Checking input_channel1 */
+    
+  unsigned int input_channel1 = 0;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( 
+    "input_channel1", input_channel1 ),
+    "Missing parameter: input_channel1" );
+  TEAGN_TRUE_OR_RETURN( 
+    ( ( (int)input_channel1 ) < 
+    input_image1_ptr->params().nBands() ),
+    "Invalid parameter: input_channel1" );
+  
+    
+  /* Checking input_image1_ptr */
+    
+  TePDITypes::TePDIRasterPtrType input_image2_ptr;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( 
+    "input_image2_ptr", input_image2_ptr ),
+    "Missing parameter: input_image2_ptr" );
+  TEAGN_TRUE_OR_RETURN( input_image2_ptr.isActive(),
+    "Invalid parameter: input_image2_ptr inactive" );
+  TEAGN_TRUE_OR_RETURN( input_image2_ptr->params().status_ != 
+    TeRasterParams::TeNotReady, 
+    "Invalid parameter: input_image2_ptr not ready" );    
+    
+  /* Checking input_channel2 */
+    
+  unsigned int input_channel2 = 0;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( 
+    "input_channel2", input_channel2 ),
+    "Missing parameter: input_channel2" );
+  TEAGN_TRUE_OR_RETURN( 
+    ( ( (int)input_channel2 ) < 
+    input_image2_ptr->params().nBands() ),
+    "Invalid parameter: input_channel2" );
+    
+  /* Checking out_tie_points_ptr */
+    
+  TeSharedPtr< TeCoordPairVect > out_tie_points_ptr;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( 
+    "out_tie_points_ptr", out_tie_points_ptr ),
+    "Missing parameter: out_tie_points_ptr" );
+  TEAGN_TRUE_OR_RETURN( out_tie_points_ptr.isActive(),
+    "Invalid parameter: out_tie_points_ptr inactive" );
+    
+  /* Checking gt_params */
+    
+  TeGTParams gt_params;
+  if( parameters.CheckParameter< TeGTParams >( "gt_params" ) ) {
+    parameters.GetParameter( "gt_params", gt_params );
+    
+    TEAGN_TRUE_OR_RETURN( ( TeGTFactory::instance().find( 
+      gt_params.transformation_name_ ) != 
+      TeGTFactory::instance().end() ),
+      "Invalid parameter : gt_params" )
+  }   
+    
+  /* Checking input_box1 */
+    
+  TeBox input_box1;
+  if( parameters.CheckParameter< TeBox >( "input_box1" ) ) {
+    parameters.GetParameter( "input_box1", input_box1 );
+    
+    TEAGN_TRUE_OR_RETURN( ( input_box1.x1() >= 0 ),
+      "Invalid parameter : input_box1" )
+    TEAGN_TRUE_OR_RETURN( ( input_box1.x2() >= 0 ),
+      "Invalid parameter : input_box1" )      
+    TEAGN_TRUE_OR_RETURN( ( input_box1.y1() >= 0 ),
+      "Invalid parameter : input_box1" )
+    TEAGN_TRUE_OR_RETURN( ( input_box1.y2() >= 0 ),
+      "Invalid parameter : input_box1" )         
+      
+    TEAGN_TRUE_OR_RETURN( 
+      ( input_box1.x1() <= 
+        ( input_image1_ptr->params().ncols_ - 1 ) ),
+      "Invalid parameter : input_box1" )
+    TEAGN_TRUE_OR_RETURN( 
+      ( input_box1.x2() <= 
+        ( input_image1_ptr->params().ncols_ - 1 ) ),
+      "Invalid parameter : input_box1" )       
+      
+    TEAGN_TRUE_OR_RETURN( 
+      ( input_box1.y1() <= 
+        ( input_image1_ptr->params().nlines_ - 1 ) ),
+      "Invalid parameter : input_box1" )
+    TEAGN_TRUE_OR_RETURN( 
+      ( input_box1.y2() <= 
+        ( input_image1_ptr->params().nlines_ - 1 ) ),
+      "Invalid parameter : input_box1" )        
+  }
+    
+  /* Checking input_box2 */
+    
+  TeBox input_box2;
+  if( parameters.CheckParameter< TeBox >( "input_box2" ) ) {
+    parameters.GetParameter( "input_box2", input_box2 );
+    
+    TEAGN_TRUE_OR_RETURN( ( input_box2.x1() >= 0 ),
+      "Invalid parameter : input_box2" )
+    TEAGN_TRUE_OR_RETURN( ( input_box2.x2() >= 0 ),
+      "Invalid parameter : input_box2" )      
+    TEAGN_TRUE_OR_RETURN( ( input_box2.y1() >= 0 ),
+      "Invalid parameter : input_box2" )
+    TEAGN_TRUE_OR_RETURN( ( input_box2.y2() >= 0 ),
+      "Invalid parameter : input_box2" )         
+      
+    TEAGN_TRUE_OR_RETURN( 
+      ( input_box2.x1() <= 
+        ( input_image2_ptr->params().ncols_ - 1 ) ),
+      "Invalid parameter : input_box2" )
+    TEAGN_TRUE_OR_RETURN( 
+      ( input_box2.x2() <= 
+        ( input_image2_ptr->params().ncols_ - 1 ) ),
+      "Invalid parameter : input_box2" )       
+      
+    TEAGN_TRUE_OR_RETURN( 
+      ( input_box2.y1() <= 
+        ( input_image2_ptr->params().nlines_ - 1 ) ),
+      "Invalid parameter : input_box2" )
+    TEAGN_TRUE_OR_RETURN( 
+      ( input_box2.y2() <= 
+        ( input_image2_ptr->params().nlines_ - 1 ) ),
+      "Invalid parameter : input_box2" )        
+  }    
+    
+  /* Checking pixel_x_relation */
+  
+  double pixel_x_relation = 1.0;
+  if( parameters.CheckParameter< double >( "pixel_x_relation" ) ) {
+    parameters.GetParameter( "pixel_x_relation", pixel_x_relation );
+    
+    TEAGN_TRUE_OR_RETURN( ( pixel_x_relation != 0.0 ),
+      "Invalid parameter : pixel_x_relation" )
+  }
+  
+  /* Checking pixel_y_relation */
+  
+  double pixel_y_relation = 1.0;
+  if( parameters.CheckParameter< double >( "pixel_y_relation" ) ) {
+    parameters.GetParameter( "pixel_y_relation", pixel_y_relation );
+    
+    TEAGN_TRUE_OR_RETURN( ( pixel_y_relation != 0.0 ),
+      "Invalid parameter : pixel_y_relation" )
+  }   
+  
+  /* Checking max_tie_points */
+  
+  unsigned int max_tie_points = 0;
+  if( parameters.CheckParameter< unsigned int >( "max_tie_points" ) ) {
+    parameters.GetParameter( "max_tie_points", max_tie_points );
+    
+    TEAGN_TRUE_OR_RETURN( ( max_tie_points > 0 ),
+      "Invalid parameter : max_tie_points" )    
+  }
+  
+  /* Checking corr_sens */
+  
+  double corr_sens = 0;
+  if( parameters.CheckParameter< double >( "corr_sens" ) ) {
+    parameters.GetParameter( "corr_sens", corr_sens );
+    
+    TEAGN_TRUE_OR_RETURN( ( corr_sens > 0.0 ) &&
+      ( corr_sens <= 3.0 ),
+      "Invalid parameter : corr_sens" )
+  }  
+  
+  /* Checking corr_window_width */
+  
+  unsigned int corr_window_width = 0;
+  if( parameters.CheckParameter< unsigned int >( 
+    "corr_window_width" ) ) {
+    
+    parameters.GetParameter( "corr_window_width", 
+      corr_window_width );
+      
+    TEAGN_TRUE_OR_RETURN( ( ( corr_window_width % 2 ) > 0 ),
+      "Invalid parameter : corr_window_width" )      
+    
+    TEAGN_TRUE_OR_RETURN( ( corr_window_width >= 3 ),
+      "Invalid parameter : corr_window_width" )
+  }    
+  
+  /* Checking maximas_sens */
+  
+  double maximas_sens = 0;
+  if( parameters.CheckParameter< double >( "maximas_sens" ) ) {
+    parameters.GetParameter( "maximas_sens", maximas_sens );
+    
+    TEAGN_TRUE_OR_RETURN( ( maximas_sens >= 0.0 ) &&
+      ( maximas_sens <= 1.0 ),
+      "Invalid parameter : maximas_sens" )
+  }   
+  
+  /* Checking out_gt_params */
+  
+  TeGTParams::pointer out_gt_params_ptr;
+  if( parameters.CheckParameter< TeGTParams::pointer >( 
+    "out_gt_params_ptr" ) ) 
+  {
+    parameters.GetParameter( "out_gt_params_ptr", out_gt_params_ptr );
+    
+    TEAGN_TRUE_OR_RETURN( ( out_gt_params_ptr.isActive() ),
+      "Invalid parameter : out_gt_params_ptr" )
+  }    
+  
+  return true;
+}
+
+
+void TePDIOFMatching::ResetState( const TePDIParameters& )
+{
+}
+
+
+bool TePDIOFMatching::loadImage( const TeThreadParameters& params )
+{
+  /* Retriving parameters */
+  
+  TePDITypes::TePDIRasterPtrType input_image_ptr;
+  TEAGN_TRUE_OR_THROW( params.retrive( "input_image_ptr", input_image_ptr ),
+    "Missing thread parameter" )
+    
+  ImgMatrixT* img_matrix_ptr;
+  TEAGN_TRUE_OR_THROW( params.retrive( "img_matrix_ptr", img_matrix_ptr ),
+    "Missing thread parameter" )
+    
+  double img_x_rescale_factor = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "img_x_rescale_factor", 
+    img_x_rescale_factor ), "Missing thread parameter" )
+    
+  double img_y_rescale_factor = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "img_y_rescale_factor", 
+    img_y_rescale_factor ), "Missing thread parameter" )    
+    
+  unsigned int input_channel = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "input_channel", 
+    input_channel ), "Missing thread parameter" )  
+    
+  unsigned int box_x_off = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "box_x_off", 
+    box_x_off ), "Missing thread parameter" )  
+
+  unsigned int box_y_off = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "box_y_off", 
+    box_y_off ), "Missing thread parameter" )      
+    
+  unsigned int box_nlines = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "box_nlines", 
+    box_nlines ), "Missing thread parameter" )      
+    
+  unsigned int box_ncols = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "box_ncols", 
+    box_ncols ), "Missing thread parameter" )   
+    
+  bool progress_enabled = false;   
+  TEAGN_TRUE_OR_THROW( params.retrive( "progress_enabled", 
+    progress_enabled ), "Missing thread parameter" ) 
+    
+  TeMutex* glb_mem_lock_ptr = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "glb_mem_lock_ptr", 
+    glb_mem_lock_ptr ), "Missing thread parameter" )   
+  TeMutex& glb_mem_lock = *glb_mem_lock_ptr;
+         
+  /* Rescaling image */
+  
+  unsigned int nlines = (unsigned int) ceil( 
+    ( (double)box_nlines ) * img_y_rescale_factor );
+  unsigned int ncols = (unsigned int) ceil( 
+    ( (double)box_ncols ) * img_x_rescale_factor );    
+  
+  glb_mem_lock.lock();
+  
+  if( ! img_matrix_ptr->Reset( nlines, ncols, 
+    TePDIMatrix< double >::AutoMemPol ) )
+  {
+    TEAGN_LOGERR( "Unable to allocate space for the loaded image" )
+    glb_mem_lock.unLock();
+    return false;
+  }
+    
+  glb_mem_lock.unLock();
+    
+  unsigned int curr_out_line = 0;
+  unsigned int curr_out_col = 0;
+  unsigned int curr_input_line = 0;
+  unsigned int curr_input_col = 0;
+  double value = 0;
+  
+  TePDIPIManager progress( "Rescaling image", nlines, progress_enabled );
+  
+  for( curr_out_line = 0 ; curr_out_line < nlines ; 
+    ++curr_out_line ) {
+    
+    curr_input_line = 
+      TeRound( 
+        ( 
+          ( (double)curr_out_line ) / img_y_rescale_factor
+        ) 
+        +
+        ( (double) box_y_off )
+      );
+    
+    for( curr_out_col = 0 ; curr_out_col < ncols ; 
+      ++curr_out_col ) {
+      
+      curr_input_col = 
+        TeRound( 
+          ( 
+            ( (double)curr_out_col ) / img_x_rescale_factor
+          ) 
+          +
+          ( (double) box_x_off )
+        );        
+      
+      if( input_image_ptr->getElement( curr_input_col, curr_input_line, value, 
+        input_channel ) ) {
+        
+        img_matrix_ptr->operator()( curr_out_line, curr_out_col ) = value;
+      } else {
+        img_matrix_ptr->operator()( curr_out_line, curr_out_col ) = 0;
+      }
+    }
+    
+    TEAGN_FALSE_OR_RETURN( progress.Increment(),
+      "Canceled by the user" );
+  }
+        
+  return true;
+}
+
+
+bool TePDIOFMatching::generateFeatures( 
+  const TeThreadParameters& params )
+{
+  /* Retriving parameters */
+  
+  ImgMatrixT* img_matrix_ptr;
+  TEAGN_TRUE_OR_THROW( params.retrive( "img_matrix_ptr", img_matrix_ptr ),
+    "Missing thread parameter" )
+    
+  unsigned int corr_window_width = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "corr_window_width", corr_window_width ),
+    "Missing thread parameter" )
+  TEAGN_DEBUG_CONDITION( ( corr_window_width >= 3 ),
+    "Invalid correlation window width" )    
+  TEAGN_DEBUG_CONDITION( ( ( corr_window_width % 2 ) != 0 ),
+    "Invalid correlation window width" )
+    
+  std::vector< TeCoord2D >* img_maxima_points_ptr = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "img_maxima_points_ptr", 
+    img_maxima_points_ptr ), "Missing thread parameter" )
+    
+  ImgMatrixT* img_features_matrix_ptr = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "img_features_matrix_ptr", 
+    img_features_matrix_ptr ), "Missing thread parameter" )
+    
+  bool progress_enabled = false;   
+  TEAGN_TRUE_OR_THROW( params.retrive( "progress_enabled", 
+    progress_enabled ), "Missing thread parameter" )     
+    
+  unsigned int max_points = 0;   
+  TEAGN_TRUE_OR_THROW( params.retrive( "max_points", 
+    max_points ), "Missing thread parameter" )  
+    
+  TeMutex* glb_mem_lock_ptr = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "glb_mem_lock_ptr", 
+    glb_mem_lock_ptr ), "Missing thread parameter" )   
+  TeMutex& glb_mem_lock = *glb_mem_lock_ptr;   
+  
+  double maximas_sens = 0;   
+  TEAGN_TRUE_OR_THROW( params.retrive( "maximas_sens", 
+    maximas_sens ), "Missing thread parameter" )         
+    
+  /* Filtering image */
+  
+  ImgMatrixT filtered_img_matrix;
+  TEAGN_TRUE_OR_RETURN( gaussianSmoothing( *img_matrix_ptr, 
+    filtered_img_matrix, 1, progress_enabled, glb_mem_lock ),
+    "Error filtering image" )
+    
+  /* Get the least squares surface */
+  
+  ImgMatrixT ls_surface_matrix;
+  TEAGN_TRUE_OR_RETURN( generateLSSurface( 
+    filtered_img_matrix, 
+    ls_surface_matrix, progress_enabled, glb_mem_lock ),
+    "Error getting the least squares surface" )   
+    
+/* remove */    
+//matrix2Tiff( ls_surface_matrix, "ls_surface_matrix.tif",
+//  std::vector< TeCoord2D >() );     
+/* remove */    
+    
+  /* Free unused resources */
+  
+  filtered_img_matrix.Reset();
+
+  /* Get the maxima points */
+  
+  TEAGN_TRUE_OR_RETURN( getMaximaPoints( ls_surface_matrix,
+    *img_maxima_points_ptr, max_points, corr_window_width, 
+    progress_enabled, maximas_sens ),
+    "Error generating maxima points" );
+  TEAGN_DEBUG_CONDITION( ( img_maxima_points_ptr->size() <=
+    max_points ), "Invalid number of generated maxima points" )
+
+/* remove */    
+//matrix2Tiff( *img_matrix_ptr, "croped_img_plus_maximas.tif",
+//  *img_maxima_points_ptr );     
+/* remove */
+    
+  /* Generating the rotated correlation windows matrix */
+  
+  if( img_maxima_points_ptr->size() > 0 ) {
+//    TEAGN_TRUE_OR_RETURN( img_features_matrix_ptr->Reset( 
+//      corr_window_width * corr_window_width, 
+//      img_maxima_points_ptr->size(), ImgMatrixT::RAMMemPol ),
+//      "Error allocating image features matrix" )  
+      
+    TEAGN_TRUE_OR_RETURN( generateCorrWindows( *img_matrix_ptr,
+      corr_window_width, *img_maxima_points_ptr, 
+      *img_features_matrix_ptr, progress_enabled, glb_mem_lock ),
+      "Error generating the correlation windows" )
+  } else {
+    img_features_matrix_ptr->Reset();
+  }
+    
+  return true;
+}
+
+
+bool TePDIOFMatching::gaussianSmoothing( 
+  const ImgMatrixT& input_matrix,
+  ImgMatrixT& output_matrix, 
+  unsigned int iterations,
+  bool progress_enabled,
+  TeMutex& glb_mem_lock )
+{        
+  TEAGN_TRUE_OR_THROW( ( iterations > 0 ), "Invalid iterations" )
+  TEAGN_TRUE_OR_RETURN( ( input_matrix.GetColumns() > 2 ),
+    "Invalid columns number" )
+  TEAGN_TRUE_OR_RETURN( ( input_matrix.GetLines() > 2 ),
+    "Invalid lines number" )   
+    
+  unsigned int nlines = input_matrix.GetLines();
+  unsigned int ncols = input_matrix.GetColumns();
+  unsigned int last_line_index = nlines - 1;
+  unsigned int last_col_index = ncols - 1;  
+  unsigned int curr_line = 0;
+  unsigned int curr_col = 0;   
+    
+  glb_mem_lock.lock();  
+    
+  if( !output_matrix.Reset( nlines, ncols, ImgMatrixT::AutoMemPol ) )
+  {
+    TEAGN_LOGERR( "Error reseting matrix" )
+    glb_mem_lock.unLock();
+    return false;
+  }
+    
+  glb_mem_lock.unLock();
+  
+  /* Fill borders with zero */
+  
+  for( curr_line = 0 ; curr_line < nlines ; ++curr_line ) {
+    output_matrix( curr_line, 0 ) = 0.0;
+    output_matrix( curr_line, last_col_index ) = 0.0;
+  }
+  
+  for( curr_col = 0 ; curr_col < ncols ; ++curr_col ) {
+    output_matrix( 0, curr_col ) = 0.0;
+    output_matrix( last_line_index, curr_col ) = 0.0;
+  }  
+  
+  /* Smoothing */
+  
+  TePDIPIManager progress( "Filtering image", nlines - 2, progress_enabled );
+  
+  for( curr_line = 1 ; curr_line < last_line_index ; ++curr_line ) {
+    for( curr_col = 1 ; curr_col < last_col_index ; ++curr_col ) {
+      output_matrix( curr_line, curr_col ) = 
+        ( 
+          input_matrix( curr_line - 1, curr_col ) +
+          ( 4.0 * input_matrix( curr_line, curr_col ) ) +
+          input_matrix( curr_line + 1, curr_col ) +
+          input_matrix( curr_line, curr_col - 1 ) +
+          input_matrix( curr_line, curr_col + 1 )        
+        ) / 8.0;
+    }
+    
+    TEAGN_FALSE_OR_RETURN( progress.Increment(),
+      "Canceled by the user" );
+  }
+  
+  return true;
+}
+
+
+bool TePDIOFMatching::generateLSSurface( 
+  const ImgMatrixT& input_matrix,
+  ImgMatrixT& ls_surface_matrix, 
+  bool progress_enabled,
+  TeMutex& glb_mem_lock )
+{        
+  TEAGN_TRUE_OR_RETURN( ( input_matrix.GetColumns() > 2 ),
+    "Invalid columns number" )
+  TEAGN_TRUE_OR_RETURN( ( input_matrix.GetLines() > 2 ),
+    "Invalid lines number" )   
+    
+  const unsigned int nlines = input_matrix.GetLines();
+  const unsigned int ncols = input_matrix.GetColumns();
+  
+  TePDIPIManager progress( "Creating LS surface",
+    ( nlines - 2 ) + ( 9 * ( nlines - 2 ) ) + nlines, 
+    progress_enabled );
+
+  /* Creating gx and gy */
+  
+  glb_mem_lock.lock();
+  
+  ImgMatrixT gx_matrix;
+  if( ! gx_matrix.Reset( nlines, ncols, ImgMatrixT::AutoMemPol ) )
+  {
+    TEAGN_LOGERR( "Error reseting matrix" )
+    glb_mem_lock.unLock();
+    return false;
+  }
+  
+  ImgMatrixT gy_matrix;
+  if( ! gy_matrix.Reset( nlines, ncols, ImgMatrixT::AutoMemPol ) )
+  {
+    TEAGN_LOGERR( "Error reseting matrix" )
+    glb_mem_lock.unLock();
+    return false;
+  }
+    
+  glb_mem_lock.unLock();
+  
+  {
+    unsigned int curr_line = 0;
+    unsigned int curr_col = 0; 
+    const unsigned int last_line_index = nlines - 1;
+    const unsigned int last_col_index = ncols - 1;      
+    
+    /* Border fill */
+    
+    for( curr_line = 0 ; curr_line < nlines ; ++curr_line ) {
+      gx_matrix( curr_line, 0 ) = 0.0;
+      gx_matrix( curr_line, last_col_index ) = 0.0;
+      
+      gy_matrix( curr_line, 0 ) = 0.0;
+      gy_matrix( curr_line, last_col_index ) = 0.0;      
+    }
+    for( curr_col = 0 ; curr_col < ncols ; ++curr_col ) {
+      gx_matrix( 0, curr_col ) = 0.0;
+      gx_matrix( last_line_index, curr_col ) = 0.0;
+      
+      gy_matrix( 0, curr_col ) = 0.0;
+      gy_matrix( last_line_index, curr_col ) = 0.0;
+    }  
+    
+    /* Calculating values */
+    
+    for( curr_line = 1 ; curr_line < last_line_index ; ++curr_line ) { 
+      for( curr_col = 1 ; curr_col < last_col_index ; ++curr_col ) { 
+        gx_matrix( curr_line, curr_col ) =
+          ( input_matrix( curr_line + 1, curr_col ) -
+            input_matrix( curr_line - 1, curr_col ) 
+          ) / 2.0;
+          
+        gy_matrix( curr_line, curr_col ) =
+          ( input_matrix( curr_line, curr_col + 1 ) -
+            input_matrix( curr_line, curr_col - 1 ) 
+          ) / 2.0;          
+      }
+      
+      TEAGN_FALSE_OR_RETURN( progress.Increment(),
+        "Canceled by the user" );
+    }
+  }  
+  
+  /* Creating gxx and gxy and gyy */
+  
+  glb_mem_lock.lock();
+  
+  ImgMatrixT gxx_matrix;
+  if( ! gxx_matrix.Reset( nlines, ncols, ImgMatrixT::AutoMemPol ) )
+  {
+    TEAGN_LOGERR( "Error reseting matrix" )
+    glb_mem_lock.unLock();
+    return false;
+  }
+  
+  ImgMatrixT gxy_matrix;
+  if( ! gxy_matrix.Reset( nlines, ncols, ImgMatrixT::AutoMemPol ) )
+  {
+    TEAGN_LOGERR( "Error reseting matrix" )
+    glb_mem_lock.unLock();
+    return false;
+  }
+  
+  ImgMatrixT gyy_matrix;
+  if( ! gyy_matrix.Reset( nlines, ncols, ImgMatrixT::AutoMemPol ) )
+  {
+    TEAGN_LOGERR( "Error reseting matrix" ) 
+    glb_mem_lock.unLock();
+    return false;
+  }
+    
+  glb_mem_lock.unLock();
+     
+  {
+    /* zero fill */
+    
+    {
+      unsigned int curr_line = 0;
+      unsigned int curr_col = 0; 
+      
+      for( curr_line = 0 ; curr_line < nlines ; ++curr_line ) {
+        for( curr_col = 0 ; curr_col < ncols ; ++curr_col ) {
+          gxx_matrix( curr_line, curr_col ) = 0.0;
+          gxy_matrix( curr_line, curr_col ) = 0.0;
+          gyy_matrix( curr_line, curr_col ) = 0.0;
+        }
+      }
+    }
+    
+    /* Allocating p matrix */
+    
+    glb_mem_lock.lock();
+    
+    ImgMatrixT p_matrix;
+    if( ! p_matrix.Reset( nlines, ncols, ImgMatrixT::AutoMemPol ) )
+    {
+      TEAGN_LOGERR( "Error reseting matrix" ) 
+      glb_mem_lock.unLock();
+      return false;
+    }
+      
+    glb_mem_lock.unLock();       
+    
+    /* iterating over the optical flow displacement */
+    
+    int curr_line_offset = 0;
+    int curr_col_offset = 0;
+    unsigned int curr_line = 0;
+    unsigned int curr_col = 0;
+    unsigned int curr_line_bound = 0;
+    unsigned int curr_col_bound = 0;    
+    
+    for( curr_line_offset = -1 ; curr_line_offset < 2 ; 
+      ++curr_line_offset ) { 
+      
+      for( curr_col_offset = -1 ; curr_col_offset < 2 ; 
+        ++curr_col_offset ) { 
+        
+        /* fill p matrix with ones */
+      
+        for( curr_line = 0 ; curr_line < nlines ; ++curr_line ) {
+          for( curr_col = 0 ; curr_col < ncols ; ++curr_col ) {
+            p_matrix( curr_line, curr_col ) = 1.0;
+          }
+        }
+        
+        /* updating p matrix */
+        
+        curr_line_bound = nlines - 1;
+        curr_col_bound = ncols - 1;
+      
+        for( curr_line = 1 ; curr_line < curr_line_bound ; ++curr_line ) {
+          for( curr_col = 1 ; curr_col < curr_col_bound ; ++curr_col ) {
+            p_matrix( curr_line, curr_col ) = 
+              ( gx_matrix( curr_line, curr_col ) * gx_matrix( curr_line + 
+                curr_line_offset, curr_col + curr_col_offset ) ) +
+              ( gy_matrix( curr_line, curr_col ) * gy_matrix( curr_line +
+                curr_line_offset, curr_col + curr_col_offset ) );
+              
+          }
+        }
+        
+        for( curr_line = 0 ; curr_line < nlines ; ++curr_line ) {
+          for( curr_col = 0 ; curr_col < ncols ; ++curr_col ) {
+            if( p_matrix( curr_line, curr_col ) < 0.0 ) {
+              p_matrix( curr_line, curr_col ) = 0.0;
+            }
+          }
+        }   
+        
+        /* Generating gxx, gxy and gyy */
+        
+        curr_line_bound = nlines - 1;
+        curr_col_bound = ncols - 1;
+      
+        for( curr_line = 1 ; curr_line < curr_line_bound ; ++curr_line ) {
+          for( curr_col = 1 ; curr_col < curr_col_bound ; ++curr_col ) {
+            gxx_matrix( curr_line, curr_col ) = 
+              gxx_matrix( curr_line, curr_col ) +
+              ( p_matrix( curr_line, curr_col ) * gx_matrix( curr_line + 
+              curr_line_offset, curr_col + curr_col_offset ) *
+              gx_matrix( curr_line + curr_line_offset, curr_col + 
+              curr_col_offset ) ) ;
+              
+            gxy_matrix( curr_line, curr_col ) = 
+              gxy_matrix( curr_line, curr_col ) +
+              ( p_matrix( curr_line, curr_col ) * gx_matrix( curr_line + 
+              curr_line_offset, curr_col + curr_col_offset ) *
+              gy_matrix( curr_line + curr_line_offset, curr_col + 
+              curr_col_offset ) ) ;              
+              
+            gyy_matrix( curr_line, curr_col ) = 
+              gyy_matrix( curr_line, curr_col ) +
+              ( p_matrix( curr_line, curr_col ) * gy_matrix( curr_line + 
+              curr_line_offset, curr_col + curr_col_offset ) *
+              gy_matrix( curr_line + curr_line_offset, curr_col + 
+              curr_col_offset ) ) ;              
+          }
+          
+          TEAGN_FALSE_OR_RETURN( progress.Increment(),
+            "Canceled by the user" );
+        }        
+      }
+    }
+  }    
+  
+  /* Creating the ls surface matrix */
+  {
+    glb_mem_lock.lock();
+    
+    if( ! ls_surface_matrix.Reset( nlines, ncols, ImgMatrixT::AutoMemPol ) )
+    {
+      TEAGN_LOGERR( "Error reseting matrix" )
+      glb_mem_lock.unLock();
+      return false;
+    }
+      
+    glb_mem_lock.unLock();
+      
+    unsigned int curr_line = 0;
+    unsigned int curr_col = 0;          
+    double div_value = 0;
+  
+    for( curr_line = 0 ; curr_line < nlines ; ++curr_line ) {
+      for( curr_col = 0 ; curr_col < ncols ; ++curr_col ) {
+        div_value = sqrt( ( gxx_matrix( curr_line, curr_col ) *
+          gxx_matrix( curr_line, curr_col ) ) + ( gyy_matrix( curr_line,
+          curr_col ) * gyy_matrix( curr_line, curr_col ) ) +
+          ( 2.0 * gxy_matrix( curr_line, curr_col ) * 
+          gxy_matrix( curr_line, curr_col ) ) )
+          *
+          sqrt( gxx_matrix( curr_line, curr_col ) +
+            gyy_matrix( curr_line, curr_col ) );
+        
+        if( div_value == 0.0 ) {
+          ls_surface_matrix( curr_line, curr_col ) = 
+            ( -1.0 ) * DBL_MAX;
+        } else {
+          ls_surface_matrix( curr_line, curr_col ) =
+            ABS( ( gxx_matrix( curr_line, curr_col ) * gyy_matrix( 
+            curr_line, curr_col ) ) - ( gxy_matrix( curr_line,
+            curr_col ) * gxy_matrix( curr_line, curr_col ) ) ) / 
+            div_value;
+        }
+      }
+      
+      TEAGN_FALSE_OR_RETURN( progress.Increment(),
+        "Canceled by the user" );
+    }  
+  }
+  
+  return true;
+}
+
+
+void TePDIOFMatching::matrix2Tiff( 
+  const ImgMatrixT& input_matrix,
+  const std::string& out_file_name,
+  const std::vector< TeCoord2D >& maxima_points )
+{   
+  TEAGN_TRUE_OR_THROW( ( ! out_file_name.empty() ), "Invalid file name" )
+  TEAGN_TRUE_OR_THROW( ( input_matrix.GetLines() > 0 ), 
+    "Invalid matrix lines" )
+  TEAGN_TRUE_OR_THROW( ( input_matrix.GetColumns() > 0 ), 
+    "Invalid matrix cols" )
+    
+  /* Finding min and max */
+  const double dbl_max = DBL_MAX;
+  const double dbl_min = (-1.0) * dbl_max;
+  double mtx_min = dbl_max;
+  double mtx_max = dbl_min;
+  double mtx_diff = 1.0;
+  
+  {
+    for( unsigned int line = 0 ; 
+      line < input_matrix.GetLines() ; ++line ) 
+    {
+      for( unsigned int col = 0 ; 
+        col < input_matrix.GetColumns() ; 
+        ++col ) 
+      {
+        if( ( input_matrix( line, col ) > dbl_min ) &&
+          ( input_matrix( line, col ) < dbl_max ) )
+        {
+          if( input_matrix( line, col ) < mtx_min )
+          {
+            mtx_min = input_matrix( line, col );
+          } 
+          
+          if( input_matrix( line, col ) > mtx_max )
+          {
+            mtx_max = input_matrix( line, col );
+          }
+        }
+      }  
+    }
+    
+    if( mtx_max != mtx_min )
+    {
+      mtx_diff = mtx_max - mtx_min;
+    } 
+  }
+    
+  TeRasterParams params;
+  params.setNLinesNColumns( input_matrix.GetLines(),
+    input_matrix.GetColumns() );
+  params.nBands( 1 );
+  params.setDataType( TeUNSIGNEDCHAR, -1 );
+  params.nBands( 1 );
+  params.decoderIdentifier_ = "TIF";
+  params.mode_ = 'c';
+  params.fileName_ = out_file_name;
+  
+  TeRaster out_raster( params );
+  TEAGN_TRUE_OR_THROW( out_raster.init(), "Error init raster" );
+  
+  for( unsigned int line = 0 ; 
+    line < input_matrix.GetLines() ; ++line ) {
+    for( unsigned int col = 0 ; 
+      col < input_matrix.GetColumns() ; 
+      ++col ) {
+
+      TEAGN_TRUE_OR_THROW( out_raster.setElement( col, line, 
+        ( ( input_matrix( line, col ) - mtx_min ) / mtx_diff ) * 255.0, 0 ),
+        "Error writing raster" )
+    }  
+  }
+  
+  /* Draw maxima points */
+  
+  std::vector< TeCoord2D >::const_iterator maximas_it = 
+    maxima_points.begin();
+  std::vector< TeCoord2D >::const_iterator maximas_it_end = 
+    maxima_points.end();
+    
+  while( maximas_it != maximas_it_end ) {
+    int x = TeRound( maximas_it->x() );
+    TEAGN_TRUE_OR_THROW( ( x < (int)input_matrix.GetColumns() ),
+      "Invalid maxima column" )
+    TEAGN_TRUE_OR_THROW( ( x >= 0 ),
+      "Invalid maxima column" )      
+    
+    int y = TeRound( maximas_it->y() );
+    TEAGN_TRUE_OR_THROW( ( y < (int)input_matrix.GetLines() ),
+      "Invalid maxima line" )
+    TEAGN_TRUE_OR_THROW( ( y >= 0 ),
+      "Invalid maxima line" )      
+    
+    TEAGN_TRUE_OR_THROW( out_raster.setElement( x, y, 
+      255.0, 0 ),
+      "Error writing raster" )
+      
+    ++maximas_it;
+  }  
+}
+
+
+void TePDIOFMatching::raster2Tiff( 
+  const TePDITypes::TePDIRasterPtrType& input_raster_ptr,
+  unsigned int raster_channel,
+  const std::string& out_file_name,
+  const std::vector< TeCoord2D >& maxima_points,
+  const TeSharedPtr< TeCoordPairVect >& out_tie_points_ptr,
+  unsigned int tie_points_space )
+{   
+  TEAGN_TRUE_OR_THROW( ( ! out_file_name.empty() ), 
+    "Invalid file name" )
+  TEAGN_TRUE_OR_THROW( ( input_raster_ptr->params().nlines_ > 0 ), 
+    "Invalid matrix lines" )
+  TEAGN_TRUE_OR_THROW( ( input_raster_ptr->params().ncols_ > 0 ), 
+    "Invalid matrix cols" )
+    
+  TeRasterParams params;
+  params.setNLinesNColumns( input_raster_ptr->params().nlines_,
+    input_raster_ptr->params().ncols_ );
+  params.nBands( 1 );
+  params.setDataType( TeUNSIGNEDCHAR, -1 );
+  params.nBands( 1 );
+  params.decoderIdentifier_ = "TIF";
+  params.mode_ = 'c';
+  params.fileName_ = out_file_name;
+  
+  TeRaster out_raster( params );
+  TEAGN_TRUE_OR_THROW( out_raster.init(), "Error init raster" );
+  double value = 0;
+  
+  for( int line = 0 ; 
+    line < input_raster_ptr->params().nlines_ ; ++line ) {
+    for( int col = 0 ; 
+      col < input_raster_ptr->params().ncols_ ; 
+      ++col ) {
+      
+      input_raster_ptr->getElement( col, line, value, 
+        raster_channel );
+      
+
+      TEAGN_TRUE_OR_THROW( out_raster.setElement( col, line, 
+        value, 0 ),
+        "Error writing raster" )
+    }  
+  }
+  
+  /* Draw maxima points */
+  
+  std::vector< TeCoord2D >::const_iterator maximas_it = 
+    maxima_points.begin();
+  std::vector< TeCoord2D >::const_iterator maximas_it_end = 
+    maxima_points.end();
+    
+  while( maximas_it != maximas_it_end ) {
+    int x = TeRound( maximas_it->x() );
+    TEAGN_TRUE_OR_THROW( ( x < input_raster_ptr->params().ncols_ ),
+      "Invalid maxima column" )
+    TEAGN_TRUE_OR_THROW( ( x >= 0 ),
+      "Invalid maxima column" )      
+    
+    int y = TeRound( maximas_it->y() );
+    TEAGN_TRUE_OR_THROW( ( y < input_raster_ptr->params().nlines_ ),
+      "Invalid maxima line" )
+    TEAGN_TRUE_OR_THROW( ( y >= 0 ),
+      "Invalid maxima line" )      
+    
+    TEAGN_TRUE_OR_THROW( out_raster.setElement( x, y, 
+      255.0, 0 ),
+      "Error writing raster" )
+      
+    ++maximas_it;
+  }
+  
+  /* Draw tie-points */
+  
+  if( out_tie_points_ptr.isActive() ) {
+    TeCoordPairVect::iterator it = out_tie_points_ptr->begin();
+    TeCoordPairVect::iterator it_end = out_tie_points_ptr->end();
+    
+    while( it != it_end ) {
+      int x = 0;
+      int y = 0;
+      
+      if( tie_points_space == 0 ) {
+         x = TeRound( it->pt1.x() );
+         y = TeRound( it->pt1.y() );
+      } else {
+         x = TeRound( it->pt2.x() );
+         y = TeRound( it->pt2.y() );
+      }
+      
+      TEAGN_TRUE_OR_THROW( ( x < input_raster_ptr->params().ncols_ ),
+        "Invalid maxima column" )
+      TEAGN_TRUE_OR_THROW( ( x >= 0 ),
+        "Invalid maxima column" )      
+      TEAGN_TRUE_OR_THROW( ( y < input_raster_ptr->params().nlines_ ),
+        "Invalid maxima line" )
+      TEAGN_TRUE_OR_THROW( ( y >= 0 ),
+        "Invalid maxima line" )      
+      
+      TEAGN_TRUE_OR_THROW( out_raster.setElement( x, y, 
+        255.0, 0 ),
+        "Error writing raster" )    
+    
+      ++it;
+    }
+  
+  }
+}
+
+
+bool TePDIOFMatching::getMaximaPoints( 
+  const ImgMatrixT& input_matrix,
+  std::vector< TeCoord2D >& maxima_points,
+  unsigned int max_points, unsigned int corr_window_width,
+  bool progress_enabled, double maximas_sens )
+{
+  maxima_points.clear();
+  
+  TEAGN_TRUE_OR_RETURN( ( input_matrix.GetLines() > 0 ), 
+    "Invalid matrix lines" )
+  TEAGN_TRUE_OR_RETURN( ( input_matrix.GetColumns() > 0 ), 
+    "Invalid matrix cols" )
+  TEAGN_DEBUG_CONDITION( ( max_points > 0 ), 
+    "Invalid number of maximum maxima points" )
+  TEAGN_DEBUG_CONDITION( ( corr_window_width >= 3 ), 
+    "Invalid correlation window width" )
+  TEAGN_DEBUG_CONDITION( 
+    ( maximas_sens >= 0.0 ) && ( maximas_sens <= 10.0 ), 
+    "Invalid maximas_sens" )    
+    
+  /* The radius of a windows rotated by 90 degrees. */
+  const unsigned int rotated_window_radius = (unsigned int)
+    (
+      ceil( 
+        sqrt( 
+          2 * 
+          ( ( (double)corr_window_width ) * 
+            ( (double)corr_window_width ) 
+          )
+        ) / 2.0
+      )
+    );
+  const unsigned int rotated_window_diam = 1 + ( 2 *
+    rotated_window_radius );
+    
+  /* Checking if the current rotated correlation window width 
+     fits inside the current image */
+     
+  const unsigned int total_lines = input_matrix.GetLines();
+  const unsigned int total_cols = input_matrix.GetColumns();
+
+  if( total_lines <= rotated_window_diam ) {
+    return true;
+  }
+  if( total_cols <= rotated_window_diam ) {
+    return true;
+  }    
+  
+  const unsigned int max_blks_per_line = total_cols - 
+    rotated_window_diam;
+  const unsigned int max_blks_per_col = total_lines - 
+    rotated_window_diam;   
+  
+  /* Calc block dimentions */
+  
+  unsigned int blocks_per_line_col = 
+    MIN( (unsigned int)floor( sqrt( (double)max_points ) ), 
+      MIN( max_blks_per_line, max_blks_per_col ) );
+  
+  if( blocks_per_line_col == 0 )
+  {
+    return true;
+  }
+  
+  unsigned int block_width = (unsigned int)
+    ceil(
+      ((double)( total_cols - rotated_window_diam ) ) 
+      / 
+      ((double) blocks_per_line_col )
+    );
+  unsigned int block_height = (unsigned int)
+    ceil(
+      ((double)( total_lines - rotated_window_diam ) ) 
+      / 
+      ((double) blocks_per_line_col )
+    );
+    
+  TEAGN_DEBUG_CONDITION( ( block_width > 0 ), 
+    "Invalid block width" )
+  TEAGN_DEBUG_CONDITION( ( block_height > 0 ), 
+    "Invalid block height" )
+  
+  /* Looking maximas */
+  
+  const double dbl_max = DBL_MAX;
+  const double dbl_min = dbl_max * (-1.0);  
+  
+  std::vector< TeCoord2D > internal_maxima_points;
+  internal_maxima_points.reserve( blocks_per_line_col * 
+    blocks_per_line_col );
+  
+  std::vector< double > maxima_points_blkmean_diffs;
+  maxima_points_blkmean_diffs.reserve( blocks_per_line_col * 
+    blocks_per_line_col );
+  double maxima_points_blkmean_diffs_max = dbl_min;
+  double maxima_points_blkmean_diffs_min = dbl_max;
+    
+  unsigned int curr_block_start_line = 0;
+  unsigned int curr_block_start_col = 0;
+  unsigned int curr_block_line_bound = 0;
+  unsigned int curr_block_col_bound = 0;
+  unsigned int curr_line = 0;
+  unsigned int curr_col = 0;
+  
+  unsigned int block_maxima_col = 0;
+  unsigned int block_maxima_line = 0;  
+  double block_maxima_val = 0.0;
+  
+  unsigned int curr_horiz_block = 0;
+  unsigned int curr_vert_block = 0;
+  const unsigned int cols_bound = total_cols - 
+   rotated_window_radius;
+  const unsigned int lines_bound = total_lines - 
+   rotated_window_radius;
+   
+  double blk_mean = 0.0;
+  double blk_mean_diff = 0.0;   
+  
+  TePDIPIManager progress( "Finding maxima points",
+    blocks_per_line_col, progress_enabled );  
+    
+  for( curr_vert_block = 0 ; curr_vert_block < blocks_per_line_col ;
+    ++curr_vert_block ) {
+    
+    curr_block_start_line = rotated_window_radius +
+      ( curr_vert_block * block_height );
+    curr_block_line_bound = MIN( curr_block_start_line + block_height,
+      lines_bound );
+    
+    for( curr_horiz_block = 0 ; curr_horiz_block < blocks_per_line_col ;
+      ++curr_horiz_block ) {
+      
+      curr_block_start_col = rotated_window_radius +
+        ( curr_horiz_block * block_width );
+      curr_block_col_bound = MIN( curr_block_start_col + block_width,
+        cols_bound );  
+      
+      block_maxima_val = dbl_min;
+      blk_mean = 0.0;
+      blk_mean_diff = 0.0;
+      
+      for( curr_line = curr_block_start_line ;
+        curr_line < curr_block_line_bound ; ++curr_line ) {
+        for( curr_col = curr_block_start_col ;
+          curr_col < curr_block_col_bound ; ++curr_col ) {
+          
+          const double& curr_value = input_matrix( curr_line, 
+            curr_col );
+            
+          if( ( curr_value > dbl_min ) && ( curr_value < dbl_max ) )
+          {
+            blk_mean += curr_value;
+            
+            if( curr_value >= block_maxima_val ) {
+             
+              block_maxima_val = curr_value;
+              block_maxima_col = curr_col;
+              block_maxima_line = curr_line;
+            }            
+          }
+        }
+      }
+      
+      if( block_maxima_val != dbl_min )
+      {
+        blk_mean /= (double)( 
+          ( curr_block_line_bound - curr_block_start_line ) *
+          ( curr_block_col_bound - curr_block_start_col ) );
+        
+        blk_mean_diff = block_maxima_val - blk_mean;
+          
+        maxima_points_blkmean_diffs.push_back( blk_mean_diff );
+          
+        if( maxima_points_blkmean_diffs_max < blk_mean_diff )
+        {
+          maxima_points_blkmean_diffs_max = blk_mean_diff;
+        }
+        
+        if( maxima_points_blkmean_diffs_min > blk_mean_diff )
+        {
+          maxima_points_blkmean_diffs_min = blk_mean_diff;
+        }        
+        
+        internal_maxima_points.push_back( TeCoord2D( block_maxima_col, 
+          block_maxima_line ) );
+      }
+    }
+    
+    TEAGN_FALSE_OR_RETURN( progress.Increment(),
+      "Canceled by the user" );
+  }
+  
+  /* Post-selecting maxima points by the difference to blocks mean */
+  
+  double mean_diff_lim = ( ( maxima_points_blkmean_diffs_max -
+    maxima_points_blkmean_diffs_min ) * maximas_sens ) +
+    maxima_points_blkmean_diffs_min;
+    
+  maxima_points.reserve( blocks_per_line_col * 
+    blocks_per_line_col );
+        
+  for( unsigned int imp_idx = 0 ; imp_idx < internal_maxima_points.size() ;
+    ++imp_idx )
+  {
+    if( maxima_points_blkmean_diffs[ imp_idx ] >= mean_diff_lim )
+    {
+      maxima_points.push_back( internal_maxima_points[ imp_idx ] );
+    }
+  }
+  
+  return true;
+}
+
+
+bool TePDIOFMatching::generateCorrWindows( 
+  const ImgMatrixT& img_matrix,
+  unsigned int corr_window_width,
+  const std::vector< TeCoord2D >& img_maxima_points,
+  ImgMatrixT& img_features_matrix,
+  bool progress_enabled,
+  TeMutex& glb_mem_lock )
+{
+  TEAGN_TRUE_OR_THROW( img_matrix.GetColumns() *
+    img_matrix.GetLines() > 0,
+    "Invalid ls matrix" )
+  TEAGN_TRUE_OR_THROW( ( ( corr_window_width % 2 ) > 0 ),
+    "Invalid corr_window_width" )    
+  TEAGN_TRUE_OR_THROW( ( corr_window_width >= 3 ),
+    "Invalid corr_window_width" )      
+    
+  if( img_maxima_points.size() == 0 ) {
+    img_features_matrix.Reset();
+  } else {
+  /* Generating the image features */
+
+    /* each line is a stacked version of one rotated correlation 
+       window */
+       
+    glb_mem_lock.lock();
+    
+    if( ! img_features_matrix.Reset( img_maxima_points.size(),
+      corr_window_width * corr_window_width,
+      ImgMatrixT::RAMMemPol ) )
+    {
+      TEAGN_LOGERR( "Error allocating image features matrix" )
+      glb_mem_lock.unLock();
+      return false;
+    }
+      
+    glb_mem_lock.unLock();
+      
+    /* variables related to the current window over the hole image */
+    unsigned int curr_window_x_start = 0;
+    unsigned int curr_window_y_start = 0;
+    unsigned int curr_window_x_center = 0;
+    unsigned int curr_window_y_center = 0;
+    unsigned int curr_window_x_bound = 0;
+    unsigned int curr_window_y_bound = 0;
+    
+    /*used on the rotation calcule */
+    const unsigned int wind_radius = corr_window_width / 2;
+    const double wind_radius_double = (double)wind_radius;
+    const unsigned int img_features_matrix_cols = 
+      img_features_matrix.GetColumns();
+    unsigned int curr_x = 0;
+    unsigned int curr_y = 0;
+    double curr_x_minus_radius = 0;
+    double curr_y_minus_radius = 0;
+    unsigned int curr_offset = 0;
+    double int_x_dir = 0;
+    double int_y_dir = 0;
+    double int_norm = 0;
+    double rotated_curr_x = 0;/* rotaded coord - window ref */
+    double rotated_curr_y = 0;/* rotaded coord - window ref */
+    
+     /* the found rotation parameters */
+    double rot_cos = 0;
+    double rot_sin = 0;
+    
+    /* the coords rotated but in the hole image reference */
+    int rotated_curr_x_img = 0;
+    int rotated_curr_y_img = 0;
+    
+    /* current window mean and standart deviation */
+    double curr_wind_mean = 0.0;
+    double curr_wind_stddev = 0.0;
+    double curr_wind_stddev_aux = 0.0;
+    
+    TePDIPIManager progress( "Generating correlation windows",
+      img_maxima_points.size(), progress_enabled );     
+      
+    for( unsigned int img_maximas_index = 0 ; 
+      img_maximas_index < img_maxima_points.size() ; 
+      ++img_maximas_index ) {
+      
+      /* Calculating the current window position */
+     
+      curr_window_x_center = 
+        (unsigned int)img_maxima_points[ img_maximas_index ].x();
+      curr_window_y_center = 
+        (unsigned int)img_maxima_points[ img_maximas_index ].y();
+      curr_window_x_start = curr_window_x_center - wind_radius;
+      curr_window_y_start = curr_window_y_center - wind_radius;
+      curr_window_x_bound = curr_window_x_start + 
+        corr_window_width;
+      curr_window_y_bound = curr_window_y_start + 
+        corr_window_width;
+        
+      /* Estimating the intensity vector X direction */
+      
+      for( curr_offset = 0 ; curr_offset < wind_radius ;
+        ++curr_offset ) {      
+
+        for( curr_y = curr_window_y_start ; 
+          curr_y < curr_window_y_bound ;
+          ++curr_y ) {
+        
+          int_x_dir += 
+            img_matrix( curr_y, curr_window_x_bound - 1 - 
+              curr_offset ) - 
+            img_matrix( curr_y, 
+              curr_window_x_start + curr_offset );
+        }
+      }
+      
+      int_x_dir /= ( 2.0 * ( (double) wind_radius ) );
+      
+      /* Estimating the intensity vector y direction */
+      
+      for( curr_offset = 0 ; curr_offset < wind_radius ;
+        ++curr_offset ) {      
+
+        for( curr_x = curr_window_x_start ; 
+          curr_x < curr_window_x_bound ;
+          ++curr_x ) {
+        
+          int_y_dir += 
+            img_matrix( curr_window_y_start + curr_offset,
+              curr_x ) - 
+            img_matrix( curr_window_y_bound - 1 -
+              curr_offset, curr_x );
+        }
+      }      
+      
+      int_y_dir /= ( 2.0 * ( (double) wind_radius ) );
+      
+      /* Calculating the rotation parameters - 
+         counterclockwise rotation 
+         
+         | u |    |cos  -sin|   |X|
+         | v | == |sin   cos| x |Y|
+      */
+      int_norm = sqrt( ( int_x_dir * int_x_dir ) + 
+        ( int_y_dir * int_y_dir ) );
+      
+      if( int_norm != 0.0 ) {
+        rot_cos = int_x_dir / int_norm;
+        rot_sin = int_y_dir / int_norm;
+      } else {
+        /* No rotation */
+        rot_cos = 1.0;
+        rot_sin = 0.0;
+      }
+      
+      
+/* remove */
+//rot_cos = cos( M_PI_4 );
+//rot_sin = sin( M_PI_4 );
+//if( ( curr_window_x_center = 366 ) &&
+//  ( curr_window_y_center == 641 ) ) {
+//  double angle = atan( rot_sin / rot_cos );
+//  angle = angle + 1.0;
+//}
+//double angle = atan( rot_sin / rot_cos );
+/* remove */      
+      
+      
+      
+      /* Generating the rotated window data and inserting it into 
+         the img_features_matrix by setting the intensity vector
+         to the direction (1,0) by a clockwise rotation
+         using the inverse matrix 
+      
+         | u |    |cos   sin|   |X|
+         | v | == |-sin  cos| x |Y|
+      */
+         
+      for( curr_y = 0 ; curr_y < corr_window_width ; ++curr_y ) {
+        for( curr_x = 0 ; curr_x < corr_window_width ; ++curr_x ) {
+          /* briging the window to the coord system center */
+          
+          curr_x_minus_radius = ((double)curr_x) - 
+            wind_radius_double;
+          curr_y_minus_radius = ((double)curr_y) - 
+            wind_radius_double;
+          
+          /* rotating the centered window */
+          
+          rotated_curr_x = 
+            ( ( rot_cos * curr_x_minus_radius ) + 
+            ( rot_sin * curr_y_minus_radius ) );
+          
+          rotated_curr_y =
+            ( ( -1.0 * rot_sin * curr_x_minus_radius ) + 
+            ( rot_cos * curr_y_minus_radius ) );
+            
+          /* bringing the window back to its original
+             centered location */ 
+            
+          rotated_curr_x += wind_radius_double;
+          rotated_curr_y += wind_radius_double;
+          
+          /* copy the new rotated window to the output vector */
+            
+          rotated_curr_x_img = curr_window_x_start +
+            TeRound( rotated_curr_x );
+          rotated_curr_y_img = curr_window_y_start +
+            TeRound( rotated_curr_y );                        
+           
+          TEAGN_DEBUG_CONDITION( ( rotated_curr_x_img > 0 ), "" )
+          TEAGN_DEBUG_CONDITION( ( rotated_curr_x_img < 
+            (int)img_matrix.GetColumns() ), "" )
+          TEAGN_DEBUG_CONDITION( ( rotated_curr_y_img > 0 ), "" )
+          TEAGN_DEBUG_CONDITION( ( rotated_curr_y_img < 
+            (int)img_matrix.GetLines() ), "" )
+            
+          img_features_matrix( img_maximas_index, ( curr_y * 
+            corr_window_width ) + curr_x ) =
+            img_matrix( rotated_curr_y_img, rotated_curr_x_img );
+
+        }
+      }
+      
+      
+/* remove - skipping normalizing */
+//continue;
+/* remove */      
+      
+      
+      /* Normalizing the generated window by subtracting its mean
+         and dividing by its standard deviation */
+      
+      curr_wind_mean = 0.0;
+      
+      for( curr_x = 0 ; curr_x < img_features_matrix_cols ; 
+        ++curr_x ) {
+        
+        curr_wind_mean += img_features_matrix( img_maximas_index,
+          curr_x );
+      }
+      
+      curr_wind_mean /= ( (double)img_features_matrix_cols  );
+      
+      curr_wind_stddev = 0.0;  
+      
+      for( curr_x = 0 ; curr_x < img_features_matrix_cols ; 
+        ++curr_x ) {
+        
+        curr_wind_stddev_aux = img_features_matrix( 
+          img_maximas_index, curr_x ) - curr_wind_mean;
+          
+        curr_wind_stddev += ( curr_wind_stddev_aux *
+          curr_wind_stddev_aux );
+      }      
+      
+      curr_wind_stddev /= ( (double)img_features_matrix_cols  );
+      curr_wind_stddev = sqrt( curr_wind_stddev );
+      
+      if( curr_wind_stddev == 0.0 ) {
+        for( curr_x = 0 ; curr_x < img_features_matrix_cols ; 
+          ++curr_x ) {
+          
+          double& curr_value = img_features_matrix( 
+            img_maximas_index, curr_x );
+          
+          curr_value -= curr_wind_mean;
+        } 
+      } else {
+        for( curr_x = 0 ; curr_x < img_features_matrix_cols ; 
+          ++curr_x ) {
+          
+          double& curr_value = img_features_matrix( 
+            img_maximas_index, curr_x );
+          
+          curr_value -= curr_wind_mean;
+          curr_value /= curr_wind_stddev;
+        }
+      }
+      
+      /* Finished !! */
+     
+      TEAGN_FALSE_OR_RETURN( progress.Increment(),
+        "Canceled by the user" );
+    }
+  }    
+  
+  return true;
+}
+
+
+void TePDIOFMatching::features2Tiff( 
+  unsigned int corr_window_width,
+  const std::vector< TeCoord2D >& img_maxima_points,
+  ImgMatrixT& img_features_matrix,
+  const std::string& filenameaddon )
+{
+  TEAGN_TRUE_OR_THROW( ( img_features_matrix.GetLines() ==
+    img_maxima_points.size() ), 
+    "Invalid matrix lines" )
+  TEAGN_TRUE_OR_THROW( ( img_features_matrix.GetColumns() ==
+    ( corr_window_width * corr_window_width ) ), 
+    "Invalid matrix columns" )
+  TEAGN_TRUE_OR_THROW( ( corr_window_width > 0 ),
+    "Invalid corr_window_width" )      
+
+  for( unsigned int curr_wind_index = 0 ; 
+    curr_wind_index < img_features_matrix.GetLines() ;
+    ++curr_wind_index ) {
+    
+    TeRasterParams params;
+    params.setNLinesNColumns( corr_window_width,
+      corr_window_width );
+    params.nBands( 1 );
+    params.setDataType( TeDOUBLE, -1 );
+    params.nBands( 1 );
+    params.decoderIdentifier_ = "TIF";
+    params.mode_ = 'c';
+    params.fileName_ = Te2String( img_maxima_points[ 
+      curr_wind_index ].x(), 0 ) + "_" + Te2String( 
+      img_maxima_points[ curr_wind_index ].y(), 0 ) + 
+      "_" + filenameaddon + ".tif";
+    
+    TeRaster out_raster( params );
+    TEAGN_TRUE_OR_THROW( out_raster.init(), "Error init raster" );
+    
+    for( unsigned int line = 0 ; line < corr_window_width ; ++line ) {
+      for( unsigned int col = 0 ; col < corr_window_width ; ++col ) {
+
+        TEAGN_TRUE_OR_THROW( out_raster.setElement( col, line, 
+          img_features_matrix( curr_wind_index, ( line * 
+          corr_window_width ) + col ), 0 ), "Error writing raster" )
+      }  
+    }    
+  }
+}
+
+
+bool TePDIOFMatching::locateBestFeaturesMatching( 
+  const TeThreadParameters& params )
+{
+  /* Retriving parameters */
+  
+  std::vector< unsigned int >* features2_indexes_ptr = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "features2_indexes_ptr", 
+    features2_indexes_ptr ),
+    "Missing thread parameter" )
+  std::vector< unsigned int >& features2_indexes = *features2_indexes_ptr;    
+
+  std::vector< unsigned int >* features1_indexes_ptr = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "features1_indexes_ptr", 
+    features1_indexes_ptr ),
+    "Missing thread parameter" )
+  std::vector< unsigned int >& features1_indexes = *features1_indexes_ptr;
+  
+  TeMutex* features2_indexes_lock_ptr = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "features2_indexes_lock_ptr", 
+    features2_indexes_lock_ptr ),
+    "Missing thread parameter" )
+  TeMutex& features2_indexes_lock = 
+    *features2_indexes_lock_ptr;  
+    
+  TeMutex* features1_indexes_lock_ptr = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "features1_indexes_lock_ptr", 
+    features1_indexes_lock_ptr ),
+    "Missing thread parameter" )
+  TeMutex& features1_indexes_lock = 
+    *features1_indexes_lock_ptr;     
+
+  ImgMatrixT* img1_features_matrix_ptr = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "img1_features_matrix_ptr", 
+    img1_features_matrix_ptr ),
+    "Missing thread parameter" )
+  ImgMatrixT& img1_features_matrix =
+    *img1_features_matrix_ptr;
+    
+  ImgMatrixT* img2_features_matrix_ptr = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "img2_features_matrix_ptr", 
+    img2_features_matrix_ptr ),
+    "Missing thread parameter" )
+  ImgMatrixT& img2_features_matrix =
+    *img2_features_matrix_ptr;
+    
+  bool progress_enabled = false;   
+  TEAGN_TRUE_OR_THROW( params.retrive( "progress_enabled", 
+    progress_enabled ), "Missing thread parameter" )     
+    
+  double corr_sens = 0;   
+  TEAGN_TRUE_OR_THROW( params.retrive( "corr_sens", 
+    corr_sens ), "Missing thread parameter" )  
+    
+  TEAGN_DEBUG_CONDITION( ( img2_features_matrix.GetColumns() ==
+    img1_features_matrix.GetColumns() ),
+     "Size columns mismatch" )        
+    
+  /* Init the output featers2_indexes vector once */
+  
+  features2_indexes_lock.lock();
+  
+  if( features2_indexes.size() == 0 )
+  {
+    for( unsigned int features2_indexes_index = 0 ; 
+      features2_indexes_index < img1_features_matrix.GetLines() ;
+      ++features2_indexes_index ) {
+      
+      /* fills with an matrix lines number indicating
+         no processing done yet */
+      features2_indexes.push_back( 
+        img2_features_matrix.GetLines() );
+    }
+  }  
+  
+  features2_indexes_lock.unLock();
+  
+  /* Init the output featers2_indexes vector once */
+  
+  features1_indexes_lock.lock();
+  
+  if( features1_indexes.size() == 0 )
+  {
+    for( unsigned int features1_indexes_index = 0 ; 
+      features1_indexes_index < img2_features_matrix.GetLines() ;
+      ++features1_indexes_index ) {
+      
+      /* fills with an matrix lines number indicating
+         no processing done yet */
+      features1_indexes.push_back( 
+        img1_features_matrix.GetLines() );
+    }
+  }  
+  
+  features1_indexes_lock.unLock();  
+    
+  /* Iterating over img1_features_matrix */
+  
+  const unsigned int img1_features_matrix_lines = 
+    img1_features_matrix.GetLines();
+  const unsigned int img2_features_matrix_lines = 
+    img2_features_matrix.GetLines();  
+  
+  TePDIPIManager progress( "Matching features", 
+    img1_features_matrix_lines + img2_features_matrix_lines, 
+    progress_enabled );
+        
+  const unsigned int cols_nmb = img2_features_matrix.GetColumns();
+  const double max_allowed_diff = ((double)cols_nmb) / corr_sens;
+            
+  {
+    unsigned int mat1_line = 0;
+    unsigned int mat2_line = 0;
+    double min_diff_value = 0;
+    unsigned int min_diff_index = 0;
+    unsigned int curr_col = 0;
+    double curr_diff_value = 0;
+    double curr_elem_diff = 0;
+      
+    for( mat1_line = 0 ; 
+      mat1_line < img1_features_matrix_lines ; ++mat1_line ) {
+      
+      /* Looking for a non-processed feature */
+      
+      features2_indexes_lock.lock();
+      
+      if( features2_indexes[ mat1_line ] == 
+        img2_features_matrix_lines ) {
+        
+        /* Tell to other threads that the current correlation
+          is being calculated */
+        
+        features2_indexes[ mat1_line ] = img2_features_matrix_lines + 1;
+        features2_indexes_lock.unLock();
+        
+        /* Looking for the best correlation with matrix 2 */
+        
+        min_diff_value = DBL_MAX;
+        
+        for( mat2_line = 0 ; mat2_line < img2_features_matrix_lines ;
+          ++mat2_line ) {
+           
+          curr_diff_value = 0.0;
+          
+          for( curr_col = 0 ; curr_col < cols_nmb ; ++curr_col ) {
+            curr_elem_diff = img1_features_matrix( mat1_line,
+              curr_col ) - img2_features_matrix( mat2_line,
+              curr_col );
+              
+            curr_elem_diff *= curr_elem_diff;
+              
+            curr_diff_value += curr_elem_diff;
+          }
+          
+          curr_diff_value = sqrt( curr_diff_value );
+          
+          if( curr_diff_value < min_diff_value ) {
+            min_diff_value = curr_diff_value;
+            min_diff_index = mat2_line;
+          }
+        }
+        
+        if( min_diff_value <= max_allowed_diff ) {
+          features2_indexes_lock.lock();
+          
+          features2_indexes[ mat1_line ] = min_diff_index;
+          
+          features2_indexes_lock.unLock();
+        }
+      } else {
+        features2_indexes_lock.unLock();
+      }
+      
+      TEAGN_FALSE_OR_RETURN( progress.Increment(),
+        "Canceled by the user" );
+    }
+  }
+  
+  /* Iterating over img2_features_matrix */
+  
+  {
+    unsigned int mat1_line = 0;
+    unsigned int mat2_line = 0;
+    double min_diff_value = 0;
+    unsigned int min_diff_index = 0;
+    unsigned int curr_col = 0;
+    double curr_diff_value = 0;
+    double curr_elem_diff = 0;
+      
+    for( mat2_line = 0 ; 
+      mat2_line < img2_features_matrix_lines ; ++mat2_line ) {
+      
+      /* Looking for a non-processed feature */
+      
+      features1_indexes_lock.lock();
+      
+      if( features1_indexes[ mat2_line ] == 
+        img1_features_matrix_lines ) {
+        
+        /* Tell to other threads that the current correlation
+          is being calculated */
+        
+        features1_indexes[ mat2_line ] = img1_features_matrix_lines + 1;
+        features1_indexes_lock.unLock();
+        
+        /* Looking for the best correlation with matrix 1 */
+        
+        min_diff_value = DBL_MAX;
+        
+        for( mat1_line = 0 ; mat1_line < img1_features_matrix_lines ;
+          ++mat1_line ) {
+           
+          curr_diff_value = 0.0;
+          
+          for( curr_col = 0 ; curr_col < cols_nmb ; ++curr_col ) {
+            curr_elem_diff = img2_features_matrix( mat2_line,
+              curr_col ) - img1_features_matrix( mat1_line,
+              curr_col );
+              
+            curr_elem_diff *= curr_elem_diff;
+            
+            curr_diff_value += curr_elem_diff;
+          }
+          
+          curr_diff_value = sqrt( curr_diff_value );
+          
+          if( curr_diff_value < min_diff_value ) {
+            min_diff_value = curr_diff_value;
+            min_diff_index = mat1_line;
+          }
+        }
+        
+        if( min_diff_value <= max_allowed_diff ) {
+          features1_indexes_lock.lock();
+          
+          features1_indexes[ mat2_line ] = min_diff_index;
+          
+          features1_indexes_lock.unLock();
+        }
+      } else {
+        features1_indexes_lock.unLock();
+      }
+      
+      TEAGN_FALSE_OR_RETURN( progress.Increment(),
+        "Canceled by the user" );
+    }
+  }
+  
+  return true;  
+}
+
+
+bool TePDIOFMatching::checkMaximaPoints( 
+  const std::vector< TeCoord2D >&maximas ) const
+{
+  for( unsigned int idx1 = 0 ; idx1 < maximas.size() ; ++idx1 )
+  { 
+    for( unsigned int idx2 = idx1 + 1 ; idx2 < maximas.size() ; ++idx2 )
+    {
+      TEAGN_TRUE_OR_RETURN( (
+        ( maximas[ idx1 ].x() != maximas[ idx2 ].x() ) ||
+        ( maximas[ idx1 ].y() != maximas[ idx2 ].y() ) ),
+        "Invalid maxima points" +
+        std::string( " index1=" ) + Te2String( idx1 ) +
+        " [" + Te2String( maximas[ idx1 ].x(), 9 ) + "," +
+        Te2String( maximas[ idx1 ].y(), 9 ) + "]" +
+        std::string( " index2=" ) + Te2String( idx2 ) +
+        " [" + Te2String( maximas[ idx2 ].x(), 9 ) + "," +
+        Te2String( maximas[ idx2 ].y(), 9 ) + "]" )
+    }
+  }
+  
+  return true;
+}
+
+
+bool TePDIOFMatching::checkTPs( 
+  const TeCoordPairVect& tpsvec ) const
+{
+  for( unsigned int idx1 = 0 ; idx1 < tpsvec.size() ; ++idx1 )
+  { 
+    for( unsigned int idx2 = idx1 + 1 ; idx2 < tpsvec.size() ; 
+      ++idx2 )
+    {
+      TEAGN_TRUE_OR_RETURN( 
+        (
+          (
+            ( tpsvec[ idx1 ].pt1.x() != tpsvec[ idx2 ].pt1.x() ) ||
+            ( tpsvec[ idx1 ].pt1.y() != tpsvec[ idx2 ].pt1.y() ) 
+          ) &&
+          (
+            ( tpsvec[ idx1 ].pt2.x() != tpsvec[ idx2 ].pt2.x() ) ||
+            ( tpsvec[ idx1 ].pt2.y() != tpsvec[ idx2 ].pt2.y() ) 
+          )
+        ),
+        "Invalid tie-point" +
+        std::string( " index1=" ) + Te2String( idx1 ) +
+        " [" + Te2String( tpsvec[ idx1 ].pt1.x(), 9 ) + "," +
+        Te2String( tpsvec[ idx1 ].pt1.y(), 9 ) + " <-> " +
+        Te2String( tpsvec[ idx1 ].pt2.x(), 9 ) + "," +
+        Te2String( tpsvec[ idx1 ].pt2.y(), 9 ) + "]" +
+        std::string( " index2=" ) + Te2String( idx2 ) +
+        " [" + Te2String( tpsvec[ idx2 ].pt1.x(), 9 ) + "," +
+        Te2String( tpsvec[ idx2 ].pt1.y(), 9 ) + " <-> " +
+        Te2String( tpsvec[ idx2 ].pt2.x(), 9 ) + "," +
+        Te2String( tpsvec[ idx2 ].pt2.y(), 9 ) + "]" );
+    }
+  }
+  
+  return true;
+}
+
+
diff --git a/src/terralib/image_processing/TePDIOFMatching.hpp b/src/terralib/image_processing/TePDIOFMatching.hpp
new file mode 100644
index 0000000..1118400
--- /dev/null
+++ b/src/terralib/image_processing/TePDIOFMatching.hpp
@@ -0,0 +1,347 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIOFMATCHING_HPP
+  #define TEPDIOFMATCHING_HPP
+
+  #include "TePDIAlgorithm.hpp"
+  #include "TePDIMatrix.hpp"
+  
+  #include <TeThreadParameters.h>
+
+  /**
+   * @brief  Optical flow based image area matching.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIMatchingAlgorithms
+   *
+   * @note The required parameters are:
+   *
+   * @param input_image1_ptr (TePDITypes::TePDIRasterPtrType) - 
+   * The input image 1.
+   * @param input_channel1 ( unsigned int ) - Band to process 
+   * from input_image1.
+   *
+   * @param input_image2_ptr (TePDITypes::TePDIRasterPtrType) - 
+   * The input image 2.
+   * @param input_channel2 ( unsigned int ) - Band to process 
+   * from input_image2.
+   *
+   * @param out_tie_points_ptr ( TeSharedPtr< TeCoordPairVect > ) - The 
+   * output tie- points 
+   * where TeCoordPair.pt1 are input_image1 matricial
+   * indexes and TeCoordPair.pt2 are input_image2 matricial
+   * indexes.
+   *
+   * @note The Optional parameters are:
+   *
+   * @param gt_params ( TeGTParams ) - The geometric transformation
+   * parameters to be used (if not supplied, the dafult TeGTParams
+   * will be used - affine transformation, max direct mapping
+   * error = 1 pixel, max inverse mapping error = 1 pixel,
+   * LWAOutRemotion outliers remotion ).
+   *
+   * @param out_gt_params_ptr ( TeGTParams::pointer ) - The output 
+   * parameters of internally generated geometric transformation 
+   * (only valid when geometrical filtering is enabled).
+   *
+   * @param input_box1 ( TeBox ) - Box (image matrix coords) to process 
+   * from input_image1 ( the entire image will be used if no box
+   * was supplied )
+   *
+   * @param input_box2 ( TeBox ) - Box (image matrix coords) to process 
+   * from input_image2 ( the entire image will be used if no box
+   * was supplied )   
+   *
+   * @param enable_multi_thread (int) - If present (any value) 
+   * a multi-threaded processing will be used; Some TeDecoders do
+   * not support multi-thread so use it with cation
+   * (default: multi-thread disabled).
+   *
+   * @param pixel_x_relation (double) - The pixel resolution relation 
+   * pixel_x_relation = img1_pixel_res_x / img2_pixel_res_x (default=1.0);
+   *
+   * @param pixel_y_relation (double) - The pixel resolution relation 
+   * pixel_y_relation = img1_pixel_res_y / img2_pixel_res_y (default=1.0);   
+   *
+   * @param max_tie_points (unsigned int) - The maximum number
+   * of generated tie-points (default=529);   
+   *
+   * @param skip_geom_filter (int) - If present (any value) 
+   * will disable the geometric filtering
+   * ( default: geometric filtering enabled ). 
+   *
+   * @param corr_sens (double) - The correlation sensibility
+   * (default: 0.5 range: (0,3] ).
+   *
+   * @param corr_window_width (unsigned int) - The correlation 
+   * window width used to correlate points between 
+   * images (Must be an odd number, minimum 3, default: 21).  
+   *
+   * @param max_size_opt (unsigned int) - The maximum image box allowed
+   * size (size = pixels number = lines * columns); when the images pixels number
+   * exceed this value a downsample will be performed for optimization
+   * (default value=0 wich means optimization disabled).
+   *
+   * @param maximas_sens (double) - The maximas (candidate tie-points)
+   * detection sensibility
+   * (default: 0 range: [0,1] ).
+   */
+  class PDI_DLL TePDIOFMatching : public TePDIAlgorithm {
+    public :
+
+      /**
+       * @brief Default Constructor.
+       *
+       */
+      TePDIOFMatching();
+
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIOFMatching();
+
+      /**
+       * @brief Checks if the supplied parameters fits the requirements of each
+       * PDI algorithm implementation.
+       *
+       * @note Error log messages must be generated. No exceptions generated.
+       *
+       * @param parameters The parameters to be checked.
+       * @return true if the parameters are OK. false if not.
+       */
+      bool CheckParameters( const TePDIParameters& parameters ) const;
+
+    protected :
+    
+      /**
+       * @typedef TePDIMatrix< double > ImgMatrixT
+       * @brief A type definition for a image matrix.
+       */    
+      typedef TePDIMatrix< double > ImgMatrixT;
+    
+      /**
+       * @brief Runs the current algorithm implementation.
+       *
+       * @return true if OK. false on error.
+       */
+      bool RunImplementation();
+
+      /**
+       * @brief Reset the internal state to the initial state.
+       *
+       * @param params The new parameters referente at initial 
+       * state.
+       */
+      void ResetState( const TePDIParameters& params );
+      
+      /**
+       * @brief A thread entry point to load raster data into
+       * a simple matrix.
+       * @param params The parameters needed for the thread 
+       * execution.
+       * @return true if OK, false on errors.
+       */
+      static bool loadImage( const TeThreadParameters& params );
+      
+      /**
+       * @brief A thread entry point to generate the image features
+       * and the maxima points.
+       * @param params The parameters needed for the thread execution.
+       * @return true if OK, false on errors.
+       * @note The points inside img_maxima_points_ptr
+       * will have img_matrix_ptr reference.
+       */
+      static bool generateFeatures( 
+        const TeThreadParameters& params );      
+      
+      /**
+       * @brief Apply a gaussian smoothing over the input_matrix.
+       * @param input_matrix Input matrix.
+       * @param output_matrix Output matrix.
+       * @param iterations Iterations number.
+       * @param progress_enabled Progress interface enabled.
+       * @param glb_mem_lock a Reference to the global memory
+       * allocation mutex.
+       * @return true if OK, false on errors.
+       */      
+      static bool gaussianSmoothing( 
+        const ImgMatrixT& input_matrix,
+        ImgMatrixT& output_matrix, 
+        unsigned int iterations,
+        bool progress_enabled,
+        TeMutex& glb_mem_lock );
+        
+      /**
+       * @brief Generates a least squares surface from the input matrix.
+       * @param input_matrix Input matrix.
+       * @param ls_surface_matrix Output matrix containing the LS 
+       * surface.
+       * @param progress_enabled Progress interface enabled.
+       * @param glb_mem_lock a Reference to the global memory
+       * allocation mutex.       
+       * @return true if OK, false on errors.
+       */      
+      static bool generateLSSurface( 
+        const ImgMatrixT& input_matrix,
+        ImgMatrixT& ls_surface_matrix, 
+        bool progress_enabled,
+        TeMutex& glb_mem_lock );
+        
+      /**
+       * @brief Save the output matrix to a geotiff file.
+       * @param input_matrix Input matrix.
+       * @param out_file_name Output file name.
+       * @param maxima_points The maxima points to be
+       * filled with 255
+       */      
+      static void matrix2Tiff( 
+        const ImgMatrixT& input_matrix,
+        const std::string& out_file_name,
+        const std::vector< TeCoord2D >& maxima_points );
+        
+      /**
+       * @brief Save the output matrix to a geotiff file.
+       * @param input_raster Input raster.
+       * @param raster_channel Raster channel.
+       * @param out_file_name Output file name.
+       * @param maxima_points The maxima points to be drawed.
+       * @param out_tie_points_ptr The tie-points to be drawed.
+       * @param tie_points_space The tie-points space 
+       * (pt1 or pt2).
+       */      
+      static void raster2Tiff( 
+        const TePDITypes::TePDIRasterPtrType& input_raster_ptr,
+        unsigned int raster_channel,
+        const std::string& out_file_name,
+        const std::vector< TeCoord2D >& maxima_points,
+        const TeSharedPtr< TeCoordPairVect >& out_tie_points_ptr,
+        unsigned int tie_points_space );        
+        
+      /**
+       * @brief Get image local maxima points.
+       * @param input_matrix Input matrix.
+       * @param maxima_points The generated points.
+       * @param max_points The maximum number of generated points.
+       * @param corr_window_width The correlation window width
+       * (points outside the correlation window based valid image bounds
+       * will not be generated ).
+       * @param progress_enabled Progress interface enabled.
+       * @param maximas_sens Maximas sensibility to blocks mean
+       * ( block mean diff >= max blocks mean diff * maximas_sens )
+       * @return true if OK, false on errors.
+       */      
+      static bool getMaximaPoints( 
+        const ImgMatrixT& input_matrix,
+        std::vector< TeCoord2D >& maxima_points,
+        unsigned int max_points, unsigned int corr_window_width,
+        bool progress_enabled,
+        double maximas_sens ); 
+        
+      /**
+       * @brief Generate the rotated normalized corelation 
+       * windows matrix.
+       * @param img_matrix Input image matrix.
+       * @param corr_window_width The correlation windows width.
+       * @param img_maxima_points The image maxima points
+       * (these are the correlation matrix centers).
+       * @param img_features_matrix The output image
+       * features matrix ( each line is a stacked version
+       * of one rotated correlation window ).
+       * @param progress_enabled Progress interface enabled.
+       * @param glb_mem_lock a Reference to the global memory
+       * allocation mutex.        
+       * @return true if OK, false on errors.
+       */          
+      static bool generateCorrWindows( 
+        const ImgMatrixT& img_matrix,
+        unsigned int corr_window_width,
+        const std::vector< TeCoord2D >& img_maxima_points,
+        ImgMatrixT& img_features_matrix,
+        bool progress_enabled,
+        TeMutex& glb_mem_lock );
+        
+      /**
+       * @brief Save the generated features to tif files.
+       * @param corr_window_width The correlation windows width.
+       * @param img_maxima_points The image maxima points
+       * (these are the correlation matrix centers).
+       * @param img_features_matrix The output image
+       * features matrix ( each line is a stacked version
+       * of one rotated correlation window ).
+       * @filenameaddon A string to be appended to the
+       * file name of each feature file.
+       * @return true if OK, false on errors.
+       */          
+      static void features2Tiff( 
+        unsigned int corr_window_width,
+        const std::vector< TeCoord2D >& img_maxima_points,
+        ImgMatrixT& img_features_matrix,
+        const std::string& filenameaddon );   
+        
+      /**
+       * @brief A thread entry point to locate the
+       * best features matching index on matrix 2 from
+       * each feature on matrix 1.
+       * @param params The parameters needed for the 
+       * thread execution.
+       * @return true if OK, false on errors.
+       * 
+       * @note The internal used parameters:
+       * @param features2_indexes_ptr (std::vector< unsigned int >*)
+       * A pointer the the empty vector where the generated
+       * features matrix 2 indexes will be stored.
+       * @param features2_indexes_lock_ptr (TeMutex*) A thread
+       * lock object to access features2_indexes_ptr.
+       * @param img1_features_matrix_ptr (ImgMatrixT*) A pointer
+       * to the image 1 features matrix.
+       * @param img2_features_matrix_ptr (ImgMatrixT*) A pointer
+       * to the image 2 features matrix.
+       * @param progress_enabled (bool) Progress enabled flag.
+       * @param corr_sens (double) Correlation sensitivity.
+       */
+      static bool locateBestFeaturesMatching( 
+        const TeThreadParameters& params );      
+
+      /**
+       * @brief Check maxima points for repeated values.
+       * @param maximas Maxima points vector.
+       * @return true if OK, false on errors.
+       */
+      bool checkMaximaPoints( const std::vector< TeCoord2D >& maximas )
+        const;
+        
+      /**
+       * @brief Check tie-points indexes for repeated values.
+       * @param maximas Tie-points vector.
+       * @return true if OK, false on errors.
+       */
+      bool checkTPs( 
+        const TeCoordPairVect& tpsvec ) const;         
+  };
+  
+/** @example TePDIOFMatching_test.cpp
+ *    Shows how to use this class.
+ */    
+
+#endif
diff --git a/src/terralib/image_processing/TePDIPIManager.cpp b/src/terralib/image_processing/TePDIPIManager.cpp
new file mode 100755
index 0000000..d946b46
--- /dev/null
+++ b/src/terralib/image_processing/TePDIPIManager.cpp
@@ -0,0 +1,189 @@
+#include "TePDIPIManager.hpp"
+
+#include <TeAgnostic.h>
+
+/* Forcing the instantiation of global settings 
+   to avoid thread racing condition */
+namespace {
+  static TePDIPIManagerGlobalSettings& globalsettings = 
+    TePDIPIManagerGlobalSettings::instance();
+}
+
+TePDIPIManager::TePDIPIManager( const std::string& message, 
+  unsigned long int tsteps, bool enabled )
+{
+  enabled_ = false;
+  total_steps_ = tsteps;
+  curr_step_ = 0;
+  message_ = message;
+  
+  if( enabled ) {
+    Toggle( true );
+  }
+}
+
+
+TePDIPIManager::~TePDIPIManager()
+{
+  Toggle( false );
+}
+
+
+void TePDIPIManager::Toggle( bool enabled )
+{
+  TeProgressBase* prog_intef_ptr = TeProgress::instance();
+  
+  if( prog_intef_ptr ) {
+    TePDIPIManagerGlobalSettings& global_settings = 
+      TePDIPIManagerGlobalSettings::instance();
+    
+    if( ( ! enabled_ ) && enabled && ( total_steps_ > 0 ) ) {
+      /* Need to enable this instance */
+     
+      global_settings.lock_.lock();
+
+      if( global_settings.active_manager_instances_ == 0 ) {
+        /* No instance has control */
+        
+        global_settings.total_steps_ = total_steps_;
+        global_settings.curr_step_ = curr_step_;
+        /* keeping global_settings.curr_prop_step_ */
+        global_settings.active_manager_instances_ = 1;
+        global_settings.curr_message_ = message_;
+      } else {
+        /* More instances are controling */
+        
+        global_settings.total_steps_ += total_steps_;
+        global_settings.curr_step_ += curr_step_;
+        /* Keeping global_settings.curr_prop_step_ */
+        global_settings.active_manager_instances_ += 1;
+        global_settings.curr_message_.clear();
+      }
+      
+      enabled_ = true;
+      
+      updateProgressInterface( global_settings, prog_intef_ptr );
+      
+      global_settings.lock_.unLock();
+    } if( enabled_ && ( ! enabled ) ) {
+      /* Need to disable this instance */
+      
+      global_settings.lock_.lock();
+
+      if( global_settings.active_manager_instances_ == 1 ) {
+        /* Just this instance has control */
+        
+        global_settings.total_steps_ = 0;
+        global_settings.curr_step_ = 0;
+        /* keeping global_settings.curr_prop_step_ */
+        global_settings.active_manager_instances_ = 0;
+        global_settings.curr_message_.clear();
+      } else {
+        /* More instance are controling */
+        
+        /* keeping global_settings.total_steps_ */
+        global_settings.curr_step_ += ( total_steps_ - curr_step_ );
+        /* keeping global_settings.curr_prop_step_ */
+        global_settings.active_manager_instances_ -= 1;
+      }
+      
+      enabled_ = false;
+      
+      updateProgressInterface( global_settings, prog_intef_ptr );
+      
+      global_settings.lock_.unLock();      
+    }
+  }
+}
+
+
+bool TePDIPIManager::updateProgressInterface( 
+  TePDIPIManagerGlobalSettings& settings,
+  TeProgressBase* prog_intef_ptr ) const
+{
+  if( prog_intef_ptr->wasCancelled() ) {
+    if( settings.active_manager_instances_ == 0 ) {
+      prog_intef_ptr->reset();
+      return false;
+    } else {
+      return true;
+    }
+  } else {
+    if( settings.active_manager_instances_ == 0 ) {
+      settings.curr_prop_step_ = 0;
+      prog_intef_ptr->reset();    
+    } else {
+      unsigned long int new_prop_step = (unsigned long int)
+        ( 100.0 * 
+        ( ((double)settings.curr_step_) / 
+        ( (double)settings.total_steps_ ) ) );
+          
+      if( new_prop_step > settings.curr_prop_step_ ) {
+        prog_intef_ptr->setMessage( settings.curr_message_ );
+        prog_intef_ptr->setTotalSteps( 100 );
+        prog_intef_ptr->setProgress( new_prop_step );
+        
+        settings.curr_prop_step_ = new_prop_step;
+      }
+    } 
+    
+    return false; 
+  }
+}
+
+
+bool TePDIPIManager::Update( unsigned long int step )
+{
+  if( step > total_steps_ ) {
+    step = total_steps_;
+  }
+  
+  TeProgressBase* prog_intef_ptr = TeProgress::instance();
+  
+  if( enabled_ && prog_intef_ptr && ( step > curr_step_ ) ) {
+    TePDIPIManagerGlobalSettings& global_settings = 
+      TePDIPIManagerGlobalSettings::instance();
+    
+    global_settings.lock_.lock();
+
+    /* keeping global_settings.total_steps_ */
+    global_settings.curr_step_ += ( step - curr_step_ );
+    /* keeping global_settings.curr_prop_step_ */
+    /* keeping global_settings.active_manager_instances_ */
+    
+    curr_step_ = step;
+    
+    bool return_value = updateProgressInterface( global_settings, 
+      prog_intef_ptr );
+    
+    global_settings.lock_.unLock();      
+  
+    return return_value;
+  } else {
+    return false;
+  }
+}
+
+
+bool TePDIPIManager::Increment()
+{
+  return Update( (int)( curr_step_ + 1 ) );
+}
+
+
+void TePDIPIManager::Reset( const std::string& message, 
+  unsigned long int tsteps )
+{
+  bool old_enabled_state = enabled_;
+  
+  Toggle( false );
+  
+  total_steps_ = tsteps; 
+  curr_step_ = 0;
+  message_ = message;
+
+  if( old_enabled_state ) {
+    Toggle( true );
+  }  
+}
+
diff --git a/src/terralib/image_processing/TePDIPIManager.hpp b/src/terralib/image_processing/TePDIPIManager.hpp
new file mode 100755
index 0000000..15406ab
--- /dev/null
+++ b/src/terralib/image_processing/TePDIPIManager.hpp
@@ -0,0 +1,137 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIPIMANAGER_HPP
+  #define TEPDIPIMANAGER_HPP
+  
+  #include "TePDIPIManagerGlobalSettings.hpp"
+  
+  #include <TeProgress.h>
+  
+  #include <string>
+
+  /**
+   * @brief This is the class for the active progress interface management.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIAux
+   */
+  class PDI_DLL TePDIPIManager {
+  
+    public :
+    
+      /**
+       * @brief Default Constructor
+       *
+       * @param message Progress window message (label).
+       * @param tsteps Progress window total steps.
+       * @param enabled Flag to enable ( true ) or disable ( false ).
+       */
+      TePDIPIManager( const std::string& message = std::string(), 
+        unsigned long int tsteps = 0, bool enabled = false );    
+    
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIPIManager();
+      
+      /**
+       * @brief Enable / Disable the current progress interface manager.
+       *
+       * @param enabled Flag to enable ( true ) or disable ( false ).
+       */
+      void Toggle( bool enabled );  
+      
+      /**
+       * @brief Update the current progress interface to the supplied step.
+       *
+       * @param step Current step.
+       * @return true if the interface was canceled, false otherwise.
+       */
+      bool Update( unsigned long int step );      
+      
+      /**
+       * @brief Incriments the the current progress by one step.
+       * @return true if the interface was canceled, false otherwise.
+       */
+      bool Increment();
+
+      /**
+       * @brief Reset the current instance state.
+       * 
+       * @param message Message (label).
+       * @param tsteps Total steps.
+       */
+      void Reset( const std::string& message = std::string(), 
+        unsigned long int tsteps = 0 );
+        
+    protected :
+    
+      /**
+        * @brief A flag indicating if the PI manager is enabled.
+        */
+      bool enabled_;    
+
+      /**
+        * @brief The total steps number.
+        */
+      unsigned long int total_steps_;
+
+      /**
+        * @brief The current step.
+        */
+      unsigned long int curr_step_;
+      
+      /**
+        * @brief The progress interface message (label).
+        */
+      std::string message_;    
+     
+      /**
+       * @brief Updates the progress interface with the new settings.
+       * @note NO LOCK DONE !!
+       * @param settings The new progress interface manager to be applied.
+       * @param prog_intef_ptr Progres interface pointer.
+       * @return true if the interface was canceled, false otherwise.
+       */         
+      bool updateProgressInterface( 
+        TePDIPIManagerGlobalSettings& settings,
+        TeProgressBase* prog_intef_ptr ) const;
+        
+    private :
+    
+      /**
+       * @brief Alternative Constructor
+       */    
+      TePDIPIManager( const TePDIPIManager& ) {};
+      
+      /**
+       * @brief operator= overload.
+       */    
+      const TePDIPIManager& operator=( const TePDIPIManager& ) 
+      { 
+        return *this;
+      };
+  };
+
+#endif
diff --git a/src/terralib/image_processing/TePDIPIManagerGlobalSettings.hpp b/src/terralib/image_processing/TePDIPIManagerGlobalSettings.hpp
new file mode 100644
index 0000000..9a9704a
--- /dev/null
+++ b/src/terralib/image_processing/TePDIPIManagerGlobalSettings.hpp
@@ -0,0 +1,98 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIPIMANAGERGLOBALSETTINGS_HPP
+  #define TEPDIPIMANAGERGLOBALSETTINGS_HPP
+  
+  #include "TePDIDefines.hpp"
+  #include "TePDIPIManager.hpp"
+  
+  #include <TeMutex.h>
+  #include <TeSingleton.h>
+  
+  #include <string>
+
+  /**
+    * @brief Progress interface management global settings.
+    * @ingroup PDIAux
+    */    
+  class PDI_DLL TePDIPIManagerGlobalSettings : public 
+    TeSingleton< TePDIPIManagerGlobalSettings > {
+    
+      friend class TePDIPIManager;
+      
+    public :
+    
+      /**
+        * @brief Default constructor.
+        */
+      TePDIPIManagerGlobalSettings()
+      {
+        total_steps_ = 0;
+        curr_step_ = 0;
+        curr_prop_step_ = 0;
+        active_manager_instances_ = 0;
+      };         
+    
+      /**
+        * @brief Default desstructor.
+        */
+      ~TePDIPIManagerGlobalSettings() {};
+     
+    protected :
+    
+      /**
+        * @brief The lock instance needed to update the global
+        * settings.
+        */
+      TeMutex lock_;
+              
+      /**
+        * @brief The total steps number.
+        */
+      unsigned long int total_steps_;
+      
+      /**
+        * @brief The current step.
+        */
+      unsigned long int curr_step_;
+      
+      /**
+        * @brief The current proportional step ( 0 up to 100 ).
+        */
+      unsigned long int curr_prop_step_;    
+      
+      /**
+        * @brief The number of TePDIPIManager active instances.
+        */
+      unsigned long int active_manager_instances_;                   
+      
+      /**
+        * @brief The progress interface message (label).
+        */
+      std::string curr_message_;          
+  
+  };     
+      
+#endif    
diff --git a/src/terralib/image_processing/TePDIParameters.cpp b/src/terralib/image_processing/TePDIParameters.cpp
new file mode 100755
index 0000000..a7dc113
--- /dev/null
+++ b/src/terralib/image_processing/TePDIParameters.cpp
@@ -0,0 +1,65 @@
+#include "TePDIParameters.hpp"
+
+#include <TeAgnostic.h>
+
+#include <TeUtils.h>
+
+TePDIParameters::TePDIParameters()
+{
+}
+
+
+TePDIParameters::TePDIParameters( const TePDIParameters& external )
+: TeMultiContainer< std::string >( external )
+{
+}
+
+
+TePDIParameters::~TePDIParameters()
+{
+}
+
+
+void TePDIParameters::Clear()
+{
+  TeMultiContainer< std::string >::clear();
+}
+
+
+void TePDIParameters::SetdecName( const std::string& dec_name )
+{
+  TeMultiContainer< std::string >::store( "dec_name", dec_name );
+}
+
+
+std::string TePDIParameters::decName() const
+{
+  std::string return_string;
+  
+  TEAGN_TRUE_OR_THROW( TeMultiContainer< std::string >::retrive( "dec_name", 
+    return_string ), "Parameters descriptor not set" );
+  
+  return return_string;
+}
+
+
+bool TePDIParameters::operator==( const TePDIParameters& ext_instance ) const
+{
+  return TeMultiContainer< std::string >::operator==( ext_instance );
+}
+
+
+bool TePDIParameters::operator!=( const TePDIParameters& ext_instance ) const
+{
+  return TeMultiContainer< std::string >::operator!=( ext_instance );
+}
+
+
+const TePDIParameters& TePDIParameters::operator=( 
+  const TePDIParameters& ext_instance )
+{
+  TeMultiContainer< std::string >::operator=( ext_instance );
+  
+  return ext_instance;
+}
+
diff --git a/src/terralib/image_processing/TePDIParameters.hpp b/src/terralib/image_processing/TePDIParameters.hpp
new file mode 100755
index 0000000..e212481
--- /dev/null
+++ b/src/terralib/image_processing/TePDIParameters.hpp
@@ -0,0 +1,176 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+/**
+ *  @brief This file contains the class of structures and definitions
+ *   to deal with parameters used by all PDI classes.
+ */
+
+#ifndef TEPDIPARAMETERS_HPP
+  #define TEPDIPARAMETERS_HPP
+
+  #include "TePDITypes.hpp"
+  
+  #include <TeMultiContainer.h>
+  
+  #include <string>
+
+/**
+ * @brief This is the class to deal with parameters used by all PDI classes.
+ * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+ * @ingroup PDIAux
+ @note Do not use this class with polymorphic types !!
+ */
+  class PDI_DLL TePDIParameters : protected 
+    TeMultiContainer< std::string >
+  {
+    public :
+    
+      /** @typedef TeSharedPtr< TePDIParameters > pointer 
+          Type definition for a instance pointer */
+      typedef TeSharedPtr< TePDIParameters > pointer;
+      
+      /** @typedef const TeSharedPtr< TePDIParameters > const_pointer 
+          Type definition for a const instance pointer */
+      typedef const TeSharedPtr< TePDIParameters > const_pointer;
+
+      /**
+       * @brief Default Constructor
+       */
+      TePDIParameters();
+      
+      /**
+       * @brief Alternative Constructor
+       * @param external External reference.
+       */
+      TePDIParameters( const TePDIParameters& external );      
+
+      /**
+       * @brief  Default Destructor
+       */
+      ~TePDIParameters();
+      
+      /**
+       * @brief Set the a name descriptor for the current parameters.
+       *
+       * @param dec_name A a name descriptor for the current parameters. 
+       */                                                      
+      void SetdecName( const std::string& dec_name );                            
+                           
+      /**
+       * @brief Returns the a name descriptor for the current parameters.
+       *
+       * @return A a name descriptor for the current parameters. 
+       */                                                      
+      std::string decName() const;                           
+      
+      /**
+       * @brief Operator == overload.
+       *
+       * @param ext_instance External instance reference.
+       * @return true if this instance have the same internal
+       * parameters that the external instance.
+       */
+      bool operator==( const TePDIParameters& ext_instance ) const;
+      
+      /**
+       * @brief Operator != overload.
+       *
+       * @param ext_instance External instance reference.
+       * @return true if this instance don't have the same internal
+       * parameters that the external instance.
+       */
+      bool operator!=( const TePDIParameters& ext_instance ) const;
+      
+      /**
+       * @brief operator= overload.
+       *
+       * @param ext_instance External instance reference.
+       * @return The external instance reference.
+       */
+      const TePDIParameters& operator=( const TePDIParameters& ext_instance );
+      
+      /**
+       * @brief Clear all parameter contents.
+       *
+       */
+      void Clear();
+                         
+      /**
+       * @brief Store a parameter object copy.
+       *
+       * @param pname Parameter name.
+       * @param data Parameter object instance.
+       */                         
+      template< typename DataT >
+      void SetParameter( const std::string& pname,
+                         const DataT& data )
+      {
+        TeMultiContainer< std::string >::store( pname, data );
+      };
+      
+      /**
+       * @brief Retrive a copy of a stored object.
+       *
+       * @param pname Parameter name.
+       * @param data Output parameter data.
+       * @return true if OK, false if the parameter was no found or error.
+       */      
+      template< typename DataT >
+      bool GetParameter( const std::string& pname,
+                         DataT& data ) const
+      {
+        return TeMultiContainer< std::string >::retrive( pname, data );
+      };
+      
+      /** 
+       * @brief Checks if a parameter was set.
+       * 
+       * @param pname Parameter name.
+       * @note The parameter data type must be specified.
+       * @return true if OK, false if the parameter was not set.
+       */
+      template< typename DataT >
+      bool CheckParameter( const std::string& pname ) const
+      {
+        return TeMultiContainer< std::string >::isStored< DataT >( pname );
+      };
+      
+      /** 
+       * @brief Remove a stored parameter.
+       * 
+       * @param pname Parameter name.
+       */
+      void RemoveParameter( const std::string& pname )
+      {
+        TeMultiContainer< std::string >::remove( pname );
+      };      
+
+};
+
+/** @example TePDIParameters_test.cpp
+ *    Shows how to use this class.
+ */  
+
+#endif //TEPDIPARAMETERS_HPP
diff --git a/src/terralib/image_processing/TePDIPrincipalComponents.cpp b/src/terralib/image_processing/TePDIPrincipalComponents.cpp
new file mode 100755
index 0000000..84710e9
--- /dev/null
+++ b/src/terralib/image_processing/TePDIPrincipalComponents.cpp
@@ -0,0 +1,409 @@
+#include "TePDIPrincipalComponents.hpp"
+
+#include <TeAgnostic.h>
+#include "TePDIUtils.hpp"
+#include "TePDITypes.hpp"
+#include "TePDIStatistic.hpp"
+
+#include <TeMatrix.h>
+#include <TeUtils.h>
+
+#include <math.h>
+
+
+
+TePDIPrincipalComponents::TePDIPrincipalComponents()
+{
+}
+
+
+TePDIPrincipalComponents::~TePDIPrincipalComponents()
+{
+}
+
+
+void TePDIPrincipalComponents::ResetState(
+  const TePDIParameters&)
+{
+}
+
+
+bool TePDIPrincipalComponents::CheckParameters(
+  const TePDIParameters& parameters) const
+{
+/* Analysis type checking */
+	TePDIPCAType analysis_type;
+
+	TEAGN_TRUE_OR_RETURN(parameters.GetParameter("analysis_type", 
+	  analysis_type), "Missing parameter: analysis_type");
+	TEAGN_TRUE_OR_RETURN(
+	  ((analysis_type == TePDIPrincipalComponents::TePDIPCADirect) || 
+	  (analysis_type == TePDIPrincipalComponents::TePDIPCAInverse)), 
+	  "Invalid analysis type");
+
+/* Input rasters and bands checking */
+	
+	TePDITypes::TePDIRasterVectorType input_rasters;
+	
+	TEAGN_TRUE_OR_RETURN(parameters.GetParameter("input_rasters", input_rasters), "Missing parameter: input_rasters");
+	TEAGN_TRUE_OR_RETURN(input_rasters.size() > 1, "Invalid input rasters number");
+	
+	std::vector<int> bands;
+	
+	TEAGN_TRUE_OR_RETURN(parameters.GetParameter("bands", bands), "Missing parameter: bands");
+	TEAGN_TRUE_OR_RETURN(bands.size() == input_rasters.size(), "Invalid parameter: bands number");
+
+	for( unsigned int input_rasters_index = 0 ; input_rasters_index < input_rasters.size(); ++input_rasters_index )
+	{
+		TEAGN_TRUE_OR_RETURN(input_rasters[input_rasters_index].isActive(), "Invalid parameter: input_raster " + Te2String(input_rasters_index) + " inactive");
+		TEAGN_TRUE_OR_RETURN(input_rasters[input_rasters_index]->params().status_ != TeRasterParams::TeNotReady, "Invalid parameter: input_raster " + Te2String(input_rasters_index) + " not ready");
+		TEAGN_TRUE_OR_RETURN(bands[input_rasters_index] < input_rasters[input_rasters_index]->nBands(), "Invalid parameter: bands[ " + Te2String(input_rasters_index) + " ]");
+		TEAGN_TRUE_OR_RETURN(input_rasters[input_rasters_index]->params().nlines_ == input_rasters[0]->params().nlines_, "Invalid parameter: input_raster " + Te2String(input_rasters_index) + " with imcompatible number of lines");
+		TEAGN_TRUE_OR_RETURN(input_rasters[input_rasters_index]->params().ncols_ == input_rasters[ 0 ]->params().ncols_, "Invalid parameter: input_raster " + Te2String( input_rasters_index ) + " with imcompatible number of columns" );
+/* Checking photometric interpretation */
+		TEAGN_TRUE_OR_RETURN(((input_rasters[input_rasters_index]->params().photometric_[bands[input_rasters_index]] == TeRasterParams::TeRGB) || (input_rasters[input_rasters_index]->params().photometric_[bands[input_rasters_index]] == TeRasterParams::TeMultiBand)), "Invalid parameter - input_rasters (invalid photometric interpretation)" );
+	}
+
+/* Output rasters checking */
+
+	TePDITypes::TePDIRasterVectorType output_rasters;
+
+	TEAGN_TRUE_OR_RETURN(parameters.GetParameter("output_rasters", output_rasters), "Missing parameter: output_rasters");
+	TEAGN_TRUE_OR_RETURN(output_rasters.size() > 1, "Invalid output rasters number");
+	TEAGN_TRUE_OR_RETURN(output_rasters.size() == input_rasters.size(), "Invalid parameter: output rasters size");
+
+	for(unsigned int input_rasters_index2 = 0; input_rasters_index2 < input_rasters.size(); ++input_rasters_index2)
+	{
+		TEAGN_TRUE_OR_RETURN(input_rasters[input_rasters_index2].isActive(), "Invalid parameter: input_raster " + Te2String(input_rasters_index2) + " inactive");
+		TEAGN_TRUE_OR_RETURN(input_rasters[input_rasters_index2]->params().status_ != TeRasterParams::TeNotReady, "Invalid parameter: input_raster " + Te2String(input_rasters_index2) + " not ready");
+	}
+	
+	/* Checking covariance_matrix */
+
+	TeSharedPtr<TeMatrix> covariance_matrix;
+	TEAGN_TRUE_OR_RETURN(parameters.GetParameter("covariance_matrix", 
+	  covariance_matrix), "Missing parameter: covariance_matrix");
+
+/* Inverse type checking */
+
+	if (analysis_type == TePDIPrincipalComponents::TePDIPCAInverse)
+		TEAGN_TRUE_OR_RETURN((((unsigned)covariance_matrix->Nrow() == input_rasters.size()) && ((unsigned)covariance_matrix->Ncol() == input_rasters.size())), "Covariance matrix out of rasters bounds");
+		
+	return true;
+}
+
+bool TePDIPrincipalComponents::RunImplementation_direct()
+{
+	TePDITypes::TePDIRasterVectorType input_rasters;
+	params_.GetParameter("input_rasters", input_rasters);
+	
+	TePDITypes::TePDIRasterVectorType output_rasters;
+	params_.GetParameter("output_rasters", output_rasters);
+	
+	std::vector<int> bands;
+	params_.GetParameter("bands", bands);
+
+	TeSharedPtr<TeMatrix> covariance_matrix;
+	params_.GetParameter("covariance_matrix", covariance_matrix);
+	
+	TeRasterParams base_raster_params = input_rasters[0]->params();
+	
+/* Setting the output rasters */
+	
+	for(unsigned int outrasterindex = 0; outrasterindex < output_rasters.size(); ++outrasterindex)
+	{
+		TeRasterParams outRaster_params = output_rasters[outrasterindex]->params();
+		outRaster_params.nBands(1);
+		if (base_raster_params.projection() != 0)
+		{
+			TeSharedPtr<TeProjection> proj(TeProjectionFactory::make(base_raster_params.projection()->params())); 
+			outRaster_params.projection(proj.nakedPointer());
+		}
+		outRaster_params.boxResolution(base_raster_params.box().x1(), base_raster_params.box().y1(), base_raster_params.box().x2(), base_raster_params.box().y2(), base_raster_params.resx_, base_raster_params.resy_);
+		outRaster_params.setPhotometric(TeRasterParams::TeMultiBand, -1);
+		//outRaster_params.setDataType(TeDOUBLE, -1);
+	
+		TEAGN_TRUE_OR_RETURN(output_rasters[outrasterindex]->init(outRaster_params), "Raster reset error - Raster index " + Te2String(outrasterindex));
+	}
+	
+/* Finding the mininum and maximum allowed pixel values */
+	
+	double channel_min_level = 0;
+	double channel_max_level = 0;
+	
+	TEAGN_TRUE_OR_RETURN(TePDIUtils::TeGetRasterMinMaxBounds(input_rasters[0], bands[0], channel_min_level, channel_max_level), "Unable to get raster channel level bounds");
+	
+/* Initializing statistic module */
+	
+	TePDIStatistic stat;
+	
+	TePDIParameters stat_pars;
+	stat_pars.SetParameter("rasters", input_rasters);
+	stat_pars.SetParameter("bands", bands);
+	
+	TEAGN_TRUE_OR_RETURN(stat.Reset(stat_pars), "Unable to inialize the statistc module");
+	stat.ToggleProgInt(false);
+
+	
+/* Building covariance matrix from all used bands ( lines == columns ) */
+
+	TeSharedPtr<TeMatrix> x(new TeMatrix);
+	*covariance_matrix = stat.getCovMatrix();
+/* Building eigenvalues matrix from all used bands ( 1 column ) */
+
+	TeMatrix eigenvaluesmatrix;
+	TEAGN_TRUE_OR_RETURN(covariance_matrix->EigenValues(eigenvaluesmatrix), "Unable to build eigenvalue matrix");
+	
+/* Building eigenvectors matrix from all used bands (lines == columns) */
+
+	TeMatrix tempmatrix;
+	TEAGN_TRUE_OR_RETURN(covariance_matrix->EigenVectors(tempmatrix), "Unable to build eigenvectors matrix");
+	TeMatrix eigenvectors;
+	TEAGN_TRUE_OR_RETURN(tempmatrix.Transpose(eigenvectors), "Unable to build eigenvectors matrix");
+	
+/* Building auxiliary vectors for optimization */
+
+	std::vector< bool > in_dummy_use_vector;
+	for (unsigned int in_dummy_use_vector_index = 0; in_dummy_use_vector_index < input_rasters.size(); ++in_dummy_use_vector_index)
+	{
+		in_dummy_use_vector.push_back(input_rasters[in_dummy_use_vector_index]->params().useDummy_);
+	}
+
+	std::vector< double > out_dummy_vector;
+	for (unsigned int out_dummy_vector_index = 0; out_dummy_vector_index < output_rasters.size(); ++out_dummy_vector_index)
+	{
+		if (output_rasters[out_dummy_vector_index]->params().useDummy_)
+		{
+			out_dummy_vector.push_back(output_rasters[out_dummy_vector_index]->params().dummy_[0]);
+		}
+		else
+		{
+			out_dummy_vector.push_back(0.0);
+		}
+	}
+	
+/* Do level remapping based on each matrix above */
+	TeMatrix in_values; /* input levels */
+	in_values.Init(bands.size(), 1, 0.0);
+	
+	TeMatrix intermediary_values;
+	intermediary_values.Init(bands.size(), 1, 0.0);
+	
+	int line;
+	int column;
+	unsigned int index;
+	unsigned int index_bound = bands.size();
+	double value;
+	bool missing_pixel = false;
+
+	TePDIPIManager progress("Generating principal components", base_raster_params.nlines_, progress_enabled_);
+	for(line = 0 ; line < base_raster_params.nlines_ ; line++)
+	{
+		for(column = 0 ; column < base_raster_params.ncols_; ++column)
+		{
+/* Retriving the levels from all bands for the current line and column */
+			missing_pixel = false;
+	
+			for(index = 0 ; index < index_bound ; ++index)
+			{
+				if (input_rasters[index]->getElement(column, line, value, bands[index]))
+				{
+					in_values(index, 0) = value;
+				}
+				else
+				{
+					TEAGN_TRUE_OR_RETURN(in_dummy_use_vector[index], "Raster read error");
+					missing_pixel = true;
+					break;
+				}
+			}
+	
+			if (missing_pixel)
+			{
+				for(index = 0 ; index < index_bound; ++index)
+				{
+					TEAGN_TRUE_OR_RETURN(output_rasters[index]->setElement(column, line, out_dummy_vector[index], 0), "Unable to set raster element - raster index " + Te2String(index));
+				}
+			}
+			else
+			{
+				intermediary_values = eigenvectors * in_values;
+/* Remapping levels */
+				for(index = 0; index < index_bound; ++index)
+				{
+					value = intermediary_values(index, 0);
+/* Level range filtering */
+// 					if (value < channel_min_level)
+// 					{
+// 						value = channel_min_level;
+// 					}
+// 					else if(value > channel_max_level)
+// 					{
+// 						value = channel_max_level;
+// 					}
+
+					TEAGN_TRUE_OR_RETURN(output_rasters[index]->setElement(column, line, value, 0), "Unable to set raster element - raster index " + Te2String(index));
+				}
+			}
+		}
+		progress.Increment();
+	}
+	progress.Toggle(false);
+
+	return true;
+}
+
+bool TePDIPrincipalComponents::RunImplementation_inverse()
+{
+	TePDITypes::TePDIRasterVectorType input_rasters;
+	params_.GetParameter("input_rasters", input_rasters);
+	
+	TePDITypes::TePDIRasterVectorType output_rasters;
+	params_.GetParameter("output_rasters", output_rasters);
+	
+	std::vector<int> bands;
+	params_.GetParameter("bands", bands);
+
+	TeSharedPtr<TeMatrix> covariance_matrix;
+	params_.GetParameter("covariance_matrix", covariance_matrix);
+	
+	TeRasterParams base_raster_params = input_rasters[0]->params();
+	
+/* Setting the output rasters */
+	
+	for(unsigned int outrasterindex = 0; outrasterindex < output_rasters.size(); ++outrasterindex)
+	{
+		TeRasterParams outRaster_params = output_rasters[outrasterindex]->params();
+		outRaster_params.nBands(1);
+		if (base_raster_params.projection() != 0)
+		{
+			TeSharedPtr<TeProjection> proj(TeProjectionFactory::make(base_raster_params.projection()->params())); 
+			outRaster_params.projection(proj.nakedPointer());
+		}
+		outRaster_params.boxResolution(base_raster_params.box().x1(), base_raster_params.box().y1(), base_raster_params.box().x2(), base_raster_params.box().y2(), base_raster_params.resx_, base_raster_params.resy_);
+		outRaster_params.setPhotometric(TeRasterParams::TeMultiBand, -1);
+		outRaster_params.setDataType(TeDOUBLE, -1);
+	
+		TEAGN_TRUE_OR_RETURN(output_rasters[outrasterindex]->init(outRaster_params), "Raster reset error - Raster index " + Te2String(outrasterindex));
+	}
+	
+/* Finding the mininum and maximum allowed pixel values */
+	
+	double channel_min_level = 0;
+	double channel_max_level = 0;
+	
+	TEAGN_TRUE_OR_RETURN(TePDIUtils::TeGetRasterMinMaxBounds(input_rasters[0], bands[0], channel_min_level, channel_max_level), "Unable to get raster channel level bounds");
+	
+/* Initializing statistic module */
+	
+	TeMatrix eigenvaluesmatrix;
+	TEAGN_TRUE_OR_RETURN(covariance_matrix->EigenValues(eigenvaluesmatrix), "Unable to build eigenvalue matrix");
+	
+/* Building eigenvectors matrix from all used bands (lines == columns) */
+
+	TeMatrix eigenvectors;
+	TEAGN_TRUE_OR_RETURN(covariance_matrix->EigenVectors(eigenvectors), "Unable to build eigenvectors matrix");
+	
+/* Building auxiliary vectors for optimization */
+
+	std::vector< bool > in_dummy_use_vector;
+	for (unsigned int in_dummy_use_vector_index = 0; in_dummy_use_vector_index < input_rasters.size(); ++in_dummy_use_vector_index)
+	{
+		in_dummy_use_vector.push_back(input_rasters[in_dummy_use_vector_index]->params().useDummy_);
+	}
+
+	std::vector< double > out_dummy_vector;
+	for (unsigned int out_dummy_vector_index = 0; out_dummy_vector_index < output_rasters.size(); ++out_dummy_vector_index)
+	{
+		if (output_rasters[out_dummy_vector_index]->params().useDummy_)
+		{
+			out_dummy_vector.push_back(output_rasters[out_dummy_vector_index]->params().dummy_[0]);
+		}
+		else
+		{
+			out_dummy_vector.push_back(0.0);
+		}
+	}
+	
+/* Do level remapping based on each matrix above */
+	TeMatrix in_values; /* input levels */
+	in_values.Init(bands.size(), 1, 0.0);
+	
+	TeMatrix intermediary_values;
+	intermediary_values.Init(bands.size(), 1, 0.0);
+	
+	int line;
+	int column;
+	unsigned int index;
+	unsigned int index_bound = bands.size();
+	double value;
+	bool missing_pixel = false;
+	
+	TePDIPIManager progress("Generating original images", base_raster_params.nlines_, progress_enabled_);
+	for(line = 0 ; line < base_raster_params.nlines_ ; line++)
+	{
+		for(column = 0 ; column < base_raster_params.ncols_; ++column)
+		{
+/* Retriving the levels from all bands for the current line and column */
+			missing_pixel = false;
+			for(index = 0 ; index < index_bound ; ++index)
+			{
+				if (input_rasters[index]->getElement(column, line, value, bands[index]))
+					in_values(index, 0) = value;
+				else
+				{
+					TEAGN_TRUE_OR_RETURN(in_dummy_use_vector[index], "Raster read error");
+					missing_pixel = true;
+					break;
+				}
+			}
+	
+			if (missing_pixel)
+			{
+				for(index = 0 ; index < index_bound; ++index)
+				{
+					TEAGN_TRUE_OR_RETURN(output_rasters[index]->setElement(column, line, out_dummy_vector[index], 0), "Unable to set raster element - raster index " + Te2String(index));
+				}
+			}
+			else
+			{
+				intermediary_values = eigenvectors * in_values;
+/* Remapping levels */
+				for(index = 0; index < index_bound; ++index)
+				{
+					value = intermediary_values(index, 0);
+
+/* Level range filtering */
+					if (value < channel_min_level)
+					{
+						value = channel_min_level;
+					}
+					else if(value > channel_max_level)
+					{
+						value = channel_max_level;
+					}
+					TEAGN_TRUE_OR_RETURN(output_rasters[index]->setElement(column, line, value, 0), "Unable to set raster element - raster index " + Te2String(index));
+				}
+			}
+		}
+		progress.Increment();
+	}
+	progress.Toggle(false);
+
+	return true;
+}
+
+bool TePDIPrincipalComponents::RunImplementation()
+{
+	TePDIPCAType analysis_type;
+	params_.GetParameter("analysis_type", analysis_type);
+
+	if (analysis_type == TePDIPrincipalComponents::TePDIPCADirect)
+		return RunImplementation_direct();
+	else if (analysis_type == TePDIPrincipalComponents::TePDIPCAInverse)
+		return RunImplementation_inverse();
+
+	return true;
+}
+
+
diff --git a/src/terralib/image_processing/TePDIPrincipalComponents.hpp b/src/terralib/image_processing/TePDIPrincipalComponents.hpp
new file mode 100755
index 0000000..fdbd8f0
--- /dev/null
+++ b/src/terralib/image_processing/TePDIPrincipalComponents.hpp
@@ -0,0 +1,114 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIPRINCIPALCOMPONENTS_HPP
+  #define TEPDIPRINCIPALCOMPONENTS_HPP
+
+  #include "TePDIAlgorithm.hpp"
+  #include <TeSharedPtr.h>
+
+  /**
+   * @brief This is the class for principal components generation.
+   * @author Felipe Castro da Silva <felipe at dpi.inpe.br>
+   * @ingroup TePDIGeneralAlgoGroup
+   *
+   * @note The required parameters are:
+   *
+   * @param analysis_type ( TePDIPrincipalComponents::TePDIPCAType )
+   * @param input_rasters ( TePDITypes::TePDIRasterVectorType )
+   * @param output_rasters ( TePDITypes::TePDIRasterVectorType )
+   * @param bands ( std::vector< int > ) - The bands from each input raster.
+   * @param covariance_matrix ( TeSharedPtr<TeMatrix> ) - This
+   * is the output covariance matrix generated when TePDIPCADirect
+   * is used, or, this is the input covariance matrix when
+   * TePDIPCAInverse is used.
+   *
+   */
+  class PDI_DLL TePDIPrincipalComponents : public TePDIAlgorithm {
+    public :
+      /** @enum TePDIPCAType Direction of the PCA analisys */
+      enum TePDIPCAType
+      {
+        TePDIPCADirect, 
+        TePDIPCAInverse
+      };
+
+      /**
+       * @brief Default Constructor.
+       *
+       */
+      TePDIPrincipalComponents();
+
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIPrincipalComponents();
+
+      /**
+       * @brief Checks if the supplied parameters fits the requirements of each
+       * PDI algorithm implementation.
+       *
+       * @note Error log messages must be generated. No exceptions generated.
+       *
+       * @param parameters The parameters to be checked.
+       * @return true if the parameters are OK. false if not.
+       */
+      bool CheckParameters( const TePDIParameters& parameters ) const;
+      
+    protected :
+      
+      /**
+       * @brief Decide the direction of the analysis based on the analysis_type parameter.
+       *
+       * @return true if OK. false on error.
+       */
+      bool RunImplementation();
+
+      /**
+       * @brief Runs the direct algorithm.
+       *
+       * @return true if OK. false on error.
+       */
+      bool RunImplementation_direct();
+
+      /**
+       * @brief Runs the inverse algorithm.
+       *
+       * @return true if OK. false on error.
+       */
+      bool RunImplementation_inverse();
+
+      /**
+       * @brief Reset the internal state to the initial state.
+       *
+       * @param params The new parameters referente at initial state.
+       */
+      void ResetState( const TePDIParameters& params );
+  };
+  
+/** @example TePDIPrincipalComponents_test.cpp
+ *    Shows how to use this class.
+ */    
+
+#endif //TEPDIPRINCIPALCOMPONENTS_HPP
diff --git a/src/terralib/image_processing/TePDIPrincipalComponentsFactory.cpp b/src/terralib/image_processing/TePDIPrincipalComponentsFactory.cpp
new file mode 100755
index 0000000..cc26646
--- /dev/null
+++ b/src/terralib/image_processing/TePDIPrincipalComponentsFactory.cpp
@@ -0,0 +1,24 @@
+ 
+#include "TePDIPrincipalComponentsFactory.hpp"
+#include "TePDIPrincipalComponents.hpp"
+#include <TeAgnostic.h>
+
+TePDIPrincipalComponentsFactory::TePDIPrincipalComponentsFactory()
+: TePDIAlgorithmFactory( std::string( "TePDIPrincipalComponents" ) )
+{
+};      
+
+TePDIPrincipalComponentsFactory::~TePDIPrincipalComponentsFactory()
+{
+};
+
+
+TePDIAlgorithm* TePDIPrincipalComponentsFactory::build ( const TePDIParameters& arg )
+{
+  TePDIAlgorithm* instance_ptr = new TePDIPrincipalComponents();
+  
+  TEAGN_TRUE_OR_THROW( instance_ptr->Reset( arg ),
+    "Invalid parameters" );
+  
+  return instance_ptr;
+}
diff --git a/src/terralib/image_processing/TePDIPrincipalComponentsFactory.hpp b/src/terralib/image_processing/TePDIPrincipalComponentsFactory.hpp
new file mode 100755
index 0000000..a2fb165
--- /dev/null
+++ b/src/terralib/image_processing/TePDIPrincipalComponentsFactory.hpp
@@ -0,0 +1,68 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIPRINCIPALCOMPONENTSFACTORY_HPP
+  #define TEPDIPRINCIPALCOMPONENTSFACTORY_HPP
+
+  #include <TeSharedPtr.h>
+  #include "TePDIAlgorithmFactory.hpp"
+  #include "TePDIParameters.hpp"
+  
+  /**
+   * @brief This is the class for principal components algorithm factory.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIAlgorithmsFactories
+   */
+  class PDI_DLL TePDIPrincipalComponentsFactory : public TePDIAlgorithmFactory
+  {
+    public :
+      
+      /**
+       * @brief Default constructor
+       */
+      TePDIPrincipalComponentsFactory();      
+      
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIPrincipalComponentsFactory();
+      
+      protected :  
+      /**
+       * @brief Implementation for the abstract TeFactory::build.
+       *
+       * @param arg A const reference to the parameters used by the
+       * algorithm.
+       * @return A pointer to the new generated algorithm instance.
+       */
+      TePDIAlgorithm* build( const TePDIParameters& arg );
+      
+  };
+  
+  namespace {
+    static TePDIPrincipalComponentsFactory 
+      TePDIPrincipalComponentsFactory_instance;
+  };  
+
+#endif
diff --git a/src/terralib/image_processing/TePDIPrincipalComponentsFusion.cpp b/src/terralib/image_processing/TePDIPrincipalComponentsFusion.cpp
new file mode 100644
index 0000000..ca803e8
--- /dev/null
+++ b/src/terralib/image_processing/TePDIPrincipalComponentsFusion.cpp
@@ -0,0 +1,241 @@
+#include "TePDIPrincipalComponentsFusion.hpp"
+
+#include <TeAgnostic.h>
+#include "TePDIUtils.hpp"
+#include "TePDITypes.hpp"
+#include "TePDIStatistic.hpp"
+#include "TePDIPrincipalComponents.hpp"
+#include "TeRasterRemap.h"
+#include <TeMatrix.h>
+#include <TeUtils.h>
+#include <math.h>
+
+TePDIPrincipalComponentsFusion::TePDIPrincipalComponentsFusion()
+{
+}
+
+TePDIPrincipalComponentsFusion::~TePDIPrincipalComponentsFusion()
+{
+}
+
+void TePDIPrincipalComponentsFusion::ResetState(const TePDIParameters& /*params*/)
+{
+}
+
+bool TePDIPrincipalComponentsFusion::CheckParameters(const TePDIParameters& parameters) const
+{
+/* Input rasters and bands checking */
+
+	TePDITypes::TePDIRasterVectorType input_rasters;
+	TEAGN_TRUE_OR_RETURN(parameters.GetParameter("input_rasters", input_rasters), "Missing parameter: input_rasters");
+	TEAGN_TRUE_OR_RETURN(input_rasters.size() > 1, "Invalid input rasters number");
+	
+	std::vector<int> bands;
+	TEAGN_TRUE_OR_RETURN(parameters.GetParameter("bands", bands), "Missing parameter: bands");
+	TEAGN_TRUE_OR_RETURN(bands.size() == input_rasters.size(), "Invalid parameter: bands number");
+
+	for( unsigned int input_rasters_index = 0 ; input_rasters_index < input_rasters.size(); ++input_rasters_index )
+	{
+		TEAGN_TRUE_OR_RETURN(input_rasters[input_rasters_index].isActive(), "Invalid parameter: input_raster " + Te2String(input_rasters_index) + " inactive");
+		TEAGN_TRUE_OR_RETURN(input_rasters[input_rasters_index]->params().status_ != TeRasterParams::TeNotReady, "Invalid parameter: input_raster " + Te2String(input_rasters_index) + " not ready");
+		TEAGN_TRUE_OR_RETURN(bands[input_rasters_index] < input_rasters[input_rasters_index]->nBands(), "Invalid parameter: bands[" + Te2String(input_rasters_index) + "]");
+		TEAGN_TRUE_OR_RETURN(input_rasters[input_rasters_index]->params().nlines_ == input_rasters[0]->params().nlines_, "Invalid parameter: input_raster " + Te2String(input_rasters_index) + " with imcompatible number of lines");
+		TEAGN_TRUE_OR_RETURN(input_rasters[input_rasters_index]->params().ncols_ == input_rasters[0]->params().ncols_, "Invalid parameter: input_raster " + Te2String( input_rasters_index ) + " with imcompatible number of columns" );
+		TEAGN_TRUE_OR_RETURN(((input_rasters[input_rasters_index]->params().photometric_[bands[input_rasters_index]] == TeRasterParams::TeRGB) || (input_rasters[input_rasters_index]->params().photometric_[bands[input_rasters_index]] == TeRasterParams::TeMultiBand)), "Invalid parameter - input_rasters (invalid photometric interpretation)");
+	}
+
+/* Reference raster checking */
+
+	int reference_raster_band;
+	TEAGN_TRUE_OR_RETURN(parameters.GetParameter("reference_raster_band", reference_raster_band), "Missing parameter: reference_raster_band");
+
+	TePDITypes::TePDIRasterPtrType reference_raster;
+	TEAGN_TRUE_OR_RETURN(parameters.GetParameter("reference_raster", reference_raster), "Missing parameter: reference_raster");
+	TEAGN_TRUE_OR_RETURN(((reference_raster->params().photometric_[reference_raster_band] == TeRasterParams::TeRGB ) || (reference_raster->params().photometric_[reference_raster_band] == TeRasterParams::TeMultiBand)), "Invalid parameter - reference_raster (invalid photometric interpretation)");
+
+	TEAGN_TRUE_OR_RETURN(reference_raster_band < reference_raster->nBands(), "Invalid parameter - reference_raster_band");
+
+/* Output rasters checking */
+
+	TePDITypes::TePDIRasterVectorType output_rasters;
+	TEAGN_TRUE_OR_RETURN(parameters.GetParameter("output_rasters", output_rasters), "Missing parameter: output_rasters");
+	TEAGN_TRUE_OR_RETURN(output_rasters.size() > 1, "Invalid output rasters number");
+	TEAGN_TRUE_OR_RETURN(output_rasters.size() == input_rasters.size(), "Invalid parameter: output rasters size");
+
+	for(unsigned int input_rasters_index2 = 0; input_rasters_index2 < input_rasters.size(); ++input_rasters_index2)
+	{
+		TEAGN_TRUE_OR_RETURN(input_rasters[input_rasters_index2].isActive(), "Invalid parameter: input_raster " + Te2String(input_rasters_index2) + " inactive");
+		TEAGN_TRUE_OR_RETURN(input_rasters[input_rasters_index2]->params().status_ != TeRasterParams::TeNotReady, "Invalid parameter: input_raster " + Te2String(input_rasters_index2) + " not ready");
+	}
+
+	InterpMethod resampling_type;
+	TEAGN_TRUE_OR_RETURN(parameters.GetParameter("resampling_type", resampling_type), "Missing parameter: resampling_type");
+
+	bool fit_histogram;
+	TEAGN_TRUE_OR_RETURN(parameters.GetParameter("fit_histogram", fit_histogram), "Missing parameter: fit_histogram");
+
+	return true;
+}
+
+bool TePDIPrincipalComponentsFusion::RunImplementation()
+{
+/* Getting parameters */
+
+	TePDITypes::TePDIRasterVectorType input_rasters;
+	TEAGN_TRUE_OR_RETURN(params_.GetParameter("input_rasters", input_rasters), "Missing parameter: input_rasters");
+
+	std::vector<int> bands_direct;
+	TEAGN_TRUE_OR_RETURN(params_.GetParameter("bands", bands_direct), "Missing parameter: bands");
+
+	TePDITypes::TePDIRasterVectorType output_rasters;
+	TEAGN_TRUE_OR_RETURN(params_.GetParameter("output_rasters", output_rasters), "Missing parameter: output_rasters");
+
+	TePDITypes::TePDIRasterPtrType reference_raster;
+	TEAGN_TRUE_OR_RETURN(params_.GetParameter("reference_raster", reference_raster), "Missing parameter: reference_raster");
+
+	int reference_raster_band;
+	TEAGN_TRUE_OR_RETURN(params_.GetParameter("reference_raster_band", reference_raster_band), "Missing parameter: reference_raster_band");
+
+	InterpMethod resampling_type;
+	TEAGN_TRUE_OR_RETURN(params_.GetParameter("resampling_type", resampling_type), "Missing parameter: resampling_type");
+
+	bool fit_histogram;
+	TEAGN_TRUE_OR_RETURN(params_.GetParameter("fit_histogram", fit_histogram), "Missing parameter: fit_histogram");
+
+/* Resampling the input raster */
+
+	TeRasterParams resampled_input_rasters_params = input_rasters[0]->params();
+	if (reference_raster->projection() != 0)
+		resampled_input_rasters_params.projection(reference_raster->projection());
+	resampled_input_rasters_params.boxResolution(reference_raster->params().box().x1(), reference_raster->params().box().y1(), reference_raster->params().box().x2(), reference_raster->params().box().y2(), reference_raster->params().resx_, reference_raster->params().resy_);
+  
+	TePDITypes::TePDIRasterVectorType resampled_input_rasters;
+	for(unsigned int b = 0; b < input_rasters.size(); b++)
+	{
+		if (resampling_type != NothingMethod)
+		{
+		  TePDIInterpolator::InterpMethod int_method = 
+		    TePDIInterpolator::NNMethod;
+		  switch( resampling_type )
+		  {
+		    case NNMethod :
+		      int_method = TePDIInterpolator::NNMethod;
+		      break;
+		    case BilinearMethod :
+		      int_method = TePDIInterpolator::BilinearMethod;
+		      break;
+		    case BicubicMethod :
+		      int_method = TePDIInterpolator::BicubicMethod;
+		      break;
+		    default :
+		      TEAGN_LOG_AND_THROW( "Invalid resapling method" );
+		      break;
+		  }
+		  		
+			TePDITypes::TePDIRasterPtrType resampled_input_rasters_temp;
+			TEAGN_TRUE_OR_RETURN(TePDIUtils::TeAllocRAMRaster(resampled_input_rasters_temp,  resampled_input_rasters_params, TePDIUtils::TePDIUtilsAutoMemPol), "Unable create the resampled input rasters");
+			TEAGN_TRUE_OR_RETURN( TePDIUtils::resampleRasterByLinsCols(input_rasters[b], 
+			  resampled_input_rasters_temp, 
+			  (unsigned int)reference_raster->params().nlines_, 
+			  (unsigned int)reference_raster->params().ncols_, 
+			  progress_enabled_,
+			  int_method), "Raster resample error" );
+			resampled_input_rasters.push_back(resampled_input_rasters_temp);
+		}
+		else
+			resampled_input_rasters.push_back(input_rasters[b]);
+	}
+
+/* PCA Direct analysis */
+
+	TePDITypes::TePDIRasterVectorType output_rasters_direct;
+	for (unsigned b = 0; b < output_rasters.size(); b++)
+	{
+		TePDITypes::TePDIRasterPtrType outRaster_direct;
+		TEAGN_TRUE_OR_THROW(TePDIUtils::TeAllocRAMRaster(outRaster_direct, 1, 1, 1, false, TeDOUBLE, 0), "RAM Raster " + Te2String(b) + " Alloc error");
+		output_rasters_direct.push_back(outRaster_direct);
+	}
+
+	TeSharedPtr<TeMatrix> covariance_matrix(new TeMatrix);
+	
+	TePDIPrincipalComponents::TePDIPCAType analysis_type = 
+	  TePDIPrincipalComponents::TePDIPCADirect;
+
+	TePDIParameters params_direct;
+
+	params_direct.SetParameter("analysis_type", analysis_type);
+	params_direct.SetParameter("input_rasters", resampled_input_rasters);
+	params_direct.SetParameter("bands", bands_direct);
+	params_direct.SetParameter("output_rasters", output_rasters_direct);
+	params_direct.SetParameter("covariance_matrix", covariance_matrix);
+	
+	TePDIPrincipalComponents pc_direct;
+	TEAGN_TRUE_OR_THROW(pc_direct.Reset(params_direct), "Invalid Parameters");
+	pc_direct.ToggleProgInt(progress_enabled_);
+	TEAGN_TRUE_OR_THROW(pc_direct.Apply(), "Apply error");
+
+/* Computing statistics to fit the histograms */
+	
+	double	pixel,
+		gain = 1.0,
+		offset = 0.0;
+
+	if (fit_histogram)
+	{
+		TePDIStatistic stat;
+		
+		TePDIParameters stat_pars;
+		TePDITypes::TePDIRasterVectorType stat_rasters;
+		stat_rasters.push_back(output_rasters_direct[0]);
+		stat_rasters.push_back(reference_raster);
+		stat_pars.SetParameter("rasters", stat_rasters);
+		std::vector<int> stat_bands;
+		stat_bands.push_back(0);
+		stat_bands.push_back(reference_raster_band);
+		stat_pars.SetParameter("bands", stat_bands);
+		
+		TEAGN_TRUE_OR_RETURN(stat.Reset(stat_pars), "Unable to inialize the statistc module");
+		stat.ToggleProgInt(false);
+	
+		TeMatrix	std_matrix = stat.getStdDevMatrix(),
+				mean_matrix = stat.getMeanMatrix();
+	
+/* Swapping reference raster by first principal component */
+
+		gain = std_matrix(0, 0) / std_matrix(1, 0);
+		offset = mean_matrix(0, 0) - (gain * mean_matrix(0, 1));
+	}
+
+	TePDIPIManager progress("Swapping PCA 1 by reference raster", reference_raster->params().ncols_, progress_enabled_);
+	for (int j = 0; j < reference_raster->params().nlines_; j++)
+	{
+		for (int i = 0; i < reference_raster->params().ncols_; i++)
+		{
+			if (reference_raster->getElement(i, j, pixel, reference_raster_band))
+				output_rasters_direct[0]->setElement(i, j, gain*pixel+offset, 0);
+		}
+		progress.Increment();
+	}
+	progress.Toggle(false);
+
+/* Inverse analysis */
+
+	analysis_type = TePDIPrincipalComponents::TePDIPCAInverse;
+	
+	TePDIParameters params_inverse;
+
+	std::vector< int > bands_inverse(output_rasters.size(), 0);
+
+	params_inverse.SetParameter("analysis_type", analysis_type);
+	params_inverse.SetParameter("input_rasters", output_rasters_direct);
+	params_inverse.SetParameter("bands", bands_inverse);
+	params_inverse.SetParameter("output_rasters", output_rasters);
+	params_inverse.SetParameter("covariance_matrix", covariance_matrix);
+	
+	TePDIPrincipalComponents pc_inverse;
+	TEAGN_TRUE_OR_THROW(pc_inverse.Reset(params_inverse), "Invalid Parameters");
+	pc_inverse.ToggleProgInt(progress_enabled_);
+	TEAGN_TRUE_OR_THROW(pc_inverse.Apply(), "Apply error");
+
+	return true;
+}
diff --git a/src/terralib/image_processing/TePDIPrincipalComponentsFusion.hpp b/src/terralib/image_processing/TePDIPrincipalComponentsFusion.hpp
new file mode 100644
index 0000000..ac61ab7
--- /dev/null
+++ b/src/terralib/image_processing/TePDIPrincipalComponentsFusion.hpp
@@ -0,0 +1,107 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIPRINCIPALCOMPONENTSFUSION_HPP
+  #define TEPDIPRINCIPALCOMPONENTSFUSION_HPP
+
+  #include "TePDIAlgorithm.hpp"
+
+  /**
+   * @brief This is the class for principal components generation.
+   * @author Felipe Castro da Silva <felipe at dpi.inpe.br>
+   * @ingroup PDIFusionAlgorithms
+   *
+   * @note The required parameters are:
+   *
+   * @param input_rasters (TePDITypes::TePDIRasterVectorType) - Low resolution rasters.
+   * @param bands (std::vector< int >) - The bands from each low resolution raster.
+   * @param output_rasters (TePDITypes::TePDIRasterVectorType) - High resolution fused rasters.
+   * @param reference_raster (TePDITypes::TePDIRasterPtrType) - High resolution raster.
+   * @param reference_raster_band (int) - Reference raster band number.
+   * @param resampling_type (TePDIPrincipalComponentsFusion::InterpMethod) - Resampling type.
+   * @param fit_histogram (bool) - ???
+   * @param output_rasters (TePDITypes::TePDIRasterVectorType) - High resolution fused rasters.
+   *
+   */
+  class PDI_DLL TePDIPrincipalComponentsFusion : public TePDIAlgorithm {
+    public :
+      
+      /**
+       * @enum Allowed resampling methods.
+       */      
+      enum InterpMethod {
+        /** No interpolation performed. */
+        NothingMethod = 0,
+        /** Near neighborhood interpolation method. */
+        NNMethod = 1,
+        /** Bilinear interpolation method. */
+        BilinearMethod = 2,
+        /** Bicubic interpolation method. */
+        BicubicMethod = 3      
+      };      
+
+      /**
+       * @brief Default Constructor.
+       *
+       */
+      TePDIPrincipalComponentsFusion();
+
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIPrincipalComponentsFusion();
+
+      /**
+       * @brief Checks if the supplied parameters fits the requirements of each
+       * PDI algorithm implementation.
+       *
+       * @note Error log messages must be generated. No exceptions generated.
+       *
+       * @param parameters The parameters to be checked.
+       * @return true if the parameters are OK. false if not.
+       */
+      bool CheckParameters( const TePDIParameters& parameters ) const;
+      
+    protected :
+      
+      /**
+       * @brief Decide the direction of the analysis based on the analysis_type parameter.
+       *
+       * @return true if OK. false on error.
+       */
+      bool RunImplementation();
+
+      /**
+       * @brief Reset the internal state to the initial state.
+       *
+       * @param params The new parameters referente at initial state.
+       */
+      void ResetState( const TePDIParameters& params );
+  };
+  
+/** @example TePDIFusion_test.cpp
+ *    Fusion algorithms test.
+ */    
+
+#endif //TEPDIPRINCIPALCOMPONENTS_HPP
diff --git a/src/terralib/image_processing/TePDIPrincoMixModelSF.cpp b/src/terralib/image_processing/TePDIPrincoMixModelSF.cpp
new file mode 100755
index 0000000..41c744e
--- /dev/null
+++ b/src/terralib/image_processing/TePDIPrincoMixModelSF.cpp
@@ -0,0 +1,21 @@
+#include "TePDIPrincoMixModelSF.hpp"
+#include "TePDIPrincoMixModelStrategy.hpp"
+
+TePDIPrincoMixModelSF::TePDIPrincoMixModelSF()
+: TePDIMixModelStratFactory( std::string( "princo" ) )
+{
+};
+
+
+TePDIPrincoMixModelSF::~TePDIPrincoMixModelSF()
+{
+};
+
+
+TePDIMixModelStrategy* TePDIPrincoMixModelSF::build ( const TePDIParameters& )
+{
+  TePDIMixModelStrategy* instance_ptr = new TePDIPrincoMixModelStrategy();
+  
+  return instance_ptr;
+}
+
diff --git a/src/terralib/image_processing/TePDIPrincoMixModelSF.hpp b/src/terralib/image_processing/TePDIPrincoMixModelSF.hpp
new file mode 100755
index 0000000..09428a8
--- /dev/null
+++ b/src/terralib/image_processing/TePDIPrincoMixModelSF.hpp
@@ -0,0 +1,59 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIPRINCOMIXMODELSF_HPP
+#define TEPDIPRINCOMIXMODELSF_HPP
+
+#include <TeSharedPtr.h>
+#include "TePDIMixModelStratFactory.hpp"
+#include "TePDIParameters.hpp"
+#include "TePDIStrategy.hpp"
+
+/**
+* @brief This is the class for garguet fusion strategy factory.
+* @author Felipe Castro da Silva <felipe at dpi.inpe.br>
+* @ingroup PDIStrategiesFactories
+*/
+
+class PDI_DLL TePDIPrincoMixModelSF : public TePDIMixModelStratFactory
+{
+	public:
+/**Default constructor.*/
+		TePDIPrincoMixModelSF();
+/**Default cestructor.*/
+		~TePDIPrincoMixModelSF();
+
+	protected:
+/**
+* Implementation for the abstract TeFactory::build.
+* @param arg A const reference to the parameters used by the
+* algorithm.
+* @return A pointer to the new generated strategy instance.
+*/
+		TePDIMixModelStrategy* build( const TePDIParameters& arg );
+};
+
+namespace{static TePDIPrincoMixModelSF TePDIPrincoMixModelSF_instance;};
+
+#endif
diff --git a/src/terralib/image_processing/TePDIPrincoMixModelStrategy.cpp b/src/terralib/image_processing/TePDIPrincoMixModelStrategy.cpp
new file mode 100755
index 0000000..fdf13a7
--- /dev/null
+++ b/src/terralib/image_processing/TePDIPrincoMixModelStrategy.cpp
@@ -0,0 +1,555 @@
+#include <TePDIPrincoMixModelStrategy.hpp>
+
+TePDIPrincoMixModelStrategy::TePDIPrincoMixModelStrategy()
+{
+};
+
+TePDIPrincoMixModelStrategy::~TePDIPrincoMixModelStrategy()
+{
+};
+
+bool TePDIPrincoMixModelStrategy::CheckParameters(const TePDIParameters& parameters) const
+{
+// Components e spectralbands checking
+
+  TePDIMixModelComponentList componentList;
+  TEAGN_TRUE_OR_RETURN(parameters.GetParameter("component_list", componentList), "Missing parameter: component_list");
+
+  TePDIMixModelSpectralBandList spectralBandList;
+  TEAGN_TRUE_OR_RETURN(parameters.GetParameter("spectral_band_list", spectralBandList), "Missing parameter: spectral_band_list");
+
+  TEAGN_TRUE_OR_RETURN(componentList.getSize() <= spectralBandList.getSize(), "Invalid parameter: componentsNumber greater than spectralBandsNumber");
+  for (unsigned int nc = 0; nc < componentList.getSize(); nc++)
+    TEAGN_TRUE_OR_RETURN(componentList.getComponentSize(nc) == 
+      (int)spectralBandList.getSize(), 
+      "Invalid parameter: components bands diferred from spectralBandsNumber");
+    
+
+// Input rasters and bands checking
+
+  TePDITypes::TePDIRasterVectorType input_rasters;
+  TEAGN_TRUE_OR_RETURN(parameters.GetParameter("input_rasters", input_rasters), "Missing parameter: input_rasters");
+  TEAGN_TRUE_OR_RETURN(input_rasters.size() > 1, "Invalid input rasters number");
+
+  TEAGN_TRUE_OR_RETURN(input_rasters.size() == spectralBandList.getSize(), "Invalid parameter: input_raster number diferred from spectralBandsNumber");
+
+  std::vector<int> bands;
+  TEAGN_TRUE_OR_RETURN(parameters.GetParameter("bands", bands), "Missing parameter: bands");
+  TEAGN_TRUE_OR_RETURN(bands.size() == input_rasters.size(), Te2String(input_rasters.size()) + " Invalid parameter: bands number " + Te2String(bands.size()));
+
+  for (unsigned int input_rasters_index = 0 ; input_rasters_index < input_rasters.size(); input_rasters_index++)
+  {
+    TEAGN_TRUE_OR_RETURN(input_rasters[input_rasters_index].isActive(), "Invalid parameter: input_raster " + Te2String(input_rasters_index) + " inactive");
+    TEAGN_TRUE_OR_RETURN(input_rasters[input_rasters_index]->params().status_ != TeRasterParams::TeNotReady, "Invalid parameter: input_raster " + Te2String(input_rasters_index) + " not ready");
+    TEAGN_TRUE_OR_RETURN(bands[input_rasters_index] < input_rasters[input_rasters_index]->nBands(), "Invalid parameter: bands[" + Te2String(input_rasters_index) + "]");
+        TEAGN_TRUE_OR_RETURN(input_rasters[input_rasters_index]->params().nlines_ == input_rasters[0]->params().nlines_, "Invalid parameter: input_raster " + Te2String(input_rasters_index) + " with imcompatible number of lines");
+    TEAGN_TRUE_OR_RETURN(input_rasters[input_rasters_index]->params().ncols_ == input_rasters[0]->params().ncols_, "Invalid parameter: input_raster " + Te2String(input_rasters_index) + " with imcompatible number of columns" );
+  }
+ 
+// Output rasters checking
+
+  TePDITypes::TePDIRasterVectorType output_rasters;
+  TEAGN_TRUE_OR_RETURN(parameters.GetParameter("output_rasters", output_rasters), "Missing parameter: output_rasters");
+  TEAGN_TRUE_OR_RETURN(output_rasters.size() > 1, "Invalid output rasters number");
+
+// Compute error raster flag checking
+  int computeErrorRasters;
+  TEAGN_TRUE_OR_RETURN(parameters.GetParameter("compute_error_rasters", computeErrorRasters), "Missing parameter: compute error rasters");
+  if (computeErrorRasters)
+  {
+    TePDITypes::TePDIRasterVectorType output_error_rasters;
+    TEAGN_TRUE_OR_RETURN(parameters.GetParameter("output_error_rasters", output_error_rasters), "Missing parameter: output_error_rasters");
+    TEAGN_TRUE_OR_RETURN(output_error_rasters.size() > 1, "Invalid output error rasters number");
+  }
+
+// Normalize flag checking
+  int normalize;
+  TEAGN_TRUE_OR_RETURN(parameters.GetParameter("normalize", normalize), "Missing parameter: normalize");
+  TEAGN_TRUE_OR_RETURN((normalize >= 0) && (normalize <= 1) , "Inavlid parameter value: normalize");
+  
+  return true;
+}
+
+int SGaussElimination (TeMatrix& Z, std::vector<int>& line, unsigned int componentsNumber)
+{
+  int     i, j, k,
+              aux;
+  double  auxd, m;
+ 
+  int nrows = Z.Nrow();
+
+  // Verify matrix and vector sizes
+  TEAGN_TRUE_OR_RETURN(nrows >= Z.Ncol(), "Matrix not square");
+   TEAGN_TRUE_OR_RETURN( ((int)componentsNumber) >= nrows, "Vector Size");
+
+  // Initialize changed lines indicator
+  for (i = 0; i < nrows; i++)
+          line[i] = i;
+
+  // Diagonalization Process
+  for (k = 0; k < nrows; k++)
+  {
+    i = k;
+    while (Z(i, k) == 0.0)
+    {
+      TEAGN_TRUE_OR_RETURN(i != nrows-1, "Singular Matrix");
+      i++;
+    }
+
+    if (k != i)
+    {
+      // Update changed lines indicator 
+      aux = line[i];
+      line[i] = line[k];              
+      line[k] = aux;
+
+      // Change lines 
+      for (j=0; j < nrows; j ++)
+      {
+        auxd = Z(k,j);
+        Z(k,j) = Z (i, j);  
+        Z (i, j) = auxd;
+      }
+    }
+
+    // Recompute lines i = k + 1,..., componentsNumber - 1 
+    for (i = k + 1; i < nrows; i++)
+    {
+      m = Z(i, k)/Z(k, k);
+      Z(i, k) = m;
+      for (j = k + 1; j < nrows; j++)
+        Z (i, j) = Z (i, j) - m * Z(k,j);
+    }
+
+       } // End of diagonalization process
+
+  TEAGN_TRUE_OR_RETURN(Z(nrows-1, nrows-1) != 0.0, "Singular Matrix");
+
+  return true;
+}
+
+int SFowardBackSubstitution (TeMatrix& Z, std::vector<double>& y, int ys, std::vector<int>& line, int lines, std::vector<double>& x, int xs)
+{
+  int  nrows = Z.Nrow(); 
+
+  // Verify matrix and vector sizes
+  TEAGN_TRUE_OR_RETURN(nrows >= Z.Ncol(), "Matriz not square");
+  TEAGN_TRUE_OR_RETURN(!((lines < nrows) || (ys < nrows) || (xs < nrows)), "Vector Size");
+
+  int k, j;
+  double aux;
+  std::vector<double> F(nrows, 0.0);
+
+  // Foward substuitution 
+  for (k = 0; k < nrows; k++)
+  {
+    aux = 0.;
+    for (j = 0; j <= k - 1; j ++)
+      aux = aux + Z(k,j) * F[j];
+    F[k] = y[line[k]] - aux;
+  }
+
+  // Backward substitution  
+  for (k= nrows - 1; k >= 0; k--)
+  {
+    aux = 0.;
+    for (j = k + 1; j < nrows; j++)
+      aux = aux + Z(k,j) * x[j];
+    x[k] = (F[k] - aux)/Z(k,k);
+  }
+
+  return true;
+} 
+
+bool TePDIPrincoMixModelStrategy::Implementation(const TePDIParameters& params)
+{
+// Check components e spectralbands parameters
+  TePDIMixModelComponentList componentList;
+  TEAGN_TRUE_OR_RETURN(params.GetParameter("component_list", componentList), "Missing parameter: component_list");
+
+  TePDIMixModelSpectralBandList spectralBandList;
+  TEAGN_TRUE_OR_RETURN(params.GetParameter("spectral_band_list", spectralBandList), "Missing parameter: spectral_band_list");
+
+  unsigned int  componentsNumber = componentList.getSize(),
+      spectralBandsNumber = spectralBandList.getSize(),
+      componentsNumberLessOne = componentsNumber - 1;
+
+// Check input_rasters parameter
+  TePDITypes::TePDIRasterVectorType input_rasters;
+  TEAGN_TRUE_OR_RETURN(params.GetParameter("input_rasters", input_rasters), "Missing parameter: input_rasters");
+  
+  std::vector<int> bands;
+  TEAGN_TRUE_OR_RETURN(params.GetParameter("bands", bands), 
+    "Missing parameter: bands");
+
+// Check output_rasters parameter
+  TePDITypes::TePDIRasterVectorType output_rasters;
+  TEAGN_TRUE_OR_RETURN(params.GetParameter("output_rasters", output_rasters), "Missing parameter: output_rasters");
+
+// Initialize output_rasters based on first input raster
+
+  TeRasterParams base_raster_params = input_rasters[0]->params();
+  base_raster_params.setDataType( TeDOUBLE, -1 );
+  base_raster_params.nBands( 1 );
+  
+  for(unsigned int outrasterindex = 0; outrasterindex < output_rasters.size(); ++outrasterindex )
+    TEAGN_TRUE_OR_THROW(TePDIUtils::TeAllocRAMRaster(
+      output_rasters[outrasterindex], base_raster_params, false ), 
+      "pp_input_raster Alloc error");
+
+// Check compute error raster parameter and outout error rasters if it's necessary
+  int computeErrorRasters;
+  TEAGN_TRUE_OR_RETURN(params.GetParameter("compute_error_rasters", computeErrorRasters), "Missing parameter: compute_error_asters");
+  TePDITypes::TePDIRasterVectorType output_error_rasters;
+  if (computeErrorRasters)
+  {
+    TEAGN_TRUE_OR_RETURN(params.GetParameter("output_error_rasters", output_error_rasters), "Missing parameter: output_error_rasters");
+    for(unsigned int outrasterindex = 0; outrasterindex < output_error_rasters.size(); ++outrasterindex )
+      TEAGN_TRUE_OR_THROW(TePDIUtils::TeAllocRAMRaster(
+        output_error_rasters[outrasterindex], base_raster_params,
+        false ), "pp_input_raster Alloc error");
+  }
+
+// Check compute average error
+  int computeAverageError;
+  TEAGN_TRUE_OR_RETURN(params.GetParameter("compute_average_error", computeAverageError), "Missing parameter: compute_average_error_");
+  double averageError;
+  if (computeAverageError)
+    TEAGN_TRUE_OR_RETURN(params.GetParameter("average_error", averageError), "Missing parameter: average_error");
+
+// Check normalize
+  int normalize;
+  TEAGN_TRUE_OR_RETURN(params.GetParameter("normalize", normalize), "Missing parameter: normalize");
+
+// Getting number of lines and columns from the first image
+  int rastersLines = base_raster_params.nlines_;
+  int rastersColumns = base_raster_params.ncols_;
+
+// Indexes variables
+  unsigned int  i,
+      j,
+      k,
+      m;
+
+// Buildind the SpectralBandsComponents Matrix base on input componentsList and spectralBandList
+  TeMatrix SpectralBandsComponents;
+  SpectralBandsComponents.Init(spectralBandsNumber, componentsNumber, 0.0);
+  for(i = 0; i < spectralBandsNumber; i++)
+    for (j = 0; j < componentsNumber; j++)
+      SpectralBandsComponents(i, j) = componentList.getPixel(j, i);
+//Printing
+//cout << "SpectralBandsComponents" << endl;
+//SpectralBandsComponents.Print();
+
+//----- Part I : mathematical processing independend on image data -----//
+
+// SpectralBandsComponentsTransposed stores SpectralBandsComponents and other things after
+   TeMatrix SpectralBandsComponentsTransposed;
+// Initializing SpectralBandsComponentsTransposed Matrix
+  TEAGN_TRUE_OR_RETURN(SpectralBandsComponentsTransposed.Init(componentsNumber, spectralBandsNumber, 0.0), "Error initializing SpectralBandsComponentsTransposed Matrix");
+// Initializing SpectralBandsComponentsTransposed Matrix = Transpose of SpectralBandsComponents
+   TEAGN_TRUE_OR_RETURN(SpectralBandsComponents.Transpose(SpectralBandsComponentsTransposed), "Error transposing SpectralBandsComponents to SpectralBandsComponentsTransposed");
+
+//Printing
+//cout << "SpectralBandsComponentsTransposed - After transposing" << endl;
+//SpectralBandsComponentsTransposed.Print();
+ 
+// Compute componentsMean vector as the mean coefficient value per band and subtract the componentsMeanAfter from the coefficients matrix
+// Creating two double vectors to store de means of the spectralBands of each component
+   std::vector<double> componentsMean(spectralBandsNumber, 0.0),
+     componentsMeanAfter(spectralBandsNumber, 0.0);
+  for (j = 0; j < spectralBandsNumber; j++)
+  {
+// Compute original mean (componentsMean)
+    componentsMean[j] = 0;
+    for(i = 0; i < componentsNumber; i++)
+      componentsMean[j] = componentsMean[j] + SpectralBandsComponentsTransposed(i,j);
+    componentsMean[j] = componentsMean[j] / (double)componentsNumber;
+
+// Subtract mean from SpectralBandsComponents and compute new matrix mean (componentsMeanAfter)
+    componentsMeanAfter[j] = 0;
+    for(i = 0; i < componentsNumber; i++)
+    {
+      SpectralBandsComponentsTransposed(i,j) = SpectralBandsComponentsTransposed(i,j) - componentsMean[j];
+      componentsMeanAfter[j] = componentsMeanAfter[j] + SpectralBandsComponentsTransposed(i,j);
+    }
+    componentsMeanAfter[j] = componentsMeanAfter[j]/ (double)componentsNumber;
+  }
+
+//Printing
+//cout << "SpectralBandsComponentsTransposed - After less mean" << endl;
+//SpectralBandsComponentsTransposed.Print();
+
+// Compute covarianceVector vector
+  std::vector<double> covarianceVector(spectralBandsNumber*spectralBandsNumber, 0.0);
+  for(k = 0; k < spectralBandsNumber*spectralBandsNumber; k++)
+    covarianceVector[k] = 0;
+   k = 0 ;
+   for(j = 0; j < spectralBandsNumber; j++)
+   {
+     for(m = 0; m < j + 1; m++)
+     {
+       for(i = 0; i < componentsNumber; i++)
+         covarianceVector[k] = covarianceVector[k] + (SpectralBandsComponentsTransposed(i, j) - componentsMeanAfter[j]) * (SpectralBandsComponentsTransposed(i, m) - componentsMeanAfter[m]);
+       covarianceVector[k] = covarianceVector[k]/(double)componentsNumber ;
+       k++;
+     }
+   }
+// Printing
+//  for(k = 0; k < spectralBandsNumber*spectralBandsNumber; k++)
+//  {
+//    cout << covarianceVector[k] << " ";
+//  }
+
+   TeMatrix covarianceMatrix;
+  TEAGN_TRUE_OR_RETURN(covarianceMatrix.Init(spectralBandsNumber, spectralBandsNumber, 0.0), "Error initializing covarianceMatrix");
+
+   k = 0;
+   for (i = 0; i< spectralBandsNumber; i++)
+     for (j = 0; j <= i; j++)
+       covarianceMatrix(i, j) = covarianceVector[k++];
+// Printing
+//cout << "covarianceMatrix" << endl;
+//covarianceMatrix.Print();
+
+// Compute eigenvectors : results aux
+   TeMatrix auxMatrix;
+   TEAGN_TRUE_OR_RETURN(covarianceMatrix.EigenVectors(auxMatrix), "Error in eigenvectors calcule of auxMatrix")
+
+// Printing
+//cout << "auxMatrix - eigenvectors of covarianceMatrix" << endl;
+//auxMatrix.Print();
+
+// Keep only significant eigenvectors (componentsNumber - 1): results eigenreducted
+   TeMatrix eigenreducted;
+   TEAGN_TRUE_OR_RETURN(eigenreducted.Init(spectralBandsNumber, componentsNumberLessOne, 0.0), "Error initializing eigenreducted matrix")
+   for (j = 0; j <  spectralBandsNumber; j++)
+     for (i = 0; i <  componentsNumberLessOne; i++)
+       eigenreducted(j, i) = auxMatrix(j, i);
+
+//Printing
+//cout << "eigenreducted" << endl;
+//eigenreducted.Print();
+
+// Clear auxMatrix for future use
+   auxMatrix.Clear(); 
+
+// Rotate SpectralBandsComponentsTransposed to PCA space;  result SpectralBandsComponentsPCA
+  TeMatrix SpectralBandsComponentsPCA;
+  TEAGN_TRUE_OR_RETURN(SpectralBandsComponentsPCA.Init(SpectralBandsComponentsTransposed.Nrow(), eigenreducted.Ncol()), "Error initializing SpectralBandsComponentsPCA");
+ 
+  SpectralBandsComponentsPCA = SpectralBandsComponentsTransposed * eigenreducted;
+
+// Printing
+//cout << "SpectralBandsComponentsPCA - Rotate SpectralBandsComponentsTransposed to PCA space" << endl;
+//SpectralBandsComponentsPCA.Print();
+
+// Clear SpectralBandsComponentsTransposed: it will not be used bellow
+  SpectralBandsComponentsTransposed.Clear();
+ 
+// Initialize one more column to SpectralBandsComponentsPCA to incorporate sum restriction to equations; results auxMatrix
+  TEAGN_TRUE_OR_RETURN(auxMatrix.Init(SpectralBandsComponentsPCA.Nrow(), SpectralBandsComponentsPCA.Ncol() + 1), "Error initializing auxMatrix");
+ 
+  for (j = 0; j < ((unsigned int)SpectralBandsComponentsPCA.Nrow()); j++)
+  {
+    for (i = 0; i <  ((unsigned int)SpectralBandsComponentsPCA.Ncol() ); i++)
+      auxMatrix(j, i) = SpectralBandsComponentsPCA(j, i);
+    auxMatrix (j, SpectralBandsComponentsPCA.Ncol()) = 1.0;
+  }
+// Printing
+//cout << "Initialize one more column to SpectralBandsComponentsPCA to incorporate sum restriction to equation" << endl;
+//auxMatrix.Print();
+
+// Clear SpectralBandsComponentsPCA for future use
+  SpectralBandsComponentsPCA.Clear(); 
+ 
+// Transpose auxMatrix; results SpectralBandsComponentsPCA
+  TEAGN_TRUE_OR_RETURN(auxMatrix.Transpose(SpectralBandsComponentsPCA), "Error transposing auxMatrix to SpectralBandsComponentsPCA");
+
+// Printing
+//cout << "Transpose matrix SpectralBandsComponentsPCA" << endl;
+//SpectralBandsComponentsPCA.Print();
+
+// Clear auxMatrix for future use
+  auxMatrix.Clear();
+ 
+// Invert matrix SpectralBandsComponentsPCA; results SpectralBandsComponentsPCA
+  std::vector<int> lines(componentsNumber, 0);
+
+   TEAGN_TRUE_OR_RETURN(SGaussElimination(SpectralBandsComponentsPCA, lines, componentsNumber), "Error in gauss elimination");
+
+// Printing
+//cout << "Invert matrix SpectralBandsComponentsPCA" << endl;
+//SpectralBandsComponentsPCA.Print();
+
+//----- Part II : mathematical processing dependend on image data -----//
+ 
+// Initialize matrixes that will help to prepare vector Y
+  TEAGN_TRUE_OR_RETURN(auxMatrix.Init(1, spectralBandsNumber, 0.0), "Error initializing auxMatrix");
+ 
+  TeMatrix ymat;
+  TEAGN_TRUE_OR_RETURN(ymat.Init(componentsNumberLessOne, componentsNumberLessOne, 0.0), "Error initializing ymat");
+ 
+// Initialize proportion vector X and image dependent values for the linear equations Y  
+  std::vector<double>  x(componentsNumber, 0.0),
+    y(componentsNumber, 0.0);
+  for (i = 0; i < componentsNumber; i++)
+  {
+    x[i] = 0.0;
+    y[i] = 0.0;
+  }
+
+// Initialize current line and column    
+  std::vector<int> colin(spectralBandsNumber, 0);
+  int  colout,
+// Auxiliates the transformation of proportions to [0, 255]
+    prop;
+
+// It's should be class variables
+  std::vector<int> linesIn(spectralBandsNumber, 0),
+    colsIn(spectralBandsNumber, 0);
+
+// It's should be class variables
+  TeMatrix  rasterLinesIn,
+			rasterLinesOut;
+  rasterLinesIn.Init(spectralBandsNumber, rastersColumns, 0.0);
+  rasterLinesOut.Init(componentsNumber, rastersColumns, 0.0);
+  std::vector<double> spectralBandsError(spectralBandsNumber, 0.0);
+
+// Initialization of variables declared above
+  for (i = 0; i < spectralBandsNumber; i++)
+  {
+    colin[i] = 0;
+    linesIn[i] = 0;
+    colsIn[i] = 0;
+    spectralBandsError[i] = 0.0;
+  }
+
+// Start computing proportions for each line lines
+  TePDIPIManager progress( "Computing MixModel proportions", rastersLines,
+    progress_interface_enabled_ );
+
+  for (int linout = 0; linout < rastersLines;  linout++)
+  {
+    // Read input line for each band
+    for (i = 0; i < spectralBandsNumber; i++)
+    {
+      for (j = 0; j < ( (unsigned int)rastersColumns ); j++)
+      {
+        double p;
+        input_rasters[i]->getElement(j, linesIn[i], p, bands[ i ] );
+        rasterLinesIn(i, j) = p;
+      }
+      // Update next line to be read for band i
+      linesIn[i]++;
+
+      // Reinitialize first column for band i
+      colin[i] = colsIn[i];
+    }
+
+    // Compute proportions for each column
+           for (colout = 0; colout < rastersColumns; colout++)
+    {
+      // Prepare y
+      for (i = 0; i < spectralBandsNumber; i++)
+        auxMatrix(0,i) = (double) (rasterLinesIn(i, colin[i]))/255. - componentsMean[i];
+ 
+      ymat = auxMatrix * eigenreducted;
+    
+      for (i = 0; i < componentsNumber - 1; i++)
+        y[i] = ymat(0,i);
+      
+      // Compute proportions
+      SFowardBackSubstitution(SpectralBandsComponentsPCA, y, componentsNumber, lines, componentsNumber, x, componentsNumber);
+ 
+      // Store proportion in buffers  
+      for (i = 0; i < componentsNumber; i++)
+      {
+        prop = (short) (x[i]*100 + 100);
+        rasterLinesOut(i, colout) = (unsigned char)prop;
+      }
+ 
+//----- It's should be a function (ComputeErrors.begin) -----//
+
+      double   aux, error;
+      // Verifify if it is necessary to compute the error
+      if (computeErrorRasters || computeAverageError)
+      {
+        for (i = 0; i < spectralBandsNumber; i++)
+        {
+          // Compute digital value from the proportions
+          aux = 0.0;
+          for (j = 0; j < componentsNumber; j++)
+            aux += x[j] * SpectralBandsComponents(i,j);
+      
+          // Compute error as module of the difference between the original value and aux
+          error = (long)(rasterLinesIn(i, colin[i]))/255.0 - aux;
+          if (error < 0)
+            error = -1 * error;
+          if (computeErrorRasters)
+            rasterLinesIn(i, colout) = error * 255.0;
+          if (computeAverageError)
+            spectralBandsError[i] += error*255.;
+        }
+      }
+
+//----- It's should be a function (ComputeErrors.end) -----//
+      // Update current column number
+      for (i = 0; i < spectralBandsNumber; i++)
+        colin[i]++;
+ 
+     } // End of column processing
+ 
+    // Write processed line to disk
+    for (i = 0; i < componentsNumber; i++)
+      for (j = 0; j < ((unsigned int)rastersColumns); j++)
+        output_rasters[i]->setElement(j, linout, rasterLinesOut(i, j));
+
+
+//----- It's should be a function (StoreErrorRasters.begin) -----//
+    // Store output error rasters
+    if (computeErrorRasters)
+    {
+      // Write the output error images lines
+      for (i = 0; i < componentsNumber; i++)
+        for (j = 0; j < ((unsigned int)rastersColumns); j++)
+                  output_error_rasters[i]->setElement(j, linout, rasterLinesIn(i, j));
+    }
+//----- It's should be a function (StoreErrorRasters.end) -----//
+
+    progress.Increment();
+  } // End of line processing
+  
+  progress.Toggle( false );
+
+//----- It's should be a function (ComputeAverageError.begin) -----//
+// Verifify if it is necessary to compute the error
+  averageError = 0.0;
+  if (computeAverageError)
+  {
+    // Compute total number of pixels in the output image
+    int numpix = rastersLines*rastersColumns;
+    for (i = 0; i < spectralBandsNumber; i++)
+    {
+      // Compute avarege band error taking accumulated band error 
+      spectralBandsError[i] = spectralBandsError[i]/numpix;
+      // Accumulate avarege error
+      averageError += spectralBandsError[i];
+    }
+    // Compute total error taking the accumulated average error
+    if (!(spectralBandsNumber == 0))
+    {
+      averageError = averageError/spectralBandsNumber;
+    }
+// Printing
+//    cout << endl << averageError << endl;
+  }
+// Printing
+//  for(k = 0; k < spectralBandsNumber; k++)
+//  {
+//    cout << spectralBandsError[k] << " ";
+//  }
+//----- It's should be a function (ComputeAverageError.end) -----//
+
+  return true;
+}
diff --git a/src/terralib/image_processing/TePDIPrincoMixModelStrategy.hpp b/src/terralib/image_processing/TePDIPrincoMixModelStrategy.hpp
new file mode 100755
index 0000000..2d04063
--- /dev/null
+++ b/src/terralib/image_processing/TePDIPrincoMixModelStrategy.hpp
@@ -0,0 +1,95 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIGARGUETMIXMODELSTRATEGY_HPP
+#define TEPDIGARGUETMIXMODELSTRATEGY_HPP
+
+#include <TePDIStrategyFactory.hpp>
+#include <TePDIAlgorithmFactory.hpp>
+#include <TePDIUtils.hpp>
+#include <TeAgnostic.h>
+#include <TeRasterParams.h>
+#include <TeRaster.h>
+#include <TeSharedPtr.h>
+#include <TePDIMixModelStrategy.hpp>
+#include <TePDIParameters.hpp>
+#include <TePDIMixModelComponentList.hpp>
+#include <TePDIMixModelSpectralBandList.hpp>
+
+#include <string>
+
+/**
+* @brief This is the class for princo mixmodel strategy.
+* @author Felipe Castro da Silva <tkorting at dpi.inpe.br>
+* @ingroup PDIStrategies
+*
+* @note The required parameters are:
+* @param mixmodel_type (std::string): Must be "princo", "mqp" or "mpr".
+* @param component_list (TePDIMixModelComponentList): components list.
+* @param spectral_band_list (TePDIMixModelSpectralBandList): spectral bands list.
+* @param input_rasters (TePDITypes::TePDIRasterVectorType): input rasters.
+* @param bands (std::vector<int>): band number of each input raster.
+* @param output_rasters (TePDITypes::TePDIRasterVectorType): output rasters (ratio images).
+* @param compute_error_rasters (int): if 1, the algorithm compute the error rasters, if 0, not.
+* @param output_error_rasters (TePDITypes::TePDIRasterVectorType): if compute_error_rasters, here we have to set output error rasters.
+* @param compute_average_error (int): if 1, the algorithm compute the average error, if 0, not.
+* @param average_error (double): if compute_average_error, here we have the average error value.
+* @param normalize (double): if 1, the output images are normalized, if 0, not.
+*/
+
+class PDI_DLL TePDIPrincoMixModelStrategy : public TePDIMixModelStrategy
+{
+ 	friend class TePDIPrincoMixModelSF;
+	public :
+ 		typedef TeSharedPtr< TePDIPrincoMixModelStrategy > pointer;
+ 		typedef const TeSharedPtr< TePDIPrincoMixModelStrategy > const_pointer;
+/**Default destructor.*/
+		~TePDIPrincoMixModelStrategy();
+/**
+* Checks if the supplied parameters fits the requirements of each
+* PDI strategy.
+*
+* Error log messages must be generated. No exceptions generated.
+*
+* @param parameters The parameters to be checked.
+* @return true if the parameters are OK. false if not.
+*/
+		bool CheckParameters(const TePDIParameters& parameters) const;
+
+	protected :
+/**
+* Default constructor
+*
+* @param factoryName Factory name.
+*/
+		TePDIPrincoMixModelStrategy();
+/**
+* Runs the algorithm implementation.
+*
+* @return true if OK. false on errors.
+*/
+		bool Implementation(const TePDIParameters& params);
+};
+
+#endif
diff --git a/src/terralib/image_processing/TePDIRadarFilter.cpp b/src/terralib/image_processing/TePDIRadarFilter.cpp
new file mode 100755
index 0000000..213cc29
--- /dev/null
+++ b/src/terralib/image_processing/TePDIRadarFilter.cpp
@@ -0,0 +1,19 @@
+#include "TePDIRadarFilter.hpp"
+
+TePDIRadarFilter::TePDIRadarFilter()
+{
+  max_adapt_mask_width_ = 9;
+}
+
+
+TePDIRadarFilter::~TePDIRadarFilter()
+{
+}
+
+
+void TePDIRadarFilter::ResetState( const TePDIParameters& params )
+{
+  TePDIBufferedFilter::ResetState( params );
+}
+
+
diff --git a/src/terralib/image_processing/TePDIRadarFilter.hpp b/src/terralib/image_processing/TePDIRadarFilter.hpp
new file mode 100755
index 0000000..d7d9ced
--- /dev/null
+++ b/src/terralib/image_processing/TePDIRadarFilter.hpp
@@ -0,0 +1,70 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIRADARFILTER_HPP
+  #define TEPDIRADARFILTER_HPP
+
+  #include "TePDIBufferedFilter.hpp"
+  #include "TePDIParameters.hpp"
+  #include <TeSharedPtr.h>
+
+  /**
+   * @brief This is the base class for radar filters.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup TePDIFiltersGroup
+   */
+  class PDI_DLL TePDIRadarFilter : public TePDIBufferedFilter {
+    public :
+      /** @typedef Type definition for a instance pointer */
+      typedef TeSharedPtr< TePDIRadarFilter > pointer;
+      /** @typedef Type definition for a const instance pointer */
+      typedef const TeSharedPtr< TePDIRadarFilter > const_pointer;
+
+      /**
+       * @brief Default Destructor
+       */
+      virtual ~TePDIRadarFilter();
+
+    protected :
+      /**
+       * @brief The maximum mask width for adaptative filters
+       */
+      unsigned int max_adapt_mask_width_;
+
+      /**
+       * @brief Default Constructor.
+       *
+       */
+      TePDIRadarFilter();
+
+      /**
+       * @brief Reset the internal state to the initial state.
+       *
+       * @param params The new parameters referente at initial state.
+       */
+      virtual void ResetState( const TePDIParameters& params );
+
+  };
+
+#endif //TEPDIRADARFILTER_HPP
diff --git a/src/terralib/image_processing/TePDIRadarFrostFilter.cpp b/src/terralib/image_processing/TePDIRadarFrostFilter.cpp
new file mode 100755
index 0000000..b35ae27
--- /dev/null
+++ b/src/terralib/image_processing/TePDIRadarFrostFilter.cpp
@@ -0,0 +1,377 @@
+#include "TePDIRadarFrostFilter.hpp"
+
+#include <TeAgnostic.h>
+#include "TePDIUtils.hpp"
+
+#include "math.h"
+
+TePDIRadarFrostFilter::TePDIRadarFrostFilter()
+{
+}
+
+
+TePDIRadarFrostFilter::~TePDIRadarFrostFilter()
+{
+}
+
+
+void TePDIRadarFrostFilter::ResetState( const TePDIParameters& params )
+{
+  TePDIRadarFilter::ResetState( params );
+}
+
+
+bool TePDIRadarFrostFilter::CheckParameters( 
+  const TePDIParameters& parameters ) const
+{
+  /* Checking for general required parameters */
+
+  TePDITypes::TePDIRasterPtrType inRaster;
+  if( ! parameters.GetParameter( "input_image", inRaster ) ) {
+
+    TEAGN_LOGERR( "Missing parameter: input_image" );
+    return false;
+  }
+  if( ! inRaster.isActive() ) {
+
+    TEAGN_LOGERR( "Invalid parameter: input_image inactive" );
+    return false;
+  }
+  if( inRaster->params().status_ == TeRasterParams::TeNotReady ) {
+
+    TEAGN_LOGERR( "Invalid parameter: input_image not ready" );
+    return false;
+  }
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  if( ! parameters.GetParameter( "output_image", outRaster ) ) {
+
+    TEAGN_LOGERR( "Missing parameter: output_image" );
+    return false;
+  }
+  if( ! outRaster.isActive() ) {
+
+    TEAGN_LOGERR( "Invalid parameter: output_image inactive" );
+    return false;
+  }
+  if( inRaster->params().status_ == TeRasterParams::TeReadyToWrite ) {
+
+    TEAGN_LOGERR( "Invalid parameter: output_image not ready" );
+    return false;
+  }
+
+  /* channels parameter checking */
+
+  std::vector< int > channels;
+  if( ! parameters.GetParameter( "channels", channels ) ) {
+
+    TEAGN_LOGERR( "Missing parameter: channels" );
+    return false;
+  }
+  for( unsigned int index = 0 ; index < channels.size() ; ++index ) {
+    if( channels[ index ] >= inRaster->nBands() ) {
+      TEAGN_LOGERR( "Invalid parameter: channels" );
+      return false;
+    }
+  }
+
+  /* Checking for number of iterations */
+
+  int iterations = 0;
+  if( ! parameters.GetParameter( "iterations", iterations ) ) {
+
+    TEAGN_LOGERR( "Missing parameter: iterations" );
+    return false;
+  }
+  TEAGN_TRUE_OR_RETURN( iterations > 0, "Invalid iterations number" );
+
+  /* Checking for detection type parameter */
+
+  TePDIFrostDetType det_type;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "det_type", det_type ),
+    "Missing parameter: det_type" );
+  TEAGN_TRUE_OR_RETURN(
+    ( ( det_type == TePDIFrostDTLinear ) || ( det_type == TePDIFrostDTQuadratic ) ),
+    "Invalid detection type" );
+
+  /* Checking for image look number */
+
+  double look_number = 0;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "look_number", look_number ),
+    "Missing parameter: look_number" );
+  TEAGN_TRUE_OR_RETURN( look_number > 0,  "Invalid image look number" );
+
+  /* Checking for corr_coef parameter */
+
+  double corr_coef = 0;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "corr_coef",
+    corr_coef ),
+    "Missing parameter: corr_coef" );
+  TEAGN_TRUE_OR_RETURN( ( corr_coef >= 0 ) && ( corr_coef <= 1 ),
+    "Invalid curr_coef" );
+
+  /* Checking photometric interpretation */
+  
+  for( unsigned int channel = 0 ; channel < channels.size() ; ++channel ) {
+    TEAGN_TRUE_OR_RETURN( ( 
+      ( inRaster->params().photometric_[ channel ] == 
+        TeRasterParams::TeRGB ) ||
+      ( inRaster->params().photometric_[ channel ] == 
+        TeRasterParams::TeMultiBand ) ),
+    "Invalid parameter - input_image (invalid photometric interpretation)" );
+  }    
+
+  return true;
+}
+
+
+bool TePDIRadarFrostFilter::RunImplementation()
+{
+  TePDITypes::TePDIRasterPtrType inRaster;
+  params_.GetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  params_.GetParameter( "output_image", outRaster );
+
+  std::vector< int > channels;
+  params_.GetParameter( "channels", channels );
+
+  int iterations = 0;
+  params_.GetParameter( "iterations", iterations );
+
+  TePDIFrostDetType det_type;
+  params_.GetParameter( "det_type", det_type );
+
+  double look_number = 0;
+  params_.GetParameter( "look_number", look_number );
+
+  double corr_coef;
+  params_.GetParameter( "corr_coef", corr_coef );
+
+  const unsigned int mask_width = 5;
+  /* fixed size - affects convolution weights matrix dimentions */
+
+  /* Setting the output raster */
+
+  TeRasterParams outRaster_params = outRaster->params();
+  
+  outRaster_params.nBands( channels.size() );
+  if( inRaster->projection() != 0 ) {
+    TeSharedPtr< TeProjection > proj( TeProjectionFactory::make( 
+      inRaster->projection()->params() ) );  
+    outRaster_params.projection( proj.nakedPointer() );
+  }
+  outRaster_params.boxResolution( inRaster->params().box().x1(), 
+    inRaster->params().box().y1(), inRaster->params().box().x2(), 
+    inRaster->params().box().y2(), inRaster->params().resx_, 
+    inRaster->params().resy_ );  
+    
+  outRaster_params.setPhotometric( TeRasterParams::TeMultiBand, -1 ); 
+
+  TEAGN_TRUE_OR_RETURN( outRaster->init( outRaster_params ),
+    "Output raster reset error" );    
+
+  /* Creating the temporary rasters with one band each */
+
+  TePDITypes::TePDIRasterPtrType aux_raster1;
+  TEAGN_TRUE_OR_RETURN( TePDIUtils::TeAllocRAMRaster( outRaster, aux_raster1, 1,
+    false, false, TeDOUBLE ), "Unable to create auxiliary raster 1" );
+
+  TePDITypes::TePDIRasterPtrType aux_raster2;
+  TEAGN_TRUE_OR_RETURN( TePDIUtils::TeAllocRAMRaster( outRaster, aux_raster2, 1,
+    false, false, TeDOUBLE ), "Unable to create auxiliary raster 2" );
+
+  /* Noise statistics */
+
+  double noise_deviation = 0;
+
+  if( det_type == TePDIFrostDTLinear ) {
+    noise_deviation = 0.522723008 / sqrt( look_number );
+  } else if( det_type == TePDIFrostDTQuadratic ) {
+    noise_deviation = 1.0 / sqrt( look_number );
+  }
+
+  const double noise_variance = noise_deviation * noise_deviation;
+  const double noise_variance_plus_one = noise_variance + 1.;
+
+  /* Setting the convolution buffer initial state */
+
+  const unsigned int raster_lines = (unsigned int)outRaster->params().nlines_;
+  const unsigned int raster_columns = (unsigned int)outRaster->params().ncols_;
+
+  reset_conv_buf( mask_width, raster_columns );
+
+  /* Convolution Loop */
+
+  double output_level; /* the value generated by each pixel mask calcule */
+
+  const unsigned int mask_middle_off =
+    (unsigned int) floor( ((double)mask_width) / 2. );
+
+  const unsigned int conv_column_bound = raster_columns - mask_width + 1;
+  const unsigned int conv_line_bound = raster_lines - mask_width + 1;
+
+  unsigned int raster_line; /* mask top-left line */
+  unsigned int conv_buf_column; /* mask top-left column */
+
+  double channel_min_level;
+  double channel_max_level;
+
+  double mean = 0; /* for the current window covolution inside convolution 
+    buffer */
+  double variance = 0; /* for the current window convolution inside 
+    convolution buffer */
+  double mean_2 = 0;; /* mean ^ 2 */
+  double vx = 0;;
+  double H = 0;;
+  double m = 0;;
+  double m_cumulative = 0;;
+
+  TePDITypes::TePDIRasterPtrType source_raster;
+  TePDITypes::TePDIRasterPtrType target_raster;
+
+  double mtab[ 33 ];
+
+  unsigned int mask_line;
+  unsigned int mask_column;
+
+  unsigned int dist_x;
+  unsigned int dist_y;
+  unsigned int dist_2;
+  
+  StartProgInt( "Frost filter", channels.size() * iterations * 
+    conv_line_bound );  
+
+  for( unsigned int channels_index = 0 ;
+       channels_index < channels.size() ;
+       ++channels_index ) {
+
+    TEAGN_TRUE_OR_THROW(
+      TePDIUtils::TeCopyRasterPixels( inRaster, channels[ channels_index ],
+      aux_raster1, 0, false, false ), "Auxiliar Raster fill error" );
+
+    TEAGN_TRUE_OR_RETURN( TePDIUtils::TeGetRasterMinMaxBounds(
+      outRaster, channels[ channels_index ], channel_min_level,
+      channel_max_level ), "Unable to get raster channel level bounds" );
+
+    for( unsigned int iteration = 0 ; (int)iteration < iterations ; ++iteration ) {
+      /* Switching from input and output raster for more than 1 iteration */
+
+      if( iteration % 2 == 0 ) {
+        source_raster = aux_raster1;
+        target_raster = aux_raster2;
+      } else {
+        source_raster = aux_raster2;
+        target_raster = aux_raster1;
+      }
+
+      /* Fills the convolution buffer with the first "mask_lines" from the raster */
+
+      for( unsigned int line = 0 ; line < ( mask_width - 1) ; ++line ) {
+        up_conv_buf( source_raster, line, 0 );
+      }
+
+      /* window convolution over raster */
+
+      for( raster_line = 0 ; raster_line < conv_line_bound ; ++raster_line ) {
+        /* Getting one more line from the source raster and adding to buffer */
+        
+        TEAGN_FALSE_OR_RETURN( UpdateProgInt( ( channels_index * iterations * 
+          conv_line_bound ) +
+          ( iteration * conv_line_bound ) + raster_line ), 
+          "Canceled by the user" );
+
+        up_conv_buf( source_raster, raster_line + mask_width - 1,
+          channels_index );
+
+        for( conv_buf_column = 0 ; conv_buf_column < conv_column_bound ;
+             ++conv_buf_column ) {
+
+          conv_buf_estatistics( 0, conv_buf_column, mask_width, mask_width, mean,
+            variance );
+
+          mean_2 = mean * mean;
+
+          vx = ( variance  - ( noise_variance *  mean_2 ) ) /
+               noise_variance_plus_one;
+
+          H = vx + mean_2;
+          if( H != 0 ) {
+            H = corr_coef + ( 2 * corr_coef * vx / noise_variance / H );
+          }
+          if( H <= 0 ) {
+            H = corr_coef;
+          }
+          H = sqrt( H );
+
+          /* Weights matrix creation */
+
+          mtab[0] = 1.;
+          mtab[1] = exp(-H * 1.);
+          mtab[2] = exp(-H * 1.414213562);
+          mtab[4] = exp(-H * 2.);
+          mtab[5] = exp(-H * 2.236067977);
+          mtab[8] = exp(-H * 2.828427125);
+          mtab[9] = exp(-H * 3.);
+          mtab[10] = exp(-H * 3.16227766);
+          mtab[13] = exp(-H * 3.605551276);
+          mtab[16] = exp(-H * 4.);
+          mtab[17] = exp(-H * 4.123105626);
+          mtab[18] = exp(-H * 4.242640687);
+          mtab[20] = exp(-H * 4.472135955);
+          mtab[25] = exp(-H * 5.);
+          mtab[32] = exp(-H * 5.65685425);
+
+          /* Mask Convolution */
+
+          output_level = 0;
+          m_cumulative = 0;
+
+          for( mask_line = 0 ; mask_line < mask_width ; ++mask_line ) {
+            dist_y = mask_line - mask_middle_off - mask_width;
+
+            for( mask_column = 0 ; mask_column < mask_width ; ++mask_column ) {
+              dist_x = mask_column - mask_middle_off - mask_width;
+
+              dist_2 = ( dist_y * dist_y ) + ( dist_x * dist_x );
+
+              if( ( dist_2 < 32 ) && ( mtab[ dist_2 ] != 0 ) ) {
+                m = m * mtab[ dist_2 ];
+              } else {
+                m = H;
+              }
+            }
+
+            output_level +=
+              m * conv_buf_[ mask_line ][ mask_column + conv_buf_column];
+            m_cumulative += m;
+          }
+
+          output_level = output_level / m_cumulative;
+
+
+          /* Level range filtering */
+
+          if( output_level < channel_min_level ) {
+            output_level = channel_min_level;
+          } else if( output_level > channel_max_level ) {
+            output_level = channel_max_level;
+          }
+
+          TEAGN_TRUE_OR_RETURN( target_raster->setElement(
+            conv_buf_column +  mask_middle_off,
+            raster_line +  mask_middle_off, output_level, 0 ),
+            "Pixel mapping error" );
+
+        }
+      }
+    }
+
+    /* Content copy from the target raster to the output raster */
+
+    TEAGN_TRUE_OR_RETURN( TePDIUtils::TeCopyRasterPixels( target_raster, 0,
+      outRaster, channels_index, false, false ), "Output raster fill error" );
+  }
+
+  return true;
+}
diff --git a/src/terralib/image_processing/TePDIRadarFrostFilter.hpp b/src/terralib/image_processing/TePDIRadarFrostFilter.hpp
new file mode 100755
index 0000000..65ffe7a
--- /dev/null
+++ b/src/terralib/image_processing/TePDIRadarFrostFilter.hpp
@@ -0,0 +1,108 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIRADARFROSTFILTER_HPP
+  #define TEPDIRADARFROSTFILTER_HPP
+
+  #include "TePDIRadarFilter.hpp"
+  #include "TePDIParameters.hpp"
+  #include <TeSharedPtr.h>
+
+  /**
+   * @brief This is the class for radar Frost filter.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup TePDIFiltersGroup
+   *
+   * @note The general required parameters are:
+   *
+   * @param input_image (TePDITypes::TePDIRasterPtrType),
+   * @param output_image (TePDITypes::TePDIRasterPtrType),
+   * @param channels (std::vector<int>) - Band(s) to process. For
+   * @param iterations (int) - Iterations number,
+   * @param det_type (TePDIFrostDetType) - Detection type,
+   * @param look_number (double) - Image look number,
+   * @param corr_coef (double ) - The correlation coeficient
+   * for each convolution.
+   */
+  class PDI_DLL TePDIRadarFrostFilter : public TePDIRadarFilter{
+    public :
+      /** @typedef Type definition for a instance pointer */
+      typedef TeSharedPtr< TePDIRadarFrostFilter > pointer;
+      /** @typedef Type definition for a const instance pointer */
+      typedef const TeSharedPtr< TePDIRadarFrostFilter > const_pointer;
+
+      /**
+       * @enum Frost type.
+       */
+      enum TePDIFrostDetType{
+        /** Linear type */
+        TePDIFrostDTLinear = 1,
+        /** Quadratic type */
+        TePDIFrostDTQuadratic = 2
+      };
+
+      /**
+       * @brief Default Constructor.
+       *
+       */
+      TePDIRadarFrostFilter();
+
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIRadarFrostFilter();
+
+      /**
+       * @brief Checks if the supplied parameters fits the requirements of each
+       * PDI algorithm implementation.
+       *
+       * @note Error log messages must be generated. No exceptions generated.
+       *
+       * @param parameters The parameters to be checked.
+       * @return true if the parameters are OK. false if not.
+       */
+      bool CheckParameters( const TePDIParameters& parameters ) const;
+
+    protected :
+
+      /**
+       * @brief Runs the current algorithm implementation.
+       *
+       * @return true if OK. false on error.
+       */
+      bool RunImplementation();
+
+      /**
+       * @brief Reset the internal state to the initial state.
+       *
+       * @param params The new parameters referente at initial state.
+       */
+      void ResetState( const TePDIParameters& params );
+  };
+  
+/** @example TePDIRadarFilters_test.cpp
+ *    Shows how to use this class.
+ */    
+
+#endif //TEPDIRADARFROSTFILTER_HPP
diff --git a/src/terralib/image_processing/TePDIRadarFrostFilterFactory.cpp b/src/terralib/image_processing/TePDIRadarFrostFilterFactory.cpp
new file mode 100755
index 0000000..dc1517d
--- /dev/null
+++ b/src/terralib/image_processing/TePDIRadarFrostFilterFactory.cpp
@@ -0,0 +1,24 @@
+ 
+#include "TePDIRadarFrostFilterFactory.hpp"
+#include "TePDIRadarFrostFilter.hpp"
+#include <TeAgnostic.h>
+
+TePDIRadarFrostFilterFactory::TePDIRadarFrostFilterFactory()
+: TePDIAlgorithmFactory( std::string( "TePDIRadarFrostFilter" ) )
+{
+};      
+
+TePDIRadarFrostFilterFactory::~TePDIRadarFrostFilterFactory()
+{
+};
+
+
+TePDIAlgorithm* TePDIRadarFrostFilterFactory::build ( const TePDIParameters& arg )
+{
+  TePDIAlgorithm* instance_ptr = new TePDIRadarFrostFilter();
+  
+  TEAGN_TRUE_OR_THROW( instance_ptr->Reset( arg ),
+    "Invalid parameters" );
+  
+  return instance_ptr;
+}
diff --git a/src/terralib/image_processing/TePDIRadarFrostFilterFactory.hpp b/src/terralib/image_processing/TePDIRadarFrostFilterFactory.hpp
new file mode 100755
index 0000000..3bb27d6
--- /dev/null
+++ b/src/terralib/image_processing/TePDIRadarFrostFilterFactory.hpp
@@ -0,0 +1,67 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIRADARFROSTFILTERFACTORY_HPP
+  #define TEPDIRADARFROSTFILTERFACTORY_HPP
+
+  #include <TeSharedPtr.h>
+  #include "TePDIAlgorithmFactory.hpp"
+  #include "TePDIParameters.hpp"
+  
+  /**
+   * @brief This is the class for radar frost filter factory.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIAlgorithmsFactories
+   */
+  class PDI_DLL TePDIRadarFrostFilterFactory : public TePDIAlgorithmFactory
+  {
+    public :
+      
+      /**
+       * @brief Default constructor
+       */
+      TePDIRadarFrostFilterFactory();      
+      
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIRadarFrostFilterFactory();
+      
+      protected :  
+      /**
+       * @brief Implementation for the abstract TeFactory::build.
+       *
+       * @param arg A const reference to the parameters used by the
+       * algorithm.
+       * @return A pointer to the new generated algorithm instance.
+       */
+      TePDIAlgorithm* build( const TePDIParameters& arg );
+      
+  };
+
+  namespace {
+    static TePDIRadarFrostFilterFactory TePDIRadarFrostFilterFactory_instance;
+  };  
+  
+#endif
diff --git a/src/terralib/image_processing/TePDIRadarKuanFilter.cpp b/src/terralib/image_processing/TePDIRadarKuanFilter.cpp
new file mode 100755
index 0000000..19588f8
--- /dev/null
+++ b/src/terralib/image_processing/TePDIRadarKuanFilter.cpp
@@ -0,0 +1,633 @@
+#include "TePDIRadarKuanFilter.hpp"
+
+#include <TeAgnostic.h>
+#include "TePDIUtils.hpp"
+
+#include "math.h"
+
+TePDIRadarKuanFilter::TePDIRadarKuanFilter()
+{
+}
+
+
+TePDIRadarKuanFilter::~TePDIRadarKuanFilter()
+{
+}
+
+
+void TePDIRadarKuanFilter::ResetState( const TePDIParameters& params )
+{
+  TePDIRadarFilter::ResetState( params );
+}
+
+
+bool TePDIRadarKuanFilter::CheckParameters( 
+  const TePDIParameters& parameters ) const
+{
+  /* Checking for general required parameters */
+
+  TePDITypes::TePDIRasterPtrType inRaster;
+  if( ! parameters.GetParameter( "input_image", inRaster ) ) {
+
+    TEAGN_LOGERR( "Missing parameter: input_image" );
+    return false;
+  }
+  if( ! inRaster.isActive() ) {
+
+    TEAGN_LOGERR( "Invalid parameter: input_image inactive" );
+    return false;
+  }
+  if( inRaster->params().status_ == TeRasterParams::TeNotReady ) {
+
+    TEAGN_LOGERR( "Invalid parameter: input_image not ready" );
+    return false;
+  }
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  if( ! parameters.GetParameter( "output_image", outRaster ) ) {
+
+    TEAGN_LOGERR( "Missing parameter: output_image" );
+    return false;
+  }
+  if( ! outRaster.isActive() ) {
+
+    TEAGN_LOGERR( "Invalid parameter: output_image inactive" );
+    return false;
+  }
+  if( inRaster->params().status_ == TeRasterParams::TeReadyToWrite ) {
+
+    TEAGN_LOGERR( "Invalid parameter: output_image not ready" );
+    return false;
+  }
+
+  /* Filter type checking */
+  TePDIKuanFType filter_type;
+  if( ! parameters.GetParameter( "filter_type", filter_type ) ) {
+
+    TEAGN_LOGERR( "Missing parameter: filter_type" );
+    return false;
+  }
+  if( ( filter_type != TePDIKuanFixedType ) &&
+      ( filter_type != TePDIKuanAdaptType ) ) {
+
+    TEAGN_LOGERR( "Invalid parameter: filter_type" );
+    return false;
+  }
+
+  /* channels parameter checking */
+
+  std::vector< int > channels;
+  if( ! parameters.GetParameter( "channels", channels ) ) {
+
+    TEAGN_LOGERR( "Missing parameter: channels" );
+    return false;
+  }
+  for( unsigned int index = 0 ; index < channels.size() ; ++index ) {
+    if( channels[ index ] >= inRaster->nBands() ) {
+      TEAGN_LOGERR( "Invalid parameter: channels" );
+      return false;
+    }
+  }
+
+  /* Checking for number of iterations */
+
+  int iterations = 0;
+  if( ! parameters.GetParameter( "iterations", iterations ) ) {
+
+    TEAGN_LOGERR( "Missing parameter: iterations" );
+    return false;
+  }
+  TEAGN_TRUE_OR_RETURN( iterations > 0, "Invalid iterations number" );
+
+  /* Checking for detection type parameter */
+
+  TePDIKuanDetType det_type;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "det_type", det_type ),
+    "Missing parameter: det_type" );
+  TEAGN_TRUE_OR_RETURN(
+    ( ( det_type == TePDIKuanDTLinear ) || ( det_type == TePDIKuanDTQuadratic ) ),
+    "Invalid detection type" );
+
+  /* Checking for image look number */
+
+  double look_number = 0;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "look_number", look_number ),
+    "Missing parameter: look_number" );
+  TEAGN_TRUE_OR_RETURN( look_number > 0,  "Invalid image look number" );
+
+  /* Checking for detection type parameter */
+
+  int mask_width = 0;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "mask_width", mask_width ),
+    "Missing parameter: mask_width" );
+  TEAGN_TRUE_OR_RETURN( ( ( mask_width > 2 ) && ( ( mask_width % 2 ) != 0 ) ),
+    "Invalid mask width" );
+  if( filter_type != TePDIKuanAdaptType ) {
+    TEAGN_TRUE_OR_RETURN( ( mask_width <=  (int)max_adapt_mask_width_ ),
+      "Invalid mask width" );
+  }
+
+  /* Checking for variance_threshold parameter */
+
+  double variance_threshold = 0;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "variance_threshold",
+    variance_threshold ),
+    "Missing parameter: variance_threshold" );
+  TEAGN_TRUE_OR_RETURN( variance_threshold >= 0,
+    "Invalid variance_threshold" );
+
+  /* Checking photometric interpretation */
+  
+  for( unsigned int channel = 0 ; channel < channels.size() ; ++channel ) {
+    TEAGN_TRUE_OR_RETURN( ( 
+      ( inRaster->params().photometric_[ channel ] == 
+        TeRasterParams::TeRGB ) ||
+      ( inRaster->params().photometric_[ channel ] == 
+        TeRasterParams::TeMultiBand ) ),
+    "Invalid parameter - input_image (invalid photometric interpretation)" );
+  }      
+
+  return true;
+}
+
+
+bool TePDIRadarKuanFilter::RunImplementation()
+{
+  TePDIKuanFType filter_type;
+  params_.GetParameter( "filter_type", filter_type );
+
+  switch( filter_type ) {
+    case TePDIKuanFixedType :
+    {
+      return RunFixedImplementation();
+      break;
+    }
+    case TePDIKuanAdaptType :
+    {
+      return RunAdaptImplementation();
+      break;
+    }
+    default :
+    {
+      TEAGN_LOG_AND_RETURN( "Invalid algorithm type" );
+    }
+  }
+}
+
+
+bool TePDIRadarKuanFilter::RunFixedImplementation()
+{
+  TePDITypes::TePDIRasterPtrType inRaster;
+  params_.GetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  params_.GetParameter( "output_image", outRaster );
+
+  std::vector< int > channels;
+  params_.GetParameter( "channels", channels );
+
+  int mask_width;
+  params_.GetParameter( "mask_width", mask_width );
+
+  int iterations = 0;
+  params_.GetParameter( "iterations", iterations );
+
+  TePDIKuanDetType det_type;
+  params_.GetParameter( "det_type", det_type );
+
+  double look_number = 0;
+  params_.GetParameter( "look_number", look_number );
+
+  double variance_threshold;
+  params_.GetParameter( "variance_threshold", variance_threshold );
+
+  /* Setting the output raster */
+
+  TeRasterParams outRaster_params = outRaster->params();
+  
+  outRaster_params.nBands( channels.size() );
+  if( inRaster->projection() != 0 ) {
+    TeSharedPtr< TeProjection > proj( TeProjectionFactory::make( 
+      inRaster->projection()->params() ) );  
+    outRaster_params.projection( proj.nakedPointer() );
+  }
+  outRaster_params.boxResolution( inRaster->params().box().x1(), 
+    inRaster->params().box().y1(), inRaster->params().box().x2(), 
+    inRaster->params().box().y2(), inRaster->params().resx_, 
+    inRaster->params().resy_ );  
+    
+  outRaster_params.setPhotometric( TeRasterParams::TeMultiBand, -1 ); 
+
+  TEAGN_TRUE_OR_RETURN( outRaster->init( outRaster_params ),
+    "Output raster reset error" );         
+
+  /* Creating the temporary rasters with one band each */
+
+  TePDITypes::TePDIRasterPtrType aux_raster1;
+  TEAGN_TRUE_OR_RETURN( TePDIUtils::TeAllocRAMRaster( outRaster, aux_raster1, 1,
+    false, false, TeDOUBLE ), "Unable to create auxiliary raster 1" );
+
+  TePDITypes::TePDIRasterPtrType aux_raster2;
+  TEAGN_TRUE_OR_RETURN( TePDIUtils::TeAllocRAMRaster( outRaster, aux_raster2, 1,
+    false, false, TeDOUBLE ), "Unable to create auxiliary raster 2" );
+
+  /* Noise statistics */
+
+  double noise_deviation = 0;
+
+  if( det_type == TePDIKuanDTLinear ) {
+    noise_deviation = 0.522723008 / sqrt( look_number );
+  } else if( det_type == TePDIKuanDTQuadratic ) {
+    noise_deviation = 1.0 / sqrt( look_number );
+  }
+
+  const double noise_variance = noise_deviation * noise_deviation;
+  const double noise_variance_plus_one = noise_variance + 1.;
+
+  /* Setting the convolution buffer initial state */
+
+  const unsigned int raster_lines = (unsigned int)outRaster->params().nlines_;
+  const unsigned int raster_columns = (unsigned int)outRaster->params().ncols_;
+
+  reset_conv_buf( mask_width, raster_columns );
+
+  /* Convolution Loop */
+
+  double output_level; /* the value generated by each pixel mask calcule */
+
+  unsigned int mask_middle_off_lines =
+    (unsigned int) floor( ((double)mask_width) / 2. );
+  unsigned int mask_middle_off_columns = mask_middle_off_lines;
+
+  unsigned int conv_column_bound = raster_columns - mask_width + 1;
+  unsigned int conv_line_bound = raster_lines - mask_width + 1;
+
+  unsigned int raster_line; /* mask top-left line */
+  unsigned int conv_buf_column; /* mask top-left column */
+
+  unsigned int current_pixel_column; /* raster reference for the current pixel being
+                                        processed */
+
+  double channel_min_level;
+  double channel_max_level;
+
+  double mean; /* for the current window covolution inside convolution buffer */
+  double variance; /* for the current window convolution inside convolution buffer */
+  double mean_2; /* mean ^ 2 */
+  double relation_top;
+  double relation_bottom;
+
+  TePDITypes::TePDIRasterPtrType source_raster;
+  TePDITypes::TePDIRasterPtrType target_raster;
+  
+  StartProgInt( "Kuan fixed filter", channels.size() * iterations * 
+    conv_line_bound ); 
+
+  for( unsigned int channels_index = 0 ;
+       channels_index < channels.size() ;
+       ++channels_index ) {
+
+    TEAGN_TRUE_OR_THROW(
+      TePDIUtils::TeCopyRasterPixels( inRaster, channels[ channels_index ],
+      aux_raster1, 0, false, false ), "Auxiliar Raster fill error" );
+
+    TEAGN_TRUE_OR_RETURN( TePDIUtils::TeGetRasterMinMaxBounds(
+      outRaster, channels[ channels_index ], channel_min_level,
+      channel_max_level ), "Unable to get raster channel level bounds" );
+
+    for( unsigned int iteration = 0 ; (int)iteration < iterations ; ++iteration ) {
+      /* Switching from input and output raster for more than 1 iteration */
+
+      if( iteration % 2 == 0 ) {
+        source_raster = aux_raster1;
+        target_raster = aux_raster2;
+      } else {
+        source_raster = aux_raster2;
+        target_raster = aux_raster1;
+      }
+
+      /* Fills the convolution buffer with the first "mask_lines" from the raster */
+
+      for( int line = 0 ; line < ( mask_width - 1) ; ++line ) {
+        up_conv_buf( source_raster, line, 0 );
+      }
+
+      /* window convolution over raster */
+
+      for( raster_line = 0 ; raster_line < conv_line_bound ; ++raster_line ) {
+        /* Getting one more line from the source raster and adding to buffer */
+        
+        TEAGN_FALSE_OR_RETURN( UpdateProgInt( ( channels_index * iterations * 
+          conv_line_bound ) +
+          ( iteration * conv_line_bound ) + raster_line ),
+          "Canceled by the user" );
+
+        up_conv_buf( source_raster, raster_line + mask_width - 1,
+          channels_index );
+
+        for( conv_buf_column = 0 ; conv_buf_column < conv_column_bound ;
+             ++conv_buf_column ) {
+
+          current_pixel_column = conv_buf_column +  mask_middle_off_columns;
+
+          conv_buf_estatistics( 0, conv_buf_column, mask_width, mask_width, mean,
+            variance );
+
+          if( variance < 0 ) {
+            output_level = mean;
+          } else {
+            mean_2 = mean * mean;
+            relation_top = variance  - ( noise_variance *  mean_2 );
+            relation_bottom = variance * noise_variance_plus_one;
+
+            if( relation_top < 0 ) {
+              output_level = mean;
+            } else {
+              output_level =
+                conv_buf_[ mask_middle_off_lines ][ current_pixel_column ];
+
+              if( ( mean != 0 ) &&
+                  ( relation_bottom != 0 ) &&
+                  ( ( variance / mean_2 ) < variance_threshold ) ) {
+
+                output_level = mean + ( ( relation_top / relation_bottom ) *
+                  ( output_level - mean ) );
+              }
+            }
+          }
+
+          /* Level range filtering */
+
+          if( output_level < channel_min_level ) {
+            output_level = channel_min_level;
+          } else if( output_level > channel_max_level ) {
+            output_level = channel_max_level;
+          }
+
+          TEAGN_TRUE_OR_RETURN( target_raster->setElement(
+            current_pixel_column,
+            raster_line +  mask_middle_off_lines, output_level, 0 ),
+            "Pixel mapping error" );
+        }
+      }
+    }
+
+    /* Content copy from the target raster to the output raster */
+
+    TEAGN_TRUE_OR_RETURN( TePDIUtils::TeCopyRasterPixels( target_raster, 0,
+      outRaster, channels_index, false, false ), "Output raster fill error" );
+  }
+
+  return true;
+}
+
+
+bool TePDIRadarKuanFilter::RunAdaptImplementation()
+{
+  TePDITypes::TePDIRasterPtrType inRaster;
+  params_.GetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  params_.GetParameter( "output_image", outRaster );
+
+  std::vector< int > channels;
+  params_.GetParameter( "channels", channels );
+
+  int initial_mask_width;
+  params_.GetParameter( "mask_width", initial_mask_width );
+
+  int iterations = 0;
+  params_.GetParameter( "iterations", iterations );
+
+  TePDIKuanDetType det_type;
+  params_.GetParameter( "det_type", det_type );
+
+  double look_number = 0;
+  params_.GetParameter( "look_number", look_number );
+
+  double variance_threshold;
+  params_.GetParameter( "variance_threshold", variance_threshold );
+
+  /* Setting the output raster */
+  
+  TeRasterParams outRaster_params = outRaster->params();
+  
+  outRaster_params.nBands( channels.size() );
+  if( inRaster->projection() != 0 ) {
+    TeSharedPtr< TeProjection > proj( TeProjectionFactory::make( 
+      inRaster->projection()->params() ) );  
+    outRaster_params.projection( proj.nakedPointer() );
+  }
+  outRaster_params.boxResolution( inRaster->params().box().x1(), 
+    inRaster->params().box().y1(), inRaster->params().box().x2(), 
+    inRaster->params().box().y2(), inRaster->params().resx_, 
+    inRaster->params().resy_ );  
+    
+  outRaster_params.setPhotometric( TeRasterParams::TeMultiBand, -1 ); 
+
+  TEAGN_TRUE_OR_RETURN( outRaster->init( outRaster_params ),
+    "Output raster reset error" );  
+
+  const unsigned int raster_lines = (unsigned int)outRaster->params().nlines_;
+  const unsigned int raster_columns = (unsigned int)outRaster->params().ncols_;
+
+  /* Creating the temporary rasters with one band each */
+
+  TePDITypes::TePDIRasterPtrType aux_raster1;
+  TEAGN_TRUE_OR_RETURN( TePDIUtils::TeAllocRAMRaster( outRaster, aux_raster1, 1,
+    false, false, TeDOUBLE ), "Unable to create auxiliary raster 1" );
+
+  TePDITypes::TePDIRasterPtrType aux_raster2;
+  TEAGN_TRUE_OR_RETURN( TePDIUtils::TeAllocRAMRaster( outRaster, aux_raster2, 1,
+    false, false, TeDOUBLE ), "Unable to create auxiliary raster 2" );
+
+  /* Noise statistics */
+
+  double noise_deviation = 0;
+
+  if( det_type == TePDIKuanDTLinear ) {
+    noise_deviation = 0.522723008 / sqrt( look_number );
+  } else if( det_type == TePDIKuanDTQuadratic ) {
+    noise_deviation = 1.0 / sqrt( look_number );
+  }
+
+  const double noise_variance = noise_deviation * noise_deviation;
+  const double noise_variance_plus_one = noise_variance + 1.;
+
+  /* Setting the convolution buffer initial state */
+
+  reset_conv_buf( max_adapt_mask_width_, raster_columns );
+
+  /* Convolution Loop */
+
+  double output_level; /* the value generated by each pixel mask calcule */
+
+  const unsigned int initial_mask_middle_off =
+    (unsigned int) floor( ((double)initial_mask_width) / 2. );
+
+  const unsigned int buf_middle_line_off =
+    (unsigned int)floor( ((double)max_adapt_mask_width_)  / 2. );
+  const unsigned int buf_init_fill_lines = buf_middle_line_off +
+    initial_mask_middle_off;
+
+  const unsigned int conv_init_line = (unsigned int)
+    floor( (double)max_adapt_mask_width_ / 2. );
+  const unsigned int conv_init_column = conv_init_line;
+  const unsigned int conv_column_bound = raster_columns - conv_init_column;
+  const unsigned int conv_line_bound = raster_lines - conv_init_line;
+
+  unsigned int raster_line; /* currente pixel being processed line */
+  unsigned int raster_column; /* currente pixel being processed column */
+
+  double channel_min_level;
+  double channel_max_level;
+
+  double mean; /* for the current window covolution inside convolution buffer */
+  double mean_2; // mean * mean
+  double variance; /* for the current window convolution inside convolution buffer */
+  double relation;
+  double relation_top;
+  double relation_bottom;
+
+  unsigned int new_mask_width;  /* the widht of the adapted mask */
+  unsigned int new_mask_middle_off; /* the middle offset of the adapted mask */
+
+  TePDITypes::TePDIRasterPtrType source_raster;
+  TePDITypes::TePDIRasterPtrType target_raster;
+  
+  StartProgInt( "Kuan adaptative filter", channels.size() * iterations * 
+    conv_line_bound );   
+
+  for( unsigned int channels_index = 0 ;
+       channels_index < channels.size() ;
+       ++channels_index ) {
+
+    TEAGN_TRUE_OR_THROW(
+      TePDIUtils::TeCopyRasterPixels( inRaster, channels[ channels_index ],
+      aux_raster1, 0, false, false ), "Auxiliar Raster fill error" );
+
+    TEAGN_TRUE_OR_RETURN( TePDIUtils::TeGetRasterMinMaxBounds(
+      outRaster, channels[ channels_index ], channel_min_level,
+      channel_max_level ), "Unable to get raster channel level bounds" );
+
+    for( unsigned int iteration = 0 ; (int)iteration < iterations ; ++iteration ) {
+      /* Switching from input and output raster for more than 1 iteration */
+
+      if( iteration % 2 == 0 ) {
+        source_raster = aux_raster1;
+        target_raster = aux_raster2;
+      } else {
+        source_raster = aux_raster2;
+        target_raster = aux_raster1;
+      }
+
+      /* Fills the convolution buffer to cover all positions of the mask
+         always centered at buffer middle line */
+
+      for( unsigned int line = 0 ; line < buf_init_fill_lines ; ++line ) {
+        up_conv_buf( source_raster, line, 0 );
+      }
+
+      /* window convolution over raster */
+
+      for( raster_line = conv_init_line ; raster_line < conv_line_bound ;
+             ++raster_line ) {
+        /* Getting one more line from the source raster and adding to buffer */
+        
+        TEAGN_FALSE_OR_RETURN( UpdateProgInt( ( channels_index * iterations * 
+          conv_line_bound ) +
+          ( iteration * conv_line_bound ) + raster_line ),
+          "Canceled by the user" );
+
+        up_conv_buf( source_raster, raster_line + initial_mask_middle_off,
+          channels_index );
+
+        for( raster_column = conv_init_column ; raster_column < conv_column_bound ;
+             ++raster_column ) {
+
+          conv_buf_estatistics( buf_middle_line_off - initial_mask_middle_off,
+            raster_column - initial_mask_middle_off,
+            (unsigned int)initial_mask_width,
+            (unsigned int)initial_mask_width, mean, variance );
+
+          mean_2 = mean * mean;
+
+          if( variance <= 0 ) {
+            output_level = mean;
+          } else {
+            /* Mask size adptation */
+
+            relation = ( 1. - ( mean_2 * ( noise_variance / variance ) ) ) /
+                      noise_variance_plus_one;
+
+            if( relation < 0.2 ) {
+              new_mask_width = 9;
+              new_mask_middle_off = 4;
+            } else if( relation < 0.4 ) {
+              new_mask_width = 7;
+              new_mask_middle_off = 3;
+            } else if( relation < 0.7 ) {
+              new_mask_width = 5;
+              new_mask_middle_off = 2;
+            } else if( relation < 0.9 ) {
+              new_mask_width = 3;
+              new_mask_middle_off = 1;
+            } else { // relation >= 0.9
+              new_mask_width = 1;
+              new_mask_middle_off = 0;
+            }
+
+            /* Pixel value calcule */
+
+            if( new_mask_width == 1 ) {
+              output_level = conv_buf_[ buf_middle_line_off ][ raster_column ];
+            } else {
+              if( (int)new_mask_width != initial_mask_width ) {
+                conv_buf_estatistics( buf_middle_line_off - new_mask_middle_off,
+                  raster_column - new_mask_middle_off, new_mask_width, new_mask_width,
+                  mean, variance );
+
+                mean_2 = mean * mean;
+              }
+
+              relation_top = variance - ( noise_variance * mean_2 );
+              relation_bottom = variance * noise_variance_plus_one;
+
+              if( ( relation_top < 0 ) || ( relation_bottom == 0 ) ) {
+                output_level = mean;
+              } else {
+                if( ( mean != 0 ) &&
+                    ( ( variance / mean_2 ) < variance_threshold ) ) {
+
+                  output_level = mean + ( ( relation_top / relation_bottom ) *
+                    ( conv_buf_[ buf_middle_line_off ][ raster_column ] - mean ) );
+                } else {
+                  output_level = conv_buf_[ buf_middle_line_off ][ raster_column ];
+                }
+              }
+            }
+          }
+
+          /* Level range filtering */
+
+          if( output_level < channel_min_level ) {
+            output_level = channel_min_level;
+          } else if( output_level > channel_max_level ) {
+            output_level = channel_max_level;
+          }
+
+          TEAGN_TRUE_OR_RETURN( target_raster->setElement(
+            raster_column, raster_line, output_level, 0 ),
+            "Pixel mapping error" );
+        }
+      }
+    }
+
+    /* Content copy from the target raster to the output raster */
+
+    TEAGN_TRUE_OR_RETURN( TePDIUtils::TeCopyRasterPixels( target_raster, 0,
+      outRaster, channels_index, false, false ), "Output raster fill error" );
+  }
+
+  return true;
+}
diff --git a/src/terralib/image_processing/TePDIRadarKuanFilter.hpp b/src/terralib/image_processing/TePDIRadarKuanFilter.hpp
new file mode 100755
index 0000000..a595aff
--- /dev/null
+++ b/src/terralib/image_processing/TePDIRadarKuanFilter.hpp
@@ -0,0 +1,134 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIRADARKUANFILTER_HPP
+  #define TEPDIRADARKUANFILTER_HPP
+
+  #include "TePDIRadarFilter.hpp"
+  #include "TePDIParameters.hpp"
+  #include <TeSharedPtr.h>
+
+  /**
+   * @brief This is the class for radar Kuan filter.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup TePDIFiltersGroup
+   *
+   * @note The general required parameters are:
+   *
+   * @param filter_type ( TePDIKuanFType ),
+   * @param input_image (TePDITypes::TePDIRasterPtrType),
+   * @param output_image (TePDITypes::TePDIRasterPtrType),
+   * @param channels (std::vector<int>) - Band(s) to process. For
+   * @param iterations (int) - Iterations number,
+   * @param det_type (TePDIKuanDetType) - Detection type,
+   * @param look_number (double) - Image look number,
+   * @param mask_width (int) - Mask width,
+   * @param variance_threshold (double - optional ) - The noise variance threshold
+   * for each convolution.
+   */
+  class PDI_DLL TePDIRadarKuanFilter : public TePDIRadarFilter{
+    public :
+      /** @typedef Type definition for a instance pointer */
+      typedef TeSharedPtr< TePDIRadarKuanFilter > pointer;
+      /** @typedef Type definition for a const instance pointer */
+      typedef const TeSharedPtr< TePDIRadarKuanFilter > const_pointer;
+
+      /**
+       * @enum Filter type.
+       */
+      enum TePDIKuanFType{
+        /** Fixed type */
+        TePDIKuanFixedType = 1,
+        /** Adaptative type */
+        TePDIKuanAdaptType = 2
+      };
+
+      /**
+       * @enum Detection type.
+       */      
+      enum TePDIKuanDetType{
+        /** Linear detection */
+        TePDIKuanDTLinear = 1,
+        /** Quadratic detection */
+        TePDIKuanDTQuadratic = 2
+      };
+
+      /**
+       * @brief Default Constructor.
+       *
+       */
+      TePDIRadarKuanFilter();
+
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIRadarKuanFilter();
+
+      /**
+       * @brief Checks if the supplied parameters fits the requirements of each
+       * PDI algorithm implementation.
+       *
+       * @note Error log messages must be generated. No exceptions generated.
+       *
+       * @param parameters The parameters to be checked.
+       * @return true if the parameters are OK. false if not.
+       */
+      bool CheckParameters( const TePDIParameters& parameters ) const;
+
+    protected :
+      /**
+       * @brief Runs the current algorithm implementation.
+       *
+       * @return true if OK. false on error.
+       */
+      bool RunImplementation();
+
+      /**
+       * @brief Runs the fixed window algorithm implementation.
+       *
+       * @return true if OK. false on error.
+       */
+      bool RunFixedImplementation();
+
+      /**
+       * @brief Runs the adaptative window algorithm implementation.
+       *
+       * @return true if OK. false on error.
+       */
+      bool RunAdaptImplementation();
+
+      /**
+       * @brief Reset the internal state to the initial state.
+       *
+       * @param params The new parameters referente at initial state.
+       */
+      void ResetState( const TePDIParameters& params );
+
+  };
+  
+/** @example TePDIRadarFilters_test.cpp
+ *    Shows how to use this class.
+ */   
+
+#endif //TEPDIRADARKUANFILTER_HPP
diff --git a/src/terralib/image_processing/TePDIRadarKuanFilterFactory.cpp b/src/terralib/image_processing/TePDIRadarKuanFilterFactory.cpp
new file mode 100755
index 0000000..5db7685
--- /dev/null
+++ b/src/terralib/image_processing/TePDIRadarKuanFilterFactory.cpp
@@ -0,0 +1,24 @@
+ 
+#include "TePDIRadarKuanFilterFactory.hpp"
+#include "TePDIRadarKuanFilter.hpp"
+#include <TeAgnostic.h>
+
+TePDIRadarKuanFilterFactory::TePDIRadarKuanFilterFactory()
+: TePDIAlgorithmFactory( std::string( "TePDIRadarKuanFilter" ) )
+{
+};      
+
+TePDIRadarKuanFilterFactory::~TePDIRadarKuanFilterFactory()
+{
+};
+
+
+TePDIAlgorithm* TePDIRadarKuanFilterFactory::build ( const TePDIParameters& arg )
+{
+  TePDIAlgorithm* instance_ptr = new TePDIRadarKuanFilter();
+  
+  TEAGN_TRUE_OR_THROW( instance_ptr->Reset( arg ),
+    "Invalid parameters" );
+  
+  return instance_ptr;
+}
diff --git a/src/terralib/image_processing/TePDIRadarKuanFilterFactory.hpp b/src/terralib/image_processing/TePDIRadarKuanFilterFactory.hpp
new file mode 100755
index 0000000..1b89184
--- /dev/null
+++ b/src/terralib/image_processing/TePDIRadarKuanFilterFactory.hpp
@@ -0,0 +1,67 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIRADARKUANFILTERFACTORY_HPP
+  #define TEPDIRADARKUANFILTERFACTORY_HPP
+
+  #include <TeSharedPtr.h>
+  #include "TePDIAlgorithmFactory.hpp"
+  #include "TePDIParameters.hpp"
+  
+  /**
+   * @brief This is the class for radar kuan filter factory.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIAlgorithmsFactories
+   */
+  class PDI_DLL TePDIRadarKuanFilterFactory : public TePDIAlgorithmFactory
+  {
+    public :
+      
+      /**
+       * @brief Default constructor
+       */
+      TePDIRadarKuanFilterFactory();      
+      
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIRadarKuanFilterFactory();
+      
+      protected :  
+      /**
+       * @brief Implementation for the abstract TeFactory::build.
+       *
+       * @param arg A const reference to the parameters used by the
+       * algorithm.
+       * @return A pointer to the new generated algorithm instance.
+       */
+      TePDIAlgorithm* build( const TePDIParameters& arg );
+      
+  };
+  
+  namespace {
+    static TePDIRadarKuanFilterFactory TePDIRadarKuanFilterFactory_instance;
+  };  
+
+#endif
diff --git a/src/terralib/image_processing/TePDIRadarLeeFilter.cpp b/src/terralib/image_processing/TePDIRadarLeeFilter.cpp
new file mode 100755
index 0000000..3c0b0a4
--- /dev/null
+++ b/src/terralib/image_processing/TePDIRadarLeeFilter.cpp
@@ -0,0 +1,635 @@
+#include "TePDIRadarLeeFilter.hpp"
+
+#include <TeAgnostic.h>
+#include "TePDIUtils.hpp"
+
+#include "math.h"
+
+
+TePDIRadarLeeFilter::TePDIRadarLeeFilter()
+{
+}
+
+
+TePDIRadarLeeFilter::~TePDIRadarLeeFilter()
+{
+}
+
+
+void TePDIRadarLeeFilter::ResetState( const TePDIParameters& params )
+{
+  TePDIRadarFilter::ResetState( params );
+}
+
+
+bool TePDIRadarLeeFilter::CheckParameters( const 
+  TePDIParameters& parameters ) const
+{
+  /* Checking for general required parameters */
+
+  TePDITypes::TePDIRasterPtrType inRaster;
+  if( ! parameters.GetParameter( "input_image", inRaster ) ) {
+
+    TEAGN_LOGERR( "Missing parameter: input_image" );
+    return false;
+  }
+  if( ! inRaster.isActive() ) {
+
+    TEAGN_LOGERR( "Invalid parameter: input_image inactive" );
+    return false;
+  }
+  if( inRaster->params().status_ == TeRasterParams::TeNotReady ) {
+
+    TEAGN_LOGERR( "Invalid parameter: input_image not ready" );
+    return false;
+  }
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  if( ! parameters.GetParameter( "output_image", outRaster ) ) {
+
+    TEAGN_LOGERR( "Missing parameter: output_image" );
+    return false;
+  }
+  if( ! outRaster.isActive() ) {
+
+    TEAGN_LOGERR( "Invalid parameter: output_image inactive" );
+    return false;
+  }
+  if( inRaster->params().status_ == TeRasterParams::TeReadyToWrite ) {
+
+    TEAGN_LOGERR( "Invalid parameter: output_image not ready" );
+    return false;
+  }
+
+  /* Filter type checking */
+  TePDILeeFType filter_type;
+  if( ! parameters.GetParameter( "filter_type", filter_type ) ) {
+
+    TEAGN_LOGERR( "Missing parameter: filter_type" );
+    return false;
+  }
+  if( ( filter_type != TePDILeeFixedType ) &&
+      ( filter_type != TePDILeeAdaptType ) ) {
+
+    TEAGN_LOGERR( "Invalid parameter: filter_type" );
+    return false;
+  }
+
+  /* channels parameter checking */
+
+  std::vector< int > channels;
+  if( ! parameters.GetParameter( "channels", channels ) ) {
+
+    TEAGN_LOGERR( "Missing parameter: channels" );
+    return false;
+  }
+  for( unsigned int index = 0 ; index < channels.size() ; ++index ) {
+    if( channels[ index ] >= inRaster->nBands() ) {
+      TEAGN_LOGERR( "Invalid parameter: channels" );
+      return false;
+    }
+  }
+
+  /* Checking for number of iterations */
+
+  int iterations = 0;
+  if( ! parameters.GetParameter( "iterations", iterations ) ) {
+
+    TEAGN_LOGERR( "Missing parameter: iterations" );
+    return false;
+  }
+  TEAGN_TRUE_OR_RETURN( iterations > 0, "Invalid iterations number" );
+
+  /* Checking for detection type parameter */
+
+  TePDILeeDetType det_type;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "det_type", det_type ),
+    "Missing parameter: det_type" );
+  TEAGN_TRUE_OR_RETURN(
+    ( ( det_type == TePDILeeDTLinear ) || ( det_type == TePDILeeDTQuadratic ) ),
+    "Invalid detection type" );
+
+  /* Checking for image look number */
+
+  double look_number = 0;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "look_number", look_number ),
+    "Missing parameter: look_number" );
+  TEAGN_TRUE_OR_RETURN( look_number > 0,  "Invalid image look number" );
+
+  /* Checking for detection type parameter */
+
+  int mask_width = 0;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "mask_width", mask_width ),
+    "Missing parameter: mask_width" );
+  TEAGN_TRUE_OR_RETURN( ( ( mask_width > 2 ) && ( ( mask_width % 2 ) != 0 ) ),
+    "Invalid mask width" );
+  if( filter_type != TePDILeeAdaptType ) {
+    TEAGN_TRUE_OR_RETURN( ( mask_width <=  (int)max_adapt_mask_width_ ),
+      "Invalid mask width" );
+  }
+
+  /* Checking for variance_threshold parameter */
+
+  double variance_threshold = 0;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "variance_threshold",
+    variance_threshold ),
+    "Missing parameter: variance_threshold" );
+  TEAGN_TRUE_OR_RETURN( variance_threshold >= 0,
+    "Invalid variance_threshold" );
+
+  /* Checking photometric interpretation */
+  
+  for( unsigned int channel = 0 ; channel < channels.size() ; ++channel ) {
+    TEAGN_TRUE_OR_RETURN( ( 
+      ( inRaster->params().photometric_[ channel ] == 
+        TeRasterParams::TeRGB ) ||
+      ( inRaster->params().photometric_[ channel ] == 
+        TeRasterParams::TeMultiBand ) ),
+    "Invalid parameter - input_image (invalid photometric interpretation)" );
+  }  
+  
+  return true;
+}
+
+
+bool TePDIRadarLeeFilter::RunImplementation()
+{
+  TePDILeeFType filter_type;
+  params_.GetParameter( "filter_type", filter_type );
+
+  switch( filter_type ) {
+    case TePDILeeFixedType :
+    {
+      return RunFixedImplementation();
+      break;
+    }
+    case TePDILeeAdaptType :
+    {
+      return RunAdaptImplementation();
+      break;
+    }
+    default :
+    {
+      TEAGN_LOG_AND_RETURN( "Invalid algorithm type" );
+    }
+  }
+}
+
+
+bool TePDIRadarLeeFilter::RunFixedImplementation()
+{
+  TePDITypes::TePDIRasterPtrType inRaster;
+  params_.GetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  params_.GetParameter( "output_image", outRaster );
+
+  std::vector< int > channels;
+  params_.GetParameter( "channels", channels );
+
+  int mask_width;
+  params_.GetParameter( "mask_width", mask_width );
+
+  int iterations = 0;
+  params_.GetParameter( "iterations", iterations );
+
+  TePDILeeDetType det_type;
+  params_.GetParameter( "det_type", det_type );
+
+  double look_number = 0;
+  params_.GetParameter( "look_number", look_number );
+
+  double variance_threshold;
+  params_.GetParameter( "variance_threshold", variance_threshold );
+
+  /* Setting the output raster */
+  
+  TeRasterParams outRaster_params = outRaster->params();
+  
+  outRaster_params.nBands( channels.size() );
+  if( inRaster->projection() != 0 ) {
+    TeSharedPtr< TeProjection > proj( TeProjectionFactory::make( 
+      inRaster->projection()->params() ) );  
+    outRaster_params.projection( proj.nakedPointer() );
+  }
+  outRaster_params.boxResolution( inRaster->params().box().x1(), 
+    inRaster->params().box().y1(), inRaster->params().box().x2(), 
+    inRaster->params().box().y2(), inRaster->params().resx_, 
+    inRaster->params().resy_ );  
+
+  outRaster_params.setPhotometric( TeRasterParams::TeMultiBand, -1 );  
+    
+  TEAGN_TRUE_OR_RETURN( outRaster->init( outRaster_params ),
+    "Output raster reset error" );  
+
+  /* Creating the temporary rasters with one band each */
+
+  TePDITypes::TePDIRasterPtrType aux_raster1;
+  TEAGN_TRUE_OR_RETURN( TePDIUtils::TeAllocRAMRaster( outRaster, aux_raster1, 1,
+    false, false, TeDOUBLE ), "Unable to create auxiliary raster 1" );
+
+  TePDITypes::TePDIRasterPtrType aux_raster2;
+  TEAGN_TRUE_OR_RETURN( TePDIUtils::TeAllocRAMRaster( outRaster, aux_raster2, 1,
+    false, false, TeDOUBLE ), "Unable to create auxiliary raster 2" );
+
+  /* Noise statistics */
+
+  double noise_deviation = 0;
+
+  if( det_type == TePDILeeDTLinear ) {
+    noise_deviation = 0.522723008 / sqrt( look_number );
+  } else if( det_type == TePDILeeDTQuadratic ) {
+    noise_deviation = 1.0 / sqrt( look_number );
+  }
+
+  double noise_variance = noise_deviation * noise_deviation;
+  double noise_variance_2 = noise_variance * noise_variance;
+
+  /* Setting the convolution buffer initial state */
+
+  unsigned int raster_lines = (unsigned int)outRaster->params().nlines_;
+  unsigned int raster_columns = (unsigned int)outRaster->params().ncols_;
+
+  reset_conv_buf( mask_width, raster_columns );
+
+  /* Convolution Loop */
+
+  double output_level; /* the value generated by each pixel mask calcule */
+
+  unsigned int mask_middle_off_lines =
+    (unsigned int) floor( ((double)mask_width) / 2. );
+  unsigned int mask_middle_off_columns = mask_middle_off_lines;
+
+  unsigned int conv_column_bound = raster_columns - mask_width + 1;
+  unsigned int conv_line_bound = raster_lines - mask_width + 1;
+
+  unsigned int raster_line; /* mask top-left line */
+  unsigned int conv_buf_column; /* mask top-left column */
+
+  unsigned int current_pixel_column; /* raster reference for the current pixel being
+                                        processed */
+
+  double channel_min_level;
+  double channel_max_level;
+
+  double mean; /* for the current window covolution inside convolution buffer */
+  double variance; /* for the current window convolution inside convolution buffer */
+  double mean_2; /* mean ^ 2 */
+  double relation_top;
+  double relation_bottom;
+
+  TePDITypes::TePDIRasterPtrType source_raster;
+  TePDITypes::TePDIRasterPtrType target_raster;
+  
+  StartProgInt( "Lee Fixed filter", channels.size() * iterations * 
+    conv_line_bound );   
+
+  for( unsigned int channels_index = 0 ;
+       channels_index < channels.size() ;
+       ++channels_index ) {
+
+    TEAGN_TRUE_OR_THROW(
+      TePDIUtils::TeCopyRasterPixels( inRaster, channels[ channels_index ],
+      aux_raster1, 0, false, false ), "Auxiliar Raster fill error" );
+
+    TEAGN_TRUE_OR_RETURN( TePDIUtils::TeGetRasterMinMaxBounds(
+      outRaster, channels[ channels_index ], channel_min_level,
+      channel_max_level ), "Unable to get raster channel level bounds" );
+
+    for( unsigned int iteration = 0 ; (int)iteration < iterations ; ++iteration ) {
+      /* Switching from input and output raster for more than 1 iteration */
+
+      if( iteration % 2 == 0 ) {
+        source_raster = aux_raster1;
+        target_raster = aux_raster2;
+      } else {
+        source_raster = aux_raster2;
+        target_raster = aux_raster1;
+      }
+
+      /* Fills the convolution buffer with the first "mask_lines" from the raster */
+
+      for( int line = 0 ; line < ( mask_width - 1) ; ++line ) {
+        up_conv_buf( source_raster, line, 0 );
+      }
+
+      /* window convolution over raster */
+
+      for( raster_line = 0 ; raster_line < conv_line_bound ; ++raster_line ) {
+        /* Getting one more line from the source raster and adding to buffer */
+        
+        TEAGN_FALSE_OR_RETURN( UpdateProgInt( ( channels_index * iterations * 
+          conv_line_bound ) +
+          ( iteration * conv_line_bound ) + raster_line ),
+          "Canceled by the user" );
+
+        up_conv_buf( source_raster, raster_line + mask_width - 1,
+          channels_index );
+
+        for( conv_buf_column = 0 ; conv_buf_column < conv_column_bound ;
+             ++conv_buf_column ) {
+
+          current_pixel_column = conv_buf_column +  mask_middle_off_columns;
+
+          conv_buf_estatistics( 0, conv_buf_column, mask_width, mask_width, mean,
+            variance );
+
+          if( variance < 0 ) {
+            output_level = mean;
+          } else {
+            mean_2 = mean * mean;
+            relation_top = variance - ( noise_variance * mean_2 );
+            relation_bottom = variance + ( noise_variance_2 * mean_2 );
+
+            if( relation_top < 0 ) {
+              output_level = mean;
+            } else {
+              output_level =
+                conv_buf_[ mask_middle_off_lines ][ current_pixel_column ];
+
+              if( ( mean != 0 ) &&
+                  ( relation_bottom != 0 ) &&
+                  ( ( variance / mean_2 ) < variance_threshold ) ) {
+
+                output_level = mean + ( ( relation_top / relation_bottom ) *
+                  ( output_level - mean ) );
+              }
+            }
+          }
+
+          /* Level range filtering */
+
+          if( output_level < channel_min_level ) {
+            output_level = channel_min_level;
+          } else if( output_level > channel_max_level ) {
+            output_level = channel_max_level;
+          }
+
+          TEAGN_TRUE_OR_RETURN( target_raster->setElement(
+            current_pixel_column,
+            raster_line +  mask_middle_off_lines, output_level, 0 ),
+            "Pixel mapping error" );
+        }
+      }
+    }
+
+    /* Content copy from the target raster to the output raster */
+
+    TEAGN_TRUE_OR_RETURN( TePDIUtils::TeCopyRasterPixels( target_raster, 0,
+      outRaster, channels_index, false, false ), "Output raster fill error" );
+  }
+
+  return true;
+}
+
+
+bool TePDIRadarLeeFilter::RunAdaptImplementation()
+{
+  TePDITypes::TePDIRasterPtrType inRaster;
+  params_.GetParameter( "input_image", inRaster );
+
+  TePDITypes::TePDIRasterPtrType outRaster;
+  params_.GetParameter( "output_image", outRaster );
+
+  std::vector< int > channels;
+  params_.GetParameter( "channels", channels );
+
+  int initial_mask_width;
+  params_.GetParameter( "mask_width", initial_mask_width );
+
+  int iterations = 0;
+  params_.GetParameter( "iterations", iterations );
+
+  TePDILeeDetType det_type;
+  params_.GetParameter( "det_type", det_type );
+
+  double look_number = 0;
+  params_.GetParameter( "look_number", look_number );
+
+  double variance_threshold;
+  params_.GetParameter( "variance_threshold", variance_threshold );
+
+  /* Setting the output raster */
+  
+  TeRasterParams outRaster_params = outRaster->params();
+  
+  outRaster_params.nBands( channels.size() );
+  if( inRaster->projection() != 0 ) {
+    TeSharedPtr< TeProjection > proj( TeProjectionFactory::make( 
+      inRaster->projection()->params() ) );  
+    outRaster_params.projection( proj.nakedPointer() );
+  }
+  outRaster_params.boxResolution( inRaster->params().box().x1(), 
+    inRaster->params().box().y1(), inRaster->params().box().x2(), 
+    inRaster->params().box().y2(), inRaster->params().resx_, 
+    inRaster->params().resy_ );  
+    
+  outRaster_params.setPhotometric( TeRasterParams::TeMultiBand, -1 );
+
+  TEAGN_TRUE_OR_RETURN( outRaster->init( outRaster_params ),
+    "Output raster reset error" );  
+
+  const unsigned int raster_lines = (unsigned int)outRaster->params().nlines_;
+  const unsigned int raster_columns = (unsigned int)outRaster->params().ncols_;
+
+  /* Creating the temporary rasters with one band each */
+
+  TePDITypes::TePDIRasterPtrType aux_raster1;
+  TEAGN_TRUE_OR_RETURN( TePDIUtils::TeAllocRAMRaster( outRaster, aux_raster1, 1,
+    false, false, TeDOUBLE ), "Unable to create auxiliary raster 1" );
+
+  TePDITypes::TePDIRasterPtrType aux_raster2;
+  TEAGN_TRUE_OR_RETURN( TePDIUtils::TeAllocRAMRaster( outRaster, aux_raster2, 1,
+    false, false, TeDOUBLE ), "Unable to create auxiliary raster 2" );
+
+  /* Noise statistics */
+
+  double noise_deviation = 0;
+
+  if( det_type == TePDILeeDTLinear ) {
+    noise_deviation = 0.522723008 / sqrt( look_number );
+  } else if( det_type == TePDILeeDTQuadratic ) {
+    noise_deviation = 1.0 / sqrt( look_number );
+  }
+
+  const double noise_variance = noise_deviation * noise_deviation;
+  const double noise_variance_2 = noise_variance * noise_variance;
+  const double noise_variance_plus_one = noise_variance + 1.;
+
+  /* Setting the convolution buffer initial state */
+
+  reset_conv_buf( max_adapt_mask_width_, raster_columns );
+
+  /* Convolution Loop */
+
+  double output_level; /* the value generated by each pixel mask calcule */
+
+  const unsigned int initial_mask_middle_off =
+    (unsigned int) floor( ((double)initial_mask_width) / 2. );
+
+  const unsigned int buf_middle_line_off =
+    (unsigned int)floor( ((double)max_adapt_mask_width_)  / 2. );
+  const unsigned int buf_init_fill_lines = buf_middle_line_off +
+    initial_mask_middle_off;
+
+  const unsigned int conv_init_line = (unsigned int)
+    floor( (double)max_adapt_mask_width_ / 2. );
+  const unsigned int conv_init_column = conv_init_line;
+  const unsigned int conv_column_bound = raster_columns - conv_init_column;
+  const unsigned int conv_line_bound = raster_lines - conv_init_line;
+
+  unsigned int raster_line; /* currente pixel being processed line */
+  unsigned int raster_column; /* currente pixel being processed column */
+
+  double channel_min_level;
+  double channel_max_level;
+
+  double mean; /* for the current window covolution inside convolution buffer */
+  double mean_2; // mean * mean
+  double variance; /* for the current window convolution inside convolution buffer */
+  double relation;
+  double relation_top;
+  double relation_bottom;
+
+  unsigned int new_mask_width;  /* the widht of the adapted mask */
+  unsigned int new_mask_middle_off; /* the middle offset of the adapted mask */
+
+  TePDITypes::TePDIRasterPtrType source_raster;
+  TePDITypes::TePDIRasterPtrType target_raster;
+  
+  StartProgInt( "Lee Adaptative filter", channels.size() * iterations * 
+    conv_line_bound );   
+
+  for( unsigned int channels_index = 0 ;
+       channels_index < channels.size() ;
+       ++channels_index ) {
+
+    TEAGN_TRUE_OR_THROW(
+      TePDIUtils::TeCopyRasterPixels( inRaster, channels[ channels_index ],
+      aux_raster1, 0, false, false ), "Auxiliar Raster fill error" );
+
+    TEAGN_TRUE_OR_RETURN( TePDIUtils::TeGetRasterMinMaxBounds(
+      outRaster, channels[ channels_index ], channel_min_level,
+      channel_max_level ), "Unable to get raster channel level bounds" );
+
+    for( unsigned int iteration = 0 ; (int)iteration < iterations ; ++iteration ) {
+      /* Switching from input and output raster for more than 1 iteration */
+
+      if( iteration % 2 == 0 ) {
+        source_raster = aux_raster1;
+        target_raster = aux_raster2;
+      } else {
+        source_raster = aux_raster2;
+        target_raster = aux_raster1;
+      }
+
+      /* Fills the convolution buffer to cover all positions of the mask
+         always centered at buffer middle line */
+
+      for( unsigned int line = 0 ; line < buf_init_fill_lines ; ++line ) {
+        up_conv_buf( source_raster, line, 0 );
+      }
+
+      /* window convolution over raster */
+
+      for( raster_line = conv_init_line ; raster_line < conv_line_bound ;
+             ++raster_line ) {
+        /* Getting one more line from the source raster and adding to buffer */
+        
+        TEAGN_FALSE_OR_RETURN( UpdateProgInt( ( channels_index * iterations * 
+          conv_line_bound ) +
+          ( iteration * conv_line_bound ) + raster_line ),
+          "Canceled by the user" );
+
+        up_conv_buf( source_raster, raster_line + initial_mask_middle_off,
+          channels_index );
+
+        for( raster_column = conv_init_column ; raster_column < conv_column_bound ;
+             ++raster_column ) {
+
+          conv_buf_estatistics( buf_middle_line_off - initial_mask_middle_off,
+            raster_column - initial_mask_middle_off,
+            (unsigned int)initial_mask_width,
+            (unsigned int)initial_mask_width, mean, variance );
+
+          mean_2 = mean * mean;
+
+          if( variance <= 0 ) {
+            output_level = mean;
+          } else {
+            /* Mask size adptation */
+
+            relation = ( 1. - ( mean_2 * ( noise_variance / variance ) ) ) /
+                      noise_variance_plus_one;
+
+            if( relation < 0.2 ) {
+              new_mask_width = 9;
+              new_mask_middle_off = 4;
+            } else if( relation < 0.4 ) {
+              new_mask_width = 7;
+              new_mask_middle_off = 3;
+            } else if( relation < 0.7 ) {
+              new_mask_width = 5;
+              new_mask_middle_off = 2;
+            } else if( relation < 0.9 ) {
+              new_mask_width = 3;
+              new_mask_middle_off = 1;
+            } else { // relation >= 0.9
+              new_mask_width = 1;
+              new_mask_middle_off = 0;
+            }
+
+            /* Pixel value calcule */
+
+            if( new_mask_width == 1 ) {
+              output_level = conv_buf_[ buf_middle_line_off ][ raster_column ];
+            } else {
+              if( (int)new_mask_width != initial_mask_width ) {
+                conv_buf_estatistics( buf_middle_line_off - new_mask_middle_off,
+                  raster_column - new_mask_middle_off, new_mask_width, new_mask_width,
+                  mean, variance );
+
+                mean_2 = mean * mean;
+              }
+
+              relation_top = variance - ( noise_variance * mean_2 );
+              relation_bottom = variance + ( noise_variance_2 * mean_2 );
+
+              if( ( relation_top < 0 ) || ( relation_bottom == 0 ) ) {
+                output_level = mean;
+              } else {
+                if( ( mean != 0 ) &&
+                    ( ( variance / mean_2 ) < variance_threshold ) ) {
+
+                  output_level = mean + ( ( relation_top / relation_bottom ) *
+                    ( conv_buf_[ buf_middle_line_off ][ raster_column ] - mean ) );
+                } else {
+                  output_level = conv_buf_[ buf_middle_line_off ][ raster_column ];
+                }
+              }
+            }
+          }
+
+          /* Level range filtering */
+
+          if( output_level < channel_min_level ) {
+            output_level = channel_min_level;
+          } else if( output_level > channel_max_level ) {
+            output_level = channel_max_level;
+          }
+
+          TEAGN_TRUE_OR_RETURN( target_raster->setElement(
+            raster_column, raster_line, output_level, 0 ),
+            "Pixel mapping error" );
+        }
+      }
+    }
+
+    /* Content copy from the target raster to the output raster */
+
+    TEAGN_TRUE_OR_RETURN( TePDIUtils::TeCopyRasterPixels( target_raster, 0,
+      outRaster, channels_index, false, false ), "Output raster fill error" );
+  }
+
+  return true;
+}
diff --git a/src/terralib/image_processing/TePDIRadarLeeFilter.hpp b/src/terralib/image_processing/TePDIRadarLeeFilter.hpp
new file mode 100755
index 0000000..9ed551e
--- /dev/null
+++ b/src/terralib/image_processing/TePDIRadarLeeFilter.hpp
@@ -0,0 +1,134 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIRADARLEEFILTER_HPP
+  #define TEPDIRADARLEEFILTER_HPP
+
+  #include "TePDIRadarFilter.hpp"
+  #include "TePDIParameters.hpp"
+  #include <TeSharedPtr.h>
+
+  /**
+   * @brief This is the class for radar Lee filter.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup TePDIFiltersGroup
+   *
+   * @note The general required parameters are:
+   *
+   * @param filter_type ( TePDILeeFType ),
+   * @param input_image (TePDITypes::TePDIRasterPtrType),
+   * @param output_image (TePDITypes::TePDIRasterPtrType),
+   * @param channels (std::vector<int>) - Band(s) to process. For
+   * @param iterations (int) - Iterations number,
+   * @param det_type (TePDILeeDetType) - Detection type,
+   * @param look_number (double) - Image look number,
+   * @param mask_width (int) - Mask width,
+   * @param variance_threshold (double - optional ) - The noise variance threshold
+   * for each convolution.
+   */
+  class PDI_DLL TePDIRadarLeeFilter : public TePDIRadarFilter{
+    public :
+      /** @typedef Type definition for a instance pointer */
+      typedef TeSharedPtr< TePDIRadarLeeFilter > pointer;
+      /** @typedef Type definition for a const instance pointer */
+      typedef const TeSharedPtr< TePDIRadarLeeFilter > const_pointer;
+
+      /**
+       * @enum Filter type 
+       */
+      enum TePDILeeFType{
+        /** Fixed type */
+        TePDILeeFixedType = 1,
+        /** Adaptative type */
+        TePDILeeAdaptType = 2
+      };
+
+      /**
+       * @enum Detection type 
+       */
+      enum TePDILeeDetType{
+        /** Linear detection */
+        TePDILeeDTLinear = 1,
+        /** Quadratic detection */
+        TePDILeeDTQuadratic = 2
+      };
+
+      /**
+       * @brief Default Constructor.
+       *
+       */
+      TePDIRadarLeeFilter();
+
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIRadarLeeFilter();
+
+      /**
+       * @brief Checks if the supplied parameters fits the requirements of each
+       * PDI algorithm implementation.
+       *
+       * @note Error log messages must be generated. No exceptions generated.
+       *
+       * @param parameters The parameters to be checked.
+       * @return true if the parameters are OK. false if not.
+       */
+      bool CheckParameters( const TePDIParameters& parameters ) const;
+
+    protected :
+      /**
+       * @brief Runs the current algorithm implementation.
+       *
+       * @return true if OK. false on error.
+       */
+      bool RunImplementation();
+
+      /**
+       * @brief Runs the fixed window algorithm implementation.
+       *
+       * @return true if OK. false on error.
+       */
+      bool RunFixedImplementation();
+
+      /**
+       * @brief Runs the adaptative window algorithm implementation.
+       *
+       * @return true if OK. false on error.
+       */
+      bool RunAdaptImplementation();
+
+      /**
+       * @brief Reset the internal state to the initial state.
+       *
+       * @param params The new parameters referente at initial state.
+       */
+      void ResetState( const TePDIParameters& params );
+
+  };
+  
+/** @example TePDIRadarFilters_test.cpp
+ *    Shows how to use this class.
+ */   
+
+#endif //TEPDIRADARLEEFILTER_HPP
diff --git a/src/terralib/image_processing/TePDIRadarLeeFilterFactory.cpp b/src/terralib/image_processing/TePDIRadarLeeFilterFactory.cpp
new file mode 100755
index 0000000..de92034
--- /dev/null
+++ b/src/terralib/image_processing/TePDIRadarLeeFilterFactory.cpp
@@ -0,0 +1,24 @@
+ 
+#include "TePDIRadarLeeFilterFactory.hpp"
+#include "TePDIRadarLeeFilter.hpp"
+#include <TeAgnostic.h>
+
+TePDIRadarLeeFilterFactory::TePDIRadarLeeFilterFactory()
+: TePDIAlgorithmFactory( std::string( "TePDIRadarLeeFilter" ) )
+{
+};      
+
+TePDIRadarLeeFilterFactory::~TePDIRadarLeeFilterFactory()
+{
+};
+
+
+TePDIAlgorithm* TePDIRadarLeeFilterFactory::build ( const TePDIParameters& arg )
+{
+  TePDIAlgorithm* instance_ptr = new TePDIRadarLeeFilter();
+  
+  TEAGN_TRUE_OR_THROW( instance_ptr->Reset( arg ),
+    "Invalid parameters" );
+  
+  return instance_ptr;
+}
diff --git a/src/terralib/image_processing/TePDIRadarLeeFilterFactory.hpp b/src/terralib/image_processing/TePDIRadarLeeFilterFactory.hpp
new file mode 100755
index 0000000..67345d0
--- /dev/null
+++ b/src/terralib/image_processing/TePDIRadarLeeFilterFactory.hpp
@@ -0,0 +1,67 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIRADARLEEFILTERFACTORY_HPP
+  #define TEPDIRADARLEEFILTERFACTORY_HPP
+
+  #include <TeSharedPtr.h>
+  #include "TePDIAlgorithmFactory.hpp"
+  #include "TePDIParameters.hpp"
+  
+  /**
+   * @brief This is the class for radar lee filter factory.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIAlgorithmsFactories
+   */
+  class PDI_DLL TePDIRadarLeeFilterFactory : public TePDIAlgorithmFactory
+  {
+    public :
+      
+      /**
+       * @brief Default constructor
+       */
+      TePDIRadarLeeFilterFactory();      
+      
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIRadarLeeFilterFactory();
+      
+      protected :  
+      /**
+       * @brief Implementation for the abstract TeFactory::build.
+       *
+       * @param arg A const reference to the parameters used by the
+       * algorithm.
+       * @return A pointer to the new generated algorithm instance.
+       */
+      TePDIAlgorithm* build( const TePDIParameters& arg );
+      
+  };
+  
+  namespace {
+    static TePDIRadarLeeFilterFactory TePDIRadarLeeFilterFactory_instance;
+  };  
+
+#endif
diff --git a/src/terralib/image_processing/TePDIRaster2Vector.cpp b/src/terralib/image_processing/TePDIRaster2Vector.cpp
new file mode 100755
index 0000000..1ef8600
--- /dev/null
+++ b/src/terralib/image_processing/TePDIRaster2Vector.cpp
@@ -0,0 +1,886 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright  2001-2004 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+
+#include <TePDIRaster2Vector.hpp>
+#include <TeAgnostic.h>
+#include <TePDIUtils.hpp>
+
+#include <TeUtils.h>
+
+#include <algorithm>
+#include <string>
+#include <vector>
+
+#include <float.h>
+
+//these are the 8 cardinals directions used to parcour an edge
+#define NW 0
+#define N  1
+#define EN 2
+#define E  3
+#define SE 4
+#define S  5
+#define WS 6
+#define W  7
+
+
+TePDIRaster2Vector::TePDIRaster2Vector()
+{
+  raster_uses_dummy_ = false;
+  dummy_value_ = 0;
+  containerPolygons_.clear();
+  rtreePolygons_=NULL;
+  raster_channel_ = 0;
+  
+  /* Updating the directions  */
+  
+  directions_[ 0 ] = TeCoord2D( -1, -1 );  /* NW - 0 */
+  directions_[ 1 ] = TeCoord2D(  0, -1 );  /* N  - 1 */
+  directions_[ 2 ] = TeCoord2D(  1, -1 );  /* EN - 2 */
+  directions_[ 3 ] = TeCoord2D(  1,  0 );  /* E  - 3 */
+  directions_[ 4 ] = TeCoord2D(  1,  1 );  /* SE - 4 */
+  directions_[ 5 ] = TeCoord2D(  0,  1 );  /* S  - 5 */
+  directions_[ 6 ] = TeCoord2D( -1,  1 );  /* WS - 6 */
+  directions_[ 7 ] = TeCoord2D( -1,  0 );  /* W  - 7 */  
+}
+
+TePDIRaster2Vector::~TePDIRaster2Vector()
+{
+  clear();
+}
+
+bool
+TePDIRaster2Vector :: CheckParameters( 
+  const TePDIParameters& parameters ) const {
+  /* Checking for general required parameters */
+
+  //parameter input_image
+  TePDITypes::TePDIRasterPtrType inRaster;
+  if( ! parameters.GetParameter( "rotulated_image", inRaster ) ) {
+
+    TEAGN_LOGERR( "Missing parameter: rotulated_image" );
+    return false;
+  }
+  if( ! inRaster.isActive() ) {
+
+    TEAGN_LOGERR( "Invalid parameter: rotulated_image inactive" );
+    return false;
+  }
+  if( inRaster->params().status_ == TeRasterParams::TeNotReady ) {
+
+    TEAGN_LOGERR( "Invalid parameter: rotulated_image not ready" );
+    return false;
+  }
+  
+  /* Checking output_polsets */
+  
+  TEAGN_TRUE_OR_RETURN( 
+    parameters.CheckParameter< TePDITypes::TePDIPolSetMapPtrType >( 
+    "output_polsets" ), "Missing parameter: output_polsets" );
+  
+  TePDITypes::TePDIPolSetMapPtrType output_polsets;
+  parameters.GetParameter( "output_polsets", output_polsets );
+            
+  TEAGN_TRUE_OR_RETURN( output_polsets.isActive(),
+    "Invalid parameter output_polsets : Inactive polygon set pointer" );
+
+  /* Checking channel */
+  
+  unsigned int channel = 0;
+  
+  TEAGN_TRUE_OR_RETURN( 
+    parameters.GetParameter( "channel", channel ), 
+    "Missing parameter: channel" );
+    
+  TEAGN_TRUE_OR_RETURN( ( channel < (unsigned int)inRaster->nBands() ),
+    "Invalid parameter: channel" );
+    
+  /* checking rotulated_image data type */
+  
+  for( int band = 0 ; band < inRaster->params().nBands() ; ++band ) {
+    TEAGN_TRUE_OR_RETURN( 
+      ( inRaster->params().dataType_[ band ] != TeFLOAT ), 
+      "Invalid rotulated_image floating point raster data type" );
+    TEAGN_TRUE_OR_RETURN( 
+      ( inRaster->params().dataType_[ band ] != TeDOUBLE ), 
+      "Invalid rotulated_image floating point raster data type" );    
+  }  
+    
+  return true;
+}
+
+
+bool TePDIRaster2Vector::RunImplementation()
+{
+  clear();
+  
+  /* Extratcting parameters */
+  
+  params_.GetParameter( "rotulated_image", raster_ );
+  params_.GetParameter( "channel", raster_channel_ );  
+  
+  unsigned long int max_pols = 0;
+  if( params_.CheckParameter< unsigned long int >( "max_pols" ) ) {
+    params_.GetParameter( "max_pols", max_pols );
+  }
+  
+  /* Guessing dummy use */
+        
+  raster_uses_dummy_ = raster_->params().useDummy_;
+  dummy_value_ = 0;
+  if( raster_uses_dummy_ ) {
+    dummy_value_ = raster_->params().dummy_[ 0 ];
+  }
+
+  //attributes of the raster
+  
+  resx_ = raster_->params().resx_ ;
+  resy_ = raster_->params().resy_ ;
+
+  const TeBox raster_bbox=raster_->params().boundingBox();
+  nCols_  = raster_->params().ncols_;
+  nLines_ = raster_->params().nlines_;
+
+  //declarations
+        
+  double val;
+  int i,j;
+
+  /* Creating a new RTree */
+  
+  rtreePolygons_ = new TeSAM::TeRTree<unsigned int, 8, 4>(
+    raster_->params().boundingBox());
+    
+  int countObjects = 0;
+  vector<unsigned int> indexVec;
+
+  StartProgInt( "Vectorizing...", nLines_ );
+                
+  // scanning rotulated image in row order to vectorize the cells
+  
+  TeCoord2D last_line_ll_point;
+  TeCoord2D last_line_ll_point_indexed;
+  TeCoord2D last_line_lr_point;
+  TeCoord2D last_line_lr_point_indexed;  
+  
+  for ( j = 0 ; j < nLines_ ; j++) {
+    TEAGN_FALSE_OR_RETURN( UpdateProgInt( j ), "Canceled by the user" );
+    
+    /* Cleaning the tileindexers that will not be used anymore */
+    
+    last_line_ll_point_indexed.setXY( 0, ( (double)j ) - 1.0 );
+    last_line_lr_point_indexed.setXY( ( (double)nCols_ ) - 1, 
+      ( (double)j ) - 1.0 );
+    
+    last_line_ll_point = raster_->index2Coord( 
+      last_line_ll_point_indexed );
+    last_line_lr_point = raster_->index2Coord( 
+      last_line_lr_point_indexed );
+            
+    TeBox last_line_bbox( last_line_ll_point,
+      last_line_lr_point );
+      
+    indexVec.clear();
+    rtreePolygons_->search( last_line_bbox, indexVec ); 
+    
+    for( unsigned int indexVec_index = 0 ;
+      indexVec_index < indexVec.size() ; ++indexVec_index ) {
+      
+      TePDIRaster2VectorPolStruct& curr_pol_struct =
+        containerPolygons_[ indexVec[ indexVec_index ] ];
+      
+      if( raster_->coord2Index( 
+        curr_pol_struct.poly_.box().lowerLeft() ).y() < j ) {
+        
+        curr_pol_struct.indexer_->clear();
+      }
+    }
+      
+    /* iterating through columns */
+    
+    for ( i = 0 ; i < nCols_ ; i++) {
+      /* Virifying if the current point is already inside a polygon generated
+         before */
+         
+      TeCoord2D coordMatrix(i, j);
+      TeCoord2D coordWorld = raster_->index2Coord(coordMatrix);
+      TeBox boxPoint(coordWorld, coordWorld);
+      bool exist = false;  
+      
+      indexVec.clear();
+      rtreePolygons_->search( boxPoint, indexVec );
+      
+      if( ! raster_->getElement(i,j,val,raster_channel_) ) {
+        val = dummy_value_;
+      }      
+      
+      if ( ! indexVec.empty() ) {
+        unsigned int indexVec_index = 0;        
+
+        while( indexVec_index < indexVec.size() ) {
+          TEAGN_DEBUG_CONDITION( 
+            ( indexVec[ indexVec_index ] < containerPolygons_.size() ),
+            "Invalid cadidates vector index" );
+    
+          const TePDIRaster2VectorPolStruct& pol_str_ref = 
+            containerPolygons_[ indexVec[ indexVec_index ] ];
+      
+          if ( val == pol_str_ref.value_ ) {
+            if( TePDIUtils::TeRelation( coordWorld, 
+              *( pol_str_ref.indexer_ ) ) == TeINSIDE ) {
+                 
+              exist = true;
+              break;
+            }        
+          }
+          
+          ++indexVec_index;
+        }                
+      }
+
+      if( ! exist ) {
+         //we found a new class
+         
+        TeLine2D line; 
+         
+        if( detectEdge( i, j, line ) ) {
+          try {
+            TePolygon poly;
+            poly.add( line );
+            
+            /* Verifying if the polygon is a hole of other one */
+              
+            unsigned int indexVec_index = 0;
+            
+            while( indexVec_index < indexVec.size() ) {
+              TePDIRaster2VectorPolStruct& pol_struct_ref = 
+                containerPolygons_[ indexVec[ indexVec_index ] ];
+              TeTileIndexer& indexer_ref = *( pol_struct_ref.indexer_ );
+              TePolygon& pol_ref = pol_struct_ref.poly_;
+            
+              if( TePDIUtils::TeRelation( coordWorld, indexer_ref ) == 
+                TeINSIDE ) {
+              
+                pol_ref.add( poly.first() );
+                indexer_ref.addRing( pol_ref.size() - 1 );
+                  
+                break;
+              }
+              
+              ++indexVec_index;
+            }
+            
+            /* free indexVec */
+            
+            indexVec.clear();
+            
+            // inserting the new polygon into tree and container
+            
+            if( raster_uses_dummy_ && ( val == dummy_value_ ) ) {
+              poly.objectId( "none" );
+            } else {
+              ++countObjects;
+              poly.objectId( Te2String( countObjects ) );
+            }
+            
+            TePDIRaster2VectorPolStruct dummy_ps;
+            containerPolygons_.push_back( dummy_ps );
+ 
+            containerPolygons_[ containerPolygons_.size() - 
+              1 ].reset( poly, (int)val, 
+              MAX( 
+                  (
+                    4.0 * poly.box().height() 
+                    /
+                    (
+                      poly.box().width()
+                      *
+                      ( (double) poly[ 0 ].size() )
+                    )
+                  )
+                  ,
+                  raster_->params().resy_
+                 )
+            );                                  
+      
+            rtreePolygons_->insert( poly.box(), containerPolygons_.size() - 1 );  
+          }
+          catch(...) {
+            TEAGN_LOGERR( "Error generating polygon - "
+              "not enough memory" );
+              
+            /* no more polygons will be generated */    
+            i = nCols_;
+            j = nLines_;              
+          }
+        } else {
+          /* no more polygons will be generated */
+          i = nCols_;
+          j = nLines_;
+        }
+        
+        if( max_pols ) {
+          if( countObjects >= ( (int)max_pols ) ) {
+            /* no more polygons will be generated */
+            i = nCols_;
+            j = nLines_;          
+          }
+        }
+      }
+    }
+  }
+  
+  /* Cleaning the tree */
+  
+  delete rtreePolygons_;
+  rtreePolygons_ = 0;
+        
+  /* Generating output data */
+  
+  TePDITypes::TePDIPolSetMapPtrType output_polsets;
+  params_.GetParameter( "output_polsets", output_polsets );
+      
+  output_polsets->clear();
+  
+  std::map< double, TePolygonSet >::iterator psm_it;
+    
+  std::vector<TePDIRaster2VectorPolStruct>::iterator cpit = 
+    containerPolygons_.begin();
+  std::vector<TePDIRaster2VectorPolStruct>::iterator cpit_end = 
+    containerPolygons_.end();
+  
+  double value = 0;
+    
+  try {
+    while( cpit != cpit_end ) {
+      value = (double)cpit->value_;
+    
+      if( ( ! raster_uses_dummy_ ) || ( value != dummy_value_ ) ) {
+        psm_it = output_polsets->find( value );
+        
+        if( psm_it == output_polsets->end() ) {
+          TePolygonSet dummy_ps;
+          dummy_ps.add( cpit->poly_ );
+          
+          (*output_polsets)[ value ] = dummy_ps;
+        } else {
+          psm_it->second.add( cpit->poly_ );
+        }
+      }
+      
+      cpit->clear();
+      
+      ++cpit;
+    }
+  }
+  catch(...) {
+    TEAGN_LOG_AND_THROW( 
+      "Memory error - error generating output polygons sets map" )
+  }
+                
+  return true;
+}
+
+void
+TePDIRaster2Vector::ResetState( const TePDIParameters& /* params */ )
+{
+  clear();       
+}
+
+
+bool TePDIRaster2Vector::detectEdge(long i, long j, TeLine2D &line )
+{
+  TEAGN_DEBUG_RETURN( startingEdgeTest( i, j ), 
+    "Starting edge detection error at x=" + Te2String( i ) + " line=" +
+    Te2String( j ) )
+    
+  line.clear();
+    
+  try {
+    /* Current polygon pixel values */
+    
+    double pol_pixels_value = 0;
+    
+    if( ! raster_->getElement(i, j, pol_pixels_value, raster_channel_ ) ) {
+      pol_pixels_value = dummy_value_;
+    }  
+    
+    /* Generating chaing code by following the polygon borders */
+    
+    short curr_dir = E;
+    short new_dir = E;
+    short new_test_start_dir = E;
+    short curr_pixel_corner = NW;
+    
+    short pinit_leaving_dir = W;
+    bool pinit_leaving_dir_set = false;
+    
+    TeCoord2D curr_chain_p = TeCoord2D( 0, 0 );
+
+    int curr_x_index = i;
+    int curr_y_index = j;
+    int next_x_index = i;
+    int next_y_index = j;
+    
+    double curr_pixel_value = 0;
+    
+    bool look_for_next_pixel = true;
+    bool next_pixel_found = false;
+    bool must_add_curr_chain_p = false;
+    
+    line.add( curr_chain_p );
+    
+    while( look_for_next_pixel ) {
+      /* Finding the next direction */
+          
+      new_test_start_dir = ( curr_dir + 6 ) % 8;
+      new_dir = new_test_start_dir;
+      next_pixel_found = false;
+          
+      do {
+        next_x_index = curr_x_index + (int)( directions_[new_dir].x() );
+        next_y_index = curr_y_index + (int)( directions_[new_dir].y() );
+              
+        if( ( next_x_index > (-1) ) && ( next_y_index > (-1) ) && 
+          ( next_x_index < nCols_ ) && ( next_y_index < nLines_ ) ) {
+                
+          if( ! raster_->getElement( next_x_index, next_y_index, 
+            curr_pixel_value, raster_channel_ ) ) {
+                          
+            curr_pixel_value = dummy_value_;  
+          }
+                          
+          if ( curr_pixel_value == pol_pixels_value ){
+            next_pixel_found = true;
+            break;
+          }
+        }
+              
+        new_dir = ( new_dir + 2 ) % 8;
+      } while( new_dir != new_test_start_dir );
+      
+      /* Generating the polygon line following the current state */
+      
+        if( ! next_pixel_found ) {
+          // there is only one point inside the polygon
+          // that is the last one
+          
+          curr_chain_p += ( directions_[ E ] );
+          line.add( curr_chain_p );
+          
+          curr_chain_p += ( directions_[ S ] );
+          line.add( curr_chain_p );
+          
+          curr_chain_p += ( directions_[ W ] );
+          line.add( curr_chain_p );
+          
+          curr_chain_p += ( directions_[ N ] );
+          line.add( curr_chain_p );                        
+                        
+          look_for_next_pixel = false;
+        } else if( ( curr_x_index == i ) && ( curr_y_index == j ) &&
+          ( pinit_leaving_dir == new_dir ) ) {
+        
+          /* We are back to the fist pixel again
+            ( going to the same direction ) */
+          
+          switch( curr_pixel_corner ) {
+            case EN :
+            {
+              curr_chain_p += ( directions_[ S ] );
+              line.add( curr_chain_p );
+          
+              curr_chain_p += ( directions_[ W ] );
+              line.add( curr_chain_p );
+          
+              curr_chain_p += ( directions_[ N ] );
+              line.add( curr_chain_p );
+              
+              break;
+            }
+            case SE :
+            { 
+              curr_chain_p += ( directions_[ W ] );
+              line.add( curr_chain_p );
+          
+              curr_chain_p += ( directions_[ N ] );
+              line.add( curr_chain_p );
+              
+              break;
+            }
+            case WS :
+            {
+              curr_chain_p += ( directions_[ N ] );
+              line.add( curr_chain_p );
+                        
+              break;
+            }
+            default :
+            {
+              TEAGN_LOG_AND_RETURN( "Invalid pixel corner=" + 
+                Te2String( curr_pixel_corner) + " curr_dir=" + 
+                Te2String( curr_dir ) );
+              break;
+            }
+          }      
+         
+          look_for_next_pixel = false;   
+        } else {
+          /* Updating current chain point and current pixel corner */
+          
+          if( curr_dir == new_dir ) {
+            curr_chain_p += ( directions_[ curr_dir ] );
+            
+            must_add_curr_chain_p = true;
+          } else {
+            if( must_add_curr_chain_p ) {
+              line.add( curr_chain_p );
+              
+              must_add_curr_chain_p = false;
+            }
+          
+            switch( new_dir ) {
+              case E:
+              {
+                switch( curr_pixel_corner ) {
+                  case NW :
+                  {
+                    curr_chain_p += ( directions_[ E ] );
+                    line.add( curr_chain_p );
+                          
+                    break;
+                  }
+                  case EN :
+                  {
+                    curr_pixel_corner = NW;
+                    break;
+                  }
+                  case SE :
+                  { 
+                    curr_chain_p += ( directions_[ W ] );
+                    line.add( curr_chain_p );
+                    
+                    curr_chain_p += ( directions_[ N ] );
+                    line.add( curr_chain_p );
+                    
+                    curr_chain_p += ( directions_[ E ] );
+                    line.add( curr_chain_p );                                                      
+                    
+                    curr_pixel_corner = NW;
+                    break;
+                  }
+                  case WS :
+                  {
+                    curr_chain_p += ( directions_[ N ] );
+                    line.add( curr_chain_p );
+                    
+                    curr_chain_p += ( directions_[ E ] );
+                    line.add( curr_chain_p );                    
+                    
+                    curr_pixel_corner = NW;
+                    break;
+                  }
+                  default :
+                  {
+                    TEAGN_LOG_AND_THROW( "Invalid pixel corner" )
+                    break;
+                  }
+                }
+                
+                break;
+              }
+              case S:
+              {
+                switch( curr_pixel_corner ) {
+                  case NW :
+                  {
+                    curr_chain_p += ( directions_[ E ] );
+                    line.add( curr_chain_p );
+                    
+                    curr_chain_p += ( directions_[ S ] );
+                    line.add( curr_chain_p );  
+                                    
+                    curr_pixel_corner = EN;  
+                    break;
+                  }
+                  case EN :
+                  {
+                    curr_chain_p += ( directions_[ S ] );
+                    line.add( curr_chain_p );
+                                    
+                    break;
+                  }
+                  case SE :
+                  {
+                    curr_pixel_corner = EN;
+                    break;
+                  }
+                  case WS :
+                  {
+                    curr_chain_p += ( directions_[ N ] );
+                    line.add( curr_chain_p );
+                    
+                    curr_chain_p += ( directions_[ E ] );
+                    line.add( curr_chain_p );
+                    
+                    curr_chain_p += ( directions_[ S ] );
+                    line.add( curr_chain_p );                 
+                  
+                    curr_pixel_corner = EN;
+                    break;
+                  }
+                  default :
+                  {
+                    TEAGN_LOG_AND_THROW( "Invalid pixel corner" )
+                    break;
+                  }
+                }
+                
+                break;
+              }    
+              case W:
+              {
+                switch( curr_pixel_corner ) {
+                  case NW :
+                  {
+                    curr_chain_p += ( directions_[ E ] );
+                    line.add( curr_chain_p );
+                    
+                    curr_chain_p += ( directions_[ S ] );
+                    line.add( curr_chain_p );
+                    
+                    curr_chain_p += ( directions_[ W ] );
+                    line.add( curr_chain_p ); 
+                                    
+                    curr_pixel_corner = SE;  
+                    break;
+                  }
+                  case EN :
+                  {
+                    curr_chain_p += ( directions_[ S ] );
+                    line.add( curr_chain_p );
+                    
+                    curr_chain_p += ( directions_[ W ] );
+                    line.add( curr_chain_p ); 
+                                    
+                    curr_pixel_corner = SE;
+                    break;
+                  }
+                  case SE :
+                  {
+                    curr_chain_p += ( directions_[ W ] );
+                    line.add( curr_chain_p ); 
+                                    
+                    break;
+                  }
+                  case WS :
+                  {
+                    curr_pixel_corner = SE;
+                    break;
+                  }
+                  default :
+                  {
+                    TEAGN_LOG_AND_THROW( "Invalid pixel corner" )
+                    break;
+                  }
+                }
+                
+                break;
+              }
+              case N:
+              {
+                switch( curr_pixel_corner ) {
+                  case NW :
+                  {
+                    curr_pixel_corner = WS;  
+                    break;
+                  }
+                  case EN :
+                  {
+                    curr_chain_p += ( directions_[ S ] );
+                    line.add( curr_chain_p );
+                    
+                    curr_chain_p += ( directions_[ W ] );
+                    line.add( curr_chain_p );
+                    
+                    curr_chain_p += ( directions_[ N ] );
+                    line.add( curr_chain_p );
+                                    
+                    curr_pixel_corner = WS;  
+                    break;
+                  }
+                  case SE :
+                  {
+                    curr_chain_p += ( directions_[ W ] );
+                    line.add( curr_chain_p );
+                    
+                    curr_chain_p += ( directions_[ N ] );
+                    line.add( curr_chain_p );
+                                    
+                    curr_pixel_corner = WS;  
+                    break;
+                  }
+                  case WS :
+                  {
+                    curr_chain_p += ( directions_[ N ] );
+                    line.add( curr_chain_p );                
+
+                    break;
+                  }
+                  default :
+                  {
+                    TEAGN_LOG_AND_THROW( "Invalid pixel corner" )
+                    break;
+                  }
+                }
+              
+                break;
+              }
+              default :
+              {
+                TEAGN_LOG_AND_THROW( "Invalid new_dir" )
+                break;
+              }
+            }
+          }
+            
+          /* Updating the leaving direction from the initial point */
+          
+          if( ( ! pinit_leaving_dir_set ) && ( curr_x_index == i ) && 
+              ( curr_y_index == j ) ) {
+                
+            pinit_leaving_dir_set = true;
+            pinit_leaving_dir = new_dir;
+          }           
+            
+          /* updating the current state */
+          
+          curr_x_index = next_x_index;
+          curr_y_index = next_y_index;  
+          
+          curr_dir = new_dir;         
+        }
+    }
+      
+    /* Changing lines coords to world coords */
+    
+    const TeCoord2D chain_init_p = raster_->index2Coord( TeCoord2D( 
+      ( (double)i ) - 0.5, ( (double)j ) - 0.5 ) );  
+      
+    TeLine2D::iterator it = line.begin();
+    TeLine2D::iterator it_end = line.end();
+    
+    double min_x = DBL_MAX;
+    double min_y = DBL_MAX;
+    double max_x = ( -1.0 ) * DBL_MAX;
+    double max_y = ( -1.0 ) * DBL_MAX;
+    
+    while( it != it_end ) {
+      it->x_ = chain_init_p.x_ + ( it->x_ * resx_ );
+      it->y_ = chain_init_p.y_ - ( it->y_ * resy_ );
+      
+      if( it->x_ < min_x ) min_x = it->x_;
+      if( it->y_ < min_y ) min_y = it->y_;
+
+      if( it->x_ > max_x ) max_x = it->x_;
+      if( it->y_ > max_y ) max_y = it->y_;
+      
+      ++it;
+    }
+    
+    /* Updating the line box */
+    
+    TeBox newbox( min_x, min_y, max_x, max_y );
+    line.setBox( newbox );
+    
+    /* Closing the line, if necessary */
+    
+    if( line.size() > 1 ) {
+      if( ( line[ 0 ].x() != line[ line.size() - 1 ].x() ) ||
+        ( line[ 0 ].y() != line[ line.size() - 1 ].y() ) ) {
+        
+        line.add( line[ 0 ] );
+      }
+    }  
+  }
+  catch(...) {
+    line.clear();
+    
+    TEAGN_LOG_AND_RETURN( "Unable to detect edge - "
+      "not enough memory" )
+  }
+
+  return true;
+}
+
+
+bool TePDIRaster2Vector::startingEdgeTest( const int& x, 
+  const int& y )
+{
+  int nlines = raster_->params().nlines_;
+  int ncols = raster_->params().ncols_;
+
+  TEAGN_TRUE_OR_RETURN( ( y < nlines ), 
+    "Invalid col [" + Te2String( x ) + "]" );
+  TEAGN_TRUE_OR_RETURN( ( x < ncols ), 
+    "Invalid line [" + Te2String( y ) + "]" );
+    
+  if( ( x == 0 ) || ( y == 0 ) || ( x == ( ncols - 1 ) ) || 
+    ( y == ( nlines - 1 ) ) ) {
+    
+    return true;
+  } else {
+    double test_val = 0;
+    double current_val = 0;  
+  
+    if( ! raster_->getElement(x, y, current_val, raster_channel_ ) ) {
+      TEAGN_TRUE_OR_RETURN( raster_uses_dummy_, "Raster read error" );
+      current_val = dummy_value_;
+    }
+    
+    if( ! raster_->getElement(x - 1, y, test_val, raster_channel_ ) ) {
+      TEAGN_TRUE_OR_RETURN( raster_uses_dummy_, "Raster read error" );
+      test_val = dummy_value_;
+    }  
+  
+    TEAGN_TRUE_OR_RETURN( ( current_val != test_val ), 
+      "The given point isn't a starting edge [x=" + Te2String( x ) +
+      " y=" + Te2String( y ) + "]" );
+      
+    return true;
+  }
+}
+
+
+void TePDIRaster2Vector::clear()
+{
+  raster_.reset();
+  
+  if( rtreePolygons_ ) {
+    delete rtreePolygons_;
+    rtreePolygons_ = 0;
+  }
+  
+  containerPolygons_.clear();
+}
+
diff --git a/src/terralib/image_processing/TePDIRaster2Vector.hpp b/src/terralib/image_processing/TePDIRaster2Vector.hpp
new file mode 100755
index 0000000..526bcca
--- /dev/null
+++ b/src/terralib/image_processing/TePDIRaster2Vector.hpp
@@ -0,0 +1,315 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright  2001-2004 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+
+/**
+ * @file TePDIRaster2Vector.hpp
+ *
+ * @brief This file contains functions to support vectorizing of
+ * raster data into a TerraLib database
+ * the input raster is a 4-connected rotulated image :
+ *               *each region is for 4-connected
+ *               *each region has a unique identifier
+ */
+
+#ifndef  TEPDIRASTER2VECTOR_HPP
+  #define  TEPDIRASTER2VECTOR_HPP
+
+  #include "TePDIParameters.hpp"
+  #include "TePDIAlgorithm.hpp"
+
+  #include "data_structs/TeTileIndexer.h"
+  
+  #include <TeRaster.h>
+  #include <TeLayer.h>
+  #include <TeRTree.h>
+
+
+  /**
+    *  @brief A polygon container node class. 
+    */    
+  class PDI_DLL TePDIRaster2VectorPolStruct
+  {
+    public:
+    
+      /**
+      * @brief The value ( color ) related to a polygon.
+      */
+      int value_;
+
+      /**
+      * @brief The polygon tile indexer Y Axis resolution.
+      */
+      double tile_indexer_dy_;
+      
+      /**
+      * @brief The polygon tile indexer pointer.
+      */
+      TeTileIndexer* indexer_;    
+      
+      /**
+      * @brief The stored polygon instance.
+      */
+      TePolygon poly_;
+      
+      /**
+      * @brief Init internal variables.
+      */    
+      void init()
+      {
+        value_ = 0;
+        tile_indexer_dy_ = 1.0;
+        indexer_ = 0;
+      };
+      
+      /**
+      * @brief Init internal variables.
+      */    
+      void clear()
+      {
+        if( indexer_ ) {
+          delete indexer_;
+        }
+        
+        init();
+      };    
+      
+      /**
+      * @brief Default constructor.
+      */       
+      TePDIRaster2VectorPolStruct()
+      {
+        init();
+      };
+      
+      /**
+      * @brief Alternative constructor.
+      * @param external External reference.
+      */       
+      TePDIRaster2VectorPolStruct( 
+        const TePDIRaster2VectorPolStruct& external )
+      {
+        init();
+        
+        reset( external.poly_, external.value_, 
+          external.tile_indexer_dy_ );
+      }
+      
+      /**
+      * @brief Alternative constructor.
+      * @param p Polygon reference.
+      * @param v V.
+      * @param tile_indexer_dy Tile indexer dy.
+      */       
+      TePDIRaster2VectorPolStruct( const TePolygon& p, 
+        const int& v, 
+        const double& tile_indexer_dy )
+      {
+        init();
+        
+        reset( p, v, tile_indexer_dy );
+      }
+      
+      /**
+      * @brief Default destructor.
+      */       
+      ~TePDIRaster2VectorPolStruct()
+      {
+        clear();
+      };      
+      
+      /**
+      * @brief Operator= overload.
+      * @param external External reference.
+      * @return a reference to the external object.
+      */         
+      const TePDIRaster2VectorPolStruct& operator=( 
+        const TePDIRaster2VectorPolStruct& external )
+      {
+        reset( external.poly_, external.value_, 
+          external.tile_indexer_dy_ );
+          
+        return external;
+      }
+      
+      /**
+      * @brief Reset the current instance.
+      * @param p Polygon reference.
+      * @param v V.
+      * @param tile_indexer_dy Tile indexer dy.
+      */       
+      void reset( const TePolygon& p, const int& v, 
+        const double& tile_indexer_dy )
+      {
+        clear();
+        
+        poly_ = p;
+        value_ = v;
+        tile_indexer_dy_ = tile_indexer_dy;
+        
+        indexer_ = new TeTileIndexer( poly_, 
+          tile_indexer_dy_ );       
+      }
+  };
+
+  /**
+    * @brief Raster vectorizer.
+    * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+    * @author Eric S. Abreu <eric at dpi.inpe.br>
+    * @author Gilberto Ribeiro de Quiroz <gribeiro at dpi.inpe.br>
+    * @author Nicolas Despres <nicolasdespres at wanadoo.fr>
+    * @ingroup TePDIGeneralAlgoGroup
+    *
+    * @note The general required parameters by TePDIRaster2Vector :
+    *
+    * @param rotulated_image (TePDITypes::TePDIRasterPtrType),
+    * The rotulated_image raster ( 1 band, not floating point, 4-connected 
+    * - each region is for 4-connected ).
+    * @param output_polsets ( TePDITypes::TePDIPolSetMapPtrType ) - 
+    * The user supplied output polygon sets map where the generated polygons 
+    * will be stored (each polygon set contains polygons related to the
+    * same pixel value).
+    * @param channel (unsigned int) - The raster channel to process.
+    *
+    * @note Optional parameters:
+    *
+    * @param max_pols (unsigned long int) - The maximum number of poligons
+    * to generate (default:0 - no maximum defined).
+    */
+  class PDI_DLL TePDIRaster2Vector : public TePDIAlgorithm
+  {
+    public:
+    /** @typedef Type definition for a instance pointer */
+    typedef TeSharedPtr< TePDIRaster2Vector > pointer;
+    /** @typedef Type definition for a const instance pointer */
+    typedef const TeSharedPtr< TePDIRaster2Vector > const_pointer;
+
+    /**
+      * @brief Default Constructor.
+      */
+    TePDIRaster2Vector();
+
+    /**
+      * @brief Default destructor.
+      */
+    ~TePDIRaster2Vector();
+
+    /**
+      * @brief Checks if the supplied parameters fits the requirements of each
+      * PDI algorithm implementation.
+      *
+      * @note Error log messages must be generated. No exceptions generated.
+      *
+      * @param parameters The parameters to be checked.
+      * @return true if the parameters are OK. false if not.
+      */
+      bool CheckParameters( const TePDIParameters& parameters ) const;
+
+    protected:
+
+      /**
+      * @brief Flag indication for dummy value use ( rotulated image ).
+      */
+      bool raster_uses_dummy_;
+      
+      /**
+      * @brief The used dummy value.
+      */
+      double dummy_value_;
+      
+      /**
+      * @brief Directions vector.
+      */ 
+      TeCoord2D directions_[8];  
+      
+      /** @brief pointer to the input image */
+      TePDITypes::TePDIRasterPtrType raster_;
+
+      /** @brief resolution x */
+      double resx_;
+      
+      /** @brief resolution y */
+      double resy_;
+      
+      /** @brief number of lines */
+      long   nLines_;
+      
+      /** @brief number of cols */
+      long   nCols_;
+
+      /** @brief number of cols */
+      unsigned int raster_channel_;
+      
+      /** 
+      *  @brief A RTree instance pointer to optimize the searching of points
+      *  inside already created polygons 
+      */
+      TeSAM::TeRTree<unsigned int, 8, 4>*    rtreePolygons_;
+      
+      /** @brief Vector of all polygons */
+      vector<TePDIRaster2VectorPolStruct>  containerPolygons_;    
+      
+      /**
+      * @brief Runs the current algorithm implementation.
+      *
+      * @return true if OK. false on error.
+      */
+      bool RunImplementation();
+
+      /**
+      * @brief Reset the internal state to the initial state.
+      *
+      * @param params The new parameters referente at initial state.
+      */
+      void ResetState( const TePDIParameters& params );
+
+      /**
+        * @brief Detects a edge of a cell in Raster.
+        *
+        * @param i abscissa( column ) of the upper-left point of the shape
+        * @param j ordinate( line ) of the upper-left point of the shape
+        * @param line 2D Line.
+        * @return true if ok, otherwise false
+        */
+      bool detectEdge(long i, long j, TeLine2D &line );
+        
+      /**
+      * @brief Tests if the current point is a edge start.
+      * @param x X coord.
+      * @param y Y coord.
+      * @return true if the current point is a edge start, false if not.
+      */
+      bool startingEdgeTest( const int& x, const int& y );
+      
+      /**
+      * @brief Clear all internally allocated resources.
+      */
+      void clear();    
+
+  };
+
+
+  /** @example TePDIRaster2Vector_test.cpp
+  *    Shows how to use this class.
+  */  
+ 
+#endif
diff --git a/src/terralib/image_processing/TePDIRaster2VectorFactory.cpp b/src/terralib/image_processing/TePDIRaster2VectorFactory.cpp
new file mode 100755
index 0000000..0e42075
--- /dev/null
+++ b/src/terralib/image_processing/TePDIRaster2VectorFactory.cpp
@@ -0,0 +1,24 @@
+ 
+#include "TePDIRaster2VectorFactory.hpp"
+#include "TePDIRaster2Vector.hpp"
+#include <TeAgnostic.h>
+
+TePDIRaster2VectorFactory::TePDIRaster2VectorFactory()
+: TePDIAlgorithmFactory( std::string( "TePDIRaster2Vector" ) )
+{
+};      
+
+TePDIRaster2VectorFactory::~TePDIRaster2VectorFactory()
+{
+};
+
+
+TePDIAlgorithm* TePDIRaster2VectorFactory::build ( const TePDIParameters& arg )
+{
+  TePDIAlgorithm* instance_ptr = new TePDIRaster2Vector();
+  
+  TEAGN_TRUE_OR_THROW( instance_ptr->Reset( arg ),
+    "Invalid parameters" );
+  
+  return instance_ptr;
+}
diff --git a/src/terralib/image_processing/TePDIRaster2VectorFactory.hpp b/src/terralib/image_processing/TePDIRaster2VectorFactory.hpp
new file mode 100755
index 0000000..f320392
--- /dev/null
+++ b/src/terralib/image_processing/TePDIRaster2VectorFactory.hpp
@@ -0,0 +1,67 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIRASTER2VECTORFACTORY_HPP
+  #define TEPDIRASTER2VECTORFACTORY_HPP
+
+  #include <TeSharedPtr.h>
+  #include "TePDIAlgorithmFactory.hpp"
+  #include "TePDIParameters.hpp"
+  
+  /**
+   * @brief This is the class for vectorization algorithm factory.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIAlgorithmsFactories
+   */
+  class PDI_DLL TePDIRaster2VectorFactory : public TePDIAlgorithmFactory
+  {
+    public :
+      
+      /**
+       * @brief Default constructor
+       */
+      TePDIRaster2VectorFactory();      
+      
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIRaster2VectorFactory();
+      
+      protected :  
+      /**
+       * @brief Implementation for the abstract TeFactory::build.
+       *
+       * @param arg A const reference to the parameters used by the
+       * algorithm.
+       * @return A pointer to the new generated algorithm instance.
+       */
+      TePDIAlgorithm* build( const TePDIParameters& arg );
+      
+  };
+  
+  namespace {
+    static TePDIRaster2VectorFactory TePDIRaster2VectorFactory_instance;
+  };  
+
+#endif
diff --git a/src/terralib/image_processing/TePDIRasterRUBuffer.cpp b/src/terralib/image_processing/TePDIRasterRUBuffer.cpp
new file mode 100755
index 0000000..6a8a992
--- /dev/null
+++ b/src/terralib/image_processing/TePDIRasterRUBuffer.cpp
@@ -0,0 +1,146 @@
+#include "TePDIRasterRUBuffer.hpp"
+
+#include <TeAgnostic.h>
+
+#include <limits.h>
+
+TePDIRasterRUBuffer::TePDIRasterRUBuffer()
+{
+  rasterPtr_ = 0;
+  rasterChn_ = 0;
+  bufferPtr_ = 0;
+  bufferLines_ = 0;
+  bufferCols_ = 0;
+  lastReadedLine_ = UINT_MAX;
+}
+
+
+TePDIRasterRUBuffer::~TePDIRasterRUBuffer()
+{
+  clear();
+}
+
+bool TePDIRasterRUBuffer::reset( TeRaster& inputRaster, 
+  unsigned int inRasterChn, unsigned int nLines )
+{
+  clear();
+  
+  TEAGN_TRUE_OR_RETURN( inputRaster.params().status_ != 
+    TeRasterParams::TeNotReady, "Raster not ready" )
+  TEAGN_TRUE_OR_RETURN( inputRaster.params().status_ != 
+    TeRasterParams::TeNotReady, "Raster not ready" )  
+  TEAGN_TRUE_OR_RETURN( inputRaster.params().nlines_ >= 
+    (int)nLines, "Invalid raster lines number" )    
+
+  try
+  {
+    bufferPtr_ = new double*[ nLines ];
+  }
+  catch(...)
+  {
+    return false;
+  }
+  if( bufferPtr_ == 0 ) 
+  {
+    return false;
+  }
+  
+  bufferLines_ = nLines;
+  
+  for( unsigned int line = 0 ; line < nLines ; ++line )
+    bufferPtr_[ line ] = 0;
+  
+  try
+  {
+    bufferCols_ = inputRaster.params().ncols_;
+    
+    for( unsigned int line = 0 ; line < nLines ; ++line )
+    {
+      bufferPtr_[ line ] = new double[ bufferCols_ ];
+      
+      if( bufferPtr_[ line ] == 0 )
+      {
+        clear();
+        return false;
+      }
+    }
+  }
+  catch(...)
+  {
+    clear();
+    return false;
+  }
+  
+  rasterPtr_ = &inputRaster;
+  rasterChn_ = inRasterChn;
+  
+  return true;
+}
+
+bool TePDIRasterRUBuffer::roolUp()
+{
+  TEAGN_DEBUG_CONDITION( rasterPtr_ != 0, "No input raster" )
+  TEAGN_DEBUG_CONDITION( bufferPtr_ != 0, "No internal buffer" )
+  
+  if( ( (int)lastReadedLine_  ) == ( rasterPtr_->params().nlines_ 
+    - 1 ) ) 
+  {
+    return false;
+  }
+  else
+  {
+    // roll-up
+    
+    double* firstLine = bufferPtr_[ 0 ];
+    
+    unsigned int lastLineIdx = bufferLines_ - 1;
+    
+    for( unsigned int line = 0 ; line < lastLineIdx ; ++line )
+      bufferPtr_[ line ] = bufferPtr_[ line + 1 ];
+                          
+    bufferPtr_[ lastLineIdx ] = firstLine;
+    
+    // load the next line
+    
+    if( lastReadedLine_ == UINT_MAX )
+    {
+      lastReadedLine_ = 0;
+    }
+    else
+    {
+      ++lastReadedLine_;
+    }
+    
+    for( unsigned int col = 0 ; col < bufferCols_ ; ++col )
+    {
+      rasterPtr_->getElement( col, lastReadedLine_, firstLine[ col ], 
+        rasterChn_ );
+    }    
+    
+    return true;
+  }
+}
+
+double** TePDIRasterRUBuffer::getBufferPtr()
+{
+  TEAGN_DEBUG_CONDITION( bufferPtr_ != 0, "No internal buffer" )
+  return bufferPtr_;
+}
+
+void TePDIRasterRUBuffer::clear()
+{
+  if( bufferPtr_ )
+  {
+    for( unsigned int line = 0 ; line < bufferLines_ ; ++line )
+      if( bufferPtr_[ line ] ) delete[] bufferPtr_[ line ];
+    
+    delete[] bufferPtr_;
+  }
+  
+  bufferPtr_ = 0;
+  bufferLines_ = 0;
+  bufferCols_ = 0;
+  rasterPtr_ = 0;
+  rasterChn_ = 0;
+  lastReadedLine_ = UINT_MAX;
+}
diff --git a/src/terralib/image_processing/TePDIRasterRUBuffer.hpp b/src/terralib/image_processing/TePDIRasterRUBuffer.hpp
new file mode 100755
index 0000000..74ad48b
--- /dev/null
+++ b/src/terralib/image_processing/TePDIRasterRUBuffer.hpp
@@ -0,0 +1,87 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIRASTERRUBUFFER_HPP
+  #define TEPDIRASTERRUBUFFER_HPP
+
+  #include "TePDIDefines.hpp"
+  #include <TeRaster.h>
+  
+  /**
+   * @brief A raster rool-up lines buffer.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIAux
+   */
+  class PDI_DLL TePDIRasterRUBuffer {
+    public :
+      
+      TePDIRasterRUBuffer();
+
+      ~TePDIRasterRUBuffer();
+      
+      /**
+       * @brief Reset this roll up buffer instance.
+       *
+       * @param inputRaster Input raster.
+       * @param inRasterChn Input raster channel/band.
+       * @param bufferLines Number of roll-up buffer lines.
+       * @return true if OK, false on errors.
+       * @note No lines will be pre-loaded.
+       *
+       */
+      bool reset( TeRaster& inputRaster, unsigned int inRasterChn, 
+        unsigned int bufferLines );
+      
+      /**
+       * @brief Buffer roll-up (read the next line from input raster)
+       * @return true if OK, false on errors.
+       */      
+      bool roolUp();
+      
+      /**
+       * @brief Returns a pointer to the current buffer.
+       * @return A pointer to the current buffer.
+       * @note The returned pointer will be invalidated if reset or roolUp
+       * methods were called.
+       */         
+      double** getBufferPtr();        
+ 
+    protected :
+      
+      TeRaster* rasterPtr_;
+      
+      unsigned int rasterChn_;
+    
+      double** bufferPtr_;
+      
+      unsigned int bufferLines_;
+      
+      unsigned int bufferCols_;
+      
+      unsigned int lastReadedLine_;
+      
+      void clear();
+  };
+
+#endif
diff --git a/src/terralib/image_processing/TePDIRegGrowSeg.cpp b/src/terralib/image_processing/TePDIRegGrowSeg.cpp
new file mode 100755
index 0000000..9428843
--- /dev/null
+++ b/src/terralib/image_processing/TePDIRegGrowSeg.cpp
@@ -0,0 +1,998 @@
+#include "TePDIRegGrowSeg.hpp"
+
+#include "TePDIRaster2Vector.hpp"
+#include "TePDIUtils.hpp"
+
+
+TePDIRegGrowSeg::TePDIRegGrowSeg()
+{
+        ListCell_      = NULL;
+        WindowCell_    = NULL;
+        tuple_         = NULL;
+        OnLimbo_       = 0;
+        CurrentWindow_ = 0;
+        WindowOffset_  = 1;
+        WindowLines_   = 0;
+        WindowColumns_ = 0;
+        Nlin_          = 0;
+        Ncol_          = 0;
+        Nban_          = 0;
+        Areamin_       = 0;
+        Difsim_       = (float)0;
+}
+
+
+TePDIRegGrowSeg::~TePDIRegGrowSeg()
+{
+        Imagein_.reset();
+        Imagelab_.reset();
+        Imageexc_.reset();
+
+        if( WindowCell_ != NULL ) {delete []WindowCell_; WindowCell_=NULL;}
+        if( tuple_      != NULL ) {delete []tuple_; tuple_=NULL;}
+        NWindow_       = 0;
+        WindowLines_   = 0;
+        WindowColumns_ = 0;
+        CurrentWindow_ = 0;
+        WindowOffset_  = 1;
+        Nlin_       = 0;
+        Ncol_       = 0;
+        Nban_       = 0;
+        Areamin_    = 0;
+        Difsim_     = (float)0;
+        if( ListCell_  != NULL )
+        {
+                TePDIRGSCellList::iterator it;
+                for (it=ListCell_->begin(); it!=ListCell_->end(); it++)
+                        delete (*it).second;
+                ListCell_->clear();
+                delete ListCell_;
+                ListCell_ = NULL;
+        }
+}
+
+
+void TePDIRegGrowSeg::ResetState( const TePDIParameters& params )
+{
+  if( params != params_ ) {
+    Imagein_.reset();
+    Imagelab_.reset();
+    Imageexc_.reset();
+    
+    if( WindowCell_ != NULL ) {delete []WindowCell_; WindowCell_=NULL;}
+        
+    if( tuple_ != NULL ) {delete []tuple_; tuple_=NULL;}
+            
+    if( ListCell_  != NULL )
+    {
+            TePDIRGSCellList::iterator it;
+            for (it=ListCell_->begin(); it!=ListCell_->end(); it++)
+                    delete (*it).second;
+            ListCell_->clear();
+            delete ListCell_;
+            ListCell_ = NULL;
+    }    
+  }
+}
+
+
+bool TePDIRegGrowSeg::CheckParameters( const TePDIParameters& parameters ) const
+{
+  /* Checking for general required parameters */
+
+  //parameter input_image
+  TePDITypes::TePDIRasterPtrType inRaster;
+  if( ! parameters.GetParameter( "input_image", inRaster ) ) {
+
+    TEAGN_LOGERR( "Missing parameter: input_image" );
+    return false;
+  }
+  if( ! inRaster.isActive() ) {
+
+    TEAGN_LOGERR( "Invalid parameter: input_image inactive" );
+    return false;
+  }
+  if( inRaster->params().status_ == TeRasterParams::TeNotReady ) {
+
+    TEAGN_LOGERR( "Invalid parameter: input_image not ready" );
+    return false;
+  }
+  TEAGN_TRUE_OR_RETURN( ( ! inRaster->params().useDummy_ ),
+    "input_image must not contain dummy values" );
+
+  //parameter output_image
+  if( parameters.CheckParameter< TePDITypes::TePDIRasterPtrType >( 
+    "output_image" ) ) {
+    
+    TePDITypes::TePDIRasterPtrType outRaster;
+    if( ! parameters.GetParameter( "output_image", outRaster ) ) {
+  
+      TEAGN_LOGERR( "Missing parameter: output_image" );
+      return false;
+    }
+    if( ! outRaster.isActive() ) {
+  
+      TEAGN_LOGERR( "Invalid parameter: output_image inactive" );
+      return false;
+    }
+    if( outRaster->params().status_ != TeRasterParams::TeReadyToWrite ) {
+  
+      TEAGN_LOGERR( "Invalid parameter: output_image not ready" );
+      return false;
+    }
+    TEAGN_TRUE_OR_RETURN( 
+      ( outRaster->params().dataType_[0] == TeUNSIGNEDLONG ),
+      "Invalid parameter: output_image pixel type must be TeUNSIGNEDLONG" );
+  }
+  
+  //parameter restriction_image
+  TePDITypes::TePDIRasterPtrType restrictionRaster;
+  if( parameters.CheckParameter< TePDITypes::TePDIRasterPtrType >( 
+    "restriction_image" ) ) {
+
+    if( ! parameters.GetParameter( "restriction_image", restrictionRaster ) ) {
+
+      TEAGN_LOGERR( "Missing parameter: restriction_image" );
+      return false;
+    }
+    if( ! restrictionRaster.isActive() ) {
+
+      TEAGN_LOGERR( "Invalid parameter: restriction_image inactive" );
+      return false;
+    }
+    if( restrictionRaster->params().status_ == TeRasterParams::TeNotReady ) {
+
+      TEAGN_LOGERR( "Invalid parameter: restriction_image not ready" );
+      return false;
+    }
+    TEAGN_TRUE_OR_RETURN( ( ! restrictionRaster->params().useDummy_ ),
+      "input_image must not contain dummy values" );    
+  }
+
+  if( ! parameters.CheckParameter< double >( "euc_treshold" ) ) {
+
+      TEAGN_LOGERR( "Missing parameter: euc_treshold" );
+      return false;
+  }
+
+  if( ! parameters.CheckParameter< int >( "area_min" ) ) {
+
+        TEAGN_LOGERR( "Missing parameter: area_min" );
+    return false;
+  }
+  
+  if( parameters.CheckParameter< TePDITypes::TePDIPolSetMapPtrType >( 
+    "output_polsets" ) ) {
+            
+    TePDITypes::TePDIPolSetMapPtrType output_polsets;
+    parameters.GetParameter( "output_polsets", output_polsets );
+            
+    TEAGN_TRUE_OR_RETURN( output_polsets.isActive(),
+      "Invalid parameter output_polsets : Inactive polygon set pointer" );   
+  }   
+
+  return true;
+}
+
+
+bool TePDIRegGrowSeg::RunImplementation()
+{
+        params_.GetParameter( "input_image", Imagein_ ) ;
+        params_.GetParameter( "area_min", Areamin_ ) ;
+        params_.GetParameter( "euc_treshold", Difsim_ ) ;
+
+        if( params_.CheckParameter< TePDITypes::TePDIRasterPtrType >( 
+          "restriction_image" ) ) {
+
+          params_.GetParameter( "restriction_image", Imageexc_ );
+        }
+
+        Nban_ = (int)Imagein_->params().nBands();
+
+        if( params_.CheckParameter< TePDITypes::TePDIRasterPtrType >( 
+          "output_image" ) ) {
+
+          params_.GetParameter( "output_image", Imagelab_ );
+            
+          TeRasterParams Imagelab_params = Imagelab_->params();
+  
+          Imagelab_params.nBands( 1 );
+          if( Imagein_->projection() != 0 ) {
+            TeSharedPtr< TeProjection > proj( TeProjectionFactory::make( 
+              Imagein_->projection()->params() ) );          
+            Imagelab_params.projection( proj.nakedPointer() );
+          }
+          Imagelab_params.boxResolution( Imagein_->params().box().x1(), 
+            Imagein_->params().box().y1(), Imagein_->params().box().x2(), 
+            Imagein_->params().box().y2(), Imagein_->params().resx_, 
+            Imagein_->params().resy_ );  
+
+          TEAGN_TRUE_OR_RETURN( Imagelab_->init( Imagelab_params ),
+            "Output raster reset error" );            
+        } else {
+          TeRasterParams Imagelab_params = Imagein_->params();
+          Imagelab_params.nBands( 1 );
+          Imagelab_params.setDataType( TeUNSIGNEDLONG, -1 );
+          
+          TEAGN_TRUE_OR_RETURN( 
+            TePDIUtils::TeAllocRAMRaster( Imagelab_, Imagelab_params,
+            TePDIUtils::TePDIUtilsAutoMemPol ),
+            "Internal raster allocation error");
+        }
+
+        Nlin_ = Imagelab_->params().nlines_;
+        Ncol_ = Imagelab_->params().ncols_;
+
+        // Initialize colection of regions
+        ListCell_ = new TePDIRGSCellList;
+        TEAGN_TRUE_OR_RETURN( ( ListCell_ != NULL ),
+          "Unable to create the cells list" )
+
+        // Initialize the array of regions of window
+
+        WindowCell_ = new TePDIRGSCell*[TAMJAN*TAMJAN];
+        TEAGN_TRUE_OR_RETURN( ( WindowCell_ != NULL ),
+          "Unable to create TePDIRGSCell instance" )
+                
+
+        // Set initial values
+
+        tuple_ = new unsigned long[Nban_] ;
+
+
+        WindowLines_ = ( Nlin_ % TAMJAN ) ? ( Nlin_ / TAMJAN + 1 ) : ( Nlin_ / TAMJAN );
+        WindowColumns_ = ( Ncol_ % TAMJAN ) ? ( Ncol_ / TAMJAN + 1 ) : ( Ncol_ / TAMJAN );
+        NWindow_    = WindowLines_ * WindowColumns_;
+
+        // Start Region Growing
+        short canceled = 0;
+        WindowOffset_ = 1L;
+
+
+        int step = 0;
+        TePDIPIManager progress( "Region Growing...", NWindow_,
+          progress_enabled_ );
+
+        for( CurrentWindow_ = 0; CurrentWindow_ < NWindow_; CurrentWindow_++ )
+        {
+                TEAGN_TRUE_OR_RETURN( InitWindow(),
+                  "Unable to init window" )
+                  
+                Adjust();
+                
+                TEAGN_TRUE_OR_RETURN( MergeMutuallyClosestCells(),
+                  "Unable to merge cells" )
+                                        
+                TEAGN_TRUE_OR_RETURN( MergeSmallCells( 5 , Nlin_),
+                  "Unable to merge small cells" )
+                                        
+                TEAGN_FALSE_OR_RETURN( progress.Update( step ),
+                  "Canceled by the user" );
+
+                ++step;
+        }
+
+
+        if (!canceled)
+        {
+                if( MergeSmallCells( Areamin_ , Nlin_) == 0 )
+                                canceled=1;
+                if( Resort() == 0 )
+                                canceled=1;
+        }
+        
+        if (!canceled) {
+          if( params_.CheckParameter< TePDITypes::TePDIPolSetMapPtrType >( 
+            "output_polsets" ) ) {
+            
+            TePDIRaster2Vector vectorizer;
+            
+            TePDIParameters vectorizer_params = params_;
+            vectorizer_params.SetParameter( "rotulated_image", Imagelab_ );
+            vectorizer_params.SetParameter( "channel", (unsigned int)0 );
+            
+            TEAGN_TRUE_OR_RETURN( vectorizer.Reset( vectorizer_params ),
+              "Unable to set vectorize parameters" );
+            TEAGN_TRUE_OR_RETURN( vectorizer.Apply(),
+              "Unable to create output polygon set" );
+          }          
+        }
+
+        return !canceled;
+}
+
+
+bool
+TePDIRegGrowSeg :: InitWindow()
+{
+        int             lin, col;
+        long    ind;
+        unsigned long   idcell,
+                        idwindow,
+                        cellid;
+        float   dist;
+        TePDIRGSCell *c = 0;
+        TePDIRGSCell *cell = 0;
+        TePDIRGSCell *cwindow = 0;
+
+        ilin_ = (int)( ( CurrentWindow_ / WindowColumns_ ) * TAMJAN );
+        icol_ = (int)( ( CurrentWindow_ % WindowColumns_ ) * TAMJAN );
+        flin_ = ilin_ + TAMJAN - 1;
+        if( flin_ >= Nlin_ ) flin_ = Nlin_ - 1;
+        fcol_ = icol_ + TAMJAN - 1;
+        if( fcol_ >= Ncol_ ) fcol_ = Ncol_ - 1;
+        sizelin_   = flin_ - ilin_ + 1;
+        sizecol_   = fcol_ - icol_ + 1;
+        int     proLimbo = 6*TAMJAN;
+
+
+//CTX Drop cells that are farther than proLimbo from current window base line
+        if (icol_ < TAMJAN && ilin_ > proLimbo)
+        {
+                short   flag=0;
+                MergeSmallCells( Areamin_ , ilin_ - proLimbo);
+
+                TePDIRGSCellList::iterator it;
+                for (it=ListCell_->begin(); it!=ListCell_->end() ; ++it) {
+                        c=(*it).second;
+
+                        if( c == NULL ) continue;
+                        if ((ilin_ - c->LineMax()) > proLimbo)
+                        {
+                                flag = 1;
+                                c->Kill();
+                                OnLimbo_++;
+                        }
+                }
+                if (flag)
+                        Adjust();
+        }
+
+        // Constructs the array of regions belonging to this window
+        idcell = (unsigned long)WindowOffset_;
+        double val;
+
+        for( lin = ilin_; lin <= flin_; lin++ ) {
+                for( col = icol_; col <= fcol_; col++ ) {
+
+                        if( Imageexc_.isActive() ){
+                                (*Imageexc_).getElement(col, lin ,val,0);
+                                if( val == 0 ){
+                                        (*Imagelab_).setElement(col,lin,0L);
+                                        WindowCell_[idcell-WindowOffset_] = NULL;
+                                        idcell++;
+                                        continue;
+                                }
+                        }
+
+                        if (!((*Imagelab_).setElement(col,lin,(double) idcell,0))){
+                                                         return false;
+                        }
+
+                        double d;
+                        (*Imagelab_).getElement(col, lin,d,0);
+                        for( int ban = 0; ban < Nban_; ban++ ) {
+                                (*Imagein_).getElement(col,lin ,val,ban);
+                                tuple_[ban] = (unsigned long)val;
+                        }
+
+//FAMI1095 (it's really not necessary to free memory)
+//if(WindowCell_[idcell-WindowOffset_]) {delete WindowCell_[idcell-WindowOffset_]; WindowCell_[idcell-WindowOffset_]=NULL;}
+                        //WindowCell_[idcell-WindowOffset_] = new TePDIRGSCell( tuple_, idcell, lin, col, Nban_ );
+                        WindowCell_[idcell-WindowOffset_] = cellStack.Pop();
+
+                        WindowCell_[idcell-WindowOffset_]->Init( tuple_, idcell, lin, col, Nban_ );
+                        if( WindowCell_[idcell-WindowOffset_] == NULL )
+                        {
+                                for( unsigned int i = 0; i < idcell-WindowOffset_; i++ )
+                                        delete WindowCell_[i];
+                        }
+                        idcell++;
+                }
+        }
+
+
+        // Take the neighborhood of regions lying inside the window
+        for( lin = ilin_; lin <= flin_; lin++ )
+        {
+                for( col = icol_; col <= fcol_; col++ )
+                {
+                        ind = (lin - ilin_) * sizecol_ + ( col - icol_ );
+                        c = WindowCell_[ind];
+                        if( c == NULL )
+                                continue;
+                        if( col < fcol_ && WindowCell_[ind+1] != NULL )
+                        {
+                                dist = WindowCell_[ind]->Distance( WindowCell_[ind+1] );
+                                WindowCell_[ind]->InsertNeighbor(WindowCell_[ind+1], dist );
+                                WindowCell_[ind+1]->InsertNeighbor(WindowCell_[ind], dist );
+                        }
+                        if( lin < flin_ && WindowCell_[ind+sizecol_] != NULL )
+                        {
+                                dist = WindowCell_[ind]->Distance( WindowCell_[ind+sizecol_] );
+                                WindowCell_[ind]->InsertNeighbor(WindowCell_[ind+sizecol_], dist );
+                                WindowCell_[ind+sizecol_]->InsertNeighbor(WindowCell_[ind], dist );
+                        }
+                }
+        }
+
+        // Atualiza Cells de fronteira a esquerda
+        double tmp;
+        if( icol_ > 0 )
+        {
+                cellid = 0L;
+                for( lin = ilin_; lin <= flin_; lin++ )
+                {
+                        (*Imagelab_).getElement(icol_-1,lin,tmp,0);
+                        idcell = (unsigned long)tmp;
+                        (*Imagelab_).getElement(icol_,lin,tmp,0);
+                        idwindow = (unsigned long)tmp;
+                        if( idcell == 0L || idwindow == 0L )
+                                continue;
+                        if( cellid != idcell ){
+                                TePDIRGSCellList::iterator it;
+                                if ( (it = ListCell_->find( idcell ) ) == ListCell_->end() ) {
+                                    //Fatal error : we didn t found the id in the list
+                                                                        return false;
+                                }
+                                cell = (*it).second;
+                                cellid = cell->Id();
+                        }
+                        cwindow = WindowCell_[ (lin-ilin_) * sizecol_ ];
+                        dist = cell->Distance( cwindow );
+                        cell->AddNeighbor( cwindow, dist );
+                        cwindow->AddNeighbor( cell, dist );
+                }
+        }
+
+        // Atualiza Cells de fronteira acima
+        if( ilin_ > 0 )
+        {
+                cellid = 0L;
+                for( col = icol_; col <= fcol_; col++ )
+                {
+                        (*Imagelab_).getElement(col,ilin_-1,tmp,0);
+                        idcell = (unsigned long)tmp;
+                        (*Imagelab_).getElement(col,ilin_,tmp,0);
+                        idwindow = (unsigned long)tmp;
+                        if( idcell == 0L || idwindow == 0L )
+                                continue;
+                        if( cellid != idcell )
+                        {
+                                TePDIRGSCellList::iterator it;
+                                if ( (it = ListCell_->find( idcell ) ) == ListCell_->end() ) {
+                                                                        return false;
+                                }
+                                cell = (*it).second;
+                                cellid = cell->Id();
+                        }
+                        cwindow = WindowCell_[ col - icol_ ];
+                        dist = cell->Distance( cwindow );
+                        cell->AddNeighbor( cwindow, dist );
+                        cwindow->AddNeighbor( cell, dist );
+                }
+        }
+
+        // Add Regions in WindowCell_ in the list ListCell_;
+        for( ind = 0; ind < sizelin_ * sizecol_; ind++ ){
+                if( WindowCell_[ ind ] != NULL )
+                        ListCell_->insert(make_pair(WindowCell_[ ind ]->Id(), WindowCell_[ ind ]));
+        }                                               //stCell[WindowCell_[ ind ]->Id()]=WindowCell_[ ind ];
+
+
+        WindowOffset_ += ((long)sizelin_ * sizecol_ );
+        return true;
+
+}
+
+bool
+TePDIRegGrowSeg::MergeMutuallyClosestCells() {
+        float   dist;
+        float   diff;
+        char    status;
+        TePDIRGSCell    *c,
+                *cgo,
+                *cback;
+
+        for( int step = 1; step <= (int)Difsim_ ; step++ )
+        {
+           diff = (float)step * step;
+           do {
+                status  = 0;
+                TePDIRGSCellList::iterator it;
+                for (it=ListCell_->begin(); it!=ListCell_->end() ; ++it) {
+                        c=(*it).second;
+
+                        while( !c->Dead() )
+                        {
+                                if( ( cgo = c->ClosestNeighbor(dist) ) == NULL ) break;
+
+                                cback = cgo->ClosestNeighbor(dist);
+                                if( c == cback ) {
+                                        if( dist <= diff  ) {
+                                                c = MergeCells( c, cgo );
+                                                status = 1;
+                                        }else
+                                                break;
+                                }else
+                                        break;
+                        }
+                }
+//              Adjust();
+           }while( status );
+        }
+        Adjust();
+
+        return true;
+}
+
+bool
+TePDIRegGrowSeg :: MergeSimilarCells()
+{
+        float   d1;
+        float   diff;
+        char    status;
+        TePDIRGSCell    *c,
+                *cgo;
+
+        for( int step = 1; step <= (int)Difsim_ ; step++ )
+        {
+           diff = (float)step * step;
+           do {
+                status  = 0;
+
+                TePDIRGSCellList::iterator it;
+                for (it=ListCell_->begin(); it!=ListCell_->end() ; ++it) {
+                        c=(*it).second;
+
+                        while( !c->Dead() )
+                        {
+                                if( ( cgo = c->ClosestNeighbor(d1) ) == NULL ) break;
+                                if( d1 <= diff )
+                                {
+                                        c = MergeCells( c, cgo );
+                                        status = 1;
+                                }
+                                else    break;
+                        }
+                }
+                Adjust();
+           }while( status );
+        }
+        return true;
+}
+
+bool
+TePDIRegGrowSeg :: MergeSmallCells( long area ,int linmax)
+{
+        char    status;
+        TePDIRGSCell    *c,
+                *cgo,
+                *cback;
+        float   dist;
+        float   diff;
+        int step;
+
+        if( area > Areamin_ )area = Areamin_;
+
+// Elimina regioes pequenas atraves do merging com a regiao vizinha mais proxima
+        for( step = 1; step <= 6; step++ )
+        {
+           diff = (float)(Difsim_ + step * 2);
+           diff = diff * diff;
+           do {         status  = 0;
+
+                TePDIRGSCellList::iterator it;
+                for (it=ListCell_->begin(); it!=ListCell_->end() ; ++it) {
+                        c=(*it).second;
+
+                        if( c->Dead() || c->Area() > area || c->LineMax() > linmax)
+                                continue;
+                        if( ( cgo = c->ClosestNeighbor(dist) ) == NULL )
+                                break;
+                        cback = cgo->ClosestNeighbor(dist);
+                        if( c != cback ) continue;
+                        if( dist <= diff || step > 5 )
+                        {
+                                c = MergeCells( c, cgo );
+                                status = 1;
+                        }
+                }
+//CTX           Adjust();
+           }while( status );
+        }
+        Adjust();
+
+        for( step = 1; step <= 6; step++ )
+        {
+           diff = (float)(Difsim_ + step * 2);
+           diff = diff * diff;
+           do {         status  = 0;
+                TePDIRGSCellList::iterator it;
+                for (it=ListCell_->begin(); it!=ListCell_->end() ; ++it) {
+                        c=(*it).second;
+
+                        if( c->Dead() || c->Area() > area || c->LineMax() > linmax)
+                                continue;
+                        if( ( cgo = c->ClosestNeighbor(dist) ) == NULL ) break;
+                        if( dist <= diff || step > 5 )
+                        {
+                                c = MergeCells( c, cgo );
+                                status = 1;
+                        }
+                }
+//              Adjust();
+           }while( status );
+        }
+        Adjust();
+
+        return true;
+}
+
+void
+TePDIRegGrowSeg :: Adjust()
+{
+        TePDIRGSCell    *c;
+        TePDIRGSCellList::iterator itt;
+                TePDIRGSCellList::iterator it=ListCell_->begin();
+        while (it!=ListCell_->end()) {
+            itt=it;
+                        c=(*itt).second;
+                        it++;
+            if ( c == NULL ) {
+                ListCell_->erase(itt);
+            } else if( c->Dead() ) {
+                ListCell_->erase(itt);
+                cellStack.Push(c);
+            } else {
+                c->AdjustNeighborhood();
+            }
+        }
+}
+
+TePDIRGSCell*
+TePDIRegGrowSeg :: MergeCells( TePDIRGSCell *c1, TePDIRGSCell *c2 )
+{
+        double val;
+        int     lmin, lmax, cmin, cmax;
+        TePDIRGSCell    *cret = NULL;
+
+        if( c1 == NULL || c2 == NULL ) return NULL;
+        if( c1 == c2 ) return NULL;
+
+        if( c1->Area() >= c2->Area() )
+        {
+                if( c1->Merge( c2 ) == 0 ) return NULL;
+                c2->BoundingRectangle( lmin, cmin, lmax, cmax );
+                for( int lin = lmin; lin <= lmax; lin++ ) {
+                        for( unsigned int col = cmin; col <= (unsigned int)cmax; col++ ) {
+                                (*Imagelab_).getElement(col,lin,val,0);
+                                if( (unsigned long)val == (unsigned long)c2->Id() ) (*Imagelab_).setElement(col,lin,(unsigned long)c1->Id(), 0);
+                        }
+                }
+                cret = c1;
+        }
+        else
+        {
+                if( c2->Merge( c1 ) == 0 ) return NULL;
+                c1->BoundingRectangle( lmin, cmin, lmax, cmax );
+                for( int lin = lmin; lin <= lmax; lin++ ) {
+                        for( int col = cmin; col <= cmax; col++ ) {
+                                (*Imagelab_).getElement(col,lin,val,0);
+                                if( (unsigned long)val == (unsigned long)c1->Id() )
+                                        (*Imagelab_).setElement(col,lin,(unsigned long)c2->Id(),0);
+                        }
+                }
+                cret = c2;
+        }
+
+        return cret;
+}
+
+
+bool
+TePDIRegGrowSeg :: Resort()
+{
+// Evaluate total number of cells
+
+        //long size = OnLimbo_ + ListCell_->size();
+
+// Allocate array for resorting image
+        map<long, long> m_map;
+        long    newid,
+                        oldid = 0L,
+                        index=1,
+                        nindex = 0L;
+        double val;
+
+        for( int lin = 0; lin < Nlin_; lin++ )
+        {
+                for( int col = 0; col < Ncol_ ; col++ )
+                {
+
+                        (*Imagelab_).getElement(col,lin,val,0);
+                        newid=(long)val;
+                        if( newid == 0L ) // 0L means excluded area for region growing....
+                                continue;
+                        if( newid != oldid || oldid == 0L )
+                        {
+
+                                if ( m_map.find(newid) == m_map.end() )
+                                {
+                                        nindex++;
+                                        index = nindex;
+                                        m_map[newid] = index;
+                                }
+                                else index = m_map[newid];              // AND & LEO 10/00
+                                oldid = newid;
+                        }
+                        (*Imagelab_).setElement(col,lin,index,0);
+                }
+        }
+
+
+// Free all memory
+        ListCell_->clear();
+        delete ListCell_;
+        ListCell_ = NULL;
+        cellStack.Clear();
+
+        m_map.clear();
+        return true;
+}
+
+
+//--------------------------------TePDIRGSCell ---------------------------------
+
+
+TePDIRGSCell :: TePDIRGSCell( unsigned long* tuple, long id, short lin, short col, short Nban )
+{
+        Stat_          = 0;
+        Idnumber_      = id;
+        Npix_          = 1;
+        Nban_          = Nban;
+        LinMax_        = lin;
+        LinMin_        = lin;
+        ColMax_        = col;
+        ColMin_        = col;
+        Neighbors_     = new TePDIRGSCellList;
+        Media_         = new float[Nban];
+        PreviousMedia_ = new float[Nban];
+        Cc_            = new CloserCells;
+        for( int ban = 0; ban < Nban_; ban++ )
+                Media_[ban] = PreviousMedia_[ban] = (float) tuple[ban];
+}
+
+
+void TePDIRGSCell :: Init( unsigned long* tuple, long id, short lin, short col, short Nban )
+{
+        Stat_          = 0;
+        Idnumber_      = id;
+        Npix_          = 1;
+        Nban_          = Nban;
+        LinMax_        = lin;
+        LinMin_        = lin;
+        ColMax_        = col;
+        ColMin_        = col;
+        if (Neighbors_==NULL)
+        {
+                Neighbors_     = new TePDIRGSCellList;
+                Media_         = new float[Nban_];
+                PreviousMedia_ = new float[Nban_];
+                Cc_            = new CloserCells;
+
+                /*if ( PreviousMedia_ == NULL || Media_ == NULL || Neighbors == NULL || Cc == NULL )
+                        SGError.Handler(ALLOCATION,FATAL,"TePDIRGSCell constructor");*/
+        }
+        else
+        {
+                Cc_->Reset();
+                Neighbors_->clear();
+        }
+        for( int ban = 0; ban < Nban_; ban++ )
+                Media_[ban] = PreviousMedia_[ban] = (float) tuple[ban];
+}
+
+
+TePDIRGSCell :: TePDIRGSCell()
+{
+        Stat_          = 0;
+        Idnumber_      = 0;
+        Npix_          = 1;
+        Nban_          = 0;
+        LinMax_        = 0;
+        LinMin_        = 0;
+        ColMax_        = 0;
+        ColMin_        = 0;
+        Neighbors_     = NULL;
+        Media_         = NULL;
+        PreviousMedia_ = NULL;
+        Cc_            = NULL;
+}
+
+TePDIRGSCell :: ~TePDIRGSCell()
+{
+        if(Media_) {delete []Media_; Media_=NULL;}
+        if(Neighbors_) {delete Neighbors_; Neighbors_=NULL;}
+        if(PreviousMedia_) {delete []PreviousMedia_; PreviousMedia_=NULL;}
+        if(Cc_) {delete Cc_; Cc_=NULL;}
+}
+
+void
+TePDIRGSCell::AdjustNeighborhood()
+{
+        Cc_->Adjust();
+        TePDIRGSCellList::iterator itt;
+                TePDIRGSCellList::iterator it=Neighbors_->begin();
+        while (it!=Neighbors_->end()){
+            itt=it;
+                        it++;
+                        if (( (*itt).second==NULL) || ( (*itt).second->Dead() ) ){
+                  Neighbors_->erase(itt);
+            }
+        }
+}
+
+
+bool
+TePDIRGSCell :: AddNeighbor( TePDIRGSCell *c, float dist )
+{
+        if( c == NULL ) return false;
+        if( c->Dead() ) return false;
+        Cc_->Update( c, dist );
+
+//      Neighbors[c->id()]=c;
+        Neighbors_->insert(make_pair(c->Id(),c));
+        AdjustNeighborhood();
+        return true;
+}
+
+
+bool
+TePDIRGSCell :: InsertNeighbor( TePDIRGSCell* c, float dist )
+{
+        if( c == NULL ) return false;
+        if( c->Dead() ) return false;
+        Cc_->Insert( c, dist );
+
+//  Neighbors[c->id()]=c;
+        Neighbors_->insert(make_pair(c->Id(),c));
+        AdjustNeighborhood();
+        return true;
+}
+
+
+bool
+TePDIRGSCell :: Merge( TePDIRGSCell *c )
+{
+        TePDIRGSCell    *cviz;
+        float   dist;
+        long    area;
+        int ban;
+
+        if( c == NULL ) return false;
+
+        if( LinMax_ < c->LinMax_ ) LinMax_ = c->LinMax_;
+        if( LinMin_ > c->LinMin_ ) LinMin_ = c->LinMin_;
+        if( ColMax_ < c->ColMax_ ) ColMax_ = c->ColMax_;
+        if( ColMin_ > c->ColMin_ ) ColMin_ = c->ColMin_;
+
+        area  = Npix_ + c->Npix_;
+        delta_ = (float)0;
+        for( ban = 0; ban < Nban_; ban++ )
+        {
+                Media_[ban] = (Media_[ban] * Npix_ + c->Media_[ban] * c->Npix_) / area;
+                dist = Media_[ban] - PreviousMedia_[ban];
+                delta_ += dist * dist;
+        }
+        Npix_ = area;
+
+        c->Kill();
+
+        if( delta_ > (float)1 )
+        {
+                Cc_->Reset();
+                for( ban = 0; ban < Nban_; ban++ )
+                        PreviousMedia_[ban] = Media_[ban];
+
+                TePDIRGSCellList::iterator it;
+                for (it=Neighbors_->begin(); it!=Neighbors_->end() ; ++it) {
+                        cviz=(*it).second;
+                        if( cviz == NULL ) return false;
+                        if( cviz->Dead() ) continue;
+                        dist = Distance( cviz );
+                        Cc_->Insert( cviz, dist );
+                        cviz->Cc_->Update( this, dist );
+                }
+        }
+
+        TePDIRGSCellList::iterator it;
+        for (it=c->Neighbors_->begin(); it!=c->Neighbors_->end() ; ++it) {
+                cviz=(*it).second;
+
+                if( cviz == NULL ) return false;
+                if( cviz != this && !cviz->Dead())
+                {
+                        dist = Distance( cviz );
+                        if( cviz->AddNeighbor( this, dist ) == 0 )
+                                return false;
+                        if( AddNeighbor( cviz, dist ) == 0 )
+                                return false;
+                }
+        }
+
+        return true;
+}
+
+
+float
+TePDIRGSCell :: Distance( TePDIRGSCell *c )
+{
+        float   diff;
+        float   dist;
+
+        if( c == NULL ) return (float)100000;
+
+        dist = 0;
+        for (short ban = 0; ban < Nban_; ban++ )
+        {
+                diff  = PreviousMedia_[ban] - c->PreviousMedia_[ban];
+                dist += (diff * diff);
+        }
+
+        return dist;
+}
+
+TePDIRGSCell*
+TePDIRGSCell :: ClosestNeighbor( float& dist )
+{
+        TePDIRGSCell    *c;
+
+        AdjustNeighborhood();
+        if( Neighbors_->size() <= 0L ) return NULL;
+        if( ( c = Cc_->Minimum( dist ) ) != NULL ) return c;
+
+        Cc_->Reset();
+
+        TePDIRGSCellList::iterator it;
+        for (it=Neighbors_->begin(); it!=Neighbors_->end() ; ++it) {
+                c=(*it).second;
+
+                if( !c->Dead() )
+                {
+                        dist = Distance( c );
+                        Cc_->Insert( c, dist );
+                }
+        }
+        c = Cc_->Minimum( dist );
+
+        return c;
+}
+
+void
+TePDIRGSCell :: Print()
+{
+        TePDIRGSCell    *c;
+        long i;
+
+        printf( "\n%ld - %ld %f %i ", Idnumber_, Npix_, delta_, Neighbors_->size() );
+        for( short ban = 0; ban < Nban_; ban++ )
+                printf( "%f ", Media_[ban] );
+        printf("\n Mais proximos -> ");
+        for( i = 0; i < MAXCLOSECELLS; i++ )
+        {
+                if( Cc_->cmin[i] != NULL )
+                        printf("( %ld %f %d ) ", Cc_->cmin[i]->Id(), Cc_->dmin[i], Cc_->cmin[i]->Stat_ );
+                else
+                        printf("( NULL ) " );
+        }
+        printf("\n Neighbors -> ");
+        TePDIRGSCellList::iterator it;
+        for (it=Neighbors_->begin(); it!=Neighbors_->end() ; ++it) {
+                c=(*it).second;
+                if( c != NULL )
+                        printf( "(%ld %f %d) ", c->Idnumber_, Distance( c ), c->Stat_ );
+        }
+        printf( "\n");
+}
+
diff --git a/src/terralib/image_processing/TePDIRegGrowSeg.hpp b/src/terralib/image_processing/TePDIRegGrowSeg.hpp
new file mode 100755
index 0000000..5751470
--- /dev/null
+++ b/src/terralib/image_processing/TePDIRegGrowSeg.hpp
@@ -0,0 +1,755 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIREGGROWSEG_HPP
+  #define TEPDIREGGROWSEG_HPP
+
+  #include "TePDIAlgorithm.hpp"
+
+  #include <TeSharedPtr.h>
+  
+  #include <map>
+  
+  #define MAXCLOSECELLS   5
+  #define SQR_NC          65025
+  #define TAMJAN          128
+  #define STATDEAD        (char)2    
+  
+  /** @brief Forward declaration */
+  class TePDIRGSCell;
+  
+  
+  /** @brief Forward declaration */
+  class CloserCells;
+  
+  /**
+  * @typedef map<long, TePDIRGSCell *> TePDIRGSCellList
+  * Cell list type definition.
+  */
+  typedef map<long, TePDIRGSCell *> TePDIRGSCellList;    
+  
+  
+  /**
+  * @brief This is the basic element in the region growing process. The cell represents an area
+  * in the image being segmented. It contains spectral, geometrical and contextual
+  * information of this area. The behaviour of this class allows it to merge
+  *
+  * The behaviour of this class allows it to merge with other cells and to update its
+  * information. At the initial stage in the region growing process each cell is
+  * composed by one pixel of the image. It uses 4-Neighbourhood (contextual information).
+  */
+class PDI_DLL TePDIRGSCell
+{
+public:
+   /**
+    * @brief Default Constructor.
+    */
+        TePDIRGSCell ();
+
+   /**
+    * @brief Alternative Constructor.
+    *
+    * @param tuple: pixel tuple containing spectral information.
+    * @param id: Id number of the cell.
+    * @param lin: line position of tuple in the image.
+    * @param col: column position of tuple in the image.
+    * @param nban: Number of bands.
+    */
+   TePDIRGSCell( unsigned long *tuple, long id, short lin, short col, short nban );
+
+   /**
+    * @brief Default destructor.
+    */
+   ~TePDIRGSCell();
+
+   /**
+    * @brief Initializes an existing TePDIRGSCell
+    *
+    * @param tuple: pixel tuple containing spectral information.
+    * @param id: Id number of the cell.
+    * @param lin: line position of tuple in the image.
+    * @param col: column position of tuple in the image.
+    * @param nban: Number of bands.
+    */
+   void Init( unsigned long *tuple, long id, short lin, short col, short nban );
+
+   /**
+    * @brief Changes the Id  number of the cell
+        *
+    * @param idc: new id number
+    *
+    */
+   void ResetId( long idc ) { Idnumber_ = idc; }
+
+   /**
+    * @brief Returns The status of the cell
+    *
+    * @return If cell is dead return 1, otherwise, 0.
+    */
+   char Dead()  { return (Stat_ & STATDEAD); }
+
+   /**
+    * @brief Turns cell dead
+    *
+        * When the cell is dead it does not represent
+    * any region in the image.
+    */
+   void Kill() { Stat_ = STATDEAD; }
+
+   /**
+    * @brief Return the bounding box of the cell
+    *
+    * @param lmin: Minimum image row wich contains a pixel belonging to the cell
+    * @param cmin: Minimum image column wich contains a pixel belonging to the cell
+    * @param lmax: Maximum image row wich contains a pixel belonging to the cell
+    * @param cmax: Maximum image column wich contains a pixel belonging to the cell
+    */
+   void BoundingRectangle( int& lmin, int& cmin, int& lmax, int& cmax )
+        { lmin = LinMin_; cmin = ColMin_; lmax = LinMax_; cmax = ColMax_; }
+
+   /**
+    * @brief LinMax
+    *
+        * @return Maximum image line wich contains a pixel belonging to the cell
+    */
+   int LineMax () { return LinMax_;}
+
+   /**
+    * @brief Merge cell c with the "this" cell.
+    *
+    * @return true if OK. false on error.
+    */
+   bool Merge( TePDIRGSCell *c );
+
+   /**
+    * @brief Remove dead cells from the list of neighbour cells and closest cells
+    */
+   void AdjustNeighborhood();//{ Cc_->Adjust(); /*Neighbors_->Adjust();*/ }
+
+   /**
+    * @brief Add neighbour to neighbour cells list and closest cells list.
+    *
+    * @param c being added.
+    * @param dist euclidian distance to "this" cell
+    * @return true if OK. false on error.
+    */
+   bool AddNeighbor( TePDIRGSCell* c, float dist );
+
+   /**
+    * @brief Insert neighbour to neighbour cells list and closest cells list.
+    *
+    * @param c being added.
+    * @param dist: euclidian distance to "this" cell
+    * @return true if OK. false on error.
+    */
+   bool InsertNeighbor( TePDIRGSCell* c, float dist );
+
+   /**
+    * @brief Return the cell with the minimum euclidian distance.
+    *
+    * @param dist: minimum distance.
+    * @return Pointer to cell which has the minimum euclidian distance.
+    */
+   TePDIRGSCell* ClosestNeighbor( float& dist );
+
+   /**
+    * @brief Return the euclidian distance between cell c and "this" cell.
+    *
+        * @param c: input cell
+    * @return euclidian distance between cell c and "this" cell.
+    */
+   float Distance( TePDIRGSCell *c );
+
+   /**
+    * @brief Returns the Id number of the cell.
+    *
+    * @return Id number of the cell.
+    */
+   long Id() { return Idnumber_; }
+
+   /**
+    * @brief Return the number of pixels of the cell
+    *
+    * @return Number of pixels of the cell
+    */
+   long Area() { return Npix_; }
+
+   /**
+    * @brief Return the number of espectral bands used
+    *
+    * @return Number of espectral bands used
+    */
+   int GetNban() { return Nban_; }
+
+   /**
+    * @brief Prints cell state
+    */
+   void Print();
+
+private:
+        /** @brief Status STATDEAD = dead, otherwise, alive. */
+        char            Stat_;
+        
+        /** @brief Id number of cell */
+        long            Idnumber_;
+        
+        /** @brief Number of pixels it contains */
+        long            Npix_;
+        
+        /** @brief Number of spectral bands used */
+        int             Nban_;
+        
+        /** @brief Delta */
+        float           delta_;
+        
+        /** @brief Bounding box of cell */
+        int             LinMin_;
+        
+        /** @brief Bounding box of cell */
+        int             LinMax_;
+        
+        /** @brief Bounding box of cell */
+        int             ColMin_;
+        
+        /** @brief Bounding box of cell */
+        int             ColMax_;
+        
+        /** @brief Array of spectral mean. */
+        float           *Media_;
+        
+        /** @brief Array containing the previous spectral mean */
+        float           *PreviousMedia_;
+        
+        /** @brief List of neighbour cells */
+        TePDIRGSCellList        *Neighbors_;
+        
+        /** @brief List of closest cells */
+        CloserCells     *Cc_;
+
+};  
+
+
+/**
+ * @brief Simple cell stack class.
+ */
+class PDI_DLL CellStack : public vector< TePDIRGSCell* >
+{
+public:
+
+        /** 
+         * @brief Add element to top of stack.
+         * @param c Cell.
+         */
+        void Push(TePDIRGSCell* c)
+        { push_back(c); }
+
+        /** 
+         * @brief Peek at top element of stack.
+         */
+        TePDIRGSCell* Peek()
+    {
+                if (size()==0){
+                        return NULL;
+                } else {
+                        return back();
+                }
+        }
+
+        /** 
+         * @brief Pop top element off stack.
+         * @return Cell.
+         */
+        TePDIRGSCell* Pop()
+        {
+                TePDIRGSCell* c;
+                if (size()==0)
+                {
+                        c = new TePDIRGSCell();
+                } else {
+                        c = back();
+                        pop_back();
+                }
+                return c;
+        }
+
+        /**
+         * @brief Destructor.
+         */
+        ~CellStack ()
+        {
+                TePDIRGSCell *b;
+                while (size()!=0)
+                {
+                        b = Pop();
+                        delete b;
+                }
+        }
+        
+        /**
+         * @brief Clear.
+         */        
+        void Clear ()
+        {
+                TePDIRGSCell *b;
+                while (size()!=0)
+                {
+                        b = Pop();
+                        delete b;
+                }
+        }
+};
+
+
+/**
+  * @brief Keep a number (given by MAXCLOSECELLS) of closest  neighbour cells of a cell.
+  * Its an ordered array of closest neighbour cells of a cell. The contents of array
+  * are sorted in ascending order by the euclidian distance between the cell and its
+  * neighbour cell.
+  *
+  * The class cell hold some of the closest neighbour cells in this class. Every time
+  * the cell wants to the closest neighbour cell it calls methods of this class to
+  *  retrieve closest neighbour.
+  */
+class PDI_DLL CloserCells
+{
+public :
+        /**
+         * @brief Array of closest cells.
+         */
+        TePDIRGSCell    *cmin[MAXCLOSECELLS];
+
+        /**
+         * @brief Array of euclidian distances between the cell containing 
+         * this object (CloserCells) and cmin[i].
+         */
+        float   dmin[MAXCLOSECELLS];
+        
+        /**
+         * @brief Defalt constructor.
+         */
+        CloserCells()
+        {
+                for(short i = 0; i < MAXCLOSECELLS; i++ )
+                {
+                        cmin[i] = NULL;
+                        dmin[i] = 1000000.;
+                }
+        }
+
+        /**
+         * @brief New cell insertion.
+         * @param cell Cell pointer.
+         * @param dist Distance.
+         */
+        void
+        Insert( TePDIRGSCell *cell, float dist )
+        {
+                TePDIRGSCell    **pci,
+                        **p;
+                float   *di,
+                        *d;
+
+                for( pci = &cmin[0], di = &dmin[0]; pci < &cmin[MAXCLOSECELLS]; pci++, di++ )
+                {
+                        if( *pci == NULL )
+                        {
+                                *pci = cell;
+                                *di  = dist;
+                                return;
+                        }
+                        if( dist <= *di )
+                        {
+                                if( dist == *di && (*pci)->Id() < cell->Id() )
+                                        continue;
+                                if( pci < &cmin[MAXCLOSECELLS] )
+                                {
+                                        for( p = &cmin[MAXCLOSECELLS-1], d = &dmin[MAXCLOSECELLS-1]; p > pci; p--, d-- )
+                                        {
+                                                *p = *(p-1);
+                                                *d = *(d-1);
+                                        }
+                                }
+                                *pci = cell;
+                                *di  = dist;
+                                return;
+                        }
+                }
+        }
+
+        /**
+         * @brief Cell update.
+         * @param cell Cell pointer.
+         * @param dist Distance.
+         */        
+        void
+        Update( TePDIRGSCell *cell, float dist )
+        {
+                char    ok = 1;
+                TePDIRGSCell    **pci,
+                        **pc0,
+                        **pc01,
+                        **pc02;
+                float *di = 0;
+                float *d0 = 0;
+                float *d01 = 0;
+
+                pc0 = NULL;
+                for( pci = &cmin[0], di = &dmin[0]; pci < &cmin[MAXCLOSECELLS]; pci++, di++ )
+                {
+                        if( *pci == NULL )
+                        {
+                                pc0 = pci;
+                                d0  = di;
+                        }
+                        else if( (*pci)->Dead() )
+                        {
+                                *pci = NULL;
+                                pc0 = pci;
+                                d0  = di;
+                        }
+                        else if( *pci == cell )
+                        {
+                                *pci = NULL;
+                                pc0  = pci;
+                                d0   = di;
+                        }
+
+                        if( ok && dist <= *di )
+                        {
+                                if( dist == *di )
+                                {
+                                        if( *pci == NULL )
+                                        {
+                                                if( pci < &cmin[MAXCLOSECELLS-1] )
+                                                        continue;
+                                        }
+                                        else if( (*pci)->Id() < cell->Id() )
+                                                continue;
+                                }
+                                if( pc0 != NULL )
+                                {
+                                        for( pc01 = pc0, d01 = d0; pc01 < pci-1; pc01++, d01++ )
+                                        {
+                                                *pc01 = *(pc01+1);
+                                                *d01  = *(d01+1);
+                                        }
+                                        *pc01 = cell;
+                                        *d01  = dist;
+                                }
+                                else if( pci < &cmin[MAXCLOSECELLS-1] )
+                                {
+                                        for( pc01 = pci+1, d01 = di+1; pc01 < &cmin[MAXCLOSECELLS-1]; pc01++, d01++ )
+                                        {
+                                                if( (*pc01) == NULL ) break;
+                                                if( (*pc01)->Dead() ) break;
+                                                if( *pc01 == cell )   break;
+                                        }
+                                        for( pc02 = pc01; pc02 > pci; pc02-- )
+                                        {
+                                                *pc02 = *(pc02-1);
+                                                *d01  = *(d01-1);
+                                                d01--;
+                                        }
+                                        *pci = cell;
+                                        *di  = dist;
+                                }
+                                else
+                                {
+                                        *pci = cell;
+                                        *di  = dist;
+                                }
+                                ok   = 0;
+                        }
+                }
+                return;
+        }
+
+        /**
+         * @brief Undocumented.
+         * @param dist Distance.
+         * @return Cell pointer.
+         */          
+        TePDIRGSCell*
+        Minimum( float& dist )
+        {
+                if( cmin[0] != NULL )
+                {
+                        if( !cmin[0]->Dead() )
+                        {
+                                dist = dmin[0];
+                                return cmin[0];
+                        }
+                }
+                for( short i = 1; i < MAXCLOSECELLS; i++ )
+                {
+                        if( cmin[i] != NULL )
+                                if( !cmin[i]->Dead() )
+                                {
+                                        dist = dmin[i];
+                                        return cmin[i];
+                                }
+                }
+
+                return NULL;
+        }
+
+        /**
+         * @brief Undocumented.
+         */            
+        void
+        Adjust()
+        {
+                for( short i = 0; i < MAXCLOSECELLS; i++ )
+                        if( cmin[i] != NULL )
+                                if( cmin[i]->Dead() )
+                                        cmin[i] = NULL;
+        }
+
+        /**
+         * @brief Undocumented.
+         */           
+        void
+        Reset()
+        {
+                for(short i = 0; i < MAXCLOSECELLS; i++ )
+                {
+                        cmin[i] = NULL;
+                        dmin[i] = 1000000.0;
+                }
+        }
+};
+
+
+  /**
+    * @brief This is the class models an image segmentation process. 
+    * @author Nicolas Despres <nicolasdespres at wanadoo.fr>
+    * @ingroup TePDISegmentationGroup
+    *
+    * The segmentation
+    * is performed through a region growing approach described in:  Leonardo
+    * et allii, "Satellite image segmentation: a region growing approach",
+    * Simposio Brasileiro de Sensoriamento Remoto, Salvador, 1996
+    *
+    * @note The general required parameters :
+    *
+    * @param input_image (TePDITypes::TePDIRasterPtrType),
+    * @param euc_treshold (double) - euclidian distance treshold value.
+    * @param area_min (int) - cell pixel size min value.
+    *
+    * @note The following parameters are optional and will be used if present.
+    *
+    * @param restriction_image (TePDITypes::TePDIRasterPtrType) - Restriction (mask) image
+    * ( restriction image pixels with value zero will not be inside 
+    * any segments generated from the input_image, they will be ignored ). 
+    * @param output_polsets ( TePDITypes::TePDIPolSetMapPtrType ) - 
+    * The user supplied output polygon sets map where the generated polygons 
+    * will be stored (each polygon set contains polygons related to the
+    * same pixel value).   
+    * @param output_image (TePDITypes::TePDIRasterPtrType),
+    *       pointer to a Labelled image containing the final
+    *       segmentation. Each pixel contains the cell id
+    *       number to which it belongs. This image must have TeUNSIGNEDLONG 
+    *       data type.
+    */
+  class PDI_DLL TePDIRegGrowSeg : public TePDIAlgorithm {
+    public :
+      
+      /**
+       * @brief Default Constructor.
+       *
+       */
+      TePDIRegGrowSeg();
+
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIRegGrowSeg();
+      
+      /**
+       * @brief Checks if the supplied parameters fits the requirements of 
+       * each PDI algorithm implementation.
+       *
+       * @note Error log messages must be generated. No exceptions generated.
+       *
+       * @param parameters The parameters to be checked.
+       * @return true if the parameters are OK. false if not.
+       */
+      bool CheckParameters( const TePDIParameters& parameters ) const;      
+
+    protected :
+    
+      /** @brief Array of pointer to images (input images). */
+      TePDITypes::TePDIRasterPtrType  Imagein_;
+      
+      /** @brief Pointer to the output image. */
+      TePDITypes::TePDIRasterPtrType  Imagelab_;
+      
+      /** @brief Pointer to the image containing restrictions */
+      TePDITypes::TePDIRasterPtrType  Imageexc_;
+      
+      /** @brief Pointer to the list of cells. */
+      TePDIRGSCellList        *ListCell_;
+      
+      /** @brief Array of cells for a subimage. */
+      TePDIRGSCell            **WindowCell_;
+      
+      /** @brief Number of cells which have been removed from ListCell due to distance criteria*/
+      long            OnLimbo_;
+      
+      /** @brief tuple of pixel (auxiliar). */
+      unsigned long   *tuple_;
+      
+      /** @brief Number of subimages in the image. */
+      long            NWindow_;
+      
+      /** @brief Number of subimages along the lines of image */
+      long            WindowLines_;
+      
+      /** @brief Number of subimages along the columns of image */
+      long            WindowColumns_;
+      
+      /** @brief Current subimage. */
+      long            CurrentWindow_;
+      
+      /** @brief Id number of the first cell in the subimage. */
+      long            WindowOffset_;
+      
+      /** @brief Minimum area allowed to the final cells. */
+      int             Areamin_;
+      
+      /** @brief Minimum euclidian distance between final cells. */
+      double          Difsim_;
+      
+      /** @brief Number of lines in Imagelab. */
+      int             Nlin_;
+      
+      /** @brief Number of colums in Imagelab. */
+      int             Ncol_;
+      
+      /** @brief Number of bands in Imagein */
+      int             Nban_;
+      
+      /** @brief auxiliar variables */
+      int             ilin_;
+       
+      /** @brief auxiliar variables */
+      int flin_;
+      
+      /** @brief auxiliar variables */
+      int             icol_;
+      
+      /** @brief auxiliar variables */
+      int fcol_;
+      
+      /** @brief auxiliar variables */
+      int             sizelin_;
+       
+      /** @brief auxiliar variables */
+      int sizecol_;    
+      
+      /** @brief Cell stack */
+      CellStack cellStack;
+    
+      /**
+       * @brief Reset the internal state to the initial state.
+       *
+       * @param params The new parameters referente at initial state.
+       */
+      void ResetState( const TePDIParameters& params );    
+     
+      /**
+       * @brief Runs the current algorithm implementation.
+       *
+       * @return true if OK. false on error.
+       */
+      bool RunImplementation();
+      
+      /**
+      * @brief Merges two cells
+      *
+      * @param c1 pointer to a cell to be merged
+      * @param c2 pointer to a cell to be merged
+      * @return pointer to cell resulting from merging..
+      */
+      TePDIRGSCell* MergeCells( TePDIRGSCell *c1, TePDIRGSCell *c2 );
+  
+      /**
+      * @brief Initializes a window over a image
+      *
+      * @return true if OK. false on error.
+      */
+          bool InitWindow();
+  
+      /**
+      * @brief Remove dead cells from list of cells.
+      */
+      void Adjust();
+  
+      /**
+      * @brief Eliminates all cells with area smaller than argument area.
+      * The cells with area smaller than argument area are merged with its
+      * nearest neighbour cell.
+      *
+      * @param area size in pixels which defines de area treshold for merging.
+      * @param linmax lin max of the image to consider
+      * @return true if OK. false on error.
+      */
+      bool MergeSmallCells( long area, int linmax);
+  
+      /**
+      * @brief Merges all pairs of neighbouring cells with euclidian distance
+      * bellow a threshold.
+      * The pair of cells say, c1 and c2 must satisfy the criteria:
+      *              1 - c1 = closestneighbour( c2 ) or c2 = closestneighbour( c1 ).
+      *              2 - dist( c1, c2) < threshold >
+      *
+      * @return true if OK. false on error.
+      */
+      bool MergeSimilarCells();
+  
+      /**
+      * @brief Merges all pairs of neighbouring cells with euclidian distance
+      * bellow a threshold.
+      * The pair of cells say, c1 and c2 must satisfy the criteria:
+      *              1 - c1 = closestneighbour( c2 ) or c2 = closestneighbour( c1 ).
+      *              2 - dist( c1, c2) < threshold >
+      *
+      * @return true if OK. false on error.
+      */
+      bool MergeMutuallyClosestCells();
+  
+      /**
+      * @brief Updates ImageLab by writing the cell id number for
+      * every pixel belonging to the cell.
+      *
+      * @return true if OK. false on error.
+      */
+      bool Resort();      
+  };
+  
+/** @example TePDISegmentation_test.cpp
+ *    Shows how to use this class.
+ */    
+
+#endif
diff --git a/src/terralib/image_processing/TePDIRegGrowSegFactory.cpp b/src/terralib/image_processing/TePDIRegGrowSegFactory.cpp
new file mode 100644
index 0000000..f8fd68f
--- /dev/null
+++ b/src/terralib/image_processing/TePDIRegGrowSegFactory.cpp
@@ -0,0 +1,26 @@
+ 
+#include "TePDIRegGrowSegFactory.hpp"
+#include "TePDIRegGrowSeg.hpp"
+#include <TeAgnostic.h>
+
+
+TePDIRegGrowSegFactory::TePDIRegGrowSegFactory()
+: TePDIAlgorithmFactory( std::string( "TePDIRegGrowSeg" ) )
+{
+}
+
+
+TePDIRegGrowSegFactory::~TePDIRegGrowSegFactory()
+{
+}
+
+
+TePDIAlgorithm* TePDIRegGrowSegFactory::build ( const TePDIParameters& arg )
+{
+  TePDIAlgorithm* instance_ptr = new TePDIRegGrowSeg();
+  
+  TEAGN_TRUE_OR_THROW( instance_ptr->Reset( arg ),
+    "Invalid parameters" );
+  
+  return instance_ptr;
+}
diff --git a/src/terralib/image_processing/TePDIRegGrowSegFactory.hpp b/src/terralib/image_processing/TePDIRegGrowSegFactory.hpp
new file mode 100644
index 0000000..0893666
--- /dev/null
+++ b/src/terralib/image_processing/TePDIRegGrowSegFactory.hpp
@@ -0,0 +1,68 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIREGGROWSEGFACTORY_HPP
+  #define TEPDIREGGROWSEGFACTORY_HPP
+
+  #include <TeSharedPtr.h>
+  #include "TePDIAlgorithmFactory.hpp"
+  #include "TePDIParameters.hpp"
+  
+  /**
+   * @brief This is the class for region growing segmentation algorithm factory.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIAlgorithmsFactories
+   */
+  class PDI_DLL TePDIRegGrowSegFactory : public TePDIAlgorithmFactory
+  {
+    public :
+      
+      /**
+       * @brief Default constructor
+       */
+      TePDIRegGrowSegFactory();      
+      
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIRegGrowSegFactory();
+      
+    protected :  
+      
+      /**
+       * @brief Implementation for the abstract TeFactory::build.
+       *
+       * @param arg A const reference to the parameters used by the
+       * algorithm.
+       * @return A pointer to the new generated algorithm instance.
+       */
+      TePDIAlgorithm* build( const TePDIParameters& arg );
+      
+  };
+
+  namespace {
+    static TePDIRegGrowSegFactory TePDIRegGrowSegFactory_instance;
+  };  
+  
+#endif
diff --git a/src/terralib/image_processing/TePDIRegion.cpp b/src/terralib/image_processing/TePDIRegion.cpp
new file mode 100644
index 0000000..0f3f084
--- /dev/null
+++ b/src/terralib/image_processing/TePDIRegion.cpp
@@ -0,0 +1,43 @@
+#include "TePDIRegion.hpp"
+#include <iostream>
+
+using namespace std;
+
+TePDIRegion::~TePDIRegion()
+{
+}
+
+// bool TePDIRegion::Init(int n, long a, TePDIStatistic s)
+bool TePDIRegion::Init(int n, long a, vector<double> m, TeMatrix c)
+{
+  // sets the number of bands
+  TEAGN_TRUE_OR_RETURN(n > 0, "Invalid number of bands");
+  nbands = n;
+  // sets the area
+  npix = a;
+  // sets the mean vector
+  mean = m;
+  // sets the covariance matrix
+  covariance = c;
+
+  return true;
+};
+
+// Returns the mean value.
+double TePDIRegion::Mean(int ind)
+{
+  TEAGN_TRUE_OR_RETURN((ind >= 0 && ind < nbands), "Invalid index in Mean Vector")
+  return mean[ind];
+}
+
+// Returns the covarariance value.
+double TePDIRegion::Covar(int i, int j)
+{
+  TEAGN_TRUE_OR_RETURN((i >= 0 && i < nbands) && (j >= 0 && j < nbands), "Invalid index in Covariance Matrix")
+  return covariance(i, j);
+}
+
+vector<double> TePDIRegion::GetMean()
+{
+  return mean;
+}
diff --git a/src/terralib/image_processing/TePDIRegion.hpp b/src/terralib/image_processing/TePDIRegion.hpp
new file mode 100644
index 0000000..64bf18a
--- /dev/null
+++ b/src/terralib/image_processing/TePDIRegion.hpp
@@ -0,0 +1,172 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIREGION_HPP
+  #define TEPDIREGION_HPP
+
+#include <vector>
+#include <iostream>
+#include <TeMatrix.h>
+#include <TePDIStatistic.hpp>
+#include "TePDIEspecData.hpp"
+#include <TeAgnostic.h>
+
+using namespace std;
+
+  /**
+   * @brief This is the class for dealing with image regions.
+   * @author Thales Sehn Korting <tkorting at dpi.inpe.br>
+   *
+   */
+
+class PDI_DLL TePDIRegion
+{
+  private:
+    /**
+    * @brief identifier
+    */
+    long id;
+
+    /**
+    * @brief area
+    */
+    long npix;
+
+    /**
+    * @brief class of region
+    */
+    int region_class;
+
+    /**
+    * @brief number of bands
+    */
+    int nbands;
+
+    /**
+    * @brief mean of the pixel values
+    */
+    vector<double> mean;
+
+    /**
+    * @brief statistics of region
+    */
+    TeMatrix covariance;
+
+  public:
+    /**
+    * Default Constructor.
+    *
+    * @param id_region The ID of the region
+    */
+    TePDIRegion(long id_region)
+    { SetId(id_region); nbands = npix = region_class = 0; }
+
+    /**
+    * Default Destructor.
+    */
+    ~TePDIRegion();
+
+    /**
+    * Initializes Region
+    *
+    * @param n number of bands
+    * @param a the area
+    * @param m mean vector
+    * @param c covariance matrix
+    */
+    bool Init(int n, long a, vector<double> m, TeMatrix c);
+
+    /**
+    * Sets the region idtity.
+    *
+    * @param id_region The ID of the region
+    */
+    void SetId(long id_region)
+    { id = id_region; }
+
+    /**
+    * Gets the ID
+    */
+    long GetId()
+    { return id; }
+
+    /**
+    * Get the number of bands.
+    */
+    int GetNban()
+    { return nbands; }
+
+    /**
+    * Set the class.
+    *
+    * @param clas The class of the Region
+    */
+    void SetClass(int clas)
+    { region_class = clas; }
+
+    /**
+    * Get the class.
+    */
+    int GetClass()
+    { return region_class; }
+
+    /**
+    * Returns the mean value
+    *
+    * @param ind The mean of band 'ind'
+    */
+    double Mean(int ind);
+
+    /**
+    * Returns all the means
+    */
+    vector<double> GetMean();
+
+    /**
+    * Returns the covariance value at position (i, j)
+    */
+    double Covar(int i, int j);
+
+    /**
+    * Returns the covariance matrix
+    */
+    TeMatrix GetCovar()
+    { return covariance; }
+
+    /**
+    * Sets the area of the region
+    *
+    * @param a The new area
+    */
+    void SetArea(long a)
+    { npix = a; }
+
+    /**
+    * Returns the area of the region
+    */
+    long GetArea()
+    { return npix; }
+};
+
+#endif
diff --git a/src/terralib/image_processing/TePDIRegister.cpp b/src/terralib/image_processing/TePDIRegister.cpp
new file mode 100755
index 0000000..f933b86
--- /dev/null
+++ b/src/terralib/image_processing/TePDIRegister.cpp
@@ -0,0 +1,330 @@
+#include "TePDIRegister.hpp"
+#include <TeAgnostic.h>
+#include <TePDITypes.hpp>
+#include <TePDIUtils.hpp>
+
+#include <TeGTFactory.h>
+#include <TeDefines.h>
+#include <TeUtils.h>
+
+#include <string>
+
+#include <math.h>
+#include <float.h>
+
+TePDIRegister::TePDIRegister()
+{
+}
+
+
+TePDIRegister::~TePDIRegister()
+{
+}
+
+
+void TePDIRegister::ResetState( const TePDIParameters& )
+{
+}
+
+
+bool TePDIRegister::CheckParameters( const TePDIParameters& parameters ) const
+{
+  /* Checking adjust_raster */
+    
+  TePDITypes::TePDIRasterPtrType adjust_raster;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "adjust_raster", 
+    adjust_raster ),
+    "Missing parameter: adjust_raster" );
+  TEAGN_TRUE_OR_RETURN( adjust_raster.isActive(),
+    "Invalid parameter: adjust_raster inactive" );
+  TEAGN_TRUE_OR_RETURN( adjust_raster->params().status_ != 
+    TeRasterParams::TeNotReady, 
+    "Invalid parameter: adjust_raster not ready" );
+    
+  /* adjust_channels parameter checking */
+
+  std::vector< int > adjust_channels;
+  TEAGN_TRUE_OR_RETURN( 
+    parameters.GetParameter( "adjust_channels", adjust_channels ), 
+    "Missing parameter: adjust_channels" );
+  for( unsigned int adjust_channels_index = 0 ; 
+    adjust_channels_index < adjust_channels.size() ; 
+    ++adjust_channels_index ) {
+    
+    TEAGN_TRUE_OR_RETURN(
+      ( adjust_channels[ adjust_channels_index ] < adjust_raster->nBands() ),
+      "Invalid parameter: channels" );
+  }
+    
+  /* Checking output_raster */
+    
+  TePDITypes::TePDIRasterPtrType output_raster;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "output_raster", 
+    output_raster ),
+    "Missing parameter: output_raster" );
+  TEAGN_TRUE_OR_RETURN( output_raster.isActive(),
+    "Invalid parameter: output_raster inactive" );
+  TEAGN_TRUE_OR_RETURN( output_raster->params().status_ != 
+    TeRasterParams::TeNotReady, 
+    "Invalid parameter: output_raster not ready" );    
+    
+  /* Checking the geometric transformation */
+    
+  std::string gt_name;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "gt_name", 
+    gt_name ), "Missing parameter: gt_name" );
+    
+  TeGTFactory::TeFactoryMap::iterator gt_it = 
+    TeGTFactory::instance().find( gt_name );  
+  TEAGN_TRUE_OR_RETURN( ( gt_it != TeGTFactory::instance().end() ),
+     "Invalid parameter: gt_name" );    
+    
+  TeGTParams gt_params;
+  gt_params.transformation_name_ = gt_name;          
+  TeSharedPtr< TeGeometricTransformation > geotransf_ptr( 
+    TeGTFactory::make( gt_params ) );
+  TEAGN_TRUE_OR_THROW( geotransf_ptr.isActive(),
+     "Geometric transformation factory product instatiation error" );
+     
+  /* Checking tie points */
+  
+  unsigned int adjust_raster_lines = 
+    (unsigned int)adjust_raster->params().nlines_;
+  unsigned int adjust_raster_cols = 
+    (unsigned int)adjust_raster->params().ncols_;
+
+  TePDITypes::TeCoordPairVectPtrType tie_points;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "tie_points", 
+    tie_points ), "Missing parameter: tie_points" );
+  TEAGN_TRUE_OR_RETURN( 
+    ( tie_points->size() >= geotransf_ptr->getMinRequiredTiePoints() ),
+    "Invalid parameter: insufficient tie_points for the required "
+    "transformation" );
+    
+  for( unsigned int tie_points_index = 0 ; 
+    tie_points_index < tie_points->size() ; ++ tie_points_index ) {
+    
+    TEAGN_TRUE_OR_RETURN( 
+      ( (*tie_points)[ tie_points_index ].pt1.x() >= ( -0.5 ) ) &&
+      ( (*tie_points)[ tie_points_index ].pt1.x() <= 
+        ( ( (double)( adjust_raster_cols ) ) - 0.5 ) ) &&
+      ( (*tie_points)[ tie_points_index ].pt1.y() >= ( -0.5 ) ) &&
+      ( (*tie_points)[ tie_points_index ].pt1.y() <= 
+        ( ( (double)( adjust_raster_lines  ) - 0.5 ) ) ),
+      "Invalid parameter: tie_points - pt1 coords out of range" );
+  }
+    
+  /* Checking the interpolator method */
+  
+  TePDIInterpolator::InterpMethod interpolator;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "interpolator", 
+    interpolator ), "Missing parameter: interpolator" );  
+  
+  TePDIInterpolator interp;
+  TEAGN_TRUE_OR_RETURN( interp.reset( adjust_raster, 
+    (TePDIInterpolator::InterpMethod)interpolator, 0 ), 
+    "Invalid parameter: interpolator" );
+    
+  /* Checking proj_params parameter */
+  
+  TePDITypes::TeProjParamsPtrType proj_params;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "proj_params", proj_params ),
+    "Missing paramter : proj_params" );
+    
+  TeSharedPtr< TeProjection > proj_ptr( TeProjectionFactory::make( 
+    *proj_params ) );
+  TEAGN_TRUE_OR_THROW( proj_ptr.isActive(), 
+    "Invalid parameter : proj_params" );
+    
+  /* Checking res_x and res_y */
+  
+  double res_x = 0;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "res_x", res_x ),
+    "Missing parameter : res_x" );
+
+  double res_y = 0;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "res_y", res_y ),
+    "Missing parameter : res_y" );
+        
+  return true;
+}
+
+
+bool TePDIRegister::RunImplementation()
+{
+  /* Retriving parameters */
+  
+  TePDITypes::TeProjParamsPtrType proj_params;
+  params_.GetParameter( "proj_params", proj_params );
+  
+  double res_x = 0;
+  params_.GetParameter( "res_x", res_x );
+
+  double res_y = 0;
+  params_.GetParameter( "res_y", res_y );
+    
+  TePDITypes::TePDIRasterPtrType adjust_raster;
+  params_.GetParameter( "adjust_raster", adjust_raster );
+  
+  TePDITypes::TePDIRasterPtrType output_raster;
+  params_.GetParameter( "output_raster", output_raster );
+  
+  std::string gt_name;
+  params_.GetParameter( "gt_name", gt_name );
+  
+  TePDITypes::TeCoordPairVectPtrType tie_points;
+  params_.GetParameter( "tie_points", tie_points );
+  
+  double dummy_value = 0;
+  bool use_dummy = false;
+  if( params_.CheckParameter< double >( "dummy_value" ) ) {
+    
+    params_.GetParameter( "dummy_value", dummy_value );
+    use_dummy = true;
+  } else {
+    if( adjust_raster->params().useDummy_ ) {
+      dummy_value = adjust_raster->params().dummy_[ 0 ];
+      use_dummy = true;
+    }
+  }
+  
+  std::vector< int > adjust_channels;
+  params_.GetParameter( "adjust_channels", adjust_channels );
+  
+  /* Instantiating the interpolator */
+  
+  TePDIInterpolator::InterpMethod interpolator;
+  params_.GetParameter( "interpolator", interpolator );
+  
+  TePDIInterpolator interp;
+  TEAGN_TRUE_OR_RETURN( interp.reset( adjust_raster, 
+    (TePDIInterpolator::InterpMethod)interpolator, dummy_value ),
+    "Interpolator reset error" );
+    
+  /* Instantiating the geometric transformation mapping adjust raster indexes
+     to projected space coordinates */
+  
+  TeGTParams gt_params;
+  gt_params.transformation_name_ = gt_name;
+  gt_params.tiepoints_ = *tie_points;
+  TeSharedPtr< TeGeometricTransformation > geotransf_ptr( 
+    TeGTFactory::make( gt_params ) );
+  TEAGN_TRUE_OR_THROW( geotransf_ptr->reset( gt_params ),
+    "Unable to generate the geometric transformation" );
+    
+  /* Guessing the output raster geometry */
+  
+  TePolygon adjust_raster_detailed_box_wi;/* world indexes */
+  TePolygon adjust_raster_detailed_box_mi;/* matricial indexes */
+  TEAGN_TRUE_OR_RETURN( TePDIUtils::buildDetailedBox( adjust_raster, 
+    adjust_raster_detailed_box_wi ), 
+    "Unable to build detailed box from adjust raster" );
+  TePDIUtils::MapCoords2RasterIndexes( adjust_raster_detailed_box_wi, 
+    adjust_raster, adjust_raster_detailed_box_mi );
+    
+  TeCoord2D transformed_point;
+  double min_x = DBL_MAX;
+  double min_y = DBL_MAX;
+  double max_x = ( -1.0 ) * DBL_MAX;
+  double max_y = ( -1.0 ) * DBL_MAX;
+  
+  for( unsigned int ardb_index = 0 ; 
+    ardb_index < adjust_raster_detailed_box_mi[ 0 ].size() ;
+    ++ardb_index ) {
+            
+    geotransf_ptr->directMap( 
+      adjust_raster_detailed_box_mi[ 0 ][ ardb_index ],
+      transformed_point );
+      
+    if( transformed_point.x() < min_x ) {
+      min_x = transformed_point.x();
+    }
+    if( transformed_point.y() < min_y ) {
+      min_y = transformed_point.y();
+    }
+    if( transformed_point.x() > max_x ) {
+      max_x = transformed_point.x();
+    }
+    if( transformed_point.y() > max_y ) {
+      max_y = transformed_point.y();
+    }
+  }
+  
+  TeSharedPtr< TeProjection > proj_ptr( TeProjectionFactory::make( 
+    *proj_params ) );
+  TEAGN_TRUE_OR_THROW( proj_ptr.isActive(), 
+    "Projection factory instatiation error" );
+  
+  TeRasterParams output_raster_params = output_raster->params();
+  output_raster_params.nBands( adjust_channels.size() );
+  output_raster_params.projection( proj_ptr.nakedPointer() );
+  if( use_dummy )
+  {
+    output_raster_params.setDummy( dummy_value, -1 );
+  }
+  else
+  {
+    output_raster_params.useDummy_ = false;
+  }
+
+  TeCoord2D output_raster_box_ll( min_x, min_y );
+  TeCoord2D output_raster_box_ur( max_x, max_y );
+  
+  output_raster_params.boxResolution( output_raster_box_ll.x(), 
+    output_raster_box_ll.y(), output_raster_box_ur.x(), 
+    output_raster_box_ur.y(), res_x, res_y );
+    
+  TEAGN_TRUE_OR_RETURN( output_raster->init( output_raster_params ),
+    "output_raster init error" );
+    
+  /* Rendering output raster */
+  
+  TeGeometricTransformation& geotransf = *geotransf_ptr;
+  TeRaster& output_raster_ref = *output_raster;
+  unsigned int output_raster_lines = output_raster_ref.params().nlines_;
+  unsigned int output_raster_cols = output_raster_ref.params().ncols_;
+  unsigned int line = 0;
+  unsigned int col = 0;
+  TeCoord2D output_raster_pt_mi; /* matricial indexes */
+  TeCoord2D output_raster_pt_pi; /* projected indexes */
+  TeCoord2D adjust_raster_pt_mi;
+  double interpolated_value = 0;
+  
+  StartProgInt( "Rendering output", adjust_channels.size() * 
+    output_raster_lines );  
+  
+  for( unsigned int adjust_channels_index = 0 ; 
+    adjust_channels_index < adjust_channels.size() ; 
+    ++adjust_channels_index ) {
+    
+    unsigned int adjust_channel = 
+      (unsigned int)adjust_channels[ adjust_channels_index ];
+    
+    for( line = 0 ; line < output_raster_lines ; ++line ) {
+      for( col = 0 ; col < output_raster_cols ; ++col ) {
+        output_raster_pt_mi.setXY( (double)col, (double)line );
+        output_raster_pt_pi = output_raster_ref.index2Coord( 
+          output_raster_pt_mi );
+        
+        geotransf.inverseMap( output_raster_pt_pi, adjust_raster_pt_mi );
+      
+        interp.interpolate( adjust_raster_pt_mi.y(), adjust_raster_pt_mi.x(),
+          adjust_channel, interpolated_value );
+      
+        TEAGN_TRUE_OR_RETURN( 
+          output_raster_ref.setElement( 
+          col, line, interpolated_value, adjust_channels_index ), 
+          "output_raster write error at line=" +
+          Te2String( line ) + " col=" + Te2String( col ) + " channel=" +
+          Te2String( adjust_channels_index ) );
+      }
+      
+      TEAGN_FALSE_OR_RETURN( IncProgInt(), "Canceled by the user" );
+    }
+  }
+  
+  StopProgInt();
+  
+  return true;
+}
+
diff --git a/src/terralib/image_processing/TePDIRegister.hpp b/src/terralib/image_processing/TePDIRegister.hpp
new file mode 100755
index 0000000..38188bb
--- /dev/null
+++ b/src/terralib/image_processing/TePDIRegister.hpp
@@ -0,0 +1,111 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIREGISTER_HPP
+  #define TEPDIREGISTER_HPP
+
+  #include <TePDIAlgorithm.hpp>
+  #include <TePDIParameters.hpp>
+  #include <TeSharedPtr.h>
+  #include <TePDIInterpolator.hpp>
+
+  /**
+   * @brief This is the class for digital image registering.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup TePDIGeneralAlgoGroup
+   *
+   * @note The general required parameters:
+   *
+   * @param proj_params ( TePDITypes::TeProjParamsPtrType ) - The 
+   * output projection parameters.
+   * @param res_x ( double ) - X Axis output resolution.
+   * @param res_y ( double ) - Y Axis output resolution.
+   * @param adjust_raster ( TePDITypes::TePDIRasterPtrType ) - The 
+   * input raster that needs to be registered.
+   * @param output_raster ( TePDITypes::TePDIRasterPtrType ) - The 
+   * output raster.
+   * @param tie_points ( TePDITypes::TeCoordPairVectPtrType ) -
+   * The input tie-points where TeCoordPair.pt1 are adjust_rater matricial
+   * indexes (They must be inside the respective raster to be valid) and
+   * TeCoordPair.pt2 are the respective projected coordinates.
+   * @param gt_name ( std::string ) - Geometric transformation name ( see
+   * TeGTFactory documentation for reference ).
+   * @param interpolator ( TePDIInterpolator::InterpMethod ) - Interpolator
+   * method to use when rendering output_raster ( For rasters with
+   * internal palletes only TePDIInterpolator::NNMethod can be used ).
+   * @param adjust_channels (std::vector<int>) - Band(s) to process from
+   * adjust_raster.
+   *
+   * @note The optional parameters are:
+   *
+   * @param dummy_value (double) - A dummy pixel value for use 
+   * in pixels where no data is available.  
+   */
+  class PDI_DLL TePDIRegister : public TePDIAlgorithm {
+    public :
+      
+      /**
+       * @brief Default Constructor.
+       *
+       */
+      TePDIRegister();
+
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIRegister();
+      
+      /**
+       * @brief Checks if the supplied parameters fits the requirements of each
+       * PDI algorithm implementation.
+       *
+       * @note Error log messages must be generated. No exceptions generated.
+       *
+       * @param parameters The parameters to be checked.
+       * @return true if the parameters are OK. false if not.
+       */
+      bool CheckParameters( const TePDIParameters& parameters ) const;      
+
+    protected :
+    
+      /**
+       * @brief Reset the internal state to the initial state.
+       *
+       * @param params The new parameters referente at initial state.
+       */
+      void ResetState( const TePDIParameters& params );    
+     
+      /**
+       * @brief Runs the current algorithm implementation.
+       *
+       * @return true if OK. false on error.
+       */
+      bool RunImplementation();      
+  };
+  
+/** @example TePDIRegister_test.cpp
+ *    Shows how to use this class.
+ */    
+
+#endif
diff --git a/src/terralib/image_processing/TePDIRegisterFactory.cpp b/src/terralib/image_processing/TePDIRegisterFactory.cpp
new file mode 100755
index 0000000..a83ffc0
--- /dev/null
+++ b/src/terralib/image_processing/TePDIRegisterFactory.cpp
@@ -0,0 +1,26 @@
+ 
+#include "TePDIRegisterFactory.hpp"
+#include "TePDIRegister.hpp"
+#include <TeAgnostic.h>
+
+
+TePDIRegisterFactory::TePDIRegisterFactory()
+: TePDIAlgorithmFactory( std::string( "TePDIRegister" ) )
+{
+};      
+
+
+TePDIRegisterFactory::~TePDIRegisterFactory()
+{
+};
+
+
+TePDIAlgorithm* TePDIRegisterFactory::build ( const TePDIParameters& arg )
+{
+  TePDIAlgorithm* instance_ptr = new TePDIRegister();
+  
+  TEAGN_TRUE_OR_THROW( instance_ptr->Reset( arg ),
+    "Invalid parameters" );
+  
+  return instance_ptr;
+}
diff --git a/src/terralib/image_processing/TePDIRegisterFactory.hpp b/src/terralib/image_processing/TePDIRegisterFactory.hpp
new file mode 100755
index 0000000..151acba
--- /dev/null
+++ b/src/terralib/image_processing/TePDIRegisterFactory.hpp
@@ -0,0 +1,68 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIREGISTERFACTORY_HPP
+  #define TEPDIREGISTERFACTORY_HPP
+
+  #include <TeSharedPtr.h>
+  #include "TePDIAlgorithmFactory.hpp"
+  #include "TePDIParameters.hpp"
+  
+  /**
+   * @brief This is the class for image registering algorithms factory.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIAlgorithmsFactories
+   */
+  class PDI_DLL TePDIRegisterFactory : public TePDIAlgorithmFactory
+  {
+    public :
+      
+      /**
+       * @brief Default constructor
+       */
+      TePDIRegisterFactory();      
+      
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIRegisterFactory();
+      
+    protected :  
+      
+      /**
+       * @brief Implementation for the abstract TeFactory::build.
+       *
+       * @param arg A const reference to the parameters used by the
+       * algorithm.
+       * @return A pointer to the new generated algorithm instance.
+       */
+      TePDIAlgorithm* build( const TePDIParameters& arg );
+      
+  };
+
+  namespace {
+    static TePDIRegisterFactory TePDIRegisterFactory_instance;
+  };  
+  
+#endif
diff --git a/src/terralib/image_processing/TePDIRgbPalette.cpp b/src/terralib/image_processing/TePDIRgbPalette.cpp
new file mode 100755
index 0000000..937cfd7
--- /dev/null
+++ b/src/terralib/image_processing/TePDIRgbPalette.cpp
@@ -0,0 +1,12 @@
+#include "TePDIRgbPalette.hpp"
+
+
+TePDIRgbPalette::TePDIRgbPalette()
+{
+}
+
+
+TePDIRgbPalette::~TePDIRgbPalette()
+{
+}
+
diff --git a/src/terralib/image_processing/TePDIRgbPalette.hpp b/src/terralib/image_processing/TePDIRgbPalette.hpp
new file mode 100755
index 0000000..f696d66
--- /dev/null
+++ b/src/terralib/image_processing/TePDIRgbPalette.hpp
@@ -0,0 +1,66 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIRGBPALETTE_HPP
+  #define TEPDIRGBPALETTE_HPP
+
+  #include "TePDIRgbPaletteNode.hpp"
+  
+  #include <TeSharedPtr.h>
+
+  #include <map>
+
+  /**
+   * @brief This is the class for RGB Palettes.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIAux
+   */  
+  class PDI_DLL TePDIRgbPalette : public std::map< double, TePDIRgbPaletteNode >
+  {
+    public :
+      /** @typedef TeSharedPtr< TePDIRgbPalette > pointer 
+          Type definition for a instance pointer */
+      typedef TeSharedPtr< TePDIRgbPalette > pointer;
+      
+      /** @typedef const TeSharedPtr< TePDIRgbPalette > const_pointer 
+        Type definition for a const instance pointer */
+      typedef const TeSharedPtr< TePDIRgbPalette > const_pointer;
+
+      /**
+       * @brief Default Constructor
+       *
+       */
+      TePDIRgbPalette();
+
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIRgbPalette();
+  };
+  
+/** @example TePDIRgbPalette_test.cpp
+ *    Shows how to use this class.
+ */    
+
+#endif //TEPDIRGBPALETTE_HPP
diff --git a/src/terralib/image_processing/TePDIRgbPaletteFunctions.cpp b/src/terralib/image_processing/TePDIRgbPaletteFunctions.cpp
new file mode 100755
index 0000000..6d6b6cc
--- /dev/null
+++ b/src/terralib/image_processing/TePDIRgbPaletteFunctions.cpp
@@ -0,0 +1,57 @@
+#include "TePDIRgbPaletteFunctions.hpp"
+
+#include <TeAgnostic.h>
+
+#include <TeUtils.h>
+
+#include <math.h>
+
+namespace TePDIRgbPaletteFunctions
+{
+
+  TePDIRgbPalette::pointer createLSBPalette( unsigned int levels )
+  {
+    TEAGN_TRUE_OR_THROW( levels > 0, "Invalid supplied Levels" );
+  
+    unsigned int channel_levels =
+      (unsigned int) ceil( TeCubicRoot( (double)levels ) );
+  
+    unsigned int channel_step =
+      (unsigned int) floor( 256. / (float)(channel_levels + 1) );
+  
+    TePDIRgbPalette::pointer outPal( new TePDIRgbPalette );
+  
+    unsigned int level = 0;
+    
+    TePDIRgbPaletteNode temp_node;
+  
+    while( level < levels ) {
+      if( temp_node.red_ > 255 ) {
+        temp_node.red_ = temp_node.red_ % 255;
+  
+        temp_node.green_ += channel_step;
+  
+        if( temp_node.green_ > 255 ) {
+          temp_node.green_ = temp_node.green_ % 255;
+  
+          temp_node.blue_ += channel_step;
+  
+          if( temp_node.blue_ > 255 ) {
+            temp_node.blue_ = temp_node.blue_ % 255;
+          }
+        }
+      }
+      
+      (*outPal)[ level ] = temp_node;
+  
+      temp_node.red_ += channel_step;
+  
+      ++level;
+    }
+  
+    return outPal;
+  }
+  
+};
+
+
diff --git a/src/terralib/image_processing/TePDIRgbPaletteFunctions.hpp b/src/terralib/image_processing/TePDIRgbPaletteFunctions.hpp
new file mode 100755
index 0000000..99ab311
--- /dev/null
+++ b/src/terralib/image_processing/TePDIRgbPaletteFunctions.hpp
@@ -0,0 +1,45 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIRGBPALETTEFUNCTIONS_HPP
+  #define TEPDIRGBPALETTEFUNCTIONS_HPP
+
+  #include <TePDIRgbPalette.hpp>
+  
+  /**
+   * @brief This namespace contains TePDIRgbPalette related methods.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   */  
+  namespace TePDIRgbPaletteFunctions
+  {
+    /**
+     * @brief Creates a level step based Palette creation.
+     *
+     * @param levels The number of levels.
+     * @return The generated palette.
+    */
+    PDI_DLL TePDIRgbPalette::pointer createLSBPalette( unsigned int levels );
+  };
+
+#endif //TEPDIRGBPALETTE_HPP
diff --git a/src/terralib/image_processing/TePDIRgbPaletteNode.hpp b/src/terralib/image_processing/TePDIRgbPaletteNode.hpp
new file mode 100755
index 0000000..9ef5f90
--- /dev/null
+++ b/src/terralib/image_processing/TePDIRgbPaletteNode.hpp
@@ -0,0 +1,94 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIRGBPALETTENODE_HPP
+  #define TEPDIRGBPALETTENODE_HPP
+
+  #include "TePDIDefines.hpp"
+  #include <TeSharedPtr.h>
+
+  /**
+   * @brief This is the class for RGB Palette Node.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIAux
+   */  
+  class PDI_DLL TePDIRgbPaletteNode {
+    public :
+      /** @typedef TeSharedPtr< TePDIRgbPaletteNode > pointer 
+        Type definition for a instance pointer */
+      typedef TeSharedPtr< TePDIRgbPaletteNode > pointer;
+      
+      /** @typedef const TeSharedPtr< TePDIRgbPaletteNode > const_pointer 
+        Type definition for a const instance pointer */
+      typedef const TeSharedPtr< TePDIRgbPaletteNode > const_pointer;
+      
+      /**
+       * @brief Red channel value.
+       *
+       */
+      unsigned int red_;
+
+      /**
+       * @brief Green channel value.
+       *
+       */
+      unsigned int green_;
+
+      /**
+       * @brief Blue channel value.
+       *
+       */
+      unsigned int blue_;
+            
+      
+      /**
+       * @brief Default Constructor
+       *
+       */
+      TePDIRgbPaletteNode()
+      {
+        red_ = green_ = blue_ = 0;
+      };
+
+      /**
+       * @brief Alternative Constructor
+       *
+       */
+      TePDIRgbPaletteNode( unsigned int red, unsigned int green,
+        unsigned int blue )
+      {
+        red_ = red;
+        green_ = green;
+        blue_ = blue;
+      };
+            
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIRgbPaletteNode()
+      {};
+
+  };
+  
+#endif
diff --git a/src/terralib/image_processing/TePDISensorSimulator.cpp b/src/terralib/image_processing/TePDISensorSimulator.cpp
new file mode 100644
index 0000000..a4dd4bd
--- /dev/null
+++ b/src/terralib/image_processing/TePDISensorSimulator.cpp
@@ -0,0 +1,259 @@
+#include "TePDISensorSimulator.hpp"
+#include "TePDILinearFilter.hpp"
+#include "TePDITypes.hpp"
+#include "TePDIUtils.hpp"
+
+#include <string>
+
+#include <math.h>
+#include <float.h>
+
+//#include <string>
+
+//#include <math.h>
+//#include <float.h>
+
+
+TePDISensorSimulator::TePDISensorSimulator()
+{
+}
+
+
+TePDISensorSimulator::~TePDISensorSimulator()
+{
+}
+
+
+void TePDISensorSimulator::ResetState( const TePDIParameters& )
+{
+}
+
+
+bool TePDISensorSimulator::CheckParameters( const TePDIParameters& parameters ) const
+{
+  /* Checking input raster */
+
+  TePDITypes::TePDIRasterPtrType input_raster;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "input_raster", 
+    input_raster ),
+    "Missing parameter: input_raster" );
+  TEAGN_TRUE_OR_RETURN( input_raster.isActive(),
+    "Invalid parameter: input_raster inactive" );
+  TEAGN_TRUE_OR_RETURN( input_raster->params().status_ != 
+    TeRasterParams::TeNotReady, 
+    "Invalid parameter: input_raster not ready" );
+
+
+  /* Checking output_raster */
+
+    TePDITypes::TePDIRasterPtrType output_raster;
+    TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "output_raster", 
+      output_raster ),
+      "Missing parameter: output_raster" );
+    TEAGN_TRUE_OR_RETURN( output_raster.isActive(),
+      "Invalid parameter: output_raster inactive" );
+    TEAGN_TRUE_OR_RETURN( output_raster->params().status_ != 
+      TeRasterParams::TeNotReady, 
+      "Invalid parameter: output_raster not ready" );    
+
+
+  /* channels parameter checking */
+
+  std::vector< int > channels;
+  TEAGN_TRUE_OR_RETURN( 
+    parameters.GetParameter( "channels", channels ), 
+    "Missing parameter: channels" );
+  for( unsigned int channels_index = 0 ; 
+    channels_index < channels.size() ; 
+    ++channels_index ) {
+
+      TEAGN_TRUE_OR_RETURN(
+        ( channels[ channels_index ] < input_raster->nBands() ),
+        "Invalid parameter: channels" );
+    }
+
+    
+    /* ifov_in parameter checking */
+
+    double ifov_in;
+    if( ! parameters.GetParameter( "ifov_in", ifov_in ) ) {
+
+      TEAGN_LOGERR( "Missing parameter: ifov_in" );
+      return false;
+    }
+    TEAGN_TRUE_OR_RETURN( ifov_in > 0, "Invalid input ifov" );
+
+    /* eifov_in_across parameter checking */
+
+    double eifov_in_across;
+    if( ! parameters.GetParameter( "eifov_in_across", eifov_in_across ) ) {
+
+      TEAGN_LOGERR( "Missing parameter: eifov_in_across" );
+      return false;
+    }
+    TEAGN_TRUE_OR_RETURN( eifov_in_across > ifov_in, "Invalid input eifov across track" );
+
+    /* eifov_in_long parameter checking */
+
+    double eifov_in_long;
+    if( ! parameters.GetParameter( "eifov_in_long", eifov_in_long ) ) {
+
+      TEAGN_LOGERR( "Missing parameter: eifov_in_long" );
+      return false;
+    }
+    TEAGN_TRUE_OR_RETURN( eifov_in_long > ifov_in, "Invalid input eifov long track" );
+
+    /* ifov_out parameter checking */
+
+    double ifov_out;
+    if( ! parameters.GetParameter( "ifov_out", ifov_out ) ) {
+
+      TEAGN_LOGERR( "Missing parameter: ifov_out" );
+      return false;
+    }
+    TEAGN_TRUE_OR_RETURN( ifov_out > ifov_in, "Invalid output ifov" );
+
+    /* eifov_out_across parameter checking */
+
+    double eifov_out_across;
+    if( ! parameters.GetParameter( "eifov_out_across", eifov_out_across ) ) {
+
+      TEAGN_LOGERR( "Missing parameter: eifov_out_across" );
+      return false;
+    }
+    TEAGN_TRUE_OR_RETURN( eifov_out_across > ifov_out, "Invalid output eifov across track" );
+
+    /* eifov_out_long parameter checking */
+
+    double eifov_out_long;
+    if( ! parameters.GetParameter( "eifov_out_long", eifov_out_long ) ) {
+
+      TEAGN_LOGERR( "Missing parameter: eifov_out_long" );
+      return false;
+    }
+    TEAGN_TRUE_OR_RETURN( eifov_out_long > ifov_out, "Invalid output eifov long track" );
+
+    return true;
+}
+
+
+bool TePDISensorSimulator::RunImplementation()
+{
+  /* Retriving parameters */
+  
+  TePDITypes::TePDIRasterPtrType input_raster;
+  params_.GetParameter( "input_raster", input_raster );
+  
+  TePDITypes::TePDIRasterPtrType output_raster;
+  params_.GetParameter( "output_raster", output_raster );
+  
+  std::vector< int > channels;
+  params_.GetParameter( "channels", channels );
+  
+  double ifov_in;
+  params_.GetParameter( "ifov_in", ifov_in );
+
+  double eifov_in_across;
+  params_.GetParameter( "eifov_in_across", eifov_in_across );
+
+  double eifov_in_long;
+  params_.GetParameter( "eifov_in_long", eifov_in_long );
+
+  double ifov_out;
+  params_.GetParameter( "ifov_out", ifov_out );
+
+  double eifov_out_across;
+  params_.GetParameter( "eifov_out_across", eifov_out_across );
+
+  double eifov_out_long;
+  params_.GetParameter( "eifov_out_long", eifov_out_long );
+
+  /* calculating images parameters */
+
+  double sigma_in_across, sigma_in_long, sigma_out_across, sigma_out_long;
+  double varF1, varF2;
+  int n;
+  double alfa1, alfa2, a1, a2, b1, b2;
+
+  sigma_in_across = (1/TePI) * sqrt(2*log(2.0)) * eifov_in_across; //original sensor
+  sigma_in_long = (1/TePI) * sqrt(2*log(2.0)) * eifov_in_long;
+
+  sigma_out_across = (1/TePI) * sqrt(2*log(2.0)) * eifov_out_across; //desired output sensor
+  sigma_out_long = (1/TePI) * sqrt(2*log(2.0)) * eifov_out_long;
+
+  varF1 = pow(sigma_out_across,2) - pow(sigma_in_across,2);
+  varF2 = pow(sigma_out_long,2) - pow(sigma_in_long,2);
+
+  n = int(ceil((1.5/(pow(ifov_in,2))) * MAX(varF1, varF2)));
+
+  alfa1 = (varF1)/(2*(n*pow(ifov_in,2)-varF1));
+  alfa2 = (varF2)/(2*(n*pow(ifov_in,2)-varF2));
+
+  a1 = 1/(1+2*alfa1);
+  a2 = 1/(1+2*alfa2);
+
+  b1 = alfa1/(1+2*alfa1);
+  b2 = alfa2/(1+2*alfa2);
+
+  TePDIFilterMask::pointer filter_mask( new TePDIFilterMask( 3, 0 ) );
+  filter_mask->set(0,0,b1*b2);
+  filter_mask->set(1,0,a1*b2);
+  filter_mask->set(2,0,b1*b2);
+  filter_mask->set(0,1,b1*a2);
+  filter_mask->set(1,1,a1*a2);
+  filter_mask->set(2,1,b1*a2);
+  filter_mask->set(0,2,b1*b2);
+  filter_mask->set(1,2,a1*b2);
+  filter_mask->set(2,2,b1*b2);
+
+  TePDIParameters new_params = params_;
+
+  new_params.SetParameter("input_image",input_raster);
+  new_params.SetParameter( "filter_mask", filter_mask );
+  new_params.SetParameter( "iterations", n );
+
+  TePDILinearFilter filter;
+  
+  if( ifov_in == ifov_out ) {
+    /* No Ressampling required */
+    
+    new_params.SetParameter("output_image",output_raster);
+    
+    TEAGN_TRUE_OR_THROW( filter.Reset( new_params ), "Invalid Parameters" );
+    TEAGN_TRUE_OR_RETURN( filter.Apply(), "Linear filter error" );
+  } else {
+    /* Ressampling is required */
+
+    TePDITypes::TePDIRasterPtrType non_resssampled_output_raster;
+    TEAGN_TRUE_OR_RETURN( TePDIUtils::TeAllocRAMRaster(
+      non_resssampled_output_raster, input_raster->params(), 
+        TePDIUtils::TePDIUtilsAutoMemPol ), "Temporary raster allocation error" )
+        
+    new_params.SetParameter( "output_image", non_resssampled_output_raster );
+    
+    TEAGN_TRUE_OR_THROW( filter.Reset( new_params ), "Invalid Parameters" );
+    TEAGN_TRUE_OR_RETURN( filter.Apply(), "Linear filter error" );
+    
+    /* Ressampling raster */
+    
+    TePDIInterpolator::InterpMethod interpolator = 
+      TePDIInterpolator::BicubicMethod;
+    
+    if( params_.CheckParameter<TePDIInterpolator::InterpMethod>( 
+      "interpolator" ) ) {
+      
+      params_.GetParameter( "interpolator", interpolator );
+    }
+    
+    double x_resolution_ratio = ( ifov_out / ifov_in );
+    double y_resolution_ratio = x_resolution_ratio;
+    
+    TEAGN_TRUE_OR_RETURN( TePDIUtils::resampleRasterByRes( 
+      non_resssampled_output_raster, output_raster, x_resolution_ratio,
+      y_resolution_ratio, interpolator, progress_enabled_ ), 
+      "Output raster resample error" )
+  }
+  
+  return true;
+}
+
diff --git a/src/terralib/image_processing/TePDISensorSimulator.hpp b/src/terralib/image_processing/TePDISensorSimulator.hpp
new file mode 100644
index 0000000..b0a614e
--- /dev/null
+++ b/src/terralib/image_processing/TePDISensorSimulator.hpp
@@ -0,0 +1,107 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDISENSORSIMULATOR_HPP
+  #define TEPDISENSORSIMULATOR_HPP
+
+  #include "TePDIAlgorithm.hpp"
+  #include "TePDIParameters.hpp"
+  #include "TePDIInterpolator.hpp"
+  
+  #include <TeSharedPtr.h>
+
+  /**
+   * @brief This is the class for simulating an image from a sensor. 
+   * Given an image generated by sensor 1, with known ifov and eifovs, this class generates another image, 
+   * as if it was generated by sensor 2, with another ifov and eifovs values.
+   * @author Eliana Pantale�o <elianap at dpi.inpe.br>
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup TePDIGeneralAlgoGroup
+   *
+   * @note The general required parameters:
+   *
+   * @param input_raster ( TePDITypes::TePDIRasterPtrType ) - The original input raster.
+   * @param channels ( std::vector<int> ) - The band(s) to be simulated.
+   * @param output_raster ( TePDITypes::TePDIRasterPtrType ) - The output raster.
+   * @param ifov_in ( double ) - The ifov of the input raster.
+   * @param eifov_in_across ( double ) - The eifov of the input raster across track.
+   * @param eifov_in_long ( double ) - The eifov of the input raster long track.
+   * @param ifov_out ( double ) - The ifov of the output raster.
+   * @param eifov_out_across ( double ) - The eifov of the output raster across track.
+   * @param eifov_out_long ( double ) - The eifov of the output raster long track.
+   *
+   * @note Optional parameters:
+   *
+   * @param interpolator (TePDIInterpolator::NNMethod) - The interpolation method to use when raster resampling is needed (default:TePDIInterpolator::BicubicMethod).
+   *
+   */
+  class PDI_DLL TePDISensorSimulator : public TePDIAlgorithm {
+    public :
+      typedef TeSharedPtr< TePDISensorSimulator > pointer;
+      typedef const TeSharedPtr< TePDISensorSimulator> const_pointer;
+      
+      /**
+       * Default Constructor.
+       *
+       */
+      TePDISensorSimulator();
+
+      /**
+       * Default Destructor
+       */
+      ~TePDISensorSimulator();
+      
+      /**
+       * Checks if the supplied parameters fits the requirements of each
+       * PDI algorithm implementation.
+       *
+       * Error log messages must be generated. No exceptions generated.
+       *
+       * @param parameters The parameters to be checked.
+       * @return true if the parameters are OK. false if not.
+       */
+      bool CheckParameters( const TePDIParameters& parameters ) const;      
+
+    protected :
+    
+      /**
+       * Reset the internal state to the initial state.
+       *
+       * @param params The new parameters referente at initial state.
+       */
+      void ResetState( const TePDIParameters& params );    
+     
+      /**
+       * Runs the current algorithm implementation.
+       *
+       * @return true if OK. false on error.
+       */
+      bool RunImplementation();      
+  };
+  
+/** @example TePDISensorSimulator_test.cpp
+ *    Shows how to use this class.
+ */    
+
+#endif
diff --git a/src/terralib/image_processing/TePDISensorSimulatorFactory.cpp b/src/terralib/image_processing/TePDISensorSimulatorFactory.cpp
new file mode 100644
index 0000000..ff8be9e
--- /dev/null
+++ b/src/terralib/image_processing/TePDISensorSimulatorFactory.cpp
@@ -0,0 +1,27 @@
+
+#include "TePDISensorSimulatorFactory.hpp"
+#include "TePDISensorSimulator.hpp"
+
+#include <TeAgnostic.h>
+
+
+TePDISensorSimulatorFactory::TePDISensorSimulatorFactory()
+: TePDIAlgorithmFactory( std::string( "TePDISensorSimulator" ) )
+{
+};      
+
+
+TePDISensorSimulatorFactory::~TePDISensorSimulatorFactory()
+{
+};
+
+
+TePDIAlgorithm* TePDISensorSimulatorFactory::build ( const TePDIParameters& arg )
+{
+  TePDIAlgorithm* instance_ptr = new TePDISensorSimulator();
+  
+  TEAGN_TRUE_OR_THROW( instance_ptr->Reset( arg ),
+    "Invalid parameters" );
+  
+  return instance_ptr;
+}
diff --git a/src/terralib/image_processing/TePDISensorSimulatorFactory.hpp b/src/terralib/image_processing/TePDISensorSimulatorFactory.hpp
new file mode 100644
index 0000000..2b4fb0e
--- /dev/null
+++ b/src/terralib/image_processing/TePDISensorSimulatorFactory.hpp
@@ -0,0 +1,68 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDISENSORSIMULATORFACTORY_HPP
+  #define TEPDISENSORSIMULATORFACTORY_HPP
+
+  #include <TeSharedPtr.h>
+  #include "TePDIAlgorithmFactory.hpp"
+  #include "TePDIParameters.hpp"
+  
+  /**
+   * @brief This is the class for TePDISensorSimulator factory.
+   * @author Eliana Pantale�o <elianap at dpi.inpe.br>
+   * @ingroup PDIAlgorithmsFactories
+   */
+  class PDI_DLL TePDISensorSimulatorFactory : public TePDIAlgorithmFactory
+  {
+    public :
+      
+      /**
+       * Default constructor
+       */
+      TePDISensorSimulatorFactory();      
+      
+      /**
+       * Default Destructor
+       */
+      ~TePDISensorSimulatorFactory();
+      
+    protected :  
+      
+      /**
+       * Implementation for the abstract TeFactory::build.
+       *
+       * @param arg A const reference to the parameters used by the
+       * algorithm.
+       * @return A pointer to the new generated algorithm instance.
+       */
+      TePDIAlgorithm* build( const TePDIParameters& arg );
+      
+  };
+
+  namespace {
+    static TePDISensorSimulatorFactory TePDISensorSimulatorFactory_instance;
+  };  
+  
+#endif
diff --git a/src/terralib/image_processing/TePDIStatistic.cpp b/src/terralib/image_processing/TePDIStatistic.cpp
new file mode 100755
index 0000000..c09abd2
--- /dev/null
+++ b/src/terralib/image_processing/TePDIStatistic.cpp
@@ -0,0 +1,1172 @@
+#include "TePDIStatistic.hpp"
+
+#include <TeAgnostic.h>
+#include "TePDIUtils.hpp"
+
+#include <TeUtils.h>
+#include <TeBox.h>
+#include <TeGeometryAlgorithms.h>
+
+#include <math.h>
+#include <float.h>
+
+
+TePDIStatistic::TePDIStatistic()
+{
+  iterator_strat_ = TeBoxPixelIn;
+  
+  polygonset_.reset( new TePolygonSet );
+}
+
+
+TePDIStatistic::~TePDIStatistic()
+{
+}
+
+
+void TePDIStatistic::ResetState( const TePDIParameters& params )
+{
+  if( params_ != params ) {
+    clear();
+    
+    /* Updating the iterator strategy ( if available ) */
+    
+    if( params.CheckParameter< TeStrategicIterator > ( 
+      "iterator_strat" ) ) {    
+      
+      params.GetParameter( "iterator_strat", iterator_strat_ );   
+    }
+    
+    
+    /* Extracting parameters */
+    
+    TEAGN_TRUE_OR_THROW( 
+      params.GetParameter( "rasters", rasters_ ),
+      "Missing parameter: rasters" );
+    
+    TEAGN_TRUE_OR_THROW( 
+      params.GetParameter( "bands", bands_ ),
+      "Missing parameter: bands" );     
+    
+    /* updating the local polygon set pointer */
+    
+    if( params.CheckParameter< TePDITypes::TePDIPolygonSetPtrType > ( 
+      "polygonset" ) ) {
+      
+      params.GetParameter( "polygonset", polygonset_ );
+    } else {
+      polygonset_.reset( new TePolygonSet );
+      
+      TeBox rasterbox = rasters_[ 0 ]->params().boundingBox();
+      TePolygon rasterpol = polygonFromBox( rasterbox );
+      
+      polygonset_->add( rasterpol );
+    }
+    
+    /* Building histogram cache if histograms are provided */
+  
+    if( params.CheckParameter< std::vector< TePDIHistogram::pointer > >( 
+      "histograms" ) ) {
+      
+      std::vector< TePDIHistogram::pointer > histograms;
+      TEAGN_TRUE_OR_THROW( params.GetParameter( "histograms", 
+        histograms ), "Missing parameter: histograms" );
+        
+      for( unsigned int index = 0 ; index < rasters_.size() ; ++index ) {
+        std::pair< unsigned int, unsigned int  > key;
+        key.first = index;
+        key.second = 0;
+      
+        histo_cache_[ key ] = histograms[ index ];
+      }
+    }
+  }
+}
+
+
+bool TePDIStatistic::RunImplementation()
+{
+  TEAGN_LOG_AND_THROW( "This function cannot be used for this class" );
+  return false;
+}
+
+
+bool TePDIStatistic::CheckParameters( 
+  const TePDIParameters& parameters ) const
+{
+  /* Checking input rasters */
+  
+  TePDITypes::TePDIRasterVectorType rasters;
+  TEAGN_TRUE_OR_RETURN( 
+    parameters.GetParameter( "rasters", rasters ),
+    "Missing parameter: rasters" );
+    
+  std::vector< int > bands;
+  TEAGN_TRUE_OR_RETURN( 
+    parameters.GetParameter( "bands", bands ),
+    "Missing parameter: bands" );
+    
+  TEAGN_TRUE_OR_RETURN( rasters.size() == bands.size(),
+    "The number of rasters doesn't match the number of bands" );
+    
+  TEAGN_TRUE_OR_RETURN( rasters.size() > 0, "Invalid number of rasters" );
+    
+  for( unsigned int index = 0 ; index < rasters.size() ; ++index ) {
+    TEAGN_TRUE_OR_RETURN( rasters[ index ].isActive(),
+      "Invalid parameter: raster " + 
+      Te2String( index ) + " inactive" );
+      
+    TEAGN_TRUE_OR_RETURN( 
+      rasters[ index ]->params().status_ != TeRasterParams::TeNotReady,
+      "Invalid parameter: raster " + 
+      Te2String( index ) + " not ready" );
+        
+    TEAGN_TRUE_OR_RETURN( 
+      rasters[ 0 ]->params().nlines_ == rasters[ index ]->params().nlines_,
+      "Lines number mismatch between raster 0 and raster " +
+      Te2String( index ) );
+      
+    TEAGN_TRUE_OR_RETURN( 
+      rasters[ 0 ]->params().ncols_ == rasters[ index ]->params().ncols_,
+      "Columns number mismatch between raster 0 and raster " +
+      Te2String( index ) );
+      
+    TEAGN_TRUE_OR_RETURN( 
+      rasters[ 0 ]->params().resx_ == rasters[ index ]->params().resx_,
+      "Pixel X resolution mismatch between raster 0 and raster " +
+      Te2String( index ) );      
+
+    TEAGN_TRUE_OR_RETURN( 
+      rasters[ 0 ]->params().resy_ == rasters[ index ]->params().resy_,
+      "Pixel Y resolution mismatch between raster 0 and raster " +
+      Te2String( index ) );      
+            
+    TEAGN_TRUE_OR_RETURN( 
+      bands[ index ] >= 0, "Invalid band number (" + 
+      Te2String( index ) + ")" );
+    TEAGN_TRUE_OR_RETURN( 
+      bands[ index ] < rasters[ index ]->nBands(), "Invalid band number (" + 
+      Te2String( index ) + ")" );
+      
+    /* Checking photometric interpretation */
+    
+    TEAGN_TRUE_OR_RETURN( ( 
+      ( rasters[ index ]->params().photometric_[ 
+        bands[ index ] ] == TeRasterParams::TeRGB ) ||
+      ( rasters[ index ]->params().photometric_[ 
+        bands[ index ] ] == TeRasterParams::TeMultiBand ) ),
+      "Invalid parameter - rasters (invalid photometric "
+      "interpretation)" );      
+  }
+  
+  /* Checking the restriction polygon set if avaliable */
+  
+  TePDITypes::TePDIPolygonSetPtrType polygonset;  
+  
+  if( parameters.CheckParameter< TePDITypes::TePDIPolygonSetPtrType >( 
+    "polygonset" ) ) {
+    
+    parameters.GetParameter( "polygonset", polygonset );
+    
+    TEAGN_TRUE_OR_RETURN( polygonset.isActive(), 
+      "Invalid parameter : polygonset" );
+      
+    TEAGN_TRUE_OR_RETURN( ( polygonset->size() > 0 ), 
+      "Invalid parameter : polygonset" );      
+      
+    TeBox rasterbbox = rasters[ 0 ]->params().boundingBox();
+    TePolygon raster_bpol = polygonFromBox( rasterbbox );
+    
+    TePolygonSet::iterator it = polygonset->begin();
+    TePolygonSet::iterator it_end = polygonset->end();
+    
+    while( it != it_end ) {
+      TEAGN_TRUE_OR_RETURN( 
+        ( TeRelation( raster_bpol, *it ) != TeDISJOINT ),
+        "Invalid parameter : polygonset" );
+      
+      ++it;
+    }
+  }
+  
+  /* Checking user histograms if available */
+  
+  if( parameters.CheckParameter< std::vector< TePDIHistogram::pointer > > ( 
+    "histograms" ) ) {
+    
+    TEAGN_TRUE_OR_RETURN( ( ! polygonset.isActive() ),
+      "Invalid parameter: histograms cannot be used when polygonset is "
+      "present" );
+    
+    std::vector< TePDIHistogram::pointer > histograms;
+    
+    TEAGN_TRUE_OR_THROW( parameters.GetParameter( "histograms", 
+      histograms ), "Invalid parameter: histograms" );
+    TEAGN_TRUE_OR_RETURN( ( histograms.size() == rasters.size() ),
+      "Invalid parameter: histograms" );
+      
+    std::vector< TePDIHistogram::pointer >::iterator it =
+      histograms.begin();
+    std::vector< TePDIHistogram::pointer >::iterator it_end =
+      histograms.end();
+      
+    while( it != it_end ) {
+      TEAGN_TRUE_OR_RETURN( ( (*it)->size() > 0 ),
+        "Invalid parameter: histograms" );    
+        
+      ++it;
+    }
+  }  
+  
+  return true;
+}
+
+
+const TePDIHistogram& TePDIStatistic::getHistogram( 
+  unsigned int raster_index,  unsigned int pol_index )
+{
+  TEAGN_TRUE_OR_THROW( raster_index < rasters_.size(), 
+    "Invalid raster index" );
+  TEAGN_TRUE_OR_THROW( pol_index < polygonset_->size(), 
+    "Invalid polygon index" );
+  
+  std::pair< unsigned int, unsigned int  > temp_pair;
+  temp_pair.first = raster_index;
+  temp_pair.second = pol_index;
+  
+  std::map< std::pair< unsigned int, unsigned int  >,
+    TePDIHistogram::pointer >::const_iterator it_cache = 
+    histo_cache_.find( temp_pair );
+    
+  if( it_cache == histo_cache_.end() ) {
+    unsigned int histo_levels = 0; // auto levels
+    
+    if( ( rasters_[ raster_index ]->params().dataType_[ bands_[ raster_index ] ]
+      == TeFLOAT ) ||
+      ( rasters_[ raster_index ]->params().dataType_[ bands_[ raster_index ] ]
+      == TeDOUBLE ) ) 
+    {
+      histo_levels = 256;
+    }
+        
+    TePDITypes::TePDIPolygonSetPtrType local_polygonset( new TePolygonSet );
+    local_polygonset->add( polygonset_->operator[]( pol_index ) );
+    
+    TePDIHistogram::pointer output_histogram;
+    output_histogram.reset( new TePDIHistogram );
+    output_histogram->ToggleProgressInt(progress_enabled_);
+    
+    TEAGN_TRUE_OR_THROW( output_histogram->reset( 
+      rasters_[ raster_index ],
+      bands_[ raster_index ], histo_levels, false, iterator_strat_,
+      local_polygonset ),
+      "Histogram generation error" );
+      
+    histo_cache_[ temp_pair ] = output_histogram;
+      
+    return *(histo_cache_[ temp_pair ]);
+  } else {
+    return *(it_cache->second);
+  }
+}
+
+const TePDIJointHistogram& TePDIStatistic::getJointHistogram( 
+  unsigned int raster1_index, unsigned int raster2_index,
+  unsigned int pol_index )
+{
+  TEAGN_TRUE_OR_THROW( raster1_index < rasters_.size(), 
+    "Invalid raster 1 index" );
+  TEAGN_TRUE_OR_THROW( raster2_index < rasters_.size(), 
+    "Invalid raster 2 index" );
+  TEAGN_TRUE_OR_THROW( pol_index < polygonset_->size(), 
+    "Invalid polygon index" );
+  
+  CoupleRasterCachesKeyT temp_pair;
+  temp_pair.first = raster1_index;
+  temp_pair.second.first = raster2_index;
+  temp_pair.second.second = pol_index;
+  
+  std::map< CoupleRasterCachesKeyT, TePDIJointHistogram* >::iterator it_cache = 
+    jHistoCache_.find( temp_pair );
+    
+  if( it_cache == jHistoCache_.end() ) {
+    unsigned int histo_levels = 0; // auto levels
+    
+    if( ( rasters_[ raster1_index ]->params().dataType_[ bands_[ raster1_index ] ]
+      == TeFLOAT ) ||
+      ( rasters_[ raster1_index ]->params().dataType_[ bands_[ raster1_index ] ]
+      == TeDOUBLE ) ||
+      ( rasters_[ raster2_index ]->params().dataType_[ bands_[ raster2_index ] ]
+      == TeFLOAT ) ||
+      ( rasters_[ raster2_index ]->params().dataType_[ bands_[ raster2_index ] ]
+      == TeDOUBLE ) ) 
+    {
+      histo_levels = 256;
+    }
+      
+    TePolygonSet local_polygonset;
+    local_polygonset.add( polygonset_->operator[]( pol_index ) );
+
+    TePDIJointHistogram* newR1R2HistoPtr = new TePDIJointHistogram;
+    newR1R2HistoPtr->toggleProgress( progress_enabled_ );
+      
+    TEAGN_TRUE_OR_THROW( newR1R2HistoPtr->update( *rasters_[ raster1_index ],
+      bands_[ raster1_index ], *rasters_[ raster2_index ],
+      bands_[ raster2_index ], iterator_strat_, histo_levels, local_polygonset ),
+      "Joint Histogram generation error" );
+        
+    jHistoCache_[ temp_pair ] = newR1R2HistoPtr;
+
+    // Updating each raster histogram cache too
+
+    TePDIHistogram::pointer r1HistPtr( new TePDIHistogram );
+    *r1HistPtr = newR1R2HistoPtr->getRaster1Hist();
+    SingleRasterCachesKeyT r1key;
+    r1key.first = raster1_index;
+    r1key.second = pol_index;
+    histo_cache_[ r1key ] = r1HistPtr;
+
+    TePDIHistogram::pointer r2HistPtr( new TePDIHistogram );
+    *r2HistPtr = newR1R2HistoPtr->getRaster2Hist();
+    SingleRasterCachesKeyT r2key;
+    r2key.first = raster2_index;
+    r2key.second = pol_index;
+    histo_cache_[ r2key ] = r2HistPtr;
+    
+    // Generating the joint histogram of raster2 x raster1 using the
+    // joint histogram of raster1 x raster 2
+
+    TePDIJointHistogram* newR2R1HistoPtr = new TePDIJointHistogram;
+    newR1R2HistoPtr->getInverseJHist( *newR2R1HistoPtr );
+    
+    CoupleRasterCachesKeyT inv_temp_pair;
+    inv_temp_pair.first = raster2_index;
+    inv_temp_pair.second.first = raster1_index;
+    inv_temp_pair.second.second = pol_index;
+    
+    jHistoCache_[ inv_temp_pair ] = newR2R1HistoPtr;    
+      
+    return *newR1R2HistoPtr;
+  } else {
+    return *(it_cache->second);
+  }
+}
+
+double TePDIStatistic::getSum( unsigned int raster_index,
+  unsigned int pol_index )
+{
+  TEAGN_TRUE_OR_THROW( raster_index < rasters_.size(), 
+    "Invalid raster index" );
+  TEAGN_TRUE_OR_THROW( pol_index < polygonset_->size(), 
+    "Invalid polygon index" );
+  
+  const TePDIHistogram& hist = getHistogram( raster_index, 
+    pol_index );
+    
+  if( hist.size() == 0 )
+  {
+    return DBL_MAX;
+  }
+  else
+  {
+    TePDIHistogram::const_iterator it_hist = hist.begin();
+    TePDIHistogram::const_iterator it_hist_end = hist.end();
+     
+    double result = 0;
+          
+    while( it_hist != it_hist_end ) {
+      result += it_hist->first * (double)it_hist->second;
+          
+      ++it_hist;
+    }
+          
+    return result;
+  }
+}
+
+
+double TePDIStatistic::getSum3( unsigned int raster_index, 
+  unsigned int pol_index )
+{
+  TEAGN_TRUE_OR_THROW( raster_index < rasters_.size(), 
+    "Invalid raster index" );
+  TEAGN_TRUE_OR_THROW( pol_index < polygonset_->size(), 
+    "Invalid polygon index" );
+    
+  const TePDIHistogram& hist = getHistogram( raster_index, 
+    pol_index );
+    
+  if( hist.size() == 0 )
+  {
+    return DBL_MAX;
+  }
+  else
+  {  
+    TePDIHistogram::const_iterator it = hist.begin();
+    TePDIHistogram::const_iterator it_end = hist.end();
+    
+    double sum = 0;
+    double value = 0;
+      
+    while( it != it_end ) {
+      value = it->first;
+      
+      sum += ( value * value * value * ( ( double ) it->second ) );
+      
+      ++it;
+    }
+    
+    return sum;     
+  }
+}
+
+
+double TePDIStatistic::getSum4( unsigned int raster_index, 
+  unsigned int pol_index )
+{
+  TEAGN_TRUE_OR_THROW( raster_index < rasters_.size(), 
+    "Invalid raster index" );
+  TEAGN_TRUE_OR_THROW( pol_index < polygonset_->size(), 
+    "Invalid polygon index" );
+    
+  const TePDIHistogram& hist = getHistogram( raster_index, 
+    pol_index );
+    
+  if( hist.size() == 0 )
+  {
+    return DBL_MAX;
+  }
+  else
+  {  
+    TePDIHistogram::const_iterator it = hist.begin();
+    TePDIHistogram::const_iterator it_end = hist.end();
+    
+    double sum = 0;
+    double value = 0;
+      
+    while( it != it_end ) {
+      value = it->first;
+      
+      sum += ( value * value * value * value * ( ( double ) it->second ) );
+      
+      ++it;
+    }
+    
+    return sum;  
+  }
+}
+
+double TePDIStatistic::getSumPB1B2( unsigned int raster1_index,
+  unsigned int raster2_index, unsigned int pol_index )
+{
+  const TePDIJointHistogram& jHisto = getJointHistogram( raster1_index,
+    raster2_index, pol_index );
+
+  TePDIJointHistogram::const_iterator it = jHisto.begin();
+  TePDIJointHistogram::const_iterator it_end = jHisto.end();
+
+  double sum = 0;
+
+  while( it != it_end )
+  {
+    sum += ( it->first.first * it->first.second ) * (double)it->second;
+    ++it;
+  }
+
+  return sum;
+}
+
+
+double TePDIStatistic::getMean( unsigned int raster_index, 
+  unsigned int pol_index )
+{
+  TEAGN_TRUE_OR_THROW( raster_index < rasters_.size(), "Invalid index" );
+  TEAGN_TRUE_OR_THROW( pol_index < polygonset_->size(), "Invalid index" );
+  
+  /* Trying to use the histogram method */
+  
+  const TePDIHistogram& hist = getHistogram( raster_index, 
+    pol_index );
+    
+  if( hist.size() == 0 )
+  {
+    return DBL_MAX;
+  }
+  else
+  {    
+    TePDIHistogram::const_iterator it_hist = hist.begin();
+    TePDIHistogram::const_iterator it_hist_end = hist.end();
+     
+    double sum = 0;
+    double elem_nmb = 0.0;
+          
+    while( it_hist != it_hist_end ) {
+      sum += it_hist->first * ( (double)it_hist->second );
+      elem_nmb += (double)it_hist->second;
+          
+      ++it_hist;
+    }
+        
+    if( elem_nmb != 0.0 ) {
+      return ( sum / ( (double)elem_nmb ) ) ;
+    } else {
+      return DBL_MAX;
+    }
+  }
+}
+
+
+TeMatrix TePDIStatistic::getMeanMatrix( unsigned int pol_index )
+{
+  TEAGN_TRUE_OR_THROW( pol_index < polygonset_->size(), "Invalid index" );
+
+  TeMatrix outmatrix;
+  outmatrix.Init( 1, rasters_.size(), 0. );
+
+  for( unsigned int index = 0 ; index < rasters_.size() ; ++index ) {
+    outmatrix( 0, index ) = getMean( index, pol_index );
+  }
+
+  return outmatrix;
+}
+
+
+double TePDIStatistic::getCovariance( unsigned int raster1_index,  
+  unsigned int raster2_index, unsigned int pol_index )
+{
+  TEAGN_TRUE_OR_THROW( raster1_index < rasters_.size(), 
+    "Invalid raster 1 index" );
+  TEAGN_TRUE_OR_THROW( raster2_index < rasters_.size(), 
+    "Invalid raster 2 index" );    
+  TEAGN_TRUE_OR_THROW( pol_index < polygonset_->size(), 
+    "Invalid polygon index" );
+    
+  double sum_pb1b2 = getSumPB1B2( raster1_index, raster2_index, pol_index );
+  double mean1 = getMean( raster1_index );
+  double mean2 = getMean( raster2_index );  
+  
+  if( ( sum_pb1b2 == DBL_MAX ) || ( mean1 == DBL_MAX ) ||
+    ( mean2 == DBL_MAX) )
+  {
+    return DBL_MAX;
+  }
+  
+  /* Finding the elements number */
+  
+  double elem_nmb = (double)getJointHistogram( raster1_index, 
+    raster2_index, pol_index ).getFreqSum();
+  
+  if( elem_nmb != 0.0 ) {
+    return ( ( sum_pb1b2 / elem_nmb ) - ( mean1 * mean2 ) );
+  } else {
+    return DBL_MAX;
+  }
+}
+
+
+double TePDIStatistic::getVariance( unsigned int raster_index,
+  unsigned int pol_index )
+{
+  TEAGN_TRUE_OR_THROW( raster_index < rasters_.size(), 
+    "Invalid raster index" );
+  TEAGN_TRUE_OR_THROW( pol_index < polygonset_->size(), 
+    "Invalid polygon index" );
+    
+  const TePDIHistogram& hist = getHistogram( raster_index, 
+    pol_index );
+    
+  double elements_number = (double)hist.getTotalCount();    
+  
+  if( elements_number == 0.0 ) {
+    return DBL_MAX;
+  } else {
+    /* Calculating variance */
+      
+    TePDIHistogram::const_iterator it_hist = hist.begin();
+    TePDIHistogram::const_iterator it_hist_end = hist.end();
+    
+    double mean = getMean( raster_index, pol_index );
+    double variance = 0;
+    
+    while( it_hist != it_hist_end ) {
+      variance += ( ( (double)it_hist->second ) / elements_number ) *
+        ( it_hist->first - mean ) * ( it_hist->first - mean );
+      
+      ++it_hist;
+    }
+    
+    return variance;  
+  }
+}
+
+
+double TePDIStatistic::getStdDev( unsigned int raster_index,
+  unsigned int pol_index )
+{
+  TEAGN_TRUE_OR_THROW( raster_index < rasters_.size(), 
+    "Invalid raster index" );
+  TEAGN_TRUE_OR_THROW( pol_index < polygonset_->size(), 
+    "Invalid polygon index" );
+    
+  double variance = getVariance( raster_index, pol_index );
+    
+  if( variance == DBL_MAX )
+  {
+    return DBL_MAX;
+  }
+  else
+  {
+    return sqrt( variance );
+  }
+}
+
+
+double TePDIStatistic::getEntropy( unsigned int raster_index,
+  unsigned int pol_index )
+{
+  TEAGN_TRUE_OR_THROW( raster_index < rasters_.size(), 
+    "Invalid raster index" );
+  TEAGN_TRUE_OR_THROW( pol_index < polygonset_->size(), 
+    "Invalid polygon index" );
+
+  const TePDIHistogram& hist = getHistogram( raster_index, 
+    pol_index );
+  
+  double elements_number = (double)hist.getTotalCount();
+  
+  if( elements_number == 0.0 ) {
+    return DBL_MAX;
+  }  
+  
+  /* Calculating entropy */
+    
+  TePDIHistogram::const_iterator it = hist.begin();
+  TePDIHistogram::const_iterator it_end = hist.end();
+  
+  double entropy = 0;
+  double probability = 0;
+  
+  while( it != it_end ) {
+    probability = ( (double)(it->second) ) / elements_number;
+    
+    if( probability > 0.0 ) {
+      entropy += ( probability * ( log( probability ) /
+        log( (double)2 ) ) );
+    }
+
+    ++it;
+  }
+  
+  entropy = (-1.0) * entropy;
+
+  return entropy;
+}
+
+
+double TePDIStatistic::getMin( unsigned int raster_index,
+  unsigned int pol_index )
+{
+  TEAGN_TRUE_OR_THROW( raster_index < rasters_.size(), 
+    "Invalid raster index" );
+  TEAGN_TRUE_OR_THROW( pol_index < polygonset_->size(), 
+    "Invalid polygon index" );
+  
+  const TePDIHistogram& hist = getHistogram( raster_index, 
+    pol_index );
+    
+  if( hist.size() == 0 )
+  {
+    return DBL_MAX;
+  }
+  else
+  {
+    return hist.GetMinLevel();
+  }
+}
+
+
+double TePDIStatistic::getMax( unsigned int raster_index,
+  unsigned int pol_index )
+{
+  TEAGN_TRUE_OR_THROW( raster_index < rasters_.size(), 
+    "Invalid raster index" );
+  TEAGN_TRUE_OR_THROW( pol_index < polygonset_->size(), 
+    "Invalid polygon index" );
+  
+  const TePDIHistogram& hist = getHistogram( raster_index, 
+    pol_index );
+    
+  if( hist.size() == 0 )
+  {
+    return DBL_MAX;
+  }
+  else
+  {
+    return hist.GetMaxLevel();
+  }
+}
+
+
+double TePDIStatistic::getMode( unsigned int raster_index,
+  unsigned int pol_index )
+{
+  TEAGN_TRUE_OR_THROW( raster_index < rasters_.size(), 
+    "Invalid raster index" );
+  TEAGN_TRUE_OR_THROW( pol_index < polygonset_->size(), 
+    "Invalid polygon index" );
+  
+  const TePDIHistogram& hist = getHistogram( raster_index, pol_index );
+  
+  if( hist.size() == 0 )
+  {
+    return DBL_MAX;
+  }
+  else
+  {
+    TePDIHistogram::const_iterator it_hist = hist.begin();
+    TePDIHistogram::const_iterator it_hist_end = hist.end();
+    
+    unsigned int frequency = 0;
+    double mode = 0;
+    
+    while( it_hist != it_hist_end ) {
+      if( it_hist->second > frequency ) {
+        mode = it_hist->first;
+        frequency = it_hist->second;
+      }
+      
+      ++it_hist;
+    }
+    
+    return mode;
+  }
+}
+
+
+double TePDIStatistic::getCorrelation( unsigned int raster1_index,  
+  unsigned int raster2_index, unsigned int pol_index )
+{
+  TEAGN_TRUE_OR_THROW( raster1_index < rasters_.size(), 
+    "Invalid raster 1 index" );
+  TEAGN_TRUE_OR_THROW( raster2_index < rasters_.size(), 
+    "Invalid raster 2 index" );    
+  TEAGN_TRUE_OR_THROW( pol_index < polygonset_->size(), 
+    "Invalid polygon index" );
+    
+  double covariance = getCovariance( raster1_index, raster2_index, 
+    pol_index );
+    
+  if( covariance == DBL_MAX )
+  {
+    return DBL_MAX;
+  }
+  else
+  {
+    double cov1 = getCovariance( raster1_index, raster1_index, 
+      pol_index );
+    double cov2 = getCovariance( raster2_index, raster2_index, 
+      pol_index );
+      
+    if( ( cov1 == DBL_MAX ) || ( cov2 == DBL_MAX ) )
+    {
+      return DBL_MAX;
+    }
+    else
+    {
+      double sqrt_c_1 = sqrt( cov1 );
+      double sqrt_c_2 = sqrt( cov2 );
+      double multi = ( sqrt_c_1 * sqrt_c_2 );
+
+      if( multi == 0.0 ) {
+        return DBL_MAX;
+      } else {
+        return ( covariance / multi );
+      }
+    }
+  }
+}
+
+
+
+double TePDIStatistic::getPercentile( double sample_index, 
+  unsigned int raster_index, unsigned int pol_index )
+{
+  TEAGN_TRUE_OR_THROW( ( raster_index < rasters_.size() ), 
+    "Invalid raster index" );
+  TEAGN_TRUE_OR_THROW( ( pol_index < polygonset_->size() ), 
+    "Invalid polygon index" );
+  TEAGN_TRUE_OR_THROW( ( ( sample_index >= 0.0 ) && 
+    ( sample_index <= 100.0 ) ), "Invalid sample index" );    
+  
+  const TePDIHistogram& hist = getHistogram( raster_index, pol_index );
+
+  if( hist.size() == 0 )
+  {
+    return DBL_MAX;
+  }
+  else if( hist.size() == 1 ) 
+  {
+    return hist.begin()->first;
+  } 
+  else 
+  {
+    TePDIHistogram::const_iterator it;
+    TePDIHistogram::const_iterator it_end = hist.end();
+    
+    unsigned int lastindex = hist.getTotalCount() - 1;
+    
+    double target_sample_index_double = 
+      ( (double)( lastindex ) ) * ( sample_index / 100.0 );
+    unsigned int target_sample_index_floor = 
+      (unsigned int)ceil( target_sample_index_double );
+    
+    if( target_sample_index_double == 
+      ( (double) target_sample_index_floor ) ) {
+      
+      it = hist.begin();
+      
+      unsigned int counted_elements = 0;
+      unsigned int target_index1 = target_sample_index_floor;
+      unsigned int target_index2 = ( target_index1 == lastindex ) ?
+        target_index1 : ( target_index1 + 1 );
+      double target1_value = 0;
+      double target2_value = 0;
+      unsigned int curr_index_range_bound = 0;
+      
+      while( it != it_end ) {
+        curr_index_range_bound = counted_elements + it->second;
+        
+        if( ( counted_elements <= target_index1 ) &&
+          ( target_index1 < curr_index_range_bound ) ) {
+          
+          target1_value = it->first;
+        }
+        
+        if( ( counted_elements <= target_index2 ) &&
+          ( target_index2 < curr_index_range_bound ) ) {
+          
+          target2_value = it->first;
+          
+          break;
+        }
+        
+        counted_elements += it->second;
+        
+        ++it;
+      }
+      
+      return ( ( target1_value + target2_value ) / 2.0 );
+    } else {
+      it = hist.begin();
+      
+      unsigned int counted_elements = 0;
+      unsigned int target_index1 = target_sample_index_floor + 1;
+      unsigned int curr_index_range_bound = 0;
+      
+      while( it != it_end ) {
+        curr_index_range_bound = counted_elements + it->second;
+        
+        if( ( counted_elements <= target_index1 ) &&
+          ( target_index1 < curr_index_range_bound ) ) {
+          
+          return it->first;
+        }
+        
+        counted_elements += it->second;
+        
+        ++it;
+      }
+      
+      TEAGN_LOG_AND_THROW( "Target value not found" );
+      
+      return 0;
+    }
+  }
+}
+
+TeMatrix TePDIStatistic::getCMMatrix( unsigned int pol_index )
+{
+  TEAGN_TRUE_OR_THROW( pol_index < polygonset_->size(), "Invalid index" );
+  
+  TeMatrix outmatrix;
+  outmatrix.Init( 3, rasters_.size(), 0. );
+
+  double sum3 = 0;
+  double sum4 = 0;
+  double mean = 0;
+  double sumpb1b2 = 0;
+  double sumpb1b2_norm = 0;
+  double pixels_nmb = 0;
+
+  for( unsigned int index = 0 ; index < rasters_.size() ; ++index ) {
+    sumpb1b2 = getSumPB1B2( index, index, pol_index );
+    const TePDIHistogram& histo = getHistogram( index, pol_index );
+    
+    if( histo.size() == 0 )
+    {
+      outmatrix( 0, index ) = DBL_MAX;
+      outmatrix( 1, index ) = DBL_MAX;
+      outmatrix( 2, index ) = DBL_MAX;
+    }
+    else
+    {
+      sum3 = getSum3( index, pol_index );
+      sum4 = getSum4( index, pol_index );
+      mean = getMean( index, pol_index );
+      pixels_nmb = (double)histo.getTotalCount();
+      sumpb1b2_norm = sumpb1b2 / pixels_nmb;    
+      
+      outmatrix( 0, index ) = getCovariance( index, index, pol_index );
+
+      if( pixels_nmb == 0 ) {
+        outmatrix( 1, index ) = DBL_MAX;
+      } else {
+        outmatrix( 1, index ) = sum3 / pixels_nmb - 3 * mean * sumpb1b2_norm +
+                              2 * pow( mean, 3 );
+      }
+
+      if( pixels_nmb == 0 ) {
+        outmatrix( 2, index ) = DBL_MAX;
+      } else {
+        outmatrix( 2, index ) = sum4 / pixels_nmb - 4 * mean * sum3 / pixels_nmb +
+                              6 * pow( mean, 2 ) * sumpb1b2_norm -
+                              3 * pow( mean, 4 );
+      }
+    }
+  }
+
+  return outmatrix;
+}
+
+
+TeMatrix TePDIStatistic::getAssimetryMatrix( unsigned int pol_index )
+{
+  TEAGN_TRUE_OR_THROW( pol_index < polygonset_->size(), "Invalid index" );
+
+  TeMatrix outmatrix;
+  outmatrix.Init( 1, rasters_.size(), 0. );
+
+  double sum3 = 0;
+  double mean = 0;
+  double cov = 0;
+  double sigma = 0;
+  double sigma3 = 0;
+  double pixels_nmb = 0;
+  double sumpb1b2 = 0;
+  double sumpb1b2_norm = 0;  
+
+  for( unsigned int index = 0 ; index < rasters_.size() ; ++index ) {
+    cov = getCovariance( index, index, pol_index );
+    const TePDIHistogram& histo = getHistogram( index, pol_index );
+    
+    if( histo.size() == 0 )
+    {
+      outmatrix( 0, index ) = DBL_MAX;
+    }
+    else
+    {
+      sigma = sqrt( cov );
+      sigma3 = sigma * sigma * sigma;
+
+      if( sigma3 != 0 ) {
+        sumpb1b2 = getSumPB1B2( index, index, pol_index );
+        sum3 = getSum3( index, pol_index );
+        mean = getMean( index, pol_index );
+        pixels_nmb = (double)histo.getTotalCount();
+        sumpb1b2_norm = sumpb1b2 / pixels_nmb;      
+        
+        if( ( pixels_nmb == 0 ) || ( sigma3 == 0 ) ) {
+          outmatrix( 0, index ) = 0;
+        } else {
+          outmatrix( 0, index ) = ( sum3 / pixels_nmb -  3 * mean * sumpb1b2_norm +
+                                  2 * pow( mean, 3 ) ) / sigma3;
+        }
+      } else {
+        outmatrix( 0, index ) = 0;
+      }
+    }
+  }
+
+  return outmatrix;
+}
+
+
+TeMatrix TePDIStatistic::getKurtosisMatrix( unsigned int pol_index )
+{
+  TEAGN_TRUE_OR_THROW( pol_index < polygonset_->size(), "Invalid index" );
+
+  TeMatrix outmatrix;
+  outmatrix.Init( 1, rasters_.size(), 0. );
+
+  double sum3;
+  double sum4;
+  double mean;
+  double cov;
+  double sigma;
+  double sigma4;
+  double sumpb1b2 = 0;
+  double sumpb1b2_norm = 0;
+  double pixels_nmb = 0;  
+
+  for( unsigned int index = 0 ; index < rasters_.size() ; ++index ) {
+    cov = getCovariance( index, index, pol_index );
+    const TePDIHistogram& histo = getHistogram( index, pol_index );
+    
+    if( histo.size() == 0 )
+    {
+      outmatrix( 0, index ) = DBL_MAX;
+    }
+    else
+    {
+      sigma = sqrt( cov );
+      sigma4 = sigma * sigma * sigma * sigma;
+
+      if( sigma4 != 0 ) {
+        sumpb1b2 = getSumPB1B2( index, index, pol_index );
+        sum3 = getSum3( index, pol_index );
+        sum4 = getSum4( index, pol_index );
+        mean = getMean( index, pol_index );
+        pixels_nmb = (double)histo.getTotalCount();
+        sumpb1b2_norm = sumpb1b2 / pixels_nmb;
+        
+        if( pixels_nmb == 0 ) {
+          outmatrix( 0, index ) = DBL_MAX;
+        } else {
+          outmatrix( 0, index ) = ( sum4 / pixels_nmb - 4 * mean * sum3 /
+            pixels_nmb  + 6 * pow( mean, 2 ) * sumpb1b2_norm - 3 * pow( mean, 4 ) ) /
+            sigma4 - 3.;
+        }
+      } else {
+        outmatrix( 0, index ) = DBL_MAX;
+      }
+    }
+  }
+
+  return outmatrix;
+}
+
+
+TeMatrix TePDIStatistic::getVarCoefMatrix( unsigned int pol_index )
+{
+  TEAGN_TRUE_OR_THROW( pol_index < polygonset_->size(), "Invalid index" );
+  
+  TeMatrix outmatrix;
+  outmatrix.Init( 1, rasters_.size(), 0. );
+
+  double mean = 0.0;
+  double cov = 0.0;
+
+  for( unsigned int index = 0 ; index < rasters_.size() ; ++index ) {
+    mean = getMean( index, pol_index );
+
+    if( mean == DBL_MAX ) 
+    {
+      outmatrix( 0, index ) = DBL_MAX;
+    }
+    else if( mean == 0 ) 
+    {
+      outmatrix( 0, index ) = DBL_MAX;
+    }
+    else
+    {
+      cov = getCovariance( index, index, pol_index );
+      
+      if( cov == DBL_MAX )
+      {
+        outmatrix( 0, index ) = DBL_MAX;
+      }
+      else
+      {
+        outmatrix( 0, index ) = sqrt(
+          getCovariance( index, index, pol_index ) ) / mean;
+      }
+    }
+  }
+
+  return outmatrix;
+}
+
+
+TeMatrix TePDIStatistic::getCovMatrix( unsigned int pol_index )
+{
+  TEAGN_TRUE_OR_THROW( pol_index < polygonset_->size(), "Invalid index" );
+  
+  TeMatrix outmatrix;
+  outmatrix.Init( rasters_.size(), rasters_.size(), 0. );
+
+  for( unsigned int band1 = 0 ; band1 < rasters_.size() ; ++band1 ) {
+    for( unsigned int band2 = 0 ; band2 < rasters_.size() ; ++band2 ) {
+      outmatrix( band1, band2 ) = 
+        getCovariance( band1, band2, pol_index );
+    }
+  }
+
+  return outmatrix;
+}
+
+
+TeMatrix TePDIStatistic::getCorMatrix( unsigned int pol_index )
+{
+  TEAGN_TRUE_OR_THROW( pol_index < polygonset_->size(), "Invalid index" );
+  
+  TeMatrix outmatrix;
+  outmatrix.Init( rasters_.size(), rasters_.size(), 0. );
+
+  for( unsigned int band1 = 0 ; band1 < rasters_.size() ; ++band1 ) {
+    for( unsigned int band2 = 0 ; band2 < rasters_.size() ; ++band2 ) {
+      outmatrix( band1, band2 ) = 
+        getCorrelation( band1, band2, pol_index );
+    }
+  }
+
+  return outmatrix;
+}
+
+
+TeMatrix TePDIStatistic::getVarMatrix( unsigned int pol_index )
+{
+  TEAGN_TRUE_OR_THROW( pol_index < polygonset_->size(), "Invalid index" );
+  
+  TeMatrix outmatrix;
+  outmatrix.Init( rasters_.size(), 1, 0. );
+
+  for( unsigned int band = 0 ; band < rasters_.size() ; ++band ) {
+    outmatrix( band, 0 ) = getVariance( band, pol_index );
+  }
+
+  return outmatrix;
+}
+
+TeMatrix TePDIStatistic::getStdDevMatrix( unsigned int pol_index )
+{
+  TEAGN_TRUE_OR_THROW( pol_index < polygonset_->size(), "Invalid index" );
+  
+  TeMatrix outmatrix;
+  outmatrix.Init( rasters_.size(), 1, 0. );
+
+  for( unsigned int band = 0 ; band < rasters_.size() ; ++band ) {
+    outmatrix( band, 0 ) = getStdDev( band, pol_index );
+  }
+
+  return outmatrix;
+}
+
+void TePDIStatistic::clear()
+{
+  polygonset_.reset();
+  rasters_.clear();
+  bands_.clear();
+
+  std::map< CoupleRasterCachesKeyT, TePDIJointHistogram* >::iterator jhcit =
+    jHistoCache_.begin();
+  while( jhcit != jHistoCache_.end() )
+  {
+    delete jhcit->second;
+    ++jhcit;
+  }
+  jHistoCache_.clear();
+
+  histo_cache_.clear();
+}
+
+
diff --git a/src/terralib/image_processing/TePDIStatistic.hpp b/src/terralib/image_processing/TePDIStatistic.hpp
new file mode 100755
index 0000000..6918b45
--- /dev/null
+++ b/src/terralib/image_processing/TePDIStatistic.hpp
@@ -0,0 +1,505 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDISTATISTIC_HPP
+  #define TEPDISTATISTIC_HPP
+
+  #include "TePDIAlgorithm.hpp"
+  #include "TePDIParameters.hpp"
+  #include "TePDIJointHistogram.hpp"
+  #include "TePDIHistogram.hpp"
+  #include <TeSharedPtr.h>
+  #include "TePDITypes.hpp"
+
+  #include <TeMatrix.h>
+  #include <TeGeometry.h>
+
+  #include <map>
+
+  /**
+   * @brief This is the class for statistic calcules over raster data.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup TePDIGeneralAlgoGroup
+   *
+   * @note The general required parameters are:
+   *
+   * @param rasters ( TePDITypes::TePDIRasterVectorType ) - A vector of all used 
+   * rasters ( NOTE: When more then one band is used from the same raster,
+   * this raster must appear more then one time ).
+   * @param bands ( std::vector< int > ) - A vector of all used bands
+   * for each raster inside the reasters vector above respectively.
+   *
+   * @note The following parameters are optional, and will be used if
+   * present.
+   *
+   * @param polygonset ( TePDITypes::TePDIPolygonSetPtrType ) - Restriction 
+   * polygon set - The area where to do calcules over all rasters - If
+   * not present the entire raster area will be used.   
+   * @param histograms ( std::vector< TePDIHistogram::pointer > ) - 
+   * A vector of all raster histogram references ( internal histogram 
+   * generation will be disabled - This parameter cannot be used 
+   * when the parameter polygonset is present );
+   * @param iterator_strat ( TeStrategicIterator ) - The iteration strategy
+   * used when analysing the raster elements ( default value:
+   * TeBoxPixelIn - Only pixels with center inside the polygonset will be
+   * considered ).
+   *
+   * @note For the methods using two or more channels(bands):
+   * No spatial overlay is checked. Images with the same
+   * number of lines and columns are required.
+   */
+  class PDI_DLL TePDIStatistic : public TePDIAlgorithm {
+    public :
+    
+      /** @typedef TeSharedPtr< TePDIStatistic > pointer 
+          Type definition for a instance pointer */
+      typedef TeSharedPtr< TePDIStatistic > pointer;
+      
+      /** @typedef const TeSharedPtr< TePDIStatistic > const_pointer 
+          Type definition for a const instance pointer */
+      typedef const TeSharedPtr< TePDIStatistic > const_pointer;    
+
+      /**
+       * @brief Default Constructor.
+       *
+       */
+      TePDIStatistic();
+
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIStatistic();
+
+      /**
+       * @brief Checks if the supplied parameters fits the requirements of each
+       * PDI algorithm implementation.
+       *
+       * @note Error log messages must be generated. No exceptions generated.
+       *
+       * @param parameters The parameters to be checked.
+       * @return true if the parameters are OK. false if not.
+       */
+      bool CheckParameters( const TePDIParameters& parameters ) const;
+      
+      /**
+       * @brief Generates the histogram for a given raster/band.
+       * 
+       * @note The internal histogram generation will use 256 levels
+       * for interpolated histograms when generated from floating point
+       * data type rasters.
+       * @param raster_index Index for the raster ( using the
+       * supplied parameters ).
+       * @param pol_index The polygon index inside the polygon set
+       * ( if no polygon set is present, use de default zero value ).
+       * @return The histogram pointer.
+       */
+      const TePDIHistogram& getHistogram( unsigned int raster_index, 
+        unsigned int pol_index = 0 );      
+      
+      /**
+       * @brief Generates the joint histogram for a given raster/band pair.
+       * 
+       * @param raster1_index Index for the first raster.
+       * @param raster2_index Index for the second raster.
+       * @param pol_index The polygon index inside the polygon set
+       * ( if no polygon set is present, use de default zero value ).
+       * @return The histogram reference.
+       */
+      const TePDIJointHistogram& getJointHistogram( 
+        unsigned int raster1_index, unsigned int raster2_index,
+        unsigned int pol_index = 0 );
+
+      /**
+       * @brief Sum of all pixels values.
+       *
+       * @param raster_index Index for the raster ( using the
+       * supplied parameters )
+       * @param pol_index The polygon index inside the polygon set
+       * ( if no polygon set is present, use de default zero value ).
+       * @return The sum value or DBL_MAX when an error occurs.
+       */
+      double getSum( unsigned int raster_index, unsigned int pol_index = 0 );
+      
+      /**
+       * @brief The cubic sum of pixels values.
+       *
+       * @param raster_index Index for the used raster / band ( using the
+       * supplied parameters ).
+       * @param pol_index The polygon index inside the polygon set
+       * ( if no polygon set is present, use de default zero value ).
+       * @return The pixel level sum or DBL_MAX when an error occurs.
+       */
+      double getSum3( unsigned int raster_index, unsigned int pol_index = 0 );
+
+      /**
+       * @brief The quartic sum of pixels values.
+       *
+       * @param raster_index Index for the used raster / band ( using the
+       * supplied parameters ).
+       * @param pol_index The polygon index inside the polygon set
+       * ( if no polygon set is present, use de default zero value ).
+       * @return The pixel level sum or DBL_MAX when an error occurs.
+       */
+      double getSum4( unsigned int raster_index, unsigned int pol_index = 0 );      
+      
+      /**
+       * @brief Mean pixels value for input_image1.
+       *
+       * @param raster_index Index for the raster ( using the
+       * supplied parameters )
+       * @param pol_index The polygon index inside the polygon set
+       * ( if no polygon set is present, use de default zero value ).
+       * @return The mean value or DBL_MAX when an error occurs.
+       */
+      double getMean( unsigned int raster_index, unsigned int pol_index = 0 );      
+
+      /**
+       * @brief Covariance between two bands.
+       *
+       * @param raster1_index Index for the first used raster / band ( using the
+       * supplied parameters )
+       * @param raster2_index Index for the second used raster / band ( using the
+       * supplied parameters )
+       * @param pol_index The polygon index inside the polygon set
+       * ( if no polygon set is present, use de default zero value ).
+       * @return The covariance value or DBL_MAX when an error occurs.
+       */
+      double getCovariance( unsigned int raster1_index,  
+        unsigned int raster2_index, unsigned int pol_index = 0 );
+
+      /**
+       * @brief Variance of one band data.
+       *
+       * @param raster_index Index for the used raster / band ( using the
+       * supplied parameters )
+       * @param pol_index The polygon index inside the polygon set
+       * ( if no polygon set is present, use de default zero value ).
+       * @return The variance value or DBL_MAX when an error occurs.
+       */
+      double getVariance( unsigned int raster_index, 
+        unsigned int pol_index = 0 );
+      
+      /**
+       * @brief Standard deviation of one band data.
+       *
+       * @param raster_index Index for the used raster / band ( using the
+       * supplied parameters )
+       * @param pol_index The polygon index inside the polygon set
+       * ( if no polygon set is present, use de default zero value ).
+       * @return The Standard deviation value or DBL_MAX when an 
+       * error occurs.
+       */
+      double getStdDev( unsigned int raster_index,
+        unsigned int pol_index = 0 );      
+                
+      /**
+       * @brief Entropy of one band data.
+       *
+       * @param raster_index Index for the used raster / band ( using the
+       * supplied parameters )
+       * @param pol_index The polygon index inside the polygon set
+       * ( if no polygon set is present, use de default zero value ).
+       * @return The entropy value or DBL_MAX when an 
+       * error occurs.
+       */
+      double getEntropy( unsigned int raster_index,
+        unsigned int pol_index = 0 );
+      
+      /**
+       * @brief The minimum pixel value of one band data.
+       *
+       * @param raster_index Index for the used raster / band ( using the
+       * supplied parameters )
+       * @param pol_index The polygon index inside the polygon set
+       * ( if no polygon set is present, use de default zero value ).
+       * @return The minimum pixel value value or DBL_MAX when an 
+       * error occurs.
+       */
+      double getMin( unsigned int raster_index, unsigned int pol_index = 0 );      
+
+      /**
+       * @brief The maximum pixel value of one band data.
+       *
+       * @param raster_index Index for the used raster / band ( using the
+       * supplied parameters )
+       * @param pol_index The polygon index inside the polygon set
+       * ( if no polygon set is present, use de default zero value ).
+       * @return The maximum pixel value value or DBL_MAX when an 
+       * error occurs.
+       */
+      double getMax( unsigned int raster_index, unsigned int pol_index = 0 );      
+
+      /**
+       * @brief The highest frequency pixel value of one band data (mode).
+       *
+       * @param raster_index Index for the used raster / band ( using the
+       * supplied parameters )
+       * @param pol_index The polygon index inside the polygon set
+       * ( if no polygon set is present, use de default zero value ).
+       * @return The highest frequency pixel value of one band data (mode)
+       * or DBL_MAX when an error occurs.
+       */
+      double getMode( unsigned int raster_index, unsigned int pol_index = 0 );      
+                  
+      /**
+       * @brief Correlation between two bands.
+       *
+       * @param raster1_index Index for the first used raster / band ( using the
+       * supplied parameters )
+       * @param raster2_index Index for the second used raster / band ( using the
+       * supplied parameters )
+       * @param pol_index The polygon index inside the polygon set
+       * ( if no polygon set is present, use de default zero value ).
+       * @return The correlation value or DBL_MAX when an error occurs.
+       */
+      double getCorrelation( unsigned int raster1_index,  
+        unsigned int raster2_index, unsigned int pol_index = 0 );
+
+      /**
+       * @brief The Percentile value of one band data.
+       *
+       * @param sample_index Sample index ( 0 -> 100 );
+       * @param raster_index Index for the used raster / band ( using the
+       * supplied parameters )
+       * @param pol_index The polygon index inside the polygon set
+       * ( if no polygon set is present, use de default zero value ).
+       * @return The highest frequency pixel value of one band data (mode)
+       * or DBL_MAX when an error occurs.
+       */
+      double getPercentile( double sample_index, unsigned int raster_index, 
+        unsigned int pol_index = 0 );
+
+      /**
+       * @brief Mean matrix calcule.
+       *
+       * @note Lines = 1, Columns = total bands/rasters number.
+       *
+       * @param raster_index Index for the used raster / band ( using the
+       * supplied parameters )
+       * @param pol_index The polygon index inside the polygon set
+       * ( if no polygon set is present, use de default zero value ).
+       * @return The mean matrix.
+       * @note Those matrix elements where an error ocurred are
+       * marked with value DBL_MAX;
+       */
+      TeMatrix getMeanMatrix( unsigned int pol_index = 0 );
+
+      /**
+       * @brief Central moments matrix.
+       *
+       * @note Lines = 3, Columns = total bands/rasters number.
+       *
+       * @param raster_index Index for the used raster / band ( using the
+       * supplied parameters )
+       * @param pol_index The polygon index inside the polygon set
+       * ( if no polygon set is present, use de default zero value ).
+       * @return The central moments matrix.
+       * @note Those matrix elements where an error ocurred are
+       * marked with value DBL_MAX;       
+       */
+      TeMatrix getCMMatrix( unsigned int pol_index = 0 );
+
+      /**
+       * @brief Assimetry coefficients matrix.
+       *
+       * @note Lines = 1, Columns = total bands/rasters number.
+       *
+       * @param pol_index The polygon index inside the polygon set
+       * ( if no polygon set is present, use de default zero value ).
+       * @return The Assimetry coefficients matrix.
+       * @note Those matrix elements where an error ocurred are
+       * marked with value DBL_MAX;          
+       */
+      TeMatrix getAssimetryMatrix( unsigned int pol_index = 0 );
+
+      /**
+       * @brief Kurtosis coefficients matrix.
+       *
+       * @note Lines = 1, Columns = total bands/rasters number.
+       *
+       * @param pol_index The polygon index inside the polygon set
+       * ( if no polygon set is present, use de default zero value ).
+       * @return The Kurtosis coefficients matrix.
+       * @note Those matrix elements where an error ocurred are
+       * marked with value DBL_MAX;               
+       */
+      TeMatrix getKurtosisMatrix( unsigned int pol_index = 0 );
+
+      /**
+       * @brief Variation coefficients matrix.
+       *
+       * @note Lines = 1, Columns = total bands/rasters number.
+       * @param pol_index The polygon index inside the polygon set
+       * ( if no polygon set is present, use de default zero value ).*
+       * @return The Variation coefficients matrix.
+       * @note Those matrix elements where an error ocurred are
+       * marked with value DBL_MAX;                  
+       */
+      TeMatrix getVarCoefMatrix( unsigned int pol_index = 0 );
+      
+      /**
+       * @brief Covariance matrix.
+       *
+       * @note Lines = total bands/rasters number, 
+       *       Columns = total bands/rasters number.
+       *
+       * @param pol_index The polygon index inside the polygon set
+       * ( if no polygon set is present, use de default zero value ).*
+       * @return The Covariance matrix.
+       * @note Those matrix elements where an error ocurred are
+       * marked with value DBL_MAX;         
+       */
+      TeMatrix getCovMatrix( unsigned int pol_index = 0 );      
+      
+      /**
+       * @brief Correlation matrix.
+       *
+       * @note Lines = total bands/rasters number, 
+       *       Columns = total bands/rasters number.
+       *
+       * @param pol_index The polygon index inside the polygon set
+       * ( if no polygon set is present, use de default zero value ).*
+       * @return The Correlation matrix.
+       * @note Those matrix elements where an error ocurred are
+       * marked with value DBL_MAX;        
+       */
+      TeMatrix getCorMatrix( unsigned int pol_index = 0 );        
+      
+      /**
+       * @brief Variance matrix.
+       *
+       * @note Lines = total bands/rasters number, 
+       *       Columns = 1.
+       *
+       * @param pol_index The polygon index inside the polygon set
+       * ( if no polygon set is present, use de default zero value ).*
+       * @return The Variance matrix.
+       * @note Those matrix elements where an error ocurred are
+       * marked with value DBL_MAX;        
+       */
+      TeMatrix getVarMatrix( unsigned int pol_index = 0 );       
+      
+      /**
+       * @brief Standard deviation matrix.
+       *
+       * @note Lines = total bands/rasters number, 
+       *       Columns = 1.
+       *
+       * @param pol_index The polygon index inside the polygon set
+       * ( if no polygon set is present, use de default zero value ).*
+       * @return The Standard deviation matrix.
+       * @note Those matrix elements where an error ocurred are
+       * marked with value DBL_MAX;        
+       */
+      TeMatrix getStdDevMatrix( unsigned int pol_index = 0 );          
+
+    protected :
+    
+      /**
+       * @typedef std::pair< unsigned int, unsigned int  > SingleRasterCachesKeyT
+       * A type definition for a cache related to a single raster.
+       * @param "unsigned int" Raster index.
+       * @param "unsigned int" Polygon index.       
+       */    
+      typedef std::pair< unsigned int, unsigned int  > SingleRasterCachesKeyT;
+      
+      /**
+       * @typedef std::pair< unsigned int, SingleRasterCachesKeyT  > CoupleRasterCachesKeyT
+       * A type definition for a cache related to a couple of rasters.
+       * @param "unsigned int" Raster1 index.
+       * @param "SingleRasterCachesKeyT" Raster2 index / polygon index.       
+       */    
+      typedef std::pair< unsigned int, SingleRasterCachesKeyT  > 
+        CoupleRasterCachesKeyT;      
+    
+      /**
+       * @brief The current restriction polygon set.
+       */
+      TePDITypes::TePDIPolygonSetPtrType polygonset_;
+      
+      /**
+       * @brief The current rasters.
+       */
+      TePDITypes::TePDIRasterVectorType rasters_;
+      
+      /**
+       * @brief The current rasters bands.
+       */
+      std::vector< int > bands_;
+
+      /**
+       * @brief Joint histograms cache.
+       */
+      std::map< CoupleRasterCachesKeyT, TePDIJointHistogram* > jHistoCache_;
+        
+      /**
+       * @brief A cache of level ordered histograms to avoid rebuilding
+       * histograms all the times.
+       */
+      std::map< SingleRasterCachesKeyT, TePDIHistogram::pointer > histo_cache_;
+      
+      /**
+       * @brief The current iterator strategy.
+       */      
+      TeStrategicIterator iterator_strat_;
+      
+      /**
+       * @brief Runs the current algorithm implementation.
+       *
+       * @return true if OK. false on error.
+       */
+      bool RunImplementation();
+
+      /**
+       * @brief Reset the internal state to the initial state.
+       *
+       * params The new parameters referente at initial state.
+       */
+      void ResetState( const TePDIParameters& params );
+        
+      /**
+       * @brief Sum of products between all pixels from different bands.
+       *
+       * @param raster1_index Index for the first used raster / band ( 
+       * using the supplied parameters ).
+       * @param raster2_index Index for the second used raster / band ( 
+       * using the supplied parameters ).
+       * @param pol_index The polygon index inside the polygon set
+       * ( if no polygon set is present, use de default zero value ).
+       * @return The Sum of products or DBL_MAX when an 
+       * error occurs.
+       */
+      double getSumPB1B2( unsigned int raster1_index,
+        unsigned int raster2_index, unsigned int pol_index );
+
+      //! Clears all internal allocated structures.
+      void clear();       
+   
+  };
+  
+/** @example TePDIStatistic_test.cpp
+ *    Shows how to use this class.
+ */    
+
+#endif //TEPDISTATISTIC_HPP
diff --git a/src/terralib/image_processing/TePDIStrategy.cpp b/src/terralib/image_processing/TePDIStrategy.cpp
new file mode 100755
index 0000000..17ee28e
--- /dev/null
+++ b/src/terralib/image_processing/TePDIStrategy.cpp
@@ -0,0 +1,35 @@
+#include "TePDIStrategy.hpp"
+#include <TeAgnostic.h>
+
+TePDIStrategy::TePDIStrategy()
+{
+  progress_interface_enabled_ = true;
+};      
+
+
+TePDIStrategy::~TePDIStrategy()
+{
+};
+
+
+TePDIStrategy* TePDIStrategy::DefaultObject( const TePDIParameters& )
+{
+  TEAGN_LOG_AND_THROW( "Trying to build an invalid strategy instance" );
+  return 0;
+}
+
+
+bool TePDIStrategy::Apply( const TePDIParameters& params )
+{
+  TEAGN_TRUE_OR_RETURN( CheckParameters( params ), 
+    "Parameter checking failed" );
+    
+  return Implementation( params );
+}
+
+
+void TePDIStrategy::ToggleProgInt( bool enabled )
+{
+  progress_interface_enabled_ = enabled;
+}
+
diff --git a/src/terralib/image_processing/TePDIStrategy.hpp b/src/terralib/image_processing/TePDIStrategy.hpp
new file mode 100755
index 0000000..8ec84b9
--- /dev/null
+++ b/src/terralib/image_processing/TePDIStrategy.hpp
@@ -0,0 +1,119 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDISTRATEGY_HPP
+  #define TEPDISTRATEGY_HPP
+
+  #include <TeSharedPtr.h>
+  #include "TePDIParameters.hpp"
+  
+  #include <string>
+
+  /**
+   * @brief This is the base class for digital image processing algorithms 
+   * strategies.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @note All TePDIStrategy derived classes must be a friend of the respective
+   * TePDIStrategyFactory derived class ( for private constructor access ).
+   * @ingroup PDIStrategies
+   */
+  class PDI_DLL TePDIStrategy
+  {
+//    friend class TePDIStrategyFactory;
+  
+    public :
+      /** @typedef TeSharedPtr< TePDIStrategy > pointer 
+        Type definition for a instance pointer */
+      typedef TeSharedPtr< TePDIStrategy > pointer;
+      
+      /** @typedef const TeSharedPtr< TePDIStrategy > const_pointer 
+        Type definition for a const instance pointer */
+      typedef const TeSharedPtr< TePDIStrategy > const_pointer;
+      
+      /**
+       * @brief Default Destructor
+       */
+      virtual ~TePDIStrategy();
+      
+      /**
+       * @brief Returns a default object.
+       *
+       * @return A default object.
+       */
+      static TePDIStrategy* DefaultObject( 
+        const TePDIParameters& params );     
+        
+      /**
+       * @brief Checks if the supplied parameters fits the requirements of each
+       * PDI strategy.
+       *
+       * @note Error log messages must be generated. No exceptions generated.
+       *
+       * @param parameters The parameters to be checked.
+       * @return true if the parameters are OK. false if not.
+       */
+      virtual bool CheckParameters( 
+        const TePDIParameters& parameters ) const = 0;
+        
+      /**
+       * @brief Applies the strategy.
+       *
+       * @note Parameters checking will be performed.
+       *
+       * @return true if OK. false on error.
+       */
+      bool Apply( const TePDIParameters& params );
+      
+      /**
+       * @brief Enable / Disable the progress interface.
+       *
+       * @param enabled Flag to enable ( true ) or disable ( false ).
+       */
+      void ToggleProgInt( bool enabled );                          
+
+    protected :
+    
+      /** @brief Progress interface enabled/disable flag */
+      mutable bool progress_interface_enabled_;
+      
+      /**
+       * @brief Default constructor
+       *
+       * @param factoryName Factory name.
+       */
+      TePDIStrategy();
+      
+      /**
+       * @brief Runs the algorithm implementation.
+       *
+       * @return true if OK. false on errors.
+       */
+      virtual bool Implementation( const TePDIParameters& params ) = 0;
+      
+  };
+  
+#endif
+
+
+
diff --git a/src/terralib/image_processing/TePDIStrategyFactory.cpp b/src/terralib/image_processing/TePDIStrategyFactory.cpp
new file mode 100755
index 0000000..ce21aa4
--- /dev/null
+++ b/src/terralib/image_processing/TePDIStrategyFactory.cpp
@@ -0,0 +1,11 @@
+ 
+#include "TePDIStrategyFactory.hpp"
+
+TePDIStrategyFactory::TePDIStrategyFactory( const std::string& factoryName )
+: TeFactory< TePDIStrategy, TePDIParameters >( factoryName )
+{
+};      
+
+TePDIStrategyFactory::~TePDIStrategyFactory()
+{
+};
diff --git a/src/terralib/image_processing/TePDIStrategyFactory.hpp b/src/terralib/image_processing/TePDIStrategyFactory.hpp
new file mode 100755
index 0000000..a73c4f9
--- /dev/null
+++ b/src/terralib/image_processing/TePDIStrategyFactory.hpp
@@ -0,0 +1,79 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef PDI_STRATEGY_FACTORIES_REGISTERED
+  #define PDI_STRATEGY_FACTORIES_REGISTERED
+  
+  /* Fusion Strategies Factories */
+  
+  #include "TePDIGarguetFusionSF.hpp"
+  #include "TePDIVenturaFusionSF.hpp"
+  #include "TePDIIHSFusionSF.hpp"
+  
+#endif 
+
+#ifndef TEPDISTRATEGYFACTORY_HPP
+  #define TEPDISTRATEGYFACTORY_HPP
+
+  #include <TeSharedPtr.h>
+  #include "TePDIStrategy.hpp"
+  #include "TePDIParameters.hpp"
+  
+  #include <TeFactory.h>
+  
+  #include <string>
+
+  /**
+   * @brief This is the class for digital image processing strategy factory.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIStrategyFactories
+   */
+  class PDI_DLL TePDIStrategyFactory : 
+    public TeFactory< TePDIStrategy, TePDIParameters >
+  {
+    public :
+      /** @typedef Type definition for a instance pointer */
+      typedef TeSharedPtr< TePDIStrategyFactory > pointer;
+      /** @typedef Type definition for a const instance pointer */
+      typedef const TeSharedPtr< TePDIStrategyFactory > const_pointer;
+      
+      /**
+       * @brief Default Destructor
+       */
+      virtual ~TePDIStrategyFactory();
+      
+    protected :
+      
+      /**
+       * @brief Default constructor
+       *
+       * @param factoryName Factory name.
+       */
+      TePDIStrategyFactory( const std::string& factoryName );
+  };
+  
+#endif
+
+
+
diff --git a/src/terralib/image_processing/TePDITypes.hpp b/src/terralib/image_processing/TePDITypes.hpp
new file mode 100755
index 0000000..dcbc541
--- /dev/null
+++ b/src/terralib/image_processing/TePDITypes.hpp
@@ -0,0 +1,136 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+/**
+ * @file TePDITypes.hpp
+ * @brief This file contains a set of type definitions used by PDI module
+ * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+ */
+
+#ifndef TEPDITYPES_HPP
+  #define TEPDITYPES_HPP
+
+  #include "TePDIDefines.hpp"
+  #include <TeSharedPtr.h>
+
+  #include <TeRaster.h>
+  #include <TeMatrix.h>
+  #include <TeLayer.h>
+  #include <TeGeometry.h>
+  #include <TeCoord2D.h>
+  #include <TeProjection.h>
+
+  #include <map>
+  #include <vector>
+
+  /**
+   * @brief This namespace contains the global types used by all PDI classes.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIModule
+   */
+  namespace TePDITypes
+  {
+    /**
+     * @brief Type definition for a simple LUT - Look-Up Table.
+     *
+     * @param double (First) input level.
+     * @param double (Second) output level.
+     */
+    typedef std::map< double, double > TePDILutType;
+    
+    /**
+     * @brief Type definition for a simple LUT pointer.
+     */
+    typedef TeSharedPtr< TePDILutType > TePDILutPtrType;    
+
+    /**
+     * @brief Type definition for a two dimentional LUT - Look-Up Table.
+     *
+     * @param double Input level from the first source image.
+     * @param TePDILutType A lut with input levels from the second source image.
+     */
+    typedef std::map< double, TePDILutType > TePDI2DLutType;
+
+    /**
+     * @brief Look-Up Table vector alias definition.
+     */
+    typedef std::vector< TePDILutType > TePDILutsVectorType;
+
+    /**
+     * @brief TeRaster pointer definition.
+     */
+    typedef TeSharedPtr< TeRaster > TePDIRasterPtrType;
+
+    /**
+     * @brief TeRasters vector definition.
+     */
+    typedef std::vector< TePDIRasterPtrType > TePDIRasterVectorType;
+    
+    /**
+     * @brief TeRasters vector pointer definition.
+     */
+    typedef TeSharedPtr< TePDIRasterVectorType > TePDIRasterVectorPtrType;    
+
+    /**
+     * @brief TeLayer pointer definition.
+     */
+    typedef TeSharedPtr< TeLayer > TePDILayerPtrType;
+    
+    /**
+     * @brief TePolygon pointer definition.
+     */
+    typedef TeSharedPtr< TePolygon > TePDIPolygonPtrType;    
+
+    /**
+     * @brief TePolygonSet pointer definition.
+     */
+    typedef TeSharedPtr< TePolygonSet > TePDIPolygonSetPtrType; 
+        
+    /**
+     * @brief TePolygonSet map definition.
+     */    
+    typedef std::map< double, TePolygonSet > TePDIPolSetMapType;      
+    
+    /**
+     * @brief TePolygonSet map pointer definition.
+     */
+    typedef TeSharedPtr< TePDIPolSetMapType > TePDIPolSetMapPtrType;      
+
+    /**
+     * @brief TeMatrix pointer definition.
+     */
+    typedef TeSharedPtr< TeMatrix > TePDIMatrixPtrType;
+    
+    /**
+     * @brief TeCoordPairVect pointer definition.
+     */
+    typedef TeSharedPtr< TeCoordPairVect > TeCoordPairVectPtrType;    
+    
+    /**
+     * @brief TeProjectionParams pointer definition.
+     */
+    typedef TeSharedPtr< TeProjectionParams > TeProjParamsPtrType;    
+  };
+
+#endif //TEPDITYPES_HPP
diff --git a/src/terralib/image_processing/TePDIUtils.cpp b/src/terralib/image_processing/TePDIUtils.cpp
new file mode 100755
index 0000000..456089f
--- /dev/null
+++ b/src/terralib/image_processing/TePDIUtils.cpp
@@ -0,0 +1,1594 @@
+#include "TePDIUtils.hpp"
+
+#include "TePDIInterpolator.hpp"
+#include "TePDIPIManager.hpp"
+
+#include <TeDecoderMemory.h>
+#include <TeDecoderMemoryMap.h>
+#include <TeDecoderTIFF.h>
+#include <TeRaster.h>
+#include <TeRasterParams.h>
+#include <TeDataTypes.h>
+#include <TeUtils.h>
+#include <TeDefines.h>
+#include <TeVectorRemap.h>
+#include <TeRasterTransform.h>
+#include <TeRasterRemap.h>
+#include <TeProgress.h>
+#include <TeAgnostic.h>
+
+#include <float.h>
+#include <math.h>
+#include <stdio.h>
+
+
+namespace TePDIUtils{
+
+
+  bool TeAllocRAMRaster(
+    TePDITypes::TePDIRasterPtrType& template_raster,
+    TePDITypes::TePDIRasterPtrType& RAMRaster,
+    unsigned int bands, bool force_new_dt, bool force_mm,
+    TeDataType pixel_type )
+  {
+    TEAGN_TRUE_OR_RETURN( template_raster.isActive(),
+      "Inactive Input Raster" );
+    TEAGN_TRUE_OR_RETURN( template_raster->params().status_ != TeRasterParams::TeNotReady,
+      "Input not Ready" );
+
+    TeRasterParams temp_params = template_raster->params();
+
+    if( bands != 0 ) {
+      temp_params.nBands( bands );
+    }
+
+    if( force_new_dt ) {
+      temp_params.setDataType( pixel_type, -1 );
+    }
+
+    return TeAllocRAMRaster( RAMRaster, temp_params, force_mm );
+  }
+
+
+  bool TeAllocRAMRaster(
+    TePDITypes::TePDIRasterPtrType& RAMRaster,
+    unsigned int bands, unsigned int lines, unsigned int columns,
+    bool force_mm, TeDataType pixel_type, TePDIRgbPalette* palette )
+  {
+    TEAGN_TRUE_OR_RETURN( bands > 0, "Invalid bands number" );
+    TEAGN_TRUE_OR_RETURN( lines > 0, "Invalid lines number" );
+    TEAGN_TRUE_OR_RETURN( columns > 0, "Invalid columns number" );
+
+    TeRasterParams temp_params;
+
+    temp_params.nBands( bands );
+
+    temp_params.setDataType( pixel_type, -1 );
+    
+    temp_params.setNLinesNColumns( lines, columns );
+    
+    if( palette != 0 ) {
+      temp_params.setPhotometric( TeRasterParams::TePallete );
+
+      temp_params.lutr_.clear();
+      temp_params.lutg_.clear();
+      temp_params.lutb_.clear();
+
+      TePDIRgbPalette::iterator pal_it = palette->begin();
+      TePDIRgbPalette::iterator pal_it_end = palette->end();
+
+      for( unsigned int lut_index = 0 ; lut_index < palette->size() ;
+           ++lut_index ) {
+
+        temp_params.lutr_.push_back( (unsigned short)pal_it->second.red_ );
+        temp_params.lutg_.push_back( (unsigned short)pal_it->second.green_ );
+        temp_params.lutb_.push_back( (unsigned short)pal_it->second.blue_ );
+
+        ++pal_it;
+      }
+    }    
+
+    return TeAllocRAMRaster( RAMRaster, temp_params, force_mm );
+  }
+  
+  bool TeAllocRAMRaster( TePDITypes::TePDIRasterPtrType& RAMRaster,
+    const TeRasterParams& params, bool force_mm )
+  {
+    return TeAllocRAMRaster( RAMRaster, params,
+      ( force_mm ? TePDIUtilsDiskMemPol : TePDIUtilsAutoMemPol ) );
+  }
+
+  
+  bool TeAllocRAMRaster( TePDITypes::TePDIRasterPtrType& RAMRaster,
+    const TeRasterParams& params, TePDIUtilsMemPol mempol )
+  {
+    TeRasterParams internal_params = params;
+    
+    internal_params.mode_ = 'c';
+  
+    if( mempol == TePDIUtilsRamMemPol ) {
+      internal_params.decoderIdentifier_ = "MEM";
+    } else if( mempol == TePDIUtilsDiskMemPol ) {
+      internal_params.decoderIdentifier_ = "MEMMAP";
+      
+      TEAGN_TRUE_OR_RETURN( TeGetTempFileName( internal_params.fileName_ ),
+        "Unable to get temporary file name" );         
+    } else {
+      /* Auto mem pol */
+      internal_params.decoderIdentifier_ = "SMARTMEM";
+    }
+    
+    if( RAMRaster.isActive() ) {
+      RAMRaster->updateParams( internal_params );
+      return RAMRaster->init( internal_params );
+    } else {
+      RAMRaster.reset( new TeRaster( internal_params ) );
+      return RAMRaster->init();
+    }
+  }
+  
+  
+  bool TeRaster2Geotiff(
+    const TePDITypes::TePDIRasterPtrType& in_raster,
+    const std::string& file_name )
+  {
+    return TeRaster2Geotiff( in_raster, file_name, false );
+  }  
+    
+
+  bool TeRaster2Geotiff(
+    const TePDITypes::TePDIRasterPtrType& in_raster,
+    const std::string& file_name, TeDataType pixel_type )
+  {
+    TEAGN_TRUE_OR_RETURN( in_raster.isActive(),
+      "Inactive Input Raster" );
+    TEAGN_TRUE_OR_RETURN( in_raster->params().status_ != 
+      TeRasterParams::TeNotReady, "Input not Ready" );
+    TEAGN_TRUE_OR_RETURN( file_name.size() != 0,
+      "Invalid file name" );
+
+    TeRasterParams temp_params = in_raster->params();
+
+    temp_params.mode_ = 'c';
+    temp_params.fileName_ = file_name;
+    temp_params.setDataType( pixel_type, -1 );
+    
+    /* Creating disk output raster */
+    
+    TeRaster outRaster;
+
+    outRaster.setDecoder( new TeDecoderTIFF( temp_params ) );
+
+    TEAGN_TRUE_OR_RETURN( outRaster.init(),
+      "Unable to init GeoTIFF Raster" );
+      
+    const unsigned int nlines = outRaster.params().nlines_;
+    const unsigned int ncols = outRaster.params().ncols_;
+    const unsigned int nbands = outRaster.params().nBands();
+    unsigned int line = 0 , col = 0 , band = 0;
+    double value = 0.0;
+    TeRaster& ir = (*in_raster);
+    
+    for( line = 0 ; line < nlines ; ++line )
+      for( band = 0 ; band < nbands ; ++band )
+        for( col = 0 ; col < ncols ; ++col )
+        {
+          ir.getElement( col, line, value, band );
+          outRaster.setElement( col, line, value, band );
+        }
+      
+    return true;
+  }
+  
+  
+
+  bool TeRaster2Geotiff(
+    const TePDITypes::TePDIRasterPtrType& in_raster,
+    const std::string& file_name, bool enable_progress )
+  {
+    TEAGN_TRUE_OR_RETURN( in_raster.isActive(),
+      "Inactive Input Raster" );
+    TEAGN_TRUE_OR_RETURN( in_raster->params().status_ != 
+      TeRasterParams::TeNotReady, "Input not Ready" );
+    TEAGN_TRUE_OR_RETURN( file_name.size() != 0,
+      "Invalid file name" );
+
+    TeRasterParams temp_params = in_raster->params();
+
+    temp_params.mode_ = 'c';
+    temp_params.fileName_ = file_name;
+    
+    /* Creating disk output raster */
+    
+    TeRaster outRaster;
+
+    outRaster.setDecoder( new TeDecoderTIFF( temp_params ) );
+
+    TEAGN_TRUE_OR_RETURN( outRaster.init(),
+      "Unable to init GeoTIFF Raster" );
+      
+    const unsigned int nlines = outRaster.params().nlines_;
+    const unsigned int ncols = outRaster.params().ncols_;
+    const unsigned int nbands = outRaster.params().nBands();
+    unsigned int line = 0 , col = 0 , band = 0;
+    double value = 0.0;
+    TeRaster& ir = (*in_raster);
+    
+    TePDIPIManager progress( "Generating GeoTIFF raster", 
+      nlines, enable_progress );      
+    
+    for( line = 0 ; line < nlines ; ++line )
+    {
+      for( band = 0 ; band < nbands ; ++band )
+      {
+        for( col = 0 ; col < ncols ; ++col )
+        {
+          ir.getElement( col, line, value, band );
+          outRaster.setElement( col, line, value, band );
+        }
+      }
+       
+      TEAGN_FALSE_OR_RETURN( progress.Increment(),
+        "Canceled by the user" )
+    }
+      
+    return true;
+  }  
+
+
+  bool TeCopyRasterPixels(
+    TePDITypes::TePDIRasterPtrType& source_raster,
+    unsigned int source_band,
+    TePDITypes::TePDIRasterPtrType& target_raster,
+    unsigned int target_band,
+    bool discretize_levels,
+    bool trunc_levels )
+  {
+    TEAGN_TRUE_OR_RETURN( source_raster.isActive(),
+      "Inactive Input Raster" );
+    TEAGN_TRUE_OR_RETURN( target_raster.isActive(),
+      "Inactive Output Raster" );
+    TEAGN_TRUE_OR_RETURN( source_raster->params().status_ != TeRasterParams::TeNotReady,
+      "Input not Ready" );
+    TEAGN_TRUE_OR_RETURN( target_raster->params().status_ == TeRasterParams::TeReadyToWrite,
+      "OutPut not Ready" );
+
+    TeRasterParams& source_params = source_raster->params();
+    TeRasterParams& target_params = target_raster->params();
+
+    TEAGN_TRUE_OR_RETURN( (int)source_band < source_params.nBands(),
+      "Invalid source band" );
+    TEAGN_TRUE_OR_RETURN( (int)target_band < target_params.nBands(),
+      "Invalid target band" );
+    TEAGN_TRUE_OR_RETURN( (
+      ( source_params.nlines_ == target_params.nlines_ ) &&
+      ( source_params.ncols_ == target_params.ncols_ ) ),
+      "Input and Output Raster's have different dimentions" );
+      
+    /* Dummy support */
+    
+    const bool source_raster_uses_dummy = source_raster->params().useDummy_;
+    double source_raster_dummy = 0;
+    if( source_raster_uses_dummy ) {
+      source_raster_dummy = source_raster->params().dummy_[ source_band ];
+    }
+    
+    const bool target_raster_uses_dummy = target_raster->params().useDummy_;
+    double target_raster_dummy = 0;
+    if( target_raster_uses_dummy ) {
+      target_raster_dummy = target_raster->params().dummy_[ target_band ];
+    } else if( source_raster_uses_dummy ) {
+      target_raster_dummy = source_raster_dummy;
+    }
+
+    /* Defining the valid values range base on the output raster pixel type */
+
+    double min_value = 0;
+    double max_value = 0;
+
+    TEAGN_TRUE_OR_RETURN(
+      TeGetRasterMinMaxBounds( target_raster, target_band, min_value, max_value ),
+      "Unable to get raster level bounds" );
+
+    /* Pixel by pixel copy loop */
+
+    double pixel_value;
+
+    for( int line = 0 ; line < source_params.nlines_ ; ++line ) {
+      for( int column = 0 ; column < source_params.ncols_ ; ++column ) {
+        if( source_raster->getElement( column, line, pixel_value, 
+          source_band ) ) {
+          
+          if( discretize_levels ) {
+            pixel_value = TeRound( pixel_value );
+          }
+
+          if( trunc_levels ) {
+            if( pixel_value < min_value ) {
+              pixel_value = min_value;
+            } else if( pixel_value > max_value ) {
+              pixel_value = max_value;
+            }
+          }
+
+          TEAGN_TRUE_OR_RETURN( target_raster->setElement( column, line,
+            pixel_value, target_band ), "Pixel copy error" );
+        } else {
+          TEAGN_TRUE_OR_RETURN( source_raster_uses_dummy,
+            "Unable to read from input raster" );
+            
+          TEAGN_TRUE_OR_RETURN( target_raster->setElement( column, line,
+            target_raster_dummy, target_band ), "Pixel copy error" );          
+        }
+      }
+    }
+
+    return true;
+  }
+
+
+  bool TeCopyRasterBands(
+    TePDITypes::TePDIRasterPtrType& source_raster,
+    TePDITypes::TePDIRasterPtrType& target_raster,
+    bool discretize_levels,
+    bool trunc_levels )
+  {
+    TEAGN_TRUE_OR_RETURN( source_raster.isActive(),
+      "Inactive Input Raster" );
+    TEAGN_TRUE_OR_RETURN( target_raster.isActive(),
+      "Inactive Output Raster" );
+    TEAGN_TRUE_OR_RETURN( source_raster->params().status_ != TeRasterParams::TeNotReady,
+      "Input not Ready" );
+    TEAGN_TRUE_OR_RETURN( target_raster->params().status_ == TeRasterParams::TeReadyToWrite,
+      "OutPut not Ready" );
+
+    TeRasterParams& source_params = source_raster->params();
+    TeRasterParams& target_params = target_raster->params();
+
+    TEAGN_TRUE_OR_RETURN(
+      ( ( source_params.nBands() == target_params.nBands() ) &&
+      ( source_params.nlines_ == target_params.nlines_ ) &&
+      ( source_params.ncols_ == target_params.ncols_ ) ),
+      "Input and Output Raster's have different dimentions" );
+
+    for( int band = 0 ; band < source_params.nBands() ; ++band ) {
+      TEAGN_TRUE_OR_RETURN( TeCopyRasterPixels( source_raster, band, target_raster,
+        band, discretize_levels,trunc_levels ), "Unable to copy band " +
+        Te2String( band ) );
+    }
+
+    return true;
+  }
+
+  
+  bool TeGetRasterMinMaxBounds( 
+    const TePDITypes::TePDIRasterPtrType& raster,
+    unsigned int band, double& min, double& max )
+  {
+    TEAGN_TRUE_OR_RETURN( raster.isActive(),
+      "Inactive Input Raster" );
+
+    TeRasterParams& params = raster->params();
+
+    TEAGN_TRUE_OR_RETURN( (int)band < params.nBands(),
+      "Invalid source band" );
+
+    switch( params.dataType_[ band ] ) {
+      case TeBIT :
+      {
+        max = 1;
+        min = 0;
+        break;
+      }
+      case TeUNSIGNEDCHAR :
+      {
+        max = pow( 2., (double)sizeof( unsigned char ) * 8. ) - 1;
+        min = 0;
+        break;
+      }
+      case TeUNSIGNEDSHORT :
+      {
+        max = pow( 2., (double)sizeof( short ) * 8. ) - 1;
+        min = 0;
+        break;
+      }
+      case TeUNSIGNEDLONG :
+      {
+        max = pow( 2., (double)sizeof( unsigned long ) * 8. ) - 1;
+        min = 0;
+        break;
+      }
+      case TeCHAR :
+      {
+        max = ( pow( 2., (double)sizeof( char ) * 8. ) ) / 2;
+        min = -1 * max;
+        break;
+      }
+      case TeSHORT :
+      {
+        max = ( pow( 2., (double)sizeof( short ) * 8. ) ) / 2;
+        min = -1 * max;
+        break;
+      }
+      case TeINTEGER :
+      {
+        max = ( pow( 2., (double)sizeof( int ) * 8. ) ) / 2;
+        min = -1 * max;
+        break;
+      }
+      case TeLONG :
+      {
+        max = ( pow( 2., (double)sizeof( long ) * 8. ) ) / 2;
+        min = -1 * max;
+        break;
+      }
+      case TeFLOAT :
+      {
+        max = FLT_MAX;
+        min = -1 * max;
+        break;
+      }
+      case TeDOUBLE :
+      {
+        max = DBL_MAX;
+        min = -1 * max;
+        break;
+      }
+      default :
+      {
+        TEAGN_LOG_AND_RETURN( "Invalid raster pixel type" );
+        break;
+      }
+    }
+
+    return true;
+  }
+  
+  
+  unsigned long int TeGetRasterReqMem( TeRasterParams& params )
+  {
+    unsigned long int req_mem = 0;
+
+    for( int band = 0 ; band < params.nBands() ; ++band ) {
+      req_mem += params.elementSize( band ) * 
+        params.nlines_ * params.ncols_;
+    }
+    
+    req_mem += sizeof( unsigned short ) * params.lutr_.size();
+    req_mem += sizeof( unsigned short ) * params.lutg_.size();
+    req_mem += sizeof( unsigned short ) * params.lutb_.size();  
+    
+    return req_mem;
+  }
+
+  
+  bool rasterCompare( TePDITypes::TePDIRasterPtrType& raster1,
+    TePDITypes::TePDIRasterPtrType& raster2 )
+  {
+    TEAGN_TRUE_OR_THROW( raster1.isActive(), "Raster1 not active" );
+    TEAGN_TRUE_OR_THROW( raster2.isActive(), "Raster2 not active" );
+    TEAGN_TRUE_OR_THROW( raster1->params().status_ != TeRasterParams::TeNotReady,
+      "Raster1 not ready" );
+    TEAGN_TRUE_OR_THROW( raster2->params().status_ != TeRasterParams::TeNotReady,
+      "Raster2 not ready" );
+
+    TeRasterParams par1 = raster1->params();
+    TeRasterParams par2 = raster2->params();
+
+    if( ( par1.nBands() != par2.nBands() ) ||
+        ( par1.ncols_ != par2.ncols_ ) ||
+        ( par1.nlines_ != par2.nlines_ ) ) {
+
+      return false;
+    }
+
+    for( int bandt = 0 ; bandt < par1.nBands() ; ++bandt ) {
+      if( ( par1.dataType_[ bandt ] != par2.dataType_[ bandt ] ) ||
+          ( par1.photometric_[ bandt ] != par2.photometric_[ bandt ] ) ) {
+
+        return false;
+      }
+    }
+
+    unsigned int lines = ( unsigned int ) par1.nlines_;
+    unsigned int columns = ( unsigned int ) par1.ncols_;
+    double value1 = 0;
+    double value2 = 0;
+
+    for( int band = 0 ; band < par1.nBands() ; ++band ) {
+      for( unsigned int line = 0 ; line < lines ; ++line ) {
+        for( unsigned int column = 0 ; column < columns ; ++column ) {
+          if( raster1->getElement( column, line, value1, band ) !=
+              raster2->getElement( column, line, value2, band ) ) {
+
+            return false;
+          }
+
+          if( value1 != value2 ) {
+            return false;
+          }
+        }
+      }
+    }
+
+    return true;
+  }
+  
+  
+  bool IsFloatBand( const TePDITypes::TePDIRasterPtrType& raster, 
+    unsigned int band  )
+  {
+    TEAGN_TRUE_OR_THROW( raster.isActive(),
+      "Inactive Input Raster" );
+
+    TeRasterParams& params = raster->params();
+
+    TEAGN_TRUE_OR_THROW( (int)band < params.nBands(),
+      "Invalid source band" );
+
+    switch( params.dataType_[ band ] ) {
+      case TeBIT :
+      {
+        return false;
+        break;
+      }
+      case TeUNSIGNEDCHAR :
+      {
+        return false;
+        break;
+      }
+      case TeUNSIGNEDSHORT :
+      {
+        return false;
+        break;
+      }
+      case TeUNSIGNEDLONG :
+      {
+        return false;
+        break;
+      }
+      case TeCHAR :
+      {
+        return false;
+        break;
+      }
+      case TeSHORT :
+      {
+        return false;
+        break;
+      }
+      case TeINTEGER :
+      {
+        return false;
+        break;
+      }
+      case TeLONG :
+      {
+        return false;
+        break;
+      }
+      case TeFLOAT :
+      {
+        return true;
+        break;
+      }
+      case TeDOUBLE :
+      {
+        return true;
+        break;
+      }
+      default :
+      {
+        TEAGN_LOG_AND_THROW( "Invalid raster pixel type" );
+        return false;
+        break;
+      }
+    }
+  }
+  
+  
+  void MapCoords2RasterIndexes( const TeCoord2D& g_in, 
+    const TePDITypes::TePDIRasterPtrType& raster, TeCoord2D& g_out )
+  {
+    TEAGN_TRUE_OR_THROW( raster.isActive(), "Inactive raster" );
+    
+    g_out = raster->coord2Index( g_in );
+  };
+  
+  
+  void MapCoords2RasterIndexes( const TeBox& box_in, 
+      const TePDITypes::TePDIRasterPtrType& raster, TeBox& box_out )
+  {
+    TEAGN_TRUE_OR_THROW( raster.isActive(), "Inactive raster" );
+    
+    TeBox temp_box( raster->coord2Index( box_in.lowerLeft() ),
+      raster->coord2Index( box_in.upperRight() ) );
+      
+    box_out = temp_box;
+  };  
+  
+  
+  void MapRasterIndexes2Coords( const TeCoord2D& g_in, 
+    const TePDITypes::TePDIRasterPtrType& raster, TeCoord2D& g_out )
+  {
+    TEAGN_TRUE_OR_THROW( raster.isActive(), "Inactive raster" );
+      
+    g_out = raster->index2Coord( g_in );
+  };  
+  
+  
+  void MapRasterIndexes2Coords( const TeBox& box_in, 
+      const TePDITypes::TePDIRasterPtrType& raster, TeBox& box_out )
+  {
+    TEAGN_TRUE_OR_THROW( raster.isActive(), "Inactive raster" );
+    
+    TeBox temp_box( raster->index2Coord( box_in.lowerLeft() ),
+      raster->index2Coord( box_in.upperRight() ) );
+      
+    box_out = temp_box;
+  };   
+  
+  
+  void makeSegmentSet( const TeLinearRing& g_in, TeLineSet& g_out )
+  {
+    g_out.clear();
+    
+    const int bound = g_in.size() - 1 ;
+    
+    for( int index = 0 ; index < bound ; ++index ) {
+      TeLine2D line;
+      
+      line.add( g_in[ index ] );
+      line.add( g_in[ index + 1 ] );
+      
+      g_out.add( line );
+    }
+  }
+  
+  
+  bool IsDiscreteLut( const TePDITypes::TePDILutType& lut )
+  {
+    TEAGN_TRUE_OR_THROW( ( lut.size() > 0 ), "Emptry lut" );
+  
+    TePDITypes::TePDILutType::const_iterator it = lut.begin();
+    const TePDITypes::TePDILutType::const_iterator it_end = lut.end();
+  
+    while( it != it_end ) {
+      if( it->first != floor( it->first ) ) {
+        return false;
+      }
+      
+      ++it;
+    }
+    
+    return true;
+  }
+  
+  
+  bool buildDetailedBox( const TePDITypes::TePDIRasterPtrType& raster,
+    TePolygon& box )
+  {
+    box.clear();
+    
+    TEAGN_TRUE_OR_RETURN( raster.isActive(), "raster inactive" );
+    
+    TeLinearRing lr;
+    double lines = (double)raster->params().nlines_;
+    double cols = (double)raster->params().ncols_;
+    double offset = 0;
+    
+    /* Adding top box border ( direction left -> right )*/
+    
+    for( offset = 0 ; offset < cols ; ++offset ) {
+      lr.add( raster->index2Coord( TeCoord2D( offset, 0 ) ) );
+    }
+    
+    /* Adding right box border ( direction up -> down) */
+    
+    for( offset = 1 ; offset < lines ; ++offset ) {
+      lr.add( raster->index2Coord( TeCoord2D( cols - 1, offset ) ) );
+    }
+    
+    /* Adding bottom box border ( direction right ->left )*/
+    
+    for( offset = 1 ; offset < cols ; ++offset ) {
+      lr.add( raster->index2Coord( 
+        TeCoord2D( cols - 1 - offset, lines - 1 ) ) );
+    }      
+    
+    /* Adding left box border ( bottom -> top )*/
+    
+    for( offset = 1 ; offset < lines ; ++offset ) {
+      lr.add( raster->index2Coord( 
+        TeCoord2D( 0, lines - 1 - offset ) ) );
+    }
+        
+    box.add( lr );
+    
+    return true;
+  }
+  
+  
+  bool buildDetailedBBox( const TePDITypes::TePDIRasterPtrType& raster,
+    TePolygon& box )
+  {
+    box.clear();
+    
+    TEAGN_TRUE_OR_RETURN( raster.isActive(), "raster inactive" );
+    
+    TeLinearRing lr;
+    const double lines = (double)raster->params().nlines_;
+    const double cols = (double)raster->params().ncols_;
+    double offset = 0;
+    
+    /* Adding top box border ( direction left -> right )*/
+    
+    for( offset = 0 ; offset <= cols ; ++offset ) {
+      lr.add( raster->index2Coord( TeCoord2D( ( offset - 0.5 ), -0.5 ) ) );
+    }
+    
+    /* Adding right box border ( direction up -> down) */
+    
+    for( offset = 0 ; offset < lines ; ++offset ) {
+      lr.add( raster->index2Coord( 
+        TeCoord2D( ( cols - 0.5 ), offset + 0.5) ) );
+    }
+    
+    /* Adding bottom box border ( direction right ->left )*/
+    
+    for( offset = 0 ; offset < cols ; ++offset ) {
+      lr.add( raster->index2Coord( 
+        TeCoord2D( ( cols - 1.5 - offset ), ( lines - 0.5 ) ) ) );
+    }      
+    
+    /* Adding left box border ( bottom -> top )*/
+    
+    for( offset = 0 ; offset < lines ; ++offset ) {
+      lr.add( raster->index2Coord( 
+        TeCoord2D( -0.5, ( lines - 1.5 - offset ) ) ) );
+    }
+        
+    box.add( lr );
+    
+    return true;
+  }  
+  
+  
+  void getGeodeticPixelRes( TeRasterParams& params,
+    double& x_res, double& y_res )
+  {
+    TEAGN_TRUE_OR_THROW( ( params.projection() != 0 ),
+      "Missing projection" )
+    TEAGN_TRUE_OR_THROW( ( params.projection()->name() != "NoProjection" ),
+      "Invalid projection" );
+      
+    TeCoord2D pixel00( 0, 0 );
+    TeCoord2D rightpixel( 1, 0 );
+    TeCoord2D bottompixel( 0, 1 );
+      
+    pixel00 = params.index2Coord( pixel00 );
+    rightpixel = params.index2Coord( rightpixel );
+    bottompixel = params.index2Coord( bottompixel );
+    
+    pixel00 = params.projection()->PC2LL( pixel00 );
+    rightpixel = params.projection()->PC2LL( rightpixel );
+    bottompixel = params.projection()->PC2LL( bottompixel );
+    
+    x_res = TeDistance( rightpixel, pixel00 );
+    y_res = TeDistance( bottompixel, pixel00 );  
+  }
+  
+    
+  bool reprojectRaster( const TePDITypes::TePDIRasterPtrType& input_raster,
+    TeProjection& target_projection, double target_resx, double target_resy,
+    TePDITypes::TePDIRasterPtrType& output_raster )
+  {
+    TEAGN_TRUE_OR_RETURN( input_raster.isActive(), 
+      "input_raster not active" );
+    TEAGN_TRUE_OR_RETURN( output_raster.isActive(), "Raster2 not active" );
+    TEAGN_TRUE_OR_RETURN( 
+      input_raster->params().status_ != TeRasterParams::TeNotReady,
+      "input_raster not ready" );
+    TEAGN_TRUE_OR_RETURN( 
+      output_raster->params().status_ != TeRasterParams::TeNotReady,
+      "output_raster not ready" ); 
+    TEAGN_TRUE_OR_RETURN( ( input_raster->params().projection() != 0 ),
+      "Missing input_raster projection" )
+    TEAGN_TRUE_OR_RETURN( 
+      ( input_raster->params().projection()->name() != "NoProjection" ),
+      "Invalid input_raster projection" );
+      
+    /* Building the remmaped box */
+      
+    TePolygon original_box_pol;
+    TEAGN_TRUE_OR_RETURN( TePDIUtils::buildDetailedBox( input_raster,
+      original_box_pol ), 
+      "Unable to build detailed box" );
+        
+    TePolygon reprojected_box_pol;  
+    TeVectorRemap( original_box_pol, input_raster->params().projection(),
+      reprojected_box_pol, &target_projection );    
+      
+    /* Remmaping raster */
+  
+    TeRasterParams output_raster_params = output_raster->params();
+    
+    output_raster_params.projection( &target_projection );
+    
+    output_raster_params.nBands( input_raster->params().nBands() );
+    output_raster_params.setDataType( 
+      input_raster->params().dataType_[ 0 ] );
+    output_raster_params.setPhotometric( 
+      input_raster->params().photometric_[ 0 ] );
+    if( input_raster->params().useDummy_ ) {
+      output_raster_params.setDummy( 
+        input_raster->params().dummy_[ 0 ], -1 );
+    }    
+    
+    TeBox reprojected_box = reprojected_box_pol.box();
+    output_raster_params.boxResolution( reprojected_box.x1(), 
+      reprojected_box.y1(), reprojected_box.x2(), reprojected_box.y2(), 
+      target_resx, target_resy );
+      
+    TEAGN_TRUE_OR_RETURN( output_raster->init( output_raster_params ),
+      "Output raster init error" );
+      
+    TeRasterTransform transf( input_raster.nakedPointer(),
+      output_raster.nakedPointer() );
+    transf.setTransfFunction( TeRasterTransform::TeBand2Band );
+      
+    TeRasterRemap remap( input_raster.nakedPointer(), 
+      output_raster.nakedPointer() ) ;
+    remap.setTransformer( &transf );
+    
+    bool progress_interface_enabled = false;
+    if( TeProgress::instance() != 0 ) {
+      progress_interface_enabled = true;
+    }
+    
+    TEAGN_TRUE_OR_RETURN( remap.apply( progress_interface_enabled ),
+      "Raster remapping error" );
+      
+    return true;
+  }
+  
+  
+  short TeRelation( const TeCoord2D& c, const TeTileIndexer& indexer )
+  {
+    TeTileIndexer::TeTileSegIndex* tindex_ptr;
+    const TePolygon& pol = indexer.getPol();
+    
+    indexer.getTile( c.y(), &tindex_ptr );
+    
+    if( tindex_ptr == 0 ) {
+      return TeOUTSIDE;
+    }
+    
+    register double ty, tx;
+    register bool inside_flag = false;
+    register int yflag0, yflag1;
+  
+    TeLinearRing::iterator vtx0, vtx1;
+  
+    tx = c.x();
+    ty = c.y();
+    
+    for( unsigned int i = 0 ; i < tindex_ptr->size() ; ++i ) {
+      TEAGN_DEBUG_CONDITION( ( ( *tindex_ptr )[ i ].first < pol.size() ),
+        "Invalid ring index" );
+      TEAGN_DEBUG_CONDITION( ( ( ( *tindex_ptr )[ i ].second + 1 ) < 
+        pol[ ( *tindex_ptr )[ i ].first ].size() ),
+        "Invalid segment index" );
+    
+      const TeCoord2D& vtx0 = 
+        pol[ ( *tindex_ptr )[ i ].first ][ ( *tindex_ptr )[ i ].second ];
+      const TeCoord2D& vtx1 = 
+      pol[ ( *tindex_ptr )[ i ].first ][ ( *tindex_ptr )[ i ].second + 1 ];
+      
+      yflag0 = (vtx0.y() >= ty);
+      
+      yflag1 = (vtx1.y() >= ty);
+    
+      if(yflag0 != yflag1)
+      {
+        /* TODO - Check Boundary case */
+      
+        if(((vtx1.y() - ty) * (vtx0.x() - vtx1.x()) >=
+              (vtx1.x() - tx) * (vtx0.y() - vtx1.y())) == yflag1)
+        {
+          inside_flag = !inside_flag ;
+        }
+      }
+    
+    }
+    
+    if( inside_flag ) {
+      return TeINSIDE;
+    }
+    
+    return TeOUTSIDE;
+  }  
+  
+  
+  void TeSegSetIntersection( const TeLineSet& ls1, const TeLineSet& ls2,
+    TePointSet& ps )
+  {
+    ps.clear();
+    
+    const unsigned int ls1_size = ls1.size();
+    const unsigned int ls2_size = ls2.size();
+    
+    unsigned int ls1_index = 0;
+    unsigned int ls2_index = 0;
+     
+    bool line1_is_vertical = false;
+    double line1_vertical_x_value = 0;
+    double line1_m = 0;
+    double line1_q = 0;
+    
+    double line2_m = 0;
+    double line2_q = 0;    
+    
+    TeCoord2D candidate_pt;
+    double canditate_pt_x = 0;
+    bool candidate_pt_found = false;
+    
+    double line1_min_x = 0;
+    double line1_min_y = 0;
+    double line1_max_x = 0;
+    double line1_max_y = 0;
+    
+    double line2_min_x = 0;
+    double line2_min_y = 0;
+    double line2_max_x = 0;
+    double line2_max_y = 0;
+    
+    for( ls1_index = 0 ; ls1_index < ls1_size ; ++ls1_index ) {
+      const TeLine2D& line1 = ls1[ ls1_index ];
+      
+      TEAGN_TRUE_OR_THROW( ( line1.size() == 2 ), "Invalid line size" );
+      
+      const TeCoord2D& line1_p1 = line1[ 0 ];
+      const TeCoord2D& line1_p2 = line1[ 1 ];
+      
+      line1_min_x = MIN( line1_p1.x(), line1_p2.x() );
+      line1_min_y = MIN( line1_p1.y(), line1_p2.y() );
+      line1_max_x = MAX( line1_p1.x(), line1_p2.x() );
+      line1_max_y = MAX( line1_p1.y(), line1_p2.y() );
+      
+      if( line1_p1.x() == line1_p2.x() ) {
+        line1_is_vertical = true;
+        
+        line1_vertical_x_value = line1_p1.x();
+      } else {
+        line1_is_vertical = false;
+        
+        line1_m = ( line1_p1.y() - line1_p2.y() ) /
+          ( line1_p1.x() - line1_p2.x() );
+        line1_q = line1_p1.y() - ( line1_m * line1_p1.x() );
+      }
+    
+      for( ls2_index = 0 ; ls2_index < ls2_size ; ++ls2_index ) {
+        candidate_pt_found = false;
+        const TeLine2D& line2 = ls2[ ls2_index ];
+        
+        TEAGN_TRUE_OR_THROW( ( line2.size() == 2 ), "Invalid line size" );
+        
+        const TeCoord2D& line2_p1 = line2[ 0 ];
+        const TeCoord2D& line2_p2 = line2[ 1 ];
+        
+        if( line2_p1.x() == line2_p2.x() ) {
+          if( ! line1_is_vertical ) {
+            candidate_pt.setXY( line2_p1.x(), ( line1_m * line2_p1.x() ) +
+              line1_q );
+            candidate_pt_found = true;
+          }
+        } else {
+          line2_m = ( line2_p1.y() - line2_p2.y() ) /
+            ( line2_p1.x() - line2_p2.x() );
+          line2_q = line2_p1.y() - ( line2_m * line2_p1.x() );        
+        
+          if( line1_is_vertical ) {
+            candidate_pt.setXY( line1_vertical_x_value, 
+              ( line2_m * line1_vertical_x_value ) + line2_q );
+            candidate_pt_found = true;
+          } else {
+            if( line1_m != line2_m ) {
+              canditate_pt_x = (  line2_q - line1_q ) / ( line1_m - line2_m );
+              candidate_pt.setXY( canditate_pt_x, ( line2_m * canditate_pt_x ) + 
+                line2_q );
+              candidate_pt_found = true;
+            }
+          }
+        }
+        
+        if( candidate_pt_found ) {
+          line2_min_x = MIN( line2_p1.x(), line2_p2.x() );
+          line2_min_y = MIN( line2_p1.y(), line2_p2.y() );
+          line2_max_x = MAX( line2_p1.x(), line2_p2.x() );
+          line2_max_y = MAX( line2_p1.y(), line2_p2.y() );        
+          
+          if( ( candidate_pt.x() >= line1_min_x  ) &&
+            ( candidate_pt.y() >= line1_min_y  ) &&
+            ( candidate_pt.x() <= line1_max_x  ) &&
+            ( candidate_pt.y() <= line1_max_y  ) &&
+            ( candidate_pt.x() >= line2_min_x  ) &&
+            ( candidate_pt.y() >= line2_min_y  ) &&
+            ( candidate_pt.x() <= line2_max_x  ) &&
+            ( candidate_pt.y() <= line2_max_y  ) ) {
+            
+            ps.add( candidate_pt );
+          }
+          
+        }
+      }
+    }
+  
+  }
+  
+  TeDataType chooseBestPixelType( TePDITypes::TePDIRasterVectorType& rasters )
+  {
+    TeDataType best_dt = TeUNSIGNEDCHAR;
+    double best_min = 0;
+    double best_max = 255;
+  
+    TePDITypes::TePDIRasterVectorType::iterator it = rasters.begin();
+    TePDITypes::TePDIRasterVectorType::iterator it_end = rasters.end();
+    
+    double curr_min = 0;
+    double curr_max = 0;
+    
+    unsigned int bands_number = 0;
+    unsigned int curr_band = 0;
+    
+    while( it != it_end ) {
+      bands_number = (*it)->params().nBands();
+      
+      curr_band = 0;
+      
+      while( curr_band < bands_number ) {
+        if( TeGetRasterMinMaxBounds( *it, curr_band, curr_min, curr_max ) ) {
+          if( curr_min == best_min ) {
+            if( curr_max > best_max ) {
+              best_dt = (*it)->params().dataType_[ curr_band ];
+              best_max = curr_max;
+              best_min = curr_min;
+            }
+          } else if( curr_max == best_max ) {
+            if( curr_min < best_min ) {
+              best_dt = (*it)->params().dataType_[ curr_band ];
+              best_max = curr_max;
+              best_min = curr_min;
+            }
+          } else {
+            if( ( curr_min < best_min ) || ( curr_max > best_max ) ) {
+              best_dt = (*it)->params().dataType_[ curr_band ];
+              best_max = curr_max;
+              best_min = curr_min;
+            }
+          }
+        }
+        
+        ++curr_band;
+      }
+      
+      ++it;
+    }
+    
+    return best_dt;
+  }
+  
+  
+  void getBandMinMaxValues( const TePDITypes::TePDIRasterPtrType& raster, 
+    unsigned int channel, bool progress_enabled, unsigned int sample_step,  
+    double& min, double& max )
+  {
+    TEAGN_TRUE_OR_THROW( raster.isActive(),
+      "Inactive Input Raster" );
+
+    TeRasterParams& params = raster->params();
+
+    TEAGN_TRUE_OR_THROW( (int)channel < params.nBands(),
+      "Invalid input channel" );  
+  
+    if ( params.decoderIdentifier_ == "DB" ) {
+      
+      min = params.vmin_[ channel ];
+      max = params.vmax_[ channel ];
+    } else {
+      min = DBL_MAX;
+      max = ( -1.0 ) * DBL_MAX;  
+      
+      const unsigned int in_lines_number = params.nlines_;
+      const unsigned int in_columns_number = params.ncols_;
+      const bool use_dummy = params.useDummy_;
+  
+      TePDIPIManager progress( "Guessing channel bounds...", 
+        (unsigned int)ceil( ( (double)in_lines_number ) / 
+        ( (double)( sample_step + 1 ) ) ), progress_enabled );      
+    
+      unsigned int rasterline = 0;
+      unsigned int rastercolumn = 0;
+      double current_raster_level = 0;
+      TeRaster& in_raster_ref = *(raster.nakedPointer());
+      
+      for( rasterline = 0 ; rasterline < in_lines_number ; 
+        rasterline += ( 1 + sample_step ) ) {
+        
+        for( rastercolumn = 0 ; rastercolumn < in_columns_number ; 
+          rastercolumn += ( 1 + sample_step ) ) 
+        {  
+          if( in_raster_ref.getElement( rastercolumn, rasterline,
+              current_raster_level, channel ) ) {
+              
+            if( current_raster_level > max ) {
+              max = current_raster_level;
+            }
+            if( current_raster_level < min ) {
+              min = current_raster_level;
+            }
+          } else {
+            TEAGN_TRUE_OR_THROW( use_dummy,
+              "Unable to read from input raster at line=" +
+              Te2String( rasterline ) + " column=" +
+              Te2String( rastercolumn ) + "channel=" +
+              Te2String( channel ) );
+          }
+        }
+        
+        progress.Increment();
+      }
+    }      
+  }
+  
+  
+  bool convert2MultiBand( const TePDITypes::TePDIRasterPtrType& in_raster,
+    bool progress_enabled, TePDITypes::TePDIRasterPtrType& out_raster )
+  {
+    TEAGN_TRUE_OR_THROW( in_raster.isActive(), 
+      "in_raster pointer inactive" );
+    TEAGN_TRUE_OR_THROW( ( in_raster->params().projection() != 0 ), 
+      "in_raster do not have a projection" );
+      
+    /* Checking if we need a conversion */
+      
+    int in_raster_band = 0;
+    bool conversion_required = false;
+        
+    for( in_raster_band = 0 ; in_raster_band < in_raster->params().nBands() ;
+      ++in_raster_band ) {
+      
+      if( ( in_raster->params().photometric_[ in_raster_band ] !=
+        TeRasterParams::TeMultiBand ) &&
+        ( in_raster->params().photometric_[ in_raster_band ] !=
+        TeRasterParams::TeRGB ) ) {
+      
+        conversion_required = true;
+        in_raster_band = in_raster->params().nBands();
+      }
+    }
+  
+    if( conversion_required ) {
+      TeRasterParams out_raster_params;
+    
+      if( out_raster.isActive() ) {
+        TEAGN_TRUE_OR_THROW( ( out_raster->params().status_ != 
+          TeRasterParams::TeNotReady ), "out_raster not ready" );
+          
+        out_raster_params = out_raster->params();
+      }
+      
+      if( in_raster->params().photometric_[ 0 ] == 
+        TeRasterParams::TePallete ) { 
+                 
+        out_raster_params.nBands( 3 );
+      } else {
+        out_raster_params.nBands( in_raster->params().nBands() );
+      }
+                  
+      TeSharedPtr< TeProjection > proj( TeProjectionFactory::make( 
+        in_raster->projection()->params() ) );          
+      out_raster_params.projection( proj.nakedPointer() );      
+      
+      out_raster_params.boxResolution( in_raster->params().box().x1(), 
+        in_raster->params().box().y1(), in_raster->params().box().x2(), 
+        in_raster->params().box().y2(), 
+        in_raster->params().resx_, in_raster->params().resy_ );      
+      
+      out_raster_params.setPhotometric( TeRasterParams::TeMultiBand );
+      
+      out_raster_params.setDataType( in_raster->params().dataType_[ 0 ], -1 );
+      
+      if( in_raster->params().useDummy_ ) {
+        out_raster_params.setDummy( in_raster->params().dummy_[ 0 ], -1 );
+      } else {
+        out_raster_params.useDummy_ = false;
+      }
+        
+      if( out_raster.isActive() ) {
+        TEAGN_TRUE_OR_RETURN( out_raster->init( out_raster_params ),
+          "Output raster init error" );
+      } else {
+        TEAGN_TRUE_OR_RETURN( TeAllocRAMRaster( out_raster,
+          out_raster_params, TePDIUtilsAutoMemPol ),
+          "Output raster allocation error" );
+      }
+          
+      /* Creating the transformer instance */
+        
+      TeRasterTransform transformer( in_raster.nakedPointer(), 
+        out_raster.nakedPointer() );
+          
+      if( in_raster->params().photometric_[ 0 ] == 
+        TeRasterParams::TePallete ) {
+          
+        transformer.setTransfFunction( TeRasterTransform::TePall2Three );
+      } else {
+        transformer.setTransfFunction( TeRasterTransform::TeBand2Band );
+      }
+        
+      /* Creating the remapper instance */
+          
+      TeRasterRemap remapper( in_raster.nakedPointer(), 
+        out_raster.nakedPointer(), progress_enabled );
+        
+      remapper.setTransformer( &transformer );
+      
+      TEAGN_TRUE_OR_RETURN( remapper.apply( progress_enabled),
+        "Raster remapping error" );
+    } else {
+      out_raster = in_raster;
+    }
+    
+    return true;
+  }
+  
+  bool compareGeometryPoints( const TeLinearRing& geom1, 
+    const TeLinearRing& geom2 )
+  {
+    unsigned int geom1_size = geom1.size();
+    
+    if( geom1_size == geom2.size() ) {
+    
+      unsigned int index2 = 0;
+      bool point_found = false;
+      
+      for( unsigned int index1 = 0 ; index1 < geom1_size ; ++index1 ) {
+        point_found = false;
+        
+        for( index2 = 0 ; index2 < geom1_size ; ++index2 ) {
+          if( geom1[ index1 ] == geom2[ index2 ] ) {
+            point_found = true;
+            break;    
+          }
+        }
+        
+        if( ! point_found ) {
+          return false;
+        }
+      }
+      
+      return true;
+    } else {
+      return false;
+    }
+  }
+  
+
+  bool resampleRasterByRes( const TePDITypes::TePDIRasterPtrType& input_raster,
+    const TePDITypes::TePDIRasterPtrType& output_raster,
+    double x_resolution_ratio, double y_resolution_ratio, 
+    TePDIInterpolator::InterpMethod interpol, 
+    bool enable_progress ) 
+  {
+      
+    TEAGN_TRUE_OR_RETURN( input_raster.isActive(), "Inactive input raster" );
+    TEAGN_TRUE_OR_RETURN( 
+      input_raster->params().status_ != TeRasterParams::TeNotReady,
+      "Input raster not ready" )
+    
+    TEAGN_TRUE_OR_RETURN( output_raster.isActive(), 
+      "Inactive output raster" );
+    TEAGN_TRUE_OR_RETURN( 
+      output_raster->params().status_ != TeRasterParams::TeNotReady,
+      "Output raster not ready" )
+      
+    TEAGN_TRUE_OR_RETURN( ( x_resolution_ratio > 0.0 ), "Invalid X ratio" )
+    TEAGN_TRUE_OR_RETURN( ( y_resolution_ratio > 0.0 ), "Invalid X ratio" )
+    
+    unsigned int out_lines = TeRound( 
+      ( (double)input_raster->params().nlines_ ) / 
+      y_resolution_ratio );
+    unsigned int out_cols = TeRound( 
+      ( (double)input_raster->params().ncols_ ) / 
+      x_resolution_ratio );      
+    
+    return resampleRasterByLinsCols( input_raster, output_raster, 
+      out_lines, out_cols, enable_progress, interpol );
+  }
+
+
+  bool resampleRasterByLinsCols( 
+    const TePDITypes::TePDIRasterPtrType& input_raster,
+    const TePDITypes::TePDIRasterPtrType& output_raster,
+    unsigned int out_lines, 
+    unsigned int out_cols,
+    bool enable_progress, 
+    TePDIInterpolator::InterpMethod interpol ) 
+  {
+      
+    TEAGN_TRUE_OR_THROW( input_raster.isActive(), "Inactive input raster" );
+    TEAGN_TRUE_OR_RETURN( 
+      input_raster->params().status_ != TeRasterParams::TeNotReady,
+      "Input raster not ready" )
+    
+    TEAGN_TRUE_OR_THROW( output_raster.isActive(), 
+      "Inactive output raster" );
+    TEAGN_TRUE_OR_RETURN( 
+      output_raster->params().status_ != TeRasterParams::TeNotReady,
+      "Output raster not ready" )
+      
+    TEAGN_TRUE_OR_RETURN( ( out_lines > 0 ), "Invalid out_lines" )
+    TEAGN_TRUE_OR_RETURN( ( out_cols > 0 ), "Invalid out_cols" )
+    
+    /* Reseting the output raster to the new geometry */
+    
+    TeRasterParams& input_raster_params = input_raster->params();
+    
+    TeRasterParams new_output_raster_params = output_raster->params();
+    
+    new_output_raster_params.nBands( input_raster_params.nBands() );
+    new_output_raster_params.setPhotometric( 
+      input_raster_params.photometric_[ 0 ], -1 );
+    new_output_raster_params.boxLinesColumns( 
+      input_raster_params.box().x1(), 
+      input_raster_params.box().y1(), 
+      input_raster_params.box().x2(), 
+      input_raster_params.box().y2(), 
+      out_lines, out_cols );
+      
+    TEAGN_TRUE_OR_RETURN( output_raster->init( 
+      new_output_raster_params ),
+      "Output raster reset error" )
+
+    TEAGN_DEBUG_CONDITION( 
+      ( output_raster->params().nlines_ == (int)out_lines ),
+      "Invalid nlines_" )
+    TEAGN_DEBUG_CONDITION( 
+      ( output_raster->params().ncols_ == (int)out_cols ),
+      "Invalid ncols_" )
+      
+    /* interpolating pixel values */
+    
+    const TeRasterParams& output_raster_params = 
+      output_raster->params();
+    
+    const unsigned int out_bands = output_raster_params.nBands();
+    
+    double in_col = 0;
+    double in_line = 0;
+    unsigned int out_col = 0;
+    unsigned int out_line = 0;
+    unsigned int out_band = 0;
+    double value = 0;
+    const double y_resolution_ratio = 
+      ( (double) input_raster->params().nlines_ ) /
+      ( (double) out_lines );
+    const double x_resolution_ratio = 
+      ( (double) input_raster->params().ncols_ ) /
+      ( (double) out_cols );
+    
+    double dummy_value = 0;
+    if( input_raster_params.useDummy_ ) {
+      dummy_value = input_raster_params.dummy_[ 0 ];
+    }
+    
+    TeRaster& output_raster_ref = *( output_raster.nakedPointer() );
+    
+    TePDIInterpolator interpolator;
+    TEAGN_TRUE_OR_RETURN( interpolator.reset( input_raster, 
+      interpol,
+      dummy_value), "Interpolator reset error" )
+      
+    TePDIPIManager progress( "Ressampling raster", 
+      ( out_bands * out_lines ), enable_progress );
+    
+    for( out_band = 0 ; out_band < out_bands ; ++out_band ) {
+      for( out_line = 0 ; out_line < out_lines ; ++out_line ) {
+        in_line = ( (double)out_line) * y_resolution_ratio;
+      
+        for( out_col = 0 ; out_col < out_cols ; ++out_col ) {
+          in_col = ( (double)out_col) * x_resolution_ratio;
+        
+          interpolator.interpolate( in_line, in_col, out_band, 
+            value );
+      
+          TEAGN_TRUE_OR_RETURN( output_raster_ref.setElement( 
+            out_col, out_line, value, out_band ), 
+            "Output raster writing error" )
+        }
+        
+        TEAGN_FALSE_OR_RETURN( progress.Increment(), 
+          "Canceled by user" );
+      }
+    }
+    
+    return true;
+  }
+  
+  
+  bool composeRaster( 
+    const TePDITypes::TePDIRasterVectorType& input_rasters,
+    const std::vector< unsigned int > input_channels,
+    TePDITypes::TePDIRasterPtrType& output_raster,
+    bool enable_progress )
+  {
+    TEAGN_TRUE_OR_THROW( ( input_rasters.size() == input_channels.size() ),
+      "Invalid input channels number" )
+    TEAGN_TRUE_OR_THROW( output_raster.isActive(), 
+      "Inactive output raster" );      
+  
+    if( input_rasters.size() == 0 )
+    { 
+      output_raster.reset();
+      return true;
+    }
+    else
+    {
+      /* Checking reference raster */
+      
+      TEAGN_TRUE_OR_THROW( input_rasters[ 0 ].isActive(),
+        "Invalid input reference raster pointer" )
+            
+      TeRasterParams ref_params = input_rasters[ 0 ]->params();
+      
+      TEAGN_TRUE_OR_THROW( 
+        ( ref_params.status_ != TeRasterParams::TeNotReady ),
+        "Invalid input reference raster" )
+      
+      /* creating the output parameters */
+      
+      {
+        TeRasterParams newoutpars = output_raster->params();
+        TeBox ref_bbox = ref_params.boundingBox();
+        newoutpars.boundingBoxLinesColumns( 
+          ref_bbox.x1(), 
+          ref_bbox.y1(), 
+          ref_bbox.x2(), 
+          ref_bbox.y2(), 
+          ref_params.nlines_, ref_params.ncols_ );
+        newoutpars.nBands( input_rasters.size() );
+        newoutpars.projection( ref_params.projection() );
+        newoutpars.setPhotometric( TeRasterParams::TeMultiBand, -1 );
+        
+        for( unsigned int input_channels_idx = 0 ; 
+          input_channels_idx < input_channels.size() ; ++input_channels_idx )
+        {
+          /* Checking input raster pointers */
+          
+          TEAGN_TRUE_OR_THROW( 
+            ( input_rasters[ input_channels_idx ].isActive() ),
+            "Invalid input raster pointer" )
+            
+          /* Checking input raster status */
+          
+          TEAGN_TRUE_OR_THROW( 
+            ( input_rasters[ input_channels_idx ]->params().status_ != 
+            TeRasterParams::TeNotReady ),
+            "Invalid input raster" )            
+                      
+          /* Checking input_channels indexes */
+          
+          const int& curr_input_channel = input_channels[ 
+            input_channels_idx ];
+          
+          TEAGN_TRUE_OR_THROW( 
+            ( curr_input_channel < 
+            input_rasters[ input_channels_idx ]->nBands() ),
+            "Invalid band index" )
+            
+          /* Checking input raster lines and columns */
+          
+          TEAGN_TRUE_OR_THROW( 
+            ( input_rasters[ input_channels_idx ]->params().nlines_ == 
+            ref_params.nlines_ ),
+            "Invalid input raster lines number" )     
+          TEAGN_TRUE_OR_THROW( 
+            ( input_rasters[ input_channels_idx ]->params().ncols_ == 
+            ref_params.ncols_ ),
+            "Invalid input raster columns number" )                                 
+          
+          /* Seting the output data type */
+          
+          newoutpars.setDataType(
+            input_rasters[ input_channels_idx ]->params().dataType_[ 
+            curr_input_channel ], (int)input_channels_idx );
+        }
+        
+        /* Reseting output raster */
+        
+        TEAGN_TRUE_OR_RETURN( output_raster->init( newoutpars ),
+          "Error initiating output raster" )
+          
+        /* Copying data */
+        
+        const unsigned int lines_per_raster = (unsigned int)
+          ref_params.nlines_;
+        const unsigned int cols_per_raster = (unsigned int)
+          ref_params.ncols_;
+        TeRaster& out_raster_ref = *output_raster;
+        unsigned int curr_line = 0;
+        unsigned int curr_col = 0;
+        double value = 0;
+          
+        TePDIPIManager progress( "Composing raster", 
+          input_channels.size() * lines_per_raster, enable_progress );            
+        
+        for( unsigned int input_channels_idx = 0 ; 
+          input_channels_idx < input_channels.size() ; ++input_channels_idx )
+        {
+          const int& curr_input_channel = input_channels[ 
+            input_channels_idx ];
+          TeRaster& cur_in_raster = 
+            *( input_rasters[ input_channels_idx ] );
+            
+          for( curr_line = 0 ; curr_line < lines_per_raster ; ++curr_line )
+          {
+            for( curr_col = 0 ; curr_col < cols_per_raster ; ++curr_col )
+            {
+              cur_in_raster.getElement( curr_col, curr_line, value, 
+                curr_input_channel );
+              TEAGN_TRUE_OR_RETURN( out_raster_ref.setElement( curr_col, 
+                curr_line, value, input_channels_idx ),
+                "Error writting output raster" );
+            }
+            
+            TEAGN_FALSE_OR_RETURN( progress.Increment(),
+              "Canceled by the user" )
+          }
+        }        
+      }
+      
+      return true;
+    }
+  }
+  
+  bool loadRaster( const std::string& fileName, 
+      TePDITypes::TePDIRasterPtrType& memRasterPtr, bool enable_progress )
+  {
+    TeRaster inRaster( fileName, 'r' );
+    TEAGN_TRUE_OR_RETURN( inRaster.init(), "Input disk raster init error" );
+    
+    TEAGN_TRUE_OR_RETURN( TeAllocRAMRaster( memRasterPtr, inRaster.params(), 
+      TePDIUtilsAutoMemPol ), "Memory raster allocation error" );
+    
+    unsigned int band = 0;
+    const unsigned int bandsN = (unsigned int)inRaster.params().nBands();
+    unsigned int line = 0;
+    const unsigned int linesN = (unsigned int)inRaster.params().nlines_;
+    unsigned int col = 0;
+    const unsigned int colsN = (unsigned int)inRaster.params().ncols_;
+    TeRaster& memRaster = *memRasterPtr;
+    double value = 0;
+    
+    TePDIPIManager progress( "Loading raster", 
+      bandsN * linesN, enable_progress );       
+    
+    for( band = 0 ; band < bandsN ; ++band )
+      for( line = 0 ; line < linesN ; ++line )
+      {
+        for( col = 0 ; col < colsN ; ++col )
+        {
+          inRaster.getElement( col, line, value, band );
+          memRaster.setElement( col, line, value, band );
+        }
+        
+        TEAGN_FALSE_OR_RETURN( progress.Increment(),  
+          "Canceled by the user" );
+      }
+    
+    return true;
+  }
+  
+} // namespace TeUtils
+
diff --git a/src/terralib/image_processing/TePDIUtils.hpp b/src/terralib/image_processing/TePDIUtils.hpp
new file mode 100755
index 0000000..e2792ec
--- /dev/null
+++ b/src/terralib/image_processing/TePDIUtils.hpp
@@ -0,0 +1,631 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+/**
+ * @file TePDIUtils.hpp
+ * @brief This file contains utilitary functions used by PDI algorithms. 
+ * THEY SHOLD NOT BE USED BY ANYONE. The support and interfaces 
+ * can be changed in future. THIS IS FOR INTERNAL USE ONLY.
+ * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+ */
+
+#ifndef TEPDIUTILS_HPP
+  #define TEPDIUTILS_HPP
+
+  #include "TePDIRgbPalette.hpp"
+  #include "TePDITypes.hpp"
+  #include "TePDIMathFunctions.hpp"
+  #include "TePDIInterpolator.hpp"
+  
+  #include "data_structs/TeTileIndexer.h"
+
+  #include <TeAgnostic.h>
+  #include <TeRaster.h>
+  #include <TeDataTypes.h>
+  #include <TeBox.h>
+
+  #include <string>
+  #include <map>
+
+ 
+    /**
+     * @namespace TePDIUtils This namespace contains base utilitary functions used by PDI classes.
+     * @note THEY SHOLD NOT BE USED BY ANYONE. The support and interfaces 
+     * can be changed in future. THIS IS FOR INTERNAL USE ONLY.     
+     * @ingroup PDIModule
+     */
+  namespace TePDIUtils
+  {
+    /**
+     * @enum PDIUtils memory policies.
+     */
+    enum TePDIUtilsMemPol {
+      /** The memory policy will be choosed following the free RAM */
+      TePDIUtilsAutoMemPol = 1,
+      /** Use RAM memory */
+      TePDIUtilsRamMemPol = 2,
+      /** Use memory mapped disk files */
+      TePDIUtilsDiskMemPol = 3
+    };  
+
+    /**
+     * @brief Allocates one RAM raster using another raster as template base.
+     *
+     * @note If there are not enought memory, memory mapping to disk files 
+     * will be used.
+     *
+     * @param template_raster Input raster.
+     * @param RAMRaster Output raster.
+     * @param bands Number of bands for the generated RAMRaster. If zero, the
+     * number of bands will match the input raster.
+     * @param force_new_dt If true, a new pixel data type will be used for 
+     * all bands.
+     * @param force_mm Force disk memory mapped raster creation.
+     * @param pixel_type Pixel data type.
+     * @return true if OK. false on error.
+     */
+    PDI_DLL bool TeAllocRAMRaster(
+      TePDITypes::TePDIRasterPtrType& template_raster,
+      TePDITypes::TePDIRasterPtrType& RAMRaster,
+      unsigned int bands, bool force_new_dt, bool force_mm,
+      TeDataType pixel_type = TeDOUBLE );
+
+    /**
+     * @brief Allocates a brand new RAM raster.
+     *
+     * @note If there are not enought memory, memory mapping to disk files 
+     * will be used.
+     *
+     * @param RAMRaster Output raster.
+     * @param bands Number of bands for the generated RAMRaster.
+     * @param lines Number of lines.
+     * @param columns Number of Columns
+     * @param force_mm Force disk memory mapped raster creation.
+     * @param pixel_type Pixel data type.
+     * @param palette A palette reference, for generation of a paletted
+     * raster ( must be 0 if not used ).
+     * @return true if OK. false on error.
+     */
+    PDI_DLL bool TeAllocRAMRaster(
+      TePDITypes::TePDIRasterPtrType& RAMRaster,
+      unsigned int bands, unsigned int lines, unsigned int columns,
+      bool force_mm, TeDataType pixel_type, TePDIRgbPalette* palette );
+      
+    /**
+     * @brief Allocates a brand new RAM raster using the supplied parameters.
+     *
+     * @note If there are not enought memory, memory mapping to disk files 
+     * will be used.
+     *
+     * @param RAMRaster Output raster.
+     * @param params Raster parameters.
+     * @param force_mm Force disk memory mapped raster creation.
+     * @return true if OK. false on error.
+     */      
+    PDI_DLL bool TeAllocRAMRaster( TePDITypes::TePDIRasterPtrType& RAMRaster,
+      const TeRasterParams& params, bool force_mm );
+      
+    /**
+     * @brief Allocates a brand new RAM raster using the supplied parameters.
+     *
+     * @param RAMRaster Output raster.
+     * @param params Raster parameters.
+     * @param mempol Memory policy.
+     */      
+    PDI_DLL bool TeAllocRAMRaster( TePDITypes::TePDIRasterPtrType& RAMRaster,
+      const TeRasterParams& params, 
+      TePDIUtilsMemPol mempol = TePDIUtilsAutoMemPol );      
+      
+    /**
+     * @brief Save the raster to a GeoTIFF file.
+     *
+     * @param in_raster Input raster.
+     * @param file_name Output file name.
+     * @return true if OK. false on error.
+     * @note DEPRECATED: Use other TeRaster2Geotiff implementation.
+     */
+    PDI_DLL bool TeRaster2Geotiff(
+      const TePDITypes::TePDIRasterPtrType& in_raster,
+      const std::string& file_name );      
+
+    /**
+     * @brief Save the raster to a GeoTIFF file.
+     *
+     * @param in_raster Input raster.
+     * @param file_name Output file name.
+     * @param pixel_type The type of pixels.
+     * @return true if OK. false on error.
+     * @note DEPRECATED: Use other TeRaster2Geotiff implementation.
+     */
+    PDI_DLL bool TeRaster2Geotiff(
+      const TePDITypes::TePDIRasterPtrType& in_raster,
+      const std::string& file_name,
+      TeDataType pixel_type );
+      
+    /**
+     * @brief Save the raster to a GeoTIFF file.
+     *
+     * @param in_raster Input raster.
+     * @param file_name Output file name.
+     * @param enable_progress Enable/disable progress interface.
+     * @return true if OK. false on error.
+     */
+    PDI_DLL bool TeRaster2Geotiff(
+      const TePDITypes::TePDIRasterPtrType& in_raster,
+      const std::string& file_name,
+      bool enable_progress );      
+
+    /**
+     * @brief Do pixel by pixel copy from one raster to another.
+     *
+     * @param source_raster Input raster.
+     * @param source_band Souce band.
+     * @param target_raster Output raster.
+     * @param target_band Target band.
+     * @param discretize_levels Levels will be rounded to the near integer.
+     * @param trunc_levels Levels outside a range ( from zero
+     * to the maximum Output raster allowed pixel value ) will be rounded to 
+     * zero or the maximum Output raster allowed pixel value.
+     * @return true if OK. false on error.
+     */
+    PDI_DLL bool TeCopyRasterPixels(
+      TePDITypes::TePDIRasterPtrType& source_raster,
+      unsigned int source_band,
+      TePDITypes::TePDIRasterPtrType& target_raster,
+      unsigned int target_band,
+      bool discretize_levels,
+      bool trunc_levels );
+
+    /**
+     * @brief Do pixel by pixel copy from one raster to another ( all bands ).
+     *
+     * @param source_raster Input raster.
+     * @param target_raster Output raster.
+     * @param discretize_levels Levels will be rounded to the near integer.
+     * @param trunc_levels Levels outside a range ( from zero
+     * to the maximum Output raster allowed pixel value ) will be rounded to 
+     * zero or the maximum Output raster allowed pixel value.
+     * @return true if OK. false on error.
+     */
+    PDI_DLL bool TeCopyRasterBands(
+      TePDITypes::TePDIRasterPtrType& source_raster,
+      TePDITypes::TePDIRasterPtrType& target_raster,
+      bool discretize_levels,
+      bool trunc_levels );
+
+    /**
+     * @brief Used to find the allowed maximum and minimum level values
+     * that the supplied TeRaster band can have.
+     *
+     * @param raster Input raster.
+     * @param band Band number.
+     * @param min Minimum allowed value.
+     * @param max Maximum allowed value..
+     * @return true if OK, false on error.
+     */
+    PDI_DLL bool TeGetRasterMinMaxBounds( 
+      const TePDITypes::TePDIRasterPtrType& raster,
+      unsigned int band, double& min, double& max );
+      
+    /**
+     * @brief Used to find the raster required memory.
+     *
+     * @param params Input raster parameters.
+     * @return The amount of required memory.
+     */
+    PDI_DLL unsigned long int TeGetRasterReqMem( TeRasterParams& params );      
+
+    /**
+     * @brief Compares two rasters.
+     *
+     * @param raster1 Input raster 1.
+     * @param raster2 Input raster 2.
+     * @return true if all the pixels from both rasters have the same levels,
+     * false if not.
+     */
+    PDI_DLL bool rasterCompare( TePDITypes::TePDIRasterPtrType& raster1,
+      TePDITypes::TePDIRasterPtrType& raster2 );
+      
+    /**
+     * @brief Given a raster band, verifies if the pixels are floating point
+     * pixels.
+     *
+     * @param raster The input raster.
+     * @param band Band number.
+     * @return true if the the pixels are floating point pixels.
+     */      
+    PDI_DLL bool IsFloatBand( const TePDITypes::TePDIRasterPtrType& raster, 
+      unsigned int band );
+    
+    /**
+     * @brief Convert a TeCoord2D with projected coordinates to a geometry with
+     * indexed coordinates ( following the raster reference of lines and
+     * columns ).
+     *
+     * @param g_in Input geometry.
+     * @param raster Reference raster.
+     * @param g_out Output geometry.
+     */       
+    PDI_DLL void MapCoords2RasterIndexes( const TeCoord2D& g_in, 
+      const TePDITypes::TePDIRasterPtrType& raster, TeCoord2D& g_out );
+      
+    /**
+     * @brief Convert a TeBox with projected coordinates to a TeBox with
+     * indexed coordinates ( following the raster reference of lines and
+     * columns ).
+     *
+     * @param box_in Input box.
+     * @param raster Reference raster.
+     * @param box_out Output box.
+     */       
+    PDI_DLL void MapCoords2RasterIndexes( const TeBox& box_in, 
+      const TePDITypes::TePDIRasterPtrType& raster, TeBox& box_out );      
+      
+   /**
+     * @brief Convert a geometry with projected coordinates to a geometry with
+     * indexed coordinates ( following the raster reference of lines and
+     * columns ).
+     *
+     * @param g_in Input geometry.
+     * @param raster Reference raster.
+     * @param g_out Output geometry.
+     */        
+    template< typename Geometry >
+    void MapCoords2RasterIndexes( const Geometry& g_in, 
+      const TePDITypes::TePDIRasterPtrType& raster, Geometry& g_out )
+    {
+        unsigned int nItens = (unsigned int)g_in.size();
+        
+        for (unsigned int i=0; i < nItens ; i++ ) {
+                typename Geometry::value_type e1 = g_in[i];
+                typename Geometry::value_type e2;
+                
+                MapCoords2RasterIndexes( e1, raster, e2 );
+                
+                g_out.add( e2 );
+        }
+    }
+    
+    /**
+     * @brief Convert TeCoord2D with matrix indexed coordinates to a TeCoord2D with 
+     * projected coordinates folowing a raster reference.
+     *
+     * @param g_in Input geometry.
+     * @param raster Reference raster.
+     * @param g_out Output geometry.
+     */       
+    PDI_DLL void MapRasterIndexes2Coords( const TeCoord2D& g_in, 
+      const TePDITypes::TePDIRasterPtrType& raster, TeCoord2D& g_out );     
+      
+    /**
+     * @brief Convert TeBox with matrix indexed coordinates to a TeBox with 
+     * projected coordinates folowing a raster reference.
+     *
+     * @param g_in Input geometry.
+     * @param raster Reference raster.
+     * @param g_out Output geometry.
+     */       
+    PDI_DLL void MapRasterIndexes2Coords( const TeBox& g_in, 
+      const TePDITypes::TePDIRasterPtrType& raster, TeBox& g_out );       
+    
+   /**
+     * @brief Convert geometry with matrix indexed coordinates to a geometry with 
+     * projected coordinates folowing a raster reference.
+     *
+     * @param g_in Input geometry.
+     * @param raster Reference raster.
+     * @param g_out Output geometry.
+     */        
+    template< typename Geometry >
+    void MapRasterIndexes2Coords( const Geometry& g_in, 
+      const TePDITypes::TePDIRasterPtrType& raster, Geometry& g_out )
+    {
+        unsigned int nItens = (unsigned int)g_in.size();
+        
+        for (unsigned int i=0; i < nItens ; i++ ) {
+                typename Geometry::value_type e1 = g_in[i];
+                typename Geometry::value_type e2;
+                
+                MapRasterIndexes2Coords( e1, raster, e2 );
+                
+                g_out.add( e2 );
+        }
+    }
+    
+   /**
+     * @brief Breaks a TeLinearRing geometry into an segment set ( line segments of 
+     * two points ).
+     *
+     * @param g_in Input geometry.
+     * @param g_out Output geometry.
+     */        
+    PDI_DLL void makeSegmentSet( const TeLinearRing& g_in, TeLineSet& g_out );
+    
+   /**
+     * @brief Breaks a geometry into an segment set ( line segments of two points ).
+     *
+     * @param g_in Input geometry.
+     * @param g_out Output geometry.
+     */        
+    template< typename Geometry >
+    void makeSegmentSet( const Geometry& g_in, TeLineSet& g_out )
+    {
+      g_out.clear();
+        
+      for ( unsigned int i = 0 ; i < g_in.size() ; i++ ) {
+        TeLineSet temp_ls;
+        
+        makeSegmentSet( g_in[i], temp_ls );
+          
+        const unsigned int temp_ls_size = temp_ls.size();
+                
+        for( unsigned int temp_ls_index = 0 ; temp_ls_index < temp_ls_size ; 
+          ++temp_ls_index ) {
+            
+          g_out.add( temp_ls[ temp_ls_index ] );
+        }
+       }
+    };
+        
+    /**
+     * @brief Virifies if the lut has only discrete reference values ( integer ).
+     *
+     * @param lut Lut.
+     * @return true if only discrete values were found, otherwise false
+     * will be returned.
+     */
+    PDI_DLL bool IsDiscreteLut( const TePDITypes::TePDILutType& lut );
+    
+    /**
+     * @brief Builds a detailed box (world indexes) using all raster border pixels.
+     *
+     * @param raster Input raster.
+     * @param box_polygon The generated box (polygon representation).
+     * @return true if OK, false on errors.
+     */
+    PDI_DLL bool buildDetailedBox( const TePDITypes::TePDIRasterPtrType& raster,
+      TePolygon& box_polygon );
+      
+    /**
+     * @brief Builds a detailed bounding box (world indexes) using all raster 
+     * border pixels.
+     *
+     * @param raster Input raster.
+     * @param box_polygon The generated box (polygon representation).
+     * @return true if OK, false on errors.
+     */
+    PDI_DLL bool buildDetailedBBox( const TePDITypes::TePDIRasterPtrType& raster,
+      TePolygon& box_polygon );
+      
+    /**
+     * @brief Calculate the pixel size in geodetic units.
+     *
+     * @param params Raster params.
+     * @param x_res Pixel size ( X Axis - Geodetic units ).
+     * @param y_res Pixel size ( Y Axis - Geodetic units ).
+     */
+    PDI_DLL void getGeodeticPixelRes( TeRasterParams& params,
+      double& x_res, double& y_res );
+      
+    /**
+     * @brief Reproject a raster geometry.
+     *
+     * @param input_raster Input raster.
+     * @param target_projection Target projection.
+     * @param target_resx Target X resolution following the target projection.
+     * @param target_resy Target Y resolution following the target projection.
+     * @param output_raster Output raster.
+     *
+     * @return true if OK, false on errors.
+     */
+    PDI_DLL bool reprojectRaster( const TePDITypes::TePDIRasterPtrType& input_raster,
+      TeProjection& target_projection, double target_resx, double target_resy,
+      TePDITypes::TePDIRasterPtrType& output_raster );
+      
+    /**
+     * @brief Tells the relation between a point and a polygon by using a 
+     * polygon tile indexer.
+     *
+     * @note The boundary case is not checked.
+     *
+     * @param c The input point.
+     * @param indexer The polygon tile indexer.
+     *
+     * @return TeINSIDE or TeOUTSIDE.
+     */      
+    PDI_DLL short TeRelation( const TeCoord2D& c, const TeTileIndexer& indexer );
+    
+    /**
+     * @brief Calculates the intersection set operation between two line segments
+     * sets.
+     *
+     * @note Each line must have just 2 points.
+     *
+     * @param ls1 The input line set 1.
+     * @param ls2 The input line set 2.
+     * @param ps The output point set.
+     */     
+    PDI_DLL void TeSegSetIntersection( const TeLineSet& ls1, const TeLineSet& ls2,
+      TePointSet& ps );
+      
+    /**
+     * @brief Chooses the best pixel data type betweenn rasters.
+     * 
+     * @param rasters Input rasters.
+     * @return The best data type
+     */        
+    PDI_DLL TeDataType chooseBestPixelType( 
+      TePDITypes::TePDIRasterVectorType& rasters );      
+      
+    /**
+     * @brief Returns the minimum and maximum pixel values inside one raster channel.
+     * 
+     * @param raster Input raster.
+     * @param channel Input channel.
+     * @param min The minimum level.
+     * @param max The maximum level.
+     * @param progress_enabled Enable/disable the progress interface.
+     * @param sample_step The step size between lines/columns ( to
+     * use all lines/columns use sample_step = 0 ).
+     */        
+    PDI_DLL void getBandMinMaxValues( 
+      const TePDITypes::TePDIRasterPtrType& raster, unsigned int channel,
+      bool progress_enabled, unsigned int sample_step,  
+      double& min, double& max );      
+      
+    /**
+     * @brief Generates a multi-band copy from the given raster.
+     * 
+     * @param in_raster Input raster (must have a projection).
+     * @param progress_enabled Progress interface enable/disable flag.
+     * @param out_raster Output raster.
+     * @return true if ok, false on errors.
+     * @note If out_raster isn't active, a new raster ( SMARMEM decoder )
+     * will be returned.
+     * @note If no conversion was made, the returned pointer will point
+     * to the input raster.
+     */        
+    PDI_DLL bool convert2MultiBand( const TePDITypes::TePDIRasterPtrType& in_raster,
+      bool progress_enabled, TePDITypes::TePDIRasterPtrType& out_raster );
+      
+    /**
+     * @brief Compares two TeLinerRing ignoring the points order.
+     * @param geom1 The first geometry.
+     * @param geom2 The second geometry.
+     * @return true if both geometries has the same points, false otherwise.
+     */        
+    PDI_DLL bool compareGeometryPoints( const TeLinearRing& geom1, 
+      const TeLinearRing& geom2 );      
+      
+    /**
+     * @brief Compares two geometries ignoring the points order inside each
+     * composite elemeent.
+     * @param geom1 The first polygon.
+     * @param geom2 The second polygon.
+     * @return true if both polygons has the same points on each ring.
+     */        
+    template< typename Geometry >
+    bool compareGeometryPoints( const Geometry& geom1, const Geometry& geom2 )
+    {
+      if( geom1.size() == geom2.size() ) {
+        const unsigned geom_size = geom1.size();
+
+        for( unsigned int elem_index = 0 ; elem_index < geom_size ; 
+          ++elem_index ) {
+            
+          if( ! compareGeometryPoints( geom1[ elem_index ], 
+            geom2[ elem_index ] ) ) {
+            
+            return false;
+          }
+        }
+        
+        return true;
+      } else {
+        return false;
+      }
+    };     
+
+    /**
+     * @brief Raster resampling to new resolution, 
+     * keeping the original box and projection.
+     * @param input_raster Input raster.
+     * @param output_raster Output raster.
+     * @param out_lines The number of output lines.
+     * @param out_cols The number of output columns.
+     * @param interpol Interpolation method.
+     * @param enable_progress Enable/disable the progress interface.
+     * @return true if OK, false on errors.
+     * 
+     * @note ( resolution_ratio = output_resolution / input_resolution ).
+     */      
+    PDI_DLL bool resampleRasterByLinsCols( 
+      const TePDITypes::TePDIRasterPtrType& input_raster,
+      const TePDITypes::TePDIRasterPtrType& output_raster,
+      unsigned int out_lines, 
+      unsigned int out_cols, 
+      bool enable_progress,
+      TePDIInterpolator::InterpMethod interpol );  
+    
+    /**
+     * @brief Raster resampling to new resolution, keeping the original box and projection.
+     * @param input_raster Input raster.
+     * @param output_raster Output raster.
+     * @param x_resolution_ratio X resolution ratio.
+     * @param y_resolution_ratio Y resolution ratio.
+     * @param interpol Interpolation method.
+     * @param enable_progress Enable/disable the progress interface.
+     * @return true if OK, false on errors.
+     * 
+     * @note ( resolution_ratio = output_resolution / input_resolution ).
+     */      
+    PDI_DLL bool resampleRasterByRes( 
+      const TePDITypes::TePDIRasterPtrType& input_raster,
+      const TePDITypes::TePDIRasterPtrType& output_raster,
+      double x_resolution_ratio, 
+      double y_resolution_ratio, 
+      TePDIInterpolator::InterpMethod interpol, 
+      bool enable_progress );    
+      
+    /**
+     * @brief Compose raster channels into one single raster.
+     * @param input_rasters Input rasters vector.
+     * @param input_channels Input rasters channels/bands vector.
+     * @param output_raster Output raster.
+     * @param enable_progress Enable/disable the progress interface.
+     * @return true if OK, false on errors.
+     * 
+     * @note The reference (projection, resolution, box) for the output 
+     * raster will be taken from the first
+     * input channel (with index zero).
+     * @note All input raster must have the same number of lines and columns.
+     */      
+    PDI_DLL bool composeRaster( 
+      const TePDITypes::TePDIRasterVectorType& input_rasters,
+      const std::vector< unsigned int > input_channels,
+      TePDITypes::TePDIRasterPtrType& output_raster,
+      bool enable_progress );       
+    
+    /**
+     * @brief Load a raster data file into RAM (using a SMARTMEM decoder)
+     * @param fileName Raster file name
+     * @param memRasterPtr The output memory raster pointer.
+     * @param enable_progress Enable/disable the progress interface.
+     * @return true if OK, false on errors.
+     * 
+     * @note The reference (projection, resolution, box) for the output 
+     * raster will be taken from the first
+     * input channel (with index zero).
+     * @note All input raster must have the same number of lines and columns.
+     */      
+    PDI_DLL bool loadRaster( const std::string& fileName, 
+      TePDITypes::TePDIRasterPtrType& memRasterPtr, bool enable_progress );        
+      
+  };
+  
+/** @example TePDIUtils_test.cpp
+ *    Shows how to use this namespace functions.
+ */    
+
+#endif //TEPDIUTILS_HPP
diff --git a/src/terralib/image_processing/TePDIVenturaFusionSF.cpp b/src/terralib/image_processing/TePDIVenturaFusionSF.cpp
new file mode 100755
index 0000000..327c7ee
--- /dev/null
+++ b/src/terralib/image_processing/TePDIVenturaFusionSF.cpp
@@ -0,0 +1,21 @@
+#include "TePDIVenturaFusionSF.hpp"
+#include "TePDIVenturaFusionStrategy.hpp"
+
+TePDIVenturaFusionSF::TePDIVenturaFusionSF()
+: TePDIStrategyFactory( std::string( "ventura" ) )
+{
+};
+
+
+TePDIVenturaFusionSF::~TePDIVenturaFusionSF()
+{
+};
+
+
+TePDIStrategy* TePDIVenturaFusionSF::build ( const TePDIParameters& )
+{
+  TePDIStrategy* instance_ptr = new TePDIVenturaFusionStrategy();
+  
+  return instance_ptr;
+}
+
diff --git a/src/terralib/image_processing/TePDIVenturaFusionSF.hpp b/src/terralib/image_processing/TePDIVenturaFusionSF.hpp
new file mode 100755
index 0000000..d88066c
--- /dev/null
+++ b/src/terralib/image_processing/TePDIVenturaFusionSF.hpp
@@ -0,0 +1,70 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIVENTURAFUSIONSF_HPP
+  #define TEPDIVENTURAFUSIONSF_HPP
+
+  #include <TeSharedPtr.h>
+  #include "TePDIStrategyFactory.hpp"
+  #include "TePDIParameters.hpp"
+  #include "TePDIStrategy.hpp"
+  
+  /**
+   * @brief This is the class for Ventura fusion strategy factory.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIStrategiesFactories
+   */
+  class PDI_DLL TePDIVenturaFusionSF : public TePDIStrategyFactory
+  {
+    public :
+      
+      /**
+       * @brief Default constructor
+       */
+      TePDIVenturaFusionSF();      
+      
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIVenturaFusionSF();
+      
+    protected :  
+      /**
+       * @brief Implementation for the abstract TeFactory::build.
+       *
+       * @param arg A const reference to the parameters used by the
+       * algorithm.
+       * @return A pointer to the new generated strategy instance.
+       */
+      TePDIStrategy* build( const TePDIParameters& arg );
+      
+  };
+
+  namespace
+  {  
+    static TePDIVenturaFusionSF TePDIVenturaFusionSF_instance;
+  };
+
+#endif
+
diff --git a/src/terralib/image_processing/TePDIVenturaFusionStrategy.cpp b/src/terralib/image_processing/TePDIVenturaFusionStrategy.cpp
new file mode 100755
index 0000000..b3b5731
--- /dev/null
+++ b/src/terralib/image_processing/TePDIVenturaFusionStrategy.cpp
@@ -0,0 +1,522 @@
+ 
+#include "TePDIVenturaFusionStrategy.hpp"
+#include "TePDIMathFunctions.hpp"
+#include "TePDIStrategyFactory.hpp"
+#include "TePDIMallatWavelets.hpp"
+#include "TePDIStatistic.hpp"
+#include "TePDIMatrix.hpp"
+#include "TePDIMatrixFunctions.hpp"
+#include "TePDIUtils.hpp"
+#include "TePDIPIManager.hpp"
+
+#include <TeBox.h>
+#include <TeUtils.h>
+#include <TeRasterParams.h>
+
+TePDIVenturaFusionStrategy::TePDIVenturaFusionStrategy()
+{
+};      
+
+TePDIVenturaFusionStrategy::~TePDIVenturaFusionStrategy()
+{
+};
+
+
+bool TePDIVenturaFusionStrategy::CheckParameters( 
+  const TePDIParameters& parameters ) const
+{
+  /* Checking reference_raster */
+  
+  TePDITypes::TePDIRasterPtrType reference_raster;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "reference_raster", 
+    reference_raster ),
+    "Missing parameter: reference_raster" );
+  TEAGN_TRUE_OR_RETURN( reference_raster.isActive(),
+    "Invalid parameter: reference_raster inactive" );
+  TEAGN_TRUE_OR_RETURN( reference_raster->params().status_ != 
+    TeRasterParams::TeNotReady, 
+    "Invalid parameter: reference_raster not ready" );    
+    
+  /* Checking lowres_raster */
+  
+  TePDITypes::TePDIRasterPtrType lowres_raster;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "lowres_raster", 
+    lowres_raster ),
+    "Missing parameter: lowres_raster" );
+  TEAGN_TRUE_OR_RETURN( lowres_raster.isActive(),
+    "Invalid parameter: lowres_raster inactive" );
+  TEAGN_TRUE_OR_RETURN( lowres_raster->params().status_ != 
+    TeRasterParams::TeNotReady, "Invalid parameter: lowres_raster not ready" );    
+    
+  double max_low_res_raster_res =
+    MAX( lowres_raster->params().resx_, 
+    lowres_raster->params().resy_ );
+  double max_reference_raster_res =
+    MAX( reference_raster->params().resx_, 
+    reference_raster->params().resy_ );
+    
+  TEAGN_TRUE_OR_RETURN(     
+    ( max_low_res_raster_res > max_reference_raster_res ),
+    "Invalid low resolution raster resolution" );
+        
+  /* Checking output_raster */
+  
+  TePDITypes::TePDIRasterPtrType output_raster;
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "output_raster", 
+    output_raster ),
+    "Missing parameter: output_raster" );
+  TEAGN_TRUE_OR_RETURN( output_raster.isActive(),
+    "Invalid parameter: output_raster inactive" );
+  TEAGN_TRUE_OR_RETURN( output_raster->params().status_ != 
+    TeRasterParams::TeNotReady, "Invalid parameter: output_raster not ready" );    
+    
+  /* Checking bands */    
+    
+  int reference_raster_band = 0;    
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "reference_raster_band", 
+    reference_raster_band ), "Missing parameter : reference_raster_band" );
+  TEAGN_TRUE_OR_RETURN( ( reference_raster->nBands() > reference_raster_band ),
+    "Invalid parameter : reference_raster_band" );
+    
+  int lowres_raster_band = 0;    
+  TEAGN_TRUE_OR_RETURN( parameters.GetParameter( "lowres_raster_band", 
+    lowres_raster_band ), "Missing parameter : lowres_raster_band" );
+  TEAGN_TRUE_OR_RETURN( ( lowres_raster->nBands() > lowres_raster_band ),
+    "Invalid parameter : lowres_raster_band" ); 
+    
+  /* Checking photometric interpretation */
+  
+  TEAGN_TRUE_OR_RETURN( ( 
+    ( reference_raster->params().photometric_[ reference_raster_band ] == 
+      TeRasterParams::TeRGB ) ||
+    ( reference_raster->params().photometric_[ reference_raster_band ] == 
+      TeRasterParams::TeMultiBand ) ),
+  "Invalid parameter - reference_raster (invalid photometric interpretation)" );   
+
+  TEAGN_TRUE_OR_RETURN( ( 
+    ( lowres_raster->params().photometric_[ lowres_raster_band ] == 
+      TeRasterParams::TeRGB ) ||
+    ( lowres_raster->params().photometric_[ lowres_raster_band ] == 
+      TeRasterParams::TeMultiBand ) ),
+  "Invalid parameter - lowres_raster (invalid photometric interpretation)" );   
+      
+  return true;
+}
+
+
+bool TePDIVenturaFusionStrategy::Implementation( const TePDIParameters& params )
+{
+  TePDITypes::TePDIRasterPtrType reference_raster;
+  params.GetParameter( "reference_raster", reference_raster );
+
+  TePDITypes::TePDIRasterPtrType lowres_raster;
+  params.GetParameter( "lowres_raster", lowres_raster );
+
+  TePDITypes::TePDIRasterPtrType output_raster;
+  params.GetParameter( "output_raster", output_raster );
+  
+  int reference_raster_band = 0;
+  params.GetParameter( "reference_raster_band", reference_raster_band );
+
+  int lowres_raster_band = 0;
+  params.GetParameter( "lowres_raster_band", lowres_raster_band );
+  
+  TePDITypes::TePDIRasterPtrType lowlow;
+  TEAGN_TRUE_OR_THROW( TePDIUtils::TeAllocRAMRaster( lowlow, 1, 1, 1, false,
+    TeDOUBLE, 0 ), "Unable to create temporary low-low raster" );  
+    
+  /* Finding the best decomposition levels for both rasters */
+  
+  unsigned long int reference_raster_best_level = 0;
+  unsigned long int lowres_raster_best_level = 0;
+  unsigned long int decim_error = 0;
+  findBestDecimLevels( reference_raster, lowres_raster, 
+    reference_raster_best_level, lowres_raster_best_level, decim_error );
+  
+ /* Building default wavelet filters  - Reference coef 07 */
+ 
+  double filters_scale = 0.71;
+  if( params.CheckParameter< double >( "filters_scale" ) ) {
+      
+    params.GetParameter( "filters_scale", filters_scale );
+  }
+    
+  std::vector< double > a_filter_l;
+  a_filter_l.push_back( -0.05 );
+  a_filter_l.push_back( 0.25 );
+  a_filter_l.push_back( 0.6 );
+  a_filter_l.push_back( 0.25 );
+  a_filter_l.push_back( -0.05 );
+  
+  std::vector< double > a_filter_h;
+  a_filter_h.push_back( 0.0107143 );
+  a_filter_h.push_back( -0.0535714 );
+  a_filter_h.push_back( -0.2607143 );
+  a_filter_h.push_back( 0.6071429 );
+  a_filter_h.push_back( -0.2607143 );
+  a_filter_h.push_back( -0.0535714 );
+  a_filter_h.push_back( 0.0107143 );
+  
+  std::vector< double > s_filter_l;
+  s_filter_l.push_back( -0.0107143 );
+  s_filter_l.push_back( -0.0535714 );
+  s_filter_l.push_back( 0.2607143 );
+  s_filter_l.push_back( 0.6071429 );
+  s_filter_l.push_back( 0.2607143 );
+  s_filter_l.push_back( -0.0535714 );
+  s_filter_l.push_back( -0.0107143 );
+  
+  std::vector< double > s_filter_h;
+  s_filter_h.push_back( -0.05 );
+  s_filter_h.push_back( -0.25 );
+  s_filter_h.push_back( 0.6 );
+  s_filter_h.push_back( -0.25 );
+  s_filter_h.push_back( -0.05 );
+  
+  /* Checking for user supplied wavelet filters */
+  
+  if( params.CheckParameter< std::vector< double > >( "a_filter_l" ) ) {
+      
+    params.GetParameter( "a_filter_l", a_filter_l );
+  }
+  if( params.CheckParameter< std::vector< double > >( "a_filter_h" ) ) {
+      
+    params.GetParameter( "a_filter_h", a_filter_h );
+  }  
+  if( params.CheckParameter< std::vector< double > >( "s_filter_l" ) ) {
+      
+    params.GetParameter( "s_filter_l", s_filter_l );
+  }
+  if( params.CheckParameter< std::vector< double > >( "s_filter_h" ) ) {
+      
+    params.GetParameter( "s_filter_h", s_filter_h );
+  }  
+  
+  /* Step 1 - pyramid1 generation  */
+  
+  TePDITypes::TePDIRasterVectorPtrType pyramid1( new
+    TePDITypes::TePDIRasterVectorType );
+  
+  TePDIParameters step1_params;
+  step1_params.SetParameter( "wavelets_type", std::string( "mallat" ) );
+  step1_params.SetParameter( "filter_task", std::string( "GetPyramid" ) );
+  step1_params.SetParameter( "input_image", lowres_raster );
+  step1_params.SetParameter( "band", lowres_raster_band );
+  step1_params.SetParameter( "a_filter_l", a_filter_l );
+  step1_params.SetParameter( "a_filter_h", a_filter_h );
+  step1_params.SetParameter( "s_filter_l", s_filter_l );
+  step1_params.SetParameter( "s_filter_h", s_filter_h );
+  step1_params.SetParameter( "filters_scale", filters_scale );         
+  step1_params.SetParameter( "levels", (int)lowres_raster_best_level );
+  step1_params.SetParameter( "pyramid", pyramid1 );
+  
+  TePDIMallatWavelets wavelet_filter;
+  wavelet_filter.ToggleProgInt( progress_interface_enabled_ );  
+  
+  TEAGN_TRUE_OR_THROW( wavelet_filter.Reset( step1_params ),
+    "Unable to set wavelet filter Parameters ( step 1 )" );
+  TEAGN_TRUE_OR_THROW( wavelet_filter.Apply(), 
+    "Wavelet Filter apply error ( step 1 )" );  
+  
+  step1_params.Clear();
+  
+  /* Step 2 - pyramid2 generation */
+  
+  TePDITypes::TePDIRasterVectorPtrType pyramid2( new
+    TePDITypes::TePDIRasterVectorType );
+  
+  TePDIParameters step2_params;
+  step2_params.SetParameter( "wavelets_type", std::string( "mallat" ) );
+  step2_params.SetParameter( "filter_task", std::string( "GetPyramid" ) );
+  step2_params.SetParameter( "input_image", reference_raster );
+  step2_params.SetParameter( "band", (int)reference_raster_band );
+  step2_params.SetParameter( "a_filter_l", a_filter_l );
+  step2_params.SetParameter( "a_filter_h", a_filter_h );
+  step2_params.SetParameter( "s_filter_l", s_filter_l );
+  step2_params.SetParameter( "s_filter_h", s_filter_h );
+  step2_params.SetParameter( "filters_scale", filters_scale );         
+  step2_params.SetParameter( "levels", (int)reference_raster_best_level );      
+  step2_params.SetParameter( "pyramid", pyramid2 );
+  
+  TEAGN_TRUE_OR_THROW( wavelet_filter.Reset( step2_params ),
+    "Unable to set wavelet filter Parameters ( step 2 )" );
+  TEAGN_TRUE_OR_THROW( wavelet_filter.Apply(), 
+    "Wavelet Filter apply error ( step 2 )" );  
+  
+  step2_params.Clear();
+  
+  TEAGN_DEBUG_CONDITION( ( pyramid1->size() / 4 ) == 
+    lowres_raster_best_level, 
+    "Invalid pyramid" );
+  TEAGN_DEBUG_CONDITION( ( pyramid2->size() / 4 ) == 
+    reference_raster_best_level, 
+    "Invalid pyramid" );
+  TEAGN_DEBUG_CONDITION(
+    ( (*pyramid1)[ pyramid1->size() - 4 ]->params().nlines_ ==
+    (*pyramid2)[ pyramid2->size() - 4 ]->params().nlines_ ),
+    "Pyramids lines mismatch" );
+  TEAGN_DEBUG_CONDITION(
+    ( (*pyramid1)[ pyramid1->size() - 4 ]->params().ncols_ ==
+    (*pyramid2)[ pyramid2->size() - 4 ]->params().ncols_ ),
+    "Pyramids columns mismatch" );  
+  
+  /* Step 3 - Pyramid2 enhencement */
+  
+  TePDIMatrix< double > sb1matrix( 0, 0, 
+    TePDIMatrix< double >::AutoMemPol );
+  TePDIMatrix< double > sb2matrix( 0, 0, 
+    TePDIMatrix< double >::AutoMemPol );
+  const unsigned int pys_levels_bound = MIN( reference_raster_best_level,
+    lowres_raster_best_level );
+  unsigned int py1_sb00_index = 0;
+  unsigned int py2_sb00_index = 0;
+  
+  TePDIPIManager progress( "Pyramid enhencement", pys_levels_bound, 
+    progress_interface_enabled_ );
+  
+  for( unsigned int pys_levels_off = 0 ; /* low-low skipping */
+       pys_levels_off < pys_levels_bound ;
+       ++pys_levels_off ) {
+       
+    py1_sb00_index = pyramid1->size() - ( 4 * ( pys_levels_off + 1 ) );
+    py2_sb00_index = pyramid2->size() - ( 4 * ( pys_levels_off + 1 ) );
+    
+    TEAGN_TRUE_OR_RETURN( RasterBand2Matrix( (*pyramid1)[ py1_sb00_index ], 
+      sb1matrix ), "Cannot convert sub-band from pyramid1" );
+    TEAGN_TRUE_OR_RETURN( RasterBand2Matrix( (*pyramid2)[ py2_sb00_index ], 
+      sb2matrix ), "Cannot convert sub-band from pyramid2" );    
+       
+    double sb00_correlation = TePDIMatrixFunctions::GetCorrelation( sb1matrix,
+      sb2matrix );
+      
+    TePDIMatrix< double > absmatrix1( 0, 0, 
+      TePDIMatrix< double >::AutoMemPol );
+    TePDIMatrix< double > absmatrix2( 0, 0, 
+      TePDIMatrix< double >::AutoMemPol );      
+    TePDIMatrix< double > gtmatrix( 0, 0, 
+      TePDIMatrix< double >::AutoMemPol );      
+    TePDIMatrix< double > notmatrix( 0, 0, 
+      TePDIMatrix< double >::AutoMemPol );      
+      
+    for( unsigned int subband = 1 ; subband < 4 ; ++subband ) {
+      TEAGN_TRUE_OR_RETURN( RasterBand2Matrix( 
+        (*pyramid1)[ py1_sb00_index + subband ], 
+        sb1matrix ), "Cannot convert sub-band from pyramid1" );
+      TEAGN_TRUE_OR_RETURN( RasterBand2Matrix( 
+        (*pyramid2)[ py2_sb00_index + subband ], 
+        sb2matrix ), "Cannot convert sub-band from pyramid2" );       
+        
+      TEAGN_TRUE_OR_RETURN( 
+        TePDIMatrixFunctions::Abs( sb1matrix, absmatrix1 ), 
+        "Abs1 matrix calcule error" );
+      TEAGN_TRUE_OR_RETURN( 
+        TePDIMatrixFunctions::Abs( sb2matrix, absmatrix2 ), 
+        "Abs2 matrix calcule error" );
+      TEAGN_TRUE_OR_RETURN( 
+        TePDIMatrixFunctions::WhereIsGreater( absmatrix2, absmatrix1, 
+        gtmatrix ), "GT matrix calcule error" );        
+      TEAGN_TRUE_OR_RETURN( 
+        TePDIMatrixFunctions::Negate( gtmatrix, notmatrix ), 
+        "NOT matrix calcule error" );
+        
+      const unsigned int valid_lines = MIN( sb1matrix.GetLines(),
+        sb2matrix.GetLines() );
+      const unsigned int valid_cols = MIN( sb2matrix.GetColumns(),
+        sb2matrix.GetColumns() );
+      const unsigned int sb2matrix_lines = sb2matrix.GetLines();
+      const unsigned int sb2matrix_cols = sb2matrix.GetColumns();
+      unsigned int line = 0;
+      unsigned int col = 0;
+      TeRaster* outraster_ptr = 
+        (*pyramid2)[ py2_sb00_index + subband ].nakedPointer();
+      bool result = false;
+      double value1 = 0;
+      double value2 = 0;
+      
+      for( line = 0 ; line < sb2matrix_lines ; ++line ) {
+        for( col = 0 ; col < sb2matrix_cols ; ++col ) {
+          if( ( line < valid_lines ) && ( col < valid_cols ) ) {
+            value1 = ( gtmatrix( line, col ) * sb1matrix( line, col ) ) +
+              ( notmatrix( line, col ) * sb2matrix( line, col ) );
+            value2 = ( notmatrix( line, col ) * sb1matrix( line, col ) ) +
+              ( gtmatrix( line, col ) * sb2matrix( line, col ) );              
+          
+            result = outraster_ptr->setElement( col, line, 
+              ( value1 + ( ABS( 1 - sb00_correlation ) * value2 ) ), 0 );
+            TEAGN_DEBUG_CONDITION( result, "Raster write error" );
+          } else {
+            result = outraster_ptr->setElement( col, line, 0.0, 0 );
+            TEAGN_DEBUG_CONDITION( result, "Raster write error" );
+          }
+        }
+      }
+    }
+
+    TEAGN_FALSE_OR_RETURN( progress.Increment(), "Canceled by the user" );
+  }
+  
+  progress.Toggle( false );
+  
+  sb1matrix.Reset();
+  sb2matrix.Reset();
+  
+  /* Step 4 - Low-low swap */
+  
+  TePDITypes::TePDIRasterPtrType py1_raster = (*pyramid1)[ pyramid1->size() - 4 ];
+  TePDITypes::TePDIRasterPtrType py2_raster = 
+    (*pyramid2)[ pyramid2->size() - 4 ];
+  const unsigned int py_lines_bound = py1_raster->params().nlines_;
+  const unsigned int py_cols_bound = py1_raster->params().ncols_;
+  double value = 0;
+  unsigned int py_line;
+  unsigned int py_col;
+  bool get_result = false;
+  bool set_result = false;
+  
+  for( py_line = 0 ; py_line < py_lines_bound ; ++py_line ) {
+    for( py_col = 0 ; py_col < py_cols_bound ; ++py_col ) {
+      get_result = py1_raster->getElement( py_col, py_line, value, 0 );
+      
+      TEAGN_DEBUG_CONDITION( get_result, 
+        "Unable to read from low resolution pyramid" );
+        
+      set_result = py2_raster->setElement( py_col, py_line, value, 0 );
+        
+      TEAGN_DEBUG_CONDITION( set_result, 
+        "Unable to write to high resolution pyramid" );
+    }
+  }
+  
+  pyramid1->clear();
+  
+  /* Step 5 - Pyramid 2 recomposition */
+  
+  TePDIParameters step5_params;
+  step5_params.SetParameter( "wavelets_type", std::string( "mallat" ) );
+  step5_params.SetParameter( "filter_task", std::string( "RecomposePyramid" ) );
+  step5_params.SetParameter( "input_image", reference_raster );
+  step5_params.SetParameter( "band", (int)reference_raster_band );
+  step5_params.SetParameter( "output_image", output_raster );
+  step5_params.SetParameter( "a_filter_l", a_filter_l );
+  step5_params.SetParameter( "a_filter_h", a_filter_h );
+  step5_params.SetParameter( "s_filter_l", s_filter_l );
+  step5_params.SetParameter( "s_filter_h", s_filter_h );
+  step5_params.SetParameter( "filters_scale", filters_scale );         
+  step5_params.SetParameter( "pyramid", pyramid2 );      
+  
+  TEAGN_TRUE_OR_THROW( wavelet_filter.Reset( step5_params ),
+    "Unable to set wavelet filter Parameters ( step 5 )" );
+  TEAGN_TRUE_OR_THROW( wavelet_filter.Apply(), 
+    "Wavelet Filter apply error ( step 5 )" );
+     
+  return true;
+}
+
+
+bool TePDIVenturaFusionStrategy::RasterBand2Matrix( 
+  const TePDITypes::TePDIRasterPtrType& raster,
+  TePDIMatrix< double >& matrix )
+{
+  TEAGN_TRUE_OR_RETURN( raster.isActive(), "Inactive raster" );
+  
+  unsigned int lines_bound = raster->params().nlines_;
+  unsigned int cols_bound = raster->params().ncols_;
+  unsigned int line = 0;
+  unsigned int col = 0;
+  double value = 0;
+  bool result = false;
+  
+  TEAGN_TRUE_OR_RETURN( matrix.Reset( lines_bound, cols_bound ),
+    "Matrix reset error" );
+    
+  TeRaster* raster_ptr = raster.nakedPointer();
+  
+  for( line = 0 ; line < lines_bound ; ++line ) {
+    for( col = 0 ; col < cols_bound ; ++col ) {
+      result = raster_ptr->getElement( col, line, value, 0 );
+      TEAGN_DEBUG_CONDITION( result, "Unable to read from raster" );
+      
+      matrix( line, col ) = value;
+    }
+  }
+  
+  return true;
+}
+        
+     
+bool TePDIVenturaFusionStrategy::findBestDecimLevels( 
+  const TePDITypes::TePDIRasterPtrType& raster1,
+  const TePDITypes::TePDIRasterPtrType& raster2,
+  unsigned long int& r1_level, unsigned long int& r2_level,
+  unsigned long int& decim_error )
+{
+  TEAGN_TRUE_OR_RETURN( raster1.isActive(), "raster1 inactive" );
+  TEAGN_TRUE_OR_RETURN( raster2.isActive(), "raster2 inactive" );
+
+  const unsigned long int r1_lines = raster1->params().nlines_;
+  const unsigned long int r1_cols = raster1->params().ncols_;
+  const unsigned long int r2_lines = raster2->params().nlines_;
+  const unsigned long int r2_cols = raster2->params().ncols_;
+
+  const unsigned long int r1_max_levels = MIN(
+    TePDIMathFunctions::DecimLevels( r1_lines ),
+    TePDIMathFunctions::DecimLevels( r1_cols ) );  
+  const unsigned long int r2_max_levels = MIN(
+    TePDIMathFunctions::DecimLevels( r2_lines ),
+    TePDIMathFunctions::DecimLevels( r2_cols ) );
+  
+  if( ( r1_max_levels < 1 ) || ( r2_max_levels < 1 ) ) {
+    r1_level = r2_level = 0;
+    return false;
+  } else {
+    bool best_level_diff_found = false;
+    
+    unsigned long int curr_diff = 0;
+    long int curr_r1_lines = r1_lines;
+    long int curr_r1_cols = r1_cols;
+    long int curr_r2_lines = 0;
+    long int curr_r2_cols = 0;
+    
+    for( unsigned long int curr_r1_level = 1 ; 
+      curr_r1_level <= r1_max_levels ; 
+      ++curr_r1_level ) {
+      
+      curr_r1_lines = ( long int )
+        ceil( ( (double)curr_r1_lines ) / 2 );
+      curr_r1_cols = ( long int )
+        ceil( ( (double)curr_r1_cols ) / 2 );      
+        
+      curr_r2_lines = r2_lines;
+      curr_r2_cols = r2_cols;        
+    
+      for( unsigned long int curr_r2_level = 1 ; 
+        curr_r2_level <= r2_max_levels ; 
+        ++curr_r2_level ) {
+      
+        curr_r2_lines = ( long int )
+          ceil( ( (double)curr_r2_lines ) / 2 );
+        curr_r2_cols = ( long int )
+          ceil( ( (double)curr_r2_cols ) / 2 );
+          
+        curr_diff = ABS( curr_r1_lines - curr_r2_lines ) +
+          ABS( curr_r1_cols - curr_r2_cols );
+          
+        if( best_level_diff_found ) {
+          if( curr_diff < decim_error ) {
+            r1_level = curr_r1_level;
+            r2_level = curr_r2_level;
+            decim_error = curr_diff;
+          }
+        } else {
+          r1_level = curr_r1_level;
+          r2_level = curr_r2_level;
+          decim_error = curr_diff;
+          best_level_diff_found = true;
+        }
+      }
+    }
+    
+    return true;
+  }
+}        
+
diff --git a/src/terralib/image_processing/TePDIVenturaFusionStrategy.hpp b/src/terralib/image_processing/TePDIVenturaFusionStrategy.hpp
new file mode 100755
index 0000000..9102cf1
--- /dev/null
+++ b/src/terralib/image_processing/TePDIVenturaFusionStrategy.hpp
@@ -0,0 +1,143 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIVENTURAFUSIONSTRATEGY_HPP
+  #define TEPDIVENTURAFUSIONSTRATEGY_HPP
+
+  #include <TeSharedPtr.h>
+  #include "TePDIStrategy.hpp"
+  #include "TePDIParameters.hpp"
+  #include "TePDIMatrix.hpp"
+  
+  #include <string>
+
+  /**
+   * @brief This is the class for Ventura fusion strategy.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup PDIStrategies
+   *
+   * @note The required parameters are:
+   * @param fusion_type ( std::string ) : Must be "ventura".
+   * @param reference_raster ( TePDITypes::TePDIRasterPtrType ) - 
+   *  Reference raster ( higher quality ).
+   * @param lowres_raster ( TePDITypes::TePDIRasterPtrType ) - 
+   *  Low resolution raster ( will be improved ).
+   * @param output_raster ( TePDITypes::TePDIRasterPtrType ) - Output raster.
+   * @param reference_raster_band ( int ) - The band to process for 
+   * reference_raster.
+   * @param lowres_raster_band ( int ) - The band to process for lowres_raster.
+   *
+   * @note The following parameters are optional, and will be used if present:
+   *
+   * @param filters_scale ( double ) - The wavelet filters scale.
+   * @param a_filter_l ( std::vector< double > ) - Wavelet Analysis filter, 
+   * low pass, non
+   * normalized ( used in decomposition ).
+   * @param a_filter_h ( std::vector< double > ) - Wavelet Analysis filter, 
+   * high pass, non
+   * normalized ( used in decomposition ).
+   * @param s_filter_l ( std::vector< double > ) - Wavelet Synthesis filter, 
+   * low pass, non
+   * normalized ( used in recomposition ).
+   * @param s_filter_h ( std::vector< double > ) - Wavelet Synthesis filter, 
+   * high pass, non
+   * normalized ( used in recomposition ).    
+   *
+   * @note The reference_raster lines number must be a multiple
+   * of two multiplied by lowres_raster lines number.
+   * @note The reference_raster columns number must be a multiple
+   * of two multiplied by lowres_raster columns number.
+   */
+  class PDI_DLL TePDIVenturaFusionStrategy : public TePDIStrategy
+  {
+    friend class TePDIVenturaFusionSF;
+  
+    public :
+      
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIVenturaFusionStrategy();
+      
+      /**
+       * @brief Checks if the supplied parameters fits the requirements of each
+       * PDI strategy.
+       *
+       * @note Error log messages must be generated. No exceptions generated.
+       *
+       * @param parameters The parameters to be checked.
+       * @return true if the parameters are OK. false if not.
+       */
+      bool CheckParameters( 
+        const TePDIParameters& parameters ) const;       
+      
+    protected :
+      
+      /**
+       * @brief Default constructor
+       *
+       * @param factoryName Factory name.
+       */
+      TePDIVenturaFusionStrategy();
+      
+      /**
+       * @brief Runs the algorithm implementation.
+       *
+       * @return true if OK. false on errors.
+       */
+      bool Implementation( const TePDIParameters& params );
+      
+      /**
+       * @brief Extracts the band 0 from the raster into the matrix.
+       *
+       * @param raster Input raster.
+       * @param matrix Input matrix.
+       * @return true if ok, valse on errors.
+       */      
+      bool RasterBand2Matrix( const TePDITypes::TePDIRasterPtrType& raster,
+        TePDIMatrix< double >& matrix );
+        
+      /**
+      * @brief Find the best decimation levels bringging the two rasters to
+      * closer sizes.
+      *
+      * @param raster1 Input raster1.
+      * @param raster2 Input raster2.
+      * @param r1_level Raster 1 best decomposition level.
+      * @param r2_level Raster 2 best decomposition level.
+      * @param decim_error The error ( pixels number ) for the best level found.
+      * @return true if OK. false on errors.
+      */
+      bool findBestDecimLevels( 
+        const TePDITypes::TePDIRasterPtrType& raster1,
+        const TePDITypes::TePDIRasterPtrType& raster2,
+        unsigned long int& r1_level, unsigned long int& r2_level,
+        unsigned long int& decim_error );        
+
+  };
+  
+#endif
+
+
+
diff --git a/src/terralib/image_processing/TePDIWaveletAtrous.cpp b/src/terralib/image_processing/TePDIWaveletAtrous.cpp
new file mode 100644
index 0000000..0687c87
--- /dev/null
+++ b/src/terralib/image_processing/TePDIWaveletAtrous.cpp
@@ -0,0 +1,375 @@
+#include "TePDIWaveletAtrous.hpp"
+
+#include <TeAgnostic.h>
+#include "TePDIUtils.hpp"
+#include "TePDITypes.hpp"
+#include "TePDIStatistic.hpp"
+#include "TePDIPrincipalComponents.hpp"
+#include "TeRasterRemap.h"
+#include <TeMatrix.h>
+#include <TeUtils.h>
+#include <math.h>
+#include <queue>
+
+TePDIWaveletAtrous::TePDIWaveletAtrous()
+{
+}
+
+TePDIWaveletAtrous::~TePDIWaveletAtrous()
+{
+}
+
+void TePDIWaveletAtrous::ResetState(const TePDIParameters& params)
+{
+}
+
+bool TePDIWaveletAtrous::CheckParameters(const TePDIParameters& parameters) const
+{
+	TeWaveletAtrousDirection direction;
+	TEAGN_TRUE_OR_RETURN(parameters.GetParameter("direction", direction), "Missing parameter: direction");
+
+	if (direction == DECOMPOSE)
+	{
+		TePDITypes::TePDIRasterPtrType input_raster;
+		TEAGN_TRUE_OR_RETURN(parameters.GetParameter("input_raster", input_raster), "Missing parameter: input_raster");
+		TEAGN_TRUE_OR_RETURN(input_raster.isActive(), "Invalid parameter: input_raster inactive");
+		TEAGN_TRUE_OR_RETURN(input_raster->params().status_ != TeRasterParams::TeNotReady, "Invalid parameter: input_raster not ready");
+	
+		int band;
+		TEAGN_TRUE_OR_RETURN(parameters.GetParameter("band", band), "Missing parameter: band");
+		TEAGN_TRUE_OR_RETURN(band < input_raster->nBands(), "Invalid parameter: band number");
+	
+		int levels;
+		TEAGN_TRUE_OR_RETURN(parameters.GetParameter("levels", levels), "Missing parameter: levels");
+	
+		TeFilterBanks filterType;
+		TEAGN_TRUE_OR_RETURN(parameters.GetParameter("filterType", filterType), "Missing parameter: filterType");
+	
+		TePDITypes::TePDIRasterPtrType multi_raster;
+		TEAGN_TRUE_OR_RETURN(parameters.GetParameter("multi_raster", multi_raster), "Missing parameter: multi_raster");
+
+		bool fit_histogram;
+		TEAGN_TRUE_OR_RETURN(parameters.GetParameter("fit_histogram", fit_histogram), "Missing parameter: fit_histogram");
+
+		TePDITypes::TePDIRasterVectorType output_wavelets;
+		TEAGN_TRUE_OR_RETURN(parameters.GetParameter("output_wavelets", output_wavelets), "Missing parameter: output_wavelets");
+		TEAGN_TRUE_OR_RETURN((int)output_wavelets.size() == (levels + 1), "Invalid output rasters number");
+	
+		for(unsigned int b = 0; b < output_wavelets.size(); b++)
+		{
+			TEAGN_TRUE_OR_RETURN(output_wavelets[b].isActive(), "Invalid parameter: output_wavelets " + Te2String(b) + " inactive");
+			TEAGN_TRUE_OR_RETURN(output_wavelets[b]->params().status_ != TeRasterParams::TeNotReady, "Invalid parameter: output_wavelets " + Te2String(b) + " not ready");
+		}
+	}
+	else if (direction == RECOMPOSE)
+	{
+		std::vector<TePDITypes::TePDIRasterVectorType> input_rasters_wavelets;
+		TEAGN_TRUE_OR_RETURN(parameters.GetParameter("input_rasters_wavelets", input_rasters_wavelets), "Missing parameter: input_rasters_wavelets");
+		for(unsigned int w = 0; w < input_rasters_wavelets.size(); w++)
+			for(unsigned int b = 0; b < input_rasters_wavelets[w].size(); b++)
+			{
+				TEAGN_TRUE_OR_RETURN(input_rasters_wavelets[w][b].isActive(), "Invalid parameter: input_rasters_wavelets inactive");
+				TEAGN_TRUE_OR_RETURN(input_rasters_wavelets[w][b]->params().status_ != TeRasterParams::TeNotReady, "Invalid parameter: input_rasters_wavelets not ready");
+			}
+	
+		int rasters_levels;
+		TEAGN_TRUE_OR_RETURN(parameters.GetParameter("rasters_levels", rasters_levels), "Missing parameter: rasters_levels");
+		for(unsigned int w = 0; w < input_rasters_wavelets.size(); w++)
+			TEAGN_TRUE_OR_RETURN((rasters_levels + 1) == (int)input_rasters_wavelets[w].size(), "Invalid parameter: rasters_levels not ready");
+	
+		std::vector<TePDITypes::TePDIRasterVectorType> reference_raster_wavelets;
+		TEAGN_TRUE_OR_RETURN(parameters.GetParameter("reference_raster_wavelets", reference_raster_wavelets), "Missing parameter: reference_raster_wavelets");
+		for(unsigned int w = 0; w < reference_raster_wavelets.size(); w++)
+			for(unsigned int b = 0; b < reference_raster_wavelets[w].size(); b++)
+			{
+				TEAGN_TRUE_OR_RETURN(reference_raster_wavelets[w][b].isActive(), "Invalid parameter: reference_raster_wavelets inactive");
+				TEAGN_TRUE_OR_RETURN(reference_raster_wavelets[w][b]->params().status_ != TeRasterParams::TeNotReady, "Invalid parameter: reference_raster_wavelets not ready");
+			}
+	
+		int reference_levels;
+		TEAGN_TRUE_OR_RETURN(parameters.GetParameter("reference_levels", reference_levels), "Missing parameter: reference_levels");
+		for(unsigned int w = 0; w < reference_raster_wavelets.size(); w++)
+			TEAGN_TRUE_OR_RETURN((reference_levels + 1) == (int)reference_raster_wavelets[w].size(), "Invalid parameter: reference_levels not ready");
+	
+		double channel_min_level;
+		TEAGN_TRUE_OR_RETURN(parameters.GetParameter("channel_min_level", channel_min_level), "Missing parameter: channel_min_level");
+	
+		double channel_max_level;
+		TEAGN_TRUE_OR_RETURN(parameters.GetParameter("channel_max_level", channel_max_level), "Missing parameter: channel_max_level");
+	
+		TePDITypes::TePDIRasterVectorType output_rasters;
+		TEAGN_TRUE_OR_RETURN(parameters.GetParameter("output_rasters", output_rasters), "Missing parameter: output_rasters");
+	
+		for(unsigned int b = 0; b < output_rasters.size(); b++)
+		{
+			TEAGN_TRUE_OR_RETURN(output_rasters[b].isActive(), "Invalid parameter: output_rasters " + Te2String(b) + " inactive");
+			TEAGN_TRUE_OR_RETURN(output_rasters[b]->params().status_ != TeRasterParams::TeNotReady, "Invalid parameter: output_rasters " + Te2String(b) + " not ready");
+		}
+
+	}
+	else
+		return false;
+
+	return true;
+}
+
+bool filterBank(int filterBankType,TeMatrix &filter)
+{	
+	if (filterBankType == TePDIWaveletAtrous::B3SPLINE)
+	{
+		filter.Init(5, 5, 0.0);
+		std::queue<double> maskWeights;
+		maskWeights.push(1.0/256.0);maskWeights.push(1.0/64.0);maskWeights.push(3.0/128.0);maskWeights.push(1.0/64.0);maskWeights.push(1.0/256.0);
+		maskWeights.push(1.0/64.0);maskWeights.push(1.0/16.0);maskWeights.push(3.0/32.0);maskWeights.push(1.0/16.0);maskWeights.push(1.0/64.0);
+		maskWeights.push(3.0/128.0);maskWeights.push(3.0/32.0);maskWeights.push(9.0/64.0);maskWeights.push(3.0/32.0);maskWeights.push(3.0/128.0);
+		maskWeights.push(1.0/64.0);maskWeights.push(1.0/16.0);maskWeights.push(3.0/32.0);maskWeights.push(1.0/16.0);maskWeights.push(1.0/64.0);
+		maskWeights.push(1.0/256.0);maskWeights.push(1.0/64.0);maskWeights.push(3.0/128.0);maskWeights.push(1.0/64.0);maskWeights.push(1.0/256.0);
+
+		for (int i = 0; i < 5; i++)
+			for (int j = 0; j < 5; j++)
+			{
+				filter(i, j) = maskWeights.front();
+				maskWeights.pop();
+			}
+	}
+ 	else if (filterBankType == TePDIWaveletAtrous::SMALLB3SPLINE)
+	{
+		filter.Init(3, 3, 0.0);
+		std::queue<double> maskWeights;
+		maskWeights.push(1.0/16.0);maskWeights.push(1.0/8.0);maskWeights.push(1.0/16.0);
+		maskWeights.push(1.0/8.0);maskWeights.push(1.0/4.0);maskWeights.push(1.0/8.0);
+		maskWeights.push(1.0/16.0);maskWeights.push(1.0/8.0);maskWeights.push(1.0/16.0);
+	
+		for (int i = 0; i < 3; i++)
+			for (int j = 0; j < 3; j++)
+			{
+				filter(i, j) = maskWeights.front();
+				maskWeights.pop();
+			}
+	}
+	else
+		return false;
+
+	return true;
+}
+
+bool TePDIWaveletAtrous::RunImplementation_decompose()
+{
+	TePDITypes::TePDIRasterPtrType input_raster;
+	TEAGN_TRUE_OR_RETURN(params_.GetParameter("input_raster", input_raster), "Missing parameter: input_raster");
+
+	int band;
+	TEAGN_TRUE_OR_RETURN(params_.GetParameter("band", band), "Missing parameter: band");
+
+	int levels;
+	TEAGN_TRUE_OR_RETURN(params_.GetParameter("levels", levels), "Missing parameter: levels");
+
+	TeFilterBanks filterType;
+	TEAGN_TRUE_OR_RETURN(params_.GetParameter("filterType", filterType), "Missing parameter: filterType");
+
+	TePDITypes::TePDIRasterPtrType multi_raster;
+	TEAGN_TRUE_OR_RETURN(params_.GetParameter("multi_raster", multi_raster), "Missing parameter: multi_raster");
+
+	bool fit_histogram;
+	TEAGN_TRUE_OR_RETURN(params_.GetParameter("fit_histogram", fit_histogram), "Missing parameter: fit_histogram");
+
+	TePDITypes::TePDIRasterVectorType output_wavelets;
+	TEAGN_TRUE_OR_RETURN(params_.GetParameter("output_wavelets", output_wavelets), "Missing parameter: output_wavelets");
+
+	TeMatrix filter;
+	TEAGN_TRUE_OR_THROW(filterBank(filterType, filter), "Filter Bank generation failed");
+
+	/*for(unsigned int l = 1; l <= levels; l++)
+	{
+		TeRasterParams input_raster_params = input_raster->params();
+		input_raster_params.nBands(waveletPlanes);
+		if (input_raster_params.projection() != 0)
+		{
+			TeSharedPtr<TeProjection> proj(TeProjectionFactory::make(input_raster_params.projection()->params())); 
+			input_raster_params.projection(proj.nakedPointer());
+		}
+		input_raster_params.boxResolution(input_raster_params.box().x1(), input_raster_params.box().y1(), input_raster_params.box().x2(), input_raster_params.box().y2(), input_raster_params.resx_, input_raster_params.resy_);
+		input_raster_params.setPhotometric(TeRasterParams::TeMultiBand, -1);
+		input_raster_params.setDataType(TeFLOAT, -1);
+		TEAGN_TRUE_OR_RETURN(output_wavelets[l]->init(input_raster_params), "Output wavelets reset error " + Te2String(l));
+	}*/
+
+	int	l,
+		multi,
+		x,
+		y,
+		i,
+		j,
+		filter_dim = filter.Nrow(),
+		offset = (int)(filter_dim / 2),
+		k,
+		m,
+		lines = input_raster->params().nlines_,
+		columns = input_raster->params().ncols_;
+	double	fit_gain = 1.0,
+		fit_offset = 0.0,
+		p_ori,
+		p_ant,
+		p_new;
+	TeMatrix	inputImageMatrix,
+			std_matrix,
+			mean_matrix;
+	inputImageMatrix.Init(lines, columns, 0.0);
+
+/* Computing statistics to fit the histograms */
+	
+	if (fit_histogram)
+	{
+		TePDIStatistic stat1;
+		TePDIParameters stat1_pars;
+		TePDITypes::TePDIRasterVectorType stat1_rasters;
+		std::vector<int> stat1_bands;
+
+		stat1_rasters.push_back(multi_raster);
+		stat1_pars.SetParameter("rasters", stat1_rasters);
+		stat1_bands.push_back(0);
+		stat1_pars.SetParameter("bands", stat1_bands);
+		TEAGN_TRUE_OR_RETURN(stat1.Reset(stat1_pars), "Unable to inialize the statistc module");
+		stat1.ToggleProgInt(false);
+		double	std1 = stat1.getStdDev(0),
+			mean1 = stat1.getMean(0);
+	
+		TePDIStatistic stat2;
+		TePDIParameters stat2_pars;
+		TePDITypes::TePDIRasterVectorType stat2_rasters;
+		std::vector<int> stat2_bands;
+
+		stat2_rasters.push_back(input_raster);
+		stat2_pars.SetParameter("rasters", stat2_rasters);
+		stat2_bands.push_back(band);
+		stat2_pars.SetParameter("bands", stat2_bands);
+		TEAGN_TRUE_OR_RETURN(stat2.Reset(stat2_pars), "Unable to inialize the statistc module");
+		stat2.ToggleProgInt(false);
+		double	std2 = stat2.getStdDev(0),
+			mean2 = stat2.getMean(0);
+
+		fit_gain = std1 / std2;
+		fit_offset = mean1 - (fit_gain * mean2);
+	}
+
+	double p_fit;
+	for (j = 0; j < lines; j++)
+	{
+		for (i = 0; i < columns; i++)
+		{
+			input_raster->getElement(i, j, p_ant, band);
+			p_fit = fit_gain * p_ant + fit_offset;
+			inputImageMatrix(j, i) = p_fit;
+			input_raster->setElement(i, j, p_fit, band);
+		}
+	}
+
+	for(l = 1; l <= levels; l++)
+	{
+		multi = (int)pow(2., l-1);
+		TePDIPIManager progress("Decomposing Wavelets", (int)(input_raster->params().nlines_), progress_enabled_);
+		for (j = 0; j < lines; j++)
+		{
+			for (i = 0; i < columns; i++)
+ 			{
+				p_ori = p_ant = p_new = 0.0;
+				for (k = 0; k < filter_dim; k++)
+				{
+					for (m = 0; m < filter_dim; m++)
+					{
+						x = i+(k-offset)*multi;
+						y = j+(m-offset)*multi;
+						if (x < 0)
+							x = columns + x;
+						else if (x >= columns)
+							x = x - columns;
+						if (y < 0)
+							y = lines + y;
+						else if (y >= lines)
+							y = y - lines;
+						p_new += filter(k, m) * inputImageMatrix(y, x);
+					}
+				}
+				output_wavelets[l]->setElement(i, j, p_new, 0);
+				output_wavelets[l-1]->getElement(i, j, p_ori, band);
+				output_wavelets[l]->setElement(i, j, p_ori-p_new, 1);
+			}
+			progress.Increment();
+		}
+	}
+
+	inputImageMatrix.Clear();
+
+	return true;
+}
+
+bool TePDIWaveletAtrous::RunImplementation_recompose()
+{
+	std::vector<TePDITypes::TePDIRasterVectorType> input_rasters_wavelets;
+	TEAGN_TRUE_OR_RETURN(params_.GetParameter("input_rasters_wavelets", input_rasters_wavelets), "Missing parameter: input_rasters_wavelets");
+
+	int rasters_levels;
+	TEAGN_TRUE_OR_RETURN(params_.GetParameter("rasters_levels", rasters_levels), "Missing parameter: rasters_levels");
+
+	std::vector<TePDITypes::TePDIRasterVectorType> reference_raster_wavelets;
+	TEAGN_TRUE_OR_RETURN(params_.GetParameter("reference_raster_wavelets", reference_raster_wavelets), "Missing parameter: reference_raster_wavelets");
+
+	int reference_levels;
+	TEAGN_TRUE_OR_RETURN(params_.GetParameter("reference_levels", reference_levels), "Missing parameter: reference_levels");
+
+	double channel_min_level;
+	TEAGN_TRUE_OR_RETURN(params_.GetParameter("channel_min_level", channel_min_level), "Missing parameter: channel_min_level");
+
+	double channel_max_level;
+	TEAGN_TRUE_OR_RETURN(params_.GetParameter("channel_max_level", channel_max_level), "Missing parameter: channel_max_level");
+
+	TePDITypes::TePDIRasterVectorType output_rasters;
+	TEAGN_TRUE_OR_RETURN(params_.GetParameter("output_rasters", output_rasters), "Missing parameter: output_rasters");
+
+	unsigned int b;
+	int	i,
+		j,
+		l;
+	double	pixel,
+			p_pan;
+
+	TePDIPIManager progress("Recomposing wavelets", input_rasters_wavelets.size()*input_rasters_wavelets[0][0]->params().nlines_, progress_enabled_);
+	for(b = 0; b < input_rasters_wavelets.size(); b++)
+	{
+		int	lines = input_rasters_wavelets[b][0]->params().nlines_,
+			columns = input_rasters_wavelets[b][0]->params().ncols_;
+		for (j = 0; j < lines; j++)
+		{
+			for (i = 0; i < columns; i++)
+			{
+				input_rasters_wavelets[b][rasters_levels]->getElement(i, j, pixel, 0);
+				for(l = 1; l <= reference_levels; l++)
+				{
+					reference_raster_wavelets[b][l]->getElement(i, j, p_pan, 1);
+					pixel += p_pan;
+				}
+				pixel = (pixel > channel_max_level?channel_max_level:(pixel < channel_min_level?channel_min_level:pixel));
+				output_rasters[b]->setElement(i, j, pixel, 0);
+			}
+			
+			progress.Increment();
+		}
+	}
+
+	return true;
+}
+
+bool TePDIWaveletAtrous::RunImplementation()
+{
+/* Getting parameters */
+
+	int direction;
+	TEAGN_TRUE_OR_RETURN(params_.GetParameter("direction", direction), "Missing parameter: direction");
+
+	if (direction == DECOMPOSE)
+		return RunImplementation_decompose();
+	else if (direction == RECOMPOSE)
+		return RunImplementation_recompose();
+
+	return false;
+}
diff --git a/src/terralib/image_processing/TePDIWaveletAtrous.hpp b/src/terralib/image_processing/TePDIWaveletAtrous.hpp
new file mode 100644
index 0000000..2828aed
--- /dev/null
+++ b/src/terralib/image_processing/TePDIWaveletAtrous.hpp
@@ -0,0 +1,113 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPDIWAVELETATROUS_HPP
+  #define TEPDIWAVELETATROUS_HPP
+
+	#include "TePDIAlgorithm.hpp"
+
+	#define waveletPlanes 2
+
+  /**
+   * @brief WaveletAtrous.
+   * @author Felipe Castro da Silva <felipe at dpi.inpe.br>
+   * @ingroup PDIWaveletsAlgorithms
+   *
+   * @note The required parameters are:
+   *
+   * @param input_raster (TePDITypes::TePDIRasterPtrType) - Input raster.
+   * @param band (int) - Raster band.
+   * @param levels (int) - Levels to decompose the raster.
+   * @param filterType (TeFilterBanks) - Filter type.
+   * @param multi_raster (TePDITypes::TePDIRasterPtrType) - ?
+   * @param fit_histogram (bool) - ?
+   * @param output_wavelets (TePDITypes::TePDIRasterVectorType) - ?
+   * @param direction (TeWaveletAtrousDirection) - Direction.
+   *
+   */
+  class TePDIWaveletAtrous : public TePDIAlgorithm {
+    public :
+      /** @enum TeWaveletAtrousDirection Decompose or Compose */
+      enum TeWaveletAtrousDirection {DECOMPOSE, RECOMPOSE};
+      /** @enum TeFilterBanks Filter Banks available */
+      enum TeFilterBanks {B3SPLINE, SMALLB3SPLINE};
+
+      /**
+       * @brief Default Constructor.
+       *
+       */
+      TePDIWaveletAtrous();
+
+      /**
+       * @brief Default Destructor
+       */
+      ~TePDIWaveletAtrous();
+
+      /**
+       * @brief Checks if the supplied parameters fits the requirements of each
+       * PDI algorithm implementation.
+       *
+       * @note Error log messages must be generated. No exceptions generated.
+       *
+       * @param parameters The parameters to be checked.
+       * @return true if the parameters are OK. false if not.
+       */
+      bool CheckParameters( const TePDIParameters& parameters ) const;
+      
+    protected :
+      
+      /**
+       * @brief Decide the direction of the analysis based on the direction parameter.
+       *
+       * @return true if OK. false on error.
+       */
+      bool RunImplementation();
+
+      /**
+       * @brief Decomposition.
+       *
+       * @return true if OK. false on error.
+       */
+      bool RunImplementation_decompose();
+
+      /**
+       * @brief Recomposition.
+       *
+       * @return true if OK. false on error.
+       */
+      bool RunImplementation_recompose();
+
+      /**
+       * @brief Reset the internal state to the initial state.
+       *
+       * @param params The new parameters referente at initial state.
+       */
+      void ResetState( const TePDIParameters& params );
+  };
+  
+/** @example TePDIWavelets_test.cpp
+ *    Shows how to use this class.
+ */    
+
+#endif //TEPDIWaveletAtrous_HPP
diff --git a/src/terralib/image_processing/data_structs/TeTileIndexer.h b/src/terralib/image_processing/data_structs/TeTileIndexer.h
new file mode 100755
index 0000000..604b897
--- /dev/null
+++ b/src/terralib/image_processing/data_structs/TeTileIndexer.h
@@ -0,0 +1,242 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TETILEINDEXER_H
+#define TETILEINDEXER_H
+
+#include <TeGeometry.h>
+#include <TeAgnostic.h>
+
+#include <algorithm>
+
+#include <math.h>
+
+/**
+ * @class Polygon tile indexing class for optmized geometrical relational tests.
+ * @author Gilberto Ribeiro <gribeiro at dpi.inpe.br>
+ * @note The related polygon instance must always be valid ( only the polygon
+ * reference is stored internally ).
+ */
+class PDI_DLL TeTileIndexer
+{
+  public :
+  
+    /**
+     * @typedef Indexed elements node type( pair< ring index, seg index  ).
+     */
+    typedef vector< pair< unsigned int, unsigned int > > TeTileSegIndex;
+
+  protected:
+    
+    //!< Reference polygon.
+    const TePolygon& refPol_;
+    
+    //!< Tile resolution along "y" axis.
+    double dy_;
+
+    //!< Each tile segments index vector.
+    std::vector<TeTileSegIndex*> tileIndex_;
+    
+    TeTileIndexer( const TeTileIndexer& );
+    
+    /** Copy overload */
+    const TeTileIndexer& operator=( const TeTileIndexer& );
+    
+    /*! Gets tile index intervals in y direction for a given segment (it does 
+        NOT need to be oriented).
+      \param c1         First segment coordinate.
+      \param c2         Second segment coordinate.
+      \param firstTile  The first tile index that this segment intersects.
+      \param lastTile   The last tile index that this segment intersects.
+     */
+    void getTileIndex(const TeCoord2D& c1, const TeCoord2D& c2, 
+      unsigned int& firstTile, unsigned int& lastTile) const
+    {
+      TEAGN_DEBUG_CONDITION( ( dy_ > 0 ), 
+        "Invalid tile indexer Y resolution" );
+            
+      double lowerY = ((c1.y_ < c2.y_) ? c1.y_ : c2.y_);
+      double upperY = ((c1.y_ > c2.y_) ? c1.y_ : c2.y_);
+
+      firstTile = int((lowerY - refPol_.box().y1()) / dy_);
+      lastTile  = int((upperY - refPol_.box().y1()) / dy_);  
+    }    
+    
+    //! Gets tile index for y coordinate value.
+    /*!
+      \param y         Value of "y" coordinate.
+      \param tileIndex Index of corresponding tile.
+     */
+    void getTileIndex(const double& y, unsigned int& tileIndex) const
+    {
+      TEAGN_DEBUG_CONDITION( ( dy_ > 0 ), 
+        "Invalid tile indexer Y resolution" );
+        
+      tileIndex = int( (y - refPol_.box().y1() ) / dy_ );
+    }    
+    
+    /**
+     * @brief Init internal variables.
+     */
+    void init()
+    {
+      dy_ = 0;
+    }      
+    
+  public:
+  
+    //! Alternative Constructor.
+    /*!
+      \param pol The polygon to index.
+      \param dy Tile size along "y" axis.
+     */
+    TeTileIndexer( const TePolygon& pol, const double& dy )
+      : refPol_( pol )
+    {
+      TEAGN_DEBUG_CONDITION( ( dy > 0 ),
+        "Invalid tile index dy" );
+        
+      init();
+      
+      dy_ = dy;
+      
+      /* Building new index */
+      
+      if( refPol_.size() > 0 ) {
+        TEAGN_DEBUG_CONDITION( ( dy_ > 0 ), 
+          "Invalid tile indexer Y resolution" );
+              
+        unsigned int total_tiles_number = 1 + 
+          ( (unsigned int)floor( refPol_.box().height() / dy_ ) );
+              
+        for(unsigned int i = 0; i < total_tiles_number; ++i)
+        {
+          tileIndex_.push_back( new TeTileSegIndex );
+        }
+
+        const unsigned int rings_number = refPol_.size();
+
+        // for each polygon ring, we need to index its segments
+        for(unsigned int i = 0; i < rings_number; ++i)
+        {
+          addRing( i );
+        }
+      }
+    }    
+    
+    /**
+     * @brief Clear all internal resources.
+     */
+    void clear()
+    {
+      vector<TeTileSegIndex*>::iterator it = tileIndex_.begin();
+      vector<TeTileSegIndex*>::iterator it_end = tileIndex_.end();
+      
+      while( it != it_end ) {
+        delete ( *it );
+        
+        ++it;
+      }
+      
+      tileIndex_.clear();
+      
+      init();
+    }     
+
+    ~TeTileIndexer()
+    {
+      clear();
+    }
+    
+    //! Update the tile index with the information of the supplied ring.
+    void addRing( const unsigned int& ring_index )
+    {
+      TEAGN_DEBUG_CONDITION( ( ring_index < refPol_.size() ),
+        "Invalid ring_index" );
+
+      unsigned int num_points = refPol_[ring_index].size();
+        
+      if( num_points > 0 ) {
+        unsigned int numSegments = num_points - 1;
+  
+        for(unsigned int j = 0; j < numSegments; ++j)
+        {
+          // creates a pointer to the segment
+          pair<unsigned int, unsigned int> segPointer(
+            ring_index, j);
+  
+          // finds the tiles that this segments intersects
+          unsigned int firstTileIndex = 0;
+          unsigned int lastTileIndex = 0;
+            
+          getTileIndex( refPol_[ring_index][j], 
+            refPol_[ring_index][j + 1], 
+            firstTileIndex, lastTileIndex);
+              
+          TEAGN_DEBUG_CONDITION( 
+            ( firstTileIndex < tileIndex_.size() ),
+            "Invalid firstTileIndex" );
+          TEAGN_DEBUG_CONDITION(
+            ( lastTileIndex < tileIndex_.size() ),
+            "Invalid lastTileIndex" );
+  
+          // associates the pointer segment to the tiles
+          for(unsigned int k = firstTileIndex; k <= lastTileIndex; ++k)
+          {
+            tileIndex_[k]->push_back(segPointer);
+          }
+        }
+      }
+    }     
+    
+    /*! Gets tile index.
+      \param y Y value.
+      \param index Output tile pointer ( NULL if not found ).
+    */    
+    void getTile( const double& y, TeTileSegIndex** index ) const
+    {
+      unsigned int tidx;
+      getTileIndex( y, tidx );
+      
+      if( tidx < tileIndex_.size() ) {
+        ( *index ) = tileIndex_[ tidx ];
+      } else {
+        ( *index ) = 0;
+      }
+    }
+    
+    const TePolygon& getPol() const
+    {
+      return refPol_;
+    }
+    
+    unsigned int getTilesNumber()
+    {
+      return (unsigned int)tileIndex_.size();
+    }
+
+};
+
+
+#endif
diff --git a/src/terralib/kernel/Gra_algo.h b/src/terralib/kernel/Gra_algo.h
old mode 100644
new mode 100755
index 3ee948a..80d910f
--- a/src/terralib/kernel/Gra_algo.h
+++ b/src/terralib/kernel/Gra_algo.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -43,7 +43,7 @@ void Dijkstra(
        worst possible estimate is entered.*/
 
     Dist = std::vector<EdgeType>(Gr.size(),
-           std::numeric_limits<EdgeType>::max()); // as good as infinity
+          TeMAXFLOAT); // as good as infinity
     Dist[Start] = (EdgeType)0;
 
     /* The predecessor vector too is initialized with `impossible'
diff --git a/src/terralib/kernel/TeAbstractFactory.h b/src/terralib/kernel/TeAbstractFactory.h
new file mode 100755
index 0000000..46a1d4a
--- /dev/null
+++ b/src/terralib/kernel/TeAbstractFactory.h
@@ -0,0 +1,145 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeAbstractFactory.h
+	\brief Implements a template for the Abstract Factory pattern
+*/
+#ifndef  __TERRALIB_INTERNAL_NEW_FACTORY_H
+#define  __TERRALIB_INTERNAL_NEW_FACTORY_H
+
+#include "TeDefines.h"
+#include <map>
+#include <string>
+
+using std::map;
+using std::string;
+
+//!  Implements a template for the Abstract Factory pattern.
+/*
+    This file implements a templated version of the Abstract Factory Pattern 
+	See: "Design Patterns - Elements of Reusable Object-Oriented Software", by Gamma et. al
+	page 87.
+  \author Gilberto Camara, L�bia Vinhas
+*/
+template <typename PRODUCT,						// The product to be made
+		  typename PARAMS,						// The parameter necessary to make the product
+		  typename PRODUCTIDTYPE=std::string>	// The type used to identify the product
+class TeAbstractFactory
+{
+public:
+
+	//! To link each product to its factory
+	typedef map<PRODUCTIDTYPE, TeAbstractFactory<PRODUCT,PARAMS,PRODUCTIDTYPE>* > TeFactoryMap; 
+
+	//! Returns the single instance of the factory registration
+	static TeFactoryMap& instance()
+	{ 
+		static TeFactoryMap Fmap_;
+		return Fmap_;
+	}
+
+protected:
+
+	//!  Builds a new product from a set of parameters (should be implemented by descendants)
+    virtual PRODUCT* build(PARAMS* /*arg*/)
+	{ 
+		return PRODUCT::DefaultObject(); 
+	}
+
+ 	//!  Builds a new product without parameters (should be implemented by descendants)
+   virtual PRODUCT* build()
+	{ 
+		return PRODUCT::DefaultObject(); 
+	}
+
+public:
+	//! Factory Constructor
+	/*
+		\param prodId the identification of the product that the factory produces
+	*/
+	TeAbstractFactory(PRODUCTIDTYPE prodId);
+
+	//! Destructor
+	virtual ~TeAbstractFactory() {}
+
+	//! Virtual constructor: make the product from some arguments
+	/*
+		\param arg a pointer to an structure that contains the arguments
+		necessary to build the product. The type of product has to be extracted
+		from the arguments
+	*/
+	static PRODUCT* make(PARAMS* arg);
+
+	//! Virtual constructor: explictly identifies which product should be made
+	static PRODUCT* make(PRODUCTIDTYPE prodId);
+
+private:
+	PRODUCTIDTYPE  productIdentification_;
+};
+
+// Factor Constructor
+template <typename PRODUCT, typename PARAMS, typename PRODUCTIDTYPE>
+TeAbstractFactory<PRODUCT,PARAMS,PRODUCTIDTYPE>::TeAbstractFactory(PRODUCTIDTYPE prodId):
+	productIdentification_(prodId)
+{
+	TeAbstractFactory<PRODUCT,PARAMS,PRODUCTIDTYPE>::instance()[prodId] = this;
+}
+
+//! Builds an object, based on the input parameters
+template <typename PRODUCT, typename PARAMS, typename PRODUCTIDTYPE> 
+PRODUCT*
+TeAbstractFactory<PRODUCT,PARAMS,PRODUCTIDTYPE>::make(PRODUCTIDTYPE producId)
+{
+	// try to find the name on the factory dictionary
+	typename TeFactoryMap::iterator i = TeAbstractFactory<PRODUCT,PARAMS,PRODUCTIDTYPE>::instance().find(producId);
+
+	// Not found ?  return the Default Object   
+	if (i == TeAbstractFactory<PRODUCT,PARAMS,PRODUCTIDTYPE>::instance().end())
+		return PRODUCT::DefaultObject();
+
+	// Create an object, based on the input parameters
+	return (*i).second->build();
+}
+
+//! Builds an object, based on the input parameters
+template <typename PRODUCT, typename PARAMS, typename PRODUCTIDTYPE> 
+PRODUCT*
+TeAbstractFactory<PRODUCT,PARAMS,PRODUCTIDTYPE>::make(PARAMS* arg)
+{
+	// If there are no arguments or factory identification return the default object
+	if (!arg)
+		return PRODUCT::DefaultObject();
+
+	PRODUCTIDTYPE productId = arg->getProductId(); 
+
+	// try to find the name on the factory dictionary
+	typename TeFactoryMap::iterator i = TeAbstractFactory<PRODUCT,PARAMS,PRODUCTIDTYPE>::instance().find(productId);
+
+	// Not found ?  return the Default Object   
+	if (i == TeAbstractFactory<PRODUCT,PARAMS,PRODUCTIDTYPE>::instance().end())
+		return PRODUCT::DefaultObject();
+
+	// Create an object, based on the input parameters
+		return (*i).second->build(arg);
+}
+#endif
+
diff --git a/src/terralib/kernel/TeAbstractTheme.cpp b/src/terralib/kernel/TeAbstractTheme.cpp
new file mode 100644
index 0000000..fdddf9f
--- /dev/null
+++ b/src/terralib/kernel/TeAbstractTheme.cpp
@@ -0,0 +1,1294 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright  2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+
+#include "TeAbstractTheme.h"
+#include "TeVisual.h"
+#include "TeRasterTransform.h"
+#include "TeDatabase.h"
+
+extern int  yyparse(string& sqlOut);
+extern int  initParse(const string& strIn, TeDatabase* db);
+
+TeAbstractTheme::TeAbstractTheme(const string& name, TeViewNode* parent, const int& view, const int& id, const TeViewNodeType& nodeType)
+		: TeViewNode(name, parent, view, id, nodeType),
+		generateAttributeRest_(""),
+		generateTemporalRest_(""),
+		hasSpatialRes_(false),
+		geomRest_(0),
+		minScale_(0.0),
+		maxScale_(0.0),
+		visibleRep_(0),
+		enableVisibility_(1),
+		rasterVisual_(0),
+		themeBox_(TeBox())
+{
+	grouping_.groupMode_ = TeNoGrouping;
+
+	//default legends
+	TeVisual* visp = new TeVisual(TePOLYGONS);
+	TeVisual* visl = new TeVisual(TeLINES);
+	TeVisual* vispt = new TeVisual(TePOINTS);
+	TeVisual* vist = new TeVisual(TeTEXT);
+
+	TeColor	color;
+	color.init(100, 220, 220);
+	visp->color(color);
+	visl->color(color);
+	vispt->color(color);
+	color.init(100, 100, 100);
+	visp->contourColor(color);
+	visl->contourColor(color);
+	vispt->contourColor(color);
+
+	outOfCollectionLegend_.setVisual(visp->copy(), TePOLYGONS);		
+	outOfCollectionLegend_.setVisual(visl->copy(), TeLINES);		
+	outOfCollectionLegend_.setVisual(vispt->copy(), TePOINTS);		
+	outOfCollectionLegend_.setVisual(vist->copy(), TeTEXT);	
+
+	color.init(220, 100, 220);
+	visp->color(color);
+	visl->color(color);
+	vispt->color(color);
+	color.init(100, 100, 100);
+	visp->contourColor(color);
+	visl->contourColor(color);
+	vispt->contourColor(color);
+
+	withoutDataConnectionLegend_.setVisual(visp->copy(), TePOLYGONS);		
+	withoutDataConnectionLegend_.setVisual(visl->copy(), TeLINES);		
+	withoutDataConnectionLegend_.setVisual(vispt->copy(), TePOINTS);		
+	withoutDataConnectionLegend_.setVisual(vist->copy(), TeTEXT);	
+
+	color.init(220, 0, 0);
+	visp->color(color);
+	color.init(0, 220, 220);
+	visl->color(color);
+	color.init(220, 90, 180);
+	vispt->color(color);
+	color.init(100, 100, 100);
+	visp->contourColor(color);
+	visl->contourColor(color);
+	vispt->contourColor(color);
+	color.init(0, 0, 0);
+	vist->color(color);
+
+	defaultLegend_.setVisual(visp->copy(), TePOLYGONS);		
+	defaultLegend_.setVisual(visl->copy(), TeLINES);		
+	defaultLegend_.setVisual(vispt->copy(), TePOINTS);		
+	defaultLegend_.setVisual(vist->copy(), TeTEXT);		
+	
+	color.init(80, 240, 100);
+	visp->color(color);
+	color.init(100, 100, 100);
+	visp->contourColor(color);
+	pointingLegend_.setVisual(visp->copy(), TePOLYGONS);		
+	pointingLegend_.setVisual(visl->copy(), TeLINES);		
+	pointingLegend_.setVisual(vispt->copy(), TePOINTS);		
+	pointingLegend_.setVisual(vist->copy(), TeTEXT);	
+
+	color.init(210, 210, 0);
+	visp->color(color);
+	color.init(100, 100, 100);
+	visp->contourColor(color);		
+	queryLegend_.setVisual(visp->copy(), TePOLYGONS);		
+	queryLegend_.setVisual(visl->copy(), TeLINES);		
+	queryLegend_.setVisual(vispt->copy(), TePOINTS);		
+	queryLegend_.setVisual(vist->copy(), TeTEXT);	
+							
+	color.init(255, 255, 0);
+	visp->color(color);
+	color.init(100, 100, 100);
+	visp->contourColor(color);		
+	queryAndPointingLegend_.setVisual(visp->copy(), TePOLYGONS);	
+	queryAndPointingLegend_.setVisual(visl->copy(), TeLINES);		
+	queryAndPointingLegend_.setVisual(vispt->copy(), TePOINTS);		
+	queryAndPointingLegend_.setVisual(vist->copy(), TeTEXT);	
+
+	delete visp;
+	delete visl;
+	delete vispt;
+	delete vist;
+
+	creationTime_.now();
+}
+
+TeAbstractTheme::TeAbstractTheme(const TeViewNodeParams& params) : 
+		TeViewNode(params),
+		generateAttributeRest_(""),
+		generateTemporalRest_(""),
+		hasSpatialRes_(false),
+		geomRest_(0),
+		minScale_(0.0),
+		maxScale_(0.0),
+		visibleRep_(0),
+		enableVisibility_(1),
+		rasterVisual_(0),
+		themeBox_(TeBox())
+{
+	grouping_.groupMode_ = TeNoGrouping;
+	//default legends
+	TeVisual* visp = new TeVisual(TePOLYGONS);
+	TeVisual* visl = new TeVisual(TeLINES);
+	TeVisual* vispt = new TeVisual(TePOINTS);
+	TeVisual* vist = new TeVisual(TeTEXT);
+	TeColor	color;
+	color.init(100, 220, 220);
+	visp->color(color);
+	visl->color(color);
+	vispt->color(color);
+	color.init(100, 100, 100);
+	visp->contourColor(color);
+	visl->contourColor(color);
+	vispt->contourColor(color);
+
+	outOfCollectionLegend_.setVisual(visp->copy(), TePOLYGONS);		
+	outOfCollectionLegend_.setVisual(visl->copy(), TeLINES);		
+	outOfCollectionLegend_.setVisual(vispt->copy(), TePOINTS);		
+	outOfCollectionLegend_.setVisual(vist->copy(), TeTEXT);	
+
+	color.init(220, 100, 220);
+	visp->color(color);
+	visl->color(color);
+	vispt->color(color);
+	color.init(100, 100, 100);
+	visp->contourColor(color);
+	visl->contourColor(color);
+	vispt->contourColor(color);
+
+	withoutDataConnectionLegend_.setVisual(visp->copy(), TePOLYGONS);		
+	withoutDataConnectionLegend_.setVisual(visl->copy(), TeLINES);		
+	withoutDataConnectionLegend_.setVisual(vispt->copy(), TePOINTS);		
+	withoutDataConnectionLegend_.setVisual(vist->copy(), TeTEXT);	
+
+	color.init(220, 0, 0);
+	visp->color(color);
+	color.init(0, 220, 220);
+	visl->color(color);
+	color.init(220, 90, 180);
+	vispt->color(color);
+	color.init(100, 100, 100);
+	visp->contourColor(color);
+	visl->contourColor(color);
+	vispt->contourColor(color);
+	color.init(0, 0, 0);
+	vist->color(color);
+
+	defaultLegend_.setVisual(visp->copy(), TePOLYGONS);		
+	defaultLegend_.setVisual(visl->copy(), TeLINES);		
+	defaultLegend_.setVisual(vispt->copy(), TePOINTS);		
+	defaultLegend_.setVisual(vist->copy(), TeTEXT);		
+	
+	color.init(80, 240, 100);
+	visp->color(color);
+	color.init(100, 100, 100);
+	visp->contourColor(color);
+	pointingLegend_.setVisual(visp->copy(), TePOLYGONS);		
+	pointingLegend_.setVisual(visl->copy(), TeLINES);		
+	pointingLegend_.setVisual(vispt->copy(), TePOINTS);		
+	pointingLegend_.setVisual(vist->copy(), TeTEXT);	
+
+	color.init(210, 210, 0);
+	visp->color(color);
+	color.init(100, 100, 100);
+	visp->contourColor(color);		
+	queryLegend_.setVisual(visp->copy(), TePOLYGONS);		
+	queryLegend_.setVisual(visl->copy(), TeLINES);		
+	queryLegend_.setVisual(vispt->copy(), TePOINTS);		
+	queryLegend_.setVisual(vist->copy(), TeTEXT);	
+							
+	color.init(255, 255, 0);
+	visp->color(color);
+	color.init(100, 100, 100);
+	visp->contourColor(color);		
+	queryAndPointingLegend_.setVisual(visp->copy(), TePOLYGONS);	
+	queryAndPointingLegend_.setVisual(visl->copy(), TeLINES);		
+	queryAndPointingLegend_.setVisual(vispt->copy(), TePOINTS);		
+	queryAndPointingLegend_.setVisual(vist->copy(), TeTEXT);
+
+	delete visp;
+	delete visl;
+	delete vispt;
+	delete vist;
+
+	creationTime_.now();
+}
+
+//! Copy constructor
+TeAbstractTheme::TeAbstractTheme (const TeAbstractTheme& other) : 
+	TeViewNode(other.viewNodeParams_) 
+{
+	generateAttributeRest_ = other.generateAttributeRest_;
+	generateTemporalRest_ = other.generateTemporalRest_;
+	generateSpatialRest_ = other.generateSpatialRest_; 
+	spatialRelation_ = other.spatialRelation_;
+	hasSpatialRes_ =  other.hasSpatialRes_;
+	boxRest_ = other.boxRest_;
+	geomRest_ = other.geomRest_; 
+	geomRepRest_ = other.geomRepRest_;	
+	minScale_ = other.minScale_;
+	maxScale_ = other.maxScale_;
+	visibleRep_ = other.visibleRep_;
+	enableVisibility_ = other.enableVisibility_;
+
+	grouping_ = other.grouping_;
+
+	cleanLegend();
+	legend_.resize(other.legend_.size());
+	copy(other.legend_.begin(),other.legend_.end(),legend_.begin());
+	outOfCollectionLegend_ = other.outOfCollectionLegend_;
+	withoutDataConnectionLegend_ = other.withoutDataConnectionLegend_;	
+	defaultLegend_ = other.defaultLegend_;
+	pointingLegend_ = other.pointingLegend_;
+	queryLegend_ = other.queryLegend_;
+	queryAndPointingLegend_ = other.queryAndPointingLegend_; 
+	
+	objectSet_ = other.objectSet_;
+	numLayerObjects_ = other.numLayerObjects_;
+	itemStatusMap_ = other.itemStatusMap_;
+	objStatusMap_ = other.objStatusMap_;
+	rasterVisual_ = 0;
+	if(other.rasterVisual_)
+	{
+		rasterVisual_ = new TeRasterTransform();
+		(*rasterVisual_) = (*other.rasterVisual_);
+	}
+	themeBox_ = other.themeBox_;
+	creationTime_ = other.creationTime_;
+}
+
+//! Destructor
+TeAbstractTheme::~TeAbstractTheme () 
+{ 
+	if (rasterVisual_)
+		delete rasterVisual_;
+	generateAttributeRest_.clear();
+	generateTemporalRest_.clear();
+	generateSpatialRest_.clear();
+	cleanLegend();
+	outOfCollectionLegend_.clear();
+	withoutDataConnectionLegend_.clear();
+	defaultLegend_.clear(); 
+	pointingLegend_.clear(); 
+	queryLegend_.clear(); 
+	queryAndPointingLegend_.clear();
+}
+
+TeAbstractTheme& 
+TeAbstractTheme::operator= (const TeAbstractTheme& other)
+{
+	if ( this != &other )
+	{
+		viewNodeParams_ = other.viewNodeParams_;
+		
+		generateAttributeRest_ = other.generateAttributeRest_;
+		generateTemporalRest_ = other.generateTemporalRest_;
+		generateSpatialRest_ = other.generateSpatialRest_; 
+		spatialRelation_ = other.spatialRelation_;
+		hasSpatialRes_ =  other.hasSpatialRes_;
+		boxRest_ = other.boxRest_;
+		geomRest_ = other.geomRest_; 
+		geomRepRest_ = other.geomRepRest_;	
+		minScale_ = other.minScale_;
+		maxScale_ = other.maxScale_;
+		visibleRep_ = other.visibleRep_;
+		enableVisibility_ = other.enableVisibility_;
+
+		grouping_ = other.grouping_;
+
+		cleanLegend();
+		legend_.resize(other.legend_.size());
+		copy(other.legend_.begin(),other.legend_.end(),legend_.begin());
+		outOfCollectionLegend_ = other.outOfCollectionLegend_;
+		withoutDataConnectionLegend_ = other.withoutDataConnectionLegend_;	
+		defaultLegend_ = other.defaultLegend_;
+		pointingLegend_ = other.pointingLegend_;
+		queryLegend_ = other.queryLegend_;
+		queryAndPointingLegend_ = other.queryAndPointingLegend_; 
+		
+		objectSet_ = other.objectSet_;
+		numLayerObjects_ = other.numLayerObjects_;
+		itemStatusMap_ = other.itemStatusMap_;
+		objStatusMap_ = other.objStatusMap_;
+	
+		if(rasterVisual_)
+			delete rasterVisual_;
+		rasterVisual_ = 0;
+		if(other.rasterVisual_)
+		{
+			rasterVisual_ = new TeRasterTransform();
+			(*rasterVisual_) = (*other.rasterVisual_);
+		}
+		themeBox_ = other.themeBox_;
+		creationTime_ = other.creationTime_;
+	}
+	return *this;
+}
+
+int TeAbstractTheme::visibleGeoRep()
+{
+	return (visibleRep_ & ~0x40000000 & ~0x80000000 & ~0x20000000);
+}
+
+void TeAbstractTheme::removeRasterVisual()
+{ 
+	if (rasterVisual_)
+	{
+		delete rasterVisual_;
+		rasterVisual_ = 0;
+	}
+}
+
+void TeAbstractTheme::cleanLegend()
+{
+   while (legend_.size())     
+   {
+       legend_[0].clear();
+       legend_.erase(legend_.begin());
+   }
+   legend_.clear(); 
+}
+
+void 
+TeAbstractTheme::setSpatialRest(TeBox& box, TeGeomRep rep, TeSpatialRelation relation)
+{
+	hasSpatialRes_ = true;
+	boxRest_ = box;
+	spatialRelation_ = relation;
+	geomRepRest_ = rep;
+	geomRest_ = 0;
+}
+
+void 
+TeAbstractTheme::setSpatialRest(TeGeometry* geom, TeGeomRep rep, TeSpatialRelation relation)
+{
+	hasSpatialRes_ = true;
+	geomRest_ = geom;
+	spatialRelation_ = relation;
+	geomRepRest_ = rep;
+	boxRest_ = TeBox();
+}
+
+void TeAbstractTheme::legend (TeLegendEntry& leg)
+{
+	if(leg.group() == -6)	// queried and pointed objects visual
+		queryAndPointingLegend_ = leg;
+	else if(leg.group() == -5)	// queried objects visual
+		queryLegend_ = leg;
+	else if (leg.group() == -4)
+		pointingLegend_ = leg;
+	else if (leg.group() == -3)
+		defaultLegend_ = leg;
+	else if (leg.group() == -2)
+		withoutDataConnectionLegend_ = leg;
+	else if (leg.group() == -1)
+		outOfCollectionLegend_ = leg;
+	else if (leg.group() > -1)
+		legend_.push_back (leg);
+}
+
+void 
+TeAbstractTheme::resetGrouping ()
+{
+	if((grouping_.groupMode_ == TeRasterSlicing) && rasterVisual_)
+			this->removeRasterVisual();
+
+	grouping_.groupMode_ = TeNoGrouping;
+	legend_.clear();
+	return;
+}
+
+bool 
+TeAbstractTheme::buildGrouping(const TeGrouping& g, vector<TeSlice>& slices)
+{
+	grouping_ = g;
+	legend_.clear(); 
+	
+	for(unsigned int j=0; j<slices.size(); j++)
+	{
+		TeLegendEntry legend(slices[j]);
+		legend.group(j);
+		legend.theme(id());
+		legend_.push_back(legend);
+	}	
+	return true;
+}
+
+bool
+TeAbstractTheme::setGroupingVisual(int n, TeVisual* visual, TeGeomRep rep)
+{
+	if(	(n > grouping_.groupNumSlices_)	||
+		((int)legend_.size() < n)				|| 
+		(legend_.empty()) )
+		return false;
+	legend_[(n-1)].setVisual (visual->copy(), rep); 
+	return true;
+}
+
+bool
+TeAbstractTheme::setGroupingVisual(int n, TeGeomRepVisualMap& vismap)
+{
+	if(	(n > grouping_.groupNumSlices_)	||
+		((int)legend_.size() < n)		|| 
+		(legend_.empty()) )
+		return false;
+
+	TeGeomRepVisualMap::iterator it = vismap.begin();
+	while (it != vismap.end())
+	{
+		legend_[(n-1)].setVisual(it->second->copy(),it->first);
+		++it;
+	}
+	return true;
+}
+
+TeSliceVector 
+TeAbstractTheme::getSlices()
+{
+	TeSliceVector sliceVec;
+	for(unsigned int x=0; x<legend_.size(); ++x)
+	{
+		TeSlice slice = legend_[x].slice();
+		sliceVec.push_back (slice);
+	}
+	return sliceVec;
+}
+
+
+
+void TeAbstractTheme::createRasterVisual(TeRaster* rst)
+{
+	if (rasterVisual_)
+		delete rasterVisual_;
+
+	if (!rst)
+		return;
+
+	rasterVisual_ = new TeRasterTransform();
+										
+	if (rst->params().photometric_[0] == TeRasterParams::TePallete)  // raster palette -> uses its palette
+	{
+		rasterVisual_->setTransfFunction(&TeRasterTransform::Pallete2ThreeBand);
+		rasterVisual_->setLutSize(rst->params().lutr_.size());
+		return;
+	}
+
+	if (visibleRep_ & 0x40000000  &&		// sliced raster -> generate the
+		grouping_.groupMode_ == TeRasterSlicing)	// appropriate palette
+	{
+		int band = atoi(grouping_.groupAttribute_.name_.c_str());
+		rasterVisual_->setSrcBand(band);
+		if (rst->params().dataType_[band] != TeUNSIGNEDCHAR)
+			rasterVisual_->generateLUT(legend_, 1024, defaultLegend_.visual(TePOLYGONS)->color());
+		else
+			rasterVisual_->generateLUT(legend_, 256, defaultLegend_.visual(TePOLYGONS)->color());
+		rasterVisual_->setTransfFunction(&TeRasterTransform::LUT2ThreeBand);
+		return;
+	}
+
+	if (rst->params().dataType_[0] != TeUNSIGNEDCHAR)	// non unsigned char -> generate linear transformation
+		rasterVisual_->setLinearTransfParameters(rst->params().vmin_[0],rst->params().vmax_[0], 0, 255);
+
+	if (rst->params().nBands() == 1)				
+		rasterVisual_->setTransfFunction(&TeRasterTransform::Mono2ThreeBand);
+	else if (rst->params().nBands() == 3)
+		rasterVisual_->setTransfFunction(&TeRasterTransform::ThreeBand2RGB);
+	else
+		rasterVisual_->setTransfFunction(&TeRasterTransform::Band2Band);
+}
+
+void TeAbstractTheme::setParent (TeViewNode* )
+{
+}
+
+void TeAbstractTheme::setStatus(vector<string>& oidVec, vector<string>& itemVec, int status)
+{
+	vector<string>::iterator it;
+
+	if(status == 0)
+	{
+		for(it=oidVec.begin(); it!=oidVec.end();++it)
+		{
+			string s = *it;
+			if(objStatusMap_.find(s) != objStatusMap_.end())
+				objStatusMap_.erase(s);
+		}
+		for(it=itemVec.begin(); it!=itemVec.end();++it)
+		{
+			string s = *it;
+			if(itemStatusMap_.find(s) != itemStatusMap_.end())
+				itemStatusMap_.erase(s);
+		}
+	}
+	else
+	{
+		for(it=oidVec.begin(); it!=oidVec.end();++it)
+		{
+			string s = *it;
+			objStatusMap_[s] = status;
+		}
+		for(it=itemVec.begin(); it!=itemVec.end();++it)
+		{
+			string s = *it;
+			itemStatusMap_[s] = status;
+		}
+	}
+}
+
+void TeAbstractTheme::setStatusForObjectToggled(string oid)
+{
+	string uid;
+
+	int& oidStatus = objStatusMap_[oid];
+	if (oidStatus == TeDEFAULT)
+		oidStatus = TePOINTED;
+	else if (oidStatus == TePOINTED)
+		oidStatus = TeDEFAULT;
+	else if (oidStatus == TeQUERIED)
+		oidStatus = TePOINTED_QUERIED;
+	else if (oidStatus == TePOINTED_QUERIED)
+		oidStatus = TeQUERIED;
+
+	set<string> oidSet;
+	oidSet.insert(oid);
+	vector<string> uidVec = getItemVector(oidSet);
+	for (unsigned int i = 0; i < uidVec.size(); ++i)
+	{
+		uid = uidVec[i];
+		int& uidStatus = itemStatusMap_[uidVec[i]];
+		if (uidStatus == TeDEFAULT)
+		{
+			if (oidStatus == TePOINTED || oidStatus == TePOINTED_QUERIED)
+				uidStatus = TePOINTED;
+		}
+		else if (uidStatus == TePOINTED)
+		{
+			if (oidStatus == TeDEFAULT || oidStatus == TeQUERIED)
+				itemStatusMap_.erase(uid);
+		}
+		else if (uidStatus == TeQUERIED)
+		{
+			if (oidStatus == TePOINTED || oidStatus == TePOINTED_QUERIED)
+				uidStatus = TePOINTED_QUERIED;
+		}
+		else if (uidStatus == TePOINTED_QUERIED)
+		{
+			if (oidStatus == TeDEFAULT || oidStatus == TeQUERIED)
+				uidStatus = TeQUERIED;
+		}
+	}
+	
+	// Save the status id of the object
+	if (oidStatus == TeDEFAULT)
+		objStatusMap_.erase(oid);
+}
+
+void TeAbstractTheme::setStatusForItemsToggled(set<string>& oidSet, vector<string>& uidVec)
+{
+	unsigned int i;
+	int oidStatus;
+	string oid, uid;
+	set<string>::iterator it;
+
+	// Set the new status of the uids
+	for (i = 0; i < uidVec.size(); ++i)
+	{
+		uid = uidVec[i];
+		if (itemStatusMap_[uid] == TeDEFAULT)
+			itemStatusMap_[uid] = TePOINTED;
+		else if (itemStatusMap_[uid] == TePOINTED)
+			itemStatusMap_.erase(uid);
+		else if (itemStatusMap_[uid] == TeQUERIED)
+			itemStatusMap_[uid] = TePOINTED_QUERIED;
+		else if (itemStatusMap_[uid] == TePOINTED_QUERIED)
+			itemStatusMap_[uid] = TeQUERIED;
+	}
+
+
+	// Set the new status of the oids
+	for (it = oidSet.begin(); it != oidSet.end(); ++it)
+	{
+		oid = *it;
+		oidStatus = 0;
+		set<string> objSet;
+		objSet.insert(oid);
+		vector<string> uidVec = getItemVector(objSet);
+		for (i = 0; i < uidVec.size(); ++i)
+		{
+			uid = uidVec[i];
+			if (itemStatusMap_[uid] == TePOINTED_QUERIED)
+			{
+				oidStatus = TePOINTED_QUERIED;
+				break;
+			}
+			oidStatus = MAX(oidStatus, itemStatusMap_[uid]);
+			if (itemStatusMap_[uid] == TeDEFAULT)
+				itemStatusMap_.erase(uid);
+		}	
+		
+		if (oidStatus == 0)
+			objStatusMap_.erase(oid);
+		else
+			objStatusMap_[oid] = oidStatus;
+	}
+}
+
+void TeAbstractTheme::setStatusForNewItemsQueried(set<string>& oidSet, vector<string>& uidVec)
+{
+	unsigned int i;
+	string oid, uid;
+	vector<string> prevOidQVec;		// previous oids queried
+	vector<string> notInOidSetVec;	// oid is not in oidSet
+	vector<string> defaultVec;		// vector with oids or uids to be set as default
+	map<string, int>::iterator mapIt;
+	set<string>::iterator setIt;
+
+	// Get the previous oids queried
+	for (mapIt = objStatusMap_.begin(); mapIt != objStatusMap_.end(); ++mapIt)
+	{
+		oid = mapIt->first;
+		if (objStatusMap_[oid] == TeQUERIED || objStatusMap_[oid] == TePOINTED_QUERIED)
+			prevOidQVec.push_back(mapIt->first);
+	}
+
+	// Check if the previous oids queried are in the oidSet; in positive case, remove
+	// them from the oidSet; in negative case, put them in the vector notInOidSetVec
+	for (i = 0; i < prevOidQVec.size(); ++i)
+	{
+		oid = prevOidQVec[i];
+		if (oidSet.find(oid) != oidSet.end())			
+			oidSet.erase(oid);				// object is in the input oidSet
+		else
+			notInOidSetVec.push_back(oid);	// object is not in the input oidSet
+	}
+
+	// For the objects in oidSet, set the queried status for them
+	for (setIt = oidSet.begin(); setIt != oidSet.end(); ++setIt)
+	{
+		oid = *setIt;
+		if (objStatusMap_[oid] == TeDEFAULT)
+			objStatusMap_[oid] = TeQUERIED;
+		else if (objStatusMap_[oid] == TePOINTED)
+			objStatusMap_[oid] = TePOINTED_QUERIED;
+	}
+
+	// For the objects not in oidSet, insert it in oidSet, and remove their queried status
+	for (i = 0; i < notInOidSetVec.size(); ++i)
+	{
+		oid = notInOidSetVec[i];
+		if (objStatusMap_[oid] == TeQUERIED)
+			defaultVec.push_back(oid);
+		else if (objStatusMap_[oid] == TePOINTED_QUERIED)
+			objStatusMap_[oid] = TePOINTED;
+		
+		oidSet.insert(oid);
+	}
+
+	for (i = 0; i < defaultVec.size(); ++i)
+		objStatusMap_.erase(defaultVec[i]);
+
+	// Remove the queried status for the uids that were previously queried
+	defaultVec.clear();
+	for (mapIt = itemStatusMap_.begin(); mapIt != itemStatusMap_.end(); ++mapIt)
+	{
+		uid = mapIt->first;
+		if (itemStatusMap_[uid] == TeQUERIED)
+			defaultVec.push_back(uid);
+		else if (itemStatusMap_[uid] == TePOINTED_QUERIED)
+			itemStatusMap_[uid] = TePOINTED;			
+	}
+
+	for (i = 0; i < defaultVec.size(); ++i)
+		itemStatusMap_.erase(defaultVec[i]);
+
+	// Set the queried status for the input uidVec
+	for (i = 0; i < uidVec.size(); ++i)
+	{
+		uid = uidVec[i];
+		if (itemStatusMap_[uid] == TeDEFAULT)
+			itemStatusMap_[uid] = TeQUERIED;
+		else if (itemStatusMap_[uid] == TePOINTED)
+			itemStatusMap_[uid] = TePOINTED_QUERIED;
+	}
+}
+
+void TeAbstractTheme::setStatusForNewObjectsPointed(set<string>& oidSet)
+{
+	unsigned int i;
+	string oid, uid;
+	set<string> prevOidPointedSet;		// previous oids pointed
+	set<string> objInInputOidSet;		// set containing objects in oidSet
+	set<string> objNotInInputOidSet;	// set containing objects not in oidSet
+	vector<string> defaultVec;		    // vector with oids or uids to be set as default
+	vector<string> uidVec;				// vector of uids
+	map<string, int>::iterator mapIt;
+	set<string>::iterator setIt;
+
+	// Get the previous oids pointed
+	for (mapIt = objStatusMap_.begin(); mapIt != objStatusMap_.end(); ++mapIt)
+	{
+		oid = mapIt->first;
+		if (objStatusMap_[oid] == TePOINTED || objStatusMap_[oid] == TePOINTED_QUERIED)
+			prevOidPointedSet.insert(mapIt->first);
+	}
+
+	// If the set of objects is empty, remove the pointed status of the previous oids and uids
+	if (oidSet.empty())
+	{
+		for (setIt = prevOidPointedSet.begin(); setIt != prevOidPointedSet.end(); ++setIt)
+		{
+			oid = *setIt;
+			if (objStatusMap_[oid] == TePOINTED)
+				defaultVec.push_back(oid);
+			else if (objStatusMap_[oid] == TePOINTED_QUERIED)
+				objStatusMap_[oid] = TeQUERIED;
+
+			oidSet.insert(oid);
+		}
+
+		for (i = 0; i < defaultVec.size(); ++i)
+			objStatusMap_.erase(defaultVec[i]);
+
+		defaultVec.clear();
+//		uidVec = getUidVec(prevOidPointedVec.begin(), prevOidPointedVec.end(), this); 
+		uidVec = getItemVector(prevOidPointedSet); 
+		for (i = 0; i < uidVec.size(); ++i)
+		{
+			uid = uidVec[i];
+			if (itemStatusMap_[uid] == TePOINTED)
+				defaultVec.push_back(uid);
+			else if (itemStatusMap_[uid] == TePOINTED_QUERIED)
+				itemStatusMap_[uid] = TeQUERIED;
+		}
+
+		for (i = 0; i < defaultVec.size(); ++i)
+			itemStatusMap_.erase(defaultVec[i]);
+
+		return;
+	}
+
+	// Check if the previous oids pointed are in the oidSet; in positive case, put
+	// them in objInOidSetVec; in negative case, put them in the objNotInOidSetVec
+	for (setIt = prevOidPointedSet.begin(); setIt != prevOidPointedSet.end(); ++setIt)
+	{
+		oid = *setIt;
+		if (oidSet.find(oid) != oidSet.end())
+			objInInputOidSet.insert(oid);		// object is in the input oidSet
+		else
+			objNotInInputOidSet.insert(oid);	// object is not in the input oidSet
+	}
+
+	// For the objects in oidSet, set the pointed status for them
+	for (setIt = oidSet.begin(); setIt != oidSet.end(); ++setIt)
+	{
+		oid = *setIt;
+		if (objStatusMap_[oid] == TeDEFAULT)
+			objStatusMap_[oid] = TePOINTED;
+		else if (objStatusMap_[oid] == TeQUERIED)
+			objStatusMap_[oid] = TePOINTED_QUERIED;
+	}
+
+	// For the objects not in oidSet, remove their pointed status
+	defaultVec.clear();
+	for (setIt = objNotInInputOidSet.begin(); setIt != objNotInInputOidSet.end(); ++setIt)
+	{
+		oid = *setIt;
+		if (objStatusMap_[oid] == TePOINTED)
+			defaultVec.push_back(oid);
+		else if (objStatusMap_[oid] == TePOINTED_QUERIED)
+			objStatusMap_[oid] = TeQUERIED;
+	}
+
+	for (i = 0; i < defaultVec.size(); ++i)
+		objStatusMap_.erase(defaultVec[i]);
+
+	// For the objects in oidSet, set the pointed status for their uids
+	uidVec = getItemVector(oidSet);
+	for (i = 0; i < uidVec.size(); ++i)
+	{
+		uid = uidVec[i];
+		if (itemStatusMap_[uid] == TeDEFAULT)
+			itemStatusMap_[uid] = TePOINTED;
+		else if (itemStatusMap_[uid] == TeQUERIED)
+			itemStatusMap_[uid] = TePOINTED_QUERIED;
+	}
+
+	// For the objects not in oidSet, remove the pointed status for their uids
+	defaultVec.clear();
+	uidVec = getItemVector(objNotInInputOidSet);
+	for (i = 0; i < uidVec.size(); ++i)
+	{
+		uid = uidVec[i];
+		if (itemStatusMap_[uid] == TePOINTED)
+			defaultVec.push_back(uid);
+		else if (itemStatusMap_[uid] == TePOINTED_QUERIED)
+			itemStatusMap_[uid] = TeQUERIED;
+	}
+
+	for (i = 0; i < defaultVec.size(); ++i)
+		itemStatusMap_.erase(defaultVec[i]);
+
+	// Insert in the oidSet the objects that are not in the input oidSet
+	for (setIt = objNotInInputOidSet.begin(); setIt != objNotInInputOidSet.end(); ++setIt)
+		oidSet.insert(*setIt);
+
+	// Remove from the oidSet the objects that were in the input oidSet
+	for (setIt = objInInputOidSet.begin(); setIt != objInInputOidSet.end(); ++setIt)
+		oidSet.erase(*setIt);
+}
+
+void TeAbstractTheme::setStatusForNewItemsPointed(vector<string>& itemVec)
+{
+	unsigned int i;
+	string oid, item;
+	map<string, int>::iterator mapIt;
+	vector<string> defaultVec;
+
+	//-----------------------------------------------------------------------
+	// Set the pointing status for the input items
+	//-----------------------------------------------------------------------
+
+	// Remove the pointing status for all the items
+	for (mapIt = itemStatusMap_.begin(); mapIt != itemStatusMap_.end(); ++mapIt)
+	{
+		item = mapIt->first;
+		if (itemStatusMap_[item] == TePOINTED)
+			defaultVec.push_back(item);
+		else if (objStatusMap_[item] == TePOINTED_QUERIED)
+			itemStatusMap_[item] = TeQUERIED;
+	}
+
+	for (i = 0; i < defaultVec.size(); ++i)
+		itemStatusMap_.erase(defaultVec[i]);
+
+	for (i = 0; i < itemVec.size(); ++i)
+	{
+		item = itemVec[i];
+		if (itemStatusMap_[item] == TeDEFAULT)
+			itemStatusMap_[item] = TePOINTED;
+		else if (itemStatusMap_[item] == TeQUERIED)
+			itemStatusMap_[item] = TePOINTED_QUERIED;	
+	}
+
+	//-----------------------------------------------------------------------
+	// Set the pointing status for the objects associated to the input items
+	//-----------------------------------------------------------------------
+	
+	// Remove the pointing status for all the objects
+	defaultVec.clear();
+	for (mapIt = objStatusMap_.begin(); mapIt != objStatusMap_.end(); ++mapIt)
+	{
+		oid = mapIt->first;
+		if (objStatusMap_[oid] == TePOINTED)
+			defaultVec.push_back(oid);
+		else if (objStatusMap_[oid] == TePOINTED_QUERIED)
+			objStatusMap_[oid] = TeQUERIED;
+	}
+
+	for (i = 0; i < defaultVec.size(); ++i)
+		objStatusMap_.erase(defaultVec[i]);
+
+	// Set the pointing status for the objects associated to the input items
+	set<string> oidSet = getObjects(itemVec);
+	set<string>::iterator setIt;
+	for (setIt = oidSet.begin(); setIt != oidSet.end(); ++setIt)
+	{
+		oid = *setIt;
+		if (objStatusMap_[oid] == TeDEFAULT)
+			objStatusMap_[oid] = TePOINTED;
+		else if (objStatusMap_[oid] == TeQUERIED)
+			objStatusMap_[oid] = TePOINTED_QUERIED;	
+	}
+}
+
+
+
+void TeAbstractTheme::setStatusForObjectsAddedByPointing(set<string>& oidSet)
+{
+	if (oidSet.empty())
+		return;
+
+	unsigned int i;
+	string oid, uid;
+	vector<string> prevOidPointedVec;	// previous oids pointed
+	vector<string> uidVec;				// vector of uids
+	map<string, int>::iterator mapIt;
+	set<string>::iterator setIt;
+
+	// Get the previous oids pointed
+	for (mapIt = objStatusMap_.begin(); mapIt != objStatusMap_.end(); ++mapIt)
+	{
+		oid = mapIt->first;
+		if (objStatusMap_[oid] == TePOINTED || objStatusMap_[oid] == TePOINTED_QUERIED)
+			prevOidPointedVec.push_back(mapIt->first);
+	}
+
+	// If there is any object in the oidSet that is already in the previous oids pointed,
+	// remove it from the oidSet
+	for (i = 0; i < prevOidPointedVec.size(); ++i)
+	{
+		oid = prevOidPointedVec[i];
+		if (oidSet.find(prevOidPointedVec[i]) != oidSet.end())
+			oidSet.erase(oid);
+	}
+
+	// Set the pointed status for the objects added by pointing
+	for (setIt = oidSet.begin(); setIt != oidSet.end(); ++setIt)
+	{
+		oid = *setIt;
+		if (objStatusMap_[oid] == TeDEFAULT)
+			objStatusMap_[oid] = TePOINTED;
+		if (objStatusMap_[oid] == TeQUERIED)
+			objStatusMap_[oid] = TePOINTED_QUERIED;
+	}
+
+	// Set the pointed status for the uids of the objects added by pointing
+	uidVec = getItemVector(oidSet);
+	for (i = 0; i < uidVec.size(); ++i)
+	{
+		uid = uidVec[i];
+		if (itemStatusMap_[uid] == TeDEFAULT)
+			itemStatusMap_[uid] = TePOINTED;
+		else if (itemStatusMap_[uid] == TeQUERIED)
+			itemStatusMap_[uid] = TePOINTED_QUERIED;
+	}
+}
+
+void TeAbstractTheme::setStatusForItemsAddedByPointing(vector<string>& itemVec)
+{
+	unsigned int i;
+	string oid, item;
+
+	//-----------------------------------------------------------------------
+	// Set the pointing status for the input items
+	//-----------------------------------------------------------------------
+	for (i = 0; i < itemVec.size(); ++i)
+	{
+		item = itemVec[i];
+		if (itemStatusMap_[item] == TeDEFAULT)
+			itemStatusMap_[item] = TePOINTED;
+		else if (objStatusMap_[item] == TeQUERIED)
+			itemStatusMap_[item] = TePOINTED_QUERIED;
+
+	}
+
+	//-----------------------------------------------------------------------
+	// Set the pointing status for the objects associated to the input items
+	//-----------------------------------------------------------------------
+	set<string> oidSet = getObjects(itemVec);
+	set<string>::iterator setIt;
+	for (setIt = oidSet.begin(); setIt != oidSet.end(); ++setIt)
+	{
+		oid = *setIt;
+		if (objStatusMap_[oid] == TeDEFAULT)
+			objStatusMap_[oid] = TePOINTED;
+		else if (objStatusMap_[oid] == TeQUERIED)
+			objStatusMap_[oid] = TePOINTED_QUERIED;	
+	}
+}
+
+
+void TeAbstractTheme::setStatusForItemsAddedByQuerying(set<string>& oidSet, vector<string>& uidVec)
+{
+	unsigned int i;
+	string oid, uid;
+	set<string>::iterator setIt;
+
+	// Set the status for the oids in oidSet as "queried"
+	for (setIt = oidSet.begin(); setIt != oidSet.end(); ++setIt)
+	{
+		oid = *setIt;
+		if (objStatusMap_[oid] == TeDEFAULT)
+			objStatusMap_[oid] = TeQUERIED;
+		else if (objStatusMap_[oid] == TePOINTED)
+			objStatusMap_[oid] = TePOINTED_QUERIED;
+	}
+
+	// Set the new status for the uidVec
+	for (i = 0; i < uidVec.size(); ++i)
+	{
+		uid = uidVec[i];
+		if (itemStatusMap_[uid] == TeDEFAULT)
+			itemStatusMap_[uid] = TeQUERIED;
+		else if (itemStatusMap_[uid] == TePOINTED)
+			itemStatusMap_[uid] = TePOINTED_QUERIED;
+	}
+}
+
+
+void TeAbstractTheme::setStatusForItemsFilteredByQuerying(set<string>& oidSet, vector<string>& uidVec)
+{
+	unsigned int i;
+	string oid, uid;
+	vector<string> prevOidQVec;		// previous oids queried
+	vector<string> notInOidSetVec;	// oid is not in oidSet
+	vector<string> defaultVec;		// vector with oids or uids to be set as default
+	map<string, int>::iterator mapIt;
+	set<string>::iterator setIt;
+
+	// Get the previous oids queried
+	for (mapIt = objStatusMap_.begin(); mapIt != objStatusMap_.end(); ++mapIt)
+	{
+		oid = mapIt->first;
+		if (objStatusMap_[oid] == TeQUERIED || objStatusMap_[oid] == TePOINTED_QUERIED)
+			prevOidQVec.push_back(mapIt->first);
+	}
+
+	// Check if the previous oids queried are in the oidSet; in positive case, remove
+	// them from the oidSet; in negative case, put them in the vector notInOidSetVec
+	for (i = 0; i < prevOidQVec.size(); ++i)
+	{
+		oid = prevOidQVec[i];
+		if (oidSet.find(oid) != oidSet.end())			
+			oidSet.erase(oid);				// object is in the input oidSet
+		else
+			notInOidSetVec.push_back(oid);	// object is not in the input oidSet
+	}
+
+	// For the objects not in oidSet, insert it in oidSet, and remove their queried status
+	for (i = 0; i < notInOidSetVec.size(); ++i)
+	{
+		oid = notInOidSetVec[i];
+		if (objStatusMap_[oid] == TeQUERIED)
+			defaultVec.push_back(oid);
+		else if (objStatusMap_[oid] == TePOINTED_QUERIED)
+			objStatusMap_[oid] = TePOINTED;
+		
+		oidSet.insert(oid);
+	}
+
+	for (i = 0; i < defaultVec.size(); ++i)
+		objStatusMap_.erase(defaultVec[i]);
+
+	// Remove the queried status for the uids that were previously queried
+	defaultVec.clear();
+	for (mapIt = itemStatusMap_.begin(); mapIt != itemStatusMap_.end(); ++mapIt)
+	{
+		uid = mapIt->first;
+		if (itemStatusMap_[uid] == TeQUERIED)
+			defaultVec.push_back(uid);
+		else if (itemStatusMap_[uid] == TePOINTED_QUERIED)
+			itemStatusMap_[uid] = TePOINTED;			
+	}
+
+	for (i = 0; i < defaultVec.size(); ++i)
+		itemStatusMap_.erase(defaultVec[i]);
+
+	// Set the queried status for the input uidVec
+	for (i = 0; i < uidVec.size(); ++i)
+	{
+		uid = uidVec[i];
+		if (itemStatusMap_[uid] == TeDEFAULT)
+			itemStatusMap_[uid] = TeQUERIED;
+		else if (itemStatusMap_[uid] == TePOINTED)
+			itemStatusMap_[uid] = TePOINTED_QUERIED;
+	}
+}
+
+void TeAbstractTheme::removePointingColor()
+{
+	unsigned int i;
+	string oid, uid;
+	vector<string> defaultVec;
+	map<string, int>::iterator mapIt;
+
+	// Remove the pointed status for the objects
+	for (mapIt = objStatusMap_.begin(); mapIt != objStatusMap_.end(); ++mapIt)
+	{
+		oid = mapIt->first;
+		if (objStatusMap_[oid] == TePOINTED)
+			defaultVec.push_back(oid);
+		else if (objStatusMap_[oid] == TePOINTED_QUERIED)
+			objStatusMap_[oid] = TeQUERIED;
+	}
+
+	for (i = 0; i < defaultVec.size(); ++i)
+		objStatusMap_.erase(defaultVec[i]);
+
+	// Remove the pointed status for the uids
+	defaultVec.clear();
+	for (mapIt = itemStatusMap_.begin(); mapIt != itemStatusMap_.end(); ++mapIt)
+	{
+		uid = mapIt->first;
+		if (itemStatusMap_[uid] == TePOINTED)
+			defaultVec.push_back(uid);
+		else if (itemStatusMap_[uid] == TePOINTED_QUERIED)
+			itemStatusMap_[uid] = TeQUERIED;
+	}
+
+	for (i = 0; i < defaultVec.size(); ++i)
+		itemStatusMap_.erase(defaultVec[i]);
+}
+
+
+void TeAbstractTheme::removeQueryColor()
+{
+	unsigned int i;
+	string oid, uid;
+	vector<string> defaultVec;
+	map<string, int>::iterator mapIt;
+
+	// Remove the pointed status for the objects
+	for (mapIt = objStatusMap_.begin(); mapIt != objStatusMap_.end(); ++mapIt)
+	{
+		oid = mapIt->first;
+		if (objStatusMap_[oid] == TeQUERIED)
+			defaultVec.push_back(oid);
+		else if (objStatusMap_[oid] == TePOINTED_QUERIED)
+			objStatusMap_[oid] = TePOINTED;
+	}
+
+	for (i = 0; i < defaultVec.size(); ++i)
+		objStatusMap_.erase(defaultVec[i]);
+
+	// Remove the pointed status for the uids
+	defaultVec.clear();
+	for (mapIt = itemStatusMap_.begin(); mapIt != itemStatusMap_.end(); ++mapIt)
+	{
+		uid = mapIt->first;
+		if (itemStatusMap_[uid] == TeQUERIED)
+			defaultVec.push_back(uid);
+		else if (itemStatusMap_[uid] == TePOINTED_QUERIED)
+			itemStatusMap_[uid] = TePOINTED;
+	}
+
+	for (i = 0; i < defaultVec.size(); ++i)
+		itemStatusMap_.erase(defaultVec[i]);
+}
+
+
+void TeAbstractTheme::invertObjectStatus()
+{
+	unsigned int i;
+	string oid, uid;
+	set<string> objInvToPointedStatusSet;	// objects to be inverted to the pointed status
+	set<string> objInvToDefaultStatusSet;	// objects to be inverted to the default status
+	vector<string> defaultVec;
+	map<string, int>::iterator mapIt;
+	set<string>::const_iterator setIt;
+
+	// Get all the theme objects
+	const set<string>& oidSet = getObjects();
+
+	// Get the objects that are pointed, queried, or pointed and queried
+	// and put their status to the default status, and get the objects
+	// that are in the default status and put them in the pointed status
+	for (setIt = oidSet.begin(); setIt != oidSet.end(); ++setIt)
+	{
+		oid = *setIt;
+		if (objStatusMap_[oid] == TeDEFAULT)
+		{
+			objStatusMap_[oid] = TePOINTED;
+			objInvToPointedStatusSet.insert(oid);
+		}
+		else if (objStatusMap_[oid] == TePOINTED || objStatusMap_[oid] == TeQUERIED ||
+			     objStatusMap_[oid] == TePOINTED_QUERIED)
+		{
+			defaultVec.push_back(oid);
+			objInvToDefaultStatusSet.insert(oid);
+		}
+	}
+
+	for (i = 0; i < defaultVec.size(); ++i)
+		objStatusMap_.erase(defaultVec[i]);
+
+	// Set the status for the uids according the status of their objects
+	vector<string> uidVec = getItemVector(objInvToPointedStatusSet);
+	for (i = 0; i < uidVec.size(); ++i)
+		itemStatusMap_[uidVec[i]] = TePOINTED;
+
+	uidVec = getItemVector(objInvToDefaultStatusSet);
+	for (i = 0; i < uidVec.size(); ++i)
+		itemStatusMap_.erase(uidVec[i]);
+}
+
+
+void TeAbstractTheme::setObjectsToDefaultStatus()
+{
+	unsigned int i;
+	string oid, uid;
+	vector<string> defaultVec;
+	map<string, int>::iterator mapIt;
+
+	// Set the default status for objects that are pointed, queried, or pointed and queried
+	for (mapIt = objStatusMap_.begin(); mapIt != objStatusMap_.end(); ++mapIt)
+	{
+		oid = mapIt->first;
+		if (objStatusMap_[oid] == TePOINTED || objStatusMap_[oid] == TeQUERIED ||
+			objStatusMap_[oid] == TePOINTED_QUERIED)
+			defaultVec.push_back(oid);
+	}
+
+	for (i = 0; i < defaultVec.size(); ++i)
+		objStatusMap_.erase(defaultVec[i]);
+
+	// Set the default status for uids that are pointed, queried, or pointed and queried
+	defaultVec.clear();
+	for (mapIt = itemStatusMap_.begin(); mapIt != itemStatusMap_.end(); ++mapIt)
+	{
+		uid = mapIt->first;
+		if (itemStatusMap_[uid] == TePOINTED || itemStatusMap_[uid] == TeQUERIED ||
+			itemStatusMap_[uid] == TePOINTED_QUERIED)
+			defaultVec.push_back(uid);
+	}
+
+	for (i = 0; i < defaultVec.size(); ++i)
+		itemStatusMap_.erase(defaultVec[i]);
+}
+
+TeTime TeAbstractTheme::getCreationTime() const
+{
+	return creationTime_;
+}
+
+void TeAbstractTheme::setCreationTime(const TeTime& creationTime)
+{
+	creationTime_ = creationTime;
+}
+
+bool TeAbstractTheme::updateThemeCreationTime(TeDatabase* database)
+{
+	if(database == NULL)
+	{
+		return false;
+	}
+
+	if(!creationTime_.isValid())
+	{
+		return false;
+	}
+	
+	std::string sql = "UPDATE te_theme";
+	sql += " SET creation_time = " + database->getSQLTime(creationTime_);
+	sql += " WHERE theme_id = " + Te2String(this->id());
+
+	if(!database->execute(sql))
+	{
+		return false;
+	}
+
+	return true;
+}
+
+bool TeAbstractTheme::isUpdated()
+{
+	return true;
+}
\ No newline at end of file
diff --git a/src/terralib/kernel/TeAbstractTheme.h b/src/terralib/kernel/TeAbstractTheme.h
new file mode 100644
index 0000000..6a7dbea
--- /dev/null
+++ b/src/terralib/kernel/TeAbstractTheme.h
@@ -0,0 +1,688 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeAbstractTheme.h
+	\brief This file contains definitions about an abstract theme in TerraLib. 
+*/
+#ifndef  __TERRALIB_INTERNAL_ABSTRACT_THEME_H
+#define  __TERRALIB_INTERNAL_ABSTRACT_THEME_H
+
+#include "TeDefines.h"
+#include "TeLegendEntry.h"
+#include "TeGeometry.h"
+#include "TeViewNode.h"
+#include "TeAttribute.h"
+
+class TeRasterTransform;
+class TeRaster;
+class TeDatabase;
+struct TeRepresentation;
+
+#include <string>
+#include <set>
+
+//! A grouping structure
+/*!
+	The TeGrouping is a structure that describes how the objects of a theme should
+	be grouped, or separated in groups.
+*/
+struct TL_DLL TeGrouping
+{
+	//! Returns the attribute used to group the objects of the theme
+	TeAttributeRep	groupAttribute_;
+	
+	//! Returns the attribute used to normalize a grouping 
+	string	groupNormAttribute_;
+	
+	//! Returns the grouping mode 
+	TeGroupingMode	groupMode_;			
+	
+	//! Returns the number of groups
+	int	groupNumSlices_;	
+	
+	//! Returns the numeric precision used to group objects
+	int	groupPrecision_;
+
+	//! Returns the deviation parameter used to group objects
+	double	groupStdDev_;
+
+	//! Aggregate function
+	string	groupFunction_; 
+
+	//! Show missing data
+	bool	groupNullAttr_; 
+
+	//! Minimum value used to calculate a equal step grouping
+	double groupMinVal_;
+
+	//! Maximum value used to calculate a equal step grouping 
+	double groupMaxVal_;
+
+	//! Chronon used for grouping
+	TeChronon groupChronon_;
+
+	//! Constructor
+	TeGrouping(TeAttributeRep att=TeAttributeRep(), const string& normAttr="", 
+				TeGroupingMode gMode=TeNoGrouping, int numSlice=0, int gPrecision=6,  
+				double	gStDev=1.0, const string& func="", TeChronon gChronon = TeNOCHRONON): 
+			groupAttribute_(att),
+			groupNormAttribute_(normAttr),
+			groupMode_(gMode),
+			groupNumSlices_(numSlice),
+			groupPrecision_(gPrecision),
+			groupStdDev_(gStDev),
+			groupFunction_(func),
+			groupNullAttr_(false),
+			groupMinVal_(TeMAXFLOAT),
+			groupMaxVal_(TeMINFLOAT),
+			groupChronon_(gChronon)
+			{}
+
+	//! Copy constructor
+	TeGrouping(const TeGrouping& other)
+	{	
+		groupAttribute_		= other.groupAttribute_;
+		groupNormAttribute_	= other.groupNormAttribute_;
+		groupMode_			= other.groupMode_;
+		groupNumSlices_		= other.groupNumSlices_;
+		groupPrecision_		= other.groupPrecision_;
+		groupStdDev_		= other.groupStdDev_;
+		groupFunction_		= other.groupFunction_;
+		groupNullAttr_		= other.groupNullAttr_;
+		groupMinVal_		= other.groupMinVal_;
+		groupMaxVal_		= other.groupMaxVal_;
+		groupChronon_			= other.groupChronon_;
+	}
+			
+	//! Destructor
+	~TeGrouping() {}
+	
+	//! Copy constructor
+	TeGrouping& operator= (const TeGrouping& other)
+	{	
+		if ( this != &other )
+		{		
+			groupAttribute_		= other.groupAttribute_;
+			groupNormAttribute_	= other.groupNormAttribute_;
+			groupMode_			= other.groupMode_;
+			groupNumSlices_		= other.groupNumSlices_;
+			groupPrecision_		= other.groupPrecision_;
+			groupStdDev_		= other.groupStdDev_;
+			groupFunction_		= other.groupFunction_;
+			groupNullAttr_		= other.groupNullAttr_;
+			groupNullAttr_		= other.groupNullAttr_;
+			groupMinVal_		= other.groupMinVal_;
+			groupMaxVal_		= other.groupMaxVal_;
+			groupChronon_		= other.groupChronon_;
+		}
+		return *this;
+	}
+};
+
+using namespace std;
+
+
+//! An abstract theme class
+class TL_DLL TeAbstractTheme: public TeViewNode
+{
+
+	friend class TeDatabase;
+	
+public:
+	//! Constructor
+    TeAbstractTheme(const string& name, TeViewNode* parent, const int& view, const int& id, const TeViewNodeType& nodeType);
+
+	//! Constructor
+	TeAbstractTheme(const TeViewNodeParams& params);
+
+	//! Copy constructor
+	TeAbstractTheme(const TeAbstractTheme& other);
+
+	//! Destructor
+	virtual ~TeAbstractTheme();
+
+	//! Assignment operator
+	TeAbstractTheme& operator= (const TeAbstractTheme& other); 
+
+	/** @name Scale
+		Methods related to the range of scales where this theme should be visible
+	*/
+	//@{	
+
+	//! Returns a pointer to a projection that is the spatial reference for the objects of this theme
+	/*! Concrete classes should reimplement this method.*/
+	virtual TeProjection* getThemeProjection() = 0;
+
+	//! Returns the minimum scale in which the theme is visible
+	virtual double minScale() { return minScale_; }
+
+	//! Sets the minimum scale in which the theme is visible
+	virtual void minScale(double s) { minScale_ = s; }
+
+	//! Returns the maximum scale in which the theme is visible
+	virtual double maxScale() { return maxScale_; }
+
+	//! Sets the maximum scale in which the theme is visible
+	virtual void maxScale(double s) { maxScale_ = s; }
+	//@}
+
+	/** @name Restrictions
+		Methods related to the restrictions over the theme used to generate this theme
+	*/
+	//@{
+	//! Verifies if this theme has any kind of restrictions
+	virtual bool hasRestriction() { return (!(generateAttributeRest_.empty() || 
+									  generateTemporalRest_.empty()) && hasSpatialRes_); }
+
+	//! Returns the attribute restriction (where clause) used to generate the theme  
+	virtual string attributeRest() { return generateAttributeRest_; }
+
+	//! Sets the attribute restriction (where clause) used to generate the theme
+	virtual void attributeRest(const string& s) { generateAttributeRest_ = s; }
+
+	//! Returns if there is an attribute restriction  
+	virtual bool hasAttrRest () { return (!generateAttributeRest_.empty());}
+
+	//! Returns the temporal restriction used to generate the theme
+	virtual string temporalRest() { return generateTemporalRest_; }
+
+	//! Sets the temporal restriction used to generate the theme
+	virtual void temporalRest(const string& t) { generateTemporalRest_ = t; };
+
+	//! Returns TRUE if there is a temporal restriction defined in the theme 
+	virtual bool hasTemporalRest() { return (!generateTemporalRest_.empty());}
+
+	//! Returns the spatial restriction used to generate the theme
+	virtual string spatialRest() { return generateSpatialRest_; }
+
+	//! Sets the spatial restriction used to generate the theme
+	virtual void spatialRest(const string& s) { generateSpatialRest_ = s; };
+	
+	//! Returns the spatial relation (e.g WITHIN, COVERED BY, etc.) associate to the spatial restriction
+	virtual TeSpatialRelation	spatialRelation() { return spatialRelation_;}
+
+	//! Sets the spatial relation (e.g WITHIN, COVERED BY, etc.) associate to the spatial restriction
+	virtual void spatialRelation(TeSpatialRelation s) {spatialRelation_=s;}
+	
+	//! Returns TRUE if this theme has a spatial restriction  
+	virtual bool hasSpatialRest() { return hasSpatialRes_;}
+
+	//! Sets the flag that indicates that there is a spatial restriction 
+	virtual void hasSpatialRest(bool a) {hasSpatialRes_ = a;}
+	
+	//! Returns the box associated with the spatial restriction
+	virtual TeBox boxRestriction() { return boxRest_;}
+
+	//! Sets the box associated with the spatial restriction
+	virtual void boxRestriction(TeBox& b) {boxRest_ = b;}
+
+	//! Returns a pointer to the geometry associated with the spatial restriction
+	virtual TeGeometry* geomRestriction() { return geomRest_;}
+
+	//! Sets a pointer to the geometry associated with the spatial restriction
+	virtual void geomRestriction(TeGeometry* g) {geomRest_ = g;}
+
+	//! Returns the geometry representation of the theme which will be considered in the spatial restriction  
+	virtual TeGeomRep geomRepRestriction() { return geomRepRest_; }
+
+	//! Sets the geometry representation of the theme which will be considered in the spatial restriction  
+	virtual void geomRepRestriction (TeGeomRep& rep) { geomRepRest_ = rep; }
+
+	//! Sets the spatial restriction to be a spatial relation with a box
+	virtual void setSpatialRest(TeBox& box, TeGeomRep rep, TeSpatialRelation relation = TeWITHIN); 
+
+	//! Sets the spatial restriction to be a spatial relation with a geometry
+	virtual void setSpatialRest(TeGeometry* geom, TeGeomRep rep, TeSpatialRelation relation = TeWITHIN); 
+	//@}
+	
+	
+	/** @name Visibility/Status
+		Methods related to the visibility/status of the theme and its components: graphs,
+		geometrical representations of the objects, grouping.
+	*/
+	//@{
+	//! Sets the components or representations of the theme that are visible
+	/*!
+		The param rep is a combination of any type of geometrical representation (TeGeomRep) plus:
+		- 0x20000000: representing the visibility of the legend
+		- 0x40000000: representing the visibility of the groupings
+		- 0x80000000: representing the visibility of the pie/chart graphs
+	*/
+	virtual void visibleRep(int rep) { visibleRep_ = rep; }
+
+	//! Returns the components or representations of the theme that are visible 
+	/*!
+		The result is a combination of any type of geometrical representation (TeGeomRep) plus:
+		- 0x20000000: representing the visibility of the legend
+		- 0x40000000: representing the visibility of the groupings
+		- 0x80000000: representing the visibility of the pie/chart graphs
+	*/
+	virtual int visibleRep() { return visibleRep_; }
+
+	//! Returns the geometrical representations of the theme that are visible
+	virtual int visibleGeoRep();
+
+	//! Returns a status of a theme
+	/*! 
+		- Returns 0 if the theme is not visible and not active
+		- Returns 1 if the theme is visible and not active
+		- Returns 2 if theme is and active and not visible
+		- Returns 3 if theme is and visible and active
+	 */
+	virtual int visibility()
+	{	return enableVisibility_; }
+
+	//! Sets whether the theme should be visible and/or active
+	/*! 
+		- Returns 0 if the theme is not visible and not active
+		- Returns 1 if the theme is visible and not active
+		- Returns 2 if theme is and active and not visible
+		- Returns 3 if theme is and visible and active
+	 */
+	virtual void visibility(int v)
+	{	enableVisibility_ = v; }
+	//@}
+	
+	/** @name Grouping
+		Methods related to grouping of objects of the theme. Each group is
+		represented by a specific presentation visual called legend. An slice
+		represents the range of values of an attribute that characterizes a group.
+	*/
+	//@{
+	//! Returns a grouping associated the theme 
+	virtual TeGrouping& grouping() { return grouping_; }
+	
+	//! Sets a grouping associated to the theme
+	virtual void grouping(const TeGrouping& g) 
+	{ grouping_ = g; }
+
+	//! Returns the vector of legends of the theme
+	virtual TeLegendEntryVector& legend() { return legend_; }
+
+	//! Sets the visual associated to a geometric representation in the n-th group of the theme 
+	virtual bool setGroupingVisual(int n, TeVisual* visual, TeGeomRep rep);
+
+	//! Sets the visual of the n-th group of the theme
+	virtual bool setGroupingVisual(int n, TeGeomRepVisualMap& vismap);
+
+	//! Clear the existing grouping of objects of this theme
+	virtual void resetGrouping ();
+
+	//! Clear the vector of legends
+	virtual void cleanLegend(); 
+
+	//! Save grouping parameters in memory passing an arbitrary set of slices
+	virtual bool buildGrouping(const TeGrouping& g, vector<TeSlice>& slices);
+
+	//! Returns the slices associated to the grouping of the theme
+	virtual TeSliceVector getSlices();
+	//@}
+
+	/** @name Legends
+		Legends are also used to define presentation characteristics of the objets
+		of the theme that aren't grouped, according to some specific characteristics
+		(such as being pointed, being queried, among others).
+	*/
+	//@{	
+	//! Sets a default legend of the objects of the theme
+	virtual void defaultLegend (TeLegendEntry& leg) 
+	{ defaultLegend_ = leg; }
+
+	//! Returns the default legend of the objects of the theme
+	virtual TeLegendEntry& defaultLegend () 
+	{ return defaultLegend_; }
+
+	//! Sets the visual of the default legend for a specific geometrical representation
+	virtual void setVisualDefault (TeVisual* visual, TeGeomRep rep)
+	{ defaultLegend_.setVisual(visual, rep); }
+
+	//! Sets a legend for objects of the layer that weren't selected in this theme
+	/*! Useful when is necessary to see the theme in the context of the layer */
+	virtual void outOfCollectionLegend (TeLegendEntry &leg) 
+	{ outOfCollectionLegend_ = leg;}
+
+	//! Returns the legend of the layer objects that are not selected in this layer.
+	virtual TeLegendEntry& outOfCollectionLegend () 
+	{ return outOfCollectionLegend_; } 
+	
+	//! Sets the visual of the non-selected objects legend for a specific geometrical representation
+	virtual void setVisualOutOfCollection (TeVisual* visual, TeGeomRep rep)
+	{ outOfCollectionLegend_.setVisual(visual, rep); }
+
+	//! Sets a legend for objects that have geometries but not descriptive attributes
+	/*! Useful when in intermediary situations such as editing */
+	virtual void withoutDataConnectionLegend (TeLegendEntry &leg) 
+	{ withoutDataConnectionLegend_ = leg; }
+
+	//! Returns the legend of objects that have geometries but not descriptive attributes
+	virtual TeLegendEntry& withoutDataConnectionLegend () 
+	{ return withoutDataConnectionLegend_; }
+
+	//! Sets the visual of the without-attributes objects legend for a specific geometrical representation
+	virtual void setVisualWithoutDataConnection (TeVisual* visual, TeGeomRep rep)
+	{ withoutDataConnectionLegend_.setVisual(visual, rep); }
+	
+	//! Sets a legend for the theme objects selected by pointing
+	virtual void pointingLegend (TeLegendEntry &leg) 
+	{ pointingLegend_ = leg; }
+
+	//! Returns the legend of the theme objects selected by pointing
+	virtual TeLegendEntry& pointingLegend () 
+	{ return pointingLegend_; }
+
+	//! Sets the visual of the pointed objects legend for a specific geometrical representation
+	virtual void setVisualPointing (TeVisual* visual, TeGeomRep rep)
+	{ pointingLegend_.setVisual(visual, rep); }
+
+	//! Sets a legend for the theme objects selected by a query
+	virtual void queryLegend (TeLegendEntry &leg) 
+	{ queryLegend_ = leg; }
+
+	//! Returns the legend of the theme objects selected by a query
+	virtual TeLegendEntry& queryLegend () 
+	{ return queryLegend_; }
+	
+	//! Sets the visual of the queried objects legend for a specific geometrical representation
+	virtual void setVisualQuery (TeVisual* visual, TeGeomRep rep)
+	{ queryLegend_.setVisual(visual, rep); }
+
+	//! Sets a legend for the theme objects selected by query and pointing
+	virtual void queryAndPointingLegend (TeLegendEntry &leg) 
+	{ queryAndPointingLegend_ = leg; }
+
+	//! Returns the legend of the theme objects selected by query and pointing
+	virtual TeLegendEntry& queryAndPointingLegend () 
+	{ return queryAndPointingLegend_; }
+
+    //! Returns the map of legend ids associated to each object
+	virtual map<string, int>& getObjLegendMap() 
+	{ return objLegendMap_; }
+
+	//! Returns the map of legend ids associated to each object
+	virtual map<string, int>& getObjOwnLegendMap() 
+	{ return objOwnLegendMap_; }
+
+	//! Sets the visual of the queried and pointed objects legend for a specific geometrical representation
+	virtual void setVisualQueryAndPointing (TeVisual* visual, TeGeomRep rep)
+	{ queryAndPointingLegend_.setVisual(visual, rep); }
+
+	//! Sets a legend for the theme objects
+	virtual void legend(TeLegendEntry& leg); 
+
+	/** @name Raster Visual
+	*  Methods to deal with the visual presentation of the raster representations
+	*/
+	//@{ 
+	//! Returns the visual presentation of raster geometry
+	virtual TeRasterTransform* rasterVisual() 
+	{ return rasterVisual_; }
+
+	//! Sets the visual presentation of raster geometry
+	virtual void rasterVisual(TeRasterTransform* r) 
+	{ rasterVisual_ = r; } 
+
+	//! Removes the visual presentation of the raster
+	virtual void removeRasterVisual();
+
+	//! Creates an appropriate visual presentation to the raster of the theme
+	virtual void createRasterVisual(TeRaster* rst=0);
+	//@}
+	//@}
+
+	/** @name Box
+	    Methods related to the bounding box of a theme
+	*/
+	//@{ 
+	//! Returns the theme box 
+	virtual TeBox& getThemeBox()
+	{	return themeBox_; }
+
+	//! Sets the theme box 
+	virtual void setThemeBox(const TeBox& box)
+	{	themeBox_ = box; }
+
+	//! Returns the theme box 
+	virtual TeBox& box()
+	{	return themeBox_; }
+	//@}
+
+	//! Sets the parent node. The abstract theme does not have parent node.
+	virtual void setParent (TeViewNode* );
+	
+	//! Returns TRUE if a theme has lower priority than another
+	virtual bool operator< (const TeAbstractTheme& r) const
+	{	return viewNodeParams_.priority_ < r.viewNodeParams_.priority_; }
+
+	//! Clear the set containing the objects of the theme
+	virtual void clearObjectSet()
+	{ objectSet_.clear(); }
+
+	//! Return the number of objects of the layer
+	virtual int getNumLayerObjects()
+	{ return numLayerObjects_; }
+
+	//! Return the map containing the status of the objects
+	virtual map<string, int>& getObjStatusMap()
+	{ return objStatusMap_; }
+
+	//! Set the status of the objects to the default state
+	virtual void clearObjStatus()
+	{ objStatusMap_.clear(); }
+
+	//! Set the status of the items to the default state
+	virtual void clearItemStatus()
+	{ itemStatusMap_.clear(); }
+
+	//! Return the map containing the status of the items
+	virtual map<string, int>& getItemStatusMap()
+	{ return itemStatusMap_; }
+
+	//! the status
+	virtual void setStatus(vector<string>& oidVec, vector<string>& itemVec, int status);
+
+	//! the status for the items that were toggled
+	virtual void setStatusForItemsToggled(set<string>& oidSet, vector<string>& itemVec);
+
+	//! Set the status for the objects that were toggled
+	virtual void setStatusForObjectToggled(string oid);
+
+	//! Set the status for the new set of objects that were pointed
+	virtual void setStatusForNewObjectsPointed(set<string>& oidSet);
+
+	//! Set the status for the additional set of objects that were pointed
+	virtual void setStatusForObjectsAddedByPointing(set<string>& oidSet);
+
+	//! Set the status for the new set of items that were pointed
+	virtual void setStatusForNewItemsPointed(vector<string>& itemVec);
+
+	//! Set the status for the additional set of items that were pointed
+	virtual void setStatusForItemsAddedByPointing(vector<string>& itemVec);
+
+	//! Set the status for the new set of items that were queried
+	virtual void setStatusForNewItemsQueried(set<string>& oidSet, vector<string>& uidVec);
+
+	//! Set the status for the additional set of items that were queried
+	virtual void setStatusForItemsAddedByQuerying(set<string>& oidSet, vector<string>& uidVec);
+
+	//! Set the status for the set of items that were filtered by a query operation
+	virtual void setStatusForItemsFilteredByQuerying(set<string>& oidSet, vector<string>& uidVec);
+
+	//! Remove the pointing color
+	virtual void removePointingColor();
+
+	//! Remove the query color
+	virtual void removeQueryColor();
+
+	//! Invert the pointing status of the objects
+	virtual void invertObjectStatus();
+
+	//! Set the objects to the default status
+	virtual void setObjectsToDefaultStatus();
+
+	//! Gets the creation time of the theme
+	virtual TeTime getCreationTime() const;
+
+	//! Sets in memory the creation time of the theme
+	virtual void setCreationTime(const TeTime& creationTime);
+
+	//! Updates the creation in memory and in the database
+	virtual bool updateThemeCreationTime(TeDatabase* database);
+
+	//! Checks if the theme is update. If FALSE, the theme may be not be updated.
+	virtual bool isUpdated();
+
+	//! Save the theme parameters
+	virtual bool save() = 0;
+
+	//! Save the grouping parameters in memory when there is no chronon
+	virtual bool buildGrouping(const TeGrouping& g, TeSelectedObjects selectedObjects = TeAll,
+		               vector<double>* dValuesVec = 0) = 0;
+
+	//! Save the grouping parameters in memory when there is chronon
+	virtual bool buildGrouping(const TeGrouping& g, TeChronon chr, vector<map<string, string> >& mapObjValVec) = 0;
+	
+	
+	//! Build the grouping and associate each object to its group  
+	virtual bool saveGrouping(TeSelectedObjects selectedObjects = TeAll) = 0;
+
+	//! Delete grouping
+	virtual bool deleteGrouping() = 0; 
+
+	//! Set the legend id for each object of the theme 
+	virtual void setLegendsForObjects() = 0;
+
+	//! Set the own legend id for each object of the theme 
+	virtual void setOwnLegendsForObjects() = 0;
+
+	/** @name Locate geometries
+	    Returns the geometry(ies) of the theme given coordinate
+	*/
+	//@{ 	
+	virtual bool locatePolygon		(TeCoord2D &pt, TePolygon &polygon, const double& tol = 0.0) = 0;
+	virtual bool locatePolygonSet   (TeCoord2D &pt, double tol, TePolygonSet &polygons) = 0;
+	virtual bool locateLine		(TeCoord2D &pt, TeLine2D &line, const double& tol = 0.0) = 0;
+	virtual bool locatePoint	(TeCoord2D &pt, TePoint &point, const double& tol = 0.0) = 0;
+	virtual bool locateCell		(TeCoord2D &pt, TeCell &c, const double& tol = 0.0) = 0;
+	//@}
+
+	//! Get the set of objects corresponding to the object selection criteria
+	virtual set<string> getObjects(TeSelectedObjects selectedObjects = TeAll) = 0;
+
+	//! Get the set of objects corresponding to the list of items
+	virtual set<string> getObjects(const vector<string>& itemVec) = 0;
+
+	//! Get the set of items corresponding to the object selection criteria
+	virtual vector<string> getItemVector(TeSelectedObjects selectedObjects) = 0;
+
+	//! Get the set of items corresponding to the set of objects
+	virtual vector<string> getItemVector(const set<string>& oidSet) = 0;
+
+	//! Get the number of objects acessible by this theme
+	virtual unsigned int getNumberOfObjects()=0; 
+
+	//! Save (insert or update) the theme metadata in the database
+	virtual bool saveMetadata(TeDatabase* ) = 0;	
+	
+protected:
+	string		generateAttributeRest_;
+	string		generateTemporalRest_;
+	string		generateSpatialRest_; //future use
+
+	TeSpatialRelation	spatialRelation_;
+	bool				hasSpatialRes_;
+	TeBox				boxRest_;		//box which defines the spatial restriction 
+	TeGeometry*			geomRest_;		//geometry which defines the spatial restriction 
+	TeGeomRep			geomRepRest_;	//geometry representation of the theme which will be 
+										//considered in the spatial restriction  
+	// Display scale
+	double	minScale_;
+	double	maxScale_;
+
+	//representation visible in the theme
+	int visibleRep_;
+
+	//Theme status
+	int	enableVisibility_;
+
+	// ----------------- grouping information -----------------
+	TeGrouping		grouping_;
+
+	// ----------------- legend information -----------------
+	TeLegendEntryVector	legend_;
+
+	// Background Legend
+	TeLegendEntry		outOfCollectionLegend_;			//group(-1) 
+	TeLegendEntry		withoutDataConnectionLegend_;	//group(-2) 
+	TeLegendEntry		defaultLegend_;					//group(-3) 
+	TeLegendEntry		pointingLegend_;				//group(-4) 
+	TeLegendEntry		queryLegend_;					//group(-5) 
+	TeLegendEntry		queryAndPointingLegend_;		//group(-6)
+
+	map<string, int>	objLegendMap_;					// object legend
+	map<string, int>	objOwnLegendMap_;				// object own legend
+		
+	//! visual of raster
+	TeRasterTransform*	rasterVisual_;
+	
+	TeBox	themeBox_;
+
+	//! A set containing the theme objects
+	set<string> objectSet_;
+
+	//! Number of objects of the layer
+	int numLayerObjects_;
+
+	//! Status of the item (concatenation of the unique names of each theme table)
+	map<string, int> itemStatusMap_;
+
+	//! Status of the object
+	map<string, int> objStatusMap_;
+
+	//! Stores the creation time of the theme
+	TeTime creationTime_;
+
+	//! Load the theme metadata from database
+	virtual bool loadMetadata(TeDatabase* ) = 0;
+
+	//! Erase the theme metadata in the database
+	virtual bool eraseMetadata(TeDatabase* ) = 0;
+};
+
+//! A vector of pointers to theme
+typedef vector<TeAbstractTheme*>	TeThemeVector;
+
+//! A map from theme identifiers to pointers to theme
+typedef map<int, TeAbstractTheme*>	TeThemeMap;
+
+/*! \example creaTeAbstractTheme.cpp
+	Shows how to create themes in TerraLib.
+ */
+
+/*! \example themeGrouping.cpp
+	Shows how to do a grouping on the objects of a TerraLib theme.
+ */
+
+/*! \example rasterSlicing.cpp
+	Shows how to  create a legend over a raster data, stored in a layer TerraLib.
+ */
+#endif
+
diff --git a/src/terralib/kernel/TeAffineGT.cpp b/src/terralib/kernel/TeAffineGT.cpp
new file mode 100755
index 0000000..67e2147
--- /dev/null
+++ b/src/terralib/kernel/TeAffineGT.cpp
@@ -0,0 +1,227 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+
+#include "TeAffineGT.h"
+
+#include "TeAgnostic.h"
+
+
+TeAffineGT::TeAffineGT()
+{
+}
+
+
+TeAffineGT::~TeAffineGT()
+{
+}
+
+
+void TeAffineGT::directMap( const TeGTParams& params, const TeCoord2D& pt1, 
+  TeCoord2D& pt2 ) const
+{
+  TEAGN_DEBUG_CONDITION( ( params.direct_parameters_.Ncol() == 3 ),
+    "Invalid number of columns" )
+  TEAGN_DEBUG_CONDITION( ( params.direct_parameters_.Nrow() == 3 ),
+    "Invalid number of rows" )
+  
+  double x = pt1.x();
+  double y = pt1.y();
+
+  pt2.x( params.direct_parameters_(0,0) * x + 
+         params.direct_parameters_(0,1) * y + 
+         params.direct_parameters_(0,2) );
+  pt2.y( params.direct_parameters_(1,0) * x + 
+         params.direct_parameters_(1,1) * y + 
+         params.direct_parameters_(1,2) );  
+}
+
+
+void TeAffineGT::inverseMap( const TeGTParams& params, const TeCoord2D& pt2, 
+  TeCoord2D& pt1 ) const
+{
+  TEAGN_DEBUG_CONDITION( ( params.inverse_parameters_.Ncol() == 3 ),
+    "Invalid number of columns" )
+  TEAGN_DEBUG_CONDITION( ( params.inverse_parameters_.Nrow() == 3 ),
+    "Invalid number of rows" )
+
+  double u = pt2.x();
+  double v = pt2.y();
+  
+  pt1.x( params.inverse_parameters_(0,0) * u +
+         params.inverse_parameters_(0,1) * v + 
+         params.inverse_parameters_(0,2) );
+  pt1.y( params.inverse_parameters_(1,0) * u + 
+         params.inverse_parameters_(1,1) * v + 
+         params.inverse_parameters_(1,2) );  
+}
+
+
+unsigned int TeAffineGT::getMinRequiredTiePoints() const
+{
+  return 3;
+}
+
+
+bool TeAffineGT::computeParameters( TeGTParams& params ) const
+{
+    /*
+            u = a1.x + a2.y + a3
+            v = b1.x + b2.y + b3
+
+            A . X + L = 0
+            N = At . A
+            U = At . L
+            X = - (N ^ -1) . U
+
+            A = |x1 y1 1  0  0  0|     Xt = |a1 a2 a3 b1 b2 b3|
+                |0  0  0  x1 y1 1|
+                |x2 y2 1  0  0  0|
+                |0  0  0  x2 y2 1|     Lt = |u1 v1 u2 v2 ... un vn|
+                |.  .  .  .  .  .|
+                |xn yn 1  0  0  0|
+                |0  0  0  xn yn 1|
+
+    */
+
+  const unsigned int tiepoints_size = params.tiepoints_.size();
+  TEAGN_DEBUG_CONDITION( ( tiepoints_size > 2 ),
+    "Invalid tie-points size" )
+
+  TeMatrix A;
+  if( ! A.Init( 2*tiepoints_size, 6 ) ) {
+    return false;
+  }
+    
+  TeMatrix L;
+  if( ! L.Init( 2*tiepoints_size, 1 ) ) {
+    return false;
+  }
+
+  TeMatrix At;
+  TeMatrix N;
+  TeMatrix U;
+  TeMatrix X;
+  TeMatrix N_inv;
+
+  std::vector< TeCoordPair >::const_iterator iterator;
+
+  TeCoord2D x_y;
+  TeCoord2D u_v;
+  double x = 0;
+  double y = 0;
+  
+  /* L calcule */
+
+  iterator = params.tiepoints_.begin() ;
+  for ( unsigned int L_block_offset = 0 ; ( L_block_offset < tiepoints_size ); 
+    ++L_block_offset ) {
+    
+    u_v = iterator->pt2;
+    
+    L( L_block_offset*2     , 0) = u_v.x();
+    L( L_block_offset*2 + 1 , 0) = u_v.y();
+    
+    ++iterator ;
+  }
+  
+  /* A calcule */
+
+  iterator = params.tiepoints_.begin();
+  for ( unsigned int A_block_offset = 0 ; (A_block_offset < tiepoints_size) ; 
+        ++A_block_offset) {
+        
+    x_y = iterator->pt1;    
+    x = x_y.x();
+    y = x_y.y();
+    
+    A( A_block_offset*2  , 0 ) = x ;
+    A( A_block_offset*2  , 1 ) = y ;
+    A( A_block_offset*2  , 2 ) = 1 ;
+    A( A_block_offset*2  , 3 ) = 0 ;
+    A( A_block_offset*2  , 4 ) = 0 ;
+    A( A_block_offset*2  , 5 ) = 0 ;
+    A( A_block_offset*2+1, 0 ) = 0 ;
+    A( A_block_offset*2+1, 1 ) = 0 ;
+    A( A_block_offset*2+1, 2 ) = 0 ;
+    A( A_block_offset*2+1, 3 ) = x ;
+    A( A_block_offset*2+1, 4 ) = y ;
+    A( A_block_offset*2+1, 5 ) = 1 ; 
+    
+    ++iterator;
+  }
+
+  /* At calcule */
+  A.Transpose( At );
+
+  /* N calcule */
+  N = At * A;
+
+  /* U calcule */
+  U = At * L;
+
+  /* N_inv calcule */
+  if ( N.Inverse( N_inv ) ) {
+    /* X calcule */
+
+    X = N_inv * U;
+    
+    if( ! params.direct_parameters_.Init( 3, 3 ) ) {
+      return false;
+    }    
+
+    params.direct_parameters_(0,0) = X(0,0);
+    params.direct_parameters_(0,1) = X(1,0);
+    params.direct_parameters_(0,2) = X(2,0);
+    params.direct_parameters_(1,0) = X(3,0);
+    params.direct_parameters_(1,1) = X(4,0);
+    params.direct_parameters_(1,2) = X(5,0);
+    params.direct_parameters_(2,0) = 0;
+    params.direct_parameters_(2,1) = 0;
+    params.direct_parameters_(2,2) = 1;
+
+    if( params.direct_parameters_.Inverse( params.inverse_parameters_ ) ) {
+      return true;
+    } else {
+      return false;
+    }
+  } else {
+    return false;   
+  }
+}
+
+
+bool TeAffineGT::isTransDefined( const TeGTParams& params )  const
+{
+  if( ( params.direct_parameters_.Nrow() == 3 ) &&
+    ( params.direct_parameters_.Ncol() == 3 ) &&
+    ( params.inverse_parameters_.Nrow() == 3 ) &&
+    ( params.inverse_parameters_.Ncol() == 3 ) )
+  {
+    return true;
+  }
+  else
+  {
+    return false;
+  }
+}
+
diff --git a/src/terralib/kernel/TeAffineGT.h b/src/terralib/kernel/TeAffineGT.h
new file mode 100755
index 0000000..37a1e79
--- /dev/null
+++ b/src/terralib/kernel/TeAffineGT.h
@@ -0,0 +1,103 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeAffineGT.h
+   \brief Affine geometric trasformation.
+*/
+
+
+#ifndef TEAFFINEGT_H
+  #define TEAFFINEGT_H
+  
+  #include "TeDefines.h"
+  #include <TeGeometricTransformation.h>
+
+  /**
+   * @brief This is the class to deal affine geometric trasformation.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup Utils
+   */
+  class TL_DLL TeAffineGT : public TeGeometricTransformation {
+    public :
+
+      /**
+       * @brief Default Constructor.
+       */
+      TeAffineGT();
+    
+      /**
+       * @brief Default Destructor
+       */
+      ~TeAffineGT();
+      
+      /**
+       * @brief Returns the minimum number of required tie-points for the current
+       * transformation.
+       *
+       * @return The minimum number of required tie-points for the current
+       * transformation.
+       */       
+      unsigned int getMinRequiredTiePoints() const;      
+      
+    protected :
+    
+      /**
+       * @brief Direct mapping ( from pt1 space into pt2 space ).
+       *
+       * @param params Transformation parameters.
+       * @param pt1 pt1 coordinate.
+       * @param pt2 pt2 coordinate.
+       */      
+      void directMap( const TeGTParams& params, const TeCoord2D& pt1, 
+        TeCoord2D& pt2 ) const;
+      
+      /**
+       * @brief Inverse mapping ( from pt2 space into pt1 space ).
+       *
+       * @param params Transformation parameters.
+       * @param pt2 pt2 coordinate.
+       * @param pt1 pt1 coordinate.
+       */      
+      void inverseMap( const TeGTParams& params, const TeCoord2D& pt2, 
+        TeCoord2D& pt1 ) const;      
+      
+      /**
+       * @brief Calculate the transformation parameters following the
+       * new supplied tie-points.
+       *
+       * @param params Transformation parameters.
+       * @return true if OK, false on errors.
+       */       
+      bool computeParameters( TeGTParams& params ) const;
+      
+      /**
+       * @brief Verifies if the supplied parameters already
+       * has a defined transformation.
+       * @param params Transformation parameters.
+       * @return true if a transformation is already defined, 
+       * false otherwise.
+       */       
+      bool isTransDefined( const TeGTParams& params ) const;        
+  };
+  
+#endif
+
diff --git a/src/terralib/kernel/TeAffineGTFactory.cpp b/src/terralib/kernel/TeAffineGTFactory.cpp
new file mode 100755
index 0000000..85ab8ab
--- /dev/null
+++ b/src/terralib/kernel/TeAffineGTFactory.cpp
@@ -0,0 +1,48 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+
+#include "TeAffineGTFactory.h"
+#include <TeAffineGT.h>
+#include <TeException.h>
+
+TeAffineGTFactory::TeAffineGTFactory()
+: TeGTFactory( std::string( "affine" ) )
+{
+};      
+
+TeAffineGTFactory::~TeAffineGTFactory()
+{
+};
+
+
+TeGeometricTransformation* TeAffineGTFactory::build ( 
+  const TeGTParams& )
+{
+  TeGeometricTransformation* instance_ptr = new TeAffineGT();
+  
+  if( ! instance_ptr ) {
+    throw TeException( FACTORY_PRODUCT_INSTATIATION_ERROR );
+  }
+  
+  return instance_ptr;
+}
diff --git a/src/terralib/kernel/TeAffineGTFactory.h b/src/terralib/kernel/TeAffineGTFactory.h
new file mode 100755
index 0000000..64ab728
--- /dev/null
+++ b/src/terralib/kernel/TeAffineGTFactory.h
@@ -0,0 +1,71 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeAffineGTFactory.h
+    \brief This file contains the affine geometric trasformation factory
+*/
+
+#ifndef TEAFFINEGTFACTORY_H
+  #define TEAFFINEGTFACTORY_H
+  
+  #include "TeDefines.h"
+  #include <TeGTFactory.h>
+
+  /**
+   * @brief This is the affine geometric trasformation factory.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup Utils
+   */
+  class TL_DLL TeAffineGTFactory : public TeGTFactory
+  {
+    public :
+      
+      /**
+       * @brief Default constructor
+       */
+      TeAffineGTFactory();      
+      
+      /**
+       * @brief Default Destructor
+       */
+      ~TeAffineGTFactory();
+      
+    protected :  
+    
+      /**
+       * @brief Implementation for the abstract TeFactory::build.
+       *
+       * @param arg A const reference to the used parameters.
+       * @return A pointer to the new generated instance.
+       */
+      TeGeometricTransformation* build( const TeGTParams& arg );
+      
+  };
+
+  namespace
+  {  
+    /** @brief A concrete factory instance for registering into the factory dictionary */
+    static TeAffineGTFactory TeAffineGTFactory_instance;
+  };
+  
+#endif
+
diff --git a/src/terralib/kernel/TeAgnostic.cpp b/src/terralib/kernel/TeAgnostic.cpp
new file mode 100644
index 0000000..f3f3fd9
--- /dev/null
+++ b/src/terralib/kernel/TeAgnostic.cpp
@@ -0,0 +1,14 @@
+#include "TeAgnostic.h"
+
+namespace TeAgnostic{
+
+  bool debugModeCheck()
+  {
+    #ifdef TEAGN_DEBUG_MODE
+      return true;
+    #else
+      return false;
+    #endif
+  }
+
+};
diff --git a/src/terralib/kernel/TeAgnostic.h b/src/terralib/kernel/TeAgnostic.h
new file mode 100644
index 0000000..2e06811
--- /dev/null
+++ b/src/terralib/kernel/TeAgnostic.h
@@ -0,0 +1,397 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+
+/**
+ * @file TeAgnostic.h
+ * @brief This file contains a set of macros, routines and classes to deal with
+ * system checking and logging facility.
+ * They should NOT be used by anyone because the support and interfaces 
+ * can be changed in future. THIS IS FOR INTERNAL USE ONLY.
+ * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+ *
+ * @note The following macros will be used:
+ * 
+ * @param TEAGN_DEBUG_MODE If defined, debug code macros will be compiled and
+ * used or if not defined the compiler debug flag will be used.
+ * @param TEAGN_ENABLE_STDOUT_LOG If defined, messages also will be logged
+ * to STDOUT ( otherwise only TeErrorLog will log messages )
+ * or if not defined the compiler debug flag will be used.
+ */
+
+#ifndef TEAGNOSTIC_H
+  #define TEAGNOSTIC_H
+
+  #include <sstream>
+  #include <string>
+  #include <iostream>
+  
+  #include <TeException.h>
+  #include <TeErrorLog.h>   
+
+  /**
+   * @brief TeAgnostic debug mode selection based on NDEBUG define.
+   */
+  #ifndef TEAGN_DEBUG_MODE
+    #ifndef NDEBUG
+      /** @brief Debug mode selection flag. */
+      #define TEAGN_DEBUG_MODE
+      
+      /** @brief STDOUT logging selection flag. */
+      #ifndef TEAGN_ENABLE_STDOUT_LOG
+        #define TEAGN_ENABLE_STDOUT_LOG
+      #endif
+    #endif
+  #endif   
+
+  /**
+   * @brief Logs a message to stdout
+   *
+   * @param message Message to be logged.
+   */
+  #ifdef TEAGN_ENABLE_STDOUT_LOG
+    #define TEAGN_LOGMSG_STDOUT( message ) \
+      std::cout << std::endl << "Message : " \
+        << __FILE__ \
+        << ":" << __LINE__ \
+        << " - " << TeAgnostic::to_string( message ) \
+        << std::endl;
+  #else
+    #define TEAGN_LOGMSG_STDOUT( message ) {};
+  #endif
+
+    /**
+    * @brief Logs a error message to stderr
+    *
+    * @param message Message to be logged.
+    */
+  #ifdef TEAGN_ENABLE_STDOUT_LOG
+    #define TEAGN_LOGERR_STDOUT( message ) \
+      std::cerr << std::endl << "Error : " \
+        << __FILE__ \
+        << ":" << __LINE__ \
+        << " - " << TeAgnostic::to_string( message ) \
+        << std::endl;
+  #else
+    #define TEAGN_LOGERR_STDOUT( message ) {};
+  #endif
+
+    /**
+    * @brief Logs a warning message to stdout
+    *
+    * @param message Message to be logged.
+    */
+  #ifdef TEAGN_ENABLE_STDOUT_LOG
+    #define TEAGN_LOGWARN_STDOUT( message ) \
+      std::cout << std::endl << "Warning : " \
+        << __FILE__ \
+        << ":" << __LINE__ \
+        << " - " << TeAgnostic::to_string( message ) \
+        << std::endl;
+  #else
+    #define TEAGN_LOGWARN_STDOUT( message ) {};
+  #endif
+        
+
+  /**
+   * @brief Logs a message.
+   *
+   * @param message Message to be logged.
+   */
+  #define TEAGN_LOGMSG( message ) \
+  { \
+    TeErrorLog::instance().insert( LOG_MESSAGE, \
+      TeAgnostic::to_string( message ) ); \
+    TEAGN_LOGMSG_STDOUT( message ); \
+  };
+
+  /**
+   * @brief Logs a message.
+   *
+   * @param message Message to be logged.
+   */
+  #define TEAGN_LOGERR( message ) \
+  { \
+    TeErrorLog::instance().insert( UNKNOWN_ERROR_TYPE, \
+      TeAgnostic::to_string( message ) ); \
+    TEAGN_LOGERR_STDOUT( message ); \
+  };
+      
+  /**
+   * @brief Logs a warning message.
+   *
+   * @param message Message to be logged.
+   */
+  #define TEAGN_LOGWARN( message ) \
+  { \
+    TeErrorLog::instance().insert( LOG_MESSAGE, \
+     TeAgnostic::to_string( message ) ); \
+    TEAGN_LOGWARN_STDOUT( message ); \
+  };
+      
+  /**
+   * @brief Logs a message to stderr and throws.
+   *
+   * @param message Message to be logged.
+   */
+  #define TEAGN_LOG_AND_THROW( message ) \
+  { \
+    TEAGN_LOGERR_STDOUT( message ); \
+    throw TeException( UNKNOWN_ERROR_TYPE, \
+      TeAgnostic::to_string( message ), false ); \
+  };
+      
+  /**
+   * @brief Checks if value is true and throws an exception if not.
+   *
+   * @param value Value to be checked.
+   * @param message Message to be logged.
+   */
+  #define TEAGN_TRUE_OR_THROW( value , message ) \
+    if( value == 0 ) { \
+      TEAGN_LOGERR_STDOUT( TeAgnostic::to_string( message ) + \
+        " - " + TeAgnostic::to_string( #value ) ); \
+      throw TeException( UNKNOWN_ERROR_TYPE, \
+        TeAgnostic::to_string( message ), false ); \
+    };      
+
+  /**
+   * @brief Variable watching.
+   *
+   * @param variable Variable to be logged.
+   */
+  #define TEAGN_WATCH( variable ) \
+    { \
+      TEAGN_LOGMSG( "WATCH - " + TeAgnostic::to_string( #variable ) + \
+        "=" + TeAgnostic::to_string( variable ) ); \
+    };
+
+  /**
+   * @brief Checks if value is true and logs an warning message if not.
+   *
+   * @param value Value to be checked.
+   * @param message Message to be logged.
+   */
+  #define TEAGN_TRUE_OR_LOG( value , message ) \
+    if( value == 0 ) { \
+      TEAGN_LOGWARN( TeAgnostic::to_string( message ) + \
+        " - " + TeAgnostic::to_string( #value ) ); \
+    };
+
+  /**
+   * @brief Checks if value is true. For false values a warning message will be logged 
+   * and a return of context with false value will be done.
+   *
+   * @param value Value to be checked.
+   * @param message Message to be logged.
+   */
+  #define TEAGN_TRUE_OR_RETURN( value , message ) \
+    if( value == 0 ) { \
+      TEAGN_LOGWARN( TeAgnostic::to_string( message ) + \
+        " - " + TeAgnostic::to_string( #value ) ); \
+      return false; \
+    };
+    
+  /**
+   * @brief Checks if value is false. For true values a warning message 
+   * will be logged 
+   * and a return of context with false value will be done.
+   *
+   * @param value Value to be checked.
+   * @param message Message to be logged.
+   */
+  #define TEAGN_FALSE_OR_RETURN( value , message ) \
+    if( value != 0 ) { \
+      TEAGN_LOGWARN( TeAgnostic::to_string( message ) + \
+        " - " + TeAgnostic::to_string( #value ) ); \
+      return false; \
+    };    
+
+  /**
+   * @brief Logs a warning message will and return false.
+   *
+   * @param message Message to be logged.
+   */
+  #define TEAGN_LOG_AND_RETURN( message ) \
+    { \
+      TEAGN_LOGWARN( message ); \
+      return false; \
+    };
+
+  /**
+   * @brief Checks if value is false and logs an warning message if not.
+   *
+   * @param value Value to be checked.
+   * @param message Message to be logged.
+   */
+  #define TEAGN_FALSE_OR_LOG( value , message ) \
+    if( value != 0 ) { \
+      TEAGN_LOGWARN( TeAgnostic::to_string( message ) + \
+        " - " + TeAgnostic::to_string( #value ) ); \
+    };
+
+  /**
+   * @brief Checks if two values are equal and throws an exception if not.
+   *
+   * @param value1 Value to be checked.
+   * @param value2 Value to be checked.
+   * @param message Message to be logged.
+   */
+  #define TEAGN_CHECK_EQUAL( value1 , value2 , message ) \
+    TEAGN_TRUE_OR_THROW( ( ((double)value1) == ((double)value2) ), \
+    std::string( "Values must be equal [" ) + \
+    TeAgnostic::to_string( value1 ) + "!=" + \
+    TeAgnostic::to_string( value2 ) + "] - " + \
+    TeAgnostic::to_string( message ) );
+
+  /**
+   * @brief Checks if two values are diferent and throws an exception if not.
+   *
+   * @param value1 Value to be checked.
+   * @param value2 Value to be checked.
+   * @param message Message to be logged.
+   */
+  #define TEAGN_CHECK_NOTEQUAL( value1 , value2 , message ) \
+    TEAGN_TRUE_OR_THROW( ( ((double)value1) != ((double)value2) ), \
+    std::string( "Values can't be equal [" ) + \
+    TeAgnostic::to_string( #value1 ) + std::string( "==" ) + \
+    TeAgnostic::to_string( #value2 ) + std::string( "==" ) + \
+    TeAgnostic::to_string( value1 ) + std::string( "]" ) );
+
+  /**
+   * @brief  Checks if two values are equal ( within an EPS ) and
+   *  throws an exception if not.
+   *
+   * @param value1 Value to be checked.
+   * @param value2 Value to be checked.
+   * @param eps EPS ( threshold )
+   * @param message Message to be logged.
+   */
+  #define TEAGN_CHECK_EPS( value1 , value2 , eps , message ) \
+    { \
+      TEAGN_TRUE_OR_THROW( ( eps >= 0), "Invalid eps" ); \
+      double TEAGN_CHECK_EPS_double_diff = 0; \
+      double TEAGN_CHECK_EPS_double_value1 = (double)value1; \
+      double TEAGN_CHECK_EPS_double_value2 = (double)value2; \
+      double TEAGN_CHECK_EPS_double_eps = (double)eps; \
+      if( TEAGN_CHECK_EPS_double_value1 < TEAGN_CHECK_EPS_double_value2 ) { \
+        TEAGN_CHECK_EPS_double_diff = ( TEAGN_CHECK_EPS_double_value2 - \
+          TEAGN_CHECK_EPS_double_value1 ); \
+      } else { \
+        TEAGN_CHECK_EPS_double_diff = ( TEAGN_CHECK_EPS_double_value1 - \
+          TEAGN_CHECK_EPS_double_value2 ); \
+      }; \
+      TEAGN_TRUE_OR_THROW( \
+        ( TEAGN_CHECK_EPS_double_diff <= TEAGN_CHECK_EPS_double_eps ), \
+        std::string( "Values are not equal: " ) + \
+        TeAgnostic::to_string( #value1 ) + \
+        std::string( "=[") + \
+        TeAgnostic::to_string( TEAGN_CHECK_EPS_double_value1 ) + \
+        std::string( "] " ) + \
+        TeAgnostic::to_string( #value2 ) + \
+        std::string( "=[") + \
+        TeAgnostic::to_string( TEAGN_CHECK_EPS_double_value2 ) + \
+        std::string( "] eps=[") + \
+        TeAgnostic::to_string( TEAGN_CHECK_EPS_double_eps ) + \
+        std::string( "] diff=[") + \
+        TeAgnostic::to_string( TEAGN_CHECK_EPS_double_diff ) + \
+        std::string( "] - " ) + \
+        TeAgnostic::to_string( message ) \
+        ); \
+    };
+
+  /**
+   * @brief Throws an exception for not implemented source.
+   */
+  #define TEAGN_NOT_IMPLEMENTED \
+    TEAGN_LOG_AND_THROW( "Not Implemented." );
+
+  /**
+   *  @brief Checks if Debug mode is enabled and throws an exception if not.
+   */
+  #define TEAGN_DEBUG_MODE_CHECK \
+    TEAGN_TRUE_OR_THROW( TeAgnostic::debugModeCheck() , \
+    "Code not compiled with debug" );
+    
+  /**
+   * @brief Checks if value is true and throws an exception if not.
+   *
+   * @note This macro will be disabled for non debug mode.
+   *
+   * @param value Value to be checked.
+   * @param message Message to be logged.
+   */
+  #ifdef TEAGN_DEBUG_MODE
+    #define TEAGN_DEBUG_CONDITION( value , message ) \
+      TEAGN_TRUE_OR_THROW( value , message );
+  #else
+    #define TEAGN_DEBUG_CONDITION( value , message ) {};
+  #endif
+  
+  /**
+   * @brief Checks if value is true. For false values a warning message will be logged 
+   * and a return of context with false value will be done.
+   *
+   * @note This macro will be disabled for non debug mode.
+   *
+   * @param value Value to be checked.
+   * @param message Message to be logged.
+   */
+  #ifdef TEAGN_DEBUG_MODE
+    #define TEAGN_DEBUG_RETURN( value , message ) \
+      TEAGN_TRUE_OR_RETURN( value , message );
+  #else
+    #define TEAGN_DEBUG_RETURN( value , message ) {};
+  #endif  
+
+  /**
+   * @brief This namespace contains a set of routines and classes to deal with
+   *  system checking and logging facility.
+   * @ingroup Utils
+   */
+  namespace TeAgnostic{
+
+    /**
+     * @brief Data conversion to string.
+     *
+     * @param data Data to be converted.
+     * @return The converted string.
+     */
+     template< class T >
+     std::string to_string( const T& data )
+     {
+        std::stringstream temp_ss;
+        temp_ss.setf(std::ios_base::fixed);
+        temp_ss << data;
+        return temp_ss.str();
+     }
+
+    /**
+     * @brief Checks if the code was compiled with debug mode.
+     *
+     * @return true if debug mode was used at compilation time. false if not.
+     */
+     TL_DLL bool debugModeCheck();
+
+  };
+
+#endif
diff --git a/src/terralib/kernel/TeAsciiFile.cpp b/src/terralib/kernel/TeAsciiFile.cpp
old mode 100644
new mode 100755
index 3e80448..f0983cb
--- a/src/terralib/kernel/TeAsciiFile.cpp
+++ b/src/terralib/kernel/TeAsciiFile.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -30,6 +30,7 @@ of this library and its documentation.
 #include "TeException.h"
 #include "TeAssertions.h"
 #include "TeDefines.h"
+#include <cstdlib>
 
 TeAsciiFile::TeAsciiFile ( const string& name, const char* mode ): 	
 	TeStdFile ( name, mode  ) 
@@ -93,6 +94,7 @@ TeAsciiFile::readString ()
 		throw TeException ( END_OF_FILE_REACHED, name(), true );
 
 	char input [TeNAME_LENGTH];
+	input[0]=0;
 	fscanf ( file_, "%s", input );
 
 return input;
@@ -340,3 +342,21 @@ return TeBox ( x1, y1, x2, y2 );
 
 }
 
+string
+TeAsciiFile::readAll()
+{
+	require ( file_ != 0 );
+	if ( feof ( file_ ) != 0 )
+		throw TeException ( END_OF_FILE_REACHED, name(), true );
+
+	char ch = '0';
+	string text="";
+	int ret;
+	while ((ret=fscanf ( file_, "%c", &ch )) != EOF)
+	{
+		if (ch != '\n') 
+			text = text + ch;
+	}
+	return text;
+}
+
diff --git a/src/terralib/kernel/TeAsciiFile.h b/src/terralib/kernel/TeAsciiFile.h
old mode 100644
new mode 100755
index cce443a..69e5631
--- a/src/terralib/kernel/TeAsciiFile.h
+++ b/src/terralib/kernel/TeAsciiFile.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -21,11 +21,12 @@ indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
 /*! \file TeAsciiFile.h
-    This file contains structures and definitions to deal ASCII files
+    \brief This file contains structures and definitions to deal ASCII files
 */
 #ifndef  __TERRALIB_INTERNAL_ASCIIFILE_H
 #define  __TERRALIB_INTERNAL_ASCIIFILE_H
 
+#include "TeDefines.h"
 #include "TeStdFile.h"
 #include "TeCoord2D.h"
 #include "TeBox.h"
@@ -43,7 +44,7 @@ using namespace std;
  \sa
   TeStdFile, TeSPRFile
 */
-class TeAsciiFile: public TeStdFile {
+class TL_DLL TeAsciiFile: public TeStdFile {
 
 public:
 
@@ -112,10 +113,12 @@ public:
 	//! Reads the first n strings from a comma separated line string and put in a string list
 	void readNStringCSV ( vector<string>&, unsigned int n, const char sep = ',');
 
-
 	//! Reads a bounding box
 	TeBox readBox();
 
+	//! Reads the entire content of the file, skipping new line characters only
+	string readAll();
+
 private:
 	
 // No copy allowed
diff --git a/src/terralib/kernel/TeAssertions.h b/src/terralib/kernel/TeAssertions.h
old mode 100644
new mode 100755
index 05e5d9e..787e8f7
--- a/src/terralib/kernel/TeAssertions.h
+++ b/src/terralib/kernel/TeAssertions.h
@@ -1,30 +1,29 @@
-//***********************************************************************
-//      TerraLib is a GIS Classes and Functions Library that 
-//      strongly explores Spatial Database Technologies 
-//
-//      Copyright � 2002 INPE and Tecgraf/PUC-Rio. 
-//
-//      This library is free software; you can redistribute it 
-//      and/or modify it under the terms of the GNU Lesser General 
-//      Public License as published by the Free Software Foundation
-//      version 2.1.(http://www.opensource.org/licenses/lgpl-license.php)
-//
-//      
-//
-//      Send questions or suggestions about the TerraLib Project 
-//      to terralib at dpi.inpe.br .
-//**************************************************************************//
-/*! \file TeAssertions.h
-    This file contains definitions for require and ensure macros.
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
-	 The require and ensure macros implement
-	 the pre-conditions and post-conditions
-	 for each module.
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
 
-	 The "invariant" macro verifies is an
-	 invariant condition is true.
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
 
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeAssertions.h
+    \brief This file contains definitions for require and ensure macros
 */
+
 #ifndef TeAssertions_H
 #define TeAssertions_H
 #include <assert.h>
diff --git a/src/terralib/kernel/TeAttribute.h b/src/terralib/kernel/TeAttribute.h
old mode 100644
new mode 100755
index eabe1bb..ad86724
--- a/src/terralib/kernel/TeAttribute.h
+++ b/src/terralib/kernel/TeAttribute.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,28 +20,28 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeAttribute.h
-    This file contains structures and definitions about attributes of geographical objects
+    \brief This file contains structures and definitions about attributes of geographical objects
 */
 #ifndef  __TERRALIB_INTERNAL_ATTRIBUTE_H
 #define  __TERRALIB_INTERNAL_ATTRIBUTE_H
 
+#include "TeDefines.h"
 #include "TeDataTypes.h"
 #include "TeTime.h"
 
 /*! \enum TeMeasurementScale 
-	Sscale of measurement according to Stevens (1949) 
-    modified by Chrisman (1998) to include CYCLIC and PROBABILITY
-    we also include FUZZY (possibility scale) 
+	\brief Sscale of measurement according to Stevens (1949) 
+           modified by Chrisman (1998) to include CYCLIC and PROBABILITY
+           we also include FUZZY (possibility scale) 
 */
 enum TeMeasurementScale 
 { ORDINAL, NOMINAL, RATIO, INTERVAL, CYCLIC, PROBABILITY, FUZZY };
 
 /*! \struct TeAttributeRep
-	Attribute physical representation
+	\brief Attribute physical representation
 */
-struct TeAttributeRep
+struct TL_DLL TeAttributeRep
 {
 	string			name_;		//!< attribute name	
 	TeAttrDataType  type_;		//!< attribute type
@@ -49,6 +49,8 @@ struct TeAttributeRep
 	int				decimals_;	//!< number of decimal digits
 	bool			isPrimaryKey_;	//!< flag to indicate that the attribute is part of primary key
 	bool			isAutoNumber_; 	//!< flag to indicate that the attribute is auto number
+	bool            null_;			//!< flag to indicate that attribute can be a null value (true) or not (false)
+	string			defaultValue_;	//!< default value (without "'")
 
 	//! Empty constructor
 	TeAttributeRep():
@@ -57,17 +59,21 @@ struct TeAttributeRep
 		numChar_(0),
 		decimals_(0),
 		isPrimaryKey_(false),
-		isAutoNumber_(false)
+		isAutoNumber_(false),
+		null_(true),
+		defaultValue_("")
 		{}
 
-	//! Empty constructor
+	//! Constructor
 	TeAttributeRep(const string& name):
 		name_(name),
 		type_(TeSTRING),
 		numChar_(0),
 		decimals_(0),
 		isPrimaryKey_(false),
-		isAutoNumber_(false)
+		isAutoNumber_(false),
+		null_(true),
+		defaultValue_("")
 		{}
 
 	//! Operator =
@@ -81,19 +87,31 @@ struct TeAttributeRep
 			decimals_ = at.decimals_;
 			isPrimaryKey_ = at.isPrimaryKey_;
 			isAutoNumber_ = at.isAutoNumber_;
+			null_ = at.null_;
+			defaultValue_ = at.defaultValue_;
 		}
 		return *this;
 	}
 
+	//! Operator ==
+	bool operator== ( const TeAttributeRep& at )
+	{
+		return (name_==at.name_ && type_ == at.type_
+			&& numChar_ == at.numChar_ && decimals_ == at.decimals_ &&
+            isPrimaryKey_ == at.isPrimaryKey_ && 
+			isAutoNumber_ == at.isAutoNumber_ && 
+			null_ == at.null_ && defaultValue_ == at.defaultValue_);
+	}
+
 	//! Operator <
 	bool	operator< (const TeAttributeRep& at) const 
 	{return (name_ < at.name_);}	
 };
 
 /*! \struct TeAttribute
-	Attribute description
+	\brief Attribute description
 */
-struct TeAttribute
+struct TL_DLL TeAttribute
 {
 	TeAttributeRep	rep_;		//!< representation of attribute	
 	string	semantic_;			//!< reference in a Ontology database (e.g., entry in WordNet )	
@@ -131,9 +149,9 @@ struct TeAttribute
 };
 
 /*! \struct TeProperty
- A property of an object
+	\brief A property of an object
  */
-struct TeProperty
+struct TL_DLL TeProperty
 {
 	TeAttribute		attr_;		//!< attribute description
     string			value_;		//!< its value stored as an string
@@ -149,7 +167,8 @@ typedef vector<TeAttributeRep>  TeAttributeRepList;
 typedef vector<TeAttribute>		TeAttributeList;
 
 //! A Map of the attribute names to the statistical types 
-typedef multimap<TeAttributeRep, TeStatisticType> TeGroupingAttr;
+typedef vector< pair<TeAttributeRep, TeStatisticType> > TeGroupingAttr;
 
 #endif
 
+
diff --git a/src/terralib/kernel/TeBaseSTInstance.h b/src/terralib/kernel/TeBaseSTInstance.h
new file mode 100644
index 0000000..742b0f0
--- /dev/null
+++ b/src/terralib/kernel/TeBaseSTInstance.h
@@ -0,0 +1,552 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright  2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeBaseSTInstance.h
+	\brief This file contains a base class called TeBaseSTInstance that represents 
+	an instance in time of a geographical object or element.  
+*/
+
+#ifndef  __TERRALIB_INTERNAL_BASESTINSTANCE_H
+#define  __TERRALIB_INTERNAL_BASESTINSTANCE_H
+
+#include "TeCoord2D.h"
+#include "TeGeometryAlgorithms.h"
+#include "TeAttribute.h"
+#include "TeSharedPtr.h"
+
+#include <string>
+#include <map> 
+#include <vector>
+
+using namespace std;
+
+class TeTheme;
+
+/*! \class TeBaseSTInstance
+	\brief A base class that represents an instance in a time of a spatial object.
+
+	A spatio-temporal instance (STInstance) is composite of an attribute set and geometries 
+	of a spatial element or object that are valid in a specific time. This class implements
+	a base generic spatio-temporal instance that can be specialized according to the
+	types that represent its geometries and its valid time.
+	
+*/
+template<typename GeometryType, typename TimeType>
+class TeBaseSTInstance
+{
+	
+protected:
+	//! object identification
+	string					object_id_;		
+	//! unique identification in each attribute table
+	vector<string>			unique_id_;	
+	//! set of properties or attributes values
+	vector<string>			properties_;	
+	//! geometries
+	GeometryType			geometries_;	
+	//! valid time 
+	TimeType				time_;		
+	//! the slice or group that contains this instance  
+	int						slice_;		
+	//! a shared pointer to the descriptions of all attributes
+	TeSharedPtr<TeAttributeList> 	attrList_;			
+		
+public:		
+
+	//! Empty constructor
+	TeBaseSTInstance() : object_id_(""), slice_(-1), attrList_(0)
+	{ }
+
+	//! Constructor
+	TeBaseSTInstance (const string& object_id, const vector<string>& prop, TeAttributeList* attList = 0, const int& s = -1) : 
+		object_id_(object_id), 
+		properties_(prop),
+		slice_(s),
+		attrList_(TeSharedPtr<TeAttributeList>(attList))
+		{ } 
+
+	//! Constructor
+	TeBaseSTInstance (const string& object_id, const GeometryType& geometries, const TimeType& time, 
+		const int& s = -1) : 
+		object_id_(object_id), 
+		geometries_(geometries),
+		time_(time),
+		slice_(s),
+		attrList_(0)
+		{ } 
+
+	//! Constructor
+	TeBaseSTInstance (const string& object_id, const vector<string>& prop, TeAttributeList* attList,
+		const GeometryType& geometries,	const int& slice, const TimeType& time ) :
+		object_id_(object_id), 
+		properties_(prop),
+		geometries_(geometries),
+		time_(time),
+		slice_(slice),
+		attrList_(TeSharedPtr<TeAttributeList>(attList))
+		{ } 
+			
+	//! Destructor
+	virtual ~TeBaseSTInstance() 
+	{ } 
+
+	//! Equal operator 
+	virtual bool operator== (const TeBaseSTInstance<GeometryType, TimeType>& other);
+
+	//! Returns the object identification
+	virtual string getObjectId () 
+	{	return object_id_;	}
+	
+	//! Sets the object identification
+	virtual void setObjectId (const string& id) 
+	{	object_id_ = id;	}
+
+	//! Deprecated: Returns the object identification 
+	virtual string objectId () 
+	{	return getObjectId();	}
+	
+	//! Deprecated: Sets the object identification 
+	virtual void objectId (const string& id) 
+	{	setObjectId(id);	}
+
+	//! Returns the unique identification in all attribute tables
+	virtual vector<string>& getUniqueId() 
+	{	return unique_id_;	}
+
+	//! Returns the unique identification of the i-th attribute table
+	virtual string getUniqueId(const int& i); 
+	
+	//! Sets the unique identification in all attribute tables
+	virtual void setUniqueId (const vector<string>& id) 
+	{	unique_id_ = id;	}
+
+	//! Adds an unique identification
+	virtual void addUniqueId (const string& id) 
+	{	unique_id_.push_back(id);	}
+
+	//! Deprecated: Returns the instance identification in all attribute tables
+	virtual vector<string>& uniqueId () 
+	{	return getUniqueId();	}
+
+	//! Deprecated: Returns the instance identification in the index-th attribute table
+	virtual string uniqueId (int index) 
+	{	return getUniqueId(index);	}
+	
+	//! Deprecated: Sets the instance identifications in all attribute tables
+	virtual void uniqueId (const vector<string>& ids) 
+	{	setUniqueId(ids);	}
+
+	//! Returns the valid time 
+	virtual TimeType getTime() 
+	{	return time_;	}
+	
+	//! Sets the valid time 
+	virtual void setTime (const TimeType& t) 
+	{	time_ = t;	}
+
+	//! Sets the property value vector 
+	virtual void setProperties(const vector<string>& p) 
+	{	properties_ = p;	}
+
+	//! Deprecated: Sets the property vector to the ST instance 
+	virtual void setProperties(TePropertyVector& p); 
+
+	//! Sets the value (as a string) of the i-th property 
+	virtual bool setPropertyValue (const int& i, const string& val); 
+
+	//! Sets the value (as a string) of a property named 'name'
+	virtual bool setPropertyValue (const string& name, const string& val); 
+
+	//! Adds a new property value
+	virtual void addPropertyValue (const string& val)
+	{	properties_.push_back (val); }
+
+	//! Removes the i-th property value
+	virtual bool removePropertyValue (const int& i); 
+
+	//! Adds a new property or set its value   
+	/*!
+		Verifies if there is this property in the attribute list.
+		If not, adds it in the ST instance and in the attribute list. 
+		Otherwise, set the property value
+	*/
+	virtual bool addProperty(TeProperty& prop); 
+
+	//! Adds a new attribute in the attribute list 
+	virtual bool addProperty(TeAttribute& rep); 
+	
+	//! Returns the property value vector 
+	virtual vector<string>& getProperties()
+	{	return properties_;	}
+
+	//! Gets the property vector 
+	virtual void getPropertyVector(TePropertyVector& propVec); 
+
+	//! Deprecated: Returns the property vector from the ST instance
+	TePropertyVector getPropertyVector(); 
+	
+	//! Gets the i-th property
+	virtual bool getProperty (TeProperty& prop, unsigned int i = 0);	
+	
+	//! Gets the property named "name"
+	virtual bool getProperty (TeProperty& prop, string name); 
+	
+	//! Gets the value (as a string) of the i-th property
+	virtual bool getPropertyValue (string& val, const int& i = 0); 
+
+	//! Gets the the value (as a string) of a property named "name"
+	virtual bool getPropertyValue (const string& name, string& val); 
+	
+	//! Returns the value (as a double) of the i-th property
+	virtual double operator[](int i); 
+
+	//! Deprecated: Sets the property vector to the ST instance
+	virtual void properties(TePropertyVector& p)
+	{	setProperties(p); }
+
+	//! Returns the geometries
+	virtual GeometryType& getGeometries() 
+	{	return geometries_;}
+
+	//! Sets the geometries  
+	virtual void setGeometry(const GeometryType& g)
+	{	geometries_ = g; }
+
+	//! Deprecated: Returns the geometries
+	virtual GeometryType& geometries() 
+	{	return getGeometries();}
+
+	//! Sets the group or slice that contains this instance 
+	virtual void setSlice (int s) 
+	{	slice_ = s; }
+
+	//! Returns the group or slice that contains this instance
+	virtual int getSlice()
+	{	return slice_; }
+
+	//! Deprecated: Sets the group or slice that contains this instance 
+	virtual void slice (int s) 
+	{	setSlice(s); }
+
+	//! Deprecated: Returns the group or slice that contains this instance
+	virtual int slice()
+	{	return getSlice(); }
+
+	//! Gets a pointer to attribute desciptions
+	const TeAttributeList*	getAttrList()
+	{	return attrList_.nakedPointer(); }
+
+	//! Creates a new internal copy of the attribute description
+	void setAttrList(const TeAttributeList& attList); 
+
+	//! Sets a shared pointer to attribute descriptions
+	void setAttrList(TeSharedPtr<TeAttributeList>& attrList);
+
+	//! Clears the instance, its attributes. It must be implemented by specialized classes to clear its geometries.
+	virtual void clear();
+
+	//! Returns a centroid associated to the geometries of the instance
+	virtual TeCoord2D getCentroid();
+
+	//! Returns an area the geometries of the instance
+	virtual double getArea();
+
+	//! Verifies if the time associated with this instance is valid. It must be implemented by specialized classes.
+	virtual bool isTimeValid()
+	{	return false; } 
+	
+	//! Deprecated: Returns the theme pointer that contains this instance. 
+	virtual TeTheme* theme() 
+	{ return 0; }
+
+	//! Deprecated: Sets the theme that contains this instance.
+	virtual void theme(TeTheme*)  
+	{  }
+};
+
+template<typename GeometryType, typename TimeType> bool
+TeBaseSTInstance<GeometryType, TimeType>::operator== (const TeBaseSTInstance<GeometryType, TimeType>& other)
+{
+	return ( (object_id_ == other.object_id_) && 
+			 (time_ == other.time_) &&
+			 (slice_ == other.slice_));
+}
+
+template<typename GeometryType, typename TimeType> string 
+TeBaseSTInstance<GeometryType, TimeType>::getUniqueId(const int& i) 
+{	
+	if(i<(int)unique_id_.size())
+		return unique_id_[i];	
+	return "";
+}
+
+template<typename GeometryType, typename TimeType> void 
+TeBaseSTInstance<GeometryType, TimeType>::setAttrList(const TeAttributeList& attList)
+{
+	attrList_.reset(new TeAttributeList()); 
+	*attrList_ = attList;
+}
+
+template<typename GeometryType, typename TimeType> void 
+TeBaseSTInstance<GeometryType, TimeType>::setAttrList(TeSharedPtr<TeAttributeList>& attList)
+{
+	attrList_ = attList;
+}
+
+template<typename GeometryType, typename TimeType> void 
+TeBaseSTInstance<GeometryType, TimeType>::setProperties(TePropertyVector& p)
+{
+	properties_.clear();
+	TePropertyVector::iterator it = p.begin();
+	while(it!=p.end())
+	{
+		addPropertyValue(it->value_); 
+		++it;
+	}
+}
+
+template<typename GeometryType, typename TimeType> bool 
+TeBaseSTInstance<GeometryType, TimeType>::setPropertyValue (const int& i, const string& val)
+{	
+	if(i<0 || i>=(int)properties_.size())
+		return false;
+	properties_[i] = val;
+	return true;
+}
+
+template<typename GeometryType, typename TimeType> bool 
+TeBaseSTInstance<GeometryType, TimeType>::setPropertyValue (const string& name, const string& val)
+{	
+	if(!attrList_.isActive())
+		return false;
+
+	string newName = TeConvertToUpperCase(name); 
+	size_t pos = name.find(".", 0, 1);
+	if (pos != string::npos)
+		newName = TeConvertToUpperCase((name.substr(pos+1)));
+
+	for(unsigned int i=0; i<attrList_->size(); ++i)
+	{
+		string s = TeConvertToUpperCase((attrList_->operator[](i)).rep_.name_);
+		if( (s == TeConvertToUpperCase(name)) || (s == newName))
+		{
+			if(i>=properties_.size())
+				return false;
+			properties_[i] = val;
+			return true;
+		}
+	}
+	return false; 
+}
+
+template<typename GeometryType, typename TimeType> void  
+TeBaseSTInstance<GeometryType, TimeType>::getPropertyVector(TePropertyVector& propVec)
+{
+	if(!attrList_.isActive())
+		return;
+    if(properties_.size()!=attrList_->size())
+		return;
+	propVec.clear();
+	for(unsigned int i=0; i<properties_.size(); ++i)
+	{
+		TeProperty p;
+		p.value_ = properties_[i];
+		p.attr_ = attrList_->operator[](i);
+		propVec.push_back(p);
+	}
+}
+
+template<typename GeometryType, typename TimeType> TePropertyVector  
+TeBaseSTInstance<GeometryType, TimeType>::getPropertyVector()
+{
+	TePropertyVector vec; 
+	this->getPropertyVector(vec);
+	return vec;
+}
+
+template<typename GeometryType, typename TimeType> bool 
+TeBaseSTInstance<GeometryType, TimeType>::getProperty (TeProperty& prop, unsigned int i)
+{
+	if(!attrList_.isActive())
+		return false;
+
+	if(i>=properties_.size() || i>=attrList_->size())
+		return false;
+	prop.value_ = properties_[i];
+	prop.attr_ = (*attrList_)[i];
+	return true;
+}
+
+template<typename GeometryType, typename TimeType> bool 
+TeBaseSTInstance<GeometryType, TimeType>::getProperty (TeProperty& prop, string name)
+{
+	if(!attrList_.isActive())
+		return false;
+	 if(properties_.size()!=attrList_->size())
+		return false;
+
+	string newName = TeConvertToUpperCase(name); 
+	size_t pos = name.find(".", 0, 1);
+	if (pos != string::npos)
+		newName = TeConvertToUpperCase(name.substr(pos+1));
+
+	for(unsigned int i=0; i<attrList_->size(); ++i)
+	{
+		string s = TeConvertToUpperCase((attrList_->operator[](i)).rep_.name_); 
+		if((s == TeConvertToUpperCase(name)) || (s == newName))
+		{
+			prop.value_ = properties_[i];
+			prop.attr_ = attrList_->operator[](i);
+			return true;
+		}
+	}
+	return false; 
+}
+	
+template<typename GeometryType, typename TimeType> bool 
+TeBaseSTInstance<GeometryType, TimeType>::getPropertyValue (string& val, const int& i)
+{
+	if(i<0 || i>= (int)properties_.size())
+		return false;
+	val = properties_[i];
+	return true;
+}
+
+template<typename GeometryType, typename TimeType> bool 
+TeBaseSTInstance<GeometryType, TimeType>::getPropertyValue (const string& name, string& val)
+{	
+	if(!attrList_.isActive())
+		return false;
+
+	if(properties_.size()!=attrList_->size())
+		return false;
+
+	string newName = TeConvertToUpperCase(name); 
+	size_t pos = name.find(".", 0, 1);
+	if (pos != string::npos)
+		newName = TeConvertToUpperCase(name.substr(pos+1));
+
+	for(unsigned int i=0; i<attrList_->size(); ++i)
+	{
+		string s = TeConvertToUpperCase((attrList_->operator[](i)).rep_.name_); 
+		if((s == TeConvertToUpperCase(name)) || (s == newName))
+		{
+			val = properties_[i];
+			return true;
+		}
+	}
+	return false; 
+}
+
+template<typename GeometryType, typename TimeType> bool 
+TeBaseSTInstance<GeometryType, TimeType>::addProperty(TeProperty& prop)
+{
+	if(!attrList_.isActive())
+		return false;
+
+	string newName = TeConvertToUpperCase(prop.attr_.rep_.name_); 
+	size_t pos = (prop.attr_.rep_.name_).find(".", 0, 1);
+	if (pos != string::npos)
+		newName = TeConvertToUpperCase(prop.attr_.rep_.name_.substr(pos+1));
+
+	for(unsigned int i=0; i<attrList_->size(); ++i)
+	{
+		string s = TeConvertToUpperCase((attrList_->operator[](i)).rep_.name_); 
+		if((s == TeConvertToUpperCase(prop.attr_.rep_.name_)) || (s == newName))
+		{
+			//the property already exists
+			if(i>=properties_.size())
+				properties_.push_back (prop.value_);
+			else
+				properties_[i] = prop.value_;
+			return true;
+		}
+	}
+
+	// Adds a new property
+	attrList_->push_back(prop.attr_);
+	properties_.push_back (prop.value_);
+	return true; 
+}
+
+template<typename GeometryType, typename TimeType> bool 
+TeBaseSTInstance<GeometryType, TimeType>::addProperty(TeAttribute& attr)
+{
+	if(!attrList_.isActive())
+		return false;
+	attrList_->push_back(attr);
+	return true; 
+}
+
+template<typename GeometryType, typename TimeType> bool 
+TeBaseSTInstance<GeometryType, TimeType>::removePropertyValue(const int& i)
+{
+	int index = 0;
+	vector<string>::iterator it = properties_.begin();
+	while(it!=properties_.end())
+	{
+		if(index==i)
+		{
+			properties_.erase(it);
+			return true;
+		}
+		++it;
+		++index;
+	}
+	return false;
+}
+
+template<typename GeometryType, typename TimeType> double 
+TeBaseSTInstance<GeometryType, TimeType>::operator[](int i)
+{	
+	double val = TeMAXFLOAT; 
+	if(i<0 || i>=(int)properties_.size() || properties_[i].empty())
+		return val;
+	val = atof(properties_[i].c_str()); 
+	return val;  
+}
+	
+template<typename GeometryType, typename TimeType> void
+TeBaseSTInstance<GeometryType, TimeType>::clear()
+{
+	object_id_ = ""; 
+	slice_ = -1; 
+    properties_.clear(); 
+	unique_id_.clear();
+	attrList_.reset(0);
+}
+
+
+template<typename GeometryType, typename TimeType> TeCoord2D
+TeBaseSTInstance<GeometryType, TimeType>::getCentroid()
+{
+	return TeFindCentroid(this->getGeometries());
+}
+
+template<typename GeometryType, typename TimeType> double
+TeBaseSTInstance<GeometryType, TimeType>::getArea()
+{
+	return TeGeometryArea(this->getGeometries());
+}
+
+			
+#endif 
diff --git a/src/terralib/kernel/TeBaseSTInstanceSet.h b/src/terralib/kernel/TeBaseSTInstanceSet.h
new file mode 100644
index 0000000..04cdea1
--- /dev/null
+++ b/src/terralib/kernel/TeBaseSTInstanceSet.h
@@ -0,0 +1,1212 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright  2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeBaseSTInstanceSet.h
+	\brief This file contains structures to deal with a set of spatio-temporal 
+	instances. These instances can belong to a specific layer or theme.
+*/
+
+#ifndef  __TERRALIB_INTERNAL_STINSTANCESET_H
+#define  __TERRALIB_INTERNAL_STINSTANCESET_H
+
+#include "TeBaseSTInstance.h"
+#include "TeRTree.h"
+#include "TeTheme.h"
+#include "TeLayer.h"
+#include "TeQuerierParams.h"
+#include "TeQuerier.h"
+#include "TeSharedPtr.h"
+
+/*! \class TeBaseSTInstanceSet
+	\brief A abstract class that represents a set of spatial temporal instances.
+
+	This abstract class implements a generic spatio-temporal instance set. It must 
+	be specialized according to the instance type (its geometry type, its time type
+	and its own type). 
+
+	\sa TeBaseSTInstance TeTheme TeLayer
+	
+*/
+template< typename GeometryType, typename TimeType, typename InstanceType >
+class TeBaseSTInstanceSet  
+{
+
+protected:
+
+	//! Set of spatio temporal instances
+	vector<InstanceType>	instances_;		
+
+	//! Minimal time associated to spatial temporal instances
+	TimeType				minTime_;
+	//! Maximal time associated to spatial temporal instances
+	TimeType				maxTime_;
+
+	//! Description of all attributes 
+	TeSharedPtr<TeAttributeList>	attrList_;
+
+	//! A pointer to a theme
+	TeTheme*				theme_;
+	//! A pointer to a layer
+	TeLayer*				layer_;	
+	//! A bounding box that contains all geometries of the spatial temporal instances
+	TeBox					box_;
+	
+	//! A map from object identity to its associated instances in the set 
+	map<string, vector<int> >		objectIdToInstances_;
+	//! A map from time to its associated instances in the set
+	map<TimeType, vector<int> >		timeToInstances_;
+	//! A map from slice to its associated instances in the set
+	map<int, vector<int> >			sliceToInstances_;
+	//! A struture to index the geometries: RTree
+	TeSAM::TeRTree<int>*			rTree_;		
+
+	//! Builds the set using a given querier and a specific slice
+	virtual bool buildImpl(TeQuerier* querier, const int& slide = -1) = 0;
+
+public:
+
+	//! An iterator that traverse each instance in the set
+	typedef typename vector<InstanceType>::iterator iterator;
+	
+	//! Constructor. It does not initialize the rTree. 
+	TeBaseSTInstanceSet(); 
+
+	//! Constructor. It initializes the rTree based on theme box.
+	TeBaseSTInstanceSet(TeTheme* theme, const TeAttributeList& attrList = TeAttributeList()); 
+
+	//! Constructor. It initializes the rTree based on layer box.
+	TeBaseSTInstanceSet(TeLayer* layer, const TeAttributeList& attrList = TeAttributeList());  
+
+	//! Constructor. It initializes the rTree based on the given box. 
+	TeBaseSTInstanceSet(const TeBox& box, const TeAttributeList& attrList = TeAttributeList());
+
+	//! Copy constructor
+	TeBaseSTInstanceSet (const TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>& other); 
+
+	//! Destructor
+	virtual ~TeBaseSTInstanceSet();  
+	
+	//! Assignment operator
+	virtual TeBaseSTInstanceSet& operator= (const TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>& other);
+
+	//! Gets minimal time
+	virtual TimeType getMinTime()
+	{ return minTime_; }
+
+	//! Sets minimal time
+	virtual void setMinTime(TimeType& t)
+	{ minTime_ = t; } 
+
+	//! Gets maximal time
+	virtual TimeType getMaxTime()
+	{ return maxTime_; }
+
+	//! Sets maximal time
+	virtual void setMaxTime(TimeType& t)
+	{ maxTime_ = t; } 
+
+	//! Gets the attribute list, that is, the description of all attributes
+	virtual TeAttributeList& getAttributeList()
+	{	return (*attrList_);  }
+
+	//! Sets the attribute list, that is, the description of all attributes
+	virtual void setAttributeList(TeAttributeList& attrs); 
+
+	//! Returns the index of an attribute named "attrName"
+	virtual int getAttributeIndex(const string& attrName);
+
+	//! Gets theme pointer
+	virtual TeTheme* getTheme()
+	{	return theme_;  }
+
+	//! Sets theme pointer
+	virtual void setTheme(TeTheme* t)
+	{	theme_ = t; }
+
+	//! Deprecated: Returns a theme pointer
+	TeTheme* theme()
+	{	return getTheme(); }
+
+	//! Gets layer pointer 
+	virtual TeLayer* getLayer()
+	{	return layer_;  }
+
+	//! Sets layer pointer
+	virtual void setLayer(TeLayer* l)
+	{	layer_ = l; }
+	
+	//! Gets a reference to the instance set 
+	virtual vector<InstanceType>& getSTInstances()
+	{	return instances_; }
+
+	//! Gets a pointer to the index-th ST instance
+	virtual InstanceType* getSTInstance(const unsigned int& index);
+
+	//! Gets a pointer to a ST instance of an object in a specific slice  
+	virtual InstanceType* getSTInstance(const string& objectId, const int& slice = -1);
+
+	//! Gets a pointer to a ST instance of an object in a specific time and slice
+	virtual InstanceType* getSTInstance(const string& objectId, TimeType& time, const int& slice = -1);
+
+	//! Gets pointers to all ST instances of a specific object in a specific slice
+	virtual void getSTInstances(vector<InstanceType*>& set, const string& objectId, const int& slice = -1);
+
+	//! Gets pointers to all ST instances of a specific object in a specific time and slice
+	virtual void getSTInstances(vector<InstanceType*>& set, const string& objectId, TimeType& time, const int& slice = -1);
+	
+	///! Gets pointers to all ST instances of a specific time
+	virtual void getSTInstances(vector<InstanceType*>& set, TimeType& time, const int& slice = -1);
+
+	//! Gets pointers to all ST instances of a specific slice
+	virtual void getSTInstances(vector<InstanceType*>& set, const int& slice);
+
+	//! Inserts a new ST instance in the set 
+	virtual bool insertSTInstance (InstanceType& object);
+		
+	//! Returns the number of instances 
+	virtual int numSTInstance(); 
+	
+	//! Returns the number of instances of an object or element
+	virtual int numSTInstance(const string& objectId); 
+
+	//! Returns the number of instances in a specific slice
+	virtual int numSTInstance(const int& slice);
+
+	//! Returns the number of instances in a specific time
+	virtual int numSTInstance(TimeType& time);
+
+	//! Returns the number of elements or objects in the set
+	virtual int numElements()
+	{	return objectIdToInstances_.size(); }
+
+	//! Sets a geometry of an object in a specific slice
+	virtual bool setGeometry(const string& object_id, GeometryType& geom, const int& slice = -1);
+
+	//! Sets a geometry of an object in a specific time and slice
+	virtual bool setGeometry(const string& object_id, GeometryType& geom, TimeType& time,  const int& slice = -1);
+
+	//! Gets the geometry of an object in a specific slice 
+	virtual bool getGeometry(const string& object_id, GeometryType& geom, const int& slice = -1);
+
+	//! Gets the geometry of an object in a specific time and slice
+	virtual bool getGeometry(const string& object_id, GeometryType& geom, TimeType& time, const int& slice = -1);
+
+	//! Gets a vector of attributes or properties of a object that is valid in a slice 
+	virtual bool getPropertyVector (const string& object_id, TePropertyVector& propVec, const int& slice = -1);
+
+	//! Gets a vector of attributes or properties of a object that is valid in a time and slice
+	virtual bool getPropertyVector (const string& object_id, TePropertyVector& propVec, TimeType& time, const int& slice = -1);
+
+	//! Sets a vector of attribute values of a object that is valid in a slice 
+	virtual bool setProperties (const string& object_id, const vector<string>& values, const int& slice = -1);
+
+	//! Sets a vector of attribute values of a object that is valid in a time and slice
+	virtual bool setProperties (const string& object_id, const vector<string>& values, TimeType& time, const int& slice = -1);
+	
+	//! Gets a vector of attribute values of a object that is valid in a slice 
+	virtual bool getProperties (const string& object_id, vector<string>& values, const int& slice = -1);
+
+	//! Gets a vector of attribute values of a object that is valid in a time and slice
+	virtual bool getProperties (const string& object_id, vector<string>& values, TimeType& time, const int& slice = -1);
+
+	//! Sets the value of the attribute named "attr_name" of an object that is valid in a slice 
+	virtual bool setAttributeValue (const string& object_id, const string& attr_name,  const string& val, const int& slice = -1);
+
+	//! Sets the value of the attribute named "attr_name" of an object that is valid in a time and slice
+	virtual bool setAttributeValue (const string& object_id, const string& attr_name,  const string& val, TimeType& time, const int& slice = -1);
+
+	//! Sets the value of the i-th attribute of an object that is valid in a slice 
+	virtual bool setAttributeValue (const string& object_id, const int& i, const string& val, const int& slice = -1); 
+
+	//! Sets the value of the i-th attribute of an object that is valid in a time and slice
+	virtual bool setAttributeValue (const string& object_id, const int& i, const string& val, TimeType& time, const int& slice = -1); 
+	
+	//! Get the value of the attribute named "attr_name" of an object that is valid in a slice 
+	virtual bool getAttributeValue (const string& object_id, const string& attr_name,  string& val, const int& slice = -1);
+
+	//! Get the value of the attribute named "attr_name" of an object that is valid in a time and slice
+	virtual bool getAttributeValue (const string& object_id, const string& attr_name,  string& val, TimeType& time, const int& slice = -1);
+
+	//! Gets the value of the i-th attribute of an object that is valid in a slice 
+	virtual bool getAttributeValue (const string& object_id, const int& i, string& val, const int& slice = -1); 
+
+	//! Gets the value of the i-th attribute of an object that is valid in a time and slice
+	virtual bool getAttributeValue (const string& object_id, const int& i, string& val, TimeType& time, const int& slice = -1); 
+
+	//! Adds a new attribute in the attribute list and adds it in all instances in the set using a default value
+	virtual bool addProperty(TeAttributeRep& attr, const string& defaultValue);
+
+	//! Adds a new attribute only in the attribute list
+	virtual bool addProperty(TeAttribute& attr);
+
+	/*!
+		\brief Adds the property or sets its value in the object in a valid slice.
+
+		If there is already the property in the attribute list, sets the value of the instances of an object  
+		valid in a specific slice. If there is no this property in the attribute list, adds it in the attribute
+		list and in all instances in the set. After that, sets the value of the instances of an object  
+		valid in a specific slice.
+	*/
+	virtual bool addProperty(const string& object_id, TeProperty& prop, const int& slice=-1);
+
+	/*!
+		\brief Adds the property or sets its value in the object in a valid time and slice.
+
+		If there is already the property in the attribute list, sets the value of the instances of an object  
+		valid in a specific time and slice. If there is no this property in the attribute list, adds it in the attribute
+		list and in all instances in the set. After that, sets the value of the instances of an object  
+		valid in a specific time and slice.
+	*/
+	virtual bool addProperty(const string& object_id, TeProperty& prop, TimeType& time, const int& slice = -1);
+
+	//! Removes an attribute of the attribute list and removes it of all instances in the set 
+	virtual void removeProperty(TeAttributeRep& attr);
+
+	//! Calculates the bounding box of all instances of all objects included in the set
+	virtual TeBox& getBox();
+
+	//! Sets the bounding box of all instances of all objects included in the set
+	virtual void setBox(TeBox& b)
+	{	box_ = b; }
+
+	//! Clears the set 
+	virtual void clear();  
+		
+	//! Returns an iterator to the first element of the set
+	virtual iterator begin()
+	{	return instances_.begin(); }
+	
+	//! Returns an iterator to the one past last element of the set
+	virtual iterator end()
+	{	return instances_.end(); }
+
+	//! Searchs the instances which bounding boxes intersect a specific bounding box, using the R Tree.
+	virtual bool search(const TeBox& b, vector<InstanceType* >& result);
+
+	//! Fills the ST instance set from a layer or theme, using the given filled parameters
+	virtual bool build(bool loadGeometries=false, bool loadAllAttributes=true, vector<string> attrNames=vector<string>(), int slide=-1); 
+
+	//! Fills the ST instance set from a layer or theme, using the given filled parameters
+	virtual bool build(TeGroupingAttr& groupAttr, bool loadGeometries=false, int slide=-1); 
+
+	
+	/*! \class propertyIterator
+		\brief This class implements an iterator concept over the instance set.
+		
+		A structure that allows the traversal ST element set
+		in a similar way as the STL iterators. This iterator passes over each 
+		ST instance of the ST element set and returns a specific numerical property.
+	*/
+	class propertyIterator
+	{
+		public:
+			//! Constructor
+			propertyIterator (TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>* setIt,
+				typename std::vector<InstanceType>::iterator it,  
+				const string& attrName):
+				attrName_(attrName), attrIndex_(-1), it_(it), setIt_(setIt)
+				{
+					attrIndex_ = setIt_->getAttributeIndex(attrName);
+				}
+
+			//! Constructor
+			propertyIterator (TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>* setIt,
+				typename std::vector<InstanceType>::iterator it,
+				const int& attrIndex):
+				attrName_ (""), attrIndex_(attrIndex), it_(it), setIt_(setIt)
+				{ }
+
+			//! Constructor
+			propertyIterator (typename vector<InstanceType>::iterator it,
+				const int& attrIndex):
+				attrName_ (""), attrIndex_(attrIndex), it_(it)
+				{}
+		
+			//! Moves to the next attribute in the set
+			propertyIterator& operator++()
+			{	
+				++it_;
+				return (*this);
+			}
+
+			//! Returns the current attribute as double
+			double operator*()
+			{	return (*it_)[attrIndex_]; 	}
+			
+			//! Sets a new value to the attrIndex_-th attribute of the element pointed by the iterator
+			void setValue(const double& val)
+			{	it_->setPropertyValue(attrIndex_, Te2String(val)); }
+
+			//! Returns a pointer to the instance set 
+			TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>* elemSet()
+			{	return setIt_; 	}
+
+			//! Equal operator
+			bool operator==(const propertyIterator& rhs) const
+			{	return (this->attrIndex_ == rhs.attrIndex_ && this->it_== rhs.it_); }
+
+			//! Unequal operator
+			bool operator!=(const propertyIterator& rhs) const
+			{	return (this->attrIndex_ != rhs.attrIndex_ || this->it_!= rhs.it_);	}
+
+			//! Deprecated: Returns the numerical property of the current instance.
+			bool getProperty(TeProperty& prop)
+			{	return (*it_).getProperty(prop, attrIndex_); }
+				
+		protected:
+			string										attrName_;	//<! the numerical property name
+			int											attrIndex_;	//<! the numerical property index
+			typename vector<InstanceType>::iterator		it_; 
+			TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>* setIt_; 
+
+	};
+
+	//! Returns a property iterator to the attribute named "attName" of the first instance in the set.
+	propertyIterator begin(const string& attName)
+	{
+		return propertyIterator(this, instances_.begin(), attName); 
+	}
+
+	//! Returns a property iterator to the attIndex-th attribute of the first instance in the set.
+	propertyIterator begin(const int& attIndex)
+	{
+		return propertyIterator(this, instances_.begin(), attIndex); 
+	}
+
+	//! Returns a property iterator to the attribute named "attName" of the one past last element of the set
+	propertyIterator end(const string& attName)
+	{
+		return propertyIterator(this, instances_.end(), attName); 
+	}
+
+	//! Returns a property iterator to the attIndex-th attribute of the one past last element of the set
+	propertyIterator end(const int& attIndex)
+	{
+		return propertyIterator(this, instances_.end(), attIndex); 
+	}
+};
+
+template<typename GeometryType, typename TimeType, typename InstanceType>
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::TeBaseSTInstanceSet() :
+	  theme_(0),  layer_(0), rTree_(0)
+{ 
+	TeAttributeList* att = new TeAttributeList();
+	attrList_ = TeSharedPtr<TeAttributeList>(att);
+}
+
+
+template<typename GeometryType, typename TimeType, typename InstanceType>
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::TeBaseSTInstanceSet(TeTheme* theme, const TeAttributeList& attrList) 
+{
+	layer_ = 0;
+	theme_ = 0;
+	rTree_ = 0;
+	TeAttributeList* att = new TeAttributeList(attrList);
+	attrList_ = TeSharedPtr<TeAttributeList>(att);
+	if(!theme)
+		return;
+	theme_ = theme;
+	rTree_ = new TeSAM::TeRTree<int>(theme_->box());
+}
+
+template<typename GeometryType, typename TimeType, typename InstanceType>
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::TeBaseSTInstanceSet(TeLayer* layer, const TeAttributeList& attrList) 
+{
+	layer_ = 0;
+	theme_ = 0;
+	rTree_ = 0;
+	TeAttributeList* att = new TeAttributeList(attrList);
+	attrList_ = TeSharedPtr<TeAttributeList>(att);
+	if(!layer)
+		return;
+	layer_ = layer;
+	rTree_ = new TeSAM::TeRTree<int>(layer_->box());
+}
+
+
+template<typename GeometryType, typename TimeType, typename InstanceType>
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::TeBaseSTInstanceSet(const TeBox& box, const TeAttributeList& attrList)
+{
+	layer_ = 0;
+	theme_ = 0;
+	rTree_ = 0;
+	box_ = box;
+	TeAttributeList* att = new TeAttributeList(attrList);
+	attrList_ = TeSharedPtr< TeAttributeList >(att);
+	if(!box_.isValid())
+		return;
+	rTree_ = new TeSAM::TeRTree<int>(box);
+}
+
+template<typename GeometryType, typename TimeType, typename InstanceType>
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::TeBaseSTInstanceSet(const TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>& other) 
+{
+	instances_ = other.instances_;		
+	minTime_ = other.minTime_;
+	maxTime_ = other.maxTime_;
+	attrList_ = other.attrList_;
+	theme_ = other.theme_;	
+	layer_ = other.layer_;	
+	box_ = other.box_;
+	objectIdToInstances_ = other.objectIdToInstances_;
+	timeToInstances_ = other.timeToInstances_;
+	sliceToInstances_ = other.sliceToInstances_;
+	rTree_ = 0;
+		
+	if(other.rTree_)
+	{
+		//Operador de copia nao implementado!
+		//rTree_ = new TeSAM::TeRTree<int>(other.rTree_->getBox());
+		//*rTree_ = *other.rTree_; 
+	}
+}
+
+template<typename GeometryType, typename TimeType, typename InstanceType>
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::~TeBaseSTInstanceSet() 
+{
+	if(rTree_)
+		delete rTree_;
+}
+
+template<typename GeometryType, typename TimeType, typename InstanceType> TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>& 
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::operator= (const TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>& other)
+{
+	if ( this != &other )
+	{
+		instances_ = other.instances_;		
+		minTime_ = other.minTime_;
+		maxTime_ = other.maxTime_;
+		attrList_ = other.attrList_;
+		theme_ = other.theme_;	
+		layer_ = other.layer_;	
+		box_ = other.box_;
+		objectIdToInstances_ = other.objectIdToInstances_;
+		timeToInstances_ = other.timeToInstances_;
+		sliceToInstances_ = other.sliceToInstances_;
+		if(rTree_)
+			delete rTree_;
+		rTree_ = 0;
+		
+		if(other.rTree_)
+		{
+			//Operador de copia nao implementado!
+			//rTree_ = new TeSAM::TeRTree<int>(other.rTree_->getBox());
+			//*rTree_ = *other.rTree_; 
+		}
+	}
+	return *this;
+}
+
+template<typename GeometryType, typename TimeType, typename InstanceType> void 
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::setAttributeList(TeAttributeList& attrs)
+{	
+	if(!attrList_.isActive())
+		return;
+	
+	attrList_->clear();
+	TeAttributeList::iterator it = attrs.begin();
+	while(it!=attrs.end())
+	{
+		attrList_->push_back(*it);
+		++it;
+	}
+}
+
+template<typename GeometryType, typename TimeType, typename InstanceType> int
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::getAttributeIndex(const string& attrName) 
+{
+	string newName = TeConvertToUpperCase(attrName); 
+	size_t pos = newName.find(".", 0, 1);
+	if (pos != string::npos)
+		newName = TeConvertToUpperCase(attrName.substr(pos+1));
+	
+	for(unsigned int i=0; i<attrList_->size(); ++i)
+	{
+		string s = TeConvertToUpperCase((*attrList_)[i].rep_.name_); 
+		if((s == TeConvertToUpperCase(attrName)) || (s == newName))
+			return i;
+	}
+	return -1;
+}
+
+
+
+template<typename GeometryType, typename TimeType, typename InstanceType> InstanceType* 
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::getSTInstance(const unsigned int& index)
+{
+	if(index<instances_.size())
+		return &(instances_[index]);
+
+	return 0;
+}
+
+template<typename GeometryType, typename TimeType, typename InstanceType> InstanceType* 
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::getSTInstance(const string& objectId, const int& slice)
+{
+	map<string, vector<int> >::iterator itObj = objectIdToInstances_.find(objectId);
+	if(itObj==objectIdToInstances_.end())
+		return 0;
+
+	if(slice<0)
+	{
+		//The slice is not considered
+		vector<int>::iterator it = itObj->second.begin();
+		if(it==itObj->second.end())
+			return 0;
+		return getSTInstance(*it);
+	}
+
+	map<int, vector<int> >::iterator itSlice = sliceToInstances_.find(slice);
+	if(itSlice==sliceToInstances_.end())
+		return 0;
+
+	vector<int>::iterator it = itObj->second.begin();
+	while(it != itObj->second.end())
+	{
+		vector<int>::iterator it2;
+		it2 = find(itSlice->second.begin(), itSlice->second.end(), *it);
+		if(it2!=itSlice->second.end())
+			return getSTInstance(*it2);
+		++it;
+	}
+	return 0;		
+}
+
+template<typename GeometryType, typename TimeType, typename InstanceType> InstanceType* 
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::getSTInstance(const string& objectId, TimeType& time, const int& slice)
+{
+	map<string, vector<int> >::iterator itObj = objectIdToInstances_.find(objectId);
+	if(itObj==objectIdToInstances_.end())
+		return 0;
+
+	typename map<TimeType, vector<int> >::iterator itTime = timeToInstances_.find(time);
+	if(itTime==timeToInstances_.end())
+		return 0;
+	
+	if(slice<0)
+	{
+		//The slice is not considered
+		vector<int>::iterator it = itObj->second.begin();
+		while(it != itObj->second.end())
+		{
+			vector<int>::iterator it2;
+			it2 = find(itTime->second.begin(), itTime->second.end(), *it);
+			if(it2!=itTime->second.end())
+				return getSTInstance(*it2);
+			++it;
+		}
+		return 0;
+	}
+	
+	map<int, vector<int> >::iterator itSlice = sliceToInstances_.find(slice);
+	if(itSlice==sliceToInstances_.end())
+		return 0;
+
+	vector<int>::iterator it = itObj->second.begin();
+	while(it != itObj->second.end())
+	{
+		vector<int>::iterator it2, it3;
+		it2 = find(itTime->second.begin(), itTime->second.end(), *it);
+		it3 = find(itSlice->second.begin(), itSlice->second.end(), *it);
+		if((it2!=itTime->second.end()) && (it3!=itSlice->second.end()))
+			return getSTInstance(*it2);
+		++it;
+	}
+	return 0;
+}
+
+template<typename GeometryType, typename TimeType, typename InstanceType> void
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::getSTInstances(vector<InstanceType* >& set, const string& objectId, const int& slice)
+{
+	set.clear();
+	map<string, vector<int> >::iterator itObj = objectIdToInstances_.find(objectId);
+	if(itObj==objectIdToInstances_.end())
+		return;
+
+	vector<int>::iterator it = itObj->second.begin();
+	while(it != itObj->second.end())
+	{
+		InstanceType* inst = getSTInstance(*it);
+		if((slice<0) || (inst->getSlice()==slice))
+			set.push_back(inst);
+		++it;
+	}
+	return;
+}
+
+template<typename GeometryType, typename TimeType, typename InstanceType> void
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::getSTInstances(vector<InstanceType* >& set, const string& objectId, TimeType& time, const int& slice)
+{
+	set.clear();
+	map<string, vector<int> >::iterator itObj = objectIdToInstances_.find(objectId);
+	if(itObj==objectIdToInstances_.end())
+		return;
+
+	vector<int>::iterator it = itObj->second.begin();
+	while(it != itObj->second.end())
+	{
+		InstanceType* inst = getSTInstance(*it);
+		if(((slice<0) || (inst->getSlice()==slice)) && (inst->getTime()== time))
+			set.push_back(inst);
+		++it;
+	}
+	return;
+}
+	
+template<typename GeometryType, typename TimeType, typename InstanceType> void
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::getSTInstances(vector<InstanceType* >& set, TimeType& time, const int& slice)
+{
+	set.clear();
+	typename map<TimeType, vector<int> >::iterator itTime = timeToInstances_.find(time);
+	if(itTime==timeToInstances_.end())
+		return;
+
+	vector<int>::iterator it = itTime->second.begin();
+	while(it != itTime->second.end())
+	{
+		InstanceType* inst = getSTInstance(*it);
+		if((slice<0) || (inst->getSlice()==slice))
+			set.push_back(inst);
+		++it;
+	}
+	return;
+
+}
+
+template<typename GeometryType, typename TimeType, typename InstanceType> void
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::getSTInstances(vector<InstanceType* >& set, const int& slice)
+{
+	set.clear();
+	map<int, vector<int> >::iterator itSlice = sliceToInstances_.find(slice);
+	if(itSlice==sliceToInstances_.end())
+		return;
+
+	vector<int>::iterator it = itSlice->second.begin();
+	while(it != itSlice->second.end())
+	{
+		set.push_back(getSTInstance(*it));
+		++it;
+	}
+	return;
+}
+
+template<typename GeometryType, typename TimeType, typename InstanceType> bool 
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::insertSTInstance (InstanceType& inst)
+{
+	inst.setAttrList(attrList_);
+	instances_.push_back(inst);
+	int index = (instances_.size()-1);
+	vector<int> aux;
+	aux.push_back(index);
+	
+	//object identity information
+	map<string, vector<int> >::iterator itObj = objectIdToInstances_.find(inst.getObjectId());
+	if(itObj!=objectIdToInstances_.end())
+		itObj->second.push_back(index);
+	else
+		objectIdToInstances_[inst.getObjectId()] = aux;
+
+	//time information
+	if(inst.isTimeValid())
+	{
+		typename map<TimeType, vector<int> >::iterator itTime = timeToInstances_.find(inst.getTime());
+		if(itTime!=timeToInstances_.end())
+			itTime->second.push_back(index);
+		else
+			timeToInstances_[inst.getTime()] = aux;
+	}
+
+	//slice information
+	if(inst.getSlice()>=0)
+	{
+		map<int, vector<int> >::iterator itSlice = sliceToInstances_.find(inst.getSlice());
+		if(itSlice!=sliceToInstances_.end())
+			itSlice->second.push_back(index);
+		else
+			sliceToInstances_[inst.getSlice()] = aux;
+	}
+	
+	//insert in the RTree
+	TeBox b = inst.getGeometries().box();
+	if(b.isValid())
+	{
+		if(rTree_)
+			rTree_->insert(b, index);
+		updateBox(box_, b);
+	}
+	return true;
+}
+
+template<typename GeometryType, typename TimeType, typename InstanceType> int 
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::numSTInstance()
+{
+	return instances_.size();
+}
+		
+template<typename GeometryType, typename TimeType, typename InstanceType> int 
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::numSTInstance(const string& objectId)
+{
+	map<string, vector<int> >::iterator it = objectIdToInstances_.find(objectId);
+	if(it==objectIdToInstances_.end())
+		return 0;
+	return it->second.size();
+
+}
+
+template<typename GeometryType, typename TimeType, typename InstanceType> int 
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::numSTInstance(const int& slice)
+{
+	map<int, vector<int> >::iterator it = sliceToInstances_.find(slice);
+	if(it==sliceToInstances_.end())
+		return 0;
+	return it->second.size();
+}
+
+template<typename GeometryType, typename TimeType, typename InstanceType> int 
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::numSTInstance(TimeType& time)
+{
+	typename map<TimeType, vector<int> >::iterator it = timeToInstances_.find(time);
+	if(it==timeToInstances_.end())
+		return 0;
+	return it->second.size();
+}
+
+template<typename GeometryType, typename TimeType, typename InstanceType> bool 
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::setGeometry(const string& object_id, GeometryType& geom, const int& slice)
+{
+	InstanceType* aux = this->getSTInstance(object_id, slice);
+	if(!aux)
+		return false;
+	aux->setGeometry(geom);
+	return true;
+}
+
+template<typename GeometryType, typename TimeType, typename InstanceType> bool 
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::setGeometry(const string& object_id, GeometryType& geom, TimeType& time, const int& slice)
+{
+	InstanceType* aux = this->getSTInstance(object_id, time, slice);
+	if(!aux)
+		return false;
+	aux->setGeometry(geom);
+	return true;
+}
+
+template<typename GeometryType, typename TimeType, typename InstanceType> bool 
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::getGeometry(const string& object_id, GeometryType& geom, const int& slice)
+{
+	InstanceType* aux = this->getSTInstance(object_id, slice);
+	if(!aux)
+		return false;
+	geom = aux->getGeometries(); 
+	return true;
+
+}
+
+template<typename GeometryType, typename TimeType, typename InstanceType> bool 
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::getGeometry(const string& object_id, GeometryType& geom, TimeType& time, const int& slice)
+{
+	InstanceType* aux = this->getSTInstance(object_id, time, slice);
+	if(!aux)
+		return false;
+	geom = aux->getGeometries(); 
+	return true;
+}
+
+
+template<typename GeometryType, typename TimeType, typename InstanceType> bool 
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::getPropertyVector (const string& object_id, TePropertyVector& propVec, const int& slice)
+{
+	propVec.clear();
+	InstanceType* aux = this->getSTInstance(object_id, slice);
+	if(!aux)
+		return false;
+	
+	for(unsigned int i=0; i<aux->getProperties().size(); ++i)
+	{
+		TeProperty prop;
+		prop.value_ = aux->getProperties()[i];
+		if(i<attrList_->size())
+			prop.attr_ = (*attrList_)[i];
+		propVec.push_back(prop);
+	}
+	return true;
+}
+
+template<typename GeometryType, typename TimeType, typename InstanceType> bool 
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::getPropertyVector (const string& object_id, 
+	TePropertyVector& propVec, TimeType& time, const int& slice)
+{
+	propVec.clear();
+	InstanceType* aux = this->getSTInstance(object_id, time, slice);
+	if(!aux)
+		return false;
+	
+	for(unsigned int i=0; i<aux->getProperties().size(); ++i)
+	{
+		TeProperty prop;
+		prop.value_ = aux->getProperties()[i];
+		if(i<attrList_->size())
+			prop.attr_ = (*attrList_)[i];
+		propVec.push_back(prop);
+	}
+	return true;
+
+}
+
+template<typename GeometryType, typename TimeType, typename InstanceType> bool 
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::setProperties (const string& object_id, const vector<string>& values, const int& slice)
+{
+	//the number of attributes in each instance must be equal to the number of attibutes
+	//in the attribute list. 
+	if(values.size() != attrList_->size())
+		return false;
+
+	InstanceType* aux = this->getSTInstance(object_id, slice);
+	if(!aux)
+		return false;
+	aux->setProperties(values);
+	return true;
+}
+
+template<typename GeometryType, typename TimeType, typename InstanceType> bool 
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::setProperties (const string& object_id, const vector<string>& values, TimeType& time, const int& slice)
+{
+	//the number of attributes in each instance must be equal to the number of attibutes
+	//in the attribute list. 
+	if(values.size() != attrList_->size())
+		return false;
+
+	InstanceType* aux = this->getSTInstance(object_id, time, slice);
+	if(!aux)
+		return false;
+	aux->setProperties(values);
+	return true;
+}
+
+template<typename GeometryType, typename TimeType, typename InstanceType> bool 
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::getProperties (const string& object_id, vector<string>& values, const int& slice)
+{
+	values.clear();
+	InstanceType* aux = this->getSTInstance(object_id, slice);
+	if(!aux)
+		return false;
+	values = aux->getProperties();
+	return true;
+}
+
+template<typename GeometryType, typename TimeType, typename InstanceType> bool 
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::getProperties (const string& object_id, vector<string>& values, TimeType& time, const int& slice)
+{
+	values.clear();
+	InstanceType* aux = this->getSTInstance(object_id, time, slice);
+	if(!aux)
+		return false;
+	values = aux->getProperties();
+	return true;
+}
+
+template<typename GeometryType, typename TimeType, typename InstanceType> bool 
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::setAttributeValue (const string& object_id, const string& attr_name,  const string& val, const int& slice)
+{
+	int index = this->getAttributeIndex(attr_name);
+	return this->setAttributeValue(object_id, index, val, slice);
+}
+
+template<typename GeometryType, typename TimeType, typename InstanceType> bool 
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::setAttributeValue (const string& object_id, const string& attr_name, const string& val, TimeType& time, const int& slice)
+{
+	int index = this->getAttributeIndex(attr_name);
+	return this->setAttributeValue(object_id, index, val, time, slice);
+}
+
+template<typename GeometryType, typename TimeType, typename InstanceType> bool 
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::setAttributeValue (const string& object_id, const int& i, const string& val, const int& slice)
+{
+	if(i<0 || i>=(int)attrList_->size()) //if there is not this attribute, return false 
+		return false;
+	InstanceType* aux = this->getSTInstance(object_id, slice);
+	if(!aux)
+		return false;
+	aux->setPropertyValue(i, val); 
+	return true;
+}
+
+template<typename GeometryType, typename TimeType, typename InstanceType> bool 
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::setAttributeValue (const string& object_id, const int& i, const string& val, TimeType& time, const int& slice)
+{
+	if(i<0 || i>=(int)attrList_->size()) //if there is not this attribute, return false 
+		return false;
+	InstanceType* aux = this->getSTInstance(object_id, time, slice);
+	if(!aux)
+		return false;
+	aux->setPropertyValue(i, val); 
+	return true;
+}
+
+template<typename GeometryType, typename TimeType, typename InstanceType> bool 
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::getAttributeValue (const string& object_id, const string& attr_name,  string& val, const int& slice)
+{
+	int index = this->getAttributeIndex(attr_name);
+	return this->getAttributeValue(object_id, index, val, slice);
+}
+
+template<typename GeometryType, typename TimeType, typename InstanceType> bool 
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::getAttributeValue (const string& object_id, const string& attr_name,  string& val, TimeType& time, const int& slice)
+{
+	int index = this->getAttributeIndex(attr_name);
+	return this->getAttributeValue(object_id, index, val, time, slice);
+}
+
+template<typename GeometryType, typename TimeType, typename InstanceType> bool 
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::getAttributeValue (const string& object_id, const int& i, string& val, const int& slice)
+{
+	if(i<0 || i>=(int)attrList_->size())
+		return false;
+	InstanceType* aux = this->getSTInstance(object_id, slice);
+	if(!aux)
+		return false;
+	val = aux->getProperties()[i];
+	return true;
+}
+
+template<typename GeometryType, typename TimeType, typename InstanceType> bool 
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::getAttributeValue (const string& object_id, const int& i, string& val, TimeType& time, const int& slice)
+{
+	if(i<0 || i>=(int)attrList_->size())
+		return false;
+	InstanceType* aux = this->getSTInstance(object_id, time, slice);
+	if(!aux)
+		return false;
+	val = aux->getProperties()[i];
+	return true;
+}
+
+template<typename GeometryType, typename TimeType, typename InstanceType> bool
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::addProperty(TeAttributeRep& attr, const string& defaultValue)
+{
+	//verify if there is this attribute
+	if(getAttributeIndex(attr.name_)>=0) 
+		return true;
+
+	TeAttribute at;
+	at.rep_ = attr;
+	attrList_->push_back(at);
+	typename vector<InstanceType>::iterator it = instances_.begin();	
+	
+	//the number of attributes in each instance must be equal to the number of attibutes
+	//in the attribute list.
+	if((attrList_->size()-1) != it->getProperties().size())
+		return false;
+	while(it!=instances_.end())
+	{	
+		it->addPropertyValue(defaultValue);
+		++it;
+	}
+	return true;
+}
+
+template<typename GeometryType, typename TimeType, typename InstanceType> bool
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::addProperty(TeAttribute& attr)
+{
+	//verify if there is this attribute
+	if(getAttributeIndex(attr.rep_.name_)<0) 
+		attrList_->push_back(attr);
+	return true;
+}
+
+template<typename GeometryType, typename TimeType, typename InstanceType> bool 
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::addProperty(const string& object_id, TeProperty& prop, const int& slice)
+{
+	int index = this->getAttributeIndex(prop.attr_.rep_.name_); 
+	if(index<0)
+	{
+		//adds this new attribute in the attr list and in all instances
+		attrList_->push_back(prop.attr_);
+		typename vector<InstanceType>::iterator it =	instances_.begin();		
+		while(it!=instances_.end())
+		{
+			if( (object_id == it->getObjectId()) && ((slice<0) || (slice==it->getSlice())))  
+				it->addPropertyValue(prop.value_);
+			else
+				it->addPropertyValue(string(""));
+			++it;
+		}
+		return true;
+	}
+	
+	//Sets this attribute value
+	typename vector<InstanceType>::iterator it =	instances_.begin();		
+	while(it!=instances_.end())
+	{
+		if( (object_id == it->getObjectId()) && ((slice<0) || (slice==it->getSlice())))  
+			it->setPropertyValue(index, prop.value_);
+		++it;
+	}
+	return true;
+}
+
+template<typename GeometryType, typename TimeType, typename InstanceType> bool 
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::addProperty(const string& object_id, TeProperty& prop, TimeType& time, const int& slice)
+{
+	int index = this->getAttributeIndex(prop.attr_.rep_.name_); 
+	if(index<0)
+	{
+		//adds this new attribute in the attr list and in all instances
+		attrList_->push_back(prop.attr_);
+		typename vector<InstanceType>::iterator it =	instances_.begin();		
+		while(it!=instances_.end())
+		{
+			if( (object_id == it->getObjectId()) && 
+				(time == it->getTime()) && 
+				((slice<0) || (slice==it->getSlice())))  
+				it->addPropertyValue(prop.value_);
+			else
+				it->addPropertyValue(string(""));
+			++it;
+		}
+		return true;
+	}
+	
+	//Sets this attribute value
+	typename vector<InstanceType>::iterator it =	instances_.begin();		
+	while(it!=instances_.end())
+	{
+		if( (object_id == it->getObjectId()) && 
+			(time == it->getTime()) && 
+			((slice<0) || (slice==it->getSlice())))  
+			it->setPropertyValue(index, prop.value_);
+		++it;
+	}
+	return true;
+}
+
+template<typename GeometryType, typename TimeType, typename InstanceType> void
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::removeProperty(TeAttributeRep& attr)
+{
+	//Remove of the attribute list
+	string newName = TeConvertToUpperCase(attr.name_); 
+	size_t pos = attr.name_.find(".", 0, 1);
+	if (pos != string::npos)
+		newName = TeConvertToUpperCase(attr.name_.substr(pos+1));
+	
+	unsigned int index = 0;
+	TeAttributeList::iterator it = attrList_->begin();
+	while(it!=attrList_->end())
+	{
+		string s = TeConvertToUpperCase(it->rep_.name_); 
+		if((s == TeConvertToUpperCase(attr.name_)) || (s == newName))
+		{
+			attrList_->erase(it);
+			break;
+		}
+		++it;
+		++index;
+	}
+
+	//Remove of all instances
+	typename vector<InstanceType>::iterator it2 = instances_.begin();		
+	while(it2!=instances_.end())
+	{
+		it2->removePropertyValue(index);
+		++it;
+	}
+}
+
+template<typename GeometryType, typename TimeType, typename InstanceType> TeBox& 
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::getBox()
+{
+	if(box_.isValid())
+		return box_;
+
+	if (instances_.size() <= 0)
+		return box_;
+
+	typename TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::iterator it = this->begin();
+	
+	while (it != this->end())
+	{
+		updateBox(box_,it->getGeometries().box());
+		++it;
+	}
+	return box_;
+}
+
+template<typename GeometryType, typename TimeType, typename InstanceType> void 
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::clear()
+{
+	instances_.clear();
+	attrList_->clear();
+	objectIdToInstances_.clear();
+	timeToInstances_.clear();
+	sliceToInstances_.clear();
+	if(rTree_)
+		rTree_->clear(); 
+}
+
+template<typename GeometryType, typename TimeType, typename InstanceType> bool 
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::search(const TeBox& b, vector<InstanceType* >& result)
+{
+	if(!rTree_ )
+		return false;
+
+	vector<int> intResult;
+	rTree_->search(b, intResult);
+	for(unsigned int i=0; i<intResult.size(); ++i)
+		result.push_back(getSTInstance(intResult[i])); 
+	return true;
+}
+
+template<typename GeometryType, typename TimeType, typename InstanceType> bool 
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::build(bool loadGeometries, bool loadAllAttributes, vector<string> attrNames, int slide)
+{
+	TeQuerierParams param;
+	if(theme_)
+		param.setParams(theme_);
+	else if(layer_)
+		param.setParams(layer_);
+	else
+		return false;
+
+	param.setFillParams(loadGeometries, loadAllAttributes, attrNames);
+	TeQuerier querier(param);
+	return(buildImpl(&querier, slide));
+}
+
+template<typename GeometryType, typename TimeType, typename InstanceType> bool 
+TeBaseSTInstanceSet<GeometryType, TimeType, InstanceType>::build(TeGroupingAttr& groupAttr, bool loadGeometries, int slide)
+{
+	TeQuerierParams param;
+	if(theme_)
+		param.setParams(theme_);
+	else if(layer_)
+		param.setParams(layer_);
+	else
+		return false;
+
+	param.setFillParams(loadGeometries, groupAttr);
+	TeQuerier querier(param);
+	return(buildImpl(&querier, slide));
+}
+
+
+#endif
+
diff --git a/src/terralib/kernel/TeBlockLoader.cpp b/src/terralib/kernel/TeBlockLoader.cpp
new file mode 100644
index 0000000..ef6655d
--- /dev/null
+++ b/src/terralib/kernel/TeBlockLoader.cpp
@@ -0,0 +1,171 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+
+/*
+** ----------------------------------------------------------------------------
+** Includes:
+*/
+
+#include "TeBlockLoader.h"
+
+/*
+** ----------------------------------------------------------------------------
+** Definitions:
+*/
+
+/*
+** ----------------------------------------------------------------------------
+** Methods Implementation:
+*/
+
+TeBlockLoader::TeBlockLoader(const TeBlockLoaderParams& params)
+{
+    params_ = params;
+}
+
+TeBlockLoader::~TeBlockLoader()
+{
+}
+
+bool
+TeBlockLoader::loadBlocks()
+{
+    portal_ = params_.db->getPortal();
+    portal_->freeResult();
+
+    if (!portal_)
+    {
+        return false; // Error opening portal.
+    }
+
+    // Set columns to be retrieved.
+    std::string cols;
+    if (params_.load_all_attrs)
+    {
+        cols = "*";
+    }
+    else
+    {
+        cols = "";
+        std::vector<std::string>::iterator it = params_.attrs.begin();
+        std::vector<std::string>::iterator end = params_.attrs.end();
+        while(it != end)
+        {
+            cols.append(*(it++));
+            if (it != end)
+            {
+                cols.append(", ");
+            }
+        }
+    }
+
+    // Set spatial restrictions.
+    std::string rest;
+    rest += " NOT( ";
+    rest += "lower_x > " + Te2String(params_.selection_box.x2_, 12) + " OR ";
+    rest += "upper_x < " + Te2String(params_.selection_box.x1_, 12) + " OR ";
+    rest += "lower_y > " + Te2String(params_.selection_box.y2_, 12) + " OR ";
+    rest += "upper_y < " + Te2String(params_.selection_box.y1_, 12) + " )";
+
+    // Set block id restrictions.
+    if (params_.dont_load_ids.size() > 0)
+    {
+        std::set<int>::iterator it = params_.dont_load_ids.begin();
+        std::set<int>::iterator end = params_.dont_load_ids.end();
+        while (it != end)
+        {
+            rest += " AND block_id <> " + Te2String(*(it++));
+        }
+    }
+
+    // Set other restrictions.
+    if (params_.attrs_rest.length() > 0)
+    {
+        rest += " AND (" + params_.attrs_rest + ")";
+    }
+
+    // Mount SQL query.
+    std::string sql = "SELECT " + cols + " FROM " + params_.table_name + " WHERE " + rest;
+
+    return portal_->query(sql);
+
+}
+		
+bool
+TeBlockLoader::fetchNext()
+{
+    return portal_->fetchRow();
+}
+
+int
+TeBlockLoader::getID()
+{
+    return portal_->getInt("block_id");
+}
+
+void
+TeBlockLoader::getSpatialData(unsigned char* &data, long& size)
+{
+    portal_->getBlob("spatial_data", data, size);
+}
+
+char*
+TeBlockLoader::getData(const std::string& name)
+{
+    return portal_->getData(name);
+}
+
+int
+TeBlockLoader::getInt(const std::string& name)
+{
+    return portal_->getInt(name);
+}
+
+double
+TeBlockLoader::getDouble(const std::string& name)
+{
+    return portal_->getDouble(name);
+}
+
+bool
+TeBlockLoader::getBool(const std::string& name)
+{
+    return portal_->getBool(name);
+}
+
+TeTime
+TeBlockLoader::getDate(const std::string& name)
+{
+    return portal_->getDate(name);
+}
+
+std::string
+TeBlockLoader::getDateAsString(const std::string& name)
+{
+    return portal_->getDateAsString(name);
+}
+
+/*
+** ----------------------------------------------------------------------------
+** End:
+*/
diff --git a/src/terralib/kernel/TeBlockLoader.h b/src/terralib/kernel/TeBlockLoader.h
new file mode 100644
index 0000000..e9bd718
--- /dev/null
+++ b/src/terralib/kernel/TeBlockLoader.h
@@ -0,0 +1,95 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeBlockLoader.h
+    \brief This file contains structures and definitions for loading data blocks.
+*/
+#ifndef  __TERRALIB_INTERNAL_BLOCKLOADER_H
+#define  __TERRALIB_INTERNAL_BLOCKLOADER_H
+
+/*
+** ----------------------------------------------------------------------------
+** Includes:
+*/
+#include "TeDatabase.h"
+#include "TeBox.h"
+#include "TeTime.h"
+#include <string>
+#include <vector>
+
+/*
+** ----------------------------------------------------------------------------
+** Definitions:
+*/
+
+typedef struct 
+{
+    TeDatabase* db;
+
+    std::string table_name;
+    TeBox selection_box;
+
+    bool load_all_attrs;
+	std::vector<std::string> attrs;
+    std::string attrs_rest;
+
+    std::set<int> dont_load_ids;
+	
+} TeBlockLoaderParams;
+
+class TL_DLL TeBlockLoader
+{
+public:
+
+    /// Default constructor.
+	TeBlockLoader(const TeBlockLoaderParams& params);
+
+    /// Virtual destructor.
+    virtual ~TeBlockLoader();
+
+	bool loadBlocks();
+		
+	bool fetchNext();
+
+    int getID();
+	void getSpatialData(unsigned char* &data, long& size);
+
+    char* getData(const std::string& name);
+    int getInt(const std::string& name);
+    double getDouble(const std::string& name);
+    bool getBool(const std::string& name);
+    TeTime getDate(const std::string& name);
+    std::string getDateAsString(const std::string& name);
+
+protected:
+
+    TeBlockLoaderParams params_;
+    TeDatabasePortal* portal_;
+
+};
+
+#endif // __TERRALIB_INTERNAL_BLOCKLOADER_H
+
+/*
+** ----------------------------------------------------------------------------
+** End:
+*/
\ No newline at end of file
diff --git a/src/terralib/kernel/TeBox.cpp b/src/terralib/kernel/TeBox.cpp
old mode 100644
new mode 100755
index cb62897..51dfa62
--- a/src/terralib/kernel/TeBox.cpp
+++ b/src/terralib/kernel/TeBox.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -165,7 +165,7 @@ adjustToCut(TeBox& box, double bWidth, double bHeight)
 	return TeBox(xi,yi,xf,yf);
 }
 
-TePolygon polygonFromBox( TeBox& bb )
+TePolygon polygonFromBox( const TeBox& bb )
 {
 	TePolygon poly;
 	TeLine2D line;
@@ -185,3 +185,29 @@ TePolygon polygonFromBox( TeBox& bb )
 	poly.add(ring);
 	return poly;
 }
+
+int adjustBox( TeBox& bb )
+{
+	int precision = 4;
+	double factor =  pow(10., precision);
+	double tol = 1 / factor;
+	while (( TeCompareDouble( bb.x1_, bb.x2_, precision ) == true ) || 
+		   ( TeCompareDouble( bb.y1_, bb.y2_, precision ) == true ) )
+	{
+		precision--;
+		tol = 1 / pow(10., precision);
+		if ( TeCompareDouble( bb.x1_, bb.x2_, precision ) == true )
+		{
+			bb.x1_ -= tol;
+			bb.x2_ += tol;
+		}
+		if ( TeCompareDouble( bb.y1_, bb.y2_, precision ) == true )
+		{
+			bb.y1_ -= tol;
+			bb.y2_ += tol;
+		}
+		if (precision == 0)
+			break;		
+	}
+	return precision;
+}
diff --git a/src/terralib/kernel/TeBox.h b/src/terralib/kernel/TeBox.h
old mode 100644
new mode 100755
index 5b21bd0..9c1e544
--- a/src/terralib/kernel/TeBox.h
+++ b/src/terralib/kernel/TeBox.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,15 +20,16 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeBox.h
-    This file contains structures and definitions to deal with a box
+    \brief This file contains structures and definitions to deal with a box
 */
 #ifndef  __TERRALIB_INTERNAL_BOX_H
 #define  __TERRALIB_INTERNAL_BOX_H
 
+#include "TeDefines.h"
 #include "TeCoord2D.h"
 #include "TeDefines.h"
+#include "float.h"
 
 class TeGeometry;
 class TePolygon;
@@ -38,7 +39,7 @@ class TePolygon;
  \sa
 	TeCoord2D
  */
-struct TeBox {
+struct TL_DLL TeBox {
 
 	enum TeBoxCorner { TeLOWERLEFT=0, TeUPPERLEFT=1, TeLOWERRIGHT=2, TeUPPERRIGHT=3 };
 
@@ -94,6 +95,12 @@ struct TeBox {
 			&& ( fabs (y2_ - box.y2_) < TePrecision::instance().precision() ) 
 			&& ( fabs (x2_ - box.x2_) < TePrecision::instance().precision() ) 
 			); }
+      
+//! Returns FALSE if current TeBox is equal to box; otherwise returns TRUE 
+  bool operator!= (const TeBox& box) const
+  {
+    return ( ! operator==( box ) );
+  }      
 
 //! Returns the coordinate corresponding to the geometric center of the  box
 	TeCoord2D center() const
@@ -109,23 +116,25 @@ struct TeBox {
 		    x2_ == -TeMAXFLOAT || y2_ == -TeMAXFLOAT  ||
 			x1_ > x2_ || y1_ > y2_)
 			return false;
+		if( TeISNAN(x1_) || TeISNAN(y1_) || TeISNAN(x2_) || TeISNAN(y2_))
+			return false;
 		return true;
 	}
 
 //! Returns the x component of the lower left corner
-	double x1 () const 
+	const double& x1 () const 
 	{ return x1_;}
 
 //! Returns the y component of the lower left corner
-	double y1 () const 
+	const double& y1 () const 
 	{ return y1_;}
 
 //! Returns the x component of the upper right corner
-	double x2 () const 
+	const double& x2 () const 
 	{ return x2_;}
 
 //! Returns the y component of the upper right corner
-	double y2 () const 
+	const double& y2 () const 
 	{ return y2_;}
 
 //! Returns the box width 
@@ -159,17 +168,17 @@ struct TeBox {
 /*! \fn void updateBox void updateBox ( TeBox& box, const TeCoord2D& pt ) 
    \brief update a box to include a coordinate
  */
-void updateBox ( TeBox& box, const TeCoord2D& pt );  
+TL_DLL void updateBox ( TeBox& box, const TeCoord2D& pt );  
 
 /*! \fn void updateBox void updateBox ( TeBox& box, const TeBox& other ) 
    \brief update a box to include another box
  */
-void updateBox ( TeBox& box, const TeBox& other );
+TL_DLL void updateBox ( TeBox& box, const TeBox& other );
 
 /*! \fn void updateBox ( TeBox& box, const TeGeometry& geo ) 
    \brief update a box to include a geometry
  */
-void updateBox ( TeBox& box, const TeGeometry& geo );
+TL_DLL void updateBox ( TeBox& box, const TeGeometry& geo );
 
 
 // ZOOMING FUNCTIONS 
@@ -177,27 +186,32 @@ void updateBox ( TeBox& box, const TeGeometry& geo );
 /*! \fn void zoomIn void zoomIn ( TeBox& box, double t = .8) 
    \brief increases the box by a factor t
  */
-void zoomIn ( TeBox& box, double t = .8); 
+TL_DLL void zoomIn ( TeBox& box, double t = .8); 
 
 /*! \fn  void zoomOut void zoomOut ( TeBox& box, double t = .8) 
    \brief decreases box by a factor of t
  */
-void zoomOut ( TeBox& box, double t = .8);
+TL_DLL void zoomOut ( TeBox& box, double t = .8);
  
 /*! \fn  TeBox makeBox(double x1, double y1, double x2, double y2, const double& tol = 0.0) 
    \brief builds a box 
  */
-TeBox makeBox(double x1, double y1, double x2, double y2, const double& tol = 0.0);
+TL_DLL TeBox makeBox(double x1, double y1, double x2, double y2, const double& tol = 0.0);
 
 /*! \fn  TeBox adjustToCut(TeBox& box, double bWidth, double bHeight) 
    \brief finds the correspondent smallest box that allows a box to be cut in blocks of a given size 
  */
-TeBox adjustToCut(TeBox& box, double bWidth, double bHeight);
+TL_DLL TeBox adjustToCut(TeBox& box, double bWidth, double bHeight);
 
 /*! \fn TePolygon polygonFromBox(TeBox& bb) 
    \brief builds a TePolygon geometry from a box
  */
-TePolygon polygonFromBox( TeBox& bb );
+TL_DLL TePolygon polygonFromBox( const TeBox& bb );
+
+/*! \fn  TeBox adjust()
+\brief Expands the box when has not width or height. Returns the precision level needed.
+*/
+TL_DLL int adjustBox( TeBox& bb );
 
 #endif
 
diff --git a/src/terralib/kernel/TeBufferRegion.cpp b/src/terralib/kernel/TeBufferRegion.cpp
old mode 100644
new mode 100755
index 4d14452..ed3a73b
--- a/src/terralib/kernel/TeBufferRegion.cpp
+++ b/src/terralib/kernel/TeBufferRegion.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -21,6 +21,11 @@ indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
 
+/*
+   TODO: 1. tentar otimizar as rotinas auxilixares (elementares) de forma que o sentido do segmento nao seja importante
+            e que possamos garantir a orientacao da linha que iremos tracar ao redor de um segmento de reta (acabar dom didswap!)
+*/
+
 #include "TeBufferRegion.h"
 #include "TeOverlay.h"
 #include "TeGeometry.h" 
@@ -36,171 +41,1033 @@ namespace TeBUFFERREGION
 {
 
 //---------------- Auxiliary Constants ----------------//
-const double pi      = 3.14159265358979323846;
+const double bufferPI       = 3.14159265358979323846;
+const double doubleBufferPI = 6.28318530717958647692;
+const double halfBufferPI   = 1.57079632679489661923;
 
 //---------------- Auxiliary Functions ----------------//
-// A partir de dois pontos, gera um pol�gono no sentido anti-hor�rio
-void TeGenerateBufferPolygon(TeCoord2D first, TeCoord2D last, const double& bufferDistance, const short& numPoints, TePolygon& pol)
+
+/** Rotina auxiliar que define o angulo inicial utilizado para tracar o buffer ao redor de um segmento de reta (rotina de uso interno - nao deve ser utilizada diretamente).
+		\param first	primeiro ponto que define o segmento de reta: a rotina pode inverter seu conteudo com o parametro "last"
+		\param last		segundo ponto que define o segmento de reta: a rotina pode inverter seu conteudo com o parametro "first"
+		\param ang		angulo que define uma linha perpendicular ao segmento passando pela coordenada first
+		\param didswap	indica se as coordenadas first e last foram trocadas (se foi realizado o swap delas)
+		\note As coordenadas first e last devem ser necessariamente diferentes.
+  */
+inline void TeFindInitialAng(TeCoord2D& first, TeCoord2D& last, double& ang, bool& didswap)
 {
 	double xLength  = 0.0;
-	double yLength  = 0.0;
-	double x        = 0.0;
-	double y        = 0.0;
 	double val_ang  = 0.0;
-	double ang		= 0.0;
-
-	TeLine2D contourLine;
-
-	if(TeGeometryAlgorithmsPrecision::IsGreater(first.x(), last.x()))
+	
+	if(first.x_ > last.x_)
+	{
 	    swap(first, last);
-	else
-		if(TeGeometryAlgorithmsPrecision::IsEqual(first.x(), last.x()))
+		didswap = true;
+	}
+	else if(first.x_ == last.x_)
+	{
+		if(first.y_ < last.y_)
 		{
-			if(TeGeometryAlgorithmsPrecision::IsSmaller(first.y(), last.y()))
-				swap(first, last);
+			swap(first, last);
+			didswap = true;
 		}
+	}
 
+// cumprimeto do segmento ao longo do eixo "x"
+	xLength = last.x_ - first.x_;
 
-	xLength = last.x() - first.x();
-
-	if(first.y() < last.y())
-		yLength = last.y() - first.y();
-	else
-		yLength = first.y() - last.y();
-
+// cumprimento do segmento 
 	double segmentLength = TeDistance(first, last);
 
+// inclinacao do segmento
 	val_ang = xLength / segmentLength;
 
-	if(val_ang > 1.0)
+	if(val_ang > 1.0)	// erros de arredondamento podem definir um valor um "pouco" maior que 1, e nesse caso arredondamos para 1.
+	{
 		val_ang = 1.0;
-	else
-		if(val_ang < -1.0)
-			val_ang = -1.0;
-
-	if(TeGeometryAlgorithmsPrecision::IsEqual(val_ang, 0.0))
+	}
+	else if(val_ang < -1.0)	// erros de arredondamento podem definir um valor um "pouco" menor que -1, e nesse caso arredondamos para 1.
+	{
+		val_ang = -1.0;
+	}
+	else if(fabs(val_ang) <= 0.000000000000001)	// erros de arredondamento podem definir um valor um "pouco" maior que zero, e nesse caso arredondamos para 0.
+	{
 		ang = 0.0;
+	}
 	else
 	{
-		if(TeGeometryAlgorithmsPrecision::IsEqual(first.y(), last.y()))
-			ang = (pi/2.0);
+		if(first.y_ == last.y_)		// se o segmento for horizontal, o angulo inicial sera: (pi / 2)
+			ang = halfBufferPI;
 		else
-			if(TeGeometryAlgorithmsPrecision::IsGreater(first.y(), last.y()))
+			if(first.y() > last.y())
 				ang = asin(val_ang);
 			else
-				ang = acos(val_ang) + (pi/2.0);
+				ang = acos(val_ang) + halfBufferPI;
+	}
+
+	return;
+}
+
+/** Rotina auxiliar que traca um buffer elementar ao redor de um segmento, arredondando apenas um dos cantos do segmento: a linha do buffer tera orientacao horaria.
+		\param first	       primeiro ponto que define o segmento de reta.
+		\param last		       segundo ponto que define o segmento de reta.
+		\param bufferDistance  distancia utilizada para tracar o buffer.
+		\param numPoints       numero de pontos utilizado na definicao da semi-circunferencia ao redor dos vertices.
+		\param bufferLevels	   numero de niveis do buffer.
+		\param bufferPols	   linhas no sentido horario que definem a linha de buffer de cada nivel.
+  */
+inline void TeElementarBuffer(TeCoord2D first, TeCoord2D last, const double& bufferDistance,
+                              const unsigned int& numPoints, const unsigned int& bufferLevels, vector<TePolygon>& bufferPols)
+{
+	bufferPols.clear();
+
+	double ang = 0.0;		// angulo que define uma linha perpendicular ao primeiro vertice do segmento
+	bool didswap = false;	// indica se a rotina TeFindInitialAng fez o swap das coordenadas first e last
+
+	TeFindInitialAng(first, last, ang, didswap);
+
+	ang += bufferPI;	// como vamos tracar as linhas no sentido horario, vamos comecar 180 graus depois e entao vamos decrementando
+
+	double deltaAng = bufferPI / (numPoints - 1);	// angulo de cada setor que compoem o buffer
+	double c = 0.0; // variavel que contera o resultado do cosseno de um angulo
+	double s = 0.0;	// variavel que contera o resultado do seno de um angulo
+	double x = 0.0;	// variavel que contera a coordenada x transladada
+	double y = 0.0; // variavel que contera a coordenada y transladada
+
+// incializa a linha que delimitara cada nivel de buffer
+	vector<TeLine2D> bufferLines;
+
+	for(unsigned int i = 0; i < bufferLevels; ++i)
+	{
+		TeLine2D newLine;
+		bufferLines.push_back(newLine);
 	}
 
-	// Para cada extremo, calcula uma semi-circunfer�ncia
-	for(int i = 1; i < numPoints; ++i)
+// verifica se o segmento foi ou nao invertido: isso eh importante para podermos manter a orientacao da linha de buffer
+// que estamos criando
+	if(didswap)
 	{
-		double s = sin(ang);
-		double c = cos(ang);
-		
-		x = first.x() + bufferDistance * c ; 
-		y = first.y() + bufferDistance * s ;
+// para cada extremo, calcula uma semi-circunferencia
+		for(unsigned int i = 1; i < numPoints; ++i)
+		{
+			c = cos(ang);
+			s = sin(ang);
+
+// repete o procedimento para cada nivel do buffer
+			for(unsigned int j = 0; j < bufferLevels; ++j)
+			{
+				x = first.x() + bufferDistance * (j + 1) * c ;
+				y = first.y() + bufferDistance * (j + 1) * s ;
+				bufferLines[j].add(TeCoord2D(x, y));
+			}
+	
+			ang -= deltaAng;
+		}
+
+// coloca o ultimo ponto do primeiro arco
+		c = cos(ang);
+		s = sin(ang);		
+
+		for(unsigned int j = 0; j < bufferLevels; ++j)
+		{
+// coloca o ultimo ponto do primeiro arco
+			x = first.x() + bufferDistance * (j + 1) * c; 
+			y = first.y() + bufferDistance * (j + 1) * s;
+			bufferLines[j].add(TeCoord2D(x, y));
+
+// coloca o primeiro ponto do segundo arco
+			x = last.x() + bufferDistance * (j + 1) * c ; 
+			y = last.y() + bufferDistance * (j + 1) * s;
+			bufferLines[j].add(TeCoord2D(x, y));
+		}
 
-		contourLine.add(TeCoord2D(x, y));
+// coloca o ultimo ponto do segundo arco
+		ang -= bufferPI;
 
-		ang += (pi / (numPoints - 1));
+		c = cos(ang);
+		s = sin(ang);
+
+		for(unsigned int j = 0; j < bufferLevels; ++j)
+		{		
+			x = last.x() + bufferDistance * (j + 1) * c; 
+			y = last.y() + bufferDistance * (j + 1) * s;
+			bufferLines[j].add(TeCoord2D(x, y));
+
+// fecha a linha: que jah se encontra no sentido horario
+			bufferLines[j].add(bufferLines[j][0]);
+
+// cria o poligono correspondente e coloca no vetor de saida
+			TePolygon pol;
+			pol.add(TeLinearRing(bufferLines[j]));
+			bufferPols.push_back(pol);
+		}
 	}
+	else
+	{
+// coloca o primeiro ponto do primeiro arco
+		c = cos(ang);
+		s = sin(ang);
 
-	x = first.x() + bufferDistance * cos(ang) ; 
-	y = first.y() + bufferDistance * sin(ang) ;
+		for(unsigned int j = 0; j < bufferLevels; ++j)
+		{		
+			x = first.x() + bufferDistance * (j + 1) * c; 
+			y = first.y() + bufferDistance * (j + 1) * s;
+			bufferLines[j].add(TeCoord2D(x, y));
+		}
 
-	contourLine.add(TeCoord2D(x, y));
+// coloca o ultimo ponto do primeiro arco
+		ang -= bufferPI;
 
-	for(int j = 0; j < numPoints; ++j)
-	{		
-		double s = sin(ang);
-		double c = cos(ang);
+		c = cos(ang);
+		s = sin(ang);
 		
-		x = last.x() + bufferDistance * c ; 
-		y = last.y() + bufferDistance * s ;
+		for(unsigned int j = 0; j < bufferLevels; ++j)
+		{		
+// coloca o ultimo ponto do primeiro arco
+			x = first.x() + bufferDistance * (j + 1) * c; 
+			y = first.y() + bufferDistance * (j + 1) * s;
+			bufferLines[j].add(TeCoord2D(x, y));
+
+// coloca o primeiro ponto do segundo arco
+			x = last.x() + bufferDistance * (j + 1) * c ; 
+			y = last.y() + bufferDistance * (j + 1) * s ;
+			bufferLines[j].add(TeCoord2D(x, y));
+		}
+
+// coloca os pontos do ultimo arco
+		for(unsigned int i = 1; i < numPoints; ++i)
+		{
+			ang -= deltaAng;
+
+			c = cos(ang);
+			s = sin(ang);
+
+			for(unsigned int j = 0; j < bufferLevels; ++j)
+			{		
+				x = last.x() + bufferDistance * (j + 1) * c ; 
+				y = last.y() + bufferDistance * (j + 1) * s ;
+				bufferLines[j].add(TeCoord2D(x, y));
+			}
+		}
+
+// fecha cada linha, que jah deve estar no sentido horario
+		for(unsigned int j = 0; j < bufferLevels; ++j)
+		{
+			bufferLines[j].add(bufferLines[j][0]);
+
+// cria o poligono correspondente e coloca no vetor de saida
+			TePolygon pol;
+			pol.add(TeLinearRing(bufferLines[j]));
+			bufferPols.push_back(pol);
+		}
+	}
+
+	return;
+}
+
+/** Rotina auxiliar que traca um buffer elementar ao redor de um segmento, arredondando os dois cantos do segmento: a linha do buffer tera orientacao horaria.
+		\param first	       primeiro ponto que define o segmento de reta.
+		\param last		       segundo ponto que define o segmento de reta.
+		\param bufferDistance  distancia utilizada para tracar o buffer.
+		\param numPoints       numero de pontos utilizado na definicao da semi-circunferencia ao redor dos vertices.
+		\param bufferLevels	   numero de niveis do buffer.
+		\param bufferPols	   linhas no sentido horario que definem a linha de buffer de cada nivel.
+  */
+inline void TeFullElementarBuffer(TeCoord2D first, TeCoord2D last, const double& bufferDistance,
+							      const unsigned int& numPoints, const unsigned int& bufferLevels, vector<TePolygon>& bufferPols)
+{
+	bufferPols.clear();
+
+	double ang = 0.0;		// angulo que define uma linha perpendicular ao primeiro vertice do segmento
+	bool didswap = false;	// indica se a rotina TeFindInitialAng fez o swap das coordenadas first e last
+
+	TeFindInitialAng(first, last, ang, didswap);
+
+	ang += bufferPI;	// como vamos tracar as linhas no sentido horario, vamos comecar 180 graus depois e entao vamos decrementando
 
-		contourLine.add(TeCoord2D(x, y));
+	double deltaAng = bufferPI / (numPoints - 1);	// angulo de cada setor que compoem o buffer
+	double c = 0.0; // variavel que contera o resultado do cosseno de um angulo
+	double s = 0.0;	// variavel que contera o resultado do seno de um angulo
+	double x = 0.0;	// variavel que contera a coordenada x transladada
+	double y = 0.0; // variavel que contera a coordenada y transladada
 
-		ang += (pi / (numPoints - 1));
+// incializa a linha que delimitara cada nivel de buffer
+	vector<TeLine2D> bufferLines;
+
+	for(unsigned int i = 0; i < bufferLevels; ++i)
+	{
+		TeLine2D newLine;
+		bufferLines.push_back(newLine);
 	}
 
-	contourLine.add(contourLine[0]);
+// para cada extremo, calcula uma semi-circunferencia
+	for(unsigned int i = 1; i < numPoints; ++i)
+	{
+		c = cos(ang);
+		s = sin(ang);
 
-	pol.add(TeLinearRing(contourLine));
+		for(unsigned int j = 0; j < bufferLevels; ++j)
+		{		
+			x = first.x() + bufferDistance * (j + 1) * c; 
+			y = first.y() + bufferDistance * (j + 1) * s;
+			bufferLines[j].add(TeCoord2D(x, y));
+		}
+
+		ang -= deltaAng;
+	}
+
+	c = cos(ang);
+	s = sin(ang);
+
+	for(unsigned int j = 0; j < bufferLevels; ++j)
+	{	
+// coloca o ultimo ponto da primeira semi-circunferencia
+		x = first.x() + bufferDistance * (j + 1) * c; 
+		y = first.y() + bufferDistance * (j + 1) * s;
+		bufferLines[j].add(TeCoord2D(x, y));
+
+// coloca o primeiro ponto da segunda semi-circunferencia
+		x = last.x() + bufferDistance * (j + 1) * c; 
+		y = last.y() + bufferDistance * (j + 1) * s;
+		bufferLines[j].add(TeCoord2D(x, y));
+	}
+
+// coloca os demais pontos da segunda semi-circunferencia
+	for(unsigned int i = 1; i < numPoints; ++i)
+	{
+		ang -= deltaAng;
+
+		c = cos(ang);
+		s = sin(ang);
+
+		for(unsigned int j = 0; j < bufferLevels; ++j)
+		{		
+			x = last.x() + bufferDistance * (j + 1) * c; 
+			y = last.y() + bufferDistance * (j + 1) * s;
+			bufferLines[j].add(TeCoord2D(x, y));
+		}
+	}
+
+// fecha cada linha, que jah deve estar no sentido horario
+	for(unsigned int j = 0; j < bufferLevels; ++j)
+	{
+		bufferLines[j].add(bufferLines[j][0]);
+
+// cria o poligono correspondente e coloca no vetor de saida
+		TePolygon pol;
+		pol.add(TeLinearRing(bufferLines[j]));
+		bufferPols.push_back(pol);
+	}
 
 	return;
 }
 
+/** Rotina auxiliar que traca um buffer ao redor de uma linha, tracando varios niveis independentemente um do outro: para cada nivel de buffer, o anel externo do poligono estara no sentido horario e os buracos estarao no sentido anti-horario.
+		\param line	           linha para a qual os buffers serao tracados.
+		\param bufferDistance  distancia utilizada para tracar o buffer.
+		\param numPoints       numero de pontos utilizados para construcao dos semi-circulos de cada segmento.
+		\param bufferLevels    numero de niveis do buffer.
+		\param polVec          vetor de saida com os poligonos de buffer de cada nivel: nao aninhados, isto e, possivelmente estao sobrepostos, sendo o ratamento dado em outras rotinas de mais alto nivel (que utilizam esta como suporte).
+  */
+inline bool TeLineBuffer(const TeLine2D& line, const double& bufferDistance, const unsigned int& numPoints,
+						 const unsigned int& bufferLevels, vector<TePolygon>& polVec)
+{
+	polVec.clear();
+
+	unsigned int nStep = line.size();
+
+	if(nStep < 2)
+		return false;
+
+// vetor auxiliar que contera em cada posicao um polygonset
+// com todos os poligonos elementares de um determinado nivel de buffer
+	vector<TePolygonSet> psAux;
+
+	for(unsigned int i = 0; i < bufferLevels; ++i)
+	{
+		TePolygonSet pset;
+		psAux.push_back(pset);
+	}
+
+// para linhas fechadas poderemos tracar somente buffer elementares com metade dos arcos
+// enquanto que para linhas abertas, o buffer do primeiro segmento sera feito com um buffer elementar completo (os dois semi-circulos serao tracados).
+// a seguir, computaremos os buffers elementares de cada nivel.
+	if(line.isRing())
+	{
+		for(unsigned int i = 1; i < nStep; ++i)
+		{
+// gera os poliginos elementares a partir dos segmentos definidos por cada par de vertice
+			vector<TePolygon> pols;
+			TeElementarBuffer(line[i - 1], line[i], bufferDistance, numPoints, bufferLevels, pols);
+
+			for(unsigned int j = 0; j < bufferLevels; ++j)
+				psAux[j].add(pols[j]);
+		}
+	}
+	else
+	{
+// para linhas abertas, o primeiro segmento tem um tratamento diferenciado enquanto os demais nao terao
+		vector<TePolygon> pols;
+		TeFullElementarBuffer(line[0], line[1], bufferDistance, numPoints, bufferLevels, pols);
+
+		for(unsigned int j = 0; j < bufferLevels; ++j)
+			psAux[j].add(pols[j]);
+
+		for(unsigned int i = 2; i < nStep; ++i)
+		{
+// gera os poliginos elementares a partir dos segmentos definidos por cada par de vertice
+			TeElementarBuffer(line[i - 1], line[i], bufferDistance, numPoints, bufferLevels, pols);
+
+			for(unsigned int j = 0; j < bufferLevels; ++j)
+				psAux[j].add(pols[j]);
+		}
+	}
+
+// agora, com os buffers elementares de cada nivel jah computados, vamos fazer
+// a uniao dos buffers elementares de cada nivel individualmente
+	for(unsigned int j = 0; j < bufferLevels; ++j)
+	{
+		TePolygonSet polSetOut;
+
+// caso a uniao falhe, interrompe a execucao sinalizando o problema!
+		if(TeOVERLAY::TePairUnion(psAux[j], polSetOut) == false)
+			return false;
+
+// teoricamente o buffer de cada nivel sera formado por um unico poligono com ou sem buracos.
+		if(polSetOut.size() != 1)
+			return false;
+
+		polVec.push_back(polSetOut[0]);
+	}
+
+	return true;
+}
+
+/** Rotina auxiliar que traca um buffer interno (negativo) no interior de um poligono, tracando varios niveis independentemente um do outro: para cada nivel de buffer, o anel externo do poligono estara no sentido horario e os buracos estarao no sentido anti-horario.
+		\param pol	           poligono para a qual os buffers serao tracados.
+		\param bufferDistance  distancia utilizada para tracar o buffer.
+		\param numPoints       numero de pontos utilizados para construcao dos semi-circulos de cada segmento.
+		\param bufferLevels    numero de niveis do buffer.
+		\param polsVec         vetor de saida com os poligonos de buffer de cada nivel: jah aninhados, isto e, os poligonos do nivel "n" jah consideram os do nivel "n-1".
+  */
+inline bool TeInsideBufferRegion(const TePolygon& pol, const double& bufferDistance, const unsigned int& numPoints, const unsigned int& bufferLevels, vector<TePolygonSet>& polsVec)
+{
+	polsVec.clear();	
+
+	unsigned int nRings = pol.size();
+
+	//vetor de polygonset, onde cada poligonset est� associado a um nivel
+	//cada nivel contem os buffers internos do pai
+	vector<TePolygonSet> internalBuffers;
+	
+	//vetor de polygonset, onde cada poligonset est� associado a um nivel
+	//cada nivel contem os buffers externos dos buracos
+	vector<TePolygonSet> externalBuffers;
+
+	for(unsigned int i = 0; i < bufferLevels; ++i)
+	{
+		TePolygonSet pset;
+		polsVec.push_back(pset);
+		TePolygonSet pset2;
+		internalBuffers.push_back(pset2);
+		TePolygonSet pset3;
+		externalBuffers.push_back(pset3);
+	}
+
+	// para cada anel vamos tracar o buffer e armazenar somente a parte de interesse: 
+	// no caso de aneis externos vamos
+	// ficar com o buffer interno e no caso de buracos vamos ficar com os buffer externos
+	for(unsigned int i = 0; i < nRings; ++i)
+	{
+		vector<TePolygon> buffVec;
+		
+		if(TeLineBuffer(pol[i], bufferDistance, numPoints, bufferLevels, buffVec) == false)
+			return false;
+
+		if(i == 0)
+		{
+// para o anel externo ficamos com os aneis internos do buffer
+			for(unsigned int j = 0; j < bufferLevels; ++j)
+			{
+				unsigned int rsize = buffVec[j].size();
+				for(unsigned int k = 1; k < rsize; ++k)
+				{
+					TePolygon paux; paux.add(buffVec[j][k]); //comeca em 1 ate k
+					internalBuffers[j].add(paux);
+				}
+			}
+		}
+		else
+		{
+// para um anel interno ficamos com os aneis externos do buffer
+			for(unsigned int j = 0; j < bufferLevels; ++j)
+			{
+				TePolygon paux; paux.add(buffVec[j][0]); 
+				externalBuffers[j].add(paux);
+			}
+		}
+	}
+	//para cada nivel, calcular o buraco do resultado que ser�
+	//a diferenca entre os buffers internos e 
+	//a uniao dos buffers externos 
+	for(unsigned int i = 0; i < bufferLevels; ++i)
+	{
+		TePolygonSet holes;
+
+		if(externalBuffers[i].size()>0)
+		{
+			TePolygonSet externalBuffersUnion;
+			//uniao dos buffers externos
+			if(TeOVERLAY::TePairUnion(externalBuffers[i], externalBuffersUnion) == false)
+				return false;
+
+			// o buffer interno ao pai pode nao existir se a distancia for muito grande  
+			if(internalBuffers[i].size()>0)
+			{
+				//diferenca
+				if(TeOVERLAY::TeDifference(internalBuffers[i], externalBuffersUnion, holes) == false)
+					return false;
+			}
+
+			//se o resultado da diferenca der vazio, significa que os buffers internos entao
+			//contidos nos buffer externos
+			//assim temos que adicionar como buracos, os buracos originais
+			if(holes.size()==0)
+			{
+				TePolygon h;
+				for(unsigned j=1; j<pol.size(); ++j) // buracos originais 
+				{
+					h.add(pol[j]); 
+					holes.add(h);
+				}
+			}
+		}
+		else
+		{
+			//o unico buraco e o internal buffer do pai
+			holes = internalBuffers[i];
+		}
+		
+		//montar o buffer final
+		TePolygon result;
+		result.add(pol[0]); // pai do original
+		for(unsigned j=0; j<holes.size(); ++j) // buracos calculados
+            result.add(holes[j][0]);
+		
+		polsVec[i].add(result);
+	}
+
+	return true;
+}
+
+/** Rotina auxiliar que traca um buffer externo (positivo) ao redor de um poligono, tracando varios niveis independentemente um do outro: para cada nivel de buffer, o anel externo do poligono estara no sentido horario e os buracos estarao no sentido anti-horario.
+		\param pol	           poligono para a qual os buffers serao tracados.
+		\param bufferDistance  distancia utilizada para tracar o buffer.
+		\param numPoints       numero de pontos utilizados para construcao dos semi-circulos de cada segmento.
+		\param bufferLevels    numero de niveis do buffer.
+		\param polsVec         vetor de saida com os poligonos de buffer de cada nivel: jah aninhados, isto e, os poligonos do nivel "n" jah consideram os do nivel "n-1".
+  */
+inline bool TeOutsideBufferRegion(const TePolygon& pol, const double& bufferDistance, const unsigned int& numPoints, const unsigned int& bufferLevels, vector<TePolygonSet>& polsVec)
+{
+	polsVec.clear();	
+
+	unsigned int nRings = pol.size();
+
+// jah coloca um objeto polygonset correspondente a cada nivel
+	vector<TePolygonSet> outPutPolsVec;
+
+	for(unsigned int i = 0; i < bufferLevels; ++i)
+	{
+		TePolygonSet pset;
+		outPutPolsVec.push_back(pset);
+		TePolygonSet pset2;
+		polsVec.push_back(pset2);
+	}
+
+// para cada anel vamos tracar o buffer e armazenar somente a parte de interesse: no caso de aneis externos vamos
+// ficar com o buffer externo e no caso de buracos vamos ficar com os buffer internos
+	for(unsigned int i = 0; i < nRings; ++i)
+	{
+		vector<TePolygon> buffVec;
+		
+		if(TeLineBuffer(pol[i], bufferDistance, numPoints, bufferLevels, buffVec) == false)
+			return false;
+
+		if(i == 0)
+		{
+// para o anel externo ficamos com o anel externo do buffer
+			for(unsigned int j = 0; j < bufferLevels; ++j)
+			{
+				TePolygon paux; paux.add(buffVec[j][0]);
+				outPutPolsVec[j].add(paux);
+			}
+		}
+		else
+		{
+// para um anel interno ficamos com os aneis internos do buffer
+			for(unsigned int j = 0; j < bufferLevels; ++j)
+			{
+				unsigned int rsize = buffVec[j].size();
+
+				for(unsigned int k = 1; k < rsize; ++k)
+				{
+					TePolygon paux; paux.add(buffVec[j][k]);
+					outPutPolsVec[j].add(paux);
+				}
+			}
+		}
+	}
+
+	for(unsigned int i = 0; i < bufferLevels; ++i)
+	{
+// no caso de buffers positivos (para fora) pelo menos o buffer do anel externo devera aparecer em cada nivel
+		if(outPutPolsVec[i].size() == 0)
+			return false;
+
+		TePolygonSet psetOut = outPutPolsVec[i];
+
+// LOGICA PARA O ANEL EXTERNO
+		if(i == 0)
+		{
+// o primeiro buffer pegara como buraco o anel externo original
+			psetOut[0].add(pol[0]);	
+			polsVec[i].add(psetOut[0]);
+		}
+		else
+		{
+			TeLine2D laux;
+			laux.copyElements(outPutPolsVec[i - 1][0][0]);
+			psetOut[0].add(TeLinearRing(laux));
+			polsVec[i].add(psetOut[0]);
+		}
+
+// se nao temos buracos no corrente, entao nao precisamos nos preocupar com diferencas e etc...
+		if(psetOut.size() == 1)
+			continue;
+
+		
+// LOGICA PARA OS ANEIS INTERNOS
+		if(i == 0)
+		{			
+// vamos montar um polygonset com os buracos do poligono original
+			TePolygonSet psetOriginalInnerRings;
+
+			for(unsigned int j = 1; j < nRings; ++j)
+			{
+				TePolygon paux; paux.add(pol[j]);
+				psetOriginalInnerRings.add(paux);
+			}
+
+// agora vamos montar um polygonset com os buracos (que jah estao como poligonos) do primeiro nivel
+			TePolygonSet currentPset;
+
+			for(unsigned int j = 1; j < psetOut.size(); ++j)
+			{
+				currentPset.add(psetOut[j]);
+			}
+
+// agora fazemos a diferena dos originais com o do primeiro nivel
+			TePolygonSet resultPset;
+
+			if(TeOVERLAY::TeDifference(psetOriginalInnerRings, currentPset, resultPset) == false)
+				return false;
+
+			for(unsigned int j = 0; j < resultPset.size(); ++j)
+			{
+				polsVec[i].add(resultPset[j]);
+			}
+		}
+		else
+		{
+// vamos montar um polygonset com os buracos do "n-1" e um com o corrente ("n")
+			TePolygonSet previousPset;
+
+			for(unsigned int j = 1; j < outPutPolsVec[i - 1].size(); ++j)
+			{
+				previousPset.add(outPutPolsVec[i - 1][j]);
+			}
+
+			TePolygonSet currentPset;
+
+			for(unsigned int j = 1; j < psetOut.size(); ++j)
+			{
+				currentPset.add(psetOut[j]);
+			}
+
+// agora fazemos a diferena do nivel anterior com o do nivel corrente
+			TePolygonSet resultPset;
+
+			if(TeOVERLAY::TeDifference(previousPset, currentPset, resultPset) == false)
+				return false;
+
+			for(unsigned int j = 0; j < resultPset.size(); ++j)
+			{
+				polsVec[i].add(resultPset[j]);
+			}
+		}
+	}
+
+	return true;
+}
+
+inline bool TeInOutBufferRegion(const TePolygon& pol, const double& bufferDistance, const unsigned int& numPoints, const unsigned int& bufferLevels, vector<TePolygonSet>& polsVec)
+{
+	polsVec.clear();	
+
+	unsigned int nRings = pol.size();
+
+	//vetor de polygonset, onde cada polygonset est� associado a um nivel
+	//cada nivel contem os buffers internos e externos  
+	// de cada anel do poligono
+	vector<TePolygonSet> polVecBuffers;
+	
+	for(unsigned int i = 0; i < bufferLevels; ++i)
+	{
+		TePolygonSet pset;
+		polsVec.push_back(pset);
+		TePolygonSet pset2;
+		polVecBuffers.push_back(pset2);
+	}
+
+	// para cada anel vamos tracar o buffer e armazenar o poligono gerado (com aneis externo e internos)
+	for(unsigned int i = 0; i < nRings; ++i)
+	{
+		vector<TePolygon> buffVec;
+		
+		if(TeLineBuffer(pol[i], bufferDistance, numPoints, bufferLevels, buffVec) == false)
+			return false;
+
+		//adicona o buffer gerado em cada polygonset
+		for(unsigned int j=0; j<buffVec.size(); ++j)
+			polVecBuffers[j].add(buffVec[j]);
+
+	}
+
+
+    //para cada nivel, fazer a uniao de todos os buffers gerados
+	for(unsigned int i = 0; i < bufferLevels; ++i)
+	{
+		//uniao dos buffers 
+		if(TeOVERLAY::TePairUnion(polVecBuffers[i], polsVec[i]) == false)
+			return false;
+	}
+
+	return true;
+}
+
 }	// end namespace TeBUFFERREGION
 
 //---------------- Buffer Algorithm ----------------//
-bool TeBUFFERREGION::TeBufferRegion(const TeCoord2D& coord, const double& bufferDistance, const short& numPoints, TePolygon& pol)
+
+bool TeBUFFERREGION::TeBufferRegion(const TeCoord2D& coord, const double& bufferDistance, const unsigned int& numPoints, const unsigned int& bufferLevels, vector<TePolygon>& bufferPols)
 {
-	TeLine2D contourLine;
+// limpa o vetor de poligonos de saida
+	bufferPols.clear();
+
+// cria um vetor de linhas que contera a linha de buffer a cada nivel
+	vector<TeLine2D> contourLines;
 
-	contourLine.add(TeCoord2D((coord.x() + bufferDistance), (coord.y())));
+// cria a linha de cada nivel e jah acrescenta a coordenada inicial do canto esquerdo
+	for(unsigned int i = 0; i < bufferLevels; ++i)
+	{
+// linha de buffer do i-th nivel
+		TeLine2D newLine;
+		newLine.add(TeCoord2D((coord.x() - (bufferDistance * (i + 1))), (coord.y())));
+
+		contourLines.push_back(newLine);
+	}
 
-	double initialAng = 0.0;
+	double initialAng = bufferPI;							// angulo inicial
+	const double deltaAng = doubleBufferPI / numPoints;		// angulo de cada setor que compoem o buffer
 
-	const double two_pi = 2 * pi;
+	double x = 0.0;	// variavel que contera a coordenada x transladada
+	double y = 0.0;	// variavel que contera a coordenada y transladada
+	double c = 0.0;	// variavel que contera o resultado do cosseno de um angulo
+	double s = 0.0;	// variavel que contera o resultado do seno de um angulo
 
-	double x = 0.0;
-	double y = 0.0;
 
-	for(int i = 1; i < numPoints; ++i)
+// calcula as coordenadas que formarao a linha de buffer de cada nivel
+	for(unsigned int i = 1; i < numPoints; ++i)
 	{
-		initialAng += (two_pi / numPoints);
+		initialAng -= deltaAng;
 		
-		double s = sin(initialAng);
-		double c = cos(initialAng);
-		
-		x = coord.x() + bufferDistance * c ; 
-		y = coord.y() + bufferDistance * s ;
+		c = cos(initialAng);
+		s = sin(initialAng);
+
+// gera o ponto equivalente para cada nivel de buffer
+		for(unsigned int k = 0; k < bufferLevels; ++k)
+		{		
+			x = coord.x_ + bufferDistance * (k + 1) * c; 
+			y = coord.y_ + bufferDistance * (k + 1) * s;
 
-		contourLine.add(TeCoord2D(x, y));
+			contourLines[k].add(TeCoord2D(x, y));
+		}
 	}
 
-	contourLine.add(TeCoord2D((coord.x() + bufferDistance), (coord.y())));
+// fecha cada uma das linhas de buffer,
+// repetindo o primeiro ponto e cria os poligonos de buffer de cada nivel formado pela respectiva
+// linha de buffer
+	for(unsigned int i = 0; i < bufferLevels; ++i)
+	{
+		contourLines[i].add(contourLines[i][0]);		
+
+		TePolygon pol;
+		pol.add(TeLinearRing(contourLines[i]));
+		bufferPols.push_back(pol);
+	}
+
+// coloca o anel externo do nivel "n-1" como anel interno do nivel "n"
+	for(unsigned int i = 1; i < bufferLevels; ++i)
+	{
+// clona a linha externa do nivel "n-1"
+		TeLine2D laux;
+		laux.copyElements(bufferPols[i - 1][0]);
 
-	pol.add(TeLinearRing(contourLine));
+// deixa no sentido anti-horario a linha que servira de buraco para o buffer do nivel "n"
+		reverse(laux.begin(), laux.end());
+
+// e, finalmente, coloca a linha do nivel "n-1" como buraco do nivel "n"
+		bufferPols[i].add(TeLinearRing(laux));
+	}
 
 	return true;
 }
 
+bool TeBUFFERREGION::TeBufferRegion(const TeCoord2D& coord, const double& bufferDistance, const unsigned int& numPoints, TePolygon& pol)
+{
+	pol.clear();
+
+// define um vetor temporario para chamar a rotina acima, que realmente implementa o buffer de um ponto
+	vector<TePolygon> bufferPols;
+
+// solicita o buffer de um unico nivel ao redor do ponto
+	TeBufferRegion(coord, bufferDistance, numPoints, 1, bufferPols);
+
+	if(bufferPols.empty())
+		return false;
+
+	pol = bufferPols[0];
+
+	return true;
+}
 
-bool TeBUFFERREGION::TeBufferRegion(const TeLine2D& line, const double& bufferDistance, const short& numPoints, TePolygonSet& ps)
+bool TeBUFFERREGION::TeBufferRegion(const TeLine2D& line, const double& bufferDistance, const unsigned int& numPoints, const unsigned int& bufferLevels, vector<TePolygonSet>& polVec)
+{
+	polVec.clear();
+
+	for(unsigned int level=0; level<bufferLevels; ++level)
+	{
+		TePolygonSet aux;
+		polVec.push_back(aux);
+	}
+
+// para tracar o semi-circulo ao redor do canto do segmento precisamos de pelo menos tres pontos
+	unsigned int cornerPts = numPoints;
+
+	if(numPoints < 3)
+		cornerPts = 3;
+
+// traca os buffers de cada nivel ao redor da linha: cada posicao do vetor "outPutPolVec" contera o poligono de cada nivel
+	vector<TePolygon> outPutPolVec;
+
+	if(TeLineBuffer(line, bufferDistance, cornerPts, bufferLevels, outPutPolVec) == false)
+		return false;
+
+// se o numero de poligonos da saida for diferente do numero de niveis desejado, algum erro ocorreu
+	if(outPutPolVec.size() != bufferLevels)
+		return false;
+
+// para cada nivel de buffer precisamos acomodar os aneis do nivel anterior:
+// no caso do buffer de linhas, o buffer do nivel "n" eh exatamente a diferenca do resultado que temos ate aqui menos o resultado
+// do buffer do nivel "n-1"
+	polVec[0].add(outPutPolVec[0]);
+
+	for(unsigned int i = 1; i < bufferLevels; ++i)
+	{
+		TePolygonSet currentPSet;  currentPSet.add(outPutPolVec[i]);
+		TePolygonSet previousPSet; previousPSet.add(outPutPolVec[i - 1]);
+
+		TePolygonSet polSetOut;
+
+		if(TeOVERLAY::TeDifference(currentPSet, previousPSet, polSetOut) == false)
+			return false;
+
+// esperamos que o resultado da diferenca seja sempre um poligono (com zero ou mais buracos)
+		//if(polSetOut.size() != 1)
+		//	return false;
+		//polVec.push_back(polSetOut[0]);
+
+		for(unsigned int j=0; j<polSetOut.size(); ++j)
+			polVec[i].add(polSetOut[j]);
+	}
+
+	return true;	
+}
+
+bool TeBUFFERREGION::TeBufferRegion(const TeLine2D& line, const double& bufferDistance, const unsigned int& numPoints, TePolygonSet& ps)
 {
 	ps.clear();
 
-	// Generate first polygon
-	TePolygon pAux;
-	TeGenerateBufferPolygon(line[0], line[1], bufferDistance, numPoints, pAux);
-	ps.add(pAux);
+	vector<TePolygonSet> polVec;
 
-	unsigned int nStep = line.size() - 1;
-	for(unsigned int i = 1; i < nStep; ++i)
+	if(TeBufferRegion(line, bufferDistance, numPoints, 1, polVec) == false)
+		return false;
+
+	ps.copyElements(polVec[0]);
+	
+	return true;
+}
+
+bool TeBUFFERREGION::TeBufferRegion(const TePolygon& pol, const double& bufferDistance, const unsigned int& numPoints, const unsigned int& bufferLevels, const TeBufferType& buffType, vector<TePolygonSet>& polsVec)
+{
+	if(buffType == TeINSIDEBUFFER)
 	{
-		// Generate polygon from segment
-		TePolygon p;
-		TeGenerateBufferPolygon(line[i], line[i+1], bufferDistance, numPoints, p);
+		return TeInsideBufferRegion(pol, bufferDistance, numPoints, bufferLevels, polsVec);
+	}
+	else if(buffType == TeOUTSIDEBUFFER)
+	{
+		return TeOutsideBufferRegion(pol, bufferDistance, numPoints, bufferLevels, polsVec);
+	}
+	else
+	{
+		return TeInOutBufferRegion(pol, bufferDistance, numPoints, bufferLevels, polsVec);
+	}	
+}
 
-		//ps.add(p);
-		// Gets union
-		TePolygonSet psAux;
-		psAux.add(p);
+bool TeBUFFERREGION::TeBufferRegion(const TePolygon& pol, const double& bufferDistance, const unsigned int& numPoints, TePolygonSet& ps)
+{
+	ps.clear();
+
+	vector<TePolygonSet> pols;
+	
+	if(!TeBufferRegion(pol, bufferDistance, numPoints, 1, TeOUTSIDEBUFFER, pols))
+		return false;
 
-		TePolygonSet psAux2;
+	ps = pols[0];
+
+	return true;
+}
 
-		if(TeOVERLAY::TeUnion(psAux, ps, psAux2) == false)
+bool TeBUFFERREGION::TeBufferRegion(const TePolygonSet& polSetIn, const double& bufferDistance, const unsigned int& numPoints, const unsigned int& bufferLevels, const TeBufferType& bufferType, vector<TePolygonSet>& polyVecOut)
+{
+	polyVecOut.clear();
+	
+	for(unsigned int j=0; j<polSetIn.size(); ++j)
+	{
+		vector<TePolygonSet> auxPolVec;
+		if(!TeBUFFERREGION::TeBufferRegion(polSetIn[j], bufferDistance, numPoints, bufferLevels, bufferType, auxPolVec))
 			return false;
 
-		ps = psAux2;		
+		if(j==0)
+		{
+			for(unsigned int i=0; i<auxPolVec.size(); ++i)
+				polyVecOut.push_back(auxPolVec[i]);
+		}
+		else
+		{
+			for(unsigned int i=0; i<auxPolVec.size(); ++i)
+			{
+				TePolygonSet polUnion;
+				if(!TeOVERLAY::TeUnion(polyVecOut[i], auxPolVec[i], polUnion))
+					return false;
+				polyVecOut[i]=polUnion;
+			}
+		}
 	}
+	return true;
+}
+
+
+bool TeBUFFERREGION::TeBufferRegion(const TeLineSet& lineSetIn, const double& bufferDistance, const unsigned int& numPoints, const unsigned int& bufferLevels, vector<TePolygonSet>& polyVecOut)
+{
+	polyVecOut.clear();
+
+    for(unsigned int j=0; j<lineSetIn.size(); ++j)
+	{
+		vector<TePolygonSet> currentPolVec;
+		if(!TeBUFFERREGION::TeBufferRegion(lineSetIn[j], bufferDistance, numPoints, bufferLevels, currentPolVec))
+			return false;
 
+		if(j==0)
+		{
+			for(unsigned int i=0; i<currentPolVec.size(); ++i)
+				polyVecOut.push_back(currentPolVec[i]);
+		}
+		else
+		{
+			for(unsigned int i=0; i<currentPolVec.size(); ++i)
+			{
+				TePolygonSet polUnion;
+				if(!TeOVERLAY::TeUnion(polyVecOut[i], currentPolVec[i], polUnion))
+					return false;
+				polyVecOut[i]=polUnion;
+			}
+		}
+	}
 	return true;
 }
 
-bool TeBUFFERREGION::TeBufferRegion(const TePolygon& pol, const double& bufferDistance, const short& numPoints, TePolygonSet& ps)
+
+bool TeBUFFERREGION::TeBufferRegion(const TePointSet& pointSetIn, const double& bufferDistance, const unsigned int& numPoints, const unsigned int& bufferLevels, vector<TePolygonSet>& polyVecOut)
 {
-	return TeBufferRegion(pol[0], bufferDistance, numPoints, ps);
+	polyVecOut.clear();
+	
+	for(unsigned int j=0; j<pointSetIn.size(); ++j)
+	{
+		vector<TePolygon> currentPolVec;
+		if(!TeBUFFERREGION::TeBufferRegion(pointSetIn[j].location(), bufferDistance, numPoints, bufferLevels, currentPolVec))
+			return false;
+
+		if(j==0)
+		{
+			for(unsigned int i=0; i<currentPolVec.size(); ++i)
+			{
+				TePolygonSet currentPolSet; currentPolSet.add(currentPolVec[i]);
+				polyVecOut.push_back(currentPolSet);
+			}
+		}
+		else
+		{
+			for(unsigned int i=0; i<currentPolVec.size(); ++i)
+			{
+				TePolygonSet polUnion, currentPolSet;
+				currentPolSet.add(currentPolVec[i]);
+				if(!TeOVERLAY::TeUnion(polyVecOut[i], currentPolSet, polUnion))
+					return false;
+				polyVecOut[i]=polUnion;
+			}
+		}
+	}
+	return true;
+}
+
+	
+bool  TeBUFFERREGION::TeBufferRegion(const TeCellSet& cellSetIn, const double& bufferDistance, const unsigned int& numPoints, const unsigned int& bufferLevels, const TeBufferType& bufferType, vector<TePolygonSet>& polyVecOut)
+{
+	polyVecOut.clear();
+	
+	for(unsigned int j=0; j<cellSetIn.size(); ++j)
+	{
+		vector<TePolygonSet> auxPolVec;
+		if(!TeBUFFERREGION::TeBufferRegion(TeMakePolygon(cellSetIn[j].box()), bufferDistance, numPoints, bufferLevels, bufferType, auxPolVec))
+			return false;
+
+		if(j==0)
+		{
+			for(unsigned int i=0; i<auxPolVec.size(); ++i)
+				polyVecOut.push_back(auxPolVec[i]);
+		}
+		else
+		{
+			for(unsigned int i=0; i<auxPolVec.size(); ++i)
+			{
+				TePolygonSet polUnion;
+				if(!TeOVERLAY::TeUnion(polyVecOut[i], auxPolVec[i], polUnion))
+					return false;
+				polyVecOut[i]=polUnion;
+			}
+		}
+	}
+	return true;
 }
 
diff --git a/src/terralib/kernel/TeBufferRegion.h b/src/terralib/kernel/TeBufferRegion.h
old mode 100644
new mode 100755
index dd89313..818e390
--- a/src/terralib/kernel/TeBufferRegion.h
+++ b/src/terralib/kernel/TeBufferRegion.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,15 +20,11 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
-/*! \file TeBufferRegion.h
-    This file contains structures and definitions for buffer region operation on objects.
+/*! \file   TeBufferRegion.h
+	\brief  This file contains structures and definitions for buffer region (map distance) operation on objects.
+	\author Gilberto Ribeiro de Queiroz <gribeiro at dpi.inpe.br>
  */
 
-/**
-  *@author Gilberto Ribeiro de Queiroz
-  */
-
 #ifndef  __TERRALIB_INTERNAL_BUFFER_H
 #define  __TERRALIB_INTERNAL_BUFFER_H
 
@@ -37,14 +33,122 @@ of this library and its documentation.
 class TeLine2D;
 class TePolygon;
 class TePolygonSet;
+class TeLineSet;
+class TePointSet;
+class TeCellSet;
 
+/*! \brief Contains structures and definitions needed to execute Buffer Region operation
+*/
 namespace TeBUFFERREGION
 {	
-	bool TeBufferRegion(const TeCoord2D& coord, const double& bufferDistance, const short& numPoints, TePolygon& pol);
+	//!	Buffer type.
+	/*!
+		- TeINSIDEBUFFER			used to make only inside buffer lines
+		- TeOUTSIDEBUFFER			used to make only outside buffer lines
+		- TeINSIDEOUTSIDEBUFFER		used to make inside and outside buffer lines
+	*/ 
+	enum TeBufferType { TeINSIDEBUFFER, TeOUTSIDEBUFFER, TeINSIDEOUTSIDEBUFFER };
+
+	/** \brief Calculates a buffer region around a point (DEPRECATED: use TeBufferRegion with buffer levels instead).
+		\param coord			the location of the point
+		\param bufferDistance	the desired distance in the same unit as coord
+		\param numPoints		the number of points that should be used to describe the buffer zone (a circle in this case)
+		\param pol				to return the buffer zone: a circle polygon in clockwise order
+		\return Returns true if operation succeed otherwise returns false.
+	*/
+	TL_DLL bool TeBufferRegion(const TeCoord2D& coord, const double& bufferDistance, const unsigned int& numPoints, TePolygon& pol);
+
+	/** \brief Calculates a buffer region around a point.
+		\param coord			the location of the point
+		\param bufferDistance	the desired distance in the same unit as coord
+		\param numPoints		the number of points that should be used to describe the buffer zone (a circle in this case)
+		\param bufferLevels		the number of buffer intervals
+		\param bufferPols		to return the buffer intervals: a circle polygon in clockwise order with holes in counterclockwise order
+		\return Returns true if operation succeed otherwise returns false.
+	*/
+	TL_DLL bool TeBufferRegion(const TeCoord2D& coord, const double& bufferDistance, const unsigned int& numPoints, const unsigned int& bufferLevels, vector<TePolygon>& bufferPols);
+
+	/** \brief Calculates a buffer region around a line (DEPRECATED: use TeBufferRegion with buffer levels instead).
+		\param line				the line 
+		\param bufferDistance	the desired distance in the same unit as line coordinates
+		\param numPoints		the number of points that should be used to describe the curved corners of the buffer zone
+		\param ps				to return the buffer zone: a set of polygons
+		\return Returns true if operation succeed otherwise returns false.
+	*/	
+	TL_DLL bool TeBufferRegion(const TeLine2D& line, const double& bufferDistance, const unsigned int& numPoints, TePolygonSet& ps);
+	
+	/** \brief Calculates a buffer region around a line.
+		\param line				the line 
+		\param bufferDistance	the desired distance in the same unit as line coordinates
+		\param numPoints		the number of points that should be used to describe the curved corners of the buffer zone
+		\param bufferLevels		the number of buffer intervals
+		\param polVec			to return the buffer zone: a vector of polygons
+		\return Returns true if operation succeed otherwise returns false.
+	*/	
+	TL_DLL bool TeBufferRegion(const TeLine2D& line, const double& bufferDistance, const unsigned int& numPoints, const unsigned int& bufferLevels, vector<TePolygonSet>& polVec);
+
+	
+	/** \brief Calculates a buffer region around a polygon (DEPRECATED: use TeBufferRegion with buffer levels instead).
+		\param pol				the polygon 
+		\param bufferDistance	the desired distance in the same unit as polygon rings coordinates
+		\param numPoints		the number of points that should be used to describe the curved corners of the buffer zone
+		\param ps				to return the buffer zone: a set of polygons
+		\return Returns true if operation succeed otherwise returns false.
+	*/	
+	TL_DLL bool TeBufferRegion(const TePolygon& pol, const double& bufferDistance, const unsigned int& numPoints, TePolygonSet& ps);
+
+	/** \brief Calculates a buffer region around a polygon (DEPRECATED: use TeBufferRegion with buffer levels instead).
+		\param pol				the polygon 
+		\param bufferDistance	the desired distance in the same unit as polygon rings coordinates
+		\param numPoints		the number of points that should be used to describe the curved corners of the buffer zone
+		\param bufferLevels		the number of buffer intervals
+		\param buffType		    the buffer type: inside/outside/inside+outside
+		\param polsVec			to return the buffer zone: a vector of polygon set
+		\return Returns true if operation succeed otherwise returns false.
+	*/	
+	TL_DLL bool TeBufferRegion(const TePolygon& pol, const double& bufferDistance, const unsigned int& numPoints, const unsigned int& bufferLevels, const TeBufferType& buffType, vector<TePolygonSet>& polsVec);
+
+	/** \brief Calculates a buffer region around an object polygon set.
+		\param polSetIn				the object polygon set
+		\param bufferDistance		the desired distance in the same unit as polygon rings coordinates
+		\param numPoints			the number of points that should be used to describe the curved corners of the buffer zone
+		\param bufferLevels			the number of buffer intervals
+		\param bufferType			the buffer type: inside/outside/inside+outside
+		\param polyVecOut			to return the buffers of the object, each level in a position of the vector
+		\return Returns true if operation succeed otherwise returns false.
+	*/	
+	TL_DLL bool TeBufferRegion(const TePolygonSet& polSetIn, const double& bufferDistance, const unsigned int& numPoints, const unsigned int& bufferLevels, const TeBufferType& bufferType, vector<TePolygonSet>& polyVecOut);
 
-	bool TeBufferRegion(const TeLine2D& line, const double& bufferDistance, const short& numPoints, TePolygonSet& ps);
+	/** \brief Calculates a buffer region around an object line set.
+		\param lineSetIn			the object line set
+		\param bufferDistance		the desired distance in the same unit as lines coordinates
+		\param numPoints			the number of points that should be used to describe the curved corners of the buffer zone
+		\param bufferLevels			the number of buffer intervals
+		\param polyVecOut			to return the buffers of the object, each level in a position of the vector
+		\return Returns true if operation succeed otherwise returns false.
+	*/	
+	TL_DLL bool TeBufferRegion(const TeLineSet& lineSetIn, const double& bufferDistance, const unsigned int& numPoints, const unsigned int& bufferLevels, vector<TePolygonSet>& polyVecOut);
 
-	bool TeBufferRegion(const TePolygon& pol, const double& bufferDistance, const short& numPoints, TePolygonSet& ps);
+	/** \brief Calculates a buffer region around an object point set.
+		\param pointSetIn			the object point set
+		\param bufferDistance		the desired distance in the same unit as points coordinates
+		\param numPoints			the number of points that should be used to describe the curved corners of the buffer zone
+		\param bufferLevels			the number of buffer intervals
+		\param polyVecOut			to return the buffers of the object, each level in a position of the vector
+		\return Returns true if operation succeed otherwise returns false.
+	*/			
+	TL_DLL bool TeBufferRegion(const TePointSet& pointSetIn, const double& bufferDistance, const unsigned int& numPoints, const unsigned int& bufferLevels, vector<TePolygonSet>& polyVecOut);
+	
+	/** \brief Calculates a buffer region around an object cell set.
+		\param cellSetIn			the object cell set
+		\param bufferDistance		the desired distance in the same unit as cells coordinates
+		\param numPoints			the number of points that should be used to describe the curved corners of the buffer zone
+		\param bufferLevels			the number of buffer intervals
+		\param bufferType			the buffer type: inside/outside/inside+outside
+		\param polyVecOut			to return the buffers of the object, each level in a position of the vector
+		\return Returns true if operation succeed otherwise returns false.
+	*/			
+	TL_DLL bool TeBufferRegion(const TeCellSet& cellSetIn, const double& bufferDistance, const unsigned int& numPoints, const unsigned int& bufferLevels, const TeBufferType& bufferType, vector<TePolygonSet>& polyVecOut);
 
 }	// end namespace TeBUFFER
 
diff --git a/src/terralib/kernel/TeCentroid.cpp b/src/terralib/kernel/TeCentroid.cpp
old mode 100644
new mode 100755
index 39bd7a2..69245fb
--- a/src/terralib/kernel/TeCentroid.cpp
+++ b/src/terralib/kernel/TeCentroid.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -37,6 +37,33 @@ using namespace std;
 TeCoord2D TeFindBaricenter (const TeLinearRing& ring ); // general method ( solves most cases)
 TeCoord2D TeFindCentroidConcavePolygon (const TePolygon& poly ); // brute-force approach (use if above fails)
 
+TeCoord2D
+TeFindCentroid(TeMultiGeometry& mGeom )
+{
+	TeBox bb;
+	TeCoord2D ct;
+	if(mGeom.hasPolygons())
+	{
+		ct = TeFindCentroid(mGeom.getPolygons());
+		updateBox(bb,ct);
+	}
+	if(mGeom.hasCells())
+	{
+		ct = TeFindCentroid(mGeom.getCells());
+		updateBox(bb,ct);
+	}
+	if(mGeom.hasLines())
+	{
+		ct = TeFindCentroid(mGeom.getLines());
+		updateBox(bb,ct);
+	}
+	else if(mGeom.hasPoints())
+	{
+		ct = TeFindCentroid(mGeom.getPoints());
+		updateBox(bb,ct);
+	}
+	return bb.center();
+}
 
 TeCoord2D
 TeFindCentroid(const TePolygon& poly )
@@ -80,39 +107,35 @@ TeFindCentroid(const TePoint& p)
 	return p.location();
 }
 
+TeCoord2D 
+TeFindCentroid(const TeText& t) 
+{
+	return t.location();
+}
 
 TeCoord2D 
 TeFindCentroid(const TePolygonSet& s)
 {
-	TePointSet pset;
+	TeCoord2D p;
+	if (s.empty())
+		return p;
+	double sx = 0.0;
+	double sy = 0.0;
+	unsigned int n = 0;
+
+	TeBox bb = s.box();
 	TePolygonSet::iterator it1 = s.begin(); 
 	while (it1 != s.end())
 	{
 		TeCoord2D p1 = TeFindCentroid (*it1);
-		TePoint po;
-		po.add (p1);
-		pset.add (po);
-		it1++;
-	}
-
-	double x, y;
-	int n = 0;
-	TePointSet::iterator it2 = pset.begin(); 
-	while (it2 != pset.end())
-	{
-		x =+ (*it2).location().x();
-		y =+ (*it2).location().y();
-		n++;
-		it2++;
-	}
-	
-	TeCoord2D p;
-	if (n != 0)
-	{
-		x = x/n;
-		y = y/n;
-		p.setXY (x, y);
+		sx += p1.x();
+		sy += p1.y();
+		++n;
+		++it1;
 	}
+	double ssx = sx/n;
+	double ssy = sy/n;
+	p.setXY(ssx,ssy);
 	return p;
 }
 
@@ -120,35 +143,24 @@ TeFindCentroid(const TePolygonSet& s)
 TeCoord2D 
 TeFindCentroid(const TeLineSet& s)
 {
-	TePointSet pset;
+	TeCoord2D p;
+	if (s.empty())
+		return p;
+	double sx = 0.0;
+	double sy = 0.0;
+	unsigned int n = 0;
 	TeLineSet::iterator it1 = s.begin(); 
 	while (it1 != s.end())
 	{
 		TeCoord2D p1 = TeFindCentroid (*it1);
-		TePoint po;
-		po.add (p1);
-		pset.add (po);
+		sx += p1.x();
+		sy += p1.y();
+		++n;
 		it1++;
 	}
-
-	double x, y;
-	int n = 0;
-	TePointSet::iterator it2 = pset.begin(); 
-	while (it2 != pset.end())
-	{
-		x =+ (*it2).location().x();
-		y =+ (*it2).location().y();
-		n++;
-		it2++;
-	}
-	
-	TeCoord2D p;
-	if (n != 0)
-	{
-		x = x/n;
-		y = y/n;
-		p.setXY (x, y);
-	}
+	sx = sx/n;
+	sy = sy/n;
+	p.setXY(sx,sy);
 	return p;
 }
 
@@ -156,52 +168,45 @@ TeFindCentroid(const TeLineSet& s)
 TeCoord2D 
 TeFindCentroid(const TeCellSet& s)
 {
-	TePointSet pset;
+	TeCoord2D p;
+	if (s.empty())
+		return p;
+	double sx = 0.0;
+	double sy = 0.0;
+	unsigned int n = 0;
 	TeCellSet::iterator it1 = s.begin(); 
 	while (it1 != s.end())
 	{
 		TeCoord2D p1 = TeFindCentroid (*it1);
-		TePoint po;
-		po.add (p1);
-		pset.add (po);
+		sx += p1.x();
+		sy += p1.y();
+		++n;
 		it1++;
 	}
-
-	double x, y;
-	int n = 0;
-	TePointSet::iterator it2 = pset.begin(); 
-	while (it2 != pset.end())
-	{
-		x =+ (*it2).location().x();
-		y =+ (*it2).location().y();
-		n++;
-		it2++;
-	}
-	
-	TeCoord2D p;
-	if (n != 0)
-	{
-		x = x/n;
-		y = y/n;
-		p.setXY (x, y);
-	}
+	sx = sx/n;
+	sy = sy/n;
+	p.setXY(sx,sy);
 	return p;
 }
 
 TeCoord2D 
 TeFindCentroid(TePointSet& points)
 {
-	TeCoord2D result;
+	TeCoord2D p;
+	if (points.empty())
+		return p;
 	if (points.size() == 1)
-		result = (points[0]).location();
+		p = (points[0]).location();
 	else
-	{
-		TeBox bpt = points.box();
-		result = bpt.center();
-	}
-	return result;
+		p = points.box().center();
+	return p;
 }
 
+TeCoord2D 
+TeFindCentroid(TeTextSet& texts)
+{
+	return texts.box().center();
+}
 /*
  * ANSI C++ code from the article
  * "Centroid of a Polygon"
diff --git a/src/terralib/kernel/TeCommunicator.h b/src/terralib/kernel/TeCommunicator.h
new file mode 100755
index 0000000..7b3916d
--- /dev/null
+++ b/src/terralib/kernel/TeCommunicator.h
@@ -0,0 +1,413 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeCommunicator.h
+    \brief This file contains  class to deal with inter-class communication.
+	\author Emiliano F. Castejon <castejon at dpi.inpe.br>
+*/
+
+#ifndef TECOMMUNICATOR_H
+  #define TECOMMUNICATOR_H
+  
+  #include "TeMutex.h"
+  #include "TeAgnostic.h"
+
+  #include <list>
+  #include <algorithm>
+  
+  /**
+   * @brief A macro for use when declaring class wrapper functions that will
+   * be connected to a TeCommunicator instance.
+   *
+   * @param function_name The function name.
+   * @param param_type The function pamrameter data type.
+   * @param class_name The function's host class name.
+   * @note The function body must be implemented.
+   */
+  #define TECOMMWRAPPER( function_name, param_type, class_name ) \
+    protected : void function_name( const param_type& x ); \
+    public : static void function_name( const param_type& x, void* objptr ) \
+    { \
+      class_name * casted_ptr = ( class_name * ) objptr; \
+      casted_ptr->function_name( x ); \
+    };
+    
+  /**
+   * @brief This is the template class to deal with inter-class communication.
+   * @note This is a thread-safe class.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup Utils
+   */
+  template< typename DataType >
+  class TeCommunicator 
+  {
+    public :
+    
+      /**
+       * @brief The objects wrapper function pointer.
+       *
+       * @param DataType The data type.
+       * @param void A cast pointer to the active object instance.
+       */        
+      typedef void (*WrapperFuncPtrT)( const DataType&, void* );
+            
+      /**
+       * @brief Default Constructor.
+       *
+       * @param host_obj_ptr A pointer to the active class instance.
+       * @param wrapper_func_ptr A pointer to the class wrapper static
+       * function.
+       * @param enabled_flag The emission/reception enabling/disabling flag.
+       */
+      TeCommunicator( void* host_obj_ptr = 0,
+        WrapperFuncPtrT wrapper_func_ptr = 0,
+        bool enabled_flag = true );
+
+      /**
+       * @brief Default Destructor
+       */
+      ~TeCommunicator();
+      
+      /**
+       * @brief Connects the current instance to a class wrapper function.
+       *
+       * @param host_obj_ptr A pointer to the active class instance.
+       * @param wrapper_func_ptr A pointer to the class wrapper static
+       * function.
+       */      
+      void setHostObj( void* host_obj_ptr = 0, 
+        WrapperFuncPtrT wrapper_func_ptr = 0 );
+      
+      /**
+       * @brief Connects the current instance to another active instance.
+       *
+       * @param external The external active instance reference.
+       * @return true if OK, false on errors.
+       */         
+      bool connect( TeCommunicator< DataType>& external );
+      
+      /**
+       * @brief Disconnects the current instance from all connected instances.
+       */         
+      void disconnect();
+      
+      /**
+       * @brief Disconnects the current instance from another instance.
+       *
+       * @param external The external active instance reference.
+       */        
+      void disconnect( TeCommunicator< DataType>& external );
+      
+      /**
+       * @brief Send data to all connected instances.
+       *
+       * @param data The data to be sent.
+       */        
+      void send( const DataType& data ) const;
+      
+      /**
+       * @brief Enables/disables the data emission and rececption.
+       *
+       * @param enabled_flag The emission/reception enabling/disabling flag.
+       */        
+      void toggle( bool enabled_flag );      
+      
+      /**
+       * @brief Check if this instance emission/reception is enabled.
+       * @return true if enabled, false if disabled.
+       */        
+      bool isEnabled();          
+      
+    protected :
+      
+      /** @typedef TeCommunicator< DataType >* ComPtrT
+       *  Communicator pointer type definition.
+       */
+      typedef TeCommunicator< DataType >* ComPtrT;
+      
+      /** @typedef std::list< ComPtrT > ContainerT
+       *  Connected communicators pointers container type definition.
+       */ 
+      typedef std::list< ComPtrT > ContainerT;
+      
+      /** @typedef typename ContainerT::iterator ContItT
+       *  Connected communicators pointers container iterator type definition.
+       */       
+      typedef typename ContainerT::iterator ContItT;      
+      
+      /**
+       * @brief Used when another active instance requests to be connected to this
+       * instance.
+       *
+       * @param my_pointer The pointer of the active instance.
+       */       
+      void ConnectMe( ComPtrT my_pointer );
+      
+      /**
+       * @brief Used when another active instance requests to be disconnected from 
+       * this instance.
+       *
+       * @param my_pointer The pointer of the active instance.
+       */       
+      void DisconnectMe( ComPtrT my_pointer );
+      
+      /**
+       * @brief Used when another active instance sends data to this instance.
+       *
+       * @param data The sent data.
+       */        
+      inline void Receive( const DataType& data ) const; 
+      
+    private :
+    
+      /**
+       * @brief A flag indication for enabled/disabled.
+       */     
+      bool emission_reception_enabled_;
+    
+      /**
+       * @brief A pointer to the host object wrapper function.
+       */      
+      WrapperFuncPtrT wrapper_func_ptr_;
+      
+      /**
+       * @brief A pointer to the host object active instance.
+       */
+      void* host_obj_ptr_;
+      
+      /**
+       * @brief A list of pointers to the connected active instances.
+       */
+      mutable ContainerT connections_;
+      
+      /** @brief Thread lock instance. */
+      mutable TeMutex lock_instance_;      
+      
+      /**
+       * @brief Copy constructor not allowed.
+       */
+      TeCommunicator( const TeCommunicator< DataType >& ) {};
+      
+      /**
+       * @brief Copy operation not allowed.
+       */
+      const TeCommunicator< DataType >& operator=( 
+        const TeCommunicator< DataType >& ) {};
+      
+  };
+  
+
+  template< typename DataType >  
+  TeCommunicator< DataType >::TeCommunicator( void* host_obj_ptr,
+    WrapperFuncPtrT wrapper_func_ptr, bool enabled_flag )
+  {
+    wrapper_func_ptr_ = 0;
+    host_obj_ptr_ = 0;
+    emission_reception_enabled_ = enabled_flag;
+    
+    setHostObj( host_obj_ptr, wrapper_func_ptr );
+  }
+  
+  
+  template< typename DataType >  
+  TeCommunicator< DataType >::~TeCommunicator()
+  {
+    disconnect();
+  }
+  
+  
+  template< typename DataType >  
+  void TeCommunicator< DataType >::setHostObj( void* host_obj_ptr,
+    WrapperFuncPtrT wrapper_func_ptr )
+  {
+    lock_instance_.lock();
+    
+//   TEAGN_TRUE_OR_THROW( (wrapper_func_ptr != 0), 
+//      ( ( wrapper_func_ptr == 0 ) && ( host_obj_ptr == 0 ) ) || 
+//      ( ( wrapper_func_ptr != 0 ) && ( host_obj_ptr != 0 ) ) ), 
+//      "Invalid receiver_func_ptr/host_obj_ptr parameters" );
+      
+    wrapper_func_ptr_ = wrapper_func_ptr;
+    host_obj_ptr_ = host_obj_ptr;
+    
+    lock_instance_.unLock();
+  }
+  
+  
+  template< typename DataType >
+  bool TeCommunicator< DataType >::connect( 
+    TeCommunicator< DataType>& external )
+  {
+    lock_instance_.lock();
+    
+//    if( ( wrapper_func_ptr_ == 0 ) || ( host_obj_ptr_ == 0 ) ) {
+	  if( wrapper_func_ptr_ == 0 ) {
+      lock_instance_.unLock();
+      
+      TEAGN_LOGERR( "Connecting a inactive communicator instance" );
+      
+      return false;
+    }
+    
+    ContItT it = find( connections_.begin(), connections_.end(),
+      &external );
+
+    if( it == connections_.end() ) {
+      connections_.push_back( &external );
+      external.ConnectMe( this );
+    }
+    
+    lock_instance_.unLock();
+    
+    return true;
+  }
+  
+
+  template< typename DataType >
+  void TeCommunicator< DataType >::disconnect()
+  {
+    lock_instance_.lock();
+    
+    ContItT it = connections_.begin();
+    ContItT it_end = connections_.end();
+
+    while( it != it_end ) {
+      (*it)->DisconnectMe( this );
+      
+      ++it;
+    }
+    
+    connections_.clear();
+    
+    lock_instance_.unLock();
+  }
+  
+  
+  template< typename DataType >
+  void TeCommunicator< DataType >::disconnect( 
+    TeCommunicator< DataType>& external )
+  {
+    lock_instance_.lock();
+    
+    ContItT it = find( connections_.begin(), connections_.end(),
+      &external );
+      
+    if( it != connections_.end() ) {
+      (*it)->DisconnectMe( this );
+      connections_.erase( it );
+    }
+    
+    lock_instance_.unLock();
+  }
+
+  
+  template< typename DataType >
+  void TeCommunicator< DataType >::ConnectMe( 
+    ComPtrT my_pointer )
+  {
+    lock_instance_.lock();
+    
+    ContItT it = find( connections_.begin(), connections_.end(),
+      my_pointer );
+      
+    if( it == connections_.end() ) {
+      connections_.push_back( my_pointer );
+    }
+    
+    lock_instance_.unLock();
+  }
+
+  
+  template< typename DataType >
+  void TeCommunicator< DataType >::DisconnectMe( 
+    ComPtrT my_pointer )
+  {
+    lock_instance_.lock();
+    
+    ContItT it = find( connections_.begin(), connections_.end(),
+      my_pointer );
+      
+    if( it != connections_.end() ) {
+      connections_.erase( it );
+    }
+    
+    lock_instance_.unLock();
+  }
+  
+  
+  template< typename DataType >
+  void  TeCommunicator< DataType >::send( const DataType& data ) const
+  {
+    lock_instance_.lock();
+    
+    if( emission_reception_enabled_ ) {
+      ContItT it = connections_.begin();
+      ContItT it_end = connections_.end();
+      
+      while( it != it_end ) {
+        (*it)->Receive( data );
+        
+        ++it;  
+      }
+    }
+    
+    lock_instance_.unLock();
+  }
+  
+  
+  template< typename DataType >
+  void  TeCommunicator< DataType >::toggle( bool enabled_flag )
+  {
+    lock_instance_.lock();
+    
+    emission_reception_enabled_ = enabled_flag;
+    
+    lock_instance_.unLock();
+  }
+  
+  
+  template< typename DataType >
+  bool TeCommunicator< DataType >::isEnabled()
+  {
+    return emission_reception_enabled_;
+  }  
+
+  
+  template< typename DataType >
+  inline void  TeCommunicator< DataType >::Receive( 
+    const DataType& data ) const
+  {
+    lock_instance_.lock();
+    
+    if( emission_reception_enabled_ && ( wrapper_func_ptr_ != 0 ) ) {
+      wrapper_func_ptr_( data, host_obj_ptr_ );
+    }
+    
+    lock_instance_.unLock();
+  }
+  
+/** @example TeCommunicator_test.cpp
+ *    Shows how to use this class.
+ */  
+    
+#endif
+
diff --git a/src/terralib/kernel/TeComposite.h b/src/terralib/kernel/TeComposite.h
old mode 100644
new mode 100755
index bddb193..c946903
--- a/src/terralib/kernel/TeComposite.h
+++ b/src/terralib/kernel/TeComposite.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,9 +20,8 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeComposite.h
-    This file contains definition of composite structures in TerraLib
+    \brief This file contains definition of composite structures in TerraLib
 */
 
 #ifndef  __TERRALIB_INTERNAL_COMPOSITE_H
@@ -31,6 +30,7 @@ of this library and its documentation.
 #include "TeCounted.h"
 
 #include <vector>
+#include <algorithm>
 using namespace std;
 
 //!  Defines a templated class for handling an object built of one single atomic element
@@ -91,6 +91,7 @@ public:
 
 	//! An iterator to the composite elements 
 	typedef typename vector<T>::iterator iterator;
+	typedef typename vector<T>::const_iterator const_iterator;
 
 	//! Adds a new component
 	void add ( const T& elem )
@@ -113,7 +114,7 @@ public:
 		typename vector<T>::iterator location = find(components_.begin(),components_.end(), elem);
 		if ( location != components_.end())
 		{
-			components_.erase(elem);
+			components_.erase(location);
 			return true;
 		}
 		else
@@ -131,7 +132,7 @@ public:
 	{	components_.clear (); }
 
 	//! Returns the size of the composite
-	unsigned int size() const
+	size_t size() const
 	{ return components_.size(); }
 
 	//! Returns the i-th element
@@ -152,24 +153,12 @@ public:
 		return components_.begin();
 	}
 
-	//! Returns an iterator to the composite first element
-	const iterator begin(void) const
-	{
-		return components_.begin();
-	}
-
 	//! Returns a iterator to the composite last plus one element
     iterator end(void)
 	{
 		return components_.end();
 	}
 
-	//! Returns an iterator to the composite last plus one element
-    const iterator end(void) const
-	{
-		return components_.end();
-	}
-
 	//! A reverse iterator to the composite elements 
 	typedef typename vector<T>::reverse_iterator reverse_iterator;
 
diff --git a/src/terralib/kernel/TeComputeAttributeStrategies.cpp b/src/terralib/kernel/TeComputeAttributeStrategies.cpp
old mode 100644
new mode 100755
index ef711cc..e5fe25f
--- a/src/terralib/kernel/TeComputeAttributeStrategies.cpp
+++ b/src/terralib/kernel/TeComputeAttributeStrategies.cpp
@@ -1,969 +1,462 @@
-// TeSpatialOperators.cpp: implementation of the TeSpatialOperators class.
-//
-//////////////////////////////////////////////////////////////////////
 
 #include "TeComputeAttributeStrategies.h"
 #include "TeSTElementSet.h"
 #include "TeOverlay.h"
+#include <TeGeometryAlgorithms.h>
+#include <TeSTEFunctionsDB.h>
+#include <TeRaster.h>
+#include <TeQuerier.h>
+#include <TeQuerierParams.h>
 
 using namespace TeOVERLAY;
 
-bool TeNearest (TeCoord2D& pt,TePointSet& ps, TeCoord2D& pout, double& dmin, const double& tol = 0.0);
-
-TePropertyVector 
-TeCategoryAreaPercentageStrategy::compute (TeTheme* theme, const string& attrName, TeBox box, const string& columnName)  
+// For relative values to be weighted in space (e.g., population densitity, malaria per number of inhabitants, etc.)	
+string TeAverageWeighByAreaStrategy::compute (TeBox box)  
 {
+	double weigh_val = 0.0;
 
-	// convert input box to a polygonset
-	TePolygonSet box_ps = TeBox2PolygonSet (box);
-	map<string, double>  areaMap;
-	double partial_area = 0.0;
-
-	// Build stoset
-	TeSTElementSet stos (theme);
-	vector<string> attrNames;
-	attrNames.push_back (attrName);	
-	if (TeSTOSetBuildDB (&stos, true, false, attrNames))
-		{	
-		
-			// initialize areMap
-			map<string, string>::iterator itMap = classesMap_.begin();
-			while (itMap != classesMap_.end())
-			{
-				areaMap[(*itMap).second] = 0;
-				++itMap;
-			}
-			partial_area = 0.0;
-			// iterate over all objects that intercept the box
-			TeSTElementSet::iterator it = stos.begin();
-			while (it != stos.end())
-			{
-				string category;
-				if ((*it).getPropertyValue (attrName, category))
-				{	
-					TePolygonSet objGeom;  
-					if ((*it).getGeometry(objGeom))
-					{
-						TePolygonSet intersect;
-						TeOverlay(box_ps, objGeom, intersect, TeINTERSECTION);
-						double intersectArea = TeGeometryArea (intersect);
-						partial_area += intersectArea;
-						areaMap[classesMap_[category]] +=  intersectArea; // suppose objects are disjoint
-					
-					}
-			
-				}
-				++it;
-			}
-		}
-
-	double areaTot = TeGeometryArea (box_ps);
-	double perc_total = 0.0;
-	double corrected_perc_total = 0.0;
-	vector<double> vec_percent;
-
+	TeQuerier* querier = getWithinGeometry(box, attribute);
 
-	map <string, double>:: iterator areaIt = areaMap.begin();
-	while(areaIt != areaMap.end())  
-	{
-		double percent = 0.0;
-		if (areaTot != 0) percent = (*areaIt).second/areaTot;
-		perc_total += percent;
-		vec_percent.push_back (percent);
-		++areaIt;
-	}
+    int quant = querier->numElemInstances();			
+	
+	TePolygonSet box_ps, intersect, objGeom;
+	TeSTInstance sti;
+	TePolygon pol = polygonFromBox(box);
+	box_ps.add(pol);
 
+	double areaBox = TeGeometryArea(box);
+	if (areaBox <= 0.0) return Te2String(0);
 
-	int i = 0;
-	if (perc_total > 1.5) 
+	for(int i = 0; i < quant; i++)
 	{
-		areaIt = areaMap.begin();
-		while(areaIt != areaMap.end())  
-		{
-			if ((*areaIt).first == "")
-			{
-				perc_total = perc_total - vec_percent[i];
-				vec_percent[i] = 0.0;
-			}
-			++areaIt;
-			i++;
-		}
-	}
+		querier->fetchInstance (sti);
+		objGeom = sti.geometries().getPolygons();
 
-	i = 0;
-	if (perc_total > 1.02) 
-	{
-		areaIt = areaMap.begin();
-		while(areaIt != areaMap.end())  
-		{
-			vec_percent[i] = vec_percent[i]/perc_total;
-			++areaIt;
-			i++;
-		}
-	}	
+		string val;
+		sti.getPropertyValue(attribute, val);
+		double num_val = atof(val.c_str());
 	
-	TePropertyVector  result;
-	i= 0;
-	areaIt = areaMap.begin();
-	while(areaIt != areaMap.end())  
-	{
-	
-		TeProperty prop;
-		double percent = vec_percent[i];
-		corrected_perc_total += percent;
-		prop.value_    = Te2String (percent); // count
-		prop.attr_.rep_.name_ = columnName + (*areaIt).first; // category
-		prop.attr_.rep_.type_ = TeREAL;
-		result.push_back (prop);
-		++areaIt;
-		i++;
-
-	}
-	return result;
-
-}
-
-
-
-
-// For relative values to be weighted in space (e.g., population densitity, malaria per number of inhabitants, etc.)	
-
-TePropertyVector  TeAverageWeighbyAreaStrategy::
-compute (TeTheme* theme, const string& attrName, TeBox box, const string& columnName)  
-{
-
-	double weigh_val = 0.0;
-
-
-	// Build stoset
-	TeSTElementSet stos (theme);
-	vector<string> attrNames;
-	attrNames.push_back (attrName);	
-	if (TeSTOSetBuildDB (&stos, true, false, attrNames))
-	{	
-
-		// convert input box to a polygonset
-		TePolygonSet box_ps = TeBox2PolygonSet (box);
-		double areaBox = TeGeometryArea(box);
-		if (areaBox > 0.0)
-		{
-			TeSTElementSet::iterator it = stos.begin();
-			while (it != stos.end())
-			{
-				string val;
-				if ((*it).getPropertyValue (attrName, val))
-				{
-					double num_val = atof (val.c_str());
-					TePolygonSet objGeom;  
-					if ((*it).getGeometry(objGeom))
-					{
-					
-						// for (unsigned int i = 0 ; i < objGeom.size(); i++)
-						//	TeRemoveDuplicatedCoordinates (objGeom[i]);
-						TePolygonSet intersect;
-						TeOverlay(box_ps, objGeom, intersect, TeINTERSECTION);
-						double intersectArea = TeGeometryArea (intersect);
-						weigh_val += num_val*(intersectArea/areaBox); // suppose objects are disjoint
-		
-					
-					}
-				}
-				++it;
-			}
-		}
+		TeOverlay(box_ps, objGeom, intersect, TeINTERSECTION);
+		double intersectArea = TeGeometryArea (intersect);
+		weigh_val += num_val*(intersectArea/areaBox); // suppose objects are disjoint
 	}
 
- 	TeProperty  prop;
-	prop.value_ = Te2String (weigh_val);
-	prop.attr_.rep_.name_ = columnName;
-	prop.attr_.rep_.type_ = TeREAL;
-
-	TePropertyVector  result;
-	result.push_back (prop);
-	return result;
+	delete querier;
+	return Te2String (weigh_val);
 }
 
-
-
-
-
-TePropertyVector 
-TeCategorySoilsAreaPercentageStrategy::compute (TeTheme* theme, const string& attrName, TeBox box, const string& columnName)  
+string TeCategoryMajorityStrategy::compute (TeBox box)  
 {
-
 	map<string, double>  areaMap;
-	double partial_area = 0.0;
 
-	// convert input box to a polygonset
-	TePolygonSet box_ps = TeBox2PolygonSet (box);
-	map<string, double> categoryMap;
-
-
-	// Build stoset
-	TeSTElementSet stos (theme);
-	vector<string> attrNames;
-	attrNames.push_back (attrName);	
-	if (TeSTOSetBuildDB (&stos, true, false, attrNames))
-	{	
-	
-			// initialize areMap
-			map<string, string>::iterator itMap = classesMap_.begin();
-			while (itMap != classesMap_.end())
-			{
-				areaMap[(*itMap).second] = 0;
-				++itMap;
-			}
-			partial_area = 0.0;
-			// iterate over all objects that intercept the box
-			TeSTElementSet::iterator it = stos.begin();
-			while (it != stos.end())
-			{
-				string category;
-				if ((*it).getPropertyValue (attrName, category))
-				{	
-					TePolygonSet objGeom;  
-					if ((*it).getGeometry(objGeom))
-					{
-						TePolygonSet intersect;
-						TeOverlay(box_ps, objGeom, intersect, TeINTERSECTION);
-						double intersectArea = TeGeometryArea (intersect);
-						partial_area += intersectArea;
-						areaMap[classesMap_[category]] +=  intersectArea; // suppose objects are disjoint
-						categoryMap[category] +=  intersectArea; 
-					}
-			
-				}
-				++it;
-			}
-		}
-
-	double areaTot = TeGeometryArea (box_ps);
-
-	map <string, double>:: iterator categoryIt = categoryMap.begin();
-	if (partial_area > (1.5*areaTot)) 
+	// initialize areMap
+	map<string, string>::iterator itMap = classesMap.begin();
+	while( itMap != classesMap.end() )
 	{
-		while(categoryIt != categoryMap.end())  
-		{
-			if ((*categoryIt).first == "")
-			{
-				partial_area -= (*categoryIt).second;
-				areaMap[classesMap_[(*categoryIt).first]] -= (*categoryIt).second;
-				(*categoryIt).second = 0.0;
-			}
-			++categoryIt;
-		}
+		areaMap[(*itMap).second] = 0;
+		++itMap;
 	}
 
-	int i = 0;
-	double perc_total = 0.0;
-	vector<double> vec_percent;		
-	map <string, double>:: iterator areaIt = areaMap.begin();
-	while(areaIt != areaMap.end())  
-	{
-		double percent = 0.0;
-		if (areaTot != 0) percent = (*areaIt).second/areaTot;
-		perc_total += percent;
-		vec_percent.push_back (percent);
-		++areaIt;
-	}
+	TeQuerier* querier = getWithinGeometry(box, attribute);
 
-	double corrected_perc_total = 0.0;
-	i = 0;
-	if (perc_total > 1.02) 
-	{
-		areaIt = areaMap.begin();
-		while(areaIt != areaMap.end())  
-		{
-			vec_percent[i] = vec_percent[i]/perc_total;
-			++areaIt;
-			i++;
-		}
-	}	
+    int quant = querier->numElemInstances();			
 	
-	TePropertyVector  result;
-	i= 0;
-	areaIt = areaMap.begin();
-	while(areaIt != areaMap.end())  
+	TePolygonSet box_ps, intersect, objGeom;
+	TeSTInstance sti;
+	TePolygon pol = polygonFromBox(box);
+	box_ps.add(pol);
+
+	for(int i = 0; i < quant; i++)
 	{
+		querier->fetchInstance (sti);
+		objGeom = sti.geometries().getPolygons();
 	
-		TeProperty prop;
-		double percent = vec_percent[i];
-		corrected_perc_total += percent;
-		prop.value_    = Te2String (percent); // count
-		prop.attr_.rep_.name_ = columnName + (*areaIt).first; // category
-		prop.attr_.rep_.type_ = TeREAL;
-		result.push_back (prop);
-		++areaIt;
-		i++;
+		string category;
+		sti.getPropertyValue(attribute, category);
 
+		TePolygonSet intersect;
+		TeOverlay(box_ps, objGeom, intersect, TeINTERSECTION);
+		double intersectArea = TeGeometryArea (intersect);
+		areaMap[classesMap[category]] += intersectArea; // suppose objects are disjoint
 	}
-	return result;
-
-}
-
-TePropertyVector 
-TeCategoryMajorityStrategy::compute (TeTheme* theme, const string& attrName, TeBox box, const string& columnName)  
-{
-	map<string, double>  areaMap;
-	// convert input box to a polygonset
-	TePolygonSet box_ps = TeBox2PolygonSet (box);
 
-	// Build stoset
-	TeSTElementSet stos (theme);
-	vector<string> attrNames;
-	attrNames.push_back (attrName);	
-	if (TeSTOSetBuildDB (&stos, true, false, attrNames))
-	{	
-			// initialize areMap
-			map<string, string>::iterator itMap = classesMap_.begin();
-			while (itMap != classesMap_.end())
-			{
-				areaMap[(*itMap).second] = 0;
-				++itMap;
-			}
-
-			// iterate over all objects that intercept the box
-			TeSTElementSet::iterator it = stos.begin();
-			while (it != stos.end())
-			{
-				string category;
-				if ((*it).getPropertyValue (attrName, category))
-				{	
-
-					TePolygonSet objGeom;  
-					if ((*it).getGeometry(objGeom))
-					{
-						TePolygonSet intersect;
-						TeOverlay(box_ps, objGeom, intersect, TeINTERSECTION);
-						double intersectArea = TeGeometryArea (intersect);
-						areaMap[classesMap_[category]] +=  intersectArea; // suppose objects are disjoint
-					}
-			
-				}
-				++it;
-			}
-		}
+	delete querier;
 
 	double max = 0.0;
-	TePropertyVector  result;
-	TeProperty prop;
-	prop.attr_.rep_.type_ = TeSTRING;
-//	prop.value_ = defaultValue_.value_;
-	prop.attr_.rep_.name_ = columnName; 
-	prop.attr_.rep_.numChar_ = 48;
+	string value;
+
 	map <string, double>:: iterator it = areaMap.begin();
 	while(it != areaMap.end())  
+	{
+		if ((*it).second > max)
 		{
-			if ((*it).second > max)
-			{
-				prop.value_ = (*it).first;
-				max = (*it).second;
-			}
-			++it;		
+			value = (*it).first;
+			max   = (*it).second;
 		}
+		++it;		
+	}
 
-
-	result.push_back (prop);
-	return result;
-
+	return value;
 }
 
-TePropertyVector TeTotalAreaPercentageStrategy:: 
-compute (TeTheme* theme, const string& attrName, TeBox box, const string& columnName)
+
+string TeTotalAreaPercentageStrategy::compute (TeBox box)
 {  
 	double area = TeGeometryArea(box);
 	double totArea = 0.0;
 
-	if (area > 0.0)
+	if (area <= 0.0) return Te2String(0);
+
+	TeQuerier* querier = getWithinGeometry(box);
+    int quant = querier->numElemInstances();			
+	
+	TePolygonSet box_ps, intersect, objGeom;
+	TeSTInstance sti;
+	TePolygon pol = polygonFromBox(box);
+	box_ps.add(pol);
+
+	for(int i = 0; i < quant; i++)
 	{
-		// convert input box to a polygonset
-		TePolygonSet box_ps = TeBox2PolygonSet (box);
-
-		// Build stoset
-		TeSTElementSet stos (theme);
-		vector<string> attrNames;
-		attrNames.push_back (attrName);	
-		if (TeSTOSetBuildDB (&stos, true, false, attrNames))
-		{
-			// iterate over all objects that intercept the box
-			TeSTElementSet::iterator it = stos.begin();
-			while (it != stos.end())
-			{
-				TePolygonSet objGeom;  
-				if ((*it).getGeometry(objGeom))
-				{
-						TePolygonSet intersect;
-						//TeGeometryAlgorithmsPrecision temp(0.0);
-						TeOverlay(box_ps, objGeom, intersect, TeINTERSECTION);
-						double intersectArea = TeGeometryArea (intersect);
-						totArea +=  intersectArea; // suppose objects are disjoint
-		
-				}
-				++it;
-			}
-		}
+		querier->fetchInstance (sti);
+		objGeom = sti.geometries().getPolygons();
+	
+		TeOverlay(box_ps, objGeom, intersect, TeINTERSECTION);
+			
+		double intersectArea = TeGeometryArea (intersect);
+		totArea += intersectArea; // suppose objects are disjoint
 	}
-
-	double percentage = 0.0;
-	if (area > 0.0) percentage = totArea/area;
+	
+	double percentage = totArea/area;
 
 	if (percentage > 0.999) percentage = 1;
-	TeProperty  prop;
-	prop.value_ = Te2String (percentage);
-	prop.attr_.rep_.name_ = columnName;
-	prop.attr_.rep_.type_ = TeREAL;
-	TePropertyVector  result;
-	result.push_back (prop);
-	return result;
+
+	delete querier;
+	return Te2String (percentage);
 }
 
 
+string TeCountObjectsStrategy::compute(TeBox box)
+{
+	TeQuerier* querier = getWithinGeometry(box);
+    int quant = querier->numElemInstances();
+	delete querier;
+	return Te2String (quant);
+}
 
-TePropertyVector  TeCountPolygonalObjectsStrategy::
-compute (TeTheme* theme, const string& attrName, TeBox /* box */, const string& columnName)
+string TeCountLineObjectsStrategy::compute(TeBox box)
 {
-	// Build stoset
-	TeSTElementSet stos (theme);
-	vector<string> attrNames;
-	attrNames.push_back (attrName);	
-	TeSTOSetBuildDB (&stos, true, false, attrNames);
-
-	TeProperty  prop;
-	prop.attr_.rep_.name_ = columnName;
-	prop.attr_.rep_.type_ = TeREAL;
-	prop.value_ = Te2String (stos.numElements());
-	TePropertyVector  result;
-	result.push_back (prop);
-	return result;
+	TeQuerier* querier = getWithinGeometry(box);
+    int quant = querier->numElemInstances();
+	int found = 0;
+	
+	TePolygonSet box_ps;
+	TeLineSet intersect, objGeom;
+	TeSTInstance sti;
+	TeMultiGeometry mg;
+    TePolygon pol = polygonFromBox(box);
+    box_ps.add(pol);
+
+	for(int i = 0; i < quant; i++)
+	{
+		querier->fetchInstance (sti);
+		objGeom = sti.geometries().getLines();
+
+        TeLineSet intersect;
+        mg = TeOverlay(objGeom, box_ps, TeINTERSECTION);
+
+        intersect = mg.getLines();
+        if(!intersect.empty()) found++;
+	}
+	
+	delete querier;
+	return Te2String (found);
 }
 
 
-TePropertyVector  TeCountLineObjectsStrategy::
-compute (TeTheme* theme, const string& attrName, TeBox /* box */, const string& columnName)
+string TeCountPolygonalObjectsStrategy::compute(TeBox box)
 {
-	// Build stoset
-	TeSTElementSet stos (theme);
-	vector<string> attrNames;
-	attrNames.push_back (attrName);	
-	TeSTOSetBuildDB (&stos, true, false, attrNames);
-
-	TeProperty  prop;
-	prop.attr_.rep_.name_ = columnName;
-	prop.attr_.rep_.type_ = TeREAL;
-	prop.value_ = Te2String (stos.numElements());
-	TePropertyVector  result;
-	result.push_back (prop);
-	return result;
-}
+	TeQuerier* querier = getWithinGeometry(box);
+    int quant = querier->numElemInstances();
+	int found = 0;
+	
+	TePolygonSet box_ps, intersect, objGeom;
+	TeSTInstance sti;
+    TePolygon pol = polygonFromBox(box);
+    box_ps.add(pol);
 
+	for(int i = 0; i < quant; i++)
+	{
+		querier->fetchInstance (sti);
+		objGeom = sti.geometries().getPolygons();
+	
+		TeOverlay(box_ps, objGeom, intersect, TeINTERSECTION);
+        if(!intersect.empty()) found++;
+	}
+	
+	delete querier;
+	return Te2String (found);
+}
 
 
-TePropertyVector  TeCountPointObjectsStrategy::
-compute (TeTheme* theme, const string& attrName, TeBox /* box */, const string& columnName)
-{  
-	// Build stoset
-	TeSTElementSet stos (theme);
+TeQuerier* TeComputeSpatialStrategy::getWithinGeometry(TeBox box, string attribute)
+{
 	vector<string> attrNames;
-	attrNames.push_back (attrName);	
-	TeSTOSetBuildDB (&stos, true, false, attrNames);
-
-	TeProperty  prop;
-	prop.attr_.rep_.name_ = columnName;
-	prop.attr_.rep_.type_ = TeREAL;
-	prop.value_ = Te2String (stos.numElements());
-	TePropertyVector  result;
-	result.push_back (prop);
-	return result;
+	
+	if(attribute != "") attrNames.push_back (attribute);
+    TeQuerierParams params(true, attrNames);
+
+    params.setParams (theme);
+	params.setSpatialRest(box, TeWITHIN, rep);
+    TeQuerier* querier = new TeQuerier(params);
+	querier->loadInstances();
+	return querier;
 }
 
-
-TePropertyVector  TeLineLengthStrategy::
-compute (TeTheme* theme, const string& attrName, TeBox box, const string& columnName)
+string TeLineLengthStrategy::compute (TeBox box)
 {
 	double length = 0;
 
-	// Build stoset
-	TeSTElementSet stos (theme);
-	vector<string> attrNames;
-	attrNames.push_back (attrName);	
-	if (TeSTOSetBuildDB (&stos, true, false, attrNames))
-	{
-
-		// convert input box to a polygonset
-		TePolygonSet box_ps = TeBox2PolygonSet (box);
+	TeQuerier* querier = getWithinGeometry(box);
+    int quant = querier->numElemInstances();			
+	
+	TePolygonSet box_ps;
+	TeLineSet intersect, objGeom;
+	TeSTInstance sti;
+	TePolygon pol = polygonFromBox(box);
+	box_ps.add(pol);
 
-		double length = 0.0;
-		TeSTElementSet::iterator it = stos.begin();
-		while (it != stos.end())
+	for(int i = 0; i < quant; i++)
+	{
+		querier->fetchInstance (sti);
+		objGeom = sti.geometries().getLines();
+        TeMultiGeometry mg;
+					
+		mg = TeOverlay(objGeom, box_ps, TeINTERSECTION);
+				
+		intersect = mg.getLines();
+		for(TeLineSet::iterator lineIt = intersect.begin(); lineIt != intersect.end(); lineIt++)
 		{
-				TeLineSet objGeom;  
-				if ((*it).getGeometry(objGeom))
-				{
-					TeLineSet intersect;
-	//				if ((TeIntersection (area, (*it).geometry , intersect))
-					TeLineSet::iterator lineIt = intersect.begin();
-					while (lineIt != intersect.end())
-					{
-						length += TeLength (*lineIt); // suppose objects are disjoin
-						lineIt++;
-					}
-				}
-				++it;
+			length += TeLength (*lineIt);
 		}
 	}
 
-
-	TeProperty  prop;
-	prop.value_ = Te2String (length);
-	TePropertyVector  result;
-	prop.attr_.rep_.name_ = columnName;
-	prop.attr_.rep_.type_ = TeREAL;
-
-	result.push_back (prop);
-	return result;
+	delete querier;
+	return Te2String (length);
 }
 
-
-
 // For absolute values to be partinioned in space (e.g., population, number of malaria cases, etc.)	
-TePropertyVector  TeSumWeighByAreaStrategy::
-compute (TeTheme* theme, const string& attrName, TeBox box, const string& columnName)
+string TeSumWeighByAreaStrategy::compute (TeBox box)
 {
 	double weigh_val = 0.0;
+	double area = TeGeometryArea(box);
 
-	// Build stoset
-	TeSTElementSet stos (theme);
-	vector<string> attrNames;
-	attrNames.push_back (attrName);	
-	if (TeSTOSetBuildDB (&stos, true, false, attrNames))
-	{	
-
-		// convert input box to a polygonset
-		TePolygonSet box_ps = TeBox2PolygonSet (box);
-		double areaBox = TeGeometryArea(box);
-		if (areaBox > 0.0)
+	if (area <= 0.0) return Te2String(0);
+
+	TeQuerier* querier = getWithinGeometry(box, attribute);
+    int quant = querier->numElemInstances();			
+	
+	TePolygonSet box_ps, intersect, objGeom;
+	TeSTInstance sti;
+	TePolygon pol = polygonFromBox(box);
+	box_ps.add(pol);
+
+	for(int i = 0; i < quant; i++)
+	{
+		querier->fetchInstance (sti);
+		objGeom = sti.geometries().getPolygons();
+	
+		string val;
+		sti.getPropertyValue(attribute, val);
+		double num_val = atof(val.c_str());
+
+		double geomArea = TeGeometryArea (objGeom);
+		if (geomArea > 0.0)
 		{
-			TeSTElementSet::iterator it = stos.begin();
-			while (it != stos.end())
-			{
-				string val;
-				if ((*it).getPropertyValue (attrName, val))
-				{
-					double num_val = atof (val.c_str());
-					TePolygonSet objGeom;  
-					if ((*it).getGeometry(objGeom))
-					{
-						//for (unsigned int i = 0 ; i < objGeom.size(); i++)
-						//		TeRemoveDuplicatedCoordinates (objGeom[i]);
-						double geomArea = TeGeometryArea (objGeom);
-						if (geomArea > 0.0)
-						{
-							TePolygonSet intersect;
-							//TeGeometryAlgorithmsPrecision temp(0.0);
-							TeOverlay(box_ps, objGeom, intersect, TeINTERSECTION);
-							double intersectArea = TeGeometryArea (intersect);
-							weigh_val += num_val*(intersectArea/geomArea); 
-						
-						}
-					
-					}
-				}
-				++it;
-			}
+			TePolygonSet intersect;
+			TeOverlay(box_ps, objGeom, intersect, TeINTERSECTION);
+			double intersectArea = TeGeometryArea (intersect);
+			weigh_val += num_val*(intersectArea/geomArea); 
 		}
 	}
 
-
-	TeProperty  prop;
-	prop.value_ = Te2String (weigh_val);
-	prop.attr_.rep_.name_ = columnName;
-	prop.attr_.rep_.type_ = TeREAL;
-
-	TePropertyVector  result;
-	result.push_back (prop);
-	return result;
+	delete querier;
+	return Te2String (weigh_val);
 }
 
+TeMinimumDistanceStrategy::TeMinimumDistanceStrategy(TeTheme* theme_, TeGeomRep rep_, double distError_) 
+: TeComputeSpatialStrategy(theme_, rep_) 
+{ 
+	maxDist = distError_; tree = NULL; 
+}
 
-
-
-TePropertyVector  TeSumWeighByRestrictedAreaStrategy::
-compute (TeTheme* theme, const string& attrName, TeBox box, const string& columnName)
+void TeMinimumDistanceStrategy::CreatePoints(TeCoord2D p1, TeCoord2D p2)
 {
-	double weigh_val = 0.0;
-
-	if (!raster_)
+	double dist = TeDistance(p1, p2);
+	if(dist > maxDist)
 	{
-		TeProperty  prop;
-		prop.value_ = Te2String (weigh_val);
-		prop.attr_.rep_.name_ = columnName;
-		prop.attr_.rep_.type_ = TeREAL;
-		TePropertyVector  result;
-		result.push_back (prop);
-		return result;
-	}
+		TeCoord2D p3;
 
-	double raster_elem_area = raster_->params().resx_*raster_->params().resy_;
+		TeGetMiddlePoint (p1, p2, p3);
 
-	// Build stoset
-	TeSTElementSet stos (theme);
-	vector<string> attrNames;
-	attrNames.push_back (attrName);	
-	if (TeSTOSetBuildDB (&stos, true, false, attrNames))
-	{	
-				// convert input box to a polygonset
-		TePolygonSet box_ps = TeBox2PolygonSet (box);
-		double areaBox = TeGeometryArea(box);
-		if (areaBox > 0.0)
-		{
-			TeSTElementSet::iterator it = stos.begin();
-			while (it != stos.end())
-			{
-				string val;
-				if ((*it).getPropertyValue (attrName, val))
-				{
-					double num_val = atof (val.c_str());
-					TePolygonSet objGeom;  
-					if ((*it).getGeometry(objGeom))
-					{
-						double geomArea = TeGeometryArea (objGeom);
-						if (geomArea > 0.0)
-						{
-							TePolygonSet intersect;
-							TeOverlay(box_ps, objGeom, intersect, TeINTERSECTION);
-							double raster_intersect_area = 0.0;
-//							double intersec_area = TeGeometryArea (intersect);
-							TePolygonSet::iterator psIt = intersect.begin();
-							while (psIt != intersect.end())
-							{
-							
-								TeRaster::iteratorPoly raster_it;
-								TeRaster::iteratorPoly raster_it_end;
-								raster_it = raster_->begin (box_ps.first(), TeBoxPixelIn);
-								raster_it_end = raster_->end (box_ps.first(), TeBoxPixelIn);
-
-								while 	(raster_it != raster_it_end)
-								{
-									int val = (int)(raster_it.operator*(band_));  // OPERADOR * POR BANDA
-									if (val != 0) val = 5;
-									if (classesSelection_[val] == 1)
-											raster_intersect_area +=  raster_elem_area;
-									++raster_it;
-								}
-								++psIt;
-							}
-							weigh_val += num_val*(raster_intersect_area/geomArea); // avarege considering cell area
-						}
-					}
-				}
-				++it;
-			}
+		dataSet.push_back(pair<TeCoord2D, TePoint>(p3, p3));
 		
-		}
+		CreatePoints(p1, p3);
+		CreatePoints(p2, p3);
 	}
-
-
-	TeProperty  prop;
-	prop.value_ = Te2String (weigh_val);
-	prop.attr_.rep_.name_ = columnName;
-	prop.attr_.rep_.type_ = TeREAL;
-
-	TePropertyVector  result;
-	result.push_back (prop);
-	return result;
 }
 
-
-// For relative values to be weighted in space (e.g., percentage of a given land cover in the municipality, etc.)	
-TePropertyVector  TeAverageWeighByRestrictedAreaStrategy::
-compute (TeTheme* theme, const string& attrName, TeBox box, const string& columnName)
+TeMinimumDistanceLinesStrategy::TeMinimumDistanceLinesStrategy(TeTheme* theme_, double dist_)
+	:TeMinimumDistanceStrategy(theme_, TeLINES, dist_)
 {
-	double weigh_val = 0.0;
+	vector<string> attrNames;
+    TeQuerierParams params(true, attrNames);
 
-	if (!raster_)
-	{
-		TeProperty  prop;
-		prop.value_ = Te2String (weigh_val);
-		prop.attr_.rep_.name_ = columnName;
-		prop.attr_.rep_.type_ = TeREAL;
-		TePropertyVector  result;
-		result.push_back (prop);
-		return result;
-	}
+    params.setParams (theme);
+    TeQuerier* querier = new TeQuerier(params);
+	querier->loadInstances();
+    int quant = querier->numElemInstances();
 
-	double raster_elem_area = raster_->params().resx_*raster_->params().resy_;
+    TeSTInstance sti;
+	TeLineSet ls;
 
-	// Build stoset
-	TeSTElementSet stos (theme);
-	vector<string> attrNames;
-	attrNames.push_back (attrName);	
-	if (TeSTOSetBuildDB (&stos, true, false, attrNames))
-	{	
-		// convert input box to a polygonset
-		TePolygonSet box_ps = TeBox2PolygonSet (box);
-		double areaBox = TeGeometryArea(box);
-		if (areaBox > 0.0)
+    for(int c = 0; c < quant; c++)
+    {
+        querier->fetchInstance (sti);
+        ls = sti.geometries().getLines();
+
+		for(unsigned i = 0; i < ls.size(); i++)
 		{
-			TeSTElementSet::iterator it = stos.begin();
-			while (it != stos.end())
+			dataSet.push_back(pair<TeCoord2D, TePoint>(ls[i][0], ls[i][0]));
+			for(unsigned j = 1; j < ls[i].size(); j++)
 			{
-				string val;
-				if ((*it).getPropertyValue (attrName, val))
-				{
-					double num_val = atof (val.c_str());
-					TePolygonSet objGeom;  
-					if ((*it).getGeometry(objGeom))
-					{
-						double geomArea = TeGeometryArea (objGeom);
-						if (geomArea > 0.0)
-						{
-							TePolygonSet intersect;
-							TeOverlay(box_ps, objGeom, intersect, TeINTERSECTION);
-
-							double raster_intersect_area = 0.0;
-//							double intersec_area = TeGeometryArea (intersect);
-
-							TePolygonSet::iterator psIt = intersect.begin();
-							while (psIt != intersect.end())
-							{
-								TeRaster::iteratorPoly raster_it(raster_);
-								TeRaster::iteratorPoly raster_it_end (raster_);
-								raster_it = raster_->begin ((*psIt), TeBoxPixelIn);
-								raster_it_end = raster_->end ((*psIt), TeBoxPixelIn);
-								while 	(raster_it != raster_it_end)
-								{
-									int val = (int)(raster_it.operator*(band_));  // OPERADOR * POR BANDA
-									if (classesSelection_[val] == 1)
-										raster_intersect_area +=  raster_elem_area;
-									++raster_it;
-								}
-								++psIt;
-							}
-							weigh_val += num_val*(raster_intersect_area/areaBox); // avarege considering cell area
-						}
-					}
+				dataSet.push_back(pair<TeCoord2D, TePoint>(ls[i][j], ls[i][j]));
+	
+				TeCoord2D p1 = ls[i][j-1];
+				TeCoord2D p2 = ls[i][j];
 				
-				}
-				++it;
+				CreatePoints(p1, p2);
 			}
-		
 		}
 	}
 
-
-	TeProperty  prop;
-	prop.value_ = Te2String (weigh_val);
-	prop.attr_.rep_.name_ = columnName;
-	prop.attr_.rep_.type_ = TeREAL;
-
-	TePropertyVector  result;
-	result.push_back (prop);
-	return result;
+	tree = new KDTREE(theme_->getThemeBox(), 5); // bucketSize == 5
+	tree->build(dataSet);
+	delete querier;
 }
 
-
-TePropertyVector  TeMinimumDistancePolygonsStrategy::
-compute (TeTheme* theme, const string& /* attrName */, TeBox box, const string& columnName)
+TeMinimumDistancePointsStrategy::TeMinimumDistancePointsStrategy(TeTheme* theme_)
+	:TeMinimumDistanceStrategy(theme_, TePOINTS, 0)
 {
-	TePolygonSet ps;
-	if (theme->layer()->getPolygons(ps) == false) 
-	{
-		TeProperty  prop;
-		prop.value_ = Te2String (TeMAXFLOAT);
-		prop.attr_.rep_.name_ = columnName;
-		prop.attr_.rep_.type_ = TeREAL;
-		TePropertyVector  result;
-		result.push_back (prop);
-		return result;
-	}
-	TeCoord2D p1 = box.center();
-
-	TeCoord2D pinter;
-	double dmin = TeMAXFLOAT;
+	vector<string> attrNames;
+    TeQuerierParams params(true, attrNames);
 
-	for (unsigned int i = 0; i < ps.size(); i++)
-	{
-		TePolygon p = ps[i];
-		if ((p.objectId() == "913") || (p.objectId() == "898"))
-		for (unsigned int j = 0; j < p.size(); j++)
-		{
-			TeLinearRing l = p[j];
-			//if (TeOrientation (l) == TeCOUNTERCLOCKWISE) // outside polygon
-				for (unsigned int k = 0; k < l.size(); k++)
-				{
-					double d = 	TeDistance (p1, l[k]);
-					if (d < dmin) dmin = d;
-				}
-		}
-	}
-	
-	TeProperty  prop;
-	prop.value_ = Te2String (dmin);
-	prop.attr_.rep_.name_ = columnName;
-	prop.attr_.rep_.type_ = TeREAL;
+    params.setParams (theme);
+    TeQuerier* querier = new TeQuerier(params);
+	querier->loadInstances();
+    int quant = querier->numElemInstances();
 
-	TePropertyVector  result;
-	result.push_back (prop);
-	return result;
+    TeSTInstance sti;
+	TePointSet ps;
 
-}
+    for(int c = 0; c < quant; c++)
+    {
+        querier->fetchInstance (sti);
+        ps = sti.geometries().getPoints();
 
-TePropertyVector  TeMinimumDistanceLinesStrategy::
-compute (TeTheme* theme, const string& /* attrName */, TeBox box, const string& columnName)
-{
-	TeLineSet ls;
-	if (theme->layer()->getLines(ls) == false) 
-	{
-		TeProperty  prop;
-		prop.value_ = Te2String (TeMAXFLOAT);
-		prop.attr_.rep_.name_ = columnName;
-		prop.attr_.rep_.type_ = TeREAL;
-		TePropertyVector  result;
-		result.push_back (prop);
-		return result;
+		for(unsigned i = 0; i < ps.size(); i++)
+		{
+			dataSet.push_back(pair<TeCoord2D, TePoint>(ps[i].location(), ps[i]));
+		}
 	}
-	TeCoord2D p1 = box.center();
-
-	int line_index;
-	TeCoord2D pinter;
-	double distance;
-
-	TeProperty  prop;
-	prop.value_ = Te2String (TeMAXFLOAT);
-	if (TeNearest (p1, ls, line_index, pinter, distance))
-		prop.value_ = Te2String (distance);
-
-
-	prop.attr_.rep_.name_ = columnName;
-	prop.attr_.rep_.type_ = TeREAL;
-
-	TePropertyVector  result;
-	result.push_back (prop);
-	return result;
 
+	tree = new KDTREE(theme_->getThemeBox(), 5); // bucketSize == 5
+	tree->build(dataSet);
+	delete querier;
 }
 
-
-TePropertyVector  TeMinimumDistancePointsStrategy::
-compute (TeTheme* theme, const string& /* attrName */, TeBox box, const string& columnName)
+TeMinimumDistancePolygonsStrategy::TeMinimumDistancePolygonsStrategy(TeTheme* theme_, double dist_)
+    :TeMinimumDistanceStrategy(theme_, TePOLYGONS, dist_)
 {
+	vector<string> attrNames;
+    TeQuerierParams params(true, attrNames);
 
-	TePointSet ps;
-	if (theme->layer()->getPoints (ps) == false) 
-	{
-		TeProperty  prop;
-		prop.value_ = Te2String (TeMAXFLOAT);
-		prop.attr_.rep_.name_ = columnName;
-		prop.attr_.rep_.type_ = TeREAL;
-		TePropertyVector  result;
-		result.push_back (prop);
-		return result;
-	}
-
+    params.setParams (theme);
+    TeQuerier* querier = new TeQuerier(params);
+	querier->loadInstances();
+    int quant = querier->numElemInstances();
 
-	// if (TeGetRepresentation (layer, ls, t) == false) return false;
-	TeCoord2D p1 = box.center();
+    TeSTInstance sti;
+	TePolygonSet ps;
 
-	TeCoord2D pinter;
+    for(int c = 0; c < quant; c++)
+    {
+        querier->fetchInstance (sti);
+        ps = sti.geometries().getPolygons();
 
-	TeProperty  prop;
-	prop.value_ = Te2String (TeMAXFLOAT);
-//	int i;
-	double distance;
-	if (TeNearest (p1, ps, pinter, distance))
-//	if (TeNearest (p1, ps, i))
-	{
-		//double distance = TeDistance (p1, ps[i].location()); 
-		prop.value_ = Te2String (distance);
+		for(unsigned i = 0; i < ps.size(); i++)
+		{
+			for(unsigned j = 0; j < ps[i].size(); j++)
+			{
+				dataSet.push_back(pair<TeCoord2D, TePoint>(ps[i][j][0], ps[i][j][0]));
+	
+	            for(unsigned k = 1; k < ps[i][j].size(); k++)
+	            {
+					dataSet.push_back(pair<TeCoord2D, TePoint>(ps[i][j][k], ps[i][j][k]));
+					
+					TeCoord2D p1 = ps[i][j][k-1];
+					TeCoord2D p2 = ps[i][j][k];
+					CreatePoints(p1, p2);
+				}
+							
+				TeCoord2D p1 = ps[i][j][0];
+				TeCoord2D p2 = ps[i][j][ps[i][j].size()-1];
+				CreatePoints(p1, p2);
+			}
+		}
 	}
 
-
-	prop.attr_.rep_.name_ = columnName;
-	prop.attr_.rep_.type_ = TeREAL;
-
-	TePropertyVector  result;
-	result.push_back (prop);
-	return result;
-
+	tree = new KDTREE(theme_->getThemeBox(), 5); // bucketSize == 5
+	tree->build(dataSet);
+	delete querier;
 }
 
-
-
-TePolygonSet
-TeBox2PolygonSet (const TeBox& box)
+string TeMinimumDistanceStrategy::compute (TeBox box)
 {
-	// create polygon representing each cell box
-	// simplification: assume same projection
-
-	TePolygon poly;
-              
-	TeCoord2D coord1 (box.x1(), box.y1());
-	TeCoord2D coord2 (box.x1(), box.y2());
-	TeCoord2D coord3 (box.x2(), box.y2());
-	TeCoord2D coord4 (box.x2(), box.y1());
-	TeCoord2D coord5 (box.x1(), box.y1());
-
-	TeLine2D line;
-	line.add(coord1);
-	line.add(coord2);
-	line.add(coord3);
-	line.add(coord4);
-	line.add(coord5);
-
-	TeLinearRing ring(line);
-	poly.add(ring);
-	TePolygonSet ps;  
-	ps.add (poly);
-	return ps;
-}
-
+	vector<TePoint> report;
+	vector<double> sqrDists;
+	TeCoord2D c(TeMAXFLOAT, TeMAXFLOAT);
+	TeCoord2D key = box.center();
+	TePoint item(c);
 
-TePolygon
-TeBox2Polygon (const TeBox& box)
-{
-	// create polygon representing each cell box
-	// simplification: assume same projection
-
-	TePolygon poly;
-              
-	TeCoord2D coord1 (box.x1(), box.y1());
-	TeCoord2D coord2 (box.x1(), box.y2());
-	TeCoord2D coord3 (box.x2(), box.y2());
-	TeCoord2D coord4 (box.x2(), box.y1());
-	TeCoord2D coord5 (box.x1(), box.y1());
-
-	TeLine2D line;
-	line.add(coord1);
-	line.add(coord2);
-	line.add(coord3);
-	line.add(coord4);
-	line.add(coord5);
-
-	TeLinearRing ring(line);
-	poly.add(ring);
-
-	return poly;
-}
+	report.push_back(item);
 
+	tree->nearestNeighborSearch(key, report, sqrDists, 1);
 
+	double dist = sqrt(sqrDists[0]);
+	return Te2String (dist);
+}
 
-bool TeNearest (TeCoord2D& pt,TePointSet& ps,  TeCoord2D& pout, double& dmin, const double& /* tol */)
+string TeMinimumDistancePolygonsStrategy::compute (TeBox box)
 {
-	bool flag = false;
-
-	dmin = TeMAXFLOAT;
+	TeQuerier* querier = getWithinGeometry(box);
+    int quant = querier->numElemInstances();			
+		
+	TePolygonSet box_ps, intersect, objGeom;
+	TeSTInstance sti;
+    TePolygon pol = polygonFromBox(box);
+    box_ps.add(pol);
 
-	for (unsigned int i = 0 ; i < ps.size(); i++)
+	for(int i = 0; i < quant; i++)
 	{
-		double d = 	TeDistance (pt, ps[i].location());
-		if (d < dmin)
-		{
-
-			pout = ps[i].location();
-			dmin = d;
-			flag = true;
-		}
+		querier->fetchInstance (sti);
+		objGeom = sti.geometries().getPolygons();
 	
+		TeOverlay(box_ps, objGeom, intersect, TeINTERSECTION);
+        if(!intersect.empty()) return Te2String (0);
 	}
-	return flag;
+	
+	delete querier;
+
+	return TeMinimumDistanceStrategy::compute(box);
 }
+
diff --git a/src/terralib/kernel/TeComputeAttributeStrategies.h b/src/terralib/kernel/TeComputeAttributeStrategies.h
old mode 100644
new mode 100755
index 5fc06a8..92f933c
--- a/src/terralib/kernel/TeComputeAttributeStrategies.h
+++ b/src/terralib/kernel/TeComputeAttributeStrategies.h
@@ -1,610 +1,1055 @@
-// TeOperationStrategy.h: interface for the TeOperationStrategy class.
-//
-//////////////////////////////////////////////////////////////////////
-
-
-/*! \file TeOperationStrategy.h
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+
+/*! \file TeComputeAttributeStrategies.h
     This file contains functions to compute attributes based on 
 	alternative strategies. These strategies (Strategy Design Pattern)
 	correspond to operations to derive information based on other  layers attributes and/or
 	spatial components (polygonal, raster, point, raster or other cells). 
 */
-
-
-
 #ifndef TeComputeAttrStrategies_H
 #define TeComputeAttrStrategies_H
 
-
-
 #include <TeAttribute.h>
+#include <TeBox.h>
+#include <TeUtils.h>
+#include <TeNetwork.h>
+#include <TeKdTree.h>
 #include <TeLayer.h>
-#include <TeTimeInterval.h>
-#include <TeGeometryAlgorithms.h>
-#include <TeSTEFunctionsDB.h>
-
 
-TePolygonSet  TeBox2PolygonSet (const TeBox& box);		
-TePolygon	  TeBox2Polygon (const TeBox& box);		
-
-
-///////////////////////////////////////////// Non-spatial Strategy Hierarchy
-//!  Abstract class in the strategies hierarchy for computing attribute values based on other layers (Strategy Design Pattern). 
+typedef TeSAM::TeAdaptativeKdTreeNode<TeCoord2D, vector<TePoint>, TePoint> KDNODE;
+typedef TeSAM::TeAdaptativeKdTree<KDNODE> KDTREE;
 
+class TeTheme;
+class TeRaster;
+class TeQuerier;
 
+/** @defgroup NSCellFillStrategies Non-spatial strategy hierarchy to compute cells attributes
+    @ingroup FillCellAlg
+	Abstract class in the strategies hierarchy for computing attribute values based on other layers 
+	(Strategy Design Pattern). 
+	@{
+ */
 //!  Abstract class in the strategies hierarchy for computing attribute values based on other layers (Strategy Design Pattern). 
 template<class Iterator>
 class TeComputeAttrStrategy  
 {
-protected:
-	TeComputeAttrStrategy () {};
-	TeProperty	defaultValue_;
-public:
-	TeProperty  defaultValue () {return defaultValue_;}
-	virtual  vector<TeProperty> compute (Iterator /*first*/, Iterator /*last*/, const string& /*columnName*/)
+	public:
+		//! Function to access the default value
+		TeProperty  defaultValue () { return defaultValue_; }
+
+		//! Virtual function to compute the attribute based on the iterator
+		/* 
+			\param first		the first element of the Iterator
+			\param last			the last element of the Iterator
+			\param columnName	the attribute name to be generated in the TeProperty's
+		*/
+		virtual  vector<TeProperty> compute (Iterator /*first*/, Iterator /*last*/, const string& /*columnName*/)
 		{
 			vector<TeProperty> result;
 			result.push_back (defaultValue_);
 			return result;
 		}
-	virtual ~TeComputeAttrStrategy(){}
 
-};
+		//! Destructor
+		virtual ~TeComputeAttrStrategy(){}
+
+		bool ComputeAttrIsDummy(double value, double dummy)
+		{
+			return (ABS(value - dummy) < 0.001);
+		}
+
+
+	protected:
+		//! Empty constructor
+		TeComputeAttrStrategy () {};
 
+		//! The default returning value
+		TeProperty	defaultValue_;
+};
 
 
+//! Class to compute the average given some elements of an iterator
 template<class Iterator>
 class TeAverageStrategy: public TeComputeAttrStrategy<Iterator>  
 {
-public:
-
-	TeAverageStrategy (double defaultValue = 0.0) {this->defaultValue_.value_ = Te2String (defaultValue);}
-	virtual ~TeAverageStrategy() {}
-	virtual  vector<TeProperty> compute (Iterator first, Iterator last, const string& columnName)
-	{
-
-		double	tot_val = 0.0;
-		int		num = 0;
-
-		Iterator it = first;
-		while (it != last)
+	public:
+		//! Constructor
+		/* 
+			\param defaultValue		the returned value of the compute method when the iterator is empty	
+		*/	
+		TeAverageStrategy (double dummyV = 0.0, double defaultV = 0.0) {this->defaultValue_.value_ = Te2String (defaultV); dummy = dummyV; }
+
+		//! Destructor
+		virtual ~TeAverageStrategy() {}
+
+		//! Function to compute the average based on the iterator
+		/* 
+			\param first		the first element of the Iterator
+			\param last			the last element of the Iterator
+			\param columnName	the attribute name to be generated in the TeProperty's
+		*/
+		virtual  vector<TeProperty> compute (Iterator first, Iterator last, const string& columnName)
 		{
-			tot_val += (*it);
-			num++;
-			++it;
+			double	tot_val = 0.0;
+			int		num = 0;
+
+			Iterator it = first;
+			while (it != last)
+			{
+				if( !ComputeAttrIsDummy((*it), dummy) )
+				{
+					tot_val += (*it);
+					num++;
+				}
+				++it;
+			}
+	
+			TeProperty  prop;
+			prop.attr_.rep_.name_ = columnName;
+			prop.attr_.rep_.type_ = TeREAL;
+			prop.attr_.rep_.numChar_ = 48;
+			if (num > 0)
+			{
+				double val = tot_val/num;
+				prop.value_ = Te2String (val);
+			}
+			else prop.value_ = this->defaultValue_.value_;
+	
+			TePropertyVector  result;
+			result.push_back (prop);
+			return result;
 		}
+	private:
+		double dummy;
+};
 
-		TeProperty  prop;
-		prop.attr_.rep_.name_ = columnName;
-		prop.attr_.rep_.type_ = TeREAL;
-		prop.attr_.rep_.numChar_ = 48;
-		if (num > 0)
+
+//! Class to compute the average given some elements of an iterator
+template<class Iterator>
+class TeSTDevStrategy: public TeComputeAttrStrategy<Iterator>  
+{
+	public:
+		//! Constructor
+		/* 
+			\param defaultValue		the returned value of the compute method when the iterator is empty	
+		*/	
+		TeSTDevStrategy (double dummyV = 0.0, double defaultV = 0.0) {this->defaultValue_.value_ = Te2String (defaultV); dummy = dummyV; }
+
+		//! Destructor
+		virtual ~TeSTDevStrategy() {}
+
+		//! Function to compute the average based on the iterator
+		/* 
+			\param first		the first element of the Iterator
+			\param last			the last element of the Iterator
+			\param columnName	the attribute name to be generated in the TeProperty's
+		*/
+		virtual  vector<TeProperty> compute (Iterator first, Iterator last, const string& columnName)
 		{
-			double val = tot_val/num;
-			prop.value_ = Te2String (val);
-		}
-		else prop.value_ = this->defaultValue_.value_;
+			double tot_val = 0.0;
+			double stdev = 0.0;
+			int	   num = 0;
+			
+			Iterator it = first;
+			while (it != last)
+			{
+				if( !ComputeAttrIsDummy((*it), dummy) )
+				{
+					tot_val += (*it);
+					num++;
+				}
+				++it;
+			}
+			if(num > 0)
+			{
+				double mean = tot_val / num;
+				it = first;
+				while (it != last)
+				{
+					if( !ComputeAttrIsDummy((*it), dummy) ) stdev += pow((*it) - mean, 2);
+
+					++it;
+				}
+				stdev = stdev / num;
+				stdev = sqrt(stdev);
+			}
 
-		TePropertyVector  result;
-		result.push_back (prop);
-		return result;
-	}
+			TeProperty  prop;
+			prop.attr_.rep_.name_ = columnName;
+			prop.attr_.rep_.type_ = TeREAL;
+			prop.attr_.rep_.numChar_ = 48;
 
+			if (num > 0) prop.value_ = Te2String (stdev);
+			else         prop.value_ = this->defaultValue_.value_;
+	
+			TePropertyVector  result;
+			result.push_back (prop);
+			return result;
+		}	
+	private:
+		double dummy;
 };
 
 
+//! Class to compute the sum of the elements of an iterator
 template<class Iterator>
 class TeSumStrategy: public TeComputeAttrStrategy<Iterator>   
 {
-public:
-
-	TeSumStrategy (double defaultValue = 0.0) {this->defaultValue_.value_ = Te2String (defaultValue);}
-	virtual ~TeSumStrategy() {}
-	virtual  vector<TeProperty> compute (Iterator first, Iterator last, const string& columnName)
-	{  
-		double	sum = 0.0;
-		Iterator it = first;
-		while (it != last)
-		{
-			sum += (*it);
-			++it;
-		}
+	public:
+		//! Constructor
+		/* 
+			\param defaultValue		the returned value of the compute method when the iterator is empty	
+		*/	
+		TeSumStrategy (double dummyV = 0.0, double defaultV = 0.0) {this->defaultValue_.value_ = Te2String (defaultV); dummy = dummyV; }
+
+		//! Destructor
+		virtual ~TeSumStrategy() {}
+
+		//! Function to compute the sum of the iterator
+		/* 
+			\param first		the first element of the Iterator
+			\param last			the last element of the Iterator
+			\param columnName	the attribute name to be generated in the TeProperty's
+		*/
+		virtual  vector<TeProperty> compute (Iterator first, Iterator last, const string& columnName)
+		{  
+			double sum = 0.0;
+			Iterator it = first;
+			bool found = false;
+			while (it != last)
+			{
+				if( !ComputeAttrIsDummy((*it), dummy) )
+				{
+					sum += (*it);
+					found = true;
+				}
+				++it;
+			}
 
-		TeProperty  prop;
-	
+			TeProperty  prop;
 
-		if (first == last) prop = this->defaultValue_;
-		else  prop.value_ = Te2String (sum);
+			if (first == last || !found) prop = this->defaultValue_;
+			else  prop.value_ = Te2String (sum);
 
-		prop.attr_.rep_.name_ = columnName;
-		prop.attr_.rep_.type_ = TeREAL;
-		prop.attr_.rep_.numChar_ = 48;
-		TePropertyVector  result;
-		result.push_back (prop);
-		return result;
-	}
+			prop.attr_.rep_.name_ = columnName;
+			prop.attr_.rep_.type_ = TeREAL;
+			prop.attr_.rep_.numChar_ = 48;
+			TePropertyVector  result;
+			result.push_back (prop);
+			return result;
+		}
+	private:
+		double dummy;
 };
 
 
-template< class Iterator>
+//! Class to compute the minimum value of an iterator
+template<class Iterator>
 class TeMinimumStrategy: public TeComputeAttrStrategy<Iterator>   
 {
-public:
-
-	TeMinimumStrategy (double defaultValue = 0.0) {this->defaultValue_.value_ = Te2String (defaultValue);}
-	virtual ~TeMinimumStrategy() {}
-	virtual  vector<TeProperty> compute (Iterator first, Iterator last, const string& columnName)
-	{
-		double	min =  TeMAXFLOAT;
-		Iterator it = first;
-		while (it != last)
+	public:
+		//! Constructor
+		/* 
+			\param defaultValue		the returned value of the compute method when the iterator is empty	
+		*/	
+		TeMinimumStrategy (double dummyV = 0.0, double defaultV = 0.0) {this->defaultValue_.value_ = Te2String (defaultV); dummy = dummyV; }
+
+		//! Destructor
+		virtual ~TeMinimumStrategy() {}
+
+		//! Function to compute the minimum value of the iterator
+		/* 
+			\param first		the first element of the Iterator
+			\param last			the last element of the Iterator
+			\param columnName	the attribute name to be generated in the TeProperty's
+		*/
+		virtual  vector<TeProperty> compute (Iterator first, Iterator last, const string& columnName)
 		{
-			double val = (*it);
-			if (val < min) min = val;
-			++it;
-		}
-
+			double min = TeMAXFLOAT;
+			Iterator it = first;
+			while (it != last)
+			{
+				if( !ComputeAttrIsDummy((*it), dummy) )
+				{
+					double val = (*it);
+					if (val < min) min = val;
+				}
+				++it;
+			}
 
-		TeProperty  prop;
-		prop.attr_.rep_.name_ = columnName;
-		prop.attr_.rep_.type_ = TeREAL;
-		prop.attr_.rep_.numChar_ = 48;
+			TeProperty  prop;
+			prop.attr_.rep_.name_ = columnName;
+			prop.attr_.rep_.type_ = TeREAL;
+			prop.attr_.rep_.numChar_ = 48;
 
-		if (first == last)
-			prop.value_ = this->defaultValue_.value_; 
-		else  
-			prop.value_ = Te2String (min);
+			if (first == last || min == TeMAXFLOAT)
+				prop.value_ = this->defaultValue_.value_; 
+			else  
+				prop.value_ = Te2String (min);
 
-		TePropertyVector  result;
-		result.push_back (prop);
-		return result;
-	}
+			TePropertyVector  result;
+			result.push_back (prop);
+			return result;
+		}
+	private:
+		double dummy;
 };
 
 
-
-template< class Iterator>
+//! Class to compute the maximum value of an iterator
+template<class Iterator>
 class TeMaximumStrategy: public TeComputeAttrStrategy<Iterator>   
 {
-public:
-
-	TeMaximumStrategy (double defaultValue = 0.0) {this->defaultValue_.value_ = Te2String (defaultValue);}
-	virtual ~TeMaximumStrategy() {}
-	virtual  vector<TeProperty> compute (Iterator first, Iterator last, const string& columnName)
-	{
-		double	max =  TeMINFLOAT;
-		Iterator it = first;
-		while (it != last)
+	public:
+		//! Constructor
+		/* 
+			\param defaultValue		the returned value of the compute method when the iterator is empty	
+		*/	
+		TeMaximumStrategy (double dummyV = 0.0, double defaultV = 0.0) {this->defaultValue_.value_ = Te2String (defaultV); dummy = dummyV; }
+
+		//! Destructor
+		virtual ~TeMaximumStrategy() {}
+
+		//! Function to compute the maximum value of the iterator
+		/* 
+			\param first		the first element of the Iterator
+			\param last			the last element of the Iterator
+			\param columnName	the attribute name to be generated in the TeProperty's
+		*/
+		virtual vector<TeProperty> compute (Iterator first, Iterator last, const string& columnName)
 		{
-			double val = (*it);
-			if (val > max) max = val;
-			++it;
-		}
-
+			double	max =  TeMINFLOAT;
+			Iterator it = first;
+			while (it != last)
+			{
+				if( !ComputeAttrIsDummy((*it), dummy) )
+				{
+					double val = (*it);
+					if (val > max) max = val;
+				}
+				++it;
+			}
 
-		TeProperty  prop;
-		prop.attr_.rep_.name_ = columnName;
-		prop.attr_.rep_.type_ = TeREAL;
-		prop.attr_.rep_.numChar_ = 48;
+			TeProperty  prop;
+			prop.attr_.rep_.name_ = columnName;
+			prop.attr_.rep_.type_ = TeREAL;
+			prop.attr_.rep_.numChar_ = 48;
 
-		if (first == last)
-			prop.value_ = this->defaultValue_.value_; 
-		else  
-			prop.value_ = Te2String (max);
+			if (first == last || max == TeMINFLOAT)
+				prop.value_ = this->defaultValue_.value_; 
+			else  
+				prop.value_ = Te2String (max);
 
-		TePropertyVector  result;
-		result.push_back (prop);
-		return result;
-	}
+			TePropertyVector  result;
+			result.push_back (prop);
+			return result;
+		}
+	private:
+		double dummy;
 };
 
 
+//! Class to compute the percentages of each class (described in a map) of an iterator
 template<class Iterator>
 class TeCategoryPercentageStrategy: public TeComputeAttrStrategy<Iterator>   
 {
-private:
-	map<string, string> classesMap_;
-
-
-public:
-	TeCategoryPercentageStrategy (map<string, string>& classes, double defaultValue = 0.0) 
-	{
-		this->defaultValue_.value_ = Te2String (defaultValue); 
-		classesMap_ = classes;
-	}
-	virtual ~TeCategoryPercentageStrategy() {}
-	virtual  vector<TeProperty> compute (Iterator first, Iterator last, const string& columnName)
-	{
-		TeProperty category;
-		int num = 0;
-
-		// initialize count
-		map<string, int>  count;
-		map<string, string>::iterator itMap = classesMap_.begin();
-		while (itMap != classesMap_.end())
+	public:
+		//! Constructor
+		/* 
+			\param defaultValue		the returned value of the compute method when the iterator is empty	
+			\param classes			classes for regrouping the values	
+		*/	
+		TeCategoryPercentageStrategy (map<string, string>& classes, double defaultValue = 0.0) 
 		{
-			count[(*itMap).second] = 0;
-			++itMap;
+			this->defaultValue_.value_ = Te2String (defaultValue); 
+			classesMap_ = classes;
+			usingMap = true;
 		}
 
-		Iterator it = first;
-		while (it != last)
+		//! Constructor
+		/* 
+			\param defaultValue		the returned value of the compute method when the iterator is empty	
+			\param dummyV			the ignored value
+		*/	
+
+		TeCategoryPercentageStrategy(double defaultValue = 0.0, string dummyV = "")
 		{
-			if (it.getProperty (category))
-			{
-				count[classesMap_[category.value_]]++;
-				num++;
-			}
-			++it;
+			usingMap = false;
+			this->defaultValue_.value_ = Te2String (defaultValue); 
+			dummy = dummyV;
 		}
 
-		TePropertyVector  result;
-		map <string, int>:: iterator count_it = count.begin();
-		while(count_it != count.end())  
+		//! Destructor
+		virtual ~TeCategoryPercentageStrategy() {}
+
+		//! Function to compute the percentages based on the iterator
+		/* 
+			\param first		the first element of the Iterator
+			\param last			the last element of the Iterator
+			\param columnName	the attribute name to be generated in the TeProperty's
+		*/
+		virtual  vector<TeProperty> compute (Iterator first, Iterator last, const string& columnName)
 		{
-			TeProperty prop;
-			prop.attr_.rep_.name_ = columnName + (*count_it).first; // category
-			prop.attr_.rep_.type_ = TeREAL;
-			prop.attr_.rep_.numChar_ = 48;
+			TeProperty category;
+			int num = 0;
 
-			double percent = 0.0;
-			string cat = (*count_it).first;
-			double value = (double)(*count_it).second;
-			if (num != 0) percent = value/num;
-			prop.value_    = Te2String (percent); // count
-			result.push_back (prop);
-			++count_it;
+			// initialize count
+			map<string, int>  count;
+
+			if(usingMap)
+			{
+				map<string, string>::iterator itMap = classesMap_.begin();
+				while (itMap != classesMap_.end())
+				{
+					count[(*itMap).second] = 0;
+					++itMap;
+				}
+
+				Iterator it = first;
+				while (it != last)
+				{
+					if (it.getProperty (category))
+					{
+						count[classesMap_[category.value_]]++;
+						num++;
+					}
+					++it;
+				}
+			}
+			else // use the data to initialize the counter
+			{
+				Iterator it = first;
+				while (it != last)
+				{
+					if (it.getProperty (category) && category.value_ != dummy)
+						count[category.value_] = 0;
+
+					++it;
+				}
+
+				it = first;
+				while (it != last)
+				{
+					if (it.getProperty (category) && category.value_ != dummy)
+					{
+						count[category.value_]++;
+						num++;
+					}
+					++it;
+				}
+			}
+
+			TePropertyVector  result;
+			map <string, int>:: iterator count_it = count.begin();
+
+			while(count_it != count.end())  
+			{
+				string value_ =  (*count_it).first;
+				for (unsigned i = 0; i < value_.size(); i++)
+					if(value_[i] == '.' || value_[i] == '+')
+						// remove them from value because they cant be part of a column name
+						value_[i] = '_';
+
+				TeProperty prop;
+				prop.attr_.rep_.name_ = columnName + value_;
+				prop.attr_.rep_.type_ = TeREAL;
+				prop.attr_.rep_.numChar_ = 48;
+
+				double percent = 0.0;
+				double value = (double)(*count_it).second;
+				if (num != 0) percent = value/num;
+				prop.value_    = Te2String (percent);
+				result.push_back (prop);
+				++count_it;
+			}
+			return result;
 		}
-		return result;
-	}
 
+	private:
+		//! Map of classes
+		map<string, string> classesMap_;
+		bool usingMap;
+		string dummy;
 };
 
 
+//! Class to compute if there is any value in an iterator
 template<class Iterator>
-class TePresenceStrategy: public TeComputeAttrStrategy<Iterator>   
+class TePresenceStrategy: public TeComputeAttrStrategy<Iterator>
 {
-public:
-	TePresenceStrategy (bool defaultValue = 0) 
-	{
-		this->defaultValue_.attr_.rep_.type_ = TeINT;
-		this->defaultValue_.value_ = Te2String (defaultValue); 
-		this->defaultValue_.attr_.rep_.numChar_ = 48;
-
-	}
-	virtual ~TePresenceStrategy() {}
-	virtual  vector<TeProperty> compute (Iterator first, Iterator last, const string& columnName)
-	{
-		TeProperty prop;
-		if (first != last) 
-			prop.value_ = "1";
-		else
-			prop = this->defaultValue_;
-
-		TePropertyVector  result;
-		prop.attr_.rep_.name_ = columnName; 
-		prop.attr_.rep_.type_ = TeINT;
-		prop.attr_.rep_.numChar_ = 48;
-		result.push_back (prop);
-		return result;
-	}
+	public:
+		//! Constructor
+		/* 
+			\param defaultValue		the returned value of the compute method when the iterator is empty	
+		*/	
+		TePresenceStrategy (bool defaultValue = 0) 
+		{
+			this->defaultValue_.attr_.rep_.type_ = TeINT;
+			this->defaultValue_.value_ = Te2String (defaultValue); 
+			this->defaultValue_.attr_.rep_.numChar_ = 48;
+		}
 
-};
+		//! Destructor
+		virtual ~TePresenceStrategy() {}
+
+		//! Function to compute the presence based on the iterator
+		//! It has value "1" if there is any element, otherwise it has the value of the constructor
+		/* 
+			\param first		the first element of the Iterator
+			\param last			the last element of the Iterator
+			\param columnName	the attribute name to be generated in the TeProperty's
+		*/
+		virtual  vector<TeProperty> compute (Iterator first, Iterator last, const string& columnName)
+		{
+			TeProperty prop;
+			if (first != last) 
+				prop.value_ = "1";
+			else
+				prop = this->defaultValue_;
 	
+			TePropertyVector  result;
+			prop.attr_.rep_.name_ = columnName; 
+			prop.attr_.rep_.type_ = TeINT;
+			prop.attr_.rep_.numChar_ = 48;
+			result.push_back (prop);
+			return result;
+		}
+};
+
+//! Class for computing the majority in a given iterator of values without classes
 template<class Iterator>
-class TeMajorityStrategy: public TeComputeAttrStrategy<Iterator>   
+class TeMajorityStrategy: public TeComputeAttrStrategy<Iterator>
 {
-public:
-	TeMajorityStrategy (TeAttrDataType defaultType = TeINT) 
-	{
-		this->defaultValue_.attr_.rep_.type_ = defaultType;
-		this->defaultValue_.value_ = "0"; 
-	}
-	virtual ~TeMajorityStrategy() {}
-	virtual  vector<TeProperty> compute (Iterator first, Iterator last, const string& columnName)
-	{
-		TeProperty category;
-		category.attr_.rep_.type_ = this->defaultValue_.attr_.rep_.type_;
-
-		map<string, int>  count;
-		Iterator it = first;
-		while (it != last)
+	public:
+		//! Constructor
+		/* 
+			\param defaultType		the type of the default value	
+		*/	
+		TeMajorityStrategy (TeAttrDataType defaultType = TeINT, string defaultValue = "", string dummyV = "")
 		{
-			if (it.getProperty (category))
-				count[category.value_]++;
-			++it;
+			this->defaultValue_.attr_.rep_.type_ = defaultType;
+			this->defaultValue_.value_ = defaultValue; 
+			dummy = dummyV;
 		}
 
-		TeProperty prop;
-		prop.attr_.rep_.type_ = category.attr_.rep_.type_;
-		prop.value_ = this->defaultValue_.value_;
-		prop.attr_.rep_.name_ = columnName; 
-		prop.attr_.rep_.numChar_ = 48;
+		//! Destructor
+		virtual ~TeMajorityStrategy() {}
 
-
-		int max = 0;
-		map <string, int>:: iterator count_it = count.begin();
-		while(count_it != count.end())  
+		//! Function to compute the majority of the iterator
+		/* 
+			\param first		the first element of the Iterator
+			\param last			the last element of the Iterator
+			\param columnName	the attribute name to be generated in the TeProperty's
+		*/
+		virtual  vector<TeProperty> compute (Iterator first, Iterator last, const string& columnName)
 		{
-			if ((*count_it).second > max)
+			TeProperty category;
+			category.attr_.rep_.type_ = this->defaultValue_.attr_.rep_.type_;
+	
+			map<string, int>  count;
+			Iterator it = first;
+			while (it != last)
 			{
-				prop.value_ = (*count_it).first;
-				max = (*count_it).second;
+				if (it.getProperty (category) && category.value_ != dummy)
+					count[category.value_]++;
+
+				++it;
 			}
-			++count_it;		
-		}
-		TePropertyVector  result;
-		result.push_back (prop);
-		return result;
-	}
+	
+			TeProperty prop;
+			prop.attr_.rep_.type_ = category.attr_.rep_.type_;
+			prop.value_ = this->defaultValue_.value_;
+			prop.attr_.rep_.name_ = columnName; 
+			prop.attr_.rep_.numChar_ = 48;
 
+			int max = 0;
+			map <string, int>:: iterator count_it = count.begin();
+			while(count_it != count.end())  
+			{
+				if ((*count_it).second > max)
+				{
+					prop.value_ = (*count_it).first;
+					max = (*count_it).second;
+				}
+				++count_it;		
+			}
+			TePropertyVector  result;
+			result.push_back (prop);
+			return result;
+		}
+	private:
+		string dummy;
 };
-	
+
+
+//! Class for compute the category with more occurences in the elements of a given iterator, using classes
 template<class Iterator>
 class TeMajorityCategoryStrategy: public TeComputeAttrStrategy<Iterator>   
 {
-	protected:
-			map<string, string> classesMap_;
-
-public:
-	TeMajorityCategoryStrategy (const map<string, string>& classesMap, TeAttrDataType defaultType = TeINT) 
-	{
-		this->defaultValue_.attr_.rep_.type_ = defaultType;
-		this->defaultValue_.value_ = "0"; 
-		classesMap_ = classesMap;
-	}
-	virtual ~TeMajorityCategoryStrategy() {}
-	virtual  vector<TeProperty> compute (Iterator first, Iterator last, const string& columnName)
-	{
-		TeProperty category;
-		category.attr_.rep_.type_ = this->defaultValue_.attr_.rep_.type_;
-
-
-			// initialize count
-		map<string, int>  count;
-		map<string, string>::iterator itMap = classesMap_.begin();
-		while (itMap != classesMap_.end())
+	public:
+		//! Constructor
+		/*
+			\param classesMap		the returning values for each categoty
+			\param defaultValue		the type of the attribute to be created
+		*/	
+		TeMajorityCategoryStrategy (const map<string, string>& classesMap, TeAttrDataType defaultType = TeINT) 
 		{
-			count[(*itMap).second] = 0;
-			++itMap;
+			this->defaultValue_.attr_.rep_.type_ = defaultType;
+			this->defaultValue_.value_ = "0"; 
+			classesMap_ = classesMap;
 		}
 
-		Iterator it = first;
-		while (it != last)
+		//! Destructor
+		virtual ~TeMajorityCategoryStrategy() {}
+
+		//! Function to compute the category with more occurrences
+		/* 
+			\param first		the first element of the Iterator
+			\param last			the last element of the Iterator
+			\param columnName	the attribute name to be generated in the TeProperty's
+		*/
+		virtual vector<TeProperty> compute (Iterator first, Iterator last, const string& columnName)
 		{
-			if (it.getProperty (category))
+			TeProperty category;
+			category.attr_.rep_.type_ = this->defaultValue_.attr_.rep_.type_;
+
+			// initialize count
+			map<string, int>  count;
+			map<string, string>::iterator itMap = classesMap_.begin();
+			while (itMap != classesMap_.end())
 			{
-				count[classesMap_[category.value_]]++;
-	
+				count[(*itMap).second] = 0;
+				++itMap;
 			}
-			++it;
-		}
 
+			Iterator it = first;
+			while (it != last)
+			{
+				if (it.getProperty (category))
+				{
+					count[classesMap_[category.value_]]++;
+				}
+				++it;
+			}
 
+			TePropertyVector  result;
+			TeProperty prop;
+			prop.attr_.rep_.type_ = TeSTRING;
+			//	prop.value_ = defaultValue_.value_;
+			prop.attr_.rep_.name_ = columnName; 
+			prop.attr_.rep_.numChar_ = 48;
 
-	TePropertyVector  result;
-	TeProperty prop;
-	prop.attr_.rep_.type_ = TeSTRING;
-//	prop.value_ = defaultValue_.value_;
-	prop.attr_.rep_.name_ = columnName; 
-	prop.attr_.rep_.numChar_ = 48;
+			int max = 0;
+			map <string, int>:: iterator count_it = count.begin();
+			while(count_it != count.end())  
+			{
+				if ((*count_it).second > max)
+				{
+					prop.value_ = (*count_it).first;
+					max = (*count_it).second;
+				}
+				++count_it;		
+			}
 
-	int max = 0;
-	map <string, int>:: iterator count_it = count.begin();
-	while(count_it != count.end())  
-	{
-		if ((*count_it).second > max)
-		{
-			prop.value_ = (*count_it).first;
-			max = (*count_it).second;
+			result.push_back (prop);
+			return result;
 		}
-		++count_it;		
-	}
-
 
-	result.push_back (prop);
-	return result;
-
-}
+	protected:
+			map<string, string> classesMap_;
 };
-	
-///////////////////////////////////////////////////// Spatial Strategy Hierarchy
+/** @} */   
 
-		
 
-//!  Abstract class in the strategies hierarchy for computing attribute values based on other layers (Strategy Design Pattern). 
 
-class TeComputeAttrSpatialStrategy  
+/** @defgroup CellFillStrategies Spatial strategy hierarchy to compute cells attributes
+    @ingroup FillCellAlg
+	Abstract class in the strategies hierarchy for computing attribute values based on other layers 
+	(Strategy Design Pattern). 
+	@{
+ */
+//! Virtual class for computing attributes based on the spatial characteristics of the objects (Strategy Design Pattern)
+class TL_DLL TeComputeSpatialStrategy  
 {
-	protected:
-		TeComputeAttrSpatialStrategy () {}
 	public:
-		virtual ~TeComputeAttrSpatialStrategy() {}
-		virtual  TePropertyVector compute (TeTheme* /* theme */, const string& /* attrName */, TeBox /* box */, const string& /* columnName */)
-		{
-			TePropertyVector result;
-			return result;
-		}
+		//! Destructor
+		virtual ~TeComputeSpatialStrategy() {}
 
-};
+		//! Virtual function to compute the attribute
+		/* 
+			\param box		compute the attribute of a cell having this box
+		*/
+		virtual string compute(TeBox box) = 0;
 
+		//! The type of attriute generated by the class. Default is TeREAL
+		virtual TeAttrDataType Type() { return TeREAL; }
 
-class TeCategoryAreaPercentageStrategy: public TeComputeAttrSpatialStrategy  
-{
-protected:
-			map<string, string> classesMap_;
-public:
-		TeCategoryAreaPercentageStrategy (const map<string, string>& classesMap) {classesMap_ = classesMap;};
-		virtual ~TeCategoryAreaPercentageStrategy() {}
-		virtual  TePropertyVector compute (TeTheme* theme, const string& attrName, TeBox box, const string& columnName);
-		
-};
+		//! Return all the geometries within a given box
+		/* 
+			\param box		the box to be used
+			\patam att		the attribute returned together with the objects. If none, this function returns only the geometries
+		*/
+		TeQuerier* getWithinGeometry(TeBox box, string att = "");
 
+	protected:
+		//! Constructor
+		/* 
+			\param theme_		the theme to be used as basis for computing the attribute
+			\param rep_			the representation to be used	
+		*/	
+		TeComputeSpatialStrategy (TeTheme* theme_, TeGeomRep rep_) { theme = theme_; rep = rep_; }
+
+		//! Theme used to compute the attributes
+		TeTheme* theme;
+
+		//! The geometry of the theme used
+		TeGeomRep rep;
+};
 
 
-class TeAverageWeighbyAreaStrategy: public TeComputeAttrSpatialStrategy  
+//! Class to compute the average of elements weighted by their areas
+//! It is useful when working with values representing averages
+class TL_DLL TeAverageWeighByAreaStrategy: public TeComputeSpatialStrategy 
 {
-public:
-	TeAverageWeighbyAreaStrategy () {}
-	virtual ~TeAverageWeighbyAreaStrategy() {}
-	virtual  TePropertyVector compute (TeTheme* theme, const string& attrName, TeBox box, const string& columnName);
+	public:
+		//! Constructor
+		/* 
+			\param theme_		the theme to be used as basis for computing the attribute
+			\param att_			the attribute used to compute the sum. It must be numerical
+			\param rep_			the representation to be used	
+		*/	
+		TeAverageWeighByAreaStrategy  (TeTheme* theme_, string att_, TeGeomRep rep_) : TeComputeSpatialStrategy(theme_, rep_) { attribute = att_; }
+
+		//! Destructor
+		virtual ~TeAverageWeighByAreaStrategy() {}
+
+		//! Function to compute the attribute
+		/* 
+			\param box		compute the attribute of a cell having this box
+		*/
+		virtual string compute (TeBox box);
+
+	private:
+		//! The attribute used to calculate the average
+		string attribute;
 };
 
 
-
-class TeCategorySoilsAreaPercentageStrategy: public TeComputeAttrSpatialStrategy  
+//! Class to compute the sum of elements weighted by their areas
+//! This function distribute the values keeping the overall sum of the elements on the layer
+class TL_DLL TeSumWeighByAreaStrategy: public TeComputeSpatialStrategy  
 {
-protected:
-			map<string, string> classesMap_;
-public:
-		TeCategorySoilsAreaPercentageStrategy (const map<string, string>& classesMap) {classesMap_ = classesMap;};
-		virtual ~TeCategorySoilsAreaPercentageStrategy() {}
-		virtual  TePropertyVector compute (TeTheme* theme, const string& attrName, TeBox box, const string& columnName);	
-		
+	public:
+		//! Constructor
+		/* 
+			\param theme_		the theme to be used as basis for computing the attribute
+			\param att_			the attribute used to compute the sum. It must be numerical
+			\param rep_			the representation to be used	
+		*/	
+		TeSumWeighByAreaStrategy (TeTheme* theme_, string att_, TeGeomRep rep_) : TeComputeSpatialStrategy(theme_, rep_) { attribute = att_; }
+
+		//! Destructor
+		virtual ~TeSumWeighByAreaStrategy() {}
+
+		//! Function to compute the attribute
+		/* 
+			\param box		compute the attribute of a cell having this box
+		*/
+		virtual  string compute (TeBox box);
+
+	private:
+		//! The attribute used to calculate the average
+		string attribute;
 };
 
 
-class TeCategoryMajorityStrategy: public TeComputeAttrSpatialStrategy  
+//! Class to compute the value that occurs more frequently in a given box 
+class TL_DLL TeCategoryMajorityStrategy: public TeComputeSpatialStrategy  
 {
-protected:
-			map<string, string> classesMap_;
-public:
-		TeCategoryMajorityStrategy (const map<string, string>& classesMap) {classesMap_ = classesMap;};
+	public:
+		//! Constructor
+		/* 
+			\param theme_		the theme to be used as basis for computing the attribute
+			\param att_			the attribute used to compute the majority
+			\param classesMap	a map to reclassify the values
+		*/	
+		TeCategoryMajorityStrategy (TeTheme* theme_, string att_, map<string, string>& classesMap) : TeComputeSpatialStrategy(theme_, TePOLYGONS) 
+        	{classesMap = classesMap; attribute = att_;}
+
+		//! Destructor
 		virtual ~TeCategoryMajorityStrategy() {}
-		virtual  TePropertyVector compute (TeTheme* theme, const string& attrName, TeBox box, const string& columnName);	
-		
-};
-
 
+		//! Function to compute the attribute
+		/* 
+			\param box		compute the attribute of a cell having this box
+		*/
+		virtual  string compute (TeBox box);	
 
+	protected:
+			//! The map of values
+			map<string, string> classesMap;
 
+			//! The attribute used in the majority
+			string attribute;
+};
 
 
-class TeTotalAreaPercentageStrategy: public TeComputeAttrSpatialStrategy  
+//! Class to count the elements in a given box 
+//! This class returns the number of elements whose BOX intercepts the box in the argument of compute
+//! For safety, use the count classes that inherit this one
+class TL_DLL TeCountObjectsStrategy: public TeComputeSpatialStrategy  
 {
-
-public:
-		TeTotalAreaPercentageStrategy () {}
-		virtual ~TeTotalAreaPercentageStrategy() {}
-		virtual  TePropertyVector compute (TeTheme* theme, const string& attrName, TeBox box, const string& columnName);
+	public:
+		//! Constructor
+		/* 
+			\param theme_		the theme to be used as basis for computing the attribute
+			\param geom_		the representation to be used	
+		*/	
+		TeCountObjectsStrategy (TeTheme* theme_, TeGeomRep geom_) : TeComputeSpatialStrategy(theme_, geom_) { }
+
+		//! Destructor
+		virtual ~TeCountObjectsStrategy() { }
+
+		//! Function to compute the attribute
+		/* 
+			\param box		compute the attribute of a cell having this box
+		*/
+		virtual string compute (TeBox box);
+
+		//! This class generates TeINT attributes
+		virtual TeAttrDataType Type() { return TeINT; }
 };
 
 
+//! Class to compute the number of polygons in a given box
+class TL_DLL TeCountPolygonalObjectsStrategy: public TeCountObjectsStrategy
+{
+	public:
+		//! Constructor
+		/* 
+			\param theme_		the theme to be used as basis for computing the attribute
+		*/	
+		TeCountPolygonalObjectsStrategy (TeTheme* theme_) : TeCountObjectsStrategy(theme_, TePOLYGONS) {}
+
+		//! Function to compute the attribute
+		/* 
+			\param box		compute the attribute of a cell having this box
+		*/
+		virtual string compute (TeBox box);
+};
 
 
-
-class TeCountPolygonalObjectsStrategy: public TeComputeAttrSpatialStrategy  
+//! Class to compute the number of lines in a given box
+class TL_DLL TeCountLineObjectsStrategy: public TeCountObjectsStrategy
 {
-
-public:
-		TeCountPolygonalObjectsStrategy () {}
-		virtual ~TeCountPolygonalObjectsStrategy() {}
-		virtual  TePropertyVector compute (TeTheme* theme, const string& attrName, TeBox box, const string& columnName);
+	public:
+		//! Constructor
+		/* 
+			\param theme_		the theme to be used as basis for computing the attribute
+		*/	
+		TeCountLineObjectsStrategy (TeTheme* theme_) : TeCountObjectsStrategy(theme_, TeLINES) {}
+
+		//! Function to compute the attribute
+		/* 
+			\param box		compute the attribute of a cell having this box
+		*/
+		virtual string compute (TeBox box);
 };
 
 
+//! Class to count the number of points in a given box
+class TL_DLL TeCountPointObjectsStrategy: public TeCountObjectsStrategy 
+{
+	public:
+		//! Constructor
+		/* 
+			\param theme_		the theme to be used as basis for computing the attribute
+		*/	
+		TeCountPointObjectsStrategy (TeTheme* theme_) : TeCountObjectsStrategy(theme_, TePOINTS) {}
+};
 
 
-
-class TeCountLineObjectsStrategy: public TeComputeAttrSpatialStrategy  
+//! Class to compute the length of lines within a given box 
+class TL_DLL TeLineLengthStrategy: public TeComputeSpatialStrategy 
 {
+	public:
+		//! Constructor
+		/* 
+			\param theme_		the theme to be used as basis for computing the attribute
+		*/	
+		TeLineLengthStrategy (TeTheme* theme_) : TeComputeSpatialStrategy(theme_, TeLINES){}
 
-public:
-		TeCountLineObjectsStrategy () {}
-		virtual ~TeCountLineObjectsStrategy() {}
-		virtual  TePropertyVector compute (TeTheme* theme, const string& attrName, TeBox box, const string& columnName);
+		//! Destructor
+		virtual ~TeLineLengthStrategy() {}
+
+		//! Function to compute the attribute
+		/* 
+			\param box		compute the attribute of a cell having this box
+		*/
+		virtual  string compute (TeBox box);
 };
 
 
+//! Class to compute the area of polygons covering a given box
+class TL_DLL TeTotalAreaPercentageStrategy: public TeComputeSpatialStrategy  
+{
+	public:
+		//! Constructor
+		/* 
+			\param theme_		the theme to be used as basis for computing the attribute
+		*/	
+		TeTotalAreaPercentageStrategy (TeTheme* theme_) : TeComputeSpatialStrategy(theme_, TePOLYGONS){}
 
+		//! Destructor
+		virtual ~TeTotalAreaPercentageStrategy() {}
+
+		//! Function to compute the attribute
+		/* 
+			\param box		compute the attribute of a cell having this box
+		*/
+		virtual string compute (TeBox box);
+};
 
-class TeCountPointObjectsStrategy: public TeComputeAttrSpatialStrategy  
+/*
+// pedro at 20061214
+//! Class to compute the distance based on a net 
+class TeMinimumDistanceNetStrategy:  public TeComputeSpatialStrategy
 {
+	public:
+		//! Constructor
+		TeMinimumDistanceNetStrategy(TeTheme* theme_, TeGeomRep rep_, TeGraphNetwork* net, double dist_ = 50) : TeComputeSpatialStrategy(theme_, rep_) { maxDist = dist_; tree = NULL; }
+		
+		//! Destructor
+		virtual ~TeMinimumDistanceNetStrategy() { if(tree) delete tree; }
 
-public:
-		TeCountPointObjectsStrategy () {}
-		virtual ~TeCountPointObjectsStrategy() {}
-		virtual  TePropertyVector compute (TeTheme* theme, const string& attrName, TeBox box, const string& columnName);
-};
+        void CreatePoints(TeCoord2D p1, TeCoord2D p2); // create all intermediate points between them, using the maximum distance
 
+		virtual string compute (TeBox box);
 
+		virtual TeAttrDataType Type() { return TeREAL; }
 
+	private:	
 
+		double maxDist;
 
-class TeLineLengthStrategy: public TeComputeAttrSpatialStrategy  
-{
-public:
-	TeLineLengthStrategy () {}
-		virtual ~TeLineLengthStrategy() {}
-		virtual  TePropertyVector compute (TeTheme* theme, const string& attrName, TeBox box, const string& columnName);
-};
+		vector<pair<TeCoord2D, TePoint> > dataSet;
 
-class TeMinimumDistancePolygonsStrategy: public TeComputeAttrSpatialStrategy  
-{
-public:
-	TeMinimumDistancePolygonsStrategy () {}
-		virtual ~TeMinimumDistancePolygonsStrategy() {}
-		virtual  TePropertyVector compute (TeTheme* theme, const string& attrName, TeBox box, const string& columnName);
+		KDTREE* tree;
 };
+*/
 
-class TeMinimumDistanceLinesStrategy: public TeComputeAttrSpatialStrategy  
-{
-public:
-	TeMinimumDistanceLinesStrategy () {}
-		virtual ~TeMinimumDistanceLinesStrategy() {}
-		virtual  TePropertyVector compute (TeTheme* theme, const string& attrName, TeBox box, const string& columnName);
-};
 
-class TeMinimumDistancePointsStrategy: public TeComputeAttrSpatialStrategy  
+//! Class to compute distances using KD-trees
+class TL_DLL TeMinimumDistanceStrategy:  public TeComputeSpatialStrategy
 {
-public:
-	TeMinimumDistancePointsStrategy () {}
-		virtual ~TeMinimumDistancePointsStrategy() {}
-		virtual  TePropertyVector compute (TeTheme* theme, const string& attrName, TeBox box, const string& columnName);
-};
+	public:
+		//! Constructor
+		/* 
+			\param theme_		the theme to be used as basis for computing the attribute
+			\param gep_			the geometry to be used
+			\param distError_	the maximum error tolerated by this operator
+		*/	
+		TeMinimumDistanceStrategy(TeTheme* theme_, TeGeomRep rep_, double distError_ = 50); 
+
+		//! Destructor
+		virtual ~TeMinimumDistanceStrategy() { if(tree) delete tree; }
+
+		//! Function to compute the attribute
+		/* 
+			\param box		compute the attribute of a cell having this box
+		*/
+		virtual string compute (TeBox box);
 
+	protected:
+		//! Create intermediate points between two given points, using the maximum distance
+        void CreatePoints(TeCoord2D p1, TeCoord2D p2);
 
+		//! The maximum error in the computation
+		double maxDist;
 
-class TeSumWeighByAreaStrategy: public TeComputeAttrSpatialStrategy  
-{
-public:
-	TeSumWeighByAreaStrategy () {}
-	virtual ~TeSumWeighByAreaStrategy() {}
-	virtual  TePropertyVector compute (TeTheme* theme, const string& attrName, TeBox box, const string& columnName);
+		//!
+		vector<pair<TeCoord2D, TePoint> > dataSet;
+
+		//! The tree to store the points
+		KDTREE* tree;
 };
 
 
+//! Class to compute the minimum distance to a theme of polygons. The calculatd distance is approximated, and has an error of at most
+//! the parameter dist_ in the constructor
+class TL_DLL TeMinimumDistancePolygonsStrategy: public TeMinimumDistanceStrategy
+{
+	public:
+		//! Constructor
+		/* 
+			\param theme_		the theme to be used as basis for computing the attribute
+			\param distError_	the maximum error tolerated by this operator
+		*/	
+		TeMinimumDistancePolygonsStrategy(TeTheme* theme_, double distError_ = 150);
+
+		//! Destructor
+		virtual ~TeMinimumDistancePolygonsStrategy() {}
+
+		//! Function to compute the attribute
+		/* 
+			\param box		compute the attribute of a cell having this box
+		*/
+		virtual string compute (TeBox box);
+};
 
 
-class TeSumWeighByRestrictedAreaStrategy: public TeComputeAttrSpatialStrategy  
+//! Class to compute 
+class TL_DLL TeMinimumDistanceLinesStrategy : public TeMinimumDistanceStrategy
 {
-private:
-		TeRaster* raster_;
-		map<int, int> classesSelection_;
-		int		band_;
-public:
-	TeSumWeighByRestrictedAreaStrategy (TeRaster* raster, map<int, int> classesSelection, int band = 0){
-		raster_ = raster; 
-		classesSelection_ = classesSelection;
-		band_ = band;}
-	virtual ~TeSumWeighByRestrictedAreaStrategy() {}
-	virtual  TePropertyVector compute (TeTheme* theme, const string& attrName, TeBox box, const string& columnName);
+	public:
+		//! Constructor
+		/* 
+			\param theme_		the theme to be used as basis for computing the attribute
+			\param distError_	the maximum error tolerated by this operator
+		*/	
+		TeMinimumDistanceLinesStrategy(TeTheme* theme_, double distError_ = 150);
+
+		//! Destructor
+		virtual ~TeMinimumDistanceLinesStrategy() {}
 };
 
 
-class TeAverageWeighByRestrictedAreaStrategy: public TeComputeAttrSpatialStrategy  
+//! Class to calculate the minimum distance of a box to points.
+//! It calculates the exact value once the KD-tree calculates the exact distance to points
+class TL_DLL TeMinimumDistancePointsStrategy: public TeMinimumDistanceStrategy
 {
-private:
-		TeRaster* raster_;
-		map<int, int> classesSelection_;
-		int		band_;
-public:
-	TeAverageWeighByRestrictedAreaStrategy (TeRaster* raster, map<int, int> classesSelection, int band = 0){
-		raster_ = raster; 
-		classesSelection_ = classesSelection;
-		band_ = band;}
-	virtual ~TeAverageWeighByRestrictedAreaStrategy() {}
-	virtual  TePropertyVector compute (TeTheme* theme, const string& attrName, TeBox box, const string& columnName);
+	public:
+		//! Constructor
+		/* 
+			\param theme_		the theme to be used as basis for computing the attribute
+		*/	
+		TeMinimumDistancePointsStrategy(TeTheme* theme_);
+
+		//! Destructor
+		virtual ~TeMinimumDistancePointsStrategy() {}
 };
 
+/** @} */
 #endif
+
diff --git a/src/terralib/kernel/TeConsoleErrorMessage.cpp b/src/terralib/kernel/TeConsoleErrorMessage.cpp
old mode 100644
new mode 100755
diff --git a/src/terralib/kernel/TeConsoleErrorMessage.h b/src/terralib/kernel/TeConsoleErrorMessage.h
old mode 100644
new mode 100755
index ab4ed38..8f697a1
--- a/src/terralib/kernel/TeConsoleErrorMessage.h
+++ b/src/terralib/kernel/TeConsoleErrorMessage.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,9 +20,8 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeConsoleErrorMessage.h
-    This file deals with the display of error messages in a console
+    \brief This file deals with the display of error messages in a console
 */
 #ifndef TeConsoleErrorMessage_H
 #define TeConsoleErrorMessage_H
diff --git a/src/terralib/kernel/TeCoord2D.h b/src/terralib/kernel/TeCoord2D.h
old mode 100644
new mode 100755
index 763784d..b10ec47
--- a/src/terralib/kernel/TeCoord2D.h
+++ b/src/terralib/kernel/TeCoord2D.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,9 +20,8 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeCoord2D.h
-    This file contains the definition of a classes to handle 2D coordinates
+    \brief This file contains the definition of a classes to handle 2D coordinates
 */
 #ifndef  __TERRALIB_INTERNAL_COORD2D_H
 #define  __TERRALIB_INTERNAL_COORD2D_H
@@ -36,22 +35,22 @@ of this library and its documentation.
 using namespace std;
 
 //! A class for handling 2D coordinates
-class TeCoord2D
+class TL_DLL TeCoord2D
 {
 public:
 
 	double	x_;		//!< x coordinate
 	double	y_;		//!< y coordinate
 
-//! Default contructor
+	//! Default contructor
 	TeCoord2D ( const double& x = 0., const double& y = 0. ):
 		x_ ( x ), y_ ( y ) {}
 
-//! Copy constructor
+	//! Copy constructor
 	TeCoord2D (const TeCoord2D& cd) 			
 		{x_ = cd.x_; y_ = cd.y_;}
 
-//! Operator =
+	//! Operator =
 	TeCoord2D& operator= ( const TeCoord2D& cd )
 	{
 		if ( this != &cd )
@@ -61,84 +60,97 @@ public:
 		return *this;
 	}
 		
-//!	Empty destructor.
+	//!	Empty destructor.
 	~TeCoord2D () { }
 
-//!	Returns the X componente of the coordinate
-	double	x () const 				
+	//!	Returns the X componente of the coordinate
+	const double&	x () const 				
 	{	return x_;	}
 
-//!	Sets the X componente of the coordinate
+	//!	Sets the X componente of the coordinate
 	void x ( const double& valX )
 	{	x_ = valX; }
 
-//!	Returns the Y componente of the coordinate
-	double 	y () const 				
+	//!	Returns the Y componente of the coordinate
+	const double& 	y () 		const		
 	{	return y_;	}
 
-//!	Sets the Y componente of the coordinate
+	//!	Sets the Y componente of the coordinate
 	void y(const double& valY)
 	{	y_ = valY; }
 
-//!	Sets the X and Y componentes of the coordinate
+	//!	Sets the X and Y componentes of the coordinate
 	void setXY(const double& xVal, const double& yVal )
 	{	x_= xVal; y_= yVal; }
 
-//!	Adds two coordinates
+	//!	Adds two coordinates
 	void 	operator+=(const TeCoord2D& cd)	{x_ += cd.x_; y_ += cd.y_;}
 
-//!	Returns TRUE if current coordinate is smaller than or equal	to TeCoord2D cd; returns FALSE otherwise 
+	//!	Returns TRUE if current coordinate is smaller than or equal	to TeCoord2D cd; returns FALSE otherwise 
 	bool  operator<= (const TeCoord2D& cd) const 
 		{return (( y_ - cd.y_ <= TePrecision::instance().precision() ) && 
 		         ( x_ - cd.x_ <= TePrecision::instance().precision() ) );}	
 
-//!	Returns TRUE if current coordinate is equal	to TeCoord2D cd; returns FALSE otherwise 
+	//!	Returns TRUE if current coordinate is equal	to TeCoord2D cd; returns FALSE otherwise 
 	bool operator== (const TeCoord2D& cd) const 
 	{return (  ( fabs (y_ - cd.y_) < TePrecision::instance().precision() ) 
 			&& ( fabs (x_ - cd.x_) < TePrecision::instance().precision() ) ); }
 
-//!	Returns TRUE if current coordinate is not equal to TeCoord2D cd; returns FALSE otherwise 
+	//!	Returns TRUE if current coordinate is not equal to TeCoord2D cd; returns FALSE otherwise 
 	bool	operator!= (const TeCoord2D& cd) const 
 		{return ( ( fabs (y_ - cd.y_) >= TePrecision::instance().precision() ) 
 		       || ( fabs (x_ - cd.x_) >= TePrecision::instance().precision() ) );}	
 
-//!	Returns TRUE if current coordinate is smaller than TeCoord2D cd; returns FALSE otherwise 
+	//!	Returns TRUE if current coordinate is smaller than TeCoord2D cd; returns FALSE otherwise 
 	bool	operator< (const TeCoord2D& cd) const 
 		{return ( y_ - cd.y_ < TePrecision::instance().precision() 
 		       && x_ - cd.x_ < TePrecision::instance().precision() );}	
 
-//!	Returns TRUE if current coordinate greater than maximum allowed; returns FALSE otherwise 
+	//!	Returns TRUE if current coordinate greater than maximum allowed; returns FALSE otherwise 
 	bool	tooBig ()
 		{return ( y_ > TeMAXFLOAT/10.|| x_ > TeMAXFLOAT/10.);}	
 
-//!	Rescales the coordinate by a value in X (xscale) and in Y (yscale)
+	//!	Rescales the coordinate by a value in X (xscale) and in Y (yscale)
 	void	scale ( const double xscale, const double yscale )
 	{ x_ = x_* xscale; y_ = y_ * yscale; }
 
 
-//!	Returns the middle coordinate in horizontal direction between current coordinate and rhs
+	//!	Returns the middle coordinate in horizontal direction between current coordinate and rhs
 	TeCoord2D halfWayHoriz ( TeCoord2D& rhs )
 	{
 		TeCoord2D mid (( rhs.x() + x() ) / 2., y() );
 		return mid;
 	}
 
-//!	Returns the middle coordinate in vertical direction between current coordinate and rhs
+	//!	Returns the middle coordinate in vertical direction between current coordinate and rhs
 	TeCoord2D halfWayVert  ( TeCoord2D& rhs )
 	{
 		TeCoord2D mid ( x(), ( y() + rhs.y() ) / 2. );
 		return mid;
 	}
 
+	//! A false interface to set an obejct identifier
 	void objectId(const string& /* id */ ) 
 	{	return;  }
 };
 
 //! An structure that contains a pair of coordinates
-struct TeCoordPair
+struct TL_DLL TeCoordPair
 {
-	TeCoord2D pt1;
-	TeCoord2D pt2;
+	TeCoord2D pt1;	//!< First coordinate value.
+	TeCoord2D pt2;	//!< Second coordinate value.
+
+	//! Default contructor: [(0.0),(0.0)]
+	TeCoordPair():
+		pt1(TeCoord2D(0.0,0.0)),
+		pt2(TeCoord2D(0.0,0.0))
+	{}
+
+	//! Constructor with parameters
+	TeCoordPair(const TeCoord2D& p1, const TeCoord2D& p2):
+		pt1(p1),
+		pt2(p2)
+		{}
 };
 
 //! A vector of pairs of coordinates
diff --git a/src/terralib/kernel/TeCounted.h b/src/terralib/kernel/TeCounted.h
old mode 100644
new mode 100755
index af9cf18..e13ce40
--- a/src/terralib/kernel/TeCounted.h
+++ b/src/terralib/kernel/TeCounted.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,19 +20,22 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeCounted.h
-    This file contains classes to support the counted object idiom
+    \brief This file contains classes to support the counted object idiom
 */
-#ifndef  __TERRALIB_INTERNAL_COUNTED_H
-#define  __TERRALIB_INTERNAL_COUNTED_H
 
 //! Supports the counted object idiom
 /*! 
 	A counted class keeps track of how many abstract instances are pointing
 	to the same implementation.
 */
-class TeCounted {
+
+#ifndef  __TERRALIB_INTERNAL_COUNTED_H
+#define  __TERRALIB_INTERNAL_COUNTED_H
+
+#include "TeDefines.h"
+
+class TL_DLL TeCounted {
 public:
 
 // -- Contructors
diff --git a/src/terralib/kernel/TeCoverage.h b/src/terralib/kernel/TeCoverage.h
new file mode 100644
index 0000000..617c7b0
--- /dev/null
+++ b/src/terralib/kernel/TeCoverage.h
@@ -0,0 +1,378 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*!
+  \file TeCoverage.h
+
+  \par This file contains structures and definitions for a generic
+       Coverage representation.
+*/
+#ifndef  __TERRALIB_INTERNAL_COVERAGE_H
+#define  __TERRALIB_INTERNAL_COVERAGE_H
+
+#include "TeGeometry.h"
+#include "TeDataTypes.h"
+#include "TeCoverageParams.h"
+#include "TeCoverageDecoder.h"
+#include "TeCoverageDecoderCacheLRU.h"
+#include "TeCoverageDecoderDatabase.h"
+#include "TeCoverageInterpolator.h"
+#include "TeCoverageInterpolatorNN.h"
+#include <vector>
+
+/*!
+  \class TeCoverage
+  \brief A generic Coverage class.
+
+  \par Coverage is a way of representing geographic information that
+       emphasizes relationships and the spatial distribution of earth
+       phenomena, rather than emphasizing features of independent locations.
+  \par This class represents a generic Coverage, which is a Coverage
+       with a generic geographic domain, e.g. a set of points or a set
+       of surfaces. Each element of the domain is associated to a value vector
+       that represents the different dimensions of the coverage information.
+  \par Each coverage is connected to a decoder, which provides a common
+       interface for retrieving coverage data wherever it is stored.
+  \par The elements of the domain can be traversed and its values can be
+       consulted using the coverage iterator. Also, the values on arbitrary
+       locations can be consulted using interpolation methods.
+  \sa TeCoverageParams TeCoverageDecoder TeCoverageInterpolator
+*/
+template <class T>
+class TeCoverage : public TeGeometry
+{
+public:
+
+    //! Constructor from parameters and interpolator
+    /*!
+      Construct a coverage object, but do not initialize the internal
+      structures. The interpolator provided must be for exclusive use of
+      this coverage, any external use of the interpolator is discouraged.
+      \param params information about the coverage
+      \param interpolator pointer to a coverage iterpolator
+    */
+    TeCoverage(TeCoverageParams& params, TeCoverageInterpolator<T>* interpolator = NULL) :
+        params_(params),
+        interpolator_(interpolator),
+        decoder_(NULL)
+    {
+    }
+
+    //! Coverage destructor
+    /*!
+      Clear internal structures before destroying the coverage object.
+    */
+    virtual ~TeCoverage()
+    {
+        clear();
+    }
+
+    //! Initalize the coverage
+    /*!
+      Instantiate internal structures, preparing the coverage for actual use.
+      Must be called before any attempt to read from the coverage.
+    */
+    virtual void init()
+    {
+        // Initialize decoder according to persistence type
+        if (!decoder_)
+        {
+            if (params_.getPersistenceType() == TePERSISTENCE_DATABASE)
+            {
+                decoder_ = new TeCoverageDecoderDatabase<T>(params_);
+                decoder_->init();
+            }
+            else if (params_.getPersistenceType() == TePERSISTENCE_DATABASE_CACHELRU)
+            {
+                decoder_ = new TeCoverageDecoderCacheLRU<T>(params_);
+                decoder_->init();
+            }
+        }
+
+        // Initialize interpolator
+        if (!interpolator_)
+        {
+            // If undefined, create default interpolator
+            interpolator_ = createDefaultInterpolator();
+        }
+        interpolator_->setDecoder(decoder_);
+
+        // Set box according to params
+        setBox(params_.getBoundingBox());
+    }
+
+    //! Clear internal structures
+    /*!
+      Clear internal structures such as de decoder and the interpolator.
+    */
+    virtual void clear()
+    {
+        if (decoder_)
+        {
+            delete(decoder_);
+            decoder_ = NULL;
+        }
+        if (interpolator_)
+        {
+            delete(interpolator_);
+            interpolator_ = NULL;
+        }
+    }
+
+    //! Return the type of the geometry
+    /*!
+      \return the type of the geometry
+    */
+    TeGeomRep elemType()
+    {
+        return TeCOVERAGE;
+    }
+
+    //! Return the coverage parameters
+    /*!
+      \return the coverage parameters
+    */
+    TeCoverageParams& getParameters()
+    {
+        return params_;
+    }
+
+    /*!
+      \class iterator
+      \brief A generic Coverage iterator.
+
+      \par An iterator for a Coverage representation. This iterator
+           is specific for traversing a set of generic geometries and basically
+           it encapsulates a generic geometry-value pair iterator.
+      \par The move-forward operators are used to traverse the coverage data.
+           At any point of the traversal, dereferencing operators might be used
+           to access the generic geometry, while the "[]" operator might be
+           used to access the values in different dimensions of the coverage.
+      \sa TeCoverage
+    */
+    class iterator
+    {
+        /*!
+          \typedef geom_it
+          \brief Generic geometry-value pair vector iterator.
+        */
+        typedef typename std::vector<TeGeomValuePair<T> >::iterator geom_it;
+    public:
+
+        //! Constructor from the base iterator
+        iterator(geom_it it) :
+            it_(it)
+        {
+        }
+          
+        //! Destructor
+        virtual ~iterator()
+        {
+        }
+
+        //! Prefix move-forward operator
+        iterator operator++()
+        {
+            it_++;
+            return *this;
+        }
+    
+        //! Posfix move-forward operator
+        iterator operator++(int)
+        {
+            iterator temp = *this;
+            ++it_;
+            return temp;
+        }
+
+        //! Operator for retrieving an instance of a generic geometry
+        /*!
+          \return an instance of a generic geometry
+        */
+        T operator*()
+        {
+            return it_->geom;
+        }
+
+        //! Operator for retrieving a pointer to a generic geometry
+        /*!
+          \return a pointer to a generic geometry
+        */
+        T* operator->()
+        {
+            return &(it_->geom);
+        }
+        
+        //! Operator for getting the value at a dimension of the coverage
+        /*!
+          \param dimension the dimension to be retrieved
+          \return a double value
+        */
+        double operator[](int dimension)
+        {
+            return it_->value[dimension];
+        }
+        
+        //! Return whether two iterators point to the same element
+        bool operator==(const iterator& rhs)
+        {
+            return it_ == rhs.it_;
+        }
+
+        //! Return whether two iterators point to the different elements
+        bool operator!=(const iterator& rhs)
+        {
+            return it_ != rhs.it_;
+        }
+
+    protected:
+        geom_it it_; //!< Generic geometry-value pair vector iterator
+    };   
+
+    // ---------------------  End of class TeCoverage::iterator
+
+    //! Return the beginning iterator
+    /*!
+      \par Return the beginning iterator for traversing the generic geometries
+           that form the spatial domain of this coverage.
+      \par The polygon parameter may be used to define a selection area. If no
+           polygon is provided, the selection area includes all the domain.
+      \par The relation parameter may be used to specify the kind of relation
+           (e.g. intersection, crossing, overlapping) that holds between the
+           selection area and the geometries to be selected . If no relation
+           is provided, it defaults to intersection.
+      \param poly an instance of TePolygon representing a selection area
+      \param relation a spatial relation
+      \return the beginning iterator
+    */
+    typename TeCoverage<T>::iterator begin(
+            TePolygon& poly = TePolygon(),
+            TeSpatialRelation relation = TeINTERSECTS)
+    {
+        std::vector<TeGeomValuePair<T> >& selected = selectGeomValuePairs(poly, relation);
+        TeCoverage<T>::iterator beginIt = TeCoverage<T>::iterator(selected.begin());
+        return beginIt;
+    }
+
+    //! Return the ending iterator
+    /*!
+      \par Return the beginning iterator for traversing the generic geometries
+           that form the spatial domain of this coverage.
+      \par The polygon parameter may be used to define a selection area. If no
+           polygon is provided, the selection area includes all the domain.
+      \par The relation parameter may be used to specify the kind of relation
+           (e.g. intersection, crossing, overlapping) that holds between the
+           selection area and the geometries to be selected . If no relation
+           is provided, it defaults to intersection.
+      \param poly an instance of TePolygon representing a selection area
+      \param relation a spatial relation
+      \return the ending iterator
+    */
+    typename TeCoverage<T>::iterator end(
+            TePolygon& poly = TePolygon(),
+            TeSpatialRelation relation = TeINTERSECTS)
+    {
+        std::vector<TeGeomValuePair<T> >& selected = selectGeomValuePairs(poly, relation);
+        TeCoverage<T>::iterator endIt = TeCoverage<T>::iterator(selected.end());
+        return endIt;
+    }
+
+    //! Evaluate the value of this coverage at an arbitrary location.
+    /*!
+      Evaluate the value of this coverage at an arbitrary location, using
+      the auxiliary interpolator object.
+      \param position the arbitrary location to be evaluated
+      \param the value vector, to be filled by this method
+    */
+    void evaluate(const TeCoord2D& location, std::vector<double>& value)
+    {
+        interpolator_->evaluate(location, value);
+    }
+
+    //! Fill a region of a raster with interpolated coverage data.
+    /*!
+      \par Fill the pixels of a squared region of a raster with
+           coverage data, using an interpolation method.
+      \param raster the raster to be filled with coverage data
+      \param rasterBand the raster band to be filled
+      \param coverageDimension the coverage dimension to be evaluated
+      \param box defines the raster region to be filled
+    */
+    void evaluate(TeRaster& raster, const int rasterBand, const int coverageDimension, const TeBox& box = TeBox())
+    {
+        interpolator_->evaluate(raster, rasterBand, coverageDimension, box);
+    }
+
+protected:
+
+    TeCoverageParams& params_; //!< stores information about this coverage
+    TeCoverageDecoder<T>* decoder_; //!< provides access to the coverage data
+    TeCoverageInterpolator<T>* interpolator_; //!< provides interpolation methods
+
+    //! Create a default interpolator
+    /*!
+      Create a default interpolator. This method is used in case no other
+      interpolator was provided on construction.
+    */
+    TeCoverageInterpolator<T>* createDefaultInterpolator()
+    {
+        // Default Coverage interpolator is nearest neighbour
+        return new TeCoverageInterpolatorNN<T>();
+    }
+
+    //! Select generic geometry-value pairs from the coverage
+    /*!
+      \par Select generic geometry-value pairs from the coverage, using the
+           decoder to access the coverage data.
+      \par The polygon parameter defines a selection area and the relation
+           parameter specifies the kind of relation (e.g. intersection,
+           crossing, overlapping) that holds between the selection area and
+           the geometries to be selected.
+      \param poly an instance of TePolygon representing a selection area
+      \param relation a spatial relation
+    */
+    std::vector<TeGeomValuePair<T> >& selectGeomValuePairs(const TePolygon& poly, const TeSpatialRelation relation)
+    {
+        std::vector<TeGeomValuePair<T> >& selected = lastSelectionResult_;
+
+        // Search decoder only if the selection is different from the last one
+        if ((!TeEquals(lastSelectionPolygon_, poly)) || lastSelectionRelation_ != relation)
+        {
+            decoder_->selectGeomValuePairs(poly, relation, selected);
+
+            // Save selection parameters and result
+            lastSelectionPolygon_ = poly;
+            lastSelectionRelation_ = relation;
+            lastSelectionResult_ = selected;
+        }
+        return selected;
+    }
+
+private:
+
+    TePolygon lastSelectionPolygon_; //!< the last polygon used for a selection
+    TeSpatialRelation lastSelectionRelation_; //!< the last relation used for a selection
+    std::vector<TeGeomValuePair<T> > lastSelectionResult_; //!< the last result of a selection
+};
+
+
+#endif // __TERRALIB_INTERNAL_COVERAGE_H
\ No newline at end of file
diff --git a/src/terralib/kernel/TeCoverageDecoder.h b/src/terralib/kernel/TeCoverageDecoder.h
new file mode 100644
index 0000000..6ef7358
--- /dev/null
+++ b/src/terralib/kernel/TeCoverageDecoder.h
@@ -0,0 +1,186 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*!
+  \file TeCoverageDecoder.h
+
+  \par This file contains definitions and algorithms for accessing persistent
+       representations of a generic Coverage.
+*/
+#ifndef  __TERRALIB_INTERNAL_COVERAGEDECODER_H
+#define  __TERRALIB_INTERNAL_COVERAGEDECODER_H
+
+#include "TeCoord2D.h"
+#include "TeException.h"
+#include "TeBlockLoader.h"
+#include "TeCoverageParams.h"
+#include "TeCoverageUtils.h"
+#include "TeSpatialOperations.h"
+#include <map>
+#include <vector>
+
+/*!
+  \def READ
+  \brief Read a value of some type from a pointer to a block of raw data.
+*/
+#define READ(data, t) *(t*)data; data += sizeof(t)
+
+/*!
+  \struct TeGeomValuePair
+  \brief A generic geometry-value pair.
+*/
+template <class T>
+struct TeGeomValuePair
+{
+    T geom; //!< A generic geometry
+    std::vector<double> value; //!< a value vector
+
+    //! Default constructor.
+    TeGeomValuePair(){}
+
+    //! Constructor for a generic geometry-value pair
+    TeGeomValuePair(const T& geom,
+                     const std::vector<double>& value):
+            geom(geom),
+            value(value){}
+};
+
+
+
+/*!
+  \struct TeCoverageBlock
+  \brief A generic coverage block.
+
+  \par A generic coverage block contais a set of generic geometry-value pairs.
+  \par This coverage block has a box, which is the minimum box enclosing all
+       the generic geometries that are in the block.
+*/
+template <class T>
+struct TeCoverageBlock
+{
+    int id; //!< The identifier of the block
+    TeBox box; //!< The minimum box enclosing all elements of the block
+    std::vector<TeGeomValuePair<T> > pairs; //!< vector of geometry-value pairs
+};
+
+/*!
+  \class TeCoverageDecoder
+  \brief Abstract class of a coverage data decoder.
+
+  \par The decoder is used to provide a common interface for accessing
+       coverage data regardless of where and how it is stored.
+  \sa TeGeomValuePair TeCoverageBlock
+*/
+template <class T>
+class TeCoverageDecoder
+{
+public:
+
+    //! Constructor from coverage parameters
+    TeCoverageDecoder(TeCoverageParams& params) :
+        params_(params)
+    {
+    }
+
+    //! Destructor
+    virtual ~TeCoverageDecoder()
+    {
+        clear();
+    }
+
+    //! Return the coverage parameters
+    virtual TeCoverageParams& getParameters()
+    {
+        return params_;
+    }
+
+    //! Initialize internal structures
+    /*!
+      Instantiate internal structures, must be called before any attempt
+      to access the coverage data.
+    */
+    virtual void init()
+    {
+    }
+
+    //! Clear internal structures
+    /*!
+      Clear internal structures, must be called before disposing of the
+      decoder.
+    */
+    virtual void clear()
+    {
+    }
+
+    //! Select generic geometry-value pairs from the coverage data
+    /*!
+      \par Select generic geometry-value pairs from the coverage data.
+      \par The polygon parameter defines a selection area and the relation
+           parameter specifies the kind of relation (e.g. intersection,
+           crossing, overlapping) that holds between the selection area and
+           the geometries to be selected.
+      \param poly an instance of TePolygon representing a selection area
+      \param relation a spatial relation
+      \sa TeGeomValuePair
+    */
+    virtual void selectGeomValuePairs(const TePolygon& poly, const TeSpatialRelation relation, std::vector<TeGeomValuePair<T> >& selected)
+    {
+        // Select blocks which contain geometries that might respect the
+        // spatial relation with the polygon
+        std::vector<TeCoverageBlock<T> >& blocks = std::vector<TeCoverageBlock<T> >();
+        selectBlocks(poly, TeINTERSECTS, blocks);
+
+        for (std::vector<TeCoverageBlock<T> >::iterator itBlocks = blocks.begin(); itBlocks != blocks.end(); ++itBlocks)
+        {
+            // Look at all geometry-value pairs of selected blocks
+            std::vector<TeGeomValuePair<T> >& pairs = itBlocks->pairs;
+            for (std::vector<TeGeomValuePair<T> >::iterator it = pairs.begin(); it != pairs.end(); ++it)
+            {
+                // If the spatial relation holds, add geom-value pair to the result
+                if (TeTopologicalRelation(&poly, &it->geom, relation))
+                {
+                    selected.push_back(*it);
+                }
+            }
+        }
+    }
+
+    //! Select generic coverage blocks from the coverage data
+    /*!
+      \par Select generic coverage blocks from the coverage data.
+      \par The polygon parameter defines a selection area and the relation
+           parameter specifies the kind of relation (e.g. intersection,
+           crossing, overlapping) that holds between the selection area and
+           at least one geometry in each block to be selected.
+      \param poly an instance of TePolygon representing a selection area
+      \param relation a spatial relation
+      \param dontSelect list IDs of blocks that must not be retrieved
+      \sa TeCoverageBlock TeSpatialRelation
+    */
+    virtual void selectBlocks(const TePolygon& poly, const TeSpatialRelation relation, std::vector<TeCoverageBlock<T> >& selected, std::set<int>& dontSelect = std::set<int>()) = 0;
+
+protected:
+
+    TeCoverageParams& params_;  //!< Coverage parameters.
+};
+
+#endif // __TERRALIB_INTERNAL_COVERAGEDECODER_H
\ No newline at end of file
diff --git a/src/terralib/kernel/TeCoverageDecoderCacheLRU.h b/src/terralib/kernel/TeCoverageDecoderCacheLRU.h
new file mode 100644
index 0000000..73fc76d
--- /dev/null
+++ b/src/terralib/kernel/TeCoverageDecoderCacheLRU.h
@@ -0,0 +1,190 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*!
+  \file TeCoverageDecoderCacheLRU.h
+  
+  \par This file defines a memory caching method for accessing data from
+       generic Coverages.
+*/
+#ifndef  __TERRALIB_INTERNAL_COVERAGEDECODERCACHELRU_H
+#define  __TERRALIB_INTERNAL_COVERAGEDECODERCACHELRU_H
+
+#include "TeCoverageDecoder.h"
+#include "TeCoverageDecoderDatabase.h"
+
+/*!
+  \def DEFAULT_CACHE_CAPACITY
+  \brief The default cache capacity (in number of blocks).
+*/
+#define DEFAULT_CACHE_CAPACITY 20
+
+/*!
+  \struct TeBoxIntersectionPredicate
+  \brief A predicate used to check intersection with a box.
+*/
+template <class T>
+struct TeBoxIntersectionPredicate
+{
+    TeBox box; //!< Box to be checked for intersection with blocks
+    std::set<int>& dontSelect; // IDs of blocks that must not be included
+
+    //! Constructor from box
+    TeBoxIntersectionPredicate(const TeBox& box, std::set<int>& dontSelect):
+            box(box), dontSelect(dontSelect){}
+
+    //! Return whether the block parameter intersects the box attribute
+    /*!
+      \param block coverage block to be checked for intersection
+      \return whether the block parameter intersects the box attribute
+    */
+    bool operator()(const TeCoverageBlock<T>& block) const {
+        if (dontSelect.find(block.id) == dontSelect.end()
+                && TeIntersects(box, block.box))
+        {
+            dontSelect.insert(block.id);
+            return true;
+        }
+        return false;
+    }
+};
+
+/*!
+  \class TeCoverageDecoderCacheLRU
+  \brief Class to decode a generic Coverage using LRU caching method.
+
+  \par This class assumes that the coverage data will be provided as
+       coverage blocks by a support decoder, and uses a memory caching method
+       to access this this support decoder less often.
+  \par The caching policy used is LRU (which stands for Least Recently
+       Used), meaning that the most recently used blocks are kept available,
+       whereas the least recently used blocks are discarded.
+  \par The cache capacity (in number of blocks) may be specified in the
+       constructor, otherwise a default capacity is used.
+*/
+template <class T>
+class TeCoverageDecoderCacheLRU : public TeCoverageDecoder<T>
+{
+public:
+
+    //! Constructor from parameters and capacity
+    TeCoverageDecoderCacheLRU(TeCoverageParams& params, const unsigned int capacity = 0) :
+        TeCoverageDecoder<T>(params),
+        capacity_(capacity),
+        decoder_(NULL)
+    {
+    }
+
+    //! Destructor
+    virtual ~TeCoverageDecoderCacheLRU()
+    {
+        clear();
+    }
+
+    //! Initialize internal structures
+    /*!
+      Instantiate internal structures, must be called before any
+      attempt to access the coverage data.
+    */
+    virtual void init()
+    {
+        if (capacity_ == 0)
+        {
+            capacity_ = DEFAULT_CACHE_CAPACITY;
+        }
+
+        if (!decoder_)
+        {
+            // Initialize the support decoder according to coverage parameters.
+            if (params_.getPersistenceType() == TePERSISTENCE_DATABASE_CACHELRU)
+            {
+                decoder_ = new TeCoverageDecoderDatabase<T>(params_);
+                decoder_->init();
+            }
+        }
+    }
+
+    //! Clear internal structures
+    /*!
+      Clear internal structures, must be called before disposing of the
+      decoder.
+    */
+    virtual void clear()
+    {
+        if (decoder_)
+        {
+            delete(decoder_); // Destroy the support decoder. 
+            decoder_ = NULL;
+        }
+    }
+
+    //! Select generic coverage blocks from the coverage data
+    /*!
+      \par Select generic coverage blocks from the coverage data.
+      \par The polygon parameter defines a selection area and the relation
+           parameter specifies the kind of relation (e.g. intersection,
+           crossing, overlapping) that holds between the selection area and
+           at least one geometry in each block to be selected.
+      \param poly an instance of TePolygon representing a selection area
+      \param relation a spatial relation
+      \param dontSelect list IDs of blocks that must not be retrieved
+      \sa TeCoverageBlock TeSpatialRelation
+    */
+    virtual void selectBlocks(const TePolygon& poly, const TeSpatialRelation relation, std::vector<TeCoverageBlock<T> >& selected, std::set<int>& dontSelect)
+    {
+        selected.clear();
+
+        // Move to the beginning the blocks on cache intersecting box
+        std::list<TeCoverageBlock<T> >::iterator bound;
+        bound = stable_partition(cache_.begin(), cache_.end(), TeBoxIntersectionPredicate<T>(poly.box(), dontSelect));
+
+        // Include blocks on the beginning of the cache in the return
+        selected.insert(selected.begin(), cache_.begin(), bound);
+
+        // Find other blocks on the support decoder
+        std::vector<TeCoverageBlock<T> >& blocksFromDecoder = std::vector<TeCoverageBlock<T> >();
+        decoder_->selectBlocks(poly, relation, blocksFromDecoder, dontSelect);
+
+        // For each block selected from the support decoder
+        for (std::vector<TeCoverageBlock<T> >::iterator it = blocksFromDecoder.begin(); it != blocksFromDecoder.end(); it++)
+        {
+            if (cache_.size() >= capacity_) // Check if cache is full
+            {
+                cache_.pop_back(); // Remove the least recently used block
+            }
+            cache_.push_front(*it); // Put new block on the head of the list
+
+            selected.push_back(*it); // And add block to the result
+        }
+    }
+
+protected:
+
+    TeCoverageDecoder<T>* decoder_; //!< Support coverage decoder
+
+    std::list<TeCoverageBlock<T> > cache_; //!< List of cached blocks
+
+    unsigned int capacity_; //!< Cache capacity
+
+};
+
+#endif // __TERRALIB_INTERNAL_COVERAGEDECODERCACHELRU_H
\ No newline at end of file
diff --git a/src/terralib/kernel/TeCoverageDecoderDatabase.h b/src/terralib/kernel/TeCoverageDecoderDatabase.h
new file mode 100644
index 0000000..83d2403
--- /dev/null
+++ b/src/terralib/kernel/TeCoverageDecoderDatabase.h
@@ -0,0 +1,391 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*!
+  \file TeCoverageDecoderDatabase.h
+
+  \par This file contains definitions and algorithms for accessing a
+       generic Coverage from a TerraLib database.
+*/
+#ifndef  __TERRALIB_INTERNAL_COVERAGEDECODERDATABASE_H
+#define  __TERRALIB_INTERNAL_COVERAGEDECODERDATABASE_H
+
+#include "TeCoverageDecoder.h"
+
+/*!
+  \class TeCoverageDecoderDatabase
+  \brief Class to decode a generic Coverage from a TerraLib database.
+*/
+template <class T>
+class TeCoverageDecoderDatabase : public TeCoverageDecoder<T>
+{
+public:
+
+    //! Constructor from parameters
+    TeCoverageDecoderDatabase(TeCoverageParams& params) :
+        TeCoverageDecoder<T>(params)
+    {
+    }
+
+    //! Initialize internal structures
+    /*!
+      Instantiate internal structures, must be called before any
+      attempt to access the coverage data.
+    */
+    virtual void init()
+    {
+        TeLayer* layer = TeRetrieveLayer(params_.getDatabase(), params_.getLayerId());
+
+        // Check if the coverage ID is specified
+        if (params_.getCoverageId().empty())
+        {
+            // Otherwise, get the first coverage (if any)
+            std::vector<std::string> coverageIds;
+            TeRetrieveCoverageIds(layer, coverageIds);
+            if (coverageIds.empty())
+            {
+                std::string errorMsg = "No coverage defined on layer " + Te2String(layer->id()) + ".";
+                throw TeException(UNKNOWN_ERROR_TYPE, errorMsg, false);
+            }
+            // New coverage ID is the first coverage found on layer
+            params_.setCoverageId(coverageIds.at(0));
+        }
+
+        // Set coverage table name
+        params_.setCoverageTable(TeRetrieveCoverageTable(layer, params_.getCoverageId()));
+
+        // Retrieve coverage dimensions information from the database
+        std::vector<TeCoverageDimension> dimensions;
+        TeRetrieveDimensions(layer, params_.getCoverageId(), dimensions);
+        params_.setDimensions(dimensions);
+
+        // Set coverage projection
+        params_.setProjection(layer->projection());
+
+        // Set coverage bounding box
+        params_.setBoundingBox(TeRetrieveCoverageBox(layer, params_.getCoverageId()));
+
+        // Set number of elements of the coverage
+        params_.setNumElements(TeRetrieveCoverageNumElements(layer, params_.getCoverageId()));
+    }
+
+    //! Select generic coverage blocks from the database.
+    /*!
+      \par Select generic coverage blocks from a TerraLib database. Uses
+           a TeBlockLoader object for retrieving blocks from the database.
+      \par The polygon parameter defines a selection area and the relation
+           parameter specifies the kind of relation (e.g. intersection,
+           crossing, overlapping) that holds between the selection area and
+           at least one geometry in each block to be selected.
+      \param poly an instance of TePolygon representing a selection area
+      \param relation a spatial relation
+      \param dontSelect list IDs of blocks that must not be retrieved
+      \sa TeCoverageBlock TeSpatialRelation TeBlockLoader
+    */
+    void selectBlocks(const TePolygon& poly, const TeSpatialRelation relation, std::vector<TeCoverageBlock<T> >& selected, std::set<int>& dontSelect)
+    {
+        selected.clear();
+
+        TeBox queryBox = poly.box();
+
+        // Set block loader parameters.
+        TeBlockLoaderParams loaderParams;
+        loaderParams.db = params_.getDatabase();
+        loaderParams.table_name = params_.getCoverageTable();
+        loaderParams.selection_box = queryBox;
+        loaderParams.load_all_attrs = true;
+        loaderParams.dont_load_ids = dontSelect;
+
+        // Construct loader and load blocks.
+        TeBlockLoader loader(loaderParams);
+        loader.loadBlocks();
+
+        // Iterate over blocks loaded
+        while (loader.fetchNext()) {
+
+            TeBox blockBox(loader.getDouble("lower_x"),
+                        loader.getDouble("lower_y"),
+                        loader.getDouble("upper_x"),
+                        loader.getDouble("upper_y"));
+
+            TePolygon& blockPoly = polygonFromBox(blockBox);
+
+            // If the spatial relation doesn't hold, proceed to the next block
+            if (!TeTopologicalRelation(&blockPoly, &poly, relation))
+            {
+                continue;
+            }
+
+            // Extract block contents.
+            long blockSize = 0;
+            unsigned char* data = NULL;
+            loader.getSpatialData(data, blockSize);
+            
+            // Decode block contents.
+            TeCoverageBlock<T>& block = decodeCoverageBlock(data, blockSize, params_.getDimensions());
+
+            // Set other block attributes
+            block.id = loader.getID();
+            block.box = blockBox;
+
+            // Add block to result
+            selected.push_back(block);
+        }
+    }
+
+protected:
+
+    //! Decode a generic geometry-value pair
+    /*!
+      \par Decode a generic geometry-value pair from a block of raw data.
+           As a side effect, the pointer to the data is moved forward to the
+           end of the decoded chunk.
+        \param data pointer to the memory location where the raw data starts
+        \param dimensions information about the coverage dimensions
+        \return a generic geometry-value pair
+    */
+    TeGeomValuePair<T> decodeGeomValuePair(unsigned char*& data, std::vector<TeCoverageDimension>& dimensions);
+
+    //! Decode a generic coverage block
+    /*!
+        \par Decode coverage block contents that are stored in the database
+             as raw binary data. As a side effect, the pointer to the data
+             is moved forward to the end of the decoded chunk.
+        \param data pointer to the memory location where the raw data starts
+        \param dataSize size of the raw data block to be decoded
+        \param dimensions information about the coverage dimensions
+        \return a generic coverage block
+    */
+    TeCoverageBlock<T> decodeCoverageBlock(unsigned char*& data, const long dataSize, std::vector<TeCoverageDimension>& dimensions)
+    {
+        TeCoverageBlock<T> block;
+
+        unsigned char* dataEnd = data + dataSize;
+
+        // Decode geom-value pairs from chunks of the block
+        unsigned int count = 0;
+        while (data < dataEnd)
+        {
+            TeGeomValuePair<T>& gvPair = decodeGeomValuePair(data, dimensions);
+            gvPair.geom.objectId(Te2String(count++));
+
+            block.pairs.push_back(gvPair); // Insert geom-value pair in block
+        }
+        return block;
+    }
+};
+
+//! Specialization for decoding a TePoint instead of a generic geometry
+TeGeomValuePair<TePoint>
+TeCoverageDecoderDatabase<TePoint>::decodeGeomValuePair(unsigned char*& data, std::vector<TeCoverageDimension>& dimensions)
+{
+    TeGeomValuePair<TePoint> gvPair = TeGeomValuePair<TePoint>();
+
+    // Set coordinates
+    double x = READ(data, double);
+    double y = READ(data, double);
+
+    gvPair.geom = TePoint(x, y);
+    
+    // Set values
+    gvPair.value = std::vector<double>();
+    std::vector<TeCoverageDimension>::iterator it = dimensions.begin();
+    std::vector<TeCoverageDimension>::iterator end = dimensions.end();
+    while (it != end)
+    {
+        double val = 0;
+
+        switch (it->type)
+        {
+        case (TeUNSIGNEDSHORT):
+            val = READ(data, unsigned short);
+            break;
+        case (TeSHORT):
+            val = READ(data, short);
+            break;
+        case (TeINTEGER):
+            val = READ(data, int);
+            break;                
+        case (TeUNSIGNEDLONG):
+            val = READ(data, unsigned long);
+            break;
+        case (TeLONG):
+            val = READ(data, long);
+            break;
+        case (TeFLOAT):
+            val = READ(data, float);
+            break;
+        case (TeDOUBLE):
+            val = READ(data, double);
+            break;
+        default:
+            // Exception (invalid type)
+            break;
+        }
+
+        gvPair.value.push_back(val);
+        it++;
+    }
+
+    return gvPair;
+}
+
+//! Specialization for decoding a TeLine2D instead of a generic geometry
+TeGeomValuePair<TeLine2D>
+TeCoverageDecoderDatabase<TeLine2D>::decodeGeomValuePair(unsigned char*& data, std::vector<TeCoverageDimension>& dimensions)
+{
+    TeGeomValuePair<TeLine2D> gvPair = TeGeomValuePair<TeLine2D>();
+
+    TeLine2D line = TeLine2D();
+
+    // Check number of points in the line
+    unsigned int numPoints = READ(data, unsigned int);
+
+    // Decode points and add to the line
+    for (unsigned int i = 0; i < numPoints; ++i)
+    {
+        double x = READ(data, double);
+        double y = READ(data, double);
+
+        line.add(TeCoord2D(x, y));
+    }
+
+    gvPair.geom = line;
+    
+    // Set values
+    gvPair.value = std::vector<double>();
+    std::vector<TeCoverageDimension>::iterator it = dimensions.begin();
+    std::vector<TeCoverageDimension>::iterator end = dimensions.end();
+    while (it != end)
+    {
+        double val = 0;
+
+        switch (it->type)
+        {
+        case (TeUNSIGNEDSHORT):
+            val = READ(data, unsigned short);
+            break;
+        case (TeSHORT):
+            val = READ(data, short);
+            break;
+        case (TeINTEGER):
+            val = READ(data, int);
+            break;                
+        case (TeUNSIGNEDLONG):
+            val = READ(data, unsigned long);
+            break;
+        case (TeLONG):
+            val = READ(data, long);
+            break;
+        case (TeFLOAT):
+            val = READ(data, float);
+            break;
+        case (TeDOUBLE):
+            val = READ(data, double);
+            break;
+        default:
+            // Exception (invalid type)
+            break;
+        }
+
+        gvPair.value.push_back(val);
+        it++;
+    }
+
+    return gvPair;
+}
+
+//! Specialization for decoding a TePolygon instead of a generic geometry
+TeGeomValuePair<TePolygon>
+TeCoverageDecoderDatabase<TePolygon>::decodeGeomValuePair(unsigned char*& data, std::vector<TeCoverageDimension>& dimensions)
+{
+    TeGeomValuePair<TePolygon> gvPair = TeGeomValuePair<TePolygon>();
+
+    TePolygon poly = TePolygon();
+    // Check number of linear rings in the polygon
+    unsigned int numLines = READ(data, unsigned int);
+
+    for (unsigned int i = 0; i < numLines; ++i)
+    {
+        TeLine2D line = TeLine2D();
+
+        // Check number of points in the line
+        unsigned int numPoints = READ(data, unsigned int);
+
+        // Decode points and add to the line
+        for (unsigned int i = 0; i < numPoints; ++i)
+        {
+            double x = READ(data, double);
+            double y = READ(data, double);
+
+            line.add(TeCoord2D(x, y));
+        }
+
+        TeLinearRing ring = TeLinearRing(line);
+        poly.add(ring);
+    }
+    gvPair.geom = poly;
+    
+    // Set values
+    gvPair.value = std::vector<double>();
+    std::vector<TeCoverageDimension>::iterator it = dimensions.begin();
+    std::vector<TeCoverageDimension>::iterator end = dimensions.end();
+    while (it != end)
+    {
+        double val = 0;
+
+        switch (it->type)
+        {
+        case (TeUNSIGNEDSHORT):
+            val = READ(data, unsigned short);
+            break;
+        case (TeSHORT):
+            val = READ(data, short);
+            break;
+        case (TeINTEGER):
+            val = READ(data, int);
+            break;                
+        case (TeUNSIGNEDLONG):
+            val = READ(data, unsigned long);
+            break;
+        case (TeLONG):
+            val = READ(data, long);
+            break;
+        case (TeFLOAT):
+            val = READ(data, float);
+            break;
+        case (TeDOUBLE):
+            val = READ(data, double);
+            break;
+        default:
+            // Exception (invalid type)
+            break;
+        }
+
+        gvPair.value.push_back(val);
+        it++;
+    }
+
+    return gvPair;
+}
+
+#endif // __TERRALIB_INTERNAL_COVERAGEDECODERDATABASE_H
\ No newline at end of file
diff --git a/src/terralib/kernel/TeCoverageImport.h b/src/terralib/kernel/TeCoverageImport.h
new file mode 100644
index 0000000..ca2cba9
--- /dev/null
+++ b/src/terralib/kernel/TeCoverageImport.h
@@ -0,0 +1,678 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*!
+  \file TeCoverageImport.h
+
+  \par This file contains algorithms for importing Coverage data
+       to a TerraLib database.
+*/
+#ifndef  __TERRALIB_INTERNAL_COVERAGEIMPORT_H
+#define  __TERRALIB_INTERNAL_COVERAGEIMPORT_H
+
+#include <sstream>
+
+#include "TeCoverageParams.h"
+#include "TeCoverageUtils.h"
+#include "TeCoverageImportUtils.h"
+#include <TeQuerier.h>
+#include <TeQuerierParams.h>
+//#include "TeDriverSHPDBF.h"
+
+/*!
+  \def WRITE
+  \brief Write a value of some type in a block of raw data.
+*/
+#define WRITE(data, t, v) *((t*)(data)) = v;  data += sizeof(t)
+
+
+/*!
+  \struct SerializedGeomValuePair
+  \brief A geometry and raw data that is the serialization of a geometry-value pair.
+*/
+template <class T>
+struct SerializedPair {
+    T geom;
+    unsigned char* data;
+    unsigned long size;
+};
+
+template <class T>
+struct CmpSerializedX {
+    bool operator() (SerializedPair<T>* s1, SerializedPair<T>* s2)
+    {
+        return s1->geom.box().center().x() < s2->geom.box().center().x();
+    }
+};
+
+template <class T>
+struct CmpSerializedY {
+    bool operator() (SerializedPair<T>* s1, SerializedPair<T>* s2)
+    {
+        return s1->geom.box().center().y() < s2->geom.box().center().y();
+    }
+};
+
+template <class T>
+void
+splitSerialized(std::vector<SerializedPair<T>* >& src,
+                typename std::vector<SerializedPair<T>* >::iterator& begin,
+                typename std::vector<SerializedPair<T>* >::iterator& end,
+                std::vector<std::vector<SerializedPair<T> > >& clusters)
+{
+    const int CLUSTER_CAPACITY = 300;
+    if ((end - begin) <= CLUSTER_CAPACITY)
+    {
+        std::vector<SerializedPair<T> >& cluster = std::vector<SerializedPair<T> >();
+        for (std::vector<SerializedPair<T>* >::iterator it = begin; it != end; it++)
+        {
+            SerializedPair<T>* pair = *it;
+            cluster.push_back(*pair);
+        }
+        clusters.push_back(cluster);
+        return;
+    }
+
+    TeBox box = TeBox();
+    for (std::vector<SerializedPair<T>* >::iterator it = begin; it != end; it++)
+    {
+        SerializedPair<T>* pair = (*it);
+        updateBox(box, pair->geom.box());
+    }
+
+    // split geom set horizontaly if width is larger than height
+    if ((box.x2_ - box.x1_) > (box.y2_ - box.y1_))
+    {
+        sort(begin, end, CmpSerializedX<T>());
+    }
+    // split verticaly otherwise
+    else
+    {
+        sort(begin, end, CmpSerializedX<T>());
+    }
+
+    std::vector<SerializedPair<T> *>::iterator mid = begin + (((end - begin) + 1) / 2);
+    splitSerialized(src, mid, end, clusters);
+    splitSerialized(src, begin, mid, clusters);
+}
+
+template <class T>
+void
+clusterSerialized(std::vector<SerializedPair<T> >& srcGroup, std::vector<std::vector<SerializedPair<T> > >& clusters)
+{
+    std::vector<SerializedPair<T>* >& pairs = std::vector<SerializedPair<T>* >();
+
+    for (std::vector<SerializedPair<T> >::iterator it = srcGroup.begin(); it != srcGroup.end(); it++)
+    {
+        SerializedPair<T>& pair = *it;
+        pairs.push_back(&pair);
+    }
+    splitSerialized(pairs, pairs.begin(), pairs.end(), clusters);
+}
+
+template <class T>
+void
+populateDatabase(TeLayer* layer, const std::string& coverageId, std::vector<std::vector<SerializedPair<T> > >& groups)
+{
+    TeDatabase* db = layer->database();
+
+    std::string& tableName = TeDefaultCoverageTable(layer, coverageId);
+    if (!db->tableExist(tableName))
+    {
+        createCoverageTable(layer, tableName);
+    }
+
+    // Bounding box of the coverage, to be calculated
+    TeBox coverageBox = TeBox();
+
+    // Iterate over the  collection of grouped points
+    std::vector<std::vector<SerializedPair<T> > >::iterator itGroups = groups.begin();
+    std::vector<std::vector<SerializedPair<T> > >::iterator endGroups = groups.end();
+    int count = 0;
+    while (itGroups != endGroups)
+    {
+        std::vector<SerializedPair<T> >& group = *(itGroups++);
+        std::vector<SerializedPair<T> >::iterator itPoints = group.begin();
+        std::vector<SerializedPair<T> >::iterator endPoints = group.end();
+
+        // Calculate block size, according to sizes of serialized points
+        unsigned long blockSize = 0;
+        while (itPoints != endPoints)
+        {
+            blockSize += itPoints->size;
+            itPoints++;
+        }
+
+        // Allocate enough memory for the block data
+        unsigned char* blockData = NULL;
+        blockData = (unsigned char*)malloc(blockSize);
+
+        unsigned char* dest = blockData;
+
+        // Create bounding box of the group
+        TeBox blockBox = TeBox();
+
+        // Reset iterator and iterate over the serialized points in the group
+        itPoints = group.begin();
+        while (itPoints != endPoints)
+        {
+            // Join chunks to the block data
+            unsigned char* src = itPoints->data;
+            for (unsigned int i = 0; i < itPoints->size; i++)
+            {
+                *dest++ = *src++;
+            }
+
+            // Update block bounding box
+            updateBox(blockBox, itPoints->geom.box());
+
+            itPoints++;
+        }
+
+        // Update coverage bounding box
+        updateBox(coverageBox, blockBox);
+
+        count++;
+
+        // Insert block data as an entry in the coverage block table
+        insertToCoverageTable(layer, tableName, count, blockBox, group.size(), blockData, blockSize);
+    }
+
+    // Create coverage layer, if it does not exist
+    std::string& layerTableName = TeDefaultCoverageLayerTable(layer);
+    if (!db->tableExist(layerTableName))
+    {   
+        createCoverageLayerTable(layer, layerTableName);
+    }
+    insertToCoverageLayerTable(layer, layerTableName, tableName, coverageId, coverageBox);
+
+    // Check if this coverage layer is in the representations table
+    TeRepresentation* rep = layer->getRepresentation(TeCOVERAGE, layerTableName);
+    if (rep != NULL)
+    {
+        // Update bounding box of the representation
+        updateBox(rep->box_, coverageBox);
+        
+        if (!db->updateRepresentation(layer->id(), *rep))
+        {
+            std::string errorMsg = "Couldn't update representation on layer '" + Te2String(layer->id()) + "'. DB error: \"" + db->errorMessage() + "\"";
+            throw TeException(UNKNOWN_ERROR_TYPE, errorMsg, false);
+        }
+    }
+    else
+    {
+        // Insert entry in the representations table
+        TeRepresentation* rep = new TeRepresentation();
+        rep->box_ = coverageBox;
+        rep->geomRep_ = TeCOVERAGE;
+        rep->tableName_ = layerTableName;
+        layer->addVectRepres(rep);
+
+        if (!db->insertRepresentation(layer->id(), *rep))
+        {
+            std::string errorMsg = "Couldn't insert representation on layer '" + Te2String(layer->id()) + "'. DB error: \"" + db->errorMessage() + "\"";
+            throw TeException(UNKNOWN_ERROR_TYPE, errorMsg, false);
+        }
+    }
+
+    // Update bounding box of the layer
+    layer->updateLayerBox(coverageBox);
+    if (!db->updateLayer(layer))
+    {
+        std::string errorMsg = "Couldn't update layer '" + Te2String(layer->id()) + "'. DB error: \"" + db->errorMessage() + "\"";
+        throw TeException(UNKNOWN_ERROR_TYPE, errorMsg, false);
+    }
+}
+
+//! Specialization for decoding a point layer
+bool
+decodeLayer(TeLayer* srcLayer, const std::vector<std::string>& columns, std::vector<SerializedPair<TePoint> >& serializedVector, std::vector<TeCoverageDimension>& dimensions)
+{
+    TeQuerierParams querierParams(true, columns);
+    querierParams.setParams(srcLayer);
+    TeQuerier querier(querierParams);
+    querier.loadInstances();
+
+    // Set information about the coverage dimensions
+    TeAttributeList attList = querier.getAttrList();
+    attributeListToCoverageDimensions(attList, dimensions);
+    
+    // Size of (x, y) pair
+    int chunkSize = (2 * sizeof(double)) + TeCoverageDimensionsSize(dimensions);
+
+    // Extract coverage data
+    unsigned int instanceCount = 0;
+    TeSTInstance sti;
+    while(querier.fetchInstance(sti))
+    {
+        if(!sti.hasPoints())
+        {
+            // If it doesn't have a point, proceed to the next instance
+            continue;
+        }
+
+        SerializedPair<TePoint> serialized;
+        serialized.size = chunkSize;
+
+        // Get only the first point
+        TePointSet pointSet;
+        sti.getGeometry(pointSet);
+        TePoint point = *(pointSet.begin());
+    
+        serialized.geom = point;
+
+        serialized.data = (unsigned char*)malloc(serialized.size);
+
+        unsigned char* temp = serialized.data;
+
+        // Write coordinates
+        WRITE(temp, double, point.location().x_);
+        WRITE(temp, double, point.location().y_);
+
+        // Write dimensions values
+        TePropertyVector vec = sti.getPropertyVector();
+        for(unsigned int i = 0; i < vec.size(); i++)
+        {
+            if (dimensions[i].type == TeINTEGER)
+            {
+                std::stringstream buf;
+                buf << vec[i].value_;
+                int val;
+                buf >> val;
+                WRITE(temp, int, val);
+                buf.clear();
+            }
+            else
+            {
+                std::stringstream buf;
+                buf << vec[i].value_;
+                double val;
+                buf >> val;
+                WRITE(temp, double, val);
+                buf.clear();
+            }
+        }
+        serializedVector.push_back(serialized);
+
+    }
+    return true;
+}
+
+bool
+decodeLayer(TeLayer* srcLayer, const std::vector<std::string>& columns, std::vector<SerializedPair<TeLine2D> >& serializedVector, std::vector<TeCoverageDimension>& dimensions)
+{
+    TeQuerierParams querierParams(true, columns);
+    querierParams.setParams(srcLayer);
+    TeQuerier querier(querierParams);
+    querier.loadInstances();
+
+    // Set information about the coverage dimensions
+    TeAttributeList attList = querier.getAttrList();
+    attributeListToCoverageDimensions(attList, dimensions);
+
+    int dimensionsSize = TeCoverageDimensionsSize(dimensions);
+    
+    // Extract coverage data
+    unsigned int instanceCount = 0;
+    TeSTInstance sti;
+    while(querier.fetchInstance(sti))
+    {
+        if(!sti.hasLines())
+        {
+            // If it doesn't have a line, proceed to the next instance
+            continue;
+        }
+
+        SerializedPair<TeLine2D> serialized;
+
+        // Get only the first line
+        TeLineSet lineSet;
+        sti.getGeometry(lineSet);
+        TeLine2D line = *(lineSet.begin());
+
+        serialized.geom = line;
+
+        int pointSize = (2 * sizeof(double));
+        serialized.size = sizeof(unsigned int) + (line.size() * pointSize) + dimensionsSize;
+
+        serialized.data = (unsigned char*)malloc(serialized.size);
+
+        unsigned char* temp = serialized.data;
+
+        WRITE(temp, unsigned int, line.size());
+
+        // Write point coordinates
+        for (unsigned int i = 0; i < line.size(); ++i)
+        {
+            TePoint point = line[i];
+            WRITE(temp, double, point.location().x_);
+            WRITE(temp, double, point.location().y_);
+        }
+
+        // Write dimensions values
+        TePropertyVector vec = sti.getPropertyVector();
+        for(unsigned int i = 0; i < vec.size(); i++)
+        {
+            if (dimensions[i].type == TeINTEGER)
+            {
+                std::stringstream buf;
+                buf << vec[i].value_;
+                int val;
+                buf >> val;
+                WRITE(temp, int, val);
+                buf.clear();
+            }
+            else
+            {
+                std::stringstream buf;
+                buf << vec[i].value_;
+                double val;
+                buf >> val;
+                WRITE(temp, double, val);
+                buf.clear();
+            }
+        }
+        serializedVector.push_back(serialized);
+
+    }
+    return true;
+}
+
+bool
+decodeLayer(TeLayer* srcLayer, const std::vector<std::string>& columns, std::vector<SerializedPair<TePolygon> >& serializedVector, std::vector<TeCoverageDimension>& dimensions)
+{
+    TeQuerierParams querierParams(true, columns);
+    querierParams.setParams(srcLayer);
+    TeQuerier querier(querierParams);
+    querier.loadInstances();
+
+    // Set information about the coverage dimensions
+    TeAttributeList attList = querier.getAttrList();
+    attributeListToCoverageDimensions(attList, dimensions);
+
+    int dimensionsSize = TeCoverageDimensionsSize(dimensions);
+    
+    // Extract coverage data
+    unsigned int instanceCount = 0;
+    TeSTInstance sti;
+    while(querier.fetchInstance(sti))
+    {
+        if(!sti.hasPolygons())
+        {
+            // If it doesn't have a polygon, proceed to the next instance
+            continue;
+        }
+
+        SerializedPair<TePolygon> serialized;
+
+        // Get only the first polygon
+        TePolygonSet polySet;
+        sti.getGeometry(polySet);
+        TePolygon poly = *(polySet.begin());
+
+        serialized.geom = poly;
+        
+        // Count number of lines and points that make this polygon
+        unsigned int numLines = 0;
+        unsigned int numPoints = 0;
+        for(unsigned int i = 0; i < poly.size(); ++i)
+        {
+            numLines += 1;
+            numPoints += poly[i].size();
+        }
+
+        int coordSize = (2 * sizeof(double));
+        serialized.size = sizeof(unsigned int) + (numLines * sizeof(unsigned int)) + (numPoints * coordSize) + dimensionsSize;
+
+        serialized.data = (unsigned char*)malloc(serialized.size);
+
+        unsigned char* temp = serialized.data;
+
+        // Write Polygon serialization
+        WRITE(temp, unsigned int, numLines);
+        for (unsigned int i = 0; i < numLines; ++i)
+        {
+            TeLine2D line = poly[i];
+            WRITE(temp, unsigned int, line.size());
+
+            // Write point coordinates
+            for (unsigned int j = 0; j < line.size(); ++j)
+            {
+                TePoint point = line[j];
+                WRITE(temp, double, point.location().x());
+                WRITE(temp, double, point.location().y());
+            }
+        }
+
+        // Write dimensions serialization
+        TePropertyVector vec = sti.getPropertyVector();
+        for(unsigned int i = 0; i < vec.size(); i++)
+        {
+            if (dimensions[i].type == TeINTEGER)
+            {
+                std::stringstream buf;
+                buf << vec[i].value_;
+                int val;
+                buf >> val;
+                WRITE(temp, int, val);
+                buf.clear();
+            }
+            else
+            {
+                std::stringstream buf;
+                buf << vec[i].value_;
+                double val;
+                buf >> val;
+                WRITE(temp, double, val);
+                buf.clear();
+            }
+        }
+        serializedVector.push_back(serialized);
+
+    }
+    return true;
+}
+
+//! Import Coverage from a layer of geometries, creating a new layer
+/*!
+  \par Import a Coverage from an existing layer of geometries in
+       a TerraLib database, creating a new layer where the coverage is stored.
+  \param database a pointer to the database to where the coverage will be imported
+  \param layerName name of the layer to be created
+  \param srcLayer pointer to the existing layer of geometries
+  \param srcAttrTableName name of an existing attributes table
+  \param columns columns of the attributes table to be imported
+  \param coverageId identifier of the coverage to be imported
+  \return a pointer to the generated layer
+*/
+template <class T>
+bool
+TeCoverageImportLayer(TeLayer* layer, TeLayer* srcLayer, const std::vector<std::string>& columns, const std::string& coverageId)
+{
+    if (!layer || !srcLayer)
+    {
+        std::string errorMsg = "Couldn't import Point Coverage. Illegal parameters.";
+        throw TeException(UNKNOWN_ERROR_TYPE, errorMsg, false);
+    }
+
+    // Check if the layer has a coverage with the same coverage id
+    std::vector<std::string> coverageIds;
+    TeRetrieveCoverageIds(layer, coverageIds);
+    if (find(coverageIds.begin(), coverageIds.end(), coverageId) != coverageIds.end())
+    {
+        std::string errorMsg = "Couldn't import Coverage. Coverage ID already in use.";
+        throw TeException(UNKNOWN_ERROR_TYPE, errorMsg, false);
+    }
+    
+    std::vector<SerializedPair<T> > serialized;
+    std::vector<TeCoverageDimension> dimensions;
+
+    // Get data (geometry-value pairs) and metadata (dimensions) from the source layer
+    if (!decodeLayer(srcLayer, columns, serialized, dimensions))
+    {
+        std::string errorMsg = "Couldn't import Coverage. Error decoding source layer.";
+        throw TeException(UNKNOWN_ERROR_TYPE, errorMsg, false);
+    }
+
+    // Set metadata table with dimensions information
+    std::string& metadataTableName = TeDefaultCoverageMetadataTable(layer);
+    fillCoverageMetadataTable(layer, metadataTableName, coverageId, dimensions);
+
+    // Partition geometries in clusters
+    std::vector<std::vector<SerializedPair<T> > > clusterGroups;
+    clusterSerialized<T>(serialized, clusterGroups);
+
+    // Add clusters to the database and update layer and representations info
+    populateDatabase<T>(layer, coverageId, clusterGroups);
+
+    return true;
+}
+
+//! Import Coverage from a layer of geometries
+/*!
+  \par Import a Coverage from an existing layer of geometries in
+       a TerraLib database to an existing layer of a TerraLib database.
+  \param layer pointer to a layer already created
+  \param srcLayer pointer to the existing layer of geometries
+  \param srcAttrTableName name of an existing attributes table
+  \param columns columns of the attributes table to be imported
+  \param coverageId identifier of the coverage to be imported
+  \return a pointer to the generated layer
+*/
+template <class T>
+TeLayer*
+TeCoverageImportLayer(TeDatabase* database, const std::string& layerName, TeLayer* srcLayer, const std::vector<std::string>& columns, const std::string& coverageId)
+{
+    if (!database || layerName.empty() || !srcLayer)
+    {
+        std::string errorMsg = "Couldn't import Point Coverage. Illegal parameters.";
+        throw TeException(UNKNOWN_ERROR_TYPE, errorMsg, false);
+    }
+
+    TeLayer* newLayer = createNewCoverageLayer(database, layerName, srcLayer->projection());
+    try {
+        TeCoverageImportLayer<T>(newLayer, srcLayer, columns, coverageId);
+    }
+    catch (TeException e)
+    {
+	    database->deleteLayer(newLayer->id());
+        throw e;
+    }
+
+	return newLayer;
+}
+
+//! Import Point Coverage from a Shape File, creating a new layer.
+/*!
+  \par Import a Point Coverage from a Shape File to a TerraLib
+       database, creating a new layer where the coverage is stored.
+  \param database a pointer to the database to where the coverage will
+         be imported
+  \param layerName name of the layer to be created
+  \param projection projection used in shape file
+  \param fileName name of the shape file to be read
+  \param columns columns of the shape file to be imported
+  \param coverageId identifier of the coverage to be imported
+  \return a pointer to the generated layer
+*/
+//TeLayer* TePointCoverageImportSHP(TeDatabase* database, const std::string& layerName, TeProjection* projection, const std::string& fileName, const std::vector<std::string>& columns, const std::string& coverageId = "0");
+
+//! Import Point Coverage from a Shape File.
+/*!
+  \par Import a Point Coverage from a Shape File to an existing
+       layer of a TerraLib database.
+  \param layer pointer to a layer already created
+  \param fileName name of the shape file to be read
+  \param columns columns of the shape file to be imported
+  \param coverageId identifier of the coverage to be imported
+  \return whether the coverage was imported successfully
+*/
+//bool TePointCoverageImportSHP(TeLayer* layer, const std::string& fileName, const std::vector<std::string>& columns, const std::string& coverageId = "0");
+
+
+/*
+bool
+TePointCoverageImportSHP(TeLayer* layer, const std::string& fileName, const std::vector<std::string>& columns, const std::string& coverageId)
+{
+    if (!layer || fileName.empty())
+    {
+        std::string errorMsg = "Couldn't import Point Coverage. Illegal parameters.";
+        throw TeException(UNKNOWN_ERROR_TYPE, errorMsg, false);
+    }
+
+    // Check if the layer has a coverage with the same coverage id
+    std::vector<std::string> coverageIds;
+    TeRetrieveCoverageIds(layer, coverageIds);
+    if (find(coverageIds.begin(), coverageIds.end(), coverageId) != coverageIds.end())
+    {
+        std::string errorMsg = "Couldn't import Point Coverage. Coverage ID already in use.";
+        throw TeException(UNKNOWN_ERROR_TYPE, errorMsg, false);
+    }
+    
+    SerializedPointVector serializedPoints;
+    std::vector<TeCoverageDimension> dimensions;
+
+    // Get data (point-value pairs) and metadata (dimensions) from a ShapeFile
+    if (!decodeSHPFile(fileName, columns, serializedPoints, dimensions))
+    {
+        std::string errorMsg = "Couldn't import Point Coverage. Error decoding Shape File.";
+        throw TeException(UNKNOWN_ERROR_TYPE, errorMsg, false);
+    }
+
+    // Set metadata table with dimensions information
+    std::string& metadataTableName = TeDefaultCoverageMetadataTable(layer);
+    fillCoverageMetadataTable(layer, metadataTableName, coverageId, dimensions);
+
+    // Partition points in clusters
+    std::vector<SerializedPointVector> clusterGroups;
+    clusterSerializedPoints(serializedPoints, clusterGroups);
+
+    // Add clusters to the database and update layer and representations info
+    populateDatabase(layer, coverageId, clusterGroups);
+
+    return true;
+}
+
+TeLayer*
+TePointCoverageImportSHP(TeDatabase* database, const std::string& layerName, TeProjection* projection, const std::string& fileName, const std::vector<std::string>& columns, const std::string& coverageId)
+{	
+    if (!database || !projection || layerName.empty() || fileName.empty())
+    {
+        std::string errorMsg = "Couldn't import Point Coverage. Illegal parameters.";
+        throw TeException(UNKNOWN_ERROR_TYPE, errorMsg, false);
+    }
+
+    TeLayer* newLayer = createNewCoverageLayer(database, layerName, projection);
+    try {
+        TePointCoverageImportSHP(newLayer, fileName, columns, coverageId);
+    }
+    catch (TeException e)
+    {
+	    database->deleteLayer(newLayer->id());
+        throw e;
+    }
+
+	return newLayer;
+}
+*/
+
+#endif // __TERRALIB_INTERNAL_COVERAGEIMPORT_H
\ No newline at end of file
diff --git a/src/terralib/kernel/TeCoverageImportUtils.cpp b/src/terralib/kernel/TeCoverageImportUtils.cpp
new file mode 100644
index 0000000..0fc4932
--- /dev/null
+++ b/src/terralib/kernel/TeCoverageImportUtils.cpp
@@ -0,0 +1,286 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+
+/*
+** ----------------------------------------------------------------------------
+** Includes:
+*/
+
+#include "TeCoverageImportUtils.h"
+
+/*
+** ----------------------------------------------------------------------------
+** Definitions:
+*/
+
+/*
+** ----------------------------------------------------------------------------
+** Methods Implementation:
+*/
+
+void attributeListToCoverageDimensions(const TeAttributeList& attributes, std::vector<TeCoverageDimension>& dimensions)
+{
+    dimensions.clear();
+
+    unsigned int count = 0;
+    for (TeAttributeList::const_iterator it = attributes.begin(); it != attributes.end(); it++)
+    {
+        TeDataType dimensionType = (it->rep_.type_ == TeINT) ? TeINTEGER : TeDOUBLE;
+        dimensions.push_back(TeCoverageDimension(count, it->rep_.name_, dimensionType));
+        count++;
+    }
+}
+
+void
+createCoverageTable(TeLayer* layer, std::string& tableName)
+{
+    TeAttributeList attList;
+    
+    TeAttribute blockIdAtt;
+
+    blockIdAtt.rep_.type_ = TeINT;
+    blockIdAtt.rep_.name_ = "block_id";
+    blockIdAtt.rep_.isPrimaryKey_ = true;
+    attList.push_back(blockIdAtt);
+
+    TeAttribute lowerXAtt;
+    lowerXAtt.rep_.type_ = TeREAL;
+    lowerXAtt.rep_.name_ = "lower_x";
+    attList.push_back(lowerXAtt);
+
+    TeAttribute lowerYAtt;
+    lowerYAtt.rep_.type_ = TeREAL;
+    lowerYAtt.rep_.name_ = "lower_y";
+    attList.push_back(lowerYAtt);
+
+    TeAttribute upperXAtt;
+    upperXAtt.rep_.type_ = TeREAL;
+    upperXAtt.rep_.name_ = "upper_x";
+    attList.push_back(upperXAtt);
+
+    TeAttribute upperYAtt;
+    upperYAtt.rep_.type_ = TeREAL;
+    upperYAtt.rep_.name_ = "upper_y";
+    attList.push_back(upperYAtt);
+
+    TeAttribute numElementsAtt;
+    numElementsAtt.rep_.type_ = TeINT;
+    numElementsAtt.rep_.name_ = "num_elements";
+    attList.push_back(numElementsAtt);
+
+    TeAttribute spatialDataAtt;
+    spatialDataAtt.rep_.type_ = TeBLOB;
+    spatialDataAtt.rep_.name_ = "spatial_data";
+    attList.push_back(spatialDataAtt);
+
+    if (!layer->database()->createTable(tableName, attList))
+    {
+        std::string errorMsg = "Couldn't create table '" + tableName + "'.";
+        throw TeException(UNKNOWN_ERROR_TYPE, errorMsg, false);
+    }
+
+}
+
+void
+insertToCoverageTable(TeLayer* layer, std::string& tableName, const unsigned int blockId, const TeBox& blockBox, const unsigned int numElements, unsigned char* data, const unsigned long dataSize)
+{
+    // Insert block info into the coverage table
+    std::string sqlInsert = "INSERT INTO " + tableName + " (block_id, lower_x, lower_y, upper_x, upper_y, num_elements) VALUES ('" + Te2String(blockId) + "', " + Te2String(blockBox.x1_) + ", " + Te2String(blockBox.y1_) + ", " + Te2String(blockBox.x2_) + ", " + Te2String(blockBox.y2_) + ", " + Te2String(numElements) + ")";
+    if (!layer->database()->execute(sqlInsert))
+    {
+        std::string errorMsg = "Couldn't insert block '" + Te2String(blockId) + "' to coverage table '" + tableName + "'.";
+        throw TeException(UNKNOWN_ERROR_TYPE, errorMsg, false);
+    }
+
+    // Insert block data into the coverage table
+    std::string whereClause = "block_id = " + Te2String(blockId);
+    if (!layer->database()->insertBlob(tableName, "spatial_data", whereClause , data, dataSize))
+    {
+        std::string errorMsg = "Couldn't insert block '" + Te2String(blockId) + "' to coverage table '" + tableName + "'.";
+        throw TeException(UNKNOWN_ERROR_TYPE, errorMsg, false);
+    }
+}
+
+void
+createCoverageLayerTable(TeLayer* layer, std::string& tableName)
+{
+    TeAttributeList attList;
+    
+    TeAttribute geomIdAtt;
+    geomIdAtt.rep_.type_ = TeINT;
+    geomIdAtt.rep_.name_ = "geom_id";
+    geomIdAtt.rep_.isPrimaryKey_ = true;
+    geomIdAtt.rep_.isAutoNumber_ = true;
+    attList.push_back(geomIdAtt);
+
+    TeAttribute coverageIdAtt;
+    coverageIdAtt.rep_.type_ = TeSTRING;
+    coverageIdAtt.rep_.numChar_ = 25;
+    coverageIdAtt.rep_.name_ = "coverage_id";
+    coverageIdAtt.rep_.isPrimaryKey_ = false;
+	attList.push_back(coverageIdAtt);
+
+    TeAttribute coverageTableAtt;
+    coverageTableAtt.rep_.type_ = TeSTRING;
+    coverageTableAtt.rep_.numChar_ = 255;
+    coverageTableAtt.rep_.name_ = "coverage_table";
+    coverageTableAtt.rep_.isPrimaryKey_ = false;
+	attList.push_back(coverageTableAtt);
+
+    TeAttribute lowerXAtt;
+    lowerXAtt.rep_.type_ = TeREAL;
+    lowerXAtt.rep_.name_ = "lower_x";
+    attList.push_back(lowerXAtt);
+
+    TeAttribute lowerYAtt;
+    lowerYAtt.rep_.type_ = TeREAL;
+    lowerYAtt.rep_.name_ = "lower_y";
+    attList.push_back(lowerYAtt);
+
+    TeAttribute upperXAtt;
+    upperXAtt.rep_.type_ = TeREAL;
+    upperXAtt.rep_.name_ = "upper_x";
+    attList.push_back(upperXAtt);
+
+    TeAttribute upperYAtt;
+    upperYAtt.rep_.type_ = TeREAL;
+    upperYAtt.rep_.name_ = "upper_y";
+    attList.push_back(upperYAtt);
+
+    if (!layer->database()->createTable(tableName, attList))
+    {
+        std::string errorMsg = "Couldn't create table '" + tableName + "'.";
+        throw TeException(UNKNOWN_ERROR_TYPE, errorMsg, false);
+    }
+}
+
+void
+insertToCoverageLayerTable(TeLayer* layer, std::string& coverageLayerTableName, std::string& coverageTableName, const std::string& coverageId, TeBox& coverageBox)
+{
+    // Insert entry in the coverage layer table
+    std::string sqlInsert = "INSERT INTO " + coverageLayerTableName + " (coverage_id, coverage_table, lower_x, lower_y, upper_x, upper_y) VALUES ('" + coverageId + "', '" + coverageTableName + "', " + Te2String(coverageBox.x1_) + ", " + Te2String(coverageBox.y1_) + ", " + Te2String(coverageBox.x2_) + ", " + Te2String(coverageBox.y2_) + ")";
+    if (!layer->database()->execute(sqlInsert))
+    {
+        std::string errorMsg = "Couldn't insert coverage '" + coverageId + "' to layer table '" + coverageLayerTableName + "'.";
+        throw TeException(UNKNOWN_ERROR_TYPE, errorMsg, false);
+    }
+}
+
+void
+createCoverageMetadataTable(TeLayer* layer, std::string& metadataTableName)
+{
+    TeAttributeList attList;
+
+    TeAttribute coverageIdAtt;
+    coverageIdAtt.rep_.type_ = TeSTRING;
+    coverageIdAtt.rep_.numChar_ = 25;
+    coverageIdAtt.rep_.name_ = "coverage_id";
+    coverageIdAtt.rep_.isPrimaryKey_ = true;
+	attList.push_back(coverageIdAtt);
+
+    TeAttribute dimensionIdAtt;
+    dimensionIdAtt.rep_.type_ = TeINT;
+    dimensionIdAtt.rep_.name_ = "dimension_id";
+    dimensionIdAtt.rep_.isPrimaryKey_ = true;
+    attList.push_back(dimensionIdAtt);
+
+    TeAttribute dataTypeAtt;
+    dataTypeAtt.rep_.type_ = TeINT;
+    dataTypeAtt.rep_.name_ = "data_type";
+    dataTypeAtt.rep_.isPrimaryKey_ = false;
+    attList.push_back(dataTypeAtt);
+
+    TeAttribute nameAtt;
+    nameAtt.rep_.type_ = TeSTRING;
+    nameAtt.rep_.numChar_ = 25;
+    nameAtt.rep_.name_ = "name";
+    nameAtt.rep_.isPrimaryKey_ = false;
+	attList.push_back(nameAtt);
+
+    if (!layer->database()->createTable(metadataTableName, attList))
+    {
+        std::string errorMsg = "Couldn't create table '" + metadataTableName + "'.";
+        throw TeException(UNKNOWN_ERROR_TYPE, errorMsg, false);
+    }
+}
+
+void
+fillCoverageMetadataTable(TeLayer* layer, std::string& metadataTableName, const std::string& coverageId, std::vector<TeCoverageDimension>& dimensions)
+{
+    TeDatabase* db = layer->database();
+    if (!db->tableExist(metadataTableName))
+    {   
+        createCoverageMetadataTable(layer, metadataTableName);
+    }
+
+    for (std::vector<TeCoverageDimension>::iterator it = dimensions.begin(); it != dimensions.end(); it++)
+    {
+        const std::string& coverageIdStr = coverageId;
+        const std::string dimensionIdStr = Te2String(it->dimension_id);
+        const std::string dataTypeStr = Te2String(static_cast<TeDataType>(it->type));
+        const std::string& nameStr = it->name;
+
+        std::string sqlInsert = "INSERT INTO " + metadataTableName + " (coverage_id, dimension_id, data_type, name) VALUES ('" + coverageIdStr + "', '" + dimensionIdStr + "', '" + dataTypeStr + "', '" + nameStr + "')";
+
+        if (!db->execute(sqlInsert))
+        {
+            std::string errorMsg = "Couldn't insert values to metadata table '" + metadataTableName + "'.";
+            throw TeException(UNKNOWN_ERROR_TYPE, errorMsg, false);
+        }
+    }
+}
+
+TeLayer* createNewCoverageLayer(TeDatabase* database, const std::string& layerName, TeProjection* projection)
+{
+    // Find a valid layer name
+    std::string newLayerName = layerName;
+    TeLayerMap& layerMap = database->layerMap();
+    TeLayerMap::iterator it = layerMap.begin();
+    int n = 0;
+    while (it != layerMap.end())
+    {
+        if (TeStringCompare(it->second->name(),newLayerName))
+        {
+            // Try another name and restart search
+            newLayerName = layerName + "_" + Te2String(n++);
+            it = layerMap.begin();
+            continue;
+        }
+        it++;
+    }
+
+    // Create new layer
+	TeLayer* newLayer = new TeLayer(newLayerName, database, projection);
+	if (!newLayer || newLayer->id() <= 0)
+    {
+        std::string errorMsg = "Layer creation failed.";
+        throw TeException(UNKNOWN_ERROR_TYPE, errorMsg, false);
+    }
+
+    return newLayer;
+}
+
+/*
+** ----------------------------------------------------------------------------
+** End:
+*/
\ No newline at end of file
diff --git a/src/terralib/kernel/TeCoverageImportUtils.h b/src/terralib/kernel/TeCoverageImportUtils.h
new file mode 100644
index 0000000..fe990d1
--- /dev/null
+++ b/src/terralib/kernel/TeCoverageImportUtils.h
@@ -0,0 +1,48 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeCoverageImportUtils.h
+    \brief This file contains utility functions for importing coverages.
+*/
+#ifndef  __TERRALIB_INTERNAL_COVERAGEIMPORTUTILS_H
+#define  __TERRALIB_INTERNAL_COVERAGEIMPORTUTILS_H
+
+#include "TeCoverageParams.h"
+#include "TeCoverageUtils.h"
+
+TL_DLL void attributeListToCoverageDimensions(const TeAttributeList& attributes, std::vector<TeCoverageDimension>& dimensions);
+
+TL_DLL void createCoverageTable(TeLayer* layer, std::string& tableName);
+
+TL_DLL void insertToCoverageTable(TeLayer* layer, std::string& tableName, const unsigned int blockId, const TeBox& blockBox, const unsigned int numElements, unsigned char* data, const unsigned long dataSize);
+
+TL_DLL void createCoverageLayerTable(TeLayer* layer, std::string& tableName);
+
+TL_DLL void insertToCoverageLayerTable(TeLayer* layer, std::string& coverageLayerTableName, std::string& coverageTableName, const std::string& coverageId, TeBox& coverageBox);
+
+TL_DLL void createCoverageMetadataTable(TeLayer* layer, std::string& metadataTableName);
+
+TL_DLL void fillCoverageMetadataTable(TeLayer* layer, std::string& metadataTableName, const std::string& coverageId, std::vector<TeCoverageDimension>& dimensions);
+
+TL_DLL TeLayer* createNewCoverageLayer(TeDatabase* database, const std::string& layerName, TeProjection* projection = NULL);
+
+#endif // __TERRALIB_INTERNAL_COVERAGEIMPORTUTILS_H
\ No newline at end of file
diff --git a/src/terralib/kernel/TeCoverageInterpolator.h b/src/terralib/kernel/TeCoverageInterpolator.h
new file mode 100644
index 0000000..fc8f1e4
--- /dev/null
+++ b/src/terralib/kernel/TeCoverageInterpolator.h
@@ -0,0 +1,102 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*!
+  \file TeCoverageInterpolator.h
+  
+  \par This file defines an interpolation method for using with 
+       Coverage representations
+*/
+#ifndef  __TERRALIB_INTERNAL_COVERAGEINTERPOLATOR_H
+#define  __TERRALIB_INTERNAL_COVERAGEINTERPOLATOR_H
+
+#include "TeCoverageDecoder.h"
+
+/*!
+  \class TeCoverageInterpolator
+  \brief Provides an interpolation method for coverages.
+
+  \par Abstract class for providing an interpolation method for generic
+       Coverages.
+  \par Assumes that the coverage decoder will be provided, for more efficient
+       access to the the coverage data.
+*/
+template <class T>
+class TeCoverageInterpolator
+{
+public:
+
+    //! Default constructor
+    TeCoverageInterpolator() :
+        decoder_(NULL)
+    {
+    }
+
+    //! Destructor
+    virtual ~TeCoverageInterpolator()
+    {
+    }
+
+    //! Set the decoder
+    /*!
+      \param decoder the coverage decoder
+    */
+    virtual void setDecoder(TeCoverageDecoder<T>* decoder)
+    {
+        decoder_ = decoder;
+    }
+
+    //! Return the decoder
+    /*!
+      \return the coverage decoder
+    */
+    virtual TeCoverageDecoder<T>* getDecoder() const
+    {
+        return decoder_;
+    }
+
+    //! Retrieve the coverage value at an arbitrary location.
+    /*!
+      \par Retrieve the coverage value at an arbitrary location, using the
+           coverage decoder to access the coverage data.
+      \param position the arbitrary location to be evaluated
+      \param the value vector, to be filled by this method
+    */
+    virtual void evaluate(const TeCoord2D& position, std::vector<double>& value) = 0;
+
+    //! Fill a region of a raster with interpolated coverage data.
+    /*!
+      \par Fill the pixels of a squared region of a raster with
+           coverage data, using an interpolation method.
+      \param raster the raster to be filled with coverage data
+      \param rasterBand the raster band to be filled
+      \param coverageDimension the coverage dimension to be evaluated
+      \param box defines the raster region to be filled
+    */
+    virtual void evaluate(TeRaster& raster, const int rasterBand, const int coverageDimension, const TeBox& box = TeBox()) = 0;
+
+protected:
+
+    TeCoverageDecoder<T>* decoder_; //!< The coverage decoder.
+};
+
+#endif // __TERRALIB_INTERNAL_COVERAGEINTERPOLATOR_H
\ No newline at end of file
diff --git a/src/terralib/kernel/TeCoverageInterpolatorNN.h b/src/terralib/kernel/TeCoverageInterpolatorNN.h
new file mode 100644
index 0000000..6f6f7e1
--- /dev/null
+++ b/src/terralib/kernel/TeCoverageInterpolatorNN.h
@@ -0,0 +1,256 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*!
+  \file TeCoverageInterpolatorNN.h
+
+  \par This file defines a Nearest Neighbour interpolation method for
+       using with generic Coverage representations.
+*/
+#ifndef  __TERRALIB_INTERNAL_COVERAGEINTERPOLATORNN_H
+#define  __TERRALIB_INTERNAL_COVERAGEINTERPOLATORNN_H
+
+#include "TeCoverageInterpolator.h"
+
+/*!
+  \class TeCoverageInterpolatorNN
+  \brief Provides a Nearest Neighbour interpolation method for coverages.
+*/
+template <class T>
+class TeCoverageInterpolatorNN : public TeCoverageInterpolator<T>
+{
+public:
+
+    //! Set the decoder
+    /*!
+      \param decoder the coverage decoder
+    */
+    virtual void setDecoder(TeCoverageDecoder<T>* decoder)
+    {
+        decoder_ = decoder;
+
+        // Get global bounding box and total number of coverage elements
+        int numElements = decoder->getParameters().getNumElements();
+        TeBox& decoderBox = decoder->getParameters().getBoundingBox();
+        double boxArea = decoderBox.width() * decoderBox.height();
+
+        // Calculate the initial radius for nearest neighbour interpolation
+        // There is no need to be precise, this is just an heuristic.
+
+        // search area = total area / number of elements
+        // pi * r^2 = search area  -->  r = sqrt(search area / pi)
+        initialNeighbourhoodRadius_ = sqrt((boxArea / numElements) / 3.14159);
+    }
+
+
+    //! Retrieve the coverage value at an arbitrary location.
+    /*!
+      \par Retrieve the coverage value at an arbitrary location, using the
+           coverage decoder to access the coverage data.
+      \par This implementation looks for the generic geometry that is the
+           nearest neighbour of the position passed as parameter and returns
+           the value associated to it.
+      \param position the arbitrary location to be evaluated
+      \param the value vector, to be filled by this method
+    */
+    virtual void evaluate(const TeCoord2D& position, std::vector<double>& value)
+    {
+        TeGeomValuePair<T> nearestPoint = nearestNeighbour(position);
+        value = nearestPoint.value;
+    }
+
+    //! Fill a region of a raster with interpolated coverage data.
+    /*!
+      \par Fill the pixels of a squared region of a raster with coverage
+           data. The value of each pixel coordinate is retrieved from
+           the coverage, using an interpolation method (nearest neighbour).
+      \param raster the raster to be filled with coverage data
+      \param rasterBand the raster band to be filled
+      \param coverageDimension the coverage dimension to be evaluated
+      \param box defines the raster region to be filled
+    */
+    virtual void evaluate(TeRaster& raster, const int rasterBand, const int coverageDimension, const TeBox& box = TeBox())
+    {
+        // Setup iterators for traversing raster pixels
+        TeRaster::iterator it, end;
+        if (box == TeBox())
+        {
+            it = raster.begin();
+            end = raster.end();
+        }
+        else
+        {
+            it = raster.begin(TeMakePolygon(box), TeBBoxPixelInters, rasterBand);
+            end = raster.end(TeMakePolygon(box), TeBBoxPixelInters, rasterBand);
+        }
+        
+        while(it != end)
+        {
+            // Get raster and coverage projections
+            TeProjection* coverageProj = decoder_->getParameters().getProjection();
+            TeProjection* rasterProj = raster.projection();
+            rasterProj->setDestinationProjection(coverageProj);
+
+            // Get pixel coordinate
+            TeCoord2D coord = raster.index2Coord(
+                    TeCoord2D(it.currentColumn(), it.currentLine()));
+            
+            // Convert to the intermediate projection
+            coord = rasterProj->PC2LL(coord);
+
+            // Convert to the coverage projection
+            coord = coverageProj->LL2PC(coord);
+
+            // Find coverage value and set raster element
+            std::vector<double> value = std::vector<double>();
+            evaluate(coord, value);
+            raster.setElement(it.currentColumn(), it.currentLine(), value[coverageDimension], rasterBand);
+
+            it++;
+        }
+    }
+
+protected:
+
+    double initialNeighbourhoodRadius_; //!< The initial radius used for interpolation.
+
+    //! Find nearest generic geometry-value pair.
+    /*!
+      \par Retrieve the generic geometry value-pair that is the nearest
+           neighbour of the arbitrary location passed as parameter.
+      \par The radius parameter is used to specify the size of the
+           neighbourhood to be checked first. If no neighbours can be
+           found, the radius is increased until at least one neighbour
+           is found.
+      \param position an arbitrary location
+      \param radius the size of the neighbourhood to be checked initially.
+    */
+    virtual TeGeomValuePair<T> nearestNeighbour(const TeCoord2D& position, double radius = 0)
+    {
+        if (!decoder_)
+        {
+            std::string errorMsg = "Couldn't evaluate position in coverage. Decoder is NULL.";
+            throw TeException(UNKNOWN_ERROR_TYPE, errorMsg, false);
+        }
+        if (!radius)
+        {
+            radius = initialNeighbourhoodRadius_;
+        }
+
+        TeBox box = TeBox(position.x_ - radius,
+                        position.y_ - radius,
+                        position.x_ + radius,
+                        position.y_ + radius);
+
+        std::vector<TeGeomValuePair<T> >& selected = std::vector<TeGeomValuePair<T> >();
+        decoder_->selectGeomValuePairs(TeMakePolygon(box), TeINTERSECTS, selected);
+
+        if (selected.size() > 0)
+        {
+            // Find nearest geometry, among the selected set
+            double minDist = TeMAXFLOAT;
+            double dist = TeMAXFLOAT;
+            std::vector<TeGeomValuePair<T> >::iterator itNearest = selected.begin();
+            for(std::vector<TeGeomValuePair<T> >::iterator it = selected.begin(); it != selected.end(); ++it)
+            {
+                dist = distanceToGeom(position, it->geom);
+                if (dist < minDist)
+                {
+                    minDist = dist;
+                    itNearest = it;
+                }
+            }
+            
+            // Check if the distance is less than the radius
+            // Otherwise, there might be a closer geometry, outside the box
+            if (minDist <= radius)
+            {
+                return (*itNearest);
+            }
+            else
+            {
+                return nearestNeighbour(position, minDist);
+            }
+        }
+        else
+        {
+            // If coudn't find any geometries, search in a larger area
+            return nearestNeighbour(position, radius * 2);
+        }
+    }
+
+    //! Evaluate distance from a position to a point
+    double distanceToGeom(const TeCoord2D& position, TePoint point)
+    {
+        return TeDistance(position, point.location());
+    }
+
+    //! Evaluate distance from a position to a line
+    double distanceToGeom(const TeCoord2D& position, TeLine2D line)
+    {
+        double minDist = TeMAXFLOAT;
+        double dist = TeMAXFLOAT;
+
+        // Evaluate the distance to the line segment-by-segment
+        for (unsigned int i = 0; i < (line.size() - 1); ++i)
+        {
+            dist = TeMinimumDistance (line[i], line[i + 1], position, TeCoord2D(), 0);
+            if (dist < minDist)
+            {
+                minDist = dist;
+            }
+        }
+        return minDist;
+    }
+
+    //! Evaluate distance from a position to a polygon
+    double distanceToGeom(const TeCoord2D& position, TePolygon poly)
+    {
+        // If the position is inside the polygon, return zero
+        if (TeWithin(position, poly))
+        {
+            return 0.0;
+        }
+
+        double minDist = TeMAXFLOAT;
+        double dist = TeMAXFLOAT;
+
+        // Evaluate the distance to each ring of the polygon segment-by-segment
+        for(TePolygon::iterator itPoly = poly.begin(); itPoly != poly.end(); ++itPoly)
+        {
+            TeLine2D line = *itPoly;
+
+            for (unsigned int i = 0; i < (line.size() - 1); ++i)
+            {
+                dist = TeMinimumDistance (line[i], line[i + 1], position, TeCoord2D(), 0);
+                if (dist < minDist)
+                {
+                    minDist = dist;
+                }
+            }
+        }
+        return minDist;
+    }
+
+};
+
+#endif // __TERRALIB_INTERNAL_COVERAGEINTERPOLATORNN_H
\ No newline at end of file
diff --git a/src/terralib/kernel/TeCoverageParams.h b/src/terralib/kernel/TeCoverageParams.h
new file mode 100644
index 0000000..fd55338
--- /dev/null
+++ b/src/terralib/kernel/TeCoverageParams.h
@@ -0,0 +1,249 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*!
+  \file TeCoverageParams.h
+  \brief This file contains definitions about parameters of a coverage.
+*/
+#ifndef  __TERRALIB_INTERNAL_COVERAGEPARAMS_H
+#define  __TERRALIB_INTERNAL_COVERAGEPARAMS_H
+
+#include "TeDataTypes.h"
+#include "TeDatabase.h"
+
+/*!
+  \enum TeCoveragePersistenceType
+  \brief Defines the type of persistence used in the coverage.
+*/
+enum TeCoveragePersistenceType
+{	TePERSISTENCE_NONE, TePERSISTENCE_DATABASE, TePERSISTENCE_DATABASE_CACHELRU };
+
+/*!
+  \struct TeCoverageDimension
+  \brief Information about a single dimension of a coverage
+*/
+struct TL_DLL TeCoverageDimension
+{
+    int dimension_id;   //!< Dimension identifier
+    std::string name;   //!< Dimension name
+    TeDataType type;    //!< Data type of this dimension
+
+    //! Default constructor.
+    TeCoverageDimension(){}
+
+    //! Constructor with attributes.
+    TeCoverageDimension(const int& dimension_id, const std::string& name, const TeDataType& type):
+            dimension_id(dimension_id),
+            name(name),
+            type(type){}
+};
+
+/*!
+  \class TeCoverageParams
+  \brief A class to handle the parameters set associated with a coverage
+
+  \par This class is a data structure to store and manipulate a set of
+       parameters and definitions that characterizes a coverage. It contains
+       parameters relative to storaging, geographical or interpretation aspects.
+  \par Not all parameters are valid, or make sense, for all coverages. Private
+       parameters should be accessed through the methods provided.
+*/
+class TL_DLL TeCoverageParams
+{
+public:
+
+    //! Default constructor
+    TeCoverageParams () :
+      database_(NULL),
+      layerId_(-1),
+      coverageId_(""),
+      coverageTable_(""),
+      fileName_(""),
+      dimensions_(NULL),
+      projection_(NULL),
+      boundingBox_(TeBox()),
+      numElements_(-1),
+      persistenceType_(TePERSISTENCE_DATABASE_CACHELRU)
+    {
+    }
+
+    //! Constructor specifying database access
+    TeCoverageParams (TeDatabase* database, const int layerId, const std::string& coverageId = "0") :
+      database_(database),
+      layerId_(layerId),
+      coverageId_(coverageId),
+      coverageTable_(""),
+      fileName_(""),
+      dimensions_(NULL),
+      projection_(NULL),
+      boundingBox_(TeBox()),
+      numElements_(-1),
+      persistenceType_(TePERSISTENCE_DATABASE_CACHELRU)
+    {
+        
+    }
+
+    //! Copy constructor
+    TeCoverageParams(const TeCoverageParams& other);
+
+    //! Operator=
+    TeCoverageParams& operator=(const TeCoverageParams& rhs);
+
+    //! Destructor
+    virtual ~TeCoverageParams()
+    {
+    }
+
+    //! Set pointer to the database
+    void setDatabase(TeDatabase* database)
+    {
+        database_ = database;
+    }
+
+    //! Return a pointer to the database
+    TeDatabase* getDatabase() const
+    {
+        return database_;
+    }
+
+    //! Set layer identifier
+    void setLayerId(const int layerId)
+    {
+        layerId_ = layerId;
+    }
+
+    //! Return the layer identifier
+    int getLayerId() const
+    {
+        return layerId_;
+    }
+
+    //! Set coverage identifier
+    void setCoverageId(std::string& coverageId)
+    {
+        coverageId_ = coverageId;
+    }
+
+    //! Return the coverage identifier
+    std::string getCoverageId() const
+    {
+        return coverageId_;
+    }
+
+    //! Set the name of the coverage table
+    void setCoverageTable(std::string& coverageTable)
+    {
+        coverageTable_ = coverageTable;
+    }
+
+    //! Return the name of the coverage table
+    std::string getCoverageTable() const
+    {
+        return coverageTable_;
+    }
+
+    //! Set the name of the coverage source file
+    void setFileName(std::string& fileName)
+    {
+        fileName_ = fileName;
+    }
+
+    //! Return the name of the coverage source file
+    std::string getFileName() const
+    {
+        return fileName_;
+    }
+
+    //! Set information about the dimensions of a coverage
+    void setDimensions(std::vector<TeCoverageDimension>& dimensions)
+    {
+        dimensions_ = dimensions;
+    }
+
+    //! Return information about the dimensions of a coverage
+    std::vector<TeCoverageDimension> getDimensions() const
+    {
+        return dimensions_;
+    }
+
+    //! Set the projection
+    void setProjection(TeProjection* projection)
+    {
+        projection_ = projection;
+    }
+
+    //! Return the projection
+    TeProjection* getProjection() const
+    {
+        return projection_;
+    }
+
+    //! Set bounding box of a coverage
+    void setBoundingBox(TeBox& boundingBox)
+    {
+        boundingBox_ = boundingBox;
+    }
+
+    //! Return the bounding box of a coverage
+    TeBox getBoundingBox() const
+    {
+        return boundingBox_;
+    }
+
+    //! Set number of elements of a coverage
+    void setNumElements(const int numElements)
+    {
+        numElements_ = numElements;
+    }
+
+    //! Return the number of elements of a coverage
+    int getNumElements() const
+    {
+        return numElements_;
+    }
+
+    //! Set persistence type of the coverage
+    void setPersistenceType(const TeCoveragePersistenceType persistenceType)
+    {
+        persistenceType_ = persistenceType;
+    }
+
+    //! Return the persistence type of the coverage
+    TeCoveragePersistenceType getPersistenceType() const
+    {
+        return persistenceType_;
+    }
+
+protected:
+    TeDatabase* database_;          //!< Pointer to the TerraLib database
+    int layerId_;                   //!< Layer identifier
+    std::string coverageId_;        //!< Coverage identifier
+    std::string coverageTable_;     //!< Coverage table name
+    std::string fileName_;          //!< Name of a coverage source file
+    std::vector<TeCoverageDimension> dimensions_;   //!< Dimensions information
+    TeProjection* projection_;      //!< Projection used in a coverage
+    TeBox boundingBox_;             //!< Bounding box for all elements of a coverage
+    int numElements_;               //!< Number of elements of the coverage
+    TeCoveragePersistenceType persistenceType_; //!< Type of data persistence
+};
+
+#endif // __TERRALIB_INTERNAL_COVERAGEPARAMS_H
\ No newline at end of file
diff --git a/src/terralib/kernel/TeCoverageUtils.cpp b/src/terralib/kernel/TeCoverageUtils.cpp
new file mode 100644
index 0000000..d961fbc
--- /dev/null
+++ b/src/terralib/kernel/TeCoverageUtils.cpp
@@ -0,0 +1,293 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+
+/*
+** ----------------------------------------------------------------------------
+** Includes:
+*/
+
+#include "TeCoverageUtils.h"
+
+/*
+** ----------------------------------------------------------------------------
+** Definitions:
+*/
+
+/*
+** ----------------------------------------------------------------------------
+** Methods Implementation:
+*/
+
+std::string
+TeDefaultCoverageLayerTable(TeLayer* layer)
+{
+    return "Coverage_" + Te2String(layer->id());
+}
+
+std::string
+TeDefaultCoverageTable(TeLayer* layer, const std::string& coverageId)
+{
+    return TeDefaultCoverageLayerTable(layer) + "_" + coverageId;
+}
+
+std::string
+TeDefaultCoverageMetadataTable(TeLayer* layer)
+{
+    return TeDefaultCoverageLayerTable(layer) + "_metadata";
+}
+
+void
+TeRetrieveCoverageLayerTables(TeLayer* layer, std::vector<std::string>& coverageLayerTables)
+{
+    coverageLayerTables.clear();
+
+    // Get coverage layer tables
+    TeRepresPointerVector representations;
+    layer->getRepresentation(TeCOVERAGE, representations);
+    for (TeRepresPointerVector::iterator it = representations.begin(); it != representations.end(); it++)
+    {
+        coverageLayerTables.push_back((*it)->tableName_);
+    }
+}
+
+void
+TeRetrieveCoverageIds(TeLayer* layer, std::vector<std::string>& coverageIds)
+{
+    coverageIds.clear();
+
+    // Get coverage layer table
+    std::vector<std::string> coverageLayerTables;
+    TeRetrieveCoverageLayerTables(layer, coverageLayerTables);
+
+    for (std::vector<std::string>::iterator it = coverageLayerTables.begin(); it != coverageLayerTables.end(); it++)
+    {
+        // Find coverage IDs
+        TeDatabasePortal* portal = layer->database()->getPortal();
+        portal->query("SELECT coverage_id FROM " + (*it));
+        while (portal->fetchRow())
+        {
+            coverageIds.push_back(portal->getData("coverage_id"));
+        }
+        portal->freeResult();
+    }
+}
+
+std::string
+TeRetrieveCoverageTable(TeLayer* layer, const std::string& coverageId)
+{
+    std::string coverageTable = "";
+    
+    // Get coverage layer table
+    std::vector<std::string> coverageLayerTables;
+    TeRetrieveCoverageLayerTables(layer, coverageLayerTables);
+
+    for (std::vector<std::string>::iterator it = coverageLayerTables.begin(); it != coverageLayerTables.end(); it++)
+    {
+        // Find coverage IDs
+        TeDatabasePortal* portal = layer->database()->getPortal();
+        portal->query("SELECT coverage_table FROM " + (*it) + " WHERE coverage_id = '" + coverageId + "'");
+        if (portal->fetchRow())
+        {
+            coverageTable = portal->getData("coverage_table");
+            portal->freeResult();
+            break;
+        }
+        portal->freeResult();
+    }
+    if (coverageTable.empty())
+    {
+        std::string errorMsg = "Couldn't find coverage " + coverageId + " on layer " + Te2String(layer->id()) + ".";
+        throw TeException(UNKNOWN_ERROR_TYPE, errorMsg, false);
+    }
+    return coverageTable;
+}
+
+std::string
+TeRetrieveCoverageLayerTable(TeLayer* layer, const std::string& coverageId)
+{
+    std::string coverageLayerTable = "";
+    
+    // Get coverage layer tables associated to this layer
+    std::vector<std::string> coverageLayerTables;
+    TeRetrieveCoverageLayerTables(layer, coverageLayerTables);
+
+    // Find the coverage layer table to which this coverage ID belongs
+    for (std::vector<std::string>::iterator it = coverageLayerTables.begin(); it != coverageLayerTables.end(); it++)
+    {
+        // Look for coverage ID
+        TeDatabasePortal* portal = layer->database()->getPortal();
+        portal->query("SELECT coverage_id FROM " + (*it) + " WHERE coverage_id = '" + coverageId + "'");
+        if (portal->fetchRow())
+        {
+            coverageLayerTable = (*it);
+            portal->freeResult();
+            break;
+        }
+        portal->freeResult();
+    }
+    if (coverageLayerTable.empty())
+    {
+        std::string errorMsg = "Couldn't find coverage " + coverageId + " on layer " + Te2String(layer->id()) + ".";
+        throw TeException(UNKNOWN_ERROR_TYPE, errorMsg, false);
+    }
+    return coverageLayerTable;
+}
+
+TeLayer*
+TeRetrieveLayer(TeDatabase* database, const int layerId)
+{
+	TeLayerMap& layerMap = database->layerMap();
+    TeLayerMap::iterator match = layerMap.find(layerId);
+    if (match == layerMap.end())
+    {
+        std::string errorMsg = "Layer " + Te2String(layerId) + " not found in database.";
+        throw TeException(UNKNOWN_ERROR_TYPE, errorMsg, false);
+    }
+    return match->second;
+}
+
+void
+TeRetrieveDimensions(TeLayer* layer, const std::string& coverageId, std::vector<TeCoverageDimension>& dimensions)
+{
+    dimensions.clear();
+
+    TeRepresentation* rep = layer->getRepresentation(TeCOVERAGE);
+    std::string metadataTable = rep->tableName_ + "_metadata";
+
+    TeDatabasePortal* portal = layer->database()->getPortal();
+
+    std::string sql = "SELECT * FROM " + metadataTable + " WHERE coverage_id = '" + coverageId + "'";
+    if (portal->query(sql))
+    {
+        while (portal->fetchRow())
+        {
+            int dimensionId = portal->getInt("dimension_id");
+            int dataType = portal->getInt("data_type");
+            std::string name = portal->getData("name");
+
+            TeCoverageDimension dimension = TeCoverageDimension(dimensionId, name, static_cast<TeDataType>(dataType));
+            dimensions.push_back(dimension);
+        }
+    }
+    else
+    {
+        std::string errorMsg = "Couldn't retrieve dimensions for coverage " + coverageId + " on layer " + Te2String(layer->id()) + ".";
+        throw TeException(UNKNOWN_ERROR_TYPE, errorMsg, false);
+    }
+}
+
+int
+TeCoverageDimensionsSize(std::vector<TeCoverageDimension>& dimensions)
+{
+    int dimensionsSize = 0;
+
+    std::vector<TeCoverageDimension>::iterator it = dimensions.begin();
+    std::vector<TeCoverageDimension>::iterator end = dimensions.end();
+
+    while (it != end)
+    {
+        switch (it->type)
+        {
+        case (TeUNSIGNEDSHORT):
+            dimensionsSize += sizeof(unsigned short);
+            break;
+        case (TeSHORT):
+            dimensionsSize += sizeof(short);
+            break;
+        case (TeINTEGER):
+            dimensionsSize += sizeof(int);
+            break;                
+        case (TeUNSIGNEDLONG):
+            dimensionsSize += sizeof(unsigned long);
+            break;
+        case (TeLONG):
+            dimensionsSize += sizeof(long);
+            break;
+        case (TeFLOAT):
+            dimensionsSize += sizeof(float);
+            break;
+        case (TeDOUBLE):
+            dimensionsSize += sizeof(double);
+            break;
+        default:
+            std::string errorMsg = "Illegal type found on dimensions vector.";
+            throw TeException(UNKNOWN_ERROR_TYPE, errorMsg, false);
+            break;
+        }
+        it++;
+    }
+    return dimensionsSize;
+}
+
+TeBox
+TeRetrieveCoverageBox(TeLayer* layer, const std::string& coverageId)
+{
+    TeBox box;
+
+    std::string coverageTable = TeRetrieveCoverageLayerTable(layer, coverageId);
+
+    std::string sql = "SELECT * FROM " + coverageTable + " WHERE coverage_id = '" + coverageId + "'";
+
+    TeDatabasePortal* portal = layer->database()->getPortal();
+    if (portal->query(sql) && portal->fetchRow())
+    {
+        box = TeBox(portal->getDouble("lower_x"),
+                    portal->getDouble("lower_y"),
+                    portal->getDouble("upper_x"),
+                    portal->getDouble("upper_y"));
+    }
+    else
+    {
+        std::string errorMsg = "Couldn't retrieve box for coverage " + coverageId + " on layer " + Te2String(layer->id()) + ".";
+        throw TeException(UNKNOWN_ERROR_TYPE, errorMsg, false);
+    }
+    return box;
+}
+
+int
+TeRetrieveCoverageNumElements(TeLayer* layer, const std::string& coverageId)
+{
+    int numElements = -1;
+    std::string coverageTable = TeRetrieveCoverageTable(layer, coverageId);
+
+    // Sum number of elements of all blocks
+    std::string sql = "SELECT SUM(num_elements) as sum_num_elements FROM " + coverageTable;
+
+    TeDatabasePortal* portal = layer->database()->getPortal();
+    if (portal->query(sql) && portal->fetchRow())
+    {
+        numElements = portal->getInt("sum_num_elements");
+    }
+    else
+    {
+        std::string errorMsg = "Couldn't retrieve number of elements for coverage " + coverageId + " on layer " + Te2String(layer->id()) + ".";
+        throw TeException(UNKNOWN_ERROR_TYPE, errorMsg, false);
+    }
+    portal->freeResult();
+    return numElements;
+}
+
+/*
+** ----------------------------------------------------------------------------
+** End:
+*/
\ No newline at end of file
diff --git a/src/terralib/kernel/TeCoverageUtils.h b/src/terralib/kernel/TeCoverageUtils.h
new file mode 100644
index 0000000..d73da8e
--- /dev/null
+++ b/src/terralib/kernel/TeCoverageUtils.h
@@ -0,0 +1,56 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeCoverageUtils.h
+    \brief This file contains utility functions for working with coverages.
+*/
+#ifndef  __TERRALIB_INTERNAL_COVERAGEUTILS_H
+#define  __TERRALIB_INTERNAL_COVERAGEUTILS_H
+
+#include "TeCoverageParams.h"
+#include "TeException.h"
+
+TL_DLL std::string TeDefaultCoverageLayerTable(TeLayer* layer);
+
+TL_DLL std::string TeDefaultCoverageTable(TeLayer* layer, const std::string& coverageId);
+
+TL_DLL std::string TeDefaultCoverageMetadataTable(TeLayer* layer);
+
+TL_DLL void TeRetrieveCoverageLayerTables(TeLayer* layer, std::vector<std::string>& coverageLayerTables);
+
+TL_DLL void TeRetrieveCoverageIds(TeLayer* layer, std::vector<std::string>& coverageIds);
+
+TL_DLL std::string TeRetrieveCoverageTable(TeLayer* layer, const std::string& coverageId);
+
+TL_DLL std::string TeRetrieveCoverageLayerTable(TeLayer* layer, const std::string& coverageId);
+
+TL_DLL TeLayer* TeRetrieveLayer(TeDatabase* database, const int layerId);
+
+TL_DLL void TeRetrieveDimensions(TeLayer* layer, const std::string& coverageId, std::vector<TeCoverageDimension>& dimensions);
+
+TL_DLL int TeCoverageDimensionsSize(std::vector<TeCoverageDimension>& dimensions);
+
+TL_DLL TeBox TeRetrieveCoverageBox(TeLayer* layer, const std::string& coverageId);
+
+TL_DLL int TeRetrieveCoverageNumElements(TeLayer* layer, const std::string& coverageId);
+
+#endif // __TERRALIB_INTERNAL_COVERAGEUTILS_H
\ No newline at end of file
diff --git a/src/terralib/kernel/TeDBConnectionsPool.cpp b/src/terralib/kernel/TeDBConnectionsPool.cpp
new file mode 100644
index 0000000..ef98936
--- /dev/null
+++ b/src/terralib/kernel/TeDBConnectionsPool.cpp
@@ -0,0 +1,524 @@
+//STL include files
+#include <string>
+
+//TerraLib include files
+#include <TeDatabase.h>
+#include <TeDatabaseFactory.h>
+#include <TeDBConnectionsPool.h>
+
+TeDBConnectionsPool::~TeDBConnectionsPool()
+{
+	clear();
+}
+
+TeDatabase* TeDBConnectionsPool::getDatabase(std::string& dbmsName, 
+											 std::string& dbName, 
+											 std::string& host, std::string& user, 
+											 std::string& passwd, int& portNumber)
+{
+	verifyDbParams(dbmsName, dbName, host, user, passwd, portNumber);
+
+	TeDatabaseFactoryParams params = asFactoryParams(dbmsName, dbName, host, user, passwd, portNumber);
+
+    TeDatabase* db = NULL;
+
+	std::map<std::string, int>::iterator conIt = _dbConns.find(getDbKey(params));
+
+	db = (conIt == _dbConns.end()) ?
+		TeDatabaseFactory::make(params) :
+		getDatabase(conIt->second); 
+
+    return db;
+}
+
+TeDatabase* TeDBConnectionsPool::getDatabase(const int& dbIdx)
+{
+    TeDatabase* db = NULL;
+
+    std::map<int, TeDatabase*>::iterator dbIt = _dbs.find(dbIdx);
+
+    if(dbIt != _dbs.end())
+    {
+        db = dbIt->second;
+    }
+
+	if((db != NULL) && (!db->isConnected()))
+	{
+		if(!db->connect(db->host(), db->user(), db->password(), db->databaseName(), 
+			db->portNumber()))
+		{
+			removeDatabase(dbIdx);
+			db = NULL;
+		}
+	}
+
+    return db;
+}
+
+int TeDBConnectionsPool::getDatabaseIdx(TeDatabase* db)
+{
+    int res = -1;
+
+	std::map<std::string, int>::iterator conIt = _dbConns.find(
+		getDbKey(asFactoryParams(db->dbmsName(), db->databaseName(), db->host(), db->user(),
+		db->password(), db->portNumber())));
+
+    if(conIt != _dbConns.end())
+    {
+        res = conIt->second;
+    }
+
+    return res;
+}
+
+void TeDBConnectionsPool::removeDatabase(const int& dbId)
+{
+    std::map<int, TeDatabase*>::iterator dbIt = _dbs.find(dbId);
+
+    if(dbIt == _dbs.end())
+    {
+        throw;
+    }
+
+    TeDatabase* db = dbIt->second;
+
+    std::string dbKey = getDbKey(asFactoryParams(db->dbmsName(), db->databaseName(), db->host(), 
+        db->user(), db->password(), db->portNumber()));
+
+    std::map<std::string, int>::iterator conIt = _dbConns.find(dbKey);
+
+    if(conIt == _dbConns.end())
+    {
+        throw;
+    }
+
+    _dbs.erase(dbIt);
+    _dbConns.erase(conIt);
+
+    if(db->isConnected())
+    {
+        db->clear();
+        db->close();
+    }
+
+    delete db;
+}
+//
+void TeDBConnectionsPool::clear()
+{
+	std::map<int, TeDatabase*>::iterator it;
+
+	for(it = _dbs.begin(); it != _dbs.end(); ++it)
+	{
+        if(it->second->isConnected())
+        {
+            it->second->clear();
+            it->second->close();
+        }
+        
+        delete it->second;
+	}
+
+	_dbs.clear();
+	_dbConns.clear();
+}
+
+void TeDBConnectionsPool::saveExternalDBConnection(TeDatabase* mainDb, 
+												   TeDatabase* externalDb)
+{
+    std::string host = (externalDb->host().empty()) ? "host_name IS NULL" : 
+                                                      "host_name = '" + externalDb->host() + "'";
+    std::string user = (externalDb->user().empty()) ? "user_name IS NULL" : 
+                                                      "user_name = '" + externalDb->user() + "'";
+    std::string passwd = (externalDb->password().empty()) ? "user_password IS NULL" : 
+                                                        "user_password = '" + externalDb->password() + "'";
+
+    std::string selClause = "SELECT * FROM te_database_connection ";
+    std::string whereClause = "WHERE dbms_name = '" + 
+        externalDb->dbmsName() + "' AND " + host + " AND database_name = '" +
+        externalDb->databaseName() + "' AND " + user + " AND " + passwd + " AND port_number = " + 
+        Te2String(externalDb->portNumber());
+
+	TeDatabasePortal* portal = mainDb->getPortal();
+
+	if(!portal)
+    {
+        std::string errorMsg = "Fail getting database portal.";
+
+        throw TeException(UNKNOWN_ERROR_TYPE, errorMsg, false);
+    }
+
+	if(!portal->query(selClause + whereClause))
+	{
+		portal->freeResult();
+		delete portal;
+
+        std::string errorMsg = "Fail on external connections SQL.";
+
+        throw TeException(UNKNOWN_ERROR_TYPE, errorMsg, false);
+    }
+
+	if(portal->fetchRow())
+    {
+        if(getDatabaseIdx(externalDb) == -1)
+        {
+            int id = portal->getInt("connection_id");
+            insertDatabase(externalDb, id);
+        }
+
+	    portal->freeResult();
+	    delete portal;
+        return;
+    }
+
+	portal->freeResult();
+
+	std::string strSQL = "";
+
+    strSQL  = "INSERT INTO te_database_connection(dbms_name, host_name, database_name, ";
+    strSQL += "user_name, user_password, port_number) ";
+    strSQL += "VALUES ('" + externalDb->dbmsName();
+    strSQL += "', ";
+    strSQL += externalDb->host().empty() ? "NULL" : "'" + externalDb->host() + "'";
+    strSQL += ", '" + externalDb->databaseName();
+    strSQL += "', ";
+    strSQL += externalDb->user().empty() ? "NULL" : "'" + externalDb->user() + "'"; 
+    strSQL += ", ";
+    strSQL += externalDb->password().empty() ? "NULL" : "'" + externalDb->password() + "'";
+    strSQL += ", " + Te2String(externalDb->portNumber());
+    strSQL += ")";
+
+    if(!mainDb->execute(strSQL))
+    {
+        std::string errorMsg = "Fail on inserting external connection on database connections table.";
+
+        throw TeException(UNKNOWN_ERROR_TYPE, errorMsg, false);
+    }
+
+	selClause = "SELECT connection_id FROM te_database_connection ";
+
+	if(!portal->query(selClause + whereClause))
+	{
+		portal->freeResult();
+		delete portal;
+
+        std::string errorMsg = "Fail on external connections SQL.";
+
+        throw TeException(UNKNOWN_ERROR_TYPE, errorMsg, false);
+    }
+
+	if(!portal->fetchRow())
+    {
+        std::string errorMsg = "Fail on saving external database connection.";
+
+        throw TeException(UNKNOWN_ERROR_TYPE, errorMsg, false);
+
+		portal->freeResult();
+	    delete portal;
+        return;
+    }
+
+	int dbId = portal->getInt(0);
+
+	portal->freeResult();
+    delete portal;
+
+    insertDatabase(externalDb, dbId);
+}
+
+void TeDBConnectionsPool::loadExternalDBConnections(TeDatabase* mainDb)
+{
+	TeDatabasePortal* portal = mainDb->getPortal();
+
+	if(portal == NULL)
+	{
+        std::string errorMsg = "Fail getting database portal.";
+
+        throw TeException(UNKNOWN_ERROR_TYPE, errorMsg, false);
+	}
+
+	if(!mainDb->tableExist("te_database_connection"))
+	{
+		return;
+	}
+
+	std::string sql = "SELECT * FROM te_database_connection ORDER BY connection_id";
+
+	if(!portal->query(sql))
+	{
+		portal->freeResult();
+		delete portal;
+
+        return;
+	}
+
+    bool flag = portal->fetchRow();
+    
+    while(flag)
+    {
+	    std::string host(portal->getData("host_name")),
+				    dbName(portal->getData("database_name")),
+				    user(portal->getData("user_name")),
+				    dbmsName(portal->getData("dbms_name")),
+				    passwd(portal->getData("user_password"));
+	    int portNumber = portal->getInt("port_number");
+        int dbId = portal->getInt("connection_id");
+
+		TeDatabase* database = getDatabase(dbmsName, dbName, host, user, passwd, portNumber);
+		if(database != NULL)
+		{
+			insertDatabase(database, dbId);
+		}
+
+        flag = portal->fetchRow();
+    }
+
+	if(portal != NULL)
+	{
+		portal->freeResult();
+		delete portal;
+	}
+}
+
+std::vector<int> TeDBConnectionsPool::getConnectionsIdVector()
+{
+	std::vector<int> dbIds;
+	std::map<std::string, int>::iterator it;
+	
+	for(it = _dbConns.begin(); it != _dbConns.end(); ++it)
+	{
+        int dbId = it->second;
+		dbIds.push_back(dbId);
+	}
+
+	return dbIds;
+}
+
+void TeDBConnectionsPool::createDBConnectionTable(TeDatabase* db)
+{
+	if(db->tableExist("te_database_connection"))
+    {
+        return;
+    }
+
+	TeAttributeList attList;
+
+	TeAttribute att1;
+	att1.rep_.name_ = "connection_id";
+	att1.rep_.isAutoNumber_ = true;
+	att1.rep_.isPrimaryKey_ = true;
+	att1.rep_.null_ = false;
+	att1.rep_.type_ = TeINT;
+	att1.rep_.numChar_ = 0;
+	attList.push_back(att1);
+
+	TeAttribute att2;
+	att2.rep_.name_ = "dbms_name";
+	att2.rep_.isAutoNumber_ = false;
+	att2.rep_.isPrimaryKey_ = false;
+	att2.rep_.null_ = true;
+	att2.rep_.type_ = TeSTRING;
+	att2.rep_.numChar_ = 255;
+	attList.push_back(att2);
+
+	TeAttribute att3;
+	att3.rep_.name_ = "host_name";
+	att3.rep_.isAutoNumber_ = false;
+	att3.rep_.isPrimaryKey_ = false;
+	att3.rep_.null_ = true;
+	att3.rep_.type_ = TeSTRING;
+	att3.rep_.numChar_ = 255;
+	attList.push_back(att3);
+
+	TeAttribute att4;
+	att4.rep_.name_ = "database_name";
+	att4.rep_.isAutoNumber_ = false;
+	att4.rep_.isPrimaryKey_ = false;
+	att4.rep_.null_ = true;
+	att4.rep_.type_ = TeSTRING;
+	att4.rep_.numChar_ = 255;
+	attList.push_back(att4);
+
+	TeAttribute att5;
+	att5.rep_.name_ = "user_name";
+	att5.rep_.isAutoNumber_ = false;
+	att5.rep_.isPrimaryKey_ = false;
+	att5.rep_.null_ = true;
+	att5.rep_.type_ = TeSTRING;
+	att5.rep_.numChar_ = 255;
+	attList.push_back(att5);
+
+	TeAttribute att6;
+	att6.rep_.name_ = "user_password";
+	att6.rep_.isAutoNumber_ = false;
+	att6.rep_.isPrimaryKey_ = false;
+	att6.rep_.null_ = true;
+	att6.rep_.type_ = TeSTRING;
+	att6.rep_.numChar_ = 255;
+	attList.push_back(att6);
+
+	TeAttribute att7;
+	att7.rep_.name_ = "port_number";
+	att7.rep_.isAutoNumber_ = false;
+	att7.rep_.isPrimaryKey_ = false;
+	att7.rep_.null_ = true;
+	att7.rep_.type_ = TeINT;
+	att7.rep_.numChar_ = 0;
+	attList.push_back(att7);
+
+	if(!db->createTable("te_database_connection", attList))
+    {
+        std::string errorMsg = "Fail creating te_dabase_connection table.";
+        throw TeException(UNKNOWN_ERROR_TYPE, errorMsg, false);
+    }
+}
+
+void TeDBConnectionsPool::deleteExternalDBConnection(TeDatabase* mainDb, const int& externalDbId)
+{
+    std::string strSQL = "DELETE FROM te_database_connection WHERE connection_id = " + 
+        Te2String(externalDbId);
+
+    if(!mainDb->execute(strSQL))
+    {
+        throw;
+    }
+
+    removeDatabase(externalDbId);
+}
+
+void TeDBConnectionsPool::insertDatabase(TeDatabase* db, const int& dbId)
+{
+    if(_dbs.find(dbId) != _dbs.end())
+    {
+        return;
+    }
+
+	TeDatabaseFactoryParams params;
+	params.database_ = db->databaseName();
+	params.dbms_name_ = db->dbmsName();
+	params.host_ = db->host();
+	params.user_ = db->user();
+	params.password_ = db->password();
+	params.port_ = db->portNumber();
+	
+	_dbConns[getDbKey(params)] = dbId;
+	_dbs[dbId] = db;
+}
+
+std::string TeDBConnectionsPool::getDbKey(const TeDatabaseFactoryParams& dbParams) const
+{
+	std::string dbKey = dbParams.dbms_name_,
+                pv(";");
+
+	dbKey += pv + dbParams.database_ + pv + dbParams.host_ + pv + dbParams.user_ + pv + 
+		dbParams.password_ + pv + Te2String(dbParams.port_);
+
+    return dbKey;
+}
+
+void TeDBConnectionsPool::verifyDbParams(std::string& dbmsName, std::string& /*dbName*/, 
+								  std::string& host, std::string& user, 
+								  std::string& passwd, int& portNumber)
+{
+    if(dbmsName == "Access" || dbmsName == "Ado")
+	{
+		dbmsName = "Ado";
+        host = "";
+        user = "";
+        passwd = "";
+        portNumber = -1;
+	}
+    else if(dbmsName == "SQL Server")
+    {
+        dbmsName = "SqlServerAdo";
+    }
+	else if(dbmsName == "Oracle")
+	{
+		dbmsName = "OracleAdo";
+	}
+	else if(dbmsName == "OracleOCI")
+	{
+		dbmsName = "OracleOCI";
+	}
+    else 
+	{
+		if(host.empty())
+		{
+			host = "localhost";
+		}
+		
+		if(dbmsName == "MySQL")
+		{
+			portNumber = 0;
+		}
+	}
+}
+
+TeDatabaseFactoryParams TeDBConnectionsPool::asFactoryParams(const std::string& dbmsName, 
+															 const std::string& dbName, 
+															 const std::string& host, 
+															 const std::string& user, 
+															 const std::string& passwd, 
+															 const int& portNumber)
+{
+	TeDatabaseFactoryParams params;
+
+	params.dbms_name_ = dbmsName;
+	params.database_ = dbName;
+	params.host_ = host;
+	params.user_ = user;
+	params.password_ = passwd;
+	params.port_ = portNumber;
+
+	return params;
+}
+
+bool TeDBConnectionsPool::getConnectionInfo(TeDatabase* mainDb, const int& connId, 
+											std::string& hostName, std::string& dbmsName, std::string& dbName, 
+											std::string& userName, std::string& password, int& port)
+{
+	TeDatabasePortal* portal = mainDb->getPortal();
+
+	if(portal == NULL)
+	{
+        std::string errorMsg = "Fail getting database portal.";
+
+        throw TeException(UNKNOWN_ERROR_TYPE, errorMsg, false);
+	}
+
+	if(!mainDb->tableExist("te_database_connection"))
+	{
+		return false;
+	}
+
+	std::string sql = "SELECT * FROM te_database_connection WHERE connection_id = " + Te2String(connId);
+
+	if(!portal->query(sql))
+	{
+		portal->freeResult();
+		delete portal;
+
+		std::string errorMsg = "Fail querying data - " + mainDb->errorMessage();
+
+        throw TeException(UNKNOWN_ERROR_TYPE, errorMsg, false);
+	}
+    
+	bool found = false;
+	if(portal->fetchRow())
+    {
+		found = true;
+
+	    hostName = portal->getData("host_name");
+		dbName = portal->getData("database_name");
+		userName = portal->getData("user_name");
+		dbmsName = portal->getData("dbms_name");
+		password = portal->getData("user_password");
+	    port = portal->getInt("port_number");
+    }
+
+	portal->freeResult();
+	delete portal;
+	portal = NULL;
+
+	return found;
+}
diff --git a/src/terralib/kernel/TeDBConnectionsPool.h b/src/terralib/kernel/TeDBConnectionsPool.h
new file mode 100644
index 0000000..3d72107
--- /dev/null
+++ b/src/terralib/kernel/TeDBConnectionsPool.h
@@ -0,0 +1,75 @@
+#ifndef TDK_DB_CONNECTIONSPOOL_H
+#define TDK_DB_CONNECTIONSPOOL_H
+
+//STL include files
+#include <iostream>
+#include <map>
+#include <string>
+
+//TerraLib include files
+#include <TeSingleton.h>
+#include <TeDatabaseFactoryParams.h>
+#include <TeException.h>
+
+//foward declarations
+class TeDatabase;
+
+class TL_DLL TeDBConnectionsPool : public TeSingleton<TeDBConnectionsPool>
+{
+public:
+
+	~TeDBConnectionsPool();
+
+	TeDatabase* getDatabase(std::string& dbmsName, std::string& dbName, 
+                            std::string& host, std::string& user, 
+                            std::string& passwd, int& portNumber);
+
+public:
+
+    TeDatabase* getDatabase(const int& dbIdx);
+
+    int getDatabaseIdx(TeDatabase* db);
+
+	void clear();
+
+    void saveExternalDBConnection(TeDatabase* mainDb, TeDatabase* externalDb);
+
+	void loadExternalDBConnections(TeDatabase* mainDb);
+
+	void deleteExternalDBConnection(TeDatabase* mainDb, const int& externalDbId);
+
+	std::vector<int> getConnectionsIdVector();
+
+    static void createDBConnectionTable(TeDatabase* db);
+
+	bool getConnectionInfo(TeDatabase* mainDb, 
+									const int& connId, 
+									std::string& hostName, 
+									std::string& dbmsName, 
+									std::string& dbName, 
+									std::string& userName, 
+									std::string& password, 
+									int& port);
+
+private:
+
+	void insertDatabase(TeDatabase* db, const int& dbId);
+
+	void removeDatabase(const int& dbId);
+
+	std::string getDbKey(const TeDatabaseFactoryParams& dbParams) const;
+
+	void verifyDbParams(std::string& dbmsName, std::string& dbName, 
+								  std::string& host, std::string& user, 
+								  std::string& passwd, int& portNumber);
+
+	TeDatabaseFactoryParams asFactoryParams(const std::string& dbmsName, 
+											const std::string& dbName, 
+											const std::string& host, const std::string& user, 
+											const std::string& passwd, const int& portNumber);
+
+    std::map<std::string, int> _dbConns;
+    std::map<int, TeDatabase*> _dbs;
+};
+
+#endif //TDK_DB_CONNECTIONSPOOL_H
diff --git a/src/terralib/kernel/TeDataTypes.h b/src/terralib/kernel/TeDataTypes.h
old mode 100644
new mode 100755
index 7927cc5..dfbb667
--- a/src/terralib/kernel/TeDataTypes.h
+++ b/src/terralib/kernel/TeDataTypes.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,9 +20,8 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeDataTypes.h
-    This file contains enumerators and data types used by TerraLib
+    \brief This file contains enumerators and data types used by TerraLib
 */
 #ifndef  __TERRALIB_INTERNAL_DATATYPE_H
 #define  __TERRALIB_INTERNAL_DATATYPE_H
@@ -44,7 +43,10 @@ enum TeSpringModels
 
 //!  Types for Attributes (stored in object-relational databases)
 enum TeAttrDataType 
-{TeSTRING, TeREAL, TeINT, TeDATETIME, TeBLOB, TeOBJECT, TeCHARACTER, TeUNKNOWN};
+{TeSTRING, TeREAL, TeINT, TeDATETIME, TeBLOB, TeOBJECT, TeCHARACTER, TeUNKNOWN, TeUNSIGNEDINT,
+ TePOINTTYPE, TeLINE2DTYPE, TePOLYGONTYPE, TeCELLTYPE, TeTEXTTYPE, TeNODETYPE,
+ TePOINTSETTYPE, TeLINESETTYPE, TePOLYGONSETTYPE, TeCELLSETTYPE, TeTEXTSETTYPE, TeNODESETTYPE,
+ TeRASTERTYPE};
 
 
 //! Geometrical representations 
@@ -54,7 +56,7 @@ enum TeAttrDataType
 enum TeGeomRep 
 {	TePOLYGONS = 1, TeLINES = 2, TePOINTS = 4, TeSAMPLES = 8, TeCONTOURS = 16,
 	TeARCS = 32, TeNODES = 64  , TeTEXT = 128, TeCELLS = 256 , TeRASTER = 512,
-	TeRASTERFILE = 1024, TeGEOMETRYNONE = 2048 };
+	TeRASTERFILE = 1024, TeGEOMETRYNONE = 2048, TeSHAPEFILE = 4096, TeCOVERAGE = 8192};
 
 //! Chart types
 enum TeChartType
@@ -62,7 +64,8 @@ enum TeChartType
 
 //! Objects that will be grouped or used in a chart
 enum TeSelectedObjects
-{   TeAll, TeSelectedByPointing, TeNotSelectedByPointing, TeSelectedByQuery, TeNotSelectedByQuery, TeGrouped, TeNotGrouped };
+{	TeAll, TeSelectedByPointing, TeNotSelectedByPointing, TeSelectedByQuery, TeNotSelectedByQuery,
+	TeSelectedByPointingAndQuery, TeSelectedByPointingOrQuery, TeGrouped, TeNotGrouped };
 
 //! Modes of object selection
 enum TeObjectSelectionMode
@@ -70,7 +73,8 @@ enum TeObjectSelectionMode
 
 //! Modes of grouping objects
 enum TeGroupingMode
-{   TeEqualSteps, TeQuantil, TeStdDeviation, TeUniqueValue, TeRasterSlicing };
+{ TeEqualSteps = 0, TeQuantil = 1, TeStdDeviation = 2, TeUniqueValue = 3,
+  TeRasterSlicing = 4, TeNoGrouping = 100 };
 
 //! Direction of use in a ramp color
 enum TeColorDirection
@@ -89,14 +93,6 @@ enum TeDBRelationType
 enum TeDataType 
 {	TeBIT, TeUNSIGNEDCHAR, TeCHAR, TeUNSIGNEDSHORT, TeSHORT, TeINTEGER, TeUNSIGNEDLONG, TeLONG, TeFLOAT, TeDOUBLE };
 
-//! Compression modes to store raster data in a TerraLib database 
-enum TeCompressionMode
-{	TeNoCompression, TeZLib, TeJPEG, TeTIFFCOMPRESSION };
-
-//! Tiling type modes to store raster data in a TerraLib database 
-enum TeRasterTilingType
-{	 TeExpansible=1, TeNoExpansible=2 };
-
 
 //!	Statistics
 /*!
@@ -158,7 +154,8 @@ enum TePolyBasicType { TePolyTypeTransparent=0, TePolyTypeFill=1, TePolyTypeHori
 					 TePolyTypeCross=6, TePolyTypeDiagonalCross=7 };
 //! Line style types
 enum TeLnBasicType { TeLnTypeContinuous=0, TeLnTypeDashed=1, TeLnTypeDotted=2,  
-					 TeLnTypeDashDot=3, TeLnTypeDashDotDot=4, TeLnTypeNone=5 };
+					 TeLnTypeDashDot=3, TeLnTypeDashDotDot=4, TeLnTypeNone=5,
+					 TeLnTypeCustom=6 };
 //! Point style types
 enum TePtBasicType { TePtTypePlus=0, TePtTypeStar=1, TePtTypeCircle=2, TePtTypeX=3,  
 					 TePtTypeBox=4, TePtTypeDiamond=5, TePtTypeHollowCircle=6, 
@@ -167,6 +164,19 @@ enum TePtBasicType { TePtTypePlus=0, TePtTypeStar=1, TePtTypeCircle=2, TePtTypeX
 //! Type of segment intersection
 enum TeSegmentIntersectionType { TeProperIntersection, TeImproperIntersection };
 
+//! Types of implementations of a generalized proximity matrix 
+enum TeGPMImplementation { TeGraphBreymann };
 
-#endif
+//! Construction strategies to the generalized proximity matrix 
+enum TeGPMConstructionStrategy { TeAdjacencyStrategy, TeDistanceStrategy, TeNearestNeighboursStrategy,
+								 TeClosedNetworkStrategy, TeOpenNetworkStrategy, TeOpenNetworkStrategy2 };
 
+//! Slicing strategies to the generalized proximity matrix 
+enum TeGPMSlicingStrategy { TeNoSlicingStrategy, TeZonesSlicingStrategy };
+	
+//! Weight strategies to the generalized proximity matrix 
+enum TeGPMWeightsStrategy { TeNoWeightsStrategy, TeInverseDistanceStrategy, 
+							TeSquaredInverseDistStrategy, TeConnectionStrenghtStrategy};
+
+
+#endif
diff --git a/src/terralib/kernel/TeDatabase.cpp b/src/terralib/kernel/TeDatabase.cpp
old mode 100644
new mode 100755
index 7721c39..78c8b8a
--- a/src/terralib/kernel/TeDatabase.cpp
+++ b/src/terralib/kernel/TeDatabase.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -21,14 +21,21 @@ indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
 
+#include "TeDatabase.h"
 #include "TeDecoderDatabase.h"
-#include "TeRasterRemap.h"
 #include "TeGeometryAlgorithms.h"
 #include "TeSpatialOperations.h"
 #include "TeImportRaster.h"
-#include "TeDatabase.h"
-
+#include "TeLayer.h"
+#include "TeAbstractTheme.h"
+#include "TeExternalTheme.h"
+#include "TeDatabaseFactoryParams.h"
+#include <TeRasterTransform.h>
+#include <TeTimeInterval.h>
+
+#include <sys/stat.h>
 #include <stdio.h>
+#include <sstream>
 
 typedef map<int,TeNode> TeNodeMap;
 
@@ -60,17 +67,94 @@ TeDatabase::TeDatabase() :
 	user_(""),
 	password_(""),
 	database_(""),
-	portNumber_(0),
+	portNumber_(-1),
 	errorNumber_(0),
-	errorMessage_("")
+	errorMessage_(""),
+	transactionCounter_(0)
 {
+	metaModel_.reset(new TeMetaModelCache);
 }
 
+TeDatabase& TeDatabase::operator=(const TeDatabase& other)
+{
+	if(this != &other)
+		metaModel_ = other.metaModel_;	
+
+	return *this;
+}
 
 TeDatabase::~TeDatabase()
 {
 }
 
+string
+TeDatabase::getDatabaseDescription()
+{
+    std::stringstream desc;
+    const char sep = ';';
+
+    desc << dbmsName_;
+    desc << sep << host_;
+    desc << sep << portNumber_;
+    desc << sep << database_;
+    desc << sep << user_;
+    desc << sep << password_;
+
+    return desc.str();
+} 
+
+void TeDatabase::alterTableInfoInMemory(const string& updatedTableName, string oldTableName)
+{
+	//update table in memory
+	TeTable updatedTable(updatedTableName);
+	loadTableInfo(updatedTable);
+	if(oldTableName.empty())
+		oldTableName = updatedTableName;
+
+	TeLayerMap::iterator itLayer = metaModel_->layerMap().begin();
+	while(itLayer!=metaModel_->layerMap().end())
+	{
+		TeAttrTableVector::iterator itAttr = itLayer->second->attrTables().begin();
+		while(itAttr!=itLayer->second->attrTables().end())
+		{
+			if(TeConvertToUpperCase(itAttr->name())==TeConvertToUpperCase(oldTableName))
+			{
+				(*itAttr)=updatedTable;
+				break;
+			}
+			++itAttr;
+		}
+		++itLayer;
+	}
+	TeThemeMap::iterator itTheme = metaModel_->themeMap().begin();
+	while(itTheme!=metaModel_->themeMap().end())
+	{
+		if(itTheme->second->getProductId() != TeTHEME)
+		{
+			++itTheme; 
+			continue;
+		}
+
+		TeTheme* theme = static_cast<TeTheme*>(itTheme->second);
+				
+		TeAttrTableVector::iterator itAttr = theme->attrTables().begin();
+		while(itAttr!=theme->attrTables().end())
+		{
+			if(TeConvertToUpperCase(itAttr->name())==TeConvertToUpperCase(oldTableName))
+			{
+				(*itAttr)=updatedTable;
+				theme->loadAliasVector();
+				theme->loadAttrLists();
+				theme->loadTablesJoin(); 
+				break;
+			}
+			++itAttr;
+		}
+		++itTheme;
+	}
+	return;
+}
+
 bool TeDatabase::validTable (TeTable& table)
 {
 	int cont=0;
@@ -138,85 +222,11 @@ string TeDatabase::getTableName(int tableId)
 	return tableName;
 }
 
-bool TeDatabase::createTable(const string& table, TeAttributeList &attr)
-{
-	string	q ="CREATE TABLE " + table +" (";
-	string	type;
-	char	size[8];
-	bool	first=true;
-
-	string pkeys;
-
-	TeAttributeList::iterator it;
-	it = attr.begin();
-	while ( it != attr.end() )
-	{
-		string name = (*it).rep_.name_;
-		
-		switch ((*it).rep_.type_)
-		{
-			case TeSTRING:
-				type = "VARCHAR ";
-				sprintf (size,"(%d)",(*it).rep_.numChar_);
-				type += string (size);
-				break;
-			case TeREAL:
-				type = "DOUBLE";
-				sprintf (size,"(%d,%d)",(*it).rep_.numChar_, (*it).rep_.decimals_);
-				type += string (size);
-				break;
-			case TeINT:
-				type = "INT ";
-				break;
-			case TeCHARACTER:
-				type = "CHAR ";
-				break;
-			case TeDATETIME:
-				type = "DATETIME ";  //time
-				break;
-			case TeBLOB:
-				type = "BLOB ";
-				break;
-			default:
-				type = "VARCHAR ";
-				sprintf (size,"(%d)",(*it).rep_.numChar_);
-				type += string (size);
-				break;
-		}
-
-		if((*it).rep_.isAutoNumber_ && (*it).rep_.isPrimaryKey_)
-			type += " AUTO_INCREMENT ";
-				
-		if (!first)
-			q += ",";
-		else
-			first = false;
-		
-		q += name + " " + type;
-
-		// check if column is part of primary key
-		if ( (*it).rep_.isPrimaryKey_ && (*it).rep_.type_ != TeBLOB )
-		{
-			if (!pkeys.empty())
-				pkeys += ", ";
-			pkeys += (*it).rep_.name_;
-			q += " NOT NULL ";
-		}
-		
-		++it;
-	}
-
-	if (!pkeys.empty())
-		q += ", PRIMARY KEY (" + pkeys + ") ";
-	q += ")";
-
-	return execute(q);
-}
-
 bool
 TeDatabase::deleteTable (const string& table)
 {
-	int f =	table.find ("te_collection", std::string::npos);
+//	int f =	table.find ("te_collection", std::string::npos);
+	int f =	table.find ("te_collection");
 
 	if( table=="te_theme" ||
 		table=="te_layer" ||
@@ -231,13 +241,16 @@ TeDatabase::deleteTable (const string& table)
 		table=="te_database" ||
 		f == 0)
 	{
-		errorMessage_ = "N�o � poss�vel deletar tabelas do modelo!";
+		errorMessage_ = "N�o � poss�vel deletar tabelas do modelo!";
 		return false;
 	}
 
 	string del = "DROP TABLE " + table;
-	if(!execute(del))
-		return false;
+	if(tableExist(table))
+	{
+		if(!execute(del))
+			return false;
+	}
 
 	return true;
 }
@@ -246,12 +259,12 @@ TeDatabase::deleteTable (const string& table)
 bool 
 TeDatabase::deleteColumn (const string& table, const string& colName)
 {
-	if (!tableExist(table))
+	if(!tableExist(table))
 		return false;
 	TeAttribute attr;
 	if (!columnExist(table,colName,attr))
 		return true;
-	string drop = "ALTER  TABLE " + table + " DROP COLUMN " + colName;
+	string drop = "ALTER  TABLE "+ table +" DROP COLUMN "+ colName;
 	if(execute(drop) == false)
 		return false;
 
@@ -293,10 +306,10 @@ TeDatabase::deleteColumn (const string& table, const string& colName)
 		if(execute(sql) == false)
 			return false;
 	}
+	alterTableInfoInMemory(table);
 	return true;
 }
 
-
 bool 
 TeDatabase::defineIntegrity(void)
 {
@@ -312,6 +325,10 @@ TeDatabase::defineIntegrity(void)
 		if (!createRelation("fk_view_proj_id", "te_view", "projection_id", "te_projection", "projection_id", false))
 			return false;
 
+	if (existRelation("te_view", "fk_view_current_theme") == TeNoRelation )
+		if (!createRelation("fk_view_current_theme", "te_view", "current_theme", "te_theme", "theme_id", false))
+			return false;
+	
 	if (existRelation("te_theme","fk_theme_layer_id") == TeNoRelation )
 		if (!createRelation("fk_theme_layer_id", "te_theme", "layer_id", "te_layer", "layer_id", true))
 			return false;
@@ -325,11 +342,11 @@ TeDatabase::defineIntegrity(void)
 			return false;
 
 	if (existRelation("te_theme_table","fk_thmtable_lytable_id") == TeNoRelation )
-		if (!createRelation("fk_thmtable_lytable_id", "te_theme_table", "table_id", "te_layer_table", "table_id", true))
+		if (!createRelation("fk_thmtable_lytable_id", "te_theme_table", "table_id", "te_layer_table", "table_id", false))
 			return false;
 
 	if (existRelation("te_theme_table","fk_thmtable_relation_id") == TeNoRelation )
-		if (!createRelation("fk_thmtable_relation_id", "te_theme_table", "relation_id", "te_tables_relation", "relation_id", true))
+		if (!createRelation("fk_thmtable_relation_id", "te_theme_table", "relation_id", "te_tables_relation", "relation_id", false))
 			return false;
 
 	if (existRelation("te_grouping","fk_group_theme_id") == TeNoRelation )
@@ -356,6 +373,14 @@ TeDatabase::defineIntegrity(void)
 		if (!createRelation("fk_visrast_theme_id", "te_visual_raster", "theme_id", "te_theme", "theme_id", true))
 			return false;
 
+	if (existRelation("te_project_view","fk_projectview_project_id") == TeNoRelation )
+		if (!createRelation("fk_projectview_project_id", "te_project_view", "project_id", "te_project", "project_id", true))
+			return false;
+
+	if (existRelation("te_project_view","fk_projectview_view_id") == TeNoRelation )
+		if (!createRelation("fk_projectview_view_id", "te_project_view", "view_id", "te_view", "view_id", true))
+			return false;
+
 	return true;
 }
 
@@ -394,6 +419,7 @@ TeDatabase::createConceptualModel(bool withIntegrity, bool newDatabase, bool /*
 		status = this->createTablesRelationTable();
 		if (!status)
 			return false;
+		createMainTables = true;
 	}
 	
 	if (!this->tableExist("te_representation"))
@@ -404,19 +430,20 @@ TeDatabase::createConceptualModel(bool withIntegrity, bool newDatabase, bool /*
 		createMainTables = true;
 	}
 
-	if (!this->tableExist("te_view"))
+	if (!this->tableExist("te_theme"))
 	{
-		status = this->createViewTable();
+		status = this->createThemeTable();
 		if (!status)
 			return false;
 		createMainTables = true;
 	}
 
-	if (!this->tableExist("te_theme"))
+	if (!this->tableExist("te_view"))
 	{
-		status = this->createThemeTable();
+		status = this->createViewTable();
 		if (!status)
 			return false;
+		createMainTables = true;
 	}
 
 	if (!this->tableExist("te_grouping"))
@@ -461,9 +488,22 @@ TeDatabase::createConceptualModel(bool withIntegrity, bool newDatabase, bool /*
 			return false;
 	}
 
-	if(newDatabase || createMainTables)
+	if (!this->tableExist("te_project"))
+	{
+		status = this->createProjectTable();
+		if (!status)
+			return false;
+	}
+
+	if (!this->tableExist("te_project_view"))
+	{
+		status = this->createProjectViewTable();
+		if (!status)
+			return false;
+	}
+	if (newDatabase || createMainTables)
 	{
-		string ins = "INSERT INTO te_database (db_version) VALUES ('3.0.2')";
+		string ins = "INSERT INTO te_database (db_version) VALUES ('" + TeDBVERSION + "')";
 		if (!execute(ins))
 			return false;
 	}
@@ -484,78 +524,380 @@ TeDatabase::createIndex(const string& tableName, const string& indexName, const
 bool 
 TeDatabase::createDatabaseTable()
 {
-	string create = "CREATE TABLE te_database (";
-	create += "db_version		VARCHAR(50) NOT NULL,";
-	create += "db_creation		DATETIME,";
-	create += "PRIMARY KEY (db_version))";
-	return execute (create);
+	TeAttributeList attList;
+
+	{TeAttribute attDBVersion;
+	attDBVersion.rep_.name_ = "db_version";
+	attDBVersion.rep_.type_ = TeSTRING;
+	attDBVersion.rep_.numChar_ = 50;
+	attDBVersion.rep_.isPrimaryKey_ = true;
+	attDBVersion.rep_.null_ = false;
+	attList.push_back(attDBVersion);}
+
+	{TeAttribute attDBCreation;
+	attDBCreation.rep_.name_ = "db_creation";
+	attDBCreation.rep_.type_ = TeDATETIME;
+	attList.push_back(attDBCreation);}
+
+	return createTable("te_database", attList);
+}
+
+bool 
+TeDatabase::createProjectTable()
+{
+	TeAttributeList attList;
+
+	{TeAttribute attProjectId;
+	attProjectId.rep_.name_ = "project_id";
+	attProjectId.rep_.type_ = TeUNSIGNEDINT;
+	attProjectId.rep_.isAutoNumber_ = true;
+	attProjectId.rep_.isPrimaryKey_ = true;
+	attProjectId.rep_.null_ = false;
+	attList.push_back(attProjectId);}
+
+	{TeAttribute attName;
+	attName.rep_.name_ = "name";
+	attName.rep_.type_ = TeSTRING;
+	attName.rep_.numChar_ = 50;
+	attName.rep_.null_ = false;
+	attList.push_back(attName);}
+
+	{TeAttribute attDescription;
+	attDescription.rep_.name_ = "description";
+	attDescription.rep_.type_ = TeSTRING;
+	attDescription.rep_.numChar_ = 255;
+	attDescription.rep_.null_ = true;
+	attList.push_back(attDescription);}
+
+	{TeAttribute attCurrentView;
+	attCurrentView.rep_.name_ = "current_view";
+	attCurrentView.rep_.type_ = TeINT;
+	attList.push_back(attCurrentView);}
+
+	return createTable("te_project", attList);
 }
 
+bool 
+TeDatabase::createProjectViewTable()
+{
+	TeAttributeList attList;
+
+	{TeAttribute attProjectId;
+	attProjectId.rep_.name_ = "project_id";
+	attProjectId.rep_.type_ = TeUNSIGNEDINT;
+	attProjectId.rep_.isPrimaryKey_ = true;
+	attProjectId.rep_.null_ = false;
+	attList.push_back(attProjectId);}
+
+	{TeAttribute attViewId;
+	attViewId.rep_.name_ = "view_id";
+	attViewId.rep_.type_ = TeUNSIGNEDINT;
+	attViewId.rep_.isPrimaryKey_ = true;
+	attViewId.rep_.null_ = false;
+	attList.push_back(attViewId);}
+
+	return createTable("te_project_view", attList);
+}
 
 bool 
 TeDatabase::createProjectionTable ()
 {
-	string create = "CREATE TABLE te_projection (";
-	create += "projection_id	INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,";
-	create += "name				VARCHAR(50) NOT NULL,";
-	create += "long0			DOUBLE(24,15) DEFAULT '0.0',";
-	create += "lat0				DOUBLE(24,15) DEFAULT '0.0',";
-	create += "offx				DOUBLE(24,15) DEFAULT '0.0',";
-	create += "offy				DOUBLE(24,15) DEFAULT '0.0',";
-	create += "stlat1			DOUBLE(24,15) DEFAULT '0.0',";
-	create += "stlat2			DOUBLE(24,15) DEFAULT '0.0',";
-	create += "unit				VARCHAR(50) NOT NULL,";
-	create += "scale			DOUBLE(24,15) DEFAULT '0.0',";
-	create += "hemis			INT(4) NOT NULL,";
-	create += "datum			VARCHAR(50) NOT NULL,";
-	create += "radius			DOUBLE(24,15) DEFAULT '0.0',";
-	create += "flattening		DOUBLE(24,15) DEFAULT '0.0',";
-	create += "dx				DOUBLE(24,15) DEFAULT '0.0',";
-	create += "dy				DOUBLE(24,15) DEFAULT '0.0',";
-	create += "dz				DOUBLE(24,15) DEFAULT '0.0',";
-	create += "PRIMARY KEY (projection_id))";
-	return execute (create);
+	TeAttributeList attList;
+
+	{TeAttribute attProjectId;
+	attProjectId.rep_.name_ = "projection_id";
+	attProjectId.rep_.type_ = TeUNSIGNEDINT;
+	attProjectId.rep_.isPrimaryKey_ = true;
+	attProjectId.rep_.isAutoNumber_ = true;
+	attProjectId.rep_.null_ = false;
+	attList.push_back(attProjectId);}
+
+	{TeAttribute attName;
+	attName.rep_.name_ = "name";
+	attName.rep_.type_ = TeSTRING;
+	attName.rep_.numChar_ = 50;
+	attName.rep_.null_ = false;
+	attList.push_back(attName);}
+
+	{TeAttribute attLong0;
+	attLong0.rep_.name_ = "long0";
+	attLong0.rep_.type_ = TeREAL;
+	attLong0.rep_.decimals_ = 15;
+	attLong0.rep_.defaultValue_ = "0.0";
+	attList.push_back(attLong0);}
+
+	{TeAttribute attLat0;
+	attLat0.rep_.name_ = "lat0";
+	attLat0.rep_.type_ = TeREAL;
+	attLat0.rep_.decimals_ = 15;
+	attLat0.rep_.defaultValue_ = "0.0";
+	attList.push_back(attLat0);}
+
+	{TeAttribute attOffX;
+	attOffX.rep_.name_ = "offx";
+	attOffX.rep_.type_ = TeREAL;
+	attOffX.rep_.decimals_ = 15;
+	attOffX.rep_.defaultValue_ = "0.0";
+	attList.push_back(attOffX);}
+
+	{TeAttribute attOffY;
+	attOffY.rep_.name_ = "offy";
+	attOffY.rep_.type_ = TeREAL;
+	attOffY.rep_.decimals_ = 15;
+	attOffY.rep_.defaultValue_ = "0.0";
+	attList.push_back(attOffY);}
+
+	{TeAttribute attSlat1;
+	attSlat1.rep_.name_ = "stlat1";
+	attSlat1.rep_.type_ = TeREAL;
+	attSlat1.rep_.decimals_ = 15;
+	attSlat1.rep_.defaultValue_ = "0.0";
+	attList.push_back(attSlat1);}
+
+	{TeAttribute attSlat2;
+	attSlat2.rep_.name_ = "stlat2";
+	attSlat2.rep_.type_ = TeREAL;
+	attSlat2.rep_.decimals_ = 15;
+	attSlat2.rep_.defaultValue_ = "0.0";
+	attList.push_back(attSlat2);}
+
+	{TeAttribute attUnit;
+	attUnit.rep_.name_ = "unit";
+	attUnit.rep_.type_ = TeSTRING;
+	attUnit.rep_.numChar_ = 50;
+	attUnit.rep_.null_ = false;
+	attList.push_back(attUnit);}
+
+	{TeAttribute attScale;
+	attScale.rep_.name_ = "scale";
+	attScale.rep_.type_ = TeREAL;
+	attScale.rep_.decimals_ = 15;
+	attScale.rep_.defaultValue_ = "0.0";
+	attList.push_back(attScale);}
+
+	{TeAttribute attHemis;
+	attHemis.rep_.name_ = "hemis";
+	attHemis.rep_.type_ = TeINT;
+	attHemis.rep_.null_ = false;
+	attList.push_back(attHemis);}
+
+	{TeAttribute attDatum;
+	attDatum.rep_.name_ = "datum";
+	attDatum.rep_.type_ = TeSTRING;
+	attDatum.rep_.numChar_ = 50;
+	attDatum.rep_.null_ = false;
+	attList.push_back(attDatum);}
+
+	{TeAttribute attRadius;
+	attRadius.rep_.name_ = "radius";
+	attRadius.rep_.type_ = TeREAL;
+	attRadius.rep_.decimals_ = 15;
+	attRadius.rep_.defaultValue_ = "0.0";
+	attList.push_back(attRadius);}
+
+	{TeAttribute attFlattening;
+	attFlattening.rep_.name_ = "flattening";
+	attFlattening.rep_.type_ = TeREAL;
+	attFlattening.rep_.decimals_ = 15;
+	attFlattening.rep_.defaultValue_ = "0.0";
+	attList.push_back(attFlattening);}
+
+	{TeAttribute attDX;
+	attDX.rep_.name_ = "dx";
+	attDX.rep_.type_ = TeREAL;
+	attDX.rep_.decimals_ = 15;
+	attDX.rep_.defaultValue_ = "0.0";
+	attList.push_back(attDX);}
+
+	{TeAttribute attDY;
+	attDY.rep_.name_ = "dy";
+	attDY.rep_.type_ = TeREAL;
+	attDY.rep_.decimals_ = 15;
+	attDY.rep_.defaultValue_ = "0.0";
+	attList.push_back(attDY);}
+
+	{TeAttribute attDZ;
+	attDZ.rep_.name_ = "dz";
+	attDZ.rep_.type_ = TeREAL;
+	attDZ.rep_.decimals_ = 15;
+	attDZ.rep_.defaultValue_ = "0.0";
+	attList.push_back(attDZ);}
+
+	return createTable("te_projection", attList);
 }
 
 bool TeDatabase::createLayerTable ()
 {
-	string create = "CREATE TABLE te_layer (";
-	create += "layer_id			INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,";
-	create += "projection_id	INT(10) UNSIGNED NOT NULL,";
-	create += "name				VARCHAR(255) NOT NULL,";
-	create += "lower_x			DOUBLE(24,15) DEFAULT '0.0' NOT NULL,";
-	create += "lower_y			DOUBLE(24,15) DEFAULT '0.0' NOT NULL,";
-	create += "upper_x			DOUBLE(24,15) DEFAULT '0.0' NOT NULL,";
-	create += "upper_y			DOUBLE(24,15) DEFAULT '0.0' NOT NULL,";
-	create += "initial_time		DATETIME,";
-	create += "final_time		DATETIME, ";
-	create += "PRIMARY KEY (layer_id))";
-	return execute (create);
+	TeAttributeList attList;
+
+	{TeAttribute attLayerId;
+	attLayerId.rep_.name_ = "layer_id";
+	attLayerId.rep_.type_ = TeUNSIGNEDINT;
+	attLayerId.rep_.isPrimaryKey_ = true;
+	attLayerId.rep_.isAutoNumber_ = true;
+	attLayerId.rep_.null_ = false;
+	attList.push_back(attLayerId);}
+
+	{TeAttribute attProjectionId;
+	attProjectionId.rep_.name_ = "projection_id";
+	attProjectionId.rep_.type_ = TeUNSIGNEDINT;
+	attProjectionId.rep_.null_ = false;
+	attList.push_back(attProjectionId);}
+
+	{TeAttribute attName;
+	attName.rep_.name_ = "name";
+	attName.rep_.type_ = TeSTRING;
+	attName.rep_.numChar_ = 255;
+	attName.rep_.null_ = false;
+	attList.push_back(attName);}
+
+	{TeAttribute attLowerX;
+	attLowerX.rep_.name_ = "lower_x";
+	attLowerX.rep_.type_ = TeREAL;
+	attLowerX.rep_.decimals_ = 15;
+	attLowerX.rep_.defaultValue_ = "0.0";
+	attList.push_back(attLowerX);}
+
+	{TeAttribute attLowerY;
+	attLowerY.rep_.name_ = "lower_y";
+	attLowerY.rep_.type_ = TeREAL;
+	attLowerY.rep_.decimals_ = 15;
+	attLowerY.rep_.defaultValue_ = "0.0";
+	attList.push_back(attLowerY);}
+
+	{TeAttribute attUpperX;
+	attUpperX.rep_.name_ = "upper_x";
+	attUpperX.rep_.type_ = TeREAL;
+	attUpperX.rep_.decimals_ = 15;
+	attUpperX.rep_.defaultValue_ = "0.0";
+	attList.push_back(attUpperX);}
+
+	{TeAttribute attUpperY;
+	attUpperY.rep_.name_ = "upper_y";
+	attUpperY.rep_.type_ = TeREAL;
+	attUpperY.rep_.decimals_ = 15;
+	attUpperY.rep_.defaultValue_ = "0.0";
+	attList.push_back(attUpperY);}
+
+	{TeAttribute attInitialTime;
+	attInitialTime.rep_.name_ = "initial_time";
+	attInitialTime.rep_.type_ = TeDATETIME;
+	attList.push_back(attInitialTime);}
+
+	{TeAttribute attFinalTime;
+	attFinalTime.rep_.name_ = "final_time";
+	attFinalTime.rep_.type_ = TeDATETIME;
+	attList.push_back(attFinalTime);}
+
+	{TeAttribute attEditionTime;
+	attEditionTime.rep_.name_ = "edition_time";
+	attEditionTime.rep_.type_ = TeDATETIME;
+	attList.push_back(attEditionTime);}
+
+	if(!createTable("te_layer", attList))
+		return false;
+
+	string idxName = "te_idx_layer_proj";
+
+	if(!createIndex("te_layer", idxName, "projection_id"))
+		return false;
+
+	idxName = "te_idx_layer_name";
+
+	return createIndex("te_layer", idxName, "name");
 }
 
 bool TeDatabase::createLayerTableTable()
 {
-	string create = "CREATE TABLE te_layer_table (";
-	create += "table_id				INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,";
-	create += "layer_id				INT(10) UNSIGNED,";
-	create += "attr_table			VARCHAR(255) NOT NULL,";
-	create += "unique_id			VARCHAR(255), ";
-	create += "attr_link			VARCHAR(255), ";
-	create += "attr_initial_time	VARCHAR(255), ";
-	create += "attr_final_time		VARCHAR(255), ";
-	create += "attr_time_unit		INT(4) UNSIGNED, ";
-	create += "attr_table_type		INT(4) UNSIGNED, ";
-	create += "user_name			VARCHAR(255),";
-	create += "initial_time			DATETIME,";
-	create += "final_time			DATETIME, ";
-	create += "PRIMARY KEY (table_id))";
-	return execute (create);
+	TeAttributeList attList;
+
+	{TeAttribute attTableId;
+	attTableId.rep_.name_ = "table_id";
+	attTableId.rep_.type_ = TeUNSIGNEDINT;
+	attTableId.rep_.isPrimaryKey_ = true;
+	attTableId.rep_.isAutoNumber_ = true;
+	attTableId.rep_.null_ = false;
+	attList.push_back(attTableId);}
+
+	{TeAttribute attLayerId;
+	attLayerId.rep_.name_ = "layer_id";
+	attLayerId.rep_.type_ = TeUNSIGNEDINT;
+	attList.push_back(attLayerId);}
+
+	{TeAttribute attTable;
+	attTable.rep_.name_ = "attr_table";
+	attTable.rep_.type_ = TeSTRING;
+	attTable.rep_.numChar_ = 255;
+	attTable.rep_.null_ = false;
+	attList.push_back(attTable);}
+
+	{TeAttribute attUniqueID;
+	attUniqueID.rep_.name_ = "unique_id";
+	attUniqueID.rep_.type_ = TeSTRING;
+	attUniqueID.rep_.numChar_ = 255;
+	attList.push_back(attUniqueID);}
+
+	{TeAttribute attLink;
+	attLink.rep_.name_ = "attr_link";
+	attLink.rep_.type_ = TeSTRING;
+	attLink.rep_.numChar_ = 255;
+	attList.push_back(attLink);}
+
+	{TeAttribute attAttrInitialTime;
+	attAttrInitialTime.rep_.name_ = "attr_initial_time";
+	attAttrInitialTime.rep_.type_ = TeSTRING;
+	attAttrInitialTime.rep_.numChar_ = 255;
+	attList.push_back(attAttrInitialTime);}
+
+	{TeAttribute attAttrFinalTime;
+	attAttrFinalTime.rep_.name_ = "attr_final_time";
+	attAttrFinalTime.rep_.type_ = TeSTRING;
+	attAttrFinalTime.rep_.numChar_ = 255;
+	attList.push_back(attAttrFinalTime);}
+
+	{TeAttribute attTimeUnit;
+	attTimeUnit.rep_.name_ = "attr_time_unit";
+	attTimeUnit.rep_.type_ = TeUNSIGNEDINT;
+	attList.push_back(attTimeUnit);}
+
+	{TeAttribute attTableType;
+	attTableType.rep_.name_ = "attr_table_type";
+	attTableType.rep_.type_ = TeUNSIGNEDINT;
+	attList.push_back(attTableType);}
+
+	{TeAttribute attUserName;
+	attUserName.rep_.name_ = "user_name";
+	attUserName.rep_.type_ = TeSTRING;
+	attUserName.rep_.numChar_ = 255;
+	attList.push_back(attUserName);}
+
+	{TeAttribute attInitialTime;
+	attInitialTime.rep_.name_ = "initial_time";
+	attInitialTime.rep_.type_ = TeDATETIME;
+	attList.push_back(attInitialTime);}
+
+	{TeAttribute attFinalTime;
+	attFinalTime.rep_.name_ = "final_time";
+	attFinalTime.rep_.type_ = TeDATETIME;
+	attList.push_back(attFinalTime);}
+
+	if(!createTable("te_layer_table", attList))
+		return false;
+
+	string idxName = "te_idx_layertable_layer";
+
+	if(!createIndex("te_layer_table", idxName, "layer_id"))
+		return false;
+
+	idxName = "te_idx_layertable_att";
+
+	return createIndex("te_layer_table", idxName, "attr_table");
 }
 
 bool 
 TeDatabase::updateTableInfo(int layerId, TeTable &table, const string user)
 {
-	if (table.id() <= 0 )  // table information doesn�t exist in database yet
+	if (table.id() <= 0 )  // table information doesn�t exist in database yet
 		return this->insertTableInfo(layerId,table,user);
 	string sql;
 	sql = "UPDATE te_layer_table SET ";
@@ -580,27 +922,64 @@ TeDatabase::loadTableInfo(TeTable& table)
 	TeDatabasePortal* portal = this->getPortal();
 	if(!portal)
 	{
-		this->errorMessage_ = "N�o foi poss�vel abrir portal para o banco";
+		this->errorMessage_ = "N�o foi poss�vel abrir portal para o banco";
 		return false;
 	}
 	
-	string get =  "SELECT * FROM te_layer_table WHERE attr_table = '" + table.name() + "'";
-	if (!portal->query(get) || !portal->fetchRow())
+	//theme tables
+	string sel = " SELECT table_id, layer_id, attr_table, unique_id, ";
+	sel += " attr_link, attr_initial_time, attr_final_time, attr_time_unit, ";
+	sel += " attr_table_type, user_name, initial_time, final_time ";
+	sel += " FROM te_layer_table ";
+	sel += " WHERE  attr_table = '" + table.name() + "'";
+		
+	if ((!portal->query(sel)) || (!portal->fetchRow()))
 	{	
 		delete portal;
 		return false;
 	}
+	
+	if(!portal->getAttrTable(table))
+	{
+		delete portal;
+		return false;
+	}
 
-	table.setId(portal->getInt("table_id"));
-	table.setLinkName(portal->getData("attr_link"));
-	table.setUniqueName(portal->getData("unique_id"));
-	table.setTableType(TeAttrTableType(portal->getInt("attr_table_type")));
 	TeAttributeList attrList;
 	getAttributeList(table.name(), attrList);
 	table.setAttributeList(attrList);
-	table.attInitialTime(portal->getData("attr_initial_time"));
-	table.attFinalTime(portal->getData("attr_final_time"));
-	table.attTimeUnit(TeChronon(portal->getInt("attr_time_unit")));
+	
+	if (table.tableType() == TeAttrExternal) //information about external table 
+	{
+		portal->freeResult();
+
+		sel = " SELECT te_layer_table.attr_table, te_tables_relation.related_table_id, ";
+		sel += " te_tables_relation.related_attr, te_tables_relation.external_attr  ";
+		sel += " FROM te_layer_table INNER JOIN te_tables_relation";
+		sel += " ON te_layer_table.table_id = te_tables_relation.related_table_id ";
+		sel += " WHERE  te_tables_relation.external_table_name = '" + table.name() + "'";
+
+		if (!portal->query(sel))
+		{	
+			delete portal;
+			return false;
+		}
+
+		if (!portal->fetchRow())
+		{
+			delete portal;
+			return true;
+		}
+		
+		int relatedTableId = portal->getInt(1); //related_table_id
+		string relatedTable = portal->getData(0); //static table name 
+		string relatedAttr = portal->getData(2); // static column name - related_attr
+        		
+		table.setTableType(TeAttrExternal, relatedTableId, relatedAttr);
+		table.relatedTableName(relatedTable);
+		table.setLinkName(portal->getData(3));  //external column name - external_attr
+	}
+	
 	delete portal;
 	return true;
 }
@@ -608,317 +987,1049 @@ TeDatabase::loadTableInfo(TeTable& table)
 
 bool TeDatabase::createLUTTable(const string& name)
 {
-	string create = "CREATE TABLE " + name + "(";
-	create += "index_id		INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,";
-	create += "r_val		INT(10) UNSIGNED NOT NULL,";
-	create += "g_val		INT(10) NOT NULL,";
-	create += "b_val		INT(10) NOT NULL,";
-	create += "PRIMARY KEY (index_id))";
-	return execute (create);
+	if(name.empty())
+		return false;
+
+	TeAttributeList attList;
+
+	{TeAttribute attIndexId;
+	attIndexId.rep_.name_ = "index_id";
+	attIndexId.rep_.type_ = TeUNSIGNEDINT;
+	attIndexId.rep_.isPrimaryKey_ = true;
+	attIndexId.rep_.null_ = false;
+	attList.push_back(attIndexId);}
+
+	{TeAttribute attRVal;
+	attRVal.rep_.name_ = "r_val";
+	attRVal.rep_.type_ = TeUNSIGNEDINT;
+	attRVal.rep_.null_ = false;
+	attList.push_back(attRVal);}
+
+	{TeAttribute attGVal;
+	attGVal.rep_.name_ = "g_val";
+	attGVal.rep_.type_ = TeUNSIGNEDINT;
+	attGVal.rep_.null_ = false;
+	attList.push_back(attGVal);}
+
+	{TeAttribute attBVal;
+	attBVal.rep_.name_ = "b_val";
+	attBVal.rep_.type_ = TeUNSIGNEDINT;
+	attBVal.rep_.null_ = false;
+	attList.push_back(attBVal);}
+
+	return createTable(name, attList);
 }
 
 bool TeDatabase::createTablesRelationTable()
 {
-	string create = "CREATE TABLE te_tables_relation (";
-	create += "relation_id			INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,";
-	create += "related_table_id		INT(10) NOT NULL,";
-	create += "related_attr			VARCHAR(255) NOT NULL,";
-	create += "external_table_name	VARCHAR(255) NOT NULL,";
-	create += "external_attr		VARCHAR(255) NOT NULL,";
-	create += "PRIMARY KEY (relation_id))";
-	return execute (create);
+	TeAttributeList attList;
+	
+	{TeAttribute attRelationId;
+	attRelationId.rep_.name_ = "relation_id";
+	attRelationId.rep_.type_ = TeUNSIGNEDINT;
+	attRelationId.rep_.isAutoNumber_ = true;
+	attRelationId.rep_.isPrimaryKey_ = true;
+	attRelationId.rep_.null_ = false;
+	attList.push_back(attRelationId);}
+
+	{TeAttribute attRelatedTableId;
+	attRelatedTableId.rep_.name_ = "related_table_id";
+	attRelatedTableId.rep_.type_ = TeINT;
+	attRelatedTableId.rep_.null_ = false;
+	attList.push_back(attRelatedTableId);}
+
+	{TeAttribute attRelatedAttr;
+	attRelatedAttr.rep_.name_ = "related_attr";
+	attRelatedAttr.rep_.type_ = TeSTRING;
+	attRelatedAttr.rep_.numChar_ = 255;
+	attRelatedAttr.rep_.null_ = false;
+	attList.push_back(attRelatedAttr);}
+
+	{TeAttribute attExternalTableName;
+	attExternalTableName.rep_.name_ = "external_table_name";
+	attExternalTableName.rep_.type_ = TeSTRING;
+	attExternalTableName.rep_.numChar_ = 255;
+	attExternalTableName.rep_.null_ = false;
+	attList.push_back(attExternalTableName);}
+
+	{TeAttribute attExternalAttr;
+	attExternalAttr.rep_.name_ = "external_attr";
+	attExternalAttr.rep_.type_ = TeSTRING;
+	attExternalAttr.rep_.numChar_ = 255;
+	attExternalAttr.rep_.null_ = false;
+	attList.push_back(attExternalAttr);}
+
+	return createTable("te_tables_relation", attList);
 }
 
 bool TeDatabase::createRepresentationTable ()
 {
-	string create = "CREATE TABLE te_representation (";
-	create += "repres_id			INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, ";
-	create += "layer_id				INT(10) UNSIGNED NOT NULL, ";
-	create += "geom_type			INT(10) NOT NULL, ";
-	create += "geom_table			VARCHAR(255) NOT NULL, ";
-	create += "description			VARCHAR(255), ";
-	create += "lower_x				DOUBLE(24,15) DEFAULT '0.0', ";
-	create += "lower_y				DOUBLE(24,15) DEFAULT '0.0', ";
-	create += "upper_x				DOUBLE(24,15) DEFAULT '0.0', ";
-	create += "upper_y				DOUBLE(24,15) DEFAULT '0.0', ";
-	create += "res_x				DOUBLE(24,15) DEFAULT '0.0', ";
-	create += "res_y				DOUBLE(24,15) DEFAULT '0.0', ";
-	create += "num_cols				INT(10), ";
-	create += "num_rows				INT(10), ";
-	create += "initial_time			DATETIME, ";
-	create += "final_time			DATETIME, ";
-	create += "PRIMARY KEY (repres_id), ";
-	create += "INDEX representation_index (layer_id,geom_type))";
-	return execute (create);
+	TeAttributeList attList;
+	
+	{TeAttribute attRepresId;
+	attRepresId.rep_.name_ = "repres_id";
+	attRepresId.rep_.type_ = TeUNSIGNEDINT;
+	attRepresId.rep_.isAutoNumber_ = true;
+	attRepresId.rep_.isPrimaryKey_ = true;
+	attRepresId.rep_.null_ = false;
+	attList.push_back(attRepresId);}
+
+	{TeAttribute attLayerId;
+	attLayerId.rep_.name_ = "layer_id";
+	attLayerId.rep_.type_ = TeUNSIGNEDINT;
+	attLayerId.rep_.null_ = false;
+	attList.push_back(attLayerId);}
+
+	{TeAttribute attGeomType;
+	attGeomType.rep_.name_ = "geom_type";
+	attGeomType.rep_.type_ = TeINT;
+	attGeomType.rep_.null_ = false;
+	attList.push_back(attGeomType);}
+
+	{TeAttribute attGeomTable;
+	attGeomTable.rep_.name_ = "geom_table";
+	attGeomTable.rep_.type_ = TeSTRING;
+	attGeomTable.rep_.numChar_ = 255;
+	attGeomTable.rep_.null_ = false;
+	attList.push_back(attGeomTable);}
+
+	{TeAttribute attDescription;
+	attDescription.rep_.name_ = "description";
+	attDescription.rep_.type_ = TeSTRING;
+	attDescription.rep_.numChar_ = 255;
+	attList.push_back(attDescription);}
+
+	{TeAttribute attLowerX;
+	attLowerX.rep_.name_ = "lower_x";
+	attLowerX.rep_.type_ = TeREAL;
+	attLowerX.rep_.decimals_ = 15;
+	attLowerX.rep_.defaultValue_ = "0.0";
+	attList.push_back(attLowerX);}
+
+	{TeAttribute attLowerY;
+	attLowerY.rep_.name_ = "lower_y";
+	attLowerY.rep_.type_ = TeREAL;
+	attLowerY.rep_.decimals_ = 15;
+	attLowerY.rep_.defaultValue_ = "0.0";
+	attList.push_back(attLowerY);}
+
+	{TeAttribute attUpperX;
+	attUpperX.rep_.name_ = "upper_x";
+	attUpperX.rep_.type_ = TeREAL;
+	attUpperX.rep_.decimals_ = 15;
+	attUpperX.rep_.defaultValue_ = "0.0";
+	attList.push_back(attUpperX);}
+
+	{TeAttribute attUpperY;
+	attUpperY.rep_.name_ = "upper_y";
+	attUpperY.rep_.type_ = TeREAL;
+	attUpperY.rep_.decimals_ = 15;
+	attUpperY.rep_.defaultValue_ = "0.0";
+	attList.push_back(attUpperY);}
+
+	{TeAttribute attResX;
+	attResX.rep_.name_ = "res_x";
+	attResX.rep_.type_ = TeREAL;
+	attResX.rep_.decimals_ = 15;
+	attResX.rep_.defaultValue_ = "0.0";
+	attList.push_back(attResX);}
+
+	{TeAttribute attResY;
+	attResY.rep_.name_ = "res_y";
+	attResY.rep_.type_ = TeREAL;
+	attResY.rep_.decimals_ = 15;
+	attResY.rep_.defaultValue_ = "0.0";
+	attList.push_back(attResY);}
+
+	{TeAttribute attNumCols;
+	attNumCols.rep_.name_ = "num_cols";
+	attNumCols.rep_.type_ = TeINT;
+	attList.push_back(attNumCols);}
+
+	{TeAttribute attNumRows;
+	attNumRows.rep_.name_ = "num_rows";
+	attNumRows.rep_.type_ = TeINT;
+	attList.push_back(attNumRows);}
+
+	{TeAttribute attInitialTime;
+	attInitialTime.rep_.name_ = "initial_time";
+	attInitialTime.rep_.type_ = TeDATETIME;
+	attList.push_back(attInitialTime);}
+
+	{TeAttribute attFinalTime;
+	attFinalTime.rep_.name_ = "final_time";
+	attFinalTime.rep_.type_ = TeDATETIME;
+	attList.push_back(attFinalTime);}
+
+	if(!createTable("te_representation", attList))
+		return false;
+
+	string idxName = "te_idx_representation";
+
+	return createIndex("te_representation", idxName, "layer_id");
 }
 
 bool TeDatabase::createRasterMetadataTable(const string& tableName)
 {
-	if (tableName.empty())
+	if(tableName.empty())
 		return false;
 
-	string create = "CREATE TABLE " + tableName + " (";
-	create += " geom_id				INT(10) UNSIGNED NOT NULL, ";
-	create += " band_id				INT(10) UNSIGNED NOT NULL, ";
-	create += " min_value			DOUBLE(24,15) DEFAULT '0.0', ";
-	create += " max_value			DOUBLE(24,15) DEFAULT '0.0', ";
-	create += " num_bits			INT(10), ";
-	create += " data_type			INT(4), ";
-	create += " photometric_type	INT(4), ";
-	create += " compression_type	INT(4), ";
-	create += " dummy				DOUBLE(24,15), ";
-	create += " PRIMARY KEY (geom_id, band_id))";
-	return execute (create);
-}
+	TeAttributeList attList;
+	
+	{TeAttribute attGeomId;
+	attGeomId.rep_.name_ = "geom_id";
+	attGeomId.rep_.type_ = TeUNSIGNEDINT;
+	attGeomId.rep_.isPrimaryKey_ = true;
+	attGeomId.rep_.null_ = false;
+	attList.push_back(attGeomId);}
+
+	{TeAttribute attBandId;
+	attBandId.rep_.name_ = "band_id";
+	attBandId.rep_.type_ = TeUNSIGNEDINT;
+	attBandId.rep_.isPrimaryKey_ = true;
+	attBandId.rep_.null_ = false;
+	attList.push_back(attBandId);}
+
+	{TeAttribute attMinValue;
+	attMinValue.rep_.name_ = "min_value";
+	attMinValue.rep_.type_ = TeREAL;
+	attMinValue.rep_.decimals_ = 15;
+	attMinValue.rep_.defaultValue_ = "0.0";
+	attList.push_back(attMinValue);}
+
+	{TeAttribute attMaxValue;
+	attMaxValue.rep_.name_ = "max_value";
+	attMaxValue.rep_.type_ = TeREAL;
+	attMaxValue.rep_.decimals_ = 15;
+	attMaxValue.rep_.defaultValue_ = "0.0";
+	attList.push_back(attMaxValue);}
+
+	{TeAttribute attNumBits;
+	attNumBits.rep_.name_ = "num_bits";
+	attNumBits.rep_.type_ = TeINT;
+	attList.push_back(attNumBits);}
+
+	{TeAttribute attDatatype;
+	attDatatype.rep_.name_ = "data_type";
+	attDatatype.rep_.type_ = TeINT;
+	attList.push_back(attDatatype);}
+
+	{TeAttribute attPhotoType;
+	attPhotoType.rep_.name_ = "photometric_type";
+	attPhotoType.rep_.type_ = TeINT;
+	attList.push_back(attPhotoType);}
+
+	{TeAttribute attCompressType;
+	attCompressType.rep_.name_ = "compression_type";
+	attCompressType.rep_.type_ = TeINT;
+	attList.push_back(attCompressType);}
+
+	{TeAttribute attDummy;
+	attDummy.rep_.name_ = "dummy";
+	attDummy.rep_.type_ = TeREAL;
+	attDummy.rep_.decimals_ = 15;
+	attList.push_back(attDummy);}
+
+	return createTable(tableName, attList);
+}
+
+bool TeDatabase::createRasterTable(const string& tableName)
+{
+	if(tableName.empty())
+		return false;
+
+	TeAttributeList attList;
+	
+	{TeAttribute attGeomId;
+	attGeomId.rep_.name_ = "block_id";
+	attGeomId.rep_.type_ = TeSTRING;
+	attGeomId.rep_.numChar_ = 50;
+	attGeomId.rep_.isPrimaryKey_ = true;
+	attGeomId.rep_.null_ = false;
+	attList.push_back(attGeomId);}
 
+	{TeAttribute attSpatialData;
+	attSpatialData.rep_.name_ = "spatial_data";
+	attSpatialData.rep_.type_ = TeRASTERTYPE;
+	attList.push_back(attSpatialData);}
 
-bool TeDatabase::createRasterGeometry(const string& tableName)
-{
-	if (tableName.empty())
+	if(!createTable(tableName, attList))
 		return false;
 
-	string create = "CREATE TABLE " + tableName + " (";
-	create += "geom_id			INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, ";
-	create += "object_id		VARCHAR(255) NOT NULL, ";
-	create += "raster_table		VARCHAR(255) NOT NULL, ";
-	create += "lut_table		VARCHAR(255), ";
-	create += "res_x			DOUBLE(24,15) DEFAULT '0.0', ";
-	create += "res_y			DOUBLE(24,15) DEFAULT '0.0', ";
-	create += "num_bands		INT(10), ";
-	create += "num_cols			INT(10), ";
-	create += "num_rows			INT(10), ";
-	create += "block_height		INT(10), ";
-	create += "block_width		INT(10), ";
-	create += "lower_x			DOUBLE(24,15) DEFAULT '0.0', ";
-	create += "lower_y			DOUBLE(24,15) DEFAULT '0.0', ";
-	create += "upper_x			DOUBLE(24,15) DEFAULT '0.0', ";
-	create += "upper_y			DOUBLE(24,15) DEFAULT '0.0', ";
-	create += "tiling_type      INT(4), ";
-	create += "PRIMARY KEY (geom_id), ";
-	create += "INDEX " + tableName + "_index(object_id))";
-	return execute (create);
+	string idxName = "te_idx_" + tableName + "_b";
+
+	return createIndex(tableName, idxName, "band_id");
+}
+
+bool TeDatabase::createRasterGeometry(const string& tableName)
+{
+	if(tableName.empty())
+		return false;
+
+	TeAttributeList attList;
+
+	{TeAttribute attGeomId;
+	attGeomId.rep_.name_ = "geom_id";
+	attGeomId.rep_.type_ = TeUNSIGNEDINT;
+	attGeomId.rep_.isAutoNumber_ = true;
+	attGeomId.rep_.isPrimaryKey_ = true;
+	attGeomId.rep_.null_ = false;
+	attList.push_back(attGeomId);}
+
+	{TeAttribute attObjId;
+	attObjId.rep_.name_ = "object_id";
+	attObjId.rep_.type_ = TeSTRING;
+	attObjId.rep_.numChar_ = 255;
+	attObjId.rep_.null_ = false;
+	attList.push_back(attObjId);}
+
+	{TeAttribute attRasterTable;
+	attRasterTable.rep_.name_ = "raster_table";
+	attRasterTable.rep_.type_ = TeSTRING;
+	attRasterTable.rep_.numChar_ = 255;
+	attRasterTable.rep_.null_ = false;
+	attList.push_back(attRasterTable);}
+
+	{TeAttribute attLutTable;
+	attLutTable.rep_.name_ = "lut_table";
+	attLutTable.rep_.type_ = TeSTRING;
+	attLutTable.rep_.numChar_ = 255;
+	attList.push_back(attLutTable);}
+
+	{TeAttribute attResX;
+	attResX.rep_.name_ = "res_x";
+	attResX.rep_.type_ = TeREAL;
+	attResX.rep_.decimals_ = 15;
+	attResX.rep_.defaultValue_ = "0.0";
+	attList.push_back(attResX);}
+
+	{TeAttribute attResY;
+	attResY.rep_.name_ = "res_y";
+	attResY.rep_.type_ = TeREAL;
+	attResY.rep_.decimals_ = 15;
+	attResY.rep_.defaultValue_ = "0.0";
+	attList.push_back(attResY);}
+
+	{TeAttribute attNumBands;
+	attNumBands.rep_.name_ = "num_bands";
+	attNumBands.rep_.type_ = TeINT;
+	attList.push_back(attNumBands);}
+
+	{TeAttribute attNumCols;
+	attNumCols.rep_.name_ = "num_cols";
+	attNumCols.rep_.type_ = TeINT;
+	attList.push_back(attNumCols);}
+
+	{TeAttribute attNumRows;
+	attNumRows.rep_.name_ = "num_rows";
+	attNumRows.rep_.type_ = TeINT;
+	attList.push_back(attNumRows);}
+
+	{TeAttribute attBlockHeight;
+	attBlockHeight.rep_.name_ = "block_height";
+	attBlockHeight.rep_.type_ = TeINT;
+	attList.push_back(attBlockHeight);}
+
+	{TeAttribute attBlockWidth;
+	attBlockWidth.rep_.name_ = "block_width";
+	attBlockWidth.rep_.type_ = TeINT;
+	attList.push_back(attBlockWidth);}
+
+	{TeAttribute attLowerX;
+	attLowerX.rep_.name_ = "lower_x";
+	attLowerX.rep_.type_ = TeREAL;
+	attLowerX.rep_.decimals_ = 15;
+	attLowerX.rep_.defaultValue_ = "0.0";
+	attList.push_back(attLowerX);}
+
+	{TeAttribute attLowerY;
+	attLowerY.rep_.name_ = "lower_y";
+	attLowerY.rep_.type_ = TeREAL;
+	attLowerY.rep_.decimals_ = 15;
+	attLowerY.rep_.defaultValue_ = "0.0";
+	attList.push_back(attLowerY);}
+
+	{TeAttribute attUpperX;
+	attUpperX.rep_.name_ = "upper_x";
+	attUpperX.rep_.type_ = TeREAL;
+	attUpperX.rep_.decimals_ = 15;
+	attUpperX.rep_.defaultValue_ = "0.0";
+	attList.push_back(attUpperX);}
+
+	{TeAttribute attUpperY;
+	attUpperY.rep_.name_ = "upper_y";
+	attUpperY.rep_.type_ = TeREAL;
+	attUpperY.rep_.decimals_ = 15;
+	attUpperY.rep_.defaultValue_ = "0.0";
+	attList.push_back(attUpperY);}
+
+	{TeAttribute attTilingType;
+	attTilingType.rep_.name_ = "tiling_type";
+	attTilingType.rep_.type_ = TeINT;
+	attList.push_back(attTilingType);}
+
+	if(!createTable(tableName, attList))
+		return  false;
+
+	string idxName = "te_idx_" + tableName;
+
+	return createIndex(tableName,  idxName, "object_id");
 }
 
 bool TeDatabase::createViewTable ()
 {
-	string create = "CREATE TABLE te_view (";
-	create += "view_id			INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,";
-	create += "projection_id	INT(10) UNSIGNED NOT NULL,";
-	create += "name				VARCHAR(255) NOT NULL,";
-	create += "user_name		VARCHAR(255),";
-	create += "visibility		INT(4),";
-	create += "PRIMARY KEY (view_id))";
-	return execute (create);
+	TeAttributeList attList;
+
+	{TeAttribute attViewId;
+	attViewId.rep_.name_ = "view_id";
+	attViewId.rep_.type_ = TeUNSIGNEDINT;
+	attViewId.rep_.isPrimaryKey_ = true;
+	attViewId.rep_.isAutoNumber_ = true;
+	attViewId.rep_.null_ = false;
+	attList.push_back(attViewId);}
+
+	{TeAttribute attProjectionId;
+	attProjectionId.rep_.name_ = "projection_id";
+	attProjectionId.rep_.type_ = TeUNSIGNEDINT;
+	attProjectionId.rep_.null_ = false;
+	attList.push_back(attProjectionId);}
+
+	{TeAttribute attName;
+	attName.rep_.name_ = "name";
+	attName.rep_.type_ = TeSTRING;
+	attName.rep_.numChar_ = 255;
+	attName.rep_.null_ = false;
+	attList.push_back(attName);}
+
+	{TeAttribute attUserName;
+	attUserName.rep_.name_ = "user_name";
+	attUserName.rep_.type_ = TeSTRING;
+	attUserName.rep_.numChar_ = 255;
+	attList.push_back(attUserName);}
+
+	{TeAttribute attVisibility;
+	attVisibility.rep_.name_ = "visibility";
+	attVisibility.rep_.type_ = TeINT;
+	attList.push_back(attVisibility);}
+
+	{TeAttribute attLowerX;
+	attLowerX.rep_.name_ = "lower_x";
+	attLowerX.rep_.type_ = TeREAL;
+	attLowerX.rep_.decimals_ = 15;
+	attList.push_back(attLowerX);}
+
+	{TeAttribute attLowerY;
+	attLowerY.rep_.name_ = "lower_y";
+	attLowerY.rep_.type_ = TeREAL;
+	attLowerY.rep_.decimals_ = 15;
+	attList.push_back(attLowerY);}
+
+	{TeAttribute attUpperX;
+	attUpperX.rep_.name_ = "upper_x";
+	attUpperX.rep_.type_ = TeREAL;
+	attUpperX.rep_.decimals_ = 15;
+	attList.push_back(attUpperX);}
+
+	{TeAttribute attUpperY;
+	attUpperY.rep_.name_ = "upper_y";
+	attUpperY.rep_.type_ = TeREAL;
+	attUpperY.rep_.decimals_ = 15;
+	attList.push_back(attUpperY);}
+
+	{TeAttribute attCurrentTheme;
+	attCurrentTheme.rep_.name_ = "current_theme";
+	attCurrentTheme.rep_.type_ = TeINT;
+	attList.push_back(attCurrentTheme);}
+
+	if(!createTable("te_view", attList))
+		return false;
+
+	string idxName = "te_idx_view_projid";
+
+	if(!createIndex("te_view", idxName, "projection_id"))
+		return false;
+
+	idxName = "te_idx_view_name";
+
+	if(!createIndex("te_view", idxName, "name"))
+		return false;
+
+	idxName = "te_idx_view_user_name";
+
+	return createIndex("te_view", idxName, "user_name");
 }
 
 bool TeDatabase::createThemeTable ()
 {
-	string create = "CREATE TABLE te_theme (";
-	create += " theme_id			INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,";
-	create += " layer_id			INT(10) UNSIGNED,";
-	create += " view_id				INT(10) UNSIGNED NOT NULL,";
-	create += " name				VARCHAR(255) NOT NULL,";
-	create += " parent_id			INT(10) UNSIGNED NOT NULL,";
-	create += " priority			INT(10) UNSIGNED NOT NULL,";
-	create += " node_type			INT(4) UNSIGNED NOT NULL,";
-	create += " min_scale			DOUBLE(24,15),";
-	create += " max_scale			DOUBLE(24,15),";
-	create += " generate_attribute_where	VARCHAR(255),";
-	create += " generate_spatial_where		VARCHAR(255),";
-	create += " generate_temporal_where		VARCHAR(255),";
-	create += " collection_table			VARCHAR(255),";
-	create += " visible_rep					INT(10) UNSIGNED,";
-	create += " enable_visibility			INT(10) UNSIGNED,";
-	create += " PRIMARY KEY (theme_id),";
-	create += " INDEX view_id_idx(view_id))";
-	return execute (create);
+	TeAttributeList attList;
+
+	{TeAttribute attThemeId;
+	attThemeId.rep_.name_ = "theme_id";
+	attThemeId.rep_.type_ = TeUNSIGNEDINT;
+	attThemeId.rep_.isPrimaryKey_ = true;
+	attThemeId.rep_.isAutoNumber_ = true;
+	attThemeId.rep_.null_ = false;
+	attList.push_back(attThemeId);}
+
+	{TeAttribute attLayerId;
+	attLayerId.rep_.name_ = "layer_id";
+	attLayerId.rep_.type_ = TeUNSIGNEDINT;
+	attList.push_back(attLayerId);}
+
+	{TeAttribute attViewId;
+	attViewId.rep_.name_ = "view_id";
+	attViewId.rep_.type_ = TeUNSIGNEDINT;
+	attViewId.rep_.null_ = false;
+	attList.push_back(attViewId);}
+
+	{TeAttribute attName;
+	attName.rep_.name_ = "name";
+	attName.rep_.type_ = TeSTRING;
+	attName.rep_.numChar_ = 255;
+	attName.rep_.null_ = false;
+	attList.push_back(attName);}
+
+	{TeAttribute attParentId;
+	attParentId.rep_.name_ = "parent_id";
+	attParentId.rep_.type_ = TeUNSIGNEDINT;
+	attParentId.rep_.null_ = false;
+	attList.push_back(attParentId);}
+
+	{TeAttribute attPriority;
+	attPriority.rep_.name_ = "priority";
+	attPriority.rep_.type_ = TeUNSIGNEDINT;
+	attPriority.rep_.null_ = false;
+	attList.push_back(attPriority);}
+
+	{TeAttribute attNodeType;
+	attNodeType.rep_.name_ = "node_type";
+	attNodeType.rep_.type_ = TeUNSIGNEDINT;
+	attNodeType.rep_.null_ = false;
+	attList.push_back(attNodeType);}
+
+	{TeAttribute attMinScale;
+	attMinScale.rep_.name_ = "min_scale";
+	attMinScale.rep_.type_ = TeREAL;
+	attMinScale.rep_.decimals_ = 15;
+	attList.push_back(attMinScale);}
+
+	{TeAttribute attMaxScale;
+	attMaxScale.rep_.name_ = "max_scale";
+	attMaxScale.rep_.type_ = TeREAL;
+	attMaxScale.rep_.decimals_ = 15;
+	attList.push_back(attMaxScale);}
+
+	{TeAttribute attGenAttWhere;
+	attGenAttWhere.rep_.name_ = "generate_attribute_where";
+	attGenAttWhere.rep_.type_ = TeSTRING;
+	attGenAttWhere.rep_.numChar_ = 0;
+	attList.push_back(attGenAttWhere);}
+
+	{TeAttribute attGenSpatWhere;
+	attGenSpatWhere.rep_.name_ = "generate_spatial_where";
+	attGenSpatWhere.rep_.type_ = TeSTRING;
+	attGenSpatWhere.rep_.numChar_ = 0;
+	attList.push_back(attGenSpatWhere);}
+
+	{TeAttribute attGenTempWhere;
+	attGenTempWhere.rep_.name_ = "generate_temporal_where";
+	attGenTempWhere.rep_.type_ = TeSTRING;
+	attGenTempWhere.rep_.numChar_ = 0;
+	attList.push_back(attGenTempWhere);}
+
+	{TeAttribute attCollectionT;
+	attCollectionT.rep_.name_ = "collection_table";
+	attCollectionT.rep_.type_ = TeSTRING;
+	attCollectionT.rep_.numChar_ = 255;
+	attList.push_back(attCollectionT);}
+
+	{TeAttribute attVisiRep;
+	attVisiRep.rep_.name_ = "visible_rep";
+	attVisiRep.rep_.type_ = TeINT;
+	attList.push_back(attVisiRep);}
+
+	{TeAttribute attEnableVis;
+	attEnableVis.rep_.name_ = "enable_visibility";
+	attEnableVis.rep_.type_ = TeINT;
+	attList.push_back(attEnableVis);}
+
+	{TeAttribute attLowerX;
+	attLowerX.rep_.name_ = "lower_x";
+	attLowerX.rep_.type_ = TeREAL;
+	attLowerX.rep_.decimals_ = 15;
+	attLowerX.rep_.defaultValue_ = "0.0";
+	attList.push_back(attLowerX);}
+
+	{TeAttribute attLowerY;
+	attLowerY.rep_.name_ = "lower_y";
+	attLowerY.rep_.type_ = TeREAL;
+	attLowerY.rep_.decimals_ = 15;
+	attLowerY.rep_.defaultValue_ = "0.0";
+	attList.push_back(attLowerY);}
+
+	{TeAttribute attUpperX;
+	attUpperX.rep_.name_ = "upper_x";
+	attUpperX.rep_.type_ = TeREAL;
+	attUpperX.rep_.decimals_ = 15;
+	attUpperX.rep_.defaultValue_ = "0.0";
+	attList.push_back(attUpperX);}
+
+	{TeAttribute attUpperY;
+	attUpperY.rep_.name_ = "upper_y";
+	attUpperY.rep_.type_ = TeREAL;
+	attUpperY.rep_.decimals_ = 15;
+	attUpperY.rep_.defaultValue_ = "0.0";
+	attList.push_back(attUpperY);}
+
+	{TeAttribute attCreationTime;
+	attCreationTime.rep_.name_ = "creation_time";
+	attCreationTime.rep_.type_ = TeDATETIME;
+	attList.push_back(attCreationTime);}
+
+	if(!createTable("te_theme", attList))
+		return false;	
+
+	string idxName = "te_idx_theme_view_id";
+
+	if(!createIndex("te_theme", idxName, "view_id"))
+		return false;
+
+	idxName = "te_idx_theme_name";
+
+	if(!createIndex("te_theme", idxName, "name"))
+		return false;
+
+	idxName = "te_idx_theme_layer_id";
+
+	return createIndex("te_theme", idxName, "layer_id");
 }
 
 bool TeDatabase::createGroupingTable()
 {
-	string create = "CREATE TABLE te_grouping (";
-	create += " theme_id			INT(10) UNSIGNED NOT NULL,";
-	create += " grouping_number		INT(10) UNSIGNED,";
-	create += " grouping_attr		VARCHAR(255),";
-	create += " grouping_attr_type	INT(4) UNSIGNED,";
-	create += " grouping_mode		INT(4) UNSIGNED,";
-	create += " grouping_norm_attr	VARCHAR(255),";
-	create += " grouping_std_dev	DOUBLE(24,15) DEFAULT '0.0',";
-	create += " grouping_precision	INT(10) UNSIGNED,";
-	create += " grouping_function	VARCHAR(20),";
-	create += " PRIMARY KEY (theme_id))";
-	return execute (create);
+	TeAttributeList attList;
+
+	{TeAttribute attThemeId;
+	attThemeId.rep_.name_ = "theme_id";
+	attThemeId.rep_.type_ = TeUNSIGNEDINT;
+	attThemeId.rep_.isPrimaryKey_ = true;
+	attThemeId.rep_.null_ = false;
+	attList.push_back(attThemeId);}
+
+	{TeAttribute attGNumber;
+	attGNumber.rep_.name_ = "grouping_number";
+	attGNumber.rep_.type_ = TeUNSIGNEDINT;
+	attList.push_back(attGNumber);}
+
+	{TeAttribute attGAttr;
+	attGAttr.rep_.name_ = "grouping_attr";
+	attGAttr.rep_.type_ = TeSTRING;
+	attGAttr.rep_.numChar_ = 255;
+	attList.push_back(attGAttr);}
+
+	{TeAttribute attGAttrType;
+	attGAttrType.rep_.name_ = "grouping_attr_type";
+	attGAttrType.rep_.type_ = TeUNSIGNEDINT;
+	attList.push_back(attGAttrType);}
+
+	{TeAttribute attGMode;
+	attGMode.rep_.name_ = "grouping_mode";
+	attGMode.rep_.type_ = TeUNSIGNEDINT;
+	attList.push_back(attGMode);}
+
+	{TeAttribute attGNormAttr;
+	attGNormAttr.rep_.name_ = "grouping_norm_attr";
+	attGNormAttr.rep_.type_ = TeSTRING;
+	attGNormAttr.rep_.numChar_ = 255;
+	attList.push_back(attGNormAttr);}
+
+	{TeAttribute attGStdDev;
+	attGStdDev.rep_.name_ = "grouping_std_dev";
+	attGStdDev.rep_.type_ = TeREAL;
+	attGStdDev.rep_.decimals_ = 15;
+	attGStdDev.rep_.defaultValue_ = "0.0";
+	attList.push_back(attGStdDev);}
+
+	{TeAttribute attGPrec;
+	attGPrec.rep_.name_ = "grouping_precision";
+	attGPrec.rep_.type_ = TeUNSIGNEDINT;
+	attList.push_back(attGPrec);}
+
+	{TeAttribute attGFunc;
+	attGFunc.rep_.name_ = "grouping_function";
+	attGFunc.rep_.type_ = TeSTRING;
+	attGFunc.rep_.numChar_ = 20;
+	attList.push_back(attGFunc);}
+
+	{TeAttribute attGChronon;
+	attGChronon.rep_.name_ = "grouping_chronon";
+	attGChronon.rep_.type_ = TeUNSIGNEDINT;
+	attList.push_back(attGChronon);}
+
+	return createTable("te_grouping", attList);
 }
 
 bool TeDatabase::createThemeTablesTable()
 {
-	string create = "CREATE TABLE te_theme_table  (";
-	create += " theme_table_id		INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,";
-	create += " theme_id			INT(10) UNSIGNED NOT NULL,";
-	create += " table_id			INT(10) UNSIGNED NOT NULL,";
-	create += " relation_id			INT(10) UNSIGNED,";
-	create += " table_order			INT(10) UNSIGNED,";
-	create += " PRIMARY KEY (theme_table_id), ";
-	create += " INDEX theme_table_index(theme_id))";
+	TeAttributeList attList;
+
+	{TeAttribute attThemeTableId;
+	attThemeTableId.rep_.name_ = "theme_table_id";
+	attThemeTableId.rep_.type_ = TeUNSIGNEDINT;
+	attThemeTableId.rep_.isPrimaryKey_ = true;
+	attThemeTableId.rep_.isAutoNumber_ = true;
+	attThemeTableId.rep_.null_ = false;
+	attList.push_back(attThemeTableId);}
+
+	{TeAttribute attThemeId;
+	attThemeId.rep_.name_ = "theme_id";
+	attThemeId.rep_.type_ = TeUNSIGNEDINT;
+	attThemeId.rep_.null_ = false;
+	attList.push_back(attThemeId);}
+
+	{TeAttribute attTableId;
+	attTableId.rep_.name_ = "table_id";
+	attTableId.rep_.type_ = TeUNSIGNEDINT;
+	attTableId.rep_.null_ = false;
+	attList.push_back(attTableId);}
 
-	return execute (create);
+	{TeAttribute attRelationId;
+	attRelationId.rep_.name_ = "relation_id";
+	attRelationId.rep_.type_ = TeUNSIGNEDINT;
+	attList.push_back(attRelationId);}
+
+	{TeAttribute attTableOrderId;
+	attTableOrderId.rep_.name_ = "table_order";
+	attTableOrderId.rep_.type_ = TeUNSIGNEDINT;
+	attList.push_back(attTableOrderId);}
+
+	if(!createTable("te_theme_table", attList))
+		return false;
+
+	string idxName = "te_idx_theme_table_id";
+
+	if(!createIndex("te_theme_table", idxName, "table_id"))
+		return false;
+
+	idxName = "te_idx_theme_relat_id";
+
+	if(!createIndex("te_theme_table", idxName, "relation_id"))
+		return false;
+
+	idxName = "te_idx_themetable_theme";
+
+	return createIndex("te_theme_table", idxName, "theme_id");
 }
 
 bool TeDatabase::createLegendTable ()
 {
-	string create = "CREATE TABLE te_legend (";
-	create += " legend_id		INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,";
-	create += " theme_id		INT(10) UNSIGNED NOT NULL,";
-	create += " group_id		INT(10) ,";
-	create += " num_objs		INT(10) UNSIGNED,";
-	create += " lower_value		VARCHAR(255),";
-	create += " upper_value		VARCHAR(255),";
-	create += " label			VARCHAR(255), ";
-	create += " PRIMARY KEY (legend_id),";
-	create += " INDEX legend_index (theme_id))";
-	return execute (create);
-}
+	TeAttributeList attList;
+
+	{TeAttribute attLegendId;
+	attLegendId.rep_.name_ = "legend_id";
+	attLegendId.rep_.type_ = TeUNSIGNEDINT;
+	attLegendId.rep_.isPrimaryKey_ = true;
+	attLegendId.rep_.isAutoNumber_ = true;
+	attLegendId.rep_.null_ = false;
+	attList.push_back(attLegendId);	}
+
+	{TeAttribute attThemeId;
+	attThemeId.rep_.name_ = "theme_id";
+	attThemeId.rep_.type_ = TeUNSIGNEDINT;
+	attThemeId.rep_.null_ = false;
+	attList.push_back(attThemeId);}
+
+	{TeAttribute attGId;
+	attGId.rep_.name_ = "group_id";
+	attGId.rep_.type_ = TeINT;
+	attList.push_back(attGId);}
+
+	{TeAttribute attNObjs;
+	attNObjs.rep_.name_ = "num_objs";
+	attNObjs.rep_.type_ = TeUNSIGNEDINT;
+	attList.push_back(attNObjs);}
+
+	{TeAttribute attLValue;
+	attLValue.rep_.name_ = "lower_value";
+	attLValue.rep_.type_ = TeSTRING;
+	attLValue.rep_.numChar_ = 255;
+	attList.push_back(attLValue);}
+
+	{TeAttribute attUValue;
+	attUValue.rep_.name_ = "upper_value";
+	attUValue.rep_.type_ = TeSTRING;
+	attUValue.rep_.numChar_ = 255;
+	attList.push_back(attUValue);}
+
+	{TeAttribute attLabel;
+	attLabel.rep_.name_ = "label";
+	attLabel.rep_.type_ = TeSTRING;
+	attLabel.rep_.numChar_ = 255;
+	attList.push_back(attLabel);}
+	
+	if(!createTable("te_legend", attList))
+		return false;
 
+	string idxName = "te_idx_legend_theme";
+
+	return createIndex("te_legend", idxName, "theme_id");
+}
 
 bool TeDatabase::createVisualTable()
 {
-	string create = "CREATE TABLE te_visual (";
-	create += " legend_id		INT(10) UNSIGNED NOT NULL,";
-	create += " geom_type		INT(4) UNSIGNED NOT NULL,";
-	create += " lib_name		VARCHAR(255), ";
-	create += " symb_id			INT(10), ";
-	create += " red				INT(4) UNSIGNED,";
-	create += " green			INT(4) UNSIGNED,";
-	create += " blue			INT(4) UNSIGNED,";
-	create += " transparency	INT(4) UNSIGNED,";
-	create += " width			INT(4) UNSIGNED,";
-	create += " contour_lib_name	VARCHAR(255), ";
-	create += " contour_symb_id		INT(10), ";
-	create += " contour_red			INT(4) UNSIGNED,";
-	create += " contour_green		INT(4) UNSIGNED,";
-	create += " contour_blue		INT(4) UNSIGNED,";
-	create += " contour_transp		INT(4) UNSIGNED,";
-	create += " contour_width		INT(10) UNSIGNED,";
-	create += " size_value			INT(10) UNSIGNED,";
-	create += " pt_angle			INT(4) UNSIGNED,";
-	create += " family				VARCHAR(255),";
-	create += " bold				INT(4) UNSIGNED,";
-	create += " italic				INT(4) UNSIGNED,";
-	create += " alignment_vert		DOUBLE(24,15),";
-	create += " alignment_horiz		DOUBLE(24,15),";
-	create += " tab_size			INT(4) UNSIGNED,";
-	create += " line_space			INT(4) UNSIGNED,";
-	create += " fixed_size			INT(4) UNSIGNED,";
-	create += " PRIMARY KEY (legend_id, geom_type))";
-	return execute (create);
+	TeAttributeList attList;
+
+	{TeAttribute attLegendId;
+	attLegendId.rep_.name_ = "legend_id";
+	attLegendId.rep_.type_ = TeUNSIGNEDINT;
+	attLegendId.rep_.isPrimaryKey_ = true;
+	attLegendId.rep_.null_ = false;
+	attList.push_back(attLegendId);}
+
+	{TeAttribute attGeomType;
+	attGeomType.rep_.name_ = "geom_type";
+	attGeomType.rep_.type_ = TeUNSIGNEDINT;
+	attGeomType.rep_.isPrimaryKey_ = true;
+	attGeomType.rep_.null_ = false;
+	attList.push_back(attGeomType);}
+
+	{TeAttribute attSymbId;
+	attSymbId.rep_.name_ = "symb_id";
+	attSymbId.rep_.type_ = TeINT;
+	attList.push_back(attSymbId);}
+
+	{TeAttribute attRed;
+	attRed.rep_.name_ = "red";
+	attRed.rep_.type_ = TeUNSIGNEDINT;
+	attList.push_back(attRed);}
+
+	{TeAttribute attGreen;
+	attGreen.rep_.name_ = "green";
+	attGreen.rep_.type_ = TeUNSIGNEDINT;
+	attList.push_back(attGreen);}
+
+	{TeAttribute attBlue;
+	attBlue.rep_.name_ = "blue";
+	attBlue.rep_.type_ = TeUNSIGNEDINT;
+	attList.push_back(attBlue);}
+
+	{TeAttribute attTransp;
+	attTransp.rep_.name_ = "transparency";
+	attTransp.rep_.type_ = TeUNSIGNEDINT;
+	attList.push_back(attTransp);}
+
+	{TeAttribute attWidth;
+	attWidth.rep_.name_ = "width";
+	attWidth.rep_.type_ = TeUNSIGNEDINT;
+	attList.push_back(attWidth);}
+
+	{TeAttribute attContourSymbId;
+	attContourSymbId.rep_.name_ = "contour_symb_id";
+	attContourSymbId.rep_.type_ = TeINT;
+	attList.push_back(attContourSymbId);}
+
+	{TeAttribute attContourRed;
+	attContourRed.rep_.name_ = "contour_red";
+	attContourRed.rep_.type_ = TeUNSIGNEDINT;
+	attList.push_back(attContourRed);}
+
+	{TeAttribute attContourGreen;
+	attContourGreen.rep_.name_ = "contour_green";
+	attContourGreen.rep_.type_ = TeUNSIGNEDINT;
+	attList.push_back(attContourGreen);}
+
+	{TeAttribute attContourBlue;
+	attContourBlue.rep_.name_ = "contour_blue";
+	attContourBlue.rep_.type_ = TeUNSIGNEDINT;
+	attList.push_back(attContourBlue);}
+
+	{TeAttribute attContourTransp;
+	attContourTransp.rep_.name_ = "contour_transp";
+	attContourTransp.rep_.type_ = TeUNSIGNEDINT;
+	attList.push_back(attContourTransp);}
+
+	{TeAttribute attContourWidth;
+	attContourWidth.rep_.name_ = "contour_width";
+	attContourWidth.rep_.type_ = TeUNSIGNEDINT;
+	attList.push_back(attContourWidth);}
+
+	{TeAttribute attSizeValue;
+	attSizeValue.rep_.name_ = "size_value";
+	attSizeValue.rep_.type_ = TeUNSIGNEDINT;
+	attList.push_back(attSizeValue);}
+
+	{TeAttribute attPtAngle;
+	attPtAngle.rep_.name_ = "pt_angle";
+	attPtAngle.rep_.type_ = TeUNSIGNEDINT;
+	attList.push_back(attPtAngle);}
+
+	{TeAttribute attFamily;
+	attFamily.rep_.name_ = "family";
+	attFamily.rep_.type_ = TeSTRING;
+	attFamily.rep_.numChar_ = 255;
+	attList.push_back(attFamily);}
+
+	{TeAttribute attBold;
+	attBold.rep_.name_ = "bold";
+	attBold.rep_.type_ = TeUNSIGNEDINT;
+	attList.push_back(attBold);}
+
+	{TeAttribute attItalic;
+	attItalic.rep_.name_ = "italic";
+	attItalic.rep_.type_ = TeUNSIGNEDINT;
+	attList.push_back(attItalic);}
+
+	{TeAttribute attAlignVert;
+	attAlignVert.rep_.name_ = "alignment_vert";
+	attAlignVert.rep_.type_ = TeREAL;
+	attAlignVert.rep_.decimals_ = 15;
+	attList.push_back(attAlignVert);}
+
+	{TeAttribute attAlignHoriz;
+	attAlignHoriz.rep_.name_ = "alignment_horiz";
+	attAlignHoriz.rep_.type_ = TeREAL;
+	attAlignHoriz.rep_.decimals_ = 15;
+	attList.push_back(attAlignHoriz);}
+
+	{TeAttribute attTabSize;
+	attTabSize.rep_.name_ = "tab_size";
+	attTabSize.rep_.type_ = TeUNSIGNEDINT;
+	attList.push_back(attTabSize);}
+
+	{TeAttribute attLineSpace;
+	attLineSpace.rep_.name_ = "line_space";
+	attLineSpace.rep_.type_ = TeUNSIGNEDINT;
+	attList.push_back(attLineSpace);}
+
+	{TeAttribute attFixedSize;
+	attFixedSize.rep_.name_ = "fixed_size";
+	attFixedSize.rep_.type_ = TeUNSIGNEDINT;
+	attList.push_back(attFixedSize);}
+
+	return createTable("te_visual", attList);
 }
 
+
 bool TeDatabase::createVisualRasterTable()
-{
-	string create = "CREATE TABLE te_visual_raster (";
-	create += " theme_id		INT(10) UNSIGNED NOT NULL,";
-	create += " band_in			INT(4) UNSIGNED NOT NULL,";
-	create += " band_out		INT(4) UNSIGNED, ";
-	create += " transf_type		INT(4), ";
-	create += " param1			DOUBLE(24,15),";
-	create += " param2			DOUBLE(24,15),";
-	create += " lut_table		VARCHAR(255), ";
-	create += " PRIMARY KEY (theme_id, band_in))";
-	return execute (create);
+{	
+	TeAttributeList attList;
+
+	{TeAttribute attThemeId;
+	attThemeId.rep_.name_ = "theme_id";
+	attThemeId.rep_.type_ = TeUNSIGNEDINT;
+	attThemeId.rep_.isPrimaryKey_ = true;
+	attThemeId.rep_.null_ = false;
+	attList.push_back(attThemeId);}
+
+	{TeAttribute attBandIn;
+	attBandIn.rep_.name_ = "band_in";
+	attBandIn.rep_.type_ = TeUNSIGNEDINT;
+	attBandIn.rep_.isPrimaryKey_ = true;
+	attBandIn.rep_.null_ = false;
+	attList.push_back(attBandIn);}
+
+	{TeAttribute attBandOut;
+	attBandOut.rep_.name_ = "band_out";
+	attBandOut.rep_.type_ = TeUNSIGNEDINT;
+	attList.push_back(attBandOut);}
+
+	{TeAttribute attTransfType;
+	attTransfType.rep_.name_ = "transf_type";
+	attTransfType.rep_.type_ = TeINT;
+	attList.push_back(attTransfType);}
+
+	{TeAttribute attParam1;
+	attParam1.rep_.name_ = "param1";
+	attParam1.rep_.type_ = TeREAL;
+	attParam1.rep_.decimals_ = 15;
+	attList.push_back(attParam1);}
+
+	{TeAttribute attParam2;
+	attParam2.rep_.name_ = "param2";
+	attParam2.rep_.type_ = TeREAL;
+	attParam2.rep_.decimals_ = 15;
+	attList.push_back(attParam2);}
+
+	{TeAttribute attLutTable;
+	attLutTable.rep_.name_ = "lut_table";
+	attLutTable.rep_.type_ = TeSTRING;
+	attLutTable.rep_.numChar_ = 255;
+	attList.push_back(attLutTable);}
+
+	return createTable("te_visual_raster", attList);
 }
 
 bool TeDatabase::insertVisual (TeLegendEntry *legend)
 {
-	TeGeomRepVisualMap mapVis = legend->getVisualMap();
-	TeGeomRepVisualMap::iterator it =  mapVis.begin();
-	while ( it != mapVis.end())
+	TeGeomRepVisualMap::iterator it = legend->getVisualMap().begin();
+	while ( it != legend->getVisualMap().end())
 	{ 
-		TeGeomRep rep = it->first;
-		TeVisual vis = it->second;
-		
-		string style, contourStyle, sizeValue, width;
+		string style("0"), contourStyle("0"), sizeValue("0"), width("0");
 
-		if(rep == TePOLYGONS || rep == TeCELLS)
+		if(it->first == TePOLYGONS || it->first == TeCELLS)
 		{
-			sizeValue = Te2String(0);
-			contourStyle = Te2String(vis.contourStyle());
-			width =  Te2String(0);
-			style = Te2String(vis.style());
+			contourStyle = Te2String(it->second->contourStyle());
+			style = Te2String(it->second->style());
 		}
-		else if(rep == TeLINES)
+		else if(it->first == TeLINES)
 		{
-			sizeValue = Te2String(0);
-			contourStyle = Te2String(0);
-			width = Te2String(vis.width());
-			style = Te2String(vis.style());
+			width = Te2String(it->second->width());
+			style = Te2String(it->second->style());
 		}
-		else if(rep == TePOINTS)
+		else if(it->first == TePOINTS)
 		{
-			sizeValue = Te2String(vis.size());
-			contourStyle = Te2String(0);
-			width = Te2String(0);
-			style = Te2String(vis.style());
+			sizeValue = Te2String(it->second->size());
+			style = Te2String(it->second->style());
 		}
-		else if(rep == TeTEXT)
+		else if(it->first == TeTEXT)
 		{
-			sizeValue = Te2String(vis.size());
-			contourStyle = Te2String(0);
-			width = Te2String(0);
-			style = Te2String(0);
+			sizeValue = Te2String(it->second->size());
 		}
 		
 		string insert = "INSERT INTO te_visual(legend_id, geom_type, ";
-		insert += "lib_name, symb_id, "; 
+		insert += " symb_id, "; 
 		insert += "red, green, blue, transparency, width, ";
-		insert += "contour_lib_name, contour_symb_id, "; 
+		insert += " contour_symb_id, "; 
 		insert += "contour_red, contour_green,";
 		insert += "contour_blue, contour_transp, contour_width, size_value,";
 		insert += "pt_angle, family, bold, italic, ";
 		insert += "alignment_vert, alignment_horiz, tab_size, line_space, fixed_size) ";
 		insert += " VALUES (";	
 		insert += Te2String(legend->id()) + ", ";
-		insert += Te2String(rep)+ ", ";
-
-		TeColor cor = vis.color();				// filling color
-		TeColor contourCor = vis.contourColor();// contour color
-		
-		insert += "'"+ vis.libName() + "', ";
+		insert += Te2String(it->first)+ ", ";
 		insert += style + ", ";
-		insert += Te2String(cor.red_) + ", ";
-		insert += Te2String(cor.green_) + ", ";
-		insert += Te2String(cor.blue_) + ", ";
-		insert += Te2String(vis.transparency()) + ", ";
+		insert += Te2String(it->second->color().red_) + ", ";
+		insert += Te2String(it->second->color().green_) + ", ";
+		insert += Te2String(it->second->color().blue_) + ", ";
+		insert += Te2String(it->second->transparency()) + ", ";
 		insert += width +",";
-
-		insert += "'"+ vis.contourLibName() + "', ";
 		insert += contourStyle + ", ";
-		insert += Te2String(contourCor.red_) + ", ";
-		insert += Te2String(contourCor.green_) + ", ";
-		insert += Te2String(contourCor.blue_) + ", ";
-		insert += Te2String(vis.contourTransparency()) + ", ";	
-		insert += Te2String(vis.contourWidth()) + ", ";
+		insert += Te2String(it->second->contourColor().red_) + ", ";
+		insert += Te2String(it->second->contourColor().green_) + ", ";
+		insert += Te2String(it->second->contourColor().blue_) + ", ";
+		insert += Te2String(it->second->contourTransparency()) + ", ";	
+		insert += Te2String(it->second->contourWidth()) + ", ";
 
 		insert += sizeValue +",";
-		insert += Te2String(vis.ptAngle()) +", ";
+		insert += Te2String(it->second->ptAngle()) +", ";
 
-		insert += "'" + vis.family() + "', ";
-		if (vis.bold())
+		insert += "'" + it->second->family() + "', ";
+		if (it->second->bold())
 			insert += "1, ";
 		else
 			insert += "0, ";
-		if (vis.italic())
+		if (it->second->italic())
 			insert += "1, ";
 		else
 			insert += "0, ";
-		insert += Te2String(vis.alignmentVert()) + ",";
-		insert += Te2String(vis.alignmentHoriz()) + ",";
-		insert += Te2String(vis.tabSize()) + ",";
-		insert += Te2String(vis.lineSpace()) +",";
-		if (vis.fixedSize())
+		insert += Te2String(it->second->alignmentVert()) + ",";
+		insert += Te2String(it->second->alignmentHoriz()) + ",";
+		insert += Te2String(it->second->tabSize()) + ",";
+		insert += Te2String(it->second->lineSpace()) +",";
+		if (it->second->fixedSize())
 			insert += "1 ";
 		else
 			insert += "0";			
-		insert += ")";
+		insert += ")";	
 
 		if (!execute(insert))
 			return false;
@@ -929,91 +2040,305 @@ bool TeDatabase::insertVisual (TeLegendEntry *legend)
 
 bool TeDatabase::createCollectionTable(const string& tableName)
 {
-	string create = "CREATE TABLE " + tableName + " (";
-	create += " c_object_id			VARCHAR(255) NOT NULL, ";
-	create += " c_legend_id			INT(10), ";
-	create += " label_x				DOUBLE(24,9), ";
-	create += " label_y				DOUBLE(24,9), ";
-	create += " c_legend_own		INT(10), ";
-	create += " c_object_status		INT(10), ";
-	create += " PRIMARY KEY (c_object_id))";
-	return execute (create);
-}
+	if(tableName.empty())
+		return false;
 
-bool TeDatabase::createCellGeometry (const string& table)
-{
-	string q ="CREATE TABLE " + table +"(";
-	q += "geom_id				INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,";
-	q += "object_id				VARCHAR(255) NOT NULL ,";
-	q += "lower_x				double(24,15) NOT NULL ,";
-	q += "lower_y				double(24,15) NOT NULL ,";
-	q += "upper_x				double(24,15) NOT NULL ,";
-	q += "upper_y				double(24,15) NOT NULL ,";
-	q += "col_number			INT(10) NOT NULL ,";
-	q += "row_number			INT(10) NOT NULL ,";
-	q += "PRIMARY KEY (geom_id),";
-	q += "INDEX (object_id),";
-	q += "INDEX box_idx (lower_x, lower_y,upper_x, upper_y),";
-	q += "INDEX lc (row_number, col_number))";
-	return execute(q);
+	TeAttributeList attList;
+
+	{TeAttribute attCObjId;
+	attCObjId.rep_.name_ = "c_object_id";
+	attCObjId.rep_.type_ = TeSTRING;
+	attCObjId.rep_.numChar_ = 255;
+	attCObjId.rep_.isPrimaryKey_ = true;
+	attCObjId.rep_.null_ = false;
+	attList.push_back(attCObjId);}
+
+	{TeAttribute attCLegendId;
+	attCLegendId.rep_.name_ = "c_legend_id";
+	attCLegendId.rep_.type_ = TeINT;
+	attList.push_back(attCLegendId);}
+
+	{TeAttribute attLabelX;
+	attLabelX.rep_.name_ = "label_x";
+	attLabelX.rep_.type_ = TeREAL;
+	attLabelX.rep_.decimals_ = 15;
+	attList.push_back(attLabelX);}
+
+	{TeAttribute attLabelY;
+	attLabelY.rep_.name_ = "label_y";
+	attLabelY.rep_.type_ = TeREAL;
+	attLabelY.rep_.decimals_ = 15;
+	attList.push_back(attLabelY);}
+
+	{TeAttribute attCLegendOwn;
+	attCLegendOwn.rep_.name_ = "c_legend_own";
+	attCLegendOwn.rep_.type_ = TeINT;
+	attList.push_back(attCLegendOwn);}
+
+	{TeAttribute attCObjStatus;
+	attCObjStatus.rep_.name_ = "c_object_status";
+	attCObjStatus.rep_.type_ = TeINT;
+	attList.push_back(attCObjStatus);}
+
+	if(!createTable(tableName, attList))
+		return false;
+
+	string collectionId;
+	unsigned int pos = tableName.rfind("_");
+	if ( (pos != std::string::npos ) && (pos+1<tableName.size()) )
+       collectionId = tableName.substr(pos+1); 
+
+	string idxName = "te_idx_c" + collectionId  + "_clegid";
+
+	if(!createIndex(tableName, idxName, "c_legend_id"))
+		return false;
+
+	idxName = "te_idx_c" + collectionId + "_clegown";
+
+	return createIndex(tableName, idxName, "c_legend_own");
+}
+
+bool TeDatabase::createCellGeometry (const string& table)
+{
+	if(table.empty())
+		return false;
+
+	TeAttributeList attList;
+
+	{TeAttribute attGeomId;
+	attGeomId.rep_.name_ = "geom_id";
+	attGeomId.rep_.type_ = TeUNSIGNEDINT;
+	attGeomId.rep_.isAutoNumber_ = true;
+	attGeomId.rep_.isPrimaryKey_ = true;
+	attGeomId.rep_.null_ = false;
+	attList.push_back(attGeomId);}
+
+	{TeAttribute attObjId;
+	attObjId.rep_.name_ = "object_id";
+	attObjId.rep_.type_ = TeSTRING;
+	attObjId.rep_.numChar_ = 255;
+	attObjId.rep_.null_ = false;
+	attList.push_back(attObjId);}
+
+	{TeAttribute attSpatial;
+	attSpatial.rep_.name_ = "spatial_data";
+	attSpatial.rep_.type_ = TeCELLTYPE;
+	attList.push_back(attSpatial);}
+
+	if(!createTable(table, attList))
+		return false;
+
+	string idxName = "te_idx_"  + table + "obj";
+
+	if(!createIndex(table, idxName, "object_id"))
+		return false;
+
+	idxName = "te_idx_" + table + "_lc";
+
+	return createIndex(table, idxName, "row_number, col_number");
 }
 
 bool TeDatabase::createTextGeometry(const string& table)
 {
-	string q ="CREATE TABLE " + table +"(";
-	q += " geom_id			INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,";
-	q += " object_id		VARCHAR(255) NOT NULL ,";
-	q += " x				DOUBLE(24,9) DEFAULT '0.0',";
-	q += " y				DOUBLE(24,9) DEFAULT '0.0',";
-	q += " text_value		VARCHAR(255),";
-	q += " angle			DOUBLE(24,9) DEFAULT '0.0',";
-	q += " height			DOUBLE(24,9) DEFAULT '0.0',";
-	q += " alignment_vert	DOUBLE(24,9),";
-	q += " alignment_horiz	DOUBLE(24,9),";
-	q += "PRIMARY KEY (geom_id),";
-	q += "INDEX (object_id),";
-	q += "INDEX pos_idx(x,y))";
-	return execute(q);
+	if(table.empty())
+		return false;
+
+	TeAttributeList attList;
+
+	{TeAttribute attGeomId;
+	attGeomId.rep_.name_ = "geom_id";
+	attGeomId.rep_.type_ = TeUNSIGNEDINT;
+	attGeomId.rep_.isAutoNumber_ = true;
+	attGeomId.rep_.isPrimaryKey_ = true;
+	attGeomId.rep_.null_ = false;
+	attList.push_back(attGeomId);}
+
+	{TeAttribute attObjId;
+	attObjId.rep_.name_ = "object_id";
+	attObjId.rep_.type_ = TeSTRING;
+	attObjId.rep_.numChar_ = 255;
+	attObjId.rep_.null_ = false;
+	attList.push_back(attObjId);}
+
+	{TeAttribute attX;
+	attX.rep_.name_ = "x";
+	attX.rep_.type_ = TeREAL;
+	attX.rep_.decimals_ = 15;
+	attX.rep_.defaultValue_ = "0.0";
+	attList.push_back(attX);}
+
+	{TeAttribute attY;
+	attY.rep_.name_ = "y";
+	attY.rep_.type_ = TeREAL;
+	attY.rep_.decimals_ = 15;
+	attY.rep_.defaultValue_ = "0.0";
+	attList.push_back(attY);}
+
+	{TeAttribute attTextValue;
+	attTextValue.rep_.name_ = "text_value";
+	attTextValue.rep_.type_ = TeSTRING;
+	attTextValue.rep_.numChar_ = 255;
+	attList.push_back(attTextValue);}
+
+	{TeAttribute attAngle;
+	attAngle.rep_.name_ = "angle";
+	attAngle.rep_.type_ = TeREAL;
+	attAngle.rep_.decimals_ = 15;
+	attAngle.rep_.defaultValue_ = "0.0";
+	attList.push_back(attAngle);}
+
+	{TeAttribute attHeight;
+	attHeight.rep_.name_ = "height";
+	attHeight.rep_.type_ = TeREAL;
+	attHeight.rep_.decimals_ = 15;
+	attHeight.rep_.defaultValue_ = "0.0";
+	attList.push_back(attHeight);}
+
+	{TeAttribute attAlignVert;
+	attAlignVert.rep_.name_ = "alignment_vert";
+	attAlignVert.rep_.type_ = TeREAL;
+	attAlignVert.rep_.decimals_ = 15;
+	attList.push_back(attAlignVert);}
+
+	{TeAttribute attAlignHoriz;
+	attAlignHoriz.rep_.name_ = "alignment_horiz";
+	attAlignHoriz.rep_.type_ = TeREAL;
+	attAlignHoriz.rep_.decimals_ = 15;
+	attList.push_back(attAlignHoriz);}
+
+	if(!createTable(table, attList))
+		return false;
+
+	string idxName = "te_idx_"  + table + "_obj";
+
+	if(!createIndex(table, idxName, "object_id"))
+		return false;
+
+	idxName = "te_idx_"  + table + "_pos";
+
+	return createIndex(table, idxName, "x, y");
 }
 
 bool TeDatabase::createNodeGeometry(const string& table)
 {
-	string q ="CREATE TABLE " + table +"(";
-	q += "geom_id		INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,";
-	q += "object_id		VARCHAR(255) NOT NULL ,";
-	q += "x				DOUBLE(24,15) DEFAULT '0.0',";
-	q += "y				DOUBLE(24,15) DEFAULT '0.0',";
-	q += "PRIMARY KEY (geom_id),";
-	q += "INDEX (object_id),";
-	q += "INDEX pos_idx(x,y))";
-	return execute(q);
+	if(table.empty())
+		return false;
+
+	TeAttributeList attList;
+
+	{TeAttribute attGeomId;
+	attGeomId.rep_.name_ = "geom_id";
+	attGeomId.rep_.type_ = TeUNSIGNEDINT;
+	attGeomId.rep_.isAutoNumber_ = true;
+	attGeomId.rep_.isPrimaryKey_ = true;
+	attGeomId.rep_.null_ = false;
+	attList.push_back(attGeomId);}
+
+	{TeAttribute attObjId;
+	attObjId.rep_.name_ = "object_id";
+	attObjId.rep_.type_ = TeSTRING;
+	attObjId.rep_.numChar_ = 255;
+	attObjId.rep_.null_ = false;
+	attList.push_back(attObjId);}
+
+	{TeAttribute attSpatial;
+	attSpatial.rep_.name_ = "spatial_data";
+	attSpatial.rep_.type_ = TeNODETYPE;
+	attList.push_back(attSpatial);}
+
+	if(!createTable(table, attList))
+		return false;
+
+	string idxName = "te_idx_"  + table + "_obj";
+
+	return createIndex(table, idxName, "object_id");
 }
 
 bool TeDatabase::createPointGeometry(const string& table)
 {
-	string q ="CREATE TABLE " + table +"(";
-	q += "geom_id		INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,";
-	q += "object_id		VARCHAR(255) NOT NULL ,";
-	q += "x				DOUBLE(24,15) DEFAULT '0.0',";
-	q += "y				DOUBLE(24,15) DEFAULT '0.0',";
-	q += "PRIMARY KEY (geom_id),";
-	q += "INDEX (object_id),";
-	q += "INDEX pos_idx(x,y))";
-	return execute(q);
+	if(table.empty())
+		return false;
+
+	TeAttributeList attList;
+
+	{TeAttribute attGeomId;
+	attGeomId.rep_.name_ = "geom_id";
+	attGeomId.rep_.type_ = TeUNSIGNEDINT;
+	attGeomId.rep_.isAutoNumber_ = true;
+	attGeomId.rep_.isPrimaryKey_ = true;
+	attGeomId.rep_.null_ = false;
+	attList.push_back(attGeomId);}
+
+	{TeAttribute attObjId;
+	attObjId.rep_.name_ = "object_id";
+	attObjId.rep_.type_ = TeSTRING;
+	attObjId.rep_.numChar_ = 255;
+	attObjId.rep_.null_ = false;
+	attList.push_back(attObjId);}
+
+	{TeAttribute attSpatial;
+	attSpatial.rep_.name_ = "spatial_data";
+	attSpatial.rep_.type_ = TePOINTTYPE;
+	attList.push_back(attSpatial);}
+
+	if(!createTable(table, attList))
+		return false;
+
+	string idxName = "te_idx_"  + table + "_obj";
+
+	return createIndex(table, idxName, "object_id");
 }
 
 bool TeDatabase::createArcGeometry(const string& table)
 {
-	string q ="CREATE TABLE " + table +"(";
-	q += "geom_id		INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,";
-	q += "object_id		VARCHAR(255) NOT NULL ,";
-	q += "from_node		INT(10),";
-	q += "to_node		INT(10),";
-	q += "PRIMARY KEY (geom_id),";
-	q += "INDEX (object_id),";
-	q += "INDEX (from_node),";
-	q += "INDEX (to_node))";
-	return execute(q);
+	if(table.empty())
+		return false;
+
+	TeAttributeList attList;
+
+	{TeAttribute attGeomId;
+	attGeomId.rep_.name_ = "geom_id";
+	attGeomId.rep_.type_ = TeUNSIGNEDINT;
+	attGeomId.rep_.isAutoNumber_ = true;
+	attGeomId.rep_.isPrimaryKey_ = true;
+	attGeomId.rep_.null_ = false;
+	attList.push_back(attGeomId);}
+
+	{TeAttribute attObjId;
+	attObjId.rep_.name_ = "object_id";
+	attObjId.rep_.type_ = TeSTRING;
+	attObjId.rep_.numChar_ = 255;
+	attObjId.rep_.null_ = false;
+	attList.push_back(attObjId);}
+
+	{TeAttribute attFromNode;
+	attFromNode.rep_.name_ = "from_node";
+	attFromNode.rep_.type_ = TeINT;
+	attFromNode.rep_.null_ = false;
+	attList.push_back(attFromNode);}
+
+	{TeAttribute attToNode;
+	attToNode.rep_.name_ = "to_node";
+	attToNode.rep_.type_ = TeINT;
+	attToNode.rep_.null_ = false;
+	attList.push_back(attToNode);}
+
+	if(!createTable(table, attList))
+		return false;
+
+	string idxName = "te_idx_"  + table + "_obj";
+
+	if(!createIndex(table, idxName, "object_id"))
+		return false;
+
+	idxName = "te_idx_"  + table + "_from";
+
+	if(!createIndex(table, idxName, "from_node"))
+		return false;
+
+	idxName = "te_idx_"  + table + "_to";
+
+	return createIndex(table, idxName, "to_node");
 }
 
 
@@ -1021,57 +2346,128 @@ bool
 TeDatabase::insertTable	(TeTable &table)
 {
 	string tableName = table.name();
+	int size = table.size();
 	TeAttributeList att = table.attributeList();
 	TeAttributeList::iterator it = att.begin();
-
+	TeAttributeList::iterator itEnd = att.end();
 	TeTableRow row;
-	unsigned int i;
+	
+	int blobIndex=-1;
+	if (!beginTransaction())
+		return false;
+
+	int i;
 	unsigned int j;
-	for ( i = 0; i < table.size(); i++  )
+	for ( i = 0; i < size; i++ )	
 	{
 		row = table[i];
 		it = att.begin();
-		string q = 	"INSERT INTO "+tableName+" values(";
+		string attrs;
+		string values;
 		j = 1;
 		int jj = 0;
-		string dt = "";
-		while ( it != att.end() )
+		while ( it != itEnd )
 		{
-			if(((*it).rep_.type_==TeDATETIME) && (!row[jj].empty()))
+			if (row[jj].empty() || (*it).rep_.isAutoNumber_)
 			{
-				const string temp_dt = string(row[jj].c_str());
-				TeTime t(temp_dt, (*it).dateChronon_, (*it).dateTimeFormat_, (*it).dateSeparator_, (*it).timeSeparator_, (*it).indicatorPM_);
-				dt=t.getDateTime("YYYYsMMsDDsHHsmmsSS", "-");
+				++it;
+				j++;
+				jj++;
+				continue;
+			}
+			
+			if (!values.empty())
+			{
+				attrs += ", ";
+				values += ", ";
+			}			
+			attrs += (*it).rep_.name_;			
+			switch ((*it).rep_.type_)
+			{
+			case TeSTRING:
+				values += "'"+ escapeSequence( row[jj] ) +"'";
+				break;
+			case TeREAL:
+				{
+				std::string strValue = row[jj];
+				replace(strValue.begin(), strValue.end(), ',', '.');
+				values += strValue;
+				}
+				break;
+			case TeINT:
+				values += row[jj];
+				break;
+			case TeDATETIME:
+				{
+					const string temp_dt = string(row[jj].c_str());
+					TeTime t(temp_dt, (*it).dateChronon_, (*it).dateTimeFormat_, (*it).dateSeparator_, (*it).timeSeparator_, (*it).indicatorPM_);
+					values += this->getSQLTime(t);
+				}
+				break;
+			case TeCHARACTER:
+				values += "'" + escapeSequence(row[jj]) + "'";
+				break;
+			case TeBLOB:
+				blobIndex = jj;
+			default:
+				values += "'"+ escapeSequence(row[jj]) +"'";
+				break;
 			}
-
-  			switch ((*it).rep_.type_)
-  			{
-  				case TeSTRING:
-					q += "'"+this->escapeSequence(row[jj])+"'";
-  				break;
-  				case TeREAL:
-					q += "'"+row[jj]+"'";
-  				break;
-  				case TeINT:
-					q += "'"+row[jj]+"'";
-  				break;
-				case TeDATETIME:
-					q += "'"+dt+"'";   
-  				break;
-				default:
-					q += "'"+this->escapeSequence(row[jj])+"'";
-  				break;
-  			}
-			if (j<att.size())
-				q+= ",";
 			++it;
 			j++;
 			jj++;
 		}
-		q += ")";
-		if (!this->execute(q))
-//			return false;
+
+		if (values.empty()) 
 			continue;
+
+		string q = "INSERT INTO "+tableName + " ("+ attrs+") " + " VALUES ("+values+") ";
+		if (!execute(q)) 
+			continue;
+
+		//If there were blob type 
+		if(blobIndex>=0)
+		{
+			TeAttribute uniqueAttr;
+			table.attrUnique(uniqueAttr);
+			string uniqueValue;
+			int indexUniquePos = table.attrUniquePosition();
+			if(uniqueAttr.rep_.isAutoNumber_)
+			{
+				//we have to get the last autonumber inserted
+				string sql = " SELECT MAX("+ uniqueAttr.rep_.name_ +") FROM ";
+				sql += tableName;
+				TeDatabasePortal* portal = getPortal();
+				if(!portal)
+				{
+					rollbackTransaction();
+					return false;
+				}
+				if(!portal->query(sql) || !portal->fetchRow())
+				{
+					delete portal;
+					rollbackTransaction();
+					return false;
+				}
+				uniqueValue = portal->getData(0);
+				delete portal;
+			}
+			else
+				//we can use the unique value
+				uniqueValue = row[indexUniquePos];
+			
+			if(!insertBlob(tableName, att[blobIndex].rep_.name_, uniqueAttr.rep_, uniqueValue, 
+				(unsigned char*) row[blobIndex].c_str(), row[blobIndex].size()))
+			{
+				rollbackTransaction();
+				return false;
+			} 
+		}
+	}
+	if (!commitTransaction())
+	{
+		rollbackTransaction();
+		return false;
 	}
 	return true;
 }
@@ -1102,7 +2498,7 @@ TeDatabase::alterTable(const string& tableName, TeAttributeRep& rep, const strin
 			break;
 			
 		case TeREAL:
-			tab += "DOUBLE";	
+			tab += "DOUBLE(24, 15)";	
 			break;
 			
 		case TeINT:
@@ -1198,16 +2594,105 @@ TeDatabase::alterTable(const string& tableName, TeAttributeRep& rep, const strin
 				return false;
 		}
 	}
+
+	alterTableInfoInMemory(tableName);
+	return true;
+}
+
+bool 
+TeDatabase::alterTable(const string& oldTableName, const string& newTablename)
+{
+	string sql = " ALTER TABLE "+ oldTableName +" RENAME "+ newTablename;
+	if(!execute(sql))
+		return false;
+
+	//update te_layer_table
+	sql = " UPDATE te_layer_table ";
+	sql += " SET attr_table = '"+ newTablename +"'";
+	sql += " WHERE attr_table = '"+ oldTableName +"'";
+	execute(sql);
+
+	//update te_tables_relation
+	sql = " UPDATE te_tables_relation ";
+	sql += " SET external_table_name = '"+ newTablename +"'";
+	sql += " WHERE external_table_name = '"+ oldTableName +"'";
+	execute(sql);
+	
+	alterTableInfoInMemory(newTablename, oldTableName);
 	return true;
 }
 
 bool 
+TeDatabase::insertBlob (const string& tableName, const string& columnBlob, TeAttributeRep& columnId, const string& valueId, unsigned char* data, int size)
+{
+	string whereClause = columnId.name_ +" = ";
+	switch (columnId.type_ )
+	{
+		case TeSTRING:
+			whereClause += "'"+ valueId + "'";
+			break;
+		default:
+			whereClause += valueId;
+			break;
+	}
+	return (insertBlob (tableName, columnBlob, whereClause, data, size));
+}
+
+bool 
+TeDatabase::insertBlob (const string& tableName, const string& columnBlob, TeAttributeRep& columnId, const string& valueId, const string& fileName)
+{
+	string whereClause = columnId.name_ +" = ";
+	switch (columnId.type_ )
+	{
+		case TeSTRING:
+			whereClause += "'"+ valueId + "'";
+			break;
+		default:
+			whereClause += valueId;
+			break;
+	}
+	return (insertBlob(tableName, columnBlob, whereClause, fileName));
+}
+
+bool 
+TeDatabase::insertBlob (const string& tableName, const string& columnBlob, const string& whereClause, const string& fileName)
+{
+	unsigned char	*cdata = 0;
+	int		size;
+	FILE	*fp = 0;
+	
+	struct	stat buf;
+	int		result;
+	
+	result = stat(fileName.c_str(), &buf);
+	
+	if( result != 0 )
+		return false;
+	
+	size = buf.st_size;
+
+	cdata = new unsigned char[size];
+	fp = fopen(fileName.c_str(), "rb");
+	fread(cdata, sizeof(unsigned char), size, fp); 
+
+	bool status = insertBlob (tableName, columnBlob, whereClause, cdata, size);
+
+	if(fp)
+		fclose(fp);
+
+	if (cdata)
+		delete []cdata;
+
+	return status;
+}
+
+bool 
 TeDatabase::getAttrTables(TeAttrTableVector& atts, TeAttrTableType attType)
 {
 	TeDatabasePortal* portal = this->getPortal();
 	if(!portal)
 	{
-		this->errorMessage_ = "N�o foi poss�vel abrir portal para o banco";
+		this->errorMessage_ = "N�o foi poss�vel abrir portal para o banco";
 		return false;
 	}
 	
@@ -1223,21 +2708,15 @@ TeDatabase::getAttrTables(TeAttrTableVector& atts, TeAttrTableType attType)
 
 	while (portal->fetchRow())
 	{
-		string tableName = portal->getData("attr_table");
-		int    tableId = portal->getInt("table_id");
-		string indexName = portal->getData("attr_link");
-
+		TeTable attTable;
+		if(!portal->getAttrTable(attTable))
+		{
+			delete portal;
+			return false;
+		}
+		
 		TeAttributeList attrList;
-		getAttributeList(tableName, attrList);
-
-		TeTable attTable(tableName,attrList,
-				         portal->getData("unique_id"), indexName,
-						 TeAttrTableType(portal->getInt("attr_table_type")));
-
-		attTable.setId(tableId);
-		attTable.attInitialTime(portal->getData("attr_initial_time"));
-		attTable.attFinalTime(portal->getData("attr_final_time"));
-		attTable.attTimeUnit(TeChronon(portal->getInt("attr_time_unit")));
+		getAttributeList(attTable.name(), attrList);
 		atts.push_back(attTable);
 	}
 	delete portal;
@@ -1247,67 +2726,151 @@ TeDatabase::getAttrTables(TeAttrTableVector& atts, TeAttrTableType attType)
 bool
 TeDatabase::updateTable	(TeTable &table)
 {
-	string tableName = table.name();
-	TeAttributeList att = table.attributeList();
-	TeAttributeList::iterator it = att.begin();
-
-	TeTableRow row;
+	TeAttributeList& att = table.attributeList();
 	unsigned int i;
-	string uniqueName = table.uniqueName();
 	string uniqueVal;
 	bool isUniqueValString = false;
+	
+	if (!beginTransaction())
+		return false;
+
+	string uniqueName = table.uniqueName(); // primary key explicitly defined or 
+	if (table.uniqueName().empty())			// check in the attribute list
+	{								
+		for (i=0; i<att.size(); ++i)
+			if (att[i].rep_.isPrimaryKey_)
+			{
+				uniqueName = att[i].rep_.name_;
+				table.setUniqueName(uniqueName);
+				break;
+			}
+	}
 
-	for ( i = 0; i < table.size(); i++  )
+	int blobIndex = -1;
+	TeAttributeList::iterator it;
+	TeTableRow row;
+	unsigned int j;
+	bool useComma = false;
+	for (i = 0; i < table.size(); i++  )
 	{
 		row = table[i];
 		it = att.begin();
-		string q = 	"UPDATE "+tableName+" SET ";
-		unsigned int jj = 0;
+		string q;
+		j = 1;
+		int jj = 0;
 		while ( it != att.end() )
 		{
-			string val = row[jj];
-			if(row[jj].empty())
-				val = " NULL ";
-			
-			if ((*it).rep_.name_ != uniqueName)
+			if (uniqueName != (*it).rep_.name_)
 			{
-				q += (*it).rep_.name_ + "=";
+				if ((*it).rep_.isAutoNumber_)
+				{
+					++it;
+					j++;
+					jj++;
+					continue;
+				}			
+
+				if ((*it).rep_.type_ != TeBLOB)
+				{
+					if(useComma == true)
+					{
+						q += ", ";
+					}
+					else
+					{
+						useComma = true;
+					}
+					
+					q += (*it).rep_.name_ + " = ";
+	  				
+					if(row[jj].empty())
+					{
+						q += " null";
+
+						++it;
+						j++;
+						jj++;
+						continue;
+					}
+				}
+				
   				switch ((*it).rep_.type_)
   				{
-  					case TeSTRING:
+  					case TeSTRING:						
 						q += "'"+escapeSequence(row[jj])+"'";
   					break;
   					case TeREAL:
-						q += val;
+					{
+						std::string value = row[jj];
+						replace(value.begin(), value.end(), ',', '.');
+						q += value;
+					}
   					break;
   					case TeINT:
-						q += val;
+						q += row[jj];
+  					break;
+					case TeDATETIME:
+					{
+						const string temp_dt = string(row[jj].c_str());
+						TeTime t(temp_dt, (*it).dateChronon_, (*it).dateTimeFormat_, (*it).dateSeparator_, (*it).timeSeparator_, (*it).indicatorPM_);
+						q += this->getSQLTime(t);
+					}
+  					break;
+					case TeCHARACTER:
+						q += "'" + escapeSequence(row[jj]) + "'";
+  					break;
+					case TeBLOB:
+						blobIndex = jj;
   					break;
   					default:
 						q += "'"+escapeSequence(row[jj])+"'";
   					break;
   				}
-				if (jj < att.size()-1)
-					q+= ",";
+				
 			}
 			else
 			{
-				if((*it).rep_.type_ == TeSTRING)
-					isUniqueValString = true;
 				uniqueVal = row[jj];
+				isUniqueValString = ((*it).rep_.type_ == TeSTRING);
 			}
-
 			++it;
+			j++;
 			jj++;
 		}
-		
-		if(isUniqueValString)
-			q += " WHERE " + uniqueName + " = '" + uniqueVal +"'";
-		else
-			q += " WHERE " + uniqueName + " = " + uniqueVal;
-		
-		if (!this->execute(q))
+		if (q.empty())
 			continue;
+		
+		if (!uniqueName.empty() && !uniqueVal.empty())  
+		{
+			if(isUniqueValString)
+				q += " WHERE " + uniqueName + " = '" + uniqueVal +"'";
+			else
+				q += " WHERE " + uniqueName + " = " + uniqueVal;
+		}
+		string sql = "UPDATE "+ table.name() + " SET " + q;
+		if (!execute(sql))
+		{
+			rollbackTransaction();
+			return false;
+		}
+
+		//verify if there was blob type
+		if(blobIndex>=0)
+		{
+			TeAttribute uniqueAttr;
+			table.attrUnique(uniqueAttr);
+			if(!insertBlob (table.name(), att[blobIndex].rep_.name_, uniqueAttr.rep_, uniqueVal, 
+				(unsigned char*)row[blobIndex].c_str(), row[blobIndex].size()))
+			{
+				rollbackTransaction();
+				return false;
+			}
+		}
+	}
+	if (!commitTransaction())
+	{
+		rollbackTransaction();
+		return false;
 	}
 	return true;
 }
@@ -1316,6 +2879,11 @@ TeDatabase::updateTable	(TeTable &table)
 bool 
 TeDatabase::loadTable(const string& tableName, TeTable &table)
 {
+	bool isreg = false;
+	table.name(tableName);
+	if (loadTableInfo(table)) // this is not a registered table...
+		isreg = true;
+
 	TeDatabasePortal* portal = this->getPortal();
 	if (!portal)
 		return false;
@@ -1326,14 +2894,31 @@ TeDatabase::loadTable(const string& tableName, TeTable &table)
 		delete portal;
 		return false;
 	}
-	table.name(tableName);
-	table.setAttributeList(portal->AttributeList());
-
+	if (!isreg)
+		table.setAttributeList(portal->getAttributeList());
 	while (portal->fetchRow())
 	{
 		TeTableRow row;
 		for (int j = 0; j < portal->numFields(); j++)
-			row.push_back (portal->getData (j)); 
+		{
+           TeAttribute& attr = table.attributeList()[j];
+           if (attr.rep_.type_ == TeBLOB)
+           {
+               unsigned char* data = NULL;
+               long size = 0;
+               portal->getBlob (attr.rep_.name_, data, size);
+               string blobValue;
+               if (data != NULL)
+               {                                      
+				   blobValue.assign((char*)data, size);
+				   delete [] data;
+                   data = NULL;
+               }
+               row.push_back(blobValue);
+           }
+           else
+               row.push_back (portal->getData (j)); 
+		}
 		table.add(row);
 	}
 	delete portal;
@@ -1343,6 +2928,11 @@ TeDatabase::loadTable(const string& tableName, TeTable &table)
 bool 
 TeDatabase::selectTable (const string& tableName, const string& criteria, TeTable &table)
 {
+	bool isreg = false;
+	table.name(tableName);
+	if (loadTableInfo(table)) // this is not a registered table...
+		isreg = true;
+
 	TeDatabasePortal* portal = this->getPortal();
 	if (!portal)
 		return false;
@@ -1356,9 +2946,8 @@ TeDatabase::selectTable (const string& tableName, const string& criteria, TeTabl
 		delete portal;
 		return false;
 	}
-	table.name(tableName);
-	table.setAttributeList(portal->AttributeList());
-
+	if (!isreg)
+		table.setAttributeList(portal->getAttributeList());
 	while (portal->fetchRow())
 	{
 		TeTableRow row;
@@ -1383,7 +2972,7 @@ TeDatabase::updateView (TeView *view)
 	}
 	else
 	{
-		errorMessage_ = "N�o � poss�vel atualizar vista sem proje��o!";
+		errorMessage_ = "N�o � poss�vel atualizar vista sem proje��o!";
 		return false;
 	}
 
@@ -1391,6 +2980,14 @@ TeDatabase::updateView (TeView *view)
 	sql+= ", name='" + view->name() + "'";
 	sql+= ", user_name='" + view->user() + "'";
 	sql+= ", visibility= " + Te2String((int)view->isVisible());
+	sql+= ", lower_x = " + Te2String(view->getCurrentBox().lowerLeft().x());
+	sql+= ", lower_y = " + Te2String(view->getCurrentBox().lowerLeft().y());
+	sql+= ", upper_x = " + Te2String(view->getCurrentBox().upperRight().x());
+	sql+= ", upper_y = " + Te2String(view->getCurrentBox().upperRight().y());
+	if(view->getCurrentTheme() > 0)
+		sql+= ", current_theme = " + Te2String(view->getCurrentTheme());
+	else
+		sql+= ", current_theme = null";
 	sql +=" WHERE view_id = " + Te2String(view->id());
 
 	if (!this->execute (sql))
@@ -1400,47 +2997,272 @@ TeDatabase::updateView (TeView *view)
 	if (tree) 
 		return	updateViewTree(tree);
 	return true;
+
 }
 
 
 bool 
-TeDatabase::loadViewSet (const string& user)
+TeDatabase::loadViewSet (const string& user, const bool& loadAttrList, const string& visualType)
 {
-	TeViewMap::iterator it = viewMap_.begin();
-	while (it != viewMap_.end())
+	//clear view map
+	TeViewMap::iterator it = metaModel_->viewMap().begin();
+	while (it != metaModel_->viewMap().end())
 	{
-		delete it->second;
+		if(it->second)
+			delete it->second;
 		++it;
 	}
-	viewMap_.clear();
-	
-	TeDatabasePortal* portal = this->getPortal();
-	if (!portal)
-		return false;
+	metaModel_->viewMap().clear();
 
-	string sql;
+	//clear theme map
+	TeThemeMap::iterator itTheme = metaModel_->themeMap().begin();
+	while (itTheme != metaModel_->themeMap().end())
+	{
+		if(itTheme->second)
+			delete itTheme->second;
+		++itTheme;
+	}
+
+	//clear invalid theme map
+	itTheme = metaModel_->invalidThemeMap().begin();
+	while (itTheme != metaModel_->invalidThemeMap().end())
+	{
+		if(itTheme->second)
+			delete itTheme->second;
+		++itTheme;
+	}
+	metaModel_->invalidThemeMap().clear();
+	metaModel_->themeMap().clear();
+	metaModel_->legendMap().clear();
+	
+	//load view, projection, themes and grouping
+	string sql = " SELECT ";
+	sql += " te_view.*, "; //0-9  (10 columns)
+	sql += " te_projection.*, "; //10 - 26 (17 columns)
+	sql += " te_theme.*, "; // 27 - 46 (20 columns)
+	sql += " te_grouping.*, "; //47 - 56 (10 columns)
+	sql += " te_legend.*,  "; // 57 - 63    (7 columns)
+	sql += " te_visual.*, "; //  64 - 87 (24 columns)
+	sql += " te_visual_raster.* "; //  88 (7 columns)
+
+	sql += " FROM ((((((te_view INNER JOIN te_projection ";
+	sql += " ON te_view.projection_id = te_projection.projection_id) ";
+	sql += " LEFT JOIN te_theme ON te_view.view_id = te_theme.view_id ) ";
+	sql += " LEFT JOIN te_grouping ON te_theme.theme_id = te_grouping.theme_id) ";
+	sql += " LEFT JOIN te_legend ON te_theme.theme_id = te_legend.theme_id) ";
+	sql += " LEFT JOIN te_visual ON te_visual.legend_id = te_legend.legend_id) ";
+	sql += " LEFT JOIN te_visual_raster ON te_theme.theme_id = te_visual_raster.theme_id) ";
+			
+	sql += " WHERE ";
 	if (!user.empty())
-		sql = "SELECT * FROM te_view WHERE user_name = '" + user + "'";
+		sql += " te_view.user_name = '" + user + "'";
 	else
-		sql = "SELECT * FROM te_view WHERE user_name = '" + this->user() + "'";
+		sql += " te_view.user_name = '" + this->user() + "'";
+	sql += " ORDER BY te_view.view_id, te_theme.priority, te_theme.theme_id, te_legend.legend_id, ";
+	sql += " te_legend.group_id, te_visual.geom_type, te_visual_raster.band_in  "; 
 
+	TeDatabasePortal* portal = this->getPortal();
+	if (!portal)
+		return false;
+	
 	if (!portal->query(sql))
 	{	
 		delete portal;
 		return false;
 	}
-	while (portal->fetchRow())
+	
+	int lastViewId = -1;
+	TeView *view = 0;
+	bool hasNewRow = portal->fetchRow(); //idicates that this portal was fetched 
+	while(hasNewRow)
+	{
+		//load view and its projection 
+		if(lastViewId!=atoi(portal->getData(0)))
+		{
+			//store the last view
+			if(view)
+			{
+				metaModel_->viewMap()[view->id()] = view;
+				view = 0;
+			}
+			TeProjection* proj = 0;
+			if(!portal->getProjection(&proj, 10)) //load projection
+			{
+				delete portal;
+				return false;
+			}
+			view = new TeView();
+			if(!portal->getView(*view, 0)) //load view
+			{
+				delete portal;
+				delete view;
+				return false;
+			}
+			if (proj != 0)
+				view->projection(proj);
+			lastViewId = view->id();
+		}  
+		
+		//make the rigth object
+		string aux = portal->getData(27);
+		if (aux.empty())
+		{
+			hasNewRow = portal->fetchRow();
+			continue;
+		}
+		TeViewNodeType viewNodeType = (TeViewNodeType)portal->getInt(33);
+		TeViewNode* viewNode = TeViewNodeFactory::make(viewNodeType);
+
+		if(!viewNode)
+		{
+			int currentThemeId = portal->getInt(27);
+
+			while((hasNewRow = portal->fetchRow()) && (portal->getInt(27) == currentThemeId))
+				;
+
+			continue;
+		}
+
+		if(viewNodeType == TeTREE)
+		{
+			viewNode = loadViewTree(view, portal->getInt(27), loadAttrList, visualType); 
+			view->add(viewNode);
+
+			hasNewRow = portal->fetchRow();
+			continue;
+		}
+		else 
+		{
+			if(!portal->getTheme(static_cast<TeAbstractTheme&>(*viewNode), 27))
+			{
+				delete viewNode;
+				delete portal;
+				return false;
+			}
+
+			if(viewNodeType == TeTHEME)
+			{
+				//load layer
+				int id = static_cast<TeTheme*>(viewNode)->layerId();
+				TeLayerMap::iterator it = metaModel_->layerMap().find(id);
+				if (it == metaModel_->layerMap().end())
+					loadLayerSet(loadAttrList);
+				
+				static_cast<TeTheme*>(viewNode)->layer(metaModel_->layerMap()[id]);
+			}
+		}
+		
+		TeAbstractTheme* theme = static_cast<TeAbstractTheme*>(viewNode);
+
+		//load grouping 
+		TeGrouping group;
+		if(portal->getGrouping(group, 47))
+			theme->grouping(group);
+
+		//load all legends of this theme
+		//and its visual
+		bool hasLegsToThisTheme = true;
+		while(hasLegsToThisTheme)
+		{
+			//legend
+			TeLegendEntry legend;
+			if(!portal->getLegend(legend, 57))
+			{
+				delete theme;
+				delete view;
+				delete portal;
+				return false;
+			}
+
+			//visual
+			TeRasterVisual* rasterVisual = new TeRasterVisual();
+			bool hasVisualToThisLeg = true;
+			bool hasRasterVisual = false;
+			while(hasVisualToThisLeg)
+			{
+				TeVisual* visual = TeVisualFactory::make(visualType);
+				TeGeomRep geomRep;
+				if(portal->getVisual(visual, geomRep, 64))
+					legend.setVisual(visual, geomRep);
+									
+				if(portal->getRasterVisual(*rasterVisual, 88))
+					hasRasterVisual=true;
+				
+				hasNewRow = portal->fetchRow();
+				if(!hasNewRow || portal->getInt(59)!= legend.group() || portal->getInt(57)!= legend.id())
+					hasVisualToThisLeg = false;
+			}
+
+			//Set raster visual to this theme
+			if(hasRasterVisual)
+				theme->rasterVisual(rasterVisual);
+			else
+				delete rasterVisual;
+
+			//Set legend to this theme
+			theme->legend(legend); 
+															
+			//fill legend buffer
+			if(legend.group() == -6)	
+				metaModel_->legendMap()[legend.id()] = &theme->queryAndPointingLegend();
+			else if(legend.group() == -5)	
+				metaModel_->legendMap()[legend.id()] = &theme->queryLegend(); 
+			else if (legend.group() == -4)
+				metaModel_->legendMap()[legend.id()] = &theme->pointingLegend(); 
+			else if (legend.group() == -3)
+				metaModel_->legendMap()[legend.id()] = &theme->defaultLegend(); 
+			else if (legend.group() == -2)
+				metaModel_->legendMap()[legend.id()] = &theme->withoutDataConnectionLegend(); 
+			else if (legend.group() == -1)
+				metaModel_->legendMap()[legend.id()] = &theme->outOfCollectionLegend(); 
+			else if (legend.group() == -10) //own legend
+			{
+				TeLegendEntry* legendTemp = new TeLegendEntry(legend);
+				metaModel_->legendMap()[legend.id()] = legendTemp;
+			}				
+			
+			if(!hasNewRow || portal->getInt(27)!= theme->id())
+				hasLegsToThisTheme = false;
+		}
+			
+		for (unsigned int i = 0; i < theme->legend().size(); ++i)
+			metaModel_->legendMap()[theme->legend()[i].id()] = &theme->legend()[i];
+
+		if(viewNode->type()==(int)TeTHEME)
+		{
+			//load theme table
+			if(!loadThemeTable(static_cast<TeTheme*>(theme), loadAttrList))
+			{
+				delete portal;
+				return false;
+			}
+		}
+		
+		//load specific theme parameters
+		if(!theme->loadMetadata(this))
+		{
+			metaModel_->invalidThemeMap()[viewNode->id()] = theme;
+			continue;
+		}
+
+		metaModel_->themeMap()[viewNode->id()] = theme;
+		view->add(viewNode);
+	}
+
+	//store the last view
+	if(view)
 	{
-		TeView *view = new TeView();
-		view->id (portal->getInt("view_id"));
-		loadView (view);
+		metaModel_->viewMap()[view->id()] = view;
+		view = 0;
 	}
+
 	delete portal;
 	return true;
+	
 }
 
 TeViewTree* 
-TeDatabase::loadViewTree(TeView* view, int id)
+TeDatabase::loadViewTree(TeView* view, int id, const bool& loadAttrList, const string& visualType)
 {
 	if( view == 0) 
 		return 0;
@@ -1463,7 +3285,6 @@ TeDatabase::loadViewTree(TeView* view, int id)
 			delete portal;
 			return 0;
 		}
-
 		TeViewNodeType type = (TeViewNodeType)portal->getInt("node_type");
 		if(type != TeTREE)
 		{
@@ -1471,7 +3292,6 @@ TeDatabase::loadViewTree(TeView* view, int id)
 			delete portal;
 			return NULL;
 		}
-
 		node = portal->getViewTree();
 		portal->freeResult();
 	}
@@ -1495,11 +3315,11 @@ TeDatabase::loadViewTree(TeView* view, int id)
 		{
 			childNode = new TeTheme();
 			childNode->id(portal->getInt(0));
-			this->loadTheme((TeTheme*)childNode);
+			this->loadTheme((TeTheme*)childNode, loadAttrList, visualType);
 		} 
 		else
 		{
-			childNode = loadViewTree(view, portal->getInt("theme_id"));
+			childNode = loadViewTree(view, portal->getInt("theme_id"), loadAttrList, visualType);
 		}
 
 		if(id == 0)
@@ -1517,71 +3337,218 @@ TeDatabase::loadViewTree(TeView* view, int id)
 }
 
 bool 
-TeDatabase::loadView (TeView* view)
+TeDatabase::loadView (TeView* view, const bool& loadAttrList, const string& visualType)
 {
-	string q;
+	string rest;
 	if (view->id() > 0)
-		q = "SELECT * FROM te_view WHERE view_id=" + Te2String(view->id());
+		rest = " te_view.view_id=" + Te2String(view->id());
 	else if (!view->name().empty())
 	{
-		q = "SELECT * FROM te_view WHERE name='" + view->name() + "'";
+		rest = " te_view.name='" + view->name() + "'";
 		
 		if(!view->user().empty())
-			q += " AND user_name='" + view->user() + "'"; 
+			rest += " AND te_view.user_name='" + view->user() + "'"; 
 	}
 	else
 		return false;
-		
-	TeDatabasePortal* portal = getPortal();
+	
+	//load view, projection, themes and grouping
+	string sql = " SELECT ";
+	sql += " te_view.*, "; //0-9  (10 columns)
+	sql += " te_projection.*, "; //10 - 26 (17 columns)
+	sql += " te_theme.*, "; // 27 - 46 (20 columns)
+	sql += " te_grouping.*, "; //47 - 56 (10 columns)
+	sql += " te_legend.*,  "; // 57 - 63    (7 columns)
+	sql += " te_visual.*, "; //  64 - 87 (24 columns)
+	sql += " te_visual_raster.* "; //  88 (7 columns)
+
+	sql += " FROM ((((((te_view INNER JOIN te_projection ";
+	sql += " ON te_view.projection_id = te_projection.projection_id) ";
+	sql += " LEFT JOIN te_theme ON te_view.view_id = te_theme.view_id ) ";
+	sql += " LEFT JOIN te_grouping ON te_theme.theme_id = te_grouping.theme_id) ";
+	sql += " LEFT JOIN te_legend ON te_theme.theme_id = te_legend.theme_id) ";
+	sql += " LEFT JOIN te_visual ON te_visual.legend_id = te_legend.legend_id) ";
+	sql += " LEFT JOIN te_visual_raster ON te_theme.theme_id = te_visual_raster.theme_id) ";
+			
+	sql += " WHERE "+ rest;
+	sql += " ORDER BY te_view.view_id, te_theme.priority, te_theme.theme_id, te_legend.legend_id, ";
+	sql += " te_legend.group_id, te_visual.geom_type, te_visual_raster.band_in  "; 
+
+	TeDatabasePortal* portal = this->getPortal();
 	if (!portal)
-	{
-		this->errorMessage_ = "Erro ao tentar abrir um portal";
+		return false;
+	
+	if (!portal->query(sql) || !portal->fetchRow())
+	{	
+		delete portal;
 		return false;
 	}
-
-	if (!portal->query(q))
+	//load projection
+	TeProjection* proj = 0;
+	if(!portal->getProjection(&proj, 10)) 
 	{
 		delete portal;
-		this->errorMessage_ = "Erro ao submeter query: \"" + q + "\"";
 		return false;
 	}
-
-	if (!portal->fetchRow())
+	//load view		
+	if(!portal->getView(*view, 0)) 
 	{
 		delete portal;
 		return false;
 	}
-	
-	int projId = portal->getInt("projection_id");
-	TeProjection* proj = loadProjection(projId);
 	if (proj != 0)
 		view->projection(proj);
-	view->name(portal->getData("name"));
-	view->user(portal->getData("user_name"));
-	view->isVisible (portal->getBool("visibility"));
-	view->id(portal->getInt("view_id"));
-	portal->freeResult();
+	
+	bool hasNewRow = true;
 
-	loadViewTree(view, 0);
+	while(hasNewRow)
+	{
+		string aux = portal->getData(27);
+		if (aux.empty())
+		{
+			hasNewRow = portal->fetchRow();
+			continue;
+		}
+		TeViewNodeType viewNodeType = (TeViewNodeType)portal->getInt(33);
+		//make the rigth object
+		TeViewNode* viewNode = TeViewNodeFactory::make(viewNodeType);
 
-	delete portal;
+		if(!viewNode)
+		{
+			int currentThemeId = portal->getInt(27);
 
-	vector<TeViewNode*> &themes = view->themes();
-	for (unsigned int i = 0; i < themes.size() ; i++)
-	{
-		TeTheme *theme = (TeTheme*)themes[i];
-		int id = theme->layerId();
-		TeLayerMap::iterator it = layerMap_.find(id);
-		if (it == layerMap_.end())
+			while((hasNewRow = portal->fetchRow()) && (portal->getInt(27) == currentThemeId))
+				;
+
+			continue;
+		}
+
+		if(viewNodeType == TeTREE)
 		{
-			layerMap_.clear();
-			loadLayerSet();
+			viewNode = loadViewTree(view, portal->getInt(27), loadAttrList, visualType); 
+			view->add(viewNode);
+			hasNewRow = portal->fetchRow();
+			continue;
 		}
-		theme->layer(layerMap_[id]);
-		if (!loadLegend (theme))	// retrieve associated legend
-			return false;
+		else 
+		{
+			if(!portal->getTheme(static_cast<TeAbstractTheme&>(*viewNode), 27))
+			{
+				delete viewNode;
+				delete portal;
+				return false;
+			}
+
+			if(viewNodeType == TeTHEME)
+			{
+				//load layer
+				int id = static_cast<TeTheme*>(viewNode)->layerId();
+				TeLayerMap::iterator it = metaModel_->layerMap().find(id);
+				if (it == metaModel_->layerMap().end())
+					loadLayerSet(loadAttrList);
+				
+				static_cast<TeTheme*>(viewNode)->layer(metaModel_->layerMap()[id]);
+			}
+		}
+		
+		TeAbstractTheme* abstractTheme = static_cast<TeAbstractTheme*>(viewNode);
+
+		//load grouping 
+		TeGrouping group;
+		if(portal->getGrouping(group, 47))
+			abstractTheme->grouping(group);
+
+		//load all legends of this theme
+		//and its visual
+		bool hasLegsToThisTheme = true;
+		while(hasLegsToThisTheme)
+		{
+			//legend
+			TeLegendEntry legend;
+			if(!portal->getLegend(legend, 57))
+			{
+				delete viewNode;
+				delete portal;
+				return false;
+			}
+
+			//visual
+			TeRasterVisual* rasterVisual = new TeRasterVisual();
+			bool hasVisualToThisLeg = true;
+			bool hasRasterVisual = false;
+			while(hasVisualToThisLeg)
+			{
+				TeVisual* visual = TeVisualFactory::make(visualType);
+				TeGeomRep geomRep;
+				if(portal->getVisual(visual, geomRep, 64))
+					legend.setVisual(visual, geomRep);
+									
+				if(portal->getRasterVisual(*rasterVisual, 88))
+					hasRasterVisual=true;
+				
+				hasNewRow = portal->fetchRow();
+				if(!hasNewRow || portal->getInt(59)!= legend.group() || portal->getInt(57)!= legend.id())
+					hasVisualToThisLeg = false;
+			}
+
+			//Set raster visual to this theme
+			if(hasRasterVisual)
+				abstractTheme->rasterVisual(rasterVisual);
+			else
+				delete rasterVisual;
+
+			//Set legend to this theme
+			abstractTheme->legend(legend); 
+															
+			//fill legend buffer
+			if(legend.group() == -6)	
+				metaModel_->legendMap()[legend.id()] = & abstractTheme->queryAndPointingLegend();
+			else if(legend.group() == -5)	
+				metaModel_->legendMap()[legend.id()] = & abstractTheme->queryLegend(); 
+			else if (legend.group() == -4)
+				metaModel_->legendMap()[legend.id()] = & abstractTheme->pointingLegend(); 
+			else if (legend.group() == -3)
+				metaModel_->legendMap()[legend.id()] = & abstractTheme->defaultLegend(); 
+			else if (legend.group() == -2)
+				metaModel_->legendMap()[legend.id()] = & abstractTheme->withoutDataConnectionLegend(); 
+			else if (legend.group() == -1)
+				metaModel_->legendMap()[legend.id()] = & abstractTheme->outOfCollectionLegend(); 
+			else if (legend.group() == -10) //own legend
+			{
+				TeLegendEntry* legendTemp = new TeLegendEntry(legend);
+				metaModel_->legendMap()[legend.id()] = legendTemp;
+			}	
+			
+			if(!hasNewRow || portal->getInt(27)!= abstractTheme->id())
+				hasLegsToThisTheme = false;
+		}				
+			
+		for (unsigned int i = 0; i < abstractTheme->legend().size(); ++i)
+			metaModel_->legendMap()[abstractTheme->legend()[i].id()] = & abstractTheme->legend()[i];
+		
+		if(viewNode->type()==(int)TeTHEME)
+		{
+			//load theme table
+			if(!loadThemeTable(static_cast<TeTheme*>(abstractTheme), loadAttrList))
+			{
+				delete portal;
+				return false;
+			}
+		}
+		
+		//load specific theme parameters
+		if(!abstractTheme->loadMetadata(this))
+		{
+			metaModel_->invalidThemeMap()[viewNode->id()] = abstractTheme;
+			continue;
+		}
+		
+		metaModel_->themeMap()[viewNode->id()] = abstractTheme;
+		view->add(viewNode);
 	}
-	viewMap_[view->id()] = view;
+
+	metaModel_->viewMap()[view->id()] = view;
+	delete portal;
 	return true;
 }
 
@@ -1589,18 +3556,7 @@ TeDatabase::loadView (TeView* view)
 void
 TeDatabase::clear()
 {
-	TeViewMap::iterator viewIt;
-	for (viewIt = viewMap_.begin(); viewIt != viewMap_.end(); ++viewIt)
-		delete viewIt->second;
-
-	TeLayerMap::iterator layerIt;
-	for (layerIt = layerMap_.begin(); layerIt != layerMap_.end(); ++layerIt)
-		delete layerIt->second;
-
-	legendMap_.clear();
-	themeMap_.clear();
-	viewMap_.clear();
-	layerMap_.clear();
+	metaModel_->clear();
 }
 
 bool 
@@ -1640,6 +3596,15 @@ TeDatabase::deleteView (int viewId)
 			return false;
 		}
 	}
+
+	//delete the entries in the project relation
+	if (existRelation("te_project_view","fk_projectview_view_id") != TeRICascadeDeletion)
+	{
+		sql = "DELETE FROM te_project_view WHERE view_id =" + Te2String(viewId);
+		if (!this->execute (sql))
+			return false;
+	}
+
 	// delete view
 	sql = "DELETE FROM te_view WHERE view_id = " + Te2String(viewId);
 	if (!this->execute (sql))
@@ -1656,8 +3621,8 @@ TeDatabase::deleteView (int viewId)
 	}
 
 	// Delete the view and its themes
-	TeView* view = viewMap_[viewId];
-	viewMap_.erase(viewId);
+	TeView* view = metaModel_->viewMap()[viewId];
+	metaModel_->viewMap().erase(viewId);
 	delete view;
 	delete portal;
 	return true;
@@ -1666,7 +3631,7 @@ TeDatabase::deleteView (int viewId)
 bool
 TeDatabase::updateViewTree (TeViewTree *tree)
 {
-	if(tree->id() > 0)
+	if(tree ->type() == 1) //tree->id() > 0) //only for TeTREE
 	{
 		string sql;
 		sql = "UPDATE te_theme SET ";
@@ -1682,15 +3647,15 @@ TeDatabase::updateViewTree (TeViewTree *tree)
 	for (unsigned int th=0; th<tree->size(); th++)
 	{
 		TeViewNode* node = tree->retrieve(th);
-		if (node->type() == TeTHEME)
+		if (node->type() == TeTREE)
 		{
-			TeTheme *theme = (TeTheme*)node;
-			if(!updateTheme(theme)) return false;
+			TeViewTree* tree = (TeViewTree*)node;
+			if(!updateViewTree(tree)) return false;
 		}
 		else
 		{
-			TeViewTree* tree = (TeViewTree*)node;
-			if(!updateViewTree(tree)) return false;
+			TeTheme *theme = (TeTheme*)node;
+			if(!updateTheme(theme)) return false;
 		}
 	}
 	return true;
@@ -1727,32 +3692,51 @@ TeDatabase::viewExist(string viewName)
 
 
 bool
-TeDatabase::updateTheme (TeTheme *theme)
+TeDatabase::updateTheme (TeAbstractTheme *theme)
 {
 	string sql;
 
-	if (theme->id() <= 0 )  // theme doesn�t exist in the database yet
+	if (theme->id() <= 0 )  // theme doesn�t exist in the database yet
 	{
 		return this->insertTheme(theme);
 	}
 	
 	// update theme metadata
 	sql = "UPDATE te_theme SET ";
-	sql += " layer_id=" + Te2String (theme->layerId());
-	sql += ", view_id=" + Te2String (theme->view());
+	
+	if(theme->type()==TeTHEME)
+	{
+		sql += " layer_id=" + Te2String (static_cast<TeTheme*>(theme)->layerId());
+		sql += ", ";
+	}
+	
+	sql += "  view_id=" + Te2String (theme->view());
 	sql += ", name='" + escapeSequence(theme->name())+"'";
 	sql += ", parent_id=" + Te2String (theme->parentId());
 	sql += ", priority=" + Te2String (theme->priority());
 	sql += ", node_type=" + Te2String (theme->type());
-	sql += ", min_scale=" + Te2String (theme->minScale(),5);
-	sql += ", max_scale=" + Te2String (theme->maxScale(),5);
+	sql += ", min_scale=" + Te2String (theme->minScale(),15);
+	sql += ", max_scale=" + Te2String (theme->maxScale(),15);
 	sql += ", generate_attribute_where='" + escapeSequence(theme->attributeRest())+"'";
 	sql += ", generate_spatial_where='" + escapeSequence(theme->spatialRest())+"'";
 	sql += ", generate_temporal_where='" + escapeSequence(theme->temporalRest())+"'";
-	sql += ", collection_table='" + theme->collectionTable() + "'";
+
+	if(theme->type()==TeTHEME || theme->type()==TeEXTERNALTHEME )
+		sql += ", collection_table='" + static_cast<TeTheme*>(theme)->collectionTable() + "'";
+
 	sql += ", visible_rep= " + Te2String(theme->visibleRep ());
 	sql += ", enable_visibility= " + Te2String(theme->visibility()); 
-	sql += " WHERE theme_id=" + Te2String (theme->id());
+	sql += ", lower_x = " + Te2String(theme->box().x1(), 15); 
+	sql += ", lower_y = " + Te2String(theme->box().y1(), 15); 
+	sql += ", upper_x = " + Te2String(theme->box().x2(), 15); 
+	sql += ", upper_y = " + Te2String(theme->box().y2(), 15);
+	if(theme->getCreationTime().isValid())
+	{
+		TeTime creationTime = theme->getCreationTime();
+		sql += ", creation_time = " + this->getSQLTime(creationTime);
+	}
+
+	sql += " WHERE theme_id=" + Te2String (theme->id(), 15);
 
 	if (!this->execute (sql))
 		return false;
@@ -1761,7 +3745,7 @@ TeDatabase::updateTheme (TeTheme *theme)
 	sql = "DELETE FROM te_grouping WHERE theme_id= "+ Te2String(theme->id());
 	this->execute (sql);
 		
-	if(theme->grouping())
+	if(theme->grouping().groupMode_ != TeNoGrouping)
 	{
 		if(!insertGrouping(theme->id(), theme->grouping()))
 			return false;
@@ -1777,12 +3761,9 @@ TeDatabase::updateTheme (TeTheme *theme)
 	}
 	else
 	{
-		for (unsigned int i = 0; i < theme->legend().size() ; i++)
-		{
-			status = updateLegend(&(theme->legend()[i]));
-			if (!status)
-				return status;
-		}
+		status = updateLegend(theme->legend());
+		if (!status)
+			return status;
 	}
 
 	status = updateLegend(&(theme->withoutDataConnectionLegend()));
@@ -1808,171 +3789,197 @@ TeDatabase::updateTheme (TeTheme *theme)
 	status = updateLegend(&(theme->queryAndPointingLegend()));
 	if (!status)
 		return status;
+	
+	//insert metadata theme
+	if(!theme->saveMetadata(this))
+		return false;
 
 	// theme tables
-	return updateThemeTable (theme);
+	if(theme->type()==TeTHEME && !updateThemeTable(static_cast<TeTheme*>(theme)))
+		return false;
+
+	return true;
 }
 
 bool
-TeDatabase::loadTheme (TeTheme* theme)
+TeDatabase::loadTheme (TeAbstractTheme* theme, const bool& loadAttrList, const string& visualType)
 {
 	if (theme == 0)
 		return false;
 
-	string get = "SELECT te_theme.* FROM te_view INNER JOIN te_theme ON te_view.view_id = te_theme.view_id WHERE ";
+	string rest;
 	if (theme->id() > 0)
-		get += " te_theme.theme_id = "+  Te2String(theme->id());
+		rest = " te_theme.theme_id = "+  Te2String(theme->id());
 	else if (!theme->name().empty())
-		get += " te_theme.name = '"+  theme->name() + "'";
+		rest = " te_theme.name = '"+  theme->name() + "'";
 	else
 	{
-		this->errorMessage_ = "Theme procurado n�o possui nem id nem nome";
+		this->errorMessage_ = "Theme procurado n�o possui nem id nem nome";
 		return false;
 	}
-	get += " AND te_view.user_name = \'" + this->user() +"\'";
+	rest += " AND te_view.user_name = \'" + this->user() +"\'";
+	
+	//load view, projection, themes and grouping
+	string sql = " SELECT ";
+	sql += " te_theme.*, "; // 0 - 19 (20 columns)   
+	sql += " te_grouping.*, "; //20 - 29 (10 columns)
+	sql += " te_legend.*,  "; // 30 - 36    (7 columns)
+	sql += " te_visual.*, "; //  37 - 60 (24 columns)
+	sql += " te_visual_raster.* "; //  61 (7 columns)
+	sql += " FROM (((((te_view INNER JOIN te_theme ON te_view.view_id = te_theme.view_id) ";
+	sql += " LEFT JOIN te_grouping ON te_theme.theme_id = te_grouping.theme_id ) ";
+	sql += " LEFT JOIN te_legend ON te_theme.theme_id = te_legend.theme_id ) ";
+	sql += " LEFT JOIN te_visual ON te_legend.legend_id = te_visual.legend_id ) ";
+	sql += " LEFT JOIN te_visual_raster ON te_theme.theme_id = te_visual_raster.theme_id) ";
+	sql += " WHERE "+ rest;
+	sql += " ORDER BY te_theme.theme_id, te_legend.legend_id, te_legend.group_id, te_visual.geom_type, te_visual_raster.band_in  "; 
 
 	TeDatabasePortal* portal = this->getPortal();
 	if(!portal)
-	{
-		this->errorMessage_ = "N�o foi poss�vel abrir portal para o banco";
 		return false;
-	}
-
-	if (!portal->query (get))
+	
+	if(!portal->query(sql) || !portal->fetchRow())
 	{	
 		delete portal;
 		return false;
 	}
-	if (!portal->fetchRow())
-	{	
+	
+	TeViewNodeType viewNodeType = (TeViewNodeType)portal->getInt(6);
+	if(viewNodeType == TeTREE)
+	{		
+		TeViewNodeParams params;
+		portal->getViewNodeParams(params, 0);
+		theme->viewNodeParams(params);
+		delete portal;
+		return true;
+	}
+			
+	if(!portal->getTheme(*theme, 0))
+	{
 		delete portal;
 		return false;
 	}
-
-	//theme information
-	theme->id(atoi (portal->getData(0)));
-	theme->layerId (atoi(portal->getData(1)));
-	theme->view (atoi(portal->getData (2)));
-	theme->name(string (portal->getData("name")));
-	theme->parentId( atoi(portal->getData ("parent_id")));
-	theme->type (TeViewNodeType(atoi(portal->getData ("node_type"))));
-	theme->priority(portal->getInt("priority"));
-	theme->minScale (portal->getDouble ("min_scale"));
-	theme->maxScale (portal->getDouble ("max_scale"));
-	theme->attributeRest(string(portal->getData ("generate_attribute_where")));
-	theme->spatialRest(string(portal->getData ("generate_spatial_where")));
-	theme->temporalRest(string(portal->getData ("generate_temporal_where")));
-	theme->collectionTable(string(portal->getData ("collection_table")));
-	theme->collectionAuxTable(theme->collectionTable() + "_aux");
-	theme->visibleRep(atoi(portal->getData ("visible_rep")));
-	theme->visibility(atoi(portal->getData ("enable_visibility")));
 	
-	//load layer
-	int id = theme->layerId();
-	TeLayerMap::iterator it = layerMap_.find(id);
-	if (it == layerMap_.end())
+	if(viewNodeType==(int)TeTHEME)
 	{
-		layerMap_.clear();
-		loadLayerSet();
+		//load layer
+		int id = static_cast<TeTheme*>(theme)->layerId();
+		TeLayerMap::iterator it = metaModel_->layerMap().find(id);
+		if (it == metaModel_->layerMap().end())
+			loadLayerSet(loadAttrList);
+		
+		static_cast<TeTheme*>(theme)->layer(metaModel_->layerMap()[id]);
 	}
-	theme->layer(layerMap_[id]);
-	portal->freeResult();
-
-	// load them grouping
-	get = "SELECT * FROM te_grouping  WHERE theme_id = " + Te2String(theme->id());
-	if (portal->query (get) && portal->fetchRow())
-	{	
-		TeAttributeRep atRep;
-		string attname = portal->getData ("grouping_attr");
-		string norname = portal->getData ("grouping_norm_attr");
-		int f = attname.find("(");
-		if(f >= 0)
+		
+	//load grouping 
+	TeGrouping group;
+	if(portal->getGrouping(group, 20))
+		theme->grouping(group);
+
+	//load all legends of this theme
+	//and its visual
+	bool hasLegsToThisTheme = true;
+	bool hasNewRow = true;
+	while(hasLegsToThisTheme)
+	{
+		//legend
+		TeLegendEntry legend;
+		if(!portal->getLegend(legend, 30))
 		{
-			string alias = attname;
-			attname.erase(f, attname.size()-f);
-			alias.erase(0, f+1);
-			alias.erase(alias.size()-1, 1);
-			map<string, string>& m = mapThemeAlias_[theme->id()];
-			m[attname] = alias;
+			delete portal;
+			return false;
 		}
-		f = norname.find("(");
-		if(f >= 0)
+
+		//visual
+		TeRasterVisual* rasterVisual = new TeRasterVisual();
+		bool hasVisualToThisLeg = true;
+		bool hasRasterVisual = false;
+		while(hasVisualToThisLeg)
 		{
-			string alias = norname;
-			norname.erase(f, norname.size()-f);
-			alias.erase(0, f+1);
-			alias.erase(alias.size()-1, 1);
-			map<string, string>& m = mapThemeAlias_[theme->id()];
-			m[norname] = alias;
+			TeVisual* visual = TeVisualFactory::make(visualType);
+			TeGeomRep geomRep;
+			if(portal->getVisual(visual, geomRep, 37))
+				legend.setVisual(visual, geomRep);
+								
+			if(portal->getRasterVisual(*rasterVisual, 61))
+				hasRasterVisual=true;
+			
+			hasNewRow = portal->fetchRow();
+			if(!hasNewRow || portal->getInt(32)!= legend.group() || portal->getInt(30)!= legend.id() )  //if legend_id and group_id
+				hasVisualToThisLeg = false;
 		}
 
-		if(attname=="NONE")
-			attname = "";
-		
-		if(norname=="NONE")
-			norname = "";
-		
-		atRep.name_ = attname;
-		atRep.type_ = TeAttrDataType(atoi(portal->getData ("grouping_attr_type")));
+		//Set raster visual to this theme
+		if(hasRasterVisual)
+			theme->rasterVisual(rasterVisual);
+		else
+			delete rasterVisual;
+
+		//Set legend to this theme
+		theme->legend(legend); 
+														
+		//fill legend buffer
+		if(legend.group() == -6)	
+			metaModel_->legendMap()[legend.id()] = &theme->queryAndPointingLegend();
+		else if(legend.group() == -5)	
+			metaModel_->legendMap()[legend.id()] = &theme->queryLegend(); 
+		else if (legend.group() == -4)
+			metaModel_->legendMap()[legend.id()] = &theme->pointingLegend(); 
+		else if (legend.group() == -3)
+			metaModel_->legendMap()[legend.id()] = &theme->defaultLegend(); 
+		else if (legend.group() == -2)
+			metaModel_->legendMap()[legend.id()] = &theme->withoutDataConnectionLegend(); 
+		else if (legend.group() == -1)
+			metaModel_->legendMap()[legend.id()] = &theme->outOfCollectionLegend(); 
+		else if (legend.group() == -10) //own legend
+		{
+			TeLegendEntry* legendTemp = new TeLegendEntry(legend);
+			metaModel_->legendMap()[legend.id()] = legendTemp;
+		}	
 		
-		TeGrouping* g = new TeGrouping ( atRep, norname, 
-						TeGroupingMode(atoi(portal->getData ("grouping_mode"))),
-						atoi(portal->getData ("grouping_number")),
-						atoi(portal->getData ("grouping_precision")),
-						portal->getDouble("grouping_std_dev"), 
-						portal->getData("grouping_function") );
-
-		theme->grouping(g);
+		if(!hasNewRow || portal->getInt(0)!= theme->id())
+			hasLegsToThisTheme = false;
 	}
-	portal->freeResult();
 
-	// load theme tables
-	if(!loadThemeTable(theme))
+	delete portal;
+			
+	for (unsigned int i = 0; i < theme->legend().size(); ++i)
+		metaModel_->legendMap()[theme->legend()[i].id()] = &theme->legend()[i];
+
+	//load theme table
+	if(theme->type()==(int)TeTHEME)
 	{
-		delete portal;
-		return false;
+		if(!loadThemeTable(static_cast<TeTheme*>(theme), loadAttrList))
+			return false;
 	}
 
-	get = "SELECT * FROM te_visual_raster  WHERE theme_id = " + Te2String(theme->id());
-	if (portal->query (get) && portal->fetchRow())
+	//load specific theme parameters
+	if(!theme->loadMetadata(this))
 	{
-		TeRasterTransform* vis = new TeRasterTransform();
-		vis->setSrcBand(portal->getInt(1));
-		vis->setDestBand(portal->getInt(2));
-		vis->setTransfFunction(static_cast<TeRasterTransform::TeRasterTransfFunctions>(portal->getInt(3)));
-		if (vis->getTransfFunction() == TeRasterTransform::TeExtractRGB || 
-			vis->getTransfFunction() == TeRasterTransform::TeExtractBands)
-		{
-			do
-			{
-				vis->setBChannelMapping(portal->getInt(1),static_cast<TeRasterTransform::TeRGBChannels>(portal->getInt(2)));
-			}while (portal->fetchRow());
-		}
-		theme->rasterVisual(vis);
+		metaModel_->invalidThemeMap()[theme->id()] = theme;
+		delete portal;
+		return false;
 	}
-
-	// load theme legends  
-	loadLegend(theme);
-
-	themeMap_[theme->id()] = theme;
-
-	delete portal;
+			
+	metaModel_->themeMap()[theme->id()] = theme;
 	return true;
 }
 
 
 bool
-TeDatabase::loadThemeTable (TeTheme* theme)
+TeDatabase::loadThemeTable (TeTheme* theme, const bool& loadAttrList)
 {
 	TeDatabasePortal* portal = this->getPortal();
 	if(!portal)
 	{
-		this->errorMessage_ = "N�o foi poss�vel abrir portal para o banco";
+		this->errorMessage_ = "N�o foi poss�vel abrir portal para o banco";
 		return false;
 	}
 	
 	//theme tables
-	string sel = "SELECT te_theme_table.*, te_tables_relation.*, te_layer_table.*";
+	string sel = "SELECT te_theme_table.*, ";  //0 - 4 (5 columnns)
+	sel += " te_tables_relation.*, ";          //5 - 9  (5 columns)
+	sel += " te_layer_table.* ";			   //10	
 	sel += " FROM (te_theme_table LEFT JOIN te_tables_relation";
 	sel += " ON te_theme_table.relation_id = te_tables_relation.relation_id)";
 	sel += " LEFT JOIN te_layer_table ON te_theme_table.table_id = te_layer_table.table_id";
@@ -1987,32 +3994,41 @@ TeDatabase::loadThemeTable (TeTheme* theme)
 
 	while(portal->fetchRow ())
 	{
-		string tableName = portal->getData("attr_table");
-		TeAttributeList attrList;
-		getAttributeList(tableName, attrList);
-		string uniqueId = portal->getData("unique_id");
-		string linkName = portal->getData("attr_link");
-
-		TeTable table(tableName, attrList, uniqueId, linkName);
-		table.setId(portal->getInt("te_theme_table.table_id"));
-		table.setOrder(portal->getInt("table_order"));
-		table.attInitialTime(portal->getData("attr_initial_time"));
-		table.attFinalTime(portal->getData("attr_final_time"));
-		table.attTimeUnit(TeChronon(portal->getInt("attr_time_unit")));
-
-		int tableType = portal->getInt("attr_table_type");
-		if (tableType == TeAttrExternal)
-		{
-			int relatedTableId = portal->getInt("related_table_id");
-			table.relatedTableName(getTableName(relatedTableId));
-			int relationId = portal->getInt("te_theme_table.relation_id");
-			relationMSet_.insert(relationId);
+		string tableName = portal->getData(12);
+		if(tableName.empty())
+			continue;
 
-			string relatedAttr = portal->getData("related_attr");
-			table.setTableType(TeAttrExternal, relatedTableId, relatedAttr);
+		TeTable table(tableName);
 
-			table.setLinkName(portal->getData("external_attr"));
-		}
+		TeLayerMap::iterator itLayer = metaModel_->layerMap().find(theme->layerId());
+		if(itLayer!=metaModel_->layerMap().end() && (!itLayer->second->getAttrTablesByName(tableName, table)))
+		{
+			TeAttributeList attrList;
+			if(loadAttrList)
+				getAttributeList(tableName, attrList);
+			table.setAttributeList(attrList);
+			if(!portal->getAttrTable(table, 10))
+			{
+				delete portal;
+				return false;
+			}
+		}
+
+		table.setId(portal->getInt(2)); //"te_theme_table.table_id"
+		table.setOrder(portal->getInt(4)); //"table_order"
+		TeAttrTableType tableType = table.tableType(); //portal->getInt("attr_table_type");
+		if (tableType == TeAttrExternal)
+		{
+			int relatedTableId = portal->getInt(6); //"related_table_id"
+			table.relatedTableName(getTableName(relatedTableId));
+			int relationId = portal->getInt(3); //"te_theme_table.relation_id"
+			metaModel_->relationMSet().insert(relationId);
+
+			string relatedAttr = portal->getData(7); //"related_attr"
+			table.setTableType(TeAttrExternal, relatedTableId, relatedAttr);
+
+			table.setLinkName(portal->getData(9)); //"external_attr"
+		}
 		else
 			table.setTableType((TeAttrTableType)tableType);
 
@@ -2058,7 +4074,7 @@ TeDatabase::insertThemeTable(TeTheme *theme, TeTable& inputTable)
 									inputTable.name(),inputTable.linkName(),relationId);
 		if (status == false)
 			return false;
-		relationMSet_.insert(relationId);
+		metaModel_->relationMSet().insert(relationId);
 
 		status = insertThemeTable(themeId, inputTable.id(), relationId, tableOrder);
 	}
@@ -2098,28 +4114,26 @@ TeDatabase::removeThemeTable(TeTheme *theme, int tableOrder)
 	}
 	delete portal;
 
+	// Remove the table from the te_theme_table
+	qString = "DELETE FROM te_theme_table WHERE theme_id = " + Te2String(theme->id());
+	qString += " AND table_order = " + Te2String(tableOrder);
+	if (execute(qString) == false)
+		return false;
+
 	// Remove the relation from the te_tables_relation
 	// table if only this theme is using it
 	if (relationId > 0)
 	{
-		if (relationMSet_.count(relationId) == 1)
+		if (metaModel_->relationMSet().count(relationId) == 1)
 		{
 			qString = "DELETE FROM te_tables_relation WHERE relation_id = " + Te2String(relationId);
 			if (execute(qString) == false)
 				return false;
-			relationMSet_.erase(relationId);
+			metaModel_->relationMSet().erase(relationId);
 		}
 		else
-			relationMSet_.erase(relationMSet_.find(relationId));
+			metaModel_->relationMSet().erase(metaModel_->relationMSet().find(relationId));
 	}
-
-	// Remove the table from the te_theme_table
-	qString = "DELETE FROM te_theme_table WHERE theme_id = " + Te2String(theme->id());
-	qString += " AND table_order = " + Te2String(tableOrder);
-
-	if (execute(qString) == false)
-		return false;
-
 	return true;
 }
 
@@ -2150,20 +4164,13 @@ TeDatabase::updateThemeTable(TeTheme *theme)
 
 		// Remove the relation from the te_tables_relation
 		// table if only this theme is using it
+		bool b = false;
 		if (relationId > 0)
 		{
-			if (relationMSet_.count(relationId) == 1)
-			{
-				q = "DELETE FROM te_tables_relation WHERE relation_id = " + Te2String(relationId);
-				if (execute(q) == false)
-				{
-					delete portal;
-					return false;
-				}
-				relationMSet_.erase(relationId);
-			}
+			if (metaModel_->relationMSet().count(relationId) == 1)
+				b = true;
 			else
-				relationMSet_.erase(relationMSet_.find(relationId));
+				metaModel_->relationMSet().erase(metaModel_->relationMSet().find(relationId));
 		}
 
 		// Remove the table from the te_theme_table
@@ -2174,6 +4181,16 @@ TeDatabase::updateThemeTable(TeTheme *theme)
 			delete portal;
 			return false;
 		}
+		if(b)
+		{
+			q = "DELETE FROM te_tables_relation WHERE relation_id = " + Te2String(relationId);
+			if (execute(q) == false)
+			{
+				delete portal;
+				return false;
+			}
+			metaModel_->relationMSet().erase(relationId);
+		}
 	}
 	delete portal;
 
@@ -2189,28 +4206,29 @@ TeDatabase::updateThemeTable(TeTheme *theme)
 
 
 bool 
-TeDatabase::insertGrouping (int themeId, TeGrouping* grouping)
+TeDatabase::insertGrouping (int themeId, const TeGrouping& grouping)
 {
-	if((themeId < 1) || (!grouping) )
+	if((themeId < 1) || (grouping.groupMode_ == TeNoGrouping) )
 		return false;
 
 	string ins = " INSERT INTO te_grouping (theme_id, grouping_number, ";
 	ins += " grouping_attr, grouping_attr_type, grouping_mode, "; 
-	ins += " grouping_norm_attr, grouping_std_dev, grouping_precision, grouping_function )"; 
+	ins += " grouping_norm_attr, grouping_std_dev, grouping_precision, "; 
+	ins += " grouping_function, grouping_chronon)"; 
 	ins += " VALUES ( ";
 	ins += Te2String(themeId);
-	ins += ", "+ Te2String(grouping->groupNumSlices_);
+	ins += ", "+ Te2String(grouping.groupNumSlices_);
 
-	string attname = grouping->groupAttribute_.name_;
+	string attname = grouping.groupAttribute_.name_;
 	if(attname.empty() || (attname=="NONE") )
 		attname = "";
 	
-	string norname = grouping->groupNormAttribute_;
+	string norname = grouping.groupNormAttribute_;
 	if(norname.empty() || (norname=="NONE"))
 		norname = "";
 
-	map<int, map<string, string> >::iterator it = mapThemeAlias_.find(themeId);
-	if(it != mapThemeAlias_.end())
+	map<int, map<string, string> >::iterator it = metaModel_->mapThemeAlias().find(themeId);
+	if(it != metaModel_->mapThemeAlias().end())
 	{
 		map<string, string>::iterator tit = it->second.find(attname);
 		if(tit != it->second.end())
@@ -2230,36 +4248,37 @@ TeDatabase::insertGrouping (int themeId, TeGrouping* grouping)
 	}
 
 	ins += ", '"+ attname +"'";
-	ins += ", "+ Te2String(grouping->groupAttribute_.type_);
-	ins += ", "+ Te2String(grouping->groupMode_);
+	ins += ", "+ Te2String(grouping.groupAttribute_.type_);
+	ins += ", "+ Te2String(grouping.groupMode_);
 	ins += ", '"+ norname +"'";
-	ins += ", "+ Te2String(grouping->groupStdDev_); 
-	ins += ", "+ Te2String(grouping->groupPrecision_);
-	ins += ", '"+ grouping->groupFunction_ +"'";
+	ins += ", "+ Te2String(grouping.groupStdDev_); 
+	ins += ", "+ Te2String(grouping.groupPrecision_);
+	ins += ", '"+ grouping.groupFunction_ +"'";
+	ins += ", "+ Te2String(grouping.groupChronon_);
 	ins += ")";
 
 	return (execute(ins));
 }
 
 bool 
-TeDatabase::updateGrouping (int themeId, TeGrouping* grouping)
+TeDatabase::updateGrouping (int themeId, const TeGrouping& grouping)
 {
-	if((themeId < 1) || (!grouping))
+	if((themeId < 1) || (grouping.groupMode_ == TeNoGrouping))
 		return false;
 
 	string up = " UPDATE te_grouping SET ";
-	up += "  grouping_number = "+ Te2String(grouping->groupNumSlices_);
+	up += "  grouping_number = "+ Te2String(grouping.groupNumSlices_);
 
-	string attname = grouping->groupAttribute_.name_;
+	string attname = grouping.groupAttribute_.name_;
 	if(attname.empty() || (attname=="NONE"))
 		attname = "";
 
-	string norname = grouping->groupNormAttribute_;
+	string norname = grouping.groupNormAttribute_;
 	if(norname.empty()|| (norname=="NONE"))
 		norname = "";
 
-	map<int, map<string, string> >::iterator it = mapThemeAlias_.find(themeId);
-	if(it != mapThemeAlias_.end())
+	map<int, map<string, string> >::iterator it = metaModel_->mapThemeAlias().find(themeId);
+	if(it != metaModel_->mapThemeAlias().end())
 	{
 		map<string, string>::iterator tit = it->second.find(attname);
 		if(tit != it->second.end())
@@ -2279,19 +4298,20 @@ TeDatabase::updateGrouping (int themeId, TeGrouping* grouping)
 	}
 
 	up += ", grouping_attr = '"+ attname +"'";
-	up += ", grouping_attr_type = "+ Te2String(grouping->groupAttribute_.type_);
-	up += ", grouping_mode = "+ Te2String(grouping->groupMode_);
+	up += ", grouping_attr_type = "+ Te2String(grouping.groupAttribute_.type_);
+	up += ", grouping_mode = "+ Te2String(grouping.groupMode_);
 	up += ", grouping_norm_attr = '"+ norname +"'";
-	up += ", grouping_std_dev = "+ Te2String(grouping->groupStdDev_); 
-	up += ", grouping_precision = "+ Te2String(grouping->groupPrecision_);
-	up += ", grouping_function = '"+ grouping->groupFunction_ +"'";
+	up += ", grouping_std_dev = "+ Te2String(grouping.groupStdDev_); 
+	up += ", grouping_precision = "+ Te2String(grouping.groupPrecision_);
+	up += ", grouping_function = '"+ grouping.groupFunction_ +"'";
+	up += ", grouping_chronon = "+ Te2String(grouping.groupChronon_);
 	up += " WHERE theme_id = "+ Te2String(themeId);
 
 	return (execute(up));
 }
 
 bool 
-TeDatabase::generateLabelPositions(TeTheme *theme)
+TeDatabase::generateLabelPositions(TeTheme *theme, const std::string& objectId)
 {
 	string	piebar, geomTable, upd;
 	string	collTable = theme->collectionTable();
@@ -2306,10 +4326,13 @@ TeDatabase::generateLabelPositions(TeTheme *theme)
 		piebar = "SELECT label_x, label_y, lower_x, lower_y, upper_x, upper_y";
 		piebar += " FROM " + collTable + " LEFT JOIN " + geomTable;
 		piebar += " ON " + collTable + ".c_object_id = " + geomTable + ".object_id";
+		if (!objectId.empty())
+			upd += " WHERE " +  collTable + ".c_object_id = '" + objectId + "'";
 
 		upd = " UPDATE (" + piebar + ") SET";
 		upd += " label_x = lower_x + (upper_x-lower_x)/2,";
 		upd += " label_y = lower_y + (upper_y-lower_y)/2";
+		
 
 		if(!execute(upd))
 			return false;
@@ -2323,6 +4346,8 @@ TeDatabase::generateLabelPositions(TeTheme *theme)
 		piebar += " FROM " + collTable + " LEFT JOIN " + geomTable;
 		piebar += " ON " + collTable + ".c_object_id = " + geomTable + ".object_id";
 		piebar += " WHERE label_x is null OR label_y is null";
+		if (!objectId.empty())
+			upd += " AND " +  collTable + ".c_object_id = '" + objectId + "'";
 		piebar += " ORDER BY c_object_id ASC, ext_max ASC";
 		
 		upd = " UPDATE (" + piebar + ") SET";
@@ -2341,6 +4366,9 @@ TeDatabase::generateLabelPositions(TeTheme *theme)
 		piebar += " FROM " + collTable + " LEFT JOIN " + geomTable;
 		piebar += " ON " + collTable + ".c_object_id = " + geomTable + ".object_id";
 		piebar += " WHERE label_x is null OR label_y is null";
+		if (!objectId.empty())
+			upd += " AND " +  collTable + ".c_object_id = '" + objectId + "'";
+
 		upd = " UPDATE (" + piebar + ") SET";
 		upd += " label_x = x,";
 		upd += " label_y = y";
@@ -2357,6 +4385,8 @@ TeDatabase::generateLabelPositions(TeTheme *theme)
 		piebar += " FROM " + collTable + " LEFT JOIN " + geomTable;
 		piebar += " ON " + collTable + ".c_object_id = " + geomTable + ".object_id";
 		piebar += " WHERE label_x is null OR label_y is null";
+		if (!objectId.empty())
+			upd += " AND " +  collTable + ".c_object_id = '" + objectId + "'";
 		piebar += " ORDER BY c_object_id ASC, ext_max ASC";
 		
 		upd = " UPDATE (" + piebar + ") SET";
@@ -2366,7 +4396,6 @@ TeDatabase::generateLabelPositions(TeTheme *theme)
 		if(!execute(upd))
 			return false;
 	}
-
 	return true;
 }
 
@@ -2399,27 +4428,124 @@ TeDatabase::themeExist(string themeName)
 	return false;
 }
 
+string TeDatabase::getNewThemeName(const string& n)
+{
+	bool changed;
+	string invalidChar;
+	string name = TeCheckName(n, changed, invalidChar);
+	string newName = name;
+
+	string q = "SELECT name FROM te_theme WHERE name = '" + newName + "'";
+
+	TeDatabasePortal* portal = this->getPortal();
+	if(portal && portal->query(q) && portal->fetchRow())
+	{
+		// there is already a theme with this theme 
+		q = "SELECT name FROM te_theme WHERE name LIKE '" + name + "_%' ORDER BY name DESC";
+		portal->freeResult();
+		if(portal && portal->query(q))
+		{
+			newName.clear();
+			while(portal->fetchRow())
+			{
+				string s = portal->getData(0);
+				size_t i, f = s.rfind("_");
+				f++;
+				newName = s.substr(0, f);
+				string ss = s.substr(f);
+				for(i=0; i < ss.size(); ++i)
+				{
+					if(ss[i] < 0x30 || ss[i] > 0x39)
+						break;
+				}
+				if(i < ss.size())
+					continue;
+
+				int n = atoi(ss.c_str()) + 1;
+				s = Te2String(n);
+				newName += s;
+				break;
+			}
+			if(newName.empty())
+				newName = name + "_1";
+		}
+	}
+	delete portal;
+	return newName;
+}
+
+string TeDatabase::getNewTableName(const string& n)
+{
+	bool changed;
+	string invalidChar;
+	string name = TeCheckName(n, changed, invalidChar);
+	string newName = name;
+	int	i=1;
+	while (this->tableExist(newName))
+	{
+		newName = name + Te2String(i);
+		++i;
+	}
+	return newName;
+}
+
+string TeDatabase::getConcatFieldsExpression(const vector<string>& fNamesVec)
+{
+	string concatExp;
+	for (unsigned int i = 0; i < fNamesVec.size(); ++i)
+	{
+		if (i != 0)
+			concatExp += " & ";
+		concatExp += fNamesVec[i];
+	}
+	return concatExp;
+}
+
+
 bool
 TeDatabase::deleteTheme(int themeId)
 {
-	string sql;
+	TeAbstractTheme* tema;
+	bool themeWasFound = false;
+	TeThemeMap::iterator it;
+
+	it = invalidThemeMap().find(themeId);
+	if (it != invalidThemeMap().end())
+	{
+		themeWasFound = true;
+		tema = it->second;
+		invalidThemeMap().erase(themeId);
+	}
+
+	if (themeWasFound == false)
+	{
+		it = themeMap().find(themeId);
+		if(it != themeMap().end())
+		{
+			themeWasFound = true;
+			tema = it->second;
+			themeMap().erase(themeId);
+		}
+	}
 
+	if (themeWasFound == false)
+		return false;
+	
+	if(!tema->eraseMetadata(this))
+		return false;
+	
+	string sql;
 	// delete the collection table associated to this theme
 	TeDatabasePortal* portal = this->getPortal();
 	if(!portal)
 		return false;
 
 	sql = "SELECT collection_table FROM te_theme WHERE theme_id = " + Te2String(themeId);
-	if(!portal->query(sql))
+	if (!portal->query(sql) ||!portal->fetchRow())
 	{	
 		delete portal;
 		return false;
 	}
-	if (!portal->fetchRow())
-	{
-		delete portal;
-		return false;
-	}
 	string colTab = portal->getData("collection_table");
 	//delete collection table
 	if (this->tableExist(colTab))	
@@ -2441,14 +4567,13 @@ TeDatabase::deleteTheme(int themeId)
 			return false;
 		}
 	}
-
 	portal->freeResult();
 
 	//delete the visual associated to this theme
 	if (existRelation("te_visual","fk_visual_legend_id") != TeRICascadeDeletion)
 	{
 		sql = "SELECT legend_id FROM te_legend WHERE theme_id = " + Te2String(themeId);
-		if(!portal->query(sql))
+		if (!portal->query(sql))
 		{	
 			delete portal;
 			return false;
@@ -2463,11 +4588,29 @@ TeDatabase::deleteTheme(int themeId)
 			wherec += portal->getData(0);
 		}
 		portal->freeResult();
-		sql = "DELETE FROM te_visual WHERE legend_id IN (" + wherec + ")";
-		if (!this->execute(sql))
-		{	
-			delete portal;
-			return false;
+        if (!wherec.empty()) 
+        {
+			sql = "DELETE FROM te_visual WHERE legend_id IN (" + wherec + ")";
+			if (!this->execute(sql))
+			{	
+				delete portal;
+				return false;
+			}
+	   }
+	}
+
+	//delete lut table from current raster visual, if it exist
+	if(tema->rasterVisual())
+	{
+		if(!tema->rasterVisual()->getLutTableName().empty())
+		{
+			std::string lutTableName = tema->rasterVisual()->getLutTableName();
+
+			if (this->tableExist(lutTableName))
+			{
+				if(!this->deleteTable(lutTableName))
+					return false;
+			}
 		}
 	}
 
@@ -2496,33 +4639,14 @@ TeDatabase::deleteTheme(int themeId)
 	//select the view of this theme
 	sql = "SELECT view_id FROM te_theme WHERE theme_id = " + Te2String(themeId);
 	portal->freeResult();
-	if(!portal->query(sql))
+	if(!portal->query(sql) || !portal->fetchRow())
 	{	
 		delete portal;
 		return false;
 	}
-	if (!portal->fetchRow())
-	{
-		delete portal;
-		return false;
-	}
 
+	//delete theme of the view tree
 	int viewId = portal->getInt("view_id");
-	TeView* view = viewMap_[viewId];
-	TeTheme* tema = (TeTheme*)view->remove(themeId); 
-	if(!tema)
-	{
-		delete portal;
-		return false;
-	}
-
-	unsigned int i;
-	TeLegendEntryVector& legendVector = tema->legend();
-	for (i = 0; i < legendVector.size(); ++i)
-		legendMap_.erase(legendVector[i].id());
-	themeMap_.erase(themeId);
-
-	delete tema;
 	delete portal;
 
 	//delete the tables associated to this theme
@@ -2549,11 +4673,25 @@ TeDatabase::deleteTheme(int themeId)
 			return false;
 	}
 
+	sql = " UPDATE te_view SET current_theme = NULL WHERE current_theme = "+ Te2String(themeId);
+	this->execute(sql);
+	
 	// delete the theme
-	sql = "DELETE FROM te_theme WHERE theme_id = " + Te2String(themeId);
+	sql = " DELETE FROM te_theme WHERE theme_id = " + Te2String(themeId);
 	if (!this->execute (sql))
 		return false;
 
+	//delete in the maps
+	TeView* view = viewMap()[viewId];
+	if (view) //this view exists
+		view->remove(themeId); 
+
+    unsigned int i;
+	TeLegendEntryVector& legendVector = tema->legend();
+	for (i = 0; i < legendVector.size(); ++i)
+		legendMap().erase(legendVector[i].id());
+	
+	delete tema;
 	return true;
 }
 
@@ -2562,7 +4700,7 @@ TeDatabase::deleteThemeGroup(int themeId)
 {
 	string sql;
 	// delete the theme
-	sql = "DELETE FROM te_theme WHERE theme_id = " + Te2String(themeId);
+	sql = "DELETE FROM te_grouping WHERE theme_id = " + Te2String(themeId);
 	if (!this->execute (sql))
 		return false;
 	return true;
@@ -2602,10 +4740,10 @@ TeDatabase::deleteLegend(int themeId)
 
 	// Delete from memory the legends of the theme
 	unsigned int i;
-	TeTheme *theme = themeMap_[themeId];
+	TeAbstractTheme *theme = metaModel_->themeMap()[themeId];
 	TeLegendEntryVector& legendVector = theme->legend();
 	for (i = 0; i < legendVector.size(); ++i)
-		legendMap_.erase(legendVector[i].id());
+		metaModel_->legendMap().erase(legendVector[i].id());
 	legendVector.clear();
 
 	//delete grouping
@@ -2622,58 +4760,159 @@ TeDatabase::updateLayer(TeLayer *layer)
 	if (!layer)
 		return false;
 
+	if (layer->projection())
+		updateProjection(layer->projection());
+
 	string sql;
 	sql = "UPDATE te_layer SET ";
 	sql += "name = '" + layer->name() + "' ";
-	sql += ", lower_x = " + Te2String(layer->box().x1(),15) + " ";
-	sql += ", lower_y = " + Te2String(layer->box().y1(),15) + " ";
-	sql += ", upper_x = " + Te2String(layer->box().x2(),15) + " ";
-	sql += ", upper_y = " + Te2String(layer->box().y2(),15) + " ";
-	sql += " WHERE layer_id = " + Te2String(layer->id());
+	if (layer->box().isValid())
+	{
+		sql += ", lower_x = " + Te2String(layer->box().x1(),15) + " ";
+		sql += ", lower_y = " + Te2String(layer->box().y1(),15) + " ";
+		sql += ", upper_x = " + Te2String(layer->box().x2(),15) + " ";
+		sql += ", upper_y = " + Te2String(layer->box().y2(),15) + " ";
+	}else
+	{
+		sql += ", lower_x = " + Te2String(layer->box().x1()) + " ";
+		sql += ", lower_y = " + Te2String(layer->box().y1()) + " ";
+		sql += ", upper_x = " + Te2String(layer->box().x2()) + " ";
+		sql += ", upper_y = " + Te2String(layer->box().y2()) + " ";
+	}
+	if(layer->getEditionTime().isValid())
+	{
+		TeTime editionTime = layer->getEditionTime();
+		sql += ", edition_time = " + this->getSQLTime(editionTime);
+	}
+	sql +=  " WHERE layer_id = " + Te2String(layer->id());
 
-	if (layer->projection())
-		updateProjection(layer->projection());
 	return (this->execute (sql));
 }
 
 bool
-TeDatabase::loadLayerSet()
+TeDatabase::loadLayerSet(const bool& loadAttrList)
 {
+	//clear layer map
+	TeLayerMap::iterator it = metaModel_->layerMap().begin();
+	while (it != metaModel_->layerMap().end())
+	{
+		if(it->second)
+			delete it->second;
+		++it;
+	}
+	metaModel_->layerMap().clear();
+	
+	string sql = " SELECT te_layer.*, "; // 0 - 9 (10 columns)
+	sql += " te_projection.*, "; // 10 - 26  (17 columns)
+	sql += " te_representation.*, "; // 27 - 41 (15 columns)
+	sql += " te_layer_table.* "; // 42 - 53 (12 columns)
+	
+	sql += " FROM (((te_layer INNER JOIN te_projection ";
+	sql += " ON te_layer.projection_id = te_projection.projection_id) ";
+	sql += " LEFT JOIN te_representation ON ";
+	sql += " te_layer.layer_id = te_representation.layer_id) ";
+	sql += " LEFT JOIN te_layer_table ON ";
+	sql += " te_layer.layer_id = te_layer_table.layer_id) ";
+
+	sql += " ORDER BY te_layer.layer_id, te_representation.geom_type, te_layer_table.table_id ";
+
 	TeDatabasePortal* portal = this->getPortal();
 	if(!portal)
 		return false;
 
-	string get = "SELECT * FROM te_layer";
-	if (!portal->query(get))
+	if (!portal->query(sql))
 	{	
-		layerMap_.clear();
 		delete portal;
 		return false;
 	}
-
-	int lid;
-	while (portal->fetchRow())
+	
+	int lastLayerId = -1;
+	TeLayer *layer = 0;
+	bool hasNewRow = portal->fetchRow(); //idicates that this portal was fetched 
+	while(hasNewRow)
 	{
-		TeLayer* layer = 0;
-		lid = portal->getInt("layer_id");
-		
-		TeLayerMap::iterator it = layerMap_.find(lid);
-		// if layer is not in the cache yet load it in a new pointer
-		if (it == layerMap_.end())
+		//load view and its projection 
+		if(lastLayerId!=atoi(portal->getData(0)))
 		{
+			TeProjection* proj = 0;
+			if(!portal->getProjection(&proj, 10)) //load projection
+			{
+				delete portal;
+				return false;
+			}
 			layer = new TeLayer();
-			layer->id(lid);
- 			loadLayer(layer);
+			if(!portal->getLayer(*layer, 0)) //load layer
+			{
+				delete portal;
+				delete layer;
+				return false;
+			}
+			if (proj != 0)
+				layer->setProjection(proj);
+			lastLayerId = layer->id();
 		}
-		// else just refresh the pointer
-		else
+
+		//load its representation and its tables
+		bool hasRepsTablesToThisLayer = true;
+		vector<int> loadedTableId;
+		while(hasRepsTablesToThisLayer)
 		{
-			it->second->id(lid);
-			loadLayer(it->second);
+			//load representation
+			string repId = portal->getData(27);
+
+			TeRepresPointerVector::iterator it;
+
+			//bool textLoaded = false;
+
+			//for(it = layer->vectRepres().begin(); it != layer->vectRepres().end(); ++it)
+			//{
+			//	if((*it)->id_ == atoi(repId.c_str()))
+			//	{
+			//		textLoaded = true;
+			//		break;
+			//	}
+			//}
+
+			if(!repId.empty() && 
+				(!layer->hasGeometry(TeGeomRep(portal->getInt(29))) || 
+				(TeGeomRep(portal->getInt(29)) == TeTEXT))/* && (!textLoaded)*/)
+			{
+				TeRepresentation* rep = new TeRepresentation();
+				if(!portal->getRepresentation(*rep, 27))
+				{
+					delete rep;
+					delete layer;
+					delete portal;
+				}
+				layer->addVectRepres(rep);
+			}
+			
+			//load tables
+			if( find(loadedTableId.begin(), loadedTableId.end(), portal->getInt(42)) == loadedTableId.end())
+			{
+				TeTable attrTable;
+				if(portal->getAttrTable(attrTable, 42))
+				{
+					TeAttributeList attrList;
+					if(loadAttrList)
+						getAttributeList(attrTable.name(), attrList);
+					attrTable.setAttributeList(attrList);
+					layer->addAttributeTable(attrTable);
+					loadedTableId.push_back(attrTable.id());
+				}
+			}
+			hasNewRow = portal->fetchRow();
+			if(!hasNewRow || portal->getInt(0)!= layer->id())
+				hasRepsTablesToThisLayer = false;
 		}
+
+		layer->setDatabase(this);
+		metaModel_->layerMap()[layer->id()] = layer;
 	}
+
 	delete portal;
 	return true;
+
 }
 
 string
@@ -2689,7 +4928,7 @@ TeDatabase::getRasterTable(int layerId, const string& objectId)
 	string get;
 	// get the raster representation
 	get = "SELECT geom_table FROM te_representation WHERE layer_id = "+Te2String(layerId);
-	get += " AND geom_type= " + Te2String((int)TeRASTER);
+	get += " AND (geom_type= " + Te2String((int)TeRASTER) + " OR geom_type= " + Te2String((int)TeRASTERFILE) + ")";
 	
 	// error executing query or no there is no raster representation 
 	if (!portal->query(get) || !portal->fetchRow())
@@ -2731,9 +4970,10 @@ TeDatabase::loadLayerRaster(int layerId, const string& objectId, const char& mod
 
 	TeRaster* raster = 0;
 	string get;
+
 	// get the raster representation
-	get = "SELECT geom_table FROM te_representation WHERE layer_id = "+Te2String(layerId);
-	get += " AND geom_type= " + Te2String((int)TeRASTER);
+	get = "SELECT geom_table, geom_type, initial_time FROM te_representation WHERE layer_id = "+Te2String(layerId);
+	get += " AND (geom_type= " + Te2String((int)TeRASTER) + " OR geom_type= " + Te2String((int)TeRASTERFILE) + ")";
 	
 	// error executing query or no there is no raster representation 
 	if (!portal->query(get) || !portal->fetchRow())
@@ -2741,8 +4981,9 @@ TeDatabase::loadLayerRaster(int layerId, const string& objectId, const char& mod
 		delete portal;
 		return 0;
 	}
-
 	string tableName = portal->getData(0);
+	TeGeomRep rep = static_cast<TeGeomRep>(portal->getInt(1));
+	TeTime date = portal->getDate(2);
 	portal->freeResult();
 	if (tableName.empty())
 	{
@@ -2759,7 +5000,7 @@ TeDatabase::loadLayerRaster(int layerId, const string& objectId, const char& mod
 	if(!columnExist(tableName, attrRep.name_,att))
 	{
 		addColumn (tableName, attrRep);
-		string sql = "UPDATE " + tableName + " SET tiling_type = " + Te2String(static_cast<int>(TeExpansible));
+		string sql = "UPDATE " + tableName + " SET tiling_type = " + Te2String(static_cast<int>(TeRasterParams::TeExpansible));
 		this->execute(sql);
 	}
 
@@ -2788,7 +5029,11 @@ TeDatabase::loadLayerRaster(int layerId, const string& objectId, const char& mod
 							     portal->getDouble("res_x"),portal->getDouble("res_y"));
 	params.blockHeight_ = portal->getInt("block_height");
 	params.blockWidth_ = portal->getInt("block_width");
-	params.tiling_type_ = static_cast<TeRasterTilingType>(portal->getInt("tiling_type"));
+	params.tiling_type_ = static_cast<TeRasterParams::TeRasterTilingType>(portal->getInt("tiling_type"));
+	if(date.isValid())
+	{
+		params.date_ = date;
+	}
 
 	portal->freeResult();
 
@@ -2805,37 +5050,33 @@ TeDatabase::loadLayerRaster(int layerId, const string& objectId, const char& mod
 			params.vmax_[i] = portal->getDouble("max_value");
 			params.vmin_[i] = portal->getDouble("min_value");
 			params.nbitsperPixel_[i] = portal->getInt("num_bits");
-			params.dataType_[i] = TeDataType(portal->getInt("data_type"));
-			params.compression_[i] = TeCompressionMode(portal->getInt("compression_type"));
-			params.photometric_[i] = portal->getInt("photometric_type");
+			params.dataType_[i] =  static_cast<TeDataType>(portal->getInt("data_type"));
+			params.compression_[i] = static_cast<TeRasterParams::TeRasterCompressionMode>(portal->getInt("compression_type"));
+			params.photometric_[i] = static_cast<TeRasterParams::TeRasterPhotometricInterpretation>(portal->getInt("photometric_type"));
 		}
 		portal->freeResult();
 	}
 
 	// if raster is pallete get the associated LUT
-	if ((params.photometric_[0] == TeRASTERPALETTE) ||  
-    (params.photometric_[0] == TeRASTERKERNEL))
+	if (params.photometric_[0] == TeRasterParams::TePallete && 	rep != TeRASTERFILE)
 		this->loadRasterLUT(&params);
 
 	// raster has the same projection as its layer
-	get = "SELECT projection_id FROM te_layer WHERE layer_id = " + Te2String(layerId);
-	int projId; 
+	get = " SELECT te_projection.* FROM ";
+	get += " te_projection INNER JOIN te_layer ON ";
+	get += " te_projection.projection_id = te_layer.projection_id ";
+	get += " WHERE layer_id = " + Te2String(layerId);
+	
 	TeProjection* proj=0;
 	if (portal->query(get) && portal->fetchRow())
-	{
-		projId = portal->getInt("projection_id");
-		proj = this->loadProjection(projId);
-	}
-	portal->freeResult();
+		portal->getProjection(&proj);
 
+	portal->freeResult();
 	params.projection(proj);
 	if (proj)
 		delete proj;
-	params.nTilesInMemory_ = 0;
-	params.database_ = this;
 
 	bool hasDummy = false;
-
 	get = "SELECT band_id, dummy FROM " + metadatatable + " WHERE geom_id=" + Te2String(geomId);
 	get += " AND NOT (dummy IS NULL)";
 	if (portal->query(get))
@@ -2850,14 +5091,39 @@ TeDatabase::loadLayerRaster(int layerId, const string& objectId, const char& mod
 	}
 	params.useDummy_ = hasDummy;
 	params.mode_ = mode;
+	params.objectId_ = oid;
+	params.layerId_ = layerId;
 	delete portal;
 
-	// builds a raster from the parameters
-	TeDecoderDatabase* dec = new TeDecoderDatabase(params);
-	dec->init();
-	raster = new TeRaster();
-	raster->setDecoder(dec);
-	raster->objectId(oid);
+	if ( rep == TeRASTER)
+	{
+		params.nTilesInMemory_ = 0;
+		params.database_ = this;
+		TeDecoderDatabase* dec = new TeDecoderDatabase(params);
+		dec->init();
+		raster = new TeRaster();
+		raster->setDecoder(dec);
+		raster->objectId(oid);
+		return raster;
+	}
+	try
+	{
+		raster = new TeRaster(params);
+	}
+	catch(...)
+	{
+		if (params.fileName_.empty() == false)
+		{
+			errorMessage_ = "File doesn't exist: ";
+			errorMessage_ += params.fileName_;
+		}
+		else
+		{
+			errorMessage_ = "Raster file is not accessible.";
+		}
+		return 0;
+	} 
+	raster->init();
 	return raster;
 }
 
@@ -2883,17 +5149,27 @@ TeDatabase::loadRasterLUT(TeRasterParams* par)
 		delete portal;
 		return false;
 	}
-
-	par->setNumberPalleteEntries(nentries);
 	portal->freeResult();
 
-	get = "SELECT * FROM " + par->lutName_ + " ORDER BY index_id ASC ";
+	par->lutr_.clear();
+	par->lutg_.clear();
+	par->lutb_.clear();
+
+	par->lutr_.resize(nentries);
+	par->lutg_.resize(nentries);
+	par->lutb_.resize(nentries);
 
+	par->lutr_.assign(nentries,0);
+	par->lutg_.assign(nentries,0);
+	par->lutb_.assign(nentries,0);
+
+	get = "SELECT * FROM " + par->lutName_ + " ORDER BY index_id ASC ";
 	if (!portal->query(get) || !portal->fetchRow())	 // if there is no table, or table is empty
 	{
 		delete portal;
 		return false;
 	}
+
 	do
 	{
 		int index = atoi(portal->getData(0));
@@ -2906,98 +5182,147 @@ TeDatabase::loadRasterLUT(TeRasterParams* par)
 	return true;
 }
 
+bool
+TeDatabase::createSpatialIndex(const string& table, const string& columns, TeSpatialIndexType /*type*/, short /*level*/, short /*tile*/)
+{
+	string idxName = "sp_idx_" + table;
+	return createIndex(table, idxName, columns);
+}
+
+string TeDatabase::getSpatialIdxColumn(TeGeomRep rep)
+{
+	string columns = "";
+	switch(rep)
+	{
+		case TePOINTS:
+		case TeNODES:	columns = "x, y";
+						break;
+		case TeLINES:
+		case TePOLYGONS:
+		case TeCELLS:
+						columns = "lower_x, lower_y, upper_x, upper_y";
+						break;
+		case TeRASTER:
+						columns = " lower_x, lower_y, upper_x, upper_y, resolution_factor, subband ";
+						break;
+		default:		columns = "";
+	}
+	
+    return columns;
+}
 
 bool
-TeDatabase::loadLayer(TeLayer* layer)
+TeDatabase::loadLayer(TeLayer* layer, const bool& loadAttrList)
 {
 	if (layer == 0)
 		return false;
 
-	string get;
+	string rest;
 	if (layer->id() > 0)
-		get = "SELECT * FROM te_layer WHERE layer_id = "+  Te2String(layer->id());
+		rest = " te_layer.layer_id = "+  Te2String(layer->id());
 	else if (!layer->name().empty())
-		get = "SELECT * FROM te_layer WHERE name = '"+  layer->name() + "'";
+		rest = " te_layer.name = '"+  layer->name() + "'";
 	else
 	{
-		this->errorMessage_ = "Layer procurado n�o possui nem id nem nome";
+		this->errorMessage_ = "Layer procurado n�o possui nem id nem nome";
 		return false;
 	}
+	
+	string sql = " SELECT te_layer.*, "; // 0 - 9 (10 columns)
+	sql += " te_projection.*, "; // 10 - 26  (17 columns)
+	sql += " te_representation.*, "; // 27 - 41 (15 columns)
+	sql += " te_layer_table.* "; // 42 - 53 (12 columns)
+	
+	sql += " FROM (((te_layer INNER JOIN te_projection ";
+	sql += " ON te_layer.projection_id = te_projection.projection_id) ";
+	sql += " LEFT JOIN te_representation ON ";
+	sql += " te_layer.layer_id = te_representation.layer_id) ";
+	sql += " LEFT JOIN te_layer_table ON ";
+	sql += " te_layer.layer_id = te_layer_table.layer_id) ";
+
+	sql += " WHERE "+ rest;
+
+	sql += " ORDER BY te_representation.geom_type, te_layer_table.table_id ";
 
 	TeDatabasePortal* portal = this->getPortal();
 	if(!portal)
-	{
-		this->errorMessage_ = "N�o foi poss�vel abrir portal para o banco";
 		return false;
-	}
 
-	if (!portal->query (get))
+	if(!portal->query(sql) || !portal->fetchRow())
 	{	
 		delete portal;
 		return false;
 	}
-	if (!portal->fetchRow())
-	{	
+
+	bool hasNewRow = true;
+	TeProjection* proj = 0;
+	if(!portal->getProjection(&proj, 10)) //load projection
+	{
 		delete portal;
 		return false;
 	}
 	
-	layer->id(atoi (portal->getData("layer_id")));
-	layer->name(string (portal->getData("name")));
-	layer->setLayerBox(TeBox(portal->getDouble("lower_x"),
-						portal->getDouble("lower_y"),
-						portal->getDouble("upper_x"),
-						portal->getDouble("upper_y")));
-	
-	int projId = portal->getInt("projection_id");
-	portal->freeResult();
-
-    layer->setDatabase(this);
-
-	// Load layer projection
-	TeProjection* proj = loadProjection (projId);
-	if (proj)
-		layer->setProjection (proj);
-
-	// Load layer representations
-	get = "SELECT * FROM te_representation WHERE layer_id = "+Te2String(layer->id());
-	if (portal->query (get))
+	if(!portal->getLayer(*layer, 0)) //load layer
 	{
-		while (portal->fetchRow())
+		delete portal;
+		delete layer;
+		return false;
+	}
+	if (proj != 0)
+		layer->setProjection(proj);
+		
+	//load its representation and its tables
+	bool hasRepsTablesToThisLayer = true;
+	vector<int> loadedTableId;
+	while(hasRepsTablesToThisLayer)
+	{
+		string repId = portal->getData(27);
+		if(!repId.empty() && !layer->hasGeometry(TeGeomRep(portal->getInt(29))))
 		{
-			TeRepresentation* repp = new TeRepresentation();
-			repp->id_ = atoi(portal->getData(0));
-			TeGeomRep g = (TeGeomRep)atoi (portal->getData(2));
-			repp->geomRep_ = g;
-			repp->tableName_ = portal->getData(3);
-			repp->description_ = portal->getData(4);
-			repp->box_ = TeBox(portal->getDouble(5),
-						portal->getDouble(6),
-						portal->getDouble(7),
-						portal->getDouble(8));
-			repp->resX_ = portal->getDouble(9);
-			repp->resY_ = portal->getDouble(10);
-			repp->nCols_ = portal->getInt(11);
-			repp->nLins_ = portal->getInt(12);
-			layer->addVectRepres(repp);
+			//load the geometry representation
+			TeRepresentation* rep = new TeRepresentation();
+			if(!portal->getRepresentation(*rep, 27))
+			{
+				delete rep;
+				delete layer;
+				delete portal;
+			}
+			layer->addVectRepres(rep);
 		}
-	}
-	
-	delete portal;
-	if(!loadLayerTable(layer))
-		return false;
-
-	layerMap_[layer->id()] = layer;
-	return true; 
+		
+		//load tables
+		if(find(loadedTableId.begin(), loadedTableId.end(), portal->getInt(42)) == loadedTableId.end())
+		{
+			TeTable attrTable;
+			if(portal->getAttrTable(attrTable, 42))
+			{
+				TeAttributeList attrList;
+				if(loadAttrList)
+					getAttributeList(attrTable.name(), attrList);
+				attrTable.setAttributeList(attrList);
+				layer->addAttributeTable(attrTable);
+				loadedTableId.push_back(attrTable.id());
+			}
+		}
+		
+		hasNewRow = portal->fetchRow();
+		if(!hasNewRow || portal->getInt(0)!= layer->id())
+			hasRepsTablesToThisLayer = false;
+	}
+	layer->setDatabase(this);
+	metaModel_->layerMap()[layer->id()] = layer;
+	
+	delete portal;
+	return true;
 }
 
 bool
-TeDatabase::loadLayerTable(TeLayer* layer)
+TeDatabase::loadLayerTable(TeLayer* layer, const bool& loadAttrList)
 {
 	TeDatabasePortal* portal = this->getPortal();
 	if(!portal)
 	{
-		this->errorMessage_ = "N�o foi poss�vel abrir portal para o banco";
+		this->errorMessage_ = "N�o foi poss�vel abrir portal para o banco";
 		return false;
 	}
 	
@@ -3014,22 +5339,16 @@ TeDatabase::loadLayerTable(TeLayer* layer)
 
 	while (portal->fetchRow())
 	{
-		string tableName = portal->getData("attr_table");
-		int    tableId = portal->getInt("table_id");
-		string indexName = portal->getData("attr_link");
-
+		TeTable attTable;
+		if(!portal->getAttrTable (attTable))
+		{
+			delete portal;
+			return false;
+		}
 		TeAttributeList attrList;
-		getAttributeList(tableName, attrList);
-
-		TeTable attTable(tableName,attrList,
-				         portal->getData("unique_id"), indexName,
-						 TeAttrTableType(portal->getInt("attr_table_type")));
-
-		attTable.setId(tableId);
-		attTable.attInitialTime(portal->getData("attr_initial_time"));
-		attTable.attFinalTime(portal->getData("attr_final_time"));
-		attTable.attTimeUnit(TeChronon(portal->getInt("attr_time_unit")));
-
+		if(loadAttrList)
+			getAttributeList(attTable.name(), attrList);
+		attTable.setAttributeList(attrList);
 		layer->addAttributeTable(attTable);
 	}
 
@@ -3088,18 +5407,43 @@ TeDatabase::layerExist(string layerName)
 	return false;
 }
 
+string TeDatabase::getNewLayerName(const string& n)
+{
+	bool changed;
+	string invalidChar;
+	string name = TeCheckName(n, changed, invalidChar);
+	string newName = name;
+	
+	TeDatabasePortal* portal = this->getPortal();
+	if(!portal)
+		return "";
+	
+	bool flag = true;
+	int count = 0;
+	while(flag)
+	{
+		portal->freeResult();
+		string q = "SELECT name FROM te_layer WHERE name = '" + newName + "'";
+		if(portal->query(q) && portal->fetchRow())
+		{
+			// there is already this theme name 
+			newName = newName+"_"+Te2String(count);
+			++count;
+			flag = true;
+         }
+		else
+			flag = false; //found the new name
+	}
+	delete portal;
+	return newName;
+}
 
 bool
 TeDatabase::deleteLayer(int layerId)
 {
-	//Delete attributes tables
-	if(!deleteLayerTable(layerId))
-		return false;
-
 	TeDatabasePortal* portal = this->getPortal();
 	if (!portal)
 		return false;
-
 	
 	string sql = "SELECT projection_id FROM te_layer WHERE layer_id = ";
 	sql += Te2String(layerId);
@@ -3133,7 +5477,7 @@ TeDatabase::deleteLayer(int layerId)
 
 		// Delete lut table
 		TeGeomRep rep = TeGeomRep(portal->getInt("geom_type"));
-		if (rep == TeRASTER)
+		if (rep == TeRASTER || rep == TeRASTERFILE)
 		{
 			TeDatabasePortal* portal2 = this->getPortal();
 			sql = "SELECT lut_table, raster_table FROM " + geomTable;
@@ -3207,6 +5551,10 @@ TeDatabase::deleteLayer(int layerId)
 		themeId = portal->getInt("theme_id");
 		this->deleteTheme(themeId);
 	}
+
+	//Delete attributes tables
+	if(!deleteLayerTable(layerId))
+		return false;
 	
 	sql = "DELETE FROM te_layer WHERE layer_id=" + Te2String(layerId);
 	if (!this->execute(sql))
@@ -3223,21 +5571,26 @@ TeDatabase::deleteLayer(int layerId)
 		return false;
 	}
 
-	// remove all the items� themes associated to the layer to be removed
+	// remove all the items� themes associated to the layer to be removed
 	TeThemeMap::iterator it;
-	for (it = themeMap_.begin(); it != themeMap_.end(); ++it)
+	for (it = metaModel_->themeMap().begin(); it != metaModel_->themeMap().end();)
 	{
-		TeTheme *theme = it->second;
+		if(it->second->getProductId() != TeTHEME)
+		{
+			++it;
+			continue;
+		}
+		TeTheme *theme = static_cast<TeTheme*> (it->second);
+		++it;
 		if (theme && theme->layer() && (theme->layer()->id() == layerId))
 		{
-			themeMap_.erase(theme->id());
+			metaModel_->themeMap().erase(theme->id());
 			delete theme;
 		}
 	}
-
 	// delete layer and its entry in the layer map
-	TeLayer* layer = layerMap_[layerId];
-	layerMap_.erase(layerId);
+	TeLayer* layer = metaModel_->layerMap()[layerId];
+	metaModel_->layerMap().erase(layerId);
 	delete layer;
 
 	delete portal;
@@ -3270,15 +5623,21 @@ TeDatabase::deleteLayerTable (int layerId, TeAttrTableType ttype)
 		attrTable = portal->getData(0);
 		tableId = portal->getData(1);
 		drop = "DROP TABLE " + attrTable;
-		if(!execute(drop))
+		if(tableExist(attrTable))
 		{
-			delete portal;
-			return false;
+			if(!execute(drop))
+			{
+				delete portal;
+				return false;
+			}
 		}
 		tableIds.push_back(atoi(tableId.c_str()));
 
-		string del  = "DELETE FROM te_address_locator WHERE table_id = "+ tableId;
-		execute(del);
+		if(tableExist("te_address_locator"))
+		{
+			string del  = "DELETE FROM te_address_locator WHERE table_id = "+ tableId;
+			execute(del);
+		}
 	}
 
 	delete portal;
@@ -3311,8 +5670,8 @@ TeDatabase::updateRepresentation (int layerId, TeRepresentation& rep)
 	sql += ", upper_x= " + Te2String(rep.box_.x2(),15);
 	sql += ", upper_y= " + Te2String(rep.box_.y2(),15);
 	sql += ", description= '" + rep.description_ + "'";
-	sql += ", res_x= " + Te2String(rep.resX_);
-	sql += ", res_y= " + Te2String(rep.resY_);
+	sql += ", res_x= " + Te2String(rep.resX_,15);
+	sql += ", res_y= " + Te2String(rep.resY_,15);
 	sql += ", num_cols=" + Te2String(rep.nCols_);
 	sql += ", num_rows=" + Te2String(rep.nLins_);
 
@@ -3349,9 +5708,10 @@ TeDatabase::insertRasterGeometry(const string& tableName, TeRasterParams& par, c
 	if(!columnExist(tableName, attrRep.name_,att))
 	{
 		addColumn (tableName, attrRep);
-		string sql = "UPDATE " + tableName + " SET tiling_type = " + Te2String(static_cast<int>(TeExpansible));
+		string sql = "UPDATE " + tableName + " SET tiling_type = " + Te2String(static_cast<int>(TeRasterParams::TeExpansible));
 		this->execute(sql);
 	}
+
 	//------
 
 	// finds the name of the raster geometry table
@@ -3378,11 +5738,9 @@ TeDatabase::insertRasterGeometry(const string& tableName, TeRasterParams& par, c
 	}
 
 	// save the pallete associated to the raster
-	// if it doesn�t exist yet
-	if ((par.photometric_[0] == TeRASTERPALETTE ||
-         par.photometric_[0] == TeRASTERKERNEL) && !par.lutName_.empty()) 
+	// if it doesn�t exist yet
+	if (par.photometric_[0] == TeRasterParams::TePallete && !par.lutName_.empty()) 
 	{
-
 		 if (!this->tableExist(par.lutName_))
 		 {
 			 if (this->createLUTTable(par.lutName_))
@@ -3439,8 +5797,18 @@ TeDatabase::updateRasterRepresentation(int layerId, TeRasterParams& par, const s
 	updateBox(box,par.boundingBox());
 	sql = "UPDATE te_representation SET lower_x = " + Te2String(box.x1_,15);
 	sql += ", lower_y = " + Te2String(box.y1_,15) + ", upper_x = " + Te2String(box.x2_,15);
-	sql += ", upper_y = " + Te2String(box.y2_,15) + "  WHERE repres_id=" + Te2String(represId);
+	sql += ", upper_y = " + Te2String(box.y2_,15);
 
+	if(par.date_.isValid())
+	{	
+		std::string sqlTime = getSQLTime(par.date_);
+		if(!sqlTime.empty())
+		{
+			sql += ", initial_time = " + sqlTime;
+			sql += ", final_time = " + sqlTime;
+		}
+	}
+	sql += " WHERE repres_id=" + Te2String(represId);
 	if(!execute(sql))
 	{
 		delete portal;
@@ -3456,7 +5824,7 @@ TeDatabase::updateRasterRepresentation(int layerId, TeRasterParams& par, const s
 	box = par.boundingBox();
 
 	sql = "UPDATE " + rasterrep + " SET lut_table ='" + par.lutName_ + "'";
-	sql += ", res_x= " + Te2String(par.resx_) + ", res_y=" + Te2String(par.resy_);
+	sql += ", res_x= " + Te2String(par.resx_,15) + ", res_y=" + Te2String(par.resy_,15);
 	sql += ", num_bands=" + Te2String(par.nBands()) + ", num_cols=" + Te2String(par.ncols_);
 	sql += ", num_rows=" + Te2String(par.nlines_) + ", block_height=" +  Te2String(par.blockHeight_);
 	sql += ", block_width= " + Te2String(par.blockWidth_) + ", lower_x = " + Te2String(box.x1_,15);
@@ -3478,9 +5846,8 @@ TeDatabase::updateRasterRepresentation(int layerId, TeRasterParams& par, const s
 	}
 
 	// save the pallete associated to the raster
-	// if it doesn�t exist yet
-	if ((par.photometric_[0] == TeRASTERPALETTE ||
-         par.photometric_[0] == TeRASTERKERNEL) && !par.lutName_.empty()) 
+	// if it doesn�t exist yet
+	if (par.photometric_[0] == TeRasterParams::TePallete && !par.lutName_.empty()) 
 	{
 
 		 if (!this->tableExist(par.lutName_))
@@ -3494,7 +5861,11 @@ TeDatabase::updateRasterRepresentation(int layerId, TeRasterParams& par, const s
 					sql += Te2String(par.lutr_[i]) + ", ";
 					sql += Te2String(par.lutg_[i]) + ", ";
 					sql += Te2String(par.lutb_[i]) + ")";
-					this->execute(sql);
+					if (!this->execute(sql) )	
+					{
+						delete portal;
+						return false;						
+					}
 				}
 			 }
 		 }
@@ -3522,7 +5893,7 @@ TeDatabase::insertRasterMetadata (const string& tableName, int geomId, TeRasterP
 	for (i=0; i<nb; i++)
 	{
 		vals = Te2String(geomId) + ", " + Te2String(i) + ", ";
-		vals += Te2String(par.vmin_[i],15) + ", " +  Te2String(par.vmax_[i],15) + ", ";
+		vals += Te2String(par.vmin_[i]) + ", " +  Te2String(par.vmax_[i]) + ", ";
 		vals += Te2String(par.nbitsperPixel_[i]) + ", " +  Te2String(par.dataType_[i]) + ", " ;
 		vals += Te2String(par.photometric_[i]) + ", " +  Te2String(par.compression_[i]) + " )" ;
 		string sql = ins + vals;
@@ -3584,80 +5955,89 @@ TeDatabase::updateLegend (TeLegendEntry *legend)
 		if (!insertLegend(legend))
 			return false;
 	}
-	legendMap_[legend->id()] = legend;
+	metaModel_->legendMap()[legend->id()] = legend;
 
 	return updateVisual(legend);
 }
 
+bool 
+TeDatabase::updateLegend (vector<TeLegendEntry>& legVec)
+{
+	unsigned int i;
+	for (i = 0; i < legVec.size(); ++i)
+	{
+		if(!updateLegend(&legVec[i]))
+			return false;
+	}
+	return true;
+}
+
 bool
 TeDatabase::updateVisual(TeLegendEntry *legend)
 {
 	if (!legend)
 		return false;
 
-	TeGeomRepVisualMap mapVis = legend->getVisualMap();
+	TeGeomRepVisualMap& mapVis = legend->getVisualMap();
 	TeGeomRepVisualMap::iterator it =  mapVis.begin();
 	while ( it != mapVis.end())
 	{ 
 			
 		TeGeomRep rep = it->first;
-		TeVisual vis = it->second;
+		TeVisual* vis = it->second;
 
-		TeColor cor = vis.color();				// filling color
-		TeColor contourCor = vis.contourColor();// contour color
+		TeColor cor = vis->color();				// filling color
+		TeColor contourCor = vis->contourColor();// contour color
 
 		string update = "UPDATE te_visual SET ";
-		update += " lib_name = '"+ vis.libName() +"', ";
 		update += "red = "+ Te2String(cor.red_) + ", ";
 		update += "green =" + Te2String(cor.green_) + ", ";
 		update += "blue =" + Te2String(cor.blue_) + ", ";
-		update += "transparency =" + Te2String(vis.transparency()) + ", ";
-
-		update += "contour_lib_name='"+ vis.contourLibName() +"', ";
+		update += "transparency =" + Te2String(vis->transparency()) + ", ";
 		update += "contour_red=" + Te2String(contourCor.red_) + ", ";
 		update += "contour_green=" + Te2String(contourCor.green_) + ", ";
 		update += "contour_blue=" + Te2String(contourCor.blue_) + ", "; 
-		update += "contour_transp=" + Te2String(vis.contourTransparency()) + ", ";
-		update += "contour_width=" + Te2String(vis.contourWidth()) + ", ";
+		update += "contour_transp=" + Te2String(vis->contourTransparency()) + ", ";
+		update += "contour_width=" + Te2String(vis->contourWidth()) + ", ";
 
 		if(rep == TePOLYGONS)
 		{
-			update += "width=" + Te2String(vis.contourWidth()) + ", ";
-			update += "contour_symb_id=" + Te2String(vis.contourStyle()) + ", ";
-			update += "symb_id=" + Te2String(vis.style()) + ", ";
+			update += "width=" + Te2String(vis->contourWidth()) + ", ";
+			update += "contour_symb_id=" + Te2String(vis->contourStyle()) + ", ";
+			update += "symb_id=" + Te2String(vis->style()) + ", ";
 		}
 		else if(rep == TeLINES)
 		{
-			update += "width=" + Te2String(vis.width()) + ", ";
-			update += "symb_id=" + Te2String(vis.style()) + ", ";
+			update += "width=" + Te2String(vis->width()) + ", ";
+			update += "symb_id=" + Te2String(vis->style()) + ", ";
 		}
 		else if(rep == TePOINTS)
 		{
-			update += "size_value=" + Te2String(vis.size()) + ", ";
-			update += "symb_id=" + Te2String(vis.style ()) + ", ";
+			update += "size_value=" + Te2String(vis->size()) + ", ";
+			update += "symb_id=" + Te2String(vis->style ()) + ", ";
 		}
 		else if(rep == TeTEXT)
 		{
-			update += "size_value=" + Te2String(vis.size()) + ", ";
-			update += "pt_angle=" + Te2String(vis.ptAngle()) + ", ";
+			update += "size_value=" + Te2String(vis->size()) + ", ";
+			update += "pt_angle=" + Te2String(vis->ptAngle()) + ", ";
 		}
 
-		update += "family='" + vis.family() + "', ";
-		if (vis.bold())
+		update += "family='" + vis->family() + "', ";
+		if (vis->bold())
 			update += "bold=1, ";
 		else
 			update += "bold=0, ";
 
-		if (vis.italic())
+		if (vis->italic())
 			update += "italic=1, ";
 		else
 			update += "italic=0, ";
 
-		update += "fixed_size=" + Te2String(vis.fixedSize())+ ", ";
-		update += "alignment_vert=" + Te2String(vis.alignmentVert())+ ", ";
-		update += "alignment_horiz=" + Te2String(vis.alignmentHoriz())+ ", ";
-		update += "tab_size=" + Te2String(vis.tabSize())+ ", ";
-		update += "line_space=" + Te2String(vis.lineSpace());
+		update += "fixed_size=" + Te2String(vis->fixedSize())+ ", ";
+		update += "alignment_vert=" + Te2String(vis->alignmentVert())+ ", ";
+		update += "alignment_horiz=" + Te2String(vis->alignmentHoriz())+ ", ";
+		update += "tab_size=" + Te2String(vis->tabSize())+ ", ";
+		update += "line_space=" + Te2String(vis->lineSpace());
 
 		update += " WHERE legend_id= " + Te2String(legend->id()) ;
 		update += " AND geom_type= " + Te2String(rep);
@@ -3669,204 +6049,196 @@ TeDatabase::updateVisual(TeLegendEntry *legend)
 	return true;
 }
 
-bool 
-TeDatabase::loadLegend (TeTheme *theme)
+bool
+TeDatabase::updateVisual(vector<TeLegendEntry>& legVec)
 {
-	if (!theme)
-		return false;
-
 	unsigned int i;
-	int legId, gId, lastLegId;
-	TeGeomRep rep;
-	TeVisual visual;
-	vector<string> legIdVec;
-	map<int, TeLegendEntry> legMap;
-	map<int, TeLegendEntry>::iterator it;
-	map<int, TeLegendEntry*> ownLegMap;
-
-	theme->cleanLegend();
 
-	TeDatabasePortal* portal = getPortal();
+	// Update the te_visual table
+	TeTable visualTable;
+	selectTable("te_visual", "1=0", visualTable);
+	TeAttributeList& visualAttrList = visualTable.attributeList();
+	TeAttribute& visualAttr0 = visualAttrList[0];		// legend_id
+	visualAttr0.rep_.isPrimaryKey_ = true;
+	visualAttr0.rep_.isAutoNumber_ = false;
+	TeAttribute& visualAttr1 = visualAttrList[1];		// geom_type
+	visualAttr1.rep_.isPrimaryKey_ = true;
+	visualAttr1.rep_.isAutoNumber_ = false;
+
+	TeGeomRepVisualMap::iterator it;
+	for (i = 0; i < legVec.size(); ++i)
+	{
+		TeLegendEntry& leg = legVec[i];
+		for (it = leg.getVisualMap().begin(); it != leg.getVisualMap().end(); ++it)
+		{
+			string style, contourStyle, sizeValue, width;
+			int geomRep = it->first;
+			int legId = leg.id();
+			TeVisual* visual = it->second;
+			TeTableRow row;
 
-	string q = "SELECT * FROM te_legend WHERE theme_id = " + Te2String(theme->id());
-	q += " ORDER BY legend_id";
+			if(geomRep == TePOLYGONS || geomRep == TeCELLS)
+			{
+				sizeValue = Te2String(0);
+				contourStyle = Te2String(visual->contourStyle());
+				width =  Te2String(0);
+				style = Te2String(it->second->style());
+			}
+			else if(geomRep == TeLINES)
+			{
+				sizeValue = Te2String(0);
+				contourStyle = Te2String(0);
+				width = Te2String(visual->width());
+				style = Te2String(visual->style());
+			}
+			else if(geomRep == TePOINTS)
+			{
+				sizeValue = Te2String(visual->size());
+				contourStyle = Te2String(0);
+				width = Te2String(0);
+				style = Te2String(visual->style());
+			}
+			else if(geomRep == TeTEXT)
+			{
+				sizeValue = Te2String(visual->size());
+				contourStyle = Te2String(0);
+				width = Te2String(0);
+				style = Te2String(0);
+			}
+		
+			row.push_back(Te2String(legId));						// legend_id
+			row.push_back(Te2String(geomRep));						// geom_type
+			row.push_back(style);									// symb_id
+			row.push_back(Te2String(visual->color().red_));			// red
+			row.push_back(Te2String(visual->color().green_));		// green
+			row.push_back(Te2String(visual->color().blue_));			// blue
+			row.push_back(Te2String(visual->transparency()));		// transparency
+			row.push_back(width);									// width
+			row.push_back(contourStyle);							// contour_symb_id
+			row.push_back(Te2String(visual->contourColor().red_));	// contour_red
+			row.push_back(Te2String(visual->contourColor().green_));	// contour_green
+			row.push_back(Te2String(visual->contourColor().blue_));	// contour_blue
+			row.push_back(Te2String(visual->contourTransparency()));	// contour_transp
+			row.push_back(Te2String(visual->contourWidth()));		// contour_width
+			row.push_back(sizeValue);								// size_value
+			row.push_back(Te2String(visual->ptAngle()));				// pt_angle
+			row.push_back(visual->family());							// family
+			if (visual->bold())										// bold
+				row.push_back("1");
+			else
+				row.push_back("0");
+			if (visual->italic())									// italic
+				row.push_back("1");
+			else
+				row.push_back("0");
 
-	if (!portal->query(q))
-	{	
-		delete portal;
-		return false;
-	}
+			row.push_back(Te2String(visual->alignmentVert()));		// alignment_vert
+			row.push_back(Te2String(visual->alignmentHoriz()));		// alignment_horiz
+			row.push_back(Te2String(visual->tabSize()));				// tab_size
+			row.push_back(Te2String(visual->lineSpace()));			// line_space
 
-	while(portal->fetchRow())
-	{
-		legId = portal->getInt("legend_id");
-		legIdVec.push_back(Te2String(legId));
+			if (visual->fixedSize())									// fixed_size
+				row.push_back("1");
+			else
+				row.push_back("0");
 
-		TeLegendEntry& legEntry = legMap[legId];
-		legEntry.id(legId);
-		legEntry.theme(theme->id());
-		TeSlice& slice = legEntry.slice();
-		
-		gId = portal->getInt("group_id");
-		legEntry.group(gId);
-		if (gId == -10)
-		{
-			TeLegendEntry* ownLeg = new TeLegendEntry;
-			ownLegMap[legId] = ownLeg;
+			visualTable.add(row);
 		}
-
-		string lb = portal->getData("label");
-		legEntry.label(lb);
-		slice.count_ = portal->getInt("num_objs");
-		slice.from_ = portal->getData("lower_value");
-		slice.to_ = portal->getData("upper_value");
 	}
+	return insertTable(visualTable);
+}
 
-	string inClause;
-	for(i = 0; i < legIdVec.size(); ++i)
-	{
-		inClause += legIdVec[i];
-		if (i != legIdVec.size() - 1)
-			inClause += ",";
-	}
+bool 
+TeDatabase::loadLegend (TeAbstractTheme *theme, const string& visualType)
+{
+	if (!theme)
+		return false;
+	
+	theme->cleanLegend();
 
-	portal->freeResult();
-	q = "SELECT * FROM te_visual WHERE legend_id IN (";
-	q += inClause + ") ORDER BY legend_id";
+	string rest;
+	if (theme->id() > 0)
+		rest = " te_theme.theme_id = "+  Te2String(theme->id());
+	else if (!theme->name().empty())
+		rest = " te_theme.name = '"+  theme->name() + "'";
+	else
+		return false;
+	
+	//load legend and visual
+	string sql = " SELECT ";
+	sql += " te_legend.*,  "; // 0 - 6  (7 columns)
+	sql += " te_visual.*  "; //  7		(24 columns)
+	sql += " FROM ((te_theme LEFT JOIN te_legend ON te_theme.theme_id = te_legend.theme_id ) ";
+	sql += " LEFT JOIN te_visual ON te_legend.legend_id = te_visual.legend_id ) ";
+	sql += " WHERE "+ rest;
+	sql += " ORDER BY te_legend.legend_id, te_legend.group_id, te_visual.geom_type  "; 
 
-	if (!portal->query(q))
+	TeDatabasePortal* portal = this->getPortal();
+	if (!portal)
+		return false;
+	
+	if (!portal->query(sql) || !portal->fetchRow())
 	{	
 		delete portal;
 		return false;
 	}
 
-	while(portal->fetchRow())
+	//load all legends of this theme
+	//and its visual
+	bool hasLegsToThisTheme = true;
+	bool hasNewRow = true;
+	while(hasLegsToThisTheme)
 	{
-		legId = portal->getInt("legend_id");
-		rep = TeGeomRep(portal->getInt("geom_type"));
-		visual = portal->getVisual();
-
-		TeLegendEntry& legEntry = legMap[legId];
-		gId = legEntry.group();
-		legEntry.setVisual(visual, rep);
-
-		if (gId == -10)		// own visual
+		//legend
+		TeLegendEntry legend;
+		if(!portal->getLegend(legend, 0))
 		{
-			TeLegendEntry* ownLegend = ownLegMap[legId];
-			*ownLegend = legEntry;
-
-			if (rep == TePOLYGONS)
-				ownLegend->setVisual(visual, TePOLYGONS);
-			else if (rep == TeLINES)
-				ownLegend->setVisual(visual, TeLINES);
-			else if (rep == TePOINTS)
-				ownLegend->setVisual(visual, TePOINTS);
-			else if (rep == TeTEXT)
-				ownLegend->setVisual(visual, TeTEXT);
-
-			legendMap_[legId] = ownLegend;
+			delete portal;
+			return false;
 		}
-		else if(gId == -6)
-		{
-			TeLegendEntry& pointingQueryLegend = theme->queryAndPointingLegend();
-			pointingQueryLegend = legEntry;
 
-			pointingQueryLegend.setVisual(visual, TeLINES); 
-			pointingQueryLegend.setVisual(visual, TePOINTS);
-			pointingQueryLegend.setVisual(visual, TeCELLS);
-			pointingQueryLegend.setVisual(visual, TeTEXT);  
-
-			legendMap_[legId] = &pointingQueryLegend;
-		}
-		else if(gId == -5)
+		//visual
+		bool hasVisualToThisLeg = true;
+		while(hasVisualToThisLeg)
 		{
-			TeLegendEntry& queryLegend = theme->queryLegend();
-			queryLegend = legEntry;
-
-			queryLegend.setVisual(visual, TeLINES); 
-			queryLegend.setVisual(visual, TePOINTS);
-			queryLegend.setVisual(visual, TeCELLS);
-			queryLegend.setVisual(visual, TeTEXT); 
-
-			legendMap_[legId] = &queryLegend;
+			TeVisual* visual = TeVisualFactory::make(visualType);
+			TeGeomRep geomRep;
+			if(portal->getVisual(visual, geomRep, 7))
+				legend.setVisual(visual, geomRep);
+								
+			hasNewRow = portal->fetchRow();
+			if(!hasNewRow || portal->getInt(2)!= legend.group() || portal->getInt(0)!= legend.id())
+				hasVisualToThisLeg = false;
 		}
-		else if(gId == -4)
-		{
-			TeLegendEntry& pointingLegend = theme->pointingLegend();
-			pointingLegend = legEntry;
-
-			pointingLegend.setVisual(visual, TeLINES); 
-			pointingLegend.setVisual(visual, TePOINTS);
-			pointingLegend.setVisual(visual, TeCELLS);
-			pointingLegend.setVisual(visual, TeTEXT);  
 
-			legendMap_[legId] = &pointingLegend;
-		}
-		else if(gId == -3)
-		{
-			TeLegendEntry& defaultLegend = theme->defaultLegend();
-			defaultLegend = legEntry;
-			legendMap_[legId] = &defaultLegend;
-
-			// Make the pointing visual equal to the default visual, excluding
-			// the pointing color 
-			TeColor color;
-			TeLegendEntry& pointingLegend = theme->pointingLegend();
-			TeVisual& pointingVisual = pointingLegend.visual(rep);
-			color = pointingVisual.color();
-			pointingLegend.setVisual(visual, rep);
-			pointingVisual.color(color);
-
-			// Make the query visual equal to the default visual, excluding
-			// the query color 
-			TeLegendEntry& queryLegend = theme->queryLegend();
-			TeVisual& queryVisual = queryLegend.visual(rep);
-			color = queryVisual.color();
-			queryLegend.setVisual(visual, rep);
-			queryVisual.color(color);
-
-			// Make the pointingQuery visual equal to the default visual, excluding
-			// the pointingQuery color 
-			TeLegendEntry& pointingQueryLegend = theme->queryAndPointingLegend();
-			TeVisual& pointingQueryVisual = pointingQueryLegend.visual(rep);
-			color = pointingQueryVisual.color();
-			pointingQueryLegend.setVisual(visual, rep);
-			pointingQueryVisual.color(color);
-		}
-		else if(gId == -2)
-		{
-			TeLegendEntry& withoutDataConnectionLegend = theme->withoutDataConnectionLegend();
-			withoutDataConnectionLegend = legEntry;
-			legendMap_[legId] = &withoutDataConnectionLegend;
-		}
-		else if(gId == -1)
-		{
-			TeLegendEntry& outOfCollectionLegend = theme->outOfCollectionLegend();
-			outOfCollectionLegend = legEntry;
-			legendMap_[legId] = &outOfCollectionLegend;
-		}
-		else if (gId > -1)
+		//Set legend to this theme
+		theme->legend(legend); 
+														
+		//fill legend buffer
+		if(legend.group() == -6)	
+			metaModel_->legendMap()[legend.id()] = &theme->queryAndPointingLegend();
+		else if(legend.group() == -5)	
+			metaModel_->legendMap()[legend.id()] = &theme->queryLegend(); 
+		else if (legend.group() == -4)
+			metaModel_->legendMap()[legend.id()] = &theme->pointingLegend(); 
+		else if (legend.group() == -3)
+			metaModel_->legendMap()[legend.id()] = &theme->defaultLegend(); 
+		else if (legend.group() == -2)
+			metaModel_->legendMap()[legend.id()] = &theme->withoutDataConnectionLegend(); 
+		else if (legend.group() == -1)
+			metaModel_->legendMap()[legend.id()] = &theme->outOfCollectionLegend(); 
+		else if (legend.group() == -10) //own legend
 		{
-			TeLegendEntryVector& legendEntryVector = theme->legend();
-			if (legendEntryVector.empty() == true)
-				legendEntryVector.push_back(legMap[legId]);
-			else
-			{
-				if (legId != lastLegId)
-					legendEntryVector.push_back(legMap[legId]);
-				else
-				{
-					legendEntryVector.pop_back();
-					legendEntryVector.push_back(legMap[legId]);				
-				}
-			}
-			lastLegId = legId;
+			TeLegendEntry* legendTemp = new TeLegendEntry(legend);
+			metaModel_->legendMap()[legend.id()] = legendTemp;
 		}
+		
+		if(!hasNewRow || portal->getInt(0)!= theme->id())
+			hasLegsToThisTheme = false;
 	}
-
-	TeLegendEntryVector& legVector = theme->legend();
-	for (i = 0; i < legVector.size(); ++i)
-		legendMap_[legVector[i].id()] = &legVector[i];
+			
+	for (unsigned int i = 0; i < theme->legend().size(); ++i)
+		metaModel_->legendMap()[theme->legend()[i].id()] = &theme->legend()[i];
 
 	delete portal;
 	return true;
@@ -3920,40 +6292,37 @@ TeDatabase::loadProjection (int projId)
 		return 0;
 	}
 
-	TeDatum datum (	portal->getData("datum"),
-					portal->getDouble("radius"),
-					portal->getDouble("flattening"),
-					portal->getDouble("dx"),
-					portal->getDouble("dy"),
-					portal->getDouble("dz"));
+	TeProjection* proj = 0;
+	if(!portal->getProjection(&proj))
+	{
+		if(proj)
+			delete proj;
+		delete portal;
+		return 0;
+	}
 
-	TeProjectionParams mProjPars;
-	mProjPars.datum = datum;
-	mProjPars.name = portal->getData("name");
-	mProjPars.lat0 = portal->getDouble("lat0")*TeCDR;
-	mProjPars.lon0 = portal->getDouble("long0")*TeCDR;
-	mProjPars.offx = portal->getDouble("offx");
-	mProjPars.offy = portal->getDouble("offy");
-	mProjPars.stlat1 = portal->getDouble("stlat1")*TeCDR;
-	mProjPars.stlat2 = portal->getDouble("stlat2")*TeCDR;
-	mProjPars.units = portal->getData("unit");
-	mProjPars.scale = portal->getDouble("scale");
-	mProjPars.hemisphere = (TeHemisphere)portal->getInt("hemis");
-
-	TeProjection* proj = TeProjectionFactory::make(mProjPars);
 	delete portal;
-	proj->id(projId);
 	return proj;
 }
 
 bool
 TeDatabase::insertPolygonSet(const string& table, TePolygonSet &ps)
 {
+	if (!beginTransaction())
+		return false;
 	for (unsigned int i = 0; i < ps.size(); i++ )
 	{
-		TePolygon poly = ps [i];
+		TePolygon& poly = ps [i];
 		if (!insertPolygon (table,poly))
+		{
+			rollbackTransaction();
 			return false;
+		}
+	}
+	if (!commitTransaction())
+	{
+		rollbackTransaction();
+		return false;
 	}
 	return true;
 }
@@ -3961,11 +6330,21 @@ TeDatabase::insertPolygonSet(const string& table, TePolygonSet &ps)
 bool 
 TeDatabase::updatePolygonSet (const string& table, TePolygonSet &ps)
 {
- 	for (unsigned int i = 0; i < ps.size(); i++ )
+ 	if (!beginTransaction())
+		return false;
+	for (unsigned int i = 0; i < ps.size(); i++ )
 	{
-		TePolygon poly = ps [i];
+		TePolygon& poly = ps [i];
 		if (!updatePolygon (table,poly))
+		{
+			rollbackTransaction();
 			return false;
+		}
+	}
+	if (!commitTransaction())
+	{
+		rollbackTransaction();
+		return false;
 	}
 	return true;
 }
@@ -4018,7 +6397,7 @@ TeDatabase::loadPointSet(TeTheme* theme, TePointSet &ps)
 		return false;
 
 	string sql = "SELECT * FROM (" + pointTable + " RIGHT JOIN " + collTable;
-	sql = sql + " ON " + pointTable + ".object_id = " + collTable + ".object_id)";
+	sql = sql + " ON " + pointTable + ".object_id = " + collTable + ".c_object_id)";
 
 	TeDatabasePortal *portal = this->getPortal();
 	if (!portal)
@@ -4057,7 +6436,7 @@ TeDatabase::loadLineSet(TeTheme* theme, TeLineSet &ls)
 		return false;
 
 	string sql = "SELECT * FROM (" + lineTable + " RIGHT JOIN " + collTable;
-	sql = sql + " ON " + lineTable + ".object_id = " + collTable + ".object_id)";
+	sql = sql + " ON " + lineTable + ".object_id = " + collTable + ".c_object_id)";
 
 	TeDatabasePortal *portal = this->getPortal();
 	if (!portal)
@@ -4083,7 +6462,6 @@ TeDatabase::loadLineSet(TeTheme* theme, TeLineSet &ls)
 bool 
 TeDatabase::loadPolygonSet (const string& table, const string& geoid, TePolygonSet &ps)
 {
-	
 	TeDatabasePortal *portal = this->getPortal();
 	string q ="SELECT * FROM " + table;
 
@@ -4174,11 +6552,7 @@ TeDatabase::locatePolygon (const string& table, TeCoord2D &pt, TePolygon &polygo
 
 	TeBox box (pt.x()-tol,pt.y()-tol,pt.x()+tol,pt.y()+tol);
 
-	string q;
-	q = "SELECT * FROM " + table + " WHERE lower_x < " + Te2String(box.x2(),15);
-	q += " AND upper_x > " + Te2String(box.x1(),15);
-	q += " AND lower_y < " + Te2String(box.y2(),15);
-	q += " AND upper_y > " + Te2String(box.y1(),15);
+	string q = "SELECT * FROM " + table + " WHERE " + getSQLBoxWhere(box, TePOLYGONS);
 	q += " ORDER BY parent_id, num_holes DESC, ext_max ASC";
 
 	if (!portal->query(q) || !portal->fetchRow())
@@ -4243,7 +6617,6 @@ TeDatabase::locatePolygonSet (const string& table, TeCoord2D &pt, double tol, Te
 	return false;
 }
 
-
 bool 
 TeDatabase::loadPolygonSet(TeTheme* theme, TePolygonSet &ps)
 {
@@ -4260,7 +6633,7 @@ TeDatabase::loadPolygonSet(TeTheme* theme, TePolygonSet &ps)
 		return false;
 
 	string sql = "SELECT * FROM (" + polygonTable + " RIGHT JOIN " + collTable;
-	sql = sql + " ON " + polygonTable + ".object_id = " + collTable + ".object_id)";
+	sql = sql + " ON " + polygonTable + ".object_id = " + collTable + ".c_object_id)";
 	sql += " ORDER BY " + polygonTable + ".parent_id, ";
 	sql += polygonTable + ".num_holes DESC, " + polygonTable + ".ext_max ASC";
 
@@ -4289,11 +6662,22 @@ TeDatabase::loadPolygonSet(TeTheme* theme, TePolygonSet &ps)
 bool 
 TeDatabase::insertLineSet	(const string& table, TeLineSet &ls)
 {
+	if (!beginTransaction())
+		return false;
+
 	for (unsigned int i = 0; i < ls.size(); i++ )
 	{
-		TeLine2D line = ls [i];
+		TeLine2D& line = ls [i];
 		if (!insertLine (table,line))
+		{
+			rollbackTransaction();
 			return false;
+		}
+	}
+	if (!commitTransaction())
+	{
+		rollbackTransaction();
+		return false;
 	}
 	return true;
 }
@@ -4301,11 +6685,22 @@ TeDatabase::insertLineSet	(const string& table, TeLineSet &ls)
 bool 
 TeDatabase::updateLineSet	(const string& table, TeLineSet &ls)
 {
+	if (!beginTransaction())
+		return false;
+
 	for (unsigned int i = 0; i < ls.size(); i++ )
 	{
 		TeLine2D line = ls [i];
 		if (!updateLine (table,line))
+		{
+			rollbackTransaction();
 			return false;
+		}
+	}
+	if (!commitTransaction())
+	{
+		rollbackTransaction();
+		return false;
 	}
 	return true;
 }
@@ -4396,6 +6791,7 @@ TeDatabase::selectLineSet (const string& table, const string& criteria, TeLineSe
 	string q ="SELECT * FROM " + table;
 	if (!criteria.empty())
 		q += " WHERE " + criteria;
+	q += " ORDER BY object_id ASC, geom_id ASC";
 
 	if (!portal->query(q) || !portal->fetchRow())
 	{	
@@ -4458,11 +6854,22 @@ TeDatabase::locateLine (const string& table, TeCoord2D &pt, TeLine2D &line, cons
 bool 
 TeDatabase::insertPointSet	(const string& table, TePointSet &ps)
 {
+	if (!beginTransaction())
+		return false;
+
 	for (unsigned int i = 0; i < ps.size(); i++ )
 	{
-		TePoint point = ps [i];
+		TePoint& point = ps [i];
 		if (!insertPoint (table,point))
+		{
+			rollbackTransaction();
 			return false;
+		}
+	}
+	if (!commitTransaction())
+	{
+		rollbackTransaction();
+		return false;
 	}
 	return true;
 }
@@ -4470,11 +6877,22 @@ TeDatabase::insertPointSet	(const string& table, TePointSet &ps)
 bool 
 TeDatabase::updatePointSet (const string& table, TePointSet &ps)
 {
+	if (!beginTransaction())
+		return false;
+	
 	for (unsigned int i = 0; i < ps.size(); i++ )
 	{
 		TePoint point = ps [i];
 		if (!updatePoint (table,point))
+		{
+			rollbackTransaction();
 			return false;
+		}
+	}
+	if (!commitTransaction())
+	{
+		rollbackTransaction();
+		return false;
 	}
 	return true;
 }
@@ -4560,6 +6978,7 @@ TeDatabase::selectPointSet (const string& table, const string& criteria, TePoint
 	string q ="SELECT * FROM " + table;
 	if (!criteria.empty())
 		q += " WHERE " + criteria;
+	q += " ORDER BY object_id ASC, geom_id ASC";
 
 	if (!portal->query(q) || !portal->fetchRow())
 	{
@@ -4618,11 +7037,22 @@ TeDatabase::locatePoint (const string& table, TeCoord2D &pt, TePoint &point, con
 bool 
 TeDatabase::insertTextSet	(const string& table, TeTextSet &ts)
 {
+	if (!beginTransaction())
+		return false;
+
 	for (unsigned int i = 0; i < ts.size(); i++ )
 	{
-		TeText text = ts [i];
+		TeText& text = ts [i];
 		if (!insertText (table,text))
+		{
+			rollbackTransaction();
 			return false;
+		}
+	}
+	if (!commitTransaction())
+	{
+		rollbackTransaction();
+		return false;
 	}
 	return true;
 }
@@ -4630,11 +7060,21 @@ TeDatabase::insertTextSet	(const string& table, TeTextSet &ts)
 bool 
 TeDatabase::updateTextSet	(const string& table, TeTextSet &ts)
 {
+	if (!beginTransaction())
+		return false;
 	for ( unsigned int i = 0; i < ts.size(); i++ )
 	{
 		TeText text = ts [i];
 		if (!updateText (table,text))
+		{
+			rollbackTransaction();
 			return false;
+		}
+	}
+	if (!commitTransaction())
+	{
+		rollbackTransaction();
+		return false;
 	}
 	return true;
 }
@@ -4673,6 +7113,7 @@ TeDatabase::selectTextSet (const string& table, const string& criteria, TeTextSe
 	string q ="SELECT * FROM " + table;
 	if (!criteria.empty())
 		q += " WHERE " + criteria;
+	q += " ORDER BY object_id ASC, geom_id ASC";
 
 	if (!portal->query(q) || !portal->fetchRow())
 	{
@@ -4697,13 +7138,13 @@ TeDatabase::updateText(const string& table, TeText &t)
 {
 	string sql;
 	sql = "UPDATE " + table + " SET ";
-    sql += "x=" + Te2String(t.location().x(),10) + ", ";
-	sql += "y=" + Te2String(t.location().y(),10) + ", ";
+    sql += "x=" + Te2String(t.location().x(),15) + ", ";
+	sql += "y=" + Te2String(t.location().y(),15) + ", ";
 	sql += "text_value='" + t.textValue() + "', ";
-	sql += "angle=" + Te2String(t.angle(),5) + ", ";
-	sql += "height=" + Te2String(t.height(),5) + ",";
-	sql += "alignment_vert=" + Te2String(t.alignmentVert(),5) + ",";
-	sql += "alignment_horiz=" + Te2String(t.alignmentHoriz(),5);
+	sql += "angle=" + Te2String(t.angle(),15) + ", ";
+	sql += "height=" + Te2String(t.height(),15) + ",";
+	sql += "alignment_vert=" + Te2String(t.alignmentVert(),15) + ",";
+	sql += "alignment_horiz=" + Te2String(t.alignmentHoriz(),15);
     sql += " WHERE geom_id=" + Te2String(t.geomId());
 	return (this->execute(sql));
 }
@@ -4713,8 +7154,8 @@ TeDatabase::updateNode(const string& table, TeNode &node)
 {
 	string sql;
 	sql = "UPDATE " + table + " SET ";
-    sql += "x=" + Te2String(node.location().x(),10) + ", ";
-	sql += "y=" + Te2String(node.location().y(),10) + ", ";
+    sql += "x=" + Te2String(node.location().x(),15) + ", ";
+	sql += "y=" + Te2String(node.location().y(),15);
     sql += " WHERE geom_id = " + Te2String(node.geomId());
 	return (this->execute(sql));
 }
@@ -4724,8 +7165,8 @@ TeDatabase::updatePoint(const string& table, TePoint &p)
 {
 	string sql;
 	sql = "UPDATE " + table + " SET ";
-    sql += "x=" + Te2String(p.location().x(),10) + ", ";
-	sql += "y=" + Te2String(p.location().y(),10) + ", ";
+    sql += "x=" + Te2String(p.location().x(),15) + ", ";
+	sql += "y=" + Te2String(p.location().y(),15);
     sql += " WHERE geom_id = " + Te2String(p.geomId());
 	return (this->execute(sql));
 }
@@ -4769,11 +7210,22 @@ bool TeDatabase::locateText (const string& table, TeCoord2D &pt, TeText &text, c
 bool 
 TeDatabase::insertArcSet	(const string& table, TeArcSet &as)
 {
+	if (!beginTransaction())
+		return false;
+
 	for (unsigned int i = 0; i < as.size(); i++ )
 	{
-		TeArc arc = as [i];
+		TeArc& arc = as [i];
 		if (!insertArc (table,arc))
+		{
+			rollbackTransaction();
 			return false;
+		}
+	}
+	if (!commitTransaction())
+	{
+		rollbackTransaction();
+		return false;
 	}
 	return true;
 }
@@ -4781,11 +7233,22 @@ TeDatabase::insertArcSet	(const string& table, TeArcSet &as)
 bool 
 TeDatabase::updateArcSet	(const string& table, TeArcSet &as)
 {
+	if (!beginTransaction())
+		return false;
+
 	for ( unsigned int i = 0; i < as.size(); i++ )
 	{
 		TeArc arc = as [i];
 		if (!updateArc (table,arc))
+		{
+			rollbackTransaction();
 			return false;
+		}
+	}
+	if (!commitTransaction())
+	{
+		rollbackTransaction();
+		return false;
 	}
 	return true;
 }
@@ -4818,23 +7281,34 @@ TeDatabase::loadArcSet (const string& table, const string& geoid, TeArcSet &as)
 }
 
 bool 
-TeDatabase::updateArc	(const string& /*table */, TeArc &arc)
+TeDatabase::updateArc(const string& table, TeArc &arc)
 {
 	string sql;
-	sql = "UPDATE table  SET ";
+	sql = "UPDATE"+ table +" SET ";
     sql += "from_node=" + Te2String(arc.fromNode().geomId()) + ", ";
-	sql += "to_node=" + Te2String(arc.toNode().geomId()) + ", ";
-    sql += " WHERE object_id = " + arc.geomId();
+	sql += "to_node=" + Te2String(arc.toNode().geomId());
+    sql += " WHERE geom_id = " + arc.geomId();
 	return (this->execute(sql));
 }
 
 bool 
 TeDatabase::insertNodeSet	(const string& table, TeNodeSet &ns)
 {
+	if (!beginTransaction())
+		return false;
+
 	for (unsigned int i = 0; i < ns.size(); i++ )
 	{
-	     TeNode no = ns [i];
+	     TeNode& no = ns [i];
 	     if (!insertNode (table,no))
+		{
+			rollbackTransaction();
+			return false;
+		}
+	}
+	if (!commitTransaction())
+	{
+		rollbackTransaction();
 		return false;
 	}
 	return true;
@@ -4843,11 +7317,22 @@ TeDatabase::insertNodeSet	(const string& table, TeNodeSet &ns)
 bool 
 TeDatabase::updateNodeSet	(const string& table, TeNodeSet &ns)
 {
+	if (!beginTransaction())
+		return false;
+
 	for (unsigned int i = 0; i < ns.size(); i++ )
 	{
 		TeNode no = ns [i];
 		if (!updateNode (table,no))
+		{
+			rollbackTransaction();
 			return false;
+		}
+	}
+	if (!commitTransaction())
+	{
+		rollbackTransaction();
+		return false;
 	}
 	return true;
 }
@@ -4881,11 +7366,22 @@ TeDatabase::loadNodeSet (const string& table, const string& geoid, TeNodeSet &ns
 bool 
 TeDatabase::insertCellSet	(const string& table, TeCellSet &cs)
 {
+	if (!beginTransaction())
+		return false;
+
 	for (unsigned int i = 0; i < cs.size(); i++ )
 	{
-		TeCell cell = cs [i];
+		TeCell& cell = cs [i];
 		if (!insertCell (table,cell))
+		{
+			rollbackTransaction();
 			return false;
+		}
+	}
+	if (!commitTransaction())
+	{
+		rollbackTransaction();
+		return false;
 	}
 	return true;
 }
@@ -4893,11 +7389,22 @@ TeDatabase::insertCellSet	(const string& table, TeCellSet &cs)
 bool
 TeDatabase::updateCellSet	(const string& table, TeCellSet &cs)
 {
+	if (!beginTransaction())
+		return false;
+
 	for (unsigned int i = 0; i < cs.size(); i++ )
 	{
 		TeCell cell = cs [i];
 		if (!updateCell (table,cell))
+		{
+			rollbackTransaction();
 			return false;
+		}
+	}
+	if (!commitTransaction())
+	{
+		rollbackTransaction();
+		return false;
 	}
 	return true;
 }
@@ -4986,12 +7493,12 @@ TeDatabase::selectCellSet (const int& layerId, const string& table, const string
 }
 
 bool 
-TeDatabase::updateCell(const string& /* table */, TeCell &c)
+TeDatabase::updateCell(const string& table, TeCell &c)
 {
 	TeBox b = c.box();
 
 	string sql;
-	sql = "UPDATE table  SET ";
+	sql = "UPDATE "+ table +"  SET ";
 	sql += "lower_x=" + Te2String(b.lowerLeft().x(),15) + ", ";
 	sql += "lower_y=" + Te2String(b.lowerLeft().y(),15) + ", ";
 	sql += "upper_x=" + Te2String(b.upperRight().x(),15) + ", ";
@@ -5021,6 +7528,26 @@ TeDatabase::locateCell (const string& table, TeCoord2D &pt, TeCell &cell, const
 	return true;
 }
 
+bool TeDatabase::removeGeometry(const string& tableName, const TeGeomRep& rep, const int& geomId)
+{
+	if(tableName.empty())
+	{
+		return false;
+	}
+
+	std::string remove = "DELETE FROM " + tableName;
+	if(rep == TePOLYGONS)
+	{
+		remove += " WHERE geom_id = " + geomId;
+	}
+	else
+	{
+		remove += " WHERE parent_id = " + geomId;
+	}
+
+	return execute(remove);
+}
+
 bool
 TeDatabase::inClauseValues(const string& query, const string& /* attribute */, vector<string>& inClauseVector)
 {
@@ -5032,13 +7559,13 @@ TeDatabase::inClauseValues(const string& query, const string& /* attribute */, v
 //retornam um portal
 
 bool 
-TeDatabase::spatialRelation(const string& actGeomTable, TeGeomRep actRep, Keys& actIdsIn, TeDatabasePortal *portal, int relate, const string& actCollTable)
+TeDatabase::spatialRelation(const string& actGeomTable, TeGeomRep actRep, TeKeys& actIdsIn, TeDatabasePortal *portal, int relate, const string& actCollTable)
 {
 	return (TeTopologicalRelation(actGeomTable, actRep, actIdsIn, portal, relate, actCollTable));
 }
 
 bool 
-TeDatabase::spatialRelation(const string& actGeomTable, TeGeomRep actRep, Keys& actIdsIn, const string& visGeomTable, TeGeomRep visRep, TeDatabasePortal *portal, int relate, const string& visCollTable)
+TeDatabase::spatialRelation(const string& actGeomTable, TeGeomRep actRep, TeKeys& actIdsIn, const string& visGeomTable, TeGeomRep visRep, TeDatabasePortal *portal, int relate, const string& visCollTable)
 {
 	return (TeTopologicalRelation(actGeomTable, actRep, actIdsIn, visGeomTable, visRep, portal, relate, visCollTable));
 }
@@ -5051,38 +7578,38 @@ TeDatabase::spatialRelation(const string& actGeomTable, TeGeomRep actRep, TeGeom
 
 //retornam um vetor de object_ids resultantes da consulta
 bool 
-TeDatabase::spatialRelation(const string& actGeomTable, TeGeomRep actRep, Keys& actIdsIn, Keys& actIdsOut, int relate, const string& actCollTable)
+TeDatabase::spatialRelation(const string& actGeomTable, TeGeomRep actRep, TeKeys& actIdsIn, TeKeys& actIdsOut, int relate, const string& actCollTable)
 {
 	return (TeTopologicalRelation(actGeomTable, actRep, actIdsIn, actIdsOut, this, relate, actCollTable));
 }
 
 bool 
-TeDatabase::spatialRelation(const string& actGeomTable, TeGeomRep actRep, Keys& actIdsIn, const string& visGeomTable, TeGeomRep visRep, Keys& visIdsOut, int relate, const string& visCollTable)
+TeDatabase::spatialRelation(const string& actGeomTable, TeGeomRep actRep, TeKeys& actIdsIn, const string& visGeomTable, TeGeomRep visRep, TeKeys& visIdsOut, int relate, const string& visCollTable, TeDatabase* dbVis)
 {
-	return (TeTopologicalRelation(actGeomTable, actRep, actIdsIn, visGeomTable, visRep, visIdsOut, this, relate, visCollTable));
+	return (TeTopologicalRelation(actGeomTable, actRep, actIdsIn, visGeomTable, visRep, visIdsOut, this, relate, visCollTable, dbVis));
 }
 
 bool 
-TeDatabase::spatialRelation(const string& actGeomTable, TeGeomRep actRep, TeGeometry* geom, Keys& actIdsOut, int relate, const string& actCollTable)
+TeDatabase::spatialRelation(const string& actGeomTable, TeGeomRep actRep, TeGeometry* geom, TeKeys& actIdsOut, int relate, const string& actCollTable)
 {
 	return (TeTopologicalRelation(actGeomTable, actRep, geom, actIdsOut, this, relate, actCollTable));
 }
 
 //metric functions
 bool
-TeDatabase::calculateArea(const string& actGeomTable, TeGeomRep actRep, Keys& actIdsIn, double &area)
+TeDatabase::calculateArea(const string& actGeomTable, TeGeomRep actRep, TeKeys& actIdsIn, double &area)
 {
 	return (TeGetArea(actGeomTable, actRep, actIdsIn, this, area));
 }
 
 bool 
-TeDatabase::calculateLength(const string& actGeomTable, TeGeomRep actRep, Keys& actIdsIn , double& length )
+TeDatabase::calculateLength(const string& actGeomTable, TeGeomRep actRep, TeKeys& actIdsIn , double& length )
 {
 	return (TeGetLength(actGeomTable, actRep, actIdsIn, this, length));
 }
 
 bool 
-TeDatabase::calculateDistance(const string& actGeomTable, TeGeomRep actRep, Keys& Ids, double& distance)
+TeDatabase::calculateDistance(const string& actGeomTable, TeGeomRep actRep, TeKeys& Ids, double& distance)
 {
 	return (TeGetDistance(actGeomTable, actRep, Ids, this, distance));
 }
@@ -5094,38 +7621,38 @@ TeDatabase::calculateDistance(const string& /* actGeomTable */, TeGeomRep /*actR
 }
 
 bool 
-TeDatabase::withinDistance(const string& actGeomTable, TeGeomRep actRep, const TeCoord2D& coord, KeysToDist& IdsDistOut, const double& max_distance, const string& actCollTable)
+TeDatabase::withinDistance(const string& actGeomTable, TeGeomRep actRep, const TeCoord2D& coord, TeKeysToDist& IdsDistOut, const double& max_distance, const string& actCollTable)
 {
 	return (TeGetWithinDistance(actGeomTable, actRep, coord, IdsDistOut, this, max_distance, actCollTable));
 }
 
 // functions that generate new geometry
 bool 
-TeDatabase::Buffer(const string& actGeomTable, TeGeomRep actRep, Keys& actIds, TePolygonSet& bufferSet, double dist)
+TeDatabase::buffer(const string& actGeomTable, TeGeomRep actRep, TeKeys& actIds, TePolygonSet& bufferSet, double dist)
 {
 	return (TeGetBuffer(actGeomTable, actRep, actIds, this, bufferSet, dist));
 }
 
 bool 
-TeDatabase::Centroid(const string&  actGeomTable , TeGeomRep actRep, TePointSet& centroidSet, Keys actIds, const string& actCollTable)
+TeDatabase::centroid(const string&  actGeomTable , TeGeomRep actRep, TePointSet& centroidSet, TeKeys actIds, const string& actCollTable)
 {
 	return (TeGetCentroid(actGeomTable, actRep, this, centroidSet, actIds, actCollTable));
 }
 
 bool 
-TeDatabase::ConvexHull(const string& actGeomTable, TeGeomRep actRep, Keys& actIds, TePolygonSet& convexHullSet)
+TeDatabase::convexHull(const string& actGeomTable, TeGeomRep actRep, TeKeys& actIds, TePolygonSet& convexHullSet)
 {
 	return (TeGetConvexHull(actGeomTable, actRep, actIds, this, convexHullSet));
 }
 
 bool 
-TeDatabase::nearestNeighbors(const string& /* actGeomTable */, const string& /* actCollTable */, TeGeomRep /* actRep */, const string& /* objId1 */, Keys& /* actIdsOut */, int /* numRes */)
+TeDatabase::nearestNeighbors(const string& /* actGeomTable */, const string& /* actCollTable */, TeGeomRep /* actRep */, const string& /* objId1 */, TeKeys& /* actIdsOut */, int /* numRes */)
 {
 	return false;
 }
 
 bool 
-TeDatabase::nearestNeighbors(const string& /* actGeomTable */, TeGeomRep /* actRep */, const string& /* objId1 */, const string& /* visGeomTable */, const string& /* visCollTable */, TeGeomRep /* visRep */, Keys& /* visIdsOut */, int /* numRes */)
+TeDatabase::nearestNeighbors(const string& /* actGeomTable */, TeGeomRep /* actRep */, const string& /* objId1 */, const string& /* visGeomTable */, const string& /* visCollTable */, TeGeomRep /* visRep */, TeKeys& /* visIdsOut */, int /* numRes */)
 {
 	return false;
 }
@@ -5143,7 +7670,7 @@ TeDatabase::nearestNeighbors(const string& /* actGeomTable */, TeGeomRep /* actR
 }
 
 bool 
-TeDatabase::geomIntersection(const string& actGeomTable, TeGeomRep actRep, Keys& actIds, TeGeometryVect& geomVect)
+TeDatabase::geomIntersection(const string& actGeomTable, TeGeomRep actRep, TeKeys& actIds, TeGeometryVect& geomVect)
 {
 	return (TeGetOverlay(actGeomTable, actRep, actIds, this, geomVect, TeINTERSECTION));
 }
@@ -5157,7 +7684,7 @@ TeDatabase::geomIntersection(const string& /* actGeomTable */, TeGeomRep /* actR
 bool 
 TeDatabase::geomDifference(const string& actGeomTable, TeGeomRep actRep, const string& objId1, const string& objId2, TeGeometryVect& geomVect)
 {
-	Keys actIds;
+	TeKeys actIds;
 	actIds.push_back(objId1);
 	actIds.push_back(objId2);
 
@@ -5172,7 +7699,7 @@ TeDatabase::geomDifference(const string& /* actGeomTable */, TeGeomRep /* actRep
 }
 
 bool 
-TeDatabase::geomUnion(const string&  actGeomTable, TeGeomRep actRep, Keys& actIds, TeGeometryVect& geomVect)
+TeDatabase::geomUnion(const string&  actGeomTable, TeGeomRep actRep, TeKeys& actIds, TeGeometryVect& geomVect)
 {
     return (TeGetOverlay(actGeomTable, actRep, actIds, this, geomVect, TeUNION));
 }
@@ -5198,7 +7725,7 @@ TeDatabase::geomXOr(const string& /* actGeomTable */, TeGeomRep /* actRep */, co
 // Operation with Image
 
 bool 
-TeDatabase::Zonal(const string& rasterTable, const string& actGeomTable, Keys& Ids, TeObjectStatistics& result)
+TeDatabase::zonal(const string& rasterTable, const string& actGeomTable, TeKeys& Ids, TeObjectStatistics& result, const bool &useDummy)
 {
 	TeDatabasePortal* portal=getPortal();
 	if (!portal)
@@ -5239,8 +7766,35 @@ TeDatabase::Zonal(const string& rasterTable, const string& actGeomTable, Keys& I
 
 		TeRaster::iteratorPoly itBegin = raster->begin(poly, TeBoxPixelIn);
 		TeRaster::iteratorPoly itEnd = raster->end(poly, TeBoxPixelIn);
-	
-		if(!TeCalculateStatistics (itBegin, itEnd, st))
+
+    if (itBegin == itEnd)  // try an approximation for the special case it is a special case
+    {
+      TeCoord2D pll = raster->coord2Index(TeCoord2D(poly.box().lowerLeft()));
+      TeCoord2D pur = raster->coord2Index(TeCoord2D(poly.box().upperRight()));
+
+      TeCoord2D ii(TeRoundRasterIndex(pll.x()),TeRoundRasterIndex(pll.y()));
+      TeCoord2D jj(TeRoundRasterIndex(pur.x()),TeRoundRasterIndex(pur.y()));
+
+      TeCoord2D ll = raster->index2Coord(pll);
+      TeCoord2D ur = raster->index2Coord(pur);
+
+      ll.x_-= raster->params().resx_/2.;
+      ll.y_-= raster->params().resy_/2.;
+      
+      ur.x_+= raster->params().resx_/2.;
+      ur.y_+= raster->params().resy_/2.;
+
+      TeBox bb(ll,ur);
+      TePolygon pol = polygonFromBox(bb);
+		  itBegin = raster->begin(pol, TeBoxPixelIn);
+		  itEnd = raster->end(pol, TeBoxPixelIn);
+      if (itBegin == itEnd)
+      {
+			  delete portal;
+			  return false;
+		  }
+   }
+	if(!TeCalculateStatistics (itBegin, itEnd, st, raster->params().dummy_,useDummy))
 		{
 			delete portal;
 			return false;
@@ -5257,7 +7811,7 @@ TeDatabase::Zonal(const string& rasterTable, const string& actGeomTable, Keys& I
 }
 	
 bool 
-TeDatabase::Zonal(const string& rasterTable, const string& actGeomTable, const string& actCollTable, TeObjectStatistics& result)
+TeDatabase::zonal(const string& rasterTable, const string& actGeomTable, const string& actCollTable, TeObjectStatistics& result,const bool &useDummy)
 {
 	TeDatabasePortal* portal=getPortal();
 	if (!portal)
@@ -5302,8 +7856,34 @@ TeDatabase::Zonal(const string& rasterTable, const string& actGeomTable, const s
 		
 		TeRaster::iteratorPoly itBegin = raster->begin(poly, TeBoxPixelIn);
 		TeRaster::iteratorPoly itEnd = raster->end(poly, TeBoxPixelIn);
-	
-		if(!TeCalculateStatistics (itBegin, itEnd, st))
+	  if (itBegin == itEnd)  // try an approximation for the special case it is a special case
+    {
+      TeCoord2D pll = raster->coord2Index(TeCoord2D(poly.box().lowerLeft()));
+      TeCoord2D pur = raster->coord2Index(TeCoord2D(poly.box().upperRight()));
+
+      TeCoord2D ii(TeRoundRasterIndex(pll.x()),TeRoundRasterIndex(pll.y()));
+      TeCoord2D jj(TeRoundRasterIndex(pur.x()),TeRoundRasterIndex(pur.y()));
+
+      TeCoord2D ll = raster->index2Coord(pll);
+      TeCoord2D ur = raster->index2Coord(pur);
+
+      ll.x_-= raster->params().resx_/2.;
+      ll.y_-= raster->params().resy_/2.;
+      
+      ur.x_+= raster->params().resx_/2.;
+      ur.y_+= raster->params().resy_/2.;
+
+      TeBox bb(ll,ur);
+      TePolygon pol = polygonFromBox(bb);
+		  itBegin = raster->begin(pol, TeBoxPixelIn);
+		  itEnd = raster->end(pol, TeBoxPixelIn);
+      if (itBegin == itEnd)
+      {
+			  delete portal;
+			  return false;
+		  }
+    }
+		if(!TeCalculateStatistics (itBegin, itEnd, st,raster->params().dummy_,useDummy))
 		{
 			delete portal;
 			return false;
@@ -5319,7 +7899,7 @@ TeDatabase::Zonal(const string& rasterTable, const string& actGeomTable, const s
 }
 
 bool 
-TeDatabase::Zonal(const string& rasterTable, TePolygon& poly, TeStatisticsDimensionVect& result)
+TeDatabase::zonal(const string& rasterTable, TePolygon& poly, TeStatisticsDimensionVect& result, const bool &useDummy)
 {
 	TeDatabasePortal* portal=getPortal();
 	if (!portal)
@@ -5341,8 +7921,32 @@ TeDatabase::Zonal(const string& rasterTable, TePolygon& poly, TeStatisticsDimens
 
 	TeRaster::iteratorPoly itBegin = raster->begin(poly, TeBoxPixelIn);
 	TeRaster::iteratorPoly itEnd = raster->end(poly, TeBoxPixelIn);
+	if (itBegin == itEnd)  // try an approximation for the special case it is a special case
+  {
+    TeCoord2D pll = raster->coord2Index(TeCoord2D(poly.box().lowerLeft()));
+    TeCoord2D pur = raster->coord2Index(TeCoord2D(poly.box().upperRight()));
+
+    TeCoord2D ii(TeRoundRasterIndex(pll.x()),TeRoundRasterIndex(pll.y()));
+    TeCoord2D jj(TeRoundRasterIndex(pur.x()),TeRoundRasterIndex(pur.y()));
+
+    TeCoord2D ll = raster->index2Coord(pll);
+    TeCoord2D ur = raster->index2Coord(pur);
+
+    ll.x_-= raster->params().resx_/2.;
+    ll.y_-= raster->params().resy_/2.;
+    
+    ur.x_+= raster->params().resx_/2.;
+    ur.y_+= raster->params().resy_/2.;
+
+    TeBox bb(ll,ur);
+    TePolygon pol = polygonFromBox(bb);
+		itBegin = raster->begin(pol, TeBoxPixelIn);
+		itEnd = raster->end(pol, TeBoxPixelIn);
+    if (itBegin == itEnd)
+			return false;
+  }
 	
-	if(!TeCalculateStatistics (itBegin, itEnd, result))
+  if(!TeCalculateStatistics (itBegin, itEnd, result,raster->params().dummy_,useDummy))
 		return false;
 
 	delete raster;
@@ -5351,7 +7955,7 @@ TeDatabase::Zonal(const string& rasterTable, TePolygon& poly, TeStatisticsDimens
 
 
 bool 
-TeDatabase::Mask(const string& rasterTable, const string& actGeomTable, const string& objId, const string& nameLayerOut, TeStrategicIterator st)
+TeDatabase::mask(const string& rasterTable, const string& actGeomTable, const string& objId, const string& nameLayerOut, TeStrategicIterator st)
 {
 	TeDatabasePortal* portal=getPortal();
 	if (!portal)
@@ -5383,30 +7987,27 @@ TeDatabase::Mask(const string& rasterTable, const string& actGeomTable, const st
 	
 	TePolygon poly;
 	portal->fetchGeometry(poly);
+	delete portal;
 
 	TeRaster* rasterOut = TeMask (raster, poly, st);
-	TeRasterParams param = rasterOut->params();	
-
-	TeBox b = param.boundingBox();
-	TeLayer* layer = new TeLayer(nameLayerOut,this, b , rasterOut->projection());
-	bool status = TeImportRaster(layer,rasterOut, param.blockWidth_, param.blockHeight_, param.compression_[0]);
+	if(!rasterOut)
+		return false;
 
+	TeLayer* res = TeImportRaster(nameLayerOut, rasterOut, this);
 	delete raster;
 	delete rasterOut;
-	delete portal;
-	return status;
+	return (res != 0);
 }
 
 
 
 bool
-TeDatabase::Mask(const string& rasterTable, TePolygon& poly, const string& nameLayerOut, TeStrategicIterator st)
+TeDatabase::mask(const string& rasterTable, TePolygon& poly, const string& nameLayerOut, TeStrategicIterator st)
 {
 	TeDatabasePortal* portal=getPortal();
 	if (!portal)
 		return false;
 	
-	//recuperar o raster!!!
 	string sql = "SELECT layer_id FROM te_representation";
 	sql += " WHERE geom_table = '" + rasterTable +"'";
 	if(!portal->query(sql) || !portal->fetchRow())
@@ -5415,21 +8016,17 @@ TeDatabase::Mask(const string& rasterTable, TePolygon& poly, const string& nameL
 		return false;
 	}
 
-	int layerId = atoi(portal->getData(0));
-	TeRaster* raster = loadLayerRaster(layerId);
-
+	TeRaster* raster = loadLayerRaster(atoi(portal->getData(0)));
 	delete portal;
 
 	TeRaster* rasterOut = TeMask (raster, poly, st);
-	TeRasterParams param = rasterOut->params();	
+	if(!rasterOut)
+		return false;
 
-	TeBox b = param.boundingBox();
-	TeLayer* layer = new TeLayer(nameLayerOut,this, b , rasterOut->projection());
-	bool status = TeImportRaster(layer,rasterOut, param.blockWidth_, param.blockHeight_, param.compression_[0]);
-	
+	TeLayer* res = TeImportRaster(nameLayerOut, rasterOut, this);
 	delete raster;
 	delete rasterOut;
-	return status;
+	return (res != 0);
 }
 
 
@@ -5438,7 +8035,7 @@ TeDatabase::getSQLBoxWhere (TeBox &box, TeGeomRep rep)
 {
 	string wherebox;
 	string lowerX, lowerY, upperX, upperY;
-	if(rep == TePOLYGONS || rep == TeLINES || rep == TeCELLS || rep == TeRASTER)
+	if(rep == TePOLYGONS || rep == TeLINES || rep == TeCELLS || rep == TeRASTER || rep == TeRASTERFILE)
 	{
 		lowerX = "lower_x";
 		lowerY = "lower_y";
@@ -5452,12 +8049,10 @@ TeDatabase::getSQLBoxWhere (TeBox &box, TeGeomRep rep)
 		upperX = "x";
 		upperY = "y";
 	}
-
-	wherebox = "NOT("+ lowerX +" >= " + Te2String(box.x2_, 12) + " OR ";
-	wherebox += upperX +" <= " + Te2String(box.x1_, 12) + " OR ";
-	wherebox += lowerY +" >= " + Te2String(box.y2_, 12) + " OR ";
-	wherebox += upperY +" <= " + Te2String(box.y1_, 12) + ")";
-		
+	wherebox = "NOT("+ lowerX +" > " + Te2String(box.x2_, 12) + " OR ";
+	wherebox += upperX +" < " + Te2String(box.x1_, 12) + " OR ";
+	wherebox += lowerY +" > " + Te2String(box.y2_, 12) + " OR ";
+	wherebox += upperY +" < " + Te2String(box.y1_, 12) + ")";
 	return wherebox;
 }
 
@@ -5467,7 +8062,7 @@ TeDatabase::getSQLBoxWhere (const string& table1, const string& table2, TeGeomRe
 {
 	string wherebox;
 
-	if(rep2 == TePOLYGONS || rep2 == TeLINES || rep2 == TeCELLS || rep2 == TeRASTER)
+	if(rep2 == TePOLYGONS || rep2 == TeLINES || rep2 == TeCELLS || rep2 == TeRASTER || rep2 == TeRASTERFILE)
 	{
 		wherebox = " NOT( ";
 		wherebox += table2 +".lower_x > "+ table1 +".upper_x  OR ";
@@ -5620,7 +8215,7 @@ string
 TeDatabase::getSQLTemporalWhere(int time1, int time2, TeChronon chr, TeTemporalRelation rel, 
 						   const string& initialTime, const string& finalTime)
 {
-	//rever os chronons definidos - alterar o parser para restri��o temporal
+	//rever os chronons definidos - alterar o parser para restri��o temporal
 	string func, sql;
 	switch(chr)
 	{
@@ -5711,8 +8306,8 @@ string
 TeDatabase::getSQLTemporalWhere (const string& temporalRest)
 {
 	string result, tableName, initialCol, finalCol, time1, time2, mask; 
-	TeTemporalRelation rel;
-	TeChronon chronon; 
+	TeTemporalRelation rel = TeTIMEUNDEFINED;
+	TeChronon chronon = TeNOCHRONON; 
 	
 	string temp = temporalRest;
 	bool flag = true;
@@ -5936,7 +8531,7 @@ TeDatabase::getMBRSelectedObjects(string /* geomTable */,string /* colGeom */, s
 	{
 		case TePOLYGONS:
 		case TeLINES:
-
+		case TeCELLS:
 			fields = "MIN(lower_x), MIN(lower_y), MAX(upper_x), MAX(upper_y)";
 			query =  " SELECT " + fields;
 			query += " FROM " + fromClause; 
@@ -5972,7 +8567,7 @@ TeDatabase::getMBRSelectedObjects(string /* geomTable */,string /* colGeom */, s
 			break;
 
 		case TePOINTS:
-
+		case TeTEXT:
 			fields = "MIN(x), MIN(y), MAX(x), MAX(y)";
 			query =  " SELECT " + fields;
 			query += " FROM " + fromClause; 
@@ -6029,11 +8624,8 @@ TeDatabase::getMBRSelectedObjects(string /* geomTable */,string /* colGeom */, s
 			status = false;
 			break;
 	}
-
 	delete portal;
-
 	return status;
-
 }
 
 bool 
@@ -6050,68 +8642,31 @@ TeDatabase::getAttributeList(const string& tableName,TeAttributeList& attList)
 		return false;
 	}
 	else
-		attList = portal->AttributeList();
+		attList = portal->getAttributeList();
 	delete portal;
 	return true;
 }
 
-TeBox 
-TeDatabase::getThemeBox(TeTheme* theme)
+
+bool TeDatabase::insertRasterVisual (int themeId , TeRasterVisual* vis)
 {
-	TeBox bb;
-	if (!theme)
-		return bb;
+	TeRasterTransform::TeRasterTransfFunctions tf = vis->getTransfFunction();
 
-	string colTabName = theme->collectionTable();
-	if (colTabName.empty())
-		return bb;
+	TeDatabasePortal* portal = this->getPortal();
 
-	string sqlfrom;
-	TeLayer* layer = theme->layer();
-	string geomTable;
-	if (layer->hasGeometry(TePOINTS))
-	{
-		geomTable = layer->tableName(TePOINTS);
-		sqlfrom = colTabName + " LEFT JOIN " + geomTable;
-		sqlfrom += " ON " + colTabName + ".c_object_id = " + geomTable + ".object_id";
-		TeBox bpt;
-		if (getMBRSelectedObjects(geomTable,"spatial_data", sqlfrom, "","",TePOINTS,bpt))
-			updateBox(bb,bpt);
-	}
-	if (layer->hasGeometry(TeLINES))
-	{
-		geomTable = layer->tableName(TeLINES);
-		sqlfrom = colTabName + " LEFT JOIN " + geomTable;
-		sqlfrom += " ON " + colTabName + ".c_object_id = " + geomTable + ".object_id";
-		TeBox bln;
-		if (getMBRSelectedObjects(geomTable,"spatial_data", sqlfrom, "","",TeLINES,bln))
-			updateBox(bb,bln);
-	}
-	if (layer->hasGeometry(TePOLYGONS))
-	{
-		geomTable = layer->tableName(TePOLYGONS);
-		sqlfrom = colTabName + " LEFT JOIN " + geomTable;
-		sqlfrom += " ON " + colTabName + ".c_object_id = " + geomTable + ".object_id";
-		TeBox bpol;
-		if (getMBRSelectedObjects(geomTable,"spatial_data", sqlfrom, "","",TePOLYGONS,bpol))
-			updateBox(bb,bpol);
-	}
+	std::string sqlLut = "SELECT lut_table from te_visual_raster where theme_id = " + Te2String(themeId);
 
-	if (layer->hasGeometry(TeCELLS))
+	if(portal->query(sqlLut) && portal->fetchRow())
 	{
-		geomTable = layer->tableName(TeCELLS);
-		sqlfrom = colTabName + " LEFT JOIN " + geomTable;
-		sqlfrom += " ON " + colTabName + ".c_object_id = " + geomTable + ".object_id";
-		TeBox bpol;
-		if (getMBRSelectedObjects(geomTable,"spatial_data", sqlfrom, "","",TeCELLS,bpol))
-			updateBox(bb,bpol);
-	}
-	return bb;
-}
+		std::string lutName = portal->getData(0);
 
-bool TeDatabase::insertRasterVisual (int themeId , TeRasterVisual* vis)
-{
-	TeRasterTransform::TeRasterTransfFunctions tf = vis->getTransfFunction();
+		if (this->tableExist(lutName))
+		{
+			if(!this->deleteTable(lutName))
+				return false;
+		}
+	}
+	delete portal;
 		
 	if (tf == TeRasterTransform::TeNoTransf)
 		return true;
@@ -6157,6 +8712,64 @@ bool TeDatabase::insertRasterVisual (int themeId , TeRasterVisual* vis)
 		}
 		return true;
 	}
+
+	if(tf == TeRasterTransform::TeThree2LUTThreeBand || tf == TeRasterTransform::TeMono2LUTMonoBand)
+	{
+		std::string lutName = vis->getLutTableName();
+
+		if(lutName.empty())
+			return false;
+
+		map<TeRasterTransform::TeRGBChannels,short>& RGBmap = vis->getRGBMap();
+		map<TeRasterTransform::TeRGBChannels,short>::iterator it = RGBmap.begin();
+		while (it != RGBmap.end())
+		{
+			sql = "INSERT INTO te_visual_raster (theme_id, band_in, band_out, transf_type, lut_table) VALUES (";
+			sql += Te2String(themeId) + "," + Te2String(static_cast<short>(it->second)) + ",";
+			sql += Te2String(static_cast<short>(it->first)) + "," + Te2String(static_cast<short>(tf))+ ",'";
+			sql += lutName + "')";
+			if (!this->execute(sql))
+				return false;
+			++it;
+		}
+		
+		if (this->tableExist(lutName))
+		{
+			if(!this->deleteTable(lutName))
+				return false;
+		}
+
+		if (this->createLUTTable(lutName))
+		{
+			for (unsigned int i = 0; i < vis->lutr_.size(); ++i)
+			{
+				std::string sql;
+				
+				if(tf == TeRasterTransform::TeThree2LUTThreeBand)
+				{
+					sql = "INSERT INTO " + lutName + " VALUES(";
+					sql += Te2String(i) + ", ";
+					sql += Te2String(vis->lutr_[i]) + ", ";
+					sql += Te2String(vis->lutg_[i]) + ", ";
+					sql += Te2String(vis->lutb_[i]) + ")";
+				}
+				else
+				{
+					sql = "INSERT INTO " + lutName + " VALUES(";
+					sql += Te2String(i) + ", ";
+					sql += Te2String(vis->lutr_[i]) + ", ";
+					sql += Te2String(vis->lutr_[i]) + ", ";
+					sql += Te2String(vis->lutr_[i]) + ")";
+				}
+				
+				if(!this->execute(sql))
+					return false;
+			}
+		 }
+
+		return true;
+	}
+
 	return false;
 }
 
@@ -6270,95 +8883,608 @@ TeDatabase::locateTextSet (const string& table, TeCoord2D &pt, TeTextSet& textSe
 	return located;
 }
 
-
-// End TeDatabase Methods
-
-// Begin TeDatabasePortal Methods
-
-TeDatabasePortal::TeDatabasePortal():
-	db_(0),			
-	numRows_(0),
-	numFields_ (0),	
-	errorMessage_(""),
-	errorNumber_(0)
-	{}
-
-TeDatabasePortal::~TeDatabasePortal ()
+bool 
+TeDatabase::updateVersionStamp(const string& DBversion )
 {
+	TeTable versionTable;
+	if( !loadTable( "te_database", versionTable ) )
+		return false;
+	if ( versionTable.size() ) //no empty
+	{
+		string deleteVersionTb = "DELETE FROM te_database";
+		if( !execute( deleteVersionTb ) )
+			return false;
+	}
+	//insert
+	string insVersionTb = "INSERT INTO te_database (db_version) VALUES('" + DBversion + "')";
+	if( !execute(insVersionTb) )
+		return false;
+	return true;
 }
 
-double 
-TeDatabasePortal::getDouble (int i)
-{  
-	char* val = getData(i); 
-	return atof(val); 
-}
-
-double 
-TeDatabasePortal::getDouble (const string& s)
-{  
-	char* val = getData(s); 
-	return atof(val); 
-}
-
-int 
-TeDatabasePortal::getInt (int i)
-{  
-	char* val = getData(i); 
-	return atoi(val); 
-}
-
-int 
-TeDatabasePortal::getInt (const string& s)
-{  
-	char* val = getData(s); 
-	return atoi(val); 
+bool 
+TeDatabase::loadVersionStamp(string& DBversion)
+{
+	DBversion.clear();
+	TeTable versionTable;	
+	if( !loadTable("te_database",versionTable) )
+		return false;
+	if ( versionTable.size() == 0 )
+		return false;
+	std::vector<std::string> attrs;
+	versionTable.attributeNames( attrs );
+	for (unsigned int i = 0; i < attrs.size(); i++ )
+	{
+		if ( TeStringCompare(attrs[i], "db_version", false ) )
+		{
+			DBversion = versionTable(0, i);
+			break;
+		}
+	}
+	return false;
 }
 
-bool
-TeDatabasePortal::fetchGeometry (TeCell& cell)
+bool 
+TeDatabase::updateLayerBox(TeLayer* layer)
 {
-	int index = atoi(getData("geom_id"));
-	string object_id = getData("object_id");
-	TeBox b (atof(getData("lower_x")),atof(getData("lower_y")),atof(getData("upper_x")),atof(getData("upper_y")));
-	cell.geomId(index);
-	cell.objectId(object_id);
-	cell.setBox (b);
-	cell.column(atoi(getData("col_number")));
-	cell.line(atoi(getData("row_number")));
-	return (fetchRow());
+	if (!layer)
+		return false;
+	TeBox box = layer->box();
+	string sql = "UPDATE te_layer SET lower_x = " + Te2String(box.x1(),15);
+		   sql += ", lower_y = " + Te2String(box.y1(),15);
+		   sql += ", upper_x = " + Te2String(box.x2(),15);
+		   sql += ", upper_y = " + Te2String(box.y2(),15);
+		   sql += " WHERE layer_id=" + Te2String(layer->id());
+	return execute(sql);
 }
 
-TeAttribute TeDatabasePortal::getAttribute (int i)
+//! Load information about all projects stored in the database
+bool 
+TeDatabase::loadProjectSet()
 {
-	TeAttributeList::iterator it = attList_.begin();
-	int j = 0;
-	while ( it != attList_.end() )
+	//clear map
+	TeProjectMap::iterator projectIt;
+	for (projectIt = metaModel_->projectMap().begin(); projectIt != metaModel_->projectMap().end(); ++projectIt)
 	{
-		if (i == j)
-			return (*it);
-		++it;
-		j++;
+		if (projectIt->second)
+			delete projectIt->second;
 	}
-	return TeAttribute();
-}
+	metaModel_->projectMap().clear();
+	
+	//sql
+	TeDatabasePortal* portal = this->getPortal();
+	if(!portal)
+		return false;
 
-TeAttribute TeDatabasePortal::getAttribute (const string& s)
-{
-	TeAttributeList::iterator it = attList_.begin();
-	while ( it != attList_.end() )
+	string get = " SELECT te_project.*, te_project_view.* ";
+	get += " FROM ((te_project LEFT JOIN te_project_view ";
+	get += " ON te_project.project_id = te_project_view.project_id) ";
+	get += " LEFT JOIN te_view ON te_view.view_id = te_project_view.view_id)";
+	get += " WHERE te_view.user_name = '" + this->user() + "'";
+	get += " ORDER BY te_project.project_id, te_project_view.view_id";
+
+	if (!portal->query(get))
+	{	
+		delete portal;
+		return false;
+	}
+
+	bool flag = portal->fetchRow();
+	while (flag)
 	{
-		if (TeConvertToUpperCase(s) == TeConvertToUpperCase((*it).rep_.name_))
-			return (*it);
-		++it;
+		TeProject* project = new TeProject(portal->getInt(0), this);
+		project->setName(string(portal->getData(1)));
+		project->setDescription(string(portal->getData(2)));
+//		project->setCurrentViewId(portal->getInt(3));
+		int pId = portal->getInt(3);
+		
+		//load all views
+		bool hasViews = true;
+		while(hasViews)
+		{
+			project->addView(portal->getInt(5));
+			flag = portal->fetchRow();
+			if(!flag || (portal->getInt(0)!=project->id()))
+				hasViews = false;
+		}
+		
+		project->setCurrentViewId(pId);
+		metaModel_->projectMap()[project->id()] = project;
 	}
-	return TeAttribute();
+
+	delete portal;
+	return true;
+
 }
 
-int 
-TeDatabasePortal::getColumnIndex (const string& s)
+//! Load information about a particular project
+bool 
+TeDatabase::loadProject(TeProject* project)
 {
-	TeAttributeList::iterator it = attList_.begin();
+	if(!project)
+		return false;
+	
+	//sql
+	string get = " SELECT te_project.*, te_project_view.* ";
+	get += " FROM te_project LEFT JOIN te_project_view ";
+	get += " ON te_project.project_id = te_project_view.project_id ";
+
+	if(project->id()>0)
+		get += " WHERE  te_project.project_id = "+ Te2String(project->id());
+	else if (!project->name().empty())
+		get += " WHERE  te_project.name = '"+ project->name() +"'";
+	else 
+		return false;
+
+	get += " ORDER BY te_project.project_id, te_project_view.view_id";
+
+	TeDatabasePortal* portal = this->getPortal();
+	if(!portal)
+		return false;
+	if (!portal->query(get) || !portal->fetchRow())
+	{	
+		delete portal;
+		return false;
+	}
+
+	project->setId (portal->getInt(0));
+	project->setDatabase(this);
+	project->setName(string(portal->getData(1)));
+	project->setDescription(string(portal->getData(2)));	
+	int currentViewId = portal->getInt(3);
+	
+	//load all views
+	bool hasViews = true;
+	while(hasViews)
+	{
+		project->addView(portal->getInt(5));
+		bool flag = portal->fetchRow();
+		if(!flag || (portal->getInt(0)!=project->id()))
+			hasViews = false;
+	}
+	project->setCurrentViewId(currentViewId); //the views vector need be filled
+		
+	metaModel_->projectMap()[project->id()] = project;
+	delete portal;
+	return true;
+}
+	
+//! Update information about a layer
+bool 
+TeDatabase::updateProject(TeProject *project)
+{
+	if (!project)
+		return false;
+	int projectId = project->id();
+	if (projectId <= 0)
+		return false;
+
+	//update project information
+	string sql = " UPDATE te_project SET ";
+	sql += " name = '" + project->name() +"'";
+	sql += ", description = '" + project->description() +"'";
+	sql += ", current_view = "+ Te2String(project->getCurrentViewId());
+	sql += " WHERE project_id = "+ Te2String(project->id());
+	if (!this->execute (sql))
+	{
+		this->errorMessage_ = "\nError updating project information";
+		return false;
+	}	
+	
+	//delete relation
+	sql = "DELETE FROM te_project_view WHERE project_id =" + Te2String(project->id());
+	if (!this->execute (sql))
+	{
+		this->errorMessage_ = "Error deleting project/view relation";
+		return false;
+	}
+	const TeViewVector vv = project->getViewVector();
+	for (unsigned int i=0; i<vv.size(); ++i)
+	{
+		sql = "INSERT INTO te_project_view VALUES(" + Te2String(projectId) + "," + Te2String(vv[i]) + ")";
+		if (!this->execute (sql))
+		{
+			this->errorMessage_ = "Error inserting project/view relation";
+			return false;
+		}
+	}
+	return true;
+}
+
+//! Delete a project from the database
+bool 
+TeDatabase::deleteProject(int projectId)
+{
+	string sql = "DELETE FROM te_project_view WHERE project_id =" + Te2String(projectId);
+	if (!this->execute (sql))
+	{
+		this->errorMessage_ = "Error deleting project/view relation";
+		return false;
+	}
+	sql = "DELETE FROM te_project WHERE project_id =" + Te2String(projectId);
+	if (!this->execute (sql))
+	{
+		this->errorMessage_ = "Error deleting te_project entry";
+		return false;
+	}
+	
+	// delete project and its entry in the project map
+	TeProject* proj = metaModel_->projectMap()[projectId];
+	metaModel_->projectMap().erase(projectId);
+	if(proj)
+		delete proj;
+	return true;
+}
+
+//! Insert a project/view relation
+bool 
+TeDatabase::insertProjectViewRel(int projectId, int viewId)
+{
+	string sql = "INSERT INTO te_project_view VALUES(" + Te2String(projectId) + "," + Te2String(viewId) + ")";
+	if (!this->execute (sql))
+	{
+		this->errorMessage_ = "Error inserting project/view relation";
+		return false;
+	}
+	return true;
+}
+
+bool 
+TeDatabase::deleteProjectViewRel(int projectId, int viewId)
+{
+	string sql ="DELETE FROM te_project_view WHERE project_id = ";
+	       sql += Te2String(projectId);
+		   sql += " AND view_id = ";
+		   sql += Te2String(viewId);
+	if (!this->execute (sql))
+	{
+		this->errorMessage_ = "Error removing project/view relation";
+		return false;
+	}
+	return true;
+}
+
+bool TeDatabase::projectExist(const string& projectName)
+{
+	TeDatabasePortal* portal = this->getPortal();
+
+	if(!portal)
+		return false;
+
+	string sql = "SELECT name FROM te_project WHERE " +  this->toUpper("name") + " = '" + TeConvertToUpperCase(projectName) + "'";
+
+	if(!portal->query(sql))
+	{	
+		portal->freeResult();
+		delete portal;
+		return false;
+	}
+
+	if(portal->fetchRow())
+	{
+		portal->freeResult();
+		delete portal;
+		return true;		
+	}
+
+	portal->freeResult();
+	delete portal;
+	return false;
+}
+
+bool TeDatabase::createPolygonGeometry(const string& tableName)
+{
+	if(tableName.empty())
+		return false;
+
+	TeAttributeList attList;
+
+	{TeAttribute attGeomId;
+	attGeomId.rep_.name_ = "geom_id";
+	attGeomId.rep_.type_ = TeUNSIGNEDINT;
+	attGeomId.rep_.isAutoNumber_ = true;
+	attGeomId.rep_.isPrimaryKey_ = true;
+	attGeomId.rep_.null_ = false;
+	attList.push_back(attGeomId);}
+
+	{TeAttribute attObjId;
+	attObjId.rep_.name_ = "object_id";
+	attObjId.rep_.type_ = TeSTRING;
+	attObjId.rep_.numChar_ = 255;
+	attObjId.rep_.null_ = false;
+	attList.push_back(attObjId);}
+
+	{TeAttribute attSpatial;
+	attSpatial.rep_.name_ = "spatial_data";
+	attSpatial.rep_.type_ = TePOLYGONTYPE;
+	attList.push_back(attSpatial);}
+
+	if(!createTable(tableName, attList))
+		return false;
+
+	string idxName = "te_idx_"  + tableName + "_obj";
+
+	return createIndex(tableName, idxName, "object_id");
+}
+
+bool TeDatabase::createLineGeometry(const string& tableName) 
+{
+	if(tableName.empty())
+		return false;
+
+	TeAttributeList attList;
+
+	{TeAttribute attGeomId;
+	attGeomId.rep_.name_ = "geom_id";
+	attGeomId.rep_.type_ = TeUNSIGNEDINT;
+	attGeomId.rep_.isAutoNumber_ = true;
+	attGeomId.rep_.isPrimaryKey_ = true;
+	attGeomId.rep_.null_ = false;
+	attList.push_back(attGeomId);}
+
+	{TeAttribute attObjId;
+	attObjId.rep_.name_ = "object_id";
+	attObjId.rep_.type_ = TeSTRING;
+	attObjId.rep_.numChar_ = 255;
+	attObjId.rep_.null_ = false;
+	attList.push_back(attObjId);}
+
+	{TeAttribute attSpatial;
+	attSpatial.rep_.name_ = "spatial_data";
+	attSpatial.rep_.type_ = TeLINE2DTYPE;
+	attList.push_back(attSpatial);}
+
+	if(!createTable(tableName, attList))
+		return false;
+
+	string idxName = "te_idx_"  + tableName + "_obj";
+
+	return createIndex(tableName, idxName, "object_id");
+}
+
+bool 
+TeDatabase::deleteRelation(const string& name, const string& table)
+{
+	string relation = "ALTER TABLE " + table + " DROP ";
+	relation += " CONSTRAINT " + name;
+	return execute(relation);
+}
+
+bool 
+TeDatabase::dropDBView(const string& dbViewName)
+{
+   string del = "DROP VIEW " + dbViewName;
+   return (execute(del));
+} 
+
+bool 
+TeDatabase::updateBBox(const string& tableName, const string& keyColumnName, int keyValue, const TeBox& box)
+{
+	string upd = "UPDATE "+tableName+" SET lower_x=" + Te2String(box.x1_,15);
+	upd += ", lower_y=" + Te2String(box.y1_, 15);
+	upd += ", upper_x=" + Te2String(box.x2_, 15);
+	upd += ", upper_y=" + Te2String(box.y2_, 15);
+	upd += " WHERE " + keyColumnName + "=" + Te2String(keyValue);
+	return execute(upd);
+}
+bool 
+TeDatabase::beginTransaction()
+{
+	transactionCounter_++; 
+	return true;
+} 
+
+bool 
+TeDatabase::commitTransaction()
+{
+	transactionCounter_ = max(transactionCounter_-1, 0);
+	return true;
+} 
+
+bool 
+TeDatabase::rollbackTransaction()
+{
+	transactionCounter_ = max(transactionCounter_-1, 0);
+	return true;
+} 
+
+TeBox 
+TeDatabase::getThemeBox(TeTheme* theme)
+{
+	TeBox bb;
+	if (!theme)
+		return bb;
+
+	TeLayer* layer = theme->layer();
+	if (layer->hasGeometry(TeRASTER))
+		bb = layer->box();
+
+	if (layer->hasGeometry(TeRASTERFILE))
+		updateBox(bb,layer->getRepresentation(TeRASTERFILE)->box_);
+
+	string colTabName = theme->collectionTable();
+	if (colTabName.empty())
+		return bb;
+
+	string sqlfrom;
+	string geomTable;
+	if (layer->hasGeometry(TePOINTS))
+	{
+		geomTable = layer->tableName(TePOINTS);
+		sqlfrom = colTabName + " LEFT JOIN " + geomTable;
+		sqlfrom += " ON " + colTabName + ".c_object_id = " + geomTable + ".object_id";
+		TeBox bpt;
+		if (getMBRSelectedObjects(geomTable,"spatial_data", sqlfrom, "","",TePOINTS,bpt))
+			updateBox(bb,bpt);
+	}
+	if (layer->hasGeometry(TeLINES))
+	{
+		geomTable = layer->tableName(TeLINES);
+		sqlfrom = colTabName + " LEFT JOIN " + geomTable;
+		sqlfrom += " ON " + colTabName + ".c_object_id = " + geomTable + ".object_id";
+		TeBox bln;
+		if (getMBRSelectedObjects(geomTable,"spatial_data", sqlfrom, "","",TeLINES,bln))
+			updateBox(bb,bln);
+	}
+	if (layer->hasGeometry(TePOLYGONS))
+	{
+		geomTable = layer->tableName(TePOLYGONS);
+		sqlfrom = colTabName + " LEFT JOIN " + geomTable;
+		sqlfrom += " ON " + colTabName + ".c_object_id = " + geomTable + ".object_id";
+		TeBox bpol;
+		if (getMBRSelectedObjects(geomTable,"spatial_data", sqlfrom, "","",TePOLYGONS,bpol))
+			updateBox(bb,bpol);
+	}
+
+	if (layer->hasGeometry(TeCELLS))
+	{
+		geomTable = layer->tableName(TeCELLS);
+		sqlfrom = colTabName + " LEFT JOIN " + geomTable;
+		sqlfrom += " ON " + colTabName + ".c_object_id = " + geomTable + ".object_id";
+		TeBox bpol;
+		if (getMBRSelectedObjects(geomTable,"spatial_data", sqlfrom, "","",TeCELLS,bpol))
+			updateBox(bb,bpol);
+	}
+
+	if (layer->hasGeometry(TeTEXT))
+	{
+		geomTable = layer->tableName(TeTEXT);
+		sqlfrom = colTabName + " LEFT JOIN " + geomTable;
+		sqlfrom += " ON " + colTabName + ".c_object_id = " + geomTable + ".object_id";
+		TeBox bpol;
+		if (getMBRSelectedObjects(geomTable,"spatial_data", sqlfrom, "","",TeTEXT,bpol))
+			updateBox(bb,bpol);
+	}	
+
+	return bb;
+}
+
+// End TeDatabase Methods
+
+// Begin TeDatabasePortal Methods
+
+TeDatabasePortal::TeDatabasePortal():
+	db_(0),			
+	numRows_(0),
+	numFields_ (0),	
+	errorMessage_(""),
+	errorNumber_(0)
+	{}
+
+TeDatabasePortal::~TeDatabasePortal ()
+{
+}
+
+double 
+TeDatabasePortal::getDouble (int i)
+{  
+	char* val = getData(i); 
+	return atof(val); 
+}
+
+double 
+TeDatabasePortal::getDouble (const string& s)
+{  
+	char* val = getData(s); 
+	return atof(val); 
+}
+
+int 
+TeDatabasePortal::getInt (int i)
+{  
+	char* val = getData(i); 
+	return atoi(val); 
+}
+
+int 
+TeDatabasePortal::getInt (const string& s)
+{  
+	char* val = getData(s); 
+	return atoi(val); 
+}
+
+bool 
+TeDatabasePortal::fetchGeometry (TePolygon& geom, const unsigned int&)
+{
+	return fetchGeometry(geom);
+}
+
+bool 
+TeDatabasePortal::fetchGeometry (TeLine2D& geom, const unsigned int&)
+{
+	return fetchGeometry(geom);
+}
+	
+bool 
+TeDatabasePortal::fetchGeometry (TeNode& geom, const unsigned int&)
+{
+	return fetchGeometry(geom);
+}
+
+bool 
+TeDatabasePortal::fetchGeometry (TePoint& geom, const unsigned int&)
+{
+	return fetchGeometry(geom);
+}
+
+bool
+TeDatabasePortal::fetchGeometry (TeCell& cell)
+{
+	int index = atoi(getData("geom_id"));
+	string object_id = getData("object_id");
+	TeBox b (atof(getData("lower_x")),atof(getData("lower_y")),atof(getData("upper_x")),atof(getData("upper_y")));
+	cell.geomId(index);
+	cell.objectId(object_id);
+	cell.setBox (b);
+	cell.column(atoi(getData("col_number")));
+	cell.line(atoi(getData("row_number")));
+	return (fetchRow());
+}
+
+bool
+TeDatabasePortal::fetchGeometry (TeCell& cell, const unsigned int& initIndex)
+{
+	int index = atoi(getData(initIndex));
+	string object_id = getData(initIndex+1);
+	TeBox b (atof(getData(initIndex+2)),atof(getData(initIndex+3)),atof(getData(initIndex+4)),atof(getData(initIndex+5)));
+	cell.geomId(index);
+	cell.objectId(object_id);
+	cell.setBox (b);
+	cell.column(atoi(getData(initIndex+6)));
+	cell.line(atoi(getData(initIndex+7)));
+	return (fetchRow());
+}
+
+TeAttribute TeDatabasePortal::getAttribute (int i)
+{
+	TeAttributeList::iterator it = attList_.begin();
+	int j = 0;
+	while ( it != attList_.end() )
+	{
+		if (i == j)
+			return (*it);
+		++it;
+		j++;
+	}
+	return TeAttribute();
+}
+
+TeAttribute TeDatabasePortal::getAttribute (const string& s)
+{
+	TeAttributeList::iterator it = attList_.begin();
+	while ( it != attList_.end() )
+	{
+		if (TeConvertToUpperCase(s) == TeConvertToUpperCase((*it).rep_.name_))
+			return (*it);
+		++it;
+	}
+	return TeAttribute();
+}
+
+int 
+TeDatabasePortal::getColumnIndex (const string& s)
+{
+	TeAttributeList::iterator it = attList_.begin();
 	int j = 0;
 	while ( it != attList_.end() )
 	{
@@ -6393,6 +9519,10 @@ TeDatabasePortal::getViewTree ()
 	tree->id (atoi(getData("theme_id")));
 	tree->name (getData("name"));
 	tree->priority(atoi(getData("priority")));
+	//Update the tree also with parent_id and node_type from te_theme table
+	tree->parentId(atoi(getData("parent_id")));
+	tree->type(atoi(getData("node_type")));	
+	//Is it necessary to set parent??
 	return tree;
 }
 
@@ -6416,53 +9546,49 @@ TeDatabasePortal::getLegend ()
 	return leg;
 }
 
-TeVisual
-TeDatabasePortal::getVisual()
+void
+TeDatabasePortal::getVisual(TeVisual* vis)
 {
-	TeVisual vis;
 	TeGeomRep rep = (TeGeomRep)atoi (getData("geom_type"));
 
 	TeColor cor(atoi(getData("red")),atoi(getData("green")),atoi(getData("blue")));
-	vis.color(cor);
-	vis.libName (string(getData("lib_name")));
-	vis.transparency(atoi(getData("transparency")));
+	vis->color(cor);
+	vis->transparency(atoi(getData("transparency")));
 
 	TeColor ccor(atoi(getData("contour_red")),atoi(getData("contour_green")),atoi(getData("contour_blue")));
-	vis.contourColor(ccor);
-	vis.contourLibName(string(getData("contour_lib_name")));
-	vis.contourWidth(atoi(getData("contour_width")));
-	vis.contourTransparency(atoi(getData("contour_transp")));
+	vis->contourColor(ccor);
+	vis->contourWidth(atoi(getData("contour_width")));
+	vis->contourTransparency(atoi(getData("contour_transp")));
 
 	if(rep == TePOLYGONS || rep == TeCELLS)
 	{
-		vis.contourWidth(atoi(getData("width")));
-		vis.contourStyle(atoi(getData("contour_symb_id")));
-		vis.style(atoi(getData("symb_id")));
+		vis->contourWidth(atoi(getData("width")));
+		vis->contourStyle(atoi(getData("contour_symb_id")));
+		vis->style(atoi(getData("symb_id")));
 	}
 	else if(rep == TeLINES)
 	{
-		vis.width(atoi(getData("width")));
-		vis.style(atoi(getData("symb_id")));
+		vis->width(atoi(getData("width")));
+		vis->style(atoi(getData("symb_id")));
 	}
 	else if(rep == TePOINTS)
 	{
-		vis.size(atoi(getData("size_value")));
-		vis.style(atoi(getData("symb_id")));
+		vis->size(atoi(getData("size_value")));
+		vis->style(atoi(getData("symb_id")));
 	}
 	else if(rep == TeTEXT)
-		vis.size(atoi(getData("size_value")));
+		vis->size(atoi(getData("size_value")));
 
-	vis.family(getData("family"));
-	vis.bold (getBool("bold"));
-	vis.italic (getBool("italic"));
-	vis.fixedSize (getBool("fixed_size"));
+	vis->family(getData("family"));
+	vis->bold (getBool("bold"));
+	vis->italic (getBool("italic"));
+	vis->fixedSize (getBool("fixed_size"));
 
-	vis.alignmentVert(getDouble("alignment_vert"));
-	vis.alignmentHoriz(getDouble("alignment_horiz"));
+	vis->alignmentVert(getDouble("alignment_vert"));
+	vis->alignmentHoriz(getDouble("alignment_horiz"));
 
-	vis.tabSize(atoi(getData("tab_size")));
-	vis.lineSpace(atoi(getData("line_space")));
-	return vis;
+	vis->tabSize(atoi(getData("tab_size")));
+	vis->lineSpace(atoi(getData("line_space")));
 }
 
 bool 
@@ -6481,11 +9607,20 @@ TeDatabasePortal::fetchGeometry (TeText& t)
 	return (fetchRow());
 }
 
-TeColor 
-TeDatabasePortal::getColor ()
+bool 
+TeDatabasePortal::fetchGeometry (TeText& t, const unsigned int& initIndex)
 {
-	TeColor c(atoi(getData("red")), atoi(getData("green")), atoi(getData("blue")));
-	return c;
+	TeCoord2D c(getDouble(initIndex+2), getDouble(initIndex+3));
+	string txt = getData(initIndex+4);
+	TeText t2(c,txt);
+	t2.geomId(atoi(getData(initIndex)));
+	t2.objectId(string(getData(initIndex+1)));
+	t2.setAngle (getDouble(initIndex+5));
+	t2.setHeight (getDouble(initIndex+6));
+	t2.setAlignmentVert(getDouble(initIndex+7));
+	t2.setAlignmentHoriz(getDouble(initIndex+8));
+	t = t2;
+	return (fetchRow());
 }
 
 bool 
@@ -6498,7 +9633,376 @@ TeDatabasePortal::fetchGeometry (TeArc& arc)
 	return fetchRow();
 }
 
+bool 
+TeDatabasePortal::fetchGeometry (TeArc& arc, const unsigned int& initIndex)
+{
+	arc.fromId(atoi(getData(initIndex+2)));
+	arc.toId(atoi(getData(initIndex+3)));
+	arc.geomId(atol(getData(initIndex+0)));
+	arc.objectId(string(getData(initIndex+1)));
+	return fetchRow();
+}
+
+bool	
+TeDatabasePortal::getVisual(TeVisual* vis, TeGeomRep& rep, const unsigned int& initIndex)
+{
+	string legendId = this->getData(initIndex);
+	if(legendId.empty())
+		return false;
+
+	rep = (TeGeomRep)atoi (getData(initIndex+1)); //geom_type = 1
+
+	TeColor cor(atoi(getData(initIndex+3)),atoi(getData(initIndex+4)),atoi(getData(initIndex+5)));
+	vis->color(cor);
+	vis->transparency(atoi(getData(initIndex+6)));
+
+	TeColor ccor(atoi(getData(initIndex+9)),atoi(getData(initIndex+10)),atoi(getData(initIndex+11)));
+	vis->contourColor(ccor);
+	vis->contourWidth(atoi(getData(initIndex+13)));
+	vis->contourTransparency(atoi(getData(initIndex+12)));
+
+	if(rep == TePOLYGONS || rep == TeCELLS)
+	{
+		vis->contourWidth(atoi(getData(initIndex+13)));
+		vis->contourStyle(atoi(getData(initIndex+8)));
+		vis->style(atoi(getData(initIndex+2)));
+	}
+	else if(rep == TeLINES)
+	{
+		vis->width(atoi(getData(initIndex+7)));
+		vis->style(atoi(getData(initIndex+2)));
+	}
+	else if(rep == TePOINTS)
+	{
+		vis->size(atoi(getData(initIndex+14)));
+		vis->style(atoi(getData(initIndex+2)));
+	}
+	else if(rep == TeTEXT)
+		vis->size(atoi(getData(initIndex+14)));
+
+	vis->family(getData(initIndex+16));
+	vis->bold (getBool(initIndex+17));
+	vis->italic (getBool(initIndex+18));
+	vis->fixedSize (getBool(initIndex+23));
+
+	vis->alignmentVert(getDouble(initIndex+19));
+	vis->alignmentHoriz(getDouble(initIndex+20));
+
+	vis->tabSize(atoi(getData(initIndex+21)));
+	vis->lineSpace(atoi(getData(initIndex+22)));
+	return true;
+}
+
+bool	
+TeDatabasePortal::getRasterVisual(TeRasterVisual& vis, const unsigned int& initIndex)
+{
+	string themeId = getData(initIndex);
+	if(themeId.empty())
+		return false;
+
+	vis.setSrcBand(getInt(initIndex+1));
+	vis.setDestBand(getInt(initIndex+2));
+	vis.setTransfFunction(static_cast<TeRasterTransform::TeRasterTransfFunctions>(getInt(initIndex+3)));
+	if (vis.getTransfFunction() == TeRasterTransform::TeExtractRGB || 
+		vis.getTransfFunction() == TeRasterTransform::TeExtractBands)
+	{
+		vis.setBChannelMapping(getInt(initIndex+1),static_cast<TeRasterTransform::TeRGBChannels>(getInt(initIndex+2)));
+	}
+
+	if (vis.getTransfFunction() == TeRasterTransform::TeMono2LUTMonoBand ||
+		vis.getTransfFunction() == TeRasterTransform::TeThree2LUTThreeBand)
+	{
+		std::string lutName = getData(initIndex+6);
+
+		vis.setLutTableName(lutName);
+
+		vis.setBChannelMapping(getInt(initIndex+1),static_cast<TeRasterTransform::TeRGBChannels>(getInt(initIndex+2)));
+
+		TeDatabasePortal* portal = this->getDatabase()->getPortal();
+		if (!portal)
+			return false;
+
+		std::string get = "SELECT * FROM " + lutName + " ORDER BY index_id ASC ";
+
+		if (!portal->query(get) || !portal->fetchRow())	 // if there is no table, or table is empty
+		{
+			delete portal;
+			return false;
+		}
+
+		do
+		{
+			vis.lutr_.push_back(atoi(portal->getData(1)));
+			vis.lutg_.push_back(atoi(portal->getData(2)));
+			vis.lutb_.push_back(atoi(portal->getData(3)));
+		}while (portal->fetchRow());
+
+		vis.setLutSize(vis.lutr_.size());
+
+		delete portal;
+	}
+	
+	return true;
+}
+
+
+TeColor 
+TeDatabasePortal::getColor ()
+{
+	TeColor c(atoi(getData("red")), atoi(getData("green")), atoi(getData("blue")));
+	return c;
+}
+
+bool	
+TeDatabasePortal::getView(TeView& view, const unsigned int& initIndex)
+{
+	string viewId = getData(initIndex);
+	if(viewId.empty())
+		return false;
+	view.id(atoi(viewId.c_str()));
+	view.name(getData(initIndex+2));
+	view.user(getData(initIndex+3));
+	view.isVisible(getBool(initIndex+4));
+	view.setCurrentBox(TeBox(getDouble(initIndex+5), getDouble(initIndex+6), getDouble(initIndex+7), getDouble(initIndex+8)));
+	if(getData(initIndex+9) == "")
+		view.setCurrentTheme(-1);
+	else
+		view.setCurrentTheme(getInt(initIndex+9));
+	return true;
+}
+
+bool	
+TeDatabasePortal::getProjection(TeProjection** proj, const unsigned int& initIndex)
+{
+	string projId = getData(initIndex);
+	if(projId.empty())
+		return false;
+
+	TeDatum datum (	getData(initIndex+11),
+					getDouble(initIndex+12),
+					getDouble(initIndex+13),
+					getDouble(initIndex+14),
+					getDouble(initIndex+15),
+					getDouble(initIndex+16));
+
+	TeProjectionParams mProjPars;
+	mProjPars.datum = datum;
+	mProjPars.name = getData(initIndex+1);
+	mProjPars.lat0 = getDouble(initIndex+3)*TeCDR;
+	mProjPars.lon0 = getDouble(initIndex+2)*TeCDR;
+	mProjPars.offx = getDouble(initIndex+4);
+	mProjPars.offy = getDouble(initIndex+5);
+	mProjPars.stlat1 = getDouble(initIndex+6)*TeCDR;
+	mProjPars.stlat2 = getDouble(initIndex+7)*TeCDR;
+	mProjPars.units = getData(initIndex+8);
+	mProjPars.scale = getDouble(initIndex+9);
+	mProjPars.hemisphere = (TeHemisphere)getInt(initIndex+10);
+
+	*proj = TeProjectionFactory::make(mProjPars);
+	if(!*proj)
+		return false;
+
+	(*proj)->id(atoi(projId.c_str()));
+	return true;
+}
+
+void
+TeDatabasePortal::getViewNodeParams (TeViewNodeParams& params, const unsigned int& initIndex)
+{
+	params.name_ = string (this->getData(initIndex+3));	//name
+	params.id_ = this->getInt(initIndex);				// id
+	params.viewId_ = this->getInt(initIndex+2);			//view id
+	params.nodeType_ = 	this->getInt(initIndex+6);		//node type
+	params.priority_ = 	this->getInt(initIndex+5);		//priority  
+	params.myParentId_ = this->getInt(initIndex+4);	//parent id
+}
+
+bool
+TeDatabasePortal::getTheme(TeAbstractTheme& theme, const unsigned int& initIndex)
+{
+	string themeId = getData(initIndex);
+	if(themeId.empty())
+		return false;
+		
+	theme.id(atoi(themeId.c_str()));
+	theme.view (atoi(this->getData (initIndex+2)));
+	theme.name(string (this->getData(initIndex+3)));
+	theme.parentId( atoi(this->getData (initIndex+4)));
+	theme.type ((TeViewNodeType)this->getInt(initIndex+6));
+	theme.priority(this->getInt(initIndex+5));
+	theme.minScale (this->getDouble (initIndex+7));
+	theme.maxScale (this->getDouble (initIndex+8));
+	theme.attributeRest(string(this->getData (initIndex+9)));
+	theme.spatialRest(string(this->getData (initIndex+10)));
+	theme.temporalRest(string(this->getData (initIndex+11)));
+	theme.visibleRep(atoi(this->getData (initIndex+13)));
+	theme.visibility(atoi(this->getData (initIndex+14)));
+	theme.setThemeBox(TeBox(getDouble(initIndex+15), getDouble(initIndex+16), getDouble(initIndex+17), getDouble(initIndex+18)));
+
+	if(theme.type()==TeTHEME)
+	{
+		static_cast<TeTheme&>(theme).collectionTable(string(this->getData (initIndex+12)));
+		static_cast<TeTheme&>(theme).collectionAuxTable(static_cast<TeTheme&>(theme).collectionTable() + "_aux");
+		static_cast<TeTheme&>(theme).layerId (atoi(this->getData(initIndex+1)));
+	}
+	else if(theme.type()==TeEXTERNALTHEME)
+	{
+		static_cast<TeExternalTheme&>(theme).collectionTable(string(this->getData (initIndex+12)));
+		static_cast<TeExternalTheme&>(theme).collectionAuxTable(static_cast<TeExternalTheme&>(theme).collectionTable() + "_aux");
+	}
+	else if(theme.type()==TeEXTERNALTHEME)
+	{
+		static_cast<TeTheme&>(theme).collectionTable(string(this->getData (initIndex+12)));
+		static_cast<TeTheme&>(theme).collectionAuxTable(static_cast<TeTheme&>(theme).collectionTable() + "_aux");
+	}
+
+	theme.setCreationTime(this->getDate(initIndex+19));
+
+	return true;
+}
+
+bool	
+TeDatabasePortal::getGrouping(TeGrouping& group, const unsigned int& initIndex)
+{
+	string groupThemeId = getData(initIndex);
+	if(groupThemeId.empty())
+		return false;
+
+	TeAttributeRep atRep;
+	string attname = getData (initIndex+2);
+	string norname = getData (initIndex+5);
+	int f = attname.find("(");
+	if(f >= 0)
+	{
+		string alias = attname;
+		attname = attname.substr(0, f);
+		alias = alias.substr(f+1);
+		alias = alias.substr(0, alias.size()-1);
+		map<string, string>& m = this->getDatabase()->mapThemeAlias()[atoi(groupThemeId.c_str())];
+		m[attname] = alias;
+	}
+	f = norname.find("(");
+	if(f >= 0)
+	{
+		string alias = norname;
+		norname = norname.substr(0, f);
+		alias = alias.substr(f+1);
+		alias = alias.substr(0, alias.size()-1);
+		map<string, string>& m = this->getDatabase()->mapThemeAlias()[atoi(groupThemeId.c_str())];
+		m[norname] = alias;
+	}
+
+	if(attname=="NONE")
+		attname = "";
+	
+	if(norname=="NONE")
+		norname = "";
+		
+	atRep.name_ = attname;
+	atRep.type_ = TeAttrDataType(atoi(getData(initIndex+3)));
+	group.groupAttribute_ = atRep;
+	group.groupNormAttribute_ = norname;
+	group.groupMode_ = TeGroupingMode(getInt(initIndex+4));
+	group.groupNumSlices_ = getInt(initIndex+1);
+	group.groupPrecision_ = getInt(initIndex+7);
+	group.groupStdDev_ = getDouble(initIndex+6);
+	group.groupFunction_ = getData(initIndex+8);
+	group.groupChronon_ = TeChronon(getInt(initIndex+9));
+	return true;
+}
+
+bool 
+TeDatabasePortal::getLegend (TeLegendEntry& leg, const unsigned int& initIndex)
+{
+	string legId = getData(initIndex);
+	if(legId.empty())
+		return false;
+
+	leg.id(atoi(getData(initIndex)));
+	leg.theme (atoi(getData(initIndex+1)));
+	leg.group (atoi(getData(initIndex+2)));
+	leg.count (atoi(getData(initIndex+3)));
+
+  std::string lower_value_str( getData(initIndex+4) );
+  leg.from( lower_value_str );
+  
+  std::string upper_value_str( getData(initIndex+5) );
+  leg.to( upper_value_str );
+  
+  std::string label_str( getData(initIndex+6) );
+  leg.label( label_str );
+    
+	return true;
+}
+
+bool	
+TeDatabasePortal::getAttrTable(TeTable& table, const unsigned int& initIndex)
+{
+	string tableName = this->getData(initIndex+2);
+	if(tableName.empty())
+		return false;
+
+	table.name (tableName);
+	table.setId(this->getInt(initIndex+0));
+	table.setLinkName(this->getData(initIndex+4));
+	table.setUniqueName(this->getData(initIndex+3));
+	table.attInitialTime(this->getData(initIndex+5));
+	table.attFinalTime(this->getData(initIndex+6));
+	table.attTimeUnit(TeChronon(this->getInt(initIndex+7)));
+	table.setTableType((TeAttrTableType)this->getInt(initIndex+8));
+	return true;
+}
+
+bool	
+TeDatabasePortal::getLayer(TeLayer& layer, const unsigned int& initIndex)
+{
+	string layerId = this->getData(initIndex);
+	if(layerId.empty())
+		return false;
+
+    layer.id(atoi(layerId.c_str()));
+	layer.name(string (this->getData(initIndex+2)));
+
+	std::string x1 = this->getData("te_layer.lower_x");
+	std::string y1 = this->getData("te_layer.lower_y");
+	std::string x2 = this->getData("te_layer.upper_x");
+	std::string y2 = this->getData("te_layer.upper_y");
+
+	layer.setLayerBox(TeBox(this->getDouble(initIndex+3),
+						this->getDouble(initIndex+4),
+						this->getDouble(initIndex+5),
+						this->getDouble(initIndex+6)));
+
+	layer.setEditionTime(this->getDate(initIndex+9));
+
+	return true;
+}
+
+bool	
+TeDatabasePortal::getRepresentation(TeRepresentation& rep, const unsigned int& initIndex)
+{
+	string repId = this->getData(initIndex);
+	if(repId.empty())
+		return false;
+
+	rep.id_ = atoi(repId.c_str());
+	TeGeomRep g = (TeGeomRep)atoi(this->getData(initIndex+2));
+	rep.geomRep_ = g;
+	rep.tableName_ = this->getData(initIndex+3);
+	rep.description_ = this->getData(initIndex+4);
+	rep.box_ = TeBox(this->getDouble(initIndex+5),
+				this->getDouble(initIndex+6),
+				this->getDouble(initIndex+7),
+				this->getDouble(initIndex+8));
+	rep.resX_ = this->getDouble(initIndex+9);
+	rep.resY_ = this->getDouble(initIndex+10);
+	rep.nCols_ = this->getInt(initIndex+11);
+	rep.nLins_ = this->getInt(initIndex+12);
+	return true;
+}
+
 
 
 // End TeDatabasePortal Methods
 
+
diff --git a/src/terralib/kernel/TeDatabase.h b/src/terralib/kernel/TeDatabase.h
old mode 100644
new mode 100755
index bfdddfe..3f2413f
--- a/src/terralib/kernel/TeDatabase.h
+++ b/src/terralib/kernel/TeDatabase.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,9 +20,8 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeDatabase.h
-    This file contains structures and definitions about database support in TerraLib
+    \brief This file contains structures and definitions about database support in TerraLib
 */
 #ifndef  __TERRALIB_INTERNAL_DATABASE_H
 #define  __TERRALIB_INTERNAL_DATABASE_H
@@ -35,12 +34,20 @@ of this library and its documentation.
 #include "TeDataTypes.h"
 #include "TeTable.h"
 #include "TeGeometry.h"
-#include "TeLayer.h"
-#include "TeView.h"
-#include "TeTheme.h" 
-#include "TeRasterParams.h"
-#include "TeTimeInterval.h"
 #include "TeStatistics.h"
+#include "TeProject.h"
+#include "TeRaster.h"
+#include "TeView.h"
+#include "TeVisual.h"
+#include "TeMetaModelCache.h"
+#include "TeSharedPtr.h"
+
+class TeLayer;
+class TeDatabaseFactoryParams;
+class TeRasterParams;
+class TeTheme;
+class TeTime;
+class TeTimeInterval;
 
 #include <set>
 using namespace std;
@@ -73,10 +80,10 @@ enum TeCursorDataType { TeBINARYCURSOR, TeTEXTCURSOR };
 enum TeSpatialIndexType {TeRTREE, TeQUADTREE};
 
 //! A vector of objects identifications (object_id)
-typedef vector<string>				Keys;
+typedef vector<string>				TeKeys;
 
 //! A Map of objects identifications (object_id) to a distance value
-typedef map<string, double>			KeysToDist;
+typedef map<string, double>			TeKeysToDist;
 
 //! A Vector of pointers to TeGeometry 
 typedef vector<TeGeometry*> TeGeometryVect;
@@ -104,7 +111,7 @@ class TeDatabasePortal;
   \sa
   TeTheme, TeView, TeLayer, TeAttribute
 */
-class TeDatabase 
+class TL_DLL TeDatabase 
 {
 public: 
 	//! Empty constructor
@@ -113,8 +120,11 @@ public:
 	//! Destructor
 	virtual ~TeDatabase();
 
+	//! Assignment operator
+	virtual TeDatabase& operator=(const TeDatabase& other);
+
 	//! Operator ==
-	bool operator== (const TeDatabase& other) const
+	virtual bool operator== (const TeDatabase& other) const
 	{	
 		if (dbmsName_ != other.dbmsName_ ||
 			database_ != other.database_ ||
@@ -164,23 +174,31 @@ public:
 
 	//! Returns the  map of layers in the database
 	TeLayerMap&	layerMap () 
-	{ return layerMap_; }
+	{ return metaModel_->layerMap(); }
 
 	//! Returns the  map of views in the database
 	TeViewMap&	viewMap () 
-	{ return viewMap_; }
+	{ return metaModel_->viewMap(); }
 
 	//! Returns the  map of themes in the database
 	TeThemeMap&	themeMap () 
-	{ return themeMap_; }
+	{ return metaModel_->themeMap(); }
+
+	//! Returns the map of invalid themes in the database
+	TeThemeMap&	invalidThemeMap() 
+	{ return metaModel_->invalidThemeMap(); }
+
+	//! Returns the  map of projects in the database
+	TeProjectMap&  projectMap ()
+   { return metaModel_->projectMap(); }
 
 	//! Returns the  map of legends in the database
 	TeLegendEntryMap& legendMap () 
-	{ return legendMap_; }
+	{ return metaModel_->legendMap(); }
 
 	//! Returns the set of relations between tables
 	multiset<int>& relationMSet () 
-	{ return relationMSet_; }
+	{ return metaModel_->relationMSet(); }
 
 	//! Clears structures in memory (legendMap, layerMap, viewMap...) used to optimize database access
 	virtual void clear();
@@ -194,13 +212,13 @@ public:
 	*/
 	//@{	
 	//! Creates a new database and open a connection to it
-	virtual bool newDatabase(const string& database, const string& user, const string& password, const string& host, const int &port=0, bool terralibModel=true) = 0;
+	virtual bool newDatabase(const string& database, const string& user, const string& password, const string& host, const int &port=-1, bool terralibModel=true) = 0;
 	
 	//! Opens a connection to a database server passing all parameters needed
-	virtual bool connect (const string& host, const string& user, const string& password, const string& database, int port = 0) = 0;
+	virtual bool connect (const string& host, const string& user, const string& password, const string& database, int port = -1) = 0;
 
 	//! Show the server databases (only for MySQL, Oracle and PostgreSQL)
-	virtual bool showDatabases (const string& /* host */, const string& /* user */, const string& /* password */, vector<string>& /* dbNames */ , int /* port */ = 0)
+	virtual bool showDatabases (const string& /* host */, const string& /* user */, const string& /* password */, vector<string>& /* dbNames */ , int /* port */ = -1)
 	{ return true; }
 
 	//! Opens a connection without parameters. When possible, should be implemented by the derived classes 
@@ -212,6 +230,28 @@ public:
 
 	//! Closes the connection
 	virtual void close() = 0;
+
+	//! Returns a string that the describes the parameters of the database connected
+	/*
+		The expected return value is similar to: dbms_server;hostname;portnumber;databasename;user;password
+	*/
+	virtual string getDatabaseDescription();
+	
+  
+  /**
+   *  This is for TeFactory compatibility ( Invalid TeDatabaseFactory
+   *  requests will try to create an default object using this function ).
+   */
+  static TeDatabase* DefaultObject( const TeDatabaseFactoryParams& )
+  {
+    std::cout << std::endl << "TeDatabase::DefaultObject - " <<
+      " - Trying to create an invalid TeDatabase default object." <<
+      std::endl;
+    throw;
+      
+    return 0;
+  };
+  
 	//@}
 
 	/** @name Tables
@@ -239,12 +279,21 @@ public:
 	//! Return the name of an attribute table given its identifier
 	string getTableName(int tableId);
 
+	//! Return a valid name for a table from a initial one
+	string getNewTableName(const string& n);
+
+	//! Concatenate field values
+	/*!
+      \param fNamesVec vector containing the fields to be concatenated
+	*/
+	virtual string getConcatFieldsExpression(const vector<string>& fNamesVec);
+
 	//! Creates a table
 	/*!
       \param table table name
       \param attr table list of attributes
 	 */
-	virtual bool createTable(const string& table, TeAttributeList &attr);
+	virtual bool createTable(const string& table, TeAttributeList &attr) = 0;
 
 	//! Deletes a table. Do not allow the deletion of model tables
 	 virtual bool deleteTable (const string& table);
@@ -281,13 +330,22 @@ public:
 	  \param relName relationship name
 	*/
 	virtual TeDBRelationType existRelation(const string& tableName, const string& relName) = 0;
+
+	//! Removes a relation exist
+	/*!
+	  \param name relationship name
+      \param table table where the relashionship exists
+	  \return TRUE if succeed and FALSE otherwise
+	*/
+	virtual bool deleteRelation(const string& name, const string& table);
+
 	//@}
 	
 	/** @name Query
 	*  Methods related to query the database
 	*/
 	//@{	
-	//! Executes a SQL command that doesn�t return a record set. Tipically a data definition comand
+	//! Executes a SQL command that doesnt return a record set. Tipically a data definition comand
 	virtual bool execute ( const string &sql) = 0;
 
 	//! Returns a database portal.
@@ -323,8 +381,8 @@ public:
 	//! Creates a table to store version database information 
 	virtual bool createDatabaseTable(); 
 	
-	//! Creates a table to store Projection information
-	virtual bool createProjectionTable ();
+	//! Creates a table to store projectinon information
+	virtual bool createProjectionTable();
 
 	//! Creates a table to store Layers information
 	virtual bool createLayerTable ();
@@ -359,18 +417,52 @@ public:
 	//! Creates a table to store information about the external tables related to non-spatial tables of layers
 	virtual bool createTablesRelationTable();
 
+	//! Creates a table to store information about projects: an structure that groups views
+	virtual bool createProjectTable();
+
+	//! Creates a table to store the relation between project/views information
+	virtual bool createProjectViewTable();
 	//@}
+
+	/** @name  Project
+		 Methods related to the manipulation of projects
+	*/
+	//@{
+	//! Load information about all projects stored in the database
+	virtual bool loadProjectSet(); 
+
+	//! Load information about a particular project
+	virtual bool loadProject(TeProject* project); 
 	
+	//! Insert information about a project
+	virtual bool insertProject(TeProject *project) = 0;
+	
+	//! Update information about a project
+	virtual bool updateProject(TeProject *project);	
+
+	//! Delete a project from the database
+	virtual bool deleteProject(int projectId);	
+
+	//! Insert a project/view relation
+	virtual bool insertProjectViewRel(int projectId, int viewId);
+
+	//! Deletes a project/view relation
+	virtual bool deleteProjectViewRel(int projectId, int viewId);
+
+	//! Check whether a given project already exists in the database (it is not case sensitive).
+	virtual bool projectExist(const string& projectName);
+	//@}
+
 	/** @name  Geometries
 		 Methods that create tables that store the spatial data
 	*/
 	//@{
 
 	//! Creates a table for a polygon geometries
-	virtual bool createPolygonGeometry (const string& tableName) = 0;
+	virtual bool createPolygonGeometry (const string& tableName);
 
 	//! Creates a table for line geometries
-	virtual bool createLineGeometry (const string& tableName) = 0;
+	virtual bool createLineGeometry (const string& tableName);
 
 	//! Creates a table for point geometries
 	virtual bool createPointGeometry (const string& tableName);
@@ -394,7 +486,7 @@ public:
 	virtual bool createRasterMetadataTable(const string& tableName);
 	
     //! Creates a table for raster geometries
-	virtual bool createRasterTable (const string& tableName) = 0;
+	virtual bool createRasterTable (const string& tableName);
 
 	//! Creates a table to store information about objects in a theme
 	virtual bool createCollectionTable(const string& tableName);
@@ -438,12 +530,21 @@ public:
 	//! Alter a property of a table 
 	virtual bool alterTable(const string& tableName, TeAttributeRep& rep, const string& oldColName="");
 
+	//! Alter the table name 
+	virtual bool alterTable(const string& oldTableName, const string& newTablename);
+
+	//! Saves a large binary objects (BLOB) in a row table 
+	virtual bool insertBlob (const string& tableName, const string& columnBlob, TeAttributeRep& columnId, const string& valueId, unsigned char* data, int size);
+
 	//! Saves a large binary objects (BLOB) in a row table 
-	virtual bool insertBlob (const string& tableName, const string& columnBlob, TeAttributeRep& columnId, const string& valueId, unsigned char* data, int size) = 0;
+	virtual bool insertBlob (const string& tableName, const string& columnBlob, TeAttributeRep& columnId, const string& valueId, const string& fileName);
 
 	//! Saves a large binary objects (BLOB) in a row table 
-	virtual bool insertBlob (const string& tableName, const string& columnBlob, TeAttributeRep& columnId, const string& valueId, const string& fileName) = 0;
+	virtual bool insertBlob (const string& tableName, const string& columnBlob, const string& whereClause, unsigned char* data, int size) = 0;
 
+	//! Saves a large binary objects (BLOB) in a row table 
+	virtual bool insertBlob (const string& tableName, const string& columnBlob, const string& whereClause, const string& fileName);
+	
 	//! Updates a table and its contents in the database
 	virtual bool updateTable	(TeTable &table);
 
@@ -483,13 +584,24 @@ public:
 	virtual bool updateLayer	(TeLayer *layer);	
 
 	//! Load information about all layers stored in the database
-	virtual bool loadLayerSet	();
+	/*
+		\param loadAttrList  indicates if the attribute list of each attribute table should be loaded
+	*/
+	virtual bool loadLayerSet	(const bool& loadAttrList = true);
 
 	//! Load information about a particular layer 
-	virtual bool loadLayer		(TeLayer* layer);
+	/*
+		\param layer		a pointer to a layer that will be loaded from database
+		\param loadAttrList indicates if the attribute list of each attribute table should be loaded
+	*/
+	virtual bool loadLayer		(TeLayer* layer, const bool& loadAttrList = true);
 
 	//! Load layer tables 
-	virtual bool loadLayerTable (TeLayer* layer);
+	/*
+		\param layer		a pointer to a layer whose attribute table will be loaded from database
+		\param loadAttrList indicates if the attribute list of each attribute table should be loaded
+	*/
+	virtual bool loadLayerTable (TeLayer* layer, const bool& loadAttrList = true);
 
 	//! Delete a particular layer passing its id
 	virtual bool deleteLayer	(int layerId);
@@ -499,6 +611,13 @@ public:
 
 	//! Check if a particular layer exists (passing its name)
 	virtual bool layerExist		(string layerName);
+
+	//! Checks whether a given layer name is valid or already exists in the database
+	/*!
+		\param n		layer name to be checked
+		\return the modified valid layer name
+	*/	
+	virtual string getNewLayerName(const string& n);
 	//@}
 
 	/** @name Representation
@@ -510,6 +629,10 @@ public:
 
 	//! Updates information about a geometrical representation
 	virtual bool updateRepresentation (int layerId, TeRepresentation& rep);	
+
+	//! Updates the box information of a layer in the corresponding metadata table
+	virtual bool updateLayerBox(TeLayer* layer);
+
 	//@}
 
 	/** @name Raster Tables
@@ -546,6 +669,7 @@ public:
 		\param par raster parameters 
 	*/
 	virtual bool insertRasterMetadata (const string& tableName, int geomId, TeRasterParams& par);
+
 	//! Updates metadata information about a particular raster geometry
 	/*!
 		\param tableName name of the table that stores the metadata
@@ -566,10 +690,22 @@ public:
 	virtual bool updateView (TeView *view);	
 
 	//! Loads a set of views belonging to a user
-	virtual bool loadViewSet (const string& user);
+	/*
+		\param user			 the user name 
+		\param loadAttrList  indicates if the attribute list of each attribute table should be loaded
+		\param visualClass  identifies which concrete class od visual should be instantiated.
+		The default is TerraLib basic visual.
+	*/
+	virtual bool loadViewSet (const string& user, const bool& loadAttrList = true, const string& visualClass="tevisual");
 
 	//! Load a view
-	virtual bool loadView (TeView* view);
+	/*
+		\param view			a pointer to a view that will be loaded from database
+		\param loadAttrList indicates if the attribute list of each attribute table should be loaded
+		\param visualClass  identifies which concrete class od visual should be instantiated.
+		The default is TerraLib basic visual.
+	*/
+	virtual bool loadView (TeView* view, const bool& loadAttrList = true, const string& visualClass="tevisual");
 
 	//! Delete a view
 	virtual bool deleteView (int viewId);
@@ -578,7 +714,14 @@ public:
 	virtual bool insertViewTree (TeViewTree *tree) = 0;	
 
 	//! Recursive load view tree.
-	virtual TeViewTree* loadViewTree(TeView* view, int id);
+	/*
+		\param view			a pointer to a view that will be loaded from database
+		\param id			a specific theme or viewtree id of this view that will be loaded from database
+		\param loadAttrList indicates if the attribute list of each attribute table should be loaded
+		\param visualClass  identifies which concrete class od visual should be instantiated.
+		The default is TerraLib basic visual.
+	*/
+	virtual TeViewTree* loadViewTree(TeView* view, int id, const bool& loadAttrList = true, const string& visualClass = "tevisual");
 
 	//! Recusive updating of a view tree.
 	virtual bool updateViewTree (TeViewTree *tree);
@@ -592,13 +735,28 @@ public:
 	*  Retrieving/Inserting/Modifying/Deleting themes and group of themes in the database. 
 	*/
 	//@{ 
+	//! Inserts a group of themes in the database
 	virtual bool insertThemeGroup	(TeViewTree* tree) = 0;
-	virtual bool insertTheme		(TeTheme *theme) = 0; 	
-	virtual bool updateTheme		(TeTheme *theme);	
-	virtual bool loadTheme			(TeTheme *theme);
-	virtual bool loadThemeTable		(TeTheme* theme);
+
+	//! Inserts an abstract theme in the database.
+	virtual bool insertTheme		(TeAbstractTheme *theme) = 0; 	
+
+	//! Updates an asbtract theme in the database
+	virtual bool updateTheme		(TeAbstractTheme *theme);
+
+	//! Loads a theme from the database
+	virtual bool loadTheme			(TeAbstractTheme *theme, const bool& loadAttrList = true, const string& visualClass = "tevisual");
+
+	//! Loads all attribute tables of a theme
+	virtual bool loadThemeTable		(TeTheme* theme, const bool& loadAttrList = true);
+
+	//! Erases the theme group identified by themeId
 	virtual bool deleteThemeGroup	(int themeId);
+
+	//! Erases the theme identified by themeId
 	virtual bool deleteTheme		(int themeId);
+
+	//! Erases the legends of a theme identified by themeId
 	virtual bool deleteLegend		(int themeId);
 	
 	//! Inserts information about a table used by a theme 
@@ -614,27 +772,39 @@ public:
 	bool removeThemeTable(TeTheme *theme, int tableOrder);
 
 	//! Inserts information about a grouping used in a theme
-	virtual bool insertGrouping (int themeId, TeGrouping* grouping);
+	virtual bool insertGrouping (int themeId, const TeGrouping& grouping);
 
 	//! Updates information about a grouping used in a theme
-	virtual bool updateGrouping (int themeId, TeGrouping* grouping);
+	virtual bool updateGrouping (int themeId, const TeGrouping& grouping);
 
-	//! Generates the label position (x,y) to each object of a theme
-	virtual bool generateLabelPositions(TeTheme *theme);
+	//! Generates the label position (x,y) to each object of a theme or of a particular object
+	virtual bool generateLabelPositions(TeTheme *theme, const std::string& objectId = "");
 
 	//! Check whether a given theme already exists in the database
 	virtual bool themeExist(string themeName);
 
+	//! Checks whether a given theme name is valid or already exists in the database
+	/*!
+		\param n		theme name to be checked
+		\return the modified valid theme name
+	*/	
+	virtual string getNewThemeName(const string& n);
+
 	//@}
 
 	/** @name Legend
 	*  Retrieving/Inserting/Modifying/Deleting legends in the database. 
 	*/
 	//@{ 
+	//! Inserts legend in the database
 	virtual bool insertLegend	(TeLegendEntry *legend) = 0;	
+	//! Updates legend entries in the database
 	virtual bool updateLegend	(TeLegendEntry *legend);	
-	virtual bool loadLegend		(TeTheme *theme);
+
+	virtual bool updateLegend   (vector<TeLegendEntry>& legVec);
+	virtual bool loadLegend		(TeAbstractTheme *theme, const string& visualClass = "tevisual");
 	virtual bool updateVisual	(TeLegendEntry *legend);
+	virtual bool updateVisual   (vector<TeLegendEntry>& legVec);
 	//@}
 
 	/** @name Polygon
@@ -739,12 +909,19 @@ public:
 	*  Accessing/Inserting/Modifying Arc geometries  into the database. 
 	*/
 	//@{ 	
-	// Accessing/Inserting arc geometries into the database
+	//! Inserts an arc set geometry in the database.
 	virtual bool insertArcSet	(const string& table, TeArcSet &as);	
+
+	//! Updates arc set geometry in the database.
 	virtual bool updateArcSet	(const string& table, TeArcSet &as);	
+
+	//! Loads an arc geometry from the database that has the specified object id (geoid).
 	virtual bool loadArcSet		(const string& table, const string& geoid, TeArcSet &as);
 
+	//! Inserts an arc geometry in the database.
 	virtual bool insertArc		(const string& table,TeArc &arc) = 0;
+
+	//! Updates an arc geometry in the database.
 	virtual bool updateArc		(const string& table,TeArc &arc);
 	//@}
 
@@ -775,6 +952,9 @@ public:
 	virtual bool updateCell		(const string& table, TeCell &c);
 	virtual bool locateCell		(const string& table, TeCoord2D &pt, TeCell &c, const double& tol = 0.0);
 	//@}
+
+	//! Removes a geometry from the given tableName
+	virtual bool removeGeometry(const string& tableName, const TeGeomRep& rep, const int& geomId);
 	
 	//! Insert a raster block into the database
 	/*!
@@ -790,7 +970,7 @@ public:
 	*/
 	virtual	bool insertRasterBlock(const string& table, const string& blockId, const TeCoord2D& ll, const TeCoord2D& ur, unsigned char *buf,unsigned long size, int band=0, unsigned int res=1, unsigned int subband=0) = 0;
 
-	//! Inserts all visual   
+	//! Inserts the entire visual of a Legend
 	virtual	bool insertVisual (TeLegendEntry *legend);
 
 	//! Insert raster visual
@@ -805,12 +985,27 @@ public:
 	//! Loads a look up table associated to a raster and fills its parameters
 	virtual bool loadRasterLUT(TeRasterParams* par);
 
-	//! Creates a spatial index for a spatial table. It is implemented only in spatial databases.
-	virtual bool createSpatialIndex(const string& /* table */, const string& /* column */, TeSpatialIndexType = TeRTREE,short /* level */ =0,short /* tile */ =0) { return true; };
+	//! Creates a spatial index for a spatial table. In order to get correct column names to index, see getSpatialIdxColumn method.
+	virtual bool createSpatialIndex(const string& table, const string& columns, TeSpatialIndexType /*type*/ = TeRTREE,short /* level */ =0,short /* tile */ =0);
 
 	//! Creates a spatial metadata for a spatial table. It is implemented only in spatial databases.
 	virtual bool insertMetadata(const string& /* table */, const string& /* column */, double /* tolx */, double /* toly */,TeBox &/* box */,short /* srid */ =0) { return true; };
 
+	//! Returns the name of the column that wiil be the spatially indexed, for a given type of geometry table 
+	virtual string getSpatialIdxColumn(TeGeomRep rep);
+
+	//! Update box information in a table that has a set of columns to store a box value
+	/*
+		This method gives to the drivers the ability to update box columns, considering precision issues
+		that are particular to the driver. The box should be stored in 4 columns (lower_x, lower_y, upper_x, upper_y)
+		\param tableName table name
+		\param keyColumnName name of the column that is primary key
+		\param idValue key value of the row that should be updated
+		\param box new box value
+	*/
+   virtual bool updateBBox(const string& tableName, const string& keyColumnName, int keyValue, const TeBox& box);  
+
+
 	/** @name Spatial Operations with vector data
 	*  spatial operations over geometries into the database. 
 	*/
@@ -829,7 +1024,7 @@ public:
 	  \param relate			spatial relation
 	  \param actCollTable	collection table name
 	 */
-	virtual bool spatialRelation(const string& actGeomTable, TeGeomRep actRep, Keys& actIdsIn, 
+	virtual bool spatialRelation(const string& actGeomTable, TeGeomRep actRep, TeKeys& actIdsIn, 
 		TeDatabasePortal *portal, int relate, const string& actCollTable="");
 	
 	/*!
@@ -843,7 +1038,7 @@ public:
 	  \param relate		 	spatial relation
 	  \param visCollTable	collection table name associated with the visGeomTable table
 	 */
-	virtual bool spatialRelation(const string& actGeomTable, TeGeomRep actRep, Keys& actIdsIn, 
+	virtual bool spatialRelation(const string& actGeomTable, TeGeomRep actRep, TeKeys& actIdsIn, 
 		const string& visGeomTable, TeGeomRep visRep, TeDatabasePortal *portal, 
 		int relate, const string& visCollTable=""); 
 
@@ -868,8 +1063,8 @@ public:
 	  \param relate			spatial relation
 	  \param actCollTable	collection table name
 	 */
-	virtual bool spatialRelation(const string& actGeomTable, TeGeomRep actRep, Keys& actIdsIn, 
-		Keys& actIdsOut, int relate, const string& actCollTable="");
+	virtual bool spatialRelation(const string& actGeomTable, TeGeomRep actRep, TeKeys& actIdsIn, 
+		TeKeys& actIdsOut, int relate, const string& actCollTable="");
 
 	/*!
 	  \brief Returns the geometries of a geometric table (visGeomTable) that have a specific spatial relation (relate) with a subset of geometries of other geometric table (actGeomTable)   
@@ -882,9 +1077,9 @@ public:
 	  \param relate			spatial relation
 	  \param visCollTable	collection table name associated with the visGeomTable table
 	 */
-	virtual bool spatialRelation(const string& actGeomTable, TeGeomRep actRep, Keys& actIdsIn, 
-		const string& visGeomTable, TeGeomRep visRep, Keys& visIdsOut, int relate, 
-		const string& visCollTable=""); 
+	virtual bool spatialRelation(const string& actGeomTable, TeGeomRep actRep, TeKeys& actIdsIn, 
+		const string& visGeomTable, TeGeomRep visRep, TeKeys& visIdsOut, int relate, 
+		const string& visCollTable="", TeDatabase* = 0); 
 
 	/*!
 	  \brief Returns the geometries of a geometric table (actGeomTable) that have a specific spatial relation (relate) with a geometry in memory (geom)
@@ -896,7 +1091,7 @@ public:
 	  \param actCollTable	collection table name associated with the actGeomTable table
 	*/
 	virtual bool spatialRelation(const string& actGeomTable, TeGeomRep actRep, TeGeometry* geom, 
-		Keys& actIdsOut, int relate, const string& actCollTable=""); 
+		TeKeys& actIdsOut, int relate, const string& actCollTable=""); 
 	//@}
 	
 	/** @name metric functions
@@ -910,7 +1105,7 @@ public:
 		\param actIdsIn		identifiers of the geometry set of the actGeomTable table 
 		\param area			the returned area value 
 	 */
-	virtual bool calculateArea(const string& actGeomTable, TeGeomRep actRep, Keys& actIdsIn, double &area);
+	virtual bool calculateArea(const string& actGeomTable, TeGeomRep actRep, TeKeys& actIdsIn, double &area);
 
 	/*!
 		\brief Calculates the length of a geometry set of the actGeomTable table 
@@ -919,7 +1114,7 @@ public:
 		\param actIdsIn		identifiers of the geometry set of the actGeomTable table 
 		\param length		the returned length value 
 	 */
-	virtual bool calculateLength(const string& actGeomTable, TeGeomRep actRep, Keys& actIdsIn, double &length);
+	virtual bool calculateLength(const string& actGeomTable, TeGeomRep actRep, TeKeys& actIdsIn, double &length);
 	
 	/*!
 		\brief Calculates the distance between two geometries of the actGeomTable table 
@@ -928,7 +1123,7 @@ public:
 		\param Ids			identifiers of the two geometries of the actGeomTable table 
 		\param distance		the returned distance value 
 	 */
-	virtual bool calculateDistance(const string& actGeomTable, TeGeomRep actRep, Keys& Ids, double& distance);
+	virtual bool calculateDistance(const string& actGeomTable, TeGeomRep actRep, TeKeys& Ids, double& distance);
 
 	/*!
 		\brief Calculates the distance between a geometry of a geometric table (actGeomTable) and a geometry of other geometric table (visGeomTable)
@@ -953,11 +1148,11 @@ public:
 	  \param actCollTable	collection table name associated with the actGeomTable table
 	*/
 	virtual bool withinDistance(const string& actGeomTable, TeGeomRep actRep, const TeCoord2D& point, 
-		KeysToDist& IdsDistOut, const double& max_distance, const string& actCollTable="");
+		TeKeysToDist& IdsDistOut, const double& max_distance, const string& actCollTable="");
 	//@}
 
 
-	/** @name metric functions
+	/** @name functions that generate new geometries 
 	*  functions that generate new geometries over geometries into the database. 
 	*/
 	//@{
@@ -969,7 +1164,7 @@ public:
 		\param bufferSet	the returned buffers 
 		\param dist			the distance of the buffers
 	 */
-	virtual bool Buffer(const string& actGeomTable, TeGeomRep actRep, Keys& actIds, TePolygonSet& bufferSet, double dist);
+	virtual bool buffer(const string& actGeomTable, TeGeomRep actRep, TeKeys& actIds, TePolygonSet& bufferSet, double dist);
 
 	/*!
 		\brief Returns the centroids of a geometry set of a geometric table (actGeomTable)
@@ -979,7 +1174,7 @@ public:
 		\param actIds		identifiers of the geometry set of the actGeomTable table 
 		\param actCollTable collection table name associated with the actGeomTable table 
 	*/
-	virtual bool Centroid(const string& actGeomTable, TeGeomRep actRep, TePointSet& centroidSet, Keys actIds = vector<string>(), const string& actCollTable = "");
+	virtual bool centroid(const string& actGeomTable, TeGeomRep actRep, TePointSet& centroidSet, TeKeys actIds = vector<string>(), const string& actCollTable = "");
 
 	/*!
 		\brief Returns the convex geometries of a geometries set of a geometric table (actGeomTable)
@@ -988,7 +1183,7 @@ public:
 		\param actIds			identifiers of the geometry set of the actGeomTable table 
 		\param convexHullSet	the returned convex geometries 
 	*/
-	virtual bool ConvexHull(const string& actGeomTable, TeGeomRep actRep, Keys& actIds, TePolygonSet& convexHullSet);
+	virtual bool convexHull(const string& actGeomTable, TeGeomRep actRep, TeKeys& actIds, TePolygonSet& convexHullSet);
 	//@}
 
 	/*!
@@ -1001,7 +1196,7 @@ public:
 		\param numRes			the number of nearest neighbors that will be returned
 	*/
 	virtual bool nearestNeighbors(const string& actGeomTable, const string& actCollTable,
-		TeGeomRep actRep, const string& objId1, Keys& actIdsOut, int numRes=1);
+		TeGeomRep actRep, const string& objId1, TeKeys& actIdsOut, int numRes=1);
 	
 	/*!
 		\brief Returns the nearest neighbors of a geometric table (visGeomTable) of a specific geometry of other geometric table (actGeomTable)
@@ -1016,7 +1211,7 @@ public:
 	*/
 	virtual bool nearestNeighbors(const string& actGeomTable, TeGeomRep actRep, const string& objId1, 
 		const string& visGeomTable, const string& visCollTable, 
-		TeGeomRep visRep, Keys& visIdsOut, int numRes=1); 
+		TeGeomRep visRep, TeKeys& visIdsOut, int numRes=1); 
 
 	/*!
 		\brief Returns the nearest neighbors of a specific geometry of a geometric table (actGeomTable)
@@ -1045,7 +1240,7 @@ public:
 		const string& objId1, const string& visGeomTable, const string& visCollTable, 
 		TeGeomRep visRep, TeDatabasePortal* portal, int numRes=1); 
 
-	/** @name metric functions
+	/** @name set functions
 	*  functions of set: union, intersection, difference and symmetrical difference. 
 	*/
 	//@{
@@ -1057,7 +1252,7 @@ public:
 		\param actIds		identifiers of the geometry set of the actGeomTable table 
 		\param geomVect			the returned intersection 
 	 */
-	virtual bool geomIntersection(const string& actGeomTable, TeGeomRep actRep, Keys& actIds, TeGeometryVect& geomVect);
+	virtual bool geomIntersection(const string& actGeomTable, TeGeomRep actRep, TeKeys& actIds, TeGeometryVect& geomVect);
 
 	/*!
 		\brief Returns the intersection between a geometry of a geometric table (actGeomTable) and a geometry of other geometric table (visGeomTable)
@@ -1103,7 +1298,7 @@ public:
 		\param actIds			identifiers of the geometry set of the actGeomTable table 
 		\param geomVect			the returned union 
 	 */
-	virtual bool geomUnion(const string& actGeomTable, TeGeomRep actRep, Keys& actIds, TeGeometryVect& geomVect);
+	virtual bool geomUnion(const string& actGeomTable, TeGeomRep actRep, TeKeys& actIds, TeGeometryVect& geomVect);
 
 	/*!
 		\brief Returns the union between a geometry of a geometric table (actGeomTable) and a geometry of other geometric table (visGeomTable)
@@ -1154,7 +1349,7 @@ public:
 		\param Ids				identifiers of the geometries of the actGeomTable table that define the regions in the raster data  
 		\param result			structure that will contain the resulted statistics 
 	*/
-	virtual bool Zonal(const string& rasterTable, const string& actGeomTable, Keys& Ids, TeObjectStatistics& result);
+	virtual bool zonal(const string& rasterTable, const string& actGeomTable, TeKeys& Ids, TeObjectStatistics& result, const bool &useDummy=true);
 	
 	/*!
 		\brief Returns the statistics of raster data regions inside a geometry set of a geometric table (actGeomTable)
@@ -1163,7 +1358,7 @@ public:
 		\param actCollTable		collection table that contains the identifiers of the geometries of the actGeomTable table that define the regions in the raster data  
 		\param result			structure that will contain the resulted statistics 
 	*/
-	virtual bool Zonal(const string& rasterTable, const string& actGeomTable, const string& actCollTable, TeObjectStatistics& result);
+	virtual bool zonal(const string& rasterTable, const string& actGeomTable, const string& actCollTable, TeObjectStatistics& result, const bool &useDummy=true);
 	
 	/*!
 		\brief Returns the statistics of a raster data region inside a geometry in memory 
@@ -1171,7 +1366,7 @@ public:
 		\param poly				the geometry in memory that define a region in the raster data 
 		\param result			structure that will contain the resulted statistics 
 	*/
-	virtual bool Zonal(const string& rasterTable, TePolygon& poly, TeStatisticsDimensionVect& result);
+	virtual bool zonal(const string& rasterTable, TePolygon& poly, TeStatisticsDimensionVect& result,const bool &useDummy=true);
 
 	/*!
 		\brief Clips a raster data from a geometry of a geometric table (actGeomTable)
@@ -1181,7 +1376,7 @@ public:
 		\param nameLayerOut		the layer name that will contain the result 
 		\param st				the strategy used in the clipping of the raster data
 	*/
-	virtual bool Mask(const string& rasterTable, const string& actGeomTable, const string& objId, const string& nameLayerOut, TeStrategicIterator st);
+	virtual bool mask(const string& rasterTable, const string& actGeomTable, const string& objId, const string& nameLayerOut, TeStrategicIterator st);
 	
 	/*!
 		\brief Clips a raster data from a geometry in memory (poly)
@@ -1190,7 +1385,7 @@ public:
 		\param nameLayerOut		the layer name that will contain the result 
 		\param st				the strategy used in the clipping of the raster data
 	*/
-	virtual bool Mask(const string& rasterTable, TePolygon& poly, const string& nameLayerOut, TeStrategicIterator st);
+	virtual bool mask(const string& rasterTable, TePolygon& poly, const string& nameLayerOut, TeStrategicIterator st);
 	//@}
 	
 	/** @name specifics SQLs
@@ -1222,8 +1417,10 @@ public:
 	//! Return a string SQL to temporal where
 	virtual string getSQLTemporalWhere(int /* time1 */, int /* time2 */, TeChronon /* chr */, TeTemporalRelation /* rel */, const string& /* initialTime */, const string& /* finalTime */);
 
+	//! Returns a valid SQL time string
 	virtual string getSQLTime(TeTime& /* time */) { return ""; };
 
+	//! Returns a SQL temporal expression applied to a column
 	virtual string getSQLTemporalFunction (TeChronon chr, const string& colName);
 	//@}
 
@@ -1240,9 +1437,11 @@ public:
 	//! Escape special characters in a string to be used in a SQL statement
 	virtual string  escapeSequence(const string& from) = 0;
 
+	//! Returns theme box
 	virtual TeBox getThemeBox(TeTheme* theme);
 
-	map<int, map<string, string> >& mapThemeAlias() {return mapThemeAlias_;}
+	//! Returns the container of legend title alias
+	map<int, map<string, string> >& mapThemeAlias() {return metaModel_->mapThemeAlias();}
 
 	//! Concat values in a vector using unionString as the join between each value
 	virtual string concatValues(vector<string>& values, const string& unionString) = 0;
@@ -1250,48 +1449,63 @@ public:
 	//! Returns the SQL function for upper case
 	virtual string toUpper(const string& value) = 0;
 
+	//! Returns the SQL function for substring that starts from left to right with informed length.
+	virtual string leftString(const string& /*name*/, const int& /*length*/){return "";}
+
+	//! Write the given version as the terralib version in the database
+	virtual	bool updateVersionStamp(const string& version ); 
+
+	//! Read and returns the terralib version from the database
+	virtual	bool loadVersionStamp( string& version ); 
+
+   /** @name Transaction control methods 
+	\Note should be implemented by the drivers that has it. Default implementation
+	is DO NOTHING.
+   */
+   //@{ 
+   //! Begins a transaction
+   virtual bool beginTransaction(); 
+
+   //! Commits a transaction
+   virtual bool commitTransaction();
+
+   //! Rollbacks a transaction
+   virtual bool rollbackTransaction();
+   //@}
+
+   //! Drops a database view
+   virtual bool dropDBView(const string& dbViewName);
 
 protected :
 
-	bool				isConnected_;		//!< indicates if the connection is open
-	string				host_;				//!< host name of the database server
-	string				user_;				//!< user name 
-	string				password_;			//!< user password
-	string				database_;			//!< database name
-	int					portNumber_;		//!< port number
-	int					errorNumber_;		//!< error number
-	string				errorMessage_;		//!< error message
-	TeLayerMap			layerMap_;			//!< layer map	  
-	TeViewMap			viewMap_;			//!< view map	  
-	TeThemeMap			themeMap_;			//!< theme map	  
-	TeLegendEntryMap	legendMap_;			//!< view map
-	multiset<int>		relationMSet_;		//!< multiset of relations between tables
-	string				dbmsName_;			//!< DBMS name (Ado, MySQL, Postgres, OracleSpatial)
-	map<int, map<string, string> > mapThemeAlias_;
-};
-/*! \example DatabaseExample1.cpp
-	This is an example of how to use the TeDatabase to create a TerraLib Database
- */
+	bool				isConnected_;			//!< indicates if the connection is open
+	string				host_;					//!< host name of the database server
+	string				user_;					//!< user name 
+	string				password_;				//!< user password
+	string				database_;				//!< database name
+	int					portNumber_;			//!< port number
+	int					errorNumber_;			//!< error number
+	string				errorMessage_;			//!< error message
+	string				dbmsName_;				//!< DBMS name (Ado, MySQL, Postgres, OracleSpatial)
+	TeSharedPtr<TeMetaModelCache> metaModel_;	//!< Meta model: Layers, Themes, Views...
 
-/*! \example DatabaseExample2.cpp
-	This is an example of how to use the TeDatabase class to open a connection
-	to a database and and retrieve some geometries
- */
+	//! Update metadata about an attribute table that had its name or columns changed
+	void alterTableInfoInMemory(const string& updatedTableName, string oldTableName="");
 
-/*! \example SpatialOperation1.cpp
-	This is an example of how to use the TeDatabasePortal class to manipulate geometries
-	returned from queries on geometry tables
- */
+	int               transactionCounter_;//!< counts how many nested transactions have been opened
 
+private:
+
+	TeDatabase(const TeDatabase& other);
+};
 
 //! An abstract access portal to a database
 /*! A portal has a concept of a record set, that is generated by a selection (query) on
 	the data accessible through a connection to a database server.
-  \sa 
-  TeDatabase, TeGeometry, TeTable, TeTheme, TeView, TeLayer
+  \sa TeDatabase, TeGeometry, TeTable, TeTheme, TeView, TeLayer
 
   */
-class TeDatabasePortal {
+class TL_DLL TeDatabasePortal {
 protected:
 	
 
@@ -1317,7 +1531,7 @@ public :
 	//! Executes a SQL query that opens a record set
 	virtual bool query ( const string &qry, TeCursorLocation l = TeSERVERSIDE, TeCursorType t = TeUNIDIRECTIONAL, TeCursorEditType e = TeREADONLY, TeCursorDataType dt = TeTEXTCURSOR ) = 0;
 
-	//! Fetchs the next row in a record set that should�ve been previously opened
+	//! Fetchs the next row in a record set that shouldve been previously opened
 	virtual bool fetchRow () = 0;
 
 	//! Fetchs a particular row
@@ -1338,7 +1552,11 @@ public :
 
 // specific SQL SELECT command methods
 
-	//! Retrieves the number of rows in this portal
+	/*! \brief Retrieves the number of rows in a portal. Some drivers
+	           (like PostgreSQL and PostGIS) brings to the client only
+			   a part of the row, and then this number can be less than
+			   the number of rows returned by query.
+    */
 	int numRows () 
 	{ return numRows_;}
 
@@ -1347,7 +1565,7 @@ public :
 	{ return numFields_; }
 
 	//! Retrieves attribute list in this portal
-	TeAttributeList AttributeList()	
+	TeAttributeList& getAttributeList()	
 	{ return attList_; }
 
 	//! Retrieves the i-th attribute in this portal
@@ -1408,31 +1626,117 @@ public :
 	//@{ 	
 	virtual TeViewTree*		getViewTree ();
 	virtual TeLegendEntry	getLegend();
-	virtual TeVisual		getVisual();
+	virtual void			getVisual(TeVisual*);
+	virtual bool			getVisual(TeVisual* vis, TeGeomRep& rep, const unsigned int& initIndex);
+	virtual bool			getRasterVisual(TeRasterVisual& vis, const unsigned int& initIndex=0);
 	virtual TeColor			getColor(); 
-	virtual bool getRasterBlock(unsigned long& size, unsigned char* ptData)=0;
+	virtual bool	getRasterBlock(unsigned long& size, unsigned char* ptData)=0;
+	virtual bool	getView(TeView& view, const unsigned int& initIndex=0);
+	virtual bool	getProjection(TeProjection** proj, const unsigned int& initIndex=0);
+	virtual void	getViewNodeParams (TeViewNodeParams& params, const unsigned int& initIndex=0);
+	virtual bool	getTheme(TeAbstractTheme& theme, const unsigned int& initIndex=0);
+	virtual bool	getGrouping(TeGrouping& group, const unsigned int& initIndex=0);
+	virtual bool	getLegend(TeLegendEntry& leg, const unsigned int& initIndex=0);
+	virtual bool	getAttrTable(TeTable& table, const unsigned int& initIndex=0);
+	virtual bool	getLayer(TeLayer& layer, const unsigned int& initIndex=0);
+	virtual bool	getRepresentation(TeRepresentation& rep, const unsigned int& initIndex=0);
+
 	//@}
 
 	/** @name Fetch Geometry
 	  The following methods decodify geometries as stored 
-	  in the database according to the data model proposed in TerraLib .
-	  \par The fetchGeometry methods advance the portal to the next record
-	  and they return TRUE if there are more records to be read and FALSE otherwise
+	  in the database according to the data model proposed in TerraLib.
+	  \param geom		the geometry that will be filled from portal
+	  \param initIndex  the position index in the portal where begins the geometry information 
+	  \return The fetchGeometry methods advance the portal to the next record and 
+	  they return TRUE if there are more records to be read and FALSE otherwise.
 	*/
 	//@{ 	
-	virtual	bool fetchGeometry (TePolygon& pol) = 0;
-	virtual	bool fetchGeometry (TeLine2D& line) = 0;
-	virtual	bool fetchGeometry (TeNode& n) = 0;
-	virtual	bool fetchGeometry (TePoint& p) = 0;
-	virtual	bool fetchGeometry (TeCell& cell);
-	virtual	bool fetchGeometry (TeArc& arc);
-	virtual	bool fetchGeometry (TeText& text);
+	virtual	bool fetchGeometry (TePolygon& geom) = 0;
+	virtual	bool fetchGeometry (TePolygon& geom, const unsigned int& initIndex); 
+	virtual	bool fetchGeometry (TeLine2D& geom) = 0;
+	virtual	bool fetchGeometry (TeLine2D& geom, const unsigned int& initIndex); 
+	virtual	bool fetchGeometry (TeNode& geom) = 0;
+	virtual	bool fetchGeometry (TeNode& geom, const unsigned int& initIndex);
+	virtual	bool fetchGeometry (TePoint& geom) = 0;
+	virtual	bool fetchGeometry (TePoint& geom, const unsigned int& initIndex);
+	virtual	bool fetchGeometry (TeCell& geom);
+	virtual	bool fetchGeometry (TeCell& geom, const unsigned int& initIndex);
+	virtual	bool fetchGeometry (TeArc& geom);
+	virtual	bool fetchGeometry (TeArc& geom, const unsigned int& initIndex);
+	virtual	bool fetchGeometry (TeText& geom);
+	virtual	bool fetchGeometry (TeText& geom, const unsigned int& initIndex);
 	//@}
 };
 
 
-/*! \example DatabaseExample3.cpp
-	This is an example n example of how to use the databse interface to do some spatial queries
+//! Breaks a collection of strings into a series of IN clauses to be used in query expressions
+/*
+	\params begin Iterator that p oints to the beginning of the collection
+	\params end Iterator that points to the end of the collection
+	\param db pointer to the database where the query expression will be applied
+	\param addPlicae flat to indicate that the character ' should enclose each string
+*/
+template <typename Iterator>
+vector<string>
+generateInClauses(Iterator& begin, Iterator& end, TeDatabase* db, bool addPlicae=true)
+{
+	int i, chunkSize = 200;
+	string inClause;
+	vector<string> inClauseVector;
+
+	Iterator temp = begin;
+	i = 0;
+	while (temp != end)
+	{
+		if (i%chunkSize == 0)
+		{
+			if (!inClause.empty())
+			{
+				inClause[inClause.size() - 1] = ')';
+				inClauseVector.push_back(inClause);
+				inClause.clear();
+			}
+			inClause = "(";
+		}
+
+		if (addPlicae)
+			inClause += "'" + db->escapeSequence(*temp) + "',";
+		else
+			inClause += db->escapeSequence(*temp) + ",";
+		i++;
+		++temp;
+	}
+	if (!inClause.empty())
+	{
+		inClause[inClause.size() - 1] = ')';
+		inClauseVector.push_back(inClause);
+	}
+	return inClauseVector;
+}
+
+
+/*! \example createDatabase.cpp
+	Shows how to create a TerraLib database.
  */
-#endif
 
+/*! \example databaseQuery.cpp
+	Shows how to retrieve an existing layer from a TerraLib database, 
+	and execute some queries on its polygon geometry table.
+ */
+
+/*! \example databaseSQLQuery.cpp
+	Shows how retrieve geometries (polygons) using an SQL query.
+ */
+ 
+/*! \example spatialQuery.cpp
+	Shows how  to use the database interface to do some	spatial queries 
+	involving objects with points, lines and polygon geometries.
+ */
+
+/*! \example spatialQueryAndBuffer.cpp
+	Shows to use the database interface to do some  spatial queries involving 
+	objects with points, lines and polygon geometries, and to generate a buffer operation.
+ */
+#endif
+	
diff --git a/src/terralib/kernel/TeDatabaseFactory.cpp b/src/terralib/kernel/TeDatabaseFactory.cpp
new file mode 100755
index 0000000..15cc520
--- /dev/null
+++ b/src/terralib/kernel/TeDatabaseFactory.cpp
@@ -0,0 +1,36 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright  2001-2004 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeDatabaseFactory.cpp
+    \brief This file implements a factory of TerraLib database handlers
+*/
+
+#include <TeDatabaseFactory.h>
+
+TeDatabaseFactory::~TeDatabaseFactory() 
+{
+}
+  
+TeDatabaseFactory::TeDatabaseFactory( const std::string& factoryName )
+  : TeFactory< TeDatabase, TeDatabaseFactoryParams >( factoryName ) 
+{
+}
diff --git a/src/terralib/kernel/TeDatabaseFactory.h b/src/terralib/kernel/TeDatabaseFactory.h
new file mode 100755
index 0000000..cfab040
--- /dev/null
+++ b/src/terralib/kernel/TeDatabaseFactory.h
@@ -0,0 +1,58 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright  2001-2004 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeDatabaseFactory.h
+    \brief This file implements a factory of TerraLib database handlers
+*/
+
+#ifndef TEDATABASEFACTORY_H
+  #define TEDATABASEFACTORY_H
+
+  #include <TeDatabaseFactoryParams.h>
+  #include <TeDatabase.h>
+
+  /**
+   * @brief This is the class for TeDatabase factory.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup DatabaseUtils
+   */
+  class TL_DLL TeDatabaseFactory : 
+    public TeFactory< TeDatabase, TeDatabaseFactoryParams >
+  {
+    public :
+      
+      /**
+       * @brief Default Destructor
+       */
+      virtual ~TeDatabaseFactory();
+      
+    protected :
+      
+      /**
+       * @brief Default constructor
+       *
+       * @param factoryName Factory name.
+       */
+      TeDatabaseFactory(const std::string& factoryName);
+  };
+
+#endif
diff --git a/src/terralib/kernel/TeDatabaseFactoryParams.cpp b/src/terralib/kernel/TeDatabaseFactoryParams.cpp
new file mode 100755
index 0000000..de05c58
--- /dev/null
+++ b/src/terralib/kernel/TeDatabaseFactoryParams.cpp
@@ -0,0 +1,77 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+
+#include "TeDatabaseFactoryParams.h"
+
+
+TeDatabaseFactoryParams::TeDatabaseFactoryParams()
+{
+  dbms_name_ = "";
+  host_ = "";
+  user_ = "";
+  password_ = "";
+  database_ = "";
+  port_ = 0;
+}
+
+
+TeDatabaseFactoryParams::~TeDatabaseFactoryParams()
+{
+}
+
+
+bool TeDatabaseFactoryParams::operator==( 
+  const TeDatabaseFactoryParams& external ) const
+{
+  if( ( dbms_name_ == external.dbms_name_ ) &&
+      ( host_ == external.host_ ) &&
+      ( user_ == external.user_ ) &&
+      ( password_ == external.password_ ) &&
+      ( database_ == external.database_ ) &&
+      ( port_ == external.port_ ) ) {
+  
+    return true;
+  } else {
+    return false;
+  }
+}
+
+
+const TeDatabaseFactoryParams& TeDatabaseFactoryParams::operator=( 
+  const TeDatabaseFactoryParams& external )
+{
+  dbms_name_ = external.dbms_name_;
+  host_ = external.host_;
+  user_ = external.user_;
+  password_ = external.password_;
+  database_ = external.database_;
+  port_ = external.port_;
+  
+  return external;
+}
+
+
+std::string TeDatabaseFactoryParams::decName() const
+{
+  return dbms_name_;
+}
diff --git a/src/terralib/kernel/TeDatabaseFactoryParams.h b/src/terralib/kernel/TeDatabaseFactoryParams.h
new file mode 100755
index 0000000..544c201
--- /dev/null
+++ b/src/terralib/kernel/TeDatabaseFactoryParams.h
@@ -0,0 +1,71 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright  2001-2004 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeDatabaseFactoryParams.h
+    \brief This file contains the definition of parameters necessary to build a TeDatabase
+*/
+
+#ifndef TEDATABASEFACTORYPARAMS_H
+  #define TEDATABASEFACTORYPARAMS_H
+
+  #include "TeDefines.h"
+  #include <string>
+
+  /**
+   * @brief This is the class for TeDatabase factory parameters .
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup DatabaseUtils
+   */
+  class TL_DLL TeDatabaseFactoryParams
+  {
+    public :
+    
+      std::string dbms_name_;	//!< DBMS name (like PostgreSQL, PostGIS, MySQL and others).
+      std::string host_;		//!< Host name.
+      std::string user_;		//!< User name in order to stabilish a connection.
+      std::string password_;	//!< User password.
+      std::string database_;	//!< Database name.
+      int port_;				//!< Port number for network connection.
+
+      //! Default constructor
+      TeDatabaseFactoryParams();
+      
+      //! Default Destructor
+      virtual ~TeDatabaseFactoryParams();
+      
+      //! operator== implementation.
+	  /*! \param external External reference.
+	      \return true if both instances are equal, false if not.
+      */
+      bool operator==( const TeDatabaseFactoryParams& external ) const;
+      
+      //! operator= implementation.
+	  /*! \param external External reference.
+	      \return A const reference to the external object instance.
+      */
+      const TeDatabaseFactoryParams& operator=( 
+        const TeDatabaseFactoryParams& external );      
+
+      //! This is for TeFactory compatibility.
+      std::string decName() const;
+  };
+#endif
diff --git a/src/terralib/kernel/TeDatum.cpp b/src/terralib/kernel/TeDatum.cpp
old mode 100644
new mode 100755
index 10f5b9f..33315ca
--- a/src/terralib/kernel/TeDatum.cpp
+++ b/src/terralib/kernel/TeDatum.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -25,6 +25,8 @@ of this library and its documentation.
 #pragma warning ( disable: 4786 )
 #endif
 
+#include <cstring>
+#include <cstdlib>
 #include <map>
 
 using namespace std;
@@ -33,9 +35,11 @@ using namespace std;
 #include "TeException.h"
 #include "TeUtils.h"
 
-const int NUMDATUM = 8; // number of datum
+const int NUMDATUM = 9; // number of datum
 const int NUMSPH   = 8; // number of ellipsoids
 
+bool tokenizeWKT(char** wkt, vector<string>& tokens);
+
 struct SphParam 
 {
 	double rd;
@@ -45,7 +49,7 @@ struct SphParam
 typedef map<string, SphParam> SphMap;
 
 // Spheroid       Radius(Semi Major Axis)        Flattening
-char* ellipsoidList [] = 
+const char* ellipsoidList [] = 
 { 
 "Airy",	       "6.3775634e+06", "3.340906e-03",	  
 "Clarke-1866", "6.378206e+06",	"3.390060e-03",	 
@@ -61,7 +65,7 @@ char* ellipsoidList [] =
 
 // DatumName    Spheroid        Shift_X           Shift_Y           Shift_Z
 
-char* datumList [] = 
+const char* datumList [] = 
 { 
 "Astro-Chua",   "Hayford",      "-7.700000e+01",  "2.390000e+02",  "5.000000e+00",
 "CorregoAlegre","Hayford",	    "-1.387000e+02",  "1.644000e+02",  "3.440000e+01",
@@ -70,9 +74,16 @@ char* datumList [] =
 "NAD83",	    "GRS80",	    "0.000000e+00",   "0.000000e+00",  "0.000000e+00",
 "SAD69", 	    "UGGI67",       "0.000000e+00",   "0.000000e+00",  "0.000000e+00",
 "Spherical",	"EarthRadius",  "0.000000e+00",   "0.000000e+00",  "0.000000e+00",
-"WGS84",	    "WGS84",	    "6.687000e+01",   "-4.370000e+00", "3.852000e+01"
+"WGS84",	    "WGS84",	    "6.687000e+01",   "-4.370000e+00", "3.852000e+01",
+"Aratu",	    "Hayford",	    "-7.81300e+01",   "2.9163000e+02", "-1.08480e+02"
 };
 
+const char** TeGetDatumList()
+{
+	return datumList;
+}
+
+
 typedef map<string, TeDatum> DatumMap;
 
 
@@ -101,6 +112,141 @@ TeDatum::operator=(const TeDatum& rhs)
 	return *this;
 }
 
+string
+TeDatum::getProj4Description()
+{
+	double shiftX, shiftY,shiftZ;
+	shiftX = shiftY = shiftZ = 0.0;
+
+	string datumProj4 = "";
+	if (name_ == "WGS84")
+	{
+		datumProj4 += " +ellps=WGS84";
+		return datumProj4;
+	}
+	else if (name_ == "Spherical")
+	{
+		datumProj4 += " +R="  + Te2String(rd_,6);
+	}
+	else if (name_ == "SAD69")
+	{
+		shiftX = -66.87;
+		shiftY = 4.37;
+		shiftZ = -38.52;
+
+		datumProj4 += " +ellps=GRS67";
+	}
+	else if (name_ == "CorregoAlegre")
+	{
+		shiftX = -205.57;
+		shiftY = 168.77;
+		shiftZ = -4.12;
+		datumProj4 += " +ellps=intl";
+	}
+	else
+	{
+		datumProj4 += " +a="  + Te2String(rd_,6);
+		datumProj4 += " +f="  + Te2String(flt_,6);
+	}
+
+	if (shiftX != 0.0 && shiftY != 0.0 && shiftZ != 0.0)
+		datumProj4 += " +towgs84=" + Te2String(shiftX,4) + "," +  Te2String(shiftY,4)+ "," +  Te2String(shiftZ,4);
+	return datumProj4;
+}
+
+string
+TeDatum::getWKTDescription()
+{
+	string sph_epsgcode = "";
+	string dtm_epsgcode = "";
+	string spheroid = "";
+	string crs_epsgcode = "";
+	string datumWKT = "GEOGCS[\"" + name_ + "\"," + "DATUM[\"" + name_ + "\", SPHEROID[\"";
+	if (name_ == "Astro-Chua")
+	{
+		spheroid = "Hayford";
+		sph_epsgcode = "7022";
+		dtm_epsgcode = "6224";
+		crs_epsgcode = "4224";
+	}
+	else if (name_ == "CorregoAlegre")
+	{
+		spheroid = "Hayford";
+		sph_epsgcode = "7022";
+		dtm_epsgcode = "6225";
+		crs_epsgcode = "4225";
+	}
+	else if (name_ == "Indian")
+	{
+		spheroid = "Everest";
+		sph_epsgcode = "7015";
+		dtm_epsgcode = "6239";
+		crs_epsgcode = "4240";
+	}
+	else if (name_ == "NAD27")
+	{
+		spheroid = "Clarke 1866";
+		sph_epsgcode = "7008";
+		dtm_epsgcode = "6609";
+		crs_epsgcode = "4267";
+	}
+	else if (name_ == "NAD83")
+	{
+		spheroid = "GRS80";
+		sph_epsgcode = "7019";
+		dtm_epsgcode = "6326";
+		crs_epsgcode = "4269";
+	}
+	else if (name_ == "WGS84")
+	{
+		spheroid = "GRS80";
+		sph_epsgcode = "7019";
+		dtm_epsgcode = "6326";
+		crs_epsgcode = "4326";
+	}
+	else if (name_ == "SAD69")
+	{
+		spheroid = "UGGI67";
+		sph_epsgcode = "7036";
+		dtm_epsgcode = "6291";
+		crs_epsgcode = "4618";
+	}
+	else if (name_ == "Spherical")
+	{
+		spheroid = "EarthRadius";
+		sph_epsgcode = "7035";
+	}
+	else
+		spheroid = "UserDefined";
+	datumWKT += spheroid + "\"," + Te2String(rd_,6) + ", " + Te2String(1.0/flt_,6);
+	if (!sph_epsgcode.empty())
+		datumWKT +=",AUTHORITY[\"EPSG\"," + sph_epsgcode + "]";
+	datumWKT += "]";
+	double shiftX, shiftY, shiftZ;
+	shiftX = shiftY = shiftZ = 0.0;
+	if (name_ == "SAD69")
+	{
+		shiftX = -66.87;
+		shiftY = 4.37;
+		shiftZ = -38.52;
+	}
+	else if (name_ == "CorregoAlegre")
+	{
+		shiftX = -205.57;
+		shiftY = 168.77;
+		shiftZ = -4.12;
+	}
+	if (shiftX != 0.0 && shiftY != 0.0 && shiftZ != 0.0)
+		datumWKT += ",TOWGS84[" + Te2String(shiftX,4) + "," + Te2String(shiftY,4) + "," + Te2String(shiftZ,4) + ",0.0,0.0,0.0,0.0]";
+
+	if (!dtm_epsgcode.empty())
+		datumWKT += ",AUTHORITY[\"EPSG\"," + dtm_epsgcode + "]";
+	datumWKT += "]";
+	if (!crs_epsgcode.empty())
+		datumWKT += ",AUTHORITY[\"EPSG\"," + crs_epsgcode + "]";
+	datumWKT += "]";
+	return datumWKT;
+}
 
 TeDatum
 TeDatumFactory::make( const string& name )
@@ -161,6 +307,160 @@ TeDatumFactory::make( const string& name )
 	return TeDatum ("Spherical");
 }
 
+TeDatum 
+TeDatumFactory::makeFromEPSGCode(const std::string epsgCode)
+{
+	string dname;
+	if (epsgCode == "6224")
+	{
+		dname = "Astro-Chua";
+	}
+	else if (epsgCode == "6225")
+	{
+		dname = "CorregoAlegre";
+	}
+	else if (epsgCode == "6240")
+	{
+		dname = "Indian";
+	}
+	else if (epsgCode == "6609")
+	{
+		dname = "NAD27";
+	}
+	else if (epsgCode == "6152")
+	{
+		dname = "NAD83";
+	}
+	else if (epsgCode == "6326")
+	{
+		dname = "WGS84";
+	}
+	else if (epsgCode == "6618")
+	{
+		dname = "SAD69";
+	}
+	else 
+	{
+		dname = "Spherical";
+	}
+	TeDatum dat = TeDatumFactory::make(dname);
+	return dat;
+}
+
+
+TeDatum 
+TeDatumFactory::makeFromWKT(const std::string wktDatumDescription)
+{
+	TeDatum dat;
+	vector<string> tokens;
+	char* wktchar = new char[wktDatumDescription.size()];
+	strcpy(wktchar,wktDatumDescription.c_str());
+	if (!tokenizeWKT((char **) &wktchar, tokens))
+	{
+		return dat;
+	}
+	unsigned int i =0;
+	while (i<tokens.size() && tokens[i] != "DATUM")
+		++i;
+
+	if (i== tokens.size())
+		return dat;
+	++i;
+
+	map<string,string> ewktToTeDatum;
+	ewktToTeDatum["D_Chua"] = "Astro-Chua";
+	ewktToTeDatum["D_Corrego_Alegre"] = "CorregoAlegre";
+	ewktToTeDatum["D_Indian_1975"] = "Indian";
+	ewktToTeDatum["D_North_American_1927"] = "NAD27";
+	ewktToTeDatum["D_North_American_1983"] = "NAD83";
+	ewktToTeDatum["D_South_American_1969"] = "SAD69";
+	ewktToTeDatum["D_WGS_1984"] = "WGS84";
+	ewktToTeDatum["D_Aratu"] = "Aratu";
+	// lets the ESRI's WKT format 
+	TeTrim(tokens[i]);
+	map<string,string>::iterator it = ewktToTeDatum.find(tokens[i]);
+	if (it != ewktToTeDatum.end())
+	{
+		dat = TeDatumFactory::make(it->second);
+		return dat;
+	}
+
+	map<string,string> wktToTeDatum;
+	wktToTeDatum["Chua"] = "Astro-Chua";
+	wktToTeDatum["Corrego_Alegre"] = "CorregoAlegre";
+	wktToTeDatum["Indian_1975"] = "Indian";
+	wktToTeDatum["North_American_Datum_1927"] = "NAD27";
+	wktToTeDatum["North_American_Datum_1983"] = "NAD83";
+	wktToTeDatum["South_American_Datum_1969"] = "SAD69";
+	wktToTeDatum["Unknown"] = "Spherical";
+	wktToTeDatum["WGS_1984"] = "WGS84";
+	wktToTeDatum["Aratu"] = "Aratu";
+
+	// lets try OGC's SFS WKT format 
+	it = wktToTeDatum.find(tokens[i]);
+	if (it != wktToTeDatum.end())
+	{
+		dat = TeDatumFactory::make(it->second);
+		return dat;
+	}
+
+	// lets try EPSG authority codes 
+	unsigned int is = i;
+	while (i<tokens.size() && tokens[i] != "AUTHORITY")
+		++i;
+	if (i== tokens.size())
+		return dat;
+	++i;
+	if (tokens[i]=="EPSG")
+	{
+		++i;
+		dat = TeDatumFactory::makeFromEPSGCode(tokens[i]);
+		return dat;
+	}
+
+	// so let's try according to the parameters
+	i = is;	
+	dat.name(tokens[i]);
+	while (i<tokens.size() && tokens[i] != "SPHEROID")
+		++i;
+	if (i== tokens.size())
+		return dat;
+	++i; ++i;
+	dat.radius(atof(tokens[i].c_str()));
+	++i;
+	dat.flattening(1/atof(tokens[i].c_str()));
+	++i;
+	if (tokens[i] == "TOWGS84" && i<tokens.size())
+	{
+		++i;
+		double dx = (atof(tokens[i].c_str()));
+		++i;
+		double dy = (atof(tokens[i].c_str()));
+		++i;
+		double dz = (atof(tokens[i].c_str()));
+		++i;
+		++i;
+		++i;
+		++i;
+		if ( dx==0.0 && dy== 0 && dz == 0.0)
+		{
+			dat = TeDatum("WGS84",6378137,0.003352811,66.87,-4.37,38.52);
+		}
+		// this is a SAD69
+		else if (dx == -66.87 && dy == 4.37 && dz == -38.52)
+		{
+			dat = TeDatum("SAD69",6378160,0.003352892,0.0,0.0,0.0);
+		}
+		else
+		{
+			dat.dx_ = dx;
+			dat.dy_ = dy;
+			dat.dz_ = dz;
+		}
+	}
+	return dat;
+}
+
 
 bool findDatum(double semiMajor, double flatenning, TeDatum& datum)
 {
diff --git a/src/terralib/kernel/TeDatum.h b/src/terralib/kernel/TeDatum.h
old mode 100644
new mode 100755
index 933ab3e..06768ea
--- a/src/terralib/kernel/TeDatum.h
+++ b/src/terralib/kernel/TeDatum.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright  2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,13 +20,21 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
+/*! \file TeDatum.h
+    \brief This file contains structures and definitions to support the concept of a planimetric datum
+*/
 
 #ifndef  __TERRALIB_INTERNAL_DATUM_H
 #define  __TERRALIB_INTERNAL_DATUM_H
 
 #include <string>
-#include <cmath>
-using namespace std;
+#include "TeUtils.h"
+
+//! Number of supported datum in TerraLib
+const int NUM_DATUM = 9; 
+
+TL_DLL const char** TeGetDatumList();
+
 
 //! Implements valid Datum options and related parameters which account for different earth spheroids.
 /*! Specifies planimetric TeDatum parameters to be used for defining geodetic
@@ -43,19 +51,19 @@ using namespace std;
 
 	\sa TeDatumFactory
 */
-class TeDatum
+class TL_DLL TeDatum
 {
 private:
-	string	name_;		//!< Planimetric TeDatum name
+	std::string	name_;		//!< Planimetric TeDatum name
 	double	rd_,		//!< Earth equatorial radius (m) 
 			flt_;		//!< Earth flattening 
+public:
 	double	dx_,		//!< TeDatum shift along x axis (m)
 			dy_,		//!< TeDatum shift along y axis (m)
 			dz_;		//!< TeDatum shift along z axis (m) 
-public:
 
 	//!	Constructor.
-	TeDatum ( string name = "Spherical", double rd = 6.371000e+06 , double flt = 0., 
+	TeDatum ( std::string name = "Spherical", double rd = 6.371000e+06 , double flt = 0., 
 			  double dx = 0., double dy= 0., double dz = 0.):
 	name_ ( name ),
 	rd_   (  rd  ),
@@ -75,11 +83,11 @@ public:
 	~TeDatum () {}
 
 	//! Returns the datum name
-	string 	name()	 const			
+	std::string 	name()	 const			
 	{ return name_;} 
 
 	//! Sets the datum name
-	void name(const string& name)	 			
+	void name(const std::string& name)	 			
 	{	name_ = name;	} 
 
 	//! Returns Earth equatorial radius (m)
@@ -114,28 +122,40 @@ public:
 //!		Verifies if current TeDatum is equal to TeDatum& dat. 
 	bool operator== (const TeDatum& dat) const 
 	{
-		return (  (fabs(rd_-dat.rd_)     <= 1.0e-6f) 
-			   && (fabs(flt_-dat.flt_)   <= 1.0e-6f)
-			   && (fabs(dx_ - dat.dx_)   <= 1.0e-6f) 
-			   && (fabs(dy_ - dat.dy_)   <= 1.0e-6f) 
-			   && (fabs(dz_ - dat.dz_)   <= 1.0e-6f) 
-			   ); 
+		return (TeFPEquals(rd_,dat.rd_,0.0000000001) 
+			   && TeFPEquals(flt_,dat.flt_,0.0000000001)
+			   && TeFPEquals(dx_,dat.dx_,0.0000000001) 
+			   && TeFPEquals(dy_,dat.dy_,0.0000000001) 
+			   && TeFPEquals(dz_,dat.dz_,0.0000000001)); 
 	}
+
+	//! Returns the Datum description in PROJ4 format
+	string getProj4Description();
+
+	//! Returns the Datum description in WKT format
+	string getWKTDescription();
+
 };
 
 //! Produces a Datum accordingly to an specified name
-class TeDatumFactory
+class TL_DLL TeDatumFactory
 {
 public:
-	//! factory method - clones a datum given a name
-	static	TeDatum make ( const string& name );
+	//! Builds a datum from a TerraLib name
+	static	TeDatum make ( const std::string& name );
+
+	//! Builds a datum from its EPSG code
+	static TeDatum makeFromEPSGCode(const std::string epsgCode);
+
+	//! Builds a datum from its OGC's WKT description
+	static TeDatum makeFromWKT(const std::string wktDatumDescription);
 };
 
 /*! 
    \fn   findDatum(double semiMajor, double flatenning, TeDatum& datum)
    \brief Tries to find the a TeDatum according to givem semi major axis and earth flattening
  */
-bool findDatum(double semiMajor, double flatenning, TeDatum& datum);
+TL_DLL bool findDatum(double semiMajor, double flatenning, TeDatum& datum);
 
 #endif
 
diff --git a/src/terralib/kernel/TeDecoder.h b/src/terralib/kernel/TeDecoder.h
old mode 100644
new mode 100755
index 9e85e6a..c9cf8af
--- a/src/terralib/kernel/TeDecoder.h
+++ b/src/terralib/kernel/TeDecoder.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2005 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -21,19 +21,15 @@ indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
 /*! \file TeDecoder.h
-    This file deals with decoding of raster structures 
+    \brief This file deals with decoding of raster structures 
 */
 #ifndef  __TERRALIB_INTERNAL_DECODER_H
 #define  __TERRALIB_INTERNAL_DECODER_H
 
-#ifdef WIN32
-#pragma warning ( disable: 4786 )
-#endif
-
-#include "TeProjection.h"
-#include "TeBox.h"
-#include "TeRasterParams.h"
+#include "TeDefines.h"
 #include "TeFactory.h"
+#include "TeCoord2D.h"
+#include "TeRasterParams.h"
 
 using namespace std;
 #include <string>
@@ -42,15 +38,15 @@ using namespace std;
 
 class TeRaster;
 class TeDecoderMemory;
+class TeProjection;
+struct TeBox;
 
 //! An abstract class to decode raster data 
 /* 
 	A decoder keeps its own copy of the  parameters associated
 	to the raster being decoded.
-	
-	\sa TeRaster, TeRasterParams
 */
-class TeDecoder {
+class TL_DLL TeDecoder {
 
 public:
 	//! Empty constructor
@@ -60,9 +56,9 @@ public:
 	/*!
 		\param par raster parameters
 	*/
-	TeDecoder(TeRasterParams& par) : params_(par) {}
+	TeDecoder(const TeRasterParams& par) : params_(par) {}
 
-	//! Virtual destructor (derived classe might have their own)
+	//! Virtual destructor 
 	virtual ~TeDecoder() {}	
 
 	//! Returns the raster parameters
@@ -73,41 +69,63 @@ public:
 	void updateParams(TeRasterParams& par)
 	{	params_ = par; }
 
-	//! Sets the value of a specific raster pixel 
+	//! Sets the value of a specific raster element 
 	/*!
-		\param col pixel column identifier
-		\param lin pixel line identifier
-		\param val pixel value being inserted
-		\param band pixel band identifier
+		\param col	element column identifier
+		\param lin	element line identifier
+		\param val	element value being inserted
+		\param band element band identifier
 	*/
 	virtual bool setElement(int col, int lin, double val, int band=0 ) = 0;
 
+	//! An optimizated method to set values raster images
+	/*
+		This method should be used only to set the values of images with 3 bands associated
+		to the three colour channes: RGB
+		\param col column of the image
+		\param lin line of the image
+		\param Rval the value associated to the band 0 (associated to the R colour Channel)
+		\param Gval the value associated to the band 1 (associated to the G colour Channel)
+		\param Bval the value associated to the band 2 (associated to the B colour Channel)
+		\param transp an optional transparency degree, with a range of 0 (totally transparent) to 255 (totally opaque)
+		\return true if if succeed and false otherwise
+	*/
+	virtual bool setElementRGB(int col, int lin, double Rval, double Gval, double Bval, unsigned int /*transp*/ = 255)
+	{
+		if (!setElement(col,lin,Rval,0))
+			return false;
+		if (!setElement(col,lin,Gval,1))
+			return false;		
+		if (!setElement(col,lin,Bval,2))
+			return false;
+		return true;
+	}
+
 	//! Gets an specific element (col, lin, band) of a raster data
 	/*!
-		\param col pixel column identifier
-		\param lin pixel line identifier
-		\param val pixel value being retrieved
-		\param band pixel band identifier
+		\param col	element column identifier
+		\param lin	element line identifier
+		\param val	element value being retrieved
+		\param band element band identifier
 	*/
 	virtual bool getElement(int col, int lin, double& val, int band=0 ) = 0;
 
-	//! Transform a geographical coordinate to an index (lin, col) coordinate
-	virtual TeCoord2D coord2Index (TeCoord2D &pt)
+	//! Transforms a geographical coordinate to an index (lin, col) coordinate
+	virtual TeCoord2D coord2Index (const TeCoord2D &pt)
 	{	return params_.coord2Index(pt);	}
 
-	//! Transform an index (lin, col) coordinate to geographical coordinate
-	virtual TeCoord2D index2Coord (TeCoord2D &pt)
+	//! Transforms an index (lin, col) coordinate to a geographical coordinate
+	virtual TeCoord2D index2Coord (const TeCoord2D &pt)
 	{	return params_.index2Coord(pt);	}
 
-	//! Initializes the internal structures of the decoder from an external raster parameters structure
+	//! Initializes the internal structures of the decoder from a raster parameters structure
 	/*  
-	    Copy the raster parameters to the internal parameters of the raster
-		calls the init() method
+	    \param par the raster parameters structure
 	*/
 	virtual void init( TeRasterParams& par ) 
-	{ clear(); params_= par; init();}
+	{ params_= par; init();}
 
-	//! Initializes the internal structures of the decoder, from its raster parameters structure.
+	//! Initializes the internal structures of the decoder
 	virtual void init() = 0;
 
 	//! Clears its internal structures
@@ -119,30 +137,45 @@ public:
 
 /** @name Selection
   These routines are used to implement a selection of blocks or tiles 
-  that intercept a given bounding box, and provide them sequentially.
-  Decoders that decodify rasters in formats that support tiling should
-  reimplement theses functions in an optimized way.
+  that intercept a given bounding box, and provide sequential access to them.
+  These routines should be implemented by concrete decoders to formats that support tilling.
 */
 //@{ 
-	
 	//! Returns TRUE if it there are raster blocks that intersect a given box
+	/*
+		\param bb		box	that represents the interest region
+		\param resFac	resolution factor
+		\param parBlock to return the common parameters of the blocks that are selected
+		\returns TRUE if could select at least one block and FALSE otherwise
+	*/
 	virtual bool selectBlocks(TeBox& /* bb */, int /* resFac */, TeRasterParams& /*parBlock*/)  
 	{ return false; }
 
-	//! Gets the the current raster block selected as a raster in memory
+	//! Returns the number of blocks selected in the last block selection
+	virtual int numberOfSelectedBlocks()
+	{	return 0; }	
+	
+	//! Gets a decoder to the current selected block
 	virtual bool getSelectedRasterBlock(TeDecoderMemory* /* memDec */) 
 	{ return false; }
 
-	//! Clear a block selection previously done
+	//! Clear a previous block selection
 	virtual void clearBlockSelection() {}
 
 	//! Returns the raster best resolution level available to fill a given bounding box with a given number of lines and columns in a given projection
+	/*
+		\param bb		box that represents the interest region
+		\param ncols	number of columns in the box
+		\param nlines	number of lines in the box
+		\param proj		pointer to the projection of the box
+	*/
 	virtual int bestResolution(TeBox& /*bb*/, int /*ncols*/, int /*nlines*/, TeProjection* /*proj*/)
 	{	return 1; }
 
-	//! Returns the number of blocks selected in the last query
-	virtual int numberOfSelectedBlocks()
-	{	return 0; }
+	//! Returns the raster resolution level available that is more similiar to a given desired resolution
+	virtual int bestResolution(double /*res*/)
+	{	return 1; }
+
 
 //@}
 
@@ -157,11 +190,11 @@ protected:
 	Implements an abstract factory that builds appropriate decoders
 	according to a string identifier.
 */
-class TeDecoderFactory: public TeFactory<TeDecoder,TeRasterParams> 
+class TL_DLL TeDecoderFactory: public TeFactory<TeDecoder,TeRasterParams> 
 {
 public:
 
-	//! Maps synonyms to decoders identifiers (example "TIFF" or "tif" to  decoderTIFF
+	//! Maps synonyms to decoders identifiers (example "TIFF" or "tif" to a decoder to TIFF format)
 	typedef map<string,string> TeNames2Decoders;
 
 	//! Unique instance instance of map from synonyms to decoder identifiers
@@ -174,7 +207,7 @@ public:
 	//! Builds an appropriate decoder from a identifier
 	TeDecoderFactory(const string& name) : TeFactory<TeDecoder,TeRasterParams>(name) { }
 
-	//! Destructor
+	//! Virtual destructor
 	virtual ~TeDecoderFactory() {}
 };
 
diff --git a/src/terralib/kernel/TeDecoderASCIIGrid.cpp b/src/terralib/kernel/TeDecoderASCIIGrid.cpp
old mode 100644
new mode 100755
index e4aad2d..b0a9bad
--- a/src/terralib/kernel/TeDecoderASCIIGrid.cpp
+++ b/src/terralib/kernel/TeDecoderASCIIGrid.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -25,11 +25,11 @@ of this library and its documentation.
 #include "TeDecoderASCIIGrid.h"
 #include "TeAsciiFile.h"
 #include "TeUtils.h"
-#ifdef WIN32
-#include <io.h>
-#else
-#include <unistd.h>
-#endif
+
+#include <cstring>
+#include <fstream>
+using std::ifstream;
+using std::ofstream;
 
 /*
 Expected format for ESRI ASCII GRID Files (Copied from the ArcWorkstation 8.3 Help File):
@@ -49,8 +49,11 @@ row n
 */
 
 TeDecoderASCIIGrid::TeDecoderASCIIGrid (const TeRasterParams& par) : 
-	TeDecoderMemory()
+	isModified_(false),
+	size_(0),
+	myData_(0)
 {	
+	params_.errorMessage_.clear();
 	if (par.fileName_.empty())
 		return;
 	params_ = par;
@@ -73,7 +76,7 @@ TeDecoderASCIIGrid::~TeDecoderASCIIGrid ()
 		{
 		}
 	}
-	TeDecoderMemory::clear();
+	delete [] myData_;
 }
 
 bool
@@ -92,7 +95,9 @@ TeDecoderASCIIGrid::clear()
 		}
 		isModified_ = false;
 	}
-	TeDecoderMemory::clear();
+	if (myData_)
+		delete [] myData_;
+	myData_ = 0;
 	return true;
 }
 
@@ -175,17 +180,13 @@ TeDecoderASCIIGrid::readParameters()
 			if (TeStringCompare(name,"NODATA_VALUE"))
 				break;
 		}
-		if (!pFile.isNotAtEOF())					// unexpected end of file
-			return false;
-		double dummy = pFile.readFloat();		
-		params_.useDummy_ = true;
-		params_.nBands(1);
-		params_.setDummy(dummy);
+		double dummy = -9999.0;
+		if (pFile.isNotAtEOF())					// unexpected end of file: NODATA statment is not present
+			dummy = pFile.readFloat();		
 		params_.nBands(1);
-		params_.useDummy_ = true;
+		params_.setDataType(TeFLOAT);		
 		params_.setDummy(dummy);
-		params_.setDataType(TeDOUBLE);
-		params_.setPhotometric(TeRASTERMULTIBAND);
+		params_.setPhotometric(TeRasterParams::TeMultiBand);
 		params_.lowerLeftResolutionSize(llx,lly,params_.resx_,params_.resy_,
 				                      params_.ncols_,params_.nlines_,isCenter);
 		TeProjection* pp = new TeNoProjection();
@@ -194,6 +195,7 @@ TeDecoderASCIIGrid::readParameters()
 	}
 	catch(...)
 	{
+		params_.errorMessage_ = "Fail to read the parameters from the raster the file.";
 		return false;
 	}
 	return true;
@@ -212,16 +214,26 @@ TeDecoderASCIIGrid::readFile(const string& filename)
 		if (!pFile.isNotAtEOF())					// unexpected end of file
 			return false;
 		pFile.findNewLine();
+		double val;
 		for (int lin = 0; lin < params_.nlines_; ++lin)
 		{
 			for (int col = 0; col < params_.ncols_; ++col)
 			{
-				setElement(col,lin,pFile.readFloat());
+				val = pFile.readFloat();
+				if (val != params_.dummy_[0])
+				{
+					setElement(col,lin,val);
+					if (val < params_.vmin_[0])
+						params_.vmin_[0] = val;
+					if (val > params_.vmax_[0])
+						params_.vmax_[0] = val;
+				}
 			}
 		}
 	}
 	catch(...)
 	{
+		params_.errorMessage_ = "Fail to read the data from the raster the file.";
 		return false;
 	}
 	return true;
@@ -230,49 +242,86 @@ TeDecoderASCIIGrid::readFile(const string& filename)
 void
 TeDecoderASCIIGrid::init()
 {
-	params_.status_= TeNOTREADY;
+	params_.status_= TeRasterParams::TeNotReady;
 	int nb = params_.nBands();
 	if (nb != 1 )
+	{
+		params_.errorMessage_ = "Ascii-GRID can store raster with only 1 band.";
 		return;
+	}
 
-	TeDecoderMemory::init();			// try to allocate enough memory
-	if (params_.status_ == TeNOTREADY)
+	// try to allocate enough memory to hold the data
+	if (size_ != params_.nlines_*params_.ncols_*params_.nBands())
+	{
+		size_ = params_.nlines_*params_.ncols_*params_.nBands();
+		if (myData_)
+			delete [] myData_;
+		myData_ = new float [size_];
+	}
+	if (!myData_)
 		return;
 
-	params_.status_= TeNOTREADY;
+	for (long i=0; i<size_; myData_[i]=static_cast<float>(params_.dummy_[0]),++i);
+
 	if (params_.mode_ == 'c')	// creating a new file
 	{
-		if (access(params_.fileName_.c_str(),00) != -1) // remove existing file
+		ofstream dataFile(params_.fileName_.c_str()); // try to (re)create the file
+		if (!dataFile)
 		{
-			if (unlink(params_.fileName_.c_str()) == -1)
-				return;
+			params_.errorMessage_ = "Fail to (re)create the raster the file:" + params_.fileName_;
+			return;
 		}
+		dataFile.close();
 		try
 		{
 			TeAsciiFile sFile(params_.fileName_,"w+");
 			if (!writeParameters(sFile) || !saveData(sFile))
+			{
+				params_.errorMessage_ = "Fail to write the raster to file";
 				return;
+			}
 			else
 			{
-				params_.status_ = TeREADYTOWRITE;
+				params_.status_ = TeRasterParams::TeReadyToWrite;
 			}
 		}
 		catch (...)
 		{
+			params_.errorMessage_ = "Fail to write the raster to file";
 			return;
 		}
 	}
 	else if (params_.mode_ == 'w')
 	{
-		if ((access(params_.fileName_.c_str(),06) == -1) || !readFile(params_.fileName_))
-			return;
-		params_.status_ = TeREADYTOWRITE;
+		ifstream dataFile(params_.fileName_.c_str()); // check if file exists
+		if (!dataFile)
+		{
+			params_.errorMessage_ = "Fail to open the raster the file:" + params_.fileName_;
+			return; 
+		}
+		dataFile.close();	
+		if (!readFile(params_.fileName_))
+		{
+			params_.errorMessage_ = "Fail to read the raster the file:" + params_.fileName_;
+			return; 
+		}
+		params_.status_ = TeRasterParams::TeReadyToWrite;
 	}
 	else if (params_.mode_ == 'r')
 	{
-		if ((access(params_.fileName_.c_str(),04) == -1)|| !readFile(params_.fileName_))
-			return;
-		params_.status_ = TeREADYTOREAD;	
+		ifstream dataFile(params_.fileName_.c_str()); // check if file exists
+		if (!dataFile)
+		{
+			params_.errorMessage_ = "Fail to open the raster the file:" + params_.fileName_;
+			return; 
+		}
+		dataFile.close();	
+		if (!readFile(params_.fileName_))
+		{
+			params_.errorMessage_ = "Fail to read the raster the file:" + params_.fileName_;
+			return; 
+		}
+		params_.status_ = TeRasterParams::TeReadyToRead;	
 	}
 }
 
@@ -298,6 +347,7 @@ TeDecoderASCIIGrid::writeParameters(TeAsciiFile& pFile)
 	}
 	catch (...)
 	{
+		params_.errorMessage_ = "Fail to write raster parameters to the file";
 		return false;
 	}
 	return true;
@@ -321,7 +371,7 @@ TeDecoderASCIIGrid::saveData(TeAsciiFile& pFile)
 		{
 			for (int c=0; c<params_.ncols_; ++c)
 			{
-				TeDecoderMemory::getElement(c,l,d);
+				getElement(c,l,d);
 				fprintf(fp,fmt,d);
 			}
 			pFile.writeNewLine();
@@ -329,7 +379,38 @@ TeDecoderASCIIGrid::saveData(TeAsciiFile& pFile)
 	}
 	catch(...)
 	{
+		params_.errorMessage_ = "Fail to write raster data to the file";
 		return false;
 	}
 	return true;
 }
+
+bool 
+TeDecoderASCIIGrid::getElement (int col,int lin, double& val,int band)
+{
+	if (col < 0 || lin < 0 || col >= params_.ncols_ || lin >= params_.nlines_)
+		return false;
+	
+	int position = params_.nBands()*(params_.ncols_*lin+col)+band;
+	val = myData_[position];
+	return true;
+}
+
+bool 
+TeDecoderASCIIGrid::setElement (int col, int lin, double val,int band)
+{
+	if (col < 0 || lin < 0 || col >= params_.ncols_ || lin >= params_.nlines_)
+		return false;
+	int position = params_.nBands()*(params_.ncols_*lin+col)+band;
+	myData_[position] = static_cast<float>(val);
+	isModified_ = true;
+	return true;
+}
+
+TeDecoderASCIIGridFactory::TeDecoderASCIIGridFactory(const string& name): 
+	TeDecoderFactory(name) 
+{
+	TeDecoderFactory::instanceName2Dec()["GRD"]  = "ASCIIGRID";	
+	TeDecoderFactory::instanceName2Dec()["ASC"]  = "ASCIIGRID";	
+	TeDecoderFactory::instanceName2Dec()["TXT"]  = "ASCIIGRID";	
+}
diff --git a/src/terralib/kernel/TeDecoderASCIIGrid.h b/src/terralib/kernel/TeDecoderASCIIGrid.h
old mode 100644
new mode 100755
index a615f46..57cfc08
--- a/src/terralib/kernel/TeDecoderASCIIGrid.h
+++ b/src/terralib/kernel/TeDecoderASCIIGrid.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -21,48 +21,77 @@ indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
 /*! \file TeDecoderASCIIGrid.h
-    This file deals with decoding of raster data in a ASCII SPRING format
+    \brief This file deals with decoding of raster data in a ASCII SPRING format
 */
 #ifndef  __TERRALIB_INTERNAL_DECODERASCIIGrid_H
 #define  __TERRALIB_INTERNAL_DECODERASCIIGrid_H
 
-#include "TeDecoderMemory.h"
+#include "TeDecoder.h"
 
 class TeAsciiFile;
 
 //! Implements a decoder for rasters in ESRI, Inc.'s ASCII Grid format
-class TeDecoderASCIIGrid : public TeDecoderMemory
+/*!
+	The default file extension associated to this decoder ".grd", ".asc" and ".txt".
+*/
+class TL_DLL TeDecoderASCIIGrid : public TeDecoder
 {
 public:
 	//! Empty constructor
-	TeDecoderASCIIGrid () : TeDecoderMemory() 
-	{	params_.decoderIdentifier_ = "ASCIIGRID";	}
+	TeDecoderASCIIGrid();
 
 	//! Constructor from some parameters
-	TeDecoderASCIIGrid (const TeRasterParams& par);
+	TeDecoderASCIIGrid(const TeRasterParams& par);
 
 	//! Destructor
-	~TeDecoderASCIIGrid ();
+	~TeDecoderASCIIGrid();
+
+	//! Initializes the internal structures of the decoder.
+	void init();
+
+	//! Clears its internal structures.
+	bool clear();
+
+	//! Writes an element
+	bool setElement(int col,int lin, double val, int band=0);
+
+	//! Reads an element
+	bool getElement(int col,int lin, double &val,int band=0);
 
-	void	init();
-	bool	clear();
 private:
-    bool    readFile(const string& filename);
-	bool	readParameters();
-	bool	writeParameters(TeAsciiFile& pFile);
-	bool	saveData(TeAsciiFile& pFile);
+
+	bool isModified_;
+	long size_;
+	float* myData_;
+
+	//! Reads the data from a raster file.
+    bool readFile(const string& filename);
+
+	//! Reads raster file header information.
+	bool readParameters();
+
+	//! Writes header information to raster file.
+	bool writeParameters(TeAsciiFile& pFile);
+
+	//! Saves data to raster file.
+	bool saveData(TeAsciiFile& pFile);
+
 };
 
-//! Implements a factory to build decoders to JPEG raster
-class TeDecoderASCIIGridFactory : public TeDecoderFactory
+//! Implements a factory to build decoders for ESRI's ASCII Grid raster format
+class TL_DLL TeDecoderASCIIGridFactory : public TeDecoderFactory
 {
 public:
+	//! Constructor
+	TeDecoderASCIIGridFactory(const string& name);
 
-	TeDecoderASCIIGridFactory(const string& name) : TeDecoderFactory(name) {}
-
-	virtual TeDecoder* build (const TeRasterParams& arg)
+	//! Implementation for the abstract TeFactory::build.
+	/*!
+	    \param arg A const reference to the used parameters.
+		\return A pointer to the new generated instance.
+    */
+	TeDecoder* build (const TeRasterParams& arg)
 	{  return new TeDecoderASCIIGrid(arg); }
 
 };
-
 #endif
diff --git a/src/terralib/kernel/TeDecoderDatabase.cpp b/src/terralib/kernel/TeDecoderDatabase.cpp
old mode 100644
new mode 100755
index e5481a4..0dc67bc
--- a/src/terralib/kernel/TeDecoderDatabase.cpp
+++ b/src/terralib/kernel/TeDecoderDatabase.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -21,16 +21,15 @@ indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
 
-#include <TeDecoderDatabase.h>
-#include <TeDecoderMemory.h>
-#include <TeRasterRemap.h>
-#include <zlib.h>
-#ifdef WIN32
-#include <jpeg.h>
-#endif
-#include <TeDataTypes.h>
-#include "TeProgress.h"
+#include "TeDecoderDatabase.h"
+#include "TeDecoderMemory.h"
+#include "TeRasterRemap.h"
 #include "TeVectorRemap.h"
+#include "TeDataTypes.h"
+#include "TeProgress.h"
+
+#include <zlib.h>
+#include "TeLibJpegWrapper.h"
 
 TeDecoderDatabase::TeDecoderDatabase(const TeRasterParams& par ):
 	TeDecoderVirtualMemory(par),
@@ -41,11 +40,16 @@ TeDecoderDatabase::TeDecoderDatabase(const TeRasterParams& par ):
 {
 	params_ = par;
 	params_.decoderIdentifier_ = "DB";
+	params_.errorMessage_.clear();
 }
 
 TeDecoderDatabase::~TeDecoderDatabase()
 {
-	clearBlockSelection();
+	if (blockPortal_)
+	{
+		delete blockPortal_;
+		blockPortal_ = 0;
+	}
 	clear();
 }
 
@@ -56,7 +60,7 @@ TeDecoderDatabase::create()
 		return false;
 
 	// Create raster table in database
-  	if (!db_->createRasterGeometry (params_.fileName_))
+  	if (!db_->createRasterTable(params_.fileName_))
 		return false;
 	return true;
 }
@@ -64,11 +68,19 @@ TeDecoderDatabase::create()
 void
 TeDecoderDatabase::init()
 {
-	clearBlockSelection();
+	if (blockPortal_)
+	{
+		blockPortal_->freeResult();
+		delete blockPortal_;
+		blockPortal_ = 0;
+	}
 	clear();
-	params_.status_= TeNOTREADY;
+	params_.status_= TeRasterParams::TeNotReady;
 	if (db_ == 0)			// there is not valid database connection
+	{
+		params_.errorMessage_ = "There is no database pointer associated to raster.";
 		return;
+	}
 
 	if (params_.mode_ == 'c')
 	{
@@ -77,22 +89,25 @@ TeDecoderDatabase::init()
 			string sql = "DROP TABLE " + params_.fileName_;
 			db_->execute(sql);
 		}
-  		if (!db_->createRasterGeometry (params_.fileName_))
+  		if (!db_->createRasterTable(params_.fileName_))
+		{
+			params_.errorMessage_ = "Fail to create the raster table: " + params_.fileName_;
 			return;
-		else params_.status_ = TeREADYTOWRITE;
+		}
+		else 
+			params_.status_ = TeRasterParams::TeReadyToWrite;
 	}
 	else if (params_.mode_ == 'w')
 	{
 		if (db_->tableExist(params_.fileName_))
-			params_.status_ = TeREADYTOWRITE;
+			params_.status_ = TeRasterParams::TeReadyToWrite;
 	}
 	else if (params_.mode_ == 'r')
 	{
 		if (db_->tableExist(params_.fileName_))
-			params_.status_ = TeREADYTOREAD;		
+			params_.status_ = TeRasterParams::TeReadyToRead;		
 	}
 	TeDecoderVirtualMemory::init();
-	return;
 }
 
 bool
@@ -102,77 +117,116 @@ TeDecoderDatabase::clear()
 		return false;
 	TeDecoderVirtualMemory::clear();
 	if (blockPortal_)
-		delete blockPortal_;
-	blockPortal_ = 0;
+	{
+		blockPortal_->freeResult();
+	}
 	if (memAux_)
 		delete []memAux_;
 	memAux_ = 0;
-	params_.status_ = TeNOTREADY;
+	params_.status_ = TeRasterParams::TeNotReady;
+  if (db_->isConnected() && (params_.mode_ == 'c' || params_.mode_ == 'w') && 
+    (!params_.objectId_.empty() && params_.layerId_ > 0))
+	{
+		TeDatabasePortal* portal = db_->getPortal();
+		string sql = "SELECT geom_table FROM te_representation WHERE geom_type = 512";
+		sql += " AND layer_id = " + Te2String(params_.layerId_);
+		if (portal->query(sql) && portal->fetchRow())
+		{
+			string tName = portal->getData(0);
+			portal->freeResult();
+			sql = "SELECT geom_id FROM " + tName + " WHERE object_id = '" + params_.objectId_ + "'";
+			if (portal->query(sql) && portal->fetchRow())
+			{
+				tName += "_metadata";
+				db_->updateRasterMetadata(tName,portal->getInt(0),params_);
+			}
+		}
+		delete portal;
+	}
 	return true;
 }
 
 string 
-TeDecoderDatabase::codifyId(int col, int lin, int band, int /*res*/, int /*subb*/)
+TeDecoderDatabase::codifyId(int col, int lin, int band, int res, int subb)
+{
+	return codifyId(blockIndex(col, lin, band), res, subb);
+}
+
+string TeDecoderDatabase::codifyId(const TeBlockIndex& idx, int res, int subb)
 {
 	char id[32];
-	if (params_.tiling_type_ == TeExpansible)
-	{
-		TeCoord2D tmpCoord = TeCoord2D(col,lin);
-		TeCoord2D xy = params_.index2Coord(tmpCoord);
+	sprintf(id, "X%dY%dB%dR%dS%d", idx.col_, idx.lin_, idx.band_, res, subb);
+	return string(id);
+}
+
 
-		double bXSize = params_.blockWidth_*params_.resx_;
-		double bYSize = params_.blockHeight_*params_.resy_;
+TeBlockIndex 
+TeDecoderDatabase::blockIndex(int col, int lin, int band)
+{
+	if (params_.tiling_type_ != TeRasterParams::TeExpansible)
+		return TeDecoderVirtualMemory::blockIndex(col, lin, band);
 
-		int magicX, magicY;
-		if ( xy.x() < 0)
-			magicX = (int)(xy.x()/bXSize - 1);
-		else
-			magicX = (int)(xy.x()/bXSize);
+	TeBlockIndex bl_idx;
+	bl_idx.band_ = band;
 
-		if (xy.y() < 0)
-			magicY = (int) (xy.y()/bYSize-1);
-		else
-			magicY = (int) (xy.y()/bYSize);
+	TeCoord2D tmpCoord = TeCoord2D(col,lin);
+	TeCoord2D xy = params_.index2Coord(tmpCoord);
 
-		sprintf(id,"X%dY%dB%dR%dS0",magicX,magicY,band,params_.resolution_);
-	}
+	double bXSize = params_.blockWidth_*params_.resx_;
+	double bYSize = params_.blockHeight_*params_.resy_;
+
+	if ( xy.x() < 0)
+		bl_idx.col_ = (int)(xy.x()/bXSize - 1);
 	else
-		sprintf(id,"X%dY%dB%dR%dS0",
-	    (int)(col/params_.blockWidth_),(int)(lin/params_.blockHeight_),band,params_.resolution_);
+		bl_idx.col_ = (int)(xy.x()/bXSize);
 
-	return string(id);
+	if (xy.y() < 0)
+		bl_idx.lin_ = (int) (xy.y()/bYSize-1);
+	else
+		bl_idx.lin_ = (int) (xy.y()/bYSize);
+
+	return bl_idx;
 }
 
 void 
 TeDecoderDatabase::decodifyId(const string& id, int& col,int& lin, int& band, int& res, int& subb)
 {
-	char lixo;
-	int magicX, magicY;
-	if (params_.tiling_type_ == TeExpansible)
-	{
-		sscanf(id.c_str(),"%1c%d%1c%d%1c%d%1c%d%1c%d",&lixo,&magicX,&lixo,&magicY,&lixo,&band,&lixo,&res,&lixo,&subb);
+	int r, s;
+	TeBlockIndex bl_idx;
+	sscanf(id.c_str(),"%*c%d%*c%d%*c%d%*c%d%*c%d", 
+		&bl_idx.col_, &bl_idx.lin_, &bl_idx.band_, &r, &s);
+	blockIndexPos(bl_idx, col, lin, band);
+	res = r;
+	subb = s;
+}
 
-		double bXSize = params_.blockWidth_*params_.resx_;
-		double bYSize = params_.blockHeight_*params_.resy_;
-		
-		TeCoord2D xy(magicX*bXSize+params_.resx_/2,magicY*bYSize+params_.resy_/2);
+void TeDecoderDatabase::blockIndexPos( const TeBlockIndex& index, int& ulCol, int& ulLin, int& band)
+{
+	if (params_.tiling_type_ != TeRasterParams::TeExpansible)
+		return TeDecoderVirtualMemory::blockIndexPos(index, ulCol, ulLin, band);
 
-		xy = params_.coord2Index(xy);
-		lin = TeRound(xy.y())-params_.blockHeight_+1;
-		col = TeRound(xy.x());
-	}
-	else 
-	{
-		sscanf(id.c_str(),"%1c%d%1c%d%1c%d%1c%d%1c%d",&lixo,&magicX,&lixo,&magicY,&lixo,&band,&lixo,&res,&lixo,&subb);
-		col = magicX*params_.blockWidth_;
-		lin = magicY*params_.blockHeight_;
-	}
+	band = index.band();
+
+	double bXSize = params_.blockWidth_*params_.resx_;
+	double bYSize = params_.blockHeight_*params_.resy_;
+
+	TeCoord2D xy(index.column()*bXSize+params_.resx_/2,index.line()*bYSize+params_.resy_/2);
+	xy = params_.coord2Index(xy);
+	ulLin = TeRound(xy.y())-params_.blockHeight_+1;
+	ulCol = TeRound(xy.x());
 }
 
-bool 
-TeDecoderDatabase::getRasterBlock(const string& index, void *block, int& ulCol, int& ulLin)
+
+bool TeDecoderDatabase::getRasterBlock(const TeBlockIndex& index, void *block)
 {
+	string index_str;
+	index_str = codifyId(index, params_.resolution_);
+	return getRasterBlock(index_str, block);
+}
 
+bool 
+TeDecoderDatabase::getRasterBlock(const string& index, void *block)
+{
 	TeDatabasePortal* portal = db_->getPortal();
 	if (!portal) 
 		return false;
@@ -185,61 +239,64 @@ TeDecoderDatabase::getRasterBlock(const string& index, void *block, int& ulCol,
 		delete portal;
 		return 0;
 	}
-
-	int res, subb, band=0;
+	int band=0;
 	if (!portal->fetchRow())	// tile is not in the database
 	{
-		decodifyId(index,ulCol,ulLin,band,res, subb);
 		delete portal;
 		return 0;
 	}
 
-	if (!memAux_)
+	unsigned char*  memread_ptr = 0;
+	if(params_.compression_[band] != TeRasterParams::TeNoCompression)
 	{
-		long size = params_.blockHeight_ * params_.blockWidth_ * params_.nbitsperPixel_[0]/8;
-		memAux_ = new unsigned char[size];
+		if(!memAux_)
+		{
+			long size = params_.blockHeight_ * params_.blockWidth_ * params_.elementSize();
+			memAux_ = new unsigned char[size];
+		}
+		memread_ptr = memAux_;
 	}
+	else
+		memread_ptr = reinterpret_cast<unsigned char*>(block);
 
 	// tile is already in the database
 	unsigned long blobLen;
-	if (!portal->getRasterBlock(blobLen,memAux_))
+	if (!portal->getRasterBlock(blobLen,memread_ptr))
 	{
 		delete portal;
 		return false;
 	}
 
 	// decompress blob into a tile (previously allocated) 
-	if (params_.compression_[band] == TeZLib)		// zlib compression
+	if (params_.compression_[band] == TeRasterParams::TeZLib)		// zlib compression
 	{
-		unsigned long blockLen;	// size after decompression
-		uncompress (reinterpret_cast<unsigned char*>(block),&blockLen,memAux_,blobLen);
+		unsigned long blockLen = params_.blockHeight_ * params_.blockWidth_ * params_.elementSize();	// size after decompression
+		uncompress (reinterpret_cast<unsigned char*>(block),&blockLen,memread_ptr,blobLen);
 	}
-#ifdef WIN32
-	else if (params_.compression_[band] == TeJPEG) //jpeg compression
+	else if (params_.compression_[band] == TeRasterParams::TeJpeg) //jpeg compression
 	{
 		int nb;
-		bool status = Jpeg::ReadImage(params_.blockWidth_,params_.blockHeight_,nb,memAux_,blobLen,reinterpret_cast<unsigned char*>(block));
-	}
-#endif
-	else											// no compression
-	{
-		memcpy(block,memAux_,blobLen);
+		if (!Jpeg::DecompressBuffer(memAux_,blobLen,reinterpret_cast<unsigned char*>(block),params_.blockWidth_,params_.blockHeight_,nb))
+		{
+			delete portal;
+			return false;
+		}
 	}
-	TeCoord2D xy(portal->getDouble("lower_x"),portal->getDouble("upper_y"));
-	TeCoord2D ij = params_.coord2Index(xy);
-
-	// This is the rounding algorithm for col/lin value:
-	// Pixel 0 covers column and line indexes from [-0.5,0.5)
-	ulCol = TeRoundRasterIndex(ij.x_);
-	ulLin = TeRoundRasterIndex(ij.y_);
 	delete portal;
 	return true;
 }
 
 bool 
-TeDecoderDatabase::putRasterBlock(const string& index, void *block, long bsize)
+TeDecoderDatabase::putRasterBlock(const TeBlockIndex& index, void *block, long bsize)
 {
+	string index_str;
+	index_str = codifyId(index, params_.resolution_);
+	return putRasterBlock(index_str, block, bsize);
+}
 
+bool 
+TeDecoderDatabase::putRasterBlock(const string& index, void *block, long bsize)
+{
 	if (db_ == 0 || index.empty())
 		return false;
 
@@ -257,34 +314,33 @@ TeDecoderDatabase::putRasterBlock(const string& index, void *block, long bsize)
 	bool status;
 
 	// verify compression option
-	if (params_.compression_[band] == TeNoCompression)
+	if (params_.compression_[band] == TeRasterParams::TeNoCompression)
 	{
 		status = db_->insertRasterBlock(params_.fileName_,index,blockbb.lowerLeft(),blockbb.upperRight(),reinterpret_cast<unsigned char*>(block),bsize,band,res,subb);
 		return status;
 	}
-
 	unsigned long finalsize = bsize;  // final size after compression
 	if (!memAux_)
 	{
 		long size = params_.blockHeight_ * params_.blockWidth_ * params_.elementSize();
 		memAux_ = new unsigned char[int(size*1.1 + 12.)];
 	}
-
-	if (params_.compression_[band] == TeZLib)		// ZLib compression
+	if (params_.compression_[band] == TeRasterParams::TeZLib)		// ZLib compression
 	{
 		// zlib needs some more space)
 		finalsize = (unsigned long)(bsize*1.1 + 12.);
 		compress (memAux_, &finalsize,reinterpret_cast<unsigned char*>(block),bsize);
+		return db_->insertRasterBlock(params_.fileName_,index,blockbb.lowerLeft(),blockbb.upperRight(),memAux_,finalsize,band,res,subb);
 	}
-#ifdef WIN32
-	else if (params_.compression_[band] == TeJPEG)	// JPEG compression
+	else if (params_.compression_[band] == TeRasterParams::TeJpeg)	// JPEG compression
 	{
-		status = Jpeg::Compress(reinterpret_cast<unsigned char*>(block),memAux_,params_.blockWidth_,params_.blockHeight_,1,finalsize);
+		int sizec = int(bsize*1.1 + 12.);
+		if (!Jpeg::CompressToBuffer(reinterpret_cast<unsigned char*>(block),params_.blockWidth_,params_.blockHeight_,1,memAux_,sizec,75))
+			return false;
+		finalsize = sizec;
+		return db_->insertRasterBlock(params_.fileName_,index,blockbb.lowerLeft(),blockbb.upperRight(),memAux_,finalsize,band,res,subb);
 	}
-#endif
-
-	status = db_->insertRasterBlock(params_.fileName_,index,blockbb.lowerLeft(),blockbb.upperRight(),memAux_,finalsize,band,res,subb);
-	return status;
+	return false;
 }
 
 bool
@@ -326,7 +382,7 @@ TeDecoderDatabase::selectBlocks(TeBox& bb, int resFac, TeRasterParams& parBlock)
 
 	sql = "SELECT "+ sel;
 	sql += " FROM " + params_.fileName_;
-	sql += " WHERE " + where + " AND resolution_factor= " + Te2String(resFac);
+	sql += " WHERE " + where + " AND resolution_factor = " + Te2String(resFac);
 	sql += " ORDER BY lower_x, lower_y, upper_x, upper_y, block_id";
 	
 	if (!blockPortal_->query(sql))
@@ -351,7 +407,7 @@ TeDecoderDatabase::selectBlocks(TeBox& bb, int resFac, TeRasterParams& parBlock)
 	parBlock.lutr_ = params_.lutr_;
 	parBlock.lutg_ = params_.lutg_;
 	parBlock.lutb_ = params_.lutb_;
-	parBlock.interleaving_ = TePerBand;
+	parBlock.interleaving_ = TeRasterParams::TePerBand;
 	return blockPortal_->fetchRow();
 }
 
@@ -362,6 +418,7 @@ TeDecoderDatabase::getSelectedRasterBlock(TeDecoderMemory* memDec)
 		return 0;
 	unsigned long srcLen;
 	int i = 0;
+
 	if (!memAux_ )
 	{
 		long size = params_.blockHeight_ * params_.blockWidth_ * params_.elementSize();
@@ -372,36 +429,52 @@ TeDecoderDatabase::getSelectedRasterBlock(TeDecoderMemory* memDec)
 	string blockId;
 	do
 	{
-		bbBlock = TeBox (blockPortal_->getDouble("lower_x"),blockPortal_->getDouble("lower_y"),
-					   blockPortal_->getDouble("upper_x"),blockPortal_->getDouble("upper_y"));
+		double lx = 0;
+		double ly = 0;
+		double ux = 0;
+		double uy = 0; 
+		lx = blockPortal_->getDouble("lower_x");
+		ly = blockPortal_->getDouble("lower_y");
+		ux = blockPortal_->getDouble("upper_x");
+		uy = blockPortal_->getDouble("upper_y");
+
+		bbBlock = TeBox(lx, ly, ux, uy);
+
 		blockId = blockPortal_->getData("block_id");
 		res = blockPortal_->getInt("resolution_factor");
 
-		int banda;
-		int l;
-		this->decodifyId(blockId,l,l,banda,l,l);
+	int banda;
+    if(params_.nBands() > 1)
+    {
+		  int col, lin, res, subb;
+		  this->decodifyId(blockId, col, lin, banda, res, subb);
+    }
+	else
+      banda = 0;
+    
+	if (params_.compression_[banda] == TeRasterParams::TeNoCompression)
+		  blockPortal_->getRasterBlock(srcLen, reinterpret_cast<unsigned char*>(memDec->data(banda)));
+    else
+    {
 		blockPortal_->getRasterBlock(srcLen,memAux_);
 
-		if (params_.compression_[banda] == TeZLib)
+		if (params_.compression_[banda] == TeRasterParams::TeZLib)
 		{
-			unsigned long destLen;
+			TeRasterParams& par = memDec->params();
+			unsigned long destLen = par.ncols_ * par.nlines_ * par.elementSize();
 			int status;
 			status = uncompress (reinterpret_cast<unsigned char*>(memDec->data(banda)),&destLen,memAux_,srcLen);
 		}
-#ifdef WIN32
-		else if (params_.compression_[banda] == TeJPEG)
+		else if (params_.compression_[banda] == TeRasterParams::TeJpeg)
 		{
-			int nbytes = params_.nbitsperPixel_[banda]/8;
 			int nb = 1;
-			bool status = Jpeg::ReadImage(params_.blockWidth_,params_.blockHeight_,nb,memAux_,srcLen,reinterpret_cast<unsigned char*>(memDec->data(banda)));
+			Jpeg::DecompressBuffer(memAux_,srcLen,reinterpret_cast<unsigned char*>(memDec->data(banda)),params_.blockWidth_,params_.blockHeight_,nb);
 		}
-#endif
-		else
-			memcpy(reinterpret_cast<unsigned char*>(memDec->data(banda)),reinterpret_cast<unsigned char*>(memAux_),srcLen);
+    }
 		i++;
 	}while (i<params_.nBands() && blockPortal_->fetchRow());
 	
-	memDec->params().boundingBoxResolution(bbBlock.x1_,bbBlock.y1_,bbBlock.x2_,bbBlock.y2_,
+	memDec->params().boundingBoxResolution(bbBlock.x1(),bbBlock.y1(),bbBlock.x2(),bbBlock.y2(),
 		                                   params_.resx_*res,params_.resy_*res);
 	memDec->params().blockId_ = blockId;
 	return blockPortal_->fetchRow();
diff --git a/src/terralib/kernel/TeDecoderDatabase.h b/src/terralib/kernel/TeDecoderDatabase.h
old mode 100644
new mode 100755
index fb0c3a5..b7e67d5
--- a/src/terralib/kernel/TeDecoderDatabase.h
+++ b/src/terralib/kernel/TeDecoderDatabase.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -21,12 +21,13 @@ indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
 /*! \file TeDecoderDatabase.h
-    This file deals with decoding of raster structures stored in a TerraLib database
+    \brief This file deals with decoding of raster structures stored in a TerraLib database
 */
 
 #ifndef  __TERRALIB_INTERNAL_DECODERDATADASE_H
 #define  __TERRALIB_INTERNAL_DECODERDATABASE_H
 
+#include "TeDefines.h"
 #include "TeDecoderVirtualMemory.h"
 #include "TeDatabase.h"
 
@@ -38,7 +39,7 @@ of this library and its documentation.
 
 	\sa TeDatabase TeDecoderVirtualMemory
 */
-class TeDecoderDatabase: public TeDecoderVirtualMemory
+class TL_DLL TeDecoderDatabase: public TeDecoderVirtualMemory
 {
 public:
 	//! Empty constructor
@@ -72,10 +73,8 @@ public:
 	/*!
 		\param index tile unique identifier
 		\param buf pointer to a raster tile in memory
-		\param ulCol returns the column index of the upper-left corner of the block
-		\param ulLin returns the column index of the upper-left corner of the block
 	*/
-	bool getRasterBlock(const string& index, void *buf, int& ulCol, int& ulLin);
+	bool getRasterBlock(const string& index, void *buf);
 
 	//! Saves a raster tile from a virtual memory to permanent storage
 	/*! 
@@ -85,9 +84,13 @@ public:
 	*/	
 	bool putRasterBlock(const string& index, void *buf, long bsize);
 
+	//! Codifiy the index for the block that contains an element
 	string codifyId(int col, int lin, int band, int res, int subb);
+
+	//! Decodify the parameters of the block that has an index 
 	void decodifyId(const string& id, int& col,int& lin, int& band, int& res, int& subb);
 
+
 	//! Saves the lut table of the raster associated to this decoder
 	bool saveLUTTable();
 
@@ -111,13 +114,27 @@ public:
 	*/
 	bool selectBlocks(TeBox& bb, int resFac, TeRasterParams& parBlock);
 
+	//! Gets current raster block an outputs it in a memory decoder
 	bool getSelectedRasterBlock(TeDecoderMemory* memDec);
 
+	//! Clears selected blocks portal
 	void clearBlockSelection();
 
+	//! Returns the number of selectd raster blocks
 	int numberOfSelectedBlocks()
 	{	return nSelectedBlocks_; }
 
+	//! Decodifies the position of a block within the raster from its index
+	virtual void blockIndexPos( const TeBlockIndex& index, int& ulCol, int& ulLin, int& band); 
+
+protected:
+
+	virtual TeBlockIndex blockIndex(int col, int lin, int band);  
+	virtual string codifyId(const TeBlockIndex& idx, int res = 1, int subb = 0); 
+
+	bool getRasterBlock(const TeBlockIndex& index, void *buf);
+	bool putRasterBlock(const TeBlockIndex& index, void *buf, long bsize);
+
 private:
 	TeDatabase			*db_;
 	TeDatabasePortal	*blockPortal_;
@@ -126,7 +143,7 @@ private:
 };
 
 //! Implements a factory to build database decoders
-class TeDecoderDatabaseFactory : public TeDecoderFactory
+class TL_DLL TeDecoderDatabaseFactory : public TeDecoderFactory
 {
 public:
 
diff --git a/src/terralib/kernel/TeDecoderFile.cpp b/src/terralib/kernel/TeDecoderFile.cpp
old mode 100644
new mode 100755
index b451408..b1b0f61
--- a/src/terralib/kernel/TeDecoderFile.cpp
+++ b/src/terralib/kernel/TeDecoderFile.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -24,11 +24,6 @@ of this library and its documentation.
 #include <TeDecoderFile.h>
 
 #ifdef WIN32
-static inline short swaps(short value)
-{
-    short svalue = ((value & 0x00ff) << 8) | ((value >> 8) & 0x00ff);
-	return svalue;
-}
 
 TeDecoderFile::TeDecoderFile ( const TeRasterParams& par )
 {
@@ -54,7 +49,7 @@ TeDecoderFile::init()
 	clear();
 
 	// First open the file
-	m_hFile = CreateFile(
+	m_hFile = CreateFileA(
 		params_.fileName_.c_str(),	// File name
 		GENERIC_READ | GENERIC_WRITE,	// Read-write
 		FILE_SHARE_READ
@@ -78,7 +73,7 @@ TeDecoderFile::init()
 // Allocate buffer to get raster line from file
 
 	long mBufferSize = params_.ncols_;
-	if (params_.interleaving_ == TePerPixel)
+	if (params_.interleaving_ == TeRasterParams::TePerPixel)
 		mBufferSize *= params_.nBands();
 
 	switch (params_.dataType_[0]) {
@@ -117,7 +112,7 @@ TeDecoderFile::init()
 bool
 TeDecoderFile::create()
 {
-	m_hFile = CreateFile(
+	m_hFile = CreateFileA(
 		params_.fileName_.c_str(),	// File name
 		GENERIC_READ | GENERIC_WRITE,	// Read-write
 		FILE_SHARE_READ
@@ -210,25 +205,26 @@ TeDecoderFile::clear()
 	m_hFile = NULL;
 	delete m_buffer;
 	m_buffer = 0;
-	params_.status_ = TeNOTREADY;
+	params_.status_ = TeRasterParams::TeNotReady;
 	return true;
 }
 
+
 bool
-TeDecoderFile::getRasterBlock(const string& index, void *buf, int& ulCol, int& ulLin)
-{
-	int res, subb, band;
-	decodifyId(index,ulCol,ulLin,band,res,subb);
+TeDecoderFile::getRasterBlock(const TeBlockIndex& index, void *buf)
+{   
+	int ulCol, ulLin, band;
+        blockIndexPos(index, ulCol, ulLin, band);
 
 	int nb = params_.nBands();
 	DWORD position;
 	DWORD nBytesToRead;
 	int inc, inic;
-	if (params_.interleaving_ == TePerPixel)
+	if (params_.interleaving_ == TeRasterParams::TePerPixel)
 	{
 		inc = nb;
-		inic = band;
-		position = dataInitPos_ + params_.ncols_*(nb*ulLin);
+		inic = index.band();
+		position = dataInitPos_ + params_.ncols_*(nb* ulLin);
 		nBytesToRead = m_dwWordSize*params_.ncols_*nb;
 	}
 	else
@@ -286,11 +282,13 @@ TeDecoderFile::getRasterBlock(const string& index, void *buf, int& ulCol, int& u
 	return true;
 }
 
+
+
 bool 
-TeDecoderFile::putRasterBlock(const string& index, void *buf, long bsize)
+TeDecoderFile::putRasterBlock(const TeBlockIndex& index, void *buf, long bsize)
 {
-	int res, subb, band,ulCol,ulLin;
-	decodifyId(index,ulCol,ulLin,band,res,subb);
+	int band,ulCol,ulLin;
+  blockIndexPos(index, ulCol, ulLin, band);
 
 	DWORD position = dataInitPos_ + params_.ncols_*(params_.nBands()*ulLin + band);
 	DWORD diff = position - m_dwPosition;
@@ -342,22 +340,22 @@ TeDecoderFile::putRasterBlock(const string& index, void *buf, long bsize)
 	return true;
 }
 
-string 
-TeDecoderFile::codifyId(int col, int lin, int band, int res, int subb)
+TeBlockIndex TeDecoderFile::blockIndex(int col, int lin, int band)
 {
-	char id[32];
-	sprintf(id,"Y%dB%d",lin,band);
-	return string(id);
+  TeBlockIndex bl_index;
 
+  bl_index.band_ = band;
+  bl_index.lin_ = lin;
+  bl_index.col_ = 0;
+
+  return bl_index;
 }
 
-void 
-TeDecoderFile::decodifyId(const string& id, int& col,int& lin, int& band, int& res, int& subb)
+void TeDecoderFile::blockIndexPos(const TeBlockIndex& index, int& ulCol, int& ulLin, int& band)
 {
-	char lixo;
-	sscanf(id.c_str(),"%1c%d%1c%d",&lixo,&lin,&lixo,&band);
-	col = 0;
-	res = 1;
-	subb = 0;
+  ulCol = 0;
+  ulLin = index.line() * params_.blockWidth_;
+  band = index.band();
 }
+
 #endif
diff --git a/src/terralib/kernel/TeDecoderFile.h b/src/terralib/kernel/TeDecoderFile.h
old mode 100644
new mode 100755
index ef18088..d4f4afc
--- a/src/terralib/kernel/TeDecoderFile.h
+++ b/src/terralib/kernel/TeDecoderFile.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -21,7 +21,7 @@ indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
 /*! \file TeDecoderFile.h
-    This file deals with decoding of raster structures in a binary file
+    \brief This file deals with decoding of raster structures in a binary file using Windows support
 */
 #ifndef  __TERRALIB_INTERNAL_DECODERFILE_H
 #define  __TERRALIB_INTERNAL_DECODERFILE_H
@@ -32,20 +32,31 @@ of this library and its documentation.
 #include <winbase.h>
 
 //! Implements decoder to raster data stored in a file in a binary raw format
-class TeDecoderFile : public TeDecoderVirtualMemory
+/*	\note This implementation is valid only for the windows platform
+*/
+class TL_DLL TeDecoderFile : public TeDecoderVirtualMemory
 {
 public:
+	//! Constructor
 	TeDecoderFile ( const TeRasterParams& );
+
+	//! Destructor
 	~TeDecoderFile ();
 
+	//! Initalizes its internal structures
 	void init	();
+
+	//! Created a handle
 	bool create	();
+
+	//! Releases the internal structures
 	bool clear	();
 
-	bool	getRasterBlock(const string& index, void *buf, int& ulCol, int& ulLin);
-	bool	putRasterBlock(const string& index, void *buf, long bsize);
-	string	codifyId(int col, int lin, int band, int res, int subb);
-	void	decodifyId(const string& id, int& col,int& lin, int& band, int& res, int& subb);
+protected:
+	bool	getRasterBlock(const TeBlockIndex& index, void *buf); 
+	bool	putRasterBlock(const TeBlockIndex& index, void *buf, long bsize);
+	TeBlockIndex blockIndex(int col, int lin, int band);
+	void blockIndexPos(const TeBlockIndex& index, int& ulCol, int& ulLin, int& band);
 	
 private:
 
@@ -58,13 +69,13 @@ private:
 };
 
 //! Implements a factory to build file decoders
-class TeDecoderFileFactory : public TeDecoderFactory
+class TL_DLL TeDecoderFileFactory : public TeDecoderFactory
 {
 public:
 
 	TeDecoderFileFactory(const string& name) : TeDecoderFactory(name) {}
 
-	//! Builds a database decoder
+	//! Builds a file decoder
 	virtual TeDecoder* build (const TeRasterParams& arg)
 	{  return new TeDecoderFile(arg); }
 };
diff --git a/src/terralib/kernel/TeDecoderJPEG.cpp b/src/terralib/kernel/TeDecoderJPEG.cpp
old mode 100644
new mode 100755
index bc2ff95..58a33a8
--- a/src/terralib/kernel/TeDecoderJPEG.cpp
+++ b/src/terralib/kernel/TeDecoderJPEG.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,54 +20,72 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
+#include <TeDecoderJPEG.h>
+#include <TeAsciiFile.h>
+#include <TeUtils.h>
+#include <TeLibJpegWrapper.h>
+
+#include <fstream>
+using std::ifstream;
+using std::ofstream;
+
+TeDecoderJPEG::TeDecoderJPEG():
+	isModified_(false),
+	size_(0),
+	myData_(0)
+{	
+	params_.decoderIdentifier_ = "JPEG";	
+}
 
-#include "TeException.h"
-#include "TeDecoderJPEG.h"
-#include "TeAsciiFile.h"
-#include "TeUtils.h"
-#include <jpeg.h>
-#include <io.h>
 
-TeDecoderJPEG::TeDecoderJPEG (const TeRasterParams& par) : 
-	TeDecoderMemory()
+TeDecoderJPEG::TeDecoderJPEG (const TeRasterParams& par):
+	isModified_(false),
+	size_(0),
+	myData_(0)
 {	
 	params_ = par; 
-	// if openning an existent file, read its informations
+	params_.errorMessage_.clear();
+	// 'w' and 'r' modes suppose that the file already exists: try to read the basic information
 	if (params_.mode_ == 'w' || params_.mode_ == 'r')
 	{
+		ifstream dataFile(params_.fileName_.c_str());
+		if (!dataFile)
+		{
+			params_.errorMessage_ = "Fail to access the raster file:" + params_.fileName_;
+			return;
+		}
+		dataFile.close();
+		
 		int nb;
-		if (!Jpeg::ReadFileParams(params_.ncols_ , params_.nlines_ , nb , (char*)params_.fileName_.c_str()))
+		if (!Jpeg::ReadFileParams(params_.fileName_, params_.ncols_, params_.nlines_, nb))
+		{
+			params_.errorMessage_ = "Fail to read the parameters from the raster the file.";
 			return;
-
+		}
 		params_.nBands(nb);
 		params_.setDataType(TeUNSIGNEDCHAR);
-		params_.setPhotometric(TeRASTERMULTIBAND);
+		params_.setPhotometric(TeRasterParams::TeMultiBand);
 		params_.decoderIdentifier_ = "JPEG";
 		params_.blockWidth_ = params_.ncols_;
 		params_.blockHeight_ = params_.nlines_;
+		params_.interleaving_ = TeRasterParams::TePerPixel;
 		TeProjection* proj = new TeNoProjection();
 		params_.projection(proj);
 		delete proj;
 
-		// Try reading box from auxiliary file
-		string filePrefix = TeGetName(params_.fileName_.c_str());
-		string jgw = filePrefix+".jgw";
+		// Try reading navigation parameters from auxiliary file
+		string jgwFile = TeGetName(params_.fileName_.c_str()) +".jgw";
 		try
 		{
-			TeAsciiFile	pFile (jgw);
-			double dyj, dxi, x0, y0;
-
-			params_.resx_ = pFile.readFloat();
-			dyj = pFile.readFloat();		// ignored
-			dxi = pFile.readFloat();		// ignored
-			params_.resy_  = -1 * pFile.readFloat();
-			x0 = pFile.readFloat();
-			y0 = pFile.readFloat();
-
-			// IMPORTANT: we discard any rotation or translation defined in the
-			// .jgw file! It should be treated properly later
-			params_.topLeftResolutionSize(x0,y0,params_.resx_,params_.resy_,
-				                          params_.ncols_,params_.nlines_,true);
+			vector<double> jgw;
+			TeAsciiFile	pFile(jgwFile.c_str());
+			jgw.push_back(pFile.readFloat());
+			jgw.push_back(pFile.readFloat());
+			jgw.push_back(pFile.readFloat());
+			jgw.push_back(pFile.readFloat());
+			jgw.push_back(pFile.readFloat());
+			jgw.push_back(pFile.readFloat());
+			params_.setNavigationParameters(jgw);
 		}
 		catch (...)
 		{
@@ -78,38 +96,30 @@ TeDecoderJPEG::TeDecoderJPEG (const TeRasterParams& par) :
 	}
 }
 
-TeDecoderJPEG::~TeDecoderJPEG ()
+TeDecoderJPEG::~TeDecoderJPEG()
 {
-	if ( isModified_ && (params_.mode_ == 'w' || params_.mode_ == 'c') )	// save contents to disk
-	{
-		int nb = params_.nBands();
-		int nc = params_.fileName_.size();
-		char*  name = new char[nc+1];
-		strcpy(name,params_.fileName_.c_str());
-		int i = _access(params_.fileName_.c_str(),06);
-		i = _unlink(params_.fileName_.c_str());
-		Jpeg::WriteFile((unsigned char*)data_,params_.ncols_,params_.nlines_,nb,name);
-	}
-	TeDecoderMemory::clear();
+	clear();
 }
 
 
 bool
 TeDecoderJPEG::clear()
 {
-	if (data_ == 0)
+	size_ = 0;
+	if (myData_ == 0)
 	    return true;
-
 	if ( isModified_ && (params_.mode_ == 'w' || params_.mode_ == 'c') )	// save contents to disk
 	{
-		int nb = params_.nBands();
-		int nc = params_.fileName_.size();
-		char*  name = new char[nc+1];
-		strcpy(name,params_.fileName_.c_str());
-		Jpeg::WriteFile((unsigned char*)data_,params_.ncols_,params_.nlines_,nb,name);
-		isModified_ = 0;
+		ofstream dataFile(params_.fileName_.c_str());
+		if (dataFile)
+		{
+			dataFile.close();
+			Jpeg::CompressToFile(myData_, params_.ncols_, params_.nlines_, params_.nBands(), params_.fileName_);
+			isModified_ = false;
+		}
 	}
-	TeDecoderMemory::clear();
+	delete [] myData_;
+	myData_ = 0;
 	return true;
 }
 
@@ -117,68 +127,107 @@ TeDecoderJPEG::clear()
 void
 TeDecoderJPEG::init()
 {
-	params_.status_= TeNOTREADY;
-	int nb = params_.nBands();
-	if (nb != 1 && nb != 3)
-		return;
+	params_.status_= TeRasterParams::TeNotReady;
+	params_.interleaving_ = TeRasterParams::TePerPixel;
 
 	// try to allocate enough memory to hold the data
-	TeDecoderMemory::init();
-	if (params_.status_== TeNOTREADY)
+	if (size_ != params_.nlines_*params_.ncols_*params_.nBands())
+	{
+		size_ = params_.nlines_*params_.ncols_*params_.nBands();
+		if (myData_)
+			delete [] myData_;
+		myData_ = new unsigned char [size_];
+	}
+	if (!myData_)
 		return;
 
-	params_.status_= TeNOTREADY;
+	for (long i=0; i<size_; myData_[i]=static_cast<unsigned char>(params_.dummy_[0]),++i);
+
 	if (params_.mode_ == 'c')	// creating a new file
 	{
-		if (_access(params_.fileName_.c_str(),00) != -1) // remove existing file
+		int nb = params_.nBands();
+		if (nb != 1 && nb != 3)
 		{
-			if (_unlink(params_.fileName_.c_str()) == -1)
-				return;
-		}		
-		// write georeference file
-		string filePrefix = TeGetName (params_.fileName_.c_str());
-		string jgw = filePrefix+".jgw";
-
+			params_.errorMessage_ = "JPEG files can have only 1 or 3 bands.";
+			return;
+		}
+		ofstream dataFile(params_.fileName_.c_str());
+		if (!dataFile)
+		{
+			params_.errorMessage_ = "Fail to (re)create the raster the file:" + params_.fileName_;
+			return;
+		}
+		dataFile.close();
+		
+		// write navigation file
+		string jgw = TeGetName(params_.fileName_.c_str())+".jgw";
 		try {
-			TeAsciiFile jgwFile(jgw,"w+");
-			string line;
-			line = Te2String(params_.resx_) + "\n";
-			jgwFile.writeString(line);
-			line = "0.0\n";
-			jgwFile.writeString(line);
-			jgwFile.writeString(line);
-			line = Te2String(params_.resy_ * -1.) + "\n";
-			jgwFile.writeString(line);
-			line = Te2String(params_.box().x1_) + "\n";
-			jgwFile.writeString(line);
-			line = Te2String(params_.box().y2_) + "\n";
-			jgwFile.writeString(line);
+			TeAsciiFile jgwFile(jgw,"w");
+			vector<double> jgw;
+			params_.getNavigationParameters(jgw);
+			for (unsigned int nl=0; nl<6; ++nl)
+			{
+				string line;
+				line = Te2String(jgw[nl]) + "\n";
+				jgwFile.writeString(line);
+			}
 		}
 		catch(...)
 		{}
-		// write data
-		int nc = params_.fileName_.size();
-		char*  name = new char[nc+1];
-		strcpy(name,params_.fileName_.c_str());
-
-		if (!Jpeg::WriteFile((unsigned char*)data_,params_.ncols_,params_.nlines_,nb,name))
+		// write initial dummy  data
+		if (!Jpeg::CompressToFile(myData_, params_.ncols_, params_.nlines_, params_.nBands(), params_.fileName_))
 			return;
-		params_.status_ = TeREADYTOWRITE;
+		params_.status_ = TeRasterParams::TeReadyToWrite;
 	}
-	else if (params_.mode_ == 'w')
+	else if (params_.mode_ == 'w' || params_.mode_ == 'r')
 	{
-		int i = _access(params_.fileName_.c_str(),06);
-		if (i == -1)
+		ifstream dataFile(params_.fileName_.c_str());
+		if (!dataFile)
+		{
+			params_.errorMessage_ = "Fail to open the raster the file:" + params_.fileName_;
 			return;
-//		if (!Jpeg::ReadFile(params_.ncols_, params_.nlines_, params_.nBands(), (char*)params_.fileName_.c_str(), (unsigned char*) data_))
-//			return;
-		params_.status_ = TeREADYTOWRITE;
-		i = _access(params_.fileName_.c_str(),06);
-	}
-	else if (params_.mode_ == 'r')
-	{
-		if ((_access(params_.fileName_.c_str(),04) == -1) || !Jpeg::ReadFile(params_.ncols_, params_.nlines_, params_.nBands(), (char*)params_.fileName_.c_str(), (unsigned char*) data_))
+		}
+		dataFile.close();
+		
+		int nb;
+		if (!Jpeg::DecompressFile(params_.fileName_.c_str(), myData_, params_.ncols_, params_.nlines_, nb))
+		{
+			params_.errorMessage_ = "Fail to decompress JPEG file.";
 			return;
-		params_.status_ = TeREADYTOREAD;	
+		}
+		params_.nBands(nb);
+		if (params_.mode_ == 'w')
+			params_.status_ = TeRasterParams::TeReadyToWrite;
+		else
+			params_.status_ = TeRasterParams::TeReadyToRead;	
 	}
 }
+
+bool 
+TeDecoderJPEG::getElement (int col,int lin, double& val,int band)
+{
+	if (col < 0 || lin < 0 || col >= params_.ncols_ || lin >= params_.nlines_)
+		return false;
+	
+	int position = params_.nBands()*(params_.ncols_*lin+col)+band;
+	val = myData_[position];
+	return true;
+}
+
+bool 
+TeDecoderJPEG::setElement (int col, int lin, double val,int band)
+{
+	if (col < 0 || lin < 0 || col >= params_.ncols_ || lin >= params_.nlines_)
+		return false;
+	int position = params_.nBands()*(params_.ncols_*lin+col)+band;
+	myData_[position] = static_cast<unsigned char>(val);
+	isModified_ = true;
+	return true;
+}
+
+TeDecoderJPEGFactory::TeDecoderJPEGFactory(const string& name): 
+	TeDecoderFactory(name) 
+{
+	TeDecoderFactory::instanceName2Dec()["JPG"]  = "JPEG";	
+	TeDecoderFactory::instanceName2Dec()["JPEG"] = "JPEG";
+}
diff --git a/src/terralib/kernel/TeDecoderJPEG.h b/src/terralib/kernel/TeDecoderJPEG.h
old mode 100644
new mode 100755
index c3d1e26..0b8b9c1
--- a/src/terralib/kernel/TeDecoderJPEG.h
+++ b/src/terralib/kernel/TeDecoderJPEG.h
@@ -21,47 +21,60 @@ indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
 /*! \file TeDecoderJPEG.h
-    This file deals with decoding of raster structures in JPEG format
+    \brief This file deals with decoding of raster structures in JPEG format
 */
 #ifndef  __TERRALIB_INTERNAL_DECODERJPEG_H
 #define  __TERRALIB_INTERNAL_DECODERJPEG_H
 
-#include "TeDecoderMemory.h"
+#include "TeDecoder.h"
 
-//! Implements a decoder for rasters in JPEG format
-/*
-	In order to be accessed a raster in JPEG format is decompressed
-	in memory and its pixels acessed directly.
+//! Implements a decoder for images in JPEG format
+/*  
+	This implementation compress/decompress the entire JPEG image in memory and  
+	access its pixels acessed directly. \par
+	The default file extensions associated to this decoder are ".jpg" and ".jpeg".
 */
-class TeDecoderJPEG : public TeDecoderMemory
+class TL_DLL TeDecoderJPEG: public TeDecoder
 {
 public:
 	//! Empty constructor
-	TeDecoderJPEG () : TeDecoderMemory() 
-	{	params_.decoderIdentifier_ = "JPEG";	}
+	TeDecoderJPEG();
 
 	//! Constructor from some parameters
-	TeDecoderJPEG (const TeRasterParams& par);
+	TeDecoderJPEG(const TeRasterParams& par);
 
 	//! Destructor
-	~TeDecoderJPEG ();
+	~TeDecoderJPEG();
 
+	//! Initializes the internal structures
 	void init();
 
+	//! Releases the internal structures
 	bool clear();
 
+	//! Writes an element
+	bool setElement(int col,int lin, double val, int band=0);
+
+	//! Reads an element
+	bool getElement(int col,int lin, double &val,int band=0);
+
+private:
+	bool isModified_;
+	long size_;
+	unsigned char* myData_;
 };
 
 //! Implements a factory to build decoders to JPEG raster
-class TeDecoderJPEGFactory : public TeDecoderFactory
+class TL_DLL TeDecoderJPEGFactory : public TeDecoderFactory
 {
 public:
 
-	TeDecoderJPEGFactory(const string& name) : TeDecoderFactory(name) {}
+	//! Constructor for the factory
+	TeDecoderJPEGFactory(const string& name);
 
-	virtual TeDecoder* build (const TeRasterParams& arg)
+	//! Built the object
+	TeDecoder* build (const TeRasterParams& arg)
 	{  return new TeDecoderJPEG(arg); }
-
 };
 
 #endif
diff --git a/src/terralib/kernel/TeDecoderMemory.cpp b/src/terralib/kernel/TeDecoderMemory.cpp
old mode 100644
new mode 100755
index 931eeac..3ef7f2f
--- a/src/terralib/kernel/TeDecoderMemory.cpp
+++ b/src/terralib/kernel/TeDecoderMemory.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright  2001-2004 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -22,46 +22,89 @@ of this library and its documentation.
 *************************************************************************************/
 
 #include "TeDecoderMemory.h"
+#include "TeException.h"
+
+#include <assert.h>
+#include <cstring>
+
+TeDecoderMemory::TeDecoderMemory(): 
+	nelems_(0),
+	size_(0),
+	getelement_ptr_(0),
+	setelement_ptr_(0),	
+	data_TeUNSIGNEDCHAR_(0),  
+	data_TeCHAR_(0),  
+	data_TeUNSIGNEDSHORT_(0),  
+	data_TeSHORT_(0),  
+	data_TeINTEGER_(0), 
+	data_TeUNSIGNEDLONG_(0), 
+	data_TeLONG_(0),  
+	data_TeFLOAT_(0),
+	data_TeDOUBLE_(0)
+{
+	 params_.decoderIdentifier_ = "MEM";
+}
+
+TeDecoderMemory::TeDecoderMemory(const TeRasterParams& par): 
+	nelems_(0),
+	size_(0),
+	getelement_ptr_(0),
+	setelement_ptr_(0),	
+	data_TeUNSIGNEDCHAR_(0),  
+	data_TeCHAR_(0),  
+	data_TeUNSIGNEDSHORT_(0),  
+	data_TeSHORT_(0),  
+	data_TeINTEGER_(0), 
+	data_TeUNSIGNEDLONG_(0), 
+	data_TeLONG_(0),  
+	data_TeFLOAT_(0),
+	data_TeDOUBLE_(0)
+{	
+	params_ = par; 
+	params_.decoderIdentifier_ = "MEM"; 
+}
 
 TeDecoderMemory::~TeDecoderMemory ()
 {
-	if (data_ != 0)
-		clear();
+	clear();
 }
 
 void*	
-TeDecoderMemory::data (int band)
+TeDecoderMemory::data(int band)
 {
-	if (band==0)
-		return data_;
-	if (params_.interleaving_ != TePerBand)
+	// this is possible when band interleaved data
+	if (params_.interleaving_ != TeRasterParams::TePerBand)
 		return 0;
 
 	void* pt = 0;
-	switch (params_.dataType_[band]) {
+	switch (params_.dataType_[band]) 
+	{
 	case TeUNSIGNEDCHAR:
-		pt =  reinterpret_cast<unsigned char*>(data_) + (params_.ncols_ * params_.nlines_*band);
+		pt =  (data_TeUNSIGNEDCHAR_) + (params_.ncols_ * params_.nlines_*band);
 		break;
-	case TeCHAR :
-		pt =  reinterpret_cast<char*>(data_) + (params_.ncols_ * params_.nlines_*band);
+	case TeCHAR:
+		pt =  (data_TeCHAR_) + (params_.ncols_ * params_.nlines_*band);
 		break;
 	case TeUNSIGNEDSHORT:
-		pt = reinterpret_cast<unsigned short*>(data_) + (params_.ncols_ * params_.nlines_*band);
+		pt = (data_TeUNSIGNEDSHORT_) + (params_.ncols_ * params_.nlines_*band);
 		break;
 	case (TeSHORT):
-		pt = reinterpret_cast<short*>(data_) + (params_.ncols_ * params_.nlines_*band);
+		pt = (data_TeSHORT_) + (params_.ncols_ * params_.nlines_*band);
 		break;
+    case (TeINTEGER):
+        pt = (data_TeINTEGER_) + (params_.ncols_ * params_.nlines_*band);
+        break;                
 	case (TeUNSIGNEDLONG):
-		pt = reinterpret_cast<unsigned long*>(data_) + (params_.ncols_ * params_.nlines_*band);
+		pt = (data_TeUNSIGNEDLONG_) + (params_.ncols_ * params_.nlines_*band);
 		break;
 	case (TeLONG):
-		pt = reinterpret_cast<long*>(data_) + (params_.ncols_ * params_.nlines_*band);
+		pt = (data_TeLONG_) + (params_.ncols_ * params_.nlines_*band);
 		break;
 	case (TeFLOAT):
-		pt = reinterpret_cast<float*>(data_) + (params_.ncols_ * params_.nlines_*band);
+		pt = (data_TeFLOAT_) + (params_.ncols_ * params_.nlines_*band);
 		break;
 	case (TeDOUBLE):
-		pt = reinterpret_cast<double*>(data_) + (params_.ncols_ * params_.nlines_*band);
+		pt = (data_TeDOUBLE_) + (params_.ncols_ * params_.nlines_*band);
 		break;
 	default:
 		break;
@@ -71,269 +114,478 @@ TeDecoderMemory::data (int band)
 
 void 
 TeDecoderMemory::init()
-{
-	params_.status_= TeNOTREADY;
-	if ( !data_ ||	nelems_ != (params_.ncols_ * params_.nlines_ * params_.nBands()))
+{	
+	params_.errorMessage_.clear();
+	params_.status_= TeRasterParams::TeNotReady;
+	nelems_ = params_.nlines_*params_.ncols_*params_.nBands();
+	if (!allocateMemory() || !resetMemory())
 	{
-		clear();
-		nelems_ = params_.ncols_ * params_.nlines_ * params_.nBands();
-		if (!allocateMemory() || !resetMemory())
-			return;
+		params_.errorMessage_ = "Fail to allocate enough memory to hold the raster.";
+		return;
 	}
+	updateFuncPtr();
 
-	if (params_.mode_ == 'c' || params_.mode_ == 'w')	// creating a new file
-	{
-		if (resetMemory())
-			params_.status_ = TeREADYTOWRITE;
-	}
-	else if (params_.mode_ == 'r')
-		params_.status_ = TeREADYTOREAD;		
+	// this decoder always grant an read/write access
+	params_.status_ = TeRasterParams::TeReadyToWrite;
 }
 
-
 bool 
-TeDecoderMemory::allocateMemory()
+TeDecoderMemory::getElement (int col,int lin, double& val,int band)
 {
-	// Allocate necessary memory
-	switch (params_.dataType_[0]) {
-	case (TeUNSIGNEDCHAR):
-		data_ = new unsigned char [nelems_];
-		if (!data_)
-			return false;
-		break;
-	case (TeCHAR) :
-		data_ = new char [nelems_];
-		if (!data_)
-			return false;
-		break;
-	case (TeUNSIGNEDSHORT):
-		data_ = new unsigned short [nelems_];
-		if (!data_)
-			return false;
-		break;
-	case (TeSHORT):
-		data_ = new short [nelems_];
-		if (!data_)
-			return false;
+	unsigned long position = 0;
+	switch (params_.interleaving_)
+	{
+	case TeRasterParams::TePerPixel:
+		position = params_.nBands()*(params_.ncols_*lin+col)+band;
 		break;
-	case (TeUNSIGNEDLONG):
-		data_ = new unsigned long [nelems_];
-		if (!data_)
-			return false;
+	case TeRasterParams::TePerLine:
+		position = (params_.nBands()*params_.ncols_*lin)+band*params_.ncols_+col;
 		break;
-	case (TeLONG):
-		data_ = new long [nelems_];
-		if (!data_)
-			return false;
+	case TeRasterParams::TePerBand:
+		position = band*(params_.ncols_*params_.nlines_)+(params_.ncols_*lin+col);
 		break;
-	case (TeFLOAT):
-		data_ = new float [nelems_];
-		if (!data_)
-			return false;
+	}
+	assert(position < nelems_);
+	(this->*( getelement_ptr_))(position,val);
+	return true;
+}
+
+bool 
+TeDecoderMemory::setElement (int col, int lin, double val,int band)
+{
+	unsigned long position = 0;
+	switch (params_.interleaving_)
+	{
+	case TeRasterParams::TePerPixel:
+		position = params_.nBands()*(params_.ncols_*lin+col)+band;
 		break;
-	case (TeDOUBLE):
-		data_ = new double [nelems_];
-		if (!data_)
-			return false;
+	case TeRasterParams::TePerLine:
+		position = (params_.nBands()*params_.ncols_*lin)+band*params_.ncols_+col;
 		break;
-	default:
+	case TeRasterParams::TePerBand:
+		position = band*(params_.ncols_*params_.nlines_)+(params_.ncols_*lin+col);
 		break;
 	}
-	if (data_)
-		return true;
-	else 
-		return false;
+	assert(position < nelems_);
+	(this->*( setelement_ptr_))(position,val);
+	return true;
 }
 
+void TeDecoderMemory::updateFuncPtr()
+{
+	if ( getelement_ptr_ != 0 ) 
+		getelement_ptr_ = 0;
+
+	if ( setelement_ptr_ != 0 ) 
+		setelement_ptr_ = 0;
+
+	switch ( params_.dataType_[0] ) 
+	{
+		case (TeCHAR) :
+		{
+			getelement_ptr_ = &TeDecoderMemory::getElement_TeCHAR;
+			setelement_ptr_ = &TeDecoderMemory::setElement_TeCHAR;
+			break;
+		}
+		case (TeUNSIGNEDSHORT):
+		{
+			getelement_ptr_ = &TeDecoderMemory::getElement_TeUNSIGNEDSHORT;
+			setelement_ptr_ = &TeDecoderMemory::setElement_TeUNSIGNEDSHORT;
+			break;
+		}
+		case (TeSHORT):
+		{
+			getelement_ptr_ = &TeDecoderMemory::getElement_TeSHORT;
+			setelement_ptr_ = &TeDecoderMemory::setElement_TeSHORT;
+			break;
+		}
+		case (TeINTEGER):
+		{
+			getelement_ptr_ = &TeDecoderMemory::getElement_TeINTEGER;
+			setelement_ptr_ = &TeDecoderMemory::setElement_TeINTEGER;
+			break;
+		}
+		case (TeUNSIGNEDLONG):
+		{
+			getelement_ptr_ = &TeDecoderMemory::getElement_TeUNSIGNEDLONG;
+			setelement_ptr_ = &TeDecoderMemory::setElement_TeUNSIGNEDLONG;
+			break;
+		}
+		case (TeLONG):
+		{
+			getelement_ptr_ = &TeDecoderMemory::getElement_TeLONG;
+			setelement_ptr_ = &TeDecoderMemory::setElement_TeLONG;
+			break;
+		}
+		case (TeFLOAT):
+		{
+			getelement_ptr_ = &TeDecoderMemory::getElement_TeFLOAT;
+			setelement_ptr_ = &TeDecoderMemory::setElement_TeFLOAT;
+			break;
+		}
+		case (TeDOUBLE):
+		{
+			getelement_ptr_ = &TeDecoderMemory::getElement_TeDOUBLE;
+			setelement_ptr_ = &TeDecoderMemory::setElement_TeDOUBLE;
+			break;
+		}
+		default:
+		{
+			getelement_ptr_ = &TeDecoderMemory::getElement_TeUNSIGNEDCHAR;
+			setelement_ptr_ = &TeDecoderMemory::setElement_TeUNSIGNEDCHAR;
+			break;
+		}				
+	}
+}
 
 bool 
-TeDecoderMemory::resetMemory()
+TeDecoderMemory::allocateMemory()
 {
-	if (!data_)
-		return false;
+	long nelems = params_.nlines_*params_.ncols_*params_.nBands();
 
-	int i;
-	switch (params_.dataType_[0]) {
+	// allocate necessary memory
+	switch (params_.dataType_[0]) 
+	{
 	case (TeUNSIGNEDCHAR):
-		for(i=0; i<nelems_; reinterpret_cast<unsigned char*>(data_)[i]=static_cast<unsigned char>(params_.dummy_[0]),++i);
+		if ((nelems*sizeof(unsigned char)) == (nelems_*sizeof(unsigned char)) && data_TeUNSIGNEDCHAR_)
+			return true;
+        data_TeUNSIGNEDCHAR_ = new unsigned char [nelems_];
+		if (!data_TeUNSIGNEDCHAR_)
+			return false;
 		size_ = nelems_ * sizeof(unsigned char);
 		break;
-	case (TeCHAR) :
-		for(i=0; i<nelems_; reinterpret_cast<char*>(data_)[i]=static_cast<char>(params_.dummy_[0]),++i);
+
+	case (TeCHAR):
+		if ((nelems*sizeof(char)) == (nelems_*sizeof(char)) && data_TeCHAR_)
+			return true;
+		data_TeCHAR_ = new char [nelems_];
+		if (!data_TeCHAR_)
+			return false;
 		size_ = nelems_ * sizeof(char);
 		break;
+
 	case (TeUNSIGNEDSHORT):
-		for(i=0; i<nelems_; reinterpret_cast<unsigned short*>(data_)[i]=static_cast<unsigned short>(params_.dummy_[0]),++i);
+		if ((nelems*sizeof(unsigned short)) == (nelems_*sizeof(unsigned short)) && data_TeUNSIGNEDSHORT_)
+			return true;
+		data_TeUNSIGNEDSHORT_ = new unsigned short [nelems_];
+		if (!data_TeUNSIGNEDSHORT_)
+			return false;
 		size_ = nelems_ * sizeof(unsigned short);
 		break;
+
 	case (TeSHORT):
-		for(i=0; i<nelems_; reinterpret_cast<short*>(data_)[i]=static_cast<short>(params_.dummy_[0]),++i);
+		if ((nelems*sizeof( short)) == (nelems_*sizeof(short)) && data_TeSHORT_)
+			return true;
+		data_TeSHORT_ = new short [nelems_];
+		if (!data_TeSHORT_)
+			return false;
 		size_ = nelems_ * sizeof(short);
 		break;
+
+    case (TeINTEGER):
+ 		if ((nelems*sizeof(int)) == (nelems_*sizeof(int)) && data_TeINTEGER_)
+			return true;
+       data_TeINTEGER_ = new int [nelems_];
+        if (!data_TeINTEGER_)
+			return false;
+        size_ = nelems_ * sizeof(int);
+        break;
+
 	case (TeUNSIGNEDLONG):
-		for(i=0; i<nelems_; reinterpret_cast<unsigned long*>(data_)[i]=static_cast<unsigned long>(params_.dummy_[0]),++i);
+		if ((nelems*sizeof(unsigned long)) == (nelems_*sizeof(unsigned long)) && data_TeUNSIGNEDLONG_)
+			return true;
+		data_TeUNSIGNEDLONG_ = new unsigned long [nelems_];
+		if (!data_TeUNSIGNEDLONG_)
+			return false;
 		size_ = nelems_ * sizeof(unsigned long);
 		break;
+
 	case (TeLONG):
-		for(i=0; i<nelems_; reinterpret_cast<long*>(data_)[i]=static_cast<long>(params_.dummy_[0]),++i);
+		if ((nelems*sizeof(long)) == (nelems_*sizeof(long)) && data_TeLONG_)
+			return true;
+		data_TeLONG_ = new long [nelems_];
+		if (!data_TeLONG_)
+			return false;
 		size_ = nelems_ * sizeof(long);
 		break;
+
 	case (TeFLOAT):
-		for(i=0; i<nelems_; reinterpret_cast<float*>(data_)[i]=static_cast<float>(params_.dummy_[0]),++i);
+		if ((nelems*sizeof(float)) == (nelems_*sizeof(float)) && data_TeFLOAT_)
+			return true;
+		data_TeFLOAT_ = new float [nelems_];
+		if (!data_TeFLOAT_)
+			return false;
 		size_ = nelems_ * sizeof(float);
 		break;
+
 	case (TeDOUBLE):
-		for(i=0; i<nelems_; reinterpret_cast<double*>(data_)[i]=params_.dummy_[0],++i);
+		if ((nelems*sizeof(double)) == (nelems_*sizeof(double)) && data_TeDOUBLE_)
+			return true;
+		data_TeDOUBLE_ = new double [nelems_];
+		if (!data_TeDOUBLE_)
+			return false;
 		size_ = nelems_ * sizeof(double);
 		break;
+
 	default:
-		break;
+		return false;
 	}
 	return true;
 }
 
-bool
-TeDecoderMemory::clear()
+
+bool 
+TeDecoderMemory::resetMemory()
 {
-	if (data_ == 0)
-	    return true;
-	switch (params_.dataType_[0])
+	unsigned int i;
+	switch (params_.dataType_[0]) 
 	{
-	case (TeUNSIGNEDCHAR):
-		delete [](unsigned char*)data_;
+	case (TeBIT):
+	case (TeCHAR):
+		if (!data_TeCHAR_)
+			return false;
+		for(i=0; i<nelems_; data_TeCHAR_[i]=static_cast<char>(params_.dummy_[0]),++i);
 		break;
-	case (TeCHAR) :
-		delete (char*)data_;
+
+	case (TeUNSIGNEDCHAR):
+		if (!data_TeUNSIGNEDCHAR_)
+			return false;
+		for(i=0; i<nelems_; data_TeUNSIGNEDCHAR_[i]=static_cast<unsigned char>(params_.dummy_[0]),++i);
 		break;
+
 	case (TeUNSIGNEDSHORT):
-		delete [](unsigned short*)data_;
+		if (!data_TeUNSIGNEDSHORT_)
+			return false;
+		for(i=0; i<nelems_; data_TeUNSIGNEDSHORT_[i]=static_cast<unsigned short>(params_.dummy_[0]),++i);
 		break;
+
 	case (TeSHORT):
-		delete (short*) data_;
+		if (!data_TeSHORT_)
+			return false;
+		for(i=0; i<nelems_; data_TeSHORT_[i]=static_cast<short>(params_.dummy_[0]),++i);
+		break;
+
+	case (TeINTEGER):
+		if (!data_TeINTEGER_)
+			return false;
+		for(i=0; i<nelems_; data_TeINTEGER_[i]=static_cast<int>(params_.dummy_[0]),++i);
 		break;
+
 	case (TeUNSIGNEDLONG):
-		delete [](unsigned long*)data_;
+		if (!data_TeUNSIGNEDLONG_)
+			return false;
+		for(i=0; i<nelems_; data_TeUNSIGNEDLONG_[i]=static_cast<unsigned long>(params_.dummy_[0]),++i);
 		break;
+
 	case (TeLONG):
-		delete [](long*) data_;
+		if (!data_TeLONG_)
+			return false;
+		for(i=0; i<nelems_; data_TeLONG_[i]=static_cast<long>(params_.dummy_[0]),++i);
 		break;
+
 	case (TeFLOAT):
-		delete [](float*)data_;
+		if (!data_TeFLOAT_)
+			return false;
+		for(i=0; i<nelems_; data_TeFLOAT_[i]=static_cast<float>(params_.dummy_[0]),++i);
 		break;
+
 	case (TeDOUBLE):
-		delete [](double*) data_;
+		if (!data_TeDOUBLE_)
+			return false;
+		for(i=0; i<nelems_; data_TeDOUBLE_[i]=static_cast<double>(params_.dummy_[0]),++i);
 		break;
+
 	default:
-		break;
-	}
-	data_ = 0;
-	params_.status_ = TeNOTREADY;
+		break;	
+}
+
 	return true;
 }
 
-bool 
-TeDecoderMemory::getElement (int col,int lin, double& val,int band)
+bool
+TeDecoderMemory::clear()
 {
-	unsigned int position = 0;
-
-	switch (params_.interleaving_)
+	if (data_TeUNSIGNEDCHAR_)
 	{
-	case TePerPixel:
-		position = params_.nBands()*(params_.ncols_*lin+col)+band;
-		break;
-	case TePerLine:
-		position = (params_.nBands()*params_.ncols_*lin)+band*params_.ncols_+col;
-		break;
-	case TePerBand:
-		position = band*(params_.ncols_*params_.nlines_)+(params_.ncols_*lin+col);
-		break;
+		delete [] data_TeUNSIGNEDCHAR_;
+		data_TeUNSIGNEDCHAR_ = 0;
+		return true;
 	}
-	switch (params_.dataType_[0]) 
+	if (data_TeCHAR_)
 	{
-	case (TeUNSIGNEDCHAR):
-		val = reinterpret_cast<unsigned char*>(data_)[position];
-		break;
-	case (TeCHAR) :
-		val = reinterpret_cast<char*>(data_)[position];
-		break;
-	case (TeUNSIGNEDSHORT):
-		val = reinterpret_cast<unsigned short*>(data_)[position];
-		break;
-	case (TeSHORT):
-		val = reinterpret_cast<short*>(data_)[position];
-		break;
-	case (TeUNSIGNEDLONG):
-		val = reinterpret_cast<unsigned long*>(data_)[position];
-		break;
-	case (TeLONG):
-		val = reinterpret_cast<long*>(data_)[position];
-		break;
-	case (TeFLOAT):
-		val = reinterpret_cast<float*>(data_)[position];
-		break;
-	case (TeDOUBLE):
-		val = reinterpret_cast<double*>(data_)[position];
-		break;
-	default:
-		break;
+		delete [] data_TeCHAR_; 
+		data_TeCHAR_ = 0;
+		return true;
+	}
+	if (data_TeUNSIGNEDSHORT_)
+	{
+		delete [] data_TeUNSIGNEDSHORT_;  
+		data_TeUNSIGNEDSHORT_ = 0;
+		return true;
+	}
+	if (data_TeSHORT_)
+	{
+		delete [] data_TeSHORT_;  
+		data_TeSHORT_ = 0;
+		return true;
+	}
+	if (data_TeINTEGER_) 
+	{
+		delete [] data_TeINTEGER_;  
+		data_TeINTEGER_ = 0;
+		return true;
+	}
+	if (data_TeUNSIGNEDLONG_)
+	{
+		delete [] data_TeUNSIGNEDLONG_;  
+		data_TeUNSIGNEDLONG_ = 0;
+		return true;
+	}
+	if (data_TeLONG_)
+	{
+		delete [] data_TeLONG_;  
+		data_TeLONG_ = 0;
+		return true;
+	}
+	if (data_TeFLOAT_)
+	{
+		delete [] data_TeFLOAT_;
+		data_TeFLOAT_ = 0;
+		return true;
+	}
+	if (data_TeDOUBLE_)
+	{
+		delete [] data_TeDOUBLE_;
+		data_TeDOUBLE_ = 0;
+		return true;
 	}
+	params_.status_ = TeRasterParams::TeNotReady;
 	return true;
 }
 
-bool 
-TeDecoderMemory::setElement (int col, int lin, double val,int band)
+
+inline void TeDecoderMemory::setElement_TeUNSIGNEDCHAR(const long& pos, const double& val)
 {
-	unsigned int position = 0;
-	switch (params_.interleaving_)
-	{
-	case TePerPixel:
-		position = params_.nBands()*(params_.ncols_*lin+col)+band;
-		break;
-	case TePerLine:
-		position = (params_.nBands()*params_.ncols_*lin)+band*params_.ncols_+col;
-		break;
-	case TePerBand:
-		position = band*(params_.ncols_*params_.nlines_)+(params_.ncols_*lin+col);
-		break;
-	}
+	assert(data_TeUNSIGNEDCHAR_ != 0 );
+	data_TeUNSIGNEDCHAR_[pos] = (unsigned char)val;
+}
 
-	switch (params_.dataType_[0]) 
-	{
-	case (TeUNSIGNEDCHAR):
-		reinterpret_cast<unsigned char*>(data_)[position] = static_cast<unsigned char>(val);
-		break;
-	
-	case (TeCHAR) :
-		reinterpret_cast<char*>(data_)[position] = static_cast<char>(val);
-		break;
-	
-	case (TeUNSIGNEDSHORT):
-		reinterpret_cast<unsigned short*>(data_)[position] = static_cast<unsigned short>(val);
-		break;
-	
-	case (TeSHORT):
-		reinterpret_cast<short*>(data_)[position] = static_cast<short>(val);
-		break;
-	
-	case (TeUNSIGNEDLONG):
-		reinterpret_cast<unsigned long*>(data_)[position] = static_cast<unsigned long>(val);
-		break;
-	
-	case (TeLONG):
-		reinterpret_cast<long*>(data_)[position] = static_cast<long>(val);
-		break;
-	
-	case (TeFLOAT):
-		reinterpret_cast<float*>(data_)[position] = static_cast<float>(val);
-		break;
-	
-	case (TeDOUBLE):
-		reinterpret_cast<double*>(data_)[position] = val;
 
-	default:
-		break;
-	}
-	isModified_ = true;
-	return true;
+inline void TeDecoderMemory::setElement_TeCHAR(const long& pos, const double& val)
+{
+	assert(data_TeCHAR_ != 0 );
+	data_TeCHAR_[pos] = (char)val;
+}
+
+
+inline void TeDecoderMemory::setElement_TeUNSIGNEDSHORT(const long& pos, const double& val)
+{
+	assert(data_TeUNSIGNEDSHORT_ != 0 );
+	data_TeUNSIGNEDSHORT_[pos] = (unsigned short)val;
+}
+
+
+inline void TeDecoderMemory::setElement_TeSHORT(const long& pos, const double& val)
+{
+	assert(data_TeSHORT_ != 0 );
+	data_TeSHORT_[pos] = (short)val;
+}
+
+
+inline void TeDecoderMemory::setElement_TeINTEGER(const long& pos, const double& val)
+{
+	assert(data_TeINTEGER_ != 0 );
+	data_TeINTEGER_[pos] = (int)val;
+}
+
+
+inline void TeDecoderMemory::setElement_TeUNSIGNEDLONG(const long& pos, const double& val)
+{
+	assert(data_TeUNSIGNEDLONG_ != 0 );
+	data_TeUNSIGNEDLONG_[pos] = (unsigned long)val;
+}
+
+
+inline void TeDecoderMemory::setElement_TeLONG(const long& pos, const double& val)
+{
+	assert(data_TeLONG_ != 0 );
+	data_TeLONG_[pos] = (long)val;
+}
+
+
+inline void TeDecoderMemory::setElement_TeFLOAT(const long& pos, const double& val)
+{
+	assert(data_TeFLOAT_ != 0 );
+	data_TeFLOAT_[pos] = (float)val;
+}
+
+
+inline void TeDecoderMemory::setElement_TeDOUBLE(const long& pos, const double& val)
+{
+	assert(data_TeDOUBLE_ != 0 );
+	data_TeDOUBLE_[pos] = val;
+}
+
+
+inline void TeDecoderMemory::getElement_TeUNSIGNEDCHAR(const long& pos, double& val)
+{
+	assert(data_TeUNSIGNEDCHAR_ != 0 );
+	val = (double)data_TeUNSIGNEDCHAR_[pos];
+}
+
+
+inline void TeDecoderMemory::getElement_TeCHAR(const long& pos, double& val)
+{
+	assert(data_TeCHAR_ != 0 );
+	val = (double)data_TeCHAR_[pos];
+}
+
+
+inline void TeDecoderMemory::getElement_TeUNSIGNEDSHORT(const long& pos, double& val)
+{
+	assert(data_TeUNSIGNEDSHORT_ != 0 );
+	val = (double)data_TeUNSIGNEDSHORT_[pos];
+}
+
+
+inline void TeDecoderMemory::getElement_TeSHORT(const long& pos, double& val)
+{
+	assert(data_TeSHORT_ != 0 );
+	val = (double)data_TeSHORT_[pos];
+}
+
+
+inline void TeDecoderMemory::getElement_TeINTEGER(const long& pos, double& val)
+{
+	assert(data_TeINTEGER_ != 0 );
+	val = (double)data_TeINTEGER_[pos];
+}
+
+
+inline void TeDecoderMemory::getElement_TeUNSIGNEDLONG(const long& pos, double& val)
+{
+	assert(data_TeUNSIGNEDLONG_ != 0 );
+	val = (double)data_TeUNSIGNEDLONG_[pos];
+}
+
+
+inline void TeDecoderMemory::getElement_TeLONG(const long& pos,double& val)
+{
+	assert(data_TeLONG_ != 0 );
+	val = (double)data_TeLONG_[pos];
+}
+
+
+inline void TeDecoderMemory::getElement_TeFLOAT(const long& pos, double& val)
+{
+	assert(data_TeFLOAT_ != 0 );
+	val = (double)data_TeFLOAT_[pos];
+}
+
+
+inline void TeDecoderMemory::getElement_TeDOUBLE(const long& pos, double& val)
+{
+	assert(data_TeDOUBLE_ != 0 );
+	val = (double)data_TeDOUBLE_[pos];
 }
 
diff --git a/src/terralib/kernel/TeDecoderMemory.h b/src/terralib/kernel/TeDecoderMemory.h
old mode 100644
new mode 100755
index cb981fc..25c9523
--- a/src/terralib/kernel/TeDecoderMemory.h
+++ b/src/terralib/kernel/TeDecoderMemory.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -21,69 +21,258 @@ indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
 /*! \file TeDecoderMemory.h
-    This file deals with decoding of raster structures as a mulitdimensional matrix in memory
+    \brief This file deals with decoding of raster structures as a mulitdimensional matrix in memory.
 */
 #ifndef  __TERRALIB_INTERNAL_DECODERMEMORY_H
 #define  __TERRALIB_INTERNAL_DECODERMEMORY_H
 
-#include <TeDecoder.h>
+#include "TeDecoder.h"
 
 //! Implements a decoder to a raster stored as a as a mulitdimensional matrix in memory
-class TeDecoderMemory : public TeDecoder
+/*
+	This classes tries to allocate the matrix in the memory RAM. No strategies or policies
+	to allocate huge matrices are applied. It also doesn't support multiple bands with different types.
+	For overcome this limitations use the class TeDecoderSmartMem.
+	\sa TeDecoderSmartMem
+*/
+class TL_DLL TeDecoderMemory : public TeDecoder
 {
-	bool allocateMemory();
-	bool resetMemory();
-
 public:
-
 	//! Empty constructor
-	TeDecoderMemory ( ) : 
-		data_(0), 
-		isModified_(false) 
-		{ params_.decoderIdentifier_ = "MEM";};
+	TeDecoderMemory();
 
 	//! Constructor from parameters
-	TeDecoderMemory ( const TeRasterParams& par ) : 
-		data_(0),
-		isModified_(false)
-	{	
-		params_ = par; 
-		params_.decoderIdentifier_ = "MEM"; 
-	};
+	TeDecoderMemory (const TeRasterParams& par);
 
 	//! Destructor
-	virtual ~TeDecoderMemory ();
+	~TeDecoderMemory ();
 
+	//! Writes an element
 	bool setElement (int col,int lin, double val, int band=0);
-	bool getElement (int col,int lin, double &val,int band=0);
 
-	//! Returns  the pointer to the matrix structure in memory
-	void* data () { return data_; }
+	//! Reads an element
+	bool getElement (int col,int lin, double &val,int band=0);
 
-	//! Retuns a ponter to a given band
+	//! Retuns a pointer to a given band
+	/*
+		\note This method is applicable only when band interleaved organization
+	*/
 	void* data (int band=0);
 
-	virtual void	init	();
-	virtual bool	clear	();
+	//! Initalizes the internal structures
+	void init();
+
+	//! Releases the internal structures
+	bool clear();
+
+	//! Allocates the necessary memory
+	bool allocateMemory();
+
+	//! Deallocates the used memory
+	bool resetMemory();
+
+private:
+
+	unsigned int nelems_;
+	unsigned int size_;
+
+	//! Type definition for the getElement function pointer      
+	typedef void (TeDecoderMemory::*GetEleFunctPtrT)( const long& pos, double& val );
+
+	//! Type definition for the setElement function pointer     
+	typedef void (TeDecoderMemory::*SetEleFunctPtrT)( const long& pos, const double& val );
+
+	//! A pointer to the current getElement method following the current data type
+	GetEleFunctPtrT getelement_ptr_;
+
+	//! A pointer to the current setElement method following the current data
+	SetEleFunctPtrT setelement_ptr_;
+
+	//! A casted pointer to the current data
+	unsigned char* data_TeUNSIGNEDCHAR_;  
+
+	//! A casted pointer to the current data
+	char* data_TeCHAR_;  
+
+	//! A casted pointer to the current data
+	unsigned short* data_TeUNSIGNEDSHORT_;  
+
+	//! A casted pointer to the current data
+	short* data_TeSHORT_;  
+
+	//! A casted pointer to the current data
+	int* data_TeINTEGER_;  
+
+	//! A casted pointer to the current data
+	unsigned long* data_TeUNSIGNEDLONG_;  
+
+	//! A casted pointer to the current data
+	long* data_TeLONG_;  
+
+	//! A casted pointer to the current data
+	float* data_TeFLOAT_;
+
+	//! A casted pointer to the current data
+	double* data_TeDOUBLE_;  
+
+	//! Update the function pointer using the current raster parameters   
+	void updateFuncPtr();  
+
+	/*! \brief Method overload.
+		\param line Line.
+		\param col Column.
+		\param band Band.
+		\param val Pixel value.
+	*/      
+	inline void setElement_TeUNSIGNEDCHAR( const long& pos, const double& val );
+
+	/*! \brief Method overload.
+		\param line Line.
+		\param col Column.
+		\param band Band.
+		\param val Pixel value.
+	*/   
+	inline void setElement_TeCHAR( const long& pos, const double& val );  
+
+	/*! \brief Method overload.
+		\param line Line.
+		\param col Column.
+		\param band Band.
+		\param val Pixel value.
+	*/   
+	inline void setElement_TeUNSIGNEDSHORT( const long& pos, const double& val );
+
+	/*! \brief Method overload.
+		\param line Line.
+		\param col Column.
+		\param band Band.
+		\param val Pixel value.
+	*/   
+	inline void setElement_TeSHORT( const long& pos, const double& val );
+
+	/*! \brief Method overload.
+		\param line Line.
+		\param col Column.
+		\param band Band.
+		\param val Pixel value.
+	*/   
+	inline void setElement_TeINTEGER( const long& pos, const double& val );
+
+	/*! \brief Method overload.
+		\param line Line.
+		\param col Column.
+		\param band Band.
+		\param val Pixel value.
+	*/   
+	inline void setElement_TeUNSIGNEDLONG( const long& pos, const double& val );
+
+	/*! \brief Method overload.
+		\param line Line.
+		\param col Column.
+		\param band Band.
+		\param val Pixel value.
+	*/      
+	inline void setElement_TeLONG( const long& pos, const double& val );
+
+	/*! \brief Method overload.
+		\param line Line.
+		\param col Column.
+		\param band Band.
+		\param val Pixel value.
+	*/     
+	inline void setElement_TeFLOAT( const long& pos, const double& val );
+
+	/*! \brief Method overload.
+		\param line Line.
+		\param col Column.
+		\param band Band.
+		\param val Pixel value.
+	*/    
+	inline void setElement_TeDOUBLE( const long& pos, const double& val );
+
+	/*! \brief Method overload.
+		\param line Line.
+		\param col Column.
+		\param band Band.
+		\param val Pixel value.
+	*/     
+	inline void getElement_TeUNSIGNEDCHAR( const long& pos, double& val );
+
+	/*! \brief Method overload.
+		\param line Line.
+		\param col Column.
+		\param band Band.
+		\param val Pixel value.
+	*/  
+	inline void getElement_TeCHAR( const long& pos, double& val );  
+
+	/*! \brief Method overload.
+		\param line Line.
+		\param col Column.
+		\param band Band.
+		\param val Pixel value.
+	*/  
+	inline void getElement_TeUNSIGNEDSHORT( const long& pos, double& val );
+
+	/*! \brief Method overload.
+		\param line Line.
+		\param col Column.
+		\param band Band.
+		\param val Pixel value.
+	*/   
+	inline void getElement_TeSHORT( const long& pos, double& val );
+
+	/*! \brief Method overload.
+		\param line Line.
+		\param col Column.
+		\param band Band.
+		\param val Pixel value.
+	*/    
+	inline void getElement_TeINTEGER( const long& pos, double& val );
+
+	/*! \brief Method overload.
+		\param line Line.
+		\param col Column.
+		\param band Band.
+		\param val Pixel value.
+	*/      
+	inline void getElement_TeUNSIGNEDLONG( const long& pos, double& val );
+
+	/*! \brief Method overload.
+		\param line Line.
+		\param col Column.
+		\param band Band.
+		\param val Pixel value.
+	*/      
+	inline void getElement_TeLONG( const long& pos, double& val );
 
-	void setModified(bool val)
-	{	isModified_ = val; }
+	/*! \brief Method overload.
+		\param line Line.
+		\param col Column.
+		\param band Band.
+		\param val Pixel value.
+	*/      
+	inline void getElement_TeFLOAT( const long& pos, double& val );
 
-protected:
-	int	nelems_;
-	int	size_;
-	void*	data_;			//!< Pointer to view of file mapped to memory
-	bool isModified_;
+	/*! \brief Method overload.
+		\param line Line.
+		\param col Column.
+		\param band Band.
+		\param val Pixel value.
+	*/
+	inline void getElement_TeDOUBLE( const long& pos, double& val );  
 };
 
 //! Implements a factory to build decoder to MEMORY raster
-class TeDecoderMemoryFactory : public TeDecoderFactory
+class TL_DLL TeDecoderMemoryFactory : public TeDecoderFactory
 {
 public:
 
+	//! Factory constructor
 	TeDecoderMemoryFactory(const string& name) : TeDecoderFactory(name) {}
 
-	virtual TeDecoder* build (const TeRasterParams& arg)
+	//! Build an object
+	TeDecoder* build (const TeRasterParams& arg)
 	{  return new TeDecoderMemory(arg); }
 };
 #endif
diff --git a/src/terralib/kernel/TeDecoderMemoryMap.cpp b/src/terralib/kernel/TeDecoderMemoryMap.cpp
old mode 100644
new mode 100755
index 4468533..58e4486
--- a/src/terralib/kernel/TeDecoderMemoryMap.cpp
+++ b/src/terralib/kernel/TeDecoderMemoryMap.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -27,12 +27,6 @@ of this library and its documentation.
 #include <map>
 #include <string>
 
-static inline short swaps(short value)
-{
-    short svalue = ((value & 0x00ff) << 8) | ((value >> 8) & 0x00ff);
-	return svalue;
-}
-
 TeDecoderMemoryMap::TeDecoderMemoryMap ( const TeRasterParams& par )
 {
 	params_ = par;
@@ -41,6 +35,7 @@ TeDecoderMemoryMap::TeDecoderMemoryMap ( const TeRasterParams& par )
 	m_lpszFile = 0;
 	m_hFile = 0;
 	params_.decoderIdentifier_ = "MEMMAP";
+	params_.errorMessage_.clear();
 }
 
 TeDecoderMemoryMap::~TeDecoderMemoryMap ()
@@ -51,8 +46,22 @@ TeDecoderMemoryMap::~TeDecoderMemoryMap ()
 bool
 TeDecoderMemoryMap::getElement (int col,int lin, double& val,int band)
 {
-	unsigned long position = dataInitPos_+(unsigned long)params_.nBands()*(unsigned long)(params_.ncols_*lin+col)+band;
-	switch (params_.dataType_[0])
+	unsigned long position = 0;
+	switch (params_.interleaving_)
+	{
+	case TeRasterParams::TePerPixel:
+		position = params_.nBands()*(params_.ncols_*lin+col)+band;
+		break;
+	case TeRasterParams::TePerLine:
+		position = (params_.nBands()*params_.ncols_*lin)+band*params_.ncols_+col;
+		break;
+	case TeRasterParams::TePerBand:
+		position = band*(params_.ncols_*params_.nlines_)+(params_.ncols_*lin+col);
+		break;
+	}
+	
+	position += dataInitPos_;
+    switch (params_.dataType_[0])
 	{
 	case (TeUNSIGNEDCHAR):
 		val = ((unsigned char*)m_lpszFile)[position];
@@ -76,6 +85,7 @@ TeDecoderMemoryMap::getElement (int col,int lin, double& val,int band)
 		break;
 	case (TeINTEGER):
 		val = ((int*)m_lpszFile)[position];
+		break;
 	case (TeUNSIGNEDLONG):
 		val = ((unsigned long*)m_lpszFile)[position];
 		break;
@@ -97,7 +107,21 @@ TeDecoderMemoryMap::getElement (int col,int lin, double& val,int band)
 bool
 TeDecoderMemoryMap::setElement (int col,int lin, double val, int band)
 {
-	unsigned int position = dataInitPos_+params_.nBands()*(params_.ncols_*lin+col)+band;
+	unsigned long position = 0;
+	switch (params_.interleaving_)
+	{
+	case TeRasterParams::TePerPixel:
+		position = params_.nBands()*(params_.ncols_*lin+col)+band;
+		break;
+	case TeRasterParams::TePerLine:
+		position = (params_.nBands()*params_.ncols_*lin)+band*params_.ncols_+col;
+		break;
+	case TeRasterParams::TePerBand:
+		position = band*(params_.ncols_*params_.nlines_)+(params_.ncols_*lin+col);
+		break;
+	}
+	
+	position += dataInitPos_;
 	switch (params_.dataType_[0])
 	{
 	case (TeUNSIGNEDCHAR):
@@ -109,7 +133,10 @@ TeDecoderMemoryMap::setElement (int col,int lin, double val, int band)
 		break;
 
 	case (TeUNSIGNEDSHORT):
-		((unsigned short*)m_lpszFile)[position] = (unsigned short) val;
+		if (params_.swap_)
+			((unsigned short*)m_lpszFile)[position] = swaps((unsigned short) val);
+		else
+			((unsigned short*)m_lpszFile)[position] = (unsigned short) val;
 		break;
 
 	case (TeSHORT):
@@ -137,241 +164,23 @@ TeDecoderMemoryMap::setElement (int col,int lin, double val, int band)
 	
 	case (TeDOUBLE):
 		((double*)m_lpszFile)[position] = val;
+    break;
+    
 	default:
 		return false;
 	}
 	return true;
 }
 
-void
-TeDecoderMemoryMap::writeMetadataFile()
-{
-	string metFileName = TeGetName (params_.fileName_.c_str())+".met";
-	try {
-		TeAsciiFile metFile(metFileName,"w");
-		string line = "%Raw raster file metadata\n";
-		metFile.writeString(line);
-		line = "NROWS " + Te2String(params_.nlines_);
-		metFile.writeString(line);
-		metFile.writeNewLine();
-		line = "NCOLS " + Te2String(params_.ncols_);
-		metFile.writeString(line);
-		metFile.writeNewLine();
-		line = "NBANDS " + Te2String(params_.nBands());
-		metFile.writeString(line);
-		metFile.writeNewLine();
-
-		if (params_.nBands() > 1)
-		{
-			line = "INTERLEAVING ";
-			if (params_.interleaving_ == TePerPixel)
-				line += "perpixel";
-			else if (params_.interleaving_ == TePerLine)
-				line += "perline";
-			else
-				line += "perband";
-			metFile.writeString(line);
-			metFile.writeNewLine();
-		}
-
-		line = "DATATYPE ";
-		if (params_.dataType_[0] == TeBIT)
-			line += "bit";
-		else if (params_.dataType_[0] == TeUNSIGNEDCHAR)
-			line += "unsignedchar";
-		else if (params_.dataType_[0] == TeCHAR)
-			line += "char";
-		else if (params_.dataType_[0] == TeUNSIGNEDSHORT)
-			line += "unsignedshort";
-		else if (params_.dataType_[0] == TeSHORT)
-			line += "short";
-		else if (params_.dataType_[0] == TeINTEGER)
-			line += "integer";
-		else if (params_.dataType_[0] == TeUNSIGNEDLONG)
-			line += "unsignedlong";
-		else if (params_.dataType_[0] == TeLONG)
-			line += "long";
-		else if (params_.dataType_[0] == TeFLOAT)
-			line += "float";
-		else if (params_.dataType_[0] == TeDOUBLE)
-			line += "double";		
-		metFile.writeString(line);
-		metFile.writeNewLine();
-		
-		if (params_.swap_)
-		{
-			line = "SWAPPED yes";
-			metFile.writeString(line);
-			metFile.writeNewLine();
-		}
-
-		if (params_.useDummy_)
-		{
-			line += "NO_DATA " + Te2String(params_.dummy_[0]);
-			metFile.writeString(line);
-			metFile.writeNewLine();
-		}
-		
-		line = "RESOLUTION_X " + Te2String(params_.resx_);
-		metFile.writeString(line);
-		metFile.writeNewLine();
-		line = "RESOLUTION_Y " + Te2String(params_.resy_);
-		metFile.writeString(line);
-		metFile.writeNewLine();
-		line = "LOWERLEFT_X " + Te2String(params_.box().x1_);
-		metFile.writeString(line);
-		metFile.writeNewLine();
-		line = "LOWERLEFT_Y " + Te2String(params_.box().y1_);
-		metFile.writeString(line);
-		metFile.writeNewLine();
-		line = "PROJECTION " + params_.projection()->name() + " ";
-		line += params_.projection()->describe();
-		metFile.writeString(line);
-		metFile.writeNewLine();
-		line = "DATUM " +  params_.projection()->datum().name();
-		metFile.writeString(line);
-		metFile.writeNewLine();
-	}
-	catch(...)
-	{
-	}
-}
-
-void 
-TeDecoderMemoryMap::readMetadataFile()
-{
-	// read all keys in the metadata file (there is no order expected) 
-	string metFileName = TeGetName (params_.fileName_.c_str())+".met";
-	map<string,string> metadata;
-	try {
-		TeAsciiFile metFile(metFileName,"r");
-		string key, value;
-		while (metFile.isNotAtEOF())
-		{
-			key = metFile.readString();
-			if (key[0] == '%')
-			{
-				metFile.findNewLine();
-				continue;
-			}
-			value = metFile.readString();
-			metadata.insert(make_pair(key,value));
-			metFile.findNewLine();
-		}
-	}
-	catch(...)
-	{
-	}
-	if (!metadata.empty())
-	{
-		double xll=0, yll=0;
-		map<string,string>::iterator it;
-		it = metadata.find("NROWS");
-		if (it != metadata.end())
-			params_.nlines_ = atoi(it->second.c_str());
-		it = metadata.find("NCOLS");
-		if (it != metadata.end())
-			params_.ncols_ = atoi(it->second.c_str());
-		it = metadata.find("NBANDS");
-		if (it != metadata.end())
-			params_.nBands(atoi(it->second.c_str()));
-		else
-			params_.nBands(1);
-		it = metadata.find("RESOLUTION_X");
-		if (it != metadata.end())
-			params_.resx_ = atof(it->second.c_str());
-		it = metadata.find("RESOLUTION_Y");
-		if (it != metadata.end())
-			params_.resy_ = atof(it->second.c_str());
-		it = metadata.find("LOWERLEFT_X");
-		if (it != metadata.end())
-		{
-			xll = atof(it->second.c_str());
-			it = metadata.find("LOWERLEFT_Y");
-			if (it != metadata.end())
-			{
-				yll = atof(it->second.c_str());
-				params_.lowerLeftResolutionSize(xll,yll, params_.resx_, params_.resy_,
-										params_.ncols_, params_.nlines_);
-			}
-		}
-
-		it = metadata.find("INTERLEAVING");
-		if (it != metadata.end())
-		{
-			if (it->second == "perline")
-				params_.interleaving_ = TePerLine;
-			else if (it->second == "perband")
-				params_.interleaving_ = TePerBand;
-			else params_.interleaving_ = TePerPixel;
-		}
-
-		it = metadata.find("DATATYPE");
-		if (it != metadata.end())
-		{
-			if (it->second == "bit")
-				params_.setDataType(TeBIT);
-			else if (it->second == "unsignedchar")
-				params_.setDataType(TeBIT);
-			else if (it->second == "char")
-				params_.setDataType(TeCHAR);
-			else if (it->second == "unsignedshort")
-				params_.setDataType(TeUNSIGNEDSHORT);
-			else if (it->second == "short")
-				params_.setDataType(TeSHORT);
-			else if (it->second == "integer")
-				params_.setDataType(TeINTEGER);
-			else if (it->second == "unsignedlong")
-				params_.setDataType(TeUNSIGNEDLONG);
-			else if (it->second == "long")
-				params_.setDataType(TeLONG);
-			else if (it->second == "float")
-				params_.setDataType(TeFLOAT);
-			else if (it->second == "double")
-				params_.setDataType(TeDOUBLE);
-		}
-		it = metadata.find("SWAPPED");
-		if (it != metadata.end() && it->second == "yes")
-			params_.swap_ = true;
-
-		it = metadata.find("NO_DATA");
-		if (it != metadata.end())
-		{
-			params_.useDummy_ = true;
-			params_.setDummy(atof(it->second.c_str()));
-		}
-			
-		it = metadata.find("PROJECTION");
-		if (it != metadata.end())
-		{
-			string projdesc = it->second;
-			TeProjectionParams pars;
-			it = metadata.find("DATUM");
-			if (it != metadata.end())
-			{
-				TeDatum dat = TeDatumFactory::make(it->second);
-				pars.datum = dat;
-			}
-			if (decodifyDescription(projdesc,pars))
-			{
-				TeProjection* proj = TeProjectionFactory::make(pars);
-				params_.projection(proj);
-			}
-		}
-	}
-}
-
 #ifdef WIN32
 void
 TeDecoderMemoryMap::init()
 {
 	clear();
-	params_.status_= TeNOTREADY;
-
 	DWORD dwDesiredAccess, dwCreationDisposition, flProtect,dwDesiredAccessV ;
-	
 	if (params_.mode_ == 'c')
 	{
+		params_.writeParametersFile();
 		dwCreationDisposition = CREATE_ALWAYS;
 		dwDesiredAccess = GENERIC_READ | GENERIC_WRITE;
 		flProtect = PAGE_READWRITE;
@@ -379,34 +188,43 @@ TeDecoderMemoryMap::init()
 	}
 	else if (params_.mode_ == 'w')
 	{
+		params_.readParametersFile();
 		dwCreationDisposition = OPEN_ALWAYS;
 		dwDesiredAccess = GENERIC_READ | GENERIC_WRITE;		
 		flProtect = PAGE_READWRITE;
 		dwDesiredAccessV = FILE_MAP_WRITE;
 	}
-	else
+	else 	// default mode: reading
 	{
+		params_.readParametersFile();
 		dwCreationDisposition = OPEN_EXISTING;
 		dwDesiredAccess = GENERIC_READ;		
 		flProtect = PAGE_READONLY;
 		dwDesiredAccessV = FILE_MAP_READ;
 	}
 
+	
+	// calculate the expected file size accordingly to the parameters
+	unsigned long fsize = (long)(params_.nBands()*params_.ncols_*params_.nlines_);    
+	fsize *= params_.elementSize(0);
+	
+	if (fsize <= 0)
+		return;
+	
 	// First open the file
-	m_hFile = CreateFile(
+	m_hFile = CreateFileA(
 		params_.fileName_.c_str(),	// File name
 		dwDesiredAccess,			// Desired access
-		FILE_SHARE_READ
-		| FILE_SHARE_WRITE,		// Allow sharing-- we're only doing a quick scan
-		NULL,					// No security attributes
-		dwCreationDisposition,	// Creation disposition
-		0,						// Ignore file attributes
-		NULL);					// Ignore hTemplateFile
+		FILE_SHARE_READ| FILE_SHARE_WRITE,	// Allow sharing-- we're only doing a quick scan
+		NULL,								// No security attributes
+		dwCreationDisposition,				// Creation disposition
+		0,									// Ignore file attributes
+		NULL);								// Ignore hTemplateFile
 
 	if (m_hFile == INVALID_HANDLE_VALUE)
-			return;		// could not open file
-	
-	// Get the file's size
+		return;		// could not open file
+			
+	// get the file's size
 	m_dwSize = GetFileSize(m_hFile, NULL);
 	if (m_dwSize == 0xffffffff)
 	{
@@ -414,145 +232,101 @@ TeDecoderMemoryMap::init()
 		return;
 	}
 	
-	bool fillDummy = false;
-	if (params_.mode_ == 'c' ||  m_dwSize == 0)	
+	if (params_.mode_ == 'c')	
 	{
-		if (!create())
-			return;
-		fillDummy = true;
-		// if creating a raw file write the metata file
-		writeMetadataFile();
+		if (m_dwSize < fsize)
+		{
+			char lpBuffer[1024];
+			int nNumberOfBytesToWrite = fsize-m_dwSize;
+			unsigned long nNumberOfBytesWritten;  // pointer to number of bytes written
+			for (;nNumberOfBytesToWrite > 1024; nNumberOfBytesToWrite-=1024)
+			{
+				if (!WriteFile(m_hFile, lpBuffer, 1024, &nNumberOfBytesWritten, NULL))
+				{
+					CloseHandle(m_hFile);
+					m_hFile = NULL;
+					return;
+				}
+			}
+			if (!WriteFile(m_hFile, lpBuffer, nNumberOfBytesToWrite, &nNumberOfBytesWritten, NULL))
+			{
+				CloseHandle(m_hFile);
+				m_hFile = NULL;
+				return;
+			}	
+		}
 	}
 	else
 	{
-		// if reading an existing raw file try to read the metadata file
-		readMetadataFile();
+		if (m_dwSize < fsize)
+			return;
 	}
 
 	// Create a mapping object from the file
 	m_hMapping = CreateFileMapping(
-		m_hFile,				// Handle we got from CreateFile
-		NULL,					// No security attributes
-		flProtect,			// read-write
-		0, 0,					// Max size = current size of file
-		NULL);					// Don't name the mapping object
+		m_hFile,		// Handle we got from CreateFile
+		NULL,			// No security attributes
+		flProtect,		// read-write
+		0, 0,			// Max size = current size of file
+		NULL);			// Don't name the mapping object
+		
 	if ( m_hMapping == NULL )
 	{
+		CloseHandle(m_hFile);
 		m_hFile = NULL;
 		return;
 	}
 
-// Map the file to memory
+	// Map the file to memory
 	switch (params_.dataType_[0]) {
 	case (TeUNSIGNEDCHAR):
-		m_lpszFile = (unsigned char*) MapViewOfFile(
-		m_hMapping,					// Handle we got from CreateFileMapping
-		dwDesiredAccessV,				// full access
-		0, 0,						// Offset into file = beginning of file
-		0);
+		m_lpszFile = (unsigned char*) MapViewOfFile(m_hMapping, dwDesiredAccessV, 0, 0,	0);
 		break;
 	case (TeCHAR) :
-		m_lpszFile = (char*) MapViewOfFile(
-		m_hMapping,					// Handle we got from CreateFileMapping
-		dwDesiredAccessV,				// full access
-		0, 0,						// Offset into file = beginning of file
-		0);
+		m_lpszFile = (char*) MapViewOfFile(m_hMapping, dwDesiredAccessV, 0, 0, 0);
 		break;
 	case (TeUNSIGNEDSHORT):
-		m_lpszFile = (unsigned short*) MapViewOfFile(
-		m_hMapping,					// Handle we got from CreateFileMapping
-		dwDesiredAccessV,				// full access
-		0, 0,						// Offset into file = beginning of file
-		0);
+		m_lpszFile = (unsigned short*) MapViewOfFile(m_hMapping, dwDesiredAccessV, 0, 0, 0);
 		break;
 	case (TeSHORT):
-		m_lpszFile = (short*) MapViewOfFile(
-		m_hMapping,					// Handle we got from CreateFileMapping
-		dwDesiredAccessV,				// full access
-		0, 0,						// Offset into file = beginning of file
-		0);
+		m_lpszFile = (short*) MapViewOfFile(m_hMapping, dwDesiredAccessV, 0, 0,	0);
 		break;
 	case (TeUNSIGNEDLONG):
-		m_lpszFile = (unsigned long*) MapViewOfFile(
-		m_hMapping,					// Handle we got from CreateFileMapping
-		dwDesiredAccessV,				// full access
-		0, 0,						// Offset into file = beginning of file
-		0);
+		m_lpszFile = (unsigned long*) MapViewOfFile(m_hMapping, dwDesiredAccessV, 0, 0,	0);
 		break;
 	case (TeLONG):
-		m_lpszFile = (long*) MapViewOfFile(
-		m_hMapping,					// Handle we got from CreateFileMapping
-		dwDesiredAccessV,				// full access
-		0, 0,						// Offset into file = beginning of file
-		0);
+		m_lpszFile = (long*) MapViewOfFile(m_hMapping, dwDesiredAccessV, 0, 0, 0);
 		break;
 	case (TeFLOAT):
-		m_lpszFile = (float*) MapViewOfFile(
-		m_hMapping,					// Handle we got from CreateFileMapping
-		dwDesiredAccessV,				// full access
-		0, 0,						// Offset into file = beginning of file
-		0);
+		m_lpszFile = (float*) MapViewOfFile(m_hMapping, dwDesiredAccessV, 0, 0,	0);
 		break;
 	case (TeDOUBLE):
-		m_lpszFile = (double*) MapViewOfFile(
-		m_hMapping,					// Handle we got from CreateFileMapping
-		dwDesiredAccessV,				// full access
-		0, 0,						// Offset into file = beginning of file
-		0);
+		m_lpszFile = (double*) MapViewOfFile(m_hMapping, dwDesiredAccessV, 0, 0, 0);
 		break;
 	}
 	if ( m_lpszFile == NULL )
 		return ;
 
-	if (fillDummy)
+	if (params_.mode_ == 'c')
 	{
-		for (int b=0; b<params_.nBands();b++)
-			for (int l=0; l<params_.nlines_;l++)
-				for (int c=0; c<params_.ncols_;c++)
-					setElement ( c, l, params_.dummy_[b], b);
+		int b, l, c;
+		for (b=0; b<params_.nBands();++b)
+			for (l=0; l<params_.nlines_;++l)
+				for (c=0; c<params_.ncols_;++c)
+					setElement(c, l, params_.dummy_[b], b);
 	}
 	if (params_.mode_ =='c' || params_.mode_ == 'w')
-		params_.status_ = TeREADYTOWRITE;
+		params_.status_ = TeRasterParams::TeReadyToWrite;
 	else 
-		params_.status_ = TeREADYTOREAD;	
+		params_.status_ = TeRasterParams::TeReadyToRead;	
 	return;
 }
 
-
-bool
-TeDecoderMemoryMap::create()
-{
-	char			lpBuffer[1024];
-	unsigned long	nNumberOfBytesToWrite=(long)params_.nBands() * (long)params_.ncols_ * (long)params_.nlines_;    // number of bytes to write
-	nNumberOfBytesToWrite *= (long)params_.nbitsperPixel_[0]/8;    // number of bytes to write
-	unsigned long	nNumberOfBytesWritten;  // pointer to number of bytes written
-
-	for (;nNumberOfBytesToWrite > 1024; nNumberOfBytesToWrite-=1024)
-	{
-		if ( !WriteFile(
-			m_hFile,                // handle to file to write to
-			lpBuffer,               // pointer to data to write to file
-			1024,					// number of bytes to write
-			&nNumberOfBytesWritten,  // pointer to number of bytes written
-			NULL					// pointer to structure for overlapped I/O
-			))
- 			return false;			// could not write to file
-	}
-
-	if ( !WriteFile(
-		m_hFile,                // handle to file to write to
-		lpBuffer,               // pointer to data to write to file
-		nNumberOfBytesToWrite,	// number of bytes to write
-		&nNumberOfBytesWritten,  // pointer to number of bytes written
-		NULL					// pointer to structure for overlapped I/O
-		))
- 		return false;			// could not write to file
-	return true;
-}
-
 bool
 TeDecoderMemoryMap::clear()
 {
+	params_.status_ = TeRasterParams::TeNotReady;
+	params_.errorMessage_.clear();
 	if (m_hFile == NULL)
 		return true;
 
@@ -562,7 +336,6 @@ TeDecoderMemoryMap::clear()
 	CloseHandle(m_hMapping);
 	CloseHandle(m_hFile);
 	m_hFile = NULL;
-	params_.status_ = TeNOTREADY;
 	return true;
 }
 #else
@@ -571,84 +344,73 @@ TeDecoderMemoryMap::clear()
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <unistd.h>
+
 void
 TeDecoderMemoryMap::init()
 {
 	clear();
-
-	// First open the file
-	m_hFile = open(params_.fileName_.c_str(),	// File name
-		              O_RDWR,				// Flags
-			      S_IRWXU);				// Mode
-
+	mode_t	mode=0;
+	if (params_.mode_ == 'c') 
+	{
+		m_dwSize = (long)(params_.nBands()*params_.ncols_*params_.nlines_);    
+		m_dwSize *= params_.elementSize(0);
+		if (m_dwSize <= 0)
+			return;
+		params_.writeParametersFile();
+		m_hFile = open(params_.fileName_.c_str(),O_RDWR|O_CREAT,S_IRWXU);
+		mode =  (PROT_READ | PROT_WRITE);
+      		lseek(m_hFile, m_dwSize - 1, SEEK_SET);
+      		write(m_hFile, '\0', 1);	
+	}
+	else if (params_.mode_ == 'r') 
+	{	
+		params_.readParametersFile();
+		m_dwSize = (long)(params_.nBands()*params_.ncols_*params_.nlines_);    
+		m_dwSize *= params_.elementSize(0);
+		if (m_dwSize <= 0)
+			return;
+		m_hFile = open(params_.fileName_.c_str(),O_RDONLY,S_IRWXU);	
+		mode = PROT_READ;
+	}
+	else
+	{
+		params_.readParametersFile();
+		m_dwSize = (long)(params_.nBands()*params_.ncols_*params_.nlines_);    
+		m_dwSize *= params_.elementSize(0);
+		if (m_dwSize <= 0)
+			return;	
+		m_hFile = open(params_.fileName_.c_str(),O_RDWR,S_IRWXU);
+		mode = (PROT_READ | PROT_WRITE);
+	}
+	
 	if (m_hFile == -1)
 		return;				// could not open file
 
-	// Get the file's size
-	struct stat aux;
-	if (stat(params_.fileName_.c_str(), &aux) == -1)
+	m_lpszFile  =  mmap(0, m_dwSize, mode, MAP_SHARED, m_hFile, 0);
+	if (((long) m_lpszFile)  == -1 )
 		return;
-	m_dwSize = aux.st_size;
-
-	m_lpszFile  =  mmap(0, m_dwSize, PROT_READ|PROT_WRITE , MAP_PRIVATE, m_hFile, 0);
-	if ( ((int) m_lpszFile)  == -1 )
-		return;
-}
-
-bool
-TeDecoderMemoryMap::create()
-{
-	clear();
-	// First open the file
-	m_hFile = open(params_.fileName_.c_str(),	// File name
-		              O_RDWR,				// Flags
-			      S_IRWXU);				// Mode
 
-	if (m_hFile == -1)
-		return false;				// could not open file
-
-	char			lpBuffer[1024];
-	long	nNumberOfBytesToWrite=(long)params_.nBands() * (long)params_.ncols_ * (long)params_.nlines_;    // number of bytes to write
-	nNumberOfBytesToWrite *= (long)params_.nbitsperPixel_[0]/8;    // number of bytes to write
-	long	nNumberOfBytesWritten;  // pointer to number of bytes written
-
-	for (;nNumberOfBytesToWrite > 1024; nNumberOfBytesToWrite-=1024)
+	if (params_.mode_ == 'c')	
 	{
-		nNumberOfBytesWritten = write(m_hFile, lpBuffer,1024);
-		if (nNumberOfBytesWritten == -1)
- 		   return false;			// could not write to file
+		int b, l, c;
+		for (b=0; b<params_.nBands();++b)
+			for (l=0; l<params_.nlines_;++l)
+				for (c=0; c<params_.ncols_;++c)
+					setElement(c, l, params_.dummy_[b], b);
 	}
-
-	nNumberOfBytesWritten = write(m_hFile, lpBuffer,nNumberOfBytesToWrite);
-	if (nNumberOfBytesWritten == -1)
- 	    return false;
-
-	// Create a mapping object from the file
-
-	struct stat aux;
-	if (stat(params_.fileName_.c_str(), &aux) == -1) 	// Get the file's size
-		return false;
-	m_dwSize = aux.st_size;
-
-	m_lpszFile =  mmap(0, m_dwSize, PROT_READ|PROT_WRITE , MAP_PRIVATE, m_hFile, 0);
-	if ( ((int) m_lpszFile)  == -1 )
-		return false;
-
-	// Writes the default values
-	if (params_.dummy_[0])
-	{
-		for (int b=0; b<params_.nBands();b++)
-			for (int l=0; l<params_.nlines_;l++)
-				for (int c=0; c<params_.ncols_;c++)
-					setElement ( c, l, params_.dummy_[b], b);
-	}
-	return true;
+	
+	if (params_.mode_ =='c' || params_.mode_ == 'w')
+		params_.status_ = TeRasterParams::TeReadyToWrite;
+	else 
+		params_.status_ = TeRasterParams::TeReadyToRead;	
+	return;
 }
 
-
 bool
 TeDecoderMemoryMap::clear()
 {
+	params_.status_ = TeRasterParams::TeNotReady;
+	params_.errorMessage_.clear();
 	if (m_lpszFile == 0)
 		return true;
 
@@ -661,4 +423,8 @@ TeDecoderMemoryMap::clear()
 }
 #endif
 
-
+TeDecoderMemoryMapFactory::TeDecoderMemoryMapFactory(const string& name) : 
+	TeDecoderFactory(name) 
+{
+	TeDecoderFactory::instanceName2Dec()["RAW"] = "MEMMAP";
+}
diff --git a/src/terralib/kernel/TeDecoderMemoryMap.h b/src/terralib/kernel/TeDecoderMemoryMap.h
old mode 100644
new mode 100755
index f71c538..a89e282
--- a/src/terralib/kernel/TeDecoderMemoryMap.h
+++ b/src/terralib/kernel/TeDecoderMemoryMap.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -21,7 +21,7 @@ indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
 /*! \file TeDecoderMemoryMap.h
-    This file deals with decoding of raster data in a bynary file, using the memory map operation system functionality
+    \brief This file deals with decoding of raster data in a bynary file, using the memory map operation system functionality
 */
 #ifndef  __TERRALIB_INTERNAL_DECODERMEMORYMAP_H
 #define  __TERRALIB_INTERNAL_DECODERMEMORYMAP_H
@@ -37,47 +37,56 @@ of this library and its documentation.
 
  
 //! Implements a decoder to raster data in a bynary file, using the memory map operation system functionality
-class TeDecoderMemoryMap : public TeDecoder
+/*
+	Due to limits set by the operating system, the maximum amount of data you can map 
+	with a single instance of a memory map is 2^31 - 1 (or 2 GB).
+*/
+class TL_DLL TeDecoderMemoryMap : public TeDecoder
 {
 public:
+	//! Constructor
 	TeDecoderMemoryMap ( const TeRasterParams& );
+
+	//! Destructor
 	~TeDecoderMemoryMap ();
 
-	bool setElement (int col, int lin, double val, int band = 0);
-	bool getElement (int col, int lin, double &val,int band = 0);
+	//! Reads an element
+	bool setElement (int col,int lin, double val, int band=0);
 
-	void init	();
-	bool clear	();
+	//! Writes an element
+	bool getElement (int col,int lin, double &val,int band=0);
 
-	void writeMetadataFile();
-	void readMetadataFile();
+	//! Initalizes the internal structures
+	virtual void init();
 
-private:
-	bool create	();
+	//! Releases the internal structures
+	virtual bool clear();
 
+private:
+	long	dataInitPos_;
 #ifdef WIN32
 // Windows support to file memory mapping
-	long	dataInitPos_;
 	HANDLE  m_hFile;			// Handle to file we're currently zapping
 	HANDLE	m_hMapping;			// Handle to memory-mapping of that file
 	LPVOID  m_lpszFile;			// Pointer to view of file mapped to memory
 	DWORD	m_dwSize;
 #else
 // Linux support to file memory mapping
-	long	dataInitPos_;
-	int  m_hFile;			//(fd) Handle to file we're currently zapping
-	void*  m_lpszFile;			// Pointer to view of file mapped to memory
+	int	m_hFile;			//(fd) Handle to file we're currently zapping
+	void*	m_lpszFile;			// Pointer to view of file mapped to memory
 	long	m_dwSize;
 #endif
 };
 
 //! Implements a factory to build memory map decoder
-class TeDecoderMemoryMapFactory : public TeDecoderFactory
+class TL_DLL TeDecoderMemoryMapFactory : public TeDecoderFactory
 {
 public:
 
-	TeDecoderMemoryMapFactory(const string& name) : TeDecoderFactory(name) {}
+	//! Factory constructor
+	TeDecoderMemoryMapFactory(const string& name);
 
+	//! Builds the object
 	virtual TeDecoder* build (const TeRasterParams& arg)
 	{  return new TeDecoderMemoryMap(arg); }
 };
diff --git a/src/terralib/kernel/TeDecoderSPR.cpp b/src/terralib/kernel/TeDecoderSPR.cpp
old mode 100644
new mode 100755
index 0316660..eb22cdf
--- a/src/terralib/kernel/TeDecoderSPR.cpp
+++ b/src/terralib/kernel/TeDecoderSPR.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -25,16 +25,25 @@ of this library and its documentation.
 #include "TeDecoderSPR.h"
 #include "TeAsciiFile.h"
 #include "TeUtils.h"
-#ifdef WIN32
-#include <io.h>
-#else
-#include <unistd.h>
-#endif
 
+#include <cstring>
+#include <cstdlib>
+#include <fstream>
+using std::ifstream;
+using std::ofstream;
+
+TeDecoderSPR::TeDecoderSPR() : 
+	TeDecoderSmartMem(),
+	isModified_(false)
+{	
+	params_.decoderIdentifier_ = "SPR";	
+}
 
 TeDecoderSPR::TeDecoderSPR (const TeRasterParams& par) : 
-	TeDecoderMemory()
+	TeDecoderSmartMem(),
+	isModified_(false)
 {	
+	params_.errorMessage_.clear();
 	if (par.fileName_.empty())
 		return;
 	params_ = par;
@@ -43,7 +52,7 @@ TeDecoderSPR::TeDecoderSPR (const TeRasterParams& par) :
 		readParameters();
 }
 
-TeDecoderSPR::~TeDecoderSPR ()
+TeDecoderSPR::~TeDecoderSPR()
 {
 	if ( isModified_ && (params_.mode_ == 'w' || params_.mode_ == 'c'))
 	{			// save contents to disk
@@ -57,7 +66,7 @@ TeDecoderSPR::~TeDecoderSPR ()
 		{
 		}
 	}
-	TeDecoderMemory::clear();
+	TeDecoderSmartMem::clear();
 }
 
 bool
@@ -76,7 +85,7 @@ TeDecoderSPR::clear()
 		}
 		isModified_ = false;
 	}
-	TeDecoderMemory::clear();
+	TeDecoderSmartMem::clear();
 	return true;
 }
 
@@ -127,47 +136,38 @@ TeDecoderSPR::readParameters()
 		
 		if (name == "GRIDCLASS" )
 		{
+			params_.setPhotometric(TeRasterParams::TePallete);
+			params_.setDataType(TeUNSIGNEDCHAR);
+
 			// Expected format GRIDCLASS  <nclass>  <ncolorR>  <ncolorG>  <ncolorB>  <nameclass>
-			vector<short> lutr;
-			vector<short> lutg;
-			vector<short> lutb;
+			params_.lutr_.clear();
+			params_.lutg_.clear();
+			params_.lutb_.clear();
+
+			params_.lutr_.insert(params_.lutr_.begin(),256,0);
+			params_.lutg_.insert(params_.lutg_.begin(),256,0);
+			params_.lutb_.insert(params_.lutb_.begin(),256,0);
 			
+			vector<string> lnames;
 			name = pFile.readString();
 			while (pFile.isNotAtEOF() && name != "INFO_END") // loop through all class definitions
 			{
-				name = pFile.readString();
-				lutr.push_back(atoi(name.c_str())); 
-
-				name = pFile.readString();
-				lutg.push_back(atoi(name.c_str())); 
-
-				name = pFile.readString();
-				lutb.push_back(atoi(name.c_str())); 
-
-				name = pFile.readString();			
-				name = pFile.readString();			
+				int index = atoi(name.c_str());
+				params_.lutr_[index] = pFile.readInt(); 
+				params_.lutg_[index] = pFile.readInt(); 
+				params_.lutb_[index] = pFile.readInt(); 
+				lnames.clear();
+				pFile.readStringList(lnames);   // class name			
+				name = pFile.readString();	 // next index		
 			} 
 
 			if (!pFile.isNotAtEOF())	// unexpected end of file
 				return false;
-
-			params_.setPhotometric(TeRASTERPALETTE);
-			params_.setNumberPalleteEntries(lutr.size()+1);
-			for (unsigned int i=0; i<lutr.size(); i++)
-			{
-				params_.lutr_[i+1] = lutr[i];
-				params_.lutg_[i+1] = lutg[i];
-				params_.lutb_[i+1] = lutb[i];
-			}
-			lutr.clear();
-			lutg.clear();
-			lutb.clear();
-			params_.setDataType(TeUNSIGNEDCHAR);
 		}
 		else if (name == "INFO_END")
 		{
 			params_.setDataType(TeDOUBLE);
-			params_.setPhotometric(TeRASTERMULTIBAND);
+			params_.setPhotometric(TeRasterParams::TeMultiBand);
 		}
 		params_.topLeftResolutionSize(x1,y2,params_.resx_,params_.resy_,
 				                      params_.ncols_,params_.nlines_,false);
@@ -218,49 +218,88 @@ TeDecoderSPR::readFile(const string& filename)
 void
 TeDecoderSPR::init()
 {
-	params_.status_= TeNOTREADY;
+	params_.status_= TeRasterParams::TeNotReady;
 	int nb = params_.nBands();
 	if (nb != 1 )
+	{
+		params_.errorMessage_ = "Ascii SPRING can store raster with only 1 band.";
 		return;
+	}
 
-	TeDecoderMemory::init();			// try to allocate enough memory
-	if (params_.status_ == TeNOTREADY)
-		return;
-
-	params_.status_= TeNOTREADY;
+	// 1 - check if file exists and has the necessary permission
 	if (params_.mode_ == 'c')	// creating a new file
 	{
-		if (access(params_.fileName_.c_str(),00) != -1) // remove existing file
+		ofstream dataFile(params_.fileName_.c_str()); // try to (re)create the file
+		if (!dataFile)
 		{
-			if (unlink(params_.fileName_.c_str()) == -1)
-				return;
+			params_.errorMessage_ = "Fail to (re)create the raster the file:" + params_.fileName_;
+			return;
+		}
+	}
+	else if (params_.mode_ == 'w')
+	{
+		ifstream dataFile(params_.fileName_.c_str()); // check if file exists
+		if (!dataFile)
+		{
+			params_.errorMessage_ = "Fail to open the raster the file:" + params_.fileName_;
+			return; 
+		}
+		dataFile.close();
+	}
+	else if (params_.mode_ == 'r')
+	{
+		ifstream dataFile(params_.fileName_.c_str()); // check if file exists
+		if (!dataFile)
+		{
+			params_.errorMessage_ = "Fail to open the raster the file:" + params_.fileName_;
+			return; 
 		}
+		dataFile.close();	
+	}
+
+	// 2 - check if there is memory enough to handle the data
+	TeDecoderSmartMem::init();		
+	if (params_.status_ == TeRasterParams::TeNotReady)
+		return;
+
+	// 3 - try to read the data
+	if (params_.mode_ == 'c')	// creating a new file
+	{
 		try
 		{
+			params_.status_ = TeRasterParams::TeNotReady;
 			TeAsciiFile sFile(params_.fileName_,"w+");
 			if (!writeParameters(sFile) || !saveData(sFile))
-				return;
-			else
 			{
-				params_.status_ = TeREADYTOWRITE;
+				params_.errorMessage_ = "Fail to write the raster to file";
+				return;
 			}
+			params_.status_ = TeRasterParams::TeReadyToWrite;
 		}
 		catch (...)
 		{
-			return;
+			params_.errorMessage_ = "Fail to write the raster to file";
 		}
 	}
 	else if (params_.mode_ == 'w')
 	{
-		if ((access(params_.fileName_.c_str(),06) == -1) || !readFile(params_.fileName_))
-			return;
-		params_.status_ = TeREADYTOWRITE;
+		if (!readFile(params_.fileName_))
+		{
+			params_.status_ = TeRasterParams::TeNotReady;
+			params_.errorMessage_ = "Fail to read the raster the file:" + params_.fileName_;
+			return; 
+		}
+		params_.status_ = TeRasterParams::TeReadyToWrite;
 	}
 	else if (params_.mode_ == 'r')
 	{
-		if ((access(params_.fileName_.c_str(),04) == -1)|| !readFile(params_.fileName_))
-			return;
-		params_.status_ = TeREADYTOREAD;	
+		if (!readFile(params_.fileName_))
+		{
+			params_.status_ = TeRasterParams::TeNotReady;
+			params_.errorMessage_ = "Fail to read the raster the file:" + params_.fileName_;
+			return; 
+		}
+		params_.status_ = TeRasterParams::TeReadyToRead;	
 	}
 }
 
@@ -286,9 +325,12 @@ TeDecoderSPR::writeParameters(TeAsciiFile& pFile)
 		name = Te2String(params_.dummy_[0],6) + "\n";
 		pFile.writeString(name);
 
-		if (params_.photometric_[0] == TeRASTERPALETTE)
+		if (params_.photometric_[0] == TeRasterParams::TePallete)
 		{
+			name = "//Formato GRIDCLASS  <nclass>  <ncolorR>  <ncolorG>  <ncolorB>  <nameclass>\n";
+			pFile.writeString(name);
 			name = "GRIDCLASS\n";
+			pFile.writeString(name);
 			for (unsigned int nc=0; nc<params_.lutr_.size(); ++nc)
 			{
 				name = Te2String(nc) + " " + Te2String(params_.lutr_[nc]);
@@ -325,7 +367,7 @@ TeDecoderSPR::saveData(TeAsciiFile& pFile)
 		{
 			for (int c=0; c<params_.ncols_; ++c)
 			{
-				TeDecoderMemory::getElement(c,l,d);
+				TeDecoderSmartMem::getElement(c,l,d);
 				fprintf(fp,fmt,d);
 			}
 			pFile.writeNewLine();
@@ -339,3 +381,22 @@ TeDecoderSPR::saveData(TeAsciiFile& pFile)
 	}
 	return true;
 }
+
+bool 
+TeDecoderSPR::setElement (int col,int lin, double val, int band)
+{
+	if (TeDecoderSmartMem::setElement(col,lin,val,band))
+	{
+		isModified_ = true;
+		return true;
+	}
+	else
+		return false;
+}
+
+
+TeDecoderSPRFactory::TeDecoderSPRFactory(const string& name): 
+	TeDecoderFactory(name) 
+{
+	TeDecoderFactory::instanceName2Dec()["SPR"] = "SPR";
+}
diff --git a/src/terralib/kernel/TeDecoderSPR.h b/src/terralib/kernel/TeDecoderSPR.h
old mode 100644
new mode 100755
index 7292ff8..782ea78
--- a/src/terralib/kernel/TeDecoderSPR.h
+++ b/src/terralib/kernel/TeDecoderSPR.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -21,48 +21,60 @@ indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
 /*! \file TeDecoderSPR.h
-    This file deals with decoding of raster data in a ASCII SPRING format
+    \brief This file deals with decoding of raster data in a ASCII SPRING format
 */
 #ifndef  __TERRALIB_INTERNAL_DECODERSPR_H
 #define  __TERRALIB_INTERNAL_DECODERSPR_H
 
-#include "TeDecoderMemory.h"
+#include "TeDecoderSmartMem.h"
 
 class TeAsciiFile;
 
-//! Implements a decoder for rasters in ASCII Spring format
-class TeDecoderSPR : public TeDecoderMemory
+//! Implements a decoder for raster data in ASCII-SPRING format
+/*! The description of this format can be found at SPRING website <http://www.dpi.inpe.br/spring>.\par
+	The default file extension associated to this format is ".spr".
+*/
+class TL_DLL TeDecoderSPR : public TeDecoderSmartMem
 {
 public:
 	//! Empty constructor
-	TeDecoderSPR () : TeDecoderMemory() 
-	{	params_.decoderIdentifier_ = "SPR";	}
+	TeDecoderSPR();
 
 	//! Constructor from some parameters
-	TeDecoderSPR (const TeRasterParams& par);
+	TeDecoderSPR(const TeRasterParams& par);
 
 	//! Destructor
-	~TeDecoderSPR ();
+	~TeDecoderSPR();
+
+	//! Intializes the internal structures
+	void init();
+
+	//! Releases the internal structures
+	bool clear();
+
+	//! Writes an element
+	bool setElement (int col,int lin, double val, int band=0);
 
-	void	init();
-	bool	clear();
 private:
-    bool    readFile(const string& filename);
-	bool	readParameters();
-	bool	writeParameters(TeAsciiFile& pFile);
-	bool	saveData(TeAsciiFile& pFile);
+
+	bool isModified_;
+
+    bool readFile(const string& filename);
+	bool readParameters();
+	bool writeParameters(TeAsciiFile& pFile);
+	bool saveData(TeAsciiFile& pFile);
 };
 
-//! Implements a factory to build decoders to JPEG raster
-class TeDecoderSPRFactory : public TeDecoderFactory
+//! Implements a factory to build decoders to ASCII-SPRING raster
+class TL_DLL TeDecoderSPRFactory : public TeDecoderFactory
 {
 public:
+	//! Factory constructor
+	TeDecoderSPRFactory(const string& name);
 
-	TeDecoderSPRFactory(const string& name) : TeDecoderFactory(name) {}
-
-	virtual TeDecoder* build (const TeRasterParams& arg)
+	//! Builds the object
+	TeDecoder* build (const TeRasterParams& arg)
 	{  return new TeDecoderSPR(arg); }
-
 };
 
 #endif
diff --git a/src/terralib/kernel/TeDecoderSmartMem.cpp b/src/terralib/kernel/TeDecoderSmartMem.cpp
new file mode 100755
index 0000000..fa9ca37
--- /dev/null
+++ b/src/terralib/kernel/TeDecoderSmartMem.cpp
@@ -0,0 +1,539 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright  2001-2004 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+
+#include "TeDecoderSmartMem.h"
+
+#include "TeException.h"
+#include "TeAgnostic.h"
+
+
+TeDecoderSmartMem::TeDecoderSmartMem ()
+{ 
+  initVars();
+  
+  params_.decoderIdentifier_ = "SMARTMEM";
+};
+
+
+TeDecoderSmartMem::TeDecoderSmartMem ( const TeRasterParams& par )
+{
+  initVars();
+  
+  params_ = par; 
+  params_.decoderIdentifier_ = "SMARTMEM"; 
+};
+
+
+
+TeDecoderSmartMem::~TeDecoderSmartMem ()
+{
+  clear();
+}
+
+void TeDecoderSmartMem::init()
+{
+  clear();
+  
+  /* Creating the new data structures */
+
+  if( ( params_.nBands() > 0 ) && 
+      ( params_.nlines_ > 0 ) &&
+      ( params_.ncols_ > 0 ) ) {
+  
+    std::vector< unsigned int > tiles_sizes;
+    
+    for( int band_index = 0 ; band_index < params_.nBands() ; 
+      ++band_index ) {
+      
+      tiles_sizes.push_back( params_.elementSize( band_index ) * params_.ncols_ );
+    }
+
+    if( man_manager_.reset( params_.nBands(), params_.nlines_, 
+      tiles_sizes, TeRasterMemManager::AutoMemPol ) ) {
+      
+      if (params_.mode_ == 'c' || params_.mode_ == 'w') // creating a new file
+      {
+        params_.status_ = TeRasterParams::TeReadyToWrite;
+      } else if (params_.mode_ == 'r') {
+        params_.status_ = TeRasterParams::TeReadyToRead;      
+      }
+      
+      updateFuncPtrVectors();
+      dummyFill();    
+    } else {
+      clear();
+    }
+  }
+}
+
+bool TeDecoderSmartMem::clear()
+{
+  man_manager_.clear();
+  
+  if( getelement_ptrs_vec_ != 0 ) {
+    delete[] getelement_ptrs_vec_;
+    getelement_ptrs_vec_ = 0;
+  }
+  
+  if( setelement_ptrs_vec_ != 0 ) {
+    delete[] setelement_ptrs_vec_;
+    setelement_ptrs_vec_ = 0;
+  }
+  
+  params_.status_= TeRasterParams::TeNotReady;
+  
+  return true;
+}
+
+
+void TeDecoderSmartMem::initVars()
+{ 
+  getelement_ptrs_vec_ = 0;
+  setelement_ptrs_vec_ = 0;
+};
+
+
+void TeDecoderSmartMem::updateFuncPtrVectors()
+{
+  if( params_.nBands() > 0 ) {
+    getelement_ptrs_vec_ = new GetEleFunctPtrT[ params_.nBands() ];
+    if( getelement_ptrs_vec_ == 0 ) {
+      throw TeException( UNKNOWN_ERROR_TYPE, 
+        "Unable to allocate GET function pointers vector", false );
+    }
+
+    setelement_ptrs_vec_ = new SetEleFunctPtrT[ params_.nBands() ];
+    if( setelement_ptrs_vec_ == 0 ) {
+      throw TeException( UNKNOWN_ERROR_TYPE, 
+        "Unable to allocate SET function pointers vector", false );
+    }
+    
+    for( int band = 0 ; band < params_.nBands() ; ++band ) {
+      switch ( params_.dataType_[ band ] ) {
+        case (TeUNSIGNEDCHAR):
+          {
+            getelement_ptrs_vec_[ band ] = 
+              &TeDecoderSmartMem::getElement_TeUNSIGNEDCHAR;
+            setelement_ptrs_vec_[ band ] = 
+              &TeDecoderSmartMem::setElement_TeUNSIGNEDCHAR;
+            break;
+          }
+        case (TeCHAR) :
+          {
+            getelement_ptrs_vec_[ band ] = 
+              &TeDecoderSmartMem::getElement_TeCHAR;
+            setelement_ptrs_vec_[ band ] = 
+              &TeDecoderSmartMem::setElement_TeCHAR;          
+            break;
+          }
+        case (TeUNSIGNEDSHORT):
+          {
+            getelement_ptrs_vec_[ band ] = 
+              &TeDecoderSmartMem::getElement_TeUNSIGNEDSHORT;
+            setelement_ptrs_vec_[ band ] = 
+              &TeDecoderSmartMem::setElement_TeUNSIGNEDSHORT;
+            break;
+          }
+        case (TeSHORT):
+          {
+            getelement_ptrs_vec_[ band ] = 
+              &TeDecoderSmartMem::getElement_TeSHORT;
+            setelement_ptrs_vec_[ band ] = 
+              &TeDecoderSmartMem::setElement_TeSHORT;
+            break;
+          }
+        case (TeINTEGER):
+          {
+            getelement_ptrs_vec_[ band ] = 
+              &TeDecoderSmartMem::getElement_TeINTEGER;
+            setelement_ptrs_vec_[ band ] = 
+              &TeDecoderSmartMem::setElement_TeINTEGER;
+            break;
+          }
+        case (TeUNSIGNEDLONG):
+          {
+            getelement_ptrs_vec_[ band ] = 
+              &TeDecoderSmartMem::getElement_TeUNSIGNEDLONG;
+            setelement_ptrs_vec_[ band ] = 
+              &TeDecoderSmartMem::setElement_TeUNSIGNEDLONG;
+            break;
+          }
+        case (TeLONG):
+          {
+            getelement_ptrs_vec_[ band ] = 
+              &TeDecoderSmartMem::getElement_TeLONG;
+            setelement_ptrs_vec_[ band ] = 
+              &TeDecoderSmartMem::setElement_TeLONG;
+            break;
+          }
+        case (TeFLOAT):
+          {
+            getelement_ptrs_vec_[ band ] = 
+              &TeDecoderSmartMem::getElement_TeFLOAT;
+            setelement_ptrs_vec_[ band ] = 
+              &TeDecoderSmartMem::setElement_TeFLOAT;
+            break;
+          }
+        case (TeDOUBLE):
+          {
+            getelement_ptrs_vec_[ band ] = 
+              &TeDecoderSmartMem::getElement_TeDOUBLE;
+            setelement_ptrs_vec_[ band ] = 
+              &TeDecoderSmartMem::setElement_TeDOUBLE;
+            break;
+          }
+        default:
+          {
+            TEAGN_LOG_AND_THROW( "Invalid raster data type" );
+            break;
+          }
+      }
+    }
+  }
+}
+
+
+void TeDecoderSmartMem::dummyFill()
+{
+  TEAGN_DEBUG_CONDITION( 
+    ( params_.status_ != TeRasterParams::TeNotReady),
+    "Raster not Ready" );
+  
+  /* Checking if dummy fill is required */
+  
+  if( ! params_.useDummy_ ) {
+    return;
+  }
+  
+  /* Dummy fill */
+      
+  const unsigned int nlines = (unsigned int )params_.nlines_;
+  const unsigned int ncols = (unsigned int )params_.ncols_;
+
+  unsigned int line = 0;
+  unsigned int col = 0;
+  double double_dummy_value = 0;
+  
+  for( int band = 0 ; band < params_.nBands() ; ++band ) {
+    if( params_.useDummy_ ) {
+      double_dummy_value = params_.dummy_[ band ];
+    } else {
+      double_dummy_value = 0;
+    }
+  
+    switch ( params_.dataType_[ band ] ) {
+      case (TeUNSIGNEDCHAR):
+        {
+          unsigned char dummy_value = (unsigned char)double_dummy_value;
+          unsigned char* line_ptr = 0;
+          
+          for( line = 0 ; line < nlines ; ++line ) {
+            line_ptr = (unsigned char*) man_manager_.getTilePointer( band, 
+              line );
+          
+            for( col = 0 ; col < ncols ; ++col ) {
+              line_ptr[ col ] = dummy_value;
+            }
+          }
+          
+          break;
+        }
+      case (TeCHAR) :
+        {
+          char dummy_value = (char)double_dummy_value;
+          char* line_ptr = 0;
+          
+          for( line = 0 ; line < nlines ; ++line ) {
+            line_ptr = (char*) man_manager_.getTilePointer( band, 
+              line );
+          
+            for( col = 0 ; col < ncols ; ++col ) {
+              line_ptr[ col ] = dummy_value;
+            }
+          }
+          
+          break;
+        }
+      case (TeUNSIGNEDSHORT):
+        {
+          unsigned short dummy_value = (unsigned short)double_dummy_value;
+          unsigned short* line_ptr = 0;
+          
+          for( line = 0 ; line < nlines ; ++line ) {
+            line_ptr = (unsigned short*) man_manager_.getTilePointer( band, 
+              line );
+          
+            for( col = 0 ; col < ncols ; ++col ) {
+              line_ptr[ col ] = dummy_value;
+            }
+          }
+          
+          break;
+        }
+      case (TeSHORT):
+        {
+          short dummy_value = (short)double_dummy_value;
+          short* line_ptr = 0;
+          
+          for( line = 0 ; line < nlines ; ++line ) {
+            line_ptr = (short*) man_manager_.getTilePointer( band, 
+              line );
+          
+            for( col = 0 ; col < ncols ; ++col ) {
+              line_ptr[ col ] = dummy_value;
+            }
+          }
+          
+          break;
+        }
+      case (TeINTEGER):
+        {
+          int dummy_value = (int)double_dummy_value;
+          int* line_ptr = 0;
+          
+          for( line = 0 ; line < nlines ; ++line ) {
+            line_ptr = (int*) man_manager_.getTilePointer( band, 
+              line );
+          
+            for( col = 0 ; col < ncols ; ++col ) {
+              line_ptr[ col ] = dummy_value;
+            }
+          }
+          
+          break;
+        }
+      case (TeUNSIGNEDLONG):
+        {
+          unsigned long dummy_value = (unsigned long)double_dummy_value;
+          unsigned long* line_ptr = 0;
+          
+          for( line = 0 ; line < nlines ; ++line ) {
+            line_ptr = (unsigned long*) man_manager_.getTilePointer( band, 
+              line );
+          
+            for( col = 0 ; col < ncols ; ++col ) {
+              line_ptr[ col ] = dummy_value;
+            }
+          }
+          
+          break;
+        }
+      case (TeLONG):
+        {
+          long dummy_value = (long)double_dummy_value;
+          long* line_ptr = 0;
+          
+          for( line = 0 ; line < nlines ; ++line ) {
+            line_ptr = (long*) man_manager_.getTilePointer( band, 
+              line );
+          
+            for( col = 0 ; col < ncols ; ++col ) {
+              line_ptr[ col ] = dummy_value;
+            }
+          }
+          
+          break;
+        }
+      case (TeFLOAT):
+        {
+          float dummy_value = (float)double_dummy_value;
+          float* line_ptr = 0;
+          
+          for( line = 0 ; line < nlines ; ++line ) {
+            line_ptr = (float*) man_manager_.getTilePointer( band, 
+              line );
+          
+            for( col = 0 ; col < ncols ; ++col ) {
+              line_ptr[ col ] = dummy_value;
+            }
+          }
+          
+          break;
+        }
+      case (TeDOUBLE):
+        {
+          double* line_ptr = 0;
+          
+          for( line = 0 ; line < nlines ; ++line ) {
+            line_ptr = (double*) man_manager_.getTilePointer( band, 
+              line );
+          
+            for( col = 0 ; col < ncols ; ++col ) {
+              line_ptr[ col ] = double_dummy_value;
+            }
+          }
+          
+          break;
+        }
+      default:
+        {
+          TEAGN_LOG_AND_THROW( "Invalid raster data type" );
+          break;
+        }
+    }
+  }  
+}
+
+
+inline void TeDecoderSmartMem::setElement_TeUNSIGNEDCHAR( const int& col, 
+  const int& lin, const double& val, const int& band )
+{
+  *( ( (unsigned char*)man_manager_.getTilePointer( band, lin ) ) + col ) = 
+    (unsigned char)val;
+}
+
+
+inline void TeDecoderSmartMem::setElement_TeCHAR(const int& col, 
+  const int& lin, const double& val, const int& band )
+{
+  *( ( (char*)man_manager_.getTilePointer( band, lin ) ) + col ) = 
+    (char)val;  
+}
+
+
+inline void TeDecoderSmartMem::setElement_TeUNSIGNEDSHORT(const int& col, 
+  const int& lin, const double& val, const int& band )
+{
+  *( ( (unsigned short*)man_manager_.getTilePointer( band, lin ) ) + col ) = 
+    (unsigned short)val;  
+}
+
+
+inline void TeDecoderSmartMem::setElement_TeSHORT(const int& col, 
+  const int& lin, const double& val, const int& band )
+{
+  *( ( (short*)man_manager_.getTilePointer( band, lin ) ) + col ) = 
+    (short)val;
+}
+
+
+inline void TeDecoderSmartMem::setElement_TeINTEGER(const int& col, 
+  const int& lin, const double& val, const int& band )
+{
+  *( ( (int*)man_manager_.getTilePointer( band, lin ) ) + col ) = 
+    (int)val;
+}
+
+
+inline void TeDecoderSmartMem::setElement_TeUNSIGNEDLONG(const int& col, 
+  const int& lin, const double& val, const int& band )
+{
+  *( ( (unsigned long*)man_manager_.getTilePointer( band, lin ) ) + col ) = 
+    (unsigned long)val;  
+}
+
+
+inline void TeDecoderSmartMem::setElement_TeLONG(const int& col, 
+  const int& lin, const double& val, const int& band )
+{
+  *( ( (long*)man_manager_.getTilePointer( band, lin ) ) + col ) = 
+    (long)val;  
+}
+
+
+inline void TeDecoderSmartMem::setElement_TeFLOAT(const int& col, 
+  const int& lin, const double& val, const int& band )
+{
+  *( ( (float*)man_manager_.getTilePointer( band, lin ) ) + col ) = 
+    (float)val;    
+}
+
+
+inline void TeDecoderSmartMem::setElement_TeDOUBLE(const int& col, 
+  const int& lin, const double& val, const int& band )
+{
+  *( ( (double*)man_manager_.getTilePointer( band, lin ) ) + col ) = val;    
+}
+
+
+inline void TeDecoderSmartMem::getElement_TeUNSIGNEDCHAR( const int& col, 
+  const int& lin, double& val, const int& band )
+{
+  val = (double)( *( ( (unsigned char*)man_manager_.getTilePointer( band, 
+    lin ) ) + col ) );
+}
+
+
+inline void TeDecoderSmartMem::getElement_TeCHAR(const int& col, 
+  const int& lin, double& val, const int& band )
+{
+  val = (double)( *( ( (char*)man_manager_.getTilePointer( band, 
+    lin ) ) + col ) );
+}
+
+
+inline void TeDecoderSmartMem::getElement_TeUNSIGNEDSHORT(const int& col, 
+  const int& lin, double& val, const int& band )
+{
+  val = (double)( *( ( (unsigned short*)man_manager_.getTilePointer( band, 
+    lin ) ) + col ) );
+}
+
+
+inline void TeDecoderSmartMem::getElement_TeSHORT(const int& col, 
+  const int& lin, double& val, const int& band )
+{
+  val = (double)( *( ( (short*)man_manager_.getTilePointer( band, 
+    lin ) ) + col ) );
+}
+
+
+inline void TeDecoderSmartMem::getElement_TeINTEGER(const int& col, 
+  const int& lin, double& val, const int& band )
+{
+  val = (double)( *( ( (int*)man_manager_.getTilePointer( band, 
+    lin ) ) + col ) );
+}
+
+
+inline void TeDecoderSmartMem::getElement_TeUNSIGNEDLONG(const int& col, 
+  const int& lin, double& val, const int& band )
+{
+  val = (double)( *( ( (unsigned long*)man_manager_.getTilePointer( band, 
+    lin ) ) + col ) );
+}
+
+
+inline void TeDecoderSmartMem::getElement_TeLONG(const int& col, 
+  const int& lin, double& val, const int& band )
+{
+  val = (double)( *( ( (long*)man_manager_.getTilePointer( band, 
+    lin ) ) + col ) );
+}
+
+
+inline void TeDecoderSmartMem::getElement_TeFLOAT(const int& col, 
+  const int& lin, double& val, const int& band )
+{
+  val = (double)( *( ( (float*)man_manager_.getTilePointer( band, 
+    lin ) ) + col ) );
+}
+
+
+inline void TeDecoderSmartMem::getElement_TeDOUBLE(const int& col, 
+  const int& lin, double& val, const int& band )
+{
+  val = ( *( ( (double*)man_manager_.getTilePointer( band, 
+    lin ) ) + col ) );
+}
+
diff --git a/src/terralib/kernel/TeDecoderSmartMem.h b/src/terralib/kernel/TeDecoderSmartMem.h
new file mode 100755
index 0000000..e2abcc8
--- /dev/null
+++ b/src/terralib/kernel/TeDecoderSmartMem.h
@@ -0,0 +1,382 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeDecoderSmartMem.h
+    \brief This file deals with decoding of raster structures as a mulitdimensional matrix in memory
+*/
+#ifndef  __TERRALIB_INTERNAL_DECODERSMARTMEM_H
+#define  __TERRALIB_INTERNAL_DECODERSMARTMEM_H
+
+#include "TeDecoder.h"
+#include "TeRasterMemManager.h"
+#include "TeAgnostic.h"
+
+/** 
+ * @brief Implements a decoder to a raster stored as a as a mulitdimensional 
+ * matrix in memory.
+ * @note The used memory ( RAM or mapped memory ) will be automatically choosed
+ * following the current system resources.
+ * @note No interleaving support.
+ */
+class TL_DLL TeDecoderSmartMem : public TeDecoder
+{
+
+public:
+
+  //! @brief Empty constructor
+  TeDecoderSmartMem ();
+
+  //! @brief Constructor from parameters
+  TeDecoderSmartMem ( const TeRasterParams& par );
+
+  //! @brief Destructor
+  virtual ~TeDecoderSmartMem ();
+
+  //! @brief Sets the value of a specific raster element 
+  /*!
+    \param col  element column identifier
+    \param lin  element line identifier
+    \param val  element value being inserted
+    \param band element band identifier
+  */  
+  inline bool setElement (int col,int lin, double val, int band=0)
+  {
+    TEAGN_DEBUG_CONDITION( ( setelement_ptrs_vec_ != 0 ),
+      "invalid setElement function pointers vector" )
+    TEAGN_DEBUG_CONDITION( ( col < params_.ncols_ ),
+      "Invalid number of columns" )
+    TEAGN_DEBUG_CONDITION( ( lin < params_.nlines_ ),
+      "Invalid number of lines" )
+    TEAGN_DEBUG_CONDITION( ( band < params_.nBands() ),
+      "Invalid band" )
+    TEAGN_DEBUG_CONDITION( 
+      ( params_.status_ != TeRasterParams::TeNotReady),
+      "Raster not Ready" );      
+    
+    ( this->*( setelement_ptrs_vec_[ band ] ) )( col, lin, val, band );
+  
+    return true;  
+  };
+  
+  //! @brief Gets an specific element (col, lin, band) of a raster data
+  /*!
+    \param col  element column identifier
+    \param lin  element line identifier
+    \param val  element value being retrieved
+    \param band element band identifier
+  */  
+  inline bool getElement (int col,int lin, double &val,int band=0)
+  {
+    TEAGN_DEBUG_CONDITION( ( getelement_ptrs_vec_ != 0 ),
+      "invalid getElement function pointers vector" )
+    TEAGN_DEBUG_CONDITION( ( col < params_.ncols_ ),
+      "Invalid number of columns" )
+    TEAGN_DEBUG_CONDITION( ( lin < params_.nlines_ ),
+      "Invalid number of lines" )
+    TEAGN_DEBUG_CONDITION( ( band < params_.nBands() ),
+      "Invalid band" )    
+    TEAGN_DEBUG_CONDITION( 
+      ( params_.status_ != TeRasterParams::TeNotReady),
+      "Raster not Ready" );      
+    
+    ( this->*( getelement_ptrs_vec_[ band ] ) )( col, lin, val, band );
+    
+    return true;  
+  };
+
+  //! @brief Initializes the internal structures of the decoder
+  virtual void  init  ();
+  
+  //! @brief Clears its internal structures
+  virtual bool  clear  ();
+
+protected:
+
+  /**
+   * @brief Type definition for the getElement function pointer.
+   *
+   * @param line Line.
+   * @param col Column.
+   * @param band Band.
+   * @param val Pixel value.
+   */      
+  typedef void (TeDecoderSmartMem::*GetEleFunctPtrT)( const int& col,
+    const int& lin, double& val, const int& band );
+
+  /**
+   * @brief Type definition for the setElement function pointer.
+   *
+   * @param line Line.
+   * @param col Column.
+   * @param band Band.
+   * @param val Pixel value.
+   */      
+  typedef void (TeDecoderSmartMem::*SetEleFunctPtrT)( const int& col, 
+    const int& lin, const double& val, const int& band );
+  
+  /**
+   * @brief Internal memory manager instance.
+   */
+  TeRasterMemManager man_manager_;
+
+  /**
+   * @brief A vector of pointers to the current getElement method following the 
+   * current data bype of each band (indexed by the band index).
+   */
+  GetEleFunctPtrT* getelement_ptrs_vec_;
+
+  /**
+   * @brief A vector of pointers to the current setElement method following the 
+   * current data bype of each band (indexed by the band index).
+   */
+  SetEleFunctPtrT* setelement_ptrs_vec_;
+  
+  /**
+   * @brief Set all internal variables to their initial values.
+   */   
+  void initVars();
+  
+  /**
+   * @brief Update the function pointers vectors using the current
+   * raster parameters.
+   */   
+  void updateFuncPtrVectors();  
+  
+  /**
+   * @brief Fill data with dummy values.
+   */   
+  void dummyFill();    
+
+  /**
+   * @brief Method overload.
+   *
+   * @param lin Line.
+   * @param col Column.
+   * @param band Band.
+   * @param val Pixel value.
+   */      
+  inline void setElement_TeUNSIGNEDCHAR( const int& col, const int& lin, 
+    const double& val, const int& band );
+  
+  /**
+   * @brief Method overload.
+   *
+   * @param lin Line.
+   * @param col Column.
+   * @param band Band.
+   * @param val Pixel value.
+   */      
+  inline void setElement_TeCHAR( const int& col, const int& lin, 
+    const double& val, const int& band );  
+
+  /**
+   * @brief Method overload.
+   *
+   * @param lin Line.
+   * @param col Column.
+   * @param band Band.
+   * @param val Pixel value.
+   */      
+  inline void setElement_TeUNSIGNEDSHORT( const int& col, const int& lin, 
+    const double& val, const int& band );
+
+  /**
+   * @brief Method overload.
+   *
+   * @param lin Line.
+   * @param col Column.
+   * @param band Band.
+   * @param val Pixel value.
+   */      
+  inline void setElement_TeSHORT( const int& col, const int& lin, 
+    const double& val, const int& band );
+
+  /**
+   * @brief Method overload.
+   *
+   * @param lin Line.
+   * @param col Column.
+   * @param band Band.
+   * @param val Pixel value.
+   */      
+  inline void setElement_TeINTEGER( const int& col, const int& lin, 
+    const double& val, const int& band );
+
+  /**
+   * @brief Method overload.
+   *
+   * @param lin Line.
+   * @param col Column.
+   * @param band Band.
+   * @param val Pixel value.
+   */      
+  inline void setElement_TeUNSIGNEDLONG( const int& col, const int& lin, 
+    const double& val, const int& band );
+
+  /**
+   * @brief Method overload.
+   *
+   * @param lin Line.
+   * @param col Column.
+   * @param band Band.
+   * @param val Pixel value.
+   */      
+  inline void setElement_TeLONG( const int& col, const int& lin, 
+    const double& val, const int& band );
+
+  /**
+   * @brief Method overload.
+   *
+   * @param lin Line.
+   * @param col Column.
+   * @param band Band.
+   * @param val Pixel value.
+   */      
+  inline void setElement_TeFLOAT( const int& col, const int& lin, 
+    const double& val, const int& band );
+
+  /**
+   * @brief Method overload.
+   *
+   * @param lin Line.
+   * @param col Column.
+   * @param band Band.
+   * @param val Pixel value.
+   */      
+  inline void setElement_TeDOUBLE( const int& col, const int& lin, 
+    const double& val, const int& band );
+  
+  /**
+   * @brief Method overload.
+   *
+   * @param lin Line.
+   * @param col Column.
+   * @param band Band.
+   * @param val Pixel value.
+   */      
+  inline void getElement_TeUNSIGNEDCHAR( const int& col, const int& lin, 
+    double& val, const int& band );
+  
+  /**
+   * @brief Method overload.
+   *
+   * @param lin Line.
+   * @param col Column.
+   * @param band Band.
+   * @param val Pixel value.
+   */      
+  inline void getElement_TeCHAR( const int& col, const int& lin, 
+    double& val, const int& band );  
+
+  /**
+   * @brief Method overload.
+   *
+   * @param lin Line.
+   * @param col Column.
+   * @param band Band.
+   * @param val Pixel value.
+   */      
+  inline void getElement_TeUNSIGNEDSHORT( const int& col, const int& lin, 
+    double& val, const int& band );
+
+  /**
+   * @brief Method overload.
+   *
+   * @param lin Line.
+   * @param col Column.
+   * @param band Band.
+   * @param val Pixel value.
+   */      
+  inline void getElement_TeSHORT( const int& col, const int& lin, 
+    double& val, const int& band );
+
+  /**
+   * @brief Method overload.
+   *
+   * @param lin Line.
+   * @param col Column.
+   * @param band Band.
+   * @param val Pixel value.
+   */      
+  inline void getElement_TeINTEGER( const int& col, const int& lin, 
+    double& val, const int& band );
+
+  /**
+   * @brief Method overload.
+   *
+   * @param lin Line.
+   * @param col Column.
+   * @param band Band.
+   * @param val Pixel value.
+   */      
+  inline void getElement_TeUNSIGNEDLONG( const int& col, const int& lin, 
+    double& val, const int& band );
+
+  /**
+   * @brief Method overload.
+   *
+   * @param lin Line.
+   * @param col Column.
+   * @param band Band.
+   * @param val Pixel value.
+   */      
+  inline void getElement_TeLONG( const int& col, const int& lin, 
+    double& val, const int& band );
+
+  /**
+   * @brief Method overload.
+   *
+   * @param line Line.
+   * @param col Column.
+   * @param band Band.
+   * @param val Pixel value.
+   */      
+  inline void getElement_TeFLOAT( const int& col, const int& lin, 
+    double& val, const int& band );
+
+  /**
+   * @brief Method overload.
+   *
+   * @param lin Line.
+   * @param col Column.
+   * @param band Band.
+   * @param val Pixel value.
+   */      
+  inline void getElement_TeDOUBLE( const int& col, const int& lin, 
+    double& val, const int& band );  
+  
+};
+
+//! Implements a factory to build decoder to MEMORY raster
+class TL_DLL TeDecoderSmartMemFactory : public TeDecoderFactory
+{
+public:
+
+  //! Factory constructor
+  TeDecoderSmartMemFactory(const string& name) : TeDecoderFactory(name) {}
+
+  //! Builds the object
+  virtual TeDecoder* build (const TeRasterParams& arg)
+  {  return new TeDecoderSmartMem(arg); }
+};
+#endif
+
diff --git a/src/terralib/kernel/TeDecoderTIFF.cpp b/src/terralib/kernel/TeDecoderTIFF.cpp
old mode 100644
new mode 100755
index 831551f..8e7e4ac
--- a/src/terralib/kernel/TeDecoderTIFF.cpp
+++ b/src/terralib/kernel/TeDecoderTIFF.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright © 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -22,51 +22,58 @@ of this library and its documentation.
 *************************************************************************************/
 
 #include "TeDecoderTIFF.h"
-#include "TeGeometryAlgorithms.h"
-#include "TeRaster.h"
-#include "TeDecoderMemory.h"
-#ifdef WIN32
-#include <io.h>
-#endif
+#include "TeUtils.h"
+#include "TeException.h"
+#include <geovalues.h>
+#include <geo_normalize.h>
+#include <geo_tiffp.h>
 
-#if !defined(WIN32)
-#include <sys/param.h>
-#endif 
+#include <fstream>
+#include <cassert>
+using std::ifstream;
+using std::ofstream;
 
 // ---- Public Methods ----- 
 
-TeDecoderTIFF::TeDecoderTIFF(const TeRasterParams& par)
+TeDecoderTIFF::TeDecoderTIFF(const TeRasterParams& par):
+	tif(0),
+	gtif(0),
+	dataBuffer_(0),
+	nplanes_(0),
+	isGeoTiff_(false),
+	TImage_(0),
+	planar_(PLANARCONFIG_CONTIG),
+	isTiled_(false),
+	tilew_(0),
+	tileh_(0),
+	tilesacross_(0),
+	bytespertile_(0),
+	TCurTile_(-1),
+	rowsperstrip_(0),
+	nstripsperplane_(0),
+	stripsize_(0),
+	TCurStrip_(-1),
+	nBands_(1),
+	data_TeUNSIGNEDCHAR_(0), 
+	data_TeCHAR_(0),   
+	data_TeUNSIGNEDSHORT_(0),  
+	data_TeSHORT_(0),   
+	data_TeINTEGER_(0),   
+	data_TeUNSIGNEDLONG_(0),   
+	data_TeLONG_(0),  
+	data_TeFLOAT_(0), 
+	data_TeDOUBLE_(0)  
 {
 	params_ = par;
-	TImage = -1;
-	TCurLine_ = -1;
-	first = 1;
-	TBuffer_ = 0;
-	TBufferTile_ = 0;
-	nBands_ = par.nBands();
-	params_.status_= TeNOTREADY;
-
-	bytesperline_ = 0;
-	rowtilesize_  = 0;
-	tilew_ = 0;
-	tileh_ = 0;
-	bytespertile_ = 0;
-
-	tif = 0;
-	gtif = 0;
-	
-	char tifmode = 'r';
-	if (params_.mode_=='c')
-	{
-		tifmode = 'a';
-	}
-	else if (params_.mode_ == 'r')
-	{// if file should exist already read tiff/geotiff parameters
-		tif=XTIFFOpen(params_.fileName_.c_str(),&tifmode);
+	params_.status_= TeRasterParams::TeNotReady;
+	if (params_.mode_ == 'r')		// file should exists
+	{								// read tiff/geotiff parameters
+		tif=XTIFFOpen(params_.fileName_.c_str(),"r");
 		if (!tif)
 			return;
+
 		gtif = (GTIF*)GTIFNew(tif);
-		ReadTiffDirectory();
+		readTiffDirectory();
 		if (gtif)
 		{
 			GTIFFree(gtif);
@@ -85,63 +92,109 @@ void
 TeDecoderTIFF::init()
 {
 	clear();		// reset existent internal structures
+	params_.status_= TeRasterParams::TeNotReady;
 
-	params_.status_= TeNOTREADY;
-	char tifmode;	// libtiff mode
+	// TIFF image files may not be opened for both reading and writing; 
+	// there is no support for altering the contents of a TIFF file. So
+	// mode == 'w' never initializes this decoder.
+	if (params_.mode_ == 'w')
+	{
+		params_.errorMessage_ = "There is no support for altering the contents of a TIFF file.";
+		return;
+	}
+	if (params_.mode_ != 'r' && params_.mode_ != 'c')	// unknown mode
+	{
+		params_.errorMessage_ = "Invalid access mode.";
+		return;
+	}
 
 	// check the initial permissions on the file
 	if (params_.mode_ == 'c')		// creating a new raster file
 	{
-		if (access(params_.fileName_.c_str(),00) != -1)  // try to remove existing file
-			if (unlink(params_.fileName_.c_str()) == -1)
-				return;
-		tifmode = 'a';
-		params_.status_ = TeREADYTOWRITE;
+		ofstream dataFile(params_.fileName_.c_str()); // try to (re)create the file
+		if (!dataFile)
+		{
+			params_.errorMessage_ = "Fail to (re)create the raster the file:" + params_.fileName_;
+			return;
+		}
+		dataFile.close();
+		memManager_.updateParams(params_);
+		memManager_.params().decoderIdentifier_ = "SMARTMEM";
+		memManager_.params().mode_ = 'c';
+		memManager_.init();
+		if (memManager_.params().status_ != TeRasterParams::TeReadyToWrite)
+		{
+			params_.errorMessage_ = "Fail to create the raster the file:" + params_.fileName_;
+			return;
+		}
+		else
+			params_.status_ = TeRasterParams::TeReadyToWrite;
+
+		tif=XTIFFOpen(params_.fileName_.c_str(),"a");
+		if (!tif)
+		{
+			params_.errorMessage_ = "Fail to create a tiff file.";
+			params_.status_= TeRasterParams::TeNotReady;
+			return;
+		}
+
+		// try to create a geotiff instance on the tiff file 
+		gtif = (GTIF*)GTIFNew(tif);
+		if (!gtif)
+		{
+			params_.errorMessage_ = "Fail to instantiate a geotiff file.";
+			params_.status_= TeRasterParams::TeNotReady;
+			return;
+		}
+		return;
 	}
-	else if ( params_.mode_ == 'r' )
+	
+	ifstream dataFile(params_.fileName_.c_str()); // check if file exists
+	if (!dataFile)
 	{
-		if (access(params_.fileName_.c_str(),04) == -1)
-			return;							// there is no permission to read
-		tifmode = 'r';
-		params_.status_ = TeREADYTOREAD;
+		params_.errorMessage_ = "Fail to open the raster the file:" + params_.fileName_;
+		return; 
 	}
-	// TIFF image files may not be opened for both reading and writing; 
-	// there is no support for altering the contents of a TIFF file. So
-	// mode == 'w' never initializes this decoder.
-	else if (params_.mode_ == 'w')
+	dataFile.close();				
+	// try to open the tiff file with the desired mode
+	tif=XTIFFOpen(params_.fileName_.c_str(),"r");
+	if (!tif)
 	{
-		params_.status_= TeNOTREADY;
+		params_.errorMessage_ = "Fail to instantiate a tiff file.";
 		return;
 	}
-	else	// unknown mode
-		return;
 
-	// try to open the tiff file with the desired mode
-	tif=XTIFFOpen(params_.fileName_.c_str(),&tifmode);
-	if (!tif)
+	isTiled_ = TIFFIsTiled(tif) != 0;						// return non-zero if is organized in tiles 
+	TIFFGetField(tif,TIFFTAG_PLANARCONFIG,&planar_);	// storage organization
+	if (isTiled_ && (planar_== PLANARCONFIG_SEPARATE))
 	{
-		params_.status_= TeNOTREADY;
+		XTIFFClose(tif); 
+		tif = 0;
+		params_.errorMessage_ = "There is no support to decode tiff files that are tiled and organized in separate planes.";
 		return;
 	}
 
 	// try to create a geotiff instance on the tiff file 
 	gtif = (GTIF*)GTIFNew(tif);
-	if (!tif)
+	if (!gtif)
 	{
-		params_.status_= TeNOTREADY;
+		XTIFFClose(tif); 
+		tif = 0;
+		params_.errorMessage_ = "Fail to instantiate a geotiff file.";
 		return;
 	}
-
-	if (params_.mode_ == 'c')	// if geotiff is being created we should set the geo flags
-		SetGeoKeys();
-	
-	ReadTiffDirectory();		// read the tiff geokeys
-	AllocateBuffer();				// allocate the internal buffers
-	if (params_.mode_ == 'c' && 	// if a new image writes creates a dummy image
-		!WriteDummyImage())			// if couldn�t write dummy image there is an error
+	readTiffDirectory();			// read tiff keys
+	getGeoTIFF();					// read geotiff keys
+	params_.errorMessage_.clear();
+	if (allocateWorkMemory())
+		params_.status_ = TeRasterParams::TeReadyToRead;
+	else
 	{
-		params_.status_= TeNOTREADY;		 
-		return;
+		XTIFFClose(tif); 
+		tif = 0;
+		GTIFFree(gtif);
+		gtif = 0;
+		params_.errorMessage_ = "Fail to allocate necessary work memory.";
 	}
 }
 
@@ -149,30 +202,98 @@ TeDecoderTIFF::init()
 bool 
 TeDecoderTIFF::clear()
 {
-	if (tif && params_.mode_=='c' && TCurLine_ >= 0)	//  if we have been 
-	{													//	writting save the last 
-		tif->tif_curoff = 0;
-		int cc = TIFFStripSize(tif);
-		TIFFWriteStrip(tif,TCurLine_,TBuffer_,cc);
+	if (!tif || !gtif)
+		return true;
+    
+  TeRasterParams& mmpars = memManager_.params();  
+
+	if (mmpars.mode_== 'c')
+	{
+		setGeoKeys();
+		int row, col, b;
+		double val=0.0;
+		int nb = mmpars.nBands();
+		long ssize = TIFFScanlineSize(tif);
+		unsigned char* obuf = (unsigned char*)_TIFFmalloc(ssize);
+    
+		for (row=0; row<mmpars.nlines_; ++row)
+		{
+			for (col=0; col<mmpars.ncols_; ++col)
+			{			
+				for (b=0; b<nb; ++b)
+				{
+					if (!memManager_.getElement(col,row,val,b))
+						continue;
+
+					if (mmpars.dataType_[0] == TeDOUBLE)			
+					{
+						((double*)obuf)[col*nb+b] = (double)val;
+					}
+					else if (mmpars.dataType_[0] == TeFLOAT)			
+					{
+						((float*)obuf)[col*nb+b] = (float)val;
+					}
+					else if (mmpars.dataType_[0] == TeLONG)	
+					{
+						((long*)obuf)[col*nb+b] = (long)val;
+					}
+					else if (mmpars.dataType_[0] == TeUNSIGNEDLONG)	
+					{
+						((unsigned long*)obuf)[col*nb+b] = (unsigned long)val;
+					}
+					else if (mmpars.dataType_[0] == TeINTEGER)	
+					{
+						((int*)obuf)[col*nb+b] = (int)val;
+					}
+					else if (mmpars.dataType_[0] == TeUNSIGNEDSHORT)	
+					{
+						((unsigned short*)obuf)[col*nb+b] = (unsigned short)val;
+					}
+					else if (mmpars.dataType_[0] == TeSHORT)	
+					{
+						((short*)obuf)[col*nb+b] = (short)val;
+					}
+					else if (mmpars.dataType_[0] == TeCHAR)											
+					{
+						obuf[col*nb+b] = (char)val;
+					}
+					else											
+					{
+						obuf[col*nb+b] = (unsigned char)val;
+					}
+
+				}
+			}
+			if (!TIFFWriteScanline(tif, obuf, row, 0))
+			{
+				TIFFFlushData(tif);
+				_TIFFfree(obuf);
+				return false;
+			}
+		}
+		TIFFFlushData(tif);
+		_TIFFfree(obuf);
+	}
+	
+	if (dataBuffer_)
+	{
+		for (unsigned int p=0; p<nplanes_; ++p)
+			delete []dataBuffer_[p];
+		delete []dataBuffer_;
 	}
+	dataBuffer_ = 0;
+
 	if (gtif)
 		GTIFFree(gtif);
+	gtif = 0;
+
 	if (tif)
 		XTIFFClose(tif); 
-
 	tif = 0;
-	gtif = 0;
-	first = 0;
-	TImage = -1;
-	TCurLine_ = -1;
-	bytesperline_ = 0;
-	rowtilesize_  = 0;
-	tilew_ = 0;
-	tileh_ = 0;
-	bytespertile_ = 0;
-
-	DeallocateBuffer();
-	params_.status_ = TeNOTREADY;
+
+	memManager_.clear();
+	params_.status_ = TeRasterParams::TeNotReady;
+	params_.errorMessage_.clear();
 	return true;
 }
 
@@ -182,181 +303,401 @@ TeDecoderTIFF::~TeDecoderTIFF()
 }
 
 bool
+TeDecoderTIFF::setElement(int col, int lin, double val, int band)
+{
+	return memManager_.setElement(col,lin,val,band);
+}
+
+
+bool
 TeDecoderTIFF::getElement(int col,int lin, double &val,int band)
 {
-	if (TCurLine_ != (int)lin)		// if line is not the current
+	unsigned int pos;
+	unsigned long plane;
+	if (isTiled_)  // tiled organization
 	{
-		if (TImage == MONOIMAGE || TImage == PALLETEIMAGE)
+		if (TCurTile_ != (long)(lin/tileh_))
 		{
-			if (TIFFReadScanline(tif,TBuffer_,lin,0) < 0)
+			if (!readTileImageContig(lin/tileh_))
 				return false;
+			else
+				TCurTile_ = (long)(lin/tileh_);
 		}
-		else // RGB image
+		plane = (col/tilew_);
+		lin = lin - TCurTile_*tileh_;
+		col = col - (int)(col/tilew_)*tilew_;
+		pos = lin*tilew_*nBands_+col*nBands_+band; 
+	}	
+	else			// striped organization
+	{
+		if (TCurStrip_ != (long)(lin/rowsperstrip_))
 		{
-			if (planar_ == PLANARCONFIG_CONTIG)
-			{
-				if (isTiled_)
-				{
-					if(!ReadTileImageContig(lin,TBuffer_))
-						return false;
-				}
-				else
-				{
-					if (TIFFReadScanline(tif,TBuffer_,lin,0) < 0)
-						return false;
-				}
-			}
-			else	// RGB Separate
-			{
-				if (isTiled_)  return false; // SEPARATE and tiled => Error!
-				for (int s=0; s < nBands_; s++)
-					if (TIFFReadScanline(tif,&TBuffer_[s*params_.ncols_*params_.elementSize(s)],lin,s) < 0)
-						return false;
-			}
+			if (!readStrip(lin/rowsperstrip_)) // strip is not in memory
+				return false;
+			else
+				TCurStrip_ = (long)(lin/rowsperstrip_);
+		}
+		lin = lin-(TCurStrip_*rowsperstrip_);
+		plane = 0;
+		if (planar_ == PLANARCONFIG_CONTIG)
+		{
+			pos = lin*params_.ncols_*nBands_+col*nBands_+band;
+		}
+		else
+		{
+			pos = lin*params_.ncols_+col;
+			plane = band;
 		}
-		TCurLine_ = lin;
 	}
-	int pos;
-	if (planar_ == PLANARCONFIG_CONTIG)
-		pos = col*nBands_+band;
-	else
-		pos = band*params_.ncols_+col;
-
-	if (params_.dataType_[band] == TeFLOAT)			// 32 bits
-		val = ((float*)TBuffer_)[pos];
-	else if (params_.dataType_[band] == TeSHORT)	// 16 bits
-		val = ((short*)TBuffer_)[pos];
-	else											// 8 bits
-		val = TBuffer_[pos];
+	(this->*( getelement_ptr_))(plane,pos,val);
 	return true;
 }
 
 
-// We allow writting only to a strip based, non compressed tiff file
-bool
-TeDecoderTIFF::setElement(int col, int lin, double val, int band)
+// --- Internal Methods ---
+void
+TeDecoderTIFF::readTiffDirectory()
 {
-	int strip = lin/rowsperstrip_;
-	if (strip != TCurLine_)
+	int ncols=0, nlins = 0;
+	TIFFGetField(tif,TIFFTAG_IMAGEWIDTH,&ncols);
+	TIFFGetField(tif,TIFFTAG_IMAGELENGTH,&nlins);
+	params_.ncols_ = ncols;
+	params_.nlines_ = nlins;
+		
+	short samplesperPixel;
+	if (!TIFFGetField(tif,TIFFTAG_SAMPLESPERPIXEL,&samplesperPixel) )
+		params_.nBands(1);
+	else
+		params_.nBands(samplesperPixel);
+	nBands_ = params_.nBands();
+
+	unsigned long nbitsperpixel_ = 0;
+	if( !TIFFGetField(tif,TIFFTAG_BITSPERSAMPLE,&nbitsperpixel_) )
 	{
-		if (TCurLine_ >= 0)
-		{
-			tif->tif_curoff = 0;
-			int cc = TIFFStripSize(tif);
-			TIFFWriteStrip(tif,TCurLine_,TBuffer_,cc);
-		}
-		TCurLine_ = strip;
+		nbitsperpixel_ = 1;
+		params_.setDataType(TeBIT);
+	}
+	else
+	{
+		short sampleformat;
+		if (!TIFFGetField(tif,TIFFTAG_SAMPLEFORMAT,&sampleformat))
+			sampleformat = 0;
 
-		int l = strip * rowsperstrip_;
-		bool res = false;
-		if (TImage == MONOIMAGE || TImage == PALLETEIMAGE)
+		TeDataType tifType;
+		if (nbitsperpixel_ == 8)
 		{
-			tif->tif_curstrip = 0;
-			res = ReadMonoImage(l);
+			if (sampleformat == SAMPLEFORMAT_INT)
+				tifType = TeCHAR;
+			else 
+				tifType = TeUNSIGNEDCHAR;
 		}
-		else if(TImage == RGBIMAGE)
+		else if (nbitsperpixel_ == 16)
 		{
-			tif->tif_curstrip = 0;
-			res = ReadRGBImage (l);
+			if (sampleformat == SAMPLEFORMAT_INT)
+				tifType = TeSHORT;
+			else 
+				tifType = TeUNSIGNEDSHORT;
 		}
-		if (!res)
+		else if (nbitsperpixel_ == 32)
 		{
-			TCurLine_ = -1;
-			return false;
+			if (sampleformat == SAMPLEFORMAT_INT)
+				tifType = TeLONG;
+			else if (sampleformat == SAMPLEFORMAT_UINT)
+				tifType = TeUNSIGNEDLONG;
+			else
+				tifType = TeFLOAT;		
 		}
+		else 
+			tifType = TeDOUBLE;
+		params_.setDataType(tifType);
+	}
+	unsigned short	photom_;    // photometric interpretation
+	TIFFGetField(tif,TIFFTAG_PHOTOMETRIC,&photom_);     // photometric interpretation
+	if (samplesperPixel == 3 && 
+	   (photom_ == PHOTOMETRIC_MINISWHITE || 
+	    photom_ == PHOTOMETRIC_MINISBLACK))
+		photom_ = PHOTOMETRIC_RGB;
+	
+	switch (photom_)
+	{
+	case PHOTOMETRIC_PALETTE:
+		params_.setPhotometric(TeRasterParams::TePallete);
+		TImage_ = 2;
+		readLut();
+		break;
+	case PHOTOMETRIC_RGB:
+		params_.setPhotometric(TeRasterParams::TeRGB);
+		TImage_ = 1;
+		break;
+	default:
+		params_.setPhotometric(TeRasterParams::TeMultiBand);
+		TImage_ = 0;
+	}
+	TIFFGetField(tif,TIFFTAG_PLANARCONFIG,&planar_);	// storage organization
+	isTiled_ = TIFFIsTiled(tif) != 0;						// return non-zero if is organized in tiles 
+	if (isTiled_)
+	{
+		TIFFGetField(tif,TIFFTAG_TILEWIDTH,&tilew_);
+		TIFFGetField(tif,TIFFTAG_TILELENGTH,&tileh_);
+		bytespertile_ = TIFFTileSize(tif);
+		tilesacross_ = (params_.ncols_ + tilew_ - 1) / tilew_;
+		params_.blockWidth_ = tilew_;
+		params_.blockWidth_ = tileh_;
+	}
+	else
+	{
+		TIFFGetField(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip_);
+		nstripsperplane_ =  TIFFNumberOfStrips(tif)/nBands_;	
+		stripsize_ = TIFFStripSize(tif);
 	}
-	int offset = lin % rowsperstrip_ * bytesperline_;
-	unsigned char* cp = TBuffer_ + offset;
-	int pos = col*nBands_+band;
-	if (params_.dataType_[band] == TeFLOAT)			// 32 bits
-		((float*)cp)[pos] = (float)val;
-	else if (params_.dataType_[band] == TeSHORT)	// 16 bits
-		((short*)cp)[pos] = (short)val;
-	else											// 8 bits
-		cp[pos] = (unsigned char)val;
-	return true;
-}
 
+	unsigned short compress_;    // photometric interpretation
+	TIFFGetField(tif, TIFFTAG_COMPRESSION, &compress_);
+	if (compress_ != COMPRESSION_NONE)
+		params_.setCompressionMode(TeRasterParams::TeTiffCompression);
 
-// --- Internal Methods ---
+	char* text = "";
+	if(TIFFGetField(tif,TIFFTAG_DATETIME,&text)) //creation date
+	{
+		std::string strDate(text);
+		TeTime imageDate(strDate, TeSECOND, "YYYYsMMsDDsHHsmmsSS24", ":");
+		if(imageDate.isValid())
+		{
+			params_.date_ = imageDate;
+		}
+	}
 
-// --- Methods that deal with Tiff/GeoTiff Flags
+	// Read georeference parameters
+	getGeoTIFF();
+	if (!params_.box().isValid())
+		params_.lowerLeftResolutionSize(0.5,0.5,1,1,params_.ncols_,params_.nlines_);
+}
 
-void TeDecoderTIFF :: SetGeoKeys()
+bool 
+TeDecoderTIFF::allocateWorkMemory()
 {
+	if (dataBuffer_ && nplanes_>0)	// release previously used buffer
+	{
+		for (unsigned int p=0; p<nplanes_; ++p)
+			delete []dataBuffer_[p];
+		delete []dataBuffer_;
+	}
+	dataBuffer_ = 0;
+	unsigned long buffersize;
+	if (isTiled_)			
+	{
+		nplanes_ = tilesacross_;
+		buffersize = bytespertile_;
+	}
+	else 
+	{
+		if (planar_ == PLANARCONFIG_SEPARATE)
+			nplanes_ = nBands_;
+		else
+			nplanes_ = 1;
+		buffersize = stripsize_;
+	}
 
+	dataBuffer_ = new unsigned char*[nplanes_];
+	unsigned int i;
+	for (i=0; i<nplanes_; ++i)
+	{
+		dataBuffer_[i] = new unsigned char [buffersize];
+		if (!dataBuffer_[i])
+		{
+			for (unsigned int j=0; j<i; ++j)
+				delete []dataBuffer_[j];
+			delete []dataBuffer_;
+			dataBuffer_=0;
+			return false;
+		}
+	}
+	data_TeUNSIGNEDCHAR_ = (unsigned char**)dataBuffer_;
+	data_TeCHAR_ = (char**)dataBuffer_;
+	data_TeUNSIGNEDSHORT_ = (unsigned short**)dataBuffer_;
+	data_TeSHORT_ = (short**)dataBuffer_;
+	data_TeINTEGER_ = (int**)dataBuffer_;
+	data_TeUNSIGNEDLONG_ = (unsigned long**)dataBuffer_;
+	data_TeLONG_ = (long**)dataBuffer_;
+	data_TeFLOAT_ = (float**)dataBuffer_;
+	data_TeDOUBLE_ = (double**)dataBuffer_;
+
+	switch ( params_.dataType_[0] ) 
+	{
+	case (TeUNSIGNEDCHAR):
+		getelement_ptr_ = &TeDecoderTIFF::getElement_TeUNSIGNEDCHAR;
+		break;
+	case (TeCHAR) :
+		getelement_ptr_ = &TeDecoderTIFF::getElement_TeCHAR;
+		break;
+	case (TeUNSIGNEDSHORT):
+		getelement_ptr_ = &TeDecoderTIFF::getElement_TeUNSIGNEDSHORT;
+		break;
+	case (TeSHORT):
+		getelement_ptr_ = &TeDecoderTIFF::getElement_TeSHORT;
+		break;
+	case (TeINTEGER):
+		getelement_ptr_ = &TeDecoderTIFF::getElement_TeINTEGER;
+		break;
+	case (TeUNSIGNEDLONG):
+		getelement_ptr_ = &TeDecoderTIFF::getElement_TeUNSIGNEDLONG;
+		break;
+	case (TeLONG):
+		getelement_ptr_ = &TeDecoderTIFF::getElement_TeLONG;
+		break;
+	case (TeFLOAT):
+		getelement_ptr_ = &TeDecoderTIFF::getElement_TeFLOAT;
+		break;
+	case (TeDOUBLE):
+		getelement_ptr_ = &TeDecoderTIFF::getElement_TeDOUBLE;
+		break;
+	default:
+		throw TeException( UNKNOWN_ERROR_TYPE, "Invalid raster data type", false );
+	}
+	return true;
+}
+void 
+TeDecoderTIFF::setGeoKeys()
+{
+  TeRasterParams& mmparams = memManager_.params();  
+  
 // Image Size
-	TIFFSetField(gtif->gt_tif, TIFFTAG_IMAGEWIDTH, params_.ncols_);
-	TIFFSetField(gtif->gt_tif, TIFFTAG_IMAGELENGTH, params_.nlines_);
+	TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, mmparams.ncols_);
+	TIFFSetField(tif, TIFFTAG_IMAGELENGTH, mmparams.nlines_);
 
 // Orientation
-	TIFFSetField(gtif->gt_tif, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
+	TIFFSetField(tif, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
 
 // Number of bits
-	int nb = params_.nbitsperPixel_[0];
-	TIFFSetField(gtif->gt_tif, TIFFTAG_BITSPERSAMPLE, nb);
-
+	int nb = mmparams.nbitsperPixel_[0];
+	TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, nb);
+	switch (mmparams.dataType_[0]) 
+	{
+		case TeUNSIGNEDCHAR:
+		case TeUNSIGNEDSHORT:
+		case TeUNSIGNEDLONG:
+			TIFFSetField(tif, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_UINT);
+			break;
+		case TeCHAR:
+		case TeSHORT:
+		case TeINTEGER:
+		case TeLONG:
+			TIFFSetField(tif, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_INT);
+			break;
+		case TeFLOAT:
+		case TeDOUBLE:
+			TIFFSetField(tif, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_IEEEFP);
+			break;
+		default:
+			TIFFSetField(tif, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_VOID);
+			break;
+	}
 // Number of bands
-	TIFFSetField(gtif->gt_tif, TIFFTAG_SAMPLESPERPIXEL, nBands_);
+	TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, mmparams.nBands() );
 
 // Compression
-	TIFFSetField(gtif->gt_tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE);
+	TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE);
 
 // Planar configuration
 	TIFFSetField(tif,TIFFTAG_PLANARCONFIG,  PLANARCONFIG_CONTIG);
 
 // Photometric type
-	if (nBands_ == 1) // monobands
+	if (mmparams.nBands() == 1) // monobands
 	{
-		if (params_.photometric_[0] == TeRASTERPALETTE)
+		if (mmparams.photometric_[0] == TeRasterParams::TePallete)
+		{
+			TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_PALETTE);
+			saveLut();
+			TImage_ = 2;
+		} 
+		else 
 		{
-			TIFFSetField(gtif->gt_tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_PALETTE);
-			SaveLut();
-			TImage = PALLETEIMAGE;
+			TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK);
+			TImage_ = 0;
 		}
-		else
+	} 
+	else if (mmparams.nBands() == 3) 
+	{
+		if ( mmparams.photometric_[0] == TeRasterParams::TeRGB ) 
 		{
-			TIFFSetField(gtif->gt_tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK);
-			TImage = MONOIMAGE;
+			TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB);
+			TImage_ = 1;
+		} 
+		else 
+		{
+			TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK);
+			TImage_ = 0;
 		}
-	}
-	else
+	} 
+	else 
 	{
-		TIFFSetField(gtif->gt_tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB);
-		TImage = RGBIMAGE;
+		TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK);
+		TImage_ = 0;
 	}
+	TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 1);
 
-	// Rows per Strip
-	int rowsperstrip = 3;
-//	rowsperstrip = TIFFDefaultStripSize(gtif->gt_tif, rowsperstrip);
-	TIFFSetField(gtif->gt_tif, TIFFTAG_ROWSPERSTRIP, rowsperstrip);
+	if(mmparams.date_.isValid())
+	{
+		std::string creationDate = mmparams.date_.getDateTime("YYYYsMMsDDsHHsmmsSS", ":");
+		TIFFSetField(tif, TIFFTAG_DATETIME, creationDate.c_str());
+	}
 
-	TeProjectionParams paramas = params_.projection()->params();
+	if (mmparams.dxI_ != 0. || mmparams.dyJ_ != 0.) // there is a rotation defined
+	{
+		//	It seems that most viewers are not able to deal with GTIFF_TRANSMATRIX...
+		// ... so let's write a navigation file instead...
+		string tfw = TeGetName(mmparams.fileName_.c_str())+".tfw";
+		FILE* fp = fopen(tfw.c_str(),"w");
+		if (fp)
+		{
+			fprintf(fp,"%.6f\n",mmparams.dxJ_);
+			fprintf(fp,"%.6f\n",mmparams.dyI_);
+			fprintf(fp,"%.6f\n",mmparams.dxI_);
+			fprintf(fp,"%.6f\n",mmparams.dyJ_);
+			fprintf(fp,"%.6f\n",mmparams.x0_);
+			fprintf(fp,"%.6f\n",mmparams.y0_);
+			
+			fclose( fp );
+		}
+	}
+	else // tf there is no rotation use one tie point and pixel scale
+	{
+		double tiepoint[6];
+		tiepoint[0] = 0;
+		tiepoint[1] = 0;
+		tiepoint[2] = 0;
+		tiepoint[3] = mmparams.boundingBox().x1_;
+		tiepoint[4] = mmparams.boundingBox().y2_;
+		tiepoint[5] = 0;
+		TIFFSetField(tif, GTIFF_TIEPOINTS, 6,&tiepoint); 
+
+		double resolution[3];
+		resolution[0] = mmparams.resx_;
+		resolution[1] = mmparams.resy_;
+		resolution[2] = 0;
+		TIFFSetField(tif, GTIFF_PIXELSCALE, 3,&resolution);
+	}
 
-	// Projection parameters
-	GTIFKeySet(gtif, GTRasterTypeGeoKey, TYPE_SHORT, 1, RasterPixelIsArea);
-	double tiepoint[6];
-	TeBox infobox = params_.box();
-	tiepoint[0] =0;
-	tiepoint[1] =0;
-	tiepoint[2] =0;
-	tiepoint[3] = infobox.x1();
-	tiepoint[4] = infobox.y2();
-	tiepoint[5] = 0;
-	double resolution[3];
-	resolution[0] = params_.resx_;
-	resolution[1] = params_.resy_;
-	resolution[2] = 0;
-	TIFFSetField(gtif->gt_tif, GTIFF_TIEPOINTS, 6,&tiepoint); 
-	TIFFSetField(gtif->gt_tif, GTIFF_PIXELSCALE, 3,&resolution);
-
-	string projname = params_.projection()->name();
-	if (projname == "NoProjection")
+	// projection parameters
+	if (!mmparams.projection() || mmparams.projection()->name() == "NoProjection")
 	{
-		GTIFWriteKeys(gtif);				// write so far defined geo keys 
+		// at least try to write a tfw file
+		string tfw = TeGetName(mmparams.fileName_.c_str())+".tfw";
+		FILE* fp = fopen(tfw.c_str(),"w");
+		if (fp)
+		{
+			vector<double> tfw;
+			mmparams.getNavigationParameters(tfw);
+			for (unsigned int nl=0; nl<6; ++nl)
+				fprintf(fp,"%8.4f\n",tfw[nl]);
+				
+		  fclose( fp );
+		}
 		return;
 	}
-
+	GTIFKeySet(gtif, GTRasterTypeGeoKey, TYPE_SHORT, 1, RasterPixelIsArea);
+	const TeProjectionParams& paramas = mmparams.projection()->params();
+	const string& projname = mmparams.projection()->name();
 	if (projname == "LatLong")
 	{
 		GTIFKeySet(gtif, GTModelTypeGeoKey, TYPE_SHORT, 1, ModelTypeGeographic);
@@ -397,8 +738,8 @@ void TeDecoderTIFF :: SetGeoKeys()
 		else if (projname == "Polyconic")
 		{
 			GTIFKeySet(gtif, ProjCoordTransGeoKey, TYPE_SHORT, 1, CT_Polyconic);
-			GTIFKeySet(gtif, ProjFalseOriginLatGeoKey,TYPE_DOUBLE, 1, paramas.lat0*TeCRD);
-			GTIFKeySet(gtif, ProjFalseOriginLongGeoKey, TYPE_DOUBLE, 1, paramas.lon0*TeCRD);
+			GTIFKeySet(gtif, ProjNatOriginLatGeoKey,TYPE_DOUBLE, 1, paramas.lat0*TeCRD);
+			GTIFKeySet(gtif, ProjNatOriginLongGeoKey, TYPE_DOUBLE, 1, paramas.lon0*TeCRD);
 			GTIFKeySet(gtif, ProjFalseEastingGeoKey, TYPE_DOUBLE, 1,paramas.offx);
 			GTIFKeySet(gtif, ProjFalseNorthingGeoKey,TYPE_DOUBLE, 1,paramas.offy);
 			GTIFKeySet(gtif, ProjScaleAtNatOriginGeoKey, TYPE_DOUBLE,1,paramas.scale);
@@ -415,25 +756,25 @@ void TeDecoderTIFF :: SetGeoKeys()
 		{
 			GTIFKeySet(gtif, ProjCoordTransGeoKey, TYPE_SHORT, 1, CT_PolarStereographic);
 			GTIFKeySet(gtif, ProjNatOriginLatGeoKey, TYPE_DOUBLE,1,paramas.lat0*TeCRD);
-			GTIFKeySet(gtif, ProjNatOriginLongGeoKey, TYPE_DOUBLE,1,paramas.lon0*TeCRD);
+			GTIFKeySet(gtif, ProjStraightVertPoleLongGeoKey, TYPE_DOUBLE,1,paramas.lon0*TeCRD);
 			GTIFKeySet(gtif, ProjScaleAtNatOriginGeoKey, TYPE_DOUBLE,1,paramas.scale);
 			GTIFKeySet(gtif, ProjFalseEastingGeoKey, TYPE_DOUBLE,1,paramas.offx);
-
 			GTIFKeySet(gtif, ProjFalseNorthingGeoKey, TYPE_DOUBLE,1,paramas.offy);
 		}
 		else if (projname == "Albers")
 		{
 			GTIFKeySet(gtif, ProjCoordTransGeoKey, TYPE_SHORT, 1, CT_AlbersEqualArea);
-			GTIFKeySet(gtif, ProjFalseOriginLatGeoKey,TYPE_DOUBLE, 1, paramas.lat0*TeCRD);
-			GTIFKeySet(gtif, ProjFalseOriginLongGeoKey, TYPE_DOUBLE, 1, paramas.lon0*TeCRD);
 			GTIFKeySet(gtif, ProjStdParallel1GeoKey, TYPE_DOUBLE, 1, paramas.stlat1*TeCRD);
 			GTIFKeySet(gtif, ProjStdParallel2GeoKey, TYPE_DOUBLE, 1, paramas.stlat2*TeCRD);
+			GTIFKeySet(gtif, ProjNatOriginLatGeoKey,TYPE_DOUBLE, 1, paramas.lat0*TeCRD);
+			GTIFKeySet(gtif, ProjNatOriginLongGeoKey, TYPE_DOUBLE, 1, paramas.lon0*TeCRD);
 			GTIFKeySet(gtif, ProjFalseEastingGeoKey, TYPE_DOUBLE, 1,paramas.offx);
 			GTIFKeySet(gtif, ProjFalseNorthingGeoKey,TYPE_DOUBLE, 1,paramas.offy);
 		}
 		else if (projname == "Miller")
 		{
 			GTIFKeySet(gtif, ProjCoordTransGeoKey, TYPE_SHORT, 1, CT_MillerCylindrical);
+			GTIFKeySet(gtif, ProjCenterLatGeoKey, TYPE_DOUBLE, 1, paramas.lat0*TeCRD);
 			GTIFKeySet(gtif, ProjCenterLongGeoKey, TYPE_DOUBLE, 1, paramas.lon0*TeCRD);
 			GTIFKeySet(gtif, ProjFalseEastingGeoKey, TYPE_DOUBLE, 1,paramas.offx);
 			GTIFKeySet(gtif, ProjFalseNorthingGeoKey,TYPE_DOUBLE, 1,paramas.offy);
@@ -442,859 +783,282 @@ void TeDecoderTIFF :: SetGeoKeys()
 
 	// datum parameters
 	if (paramas.datum.name() == "CorregoAlegre")
-		GTIFKeySet(gtif, GeogGeodeticDatumGeoKey, TYPE_SHORT, 1,6225);
+		GTIFKeySet(gtif, GeogGeodeticDatumGeoKey, TYPE_SHORT, 1,Datum_Corrego_Alegre);
 	else if (paramas.datum.name() == "WGS84")
-		GTIFKeySet(gtif, GeogGeodeticDatumGeoKey, TYPE_SHORT, 1,6326);
+		GTIFKeySet(gtif, GeogGeodeticDatumGeoKey, TYPE_SHORT, 1,Datum_WGS84);
 	else if (paramas.datum.name() == "SAD69")
-		GTIFKeySet(gtif, GeogGeodeticDatumGeoKey, TYPE_SHORT, 1,6291);
+		GTIFKeySet(gtif, GeogGeodeticDatumGeoKey, TYPE_SHORT, 1,Datum_South_American_Datum_1969);
+	else if (paramas.datum.name() == "Aratu")
+		GTIFKeySet(gtif, GeogGeodeticDatumGeoKey, TYPE_SHORT, 1,Datum_Aratu);
 	else
 		GTIFKeySet(gtif, GeogGeodeticDatumGeoKey, TYPE_SHORT, 1,32767);
 
 	GTIFKeySet(gtif, GeogCitationGeoKey, TYPE_ASCII,1,paramas.datum.name().c_str());
-	double sMajorAxis = paramas.datum.radius();
-	double sMinorAxis = sMajorAxis*(1-paramas.datum.flattening());
-	GTIFKeySet(gtif, GeogSemiMajorAxisGeoKey,TYPE_DOUBLE, 1, sMajorAxis);
-	GTIFKeySet(gtif, GeogSemiMinorAxisGeoKey,TYPE_DOUBLE, 1, sMinorAxis);
+	GTIFKeySet(gtif, GeogSemiMajorAxisGeoKey,TYPE_DOUBLE, 1, paramas.datum.radius());
+	GTIFKeySet(gtif, GeogSemiMinorAxisGeoKey,TYPE_DOUBLE, 1, paramas.datum.radius()*(1-paramas.datum.flattening()));
 	GTIFWriteKeys(gtif);
 }
 
-void
-TeDecoderTIFF::ReadTiffDirectory()
+bool
+TeDecoderTIFF::getGeoTIFF()
 {
-	int ncols=0, nlins = 0;
-	TIFFGetField(tif,TIFFTAG_IMAGEWIDTH,&ncols);
-	TIFFGetField(tif,TIFFTAG_IMAGELENGTH,&nlins);
-	params_.ncols_ = ncols;
-	params_.nlines_ = nlins;
-		
-	short samplesperPixel;
-	if (!TIFFGetField(tif,TIFFTAG_SAMPLESPERPIXEL,&samplesperPixel) )
-		params_.nBands(1);
-	else
-		params_.nBands(samplesperPixel);
-	nBands_ = params_.nBands();
+	params_.resx_ = params_.resy_ = 1;
 
-	nbitsperpixel_ = 0;
-	if( !TIFFGetField(tif,TIFFTAG_BITSPERSAMPLE,&nbitsperpixel_) )
+	//---------------- navigation parameters 
+
+	bool isGeoreferenced_ = false;
+	// The three tags defined below may be used for defining the relationship between R (raster space)
+	// and M (model space), and the relationship may be diagrammed as: 
+	//           ModelPixelScaleTag 
+	//           ModelTiepointTag         
+	//    R  ------------ OR --------------> M
+	//  (I,J,K)  ModelTransformationTag   (X,Y,Z)
+
+	double *tiepoints = 0;
+	double *pixel_scale = 0;
+	double *transform   = 0;
+
+	int count=0, tiepoint_count=0, transform_count=0;
+  	TIFFGetField(tif, GTIFF_TIEPOINTS, &tiepoint_count,&tiepoints);
+	TIFFGetField(tif, GTIFF_PIXELSCALE, &count, &pixel_scale); 
+ 	TIFFGetField(tif, GTIFF_TRANSMATRIX, &transform_count, &transform); 
+
+	GTIFDefn defn;
+	int hasGTifDefn;
+	hasGTifDefn = GTIFGetDefn(gtif, &defn);
+	bool isCentreOfPixel = false;
+	if (hasGTifDefn)
 	{
-		nbitsperpixel_ = 1;
-		params_.setDataType(TeBIT);
+		short mtype;
+		GTIFKeyGet(gtif,GTRasterTypeGeoKey,&mtype,0,1);
+		if (mtype == RasterPixelIsPoint)
+			isCentreOfPixel = true;
 	}
-	else
+
+	// if we couldn't get the georrefencing information from the tags
+	// try to get if from an external (.tfw) world file
+	if (!isGeoreferenced_) 
 	{
-		int nbytes = nbitsperpixel_/8;
-		if (nbytes == 1)
-			params_.setDataType(TeUNSIGNEDCHAR);
-		else if (nbytes == 2)
-		    params_.setDataType(TeSHORT);
-		else if (nbytes == 4)
-			params_.setDataType(TeFLOAT);
-		else
-			params_.setDataType(TeDOUBLE);
+		size_t dotpos = params_.fileName_.rfind('.');
+		if (dotpos != std::string::npos)
+		{
+			vector<double> wf;
+			wf.resize(6);
+			string tfwfile = params_.fileName_.substr(0,dotpos+1) + "tfw";
+			FILE* fp = fopen(tfwfile.c_str(),"r");
+			if (!fp)
+			{
+				tfwfile = params_.fileName_.substr(0,dotpos+1) + "TFW";
+				fp = fopen(tfwfile.c_str(),"r");
+			}
+
+			if (fp)
+			{
+				isGeoreferenced_ = true;
+				char val[40];
+				for (int ii=0; ii<6; ++ii)
+				{
+					if (fscanf(fp,"%s",val))
+						wf[ii] = TeRoundD(atof(val)); 
+					else
+					{
+						isGeoreferenced_ = false;
+						break;
+					}
+				}
+				fclose(fp);
+			}
+			if (isGeoreferenced_)
+				params_.setNavigationParameters(wf);
+		}
 	}
-	
-	isTiled_ = (TIFFIsTiled(tif) != 0);			// return non-zero if is organized in tiles 
-	if (isTiled_)
+
+	if (!isGeoreferenced_) 
 	{
-		rowtilesize_= TIFFTileRowSize(tif);
-		TIFFGetField(tif,TIFFTAG_TILEWIDTH,&tilew_);
-		TIFFGetField(tif,TIFFTAG_TILELENGTH,&tileh_);
-		bytespertile_ = TIFFTileSize(tif);
-	}
-	else
-		TIFFGetField(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip_);
-
-
-	bytesperline_ = TIFFScanlineSize(tif);
-
-	TIFFGetField(tif,TIFFTAG_PLANARCONFIG,&planar_);	// storage organization
-	TIFFGetField(tif,TIFFTAG_PHOTOMETRIC,&photom_);     // photometric interpretation
-
-	if (samplesperPixel == 3 && 
-	   (photom_ == PHOTOMETRIC_MINISWHITE || 
-	    photom_ == PHOTOMETRIC_MINISBLACK))
-		photom_ = PHOTOMETRIC_RGB;
-	
-	switch (photom_)
-	{
-	case PHOTOMETRIC_PALETTE:
-		params_.setPhotometric(TeRASTERPALETTE);
-		TImage = PALLETEIMAGE;
-		ReadLut();
-		break;
-	case PHOTOMETRIC_MINISWHITE:
-	case PHOTOMETRIC_MINISBLACK:
-		params_.setPhotometric(TeRASTERMULTIBAND);
-		TImage = MONOIMAGE;
-		break;
-	case PHOTOMETRIC_RGB:
-		params_.setPhotometric(TeRASTERRGB);
-		TImage = RGBIMAGE;
-		break;
-	default:
-		break;
-	}
-
-	TIFFGetField(tif, TIFFTAG_COMPRESSION, &compress_);
-	if (compress_ != COMPRESSION_NONE)
-		params_.setCompressionMode(TeTIFFCOMPRESSION);
-
-	// Read georeference parameters
-	if (GetGeoTIFF ()) //GeoTiff Images
-	{
-		TeCoord2D lleft(0.,params_.nlines_-1);
-		TeCoord2D uleft(0.,0.);
-		TeCoord2D uright(params_.ncols_-1,0.);
-		TeCoord2D lright(params_.ncols_-1,params_.nlines_-1);
-
-		lleft = index2Coord (lleft);
-		uleft = index2Coord (uleft);
-		uright = index2Coord (uright);
-		lright = index2Coord(lright);
-		
-		double x1 = min(lleft.x(), uleft.x());
-		double x2 = max(lright.x(), uright.x());
-		double y1 = min(lleft.y(), lright.y());
-        // double y2 = max(uleft.y(), uright.y());   variable not used
-
-		params_.lowerLeftResolutionSize(x1,y1,params_.resx_,params_.resy_,params_.ncols_,params_.nlines_);
-
-        TeCoord2D coord(0,0);
-		TeCoord2D pt1 = index2Coord(coord);
-		x2 = pt1.x()+params_.boundingBox().width();
-        TeCoord2D tmpCoord =  TeCoord2D(x2,pt1.y());
-		TeCoord2D pt2 = params_.coord2Index(tmpCoord);
-		params_.nTilesInMemory_ = (abs((int)pt2.y())+1)*nBands_;
-	}
-	else if (!params_.box().isValid())
-	{
-		params_.lowerLeftResolutionSize(0.5,0.5,1,1,params_.ncols_,params_.nlines_);
-	}
-}
-	
-
-bool
-TeDecoderTIFF::GetGeoTIFF()
-{
-	if (!gtif) 
-		return false;
-
-	int count;
-	transMatrix_ = 0;
-	pixelScale_ = 0;
-	tiePoints_ = 0;
-
-	double TIangle = 0.;
-	params_.resx_ = params_.resy_ = 1;
-	double TIx0=0, TIy0=0, TIi0=0, TIj0 = 0.;
-//	double TIzone = 0;
-
-	if(gtif->gt_num_keys > 0)
-	{
-		if ((gtif->gt_methods.get)(tif, GTIFF_TRANSMATRIX, &count, &transMatrix_ ))
+		if (count >= 3 && tiepoint_count >= 6) // if we have 1 tie point and pixel scale
 		{
-			if (transMatrix_[0] > 0.) 
-			{
-				TIangle = atan (transMatrix_[4]/transMatrix_[0]);
-				params_.resx_ = TeRoundD(fabs(transMatrix_[0]/cos(TIangle)));
-				params_.resy_ = TeRoundD(fabs(transMatrix_[1]/sin(TIangle)));
-				TIangle = -1. * TIangle * 180. / 3.14159264359;
-
-			}
+			params_.topLeftResolutionSize(tiepoints[3]-tiepoints[0]*pixel_scale[0],
+											tiepoints[4]-tiepoints[1]*pixel_scale[1],
+											pixel_scale[0],pixel_scale[1],
+											params_.ncols_,params_.nlines_,isCentreOfPixel);
+			isGeoreferenced_ = true;
 		}
-		else
+		else if (transform_count == 16) // if we have a transformation matrix
 		{
-			if ((gtif->gt_methods.get)(tif, GTIFF_PIXELSCALE, &count, &pixelScale_ ))
-			{
-				params_.resx_ = TeRoundD(fabs (pixelScale_[0]));
-				params_.resy_ = TeRoundD(fabs (pixelScale_[1]));
-			}
+			vector<double> wf;
+			wf.push_back(transform[0]);
+			wf.push_back(transform[1]);
+			wf.push_back(transform[4]);
+			wf.push_back(transform[5]);
+			wf.push_back(transform[3]);
+			wf.push_back(transform[7]);
+			params_.setNavigationParameters(wf);
+			isGeoreferenced_ = true;
+
 		}
+		// else if (tiepoint_count > 6)
+		// {
+		//		we should use the set of tiepoints to interpolate... not implemented yet...
+		// }
 	}
 
-	if ((gtif->gt_methods.get)(tif, GTIFF_TIEPOINTS, &count, &tiePoints_ ))
+	//---------------- projection parameters 
+	if (!hasGTifDefn)
 	{
-		if (count > 0)
+		if (!params_.projection())
 		{
-			TIi0 = tiePoints_[0];
-			TIj0 = tiePoints_[1];
-			int di = (int)(TIi0 - 0);
-			int dj = (int)(TIj0 - 0); 
-			
-			TIx0 = tiePoints_[3];
-			TIy0 = tiePoints_[4];
-
-			double x0 = TIx0 - di*params_.resx_;
-			double y0 = TIy0 - dj*params_.resy_;
-			
-			params_.topLeftResolutionSize(x0,y0,params_.resx_,params_.resy_,params_.ncols_,params_.nlines_);
+			TeProjection* noproj = new TeNoProjection();
+			params_.projection(noproj);
+			delete noproj;
 		}
+		return false;
 	}
-
-	GTIFDefn	defn;        
-    if (GTIFGetDefn( gtif, &defn ) )
+	else
 	{
-		isGeoTiff_ = false;
-
-		// default parameters of a spherical ellipsoid
-		double TISemiMajor = 6.371000e+06, TISemiMinor = 0;
-		if (defn.SemiMajor == 0. && defn.SemiMinor == 0.)
-		{
-			GTIFKeyGet(gtif, GeogSemiMajorAxisGeoKey,&TISemiMajor, 0, 1 );
-			GTIFKeyGet(gtif, GeogSemiMinorAxisGeoKey,&TISemiMinor, 0, 1 );
-		}
-		else
-		{
-			TISemiMajor = defn.SemiMajor;
-			TISemiMinor = defn.SemiMinor; 
-		}
-
+		// 1) Get Datum parameters
 		TeDatum mDatum;
-		if (defn.Datum == 6291)
+		if (defn.Datum == Datum_South_American_Datum_1969)
 			mDatum = TeDatumFactory::make("SAD69");
-		else if (defn.Datum == 6326)
+		else if (defn.Datum == Datum_WGS84)
 			mDatum = TeDatumFactory::make("WGS84");
+		else if (defn.Datum == Datum_Corrego_Alegre)
+			mDatum = TeDatumFactory::make("CorregoAlegre");
+		else if (defn.Datum == Datum_Aratu)
+			mDatum = TeDatumFactory::make("Aratu");
 		else
 		{
-			double f = (TISemiMajor - TISemiMinor)/TISemiMajor;
-			if (!findDatum(TISemiMajor,f,mDatum))
-				mDatum = TeDatum("UserDefined",TISemiMajor,f,0.,0.,0.);
+			if(params_.projection())
+				mDatum = params_.projection()->datum();
+			else
+            {
+				double TISemiMajor = defn.SemiMajor, TISemiMinor = defn.SemiMinor;
+				// unknown datum... try to find a similar one based on SemiAxis values
+				if (defn.SemiMajor == 0. && defn.SemiMinor == 0.)
+				{
+					TISemiMajor =6.371000e+06;		// default parameter of a spherical ellipsoid
+					TISemiMinor =6.371000e+06;            
+				}
+				if (!findDatum(TISemiMajor,(TISemiMajor - TISemiMinor)/TISemiMajor,mDatum))
+					mDatum = TeDatum("UserDefined",TISemiMajor,(TISemiMajor - TISemiMinor)/TISemiMajor,0.,0.,0.);
+			}
 		}
 
-		double TIlat1 = 0., TIlat2 = 0., TIlat0 = 0., TIlon0 = 0.;
-		double TIdeltax = 0., TIdeltay = 0., TIScale = 0.;
-
-		// Try to get projection parameters
-		TeProjectionParams mProjPars;	
-		mProjPars.units = "Meters";		
-
-		TeProjection* proj = 0;
+		// 2) Get projection parameters
+		// if geographical model
+		short mtype = 0;
 
-		short mtype = ModelTypeProjected;
 		GTIFKeyGet(gtif, GTModelTypeGeoKey,&mtype, 0, 1 );
-		if (mtype == ModelTypeGeographic)
+
+		if (mtype == ModelTypeGeographic)	 
 		{
-			proj = new TeLatLong(mDatum);
-		}
-		else
+			TeProjection* latlong = new TeLatLong(mDatum);
+			params_.projection(latlong);
+			delete latlong;
+			return true;
+		}		
+
+		if (mtype != ModelTypeProjected)
 		{
-			switch (defn.CTProjection)
+			if (!params_.projection())
 			{
-				case CT_TransverseMercator : 
-					TIlat0 = defn.ProjParm[0];
-					TIlon0 = defn.ProjParm[1];
-					TIScale = defn.ProjParm[4];
-					TIdeltax = defn.ProjParm[5];
-					TIdeltay = defn.ProjParm[6];
-
-					TIy0 = TIy0 + 10000000. - TIdeltay;
-					TIx0 = TIx0 + 500000. - TIdeltax;
-
-					mProjPars.name = "UTM";
-					mProjPars.offx = TIdeltax;
-					mProjPars.offy = TIdeltay;
-					mProjPars.lat0 = TIlat0*TeCDR;
-					mProjPars.lon0 = TIlon0*TeCDR;
-					mProjPars.scale = TIScale;
-					if (TIdeltay > 0.1)
-						mProjPars.hemisphere = TeSOUTH_HEM;
-					else
-						mProjPars.hemisphere = TeNORTH_HEM;
-
-					break;
-				case CT_Mercator :
-					TIlat1 = defn.ProjParm[0];
-					TIlon0 = defn.ProjParm[1];
-					TIScale = defn.ProjParm[4];
-					TIdeltax = defn.ProjParm[5];
-					TIdeltay = defn.ProjParm[6];
-				
-					mProjPars.name = "Mercator";
-					mProjPars.offx = TIdeltax;
-					mProjPars.offy = TIdeltay;
-					mProjPars.lon0 = TIlon0*TeCDR;
-					mProjPars.stlat1 = TIlat1*TeCDR;
-					mProjPars.scale = TIScale;
-					if (TIdeltay > 0.1)
-						mProjPars.hemisphere = TeSOUTH_HEM;
-					else
-						mProjPars.hemisphere = TeNORTH_HEM;
-					break;
-				case CT_LambertConfConic_2SP :
-					TIlat0 = defn.ProjParm[0]*defn.UOMAngleInDegrees;
-					TIlat1 = defn.ProjParm[2]*defn.UOMAngleInDegrees;
-					TIlat2 = defn.ProjParm[3]*defn.UOMAngleInDegrees;
-					TIlon0 = defn.ProjParm[1]*defn.UOMAngleInDegrees;
-					TIdeltax = defn.ProjParm[5];
-					TIdeltay = defn.ProjParm[6];
-					TIy0 = TIy0 - 10000000.;
-					TIx0 = TIx0 - 3000000.;
-
-					mProjPars.name = "LambertConformal";
-					mProjPars.offx = TIdeltax;
-					mProjPars.offy = TIdeltay;
-					mProjPars.lat0 = TIlat0*TeCDR;
-					mProjPars.lon0 = TIlon0*TeCDR;
-					mProjPars.stlat1 = TIlat1*TeCDR;
-					mProjPars.stlat2 = TIlat2*TeCDR;
-					if (TIdeltay > 0.1)
-						mProjPars.hemisphere = TeSOUTH_HEM;
-					else
-						mProjPars.hemisphere = TeNORTH_HEM;
-					break;
-				case CT_Polyconic : 
-					TIlat0 = defn.ProjParm[0];
-					TIlon0 = defn.ProjParm[1];
-					TIScale = defn.ProjParm[4];
-					TIdeltax = defn.ProjParm[5];
-					TIdeltay = defn.ProjParm[6];
-
-					mProjPars.name = "Polyconic";
-					mProjPars.offx = TIdeltax;
-					mProjPars.offy = TIdeltay;
-					mProjPars.lat0 = TIlat0*TeCDR;
-					mProjPars.lon0 = TIlon0*TeCDR;
-					mProjPars.scale = TIScale;
-					if (TIdeltay > 0.1)
-						mProjPars.hemisphere = TeSOUTH_HEM;
-					else
-						mProjPars.hemisphere = TeNORTH_HEM;
-					break;
-
-				case CT_Equirectangular :
-					TIlat1 = defn.ProjParm[0];
-					TIlon0 = defn.ProjParm[1];
-					TIdeltax = defn.ProjParm[5];
-					TIdeltay = defn.ProjParm[6];
-
-					mProjPars.name = "CylindricalEquidistant";
-					mProjPars.offx = TIdeltax;
-					mProjPars.offy = TIdeltay;
-					mProjPars.lon0 = TIlon0*TeCDR;
-					mProjPars.stlat1 = TIlat1*TeCDR;
-					if (TIdeltay > 0.1)
-						mProjPars.hemisphere = TeSOUTH_HEM;
-					else
-						mProjPars.hemisphere = TeNORTH_HEM;
-					break;
-
-				case CT_PolarStereographic :
-					TIlat0 = defn.ProjParm[0];
-					TIlon0 = defn.ProjParm[1];
-					TIScale = defn.ProjParm[4];
-					TIdeltax = defn.ProjParm[5];
-					TIdeltay = defn.ProjParm[6];
-					
-					mProjPars.name = "PolarStereographic";
-					mProjPars.offx = TIdeltax;
-					mProjPars.offy = TIdeltay;
-					mProjPars.lat0 = TIlat0*TeCDR;
-					mProjPars.lon0 = TIlon0*TeCDR;
-					mProjPars.scale = TIScale;
-					if (TIdeltay > 0.1)
-						mProjPars.hemisphere = TeSOUTH_HEM;
-					else
-						mProjPars.hemisphere = TeNORTH_HEM;
-					break;
-				case CT_AlbersEqualArea :
-					TIlat1 = defn.ProjParm[0];
-					TIlat2 = defn.ProjParm[1];
-					TIlat0 = defn.ProjParm[2];
-					TIlon0 = defn.ProjParm[3];
-					TIdeltax = defn.ProjParm[5];
-					TIdeltay = defn.ProjParm[6];
-
-					mProjPars.name = "Albers";
-					mProjPars.offx = TIdeltax;
-					mProjPars.offy = TIdeltay;
-					mProjPars.lat0 = TIlat0*TeCDR;
-					mProjPars.lon0 = TIlon0*TeCDR;
-					mProjPars.stlat1 = TIlat1*TeCDR;
-					mProjPars.stlat2 = TIlat2*TeCDR;
-
-					if (TIdeltay > 0.1)
-						mProjPars.hemisphere = TeSOUTH_HEM;
-					else
-						mProjPars.hemisphere = TeNORTH_HEM;
-					break;
-				case CT_MillerCylindrical:
-					TIlon0 = defn.ProjParm[1];
-					TIdeltax = defn.ProjParm[5];
-					TIdeltay = defn.ProjParm[6];
-
-					mProjPars.name = "Miller";
-					mProjPars.offx = TIdeltax;
-					mProjPars.offy = TIdeltay;
-					mProjPars.lon0 = TIlon0*TeCDR;
-					if (TIdeltay > 0.1)
-						mProjPars.hemisphere = TeSOUTH_HEM;
-					else
-						mProjPars.hemisphere = TeNORTH_HEM;
-					break;
-				default :
-					mProjPars.name = "NoProjection";
-					break;
+				TeProjection* noproj = new TeNoProjection();
+				params_.projection(noproj);
+				delete noproj;
+				return false;
 			}
-			mProjPars.datum = mDatum;
-			proj = TeProjectionFactory::make(mProjPars);
+			return true;
 		}
-		if (proj && proj->name() != "NoProjection")
-			isGeoTiff_ = true;
-		params_.projection(proj);
-		delete proj;
-	}
-
-	// try find .tfw file
-	string filename=params_.fileName_;
-	long pos = filename.size() - 3;
-	filename.replace(pos,3,"tfw");
-	DecodeTFW(filename);
-	return isGeoTiff_;
-}
-
-
-bool
-TeDecoderTIFF::DecodeTFW(const string& filename)
-{
-	FILE *fp = fopen(filename.data(),"r");
-	if( fp )
-	{
-		isGeoTiff_ = true;
-		double dxj=0.,dyj=0.,dxi=0.,dyi=0.,x0=0.,y0=0.;
-		char val[40];
-		if( fscanf(fp,"%s",val) )
-			dxj = TeRoundD(atof(val)); // dxJ=resx
-		else
-			isGeoTiff_ = false;
-		if( fscanf(fp,"%s",val) )
-			dyj = TeRoundD(atof(val)); // dyJ
-		else
-			isGeoTiff_ = false;
-		if( fscanf(fp,"%s",val) )
-			dxi = TeRoundD(atof(val)); // dxI 
-		else
-			isGeoTiff_ = false;
-		if( fscanf(fp,"%s",val) )
-			dyi = TeRoundD(atof(val)); // dyI = resy
-		else
-			isGeoTiff_ = false;
-		if( fscanf(fp,"%s",val) )
-			x0 = TeRoundD(atof(val)); // x0
-		else
-			isGeoTiff_ = false;
-		if( fscanf(fp,"%s",val) )
-			y0 = TeRoundD(atof(val)); // y0
+		TeProjectionParams mProjPars;	
+		mProjPars.units = "Meters"; // == not necessarily true... we should check for the units as defined in geotiff	
+		mProjPars.datum = mDatum;
+
+		// just set all parameters available from defn... some of them will not be used by some projections
+		mProjPars.lat0 = defn.ProjParm[0]*defn.UOMAngleInDegrees*TeCDR;
+		mProjPars.lon0 = defn.ProjParm[1]*defn.UOMAngleInDegrees*TeCDR;
+		mProjPars.stlat1 = defn.ProjParm[2]*defn.UOMAngleInDegrees*TeCDR;
+		mProjPars.stlat2 = defn.ProjParm[3]*defn.UOMAngleInDegrees*TeCDR;
+		mProjPars.scale = defn.ProjParm[4];
+		mProjPars.offx = defn.ProjParm[5];
+		mProjPars.offy = defn.ProjParm[6];
+		if (mProjPars.offy > 0)
+			mProjPars.hemisphere = TeSOUTH_HEM;
 		else
-			isGeoTiff_ = false;
-		fclose(fp);
+			mProjPars.hemisphere = TeNORTH_HEM;
 
-		if (isGeoTiff_)
+		// now make the correspondence between geotiff projections and terralib projections
+		switch (defn.CTProjection)
 		{
-			params_.resx_ = dxj;
-			params_.resy_ = ABS(dyi);
-
-			if (dxi != 0 || dyj != 0)	
-			{
-				params_.dyJ_ = dyj;
-				params_.dyI_ = dyi;
-				params_.dxI_ = dxi;
-				params_.dxJ_ = dxj;
-				params_.x0_ = x0;
-				params_.y0_ = y0;
-			}
-			else					// there is no rotation or scaling defined
-			{						// uses only box and resolution
-				// double llx = x0; variable not used
-				// double ury = y0; variable not used
-				params_.topLeftResolutionSize(x0,y0,params_.resx_,params_.resy_,params_.ncols_,params_.nlines_,true);
-			}
+			case CT_TransverseMercator : 
+				mProjPars.name = "UTM";
+			break;
+			case CT_Mercator :
+				mProjPars.name = "Mercator";
+			break;
+			case CT_LambertConfConic_2SP :
+				mProjPars.name = "LambertConformal";
+			break;
+			case CT_Polyconic : 
+				mProjPars.name = "Polyconic";
+			break;
+			case CT_Equirectangular :
+				mProjPars.name = "CylindricalEquidistant";
+			break;
+			case CT_PolarStereographic :
+				mProjPars.name = "PolarStereographic";
+			break;
+			case CT_AlbersEqualArea :
+				mProjPars.name = "Albers";
+			break;
+			case CT_MillerCylindrical:
+				mProjPars.name = "Miller";
+			break;
+			case CT_Sinusoidal:
+				mProjPars.name = "TeSinusoidal";
+			break;
+			default:
+				TeBox bb = params_.boundingBox();
+				if (bb.x1_ >= -180 && bb.x1_ <= 180 && bb.y1_ >= -90 && bb.y2_ <= 90)
+					mProjPars.name = "LatLong";
+				else
+				{
+					TeProjection* noproj = TeProjectionFactory::make(mProjPars);
+					params_.projection(noproj);
+					delete noproj;
+					return false;
+				}
+			break;
 		}
+		TeProjection* proj = TeProjectionFactory::make(mProjPars);
+		params_.projection(proj);
+		delete proj;
 		return true;
 	}
-	return false;
 }
 
-// --- Methods that deal with the internal buffer to store the image in memory
-
 bool 
-TeDecoderTIFF::AllocateBuffer()
+TeDecoderTIFF::readStrip(unsigned long strip)
 {
-	unsigned long bufsize;
-	int n;
-
-	if (TBufferTile_)
-	{
-		delete []TBufferTile_;
-		TBufferTile_ = 0;
-	}
-	if (TBuffer_)
-	{
-		delete []TBuffer_;
-		TBuffer_ = 0;
-	}
-
-	if (isTiled_)		// we don�t write tiled TIFF
-	{					// let libtigg manage its raw data buffer
-		// allocate a buffer to encode/decode a tile
-		bufsize = bytespertile_;
-		TBufferTile_ = new unsigned char[bytespertile_];
-		if (!TBufferTile_)
-			return false;
-/*		n = TIFFReadBufferSetup(tif,TBufferTile_,bufsize);
-		n = TIFFWriteBufferSetup(tif,TBufferTile_,bufsize);
-*/
-		// allocate a buffer to hold a line of image
-		// a line may be formed by more than one tile
-		TBuffer_ = new unsigned char[bytesperline_];
-		if (!TBuffer_)
-		{
-			delete []TBufferTile_;
-			TBufferTile_ = 0;
-			return false;
-		}
-	}
-	else
-	{
-		if (params_.mode_ == 'r')		// if we are reading let libtiff handle
-		{								// the raw buffer and keeps a copy of each line
-			bufsize = TIFFScanlineSize(tif) * params_.nBands();
-			TBuffer_ = new unsigned char[bufsize];
-			if (!TBuffer_)
-				return false;
-		}
-		else							// if we are writting
-		{								// we control the raw buffer 
-			bufsize = TIFFStripSize(tif);
-			TBuffer_ = new unsigned char[bufsize];
-			if (!TBuffer_)
-				return false;
-			n = TIFFReadBufferSetup(tif,TBuffer_,bufsize);
-			n = TIFFWriteBufferSetup(tif,TBuffer_,bufsize);
-		}
-	}
-	return true;
-}
-
-void 
-TeDecoderTIFF::DeallocateBuffer()
-{
-	if (TBuffer_)
-		delete [] TBuffer_;
-	TBuffer_ = 0;
-
-	if (TBufferTile_)
-		delete [] TBufferTile_;
-	TBufferTile_ = 0;
-}
-
-
-// ---- Internal routines
-bool 
-TeDecoderTIFF::WriteDummyImage()
-{
-	long ssize = TIFFScanlineSize(gtif->gt_tif);
-	unsigned char* obuf = (unsigned char*)_TIFFmalloc(ssize);
-	unsigned char* pp;
-	pp = obuf;
-	if (TImage == RGBIMAGE)	// RGB image
-	{
-		for (int x = 0; x < params_.ncols_; x++) 
-		{
-			if (params_.dataType_[0] == TeFLOAT)			// 32 bits
-			{
-				((float*)obuf)[x] = (float)params_.dummy_[0];
-				((float*)obuf)[x+1] = (float)params_.dummy_[1];
-				((float*)obuf)[x+2] = (float)params_.dummy_[2];
-			}
-			else if (params_.dataType_[0] == TeSHORT)	// 16 bits
-			{
-				((short*)obuf)[x] = (short)params_.dummy_[0];
-				((short*)obuf)[x+1] = (short)params_.dummy_[1];
-				((short*)obuf)[x+2] = (short)params_.dummy_[2];
-			}
-			else											// 8 bits
-			{
-				obuf[x] = (unsigned char)params_.dummy_[0];
-				obuf[x+1] = (unsigned char)params_.dummy_[1];
-				obuf[x+2] = (unsigned char)params_.dummy_[2];
-			}
-		}
-	}
-	else		// Mono or pallete image
-	{
-		for (int x = 0; x < params_.ncols_; x++) 
-		{
-			if (params_.dataType_[0] == TeFLOAT)			// 32 bits
-				((float*)obuf)[x] = (float)params_.dummy_[0];
-			else if (params_.dataType_[0] == TeSHORT)	// 16 bits
-				((short*)obuf)[x] = (short)params_.dummy_[0];
-			else											// 8 bits
-				obuf[x] = (unsigned char)params_.dummy_[0];
-		}
-	}
-
- 	for (int row=0; row<params_.nlines_; row++)
+	assert(tif);
+	if (planar_ == PLANARCONFIG_CONTIG)	// for planar config all planes are in the strip
+		return (TIFFReadEncodedStrip(tif, strip, dataBuffer_[0], -1) > 0);
+	
+	for (unsigned int i=0; i<nBands_; ++i)	// for separated config we have to read each plane individually
 	{
-		if (!TIFFWriteScanline(gtif->gt_tif, obuf, row, 0))
+		if (TIFFReadEncodedStrip(tif, (strip+i*nstripsperplane_), dataBuffer_[i],-1) == -1)
 			return false;
 	}
-	TIFFFlushData(gtif->gt_tif);
-	_TIFFfree(obuf);
 	return true;
 }
 
 bool 
-TeDecoderTIFF::ReadMonoImage(unsigned long lin)
-{	
-	if (isTiled_)
-	{
-		if (!ReadTileImageContig(lin,TBuffer_))
-			return false;
-	}
-	else
-	{
-		//int offset = (lin % rowsperstrip_)* bytesperline_;
-		if (TIFFReadScanline(tif,TBuffer_,lin,0) < 0)
-			return false;
-	}
-	return true;
-}
-
-bool
-TeDecoderTIFF::ReadRGBImage (unsigned long lin)
+TeDecoderTIFF::readTileImageContig(unsigned long tiler) 
 {
-	if (planar_ == PLANARCONFIG_CONTIG)
+	tiler *= tilesacross_;
+	unsigned long i;
+	for (i=0; i<tilesacross_; ++i)
 	{
-		if (isTiled_)
-		{
-			if(!ReadTileImageContig(lin,TBuffer_))
-				return false;
-		}
-		else
-		{
-			if (TIFFReadScanline(tif,TBuffer_,lin,0) < 0)
-				return false;
-		}
-	}
-	else	// RGB Separate
-	{
-		if (isTiled_)
+		if (TIFFReadEncodedTile(tif,tiler+i,dataBuffer_[i],-1) == -1)
 			return false;
-		int s;
-		for (s=0; s < nBands_; s++)
-			if (TIFFReadScanline(tif,&TBuffer_[s*params_.ncols_],lin,s) < 0)
-				return false;
-	}
-	return true;
-}
-
-//		|-   -|     |-                 -|  |-   -|
-//		|  X  |     |   a   b   0   d   |  |  I  |
-//		|     |     |                   |  |     |
-//		|  Y  |     |   e   f   0   h   |  |  J  |
-//		|     |  =  |                   |  |     |
-//		|  Z  |     |   0   0   0   0   |  |  K  |
-//		|     |     |                   |  |     |
-//		|  1  |     |   0   0   0   1   |  |  1  |
-//		|-   -|     |-                 -|  |-   -|
-
-//	Direct transformation
-//		X = a*I + b*j + d
-//		Y = e*I + f*j + h
-
-//	Inverse Transformation
-//		I = [f(X-d) - b(Y-h)) / (af-eb)
-//		J = [e(X-d) - a(Y-h)) / (eb-af)
-//	where
-//	a = transMatrix_[0]
-//	b = transMatrix_[1]
-//	d = transMatrix_[3]
-//	e = transMatrix_[4]
-//	f = transMatrix_[5]
-//	h = transMatrix_[7]
-
-TeCoord2D
-TeDecoderTIFF::index2Coord (TeCoord2D& pt)
-{
-	if (transMatrix_)
-	{
-		double x,y;
-		x = transMatrix_[3] + pt.x()*transMatrix_[0] + pt.y()*transMatrix_[1];
-		y = transMatrix_[7] + pt.x()*transMatrix_[4] - pt.y()*transMatrix_[5];
-		return TeCoord2D(x,y);
-	}
-	else if (tiePoints_)
-	{
-		double x,y;
-		x = tiePoints_[3] + (pt.x() - tiePoints_[0]) * params_.resx_;
-		y = tiePoints_[4] - (pt.y() - tiePoints_[1]) * params_.resy_;
-		return TeCoord2D(x,y);
-	}
-	else
-		return params_.index2Coord (pt);
-}
-
-TeCoord2D
-TeDecoderTIFF::coord2Index (TeCoord2D& pt)
-{
-	if (transMatrix_)
-	{
-		double i,j;
-		double f  = -transMatrix_[5];
-		double af = transMatrix_[0]*f;
-		double eb = transMatrix_[4]*transMatrix_[1];
-		double xd = pt.x() - transMatrix_[3];
-		double yh = pt.y() - transMatrix_[7];
-
-		i = (f*xd - transMatrix_[1]*(yh)) / (af-eb);
-		j = (transMatrix_[4]*xd - transMatrix_[0]*(yh)) / (eb-af);
-
-		return TeCoord2D(i,j);
-	}
-	else if (tiePoints_)
-	{
-		double i,j;
-		i = (pt.x() - tiePoints_[3]) / params_.resx_ + tiePoints_[0];
-		j = (tiePoints_[4] - pt.y()) / params_.resy_ + tiePoints_[1];
-		return TeCoord2D(i,j);
-	}
-	else
-		return params_.coord2Index(pt);
-}
-
-void TeDecoderTIFF::Print()
-{
-	long t = 0L;
-	if(tif)
-		TIFFPrintDirectory(tif,stdout,t);
-}
-
-static long Tiffpow2(short bits)
-{
-	unsigned long ret = 1;
-	unsigned short x;
-	
-	for(x=0; x < bits ; x++)
-		ret *= 2;
-		
-	return ret;
-}
-
-static unsigned short CalculateMask(unsigned short bits)
-{
-	unsigned long ret;
-	ret = Tiffpow2(bits) -1L;
-	return (unsigned short)ret;
-}
-
-static void ShiftAndLoadTo8Bits(unsigned char *ret, unsigned char *buf, short bits, unsigned long col, unsigned short mask)
-{
-	long shift1 = (long) (8 - bits);
-	long shift = shift1;
-	unsigned long y = 0;
-	unsigned long x;
-
-	for(x=0; x < col; x++)
-	{
-		ret[x] = (buf[y] >> shift)&mask;
-		shift -= bits;
-		if( shift < 0 )
-		{
-			shift = shift1;
-			y++;
-		}
-	}	
-}
-
-static void CreateLut(short bits,u_char lut[])
-{
-	u_long 	itens = Tiffpow2(bits);
-	u_long 	x;
-
-	for (x=0; x < itens; x++)
-		lut[x] = (u_char) ( (255L*x)/(itens-1));
-}
-
-void TeDecoderTIFF:: To8Bits(unsigned char* buf,unsigned char *ret,short vmax,short vmin,short nx)
-{
-	if (params_.nbitsperPixel_[0] == 32)
-	{
-		unsigned long aux;
-
-		long j=0;
-		long ls = (long)params_.ncols_*4;
-
-		for (long i=0; i< ls; i+=4)
-		{
-			memcpy(&aux,&buf[i],4);
-	
-			ret[j] = (unsigned char)aux;
- 			j++;
-		}
-		return;
-	}
-
-	if (params_.nbitsperPixel_[0] == 16)
-	{
-		short aux,aux2,i,j;
-		float div = (float)((vmax-vmin)/255.);
-
-		j=0;
-
-		for (i=0; i<nx*2; i+=2)
-		{
-			memcpy(&aux,&buf[i],2);
-	
-			aux2 = (short) ((float)(aux-vmin) /div);
-			ret[j] = (unsigned char)aux2;
- 			j++;
-		}
-		return;
-	}
-
-	if ( params_.nbitsperPixel_[0] == 8 )
-	{
-		memcpy(ret,buf,params_.ncols_);
-		return;
-	}
-
-	if( first )
-	{
-		mask = CalculateMask(params_.nbitsperPixel_[0]);
-		CreateLut(params_.nbitsperPixel_[0],Lut);
-		first = 0;
-	}
-	
-	ShiftAndLoadTo8Bits(ret,buf,params_.nbitsperPixel_[0],params_.ncols_,mask);
-	unsigned long x;
-	for(x=0; x < (unsigned long)params_.ncols_; x++)
-	{
-		ret[x] = Lut[ret[x]];
-	}
-}
-
-// --- Tile Functions ---/
-bool 
-TeDecoderTIFF::ReadTileImageContig(unsigned long lin, unsigned char *line)
-{
-	unsigned long offset = lin%tileh_;
-	unsigned long col, i, nbytes;	
-	for (col=0; col < (unsigned long)params_.ncols_; col += tilew_)
-	{
-		if (TIFFReadTile(tif, TBufferTile_, col, lin, 0, 0) < 0 )
-			return false;
-		nbytes = params_.nbitsperPixel_[0]/8;
-		if (col + tilew_ > (unsigned long)params_.ncols_ )
-		{
-			unsigned long diff = params_.ncols_-col;
-			for (i=0; i < diff*nbytes; i++)
-				line[i+col] = TBufferTile_[i+offset*rowtilesize_];
-		}
-		else
-		{
-			for (i=0; i < tilew_*nbytes; i++)
-				line[col+i] = TBufferTile_[i+offset*rowtilesize_];
-		}
 	}
 	return true;
 }
@@ -1317,44 +1081,52 @@ static unsigned short CVT1 (unsigned long x,long value)	//CVT is used in DEC sta
 }
 
 bool
-TeDecoderTIFF::ReadLut()
+TeDecoderTIFF::readLut()
 {
 	unsigned short *rmap,*gmap,*bmap;
 	if (!TIFFGetField(tif, TIFFTAG_COLORMAP, &rmap, &gmap, &bmap))
 		return false;
+	params_.lutr_.clear();
+	params_.lutb_.clear();
+	params_.lutg_.clear();
+
+	unsigned int n = params_.lutr_.size();
 	
-	int range = (1 << params_.nbitsperPixel_[0])-1;
+	int nindexes = (1 << params_.nbitsperPixel_[0]);
+	long maxval = (long)pow(2.,params_.nbitsperPixel_[0])-1;
+
 	int x;
-	long val = (long)pow(2.,params_.nbitsperPixel_[0]) - 1;
-	params_.setNumberPalleteEntries(range);
-	if (checkmap (range,rmap,gmap,bmap,val) == 16)
+	if (checkmap (nindexes,rmap,gmap,bmap,maxval) == 16)
 	{
-		for(x = range; x >= 0; x--)
+		for(x=0; x<nindexes; ++x)
 		{
-			params_.lutr_[x] = CVT1(rmap[x],val); 
-			params_.lutg_[x] = CVT1(gmap[x],val);
-			params_.lutb_[x] = CVT1(bmap[x],val);
+			params_.lutr_.push_back(CVT1(rmap[x],maxval)); 
+			params_.lutg_.push_back(CVT1(gmap[x],maxval));
+			params_.lutb_.push_back(CVT1(bmap[x],maxval));
 		}
 	}
 	else
 	{
-		for(x = range; x >= 0; x--)
+		for(x=0; x<nindexes; ++x)
 		{
-			params_.lutr_[x] = rmap[x];
-			params_.lutg_[x] = gmap[x];
-			params_.lutb_[x] = bmap[x];
+			params_.lutr_.push_back(rmap[x]);
+			params_.lutg_.push_back(gmap[x]);
+			params_.lutb_.push_back(bmap[x]);
 		}
 	}
+	n = params_.lutr_.size();
 	return true;
 }
 
 void
-TeDecoderTIFF::SaveLut()
+TeDecoderTIFF::saveLut()
 {
 	if (!tif)
 		return;
+    
+  TeRasterParams& mmparams = memManager_.params();  
 
-	int nentries = params_.lutr_.size();
+	int nentries = mmparams.lutr_.size();
 	if (nentries <= 0) 
 		return;
 
@@ -1364,9 +1136,85 @@ TeDecoderTIFF::SaveLut()
 
 	for (int i=0; i<nentries; i++)
 	{
-		lutr[i] = params_.lutr_[i]*255;
-		lutg[i] = params_.lutg_[i]*255;
-		lutb[i] = params_.lutb_[i]*255;
+		lutr[i] = mmparams.lutr_[i]*255;
+		lutg[i] = mmparams.lutg_[i]*255;
+		lutb[i] = mmparams.lutb_[i]*255;
 	}
 	TIFFSetField(tif, TIFFTAG_COLORMAP,lutr,lutg,lutb);
+	delete [] lutr;
+	delete [] lutg;
+	delete [] lutb;
+}
+
+
+inline void TeDecoderTIFF::getElement_TeUNSIGNEDCHAR(const long& plane, const long& pos, double& val)
+{
+	assert(data_TeUNSIGNEDCHAR_ != 0 );
+	val = (double)data_TeUNSIGNEDCHAR_[plane][pos];
+}
+
+
+inline void TeDecoderTIFF::getElement_TeCHAR(const long& plane, const long& pos, double& val)
+{
+	assert(data_TeCHAR_ != 0 );
+	val = (double)data_TeCHAR_[plane][pos];
+}
+
+
+inline void TeDecoderTIFF::getElement_TeUNSIGNEDSHORT(const long& plane, const long& pos, double& val)
+{
+	assert(data_TeUNSIGNEDSHORT_ != 0 );
+	val = (double)data_TeUNSIGNEDSHORT_[plane][pos];
+}
+
+
+inline void TeDecoderTIFF::getElement_TeSHORT(const long& plane, const long& pos, double& val)
+{
+	assert(data_TeSHORT_ != 0 );
+	val = (double)data_TeSHORT_[plane][pos];
+}
+
+
+inline void TeDecoderTIFF::getElement_TeINTEGER(const long& plane, const long& pos, double& val)
+{
+	assert(data_TeINTEGER_ != 0 );
+	val = (double)data_TeINTEGER_[plane][pos];
+}
+
+
+inline void TeDecoderTIFF::getElement_TeUNSIGNEDLONG(const long& plane, const long& pos, double& val)
+{
+	assert(data_TeUNSIGNEDLONG_ != 0 );
+	val = (double)data_TeUNSIGNEDLONG_[plane][pos];
+}
+
+
+inline void TeDecoderTIFF::getElement_TeLONG(const long& plane, const long& pos,double& val)
+{
+	assert(data_TeLONG_ != 0 );
+	val = (double)data_TeLONG_[plane][pos];
+}
+
+
+inline void TeDecoderTIFF::getElement_TeFLOAT(const long& plane, const long& pos, double& val)
+{
+	assert(data_TeFLOAT_ != 0 );
+	val = (double)data_TeFLOAT_[plane][pos];
 }
+
+
+inline void TeDecoderTIFF::getElement_TeDOUBLE(const long& plane, const long& pos, double& val)
+{
+	assert(data_TeDOUBLE_ != 0 );
+	val = (double)data_TeDOUBLE_[plane][pos];
+}
+
+
+TeDecoderTIFFFactory::TeDecoderTIFFFactory(const string& name): 
+	TeDecoderFactory(name) 
+{
+	// Defines the decoder identifiers synonyms
+	TeDecoderFactory::instanceName2Dec()["TIF"] = "TIF";	
+	TeDecoderFactory::instanceName2Dec()["TIFF"] = "TIF";
+}
+
diff --git a/src/terralib/kernel/TeDecoderTIFF.h b/src/terralib/kernel/TeDecoderTIFF.h
old mode 100644
new mode 100755
index b8e3e85..5dc9d6b
--- a/src/terralib/kernel/TeDecoderTIFF.h
+++ b/src/terralib/kernel/TeDecoderTIFF.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -21,154 +21,134 @@ indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
 /*! \file TeDecoderTIFF.h
-    This file contais functions to deal with raster images in Tiff/GeoTIFF format.
+    \brief This file contais functions to deal with raster images in Tiff/GeoTIFF format.
 */
 
 #ifndef  __TERRALIB_INTERNAL_DECODERTIFF_H
 #define  __TERRALIB_INTERNAL_DECODERTIFF_H
 
+#include "TeDecoder.h"
+#include "TeDecoderSmartMem.h"
+
 // LibTIFF includes
 #include "geotiff.h"
 #include "xtiffio.h"
-#include "geo_normalize.h"
-#include "geovalues.h"
-#include "tiffiop.h"
-#include "geo_tiffp.h" /* external TIFF interface */
-#include "geo_keyp.h"  /* private interface       */
-
-#include <iostream>
-#include <stdio.h>
-#include <sys/types.h>
-
-#include "TeDecoderVirtualMemory.h"
-
-#include <map>
-using namespace std;
-
-#define MONOIMAGE	0	/* Image type monochrome */
-#define RGBIMAGE	1	/* Image type color image */
-#define PALLETEIMAGE 2  /* Image type pallete image */
 
 
-//! Implements a decoder to a raster in TIFF (Tagged Image File Format) format
+//! Implements a decoder to a raster in TIFF (Tagged Image File Format) format with or without geographical tags (geotiff)
 /*!
 	Decoder TIFF is based on geotiff libray (http://remotesensing.org/geotiff/geotiff.html).
 	This imposes some restrictions to this decoder. Using libtiff TIFF image files may not 
-	be opened for both reading and writing; there is no support for altering the contents of 
-	a TIFF file. So this decoder is limited to create new tiff files or to read existing ones.
+	be opened for both reading and writing access, or, there is no support for altering the contents of 
+	a TIFF file. So this decoder is limited to create new tiff files or to read existing ones. \par
+	The default file extensions associated to this decoder are ".tif" or ".tiff". \par
+	\note This decoder doesn't support tiff files that are organizes in tiles and in separated planes.
 */
-class TeDecoderTIFF : public TeDecoder
+class TL_DLL TeDecoderTIFF: public TeDecoder
 {
-	TIFF 	*tif;       // TIFF directory structure
-	GTIF	*gtif;		// GEOTIFF directory structure
+	TIFF 	*tif;       		// TIFF directory structure
+	GTIF	*gtif;			// GEOTIFF directory structure
 
-	unsigned char  *TBuffer_;
-	unsigned char  *TBufferTile_;
+	unsigned char** dataBuffer_;	// buffer to hold decoded data
+					// for tile data it holds 1 tile
+					// for stripped data it holds 1 strip with all the planes
 
-	bool			isGeoTiff_;	// flag that indicates georeference
-	bool			isTiled_;	// flag indicating if image is tiled
-	unsigned short	photom_;    // photometric interpretation
+	unsigned int	nplanes_;	// number of planes or logical division of the data within the files
+
+	bool		isGeoTiff_;	// indicates if the data has geographical information
+	short 		TImage_;	// 0=MONOIMAGE, 1=RGBIMAGE, 2=PALLETE 
 	unsigned short	planar_;	// storage organization : PLANARCONFIG_CONTIG or PLANARCONFIG_SEPARATE
-	unsigned short	compress_;	// compression flag: COMPRESSION_NONE, COMPRESSION_CCITTRLE, COMPRESSION_CCITTFAX3 and others
-	short 			TImage;	    // MONOIMAGE, RGBIMAGE, PALLETE 
-	int				nBands_;	// number of bands
-	int				nbitsperpixel_;
-	unsigned long	bytesperline_;
-	unsigned long	tilew_,tileh_;
-	unsigned long	rowtilesize_;
-	unsigned long	bytespertile_;
-	unsigned long	rowsperstrip_;
-	int				TCurLine_;		// current line in memory
-	int				TCurTile_;		// current tile in memory
-
-
-	bool first;				// Flag to test the first access to To8Bits() function
-    unsigned char Lut[256];	// Lut to convert nbits/pixel to 8bits/pixel
-	unsigned short mask;	// mask bits 0000...1 for 1 bit
-							// 000.1111 for 2 bits and on
-
-	double *transMatrix_;
-	double *pixelScale_;
-	double *tiePoints_;
-
- 
-	// if PHOTOMETRIC_YCBCR:	
-	float 	*YCbCrCoeffs,	*refBlackWhite;	// Chrominance coefficients
-	unsigned short YCbCrHorizSampling,		// Horizontal Smapling
-		           YCbCrVertSampling;		// Vertical and
-													
-													
-
-
-	//!	Reads TIFF Directory and fills tif structure
-	void ReadTiffDirectory();
-
-	//! Reads the georeferencing keys of a geotiff data
-	bool GetGeoTIFF ();
-
-	//! Reads and inteprets a .tfw file associated to a tiff
-	bool DecodeTFW(const string& filename);
-
-	//! Sets the georeferencing keys of a geotiff data
-	void SetGeoKeys();
-
-	//! Write a dummy image (when creating a tiff file)
-	bool WriteDummyImage();
-
-	//!	Reads a line of monochrome image
-	/*!		\param buf image
-			\param lin line number to read
-			\return true if line is secessfully read and false otherwise
-	*/
-	bool ReadMonoImage(unsigned long lin);
-
-	//!	Reads a line of color image
-	/*!		\param lin line number to read
-			\return true if line is secessfully read and false otherwise
-	*/
-	bool ReadRGBImage(unsigned long lin);
-
-	//!	Reads color image if planar = PLANARCONFIG_CONTIG
-	/*!		\param lin line number to read
-			\return non 0 if line is secessfully written and 0 otherwise
-	*/
-	bool ReadRGBContig(unsigned long lin);
-
-	//!	Reads color image if planar = PHOTOMETRIC_PALETTE
-	/*!		\param lin line number to read
-			\return non 0 if line is secessfully written and 0 otherwise
-	*/
-	bool ReadPaletteContig(unsigned long lin);
-
-	bool ReadTileImageContig(unsigned long lin, unsigned char *line);
-
-	//!	Allocates the internal buffers
-	bool AllocateBuffer();
-
-	//!	Allocates the internal buffers
-	void DeallocateBuffer();
-
-	//!	Reads Lut associated to a raster pallete
-	bool ReadLut();
-
-	//!	Saves the associated LUT for pallete raster 
-	void SaveLut();
-
-	//! Converts buf to 8 bits per pixel into ret buffer
-	//		Input:
-	//			buf - a line of image stored in TIFF
-	//		Output:
-	//			ret - image line converted to 8 bits per pixel
-	//		Preconditions:
-	//			image line buffer (ret) must be allocated
-	//			previously before call this function
-	void To8Bits(u_char *buf,u_char *ret,short vmax=0, short vmin = 0,short nx=0);
-
-	//!	Prints to standard output contents of TIFF directory
-	void Print();
 	
-	//	Returns true if tiff data is compressed
-	bool IsCompressed() { return compress_ != COMPRESSION_NONE; }
+	bool		isTiled_;	// indicates if the data is organizes in tiles 
+	unsigned long	tilew_,tileh_;	// tile and height
+	unsigned long	tilesacross_;	// number of tiles to compose a row of image
+	unsigned long	bytespertile_;	// number of bytes per tile
+	long		TCurTile_;	// current tile decoded in internal memory
+
+	unsigned long	rowsperstrip_;	// number of rows per strip
+	unsigned long	nstripsperplane_;	// number of strips per plane of data
+	unsigned long	stripsize_;	// number of bytes per strip
+	long		TCurStrip_;	// current line in memory
+	
+	unsigned int	nBands_;		// number of samples per data
+
+	// This is an internal smart manager to support the creation of tiffs 
+	TeDecoderSmartMem memManager_;
+    
+	//	Reads TIFF Directory and fills tif structure
+	void readTiffDirectory();
+
+	// Reads the georeferencing keys of a geotiff data
+	bool getGeoTIFF();
+
+	// Sets the georeferencing keys of a geotiff data
+	void setGeoKeys();
+
+	// Reads LUT information
+	bool readLut();
+
+	// Saves LUT information
+	void saveLut();
+
+	// Reads enough tiles to compose a row of data
+	bool readTileImageContig(unsigned long tiler);
+
+	// Reads a strip
+	bool readStrip(unsigned long strip);
+
+	// Allocates te internal memory
+	bool allocateWorkMemory();
+
+	//! Type definition for the getElement function pointer      
+	typedef void (TeDecoderTIFF::*GetEleFunctPtrT)( const long& plane, const long& pos, double& val );
+
+	//! A pointer to the current getElement method following the current data type
+	GetEleFunctPtrT getelement_ptr_;
+
+	//! A casted pointer to the current data
+	unsigned char** data_TeUNSIGNEDCHAR_;  
+
+	//! A casted pointer to the current data
+	char** data_TeCHAR_;  
+
+	//! A casted pointer to the current data
+	unsigned short** data_TeUNSIGNEDSHORT_;  
+
+	//! A casted pointer to the current data
+	short** data_TeSHORT_;  
+
+	//! A casted pointer to the current data
+	int** data_TeINTEGER_;  
+
+	//! A casted pointer to the current data
+	unsigned long** data_TeUNSIGNEDLONG_;  
+
+	//! A casted pointer to the current data
+	long** data_TeLONG_;  
+
+	//! A casted pointer to the current data
+	float** data_TeFLOAT_;
+
+	//! A casted pointer to the current data
+	double** data_TeDOUBLE_;  
+
+	inline void getElement_TeUNSIGNEDCHAR(const long& plane, const long& pos, double& val );  
+
+	inline void getElement_TeCHAR(const long& plane, const long& pos, double& val );  
+
+	inline void getElement_TeUNSIGNEDSHORT(const long& plane, const long& pos, double& val );
+
+	inline void getElement_TeSHORT(const long& plane, const long& pos, double& val );
+
+	inline void getElement_TeINTEGER(const long& plane, const long& pos, double& val );
+
+	inline void getElement_TeUNSIGNEDLONG( const long& plane, const long& pos, double& val );
+
+	inline void getElement_TeLONG(const long& plane, const long& pos, double& val );
+
+	inline void getElement_TeFLOAT(const long& plane, const long& pos, double& val );
+
+	inline void getElement_TeDOUBLE(const long& plane, const long& pos, double& val );  
 
 public:
 
@@ -178,27 +158,27 @@ public:
 	//!	Normal destructor
 	~TeDecoderTIFF();
 
-	//! Initializes raster structure
+	//! Initializes the internal structures
 	void init();
 
-	//! Clear internal parameters
+	//! Clear internal structures
 	bool clear();
 
-	TeCoord2D index2Coord (TeCoord2D& pt);
-	TeCoord2D coord2Index (TeCoord2D& pt);
-
+	//! Reads an element
 	bool setElement (int col,int lin, double val, int band=0);
+
+	//! Writes an element
 	bool getElement (int col,int lin, double &val,int band=0);
 };
 
 //! Implements a tiff decoder factory
-class TeDecoderTIFFFactory : public TeDecoderFactory
+class TL_DLL TeDecoderTIFFFactory : public TeDecoderFactory
 {
 public:
 
-	TeDecoderTIFFFactory(const string& name) : TeDecoderFactory(name) {}
+	TeDecoderTIFFFactory(const string& name);
 
-	virtual TeDecoder* build (const TeRasterParams& arg)
+	TeDecoder* build (const TeRasterParams& arg)
 	{  return new TeDecoderTIFF(arg); }
 };
 
diff --git a/src/terralib/kernel/TeDecoderVirtualMemory.cpp b/src/terralib/kernel/TeDecoderVirtualMemory.cpp
old mode 100644
new mode 100755
index fa52431..a067b7b
--- a/src/terralib/kernel/TeDecoderVirtualMemory.cpp
+++ b/src/terralib/kernel/TeDecoderVirtualMemory.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -21,7 +21,31 @@ indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
 
-#include <TeDecoderVirtualMemory.h>
+#include "TeDecoderVirtualMemory.h"
+#include <cstring>
+
+TeMemoryPage::TeMemoryPage(const TeMemoryPage& rhs)
+{
+	data_ = rhs.data_;
+	used_ = rhs.used_;
+	defValue_ = rhs.defValue_;
+	dataType_ = rhs.dataType_;
+}
+
+//! Operator =
+TeMemoryPage& 
+TeMemoryPage::operator=(const TeMemoryPage& rhs)
+{
+	if (this != &rhs)
+	{
+		data_ = rhs.data_;
+		used_ = rhs.used_;
+		size_ = rhs.size_;
+		defValue_ = rhs.defValue_;
+		dataType_ = rhs.dataType_;
+	}
+	return *this;
+}
 
 //! Destructor
 TeMemoryPage::~TeMemoryPage()
@@ -75,11 +99,11 @@ TeMemoryPage::TeMemoryPage(unsigned long size, double defValue, TeDataType dataT
 		switch (dataType_) {
 		case (TeUNSIGNEDCHAR):
 			data_ = new unsigned char [size_];
-			for (i=0;i<size;((unsigned char*)data_)[i]=(unsigned char) defValue_,i++);
+			memset(data_, (int)defValue, size);
 			break;
 		case (TeCHAR) :
 			data_ = new char [size_];
-			for (i=0;i<size;((char*)data_)[i]=(char) defValue_,i++);
+			memset(data_, (int)defValue, size);
 			break;
 		case (TeUNSIGNEDSHORT):
 			data_ = new unsigned short [size_];
@@ -121,10 +145,8 @@ TeMemoryPage::clear()
 	switch (dataType_) 
 	{
 	case (TeUNSIGNEDCHAR):
-		for (i=0;i<size_;((unsigned char*)data_)[i]=(unsigned char) defValue_,i++);
-		break;
 	case (TeCHAR) :
-		for (i=0;i<size_;((char*)data_)[i]=(char) defValue_,i++);
+		memset((void*)data_, (int)defValue_, size_);
 		break;
 	case (TeUNSIGNEDSHORT):
 		for (i=0;i<size_;((unsigned short*)data_)[i]= (unsigned short) defValue_,i++);
@@ -187,6 +209,7 @@ TeMemoryPage::getVal(int col,int lin, int nCols)
 {
 	unsigned long offset = (lin-ulLin_)*nCols+(col-ulCol_);
 	double val = defValue_;
+
 	if (offset < size_) // solucao temporaria, rever
 	{
 		switch (dataType_) 
@@ -219,6 +242,7 @@ TeMemoryPage::getVal(int col,int lin, int nCols)
 			break;
 		}
 	}
+
 	return val;
 }
 
@@ -268,7 +292,7 @@ TeMemoryPage::setVal(int col,int lin,int nCols, double val)
 	return;
 }
 
-TeDecoderVirtualMemory::TeDecoderVirtualMemory( const TeRasterParams& par)
+TeDecoderVirtualMemory::TeDecoderVirtualMemory(const TeRasterParams par)
 {
 	params_ = par;
 }
@@ -279,27 +303,24 @@ TeDecoderVirtualMemory::~TeDecoderVirtualMemory()
 		TeDecoderVirtualMemory::clear();
 }
 
-bool
-TeDecoderVirtualMemory::getElement(int col,int lin, double &val,int band)
+TeMemoryPage* TeDecoderVirtualMemory::loadBlock(int col,int lin, int band)
 {
-	// identify the page has the pixel (col,lin,band)
-	string index = codifyId(col,lin,band,1,0);
-	TeMemoryPage* block = 0;
+	// If element is outside raster boundaries return
+	if(col < 0 || lin < 0 || col > params_.ncols_ || lin > params_.nlines_)
+		return NULL;
 
-//	int nt = params_.nTilesInMemory_;
+	TeBlockIndex index = blockIndex(col,lin,band);
+	TeMemoryPage* block = NULL;
 
 	// check band cache first
-	if (indexCache_[band] == index)
+	if (pageCache_[band] != NULL && indexCache_[band] == index)
 		block = pageCache_[band];
 	else
 	{
 		// check if page is already in memory
 		MapMemoryPageIterator p = virtualMemory_.find(index);
-		if (p != virtualMemory_.end())
-		{
-			// use it
-			 block = p->second;
-		}
+		if (p != virtualMemory_.end()) // use it
+			block = p->second;
 		else
 		{
 			// page is not in memory
@@ -307,7 +328,7 @@ TeDecoderVirtualMemory::getElement(int col,int lin, double &val,int band)
 			if (virtualMemory_.size() >= (unsigned int)params_.nTilesInMemory_)
 			{
 				// FIFO strategy: replace the oldest page in memory
-				string first = pagesQueue_.front();
+				TeBlockIndex first = pagesQueue_.front();
 				pagesQueue_.pop();
 				p = virtualMemory_.find(first); 
 				if (p != virtualMemory_.end())
@@ -315,24 +336,36 @@ TeDecoderVirtualMemory::getElement(int col,int lin, double &val,int band)
 					block = p->second;
 					if (block->used_)
 						putRasterBlock(first,block->data_,block->pageSize());
+
+					block->used_ = false;
 					block->clear();				// reuse the allocated memory
 					virtualMemory_.erase(first);
 				}
 			}
-			else
-				// bring the page to memory
+			else // bring the page to memory
 				block = new TeMemoryPage(params_.blockHeight_*params_.blockWidth_, params_.dummy_[band],params_.dataType_[band]);
 
 			virtualMemory_.insert(MapMemoryPage::value_type(index,block));
 			pagesQueue_.push(index);
-			int ulLin=0, ulCol=0;
-			getRasterBlock(index,block->data_,ulCol,ulLin);
-			block->ulLin_ = ulLin;
-			block->ulCol_ = ulCol;
+			getRasterBlock(index,block->data_);
+			int band_out;
+			blockIndexPos(index, block->ulCol_, block->ulLin_, band_out);
 		}
 		indexCache_[band] = index;
 		pageCache_[band] = block;
 	}
+  return block;
+}
+
+bool
+TeDecoderVirtualMemory::getElement(int col,int lin, double &val,int band)
+{
+	TeMemoryPage* block = loadBlock(col, lin, band);
+	if(block == NULL)
+	{
+		val = params_.dummy_[band];
+		return false;
+	}
 	val = block->getVal(col,lin,params_.blockWidth_);
 	return true;
 }
@@ -340,85 +373,52 @@ TeDecoderVirtualMemory::getElement(int col,int lin, double &val,int band)
 bool
 TeDecoderVirtualMemory::setElement(int col, int lin, double val,int band)
 {
-	string index = codifyId(col,lin,band,1,0);
-
-	TeMemoryPage* block = 0;
+	TeMemoryPage* block = loadBlock(col, lin, band);
+	if(block == NULL)
+		return false;
 
-	// check band cache first
-	if (indexCache_[band] == index)
-		block = pageCache_[band];
-	else
-	{
-		MapMemoryPageIterator p = virtualMemory_.find(index);
-		if (p != virtualMemory_.end())
-		{
-			 block = p->second;
-		}
-		else
-		{
-			if (virtualMemory_.size() >= (unsigned int)params_.nTilesInMemory_)
-			{
-				string first = pagesQueue_.front();
-				pagesQueue_.pop();
-				p = virtualMemory_.find(first);
-				if (p != virtualMemory_.end())
-				{
-					block = p->second;
-					if (block->used_ == true)
-					{
-						putRasterBlock(first,block->data_,block->pageSize());
-					}
-					block->clear();
-					virtualMemory_.erase(first);
-				}
-			}
-			else
-				block = new TeMemoryPage(params_.blockHeight_*params_.blockWidth_, params_.dummy_[band],params_.dataType_[band]);
-			virtualMemory_.insert(MapMemoryPage::value_type(index,block));
-			pagesQueue_.push(index);
-			int ulLin=0, ulCol=0;
-			getRasterBlock(index,block->data_,ulCol,ulLin);
-			block->ulLin_ = ulLin;
-			block->ulCol_ = ulCol;
-		}
-		indexCache_[band] = index;
-		pageCache_[band] = block;
-	}
 	block->setVal(col,lin,params_.blockWidth_,val);
 	block->used_ = true;
 	return true;
 }
 
+TeBlockIndex TeDecoderVirtualMemory::blockIndex(int col, int lin, int band)
+{
+	TeBlockIndex bl_idx;
+
+	bl_idx.band_ = band;
+	bl_idx.col_ = (int)(col/params_.blockWidth_);
+	bl_idx.lin_ = (int)(lin/params_.blockHeight_);
+	return bl_idx;
+}
 
-/*bool
-TeDecoderVirtualMemory::create()
+void TeDecoderVirtualMemory::blockIndexPos( const TeBlockIndex& index, int& ulCol, int& ulLin, int& band)
 {
-	clear();
-	if ( params_.nTilesInMemory_ == 0 )
-		params_.nTilesInMemory_ = params_.nBands() * (params_.ncols_ / params_.blockWidth_+1) ;
-	pageCache_.resize(params_.nBands(),0);
-	indexCache_.resize(params_.nBands(),"");
-	return true;
+	ulCol = index.column()*params_.blockWidth_;
+	ulLin = index.line()*params_.blockHeight_;
+	band = index.band();
 }
-*/
+
 void
 TeDecoderVirtualMemory::init()
 {
 	TeDecoderVirtualMemory::clear();
+	if (params_.nBands() == 0 || params_.ncols_ <= 0 || params_.nlines_ == 0)
+	{
+		params_.errorMessage_ = "Raster doesnt have valid dimensions.";
+		params_.status_ = TeRasterParams::TeNotReady;
+		return;
+	}
 	if ( params_.nTilesInMemory_ == 0 )
 		params_.nTilesInMemory_ = params_.nBands() * (params_.ncols_ / params_.blockWidth_+1) ;
-	pageCache_.resize(params_.nBands(),0);
-	indexCache_.resize(params_.nBands(),"");
 }
 
 bool
 TeDecoderVirtualMemory::clear()
 {
 	TeMemoryPage* block;
-	string index;
-
+	TeBlockIndex index;
 	MapMemoryPageIterator p;
-
 	while (!pagesQueue_.empty() )
 	{
 		index = pagesQueue_.front();
@@ -428,15 +428,46 @@ TeDecoderVirtualMemory::clear()
 		{
 			block = p->second;
 			if (block->used_)
-			{
 				putRasterBlock(index,block->data_,block->pageSize());
-			}
 			delete block;
 			virtualMemory_.erase(index);
 		}
 	}
-	indexCache_.clear();
-	pageCache_.clear();
+	
+	pageCache_.resize(params_.nBands());
+	for(unsigned int i = 0; i < pageCache_.size(); ++i)
+	{
+		pageCache_[i] = NULL;
+	}
+
+	indexCache_.resize(params_.nBands());
+	for(unsigned int i = 0; i < indexCache_.size(); ++i)
+	{
+		indexCache_[i] = TeBlockIndex();
+	}
+
 	return true;
 }
 
+void TeDecoderVirtualMemory::setCacheSize(int size)
+{
+	int block_size = params_.blockHeight_ * params_.blockWidth_;
+	setCacheNTiles((int)(size / block_size));  
+}
+
+int TeDecoderVirtualMemory::getCacheSize()
+{
+	int block_size = params_.blockHeight_ * params_.blockWidth_;
+	return getCacheNTiles() * block_size;
+}
+
+void TeDecoderVirtualMemory::setCacheNTiles(int n)
+{
+	params_.nTilesInMemory_ = n;
+	TeDecoderVirtualMemory::clear();
+}
+
+int TeDecoderVirtualMemory::getCacheNTiles()
+{
+	return params_.nTilesInMemory_;
+}
diff --git a/src/terralib/kernel/TeDecoderVirtualMemory.h b/src/terralib/kernel/TeDecoderVirtualMemory.h
old mode 100644
new mode 100755
index 5e7ad69..99f33d6
--- a/src/terralib/kernel/TeDecoderVirtualMemory.h
+++ b/src/terralib/kernel/TeDecoderVirtualMemory.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -21,19 +21,21 @@ indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
 /*! \file TeDecoderVirtualMemory.h
-    This file supports a virtual memory strategy to deal whith raster structures
+    \brief This file supports a virtual memory strategy to deal whith raster structures
 */
 #ifndef  __TERRALIB_INTERNAL_DECODERVIRTUALMEMORY_H
 #define  __TERRALIB_INTERNAL_DECODERVIRTUALMEMORY_H
 
+#include "TeDefines.h"
 #include "TeDecoder.h"
 
 #include <queue>
 #include <vector>
+
 using namespace std;
 
 //! A page of memory
-class TeMemoryPage
+class TL_DLL TeMemoryPage
 {
 public:
 	void*   data_;			//<! Pointer to the data in memory
@@ -52,27 +54,10 @@ public:
 	~TeMemoryPage();
 
 	//! Copy constructor
-	TeMemoryPage(const TeMemoryPage& rhs)
-	{
-		if (this != &rhs)
-		{
-			data_ = rhs.data_;
-			used_ = rhs.used_;
-			defValue_ = rhs.defValue_;
-			dataType_ = rhs.dataType_;
-		}
-	}
+	TeMemoryPage(const TeMemoryPage& rhs);
 	
 	//! Operator =
-	TeMemoryPage& operator=(const TeMemoryPage& rhs)
-	{
-		data_ = rhs.data_;
-		used_ = rhs.used_;
-		size_ = rhs.size_;
-		defValue_ = rhs.defValue_;
-		dataType_ = rhs.dataType_;
-		return *this;
-	}
+	TeMemoryPage& operator=(const TeMemoryPage& rhs);
 
 	//! Returns the value of on position within the block
 	/*
@@ -99,68 +84,63 @@ public:
 	long pageSize();
 };
 
-//! A map of string identifiers to pointer to memory pages 
-typedef map<string,TeMemoryPage*> MapMemoryPage;
+class TL_DLL TeBlockIndex{
+public:
+	TeBlockIndex()
+	{
+		col_ = 0;
+		lin_ = 0;
+		band_ = -1;
+	}
+
+	int col_;
+	int lin_;
+	int band_;
+
+	int column()  const
+	{
+		return col_;
+	}
+
+	int line() const
+	{
+		return lin_;
+	}
+
+	int band() const
+	{
+		return band_;
+	}
+
+	int operator==(const TeBlockIndex& idx2) const
+	{
+		if(col_ != idx2.col_)
+			return 0;
 
-//! A const iterator to a map of pages
-typedef map<string,TeMemoryPage*>::const_iterator MapMemoryPageIterator;
+		if(lin_ != idx2.lin_)
+			return 0;
+
+		return (band_ == idx2.band_);
+	}
+};
 
 //! Implements a virtual memory strategy to decode raster in blocks
 /*
 	It should be used as a parent class of decoder that access raster
 	blocks from a physical storage
 */
-class TeDecoderVirtualMemory: public TeDecoder
+class TL_DLL TeDecoderVirtualMemory: public TeDecoder
 {
 public:
 
 	//! Empty constructor
 	TeDecoderVirtualMemory() {};
 	
-	//! Constructor from paramenters
-	TeDecoderVirtualMemory( const TeRasterParams& par);
+	//! Constructor from parameters
+	TeDecoderVirtualMemory( const TeRasterParams par);
 
 	//! Destructor
-	~TeDecoderVirtualMemory();
-
-	//! Saves a raster tile from a virtual memory to permanent storage
-	/*! 
-	    \param index tile unique identifier 
-		\param buf pointer to a raster tile in memory
-		\param bsize block size
-	*/	
-	virtual bool putRasterBlock(const string& index, void *buf, long bsize) = 0;
-
-	//! Gets the raster block with index identifier
-	/*!
-		\param index tile unique identifier
-		\param buf pointer to a raster tile in memory
-		\param ulCol returns the column index of the upper-left corner of the block
-		\param ulLin returns the column index of the upper-left corner of the block
-	*/
-	virtual bool getRasterBlock(const string& index, void *buf, int&  ulCol, int&  ulLin) = 0;
-
-	//! Codifies the unique identifier of the raster block that contains a certain pixel
-	/*!
-		\param col column number
-		\param lin  pixel line number
-		\param band pixel band 
-		\param res pixel resolution factor
-		\param subb pixel sub band information
-		\return block unique identifier
-	*/
-	virtual string	codifyId(int col, int lin, int band, int res, int subb) = 0;
-
-	//! Decodifies a block unique identifier to get some block information
-	/*!
-		\param index block unique identifier
-		\param col returns the column number of the upper-left corner of the block
-		\param lin returns the line number of the upper-left corner of the block
-		\param band returns the band id block
-		\param res returns the resolution factor of the block
-		\param subb returns the sub band information of the block
-	*/	
-	virtual void decodifyId(const string& index, int& col, int& lin, int& band, int& res, int& subb) = 0;
+	virtual ~TeDecoderVirtualMemory();
 
 	//! Sets the value of a specific raster pixel 
 	/*!
@@ -186,11 +166,76 @@ public:
 	//! Clears  the decoder internal structures
 	bool clear();
 
+	//! Defines the physical size of the cache
+	void setCacheSize(int size);  
+
+	//! Returns the physical size of the cache
+	int getCacheSize();
+
+	//! Defines the number of tiles in the cache
+	void setCacheNTiles(int n);
+
+	//! Returns the number of tiles in the cache
+	int getCacheNTiles();
+
+protected:
+	struct TeBlockIndexMapFunc
+	{
+		bool operator()(const TeBlockIndex& idx1, const TeBlockIndex& idx2) const;
+	};
+
+	//! Saves a raster tile from a virtual memory to permanent storage
+	/*! 
+	    \param index block index
+		\param buf pointer to a raster tile in memory
+		\param bsize block size
+	*/	
+	virtual bool putRasterBlock(const TeBlockIndex& index, void *buf, long bsize) = 0; /******/
+
+	//! Gets the raster block with index identifier
+	/*!
+		\param index block index
+		\param buf pointer to a raster tile in memory
+	*/
+	virtual bool getRasterBlock(const TeBlockIndex& index, void *buf) = 0; /******/
+
+	//! Codifies the unique identifier of the raster block that contains a certain pixel
+	/*!
+		\param col column number
+		\param lin  pixel line number
+		\param band pixel band 
+		\return block index
+	*/
+	virtual TeBlockIndex blockIndex(int col, int lin, int band); 
+
+	//! Returns the parameters of a tile from its indexs
+	virtual void blockIndexPos( const TeBlockIndex& index, int& ulCol, int& ulLin, int& band); /******/
+
+	//! Retrieve a block of the cache that contains an element
+	TeMemoryPage* loadBlock(int col,int lin, int band);
+
 private:
+
+	//! A map of string identifiers to pointer to memory pages 
+	typedef map<TeBlockIndex, TeMemoryPage*, TeBlockIndexMapFunc> MapMemoryPage; 
+
+	//! A const iterator to a map of pages
+	typedef MapMemoryPage::const_iterator MapMemoryPageIterator;
+
 	MapMemoryPage virtualMemory_;
-	queue<string> pagesQueue_;
-	vector<string> indexCache_;
+	queue<TeBlockIndex> pagesQueue_; 
+	vector<TeBlockIndex> indexCache_; 
 	vector<TeMemoryPage*> pageCache_;
 };
 
+inline bool TeDecoderVirtualMemory::TeBlockIndexMapFunc::operator()(const TeBlockIndex& idx1, const TeBlockIndex& idx2) const
+{
+  if(idx1.band_ != idx2.band_)
+    return (idx1.band_ < idx2.band_);
+
+  if(idx1.lin_ != idx2.lin_)
+    return idx1.lin_ < idx2.lin_;
+
+  return (idx1.col_ < idx2.col_);
+}
 #endif
diff --git a/src/terralib/kernel/TeDefines.h b/src/terralib/kernel/TeDefines.h
old mode 100644
new mode 100755
index 11f5044..b7a13a9
--- a/src/terralib/kernel/TeDefines.h
+++ b/src/terralib/kernel/TeDefines.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright  2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -21,65 +21,214 @@ indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
 /*! \file TeDefines.h
-    Provides a set of general definitions used by Terralib
+    \brief Provides a set of general definitions used by Terralib
 */
 #ifndef  __TERRALIB_INTERNAL_DEFINES_H
 #define  __TERRALIB_INTERNAL_DEFINES_H
 
-const int		TeNAME_LENGTH = 400;				//<! A default name lenght
-const double	TeMAXFLOAT =	3.4E37;				//<! Maximum float value
-const double	TeMINFLOAT =	3.4E-37;			//<! Minimum float value
-const double	TePI  =	3.14159265358979323846;		//<! The ratio of the circumference to the diameter of a circle
-const double	TeCDR =	0.01745329251994329576;		//<! Conversion factor: degrees to radians
-const double	TeCRD = 57.29577951308232087679;	//<!Conversion factor: radians to degrees
-
-
-// General position definitions
-#define	TeUNKNOWNPOSITION  0
-#define	TeINSIDE		   1
-#define	TeOUTSIDE		   2
-#define	TeBOUNDARY		   4
-
-
-// Intersection type
-#define TeINTERIORINTERIOR 8
-#define TeINTERIORBOUNDARY 16
-#define TeINTERIOREXTERIOR 32
-#define TeBOUNDARYINTERIOR 64
-#define TeBOUNDARYBOUNDARY 128
-#define TeBOUNDARYEXTERIOR 256
-#define TeEXTERIORINTERIOR 512
-#define TeEXTERIORBOUNDARY 1024
-#define TeEXTERIOREXTERIOR 2048
-
-// Segment intersection
-#define TeDONT_INTERSECT 0
-#define TeDO_INTERSECT   1
-//#define TeCOLLINEAR      2
-#define TeAT_ENDPOINT    4
+#include <string> 
+
+/** @defgroup Defines Defines and constants
+  @{
+ */
+
+ 
+/** @defgroup PlatformDetection Platform detection macros.
+  @{
+ */
+/** @brief Microsoft Windows platform code */ 
+#define TePLATFORMCODE_MSWINDOWS 1
+/** @brief Generic Linux platform code */ 
+#define TePLATFORMCODE_LINUX 2
+/** @brief Solaris platform code */ 
+#define TePLATFORMCODE_SOLARIS 3
+/** @brief Apple platform code */ 
+#define TePLATFORMCODE_APPLE 4
+/** @brief IBM AIX platform code */ 
+#define TePLATFORMCODE_AIX 5
+
+#if defined( WIN32 ) || defined( __WIN32__ ) || defined ( _WIN32 ) || defined( WIN64 ) || defined( _WIN32_WCE )
+  #define TePLATFORM TePLATFORMCODE_MSWINDOWS
+#elif defined( __LINUX__ ) || defined( linux ) || defined( __linux__ ) ||defined( __FreeBSD__ ) //FAMI
+  #define TePLATFORM TePLATFORMCODE_LINUX
+#elif defined( __APPLE_CC__ ) || defined( APPLE_CC )
+  #define TePLATFORM TePLATFORMCODE_APPLE
+#elif defined(sparc) && defined(sun) && defined(unix) 
+  #define TePLATFORM TePLATFORMCODE_SOLARIS
+#elif defined(_AIX)
+  #define TePLATFORM TePLATFORMCODE_AIX
+  #define __unix__
+#else
+  #error "ERROR: Unknown platform"
+#endif
+/** @} */ 
+
+/** @defgroup CompilerDetection Compiler detection macros.
+  @{
+ */
+/** @brief MS Visual Studio c++ code */ 
+#define TeCOMPILERCODE_VCPLUSPLUS 1
+/** @brief Borland c++ code */ 
+#define TeCOMPILERCODE_BCPLUSPLUS 2
+/** @brief GNU Compiler code */ 
+#define TeCOMPILERCODE_GNUC 3
+/** @brief CodeWarrior code */ 
+#define TeCOMPILERCODE_CODEWARRIOR 4
+/** @brief Sun Forte code */ 
+#define TeCOMPILERCODE_SUNFORTE7 5
+/** @brief AIX xlC code */ 
+#define TeCOMPILERCODE_XLC 6
+
+#if defined( _MSC_VER )
+  #define TeCOMPILER TeCOMPILERCODE_VCPLUSPLUS
+#elif defined( __BORLANDC__ ) || defined( __BCPLUSPLUS__ )
+  #define TeCOMPILER TeCOMPILERCODE_BCPLUSPLUS
+#elif defined( __GNUC__ )
+  #define TeCOMPILER TeCOMPILERCODE_GNUC
+#elif defined( __MWERKS__ )
+  #define TeCOMPILER TeCOMPILERCODE_CODEWARRIOR
+#elif defined( __SUNPRO_CC)
+  #define TeCOMPILER TeCOMPILERCODE_SUNFORTE7
+#elif defined( __xlC__ )
+  #define TeCOMPILER TeCOMPILERCODE_XLC
+#else
+  #error "ERROR: Unknown compiler"
+#endif
+/** @} */ 
+
+
+/** @defgroup MathConst Mathematical constants and macro definitions
+  @{
+ */
+//! A default name length
+const int	TeNAME_LENGTH = 2000;			//!< A default name length
+const double	TeMAXFLOAT =	3.4E37;			//!< Maximum float value
+const double	TeMINFLOAT =	3.4E-37;		//!< Minimum float value
+const double	TePI  =	3.14159265358979323846;		//!< The ratio of the circumference to the diameter of a circle
+const double	TeCDR =	0.01745329251994329576;		//!< Conversion factor: degrees to radians
+const double	TeCRD = 57.29577951308232087679;	//!< Conversion factor: radians to degrees
+const double 	TeEARTHRADIUS   = 6378160.;		//!< Int. Astronomical Union - 1965
 
 #ifndef MAX
-#define MAX(a,b) a>b?a:b
+#define MAX(a,b) ( (a>b) ? a : b )	//!< Macro that returns max between two values
 #endif
 
 #ifndef MIN
-#define MIN(a,b) a<b?a:b
+#define MIN(a,b) ( (a<b) ? a : b )	//!< Macro that returns min between two values
 #endif
 
 #ifndef ABS
-#define ABS(x) 	( ((x) >= 0) ? (x) : -(x) )
+#define ABS(x) 	( ((x) >= 0) ? (x) : -(x) )	//!< Macro that returns the absolute value
+#endif
+/** @} */
+
+
+/** @defgroup Selection Mode for the objects
+	@{
+ */
+#define TeDEFAULT			0	//!< default selection
+#define TePOINTED			1	//!< object pointed
+#define TeQUERIED   		2	//!< object queried
+#define TePOINTED_QUERIED	3	//!< object pointed and queried
+/** @} */	// end Selection Mode
+
+
+/** @defgroup Orient Ring orientation
+	@{
+ */
+#define TeNOTURN			 0	//!< Unknown orientation
+#define TeCOLLINEAR			 0	//!< Collinear
+#define TeCLOCKWISE   		-1	//!< Clockwise orientation
+#define TeCOUNTERCLOCKWISE	 1	//!< Counter-Clockwise orientation
+/** @} */	// end Orientation
+
+/** @defgroup TopDefines Topology related defines
+    @{
+ */
+/** @defgroup InOut Inside/Outside positioning
+	@ingroup TopDefines
+    @{
+ */
+#define	TeUNKNOWNPOSITION  0	//!< unknown position
+#define	TeINSIDE		   1	//!< inside position
+#define	TeOUTSIDE		   2	//!< outside position
+#define	TeBOUNDARY		   4	//!< on the boundary position
+/** @} */
+
+
+/** @defgroup Inter Intersection types
+	@ingroup TopDefines
+    @{
+ */
+/** @defgroup GeneralInter General intersection
+	@ingroup Inter
+	@{
+ */
+#define TeINTERIORINTERIOR 8	//!< interior and interior intersection
+#define TeINTERIORBOUNDARY 16	//!< interior and boundary intersection
+#define TeINTERIOREXTERIOR 32	//!< interior and exterior intersection
+#define TeBOUNDARYINTERIOR 64	//!< boundary and interior intersection
+#define TeBOUNDARYBOUNDARY 128	//!< boundary and boundary intersection
+#define TeBOUNDARYEXTERIOR 256	//!< boundary and exterior intersection
+#define TeEXTERIORINTERIOR 512	//!< exterior and interior intersection
+#define TeEXTERIORBOUNDARY 1024	//!< exterior and boundary intersection
+#define TeEXTERIOREXTERIOR 2048	//!< exterior and exterior intersection
+/** @} */ // end GeneralInter
+
+/** @defgroup SegInter Segments intersection
+	@ingroup Inter
+	@{
+ */
+#define TeDONT_INTERSECT 0		//!< segments don't intersects
+#define TeDO_INTERSECT   1		//!< segments intersects
+#define TeAT_ENDPOINT    4		//!< segments intersects at end points
+/** @} */	// end SegInter
+/** @} */  // end Inte
+
+/** @defgroup TopOper Topological operations
+	@{
+ */
+#define TeDIFFERENCE   1	//!< Difference operation
+#define TeUNION        2	//!< Union operation
+#define TeINTERSECTION 4	//!< Intersection operation
+/** @} */ // end TopOper
+/** @} */ // end TopDefines
+/** @} */ // end Defines
+
+//! Current terralib database version
+const std::string TeDBVERSION = "3.3.1"; 		
+
+/* @brief TeISNAN definition */
+
+#if TePLATFORM == TePLATFORMCODE_MSWINDOWS
+  #include <float.h>
+  #define TeISNAN( x ) _isnan( x )
+#elif TePLATFORM == TePLATFORMCODE_LINUX || TePLATFORM == TePLATFORMCODE_AIX
+  #include <math.h>
+  #define TeISNAN( x ) isnan( x )
+#else
+  #error "ERROR: Unsupported platform"
 #endif
 
-// Orientation
-#define TeNOTURN			 0
-#define TeCOLLINEAR			 0
-#define TeCLOCKWISE   		-1
-#define TeCOUNTERCLOCKWISE	 1
+/** @defgroup TerraLib_AS_DLL macros.
+  @{
+ */
+#if defined( WIN32 ) || defined( __WIN32__ ) || defined ( _WIN32 ) || defined( WIN64 ) || defined( _WIN32_WCE )
 
-// Operation
-#define TeDIFFERENCE   1
-#define TeUNION        2
-#define TeINTERSECTION 4
+#if defined(_MSC_VER) /* MSVC Compiler */
+#pragma warning(disable: 4251)
+#endif
+
+#ifdef TL_AS_DLL
+#define TL_DLL __declspec(dllexport)
+#else
+#define TL_DLL __declspec(dllimport)
+#endif
+
+#else
+#define TL_DLL
+#endif
+/** @} */ 
 
 #endif
 
diff --git a/src/terralib/kernel/TeErrorLog.cpp b/src/terralib/kernel/TeErrorLog.cpp
old mode 100644
new mode 100755
index fae26f2..f104ed8
--- a/src/terralib/kernel/TeErrorLog.cpp
+++ b/src/terralib/kernel/TeErrorLog.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright  2001-2004 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -28,6 +28,7 @@ of this library and its documentation.
 #include "TeErrorLog.h"
 #include "TeAsciiFile.h"
 #include "TeUtils.h"
+#include "TeException.h"
 
 TeErrorLog::TeErrorLog():logFile_ ( 0 )
 {
@@ -85,14 +86,17 @@ TeErrorLog::TeErrorLog():logFile_ ( 0 )
 
 	// Error codes for layer stuff
 	errorMessage_ [  GEOMETRY_REPRESENTATION_MISMATCH ] = "Geometry representation has not been created";
+  
+  // TeFactory related errors
+  errorMessage_ [  FACTORY_PRODUCT_INSTATIATION_ERROR ] = 
+    "Factory product instatiation error";
 
 	errorMessage_ [  UNKNOWN_ERROR_TYPE ] = "";
 }
 
 TeErrorLog::~TeErrorLog()
 {
-	if ( logFile_ != 0 )
-		delete logFile_;
+  endSession();
 }
 string
 TeErrorLog::message( const TeErrorType msgCode )
@@ -115,6 +119,7 @@ TeErrorLog::insert ( TeErrorType code, const string& msg )
 
 	string log = errorMessage_ [ code ] + " " + msg;
 	logFile_->writeString ( log );
+  logFile_->writeNewLine();
 
 	// increment the count associated to this error type
 	map<TeErrorType, int>::iterator it = errorLog_.find( code );
@@ -131,20 +136,25 @@ TeErrorLog::insert ( TeErrorType code, const string& msg )
 void 
 TeErrorLog::startSession ( const string& errLogFileName)
 {
-	// clean the logfile
-	if ( logFile_  != 0 )
-		delete logFile_;
-
+  endSession();
+  
 	// create a new logfile
-	logFile_ = new TeAsciiFile ( errLogFileName, "rw" );
-
-	// clear the stack
-	errorLog_.clear();
+	logFile_ = new TeAsciiFile ( errLogFileName, "w+" );
+  
+  if( logFile_ == 0 ) {
+    throw TeException( UNKNOWN_ERROR_TYPE, "Unable to create log file", 
+      false );
+  }
 }
 
 int
 TeErrorLog::endSession ()
 {
+  if( logFile_ == 0 ) {
+    errorLog_.clear ();
+    return 0;
+  }
+
 	int numerr =  errorLog_.size();
 
 	// increment the count associated to this error type
@@ -156,16 +166,19 @@ TeErrorLog::endSession ()
 		string log = "Number of Error of Type " + errorMessage_ [ (*it).first ] 
 			+ " = " + Te2String ( count );
 		logFile_->writeString ( log );
+    logFile_->writeNewLine();
+    
+    ++it;
 	}
 
 	// close the log file
-	if ( logFile_  != 0 )
-		delete logFile_;
+	delete logFile_;
+  logFile_ = 0;
 
 	// clear the stack
 	errorLog_.clear ();
 
-return numerr;
+  return numerr;
 }
  
  
diff --git a/src/terralib/kernel/TeErrorLog.h b/src/terralib/kernel/TeErrorLog.h
old mode 100644
new mode 100755
index 05153db..53bc89a
--- a/src/terralib/kernel/TeErrorLog.h
+++ b/src/terralib/kernel/TeErrorLog.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright  2001-2004 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -21,7 +21,7 @@ indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
 /*! \file TeErrorLog.h
-    This file deals log of errors in TerraLib
+    \brief This file deals log of errors in TerraLib
 */
 #ifndef  __TERRALIB_INTERNAL_ERRORLOG_H
 #define  __TERRALIB_INTERNAL_ERRORLOG_H
@@ -92,6 +92,9 @@ enum TeErrorType
 
 	// Layer stuff
 	GEOMETRY_REPRESENTATION_MISMATCH,
+  
+  // TeFactory related errors
+  FACTORY_PRODUCT_INSTATIATION_ERROR,
 
 	// Other
 	UNKNOWN_ERROR_TYPE
@@ -110,7 +113,7 @@ typedef map<TeErrorType, int> TeErrorLogMap;
 
 \sa TeException, TeSingleton
 */
-class TeErrorLog: public TeSingleton<TeErrorLog>
+class TL_DLL TeErrorLog: public TeSingleton<TeErrorLog>
 {
 public:
 	TeErrorLog();
diff --git a/src/terralib/kernel/TeErrorMessage.cpp b/src/terralib/kernel/TeErrorMessage.cpp
old mode 100644
new mode 100755
index 23eb6d6..2916e6d
--- a/src/terralib/kernel/TeErrorMessage.cpp
+++ b/src/terralib/kernel/TeErrorMessage.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
diff --git a/src/terralib/kernel/TeErrorMessage.h b/src/terralib/kernel/TeErrorMessage.h
old mode 100644
new mode 100755
index 3e38e9d..9aaf752
--- a/src/terralib/kernel/TeErrorMessage.h
+++ b/src/terralib/kernel/TeErrorMessage.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,9 +20,8 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeErrorMessage.h
-    This file contains some definitions issuing error messages to the user
+    \brief This file contains some definitions issuing error messages to the user
 */
 #ifndef TeErrorMessage_H
 #define TeErrorMessage_H
@@ -87,7 +86,7 @@ enum TeMessageReturn
   
 	  \sa TeException 
 */
-class TeErrorMessage
+class TL_DLL TeErrorMessage
 {
 public:
 	//! Constructor
@@ -102,7 +101,7 @@ public:
 				  TeMessageIcon iconType ) = 0; 
 };
 
-class TeErrorMessagePrototype: public TePrototype<TeErrorMessage>
+class TL_DLL TeErrorMessagePrototype: public TePrototype<TeErrorMessage>
 {
 	virtual TeErrorMessage* build() = 0;
 };
diff --git a/src/terralib/kernel/TeException.cpp b/src/terralib/kernel/TeException.cpp
old mode 100644
new mode 100755
index 4f5cc81..82e4021
--- a/src/terralib/kernel/TeException.cpp
+++ b/src/terralib/kernel/TeException.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -27,6 +27,7 @@ of this library and its documentation.
 
 #include "TeException.h"
 #include "TeErrorLog.h"
+#include <cstring>
 #include <errno.h>
 
 TeException::TeException ( TeErrorType msgCode, const string& userText, bool haserrno ):
@@ -39,13 +40,13 @@ TeException::TeException ( TeErrorType msgCode, const string& userText, bool has
 }
 
 string 
-TeException::message()
+TeException::message() const
 {
 	return TeErrorLog::instance().message ( msgCode_ ) + " " + userText_;
 }
 
 TeErrorType
-TeException::code ()
+TeException::code () const
 {
 	return msgCode_;
 }
diff --git a/src/terralib/kernel/TeException.h b/src/terralib/kernel/TeException.h
old mode 100644
new mode 100755
index 4a7599f..ea5dad2
--- a/src/terralib/kernel/TeException.h
+++ b/src/terralib/kernel/TeException.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -21,7 +21,7 @@ indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
 /*! \file TeException.h
-    This file deals Eexception throwing in TerraLib
+    \brief This file deals Eexception throwing in TerraLib
 */
 #ifndef  __TERRALIB_INTERNAL_EXCEPTION_H
 #define  __TERRALIB_INTERNAL_EXCEPTION_H
@@ -39,7 +39,7 @@ using namespace std;
 
 
 //!  Provides a class for handling exceptions on Terralib
-class TeException {
+class TL_DLL TeException {
 public:
 
 // -- Contructors
@@ -52,8 +52,8 @@ public:
 
 // --  Members
 
-	string			message ();
-	TeErrorType	    code();
+	string			message () const;
+	TeErrorType	    code() const;
 	
 protected:
 	
diff --git a/src/terralib/kernel/TeExternalTheme.cpp b/src/terralib/kernel/TeExternalTheme.cpp
new file mode 100644
index 0000000..4fc5157
--- /dev/null
+++ b/src/terralib/kernel/TeExternalTheme.cpp
@@ -0,0 +1,1486 @@
+#include "TeExternalTheme.h"
+#include "TeLayer.h"
+#include "TeDatabase.h"
+#include "TeDatabaseFactoryParams.h"
+#include "TeDBConnectionsPool.h"
+#include "TeGroupingAlgorithms.h"
+#include "TeQuerier.h"
+#include "TeQuerierParams.h"
+#include "TeRasterTransform.h"
+
+
+TeExternalTheme::TeExternalTheme(TeDatabase* sourceDb, TeTheme* remoteTheme, const int& viewId, 
+                                 const string& name) :
+TeTheme(name, 0, 0, viewId),
+remoteTheme_(NULL),
+sourceDB_(sourceDb),
+remoteDbId_(-1)
+{
+    type(TeEXTERNALTHEME);
+
+    if(remoteTheme != NULL)
+    {
+        setRemoteTheme(remoteTheme);
+    }
+}
+
+TeExternalTheme::~TeExternalTheme()
+{
+    if(remoteTheme_ != NULL)
+    {
+        delete remoteTheme_;
+    }
+}
+
+TeExternalTheme& TeExternalTheme::operator=(TeExternalTheme& rhs)
+{
+	*(TeTheme*)this = rhs;
+	remoteTheme_ = rhs.remoteTheme_;
+
+    return *this;
+}
+
+TeTheme* 
+TeExternalTheme::getRemoteTheme() const
+{
+	return remoteTheme_;
+}
+
+void TeExternalTheme::setRemoteTheme(TeTheme* theme)
+{
+    remoteTheme_ = new TeTheme(*theme);
+    TeLayer* remoteLayer = new TeLayer(*theme->layer());
+
+    grouping_ = remoteTheme_->grouping();
+
+    remoteTheme_->layer(remoteLayer);
+    remoteDbId_ = TeDBConnectionsPool::instance().getDatabaseIdx(remoteLayer->database());
+}
+
+TeDatabase* TeExternalTheme::getSourceDatabase()
+{
+    return sourceDB_;
+}
+
+void TeExternalTheme::setSourceDatabase(TeDatabase* srcDB)
+{
+	sourceDB_ = srcDB;
+}
+
+string 
+TeExternalTheme::getRemoteThemeName()
+{ 
+	return remoteTheme_->name();
+}
+
+void 
+TeExternalTheme::loadObjectLegendMap()
+{
+	objLegendMap_.clear();
+	objOwnLegendMap_.clear();
+	objStatusMap_.clear();
+	itemStatusMap_.clear();
+
+	TeDatabasePortal* portal = sourceDB_->getPortal();
+
+	if(!portal->query("SELECT c_object_id, c_legend_id, c_legend_own, c_object_status FROM " + collectionTable()))
+		return;
+
+	while(portal->fetchRow())
+	{
+		string objId = portal->getData(0);
+		int status = portal->getInt(3);
+		if(portal->getInt(1) != 0)
+			objLegendMap_[portal->getData(0)] = portal->getInt(1);
+		if(portal->getInt(2) != 0)
+			objOwnLegendMap_[portal->getData(0)] = portal->getInt(2);
+		if(status != 0)
+			objStatusMap_[objId] = status;
+	}
+
+	portal->freeResult();
+
+	if(!portal->query("SELECT object_id, unique_id, grid_status FROM " + collectionAuxTable()))
+		return;
+	
+	while(portal->fetchRow())
+	{
+		if(portal->getInt(2) != 0)
+		{
+			itemStatusMap_[portal->getData(1)] = portal->getInt(2);
+		}
+	}
+
+	portal->freeResult();
+	delete portal;
+}
+
+int 
+TeExternalTheme::getGridStatus(const int uniqueId, const std::string /* objectId */)
+{
+	string aux = Te2String(uniqueId);
+	std::map<std::string, int >::iterator itGridStatus = itemStatusMap_.find(aux);
+	if(itGridStatus == itemStatusMap_.end())
+		return 0;
+	return itGridStatus->second;
+}
+		
+int 
+TeExternalTheme::getObjectStatus(const std::string objectId)
+{
+	std::map<std::string, int>::iterator it = objStatusMap_.find(objectId);
+	if(it == objStatusMap_.end())
+		return 0;
+	
+	return it->second;
+}
+
+bool 
+TeExternalTheme::setObjectLegendStatusMap(const std::string objId, const int status)
+{
+	if(objId.empty())
+		return false;
+	
+	if( status == 0)
+	{
+		map<std::string, int>::iterator itLegStatus = objStatusMap_.find(objId);
+
+		if(itLegStatus != objStatusMap_.end())
+		{
+			objStatusMap_.erase(itLegStatus);
+			return true;
+		}
+		return false;
+	}
+	
+	objStatusMap_[objId] = status;
+
+	return true;
+}
+
+bool 
+TeExternalTheme::setObjectGridStatusMap(const std::string objId, const int uniqueId, const int status)
+{
+	string aux = Te2String(uniqueId);
+	if(objId.empty() || aux.empty())
+		return false;
+	
+	if( status == 0 )
+	{
+		std::map<std::string, int >::iterator itGridStatus = itemStatusMap_.find(aux);
+
+		if(itGridStatus != itemStatusMap_.end())
+		{
+			itemStatusMap_.erase(itGridStatus);
+			return true;
+		}
+		return false;
+	}
+	
+	itemStatusMap_[aux] = status;
+
+	return true;
+}
+
+int 
+TeExternalTheme::layerId()
+{
+	return -1;
+}
+
+void 
+TeExternalTheme::layerId(int)
+{
+}
+
+void 
+TeExternalTheme::layer(TeLayer* layer)
+{
+	if(remoteTheme_)
+		remoteTheme_->layer(layer);
+}
+
+TeLayer*  
+TeExternalTheme::layer()
+{
+	if(remoteTheme_)
+		return remoteTheme_->layer();
+	return 0;
+}
+
+TeProjection* 
+TeExternalTheme::getThemeProjection()
+{
+	if(remoteTheme_ && remoteTheme_->layer())
+		return remoteTheme_->layer()->projection();
+	return 0;
+}
+
+bool 
+TeExternalTheme::hasRestriction()
+{
+	return false;
+}
+
+bool TeExternalTheme::hasAttrRest()
+{
+	return false;
+}
+
+bool TeExternalTheme::hasTemporalRest()
+{
+	return false;
+}
+
+bool TeExternalTheme::hasSpatialRest()
+{
+	return false;
+}
+
+string TeExternalTheme::sqlWhereRestrictions(TeRepresentation* /* rep */)
+{
+	return string("");
+}
+
+void TeExternalTheme::loadTablesJoin(const string& geomTable)
+{
+	remoteTheme_->loadTablesJoin(geomTable);
+}
+
+string TeExternalTheme::sqlGridJoin()
+{
+	return remoteTheme_->sqlGridJoin();
+}
+
+string TeExternalTheme::sqlGridFrom(const string& geomTable)
+{
+	return remoteTheme_->sqlGridFrom(geomTable);
+}
+
+bool TeExternalTheme::save(TeDatabase* db, const bool& copyExternalCollection)  
+{
+	if(!db)
+		return false;
+
+	//insert theme in database 
+	//TeDatabase::insertTheme and TeDatabase::updateTheme use the method saveMetadata
+	if(id()==0)
+	{
+		if(!db->insertTheme(this)) //updateThemeTable
+		{
+			db->deleteTheme(this->id());
+			return false;
+		}
+	}
+	else
+	{
+		if(!db->updateTheme(this)) //updateThemeTable
+		{
+			db->deleteTheme(this->id());
+			return false;
+		}
+	}
+	
+    if(copyExternalCollection)
+    {
+	//collection table 
+	    if(collectionTable().empty())
+		    collectionTable("te_collection_"+ Te2String(id())); 
+
+	    if(!db->createCollectionTable(collectionTable_))
+	    {
+		    db->deleteTheme(this->id());
+		    return false;
+	    }
+
+	    //collection aux table
+	    collectionAuxTable(collectionTable() + "_aux");
+    	
+	    if(!TeTheme::createCollectionAuxTable(db))
+	    {
+		    db->deleteTheme(this->id());
+		    return false;
+	    }
+    }
+
+	return true;
+}
+
+bool TeExternalTheme::save(const bool& copyExternalCollection)
+{
+	if(!save(sourceDB_, copyExternalCollection))
+		return false;
+	
+	// a map to identify legends id between local theme and remote theme during copy.
+	std::map<int, int> mapIdLegend;	
+
+    if(copyExternalCollection)
+    {
+	    createLegendMapId(mapIdLegend);
+
+	    if(!mapIdLegend.empty())
+		    copyRemoteCollection(mapIdLegend);
+    	
+	    mapIdLegend.clear();
+
+	    loadObjectLegendMap();
+    }
+
+	return true;
+}
+
+bool TeExternalTheme::createCollectionAuxTable()
+{
+	return TeTheme::createCollectionAuxTable(sourceDB_);
+}
+
+bool TeExternalTheme::populateCollectionAux(std::string /* objectId */)
+{
+	throw;
+	return false;
+}
+
+bool TeExternalTheme::buildGrouping(const TeGrouping& g, TeSelectedObjects /* selectedObjects */,
+				                  vector<double>* dValuesVec)
+{
+	TeDatabase* db = remoteTheme_->layer()->database();
+	if(!db)
+		return false;
+	
+	grouping_ = g;
+	unsigned int i;
+	vector<TeSlice> slices;
+	int	nullValues = 0;
+	if (grouping_.groupMode_ == TeRasterSlicing)
+	{
+		int b = atoi(grouping_.groupAttribute_.name_.c_str());
+		if (!remoteTheme_->layer()->raster() ||  
+			b < 0 ||
+			b > remoteTheme_->layer()->raster()->params().nBands() ||
+			grouping_.groupNumSlices_ <= 0)
+			return false;
+
+		if (grouping_.groupMaxVal_ == TeMINFLOAT)
+			grouping_.groupMaxVal_ = remoteTheme_->layer()->raster()->params().vmax_[b];
+
+		if (grouping_.groupMinVal_ == TeMAXFLOAT)
+			grouping_.groupMinVal_ = remoteTheme_->layer()->raster()->params().vmin_[b];
+
+		TeGroupByEqualStep(grouping_.groupMinVal_, grouping_.groupMaxVal_,
+			grouping_.groupNumSlices_, slices, grouping_.groupPrecision_);
+	}
+	else
+	{
+        if(grouping_.groupAttribute_.name_.empty())
+			return false;
+
+		TeDatabasePortal* portal = db->getPortal();
+		string query;
+		bool normal = false;
+		string aggrFunc = "";
+		if(grouping_.groupFunction_.empty())
+			aggrFunc = " MIN";
+		else
+			aggrFunc = grouping_.groupFunction_;
+
+		if(grouping_.groupNormAttribute_.empty())
+		{
+			query = " SELECT "+ aggrFunc +"("+ grouping_.groupAttribute_.name_ +")";  
+		}
+		else
+		{
+			query = " SELECT "+ aggrFunc +"("+ grouping_.groupAttribute_.name_ +") / "+ aggrFunc +"("+ grouping_.groupNormAttribute_ + ")";
+			normal = true;
+		}
+		query += sqlGridFrom(); 
+		query += " GROUP BY " + remoteTheme_->collectionTable() + ".c_object_id";
+		if(!portal->query(query) || !portal->fetchRow())
+		{
+			delete portal;
+			return false;
+		}
+		vector<double> dValues;  //inputvect
+		vector<string> sValues;	//svec
+		double mean, sum; 
+		mean = sum = 0.;
+		do  
+		{
+			string val = portal->getData(0);
+			string valNorm = Te2String(atof(val.c_str()), grouping_.groupPrecision_);
+
+			if (!val.empty())
+			{
+				if(grouping_.groupMode_== TeUniqueValue)
+				{
+					if(normal)
+						sValues.push_back(valNorm);
+					else
+						sValues.push_back(val);
+				}
+				else
+				{
+					dValues.push_back(atof(valNorm.c_str()));
+					sum += atof(valNorm.c_str());
+				}
+
+			}
+			else
+				nullValues++;
+		}while(portal->fetchRow());
+		
+		delete portal;
+		
+		if(dValues.empty() && sValues.empty())
+			return false;
+
+		if(grouping_.groupMode_== TeEqualSteps)
+			TeGroupByEqualStep(dValues.begin(), dValues.end(), grouping_.groupNumSlices_, slices, grouping_.groupPrecision_);
+		else if(grouping_.groupMode_== TeQuantil)
+			TeGroupByQuantil(dValues.begin(), dValues.end(), grouping_.groupNumSlices_, slices, grouping_.groupPrecision_);
+		else if(grouping_.groupMode_== TeStdDeviation)
+		{
+			string m = Te2String(mean);
+			TeGroupByStdDev(dValues.begin(), dValues.end(), grouping_.groupStdDev_, slices, m, grouping_.groupPrecision_);
+		}
+		else if(grouping_.groupMode_== TeUniqueValue)
+		{
+			if(grouping_.groupFunction_ == "COUNT")
+				TeGroupByUniqueValue(sValues, TeINT, slices, grouping_.groupPrecision_);
+			else
+				TeGroupByUniqueValue(sValues, grouping_.groupAttribute_.type_, slices, grouping_.groupPrecision_);
+		}
+
+		if (dValuesVec)
+		{
+			for (i = 0; i < dValues.size(); ++i)
+				dValuesVec->push_back(dValues[i]);
+		}
+	}
+	if(grouping_.groupNullAttr_ && nullValues > 0)
+	{
+		TeSlice ps;
+		ps.count_ = nullValues;
+		ps.from_ = "Missing Data";
+		slices.push_back(ps);
+		grouping_.groupNumSlices_ = slices.size() - 1;
+	}
+	else
+		grouping_.groupNumSlices_ = slices.size();
+
+	legend_.clear(); 
+	for(i=0; i<slices.size(); ++i)
+	{
+		TeLegendEntry legend(slices[i]);
+		legend.group(i);
+		legend.theme(id());
+		legend_.push_back(legend);
+	}
+	return true;
+}
+
+bool TeExternalTheme::buildGrouping(const TeGrouping& g, TeChronon chr, vector<map<string, string> >& mapObjValVec)
+{
+	TeDatabase* db = remoteTheme_->layer()->database();
+
+	if(!db || chr == TeNOCHRONON)
+		return false;
+
+	grouping_ = g;
+
+	unsigned int i;
+	vector<TeSlice> slices;
+	vector<double> dValues;  //inputvect
+	vector<string> sValues;	//svec
+	double mean, sum; 
+	mean = sum = 0.;
+	int	nullValues = 0;
+	string val;
+
+	if (grouping_.groupMode_ == TeRasterSlicing)
+	{
+		int b = atoi(grouping_.groupAttribute_.name_.c_str());
+		if (!remoteTheme_->layer()->raster() ||  
+			b < 0 ||
+			b > remoteTheme_->layer()->raster()->params().nBands() ||
+			grouping_.groupNumSlices_ <= 0)
+			return false;
+
+		if (grouping_.groupMaxVal_ == TeMINFLOAT)
+			grouping_.groupMaxVal_ = remoteTheme_->layer()->raster()->params().vmax_[b];
+
+		if (grouping_.groupMinVal_ == TeMAXFLOAT)
+			grouping_.groupMinVal_ = remoteTheme_->layer()->raster()->params().vmin_[b];
+
+		TeGroupByEqualStep(grouping_.groupMinVal_, grouping_.groupMaxVal_,
+			grouping_.groupNumSlices_, slices, grouping_.groupPrecision_);
+	}
+	else
+	{
+		string func;
+		TeStatisticType statType = TeNOSTATISTIC;
+		if (grouping_.groupMode_ == TeUniqueValue && grouping_.groupAttribute_.type_ == TeSTRING)
+			func = "MIN";
+		else
+			func = grouping_.groupFunction_;
+
+		if (func == "MIN")
+			statType = TeMINVALUE;
+		else if (func == "MAX")
+			statType = TeMAXVALUE;
+		else if (func == "MEAN")
+			statType = TeMEAN;
+		else if (func == "SUM")
+			statType = TeSUM;
+		else if (func == "COUNT")
+			statType = TeCOUNT;
+
+		// Set the flag that indicates the geometries must not be loaded
+		bool loadGeometries = false;
+
+		// Insert the attributes in a multimap that relates the attribute 
+		// representation and its statistic type
+		TeGroupingAttr attrMMap;
+		pair<TeAttributeRep, TeStatisticType> attr1 (
+			TeAttributeRep(grouping_.groupAttribute_), statType);
+		attrMMap.push_back(attr1);
+
+		// Set querier parameters
+		TeQuerierParams querierParams(loadGeometries, attrMMap);
+		querierParams.setParams(this, chr);
+
+		TeQuerier querier(querierParams);
+
+		// Load instances based on the querier parameters given
+		int numFrames = querier.getNumTimeFrames();
+		TeSTInstance sti;
+		string objId;
+		TePropertyVector vec;
+		mapObjValVec.resize(numFrames);
+
+		for (int frame = 0; frame < numFrames; ++frame)
+		{
+			if (querier.loadInstances(frame) == false)
+				continue;
+
+			// Traverse all the instances
+			while(querier.fetchInstance(sti))
+			{
+				objId = sti.objectId();
+				vec = sti.getPropertyVector();
+				val = vec[0].value_;
+				dValues.push_back(atof(val.c_str()));
+				sValues.push_back(val);
+				map<string, string>& objValMap = mapObjValVec[frame];
+				objValMap.insert(make_pair(objId, val));
+			}
+		}
+
+		if(grouping_.groupMode_== TeEqualSteps)
+			TeGroupByEqualStep(dValues.begin(), dValues.end(), grouping_.groupNumSlices_, slices, grouping_.groupPrecision_);
+		else if(grouping_.groupMode_== TeQuantil)
+			TeGroupByQuantil(dValues.begin(), dValues.end(), grouping_.groupNumSlices_, slices, grouping_.groupPrecision_);
+		else if(grouping_.groupMode_== TeStdDeviation)
+		{
+			string m = Te2String(mean);
+			TeGroupByStdDev(dValues.begin(), dValues.end(), grouping_.groupStdDev_, slices, m, grouping_.groupPrecision_);
+		}
+		else if(grouping_.groupMode_== TeUniqueValue)
+		{
+			if(grouping_.groupFunction_ == "COUNT")
+				TeGroupByUniqueValue(sValues, TeINT, slices, grouping_.groupPrecision_);
+			else
+				TeGroupByUniqueValue(sValues, grouping_.groupAttribute_.type_, slices, grouping_.groupPrecision_);
+		}
+	}
+
+	if(grouping_.groupNullAttr_ && nullValues > 0)
+	{
+		TeSlice ps;
+		ps.count_ = nullValues;
+		ps.from_ = "Missing Data";
+		slices.push_back(ps);
+		grouping_.groupNumSlices_ = slices.size() - 1;
+	}
+	else
+		grouping_.groupNumSlices_ = slices.size();
+
+	legend_.clear(); 
+	for(i=0; i<slices.size(); ++i)
+	{
+		TeLegendEntry legend(slices[i]);
+		legend.group(i);
+		legend.theme(id());
+		legend_.push_back(legend);
+	}
+	
+	return true;
+}
+					
+bool TeExternalTheme::saveGrouping(TeSelectedObjects selectedObjects)
+{
+	return TeTheme::saveGrouping(sourceDB_, selectedObjects);
+}
+
+bool TeExternalTheme::saveLegendInCollection(TeSelectedObjects selectedObjects, std::string objectId)
+{
+	return saveLegendInCollection(sourceDB_, selectedObjects, objectId);
+}
+
+bool TeExternalTheme::saveLegendInCollection(TeDatabase* db, TeSelectedObjects /* selectedObjects */, std::string objectId)
+{
+	unsigned int i;
+	if(grouping_.groupMode_ == TeNoGrouping)
+		return false; 
+
+	TeAttrDataType		type = grouping_.groupAttribute_.type_;
+	TeLegendEntryVector legVec = legend_;
+	string			groupingAttr = grouping_.groupAttribute_.name_;
+
+	string collectionTableRemote = remoteTheme_->collectionTable();
+	string func;
+
+	if(grouping_.groupFunction_.empty())
+		func = " MIN";
+	else
+		func = grouping_.groupFunction_;
+
+	if(grouping_.groupFunction_ == "COUNT")
+		type = TeINT;
+
+	string query = "SELECT MIN(" + collectionTableRemote + ".c_object_id)";
+	if(grouping_.groupNormAttribute_.empty())
+		query += ", "+ func +"(" + groupingAttr + ")" + remoteTheme_->sqlGridFrom();
+	else
+		query += ", "+ func +"(" + groupingAttr + ") / "+ func +"(" + grouping_.groupNormAttribute_ + ")" + remoteTheme_->sqlGridFrom();
+	
+	query += " GROUP BY " + collectionTableRemote + ".c_object_id";
+
+	map<int, vector<string> > legMap;
+	
+	TeDatabasePortal* portal = remoteTheme_->layer()->database()->getPortal();
+	if(portal->query(query) == false)
+	{
+		delete portal;
+		return false;
+	}
+
+	vector<string> idVec;
+	vector<string> nullIdVec;
+	vector<string> valVec;
+	while(portal->fetchRow())
+	{
+		
+		string val = portal->getData(1);
+		string oid = portal->getData(0);
+		if (val.empty() == false)
+		{
+			idVec.push_back(oid);
+			valVec.push_back(val);
+		}
+		else
+			nullIdVec.push_back(oid);
+	}
+	if (grouping_.groupMode_ == TeUniqueValue)
+	{
+		unsigned int j = 0;
+		while( j < idVec.size())
+		{
+			string val = valVec[j];
+			string oid = idVec[j];
+			if(type == TeREAL)
+			{
+				double a = atof(val.c_str());
+				val = Te2String(a, grouping_.groupPrecision_);
+			}
+			else if(type == TeINT)
+			{
+				int a = atoi(val.c_str());
+				val = Te2String(a);
+			}
+				
+			unsigned int siz = legend_.size();
+			if(grouping_.groupNullAttr_ && nullIdVec.size() > 0)
+				--siz;
+			for(i=0; i < siz; i++)
+			{
+				TeLegendEntry& leg = legend_[i];
+				if(val == leg.from())
+				{
+					legMap[leg.id()].push_back(oid);
+					break;
+				}
+			}
+			j++;
+		}
+	}
+	else
+	{
+		unsigned int j = 0;
+		while(j < idVec.size())
+		{
+			string val = valVec[j];
+			string oid = idVec[j];
+			if(type == TeREAL)
+			{
+				double a = atof(val.c_str());
+				val = Te2String(a, grouping_.groupPrecision_);
+			}
+			
+			unsigned int siz = legend_.size();
+			if(grouping_.groupNullAttr_ && !nullIdVec.empty())
+               --siz; 
+			for(i=0; i < siz; i++)
+			{
+				TeLegendEntry& leg = legend_[i];
+				int f = leg.from().find("mean");
+				if(f >= 0)
+					continue;
+				double dval = atof(val.c_str());
+				double dfrom = atof(leg.from().c_str());
+				double dto = atof(leg.to().c_str());
+				if(i < legend_.size()-1)
+				{
+					if(dval >= dfrom && dval < dto)
+					{
+						legMap[leg.id()].push_back(oid);
+						break;
+					}
+				}
+				else
+				{
+					if(dval >= dfrom && dval <= dto)
+					{
+						legMap[leg.id()].push_back(oid);
+						break;
+					}
+				}
+			}
+			j++;
+		}
+	}
+	delete portal;
+
+	int legId = defaultLegend_.id();
+	if (grouping_.groupNullAttr_)
+		legId = legend_[legend_.size()-1].id();	
+	for(i = 0; i < nullIdVec.size(); ++i)
+	{
+		string oid = nullIdVec[i];
+		legMap[legId].push_back(oid);
+	}
+
+	vector<string> svec;
+	map<int, vector<string> > :: iterator it = legMap.begin();
+	while(it != legMap.end())
+	{
+    	// --- Generate In Clauses ----
+		unsigned int i, j, k, size, chunkSize = 200, nChunks;
+		string inClause;
+		size = it->second.size();
+		if (size % chunkSize)
+			nChunks = size / chunkSize + 1;
+		else
+			nChunks = size / chunkSize;
+
+		j = 0;		
+		for (k = 0; k < nChunks; ++k)
+		{
+			i = 0;
+			inClause = "(";
+			while (j < size && i < chunkSize)
+			{
+				inClause += "'" + db->escapeSequence(it->second[j]) + "',";
+				i++;
+				j++;
+			}
+			inClause[inClause.size() - 1] = ')';
+			svec.push_back(inClause);
+		}
+
+		//--- generateInClause
+
+		for(i=0; i<svec.size(); ++i)
+		{
+			string up = "UPDATE " + collectionTable_ + " SET c_legend_id = " + Te2String(it->first);
+			up += " WHERE c_object_id IN " + svec[i];
+			if (!objectId.empty())
+				up += " AND c_object_id='"+objectId+"'";
+			if(db->execute(up) == false)
+				continue;
+		}
+		it++;
+		svec.clear();
+	}
+	if(legend_.size())
+		visibleRep_ = visibleRep_ | 0x40000000;
+	else
+		visibleRep_ = visibleRep_ | 0xbfffffff;
+	string upVis = "UPDATE te_theme SET visible_rep=" + Te2String(visibleRep_) + " WHERE theme_id=" + Te2String(id());
+	
+	if(!db->execute(upVis))
+		return false;
+	
+	loadObjectLegendMap();
+
+	return true;
+}
+
+void TeExternalTheme::setLegendsForObjects()
+{
+}
+
+bool TeExternalTheme::generateLabelPositions(const std::string& /* objectId */)
+{
+	throw;
+	return false;
+}
+
+bool TeExternalTheme::deleteGrouping()
+{
+	if(!sourceDB_)
+		return false;
+
+	resetGrouping();
+	
+	//delete te_legend table
+	if(!sourceDB_->deleteLegend (this->id()))
+		return false;
+	
+	//delete te_grouping table
+	string sql = "DELETE FROM te_grouping WHERE theme_id= "+ Te2String(this->id());
+	sourceDB_->execute (sql);
+
+	return true;
+}
+
+void TeExternalTheme::createRasterVisual(TeRaster* rst)
+{
+	if (rasterVisual_)
+		delete rasterVisual_;
+
+	if (!rst)
+		rst = remoteTheme_->layer()->raster();
+
+	if (!rst)
+		return;
+
+	rasterVisual_ = new TeRasterTransform();
+										
+	if (rst->params().photometric_[0] == TeRasterParams::TePallete)  // raster palette -> uses its palette
+	{
+		rasterVisual_->setTransfFunction(&TeRasterTransform::Pallete2ThreeBand);
+		rasterVisual_->setLutSize(rst->params().lutr_.size());
+		return;
+	}
+
+	if (visibleRep_ & 0x40000000  &&		// sliced raster -> generate the
+		grouping_.groupMode_ == TeRasterSlicing)	// appropriate palette
+	{
+		int band = atoi(grouping_.groupAttribute_.name_.c_str());
+		rasterVisual_->setSrcBand(band);
+		if (rst->params().dataType_[band] != TeUNSIGNEDCHAR)
+			rasterVisual_->generateLUT(legend_, 1024, defaultLegend_.visual(TePOLYGONS)->color());
+		else
+			rasterVisual_->generateLUT(legend_, 256, defaultLegend_.visual(TePOLYGONS)->color());
+		rasterVisual_->setTransfFunction(&TeRasterTransform::LUT2ThreeBand);
+		return;
+	}
+
+	if (rst->params().dataType_[0] != TeUNSIGNEDCHAR)	// non unsigned char -> generate linear transformation
+		rasterVisual_->setLinearTransfParameters(rst->params().vmin_[0],rst->params().vmax_[0], 0, 255);
+
+	if (rst->params().nBands() == 1)				
+		rasterVisual_->setTransfFunction(&TeRasterTransform::Mono2ThreeBand);
+	else if (rst->params().nBands() == 3)
+		rasterVisual_->setTransfFunction(&TeRasterTransform::ThreeBand2RGB);
+	else
+		rasterVisual_->setTransfFunction(&TeRasterTransform::Band2Band);
+}
+
+bool TeExternalTheme::addThemeTable(TeTable& table)
+{
+	if( remoteTheme_ )
+		return remoteTheme_->addThemeTable(table);
+
+	return false;
+}
+
+void TeExternalTheme::addThemeTable(string tableName)
+{
+	if( remoteTheme_ )
+		return remoteTheme_->addThemeTable(tableName);
+
+	return;
+}
+
+bool TeExternalTheme::isThemeTable(int tableId)
+{
+	if( remoteTheme_ )
+		return remoteTheme_->isThemeTable(tableId);
+
+	return false;
+}
+
+bool TeExternalTheme::isThemeTable(string tableName)
+{
+	if( remoteTheme_ )
+		return remoteTheme_->isThemeTable(tableName);
+
+	return false;
+}
+
+TeAttrTableVector& TeExternalTheme::attrTables()
+{
+	if( remoteTheme_ )
+		return remoteTheme_->attrTables();
+	attTableVector_.clear();
+	return attTableVector_;
+}
+
+bool TeExternalTheme::setAttTables(TeAttrTableVector& attrs)
+{
+	if( remoteTheme_ )
+		return remoteTheme_->setAttTables(attrs);
+
+	return false;
+}
+
+bool TeExternalTheme::getAttTables(TeAttrTableVector& attrs, TeAttrTableType attType)
+{
+	if(remoteTheme_)
+		return remoteTheme_->getAttTables(attrs, attType);
+
+	return false;
+}
+
+bool TeExternalTheme::getTable(TeTable& table, const string tableName)
+{
+	if(remoteTheme_)
+		return remoteTheme_->getTable(table, tableName);
+
+	return false;
+}
+
+void TeExternalTheme::clearAttTableVector() 
+{
+	if(remoteTheme_)
+		remoteTheme_->clearAttTableVector();
+}
+
+bool TeExternalTheme::getTemporalTable(TeTable& table)
+{
+	if(remoteTheme_)
+		return remoteTheme_->getTemporalTable(table);
+
+	return false;
+}
+
+bool TeExternalTheme::removeThemeTable(unsigned int index)
+{
+	if(remoteTheme_)
+		return remoteTheme_->removeThemeTable(index);
+
+	return false;
+}
+
+string TeExternalTheme::getTableName(const string& attrName)
+{
+	if(remoteTheme_)
+		return remoteTheme_->getTableName(attrName);
+
+	return "";
+}
+
+string TeExternalTheme::getAttribute(unsigned int index)
+{
+	if(remoteTheme_)
+		return remoteTheme_->getAttribute(index);
+
+	return "";
+}
+
+
+bool TeExternalTheme::loadThemeTables()
+{
+	if(!remoteTheme_)
+		return false;
+
+	bool result = remoteTheme_->loadThemeTables();
+
+	if(result)
+	{
+		clearAttTableVector();
+		attrTables() = remoteTheme_->attrTables();
+	}
+
+	return result;
+}
+
+
+TeAttributeList TeExternalTheme::sqlAttList()
+{
+	if(remoteTheme_)
+		return remoteTheme_->sqlAttList();
+
+	return TeAttributeList();
+}
+
+void TeExternalTheme::clearAttList()
+{
+	if(remoteTheme_)
+		return remoteTheme_->clearAttList();
+}
+
+TeAttributeList TeExternalTheme::sqlNumAttList()
+{
+	if(remoteTheme_)
+		return remoteTheme_->sqlNumAttList();
+
+	return TeAttributeList();
+}
+
+void TeExternalTheme::clearNumAttList()
+{
+	if(remoteTheme_)
+		remoteTheme_->clearNumAttList();
+}
+
+string TeExternalTheme::sqlJoin()
+{
+	if(remoteTheme_)
+		return remoteTheme_->sqlJoin();
+
+	return "";
+}
+
+string TeExternalTheme::sqlFrom()
+{
+	if(remoteTheme_)
+		return remoteTheme_->sqlFrom();
+
+	return "";
+}
+
+vector<string>&	TeExternalTheme::aliasVector()
+{
+	if(remoteTheme_)
+		return remoteTheme_->aliasVector();
+	aliasVector_.clear();
+	return aliasVector_;
+}
+
+void TeExternalTheme::loadAliasVector()
+{
+	if(remoteTheme_)
+		return remoteTheme_->loadAliasVector();
+
+	return;
+}
+
+void TeExternalTheme::loadAttrLists()
+{
+	if(!remoteTheme_)
+		return;
+
+	remoteTheme_->loadAttrLists();
+
+	sqlAttList_.clear();
+	sqlNumAttList_.clear();
+
+	sqlAttList_ = remoteTheme_->sqlAttList();
+	sqlNumAttList_ = remoteTheme_->sqlNumAttList();
+
+}
+
+bool TeExternalTheme::locatePolygon(TeCoord2D &pt, TePolygon &polygon, const double& tol)
+{
+	if(!remoteTheme_)
+		return false;
+
+	return remoteTheme_->locatePolygon(pt, polygon, tol);
+}
+
+bool TeExternalTheme::locatePolygonSet(TeCoord2D &pt, double tol, TePolygonSet &polygons)
+{
+	if(!remoteTheme_)
+		return false;
+
+	return remoteTheme_->locatePolygonSet(pt, tol, polygons);
+}
+
+bool TeExternalTheme::locateLine(TeCoord2D &pt, TeLine2D &line, const double& tol)
+{
+	if(!remoteTheme_)
+		return false;
+
+	return remoteTheme_->locateLine(pt, line, tol);
+}
+
+bool TeExternalTheme::locatePoint(TeCoord2D &pt, TePoint &point, const double& tol)
+{
+	if(!remoteTheme_)
+		return false;
+
+	return remoteTheme_->locatePoint(pt, point, tol);
+}
+
+bool TeExternalTheme::locateCell(TeCoord2D &pt, TeCell &c, const double& tol)
+{
+	if(!remoteTheme_)
+		return false;
+
+	return remoteTheme_->locateCell(pt, c, tol);
+}
+
+bool TeExternalTheme::hasObjectsWithoutGeometries(TeGeomRep geomRep)
+{
+	if(!remoteTheme_)
+		return false;
+
+	return remoteTheme_->hasObjectsWithoutGeometries(geomRep);
+}
+
+bool TeExternalTheme::removeObjectsWithoutGeometries(TeGeomRep geomRep)
+{
+	if(!remoteTheme_)
+		return false;
+
+	return remoteTheme_->removeObjectsWithoutGeometries(geomRep);
+}
+
+int TeExternalTheme::createExternalThemeTable(TeDatabase* sourceDB)
+{
+	if(!sourceDB)
+		return 0;
+
+	if(sourceDB->tableExist("te_external_theme"))
+		return -1;
+
+	TeAttributeList attList;
+
+	TeAttribute att1;
+	att1.rep_.name_ = "theme_id";
+	att1.rep_.isAutoNumber_ = false;
+	att1.rep_.isPrimaryKey_ = true;
+	att1.rep_.null_ = false;
+	att1.rep_.type_ = TeINT;
+	att1.rep_.numChar_ = 0;
+	attList.push_back(att1);
+
+	TeAttribute att2;
+	att2.rep_.name_ = "database_id";
+	att2.rep_.isAutoNumber_ = false;
+	att2.rep_.isPrimaryKey_ = false;
+	att2.rep_.null_ = false;
+	att2.rep_.type_ = TeINT;
+	att2.rep_.numChar_ = 0;
+	attList.push_back(att2);
+
+	TeAttribute att3;
+	att3.rep_.name_ = "external_theme_id";
+	att3.rep_.isAutoNumber_ = false;
+	att3.rep_.isPrimaryKey_ = false;
+	att3.rep_.null_ = false;
+	att3.rep_.type_ = TeINT;
+	att3.rep_.numChar_ = 0;
+	attList.push_back(att3);
+
+	if(!sourceDB->createTable("te_external_theme", attList))
+		return 0;
+
+	return 1;
+}
+
+bool TeExternalTheme::populateCollection(std::string /* objectId */)
+{
+	throw;
+	return false;
+}
+
+void TeExternalTheme::createLegendMapId(std::map<int, int>& mapIdLegend)
+{
+	mapIdLegend.clear();
+
+	mapIdLegend[remoteTheme_->outOfCollectionLegend().id()] = outOfCollectionLegend().id();
+	mapIdLegend[remoteTheme_->withoutDataConnectionLegend().id()] = withoutDataConnectionLegend().id();
+	mapIdLegend[remoteTheme_->defaultLegend().id()] = defaultLegend().id();
+	mapIdLegend[remoteTheme_->pointingLegend().id()] = pointingLegend().id();
+	mapIdLegend[remoteTheme_->queryLegend().id()] = queryLegend().id();
+	mapIdLegend[remoteTheme_->queryAndPointingLegend().id()] = queryAndPointingLegend().id();
+
+	for (int i = 0; i < remoteTheme_->grouping().groupNumSlices_; ++i)
+	{
+		mapIdLegend[remoteTheme_->legend()[i].id()] = legend()[i].id();
+	}
+	
+	return;
+}
+
+bool TeExternalTheme::copyRemoteCollection(std::map<int, int>& mapIdLegend)
+{
+	if(mapIdLegend.empty())
+		return false;
+//copy collectionTable
+	TeDatabasePortal* remotePortal = remoteTheme_->layer()->database()->getPortal();
+	string strSQL  = "SELECT * from ";
+	strSQL	+= remoteTheme_->collectionTable();
+
+	if(remotePortal->query(strSQL))
+	{
+		while(remotePortal->fetchRow())
+		{
+			string c_obj_id = remotePortal->getData(0);
+			int c_leg_id = atoi(remotePortal->getData(1));
+			string lab_x = remotePortal->getData(2);
+			string lab_y = remotePortal->getData(3);
+//			string c_leg_own = remotePortal->getData(4);
+			string c_leg_own = "0";
+			string c_obj_stat = remotePortal->getData(5);
+
+			int new_c_leg_id = mapIdLegend[c_leg_id];
+
+			string strINS = "INSERT INTO ";
+			strINS += this->collectionTable();
+			strINS += " (c_object_id, c_legend_id, label_x, label_y, c_legend_own, c_object_status) ";
+			strINS += "VALUES (";
+			strINS += (c_obj_id.empty() ? "''" : "'" + c_obj_id + "'");
+			strINS += ", ";
+			strINS += Te2String(new_c_leg_id);
+			strINS += ", ";
+			strINS += (lab_x.empty() ?  "''" : lab_x);
+			strINS += ", ";
+			strINS += (lab_y.empty() ? "''" : lab_y);
+			strINS += ", ";
+			strINS += (c_leg_own.empty() ? "''" : c_leg_own);
+			strINS += ", ";
+			strINS += (c_obj_stat.empty() ? "''" : c_obj_stat);
+			strINS += ")";
+
+			if(!sourceDB_->execute(strINS))
+				return false;
+		}
+	}
+	else
+		return false;
+
+	remotePortal->freeResult();
+
+//copy collectionTableAux
+	string strSQLAux  = "SELECT * from ";
+	strSQLAux	+= remoteTheme_->collectionAuxTable();
+
+	if(remotePortal->query(strSQLAux))
+	{
+		while(remotePortal->fetchRow())
+		{
+			string c_obj_id = remotePortal->getData(0);
+			string unique_id = remotePortal->getData(1);
+			string grid_status = remotePortal->getData(2);
+
+			string strINSAux = "INSERT INTO ";
+			strINSAux +=collectionAuxTable();
+			strINSAux += " (object_id, unique_id, grid_status) ";
+			strINSAux += "VALUES ("; 
+			strINSAux += (c_obj_id.empty() ? "''" : "'" + c_obj_id + "'");
+			strINSAux += ", ";
+			strINSAux += (unique_id.empty() ? "''" : unique_id);
+			strINSAux += ", ";
+			strINSAux += (grid_status.empty() ? "''" : grid_status);
+			strINSAux += ")";
+
+			if(!sourceDB_->execute(strINSAux))
+				return false;
+		}
+	}
+	else
+		return false;
+
+	remotePortal->freeResult();
+	delete remotePortal;
+
+	return true;
+}
+
+
+
+bool TeExternalTheme::getRemoteThemeInfo(int& remoteThemeId, int& databaseId)
+{
+	if(!sourceDB_)
+		return false;
+
+	try
+	{
+		TeDatabasePortal* dbPortal = sourceDB_->getPortal();
+
+		if(!dbPortal)
+		{
+			return false;
+		}
+
+		std::string strSQL = "SELECT external_theme_id, database_id FROM te_external_theme ";
+		strSQL += "WHERE theme_id = " + Te2String(id());
+
+ 	    if(!dbPortal->query(strSQL) || !dbPortal->fetchRow())
+		{
+			dbPortal->freeResult();
+			delete dbPortal;
+			return false;
+		}
+
+		remoteThemeId = dbPortal->getInt("external_theme_id");
+		databaseId = dbPortal->getInt("database_id");
+
+		dbPortal->freeResult();
+		delete dbPortal;
+	}
+	catch(TeException&)
+	{
+	}
+	
+	return true;
+}
+
+bool 
+TeExternalTheme::loadMetadata(TeDatabase* db)
+{
+	if(remoteTheme_ || !db)
+		return false;
+
+	int remoteThemeId = -1;
+	int remoteDBId = -1;
+
+	setSourceDatabase(db);
+
+	if(!getRemoteThemeInfo(remoteThemeId, remoteDBId))
+		return false;	
+
+	TeDatabase* remotedb = TeDBConnectionsPool::instance().getDatabase(remoteDBId);
+	if(remotedb == NULL)
+	{	
+		std::string hostName, dbmsName, dbName, userName, password;
+		int port = 0;
+		if(!TeDBConnectionsPool::instance().getConnectionInfo(db, remoteDBId, hostName, dbmsName, dbName, userName, password, port))
+		{
+			return false;
+		}
+
+		remotedb = TeDBConnectionsPool::instance().getDatabase(dbmsName, dbName, hostName, userName, password, port);
+
+		if(remotedb != NULL)
+		{
+			TeDBConnectionsPool::instance().saveExternalDBConnection(db, remotedb);
+		}
+	}
+	
+	if(!remotedb || !remotedb->isConnected())
+		return false;
+
+	TeThemeMap::iterator itTheme = remotedb->themeMap().find(remoteThemeId);
+
+    TeTheme* remoteTheme = NULL;
+
+	if(itTheme != remotedb->themeMap().end())
+	{
+// is theme already loaded?
+		if(itTheme->second->getProductId()!=TeTHEME)
+			return false;
+        
+        remoteTheme = dynamic_cast<TeTheme*>(itTheme->second);
+	}
+	else
+	{
+// if theme is not loaded... we load it.
+		remoteTheme = new TeTheme();
+		remoteTheme->id(remoteThemeId);
+		try
+		{
+			if(!remotedb->loadTheme(remoteTheme))
+				return false;
+		}
+		catch(...)
+		{
+			return false;
+		}
+	}
+
+    if(remoteTheme == NULL)
+    {
+        return false;
+    }
+	if(remoteTheme->layer() == NULL)
+    {
+        return false;
+    }
+
+    setRemoteTheme(remoteTheme);
+
+	remotedb->clear();
+
+	loadObjectLegendMap();
+	return true;
+}
+
+bool TeExternalTheme::saveMetadata(TeDatabase* dstDB)
+{
+	if(!remoteTheme_ || !remoteTheme_->layer() || !remoteTheme_->layer()->database())
+		return false;
+	
+	int themeId = id();
+	int remoteThemeId = remoteTheme_->id();
+
+	TeDatabasePortal* portal = dstDB->getPortal();
+	if(!portal)
+		return false;
+	
+	string sql = "SELECT * FROM te_external_theme WHERE theme_id = "+ Te2String(themeId);
+	bool isUpdate = false;
+	if(!portal->query(sql))
+	{
+		delete portal;
+		return false;
+	}
+	if(portal->fetchRow())
+		isUpdate = true;
+	delete portal;
+
+	string strSQL;
+	if(isUpdate)
+	{
+		strSQL  = "UPDATE te_external_theme SET ";
+		strSQL += " theme_id = "+ Te2String(themeId);
+		strSQL += ", ";
+		strSQL += " database_id = "+ Te2String(remoteDbId_);
+		strSQL += ", ";
+		strSQL += " external_theme_id = "+ Te2String(remoteThemeId);
+		strSQL += " WHERE theme_id = "+ Te2String(themeId);
+	}
+	else
+	{
+		strSQL  = "INSERT INTO te_external_theme (theme_id, database_id, external_theme_id) VALUES (";
+		strSQL += Te2String(themeId);
+		strSQL += ", ";
+		strSQL += Te2String(remoteDbId_);
+		strSQL += ", ";
+		strSQL += Te2String(remoteThemeId);
+		strSQL += ")";
+	}
+
+	if(!dstDB->execute(strSQL))
+		return false;
+
+	return true;
+}
+
+bool TeExternalTheme::eraseMetadata(TeDatabase* db)
+{
+	int themeId = id();
+	
+    std::string strSQL  = " DELETE FROM te_external_theme ";
+    strSQL += " WHERE theme_id = "+ Te2String(themeId);
+	
+	if(!db->execute(strSQL))
+		return false;
+
+	return true;
+}
+
diff --git a/src/terralib/kernel/TeExternalTheme.h b/src/terralib/kernel/TeExternalTheme.h
new file mode 100644
index 0000000..0e04032
--- /dev/null
+++ b/src/terralib/kernel/TeExternalTheme.h
@@ -0,0 +1,404 @@
+/************************************************************************************
+ TerraLib - a library for developing GIS applications.
+Copyright � 2001-2006 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/** \file TeExternalTheme.h
+    \brief This file contains direct implementation of TeTheme in order to 
+	support themes from another TerraLib databases (remote databases).
+*/
+
+#ifndef  __TERRALIB_INTERNAL_EXTERNALTHEME_H
+#define  __TERRALIB_INTERNAL_EXTERNALTHEME_H
+
+#include <map>
+#include <string>
+
+#include "TeTheme.h"
+
+/** \fn bool TeLoadConnectionsInfo(TeDatabase* sourceDB)
+    \brief Loads all connections information from source database and populates Remote theme database index.
+	\param sourceDB A connection to a TerraLib database that stores information about others databases that can be used by remote themes. (Input)
+ */
+TL_DLL bool TeLoadConnectionsInfo(TeDatabase* sourceDB);
+
+
+//! A class that implements the external theme concept  
+/*!
+	A external theme is a theme stored in a remote TerraLib database.
+	Some information about the external theme is stored in the local database, but
+	its geometries and attributes are stored in the remote database. 
+
+	\sa TeTheme
+  
+ */
+class TL_DLL TeExternalTheme : public TeTheme
+{
+	public:
+
+		//! Constructor.
+		TeExternalTheme(TeDatabase* sourceDb, TeTheme* remoteTheme, const int& viewId, 
+                                 const string& name = "");
+
+		//! Destructor.
+		virtual ~TeExternalTheme();
+	
+		//! Operator =
+		TeExternalTheme& operator=(TeExternalTheme& rhs);
+
+		/** @name Remote Theme Accessor Methods
+		  * Methods related to the remote theme reference.
+		  */
+		//@{
+
+        virtual TeTheme* getRemoteTheme() const;
+
+		virtual void setRemoteTheme(TeTheme* theme);
+
+        virtual TeDatabase* getSourceDatabase();
+
+		virtual void setSourceDatabase(TeDatabase* srcDB);
+		
+		virtual string getRemoteThemeName(); 
+		//@}
+
+
+		/** @name Object status containers
+		  * Methods to handle object status containers
+		  */
+		//@{
+		virtual void loadObjectLegendMap();
+		
+		virtual int getGridStatus(const int uniqueId, const std::string objectId);
+
+		virtual int getObjectStatus(const std::string objectId);
+
+		virtual bool setObjectLegendStatusMap(const std::string objId, const int status);
+		
+		virtual bool setObjectGridStatusMap(const std::string objId, const int uniqueId, const int status);
+		//@}
+
+		/** @name Layer accessor methods
+		  * Methods related to the layer that gives origin to this theme.
+		  */
+		//@{
+
+		/** \brief Returns the identification of the source layer.
+		    \note In a Remote Theme this will be always -1.
+		  */
+		virtual int layerId();
+
+		/** \brief Sets the identification of the source layer.
+		    \param i Layer identification value that will be used to set the source layer. (Input)
+			\note In a Remote Theme this method does nothing.
+		  */
+		virtual void layerId(int i);
+
+		/** \brief Sets the layer that is the source of objects of the theme.
+		    \param layer A pointer to a TeLayer. (Input)
+          */
+		virtual void layer(TeLayer* layer);
+
+		/** \brief Returns a pointer to the layer from which the theme get its objects.
+		    \note In a Remote Theme this method returns a NULL pointer.
+		  */
+		virtual TeLayer* layer();
+
+		//! Returns a pointer to the projection of the remote layer
+		virtual TeProjection* getThemeProjection();
+
+		//@}
+
+		/** @name 
+		  * Methods related to the restrictions over the theme used to generate this theme
+          */
+		//@{
+
+		/** \brief Verifies if this theme has any kind of restrictions.
+		    \note In a Remote Theme this method always returns FALSE.
+		  */
+		virtual bool hasRestriction();
+
+		/** \brief Returns if there is an attribute restriction.
+		    \note In a Remote Theme this method always returns FALSE.
+		  */
+		virtual bool hasAttrRest();
+
+		/** \brief Returns TRUE if there is a temporal restriction defined in the theme.
+		    \note In a Remote Theme this method always returns FALSE. 
+		  */
+		virtual bool hasTemporalRest();
+
+		/** \brief Returns TRUE if this theme has a spatial restriction.
+		    \note In a Remote Theme this method always returns FALSE.
+		  */
+		virtual bool hasSpatialRest();
+
+		/** \brief Returns the clause WHERE derived from the combination of all restricitions (spatial, attribute and temporal).
+		    \note In a Remote Theme this method always returns an empty string.
+		  */
+		virtual string sqlWhereRestrictions(TeRepresentation* rep = 0);
+
+		//@}
+
+		/** @name Collection
+		  * Methods related to the materialization in the database of the theme as a collection of objects 
+          */
+		//@{
+
+		/** \brief Fills the sqlGridJoin_ and sqlGridFrom_ statements according to the status of the database.
+		    \note In a Remote Theme this method does nothing.
+		  */
+		virtual void loadTablesJoin(const string& geomTable = "");
+
+		/** \brief Returns a SQL JOIN statement to get all the attributes of the theme objects, 
+		           the attributes of the collection table, and the attributes of the extended 
+                   collection table.
+		    \note In a Remote Theme this method returns an empty string.
+	      */
+		virtual string sqlGridJoin();
+
+		/** \brief Returns a FROM clause of a SQL statement to get attributes of the theme objects,
+		           the attributes of the collection table, and the attributes of the
+				   extended collection table .
+		    \note In a Remote Theme this method returns an empty string.
+	      */
+		virtual string sqlGridFrom(const string& geomTable="");
+
+        virtual bool save(const bool& copyExternalCollection = true);
+		//! Save the the theme parameters in the database.
+		virtual bool save(TeDatabase* db, const bool& copyExternalCollection = true); 
+		
+		/** \brief Create the auxiliar collection table used to represent objects with multiple versions in time.
+		    \note In a Remote Theme this method creates a local auxiliary collection table.
+		  */
+		virtual bool createCollectionAuxTable();
+
+		/** \brief Populate the auxiliar collection table used to represent objects with multiple versions in time.
+		    \note In a Remote Theme this method populates the local auxiliary collection.
+		  */
+		virtual bool populateCollectionAux(std::string objectId = "");
+
+		//@}
+
+		//! Save the grouping parameters in memory when there is no chronon.
+		virtual bool buildGrouping(const TeGrouping& g, TeSelectedObjects selectedObjects = TeAll,
+			                       vector<double>* dValuesVec = 0);
+
+		//! Save the grouping parameters in memory when there is chronon.
+		virtual bool buildGrouping(const TeGrouping& g, TeChronon chr, vector<map<string, string> >& mapObjValVec);
+						   
+		//! Build the grouping and associate each object to its group in the collection table.
+		virtual bool saveGrouping(TeSelectedObjects selectedObjects = TeAll);
+
+		//! Save the theme grouping legends in the collection table.
+		virtual bool saveLegendInCollection(TeSelectedObjects selectedObjects = TeAll, std::string objectId = "");
+
+		//! Save the theme grouping legends in the collection table  
+		virtual bool saveLegendInCollection(TeDatabase* db, TeSelectedObjects selectedObjects = TeAll, std::string objectId = "");
+
+		///! Set the legend id for each object of the theme.
+		virtual void setLegendsForObjects();
+
+		//! Generates a optimized position (x,y) in the spatial extention of each object to position label or graphs.
+		virtual bool generateLabelPositions(const std::string& objectId = "");  
+
+		//! Delete grouping.
+		virtual bool deleteGrouping(); 
+		
+		//! Creates an appropriate visual presentation to the raster of the theme.
+		virtual void createRasterVisual(TeRaster* rst = 0);
+
+		/** @name Attribute Tables
+		  * A theme can use one or more attribute tables of the layer that gives its data.
+		  * These methods are related to the manipulation of these tables.
+          */
+		//@{	
+
+		//! Add a new attribute table to a theme.
+		virtual bool addThemeTable(TeTable& table);
+
+		//! Add a new attribute table to a theme.
+		virtual void addThemeTable(string tableName);
+
+		//! Verify if an attribute table is part of a theme.
+		virtual bool isThemeTable(int tableId);
+
+		//! Verify if an attribute table is part of a theme.
+		virtual bool isThemeTable(string tableName);
+
+		//! Returns the list of attribute tables used by this theme.
+		virtual TeAttrTableVector& attrTables();
+
+		//! Sets the entire list of attribute tables used by this theme.
+		virtual bool setAttTables(TeAttrTableVector& attrs);  
+
+		//! Returns a vector of attribute tables, of a specific type, used by this theme.
+		virtual bool getAttTables(TeAttrTableVector& attrs, TeAttrTableType attType = TeAllAttrTypes); 
+
+		//! Returns a representation of an attribute table  given name.
+		virtual bool getTable(TeTable& table, const string tableName);
+
+		//! Clears the list of attribute tables used by this theme.
+		virtual void clearAttTableVector();
+
+		/** \brief Returns the temporal attribute table of the theme (TeEvent or TeFixedGeomDynAttr).
+		    \note A theme supports only one temporal attribute table.
+		  */
+		virtual bool getTemporalTable(TeTable& table);
+
+		//! Removes an attribute table from the list of tables of a theme.
+		virtual bool removeThemeTable(unsigned int index);
+
+		//! Returns the the name of an attribute table that contains a given attribute.
+		virtual string getTableName(const string& attrName);
+
+		//! Returns the name of the index-th attribute resulting of the join of all attribute tables associated to the theme tables 
+		virtual string getAttribute(unsigned int index);
+
+		//! Loads the theme tables in the database
+		virtual bool loadThemeTables();
+		
+		//! Returns the list of attributes of theme tables.
+		virtual  TeAttributeList sqlAttList();
+		
+		//! Clears the list of attributes associated to the theme tables.
+		virtual void clearAttList();
+
+		//! Returns the list of numerical attributes of the theme tables.
+		virtual TeAttributeList sqlNumAttList();
+
+		//! Clears the list of numerical attributes associated to the theme tables.
+		virtual void clearNumAttList();
+
+		///! Returns a SQL JOIN statement to reach to all attribute tables used by this theme.
+		virtual string sqlJoin();
+
+		//! Returns a SQL FROM CLAUSE that gives access to all attribute tables used by this theme.
+		virtual string sqlFrom();
+
+		//! Returns the alias vector of the names of the theme tables.
+		virtual vector<string>&	aliasVector();
+
+		//! Fills aliasVector_.
+		virtual void loadAliasVector();
+
+		/** \brief Refresh list of attributes of all the theme tables.
+		    \note All attributes are stored into sqlAttList_ and numeric attributes are stored into sqlNumAttList_.
+          */
+		virtual void loadAttrLists();
+		//@}
+
+		/** @name Locate geometries
+		  * Returns the geometry(ies) of the theme given coordinate
+          */
+		//@{ 	
+
+		virtual bool locatePolygon(TeCoord2D &pt, TePolygon &polygon, const double& tol = 0.0);
+		virtual bool locatePolygonSet(TeCoord2D &pt, double tol, TePolygonSet &polygons);
+		virtual bool locateLine(TeCoord2D &pt, TeLine2D &line, const double& tol = 0.0);
+		virtual bool locatePoint(TeCoord2D &pt, TePoint &point, const double& tol = 0.0);
+		virtual bool locateCell(TeCoord2D &pt, TeCell &c, const double& tol = 0.0);
+
+		//@}
+
+		/** \brief Verifies if there are objects without geometries of a specific geometry representation.
+		  */
+		virtual bool hasObjectsWithoutGeometries(TeGeomRep geomRep);
+
+		/** \brief Removes the objects without geometries of a specific geometry representation.
+		  */
+		virtual bool removeObjectsWithoutGeometries(TeGeomRep geomRep);
+
+		/** \brief Creates a table to store information on how to connect to others databases and get remote theme.
+		    \param sourceDB A connection to a TerraLib database that stores information about others databases that can be used by remote themes. (Input)
+			\return Returns 1 if the table was created, -1 if it already exists and 0 on error.
+		  */
+		static int createExternalThemeTable(TeDatabase* sourceDB);
+
+		//! Save the theme metadata in database. 
+		virtual bool saveMetadata(TeDatabase* db); 
+
+	protected:
+
+		/** \brief Fill the sqlJoin_ and sqlFrom_ .
+		  */
+		//virtual void loadThemeTablesJoin();
+		
+		/** \brief Populate the collection table based in the theme restrictions.
+		  */
+		virtual bool populateCollection(std::string objectId = "");
+
+		/** \brief Populate map with relationateds ids from local theme and remote theme.
+		  */
+		virtual void createLegendMapId(std::map<int, int>& mapIdLegend);
+
+		/** \brief Copy the respective collection table from remoteTheme to localTheme.
+		  */
+		virtual bool copyRemoteCollection(std::map<int, int>& mapIdLegend);
+
+				
+		/** \brief Retrieves remote theme information from the database.
+		  */
+		bool getRemoteThemeInfo(int& remoteThemeId, int& databaseId);
+
+		//! Load the external theme metadata from database. 
+		virtual bool loadMetadata(TeDatabase* db);
+
+		//! Erase the theme metadata in database. 
+		virtual bool eraseMetadata(TeDatabase* db); 
+
+	protected:
+        //! A pointer to a theme in a remote database.
+		TeTheme* remoteTheme_;
+        TeDatabase* sourceDB_;
+        int remoteDbId_;
+};
+
+
+//!  This class implements a factory to create external theme objects. 
+class TL_DLL TeExternalThemeFactory : public TeViewNodeFactory
+{
+public:
+	//! Constructor 
+	TeExternalThemeFactory() : TeViewNodeFactory((int)TeEXTERNALTHEME)
+	{}
+
+	//! Created theme objects 
+	TeViewNode* build(TeViewNodeParams* params)
+	{	
+		TeViewNodeParams auxParams = *params;
+        return new TeExternalTheme(NULL, NULL, params->viewId_, params->name_);	
+	}
+	
+	//! Created theme objects 
+	TeViewNode* build()
+	{	
+		return new TeExternalTheme(NULL, NULL, -1);	
+	}
+};
+
+namespace 
+{
+  static TeExternalThemeFactory externalThemeFactory;
+}; 
+
+#endif	// __TERRALIB_INTERNAL_REMOTETHEME_H
+
diff --git a/src/terralib/kernel/TeFactory.h b/src/terralib/kernel/TeFactory.h
old mode 100644
new mode 100755
index 8e19b93..653eee2
--- a/src/terralib/kernel/TeFactory.h
+++ b/src/terralib/kernel/TeFactory.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -21,7 +21,7 @@ indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
 /*! \file TeFactory.h
-    This file deals with the Factory Pattern 
+    \brief This file deals with the Factory Pattern 
 */
 #ifndef  __TERRALIB_INTERNAL_FACTORY_H
 #define  __TERRALIB_INTERNAL_FACTORY_H
@@ -70,7 +70,7 @@ public:
 	static T* make  ( string name, const Arg& arg );
 
 	//! Virtual constructor using arguments
-	static T* make  ( Arg arg );
+	static T* make  ( const Arg& arg  );
 
 
 protected:
@@ -125,7 +125,7 @@ TeFactory<T,Arg>::make ( string name, const Arg& arg )
 //! Builds an object, based on the input parameters
 template <class T, class Arg> 
 T*
-TeFactory<T,Arg>::make ( Arg arg )
+TeFactory<T,Arg>::make (const Arg& arg )
 {
 	string name = arg.decName();
 
diff --git a/src/terralib/kernel/TeFileTheme.cpp b/src/terralib/kernel/TeFileTheme.cpp
new file mode 100644
index 0000000..4f94a17
--- /dev/null
+++ b/src/terralib/kernel/TeFileTheme.cpp
@@ -0,0 +1,496 @@
+#include "TeFileTheme.h"
+#include "TeDatabase.h"
+#include "TeSTElementSet.h"
+#include "TeGeoDataDriver.h"
+
+bool 
+TeFileTheme::createFileThemeTable(TeDatabase* db)
+{
+	if (!db)
+		return false;
+
+	if(db->tableExist("te_file_theme"))
+		return true;
+
+	TeAttributeList attList;
+
+	TeAttribute att1;
+	att1.rep_.name_ = "theme_id";
+	att1.rep_.isAutoNumber_ = false;
+	att1.rep_.isPrimaryKey_ = true;
+	att1.rep_.null_ = false;
+	att1.rep_.type_ = TeINT;
+	att1.rep_.numChar_ = 0;
+	attList.push_back(att1);
+
+	TeAttribute att2;
+	att2.rep_.name_ = "file_name";
+	att2.rep_.isAutoNumber_ = false;
+	att2.rep_.isPrimaryKey_ = false;
+	att2.rep_.null_ = false;
+	att2.rep_.type_ = TeSTRING;
+	att2.rep_.numChar_ = 255;
+	attList.push_back(att2);
+
+	TeAttribute att3;
+	att3.rep_.name_ = "geom_rep";
+	att3.rep_.isAutoNumber_ = false;
+	att3.rep_.isPrimaryKey_ = false;
+	att3.rep_.null_ = false;
+	att3.rep_.type_ = TeINT;
+	att3.rep_.numChar_ = 0;
+	attList.push_back(att3);
+
+	TeAttribute att4;
+	att4.rep_.name_ = "proj_id";
+	att4.rep_.isAutoNumber_ = false;
+	att4.rep_.isPrimaryKey_ = false;
+	att4.rep_.null_ = false;
+	att4.rep_.type_ = TeINT;
+	att4.rep_.numChar_ = 0;
+	attList.push_back(att4);
+
+	if (!db->createTable("te_file_theme", attList)||
+		!db->createRelation("fk_file_theme_id", "te_file_theme", "theme_id", "te_theme", "theme_id", true) ||
+		!db->createRelation("fk_file_theme_proj_id", "te_file_theme", "proj_id", "te_projection", "projection_id", false))
+		return false;
+	return 1;
+}
+
+
+
+TeFileTheme::TeFileTheme(const string& name, TeViewNode* parent, int view, int id):
+		TeAbstractTheme(name, parent, view, id, TeFILETHEME),
+		data_(0), 
+		fileName_(""), 
+		localDb_(0),
+		numObjects_(0),
+		projection_(0),
+		dataDriver_(0)
+{}
+
+TeFileTheme::TeFileTheme(const std::string& themeName, TeGeoDataDriver* dataDriver, TeDatabase* localDb, TeViewNode* parent, int view):
+		TeAbstractTheme(themeName, parent, view, 0, TeFILETHEME), 
+		data_(0),
+		localDb_(localDb),
+		numObjects_(0),
+		projection_(0),
+		dataDriver_(dataDriver)
+{
+	if (dataDriver_)
+	{
+		TeBox bb;
+		TeGeomRep aux;
+		dataDriver_->getDataInfo(numObjects_, bb, aux);
+		this->visibleRep(aux);
+		this->setThemeBox(bb);
+		fileName_= dataDriver->getFileName();
+	}
+}
+
+TeFileTheme::TeFileTheme(const TeFileTheme& other):
+		TeAbstractTheme(static_cast<const TeAbstractTheme&>(other))
+{
+	fileName_ = other.fileName_;
+	localDb_ = other.localDb_;
+	data_ = other.data_;  
+	projection_ = other.projection_;
+}
+
+TeFileTheme::~TeFileTheme()
+{
+	if(data_)
+		delete data_;
+	data_ = 0;
+	if (dataDriver_)
+		delete dataDriver_;
+	dataDriver_ = 0; 
+}
+
+TeFileTheme& 
+TeFileTheme::operator=(TeFileTheme& rhs)
+{
+	if ( this != &rhs )
+	{
+		*(TeAbstractTheme*)this = rhs;
+		fileName_ = rhs.fileName_;
+		localDb_ = rhs.localDb_;
+
+		if(data_)
+			delete data_;
+		data_ = rhs.data_;  
+		projection_ = rhs.projection_;
+		dataDriver_ = rhs.dataDriver_;
+	}
+	return *this;
+}
+
+
+void
+TeFileTheme::setDataDriver(TeGeoDataDriver* dataDriver)
+{ 
+	if (!dataDriver)
+		return;
+
+	if (dataDriver_)
+		delete dataDriver_;
+
+	dataDriver_ = dataDriver;
+
+	TeBox bb;
+	TeGeomRep aux;
+	dataDriver_->getDataInfo(numObjects_, bb, aux);
+	this->visibleRep(aux);
+    this->setThemeBox(bb);
+}
+
+TeGeoDataDriver* 
+TeFileTheme::getDataDriver()
+{
+	return dataDriver_;
+}
+
+TeSTElementSet* 
+TeFileTheme::getData()
+{
+	return data_;
+}
+
+void 
+TeFileTheme::setFileName(const std::string& fileName)
+{
+	fileName_ = fileName;
+}
+
+std::string 
+TeFileTheme::getFileName()
+{
+	return fileName_;
+}
+
+void 
+TeFileTheme::setLocalDatabase(TeDatabase* db)
+{	
+	this->localDb_ = db; 
+}
+
+TeDatabase* 
+TeFileTheme::getLocalDatabase()
+{ 
+	return localDb_; 
+}
+
+void 
+TeFileTheme::clearData() 
+{ 
+	data_->clear(); 
+}
+
+unsigned int 
+TeFileTheme::getNumberOfObjects()
+{	
+	return numObjects_; 
+}
+
+void 
+TeFileTheme::setNumberOfObjects(unsigned int n)
+{
+	numObjects_ = n;
+}
+
+
+
+bool
+TeFileTheme::retrieveDataFromFile()
+{
+    if(!dataDriver_)
+		return false;
+
+	TeAttributeList att;
+	dataDriver_->getDataAttributesList(att);
+	data_ = new TeSTElementSet(this->box(),att);
+
+	if (!dataDriver_->loadData(data_))
+	{
+		delete data_;
+		data_ = 0;
+		return false;
+	}
+	return true;
+}
+
+bool
+TeFileTheme::loadMetadata(TeDatabase* localDb_)
+{
+	if(!localDb_)
+		return false;
+
+	//second: load specific theme information from te_file_theme table
+	TeDatabasePortal* portal = localDb_->getPortal();
+	if(!portal)
+		return false;
+
+	//table: theme_id, file_name, geom_rep
+	std::string sql = " SELECT te_file_theme.*, ";	
+	sql += " te_projection.* ";						 
+	sql += " FROM te_file_theme, te_projection ";
+	sql += " WHERE te_file_theme.proj_id = te_projection.projection_id ";
+	sql += " AND theme_id = "+ Te2String(id());
+
+	if(!portal->query(sql) || !portal->fetchRow())
+	{
+		delete portal;
+		return false;
+	}
+
+	fileName_ = portal->getData(1);
+	TeAbstractTheme::visibleRep(portal->getInt(2));
+
+	FILE* fp = fopen(fileName_.c_str(), "r");
+	if(!fp)
+		return false;
+	else
+		fclose(fp);
+	
+	delete projection_;
+	portal->getProjection(&projection_, 4);
+	return true;
+}
+
+bool 
+TeFileTheme::saveMetadata(TeDatabase* localDb_)
+{
+	if(!localDb_)
+		return false;
+
+	//insert theme in database 
+	if(id()==0)
+	{
+		if(!localDb_->insertTheme(this)) //updateThemeTable
+		{
+			localDb_->deleteTheme(this->id());
+			return false;
+		}
+	}
+
+	if (!projection_)
+		projection_ = new TeNoProjection();
+	if (projection_->id() <= 0)
+		localDb_->insertProjection(projection_);
+
+	// remove the metadata currently stored
+	string strSQL;
+	strSQL = "DELETE FROM te_file_theme WHERE theme_id = ";
+ 	strSQL += Te2String(id());
+    localDb_->execute(strSQL);
+
+	// insert the current metadata
+	strSQL  = "INSERT INTO te_file_theme (theme_id, file_name, geom_rep, proj_id) VALUES (";
+	strSQL += Te2String(id());
+	strSQL += ", '";
+	strSQL += fileName_;
+	strSQL += "', ";
+	strSQL += Te2String(visibleRep_);
+	strSQL += ", ";
+	strSQL += Te2String(projection_->id());
+	strSQL += ")";
+
+	if(!localDb_->execute(strSQL))
+	{
+		localDb_->deleteTheme(this->id());
+		return false;
+	}
+	return true;
+}
+
+
+bool 
+TeFileTheme::eraseMetadata(TeDatabase* localDb_)
+{
+	if (!localDb_)
+		return false;
+
+	int proid = -1;
+	string strSQL = "SELECT proj_id FROM te_file_theme WHERE theme_id = "+ Te2String(this->id());
+	TeDatabasePortal* portal = localDb_->getPortal();
+	if (portal->query(strSQL) && portal->fetchRow())
+		proid = portal->getInt(0);
+	delete portal;
+
+	strSQL  = " DELETE FROM te_file_theme ";
+    strSQL += " WHERE theme_id = "+ Te2String(this->id());
+	
+	if (!localDb_->execute(strSQL))
+		return false;
+
+	if (proid > 0)
+	{
+		strSQL = "DELETE FROM te_projection WHERE projection_id = " + Te2String(proid);
+		localDb_->execute(strSQL);
+	}
+	return true;
+}
+
+
+TeProjection* 
+TeFileTheme::getThemeProjection()
+{	
+	return projection_; 
+}
+
+void 
+TeFileTheme::setThemeProjection(TeProjection* proj)
+{ 
+	if (projection_)
+		delete projection_;
+	projection_ = proj; 
+}
+
+bool 
+TeFileTheme::buildGrouping(const TeGrouping& , TeSelectedObjects , vector<double>* )
+{
+	return true;
+}
+
+bool 
+TeFileTheme::buildGrouping(const TeGrouping& , TeChronon , vector<map<string, string> >& )
+{
+	return true;
+}
+
+bool 
+TeFileTheme::saveGrouping(TeSelectedObjects )
+{
+	return true;
+}
+        
+
+void 
+TeFileTheme::setLegendsForObjects()
+{
+}
+
+bool 
+TeFileTheme::deleteGrouping()
+{
+	return true;
+}
+
+bool 
+TeFileTheme::save()
+{
+	//insert theme in database 
+	if(id()==0)
+	{
+		if(!localDb_->insertTheme(this)) //updateThemeTable
+		{
+			localDb_->deleteTheme(this->id());
+			return false;
+		}
+	}
+	else
+	{
+		if(!localDb_->updateTheme(this)) //updateThemeTable
+		{
+			localDb_->deleteTheme(this->id());
+			return false;
+		}
+	}
+	return true;
+}
+
+bool 
+TeFileTheme::locatePolygon(TeCoord2D &pt, TePolygon &polygon, const double& tol)
+{
+    TePolygonSet aux;
+	if(!locatePolygonSet(pt, tol, aux))
+		return false;
+	if(aux.empty())
+		return false;
+	
+	polygon = aux[0];
+	return true;	
+}
+
+bool 
+TeFileTheme::locatePolygonSet(TeCoord2D& /*pt*/, double /*tol*/, TePolygonSet& /*polygons*/)
+{
+	if(!data_)
+		return false;
+//	if(!data_->locateGeometry(pt, polygons, tol))
+//		return false;
+	return true;
+}
+
+bool 
+TeFileTheme::locateLine(TeCoord2D& /*pt*/, TeLine2D& line, const double& /*tol*/)
+{
+	TeLineSet aux;
+	if(!data_)
+		return false;
+//	if(!data_->locateGeometry(pt, aux, tol))
+//		return false;
+	if(aux.empty())
+		return false;
+	line = aux[0];
+	return true;
+}
+
+bool 
+TeFileTheme::locatePoint(TeCoord2D& /*pt*/, TePoint &point, const double& /*tol*/)
+{
+	TePointSet aux;
+	if(!data_)
+		return false;
+//	if(!data_->locateGeometry(pt, aux, tol))
+//		return false;
+	if(aux.empty())
+		return false;
+	point = aux[0];
+	return true;
+}
+
+bool 
+TeFileTheme::locateCell(TeCoord2D&, TeCell&, const double&)
+{
+	return false;
+}
+
+
+std::set<std::string> 
+TeFileTheme::getObjects(TeSelectedObjects )
+{
+	std::set<std::string> set;
+	return set;
+}
+
+
+std::set<std::string> 
+TeFileTheme::getObjects(const vector<string>& )
+{
+	std::set<std::string> set;
+	return set;
+}
+
+
+std::vector<std::string>  
+TeFileTheme::getItemVector(TeSelectedObjects )
+{
+	std::vector<std::string> set;
+	return set;
+}
+
+
+std::vector<std::string>  
+TeFileTheme::getItemVector(const set<string>& )
+{
+	std::vector<std::string> set;
+	return set;
+}
+
+void
+TeFileTheme::setOwnLegendsForObjects()
+{
+
+}
+
diff --git a/src/terralib/kernel/TeFileTheme.h b/src/terralib/kernel/TeFileTheme.h
new file mode 100644
index 0000000..9ae465b
--- /dev/null
+++ b/src/terralib/kernel/TeFileTheme.h
@@ -0,0 +1,212 @@
+/************************************************************************************
+ TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/** \file TeFileTheme.h
+    \brief This file contains direct implementation of TeTheme in order to support themes 
+	created directly from shapefiles.
+*/
+
+#ifndef  __TERRALIB_INTERNAL_FILETHEME_H
+#define  __TERRALIB_INTERNAL_FILETHEME_H
+
+#include "TeDefines.h"
+
+// STL's include files
+#include <map>
+#include <vector>
+#include <string>
+
+// TerraLib's include files and forward declarations
+#include "TeAbstractTheme.h"
+
+class TeDatabase;
+class TeSTElementSet;
+class TeProjection;
+class TeGeoDataDriver;
+
+class TL_DLL TeFileTheme : public TeAbstractTheme
+{
+protected:
+	TeSTElementSet*		data_;			// data is kept internally in a TeSTElementSet
+	std::string			fileName_;		// location of the file	
+	TeDatabase*			localDb_;		// a pointer to the database that stores the theme
+	unsigned int		numObjects_;	// number of objects that the theme has access to
+	TeProjection*		projection_;	// spatial reference of the objects in the file
+	TeGeoDataDriver*	dataDriver_;	// a pointer to decoder to get an specific data 
+
+public:
+	//! Default constructor
+	TeFileTheme(const std::string& name = "", TeViewNode* parent = 0, int view = 0, int id = 0);
+
+	//! Constructor from specific parameters
+	TeFileTheme(const std::string& name, TeGeoDataDriver* dataDriver, TeDatabase* localDb, TeViewNode* parent = 0, int view = 0);
+
+	//! Copy constructor
+	TeFileTheme(const TeFileTheme& other);
+
+	//! Operator =
+	TeFileTheme& operator=(TeFileTheme& rhs);
+
+	//! Destructor
+	~TeFileTheme();
+
+	//! Set the data driver that will handle this file
+	void setDataDriver(TeGeoDataDriver* dataDriver);
+
+	//! Get the data driver that will handle this file
+	TeGeoDataDriver* getDataDriver();
+
+	//! Give access to theme data as stored internally
+    TeSTElementSet* getData();
+	
+	//! Set the name of the file that contains the data
+	void setFileName(const std::string& fileName);
+
+	//! Get the name of the file that contains the data
+	std::string getFileName();
+
+	//! Set the pointer to the database where the theme is stored
+	void setLocalDatabase(TeDatabase* db); 
+	
+	//! Get the pointer to the database where the theme is stored
+	TeDatabase* getLocalDatabase(); 
+
+// --- Methods responsible to the persistence of this kind of theme
+
+	//! An static method to create a metadata table to store information about this type of theme
+	static bool createFileThemeTable(TeDatabase* db);
+
+	//! Load the basic information about the data set from the file
+	bool retrieveMetadataFromFile();
+
+	//! Load the objects from the file and fills the set of elements
+	bool retrieveDataFromFile();
+
+	//! Releases the internal data set
+	void clearData(); 	
+
+//--- Methods that reimplement the interface defined by the abstract theme
+
+	//! Return a pointer to the projection of the geometries accessible by this theme
+	TeProjection* getThemeProjection();
+
+	//! Set the projection of the geometries accessible by this theme
+	void setThemeProjection(TeProjection* proj);
+
+	//! Get the number of objects acessible by this theme
+	unsigned int getNumberOfObjects(); 
+
+	//! Set the number of objects acessible by this theme
+	void setNumberOfObjects(unsigned int); 
+
+	//! Load metadata information about this theme
+	bool loadMetadata(TeDatabase*);
+
+	//! Save metadata information about this theme
+	bool saveMetadata(TeDatabase* );
+
+	//! Erase the theme metadata in the database
+	bool eraseMetadata(TeDatabase* );
+
+	//! This method is kept for compatibility reasons with the abstract theme it doesn't do anything
+	bool save();
+
+	//! Save the grouping parameters in memory when there is no chronon
+	bool buildGrouping(const TeGrouping& g, TeSelectedObjects selectedObjects = TeAll, vector<double>* dValuesVec = 0);
+
+	//! Save the grouping parameters in memory when there is chronon
+	bool buildGrouping(const TeGrouping& g, TeChronon chr, vector<map<string, string> >& mapObjValVec);
+
+	//! Build the grouping and associate each object to its group 
+	bool saveGrouping(TeSelectedObjects selectedObjects = TeAll);
+
+	//! Delete grouping
+	bool deleteGrouping(); 
+
+	//! Set the legend id for each object of the theme 
+	void setLegendsForObjects();
+
+	//! Set the own legend id for each object of the theme 
+	void setOwnLegendsForObjects();
+
+/** @name Locate geometries
+	Returns the geometry(ies) of the theme given coordinate
+*/
+//@{
+	bool locatePolygon(TeCoord2D &pt, TePolygon &polygon, const double& tol);
+
+	bool locatePolygonSet(TeCoord2D &pt, double tol, TePolygonSet &polygons);
+	
+	bool locateLine(TeCoord2D &pt, TeLine2D &line, const double& tol);
+
+	bool locatePoint(TeCoord2D &pt, TePoint &point, const double& tol);
+
+	bool locateCell(TeCoord2D &pt, TeCell &c, const double& tol);
+//@}
+
+	//! Get the set of objects corresponding to the object selection criteria
+	set<string> getObjects(TeSelectedObjects selectedObjects = TeAll);
+
+	//! Get the set of objects corresponding to the list of items
+	set<string> getObjects(const vector<string>& itemVec);
+
+	//! Get the set of items corresponding to the object selection criteria
+	vector<string> getItemVector(TeSelectedObjects selectedObjects);
+
+	//! Get the set of items corresponding to the set of objects
+	vector<string> getItemVector(const set<string>& oidSet);
+
+};
+
+
+//!  This class implements a factory to create remote theme objects. 
+/*!  
+	
+*/
+class TeFileThemeFactory : public TeViewNodeFactory
+{
+public:
+	//! Constructor 
+	TeFileThemeFactory() : TeViewNodeFactory((int)TeFILETHEME)
+	{}
+
+	//! Created theme objects 
+	TeViewNode* build(TeViewNodeParams* params)
+	{	
+		TeViewNodeParams auxParams = *params;
+		return new TeFileTheme(auxParams.name_, auxParams.myParent_, auxParams.viewId_, auxParams.id_);	
+	}
+	
+	TeViewNode* build()
+	{
+		return new TeFileTheme();
+	}
+};
+
+namespace 
+{
+  static TeFileThemeFactory fileThemeFactory;
+}; 
+
+
+#endif	// __TERRALIB_INTERNAL_FILETHEME_H
+
diff --git a/src/terralib/kernel/TeFragmentation.cpp b/src/terralib/kernel/TeFragmentation.cpp
old mode 100644
new mode 100755
index e232c7f..790d947
--- a/src/terralib/kernel/TeFragmentation.cpp
+++ b/src/terralib/kernel/TeFragmentation.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -27,35 +27,44 @@ of this library and its documentation.
 
 #include "TeFragmentation.h"
 #include "TeGeometryAlgorithms.h"
+#include <algorithm>
 
+using namespace std;
 
-// Is Crescent?
-struct xyOrder
+// estrutura auxiliar para implementar o funtor de ordenacao do algoritmo sort da STL:
+// os pontos de intersecao de um segmento de uma dada linha eh agrupado usando esse funtor.
+struct ipRedOrder	// XY order
 {
-	bool operator()(const TeCoord2D& c1, const TeCoord2D& c2) const
+	bool operator()(const TeINTERSECTOR2::TeBoundaryIP& ip1, const TeINTERSECTOR2::TeBoundaryIP& ip2) const
 	{
-		if(c1.x_ < c2.x_)
+		if(ip1.redPartNum_ < ip2.redPartNum_)
 			return true;
 
-		if(c1.x_ > c2.x_)
+		if(ip1.redPartNum_ > ip2.redPartNum_)
 			return false;
 
-		if(c1.y_ < c2.y_)
-			return true;		
+		if(ip1.redSegNum_ < ip2.redSegNum_)
+			return true;
+
+		if(ip1.redSegNum_ > ip2.redSegNum_)
+			return false;
 
 		return false;
 	}
 };
 
-
-struct ipRedOrder	// XY order
+// estrutura auxiliar para implementar o funtor de ordenacao do algoritmo sort da STL:
+// os pontos de intersecao de um segmento de uma dada linha eh agrupado usando esse funtor.
+struct ipRedOrder2	// XY order
 {
-	/*
-	 * TODO: Talvez desempatar pela segunda coordenada no caso de overlap
-	 *
-	 */
 	bool operator()(const TeINTERSECTOR2::TeBoundaryIP& ip1, const TeINTERSECTOR2::TeBoundaryIP& ip2) const
 	{
+		if(ip1.redPolNum_ < ip2.redPolNum_)
+			return true;
+
+		if(ip1.redPolNum_ > ip2.redPolNum_)
+			return false;
+
 		if(ip1.redPartNum_ < ip2.redPartNum_)
 			return true;
 
@@ -76,119 +85,242 @@ struct ipRedOrder	// XY order
 
 		if(ip1.coords_[0].y_ < ip2.coords_[0].y_)
 			return true;
+
+		if(ip1.coords_[0].y_ > ip2.coords_[0].y_)
+			return false;
 		
 		if(ip1.coords_.size() < ip2.coords_.size())
 			return true;
 
+		if(ip1.coords_.size() > ip2.coords_.size())
+			return false;
+
+		if((ip1.coords_.size() == 2) && (ip2.coords_.size() == 2))
+		{
+			if(ip1.coords_[1].x_ < ip2.coords_[1].x_)
+				return true;
+
+			if(ip1.coords_[1].x_ > ip2.coords_[1].x_)
+				return false;
+
+			if(ip1.coords_[1].y_ < ip2.coords_[1].y_)
+				return true;
+
+			if(ip1.coords_[1].y_ > ip2.coords_[1].y_)
+				return false;
+		}
+
 		return false;
 	}
 };
 
-struct yxIPOrder	// YX order
+// estrutura auxiliar para colocar os pontos de intersecao ao longo de um segment ordenados,
+// de modo a facilitar a fragmentacao do segmento.
+struct TeIPAux
 {
-	/*
-	 * TODO: Talvez desempatar pela segunda coordenada no caso de overlap
-	 *
-	 */
-	bool operator()(const TeINTERSECTOR2::TeBoundaryIP& ip1, const TeINTERSECTOR2::TeBoundaryIP& ip2) const
+	double x_;
+	double y_;
+	int type_;	//0 - Unico; 1 - Inicial de Overlap; 2 - Final de Overlap
+
+	TeIPAux(const double& x, const double& y, const int& t)
+		: x_(x), y_(y), type_(t)
 	{
-		if(ip1.coords_[0].x_ > ip2.coords_[0].x_)
-			return true;
+	}
+};
 
-		if(ip1.coords_[0].x_ < ip2.coords_[0].x_)
-			return false;
+// estrutura auxiliar para implementar o funtor de ordenacao do algoritmo sort da STL:
+// os pontos de intersecao de um segmento de uma dada linha serao ordenados por esse funtor.
+struct sortDist
+{
+	TeCoord2D c_;	// cordenada de referencia
 
-		if(ip1.coords_[0].y_ > ip2.coords_[0].y_)
-			return true;		
-		
+	sortDist(const TeCoord2D& c)
+		: c_(c)
+	{
+	}
+
+	bool operator()(const TeIPAux& ip1, const TeIPAux& ip2) const
+	{
+		double dist1 = ((ip1.x_ - c_.x_) * (ip1.x_ - c_.x_)) + ((ip1.y_ - c_.y_) * (ip1.y_ - c_.y_));
+		double dist2 = ((ip2.x_ - c_.x_) * (ip2.x_ - c_.x_)) + ((ip2.y_ - c_.y_) * (ip2.y_ - c_.y_));
+		if(dist1 < dist2)
+			return true;
 		return false;
 	}
 };
 
-inline void cleanIntersections(TeINTERSECTOR2::TeVectorBoundaryIP& ips)
+
+// mario + gribeiro - 2006-03
+// remove pontos de intersecao com a mesma localizacao que foram reportados por segmentos diferentes,
+// deixandoo vetor "ips" na sequencia correta para uso da etapa de fragmentacao do segmento.
+// Essa rotin pode lancar uma excessao em um caso muito especial: um ponto final de overlap veio ante do ponto inicial de overlap.
+inline void cleanIntersections(TeINTERSECTOR2::TeVectorBoundaryIP& ips, const TeCoord2D& refCoord)
 {
-	// Eliminar os pontos de interse��o 1p que estiverem em cima ou no meio de outros
-	// pontos de intersec��o 2p
-	// +
-	// Eliminar os segmentos de overlap que estiverem entre algum outro de overlap
-	for(unsigned int i = 1; i < ips.size(); ++i)
-	{	
-		unsigned int currentSize = ips[i].coords_.size();
-
-		for(unsigned int j = 0; j < i; ++j)
+	vector<TeIPAux> vecips;
+	for(unsigned int i = 0; i < ips.size(); ++i)
+	{
+		if(ips[i].coords_.size() == 2)
 		{
-			if(currentSize == 1)	// Verificar se ele n�o se encontra entre algum de overlap
+			double dist1 = ((ips[i].coords_[0].x_ - refCoord.x_) * (ips[i].coords_[0].x_ - refCoord.x_)) + ((ips[i].coords_[0].y_ - refCoord.y_) * (ips[i].coords_[0].y_ - refCoord.y_));
+			double dist2 = ((ips[i].coords_[1].x_ - refCoord.x_) * (ips[i].coords_[1].x_ - refCoord.x_)) + ((ips[i].coords_[1].y_ - refCoord.y_) * (ips[i].coords_[1].y_ - refCoord.y_)); 
+
+			if(dist1 < dist2)
 			{
-				// Se o ponto j-th � �nico, ir p/ o pr�ximo
-				// pois ele n�o tem problemas
-				if(ips[j].coords_.size() == 1)
-					continue;
+				TeIPAux ip1(ips[i].coords_[0].x_, ips[i].coords_[0].y_, 1);
+				TeIPAux ip2(ips[i].coords_[1].x_, ips[i].coords_[1].y_, 2);
+				vecips.push_back(ip1);
+				vecips.push_back(ip2);
+			}
+			else
+			{
+				TeIPAux ip1(ips[i].coords_[0].x_, ips[i].coords_[0].y_, 2);
+				TeIPAux ip2(ips[i].coords_[1].x_, ips[i].coords_[1].y_, 1);
+				vecips.push_back(ip1);
+				vecips.push_back(ip2);
+			}			
+		}
+		else
+		{
+			TeIPAux ip(ips[i].coords_[0].x_, ips[i].coords_[0].y_, 0);
+			vecips.push_back(ip);
+		}
+	}
 
-				// Se o ponto estiver fora do intervalo x, ir p/ o pr�ximo
-				if(ips[i].coords_[0].x_ < ips[j].coords_[0].x_ ||
-				   ips[i].coords_[0].x_ > ips[j].coords_[1].x_)
-				   continue;
+	sort(vecips.begin(), vecips.end(), sortDist(refCoord));
 
-				// Caso contr�rio, verificar se ele se encontra no intervalo y tamb�m
-				if(ips[i].coords_[0].y_ < ips[j].coords_[0].y_ &&
-				   ips[i].coords_[0].y_ < ips[j].coords_[1].x_)
-				   continue;
+    TeINTERSECTOR2::TeVectorBoundaryIP newips;
 
-				if(ips[i].coords_[0].y_ > ips[j].coords_[0].y_ &&
-				   ips[i].coords_[0].y_ > ips[j].coords_[1].x_)
-				   continue;
+	int cont = 0;
 
-				// Remove o ponto e j� move o cursor p/ um ponto anterior
-				// pois ele ser� incremementado
-				ips.erase(ips.begin() + i);
-				--i;
-				break;
+	TeLine2D l;
+	TeLineSet lset;
+
+	for(unsigned int i = 0; i < vecips.size(); ++i)
+	{
+		TeCoord2D c(vecips[i].x_, vecips[i].y_);
+
+		if(vecips[i].type_ == 0)
+		{
+			if(l.size() > 0)
+			{
+				if(TeEquals(c, l[l.size() - 1]))
+				{
+					continue;
+				}
+				else if(cont == 0)
+				{
+					lset.add(l);
+					l = TeLine2D();
+					l.add(c);
+				}
+				else
+				{
+					l.add(c);
+				}
 			}
-			else	// Verificar se ele n�o � um de overlap entre algum outro de overlap
+			else
+			{				
+				l.add(c);
+			}
+		}
+		else if(vecips[i].type_ == 1)
+		{
+			if(l.size() > 0)
 			{
-				// Se o ponto j-th � �nico, ir p/ o pr�ximo
-				// pois ele n�o te problemas
-				if(ips[j].coords_.size() == 1)
+				if(TeEquals(c, l[l.size() - 1]))
+				{
+					++cont;
 					continue;
-		
-				// Remover os segmentos iguais
-				if(TeEquals(ips[i].coords_[0], ips[j].coords_[0]) &&
-				   TeEquals(ips[i].coords_[1], ips[j].coords_[1]))
+				}
+				else if(cont == 0)
 				{
-					ips.erase(ips.begin() + i);
-					--i;
-					break;
+					lset.add(l);
+					l = TeLine2D();
+					l.add(c);
 				}
+				else
+				{
+					l.add(c);
+				}
+			}
+			else
+			{
+				l.add(c);
+			}
 
+			++cont;
+		}
+		else //else if(vecips[i].type == 2)
+		{
+			if(l.size() > 0)
+			{
+				if(TeEquals(c, l[l.size() - 1]))
+				{
+					--cont;
+					continue;
+				}
+				else if(cont == 0)
+				{
+					throw string("An overlap end point started before an overlap begin!");		// nao podia ter chegado ate aqui
+				}
+				else
+				{
+					l.add(c);
+				}
+			}
+			else
+			{
+				l.add(c);
 			}
+
+			--cont;
 		}
 	}
+
+	if(l.size() > 0)
+	{
+		lset.add(l);
+	}
+
+	for(unsigned int i = 0; i < lset.size(); ++i)
+	{
+		if(lset[i].size() == 1)
+		{
+			TeINTERSECTOR2::TeBoundaryIP newIp;
+			newIp.coords_.push_back(lset[i][0]);
+			newips.push_back(newIp);
+		}
+		else
+		{
+			for(unsigned int j = 1; j < lset[i].size(); ++j)
+			{
+				TeINTERSECTOR2::TeBoundaryIP newIp;
+				newIp.coords_.push_back(lset[i][j-1]);
+				newIp.coords_.push_back(lset[i][j]);
+				
+				newips.push_back(newIp);
+			}
+		}
+	}
+
+	ips.clear();
+	ips = newips;
 }
 
-inline void TeFragmentSegmentByNonOverlapping(const TeCoord2D& s1, const TeCoord2D& s2,
+// rotina que fragmenta uma aresta se necessario: aplica-se no caso de segmentos que nao fazem overlap
+inline void TeFragmentSegmentByNonOverlapping(const TeCoord2D& s1, const TeCoord2D& /* s2 */,
 									   TeINTERSECTOR2::TeVectorBoundaryIP& ips, 
 									   TeLine2D& currentFragment,
 									   TeLineSet& fragments)
 {
-	// Se a orienta��o do segmento n�o for esquerda/direita
-	// � preciso reverter os pontos de intersec��o
-	if(s1.x_ > s2.x_)
-	{
-		reverse(ips.begin(), ips.end());
-	}
-	else if(s1.x_ < s2.x_)
-	{
-	}
-	else if(s1.y_ > s2.y_)
-	{
-		reverse(ips.begin(), ips.end());
-	}
+// vamos deixar os pontos de intersecao numa sequencoa adequada para fragmentarmos este segmento
+	cleanIntersections(ips, s1);
 
 
-	// � s� fragmentar o segmento at� o �ltimo ponto de intersec��o dele
+// eh so fragmentar o segmento ateh o ultimo ponto de interseccao dele
 	for(unsigned int k = 0; k < ips.size(); ++k)
 	{
-		if(TeEquals(ips[k].coords_[0], currentFragment[currentFragment.size() - 1]))	// Se o ponto de intersec��o est� sobre o v�rtice do segmento
+		if(TeEquals(ips[k].coords_[0], currentFragment[currentFragment.size() - 1]))	// Se o ponto de interseccao esta sobre o vehrtice do segmento
 		{
 			// fragmenta a linha caso haja mais de um ponto nela
 			if(currentFragment.size() > 1)								
@@ -215,51 +347,21 @@ inline void TeFragmentSegmentByNonOverlapping(const TeCoord2D& s1, const TeCoord
 	}
 }
 
-inline void TeFragmentSegmentByOverlapping(const TeCoord2D& s1, const TeCoord2D& s2,
+// fragmenta uma aresta que possui pontos de intersecao de overlap
+inline void TeFragmentSegmentByOverlapping(const TeCoord2D& s1, const TeCoord2D& /* s2 */,
 									   TeINTERSECTOR2::TeVectorBoundaryIP& ips,
 									   TeLine2D& currentFragment,
 									   TeLineSet& fragments, TeLineSet& boundaryFragments)
 {
-	cleanIntersections(ips);
+// vamos deixar os pontos de intersecao numa sequencoa adequada para fragmentarmos este segmento
+	cleanIntersections(ips, s1);
 
 	unsigned int i = 0;
-
-
-	// Se a orienta��o do segmento n�o for esquerda/direita
-	// � preciso reverter os pontos de intersec��o
-	if(s1.x_ > s2.x_)
-	{
-		for(i = 0; i < ips.size(); ++i)
-		{
-			if(ips[i].coords_.size() == 2)
-			{
-				swap(ips[i].coords_[0], ips[i].coords_[1]);
-			}
-		}
-
-		reverse(ips.begin(), ips.end());
-	}
-	else if(s1.x_ < s2.x_)
-	{
-	}
-	else if(s1.y_ > s2.y_)
-	{
-		for(i = 0; i < ips.size(); ++i)
-		{
-			if(ips[i].coords_.size() == 2)
-			{
-				swap(ips[i].coords_[0], ips[i].coords_[1]);
-			}
-		}
-
-		reverse(ips.begin(), ips.end());
-	}
-
 	
-	// � s� fragmentar o segmento at� o �ltimo ponto de intersec��o dele
+// eh so fragmentar o segmento ateh o ultimo ponto de interseccao dele
 	for(i = 0; i < ips.size(); ++i)
 	{
-		if(TeEquals(ips[i].coords_[0], currentFragment[currentFragment.size() - 1]))	// Se o ponto de intersec��o est� sobre o v�rtice do segmento
+		if(TeEquals(ips[i].coords_[0], currentFragment[currentFragment.size() - 1]))	// Se o ponto de interseccao esta sobre o vehrtice do segmento
 		{
 			// fragmenta a linha caso haja mais de um ponto nela
 			if(currentFragment.size() > 1)
@@ -329,23 +431,52 @@ inline void TeFragmentSegmentByOverlapping(const TeCoord2D& s1, const TeCoord2D&
 	}
 }
 
+// Adiciona o ponto de intersecao ao fragmento corrente, decidindo entre um ponto de intersecao e o ponto original
+void TeAddPoint(TeLine2D& lFrag, TeLine2D& currentLine, TeINTERSECTOR2::TeVectorBoundaryIP& ipsAux, const unsigned int& j)
+{
+	bool found = false;
+
+	for(unsigned int i = 0; i < ipsAux.size(); ++i)
+	{
+		if(TeEquals(ipsAux[i].coords_[0], currentLine[j]))
+		{
+			lFrag.add(ipsAux[i].coords_[0]);
+			found = true;
+			break;
+		}
+		else if(ipsAux[i].coords_.size() == 2)
+		{
+			if(TeEquals(ipsAux[i].coords_[1], currentLine[j]))
+			{
+				lFrag.add(ipsAux[i].coords_[1]);
+				found = true;
+				break;
+			}			
+		}
+	}
+
+	if(!found)
+		lFrag.add(currentLine[j]);
+}
+
+// rotina principal de fragmentacao de linhas
 void TeFragmentBoundary(const TeLineSet& lines, TeINTERSECTOR2::TeVectorBoundaryIP& ips, TeLineSet& boundaryFragments, TeLineSet& fragments)
 {
-	// Informa��es sobre os pontos de interse��o
+// informacoes sobre os pontos de intersecao
 	unsigned int currentIP = 0;
 	unsigned int nthIP = ips.size();
 
-	// Informa��es sobre n�mero de linhas
+	// Informacoes sobre numero de linhas
 	unsigned int nthLine = lines.size();
 
-	// Ordena os pontos de interse��o
+	// Ordena os pontos de intersecao
 	sort(ips.begin(), ips.end(), ipRedOrder());
 
 	for(unsigned int i = 0; i < nthLine; ++i)
 	{
 		if((currentIP < nthIP) && (ips[currentIP].redPartNum_ == i))	
 		{
-			// Se a linha corrente possui um ponto de interse��o ent�o ela dever� ser fragmentada
+			// Se a linha corrente possui um ponto de intersecao entao ela devera ser fragmentada
 			TeLine2D& currentLine = lines[i];
 			
 			TeLine2D lFrag;
@@ -355,14 +486,10 @@ void TeFragmentBoundary(const TeLineSet& lines, TeINTERSECTOR2::TeVectorBoundary
 
 			for(unsigned int j = 0; j < nthSegment; ++j)
 			{
-				if((currentIP < nthIP) && (j == ips[currentIP].redSegNum_) && (ips[currentIP].redPartNum_ == i))	// Se ainda tenho pontos de intersec��o e 
+				if((currentIP < nthIP) && (j == ips[currentIP].redSegNum_) && (ips[currentIP].redPartNum_ == i))	// Se ainda tenho pontos de interseccao e 
 				{															// o corrente pertence ao segmento atual
-					// Adiciona o primeiro ponto da linha na lista do fragmento atual
-					if((lFrag.size() == 0) || TeDisjoint(currentLine[j], lFrag[lFrag.size() - 1]))
-						lFrag.add(currentLine[j]);
-
-					// Copias todos os pontos de intersec��o do segmento para
-					// um vetor auxiliar e j� avan�a o currentIP
+					// Copias todos os pontos de interseccao do segmento para
+					// um vetor auxiliar e ja avanca o currentIP
 					TeINTERSECTOR2::TeVectorBoundaryIP ipsAux;
 
 					bool hasOverlap = false;
@@ -377,28 +504,29 @@ void TeFragmentBoundary(const TeLineSet& lines, TeINTERSECTOR2::TeVectorBoundary
 						++currentIP;
 					}
 
-					if(hasOverlap)	// Se houverem pontos de intersec��o que fazem overlap
+					// Adiciona o primeiro ponto da linha na lista do fragmento atual: mas precisamos decidir entre o vertice original ou o de intersecao => preferimos o de intersecao para amarrar com o segmento que intercepta este segmento
+					if((lFrag.size() == 0) || TeDisjoint(currentLine[j], lFrag[lFrag.size() - 1]))
+							TeAddPoint(lFrag, currentLine, ipsAux, j);
+
+					if(hasOverlap)	// Se houverem pontos de interseccao que fazem overlap
 					{						
 						TeFragmentSegmentByOverlapping(currentLine[j], currentLine[j + 1], ipsAux, lFrag, fragments, boundaryFragments);
 					}
-					else	// Se n�o houver pontos de intersec��o que fazem overlap
+					else	// Se nao houver pontos de interseccao que fazem overlap
 					{
 						TeFragmentSegmentByNonOverlapping(currentLine[j], currentLine[j + 1], ipsAux, lFrag, fragments);
 					}
 				}
 				else
 				{
-					// Caso n�o haja ponto de intersec��o sobre o segmento,
+					// Caso nao haja ponto de interseccao sobre o segmento,
 					// apenas insere o ponto no fragmento de linha
 					lFrag.add(currentLine[j]);
 				}
 			}
 			
-			//if((lFrag.size() > 0u) && TeDisjoint(currentLine[nthSegment], lFrag[lFrag.size() - 1u]))
 			if(lFrag.size() > 0)
 			{
-				//unsigned int st = lFrag.size();
-
 				if(TeDisjoint(currentLine[nthSegment], lFrag[lFrag.size() - 1]))
 				{
 					lFrag.add(currentLine[nthSegment]);
@@ -413,8 +541,8 @@ void TeFragmentBoundary(const TeLineSet& lines, TeINTERSECTOR2::TeVectorBoundary
 		}
 		else
 		{
-			// Caso contr�rio, se a linha n�o possui ponto de interse��o
-			// � s� colocar ela na lista de linhas fragmentadas
+			// Caso contrario, se a linha nao possui ponto de intersecao
+			// eh so colocar ela na lista de linhas fragmentadas
 			fragments.add(lines[i]);
 		}
 	}
@@ -422,3 +550,117 @@ void TeFragmentBoundary(const TeLineSet& lines, TeINTERSECTOR2::TeVectorBoundary
 	return;
 }
 
+// rotina principal de fragmentacao de poligonos
+void TeFragmentBoundary(const TePolygonSet& polygons, TeINTERSECTOR2::TeVectorBoundaryIP& ips, TeLineSet& boundaryFragments, vector<pair<unsigned int, unsigned int> >& boundaryFragmentsIds, TeLineSet& fragments, vector<pair<unsigned int, unsigned int> >& fragmentsIds)
+{
+	// Informacoes sobre os pontos de intersecao
+	unsigned int currentIP = 0;
+	unsigned int nthIP = ips.size();	
+
+	// Ordena os pontos de intersecao
+	sort(ips.begin(), ips.end(), ipRedOrder2());
+
+	// Informacoes sobre numero de poligonos
+	unsigned int nthPol = polygons.size();
+
+	for(unsigned int polyIndex = 0; polyIndex < nthPol; ++polyIndex)
+	{
+		unsigned int nthLine = polygons[polyIndex].size();
+
+		for(unsigned int ringIndex = 0; ringIndex < nthLine; ++ringIndex)
+		{
+// temos intersecao no anel?
+            if((currentIP < nthIP) && (ips[currentIP].redPartNum_ == ringIndex) && (ips[currentIP].redPolNum_ == polyIndex))	
+			{
+				// Se a linha corrente possui um ponto de intersecao entao ela devera ser fragmentada
+				TeLine2D& currentLine = polygons[polyIndex][ringIndex];
+				
+				TeLine2D lFrag;
+
+				//unsigned int currentSegment = 0;
+				unsigned int nthSegment = currentLine.size() - 1;
+
+				TeCoord2D first(0,0);
+
+				for(unsigned int j = 0; j < nthSegment; ++j)
+				{
+// temos intersecao sobre o segmento corrente?
+					if((currentIP < nthIP) && (j == ips[currentIP].redSegNum_) && (ips[currentIP].redPartNum_ == ringIndex) && (ips[currentIP].redPolNum_ == polyIndex))	// Se ainda tenho pontos de interseccao e 
+					{
+						// Copias todos os pontos de interseccao do segmento para
+						// um vetor auxiliar e ja avanca o currentIP
+						TeINTERSECTOR2::TeVectorBoundaryIP ipsAux;
+
+						bool hasOverlap = false;
+
+						while((currentIP < nthIP) && (ips[currentIP].redSegNum_ == j) && (ips[currentIP].redPartNum_ == ringIndex) && (ips[currentIP].redPolNum_ == polyIndex))
+						{
+							if(ips[currentIP].coords_.size() == 2)
+								hasOverlap = true;
+
+							ipsAux.push_back(ips[currentIP]);
+
+							++currentIP;
+						}
+
+						// Adiciona o primeiro ponto da linha na lista do fragmento atual: mas precisamos decidir entre o vertice original ou o de intersecao => preferimos o de intersecao para amarrar com o segmento que intercepta este segmento
+						if((lFrag.size() == 0) || TeDisjoint(currentLine[j], lFrag[lFrag.size() - 1]))
+							TeAddPoint(lFrag, currentLine, ipsAux, j);
+
+						if(hasOverlap)	// Se houverem pontos de interseccao que fazem overlap
+						{						
+							TeFragmentSegmentByOverlapping(currentLine[j], currentLine[j + 1], ipsAux, lFrag, fragments, boundaryFragments);
+						}
+						else	// Se nao houver pontos de interseccao que fazem overlap
+						{
+							TeFragmentSegmentByNonOverlapping(currentLine[j], currentLine[j + 1], ipsAux, lFrag, fragments);
+						}
+					}
+					else
+					{
+						// Caso nao haja ponto de interseccao sobre o segmento,
+						// apenas insere o ponto no fragmento de linha
+						lFrag.add(currentLine[j]);
+					}
+				}
+				
+				if(lFrag.size() > 0)
+				{
+					if(TeDisjoint(currentLine[0], lFrag[lFrag.size() - 1]))
+					{
+						lFrag.add(currentLine[0]);
+
+						fragments.add(lFrag);
+					}
+					else if(lFrag.size() > 1)
+					{
+						fragments.add(lFrag);
+					}
+				}
+			}
+			else
+			{
+				// Caso contrario, se a linha nao possui ponto de intersecao
+				// e so colocar ela na lista de linhas fragmentadas
+				fragments.add(polygons[polyIndex][ringIndex]);
+			}
+
+			unsigned int numFragmentos = fragments.size();
+
+			for(unsigned int fragIdxCount = fragmentsIds.size(); fragIdxCount < numFragmentos; ++fragIdxCount)
+				fragmentsIds.push_back(pair<unsigned int, unsigned int>(polyIndex, ringIndex));
+
+
+//mario - 2006-03
+			unsigned int numFragmentosFronteira = boundaryFragments.size();
+
+			for(unsigned int fragIdxCount = boundaryFragmentsIds.size(); fragIdxCount < numFragmentosFronteira; ++fragIdxCount)
+			{
+				boundaryFragmentsIds.push_back(pair<unsigned int, unsigned int>(polyIndex, ringIndex));
+			}
+		}
+	}
+	
+	return;
+}
+
diff --git a/src/terralib/kernel/TeFragmentation.h b/src/terralib/kernel/TeFragmentation.h
old mode 100644
new mode 100755
index f9964b6..70f50fc
--- a/src/terralib/kernel/TeFragmentation.h
+++ b/src/terralib/kernel/TeFragmentation.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,15 +20,12 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeFragmentation.h
-    This file contains Algorithms for Topological Operations.
+    \brief This file contains Algorithms for Topological Operations.
+	       These data structures and algorithms MUST BE USED ONLY BY TerraLib kernel and should NOT be used by anyone because
+           THIS IS FOR INTERNAL USE ONLY.
 */
 
-/**
-  *@author Gilberto Ribeiro de Queiroz
-  */
-
 #ifndef  __TERRALIB_INTERNAL_FRAGMENTATION_H
 #define  __TERRALIB_INTERNAL_FRAGMENTATION_H
 
@@ -36,16 +33,28 @@ of this library and its documentation.
 #include "TeIntersector.h"
 
 /** @defgroup FragmentAlgorithms Algorithms that performs fragmentation of lines
- *  TerraLib fragmentation algorithms.
+	@ingroup GeometryAlgorithms
+    THIS IS FOR INTERNAL USE ONLY: TerraLib fragmentation algorithms. 
  *  @{
  */
-/*! \fn TeLineSet TeFragmentLine(const TeLineSet& redLineSet, const TeLineSet& blueLineSet, TeINTERSECTOR2::TeReportVector& report)
-    \brief Fragments the red lines according to blues and report, this rotine tries to join fragments.
-	\param redLineSet  The lines to fragment.
-	\param blueLineSet The blues one used as reference
-	\param report      The intersection points.
+/** \brief Fragments the lines according intersection points (May rise an exception: you must use try and catch).
+	\param lines			  The lines to fragment.
+	\param ips			      The intersection points where the boundary will be fragmented.
+	\param boundaryFragments  Output list of segments in the boundary of another line.
+	\param fragments		  Output list of line fragmemts.
+*/
+TL_DLL void TeFragmentBoundary(const TeLineSet& lines, TeINTERSECTOR2::TeVectorBoundaryIP& ips, TeLineSet& boundaryFragments, TeLineSet& fragments);
+
+/**  Fragments the lines according intersection points (May rise an exception: you must use try and catch).	
+	\param polygons              List of polygons (lines to be fragmented).
+	\param ips				     Intersection points where the boundary will be fragmented.
+	\param boundaryFragments     Output list of segments in the boundary of another line.
+	\param boundaryFragmentsIds  Output list with the objects identifiers for each fragment (to be used by location, to decide in/out fragments).
+	\param fragments		     Output list of line fragmemts.
+	\param fragmentsIds		     Output list with the objects identifiers for each fragment (to be used by location, to decide in/out fragments).
 */
-void TeFragmentBoundary(const TeLineSet& lines, TeINTERSECTOR2::TeVectorBoundaryIP& ips, TeLineSet& boundaryFragments, TeLineSet& fragments);
+TL_DLL void TeFragmentBoundary(const TePolygonSet& polygons, TeINTERSECTOR2::TeVectorBoundaryIP& ips, 
+						TeLineSet& boundaryFragments, vector<pair<unsigned int, unsigned int> >& boundaryFragmentsIds, TeLineSet& fragments, vector<pair<unsigned int, unsigned int> >& fragmentsIds);
 
 /** @} */ // end of group  FragmentAlgorithms
 
diff --git a/src/terralib/kernel/TeFunctionCallThreadJob.cpp b/src/terralib/kernel/TeFunctionCallThreadJob.cpp
new file mode 100755
index 0000000..295f116
--- /dev/null
+++ b/src/terralib/kernel/TeFunctionCallThreadJob.cpp
@@ -0,0 +1,25 @@
+#include "TeFunctionCallThreadJob.h"
+
+TeFunctionCallThreadJob::TeFunctionCallThreadJob() 
+{
+  jobFunc_ = 0;
+  jobFuncParsPtr_ = 0;
+};
+
+TeFunctionCallThreadJob::~TeFunctionCallThreadJob() 
+{
+};
+
+void TeFunctionCallThreadJob::executeJobCode() 
+{
+  if( jobFunc_ ) jobFunc_( jobFuncParsPtr_);
+};
+
+TeThreadJob* TeFunctionCallThreadJob::clone() const
+{
+  TeFunctionCallThreadJob* clonedJobPtr = new TeFunctionCallThreadJob;
+  clonedJobPtr->jobFunc_ = jobFunc_;
+  clonedJobPtr->jobFuncParsPtr_ = jobFuncParsPtr_;
+  
+  return clonedJobPtr;
+}
diff --git a/src/terralib/kernel/TeFunctionCallThreadJob.h b/src/terralib/kernel/TeFunctionCallThreadJob.h
new file mode 100755
index 0000000..4d45f3d
--- /dev/null
+++ b/src/terralib/kernel/TeFunctionCallThreadJob.h
@@ -0,0 +1,67 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright  2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+
+
+#ifndef __TERRALIB_INTERNAL_TEFUNCTIONCALLTHREADJOB_H
+#define __TERRALIB_INTERNAL_TEFUNCTIONCALLTHREADJOB_H
+
+#include "TeThreadJob.h"
+#include "TeDefines.h"
+
+    
+/*! \brief This job calls a C function passing a user supplied
+ * parameters pointer.
+ * \author Emiliano F. Castejon
+ */
+class TL_DLL TeFunctionCallThreadJob : public TeThreadJob
+{
+  public :
+    /** \brief Type definition for a thread job entry function pointer.
+     *  \param parsPtr The function user parameters pointer.
+     */
+    typedef void (*FunctPtrT)( void* parsPtr );      
+    
+    /*! A pointer to the function that will be called when this job
+     * stats
+     */ 
+    FunctPtrT jobFunc_;
+
+    /*! A pointer to the function paramters that will be passed when this job
+     * stats
+     */      
+    void* jobFuncParsPtr_;
+    
+    TeFunctionCallThreadJob();
+    
+    ~TeFunctionCallThreadJob();
+    
+    //Overloaded.
+    TeThreadJob* clone() const;
+    
+    // Overloaded
+    void executeJobCode();
+};
+      
+  
+#endif
+
diff --git a/src/terralib/kernel/TeGTFactory.cpp b/src/terralib/kernel/TeGTFactory.cpp
new file mode 100755
index 0000000..6990bb5
--- /dev/null
+++ b/src/terralib/kernel/TeGTFactory.cpp
@@ -0,0 +1,32 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/ 
+#include "TeGTFactory.h"
+
+TeGTFactory::TeGTFactory( const std::string& factoryName )
+: TeFactory< TeGeometricTransformation, TeGTParams >( factoryName )
+{
+};      
+
+TeGTFactory::~TeGTFactory()
+{
+};
diff --git a/src/terralib/kernel/TeGTFactory.h b/src/terralib/kernel/TeGTFactory.h
new file mode 100755
index 0000000..3e31f6d
--- /dev/null
+++ b/src/terralib/kernel/TeGTFactory.h
@@ -0,0 +1,78 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeGTFactory.h
+    \brief This file supports the implementation of Geometric transformation factories.
+	\author Emiliano Ferreira Castejon <castejon at dpi.inpe.br>
+*/
+/**
+ * @defgroup TeGTFactories Geometric transformation factories.
+ * @ingroup Utils
+ */  
+
+#include "TeDefines.h"
+
+#ifndef TEGTFACTORIES_REGISTERED
+  #define TEGTFACTORIES_REGISTERED
+
+  #include "TeAffineGTFactory.h"
+  #include "TeProjectiveGTFactory.h"
+#endif 
+
+#ifndef TEGTFACTORY_H
+  #define TEGTFACTORY_H
+
+  #include "TeGeometricTransformation.h"
+  #include "TeGTParams.h"
+  #include "TeFactory.h"
+  
+  #include <string>
+  
+  /**
+   * @brief This is the class for geometric transformations factory.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup TeGTFactories
+   */
+  class TL_DLL TeGTFactory : 
+    public TeFactory< TeGeometricTransformation, TeGTParams >
+  {
+    public :
+      
+      /**
+       * Default Destructor
+       */
+      virtual ~TeGTFactory();
+      
+    protected :
+      
+      /**
+       * Default constructor
+       *
+       * @param factoryName Factory name.
+       */
+      TeGTFactory( const std::string& factoryName );
+  };
+  
+#endif
+
+
+
diff --git a/src/terralib/kernel/TeGTParams.cpp b/src/terralib/kernel/TeGTParams.cpp
new file mode 100755
index 0000000..7c8ba5b
--- /dev/null
+++ b/src/terralib/kernel/TeGTParams.cpp
@@ -0,0 +1,112 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+
+#include "TeGTParams.h"
+
+#include <float.h>
+
+TeGTParams::TeGTParams()
+{
+  reset();  
+}
+
+
+TeGTParams::TeGTParams( const TeGTParams& external )
+{
+  operator=( external );
+}
+
+
+TeGTParams::~TeGTParams()
+{
+  reset();
+}
+
+
+const TeGTParams& TeGTParams::operator=( 
+  const TeGTParams& external )
+{
+  /* General parameters */
+  
+  transformation_name_ = external.transformation_name_;
+  out_rem_strat_ = external.out_rem_strat_;
+  max_dmap_error_ = external.max_dmap_error_;
+  max_imap_error_ = external.max_imap_error_;
+  max_dmap_rmse_ = external.max_dmap_rmse_;
+  max_imap_rmse_ = external.max_imap_rmse_;
+  tiepoints_ = external.tiepoints_;
+  direct_parameters_ = external.direct_parameters_;
+  inverse_parameters_ = external.inverse_parameters_;
+  enable_multi_thread_ = external.enable_multi_thread_;
+  
+  /* Projective parameters */
+  
+  maxIters_          = external.maxIters_;
+  tolerance_         = external.tolerance_;
+  useAdaptiveParams_ = external.useAdaptiveParams_;  
+  WMatrix_ = external.WMatrix_;
+  deltaX_ = external.deltaX_;
+  deltaY_ = external.deltaY_;
+  deltaU_ = external.deltaU_;
+  deltaV_ = external.deltaV_;  
+  
+  return external;
+}
+
+
+std::string TeGTParams::decName() const
+{
+  return transformation_name_;
+}
+
+
+void TeGTParams::reset()
+{
+  /* general parameters */
+  
+  transformation_name_ = "affine";
+  out_rem_strat_ = NoOutRemotion;
+  max_dmap_error_ = DBL_MAX;
+  max_imap_error_ = DBL_MAX;
+  max_dmap_rmse_ = DBL_MAX;
+  max_imap_rmse_ = DBL_MAX;
+  
+  enable_multi_thread_ = true;
+  
+  direct_parameters_.Clear();
+  inverse_parameters_.Clear();
+  tiepoints_.clear();  
+  
+  /* projective parameters */
+  
+  maxIters_  = 20;
+  tolerance_ = 0.0001;
+  useAdaptiveParams_ = false; 
+  deltaX_ = 0.0;
+  deltaY_ = 0.0;
+  deltaU_ = 0.0;
+  deltaV_ = 0.0;
+  
+  WMatrix_.Clear();
+}
+
diff --git a/src/terralib/kernel/TeGTParams.h b/src/terralib/kernel/TeGTParams.h
new file mode 100755
index 0000000..39396c3
--- /dev/null
+++ b/src/terralib/kernel/TeGTParams.h
@@ -0,0 +1,249 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeGTParams.h
+    \brief This file contains the definition of parameters necessary to build a    TeGeometricTransformation instance.
+*/
+
+#ifndef TEGTPARAMS_H
+  #define TEGTPARAMS_H
+  
+  #include "TeMatrix.h"
+  #include "TeCoord2D.h"
+  #include "TeSharedPtr.h"
+  #include "TeDefines.h"
+
+  #include <string>
+
+  /**
+   * @brief This is the class for geometric transformation parameters .
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup Utils
+   */
+  class TL_DLL TeGTParams
+  {
+    public :
+    
+      /** 
+       * @typedef TeSharedPtr< TeGTParams > pointer
+       * Type definition for a TeGTParams instance pointer. 
+       */
+      typedef TeSharedPtr< TeGTParams > pointer;    
+      
+      /**
+       * @enum OutRemStrategy
+       * Outliers remotion strategy.
+       */ 
+      enum OutRemStrategy {
+        /**
+         * @brief No outliers remotion applied.
+         */
+        NoOutRemotion,
+        /**
+         * @brief Exaustive outliers remotion (all
+         * possible tie-points combinations will be
+         * tested.
+         */
+        ExaustiveOutRemotion,
+        /**
+         * @brief LOA (leave-worse-out) will
+         * be performed.
+         */
+        LWAOutRemotion
+      };     
+      
+      /**
+       * @name General parameters.
+       * 
+       * @brief Used by all transformations..
+       */       
+    
+      /**
+       * @brief Transformation name.
+       *
+       * @note Default value = affine.
+       */
+      std::string transformation_name_;
+      
+      /** 
+       * @brief The outliers remotion strategy.  
+       *
+       * @note Default value = NoOutRemotion.    
+       */
+      OutRemStrategy out_rem_strat_;
+      
+      /**
+       * @brief The maximum allowed direct mapping error.
+       *
+       * @note Default value = Positive infinite.    
+       */         
+      double max_dmap_error_;
+      
+      /**
+       * @brief The maximum allowed inverse mapping error.
+       *
+       * @note Default value = Positive infinite.    
+       */         
+      double max_imap_error_;   
+
+      /**
+       * @brief The maximum allowed direct mapping mean square error.
+       *
+       * @note Default value = Positive infinite.    
+       */         
+      double max_dmap_rmse_;
+      
+      /**
+       * @brief The maximum allowed inverse mapping mean square error.
+       *
+       * @note Default value = Positive infinite.    
+       */         
+      double max_imap_rmse_; 
+    
+      /**
+       * @brief The current direct mapping transformation parameters.
+       * @note Default value = An empty matrix.    
+       */    
+      TeMatrix direct_parameters_;
+      
+      /**
+       * @brief The current inverse mapping transformation parameters.
+       * @note Default value = An empty matrix.    
+       */    
+      TeMatrix inverse_parameters_;      
+
+      /**
+       * @brief The current transformation tie-points.
+       * @note Default value = An empty vector.    
+       */    
+      std::vector< TeCoordPair > tiepoints_; 
+      
+      /**
+       * @brief Enable/disable multi-thread processing (when
+       * available (default=true).
+       */    
+      bool enable_multi_thread_;       
+      
+      /**
+       * @name Projective transformation parameters.
+       * @brief Projective transformation parameters.
+       */             
+      
+      /**
+       * @brief The weight matrix used by least square method.
+       *
+       * @note Default value = empty matrix.
+       */         
+      TeMatrix WMatrix_;
+      
+      /**
+       * @brief The maximun number of iterations while processing.
+       *
+       * @note Default value = 20.
+       */         
+      unsigned int maxIters_;
+      
+      /**
+       * @brief The tolerance used while executing an iterative processing.
+       *
+       * @note Default value = 0.0001.
+       */         
+      double tolerance_;
+      
+      /**
+       * @brief Indicates whether use adaptive parameters or not.
+       *
+       * @note Default value = false.
+       */         
+      bool useAdaptiveParams_;    
+      
+      /**
+       * @brief Adaptive parameter.
+       *
+       * @note Default value = 0.
+       */       
+      double deltaX_;
+      
+      /**
+       * @brief Adaptive parameter.
+       *
+       * @note Default value = 0.
+       */       
+      double deltaY_;
+      
+      /**
+       * @brief Adaptive parameter.
+       *
+       * @note Default value = 0.
+       */       
+      double deltaU_;
+      
+      /**
+       * @brief Adaptive parameter.
+       *
+       * @note Default value = 0.
+       */       
+      double deltaV_;   
+      
+      /**
+       * @name Class methods.
+       * @brief Class methods.
+       */          
+
+      /**
+       * @brief Default constructor
+       */
+      TeGTParams();
+      
+      /**
+       * @brief Alternative constructor
+       * @param external External reference.
+       */
+      TeGTParams( const TeGTParams& external );      
+      
+      /**
+       * @brief Default Destructor
+       */
+      ~TeGTParams();
+      
+      /**
+       * @brief operator= implementation.
+       *
+       * @param external External reference.
+       * @return A const reference to the external object instance.
+       */
+      const TeGTParams& operator=( 
+        const TeGTParams& external );      
+
+      /**
+       * @brief This is for TeFactory compatibility.
+       */
+      std::string decName() const;
+      
+      /**
+       * @brief Reset to the default parameters.
+       */
+      void reset();      
+            
+  };
+
+#endif
diff --git a/src/terralib/kernel/TeGeneralizedProxMatrix.cpp b/src/terralib/kernel/TeGeneralizedProxMatrix.cpp
deleted file mode 100644
index 33f8a3c..0000000
--- a/src/terralib/kernel/TeGeneralizedProxMatrix.cpp
+++ /dev/null
@@ -1,433 +0,0 @@
-/************************************************************************************
-TerraLib - a library for developing GIS applications.
-Copyright � 2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The library provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use
-of this library and its documentation.
-*************************************************************************************/
-
-#include "TeSTElementSet.h"
-#include "TeGeneralizedProxMatrix.h"
-
-
-bool
-TeGeneralizedProxMatrix::IsValid () const
-{
-	if ((imp_) && (sc_) && (ss_) && (sw_))
-		return true;
-
-	return false;
-}
-
-
-TeProxMatrixImplementation*
-TeGeneralizedProxMatrix::getImplementation (const string type)
-{
-	 if (imp_ == 0) 
-		imp_ = TeProxMatrixAbstractFactory::MakeConcreteImplementation (type); 
-    return imp_;
-}
-
-
-
-TeGeneralizedProxMatrix::TeGeneralizedProxMatrix(TeSTElementSet* objects, TeGeomRep geom_type, const string imp_type)
-{
-	imp_ = 0;
-	imp_ = getImplementation(imp_type);
-	total_slices_ = 1;
-
-	if ((geom_type==TePOLYGONS) || (geom_type==TeCELLS))
-		sc_ = new TeProxMatrixLocalAdjacencyStrategy (objects, geom_type);
-	else {
-			imp_ = 0;
-			sc_ = 0;
-			ss_ = 0;
-			sw_ = 0;
-		}
-	ss_ = new TeProxMatrixNoSlicingStrategy;
-	sw_ = new TeProxMatrixNoWeightsStrategy;
-
-	if (IsValid()) {
-		if (sc_->Construct (imp_)) {
-			ss_->Slice (imp_);
-			sw_->ComputeWeigths (imp_);
-		} 
-		else {
-
-			imp_ = 0;
-			sc_ = 0;
-			ss_ = 0;
-			sw_ = 0;
-		}
-	}
-}
-
-
-TeGeneralizedProxMatrix::TeGeneralizedProxMatrix (TeProxMatrixConstructionStrategy* sc, TeProxMatrixWeightsStrategy* sw, TeProxMatrixSlicingStrategy* ss, const string imp_type)
-{
-	imp_ = 0;
-	imp_ = getImplementation(imp_type);
-	total_slices_ = 1;
-	sc_ = sc;
-
-
-  if(ss)
-		ss_ = ss;
-	else
-		ss_ = new TeProxMatrixNoSlicingStrategy();
-
-	if(sw)
-		sw_ = sw;
-	else
-		sw_ = new TeProxMatrixNoWeightsStrategy();
-
-
-	if (IsValid()) {
-		if (sc_->Construct (imp_)) {
-			ss_->Slice (imp_);
-			sw_->ComputeWeigths (imp_);
-		} 
-		else {
-			imp_ = 0;
-			sc_ = 0;
-			ss_ = 0;
-			sw_ = 0;
-		}
-	}
-}
-
-
-TeGeneralizedProxMatrix::TeGeneralizedProxMatrix(const TeGeneralizedProxMatrix& pm)
-{
-	if (pm.imp_ == 0)
-		imp_ = 0;
-	else 
-		imp_ = pm.imp_->CreateCopy ();
-
-	total_slices_ = pm.total_slices_;
-	sc_ = pm.sc_;
-	ss_ = pm.ss_;
-	sw_ = pm.sw_;
-
-	if (IsValid() == false)
-	{
-		imp_ = 0;
-		sc_ = 0;
-		ss_ = 0;
-		sw_ = 0;
-	}
-}
-
-
-TeGeneralizedProxMatrix& 
-TeGeneralizedProxMatrix::operator=(const TeGeneralizedProxMatrix& pm) 
-{
-	if (*this == pm) return *this;
-
-	if (imp_) delete imp_;
-	imp_ = 0;
-	if (pm.imp_)	imp_ = pm.imp_->CreateCopy ();
-
-	total_slices_ = pm.total_slices_;
-	sc_ = pm.sc_;
-	ss_ = pm.ss_;
-	sw_ = pm.sw_;
-
-	if (IsValid() == false)
-	{
-		imp_ = 0;
-		sc_ = 0;
-		ss_ = 0;
-		sw_ = 0;
-	}
-
-	return *this;
-
-}
-
-bool 
-TeGeneralizedProxMatrix::operator==(const TeGeneralizedProxMatrix& pm) const
-{
-	if (IsValid() && pm.IsValid()) 
-	{	
-		if ((sc_->IsEqual (*(pm.sc_))) &&
-			(ss_->IsEqual (*(pm.ss_))) &&
-			(sw_->IsEqual (*(pm.sw_))) &&
-			(total_slices_ == pm.total_slices_) &&
-
-			(imp_->IsEqual(*(pm.imp_)))) return true;
-	} else 	
-		if ((IsValid() == false) && (pm.IsValid() == false)) 
-			return true;
-	
-	return false;
-
-}
-
-TeNeighbours
-TeGeneralizedProxMatrix:: getNeighbours (const string& object_id, int slice) 
-{
-	TeNeighbours neigh2;
-	if (slice > total_slices_) return neigh2;
-
-	if (IsValid()) 
-	{
-		TeNeighbours neigh1;
-		imp_->getNeighbours (object_id, neigh1);
-		for (int i=0; i < neigh1.size(); i++) 
-			if (neigh1.Attributes(i).Slice() == slice) 
-				neigh2.Insert (neigh1.ObjectId(i), neigh1.Attributes(i));
-	}
-
-	return neigh2;
-}
-
-
-TeNeighbours 
-TeGeneralizedProxMatrix::operator[](const string& object_id) 
-{
-	return getNeighbours(object_id);
-}
-
-
-TeNeighboursMap
-TeGeneralizedProxMatrix::getMapNeighbours (const string& object_id, int slice) 
-{
-	TeNeighboursMap map;
-	if (slice > total_slices_) return map;
-
-	if (IsValid()) 
-	{
-		TeNeighbours neigh;
-		imp_->getNeighbours (object_id, neigh);
-
-		for (int i=0; i < neigh.size(); i++) 
-			if (neigh.Attributes(i).Slice() == slice) 
-				map[neigh.ObjectId(i)] = neigh.Attributes(i);
-	}
-
-	return map;
-}
-
-
-TeSTElementSet 
-TeGeneralizedProxMatrix::getSTENeighbours(const string& object_id)
-{
-	TeSTElementSet selected_objects;
-	if (imp_) 
-	{
-		TeNeighbours neigh;
-		imp_->getNeighbours (object_id, neigh);
-		
-		for (int i = 0; i < neigh.size(); i++) 
-		{
-			// Construct a sto instance with its attributes
-			TeSTInstance obj;
-			obj.objectId(neigh.ObjectId(i));  
-			
-			//load the attributes
-			TePropertyVector propVector;
-			sc_->objects()->getPropertyVector(object_id, propVector);
-			obj.properties(propVector);
-				
-			// insert object in the return vector
-			selected_objects.insertSTInstance(obj);
-		}
-	}
-	return selected_objects;
-}
-
-
-bool 
-TeGeneralizedProxMatrix::setCurrentConstructionStrategy (TeProxMatrixConstructionStrategy* sc)  
-{	
-	if (sc == 0) 
-		return false; 
-	sc_ = sc; 
-	return true;
-}
-
-
-bool 
-TeGeneralizedProxMatrix::setCurrentWeightsStrategy (TeProxMatrixWeightsStrategy* sw) 
-{	
-	if (sw == 0) 
-		return false; 
-	sw_ = sw; 
-	return true;
-}
-
-bool 
-TeGeneralizedProxMatrix::setCurrentSlicingStrategy (TeProxMatrixSlicingStrategy* ss) 
-{
-	if (ss == 0) 
-		return false; 
-	ss_ = ss; 
-	return true;
-}
-
-bool
-TeGeneralizedProxMatrix:: ConstructMatrix ()
-{
-
-	//	ClearImplementation();
-	imp_ = 0;
-	imp_ = getImplementation();
-
-	if (sc_) 
-	{
-		if (sc_->Construct (imp_)) 
-		{
-			if (ss_) ss_->Slice (imp_);
-			if (sw_) sw_->ComputeWeigths (imp_); 
-			return true;
-		} 
-	}
-	return false;
-}
-
-
-bool
-TeGeneralizedProxMatrix:: ClearImplementation ()
-{
-	TeProxMatrixImplementation* aux;
-	if (imp_ == 0)  aux = getImplementation ();
-	else	aux = getImplementation (imp_->Type().c_str());
-
-	if (aux == 0) return false;
-	delete imp_;
-	imp_ = aux;
-
-	return true;
-}
-
-bool
-TeGeneralizedProxMatrix:: RecomputeWeights ()
-{
-	if (IsValid()){
-		sw_->ComputeWeigths (imp_); return true;
-	} 
-	return false;
-}
-
-
-bool
-TeGeneralizedProxMatrix:: RecomputeSlicing ()
-{
-	if (IsValid()){
-		ss_->Slice (imp_); return true;
-	} 
-	return false;
-}
-
-
-bool 
-TeGeneralizedProxMatrix::IsConnected (const string& object_id1, const string& object_id2) 
-{
-	if (imp_ == 0) 
-		return false;  
-	return imp_->isConnected (object_id1, object_id2);
-}
-
-bool 
-TeGeneralizedProxMatrix::ConnectObjects (const string& object_id1, const string& object_id2, const TeProxMatrixAttributes& attr)
-{
-	if (!imp_) 
-		getImplementation();  
-	imp_->connectObjects (object_id1, object_id2, attr);
-	return true;
-}
-
-bool 
-TeGeneralizedProxMatrix::ConnectObjects (const string& object_id1, const string& object_id2)
-{
-	if (!imp_) 
-		getImplementation();  
-	TeProxMatrixAttributes attr;
-	imp_->connectObjects (object_id1, object_id2, attr);
-	return true;
-}
-
-bool 
-TeGeneralizedProxMatrix::DisconnectObjects (const string& object_id1, const string& object_id2)
-{
-	if (imp_ == 0) 
-		return false;  
-	return imp_->disconnectObjects (object_id1, object_id2);
-}
-
-bool 
-TeGeneralizedProxMatrix::RemoveObject (const string& object_id)
-{
-	if (imp_ == 0) 
-		return false;  
-	return imp_->removeObject (object_id);
-}
-
-bool 
-TeGeneralizedProxMatrix::GetConnectionAttributes (const string& object_id1, string& object_id2, TeProxMatrixAttributes& attr)
-{
-	if (imp_ == 0) 
-		return false;
-	return imp_->getConnectionAttributes (object_id1, object_id2, attr); 
-}
-
-int  
-TeGeneralizedProxMatrix::NumberOfObjects () 
-{
-	if (imp_ == 0) 
-		return 0;  
-	return imp_->NumberOfObjects ();
-}
-
-bool 
-TeGeneralizedProxMatrix::SaveTextFile (string name) 
-{	
-	if (imp_ == 0) 
-		return false;
-	return imp_->SaveTextFile (name); 
-}
-
-
-bool 
-TeGeneralizedProxMatrix::SaveGALFile (string name) 
-{	
-	if (imp_ == 0) 
-		return false;
-	return imp_->SaveGALFile (name); 
-}
-
-bool 
-TeGeneralizedProxMatrix::SaveGWTFile (string name) 
-{	
-	if (imp_ == 0) 
-		return false;
-	return imp_->SaveGWTFile (name); 
-}
-
-TeGeneralizedProxMatrix::~TeGeneralizedProxMatrix()
-{
-    if (imp_ !=  0) 
-		delete imp_; //It is not counted.
-}
-
-
-
-
-
-
diff --git a/src/terralib/kernel/TeGeneralizedProxMatrix.h b/src/terralib/kernel/TeGeneralizedProxMatrix.h
old mode 100644
new mode 100755
index e573103..08cfefe
--- a/src/terralib/kernel/TeGeneralizedProxMatrix.h
+++ b/src/terralib/kernel/TeGeneralizedProxMatrix.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,13 +20,10 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeGeneralizedProxMatrix.h
-    This file contains structures and definitions about 
-	generalized proximity matrices support in TerraLib
+	\brief This file contains structures and definitions about generalized proximity matrices support in TerraLib
 */
 
-
 #ifndef TeProxMatrix_H
 #define TeProxMatrix_H
 
@@ -35,39 +32,54 @@ of this library and its documentation.
 #include "TeProxMatrixConstructionStrategy.h"
 #include "TeProxMatrixSlicingStrategy.h"
 #include "TeProxMatrixWeightsStrategy.h"
+#include "TeSTElementSet.h"
 
 
 //! A class to represent a generalized proximity matrix 
+template<typename Set> 
 class TeGeneralizedProxMatrix  
 {
 private:
-
-	TeProxMatrixImplementation*				imp_;  
-	TeProxMatrixConstructionStrategy*		sc_;   
-	TeProxMatrixSlicingStrategy*			ss_;   
-	TeProxMatrixWeightsStrategy*			sw_;   
-
-	int										total_slices_;
-
+	TeProxMatrixImplementation*	imp_;  
+	TeProxMatrixConstructionStrategy<Set>* sc_;   
+	TeProxMatrixSlicingStrategy* ss_;   
+	TeProxMatrixWeightsStrategy* sw_;  
+	
 protected:
-
 	//! Get the implementation from a concrete factory defined by impl_type
-	TeProxMatrixImplementation*				getImplementation(const string implementation_type = "Breymann");
+	TeProxMatrixImplementation*				getImplementation(const TeGPMImplementation& implementation_type = TeGraphBreymann);
 
 	//! Verify if a matrix was created correctly by the constructors.	
-	bool IsValid() const;
+	bool isValid() const;
 	
 public:
+	int						gpm_id_;	
+	bool					is_default_;
+	int						total_slices_;
+	string					neighbourhood_table_;
+	TeGPMImplementation		impl_strategy_;
 
 	//! Empty constructor
-	TeGeneralizedProxMatrix ()
-	{imp_ = 0; sc_ = 0; sw_ = 0; ss_ = 0; total_slices_=1;}
+	TeGeneralizedProxMatrix ():
+		imp_(0), sc_(0), ss_(0), sw_(0), gpm_id_(-1),
+		is_default_(false), total_slices_(1), neighbourhood_table_(""), 
+		impl_strategy_(TeGraphBreymann)
+	  {}
+
+  //! Constructor
+	TeGeneralizedProxMatrix (const int& id, const string& tableName, TeProxMatrixImplementation* imp, TeProxMatrixWeightsStrategy* ws):
+		imp_(imp), sc_(0), ss_(0), sw_(ws),
+		gpm_id_(id), is_default_(false), total_slices_(1), 
+		neighbourhood_table_(tableName), impl_strategy_(TeGraphBreymann)
+	  {}
 
 	//! Constructor parametrized with specific strategies. Each stragegy must be previously created and correctly parametrized.
-	TeGeneralizedProxMatrix (TeProxMatrixConstructionStrategy* sc,  TeProxMatrixWeightsStrategy* sw = 0, TeProxMatrixSlicingStrategy* ss = 0, const string type = "Breymann");
+	TeGeneralizedProxMatrix (TeProxMatrixConstructionStrategy<Set>* sc,  TeProxMatrixWeightsStrategy* sw = 0, 
+		TeProxMatrixSlicingStrategy* ss = 0, const TeGPMImplementation& type = TeGraphBreymann, 
+		const int& gpmId=-1, const bool& isDefault=false,  const string& neigsTable ="", const int& slices=1);
 
 	//! Constructor based on default strategies: (a) Local adjacency of first order; (b) No siling;  and (c)  No weighs (all equal to 1).
-	TeGeneralizedProxMatrix(TeSTElementSet* objects, TeGeomRep geom_type, const string type = "Breymann");
+	TeGeneralizedProxMatrix(TeSTElementSet* objects, TeGeomRep geom_type, const TeGPMImplementation& type = TeGraphBreymann);
 
 	//! Copy constructor
 	TeGeneralizedProxMatrix(const TeGeneralizedProxMatrix& p);
@@ -75,13 +87,13 @@ public:
 	//! Attribution Operator 
 	TeGeneralizedProxMatrix& operator=(const TeGeneralizedProxMatrix& p);
 
-	bool ClearImplementation ();
+	bool clearImplementation ();
 
 	//! Comparison Operator
 	bool operator==(const TeGeneralizedProxMatrix& p) const;
 	
 	
-	/** @name Methods for return the neighbours
+	/** @name getNeighbours Methods for return the neighbours
 	*  All methods return the  neighbours of a given object in a given slice. The default is the first slice.
 	*  Slices are defined according to the Slicing Strategy in use (e.g., according to distance zones, corresponding to neighbourhood orders, weights intervals, etc.). 
 	*  If the parameter slice is not provided, the first slice is returned.
@@ -100,70 +112,519 @@ public:
 
 	//! Return the neighbours of an object and their attributes in a spatial temporal element set (TeSTElementSet)
 	TeSTElementSet getSTENeighbours(const string& object_id); 
-
 	//@}
 
 	
-	/** @name Methods for changing current strategies 
+	/** @name ChangeStrategies Methods for changing current strategies 
 	*  change current strategies 
 	*/
 	//@{ 
 	//! Set current construction strategy 
-	bool setCurrentConstructionStrategy (TeProxMatrixConstructionStrategy* sc);  
+	bool setCurrentConstructionStrategy (TeProxMatrixConstructionStrategy<Set>* sc);  
 	
 	//! Set current weights strategy 
 	bool setCurrentWeightsStrategy (TeProxMatrixWeightsStrategy* sw); 
 	
 	//! Set current slicing strategy 
 	bool setCurrentSlicingStrategy (TeProxMatrixSlicingStrategy* ss); 
+
+	//! Get current construction params 
+	TeProxMatrixConstructionParams* getConstructionParams() 
+	{	
+		if(sc_)
+			return &(sc_->constructionParams()); 
+		return 0;
+	} 
+	
+	//! Get current weights params 
+	TeProxMatrixWeightsParams* getWeightsParams() 
+	{ 
+		if(sw_)
+			return &(sw_->weightsParams()); 
+		return 0;
+	}  
+	
+	//! Get current slicing params 
+	TeProxMatrixSlicingParams* getSlicingParams() 
+	{ 
+		if(ss_)
+            return &(ss_->slicingParams()); 
+		return 0;
+	} 
 	//@}
 	
 
 	//! Reconstruct matrix and recompute weights and slicing, accornding to current strategies.
-	bool ConstructMatrix ();
+	bool constructMatrix ();
 
 	//! Recomputes the weigths, given a new strategy. The matrix is not reconstructed.
-	bool RecomputeWeights ();
+	bool recomputeWeights ();
 
 	//! Sets the slicing strategy for neighbours selection.
-	bool RecomputeSlicing ();
+	bool recomputeSlicing ();
 
 	//! Verify if two objects are connected
-	bool IsConnected (const string& object_id1, const string& object_id2); 
+	bool isConnected (const string& object_id1, const string& object_id2); 
 
 	//! Connect two objects
-	bool ConnectObjects (const string& object_id1, const string& object_id2, const TeProxMatrixAttributes& attr); 
+	bool connectObjects (const string& object_id1, const string& object_id2, const TeProxMatrixAttributes& attr); 
 	
 	//! Connect two objects
-	bool ConnectObjects (const string& object_id1, const string& object_id2);
+	bool connectObjects (const string& object_id1, const string& object_id2);
 
 	//! Disconnect two objects
-	bool DisconnectObjects (const string& object_id1, const string& object_id2); 
+	bool disconnectObjects (const string& object_id1, const string& object_id2); 
 
 	//! Remove object
-	bool RemoveObject (const string& object_id);  
+	bool removeObject (const string& object_id);  
 
 	//! Get connection attributes
-	bool GetConnectionAttributes (const string& object_id1, string& object_id2, TeProxMatrixAttributes& attr); 
+	bool getConnectionAttributes (const string& object_id1, string& object_id2, TeProxMatrixAttributes& attr); 
 
 	//! Return the number of objects
-	int NumberOfObjects (); 
+	int numberOfObjects (); 
 
 	//! Return the number of slices
-	int NumerOfSlices () {return total_slices_;}
+	int numerOfSlices () {return total_slices_;}
 
 	//! Save the matrix in a text file
-	bool SaveTextFile (string name); 
+	bool saveTextFile (const string& name, map<string, string>* ids=0); 
 
-		//! Save the matrix in a text file
-	bool SaveGALFile (string name); 	
+	//! Save the matrix in a text file
+	bool saveGALFile (const string& name, map<string, string>* ids=0); 	
 	
 	//! Save the matrix in a text file
-	bool SaveGWTFile (string name); 
+	bool saveGWTFile (const string& name, map<string, string>* ids=0); 
 
-	//! Destructor
-	virtual ~TeGeneralizedProxMatrix();
+	//! Save the matrix in a text file
+	bool saveTextFile (const string& name, vector<string>* ids); 
 
+	//! Save the matrix in a text file
+	bool saveGALFile (const string& name, vector<string>* ids); 	
+	
+	//! Save the matrix in a text file
+	bool saveGWTFile (const string& name, vector<string>* ids); 
+
+	//! Destructor
+	virtual ~TeGeneralizedProxMatrix()
+	{
+		if (imp_) 
+			delete imp_; //It is not counted
+	}
 };
 
+//--- template implementations ---
+template<typename Set>
+TeGeneralizedProxMatrix<Set>::TeGeneralizedProxMatrix(TeSTElementSet* objects, TeGeomRep geom_type, const TeGPMImplementation& imp_type)
+{
+	gpm_id_=-1;
+    is_default_=false; 
+	total_slices_=1; 
+	neighbourhood_table_=""; 
+    impl_strategy_=TeGraphBreymann;
+	
+	imp_ = 0;
+	imp_ = getImplementation(imp_type);
+	if ((geom_type==TePOLYGONS) || (geom_type==TeCELLS))
+	{
+		sc_ = new TeProxMatrixLocalAdjacencyStrategy (objects, geom_type);
+		ss_ = new TeProxMatrixNoSlicingStrategy;
+		sw_ = new TeProxMatrixNoWeightsStrategy;
+	}
+	else
+	{
+		imp_ = 0;
+		sc_ = 0;
+		ss_ = 0;
+		sw_ = 0;
+	}
+}
+
+template<typename Set>
+TeGeneralizedProxMatrix<Set>::TeGeneralizedProxMatrix (TeProxMatrixConstructionStrategy<Set>* sc,  TeProxMatrixWeightsStrategy* sw, 
+		TeProxMatrixSlicingStrategy* ss, const TeGPMImplementation& type, 
+		const int& gpmId, const bool& isDefault,  const string& neigsTable, const int& slices):
+	sc_(sc),
+	ss_(ss),
+	sw_(sw),
+	gpm_id_(gpmId), 
+	is_default_(isDefault),
+	total_slices_(slices),
+	neighbourhood_table_(neigsTable),
+	impl_strategy_(type)
+	
+{
+	
+	imp_ = 0;
+	imp_ = getImplementation(type);
+	
+	if(!ss)
+		ss_ = new TeProxMatrixNoSlicingStrategy();
+
+	if(!sw)
+		sw_ = new TeProxMatrixNoWeightsStrategy();
+}
+
+
+template<typename Set> bool
+TeGeneralizedProxMatrix<Set>::isValid () const
+{
+	if ((imp_) && (sc_) && (ss_) && (sw_))
+		return true;
+
+	return false;
+}
+
+
+template<typename Set> TeProxMatrixImplementation*
+TeGeneralizedProxMatrix<Set>::getImplementation (const TeGPMImplementation& type)
+{
+	 if (imp_ == 0) 
+		imp_ = TeProxMatrixAbstractFactory::MakeConcreteImplementation (type); 
+    return imp_;
+}
+
+
+
+template<typename Set>
+TeGeneralizedProxMatrix<Set>::TeGeneralizedProxMatrix(const TeGeneralizedProxMatrix<Set>& pm)
+{
+	if (pm.imp_ == 0)
+		imp_ = 0;
+	else 
+		imp_ = pm.imp_->createCopy ();
+
+	sc_ = pm.sc_;
+	ss_ = pm.ss_;
+	sw_ = pm.sw_;
+
+	gpm_id_=pm.gpm_id_;	
+	is_default_=pm.is_default_;
+	total_slices_=pm.total_slices_;
+	neighbourhood_table_=pm.neighbourhood_table_;
+	impl_strategy_=pm.impl_strategy_;
+}
+
+
+template<typename Set> TeGeneralizedProxMatrix<Set>& 
+TeGeneralizedProxMatrix<Set>::operator=(const TeGeneralizedProxMatrix<Set>& pm) 
+{
+	if (*this == pm) return *this;
+
+	if (imp_) delete imp_;
+	imp_ = 0;
+	if (pm.imp_)	imp_ = pm.imp_->createCopy ();
+
+	sc_ = pm.sc_;
+	ss_ = pm.ss_;
+	sw_ = pm.sw_;
+	gpm_id_=pm.gpm_id_;	
+	is_default_=pm.is_default_;
+	total_slices_=pm.total_slices_;
+	neighbourhood_table_=pm.neighbourhood_table_;
+	impl_strategy_=pm.impl_strategy_;
+
+	return *this;
+
+}
+
+template<typename Set> bool 
+TeGeneralizedProxMatrix<Set>::operator==(const TeGeneralizedProxMatrix<Set>& pm) const
+{
+	if (isValid() && pm.isValid()) 
+	{	
+		if ((sc_->IsEqual (*(pm.sc_))) &&
+			(ss_->operator==(*(pm.ss_))) &&
+			(sw_->operator==(*(pm.sw_))) &&
+			(total_slices_ == pm.total_slices_) &&
+			(imp_->isEqual(*(pm.imp_)))) 
+			return true;
+	} 
+	else 	
+		if (!isValid() && !pm.isValid()) 
+			return true;
+	return false;
+}
+
+template<typename Set> TeNeighbours
+TeGeneralizedProxMatrix<Set>:: getNeighbours (const string& object_id, int slice) 
+{
+	TeNeighbours neigh2;
+	if (slice > total_slices_) 
+		return neigh2;
+
+	if (imp_) 
+	{
+		TeNeighbours neigh1;
+		imp_->getNeighbours (object_id, neigh1);
+		for (int i=0; i < neigh1.size(); i++) 
+			if (neigh1.Attributes(i).Slice() == slice) 
+				neigh2.Insert (neigh1.ObjectId(i), neigh1.Attributes(i));
+	}
+
+	return neigh2;
+}
+
+
+template<typename Set> TeNeighbours 
+TeGeneralizedProxMatrix<Set>::operator[](const string& object_id) 
+{
+	return getNeighbours(object_id);
+}
+
+
+template<typename Set> TeNeighboursMap
+TeGeneralizedProxMatrix<Set>::getMapNeighbours (const string& object_id, int slice) 
+{
+	TeNeighboursMap neighMap;
+	if (slice > total_slices_) 
+		return neighMap;
+
+	if (imp_) 
+	{
+		TeNeighbours neigh;
+		imp_->getNeighbours (object_id, neigh);
+
+		for (int i=0; i < neigh.size(); i++) 
+			if (neigh.Attributes(i).Slice() == slice) 
+				neighMap[neigh.ObjectId(i)] = neigh.Attributes(i);
+	}
+
+	return neighMap;
+}
+
+
+template<typename Set> TeSTElementSet 
+TeGeneralizedProxMatrix<Set>::getSTENeighbours(const string& object_id)
+{
+	TeSTElementSet selected_objects;
+	if (imp_ && sc_) 
+	{
+		TeNeighbours neigh;
+		imp_->getNeighbours (object_id, neigh);
+		
+		for (int i = 0; i < neigh.size(); i++) 
+		{
+			// Construct a sto instance with its attributes
+			TeSTInstance obj;
+			obj.objectId(neigh.ObjectId(i));  
+			
+			//load the attributes
+			TePropertyVector propVector;
+			sc_->objects()->getPropertyVector(object_id, propVector);
+			obj.properties(propVector);
+				
+			// insert object in the return vector
+			selected_objects.insertSTInstance(obj);
+		}
+	}
+	return selected_objects;
+}
+
+
+template<typename Set> bool 
+TeGeneralizedProxMatrix<Set>::setCurrentConstructionStrategy (TeProxMatrixConstructionStrategy<Set>* sc)  
+{	
+	if (sc == 0) 
+		return false; 
+	sc_ = sc; 
+	return true;
+}
+
+
+template<typename Set> bool 
+TeGeneralizedProxMatrix<Set>::setCurrentWeightsStrategy (TeProxMatrixWeightsStrategy* sw) 
+{	
+	if (sw == 0) 
+		return false; 
+	sw_ = sw; 
+	return true;
+}
+
+template<typename Set> bool 
+TeGeneralizedProxMatrix<Set>::setCurrentSlicingStrategy (TeProxMatrixSlicingStrategy* ss) 
+{
+	if (ss == 0) 
+		return false; 
+	ss_ = ss; 
+	return true;
+}
+
+template<typename Set> bool
+TeGeneralizedProxMatrix<Set>::constructMatrix ()
+{
+	if(!isValid())
+		return false;
+
+	//	ClearImplementation();
+	imp_ = 0;
+	imp_ = getImplementation();
+
+	if (sc_) 
+	{
+		if (sc_->Construct (imp_)) 
+		{
+			if (ss_) 
+				ss_->Slice (imp_);
+			if (sw_) 
+				sw_->ComputeWeigths (imp_); 
+			return true;
+		} 
+	}
+	imp_ = 0;
+	sc_ = 0;
+	ss_ = 0;
+	sw_ = 0;
+	return false;
+}
+
+
+template<typename Set> bool
+TeGeneralizedProxMatrix<Set>::clearImplementation ()
+{
+	TeProxMatrixImplementation* aux;
+	if (imp_ == 0)  
+		aux = getImplementation ();
+	else	
+		aux = getImplementation (imp_->type());
+
+	if (aux == 0) 
+		return false;
+	
+	delete imp_;
+	imp_ = aux;
+
+	return true;
+}
+
+template<typename Set> bool
+TeGeneralizedProxMatrix<Set>::recomputeWeights ()
+{
+	if (isValid()){
+		sw_->ComputeWeigths (imp_); return true;
+	} 
+	return false;
+}
+
+
+template<typename Set> bool
+TeGeneralizedProxMatrix<Set>::recomputeSlicing ()
+{
+	if (isValid()){
+		ss_->Slice (imp_); return true;
+	} 
+	return false;
+}
+
+
+template<typename Set> bool 
+TeGeneralizedProxMatrix<Set>::isConnected (const string& object_id1, const string& object_id2) 
+{
+	if (imp_ == 0) 
+		return false;  
+	return imp_->isConnected (object_id1, object_id2);
+}
+
+template<typename Set> bool 
+TeGeneralizedProxMatrix<Set>::connectObjects (const string& object_id1, const string& object_id2, const TeProxMatrixAttributes& attr)
+{
+	if (!imp_) 
+		getImplementation();  
+	imp_->connectObjects (object_id1, object_id2, attr);
+	return true;
+}
+
+template<typename Set> bool 
+TeGeneralizedProxMatrix<Set>::connectObjects (const string& object_id1, const string& object_id2)
+{
+	if (!imp_) 
+		getImplementation();  
+	TeProxMatrixAttributes attr;
+	imp_->connectObjects (object_id1, object_id2, attr);
+	return true;
+}
+
+template<typename Set> bool 
+TeGeneralizedProxMatrix<Set>::disconnectObjects (const string& object_id1, const string& object_id2)
+{
+	if (imp_ == 0) 
+		return false;  
+	return imp_->disconnectObjects (object_id1, object_id2);
+}
+
+template<typename Set> bool 
+TeGeneralizedProxMatrix<Set>::removeObject (const string& object_id)
+{
+	if (imp_ == 0) 
+		return false;  
+	return imp_->removeObject (object_id);
+}
+
+template<typename Set> bool 
+TeGeneralizedProxMatrix<Set>::getConnectionAttributes (const string& object_id1, string& object_id2, TeProxMatrixAttributes& attr)
+{
+	if (imp_ == 0) 
+		return false;
+	return imp_->getConnectionAttributes (object_id1, object_id2, attr); 
+}
+
+template<typename Set> int  
+TeGeneralizedProxMatrix<Set>::numberOfObjects () 
+{
+	if (imp_ == 0) 
+		return 0;  
+	return imp_->numberOfObjects ();
+}
+
+template<typename Set> bool 
+TeGeneralizedProxMatrix<Set>::saveTextFile (const string& name, map<string, string>* ids) 
+{	
+	if (imp_ == 0) 
+		return false;
+	return imp_->saveTextFile (name, ids); 
+}
+
+
+template<typename Set> bool 
+TeGeneralizedProxMatrix<Set>::saveGALFile (const string& name, map<string, string>* ids) 
+{	
+	if (imp_ == 0) 
+		return false;
+	return imp_->saveGALFile (name, ids); 
+}
+
+template<typename Set> bool 
+TeGeneralizedProxMatrix<Set>::saveGWTFile (const string& name, map<string, string>* ids) 
+{	
+	if (imp_ == 0) 
+		return false;
+	return imp_->saveGWTFile (name, ids); 
+}
+
+template<typename Set> bool 
+TeGeneralizedProxMatrix<Set>::saveTextFile (const string& name, vector<string>* ids) 
+{	
+	if (imp_ == 0) 
+		return false;
+	return imp_->saveTextFile (name, ids); 
+}
+
+
+template<typename Set> bool 
+TeGeneralizedProxMatrix<Set>::saveGALFile (const string& name, vector<string>* ids) 
+{	
+	if (imp_ == 0) 
+		return false;
+	return imp_->saveGALFile (name, ids); 
+}
+
+template<typename Set> bool 
+TeGeneralizedProxMatrix<Set>::saveGWTFile (const string& name, vector<string>* ids) 
+{	
+	if (imp_ == 0) 
+		return false;
+	return imp_->saveGWTFile (name, ids); 
+}
+
+
 #endif
diff --git a/src/terralib/kernel/TeGeoDataDriver.h b/src/terralib/kernel/TeGeoDataDriver.h
new file mode 100644
index 0000000..a264b71
--- /dev/null
+++ b/src/terralib/kernel/TeGeoDataDriver.h
@@ -0,0 +1,70 @@
+/************************************************************************************
+ TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/** \file TeGeoDataDriver.h
+    \brief This file contains contains the abstract definition of a driver to
+	geographical data files with vectorial representation.
+*/
+
+class TeProjection;
+class TeSTElementSet;
+
+#include <TeDataTypes.h>
+
+#include <string>
+
+//! Abstract definition of a driver to	geographical data files with vectorial representation
+class TeGeoDataDriver
+{
+public:
+
+	//! Destructor
+	virtual ~TeGeoDataDriver() {}
+
+	//! Returns the complete access path associated to this driver
+	virtual std::string getFileName() = 0;
+
+	//! Returns true or false whether the data file is accessible
+	virtual bool isDataAccessible() = 0;
+
+	//! Returns the spatial reference associated to the data as an instance of TeProjection 
+	virtual TeProjection* getDataProjection() = 0;
+
+	//! Loads the minimum metadata information about the data
+	/*
+		\param nObjects to return the number of objects accessible in the data set
+		\param ext	to return the spatial extension of the geometries in the data set
+		\param repres to return the type of geometries in the file
+		\return true if or false whether it can retrieve the information or not
+	*/
+	virtual bool getDataInfo(unsigned int& nObjects , TeBox& ext, TeGeomRep& repres) = 0;
+
+	//! Loads the list of descriptive attributes of the objetcts represented in the file
+	virtual bool getDataAttributesList(TeAttributeList& attList) = 0;
+
+	//! Loads the data into an TeSTElementSet structure in memory
+	/*
+		\param dataSet to return data set
+		\return true if or false whether it can retrieve the information or not
+	*/
+	virtual bool loadData(TeSTElementSet* dataSet) = 0;
+};
diff --git a/src/terralib/kernel/TeGeometricTransformation.cpp b/src/terralib/kernel/TeGeometricTransformation.cpp
new file mode 100755
index 0000000..84aaedc
--- /dev/null
+++ b/src/terralib/kernel/TeGeometricTransformation.cpp
@@ -0,0 +1,1217 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#include "TeGeometricTransformation.h"
+#include "TeMutex.h"
+#include "TeThreadFunctor.h"
+#include "TeUtils.h"
+#include "TeAgnostic.h"
+
+#include <math.h>
+#include <float.h>
+
+#include <map>
+#include <algorithm>
+
+
+TeGeometricTransformation::TeGeometricTransformation()
+{
+}
+
+
+TeGeometricTransformation::~TeGeometricTransformation()
+{
+}
+
+
+void TeGeometricTransformation::getParameters( TeGTParams& params ) const
+{
+  params = internal_params_;
+}
+
+
+bool TeGeometricTransformation::reset( const TeGTParams& newparams )
+{
+  /* If previous calculated parameters were supplied, no need to do calcules */
+
+  if( isTransDefined( newparams ) ) 
+  {
+    internal_params_ = newparams;
+    return true;
+  } else {
+    /* No previous parameters given - Need to calculate the new transformation
+       parameters */
+       
+    TEAGN_TRUE_OR_THROW( ( newparams.max_dmap_error_ >= 0 ),
+      "Invalid maximum allowed direct mapping error" );
+    TEAGN_TRUE_OR_THROW( ( newparams.max_imap_error_ >= 0 ),
+      "Invalid maximum allowed inverse mapping error" );
+       
+    const unsigned int req_tie_pts_nmb = getMinRequiredTiePoints();
+
+    if( newparams.tiepoints_.size() < req_tie_pts_nmb ) {
+      return false;
+    } else {
+      internal_params_ = newparams;
+      
+      switch( newparams.out_rem_strat_ ) {
+        case TeGTParams::NoOutRemotion :
+        {
+          if( computeParameters( internal_params_ ) ) {
+            
+            if( ( newparams.max_dmap_error_ >= 
+              getDirectMappingError( internal_params_ ) ) &&
+              ( newparams.max_imap_error_ >= 
+              getInverseMappingError( internal_params_ ) ) ) {
+              
+              return true;
+            }
+          }   
+        
+          break;
+        }
+        case TeGTParams::ExaustiveOutRemotion :
+        {
+          if( internal_params_.enable_multi_thread_ ) {
+            if( exaustiveOutRemotion( internal_params_,
+              TeGetPhysProcNumber() - 1 ) ) {
+              
+              return true;
+            }          
+          } else {
+            if( exaustiveOutRemotion( internal_params_, 0 ) ) {
+              return true;
+            }
+          }
+        
+          break;
+        }
+        case TeGTParams::LWAOutRemotion :
+        {
+          if( LWAOutRemotion( internal_params_ ) ) {
+            return true;
+          }
+                  
+          break;
+        }        
+        default : 
+        {
+          TEAGN_LOG_AND_THROW( 
+            "Invalid outliers remotion strategy" )
+          break;
+        }
+      
+      }
+    }
+  }
+  
+  internal_params_.reset();
+  
+  return false;
+}
+
+
+double TeGeometricTransformation::getDirectMappingError(  
+  const TeGTParams& params ) const
+{
+  TEAGN_DEBUG_CONDITION( isTransDefined( params ),
+    "Transformation not defined" )   
+    
+  unsigned int tiepoints_size = params.tiepoints_.size();
+  
+  double max_error = 0;
+  double current_error = 0;
+  
+  for( unsigned int tpindex = 0 ; tpindex < tiepoints_size ; ++tpindex ) {
+    current_error = getDirectMappingError( params.tiepoints_[ tpindex ], 
+      params );
+    
+    if( current_error > max_error ) {
+      max_error = current_error;
+    }
+  }
+  
+  return max_error;
+}
+
+
+double TeGeometricTransformation::getInverseMappingError(  
+  const TeGTParams& params ) const
+{
+  TEAGN_DEBUG_CONDITION( isTransDefined( params ),
+    "Transformation not defined" )  
+    
+  unsigned int tiepoints_size = params.tiepoints_.size();
+  
+  double max_error = 0;
+  double current_error = 0;
+  
+  for( unsigned int tpindex = 0 ; tpindex < tiepoints_size ; ++tpindex ) {
+    current_error = getInverseMappingError( params.tiepoints_[ tpindex ], 
+      params );
+    
+    if( current_error > max_error ) {
+      max_error = current_error;
+    }
+  }
+  
+  return max_error;
+}
+
+
+double TeGeometricTransformation::getDMapRMSE(  
+  const TeGTParams& params ) const
+{
+  TEAGN_DEBUG_CONDITION( isTransDefined( params ),
+    "Transformation not defined" )   
+    
+  unsigned int tiepoints_size = params.tiepoints_.size();
+  
+  if( tiepoints_size == 0 )
+  {
+    return 0;
+  }
+  else
+  {
+    double error2_sum = 0;
+    double current_error = 0;
+    
+    for( unsigned int tpindex = 0 ; tpindex < tiepoints_size ; ++tpindex ) {
+      current_error = getDirectMappingError( params.tiepoints_[ tpindex ], 
+        params );
+        
+      error2_sum += ( current_error * current_error );
+    }
+    
+    return sqrt( error2_sum / ( (double)tiepoints_size ) );
+  }
+}
+
+
+double TeGeometricTransformation::getIMapRMSE(  
+  const TeGTParams& params ) const
+{
+  TEAGN_DEBUG_CONDITION( isTransDefined( params ),
+    "Transformation not defined" )   
+    
+  unsigned int tiepoints_size = params.tiepoints_.size();
+  
+  if( tiepoints_size == 0 )
+  {
+    return 0;
+  }
+  else
+  {
+    double error2_sum = 0;
+    double current_error = 0;
+    
+    for( unsigned int tpindex = 0 ; tpindex < tiepoints_size ; ++tpindex ) {
+      current_error = getInverseMappingError( params.tiepoints_[ tpindex ], 
+        params );
+        
+      error2_sum += ( current_error * current_error );
+    }
+    
+    return sqrt( error2_sum / ( (double)tiepoints_size ) );
+  }  
+}
+
+
+double TeGeometricTransformation::getDirectMappingError( 
+  const TeCoordPair& tie_point, const TeGTParams& params ) const
+{
+  TEAGN_DEBUG_CONDITION( isTransDefined( params ),
+    "Transformation not defined" )   
+    
+  TeCoord2D direct_mapped_point;
+
+  directMap( params, tie_point.pt1, direct_mapped_point );
+    
+  double diff_x = tie_point.pt2.x() - direct_mapped_point.x();
+  double diff_y = tie_point.pt2.y() - direct_mapped_point.y();
+    
+  return hypot( diff_x, diff_y );
+}
+
+
+double TeGeometricTransformation::getInverseMappingError( 
+  const TeCoordPair& tie_point, const TeGTParams& params ) const
+{
+  TEAGN_DEBUG_CONDITION( isTransDefined( params ),
+    "Transformation not defined" )   
+    
+  TeCoord2D inverse_mapped_point;
+
+  inverseMap( params, tie_point.pt2, inverse_mapped_point );
+    
+  double diff_x = tie_point.pt1.x() - inverse_mapped_point.x();
+  double diff_y = tie_point.pt1.y() - inverse_mapped_point.y();
+    
+  return hypot( diff_x, diff_y );
+}
+
+
+bool TeGeometricTransformation::recombineSeed( std::vector<unsigned int>& seed, 
+  const unsigned int& seedpos, const unsigned int& elements_nmb )
+{
+  unsigned int seed_size = seed.size();
+  
+  if( seedpos >= seed_size ) {
+    return false;
+  }
+
+  if( seed[ seedpos ]  >= ( elements_nmb - seed_size + seedpos + 1 ) ) {
+    if( seedpos == seed_size - 1 ) {
+      return false;
+    } else if( seedpos == 0 ) {
+      return recombineSeed( seed, seedpos + 1, elements_nmb ) ;
+    } else {
+      return recombineSeed( seed, seedpos + 1, elements_nmb ) ;
+    };
+  } else if( seed[ seedpos ]  == 0 ) {
+    if( seedpos == 0 ) {
+      seed[ seedpos ] = 1 ;
+      return recombineSeed( seed, seedpos + 1, elements_nmb );
+    } else if( seedpos == seed_size - 1 ) {
+      seed[ seedpos ] = seed[ seedpos - 1 ] + 1;
+      return true;
+    } else {
+      seed[ seedpos ] = seed[ seedpos - 1 ] + 1;
+      seed[ seedpos + 1 ] = 0;
+      return recombineSeed( seed, seedpos + 1, elements_nmb );
+    }
+  } else {
+    if( seedpos == seed_size - 1 ) {
+      seed[ seedpos ] = seed[ seedpos ] + 1;
+      return true;
+    } else if( seedpos == 0 ) {
+      if( recombineSeed( seed, seedpos + 1, elements_nmb ) ) {
+        return true;
+      } else {
+        seed[ seedpos ] = seed[ seedpos ] + 1;
+        seed[ seedpos + 1 ] = 0;
+        return recombineSeed( seed, seedpos + 1, elements_nmb );
+      }
+    } else {
+      if( recombineSeed( seed, seedpos + 1, elements_nmb ) ) {
+        return true;
+      } else {
+        seed[ seedpos ] = seed[ seedpos ] + 1;
+        seed[ seedpos + 1 ] = 0;
+        return recombineSeed( seed, seedpos + 1, elements_nmb );
+      }
+    }
+  }
+}
+
+
+TeGeometricTransformation* TeGeometricTransformation::DefaultObject( 
+  const TeGTParams& )
+{ 
+  TEAGN_LOG_AND_THROW( "Trying to create an invalid "
+    "TeGemetricTransformation instance" );
+  
+  return 0;
+}; 
+
+
+bool TeGeometricTransformation::exaustiveOutRemotion( 
+  TeGTParams& params, unsigned int threads_nmb )
+{
+  TEAGN_DEBUG_CONDITION( ( params.out_rem_strat_ == 
+    TeGTParams::ExaustiveOutRemotion ), 
+    "Inconsistent outliers remotion strategy" )
+
+  /* Initiating seed */
+  
+  std::vector<unsigned int> comb_seed_vec;       
+    
+  unsigned int req_tie_pts_nmb = getMinRequiredTiePoints();
+  
+  for( unsigned int comb_seed_vec_index = 0 ; 
+    comb_seed_vec_index < req_tie_pts_nmb ;
+    ++comb_seed_vec_index ) {
+    
+    comb_seed_vec.push_back( 0 );
+  }
+  
+  /* initializing mutexes */
+  
+  TeMutex comb_seed_vec_mutex;
+  TeMutex trans_params_mutex;
+  
+  /* Initializing threads */
+  
+  TeGTParams best_trans_params;
+  double best_trans_dmap_error = DBL_MAX;
+  double best_trans_imap_error = DBL_MAX;
+  
+  std::vector< TeThreadFunctor::pointer > threads_vector;
+  
+  TeThreadParameters thread_params;
+  
+  thread_params.store( "req_tie_pts_nmb", req_tie_pts_nmb );  
+  thread_params.store( "init_trans_params_ptr", 
+    (TeGTParams const*)(&params) );
+  thread_params.store( "best_trans_params_ptr", 
+    &best_trans_params );    
+  thread_params.store( "best_trans_dmap_error_ptr", 
+    &best_trans_dmap_error );      
+  thread_params.store( "best_trans_imap_error_ptr", 
+    &best_trans_imap_error );     
+  thread_params.store( "comb_seed_vec_ptr", &comb_seed_vec );
+  thread_params.store( "trans_params_mutex_ptr", 
+    &trans_params_mutex );
+  thread_params.store( "comb_seed_vec_mutex_ptr", 
+    &comb_seed_vec_mutex );  
+  thread_params.store( "geo_trans_ptr", 
+    (TeGeometricTransformation const*)this );        
+    
+  unsigned int thread_index = 0;
+  
+  for( thread_index = 0 ; thread_index < threads_nmb ; 
+    ++thread_index ) {
+    
+    TeThreadFunctor::pointer aux_thread_ptr( 
+      new TeThreadFunctor );
+    aux_thread_ptr->setStartFunctPtr( eORThreadEntry );
+    aux_thread_ptr->setParameters( thread_params );
+    aux_thread_ptr->start();
+  
+    threads_vector.push_back( aux_thread_ptr );
+  }
+  
+  bool my_return = eORThreadEntry( thread_params );
+  bool threads_return = true;
+  
+  for( thread_index = 0 ; thread_index < threads_nmb ; 
+    ++thread_index ) {
+    
+    threads_vector[ thread_index ]->waitToFinish();
+    
+    threads_return = threads_return & 
+      threads_vector[ thread_index ]->getReturnValue();
+  }  
+  
+  if( my_return & threads_return ) {
+    if( best_trans_params.tiepoints_.size() >= req_tie_pts_nmb ) {
+      params = best_trans_params;
+      
+      return true;
+    } else {
+      return false;
+    }
+  } else {
+    return false;
+  }
+}
+
+
+bool TeGeometricTransformation::eORThreadEntry( 
+  const TeThreadParameters& params )
+{
+  /* Extracting parameters */
+  
+  unsigned int req_tie_pts_nmb = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "req_tie_pts_nmb",
+    req_tie_pts_nmb ), "Missing parameter" );
+    
+  TeGTParams const* init_trans_params_ptr = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "init_trans_params_ptr",
+    init_trans_params_ptr ), "Missing parameter" );
+  
+  TeGTParams* best_trans_params_ptr = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "best_trans_params_ptr",
+    best_trans_params_ptr ), "Missing parameter" );   
+    
+  double* best_trans_dmap_error_ptr = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "best_trans_dmap_error_ptr",
+    best_trans_dmap_error_ptr ), "Missing parameter" );     
+    
+  double* best_trans_imap_error_ptr = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "best_trans_imap_error_ptr",
+    best_trans_imap_error_ptr ), "Missing parameter" );     
+
+  std::vector<unsigned int>* comb_seed_vec_ptr = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "comb_seed_vec_ptr",
+    comb_seed_vec_ptr ), "Missing parameter" );
+    
+  TeMutex* trans_params_mutex_ptr = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "trans_params_mutex_ptr",
+    trans_params_mutex_ptr ), "Missing parameter" ); 
+
+  TeMutex* comb_seed_vec_mutex_ptr = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "comb_seed_vec_mutex_ptr",
+    comb_seed_vec_mutex_ptr ), "Missing parameter" );  
+    
+  TeGeometricTransformation const* geo_trans_ptr = 0;
+  TEAGN_TRUE_OR_THROW( params.retrive( "geo_trans_ptr",
+    geo_trans_ptr ), "Missing parameter" ); 
+  
+  /* Optimized local variables based on the input parameters */
+  
+  std::vector<unsigned int>& comb_seed_vec =
+    (*comb_seed_vec_ptr);  
+    
+  TeMutex& comb_seed_vec_mutex = (*comb_seed_vec_mutex_ptr); 
+  
+  const TeGeometricTransformation& geo_trans = (*geo_trans_ptr); 
+  
+  /* Copying some parameters to local variables to avoid
+     mutex overhead */
+     
+  trans_params_mutex_ptr->lock();
+     
+  const TeGTParams initial_trans_params = (*init_trans_params_ptr);     
+  const unsigned int initial_tiepoints_size = 
+    initial_trans_params.tiepoints_.size();   
+  
+  trans_params_mutex_ptr->unLock();
+        
+  /* Trying to find the best tie-points by building 
+    the transformation with the highest number of
+    tie-points, but with an acceptable mapping error */
+    
+  TeGTParams local_best_params;
+  double local_best_params_dmap_error = DBL_MAX;
+  double local_best_params_imap_error = DBL_MAX;
+  
+  TeGTParams curr_params = initial_trans_params;
+  double curr_params_dmap_error = DBL_MAX;
+  double curr_params_imap_error = DBL_MAX; 
+  
+  TeGTParams cp_plus_new_point;
+  double cp_plus_new_point_dmap_error = DBL_MAX;
+  double cp_plus_new_point_imap_error = DBL_MAX;
+  
+  unsigned int tiepoints_index = 0;
+  bool point_already_present = false;
+  bool seed_recombined = true;
+  unsigned int comb_seed_vec_index_2 = 0;
+  unsigned int comb_seed_vec_index_3 = 0;
+  
+  while( seed_recombined ) {
+    /* trying to recombine seed */
+    
+    comb_seed_vec_mutex.lock();
+    seed_recombined = recombineSeed( comb_seed_vec, 0, 
+      initial_tiepoints_size );
+    comb_seed_vec_mutex.unLock();
+      
+    if( seed_recombined ) {
+      /* Extracting tie-points from the original vector */
+      
+      curr_params.tiepoints_.clear();
+      
+      for( comb_seed_vec_index_2 = 0 ; 
+        comb_seed_vec_index_2 < req_tie_pts_nmb ;
+        ++comb_seed_vec_index_2 ) {
+        
+        curr_params.tiepoints_.push_back( 
+          initial_trans_params.tiepoints_[ comb_seed_vec[ 
+          comb_seed_vec_index_2 ] - 1 ] );
+      }
+      
+      /* Trying to generate a valid transformation */
+      
+      if( geo_trans.computeParameters( curr_params ) ) {
+        curr_params_dmap_error = geo_trans.getDirectMappingError( 
+          curr_params );
+        curr_params_imap_error = geo_trans.getInverseMappingError( 
+          curr_params );
+      
+        if( ( initial_trans_params.max_dmap_error_ >= 
+          curr_params_dmap_error ) &&
+          ( initial_trans_params.max_imap_error_ >= 
+          curr_params_imap_error ) ) {
+        
+          /* Trying to insert more tie-points into current 
+              transformation */
+          
+          for( tiepoints_index = 0 ; tiepoints_index < 
+            initial_tiepoints_size ; ++tiepoints_index ) {
+            
+            /* Verifying if the current tie-point is already 
+               present */
+            
+            point_already_present = false;
+            
+            for( comb_seed_vec_index_3 = 0 ; 
+              comb_seed_vec_index_3 < req_tie_pts_nmb ;
+              ++comb_seed_vec_index_3 ) {
+            
+              if( tiepoints_index == ( 
+                comb_seed_vec[ comb_seed_vec_index_3 ] - 1 ) ) {
+              
+                point_already_present = true;
+                break;
+              }
+            }
+            
+            if( ! point_already_present ) {
+              cp_plus_new_point = curr_params;
+              
+              cp_plus_new_point.tiepoints_.push_back( 
+                initial_trans_params.tiepoints_[ tiepoints_index ] );
+              
+              /* Verifying if the new tie-point insertion does 
+                not generate an invalid transformation */
+              
+              if( geo_trans.computeParameters( cp_plus_new_point ) ) {
+                cp_plus_new_point_dmap_error =
+                  geo_trans.getDirectMappingError( cp_plus_new_point );
+                cp_plus_new_point_imap_error =
+                  geo_trans.getInverseMappingError( cp_plus_new_point );
+                  
+                if( ( cp_plus_new_point_dmap_error <=
+                  initial_trans_params.max_dmap_error_ ) &&
+                  ( cp_plus_new_point_imap_error <=
+                  initial_trans_params.max_imap_error_ ) ) {
+                  
+                  curr_params = cp_plus_new_point;
+                  curr_params_dmap_error = 
+                    cp_plus_new_point_dmap_error;
+                  curr_params_imap_error =
+                    cp_plus_new_point_imap_error;  
+                }
+              }
+            }
+          }
+          
+          /* A valid transformation was generated, now 
+            verifying 
+            if the number of tie-poits is greater then the current 
+            thread local best transformation.
+          */            
+          
+          if( curr_params.tiepoints_.size() >= 
+            local_best_params.tiepoints_.size() ) {
+            
+            if( ( curr_params_dmap_error < 
+              local_best_params_dmap_error ) &&
+              ( curr_params_imap_error <
+                local_best_params_imap_error ) ) {
+            
+              local_best_params = curr_params;
+              local_best_params_dmap_error = curr_params_dmap_error;
+              local_best_params_imap_error = curr_params_imap_error;
+            }
+          }           
+        }
+      } //if( geo_trans.computeParameters( curr_params ) )
+    } //if( seed_recombined )
+  } //while( seed_recombined )
+  
+  /* A valid local thread transformation was generated, now 
+    verifying 
+    if the error is smaller then the current 
+    global transformation.
+  */
+
+  if( local_best_params.tiepoints_.size() >= req_tie_pts_nmb ) {
+    trans_params_mutex_ptr->lock();
+    
+    if( local_best_params.tiepoints_.size() >=
+      best_trans_params_ptr->tiepoints_.size() ) {
+      
+      if( ( local_best_params_dmap_error < 
+        (*best_trans_dmap_error_ptr) ) &&
+        ( local_best_params_imap_error < 
+        (*best_trans_imap_error_ptr) ) ) {
+      
+        (*best_trans_params_ptr) = local_best_params;
+        (*best_trans_dmap_error_ptr) = local_best_params_dmap_error;
+        (*best_trans_imap_error_ptr) = local_best_params_imap_error;       
+      }      
+    }
+    
+    trans_params_mutex_ptr->unLock();
+  }
+  
+  return true;
+}
+
+
+bool TeGeometricTransformation::LWAOutRemotion( 
+  TeGTParams& external_params )
+{
+  TEAGN_DEBUG_CONDITION( ( external_params.out_rem_strat_ == 
+    TeGTParams::LWAOutRemotion ), 
+    "Inconsistent outliers remotion strategy" )
+    
+  const unsigned int req_tie_pts_nmb = getMinRequiredTiePoints();
+  
+  if( external_params.tiepoints_.size() == req_tie_pts_nmb ) {
+    return computeParameters( external_params );
+  } else if( external_params.tiepoints_.size() > req_tie_pts_nmb ) {
+    /* Global vars */
+    
+    const double max_dmap_error = 
+      external_params.max_dmap_error_;
+    const double max_imap_error = 
+      external_params.max_imap_error_;
+    const double max_dmap_rmse = 
+      external_params.max_dmap_rmse_;
+    const double max_imap_rmse = 
+      external_params.max_imap_rmse_;
+          
+    /* Computing the initial global transformation */
+    
+    if( ! computeParameters( external_params ) ) {
+      return false;
+    }    
+    
+    if( ( getDirectMappingError( external_params ) 
+      <= max_dmap_error ) && 
+      ( getInverseMappingError( external_params ) 
+      <= max_imap_error ) &&
+      ( getDMapRMSE( external_params ) 
+      <= max_dmap_rmse ) && 
+      ( getIMapRMSE( external_params ) 
+      <= max_imap_rmse ) ) {
+    
+      /* This transformation has no outliers */
+      
+      return true;
+    }    
+    
+    /* Iterating over the current transformation tie-points */
+    
+    TeGTParams best_params;
+    double best_params_dmap_rmse = DBL_MAX;
+    double best_params_imap_rmse = DBL_MAX;
+    double best_params_dmap_error = DBL_MAX;
+    double best_params_imap_error = DBL_MAX;
+    
+    bool transformation_not_updated = false;
+    unsigned int iterations_remainning = (unsigned int)
+      external_params.tiepoints_.size();
+    std::vector< TPDataNode > norm_err_vec;     
+    std::list< ExcTPDataNode > exc_tp_list;
+    TeGTParams iteration_params = external_params;
+  
+    while( ( iteration_params.tiepoints_.size() > 
+      req_tie_pts_nmb ) && iterations_remainning )
+    {
+      unsigned int iter_tps_nmb = (unsigned int)
+        iteration_params.tiepoints_.size();
+      transformation_not_updated = true;
+      
+      /* Updating the normalized error map */
+      
+      updateTPErrVec( iteration_params, norm_err_vec );
+      
+      /* Generating all possible transformations without 
+         each tie-point, starting with the worse point */
+      
+      for( int norm_err_vec_idx = ((int)norm_err_vec.size()) - 1 ;
+        ( norm_err_vec_idx > ( -1 ) ) ; --norm_err_vec_idx )
+      {
+        const unsigned int& cur_candtp_idx = 
+          norm_err_vec[ norm_err_vec_idx ].tpindex_;
+          
+        TEAGN_DEBUG_CONDITION( ( cur_candtp_idx < 
+          iteration_params.tiepoints_.size() ), "Invalid index" )
+
+        /* Generating a transformation parameters without the
+          current tie-point (bigger error)*/
+            
+        TeGTParams new_iteration_params = iteration_params;
+        new_iteration_params.tiepoints_.clear();
+        new_iteration_params.direct_parameters_.Clear();
+        new_iteration_params.inverse_parameters_.Clear();
+            
+        for( unsigned int tpindex2 = 0 ; tpindex2 < iter_tps_nmb ; 
+          ++tpindex2 ) 
+        {
+          if( cur_candtp_idx != tpindex2 ) {
+            new_iteration_params.tiepoints_.push_back( 
+              iteration_params.tiepoints_[ tpindex2 ] );
+          }
+        }            
+      
+        /* Trying to generate a transformation without the current
+            candidate tie-point for exclusion */      
+        
+        if( computeParameters( new_iteration_params ) ) 
+        {
+          double new_it_dmap_rmse = 
+            getDMapRMSE( new_iteration_params );
+          double new_it_imap_rmse = 
+            getIMapRMSE( new_iteration_params );
+          
+          if( ( best_params_dmap_rmse > new_it_dmap_rmse ) && 
+            ( best_params_imap_rmse > new_it_imap_rmse ) ) 
+          {
+            double new_it_dmap_error = 
+              getDirectMappingError( new_iteration_params );
+            double new_it_imap_error = 
+              getInverseMappingError( new_iteration_params );
+                        
+            TeCoordPair excluded_tp = 
+              iteration_params.tiepoints_[ cur_candtp_idx ];
+              
+            /* Trying to insert back other tie-points excluded
+               before */
+            
+            if( exc_tp_list.size() > 0 )
+            {
+              /* Updating the excluded tie points errors map */
+              
+              updateExcTPErrList( new_iteration_params, 
+                exc_tp_list );
+                
+              /* Iterating over the excluded tps */
+              
+              std::list< ExcTPDataNode >::iterator 
+                exc_tps_list_it = exc_tp_list.begin();
+              std::list< ExcTPDataNode >::iterator 
+                exc_tps_list_it_end = exc_tp_list.end();
+                
+              while( exc_tps_list_it != exc_tps_list_it_end )
+              {
+                const ExcTPDataNode& curr_exc_tp_data = 
+                  *exc_tps_list_it;
+
+                /* Does this tp has direct and inverse errors 
+                   smaller than the current new_iteration_params ?? */
+                        
+                if( ( curr_exc_tp_data.dmap_error_ <= 
+                  new_it_dmap_error ) && 
+                  ( curr_exc_tp_data.imap_error_ <= 
+                  new_it_imap_error ) )
+                {
+                  /* Trying to generate a trasformation with
+                     this point */
+                     
+                  TeGTParams new_iteration_params_plus1tp = 
+                    new_iteration_params;
+                  new_iteration_params.tiepoints_.push_back(
+                    curr_exc_tp_data.tp_ );
+                    
+                  if( computeParameters( 
+                    new_iteration_params_plus1tp ) ) 
+                  {
+                    double newp1tp_dmap_rmse = getDMapRMSE( 
+                      new_iteration_params_plus1tp );
+                    double newp1tp_imap_rmse = getIMapRMSE( 
+                      new_iteration_params_plus1tp );
+                    
+                    if( ( new_it_dmap_rmse >= newp1tp_dmap_rmse ) && 
+                      ( new_it_imap_rmse >= newp1tp_imap_rmse ) ) 
+                    {
+                      new_iteration_params = 
+                        new_iteration_params_plus1tp;
+                      new_it_dmap_error = getDirectMappingError( 
+                        new_iteration_params_plus1tp );
+                      new_it_imap_error = getInverseMappingError( 
+                        new_iteration_params_plus1tp ); 
+                      new_it_dmap_rmse = newp1tp_dmap_rmse;
+                      new_it_imap_rmse = newp1tp_imap_rmse;
+                        
+                      exc_tp_list.erase( exc_tps_list_it );
+                        
+                      updateExcTPErrList( new_iteration_params, 
+                        exc_tp_list );   
+                        
+                      exc_tps_list_it = exc_tp_list.begin();
+                      exc_tps_list_it_end = exc_tp_list.end();                    
+                    }
+                    else
+                    {
+                      ++exc_tps_list_it;
+                    }
+                  } 
+                  else
+                  {
+                    ++exc_tps_list_it;
+                  }                   
+                }
+                else
+                {  
+                  ++exc_tps_list_it;
+                }
+              }
+            }
+            
+            /* Updating the best transformation parameters */
+            
+            best_params_dmap_error = new_it_dmap_error;
+            best_params_imap_error = new_it_imap_error;
+            best_params_dmap_rmse = new_it_dmap_rmse;
+            best_params_imap_rmse = new_it_imap_rmse;
+            best_params = new_iteration_params;
+            
+            /* Updating the next iteration parameters */
+            
+            iteration_params = new_iteration_params;
+            
+            transformation_not_updated = false;
+            
+            /* Putting the excluded tie-point into the 
+               excluded tie-points map */
+               
+            ExcTPDataNode exctpdata;
+            exctpdata.tp_ = excluded_tp;
+            exc_tp_list.push_back( exctpdata );
+            
+            /* break the current tie-points loop */
+            
+            break;
+          } //if( ( best_params_dmap_error > new_it_dmap_error ) && 
+        } //if( computeParameters( new_iteration_params ) ) {    
+      }
+      
+      if( transformation_not_updated ) {
+        /* There is no way to improve the current transformation
+           since all tie-points were tested */
+        
+        break; /* break the iterations loop */
+      } else {
+        if( ( max_dmap_error >= best_params_dmap_error ) && 
+            ( max_imap_error >= best_params_imap_error ) &&
+            ( max_dmap_rmse >= best_params_dmap_rmse ) && 
+            ( max_imap_rmse >= best_params_imap_rmse ) ) {
+            
+          /* A valid transformation was found */
+          break;
+        }
+      }
+      
+      --iterations_remainning;
+    }//while( params.tiepoints_.size() > req_tie_pts_nmb ) {
+    
+    if( ( best_params.tiepoints_.size() >= req_tie_pts_nmb ) &&
+        ( max_dmap_error >= best_params_dmap_error ) && 
+        ( max_imap_error >= best_params_imap_error ) &&
+        ( max_dmap_rmse >= best_params_dmap_rmse ) && 
+        ( max_imap_rmse >= best_params_imap_rmse ) ) {
+        
+      external_params = best_params;
+      
+      return true;
+    } else {
+      return false;
+    }    
+  }
+  
+  return false;
+}
+
+
+void TeGeometricTransformation::updateExcTPErrList( 
+  const TeGTParams& params,
+  std::list< ExcTPDataNode >& exc_tp_list )
+  const
+{
+  if( exc_tp_list.size() > 0 )
+  {
+    /* Updating the new direct and inverse mapping errors */
+     
+    std::list< ExcTPDataNode >::iterator tp_list_it = 
+      exc_tp_list.begin();
+    std::list< ExcTPDataNode >::iterator tp_list_it_end = 
+      exc_tp_list.end();
+      
+    double dmap_err_min =  DBL_MAX;
+    double dmap_err_max =  (-1.0) * DBL_MAX;
+    double imap_err_min =  DBL_MAX;  
+    double imap_err_max =  (-1.0) * DBL_MAX;
+    
+    while( tp_list_it != tp_list_it_end )
+    {
+      ExcTPDataNode& curr_node = *tp_list_it;
+      
+      const TeCoordPair& cur_ex_tp = curr_node.tp_;
+      
+      curr_node.dmap_error_ = getDirectMappingError( cur_ex_tp, 
+        params );
+      curr_node.imap_error_ = getInverseMappingError( cur_ex_tp, 
+        params );        
+        
+      if( dmap_err_min > curr_node.dmap_error_ ) {
+        dmap_err_min = curr_node.dmap_error_;
+      }
+      if( dmap_err_max < curr_node.dmap_error_ ) {
+        dmap_err_max = curr_node.dmap_error_;
+      }        
+        
+      if( imap_err_min > curr_node.imap_error_ ) {
+        imap_err_min = curr_node.imap_error_;
+      }
+      if( imap_err_max < curr_node.imap_error_ ) {
+        imap_err_max = curr_node.imap_error_;
+      }            
+      
+      ++tp_list_it;
+    }
+    
+    double dmap_err_range = dmap_err_max - dmap_err_min;
+    double imap_err_range = imap_err_max - imap_err_min;
+    
+    /* Updating the normalized error */
+    
+    tp_list_it = exc_tp_list.begin();
+    
+    if( ( dmap_err_range == 0.0 ) &&
+      ( imap_err_range == 0.0 ) )
+    {
+      while( tp_list_it != tp_list_it_end )
+      {
+        tp_list_it->norm_error_ = 0.0;
+        
+        ++tp_list_it;
+      }
+    }
+    else if( dmap_err_range == 0.0 ) 
+    {
+      while( tp_list_it != tp_list_it_end )
+      {
+        tp_list_it->norm_error_ =
+          ( 
+            ( 
+              (  
+                tp_list_it->imap_error_ - imap_err_min              
+              ) 
+              / imap_err_range 
+            ) 
+          );
+        
+        ++tp_list_it;
+      }
+    }
+    else if( imap_err_range == 0.0 ) 
+    {
+      while( tp_list_it != tp_list_it_end )
+      {
+        tp_list_it->norm_error_ =
+          ( 
+            ( 
+              ( 
+                tp_list_it->dmap_error_ - dmap_err_min
+              ) 
+              / dmap_err_range 
+            ) 
+          );
+        
+        ++tp_list_it;
+      }
+    }
+    else
+    {
+      while( tp_list_it != tp_list_it_end )
+      {
+        tp_list_it->norm_error_ =
+          ( 
+            ( 
+              ( 
+                tp_list_it->dmap_error_ - dmap_err_min
+              ) 
+              / dmap_err_range 
+            ) 
+            + 
+            ( 
+              (  
+                tp_list_it->imap_error_ - imap_err_min              
+              ) 
+              / imap_err_range 
+            ) 
+          );
+        
+        ++tp_list_it;
+      }
+    }
+    
+    /* Sorting list */
+    
+    exc_tp_list.sort();
+    
+    /* printing */
+/*   
+    tp_list_it = exc_tp_list.begin();
+    tp_list_it_end = exc_tp_list.end();
+    std::cout << std::endl << "Excluded Tie points" << std::endl;
+    while( tp_list_it != tp_list_it_end )
+    {
+      const ExcTPDataNode& node = *tp_list_it;
+      
+      std::cout << node.norm_error_ << " " <<
+       " [" + Te2String( node.tp_.pt1.x(),2 ) + "," +
+       Te2String( node.tp_.pt1.y(),2 ) + "-" +
+       Te2String( node.tp_.pt2.x(),2 ) + "," +
+       Te2String( node.tp_.pt2.y(),2 ) + "]"
+       << std::endl;      
+      
+      ++tp_list_it;
+    }    
+    std::cout << std::endl;
+*/  
+  }
+}
+
+
+void TeGeometricTransformation::updateTPErrVec( 
+  const TeGTParams& params, 
+  std::vector< TPDataNode >& errvec ) const
+{
+  /* Calculating the two mapping errors */
+  
+  const unsigned int iter_tps_nmb = (unsigned int)
+    params.tiepoints_.size();  
+    
+  errvec.clear();
+
+  double dmap_err_vec_min = DBL_MAX;
+  double dmap_err_vec_max = ( -1.0 ) * DBL_MAX;
+  double imap_err_vec_min = DBL_MAX;
+  double imap_err_vec_max = ( -1.0 ) * DBL_MAX;      
+  TPDataNode dummy_struct;
+  dummy_struct.norm_error_ = 0.0;
+  
+  for( unsigned int par_tps_vec_idx = 0 ; par_tps_vec_idx < iter_tps_nmb ; 
+    ++par_tps_vec_idx ) 
+  {
+    const TeCoordPair& cur_tp = params.tiepoints_[ 
+      par_tps_vec_idx ];
+      
+    dummy_struct.tpindex_ = par_tps_vec_idx;
+    dummy_struct.dmap_error_ = getDirectMappingError( cur_tp, 
+      params );
+    dummy_struct.imap_error_ = getInverseMappingError( cur_tp, 
+      params );
+    
+    errvec.push_back( dummy_struct );
+    
+    if( dmap_err_vec_min > dummy_struct.dmap_error_ ) {
+      dmap_err_vec_min = dummy_struct.dmap_error_;
+    }
+    if( dmap_err_vec_max < dummy_struct.dmap_error_ ) {
+      dmap_err_vec_max = dummy_struct.dmap_error_;
+    }        
+    
+    if( imap_err_vec_min > dummy_struct.imap_error_ ) {
+      imap_err_vec_min = dummy_struct.imap_error_;
+    }
+    if( imap_err_vec_max < dummy_struct.imap_error_ ) {
+      imap_err_vec_max = dummy_struct.imap_error_;
+    }            
+  }
+  
+  double dmap_err_vec_range = 
+    dmap_err_vec_max - dmap_err_vec_min;
+  double imap_err_vec_range = 
+    imap_err_vec_max - imap_err_vec_min;
+  
+  if( ( dmap_err_vec_range != 0.0 ) ||
+    ( imap_err_vec_range != 0.0 ) )
+  {
+    /* Updating normalized mapping errors */
+    
+    if( dmap_err_vec_range == 0.0 )
+    {
+      for( unsigned int errvec_idx = 0 ; errvec_idx < iter_tps_nmb ; 
+        ++errvec_idx ) 
+      {
+        TPDataNode& curr_elem = errvec[ errvec_idx ];
+        
+        curr_elem.norm_error_ = 
+          ( 
+            (  
+              curr_elem.imap_error_ - 
+              imap_err_vec_min              
+            ) 
+            / imap_err_vec_range 
+          );
+      }
+    }
+    else if( imap_err_vec_range == 0.0 )
+    {
+      for( unsigned int errvec_idx = 0 ; errvec_idx < iter_tps_nmb ; 
+        ++errvec_idx ) 
+      {
+        TPDataNode& curr_elem = errvec[ errvec_idx ];
+        
+        curr_elem.norm_error_ = 
+          ( 
+            ( 
+              curr_elem.dmap_error_ - 
+              dmap_err_vec_min
+            ) 
+            / dmap_err_vec_range 
+          );
+      }
+    }
+    else
+    {
+      for( unsigned int errvec_idx = 0 ; errvec_idx < iter_tps_nmb ; 
+        ++errvec_idx ) 
+      {
+        TPDataNode& curr_elem = errvec[ errvec_idx ];
+        
+        curr_elem.norm_error_ = 
+          ( 
+            ( 
+              curr_elem.dmap_error_ - 
+              dmap_err_vec_min
+            ) 
+            / dmap_err_vec_range 
+          ) 
+          + 
+          ( 
+            (  
+              curr_elem.imap_error_ - 
+              imap_err_vec_min              
+            ) 
+            / imap_err_vec_range 
+          );
+      }
+    }
+    
+    /* Sorting */
+    
+    sort( errvec.begin(), errvec.end() );
+
+    /* printing */
+/*  
+    std::cout << std::endl << "Tie points" << std::endl;
+    for( unsigned int errvec_idx = 0 ; errvec_idx < iter_tps_nmb ; 
+      ++errvec_idx ) 
+    {
+      const unsigned int& tp_pars_vec_idx = errvec[ errvec_idx ].tpindex_;
+      const TeCoordPair& currtp = params.tiepoints_[ 
+      tp_pars_vec_idx ];
+      
+      std::cout << errvec[ errvec_idx ].norm_error_ << " " <<
+       " [" + Te2String( currtp.pt1.x(),2 ) + "," +
+       Te2String( currtp.pt1.y(),2 ) + "-" +
+       Te2String( currtp.pt2.x(),2 ) + "," +
+       Te2String( currtp.pt2.y(),2 ) + "]"
+       << std::endl;
+    }    
+*/    
+  }
+  
+  
+}
+
diff --git a/src/terralib/kernel/TeGeometricTransformation.h b/src/terralib/kernel/TeGeometricTransformation.h
new file mode 100755
index 0000000..9c1201d
--- /dev/null
+++ b/src/terralib/kernel/TeGeometricTransformation.h
@@ -0,0 +1,486 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeGeometricTransformation.h
+   \brief Geometric trasformations base class.
+*/
+
+#ifndef TEGEOMETRICTRANSFORMATION_H
+  #define TEGEOMETRICTRANSFORMATION_H
+  
+  #include "TeDefines.h"
+  #include "TeCoord2D.h"
+  #include "TeMatrix.h"
+  #include "TeGTParams.h"
+  #include "TeSharedPtr.h"
+  #include "TeAgnostic.h"
+  #include "TeThreadParameters.h"
+  
+  #include <vector>
+  #include <list>
+  
+  /**
+   * @brief This is the base class to deal with a geometric trasformation
+   * direct and inverse mapping the tie-points TeCoordPair::pt1 space into 
+   * TeCoordPair::pt2 space.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup Utils
+   */
+  class TL_DLL TeGeometricTransformation {
+    private :
+    
+      /**
+       * @brief The current internal parameters.
+       */
+      TeGTParams internal_params_;
+          
+    protected :
+    
+      /**
+       * @brief Verifies if the supplied parameters already
+       * has a defined transformation.
+       * @param params Transformation parameters.
+       * @return true if a transformation is already defined, 
+       * false otherwise.
+       */       
+      virtual bool isTransDefined( const TeGTParams& params ) 
+        const = 0;  
+            
+    public :
+
+      /** 
+       * @typedef TeSharedPtr< TeGeometricTransformation > pointer
+       * Type definition for a TeGeometricTransformation instance pointer. 
+       */
+      typedef TeSharedPtr< TeGeometricTransformation > pointer;
+      
+      /**
+       * @brief Default Destructor
+       */
+      virtual ~TeGeometricTransformation();
+      
+      /**
+       * @brief Direct mapping ( from pt1 space into pt2 space ).
+       *
+       * @param pt1 pt1 coordinate.
+       * @param pt2 pt2 coordinate.
+       */      
+      inline void directMap( const TeCoord2D& pt1, TeCoord2D& pt2 ) const
+      {
+        TEAGN_DEBUG_CONDITION( isTransDefined( internal_params_ ),
+          "Transformation not defined" )
+        
+        directMap( internal_params_, pt1, pt2 );
+      };
+      
+      /**
+       * @brief Inverse mapping ( from pt2 space into pt1 space ).
+       *
+       * @param pt2 pt2 coordinate.
+       * @param pt1 pt1 coordinate.
+       */      
+      inline void inverseMap( const TeCoord2D& pt2, 
+        TeCoord2D& pt1 ) const
+      {
+        TEAGN_DEBUG_CONDITION( isTransDefined( internal_params_ ),
+          "Transformation not defined" )         
+      
+        inverseMap( internal_params_, pt2, pt1 );
+      };
+      
+      /**
+       * @brief Reset the current transformation following the new supplied 
+       * parameters.
+       *
+       * @param newparams The new parameters.
+       * @return true if OK, false on errors.
+       */      
+      bool reset( const TeGTParams& newparams );
+      
+      /**
+       * @brief Returns a copy of the current internal transformation parameters.
+       *
+       * @param params The internal parameters copy.
+       */        
+      void getParameters( TeGTParams& params ) const;
+      
+      /**
+       * @brief Calculates the current transformation maximum direct mapping 
+       * error ( from pt1 space into pt2 space ).
+       *
+       * @return The current maximum direct mapping error.
+       */        
+      inline double getDirectMappingError() const
+      {
+        TEAGN_DEBUG_CONDITION( isTransDefined( internal_params_ ),
+          "Transformation not defined" )
+        
+        return getDirectMappingError( internal_params_ );
+      };
+      
+      /**
+       * @brief Calculates the current transformation maximum inverse mapping 
+       * error ( from pt2 space into pt1 space ).
+       *
+       * @return The current maximum inverse mapping error.
+       */        
+      inline double getInverseMappingError() const
+      {
+        TEAGN_DEBUG_CONDITION( isTransDefined( internal_params_ ),
+          "Transformation not defined" )
+        
+        return getInverseMappingError( internal_params_ );
+      };     
+      
+      /**
+       * @brief Calculates root mean square direct mapping error 
+       * ( from pt1 space into pt2 space ).
+       *
+       * @return The root mean square error.
+       */        
+      inline double getDMapRMSE() const
+      {
+        TEAGN_DEBUG_CONDITION( isTransDefined( internal_params_ ),
+          "Transformation not defined" )
+        
+        return getDMapRMSE( internal_params_ );
+      };        
+      
+      /**
+       * @brief Calculates root mean square inverse mapping error
+       * ( from pt2 space into pt1 space ).
+       *
+       * @return The root mean square error.
+       */        
+      inline double getIMapRMSE() const
+      {
+        TEAGN_DEBUG_CONDITION( isTransDefined( internal_params_ ),
+          "Transformation not defined" )
+        
+        return getIMapRMSE( internal_params_ );
+      };
+      
+      /**
+       * @brief Calculates the direct mapping error for the supplied tie-point
+       * ( from pt1 space into pt2 space ).
+       *
+       * @param tie_point The tie-point.
+       * @return The current direct mapping error.
+       */        
+      inline double getDirectMappingError( const TeCoordPair& tie_point ) const
+      {
+        TEAGN_DEBUG_CONDITION( isTransDefined( internal_params_ ),
+          "Transformation not defined" )
+      
+        return getDirectMappingError( tie_point, internal_params_ );      
+      };
+      
+      /**
+       * @brief Calculates the inverse mapping error for the supplied tie-point
+       * ( from pt2 space into pt1 space ).
+       *
+       * @param tie_point The tie-point.
+       * @return The current inverse mapping error.
+       */        
+      inline double getInverseMappingError( const TeCoordPair& tie_point ) const
+      {
+        TEAGN_DEBUG_CONDITION( isTransDefined( internal_params_ ),
+          "Transformation not defined" )
+      
+        return getInverseMappingError( tie_point, internal_params_ );      
+      };      
+      
+      /**
+       * @brief Returns the minimum number of required tie-points for the current
+       * transformation.
+       *
+       * @return The minimum number of required tie-points for the current
+       * transformation.
+       */       
+      virtual unsigned int getMinRequiredTiePoints() const = 0;      
+      
+      /**
+       * @brief Returns a default object.
+       *
+       * @return A default object.
+       */
+      static TeGeometricTransformation* DefaultObject( 
+        const TeGTParams& );
+
+    protected :
+    
+      /**
+       * @brief Default Constructor.
+       */
+      TeGeometricTransformation();
+      
+      /**
+       * @brief Direct mapping ( from pt1 space into pt2 space ).
+       *
+       * @param params Transformation parameters.
+       * @param pt1 pt1 coordinate.
+       * @param pt2 pt2 coordinate.
+       */      
+      virtual void directMap( const TeGTParams& params,
+        const TeCoord2D& pt1, TeCoord2D& pt2 ) const = 0;
+      
+      /**
+       * @brief Inverse mapping ( from pt2 space into pt1 space ).
+       *
+       * @param params Transformation parameters.
+       * @param pt2 pt2 coordinate.
+       * @param pt1 pt1 coordinate.
+       */      
+      virtual void inverseMap( const TeGTParams& params,
+        const TeCoord2D& pt2, 
+        TeCoord2D& pt1 ) const = 0;      
+      
+      /**
+       * @brief Calculate the transformation parameters following the
+       * new supplied tie-points.
+       *
+       * @param params Transformation parameters.
+       * @return true if OK, false on errors.
+       */       
+      virtual bool computeParameters( TeGTParams& params ) 
+        const = 0;
+        
+      /**
+       * @brief Calculates maximum direct mapping error for the supplied 
+       * parameters ( from pt1 space into pt2 space ).
+       *
+       * @param params Transformation parameters.       
+       * @return The maximum direct mapping error for the supplied parameters.
+       */        
+      double getDirectMappingError( const TeGTParams& params ) const;        
+      
+      /**
+       * @brief Calculates maximum inverse mapping error for the supplied 
+       * parameters ( from pt2 space into pt1 space ).
+       *
+       * @param params Transformation parameters.       
+       * @return The maximum inverse mapping error for the supplied parameters.
+       */        
+      double getInverseMappingError( const TeGTParams& params ) const;      
+      
+      /**
+       * @brief Calculates root mean square direct mapping error for the supplied 
+       * parameters ( from pt1 space into pt2 space ).
+       *
+       * @param params Transformation parameters.       
+       * @return The root mean square error.
+       */        
+      double getDMapRMSE( const TeGTParams& params ) const;        
+      
+      /**
+       * @brief Calculates root mean square inverse mapping error for the supplied 
+       * parameters ( from pt2 space into pt1 space ).
+       *
+       * @param params Transformation parameters.       
+       * @return The root mean square error.
+       */        
+      double getIMapRMSE( const TeGTParams& params ) const;       
+        
+      /**
+       * @brief Calculates the direct mapping error for the supplied tie-point.
+       * ( from pt1 space into pt2 space ).
+       *
+       * @param tie_point The tie-point.
+       * @param params Transformation parameters.        
+       * @return The current maximum direct mapping error.
+       */        
+      double getDirectMappingError( const TeCoordPair& tie_point,
+        const TeGTParams& params ) const;
+
+      /**
+       * @brief Calculates the inverse mapping error for the supplied tie-point.
+       * ( from pt2 space into pt1 space ).
+       *
+       * @param tie_point The tie-point.
+       * @param params Transformation parameters.        
+       * @return The current maximum inverse mapping error.
+       */        
+      double getInverseMappingError( const TeCoordPair& tie_point,
+        const TeGTParams& params ) const;
+                
+    private :
+    
+      /**
+       * @brief Excluded tie-points data.
+       */    
+      class ExcTPDataNode
+      {
+        public :
+          TeCoordPair tp_;
+          double dmap_error_;
+          double imap_error_;
+          double norm_error_;   
+          
+          ExcTPDataNode()
+          {
+            dmap_error_ = imap_error_ = norm_error_ = 0.0;
+          }     
+          
+          ExcTPDataNode( const ExcTPDataNode& other )
+          {
+            tp_ = other.tp_;
+            dmap_error_ = other.dmap_error_;
+            imap_error_ = other.imap_error_;
+            norm_error_ = other.norm_error_;
+          }
+          
+          const ExcTPDataNode& operator=( const ExcTPDataNode& other )
+          {
+            tp_ = other.tp_;
+            dmap_error_ = other.dmap_error_;
+            imap_error_ = other.imap_error_;
+            norm_error_ = other.norm_error_;
+            
+            return other;
+          }
+          
+          bool operator< ( const ExcTPDataNode& other ) const
+          {
+            return ( ( norm_error_ < other.norm_error_ ) ? true : false );
+          }
+      };
+      
+      /**
+       * @brief Tie-points data.
+       */    
+      class TPDataNode
+      {
+        public :
+          unsigned int tpindex_;
+          double dmap_error_;
+          double imap_error_;
+          double norm_error_;
+          
+          TPDataNode()
+          {
+            dmap_error_ = imap_error_ = norm_error_ = 0.0;
+            tpindex_ = 0;
+          }     
+          
+          TPDataNode( const TPDataNode& other )
+          {
+            tpindex_ = other.tpindex_;
+            dmap_error_ = other.dmap_error_;
+            imap_error_ = other.imap_error_;
+            norm_error_ = other.norm_error_;
+          }
+          
+          const TPDataNode& operator=( const TPDataNode& other )
+          {
+            tpindex_ = other.tpindex_;
+            dmap_error_ = other.dmap_error_;
+            imap_error_ = other.imap_error_;
+            norm_error_ = other.norm_error_;
+            
+            return other;
+          }
+                    
+          bool operator< ( const TPDataNode& other ) const
+          {
+            return ( ( norm_error_ < other.norm_error_ ) ? true : false );
+          }
+      };      
+    
+      /**
+       * @brief Operator= overload.
+       *
+       * @param external External instance reference.
+       *
+       * @return The external instance reference.
+       */        
+      const TeGeometricTransformation& operator=( 
+        const TeGeometricTransformation& ) { return *this; };
+        
+      /**
+       * @brief Recombine a seed vector without repetition (the number of combined 
+       * elements on each iteration will follow the vectors size.
+       *
+       * @param seed Seed vector.
+       * @param elements_nmb Number of elements to be permutated
+       * @param seedpos Location inside the seed vector where to begin
+       * the permutation.
+       * @return TRUE if a permutation was made, FALSE if no more
+       * permutation are left to made.
+       *
+       * @note All initial fields must be set to value 0 for the initial seed.
+      */
+      static bool recombineSeed( std::vector<unsigned int>& seed, 
+        const unsigned int& seedpos, const unsigned int& elements_nmb );        
+        
+      /**
+       * @brief Multi-thread exaustive outliers remotion 
+       * strategy (All tie-points
+       * combinations will be tested).
+       * @param params The current transformation parameters.
+       * @param threads_nmb Threads number (not including the
+       * curent process).
+       * @return TRUE if OK, false on errors.
+      */        
+      bool exaustiveOutRemotion( TeGTParams& params,
+        unsigned int threads_nmb );      
+        
+      /**
+       * @brief Exaustive outliers remotion thread entry. 
+       * @param params Thread parameters.
+       * @return TRUE if OK, false on errors.
+      */        
+      static bool eORThreadEntry( const TeThreadParameters& 
+        params );          
+      
+      /**
+       * @brief Leave-worse-out outliers remotion strategy 
+       * (On each iteration the worse tie-point will be
+       * removed).
+       * @param params The current transformation parameters.
+       * @return TRUE if OK, false on errors.
+      */        
+      bool LWAOutRemotion( TeGTParams& params );   
+      
+      /**
+       * @brief Update the excluded tie-points errors following
+       * the supplied transformation parameters.
+       * @param params The current transformation parameters.
+       * @param exc_tp_list The excluded tie-points list (the first element
+       * has the lower normalized error.
+      */       
+      void updateExcTPErrList( const TeGTParams& params,
+        std::list< ExcTPDataNode >& exc_tp_list ) const;
+        
+      /**
+       * @brief Recalc the tie-points errors vector
+       * the supplied transformation parameters.
+       * @param params The current transformation parameters.
+       * @param errvec The tie-points vector (the first element
+       * has the lower normalized error).
+      */       
+      void updateTPErrVec( const TeGTParams& params,
+        std::vector< TPDataNode >& errvec ) const;        
+
+  };
+  
+#endif
+
diff --git a/src/terralib/kernel/TeGeometry.cpp b/src/terralib/kernel/TeGeometry.cpp
old mode 100644
new mode 100755
index 67310e2..5abf4c1
--- a/src/terralib/kernel/TeGeometry.cpp
+++ b/src/terralib/kernel/TeGeometry.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright  2001-2004 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -64,11 +64,10 @@ ostream& operator<<(ostream& os, const TeArc& N)
 void 
 TeLineSet::copyElements ( const TeLineSet& other )
 {
-	box_    = other.box();
 	geomId_ = other.geomId();
 	objectId_ = other.objectId();
 
-	for (unsigned int i=0; i<other.size(); i++) // for each line
+	for (unsigned int i=0; i<other.size(); ++i) // for each line
 	{
 		TeLine2D line; 
 		line.copyElements(other[i]);
@@ -79,11 +78,10 @@ TeLineSet::copyElements ( const TeLineSet& other )
 void 
 TePolygon::copyElements ( const TePolygon& other )
 {
-	box_    = other.box();
 	geomId_ = other.geomId();
 	objectId_ = other.objectId();
 
-	for (unsigned int i = 0; i < other.size(); i++) // for each linear ring
+	for (unsigned int i = 0; i < other.size(); ++i) // for each linear ring
 	{
 		TeLine2D line; 
 		line.copyElements(other[i]);
@@ -95,11 +93,10 @@ TePolygon::copyElements ( const TePolygon& other )
 void 
 TePolygonSet::copyElements ( const TePolygonSet& other )
 {
-	box_    = other.box();
 	geomId_ = other.geomId();
 	objectId_ = other.objectId();
 
-	for (unsigned int i = 0; i < other.size(); i++) // for each polygon
+	for (unsigned int i = 0; i < other.size(); ++i) // for each polygon
 	{
 		TePolygon poly;
 		poly.copyElements (other[i]);
@@ -108,6 +105,42 @@ TePolygonSet::copyElements ( const TePolygonSet& other )
 }
 
 
+TePointSet makePointSet( const TeLinearRing& lr )
+{
+  TePointSet outps;
+  TePoint temp_point;
+  
+  const unsigned int lr_size = lr.size();
+  
+  for( unsigned int lr_index = 0 ; lr_index < lr_size ; ++lr_index ) {
+    TePoint temp_point;
+    temp_point.add( lr[ lr_index ] );
+    
+    outps.add( temp_point );
+  }
+  
+  return outps;
+}
 
 
+TePointSet makePointSet( const TePolygon& p )
+{
+  TePointSet outps;
+
+  const unsigned int p_size = p.size();
+  unsigned p_index = 0;
+  unsigned int lrps_size = 0;
+  unsigned int lrps_index = 0;
+  
+  for( p_index = 0 ; p_index < p_size ; ++p_index ) {
+    TePointSet lrps = makePointSet( p[ p_index ] );
+    lrps_size = lrps.size();
+  
+    for( lrps_index = 0 ; lrps_index < lrps_size ; ++lrps_index ) {
+      outps.add( lrps[ lrps_index ] );
+    }
+  }
+  
+  return outps;
+}
 
diff --git a/src/terralib/kernel/TeGeometry.h b/src/terralib/kernel/TeGeometry.h
old mode 100644
new mode 100755
index ac2015a..15095f6
--- a/src/terralib/kernel/TeGeometry.h
+++ b/src/terralib/kernel/TeGeometry.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright  2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -21,8 +21,7 @@ indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
 /*! \file TeGeometry.h
-    This file contains structures and definitions about 
-	geometries support in TerraLib
+    \brief This file contains structures and definitions about	geometries support in TerraLib
 */
 
 #ifndef __TERRALIB_INTERNAL_GEOMETRY_H
@@ -32,6 +31,7 @@ of this library and its documentation.
 #pragma warning ( disable: 4786 )
 #endif
 
+#include "TeDefines.h"
 #include "TeBox.h"
 #include "TeCoord2D.h"
 #include "TeComposite.h"
@@ -42,6 +42,7 @@ of this library and its documentation.
 #include <string>
 #include <iostream>
 
+
 using namespace std;
 
 //!  A basic class for handling geometries in TerraLib
@@ -52,7 +53,7 @@ using namespace std;
 	 \note The Geometry classes in TerraLib use the Composite and the Visitor patterns
 	 \sa TeBox TeGeomComposite, TeGeomSingle 
 */
-class TeGeometry
+class TL_DLL TeGeometry
 {
 public:
 
@@ -114,7 +115,7 @@ public:
 	virtual bool isRing() const
 	{ return false; }
 
-	//! Returns the type of the geometry
+	//! Returns the basic geometry type in a set of geometries structure
 	virtual TeGeomRep elemType() 
 	{ return TeGEOMETRYNONE; }
 	
@@ -130,17 +131,18 @@ protected:
 /*!
 	This class is used to deal in a similar way with objects with or without geometry 
 */
-class TeGeometryNone:  public TeGeometry
+class TL_DLL TeGeometryNone:  public TeGeometry
 {
 public: 
 	//! Returns the basic geometry in a set of geometries structure 
 	TeGeomRep elemType() { return TeGEOMETRYNONE; }
 
+	//! Removes geometry elements
 	void clear () { return; }
 };
 
 //! A class to handle vector geometries
-class TeVector : public TeGeometry
+class TL_DLL TeVector : public TeGeometry
 {
 };
 
@@ -153,16 +155,13 @@ class TeGeomSingle : public TeVector
 {
 public:
 
-//	typedef typename T value_type;
+    //! Exports the type of the element of a TeGeomSingle
 	typedef  T value_type;
 
 	//! Empty constructor
 	TeGeomSingle<T>() {}
 
-	//! Constructor
-	/*!
-		\param elem the unique element of the single
-	*/
+	//! Constructor from the single element of the container
 	TeGeomSingle<T> (const T& elem ): elem_ ( elem  ) 
 	{	updateBox ( box_, elem ); }
 
@@ -209,11 +208,15 @@ public:
 	{	return elem_; }
 
 	//! Returns the unique element
+	const T& elem () const
+	{	return elem_; }
+
+	//! Returns the unique element
 	T& operator [] ( int /* i */) 
 	{	return elem_; }
 
 	//! Returns TRUE if a TeGeomSingle is equal to other
-	bool operator== (const T& other) const
+	bool operator== (const TeGeomSingle& other) const
 	{	return elem_ == other.elem(); }
 
 	//! Returns the size of a TeGeomSingle: always 1
@@ -224,6 +227,8 @@ protected:
 
 };
 
+
+
 //!  TeGeomComposite: A template class for handling a hierarchy of geometries in TerraLib
 /*!
 
@@ -276,9 +281,11 @@ public:
 		return *this;
 	}
 
+	//! Returns the identification of the object associated to this geometry
 	virtual string objectId() const
 	{ return objectId_; }
 
+	//! Sets the identification of the object associated to this geometry
 	virtual void objectId (const string& id )
 	{ 
 		objectId_ = id; 
@@ -293,16 +300,15 @@ public:
 	//! Copy two composites, duplicating elements (breaking handle/body idiom)
 	void copyElements ( const TeGeomComposite& other )
 	{
-		box_    = other.box_;
 		geomId_ = other.geomId_;
 		objectId_ = other.objectId_;
 
 		for (unsigned int i = 0; i < other.pImpl_->size(); i++)
-			pImpl_->add (other.pImpl_->operator[](i));
+			add (other.pImpl_->operator[](i));
 	}
 
 	//! Returns TRUE if two composites have exactly the same elements
-	bool operator== (const T& other) const
+	bool operator== (const TeGeomComposite& other) const
 	{	
 		if ( this->size() != other.size() )
 			return false;
@@ -366,7 +372,7 @@ public:
 	
 	//! Returns the size of the composite
 	unsigned int size() const
-	{	return pImpl_->size(); }
+	{	return ( (unsigned int) pImpl_->size() ); }
 
 	//! Reserves space for a given number of elements (reserve is available for vectors)  
 	void reserve(int nelem)
@@ -432,34 +438,35 @@ protected:
 /*!
 	\sa TeGeometry TeLinearRing
 */
-class TeLine2D : public TeGeomComposite<TeCoord2D> {
+class TL_DLL TeLine2D : public TeGeomComposite<TeCoord2D>
+{
 public:
-
-// -- Methods
-
 	//! Check if a line2D is a closed ring
 	bool isRing() const;	
 
+	//! Returns the identification of the object associated to this geometry
 	string objectId() const
 	{ return objectId_; }
 	
+	//! Sets the identification of the object associated to this geometry
 	void objectId (const string& id )
 	{  objectId_ = id; }
 
+	//! Returns the basic geometry in a set of geometries structure 
 	TeGeomRep elemType() { return TeLINES; }
-
 };
 
 //!  TeLineSet: Supports a composite of lines
 /*!
   \sa TeGeomComposite
 */
-class TeLineSet: public TeGeomComposite<TeLine2D>
+class TL_DLL TeLineSet: public TeGeomComposite<TeLine2D>
 {
 public:
 	//! Returns the basic geometry in a set of geometries structure 
 	TeGeomRep elemType() { return TeLINES; }
 
+	//! Executes a real copy of two sets (duplicate the elements)
 	void copyElements (const TeLineSet& other ); 
 }; 
 
@@ -471,7 +478,7 @@ public:
 
    \sa TePolygon 
 */
-class TeLinearRing : public TeLine2D  {
+class TL_DLL TeLinearRing : public TeLine2D  {
 public:
 
 	//! Empty constructor
@@ -479,7 +486,6 @@ public:
 
 	//! Contructor from a line
 	TeLinearRing ( TeLine2D& line );
-
 };
 
 
@@ -488,28 +494,31 @@ public:
 	In TerraLib, a 2D polygon consists of an outer ring and a list
 	of inner rings 
 */
-class  TePolygon: public TeGeomComposite<TeLinearRing>  
+class TL_DLL TePolygon: public TeGeomComposite<TeLinearRing>  
 {
 public:
 	
+	//! Returns the basic geometry in a set of geometries structure 
 	TeGeomRep elemType() { return TePOLYGONS; }
 
+	//! Executes a real copy of two sets (duplicate the elements)
 	void copyElements ( const TePolygon& other );
 };
 
 //!  TePolygonSet: A class for handling sets of 2D polygons. 
-class TePolygonSet: public TeGeomComposite<TePolygon> 
+class TL_DLL TePolygonSet: public TeGeomComposite<TePolygon> 
 {
 public:
 	//! Returns the basic geometry in a set of geometries structure 
 	TeGeomRep elemType() { return TePOLYGONS; }
 
+	//! Executes a real copy of two sets (duplicate the elements)
 	void copyElements ( const TePolygonSet& other );
 };
 
 	
 //!  TePoint: A class for handling 2D Points. 
-class  TePoint : public TeGeomSingle<TeCoord2D>
+class TL_DLL TePoint : public TeGeomSingle<TeCoord2D>
 {
 public:
 	//! Default constructor
@@ -520,6 +529,7 @@ public:
 			setBox(TeBox(x,y,x,y)); // the box of a point is the point itself
 	}
 
+	//! Copy constructor
 	TePoint(TeCoord2D& c):
 		TeGeomSingle<TeCoord2D> ( )
 	{
@@ -527,17 +537,21 @@ public:
 			setBox(TeBox(c.x(),c.y(),c.x(),c.y())); // the box of a point is the point itself
 	}
 
+	//! Returns the basic geometry in a set of geometries structure 
 	TeGeomRep elemType() { return TePOINTS; }
 
+	//! Returns the identification of the object associated to this geometry
 	string objectId() const
 	{ return objectId_; }
 	
+	//! Sets the identification of the object associated to this geometry
 	void objectId (const string& id )
 	{  objectId_ = id; }
+
 };
 
 //!  TePointSet:  A class for handling sets of 2D polygons. 
-class TePointSet: public  TeGeomComposite<TePoint> 
+class TL_DLL TePointSet: public  TeGeomComposite<TePoint> 
 {
 public:
 	//! Returns the basic geometry in a set of geometries structure 
@@ -545,7 +559,7 @@ public:
 };
 
 //!  TeText : A class for handling text.
-class  TeText: public TeGeomSingle<TeCoord2D>
+class TL_DLL TeText: public TeGeomSingle<TeCoord2D>
 {
 public:
 	//! Default contructor
@@ -670,6 +684,7 @@ public:
 	void setAlignmentHoriz (double alig) 
 	{ alignmentHoriz_ = alig; }
 
+	//! Returns the basic geometry in a set of geometries structure 
 	TeGeomRep elemType() { return TeTEXT; }
 
 private:
@@ -682,7 +697,7 @@ private:
 
 
 //!  TeTextSet : A class for handling sets of TeText.
-class  TeTextSet : public TeGeomComposite<TeText> 
+class TL_DLL TeTextSet : public TeGeomComposite<TeText> 
 {
 public:
 	//! Returns the basic geometry in a set of geometries structure
@@ -692,7 +707,7 @@ public:
 
 
 //! TeNode:  A class for handling 2D Nodes.
-class  TeNode: public TeGeomSingle<TeCoord2D>
+class TL_DLL TeNode: public TeGeomSingle<TeCoord2D>
 {
 public:
 	//! Returns TRUE if nodes are equal
@@ -710,15 +725,16 @@ public:
 		return os;
 	}
 
+	//! Returns the basic geometry in a set of geometries structure 
 	TeGeomRep elemType() { return TeNODES; }
 
 };
 
 //! Outputs the geometrical identification of a node
-ostream& operator<<(ostream& os, TeNode& N);
+TL_DLL ostream& operator<<(ostream& os, TeNode& N);
 
 //!  TeNodeSet :  A class for handling sets of 2D Nodes. 
-class  TeNodeSet : public TeGeomComposite<TeNode> 
+class TL_DLL TeNodeSet : public TeGeomComposite<TeNode> 
 
 {
 public:
@@ -728,7 +744,7 @@ public:
 };
 
 //!  TeArc : Provides support for a 2D arc.
-class TeArc : public TeVector 
+class TL_DLL TeArc : public TeVector 
 {
 public:
 
@@ -790,19 +806,33 @@ public:
 		updateBox ( box_, to );
 	}
 
+	//! Returns the basic geometry in a set of geometries structure 
 	TeGeomRep elemType() { return TeARCS; }
 
+	//! Returns TRUE if a TeArc is equal to other
+	bool operator== (const TeArc& other) const
+	{
+		if((from_ == other.from_) &&
+	       (to_ == other.to_) &&
+		   (ifrom_ == other.ifrom_) &&
+           (ito_ != other.ito_))
+			return true;
+
+		return false;
+	}
+
 private:
 
 	TeNode	from_, to_;
 	int		ifrom_, ito_;
 };
+
 //! Outputs the description of an arc
-ostream& operator<<(ostream& os, const TeArc& N);
+TL_DLL ostream& operator<<(ostream& os, const TeArc& N);
 
 
 //!  TeArcSet: Provides support for a set of 2D arc.
-class TeArcSet: public TeGeomComposite <TeArc> 
+class TL_DLL TeArcSet: public TeGeomComposite <TeArc> 
 {
 public:
 	//! Returns the basic geometry in a set of geometries structure 
@@ -810,7 +840,7 @@ public:
 };
 
 //!  TeSample: A class for handling 2D Points with an associated measure.
-class TeSample: public TeGeomSingle<TeCoord2D>, public TeMeasure
+class TL_DLL TeSample: public TeGeomSingle<TeCoord2D>, public TeMeasure
 {
 public:
 	//! Constructor
@@ -825,7 +855,7 @@ public:
 };
 
 //!  TeSampleSet: A class for handling sets of 2D samples
-class TeSampleSet: public TeGeomComposite<TeSample>
+class TL_DLL TeSampleSet: public TeGeomComposite<TeSample>
 {
 public:
 	//! Returns the basic geometry in a set of geometries structure 
@@ -833,7 +863,7 @@ public:
 };
 
 //!  TeContourLine: A class for handling 2D countour lines
-class TeContourLine: public TeLine2D, public TeMeasure
+class TL_DLL TeContourLine: public TeLine2D, public TeMeasure
 {
 public:
 	//! Constructor
@@ -848,7 +878,7 @@ public:
 
 
 //!  TeContourLineSet: A class for handling sets of 2D countour lines
-class TeContourLineSet: public  TeGeomComposite <TeContourLine> 
+class TL_DLL TeContourLineSet: public  TeGeomComposite <TeContourLine> 
 {
 public:
 	//! Returns the basic geometry in a set of geometries structure 
@@ -857,7 +887,7 @@ public:
 
 
 //!    A class for handling cells. 
-class  TeCell : public TeVector 
+class TL_DLL TeCell : public TeVector 
 {
 	int column_;	//!< the column number of this cell	
 	int line_;		//!< the line number of this cell
@@ -888,11 +918,22 @@ public:
 	void line (int line) 
 	{ line_ =  line; }
 
+	//! Returns the basic geometry in a set of geometries structure 
 	TeGeomRep elemType() { return TeCELLS; }
+
+	//! Returns TRUE if a TeCell is equal to other
+	bool operator== (const TeCell& other) const
+	{
+		if((column_ == other.column_) &&
+	       (line_ == other.line_))
+			return true;
+
+		return false;
+	}
 };
 
 //!  A class for handling sets of cells.
-class TeCellSet: public  TeGeomComposite<TeCell> 
+class TL_DLL TeCellSet: public  TeGeomComposite<TeCell> 
 {
 	double	resX_;	//!< the X resolution of a set of cells
 	double	resY_;	//!< the Y resolution of a set of cells
@@ -921,6 +962,18 @@ public:
 
 };
 
+
+/*! \fn TePointSet makePointSet( const TeLinearRing& lr )
+   \brief builds a TePointSet geometry from a TeLinearRing
+ */
+TL_DLL TePointSet makePointSet( const TeLinearRing& lr );
+
+
+/*! \fn TePointSet makePointSet( const TePolygon& p )
+   \brief builds a TePointSet geometry from a TePolygon
+ */
+TL_DLL TePointSet makePointSet( const TePolygon& p );
+
 #endif
 
 
diff --git a/src/terralib/kernel/TeGeometryAlgorithms.cpp b/src/terralib/kernel/TeGeometryAlgorithms.cpp
old mode 100644
new mode 100755
index ec374d8..e42a207
--- a/src/terralib/kernel/TeGeometryAlgorithms.cpp
+++ b/src/terralib/kernel/TeGeometryAlgorithms.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright  2001-2004 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -21,10 +21,6 @@ indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
 
-/*
- * Verficar os lugares em que usa safeintersections pois talvez ter� que fazer o sort
- */
-
 #include "TeAssertions.h"
 #include "TeGeometryAlgorithms.h"
 #include "TeDefines.h"
@@ -499,11 +495,11 @@ short LookAtInnerRings(const TeLinearRing& rRed, const TePolygon& pBlue, vector<
 				                continue;
 
 			case TeCOVERS    : rings.push_back(pBlue[i]);
-							   rel = TeCOVEREDBY;
+							   rel = TeCOVEREDBY;	// we know they share boundary!!!!
 							   break;
 
 			case TeCONTAINS  : rings.push_back(pBlue[i]);
-							   break;
+							   break;				// doesn't share boundary
 		}
 	}
 
@@ -522,8 +518,8 @@ short TestInnerRings(const TePolygon& pRed, vector<TeLinearRing>& rings)
 	unsigned int nRedRings = pRed.size();
 	unsigned int nBlueRings = rings.size();
 
-	if((nRedRings - 1) != nBlueRings)
-		return TeOVERLAPS;
+	//if((nRedRings - 1) != nBlueRings)
+	//	return TeOVERLAPS;
 
 	unsigned int i = 1;
 	unsigned int j = 0;
@@ -534,7 +530,7 @@ short TestInnerRings(const TePolygon& pRed, vector<TeLinearRing>& rings)
 
 	set<unsigned int> redRingsContainsCovers;
 
-	short rel = TeUNDEFINEDREL;
+	short rel = 0;
 
 	for(; i < nRedRings; ++i)
 	{
@@ -632,6 +628,28 @@ template<> bool TeEquals(const TePolygon& redPol, const TePolygon& bluePol)
 		return false;
 }
 
+template<> bool TeEquals( const TePolygonSet& ps1, const TePolygonSet& ps2 )
+{
+  if( ps1.size() == ps2.size() ) {
+    TePolygonSet::iterator it1 = ps1.begin();
+    TePolygonSet::iterator it1_end = ps1.end();
+    TePolygonSet::iterator it2 = ps2.begin();
+    
+    while( it1 != it1_end ) {
+      if( ! TeEquals( (*it1), (*it2) ) ) {
+        return false;
+      }
+      
+      ++it1;
+      ++it2;
+    }
+  
+    return true;
+  } else {
+    return false;
+  }
+}
+
 template<> bool TeEquals(const TeBox& bx1, const TeBox& bx2)
 {
 	if(TeGeometryAlgorithmsPrecision::IsDifferent(bx1.x1(), bx2.x1()))
@@ -780,6 +798,7 @@ bool TeDisjoint(const TeCell& cell, const TePoint& point)
 
 
 // INTERSECTS
+
 template<> bool TeIntersects(const TeCoord2D& c, const TeBox& b)
 {
 	// c to the right of b
@@ -1264,62 +1283,123 @@ bool TeIntersection(const TeBox& bx1, const TeBox& bx2, TeBox& bout)
 TeCoordPairVect	TeGetIntersections(const TePolygon &poly, const double& y)
 {
 	TeCoordPairVect		Segments;
-	vector<double>		crossList;
+	vector<double>		crossList, segListInY;
 	unsigned int		nholes = poly.size();
-		
+			
 	//for each ring of the polygon
 	for (unsigned int count=0; count<nholes; count++ ) 		
 	{
 		TeLinearRing coords = poly[count];
+		//for each segment of the ring
 		for  (unsigned int j=0;  j < (coords.size() - 1); j++ ) 		
 		{
+			// Get one segment
 			TeCoord2D coord0 = coords[j];
 			TeCoord2D coord1 = coords[j+1];
 
 			bool yflag0 = ( coord0.y() > y );  
 			bool yflag1 = ( coord1.y() > y ); 
-		
-			if ( yflag0 != yflag1 )
+
+			//treating a special case: when the segment touches or is ON the y axe  
+			//if there is a special case, we must test if the middle point
+			//of each segment is inside or outside of the polygon 
+			if((coord0.y()!=y) && (coord1.y()==y)) 
+			{
+				bool pointsInY = true;
+				bool lowerY1 = coord0.y()<y;
+                unsigned int i = j+2;
+				
+				TeCoord2D lastPointInY;
+				TeCoord2D firstPointOutY = coord1;
+				
+				while(pointsInY) 
+				{
+					lastPointInY = firstPointOutY; 
+
+					// Get the next point 
+					if(i>=coords.size())
+						i=1;
+                    firstPointOutY = coords[i];
+					++i;
+
+					//Verify if it is on the y axe
+					pointsInY = firstPointOutY.y()==y;
+				}
+
+				bool lowerY2 = firstPointOutY.y()<y;
+				//the segment touches the y axe only in one point and cross the axe Y
+				if((lastPointInY==coord1) && (lowerY1!=lowerY2)) 
+					crossList.push_back(coord1.x());	
+				else 
+				{
+					segListInY.push_back (coord1.x());
+					segListInY.push_back (lastPointInY.x());
+				}
+			}
+			else if(coord0.y()==y)
+				continue;
+			// line crosses ring horizontally 
+			else if ( yflag0 != yflag1 )
 			{ 
-				// line crosses ring horizontally 
 				double slope =  ( coord1.x() - coord0.x() ) / ( coord1.y() - coord0.y());
 				double xcross = ( y -   coord0.y() )* slope + coord0.x();
 				crossList.push_back (xcross);	
 			}
-			else if((coord0.y()==y) && (coord1.y()!=y)) 
-			{
-				crossList.push_back(coord0.x());
-			}
-			else if((coord0.y()!=y) && (coord1.y()==y))
-			{
-				crossList.push_back(coord1.x());
-			}
 		}
 	}
+	
+	if(crossList.empty())
+		crossList = segListInY;
+	else if(!segListInY.empty())
+	{
+		//insert segListInY in the cross list 
+		for(unsigned i=0; i<segListInY.size(); ++i) 
+			crossList.push_back (segListInY[i]);
+
+		sort (crossList.begin(), crossList.end());
 
+		vector<double> aux;
+		//Verify if the segment middle point intersects the polygon 
+		for(unsigned i=1; i<crossList.size(); ++i)
+		{
+			//calculates the middle point
+			double x0 = crossList[i-1];
+			double x1 = crossList[i];
+			double x = x0 + (x1-x0)/2;
+			
+			TeCoord2D pt (x, y);
+			if (!TeDisjoint(pt, poly)) 
+			{
+				aux.push_back (x0);
+				aux.push_back (x1);
+			}
+		}
+		crossList.clear();
+		crossList = aux;
+    }
+	
 	// Sort the x-intersections
 	sort (crossList.begin(), crossList.end());
-
+	
+	// Make the result segments
 	vector<double>::iterator it = crossList.begin();
-
-	while ( it != crossList.end() )
+	while ( it != crossList.end())
 	{
 		TeCoordPair cp;
 
 		cp.pt1 = TeCoord2D ( (*it), y);
 		++it;
-		if ( it == crossList.end() ) break;
+		if ( it == crossList.end() ) 
+			break;
 
 		cp.pt2 = TeCoord2D ( (*it), y);
 		++it;
 
 		Segments.push_back ( cp );
 	}
-
 	return Segments;
 }
 
-
 //---------- Union Operators ----------//
 
 TeBox TeUnion(const TeBox& bx1, const TeBox& bx2)
@@ -1440,7 +1520,7 @@ bool TeLocateLineSegment (TeCoord2D& pin, TeLine2D& line, int& segment, double /
 }
 
 
-//---------- �rea Functions ----------//
+//---------- Area Functions ----------//
 
 template<> double TeGeometryArea(const TePolygon& p)
 {
@@ -1485,6 +1565,23 @@ template<> double TeGeometryArea(const TeBox& b)
 	return ((b.x2() - b.x1()) * (b.y2() - b.y1()));
 }
 
+template<> double TeGeometryArea(const TeMultiGeometry& mGeom)
+{
+	if(mGeom.hasPolygons())
+	{
+		TePolygonSet pSet;
+		mGeom.getGeometry(pSet);
+		return TeGeometryArea(pSet);
+	}
+	else if(mGeom.hasCells())
+	{
+		TeCellSet cSet;
+		mGeom.getGeometry(cSet);
+		return TeGeometryArea(cSet);
+	}
+	return 0.;
+}
+
 //---------- ConvexHull ----------//
 
 //! If we have the  two end point equals, so we remove it.
@@ -1547,7 +1644,7 @@ TePolygon ConvexHull(vector<TeCoord2D>& coordSet)
 
 	
 	upperHull.erase(0);
-	upperHull.erase(count - 1);
+	upperHull.erase(upperHull.size() - 1);
 	
 	lowerHull.copyElements(upperHull);
 	lowerHull.add(lowerHull[0]);
@@ -1797,7 +1894,7 @@ double TeMinimumDistance (const TeCoord2D& first, const TeCoord2D& last, const T
 	double dmin = TeMAXFLOAT;
 
 	// Perpendicular minimum distance point was found.
-	if (TeWithin (pinter, sbox))
+	if (TeIntersects (pinter, sbox))
 	{
 		dmin = d;
 		pout = pinter;
@@ -2006,10 +2103,7 @@ short TeRelation(const TePolygon& pRed, const TePolygon& pBlue)
 							  }
 							  else	// else if it hasn't
 							  {
-								  if(pRed.size() > 1)	// but pRed has
-									  return TeOVERLAPS;	// they overlaps
-								  else
-									  return rel;
+								  return rel;
 							  }
 							  break;
 
@@ -2022,10 +2116,7 @@ short TeRelation(const TePolygon& pRed, const TePolygon& pBlue)
 							  }
 							  else	// else if it hasn't
 							  {
-								  if(pBlue.size() > 1)	// but pBlue has
-									  return TeOVERLAPS;	// they overlaps
-								  else
-									  return rel;
+								  return rel;
 							  }
 
 							  converse = true;
@@ -2051,15 +2142,22 @@ short TeRelation(const TePolygon& pRed, const TePolygon& pBlue)
 	if(converse)	// COVERS or CONTAINS
 	{
 		if(pBlue.size() == 1 && innerRingsToTest.size() == 0)
-			return rel;
+		{
+			TeSpatialRelation spatialRel = (TeSpatialRelation)rel;
+			if (spatialRel == TeCOVEREDBY)
+				return TeCOVERS;
+			else
+				return rel;
+			//return ((TeSpatialRelation)rel == TeCOVEREDBY) ? TeCOVERS : rel;	// entrou apenas no touches do lookat inner rings 
 
+		}
 		// The result may be: overlap or equals.
 		short rel_aux = TestInnerRings(pBlue, innerRingsToTest);
 
 		if(rel_aux & TeOVERLAPS)
 			return TeOVERLAPS;
 
-		if(rel_aux & TeCOVERS)
+		if(rel_aux & TeCOVERS || rel_aux & TeEQUALS)
 			return TeCOVERS;
 
 		if(rel_aux & TeCONTAINS)
@@ -2067,8 +2165,8 @@ short TeRelation(const TePolygon& pRed, const TePolygon& pBlue)
 	}
 	else	// EQUALS, COVERED BY or WITHIN
 	{
-		if(pRed.size()  == 1 && innerRingsToTest.size() == 0)
-			return rel;
+		if(pRed.size() == 1 && innerRingsToTest.size() == 0)
+			return rel;	// entrou apenas no touches do lookat inner rings pois se desse covered by ou within teria inner rings
 
 		short rel_aux = TestInnerRings(pRed, innerRingsToTest);
 
@@ -2378,7 +2476,8 @@ bool TeLineSimplify(TeLine2D& ptlist, double snap, double maxdist)
 	int npte = npts;
 
 	double snap2 = maxdist*maxdist;
-	TeLine2D vxy (ptlist);
+	TeLine2D vxy;
+	vxy.copyElements(ptlist);
 
 //	Check for islands before defining number of points to be used
 	int npt;
@@ -2493,6 +2592,47 @@ bool TeLineSimplify(TeLine2D& ptlist, double snap, double maxdist)
 	return true;
 }
 
+bool TeSegmentsIntersectPoint(const TeCoord2D& fr0, const TeCoord2D& to0, const TeCoord2D& fr1, const TeCoord2D& to1, TeCoord2D& pi)
+{
+//	Adapted from TWO-DIMENSIONAL CLIPPING: A VECTOR-BASED APPROACH
+//	Hans J.W. Spoelder, Fons H. Ullings in:
+//	Graphics Gems I, pp.701, 
+
+	double	a, b, c,
+		px, py, lx, ly, lpx, lpy,
+		s;
+
+	px  = to0.x() - fr0.x();
+	py  = to0.y() - fr0.y();
+	lx  = to1.x() - fr1.x();
+	ly  = to1.y() - fr1.y();
+	lpx = fr0.x() - fr1.x();
+	lpy = fr0.y() - fr1.y();
+
+	a = py * lx - px * ly;
+	b = lpx * ly - lpy * lx;
+	c = lpx * py - lpy * px;
+
+	if (a == 0) // Linhas paralelas
+		return false;
+	else
+	{
+		if (a > 0)
+		{
+			if ((b < 0) || (b > a) || (c < 0) || (c > a))
+				return false;
+		}
+		else
+		{
+			if ((b > 0) || (b < a) || (c > 0) || (c < a))
+				return false;
+		}
+		s = b/a;
+		pi.x(fr0.x() + (px*s));
+		pi.y(fr0.y() + (py*s));
+	}
+	return true;
+}
 
 //---------- Curve ----------//
 
@@ -2602,7 +2742,7 @@ bool TeGenerateArc(TePoint& p1, TePoint& p2, TePoint& p3, TeLine2D& arcOut, cons
 	double cosBeta = (p1.location().x()-center.location().x())/radius; 
 	double sinBeta = (p1.location().y()-center.location().y())/radius;
 
-	//rela��es trigonom�tricas
+	//rela�es trigonom�ricas
 	//sin(x+y) = sin(x)cos(y) + cos(x)sin(y),
     //cos(x+y) = cos(x)cos(y) - sin(x)sin(y),
 	//sin(x-y) = sin(x)cos(y) - cos(x)sin(y),
@@ -2612,7 +2752,7 @@ bool TeGenerateArc(TePoint& p1, TePoint& p2, TePoint& p3, TeLine2D& arcOut, cons
 	double angle = deltaR;
 	for (int i=0; i<(NPoints+1); i++)
 	{
-		double x,y;
+		double x = 0.,y = 0.;
 		if(orient==TeCOUNTERCLOCKWISE)
 		{
 			//c = h + r*cos(B+A),
@@ -2652,7 +2792,7 @@ bool TeGenerateCircle(TePoint& center, const double& radius, TeLine2D& circle, c
 	double cosBeta = 1;
 	double sinBeta = 0;
 
-	//rela��es trigonom�tricas
+	//rela�es trigonom�ricas
 	//sin(x+y) = sin(x)cos(y) + cos(x)sin(y),
     //cos(x+y) = cos(x)cos(y) - sin(x)sin(y),
 	//sin(x-y) = sin(x)cos(y) - cos(x)sin(y),
diff --git a/src/terralib/kernel/TeGeometryAlgorithms.h b/src/terralib/kernel/TeGeometryAlgorithms.h
old mode 100644
new mode 100755
index 92c06f0..308d83c
--- a/src/terralib/kernel/TeGeometryAlgorithms.h
+++ b/src/terralib/kernel/TeGeometryAlgorithms.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,19 +20,15 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeGeometryAlgorithms.h
-    This file contains Algorithms for Topological Operations.
+    \brief This file contains Algorithms for Topological Operations.
+	\author Gilberto Ribeiro de Queiroz <gribeiro at dpi.inpe.br>
 */
-
-/**
-  *@author Gilberto Ribeiro de Queiroz
-  */
-
 #ifndef  __TERRALIB_INTERNAL_GEOMETRYALGORITHMS_H
 #define  __TERRALIB_INTERNAL_GEOMETRYALGORITHMS_H
 
 #include "TeGeometry.h"
+#include "TeMultiGeometry.h"
 
 #include "TePrecision.h"
 #include "TeProjection.h"
@@ -40,360 +36,391 @@ of this library and its documentation.
 //! Intersection coordinates of two segments.
 typedef vector<TeCoord2D> TeIntersCoordsVec;
 
-/** @defgroup GeometryAlgorithms Geometry Algorithms
- *  TerraLib geometry algorithms.
- *  @{
- */
-/** @defgroup TopologicalOperators Topological Operators
- *  @ingroup  GeometryAlgorithms
-   Functions that test topologival relation between two objects.
-   The topological operators are based on the intersection of interior, exterior and boundary of geometries:
- \par  ------------------------------------------------------------------------------------------------------------------
- \par  | TeGeometry   |  INTERIOR                        | BOUNDARY           | EXTERIOR                                |
- \par  ------------------------------------------------------------------------------------------------------------------
- \par  | TePoint      | The point itself                 | Empty              | Everything except interior              |
- \par  | TeLine2D     | All points except the end points | The two end points | Everything except interior and boundary |
- \par  | TeLinearRing | All points                       | Empty              | Everything except interior and boundary |
- \par  | TePolygon    | Everything between the external  | All rings          | Everything except interior and boundary |
- \par  |              | ring and the inner rings         |                    |                                         |
- \par  ------------------------------------------------------------------------------------------------------------------
+/** @defgroup GeometryAlgorithms Geometry algorithms
+	TerraLib geometry algorithms.
+	@{
+*/
+
+/** @defgroup TopologicalOperators Topological operators
+    @ingroup  GeometryAlgorithms
+	Functions that test topologival relation between two objects.
+\verbatim
+	The topological operators are based on the intersection of interior, exterior and boundary of geometries:
+  ------------------------------------------------------------------------------------------------------------------
+ | TeGeometry   |  INTERIOR                        | BOUNDARY           | EXTERIOR                                |
+  ------------------------------------------------------------------------------------------------------------------
+ | TePoint      | The point itself                 | Empty              | Everything except interior              |
+ | TeLine2D     | All points except the end points | The two end points | Everything except interior and boundary |
+ | TeLinearRing | All points                       | Empty              | Everything except interior and boundary |
+ | TePolygon    | Everything between the external  | All rings          | Everything except interior and boundary |
+ |              | ring and the inner rings         |                    |                                         |
+  ------------------------------------------------------------------------------------------------------------------
  
- \par  We use:
-		- I: for Interior
-		- E: for Exterior
-		- B: for Boundary
-		- inter: Intersects
-		- ^: AND
-		- v: OR
-		- A = refer to two-dimensional geometries (TePolygon and TePolygonSet)
-		- L = refer to one-dimensional geometries (TeLine2D and TeLineSet)
-		- P = refer to 0-dimensional geometries   (TePoint and TePointSet)
- *  @{
- */
+We use:
+	- I: for Interior
+	- E: for Exterior
+	- B: for Boundary
+	- inter: Intersects
+	- ^: AND
+	- v: OR
+	- A = refer to two-dimensional geometries (TePolygon and TePolygonSet)
+	- L = refer to one-dimensional geometries (TeLine2D and TeLineSet)
+	- P = refer to 0-dimensional geometries   (TePoint and TePointSet)
+ \endverbatim
+@{
+*/
 
 /** @defgroup TeEquals Equals test
- *  @ingroup TopologicalOperators
- *  Check if one object is equal another object.
- *  Applies to: P/P, L/L and A/A.
- *  TeEquals(x, y) => (x inter y = x) ^ (y inter x = y)
- *					  (B(x) inter I(y) = false) ^ (B(x) inter E(y) = false) 
- *  @{
+    @ingroup TopologicalOperators
+    Check if one object is equal another object.
+\verbatim
+ Applies to: P/P, L/L and A/A.
+ TeEquals(x, y) => (x inter y = x) ^ (y inter x = y)
+                   (B(x) inter I(y) = false) ^ (B(x) inter E(y) = false) 
+\endverbatim
+@{
 */
-
 //! If a specialized function is not used, returns false.
-template<class T1, class T2> inline bool TeEquals(const T1& /*o1*/, const T2& /*o2*/)
+template<class T1, class T2>
+inline bool TeEquals(const T1& /*o1*/, const T2& /*o2*/)
 {
 	return false;
 }
 
 //! Check if coordinate 1 and coordinate 2 are equal
-template<> bool TeEquals(const TeCoord2D& c1, const TeCoord2D& c2);
+template<>
+TL_DLL bool TeEquals(const TeCoord2D& c1, const TeCoord2D& c2);
 
 //!  Check if point 1 and point 2 are equal
-template<> bool TeEquals(const TePoint& p1, const TePoint& p2);
+template<>
+TL_DLL bool TeEquals(const TePoint& p1, const TePoint& p2);
 
 //! Check if lineRed and lineBlue are equal
-template<> bool TeEquals(const TeLine2D& redLine, const TeLine2D& blueLine);
+template<>
+TL_DLL bool TeEquals(const TeLine2D& redLine, const TeLine2D& blueLine);
 
 //! Check if polygon red and polygon blue are equal
-template<> bool TeEquals(const TePolygon& redPol, const TePolygon& bluePol);
+template<>
+TL_DLL bool TeEquals(const TePolygon& redPol, const TePolygon& bluePol);
+
+//! Check if polygonset1 and polygonset1 are equal
+template<>
+TL_DLL bool TeEquals( const TePolygonSet& ps1, const TePolygonSet& ps2 );
 
 //! Check if box 1 and box 2 are equal 
-template<> bool TeEquals(const TeBox& bx1, const TeBox& bx2);
+template<>
+TL_DLL bool TeEquals(const TeBox& bx1, const TeBox& bx2);
 
 //! Check if cell 1 and cell 2 are equal
-template<> bool TeEquals(const TeCell& cell1, const TeCell& cell2);
+template<>
+TL_DLL bool TeEquals(const TeCell& cell1, const TeCell& cell2);
 /** @} */ 
 
-
 /** @defgroup TeDisjoint Disjoint test
- *  @ingroup TopologicalOperators
- *  Check if two objects are disjoint.
- *  Applies to all geometries.
- *  TeDisjoint(x, y) => (x inter y = false)
- *                      (I(x) inter I(y) = false) ^ (I(x) inter B(y) = false) ^ (B(x) inter I(y) = false) ^ (B(x) inter B(y) = false)
- *  @{
+    @ingroup TopologicalOperators
+ Check if two objects are disjoint.
+\verbatim
+ Applies to all geometries.
+ TeDisjoint(x, y) => (x inter y = false)
+                     (I(x) inter I(y) = false) ^ (I(x) inter B(y) = false) ^ (B(x) inter I(y) = false) ^ (B(x) inter B(y) = false)
+\endverbatim
+@{
 */
-
 //! Check if coordinate cl and coordinate c2 are disjoint
-bool TeDisjoint(const TeCoord2D& c1, const TeCoord2D& c2);
+TL_DLL bool TeDisjoint(const TeCoord2D& c1, const TeCoord2D& c2);
 
 //! Check if coordinate and box are disjoint
-bool TeDisjoint(const TeCoord2D& c, const TeBox& b);
+TL_DLL bool TeDisjoint(const TeCoord2D& c, const TeBox& b);
 
 //! Check if box 1 and box 2 are disjoint
-bool TeDisjoint(const TeBox& bx1, const TeBox& bx2);
+TL_DLL bool TeDisjoint(const TeBox& bx1, const TeBox& bx2);
 
 //! Check if coordinate and line are disjoint
-bool TeDisjoint(const TeCoord2D& c, const TeLine2D& l);
+TL_DLL bool TeDisjoint(const TeCoord2D& c, const TeLine2D& l);
 
 //! Check if coordinate and polygon are disjoint
-bool TeDisjoint(const TeCoord2D& c, const TePolygon& pol);
+TL_DLL bool TeDisjoint(const TeCoord2D& c, const TePolygon& pol);
 
 //! Check if point l and point 2 are disjoint
-bool TeDisjoint(const TePoint& p1, const TePoint& p2);
+TL_DLL bool TeDisjoint(const TePoint& p1, const TePoint& p2);
 
 //! Check if point and object are disjoint
-bool TeDisjoint(const TePoint& p, const TeLine2D& l);
+TL_DLL bool TeDisjoint(const TePoint& p, const TeLine2D& l);
 
 //! Check if point and object are disjoint
-bool TeDisjoint(const TePoint& p, const TePolygon& pol);
+TL_DLL bool TeDisjoint(const TePoint& p, const TePolygon& pol);
 
 //! Check if lines are disjoint
-bool TeDisjoint(const TeLine2D& redLine, const TeLine2D& blueLine);
+TL_DLL bool TeDisjoint(const TeLine2D& redLine, const TeLine2D& blueLine);
 
 //! Check if line and polygon are disjoint
-bool TeDisjoint(const TeLine2D& l, const TePolygon& pol);
+TL_DLL bool TeDisjoint(const TeLine2D& l, const TePolygon& pol);
 
 //! Check if polygons are disjoint
-bool TeDisjoint(const TePolygon& redPol, const TePolygon& bluePol);
+TL_DLL bool TeDisjoint(const TePolygon& redPol, const TePolygon& bluePol);
 
 //! Check if cell 1 and cell 2 are disjoint
-bool TeDisjoint(const TeCell& cell1, const TeCell& cell2);
+TL_DLL bool TeDisjoint(const TeCell& cell1, const TeCell& cell2);
 
 //! Check if cell and line are disjoint
-bool TeDisjoint(const TeCell& cell, const TeLine2D& line);
+TL_DLL bool TeDisjoint(const TeCell& cell, const TeLine2D& line);
 
 //! Check if cell and polygon are disjoint
-bool TeDisjoint(const TeCell& cell, const TePolygon& pol);
+TL_DLL bool TeDisjoint(const TeCell& cell, const TePolygon& pol);
 
 //! Check if cell and point are disjoint
-bool TeDisjoint(const TeCell& cell, const TePoint& point);
+TL_DLL bool TeDisjoint(const TeCell& cell, const TePoint& point);
 /** @} */
 
 
 /** @defgroup TeIntersects Intersects test
- *  @ingroup TopologicalOperators
- *  Check if one object intersects another object.
- *  Applies to all geometries.
- *  TeIntersects(x, y) => !TeDisjoint(x, y)
- *                     => (I(x) inter I(y) = true) v (I(x) inter B(y) = true) v (B(x) inter I(y) = true) v (B(x) inter B(y) = true)
- *  @{
- */
-
+    @ingroup TopologicalOperators
+	Check if one object intersects another object.
+\verbatim
+  Applies to all geometries.
+  TeIntersects(x, y) => !TeDisjoint(x, y)
+                     => (I(x) inter I(y) = true) v (I(x) inter B(y) = true) v (B(x) inter I(y) = true) v (B(x) inter B(y) = true)
+\endverbatim
+@{
+*/
 //! If a specialized function is not used, returns the disjoint negation
-template<class T1, class T2> inline bool TeIntersects(const T1& o1, const T2& o2)
+
+template<class T1, class T2>
+bool TeIntersects(const T1& o1, const T2& o2)
 {
 	return !TeDisjoint(o1, o2);
 }
 
 //! Check if coordinate and box intersects
-template<> bool TeIntersects(const TeCoord2D& c, const TeBox& b);
+template<>
+TL_DLL bool TeIntersects(const TeCoord2D& c, const TeBox& b);
 
 //! Check if point and box intersects
-template<> bool TeIntersects(const TePoint& p, const TeBox& b);
+template<>
+TL_DLL bool TeIntersects(const TePoint& p, const TeBox& b);
 
 //! Check if boxes intersects
-template<> bool TeIntersects(const TeBox& bx1, const TeBox& bx2);
-
+template<>
+TL_DLL bool TeIntersects(const TeBox& bx1, const TeBox& bx2);
 /** @} */
 
 
 /** @defgroup TeTouches Touch test
- *  @ingroup TopologicalOperators
- *  Check if two objects touche.
- *  Applies to A/A, L/L, L/A, P/A, P/L.
- *  TeTouches(x, y) => (I(x) inter I(y) = false) ^ (x inter y = true)
- *				    => (I(x) inter I(y) = false) ^ ((B(x) inter I(y) = true) v (I(x) inter B(y) = true) v (B(x) inter B(y) = true))
- *  @{
- */
+	@ingroup TopologicalOperators
+	Check if two objects touches.
+\verbatim
+ Applies to A/A, L/L, L/A, P/A, P/L.
+ TeTouches(x, y) => (I(x) inter I(y) = false) ^ (x inter y = true)
+				    => (I(x) inter I(y) = false) ^ ((B(x) inter I(y) = true) v (I(x) inter B(y) = true) v (B(x) inter B(y) = true))
+ \endverbatim
+ @{
+*/
 
 //! Check if coordinate and line touches
-bool TeTouches(const TeCoord2D& c, const TeLine2D& l);
+TL_DLL bool TeTouches(const TeCoord2D& c, const TeLine2D& l);
 
 //! Check if coordinate and polygon touches
-bool TeTouches(const TeCoord2D& c, const TePolygon& pol);
+TL_DLL bool TeTouches(const TeCoord2D& c, const TePolygon& pol);
 
 //! Check if point and object touches
-bool TeTouches(const TePoint& p, const TeLine2D& l);
+TL_DLL bool TeTouches(const TePoint& p, const TeLine2D& l);
 
 //! Check if point and object touches
-bool TeTouches(const TePoint& p, const TePolygon& pol);
+TL_DLL bool TeTouches(const TePoint& p, const TePolygon& pol);
 
 //! Check if line and line touches
-bool TeTouches(const TeLine2D& redLine, const TeLine2D& blueLine);
+TL_DLL bool TeTouches(const TeLine2D& redLine, const TeLine2D& blueLine);
 
 //! Check if line and polygon
-bool TeTouches(const TeLine2D& l, const TePolygon& pol);
+TL_DLL bool TeTouches(const TeLine2D& l, const TePolygon& pol);
 
 //! Check if polygons touches
-bool TeTouches(const TePolygon& redPol, const TePolygon& bluePol);
+TL_DLL bool TeTouches(const TePolygon& redPol, const TePolygon& bluePol);
 
 //! Check if boxes touches
-bool TeTouches(const TeBox& bx1, const TeBox& bx2);
+TL_DLL bool TeTouches(const TeBox& bx1, const TeBox& bx2);
 
 //! Check if cells touches
-bool TeTouches(const TeCell& c1, const TeCell& c2);
+TL_DLL bool TeTouches(const TeCell& c1, const TeCell& c2);
 
 //! Check if cell and line touches
-bool TeTouches(const TeLine2D& line, const TeCell& cell);
+TL_DLL bool TeTouches(const TeLine2D& line, const TeCell& cell);
 
 //! Check if cell and polygon touches
-bool TeTouches(const TeCell& c1, const TePolygon& poly);
+TL_DLL bool TeTouches(const TeCell& c1, const TePolygon& poly);
 
 //! Check if cell and point touches
-bool TeTouches( const TePoint& point, const TeCell& c1);
+TL_DLL bool TeTouches( const TePoint& point, const TeCell& c1);
 /** @} */
 
-
 /** @defgroup TeCrosses Crosses test
- *  @ingroup TopologicalOperators
- *  Check if one object crosses another object.
- *  TeCrosses(x, y) => dim(I(x) inter I(y)) = (max(dim(I(x)), dim(I(y))) - 1) ^ (x inter y != x) ^ (x inter y != y) 
- *  Case 1: x = TeLine2D and y = TePolygon
- *          => (I(x) inter I(y) = true) ^ (I(x) inter E(y) = true)
- *  Case 2: x = TeLine2D and y = TeLine2D
- *          => dim(I(x) inter I(y)) = 0
- *  @{
- */
+    @ingroup TopologicalOperators
+	Check if one object crosses another object.
+\verbatim
+  TeCrosses(x, y) => dim(I(x) inter I(y)) = (max(dim(I(x)), dim(I(y))) - 1) ^ (x inter y != x) ^ (x inter y != y) 
+  Case 1: x = TeLine2D and y = TePolygon
+          => (I(x) inter I(y) = true) ^ (I(x) inter E(y) = true)
+  Case 2: x = TeLine2D and y = TeLine2D
+          => dim(I(x) inter I(y)) = 0
+\endverbatim
+@{
+*/
 
 //! Check if red line crosses blue line
-bool TeCrosses(const TeLine2D& redLine, const TeLine2D& blueLine);
+TL_DLL bool TeCrosses(const TeLine2D& redLine, const TeLine2D& blueLine);
 
 //! Check if line crosses polygon
-bool TeCrosses(const TeLine2D& l, const TePolygon& pol);
+TL_DLL bool TeCrosses(const TeLine2D& l, const TePolygon& pol);
 
 //! Check if line and cell crosses
-bool TeCrosses(const TeLine2D& l, const TeCell& cell);
+TL_DLL bool TeCrosses(const TeLine2D& l, const TeCell& cell);
 /** @} */
 
 
 /** @defgroup TeWithin Within test
  *  @ingroup TopologicalOperators
  *  Check if one object is within another object.
- *  TeWithin(x, y) => (x inter y = x) ^ (I(x) inter I(y) = true)
- *  Case 1: P/P, P/L and P/A
- *          => (I(x) inter I(y) = true)
- *  Case 2: L/L and A/A
- *          => (I(x) inter I(y) = true) ^ (I(x) inter E(y) = false) ^ (B(x) inter E(y) = false) ^ (B(x) inter B(y) = false)
- *  Case 3: L/A
- *          => (I(x) inter I(y) = true) ^ (I(x) inter E(y) = false) ^ (B(x) inter E(y) = false) ^ (B(x) inter B(y) = false) ^ (I(x) inter B(y) = false)
- *  @{
+ \verbatim
+   TeWithin(x, y) => (x inter y = x) ^ (I(x) inter I(y) = true)
+   Case 1: P/P, P/L and P/A
+           => (I(x) inter I(y) = true)
+   Case 2: L/L and A/A
+           => (I(x) inter I(y) = true) ^ (I(x) inter E(y) = false) ^ (B(x) inter E(y) = false) ^ (B(x) inter B(y) = false)
+   Case 3: L/A
+           => (I(x) inter I(y) = true) ^ (I(x) inter E(y) = false) ^ (B(x) inter E(y) = false) ^ (B(x) inter B(y) = false) ^ (I(x) inter B(y) = false)
+\endverbatim
+ @{
 */
 
 //! Check if coordinate 1 is within coordinate 2
-bool TeWithin(const TeCoord2D& c1, const TeCoord2D& c2);
+TL_DLL bool TeWithin(const TeCoord2D& c1, const TeCoord2D& c2);
 
 //! Check if coordinate is within a box
-bool TeWithin(const TeCoord2D& c, const TeBox& b);
+TL_DLL bool TeWithin(const TeCoord2D& c, const TeBox& b);
 
 //! Check if a cordinate is within a line
 bool TeWithin(const TeCoord2D& c, const TeLine2D& l);
 
 //! Check if a cordinate is within a polygon
-bool TeWithin(const TeCoord2D& c, const TePolygon& pol);
+TL_DLL bool TeWithin(const TeCoord2D& c, const TePolygon& pol);
 
 //! Check if point 1 is within point 2
-bool TeWithin(const TePoint& p1, const TePoint& p2);
+TL_DLL bool TeWithin(const TePoint& p1, const TePoint& p2);
 
 //! Check if point is within object
-bool TeWithin(const TePoint& p, const TeLine2D& l);
+TL_DLL bool TeWithin(const TePoint& p, const TeLine2D& l);
 
 //! Check if point is within object
-bool TeWithin(const TePoint& p, const TePolygon& pol);
+TL_DLL bool TeWithin(const TePoint& p, const TePolygon& pol);
 
 //! Check if red line is within blue line
-bool TeWithin(const TeLine2D& redLine, const TeLine2D& blueLine);
+TL_DLL bool TeWithin(const TeLine2D& redLine, const TeLine2D& blueLine);
 
 //! Check if line is within polygon
-bool TeWithin(const TeLine2D& l, const TePolygon& pol);
+TL_DLL bool TeWithin(const TeLine2D& l, const TePolygon& pol);
 
 //! Check if red polygon is within blue polygon
-bool TeWithin(const TePolygon& redPol, const TePolygon& bluePol);
+TL_DLL bool TeWithin(const TePolygon& redPol, const TePolygon& bluePol);
 
 //! Check if box1 is within box2
-bool TeWithin(const TeBox& bx1, const TeBox& bx2);
+TL_DLL bool TeWithin(const TeBox& bx1, const TeBox& bx2);
 
 //! Check if cell1 is within cell2
-bool TeWithin(const TeCell& cell1, const TeCell& cell2);
+TL_DLL bool TeWithin(const TeCell& cell1, const TeCell& cell2);
 
 //! Check if line is within cell
-bool TeWithin(const TeLine2D& line, const TeCell& cell);
+TL_DLL bool TeWithin(const TeLine2D& line, const TeCell& cell);
 
 //! Check if cell is within polygon
-bool TeWithin(const TeCell& cell, const TePolygon& poly);
+TL_DLL bool TeWithin(const TeCell& cell, const TePolygon& poly);
 
 //! Check if point is within cell
-bool TeWithin(const TePoint& point, const TeCell& cell);
+TL_DLL bool TeWithin(const TePoint& point, const TeCell& cell);
 /** @} */
 
 /** @defgroup TeContains Contains test
- *  @ingroup TopologicalOperators
- *  Check if one object contains another object.
- *  TeContains(x, y) = TeWithin(y, x)
- *  @{
- */
+    @ingroup TopologicalOperators
+    Check if one object contains another object.
+    TeContains(x, y) = TeWithin(y, x)
+@{
+*/
 
 //! If a specialized function is not used, returns false
-template<class T1, class T2> inline bool TeContains(const T1& o1, const T2& o2)
+template<class T1, class T2>
+inline bool TeContains(const T1& o1, const T2& o2)
 {
 	return TeWithin(o2, o1);
 }
 /** @} */
 
 /** @defgroup TeOverlaps Overlaps test
- *  @ingroup TopologicalOperators
- *  Check if one object overlaps another object.
- *  TeOverlaps(x, y) => (dim(I(x)) = dim(I(y)) = dim(I(x) inter I(y))) ^ (x inter y != x) ^ (x inter y != y)
- *  Case 1: (x = TePolygon  and y = TePolygon)
- *          => (I(x) inter I(y) = true) ^ (I(x) inter E(y) = true) ^ (E(x) inter I(y) = true)
- *  Case 2: x = TeLine2D and y = TeLine2D
- *          => (dim(I(x) inter I(y)) = 1) ^ (I(x) inter E(y) = true) ^ (E(x) inter I(y) = true)
- *  @{
- */
+	@ingroup TopologicalOperators
+    Check if one object overlaps another object.
+\verbatim
+   TeOverlaps(x, y) => (dim(I(x)) = dim(I(y)) = dim(I(x) inter I(y))) ^ (x inter y != x) ^ (x inter y != y)
+   Case 1: (x = TePolygon  and y = TePolygon)
+           => (I(x) inter I(y) = true) ^ (I(x) inter E(y) = true) ^ (E(x) inter I(y) = true)
+   Case 2: x = TeLine2D and y = TeLine2D
+           => (dim(I(x) inter I(y)) = 1) ^ (I(x) inter E(y) = true) ^ (E(x) inter I(y) = true)
+ \endverbatim
+@{
+*/
 
 //! Check if red red overlaps blue line
-bool TeOverlaps(const TeLine2D& redLine, const TeLine2D& blueLine);
+TL_DLL bool TeOverlaps(const TeLine2D& redLine, const TeLine2D& blueLine);
 
 //! Check if red polygon overlaps blue polygon
-bool TeOverlaps(const TePolygon& redPol, const TePolygon& bluePol);
+TL_DLL bool TeOverlaps(const TePolygon& redPol, const TePolygon& bluePol);
 
 //! Check if cell1 overlaps cell2
-bool TeOverlaps(const TeCell& cell1, const TeCell& cell2);
+TL_DLL bool TeOverlaps(const TeCell& cell1, const TeCell& cell2);
 
 //! Check if cell overlaps polygon
-bool TeOverlaps(const TeCell& cell, const TePolygon& poly);
+TL_DLL bool TeOverlaps(const TeCell& cell, const TePolygon& poly);
 /** @} */
 
 
 /** @defgroup TeCoveredBy Covered by test
- *  @ingroup TopologicalOperators
- *  Check if one object is covered by another object.
- *  TeCoveredBy(x, y) => (x inter y = x) ^ (I(x) inter I(y) = true)
- *  - Case 1: (x = TePolygon and y = TePolygon) or (x = TeLine2D and y = TeLine2D)
- *            => (I(x) inter I(y) = true) ^ (I(x) inter E(y) = false) ^ (B(x) inter E(y) = false) ^ (B(x) inter B(y) = true)
- *  - Case 2: x = TeLine2D and y = TePolygon
- *            => (I(x) inter I(y) = true) ^ (I(x) inter E(y) = false) ^ (B(x) inter E(y) = false) ^ ((B(x) inter B(y) = true) v (I(x) inter B(y) = true))
- *  @{
+  @ingroup TopologicalOperators
+  Check if one object is covered by another object.
+  \verbatim
+ TeCoveredBy(x, y) => (x inter y = x) ^ (I(x) inter I(y) = true)
+   - Case 1: (x = TePolygon and y = TePolygon) or (x = TeLine2D and y = TeLine2D)
+             => (I(x) inter I(y) = true) ^ (I(x) inter E(y) = false) ^ (B(x) inter E(y) = false) ^ (B(x) inter B(y) = true)
+   - Case 2: x = TeLine2D and y = TePolygon
+             => (I(x) inter I(y) = true) ^ (I(x) inter E(y) = false) ^ (B(x) inter E(y) = false) ^ ((B(x) inter B(y) = true) v (I(x) inter B(y) = true))
+ \endverbatim
+ @{
  */
 
 //! Check if red line is covered by blue line
-bool TeCoveredBy(const TeLine2D& redLine, const TeLine2D& blueLine);
+TL_DLL bool TeCoveredBy(const TeLine2D& redLine, const TeLine2D& blueLine);
 
 //! Check if line is covered by polygon
-bool TeCoveredBy(const TeLine2D& l, const TePolygon& pol);
+TL_DLL bool TeCoveredBy(const TeLine2D& l, const TePolygon& pol);
 
 //! Check if red polygon is covered by blue polygon
-bool TeCoveredBy(const TePolygon& redPol, const TePolygon& bluePol);
+TL_DLL bool TeCoveredBy(const TePolygon& redPol, const TePolygon& bluePol);
 
 //! Check if cell1 is covered by cell2
-bool TeCoveredBy(const TeCell& cell1, const TeCell& cell2);
+TL_DLL bool TeCoveredBy(const TeCell& cell1, const TeCell& cell2);
 
 //! Check if polygon is covered by cell
-bool TeCoveredBy(const TePolygon& poly, const TeCell& cell);
+TL_DLL bool TeCoveredBy(const TePolygon& poly, const TeCell& cell);
 
 //! Check if line is covered by cell
-bool TeCoveredBy(const TeLine2D& line, const TeCell& cell);
-
+TL_DLL bool TeCoveredBy(const TeLine2D& line, const TeCell& cell);
 /** @} */
 
 /** @defgroup TeCovers Covers test
- *  @ingroup TopologicalOperators
- *  Check if one object covers another object.
- *  TeCovers(x, y) => TeCoveredBy(y, x)
- *  @{
- */
-template<typename T1, typename T2> inline bool TeCovers(T1& o1, T2& o2)
+    @ingroup TopologicalOperators
+    Check if one object covers another object.
+    TeCovers(x, y) => TeCoveredBy(y, x)
+@{
+*/
+//! Check if one object covers another object
+template<typename T1, typename T2>
+inline bool TeCovers(T1& o1, T2& o2)
 {
 	return TeCoveredBy(o2, o1);
 }
@@ -404,81 +431,69 @@ template<typename T1, typename T2> inline bool TeCovers(T1& o1, T2& o2)
  *  Return the relation between two objects.
  *  @{
  */
-
-/*! \fn short TeRelation(const TeCoord2D& c, const TeLine2D& l)
-    \brief Returns the relation between coordinate c and line l.
+/** \brief Returns the relation between coordinate c and line l.
 	\param c  The coordinate.
 	\param l  The line.
-
-	This function may returns: INSIDE, OUTSIDE or BOUNDARY.
-	Obs: Doesn't do box elimination, just uses from TeIsOnLine(coordinate, line) elimination
+	\return one of the relations: INSIDE, OUTSIDE or BOUNDARY.
+	\note It doesn't do box elimination, just uses from TeIsOnLine(coordinate, line) elimination
  */
-short TeRelation(const TeCoord2D& c, const TeLine2D& l);
-
+TL_DLL short TeRelation(const TeCoord2D& c, const TeLine2D& l);
  
- /*! \fn short TeRelation(const TeCoord2D& c, const TeLinearRing& ring)
-    \brief Point in polygon inside/outside/boundary code.
-	\param c    The coordinate to test.
-	\param ring The simple polygon to test.
-
-	Check if point is INSIDE/OUTSIDE/BOUNDARY of a given ring.
-	The ring is treated as a simple polygon (no holes).
-	Obs: Do box elimination.
+ /** \brief Point in polygon inside/outside/boundary code.
+	 \param c    The coordinate to test.
+	 \param r    The simple polygon to test.
+	 \return one of the relations: INSIDE, OUTSIDE or BOUNDARY.
+	 \note	The ring is treated as a simple polygon (no holes). Does box elimination.
 */
-short TeRelation(const TeCoord2D& c, const TeLinearRing& r);
+TL_DLL short TeRelation(const TeCoord2D& c, const TeLinearRing& r);
 
-/*! \fn short TeRelation(const TeCoord2D& c, const TePolygon& pol);
-    \brief Point in polygon inside/outside/boundary code.
+/** \brief Coordinate in polygon inside/outside/boundary code.
 	\param c    The coordinate to test.
 	\param pol  The polygon to test.
-
-	Check if point is INSIDE/OUTSIDE/BOUNDARY.
-	Obs: Doesn't do box elimination, just uses from TeRelation(coordinate, ring) elimination.
+	\return one of the relations: INSIDE, OUTSIDE or BOUNDARY.
+	\note It doesn't do box elimination, just uses from TeRelation(coordinate, line) elimination
 */
-short TeRelation(const TeCoord2D& c, const TePolygon& pol);
+TL_DLL short TeRelation(const TeCoord2D& c, const TePolygon& pol);
 
-short TeRelation(const TePoint& p, const TePolygon& pol); 
+/** \brief Point in polygon inside/outside/boundary code.
+	\param p    The coordinate to test.
+	\param pol  The polygon to test.
+	\return one of the relations: INSIDE, OUTSIDE or BOUNDARY.
+	\note It doesn't do box elimination, just uses from TeRelation(coordinate, line) elimination
+*/
+TL_DLL short TeRelation(const TePoint& p, const TePolygon& pol); 
 
-/*! \fn short TeRelation(const TeCoord2D& c, const TePolygonSet& pSet)
-    \brief Point in polygon set inside/outside/boundary code.
+/** \brief Point in polygon set inside/outside/boundary code.
 	\param c     The coordinate to test.
 	\param pSet  The polygon set to test.
-
-	Check if point is INSIDE/OUTSIDE/BOUNDARY.
-	Obs: Do box elimination.
+	\return one of the relations: INSIDE, OUTSIDE or BOUNDARY.
+	\note Does box elimination.
 */
-short TeRelation(const TeCoord2D& c, const TePolygonSet& pSet);
+TL_DLL short TeRelation(const TeCoord2D& c, const TePolygonSet& pSet);
 
-/*! \fn short TeRelation(const TeLine2D& lRed, const TeLine2D& lBlue, const short& relation)
-    \brief This function returns the relation between two lines.
+/** \brief This function returns the relation between two lines.
 	\param lRed     The first line.
 	\param lBlue    The second line.
-	\param relation The relation that stop the search.
-
-	This function returns the relation between lines. May be: TeDISJOINT, TeTOUCHES, TeWITHIN, TeCONTAINS, TeCROSSES, TeOVERLAPS, TeCOVEREDBY, TeCOVERS, TeEQUALS.
-	Obs: Doesn't do box elimination. You must implement the test in your own functions.
+	\param relation To return the relation that stop the search: TeDISJOINT, TeTOUCHES, TeWITHIN, TeCONTAINS, TeCROSSES, TeOVERLAPS, TeCOVEREDBY, TeCOVERS, TeEQUALS
+	\note Doesn't do box elimination. You must implement the test in your own functions.
 */
-short TeRelation(const TeLine2D& lRed, const TeLine2D& lBlue, const short& relation);
+TL_DLL short TeRelation(const TeLine2D& lRed, const TeLine2D& lBlue, const short& relation);
 
-/*! \fn short TeRelation(const TeLine2D& line, const TePolygon& pol)
-    \brief This function returns the relation between a line and a polygon.
+/** \brief This function returns the relation between a line and a polygon.
 	\param line   The line.
 	\param pol    The polygon.
-
-	This function returns the relation between a line and a polygon. May be: TeDISJOINT, TeTOUCHES, TeWITHIN (THE LINE IS WITHIN), TeCROSSES, TeCOVEREDBY (THE LINE IS COVERED BY).
-	Obs: Doesn't do box elimination. You must implement the test in your own functions.
+	\return one of the relations:  TeDISJOINT, TeTOUCHES, TeWITHIN (THE LINE IS WITHIN), TeCROSSES, TeCOVEREDBY (THE LINE IS COVERED BY).
+	\note Doesn't do box elimination. You must implement the test in your own functions.
 */
-short TeRelation(const TeLine2D& line, const TePolygon& pol);
+TL_DLL short TeRelation(const TeLine2D& line, const TePolygon& pol);
 
-/*! \fn short TeRelation(const TePolygon& pRed, const TePolygon& pBlue)
-    \brief This function returns the relation between two polygons.
+/** \brief This function returns the relation between two polygons.
 	\param pRed   The first polygon.
 	\param pBlue  The second polygon.
-
-	This function returns the relation between a line and a polygon. May be: TeEQUALS, TeDISJOINT, TeTOUCHES, TeWITHIN (pRed IS WITHIN pBlue), TeCONTANS (pBlue CONTAINS pRed), TeOVERLAPS, TeCOVEREDBY (pRed IS COVERED BY pBlue) or TeCOVERS (pRed COVERS pBlue).
-	Obs: Doesn't do box elimination. You must implement the test in your own functions.
+	\return one of the relations: TeEQUALS, TeDISJOINT, TeTOUCHES, TeWITHIN (pRed IS WITHIN pBlue), TeCONTANS (pBlue CONTAINS pRed), TeOVERLAPS, TeCOVEREDBY (pRed IS COVERED BY pBlue) or TeCOVERS (pRed COVERS pBlue).
+	\note Doesn't do box elimination. You must implement the test in your own functions.
 */
-short TeRelation(const TePolygon& pRed, const TePolygon& pBlue);
+TL_DLL short TeRelation(const TePolygon& pRed, const TePolygon& pBlue);
 /** @}	*/
 /** @}	*/
 
@@ -487,11 +502,10 @@ short TeRelation(const TePolygon& pRed, const TePolygon& pBlue);
  *  Box tests.
  *  @{
 */
+//! Check if box1 is DISJOINT or TOUCHes box2
+TL_DLL bool TeDisjointOrTouches(const TeBox& bx1, const TeBox& bx2);
 
-//! Check if box1 is disjoint or touches box2
-bool TeDisjointOrTouches(const TeBox& bx1, const TeBox& bx2);
-
-//! Check if coordinate c is within or touches segments c1 and c2 box
+//! Check if coordinate c is WITHIN or TOUCHes segments c1 and c2 
 bool TeWithinOrTouches(const TeCoord2D& c, const TeCoord2D& c1, const TeCoord2D& c2);
 /** @} */
 
@@ -501,8 +515,9 @@ bool TeWithinOrTouches(const TeCoord2D& c, const TeCoord2D& c1, const TeCoord2D&
  *  Geometry tests.
  *  @{
 */
+//! Check if geom1 is WITHIN, COVERED BY or EQUAL to geom2
+
 
-//! Check if geom1 is within or is covered by or is equal to geom2
 template<class T1, class T2> 
 bool TeWithinOrCoveredByOrEquals(const T1& geom1, const T2& geom2)
 {
@@ -514,22 +529,21 @@ bool TeWithinOrCoveredByOrEquals(const T1& geom1, const T2& geom2)
 	return false;
 }
 
-//! Check if box1 is within or is covered by or is equal to box2
+//! Check if box1 is WITHIN, COVERED BY or EQUAL to box2
 template<>
-bool TeWithinOrCoveredByOrEquals(const TeBox& bx1, const TeBox& bx2);
+TL_DLL bool TeWithinOrCoveredByOrEquals(const TeBox& bx1, const TeBox& bx2);
 
-//! Check if line1 is within or is covered by or is equal to line2
+//! Check if line1 is WITHIN, COVERED BY or EQUAL to line2
 template<>
-bool TeWithinOrCoveredByOrEquals(const TeLine2D& line1, const TeLine2D& line2);
+TL_DLL bool TeWithinOrCoveredByOrEquals(const TeLine2D& line1, const TeLine2D& line2);
 
-//! Check if line1 is within or is covered by to pol
+//! Check if line1 is WITHIN or COVERED BY to pol
 template<>
-bool TeWithinOrCoveredByOrEquals(const TeLine2D& line1, const TePolygon& pol);
+TL_DLL bool TeWithinOrCoveredByOrEquals(const TeLine2D& line1, const TePolygon& pol);
 
-//! Check if pol1 is within or is covered by or is equal to pol2
+//! Check if pol1 is WITHIN, COVERED BY or EQUAL to pol2
 template<>
-bool TeWithinOrCoveredByOrEquals(const TePolygon& pol1, const TePolygon& pol2);
-
+TL_DLL bool TeWithinOrCoveredByOrEquals(const TePolygon& pol1, const TePolygon& pol2);
 /** @} */
 
 
@@ -539,20 +553,18 @@ bool TeWithinOrCoveredByOrEquals(const TePolygon& pol1, const TePolygon& pol2);
  *  @{
  */
 
-/*! \fn bool TeIntersection(const TeBox& bx1, const TeBox& bx2, TeBox& bout)
-    \brief Performs the intersection between  box b1 and b2, returning the resulting box bout.
+/** \brief Performs the intersection between  box b1 and b2, returning the resulting box bout.
 	\param bx1  The first box to do the intersection.
 	\param bx2  The second box to do the intersection.
 	\param bout The box formed by the intersection of bx1 and bx2.
 */
-bool TeIntersection(const TeBox& bx1, const TeBox& bx2, TeBox& bout);
+TL_DLL bool TeIntersection(const TeBox& bx1, const TeBox& bx2, TeBox& bout);
 
-/*! \fn TeCoordPairVect	TeGetIntersections(const TePolygon &poly, const double& y);
-    \brief Return the segments that intersept the poly polygon in the line y.
+/** \brief Returns the segments that intersept the poly polygon in the line y.
 	\param poly    A polygon.
 	\param y    The ordinate that cuts the polygons edges.
 */
-TeCoordPairVect	TeGetIntersections(const TePolygon &poly, const double& y);
+TL_DLL TeCoordPairVect	TeGetIntersections(const TePolygon &poly, const double& y);
 /** @} */
 
 
@@ -562,12 +574,11 @@ TeCoordPairVect	TeGetIntersections(const TePolygon &poly, const double& y);
  *  @{
  */
 
-/*! \fn TeBox TeUnion(const TeBox& bx1, const TeBox& bx2)
-    \brief Combine two box, make one that includes both.
+/** \brief Combine two box, make one that includes both.
 	\param bx1  The first box to do the union.
 	\param bx2  The second box to do the union.
 */
-TeBox TeUnion(const TeBox& bx1, const TeBox& bx2);
+TL_DLL TeBox TeUnion(const TeBox& bx1, const TeBox& bx2);
 
 /** @} */
 
@@ -576,48 +587,43 @@ TeBox TeUnion(const TeBox& bx1, const TeBox& bx2);
  *  Functions that finds the localization of objects.
  *  @{
  */
-
-/*! \fn bool TePointInPoly(const TeCoord2D& c, const TeLinearRing& r)
-    \brief Point in polygon inside/outside/boundary code.
+/** \brief Point in polygon inside/outside/boundary code.
 	\param c    The coordinate to test.
 	\param r The simple polygon to test.
 
-	Check if point is INSIDE of a given ring.
-	The ring is treated as a simple polygon (no holes).
-	Adapted from:
-	Samosky, Joseph, "SectionView: A system for interactively specifying and
-    visualizing sections through three-dimensional medical image data,
-    M.S. Thesis, Department of Electrical Engineering and Computer Science,
-    Massachusetts Institute of Technology, 1993.
-	Obs: Doesn't do box elimination.
+	\note Check if point is INSIDE of a given ring.
+	      The ring is treated as a simple polygon (no holes).
+	      Adapted from:
+		  Samosky, Joseph, "SectionView: A system for interactively specifying and
+		  visualizing sections through three-dimensional medical image data,
+		  M.S. Thesis, Department of Electrical Engineering and Computer Science,
+		  Massachusetts Institute of Technology, 1993.
+		 Obs: Doesn't do box elimination.
 */
-bool TePointInPoly(const TeCoord2D& c, const TeLinearRing& r);
+TL_DLL bool TePointInPoly(const TeCoord2D& c, const TeLinearRing& r);
 
-/*! \fn bool TeIsOnSegment(const TeCoord2D& c, const TeCoord2D& c1, const TeCoord2D& c2)
-    \brief Check if coordinate c is on segment (segment is closed).
+/** \brief Check if coordinate c is on segment (segment is closed).
 	\param c   The coordinate to be tested.
 	\param c1  The first segment's coordinate.
 	\param c2  The second segment's coordinate.
 */
-bool TeIsOnSegment(const TeCoord2D& c, const TeCoord2D& c1, const TeCoord2D& c2);
+TL_DLL bool TeIsOnSegment(const TeCoord2D& c, const TeCoord2D& c1, const TeCoord2D& c2);
 
-/*! \fn bool TeIsOnLine(const TeCoord2D& c, const TeLine2D& l)
-    \brief Check if coordinate c is on line boundary or on line interior (see explanation above for definition of boundary and interior of a line).
+/** \brief Check if coordinate c is on line boundary or on line interior (see explanation above for definition of boundary and interior of a line).
 	\param c   The coordinate to be tested.
 	\param l   The line used in the test.
 
 	Obs: Do box elimination.
 */
-bool TeIsOnLine(const TeCoord2D& c, const TeLine2D& l);
+TL_DLL bool TeIsOnLine(const TeCoord2D& c, const TeLine2D& l);
 
-/*! \fn bool TeLocateLineSegment(TeCoord2D& pin, TeLine2D& line, int& segment, double tol = 0.0)
-    \brief Locate the nearest line segment of a coordinate.
+/** \brief Locate the nearest line segment of a coordinate.
 	\param pin		The coordinate.
 	\param line		The line.
 	\param segment  The position of the segment in the line  
 	\param tol		Tolerance.
 */
-bool TeLocateLineSegment(TeCoord2D& pin, TeLine2D& line, int& segment, double tol = 0.0);
+TL_DLL bool TeLocateLineSegment(TeCoord2D& pin, TeLine2D& line, int& segment, double tol = 0.0);
 /** @} */
 
 /** @defgroup TeConvexHull Functions to compute the Convex Hull
@@ -625,26 +631,27 @@ bool TeLocateLineSegment(TeCoord2D& pin, TeLine2D& line, int& segment, double to
  *  Functions that returns the convex hull of a point list.
  *  @{
  */
+ /** \brief Returns the convexhull of a given list of coords in counterclockwise.
+	 \param coordSet A list with coordinates without duplicated coordinates.
 
- /*! \fn template<class T> TePolygon TeConvexHull(const T& coordSet)
-    \brief Returns the convexhull of a given list of coords in counterclockwise.
-	\param coordSet A list with coordinates without duplicated coordinates.
-	
-	This algorithm is based on the book Computational Geometry
-	by M. de Berg, M. van Kreveld, M. Overmars and O. Schwarzkopf - Springer Verlag - pp. 6.
-	It is O(N log N).
-
+	\note This algorithm is based on the book Computational Geometry
+	      by M. de Berg, M. van Kreveld, M. Overmars and O. Schwarzkopf - Springer Verlag - pp. 6.
+	      It is O(N log N).
 */
-template<class T> TePolygon TeConvexHull(const T& coordSet);
+template<class T>
+TePolygon TeConvexHull(const T& coordSet);
 
 //! This is a explicit specialization that returns the convex hull of a TePolygon
-template<> TePolygon TeConvexHull(const TePolygon& p);
+template<>
+TL_DLL TePolygon TeConvexHull(const TePolygon& p);
 
 //! This is a explicit specialization that returns the convex hull of a TePolygonSet
-template<> TePolygon TeConvexHull(const TePolygonSet& ps);
+template<>
+TL_DLL TePolygon TeConvexHull(const TePolygonSet& ps);
 
 //! This is a explicit specialization that returns the convex hull of a TePointSet. Must be defined!
-template<> TePolygon TeConvexHull(const TePointSet& ps);
+template<>
+TL_DLL TePolygon TeConvexHull(const TePointSet& ps);
 
 /** @} */
 
@@ -652,13 +659,11 @@ template<> TePolygon TeConvexHull(const TePointSet& ps);
  *  @ingroup  GeometryAlgorithms
  *  @{
  */
-
 //! Given a projection "proj" returns a tolerance value in the same unit of projection to be used in geometric operations
-double TeGetPrecision(TeProjection* proj);
-
+TL_DLL double TeGetPrecision(TeProjection* proj);
 
 //! This class implements the Epsilon-tweaking used in calculus.
-class TeGeometryAlgorithmsPrecision
+class TL_DLL TeGeometryAlgorithmsPrecision
 {
 	protected:
 
@@ -704,7 +709,8 @@ class TeGeometryAlgorithmsPrecision
 		}
 };
 
-inline void TeRemoveDuplicatedCoordinates(TeLine2D& l)
+//! Removes the duplicate coordinates of a line
+TL_DLL inline void TeRemoveDuplicatedCoordinates(TeLine2D& l)
 {
 	for(unsigned int i = 0; i < l.size() - 1; ++i)
 		if(TeEquals(l[i], l[i + 1]))
@@ -716,7 +722,8 @@ inline void TeRemoveDuplicatedCoordinates(TeLine2D& l)
 	return;
 }
 
-inline void TeRemoveDuplicatedCoordinates(TePolygon& p)
+//! Removes the duplicate coordinates of a polygon
+TL_DLL inline void TeRemoveDuplicatedCoordinates(TePolygon& p)
 {
 	for(unsigned int i = 0; i < p.size(); ++i)
 		TeRemoveDuplicatedCoordinates(p[i]);		
@@ -724,11 +731,10 @@ inline void TeRemoveDuplicatedCoordinates(TePolygon& p)
 	return;
 }
 
-/*! \fn void TeReverseLine (TeLine2D& lin);
-	\brief Reverses the line.
+/** \brief Reverses the orientation of a line.
 	\param lin  The line to be reversed.
 */
-inline void TeReverseLine(TeLine2D& lin)
+TL_DLL inline void TeReverseLine(TeLine2D& lin)
 {
 	for(unsigned int i=0,j=lin.size()-1 ; i<lin.size()/2 ; ++i,--j)
 	{
@@ -740,128 +746,106 @@ inline void TeReverseLine(TeLine2D& lin)
 	return;
 }
 
-/** @} */
 
-/** @defgroup ValidationOperators Validation Operators
- *  @ingroup  GeometryAlgorithms
- *  Functions that do some validation tests.
- *  @{
- */
-
-/*! \fn bool TeIsConvex(const TeLinearRing& ring);
-    \brief Tells if a simple polygon defined as a linear ring is convex or not.
+/** \brief Verifies if a simple polygon defined as a linear ring is convex or not.
 	\param ring  The polygon to test convexity.
 */
-bool TeIsConvex(const TeLinearRing& ring);
+TL_DLL bool TeIsConvex(const TeLinearRing& ring);
 
-/*! \fn short TeOrientation(const TeLinearRing& r);
-	\brief Returns the orientation of the ring (CLOCKWISE or COUNTERCLOCKWISE);
+/** \brief Returns the orientation of the ring (CLOCKWISE or COUNTERCLOCKWISE);
 	\param r The ring to be checked.
 */
-short TeOrientation(const TeLinearRing& r);
+TL_DLL short TeOrientation(const TeLinearRing& r);
 
 /** @} */
 
-/** @defgroup MetricOperators Metric Operators
+/** @defgroup MetricOperators Metric operators
  *  @ingroup  GeometryAlgorithms
  *  Functions that do some usefull metric operations.
  *  @{
  */
 
-/*! \fn void TeGetMiddlePoint(const TeCoord2D& first, const TeCoord2D& last, TeCoord2D& middle)
-    \brief Returns the middle point of a segment.
+/** \brief Returns the middle point of a segment.
 	\param first   The first segment's coordinate.
 	\param last    The second segment's coordinate.
 	\param middle  The middle point.
 */
-void TeGetMiddlePoint(const TeCoord2D& first, const TeCoord2D& last, TeCoord2D& middle);
-
+TL_DLL void TeGetMiddlePoint(const TeCoord2D& first, const TeCoord2D& last, TeCoord2D& middle);
 
-/*! \fn double TeDistance(const TeCoord2D& c1, const TeCoord2D& c2)
-    \brief Euclidian distance between two points.
+/** \brief Calculates the Euclidian distance between two points.
 	\param c1 First coordinate;
 	\param c2 Second coordinate;
 */
-double TeDistance(const TeCoord2D& c1, const TeCoord2D& c2);
+TL_DLL double TeDistance(const TeCoord2D& c1, const TeCoord2D& c2);
 
-/*! \fn double TeLength(const TeLine2D& l)
-    \brief Returns the length of a Line 2D.
+/** \brief Returns the length of a Line 2D.
 	\param l  The line to calculate the length.	
 */
-double TeLength(const TeLine2D& l);
+TL_DLL double TeLength(const TeLine2D& l);
 
-/*! \fn double TePerpendicularDistance(const TeCoord2D& first, const TeCoord2D& last, const TeCoord2D& pin, TeCoord2D &pinter)
-    \brief Perpendicular distance from point to segment.
+/** \brief Perpendicular distance from point to segment.
 	\param first  The first segment's coordinate.
 	\param last   The second segment's coordinate.
 	\param pin    The point to get the distance from the segment.
 	\param pinter The point of intersection on the segment.
 */
-double TePerpendicularDistance(const TeCoord2D& first, const TeCoord2D& last, const TeCoord2D& pin, TeCoord2D &pinter);
+TL_DLL double TePerpendicularDistance(const TeCoord2D& first, const TeCoord2D& last, const TeCoord2D& pin, TeCoord2D &pinter);
 
-/*! \fn double TeMinimumDistance(const TeCoord2D& first, const TeCoord2D& last, const TeCoord2D& pin, TeCoord2D& pout, double tol = 0.0);
-    \brief Minimal distance from point to segment.
+/** \brief Minimal distance from point to segment.
 	\param first	The first segment's coordinate.
 	\param last		The second segment's coordinate.
 	\param pin		The point to get the minimal distance from the segment. This point is inside the segment  
 	\param pout		The nearest segment point of the pin point.
 	\param tol		Numerical tolerance
 */
-double TeMinimumDistance (const TeCoord2D& first, const TeCoord2D& last, const TeCoord2D& pin, TeCoord2D& pout, double tol = 0.0);
+TL_DLL double TeMinimumDistance (const TeCoord2D& first, const TeCoord2D& last, const TeCoord2D& pin, TeCoord2D& pout, double tol = 0.0);
 
-/** @defgroup TeGeometryArea Functions to compute the area of a geometry
- *  @ingroup  MetricOperators
- *  Functions that returns the area of a geometry.
- *  @{
- */
-
-/*! \fn template<class T> double TeGeometryArea(const T& geom)
-    \brief Returns the area of a TePolygon or TePolygonSet, otherwise return zero.
+/** \brief Template class to compute the area of a geometry
 	\param geom The geometry whose area we want to known.
-
-	This algorithm is based on the book Spatial Databases with Application to GIS
-	by Philippe Rigaux, Michel O. Scholl and Agnes Voisard.
+	\note This algorithm is based on the book Spatial Databases with Application to GIS
+	      by Philippe Rigaux, Michel O. Scholl and Agnes Voisard.
 
 */
 
-template<class T> double TeGeometryArea(const T& /* geom */)
+template<class T>
+double TeGeometryArea(const T& /* geom */)
 {
 	return 0.0;
 }
 
 //! This is a explicit specialization that returns the area of a TePolygon
-template<>  double TeGeometryArea(const TePolygon& p);
+template<>
+TL_DLL double TeGeometryArea(const TePolygon& p);
 
 //! This is a explicit specialization that returns the area of a TePolygonSet
-template<>  double TeGeometryArea(const TePolygonSet& ps);
+template<>
+TL_DLL double TeGeometryArea(const TePolygonSet& ps);
 
 //! This is a explicit specialization that returns the area of a Box
-template<>  double TeGeometryArea(const TeBox& b);
-/** @} */
+template<>
+TL_DLL double TeGeometryArea(const TeBox& b);
 
+//! This is a explicit specialization that returns the area of a Box
+template<>
+TL_DLL double TeGeometryArea(const TeMultiGeometry& mGeom);
 /** @} */
 
-
-
 /** @defgroup GeometryFunction Functions that return geometries.
  *  @ingroup  GeometryAlgorithms
  *  Functions that return geometries.
  *  @{
  */
-
- /*! \fn TePolygon TeMakePolygon(const TeBox& b)
-    \brief Given a box return its polygon representation.
+/** \brief Given a box return its polygon representation.
 	\param b  The box to create a polygon.
 */
-TePolygon TeMakePolygon(const TeBox& b);
+TL_DLL TePolygon TeMakePolygon(const TeBox& b);
 
-/*! \fn TeLinearRing TeSimpleClosedPath(const TePointSet& pSet)
-    \brief Given N points, finds a path that doesn't self-intersects, visiting all points and returning to the begginning one.
+/** \brief Given N points, finds a path that doesn't self-intersects
+	\note Given N points, finds a path that doesn't self-intersects, visiting all points and returning 
+	      to the begginning one. It is based on the book Algorithms by Robert Sedgewick, Addisson-Wesley, 1988;
 	\param pSet The point set to form a path.
-
-	It is based on the book Algorithms by Robert Sedgewick, Addisson-Wesley, 1988.
 */
-TeLinearRing TeSimpleClosedPath(const TePointSet& pSet);
+TL_DLL TeLinearRing TeSimpleClosedPath(const TePointSet& pSet);
 /** @} */
 
 
@@ -870,53 +854,81 @@ TeLinearRing TeSimpleClosedPath(const TePointSet& pSet);
  *  Functions that return the centroid.
  *  @{
  */
-/*! \fn TeCoord2D TeFindCentroid(const TePolygon& p);
-    \brief Calculates the centroid of a polygon.
+
+/** \brief Calculates the centroid of a multi geometry.
+	\param p A multi geometry whose centroid we want to known.
+*/
+TL_DLL TeCoord2D TeFindCentroid(TeMultiGeometry& mGeom);
+
+/** \brief Calculates the centroid of a polygon.
 	\param p A TePolygon whose centroid we want to known.
 */
-TeCoord2D TeFindCentroid(const TePolygon& p);
+TL_DLL TeCoord2D TeFindCentroid(const TePolygon& p);
 
-/*! \fn TeCoord2D TeFindCentroid(const TeLine2D& l);
-    \brief Calculates a reference point.
+/** \brief Calculates a reference point.
 	\param l A TeLine whose centroid we want to known.
 */
-TeCoord2D TeFindCentroid(const TeLine2D& l);  
+TL_DLL TeCoord2D TeFindCentroid(const TeLine2D& l);  
 
 /*! \fn TeCoord2D TeFindCentroid(const TeCell& c );
     \brief Calculates the centroid of a cell.
 	\param c A TeCell whose centroid we want to known.
 */
-TeCoord2D TeFindCentroid(const TeCell& c);
+TL_DLL TeCoord2D TeFindCentroid(const TeCell& c);
 
-/*! \fn TeCoord2D TeFindCentroid(const TePoint& p );
-    \brief Calculates the centroid of a point.
+/** \brief Calculates the centroid of a point.
 	\param p A TePoint whose centroid we want to known.
 */
-TeCoord2D TeFindCentroid(const TePoint& p);
+TL_DLL TeCoord2D TeFindCentroid(const TePoint& p);
+
+/** \brief Calculates the centroid of a text.
+	\param t A TeText whose centroid we want to known.
+*/
+TL_DLL TeCoord2D TeFindCentroid(const TeText& t);
 
-/*! \fn TeCoord2D TeFindCentroid(const TePolygonSet& s );
-    \brief Calculates the centroid of a polygon set.
+/** \brief Calculates the centroid of a polygon set.
 	\param s A TePolygon set whose centroid we want to known.
 */
-TeCoord2D TeFindCentroid(const TePolygonSet& s); 
+TL_DLL TeCoord2D TeFindCentroid(const TePolygonSet& s); 
 
-/*! \fn TeCoord2D TeFindCentroid(const TeLineSet& s );
-    \brief Calculates the centroid of a line set.
+/** Calculates the centroid of a line set.
 	\param s A TeLine set whose centroid we want to known.
 */
-TeCoord2D TeFindCentroid(const TeLineSet& s); 
+TL_DLL TeCoord2D TeFindCentroid(const TeLineSet& s); 
 
-/*! \fn TeCoord2D TeFindCentroid(const TeCellSet& s );
-    \brief Calculates the centroid of a cell set.
+/** \brief Calculates the centroid of a cell set.
 	\param s A TeCell set whose centroid we want to known.
 */
-TeCoord2D TeFindCentroid(const TeCellSet& s);
+TL_DLL TeCoord2D TeFindCentroid(const TeCellSet& s);
 
-/*! \fn TeCoord2D TeFindCentroid(TePointSet& ps );
-    \brief Calculates the centroid of a point set.
+/** \brief Calculates the centroid of a point set.
 	\param ps A TePointSet set whose centroid we want to known.
 */
-TeCoord2D TeFindCentroid(TePointSet& ps);
+TL_DLL TeCoord2D TeFindCentroid(TePointSet& ps);
+
+/** \brief Calculates the centroid of a text set.
+	\param ts A TeTextSet set whose centroid we want to known.
+*/
+TL_DLL TeCoord2D TeFindCentroid(TeTextSet& ts);
+
+/** \brief Calculates the center of a triangle.
+	\param vert0 First triagle's vertex.
+	\param vert1 Second triagle's vertex.
+	\param vert2 Third triagle's vertex.
+	\param pc    The triangle center.
+*/
+TL_DLL bool TeFindTriangleCenter(const TeCoord2D& vert0, const TeCoord2D& vert1, const TeCoord2D& vert2, TeCoord2D& pc); 
+/** \brief Calculates intersection between two segments.
+	\param fr0 First point of first segment.
+	\param to0 Second point of first segment.
+	\param fr1 First point of second segment.
+	\param to1 Second point of second segment.
+	\param pi    The intersection point coordinates.
+	\return true is intersects, false otherwise.
+*/
+
+TL_DLL bool TeSegmentsIntersectPoint(const TeCoord2D& fr0, const TeCoord2D& to0, const TeCoord2D& fr1, const TeCoord2D& t1, TeCoord2D& pi); 
+
 /** @} */
 
 
@@ -926,76 +938,52 @@ TeCoord2D TeFindCentroid(TePointSet& ps);
   *  @{
   */
 //! Nearest node in set from location pt (i = the node index in the nodeset)
-bool TeNearest(TeCoord2D& pt, TeNodeSet& ns , int& i, const double& tol = 0.0);
+TL_DLL bool TeNearest(TeCoord2D& pt, TeNodeSet& ns , int& i, const double& tol = 0.0);
 
 //! Nearest point in set from location pt (i = the point index in the pointset)
-bool TeNearest(TeCoord2D& pt, TePointSet& ps , int& i, const double& tol = 0.0);
+TL_DLL bool TeNearest(TeCoord2D& pt, TePointSet& ps , int& i, const double& tol = 0.0);
 
 //! Nearest text in set from location pt (i = the text index in the textset)
-bool TeNearest(TeCoord2D& pt, TeTextSet& ts , int& i, const double& tol = 0.0);
+TL_DLL bool TeNearest(TeCoord2D& pt, TeTextSet& ts , int& i, const double& tol = 0.0);
 
 //! Nearest line in set from location pt (i = the line index in the lineset and pi = the closest point)
 //! The pi point can be outside a line of the line set
-bool TeNearest(TeCoord2D& pt, TeLineSet& ls , int& i, TeCoord2D& pi, const double& tol = 0.0);
+TL_DLL bool TeNearest(TeCoord2D& pt, TeLineSet& ls , int& i, TeCoord2D& pi, const double& tol = 0.0);
 
 //! Nearest line in set from location pt (i = the line index in the lineset and pout = the closest point)
 //! The pout point must be inside a line of the line set
-bool TeNearest (TeCoord2D& pt,TeLineSet& ls, int& lindex, TeCoord2D& pout, double& dmin, const double& tol = 0.0); 
+TL_DLL bool TeNearest (TeCoord2D& pt,TeLineSet& ls, int& lindex, TeCoord2D& pout, double& dmin, const double& tol = 0.0); 
 
 //! Nearest polygon in set from location pt (i = the polygon index in the polygonset).
-bool TeNearest(TeCoord2D& pt, TePolygonSet& ps , int& i, const double& tol = 0.0);
+TL_DLL bool TeNearest(TeCoord2D& pt, TePolygonSet& ps , int& i, const double& tol = 0.0);
 
 //! Nearest line in set from location pt (i = the line index in lineset) calculated by the vertex of the lines
-bool TeNearestByPoints(TeCoord2D& pt, TeLineSet& ls , int& i, double& dist, const double& tol = 0.0);
-/** @} */
-
-
-/** @defgroup TINfunction Functions used by TIN.
- *  @ingroup  GeometryAlgorithms
- *  TIN functions.
- *  @{
- */
-/*! \fn bool TeFindTriangleCenter(const TeCoord2D& vert0, const TeCoord2D& vert1, const TeCoord2D& vert2, TeCoord2D& pc); 
-    \brief Calculates the center of a triangle.
-	\param vert0 First triagle's vertex.
-	\param vert1 Second triagle's vertex.
-	\param vert2 Third triagle's vertex.
-	\param pc    The triangle center.
-*/
-bool TeFindTriangleCenter(const TeCoord2D& vert0, const TeCoord2D& vert1, const TeCoord2D& vert2, TeCoord2D& pc); 
-
-//! Line simplification.
-bool TeLineSimplify(TeLine2D& line, double snap, double maxdist);
-
+TL_DLL bool TeNearestByPoints(TeCoord2D& pt, TeLineSet& ls , int& i, double& dist, const double& tol = 0.0);
 /** @} */
 
-/** @defgroup Curvefunction Functions used to make curve.
+/** @defgroup CurveFunctions Functions used to deal with smooth curves
   *  @ingroup  GeometryAlgorithms
-  *  Curve functions.
   *  @{
   */
-
-/*! \fn bool TeGetCenter(TePoint p1, TePoint p2, TePoint p3, TePoint &center);
-    \brief Given three points of a circumference, returns the center point.
+/** \brief Given three points of a circunference, returns its center point.
 	\param p1      First point.
 	\param p2      Second point.
 	\param p3      Third point.
 	\param center  Circunference center.
 	This algorithm is adapted from http://www.delphiforfun.org/Programs/Math_Topics/circle_from_3_points.htmbook.
 */
-bool TeGetCenter(TePoint p1, TePoint p2, TePoint p3, TePoint &center);
+TL_DLL bool TeGetCenter(TePoint p1, TePoint p2, TePoint p3, TePoint &center);
 
-/*! \fn double TeGetRadius(TePoint& p1, TePoint& p2, TePoint& p3);
-    \brief Given three points of a circumference, returns the radius.
+/** \brief Given three points of a circunference, returns the radius.
 	\param p1      First point.
 	\param p2      Second point.
 	\param p3      Third point.
 	This algorithm is adapted from http://www.delphiforfun.org/Programs/Math_Topics/circle_from_3_points.htmbook.
 */
-double TeGetRadius(TePoint &p1, TePoint &p2, TePoint &p3);
+TL_DLL double TeGetRadius(TePoint &p1, TePoint &p2, TePoint &p3);
+
+/** \brief Given three points returns a smooth arc as a TeLine2D that contains a given total number of points.
 
-/*! \fn bool TeGenerateArc(TePoint& p1, TePoint& p2, TePoint& p3, TeLine2D& arcOut, const short& NPoints);
-    \brief Given three points of a circle, returns the an arc passing for this points that is formed by a given number of points.
 	\param p1      First point.
 	\param p2      Second point.
 	\param p3      Third point.
@@ -1005,16 +993,23 @@ double TeGetRadius(TePoint &p1, TePoint &p2, TePoint &p3);
 	This algorithm is adapted from http://mathforum.org/dr.math/
   
 */
-bool TeGenerateArc(TePoint& p1, TePoint& p2, TePoint& p3, TeLine2D& arcOut, const short& NPoints);
+TL_DLL bool TeGenerateArc(TePoint& p1, TePoint& p2, TePoint& p3, TeLine2D& arcOut, const short& NPoints);
 
-/*! \fn bool TeGenerateCircle(TePoint& center, const double& radius, TeLine2D& circle, const short& NPoints);
-    \brief Given the center and the radius, returns the circle formed by a given number of points.
+/** \brief Given a center point and a radius, returns the circle  as a TeLine2D interpolated by a given number of points
 	\param center  Center point of the circle.
 	\param radius  radius of the circle.
 	\param circle  The return circle
 	\param NPoints Number of circle points.	
 */
-bool TeGenerateCircle(TePoint& center, const double& radius, TeLine2D& circle, const short& NPoints);
+TL_DLL bool TeGenerateCircle(TePoint& center, const double& radius, TeLine2D& circle, const short& NPoints);
+
+/** \brief Performs a line simplication
+	\param line		The line to be simplified
+	\param snap		Simplification threshold
+	\param maxdist	The maximum distance between intermediary segments
+*/
+TL_DLL bool TeLineSimplify(TeLine2D& line, double snap, double maxdist);
+
 
 /** @} */
 
diff --git a/src/terralib/kernel/TeGraph.cpp b/src/terralib/kernel/TeGraph.cpp
old mode 100644
new mode 100755
index 9d63d60..4f478b0
--- a/src/terralib/kernel/TeGraph.cpp
+++ b/src/terralib/kernel/TeGraph.cpp
@@ -93,7 +93,7 @@ unsigned Terms[] =
 };
 
 
-struct {                        /* Options default settings */
+struct Opt{                        /* Options default settings */
 	char symbols[5];
 	char x_major[3];
 	char x_minor[3];
@@ -115,7 +115,7 @@ struct {                        /* Options default settings */
 	char legend[4];
 } Options ;       /* curve legend turned on                        */
 
-struct {
+struct Txtc{
 	unsigned char background;   /* color of outermost window */
  	unsigned char pattern;      /* color of pattern in outermost window */
 	unsigned char input;        /* color of input window */
@@ -672,7 +672,7 @@ TeGraphPlot :: plotCurves ( int with_simbols)
 			for (i = 0; i < points; i++)
 			{
 				TeLegendEntry slice = (*sliceVector)[i];
-				TeColor cor = slice.visual(TePOLYGONS).color ();
+				TeColor cor = slice.visual(TePOLYGONS)->color ();
 				value = y[i]/count;
 				a2 += value*360.;
 				setFillAreaColor(cor);
@@ -718,7 +718,7 @@ TeGraphPlot :: plotCurves ( int with_simbols)
 				if(sliceVector)
 				{
 					TeLegendEntry slice = (*sliceVector)[i];
-					TeColor cor = slice.visual(TePOLYGONS).color ();
+					TeColor cor = slice.visual(TePOLYGONS)->color ();
 					setFillAreaColor (cor);
 				}
 				// Juan end
diff --git a/src/terralib/kernel/TeGraph.h b/src/terralib/kernel/TeGraph.h
old mode 100644
new mode 100755
index c1813f6..c971aee
--- a/src/terralib/kernel/TeGraph.h
+++ b/src/terralib/kernel/TeGraph.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -21,7 +21,7 @@ indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
 /*! \file TeGraph.h
-    This file deals with graphs in TerraLib
+    \brief This file deals with graphs in TerraLib
 */
 
 #ifndef __TERRALIB_INTERNAL_GRAPH_H
@@ -51,7 +51,7 @@ typedef struct {
 	char curve[CURVES_MAX][LABEL_MAX+1];
 } Labels;
 
-class TeGraphPlot
+class TL_DLL TeGraphPlot
 {
 protected:
 	int label_field;       /* maximum no. of characters in a label field */
@@ -176,7 +176,7 @@ public :
 
 // Utility functions
 
-void show_err(char *s);
-void ftos(Real f, int digits_left, int digits_right, int exp_flag, char *s);
+TL_DLL void show_err(char *s);
+TL_DLL void ftos(Real f, int digits_left, int digits_right, int exp_flag, char *s);
 
 #endif
diff --git a/src/terralib/kernel/TeGridIndex.h b/src/terralib/kernel/TeGridIndex.h
new file mode 100755
index 0000000..cfd3707
--- /dev/null
+++ b/src/terralib/kernel/TeGridIndex.h
@@ -0,0 +1,413 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeGridIndex.h
+    \brief This file contains an implementation of a fixed grid data structure.	
+*/
+
+#ifndef  __TERRALIB_INTERNAL_GRIDINDEX_H
+#define  __TERRALIB_INTERNAL_GRIDINDEX_H
+
+#include "TeGeometry.h"
+#include "TeIntersector.h"
+
+#include <map>
+
+/* 
+ * WARNING:
+ *
+ *       1. This module IS UNDER DEVELOPMENT!
+ *
+ *       2. These data structures means to be used only in TerraLib kernel and should not be used by anyone because
+ *          the support and interfaces can be changed in future.
+ *
+ */
+
+namespace TeSAM
+{
+/** @defgroup GridStructure Fixed Grid Data Structure
+ *  TerraLib Fixed Grid Data Structure.
+ *  @{
+ */
+
+
+//! A class that represents a fixed grid
+/*!	
+	.	
+
+	WARNING:
+
+	1. XXXX
+
+	2. XXXX.
+
+	3. 
+
+ */
+class TL_DLL TeGridIndex
+{
+	public:
+
+		//! grid column/line cell index
+		typedef pair<int, int> gridKey;							
+
+		//! grid structure
+		typedef multimap<gridKey, unsigned int> gridType;		// em cada linha e coluna podemos associar uma lista de outros objetos
+
+		double dx_;			//!< grid resolution in x axis.
+		double dy_;			//!< grid resolution in y axis.
+		int npartsX_;		//!< Number of columns
+		int npartsY_;		//!< Number of lines
+		double xi_;			//!< Lower left x.
+		double yi_;			//!< Lower left y.
+		double xf_;			//!< Upper right x.
+		double yf_;			//!< Upper right y.
+		gridType grid_;		//!< the grid.
+		unsigned int size_;	//!< Number of elements in the grid (if one element intersects more than one grid cell, they will count many times).
+
+	public:
+
+		//! Empty constructor
+		TeGridIndex()
+			: dx_(0.0), dy_(0.0), npartsX_(0), npartsY_(0), xi_(0.0), yi_(0.0), xf_(0.0), yf_(0.0), size_(0u)
+		{
+		}
+
+		//! Constructor of the grid
+		TeGridIndex(const TeBox& b, const double& resX, const double& resY)
+			: size_(0u)
+		{
+			setBox(b);
+
+			setResolution(resX, resY);			
+		}
+
+		//! Adjusts grid bounding box
+		void setBox(const TeBox& b)
+		{
+			xi_ = b.x1_;
+			yi_ = b.y1_;
+
+			xf_ = b.x2_;
+			yf_ = b.y2_;
+		}
+
+		//! Returns the number of associatade cells
+		unsigned int size() const
+		{
+			return size_;
+		}
+
+		//! Sets grid resolution factor
+		void setResolution(const double& resX, const double& resY)
+		{
+			dx_ = resX;
+			dy_ = resY;
+
+			if((dx_ <= 0.0) || (dy_ <= 0.0))
+			{
+				npartsX_ = 0;
+				npartsY_ = 0;
+			}
+			else
+			{
+				npartsX_ = TeRound((xf_ - xi_) / dx_) + 1;
+				npartsY_ = TeRound((yf_ - yi_) / dy_) + 1;
+			}
+		}
+
+		//! Return number of columns
+		int getNumCols() const
+		{
+			return npartsX_;
+		}
+		
+		//! Return number of lines
+		int getNumLines() const
+		{
+			return npartsY_;
+		}
+
+		//! Tells if the grid definition is correct
+		bool isValid() const
+		{
+			return (npartsX_ != 0 && npartsY_ != 0);
+		}
+
+
+		//! Inserts an item with one coordinate
+		void insert(const TeCoord2D& c, const unsigned int& itemId)
+		{
+			int col = int((c.x_ - xi_) / dx_);
+			int line = int((c.y_ - yi_) / dy_);
+
+			gridKey key(col, line);
+
+			grid_.insert(gridType::value_type(key, itemId));
+
+			++size_;
+		}
+
+		//! Returns lower and upper grid positions
+		void getIndex(const TeCoord2D& c1, const TeCoord2D& c2, int& col1, int& line1, int& col2, int& line2)
+		{
+			double lowerX = ((c1.x_ < c2.x_) ? c1.x_ : c2.x_);
+			double lowerY = ((c1.y_ < c2.y_) ? c1.y_ : c2.y_);
+			double upperX = ((c1.x_ > c2.x_) ? c1.x_ : c2.x_);
+			double upperY = ((c1.y_ > c2.y_) ? c1.y_ : c2.y_);
+
+			col1 = int((lowerX - xi_) / dx_);
+			line1 = int((lowerY - yi_) / dy_);
+			col2 = int((upperX - xi_) / dx_) + 1;
+			line2 = int((upperY - yi_) / dy_) + 1;	
+		}
+
+		//! Inserts intem into the grid
+		void insert(const TeCoord2D& c1, const TeCoord2D& c2, const unsigned int& itemId)
+		{
+			gridKey key(0, 0);
+
+			int col1;
+			int line1;
+			int col2;
+			int line2;
+
+			getIndex(c1, c2, col1, line1, col2, line2);
+
+			for(int i = col1; i <= col2; ++i)
+			{
+				key.first  = i;
+
+				for(int j = line1; j <= line2; ++j)
+				{
+					
+					key.second = j;
+
+					grid_.insert(gridType::value_type(key, itemId));
+
+					++size_;
+				}
+			}
+		}
+
+		//! Put line segments over the grid cells
+		void indexLine(const TeLine2D& l)
+		{
+			unsigned int nstep = l.size() - 1;
+
+			for(unsigned int i = 0; i < nstep; ++i)
+				insert(l[i], l[i+1], i);
+		}
+
+		//! Return a reference for internal grid representation
+		gridType& getGrid()
+		{
+			return grid_;
+		}
+
+		//! Only for debug purpose
+		void getLines(TeLineSet& lset)
+		{
+			for(int i = 0; i <= npartsX_; ++i)
+			{
+				TeCoord2D c1, c2;
+				c1.x_ = xi_ + dx_ * i;
+				c1.y_ = yi_;
+				
+				c2.x_ = xi_ + dx_ * i;
+				c2.y_ = yi_ + npartsY_ * dy_;
+
+				TeLine2D l;
+
+				l.add(c1); l.add(c2);
+
+				lset.add(l);
+			}
+
+			for(int j = 0; j <= npartsY_; ++j)
+			{
+				TeCoord2D c1, c2;
+				c1.x_ = xi_;
+				c1.y_ = yi_ + dy_ * j;
+				
+				c2.x_ = xi_ + npartsX_ * dx_;
+				c2.y_ = yi_ + dy_ * j;
+
+				TeLine2D l;
+
+				l.add(c1); l.add(c2);
+
+				lset.add(l);
+			}
+		}		
+
+	private:
+
+		//! No copy allowed
+		TeGridIndex(const TeGridIndex& rhs);
+
+		//! No copy allowed
+		TeGridIndex& operator=(const TeGridIndex& rhs);
+
+};	// end of class TeGridIndex
+
+//! Get average length os segments in each direction
+TL_DLL inline void getAverage(const TeLine2D& l, double& dx, double& dy)
+{
+	unsigned int nstep = l.size() - 1;
+
+	double sumX = 0.0;
+	double sumY = 0.0;
+
+	for(unsigned int i = 0; i < nstep; ++i)
+	{
+		sumX += fabs(l[i + 1].x_ - l[i].x_);
+		sumY += fabs(l[i + 1].y_ - l[i].y_);
+	}
+
+	dx = (sumX / double(nstep)) * 8.0;
+	dy = (sumY / double(nstep)) * 8.0;
+
+	return;
+}
+
+//! Computes intersections
+TL_DLL inline bool TeSafeIntersectionsGrid(const TeLine2D& redLine, const TeLine2D& blueLine, TeINTERSECTOR2::TeVectorBoundaryIP& report, const unsigned int& redObjId = 0, const unsigned int& blueObjId = 0)
+{
+	double dx = 0.0;
+	double dy = 0.0;
+	
+	getAverage(redLine, dx, dy);
+
+	TeGridIndex redGrid(redLine.box(), dx, dy);
+
+	redGrid.indexLine(redLine);
+
+    TeGridIndex::gridKey key(0, 0);
+
+	int colmax = redGrid.getNumCols();
+	int colmin = 0;
+	int linemax = redGrid.getNumLines();
+	int linemin = 0;	
+
+	int col1 = 0;
+	int col2 = 0;
+	int line1 = 0;
+	int line2 = 0;
+
+	bool hasIntersections = false;
+
+	TeSegmentIntersectionType t = TeImproperIntersection;
+
+// Para cada segmento azul, verificar os quadrantes interceptados
+	unsigned int nStep = blueLine.size() - 1;
+
+	for(unsigned int k = 0; k < nStep; ++k)
+	{
+		redGrid.getIndex(blueLine[k], blueLine[k+1], col1, line1, col2, line2);
+
+		if((col2 < colmin) || (line2 < linemin) || (col1 > colmax) || (line1 > linemax))
+			continue;
+
+		//if(((col1 > colmax) && (col2 > colmax)) || ((line1 > linemax) && (line2 > linemax)))
+		//	continue;
+
+		if(col1 < colmin)
+			col1 = colmin;
+		
+		if(col2 > colmax)
+			col2 = colmax;
+
+		if(line1 < linemin)
+			line1 = linemin;
+
+        if(line2 > linemax)
+			line2 = linemax;
+
+		for(int col = col1; col <= col2; ++col)
+			for(int lin = line1; lin <= line2; ++lin)
+			{
+				key.first  = col;
+				key.second = lin;
+
+				pair<TeGridIndex::gridType::iterator, TeGridIndex::gridType::iterator> its = redGrid.getGrid().equal_range(key);
+
+				while(its.first != its.second)
+				{
+					TeINTERSECTOR2::TeBoundaryIP ip;
+
+					if(TeINTERSECTOR2::TeIntersection(redLine[its.first->second], redLine[its.first->second + 1], blueLine[k], blueLine[k+1], ip, t))
+					{
+						hasIntersections = true;
+
+						ip.redPartNum_ = redObjId;
+						ip.redSegNum_ = its.first->second;
+						ip.bluePartNum_ = blueObjId;
+						ip.blueSegNum_ = k;
+
+						if(ip.coords_.size() == 2)	//overlap
+						{
+							// Verificar se os pontos est�o em ordem crescente
+							if(ip.coords_[0].x_ < ip.coords_[1].x_)
+							{
+								report.push_back(ip);
+							}
+							else if(ip.coords_[0].x_ > ip.coords_[1].x_)
+							{
+								swap(ip.coords_[0], ip.coords_[1]);
+								report.push_back(ip);
+							}
+							else if(ip.coords_[0].y_ < ip.coords_[1].y_)
+							{
+								report.push_back(ip);						
+							}
+							else
+							{
+								swap(ip.coords_[0], ip.coords_[1]);
+								
+								report.push_back(ip);						
+							}
+						}
+						else
+						{
+							report.push_back(ip);
+						}
+					}
+
+					++(its.first);
+				}
+			}
+	}
+
+	return hasIntersections;
+}
+
+/** @} */ 
+
+};	// end namespace TeSAM
+
+
+#endif	// __TERRALIB_INTERNAL_GRIDINDEX_H
+
+
+
+
diff --git a/src/terralib/kernel/TeGroupingAlgorithms.cpp b/src/terralib/kernel/TeGroupingAlgorithms.cpp
old mode 100644
new mode 100755
index 15646a2..41c0124
--- a/src/terralib/kernel/TeGroupingAlgorithms.cpp
+++ b/src/terralib/kernel/TeGroupingAlgorithms.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -78,18 +78,18 @@ TeGroupByUniqueValue(vector<string>& vec, TeAttrDataType tipo, vector<TeSlice>&
 		}
 	}
 
-	if (vec[i] == vec[i - 1])
-	{
-		slice.from_ = vec[i];
-		slice.count_ = count;
-		result.push_back(slice);
-	}
-	else
-	{
-		slice.from_ = vec[i];
-		slice.count_ = 1;
-		result.push_back(slice);
-	}
+   if ( (i>1) && (vec[i] == vec[i-1]) ) 
+   {
+       slice.from_ = vec[i];
+       slice.count_ = count;
+       result.push_back(slice);
+   }
+   else
+   {
+       slice.from_ = vec[i];
+       slice.count_ = 1;
+       result.push_back(slice);
+   } 
 }
 
 void
diff --git a/src/terralib/kernel/TeGroupingAlgorithms.h b/src/terralib/kernel/TeGroupingAlgorithms.h
old mode 100644
new mode 100755
index 964789c..089f1da
--- a/src/terralib/kernel/TeGroupingAlgorithms.h
+++ b/src/terralib/kernel/TeGroupingAlgorithms.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -21,7 +21,7 @@ indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
 /*! \file TeGroupingAlgorithms.h
-    This file contains some generic grouping algorithms (based on iterators)
+    \brief This file contains some generic grouping algorithms (based on iterators)
 */
 
 #ifndef  __TERRALIB_INTERNAL_GROUPINGALGORITHMS_H
@@ -38,8 +38,8 @@ of this library and its documentation.
 
 
 //! Finds the element with minimum value among the elements contained in a range of iterators
-template<typename It> void
-TeMinimumValue(It begin, It end, vector<double>& minValue, double dummy=-9999.99, bool usesDummy=false)
+template<typename It>
+void TeMinimumValue(It begin, It end, vector<double>& minValue, double dummy=-9999.99, bool usesDummy=false)
 {
 	for (int i=0; i<minValue.size(); i++)
 		minValue[i] = TeMAXFLOAT;
@@ -60,8 +60,8 @@ TeMinimumValue(It begin, It end, vector<double>& minValue, double dummy=-9999.99
 }
 
 //! Finds the element with maximum value among the elements contained in a range of iterators
-template<typename It> void
-TeMaximumValue(It begin, It end, vector<double>& maxValue, double dummy=-9999.99, bool usesDummy=false)
+template<typename It>
+void TeMaximumValue(It begin, It end, vector<double>& maxValue, double dummy=-9999.99, bool usesDummy=false)
 {
 	for (int i=0; i<maxValue.size(); i++)
 		maxValue[i] = -TeMAXFLOAT;
@@ -81,8 +81,8 @@ TeMaximumValue(It begin, It end, vector<double>& maxValue, double dummy=-9999.99
 	}
 }
 
-void
-TeGroupByEqualStep(double min, double max, int nstep, vector<TeSlice>& result, int precision=0);
+//! Defines the classes (slices) of a equal step grouping
+TL_DLL void TeGroupByEqualStep(double min, double max, int nstep, vector<TeSlice>& result, int precision=0);
 
 /** @defgroup GenGroupAlg Generic Algorithms to do grouping
  *  A set of of generic functions to do grouping
@@ -90,8 +90,8 @@ TeGroupByEqualStep(double min, double max, int nstep, vector<TeSlice>& result, i
  */
 
 //! Groups a set of elements defined by a range of iterators in nstep groups, using Equal Step algorithm
-template<class iterator> void
-TeGroupByEqualStep(iterator begin, iterator end, int nstep, vector<TeSlice>& result,
+template<class iterator>
+void TeGroupByEqualStep(iterator begin, iterator end, int nstep, vector<TeSlice>& result,
 				   int precision=0, bool countElements = true)
 {
 	double	min = TeMAXFLOAT;
@@ -125,8 +125,8 @@ TeGroupByEqualStep(iterator begin, iterator end, int nstep, vector<TeSlice>& res
 }
 
 //! Groups a set of elements defined by a range of iterators in nstep groups, using Quantil algorithm
-template<class iterator> void
-TeGroupByQuantil(iterator begin, iterator end, int nstep, vector<TeSlice>& result,
+template<class iterator>
+void TeGroupByQuantil(iterator begin, iterator end, int nstep, vector<TeSlice>& result,
 				 int precision = 0, bool countElements = true)
 {
 	sort(begin, end);
@@ -164,8 +164,8 @@ TeGroupByQuantil(iterator begin, iterator end, int nstep, vector<TeSlice>& resul
 }
 
 //! Groups a set of elements defined by a range of iterators in ndev groups, using Standanrd deviation algorithm
-template<class iterator> void
-TeGroupByStdDev(iterator begin, iterator end, double ndev, vector<TeSlice>& result, string& rmean,
+template<class iterator>
+void TeGroupByStdDev(iterator begin, iterator end, double ndev, vector<TeSlice>& result, string& rmean,
 				int precision = 0, bool countElements = true)
 {
 	// Compute mim, max and mean
@@ -202,11 +202,11 @@ TeGroupByStdDev(iterator begin, iterator end, double ndev, vector<TeSlice>& resu
 		val = v;
 	}
 
-	if(aux.size())
+	std::vector<TeSlice>::reverse_iterator sit;
+
+	for(sit = aux.rbegin(); sit != aux.rend(); ++sit)
 	{
-		typename vector<TeSlice>::iterator sit = aux.end() - 1;
-		while(sit >= aux.begin())
-			result.push_back(*sit--);
+		result.push_back(*sit);
 	}
 
 	string media = "mean = " + rmean;
@@ -244,8 +244,9 @@ TeGroupByStdDev(iterator begin, iterator end, double ndev, vector<TeSlice>& resu
 }
 
 
-template<class iterator> void
-TeElemCountingBySlice(iterator begin, iterator end, vector<TeSlice>& result)
+//! Counts the number of elements, from a general container, per slice of a vector of slices
+template<class iterator>
+void TeElemCountingBySlice(iterator begin, iterator end, vector<TeSlice>& result)
 {
 	iterator it;
 	double from, to;
@@ -266,7 +267,7 @@ TeElemCountingBySlice(iterator begin, iterator end, vector<TeSlice>& result)
 
 
 //! Groups a set of elements in a vector of string  using Unique Value algorithm
-void TeGroupByUniqueValue(vector<string>& vec, TeAttrDataType tipo, vector<TeSlice>& result, int precision);
+TL_DLL void TeGroupByUniqueValue(vector<string>& vec, TeAttrDataType tipo, vector<TeSlice>& result, int precision);
 
 /** @} */ 
 #endif
diff --git a/src/terralib/kernel/TeImportRaster.cpp b/src/terralib/kernel/TeImportRaster.cpp
old mode 100644
new mode 100755
index ef9daa8..ec3694c
--- a/src/terralib/kernel/TeImportRaster.cpp
+++ b/src/terralib/kernel/TeImportRaster.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -29,13 +29,15 @@ of this library and its documentation.
 #include "TeProgress.h"
 #include "TeVectorRemap.h"
 #include "TeImportRaster.h"
+//#include "TeLibJpegWrapper.h"
 
 
 TeLayer* 
 TeImportRaster (const string& layerName, TeRaster* rasterIn, TeDatabase* database)
 {
 	if (!database || layerName.empty() || !rasterIn || 
-		(rasterIn->status() != TeREADYTOREAD && rasterIn->status() != TeREADYTOWRITE))
+		(rasterIn->params().status_ != TeRasterParams::TeReadyToRead && 
+		 rasterIn->params().status_ != TeRasterParams::TeReadyToWrite))
 		return 0;
 
 	// find a valid layer name
@@ -62,21 +64,32 @@ TeImportRaster (const string& layerName, TeRaster* rasterIn, TeDatabase* databas
 	if (newLayer->id() <= 0 )
 		return 0;				// couldn�t create new layer
 
-	unsigned int bw = rasterIn->params().ncols_;
-	unsigned int bh = 1;
-	if (rasterIn->params().nlines_ > 128 || rasterIn->params().ncols_ > 128)
+	// block dimension guessing
+	unsigned int bw = 512;
+	unsigned int bh = 512;		// an initial guess...
+
+	// if raster is up to 512x512 store it in one block
+	if (rasterIn->params().nlines_< 512 && rasterIn->params().ncols_< 512)
+	{
+		bw = rasterIn->params().ncols_;
+		bh = rasterIn->params().nlines_;
+	}
+	// if ncols<1024 build blocks of 1 line
+	else if (rasterIn->params().ncols_ < 1024)  
 	{
-		bw = 128;
-		bh = 128;
+		bw = rasterIn->params().ncols_;
+		bh = 1;
 	}
 
-	bool res = TeImportRaster(newLayer, rasterIn, bw, bh, TeNoCompression, 
-		       "", rasterIn->params().dummy_[0], false, TeNoExpansible);
+	if (TeProgress::instance())
+		TeProgress::instance()->reset();
+
+	bool res = TeImportRaster(newLayer, rasterIn, bw, bh, TeRasterParams::TeNoCompression, 
+		"", rasterIn->params().dummy_[0], rasterIn->params().useDummy_, TeRasterParams::TeNoExpansible);
 	if (res)
 		return newLayer;
 
 	database->deleteLayer(newLayer->id());
-	delete newLayer;
 	return 0;
 }
 
@@ -84,8 +97,9 @@ TeImportRaster (const string& layerName, TeRaster* rasterIn, TeDatabase* databas
 // This function mosaics an input raster to one previsously existing in a TerraLib layer
 bool TeMosaicRaster(TeRaster* rasterIn, TeLayer* layer,  const string& objectId)
 {
+
 	// layer must exist and input raster should be read to be read
-	if (!layer || !rasterIn  || rasterIn->status() != TeREADYTOREAD)
+	if (!layer || !rasterIn  || rasterIn->params().status_ != TeRasterParams::TeReadyToRead)
 		return false;
 	
 	TeRaster* rasterOut;
@@ -97,24 +111,27 @@ bool TeMosaicRaster(TeRaster* rasterIn, TeLayer* layer,  const string& objectId)
 	if (!rasterOut)			// no raster asked or no raster at all
 		return false;				// can not do mosaic
 
+	if (rasterOut->params().tiling_type_==TeRasterParams::TeNoExpansible)
+		return false;				// can mosaic if is not possible
+
 	// allows mosaic of same photometric types only
 	if (rasterOut->params().photometric_[0] != rasterIn->params().photometric_[0])
 		return false;
 
 	// increases output box to: input raster box + output raster box 
-	TeBox boxIn = rasterIn->params().box();
+  TeBox boxIn = rasterIn->params().boundingBox();
 
 	// if necessary remap input box to output projection 
 	if (!(*(rasterIn->projection()) == *(rasterOut->projection())))
 		boxIn = TeRemapBox(boxIn,rasterIn->projection(),rasterOut->projection());
 
-	// adjust it to expansible values
-	boxIn = adjustToCut(boxIn, rasterOut->params().blockWidth_*rasterOut->params().resx_, 
-							   rasterOut->params().blockHeight_*rasterOut->params().resy_);
-
 	// sum stored and input boxes
-	TeBox newBox = rasterOut->params().boundingBox();
-	updateBox(newBox,boxIn);
+	TeBox newBoxa = rasterOut->params().boundingBox();
+	updateBox(newBoxa,boxIn);	
+  
+  // adjust it to expansible values
+	TeBox newBox = adjustToCut(newBoxa, rasterOut->params().blockWidth_*rasterOut->params().resx_, 
+							   rasterOut->params().blockHeight_*rasterOut->params().resy_);
 
 	// update box in parameters of the raster and it's decoder
 	rasterOut->params().boundingBoxResolution(newBox.x1_,newBox.y1_,newBox.x2_,newBox.y2_,
@@ -150,10 +167,11 @@ bool TeMosaicRaster(TeRaster* rasterIn, TeLayer* layer,  const string& objectId)
 
 
 bool TeImportRaster (TeLayer* layer, TeRaster* rasterIn, 
-					 unsigned int bWidth, unsigned int bHeight,TeCompressionMode compress,
+					 unsigned int bWidth, unsigned int bHeight,TeRasterParams::TeRasterCompressionMode compress,
 					 const string& objectId, double dummy, bool useDummy,
-					 TeRasterTilingType indext)
+					 TeRasterParams::TeRasterTilingType indext)
 {	
+
 	if (!layer || !rasterIn)
 		return false;
 
@@ -163,6 +181,7 @@ bool TeImportRaster (TeLayer* layer, TeRaster* rasterIn,
 	else
 		objId = objectId;
 
+
 	// check if there  is a raster geometry to be modified
 	string tableGeo;
 	TeRepresentation* repp = 0;
@@ -170,6 +189,8 @@ bool TeImportRaster (TeLayer* layer, TeRaster* rasterIn,
 	if (!repp || !layer->raster(objectId))	// layer doesn�t have any 
 	{										// or the desired raster geometry
 											// a new one should be created
+		TeProjection* projIn = rasterIn->projection();	
+		TeProjection* projOut = layer->projection();
 
 		TeRasterParams parOut = rasterIn->params();		// parameters of the raster being created	
 														// start with the same parameters as input raster
@@ -181,18 +202,25 @@ bool TeImportRaster (TeLayer* layer, TeRaster* rasterIn,
 		parOut.setDummy(dummy);
 		parOut.useDummy_ = useDummy;
 		parOut.tiling_type_ = indext;
-		
-		parOut.dxI_= 0.0;							// raster stored is corrected  
-		parOut.dyJ_= 0.0;							// to translation/rotation 
-		parOut.dxJ_ = 0.0;
-		parOut.dyI_ = 0.0;		
-		
+
 		TeBox newBox = rasterIn->params().boundingBox();
-		TeProjection *projIn = rasterIn->projection();	
-		TeProjection *projOut = layer->projection();
+
+		// if input raster has some rotation associated it has to be corrected 
+		// during the importing
+		if (parOut.dxI_ != 0. || parOut.dyJ_ != 0.)
+		{
+			parOut.boundingBoxResolution(newBox.x1_,newBox.y1_,newBox.x2_,newBox.y2_,parOut.resx_,parOut.resy_);
+			parOut.dxI_= 0.0;							  
+			parOut.dyJ_= 0.0;							 
+			parOut.dxJ_ = 0.0;
+			parOut.dyI_ = 0.0;	
+		}
+		
+		bool diffProj = false;
 		parOut.projection(projOut);
 		if (projIn && projOut && !(*projIn == *projOut))
 		{
+			diffProj = true;
 			TeBox boxIn = rasterIn->params().boundingBox();
 			newBox = TeRemapBox (boxIn,projIn,projOut);
 			parOut.resx_ = newBox.width()/parOut.ncols_;	// recalculates resolutions 
@@ -201,41 +229,137 @@ bool TeImportRaster (TeLayer* layer, TeRaster* rasterIn,
 			newBox = parOut.box();
 		}
 	
-		if (indext == TeExpansible)							// if mosaicable adjust box 
+		if (indext == TeRasterParams::TeExpansible)			// if mosaicable adjust box 
 			parOut.resizeToTiling(newBox,bWidth,bHeight);	// to be cut in blocks of bWidth X bHeight (in projection units)
 
 		parOut.decoderIdentifier_ = "DB";					// parameters of the decoder
 		parOut.fileName_ = "RasterLayer" + Te2String(layer->id()) + "_R_" + objId;
 
-		if ((parOut.photometric_[0] == TeRASTERPALETTE 
-           || parOut.photometric_[0] == TeRASTERKERNEL))
+		if (parOut.photometric_[0] == TeRasterParams::TePallete)
 			parOut.lutName_ = parOut.fileName_ + "_LUT";
 
 		if (!layer->addRasterGeometry(parOut,objId))		// creates the empty raster geometry
 			return false;
-		
-		TeRaster* rasterOut = layer->raster(objId,'w');
-		TeRasterRemap remap(rasterIn, rasterOut);
-		if (remap.apply(true))			// o.k.
+
+		// create a decoder to raster in a TerraLib database 
+		parOut.mode_ = 'w';
+		TeDecoderDatabase *dbDecoder = new TeDecoderDatabase(parOut);
+		dbDecoder->setDB(layer->database());
+
+		// optimization: we don't need to go through remap routines.
+		// just cut the input raster and save the tiles
+		bool res=false;
+		TeRasterParams parF;
+		if (indext == TeRasterParams::TeNoExpansible && !diffProj)
 		{
-			TeRasterParams rp = rasterOut->params();
+			int ntiles = (parOut.nlines_/parOut.blockHeight_)*(parOut.ncols_/parOut.blockWidth_);
+			if(TeProgress::instance())
+				TeProgress::instance()->setTotalSteps(ntiles);
+			int count = 0;
+			clock_t	ti, tf;
+			int x=0, y=0, b, nb=parOut.nBands(),lx, ly;
+			double val= parOut.dummy_[0];
+			TeMemoryPage page(parOut.blockHeight_*parOut.blockWidth_,val,parOut.dataType_[0]);
+			string index;
+			ti = clock();
+			while (y<parOut.nlines_)  // for each row of tiles
+			{
+				page.ulLin_ = y;
+				x=0;
+				while (x<parOut.ncols_)	// for each tile in a row
+				{
+					page.clear();
+					page.ulCol_= x;
+					for (b=0; b<nb; ++b)    // for each band;
+					{
+						for (ly=0; ly<parOut.blockHeight_; ++ly)
+						{
+							for (lx=0; lx<parOut.blockWidth_; ++lx)  // write the tile
+							{
+								if (rasterIn->getElement(x+lx,y+ly,val,b))
+								{
+									page.setVal(x+lx,y+ly,parOut.blockWidth_,val);
+									if (val<parOut.vmin_[b])
+										parOut.vmin_[b] = val;
+									if (val>parOut.vmax_[b])
+										parOut.vmax_[b] = val;
+								}
+							}
+						}
+						index = dbDecoder->codifyId(x,y,b,1,0);
+						if (!dbDecoder->putRasterBlock(index,page.data_,page.pageSize()))
+							res=false;
+						page.clear();
+					}
+					x+= parOut.blockWidth_;
+					++count;
+					if(TeProgress::instance())
+					{
+						tf = clock();
+						if (int((tf-ti)/CLOCKS_PER_SEC) > 3)
+						{
+							if (TeProgress::instance()->wasCancelled())
+								break;
+							TeProgress::instance()->setProgress(count);
+							ti = tf;
+						}
+					}
+				}
+				y+= parOut.blockHeight_;
+			}
+			if (TeProgress::instance())
+				TeProgress::instance()->reset();
 
 			// atualizes the representation box in memory
 			TeRepresentation* repp = layer->getRepresentation(TeRASTER);
-			TeBox boxNew = rp.box();
-			updateBox(repp->box_,rp.box());
-			repp->nCols_ = rp.ncols_;
-			repp->nLins_ = rp.nlines_;
-			repp->resX_ = rp.resx_;
-			repp->resY_ = rp.resy_;
-
+			updateBox(repp->box_,parOut.box());
+			repp->nCols_ = parOut.ncols_;
+			repp->nLins_ = parOut.nlines_;
+			repp->resX_ = parOut.resx_;
+			repp->resY_ = parOut.resy_;
+			layer->updateLayerBox(parOut.boundingBox());
+			layer->database()->updateRasterRepresentation(layer->id(),dbDecoder->params(),objectId);
 			// atualizes representation in the database
-			layer->database()->updateRasterRepresentation(layer->id(),rp,objectId);
-			layer->updateLayerBox(rp.boundingBox());
-			rasterOut->clear();
-			return true;
+			for (b=0; b<nb; ++b)
+			{
+				dbDecoder->params().vmax_[b]=parOut.vmax_[b];
+				dbDecoder->params().vmin_[b]=parOut.vmin_[b];
+			}
+			layer->database()->updateRasterRepresentation(layer->id(),dbDecoder->params(),objectId);
+			dbDecoder->clear();
+			res=true;
 		}
-		return false;
+		else
+		{
+			TeRaster* rasterOut = new TeRaster();
+			rasterOut->setDecoder(dbDecoder);
+			rasterOut->init();
+			TeRasterRemap remap(rasterIn, rasterOut);
+			if (remap.apply(true))
+			{
+				TeRepresentation* repp = layer->getRepresentation(TeRASTER);
+				updateBox(repp->box_,rasterOut->params().box());
+				repp->nCols_ = rasterOut->params().ncols_;
+				repp->nLins_ = rasterOut->params().nlines_;
+				repp->resX_ = rasterOut->params().resx_;
+				repp->resY_ = rasterOut->params().resy_;
+
+				// atualizes representation in the database
+				layer->database()->updateRasterRepresentation(layer->id(),rasterOut->params(),objectId);
+				layer->updateLayerBox(rasterOut->params().boundingBox());
+				rasterOut->clear();
+				res = true;
+			}
+		}
+		if (res)			
+		{
+			//	create spatial index in the block box
+			string tableR = layer->database()->getRasterTable(layer->id(),objectId);
+			layer->database()->insertMetadata(tableR,layer->database()->getSpatialIdxColumn(TeRASTER), 0.000005,0.000005,layer->box());		
+			layer->database()->createSpatialIndex(tableR,layer->database()->getSpatialIdxColumn(TeRASTER), (TeSpatialIndexType)TeRTREE);
+		}
+		delete dbDecoder;
+		return res;
 	}
 	else
 	{
@@ -245,7 +369,6 @@ bool TeImportRaster (TeLayer* layer, TeRaster* rasterIn,
 	}
 }
 
-
 bool 
 TeBuildLowerResolution(TeLayer* layer, TeRaster* rasterIn, int resFac, const string& objectId)
 {
@@ -281,7 +404,7 @@ TeBuildLowerResolution(TeLayer* layer, TeRaster* rasterIn, int resFac, const str
 									parNewRes.resx_*resFac, parNewRes.resy_*resFac);
 
 	// adjust box to tiling in geographical coordinates
-	if (originalRaster->params().tiling_type_ == TeExpansible)
+	if (originalRaster->params().tiling_type_ == TeRasterParams::TeExpansible)
 	{
 		TeBox b = parNewRes.boundingBox();
 		int w = parNewRes.blockWidth_;
@@ -307,3 +430,506 @@ TeBuildLowerResolution(TeLayer* layer, TeRaster* rasterIn, int resFac, const str
 	delete dbDecoder;
 	return status;
 }
+
+
+
+void
+TeCalculateMean(TeDecoderMemory* decMem, vector<TeMemoryPage*> pages,int ulColStart,int ulLinStart)
+{
+	int i,j, c=ulColStart, l=ulLinStart;
+	unsigned int b;
+	int npixels;
+	double mean,val;
+	int nlines = decMem->params().nlines_-1;
+	int ncols = decMem->params().ncols_-1;
+	double dummy;
+
+	for (b=0; b<pages.size(); ++b)
+	{
+		dummy = decMem->params().dummy_[b];
+		l=ulLinStart;
+		for (i=0; i<nlines; i+=2)
+		{
+			c=ulColStart;
+			for (j=0; j<ncols; j+=2)
+			{
+				mean = 0.0;
+				npixels = 0;
+				if ((j>0) && (i>0) && decMem->getElement(j-1,i-1,val,b) && val != dummy)
+				{
+					mean += val;
+					npixels ++;
+				}
+				if ((i>0) && decMem->getElement(j,i-1,val,b) && val != dummy)
+				{
+					mean += val;
+					npixels ++;
+				}
+				if ((i>0) && (j<ncols-1) && decMem->getElement(j+1,i-1,val,b) && val != dummy)
+				{
+					mean += val;
+					npixels ++;
+				}	
+				
+				if ((j>0) && decMem->getElement(j-1,i,val,b) && val != dummy)
+				{
+					mean += val;
+					npixels ++;
+				}
+				if (decMem->getElement(j,i,val,b) && val != dummy)
+				{
+					mean += val;
+					npixels ++;
+				}
+				if ((j<ncols-1) && decMem->getElement(j+1,i,val,b) && val != dummy)
+				{
+					mean += val;
+					npixels ++;
+				}				
+			
+				if ((j>0) && (i<nlines-1) && decMem->getElement(j-1,i+1,val) && val != dummy)
+				{
+					mean += val;
+					npixels ++;
+				}
+				if ((i<nlines-1) && decMem->getElement(j,i+1,val,b) && val != dummy)
+				{
+					mean += val;
+					npixels ++;
+				}
+				if ((j<ncols-1) && (i<nlines-1) && decMem->getElement(j+1,i+1,val,b) && val != dummy)
+				{
+					mean += val;
+					npixels ++;
+				}
+				if (npixels)
+				{
+					mean = mean/npixels;
+					pages[b]->setVal(c,l,decMem->params().ncols_,mean);
+				}
+				c++;
+			}
+			l++;
+		}
+	}
+}
+
+
+/*
+This routine builds a multi-resolution pyramid with nLevels in a raster representation.
+The raster representation should be a raster stored in a TerraLib database.
+The raster representation should have been built in blocks with width and height power of 2.
+*/
+bool TeBuildMultiResolutionPyramid(TeRaster* rst, int nLevels, const bool& showProgress)
+{
+	if (!rst)
+		return false;
+	if (nLevels <= 1)
+		return false;
+	if (rst->params().decoderIdentifier_ != "DB")
+		return false;
+	int bw = rst->params().blockWidth_;
+	int bh = rst->params().blockHeight_;
+
+	/* check to see if bw and bh are power of 2 */
+	if (bw == 0 || bh == 0 ||
+	   (bw & (bw - 1)) != 0  || (bh & (bh - 1)) != 0)
+	{
+		return false;
+	}
+	
+	TeBox rstBB = rst->params().boundingBox();
+
+	// build a vector of pages in memory
+	vector<TeMemoryPage*> pages;
+	int b;
+	for (b=0; b<rst->params().nBands(); ++b)
+	{
+		TeMemoryPage* block = new TeMemoryPage(bh*bw, 
+											   rst->params().dummy_[b],
+											   rst->params().dataType_[b]);
+		block->ulCol_ = 0;
+		block->ulLin_ = 0;
+		pages.push_back(block);
+	}
+
+	// auxiliary variables
+	int ulCol, 
+		ulLin, 
+		band, 
+		res, 
+		subb, 
+		ulColStart, 
+		ulLinStart;
+
+	// parameters of a upper level
+	TeRasterParams parUp = rst->params();
+	parUp.mode_ = 'w';
+
+	// a decoder im memory for the lower level blocks
+	TeDecoderMemory*	decMem    = new TeDecoderMemory();
+
+	// a decoder database for the upper level of the pyramid
+	TeDecoderDatabase*	decDBUpperLevel = new TeDecoderDatabase(parUp);
+
+	// more auxiliary variables
+	int pxBUp=-1, pyBUp=-1;
+	int xBUp, yBUp;
+	int bUlx, bUly;
+
+	bool flag = true;
+	string bid;
+	char baux[60];
+
+	if(showProgress && TeProgress::instance())
+	{
+		TeProgress::instance()->setTotalSteps(nLevels);
+	}
+
+	TeRasterParams parBlock;
+	int r = 2;
+	for (int nl=0; nl<nLevels; ++nl)
+	{
+		if (showProgress && TeProgress::instance())
+		{
+			if (TeProgress::instance()->wasCancelled())
+			{
+					break;
+			}
+
+			std::string msg = "Creating Level " + Te2String(nl) + " of " + Te2String(nLevels);
+			TeProgress::instance()->setMessage(msg);
+			
+			TeProgress::instance()->setProgress(nl);
+		}
+
+		// select all the blocks from lower level
+		if (!rst->selectBlocks(rstBB,r/2,parBlock) )
+		{
+			delete decMem;
+			delete decDBUpperLevel;
+			return false;
+		}
+
+		decMem->updateParams(parBlock);
+		decMem->init();
+		parUp.boundingBoxResolution(rstBB.x1_, rstBB.y1_, rstBB.x2_, rstBB.y2_,
+	    							rst->params().resx_*r,rst->params().resy_*r,
+									TeBox::TeLOWERLEFT);
+		parUp.resolution_ = r;
+		decDBUpperLevel->updateParams(parUp);
+		
+		pxBUp=-1;
+		pyBUp=-1;
+		// for each block of the lower level
+		do
+		{
+			// retrieve the lower level block
+			flag = rst->fetchRasterBlock(decMem);
+			TeRasterParams& par = decMem->params();
+
+			// get the coordinate of the  lower level block upper left corner
+			TeBox blockBox = par.boundingBox();
+			TeCoord2D auxC(blockBox.x1_+4*par.resx_,blockBox.y2_-4*par.resy_);
+			TeCoord2D ij = parUp.coord2Index(auxC);
+			ulColStart = TeRoundRasterIndex(ij.x_);
+			ulLinStart = TeRoundRasterIndex(ij.y_);
+			
+			// find the correspondent upper level block that contains the coordinate
+			bid = decDBUpperLevel->codifyId(ulColStart,ulLinStart,0,r,0);
+			sscanf(bid.c_str(),"X%dY%d",&xBUp,&yBUp);
+			decDBUpperLevel->decodifyId(bid,bUlx,bUly,band,res,subb);
+
+			// check to which quadrant in the upper level block the lower level block fits
+			if (ulColStart >= (bUlx+bw/2))
+				ulColStart = bUlx+bw/2;
+			else
+				ulColStart = bUlx;
+
+			if (ulLinStart >= (bUly+bh/2))
+				ulLinStart = bUly+bh/2;
+			else
+				ulLinStart = bUly;
+
+			// check if the upper level block is in already in memory
+			if (pxBUp != xBUp || pyBUp != yBUp)
+			{	
+				for (b=0; b<rst->params().nBands(); ++b)
+				{
+					// if it is not the first blocks do the swapping from memory to db
+					if (pxBUp >= 0 && pyBUp >= 0)
+					{
+						// save blocks from memory
+						sprintf(baux,"X%dY%dB%dR%dS0",pxBUp, pyBUp,b,r);
+						decDBUpperLevel->putRasterBlock(baux,pages[b]->data_, parUp.blockHeight_*parUp.blockWidth_);
+					}
+					// get the needed one
+					pages[b]->clear();
+					sprintf(baux,"X%dY%dB%dR%dS0",xBUp,yBUp,b,r);
+					decDBUpperLevel->getRasterBlock(baux,pages[b]->data_);
+					TeBlockIndex index;
+					index.band_ = b;
+					index.col_ = xBUp;
+					index.lin_ = yBUp;
+					decDBUpperLevel->blockIndexPos(index,ulCol,ulLin,b);
+					pages[b]->ulLin_ = ulLin;
+					pages[b]->ulCol_ = ulCol;
+				}
+				// keep track of the blocks in memory
+				pxBUp = xBUp;
+				pyBUp = yBUp;
+			}
+			// write lower level block into upper level block using a 3x3 smoothing window (mean)
+			TeCalculateMean(decMem,pages,ulColStart,ulLinStart);
+
+		}while (flag);
+
+		// save the last blocks in memory
+		for (b=0; b<rst->params().nBands(); ++b)
+		{
+			sprintf(baux,"X%dY%dB%dR%dS0",xBUp,yBUp,b,r);
+			decDBUpperLevel->putRasterBlock(baux,pages[b]->data_, parUp.blockHeight_*parUp.blockWidth_);
+		}
+		// reset level selection
+		rst->clearBlockSelection();
+		decMem->resetMemory();
+		r *= 2;
+	}
+
+	if(showProgress && TeProgress::instance())
+	{
+		TeProgress::instance()->reset();
+	}
+
+	delete decMem;
+	delete decDBUpperLevel;
+	for (b=0; b<rst->params().nBands(); ++b)
+		delete pages[b];
+	return true;
+}
+
+TeRaster* TeAvMultiRes(TeRaster* rasterIn, TeDatabase* db)
+{
+	TeRaster* rasterOut = NULL;
+
+	if(!rasterIn || !db)
+	{
+		return NULL;
+	}
+
+	TeBox bbOriginalRes = rasterIn->params().boundingBox();
+
+	// builds some parameters relative to the new resolution
+	TeRasterParams parNewRes = rasterIn->params();
+	parNewRes.resolution_ = parNewRes.resolution_ * 2;
+	parNewRes.mode_ = 'w';
+	parNewRes.boundingBoxResolution(bbOriginalRes.x1_, bbOriginalRes.y1_,bbOriginalRes.x2_, bbOriginalRes.y2_,
+									parNewRes.resx_ * 2, parNewRes.resy_ * 2);
+
+	// create a decoder to raster in a TerraLib database 
+	TeDecoderDatabase *dbDecoder = new TeDecoderDatabase(parNewRes);
+	dbDecoder->setDB (db);
+
+	rasterOut = new TeRaster();
+	rasterOut->setDecoder(dbDecoder);
+	
+	if(!rasterOut->init())
+	{
+		delete rasterOut;
+		return NULL;
+	}
+
+	int nLines = rasterOut->params().nlines_;
+	int nCols = rasterOut->params().ncols_;
+	int nBands = rasterOut->params().nBands();
+
+	int nLinesOrigen = rasterIn->params().nlines_;
+	int nColsOrigen = rasterIn->params().ncols_;
+
+	int bhSize = rasterIn->params().blockHeight_;
+	int bwSize = rasterIn->params().blockWidth_;
+
+	int halfBhSize = bhSize / 2;
+	int halfBwSize = bwSize / 2;
+
+	double dummy = rasterIn->params().dummy_[0];
+	double mean,val;
+	int npixels;
+
+	unsigned int numBlocks = (nLinesOrigen / bhSize) * (nColsOrigen / bwSize) * nBands;
+
+	if(TeProgress::instance())
+	{
+		TeProgress::instance()->setTotalSteps(numBlocks);
+	}
+
+	
+
+	int b, iBaseOri, jBaseOri, iBaseDest, jBaseDest, iOri, jOri, iDest, jDest, blockI, blockJ;
+
+	unsigned int numBlock = 0;
+
+	for (iBaseDest=0, iBaseOri=0; iBaseDest < nLines; iBaseDest+=halfBhSize, iBaseOri+=bhSize)//lines
+	{
+		for (jBaseDest=0, jBaseOri=0; jBaseDest < nCols; jBaseDest+=halfBwSize, jBaseOri+=bwSize)//columns
+		{
+			for (b=0; b<nBands; ++b)//band
+			{
+				for(blockI=0, iDest=iBaseDest, iOri=iBaseOri; blockI < halfBhSize; ++blockI, ++iDest, iOri+=2)//block lines
+				{
+					for(blockJ=0, jDest=jBaseDest, jOri=jBaseOri; blockJ < halfBwSize; ++blockJ, ++jDest, jOri+=2)//block columns
+					{
+						mean = 0.0;
+						npixels = 0;
+
+						if ((jOri>0) && (iOri>0) && rasterIn->getElement(jOri-1,iOri-1,val,b) && val != dummy)
+						{
+							mean += val;
+							npixels ++;
+						}
+						if ((iOri>0) && rasterIn->getElement(jOri,iOri-1,val,b) && val != dummy)
+						{
+							mean += val;
+							npixels ++;
+						}
+						if ((iOri>0) && (jOri<nColsOrigen-1) && rasterIn->getElement(jOri+1,iOri-1,val,b) && val != dummy)
+						{
+							mean += val;
+							npixels ++;
+						}	
+						
+						if ((jOri>0) && rasterIn->getElement(jOri-1,iOri,val,b) && val != dummy)
+						{
+							mean += val;
+							npixels ++;
+						}
+						if (rasterIn->getElement(jOri,iOri,val,b) && val != dummy)
+						{
+							mean += val;
+							npixels ++;
+						}
+						if ((jOri<nColsOrigen-1) && rasterIn->getElement(jOri+1,iOri,val,b) && val != dummy)
+						{
+							mean += val;
+							npixels ++;
+						}				
+					
+						if ((jOri>0) && (iOri<nLinesOrigen-1) && rasterIn->getElement(jOri-1,iOri+1,val) && val != dummy)
+						{
+							mean += val;
+							npixels ++;
+						}
+						if ((iOri<nLinesOrigen-1) && rasterIn->getElement(jOri,iOri+1,val,b) && val != dummy)
+						{
+							mean += val;
+							npixels ++;
+						}
+						if ((jOri<nColsOrigen-1) && (iOri<nLinesOrigen-1) && rasterIn->getElement(jOri+1,iOri+1,val,b) && val != dummy)
+						{
+							mean += val;
+							npixels ++;
+						}
+
+						if (npixels)
+						{
+							mean = mean/npixels;
+							
+							rasterOut->setElement(jDest, iDest, mean, b);
+						}
+
+					}//block columns
+				}//block lines
+
+				++numBlock;
+				if(TeProgress::instance())
+				{
+					if(TeProgress::instance()->wasCancelled())
+					{
+						return rasterOut;
+					}
+					if(numBlock % 10 == 0)
+					{
+						TeProgress::instance()->setProgress(numBlock);
+					}
+				}
+
+			}//band
+
+		}//colums
+	}//lines
+
+
+	return rasterOut;
+}
+
+bool TeBuildAverageResolution(TeLayer* layer, int maxRes, const string& objectId)
+{
+	if (!layer)	// layer and input raster pointers shouldn't be null
+		return false;
+
+	string objId;				// if empty try to get the default object identification
+	if (objectId.empty())
+		objId = "O1";
+	else
+		objId = objectId;	
+	
+	// retrieves the original raster
+	TeRaster* rasterIn = layer->raster(objId);
+
+	if(!rasterIn)
+	{
+		return false;
+	}
+
+	TeRaster* rasterOut = NULL;
+
+	int res = 1;
+
+	if(TeProgress::instance())
+	{
+		TeProgress::instance()->setTotalSteps(maxRes);
+	}
+
+	while(res <= maxRes)
+	{
+		
+		if (TeProgress::instance())
+		{
+			if (TeProgress::instance()->wasCancelled())
+			{
+					break;
+			}
+
+			std::string msg = "Creating Level " + Te2String(res) + " of " + Te2String(maxRes);
+
+			TeProgress::instance()->setMessage(msg);
+			
+			TeProgress::instance()->setProgress(res);
+		}
+
+		rasterOut = TeAvMultiRes(rasterIn, layer->database());
+
+		if(res != 1)
+		{
+			rasterIn->clear();
+			delete rasterIn;
+		}
+
+		rasterIn = rasterOut;
+
+		++res;
+	}
+
+	if(TeProgress::instance())
+	{
+		TeProgress::instance()->reset();
+	}
+
+	if(rasterOut)
+	{
+		rasterOut->clear();
+		delete rasterOut;
+	}
+
+	return true;
+}
\ No newline at end of file
diff --git a/src/terralib/kernel/TeImportRaster.h b/src/terralib/kernel/TeImportRaster.h
old mode 100644
new mode 100755
index 200908f..da3684f
--- a/src/terralib/kernel/TeImportRaster.h
+++ b/src/terralib/kernel/TeImportRaster.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,10 +20,8 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeImportRaster.h
-    This file contains functions to support importing of
-	raster data into a TerraLib database
+    \brief This file contains functions to support importing of raster data into a TerraLib database
 */
 #ifndef __TERRALIB_INTERNAL_IMPORTRASTER_H
 #define __TERRALIB_INTERNAL_IMPORTRASTER_H
@@ -47,9 +45,7 @@ class TeRaster;
       \param database a pointer to the database where the raster will be imported
 	  \returns a pointer to the generated layer
 */
-TeLayer* 
-TeImportRaster (const string& layerName, TeRaster* rasterIn, TeDatabase* database);
-
+TL_DLL TeLayer* TeImportRaster (const string& layerName, TeRaster* rasterIn, TeDatabase* database);
 
 //! Imports a TeRaster object to a TeLayer
 /*!
@@ -65,9 +61,10 @@ TeImportRaster (const string& layerName, TeRaster* rasterIn, TeDatabase* databas
 	  \param indext type of tiling used to import raster
 	  \returns true or false whether the raster was imported successfully
 */
-bool 
-TeImportRaster (TeLayer* layer, TeRaster* rasterIn, unsigned int bWidth=512, unsigned int bHeight=512, 
-				TeCompressionMode compress = TeNoCompression, const string& objectId="", double dummy=255,bool useDummy = false, TeRasterTilingType indext=TeNoExpansible);
+TL_DLL bool TeImportRaster (TeLayer* layer, TeRaster* rasterIn, unsigned int bWidth=512, unsigned int bHeight=512, 
+		TeRasterParams::TeRasterCompressionMode compress = TeRasterParams::TeNoCompression, 
+		const string& objectId="", double dummy=255,bool useDummy = false, 
+		TeRasterParams::TeRasterTilingType indext=TeRasterParams::TeNoExpansible);
 
 //! This function mosaics an input raster to one previsously existing in a TerraLib layer
 /*!
@@ -76,9 +73,7 @@ TeImportRaster (TeLayer* layer, TeRaster* rasterIn, unsigned int bWidth=512, uns
 	 \param objectId object identification associated to this raster
 	 \returns true or false whether the mosaic operation was successfull
 */
-bool 
-TeMosaicRaster(TeRaster* rasterIn, TeLayer* layer,  const string& objectId="");
-
+TL_DLL bool TeMosaicRaster(TeRaster* rasterIn, TeLayer* layer,  const string& objectId="");
 
 //! Builds a degraded resolution of a raster data
 /*!
@@ -88,15 +83,24 @@ TeMosaicRaster(TeRaster* rasterIn, TeLayer* layer,  const string& objectId="");
 	  \param objectId object identification associated to this raster
 	  \returns true or false whether the raster was imported successfully
 */
-bool 
-TeBuildLowerResolution(TeLayer* layer, TeRaster* rasterIn, int resFac, const string& objectId="");
+TL_DLL bool TeBuildLowerResolution(TeLayer* layer, TeRaster* rasterIn, int resFac, const string& objectId="");
+
+//! Builds the multi resolution pyramid for a given raster
+TL_DLL bool TeBuildMultiResolutionPyramid(TeRaster* rst, int nLevels, const bool& showProgress = false);
+
+//! Builds the multi resolution pyramid for a given raster
+TL_DLL bool TeBuildAverageResolution(TeLayer* layer, int maxRes, const string& objectId="");
 /** @} */ 
 
-/** \example ImportRaster1.cpp
- * This is an example of how to import a raster data to a TerraLib database
+/** \example importJPEG.cpp
+	Shows how to import a JPEG file
+ */
+
+/** \example importGridData.cpp
+	Shows how a raster data: a binary raw grid data
  */
 
-/** \example ImportRaster2.cpp
+/** \example mosaciTIFFImages.cpp
  * This is an example of how to build a mosaic of images as a layer in a TerraLib database
  */
 
diff --git a/src/terralib/kernel/TeInitQuerierStrategy.cpp b/src/terralib/kernel/TeInitQuerierStrategy.cpp
deleted file mode 100644
index b3b0b38..0000000
--- a/src/terralib/kernel/TeInitQuerierStrategy.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-/************************************************************************************
-TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The library provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use
-of this library and its documentation.
-*************************************************************************************/
-
-
-#include "TeInitQuerierStrategy.h"
-#include "TeQuerierDBStr1.h"
-#include "TeQuerierDBStr2.h"
-#include "TeQuerierDBStr3.h"
-#include "TeQuerierSHP.h"
-
-
-void TeInitQuerierStrategies()
-{	
-	static TeQuerierDBStr1Factory querierDBStr1("querierDBStr1");
-
-	static TeQuerierDBStr2Factory querierDBStr2("querierDBStr2");
-
-	static TeQuerierDBStr3Factory querierDBStr3("querierDBStr3");
-	
-	static TeQuerierSHPFactory querierSHP("querierSHP");
-}
diff --git a/src/terralib/kernel/TeInitQuerierStrategy.h b/src/terralib/kernel/TeInitQuerierStrategy.h
deleted file mode 100644
index 6654c0c..0000000
--- a/src/terralib/kernel/TeInitQuerierStrategy.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/************************************************************************************
-TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The library provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use
-of this library and its documentation.
-*************************************************************************************/
-
-#ifndef  __TERRALIB_INTERNAL_QUERIERINIT_H
-#define  __TERRALIB_INTERNAL_QUERIERINIT_H
-
-//! function to init the querier strategies
-void TeInitQuerierStrategies();
-
-
-#endif
-
diff --git a/src/terralib/kernel/TeInitRasterDecoders.cpp b/src/terralib/kernel/TeInitRasterDecoders.cpp
old mode 100644
new mode 100755
index 9ffaa3a..4ebc224
--- a/src/terralib/kernel/TeInitRasterDecoders.cpp
+++ b/src/terralib/kernel/TeInitRasterDecoders.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright  2001-2004 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -24,13 +24,9 @@ of this library and its documentation.
 #include "TeInitRasterDecoders.h"
 #include "TeDecoderMemoryMap.h"
 #include "TeDecoderMemory.h"
+#include "TeDecoderSmartMem.h"
 #include "TeDecoderTIFF.h"
-#ifdef WIN32
-#ifdef _MRSIDSUPPORT
-#include "TeDecoderMrSID.h"
-#endif
 #include "TeDecoderJPEG.h"
-#endif
 #include "TeDecoderDatabase.h"
 #include "TeDecoderFile.h"
 #include "TeDecoderSPR.h"
@@ -41,46 +37,30 @@ of this library and its documentation.
 void 
 TeInitRasterDecoders()
 {
-	static TeDecoderDatabaseFactory theDecoderDatabaseFactory("DB");
+	static bool TeRasterDecoderFactoryInitalized__ = false;
+
+	if (!TeRasterDecoderFactoryInitalized__)
+	{
+		TeRasterDecoderFactoryInitalized__ = true;
+
+		static TeDecoderDatabaseFactory theDecoderDatabaseFactory("DB");
 
-	static TeDecoderMemoryFactory theDecoderMemoryFactory("MEM");
+		static TeDecoderMemoryFactory theDecoderMemoryFactory("MEM");
 
-	static TeDecoderMemoryMapFactory theDecoderMemoryMapFactory("MEMMAP");
-	TeDecoderFactory::instanceName2Dec()["raw"]  = "MEMMAP";	
-	TeDecoderFactory::instanceName2Dec()["RAW"]  = "MEMMAP";	
+		static TeDecoderSmartMemFactory teDecoderSmartMemFactory("SMARTMEM");
 
+		static TeDecoderMemoryMapFactory theDecoderMemoryMapFactory("MEMMAP");
 
-	static TeDecoderTIFFFactory theDecoderTIFFFactory("TIF");
-	TeDecoderFactory::instanceName2Dec()["tif"]  = "TIF";	
-	TeDecoderFactory::instanceName2Dec()["tiff"] = "TIF";	
-	TeDecoderFactory::instanceName2Dec()["TIF"] = "TIF";	
-	TeDecoderFactory::instanceName2Dec()["TIFF"] = "TIF";
+		static TeDecoderTIFFFactory theDecoderTIFFFactory("TIF");
 
-	static TeDecoderSPRFactory theDecoderSPRFactory("SPR");
-	TeDecoderFactory::instanceName2Dec()["spr"]  = "SPR";	
-	TeDecoderFactory::instanceName2Dec()["SPR"] = "SPR";
-	
-	static TeDecoderASCIIGridFactory theDecoderASCIIGridFactory("ASCIIGRID");
-	TeDecoderFactory::instanceName2Dec()["ascii"]  = "ASCIIGRID";	
-	TeDecoderFactory::instanceName2Dec()["asc"]  = "ASCIIGRID";	
-	TeDecoderFactory::instanceName2Dec()["ASCII"]  = "ASCIIGRID";	
-	TeDecoderFactory::instanceName2Dec()["txt"]  = "ASCIIGRID";	
-	TeDecoderFactory::instanceName2Dec()["TXT"]  = "ASCIIGRID";	
+		static TeDecoderSPRFactory theDecoderSPRFactory("SPR");
 
+		static TeDecoderASCIIGridFactory theDecoderASCIIGridFactory("ASCIIGRID");
+
+		static TeDecoderJPEGFactory theDecoderJPEGFactory("JPEG");
 
 #ifdef WIN32
-	static TeDecoderJPEGFactory theDecoderJPEGFactory("JPEG");
-	TeDecoderFactory::instanceName2Dec()["jpg"]  = "JPEG";	
-	TeDecoderFactory::instanceName2Dec()["jpeg"] = "JPEG";
-
-	static TeDecoderFileFactory theDecoderFileFactory("RAW");
-
-#ifdef _MRSIDSUPPORT
-	static TeDecoderMrSIDFactory theDecoderMrSIDFactory("MrSID");
-	TeDecoderFactory::instanceName2Dec()["sid"] = "MrSID";
-	TeDecoderFactory::instanceName2Dec()["SID"] = "MrSID";
-	TeDecoderFactory::instanceName2Dec()["Sid"] = "MrSID";
-#endif
+		static TeDecoderFileFactory theDecoderFileFactory("RAW");
 #endif	
-
+   }
 }
diff --git a/src/terralib/kernel/TeInitRasterDecoders.h b/src/terralib/kernel/TeInitRasterDecoders.h
old mode 100644
new mode 100755
index 0261eb7..2be7f17
--- a/src/terralib/kernel/TeInitRasterDecoders.h
+++ b/src/terralib/kernel/TeInitRasterDecoders.h
@@ -1,33 +1,37 @@
-//***********************************************************************
-//      TerraLib is a GIS Classes and Functions Library that 
-//      strongly explores Spatial Database Technologies 
-//
-//      Copyright � 2002 INPE and Tecgraf/PUC-Rio. 
-//
-//      This library is free software; you can redistribute it 
-//      and/or modify it under the terms of the GNU Lesser General 
-//      Public License as published by the Free Software Foundation
-//      version 2.1.(http://www.opensource.org/licenses/lgpl-license.php)
-//
-//      
-//
-//      Send questions or suggestions about the TerraLib Project 
-//      to terralib at dpi.inpe.br .
-//**************************************************************************//
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
 /*! \file TeInitRasterDecoders.h
-    This file contains functions to deal with the initialization of raster decoding tool
+    \brief This file contains functions to deal with the initialization of raster decoding tool
 */
 #ifndef TeInitRasterDecoders_H
 #define TeInitRasterDecoders_H
 
-//! Initializes the system of decoding raster data in different formats
+#include "TeDefines.h"
+
+//! Initializes the system of decoding raster data by using the basic decoders provided by TerraLib
 /*! 
-	Source file should be customized to reflect the formats and identifiers
-	associate to each raster format.
-	This function should be called by all applications that instantiate a 
-	TeRaster.
-	\sa TeRaster TeDecoder
+	\sa TeRaster TeDecoder TeRasterParams
 */
-void TeInitRasterDecoders();
+TL_DLL void TeInitRasterDecoders();
 #endif
 
diff --git a/src/terralib/kernel/TeIntersector.cpp b/src/terralib/kernel/TeIntersector.cpp
old mode 100644
new mode 100755
index c215d77..040af46
--- a/src/terralib/kernel/TeIntersector.cpp
+++ b/src/terralib/kernel/TeIntersector.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -26,11 +26,269 @@ of this library and its documentation.
 #endif
 
 #include "TeIntersector.h"
+#include "TeRTree.h"
+#include "TeGeometryAlgorithms.h"
 #include <map>
 
 using namespace std;
 
-//---------------- TeIntersectionsBO ----------------//
+short TeINTERSECTOR2::TeCCW(const TeCoord2D& c1, const TeCoord2D& c2, const TeCoord2D& c3, bool& between)
+{
+	double dx1 = c2.x() - c1.x();
+	double dx2 = c3.x() - c1.x();
+	double dy1 = c2.y() - c1.y();
+	double dy2 = c3.y() - c1.y();
+
+	double dx1y2 = dx1 * dy2;
+	double dy1x2 = dy1 * dx2;
+
+	double coef = fabs(dx1y2 - dy1x2);
+
+	if(coef == 0.0)
+	{
+		// check if c3 is between c1 and c2
+		TeBox b;
+		b.x1_ = MIN(c1.x(), c2.x());
+		b.y1_ = MIN(c1.y(), c2.y());
+		b.x2_ = MAX(c1.x(), c2.x());
+		b.y2_ = MAX(c1.y(), c2.y());
+
+		if(::TeIntersects(c3, b))
+			between = true;
+
+		return TeNOTURN;
+	}
+	else
+	{
+		TeCoord2D pinter;
+		double dist = TePerpendicularDistance(c1, c2, c3, pinter); 
+
+		if(dist <= TePrecision::instance().precision())
+		{
+			// check if c3 is between c1 and c2
+			TeBox b;
+			b.x1_ = MIN(c1.x(), c2.x());
+			b.y1_ = MIN(c1.y(), c2.y());
+			b.x2_ = MAX(c1.x(), c2.x());
+			b.y2_ = MAX(c1.y(), c2.y());
+
+			if(::TeIntersects(c3, b))
+				between = true;
+
+			return TeNOTURN;
+		}
+		else			
+		{
+			if(dx1y2 > dy1x2)
+			{
+				return TeCOUNTERCLOCKWISE;
+			}
+			else
+			{
+				return TeCLOCKWISE;
+			}
+		}
+	}
+}
+
+bool TeINTERSECTOR2::TeIntersection(const TeCoord2D& a, const TeCoord2D& b, const TeCoord2D& c, const TeCoord2D& d, TeBoundaryIP& ips, TeSegmentIntersectionType& intersectionType)
+{
+	if(TeEquals(a, b))
+		return false;
+
+	if(TeEquals(c, d))
+		return false;
+
+	double xmin1 = MIN(a.x(), b.x());
+	double ymin1 = MIN(a.y(), b.y());
+	double xmax1 = MAX(a.x(), b.x());
+	double ymax1 = MAX(a.y(), b.y());
+	TeBox b1(xmin1, ymin1, xmax1, ymax1);
+
+	double xmin2 = MIN(c.x(), d.x());
+	double ymin2 = MIN(c.y(), d.y());
+	double xmax2 = MAX(c.x(), d.x());
+	double ymax2 = MAX(c.y(), d.y());
+	TeBox b2(xmin2, ymin2, xmax2, ymax2);
+
+	if(::TeIntersects(b1, b2))
+	{
+		if((TeEquals(a, c) || TeEquals(a, d)) && (TeEquals(b, c) || TeEquals(b, d)))
+		{
+			intersectionType = TeImproperIntersection;
+
+			ips.coords_.push_back(c);
+			ips.coords_.push_back(d);
+
+			return true;
+		}
+
+		bool between1 = false;
+		short sign1 = TeINTERSECTOR2::TeCCW(a, b, c, between1);
+
+		bool between2 = false;
+		short sign2 = TeINTERSECTOR2::TeCCW(a, b, d, between2);
+
+		bool between3 = false;
+		short sign3 = TeINTERSECTOR2::TeCCW(c, d, a, between3);
+
+		bool between4 = false;
+		short sign4 = TeINTERSECTOR2::TeCCW(c, d, b, between4);
+
+		if(((sign1 * sign2) <= 0) && ((sign3 * sign4) <= 0))	// if there is an intersection
+		{
+			intersectionType = TeProperIntersection;
+
+			if(between1)
+			{			
+				intersectionType = TeImproperIntersection;
+				ips.coords_.push_back(c);
+			}
+			
+			if(between2)
+			{
+				intersectionType = TeImproperIntersection;
+				ips.coords_.push_back(d);
+			}
+
+			if(between3 && !TeEquals(a, c) && !TeEquals(a, d))
+			{
+				intersectionType = TeImproperIntersection;
+
+				if(ips.coords_.size() == 2)
+					return true;
+
+				if(ips.coords_.size() == 1)
+				{
+					if(TeEquals(ips.coords_[0], a))
+						return true;
+				}
+
+				ips.coords_.push_back(a);
+			}
+			
+			if(between4 && !TeEquals(b, c) && !TeEquals(b, d))
+			{
+				intersectionType = TeImproperIntersection;
+
+				if(ips.coords_.size() == 2)
+					return true;
+
+				if(ips.coords_.size() == 1)
+				{
+					if(TeEquals(ips.coords_[0], b))
+						return true;
+				}
+
+				ips.coords_.push_back(b);
+			}
+
+			if(intersectionType == TeImproperIntersection)
+				return true;
+
+			double denominator = (d.y() - c.y()) * (b.x() - a.x()) - (d.x() - c.x()) * (b.y() - a.y());
+			
+			if(denominator == 0.0)	// parallel can not occur here any more! I expect this is true!
+				return false;		
+
+			// parameters
+			double Ua = ((d.x() - c.x()) * (a.y() - c.y()) - (d.y() - c.y()) * (a.x() - c.x())) / denominator; 
+			//double Ub = ((b.x() - a.x()) * (a.y() - c.y()) - (b.y() - a.y()) * (a.x() - c.x())) / denominator; 
+
+			TeCoord2D caux(a.x() + Ua * (b.x() - a.x()), a.y() + Ua * (b.y() - a.y()));
+
+			if(TeEquals(caux, a))
+			{
+				ips.coords_.push_back(a);
+				return true;
+			}
+
+			if(TeEquals(caux, b))
+			{
+				ips.coords_.push_back(b);
+				return true;
+			}
+
+			if(TeEquals(caux, c))
+			{
+				ips.coords_.push_back(c);
+				return true;
+			}
+
+			if(TeEquals(caux, d))
+			{
+				ips.coords_.push_back(d);
+				return true;
+			}
+
+			ips.coords_.push_back(caux);
+			
+			return true;
+		}
+	}
+
+	intersectionType = TeImproperIntersection;
+
+	return false;
+}
+
+bool TeINTERSECTOR2::TeIntersects(const TeCoord2D& a, const TeCoord2D& b, const TeCoord2D& c, const TeCoord2D& d, TeSegmentIntersectionType& intersectionType)
+{	
+	if(TeEquals(a, b))
+		return false;
+
+	if(TeEquals(c, d))
+		return false;
+
+	double xmin1 = MIN(a.x(), b.x());
+	double ymin1 = MIN(a.y(), b.y());
+	double xmax1 = MAX(a.x(), b.x());
+	double ymax1 = MAX(a.y(), b.y());
+	TeBox b1(xmin1, ymin1, xmax1, ymax1);
+
+	double xmin2 = MIN(c.x(), d.x());
+	double ymin2 = MIN(c.y(), d.y());
+	double xmax2 = MAX(c.x(), d.x());
+	double ymax2 = MAX(c.y(), d.y());
+	TeBox b2(xmin2, ymin2, xmax2, ymax2);
+
+	if(::TeIntersects(b1, b2))
+	{
+		if((TeEquals(a, c) || TeEquals(a, d)) && (TeEquals(b, c) || TeEquals(b, d)))
+		{
+			intersectionType = TeImproperIntersection;
+
+			return true;
+		}
+
+		bool between1 = false;
+		short sign1 = TeINTERSECTOR2::TeCCW(a, b, c, between1);
+
+		bool between2 = false;
+		short sign2 = TeINTERSECTOR2::TeCCW(a, b, d, between2);
+
+		bool between3 = false;
+		short sign3 = TeINTERSECTOR2::TeCCW(c, d, a, between3);
+
+		bool between4 = false;
+		short sign4 = TeINTERSECTOR2::TeCCW(c, d, b, between4);
+
+		if((sign1 * sign2) <= 0 && (sign3 * sign4 <= 0))	// if there is an intersection
+		{
+			intersectionType = TeProperIntersection;
+
+			if(between1 || between2 || between3 || between4)
+			{			
+				intersectionType = TeImproperIntersection;
+			}			
+
+			return true;
+		}
+	}
+		
+	return false;
+}
+
 bool TeINTERSECTOR2::TeIntersects(const TeLine2D& redLine, const TeLine2D& blueLine)
 {
 	if(redLine.size() < 2 || blueLine.size() < 2) 
@@ -64,7 +322,7 @@ bool TeINTERSECTOR2::TeIntersects(const TeLine2D& redLine, const TeLine2D& blueL
 		for(j = 0; j < nstep_blueLine; ++j)
 		{
 			// Check intersection.
-			if(TeIntersects(redLine[i], redLine[i+1], blueLine[j], blueLine[j+1], t))
+			if(TeINTERSECTOR2::TeIntersects(redLine[i], redLine[i+1], blueLine[j], blueLine[j+1], t))
 				return true;
 		}
 	}	
@@ -72,8 +330,6 @@ bool TeINTERSECTOR2::TeIntersects(const TeLine2D& redLine, const TeLine2D& blueL
 	return false;
 }
 
-
-
 bool TeINTERSECTOR2::TeSafeIntersections(const TeLine2D& redLine, const TeLine2D& blueLine, TeVectorBoundaryIP& report, const unsigned int& redObjId, const unsigned int& blueObjId)
 {
 	if(redLine.size() < 2 || blueLine.size() < 2) 
@@ -155,20 +411,22 @@ bool TeINTERSECTOR2::TeSafeIntersections(const TeLine2D& redLine, const TeLine2D
 	return hasIntersections;
 }
 
-
 bool TeINTERSECTOR2::TeSafeIntersections(const TePolygonSet& redPols, const TePolygonSet& bluePols, TeVectorBoundaryIP& report)
 {
 	unsigned int redPart = 0;
 	unsigned int redPolsSize = redPols.size();
 
+	unsigned int i, k;
+	register unsigned int j, l;
+
 	// Loops through red polygons
-	for(unsigned int i = 0; i < redPolsSize; ++i)
+	for(i = 0; i < redPolsSize; ++i)
 	{
 		TePolygon redPol = redPols[i];
 		unsigned int redPolSize = redPol.size();
 
 		// Loops through red polygons rings
-		for(register unsigned int j = 0; j < redPolSize; ++j)
+		for(j = 0; j < redPolSize; ++j)
 		{
 			TeLinearRing redRing = redPol[j];			
 
@@ -176,14 +434,14 @@ bool TeINTERSECTOR2::TeSafeIntersections(const TePolygonSet& redPols, const TePo
 			unsigned int bluePart = 0;
 			unsigned int bluePolsSize =  bluePols.size();
 
-			for(unsigned int k = 0; k < bluePolsSize; ++k)
+			for(k = 0; k < bluePolsSize; ++k)
 			{
 				// Loops through blue polygons rings
 				TePolygon bluePol = bluePols[k];
 
 				unsigned int bluePolSize = bluePol.size();
 
-				for(register unsigned int l = 0; l < bluePolSize; ++l)
+				for(l = 0; l < bluePolSize; ++l)
 				{
 					TeLinearRing blueRing = bluePol[l];
 
@@ -200,3 +458,599 @@ bool TeINTERSECTOR2::TeSafeIntersections(const TePolygonSet& redPols, const TePo
 	return !report.empty();
 }
 
+// Put polygon set segments into the index
+void TeINTERSECTOR2::TeIndexPolygonSet(const TePolygonSet& polygons, TeINTERSECTOR2::TeSegmentRTree& tree)
+{
+	unsigned int nPols = polygons.size();	
+	unsigned int i, j, k;
+
+	for(i = 0; i < nPols; ++i)
+	{
+		unsigned int nRings = polygons[i].size();
+
+		for(j = 0; j < nRings; ++j)
+		{
+			unsigned int nSegs = polygons[i][j].size() - 1;
+
+			for(k = 0; k < nSegs; ++k)
+			{
+				TeBox b;
+
+				b.x1_ = MIN(polygons[i][j][k].x(), polygons[i][j][k + 1].x());
+				b.y1_ = MIN(polygons[i][j][k].y(), polygons[i][j][k + 1].y());
+				b.x2_ = MAX(polygons[i][j][k].x(), polygons[i][j][k + 1].x());
+				b.y2_ = MAX(polygons[i][j][k].y(), polygons[i][j][k + 1].y());
+
+				TeINTERSECTOR2::TeSegIdInPolygonSet sid;
+
+				sid.polId_  = i;
+				sid.lineId_   = j;
+				sid.segId_ = k;
+
+				tree.insert(b, sid);
+			}
+		}
+	}
+
+	return;
+}
+
+// Estrutura auxiliar para indexar cada um dos pontos de intersecao em um multimap
+struct TeIntersectionIndexKey
+{
+	unsigned int segNum_;
+	unsigned int partNum_;
+	unsigned int polNum_;
+
+	TeIntersectionIndexKey()
+		: segNum_(0), partNum_(0), polNum_(0)
+	{
+	}
+
+	TeIntersectionIndexKey(const unsigned int& segNum, const unsigned int& partNum, const unsigned int& polNum)
+		: segNum_(segNum), partNum_(partNum), polNum_(polNum)
+	{
+	}
+
+	bool operator<(const TeIntersectionIndexKey& rhs) const
+	{
+		if(polNum_ < rhs.polNum_)
+			return true;
+
+		if(polNum_ > rhs.polNum_)
+			return false;
+
+		if(partNum_ < rhs.partNum_)
+			return true;
+
+		if(partNum_ > rhs.partNum_)
+			return false;
+
+		if(segNum_ < rhs.segNum_)
+			return true;
+
+		if(segNum_ > rhs.segNum_)
+			return false;
+
+		return false;
+	}
+};
+
+
+typedef multimap<TeIntersectionIndexKey, unsigned int> TeIntersectionIndex;
+
+// Dado um ponto de intersecao, faz a normalizacao do mesmo: procura um ponto correlato na lista de intersecao e tenta usar as mesmas coordenadas
+void TeNormalizeIntersection(TeINTERSECTOR2::TeBoundaryIP& ip, TeINTERSECTOR2::TeVectorBoundaryIP& report, TeIntersectionIndex& interIndex)
+{
+	TeIntersectionIndexKey key(ip.blueSegNum_, ip.bluePartNum_, ip.bluePolNum_);
+
+	pair<TeIntersectionIndex::iterator, TeIntersectionIndex::iterator> its = interIndex.equal_range(key);
+
+//	bool eraseOwn = false;
+
+	while(its.first != its.second)
+	{
+// se achamos um indice, vamos verificar se ele possui um ponto de intersecao que seja igual ao que temos em maos, segundo a tolerancia
+		unsigned int position = its.first->second;
+
+		if(TeEquals(report[position].coords_[0], ip.coords_[0]))
+		{
+			ip.coords_[0] = report[position].coords_[0];
+		}
+
+		if(ip.coords_.size() == 2 && report[position].coords_.size() == 1)
+		{
+			if(TeEquals(report[position].coords_[0], ip.coords_[1]))
+				ip.coords_[1] = report[position].coords_[0];			
+		}
+
+		if(ip.coords_.size() == 1 && report[position].coords_.size() == 2)
+		{
+			if(TeEquals(report[position].coords_[1], ip.coords_[0]))
+				ip.coords_[0] = report[position].coords_[1];			
+
+		}
+
+		if(ip.coords_.size() == 2 && report[position].coords_.size() == 2)
+
+		{
+			if(TeEquals(report[position].coords_[1], ip.coords_[1]))
+				ip.coords_[1] = report[position].coords_[1];
+
+			if(TeEquals(report[position].coords_[0], ip.coords_[1]))
+				ip.coords_[1] = report[position].coords_[0];
+
+
+			if(TeEquals(report[position].coords_[1], ip.coords_[0]))
+				ip.coords_[0] = report[position].coords_[1];
+		}
+
+		++its.first;
+	}
+}
+
+// insere a informacao da intersecao no indice
+void TeIndexIntersection(TeINTERSECTOR2::TeBoundaryIP& ip, const unsigned int& redPos, const unsigned int& bluePos, TeIntersectionIndex& interIndex)
+{
+	TeIntersectionIndexKey redkey(ip.redSegNum_, ip.redPartNum_, ip.redPolNum_);
+	TeIntersectionIndexKey bluekey(ip.blueSegNum_, ip.bluePartNum_, ip.bluePolNum_);
+
+	interIndex.insert(pair<TeIntersectionIndexKey, unsigned int>(redkey, redPos));
+	interIndex.insert(pair<TeIntersectionIndexKey, unsigned int>(bluekey, bluePos));
+}
+
+// insere o ponto de intersecao na lista
+void TeInsertIntersection(TeINTERSECTOR2::TeBoundaryIP& ip, TeINTERSECTOR2::TeVectorBoundaryIP& report)
+{
+	if(ip.coords_.size() == 2)	//overlap
+	{
+// put intersections in increase order of 'x'
+		if(ip.coords_[0].x_ < ip.coords_[1].x_)
+		{
+			report.push_back(ip);
+		}
+		else if(ip.coords_[0].x_ > ip.coords_[1].x_)
+		{
+			swap(ip.coords_[0], ip.coords_[1]);
+			report.push_back(ip);			
+		}
+		else if(ip.coords_[0].y_ < ip.coords_[1].y_)
+		{
+			report.push_back(ip);						
+		}
+		else
+		{
+			swap(ip.coords_[0], ip.coords_[1]);							
+			report.push_back(ip);
+		}
+	}
+	else
+	{
+		report.push_back(ip);
+	}
+}
+
+// Find intersection into two distinct sets: red and blue
+bool TeINTERSECTOR2::TeIntersection(const TePolygonSet& redPolygons, TeINTERSECTOR2::TeSegmentRTree& redTree, const TePolygonSet& bluePolygons, TeINTERSECTOR2::TeVectorBoundaryIP& report)
+{
+// if index is empty, so we index first
+	if(redTree.isEmpty())
+		TeINTERSECTOR2::TeIndexPolygonSet(redPolygons, redTree);
+
+	TeIntersectionIndex interIndex;
+
+	unsigned int nPols = bluePolygons.size();	
+
+	TeSegmentIntersectionType t = TeImproperIntersection;
+
+	unsigned int i, j, k, l;
+	for(i = 0; i < nPols; ++i)
+	{
+		unsigned int nRings = bluePolygons[i].size();
+
+		for(j = 0; j < nRings; ++j)
+		{
+			unsigned int nSegs = bluePolygons[i][j].size() - 1;
+
+// for each blue segment, find the one's that can intersects it into the red index tree
+			for(k = 0; k < nSegs; ++k)
+			{
+				TeBox b;
+
+				b.x1_ = MIN(bluePolygons[i][j][k].x(), bluePolygons[i][j][k + 1].x());
+				b.y1_ = MIN(bluePolygons[i][j][k].y(), bluePolygons[i][j][k + 1].y());
+				b.x2_ = MAX(bluePolygons[i][j][k].x(), bluePolygons[i][j][k + 1].x());
+				b.y2_ = MAX(bluePolygons[i][j][k].y(), bluePolygons[i][j][k + 1].y());
+
+				vector<TeINTERSECTOR2::TeSegIdInPolygonSet> segs;
+
+				redTree.search(b, segs);
+
+				unsigned int nSegsInter = segs.size();
+
+// depois tentamos achar os pontos de intersecao
+				for(l = 0; l < nSegsInter; ++l)
+				{
+					TeINTERSECTOR2::TeBoundaryIP ip1;
+
+					if(TeINTERSECTOR2::TeIntersection(bluePolygons[i][j][k], bluePolygons[i][j][k + 1], redPolygons[segs[l].polId_][segs[l].lineId_][segs[l].segId_], redPolygons[segs[l].polId_][segs[l].lineId_][segs[l].segId_ + 1], ip1, t))
+					{
+						ip1.redPolNum_ = segs[l].polId_;
+						ip1.redPartNum_ = segs[l].lineId_;
+						ip1.redSegNum_ = segs[l].segId_;
+
+						ip1.bluePolNum_ = i;
+						ip1.bluePartNum_ = j;
+						ip1.blueSegNum_ = k;
+
+						// normaliza a intersecao: se achar um outro pontos na lista de intersecao semelhante, usaremos o semelhante!
+						TeNormalizeIntersection(ip1, report, interIndex);
+
+
+						TeINTERSECTOR2::TeBoundaryIP ip2;	// objeto auxiliar
+						ip2.redPolNum_ = i;
+						ip2.redPartNum_ = j;
+						ip2.redSegNum_ = k;
+
+						ip2.bluePolNum_ = segs[l].polId_;
+						ip2.bluePartNum_ = segs[l].lineId_;
+						ip2.blueSegNum_ = segs[l].segId_;
+
+						ip2.coords_ = ip1.coords_;
+
+						TeNormalizeIntersection(ip2, report, interIndex);
+
+						ip1.coords_ = ip2.coords_;
+
+						TeInsertIntersection(ip1, report);						
+
+						TeIndexIntersection(ip1, report.size() - 1, report.size() - 1, interIndex);
+					}
+				}
+			}			
+		}
+	}
+
+	return !report.empty();
+}
+
+bool TeINTERSECTOR2::TeIsSimple(const TePolygonSet& polygons, vector<TeINTERSECTOR2::TePairSegIdInPolygonSet>& selfIntersectionList)
+{
+	bool hasSelfIntersection = false;
+
+	TeSegmentIntersectionType t = TeImproperIntersection;
+
+// create index tree
+	TeINTERSECTOR2::TeSegmentRTree tree(polygons.box());
+
+// loop through segments
+	unsigned int nPols = polygons.size();	
+
+	unsigned int i, j, k, l;
+
+	for(i = 0; i < nPols; ++i)
+	{
+		unsigned int nRings = polygons[i].size();
+
+		for(j = 0; j < nRings; ++j)
+		{
+			unsigned int nSegs = polygons[i][j].size() - 1;
+
+			for(k = 0; k < nSegs; ++k)
+			{
+				TeBox b;
+
+				b.x1_ = MIN(polygons[i][j][k].x(), polygons[i][j][k + 1].x());
+				b.y1_ = MIN(polygons[i][j][k].y(), polygons[i][j][k + 1].y());
+				b.x2_ = MAX(polygons[i][j][k].x(), polygons[i][j][k + 1].x());
+				b.y2_ = MAX(polygons[i][j][k].y(), polygons[i][j][k + 1].y());
+
+				TeINTERSECTOR2::TeSegIdInPolygonSet sid;
+
+				sid.polId_  = i;
+				sid.lineId_   = j;
+				sid.segId_ = k;
+
+// try to find filter segments that boxe intersects this segment
+				vector<TeINTERSECTOR2::TeSegIdInPolygonSet> segs;
+	
+				tree.search(b, segs);
+
+				unsigned int nSegsInter = segs.size();
+
+// if found, loops through segments to see if there are intersections
+				for(l = 0; l < nSegsInter; ++l)
+				{
+					TeINTERSECTOR2::TeBoundaryIP ip;
+
+					if(TeIntersection(polygons[i][j][k], polygons[i][j][k + 1], polygons[segs[l].polId_][segs[l].lineId_][segs[l].segId_], polygons[segs[l].polId_][segs[l].lineId_][segs[l].segId_ + 1], ip, t))
+					{
+// if there is intersection, we have to cases:
+						if(ip.coords_.size() == 2)
+						{
+// first, the segment overlaps another: so this configures a selfintersection
+							hasSelfIntersection = true;
+
+							selfIntersectionList.push_back(TePairSegIdInPolygonSet(sid, segs[l]));
+						}
+						else
+						{
+// second, the segment intersects in one point: so this may be a selft-intersection or may be a intersection between the posterior segment (already inserted) in this second, no worry it is right
+							if((sid.polId_ != segs[l].polId_) || (sid.lineId_ != segs[l].lineId_))
+							{
+								hasSelfIntersection = true;
+
+								selfIntersectionList.push_back(TePairSegIdInPolygonSet(sid, segs[l]));
+							}
+							else
+							{
+// we must look if they are consecutives (remeber last an firt will have intersections) 
+								int auxSegId = (int)sid.segId_;
+								int otherSegId = (int)(segs[l].segId_);
+
+// if it intersects the previous or the next, it's ok!
+								if((auxSegId == (otherSegId + 1)) || (auxSegId == (otherSegId -1)))
+								{
+									continue;
+								}
+								else
+								{
+// we need to see if it is not between last and first
+									if(auxSegId == (int)(polygons[sid.polId_][sid.lineId_].size() - 2))
+									{
+// ok, it is a consecutive intersection between last and first
+										if(otherSegId == 0)
+											continue;
+									}
+									else if(auxSegId == 0)
+									{
+// ok, it is a consecutive intersection between first and last
+										if(otherSegId == (int)(polygons[segs[l].polId_][segs[l].lineId_].size() - 2))
+											continue;
+									}
+
+									hasSelfIntersection = true;
+
+									selfIntersectionList.push_back(TePairSegIdInPolygonSet(sid, segs[l]));
+								}
+							}
+						}
+
+					}
+				}
+
+// inserts the segment into the tree
+				tree.insert(b, sid);
+			}
+		}
+	}
+
+	tree.clear();
+
+	return !hasSelfIntersection;
+}
+
+// Find intersection into two distinct sets: red lines and blue polygons
+bool TeINTERSECTOR2::TeIntersection(const TeLineSet& redLines, const TePolygonSet& bluePolygons, TeSegmentRTree& blueTree, TeINTERSECTOR2::TeVectorBoundaryIP& report)
+{
+// if index is empty, so we index the segments from polygonset first
+	if(blueTree.isEmpty())
+		TeINTERSECTOR2::TeIndexPolygonSet(bluePolygons, blueTree);
+
+// for each lines we must compute intersections
+	unsigned int nLines = redLines.size();	
+
+	TeSegmentIntersectionType t = TeImproperIntersection;
+
+	unsigned int i, j, l;
+
+	for(i = 0; i < nLines; ++i)
+	{
+		unsigned int nSegs = redLines[i].size() - 1;
+
+		for(j = 0; j < nSegs; ++j)
+		{
+// for each segment we compute intersections
+			TeBox b;
+
+			b.x1_ = MIN(redLines[i][j].x(), redLines[i][j + 1].x());
+			b.y1_ = MIN(redLines[i][j].y(), redLines[i][j + 1].y());
+			b.x2_ = MAX(redLines[i][j].x(), redLines[i][j + 1].x());
+			b.y2_ = MAX(redLines[i][j].y(), redLines[i][j + 1].y());
+
+			vector<TeINTERSECTOR2::TeSegIdInPolygonSet> segs;
+
+			blueTree.search(b, segs);
+
+			unsigned int nSegsInter = segs.size();
+
+// depois tentamos achar os pontos de intersecao
+			for(l = 0; l < nSegsInter; ++l)
+			{
+				TeINTERSECTOR2::TeBoundaryIP ip1;
+
+				if(TeINTERSECTOR2::TeIntersection(redLines[i][j], redLines[i][j + 1], bluePolygons[segs[l].polId_][segs[l].lineId_][segs[l].segId_], bluePolygons[segs[l].polId_][segs[l].lineId_][segs[l].segId_ + 1], ip1, t))
+				{
+					ip1.redPolNum_ = 0;
+					ip1.redPartNum_ = i;
+					ip1.redSegNum_ = j;
+
+					ip1.bluePolNum_ = segs[l].polId_;
+					ip1.bluePartNum_ = segs[l].lineId_;
+					ip1.blueSegNum_ = segs[l].segId_;
+
+					if(ip1.coords_.size() == 2)	//overlap
+					{
+						// Verificar se os pontos estao em ordem crescente
+						if(ip1.coords_[0].x_ < ip1.coords_[1].x_)
+						{
+							report.push_back(ip1);
+						}
+						else if(ip1.coords_[0].x_ > ip1.coords_[1].x_)
+						{
+							swap(ip1.coords_[0], ip1.coords_[1]);
+							report.push_back(ip1);
+						}
+						else if(ip1.coords_[0].y_ < ip1.coords_[1].y_)
+						{
+							report.push_back(ip1);						
+						}
+						else
+						{
+							swap(ip1.coords_[0], ip1.coords_[1]);							
+							report.push_back(ip1);						
+						}
+					}
+					else
+					{
+						report.push_back(ip1);
+					}
+				}
+			}
+		}
+	}
+
+	return !report.empty();
+}
+
+// Find intersection between segments into polygonset list
+bool TeINTERSECTOR2::TeIntersection(const TePolygonSet& polygons, TeINTERSECTOR2::TeSegmentRTree& tree, TeINTERSECTOR2::TeVectorBoundaryIP& report)
+{
+// clear tree before start process
+	tree.clear();
+
+	TeIntersectionIndex interIndex;
+
+	unsigned int nPols = polygons.size();	
+
+	if(nPols == 0)
+		return false;
+
+	unsigned int nLines = polygons[0].size();	
+
+	unsigned int i, j, k, l;
+
+// the first polygon's segments are all indexed into the tree
+	for(i = 0; i < nLines; ++i)
+	{
+		unsigned int nSegs = polygons[0][i].size() - 1;
+
+		for(j = 0; j < nSegs; ++j)
+		{
+			TeBox b;
+
+			b.x1_ = MIN(polygons[0][i][j].x(), polygons[0][i][j + 1].x());
+			b.y1_ = MIN(polygons[0][i][j].y(), polygons[0][i][j + 1].y());
+			b.x2_ = MAX(polygons[0][i][j].x(), polygons[0][i][j + 1].x());
+			b.y2_ = MAX(polygons[0][i][j].y(), polygons[0][i][j + 1].y());
+
+			TeINTERSECTOR2::TeSegIdInPolygonSet sid;
+
+			sid.polId_  = 0;
+			sid.lineId_   = i;
+			sid.segId_ = j;
+
+			tree.insert(b, sid);
+		}
+	}
+	
+	TeSegmentIntersectionType t = TeImproperIntersection;
+
+// for each polygon, we first test intersection of all segments  and then put them into the index
+	for(i = 1; i < nPols; ++i)
+	{
+		unsigned int nLines = polygons[i].size();	
+
+// for each line of the polygon, verifies intersection against the segments into the index
+		for(j = 0; j < nLines; ++j)
+		{
+			unsigned int nSegs = polygons[i][j].size() - 1;
+
+			for(k = 0; k < nSegs; ++k)
+			{
+// for each segment we find the one's that intersects its bounding box
+				TeBox b;
+
+				b.x1_ = MIN(polygons[i][j][k].x(), polygons[i][j][k + 1].x());
+				b.y1_ = MIN(polygons[i][j][k].y(), polygons[i][j][k + 1].y());
+				b.x2_ = MAX(polygons[i][j][k].x(), polygons[i][j][k + 1].x());
+				b.y2_ = MAX(polygons[i][j][k].y(), polygons[i][j][k + 1].y());
+
+				vector<TeINTERSECTOR2::TeSegIdInPolygonSet> segs;
+
+				tree.search(b, segs);
+
+				unsigned int nSegsInter = segs.size();
+
+// if there are candidates, try to find intersections
+				for(l = 0; l < nSegsInter; ++l)
+				{
+					TeINTERSECTOR2::TeBoundaryIP ip1;
+
+					TeINTERSECTOR2::TeBoundaryIP ip2;
+
+					if(TeINTERSECTOR2::TeIntersection(polygons[i][j][k], polygons[i][j][k + 1], polygons[segs[l].polId_][segs[l].lineId_][segs[l].segId_], polygons[segs[l].polId_][segs[l].lineId_][segs[l].segId_ + 1], ip1, t))
+					{
+// if the segment intersects a candidate, stores theirs intersection points
+						ip1.redPolNum_  = i;
+						ip1.redPartNum_ = j;
+						ip1.redSegNum_  = k;
+						ip1.bluePolNum_ = segs[l].polId_;
+						ip1.bluePartNum_ = segs[l].lineId_;
+						ip1.blueSegNum_ = segs[l].segId_;
+
+						// normaliza a intersecao: se achar um outro pontos na lista de intersecao semelhante, usaremos o semelhante!
+						TeNormalizeIntersection(ip1, report, interIndex);						
+
+						ip2.redPolNum_ = segs[l].polId_;
+						ip2.redPartNum_ = segs[l].lineId_;
+						ip2.redSegNum_ = segs[l].segId_;
+
+						ip2.bluePolNum_ = i;
+						ip2.bluePartNum_ = j;
+						ip2.blueSegNum_ = k;
+
+						ip2.coords_ = ip1.coords_;
+
+						TeNormalizeIntersection(ip2, report, interIndex);
+
+						ip1.coords_ = ip2.coords_;
+
+// insere os pontos de intersecao na lista de intersecao e no multi-map
+						TeInsertIntersection(ip1, report);						
+						TeInsertIntersection(ip2, report);
+
+						TeIndexIntersection(ip1, report.size() - 2, report.size() - 1, interIndex);	
+					}
+				}
+			}
+		}
+	
+// after the search for intersection, put segfments into index
+		for(j = 0; j < nLines; ++j)
+		{
+			unsigned int nSegs = polygons[i][j].size() - 1;
+
+			for(k = 0; k < nSegs; ++k)
+			{
+				TeBox b;
+
+				b.x1_ = MIN(polygons[i][j][k].x(), polygons[i][j][k + 1].x());
+				b.y1_ = MIN(polygons[i][j][k].y(), polygons[i][j][k + 1].y());
+				b.x2_ = MAX(polygons[i][j][k].x(), polygons[i][j][k + 1].x());
+				b.y2_ = MAX(polygons[i][j][k].y(), polygons[i][j][k + 1].y());
+
+				TeSegIdInPolygonSet sid;
+
+				sid.polId_ = i;
+				sid.lineId_ = j;
+				sid.segId_ = k;
+
+				tree.insert(b, sid);
+			}
+		}
+	}
+
+	return !report.empty();
+}
+
diff --git a/src/terralib/kernel/TeIntersector.h b/src/terralib/kernel/TeIntersector.h
old mode 100644
new mode 100755
index ffea4ac..ba8b2e4
--- a/src/terralib/kernel/TeIntersector.h
+++ b/src/terralib/kernel/TeIntersector.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,423 +20,195 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
-/*! \file TeIntersector.h
-    This file contains structures and definitions for line intersection algorithms.
- */
-
-/**
-  *@author Gilberto Ribeiro de Queiroz
-  */
+/*! \file  TeIntersector.h
+    \brief This file contains structures and definitions for line intersection algorithms.
+	\note  These data structures and algorithms MUST BE USED ONLY BY TerraLib kernel and should NOT be used by anyone because
+           THIS IS FOR INTERNAL USE ONLY.
+    \author Gilberto Ribeiro de Queiroz <gribeiro at dpi.inpe.br>
+*/
 
 #ifndef  __TERRALIB_INTERNAL_INTERSECTOR2_H
 #define  __TERRALIB_INTERNAL_INTERSECTOR2_H
 
 //TerraLib's include
-#include "TeCounted.h"
 #include "TeCoord2D.h"
-#include "TeGeometryAlgorithms.h"
+#include "TeRTree.h"
 
 //STL's include
-#include <list>
 #include <vector>
-#include <map>
-#include <algorithm>
-#include <string>
 
 using namespace std;
 
+/* 
+ *  WARNING: These data structures and algorithms MUST BE USED ONLY BY TerraLib kernel and should NOT be used by anyone because
+ *           the support and interfaces can be changed in future. THIS IS FOR INTERNAL USE ONLY.
+ */
 
-#define PRINT
-
+/*! \brief Contains structures and definitions needed by line intersection algorithms (FOR INTERNAL USE ONLY).
+*/
 namespace TeINTERSECTOR2
 {
+//! An epsilon value used to compare two real numbers
+#define EPSILON_COMPARE 1.0e-15
 
-#define EPSILON_COMPARE 0.00000000005
+/** @defgroup IntersectionAlgorithms Intersection Algorithms
+ *  Intersection Algorithms and data structures, used internally.
+ *  @{
+ */
 
-/*! \fn inline short TeCCW(const TeCoord2D& c1, const TeCoord2D& c2, const TeCoord2D& c3, bool& between)
-    \brief Tells if three points makes a right turn, a left turn or are collinear.
-    \param c1      The first coordinate.
-	\param c2      The second coordinate.
-	\param c3      The coordinate to test the relative position.
-	\param between Tells if c3 is between c1 and c2.
-*/
-inline short TeCCW(const TeCoord2D& c1, const TeCoord2D& c2, const TeCoord2D& c3, bool& between)
+//! This struct is used to represent a point intersection between two segments on boundary of a TePolygon or TeLine2D.
+struct TL_DLL TeBoundaryIP
 {
-	double tol = TePrecision::instance().precision();
-	TePrecision::instance().setPrecision(EPSILON_COMPARE);
-
+	vector<TeCoord2D> coords_;		//!< Points of intersection ocurried along these two segments (red and blue).
 
-	double dx1 = c2.x() - c1.x();
-	double dx2 = c3.x() - c1.x();
-	double dy1 = c2.y() - c1.y();
-	double dy2 = c3.y() - c1.y();
+	unsigned int redSegNum_;		//!< Red segment number.
+	unsigned int redPartNum_;		//!< Line number in a polygon that a red segment belongs.
+	unsigned int redPolNum_;		//!< Polygon number in a vector of polygons that a segment belongs.
 
-	double dx1y2 = dx1 * dy2;
-	double dy1x2 = dy1 * dx2;
-
-	// slope of the second line is greater than the first, so counterclockwise.
-	if(TeGeometryAlgorithmsPrecision::IsGreater(dx1y2, dy1x2))
-	{
-		TePrecision::instance().setPrecision(tol);
-
-		return TeCOUNTERCLOCKWISE;
-	}
-
-	// slope of the first line is greater than the second, so clockwise.
-	if(TeGeometryAlgorithmsPrecision::IsSmaller(dx1y2, dy1x2))
-	{
-		TePrecision::instance().setPrecision(tol);
+	unsigned int blueSegNum_;		//!< Blue segment number.
+	unsigned int bluePartNum_;		//!< Line number in a polygon that a blue segment belongs.
+	unsigned int bluePolNum_;		//!< Polygon number in a vector of polygons that a segment belongs.
+};
 
-		return TeCLOCKWISE;
-	}
-	
+//! This is the type of intersection point list.
+typedef vector<TeBoundaryIP> TeVectorBoundaryIP;
 
-	TePrecision::instance().setPrecision(tol);
-	// if we are here, so the three points are collinear.
-
-	// check if c3 is between c1 and c2
-	if(TeGeometryAlgorithmsPrecision::IsDifferent(c1.x(), c2.x()))	// c1c2 is not vertical
-		between = (TeGeometryAlgorithmsPrecision::IsSmallerEqual(c1.x(), c3.x()) && TeGeometryAlgorithmsPrecision::IsSmallerEqual(c3.x(), c2.x())) ||
-				  (TeGeometryAlgorithmsPrecision::IsGreaterEqual(c1.x(), c3.x()) && TeGeometryAlgorithmsPrecision::IsGreaterEqual(c3.x(), c2.x()));
-	else	// c1c2 is vertical
-		between = (TeGeometryAlgorithmsPrecision::IsSmallerEqual(c1.y(), c3.y()) && TeGeometryAlgorithmsPrecision::IsSmallerEqual(c3.y(), c2.y())) ||
-		          (TeGeometryAlgorithmsPrecision::IsGreaterEqual(c1.y(), c3.y()) && TeGeometryAlgorithmsPrecision::IsGreaterEqual(c3.y(), c2.y()));
-
-
-
-	//string linha = "";
-	//linha  = Te2String(c1.x(), 15);
-	//linha += " | ";
-	//linha += Te2String(c1.y(), 15);
-	//linha += " | ";
-	//linha += Te2String(c2.x(), 15);
-	//linha += " | ";
-	//linha += Te2String(c2.y(), 15);
-	//linha += " | ";
-	//linha += Te2String(c3.x(), 15);
-	//linha += " | ";
-	//linha += Te2String(c3.y(), 15);
-	//linha += " | ";
-	//linha += Te2String(dx1y2 - dy1x2, 15);
-	//linha += "\n";
-
-	//TeWriteToFile("c:\\log_ccw.txt", linha, "aw");
-
-
-	return TeNOTURN;
-}
-
-/*! \fn inline bool TeBoxIntersects(const TeCoord2D& a, const TeCoord2D& b, const TeCoord2D& c, const TeCoord2D& d)
-    \brief Tells if the box of segments intersects.
-    \param a  The first coordinate of the first segment.
-	\param b  The second coordinate of the first segment.
-	\param c  The first coordinate of the second segment.
-	\param d  The second coordinate of the second segment.
-*/
-inline bool TeBoxIntersects(const TeCoord2D& a, const TeCoord2D& b, const TeCoord2D& c, const TeCoord2D& d)
-{	
-	/* X bound box test */
-	if(d.x() > c.x()) 
-	{
-		if(b.x() < a.x())
-		{
-			if(TeGeometryAlgorithmsPrecision::IsGreater(c.x(), a.x()))
-				return false;	// don't intersect => S2 is to the right of S1
-
-			if(TeGeometryAlgorithmsPrecision::IsGreater(b.x(), d.x())) 
-				return false;	// don't intersect => S2 is to the left of S1
-		}
-		else
-		{
-			if(TeGeometryAlgorithmsPrecision::IsGreater(c.x(), b.x()))
-				return false;	// don't intersect => S2 is to the right of S1
-
-			if(TeGeometryAlgorithmsPrecision::IsGreater(a.x(), d.x())) 
-				return false;	// don't intersect => S2 is to the left of S1
-		}			
-	} 
-	else 
-	{
-		if(b.x() < a.x())
-		{
-			if(TeGeometryAlgorithmsPrecision::IsGreater(d.x(), a.x()))
-				return false;	// don't intersect => S2 is to the right of S1
-
-			if(TeGeometryAlgorithmsPrecision::IsGreater(b.x(), c.x()))
-				return false;	// don't intersect => S2 is to the left of S1
-		}
-		else
-		{
-			if(TeGeometryAlgorithmsPrecision::IsGreater(d.x(), b.x()))
-				return false;	// don't intersect => S2 is to the right of S1
-
-			if(TeGeometryAlgorithmsPrecision::IsGreater(a.x(), c.x()))
-				return false;	// don't intersect => S2 is to the left of S1
-		}
-	}
-	
-	/* Y bound box test */
-	if(d.y() > c.y()) 
-	{
-		if(b.y() < a.y())
-		{
-			if(TeGeometryAlgorithmsPrecision::IsGreater(c.y(), a.y()))
-				return false; // don't intersect => S2 is above of S1
-
-			if(TeGeometryAlgorithmsPrecision::IsGreater(b.y(), d.y())) 
-				return false; // don't intersect => S1 is above of S2
-		}
-		else
-		{
-			if(TeGeometryAlgorithmsPrecision::IsGreater(c.y(), b.y()))
-				return false; // don't intersect => S2 is above of S1
-
-			if(TeGeometryAlgorithmsPrecision::IsGreater(a.y(), d.y())) 
-				return false; // don't intersect => S1 is above of S2
-		}
-	} 
-	else 
-	{
-		if(b.y() < a.y())
-		{
-			if(TeGeometryAlgorithmsPrecision::IsGreater(d.y(), a.y()))
-				return false; // don't intersect => S2 is above of S1
-
-			if(TeGeometryAlgorithmsPrecision::IsGreater(b.y(), c.y())) 
-				return false; // don't intersect => S1 is above of S2
-		}
-		else
-		{
-			if(TeGeometryAlgorithmsPrecision::IsGreater(d.y(), b.y()))
-				return false; // don't intersect => S2 is above of S1
-
-			if(TeGeometryAlgorithmsPrecision::IsGreater(a.y(), c.y())) 
-				return false; // don't intersect => S1 is above of S2
-		}
-	}
-
-	return true;
-}
-
-struct TeBoundaryIP
+//! This struct represents an index to the right place of a segment in a TeLineSet, TeLine2D, TePolygon or TePolygonSet.
+struct TL_DLL TeSegIdInPolygonSet
 {
+	unsigned int polId_;	//!<  The polygon id, when used in a polygonset.
+	unsigned int lineId_;	//!<  The line id, when used in a lineset or in a polygon.
+	unsigned int segId_;	//!<  The segment id into a specified line.
+};
 
-	vector<TeCoord2D> coords_;
+//! This pair is used to index two segments that intersects.
+typedef pair<TeSegIdInPolygonSet, TeSegIdInPolygonSet> TePairSegIdInPolygonSet;
 
-	unsigned int redSegNum_;
-	unsigned int redPartNum_;
+//! This is the type used to index the segments in the boundary of a TeLine2D, TeLineSet, TePolygon or TePolygonSet.
+typedef TeSAM::TeRTree<TeSegIdInPolygonSet, 8> TeSegmentRTree;
 
-	unsigned int blueSegNum_;
-	unsigned int bluePartNum_;	
-};
-
-typedef vector<TeBoundaryIP> TeVectorBoundaryIP;
+/** \brief Tells if three points makes a right turn, a left turn or are collinear.
+    \param c1       The first coordinate.
+	\param c2       The second coordinate.
+	\param c3       The coordinate to test the relative position.
+	\param between  Tells if c3 is between c1 and c2.
+	\return			The orientation: TeCLOCKWISE, TeCOUNTERCLOCKWISE or TeNOTURN.
+*/
+TL_DLL short TeCCW(const TeCoord2D& c1, const TeCoord2D& c2, const TeCoord2D& c3, bool& between);
 
-/*! \fn inline bool TeIntersection(const TeCoord2D& a, const TeCoord2D& b, const TeCoord2D& c, const TeCoord2D& d, TeIntersCoordsVec& coords, TeSegmentIntersectionType& intersectionType)
-    \brief Returns the intersection point of the segments.
+/** \brief Returns the intersection point of the segments.
     \param a                 The first coordinate of the first segment.
 	\param b                 The second coordinate of the first segment.
 	\param c                 The first coordinate of the second segment.
 	\param d                 The second coordinate of the second segment.
-	\param coords            The intersection coordinates (0, 1 or 2).
+	\param ips               The intersection coordinates (0, 1 or 2).
 	\param intersectionType  An intersection may be proper or improper.
+	\return					 Returns true if there is an intersection between segments defined by end coordinates.
 */
-inline bool TeIntersection(const TeCoord2D& a, const TeCoord2D& b, const TeCoord2D& c, const TeCoord2D& d, TeBoundaryIP& ips, TeSegmentIntersectionType& intersectionType)
-{
-	if(TeEquals(a, b))
-		return false;
-
-	if(TeEquals(c, d))
-		return false;
-
-	if(TeBoxIntersects(a, b, c, d))
-	{
-		if((TeEquals(a, c) || TeEquals(a, d)) && (TeEquals(b, c) || TeEquals(b, d)))
-		{
-			intersectionType = TeImproperIntersection;
-
-			ips.coords_.push_back(a);
-			ips.coords_.push_back(b);
-
-			return true;
-		}
-
-		bool between1 = false;
-		short sign1 = TeCCW(a, b, c, between1);
-
-		bool between2 = false;
-		short sign2 = TeCCW(a, b, d, between2);
-
-		bool between3 = false;
-		short sign3 = TeCCW(c, d, a, between3);
-
-		bool between4 = false;
-		short sign4 = TeCCW(c, d, b, between4);
-
-		if((sign1 * sign2) <= 0 && (sign3 * sign4 <= 0))	// if there is an intersection
-		{
-			intersectionType = TeProperIntersection;
-
-			if(between1)
-			{			
-				intersectionType = TeImproperIntersection;
-				ips.coords_.push_back(c);
-			}
-			
-			if(between2)
-			{
-				intersectionType = TeImproperIntersection;
-				ips.coords_.push_back(d);
-			}
-
-			if(between3 && !TeEquals(a, c) && !TeEquals(a, d))
-			{
-				intersectionType = TeImproperIntersection;
-				ips.coords_.push_back(a);
-
-				return true;
-			}
-			
-			if(between4 && !TeEquals(b, c) && !TeEquals(b, d))
-			{
-				intersectionType = TeImproperIntersection;
-				ips.coords_.push_back(b);
-
-				return true;
-			}
-
-			if(intersectionType == TeImproperIntersection)
-				return true;
-
-			double denominator = (d.y() - c.y()) * (b.x() - a.x()) - (d.x() - c.x()) * (b.y() - a.y());
-			
-			if(denominator == 0.0)	// parallel can not occur here any more! I expect this is true!
-				return false;		// ERRO!!!!!!! Lan�ar Exce��o: Montar um esquema de exce��es
-
-			// parameters
-			double Ua = ((d.x() - c.x()) * (a.y() - c.y()) - (d.y() - c.y()) * (a.x() - c.x())) / denominator; 
-			double Ub = ((b.x() - a.x()) * (a.y() - c.y()) - (b.y() - a.y()) * (a.x() - c.x())) / denominator; 
-
-			if(Ua > 0.0 && Ua < 1.0  && Ub > 0.0 && Ub < 1.0)
-			{
-				ips.coords_.push_back(TeCoord2D(a.x() + Ua * (b.x() - a.x()), a.y() + Ua * (b.y() - a.y())));
-				return true;
-			}
-		}
-	}
-
-	intersectionType = TeImproperIntersection;
-
-	return false;
-}
-
-/*! \fn inline bool TeIntersects(const TeCoord2D& a, const TeCoord2D& b, const TeCoord2D& c, const TeCoord2D& d, TeSegmentIntersectionType& intersectionType)
-    \brief Tells if two segments intersects.
+TL_DLL bool TeIntersection(const TeCoord2D& a, const TeCoord2D& b, const TeCoord2D& c, const TeCoord2D& d, TeBoundaryIP& ips, TeSegmentIntersectionType& intersectionType);
+
+
+/** \brief Tells if two segments intersects.
     \param a                 The first coordinate of the first segment.
 	\param b                 The second coordinate of the first segment.
 	\param c                 The first coordinate of the second segment.
 	\param d                 The second coordinate of the second segment.
 	\param intersectionType  An intersection may be proper or improper.
+	\return					 Returns true if there is an intersection between segments defined by end coordinates.
 */
-inline bool TeIntersects(const TeCoord2D& a, const TeCoord2D& b, const TeCoord2D& c, const TeCoord2D& d, TeSegmentIntersectionType& intersectionType)
-{	
-	if(TeBoxIntersects(a, b, c, d))
-	{
-		if((TeEquals(a, c) || TeEquals(a, d)) && (TeEquals(b, c) || TeEquals(b, d)))
-		{
-			intersectionType = TeImproperIntersection;
-
-			return true;
-		}
-
-		bool between1 = false;
-		short sign1 = TeCCW(a, b, c, between1);
-
-		bool between2 = false;
-		short sign2 = TeCCW(a, b, d, between2);
-
-		bool between3 = false;
-		short sign3 = TeCCW(c, d, a, between3);
-
-		bool between4 = false;
-		short sign4 = TeCCW(c, d, b, between4);
-
-		if((sign1 * sign2) <= 0 && (sign3 * sign4 <= 0))	// if there is an intersection
-		{
-			intersectionType = TeProperIntersection;
-
-			if(between1)
-			{			
-				intersectionType = TeImproperIntersection;
-
-				return true;
-			}
-			
-			if(between2)
-			{
-				intersectionType = TeImproperIntersection;
-
-				return true;
-			}
-
-			if(between3 && !TeEquals(a, c) && !TeEquals(a, d))
-			{
-				intersectionType = TeImproperIntersection;
-
-				return true;
-			}
-			
-			if(between4 && !TeEquals(b, c) && !TeEquals(b, d))
-			{
-				intersectionType = TeImproperIntersection;
-
-				return true;
-			}
-
-			return true;
-		}
-	}
-		
-	return false;
-}
-
-/*! \fn bool TeSafeIntersections(const TePolygonSet& redPols, const TePolygonSet& bluePols, TeReportVector& report)
-    \brief Verifies if there is an intersection between two given polygonsets.
+TL_DLL bool TeIntersects(const TeCoord2D& a, const TeCoord2D& b, const TeCoord2D& c, const TeCoord2D& d, TeSegmentIntersectionType& intersectionType);
+
+
+/** \brief Verifies if there is an intersection between two given polygonsets.
     \param redPols  The first polygonset to test.
 	\param bluePols The second polygonset to test.
-	\param report   A list with the intersection points sorted according to redPols segments.
+	\param report   A list with the intersection points.
+	\return			Returns true if there is an intersection between segments of the polygons.
 	
+	\note WARNING: this is deprecated and will be replaced by another function in near future.
+
     This is a lazy algorithm. It can be used, for example, in intersections between a box and a line.
 	It is O(n*m) - where n and m are the numbers of segments in the first and second polygonsets.
  */
-bool TeSafeIntersections(const TePolygonSet& redPols, const TePolygonSet& bluePols, TeVectorBoundaryIP& report);
-
-/*! \fn bool TeSafeIntersections(const TeLine2D& redLine, const TeLine2D& blueLine, TeReportVector& report, const unsigned int& redObjId = 0, const unsigned int& blueObjId = 0, const bool& sortReport = true)
-    \brief Verifies if there is an intersection between two given lines.
-    \param redLine  The first line to test.
-	\param blueLine The second line to test.
-	\param report   A list with the intersection points sorted according to lred segments.
-	\param redObjId Red line object id
-	\param blueObjId Blue line object id
-	\param sortReport Flag to indicate that report should be sorted
+TL_DLL bool TeSafeIntersections(const TePolygonSet& redPols, const TePolygonSet& bluePols, TeVectorBoundaryIP& report);
+
+/** \brief Verifies if there is an intersection between two given lines.
+    \param redLine   The first line to test.
+	\param blueLine  The second line to test.
+	\param report    A list with the intersection points.
+	\param redObjId  Red line object id.
+	\param blueObjId Blue line object id.
+	\return			 Returns true if there is an intersection between segments of the lines.
 	
+	\note WARNING: this is deprecated and will be replaced by another function in near future.
+
     This is a lazy algorithm. It can be used, for example, in intersections between a box and a line.
 	It is O(n*m) - where n and m are the numbers of segments in the first and second lines.
  */
-bool TeSafeIntersections(const TeLine2D& redLine, const TeLine2D& blueLine, TeVectorBoundaryIP& report, const unsigned int& redObjId = 0, const unsigned int& blueObjId = 0);
+TL_DLL bool TeSafeIntersections(const TeLine2D& redLine, const TeLine2D& blueLine, TeVectorBoundaryIP& report, const unsigned int& redObjId = 0, const unsigned int& blueObjId = 0);
 
-/*! \fn bool TeIntersects(const TeLine2D& redLine, const TeLine2D& blueLine)
-    \brief Returns true if the lines intersects.
+/** \brief Returns true if the lines intersects.
 	\param redLine			The line to test.
 	\param blueLine			The line to test.
+	\return			        Returns true if there is an intersection between segments of the lines.
 
+	\note WARNING: this is deprecated and will be replaced by another function in near future.
  */
-bool TeIntersects(const TeLine2D& redLine, const TeLine2D& blueLine);
+TL_DLL bool TeIntersects(const TeLine2D& redLine, const TeLine2D& blueLine);
+
+/**	\brief Reports intersections between segments of polygons in the polygonset list.
+	\param polygons		A list of polygons to test self intersections.
+	\param tree			The tree with all index segments, it WILL BE filled inside this method.
+	\param report		A report list of intersection points.
+	\return				Returns true if there is an intersection.
+
+	\note				This function will not returns intersections between segments of the same polygon. It will only
+	                    report intersection between different polygons. The index tree MUST BE EMPTY, othewise, the
+						result is undefined. The result may have duplicated points because intersections are reported 
+						twice: this will turn fragmentation easier.
+ */
+TL_DLL bool TeIntersection(const TePolygonSet& polygons, TeSegmentRTree& tree, TeVectorBoundaryIP& report);
+
+/** \brief Reports intersections between segments of two diferent polygonsets.
+	\param redPolygons	A list of polygons without self intersections.
+	\param redTree		A tree with all red segment already indexed or not, if it is empty, so, it will be filled inside this method.
+	\param bluePolygons	A list of polygons without self intersections.
+	\param report		A report list of intersection points.
+	\return				Returns true if there is an intersection between a red segment and a blue segment.
+
+	\note				This function will not returns intersections between segments of the same polygon. It will only
+	                    report intersection between different polygons. The result may have duplicated points because intersections are reported 
+						twice: this will turn fragmentation easier.
+ */
+TL_DLL bool TeIntersection(const TePolygonSet& redPolygons, TeSegmentRTree& redTree, const TePolygonSet& bluePolygons, TeINTERSECTOR2::TeVectorBoundaryIP& report);
 
+/** \brief Reports intersections between segments of a lineset and a polygonset.
+	\param redLines	    A list of lines without self intersections.
+	\param bluePolygons	A list of polygons without self intersections.
+	\param blueTree		A tree with all segments from the polygonset already indexed or not, if it is empty, so, it will be filled inside this method.
+	\param report		A report list of intersection points.
+	\return				Returns true if there is an intersection between a red segment from the lineset and a blue segment from the polygonset.
 
+	\note				This function will not returns intersections between segments of the same polygon or lineset. It will only
+	                    report intersection between segments from different sets.
+ */
+TL_DLL bool TeIntersection(const TeLineSet& redLines, const TePolygonSet& bluePolygons, TeSegmentRTree& blueTree, TeINTERSECTOR2::TeVectorBoundaryIP& report);
 
-}	// end namespace TeINTERSECTOR2
+/** \brief Tells if there is a self-intersection between segments.
+	\param polygons					A list of polygons to test self intersections.
+	\param selfIntersectionList		A report list with all self-intersections.
+	\return							Returns true if there is not a self-intersection.
+ */
+TL_DLL bool TeIsSimple(const TePolygonSet& polygons, vector<TePairSegIdInPolygonSet>& selfIntersectionList);
 
+/** \brief Index polygon's segments.
+	\param polygons		A list of polygons to index it segment's.
+	\param tree			The tree if indexed segments.
+ */
+TL_DLL void TeIndexPolygonSet(const TePolygonSet& polygons, TeSegmentRTree& tree);
+
+/** @} */ 
+
+}	// end namespace TeINTERSECTOR2
 #endif //__TERRALIB_INTERNAL_INTERSECTOR2_H
 
diff --git a/src/terralib/kernel/TeKdTree.h b/src/terralib/kernel/TeKdTree.h
new file mode 100755
index 0000000..5a8decf
--- /dev/null
+++ b/src/terralib/kernel/TeKdTree.h
@@ -0,0 +1,1190 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file   TeKdTree.h
+    \brief  This file contains an implementation of kdtree data structures in main memory for two dimensions.
+	\note   These data structures and algorithms MUST BE USED ONLY BY TerraLib kernel and should NOT be used by anyone because
+	        THIS IS FOR INTERNAL USE ONLY.
+    \author Gilberto Ribeiro de Queiroz <gribeiro at dpi.inpe.br>    
+*/
+
+#ifndef  __TERRALIB_INTERNAL_KDTREE_H
+#define  __TERRALIB_INTERNAL_KDTREE_H
+
+#include "TeGeometry.h"
+
+/** 
+ * WARNING: These data structures and algorithms MUST BE USED ONLY BY TerraLib kernel and should NOT be used by anyone because
+ *          the support and interfaces can be changed in future. THIS IS FOR INTERNAL USE ONLY.
+ *
+ */
+
+namespace TeSAM
+{
+/** @defgroup PartitionAlgorithms Partition Algorithms
+ *  Partition Algorithms.
+ *  @{
+ */
+
+//! This function partition the conteiner in two parts: k-1 elements to the left (elements less than or equals to k-th element) and the right part with all other elements (elements greater than or equal to k-th element)
+/*
+	\param A             Conteiner of elements to partition
+	\param kthElement    Position of the k-th element, around the conteiner will be pertitionated
+	\param firstElement  Position of the first element
+	\param lastElement   Position of the las element
+	\param compFunctor   Functor to compare elements: implements the function "less than"
+
+*/
+template<class CONTAINER, class COMPFUNCTOR> 
+void TeHoareFind(CONTAINER& A, const unsigned int& kthElement, const unsigned int& firstElement, const unsigned int& lastElement,  const COMPFUNCTOR& compFunctor)
+{
+	unsigned int m = firstElement;
+	unsigned int n = lastElement;
+
+// Test if the median is in the bounds
+	if((kthElement < firstElement) || (kthElement > lastElement))
+		return;	
+
+// Do conteiner partition
+	while(m < n)
+	{		
+		unsigned int i = m;
+		unsigned int j = n;
+
+		typename CONTAINER::value_type r = A[kthElement];
+
+		while(i <= j)
+		{
+			while(compFunctor(A[i], r))
+				++i;  
+
+			while(compFunctor(r, A[j]))
+				--j;
+			
+			if(i <= j)
+			{
+				typename CONTAINER::value_type w = A[i];
+				A[i] = A[j];
+				A[j] = w;
+				
+			    ++i;
+				--j;
+			}
+		}
+
+		if(kthElement <= j)			// if the meet point was to the right, so all points above j are greater than the k-th element
+			n = j;
+		else if(i <= kthElement)	// otherwise, if the meeting point was to the left of k-th, so all elements before i are already in the correct location
+			m = i;
+		else
+			break;
+	}
+}
+
+//! Partition the conteiner like a bidimensional K-d Tree using Hoare algorithms
+/*
+	\param dataSet					Conteinet elements to be sorted like a K-dTree
+	\param first					Position of the first element in conteiner, where the sort will begin
+	\param last						Position of the last element, where the sort ends
+	\param level					Indicates the axis to begin the sort ('x' or 'y') and is used during the recursion process
+	\param lessThanCompFunctorByX	Functor to compare elements along the 'x' axis
+	\param lessThanCompFunctorByY	Functor to compare elements along the 'y' axis
+
+  	The expected complexity is O(N log N), where N is the number of elements in conteiner.
+*/
+template<class CONTAINER, class LESSTHANX, class LESSTHANY> 
+void kdsort(CONTAINER& dataSet, const unsigned int& first, const unsigned int& last, const char& level, const LESSTHANX& lessThanCompFunctorByX, const LESSTHANY& lessThanCompFunctorByY)
+{
+	const unsigned int kth = (last - first + 1u) / 2u;
+
+	if(level == 'x')
+	{
+// Move data around X axis
+		TeHoareFind(dataSet, first + kth, first, last, lessThanCompFunctorByX);
+
+// Recursive sort the left half and right half
+		if((first + kth) > first)
+			kdsort(dataSet, first, first + kth - 1u, 'y', lessThanCompFunctorByX, lessThanCompFunctorByY);
+
+		if((first + kth) < last)
+			kdsort(dataSet, first + kth + 1u, last, 'y', lessThanCompFunctorByX, lessThanCompFunctorByY);
+	}
+	else
+	{
+// Move data around Y axis
+		TeHoareFind(dataSet, first + kth, first, last, lessThanCompFunctorByY);
+
+// Recursive sort the left half and right half
+		if((first + kth) > first)
+			kdsort(dataSet, first, first + kth - 1u, 'x', lessThanCompFunctorByX, lessThanCompFunctorByY);
+
+		if((first + kth) < last)
+			kdsort(dataSet, first + kth + 1u, last, 'x', lessThanCompFunctorByX, lessThanCompFunctorByY);
+	}
+}
+/** @} */
+
+//! Kd-tree node type for nodes with single elements (used by template instantiation).
+struct TL_DLL kd_node_data_single_tag {};
+
+//! Kd-Tree node type for nodes with multuple elements (used by template instantiation).
+struct TL_DLL kd_node_data_set_tag {};
+
+
+//! Class that represents a node of a TeKdTree
+/*!
+	Each node contains a pointer to its left and right subtree (NULL if it is not set),
+	one key used for insertion of the data into the tree.
+
+	WARNING: <BR>
+
+	1. The key must have methods called x() and y(). <BR>
+	
+	2. These kind of node stores the data in each node. <BR>
+
+	3. The nodes may contains one single element (kd_node_data_single_tag) or a set of values (kd_node_data_set_tag). <BR>
+	
+	4. If the node type is kd_node_data_single_tag than NodeData and NodeDataItem are the same types. And if
+	   one entry with the same key already exist, so they will be overwrite. <BR>
+	   
+	5. If the node type is kd_node_data_set_tag than NodeData mus have a method called push_back(NodeDataItem)
+	   that permits to store elements with the same key in the node. <BR>
+ */
+template<class NodeKey, class NodeData, class NodeDataItem,
+         class NodeDataTag = kd_node_data_single_tag>
+class TeKdTreeNode
+{
+	protected:
+
+		//! The key used to access this record
+		NodeKey key_;
+
+		//! The data stored in this record
+		NodeData data_;
+
+		//! Pointer to the left sub-tree.
+		TeKdTreeNode* left_;
+
+		//! Pointer to the right sub-tree.
+		TeKdTreeNode* right_;
+
+	public:
+
+		//! Export key type.
+		typedef NodeKey kdKey;
+
+		//! Export data type.
+		typedef NodeData kdData;
+
+		//! Export data item type.
+		typedef NodeDataItem kdDataItem;
+
+		//! Export data type.
+		typedef NodeDataTag  kdDataTag;
+
+		//! Constructor
+		TeKdTreeNode(const NodeKey& k)
+			: key_(k), left_(0), right_(0)
+		{
+		}
+
+		//! Sets the key to the node
+		void setKey(const NodeKey& k)
+		{
+			key_ = k;
+		}
+
+		//! Returns a reference to node key
+		const NodeKey& getKey(void) const
+		{
+			return key_;
+		}
+
+		//! Sets the data in the node
+		void setData(const NodeData& data)
+		{
+			data_ = data;
+		}
+
+		//! Returns a reference to data node
+		NodeData& getData(void)
+		{
+			return data_;
+		}
+
+		//! Sets the left child pointer
+		void setLeft(TeKdTreeNode* node)
+		{
+			left_ = node;
+		}
+
+		//! Sets the right child pointer
+		void setRight(TeKdTreeNode* node)
+		{
+			right_ = node;
+		}
+
+		//! Accessor for left child
+		TeKdTreeNode* getLeft(void) const
+		{
+			return left_;
+		}
+
+		//! Accessor for right child
+		TeKdTreeNode* getRight(void) const
+		{
+			return right_;
+		}		
+
+		//! Method to check if this has a left child
+		bool hasLeft(void) const
+		{
+			return (left_ != 0);
+		}
+		
+		//! Method to check if a this has a right child
+		bool hasRight(void) const
+		{
+			return (right_ != 0);
+		}
+
+		//! Method to check if this has no children
+		bool isLeaf(void) const
+		{
+			return !(hasLeft() || hasRight());
+		}		
+
+		//! Method to count the number of nodes below this
+		unsigned int descendants(void) const
+		{
+			unsigned int totalLeft  = 0u;
+			unsigned int totalRight = 0u;
+
+			if(hasLeft())
+				totalLeft = 1u + getLeft()->descendants();
+
+			if(hasRight())
+				totalRight = 1u + getRight()->descendants();
+
+			return (totalLeft + totalRight);
+		}
+
+	private:
+
+		//! No copy allowed
+		TeKdTreeNode(const TeKdTreeNode& other);
+
+		//! No copy allowed
+		TeKdTreeNode& operator=(const TeKdTreeNode& other);
+
+};	// end of class TeKdTreeNode
+
+//! A base class for Kd-Tree structures
+/*!
+	This class implements only common kdtree methods and properties.
+ */
+template<class KdTreeNode>
+class TeBasicKdTree
+{
+	protected:				
+
+		//! Pointer to the root node
+		KdTreeNode* root_;
+
+		//! Bounding box of all nodes
+		TeBox mbr_;
+
+		//! The size of the K-d Tree (number of nodes)
+		unsigned int size_;		
+
+	public:
+
+		//! Constructor
+		TeBasicKdTree(const TeBox& mbr)
+			: root_(0), mbr_(mbr), size_(0u)
+		{
+		}
+
+		//! Destructor
+		~TeBasicKdTree()
+		{		
+			clear();
+		}
+
+		//! Clear all tree nodes
+		void clear(void)
+		{
+			if(root_)
+			{
+				erase(root_);
+				root_ = 0;
+				size_ = 0;
+			}
+		}
+
+		//! The number of tree nodes
+		const unsigned int& size(void) const
+		{
+			return size_;
+		}
+		
+		//! Return true if the tree is empty
+		bool isEmpty(void) const
+		{
+			return root_ == 0;
+		}
+
+		//! Sets the bounding box of all elements in the tree
+		void setBox(const TeBox& mbr)
+		{
+			mbr_ = mbr;
+		}
+
+		//! Sets the bounding box of all elements in the tree
+		const TeBox& getBox(void) const
+		{
+			return mbr_;
+		}
+
+	protected:
+
+		//! Erases a node from the tree and all nodes below it.
+		void erase(KdTreeNode* node)
+		{
+			if(node->hasLeft())
+				erase(node->getLeft());
+
+			if(node->hasRight())
+				erase(node->getRight());
+
+			delete node;
+
+			return;
+		}
+
+	private:
+
+		//! No copy allowed
+		TeBasicKdTree(const TeBasicKdTree& other);
+
+		//! No copy allowed
+		TeBasicKdTree& operator=(const TeBasicKdTree& other);
+};
+
+
+//! A class that represents a two dimensional K-d Tree (2-d Tree)
+/*!	
+	WARNING:
+
+	1. This type of tree stores the data into nodes (not only in the leafs node).
+	
+	2. This tree may be built by two ways: <BR>
+	   2.1. Inserting each element in the tree. In this case the tree can becomes unbalanced, but in practical
+	        cases this is not the expected, and is the best way to construct the tree (faster way). <BR>
+	   2.2. Passing a container with pairs (key/data-item) and using the method buildOptimized after
+	        calling kdsort. The tree built this way is almost balanced but will be 
+			construct in time O(N log N).<BR>
+			WARNING: In this case items with the same key will be stores in different nodes!<BR>
+	
+	3. This type of tree may be of special interest of BOX SEARCH QUERIES.	
+
+	4. If the node type is kd_node_data_single_tag than NodeData and NodeDataItem are the same types. And if
+	   one entry with the same key already exist, so they will be overwrite.
+	   
+	5. If the node type is kd_node_data_set_tag than NodeData mus have a method called push_back(NodeDataItem)
+	   that permits to store elements with the same key in the node.
+ */
+template<class KdTreeNode>
+class TeKdTree : public TeBasicKdTree<KdTreeNode>
+{
+        using TeBasicKdTree<KdTreeNode>::root_;
+        using TeBasicKdTree<KdTreeNode>::size_;
+        using TeBasicKdTree<KdTreeNode>::mbr_;
+        
+	public:
+
+		//! Export key type.
+		typedef typename KdTreeNode::kdKey kdKey;
+
+		//! Export data type.
+		typedef typename KdTreeNode::kdData kdData;
+
+		//! Export data item type.
+		typedef typename KdTreeNode::kdDataItem kdDataItem;		
+
+		//! Export data type.
+		typedef typename KdTreeNode::kdDataTag kdDataTag;
+
+		//! Constructor
+		TeKdTree(const TeBox& mbr)
+			: TeBasicKdTree<KdTreeNode>(mbr)
+		{
+		}
+
+		//! Inserts the data with a given key in tree
+		inline void insert(const kdKey& key, const kdDataItem& item);
+
+		//! Inserts the data in the tree and and keeps it balanced: the kdsort algorithm must be called before
+		void buildOptimized(vector<pair<kdKey, kdDataItem> >& dataSet)
+		{
+			const unsigned int last = dataSet.size() - 1u;
+
+			root_ = buildOptimized(dataSet, 0u, last);			
+		}		
+
+		//! Range search query.
+		void search(const TeBox& rect, vector<KdTreeNode*>& report) const
+		{
+			if(root_)
+				search(rect, root_, 'x', report);
+
+			return;
+		}					
+
+	protected:
+
+		//! Inserts data for single nodes, i.e., nodes that stores only one element
+		void insertData(KdTreeNode*& node, const kdDataItem& data, const kd_node_data_single_tag&)
+		{
+			node->setData(data);
+		}
+
+		//! Inserts data for set nodes, i.e., nodes that may stores many element
+		void insertData(KdTreeNode*& node, const kdDataItem& data, const kd_node_data_set_tag&)
+		{
+			node->getData().push_back(data);
+		}
+
+		//! Recursive range query
+		inline void search(const TeBox& rect, KdTreeNode* node, const char& level, vector<KdTreeNode*>& report) const;
+
+		//! Builds the tree recursively
+		KdTreeNode* buildOptimized(vector<pair<kdKey, kdDataItem> >& dataSet, const unsigned int& first, const unsigned int& last)
+		{
+			const unsigned int kth = (last - first + 1u) / 2u;
+
+			KdTreeNode* newNode = new KdTreeNode(dataSet[first + kth].first);
+
+			newNode->setData(dataSet[first + kth].second);
+
+			++size_;
+
+			if((first + kth) > first)
+				newNode->setLeft(buildOptimized(dataSet, first, first + kth - 1u));
+
+			if((first + kth) < last)
+				newNode->setRight(buildOptimized(dataSet, first + kth + 1u, last));
+
+			return newNode;
+		}				
+
+	private:
+
+		//! No copy allowed
+		TeKdTree(const TeKdTree& other);
+
+		//! No copy allowed
+		TeKdTree& operator=(const TeKdTree& other);
+
+};	// end class TeKdTree
+
+template<class KdTreeNode>
+void TeKdTree<KdTreeNode>::insert(const kdKey& key, const kdDataItem& item)
+{
+	if(root_ == 0)
+	{
+		root_ = new KdTreeNode(key);
+
+		insertData(root_, item, kdDataTag());
+	}
+	else
+	{					
+		char level = 'x';
+
+		bool left = false;
+
+		KdTreeNode* x = root_;
+		KdTreeNode* y = 0;
+
+		while(x != 0)
+		{
+			y = x;
+
+			if(level == 'x')
+			{
+				if(key.x() > x->getKey().x())		// if the key is greater than, inserts in the right subtree
+				{
+					x = x->getRight();
+					left = false;
+				}
+				else if(key.x() < x->getKey().x())		// if the key is smaller than, inserts in the left subtree
+				{
+					x = x->getLeft();
+					left = true;
+				}
+				else if(key.y() == x->getKey().y())		// if the key already exist, in the case of single node the data will be overwrite and in the case of set node they will push_back the item
+                {
+					insertData(x, item, kdDataTag());
+
+					return;							
+				}
+				else					// found the same axis partition, so go left
+				{
+					x = x->getLeft();
+					left = true;
+				}						
+
+				level = 'y';
+			}
+			else
+			{
+				if(key.y() > x->getKey().y())
+				{
+					x = x->getRight();
+					left = false;
+				}
+				else if(key.y() < x->getKey().y())
+				{
+					x = x->getLeft();
+					left = true;
+				}
+				else if(key.x() == x->getKey().x())
+                                {
+					insertData(x, item, kdDataTag());
+
+					return;							
+				}
+				else
+				{
+					x = x->getLeft();
+					left = true;
+				}						
+
+				level = 'x';						
+			}
+		}
+
+		KdTreeNode* newNode = new KdTreeNode(key);
+
+		insertData(newNode, item, kdDataTag());
+
+		if(left)
+			y->setLeft(newNode);
+		else
+			y->setRight(newNode);
+	}
+
+	++size_;
+
+	return;
+}
+
+template<class KdTreeNode>
+void TeKdTree<KdTreeNode>::search(const TeBox& rect, KdTreeNode* node, const char& level, vector<KdTreeNode*>& report) const
+{
+	if((node->getKey().x() >= rect.x1_) && (node->getKey().x() <= rect.x2_) &&
+	   (node->getKey().y() >= rect.y1_) && (node->getKey().y() <= rect.y2_))
+		report.push_back(node);
+
+	if(level == 'x')
+	{
+		if(node->hasLeft())
+			if(node->getKey().x() >= rect.x1_)
+				search(rect, node->getLeft(), 'y', report);
+
+		if(node->hasRight())
+			if(node->getKey().x() <= rect.x2_)
+				search(rect, node->getRight(), 'y', report);
+	}
+	else
+	{
+		if(node->hasLeft())
+			if(node->getKey().y() >= rect.y1_)
+				search(rect, node->getLeft(), 'x', report);
+
+		if(node->hasRight())
+			if(node->getKey().y() <= rect.y2_)
+				search(rect, node->getRight(), 'x', report);
+	}
+
+	return;
+}
+
+//! Class that represents a node of a TeAdaptativeKdTree
+/*!
+	Each node contains a pointer to its left and right subtree (NULL if it is not set),
+	a discriminator that indicates the axis of partition, the partition key and
+	a set of data-items.
+
+	WARNING:
+
+	1. The key must have methods called x() and y().
+	
+	2. These kind of node stores the data only in the leafs.
+
+	3. The leaf nodes contains a set of values that forms a bucket (the size is controlled by the tree methods tha use this class).
+ */
+template<class NodeKey, class NodeData, class NodeDataItem>
+class TeAdaptativeKdTreeNode
+{
+protected:
+		//! The key used to access this record
+		double key_;
+
+		//! The data stored in this record
+		NodeData data_;
+
+		//! The discriminator used in partition
+		char discriminator_;
+
+		//! Pointer to the left sub-tree.
+		TeAdaptativeKdTreeNode* left_;
+
+		//! Pointer to the right sub-tree.
+		TeAdaptativeKdTreeNode* right_;
+
+public:
+		//! Export key type.
+		typedef NodeKey kdKey;
+
+		//! Export data type.
+		typedef NodeData kdData;
+
+		//! Export data item type.
+		typedef NodeDataItem kdDataItem;
+
+		//! Constructor
+		TeAdaptativeKdTreeNode(const double& k)
+			: key_(k), discriminator_('x'), left_(0), right_(0)
+		{ }
+
+		//! Sets the key to the node
+		void setKey(const double& k)
+		{
+			key_ = k;
+		}
+
+		//! Returns a reference to node key
+		const double& getKey(void) const
+		{
+			return key_;
+		}
+
+		//! Sets the data in the node
+		void setData(const NodeData& data)
+		{
+			data_ = data;
+		}
+
+		//! Returns a reference to data node
+		NodeData& getData(void)
+		{
+			return data_;
+		}
+
+		//! Sets the data in the node
+		void setDiscriminator(const char& d)
+		{
+			discriminator_ = d;
+		}
+
+		//! Returns a reference to discriminator
+		const char& getDiscriminator(void) const
+		{
+			return discriminator_;
+		}
+
+		//! Sets the left child pointer
+		void setLeft(TeAdaptativeKdTreeNode* node)
+		{
+			left_ = node;
+		}
+
+		//! Sets the right child pointer
+		void setRight(TeAdaptativeKdTreeNode* node)
+		{
+			right_ = node;
+		}
+
+		//! Accessor for left child
+		TeAdaptativeKdTreeNode* getLeft(void) const
+		{
+			return left_;
+		}
+
+		//! Accessor for right child
+		TeAdaptativeKdTreeNode* getRight(void) const
+		{
+			return right_;
+		}		
+
+		//! Method to check if this has a left child
+		bool hasLeft(void) const
+		{
+			return (left_ != 0);
+		}
+		
+		//! Method to check if a this has a right child
+		bool hasRight(void) const
+		{
+			return (right_ != 0);
+		}
+
+		//! Method to check if this has no children
+		bool isLeaf(void) const
+		{
+			return !(hasLeft() || hasRight());
+		}
+
+		//! Method to count the number of nodes below this
+		unsigned int descendants(void) const
+		{
+			unsigned int totalLeft  = 0u;
+			unsigned int totalRight = 0u;
+
+			if(hasLeft())
+				totalLeft = 1u + getLeft()->descendants();
+
+			if(hasRight())
+				totalRight = 1u + getRight()->descendants();
+
+			return (totalLeft + totalRight);
+		}		
+
+	private:
+
+		//! No copy allowed
+		TeAdaptativeKdTreeNode(const TeAdaptativeKdTreeNode& other);
+
+		//! No copy allowed
+		TeAdaptativeKdTreeNode& operator=(const TeAdaptativeKdTreeNode& other);
+
+};	// end of class TeAdaptativeKdTreeNode
+
+//! A class that represents a two dimensional K-d Tree (2-d Tree) that store data-elements into the leafs
+/*!	
+	WARNING:
+
+	1. This type of tree stores the data only in the leaf nodes.
+	
+	2. The process of construction expect that the tree is almost balanced
+    	
+	3. This type of tree may be of special interest of NEAREST NEIGHBOR SEARCH QUERIES.
+
+	4. After a box search it will be necessary to do a refinement.
+ */
+template<class KdTreeNode>
+class TeAdaptativeKdTree : public TeBasicKdTree<KdTreeNode>
+{
+	using TeBasicKdTree<KdTreeNode>::root_;
+	using TeBasicKdTree<KdTreeNode>::size_;
+	using TeBasicKdTree<KdTreeNode>::mbr_;
+        
+protected:				
+		//! Bucket size (maximum number of elements in each node)
+		unsigned int bucketSize_;
+		
+public:
+		//! Export key type.
+		typedef typename KdTreeNode::kdKey kdKey;		
+
+		//! Export data type.
+		typedef typename KdTreeNode::kdData kdData;		
+
+		//! Export data item type.
+		typedef typename KdTreeNode::kdDataItem kdDataItem;	
+
+		//! Export node type.
+		typedef KdTreeNode kdNode;		
+
+		//! Constructor
+		TeAdaptativeKdTree(const TeBox& box, const unsigned int& bucketSize = 12)
+			: TeBasicKdTree<KdTreeNode>(box), bucketSize_(bucketSize)
+		{
+		}
+
+		//! Sets bucket size for leaf nodes
+		void setBucketSize(const unsigned int& size)
+		{
+			bucketSize_ = size;
+		}
+
+		//! Sets bucket size for leaf nodes
+		const unsigned int& getBucketSize(void) const
+		{
+			return bucketSize_;
+		}
+
+		//! Inserts the data set into the tree
+		void build(vector<pair<kdKey, kdDataItem> >& dataSet)
+		{
+			root_ = build(dataSet, 0.0, mbr_);
+		}
+
+		//! Search the nearest data in nodes: you must pass an array of kdDataItem of size "k" with coordinates values (X() and Y()) adjusted to TeMAXFLOAT (this dummy values will be replaced at processing time), and if not all neighbors are found so sqrDists will contains TeMAXFLOAT in array index
+		void nearestNeighborSearch(const kdKey& key, vector<kdDataItem>& report, vector<double>& sqrDists, const unsigned int& k) const
+		{
+			if(root_)
+			{
+				sqrDists.clear();
+
+				for(unsigned int i = 0; i < k; ++i)
+					sqrDists.push_back(TeMAXFLOAT);
+				
+				TeBox rect(-TeMAXFLOAT, -TeMAXFLOAT, +TeMAXFLOAT, +TeMAXFLOAT);
+
+				nearestNeighborSearch(root_, key, report, sqrDists, rect);
+			}
+		}		
+
+		//! Range search query.
+		void search(const TeBox& rect, vector<KdTreeNode*>& report) const
+		{
+			if(root_)
+				search(rect, root_, report);
+
+			return;
+		}		
+
+		//! Range search query: the refinement is already done
+		inline void search(const TeBox& rect, vector<kdDataItem>& report) const;
+
+protected:			
+		//! Build the tree recursivily 
+		inline KdTreeNode* build(vector<pair<kdKey, kdDataItem> >& dataSet, double averageValue, const TeBox& mbr);
+
+		//! Recursive range query.
+		inline void search(const TeBox& rect, KdTreeNode* node, vector<KdTreeNode*>& report) const;
+
+		//! Recursive nearest neighbor search
+		inline void nearestNeighborSearch(KdTreeNode* node, const kdKey& key, vector<kdDataItem>& report, vector<double>& sqrDists, TeBox& rect) const;
+
+		//! Update neighbor list
+		inline void update(KdTreeNode* node, const kdKey& key, vector<kdDataItem>& report, vector<double>& sqrDists, TeBox& rect) const;
+
+		//! Returns the average value along the axis
+		double average(vector<pair<kdKey, kdDataItem> >& dataSet, const char& discriminator) const
+		{
+			const unsigned int size = dataSet.size();
+
+			double medianValue = 0.0;
+
+			if(discriminator == 'x')
+			{
+				for(unsigned int i = 0; i < size; ++i)
+					medianValue += dataSet[i].first.x();
+
+				return medianValue / size;
+			}
+			else
+			{
+				for(unsigned int i = 0; i < size; ++i)
+					medianValue += dataSet[i].first.y();
+
+				return medianValue / size;
+			}
+		}			
+		
+private:
+		//! No copy allowed
+		TeAdaptativeKdTree(const TeAdaptativeKdTree& other);
+
+		//! No copy allowed
+		TeAdaptativeKdTree& operator=(const TeAdaptativeKdTree& other);
+
+};	// end class TeAdaptativeKdTree
+
+template<class KdTreeNode>
+KdTreeNode* TeAdaptativeKdTree<KdTreeNode>::build(vector<pair<kdKey, kdDataItem> >& dataSet, double averageValue, const TeBox& mbr)
+{
+	++size_;
+
+	if(dataSet.size() <= bucketSize_)
+	{
+		KdTreeNode* node = new KdTreeNode(averageValue);
+
+		node->setDiscriminator('l');
+		//node->setBox(mbr);
+
+		unsigned int size = dataSet.size();
+
+		for(unsigned int i = 0; i < size; ++i)
+			node->getData().push_back(dataSet[i].second);
+
+		return node;
+	}
+
+	TeBox newMbr1(mbr);
+	TeBox newMbr2(mbr);	
+
+	char discriminator = 'x';
+
+	vector<pair<kdKey, kdDataItem> > leftDataSet;
+	vector<pair<kdKey, kdDataItem> > rightDataSet;
+
+// Finds the largest dimension
+	if((mbr.x2_ - mbr.x1_) > (mbr.y2_ - mbr.y1_))
+	{
+// Finds the median along "x" axis
+		averageValue = average(dataSet, 'x');
+
+// Adjust box for left and right branchs
+		newMbr1.x2_ = averageValue;
+		newMbr2.x1_ = averageValue;
+
+		unsigned int size = dataSet.size();
+
+		for(unsigned int i = 0; i < size; ++ i)
+		{
+			if(dataSet[i].first.x() <= averageValue)
+				leftDataSet.push_back(dataSet[i]);
+			else
+				rightDataSet.push_back(dataSet[i]);
+		}
+	}
+	else
+	{
+		discriminator = 'y';
+
+// Finds the median along "y" axis		
+		averageValue = average(dataSet, 'y');
+
+// Adjust box for left and right branchs
+		newMbr1.y2_ = averageValue;
+		newMbr2.y1_ = averageValue;
+
+		unsigned int size = dataSet.size();
+
+		for(unsigned int i = 0; i < size; ++ i)
+		{
+			if(dataSet[i].first.y() <= averageValue)
+				leftDataSet.push_back(dataSet[i]);
+			else
+				rightDataSet.push_back(dataSet[i]);
+		}
+	}
+
+	dataSet.clear();
+
+	KdTreeNode* node = new KdTreeNode(averageValue);
+	
+	//node->setBox(mbr);
+	
+	if(rightDataSet.size() == 0u)		// If all coordinates have the same coordinate values, the right vector will be empty so we need stop division to
+	{
+		node->setDiscriminator('l');
+		//node->setBox(newMbr1);
+
+		unsigned int size = leftDataSet.size();
+
+		for(unsigned int i = 0; i < size; ++i)
+			node->getData().push_back(leftDataSet[i].second);
+
+		//throw;
+	}
+	else if(leftDataSet.size() == 0u)		// If all coordinates have the same coordinate values, the left vector is empty, so we need to stop
+	{
+		node->setDiscriminator('l');
+		//node->setBox(newMbr2);
+
+		unsigned int size = rightDataSet.size();
+
+		for(unsigned int i = 0; i < size; ++i)
+			node->getData().push_back(rightDataSet[i].second);
+
+		//throw;
+	}
+	else
+	{
+		node->setDiscriminator(discriminator);
+		node->setLeft(build(leftDataSet, averageValue, newMbr1));
+		node->setRight(build(rightDataSet, averageValue, newMbr2));
+	}
+	
+	return node;
+}
+
+template<class KdTreeNode>
+void TeAdaptativeKdTree<KdTreeNode>::search(const TeBox& rect, vector<kdDataItem>& report) const
+{
+	vector<KdTreeNode*> reportNodes;
+
+	search(rect, reportNodes);
+
+    unsigned int nNodes = reportNodes.size();
+
+	for(unsigned int i = 0; i < nNodes; ++i)
+	{
+		unsigned int nElements = reportNodes[i]->getData().size();
+
+		for(unsigned int j = 0; j < nElements; ++j)
+		{
+            if(TeIntersects((reportNodes[i])->getData()[j], rect))
+			{
+				report.push_back((reportNodes[i])->getData()[j]);
+			}
+		}
+	}
+}
+
+template<class KdTreeNode>
+void TeAdaptativeKdTree<KdTreeNode>::search(const TeBox& rect, KdTreeNode* node, vector<KdTreeNode*>& report) const
+{
+	if(node->getDiscriminator() == 'x')
+	{
+		if(node->hasLeft())
+			if(rect.x1_ <= node->getKey())
+				search(rect, node->getLeft(), report);		
+
+		if(node->hasRight())
+			if(rect.x2_ >= node->getKey())
+				search(rect, node->getRight(), report);
+	}
+	else if(node->getDiscriminator() == 'y')
+	{
+		if(node->hasLeft())
+			if(rect.y1_ <= node->getKey())
+				search(rect, node->getLeft(), report);		
+
+		if(node->hasRight())
+			if(rect.y2_ >= node->getKey())
+				search(rect, node->getRight(), report);
+	}
+	else
+	{		
+		report.push_back(node);
+	}
+
+	return;
+}
+
+template<class KdTreeNode>
+void TeAdaptativeKdTree<KdTreeNode>::nearestNeighborSearch(KdTreeNode* node, const kdKey& key, vector<kdDataItem>& report, vector<double>& sqrDists, TeBox& rect) const
+{
+	if(node->getDiscriminator() == 'l')
+	{
+		update(node, key, report, sqrDists, rect);	// this is a leaf node -> update list of neighbours 
+	}
+	else if(node->getDiscriminator() == 'x')
+	{
+		if(key.x() <= node->getKey())
+		{
+			nearestNeighborSearch(node->getLeft(), key, report, sqrDists, rect);
+
+			if((rect.x1_ < node->getKey()) && (node->getKey() < rect.x2_))
+				nearestNeighborSearch(node->getRight(), key, report, sqrDists, rect);
+		}
+		else
+		{
+			nearestNeighborSearch(node->getRight(), key, report, sqrDists, rect);
+
+			if((rect.x1_ < node->getKey()) &&(node->getKey() < rect.x2_))
+				nearestNeighborSearch(node->getLeft(), key, report, sqrDists, rect);
+		}		
+	}
+	else if(node->getDiscriminator() == 'y')
+	{
+		 if(key.y() <= node->getKey())
+		{
+			nearestNeighborSearch(node->getLeft(), key, report, sqrDists, rect);
+
+			if((rect.y1_ < node->getKey()) &&(node->getKey() < rect.y2_ ))
+				nearestNeighborSearch(node->getRight(), key, report, sqrDists, rect);
+		}
+		else
+		{
+			nearestNeighborSearch(node->getRight(), key, report, sqrDists, rect);
+
+			if((rect.y1_ < node->getKey()) &&(node->getKey() < rect.y2_))
+				nearestNeighborSearch(node->getLeft(), key, report, sqrDists, rect);
+		}
+	}	
+	
+}
+
+template<class KdTreeNode>
+void TeAdaptativeKdTree<KdTreeNode>::update(KdTreeNode* node, const kdKey& key, vector<kdDataItem>& report, vector<double>& sqrDists, TeBox& rect) const
+{
+// rect is the bounding box of neighbors
+
+	const unsigned int size = node->getData().size();
+
+	const unsigned int nNeighbors = report.size();
+
+// for each element in the node, we need to search for distances less than of some one of sqrDists
+	for(unsigned int i = 0u; i < size; ++i)
+	{
+		double dx = (key.x() - node->getData()[i].location().x());
+		double dy = (key.y() - node->getData()[i].location().y());
+		
+		double dkp = (dx * dx) + (dy * dy);	// square distance from the key point to the node
+
+// if the distance of "i-th" element is less than the maximum distance in the sqrDists
+		if(dkp < sqrDists[nNeighbors - 1])
+		{
+// so the element must be reported
+
+// and the srqDists vector must be rearranged
+			for(unsigned int j = 0u; j < nNeighbors; ++j)
+			{
+				if(dkp < sqrDists[j])	// if the position is found
+				{  
+// move the elements to the right
+					for(unsigned int k = nNeighbors - 1; k > j; --k)
+					{
+						report[k]   = report[k - 1];
+						sqrDists[k] = sqrDists[k - 1];
+					} 
+
+// inserts the element in the report and update its distance
+					report[j] = node->getData()[i];
+
+					sqrDists[j] = dkp;
+
+					break;
+				}
+			}
+		}
+	}
+
+	double maxDist = sqrDists[nNeighbors - 1];
+
+	if(maxDist != TeMAXFLOAT)
+	{
+		maxDist = sqrt(maxDist);
+	}
+
+	rect.x1_ = key.x() - maxDist;
+	rect.y1_ = key.y() - maxDist;
+	rect.x2_ = key.x() + maxDist;
+	rect.y2_ = key.y() + maxDist;
+}
+/** @} */ 
+
+};	// end namespace TeSAM
+
+
+#endif	// __TERRALIB_INTERNAL_KDTREE_H
+
+
+
+
diff --git a/src/terralib/kernel/TeLayer.cpp b/src/terralib/kernel/TeLayer.cpp
old mode 100644
new mode 100755
index 2ddca43..4577c11
--- a/src/terralib/kernel/TeLayer.cpp
+++ b/src/terralib/kernel/TeLayer.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -25,8 +25,9 @@ of this library and its documentation.
 #include "TeUtils.h"
 #include "TeException.h"
 #include "TeDatabase.h"
+#include "TeRaster.h"
+#include "TeProjection.h"
 
-// -- Layer novo ---
 
 TeLayer::TeLayer(const string& name, TeDatabase* db, TeProjection* proj): 
 	name_(name),
@@ -34,7 +35,9 @@ TeLayer::TeLayer(const string& name, TeDatabase* db, TeProjection* proj):
 	db_(db),
 	projection_ ( proj ),
 	raster_(0)
-{
+{	
+	editionTime_.now();
+	
 	if (!db_ || name.empty())
 		return;
 
@@ -73,6 +76,8 @@ TeLayer::TeLayer(const string& name, TeDatabase* db, TeBox& box, TeProjection* p
 	box_(box),
 	raster_(0)
 {
+	editionTime_.now();
+
 	if (!db_ || name.empty())
 		return;
 
@@ -109,24 +114,91 @@ TeLayer::~TeLayer()
 	for (TeRepresPointerVectorIterator it = repVector_.begin(); it != repVector_.end(); it++)
 	{
 		if (*it)
+		{
 			delete (*it);
+			(*it) = 0;
+		}
 	}
 	repVector_.clear();
+	if (raster_!=0)
+	{
+		delete raster_;
+		raster_ = 0;
+	}
 }
 
+TeLayer::TeLayer( const TeLayer& other ) :
+projection_(NULL),
+raster_(NULL)
+{
+	if (other.projection_ != NULL)
+	{
+		projection_ = TeProjectionFactory::make ( other.projection_->params());
+	}
+
+	name_		= other.name_;
+	id_			= other.id_;
+	db_			= other.db_;
+
+    box_ = TeBox(other.box_);
+	editionTime_ = other.editionTime_;
+
+    if(other.raster_ != NULL)
+    {
+        TeRaster* oRast = other.raster_;
+        TeRasterParams oRastParams(oRast->params());
+
+        raster_ = new TeRaster(oRastParams);
+    }
+
+    attTables_ = other.attTables_;
+    TeRepresPointerVector oRepVec = other.repVector_;
+    TeRepresPointerVector::iterator it;
+
+    for(it = oRepVec.begin(); it != oRepVec.end(); ++it)
+    {
+        TeRepresentation* rep = new TeRepresentation();
+            
+        rep->id_ = (*it)->id_;
+        rep->geomRep_ = (*it)->geomRep_;
+        rep->tableName_ = (*it)->tableName_;
+        rep->description_ = (*it)->description_;
+        rep->box_ = (*it)->box_;
+        rep->resX_ = (*it)->resX_;
+        rep->resY_ = (*it)->resY_;
+        rep->nCols_ = (*it)->nCols_;
+        rep->nLins_ = (*it)->nLins_;
+
+        repVector_.push_back(rep);
+    }
+}
+
+TeLayer& 
+TeLayer::operator= ( const TeLayer& other )
+{
+	if ( this != &other )
+	{	
+		if (projection_)
+			delete projection_;
+		projection_ = 0;
+		if (other.projection_)
+			projection_ = TeProjectionFactory::make ( other.projection_->params());
+		name_		= other.name_;
+		id_			= other.id_;
+		box_		= other.box_;
+		db_ = other.db_;
+		editionTime_ = other.editionTime_;
+	}
+	return *this;
+}
+	
+
 void 
 TeLayer::setLayerBox(const TeBox& box)
 {   
 	box_ = box;
 	if ((id_ > -1) && db_)
-	{
-		string sql = "UPDATE te_layer SET lower_x = " + Te2String(box_.x1(),12);
-			  sql += ", lower_y = " + Te2String(box_.y1(),12);
-			  sql += ", upper_x = " + Te2String(box_.x2(),12);
-			  sql += ", upper_y = " + Te2String(box_.y2(),12);
-			  sql += " WHERE layer_id=" + Te2String(id_);
-		db_->execute(sql);
-	}
+		db_->updateLayerBox(this);
 }
 
 void
@@ -134,14 +206,7 @@ TeLayer::updateLayerBox(const TeBox& box)
 {
 	updateBox(box_,box);
 	if ((id_ > -1) && db_)
-	{
-		string sql = "UPDATE te_layer SET lower_x = " + Te2String(box_.x1(),12);
-			  sql += ", lower_y = " + Te2String(box_.y1(),12);
-			  sql += ", upper_x = " + Te2String(box_.x2(),12);
-			  sql += ", upper_y = " + Te2String(box_.y2(),12);
-			  sql += " WHERE layer_id=" + Te2String(id_);
-		db_->execute(sql);
-	}
+		db_->updateLayerBox(this);
 }
 
 void
@@ -167,16 +232,55 @@ TeLayer::updateLayerBox()
 		updateBox(box,brep);
 	}
 	delete portal;
-	sql = "UPDATE te_layer SET lower_x = " + Te2String(box.x1(),12);
-		  sql += ", lower_y = " + Te2String(box.y1(),12);
-		  sql += ", upper_x = " + Te2String(box.x2(),12);
-		  sql += ", upper_y = " + Te2String(box.y2(),12);
-		  sql += " WHERE layer_id=" + Te2String(id_);
-	db_->execute(sql);
 	box_ = box;
+	db_->updateLayerBox(this);
 	return;
 }
 
+int 
+TeLayer::getNewObjectId()
+{
+	if(!db_)
+		return -1;
+
+	TeDatabasePortal* portal = db_->getPortal();
+	if(!portal)
+		return -1;
+
+	try
+	{
+		int objId = 0;
+		string sql;
+		for (TeRepresPointerVectorIterator it = vectRepres().begin(); it != vectRepres().end(); it++)
+		{
+           TeRepresentation* rep = (*it);
+
+           sql = "SELECT MAX(geom_id) FROM ";
+           sql += rep->tableName_;
+           if (portal->query(sql) && portal->fetchRow())
+           {
+				string data = portal->getData(0);
+				int value = 0;
+				if(!data.empty())
+				   value = atoi(data.c_str());
+				objId += value;
+           }
+           portal->freeResult();
+       }
+       delete portal;
+       return ++objId;
+   }
+   catch(...)
+   {
+       if (portal)
+       {
+           delete portal;
+           return -1;
+       }
+   }
+    return -1;
+} 
+
 void  
 TeLayer::setProjection ( TeProjection* proj )
 {	
@@ -192,26 +296,28 @@ TeLayer::setProjection ( TeProjection* proj )
 		return;
 	}
 
-	// delete old projection
-	if (projection_ && projection_->id() > 0 )
+	if (projection_)
 	{
-		string sql = "DELETE FROM te_projection WHERE projection_id = " + Te2String(projection_->id());
-		if (db_->execute(sql))
-			delete projection_;
+		proj->id(projection_->id());
+		delete projection_;
 	}
 	projection_ = proj; 
 	bool status = true;
 	
-	if ( proj->id() <= 0  )	// new projection not in the database
-		status = db_->insertProjection(projection_);
-
-	// update layer information
-	if (status && id_ > 0)
+	if ( projection_->id() <= 0  )	// new projection not in the database
 	{
-		string sql = "UPDATE te_layer SET projection_id = " + Te2String(projection_->id());
-			   sql += " WHERE layer_id=" + Te2String(id_);
-		db_->execute(sql);
+		status = db_->insertProjection(projection_);
+		// update layer information
+		if (status && id_ > 0)
+		{
+			string sql = "UPDATE te_layer SET projection_id = " + Te2String(projection_->id());
+				sql += " WHERE layer_id=" + Te2String(id_);
+			db_->execute(sql);
+		}
 	}
+	else
+		status = db_->updateProjection(projection_);
+
 	if (raster_)
 	{
 		delete raster_;
@@ -223,7 +329,10 @@ void
 TeLayer::raster( TeRaster* raster)
 {	
 	if (raster_ )
+	{
 		delete raster_;
+		raster_ = 0;
+	}
 	raster_ = raster; 
 }
 
@@ -240,15 +349,64 @@ TeLayer::hasGeometry (TeGeomRep rep)
 int
 TeLayer::geomRep()
 {
-	int r = 0;
 	if (repVector_.empty())
-		return r;
+		return TeGEOMETRYNONE;
+	int r = 0;
 	TeRepresPointerVectorIterator it;
-	for (it=repVector_.begin(); it != repVector_.end(); it++)
-		r= (int)(*it)->geomRep_ | r;
+	for (it=repVector_.begin(); it != repVector_.end(); ++it)
+		r = (int)(*it)->geomRep_ | r;
 	return r;
 }
 
+TeTime TeLayer::getEditionTime() const
+{
+	return editionTime_;
+}
+
+void TeLayer::setEditionTime(const TeTime& editionTime)
+{
+	editionTime_ = editionTime;
+}
+
+bool TeLayer::updateLayerEditionTime(const bool& setEditionToNow)
+{
+	if(setEditionToNow)
+	{
+		editionTime_.now();
+	}
+	if(!editionTime_.isValid())
+	{
+		return false;
+	}
+	if(!db_->updateLayer(this))
+	{
+		return false;
+	}
+	return true;
+}
+
+bool TeLayer::reloadLayerEditionTime()
+{
+	if(db_ == NULL)
+	{
+		return false;
+	}
+
+	std::string sql = "SELECT edition_time FROM te_layer WHERE layer_id = " + Te2String(id());
+	TeDatabasePortal* portal = db_->getPortal();
+	if(!portal->query(sql) || !portal->fetchRow())
+	{
+		delete portal;
+		return false;
+	}
+
+	editionTime_ = portal->getDate(0);
+
+	delete portal;
+
+	return true;
+}
+
 string
 TeLayer::tableName(TeGeomRep rep) 
 {
@@ -338,7 +496,7 @@ TeLayer::removeGeometry (TeGeomRep repType, const string& tName)
 
 			if (!rep->tableName_.empty())
 			{
-				if(rep->geomRep_ == TeRASTER)
+				if(rep->geomRep_ == TeRASTER || rep->geomRep_ == TeRASTERFILE)
 				{
 					TeDatabasePortal* portal = db_->getPortal();
 					string sql, tname;
@@ -354,7 +512,7 @@ TeLayer::removeGeometry (TeGeomRep repType, const string& tName)
 							db_->deleteTable(tname);
 						// delete raster table
 						tname = portal->getData(1);
-						if(!tname.empty())
+						if(rep->geomRep_ != TeRASTERFILE && !tname.empty())
 							db_->deleteTable(tname);
 					}
 					portal->freeResult();
@@ -532,6 +690,22 @@ TeLayer::addRasterGeometry(TeRasterParams& par, const string& objectId,
 		par.fileName_ = aux;
 	}
 
+//updates the date in the te_representation table
+	if(par.date_.isValid())
+	{	
+		std::string sqlTime = db_->getSQLTime(par.date_);
+		if(!sqlTime.empty())
+		{
+			std::string sql = "UPDATE te_representation SET initial_time = " + sqlTime;
+			sql += ", final_time = " + sqlTime;
+			sql += " WHERE repres_id=" + Te2String(rep->id_);
+			if(!db_->execute(sql))
+			{
+				return false;
+			}
+		}
+	}
+
 	if (!db_->createRasterTable(par.fileName_))
 		return false;
 
@@ -539,14 +713,108 @@ TeLayer::addRasterGeometry(TeRasterParams& par, const string& objectId,
 		return false;
 
 	updateLayerBox(par.boundingBox());
+	par.layerId_ = id_;
+	par.objectId_ = oid;
+
+	return true;
+}
+
+bool
+TeLayer::addRasterFileGeometry(TeRaster* raster, const string& /* objectId */, const string& desc)
+{
+	if (!raster)
+		return false;
+	TeRepresentation* rep = getRepresentation(TeRASTERFILE);
+	if (!rep)
+	{
+		rep = new TeRepresentation();
+		updateBox(rep->box_,raster->params().boundingBox());
+		rep->tableName_ = "RasterLayer" + Te2String(id_);
+		rep->geomRep_ = TeRASTERFILE;
+		rep->resX_ = raster->params().resx_;
+		rep->resY_ = raster->params().resy_;
+		rep->nCols_= raster->params().ncols_;
+		rep->nLins_= raster->params().nlines_;
+		if (!desc.empty())
+			rep->description_ = desc;
+		if (!db_->insertRepresentation(id_,*rep))
+			return false;
+		if (!db_->createRasterGeometry(rep->tableName_))
+			return false;
+		if (!db_->createRasterMetadataTable(rep->tableName_+"_metadata"))
+			return false;
+		repVector_.push_back(rep);
+	}
+
+//updates the date in the te_representation table
+	if(raster->params().date_.isValid())
+	{	
+		std::string sqlTime = db_->getSQLTime(raster->params().date_);
+		if(!sqlTime.empty())
+		{
+			std::string sql = "UPDATE te_representation SET initial_time = " + sqlTime;
+			sql += ", final_time = " + sqlTime;
+			sql += " WHERE repres_id=" + Te2String(rep->id_);
+			if(!db_->execute(sql))
+			{
+				return false;
+			}
+		}
+	}
+
+	string oid = TeGetBaseName(raster->params().fileName_.c_str());
+	if (oid.empty())
+		oid = "O1";
+	string sql = "delete from " +  rep->tableName_ + " where object_id = '" + oid + "'";
+	db_->execute(sql);
+	if (!db_->insertRasterGeometry(rep->tableName_,raster->params(),oid))
+		return false;
+	updateLayerBox(raster->params().boundingBox());
+	raster->params().layerId_ = id_;
+	raster->params().objectId_ = oid;
+	return true;
+}
+
+bool 
+TeLayer::addRasterGeometry(TeRaster* raster, const string& objectId)
+{
+	if (!raster)
+		return false;
+	TeRepresentation* rep = getRepresentation(TeRASTER);
+	if (!rep)
+	{
+		rep = new TeRepresentation();
+		updateBox(rep->box_,raster->params().boundingBox());
+		rep->tableName_ = "RasterLayer" + Te2String(id_);
+		rep->geomRep_ = TeRASTER;
+		if (!db_->insertRepresentation(id_,*rep))
+			return false;
+		if (!db_->createRasterGeometry(rep->tableName_))
+			return false;
+		if (!db_->createRasterMetadataTable(rep->tableName_+"_metadata"))
+			return false;
+		repVector_.push_back(rep);
+	}
+
+	string oid = objectId;
+	if (oid.empty())
+		oid = "O1";
+	string sql = "delete from " +  rep->tableName_ + " where object_id = '" + oid + "'";
+	db_->execute(sql);
+	if (!db_->insertRasterGeometry(rep->tableName_,raster->params(),oid))
+		return false;
+	updateLayerBox(raster->params().boundingBox());
+	raster->params().layerId_ = id_;
+	raster->params().objectId_ = oid;
 	return true;
 }
 
 TeRaster*
 TeLayer::raster(const string& objectId, const char& mode)
 {	
-	if (!hasGeometry(TeRASTER) || id_ <= 0 )
-		return 0;
+   if (id_ <= 0 ||
+	  !(hasGeometry(TeRASTER) || hasGeometry(TeRASTERFILE)))
+       return 0; 
 
 	if (raster_  && !objectId.empty() && 
 	   (objectId != raster_->objectId() || 
@@ -555,11 +823,79 @@ TeLayer::raster(const string& objectId, const char& mode)
 		delete raster_;
 		raster_ = 0; 
 	}
+
 	if (!raster_)
 		raster_ = db_->loadLayerRaster(id_,objectId, mode);
 	return raster_;
 }
 
+bool
+TeLayer::getRasterGeometries(vector<string>& objectIds, unsigned int tilingType, const TeBox& box)
+{
+	objectIds.clear();
+	if (!hasGeometry(TeRASTER) || id_ <= 0 )
+		return false;
+
+	TeDatabasePortal* portal = db_->getPortal();
+	if (!portal)
+		return false;
+
+	string get = "SELECT geom_table FROM te_representation WHERE layer_id = " + Te2String(id_);
+	get += " AND geom_type = 512";
+	
+	// error executing query or no there is no raster representation 
+	if (!portal->query(get) || !portal->fetchRow())
+	{
+		delete portal;
+		return false;
+	}
+	string tableName = portal->getData(0);
+	if (tableName.empty())
+	{
+		delete portal;
+		return false;
+	}
+	portal->freeResult();
+	
+	std::string whereClause = "";
+	if (tilingType == 1 || tilingType == 2)
+	{
+		if(!whereClause.empty())
+		{
+			whereClause += " AND ";
+		}
+		whereClause += "tiling_type=" + Te2String(tilingType);
+	}
+	if(box.isValid())
+	{
+		if(!whereClause.empty())
+		{
+			whereClause += " AND ";
+		}
+		whereClause = "NOT(lower_x > " + Te2String(box.x2_, 12) + " OR ";
+		whereClause += "upper_x < " + Te2String(box.x1_, 12) + " OR ";
+		whereClause += "lower_y > " + Te2String(box.y2_, 12) + " OR ";
+		whereClause += "upper_y < " + Te2String(box.y1_, 12) + ")";
+	}
+
+	get = "SELECT object_id FROM " + tableName;
+	if(!whereClause.empty())
+	{
+		get += " WHERE " + whereClause;
+	}
+
+	if (!portal->query(get))
+	{
+		delete portal;
+		return false;
+	}
+	while (portal->fetchRow())
+		objectIds.push_back(portal->getData(0));
+	delete portal;
+	return !objectIds.empty();
+}
+
+
 int 
 TeLayer::nObjects(const string& tName)
 {
@@ -578,7 +914,7 @@ TeLayer::nObjects(const string& tName)
 	}
 	if (linkName.empty())
 		return 0;
-	int no;
+	int no = 0;
 	string sql;
 	TeDatabasePortal* portal = db_->getPortal();
 	if (!portal)
@@ -609,7 +945,7 @@ TeLayer::createAttributeTable(TeTable& table)
 	{
 		if ((*it).name() == table.name())
 			return true;
-		it++;
+		++it;
 	}
 	attTables_.push_back(table);
 	return true;
@@ -748,9 +1084,15 @@ TeLayer::addPolygons (TePolygonSet& polySet)
 		{
 			if (!db_->insertPolygonSet (rep->tableName_, polySet))
 				return false;
-			updateLayerBox(polySet.box());
-			updateBox(rep->box_,polySet.box());
-			if (!db_->updateRepresentation(id_,*rep))
+			//updateLayerBox(polySet.box());
+
+			updateBox(box_, polySet.box());
+			editionTime_.now();
+			if(!db_->updateLayer(this))
+				return false;
+			
+			updateBox(rep->box_, polySet.box());
+			if(!db_->updateRepresentation(id_,*rep))
 				return false;
 		}
 		else
@@ -774,7 +1116,13 @@ TeLayer::addLines (TeLineSet& lineSet)
 		{
 			if (!db_->insertLineSet (rep->tableName_, lineSet))
 				return false;
-			updateLayerBox(lineSet.box());
+			//updateLayerBox(lineSet.box());
+
+			updateBox(box_, lineSet.box());
+			editionTime_.now();
+			if(!db_->updateLayer(this))
+				return false;
+
 			updateBox(rep->box_,lineSet.box());
 			if (!db_->updateRepresentation(id_,*rep))
 				return false;
@@ -802,7 +1150,13 @@ TeLayer::addPoints (TePointSet& pointSet)
 		{	
 			if (!db_->insertPointSet (rep->tableName_, pointSet))
 				return false;
-			updateLayerBox(pointSet.box());
+			//updateLayerBox(pointSet.box());
+
+			updateBox(box_, pointSet.box());
+			editionTime_.now();
+			if(!db_->updateLayer(this))
+				return false;
+
 			updateBox(rep->box_,pointSet.box());
 			if (!db_->updateRepresentation(id_,*rep))
 				return false;
@@ -824,13 +1178,14 @@ TeLayer::addText (TeTextSet& textSet, const string& tName)
 	if (tName.empty())
 	{
 		int i=0;
-		string name = "Text_" + Te2String(id_) + "_" + Te2String(0);
+		string name; 
 		do
 		{
-			rep = getRepresentation(TeTEXT,tName);
+			name = "Text_" + Te2String(id_) + "_" + Te2String(i); 
+			rep = getRepresentation(TeTEXT,name); 
 			++i;
 		}
-		while (rep);
+		while (rep); 
 		tabName = name;
 	}
 	else
@@ -848,7 +1203,13 @@ TeLayer::addText (TeTextSet& textSet, const string& tName)
 		{	
 			if (!db_->insertTextSet (tabName, textSet))
 				return false;
-			updateLayerBox(textSet.box());
+			//updateLayerBox(textSet.box());
+
+			updateBox(box_, textSet.box());
+			editionTime_.now();
+			if(!db_->updateLayer(this))
+				return false;
+
 			updateBox(rep->box_,textSet.box());
 			if (!db_->updateRepresentation(id_,*rep))
 				return false;
@@ -878,7 +1239,200 @@ TeLayer::addCells(TeCellSet& cellSet)
 			rep->resY_ = cellSet.resY();
 			if (!db_->insertCellSet(tableName(TeCELLS), cellSet))
 				return false;
-			updateLayerBox(cellSet.box());
+			//updateLayerBox(cellSet.box());
+			
+			updateBox(box_, cellSet.box());
+			editionTime_.now();
+			if(!db_->updateLayer(this))
+				return false;
+
+			updateBox(rep->box_,cellSet.box());
+			if (!db_->updateRepresentation(id_,*rep))
+				return false;
+		}		
+		else
+			return false;
+	}
+	return true;
+}
+
+bool 
+TeLayer::updatePolygons (TePolygonSet& polySet)
+{
+	if (!db_)
+		return false;
+
+	if (polySet.size() > 0 )
+	{
+		if (!this->hasGeometry(TePOLYGONS))
+			return false;
+
+		TeRepresentation* rep = getRepresentation(TePOLYGONS);
+		if (rep)
+		{
+			if (!db_->updatePolygonSet(rep->tableName_, polySet))
+				return false;
+			//updateLayerBox(polySet.box());
+
+			updateBox(box_, polySet.box());
+			editionTime_.now();
+			if(!db_->updateLayer(this))
+				return false;
+			
+			updateBox(rep->box_, polySet.box());
+			if(!db_->updateRepresentation(id_,*rep))
+				return false;
+		}
+		else
+			return false;
+	}
+	return true;
+}
+
+bool 
+TeLayer::updateLines (TeLineSet& lineSet)
+{
+	if (!db_)
+		return false;
+
+	if (lineSet.size() > 0)
+	{
+		if (!this->hasGeometry(TeLINES))
+			return false;
+		TeRepresentation* rep = getRepresentation(TeLINES);
+		if (rep)
+		{
+			if (!db_->updateLineSet (rep->tableName_, lineSet))
+				return false;
+			//updateLayerBox(lineSet.box());
+
+			updateBox(box_, lineSet.box());
+			editionTime_.now();
+			if(!db_->updateLayer(this))
+				return false;
+
+			updateBox(rep->box_,lineSet.box());
+			if (!db_->updateRepresentation(id_,*rep))
+				return false;
+		}
+		else
+			return false;
+	}
+	return true;
+}
+
+bool 
+TeLayer::updatePoints (TePointSet& pointSet)
+{
+	if (!db_)
+		return false;
+
+	if (pointSet.size() > 0)
+	{
+		if (!this->hasGeometry(TePOINTS))
+			return false;
+		string tblName = tableName(TePOINTS);
+
+		TeRepresentation* rep = getRepresentation(TePOINTS);
+		if (rep)
+		{	
+			if (!db_->updatePointSet (rep->tableName_, pointSet))
+				return false;
+			//updateLayerBox(pointSet.box());
+
+			updateBox(box_, pointSet.box());
+			editionTime_.now();
+			if(!db_->updateLayer(this))
+				return false;
+
+			updateBox(rep->box_,pointSet.box());
+			if (!db_->updateRepresentation(id_,*rep))
+				return false;
+		}
+		else
+			return false;
+	}
+	return true;
+}
+
+bool 
+TeLayer::updateText (TeTextSet& textSet, const string& tName)
+{
+	if (!db_)
+		return false;
+
+	TeRepresentation* rep =0;
+	string tabName;
+	if (tName.empty())
+	{
+		int i=0;
+		string name; 
+		do
+		{
+			name = "Text_" + Te2String(id_) + "_" + Te2String(i); 
+			rep = getRepresentation(TeTEXT,name); 
+			++i;
+		}
+		while (rep); 
+		tabName = name;
+	}
+	else
+		tabName = tName;
+
+	if (textSet.size() > 0 )
+	{
+		rep = getRepresentation(TeTEXT,tabName);
+		if (!rep)
+		{
+			return false;
+		}
+		if (rep)
+		{	
+			if (!db_->updateTextSet (tabName, textSet))
+				return false;
+			//updateLayerBox(textSet.box());
+
+			updateBox(box_, textSet.box());
+			editionTime_.now();
+			if(!db_->updateLayer(this))
+				return false;
+
+			updateBox(rep->box_,textSet.box());
+			if (!db_->updateRepresentation(id_,*rep))
+				return false;
+		}
+		else
+			return false;
+	}
+	return true;
+}
+
+bool
+TeLayer::updateCells(TeCellSet& cellSet)
+{
+	if (!db_)
+		return false;
+
+	if (cellSet.size() > 0)
+	{
+		string tblName = tableName(TeCELLS);
+		if (!this->hasGeometry(TeCELLS))
+			return false;
+
+		TeRepresentation* rep = getRepresentation(TeCELLS);
+		if (rep)
+		{
+			rep->resX_ = cellSet.resX();
+			rep->resY_ = cellSet.resY();
+			if (!db_->updateCellSet(tableName(TeCELLS), cellSet))
+				return false;
+			//updateLayerBox(cellSet.box());
+			
+			updateBox(box_, cellSet.box());
+			editionTime_.now();
+			if(!db_->updateLayer(this))
+				return false;
+
 			updateBox(rep->box_,cellSet.box());
 			if (!db_->updateRepresentation(id_,*rep))
 				return false;
@@ -889,14 +1443,51 @@ TeLayer::addCells(TeCellSet& cellSet)
 	return true;
 }
 
+bool TeLayer::removeGeometries(const std::vector<int>& vecGeomIds, const TeGeomRep& rep)
+{
+	if(db_ == NULL)
+	{
+		return false;
+	}
+
+	if (!this->hasGeometry(rep))
+	{
+		return false;
+	}
+
+	std::string tblName = tableName(rep);
+	for(unsigned int i = 0; i < vecGeomIds.size(); ++i)
+	{
+		if(!db_->removeGeometry(tblName, rep, vecGeomIds[i]))
+		{
+			return false;
+		}
+	}
+
+	editionTime_.now();
+	if(!db_->updateLayer(this))
+		return false;
+
+	return true;
+}
+
 
 bool 
 TeLayer::saveAttributeTable(TeTable& table)
 {
 	if (!db_ || id_ <= 0)
 		return false;
+	if (!db_->tableExist(table.name()))
+	{
+		if (!db_->createTable(table.name(), table.attributeList()))
+			return false;
+	}
 	if (db_->insertTable (table))
 	{
+		editionTime_.now();
+		if(!db_->updateLayer(this))
+			return false;
+
 		if (table.id() <= 0)
 			return db_->insertTableInfo(id_,table);
 		else
@@ -986,7 +1577,7 @@ TeLayer::locateCell (TeCoord2D &pt, TeCell &cell, const double& tol)
 }
 
 bool
-TeLayer::loadGeometrySet	(const string& geoid, TePolygonSet &ps)
+TeLayer::loadGeometrySet(const string& geoid, TePolygonSet &ps)
 {
 	if (!hasGeometry(TePOLYGONS))
 		return false;
@@ -1014,7 +1605,15 @@ TeLayer::loadGeometrySet (const string& geoid, TeCellSet &cs)
 {
 	if (!hasGeometry(TeCELLS))
 		return false;
-	return db_->loadCellSet(id_, tableName(TeCELLS), geoid, cs);;
+	return db_->loadCellSet(id_, tableName(TeCELLS), geoid, cs);
+}
+
+bool
+TeLayer::loadGeometrySet (const string& geoid, TeTextSet &ts)
+{
+	if (!hasGeometry(TeTEXT))
+		return false;
+	return db_->loadTextSet(tableName(TeTEXT), geoid, ts);
 }
 
 string
diff --git a/src/terralib/kernel/TeLayer.h b/src/terralib/kernel/TeLayer.h
old mode 100644
new mode 100755
index e948993..a8a3477
--- a/src/terralib/kernel/TeLayer.h
+++ b/src/terralib/kernel/TeLayer.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -21,14 +21,12 @@ indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
 /*! \file TeLayer.h
-    This file contains structures and definitions to deal with a layer
+    \brief This file contains structures and definitions to deal with a layer
 */
 #ifndef __TERRALIB_INTERNAL_LAYER_H
 #define __TERRALIB_INTERNAL_LAYER_H
 
 #include "TeGeometry.h"
-#include "TeRaster.h"
-#include "TeProjection.h"
 #include "TeDataTypes.h"
 #include "TeTable.h"
 #include "TeRepresentation.h"
@@ -37,6 +35,11 @@ of this library and its documentation.
 #include <list>
 #include <map>
 
+class TeRaster;
+class TeDatabase;
+class TeRasterParams;
+class TeProjection;
+
 //!  A class for supporting a layer. 
 /*!  
 	 In TerraLib, a layer is a collection of geometries that share the same 
@@ -47,7 +50,7 @@ of this library and its documentation.
 	\sa
      TeGeometry, TeProjection, TeBox, TeDatabase, TeTheme, TeTable
 */
-class TeLayer {
+class TL_DLL TeLayer {
 
 public:
 
@@ -93,79 +96,57 @@ public:
 	virtual ~TeLayer();
 
 	//! Copy Constructor
-	TeLayer ( const TeLayer& other )
-	{
-		if (projection_)
-			delete projection_;
-		projection_ = 0;
-		if (other.projection_)
-			projection_ = TeProjectionFactory::make ( other.projection_->params());
-		name_		= other.name_;
-		id_			= other.id_;
-		db_			= other.db_;
-	}
+	TeLayer ( const TeLayer& other );
 
 	//! Operator =
-	TeLayer& operator= ( const TeLayer& other )
-	{
-		if ( this != &other )
-		{	
-			if (projection_)
-				delete projection_;
-			projection_ = 0;
-			if (other.projection_)
-				projection_ = TeProjectionFactory::make ( other.projection_->params());
-			name_		= other.name_;
-			id_			= other.id_;
-			box_		= other.box_;
-			db_ = other.db_; 
-		}
-		return *this;
-	}
+	TeLayer& operator= ( const TeLayer& other );
 	
 	//! Retrieves the database associated to this layer
-	TeDatabase* const database() 
+	virtual TeDatabase* const database() 
 	{ return db_; }
 
 	//! Sets the layer database
-	void setDatabase(TeDatabase* db)
+	virtual void setDatabase(TeDatabase* db)
 	{ db_ = db; }
 
 	//! Returns the layer id
-	int id()
+	virtual int id()
 	{ return id_; } 
 
 	//! Sets the layer id
-	void id(int id)
+	virtual void id(int id)
 	{ id_ = id; } 
 
 	//! Returns the layer name
-	string name()
+	virtual string name()
 	{ return name_; }
 
 	//! Sets the layer name
-	void name(const string &name)
+	virtual void name(const string &name)
 	{  name_ = name; }
 
 	//! Sets the  layer projection
-	void  setProjection ( TeProjection* proj );
+	virtual void  setProjection ( TeProjection* proj );
 
 	//! Retrieves the layer projection
-	TeProjection* projection()
+	virtual TeProjection* projection()
 	{	return projection_; }
 
 	//! Returns the layer bounding box
-	TeBox&	box()
+	virtual TeBox&	box()
 	{	return box_; }
 
 	//! Sets the  bounding box of a layer
-	void setLayerBox ( const TeBox& box );
+	virtual void setLayerBox ( const TeBox& box );
 
 	//! Updates the bounding box of a layer
-	void updateLayerBox(const TeBox& box);
+	virtual void updateLayerBox(const TeBox& box);
 
 	//! Refreshes the bounding box of a layer according to its representation
-	void updateLayerBox();
+	virtual void updateLayerBox();
+
+	//! Returns a possible new object id based on the objects stored in database
+	virtual int getNewObjectId();
 
 	/** @name Attribute Tables
 	*  Methods to deal with the attribute tables of the layer
@@ -173,32 +154,32 @@ public:
 	//@{
 
 	//! Returns the number of distinct objects in the layer
-	int nObjects(const string& tName);
+	virtual int nObjects(const string& tName);
 
 	//! Returns a vector with the definition of all attribute tables associated to layer
-	TeAttrTableVector& attrTables () 
+	virtual TeAttrTableVector& attrTables () 
 	{ return attTables_; }
 
 	//! Creates a new attribute table for the layer
-	bool createAttributeTable(TeTable& table);
+	virtual bool createAttributeTable(TeTable& table);
 
     //! Adds an attribute table definition to layer vector of attribute tables (in memory)
-	bool addAttributeTable(TeTable& table);
+	virtual bool addAttributeTable(TeTable& table);
 
     //! Remove an attribute table definition to layer vector of attribute tables (in memory)
-	bool removeAttributeTable(string tableName);
+	virtual bool removeAttributeTable(string tableName);
 
      //! Update an attribute table definition to layer vector of attribute tables (in memory)
-	void updateAttributeTable(TeTable& table);
+	virtual void updateAttributeTable(TeTable& table);
 
 	//! Reload the tables definition from database to memory
-	bool loadLayerTables();
+	virtual bool loadLayerTables();
 
 	//! Saves an attribute table into the database where layer is stored 
-	bool saveAttributeTable(TeTable& table);
+	virtual bool saveAttributeTable(TeTable& table);
 
 	//! Gets all attribute tables associated to this layer that are of a certain type
-	bool getAttrTables(TeAttrTableVector& atts, TeAttrTableType attType = TeAllAttrTypes);
+	virtual bool getAttrTables(TeAttrTableVector& atts, TeAttrTableType attType = TeAllAttrTypes);
 
 	//! Gets a set of attribute table specifications associated to this layer that are of a certain type
 	/*
@@ -207,7 +188,7 @@ public:
 		\param atts returns a vector of tables found
 		\return true if at least one table was found and false otherwise
 	*/
-	bool getAttrTablesByName(vector<string> &tableNames, TeAttrTableVector& atts, TeAttrTableType attType = TeAllAttrTypes);
+	virtual bool getAttrTablesByName(vector<string> &tableNames, TeAttrTableVector& atts, TeAttrTableType attType = TeAllAttrTypes);
 
 	//! Gets an attribute table associated to a layer
 	/*
@@ -216,13 +197,13 @@ public:
 		\param table returns the table found
 		\return true if table was found and false otherwise
 	*/
-	bool getAttrTablesByName(const string& tableName, TeTable& table, TeAttrTableType attType = TeAllAttrTypes);
+	virtual bool getAttrTablesByName(const string& tableName, TeTable& table, TeAttrTableType attType = TeAllAttrTypes);
 
 	//! Gets the name of the media table associated to layer
-	string mediaTable();
+	virtual string mediaTable();
 
 	//! Sets the name of the media table associated to layer
-	void mediaTable(const string& name);
+	virtual void mediaTable(const string& name);
 	//@}
 
 	/** @name Geometries
@@ -234,87 +215,108 @@ public:
 		for the first raster geometry found)
 		\param mode permission access ('r', 'w')
 	*/
-	TeRaster* raster(const string& objectId="",const char& mode = 'r');
+	virtual TeRaster* raster(const string& objectId="",const char& mode = 'r');
 
 	//! Sets the pointer to the raster representation
-	void raster( TeRaster* raster);
+	virtual void raster( TeRaster* raster);
 
 	//! Retrieves a polygon set given a selection criteria, expressed as a where clause 
-	bool getPolygons(TePolygonSet &ps, const string& whereClause = "");
+	virtual bool getPolygons(TePolygonSet &ps, const string& whereClause = "");
 
 	//! Retrieves a line set given a selection criteria, expressed as a where clause 
-	bool getLines(TeLineSet &ls, const string& whereClause = "");
+	virtual bool getLines(TeLineSet &ls, const string& whereClause = "");
 
 	//! Retrieves a point set given a selection criteria, expressed as a where clause 
-	bool getPoints(TePointSet &ps, const string& whereClause = "");
+	virtual bool getPoints(TePointSet &ps, const string& whereClause = "");
 
 	//! Retrieve a point set given a selection criteria, expressed as a where clause
-	bool getText(TeTextSet &ts, const string& whereClause = "");
+	virtual bool getText(TeTextSet &ts, const string& whereClause = "");
 
 	//! Retrieve a cell set given a selection criteria, expressed as a where clause
-	bool getCells(TeCellSet &cs, const string& whereClause = "");
+	virtual bool getCells(TeCellSet &cs, const string& whereClause = "");
 
 	//! Locates a polygon that cointains a certain coordinate
-	bool locatePolygon(TeCoord2D &pt, TePolygon &polygon, const double& tol = 0.0);
+	virtual bool locatePolygon(TeCoord2D &pt, TePolygon &polygon, const double& tol = 0.0);
 	
 	//! Locates a line that cointains a certain coordinate
-	bool locateLine(TeCoord2D &pt, TeLine2D &line, const double& tol = 0.0);
+	virtual bool locateLine(TeCoord2D &pt, TeLine2D &line, const double& tol = 0.0);
 
 	//! Retrieves a point that cointains a certain coordinate
-	bool locatePoint(TeCoord2D &pt, TePoint &point, const double& tol = 0.0);
+	virtual bool locatePoint(TeCoord2D &pt, TePoint &point, const double& tol = 0.0);
 
 	//! Retrieves a TeText that cointains a certain coordinate
-	bool locateText(TeCoord2D &pt, TeText &text, const double& tol = 0.0);
+	virtual bool locateText(TeCoord2D &pt, TeText &text, const double& tol = 0.0);
 
 	//! Retrieves a point that cointains a certain coordinate
-	bool locateCell(TeCoord2D &pt, TeCell &cell, const double& tol = 0.0);
+	virtual bool locateCell(TeCoord2D &pt, TeCell &cell, const double& tol = 0.0);
 
 	//! Retrieves the set of polygons with a certain geoid
-	bool loadGeometrySet	(const string& geoid, TePolygonSet &ps);
+	virtual bool loadGeometrySet	(const string& geoid, TePolygonSet &ps);
 
 	//! Retrieves the set of lines with a certain geoid
-	bool loadGeometrySet (const string& geoid, TeLineSet &ls);
+	virtual bool loadGeometrySet (const string& geoid, TeLineSet &ls);
 
 	//! Retrieves the set of points with a certain geoid
-	bool loadGeometrySet (const string& geoid, TePointSet &ps);
+	virtual bool loadGeometrySet (const string& geoid, TePointSet &ps);
 
 	//! Retrieves the set of points with a certain geoid
-	bool loadGeometrySet (const string& geoid, TeCellSet &cs);
+	virtual bool loadGeometrySet (const string& geoid, TeCellSet &cs);
 
+	//! Retrieves the set of texts with a certain geoid
+	virtual bool loadGeometrySet (const string& geoid, TeTextSet &cs);
+	
 	//! Adds a set of polygons to a layer
-	bool addGeometrySet(TePolygonSet& polySet, const string& /* tName */ = "")
+	virtual bool addGeometrySet(TePolygonSet& polySet, const string& /* tName */ = "")
 	{ return addPolygons(polySet); }
 
 	//! Adds a set of lines to a layer
-	bool addGeometrySet(TeLineSet& lineSet, const string& /* tName */ = "")
+	virtual bool addGeometrySet(TeLineSet& lineSet, const string& /* tName */ = "")
 	{ return addLines(lineSet); }
 
 	//! Adds a set of points to a layer
-	bool addGeometrySet(TePointSet& pointSet, const string& /* tName */ = "")
+	virtual bool addGeometrySet(TePointSet& pointSet, const string& /* tName */ = "")
 	{ return addPoints(pointSet); }
 
 	//! Adds a set of text to a layer
-	bool addGeometrySet(TeTextSet& textSet, const string& tName = "")
+	virtual bool addGeometrySet(TeTextSet& textSet, const string& tName = "")
 	{ return addText(textSet,tName); }
 	
 	//! Adds a set of cells to a layer
-	bool addGeometrySet(TeCellSet& cellSet, const string& /* tName */ = "")
+	virtual bool addGeometrySet(TeCellSet& cellSet, const string& /* tName */ = "")
 	{ return addCells(cellSet); }
 
 	//! Adds a set of polygons to a layer
-	bool addPolygons(TePolygonSet& polySet);
+	virtual bool addPolygons(TePolygonSet& polySet);
 
 	//! Adds a set of lines to a layer
-	bool addLines (TeLineSet& lineSet);
+	virtual bool addLines (TeLineSet& lineSet);
 
 	//! Adds a set of points to a layer
-	bool addPoints (TePointSet& pointSet);
+	virtual bool addPoints (TePointSet& pointSet);
 
 	//! Adds a set of text to a layer
-	bool addText (TeTextSet& textSet,const string& tName);
+	virtual bool addText (TeTextSet& textSet,const string& tName);
 	
 	//! Adds a set of cells to a layer
-	bool addCells(TeCellSet& cellSet);
+	virtual bool addCells(TeCellSet& cellSet);
+
+	//! Updates a set of polygons to a layer
+	virtual bool updatePolygons(TePolygonSet& polySet);
+
+	//! Updates a set of lines to a layer
+	virtual bool updateLines (TeLineSet& lineSet);
+
+	//! Updates a set of points to a layer
+	virtual bool updatePoints (TePointSet& pointSet);
+
+	//! Updates a set of text to a layer
+	virtual bool updateText (TeTextSet& textSet,const string& tName);
+	
+	//! Updates a set of cells to a layer
+	virtual bool updateCells(TeCellSet& cellSet);
+
+	//! Removes the geometries from the layer
+	virtual bool removeGeometries(const std::vector<int>& vecGeomIds, const TeGeomRep& rep);
 
 	//@}
 
@@ -322,26 +324,26 @@ public:
 	*  Methods to deal with geometrical representations of a layer
 	*/
 	//! Removes a geometry from layer
-	bool removeGeometry (TeGeomRep repType, const string& tName="");
+	virtual bool removeGeometry (TeGeomRep repType, const string& tName="");
 
 	//! Indicates if layer has a geometry representation
-	bool hasGeometry (TeGeomRep rep);
+	virtual bool hasGeometry (TeGeomRep rep);
 
     //! Retrieves the table name associated to a geometry representation
 	/*! \param rep geometrical representation
 		\note When there is more than one representation of a given type
 		 returns the table name associated to the first one encountered
 	*/
-	string tableName(TeGeomRep rep); 
+	virtual string tableName(TeGeomRep rep); 
 
 	//! Retrieves the number of geometries of a type
 	/*! 
 		\param rep geometrical representation
 	*/	
-	int nGeometries(TeGeomRep rep);
+	virtual int nGeometries(TeGeomRep rep);
 
 	//! Gets all information about a representation
-	bool getRepresentation(TeGeomRep repType, TeRepresPointerVector& result);
+	virtual bool getRepresentation(TeGeomRep repType, TeRepresPointerVector& result);
 
 	//! Gets an specific representation
 	/*! 
@@ -350,7 +352,7 @@ public:
 		\return the representation associated to a geometry with the given table name
 		\note if no table name is specified the first found is returned
 	*/
-	TeRepresentation* getRepresentation(TeGeomRep repType, const string& tableName="");
+	virtual TeRepresentation* getRepresentation(TeGeomRep repType, const string& tableName="");
     
 	//! Creates a new geometry representation to a layer
 	/*
@@ -359,7 +361,7 @@ public:
 		\param desc description of the representation
 		\return true if success and false otherwise
 	*/
-	bool addGeometry ( TeGeomRep repType, const string& tableName="", const string& desc = "");
+	virtual bool addGeometry ( TeGeomRep repType, const string& tableName="", const string& desc = "");
 
 	//! Creates a new raster geometry to a layer
 	/*
@@ -369,23 +371,64 @@ public:
 		\param desc description of the representation
 		\return true if success and false otherwise
 	*/
-	bool addRasterGeometry(TeRasterParams& par, const string& objectId, 
+	virtual bool addRasterGeometry(TeRasterParams& par, const string& objectId, 
 						   const string& tableName="", const string& desc="");
 
+	//! Inserts a raster as a geometry of an object of the layer
+	/*
+		\param raster a pointer to a raster object
+		\param objectId identifier of the object that has the raster geometry
+		\param tableName the name of the table that will store the geometry (optional)
+		\return true if success and false otherwise
+		\note if there is already raster geometry associated to the object with id
+		object id, this reference is deleted.
+	*/	
+	bool addRasterGeometry(TeRaster* raster, const string& objectId="");
+
+	//! Inserts a reference to a raster file as a raster geometry of an object of the layer
+	/*
+		\param raster a pointer to a raster object
+		\param objectId identifier of the object that has the raster geometry
+		\param desc the description of the geometry (optional)
+		\return true if success and false otherwise
+		\note if there is already raster geometry associated to the object with id
+		object id, this reference is deleted.
+	*/	
+	bool addRasterFileGeometry(TeRaster* raster, const string& objectId="", const string& desc="");
+
+
+	//! Returns a vector with the identification of all objects of the layer that has a raster representation
+	/*
+		\param objectIds a vector to return the identification of the objects with a raster representation
+		\param tilingType used to express that only some types of representations are looked for: 
+			   0 any kind, 1 only the expansible and 2 only the non-expansible
+		\param box box spatial restriction
+		\return true if layer has at least one raster object and false otherwise
+	*/
+	virtual bool getRasterGeometries(vector<string>& objectIds, unsigned int tilingType=0, const TeBox& box = TeBox());
+
 	//! Returns a combination of all representations in the layer
-	int geomRep();
+	virtual int geomRep();
 
 	//! Adds a representation to vector of representation of the layer
-	void addVectRepres(TeRepresentation* rep)
-	{
-		repVector_.push_back(rep);
-	}
+	virtual void addVectRepres(TeRepresentation* rep)
+	{	repVector_.push_back(rep); }
 
 	//! Returns a vector with all representations in the layer
-	TeRepresPointerVector& vectRepres()
-	{
-		return repVector_;
-	}
+	virtual TeRepresPointerVector& vectRepres()
+	{	return repVector_; }
+
+	//!< Returns the dateTime that the layer was last edited.
+	virtual TeTime getEditionTime() const;
+
+	//!< Sets in memory the edition time of the layer
+	virtual void setEditionTime(const TeTime& editionTime);
+
+	//!< Updates the layer last edition time in memory and in the database
+	virtual bool updateLayerEditionTime(const bool& setEditionToNow = true);
+
+	//!< Reloads the edition time from the database 
+	virtual bool reloadLayerEditionTime();
 
 	//@}
 
@@ -404,13 +447,18 @@ private:
 
 	TeAttrTableVector	attTables_; 	//!< Attributes associated to a layer
 	TeRepresPointerVector repVector_;	//!< vector of representations associated to this layer
+	TeTime		editionTime_;			//!< Stores the last time that the layer was edited. 
 };
 
 //! A map from a integer unique identifier to a pointer to layer
 typedef map<int,TeLayer*> TeLayerMap;
 
-/** \example LayerExample1.cpp
- * This is an example of how to create a layer with objects, atributes and geometries
+/** \example createLayer.cpp
+	Shows how to create a layer in a TerraLib database, and insert some vectorial data in this new layer
+ */
+
+/** \example addGeomRepresentation.cpp
+	Shows how to create a point representation (centroid of polygons) to a layer in a TerraLib database.
  */
 #endif
 
diff --git a/src/terralib/kernel/TeLegendEntry.cpp b/src/terralib/kernel/TeLegendEntry.cpp
new file mode 100755
index 0000000..1bd257f
--- /dev/null
+++ b/src/terralib/kernel/TeLegendEntry.cpp
@@ -0,0 +1,174 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+#include <TeLegendEntry.h>
+
+TeLegendEntry::TeLegendEntry(const TeSlice& slice) :
+	slice_(slice),
+	id_(-1),
+	theme_(0),
+	group_(0)
+{
+	if (slice_.from_ == "Missing Data")
+		label_ = "Missing Data";
+	else 
+	{
+		int i = slice_.from_.find("mean = ");
+		if (i >= 0 || slice_.to_.empty())
+			label_ = slice_.from_;
+		else
+			label_ = slice_.from_ + " ~ " + slice_.to_;
+	}
+}
+
+
+TeLegendEntry::TeLegendEntry (const TeLegendEntry& leg)
+{
+	*this = leg;
+}
+
+TeLegendEntry&
+TeLegendEntry::operator = (const TeLegendEntry& leg)
+{
+	if ( this != &leg )
+	{	//clears the current map
+		TeGeomRepVisualMap::iterator currMapIt = visualMap_.begin();
+		while( currMapIt != visualMap_.end() )
+		{
+			if (currMapIt->second)
+			{
+				delete currMapIt->second;
+				currMapIt->second = NULL;
+			}				
+			++currMapIt;
+		}
+		visualMap_.clear();
+			
+		//copy the new map
+		TeGeomRepVisualMap::const_iterator it = leg.visualMap_.begin();
+		while( it != leg.visualMap_.end() )
+		{
+			if (it->second)
+			{
+				TeVisual* visual = it->second->copy();
+				visualMap_[ it->first ] = visual;
+			}
+			++it;
+		}
+		slice_ = leg.slice_;
+		label_ = leg.label_;
+		id_ = leg.id_;
+		theme_ = leg.theme_;
+		group_ = leg.group_;
+	}
+	return *this;
+}
+
+void
+TeLegendEntry::clear()
+{
+	slice_.from_.clear();
+	slice_.to_.clear();
+	label_.clear();
+
+	//clears the current map
+	TeGeomRepVisualMap::iterator currMapIt = visualMap_.begin();
+	while( currMapIt != visualMap_.end() )
+	{
+		if (currMapIt->second)
+		{
+			delete currMapIt->second;
+			currMapIt->second = NULL;
+		}
+		++currMapIt;
+	}
+	visualMap_.clear();
+}
+
+string 
+TeLegendEntry::label()
+{
+    if (label_.empty())
+    {
+        int npos = slice_.from_.find("mean = ");
+        if (npos >= 0 || slice_.to_.empty())
+            label_ = slice_.from_;
+        else 
+            label_ = slice_.from_ + " ~ " + slice_.to_;
+    }
+    return label_;
+} 
+
+TeVisual*
+TeLegendEntry::visual(TeGeomRep rep, const string& visualType)
+{ 
+	if(visualMap_.find(rep) == visualMap_.end())
+	{
+		TeVisual* visual = TeVisualFactory::make(visualType);
+        visualMap_[rep] = visual; 
+	}
+	return visualMap_[rep];
+}
+
+void 
+TeLegendEntry::color( TeColor& color )
+{
+	if(visualMap_.find(TePOLYGONS) != visualMap_.end())
+	{
+		TeVisual* tmpVisual = visualMap_[TePOLYGONS];
+		if (tmpVisual)
+		{
+			tmpVisual->color( color );
+			if ( tmpVisual->style() != 1 ) 
+				tmpVisual->contourColor( color );
+		}		
+	}
+	if(visualMap_.find(TeLINES) != visualMap_.end())
+	{
+		TeVisual* tmpVisual = visualMap_[TeLINES];
+		if (tmpVisual)
+			tmpVisual->color( color );
+	}
+	if(visualMap_.find(TePOINTS) != visualMap_.end())	
+	{
+		TeVisual* tmpVisual = visualMap_[TePOINTS];
+		if (tmpVisual)
+			tmpVisual->color( color );
+	}
+}
+
+void 
+TeLegendEntry::setVisual(TeVisual* vis, TeGeomRep rep) 
+{ 
+	if ( visualMap_.find(rep) != visualMap_.end() )
+	{
+		if ((visualMap_[rep] != NULL) && (visualMap_[rep] != vis))
+			delete visualMap_[rep];
+	}	
+	visualMap_[rep] = vis; 
+}
+
+void 
+TeLegendEntry::setVisual(TeVisual& vis, TeGeomRep rep) 
+{
+	return (setVisual(vis.copy(), rep));
+}
diff --git a/src/terralib/kernel/TeLegendEntry.h b/src/terralib/kernel/TeLegendEntry.h
old mode 100644
new mode 100755
index a7ff5bf..874c845
--- a/src/terralib/kernel/TeLegendEntry.h
+++ b/src/terralib/kernel/TeLegendEntry.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -21,93 +21,67 @@ indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
 /*! \file TeLegendEntry.h
-    This file deals with legends in TerraLib
+    \brief This file deals with legends in TerraLib
 */
 #ifndef  __TERRALIB_INTERNAL_LEGENDENTRY_H
 #define  __TERRALIB_INTERNAL_LEGENDENTRY_H
 
-#include "TeVisual.h"
-#include "TeUtils.h"
-#include "TeDataTypes.h"
-#include "TeSlice.h"
-
 #include <string>
 #include <vector>
 #include <map>
 
 using namespace std;
 
+#include "TeUtils.h"
+#include "TeDataTypes.h"
+#include "TeSlice.h"
+#include "TeVisual.h"
+
 class TeTheme;
+struct TeColor;
 
 //! A map from representation types to a presentation visual characteristics
-typedef map<TeGeomRep,TeVisual> TeGeomRepVisualMap;
+typedef map<TeGeomRep,TeVisual*> TeGeomRepVisualMap;
 
 
-//! A legend entry defines a group of objects and its visual presentation characteristics in a theme
+//! A Legend Entry represents a group of objects of a theme
 /*!
-	The group of objects is defined by a TeSlice, and has a unique identifier
-	The visual presentation characteristics id defined by a TeGeomRepVisualMap
-	Each legend entry has a unique identification
+	A legend entry is associated to a  group of a theme. It has a label and a TeSlice
+	that defines a property of of the objects that fall into this legend.
+	A legend entry has an associated label and the visual presentation characteristics 
+	of the objects that fall into this legend.
 */
-class TeLegendEntry
+class TL_DLL TeLegendEntry
 {
 public:
 
-	//! Constructor
-	TeLegendEntry::TeLegendEntry () : 
+	//! Empty constructor
+	TeLegendEntry () : 
 		label_(""),
 		id_(-1),
 		theme_(0),
 		group_(0)
 		{}
 
-	//! Constructor
-	TeLegendEntry::TeLegendEntry (const TeSlice& slice) :
-		slice_(slice),
-		id_(-1),
-		theme_(0),
-		group_(0)
-	{
-			if (slice_.from_ == "Missing Data")
-				label_ = "Missing Data";
-			else 
-			{
-				int i = slice_.from_.find("mean = ");
-				if (i >= 0 || slice_.to_.empty())
-					label_ = slice_.from_;
-				else
-					label_ = slice_.from_ + " ~ " + slice_.to_;
-			}
-	}
-
+	//! Constructor from a slice
+	TeLegendEntry (const TeSlice& slice);
 	
 	//! Copy constructor
-	TeLegendEntry (const TeLegendEntry& leg)
-	{
-		if (&leg == this)
-			return;
-		visualMap_ = leg.visualMap_;
-		slice_ = leg.slice_;
-		label_ = leg.label_;
-		id_ = leg.id_;
-		theme_ = leg.theme_;
-		group_ = leg.group_;
-	}
+	TeLegendEntry (const TeLegendEntry& leg);
 
 	//! Operator =
-	TeLegendEntry& operator = (const TeLegendEntry& leg)
-	{
-		visualMap_ = leg.visualMap_;
-		slice_ = leg.slice_;
-		label_ = leg.label_;
-		id_ = leg.id_;
-		theme_ = leg.theme_;
-		group_ = leg.group_;
-		return *this;
-	}
+	TeLegendEntry& operator = (const TeLegendEntry& leg);
+
+	//! Destructor
+	virtual ~TeLegendEntry()
+	{	clear(); }
+
+	//! Clear the legend
+	void clear();
 
 	//! Returns the legend id
-	int	id () { return id_; }
+	int	id () 
+	{ return id_; }
 	//! Sets the legend id
 	void id (int i) { id_ = i; }
 
@@ -122,16 +96,14 @@ public:
 	void group (int i) { group_ = i; }
 
 	//! Returns the visual presentation characteristics associated to a given representation
-	TeVisual& visual (TeGeomRep rep)
-	{ 
-		static TeVisual visual;
-		if(visualMap_.find(rep) == visualMap_.end())
-			return visual;
-		return visualMap_[rep];
-	}
+	TeVisual* visual (TeGeomRep rep, const string& visualType="tevisual");
+
 	//! Sets the visual presentation characteristics associated to a given representation
-	void setVisual (TeVisual &vis, TeGeomRep rep) 
-	{ visualMap_[rep] = vis; }
+	void setVisual (TeVisual* vis, TeGeomRep rep); 
+
+	//! Sets the visual presentation characteristics associated to a given representation
+	void setVisual (TeVisual& vis, TeGeomRep rep); 
+	
 	//! Return the visual presentation characteristics map
 	TeGeomRepVisualMap& getVisualMap()
 	{	return visualMap_; }
@@ -167,21 +139,15 @@ public:
 	{	slice_.to_ = s; }
 
 	//! Returns the label associated to the legend 
-	string label()
-	{
-		if (label_.empty())
-		{
-			int npos = slice_.from_.find("mean = ");
-			if (npos >= 0 || slice_.to_.empty())
-				label_ = slice_.from_;
-			label_ = slice_.from_ + " ~ " + slice_.to_;
-		}
-		return label_;
-	}
+	string label();
+	
 	//! Sets the label associated to the legend
 	void label(string& s)
 	{	label_ = s; }
 
+	//! Sets the color associated to the legend
+	void color(TeColor& color);
+
 private:
 
 	TeGeomRepVisualMap	visualMap_;
diff --git a/src/terralib/kernel/TeMappedMemory.cpp b/src/terralib/kernel/TeMappedMemory.cpp
new file mode 100755
index 0000000..920047f
--- /dev/null
+++ b/src/terralib/kernel/TeMappedMemory.cpp
@@ -0,0 +1,421 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+
+#include "TeMappedMemory.h"
+#include "TeException.h"
+#include "TeErrorLog.h"
+#include "TeUtils.h"
+#include "TeAgnostic.h"
+#include "TeDefines.h"
+#include "TeTempFilesRemover.h"
+
+#if TePLATFORM == TePLATFORMCODE_MSWINDOWS
+  #include <io.h>
+  #include <fcntl.h>
+  #include <sys/stat.h>  
+#elif TePLATFORM == TePLATFORMCODE_LINUX || TePLATFORM == TePLATFORMCODE_AIX
+  #include <sys/types.h>
+  #include <sys/stat.h>
+  #include <fcntl.h>
+  #include <unistd.h>
+#else
+  #error "Unsupported platform"
+#endif
+
+
+void TeMappedMemory::init()
+{
+  #if TePLATFORM == TePLATFORMCODE_MSWINDOWS
+    m_hFile_ = 0;
+    m_hMapping_ = 0;
+    m_lpszFile_ = 0;
+  #elif TePLATFORM == TePLATFORMCODE_LINUX || TePLATFORM == TePLATFORMCODE_AIX
+    m_hFile_ = 0;
+    m_lpszFile_ = 0;
+  #else
+    #error "Unsupported platform"
+  #endif
+  
+  mapping_is_active_ = false;
+  curr_size_ = 0;
+  must_delete_file_ = false;
+};
+
+
+TeMappedMemory::TeMappedMemory()
+{
+  init();
+}
+
+
+TeMappedMemory::~TeMappedMemory()
+{
+  reset();
+}
+
+
+void TeMappedMemory::reset()
+{
+  TEAGN_TRUE_OR_THROW( toggle( false ), "Error disabling mapped memory" );
+  
+  if( must_delete_file_ ) {
+    TeTempFilesRemover::instance().removeFile(disk_file_name_);
+  }
+  
+  disk_file_name_.clear();
+  
+  init();
+}
+
+
+bool TeMappedMemory::reset( unsigned long int size, bool enabled )
+{
+  reset();
+  
+  std::string disk_file_name;
+      
+  TEAGN_TRUE_OR_RETURN( TeGetTempFileName( disk_file_name ),
+    "Unable to get temporary file name" );
+    
+  return( reset( disk_file_name, size, false, enabled ) );
+}
+
+
+bool TeMappedMemory::reset( const std::string& filename, 
+  unsigned long int size, bool keep_disk_file, bool enabled )
+{
+  reset();
+
+  if( filename.empty() || ( size == 0 ) ) {
+    TeErrorLog::instance().insert( UNKNOWN_ERROR_TYPE,
+      "Invalid mapped file name or invalid file size" ); 
+            
+    return false;
+  } else {
+    TEAGN_TRUE_OR_RETURN( createNewDiskFile( filename, size ),
+      "Unable to create memory mapped disk file" );
+      
+    disk_file_name_ = filename;
+    must_delete_file_ = ( ! keep_disk_file );
+    
+    if( must_delete_file_ )
+    {
+      TeTempFilesRemover::instance().addFile( filename );
+    }
+    
+    if( toggle( enabled ) ) {
+      return true;
+    } else {
+      reset();
+      return false;
+    }
+  }
+}
+
+
+bool TeMappedMemory::reset( const std::string& filename, bool enabled )
+{
+  reset();
+  
+  disk_file_name_ = filename;
+  
+  if( toggle( enabled ) ) {
+    return true;
+  } else {
+    reset();
+    return false;
+  }  
+}
+
+
+bool TeMappedMemory::toggle( bool enabled )
+{
+  if( enabled  ) {
+    if( mapping_is_active_ ) {
+      return true;    
+    } else {
+      curr_size_ = 0;
+      
+      /* Activating mapping */    
+      
+      if( ! TeCheckFileExistence( disk_file_name_.c_str() ) ) {
+        return false;
+      }
+      
+      unsigned long int filesize = TeGetFileSize( disk_file_name_ );
+  
+      if( filesize > 0 ) {
+        #if TePLATFORM == TePLATFORMCODE_MSWINDOWS
+      
+          HANDLE m_hFile = CreateFileA(
+            disk_file_name_.c_str(), GENERIC_READ | GENERIC_WRITE, 
+            FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING,
+            0, NULL);
+        
+          if( m_hFile == INVALID_HANDLE_VALUE ) {
+            TeErrorLog::instance().insert( UNKNOWN_ERROR_TYPE,
+              "Temporary file creation error" );        
+       
+            return false;
+          }
+  
+          HANDLE m_hMapping = CreateFileMapping( m_hFile, NULL, PAGE_READWRITE,
+            0, 0, NULL );
+              
+          if( m_hMapping == NULL ) {
+            CloseHandle(m_hFile);
+        
+            TEAGN_LOGERR( "Mapping creation error - " +
+              getLastErrorStr() );
+              
+            return false;        
+          }
+        
+          LPVOID m_lpszFile = (LPVOID) MapViewOfFile( m_hMapping, 
+            FILE_MAP_ALL_ACCESS, 0, 0, 0);
+      
+          if( m_lpszFile == 0 ) {
+            CloseHandle( m_hMapping );
+            CloseHandle( m_hFile );
+            
+            TEAGN_LOGERR( "Mapping view creation error - " +
+              getLastErrorStr() );
+            
+            return false;        
+          }        
+      
+          m_hFile_ = m_hFile;
+          m_hMapping_ = m_hMapping;
+          m_lpszFile_ = m_lpszFile;
+          
+        #elif TePLATFORM == TePLATFORMCODE_LINUX || TePLATFORM == TePLATFORMCODE_AIX
+        
+          int m_hFile = open( disk_file_name_.c_str(), O_RDWR );
+
+          if( m_hFile == -1 ) {
+            TeErrorLog::instance().insert( UNKNOWN_ERROR_TYPE,
+              "Temporary file creation error" );
+            
+            return false;         
+          }
+     
+          void* m_lpszFile  =  mmap(0, (long)filesize, (PROT_READ | PROT_WRITE), 
+            MAP_SHARED, m_hFile, 0);
+      
+          if( m_lpszFile == ((void*)-1) ) {
+            close( m_hFile );
+        
+            TeErrorLog::instance().insert( UNKNOWN_ERROR_TYPE,
+              "Mapping creation error" );
+            
+            return false;            
+          }
+        
+          m_hFile_ = m_hFile;
+          m_lpszFile_ = m_lpszFile;
+        #else
+          #error "Unsupported platform"
+        #endif
+    
+        mapping_is_active_ = true;
+        curr_size_ = filesize;
+        
+        return true;
+      } else {     
+        return false;
+      }
+    }
+  } else {
+    if( mapping_is_active_ ) {
+      /* Disabling mapping */
+      
+      #if TePLATFORM == TePLATFORMCODE_MSWINDOWS
+        if( ! UnmapViewOfFile( m_lpszFile_ ) ) {
+          throw TeException( UNKNOWN_ERROR_TYPE, "Unable to unmap disk file",
+            false );
+        }
+          
+        CloseHandle( m_hMapping_ );
+        CloseHandle( m_hFile_ );
+      #elif TePLATFORM == TePLATFORMCODE_LINUX || TePLATFORM == TePLATFORMCODE_AIX
+        if( munmap( m_lpszFile_ , (long)curr_size_ ) == -1) {
+          throw TeException( UNKNOWN_ERROR_TYPE, "Unable to unmap disk file",
+            false );
+        }
+            
+        close(m_hFile_);
+      #else
+        #error "Unsupported platform"
+      #endif
+      
+      mapping_is_active_ = false;
+      curr_size_ = 0;
+    }
+        
+    return true;
+  }
+}
+
+
+void* TeMappedMemory::getPointer() const
+{
+  TEAGN_TRUE_OR_THROW( mapping_is_active_,
+    "Trying to access an inactive mapping" );
+    
+  return m_lpszFile_;
+}
+
+
+std::string TeMappedMemory::getFileName() const
+{
+  TEAGN_TRUE_OR_THROW( mapping_is_active_,
+    "Trying to access an inactive mapping" );
+    
+  return disk_file_name_;
+}
+
+
+bool TeMappedMemory::createNewDiskFile( const std::string& filename,
+  unsigned long int size ) const
+{
+  #if TePLATFORM == TePLATFORMCODE_MSWINDOWS
+    int m_hFile = open( filename.c_str(),_O_RDWR|_O_CREAT,
+      _S_IREAD | _S_IWRITE);
+
+    if( m_hFile == -1 ) {
+      TeErrorLog::instance().insert( UNKNOWN_ERROR_TYPE,
+        "Temporary file creation error" );
+              
+      return false;         
+    }
+    
+    off_t seek_off = ( off_t )( size - 1 );
+          
+    if( lseek(m_hFile, seek_off, SEEK_SET) == -1 ) {
+      close( m_hFile );
+          
+      TeErrorLog::instance().insert( UNKNOWN_ERROR_TYPE,
+        "Temporary file seek error" );
+              
+      return false;           
+    }
+        
+    unsigned char c = '\0';
+    
+
+    if( write( m_hFile, (void*)&c, sizeof( unsigned char ) ) == -1 ) {
+      close( m_hFile );
+          
+      TeErrorLog::instance().insert( UNKNOWN_ERROR_TYPE,
+        "Temporary file write error" );
+              
+      return false;            
+    }  
+    
+    close( m_hFile );  
+  #elif TePLATFORM == TePLATFORMCODE_LINUX || TePLATFORM == TePLATFORMCODE_AIX
+    int m_hFile = open( filename.c_str(),O_RDWR|O_CREAT,S_IRWXU);
+
+    if( m_hFile == -1 ) {
+      TeErrorLog::instance().insert( UNKNOWN_ERROR_TYPE,
+        "Temporary file creation error" );
+              
+      return false;         
+    }
+    
+    off_t seek_off = ( off_t )( size - 1 );
+          
+    if( lseek(m_hFile, seek_off, SEEK_SET) == -1 ) {
+      close( m_hFile );
+          
+      TeErrorLog::instance().insert( UNKNOWN_ERROR_TYPE,
+        "Temporary file seek error" );
+              
+      return false;           
+    }
+        
+    unsigned char c = '\0';
+    
+
+    if( write( m_hFile, (void*)&c, sizeof( unsigned char ) ) == -1 ) {
+      close( m_hFile );
+          
+      TeErrorLog::instance().insert( UNKNOWN_ERROR_TYPE,
+        "Temporary file write error" );
+              
+      return false;            
+    }  
+    
+    close( m_hFile );
+  #else
+    #error "Unsupported platform"
+  #endif
+  
+  return true;
+}
+
+
+std::string TeMappedMemory::getLastErrorStr()
+{
+  std::string error_string;
+  
+  #if TePLATFORM == TePLATFORMCODE_MSWINDOWS
+  
+    LPVOID lpMsgBuf = 0;    
+    DWORD dw = GetLastError();
+    int written_chars_nmb = 0;
+    
+    written_chars_nmb = FormatMessage(
+          FORMAT_MESSAGE_ALLOCATE_BUFFER |
+            FORMAT_MESSAGE_FROM_SYSTEM | 
+            FORMAT_MESSAGE_IGNORE_INSERTS,
+          NULL,
+          dw,
+          0,
+          (LPTSTR) &lpMsgBuf,
+          1024, 
+          NULL );
+          
+    if( written_chars_nmb > 0 ) {
+      int str_size = MIN( 1024, 2 * written_chars_nmb );
+      error_string = std::string( ( (char*)lpMsgBuf ), 1024 );
+    }
+    
+    if( lpMsgBuf ) {
+      LocalFree(lpMsgBuf);
+    }
+    
+  #elif TePLATFORM == TePLATFORMCODE_LINUX || TePLATFORM == TePLATFORMCODE_AIX
+  
+  #else
+    #error "Unsuported platform"
+  #endif
+  
+  return error_string;
+}
+
+
+unsigned long int TeMappedMemory::size() const
+{
+  return curr_size_;
+}
diff --git a/src/terralib/kernel/TeMappedMemory.h b/src/terralib/kernel/TeMappedMemory.h
new file mode 100755
index 0000000..483c351
--- /dev/null
+++ b/src/terralib/kernel/TeMappedMemory.h
@@ -0,0 +1,232 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeMappedMemory.h
+    \brief This file deals with mapped memory resources
+*/
+
+#ifndef TEMAPPEDMEMORY_H
+  #define TEMAPPEDMEMORY_H
+  
+  #include "TeSharedPtr.h"
+  #include "TeDefines.h"
+  
+  #include <string>
+  
+  #if TePLATFORM == TePLATFORMCODE_MSWINDOWS
+    #include <windows.h>
+    #include <winbase.h>
+  #elif TePLATFORM == TePLATFORMCODE_LINUX || TePLATFORM == TePLATFORMCODE_AIX
+    #include <sys/mman.h>
+  #else
+    #error "ERROR: Unsupported platform"
+  #endif  
+
+  /**
+    * @brief This is class deals with mapped memory resources.
+    * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+    * @ingroup Utils
+    */
+  class TL_DLL TeMappedMemory {
+    public :
+      typedef TeSharedPtr< TeMappedMemory > pointer;
+      typedef const TeSharedPtr< TeMappedMemory > const_pointer;    
+      
+      /**
+       * @brief Default Constructor.
+       */
+      TeMappedMemory();          
+      
+      /**
+       * @brief Default Destructor.
+       */
+      ~TeMappedMemory();
+      
+      /**
+       * @brief Reset the current instance (free all allocated resources).
+       */
+      void reset();
+      
+      /**
+       * @brief Reset the current instance to new size.
+       * @note The mapped memory file will be automatically created.
+       * @param size The new mapped memory size (bytes).
+       * @param enabled Mapping enabled/disabled state.
+       * @return true if OK. false on errors.
+       */
+      bool reset( unsigned long int size, bool enabled );
+      
+      /**
+       * @brief Reset the current instance using a new created disk file.
+       *
+       * @note The mapped memory size will follow the disk file size.
+       *
+       * @param filename The mapped memory disk file name.
+       * @param size The new mapped memory size (bytes).
+       * @param keep_disk_file if true, the file will not be deleted.
+       * @param enabled Mapping enabled/disabled state.
+       * @return true if OK. false on errors.
+       */
+      bool reset( const std::string& filename, unsigned long int size,
+        bool keep_disk_file, bool enabled );      
+      
+      /**
+       * @brief Reset the current instance using an exising disk file.
+       * @note The mapped memory size will follow the disk file size.
+       * @param filename The mapped memory disk file name.
+       * @param enabled Mapping enabled/disabled state.       
+       * @return true if OK. false on errors.
+       */
+      bool reset( const std::string& filename, bool enabled );      
+      
+      /**
+       * @brief Enable / disable the current mapping instance.
+       *
+       * @return true if OK. false on errors.
+       */
+      bool toggle( bool enabled );         
+      
+      /**
+       * @brief Returns a pointer reference to the mapped memory.
+       *
+       * @note Throws an exception if no mapped memory is active.
+       */
+      void* getPointer() const;
+      
+      /**
+       * @brief Returns the current mapped file name.
+       * @return The current mapped file name.
+       * @note Throws an exception if no mapped memory is active.
+       */
+      std::string getFileName() const;
+      
+      /**
+       * @brief The current allocated mapped memory size (bytes).
+       *
+       * @return The current allocated mapped memory size (bytes).
+       */
+      unsigned long int size() const;      
+      
+    protected :
+    
+      #if TePLATFORM == TePLATFORMCODE_MSWINDOWS
+      
+        /**
+         * @brief Handle to file we're currently zapping
+         */
+        HANDLE m_hFile_;
+        
+        /**
+         * @brief Handle to memory-mapping of that file
+         */
+        HANDLE m_hMapping_;
+        
+        /**
+         * @brief Pointer to mapped to memory
+         */
+        LPVOID m_lpszFile_;
+        
+      #elif TePLATFORM == TePLATFORMCODE_LINUX || TePLATFORM == TePLATFORMCODE_AIX
+  
+        /**
+         * @brief Handle to file we're currently zapping
+         */
+        int m_hFile_;
+        
+        /**
+         * @brief Pointer to mapped to memory
+         */
+        void* m_lpszFile_;
+        
+      #else
+        #error "Unsuported platform"
+      #endif
+      
+      /**
+       * @brief A flag indicating when this map is active.
+       * @note Default value : false.
+       */        
+      bool mapping_is_active_;
+      
+      /**
+       * @brief The disk file name.
+       * @note Default value : empty string.
+       *
+       */        
+      std::string disk_file_name_;
+      
+      /**
+       * @brief The current mapped memory size.
+       * @note Default value : 0.
+       */    
+      unsigned long int curr_size_;
+     
+      /**
+       * @brief True if the mapped file must be deleted.
+       * @note Default value : false.
+       */    
+      bool must_delete_file_;
+      
+      /**
+       * @brief Initiates the global initial state.
+       *
+       */      
+      void init();
+      
+      /**
+       * @brief Create a new disk file suitable for memory mapping.
+       * @param filename The file name.
+       * @param size The file size.
+       * @return true if OK. false on errors.
+       */
+      bool createNewDiskFile( const std::string& filename, 
+        unsigned long int size ) const;
+        
+      /**
+       * @brief Generate the last error string.
+       * @return The last error string.
+       */        
+      std::string getLastErrorStr();
+      
+    private :
+    
+      /**
+       * @brief Alternative Constructor.
+       *
+       */
+      TeMappedMemory( const TeMappedMemory& ) {}; 
+          
+      /**
+       * @brief Operator= overload.
+       *
+       */
+      const TeMappedMemory& operator=( const TeMappedMemory& )
+      {
+        return *this;
+      };
+  };
+  
+/** @example TeMappedMemory_test.cpp
+ *    Shows how to use this class.
+ */    
+
+#endif
diff --git a/src/terralib/kernel/TeMatrix.cpp b/src/terralib/kernel/TeMatrix.cpp
old mode 100644
new mode 100755
index 7df0b10..cc15643
--- a/src/terralib/kernel/TeMatrix.cpp
+++ b/src/terralib/kernel/TeMatrix.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -24,6 +24,9 @@ of this library and its documentation.
  // TeMatrix.c -- matrix of type double
 
 #include <TeMatrix.h>
+
+#include <TeAgnostic.h>
+
 #include <math.h>
 #include <stdio.h>
 
@@ -63,7 +66,7 @@ TeMatrix::Alloc(int nl, int nc)
 {
 	Clear();
 	if( nl <= 0 || nc <= 0 ){
-		return false;
+		return true;
 	}
 	nrow = nl;
 	ncol = nc;
@@ -295,7 +298,7 @@ TeMatrix::isUpperTriangle() const
 	int i,j;
 	for(j = 0; j < ncol; j++)
 		for(i = j+1; i < nrow; i++)
-			if ( mat[i][j]  != (double)0 )
+			if ( mat[i][j]  != (double)0. )
 				return false;
 	return true;
 }
@@ -306,22 +309,18 @@ TeMatrix::isLowerTriangle() const
 {
 	// elements under diagonal different 0
 	int i,j;
-/*	for(j=0; j<ncol; j++)
-		for(i=j+1; i<nrow; i++)
-			if ( mat[i][j]!=0 )*/
 	// VRMC 11/98
 	for (i=0; i< nrow; i++)
 		for (j= i+1; j <ncol; j++)
-			if ( mat[i][j] != (double)0)
+			if ( mat[i][j] != (double)0. )
 				return false;
 	return true;
 }
 
 double
-TeMatrix:: Determinant()
+TeMatrix:: Determinant() const
 {
 	if (Nrow() != Ncol()) {
-		printf("\nMatrix::Determinant >>> not a square matrix\n");
 		return lixo;
 	}
 	if (Nrow()==1) return mat[0][0];
@@ -549,7 +548,7 @@ TeMatrix::CholeskyInv (TeMatrix&	mt) const
 	
 
 int
-TeMatrix::EigenValues( TeMatrix& mt )
+TeMatrix::EigenValues( TeMatrix& mt ) const
 {
 	//---	calcula os eigenvalues  de uma
 	//	matriz representada na forma vetorial 
@@ -761,7 +760,7 @@ l5:
 //	utilizada no software SITIM.
 
 int
-TeMatrix::EigenVectors( TeMatrix& mt )
+TeMatrix::EigenVectors( TeMatrix& mt ) const
 {
 	if( &mt == this ){
 		printf("\nMatrix::EigenVectors >>> Operacao usa duas matrizes\n");
@@ -1079,6 +1078,32 @@ int	i,j,k;
 
 }
 
+double TeMatrix::getTrace() const
+{
+  TEAGN_TRUE_OR_THROW( ( nrow == ncol ), 
+    "Cannot get trace from a non-square matrix" );
+    
+  double trace = 0.0;
+  
+  for( int curr_row = 0 ; curr_row < nrow ; ++curr_row ) {
+    trace += mat[ curr_row ][ curr_row ];
+  }
+  
+  return trace;
+}
+
+
+bool TeMatrix::getIdentity( TeMatrix& identity, unsigned int width )
+{
+  if( identity.Init( width, width, 0.0 ) == 0 ) return false;
+  
+  for( unsigned int curr_row = 0 ; curr_row < width ; ++curr_row ) {
+    identity( curr_row, curr_row ) = 1.0;
+  }
+  
+  return true;
+}
+
 //------------------------------------------ Print
 void
 TeMatrix::Print()
@@ -1252,7 +1277,6 @@ TeMatrix::Inverse( TeMatrix& matinv ) const
 				sup = lcon1;
 			}
 			if(sup == 0.0){
-				printf("\nMatrix::Inverse>>Determinant = 0.");
 				if( maxlinha != NULL){ delete []maxlinha; maxlinha = NULL; } //SSL0296
 				if( lp != NULL){ delete []lp; lp = NULL; } //SSL0296
 				return false;
@@ -1276,7 +1300,6 @@ TeMatrix::Inverse( TeMatrix& matinv ) const
 		}
 
 		if(pivo == 0.0){
-			printf("\nMatrix::Inverse>>Determinant = 0.");
 			if( maxlinha != NULL){ delete []maxlinha; maxlinha = NULL; } //SSL0296
 			if( lp != NULL){ delete []lp; lp = NULL; } //SSL0296
 			return false;
@@ -1312,7 +1335,8 @@ TeMatrix::Inverse( TeMatrix& matinv ) const
 
 //---	Copia a parte extendida de mataum em matinv que passa a ser a matriz inversa
 	for(i1 = 0 ; i1 < nrow ; i1++){
-		for(i2 = nrow ; i2 < m2 ; i2++){
+		for(i2 = nrow ; i2 < m2 ; i2++)
+		{
         		i3 = i2 - nrow ;
 			matinv(i1,i3) = mataum(lp[i1],i2);
 		}
diff --git a/src/terralib/kernel/TeMatrix.h b/src/terralib/kernel/TeMatrix.h
old mode 100644
new mode 100755
index d960bd6..e2ba6a7
--- a/src/terralib/kernel/TeMatrix.h
+++ b/src/terralib/kernel/TeMatrix.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -21,13 +21,16 @@ indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
 /*! \file TeMatrix.h
-    This file models the object matrix of type double - class TeMatrix.
+    \brief This file models the object matrix of type double
 */
 #ifndef  __TERRALIB_INTERNAL_MATRIX_H
 #define  __TERRALIB_INTERNAL_MATRIX_H
 
+#include "TeDefines.h"
+#include "TeAgnostic.h"
+
 //! This class represents a matrix of elements of type double
-class TeMatrix
+class TL_DLL TeMatrix
 {
 private:
 	int nrow;	// Number of rows
@@ -63,14 +66,25 @@ public:
 	//! Diagonal matrix with different values.
 	int Init(int k, double* f);
 
-
 	//! Diagonal matrix with the same value
 	int Init(int k, double f); 
 
+  //! Acess element in position (lin,col)
+  inline const double& operator()( int lin, int col ) const {
+    TEAGN_DEBUG_CONDITION( ( ( lin >= 0 ) && ( lin < nrow ) && 
+      ( col >= 0 ) && ( col < ncol ) ),
+      "Trying to acces an invalid position" )
+      
+    return mat[lin][col];
+  }  
+      
 	//! Acess element in position (lin,col)
-	double& operator()( int lin, int col ){ 
-		return (lin >= 0 && lin < nrow && col >= 0 && col < ncol ) ?
-			( mat[lin][col] ) : ( lixo );
+	inline double& operator()( int lin, int col ){ 
+    TEAGN_DEBUG_CONDITION( ( ( lin >= 0 ) && ( lin < nrow ) && 
+      ( col >= 0 ) && ( col < ncol ) ),
+      "Trying to acces an invalid position" )
+      
+    return mat[lin][col];
 	}
 
 	//! Assign matrix values to another one using operator =
@@ -90,7 +104,7 @@ public:
  	
 	//!	Returns the number of columns.
 	int	Ncol()	const { return ncol; } 
-	
+
 	//!	Print the matrix elements .
 	void Print();
 
@@ -108,9 +122,8 @@ public:
 
 	//!		Finds the inverse of a triangle matrix	acquired from Cholesky decomposition
 	int	CholeskyInv (TeMatrix&	mt) const;	
-
 		
-//!	Calculates the inverse of a lowertriangle matrix aquired from the Cholesky decomposition of a simetric positive definide matrix.
+	//!	Calculates the inverse of a lowertriangle matrix aquired from the Cholesky decomposition of a simetric positive definide matrix.
 	int MatTransf( TeMatrix& mt );	
 
 //!	Checks if the matrix is an uppertriangle matrix.
@@ -129,33 +142,47 @@ public:
 	int	CoFactor(int irow, int jcol, TeMatrix& m) const;
 
 //!	Calculates the determinant value.
-	double	Determinant();
+	double	Determinant() const;
 
 //	Extracts a triangle matrix from a simetric positive	definide one
 	int	CholeskyDecomp( TeMatrix& mt );	
 
 //!	Calculates the EigenVectors.
-	int	EigenVectors( TeMatrix& mt );
+	int	EigenVectors( TeMatrix& mt ) const;
 
 //!	Calculates the EigenValues.
-	int	EigenValues( TeMatrix& mt );
+	int	EigenValues( TeMatrix& mt ) const;
 
 //!	Calculates the EigenVectors.
 	int EigenVec( double e_vec[] );
+	
+	/**
+	 * @brief	Matrix trace calcule (the sum of diagonal elements).
+	 * @return The matrix trace.
+	 */	
+	double getTrace() const;
+	
+	/**
+	 * @brief	Generate a identity matrix .
+	 * @param identity The generated identity matrix.
+	 * @param width The identity matrix width.
+	 * @return true if OK, false on errors.
+	 */
+	static bool getIdentity( TeMatrix& identity, unsigned int width );
 
 //!	Sums two matrices.
-	friend TeMatrix operator+(const TeMatrix& m1,const TeMatrix& m2);
+	friend TL_DLL TeMatrix operator+(const TeMatrix& m1,const TeMatrix& m2);
 
 //!	Subtracts two matrices.
-	friend TeMatrix operator-(const TeMatrix&,const TeMatrix&);
+	friend TL_DLL TeMatrix operator-(const TeMatrix&,const TeMatrix&);
 
 //!	Calculates the product of two matrices.
-	friend TeMatrix operator*(const TeMatrix&,const TeMatrix&);
+	friend TL_DLL TeMatrix operator*(const TeMatrix&,const TeMatrix&);
 
 //!	Product of the matrix by a constant.
-	friend TeMatrix operator*(double c,const TeMatrix&);
-
+	friend TL_DLL TeMatrix operator*(double c,const TeMatrix&);
 };
 
+
 #endif
 
diff --git a/src/terralib/kernel/TeMeasure.h b/src/terralib/kernel/TeMeasure.h
old mode 100644
new mode 100755
index 2722fd5..1cdd905
--- a/src/terralib/kernel/TeMeasure.h
+++ b/src/terralib/kernel/TeMeasure.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -21,7 +21,7 @@ indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
 /*! \file TeMeasure.h
-    This file Defines a class for handling a measure
+    \brief This file defines a class for handling a measure
 */
 
 #ifndef  __TERRALIB_INTERNAL_MEASURE_H
@@ -33,7 +33,9 @@ of this library and its documentation.
 	require a field measure.
 	\sa TeSample, TeCountourLine
 */
-class TeMeasure 
+
+#include "TeDefines.h"
+class TL_DLL TeMeasure 
 {
 public:
 
diff --git a/src/terralib/kernel/TeMetaModelCache.cpp b/src/terralib/kernel/TeMetaModelCache.cpp
new file mode 100644
index 0000000..46d11d6
--- /dev/null
+++ b/src/terralib/kernel/TeMetaModelCache.cpp
@@ -0,0 +1,40 @@
+#include "TeMetaModelCache.h"
+
+void TeMetaModelCache::clear()
+{
+	TeViewMap::iterator viewIt;
+	for (viewIt = viewMap_.begin(); viewIt != viewMap_.end(); ++viewIt)
+	{
+		if(viewIt->second)
+			delete viewIt->second;
+	}
+
+	TeLayerMap::iterator layerIt;
+	for (layerIt = layerMap_.begin(); layerIt != layerMap_.end(); ++layerIt)
+	{
+		if (layerIt->second)
+			delete layerIt->second;
+	}
+
+	TeProjectMap::iterator projectIt;
+	for (projectIt = projectMap_.begin(); projectIt != projectMap_.end(); ++projectIt)
+	{
+		if (projectIt->second)
+			delete projectIt->second;
+	}
+
+	TeThemeMap::iterator invThemeIt;
+	for (invThemeIt = invalidThemeMap_.begin(); invThemeIt != invalidThemeMap_.end(); ++invThemeIt)
+	{
+		if (invThemeIt->second)
+			delete invThemeIt->second;
+	}
+
+	legendMap_.clear();
+	themeMap_.clear();
+	invalidThemeMap_.clear();
+	viewMap_.clear();
+	layerMap_.clear();
+	projectMap_.clear();
+}
+
diff --git a/src/terralib/kernel/TeMetaModelCache.h b/src/terralib/kernel/TeMetaModelCache.h
new file mode 100644
index 0000000..f798797
--- /dev/null
+++ b/src/terralib/kernel/TeMetaModelCache.h
@@ -0,0 +1,118 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeMetaModelCache.h
+    \brief This file contains structures and definitions about TerraLib database meta model.
+*/
+#ifndef  __TERRALIB_INTERNAL_METAMODELCACHE_H
+#define  __TERRALIB_INTERNAL_METAMODELCACHE_H
+
+#include "TeLayer.h"
+#include "TeAbstractTheme.h"
+#include "TeView.h"
+#include "TeProject.h"
+
+//! A class for storing TerraLib's metamodel objects (TeTheme, TeLayer, ...)
+/*!
+	An instance of this class keeps track of 
+	meta objects stored in a TerraLib Database.
+	This instance can be shared by all database connections.
+
+  \sa TeTheme, TeView, TeLayer, TeAttribute
+*/
+class TL_DLL TeMetaModelCache
+{
+	public: 
+
+
+        //! Empty constructor
+        TeMetaModelCache()
+		{}
+
+        //! Destructor
+        ~TeMetaModelCache()
+		{ clear(); }
+
+		//! Clears metadata
+		void clear();
+
+		//! Returns the  map of layers in the database
+		TeLayerMap&	layerMap () 
+		{ return layerMap_; }
+
+		//! Returns the  map of views in the database
+		TeViewMap&	viewMap () 
+		{ return viewMap_; }
+
+		//! Returns the  map of themes in the database
+		TeThemeMap&	themeMap () 
+		{ return themeMap_; }
+
+		//! Returns the  map of invalid themes in the database
+		TeThemeMap&	invalidThemeMap () 
+		{ return invalidThemeMap_; }
+
+		//! Returns the  map of projects in the database
+		TeProjectMap&  projectMap ()
+		{ return projectMap_; }
+
+		//! Returns the  map of legends in the database
+		TeLegendEntryMap& legendMap () 
+		{ return legendMap_; }
+
+		//! Returns the set of relations between tables
+		multiset<int>& relationMSet () 
+		{ return relationMSet_; }
+
+		map<int, map<string, string> >& mapThemeAlias()
+		{return mapThemeAlias_;}
+
+    private:
+
+        //! Copy constructor not allowed.
+        TeMetaModelCache(const TeMetaModelCache& rhs);
+
+		//! Assignment operator not allowed.
+        TeMetaModelCache& operator=(const TeMetaModelCache& rhs);
+
+	private:
+
+		TeLayerMap			layerMap_;			//!< layer map	  
+        TeViewMap			viewMap_;			//!< view map	  
+        TeThemeMap			themeMap_;			//!< theme map	
+		TeThemeMap			invalidThemeMap_;	//!< invalid theme map
+        TeLegendEntryMap	legendMap_;			//!< view map
+        TeProjectMap		projectMap_;		//!< project map
+        multiset<int>		relationMSet_;		//!< multiset of relations between tables
+		/*! \brief An associative container from theme identifier (int)
+		           to legend alias (map<string, string>). The theme alias
+                   is another container, where key is a string with a column name
+                   used in a group that maps to a legend alias (string value).
+		 */
+		map<int, map<string, string> > mapThemeAlias_;
+};
+
+
+
+#endif
+
+
diff --git a/src/terralib/kernel/TeMultiContainer.h b/src/terralib/kernel/TeMultiContainer.h
new file mode 100755
index 0000000..87753a9
--- /dev/null
+++ b/src/terralib/kernel/TeMultiContainer.h
@@ -0,0 +1,625 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+
+/*! \file TeMultiContainer.h
+   \brief A container class to store multiple types os object copies.
+*/
+
+
+#ifndef TEMULTICONTAINER_H
+  #define TEMULTICONTAINER_H
+
+  #include "TeSharedPtr.h"
+  #include "TeMutex.h"
+  #include "TeAgnostic.h"
+  
+  #include <time.h>
+  
+  #include <vector>
+  #include <typeinfo>
+
+  /**
+    * @brief Multi-container node interface.
+    * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+    * @ingroup Utils
+    */    
+  template< typename TeMultiContainerKeyT >
+  class TeMCNodeInterface {
+    public :
+    
+      /**
+        * @brief Default Constructor.
+        */        
+      TeMCNodeInterface() {};
+      
+      /**
+        * @brief Default Destructor.
+        */        
+      virtual ~TeMCNodeInterface() {};
+      
+      /**
+        * @brief Copies the the current node instance by calling
+        * the operator= from the contained object instance.
+        * @return A pointer to the new node copy.
+        */            
+      virtual TeMCNodeInterface< TeMultiContainerKeyT >* clone() 
+        const = 0;
+        
+      /**
+        * @brief Get the internal object type info.
+        * @return The internal object type info.
+        */        
+      virtual const std::string& getObjTypeInfo() const = 0;
+      
+    private :
+    
+      /**
+        * @brief Alternative constructor.
+        */        
+      TeMCNodeInterface( 
+        const TeMCNodeInterface< TeMultiContainerKeyT >& ) {};    
+    
+      /**
+      * @brief operator= overload.
+      *
+      * @param ext_instance External instance reference.
+      * @return The external instance reference.
+      */
+      const TeMCNodeInterface< TeMultiContainerKeyT >& operator=( 
+        const TeMCNodeInterface< TeMultiContainerKeyT >& ) {};        
+  };
+
+
+  /**
+    * @brief Multi-container node class.
+    * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+    * @ingroup Utils
+    */       
+  template< typename ObjectT, typename TeMultiContainerKeyT >
+  class TeMCNode : public TeMCNodeInterface< TeMultiContainerKeyT > {
+    public :
+    
+      /**
+        * @brief Default Constructor.
+        */        
+      TeMCNode() 
+      {
+        obj_ptr_ = 0;
+      };
+      
+      /**
+        * @brief Default Destructor.
+        */        
+      ~TeMCNode()
+      {
+        if( obj_ptr_ ) {
+          delete obj_ptr_;
+        }
+      };
+      
+      /**
+        * @brief Copies the the current node instance by calling
+        * the operator= from the contained object instance.
+        * @return A pointer to the new node copy.
+        */              
+      TeMCNodeInterface< TeMultiContainerKeyT >* clone() const
+      {
+        TeMCNode< ObjectT, TeMultiContainerKeyT >* new_node_ptr =
+          new TeMCNode< ObjectT, TeMultiContainerKeyT >;
+          
+        if( obj_ptr_ ) {
+          new_node_ptr->obj_ptr_ = new ObjectT;
+          ( *( new_node_ptr->obj_ptr_ ) ) = ( *obj_ptr_ );
+          
+          new_node_ptr->obj_type_str_ = obj_type_str_;
+        }
+        
+        return new_node_ptr;
+      };
+      
+      /**
+        * @brief Set the internal object pointer.
+        * @param ptr Object pointer.
+        */        
+      void setObjPtr( ObjectT* ptr ) 
+      { 
+        TEAGN_DEBUG_CONDITION( ptr, "Invalid pointer" )
+        
+        if( obj_ptr_ ) {
+          delete obj_ptr_;
+        }      
+      
+        obj_ptr_ = ptr;
+        obj_type_str_ = std::string( typeid( *ptr ).name() );
+      };
+      
+      /**
+        * @brief Get the internal object pointer.
+        * @return The object pointer.
+        */        
+      ObjectT* getObjPtr() const
+      { 
+        return obj_ptr_; 
+      };
+      
+      /**
+        * @brief Get the internal object type info.
+        * @return The internal object type info.
+        */        
+      const std::string& getObjTypeInfo() const
+      { 
+        return obj_type_str_; 
+      };      
+      
+    protected :
+      
+      /**
+        * @brief The internal object pointer.
+        */
+      ObjectT* obj_ptr_;
+      
+      /**
+        * @brief The internal object type.
+        */
+      std::string obj_type_str_;      
+      
+  }; 
+
+ /**
+  * @brief A container class to store multiple types os object copies.
+  * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+  * @note This is a thread-safe class.
+  * @note Do not use this class with polymorphic types !!
+  * @ingroup Utils
+  */
+  template< typename TeMultiContainerKeyT >
+  class TeMultiContainer {
+  
+    public :
+    
+      /** @typedef TeSharedPtr< TeMultiContainer< TeMultiContainerKeyT > > pointer 
+          Type definition for a instance pointer */
+      typedef TeSharedPtr< TeMultiContainer< TeMultiContainerKeyT > > pointer;
+      
+      /** @typedef const TeSharedPtr< TeMultiContainer< TeMultiContainerKeyT > > const_pointer 
+          Type definition for a const instance pointer */
+      typedef const TeSharedPtr< TeMultiContainer< TeMultiContainerKeyT > > const_pointer;
+      
+      /**
+       * @brief Default Constructor
+       */
+      TeMultiContainer();
+      
+      /**
+       * @brief Alternative Constructor
+       * @param external External reference.
+       */
+      TeMultiContainer( 
+        const TeMultiContainer< TeMultiContainerKeyT >& external );      
+
+      /**
+       * @brief  Default Destructor
+       */
+      ~TeMultiContainer();
+                           
+      /**
+       * @brief Operator == overload.
+       *
+       * @param ext_instance External instance reference.
+       * @return true if this instance have the same internal
+       * update time that the external instance.
+       */
+      bool operator==( 
+        const TeMultiContainer< TeMultiContainerKeyT >& ext_instance ) const;
+      
+      /**
+       * @brief Operator != overload.
+       *
+       * @param ext_instance External instance reference.
+       * @return true if this instance don't have the same internal
+       * update time that the external instance.
+       */
+      bool operator!=( 
+        const TeMultiContainer< TeMultiContainerKeyT >& ext_instance ) const;
+      
+      /**
+       * @brief operator= overload.
+       *
+       * @param ext_instance External instance reference.
+       * @return The external instance reference.
+       */
+      const TeMultiContainer< TeMultiContainerKeyT >& operator=( 
+        const TeMultiContainer< TeMultiContainerKeyT >& ext_instance );
+      
+      /**
+       * @brief Clear all contents.
+       *
+       */
+      void clear();
+                         
+      /**
+       * @brief Store a object copy.
+       *
+       * @param obj_key Object key.
+       * @param obj_reference Object instance.
+       */                         
+      template< typename ObjectT >
+      void store( const TeMultiContainerKeyT& obj_key,
+                         const ObjectT& obj_reference );
+      
+      /**
+       * @brief Retrive a copy of a stored object.
+       *
+       * @param obj_key Object key.
+       * @param obj_reference Object instance.
+       * @return true if OK, false if the parameter was no found or error.
+       */      
+      template< typename ObjectT >
+      bool retrive( const TeMultiContainerKeyT& obj_key,
+        ObjectT& obj_reference ) const;
+        
+      /**
+       * @brief Retrive copies of all stored objects of a defined type.
+       *
+       * @param objs_vector A vector with copies of all found objects.
+       * @note An empty vector will be returned if no object was found.
+       */      
+      template< typename ObjectT >
+      void multiRetrive( std::vector< std::pair< TeMultiContainerKeyT, 
+        ObjectT > >& objs_vector ) const;        
+     
+      /** 
+       * @brief Checks if a object is stored.
+       * 
+       * @param obj_key Object key.
+       * @note The object type must be specified.
+       * @return true if OK, false if the object is not stored.
+       */
+      template< typename ObjectT >
+      bool isStored( const TeMultiContainerKeyT& obj_key ) const;
+      
+      /** 
+       * @brief Remove a stored object.
+       * 
+       * @param obj_key Object key.
+       */
+      void remove( const TeMultiContainerKeyT& obj_key );      
+      
+    protected :
+
+      /** @brief Internal container type definition. */
+      typedef typename std::map< TeMultiContainerKeyT,
+        TeMCNodeInterface< TeMultiContainerKeyT >* > IntContainerT;
+      
+      /** @brief The nodes container instance. */
+      IntContainerT container_instance_;    
+      
+      /**
+       * @brief The last update time.
+       */
+      time_t last_up_time_;
+      
+      /**
+       * @brief This instance locking mutex.
+       */    
+      mutable TeMutex lock_instance_;      
+
+      /**
+       * @brief Updates the internal last update time.
+       *
+       * @note Needed by comparison between two multi containers.
+       */
+      void update_time();            
+
+};
+
+
+template< typename TeMultiContainerKeyT >
+TeMultiContainer< TeMultiContainerKeyT >::TeMultiContainer()
+{
+  last_up_time_ = 0;
+}
+
+
+template< typename TeMultiContainerKeyT >
+TeMultiContainer< TeMultiContainerKeyT >::TeMultiContainer( 
+  const TeMultiContainer< TeMultiContainerKeyT >& external )
+{
+  last_up_time_ = 0;
+  
+  operator=( external );
+}
+
+
+template< typename TeMultiContainerKeyT >
+TeMultiContainer< TeMultiContainerKeyT >::~TeMultiContainer()
+{
+  clear();
+}
+
+
+template< typename TeMultiContainerKeyT >
+void TeMultiContainer< TeMultiContainerKeyT >::clear()
+{
+  lock_instance_.lock();
+  
+  typename IntContainerT::iterator it = container_instance_.begin();
+  typename IntContainerT::iterator it_end = container_instance_.end();
+  
+  while( it != it_end ) {
+    delete (it->second);
+    
+    ++it;
+  }
+  
+  container_instance_.clear();
+  
+  lock_instance_.unLock();
+}
+
+
+template< typename TeMultiContainerKeyT >
+bool TeMultiContainer< TeMultiContainerKeyT >::operator==( 
+  const TeMultiContainer< TeMultiContainerKeyT >& ext_instance ) const
+{
+  if( last_up_time_ == ext_instance.last_up_time_ ) {
+    return true;
+  } else {
+    return false;
+  }
+}
+
+
+template< typename TeMultiContainerKeyT >
+bool TeMultiContainer< TeMultiContainerKeyT >::operator!=( 
+  const TeMultiContainer< TeMultiContainerKeyT >& ext_instance ) 
+  const
+{
+  if( last_up_time_ == ext_instance.last_up_time_ ) {
+    return false;
+  } else {
+    return true;
+  }
+}
+
+
+template< typename TeMultiContainerKeyT >
+const TeMultiContainer< TeMultiContainerKeyT >& 
+TeMultiContainer< TeMultiContainerKeyT >::operator=( 
+  const TeMultiContainer< TeMultiContainerKeyT >& ext_instance )
+{
+  if( ( &ext_instance ) != this ) {
+    lock_instance_.lock();
+    
+    /* Clearing the current objects */
+    
+    typename IntContainerT::iterator my_container_it = 
+      container_instance_.begin();
+    typename IntContainerT::iterator my_container_it_end = 
+      container_instance_.end();
+    
+    while( my_container_it != my_container_it_end ) {
+      delete (my_container_it->second);
+      
+      ++my_container_it;
+    }    
+    
+    container_instance_.clear();
+    
+    /* Cloning external objects */
+    
+    ext_instance.lock_instance_.lock();
+  
+    typename IntContainerT::const_iterator container_it = 
+      ext_instance.container_instance_.begin();
+    typename IntContainerT::const_iterator container_it_end = 
+      ext_instance.container_instance_.end();
+          
+    while( container_it != container_it_end ) {
+      container_instance_[ container_it->first ] = 
+        container_it->second->clone();
+          
+      ++container_it;
+    }
+  
+    last_up_time_ = ext_instance.last_up_time_;
+  
+    ext_instance.lock_instance_.unLock();
+    
+    lock_instance_.unLock();
+  }
+
+  return *this;
+}
+
+
+template< typename TeMultiContainerKeyT >
+void TeMultiContainer< TeMultiContainerKeyT >::update_time()
+{
+  last_up_time_ = time( 0 );
+}
+
+
+template< typename TeMultiContainerKeyT >
+template< typename ObjectT >
+void TeMultiContainer< TeMultiContainerKeyT >::store( 
+  const TeMultiContainerKeyT& obj_key, const ObjectT& obj_reference )
+{
+  lock_instance_.lock();
+
+  /* Creating a new node */
+  
+  ObjectT* newobjptr = new ObjectT;
+  ( *newobjptr ) = obj_reference;
+  
+  TeMCNode< ObjectT, TeMultiContainerKeyT >* newnodeptr =
+    new TeMCNode< ObjectT, TeMultiContainerKeyT >;  
+  newnodeptr->setObjPtr( newobjptr );
+  
+  typename IntContainerT::iterator container_it = 
+    container_instance_.find( obj_key );
+    
+  /* If a old node with the same key exists, it will be deleted */
+    
+  if( container_it == container_instance_.end() ) {
+    container_instance_[ obj_key ] = newnodeptr;
+  } else {
+    delete (container_it->second);
+    
+    container_it->second = newnodeptr;
+  }
+      
+  update_time();
+  
+  lock_instance_.unLock();
+}
+
+
+template< typename TeMultiContainerKeyT >
+template< typename ObjectT >
+bool TeMultiContainer< TeMultiContainerKeyT >::retrive(
+  const TeMultiContainerKeyT& obj_key, ObjectT& obj_reference ) const
+{
+  lock_instance_.lock();
+  
+  typename IntContainerT::const_iterator container_it = 
+    container_instance_.find( obj_key );
+    
+  if( container_it == container_instance_.end() ) {
+    lock_instance_.unLock();
+    
+    return false;
+  } else {
+    if( typeid( ObjectT ).name() == 
+      container_it->second->getObjTypeInfo() ) {
+      
+      obj_reference = 
+        ( *( ( (TeMCNode< ObjectT, TeMultiContainerKeyT >* )
+        container_it->second )->getObjPtr() ) );
+    
+      lock_instance_.unLock();
+    
+      return true;
+    } else {
+      lock_instance_.unLock();
+    
+      return false;
+    }
+  }
+}
+
+
+template< typename TeMultiContainerKeyT >
+template< typename ObjectT >
+void TeMultiContainer< TeMultiContainerKeyT >::multiRetrive(
+  std::vector< std::pair< TeMultiContainerKeyT, 
+  ObjectT > >& objs_vector ) const
+{
+  objs_vector.clear();
+  
+  lock_instance_.lock();
+  
+  typename IntContainerT::const_iterator container_it = 
+    container_instance_.begin();
+  typename IntContainerT::const_iterator container_it_end = 
+    container_instance_.end();
+  
+  std::pair< TeMultiContainerKeyT, ObjectT > temp_pair;
+  
+  while( container_it != container_it_end ) {
+    if( typeid( ObjectT ).name() == 
+      container_it->second->getObjTypeInfo() ) {  
+      
+      temp_pair.first = container_it->first;
+      temp_pair.second = 
+        ( *( ( ( TeMCNode< ObjectT, TeMultiContainerKeyT >* )
+        container_it->second )->getObjPtr() ) );
+    
+      objs_vector.push_back( temp_pair );      
+    }  
+  
+    ++container_it;
+  }
+  
+  lock_instance_.unLock();
+}
+
+
+template< typename TeMultiContainerKeyT >
+template< typename ObjectT >
+bool TeMultiContainer< TeMultiContainerKeyT >::isStored( 
+  const TeMultiContainerKeyT& obj_key ) const
+{
+  lock_instance_.lock();
+  
+  typename IntContainerT::const_iterator container_it = 
+    container_instance_.find( obj_key );
+    
+  if( container_it == container_instance_.end() ) {
+    lock_instance_.unLock();
+    
+    return false;
+  } else {
+    if( typeid( ObjectT ).name() == 
+      container_it->second->getObjTypeInfo() ) {
+    
+      lock_instance_.unLock();
+    
+      return true;
+    } else {
+      lock_instance_.unLock();
+    
+      return false;
+    }
+  }
+}
+
+
+template< typename TeMultiContainerKeyT >
+void TeMultiContainer< TeMultiContainerKeyT >::remove( 
+  const TeMultiContainerKeyT& obj_key )
+{
+  lock_instance_.lock();
+  
+  typename IntContainerT::iterator container_it = 
+    container_instance_.find( obj_key );
+    
+  /* If a old node with the same key exists, it will be deleted */
+    
+  if( container_it != container_instance_.end() ) {
+    delete (container_it->second);
+    
+    container_instance_.erase( container_it );
+  }
+      
+  update_time();
+  
+  lock_instance_.unLock();
+}
+
+/** @example TeMultiContainer_test.cpp
+ *    Shows how to use this class.
+ */  
+
+#endif
+
diff --git a/src/terralib/kernel/TeMultiGeometry.cpp b/src/terralib/kernel/TeMultiGeometry.cpp
old mode 100644
new mode 100755
index fcd319a..bf9ccb4
--- a/src/terralib/kernel/TeMultiGeometry.cpp
+++ b/src/terralib/kernel/TeMultiGeometry.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -30,6 +30,7 @@ TeMultiGeometry::TeMultiGeometry(const TeMultiGeometry& other)
 	lines_.copyElements(other.lines_);
 	points_.copyElements(other.points_);
 	cells_.copyElements(other.cells_);
+	texts_.copyElements(other.texts_); 
 }
 
 TeMultiGeometry& 	
@@ -41,13 +42,14 @@ TeMultiGeometry::operator= (const TeMultiGeometry& other)
 		lines_.copyElements(other.lines_);
 		points_.copyElements(other.points_);
 		cells_.copyElements(other.cells_);
+		texts_.copyElements(other.texts_); 
 	}
 	return *this;
 }
 	
 	
 bool 
-TeMultiGeometry::getGeometry(TePolygonSet& result)
+TeMultiGeometry::getGeometry(TePolygonSet& result) const
 {
 	if(!hasPolygons())
 		return false;
@@ -57,7 +59,7 @@ TeMultiGeometry::getGeometry(TePolygonSet& result)
 
 
 bool 
-TeMultiGeometry::getGeometry(TeLineSet& result)
+TeMultiGeometry::getGeometry(TeLineSet& result) const
 {
 	if(!hasLines())
 		return false;
@@ -66,7 +68,7 @@ TeMultiGeometry::getGeometry(TeLineSet& result)
 }
 	
 bool 
-TeMultiGeometry::getGeometry(TePointSet& result)
+TeMultiGeometry::getGeometry(TePointSet& result) const
 {
 	if(!hasPoints())
 		return false;
@@ -75,16 +77,25 @@ TeMultiGeometry::getGeometry(TePointSet& result)
 }
 	
 bool 
-TeMultiGeometry::getGeometry(TeCellSet& result)
+TeMultiGeometry::getGeometry(TeCellSet& result) const
 {
 	if(!hasCells())
 		return false;
 	result.copyElements(cells_);
 	return true;
 }
+
+bool 
+TeMultiGeometry::getGeometry(TeTextSet& result) const
+{
+	if(!hasTexts())
+		return false;
+	result.copyElements(texts_);
+	return true;
+}
 	
 bool 
-TeMultiGeometry::getGeometry(vector<TeGeometry*>& result) 
+TeMultiGeometry::getGeometry(vector<TeGeometry*>& result)  
 {
 	bool status = false;
 	if(hasPolygons())
@@ -131,6 +142,36 @@ TeMultiGeometry::getGeometry(vector<TeGeometry*>& result)
 }
 
 void 
+TeMultiGeometry::setGeometry(const TePolygonSet& result) 
+{ 
+	polygons_ = result;
+}
+	
+void 
+TeMultiGeometry::setGeometry(const TeLineSet& result)     
+{ 
+	lines_ = result; 
+}
+	
+void 
+TeMultiGeometry::setGeometry(const TePointSet& result)	
+{ 
+	points_ = result; 
+}
+	
+void 
+TeMultiGeometry::setGeometry(const TeCellSet& result)		
+{ 
+	cells_ = result; 
+}
+	
+void 
+TeMultiGeometry::setGeometry(const TeTextSet& result)		
+{ 
+	texts_ = result; 
+}
+
+void 
 TeMultiGeometry::setGeometry(vector<TeGeometry*>& result)
 {
 	this->clear();
@@ -156,10 +197,46 @@ TeMultiGeometry::setGeometry(vector<TeGeometry*>& result)
 			cells_.add (*((TeCell*)geom));
 		else if(dynamic_cast<TeCellSet*> (geom))
 			cells_ = *((TeCellSet*)geom);
-
+		else if(dynamic_cast<TeText*> (geom))
+			texts_.add (*((TeText*)geom));
 		++it;
 	}
 }
+	
+void 
+TeMultiGeometry::addGeometry(const TePolygon& poly)  
+{ 
+	polygons_.add(poly); 
+	polygons_.objectId(poly.objectId()); 
+}
+	
+void 
+TeMultiGeometry::addGeometry(const TeLine2D& line)     
+{ 
+	lines_.add(line); 
+	lines_.objectId(line.objectId()); 
+}
+	
+void 
+TeMultiGeometry::addGeometry(const TePoint& point)	
+{ 
+	points_.add(point); 
+	points_.objectId(point.objectId()); 
+} 
+	
+void 
+TeMultiGeometry::addGeometry(const TeCell& cell)		
+{ 
+	cells_.add(cell); 
+	cells_.objectId(cell.objectId()); 
+}
+
+void 
+TeMultiGeometry::addGeometry(const TeText& text)		
+{ 
+	texts_.add(text); 
+	texts_.objectId(text.objectId()); 
+}
 
 void 
 TeMultiGeometry::clear()
@@ -168,4 +245,23 @@ TeMultiGeometry::clear()
 	lines_.clear ();
 	points_.clear ();
 	cells_.clear ();
+	texts_.clear();
 }
+
+TeBox 
+TeMultiGeometry::getBox()
+{
+	TeBox box;
+	if (hasPolygons())
+		updateBox(box,polygons_.box());
+	if (hasLines())
+		updateBox(box,lines_.box());
+	if (hasPoints())
+		updateBox(box,points_.box());
+	if (hasCells())
+		updateBox(box,cells_.box());
+	if (hasTexts())
+		updateBox(box,texts_.box());
+	return box;
+}
+
diff --git a/src/terralib/kernel/TeMultiGeometry.h b/src/terralib/kernel/TeMultiGeometry.h
old mode 100644
new mode 100755
index 98ef0de..e57b0df
--- a/src/terralib/kernel/TeMultiGeometry.h
+++ b/src/terralib/kernel/TeMultiGeometry.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,10 +20,8 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeMultiGeometry.h
-    This file contains structures and definitions to deal with a multigeometry. 
-	A multigeometry can have polygons, lines, points or cells. 
+    \brief This file contains structures and definitions to deal with a multigeometry. 
 */
 
 #ifndef  __TERRALIB_MULTIGEOMETRY_H
@@ -32,7 +30,7 @@ of this library and its documentation.
 #include "TeGeometry.h"
 
 
-class TeMultiGeometry
+class TL_DLL TeMultiGeometry
 {
 
 public:
@@ -40,6 +38,7 @@ public:
 	TeLineSet			lines_;
 	TePointSet			points_;
 	TeCellSet			cells_;
+	TeTextSet			texts_;
 	
 	//! Constructor
 	TeMultiGeometry() {};
@@ -50,97 +49,113 @@ public:
 	//! Assignment operator
 	TeMultiGeometry& operator= (const TeMultiGeometry& other);
 	
-	//! Get polygon geometries. Return true if the geometries exit.  
-	bool getGeometry(TePolygonSet& result); 
+	//! Get a copy of polygon geometries. Return true if the geometries exit.  
+	bool getGeometry(TePolygonSet& result) const; 
 	
-	//! Get line geometries. Return true if the geometries exit.  
-	bool getGeometry(TeLineSet& result);
+	//! Get a copy of line geometries. Return true if the geometries exit.  
+	bool getGeometry(TeLineSet& result) const;
 	
-	//! Get point geometries. Return true if the geometries exit.  
-	bool getGeometry(TePointSet& result);
+	//! Get a copy of point geometries. Return true if the geometries exit.  
+	bool getGeometry(TePointSet& result) const;
 	
-	//! Get cell geometries. Return true if the geometries exit.  
-	bool getGeometry(TeCellSet& result);
+	//! Get a copy of cell geometries. Return true if the geometries exit.  
+	bool getGeometry(TeCellSet& result) const;
+
+	//! Get a copy of text geometries. Return true if the geometries exit.  
+	bool getGeometry(TeTextSet& result) const;
 	
 	//! Get a reference to the polygon geometry container  
-	TePolygonSet&  getPolygons()
+	TePolygonSet&  getPolygons() 
 	{	return polygons_; }
 	
 	//! Get a reference to the line geometry container  
-	TeLineSet&  getLines()
+	TeLineSet&  getLines() 
 	{	return lines_; }
 
 	//! Get a reference to the point geometry container  
-	TePointSet&  getPoints()
+	TePointSet&  getPoints() 
 	{	return points_; }
 
 	//! Get a reference to the cell geometry container  
-	TeCellSet&  getCells()
+	TeCellSet&  getCells() 
 	{	return cells_; }
 
+	//! Get a reference to the text geometry container  
+	TeTextSet&  getTexts() 
+	{	return texts_; }
+
 	//! Get all geometries. Return true if the geometries exit.  
 	bool getGeometry(vector<TeGeometry*>& result);
 
 	//! Set polygon geometries
-	void setGeometry(const TePolygonSet& result)  
-	{ polygons_ = result; }
+	void setGeometry(const TePolygonSet& result);
 	
 	//! Set line geometries
-	void setGeometry(const TeLineSet& result)     
-	{ lines_ = result; }
+	void setGeometry(const TeLineSet& result);
 	
 	//! Set point geometries
-	void setGeometry(const TePointSet& result)	
-	{ points_ = result; } 
+	void setGeometry(const TePointSet& result);
 	
 	//! Set cell geometries
-	void setGeometry(const TeCellSet& result)		
-	{ cells_ = result; }
+	void setGeometry(const TeCellSet& result);
+	
+	//! Set text geometries
+	void setGeometry(const TeTextSet& result); 
 	
 	//! Set all geometries
 	void setGeometry(vector<TeGeometry*>& result); 
 
 	//! Add polygon geometry 
-	void addGeometry(const TePolygon& poly)  
-	{ polygons_.add(poly); polygons_.objectId(poly.objectId()); }
+	void addGeometry(const TePolygon& poly); 
 	
 	//! Add line geometry
-	void addGeometry(const TeLine2D& line)     
-	{ lines_.add(line); lines_.objectId(line.objectId()); }
+	void addGeometry(const TeLine2D& line); 
 	
 	//! Add point geometry
-	void addGeometry(const TePoint& point)	
-	{ points_.add(point); points_.objectId(point.objectId()); } 
+	void addGeometry(const TePoint& point); 
 	
 	//! Add cell geometry
-	void addGeometry(const TeCell& cell)		
-	{ cells_.add(cell); cells_.objectId(cell.objectId()); }
+	void addGeometry(const TeCell& cell); 
+
+	//! Add cell geometry
+	void addGeometry(const TeText& text); 
 
 	//! Return true if this has polygons 
-	bool hasPolygons()	
+	bool hasPolygons()	const
 	{ return (!polygons_.empty()); } 
 	
 	//! Return true if this has lines 
-	bool hasLines()		
+	bool hasLines() const		
 	{ return (!lines_.empty()); } 
 	
 	//! Return true if this has points 
-	bool hasPoints()		
+	bool hasPoints() const		
 	{ return (!points_.empty()); } 
 	
 	//! Return true if this has cells 
-	bool hasCells()		
+	bool hasCells()	const
 	{ return (!cells_.empty()); } 
 	
+	//! Return true if this has cells 
+	bool hasTexts()	const	
+	{ return (!texts_.empty()); } 
+	
 	//! Return true if there are not any geometry  
 	bool empty()  
 	{ 
 		return ( polygons_.empty() &&  lines_.empty() &&
-				 points_.empty()   &&  cells_.empty() );
+				 points_.empty()   &&  cells_.empty() &&  texts_.empty());
 	}
 
 	//! Clear geometries
 	void clear();
+
+	//! Get the total extension of the multi-geometry
+	TeBox getBox();
+
+	//! Get the total extension of the multi-geometry
+	TeBox box()
+	{ return this->getBox(); } 
 };
 
 #endif 
diff --git a/src/terralib/kernel/TeMutex.cpp b/src/terralib/kernel/TeMutex.cpp
new file mode 100755
index 0000000..06b54c9
--- /dev/null
+++ b/src/terralib/kernel/TeMutex.cpp
@@ -0,0 +1,59 @@
+#include "TeMutex.h"
+
+#if TePLATFORM == TePLATFORMCODE_MSWINDOWS
+
+  #include  <stdio.h>
+
+#elif TePLATFORM == TePLATFORMCODE_LINUX || TePLATFORM == TePLATFORMCODE_AIX
+    
+#else
+    #error "Unsuported plataform"
+#endif   
+
+TeMutex::TeMutex()
+{
+  #if TePLATFORM == TePLATFORMCODE_MSWINDOWS
+  
+    m_sa_.nLength = sizeof( m_sa_ );
+    m_sa_.lpSecurityDescriptor = NULL;
+    m_sa_.bInheritHandle = TRUE;
+
+    m_access_ = ::CreateMutex( &m_sa_, false, 0 );
+
+    TEAGN_TRUE_OR_THROW( ( m_access_ != 0 ),
+      "Unable to create mutex object instance" )
+  
+  #elif TePLATFORM == TePLATFORMCODE_LINUX || TePLATFORM == TePLATFORMCODE_AIX
+  
+    pthread_mutexattr_t access_attr;
+    TEAGN_TRUE_OR_THROW( ( pthread_mutexattr_init( &access_attr ) == 0 ),
+      "Unable to init mutex attributes" );
+
+    pthread_mutexattr_settype( &access_attr, PTHREAD_MUTEX_DEFAULT );
+    TEAGN_TRUE_OR_THROW( 
+      ( pthread_mutex_init( &m_access_, &access_attr ) == 0 ),
+      "Unable to init mutex" )
+  
+  #else
+    #error "Unsuported plataform"
+  #endif   
+}
+
+
+TeMutex::~TeMutex()
+{
+  unLock();
+  
+  #if TePLATFORM == TePLATFORMCODE_MSWINDOWS
+  
+    ::CloseHandle( m_access_ );
+  
+  #elif TePLATFORM == TePLATFORMCODE_LINUX || TePLATFORM == TePLATFORMCODE_AIX
+  
+    pthread_mutex_destroy( &m_access_ );
+  
+  #else
+    #error "Unsuported plataform"
+  #endif   
+}
+
diff --git a/src/terralib/kernel/TeMutex.h b/src/terralib/kernel/TeMutex.h
new file mode 100755
index 0000000..b367c63
--- /dev/null
+++ b/src/terralib/kernel/TeMutex.h
@@ -0,0 +1,179 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeMutex.h
+  \brief This file contains definitions about a class to deal with critical 
+  region locking.
+*/
+
+
+#ifndef TEMUTEX_H
+  #define TEMUTEX_H
+  
+  #include "TeAgnostic.h"
+  #include "TeDefines.h"
+  
+  #if TePLATFORM == TePLATFORMCODE_MSWINDOWS
+    #include <windows.h>
+  #elif TePLATFORM == TePLATFORMCODE_LINUX || TePLATFORM == TePLATFORMCODE_AIX
+    #include <pthread.h>
+    #include <errno.h>
+  #else
+    #error "ERROR: Unsupported platform"
+  #endif  
+ 
+  /**
+   * @brief A class to deal with critical region locking.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   */
+  class TL_DLL TeMutex
+  {
+    public :
+    
+      /**
+       * @brief Default constructor.
+       */    
+      TeMutex();
+
+      /**
+       * @brief Default destructor.
+       */       
+      ~TeMutex();
+      
+      /**
+       * @brief Lock the current object instance.
+       * @note If section is already busy then the current thread will be 
+       * blocked until it's ready again.
+       */       
+      inline void lock()
+      {
+        #if TePLATFORM == TePLATFORMCODE_MSWINDOWS
+        
+          DWORD return_value = 0;
+          return_value = ::WaitForSingleObject( m_access_, INFINITE );
+          TEAGN_DEBUG_CONDITION( ( ( return_value == WAIT_ABANDONED ) ||
+            ( return_value == WAIT_OBJECT_0 ) ),
+            "Unable to get mutex lock" );
+        
+        #elif TePLATFORM == TePLATFORMCODE_LINUX || TePLATFORM == TePLATFORMCODE_AIX
+        
+          pthread_mutex_lock( &m_access_ );
+        
+        #else
+          #error "Unsuported plataform"
+        #endif  
+      };      
+      
+      /**
+       * @brief Try to lock the current object instance.
+       * @return true if OK, false if unable to lock.
+       * @note If section is busy, this method will return false 
+       * without blocking the current thread.
+       */       
+      inline bool tryLock()
+      {
+        #if TePLATFORM == TePLATFORMCODE_MSWINDOWS
+        
+          DWORD return_value = ::WaitForSingleObject( m_access_, 
+            10 );
+
+          if( ( return_value == WAIT_OBJECT_0 ) ||
+            ( return_value == WAIT_ABANDONED ) ) {
+
+            return true;
+          } else {
+            return false;
+          }
+        
+        #elif TePLATFORM == TePLATFORMCODE_LINUX || TePLATFORM == TePLATFORMCODE_AIX
+        
+          if( pthread_mutex_trylock( &m_access_ ) == EBUSY ) {
+            return false;
+          } else {
+            return true;
+          }
+        
+        #else
+          #error "Unsuported plataform"
+        #endif  
+      };      
+      
+      /**
+       * @brief Unlock the current object instance.
+       */       
+      inline void unLock()
+      {
+        #if TePLATFORM == TePLATFORMCODE_MSWINDOWS
+        
+          ::ReleaseMutex( m_access_ );
+        
+        #elif TePLATFORM == TePLATFORMCODE_LINUX || TePLATFORM == TePLATFORMCODE_AIX
+        
+          pthread_mutex_unlock( &m_access_ );
+        
+        #else
+          #error "Unsuported plataform"
+        #endif 
+      };      
+            
+    protected :
+   
+      #if TePLATFORM == TePLATFORMCODE_MSWINDOWS
+    
+        /**
+        * @brief The mutex instance.
+        */      
+        HANDLE m_access_;
+        
+        /**
+        * @brief The mutex instance attributes.
+        */           
+        SECURITY_ATTRIBUTES m_sa_;
+      
+      #elif TePLATFORM == TePLATFORMCODE_LINUX || TePLATFORM == TePLATFORMCODE_AIX
+      
+        /**
+        * @brief The mutex instance.
+        */        
+        pthread_mutex_t m_access_;
+      
+      #else
+        #error "Unsuported plataform"
+      #endif   
+   
+    private :
+    
+      /**
+       * Alternative constructor.
+       */    
+      TeMutex(  const TeMutex& ) {};
+    
+   
+      /**
+       * operator= overload.
+       * @return A const reference to the current instance.
+       */      
+      const TeMutex& operator=( const TeMutex& ) { return *this; };
+ 
+  };
+
+#endif
diff --git a/src/terralib/kernel/TeNeighbours.cpp b/src/terralib/kernel/TeNeighbours.cpp
old mode 100644
new mode 100755
index 8ac1b49..29cf63a
--- a/src/terralib/kernel/TeNeighbours.cpp
+++ b/src/terralib/kernel/TeNeighbours.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
diff --git a/src/terralib/kernel/TeNeighbours.h b/src/terralib/kernel/TeNeighbours.h
old mode 100644
new mode 100755
index 47f2f9c..0f52c25
--- a/src/terralib/kernel/TeNeighbours.h
+++ b/src/terralib/kernel/TeNeighbours.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,9 +20,8 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeNeighbours.h
-    This file contains structures and definitions about neighborhood 
+    \brief This file contains structures and definitions about neighborhood 
 */
 
 #ifndef  __TERRALIB_INTERNAL_NEGHBOURS_H
@@ -38,7 +37,7 @@ using namespace std;
 
 
 //! Attributes associated with each neighborhood of a proximity matrix  
-class TeProxMatrixAttributes  
+class TL_DLL TeProxMatrixAttributes  
 {
 	private:
 		double	_weight;
@@ -54,6 +53,17 @@ class TeProxMatrixAttributes
 		
 		//! Empty constructor 
 		TeProxMatrixAttributes(); 
+
+		//! Constructor 
+		TeProxMatrixAttributes(const double& w, const int& slice, const int& order, 
+			const double& cent_dist, const double& border_length, 
+			const double& net_distance, const double& net_minimun_path): 
+				_weight(w), _slice(slice), 
+				_order(order), _centroid_distance(cent_dist), 
+                _borders_length(border_length), 
+                _net_objects_distance(net_distance), 
+                _net_minimum_path(net_minimun_path)
+		{}
 		
 		//! Copy constuctor 
 		TeProxMatrixAttributes (const TeProxMatrixAttributes& att); 
@@ -130,7 +140,7 @@ typedef map<string, TeProxMatrixAttributes> TeNeighboursMap;
 
 
 //! A class to representate the neighbours of a object 
-class TeNeighbours  
+class TL_DLL TeNeighbours  
 {
 private:
 	typedef pair<string, TeProxMatrixAttributes>	neigh_values;
@@ -177,9 +187,6 @@ public:
 	//! Return the complete set of connection attributes (corresponding to the ith neighbour), packed in a TeProxMatrixAttributes object.
 	TeProxMatrixAttributes Attributes (int n);
 	
-	//! Return the complete set of connection attributes, given the neighbour object_id, packed in a TeProxMatrixAttributes object.
-	TeProxMatrixAttributes Attributes (const string& object_id);
-
 	//! Insert a new neighbour
 	bool Insert (const string& object_id, const TeProxMatrixAttributes& attr);
 
diff --git a/src/terralib/kernel/TeNetwork.cpp b/src/terralib/kernel/TeNetwork.cpp
old mode 100644
new mode 100755
index c03435a..272174e
--- a/src/terralib/kernel/TeNetwork.cpp
+++ b/src/terralib/kernel/TeNetwork.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
diff --git a/src/terralib/kernel/TeNetwork.h b/src/terralib/kernel/TeNetwork.h
old mode 100644
new mode 100755
index df05347..a435673
--- a/src/terralib/kernel/TeNetwork.h
+++ b/src/terralib/kernel/TeNetwork.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,9 +20,8 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
-/*! \file TeNetwork2.h
-    This file defines class for handling networks in Terralib
+/*! \file TeNetwork.h
+    \brief This file defines class for handling networks in Terralib
 */
 #ifndef TeNetwork_H
 #define TeNetwork_H
@@ -34,7 +33,7 @@ class TeSTElementSet;
 
 
 //! class for handling networks
-class TeGraphNetwork
+class TL_DLL TeGraphNetwork
 {
 protected:
 	//! Set of nodes and the cost of each edge
@@ -111,7 +110,7 @@ public:
 
 
 //! class for handling networks
-class TeNetwork
+class TL_DLL TeNetwork
 {
 private:
 	//! Set of nodes and the cost of each edge
@@ -158,7 +157,4 @@ public:
 
 };
 
-
-
-
 #endif 
diff --git a/src/terralib/kernel/TeOverlay.cpp b/src/terralib/kernel/TeOverlay.cpp
old mode 100644
new mode 100755
index 3d449af..762a673
--- a/src/terralib/kernel/TeOverlay.cpp
+++ b/src/terralib/kernel/TeOverlay.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -21,875 +21,743 @@ indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
 
+// TerraLib's include
 #include "TeOverlay.h"
+#include "TeOverlayUtils.h"
 #include "TeIntersector.h"
 #include "TeGeometryAlgorithms.h"
 #include "TeFragmentation.h"
+#include "TeRTree.h"
 
-#include <map>
-#include <vector>
-#include <algorithm>
+//---------------- Overlay operations ----------------//
 
-using namespace std;
+// Operacao de uniao otimizada: consome memoria!
+bool TeOVERLAY::TeUnion(TePolygonSet& polsIn, TePolygonSet& polsOut, const bool& makeCopy, const bool fixOrientation)
+{
+// limpa a lista de saida
+	polsOut.clear();
 
+// verifica se e necessario realizar uma copia dos pol�gonos
+	TePolygonSet polygonSetIn;
 
-//---------------- Auxiliary structure ----------------//
-struct xyOrder
-{
-	bool operator()(const TeCoord2D& c1, const TeCoord2D& c2) const
+	if(makeCopy)
 	{
-		if(TeGeometryAlgorithmsPrecision::IsGreater(c2.x_, c1.x_))
-			return true;
-
-		if(TeGeometryAlgorithmsPrecision::IsGreater(c1.x_, c2.x_))
+		if(!TeOVERLAY::TeClonePolygonSet(polsIn, polygonSetIn))
 			return false;
+        //polygonSetIn.copyElements(polsIn);
+	}
+	else
+	{
+		polygonSetIn = polsIn;
+	}
 
-		if(TeGeometryAlgorithmsPrecision::IsGreater(c2.y_, c1.y_))
-			return true;		
-
+	if(polygonSetIn.empty())
 		return false;
+
+	if(polygonSetIn.size() == 1)
+	{
+		polsOut.copyElements(polygonSetIn);
+
+		return true;
 	}
-};
 
-typedef multimap<TeCoord2D, pair<unsigned int, TeLine2D>, xyOrder> TeLineIndex;
+// verifica a orientacao de cada linha se necessario: aneis externos devem estar no sentido horario e os internos devem estar no sentido anti-horario
+	if(fixOrientation)
+		TeFixOrientation(polygonSetIn, TeCOUNTERCLOCKWISE, TeCLOCKWISE);
 
+// cria uma arvore que indexara os segmentos de cada linha e
+// chama uma rotina que calcula os pontos de intersecao e ja indexa os segmentos
+	TeINTERSECTOR2::TeSegmentRTree segmentTree(polygonSetIn.box());
 
+	TeINTERSECTOR2::TeVectorBoundaryIP report;
 
-inline void TeRemoveDuplicatedSegments(TeLine2D& l)
-{
-	bool hasDuplicated = false;
+	TeINTERSECTOR2::TeIntersection(polygonSetIn, segmentTree, report);
 
-	for(unsigned int i = 1; i < l.size() - 1; ++i)
-		if(TeEquals(l[i - 1], l[i + 1]))
-		{
-			l.erase(i + 1);
-			hasDuplicated = true;
-		}
+// fragmenta as linhas
+	TeLineSet fragments;
+	TeLineSet boundaryFragments;
+	vector<pair<unsigned int, unsigned int> > fragmentsIds;
+	vector<pair<unsigned int, unsigned int> > boundaryFragmentsIds;
 
-	if(hasDuplicated)
-		TeRemoveDuplicatedCoordinates(l);
+	TeFragmentBoundary(polygonSetIn, report, boundaryFragments, boundaryFragmentsIds, fragments, fragmentsIds);
 
-	return;
-}
+	report.clear();
 
-void TeClonePolygonSet(const TePolygonSet& pSetIn, TePolygonSet& pSetOut)
-{
-	for(unsigned int i = 0; i < pSetIn.size(); ++i)
+	short mask  = TeUNKNOWNPOSITION;
+
+// os fragmentos de fronteira ja sao separados
+	TeLineIndex boundaryFragmentsIndex;
+	unsigned int i;
+	if(boundaryFragments.size())
 	{
-		TePolygon p;
-		for(unsigned int j = 0; j < pSetIn[i].size(); ++j)
-		{
-			TeLine2D l;
+		mask = TeBOUNDARY;
 
-			for(unsigned int k = 0; k < pSetIn[i][j].size(); ++k)
-				l.add(pSetIn[i][j][k]);
+		unsigned int boundaryFragmentsSize = boundaryFragments.size();
 
-			TeRemoveDuplicatedCoordinates(l);
+		for(i = 0; i < boundaryFragmentsSize; ++i)
+			boundaryFragmentsIndex.insert(TeLineIndex::value_type(boundaryFragments[i][0], pair<unsigned int, TeLine2D>(i, boundaryFragments[i])));
+	}
 
-			TeRemoveDuplicatedSegments(l);
+// escolhe os fragmentos que estiverem localizados dentro de cada pol�gono
+	short locationFragments  = TeOUTSIDE;	
 
-			TeLinearRing r(l);
+	TeLineIndex fragmentsIndex;
 
-			p.add(r);		
-		}
+	vector<TeLinearRing> rings;
 
-		pSetOut.add(p);
-	}
-}
+	TeRtreeGetFragments(polygonSetIn, segmentTree, fragments, fragmentsIds, locationFragments, mask, fragmentsIndex, rings);
 
-void TeCloneLineSet(const TeLineSet& lSetIn, TeLineSet& lSetOut)
-{
-	for(unsigned int i = 0; i < lSetIn.size(); ++i)
-	{
-		TeLine2D l;
+	// Tenta eliminar fragmentos de fronteira no mesmo sentido, deixando apenas um nesta direcao
+	TeRemoveSameBoundaryFragments(boundaryFragmentsIndex);
 
-		for(unsigned int j = 0; j < lSetIn[i].size(); ++j)
-			l.add(lSetIn[i][j]);
+	// Tenta eliminar fragmentos sobre fronteira opostos
+	TeRemoveOpositeBoundaryFragments(boundaryFragmentsIndex);
 
-		TeRemoveDuplicatedCoordinates(l);
+	//--remover do boundaryfragments os fragmentos removidos do boundaryFragmentsIndex
+	TeRtreeRemoveFragments(polygonSetIn, segmentTree, boundaryFragmentsIndex, boundaryFragmentsIds, TeINSIDE, mask, rings);
+	segmentTree.clear();
 
-		lSetOut.add(l);
-	}
-}
+// Faz um merge dos fragmentos de fronteira para o �ndice de fragmentos normal
+	TeJoinFragments(fragmentsIndex, boundaryFragmentsIndex);
 
+// monta os poligonos a partir dos fragmentos
+	bool returnValue = TeMergeFragments(fragmentsIndex, rings, true);
 
-// Verifica qual opera��o a realizar e j� coloca as fronteiras dos pol�gonos na ordem correta e caso n�o seja necess�rio opera��o, ele j� retorna o resultado
-TePolygonSet TeChooseOperation(const short& operation, TePolygonSet& redPols, TePolygonSet& bluePols, short& locationRedFragments, short& locationBlueFragments)
-{
-	TePolygonSet result;
+	vector<TeLinearRing> ringsOut;
 
-	unsigned int i = 0;
+	bool resultSplit = true;
 
-	switch(operation)
-	{							
-		// Intersection gets all fragments from red polygon wich are
-		// inside the blue polygon and the blue fragments that are inside
-		// the red polygon.
-		case TeINTERSECTION:  if(TeDisjoint(redPols.box(), bluePols.box()))
-								  return result;
-
-							  // Need to reverse orientation
-							  for(i = 0; i < bluePols.size(); ++i)
-							  {
-								  if(TeOrientation(bluePols[i][0]) == TeCOUNTERCLOCKWISE)
-									  reverse(bluePols[i][0].begin(), bluePols[i][0].end());
-
-								  for(unsigned int j = 1; j < bluePols[i].size(); ++j)
-								  {
-									  if(TeOrientation(bluePols[i][j]) == TeCLOCKWISE)
-										  reverse(bluePols[i][j].begin(), bluePols[i][j].end());
-								  }
-							  }
-
-							  // Need to reverse orientation
-							  for(i = 0; i < redPols.size(); ++i)
-							  {
-								  if(TeOrientation(redPols[i][0]) == TeCOUNTERCLOCKWISE)
-									  reverse(redPols[i][0].begin(), redPols[i][0].end());
-
-								  for(unsigned int j = 1; j < redPols[i].size(); ++j)
-								  {
-									  if(TeOrientation(redPols[i][j]) == TeCLOCKWISE)
-										  reverse(redPols[i][j].begin(), redPols[i][j].end());
-								  }
-							  }
-			
-			                  locationRedFragments  = TeINSIDE;
-			                  locationBlueFragments = TeINSIDE;
-
-							  break;
-
-		// Union gets all fragments from red polygon wich are
-		// outside the blue polygon and the blue fragments that are outside
-		// the red polygon.
-		case TeUNION:         if(TeDisjoint(redPols.box(), bluePols.box()))
-							  {
-								  result = redPols;
-
-								  for(i = 0; i < bluePols.size(); ++i)
-									  result.add(bluePols[i]);
-
-								  return result;
-							  }
-
-							  // Need to reverse orientation
-							  for(i = 0; i < bluePols.size(); ++i)
-							  {
-								  if(TeOrientation(bluePols[i][0]) == TeCOUNTERCLOCKWISE)
-									  reverse(bluePols[i][0].begin(), bluePols[i][0].end());
-
-								  for(unsigned int j = 1; j < bluePols[i].size(); ++j)
-								  {
-									  if(TeOrientation(bluePols[i][j]) == TeCLOCKWISE)
-										  reverse(bluePols[i][j].begin(), bluePols[i][j].end());
-								  }
-							  }
-
-							  // Need to reverse orientation
-							  for(i = 0; i < redPols.size(); ++i)
-							  {
-								  if(TeOrientation(redPols[i][0]) == TeCOUNTERCLOCKWISE)
-									  reverse(redPols[i][0].begin(), redPols[i][0].end());
-
-								  for(unsigned int j = 1; j < redPols[i].size(); ++j)
-								  {
-									  if(TeOrientation(redPols[i][j]) == TeCLOCKWISE)
-										  reverse(redPols[i][j].begin(), redPols[i][j].end());
-								  }
-							  }
-
-							  locationRedFragments  = TeOUTSIDE;
-			                  locationBlueFragments = TeOUTSIDE;
-
-							  break;
-
-		// Difference gets all fragments from red polygon wich are
-		// outside the blue polygon and the blue fragments that are inside
-		// the red polygon.
-		case TeDIFFERENCE:	  if(TeDisjoint(redPols.box(), bluePols.box()))
-								return redPols;
-			
-						      locationRedFragments  = TeOUTSIDE;
-			                  locationBlueFragments = TeINSIDE;
-
-							  // Need to reverse orientation
-							  for(i = 0; i < bluePols.size(); ++i)
-							  {
-								  if(TeOrientation(bluePols[i][0]) == TeCLOCKWISE)
-									  reverse(bluePols[i][0].begin(), bluePols[i][0].end());
-
-								  for(unsigned int j = 1; j < bluePols[i].size(); ++j)
-								  {
-									  if(TeOrientation(bluePols[i][j]) == TeCOUNTERCLOCKWISE)
-										  reverse(bluePols[i][j].begin(), bluePols[i][j].end());
-								  }
-							  }
-
-							  // Need to reverse orientation
-							  for(i = 0; i < redPols.size(); ++i)
-							  {
-								  if(TeOrientation(redPols[i][0]) == TeCOUNTERCLOCKWISE)
-									  reverse(redPols[i][0].begin(), redPols[i][0].end());
-
-								  for(unsigned int j = 1; j < redPols[i].size(); ++j)
-								  {
-									  if(TeOrientation(redPols[i][j]) == TeCLOCKWISE)
-										  reverse(redPols[i][j].begin(), redPols[i][j].end());
-								  }
-							  }							  
-
-		                      break;
+	if(TeOVERLAY::TeSplitRings(rings, ringsOut) == false)
+	{
+		ringsOut.clear();
+
+		ringsOut = rings;
+
+		resultSplit = false;
 	}
 
-	return result;
-}
+// separate holes from islands
+	vector<TeLinearRing> holes;
 
-TeMultiGeometry TeChooseOperation(const short& operation, TeLineSet& redLines, TePolygonSet& bluePols, short& locationRedFragments)
-{
-	TeMultiGeometry result;
+	bool result = TeClassifyRings(ringsOut, polsOut, holes);
 
-	switch(operation)
-	{							
-		// Intersection gets all fragments from red polygon wich are
-		// inside the blue polygon and the blue fragments that are inside
-		// the red polygon.
-		case TeINTERSECTION:  if(TeDisjoint(redLines.box(), bluePols.box()))
-								  return result;
-			
-			                  locationRedFragments  = TeINSIDE;
-							  break;
-
-		// Union gets all fragments from red polygon wich are
-		// outside the blue polygon and the blue fragments that are outside
-		// the red polygon.
-		case TeUNION:         if(TeDisjoint(redLines.box(), bluePols.box()))
-							  {
-								  result.setGeometry(redLines);
-								  result.setGeometry(bluePols);
-
-								  return result;
-							  }
-
-							  locationRedFragments  = TeOUTSIDE;
-
-							  break;
-
-		// Difference gets all fragments from red polygon wich are
-		// outside the blue polygon and the blue fragments that are inside
-		// the red polygon.
-		case TeDIFFERENCE:	  if(TeDisjoint(redLines.box(), bluePols.box()))
-							  {
-								  result.setGeometry(redLines);
-								  return result;
-							  }
-			
-						      locationRedFragments  = TeOUTSIDE;
-
-		                      break;
+// mount topology		
+	if((polsOut.size() == 0) && (holes.size() == 0))
+	{
+		return false;	// Na uniao deve haver a formacao de poligonos	
 	}
+	
+	bool mountResult = TeMountTopology(polsOut, holes);
+
+	return (returnValue && result &&  mountResult && resultSplit);
+}
 
-	return result;
-} 
 
-void TeRemoveOpositeBoundaryFragments(TeLineIndex& redFragmentsIndex, TeLineIndex& blueFragmentsIndex)
+// Operacao geral de conjunto: uniao, intersecao e diferenca
+bool TeOverlay(TePolygonSet& redPols, vector<TePolygonSet>& bluePols, vector<TePolygonSet>& vecPolsOut, vector<bool>& resultVec, const short& operation, const bool& makeCopy, const bool fixOrientation)
 {
-	TeLineIndex::iterator indexIterator = blueFragmentsIndex.begin();
-	
-	while(indexIterator != blueFragmentsIndex.end())
-	{
-		TeLineIndex::iterator idx = redFragmentsIndex.find(indexIterator->second.second[(indexIterator->second.second.size() - 1u)]);
+// limpa a saida
+	vecPolsOut.clear();
+	resultVec.clear();
 
-		if(idx != redFragmentsIndex.end())
+// verifica se a lista dos poligonos vermelhos esta vazia
+	unsigned int numBluePols = bluePols.size();
+	unsigned int i;
+
+	if(redPols.empty())
+	{
+// se os poligonos vermelhos nao foram informados, no caso da uniao tenta copiar os azuis para o vetor de saida
+		if(operation == TeUNION)
 		{
-			if(TeEquals(idx->second.second[idx->second.second.size() - 1u], indexIterator->second.second[0u]))
+			for(i = 0; i < numBluePols; ++i)
 			{
-				redFragmentsIndex.erase(idx);
+				TePolygonSet bluePolsInAux;
+
+				if(!TeOVERLAY::TeClonePolygonSet(bluePols[i], bluePolsInAux))
+					return false;
 
-				TeLineIndex::iterator idxAux;
-				idxAux = indexIterator;
-				++indexIterator;
-				blueFragmentsIndex.erase(idxAux);
+				//bluePolsInAux.copyElements(bluePols[i]);
 
-				continue;
+// se nao existir tambem o poligono azul, entao retirn falso
+                vecPolsOut.push_back(bluePolsInAux);
+				resultVec.push_back	(true);
 			}
 
-		}
-					
+			if(vecPolsOut.empty())
+				return false;
 
-		++indexIterator;
+			return true;
+		}
+		
+// TeDIFFERENCE ou TeINTERSECTION: resultado eh vazio, logo ja retorna true
+		return true;
 	}
-}
 
-void TeRemoveSameBoundaryFragments(TeLineIndex& redFragmentsIndex, TeLineIndex& blueFragmentsIndex)
-{
-	TeLineIndex::iterator indexIterator = blueFragmentsIndex.begin();
-	
-	while(indexIterator != blueFragmentsIndex.end())
+
+// Defines location to choose fragments
+	short locationRedFragments  = TeINSIDE;	
+	short locationBlueFragments  = TeINSIDE;
+
+	TeOVERLAY::TeChooseBoundaryLocation(operation, locationRedFragments, locationBlueFragments);
+
+// verifica se e necessario realizar uma copia dos poligonos
+	TePolygonSet redPolsIn;
+	vector<TePolygonSet> bluePolsIn;
+
+	if(makeCopy)
 	{
-		TeLineIndex::iterator idx = redFragmentsIndex.find(indexIterator->second.second[0u]);
+		if(!TeOVERLAY::TeClonePolygonSet(redPols, redPolsIn))
+			return false;
 
-		if(idx != redFragmentsIndex.end())
+		//redPolsIn.copyElements(redPols);
+		
+		for(i = 0; i < numBluePols; ++i)
 		{
-			if(TeEquals(idx->second.second[idx->second.second.size() - 1u], indexIterator->second.second[(indexIterator->second.second.size() - 1u)]))
-			{
-				redFragmentsIndex.erase(idx);
-				continue;
-			}
+			TePolygonSet bluePolsInAux;
 
-		}					
+			if(!TeOVERLAY::TeClonePolygonSet(bluePols[i], bluePolsInAux))
+				return false;
 
-		++indexIterator;
-	}
-}
+			//bluePolsInAux.copyElements(bluePols[i]);
 
-void TeMergeFragments(TeLineIndex& fragmentsIndex, TeLineIndex& boundaryFragmentsIndex)
-{
-	TeLineIndex::iterator indexIterator = boundaryFragmentsIndex.begin();
-
-	while(indexIterator != boundaryFragmentsIndex.end())
+			bluePolsIn.push_back(bluePolsInAux);
+		}
+	}
+	else
 	{
-		fragmentsIndex.insert(*indexIterator);
-		++indexIterator;
+		redPolsIn = redPols;
+		
+		bluePolsIn = bluePols;
 	}
 
-	boundaryFragmentsIndex.clear();	
-}
 
-void TeFindAndMoveClosedRings(TeLineIndex& fragmentsIndex, vector<TeLinearRing>& rings)
-{
-	TeLineIndex::iterator indexIterator = fragmentsIndex.begin();
-
-	while(indexIterator != fragmentsIndex.end())
-	{
-		if(indexIterator->second.second.isRing())
+// verifica a orientacao de cada linha se necessario: aneis externos devem estar no sentido horario e os internos devem estar no sentido anti-horario
+	if(fixOrientation)
+	{	
+		if(operation == TeINTERSECTION || operation == TeUNION)
 		{
-			rings.push_back(indexIterator->second.second);
+			TeOVERLAY::TeFixOrientation(redPolsIn, TeCOUNTERCLOCKWISE, TeCLOCKWISE);
 
-			TeLineIndex::iterator idxAux;
-			idxAux = indexIterator;
-			++indexIterator;
-			fragmentsIndex.erase(idxAux);
+			for(i = 0; i < numBluePols; ++i)
+				TeOVERLAY::TeFixOrientation(bluePolsIn[i], TeCOUNTERCLOCKWISE, TeCLOCKWISE);
 		}
 		else
-			++indexIterator;
-	}
-}
-
-// Recebe um polygonset com an�is externos e um vetor de pol�gonos que seriam buracos e
-// define em qual pol�gono colocar os buracos
-bool TeMountTopology(TePolygonSet& polysOut, vector<TeLinearRing>& holes)
-{
-	bool returnValue = true;
+		{
+			TeOVERLAY::TeFixOrientation(redPolsIn, TeCOUNTERCLOCKWISE, TeCLOCKWISE);
 
-	if((polysOut.size() == 0) && (holes.size() > 0))
-	{
-		return false;	// Formou buracos e n�o formou os an�is externos
+			for(i = 0; i < numBluePols; ++i)
+				TeOVERLAY::TeFixOrientation(bluePolsIn[i], TeCLOCKWISE, TeCOUNTERCLOCKWISE);
+		}
 	}
 
-	if(polysOut.size() == 1)
-	{
-		for(unsigned int i = 0; i < holes.size(); ++i)
-			polysOut[0].add(holes[i]);		
-	}
-	else
-	{
-		for(unsigned int i = 0; i < holes.size(); ++i)
-		{
-			TeLinearRing ring = holes[i];
 
-			vector<TePolygon> candidates;
-			vector<unsigned int> candidatesPos;
+// cria uma arvore que indexara os segmentos dos poligonos vermelhos
+	TeINTERSECTOR2::TeSegmentRTree redSegmentTree(redPolsIn.box());
+	TeINTERSECTOR2::TeIndexPolygonSet(redPolsIn, redSegmentTree);
 
-			unsigned int j = 0;
+	bool resultValue = true;
 
-			for(j = 0; j < polysOut.size(); ++j)
+// para cada conjunto de poligonos azuis, faz a operacao dele com os vermelhos
+	for(i = 0; i < numBluePols; ++i)
+	{
+// verifica se tem poligonos no polygonset azul
+		if(bluePolsIn[i].empty())
+		{
+			if((operation == TeUNION) || (operation == TeDIFFERENCE))
 			{
-				if(TeWithinOrCoveredByOrEquals(ring.box(), polysOut[j].box()))
-				{
-					candidates.push_back(polysOut[j]);
-					candidatesPos.push_back(j);
-				}
+				vecPolsOut.push_back(redPolsIn);
+				resultVec.push_back(true);	// mario - 2006-03
 			}
-
-			if(candidates.size() == 1)
+			else
 			{
-				candidates[0].add(ring);
-				continue;
+                TePolygonSet emptySet;
+
+                vecPolsOut.push_back(emptySet);
+				resultVec.push_back(true);	// mario - 2006-03
 			}
 
-			vector<TePolygon> newCandidates;
+			continue;
+		}
 
-			for(j = 0; j < candidates.size(); ++j)
-			{
-				short rel = TeBOUNDARY;
+// Indexa os segmentos azuis
+		TeINTERSECTOR2::TeSegmentRTree blueSegmentTree(bluePolsIn[i].box());
+		TeINTERSECTOR2::TeIndexPolygonSet(bluePolsIn[i], blueSegmentTree);		
 
-				unsigned int nthVert = ring.size();
-				unsigned int iVert = 0u;
+// calcula os potos de intersecao dos vermelhos com os azuis
+		TeINTERSECTOR2::TeVectorBoundaryIP report;
+		TeINTERSECTOR2::TeIntersection(redPolsIn, redSegmentTree, bluePolsIn[i], report);
 
-				while(iVert < nthVert)
-				{
-					rel = TeRelation(ring[iVert], candidates[j][0]);
-
-					if(rel & TeINSIDE)
-					{				
-						newCandidates.push_back(candidates[j]);
-						break;
-					}
-					else if(rel & TeOUTSIDE)
-					{
-						break;
-					}
-				
-					++iVert;
-				}
+// fragmenta as linhas vermelhas
+		TeLineSet redFragments;
+		TeLineSet redBoundaryFragments;
+		vector<pair<unsigned int, unsigned int> > redFragmentsIds;
+		vector<pair<unsigned int, unsigned int> > boundaryFragmentsIds;
 
-				if(iVert == nthVert)	
-				{
-					// Erro topol�gico, todos os pontos est�o na fronteira do anel externo...
-					returnValue = false;
-
-					TePolygon topTest;
-					topTest.add(ring);
-
-					short whatRel = TeRelation(topTest, candidates[j]);
-
-					// Se um buraco for igual ao exterior, existe um erro topol�gico
-					// No momento, eliminamos o anel externo
-					// e o interno... 
-					// Se o buraco for coberto pelo pol�gono externo, ent�o ele ir� ficar dentro deste
-					// Caso contr�rio � erro sem possibilidades...
-					if(whatRel & TeEQUALS)
-					{						
-						polysOut.erase(candidatesPos[j]);
-						continue;
-					}
-				}				
-			}
+		TeFragmentBoundary(redPolsIn, report, redBoundaryFragments, boundaryFragmentsIds, redFragments, redFragmentsIds);
+
+		short mask  = TeUNKNOWNPOSITION;
+
+// os fragmentos de fronteira ja sao separados
+		TeOVERLAY::TeLineIndex boundaryFragmentsIndex;
 
-			if(newCandidates.size() <= 0)
+		unsigned int boundaryId_ = 0;
+
+		if(redBoundaryFragments.size())
+		{
+			mask = TeBOUNDARY;
+
+			unsigned int boundaryFragmentsSize = redBoundaryFragments.size();
+
+			for(unsigned int ti = 0; ti < boundaryFragmentsSize; ++ti)
 			{
-				// N�o encontrou o anel externo ao qual o buraco pertence
-				returnValue = false;
-				continue;
+				boundaryFragmentsIndex.insert(TeOVERLAY::TeLineIndex::value_type(redBoundaryFragments[ti][0], pair<unsigned int, TeLine2D>(boundaryId_, redBoundaryFragments[ti])));
+				++boundaryId_;
 			}
+		}
+
+// escolhe os fragmentos vermelhos que estiverem localizados dentro/fora (dependendo da oparacao) dos poligonos azuis
+		vector<TeLinearRing> rings;
 
-			int idxMinArea = 0;
-			
-			double minArea = TeMAXFLOAT;
+		TeOVERLAY::TeLineIndex fragmentsIndex;
 
-			for(j = 0; j < newCandidates.size(); ++j)
+		TeOVERLAY::TeRtreeGetFragments(bluePolsIn[i], blueSegmentTree, redFragments, locationRedFragments, mask, fragmentsIndex, rings);
+
+// inverte a ordem dos pontos de intersecao para fragmentar as linhas azuis
+		TeINTERSECTOR2::TeVectorBoundaryIP::iterator it     = report.begin();
+		TeINTERSECTOR2::TeVectorBoundaryIP::iterator it_end = report.end();
+		
+		while(it != it_end)
+		{
+			swap(it->bluePolNum_, it->redPolNum_);
+			swap(it->bluePartNum_, it->redPartNum_);
+			swap(it->blueSegNum_, it->redSegNum_);
+
+			if(it->coords_.size() == 2)	//overlap
 			{
-				if(TeGeometryArea(newCandidates[j].box()) < minArea)
+				// Verificar se os pontos estao em ordem crescente
+				if(it->coords_[0].x_ < it->coords_[1].x_)
+				{
+				}
+				else if(it->coords_[0].x_ > it->coords_[1].x_)
 				{
-					idxMinArea = j;
-					minArea = TeGeometryArea(newCandidates[j].box());
+					swap(it->coords_[0], it->coords_[1]);
+				}
+				else if(it->coords_[0].y_ < it->coords_[1].y_)
+				{
+
+				}
+				else
+				{
+					swap(it->coords_[0], it->coords_[1]);							
 				}
 			}
 
-			newCandidates[idxMinArea].add(ring);
+			++it;
 		}
-	}
-
-	return returnValue;
-}
-
-// Set operation for rings
-bool TeOVERLAY::TeOverlay(const TePolygonSet& redPolsIn, const TePolygonSet& bluePolsIn, TePolygonSet& polsOut, const short& operation)
-{
-	polsOut.clear();
-
-	short locationRedFragments = 0;		// Wich red fragments to consider.	
-	short locationBlueFragments = 0;	// Wich blue fragments to consider.
 
-	short redMask  = TeUNKNOWNPOSITION;	
-	short blueMask = TeUNKNOWNPOSITION;	
-	short location = TeUNKNOWNPOSITION;
+// fragmenta as linhas azuis
+		TeLineSet blueFragments;
+		TeLineSet blueBoundaryFragments;
+		vector<pair<unsigned int, unsigned int> > blueFragmentsIds;
+		boundaryFragmentsIds.clear();
 
-	TePolygonSet redPols;
-	TePolygonSet bluePols;
+		TeFragmentBoundary(bluePolsIn[i], report, blueBoundaryFragments, boundaryFragmentsIds, blueFragments, blueFragmentsIds);
 
-	// Copia o conte�do dos pol�gonos de entrada
-	TeClonePolygonSet(redPolsIn, redPols);
-	TeClonePolygonSet(bluePolsIn, bluePols);
+		report.clear();
 
-	// Ajeita a orienta��o das fronteiras dos pol�gonos e determina a localiza��o dos fragmentos que ser�o utilizados
-	polsOut = TeChooseOperation(operation, redPols, bluePols, locationRedFragments, locationBlueFragments);
+		mask  = TeUNKNOWNPOSITION;
 
-	if(polsOut.size() > 0)
-		return true;
+// os fragmentos de fronteira ja sao separados
+		if(blueBoundaryFragments.size())
+		{
+			mask = TeBOUNDARY;
 
+			unsigned int boundaryFragmentsSize = blueBoundaryFragments.size();
 
-	// If we are here so the rings are not disjoint by box
+			for(unsigned int ti = 0; ti < boundaryFragmentsSize; ++ti)
+			{
+				boundaryFragmentsIndex.insert(TeOVERLAY::TeLineIndex::value_type(blueBoundaryFragments[ti][0], pair<unsigned int, TeLine2D>(boundaryId_, blueBoundaryFragments[ti])));
+				++boundaryId_;
+			}
+		}
 
-	// Gets intersection list
-	TeINTERSECTOR2::TeVectorBoundaryIP report;
+// escolhe os fragmentos vermelhos que estiverem localizados fora dos poligonos azuis - fragmenta as linhas vermelhas
+		TeRtreeGetFragments(redPolsIn, redSegmentTree, blueFragments, locationBlueFragments, mask, fragmentsIndex, rings);
 
-	TeINTERSECTOR2::TeSafeIntersections(redPols, bluePols, report);
+// libera a memoria usada pelos indice azul
+		blueSegmentTree.clear();
 
-	// So we need to create the fragments
-	TeLineIndex redFragmentsIndex;
-	TeLineIndex blueFragmentsIndex;	
+// tenta eliminar fragmentos de fronteira no mesmo sentido, deixando apenas um nesta direcao
+		TeRemoveSameBoundaryFragments(boundaryFragmentsIndex);
 
-	TeLineIndex redBoundaryFragmentsIndex;
-	TeLineIndex blueBoundaryFragmentsIndex;	
+// tenta eliminar fragmentos sobre fronteira opostos
+        TeRemoveOpositeBoundaryFragments(boundaryFragmentsIndex);
 
+// faz um merge dos fragmentos de fronteira para o indice de fragmentos normal
+		TeJoinFragments(fragmentsIndex, boundaryFragmentsIndex);
 
-	TeLineSet redRings;
-	for(unsigned int i = 0; i < redPols.size(); ++i)
-		for(unsigned int j = 0; j < redPols[i].size(); ++j)
-			redRings.add(redPols[i][j]);
+// monta os poligonos a partir dos fragmentos
+		bool returnValue = TeMergeFragments(fragmentsIndex, rings, true);
 
-	TeLineSet blueRings;
-	for(unsigned int k = 0; k < bluePols.size(); ++k)
-		for(unsigned int j = 0; j < bluePols[k].size(); ++j)
-			blueRings.add(bluePols[k][j]);
+		// faz o split
+		vector<TeLinearRing> ringsOut;
 
-	// Choose red fragments
-	TeLineSet redFragments;
-	TeLineSet redFragmentsBoundary;
-	TeFragmentBoundary(redRings, report, redFragmentsBoundary, redFragments);
+		bool resultSplit = true;
 
-	unsigned int setSize = redFragments.size();
+		if(TeOVERLAY::TeSplitRings(rings, ringsOut) == false)
+		{
+			ringsOut.clear();
 
-	TeCoord2D middle;
+			ringsOut = rings;
 
-	if(redFragmentsBoundary.size())
-		redMask = TeBOUNDARY;
+			resultSplit = false;
+		}
 
-	unsigned int w = 0;
+// separate holes from islands
+		vector<TeLinearRing> holes;
+		TePolygonSet polsOut;
 
-	for(w = 0; w < redFragmentsBoundary.size(); ++w)
-		redBoundaryFragmentsIndex.insert(TeLineIndex::value_type(redFragmentsBoundary[w][0], pair<short, TeLine2D>(TeBOUNDARY, redFragmentsBoundary[w])));
+		bool result = TeOVERLAY::TeClassifyRings(ringsOut, polsOut, holes);
 
-	vector<TeLinearRing> rings;
+		returnValue = returnValue && result && resultSplit;
 
-	// Do a position test for each fragment and stop if all relations have been found.
-	for(w = 0; w < setSize; ++w)
-	{	
-		if(redFragments[w].size() ==  2)	// If the fragment has two points I need to check the middle point of this fragment.
-			TeGetMiddlePoint(redFragments[w][0], redFragments[w][1], middle);
-		else	// If the fragment has more than two points so I check one point between the end points.
-			middle = redFragments[w][(unsigned int)((double(redFragments[w].size()) / 2.0 + 0.6)) - 1];
-			
-		location = TeRelation(middle, bluePols);
-
-		// If fragment is on location type or is boundary, get it.
-		if((location & locationRedFragments))
+// mount topology		
+		if((polsOut.size() == 0) && (holes.size() == 0))
 		{
-			if(redFragments[w].isRing())
-				rings.push_back(redFragments[w]);
+			if(operation == TeUNION)			
+			{
+				resultVec.push_back(false);	// mario - 2006-03
+				resultValue = false;						// uniao nao pode dar vazio
+			}
 			else
-				redFragmentsIndex.insert(TeLineIndex::value_type(redFragments[w][0], pair<short, TeLine2D>(w, redFragments[w])));
+			{
+				resultVec.push_back(returnValue);	// mario - 2006-03
+				resultValue = (resultValue && returnValue);	// Diferenca e intersecao podem retornar vazio
+			}
+
+			vecPolsOut.push_back(polsOut);	// only to mark result			
 		}
+		else
+		{
+			bool mountResult = TeOVERLAY::TeMountTopology(polsOut, holes);
 
-		redMask |= location;
-	}
+			resultVec.push_back(returnValue && mountResult);	// mario - 2006-03
 
-	// Choose blue fragments
+			resultValue = resultValue && returnValue && mountResult;	
 
-	TeINTERSECTOR2::TeVectorBoundaryIP::iterator it     = report.begin();
-	TeINTERSECTOR2::TeVectorBoundaryIP::iterator it_end = report.end();
-	
-	while(it != it_end)
-	{
-		swap(it->bluePartNum_, it->redPartNum_);
-		swap(it->blueSegNum_, it->redSegNum_);
-		++it;
+			vecPolsOut.push_back(polsOut);
+		}		
+		
 	}
 
-	// Choose blue fragments
-	TeLineSet blueFragments;
-	TeLineSet blueFragmentsBoundary;
-	
-	TeFragmentBoundary(blueRings, report, blueFragmentsBoundary, blueFragments);
+	redSegmentTree.clear();
 
-		
-	setSize = blueFragments.size();
+	return resultValue;
+}
 
-	for(w = 0; w < blueFragmentsBoundary.size(); ++w)
-		blueBoundaryFragmentsIndex.insert(TeLineIndex::value_type(blueFragmentsBoundary[w][0], pair<short, TeLine2D>(TeBOUNDARY, blueFragmentsBoundary[w])));
+bool TeOVERLAY::TeIntersection(TePolygonSet& redPols, vector<TePolygonSet>& bluePols, vector<TePolygonSet>& vecPolsOut, vector<bool>& resultVec, const bool& makeCopy, const bool fixOrientation)
+{
+	return TeOverlay(redPols, bluePols, vecPolsOut, resultVec, TeINTERSECTION, makeCopy, fixOrientation);
+}
 
-	if(blueFragmentsBoundary.size())
-		blueMask = TeBOUNDARY;
+bool TeOVERLAY::TeUnion(TePolygonSet& redPols, vector<TePolygonSet>& bluePols, vector<TePolygonSet>& vecPolsOut, vector<bool>& resultVec, const bool& makeCopy, const bool fixOrientation)
+{
+	return TeOverlay(redPols, bluePols, vecPolsOut, resultVec, TeUNION, makeCopy, fixOrientation);
+}
 
-	// Do a position test for each fragment and stop if all relations have been found.
-	for(unsigned int j = 0; j < setSize; ++j)
-	{	
-		if(blueFragments[j].size() ==  2)	// If the fragment has two points I need to check the middle point of this fragment.
-			TeGetMiddlePoint(blueFragments[j][0], blueFragments[j][1], middle);
-		else	// If the fragment has more than two points so I check one point between the end points.
-			middle = blueFragments[j][(unsigned int)((double(blueFragments[j].size()) / 2.0 + 0.6)) - 1];
-			
-		location = TeRelation(middle, redPols);
-
-		// If fragment is on location type or is boundary, get it.
-		if((location & locationBlueFragments))
-		{
-			if(blueFragments[j].isRing())
-				rings.push_back(blueFragments[j]);
-			else
-				blueFragmentsIndex.insert(TeLineIndex::value_type(blueFragments[j][0], pair<short, TeLine2D>(w, blueFragments[j])));
-		}
-		
-		blueMask |= location;		
-	}
+bool TeOVERLAY::TeDifference(TePolygonSet& redPols, vector<TePolygonSet>& bluePols, vector<TePolygonSet>& vecPolsOut, vector<bool>& resultVec, const bool& makeCopy, const bool fixOrientation)
+{
+	return TeOverlay(redPols, bluePols, vecPolsOut, resultVec, TeDIFFERENCE, makeCopy, fixOrientation);
+}
 
-	// Remove closed rings => Only needs to test open segments
-	TeFindAndMoveClosedRings(redBoundaryFragmentsIndex, rings);
-	TeFindAndMoveClosedRings(blueBoundaryFragmentsIndex, rings);
+// deprecated functions
+bool TeOVERLAY::TeOverlay(const TePolygonSet& redPols, const TePolygonSet& bluePols, TePolygonSet& polsOut, const short& operation)
+{
+	vector<TePolygonSet> bluePolsVec;
+	bluePolsVec.push_back(bluePols);
+	vector<TePolygonSet> resultPols;
+	TePolygonSet redPolsAux = redPols;
+	vector<bool> resultVec;
 
+	bool result = TeOverlay(redPolsAux, bluePolsVec, resultPols, resultVec, operation, true, true);
 
-	// Try to eliminate oposite boundaries
-	TeRemoveOpositeBoundaryFragments(redBoundaryFragmentsIndex, blueBoundaryFragmentsIndex);
+	if(resultPols.size() > 0)
+		polsOut = resultPols[0];
 
-	// Try to eliminate same boundary fragments
-	TeRemoveSameBoundaryFragments(redBoundaryFragmentsIndex, blueBoundaryFragmentsIndex);
+	return result;	
+}
 
-	// Merge all red fragments in the first fragment index
-	TeMergeFragments(redFragmentsIndex, redBoundaryFragmentsIndex);
+bool TeOVERLAY::TeUnion(TePolygonSet& redPols, TePolygonSet& bluePols, TePolygonSet& polsOut)
+{
+	return TeOVERLAY::TeOverlay(redPols, bluePols, polsOut, TeUNION);
+}
 
-	// Merge all blue fragments in the first fragment index
-	TeMergeFragments(blueFragmentsIndex, blueBoundaryFragmentsIndex);
+bool TeOVERLAY::TeIntersection(const TePolygonSet& redPols, const TePolygonSet& bluePols, TePolygonSet& polsOut)
+{
+	return TeOVERLAY::TeOverlay(redPols, bluePols, polsOut, TeINTERSECTION);
+}
 
+bool TeOVERLAY::TeDifference(TePolygonSet& redPols, TePolygonSet& bluePols, TePolygonSet& polsOut)
+{
+	return TeOVERLAY::TeOverlay(redPols, bluePols, polsOut, TeDIFFERENCE);
+}
 
-	// Make polygons from fragments.
-	bool returnValue = true;
+TeMultiGeometry TeOverlay(const TeLineSet& redLinesIn, const TePolygonSet& bluePolsIn, TeINTERSECTOR2::TeSegmentRTree& blueTree, const short& operation)
+{
+//	short location = TeUNKNOWNPOSITION;
+	short locationRedFragments = TeUNKNOWNPOSITION;
+	short locationBlueFragments = TeUNKNOWNPOSITION;
 
-	TeLine2D  lAux;	
-	TeCoord2D endLineCoordinate;
+	TeMultiGeometry mGeom;
 
-	while(!(redFragmentsIndex.empty() && blueFragmentsIndex.empty()))
-	{
-		if(lAux.size() == 0)
-		{
-			TeLineIndex::iterator indexIterator  = redFragmentsIndex.begin();
-			if(indexIterator != redFragmentsIndex.end())
-			{
-				if(indexIterator->second.second.isRing())
-				{
-					rings.push_back(indexIterator->second.second);
-					redFragmentsIndex.erase(indexIterator);
-					continue;
-				}
-				
-				for(unsigned int i = 0; i < indexIterator->second.second.size(); ++i)
-					lAux.add(indexIterator->second.second[i]);
+	TeLineSet redLines;
+	TePolygonSet bluePols;
 
-				lAux.setBox(::TeUnion(lAux.box(), indexIterator->second.second.box()));
+// copia o conteudo das linhas de entrada
+	redLines.copyElements(redLinesIn);
 
-				redFragmentsIndex.erase(indexIterator);
-			}
-			else
-			{
-				TeLineIndex::iterator indexIterator  = blueFragmentsIndex.begin();
-				if(indexIterator != blueFragmentsIndex.end())
-				{
-					if(indexIterator->second.second.isRing())
-					{
-						rings.push_back(indexIterator->second.second);
-						blueFragmentsIndex.erase(indexIterator);
-						continue;
-					}
-
-					for(unsigned int i = 0; i < indexIterator->second.second.size(); ++i)
-						lAux.add(indexIterator->second.second[i]);
-
-					//lAux.copyElements(indexIterator->second);
-					lAux.setBox(::TeUnion(lAux.box(), indexIterator->second.second.box()));
-					blueFragmentsIndex.erase(indexIterator);
-				}
-				else
-				{
-					returnValue = false;	//N�o poderia vir aqui, deveria ter sa�do no teste do la�o!!
-				}
-			}
-		}	
-		else
-		{
-			endLineCoordinate = lAux[lAux.size() - 1];
+// copia o conteudo dos poligonos de entrada
+	bluePols.copyElements(bluePolsIn);
 
-			// Try to find the beginning of the next fragment that is part of the polygon in the same list
-			TeLineIndex::iterator indexIterator = redFragmentsIndex.find(endLineCoordinate);
+// determina a localizacao dos fragmentos que serao utilizados
+	TeOVERLAY::TeChooseBoundaryLocation(operation, locationRedFragments, locationBlueFragments);
 
-			if(indexIterator != redFragmentsIndex.end())
-			{
-				for(unsigned int i = 1; i < indexIterator->second.second.size(); ++i)
-					lAux.add(indexIterator->second.second[i]);
+// gets intersection list
+	TeINTERSECTOR2::TeVectorBoundaryIP report;
 
-				lAux.setBox(::TeUnion(lAux.box(), indexIterator->second.second.box()));
-				redFragmentsIndex.erase(indexIterator);
-			}			
-			else
-			{
-				indexIterator = blueFragmentsIndex.find(endLineCoordinate);
+	TeINTERSECTOR2::TeIntersection(redLines, bluePols, blueTree, report);
 
-				if(indexIterator != blueFragmentsIndex.end())
-				{
-					for(unsigned int i = 1; i < indexIterator->second.second.size(); ++i)
-						lAux.add(indexIterator->second.second[i]);
+// fragment lines
+	TeLineSet redFragments;
+	TeLineSet redBoundaryFragments;
+	
+    TeFragmentBoundary(redLines, report, redBoundaryFragments, redFragments);
 
-					lAux.setBox(::TeUnion(lAux.box(), indexIterator->second.second.box()));
-					blueFragmentsIndex.erase(indexIterator);
-				}
-				else
-				{
-					if(lAux.isRing())
-					{
-						// Add ring
-						rings.push_back(TeLinearRing(lAux));						
-					}
+// choose red fragments
+	vector<TeLinearRing> rings;
 
-					returnValue = false;	// Erro na topologia dos pol�gonos
+	TeOVERLAY::TeLineIndex fragmentsIndex;
 
-					// Clear auxiliary.
-					TeLine2D emptyLine;
-					lAux = emptyLine;
-				}
-			}
-		}
+	short mask = 0;
 
-		if(lAux.isRing())
-		{  
-			// Add polygon
-			rings.push_back(TeLinearRing(lAux));
-			
-			// Clear auxiliary.
-			TeLine2D emptyLine;					
-			lAux = emptyLine;
-		}
-	}
+	TeRtreeGetFragments(bluePols, blueTree, redFragments, locationRedFragments, mask, fragmentsIndex, rings);
 
-	if(lAux.size() > 0)
-		returnValue = false;	// Erro, alguma linha n�o fechou!!!
+// report fragments from red lines
+	TeOVERLAY::TeLineIndex::iterator it = fragmentsIndex.begin();
 
-	// Separate holes from islands
-	vector<TeLinearRing> holes;
+	while(it != fragmentsIndex.end())
+	{
+		mGeom.addGeometry(it->second.second);
+		++it;
+	}
 
-	//string aux = "";
-	for(unsigned int z = 0; z < rings.size(); ++z)
+	unsigned int nrings = rings.size();
+	unsigned int i;
+	for(i = 0; i < nrings; ++i)
 	{
-		short ori = TeOrientation(rings[z]);
+		mGeom.addGeometry(rings[i]);
+	}
 
-		if(ori == TeCOUNTERCLOCKWISE)	// It is a hole
-		{
-			holes.push_back(rings[z]);			// add to holes list
-		}
-		else if(ori == TeCLOCKWISE)		// else if island
-		{										// create a polygon
-			TePolygon p;
-			p.add(rings[z]);
-			polsOut.add(p);
-		}
-		else	
-		{
-			returnValue = false;	// Objeto sem �rea? Isso � um erro!
-		}
+// if the operaton is union, so push bluepols
+
+	if(operation == TeUNION)
+	{							
+		mGeom.setGeometry(bluePols);		
 	}
-	
-	if((polsOut.size() == 0) && (holes.size() == 0))
+
+	return mGeom;
+}
+
+void TeOverlay(vector<TeLineSet>& redLinesIn, const TePolygonSet& bluePolsIn, vector<TeMultiGeometry>& outPutGeoms, const short& operation)
+{
+	TeINTERSECTOR2::TeSegmentRTree blueTree(bluePolsIn.box());
+
+	unsigned int nLines = redLinesIn.size();
+	unsigned int i;
+	for(i = 0; i < nLines; ++i)
 	{
-		if(operation & TeUNION)
-			return false;	// Na uni�o deve haver a forma��o de pol�gonos
-		else
-			return returnValue;	// Diferen�a e interse��o podem retornar vazio
+		TeMultiGeometry mg;
+
+		mg = TeOverlay(redLinesIn[i], bluePolsIn, blueTree, operation);
+
+		outPutGeoms.push_back(mg);        		
 	}
 
-	bool mountResult = TeMountTopology(polsOut, holes);
+	blueTree.clear();
 
-	return (returnValue && mountResult);	
+	return;
 }
 
+// overlay for lines/polygons
 TeMultiGeometry TeOVERLAY::TeOverlay(const TeLineSet& redLinesIn, const TePolygonSet& bluePolsIn, const short& operation)
 {
-	short location = TeUNKNOWNPOSITION;
-	short locationRedFragments = TeUNKNOWNPOSITION;
-
-	TeMultiGeometry mGeom;
+	vector<TeMultiGeometry> mgeoms;
+	vector<TeLineSet> redLines;
+	redLines.push_back(redLinesIn);
+	TeMultiGeometry outputGeom;
 
-	TeLineSet redLines;
-	TePolygonSet bluePols;
-	TeLineSet blueLines;
-
-	// Copia o conte�do das linhas de entrada
-	TeCloneLineSet(redLinesIn, redLines);
+	::TeOverlay(redLines, bluePolsIn, mgeoms, operation);
 
-	// Copia o conte�do dos pol�gonos de entrada
-	TeClonePolygonSet(bluePolsIn, bluePols);
+	if(mgeoms.empty())
+		return outputGeom;
 
+	outputGeom = mgeoms[0];
 
-	// Ajeita a orienta��o das fronteiras dos pol�gonos e determina a localiza��o dos fragmentos que ser�o utilizados
-	mGeom = TeChooseOperation(operation, redLines, bluePols, locationRedFragments);
+	return outputGeom;
+}
 
-	if(!mGeom.empty())
-		return mGeom;
+TeMultiGeometry TeOVERLAY::TeUnion(TeLineSet& redLines, TePolygonSet& bluePols)
+{
+	return TeOVERLAY::TeOverlay(redLines, bluePols, TeUNION);
+}
 
-	unsigned int i = 0u;
+TeMultiGeometry TeOVERLAY::TeIntersection(TeLineSet& redLines, TePolygonSet& bluePols)
+{
+	return TeOVERLAY::TeOverlay(redLines, bluePols, TeINTERSECTION);
+}
 
-	// Gets intersection list
-	TeINTERSECTOR2::TeVectorBoundaryIP report;
+TeMultiGeometry TeOVERLAY::TeDifference(TeLineSet& redLines, TePolygonSet& bluePols)
+{
+	return TeOVERLAY::TeOverlay(redLines, bluePols, TeDIFFERENCE);
+}
 
-	unsigned int redLinesSize = redLines.size();
+bool TeOVERLAY::TePairUnion(TePolygonSet& psetIn, TePolygonSet& psetOut)
+{
+	psetOut.clear();
 
-	// Loops through red lines
-	for(i = 0u; i < redLinesSize; ++i)
+	vector<TePolygonSet> outPutSet;
+	unsigned int i;
+	for(i = 0; i < psetIn.size(); ++i)
 	{
-		unsigned int bluePart = 0u;
+		TePolygonSet pset;
+		pset.add(psetIn[i]);
+		outPutSet.push_back(pset);
+	}
 
-		// Loops through blue polygonset
-		unsigned int bluePolsSize = bluePols.size();
+	unsigned int outsize = outPutSet.size();
 
-		for(unsigned int j = 0u; j < bluePolsSize; ++j)
-		{
-			//Loops trough blue polygon rings
-			unsigned int bluePolNumRings = bluePols[j].size();
+	bool resultUnion = true;
 
-			for(unsigned k = 0u; k < bluePolNumRings; ++k)
+	while(outsize > 1)
+	{
+// une dois a dois
+		unsigned int auxsize = 0;
+		unsigned int i;
+		for(i = 0; i < outsize; i += 2)
+		{
+			TePolygonSet psRed = outPutSet[i];
+			if((i + 1) < outsize)
 			{
-				TeINTERSECTOR2::TeSafeIntersections(redLines[i], bluePols[j][k], report, i, bluePart);
-
-				++bluePart;
+				TePolygonSet psBlue = outPutSet[i+1];
+				TePolygonSet psUnidoAgregado;
+				resultUnion = resultUnion && TeOVERLAY::TeUnion(psRed, psBlue, psUnidoAgregado);
+				if(psUnidoAgregado.size() > 0)
+				{
+					outPutSet[auxsize] = psUnidoAgregado;
+					++auxsize;
+				}
 			}
+			else
+			{
+				outPutSet[auxsize] = psRed;
+				++auxsize;
+			}			
 		}
 
-		//++redPart;
+		outsize = auxsize;
 	}
 
-	// Fragment red Lines
-	TeLineSet redFragments;
-	TeLineSet redFragmentsBoundary;
-	TeFragmentBoundary(redLines, report, redFragmentsBoundary, redFragments);
+	for(unsigned int i = 0; i < outsize; ++i)
+		for(unsigned int j = 0; j < outPutSet[i].size(); ++j)		
+			psetOut.add(outPutSet[i][j]);
+
+	return resultUnion;
+}
 
-	// Choose red fragments
-	unsigned int setSize = redFragments.size();
+bool TeOVERLAY::TeValidPolygonHoles(TePolygon& polygon, TePolygonSet& psValid)
+{
+	string objectId = polygon.objectId();
+	int geomId = polygon.geomId();
 
-	TeCoord2D middle;
+	psValid.clear();
 
-	for(i = 0u; i < setSize; ++i)
+	if(polygon.size() == 0)
+		return false;
+
+	if(polygon.size() == 1)
 	{	
-		if(redFragments[i].size() ==  2)	// If the fragment has two points I need to check the middle point of this fragment.
-			TeGetMiddlePoint(redFragments[i][0u], redFragments[i][1u], middle);
-		else	// If the fragment has more than two points so I check one point between the end points.
-			middle = redFragments[i][(unsigned int)((double(redFragments[i].size()) / 2.0 + 0.6)) - 1];
-			
-		location = TeRelation(middle, bluePols);
-
-		// If fragment is on location type, get it.
-		if((location & locationRedFragments))
-			mGeom.addGeometry(redFragments[i]);
+		TePolygon paux;
+		paux.copyElements(polygon);
+		paux.geomId(geomId);
+		paux.objectId(objectId);
+		psValid.add(paux);
+		return true;
 	}
 
-	switch(operation)
-	{							
-		case TeINTERSECTION:  break;
-
-		case TeUNION:         mGeom.setGeometry(bluePols);
-							  break;
+	TePolygon fixedPolygon;
+	fixedPolygon.add(polygon[0]);
+				
+//adiciona todos os buracos em um TePolygonSet
+	TePolygonSet psHoles;
+	unsigned int i;
+	for(i = 1; i < polygon.size(); i++)
+	{
+		TePolygon hole;
+		hole.add(polygon[i]);
 
-		case TeDIFFERENCE:	  break;
+		psHoles.add(hole);
 	}
 
-	return mGeom;
+//faz a uniao dos buracos
+	TePolygonSet psOut;	
+	if(!TeOVERLAY::TeUnion(psHoles, psOut))
+		return false;
+
+	psHoles = TePolygonSet();
+	psHoles.copyElements(psOut);
+	psOut = TePolygonSet();
+
+//faz a diferenca entre o poligono original e a uniao dos seus buracos 
+	TePolygonSet psTemp;
+	psTemp.add(fixedPolygon);
+
+	if(!TeOVERLAY::TeDifference(psTemp, psHoles, psOut))
+		return false;
+		
+	for(i = 0; i < psOut.size(); i++)
+	{
+		psOut[i].geomId(geomId);
+		psOut[i].objectId(objectId);
+		psValid.add(psOut[i]);
+	}
 
+	return true;
 }
 
+bool TeOVERLAY::TeValidPolygonHoles(TePolygonSet& polygons, TePolygonSet& psValid)
+{
+	psValid.clear();
+	unsigned int i, j;
+    for(i = 0; i < polygons.size(); ++i)
+	{
+// do valid for each polygon
+        TePolygon pol = polygons[i];
+
+        TePolygonSet psAux;
+
+        if(TeValidPolygonHoles(pol, psAux))
+		{
+			for(j = 0; j < psAux.size(); ++j)
+			{
+				psValid.add(psAux[j]);
+			}
+		}
+		else
+		{
+			return false;
+		}
+	}
+
+	return true;
+}
 
diff --git a/src/terralib/kernel/TeOverlay.h b/src/terralib/kernel/TeOverlay.h
old mode 100644
new mode 100755
index 64cf71b..2664f85
--- a/src/terralib/kernel/TeOverlay.h
+++ b/src/terralib/kernel/TeOverlay.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,57 +20,193 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeOverlay.h
-    This file contains structures and definitions for set operation on objects.
+    \brief This file contains structures and definitions for set operation on polygons.
+	\author Gilberto Ribeiro de Queiroz <gribeiro at dpi.inpe.br>
  */
 
-/**
-  *@author Gilberto Ribeiro de Queiroz
-  */
-
 #ifndef  __TERRALIB_INTERNAL_OVERLAY_H
 #define  __TERRALIB_INTERNAL_OVERLAY_H
 
 #include "TeMultiGeometry.h"
 
+/**
+ * @brief Contains structures and definitions needed to execute Set Operations for polygons and lines (union, intersection e difference).
+ */
 
 namespace TeOVERLAY
 {	
+/** @defgroup SetOperations Set Operations
+ *  Set operations for polygons and lines: intersection, union or difference.
+ *  @{
+ */
 
-bool TeOverlay(const TePolygonSet& redPols, const TePolygonSet& bluePols, TePolygonSet& polsOut, const short& operation);
+/** \brief Executes one of the possible Set Operations on polygons. 
+    \param redPols		The first list of disjoint polygons (and without self-intersections).
+	\param bluePols		The second list of disjoint polygons (and without self-intersections).
+	\param polsOut		The polygon list from the operation result.
+	\param operation	Type of operation: TeUNION, TeINTERSECTION or TeDIFFERENCE.
+	\return				True if the operation success and false if an error has ocurried.
+	
+	\note Each polygon list must have disjoint polygons, otherwise, the result is undefined. This function must not be called directly,
+	      instead of call it, choose a specific function below, because, this signature is deprecated and will change in near future.
+*/
+TL_DLL bool TeOverlay(const TePolygonSet& redPols, const TePolygonSet& bluePols, TePolygonSet& polsOut, const short& operation);
 
-inline bool TeUnion(TePolygonSet& redPols, TePolygonSet& bluePols, TePolygonSet& polsOut)
-{
-	return TeOverlay(redPols, bluePols, polsOut, TeUNION);
-}
+/** \brief Calculates the union Set Operation for polygons.
+    \param redPols		The first list of disjoint polygons (and without self-intersections).
+	\param bluePols		The second list of disjoint polygons (and without self-intersections).
+	\param polsOut		The polygon list from the operation result.
+	\return				True if the operation success and false if an error has ocurried.
 
-inline bool TeIntersection(TePolygonSet& redPols, TePolygonSet& bluePols, TePolygonSet& polsOut)
-{
-	return TeOverlay(redPols, bluePols, polsOut, TeINTERSECTION);
-}
+*/
+TL_DLL bool TeUnion(TePolygonSet& redPols, TePolygonSet& bluePols, TePolygonSet& polsOut);
 
-inline bool TeDifference(TePolygonSet& redPols, TePolygonSet& bluePols, TePolygonSet& polsOut)
-{
-	return TeOverlay(redPols, bluePols, polsOut, TeDIFFERENCE);
-}
 
-TeMultiGeometry TeOverlay(const TeLineSet& redLines, const TePolygonSet& bluePols, const short& operation);
+/** \brief Calculates the  intersection Set Operation for polygons.
+    \param redPols      The first list of disjoint polygons (and without self-intersections).
+	\param bluePols		The second list of disjoint polygons (and without self-intersections).
+	\param polsOut      The polygon list from the operation result.
+	\return				True if the operation success and false if an error has ocurried.
 
-inline TeMultiGeometry TeUnion(TeLineSet& redLines, TePolygonSet& bluePols)
-{
-	return TeOverlay(redLines, bluePols, TeUNION);
-}
+*/
+TL_DLL bool TeIntersection(const TePolygonSet& redPols, const TePolygonSet& bluePols, TePolygonSet& polsOut);
+
+
+/** \brief Calculates the difference set operation for polygons (redPols minus bluePols).
+    \param redPols      The first list of disjoint polygons (and without self-intersections).
+	\param bluePols		The second list of disjoint polygons (and without self-intersections).
+	\param polsOut      The polygon list from the operation result.
+	\return				True if the operation success and false if an error has ocurried.
+
+*/
+TL_DLL bool TeDifference(TePolygonSet& redPols, TePolygonSet& bluePols, TePolygonSet& polsOut);
+
+
+/** \brief Executes one of the possible Set Operations for lines and polygons. 
+    \param redLines		A disjoint line list (and without self-intersections).
+	\param bluePols		A list of disjoint polygons (and without self-intersections).
+	\param operation    Type of operation: TeUNION, TeINTERSECTION or TeDIFFERENCE.
+	\return				A geometry that can contains only lines on intersection and difference cases, and lines + polygons on union case.
+
+	\note This function must not be called directly, instead of call it, choose a specific function below,
+	      because, this signature is deprecated and will change in near future.
+
+*/
+TL_DLL TeMultiGeometry TeOverlay(const TeLineSet& redLines, const TePolygonSet& bluePols, const short& operation);
+
+
+/** \brief Calculates the union set operation for lines and polygons.
+    \param redLines     A disjoint line list (and without self-intersections).
+	\param bluePols		A list of disjoint polygons (and without self-intersections).
+	\return				A geometry formed by lines and polygons or only by polygons.
+
+*/
+TL_DLL TeMultiGeometry TeUnion(TeLineSet& redLines, TePolygonSet& bluePols);
+
+
+/** \brief Calculates the intersection set operation for lines and polygons.
+    \param redLines     A disjoint line list (and without self-intersections).
+	\param bluePols		A list of disjoint polygons (and without self-intersections).
+	\return				A geometry formed only by lines or empty.
+
+*/
+TL_DLL TeMultiGeometry TeIntersection(TeLineSet& redLines, TePolygonSet& bluePols);
+
+
+/** \brief Calculates the defference set operation for lines and polygons.
+    \param redLines     A disjoint line list (and without self-intersections).
+	\param bluePols		A list of disjoint polygons (and without self-intersections).
+	\return				A geometry formed only by lines or empty.
+
+*/
+TL_DLL TeMultiGeometry TeDifference(TeLineSet& redLines, TePolygonSet& bluePols);
+
+
+/** \brief Calculates the union of all polygons passed in polsIn parameter, and returns a polygon set (polsOut).
+    \param polsIn            A list of polygons, may have overlap (disjoint or not).
+	\param polsOut           Where the union will be stored.
+	\param makeCopy          If true, before to start the union process a copy will be done for all coordinates, otherwise, the rings and coordinates of the input polygon will be used and so, the input can be invalidate (because of handle/body share of implementaton) bu this will save some memory.
+	\param fixOrientation    If true, the ring orientation is checked, otherwise, it is assumed that they are in correct order of processing (you may set to false only if you know implementation details otherwise an error may occur).
+*/
+TL_DLL bool TeUnion(TePolygonSet& polsIn, TePolygonSet& polsOut, const bool& makeCopy = true, const bool fixOrientation = true);
+
+
+/** \brief Calculates the intersection set operation for polygons. This version of intersection will reuse some pre-processing of redPols, and will do intersection between redPols and each polygonset in bluePols vector. The result of each individual operation (redPols x a polygonset from the blue vector) will be store in the output vector in the same order of polygonsets in bluePols. If an intersection is empty, an empty polygonset will be stored to indicate this.
+    \param redPols			A list of disjoint polygons (and without self-intersections) used as a mask to cut each polygonset in bluePols vector.
+	\param bluePols			A vector that contains polygonsets that will be individually cutted by redPols, and each blue polygonset must be disjoint (and without self-intersections).
+	\param vecPolsOut       A vector with the result of intersection between redPols and each polygonset in the blue polygonset vector.
+	\param resultVec        A vector of bool that tells if individual intersection succeed or not.
+	\param makeCopy         If true, before to start the union process a copy will be done for all coordinates, otherwise, the rings and coordinates of the input polygon will be used and so, the input can be invalidate (because of handle/body share of implementaton) bu this will save some memory.
+	\param fixOrientation   If true, the ring orientation is checked, otherwise, it is assumed that they are in correct order of processing (you may set to false only if you know implementation details otherwise an error may occur).
+	\return				True if the operation success and false if an error has ocurried.
+
+	\note The output vector may contains polygonsets thar are empty, only to indicate that intersection was empty, so be carefull.
+
+*/
+TL_DLL bool TeIntersection(TePolygonSet& redPols, vector<TePolygonSet>& bluePols, vector<TePolygonSet>& vecPolsOut, vector<bool>& resultVec, const bool& makeCopy = true, const bool fixOrientation = true);
+
+
+/** \brief Calculates the union set operation for polygons.
+           This version of union will reuse some pre-processing of redPols,
+		   and will do union between redPols and each polygonset in bluePols.
+		   The result of each individual operation (redPols x a polygonset from the blue vector)
+		   will be store in the output vector in the same order of polygonsets in bluePols.
+    \param redPols			A list of disjoint polygons (and without self-intersections) used as a mask to cut each polygonset in bluePols vector.
+	\param bluePols			A vector that contains polygonsets that will be individually cutted by redPols, and each blue polygonset must be disjoint (and without self-intersections).
+	\param vecPolsOut       A vector with the result of union between redPols and each polygonset in the blue polygonset vector.
+	\param resultVec        A vector of bool that tells if individual intersection succeed or not.
+	\param makeCopy         If true, before to start the union process a copy will be done for all coordinates, otherwise, the rings and coordinates of the input polygon will be used and so, the input can be invalidate (because of handle/body share of implementaton) bu this will save some memory.
+	\param fixOrientation   If true, the ring orientation is checked, otherwise, it is assumed that they are in correct order of processing (you may set to false only if you know implementation details otherwise an error may occur).
+	\return				True if the operation success and false if an error has ocurried.
+*/
+TL_DLL bool TeUnion(TePolygonSet& redPols, vector<TePolygonSet>& bluePols, vector<TePolygonSet>& vecPolsOut, vector<bool>& resultVec, const bool& makeCopy = true, const bool fixOrientation = true);
 
-inline TeMultiGeometry TeIntersection(TeLineSet& redLines, TePolygonSet& bluePols)
-{
-	return TeOverlay(redLines, bluePols, TeINTERSECTION);
-}
 
-inline TeMultiGeometry TeDifference(TeLineSet& redLines, TePolygonSet& bluePols)
-{
-	return TeOverlay(redLines, bluePols, TeDIFFERENCE);
-}
+/** \brief Calculates the difference set operation for polygons.
+           This version of difference will reuse some pre-processing of redPols,
+		   and will do difference between redPols and each polygonset in bluePols vector.
+		   The result of each individual operation (redPols x a polygonset from the blue vector)
+		   will be store in the output vector in the same order of polygonsets in bluePols.
+		   If an intersection is empty, an empty polygonset will be stored to indicate this.
+    \param redPols			A list of disjoint polygons (and without self-intersections) used as a mask to cut each polygonset in bluePols vector.
+	\param bluePols			A vector that contains polygonsets that will be individually cutted by redPols, and each blue polygonset must be disjoint (and without self-intersections).
+	\param vecPolsOut       A vector with the result of differnce between redPols and each polygonset in the blue polygonset vector.
+	\param resultVec        A vector of bool that tells if individual intersection succeed or not.
+	\param makeCopy         If true, before to start the union process a copy will be done for all coordinates, otherwise, the rings and coordinates of the input polygon will be used and so, the input can be invalidate (because of handle/body share of implementaton) bu this will save some memory.
+	\param fixOrientation   If true, the ring orientation is checked, otherwise, it is assumed that they are in correct order of processing (you may set to false only if you know implementation details otherwise an error may occur).
+	\return				True if the operation success and false if an error has ocurried.
+
+	\note The output vector may contains polygonsets thar are empty, only to indicate that intersection was empty, so be carefull.
+*/
+TL_DLL bool TeDifference(TePolygonSet& redPols, vector<TePolygonSet>& bluePols, vector<TePolygonSet>& vecPolsOut, vector<bool>& resultVec, const bool& makeCopy = true, const bool fixOrientation = true);
+
+/** \brief Calculates the union of all polygons passed in polsIn parameter,
+           and returns a polygon set (polsOut).
+	       This type of union use a different strategy from the
+		   previous one: do union for each pair and
+		   then repeat until we have only two pairs.
+    \param psetIn            A list of polygons, may have overlap (disjoint or not).
+	\param psetOut           Where the union will be stored.
+ */
+TL_DLL bool TePairUnion(TePolygonSet& psetIn, TePolygonSet& psetOut);
+
+/** \brief Valid polygon holes: if they have a commom edge,
+           they will be joined (THIS IS FOR INTERNAL USE ONLY).
+	\param  polygon		The polygon to check holes.
+	\param  psValid		The result polygon.
+	\return				Returns true if the operation successed otherwise returns false.
+ */
+TL_DLL bool TeValidPolygonHoles(TePolygon& polygon, TePolygonSet& psValid);
+
+/** \brief Valid polygon holes: if they have a commom edge, they will be joined (THIS IS FOR INTERNAL USE ONLY).
+	\param  polygons	The polygons to check holes.
+	\param  psValid		The result polygon.
+	\return				Returns true if the operation successed otherwise returns false.
+ */
+TL_DLL bool TeValidPolygonHoles(TePolygonSet& polygons, TePolygonSet& psValid);
+
+/** @} */ 
 
 }	// end namespace TeOVERLAY
 
diff --git a/src/terralib/kernel/TeOverlayUtils.cpp b/src/terralib/kernel/TeOverlayUtils.cpp
new file mode 100755
index 0000000..d6f0467
--- /dev/null
+++ b/src/terralib/kernel/TeOverlayUtils.cpp
@@ -0,0 +1,1222 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright 2001-2004 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+
+#include "TeOverlayUtils.h"
+#include "TeGeometryAlgorithms.h"
+
+//---------------- Auxiliary operations for overlay ----------------//
+
+inline void TeOverlayMiddle(const TeCoord2D& c1, const TeCoord2D& c2, TeCoord2D& m)
+{
+	m.x_ = ((c1.x_ + c2.x_) / 2.0);
+	m.y_ = ((c1.y_ + c2.y_) / 2.0);
+}
+
+// Verifies orientation for each line of polygon set, and reverse the orientation if need
+void TeOVERLAY::TeFixOrientation(TePolygonSet& polSet, const short& outerOrientationToReverse, const short& innerOrientationToReverse)
+{
+	unsigned int polSetSize = polSet.size();
+
+	for(unsigned int i = 0; i < polSetSize; ++i)
+	{
+		if(TeOrientation(polSet[i][0]) == outerOrientationToReverse)
+			reverse(polSet[i][0].begin(), polSet[i][0].end());
+
+		unsigned int polSize = polSet[i].size();
+
+		for(unsigned int j = 1; j < polSize; ++j)
+		{
+			if(TeOrientation(polSet[i][j]) == innerOrientationToReverse)
+				reverse(polSet[i][j].begin(), polSet[i][j].end());
+		}
+	}
+}
+
+// For each operation (union, intersection and difference) defines location for retrieval of fragments
+void TeOVERLAY::TeChooseBoundaryLocation(const short& operation, short& locationRedFragments, short& locationBlueFragments)
+{
+	switch(operation)
+	{							
+// intersection: gets all fragments from red polygon wich are
+// inside the blue polygon and the blue fragments that are inside
+// the red polygon.
+		case TeINTERSECTION:  locationRedFragments  = TeINSIDE;
+			                  locationBlueFragments = TeINSIDE;
+							  break;
+
+// union: gets all fragments from red polygon wich are
+// outside the blue polygon and the blue fragments that are outside
+// the red polygon.
+		case TeUNION:         locationRedFragments  = TeOUTSIDE;
+			                  locationBlueFragments = TeOUTSIDE;
+							  break;
+
+// difference: gets all fragments from red polygon wich are
+// outside the blue polygon and the blue fragments that are inside
+// the red polygon.
+		case TeDIFFERENCE:	  locationRedFragments  = TeOUTSIDE;
+			                  locationBlueFragments = TeINSIDE;
+		                      break;
+	}
+}
+
+// Erases from fragmentsIndex boundary fragments that are in oposite direction: each fragment must have a unique identifier in the pair first field (pair<unsigned int, TeLine2D>)
+void TeOVERLAY::TeRemoveOpositeBoundaryFragments(TeLineIndex& fragmentsIndex)
+{
+	TeLineIndex::iterator indexIterator = fragmentsIndex.begin();
+	
+	while(indexIterator != fragmentsIndex.end())
+	{
+		pair<TeLineIndex::iterator, TeLineIndex::iterator> its = fragmentsIndex.equal_range(indexIterator->second.second[(indexIterator->second.second.size() - 1u)]);
+
+		bool eraseOwn = false;
+
+        while(its.first != its.second)
+		{
+// Se nao achei o proprio fragmento, entao posso ver se e possivel apagar
+			if(its.first->second.first != indexIterator->second.first)
+			{
+				if(TeEquals(its.first->second.second[its.first->second.second.size() - 1u], indexIterator->second.second[0u]))
+				{
+					TeLineIndex::iterator idxAux2 = its.first;
+					++(its.first);
+					fragmentsIndex.erase(idxAux2);
+
+					eraseOwn = true;
+				}
+				else
+				{
+					++(its.first);
+				}
+			}
+			else
+			{
+				++(its.first);
+			}
+		}
+
+		if(eraseOwn)
+		{
+			fragmentsIndex.erase(indexIterator);
+			indexIterator = fragmentsIndex.begin();
+		}
+		else
+		{
+			++indexIterator;
+		}
+	}
+}
+
+// Erases from fragmentsIndex boundary fragments that are equals to another boundary fragment
+void TeOVERLAY::TeRemoveSameBoundaryFragments(TeLineIndex& fragmentsIndex)
+{
+	TeLineIndex::iterator indexIterator = fragmentsIndex.begin();
+	
+	while(indexIterator != fragmentsIndex.end())
+	{
+		pair<TeLineIndex::iterator, TeLineIndex::iterator> its = fragmentsIndex.equal_range(indexIterator->second.second[0u]);
+
+        while(its.first != its.second)
+		{
+// Se nao achei o proprio fragmento, entao posso ver se e possivel apagar
+			if(its.first->second.first != indexIterator->second.first)
+			{
+				if(TeEquals(its.first->second.second[its.first->second.second.size() - 1u], indexIterator->second.second[indexIterator->second.second.size() - 1u]))
+				{
+					TeLineIndex::iterator idxAux2 = its.first;
+					++(its.first);
+					fragmentsIndex.erase(idxAux2);
+				}
+				else
+				{
+					++(its.first);
+				}
+			}
+			else
+			{
+				++(its.first);
+			}
+		}
+
+		++indexIterator;
+	}
+}
+
+// Merge fragments ito first index (fragmentsIndex)
+void TeOVERLAY::TeJoinFragments(TeLineIndex& fragmentsIndex, TeLineIndex& boundaryFragmentsIndex)
+{
+	TeLineIndex::iterator indexIterator = boundaryFragmentsIndex.begin();
+
+	while(indexIterator != boundaryFragmentsIndex.end())
+	{
+		fragmentsIndex.insert(*indexIterator);
+		++indexIterator;
+	}
+
+	boundaryFragmentsIndex.clear();	
+}
+
+// Moves closed rings from fragmentsIndex to rins vector
+void TeOVERLAY::TeFindAndMoveClosedRings(TeLineIndex& fragmentsIndex, vector<TeLinearRing>& rings)
+{
+	TeLineIndex::iterator indexIterator = fragmentsIndex.begin();
+
+	while(indexIterator != fragmentsIndex.end())
+	{
+		if(indexIterator->second.second.isRing())
+		{
+			rings.push_back(indexIterator->second.second);
+
+			TeLineIndex::iterator idxAux;
+			idxAux = indexIterator;
+			++indexIterator;
+			fragmentsIndex.erase(idxAux);
+		}
+		else
+			++indexIterator;
+	}
+}
+
+// Gets a polygonset with outer rings and a vector with holes and try to find to what polygon the hole belongs to
+bool TeOVERLAY::TeMountTopology(TePolygonSet& polysOut, vector<TeLinearRing>& holes)
+{
+	bool returnValue = true;
+
+	if((polysOut.size() == 0) && (holes.size() > 0))
+	{
+// Formou buracos e nao formou os aneis externos
+		return false;	
+	}
+
+	if(polysOut.size() == 1)
+	{
+		for(unsigned int i = 0; i < holes.size(); ++i)
+			polysOut[0].add(holes[i]);		
+	}
+	else
+	{
+		for(unsigned int i = 0; i < holes.size(); ++i)
+		{
+			TeLinearRing ring = holes[i];
+
+			vector<TePolygon> candidates;
+			vector<unsigned int> candidatesPos;
+
+			unsigned int j = 0;
+
+			for(j = 0; j < polysOut.size(); ++j)
+			{
+				if(TeWithinOrCoveredByOrEquals(ring.box(), polysOut[j].box()))
+				{
+					candidates.push_back(polysOut[j]);
+					candidatesPos.push_back(j);
+				}
+			}
+
+			if(candidates.size() == 1)
+			{
+				candidates[0].add(ring);
+				continue;
+			}
+
+			vector<TePolygon> newCandidates;
+
+			for(j = 0; j < candidates.size(); ++j)
+			{
+				short rel = TeBOUNDARY;
+
+				unsigned int nthVert = ring.size();
+				unsigned int iVert = 0u;
+
+				while(iVert < nthVert)
+				{
+					rel = TeRelation(ring[iVert], candidates[j][0]);
+
+					if(rel & TeINSIDE)
+					{				
+						newCandidates.push_back(candidates[j]);
+						break;
+					}
+					else if(rel & TeOUTSIDE)
+					{
+						break;
+					}
+				
+					++iVert;
+				}
+
+				if(iVert == nthVert)	
+				{
+// Topologycal error: every point is on ring boundary...
+					returnValue = false;
+
+					TePolygon topTest;
+					topTest.add(ring);
+
+					short whatRel = TeRelation(topTest, candidates[j]);
+
+// Se um buraco for igual ao exterior, existe um erro topologico
+// No momento, eliminamos o anel externo
+// e o interno... 
+// Se o buraco for coberto pelo poligono externo, entao ele ira ficar dentro deste
+// Caso contrario e erro sem possibilidades...
+					if(whatRel & TeEQUALS)
+					{						
+						polysOut.erase(candidatesPos[j]);
+						continue;
+					}
+				}				
+			}
+
+			if(newCandidates.size() <= 0)
+			{
+// Didn't find outer ring to this hole.
+				returnValue = false;
+				continue;
+			}
+
+			int idxMinArea = 0;
+			
+			double minArea = TeMAXFLOAT;
+
+			for(j = 0; j < newCandidates.size(); ++j)
+			{
+				if(TeGeometryArea(newCandidates[j].box()) < minArea)
+				{
+					idxMinArea = j;
+					minArea = TeGeometryArea(newCandidates[j].box());
+				}
+			}
+
+			newCandidates[idxMinArea].add(ring);
+		}
+	}
+
+	return returnValue;
+}
+
+// faz a tentativa ingenua!
+bool TeMergeFragmentsFB(TeOVERLAY::TeLineIndex& fragmentsIndex, TeLine2D& line)
+{
+	TeCoord2D endLineCoordinate = line[line.size() - 1];
+
+	TeOVERLAY::TeLineIndex::iterator indexIterator  = fragmentsIndex.begin();
+
+	while(indexIterator != fragmentsIndex.end())
+	{
+		if(TeEquals(endLineCoordinate, indexIterator->second.second[0]))
+		{
+			for(unsigned int i = 1; i < indexIterator->second.second.size(); ++i)
+				line.add(indexIterator->second.second[i]);
+
+			line.setBox(::TeUnion(line.box(), indexIterator->second.second.box()));
+			fragmentsIndex.erase(indexIterator);
+
+			return true;
+		}
+
+		++indexIterator;
+	}
+
+	return false;
+}
+
+// Make polygons from fragments.
+bool TeOVERLAY::TeMergeFragments(TeLineIndex& fragmentsIndex, vector<TeLinearRing>& rings, const bool& doExaustive)
+{
+	bool returnValue = true;
+
+	TeLine2D  lAux;	
+	TeCoord2D endLineCoordinate;
+
+	while(!(fragmentsIndex.empty()))
+	{
+		if(lAux.size() == 0)
+		{
+			TeLineIndex::iterator indexIterator  = fragmentsIndex.begin();
+			
+			if(indexIterator != fragmentsIndex.end())
+			{
+				if(indexIterator->second.second.isRing())
+				{
+					rings.push_back(indexIterator->second.second);
+					fragmentsIndex.erase(indexIterator);
+					continue;
+				}
+				
+				for(unsigned int i = 0; i < indexIterator->second.second.size(); ++i)
+					lAux.add(indexIterator->second.second[i]);
+
+				lAux.setBox(::TeUnion(lAux.box(), indexIterator->second.second.box()));
+
+				fragmentsIndex.erase(indexIterator);
+			}
+			else
+			{
+                returnValue = false;	//Nao poderia vir aqui, deveria ter saido no teste do laco!!
+			}
+		}	
+		else
+		{
+			endLineCoordinate = lAux[lAux.size() - 1];
+
+			// Try to find the beginning of the next fragment that is part of the polygon in the same list
+			TeLineIndex::iterator indexIterator = fragmentsIndex.find(endLineCoordinate);
+
+			if(indexIterator != fragmentsIndex.end())
+			{
+				for(unsigned int i = 1; i < indexIterator->second.second.size(); ++i)
+					lAux.add(indexIterator->second.second[i]);
+
+				lAux.setBox(::TeUnion(lAux.box(), indexIterator->second.second.box()));
+				fragmentsIndex.erase(indexIterator);
+			}			
+			else
+			{
+				if(doExaustive)
+				{
+					if(!TeMergeFragmentsFB(fragmentsIndex, lAux))
+					{
+	// Nao foi achada continuacao para a linha: nao fechou!
+						returnValue = false;	// Erro na topologia dos poligonos
+
+						// Clear auxiliary.
+						TeLine2D emptyLine;
+						lAux = emptyLine;
+					}
+				}
+				else
+				{
+					// Nao foi achada continuacao para a linha: nao fechou!
+					returnValue = false;	// Erro na topologia dos poligonos
+
+					// Clear auxiliary.
+					TeLine2D emptyLine;
+					lAux = emptyLine;
+				}
+			}
+			
+		}
+
+		if(lAux.isRing())
+		{  
+			// Add polygon
+			rings.push_back(TeLinearRing(lAux));
+			
+			// Clear auxiliary.
+			TeLine2D emptyLine;					
+			lAux = emptyLine;
+		}
+	}
+
+	if(lAux.size() > 0)
+		returnValue = false;	// Erro, alguma linha nao fechou!!!
+
+	return returnValue;
+}
+
+// For each linear ring, see it's orientation and classify in outer or inner ring
+bool TeOVERLAY::TeClassifyRings(vector<TeLinearRing>& rings, TePolygonSet& polsOut, vector<TeLinearRing>& holes)
+{
+	bool returnValue = true;
+
+	for(unsigned int z = 0; z < rings.size(); ++z)
+	{
+		short ori = TeOrientation(rings[z]);
+
+		if(ori == TeCOUNTERCLOCKWISE)	// It is a hole
+		{
+			holes.push_back(rings[z]);			// add to holes list
+		}
+		else if(ori == TeCLOCKWISE)		// else if island
+		{										// create a polygon
+			TePolygon p;
+			p.add(rings[z]);
+			polsOut.add(p);
+		}
+		else	
+		{
+			returnValue = false;	// Objeto sem area? Isso e um erro!
+		}
+	}
+
+	return returnValue;
+}
+
+// Seleciona os fragmentos quando existem dois conjuntos distintos: vermelho e azul
+void TeOVERLAY::TeRtreeGetFragments(const TePolygonSet& bluePolygons, TeINTERSECTOR2::TeSegmentRTree& blueTree, TeLineSet& redFragments, const short& locationFragments, short& mask, TeLineIndex& redFragmentsIndex, vector<TeLinearRing>& rings)
+{
+	//unsigned int lastId = redFragmentsIndex.size();
+
+	unsigned int redFragmentsSize = redFragments.size();	
+
+	TeBox b = blueTree.getBox();
+
+	for(unsigned int i = 0; i < redFragmentsSize; ++i)
+	{
+// Para cada fragmento vermelho escolhe um ponto para determinar a localizacao do fragmento
+		TeCoord2D middle;
+
+		unsigned int fragSize = redFragments[i].size();
+
+		TeCoord2D& cfrom = redFragments[i][0];
+		TeCoord2D& cto = redFragments[i][1];
+
+		if(fragSize ==  2)	// If the fragment has two points I need to check the middle point of this fragment.
+			TeOverlayMiddle(redFragments[i][0], redFragments[i][1], middle);
+		else	// If the fragment has more than two points so I check one point between the end points.
+			middle = redFragments[i][(unsigned int)((double(redFragments[i].size()) / 2.0 + 0.6)) - 1];
+
+// Monta um raio horizontal que vai ate o extremo de todos os poligonos, partindo do ponto medio (middle)
+		TeCoord2D c2 = middle;
+		c2.x_ = b.x2();
+
+		TeBox searchBox(middle, c2);
+
+		vector<TeINTERSECTOR2::TeSegIdInPolygonSet> segs;
+
+        blueTree.search(searchBox, segs);
+
+        unsigned int nSegsInter = segs.size();
+
+// se nao achou nenhum segmento cruzando o raio, significa que o fragmento esta todo fora
+		if(nSegsInter > 0)
+		{
+// ordena os segmentos azuis para permitir realizar o teste de ponto em poligono
+			sort(segs.begin(), segs.end(), segOrder());
+
+			bool inside_flag = false;
+
+			unsigned int currentPolId = segs[0].polId_;
+
+			double tx = middle.x();
+		    double ty = middle.y();
+
+			int yflag0, yflag1;
+
+			for(unsigned int j = 0; j < nSegsInter; ++j)
+			{
+// Se passamos aos segmentos de outro poligono, temos que zerar o numero de cruzamentos
+				if(currentPolId != segs[j].polId_)
+				{
+					if(inside_flag)
+						break;
+
+					currentPolId = segs[j].polId_;
+				}
+
+				const TeCoord2D& vtx0 = bluePolygons[segs[j].polId_][segs[j].lineId_][segs[j].segId_];
+				const TeCoord2D& vtx1 = bluePolygons[segs[j].polId_][segs[j].lineId_][segs[j].segId_ + 1];
+
+				if((fragSize == 2) && (TeIsOnSegment(middle, vtx0, vtx1)))
+				{
+					
+					if((TeEquals(vtx0, cfrom) || TeEquals(vtx0, cto)) && (TeEquals(vtx1, cfrom) || TeEquals(vtx1, cto)))
+					{
+						if(locationFragments & TeINSIDE)
+							inside_flag = false;
+						else
+							inside_flag = true;						
+
+						break;
+					}
+				}
+
+				yflag0 = (vtx0.y() >= ty);
+				yflag1 = (vtx1.y() >= ty);
+
+				if(yflag0 != yflag1)
+				{
+					if(((vtx1.y() - ty) * (vtx0.x() - vtx1.x()) >=
+						(vtx1.x() - tx) * (vtx0.y() - vtx1.y())) == yflag1)
+					{
+						inside_flag = !inside_flag ;
+					}
+				}
+			}
+
+// ao sair do laco acima, se inside_flag for verdadeiro, entao o fragmento esta dentro, caso contrario, ele esta fora
+			if(inside_flag && (locationFragments & TeINSIDE))
+			{
+				if(redFragments[i].isRing())
+					rings.push_back(redFragments[i]);
+				else
+					redFragmentsIndex.insert(TeLineIndex::value_type(redFragments[i][0], pair<unsigned int, TeLine2D>(i, redFragments[i])));
+
+				mask |= TeINSIDE;
+			}
+			else if(!inside_flag && (locationFragments & TeOUTSIDE))
+			{
+				if(redFragments[i].isRing())
+					rings.push_back(redFragments[i]);
+				else
+					redFragmentsIndex.insert(TeLineIndex::value_type(redFragments[i][0], pair<unsigned int, TeLine2D>(i, redFragments[i])));
+
+				mask |= TeOUTSIDE;
+			}
+		}
+		else	// fragmento esta fora
+		{
+// Se a localizacao do fragmento for compativel, pegamos ele.
+			if(locationFragments & TeOUTSIDE)
+			{
+				if(redFragments[i].isRing())
+					rings.push_back(redFragments[i]);
+				else
+					redFragmentsIndex.insert(TeLineIndex::value_type(redFragments[i][0], pair<unsigned int, TeLine2D>(i, redFragments[i])));
+			}
+
+			mask |= TeOUTSIDE;
+		}
+	}
+}
+
+// Operacao especial que descobre a localizacao do fragmento dentro do proprio conjunto: usado na operacao de uniao otimizada
+void TeOVERLAY::TeRtreeGetFragments(const TePolygonSet& polygons, TeINTERSECTOR2::TeSegmentRTree& tree, TeLineSet& fragments, vector<pair<unsigned int, unsigned int> >& fragmentsIds, const short& locationFragments, short& mask, TeLineIndex& fragmentsIndex, vector<TeLinearRing>& rings)
+{
+	unsigned int fragmentsSize = fragments.size();	
+
+	TeBox b = tree.getBox();
+
+	for(unsigned int i = 0; i < fragmentsSize; ++i)
+	{
+// Para cada fragmento escolhe um ponto para determinar a localizacao do fragmento
+		TeCoord2D middle;
+
+		unsigned int fragSize = fragments[i].size();
+
+		TeCoord2D& cfrom = fragments[i][0];
+		TeCoord2D& cto = fragments[i][1];
+
+		if(fragSize ==  2)	// If the fragment has two points I need to check the middle point of this fragment.
+			TeOverlayMiddle(fragments[i][0], fragments[i][1], middle);
+		else	// If the fragment has more than two points so I check one point between the end points.
+			middle = fragments[i][(unsigned int)((double(fragments[i].size()) / 2.0 + 0.6)) - 1];
+
+// Monta um raio horizontal que vai ate o extremo de todos os poligonos, partindo do ponto medio (middle)
+		TeCoord2D c2 = middle;
+		c2.x_ = b.x2();
+
+		TeBox searchBox(middle, c2);
+
+		vector<TeINTERSECTOR2::TeSegIdInPolygonSet> segs;
+
+        tree.search(searchBox, segs);
+
+        unsigned int nSegsInter = segs.size();
+
+// se nao achou nenhum segmento cruzando o raio, significa que o fragmento esta todo fora
+		if(nSegsInter > 0)
+		{
+// ordena os segmentos para permitir realizar o teste de ponto em poligono
+			sort(segs.begin(), segs.end(), segOrder());
+
+			bool inside_flag = false;
+
+			unsigned int currentPolId = segs[0].polId_;
+
+			double tx = middle.x();
+		    double ty = middle.y();
+
+			int yflag0, yflag1;
+
+			for(unsigned int j = 0; j < nSegsInter; ++j)
+			{
+// Se passamos aos segmentos de outro poligono, temos que zerar o numero de cruzamentos
+				if(currentPolId != segs[j].polId_)
+				{
+					if(inside_flag)
+						break;
+
+					currentPolId = segs[j].polId_;
+				}
+
+// Se os segmentos que estamos tratando sao do fratgmento, entao pulamos
+				if(segs[j].polId_ == fragmentsIds[i].first)
+					continue;
+
+				const TeCoord2D& vtx0 = polygons[segs[j].polId_][segs[j].lineId_][segs[j].segId_];
+				const TeCoord2D& vtx1 = polygons[segs[j].polId_][segs[j].lineId_][segs[j].segId_ + 1];
+
+				if((fragSize == 2) && (TeIsOnSegment(middle, vtx0, vtx1)))
+				{
+					
+					if((TeEquals(vtx0, cfrom) || TeEquals(vtx0, cto)) && (TeEquals(vtx1, cfrom) || TeEquals(vtx1, cto)))
+					{
+						if(locationFragments & TeINSIDE)
+							inside_flag = false;
+						else
+							inside_flag = true;
+
+						break;
+					}
+				}
+
+				yflag0 = (vtx0.y() >= ty);
+				yflag1 = (vtx1.y() >= ty);
+
+				if(yflag0 != yflag1)
+				{
+					if(((vtx1.y() - ty) * (vtx0.x() - vtx1.x()) >=
+						(vtx1.x() - tx) * (vtx0.y() - vtx1.y())) == yflag1)
+					{
+						inside_flag = !inside_flag ;
+					}
+				}
+			}
+
+// ao sair do laco acima, se inside_flag for verdadeiro, entao o fragmento esta dentro, caso contrario, ele esta fora
+			if(inside_flag && (locationFragments & TeINSIDE))
+			{
+				if(fragments[i].isRing())
+					rings.push_back(fragments[i]);
+				else
+					fragmentsIndex.insert(TeLineIndex::value_type(fragments[i][0], pair<unsigned int, TeLine2D>(i, fragments[i])));
+			}
+			else if(!inside_flag && (locationFragments & TeOUTSIDE))
+			{
+				if(fragments[i].isRing())
+					rings.push_back(fragments[i]);
+				else
+					fragmentsIndex.insert(TeLineIndex::value_type(fragments[i][0], pair<unsigned int, TeLine2D>(i, fragments[i])));
+			}
+
+		}
+		else	// fragmento esta fora
+		{
+// Se a localizacao do fragmento for compativel, pegamos ele.
+			if(locationFragments & TeOUTSIDE)
+			{
+				if(fragments[i].isRing())
+					rings.push_back(fragments[i]);
+				else
+					fragmentsIndex.insert(TeLineIndex::value_type(fragments[i][0], pair<unsigned int, TeLine2D>(i, fragments[i])));
+			}
+
+			mask |= TeOUTSIDE;
+		}
+	}
+}
+
+// Operacao especial que descobre a localizacao do fragmento dentro do proprio conjunto: usado na operacao de uniao otimizada
+void TeOVERLAY::TeRtreeRemoveFragments(const TePolygonSet& polygons, TeINTERSECTOR2::TeSegmentRTree& tree,
+		TeLineIndex &lineIndex, vector<pair<unsigned int, unsigned int> >& fragmentsIds,
+		const short& locationFragments, short& mask, vector<TeLinearRing>& /* rings */)
+{
+	TeBox b = tree.getBox();
+
+	TeLineIndex::iterator indexIterator = lineIndex.begin();
+	
+	while(indexIterator != lineIndex.end())
+	{
+		TeCoord2D middle;
+		TeOverlayMiddle(indexIterator->second.second[0], indexIterator->second.second[1], middle);
+
+		// Monta um raio horizontal que vai ate o extremo de todos os poligonos, partindo do ponto medio (middle)
+		TeCoord2D c2 = middle;
+		c2.x_ = b.x2();
+
+		TeBox searchBox(middle, c2);
+
+		vector<TeINTERSECTOR2::TeSegIdInPolygonSet> segs;
+
+        tree.search(searchBox, segs);
+
+        unsigned int nSegsInter = segs.size();
+
+		// se nao achou nenhum segmento cruzando o raio, significa que o fragmento esta todo fora
+		if(nSegsInter > 0)
+		{
+// ordena os segmentos para permitir realizar o teste de ponto em poligono
+			sort(segs.begin(), segs.end(), segOrder());
+
+			bool inside_flag = false;
+
+			unsigned int currentPolId = segs[0].polId_;
+
+			double tx = middle.x();
+		    double ty = middle.y();
+
+			int yflag0, yflag1;
+
+			for(unsigned int j = 0; j < nSegsInter; ++j)
+			{
+// Se passamos aos segmentos de outro poligono, temos que zerar o numero de cruzamentos
+				if(currentPolId != segs[j].polId_)
+				{
+					if(inside_flag)
+						break;
+
+					currentPolId = segs[j].polId_;
+				}
+
+// Se os segmentos que estamos tratando sao do fragmento, entao pulamos
+				if(segs[j].polId_ == fragmentsIds[indexIterator->second.first].first)
+					continue;
+
+				const TeCoord2D& vtx0 = polygons[segs[j].polId_][segs[j].lineId_][segs[j].segId_];
+				const TeCoord2D& vtx1 = polygons[segs[j].polId_][segs[j].lineId_][segs[j].segId_ + 1];
+
+				// o ponto esta no segmeto de vertices vtx0 e vtx1?
+				// se sim setar inside_flag como false e avancar o j ate mudar de poligino e pula pro inicio dessa secao (continue)
+				if(TeIsOnSegment(middle, vtx0, vtx1))
+				{
+					inside_flag = false;
+
+					while((j < nSegsInter) && currentPolId == segs[j].polId_)
+						++j;
+
+					if(j >= nSegsInter)
+						break;
+
+					--j;
+
+					continue;
+				}
+
+				yflag0 = (vtx0.y() >= ty);
+				yflag1 = (vtx1.y() >= ty);
+
+				if(yflag0 != yflag1)
+				{
+					if(((vtx1.y() - ty) * (vtx0.x() - vtx1.x()) >=
+						(vtx1.x() - tx) * (vtx0.y() - vtx1.y())) == yflag1)
+					{
+						inside_flag = !inside_flag ;
+					}
+				}
+			}
+
+// ao sair do laco acima, se inside_flag for verdadeiro, entao o fragmento esta dentro, caso contrario, ele esta fora
+			if(inside_flag && (locationFragments & TeINSIDE))
+			{
+				TeLineIndex::iterator it_aux =	indexIterator;
+				++(indexIterator);
+				lineIndex.erase(it_aux);				
+			}
+			else if(!inside_flag && (locationFragments & TeOUTSIDE))
+			{
+				TeLineIndex::iterator it_aux =	indexIterator;
+				++(indexIterator);
+				lineIndex.erase(it_aux);
+			}
+			else
+			{
+				++(indexIterator);
+			}
+
+		}
+		else	// fragmento esta fora
+		{
+// Se a localizacao do fragmento for compat�vel, pegamos ele.
+			if(locationFragments & TeOUTSIDE)
+			{
+				TeLineIndex::iterator it_aux =	indexIterator;
+				++(indexIterator);
+				lineIndex.erase(it_aux);				
+			}
+			else
+			{
+				++(indexIterator);
+			}
+
+			mask |= TeOUTSIDE;
+		}
+	}
+}
+
+// estrutura auxiliar utilizada no codigo do split
+struct TeSplitCoordSort
+{
+	bool operator()(pair<unsigned int, TeCoord2D> p1, pair<unsigned int, TeCoord2D> p2) const
+	{
+		if(p1.second.x() < p2.second.x())
+			return true;	
+		if(p1.second.x() > p2.second.x())
+			return false;
+		if(p1.second.y() < p2.second.y())
+			return true;	
+		if(p1.second.y() > p2.second.y())
+			return false;
+		if(p1.first < p2.first)
+			return true;
+
+		return false;
+	}
+};
+
+// estrutura auxiliar utilizada no codigo do split
+struct TeSIP
+{
+	vector<unsigned int>	indexes_;		
+	TeCoord2D				coord_;
+	bool					used_;
+
+	TeSIP() 
+	{
+	}
+
+	TeSIP(const TeCoord2D& coord)
+	{
+		indexes_.clear();
+		coord_ = coord;		
+		used_ = false;
+	}
+
+	bool exists(const unsigned int index)
+	{
+		for(unsigned int i = 0; i < indexes_.size(); i++)
+		{
+			if(index == indexes_[i])
+			{
+				return true;
+			}
+		}
+		return false;
+	}
+
+	unsigned int getFirstIndex()
+	{
+		unsigned int first = indexes_[0];
+		for(unsigned int i = 1; i < indexes_.size(); i++)
+		{
+			if(indexes_[i] < first)
+			{
+				first = indexes_[i];
+			}
+		}
+		return first;
+	}
+	unsigned int getLastIndex()
+	{
+		unsigned int last = indexes_[0];
+		for(unsigned int i = 1; i < indexes_.size(); i++)
+		{
+			if(indexes_[i] > last)
+			{
+				last = indexes_[i];
+			}
+		}
+		return last;
+	}
+};
+
+// funcao auxiliar
+inline bool TeSEquals(const TeCoord2D& c1, const TeCoord2D& c2)
+{
+	return (c1.x() == c2.x()) && (c1.y() == c2.y());
+}
+
+// estrutura auxiliar do split
+struct TeSFragment
+{
+	unsigned int	initialIndex_; //indice da coordenada inicial do fragmento
+	TeLine2D		line_;
+
+	TeSFragment()
+	{
+	}
+
+	TeSFragment(const unsigned int &initialIndex, const TeCoord2D &coord)
+	{
+		initialIndex_ = initialIndex;
+		line_.add(coord);
+	}
+};
+
+// Make rings from split fragments
+inline bool TeSMergeFragments(vector<TeSFragment> &fragments, vector<TeLinearRing>& rings)
+{
+	unsigned int fragmentsSize = fragments.size();
+
+	TeOVERLAY::TeLineIndex fragmentsIndex;
+
+	for(unsigned int i = 0; i < fragmentsSize; ++i)
+
+		fragmentsIndex.insert(TeOVERLAY::TeLineIndex::value_type(fragments[i].line_[0], pair<unsigned int, TeLine2D>(0, fragments[i].line_)));
+	return TeOVERLAY::TeMergeFragments(fragmentsIndex, rings);}
+
+
+bool TeOVERLAY::TeSplitRing(TeLinearRing& ring, TeLineSet& ringsOut)
+{
+	ringsOut.clear();
+
+	unsigned int ringSize = ring.size();
+
+	if(ringSize == 0)
+		return false;
+	
+//vector para armazenar os pontos da linha e sua respectiva posicao
+	vector< pair<unsigned int, TeCoord2D> > vecCoords;
+
+//adiciona os segmentos num vector de pontos, contendo o indice e a coordenada
+	for(unsigned int i = 0; i < ringSize; i++)
+	{
+		vecCoords.push_back( pair<unsigned int, TeCoord2D>(i, ring[i]));
+	}
+	unsigned int vecCoordsSize = vecCoords.size();
+
+	sort(vecCoords.begin(), vecCoords.end(), TeSplitCoordSort());
+
+	vector<TeSIP> ips;
+
+	bool usou = false;
+	//varre todas as coordenadas procurando por pontos de interseccao
+	for(unsigned int i = 1; i < vecCoordsSize; i++)
+	{	
+		//se o ponto corrente for igual ao anterior, entao existe interseccao
+		if(TeSEquals(vecCoords[i-1].second, vecCoords[i].second))
+		{
+			//armazenamos o ponto de interseccao e todos os indices em que este ponto apareceu
+			if(!usou)
+			{
+				//na primeira vez, criamos o ponto de interseccao
+				TeSIP ip(vecCoords[i].second);
+				ip.indexes_.push_back(vecCoords[i-1].first);
+				ip.indexes_.push_back(vecCoords[i].first);
+
+				ips.push_back(ip);
+
+				usou = true;
+			}
+			else
+			{
+				//da segunda em diante, apenas anotamos o indice em que este ponto apareceu
+				ips[ips.size() - 1].indexes_.push_back(vecCoords[i].first);				
+			}
+		}
+		else
+		{
+			usou = false;
+		}		
+	}
+
+	//so existe interseccao entre o inicio e o fim do pol
+	if(ips.size() == 1)
+	{
+		ringsOut.add(ring);	
+		return true;
+	}
+
+	//Gera os fragmentos
+	vector< TeSFragment > fragments;
+	TeSFragment currentFragment(0, ring[0]);
+
+	//vamos remontar a linha
+	for(unsigned int i = 1; i < ringSize; i++)
+	{		
+		unsigned int currentIPindex = 0;
+		bool isIP = false;
+		//verifica se o ponto corrente e um ponto de interseccao
+		for(unsigned j = 0; j < ips.size(); j++)
+		{
+			if(ips[j].exists(i))
+			{				
+				currentIPindex = j;
+				isIP = true;
+				break;
+			}
+		}		
+
+		///adiciono a coordenada corrente ao fragmento corrente
+		currentFragment.line_.add(ring[i]);
+
+		if(isIP)
+		{
+			//se fechou um anel, adiciona na lista de aneis
+			// e remove o ponto de interseccao corrente
+			if(currentFragment.line_.isRing())
+			{
+				ringsOut.add(currentFragment.line_);
+			}
+			else
+			{
+				//verifica se o IP ja passamos por este IP alguma vez
+				//se ja passamos, vamos formar um poligono com os fragmentos entre eles
+				if(ips[currentIPindex].used_)
+				{					
+					//se nao foi formado um anel, pegamos todos os fragmentos entre estes pontos de interseccao e
+					//tentamos formar um anel
+					unsigned int firstIndex = ips[currentIPindex].getFirstIndex();
+					unsigned int lastIndex = ips[currentIPindex].getLastIndex();
+
+					vector<unsigned int> remover;
+					vector< TeSFragment > auxFragments;
+					auxFragments.push_back(currentFragment);
+					for(unsigned int j = 0; j<fragments.size(); j++)
+					{			
+						if(fragments[j].initialIndex_ >= firstIndex &&  fragments[j].initialIndex_ < lastIndex )
+						{
+							remover.push_back(j);
+							auxFragments.push_back(fragments[j]);
+						}
+					}
+					vector<TeLinearRing> r;
+					if(auxFragments.size() >=2 && TeSMergeFragments(auxFragments, r))
+					{
+						for(unsigned int t = 0; t < r.size(); t++)
+						{
+							ringsOut.add(r[t]);
+						}
+
+						for(int j = remover.size()-1; j >= 0; j--)
+						{
+							fragments.erase(fragments.begin() + remover[j]);
+						}
+						ips[currentIPindex].used_ = false;
+					}
+					else
+					{
+						fragments.push_back(currentFragment);
+					}
+				}
+				else
+				{
+					fragments.push_back(currentFragment);
+					ips[currentIPindex].used_ = true;
+				}				
+			}
+
+			currentFragment = TeSFragment (i, ring[i]);			
+		}
+	}
+	
+	if(fragments.size() > 1)
+	{
+		vector<TeLinearRing> r;
+		if(TeSMergeFragments(fragments, r))
+		{
+			for(unsigned int t = 0; t < r.size(); t++)
+			{
+				ringsOut.add(r[t]);
+			}
+		}
+		else
+		{
+			return false;
+		}
+	}
+	else if(fragments.size() == 1)
+	{
+		return false;	
+	}
+
+	for(unsigned int i = 0; i < ringsOut.size(); i++)
+	{
+		ringsOut[i].objectId(ring.objectId());
+		ringsOut[i].geomId(ring.geomId());
+	}
+
+	return true;
+} 
+
+bool TeOVERLAY::TeSplitRings(vector<TeLinearRing>& rings, vector<TeLinearRing>& ringsOut)
+{
+	ringsOut.clear();
+
+	for(unsigned int i = 0; i < rings.size(); ++i)
+	{
+		TeLineSet ringsAux;
+		
+		if(TeOVERLAY::TeSplitRing(rings[i], ringsAux) == false)
+			return false;
+
+		for(unsigned int j = 0; j < ringsAux.size(); ++j)
+			ringsOut.push_back(ringsAux[j]);
+	}
+
+	return true;
+}
+
+bool TeOVERLAY::TeCloneLine(const TeLine2D& lineIn, TeLine2D& lineOut, const unsigned int& minPts)
+{
+	lineOut.clear();
+
+	unsigned int lineSize = lineIn.size();
+
+	if(lineSize < 2)
+		return false;
+
+	lineOut.add(lineIn[0]);
+
+	for(unsigned int i = 1; i < lineSize; ++i)
+	{
+		if(!TeEquals(lineIn[i - 1], lineIn[i]))
+		{
+			lineOut.add(lineIn[i]);
+		}
+	}
+
+	if(lineOut.size() < minPts)
+		return false;
+
+	return true;
+}
+
+
+bool TeOVERLAY::TeClonePolygon(const TePolygon& polIn, TePolygon& polOut)
+{
+	polOut.clear();
+
+	unsigned int polSize = polIn.size();
+
+	if(polSize == 0)
+		return false;
+
+	for(unsigned int i = 0; i < polSize; ++i)
+	{
+		TeLine2D lineOut;
+
+		if(!TeCloneLine(polIn[i], lineOut, 4))
+			return false;
+
+		TeLinearRing ringOut(lineOut);
+
+		polOut.add(ringOut);
+	}
+
+	return true;
+}
+
+bool TeOVERLAY::TeClonePolygonSet(const TePolygonSet& polsIn, TePolygonSet& polsOut)
+{
+	polsOut.clear();
+
+	unsigned int polsSize = polsIn.size();
+
+	if(polsSize == 0)
+		return false;
+
+	for(unsigned int i = 0; i < polsSize; ++i)
+	{
+		TePolygon pol;
+
+		if(!TeClonePolygon(polsIn[i], pol))
+			return false;
+
+		polsOut.add(pol);
+	}
+
+	return true;
+}
+
diff --git a/src/terralib/kernel/TeOverlayUtils.h b/src/terralib/kernel/TeOverlayUtils.h
new file mode 100755
index 0000000..928847e
--- /dev/null
+++ b/src/terralib/kernel/TeOverlayUtils.h
@@ -0,0 +1,172 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/**
+ * @file TeOverlayUtils.h
+ * @brief This file contains support algorithms for set operations.
+ * These data structures and algorithms MUST BE USED ONLY BY TerraLib kernel and should NOT be used by anyone.
+ * THIS IS FOR INTERNAL USE ONLY.
+ */
+
+/** @ingroup SetOperations
+    THIS IS FOR INTERNAL USE ONLY: TerraLib set operation auxiliary functions. 
+ *  @{
+ */
+
+#ifndef  __TERRALIB_INTERNAL_OVERLAYUTILS_H
+#define  __TERRALIB_INTERNAL_OVERLAYUTILS_H
+
+// STL's include
+#include <map>
+#include <vector>
+#include <algorithm>
+using namespace std;
+
+#include "TeGeometry.h"
+#include "TeIntersector.h"
+
+
+namespace TeOVERLAY
+{
+
+//---------------- Auxiliary structures ----------------//
+//! Defines a functor for coordinate order during map insert and retrival: lexicograpgical order (xy)
+struct TL_DLL xyOrder
+{
+	//! Default operation for 'less than' tests.
+	bool operator()(const TeCoord2D& c1, const TeCoord2D& c2) const
+	{
+		if(c1.x_ < c2.x_)
+			return true;
+
+		if(c1.x_ > c2.x_)
+			return false;
+
+		if(c1.y_ < c2.y_)
+			return true;		
+
+		return false;
+	}
+};
+
+//! Type to index fragments end points: used during merge fase.
+typedef multimap<TeCoord2D, pair<unsigned int, TeLine2D>, xyOrder> TeLineIndex;
+
+//! Defines a functor for ordering segments during point in poly tests.
+struct TL_DLL segOrder
+{
+	//! Default operation for 'less than' tests.
+	bool operator()(const TeINTERSECTOR2::TeSegIdInPolygonSet& ip1, const TeINTERSECTOR2::TeSegIdInPolygonSet& ip2) const
+	{
+		if(ip1.polId_ < ip2.polId_)
+			return true;		
+
+		return false;
+	}
+};
+//---------------- Auxiliary operations for overlay ----------------//
+
+//! Verifies orientation for each line of polygon set, and reverse the orientation if need
+TL_DLL void TeFixOrientation(TePolygonSet& polSet, const short& outerOrientationToReverse, const short& innerOrientationToReverse);
+
+
+//! For each operation (union, intersection and difference) defines location for retrieval of fragments
+TL_DLL void TeChooseBoundaryLocation(const short& operation, short& locationRedFragments, short& locationBlueFragments);
+
+
+//! Erases from fragmentsIndex boundary fragments that are in oposite direction: each fragment must have a unique identifier in the pair first field (pair<unsigned int, TeLine2D>)
+TL_DLL void TeRemoveOpositeBoundaryFragments(TeLineIndex& fragmentsIndex);
+
+
+//! Erases from fragmentsIndex boundary fragments that are equals to another boundary fragment
+TL_DLL void TeRemoveSameBoundaryFragments(TeLineIndex& fragmentsIndex);
+
+//! Merge fragments ito first index (fragmentsIndex)
+TL_DLL void TeJoinFragments(TeLineIndex& fragmentsIndex, TeLineIndex& boundaryFragmentsIndex);
+
+//! Moves closed rings from fragmentsIndex to rins vector
+TL_DLL void TeFindAndMoveClosedRings(TeLineIndex& fragmentsIndex, vector<TeLinearRing>& rings);
+
+//! Gets a polygonset with outer rings and a vector with holes and try to find to what polygon the hole belongs to
+TL_DLL bool TeMountTopology(TePolygonSet& polysOut, vector<TeLinearRing>& holes);
+
+//! Make polygons from fragments.
+TL_DLL bool TeMergeFragments(TeLineIndex& fragmentsIndex, vector<TeLinearRing>& rings, const bool& doExaustive = false);
+
+//! For each linear ring, see it's orientation and classify in outer or inner ring
+TL_DLL bool TeClassifyRings(vector<TeLinearRing>& rings, TePolygonSet& polsOut, vector<TeLinearRing>& holes);
+
+//! Find fragments in the red set that satisfies locationFragments using blue set as reference
+TL_DLL void TeRtreeGetFragments(const TePolygonSet& bluePolygons, TeINTERSECTOR2::TeSegmentRTree& blueTree, TeLineSet& redFragments, const short& locationFragments, short& mask, TeLineIndex& redFragmentsIndex, vector<TeLinearRing>& rings);
+
+//! Find fragments in the same set that satisfies locationFragments
+TL_DLL void TeRtreeGetFragments(const TePolygonSet& polygons, TeINTERSECTOR2::TeSegmentRTree& tree, TeLineSet& fragments, vector<pair<unsigned int, unsigned int> >& fragmentsIds, const short& locationFragments, short& mask, TeLineIndex& fragmentsIndex, vector<TeLinearRing>& rings);
+
+//! Removes fragments that may overlap with others: used in special cases during union process
+TL_DLL void TeRtreeRemoveFragments(const TePolygonSet& polygons, TeINTERSECTOR2::TeSegmentRTree& tree, TeLineIndex &lineIndex, vector<pair<unsigned int, unsigned int> >& fragmentsIds, const short& locationFragments, short& mask, vector<TeLinearRing>& rings);
+
+//! Split rings if they have commom end points.
+/*
+	\param  ring		Ring to be broken.
+	\param  ringsOut	Resulting rings.
+	\return				Returns true if the operation successed otherwise returns false.
+ */
+TL_DLL bool TeSplitRing(TeLinearRing& ring, TeLineSet& ringsOut);
+
+//! Split rings if they have commom end points.
+/*
+	\param  rings		A vector of linear rings to be broken.
+	\param  ringsOut	Resulting rings.
+	\return				Returns true if the operation successed otherwise returns false.
+ */
+TL_DLL bool TeSplitRings(vector<TeLinearRing>& rings, vector<TeLinearRing>& ringsOut);
+
+//! Clone line point removing duplicated coordinates.
+/*
+	\param lineIn   Line to ble cloned.
+	\param lineOut  Cloned line without repeated points.  
+	\param minPts	This is a constant to check if the cloned line has the minimum number of points.
+	\return         Returns true if the operation successed otherwise returns false.
+ */
+TL_DLL bool TeCloneLine(const TeLine2D& lineIn, TeLine2D& lineOut, const unsigned int& minPts);
+
+//! Clone polygon lines and try to remove duplicated coordinates from lines.
+/*
+	\param polIn       Polygon to be cloned.
+	\param polOut      Cloned polygon without repeated points.
+	\return            Returns true if the operation successed otherwise returns false.
+ */
+TL_DLL bool TeClonePolygon(const TePolygon& polIn, TePolygon& polOut);
+
+//! Clone polygons lines and try to remove duplicated coordinates from lines.
+/*
+	\param polsIn       Polygons to be cloned.
+	\param polsOut      Cloned polygons without repeated points.
+	\return             Returns true if the operation successed otherwise returns false.
+ */
+TL_DLL bool TeClonePolygonSet(const TePolygonSet& polsIn, TePolygonSet& polsOut);
+
+}	// end namespace TeOVERLAY
+
+#endif	// __TERRALIB_INTERNAL_OVERLAYUTILS_H
+
+
diff --git a/src/terralib/kernel/TePieBar.h b/src/terralib/kernel/TePieBar.h
old mode 100644
new mode 100755
index 015b339..32f9b11
--- a/src/terralib/kernel/TePieBar.h
+++ b/src/terralib/kernel/TePieBar.h
@@ -1,7 +1,35 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TePieBar.h
+    \brief This file contains a class that represents a char (pie or bar)  
+*/
 #ifndef TEPIEBAR_H
 #define TEPIEBAR_H
 
-class TePieBar
+#include "TeDefines.h"
+
+//! A class that represents a chart (pie or bar)
+class TL_DLL TePieBar
 {
 public:
 	enum			TePieBarInput {ALL, TABSEL, QUERYSEL, LEGEND, NOTTABSEL, NOTQUERYSEL, NOTLEGEND};
diff --git a/src/terralib/kernel/TePrecision.h b/src/terralib/kernel/TePrecision.h
old mode 100644
new mode 100755
index ec4ae4d..a463571
--- a/src/terralib/kernel/TePrecision.h
+++ b/src/terralib/kernel/TePrecision.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,38 +20,42 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
+/*! \file  TePrecision.h
+    \brief This file contains a singleton to manage precision in TerraLib.
+*/
 #ifndef  __TERRALIB_INTERNAL_PRECISION_H
 #define  __TERRALIB_INTERNAL_PRECISION_H
 
 #include "TeSingleton.h"
 #include "TeDefines.h"
 
-//! Describes a class for supporting, scale and represetation dependet, approximation calculations
-//! \sa TeSingleton
-class TePrecision: public TeSingleton<TePrecision>
+//! Describes a class for supportin scale and representation dependency 
+/*! The entire set of geometric algorithms make use of this class,
+    an so it must be properly set. It will be used when dealling with approximate calculus
+	\sa TeSingleton 
+*/
+class TL_DLL TePrecision: public TeSingleton<TePrecision>
 {
 public:
+	//! Destructor
+	~TePrecision() {}
 
-		~TePrecision() {}
-
-		friend class TeSingleton<TePrecision>;
+	friend class TeSingleton<TePrecision>;
 
-//! Sets the precision value to be considered
-		void setPrecision ( double precision )
-		{ precision_ = precision; }
+	//! Sets the precision value to be considered
+	void setPrecision ( double precision )
+	{ precision_ = precision; }
 
-//! Returns the precision value in use
-		double	precision ()
-		{ return precision_; }
+	//! Returns the precision value in use
+	double	precision ()
+	{ return precision_; }
 
 protected:
-		
+	//! Constructor
 	TePrecision(): precision_ ( TeMINFLOAT )
 	{}
 
-	double precision_;
+	double precision_;	//!< Stores the precision.
 };
 
 #endif
-
diff --git a/src/terralib/kernel/TeProgress.cpp b/src/terralib/kernel/TeProgress.cpp
old mode 100644
new mode 100755
index f14dbc6..35b0d0a
--- a/src/terralib/kernel/TeProgress.cpp
+++ b/src/terralib/kernel/TeProgress.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -25,6 +25,12 @@ of this library and its documentation.
 
 TeProgressBase* TeProgress::instance_ = 0;
 
+
+TeProgressBase* TeProgress::instance()
+{
+	return instance_;
+}
+
 void TeProgress::setProgressInterf( TeProgressBase* interf )
 {
 	instance_ = interf;
diff --git a/src/terralib/kernel/TeProgress.h b/src/terralib/kernel/TeProgress.h
old mode 100644
new mode 100755
index 9e15aae..a7efbfb
--- a/src/terralib/kernel/TeProgress.h
+++ b/src/terralib/kernel/TeProgress.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,6 +20,9 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
+/*! \file  TeProgress.h
+    \brief This file contains a singleton for progress information.
+*/
 
 #ifndef  __TERRALIB_INTERNAL_PROGRESS_H
 #define  __TERRALIB_INTERNAL_PROGRESS_H
@@ -31,36 +34,34 @@ of this library and its documentation.
 	This class is based on a Singleton Design Pattern (See "Design Patterns" book, page 127).
 	Applications should set the Progress Interface that will be used by the TerraLib routines
 	able to indicate progress in executing a task.
-
 */
-class TeProgress {
-
+class TL_DLL TeProgress
+{
 public:
 
 	//! Returns the unique instance of a progress interface
-	static TeProgressBase* instance()
-	{ 
-		return	instance_;
-	}
-	
+	static TeProgressBase* instance();
+
 	//! Sets the unique instance of a progress interface
 	static void setProgressInterf( TeProgressBase* interf );
 
+	//! Virtual destructor
 	virtual ~TeProgress() {}  
 
 protected:
 
-//! Empty
+	//! Empty constructor
 	TeProgress() {}
 
 private:
-	//! The unique instance of a progress interface
-	static TeProgressBase* instance_;
+	
+	static TeProgressBase* instance_;	//!< The unique instance of a progress interface
 
-// No copy allowed
+	//! No copy allowed
 	TeProgress(const TeProgress&);
+
+	//! No copy allowed
 	TeProgress& operator=(const TeProgress&){return *this;}
 };
-
 #endif
 
diff --git a/src/terralib/kernel/TeProgressBase.h b/src/terralib/kernel/TeProgressBase.h
old mode 100644
new mode 100755
index 2240328..49ae3ce
--- a/src/terralib/kernel/TeProgressBase.h
+++ b/src/terralib/kernel/TeProgressBase.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,10 +20,13 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
+/*! \file  TePrecision.h
+    \brief This file contains a singleton to manage precision in TerraLib.
+*/
 #ifndef  __TERRALIB_INTERNAL_PROGRESSBASE_H
 #define  __TERRALIB_INTERNAL_PROGRESSBASE_H
 
+#include "TeDefines.h"
 #include <string>
 using std::string;
 
@@ -35,7 +38,7 @@ using std::string;
 	indication. A progress interface also know the total number of steps 
 	required to finish the task being monitored.
 */
-class TeProgressBase
+class TL_DLL TeProgressBase
 {
 public:
 
diff --git a/src/terralib/kernel/TeProject.cpp b/src/terralib/kernel/TeProject.cpp
new file mode 100755
index 0000000..53f5e8d
--- /dev/null
+++ b/src/terralib/kernel/TeProject.cpp
@@ -0,0 +1,291 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright  2001-2006 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+#include "TeProject.h"
+#include "TeDatabase.h"
+
+TeProject::TeProject():
+	id_(-1),
+	name_(""),
+	description_(""), 
+	currentViewIndex_(-1),
+	db_(0)
+{}
+
+//! Constructor from a identifier
+TeProject::TeProject(int id, TeDatabase* db):
+	id_(id),
+	name_(""),
+	description_(""), 
+	currentViewIndex_(-1),
+	db_(db)
+{
+	if (!db)
+		return;
+	string sql  = "SELECT name, description, current_view, view_id ";
+	       sql += "FROM te_project INNER JOIN te_project_view ON te_project.project_id = te_project_view.project_id";
+		   sql += " WHERE te_project.project_id = " + Te2String(id);
+	sql += Te2String(id);
+	TeDatabasePortal* portal = db->getPortal();
+	if (!portal->query(sql) || !portal->fetchRow())
+	{
+		delete portal;
+		return;
+	}
+	// use the first fetch to get basic information
+	name_ = portal->getData(0);
+	description_ = portal->getData(1);
+	int currentview = portal->getInt(2);
+	int viewid = portal->getInt(3);
+	views_.push_back(portal->getInt(3));
+	if (viewid == currentview)
+		currentViewIndex_ = 0;
+
+	// get the other views
+	while (portal->fetchRow())
+	{
+		viewid = portal->getInt(3);
+		views_.push_back(viewid);
+		if (viewid == currentview)
+			currentViewIndex_ = views_.size()-1;
+	}
+	delete portal;
+}
+
+	//! Constructor from a name
+TeProject::TeProject(const string& name, TeDatabase* db):
+	id_(-1),
+	name_(name),
+	description_(""), 
+	currentViewIndex_(-1),
+	db_(db)
+{
+	if (!db)
+		return;
+	string sql  = "SELECT te_project.project_id, description, current_view, view_id ";
+	       sql += "FROM te_project INNER JOIN te_project_view ON te_project.project_id = te_project_view.project_id";
+		   sql += " WHERE name = '" + name + "'";
+
+	TeDatabasePortal* portal = db->getPortal();
+	if (!portal->query(sql) || !portal->fetchRow())
+	{
+		delete portal;
+		return;
+	}
+	// use the first fetch to get basic information
+	id_ = portal->getInt(0);
+	description_ = portal->getData(1);
+	int currentview = portal->getInt(2);
+	int viewid = portal->getInt(3);
+	views_.push_back(portal->getInt(3));
+	if (viewid == currentview)
+		currentViewIndex_ = 0;
+
+	// get the other views
+	while (portal->fetchRow())
+	{
+		viewid = portal->getInt(3);
+		views_.push_back(viewid);
+		if (viewid == currentview)
+			currentViewIndex_ = views_.size()-1;
+	}
+	delete portal;
+}
+
+TeProject::TeProject(const TeProject& other)
+{
+	id_ = other.id_;
+	name_= other.name_;
+	description_= other.description_; 
+	views_= other.views_;
+	currentViewIndex_= other.currentViewIndex_;
+	db_= other.db_;
+}
+
+TeProject& 
+TeProject::operator= (const TeProject& other)
+{
+	if ( this != &other )
+	{
+		id_ = other.id_;
+		name_= other.name_;
+		description_= other.description_; 
+		views_= other.views_;
+		currentViewIndex_= other.currentViewIndex_;
+		db_= other.db_;
+	}
+	return *this;
+}
+
+//! Destructor
+TeProject::~TeProject()
+{
+	views_.clear();
+	db_=0;
+}
+
+	//! Returns TRUE if a view is part of a project and FALSE otherwise
+bool 
+TeProject::isProjectView(int viewId)
+{
+	TeViewVector::iterator it = find(views_.begin(), views_.end(), viewId);
+	return (it != views_.end());
+}
+
+	//! Returns TRUE if a project has a current view and FALSE otherwise
+bool
+TeProject::hasCurrentView()
+{	return (currentViewIndex_>=0 && currentViewIndex_< static_cast<int>(views_.size())); }
+
+
+//! Returns the id of the current view in the project 
+int
+TeProject::getCurrentViewId()
+{
+	if (currentViewIndex_>=0 && currentViewIndex_< static_cast<int>(views_.size()))
+		return views_[currentViewIndex_];
+	else
+		return -1;
+}
+
+//! Sets the id of the current view in the project 
+void 
+TeProject::setCurrentViewId(int viewId)
+{
+	currentViewIndex_ = -1;
+	for (unsigned int i=0; i<views_.size(); ++i)
+	{
+		if (views_[i] == viewId)
+		{
+			currentViewIndex_ = i;
+			break;
+		}
+	}
+}
+
+	//! Returns the id of the index-th view of the project
+int 
+TeProject::getViewId(int index)
+{
+	if (index >= 0 && index < static_cast<int>(views_.size()))
+		return views_[index];
+	else
+		return -1;
+}
+
+//!	Returns the names of the views in the project.
+TeViewNameVector
+TeProject::getViewNameVector()
+{
+	TeViewNameVector viewNames;
+	if (!db_ || views_.empty())
+		return viewNames;
+
+	string viewids = Te2String(views_[0]);
+	for (unsigned int i=1; i<views_.size(); ++i)
+	{
+		viewids += ",";
+		viewids += Te2String(views_[i]);
+	}
+	string sql  = "SELECT te_view.name ";
+	       sql += "FROM te_view INNER JOIN te_project_view ON te_view.view_id = te_project_view.view_id ";
+	       sql += "WHERE te_project_view.project_id = " + Te2String(id_);
+
+	TeDatabasePortal* portal = db_->getPortal();
+	if (!portal)
+		return viewNames;
+	if (!portal->query(sql))
+	{
+		delete portal;
+		return viewNames;
+	}
+	while (portal->fetchRow())
+		viewNames.push_back(portal->getData(0));
+	delete portal;
+	return viewNames;
+}
+
+int 
+TeProject::insertView(string name, TeProjection* projection)
+{
+	TeProjection* proj;
+	if (!db_)
+		return -1;
+	if (projection)
+		proj = projection;
+	else
+	{
+		TeDatum sad69 = TeDatumFactory::make("SAD69");
+		proj = new TeLatLong(sad69);
+	}
+	TeView* view = new TeView(name);
+	view->projection(proj);
+	view->user(db_->user());
+	if (db_->insertView(view))
+	{
+		return insertViewRel(view->id());
+	}
+	return -1;
+}
+
+int 
+TeProject::insertViewRel(int viewId)
+{
+	if (!db_)
+		return -1;
+
+	if(db_->insertProjectViewRel(id_,viewId))
+		return addView(viewId);
+
+	return -1;
+}
+
+int 
+TeProject::addView(int viewId)
+{
+	if (viewId <=0)
+		return -1;
+	views_.push_back(viewId);
+	currentViewIndex_ = views_.size()-1;
+	return viewId;
+}
+
+void 
+TeProject::deleteView(int viewId)
+{
+	if (!db_)
+		return;
+	TeViewVector::iterator pos = find(views_.begin(),views_.end(),viewId);
+	if (pos != views_.end())
+		views_.erase(pos);
+	db_->deleteView(viewId);
+}
+
+//! Clear the project
+void 
+TeProject::clearViews()
+{
+	views_.clear();
+	currentViewIndex_ = -1;
+}
+
+
diff --git a/src/terralib/kernel/TeProject.h b/src/terralib/kernel/TeProject.h
new file mode 100755
index 0000000..cc49738
--- /dev/null
+++ b/src/terralib/kernel/TeProject.h
@@ -0,0 +1,176 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeProject.h
+    \brief This file contains structures and definitions to support the concept of a project in TerraLib
+*/
+#ifndef  __TERRALIB_INTERNAL_PROJECT_H
+#define  __TERRALIB_INTERNAL_PROJECT_H
+
+#include "TeDefines.h"
+#include <string>
+#include <vector>
+#include <map>
+
+class TeDatabase;
+class TeProjection;
+class TeView;
+
+using std::vector;
+using std::string;
+using std::map;
+
+//! A vector of the identifiers of the maps in the project.
+typedef vector<int> TeViewVector;
+
+//! A vector of the names of the views in the project.
+typedef vector<string> TeViewNameVector;
+
+//! A vector of the identifiers of the projects.
+typedef vector<int> TeProjectIdVector;
+
+/*!
+   This class represents a project concept.
+   A project is a collection of views kept in a ordered list.
+   A project might have the information about the current view.
+*/
+class TL_DLL TeProject
+{
+public:
+
+	//! Empty constructor
+	TeProject();
+
+    //! Constructor from a identifier
+	TeProject(int id, TeDatabase* db);
+
+	//! Constructor from a name
+	TeProject(const string& name, TeDatabase* db);
+
+	//! Copy Constructor
+	TeProject(const TeProject& other);
+
+	//! Operator =
+	TeProject& operator= (const TeProject& other);
+
+	//! Destructor
+	virtual ~TeProject();
+
+	//! Sets the project name.
+	virtual void setId(int id) 
+	{id_ = id;}	
+	
+	//! Returns the project name.
+	virtual int id() 
+	{ return id_; }
+
+	//! Sets the project name.
+	virtual void setName(const string& name) 
+	{name_ = name;}	
+	
+	//! Returns the project name.
+	virtual string name() 
+	{ return name_; }
+
+	//! Returns the project description.
+	virtual string description() 
+	{ return description_; }
+
+	//! Sets the project description
+	virtual void setDescription(const string& desc) 
+	{ description_ = desc ; }
+
+	//! Sets the project database
+	virtual void setDatabase(TeDatabase* db)
+	{ db_ = db; }
+
+	//! Gets the project database
+	virtual TeDatabase* getDatabase()
+	{ return db_; }
+
+	//! Returns TRUE if a view is part of a project and FALSE otherwise
+	virtual bool isProjectView(int viewId);
+
+	//! Returns TRUE if a project has a current view and FALSE otherwise
+	virtual bool hasCurrentView();
+
+	//! Sets the id of the current view in the project 
+	virtual void setCurrentViewId(int viewId);
+
+	//! Returns the id of the current view in the project 
+	virtual int getCurrentViewId();
+
+	//! Sets the index in the list of the current view in the project 
+	virtual void setCurrentViewIndex(int index)
+	{ currentViewIndex_ = index; }
+
+	//! Returns position of the current view in the project
+	virtual int getCurrentViewIndex()
+	{ return currentViewIndex_; }
+
+	//! Returns a reference to the project list of views
+	const TeViewVector& getViewVector() const
+	{	return views_; }
+
+	//!	Returns the names of the views in the project.
+	virtual TeViewNameVector getViewNameVector();
+
+	//! Returns the id of the index-th view of the project
+	virtual int getViewId(int index);
+
+	//!	Creates a new view in the project and persists it in the database
+	/* 
+		\param name view name
+		\param projection view projection. If null uses as default LatLong/SAD69
+		\return the id of the new view
+	*/
+	virtual int insertView(string name, TeProjection* projection = NULL);
+
+	//!	Adds a new view relation with the project and persists it in the database
+	/* 
+	\param view The view object
+	\return the id of the new view
+	*/
+	virtual int insertViewRel(int viewId);
+
+	//! Adds an view id to the views project vector
+	virtual int addView(int viewId);
+
+	//! Removes a view from the project (and also from the database)
+	virtual void deleteView(int viewId);
+
+	//! Clear the project
+	virtual void clearViews();
+
+private: 
+	int id_;
+	string name_;
+	string description_; 
+	TeViewVector views_;
+	int currentViewIndex_;
+	TeDatabase* db_;
+};
+
+//! A map from a integer unique identifier to a pointer to project
+typedef map<int, TeProject*>  TeProjectMap;
+
+#endif
diff --git a/src/terralib/kernel/TeProjection.cpp b/src/terralib/kernel/TeProjection.cpp
old mode 100644
new mode 100755
index 6e54792..0cd482a
--- a/src/terralib/kernel/TeProjection.cpp
+++ b/src/terralib/kernel/TeProjection.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -28,7 +28,16 @@ of this library and its documentation.
 #include "TeProjection.h"
 #include "TeException.h"
 #include "TeUtils.h"
+#include <cstdlib>
 #include <stdio.h>
+#include <iostream>
+#include <cstring>
+
+bool tokenizeWKT(char** wkt, vector<string>& tokens);
+
+TeDatum  TeGetDatumFromWKT(const string& wkt);
+
+TeDatum  TeGetDatumFromProj4(const string& proj4);
 
 //=========================================================
 //
@@ -42,21 +51,29 @@ of this library and its documentation.
 //==========================================================
 
 
+
 // Name						Units  Long  Lat  Par1  Par2  Sca  Eas  Nor 
-char* teProjInfo[]= {
+const char* teProjInfo[]= {
 "Albers",					"1",  "1",  "1", "1",  "1",  "0", "1", "1", 
 "LatLong",					"1",  "0",  "0", "0",  "0",  "0", "0", "0",   
-"LambertConformal",			"1",  "1",  "1", "1",  "1",  "0", "1", "1", 
+"LambertConformal",			        "1",  "1",  "1", "1",  "1",  "0", "1", "1", 
 "Mercator",					"1",  "1",  "1", "1",  "0",  "0", "1", "1", 
 "Miller",					"1",  "1",  "0", "0",  "0",  "0", "1", "1", 
 "UTM",						"1",  "1",  "0", "0",  "0",  "1", "1", "1", 
-"Polyconic",				"1",  "1",  "1", "0",  "0",  "0", "1", "1",
-"Sinusoidal",				"1",  "1",  "0", "0",  "0",  "0", "1", "1",
-"CylindricalEquidistant",	"1",  "1",  "0", "1",  "0",  "0", "1", "1",
-"PolarStereographic",		"1",  "1",  "0", "0",  "0",  "0", "1", "1",
-"NoProjection",				"1",  "0",  "0", "0",  "0",  "0", "0", "0"		
+"Polyconic",				        "1",  "1",  "1", "0",  "0",  "0", "1", "1",
+"Sinusoidal",				        "1",  "1",  "0", "0",  "0",  "0", "1", "1",
+"CylindricalEquidistant",	                "1",  "1",  "0", "1",  "0",  "0", "1", "1",
+"PolarStereographic",		                "1",  "1",  "0", "0",  "0",  "0", "1", "1",
+"Satellite",		                        "1",  "1",  "1", "0",  "0",  "0", "1", "1",
+"NoProjection",				        "1",  "0",  "0", "0",  "0",  "0", "0", "0"		
 };
 
+
+const char** TeGetProjInfo()
+{
+	return teProjInfo;
+}
+
 TeProjInfo
 TeProjectionInfo ( const string& projName  )
 {
@@ -127,7 +144,7 @@ TeProjectionFactory::make ( const TeProjectionParams& par )
 			punits = "DecimalDegrees";
 		else
 			punits = par.units;
-		return new TeLatLong ( par.datum, par.units );
+		return new TeLatLong ( par.datum, punits );
 	}
 
 	if ( par.name == "Polyconic" )
@@ -146,14 +163,16 @@ TeProjectionFactory::make ( const TeProjectionParams& par )
 	if ( par.name == "PolarStereographic")
 		return new TePolarStereographic ( par.datum, par.lon0, par.offx, par.offy,punits, par.hemisphere );
 
-	if ( par.name == "NoProjection")
-		return new TeNoProjection (punits);
+	if ( par.name == "Satellite")
+		return new TeSatelliteProjection ( par.datum, par.offx, par.offy, par.pri, par.prj, par.pis, par.pjs, par.lat0, par.lon0, par.prs, par.pscn, par.pyaw);
 
-return 0;
+	if ( par.name == "NoProjection")
+		return new TeNoProjection(par.datum,punits);	
+	return 0;
 }
 
 TeProjectionParams 
-TeProjection::params ()
+TeProjection::params () const
 {
 	TeProjectionParams par;
 	
@@ -217,22 +236,30 @@ TeProjection::operator=(const TeProjection& rhs)
 bool
 TeProjection::operator== (const TeProjection& proj)
 {
+	if (GPname == "NoProjection" && proj.GPname == "NoProjection")
+		return true;
+	if (GPname  != proj.GPname)
+		return false;
 	if (!(GPdatum==proj.GPdatum))
 		return false;
-	if (GPlon0!=proj.GPlon0)
+	if (!TeFPEquals(GPlon0, proj.GPlon0, 0.0000000001))
 		return false;
-	if (GPlat0!=proj.GPlat0)
+	if (!TeFPEquals(GPlat0, proj.GPlat0, 0.0000000001))
 		return false;
-	if (GPoffx!=proj.GPoffx)
+	if (!TeFPEquals(GPoffx,proj.GPoffx,0.001))
 		return false;
-	if (GPoffy!=proj.GPoffy)
+	if (!TeFPEquals(GPoffy,proj.GPoffy,0.001))
 		return false;
-	if (GPstlat1!=proj.GPstlat1)
+	if (!TeFPEquals(GPstlat1,proj.GPstlat1,0.0000000001))
 		return false;
-	if (GPstlat2!=proj.GPstlat2)
+	if (!TeFPEquals(GPstlat2,proj.GPstlat2,0.0000000001))
 		return false;
 	if (GPhemisphere!=proj.GPhemisphere)
 		return false;
+	if (GPunits != proj.GPunits)
+		return false;
+	if (!TeFPEquals(GPscale,proj.GPscale, 0.0000000001))
+		return false;
 
 	return true;
 }
@@ -286,7 +313,7 @@ TeProjection::describe ()
 		desc = "NoProjection";
 		return desc;
 	}
-
+	desc = GPname;
 	TeProjInfo pjInfo = TeProjectionInfo ( GPname );
 
 	desc =  GPunits;
@@ -1103,6 +1130,14 @@ TeLatLong :: LL2PC (TeCoord2D& ptll)
 	return TeCoord2D( ptll.x()*TeCRD, ptll.y()*TeCRD ); 
 }
 
+//FAMI
+void
+TeLatLong :: LL2PC (double xi, double yi, double& xo, double& yo) const
+{
+	xo = xi*TeCRD;
+	yo = yi*TeCRD;
+	return;
+}
 
 /********************************************************************
 	LAT LONG TO GEODETIC COORDINATES
@@ -1121,7 +1156,18 @@ TeLatLong :: PC2LL (TeCoord2D& ptpc)
 	return TeCoord2D(ptpcx,ptpcy); 
 }
 
+//FAMI
+void
+TeLatLong :: PC2LL (double xi, double yi, double& ptpcx, double& ptpcy)
+{
+	ptpcx = xi*TeCDR;
+	ptpcy = yi*TeCDR;
+	
+	if( GPdestination && !(datum() == GPdestination->datum()))
+		ChangeLL(ptpcx,ptpcy);
 
+	return; 
+}
 
 /********************************************************************
 	GEODETIC TO ALBERS EQUAL-AREA COORDINATES
@@ -1458,7 +1504,143 @@ TePolarStereographic :: LL2PC (TeCoord2D& ptll)
 
 }
 
+//FAMI
+void
+TePolarStereographic :: LL2PC (double xi, double yi, double& xo, double& yo) const
+{
+	double	k0,				// Scale factor
+		e,					// Eccentricity
+		pi,					// Auxillary variables
+		lon0,				// auxilliary origin longitude
+		t,ro,aux1,aux2,aux3,ptllx,ptlly;
+	
+	int GPhemis;
+	if (GPhemisphere == TeNORTH_HEM)
+		GPhemis = 1;
+	else
+		GPhemis = -1;
 
+	double Pflt = GPdatum.flattening();
+	double Prd  = GPdatum.radius();
+	
+	ptllx = xi;
+	ptlly = yi;
+
+	k0 = 0.933;	// Standard parallel 60 degrees 
+	e = sqrt((double)2*Pflt - pow(Pflt,(double)2));
+	pi = 4.*atan((double)1);
+
+	ptlly *= GPhemis;
+	ptllx *= GPhemis;
+	lon0 = (GPhemis == 1) ? GPlon0 : -GPlon0;
+
+	aux1 = (1. - e*sin(ptlly))/(1. + e*sin(ptlly));
+	t = tan((pi/4.) - (ptlly/2.))/pow(aux1,(e/(double)2));
+	aux2 = pow(((double)1 + e),((double)1 + e));
+	aux3 = pow(((double)1 - e),((double)1 - e));
+	ro = 2.*Prd*k0*t/sqrt(aux2*aux3);
+
+	aux1   = ro*sin(ptllx - lon0);
+	ptlly = -ro*cos(ptllx - lon0);
+	aux1 *= GPhemis;
+	ptlly *= GPhemis;
+	
+	if (GPhemis == -1)
+	{
+		aux1 *= GPhemis;
+		ptlly *= GPhemis;
+	}
+
+	xo = aux1+GPoffx;
+	yo = ptlly+GPoffy;
+	return;
+}
+
+//FAMI
+void TePolarStereographic :: LL2PC (ostream& java) const 
+{
+	double	k0,			// Scale factor
+		equad,			// Squared eccentricity
+		e,		        // Eccentricity
+		pi,			// Ancillary variables
+		lon0,			// auxilliary origin longitude
+		aux1,aux2,aux3,aux4,aux5;
+	
+		
+	java << "\tpx = xpc - " << GPoffx << ";\n";
+	java << "\tpy = ypc - " << GPoffy << ";\n";
+
+	double Pflt = GPdatum.flattening();
+	double Prd  = GPdatum.radius();
+	k0   = 0.933;
+	
+	pi = 4.*atan((double)1); 
+	equad =  2.*Pflt - pow(Pflt,(double)2);
+	e = sqrt(equad);
+	
+	
+	if (GPhemisphere != TeNORTH_HEM) {
+		java << "\tpx *= -1;\n";
+		java << "\tpy *= -1;\n";
+	}
+	lon0 = (GPhemisphere == TeNORTH_HEM) ? GPlon0 : -GPlon0;
+
+	java << "\tro = Math.sqrt(px*px + py*py);\n";	
+	aux1 = pow(((double)1 + e),((double)1 + e));
+	aux2 = pow(((double)1 - e),((double)1 - e));
+	
+	java << "\tt = (ro* " << sqrt(aux1*aux2) << ")/(" << 2.*Prd*k0 << ") " << ";\n";
+	java << "\txx = " << pi/2. << " - 2.*Math.atan(t);\n";
+	
+	aux3 =  equad/2. + 5.*equad*equad/24. + equad*equad*equad/12.;
+	aux4 = 7.*equad*equad/48. + 29.*equad*equad*equad/240.;
+	aux5 = 7.*equad*equad*equad/120.;
+
+	java << "\tyll = xx + " << aux3 << "*Math.sin(2*xx) + " << aux4 << "*Math.sin(4*xx) + "<< aux5 << "*Math.sin(6*xx);\n";
+
+	java << "\tif (py != 0.) \n";
+	java << "\t\txll = " << lon0 << "+ Math.atan(px/(-py));\n";
+
+	if (GPhemisphere == TeNORTH_HEM)
+	{
+		java << "\tif (and(greater(px, 0.), greater(py,0.)))\n";
+		java << "\t\txll = xll + " << pi << ";\n";
+		java << "\telse if (and(smaller(px,0.), greater(py,0.)))\n";
+		java << "\t\txll = xll - " << pi << ";\n";
+		java << "\telse if (and(greater(px, 0.), equal(py,0.)))\n";
+		java << "\t\txll = " << lon0  << "+ " << pi << "/ 2.;\n";
+		java << "\telse if (and(smaller(px, 0.),  equal(py,0.)))\n";
+		java << "\t\txll = " << lon0 << " - " << pi << "/ 2.;\n";
+		java << "\telse if (and(equal(px,0.), equal(py, 0.)))\n";
+		java << "\t\txll = " << lon0 << ";\n";
+	}
+	else
+	{
+		java << "\tyll = -yll;\n";
+		java << "\txll = -xll;\n";
+
+		java << "\tif (and(greater(px,0.), smaller(py,0))\n";
+		java << "\t\txll = xll + " << pi << ";\n";
+		java << "\telse if (and (smaller(px, 0.),  samller(py,0) )\n";
+		java << "\t\txll = xll - " << pi << ";\n";
+		java << "\telse if (and(greater(px,0.), equal(py,0.) )\n";
+		java << "\t\txll = " << lon0 << " + " << pi << "/ 2.;\n";
+		java << "\telse if (and(smaller(px,0.), equal(py, 0.))\n";
+		java << "\t\txll = " << lon0 << " - " << pi << " / 2.;\n";
+		java << "\telse if (and(equal(px,0.), equal(py, 0.))\n";
+		java << "\t\txll = " << lon0 << ";\n";
+	}
+
+	java << "\tif (smaller(xll, (-" << pi << ") )) xll += 2.* "<< pi << ";\n";
+	java << "\telse if (greater(xll, " << pi << ")  )    xll -= 2.*" << pi << ";\n";
+	
+	java << "\txll = xll * " << 180/3.14159 << ";\n";
+	java << "\tyll = yll * " << 180/3.14159 << ";\n\n";
+
+	java << "\treturn { lon :  xll, lat : yll } ;\n";
+	java << "}\n";
+	
+}
 /*******************************************************************
 	POLAR STEREOGRAPHIC TO	GEODETIC COORDINATES
 ********************************************************************/
@@ -1471,7 +1653,7 @@ TePolarStereographic :: PC2LL (TeCoord2D& ptpc)
 		e,		        // Eccentricity
 		pi,			// Ancillary variables
 		lon0,			// auxilliary origin longitude
-		ro,t,xx,aux1,aux2,aux3,aux4,aux5,ptpcx,ptpcy,px,py;
+		ro,t,xx,aux1,aux2,aux3,aux4,aux5,ptpcx=0.,ptpcy,px,py;
 
 	px = (double)ptpc.x()-GPoffx;
 	py = (double)ptpc.y()-GPoffy;
@@ -1553,9 +1735,251 @@ TePolarStereographic :: PC2LL (TeCoord2D& ptpc)
 	return (TeCoord2D(ptpcx,ptpcy));
 }
 
-TeProjection* TeGetTeProjectionFromSProj(const string& proj4)
+//FAMI
+/************************************************************************
+		GEODETIC COORDINATES TO SATELLITE PROJECTION
+*************************************************************************/
+TeCoord2D 
+TeSatelliteProjection::LL2PC(TeCoord2D& ptll)
 {
+	double equad, n, x, y, z, sn, dp, dl,xlo,yla,lin,col,resx,resy;
+	double x1, x2, a, b, c,  Rd2, Rm, Rm2, Rs2, v;
+
+//	xlo = ptpc.x()-GPoffx;
+//	yla = ptpc.y()-GPoffy;
+	xlo = ptll.x();
+	yla = ptll.y();
+
+	// Cartesian geocentric coordinates
+	xlo = xlo - GPlon0;
+	yla = yla - GPlat0;
+	equad = 2.*GPdatum.flattening() - pow(GPdatum.flattening(),(double)2);
+	n = GPdatum.radius()/sqrt((double)1-equad*pow(sin(yla),(double)2));
+	x = n*cos(yla)*cos(xlo);
+	y = n*cos(yla)*sin(xlo);
+	z = (n*(1-equad))*sin(yla);
+ 
+	// Field of view angles
+	dp = atan(y / (SPrs - x));
+	dl = atan(z * cos(dp) /(SPrs - x));
 
+	// Visibility test
+	if ( x < 0.0 )
+	{
+		col = TeMAXFLOAT;
+		lin = TeMAXFLOAT;
+		return (TeCoord2D(col,lin));
+	}
+	else
+	{
+		Rd2 = GPdatum.radius() * GPdatum.radius() ;
+		Rm  = GPdatum.radius() * (1 - GPdatum.flattening());
+		Rm2 = Rm * Rm ;
+		Rs2 = SPrs * SPrs;
+
+		v = (tan(dp)*tan(dp)*cos(dp)*cos(dp)*Rm2)+(tan(dl)*tan(dl)*Rd2);
+		a = cos(dp)*cos(dp)*Rm2 + v;      
+		b = -2.*SPrs*v;
+		c = Rs2*v-Rd2*Rm2*cos(dp)*cos(dp);
+
+		// Equation Resolution a*x**2+b*x+c=0 
+		v = (b*b) - (4.*a*c);
+		if (v < 0.0) v=0.0;
+   		x1 = (-b + sqrt(v)) / (2.*a);
+		x2 = (-b - sqrt(v)) / (2.*a);
+		if (x1 < x2)  x1 = x2;
+
+		if ( fabs(x-x1) > 1.0 )
+		{
+			col = TeMAXFLOAT;
+			lin = TeMAXFLOAT;
+			return (TeCoord2D(col,lin));
+		}
+	}
+	// Line and column of image
+	if (SPscn == 0.) sn = 1.0;  else sn = -1.0;
+	col = (sn * dp / SPrj + SPjs );
+	lin = (-sn * dl / SPri + SPis);
+
+	// Axis rotation correction due to yaw angle
+	col = col*cos(SPyaw) - lin*sin(SPyaw);
+	lin = lin*cos(SPyaw) + col*sin(SPyaw);
+	resx = tan(SPrj) * (SPrs - GPdatum.radius());
+	resy = tan(SPri) * (SPrs - GPdatum.radius());
+
+	return (TeCoord2D(col*resx,-(lin*resy)));
+}
+
+/************************************************************************
+		SATELLITE PROJECTION TO GEODETIC COORDINATES
+************************************************************************/
+TeCoord2D
+TeSatelliteProjection::PC2LL(TeCoord2D& ptpc)
+{
+	double	dl, dp, x, y, z, x1, x2, equad, n, d, sn,
+		a, b, c,  Rd2, Rm,Rm2, Rs2,v,ptpcx,ptpcy,
+		yla,xlo,resx,resy;
+
+	resx = tan(SPrj) * (SPrs - GPdatum.radius());
+	resy = tan(SPri) * (SPrs - GPdatum.radius());
+	ptpcx = ptpc.x()/resx;
+	ptpcy = -ptpc.y()/resy;
+
+	// Axis rotation correction due yaw angle
+	ptpcx = ptpcx*cos(SPyaw) + ptpcy*sin(SPyaw);
+	ptpcy = ptpcy*cos(SPyaw) - ptpcx*sin(SPyaw);
+
+	// Field of view angles
+	if (SPscn == 0.) sn =  1.0;
+	else 		 sn = -1.0;
+	dl = - sn * ((ptpcy - SPis) * SPri);
+	dp =   sn * ((ptpcx - SPjs) * SPrj);
+
+	// Cartesian coordinates
+	Rd2 = GPdatum.radius() * GPdatum.radius() ;
+	Rm  = GPdatum.radius() * (1 - GPdatum.flattening());
+	Rm2 = Rm * Rm ;
+	Rs2 = SPrs * SPrs;
+
+	v = (tan(dp)*tan(dp)*cos(dp)*cos(dp)*Rm2)+(tan(dl)*tan(dl)*Rd2);
+	a = cos(dp)*cos(dp)*Rm2 + v;      
+	b = -2.*SPrs*v;
+	c = Rs2*v-Rd2*Rm2*cos(dp)*cos(dp);
+
+	// Equation Resolution a*x**2+b*x+c=0 
+	v = (b*b) - (4.*a*c);
+	if (v < 0)
+	{
+		xlo = TeMAXFLOAT;
+		yla = TeMAXFLOAT;
+		return (TeCoord2D(xlo,yla));
+	}
+
+   	x1 = (-b + sqrt(v)) / (2.*a);
+	x2 = (-b - sqrt(v)) / (2.*a);
+
+	if ( x1 >= x2)  x = x1;
+	else		  x = x2;
+
+	z = (SPrs - x) * tan(dl) / cos(dp);
+	y = (SPrs - x) * tan(dp);
+
+	// Geodetic coordinates
+	equad 	= 2. * GPdatum.flattening() - GPdatum.flattening() * GPdatum.flattening();
+
+	double aux = SPrs * dl / GPdatum.radius();
+	if (aux > 1.0) aux = 1.0;
+	if (aux < -1.0) aux = -1.0;
+
+	yla = asin(aux);
+	
+	do
+	{
+		n= GPdatum.radius()/sqrt((double)1-equad*pow(sin(yla),(double)2));
+		yla = atan((z + n*equad*sin(yla))/sqrt(x*x + y*y));
+		d = GPdatum.radius()/sqrt((double)1-equad*pow(sin(yla),(double)2)) - n;
+	}
+	while (fabs(d) > 0.001);
+
+	xlo = atan(y/x) + GPlon0;
+	yla = yla + GPlat0;
+
+	return (TeCoord2D(xlo,yla));
+}
+
+TeProjectionParams 
+TeSatelliteProjection::params () const
+{
+	TeProjectionParams par;
+	par = TeProjection::params();
+
+	par.pri  = SPri;
+	par.prj  = SPrj;
+	par.pis  = SPis;
+	par.pjs  = SPjs;
+	par.prs  = SPrs;
+	par.pscn = SPscn;
+	par.pyaw = SPyaw;
+
+return par;
+}
+
+TeDatum 
+TeGetDatumFromProj4(const string& proj4)
+{
+	unsigned int pos;
+    string attribute;
+    string value;
+	double dx, dy, dz;
+	dx = dy = dz = 0.0;
+
+	TeDatum dat;
+	dat.name("UserDefined");
+	for(unsigned int i = 0; i < proj4.size(); i++)
+    {
+        for( pos = i; i != proj4.size() && proj4[i] != '=';i++);
+
+        attribute = proj4.substr(pos+1, i-pos-1);
+
+        for(pos = i; i != proj4.size() && proj4[i] != ' ';i++);
+
+        if(proj4[i] == ' ') value = proj4.substr(pos+1, i-pos-1);
+        else                value = proj4.substr(pos+1, i-pos);
+		
+		double b;
+		// Datum parameters
+        if(attribute == "R")	// radius for a spherical ellipsoid
+		{
+			dat = TeDatum("Spherical",atof(value.c_str()));
+			return dat;
+		}
+		else if(attribute == "a")   // Earth equatorial radius
+			dat.radius(atof(value.c_str()));
+		else if (attribute == "b")
+			b = atof(value.c_str());
+	    else if(attribute == "f")	// Earth flattening
+			dat.flattening(atof(value.c_str()));
+	    else if(attribute == "rf")	// Earth  reverse flattening (f = 1/rf)
+			dat.flattening(1/atof(value.c_str()));
+		else if (attribute == "es") // eccentricity squared (f=1-(1-es)^0.5) 
+			dat.flattening(1-sqrt(1-atof(value.c_str())));
+		else if (attribute == "e")	// eccentricity (f=1-(1-es^2)^0.5)
+			dat.flattening(1-sqrt(1-pow(atof(value.c_str()),2)));
+		else if (attribute == "ellps")
+			dat.name(value);
+		else if (attribute == "towgs84")
+		{
+			vector<string> deltas;
+			TeSplitString(value, ",", deltas);
+			
+			if (deltas.size()>=3)
+			{
+				dx = atof(deltas[0].c_str());
+				dy = atof(deltas[1].c_str());
+				dz = atof(deltas[2].c_str());
+			}
+		}
+	}
+	if ( dx==0.0 && dy== 0 && dz == 0.0)
+	{
+		dat = TeDatum("WGS84",6378137,0.003352811,66.87,-4.37,38.52);
+	}
+	// this is a SAD69
+	else if (dx == -66.87 && dy == 4.37 &&  dz == -38.52)
+	{
+		dat = TeDatum("SAD69",6378160,0.003352892,0.0,0.0,0.0);
+	}
+	else
+	{
+		dat.dx_ = dx;
+		dat.dy_ = dy;
+		dat.dz_ = dz;
+	}
+	return dat;
+}
+
+TeProjection* TeGetTeProjectionFromSProj(const string& proj4)
+{
 	// a map from sproj4 projections to TerraLib projections
 	map<string,string> sprojToTeProj;
 	sprojToTeProj["aea"] = "Albers";
@@ -1568,6 +1992,7 @@ TeProjection* TeGetTeProjectionFromSProj(const string& proj4)
 	sprojToTeProj["poly"] = "Polyconic";
 	sprojToTeProj["eqc"] = "CylindricalEquidistant";
 	sprojToTeProj["ups"] = "PolarStereographic";
+	sprojToTeProj["sat"] = "Satellite"; //FAMI
 
     unsigned int pos;
     string attribute;
@@ -1578,8 +2003,6 @@ TeProjection* TeGetTeProjectionFromSProj(const string& proj4)
 	par.offx = 500000;
 	par.offy = 0;
 	par.units = "";
-	TeDatum dat("UserDefined");
-
     for(unsigned int i = 0; i < proj4.size(); i++)
     {
         for( pos = i; i != proj4.size() && proj4[i] != '=';i++);
@@ -1625,25 +2048,11 @@ TeProjection* TeGetTeProjectionFromSProj(const string& proj4)
 			par.offy = atof(value.c_str());
 		else if (attribute == "units")
 			par.units = value;
-		// Datum parameters
-        else if(attribute == "R")	// radius for a spherical ellipsoid
-			dat = TeDatum("Spherical",atof(value.c_str()));
-	    else if(attribute == "a")   // Earth equatorial radius
-			dat.radius(atof(value.c_str()));
-	    else if(attribute == "f")	// Earth flattening
-			dat.flattening(atof(value.c_str()));
-	    else if(attribute == "rf")	// Earth  reverse flattening (f = 1/rf)
-			dat.flattening(1/atof(value.c_str()));
-		else if (attribute == "es") // eccentricity squared (f=1-(1-es)^0.5) 
-			dat.flattening(1-sqrt(1-atof(value.c_str())));
-		else if (attribute == "e")	// eccentricity (f=1-(1-es^2)^0.5)
-			dat.flattening(1-sqrt(1-pow(atof(value.c_str()),2)));
-
 // TODO: sproj4 also allowd the selection of standard, predefined
 // ellipsoid figures using the option +ellps=acronym. But we are not decoding 
-// them yet...
+// them yet because of our problem with the shiftings from SAD69
     }
-	par.datum = dat;
+	par.datum = TeGetDatumFromProj4(proj4);
 	return TeProjectionFactory::make(par);
 }
 
@@ -1660,6 +2069,7 @@ string TeGetSProjFromTeProjection(TeProjection* teproj)
 	teProjToSProj["Polyconic"] = "poly";
 	teProjToSProj["CylindricalEquidistant"] = "eqc";
 	teProjToSProj["PolarStereographic"] = "ups";
+	teProjToSProj["Satellite"] = "sat"; //FAMI
 
     string sresp = "+proj=";
 	map<string,string>::iterator it = teProjToSProj.find(teproj->name());
@@ -1684,25 +2094,207 @@ string TeGetSProjFromTeProjection(TeProjection* teproj)
 	if ( pjInfo.hasStlat2 )
 		sresp += " +lat_2=" +Te2String(teproj->stLat2()*TeCRD,6);
 
-	if (teproj->name() == "UTM" && teproj->hemisphere() == TeSOUTH_HEM)
-		sresp += " +south";
-	else
-	{
-		if ( pjInfo.hasOffx )
-			sresp += " +x_0=" + Te2String(teproj->offX(),6);
-		if ( pjInfo.hasOffy )
-			sresp += " +y_0=" + Te2String(teproj->offY(),6);
-	}
+	if ( pjInfo.hasOffx )
+		sresp += " +x_0=" + Te2String(teproj->offX(),6);
+
+	if ( pjInfo.hasOffy )
+		sresp += " +y_0=" + Te2String(teproj->offY(),6);
 	
 	if ( pjInfo.hasScale )
 		sresp += " +k="  + Te2String(teproj->scale(),6);
 
-    if (teproj->datum().name() == "Spherical")
-		sresp += " +R="  + Te2String(teproj->datum().radius(),6);
+	string datumD = teproj->datum().getProj4Description();
+	if (!datumD.empty())
+		sresp += datumD;
+	return sresp;
+}
+
+string 
+TeGetWKTFromTeProjection(TeProjection* teproj)
+{
+	string wkt = "";
+	if (!teproj)
+		return wkt;
+
+	string wktDatum = teproj->datum().getWKTDescription();
+	if (teproj->name() == "LatLong")
+		return wktDatum;
+
+	map<string,string> teProjToWKT;
+	teProjToWKT["Albers"] = "Albers_Conic_Equal_Area";
+	teProjToWKT["LambertConformal"] = "Lambert_Conformal_Conic_1SP";
+	teProjToWKT["Mercator"] = "Mercator_1SP";
+	teProjToWKT["Miller"] = "Miller_Cylindrical";
+	teProjToWKT["UTM"] = "Transverse_Mercator";
+	teProjToWKT["Sinusoidal"] = "Sinusoidal";
+	teProjToWKT["Polyconic"] = "Polyconic";
+	teProjToWKT["CylindricalEquidistant"] = "Equirectangular";
+	teProjToWKT["PolarStereographic"] = "Polar_Stereographic";
+	teProjToWKT["Satellite"] = "Satellite"; //FAMI
+	teProjToWKT["NoProjection"] = "Unknown";
+
+	wkt = "PROJCS[\"" + teproj->name() + "\",";
+	wkt += wktDatum;
+	wkt += ",PROJECTION[\"" + teProjToWKT[teproj->name()] + "\"]";
+
+	TeProjInfo pjInfo = TeProjectionInfo(teproj->name());
+	if (pjInfo.hasLon0)
+		wkt +=",PARAMETER[\"central_meridian\","+ Te2String(teproj->lon0()*TeCRD,6)+"]";
+
+	if (pjInfo.hasLat0)
+		wkt +=",PARAMETER[\"latitude_of_origin\","+ Te2String(teproj->lat0()*TeCRD,6)+"]";
+
+	if (pjInfo.hasStlat1)
+		wkt +=",PARAMETER[\"standard_parallel_1\","+ Te2String(teproj->stLat1()*TeCRD,6)+"]";
+	
+	if (pjInfo.hasStlat2)
+		wkt +=",PARAMETER[\"standard_parallel_2\","+ Te2String(teproj->stLat2()*TeCRD,6)+"]";
+
+	if (pjInfo.hasOffx)
+		wkt +=",PARAMETER[\"false_easting\","+ Te2String(teproj->offX(),6)+"]";
+
+	if (pjInfo.hasOffy)
+		wkt +=",PARAMETER[\"false_northing\","+ Te2String(teproj->offY(),6)+"]";
+
+	if (pjInfo.hasScale)
+		wkt +=",PARAMETER[\"scale_factor\","+ Te2String(teproj->scale(),6)+"]";
+	
+	wkt += ",UNIT[\"meter\",1]]";
+	return wkt;
+}
+
+bool tokenizeWKT(char** wkt, vector<string>& tokens)
+{
+	const char *pszInput =  *wkt;
+	int isInQuote = false;
+	
+	string token = "";
+	int  sizeToken = 0;
+	while (*pszInput != '\0')
+	{
+		if (*pszInput == '"')
+		{
+			isInQuote = !isInQuote;
+		}
+		else if (!isInQuote && 
+				(*pszInput == '[' || *pszInput == ']' || *pszInput == ',' || 
+					*pszInput == '(' || *pszInput == ')' ))
+		{
+			break;
+		}
+		else if (!isInQuote && 
+				(*pszInput == ' ' || *pszInput == '\t' || 
+				*pszInput == 10 || *pszInput == 13))
+		{
+		/* just skip over whitespace */
+		} 
+		else
+		{
+			token += *pszInput;
+			++sizeToken;
+		}
+		pszInput++;
+	}
+	if (*pszInput == '\0')
+		return true;
+		
+	tokens.push_back(token);
+	
+	bool result;  // read sublist
+	if( *pszInput == '[' || *pszInput == '(' )
+	{
+		do
+		{
+			pszInput++; // Skip bracket or comma.
+			result = tokenizeWKT((char **) &pszInput, tokens);
+			if (!result )
+				return result;          
+		}while (*pszInput == ',');
+	
+		if (*pszInput != ')' && *pszInput != ']')
+			return result;
+		pszInput++;
+	}
+	*wkt = (char *) pszInput;
+	return true;
+}
+
+
+
+TeProjection* 
+TeGetTeProjectionFromWKT(const string& wkt)
+{
+	map<string,string> wktToTeProj;
+	wktToTeProj["Albers_Conic_Equal_Area"] = "Albers";
+	wktToTeProj["Lambert_Conformal_Conic_1SP"] = "LambertConformal";
+	wktToTeProj["Mercator_1SP"] = "Mercator";
+	wktToTeProj["Miller_Cylindrical"] = "Miller";
+	wktToTeProj["Transverse_Mercator"] = "UTM";
+	wktToTeProj["Sinusoidal"] = "Sinusoidal";
+	wktToTeProj["Polyconic"] = "Polyconic";
+	wktToTeProj["Equirectangular"] = "CylindricalEquidistant";
+	wktToTeProj["Polar_Stereographic"] = "PolarStereographic";
+	wktToTeProj["Satellite"] = "Satellite"; //FAMI
+
+	TeDatum dat = TeDatumFactory::makeFromWKT(wkt);
+	vector<string> tokens;
+	char* wktchar = new char[wkt.size()];
+	strcpy(wktchar,wkt.c_str());
+	bool res = tokenizeWKT((char **) &wktchar, tokens);
+	if (!res)
+		return 0;
+
+	// geographic coordinates 
+
+	TeProjectionParams par;
+	unsigned int i = 1;
+	bool isProjected = false;
+	if (tokens[0] == "GEOGCS")
+	{
+		isProjected = false;
+		par.name = "LatLong";
+	}
+	else if (tokens[0] == "PROJCS")
+	{
+		isProjected = true;
+	}
+	else
+		return 0;
+	par.datum = dat;
+	if (!isProjected)
+		return TeProjectionFactory::make(par);
+
+	while (i<tokens.size() && tokens[i] != "PROJECTION")
+		++i;
+	if (i== tokens.size())
+		return 0;
+	map<string,string>::iterator it = wktToTeProj.find(tokens[++i]);
+	if (it != wktToTeProj.end())
+		par.name = it->second;
 	else
+		return 0;
+	while (tokens[++i] == "PARAMETER")
 	{
-		sresp += " +a="  + Te2String(teproj->datum().radius(),6);
-		sresp += " +f="  + Te2String(teproj->datum().flattening(),6);
+		++i;
+		if (TeStringCompare(tokens[i],"latitude_of_origin",false))
+			par.lat0 = atof(tokens[++i].c_str())*TeCDR;
+		else if (TeStringCompare(tokens[i],"central_meridian",false))
+			par.lon0 = atof(tokens[++i].c_str())*TeCDR;
+ 		else if (TeStringCompare(tokens[i],"standard_parallel_1",false))
+			par.stlat1 = atof(tokens[++i].c_str())*TeCDR;
+ 		else if (TeStringCompare(tokens[i],"standard_parallel_2",false))
+			par.stlat2 = atof(tokens[++i].c_str())*TeCDR;
+ 		else if (TeStringCompare(tokens[i],"false_easting",false))
+			par.offx = atof(tokens[++i].c_str());
+ 		else if (TeStringCompare(tokens[i],"false_northing",false))
+		{
+			par.offy = atof(tokens[++i].c_str());
+			if(par.offy == 0.0)	par.hemisphere=TeNORTH_HEM;
+			else				par.hemisphere=TeSOUTH_HEM;
+		}
+ 		else if (TeStringCompare(tokens[i],"scale_factor",false))
+			par.scale = atof(tokens[++i].c_str());
 	}
-	return sresp;
+	return TeProjectionFactory::make(par);
 }
+
diff --git a/src/terralib/kernel/TeProjection.h b/src/terralib/kernel/TeProjection.h
old mode 100644
new mode 100755
index 4f35673..e528c03
--- a/src/terralib/kernel/TeProjection.h
+++ b/src/terralib/kernel/TeProjection.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright  2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,9 +20,8 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeProjection.h
-    This file contains support do deal with geographical projections
+    \brief This file contains support do deal with geographical projections
 */
 
 #ifndef  __TERRALIB_INTERNAL_PROJECTION_H
@@ -31,6 +30,7 @@ of this library and its documentation.
 #include "TeCoord2D.h"
 #include "TeDefines.h"
 #include "TeDatum.h"
+
 #include <stdio.h>
 #include <map>
 #include <string>
@@ -42,10 +42,10 @@ enum TeHemisphere
 { TeNORTH_HEM, TeSOUTH_HEM };
 
 //! Number of supported projections in TerraLib
-const int NUM_PROJ = 11; 
+const int NUM_PROJ = 12; 
 
 //! Set of informations required by projections
-struct TeProjInfo 
+struct TL_DLL TeProjInfo 
 {
 	int hasUnits;
 	int hasLon0;
@@ -61,31 +61,42 @@ struct TeProjInfo
 typedef map<string,TeProjInfo> TeProjInfoMap;
 
 //! Returns the set of informations required by a given projection
-TeProjInfo TeProjectionInfo ( const string& projName  );
+TL_DLL TeProjInfo TeProjectionInfo ( const string& projName  );
+
+TL_DLL const char** TeGetProjInfo();
 
 // ============ PROJECTION PARAMETERS ===============
 
 class TeProjection;
 
+//FAMI Added Satellite parameters
 //! Set of parameters that define a geographical projection
-struct TeProjectionParams
+struct TL_DLL TeProjectionParams
 {
 	string	name;	     //!< projection name
 	TeDatum datum;       //!< spheroid
-    double	lon0;		 //!< Longitude of origin (rad)
-	double  lat0;		 //!< Latitude of origin (rad)  
+        double	lon0;	     //!< Longitude of origin (rad)
+	double  lat0;	     //!< Latitude of origin (rad)  
 	double	offx;	     //!< X (projection coordinate) offset (m)
 	double	offy;	     //!< Y (projection coordinate) offset (m)
 	double	stlat1;	     //!< First standard parallel (rad)
-	double  stlat2;      //!< Second standard paralel ( rad)
+	double  stlat2;      //!< Second standard paralel (rad)
 	string  units;       //!< units
 	double  scale;       //!< projection scale (used in UTM)
-	TeHemisphere	hemisphere; //!< Hemisphere
+	TeHemisphere hemisphere; //!< Hemisphere
+	double  pri;         //!< Sensor angle resolution along y axis (rad) (used in Satellite)
+	double  prj;         //!< Sensor angle resolution along x axis (rad) (used in Satellite)
+	double  pis;         //!< Y-coordinate of sub-satellite point (used in Satellite)
+	double  pjs;         //!< X-coordinate of sub-satellite point (used in Satellite)
+	double  prs;         //!< Radius of satellite orbit (m) (used in Satellite)
+	double  pscn;        //!< Scanning mode: 0-WE/NS, 1-SN/EW (used in Satellite)
+	double  pyaw;        //!< Grid orientation, i.e., angle in radians between the increasing y axis and the meridian of the sub-satellite point along the direction of increasing latitude (used in Satellite)
+
 };
 
 //========== PROJECTION FACTORY
 //! A factory of projections
-class TeProjectionFactory 
+class TL_DLL TeProjectionFactory 
 {
 public:
 	static TeProjection* make( const TeProjectionParams& );
@@ -97,22 +108,22 @@ public:
   ground in terms of defining conventional map projections, navigating
   on low-resolution images of geostationary satellites.
 */
-class TeProjection 
+class TL_DLL TeProjection 
 {
 protected:
-	string	GPname;	     // projection name
-	TeDatum GPdatum;     // spheroid
-	double	GPlon0;		 // Longitude of origin (rad)
-	double  GPlat0;		 // Latitude of origin (rad)  
-	double	GPoffx;	     // X (projection coordinate) offset (m)
-	double	GPoffy;	     // Y (projection coordinate) offset (m)
-	double	GPstlat1;	 // First standard parallel (rad)
-	double  GPstlat2;    // Second standard parallel (rad)
-	string  GPunits;     // units
-	double  GPscale;     // scale (used for UTM)
-	TeHemisphere	GPhemisphere; // Hemisphere
-	TeProjection*	GPdestination; // destination projection
-	int		GPid;		 // id
+	string	GPname;	             // projection name
+	TeDatum GPdatum;             // spheroid
+	double	GPlon0;	             // Longitude of origin (rad)
+	double  GPlat0;	             // Latitude of origin (rad)  
+	double	GPoffx;	             // X (projection coordinate) offset (m)
+	double	GPoffy;	             // Y (projection coordinate) offset (m)
+	double	GPstlat1;            // First standard parallel (rad)
+	double  GPstlat2;            // Second standard parallel (rad)
+	string  GPunits;             // units
+	double  GPscale;             // scale (used for UTM)
+	TeHemisphere  GPhemisphere;  // Hemisphere
+	TeProjection* GPdestination; // destination projection
+	int	      GPid;          // id
 
 	//! Changes planimetic datum
 	/*!	Computes changes in geodetic coordinates due to
@@ -196,15 +207,19 @@ public:
 	virtual ~TeProjection (){}
 
 	//! Returns the projection name;
-	string name()
+	string& name() 
 	{ return GPname; }
 
 	//! Returns the projection datum
 	TeDatum datum()
 	{ return GPdatum; }
 
+	//! Sets the datum associated to the projection 
+	void setDatum(const TeDatum& datum)
+	{	GPdatum = datum; }
+
 	//! Return the projection units 
-	string units()
+	string& units()
 	{ return GPunits; }
 
 	//! Return the longitude of origin ( in rad)
@@ -232,7 +247,7 @@ public:
 	TeHemisphere hemisphere() {	return GPhemisphere; }
 		
 	// Returns a the parameters of this projection
-	TeProjectionParams params ();
+	virtual TeProjectionParams params () const; //FAMI
 
 	bool operator== (const TeProjection& proj);
 
@@ -250,7 +265,8 @@ public:
 			([0,pi/2] or [0,-pi/2]) and a valid longitude
 			([0,pi] or [0,-pi]).
 	*/
-	virtual	TeCoord2D	LL2PC (TeCoord2D& p) = 0;
+	virtual	TeCoord2D LL2PC (TeCoord2D& p) = 0;
+	virtual	void	  LL2PC (ostream&) const {} //FAMI
 
 	//! Pure virtual method that transforms projection into geodetic coordinates.
 	/*!
@@ -265,6 +281,9 @@ public:
 	*/
 	virtual	TeCoord2D	PC2LL (TeCoord2D& p) = 0;
 
+	virtual	void LL2PC (double, double, double&, double&) const {printf("\nWRONG"); return;} //FAMI
+	virtual	void PC2LL (double, double, double&, double&) {printf("\nWRONG"); return;} //FAMI
+
 	//!	Sets the projection to which a Latitude/Longitude value will be generated by the current projection by calling changeLL in PC2LL method
 	void setDestinationProjection (TeProjection* proj)
 	{ GPdestination = proj; }
@@ -291,7 +310,7 @@ public:
 
 	 \sa TeCoord2D TeDatum TeProjection.
 */
-class TeUtm : public TeProjection
+class TL_DLL TeUtm : public TeProjection
 {
 public:
 
@@ -300,8 +319,8 @@ public:
 		Initializes projection parameters 
 		\param datum		spheroid
 		\param long0		longitude of origin (in radians)
-		\param lat0			latitude of origin (in radians)  
-		\param offx			X (projection coordinate) offset (m)
+		\param lat0		latitude of origin (in radians)  
+		\param offx		X (projection coordinate) offset (m)
 		\param offy 		Y (projection coordinate) offset (m)
 		\param units		projection unit
 		\param scale		scale (used for UTM)
@@ -354,16 +373,16 @@ public:
   geodetic and Lambert conformal conic coordinates. 
   \sa TeCoord2D TeDatum TeProjection.
 */
-class TeLambertConformal : public TeProjection
+class TL_DLL TeLambertConformal : public TeProjection
 {
 public :
 	//! Constructor
 	/*!	
 		Initializes projection parameters 
 		\param datum		spheroid
-		\param long0			longitude of origin (in radians)
-		\param lat0			latitude of origin (in radians)  
-		\param offx			X (projection coordinate) offset (m)
+		\param long0		longitude of origin (in radians)
+		\param lat0		latitude of origin (in radians)  
+		\param offx		X (projection coordinate) offset (m)
 		\param offy 		Y (projection coordinate) offset (m)
 		\param stlat1		first standard parallel (in radians)
 		\param stlat2		second standard parallel (in radians)
@@ -394,7 +413,7 @@ public :
   Specifies methods that are necessary to establish the relation between
   geodetic and Mercator coordinates.  
 */
-class TeMercator : public TeProjection
+class TL_DLL TeMercator : public TeProjection
 {
 
 public:
@@ -436,9 +455,8 @@ public:
     geodetic and Polyconic coordinates. Polyconic is a projection system that
     is neither conformal nor equal-area. 
 */  
-class TePolyconic : public TeProjection
+class TL_DLL TePolyconic : public TeProjection
 {
-
 public:
 	//! Constructor
 	/*!	
@@ -469,7 +487,7 @@ public:
 };
 
 //!  Provides methods that are required to handle the Equidistant Cylindrical  map projection.
-class TeLatLong : public TeProjection
+class TL_DLL TeLatLong : public TeProjection
 {
 
 public :
@@ -492,6 +510,9 @@ public :
 	//! Returns the same coordinate
 	virtual TeCoord2D PC2LL(TeCoord2D& p);
 
+	virtual void LL2PC(double xi, double yi, double& xo, double& yo) const; //FAMI
+	virtual void PC2LL(double xi, double yi, double& xo, double& yo); //FAMI
+
 };
 
 //!  Provides methods that are required to handle the Albers Conic map  projection.
@@ -500,9 +521,8 @@ public :
   geodetic and Albers Conic coordinates. Albers Conic is an equal-area
   projection system. 
 */
-class TeAlbers : public TeProjection
+class TL_DLL TeAlbers : public TeProjection
 {
-
 public:
 	//! Constructor
 	/*!	
@@ -541,9 +561,8 @@ public:
   geodetic and Miller coordinates. Miller is a projection system that
   is neither conformal nor equal-area."
 */
-class TeMiller : public TeProjection	
+class TL_DLL TeMiller : public TeProjection	
 {
-
 public:
 	//! Constructor
 	/*!	
@@ -579,9 +598,8 @@ public:
   this implementation assumes a single central meridian. Spheroid options 
   can be redefined by editing the file "TeDatum.cpp"
 */
-class TeSinusoidal : public TeProjection	
+class TL_DLL TeSinusoidal : public TeProjection	
 {
-
 public:
 
 //!	Constructor.
@@ -610,7 +628,7 @@ public:
 };
 
 //! Provides methods that are required to handle the Cylindrical Equidistant map projection
-class TeCylindricalEquidistant : public TeProjection
+class TL_DLL TeCylindricalEquidistant : public TeProjection
 {
 public:
 
@@ -641,7 +659,7 @@ public:
 };
 
 //! Provides methods that are required to handle the Polar Stereographic map projection
-class TePolarStereographic : public TeProjection
+class TL_DLL TePolarStereographic : public TeProjection
 {
 public:
 	//! Constructor
@@ -667,14 +685,76 @@ public:
 	~TePolarStereographic () {}
 
 	virtual TeCoord2D LL2PC(TeCoord2D& p);
-
+	virtual	void	LL2PC (ostream&) const; //FAMI
 	virtual TeCoord2D PC2LL(TeCoord2D& p);
+
+	virtual void LL2PC(double xi, double yi, double& xo, double& yo) const; //FAMI
+};
+
+//FAMI
+class TL_DLL TeSatelliteProjection : public TeProjection
+{
+
+private:
+	
+	double	SPri,	// Sensor angle resolution along y axis in radians
+		SPrj,	// Sensor angle resolution along x axis in radians
+		SPis,	// Y-coordinate of sub-satellite point 
+		SPjs,	// X-coordinate of sub-satellite point
+	        SPrs,   // Radius of satellite orbit in meters
+		SPscn,	// Scanning mode: 0-WE/NS, 1-SN/EW
+		SPyaw;  // Grid orientation, i.e., angle in radians between
+			// the increasing y axis and the meridian of the
+			// sub-satellite point along the direction of
+			// increasing latitude.
+public:
+
+	//! Constructor
+	/*
+		\param datum: 	planimetric datum
+		\param offx: 	x offset
+		\param offy: 	y offset
+		\param Pri:     Sensor angle resolution along y axis in radians
+		\param Prj: 	Sensor angle resolution along x axis in radians
+		\param Pis:     Y-coordinate of sub-satellite point 
+		\param Pjs: 	X-coordinate of sub-satellite point
+		\param Pla0: 	Latitude of sub-satellite point in radians
+		\param Plo0: 	Longitude of sub-satellite point in radians
+		\param Prs: 	Radius of satellite orbit in meters
+		\param Pscn: 	Scanning mode: 0-WE/NS, 1-SN/EW
+		\param Pyaw: 	Grid orientation, i.e., angle in radians between
+				the increasing y axis and the meridian of the
+				sub-satellite point along the direction of
+				increasing latitude.
+		*/
+	TeSatelliteProjection(const TeDatum& datum, double offx, double offy,  
+			      double Pri, double Prj, double Pis, double Pjs, double Pla0, double Plon0, 
+			      double Prs,double Pscn, double Pyaw):
+			TeProjection("Satellite", datum, Plon0, Pla0, offx, offy, 0., 0.,"Meters",1.,TeSOUTH_HEM),
+			SPri(Pri),
+			SPrj(Prj),
+			SPis(Pis),
+			SPjs(Pjs),		
+			SPrs(Prs),
+			SPscn(Pscn),
+			SPyaw(Pyaw)	{}
+
+	~TeSatelliteProjection() {}
+
+	virtual TeCoord2D LL2PC(TeCoord2D& p);
+
+	virtual	TeCoord2D PC2LL(TeCoord2D& p);
+
+	// Returns a the parameters of this projection
+	virtual TeProjectionParams params () const;
 };
 
-class TeNoProjection : public TeProjection
+class TL_DLL TeNoProjection : public TeProjection
 {
 public:
-	TeNoProjection(const string& units = "Units")
+	TeNoProjection(const TeDatum& datum = TeDatum(), const string& units = "Units"):
+		TeProjection ( "NoProjection", datum, 0., 0., 0., 0., 0, 0, units, 1, TeSOUTH_HEM )
+
 	{	GPname = "NoProjection", GPunits = units; }
 
 		~TeNoProjection () {}
@@ -684,13 +764,27 @@ public:
 		virtual TeCoord2D PC2LL(TeCoord2D& p) {return p;};
 };
 
-bool decodifyDescription(const string& projDescription, TeProjectionParams& pars);
+bool TL_DLL decodifyDescription(const string& projDescription, TeProjectionParams& pars);
+
+//! Creates a TeProjection instance from a PROJ4 description
+/*
+	\note This function works only for sproj descriptionsgenerated by TerraLib
+*/
+TL_DLL TeProjection* TeGetTeProjectionFromSProj(const string& sproj4desc);
+
+//! Generates a PROJ4 description from a TerraLib instance
+TL_DLL string TeGetSProjFromTeProjection(TeProjection* teproj);
 
-TeProjection* TeGetTeProjectionFromSProj(const string& sproj4desc);
+//! Generates OGC WKT Spatial Reference description from a TerraLib instance
+TL_DLL string TeGetWKTFromTeProjection(TeProjection* proj);
 
-string TeGetSProjFromTeProjection(TeProjection* teproj);
+//! Creates a TeProjection instance from a OGC WKT Spatial Reference description
+/*
+	\note This function works only for sproj descriptions generated by TerraLib
+*/
+TL_DLL TeProjection* TeGetTeProjectionFromWKT(const string& wkt);
 
-/** \example ProjectionExample1.cpp
+/** \example convertCoordinates.cpp
  * This is an example of how to convert a coordinate from a projection to another
  */
 
diff --git a/src/terralib/kernel/TeProjectiveGT.cpp b/src/terralib/kernel/TeProjectiveGT.cpp
new file mode 100644
index 0000000..745c361
--- /dev/null
+++ b/src/terralib/kernel/TeProjectiveGT.cpp
@@ -0,0 +1,589 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#include "TeProjectiveGT.h"
+#include "TeGeometry.h"
+
+#include <assert.h>
+#include <math.h>
+
+
+TeProjectiveGT::TeProjectiveGT()
+{
+}
+
+
+TeProjectiveGT::~TeProjectiveGT()
+{
+}
+
+
+void TeProjectiveGT::directMap( const TeGTParams& params, const TeCoord2D& pt1, 
+    TeCoord2D& pt2 ) const
+{
+  assert( params.direct_parameters_.Ncol() == 3 );
+  assert( params.direct_parameters_.Nrow() == 3 );
+
+  double x = pt1.x();
+  double y = pt1.y();
+
+  if( ! params.useAdaptiveParams_ ) 
+  {
+    // denominador da fc projetiva    
+    double den = params.direct_parameters_( 2, 0 ) * x + params.direct_parameters_( 2, 1 ) * y + 1;
+  
+    pt2.x( ( params.direct_parameters_( 0, 0 ) * x + 
+      params.direct_parameters_( 0, 1 ) * y + 
+      params.direct_parameters_( 0, 2 ) ) / den );
+    pt2.y( ( params.direct_parameters_( 1, 0 ) * x + 
+      params.direct_parameters_( 1, 1 ) * y + 
+      params.direct_parameters_( 1, 2 ) ) / den ); 
+  }
+  else // use Adaptive parameters
+  {
+    x -= params.deltaX_;
+    y -= params.deltaY_;
+    
+    double den = params.direct_parameters_( 2, 0 ) * x + params.direct_parameters_( 2, 1 ) * y + 1;
+    
+    pt2.x( ( params.direct_parameters_( 0, 0 ) * x + 
+      params.direct_parameters_( 0, 1 ) * y + 
+      params.direct_parameters_( 0, 2 ) ) / den 
+      + params.deltaU_ );
+    pt2.y( ( params.direct_parameters_( 1, 0 ) * x + 
+      params.direct_parameters_( 1, 1 ) * y + 
+      params.direct_parameters_( 1, 2 ) ) / den 
+      + params.deltaV_ ); 
+  }
+}
+
+
+void TeProjectiveGT::inverseMap( const TeGTParams& params, const TeCoord2D& pt2, 
+  TeCoord2D& pt1 ) const
+{
+  assert( params.inverse_parameters_.Ncol() == 3 );
+  assert( params.inverse_parameters_.Nrow() == 3 );
+
+  double u = pt2.x();
+  double v = pt2.y();
+
+  if( ! params.useAdaptiveParams_  ) 
+  {
+    // denominador da fc projetiva
+    double den = params.inverse_parameters_( 2, 0 ) * u + params.inverse_parameters_( 2, 1 ) * v + 1;
+
+    pt1.x( ( params.inverse_parameters_( 0, 0 ) * u + 
+      params.inverse_parameters_( 0, 1 ) * v + 
+      params.inverse_parameters_( 0, 2 ) ) / den );
+    pt1.y( ( params.inverse_parameters_( 1, 0 ) * u + 
+      params.inverse_parameters_( 1, 1 ) * v + 
+      params.inverse_parameters_( 1, 2 ) ) / den );
+  }
+  else // use Adaptive parameters
+  {
+    u -= params.deltaU_;
+    v -= params.deltaV_;
+    
+    double den = params.inverse_parameters_( 2, 0 ) * u + params.inverse_parameters_( 2, 1 ) * v + 1;
+
+    pt1.x( ( params.inverse_parameters_( 0, 0 ) * u + 
+      params.inverse_parameters_( 0, 1 ) * v + 
+      params.inverse_parameters_( 0, 2 ) ) / den 
+      + params.deltaX_ );
+    pt1.y( ( params.inverse_parameters_( 1, 0 ) * u + 
+      params.inverse_parameters_( 1, 1 ) * v + 
+      params.inverse_parameters_( 1, 2 ) ) / den 
+      + params.deltaY_ );
+  }
+}
+
+
+unsigned int TeProjectiveGT::getMinRequiredTiePoints() const
+{
+  // At least four points
+  return 4;
+}
+
+
+bool TeProjectiveGT::computeParameters( TeGTParams& params ) const
+{
+  TEAGN_DEBUG_CONDITION( ( params.tiepoints_.size() > 3 ),
+    "Invalid tie-points size" )
+    
+  // calcula os parametros adaptativos
+  // caso contrario, reinicia o estado
+  if( params.useAdaptiveParams_ )
+    setAdaptativeParameters( params.tiepoints_, params );
+  else
+    params.deltaX_ = params.deltaY_ = params.deltaU_ = params.deltaV_ = 0;
+
+  // a forma do calculo depende da qtd pontos
+  const unsigned int tiepoints_size = params.tiepoints_.size();
+
+  if( tiepoints_size > 4 ) 
+  {
+    // Solucao com sobredeterminacao -> ajustamento
+    // mapeamento direto
+    if( ! useAdjustment( params, true ) )
+      return false;
+
+    // mapeamento inverso
+    return useAdjustment( params, false );
+  } 
+  else 
+  {
+    // Solucao deterministica
+    // mapeamento direto
+    if( ! useDeterministic( params, true ) )
+      return false;
+
+    // mapeamento inverso
+    return useDeterministic( params, false );
+    
+  } // fim if tiepoints
+
+}
+
+bool TeProjectiveGT::isTransDefined( const TeGTParams& params )  const
+{
+  if( ( params.direct_parameters_.Nrow() == 3 ) &&
+    ( params.direct_parameters_.Ncol() == 3 ) &&
+    ( params.inverse_parameters_.Nrow() == 3 ) &&
+    ( params.inverse_parameters_.Ncol() == 3 ) )
+  {
+    return true;
+  }
+  else
+  {
+    return false;
+  }
+}
+
+bool TeProjectiveGT::useAdjustment( TeGTParams& params, 
+  bool isDirectMapping ) const
+{
+    /* 
+        u = b11.x + b12.y + b13
+            -------------------
+               b31.x + b32.y
+            
+        v = b21.x + b22.y + b23
+            -------------------
+               b31.x + b32.y
+               
+        Method adapted from Albertz and Kreiling (1989).
+        Reference: Albertz, J.; Kreiling, W. Photogrametriches taschenbuch. 
+        Karlsruhe: Wichmann, 1989.
+        
+        Adaptive parameters by Xavier et al. (2007).
+        Reference: Xavier, E.; Fonseca, L.; d'Alge, J.; Castejon, E. Implementacao 
+        da transformacao projetiva na TerraLib: uma analise comparativa com a 
+        transformacao afim. Anais do XIII Simposio Brasileiro de Sensoriamento 
+        Remoto. <http://www.dsr.inpe.br/sbsr2007/>, 2007.
+    */
+
+  // inicializacao das variaveis
+  
+  // tamanho de Lb
+  // Lb : vetor das observacoes brutas (originais)
+  const unsigned int tiepoints_size = params.tiepoints_.size();
+
+  // A: matriz do sistema de equacoes
+  // inicializa com zeros
+  TeMatrix A;
+  if( ! A.Init( 2*tiepoints_size, 8, 0.0 ) ) 
+  {
+    return false;
+  }
+
+  // L: vetor das correcoes das observacoes
+  TeMatrix L;
+  if( ! L.Init( 2*tiepoints_size, 1 ) ) 
+  {
+    return false;
+  }
+
+  // At: transposta de A
+  TeMatrix At;
+
+  // N = At*P*A
+  TeMatrix N;
+
+  // N_inv : inversa de N
+  TeMatrix N_inv;
+
+  // U = At*P*Lb
+  TeMatrix U;
+
+  // Xa : vetor dos parametros ajustados
+  TeMatrix Xa;
+
+  // X0 : vetor dos parametros iniciais 
+  TeMatrix X0;
+
+  // X = Xa-X0 : vetor das correcoes 
+  TeMatrix X;
+
+  // W: matriz peso das observacoes
+  bool hasWMatrix = ( ( params.WMatrix_.Nrow() == 
+    (int)( tiepoints_size * 2 ) ) && ( params.WMatrix_.Ncol() == 
+    (int)( tiepoints_size * 2 ) ) ) ? true : false;
+
+  // V: residuos das observacoes
+
+  // iterador p/ correr as observacoes
+  std::vector< TeCoordPair >::const_iterator iterator;  
+
+  // Inicializacao de X0
+  // [1 0 0 0 1 0 0 0]t
+  X0.Init( 8, 1, 0.0 );
+  X0(0, 0) = 1;
+  X0(4, 0) = 1;
+
+
+  /**************************************************************\
+  Solucao com sobredeterminacao -> ajustamento
+  \**************************************************************/
+
+  // 0) Montando o laco while ate q o valor convirja (isTolReached) 
+  // ou alcance o Nr max de iteracoes (maxIters_)
+
+  // contagem das iteracoes
+  unsigned int iter = 0;
+
+  // alcancou a tolerancia?
+  bool isTolReached = false;
+
+  while( iter++ < params.maxIters_ && ! isTolReached ) 
+  {
+    // inicializando o iterador dos pontos observados (u/v)
+    iterator = params.tiepoints_.begin();
+
+    for ( unsigned int i = 0; i < tiepoints_size; ++i ) 
+    {
+      // pontos usados em todo o laco
+      // xi,yi : from
+      // ui,ui : to
+      double xi, yi; 
+      double ui, vi;
+      
+      if( isDirectMapping ) 
+      {
+        xi = iterator->pt1.x() - params.deltaX_;
+        yi = iterator->pt1.y() - params.deltaY_;
+        ui = iterator->pt2.x() - params.deltaU_;
+        vi = iterator->pt2.y() - params.deltaV_;
+      } 
+      else 
+      {
+        xi = iterator->pt2.x() - params.deltaU_;
+        yi = iterator->pt2.y() - params.deltaV_;
+        ui = iterator->pt1.x() - params.deltaX_;
+        vi = iterator->pt1.y() - params.deltaY_;
+      }
+
+      // denominador da fc projetiva
+      // den = b31 * xi + b32 * yi + 1
+      double den = X0( 6, 0 ) * xi + X0( 7, 0 ) * yi + 1;
+
+      // funcao projetiva p/ U e V
+      // U = ( b11 * xi + b12 * yi + b13 ) / den
+      double funcU = ( X0( 0, 0 ) * xi + X0( 1, 0 ) * yi + X0( 2, 0 ) - xi * ui * X0( 6, 0 ) -yi * ui * X0( 7, 0 ) );
+
+      // V = ( b21 * xi + b22 * yi + b23 ) / den
+      double funcV = ( X0( 3, 0 ) * xi + X0( 4, 0 ) * yi + X0( 5, 0 ) - xi * vi * X0( 6, 0 ) -yi * vi * X0( 7, 0 ) );
+
+      // 1) Calculo de L
+      // L = L0 - Lb 
+      L( 2*i  , 0 ) = (funcU - ui) / den;
+      L( 2*i+1, 0 ) = (funcV - vi) / den;
+
+      // 2) Montagem de A
+      // lembrando q jah tem zero em tudo
+      A( 2*i   , 0 ) = xi / den;
+      A( 2*i   , 1 ) = yi / den;
+      A( 2*i   , 2 ) = 1  / den;
+      A( 2*i   , 6 ) = -xi*ui/den;
+      A( 2*i   , 7 ) = -yi*ui/den;
+
+      A( 2*i+1 , 3 ) = A( 2*i, 0 );
+      A( 2*i+1 , 4 ) = A( 2*i, 1 );
+      A( 2*i+1 , 5 ) = A( 2*i, 2 );
+      A( 2*i+1 , 6 ) = -xi*vi/den;
+      A( 2*i+1 , 7 ) = -yi*vi/den;
+
+      ++iterator;
+    } // fim for_tiepoints
+
+    // 3) Calculo de N
+    A.Transpose( At );
+
+    // Se W_ esta definida
+    if( hasWMatrix ) 
+    {
+      N = At * params.WMatrix_;
+      N = N * A;
+    } 
+    else 
+      N = At * A;
+
+    // 4) Calculo de U
+    // Se W_ esta definida
+    if( hasWMatrix ) 
+    {
+      U = At * params.WMatrix_;
+      U = U * L;
+    } 
+    else 
+      U = At * L;
+
+    // 5) Calculo de X
+    if( ! N.Inverse( N_inv ) )
+      return false;
+
+    X = - N_inv * U;
+
+    // 6) Calculo de Xa
+    Xa = X0 + X;
+
+    // 7) Atualiza o X0 p/ proxima iteracao
+    X0 = Xa;
+
+    // 8) Checando se a tolerancia foi atingida
+
+    isTolReached = true;
+    for( unsigned int j = 0; j < 8; ++j ) 
+    {
+      if( fabs( X( j, 0 ) ) > params.tolerance_ ) 
+      {
+        isTolReached = false;
+        break;
+      }
+    }
+
+  } // fim while
+
+  // final - montagem da resposta
+  
+
+  if( isDirectMapping ) 
+  {
+    if( ! params.direct_parameters_.Init( 3, 3 ) )
+      return false;
+    
+    params.direct_parameters_(0,0) = Xa(0,0);
+    params.direct_parameters_(0,1) = Xa(1,0);
+    params.direct_parameters_(0,2) = Xa(2,0);
+  
+    params.direct_parameters_(1,0) = Xa(3,0);
+    params.direct_parameters_(1,1) = Xa(4,0);
+    params.direct_parameters_(1,2) = Xa(5,0);
+  
+    params.direct_parameters_(2,0) = Xa(6,0);
+    params.direct_parameters_(2,1) = Xa(7,0);
+    params.direct_parameters_(2,2) = 1;
+  }
+  else
+  {
+    if( ! params.inverse_parameters_.Init( 3, 3 ) )
+      return false;
+    
+    params.inverse_parameters_(0,0) = Xa(0,0);
+    params.inverse_parameters_(0,1) = Xa(1,0);
+    params.inverse_parameters_(0,2) = Xa(2,0);
+  
+    params.inverse_parameters_(1,0) = Xa(3,0);
+    params.inverse_parameters_(1,1) = Xa(4,0);
+    params.inverse_parameters_(1,2) = Xa(5,0);
+  
+    params.inverse_parameters_(2,0) = Xa(6,0);
+    params.inverse_parameters_(2,1) = Xa(7,0);
+    params.inverse_parameters_(2,2) = 1;
+  }
+
+  return true;
+}
+
+
+bool TeProjectiveGT::useDeterministic( TeGTParams& params, 
+  bool isDirectMapping ) const
+{
+
+  // Solucao deterministica, da forma:
+  // X = A^-1 . L
+
+  // o vetor de ptos sempre tera tamanho 4
+  const unsigned int tiepoints_size = 4;
+
+  // A: matriz do sistema de equacoes
+  // inicializa com zeros
+  TeMatrix A;
+  if( ! A.Init( 2*tiepoints_size, 8, 0.0 ) ) 
+  {
+    return false;
+  }
+
+  // L: vetor das observacoes
+  TeMatrix L;
+  if( ! L.Init( 2*tiepoints_size, 1 ) ) 
+  {
+    return false;
+  }
+
+  // inversa de A
+  TeMatrix A_inv;
+
+  // resultado
+  TeMatrix X;
+
+  // iterador p/ correr as observacoes
+  std::vector< TeCoordPair >::const_iterator iterator = params.tiepoints_.begin();;  
+
+  // montagem de A e L
+  for ( unsigned int i = 0; i < tiepoints_size; ++i ) {
+
+    // pontos usados em todo o laco
+    // xi,yi : from
+    // ui,ui : to
+    double xi, yi; 
+    double ui, vi;
+
+    if( isDirectMapping ) 
+    {
+      xi = iterator->pt1.x();
+      yi = iterator->pt1.y();
+      ui = iterator->pt2.x();
+      vi = iterator->pt2.y();
+    } 
+    else 
+    {
+      xi = iterator->pt2.x();
+      yi = iterator->pt2.y();
+      ui = iterator->pt1.x();
+      vi = iterator->pt1.y();
+    }
+
+    // 1) Calculo de L
+    L( 2*i  , 0 ) = ui;
+    L( 2*i+1, 0 ) = vi;
+
+    // 2) Montagem de A
+    // lembrando q jah tem zero em tudo
+    A( 2*i   , 0 ) = xi;
+    A( 2*i   , 1 ) = yi;
+    A( 2*i   , 2 ) = 1;
+    A( 2*i   , 6 ) = - xi * ui;
+    A( 2*i   , 7 ) = - yi * ui;
+
+    A( 2*i+1 , 3 ) = xi;
+    A( 2*i+1 , 4 ) = yi;
+    A( 2*i+1 , 5 ) = 1;
+    A( 2*i+1 , 6 ) = - xi * vi;
+    A( 2*i+1 , 7 ) = - yi * vi;
+
+    ++iterator;
+
+  } // fim for_tiepoints
+
+  // 3) Calculo de A_inv
+  A.Inverse( A_inv );
+
+  // 4) Calculo de X
+  X = A_inv * L;
+
+  // final - montagem da resposta
+  
+    if( isDirectMapping ) 
+  {
+    if( ! params.direct_parameters_.Init( 3, 3 ) )
+      return false;
+    
+    params.direct_parameters_(0,0) = X(0,0);
+    params.direct_parameters_(0,1) = X(1,0);
+    params.direct_parameters_(0,2) = X(2,0);
+  
+    params.direct_parameters_(1,0) = X(3,0);
+    params.direct_parameters_(1,1) = X(4,0);
+    params.direct_parameters_(1,2) = X(5,0);
+  
+    params.direct_parameters_(2,0) = X(6,0);
+    params.direct_parameters_(2,1) = X(7,0);
+    params.direct_parameters_(2,2) = 1;
+  }
+  else
+  {
+    if( ! params.inverse_parameters_.Init( 3, 3 ) )
+      return false;
+    
+    params.inverse_parameters_(0,0) = X(0,0);
+    params.inverse_parameters_(0,1) = X(1,0);
+    params.inverse_parameters_(0,2) = X(2,0);
+  
+    params.inverse_parameters_(1,0) = X(3,0);
+    params.inverse_parameters_(1,1) = X(4,0);
+    params.inverse_parameters_(1,2) = X(5,0);
+  
+    params.inverse_parameters_(2,0) = X(6,0);
+    params.inverse_parameters_(2,1) = X(7,0);
+    params.inverse_parameters_(2,2) = 1;
+  }
+
+  return true;
+}
+
+void TeProjectiveGT::setAdaptativeParameters( 
+  const std::vector< TeCoordPair >& tiepoints,
+  TeGTParams& params ) const
+{
+  params.deltaX_ = TeMAXFLOAT;
+  params.deltaY_ = TeMAXFLOAT;
+  params.deltaU_ = TeMAXFLOAT;
+  params.deltaV_ = TeMAXFLOAT;
+  
+  const unsigned int tiepoints_size = tiepoints.size();
+  
+  // iterador p/ correr as observacoes
+  std::vector< TeCoordPair >::const_iterator iterator = tiepoints.begin();
+  
+  for ( unsigned int i = 0; i < tiepoints_size; ++i ) 
+  {
+    double xi, yi; 
+    double ui, vi;
+      
+    // obtem os valores
+    xi = iterator->pt1.x();
+    yi = iterator->pt1.y();
+    ui = iterator->pt2.x();
+    vi = iterator->pt2.y();
+    
+    // checa se eh o menor - cada um
+    if( xi < params.deltaX_ ) params.deltaX_ = xi;
+    if( yi < params.deltaY_ ) params.deltaY_ = yi;
+    if( ui < params.deltaU_ ) params.deltaU_ = ui;
+    if( vi < params.deltaV_ ) params.deltaV_ = vi;
+    
+  }
+
+}
+
diff --git a/src/terralib/kernel/TeProjectiveGT.h b/src/terralib/kernel/TeProjectiveGT.h
new file mode 100644
index 0000000..62e9723
--- /dev/null
+++ b/src/terralib/kernel/TeProjectiveGT.h
@@ -0,0 +1,123 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPROJECTIVEGT_H
+#define TEPROJECTIVEGT_H
+
+#include <TeGeometricTransformation.h>
+
+/**
+* @brief This is the class to deal projective geometric trasformation.
+* @author Emerson M.A. Xavier <emerson at dpi.inpe.br>
+* @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+* @ingroup Utils
+*/
+class TL_DLL TeProjectiveGT : public TeGeometricTransformation {
+public :
+
+  /**
+  * Default Constructor.
+  */
+  TeProjectiveGT();
+
+  /**
+  * Default Destructor
+  */
+  ~TeProjectiveGT();
+
+  /**
+  * Returns the minimum number of required tie-points for the current
+  * transformation.
+  *
+  * @return The minimum number of required tie-points for the current
+  * transformation.
+  */       
+  unsigned int getMinRequiredTiePoints() const;      
+
+protected :
+
+  /**
+     * @brief Direct mapping ( from pt1 space into pt2 space ).
+     *
+     * @param params Transformation parameters.
+     * @param pt1 pt1 coordinate.
+     * @param pt2 pt2 coordinate.
+     */      
+    void directMap( const TeGTParams& params, const TeCoord2D& pt1, 
+      TeCoord2D& pt2 ) const;
+      
+    /**
+     * @brief Inverse mapping ( from pt2 space into pt1 space ).
+     *
+     * @param params Transformation parameters.
+     * @param pt2 pt2 coordinate.
+     * @param pt1 pt1 coordinate.
+     */      
+    void inverseMap( const TeGTParams& params, const TeCoord2D& pt2, 
+      TeCoord2D& pt1 ) const;      
+      
+    /**
+     * @brief Calculate the transformation parameters following the
+     * new supplied tie-points.
+     *
+     * @param params Transformation parameters.
+     * @return true if OK, false on errors.
+     */       
+    bool computeParameters( TeGTParams& params ) const;
+  
+    /**
+      * @brief Verifies if the supplied parameters already
+      * has a defined transformation.
+      * @param params Transformation parameters.
+      * @return true if a transformation is already defined, 
+      * false otherwise.
+      */       
+    bool isTransDefined( const TeGTParams& params ) const;   
+      
+private:  
+
+  /** 
+   * @brief When using more than four tiepoints, use adjustment.
+   */
+  bool useAdjustment( TeGTParams& params, 
+    bool isDirectMapping ) const;
+
+  /** 
+   * @brief When using exactly four tiepoints, use deterministic solution.
+   */
+  bool useDeterministic( TeGTParams& params, 
+    bool isDirectMapping ) const;
+
+  /** 
+   * @brief Set adaptative parameters
+   * @param params Transformation parameters.
+   * @note This method is called whether the flag "useAdaptiveParameters" is on. 
+   */
+  void setAdaptativeParameters( 
+    const std::vector< TeCoordPair >& tiepoints,
+    TeGTParams& params ) const;
+};
+
+#endif // TEPROJECTIVEGT_H
+
diff --git a/src/terralib/kernel/TeProjectiveGTFactory.cpp b/src/terralib/kernel/TeProjectiveGTFactory.cpp
new file mode 100644
index 0000000..afae921
--- /dev/null
+++ b/src/terralib/kernel/TeProjectiveGTFactory.cpp
@@ -0,0 +1,49 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#include "TeProjectiveGTFactory.h"
+#include <TeProjectiveGT.h>
+#include <TeException.h>
+
+TeProjectiveGTFactory::TeProjectiveGTFactory()
+: TeGTFactory( std::string( "projective" ) )
+{
+};      
+
+TeProjectiveGTFactory::~TeProjectiveGTFactory()
+{
+};
+
+
+TeGeometricTransformation* TeProjectiveGTFactory::build ( 
+  const TeGTParams& )
+{
+  TeGeometricTransformation* instance_ptr = new TeProjectiveGT();
+  
+  if( ! instance_ptr ) {
+    throw TeException( FACTORY_PRODUCT_INSTATIATION_ERROR );
+  }
+  
+  return instance_ptr;
+}
diff --git a/src/terralib/kernel/TeProjectiveGTFactory.h b/src/terralib/kernel/TeProjectiveGTFactory.h
new file mode 100644
index 0000000..30fa60e
--- /dev/null
+++ b/src/terralib/kernel/TeProjectiveGTFactory.h
@@ -0,0 +1,67 @@
+/*
+TerraLib - a library for developing GIS applications.
+Copyright  2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular
+purpose. The library provided hereunder is on an "as is" basis, and the
+authors have no obligation to provide maintenance, support, updates,
+enhancements, or modifications.
+In no event shall INPE be held liable to any party
+for direct, indirect, special, incidental, or consequential damages arising
+out of the use of this library and its documentation.
+*/
+
+#ifndef TEPROJECTIVEGTFACTORY_H
+  #define TEPROJECTIVEGTFACTORY_H
+  
+  #include <TeGTFactory.h>
+
+  /**
+   * @brief This is the projective geometric trasformation factory.
+   * @author Emerson M.A. Xavier <emerson at dpi.inpe.br>
+   * @ingroup Utils
+   */
+  class TL_DLL TeProjectiveGTFactory : public TeGTFactory
+  {
+    public :
+      
+      /**
+       * Default constructor
+       */
+      TeProjectiveGTFactory();      
+      
+      /**
+       * Default Destructor
+       */
+      ~TeProjectiveGTFactory();
+      
+    protected :  
+    
+      /**
+       * Implementation for the abstract TeFactory::build.
+       *
+       * @param arg A const reference to the used parameters.
+       * @return A pointer to the new generated instance.
+       */
+      TeGeometricTransformation* build( const TeGTParams& arg );
+      
+  };
+
+  namespace
+  {  
+    static TeProjectiveGTFactory TeProjectiveGTFactory_instance;
+  };
+  
+#endif
+
diff --git a/src/terralib/kernel/TePrototype.h b/src/terralib/kernel/TePrototype.h
old mode 100644
new mode 100755
index 96de337..3accde1
--- a/src/terralib/kernel/TePrototype.h
+++ b/src/terralib/kernel/TePrototype.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,35 +20,39 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
+/*! \file TePrototype.h
+    \brief This file contains a template for the "TePrototype" pattern.
+*/
 #ifndef TePrototype_H
 #define TePrototype_H
-//!  Implements a template for the "TePrototype" pattern.
+//!  Implements a template for the "Prototype" pattern.
 /*
-//  The "factory" pattern is a technique for creating new
-//  instances of objects which defines an abstract interface,
-//  (represented by the "Make" module). The subclasses of
-//  factory decide which class to instantiate.
-//
-//  Each subclass of factory "registers" itself at compile time;
-//  therefore, the addition of a new factory requires no change
-//  the parent class. */
+	See the book "Design Patterns - Elements of Reusable Object-Oriented Software", by Gamma et. al.
+	for further documentation.
+*/
+
+#include "TeDefines.h"
+
 template <class T>
 class TePrototype
 {
 public:
 
+	//! Export pointer to the structure
 	typedef  TePrototype<T>* TePrototypePtr;
 
 // -- Normal Constructor
 
+	//! Constructor
 	TePrototype ();
+	
+	//! Destructor
 	virtual ~TePrototype() {}
 
-// -- Virtual Constructor 
+	//! Virtual Constructor 
 	static T* clone ();
 
-//! Builds a new type (should be implemented by descendants)
+	//! Builds a new type (should be implemented by descendants)
     virtual T* build () = 0;
 
 private:
diff --git a/src/terralib/kernel/TeProxMatrixConstructionStrategy.cpp b/src/terralib/kernel/TeProxMatrixConstructionStrategy.cpp
old mode 100644
new mode 100755
index c79c901..e5d4bac
--- a/src/terralib/kernel/TeProxMatrixConstructionStrategy.cpp
+++ b/src/terralib/kernel/TeProxMatrixConstructionStrategy.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright  2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -23,21 +23,21 @@ of this library and its documentation.
 
 
 #include "TeProxMatrixConstructionStrategy.h"
-#include "TeDatabase.h"
 #include "TeProgress.h"
-#include "TeSTElementSet.h"
+#include "TeSTEvent.h"
+#include "TeSTInstance.h"
 
 //////////////////////////////////////////////////////////////////////
 // Auxiliary Functions for construction strategies
 //////////////////////////////////////////////////////////////////////
 
 bool
-TeFindObjectCentroid (TeSTInstance& obj, TeGeomRep rep, TeCoord2D& p)
+TeFindObjectCentroid (TeMultiGeometry& mGeom, TeGeomRep rep, TeCoord2D& p)
 {		
 		if(rep == TePOLYGONS)
 		{
 			TePolygonSet pols;
-			if(obj.getGeometry (pols))
+			if(mGeom.getGeometry(pols))
 				p = TeFindCentroid (pols);
 			else
 				return false;
@@ -45,7 +45,7 @@ TeFindObjectCentroid (TeSTInstance& obj, TeGeomRep rep, TeCoord2D& p)
 		else if (rep == TeLINES)
 		{
 			TeLineSet lines;
-			if(obj.getGeometry (lines))
+			if(mGeom.getGeometry (lines))
 				p = TeFindCentroid (lines);
 			else
 				return false;
@@ -53,7 +53,7 @@ TeFindObjectCentroid (TeSTInstance& obj, TeGeomRep rep, TeCoord2D& p)
 		else if (rep == TePOINTS)
 		{
 			TePointSet points;
-			if(obj.getGeometry (points))
+			if(mGeom.getGeometry (points))
 				p = TeFindCentroid (points);
 			else
 				return false;
@@ -61,11 +61,19 @@ TeFindObjectCentroid (TeSTInstance& obj, TeGeomRep rep, TeCoord2D& p)
 		else if (rep == TeCELLS)
 		{
 			TeCellSet cells;
-			if(obj.getGeometry (cells))
+			if(mGeom.getGeometry (cells))
 				p = TeFindCentroid (cells);
 			else
 				return false;
 		}
+		else if (rep == TeTEXT)
+		{
+			TeTextSet texts;
+			if(mGeom.getGeometry (texts))
+				p = TeFindCentroid (texts);
+			else
+				return false;
+		}		
 		return true;
 }
 
@@ -76,8 +84,7 @@ TeFindObjectsCentroid (TeSTElementSet* objects, const string& object_id, TeGeomR
 	{
 		TePolygonSet polygons;
 		if(objects->getGeometry (object_id, polygons))
-				p = TeFindCentroid (polygons);
-
+			p = TeFindCentroid (polygons);
 	}
 	else if (rep==TeLINES)
 	{
@@ -90,12 +97,11 @@ TeFindObjectsCentroid (TeSTElementSet* objects, const string& object_id, TeGeomR
 		TePointSet points;
 		if(objects->getGeometry (object_id, points))
 			p = TeFindCentroid (points);					
-
 	}
 	else if (rep==TeCELLS)
 	{
 		TeCellSet cells;
-		if(objects->getGeometry (object_id, cells))
+		if(objects->getGeometry(object_id, cells))
 			p = TeFindCentroid (cells);
 	}
 	return true;
@@ -230,148 +236,131 @@ bool  TeSelectEntryPoints2 (TeNodeSet    entry_set1,
 
 
 //////////////////////////////////////////////////////////////////////
-// TeProxMatrixConstructionStrategy 
-//////////////////////////////////////////////////////////////////////
-
-TeProxMatrixConstructionStrategy::TeProxMatrixConstructionStrategy() : 
-	objects_(0), 
-	geomRep_(TeGEOMETRYNONE),
-	type_("")
-	{ } 
-
-TeProxMatrixConstructionStrategy::TeProxMatrixConstructionStrategy(TeSTElementSet*  objects, TeGeomRep geomRep, const string& type): 
-	objects_(objects), 
-	geomRep_(geomRep),
-	type_(type)
-	{ } 
-
-TeProxMatrixConstructionStrategy::TeProxMatrixConstructionStrategy (const TeProxMatrixConstructionStrategy& st)
-{
-	objects_ = st.objects_; 
-	geomRep_ = st.geomRep_;
-	type_ = st.type_;
-}
-
-void 
-TeProxMatrixConstructionStrategy::setSTObjects (TeSTElementSet*  objects, TeGeomRep  geomRep)
-{	
-	objects_ = objects; 
-	geomRep_ = geomRep; 
-}
-
-TeSTElementSet* 
-TeProxMatrixConstructionStrategy::objects() 
-{ 
-	return objects_; 
-}
-
-bool 
-TeProxMatrixConstructionStrategy::IsEqual (const TeProxMatrixConstructionStrategy& other) const
-{
-	return ((type_==other.type_) && 
-		((&objects_)==(&other.objects_)) && 
-		(geomRep_ == other.geomRep_)); 
-}
-
-
-//////////////////////////////////////////////////////////////////////
 // TeProxMatrixLocalAdjacencyStrategy 
 //////////////////////////////////////////////////////////////////////
 
-TeProxMatrixLocalAdjacencyStrategy::TeProxMatrixLocalAdjacencyStrategy (bool calcDistance) : 
-		TeProxMatrixConstructionStrategy (0, TeGEOMETRYNONE, "LocalAdjacency"),
-		calcDistance_(calcDistance)	
+TeProxMatrixLocalAdjacencyStrategy::TeProxMatrixLocalAdjacencyStrategy () : 
+		TeProxMatrixConstructionStrategy<TeSTElementSet> (0, TeGEOMETRYNONE, TeAdjacencyStrategy)
 		{ }
 
 
 TeProxMatrixLocalAdjacencyStrategy::TeProxMatrixLocalAdjacencyStrategy (TeSTElementSet*  objects, TeGeomRep	geomRep, bool calcDistance):
-		TeProxMatrixConstructionStrategy (objects, geomRep, "LocalAdjacency"),
-		calcDistance_(calcDistance)	
-		{ }
+		TeProxMatrixConstructionStrategy<TeSTElementSet> (objects, geomRep, TeAdjacencyStrategy)
+		{
+			params_.calculate_distance_=calcDistance;
+		}
 
 
 TeProxMatrixLocalAdjacencyStrategy::TeProxMatrixLocalAdjacencyStrategy (TeProxMatrixLocalAdjacencyStrategy& st):
-		TeProxMatrixConstructionStrategy (st)
-		{
-			calcDistance_ = st.calculateDistance();
-		}
+		TeProxMatrixConstructionStrategy<TeSTElementSet> (st)
+		{ }
 
 bool 
 TeProxMatrixLocalAdjacencyStrategy::Construct (TeProxMatrixImplementation* imp)
 {
 	if (imp == 0) 
 		return false;
-	int n = 0;
-
+	
 	// Iterate over all selected objects, selecting their neighbours
 	TeSTElementSet::iterator itobj1 = objects_->begin();
 	
-	TeDatabase* db = objects_->theme()->layer()->database();
-	if(!db)
-		return false;
-
-	string		geomTable = objects_->theme()->layer()->tableName(geomRep_);
-	if(geomTable.empty())
-		return false;
-
-	//verify if the theme has collection
-	string collTable = ""; 
-	if(db->tableExist(objects_->theme()->collectionTable()))
-		collTable = objects_->theme()->collectionTable();
-
 	// ----- progress bar
 	int step = 0;
 	if(TeProgress::instance())
-		TeProgress::instance()->setTotalSteps(objects_->numElements());
+		TeProgress::instance()->setTotalSteps(objects_->numSTInstance());
 	// -----
 
-	TePrecision::instance().setPrecision(TeGetPrecision(objects_->theme()->layer()->projection()));
+	TeProjection* proj = 0;
+	if(objects_->theme())
+		proj = objects_->theme()->layer()->projection();
+	else if(objects_->getLayer())
+		proj = objects_->getLayer()->projection();
+	TePrecision::instance().setPrecision(TeGetPrecision(proj));
 		
 	while ( itobj1 != objects_->end())
 	{
-		// Get object1 id and representation
-		string object_id1 = (*itobj1).objectId();
-		n++;
-			
-		Keys IdsIn, IdsOut;
-		IdsIn.push_back(object_id1);
-
-		//spatial relation Touch
-		if(!db->spatialRelation(geomTable, geomRep_, IdsIn, IdsOut, TeINTERSECTS, collTable))
+		// Gets the possible adjacent objects from RTree in the element set
+		vector<TeSTInstance*> result;
+		objects_->search((*itobj1).getGeometries().getBox(), result);
+		string object_id1 = (*itobj1).getObjectId(); 
+
+		TePolygonSet	polSet1;
+		TeCellSet		cellSet1;
+		itobj1->getGeometry(polSet1);
+		itobj1->getGeometry(cellSet1);
+        
+		for(unsigned int i=0; i<result.size(); ++i)
 		{
-			++itobj1;
-			continue;
-		}
+			string object_id2 = result[i]->getObjectId(); 
 
-		for(unsigned int i=0; i<IdsOut.size(); i++)
-		{
-			string object_id2 = IdsOut[i];
-		
-			if ((object_id1 != object_id2) && (!imp->isConnected (object_id1,object_id2)) && 
-				(objects_->hasElement(object_id2)))
+			if(object_id1==object_id2)
+				continue;
+			
+			bool touch = false; 
+			if(params_.geom_rep1_==TePOLYGONS)
+			{				
+				TePolygonSet polSet2;
+				result[i]->getGeometry(polSet2);
+				for(unsigned int index=0; index<polSet1.size(); ++index)
+				{					
+					for(unsigned int index2=0; index2<polSet2.size(); ++index2)
+					{
+                        bool curTouches = TeTouches(polSet1[index], polSet2[index2]);
+						if(touch && !curTouches)
+						{
+							//verifies if the current polygons are disjunt
+							if(!TeDisjoint(polSet1[index], polSet2[index2]))
+							{
+								touch = false;
+								index = polSet1.size();
+								break;
+							}
+						}
+						touch = curTouches;
+					}
+				}
+			}
+			else if(params_.geom_rep1_==TeCELLS)
 			{
-				TeProxMatrixAttributes attr;
+				TeCellSet cellSet2;
+				result[i]->getGeometry(cellSet2);
+				for(unsigned int index=0; index<cellSet1.size(); ++index)
+				{					
+					for(unsigned int index2=0; index2<cellSet2.size(); ++index2)
+					{
+                        bool curTouches = TeTouches(cellSet1[index], cellSet2[index2]);
+						if(touch && !curTouches)
+						{
+							//verifies if the current polygons are disjoint
+							if(!TeDisjoint(cellSet1[index], cellSet2[index2]))
+							{
+								touch = false;
+								index = cellSet1.size();
+								break;
+							}
+						}
+						touch = curTouches;
+					}
+				}
+			}
 
-				if(calcDistance_)
+			if(touch)
+			{
+				if (!imp->isConnected (object_id1,object_id2))
 				{
+					TeProxMatrixAttributes attr;
 
-					TeCoord2D p1, p2;
-					if (!TeFindObjectsCentroid (objects_, object_id1, geomRep_, p1))
-						return false;
-
-					if (!TeFindObjectsCentroid (objects_, object_id2, geomRep_,  p2))
-						return false;
-
-					attr.CentroidDistance (TeDistance (p1, p2)); 
+					if(params_.calculate_distance_)
+					{
+						TeCoord2D p1 = (*itobj1).getCentroid();
+						TeCoord2D p2 = result[i]->getCentroid();
+						attr.CentroidDistance (TeDistance (p1, p2)); 
+					}
+					imp->connectObjects (object_id2, object_id1, attr);
+					imp->connectObjects (object_id1, object_id2, attr);
 				}
-
-				imp->connectObjects (object_id2, object_id1, attr);
-				imp->connectObjects (object_id1, object_id2, attr);
 			}
-
 		}
-		++itobj1;
-
 
 		if(TeProgress::instance())
 		{
@@ -384,8 +373,9 @@ TeProxMatrixLocalAdjacencyStrategy::Construct (TeProxMatrixImplementation* imp)
 				TeProgress::instance()->setProgress(step);
 		}	
 		++step;
+		++itobj1;
 	}
-
+		
 	if (TeProgress::instance())
 		TeProgress::instance()->reset();
 	return true; 
@@ -397,9 +387,8 @@ TeProxMatrixLocalAdjacencyStrategy::operator= (const TeProxMatrixLocalAdjacencyS
 {
 	if ( this != &rhs )
 	{
-		type_ = rhs.type_;
 		objects_ = rhs.objects_;
-		geomRep_ = rhs.geomRep_;
+		params_ = rhs.params_;
 	}
 	return *this;
 }
@@ -407,96 +396,77 @@ TeProxMatrixLocalAdjacencyStrategy::operator= (const TeProxMatrixLocalAdjacencyS
 bool 
 TeProxMatrixLocalAdjacencyStrategy::operator== (const TeProxMatrixLocalAdjacencyStrategy& rhs) const   
 { 
-	return (TeProxMatrixConstructionStrategy::IsEqual(rhs)); 
+	return (TeProxMatrixConstructionStrategy<TeSTElementSet>::IsEqual(rhs)); 
 }
 	
 
-//////////////////////////////////////////////////////////////////////
-// TeProxMatrixLocalDistanceStrategy 
-//////////////////////////////////////////////////////////////////////
-
-TeProxMatrixLocalDistanceStrategy::TeProxMatrixLocalDistanceStrategy (double max_distance):
-		TeProxMatrixConstructionStrategy (0, TeGEOMETRYNONE, "LocalDistance"), 
-		max_distance_ (max_distance)
-		{ }
 
 
-TeProxMatrixLocalDistanceStrategy::TeProxMatrixLocalDistanceStrategy (TeSTElementSet*  objects, TeGeomRep geomRep, double max_distance): 
-		TeProxMatrixConstructionStrategy(objects, geomRep, "LocalDistance"),
-		max_distance_ (max_distance) 
-		{ }
+//////////////////////////////////////////////////////////////////////
+// TeProxMatrixNearestNeighbourStrategy 
+//////////////////////////////////////////////////////////////////////
+TeProxMatrixNearestNeighbourStrategy::TeProxMatrixNearestNeighbourStrategy ():
+	TeProxMatrixConstructionStrategy<TeSTEventSet> () 
+	{ }
 
+TeProxMatrixNearestNeighbourStrategy::TeProxMatrixNearestNeighbourStrategy (TeSTEventSet* objects, int num_neighbours):
+	TeProxMatrixConstructionStrategy<TeSTEventSet> (objects, TePOINTS, TeNearestNeighboursStrategy) 
+	{
+		params_.num_neighbours_=num_neighbours;
+	}
+	
+TeProxMatrixNearestNeighbourStrategy::TeProxMatrixNearestNeighbourStrategy (const TeProxMatrixNearestNeighbourStrategy& st):
+	TeProxMatrixConstructionStrategy<TeSTEventSet>(st)
+	{} 
 	
-TeProxMatrixLocalDistanceStrategy::TeProxMatrixLocalDistanceStrategy (const TeProxMatrixLocalDistanceStrategy& st): 
-		TeProxMatrixConstructionStrategy(st)
-{
-	max_distance_ = st.max_distance_;
-} 
-
 bool 
-TeProxMatrixLocalDistanceStrategy::Construct (TeProxMatrixImplementation* imp)
+TeProxMatrixNearestNeighbourStrategy::Construct (TeProxMatrixImplementation* imp)
 {
 	if (imp == 0) 
 		return false;
 
-	TeDatabase* db = objects_->theme()->layer()->database();
-	if(!db)
-		return false;
-
-	string geomTable =  objects_->theme()->layer()->tableName(geomRep_);
-	if(geomTable.empty())
-		return true;
-	
-	//verify if the theme has restriction
-	string collTable = "";
-	if(objects_->theme()->hasRestriction())
-		collTable = objects_->theme()->collectionTable();
-	
 	// ----- progress bar
 	int step = 0;
 	if(TeProgress::instance())
-		TeProgress::instance()->setTotalSteps(objects_->numElements());
+		TeProgress::instance()->setTotalSteps(objects_->numSTInstance());
 	// -----
-	
-	TeSTElementSet::iterator itobj1 = objects_->begin();
-	while ( itobj1 != objects_->end())
+
+	TePrecision::instance().setPrecision(TeGetPrecision(objects_->getTheme()->layer()->projection()));
+	TeSTEventSet::iterator it = objects_->begin();
+	while(it!=objects_->end())
 	{
-		// Get object1 id and representation
-		string object_id1 = (*itobj1).objectId();
-		
-		TeCoord2D p1; 
-		if (!TeFindObjectCentroid ((*itobj1), geomRep_, p1))
-			return false;
-	
-		KeysToDist result;
+		TePoint p = (*it).getGeometries();
+		string object_id1=(*it).getObjectId();
+
+		vector<TeSTEvent*>  result;
+		vector<double>  dists;
 		
-		//within distance
-		if(!db->withinDistance(geomTable, geomRep_, p1, result, max_distance_, collTable))
+		if(!objects_->nearestNeighbourSearch(p.location(), result, dists, (params_.num_neighbours_+1)))
 		{
-			++itobj1;
+			++it;
 			continue;
 		}
 
-		KeysToDist::iterator it = result.begin();
-		while(it != result.end())
+		for(unsigned int j=0; j<result.size(); ++j)
 		{
-			string object_id2 = it->first;
+			if(dists[j]==TeMAXFLOAT)
+				continue;
 
-			if ((object_id1 != object_id2) && (!imp->isConnected (object_id1,object_id2)) && 
-				(objects_->hasElement(object_id2)))
+			string object_id2 = result[j]->getObjectId();
+		
+			if ((object_id1 != object_id2) && (!imp->isConnected (object_id1,object_id2)))
 			{
 				TeProxMatrixAttributes attr;
-				attr.CentroidDistance (it->second);
+				attr.CentroidDistance (dists[j]); 
+				
 				imp->connectObjects (object_id1, object_id2, attr);
-				imp->connectObjects (object_id2, object_id1, attr);
 			}
-
-			++it;
 		}
 
+
+		//------ progress bar
 		if(TeProgress::instance())
 		{
-
 			if (TeProgress::instance()->wasCancelled())
 			{
 				TeProgress::instance()->reset();
@@ -506,37 +476,28 @@ TeProxMatrixLocalDistanceStrategy::Construct (TeProxMatrixImplementation* imp)
 				TeProgress::instance()->setProgress(step);
 		}	
 		++step;
-		++itobj1;
+		
+		++it;
 	}
 
 	if (TeProgress::instance())
 		TeProgress::instance()->reset();
-	return true;
-}
-
-	
-bool 
-TeProxMatrixLocalDistanceStrategy::IsEqual (const TeProxMatrixConstructionStrategy& other) const
-{
-	return ((*this) == (TeProxMatrixLocalDistanceStrategy&) other); 
+	return true; 
 }
 
 bool 
-TeProxMatrixLocalDistanceStrategy::operator== (const TeProxMatrixLocalDistanceStrategy& s) const 
+TeProxMatrixNearestNeighbourStrategy::operator== (const TeProxMatrixNearestNeighbourStrategy& s) const
 {
-	return ( TeProxMatrixConstructionStrategy::IsEqual(s) && 
-			(max_distance_ == s.max_distance_)); 
+	return (TeProxMatrixConstructionStrategy<TeSTEventSet>::IsEqual(s)); 
 }
-	
-TeProxMatrixLocalDistanceStrategy& 
-TeProxMatrixLocalDistanceStrategy::operator= (const TeProxMatrixLocalDistanceStrategy& rhs)
+		
+TeProxMatrixNearestNeighbourStrategy& 
+TeProxMatrixNearestNeighbourStrategy::operator= (const TeProxMatrixNearestNeighbourStrategy& rhs)
 {
 	if ( this != &rhs )
 	{
-		type_ = rhs.type_;
 		objects_ = rhs.objects_;
-		geomRep_ = rhs.geomRep_;
-		max_distance_ = rhs.max_distance_;
+		params_ = rhs.params_;
 	}
 	return *this;
 }
@@ -549,22 +510,19 @@ TeProxMatrixClosedNetworkStrategy::TeProxMatrixClosedNetworkStrategy (TeSTElemen
 										TeGeomRep rep, double max_local_distance,
 										double max_net_distance, double  max_connection_distance, 
 										TeGraphNetwork* input_net) : 	
-	TeProxMatrixConstructionStrategy(objects, rep, "ClosedNetwork"),
-	max_local_distance_ (max_local_distance), 
-	max_net_distance_ (max_net_distance), 
-	max_connection_distance_ (max_connection_distance), 
+	TeProxMatrixConstructionStrategy<TeSTElementSet>(objects, rep, TeClosedNetworkStrategy),
 	net_ (input_net) 
-	{ }
+	{
+		params_.max_distance_= max_local_distance; 
+		params_.max_net_distance_ = max_net_distance; 
+		params_.max_connection_distance_= max_connection_distance; 
+	}
 
 
 
 TeProxMatrixClosedNetworkStrategy::TeProxMatrixClosedNetworkStrategy (const TeProxMatrixClosedNetworkStrategy& rhs) :
-	TeProxMatrixConstructionStrategy(rhs)
+	TeProxMatrixConstructionStrategy<TeSTElementSet>(rhs)
 {
-		max_local_distance_ = rhs.max_local_distance_;
-		max_net_distance_ = rhs.max_net_distance_;
-		max_connection_distance_ = rhs.max_connection_distance_;
-		
 		TeGraphNetwork* n = new TeGraphNetwork();
 		*n = *rhs.net_; 
 		net_ = n;
@@ -578,7 +536,7 @@ TeProxMatrixClosedNetworkStrategy::Construct (TeProxMatrixImplementation* imp)
 
 	// Connect local neighbours, based on the Local Distance Strategy
 
-	TeProxMatrixLocalDistanceStrategy local(objects_, geomRep_, max_local_distance_);
+	TeProxMatrixLocalDistanceStrategy<TeSTElementSet> local(objects_, params_.geom_rep1_, params_.max_distance_);
 	local.Construct (imp);
 
 	// Connect neighbours through the network. The process is the following:
@@ -598,7 +556,7 @@ TeProxMatrixClosedNetworkStrategy::Construct (TeProxMatrixImplementation* imp)
 	// ----- progress bar
 	int step = 0;
 	if(TeProgress::instance())
-		TeProgress::instance()->setTotalSteps(objects_->numElements());
+		TeProgress::instance()->setTotalSteps(objects_->numSTInstance());
 	// -----
 
 	// Iterate over all objects and select the ones that are close enough to the network
@@ -606,7 +564,7 @@ TeProxMatrixClosedNetworkStrategy::Construct (TeProxMatrixImplementation* imp)
 	while ( itobj1 != objects_->end())
 	{
 		// Get object1 id and representation
-		string object_id1 = (*itobj1).objectId();
+		string object_id1 = (*itobj1).getObjectId(); 
 		TeCoord2D p1, p2; 
 			
 
@@ -616,7 +574,7 @@ TeProxMatrixClosedNetworkStrategy::Construct (TeProxMatrixImplementation* imp)
 		net_->nearestNodePoint (p1, i, p2, min_distance);
 				
 		TeNode node;
-		if ((min_distance <= max_net_distance_) && net_->getNode(i, node))
+		if ((min_distance <= params_.max_net_distance_) && net_->getNode(i, node))
 		{
 			entry_geom_map[node.objectId()] = object_id1; // Associates geometry with closest net nodes
 			entry_set.add (node);  // This set will be used as initial points in the shortest path algorithm
@@ -636,7 +594,7 @@ TeProxMatrixClosedNetworkStrategy::Construct (TeProxMatrixImplementation* imp)
 		++itobj1;
 	}
 
-	TeSelectEntryPoints (entry_set, entry_geom_map, net_, max_connection_distance_, objects_, geomRep_, imp);
+	TeSelectEntryPoints (entry_set, entry_geom_map, net_, params_.max_connection_distance_, objects_, params_.geom_rep1_, imp);
 	if (TeProgress::instance())
 		TeProgress::instance()->reset();
 		
@@ -645,7 +603,7 @@ TeProxMatrixClosedNetworkStrategy::Construct (TeProxMatrixImplementation* imp)
 
 
 bool 
-TeProxMatrixClosedNetworkStrategy::IsEqual (const TeProxMatrixConstructionStrategy& other) const
+TeProxMatrixClosedNetworkStrategy::IsEqual (const TeProxMatrixConstructionStrategy<TeSTElementSet>& other) const
 {
 	return (*this == (TeProxMatrixClosedNetworkStrategy&) other); 
 }
@@ -655,13 +613,9 @@ TeProxMatrixClosedNetworkStrategy::operator= (const TeProxMatrixClosedNetworkStr
 {
 	if (!(this==&rhs))
 	{
-		type_ = rhs.type_;
 		objects_ = rhs.objects_;
-		geomRep_ = rhs.geomRep_;
-		max_local_distance_ = rhs.max_local_distance_;
-		max_net_distance_ = rhs.max_net_distance_;
-		max_connection_distance_ = rhs.max_connection_distance_;
-	
+		params_ = rhs.params_;
+			
 		TeGraphNetwork* n = new TeGraphNetwork(); 
 		*n = *rhs.net_; 
 		net_ = n;       
@@ -673,10 +627,7 @@ TeProxMatrixClosedNetworkStrategy::operator= (const TeProxMatrixClosedNetworkStr
 bool 
 TeProxMatrixClosedNetworkStrategy::operator== (const TeProxMatrixClosedNetworkStrategy& other) const 
 {
-	return ( TeProxMatrixConstructionStrategy::IsEqual(other) &&
-			(max_local_distance_ == other.max_local_distance_) &&
-			(max_net_distance_ == other.max_net_distance_) &&
-			(max_connection_distance_ == other.max_connection_distance_));
+	return (TeProxMatrixConstructionStrategy<TeSTElementSet>::IsEqual(other));
 }
 	   
 //////////////////////////////////////////////////////////////////////
@@ -687,21 +638,18 @@ TeProxMatrixOpenNetworkStrategy::TeProxMatrixOpenNetworkStrategy (TeSTElementSet
 										double max_local_distance, 
 										double	max_net_distance, double  max_connetion_distance, 
 										TeGraphNetwork* input_net) : 	
-	TeProxMatrixConstructionStrategy(objects, rep, "OpenNetwork"),
-	max_local_distance_ (max_local_distance), 
-	max_net_distance_ (max_net_distance), 
-	max_connection_distance_ (max_connetion_distance), 
+	TeProxMatrixConstructionStrategy<TeSTElementSet>(objects, rep, TeOpenNetworkStrategy),
 	net_ (input_net)
-	{ }
+	{
+		params_.max_distance_= max_local_distance; 
+		params_.max_net_distance_ = max_net_distance; 
+		params_.max_connection_distance_= max_connetion_distance; 
+	}
 
 
 TeProxMatrixOpenNetworkStrategy::TeProxMatrixOpenNetworkStrategy (const TeProxMatrixOpenNetworkStrategy& rhs): 
-	TeProxMatrixConstructionStrategy(rhs)
+	TeProxMatrixConstructionStrategy<TeSTElementSet>(rhs)
 {
-	max_local_distance_ = rhs.max_local_distance_;
-	max_net_distance_ = rhs.max_net_distance_;
-	max_connection_distance_ = rhs.max_connection_distance_;
-	
 	TeGraphNetwork* n = new TeGraphNetwork();
 	*n = *rhs.net_; 
 	net_ = n;
@@ -714,9 +662,9 @@ TeProxMatrixOpenNetworkStrategy::Construct (TeProxMatrixImplementation* imp)
 		return false;
 
 	// Connect local neighbours, based on the Local Distance Strategy
-	if (max_local_distance_ > 0)
+	if (params_.max_distance_ > 0)
 	{
-		TeProxMatrixLocalDistanceStrategy local(objects_, geomRep_, max_local_distance_);
+		TeProxMatrixLocalDistanceStrategy<TeSTElementSet> local(objects_, params_.geom_rep1_, params_.max_distance_);
 		local.Construct (imp);
 	}
 
@@ -734,13 +682,6 @@ TeProxMatrixOpenNetworkStrategy::Construct (TeProxMatrixImplementation* imp)
 	map<string, string> entry_geom_map; // maps input geometries to network entry points
 	TeNodeSet entry_set; // entry points
 
-//	// ----- progress bar
-//	int step = 0;
-//	if(TeProgress::instance())
-
-//		TeProgress::instance()->setTotalSteps(objects_->numObjects());
-	// -----
-
 	// Iterate over all objects and select the ones that are close enough to the network
 	TeSTElementSet::iterator itobj1 = objects_->begin();
 	int id = 0;  // Nodes to be created will have sequential object_ids. 
@@ -749,11 +690,11 @@ TeProxMatrixOpenNetworkStrategy::Construct (TeProxMatrixImplementation* imp)
 
 	{
 		// Get object1 id and representation
-		string object_id1 = (*itobj1).objectId();
+		string object_id1 = (*itobj1).getObjectId();
 		cout << object_id1 << "id " << id << endl;
 
 		TeCoord2D p1; 
-		if (!TeFindObjectCentroid ((*itobj1), geomRep_, p1))
+		if (!TeFindObjectCentroid (itobj1->getGeometries(), params_.geom_rep1_, p1))
 			return false;
 
 
@@ -763,7 +704,7 @@ TeProxMatrixOpenNetworkStrategy::Construct (TeProxMatrixImplementation* imp)
 
 		if (net_->nearestNetworkPoint (p1, line_index, pinter, min_dist))
 		{
-			if (min_dist < max_net_distance_)
+			if (min_dist < params_.max_net_distance_)
 			{
 				TeNode new_node;
 				new_node.add (pinter);
@@ -776,25 +717,12 @@ TeProxMatrixOpenNetworkStrategy::Construct (TeProxMatrixImplementation* imp)
 			}
 		}
 		++itobj1;
-/*		if(TeProgress::instance())
-		{
-			if (TeProgress::instance()->wasCancelled())
-			{
-				TeProgress::instance()->reset();
-				return false;
-			}
-			else
-				TeProgress::instance()->setProgress(step);
-		}	
-		++step;
-		*/
-	
 	}
 
     TeLineSet lineSet = net_->getLineSet();
     map<string, double> lineCosts =  net_->getLineCosts();
 	TeGraphNetwork net(lineSet, lineCosts);
-	TeSelectEntryPoints (entry_set, entry_geom_map, &net, max_connection_distance_, objects_, geomRep_, imp);
+	TeSelectEntryPoints (entry_set, entry_geom_map, &net, params_.max_connection_distance_, objects_, params_.geom_rep1_, imp);
 	if (TeProgress::instance())
 		TeProgress::instance()->reset();
 	return true;
@@ -802,7 +730,7 @@ TeProxMatrixOpenNetworkStrategy::Construct (TeProxMatrixImplementation* imp)
 
 
 bool 
-TeProxMatrixOpenNetworkStrategy::IsEqual (const TeProxMatrixConstructionStrategy& other) const
+TeProxMatrixOpenNetworkStrategy::IsEqual (const TeProxMatrixConstructionStrategy<TeSTElementSet>& other) const
 {
 	return ((*this)==(TeProxMatrixOpenNetworkStrategy&)other); 
 }
@@ -810,10 +738,7 @@ TeProxMatrixOpenNetworkStrategy::IsEqual (const TeProxMatrixConstructionStrategy
 bool 
 TeProxMatrixOpenNetworkStrategy::operator== (const TeProxMatrixOpenNetworkStrategy& other) const 
 {
-	return (TeProxMatrixConstructionStrategy::IsEqual(other) &&
-		(max_local_distance_ == other.max_local_distance_) &&
-		(max_net_distance_ == other.max_net_distance_) &&
-		(max_connection_distance_ == other.max_connection_distance_));
+	return (TeProxMatrixConstructionStrategy<TeSTElementSet>::IsEqual(other));
 }
 
 
@@ -822,13 +747,9 @@ TeProxMatrixOpenNetworkStrategy::operator= (const TeProxMatrixOpenNetworkStrateg
 {
 	if (!(this==&rhs))
 	{
-		type_ = rhs.type_;
+		params_ = rhs.params_;
 		objects_ = rhs.objects_;
-		geomRep_ = rhs.geomRep_;
-		max_local_distance_ = rhs.max_local_distance_;
-		max_net_distance_ = rhs.max_net_distance_;
-		max_connection_distance_ = rhs.max_connection_distance_;
-	
+		
 		TeGraphNetwork* n = new TeGraphNetwork(); 
 		*n = *rhs.net_;                           
 		net_ = n;								
@@ -847,23 +768,23 @@ TeProxMatrixOpenNetworkStrategy2::TeProxMatrixOpenNetworkStrategy2 (TeSTElementS
 										double max_local_distance, 
 										double	max_net_distance, double  max_connetion_distance, 
 										TeGraphNetwork* input_net) : 	
-	TeProxMatrixConstructionStrategy(objects1, rep1, "OpenNetwork2"),
-	objects2_ (objects2), 
-	geomRep2_(rep2),
-	max_local_distance_ (max_local_distance), 
-	max_net_distance_ (max_net_distance), 
-	max_connection_distance_ (max_connetion_distance), 
+	TeProxMatrixConstructionStrategy<TeSTElementSet>(objects1, rep1, TeOpenNetworkStrategy2),
+	objects2_ (objects2),
 	net_ (input_net)
-	{ }  
+	{
+		if(objects2_->theme())
+			params_.theme_id2_=objects2_->theme()->id();
+		params_.geom_rep2_=rep2;
+		params_.max_distance_= max_local_distance; 
+		params_.max_net_distance_ = max_net_distance; 
+		params_.max_connection_distance_= max_connetion_distance; 
+	}  
 
 TeProxMatrixOpenNetworkStrategy2::TeProxMatrixOpenNetworkStrategy2 (const TeProxMatrixOpenNetworkStrategy2& rhs)
-                    : TeProxMatrixConstructionStrategy(rhs)
+                    : TeProxMatrixConstructionStrategy<TeSTElementSet>(rhs)
 {
 	objects2_ = rhs.objects2_;
-	geomRep2_ = rhs.geomRep2_;
-	max_local_distance_ = rhs.max_local_distance_;
-	max_net_distance_ = rhs.max_net_distance_;
-	max_connection_distance_ = rhs.max_connection_distance_;
+	params_ = rhs.params_;
 	
 	TeGraphNetwork* n = new TeGraphNetwork();
 	*n = *rhs.net_; 
@@ -901,11 +822,11 @@ TeProxMatrixOpenNetworkStrategy2:: Construct (TeProxMatrixImplementation* imp)
 		while ( itobj1 != objects_->end())
 		{
 			// Get object1 id and representation
-			string object_id1 = (*itobj1).objectId();
+			string object_id1 = (*itobj1).getObjectId();
 					cout << "object1 " << object_id1 << "id" << id << endl;
 
 			TeCoord2D p1; 
-			if (!TeFindObjectCentroid ((*itobj1), geomRep_, p1))
+			if (!TeFindObjectCentroid (itobj1->getGeometries(), params_.geom_rep1_, p1))
 				return false;
 		
 
@@ -915,7 +836,7 @@ TeProxMatrixOpenNetworkStrategy2:: Construct (TeProxMatrixImplementation* imp)
 
 			if (net_->nearestNetworkPoint (p1, line_index, pinter, min_dist))
 			{
-				if (min_dist < max_net_distance_)
+				if (min_dist < params_.max_net_distance_)
 				{
 					TeNode new_node;
 					new_node.add (pinter);
@@ -937,11 +858,11 @@ TeProxMatrixOpenNetworkStrategy2:: Construct (TeProxMatrixImplementation* imp)
 		while ( itobj2 != objects2_->end())
 		{
 			// Get object1 id and representation
-			string object_id2 = (*itobj2).objectId();
+			string object_id2 = (*itobj2).getObjectId();
 					cout << "object2 " << object_id2 << "id" << id << endl;
 
 			TeCoord2D p2; 
-			if (!TeFindObjectCentroid ((*itobj2), geomRep2_, p2))
+			if (!TeFindObjectCentroid (itobj1->getGeometries(), params_.geom_rep2_, p2))
 				return false;
 		
 			int line_index;
@@ -965,13 +886,13 @@ TeProxMatrixOpenNetworkStrategy2:: Construct (TeProxMatrixImplementation* imp)
         TeLineSet lineSet = net_->getLineSet();
         map<string, double> lineCosts = net_->getLineCosts();
 		TeGraphNetwork net(lineSet, lineCosts);
-		TeSelectEntryPoints2 (entry_set1, entry_set2, entry_geom_map, &net, max_connection_distance_, 
-			objects_, geomRep_, objects2_, geomRep2_, imp);
+		TeSelectEntryPoints2 (entry_set1, entry_set2, entry_geom_map, &net, params_.max_connection_distance_, 
+			objects_, params_.geom_rep1_, objects2_, params_.geom_rep2_, imp);
 			return true;
 	}
 
 bool 
-TeProxMatrixOpenNetworkStrategy2::IsEqual (const TeProxMatrixConstructionStrategy& other) const
+TeProxMatrixOpenNetworkStrategy2::IsEqual (const TeProxMatrixConstructionStrategy<TeSTElementSet>& other) const
 {
 	return ((*this)==(TeProxMatrixOpenNetworkStrategy2&)other); 
 }
@@ -979,11 +900,7 @@ TeProxMatrixOpenNetworkStrategy2::IsEqual (const TeProxMatrixConstructionStrateg
 bool 
 TeProxMatrixOpenNetworkStrategy2:: operator== (const TeProxMatrixOpenNetworkStrategy2& other) const 
 {
-
-	return ((type_==other.type_) &&
-		(max_local_distance_ == other.max_local_distance_) &&
-		(max_net_distance_ == other.max_net_distance_) &&
-		(max_connection_distance_ == other.max_connection_distance_));
+	return (TeProxMatrixConstructionStrategy<TeSTElementSet>::IsEqual(other));
 }
 
 TeProxMatrixOpenNetworkStrategy2& 
@@ -991,13 +908,9 @@ TeProxMatrixOpenNetworkStrategy2:: operator= (const TeProxMatrixOpenNetworkStrat
 {
 		if (!(this==&rhs))
 		{
-			type_ = rhs.type_;
+			params_ = rhs.params_;
 			objects_ = rhs.objects_;
 			objects2_ = rhs.objects2_;
-	
-			max_local_distance_ = rhs.max_local_distance_;
-			max_net_distance_ = rhs.max_net_distance_;
-			max_connection_distance_ = rhs.max_connection_distance_;
 		
 			TeGraphNetwork* n = new TeGraphNetwork(); 
 			*n = *rhs.net_;  
diff --git a/src/terralib/kernel/TeProxMatrixConstructionStrategy.h b/src/terralib/kernel/TeProxMatrixConstructionStrategy.h
old mode 100644
new mode 100755
index 5cd98f9..d3a1f87
--- a/src/terralib/kernel/TeProxMatrixConstructionStrategy.h
+++ b/src/terralib/kernel/TeProxMatrixConstructionStrategy.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+Copyright  2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,82 +20,168 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeProxMatrixConstructionStrategy.h
-    This file contains structures and definitions about construction strategies of proximity matrix 
+    \brief This file contains structures and definitions about construction strategies of proximity matrix 
 */
 
 #ifndef TeProxMatrixConstructionStrategy_H
 #define TeProxMatrixConstructionStrategy_H
 
 #include "TeProxMatrixImplementation.h"
+#include "TeSTElementSet.h"
 #include "TeNetwork.h"
+#include "TeDatabase.h"
+#include "TeMultiGeometry.h"
+
 
-class TeSTElementSet;
+class TeSTEventSet;
 
+TL_DLL bool TeFindObjectCentroid (TeMultiGeometry& mGeom, TeGeomRep rep, TeCoord2D& p);
 
-//! An abstract class to representate construction strategies of proximity matrix   
-class TeProxMatrixConstructionStrategy  
+struct TL_DLL TeProxMatrixConstructionParams
 {
+public:
 
-protected:
+	//construction parameters
+	int						theme_id1_;
+	TeGeomRep				geom_rep1_;
+	int						theme_id2_;
+	TeGeomRep				geom_rep2_;
+	TeGPMConstructionStrategy		strategy_;
+	double						max_distance_;
+	int							num_neighbours_;
+	double						max_net_distance_;
+	double						max_connection_distance_;
+	bool						calculate_distance_;
+
+	//! Empty contructor 
+	TeProxMatrixConstructionParams():
+		theme_id1_(-1),  
+		geom_rep1_(TeGEOMETRYNONE), 
+		theme_id2_(-1), 
+		geom_rep2_(TeGEOMETRYNONE), 
+		strategy_(TeAdjacencyStrategy), 
+		max_distance_(0.), 
+		num_neighbours_(0), 
+		max_net_distance_(0.),
+		max_connection_distance_(0.), 
+		calculate_distance_(false)
+	{ }
+	
+	//! Constructor
+	TeProxMatrixConstructionParams(const int& theme1, const TeGeomRep& geomRep1, const TeGPMConstructionStrategy& strType):
+		theme_id1_(theme1), 
+		geom_rep1_(geomRep1), 
+		theme_id2_(-1), 
+		geom_rep2_(TeGEOMETRYNONE), 
+		strategy_(strType),
+		max_distance_(0.), 
+		num_neighbours_(0),
+		max_net_distance_(0.),
+		max_connection_distance_(0.), 
+		calculate_distance_(false)
+	{ }
+			
+	//! Operator ==
+	bool operator==(const TeProxMatrixConstructionParams& other) const
+	{
+		return(	(theme_id1_==other.theme_id1_) && (geom_rep1_==other.geom_rep1_) &&
+				(theme_id2_==other.theme_id2_) && (geom_rep2_==other.geom_rep2_) &&
+				(strategy_==other.strategy_) && (max_distance_==other.max_distance_) &&
+				(num_neighbours_==other.num_neighbours_) && (max_net_distance_==other.max_net_distance_) && 
+				(max_connection_distance_==other.max_connection_distance_) &&
+				(calculate_distance_==other.calculate_distance_));
+	}
+};
 
+//! A templated class to representate construction strategies of proximity matrix
+template<typename T>
+class TeProxMatrixConstructionStrategy 
+{
+protected:
 	//! Set of objetcs used to construct the matrix
-	TeSTElementSet*   objects_;
+	T*   objects_;
 
-	//! Geometry representation of the objects used to construct the matrix
-	TeGeomRep	geomRep_;
-
-	//! Type of the construction strategy
-	string		type_;
+	//! Construction paramas
+	TeProxMatrixConstructionParams  params_;
 
 	//! Construct
 	TeProxMatrixConstructionStrategy(); 
 
 	//! Construct
-	TeProxMatrixConstructionStrategy(TeSTElementSet*  objects, TeGeomRep geomRep, const string& type);
+	TeProxMatrixConstructionStrategy(T* objects, TeGeomRep geomRep, const TeGPMConstructionStrategy& type=TeAdjacencyStrategy);
 
 	//! Copy construct
 	TeProxMatrixConstructionStrategy(const TeProxMatrixConstructionStrategy& st);
 
 public:
-
 	//! Construct the proximity matrix 
-	virtual bool Construct(TeProxMatrixImplementation*){return false;}
+	virtual bool Construct(TeProxMatrixImplementation*)=0;
 
 	//! Destructor
-	virtual ~TeProxMatrixConstructionStrategy() {}
-
-	//! Return the type of the strategy
-	string Type() {return type_;}
+	virtual ~TeProxMatrixConstructionStrategy() 
+	{}
 
 	//! Set the set of objects and its geometry representation
-	void setSTObjects (TeSTElementSet*  objects, TeGeomRep  geomRep); 
+	void setSTObjects (T*  objects, TeGeomRep  geomRep); 
 	
 	//! Get the objects used to construct the matrix
-	TeSTElementSet* objects(); 
+	T* objects()  { return objects_; } 
 
-	//! Get the geometry representation
-	TeGeomRep geomRep() { return geomRep_; }
+	//! Returns the construction params
+	TeProxMatrixConstructionParams& constructionParams() { return params_; }
 	
 	//! Verify if the type of the strategy, the object set and its geometry representation are equal
-	virtual bool IsEqual (const TeProxMatrixConstructionStrategy& other) const;  
+	virtual bool IsEqual (const TeProxMatrixConstructionStrategy<T>& other) const;  
 };
 
+template<typename T> 
+TeProxMatrixConstructionStrategy<T>::TeProxMatrixConstructionStrategy() : 
+	objects_(0), 
+	params_(-1, TeGEOMETRYNONE, TeAdjacencyStrategy)
+	{ } 
 
-//! A class to implement the local adjacency strategy of proximity matrix
-class TeProxMatrixLocalAdjacencyStrategy : public  TeProxMatrixConstructionStrategy
+template<typename T> 
+TeProxMatrixConstructionStrategy<T>::TeProxMatrixConstructionStrategy(T*  objects, TeGeomRep geomRep, const TeGPMConstructionStrategy& type) :
+	objects_(objects)
+	{
+		if(objects->theme())
+			params_.theme_id1_ = objects->theme()->id();
+		params_.geom_rep1_ = geomRep;
+		params_.strategy_ = type;
+	} 
+
+template<typename T> 
+TeProxMatrixConstructionStrategy<T>::TeProxMatrixConstructionStrategy (const TeProxMatrixConstructionStrategy& st)
+{
+	objects_ = st.objects_; 
+	params_ = st.params_;
+}
+
+template<typename T> void 
+TeProxMatrixConstructionStrategy<T>::setSTObjects (T*  objects, TeGeomRep  geomRep)
+{	
+	objects_ = objects; 
+	if(objects->theme())
+		params_.theme_id1_ = objects->theme()->id();
+	params_.geom_rep1_ = geomRep; 
+}
+
+template<typename T> bool 
+TeProxMatrixConstructionStrategy<T>::IsEqual (const TeProxMatrixConstructionStrategy<T>& other) const
 {
+	return ((params_==other.params_) && 
+		((&objects_)==(&other.objects_))); 
+}
 
-private:
 
-	//! If it must calculate or not the distance between neighbors
-	bool  calcDistance_;
-	
+//! A class to implement the local adjacency strategy of proximity matrix
+class TL_DLL TeProxMatrixLocalAdjacencyStrategy : public  TeProxMatrixConstructionStrategy<TeSTElementSet>
+{
 public:
 
 	//! Constructor
-	TeProxMatrixLocalAdjacencyStrategy (bool calcDistance=false); 
+	TeProxMatrixLocalAdjacencyStrategy (); 
 
 	//! Constructor
 	TeProxMatrixLocalAdjacencyStrategy (TeSTElementSet*  objects, TeGeomRep	geomRep, bool calcDistance=false);
@@ -115,27 +201,23 @@ public:
 	//! Assignment operator 
 	TeProxMatrixLocalAdjacencyStrategy& operator= (const TeProxMatrixLocalAdjacencyStrategy& rhs); 
 
-	bool calculateDistance()
-	{ return calcDistance_; }
 };
 
 
 //! A class to implement the local distance strategy of proximity matrix
-class TeProxMatrixLocalDistanceStrategy : public  TeProxMatrixConstructionStrategy
+template<typename Set>
+class TeProxMatrixLocalDistanceStrategy : public TeProxMatrixConstructionStrategy<Set>
 {
-private:
-	double			max_distance_;
-
 public:
 
 	//! Constructor
-	TeProxMatrixLocalDistanceStrategy (double max_distance = 0);
+	TeProxMatrixLocalDistanceStrategy ();
 	
 	//! Constructor
-	TeProxMatrixLocalDistanceStrategy (TeSTElementSet*  objects, TeGeomRep geomRep, double max_distance); 
+	TeProxMatrixLocalDistanceStrategy (Set*  objects, TeGeomRep geomRep, double max_distance); 
 	
 	//! Copy constructor
-	TeProxMatrixLocalDistanceStrategy (const TeProxMatrixLocalDistanceStrategy& st); 
+	TeProxMatrixLocalDistanceStrategy (const TeProxMatrixLocalDistanceStrategy<Set>& st); 
 	
 	//! Destructor
 	virtual ~TeProxMatrixLocalDistanceStrategy(){}
@@ -143,31 +225,51 @@ public:
 	//! Construct the proximity matrix through local distance strategy 
 	virtual bool Construct (TeProxMatrixImplementation* imp); 
 
-	//! Verify if is equal 
-	virtual bool IsEqual (const TeProxMatrixConstructionStrategy& other) const;
+	//! Equal operator 
+	bool operator== (const TeProxMatrixLocalDistanceStrategy<Set>& s) const; 
 		
+	//! Assignment operator
+	TeProxMatrixLocalDistanceStrategy<Set>& operator= (const TeProxMatrixLocalDistanceStrategy<Set>& rhs);
+
+};
+
+
+//! A class to implement the nearest neighbour strategy of proximity matrix
+class TL_DLL TeProxMatrixNearestNeighbourStrategy : public  TeProxMatrixConstructionStrategy<TeSTEventSet>
+{
+public:
+	//! Empty constructor
+	TeProxMatrixNearestNeighbourStrategy ();
+
+	//! Constructor
+	// The STEventSet must be created with geometries, using kdTree and ordered by object_id
+	TeProxMatrixNearestNeighbourStrategy (TeSTEventSet* objects, int num_neighbours);
+	
+	//! Copy constructor
+	TeProxMatrixNearestNeighbourStrategy (const TeProxMatrixNearestNeighbourStrategy& st); 
+	
+	//! Destructor
+	virtual ~TeProxMatrixNearestNeighbourStrategy(){}
+	
+	//! Construct the proximity matrix through local distance strategy 
+	virtual bool Construct (TeProxMatrixImplementation* imp); 
+
 	//! Equal operator 
-	bool operator== (const TeProxMatrixLocalDistanceStrategy& s) const; 
+	bool operator== (const TeProxMatrixNearestNeighbourStrategy& s) const; 
 		
 	//! Assignment operator
-	TeProxMatrixLocalDistanceStrategy& operator= (const TeProxMatrixLocalDistanceStrategy& rhs);
+	TeProxMatrixNearestNeighbourStrategy& operator= (const TeProxMatrixNearestNeighbourStrategy& rhs);
 
 };
 
 
 //! A class to implement the closed network strategy of proximity matrix
-class TeProxMatrixClosedNetworkStrategy : public  TeProxMatrixConstructionStrategy
+class TL_DLL TeProxMatrixClosedNetworkStrategy : public TeProxMatrixConstructionStrategy<TeSTElementSet>
 {
 private:
-	double	max_local_distance_;
-	double	max_net_distance_;
-	double  max_connection_distance_;
-
-
 	TeGraphNetwork*		net_;
  
 public:
-
 	//! Constructor
 	TeProxMatrixClosedNetworkStrategy (	TeSTElementSet*  objects, TeGeomRep rep, double max_local_distance,
 										double max_net_distance, double  max_connection_distance, 
@@ -187,7 +289,7 @@ public:
 	virtual bool Construct (TeProxMatrixImplementation* imp); 
 	
 	//! Verify if is equal
-	virtual bool IsEqual (const TeProxMatrixConstructionStrategy& other) const; 
+	virtual bool IsEqual (const TeProxMatrixConstructionStrategy<TeSTElementSet>& other) const; 
 	
 	//! Assignment operator
 	TeProxMatrixClosedNetworkStrategy& operator= (const TeProxMatrixClosedNetworkStrategy& rhs);
@@ -200,14 +302,11 @@ public:
 };
 
 //! A class to implement the open network strategy of proximity matrix (among a set of objetcs)
-class TeProxMatrixOpenNetworkStrategy : public  TeProxMatrixConstructionStrategy
+class TL_DLL TeProxMatrixOpenNetworkStrategy : public TeProxMatrixConstructionStrategy<TeSTElementSet>
 {
 private:
-	double			max_local_distance_;
-	double			max_net_distance_;
-	double			max_connection_distance_;
-
 	TeGraphNetwork*		net_;
+
 public:
 
 	//! Constructor
@@ -228,7 +327,7 @@ public:
 	virtual bool Construct (TeProxMatrixImplementation* imp); 
 
 	//! Verify if is equal
-	virtual bool IsEqual (const TeProxMatrixConstructionStrategy& other) const; 
+	virtual bool IsEqual (const TeProxMatrixConstructionStrategy<TeSTElementSet>& other) const; 
 
 	//! Equal operator
 	bool operator== (const TeProxMatrixOpenNetworkStrategy& other) const; 
@@ -239,15 +338,10 @@ public:
 
 
 //! A class to implement the open network strategy of proximity matrix (relationships among objetc of two differnt sets)
-class TeProxMatrixOpenNetworkStrategy2 : public  TeProxMatrixConstructionStrategy
+class TL_DLL TeProxMatrixOpenNetworkStrategy2 : public TeProxMatrixConstructionStrategy<TeSTElementSet>
 {
 private:
 	TeSTElementSet*		objects2_;
-	TeGeomRep			geomRep2_;
-	double			max_local_distance_;
-	double			max_net_distance_;
-	double			max_connection_distance_;
-
 	TeGraphNetwork*		net_;
 public:
 
@@ -271,7 +365,7 @@ public:
 	virtual bool Construct (TeProxMatrixImplementation* imp); 
 
 	//! Verify if is equal
-	virtual bool IsEqual (const TeProxMatrixConstructionStrategy& other) const; 
+	virtual bool IsEqual (const TeProxMatrixConstructionStrategy<TeSTElementSet>& other) const; 
 
 	//! Equal operator
 	bool operator== (const TeProxMatrixOpenNetworkStrategy2& other) const; 
@@ -281,4 +375,117 @@ public:
 
 };
 
+//////////////////////////////////////////////////////////////////////
+// TeProxMatrixLocalDistanceStrategy 
+//////////////////////////////////////////////////////////////////////
+template<typename Set> 
+TeProxMatrixLocalDistanceStrategy<Set>::TeProxMatrixLocalDistanceStrategy ():
+		TeProxMatrixConstructionStrategy<Set> (0, TeGEOMETRYNONE, TeDistanceStrategy) 
+		{}
+
+
+template<typename Set> 
+TeProxMatrixLocalDistanceStrategy<Set>::TeProxMatrixLocalDistanceStrategy (Set*  objects, TeGeomRep geomRep, double max_distance): 
+		TeProxMatrixConstructionStrategy<Set>(objects, geomRep, TeDistanceStrategy)
+		{
+			TeProxMatrixConstructionStrategy<Set>::params_.max_distance_ = max_distance; 
+		}
+
+	
+template<typename Set> 
+TeProxMatrixLocalDistanceStrategy<Set>::TeProxMatrixLocalDistanceStrategy (const TeProxMatrixLocalDistanceStrategy<Set>& st): 
+		TeProxMatrixConstructionStrategy<Set>(st)
+		{} 
+
+template<typename Set> bool 
+TeProxMatrixLocalDistanceStrategy<Set>::Construct(TeProxMatrixImplementation* imp)
+{
+	if (imp == 0) 
+		return false;
+	
+	// Iterate over all selected objects, selecting their neighbours
+	TeSTElementSet::iterator itobj1 = TeProxMatrixConstructionStrategy<Set>::objects_->begin();
+	
+	// ----- progress bar
+	int step = 0;
+	if(TeProgress::instance())
+		TeProgress::instance()->setTotalSteps(TeProxMatrixConstructionStrategy<Set>::objects_->numSTInstance());
+	// -----
+
+	TeProjection* proj = 0;
+	if(TeProxMatrixConstructionStrategy<Set>::objects_->theme())
+		proj = TeProxMatrixConstructionStrategy<Set>::objects_->theme()->layer()->projection();
+	else if(TeProxMatrixConstructionStrategy<Set>::objects_->getLayer())
+		proj = TeProxMatrixConstructionStrategy<Set>::objects_->getLayer()->projection();
+
+	TePrecision::instance().setPrecision(TeGetPrecision(proj));
+	double max_d = TeProxMatrixConstructionStrategy<Set>::params_.max_distance_;
+		
+	while ( itobj1 != TeProxMatrixConstructionStrategy<Set>::objects_->end())
+	{
+		// Gets the possible objects from RTree in the element set
+		vector<TeSTInstance*> result;
+		TeBox b = (*itobj1).getGeometries().getBox();
+		TeBox bAux(b.x1()-max_d, b.y1()-max_d, b.x2()+max_d, b.y2()+max_d);
+		
+		TeProxMatrixConstructionStrategy<Set>::objects_->search(bAux, result);
+
+		string object_id1 = (*itobj1).getObjectId();
+		TeCoord2D coord1 = itobj1->getCentroid();
+		for(unsigned int index =0; index<result.size(); ++index)
+		{
+			string object_id2 = result[index]->getObjectId();
+			if(object_id1==object_id2)
+				continue;
+			
+			TeCoord2D coord2 = result[index]->getCentroid();
+			double dist = TeDistance(coord1, coord2);
+			if(dist <= max_d)
+			{
+				if(!imp->isConnected (object_id1,object_id2))
+				{
+					TeProxMatrixAttributes attr;
+					attr.CentroidDistance (dist);
+					imp->connectObjects (object_id1, object_id2, attr);
+					imp->connectObjects (object_id2, object_id1, attr);
+				}
+			}
+		}
+
+		if(TeProgress::instance())
+		{
+			if (TeProgress::instance()->wasCancelled())
+			{
+				TeProgress::instance()->reset();
+				return false;
+			}
+			else
+				TeProgress::instance()->setProgress(step);
+		}	
+		++step;
+		++itobj1;
+	}
+	
+	if (TeProgress::instance())
+		TeProgress::instance()->reset();
+	return true;
+}
+
+template<typename Set> bool 
+TeProxMatrixLocalDistanceStrategy<Set>::operator== (const TeProxMatrixLocalDistanceStrategy<Set>& s) const 
+{
+	return ( TeProxMatrixConstructionStrategy<Set>::IsEqual(s)); 
+}
+	
+template<typename Set> TeProxMatrixLocalDistanceStrategy<Set>& 
+TeProxMatrixLocalDistanceStrategy<Set>::operator= (const TeProxMatrixLocalDistanceStrategy<Set>& rhs)
+{
+	if ( this != &rhs )
+	{
+		TeProxMatrixConstructionStrategy<Set>::objects_ = rhs.objects_;
+		TeProxMatrixConstructionStrategy<Set>::params_ = rhs.params_;
+	}
+	return *this;
+}
+
 #endif
diff --git a/src/terralib/kernel/TeProxMatrixImplementation.cpp b/src/terralib/kernel/TeProxMatrixImplementation.cpp
old mode 100644
new mode 100755
index 9a4f4ca..7fdc36e
--- a/src/terralib/kernel/TeProxMatrixImplementation.cpp
+++ b/src/terralib/kernel/TeProxMatrixImplementation.cpp
@@ -25,15 +25,18 @@ of this library and its documentation.
 
 #include <stdio.h>
 
-TeProxMatrixGraphBreymann:: TeProxMatrixGraphBreymann (TeProxMatrixGraphBreymann&  other) : TeProxMatrixImplementation(), graph_(false)
-{
-	type_ = other.type_;
+TeProxMatrixGraphBreymann:: TeProxMatrixGraphBreymann () : 
+      TeProxMatrixImplementation(TeGraphBreymann), graph_(true)
+{ }
+
+TeProxMatrixGraphBreymann:: TeProxMatrixGraphBreymann (TeProxMatrixGraphBreymann&  other) : 
+      TeProxMatrixImplementation(TeGraphBreymann), graph_(true)
+{	
 //	graph_ = other.graph_;
 	map_ = other.map_;
 }
 
 	
-
 TeProxMatrixGraphBreymann&
 TeProxMatrixGraphBreymann:: operator= (TeProxMatrixGraphBreymann& other)
 {
@@ -190,176 +193,306 @@ TeProxMatrixGraphBreymann::getNeighbours (int i, string& object_id, TeNeighbours
 
 
 TeProxMatrixImplementation* 
-TeProxMatrixGraphBreymann:: CreateCopy ()
+TeProxMatrixGraphBreymann::createCopy ()
 {
 	TeProxMatrixGraphBreymann* imp = new TeProxMatrixGraphBreymann (*this);
 	return imp;
 
 }
 
-void
-TeProxMatrixGraphBreymann:: List ()
-{
-
-	cout << "objetos proximos " << endl;
-	for (unsigned int j = 0; j < graph_.size(); j++)
-		cout << "objeto " << j << " id " << graph_[j].first << endl;
 
+bool
+TeProxMatrixGraphBreymann::saveTextFile (const string& name, map<string, string>* ids)
+{
+	string complete_name = name + ".txt";
 
-	for (unsigned int i = 0; i < graph_.size(); i++)
+	FILE*	fp = fopen(complete_name.c_str(),"w");
+	if (fp)
 	{
-		if ((graph_[i].first == "13") || (graph_[i].first == "20") || 
-			(graph_[i].first == "36") ) /*|| (graph_[i].first == "C09L12") || 
-				(graph_[i].first == "C10L15") || (graph_[i].first == "C27L14") || 
-					(graph_[i].first == "C15L05"))*/
-
+		fprintf (fp, "%d\n", ids->size()); //number of objects
+	
+		map<string, string>::iterator it;
+		for (unsigned int i = 0; i < graph_.size(); i++)
 		{
-			cout << "object: " << i << " id: " << graph_[i].first << endl;
-			cout << "vizinhos: " << endl;
 
+			string objId1, objId2;
+			objId1 = graph_[i].first;
+			if(ids)
+			{
+				it=ids->find(graph_[i].first);
+				if(it!=ids->end())
+					objId1 = it->second;
+			}
+						
+			fprintf (fp, " %s ", objId1.c_str());
+			
 			br_stl::Graph<string, TeProxMatrixAttributes>::Successor::iterator 
 				start	= graph_[i].second.begin(),
 				end		= graph_[i].second.end();
-
+			//double sum = 0.0;
 			while (start != end) 
 			{
-//				cout << "    " << graph_[(*start).first].first  << endl;
-				cout << "    " << graph_[(*start).first].first << " w " << (*start).second.Weight() << " d1 " << (*start).second.CentroidDistance()  << " d2 " << (*start).second.NetworkObjectsDistance()  << " d3 " << (*start).second.NetworkMinimumPath() << endl;
+				objId2 = graph_[(*start).first].first;
+				if(ids)
+				{
+					it=ids->find(objId2);
+					if(it!=ids->end())
+						objId2 = it->second;
+				}
+				
+				fprintf (fp, " %s ", objId2.c_str());  
+				//sum += (*start).second.Weight();
 				start++;
 			}
-			cout << endl;
+
+			//fprintf (fp, "Weights sum: %3.7f\n", sum);
+			fprintf (fp, "\n");
 		}
+		fclose (fp);
+		return true;
 	}
-
+	else 
+		return false;
 }
 
 
 bool
-TeProxMatrixGraphBreymann:: SaveTextFile (string& name)
+TeProxMatrixGraphBreymann::saveGALFile (const string& name, map<string, string>* ids)
 {
-	string complete_name = name + ".txt";
 
+	string complete_name = name + ".GAL";
 	FILE*	fp = fopen(complete_name.c_str(),"w");
 	if (fp)
 	{
-		fprintf (fp, "Objetos conectados: %d\n", graph_.size() );
-	//	for (int j = 0; j < graph_.size(); j++)
-	//		fprintf (fp, "  %s%\n", graph_[j].first.c_str());
-		
-
+		fprintf (fp, "%d\n", ids->size() ); // first line: number of elements in matrix
+		map<string, string>::iterator it;
 		for (unsigned int i = 0; i < graph_.size(); i++)
 		{
-
-			fprintf (fp, "%d --------------- object_id:  %s\n", i, graph_[i].first.c_str());
-			fprintf (fp,"  vizinhos:\n");
-
+			string objId1, objId2;
+			objId1 = graph_[i].first;
+			if(ids)
+			{
+				it = ids->find(objId1);
+				if(it!=ids->end())
+					objId1 = it->second;
+			}
+			
+			fprintf (fp, "%s %d\n", objId1.c_str(), graph_[i].second.size());
 			br_stl::Graph<string, TeProxMatrixAttributes>::Successor::iterator 
 				start	= graph_[i].second.begin(),
 				end		= graph_[i].second.end();
-			double sum = 0.0;
 			while (start != end) 
 			{
-				fprintf (fp, "%s S %d  W: %3.7f  D1:  %3.7f   D2: %3.7f   D3: %3.7f \n", graph_[(*start).first].first.c_str(), (*start).second.Slice(), (*start).second.Weight(),(*start).second.CentroidDistance() , (*start).second.NetworkObjectsDistance(),(*start).second.NetworkMinimumPath() );
-				sum += (*start).second.Weight();
+				//fprintf (fp, "%s   %3.7f\n", graph_[(*start).first].first.c_str(), (*start).second.Weight() );
+				objId2 = graph_[(*start).first].first;
+				if(ids)
+				{
+					it=ids->find(objId2);
+					if(it!=ids->end())
+                        objId2 = it->second;
+				}				
+
+                fprintf (fp, "%s  ", objId2.c_str());
 				start++;
 			}
-
-			fprintf (fp, "Weights sum: %3.7f\n", sum);
-			fprintf (fp, "end --------------- object_id:  %s\n\n", graph_[i].first.c_str());
-
-	
+			fprintf (fp, "\n");
 		}
 		fclose (fp);
 		return true;
 	}
 	else return false;
 	
-	/*
-	FILE*	fp = fopen(name.c_str(),"w");
+}
+
+
+bool
+TeProxMatrixGraphBreymann::saveGWTFile (const string& name, map<string, string>* ids)
+{
+
+	string complete_name = name + ".GWT";
+	FILE*	fp = fopen(complete_name.c_str(),"w");
 	if (fp)
 	{
-		for (int i = 0; i < graph_.size(); i++)
+		fprintf (fp, "%d\n", ids->size() ); // first line: number of elements in matrix
+		map<string, string>::iterator it;
+		for (unsigned int i = 0; i < graph_.size(); i++)
 		{
-
-
-    		cout << "***********************" << graph_[i].first << endl;
 			br_stl::Graph<string, TeProxMatrixAttributes>::Successor::iterator 
 				start	= graph_[i].second.begin(),
 				end		= graph_[i].second.end();
-			double sum = 0.0;
 			while (start != end) 
 			{
-				cout << graph_[(*start).first].first << endl;
-				fprintf (fp, "%3.7f ",  (*start).second.CentroidDistance());
-				sum += (*start).second.Weight();
+				string objId1, objId2;
+				objId1 = graph_[i].first;
+				objId2 = graph_[(*start).first].first;
+				if(ids)
+				{
+					it=ids->find(graph_[i].first);
+					if(it!=ids->end())
+						objId1 = it->second;
+					it=ids->find(graph_[(*start).first].first);
+					if(it!=ids->end())
+						objId2 = it->second;
+				}
+				fprintf (fp, "%s %s		%3.7f\n", objId1.c_str(), objId2.c_str(), (*start).second.CentroidDistance());
 				start++;
 			}
+		}
+		fclose (fp);
+		return true;
+	}
+	else 
+		return false;
+	
+}
 
-			fprintf (fp, "\n");
+// -------- save from vector
+
+bool
+TeProxMatrixGraphBreymann::saveTextFile (const string& name, vector<string>* ids)
+{
+	string complete_name = name + ".txt";
+
+	FILE*	fp = fopen(complete_name.c_str(),"w");
+	if (fp)
+	{
+		fprintf (fp, "%d\n", ids->size()); //number of objects
 	
+		vector<string>::iterator it = ids->begin();
+		int Id=1;
+		while(it!=ids->end())
+		{
+			string objId1, objId2;
+			objId1 = Te2String(Id);
+			
+			fprintf (fp, " %s ", objId1.c_str());
+
+			TeNeighbours neigs;
+			this->getNeighbours((*it), neigs);
+
+			for(int j=0; j<neigs.size(); ++j)
+			{
+				string objId2aux = neigs[j];
+				objId2 ="";
+				for(unsigned int n=0; n<ids->size(); ++n)
+				{
+					if(objId2aux==ids->operator [](n))
+					{
+						objId2 = Te2String(n+1);
+						break;
+					}
+				}
+				fprintf (fp, " %s ", objId2.c_str());  
+			}
+
+			fprintf (fp, "\n");
+
+			++it;
+			++Id;
 		}
+
 		fclose (fp);
 		return true;
 	}
-	else return false;
-	*/
+	else 
+		return false;
 }
 
 
 bool
-TeProxMatrixGraphBreymann:: SaveGALFile (string& name)
+TeProxMatrixGraphBreymann::saveGALFile (const string& name, vector<string>* ids)
 {
 
-	string complete_name = name + ".gal";
+	string complete_name = name + ".GAL";
 	FILE*	fp = fopen(complete_name.c_str(),"w");
 	if (fp)
 	{
-		fprintf (fp, "%d\n", graph_.size() ); // first line: number of elements in matrix
-		for (unsigned int i = 0; i < graph_.size(); i++)
+		fprintf (fp, "%d\n", ids->size() ); // first line: number of elements in matrix
+		
+		vector<string>::iterator it = ids->begin();
+		int Id=1;
+		while(it!=ids->end())
 		{
+			string objId1, objId2;
+			objId1 = Te2String(Id);
+			
+			TeNeighbours neigs;
+			this->getNeighbours((*it), neigs);
 
-			fprintf (fp, "%s %d\n", graph_[i].first.c_str(), graph_[i].second.size());
-			br_stl::Graph<string, TeProxMatrixAttributes>::Successor::iterator 
-				start	= graph_[i].second.begin(),
-				end		= graph_[i].second.end();
-			while (start != end) 
+			fprintf (fp, "%s %d\n", objId1.c_str(), neigs.size());
+
+			for(int j=0; j<neigs.size(); ++j)
 			{
-				fprintf (fp, "%s   %3.7f\n", graph_[(*start).first].first.c_str(), (*start).second.Weight() );
-				start++;
+				string objId2aux = neigs[j];
+				objId2 ="";
+				for(unsigned int n=0; n<ids->size(); ++n)
+				{
+					if(objId2aux==ids->operator[](n))
+					{
+						objId2 = Te2String(n+1);
+						break;
+					}
+				}
+				fprintf (fp, "%s  ", objId2.c_str());  
 			}
+
 			fprintf (fp, "\n");
+
+			++it;
+			++Id;
 		}
+		
 		fclose (fp);
 		return true;
 	}
-	else return false;
+	else 
+		return false;
 	
 }
 
 
 bool
-TeProxMatrixGraphBreymann:: SaveGWTFile (string& name)
+TeProxMatrixGraphBreymann::saveGWTFile (const string& name, vector<string>* ids)
 {
 
-	string complete_name = name + ".gwt";
+	string complete_name = name + ".GWT";
 	FILE*	fp = fopen(complete_name.c_str(),"w");
 	if (fp)
 	{
-		fprintf (fp, "%d\n", graph_.size() ); // first line: number of elements in matrix
-		for (unsigned int i = 0; i < graph_.size(); i++)
+		fprintf (fp, "%d\n", ids->size() ); // first line: number of elements in matrix
+		vector<string>::iterator it = ids->begin();
+		int Id=1;
+		while(it!=ids->end())
 		{
-			br_stl::Graph<string, TeProxMatrixAttributes>::Successor::iterator 
-				start	= graph_[i].second.begin(),
-				end		= graph_[i].second.end();
-			while (start != end) 
+			string objId1, objId2;
+			objId1 = Te2String(Id);
+			
+			TeNeighbours neigs;
+			this->getNeighbours((*it), neigs);
+
+			for(int j=0; j<neigs.size(); ++j)
 			{
-				fprintf (fp, "%s %s\n", graph_[i].first.c_str(), graph_[(*start).first].first.c_str());
-				start++;
+				string objId2aux = neigs[j];
+				double dist = (neigs.Attributes(j)).CentroidDistance();
+				objId2 ="";
+				for(unsigned int n=0; n<ids->size(); ++n)
+				{
+					if(objId2aux==ids->operator[](n))
+					{
+						objId2 = Te2String(n+1);
+						break;
+					}
+				}
+				fprintf (fp, "%s %s		%3.7f\n", objId1.c_str(), objId2.c_str(), dist);
 			}
+			++it;
+			++Id;
 		}
+				
 		fclose (fp);
 		return true;
 	}
-	else return false;
+	else 
+		return false;
 	
 }
diff --git a/src/terralib/kernel/TeProxMatrixImplementation.h b/src/terralib/kernel/TeProxMatrixImplementation.h
old mode 100644
new mode 100755
index 83350f8..a3693ca
--- a/src/terralib/kernel/TeProxMatrixImplementation.h
+++ b/src/terralib/kernel/TeProxMatrixImplementation.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,9 +20,8 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeProxMatrixImplementation.h
-    This file contains structures and definitions about different representations of proximity matrix 
+    \brief This file contains structures and definitions about different representations of proximity matrix 
 */
 
 #ifndef TeProxMatrixImplementation_H
@@ -32,19 +31,17 @@ of this library and its documentation.
 #include <graph.h>
 
 //! An abstract class to represent proximity matrix   
-class TeProxMatrixImplementation  
+class TL_DLL TeProxMatrixImplementation  
 {
-
 protected:
-	
 	//! Type of the representation
-	string type_;
+	TeGPMImplementation type_;
 	
 	//! Empty constructor 
-	TeProxMatrixImplementation(){}
+	TeProxMatrixImplementation(const TeGPMImplementation& type): type_(type)
+		{}
 
 public:
-
 	//! Verify if two objects are neighbour or connected
 	bool isConnected (const string& object_id1, const string& object_id2) 
 	{
@@ -53,40 +50,40 @@ public:
 	}
 
 	//! Connect two objects
-	virtual void connectObjects (const string& /* object_id1 */, const string& /* object_id2 */, const TeProxMatrixAttributes& /* attr */){}
+	virtual void connectObjects (const string& , const string& , const TeProxMatrixAttributes& ) = 0;
 
 	//! Disconnect two objects
-	virtual bool disconnectObjects (const string& /* object_id1 */, const string& /* object_id2 */) {return false;}
+	virtual bool disconnectObjects (const string& , const string& ) { return false; }
 
 	//! Remove an object
-	virtual bool removeObject (const string& /* object_id */)	{return false;}
+	virtual bool removeObject (const string& ) { return false; }
 
 	//! Get connection attributes
-	virtual bool getConnectionAttributes (const string& /* object_id1 */, const string& /* object_id2 */, TeProxMatrixAttributes& /* attr */)	{return false;}
+	virtual bool getConnectionAttributes (const string&, const string&, TeProxMatrixAttributes& )= 0;
 
 	//! Set connection attributes
-	virtual bool setConnectionAttributes (const string& /* object_id1 */, const string& /* object_id2 */, const TeProxMatrixAttributes& /*attr*/) {return false;}
+	virtual bool setConnectionAttributes (const string&, const string&, const TeProxMatrixAttributes&) =0;
 
 	//! Get the neighbours of an object
-	virtual bool getNeighbours (const string& /* object_id */, TeNeighbours& /* neigh */)	{return false;}
+	virtual bool getNeighbours (const string& , TeNeighbours& )=0;
 
 	//! Get the obj-th neighbour of an object 
-	virtual bool getNeighbours (int /* obj */, string& /* object_id */, TeNeighbours& /* neigh */) {return false;}  	
+	virtual bool getNeighbours (int, string& , TeNeighbours& )=0;	
 
 	//! Get the neighbours of an object
-	virtual bool getNeighboursNeighbours (const string& /* object_id */, TeNeighbours& /* neigh */, int /* max_order */ = 2)	{return false;}
+	virtual bool getNeighboursNeighbours (const string&, TeNeighbours&, int /* max_order */ = 2)=0;
 
 	//! Return the number of objects
-	virtual int  NumberOfObjects () {return 0;}
+	virtual int  numberOfObjects()=0;
 
 	//! Return the type of the representation 
-	string Type() {return type_;}
+	TeGPMImplementation type() {return type_;}
 
 	//! Create a copy
-	virtual TeProxMatrixImplementation* CreateCopy (){return 0;}
+	virtual TeProxMatrixImplementation* createCopy ()=0;
 	
 	//! Verify if is equal
-	virtual bool IsEqual (TeProxMatrixImplementation& other)
+	virtual bool isEqual (TeProxMatrixImplementation& other)
 	{
 		if (type_ == other.type_) 
 			return true; 
@@ -94,20 +91,25 @@ public:
 	}
 
 	//! Equal operator
-	virtual bool operator== (const TeProxMatrixImplementation& /* other */) const { return true;}
+	virtual bool operator== (const TeProxMatrixImplementation& ) const { return false; } 
 		
-	
 	//! Save the proximity matrix in a text file
-	virtual bool SaveTextFile (string& /* name */) {return false;}
+	virtual bool saveTextFile (const string&, map<string, string>*)=0;
 
 	//! Save the proximity matrix in a GAL format text file 
-	virtual bool SaveGALFile (string& /* name */){return false;}
+	virtual bool saveGALFile (const string&, map<string, string>*)=0;
 
 	//! Save the proximity matrix in a GWT format text file 
-	virtual bool SaveGWTFile (string& /* name */){return false;}
+	virtual bool saveGWTFile (const string&, map<string, string>*)=0;
+
+	//! Save the proximity matrix in a text file
+	virtual bool saveTextFile (const string&, vector<string>*)=0;
+
+	//! Save the proximity matrix in a GAL format text file 
+	virtual bool saveGALFile (const string&, vector<string>*)=0;
 
-	//! List the proximity matrix on command prompt
-	virtual void List (){}
+	//! Save the proximity matrix in a GWT format text file 
+	virtual bool saveGWTFile (const string&, vector<string>*)=0;
 
 	//! Destructor
 	virtual ~TeProxMatrixImplementation(){}
@@ -115,10 +117,9 @@ public:
 
 
 //! A class to represent proximity matrix utilising the Breymann graph
-class TeProxMatrixGraphBreymann : public  TeProxMatrixImplementation
+class TL_DLL TeProxMatrixGraphBreymann : public  TeProxMatrixImplementation
 {
 private:
-	string type_;
 	br_stl::Graph<string, TeProxMatrixAttributes> graph_;
 
 	typedef map<string, int> Object_id_map_type;
@@ -130,12 +131,8 @@ private:
 	bool getNeighboursNeighbours (const string& object_id, TeNeighbours& neigh, int max_order = 2, int current_order = 1);
 
 public:
-
-	//! Empty constructor
-	TeProxMatrixGraphBreymann () : graph_(true) //false means undirected graph, has to be true to allow normalization
-	{
-		type_ = "Breymann";
-	} 
+	//! Empty constructor - graph must be directed then the graph constructor receive true 
+	TeProxMatrixGraphBreymann (); 
 																	 
 	//! Copy constructor
 	TeProxMatrixGraphBreymann(TeProxMatrixGraphBreymann& imp);
@@ -159,15 +156,15 @@ public:
 	virtual bool getNeighboursNeighbours (const string& object_id, TeNeighbours& neigh, int max_order = 2);
 
 	//! Return the number of the objects
-	virtual int  NumberOfObjects () {return graph_.size();}
+	virtual int  numberOfObjects () {return graph_.size();}
 
 	//! Create a copy
-	virtual TeProxMatrixImplementation* CreateCopy ();
+	virtual TeProxMatrixImplementation* createCopy ();
 
 	//! Verify if is equal
-	virtual bool IsEqual (TeProxMatrixImplementation& other) 
+	virtual bool isEqual (TeProxMatrixImplementation& other) 
 	{
-		if (type_ == other.Type()) 
+		if (type_ == other.type()) 
 			return (*this == (TeProxMatrixGraphBreymann&)other); 
 		return false;
 	}
@@ -179,32 +176,40 @@ public:
 	virtual ~TeProxMatrixGraphBreymann() {}
 
 	//! Save the proximity matrix in a text file 
-	virtual bool SaveTextFile (string& name);
+	virtual bool saveTextFile (const string& name, map<string, string>* ids=0);
 
 	//! Save the proximity matrix in a GAL text file 
-	virtual bool SaveGALFile (string& name);
+	virtual bool saveGALFile (const string& name, map<string, string>* ids=0);
 
 	//! Save the proximity matrix in a GWT text file 
-	virtual bool SaveGWTFile (string& name);
+	virtual bool saveGWTFile (const string& name, map<string, string>* ids=0);
+
+	//! Save the proximity matrix in a text file
+	virtual bool saveTextFile (const string& name, vector<string>* ids);
 
-	//! List proximity matrix on command prompt
-	virtual void List ();
+	//! Save the proximity matrix in a GAL format text file 
+	virtual bool saveGALFile (const string& name, vector<string>* ids);
+
+	//! Save the proximity matrix in a GWT format text file 
+	virtual bool saveGWTFile (const string& name, vector<string>* ids);
 };
 
 
 //! An abstract factory of proximity matrix representations  
-class TeProxMatrixAbstractFactory  
+class TL_DLL TeProxMatrixAbstractFactory  
 {
 public:
-
-	static TeProxMatrixImplementation* MakeConcreteImplementation (const string impl_type = "BREYMANN")
+	static TeProxMatrixImplementation* MakeConcreteImplementation (const TeGPMImplementation& impl_type = TeGraphBreymann)
 	{
-		if (impl_type ==  "Breymann") 
-				return new TeProxMatrixGraphBreymann;
+		if (impl_type == TeGraphBreymann) 
+				return new TeProxMatrixGraphBreymann();
 
-		return new TeProxMatrixGraphBreymann;
+		return new TeProxMatrixGraphBreymann();
 	}
 	
 };
 
+/*! \example createProximityMatrix.cpp
+	This is an example of how to  how to create a proximity matrix from a  Spatial Temporal Element Set (STElementSet)
+ */
 #endif
diff --git a/src/terralib/kernel/TeProxMatrixSlicingStrategy.h b/src/terralib/kernel/TeProxMatrixSlicingStrategy.h
old mode 100644
new mode 100755
index 05b12f0..daab46e
--- a/src/terralib/kernel/TeProxMatrixSlicingStrategy.h
+++ b/src/terralib/kernel/TeProxMatrixSlicingStrategy.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,9 +20,8 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeProxMatrixSlicingStrategy.h
-    This file contains structures and definitions about slicing strategies of proximity matrix 
+    \brief This file contains structures and definitions about slicing strategies of proximity matrix 
 */
 
 
@@ -31,38 +30,61 @@ of this library and its documentation.
 
 #include "TeProxMatrixImplementation.h"
 
+struct TL_DLL TeProxMatrixSlicingParams
+{
+public:
+	TeGPMSlicingStrategy		strategy_;
+	double						zone_dist_;
+	bool						zone_local_;
+
+	TeProxMatrixSlicingParams(const TeGPMSlicingStrategy& type=TeNoSlicingStrategy):
+		strategy_(type), zone_dist_(0.), zone_local_(false)
+		{}
+
+	bool operator==(const TeProxMatrixSlicingParams& other) const
+	{
+		return ((strategy_==other.strategy_) && (zone_dist_==other.zone_dist_) &&
+			(zone_local_==other.zone_local_));
+	}
+};
+
 
 //! An abstract class to representate slicing strategies of proximity matrix    
-class TeProxMatrixSlicingStrategy  
+class TL_DLL TeProxMatrixSlicingStrategy  
 {
-
 protected:
+	//! Slicing type
+	TeProxMatrixSlicingParams params_; 
+
 	//! Empty constructor
-	TeProxMatrixSlicingStrategy() {}
+	TeProxMatrixSlicingStrategy(const TeGPMSlicingStrategy& type): params_(type) {}
 
 public:
 	//! Destructor
 	virtual ~TeProxMatrixSlicingStrategy() {}
 
 	//! Slice the proximity matrix 
-	virtual bool Slice(TeProxMatrixImplementation* /* imp */) {return true;}
+	virtual bool Slice(TeProxMatrixImplementation* )=0;
+
+	//! Equal operator
+	virtual bool operator== (const TeProxMatrixSlicingStrategy& s) const {return (params_==s.params_);}
 
-	//! Verify if is equal
-	virtual bool IsEqual (const TeProxMatrixSlicingStrategy& /* rhs */) const {return true;}
+	//! Returns the slicing params
+	TeProxMatrixSlicingParams& slicingParams() { return params_; }
 
 };
 
 
 //! A class to implement the no slicing strategy of proximity matrix (i.e., all neighbour are considered to be in the first slice).
-class TeProxMatrixNoSlicingStrategy : public TeProxMatrixSlicingStrategy
+class TL_DLL TeProxMatrixNoSlicingStrategy : public TeProxMatrixSlicingStrategy
 {
 public:
-
 	//! Empty constructor
-	TeProxMatrixNoSlicingStrategy () {}
+	TeProxMatrixNoSlicingStrategy (): TeProxMatrixSlicingStrategy(TeNoSlicingStrategy)
+	{}
 
 	//! No slice the proximity matrix 
-	virtual bool Slice(TeProxMatrixImplementation* /* imp */) {return true;}
+	virtual bool Slice(TeProxMatrixImplementation* ) {return true;}
 
 	//! Destructor
 	~TeProxMatrixNoSlicingStrategy() {}
@@ -70,14 +92,16 @@ public:
 
 
 //! A class to implement the zone slicing strategy of proximity matrix (by local or newtork connection distance);
-class TeProxMatrixZonesSlicingStrategy : public TeProxMatrixSlicingStrategy
+class TL_DLL TeProxMatrixZonesSlicingStrategy : public TeProxMatrixSlicingStrategy
 {
-	double dist_;
-	bool local_;
 public:
-
 	//! Constructor
-	TeProxMatrixZonesSlicingStrategy (double dist, bool local = true) {dist_ = dist; local_ = local;}
+	TeProxMatrixZonesSlicingStrategy (double dist, bool local = true):
+	  TeProxMatrixSlicingStrategy(TeZonesSlicingStrategy)
+	  {
+		  params_.zone_dist_=dist;
+		  params_.zone_local_=local;
+	  }
 
 	//! Slice the proximity matrix through zone strategy 
 	virtual bool Slice(TeProxMatrixImplementation* imp);
diff --git a/src/terralib/kernel/TeProxMatrixStrategies.cpp b/src/terralib/kernel/TeProxMatrixStrategies.cpp
old mode 100644
new mode 100755
index 65ff5a1..8871a28
--- a/src/terralib/kernel/TeProxMatrixStrategies.cpp
+++ b/src/terralib/kernel/TeProxMatrixStrategies.cpp
@@ -30,7 +30,7 @@ bool TeProxMatrixZonesSlicingStrategy::Slice (TeProxMatrixImplementation* imp)
 {
 	if (imp == 0) return false;
 
-	for (int obj = 0; obj < imp->NumberOfObjects(); obj++)
+	for (int obj = 0; obj < imp->numberOfObjects(); obj++)
 	{
 		TeNeighbours neigh;
 		string object_id;
@@ -61,12 +61,12 @@ bool TeProxMatrixZonesSlicingStrategy::Slice (TeProxMatrixImplementation* imp)
 					d_conn = 0;
 				
 			
-			   if (local_) 
+			   if (params_.zone_local_) 
 				   distance = d_centr;
 			   else
 				   distance = d_net + d_conn;
 
-			   int zone = (int) (distance/dist_);
+			   int zone = (int) (distance/params_.zone_dist_);
 			   attr.Slice (zone);
 			   imp->setConnectionAttributes (object_id, neigh[i], attr);
 
@@ -84,7 +84,7 @@ ComputeWeigths (TeProxMatrixImplementation* imp)
 {
 	if (imp == 0) return false;
 
-	for (int obj = 0; obj < imp->NumberOfObjects(); obj++)
+	for (int obj = 0; obj < imp->numberOfObjects(); obj++)
 	{
 		TeNeighbours neigh;
 		string object_id;
@@ -101,19 +101,19 @@ ComputeWeigths (TeProxMatrixImplementation* imp)
 				double d_centr, d_net, d_conn;
 				if (attr.WasCentroidDistanceComputed())
 					if ((d_centr = attr.CentroidDistance()) != 0.0) 
-							w += (a_)*1/d_centr;
+							w += (params_.a_)*1/d_centr;
 
 				if (attr.WasNetworkObjectsDistanceComputed())
 					if ((d_net = attr.NetworkObjectsDistance()) != 0.0) 
-							w += (b_)*1/d_net;
+							w += (params_.b_)*1/d_net;
 
 				if (attr.WasNetworkMinimumPathComputed())
 					if ((d_conn = attr.NetworkMinimumPath()) != 0.0) 
-							w += (c_)*1/d_conn;
+							w += (params_.c_)*1/d_conn;
 
 				if (w != 1) w -= 1;
 
-				w_vec.push_back (w*factor_);
+				w_vec.push_back (w*params_.factor_);
 				tot += w;
 			}
 	
@@ -122,7 +122,7 @@ ComputeWeigths (TeProxMatrixImplementation* imp)
 			{
 					TeProxMatrixAttributes attr = neigh.Attributes(j);
 					double w = w_vec[j];
-					if (norm_)
+					if (params_.norm_)
 						if (tot != 0) w = w/tot;
 					attr.Weight (w);
 					imp->setConnectionAttributes (object_id, neigh[j], attr);
@@ -140,7 +140,7 @@ ComputeWeigths (TeProxMatrixImplementation* imp)
 {
 	if (imp == 0) return false;
 
-	for (int obj = 0; obj < imp->NumberOfObjects(); obj++)
+	for (int obj = 0; obj < imp->numberOfObjects(); obj++)
 	{
 		TeNeighbours neigh;
 		string object_id;
@@ -157,19 +157,19 @@ ComputeWeigths (TeProxMatrixImplementation* imp)
 				double d_centr, d_net, d_conn;
 				if (attr.WasCentroidDistanceComputed())
 					if ((d_centr = attr.CentroidDistance()) != 0.0) 
-							w += (a_)*1/(d_centr*d_centr);
+							w += (params_.a_)*1/(d_centr*d_centr);
 
 				if (attr.WasNetworkObjectsDistanceComputed())
 					if ((d_net = attr.NetworkObjectsDistance()) != 0.0) 
-							w += (b_)*1/(d_net*d_net);
+							w += (params_.b_)*1/(d_net*d_net);
 
 				if (attr.WasNetworkMinimumPathComputed())
 					if ((d_conn = attr.NetworkMinimumPath()) != 0.0) 
-							w += (c_)*1/(d_conn*d_conn);
+							w += (params_.c_)*1/(d_conn*d_conn);
 
 				if (w != 1) w -= 1;
 
-				w_vec.push_back (w*factor_);
+				w_vec.push_back (w*params_.factor_);
 				tot += w;
 			}
 	
@@ -178,7 +178,7 @@ ComputeWeigths (TeProxMatrixImplementation* imp)
 			{
 					TeProxMatrixAttributes attr = neigh.Attributes(j);
 					double w = w_vec[j];
-					if (norm_)
+					if (params_.norm_)
 						if (tot != 0) w = w/tot;
 					attr.Weight (w);
 					imp->setConnectionAttributes (object_id, neigh[j], attr);
@@ -194,7 +194,7 @@ ComputeWeigths (TeProxMatrixImplementation* imp)
 {
 	if (imp == 0) return false;
 
-	for (int obj = 0; obj < imp->NumberOfObjects(); obj++)
+	for (int obj = 0; obj < imp->numberOfObjects(); obj++)
 	{
 		TeNeighbours neigh;
 		string object_id;
@@ -222,7 +222,7 @@ ComputeWeigths (TeProxMatrixImplementation* imp)
 				}
 				else
 				{
-					if (d_centr <= max_local_distance_)
+					if (d_centr <= params_.max_local_dist_)
 					{
 						w = 1/d_centr;
 					}
@@ -236,13 +236,13 @@ ComputeWeigths (TeProxMatrixImplementation* imp)
 							d_conn = attr.NetworkMinimumPath();
 
 						//double distance = (dist_ratio_*d_net + d_conn)/1000; Anap - Jul04
-						double distance = (dist_ratio_*d_net + d_conn);
+						double distance = (params_.dist_ratio_*d_net + d_conn);
 						if (distance != 0.0)
 							w = 1/distance;
 					}
 				}
-				//if (w > 1.0) w = 1.0; ANAP- Acho que n�o precisa: o objeto pode ser mais pr�ximo que 1 metro? jul04
-				w_vec.push_back (w*factor_);
+				//if (w > 1.0) w = 1.0; n�o precisa: o objeto pode ser mais pr�ximo que 1 metro? jul04
+				w_vec.push_back (w*params_.factor_);
 				tot += w;
 			}
 		
@@ -251,7 +251,7 @@ ComputeWeigths (TeProxMatrixImplementation* imp)
 					
 				TeProxMatrixAttributes attr = neigh.Attributes(j);
 				double w = w_vec[j];
-				if (norm_)
+				if (params_.norm_)
 					if (tot != 0) w = w/tot;
 				attr.Weight (w);
 				imp->setConnectionAttributes (object_id, neigh[j], attr);
@@ -269,9 +269,9 @@ ComputeWeigths (TeProxMatrixImplementation* imp)
 {
 	if (imp == 0) return false;
 	// Normalize
-	if (norm_)
+	if (params_.norm_)
 	{
-		for (int obj = 0; obj < imp->NumberOfObjects(); obj++)
+		for (int obj = 0; obj < imp->numberOfObjects(); obj++)
 		{
 			TeNeighbours neigh;
 			string object_id;
diff --git a/src/terralib/kernel/TeProxMatrixWeightsStrategy.h b/src/terralib/kernel/TeProxMatrixWeightsStrategy.h
old mode 100644
new mode 100755
index d6dc65d..b04d413
--- a/src/terralib/kernel/TeProxMatrixWeightsStrategy.h
+++ b/src/terralib/kernel/TeProxMatrixWeightsStrategy.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,9 +20,8 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeProxMatrixWeightsStrategy.h
-    This file contains structures and definitions about weight strategies of proximity matrix 
+    \brief This file contains structures and definitions about weight strategies of proximity matrix 
 */
 
 
@@ -33,38 +32,70 @@ of this library and its documentation.
 #include <vector>
 
 
+struct TL_DLL TeProxMatrixWeightsParams
+{
+public:
+	TeGPMWeightsStrategy		strategy_;
+	bool						norm_;
+	double						a_;
+	double						b_;
+	double						c_;
+	double						factor_;
+	double						dist_ratio_;
+	double						max_local_dist_;
+
+	TeProxMatrixWeightsParams(): 
+		strategy_(TeNoWeightsStrategy), norm_(false), a_(1.), 
+		b_(1.), c_(1.), factor_(1.), dist_ratio_(0.), max_local_dist_(0.)
+		{}
+
+	TeProxMatrixWeightsParams(bool norm, const TeGPMWeightsStrategy& type): 
+		strategy_(type), norm_(norm), a_(1.), b_(1.), c_(1.), 
+		factor_(1.), dist_ratio_(0.), max_local_dist_(0.)
+		{}
+
+	bool operator== (const TeProxMatrixWeightsParams& other) const
+	{
+		return ((strategy_==other.strategy_) && (norm_==other.norm_) &&
+			(a_==other.a_) && (b_==other.b_) && (c_==other.c_) &&
+			(factor_==other.factor_) && (dist_ratio_==other.dist_ratio_) &&
+			(max_local_dist_==other.max_local_dist_));
+	}
+};
+
+
 //! An abstract class to representate weight strategies of proximity matrix    
-class TeProxMatrixWeightsStrategy  
+class TL_DLL TeProxMatrixWeightsStrategy  
 {
 protected:
-	bool norm_;
+	TeProxMatrixWeightsParams params_; 
 
 	//! Constructor
-	TeProxMatrixWeightsStrategy(bool norm = false) { norm_ = norm; }
+	TeProxMatrixWeightsStrategy(bool norm = false, const TeGPMWeightsStrategy& type=TeNoWeightsStrategy ):
+		params_(norm, type)
+	 { }
 
 public:
 	//! Compute weigths
-	virtual bool ComputeWeigths (TeProxMatrixImplementation* /* imp */) {return true;}
+	virtual bool ComputeWeigths (TeProxMatrixImplementation* ) =0;
 
 	//! Destructor
 	virtual ~TeProxMatrixWeightsStrategy() {}
 
-	//! Verify if is equal
-	virtual bool IsEqual (const TeProxMatrixWeightsStrategy& /* rhs */) const {return true;}
-
 	//! Equal operator
-	virtual bool operator== (const TeProxMatrixWeightsStrategy& /* rhs */) const {return true;}
+	virtual bool operator== (const TeProxMatrixWeightsStrategy& w) const {return (params_==w.params_);}
 
+	//! Returns the strategy to weigt the matrix
+	TeProxMatrixWeightsParams& weightsParams() { return params_; }
 };
 
 //! A class to implement the no weight strategy of proximity matrix (i.e., all weights are 1, only indicating that a connection exists).
-class TeProxMatrixNoWeightsStrategy : public TeProxMatrixWeightsStrategy
+class TL_DLL TeProxMatrixNoWeightsStrategy : public TeProxMatrixWeightsStrategy
 {
-
 public:
-
 	//! Constructor
-	TeProxMatrixNoWeightsStrategy (bool norm = true) {norm_ = norm;}
+	TeProxMatrixNoWeightsStrategy (bool norm = true) : TeProxMatrixWeightsStrategy(norm, TeNoWeightsStrategy)
+	{ }
 
 	//! Compute weigths
 	virtual bool ComputeWeigths (TeProxMatrixImplementation* imp);
@@ -77,19 +108,13 @@ public:
 //! A class to implement the inverse distance weight strategy of proximity matrix; if network distances were computed, they can be also considered.
 //! Formula: w = (a*1/dist_centroids + b*1/dist_to_net + c*1/dist_net_connection)*factor
 //! These values can be normalized or not.
-class TeProxMatrixInverseDistanceStrategy : public TeProxMatrixWeightsStrategy
+class TL_DLL TeProxMatrixInverseDistanceStrategy : public TeProxMatrixWeightsStrategy
 {
-private:
-	double a_;
-	double b_;
-	double c_;
-	double factor_;
-
 public:
-
 	//! Constructor
-	TeProxMatrixInverseDistanceStrategy  (double a = 1.0, double b = 1.0, double c = 1.0, double factor = 1.0, bool norm = true) : TeProxMatrixWeightsStrategy (norm)
-	{ a_ = a; b_ = b; c_ = c; factor_ = factor;}
+	TeProxMatrixInverseDistanceStrategy  (double a = 1.0, double b = 1.0, double c = 1.0, double factor = 1.0, bool norm = true) : 
+	  TeProxMatrixWeightsStrategy (norm, TeInverseDistanceStrategy)
+	{ params_.a_ = a; params_.b_ = b; params_.c_ = c; params_.factor_ = factor;}
 
 	//! Compute weights
 	virtual bool ComputeWeigths (TeProxMatrixImplementation* imp); 
@@ -102,19 +127,13 @@ public:
 //! A class to implement the inverse distance weight strategy of proximity matrix; if network distances were computed, they can be also considered.
 //! Formula: w = (a*1/(dist_centroids)2 + b*1/(dist_to_net)2 + c*1/(dist_net_connection)2)*factor
 //! These values can be normalized or not.
-class TeProxMatrixSquaredInverseDistanceStrategy : public TeProxMatrixWeightsStrategy
+class TL_DLL TeProxMatrixSquaredInverseDistanceStrategy : public TeProxMatrixWeightsStrategy
 {
-private:
-	double a_;
-	double b_;
-	double c_;
-	double factor_;
-
 public:
-
 	//! Constructor
-	TeProxMatrixSquaredInverseDistanceStrategy  (double a = 1.0, double b = 1.0, double c = 1.0, double factor = 1.0, bool norm = true) : TeProxMatrixWeightsStrategy (norm)
-	{ a_ = a; b_ = b; c_ = c; factor_ = factor;}
+	TeProxMatrixSquaredInverseDistanceStrategy  (double a = 1.0, double b = 1.0, double c = 1.0, double factor = 1.0, bool norm = true) : 
+	  TeProxMatrixWeightsStrategy (norm, TeSquaredInverseDistStrategy)
+	{ params_.a_ = a; params_.b_ = b; params_.c_ = c; params_.factor_ = factor;}
 
 	//! Compute weights
 	virtual bool ComputeWeigths (TeProxMatrixImplementation* imp); 
@@ -127,21 +146,16 @@ public:
 //! A class to implement the connection strenght weight strategy of proximity matrix
 //! If centroids distance is smaller them max_local_distance, w will be only the local distance inverse (multiplied by factor).
 //! otherwise, it will be w = 1/(dist_ratio*dist_to_net + dist_net_connection)*factor.
-class TeProxMatrixConnectionStrenghtStrategy : public TeProxMatrixWeightsStrategy
+class TL_DLL TeProxMatrixConnectionStrenghtStrategy : public TeProxMatrixWeightsStrategy
 {
-private:
-	double dist_ratio_;
-	double max_local_distance_;
-	double factor_;
 public:
-
 	//! Constructor
 	TeProxMatrixConnectionStrenghtStrategy  (double dist_ratio = 1.0, double max_local_distance = 0.0, double factor = 1.0, bool norm = true) 
-		: TeProxMatrixWeightsStrategy (norm)
+		: TeProxMatrixWeightsStrategy (norm, TeConnectionStrenghtStrategy )
 	{ 
-		dist_ratio_ = dist_ratio;
-		max_local_distance_ = max_local_distance;
-		factor_ = factor;
+		params_.dist_ratio_ = dist_ratio;
+		params_.max_local_dist_ = max_local_distance;
+		params_.factor_ = factor;
 	}
 
 	//! Compute weights
diff --git a/src/terralib/kernel/TeQuerier.cpp b/src/terralib/kernel/TeQuerier.cpp
old mode 100644
new mode 100755
index 296de88..7464f74
--- a/src/terralib/kernel/TeQuerier.cpp
+++ b/src/terralib/kernel/TeQuerier.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -30,6 +30,35 @@ TeQuerier::TeQuerier(TeQuerierParams& params)
 	Impl_ = TeQuerierImplFactory::make(params);
 }
 
+TeQuerier::TeQuerier(const TeQuerier& other)
+{
+	if(Impl_)
+		delete Impl_;
+
+	Impl_ = 0;
+	if(other.Impl_ && other.Impl_->params())
+	{
+		Impl_ = TeQuerierImplFactory::make(*(other.Impl_->params()));
+	}
+}
+
+TeQuerier&
+TeQuerier::operator=(const TeQuerier& other)
+{
+	if ( this != &other )
+	{
+		if(Impl_)
+			delete Impl_;
+
+		Impl_ = 0;
+		if(other.Impl_ && other.Impl_->params())
+		{
+			Impl_ = TeQuerierImplFactory::make(*(other.Impl_->params()));
+		}
+	}
+	return *this;
+}
+
 TeQuerier::~TeQuerier()
 {
 	if(Impl_)
@@ -103,10 +132,10 @@ TeQuerier::numElemInstances()
 	return (Impl_->numElemInstances());
 }
 
-TeQuerierParams& 
+TeQuerierParams&
 TeQuerier::params() 
 { 
-	return (Impl_->params()); 
+	return (*(Impl_->params())); 
 }
 
 TeTSParams& 
@@ -134,6 +163,16 @@ TeQuerier::getAttrList()
 	return (Impl_->getAttrList());
 }
 
+TeBox	
+TeQuerier::getBox()
+{
+	TeBox b;
+	if(!Impl_)
+		return b;
+
+	return (Impl_->params()->box());
+}
+
 void 
 TeQuerier::refresh(TeQuerierParams& params)
 {
@@ -143,4 +182,23 @@ TeQuerier::refresh(TeQuerierParams& params)
 	Impl_ = TeQuerierImplFactory::make(params);
 }
 
+bool 
+TeQuerier::loadGeometries(TeMultiGeometry& geometries, unsigned int& index)
+{
+	if(!Impl_)
+		return false;
+
+	return (Impl_->loadGeometries(geometries, index));
+}
+
+
+bool 
+TeQuerier::loadGeometries(TeMultiGeometry& geometries)
+{
+	if(!Impl_)
+		return false;
+
+	return (Impl_->loadGeometries(geometries));
+}
+
 
diff --git a/src/terralib/kernel/TeQuerier.h b/src/terralib/kernel/TeQuerier.h
old mode 100644
new mode 100755
index a328a4a..c621dbb
--- a/src/terralib/kernel/TeQuerier.h
+++ b/src/terralib/kernel/TeQuerier.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,6 +20,9 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
+/*! \file TeQuerier.h
+	\brief This file contains a mechanism named "Querier" that is responsible for loading spatio-temporal instances from different sources. 
+*/
 
 #ifndef  __TERRALIB_INTERNAL_QUERIER_H
 #define  __TERRALIB_INTERNAL_QUERIER_H
@@ -27,67 +30,124 @@ of this library and its documentation.
 #include "TeSTInstance.h"
 #include "TeTemporalSeries.h"
 
+#include "TeQuerierDBStr1.h"
+#include "TeQuerierDBStr2.h"
+#include "TeQuerierDBStr3.h"
+
 class TeQuerierParams;
 class TeQuerierImpl; 
 
-//! A class to build spatial temporal instances (STInstance) from different sources 
-class TeQuerier
+/*! \class TeQuerier
+	\brief A class responsible for loading spatial temporal instances from different sources.
+
+	This class implements a mechanism that is responsible for loading
+	spatio-temporal instances (ST instances) from different sources. This mechanism can 
+	load ST instances from a layer or theme stored in a 
+	TerraLib database or in a shape file. The Querier is initialized for a set of
+	parameters that defines its behavior. 
+
+	\sa
+	TeSTInstance TeQuerierParams
+*/
+class TL_DLL TeQuerier
 {
-	
-	protected:
-		TeQuerierImpl*		Impl_;  //! handle/bory pattern
-		
-	public:
+protected:
+		TeQuerierImpl*		Impl_;		//!<  querier implementation (handle/bory pattern)
 		
+public:	
 		//! Empty constructor
 		TeQuerier():
 			Impl_(0)
 			{} 
 			
-		//! Constructor
+		//! Constructor from a set of parameters
 		TeQuerier(TeQuerierParams& params);
+
+		//! Copy constructor
+		TeQuerier(const TeQuerier& other);
+
+		//! Operator =
+		TeQuerier& operator= (const TeQuerier& other);
 				
 		//! Destructor
 		~TeQuerier(); 
 		
-		//! Returns the theme
+		//! Returns the base theme
 		TeTheme* theme();
 		
-	 	//! Loads the STInstances. If frame>-1, loads only the instances of the frame-�simo frame 
+	 	//! Loads the ST instances. If frame > -1, loads only the instances of the frame-th time frame 
 		bool loadInstances(int frame=-1);  
 		
-		//! Returns each spatial temporal instance 
+		//! Gets the current ST instance and moves to the next one. Returns if there is a next instance. 
 		bool fetchInstance(TeSTInstance&  sto);
 
-		//! Return the number of time frames generated by the chronon	
+		//! Returns the number of time frames generated by a specific chronon	
 		int getNumTimeFrames(); 
 
-		//! Gets each temporal serie entry, for each time frame
+		//! Gets a temporal serie entry associated to a time frame
 		bool getTSEntry(TeTSEntry& tsEntry, int frame);
 		
-		//! Gets the full temporal serie
+		//! Gets the temporal series
 		bool getTS(TeTemporalSeries& ts); 
 		
-		//! Returns the temporal serie params
+		//! Returns the temporal series parameters
 		TeTSParams& getTSParams();
 		
-		//! Gets the attribute list from querier
+		//! Gets the attribute list of the instances
 		TeAttributeList getAttrList();
 
-		//! Returns the number of instances to each time frame
+		//! Gets the minimal bounding box
+		TeBox	getBox();
+
+		//! Returns the number of instances loaded by the method "loadInstances"
 		int numElemInstances(); 
 
 		//! Returns the querier parameters
 		TeQuerierParams& params(); 
 
-		//! Empties querier instances
+		//! Clear querier structures
 		void clear(); 
 
-		//! Refresh the querier based in new querier params
+		//! Refreshes the querier based on a new querier parameters
 		void refresh(TeQuerierParams& params); 
+		
+		//! Loads all geometries of the index-th geometry representation  
+		bool loadGeometries(TeMultiGeometry& geometries, unsigned int& index); 
+
+		//! Loads all geometries 
+		bool loadGeometries(TeMultiGeometry& geometries);
 };
 
+ /** \example querierFromLayer.cpp
+	Shows how to use a querier from layer
+ */
+
+ /** \example querierFromTheme.cpp
+	Shows how to use a querier from theme
+ */
+
+ /** \example querierGroupChronon.cpp
+	Shows how to querier from theme, grouping spatiotemporal instances by a chronon
+ */
+
+ /** \example querierGroupElement.cpp
+	Shows how to use a querier from theme, grouping spatiotemporal instances by a element
+ */
+
+ /** \example querierGroupSpatialRest.cpp
+	Shows how to use a querier from theme, grouping all  
+   spatiotemporal instances that satisfy a spatial restriction
+ */
+
+ /** \example querierWithSpatialRestBox.cpp
+	Shows how to use a querier from theme, using a spatial restriction 
+	defined by a rectangle (TeBOX)
+ */
 
+ /** \example querierWithSpatialRestGeometry.cpp
+	Shows how to use a querier from theme, using a spatial restriction 
+	defined by a geometry (polygons, lines, cells and points) from another theme
+ */
 #endif 
 
 
diff --git a/src/terralib/kernel/TeQuerierDB.cpp b/src/terralib/kernel/TeQuerierDB.cpp
old mode 100644
new mode 100755
index 808faed..4397807
--- a/src/terralib/kernel/TeQuerierDB.cpp
+++ b/src/terralib/kernel/TeQuerierDB.cpp
@@ -1,7 +1,7 @@
 
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -27,116 +27,233 @@ of this library and its documentation.
 #include "TeSTInstance.h"
 #include "TeTemporalSeries.h"
 
-
 // Add geometries from portal to STO 
 bool 
-addGeometry(TeDatabasePortal* portal, TeGeomRep geomRep, TeSTInstance& sto, const string& geomTable) 
+addGeometry(TeDatabasePortal* portal, TeGeomRep geomRep, TeSTInstance& sto, const int& linkIndex, const int& geomIdIndex) 
 {
-	bool flag=false;
-	vector<int> geomIds;
+	bool flag=true;
+	map<int, int> geomIds;
+		
+	//verify if the portal has geometry (multi geometries)
+	string geomId = string(portal->getData(geomIdIndex));
+	string objId =  string(portal->getData(linkIndex)); 
+	int	gId = atoi(geomId.c_str());
 	
-	string ObjId;
-	if(geomTable.empty())
-		ObjId = "object_id";
-	else
-		ObjId = geomTable +".object_id";
+	//There are no geometries in the portal. This happens when
+	//the objects have multi geometries (ex.: obj 1 is line and obj 2 is ponit).
+	//The portal must point to the next object.
+	if(geomId.empty())
+	{
+		do
+		{
+			flag = portal->fetchRow();
+		} while(flag && (string(portal->getData(linkIndex)) == sto.objectId()));
+		
+		return flag; 
+	}
 
-	do
+	//The portal points to other object. This happens when
+	//the objects have more than one geometrical representation and, at the same time, 
+	//the theme has an external table.
+	if(objId!=sto.objectId())
 	{
-		int gId = portal->getInt("geom_id");
-		if(find(geomIds.begin(), geomIds.end(), gId) == geomIds.end())
+		do
 		{
-			geomIds.push_back(gId);
-			if(geomRep == TePOLYGONS)
-			{
-				TePolygon pol;
-				flag = portal->fetchGeometry(pol);
-				sto.addGeometry(pol);
-			}
-			else if (geomRep==TeLINES)
-			{
-				TeLine2D lin;
-				flag = portal->fetchGeometry(lin);
-				sto.addGeometry(lin);
-			}
-			else if (geomRep == TePOINTS)
-			{
-				TePoint point;
-				flag = portal->fetchGeometry(point);
-				sto.addGeometry(point);
-			}
-			else if (geomRep == TeCELLS)
-			{
-				TeCell cell;
-				flag = portal->fetchGeometry(cell);
-				sto.addGeometry(cell);
-			}
+			flag = portal->fetchRow();
+			objId = string(portal->getData(linkIndex));
+		} while(flag && ( objId != sto.objectId()));
+		
+		gId = atoi(portal->getData(geomIdIndex));
+	}
+
+	//There are geometries
+	while(	flag && (objId == sto.objectId()) &&
+			(geomIds.find(gId) == geomIds.end()))
+	{
+		geomIds[gId] = gId;
+		if(geomRep == TePOLYGONS)
+		{
+			TePolygon pol;
+			flag = portal->fetchGeometry(pol, geomIdIndex);
+			sto.addGeometry(pol);
+		}
+		else if (geomRep==TeLINES)
+		{
+			TeLine2D lin;
+			flag = portal->fetchGeometry(lin, geomIdIndex);
+			sto.addGeometry(lin);
+		}
+		else if (geomRep == TePOINTS)
+		{
+			TePoint point;
+			flag = portal->fetchGeometry(point, geomIdIndex);
+			sto.addGeometry(point);
+		}
+		else if (geomRep == TeCELLS)
+		{
+			TeCell cell;
+			flag = portal->fetchGeometry(cell, geomIdIndex);
+			sto.addGeometry(cell);
+		}
+		else if (geomRep == TeTEXT)
+		{
+			TeText text;
+			flag = portal->fetchGeometry(text, geomIdIndex);
+			sto.addGeometry(text); 
 		}
 		else
 			flag = portal->fetchRow();
-		
-	}while(flag && (string(portal->getData(ObjId)) == sto.objectId()));
+
+		if(flag)
+		{
+			gId = atoi(portal->getData(geomIdIndex));
+			objId =  string(portal->getData(linkIndex)); 
+		}
+	}
 
 	return flag;
 }
 
 // Add geometries from portal to STO considering the time value
 bool
-addGeometry(TeDatabasePortal* portal, TeGeomRep geomRep, TeSTInstance& sto, const string& geomTable, 
-			TeTimeInterval time, const string& initalTimeName, const string& finalTimeName) 
+addGeometry(TeDatabasePortal* portal, TeGeomRep geomRep, TeSTInstance& sto, const int& linkIndex, 
+			const int& geomIdIndex, TeTimeInterval time, const int& initTimeIndex, const int& finalTimeIndex) 
 {
-	bool flag=false;
-	vector<int> geomIds;
+	bool flag=true;
+	map<int, int> geomIds;
 	TeTime t1 = time.getT1();
 	TeTime t2 = time.getT2();
-	string ObjId;
-	if(geomTable.empty())
-		ObjId = "object_id";
-	else
-		ObjId = geomTable +".object_id";
+			
+	//verify if the portal has geometry (multi geometries)
+	
+	string geomId = string(portal->getData(geomIdIndex));
+	string objId =  string(portal->getData(linkIndex)); 
+	int	gId = atoi(geomId.c_str());
+	
+	//There are no geometries in the portal. This happens when
+	//the objects have multi geometries (ex.: obj 1 is line and obj 2 is ponit).
+	//The portal must point to the next object.
+	if(geomId.empty())
+	{
+		do
+		{
+			flag = portal->fetchRow();
+			objId = string(portal->getData(linkIndex));
+		} while ( flag && 
+			 (objId == sto.objectId()) &&
+			 (portal->getDate(initTimeIndex) == t1) && 
+			 (portal->getDate(finalTimeIndex) == t2) );
 		
-	do
+		return flag; 
+	}
+
+	//The portal points to other object. This happens when
+	//the objects have more than one geometrical representation and, at the same time, 
+	//the theme has an external table.
+	if(objId!=sto.objectId())
 	{
-		int gId = portal->getInt("geom_id");
-		if(find(geomIds.begin(), geomIds.end(), gId) == geomIds.end())
+		do
 		{
-			geomIds.push_back(gId);
-			if(geomRep == TePOLYGONS)
-			{
-				TePolygon pol;
-				flag = portal->fetchGeometry(pol);
-				sto.addGeometry(pol);
-			}
-			else if (geomRep==TeLINES)
-			{
-				TeLine2D lin;
-				flag = portal->fetchGeometry(lin);
-				sto.addGeometry(lin);
-			}
-			else if (geomRep == TePOINTS)
-			{
-				TePoint point;
-				flag = portal->fetchGeometry(point);
-				sto.addGeometry(point);
-			}
-			else if (geomRep == TeCELLS)
-			{
-				TeCell cell;
-				flag = portal->fetchGeometry(cell);
-				sto.addGeometry(cell);
-			}
+			flag = portal->fetchRow();
+			objId = string(portal->getData(linkIndex));
+		} while(flag && (objId != sto.objectId()));
+		
+		gId = atoi(portal->getData(geomIdIndex));
+	}
+
+
+	//There are geometries
+	while(	flag && (objId == sto.objectId()) &&
+			(geomIds.find(gId) == geomIds.end()) && 
+			(portal->getDate(initTimeIndex) == t1) && 
+			(portal->getDate(finalTimeIndex) == t2) )
+	{
+		geomIds[gId] = gId;
+		if(geomRep == TePOLYGONS)
+		{
+			TePolygon pol;
+			flag = portal->fetchGeometry(pol, geomIdIndex);
+			sto.addGeometry(pol);
+		}
+		else if (geomRep==TeLINES)
+		{
+			TeLine2D lin;
+			flag = portal->fetchGeometry(lin, geomIdIndex);
+			sto.addGeometry(lin);
+		}
+		else if (geomRep == TePOINTS)
+		{
+			TePoint point;
+			flag = portal->fetchGeometry(point, geomIdIndex);
+			sto.addGeometry(point);
+		}
+		else if (geomRep == TeCELLS)
+		{
+			TeCell cell;
+			flag = portal->fetchGeometry(cell, geomIdIndex);
+			sto.addGeometry(cell);
+		}
+		else if (geomRep == TeTEXT)
+		{
+			TeText text;
+			flag = portal->fetchGeometry(text, geomIdIndex);
+			sto.addGeometry(text); 
 		}
 		else
 			flag = portal->fetchRow();
-		
-	}while ( flag && 
-			 (string(portal->getData(ObjId)) == sto.objectId()) &&
-			 portal->getDate(initalTimeName) == t1 && 
-			 portal->getDate(finalTimeName) == t2 );
+
+		if(flag)
+		{
+			gId = atoi(portal->getData(geomIdIndex));
+			objId =  string(portal->getData(linkIndex)); 
+		}
+	}
 
 	return flag;
 }
 
+bool 
+addGeometry(TeDatabasePortal* portal, TeGeomRep geomRep, TeMultiGeometry& geometries) 
+{
+	bool flag = true;
+	//There are geometries
+	do
+	{
+		if(geomRep == TePOLYGONS)
+		{
+			TePolygon pol;
+			flag = portal->fetchGeometry(pol);
+			geometries.getPolygons().add(pol);
+		}
+		else if (geomRep==TeLINES)
+		{
+			TeLine2D lin;
+			flag = portal->fetchGeometry(lin);
+			geometries.getLines().add(lin);
+		}
+		else if (geomRep == TePOINTS)
+		{
+			TePoint point;
+			flag = portal->fetchGeometry(point);
+			geometries.getPoints().add(point);
+		}
+		else if (geomRep == TeCELLS)
+		{
+			TeCell cell;
+			flag = portal->fetchGeometry(cell);
+			geometries.getCells().add(cell);
+		}
+		else if (geomRep == TeTEXT)
+		{
+			TeText text;
+			flag = portal->fetchGeometry(text);
+			geometries.getTexts().add(text);
+		}
+		else
+			flag = portal->fetchRow();
+	}while(flag);
+	return flag;
+}
 
 TeQuerierDB::~TeQuerierDB() 
 {
@@ -154,7 +271,8 @@ TeQuerierDB::clearVectors()
 	vector<TeDatabasePortal*>::iterator itPortal = portals_.begin();
 	while(itPortal!=portals_.end())
 	{		
-		delete (*itPortal);
+		TeDatabasePortal* portal = *itPortal;
+		delete portal; 
 		++itPortal;
 	}
 	
@@ -169,36 +287,39 @@ TeQuerierDB::clear()
 	clearVectors();
 }
 
+TeGeomRep 
+TeQuerierDB::geometryRep() 
+{  return TeGeomRep(params_->theme()->layer()->geomRep()); }
 
 string 
 TeQuerierDB::sqlWhereRestrictions(TeRepresentation* rep)
 {
-	Keys objs;
+	TeKeys objs;
 	string whereClause= " 1 = 1 ";
-	TeDatabase* db = params_.theme()->layer()->database();
+	TeDatabase* db = params_->theme()->layer()->database();
 	if(!db)
 		return "";
 	
 	// load the first representation 
 	if(!rep)
-		rep = (params_.theme()->layer()->vectRepres())[0];
+		rep = (params_->theme()->layer()->vectRepres())[0];
 
 	// spatial restriction with other geometry representation
-	if (params_.hasSpatialRes() && rep)
+	if (params_->hasSpatialRes() && rep)
 	{
-		if(params_.boxRest().isValid())
+		if(params_->boxRest().isValid())
 		{
-            TeBox b =  params_.boxRest();
+            TeBox b =  params_->boxRest();
             TeGeomRep gRep = rep->geomRep_;
 			whereClause += " AND "+ db->getSQLBoxWhere(b, gRep);
 		}
-		else if(params_.geomRest())
+		else if(params_->geomRest())
 		{
-			string geomTableRest = params_.theme()->layer()->tableName(params_.geomRepRest());
-			TePrecision::instance().setPrecision(TeGetPrecision(params_.theme()->layer()->projection()));
+			string geomTableRest = params_->theme()->layer()->tableName(params_->geomRepRest());
+			TePrecision::instance().setPrecision(TeGetPrecision(params_->theme()->layer()->projection()));
 
-			if((db->spatialRelation(geomTableRest, params_.geomRepRest(), params_.geomRest(),  
-							   objs, params_.spatialRelation())) && (!objs.empty()))
+			if((db->spatialRelation(geomTableRest, params_->geomRepRest(), params_->geomRest(),  
+							   objs, params_->spatialRelation())) && (!objs.empty()))
 			{
 				string obs;
 				for(unsigned int i=0; i<objs.size(); i++)
@@ -217,7 +338,7 @@ TeQuerierDB::sqlWhereRestrictions(TeRepresentation* rep)
 	}
 
 	//selected objects
-	switch (params_.selectedObjs())
+	switch (params_->selectedObjs())
 	{
 		case TeAll:
 			break;
@@ -249,6 +370,16 @@ TeQuerierDB::sqlWhereRestrictions(TeRepresentation* rep)
 		case TeNotGrouped:
 			whereClause += " AND c_legend_id = 0";
 			break;
+
+		case TeSelectedByPointingAndQuery:
+			whereClause += " AND grid_status = 3";
+			whereClause += " OR (grid_status is null AND c_object_status = 3)";
+			break;
+
+		case TeSelectedByPointingOrQuery:
+			whereClause += " AND (grid_status = 1 OR grid_status = 2 OR grid_status = 3)";
+			whereClause += " OR  (grid_status is null AND (c_object_status = 3 OR c_object_status = 1 OR c_object_status = 2))";
+			break;	
 	}
 
 	return whereClause;
@@ -262,13 +393,17 @@ TeQuerierDB::sqlFrom(string geomTable)
 	string fromClause = "";
 	
 	//get collection tables 
-	string collAuxTable = params_.theme()->collectionAuxTable();
-	string collTable = params_.theme()->collectionTable();
+	string collAuxTable = params_->theme()->collectionAuxTable();
+	string collTable = params_->theme()->collectionTable();
+	
+	if(collAuxTable.empty() || collTable.empty())
+		return attrTable_.name();
 
-	if(attrTable_.name().empty() || collAuxTable.empty() || collTable.empty())
+	if(attrTable_.name().empty())
 		return "";
 	
 	string uniqueIdName = attrTable_.name() +"."+ attrTable_.uniqueName(); 
+	string objectIdName = attrTable_.name() +"."+ attrTable_.linkName(); 
 	string linkName; 
 	if(attrTable_.tableType() != TeAttrExternal)
 		linkName = attrTable_.name() +"."+ attrTable_.linkName(); 
@@ -276,7 +411,7 @@ TeQuerierDB::sqlFrom(string geomTable)
 		linkName = collTable +".c_object_id "; 
 
 	//load geometry table if there is spatial restriction
-	if(geomTable.empty() && params_.hasSpatialRes())
+	if(geomTable.empty() && params_->hasSpatialRes())
 	{
 		TeRepresentation* rep = (theme()->layer()->vectRepres())[0];
 		geomTable = theme()->layer()->tableName(rep->geomRep_);
@@ -284,7 +419,7 @@ TeQuerierDB::sqlFrom(string geomTable)
 
 	//get the extern table position 
 	int posExtern = -1;
-	TeAttrTableVector attr = params_.theme()->attrTables();
+	TeAttrTableVector attr = params_->theme()->attrTables();
 	for(unsigned int i=0; i<attr.size(); ++i)
 	{
 		if(attr[i].tableType() == TeAttrExternal)
@@ -294,14 +429,23 @@ TeQuerierDB::sqlFrom(string geomTable)
 	//if the table is temporal   
 	if((attrTable_.tableType()==TeAttrEvent) || (attrTable_.tableType()==TeFixedGeomDynAttr))
 	{
-		fromPar += "(";
+		fromPar += "((";
 		fromClause = attrTable_.name()+" RIGHT JOIN "+ collAuxTable; 
-		fromClause += " ON "+ uniqueIdName +" = "; 
-		
+				
 		if(attrTable_.tableType()==TeFixedGeomDynAttr)
-			fromClause += collAuxTable +".aux0 )";
+		{
+			fromClause += " ON "+ uniqueIdName +" = ";
+			fromClause += collAuxTable +".aux0";
+			fromClause += ")";
+		}
 		else
-			fromClause += collAuxTable +".unique_id )";
+		{
+			fromClause += " ON "+ objectIdName +" = ";
+			fromClause += collAuxTable +".object_id"+ ")";
+		}
+
+		fromClause += " LEFT JOIN "+ collTable; 
+		fromClause += " ON "+ collAuxTable +".object_id = "+ collTable +".c_object_id )";
 		
 		if(!geomTable.empty())
 		{
@@ -310,7 +454,7 @@ TeQuerierDB::sqlFrom(string geomTable)
 			fromClause += collAuxTable +".object_id = "+ geomTable +".object_id )";
 		}
 
-		if(params_.selectedObjs() != TeAll) //! join with collection table
+		if(params_->selectedObjs() != TeAll) //! join with collection table
 		{
 			fromPar += "(";
 			fromClause += " LEFT JOIN "+ collTable +" ON ";
@@ -331,7 +475,7 @@ TeQuerierDB::sqlFrom(string geomTable)
 			fromClause += collTable +".c_object_id = "+ geomTable +".object_id )";
 		}
 
-		if(params_.selectedObjs() != TeAll) //! join with collection table
+		if(params_->selectedObjs() != TeAll) //! join with collection table
 		{
 			fromPar += "(";
 			fromClause += " LEFT JOIN "+ collAuxTable +" ON ";
@@ -358,5 +502,35 @@ TeQuerierDB::sqlFrom(string geomTable)
 	return (fromPar+fromClause);
 }
 
+bool 
+TeQuerierDB::loadGeometries(TeMultiGeometry& geometries, unsigned int& index)
+{
+	if((portals_.size()<(index+1)) || (geomRepr_.size()<(index+1)))
+		return false;
+
+	TeDatabasePortal* portal = portals_[index]; 
+	TeRepresentation rep = geomRepr_[index];
+	if(!portal)
+		return false; 
+	
+	bool flag = addGeometry(portal, rep.geomRep_, geometries);
+
+	return flag;
+}
+
+bool 
+TeQuerierDB::loadGeometries(TeMultiGeometry& geometries) 
+{
+	bool flag = false;
+	
+	if(!params_->loadGeom())
+		return flag;
+	
+	for(unsigned int i=0; i<portals_.size(); ++i)
+		flag = loadGeometries(geometries, i);
+	
+	return flag;
+}
+
 
 
diff --git a/src/terralib/kernel/TeQuerierDB.h b/src/terralib/kernel/TeQuerierDB.h
old mode 100644
new mode 100755
index 4ae63e9..d00d016
--- a/src/terralib/kernel/TeQuerierDB.h
+++ b/src/terralib/kernel/TeQuerierDB.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,72 +20,103 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
+/*! \file TeQuerierDB.h
+	\brief This file deals with strategies to retrieve spatio-temporal elements from a TerraLib database
+*/
 #ifndef  __TERRALIB_INTERNAL_QUERIER_DB_H
 #define  __TERRALIB_INTERNAL_QUERIER_DB_H
 
 #include "TeQuerierImpl.h"
+#include "TeRepresentation.h"
 
 class TeDatabasePortal;
 class TeTimeInterval;
 class TeTSEntry;
 
-
-//! auxiliary functions to add geometries in the sto 
-bool addGeometry(TeDatabasePortal* portal, TeGeomRep geomRep, TeSTInstance& sto, const string& geomTable = ""); 
-bool addGeometry(TeDatabasePortal* portal, TeGeomRep geomRep, TeSTInstance& sto, const string& geomTable, 
-					TeTimeInterval time, const string& initalTimeName, const string& finalTimeName);  
+//! auxiliary functions to add geometries in the TeSTInstance or TeMultiGeometry
+TL_DLL bool addGeometry(TeDatabasePortal* portal, TeGeomRep geomRep, TeSTInstance& sto, const int& linkIndex, const int& gIdIndex);
+TL_DLL bool addGeometry(TeDatabasePortal* portal, TeGeomRep geomRep, TeSTInstance& sto, const int& linkIndex, 
+			const int& geomIdIndex, TeTimeInterval time, const int& initTimeIndex, const int& finalTimeIndex); 
+TL_DLL bool addGeometry(TeDatabasePortal* portal, TeGeomRep geomRep, TeMultiGeometry& geometries); 
 
 
 //! An abstract class to build STOs (Spatial Temporal Objects) from a TerraLib database 
-class TeQuerierDB : public TeQuerierImpl
+class TL_DLL TeQuerierDB : public TeQuerierImpl
 {
-	protected:
-
-		vector<TeDatabasePortal*>	portals_;		//! a portal to each geometry representation
-		vector<TeRepresentation>	geomRepr_;		//! keep the geometry representation of each portal 
-		TeTable						attrTable_;		//! internal information used to fill the stos
-		bool						flagPortal_;	//! flag to control the portal 
-				
-		//! clear internal vectors
-		void clearVectors(); 
-
-		//! Return a where clause in SQL that represent the querier restrictions
-		string sqlWhereRestrictions(TeRepresentation* rep=0);
-
-		//! Build the sql from clause
-		string sqlFrom(string geomTable="");
-		
-	public:
-		
-		//! Constructor
-		TeQuerierDB(TeQuerierParams& params): TeQuerierImpl(params), flagPortal_(false) 
-		{}
-		
-		//! Destructor 
-		virtual ~TeQuerierDB();  
-		
-		//! Returns the pointer to the theme 
-		TeTheme* theme() {	return params_.theme();	}
-
-		//! Returns the pointer to the layer 
-		TeLayer* layer() {	return  params_.theme()->layer(); }
-
-		//! Returns the geometry representation of the theme
-		TeGeomRep geometryRep() 
-		{  return TeGeomRep(params_.theme()->layer()->geomRep()); }
-
-		//! Loads the STOs
-		virtual bool loadInstances(TeTSEntry* ent=0) = 0;  
-		
-		//! Returns each loaded STO
-		virtual bool fetchInstance(TeSTInstance& stoi)= 0; 
-
-		//! Empties querier instances
-		void clear(); 
-
-		
+protected:
+	//! a portal to each geometry representation
+	vector<TeDatabasePortal*>	portals_;		
+	//! keep the geometry representation of each portal 
+	vector<TeRepresentation>	geomRepr_;	
+	//! internal information used to fill the stos
+	TeTable						attrTable_;	
+	//! flag to control the portal
+	bool						flagPortal_;	 
+	
+	//! map FROM each portal in the vector "portals_" TO the indexes of the unique attributes
+	map<int, vector<int> >		uniqueIndex_; 
+	
+	//! index of the link attributes in each portal in the vector "portals_"
+	vector<int>		linkIndex_;
+
+	//! index in the first portal of the first attribute
+	int				attrIndex1_;
+	//! index in the first portal of the last attribute
+	int				attrIndex2_;
+	//! index in the first portal of the group, if there is collection table
+	int				groupIndex_;
+	//! index where the geometry information begin in each portal in the vector "portals_"
+	vector<int>				geomIndex1_;
+	//! index where the geometry information finish in each portal in the vector "portals_"
+	vector<int>				geomIndex2_;
+	//! index of the initial time in each portal in the vector "portals_"  
+	vector<int>				timeIndex1_;
+	//! index of the final time in each portal in the vector "portals_"  
+	vector<int>				timeIndex2_;
+
+	//! map from legend identifier to group number  
+	map<int, int>			legendIdGroup_;
+			
+	//! clear internal vectors
+	void clearVectors(); 
+
+	//! Return a where clause in SQL that represent the querier restrictions
+	virtual string sqlWhereRestrictions(TeRepresentation* rep=0);
+
+	//! Build the sql from clause
+	string sqlFrom(string geomTable="");
+
+public:	
+	//! Constructor
+	TeQuerierDB(TeQuerierParams* params): TeQuerierImpl(params), flagPortal_(false) 
+	{}
+	
+	//! Destructor 
+	virtual ~TeQuerierDB();  
+	
+	//! Returns the pointer to the theme 
+	TeTheme* theme() {	return params_->theme();	}
+
+	//! Returns the pointer to the layer 
+	TeLayer* layer() {	return  params_->theme()->layer(); }
+
+	//! Returns the geometry representation of the theme
+	TeGeomRep geometryRep();
+
+	//! Loads the STOs from database
+	virtual bool loadInstances(TeTSEntry* ent=0) = 0;  
+	
+	//! Returns each loaded STO
+	virtual bool fetchInstance(TeSTInstance& stoi) = 0; 
+
+	//! Loads all geometries of the index-th geometry representation  
+	virtual bool loadGeometries(TeMultiGeometry& geometries, unsigned int& index); 
+
+	//! Loads all geometries 
+	virtual bool loadGeometries(TeMultiGeometry& geometries);
+	
+	//! Empties querier instances
+	void clear(); 
 };
 
-
 #endif
diff --git a/src/terralib/kernel/TeQuerierDBStr1.cpp b/src/terralib/kernel/TeQuerierDBStr1.cpp
old mode 100644
new mode 100755
index 3109c59..56cfbfb
--- a/src/terralib/kernel/TeQuerierDBStr1.cpp
+++ b/src/terralib/kernel/TeQuerierDBStr1.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright  2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -30,48 +30,94 @@ bool
 TeQuerierDBStr1::initPortal(TeRepresentation& rep, TeTSEntry* ent)
 {
 	string selectClause, fromClause, whereClause, orderByClause, groupByClause, parClause;
-	TeDatabase* db = params_.theme()->layer()->database();
+	
+	//Init portal indexes
 	isGroup_ = false;
+	uniqueIndex_.clear();
+	vector<int> indexesAux;
+	linkIndex_.clear();
+	linkIndex_.push_back(-1); 
+	attrIndex1_=-1;
+	attrIndex2_=-1;
+	groupIndex_=-1;
+	
+	geomIndex1_.clear();
+	geomIndex1_.push_back(-1);
+	geomIndex2_.clear();
+	geomIndex2_.push_back(-1);
+	timeIndex1_.clear();
+	timeIndex1_.push_back(-1);
+	timeIndex2_.clear();
+	timeIndex2_.push_back(-1);
+
+	//all vectors contains attributes with the table name and in upper case
+	vector<string>	attrs_select;	//contains the attributes that will be used to fill the TeSTInstance
+	vector<string>	geoms_select;	//contains the geometry attributes 
+	vector<string>	times_select;	//contains the date time attributes, when they are not in the attrs_select
+	vector<string>	unique_select;	//contains the unique attributes, when they are not in the attrs_select
+	
+	//------------------------------------------- begin get information
+	//get database
+	TeDatabase* db = params_->theme()->layer()->database();
 
+	//get attribute tables
+	TeAttrTableVector atts; 
+	params_->theme()->getAttTables(atts); 
+	
+	//verify if will be group the objects	
+	TeGroupingAttr groups = params_->groupAttr();  
+	bool groupAttr = !(groups.empty());
+		
 	//verify if the theme has collection table
 	bool hasCollTable = false;
-	if(db->tableExist(params_.theme()->collectionAuxTable()))
+	legendIdGroup_.clear();
+	legendIdGroup_[0]=0;
+	if(db->tableExist(params_->theme()->collectionAuxTable()))
+	{
+		TeLegendEntryVector& legVec = params_->theme()->legend();
+		for(unsigned int l=0; l<legVec.size(); ++l)
+			legendIdGroup_[legVec[l].id()]=legVec[l].group();
 		hasCollTable = true;
-	
+	}
+		
 	clearVectors();
-	params_.setLoadAttrs(params_.loadSetedAttrs()); //the original data
+	params_->setLoadAttrs(params_->loadSetedAttrs()); //the original data
 	
-	//get the link name 
-	string sqlGroup =""; 
-	if(hasCollTable && (!params_.hasSpatialRes()) && (!params_.loadGeom()))
-	{
-		linkName_ = params_.theme()->collectionTable() +".c_object_id";
-		sqlGroup = linkName_;
-	}
-	else  //has spatial restriction  
-	{
-		linkName_ = rep.tableName_ +".object_id"; 
-		sqlGroup = linkName_ +","+ rep.tableName_ +".geom_id";
+	//get the link name - the first attribute table or geometry table
+	linkName_ = rep.tableName_ +".object_id"; 
+	if(atts.size() > 0)
+		linkName_ = atts[0].name() +"."+ atts[0].linkName(); 
+			
+	if(params_->loadGeom())
 		geomRepr_.push_back(rep);
-	}
-
-	// order by clause
-	orderByClause = " ORDER BY "+ sqlGroup;
-
-	//verify if will be group the objects	
-	TeGroupingAttr groups = params_.groupAttr();  
-	bool groupAttr = !(groups.empty());
 	
-	// ---------------------------------------------  Mount SQL
+	//------------------------------------------- end get information
 	
-	// --------- begin attributes
-
-	// load only the attribute that will be grouped
+	//------------------------------------------- begin information to mount SQL
+	// -------- from
+	bool fromNeedGeomTable = false;
+	bool fromNeedCollTable = false;
+	
+	if(params_->loadGeom() || params_->hasSpatialRes() || atts.empty())
+		fromNeedGeomTable = true;
+	if(hasCollTable)
+		fromNeedCollTable = true;
+
+	// -------- group and order by 
+	bool useGroupByClause = false;	//group by object_id
+	bool useOrderByClause = false;  //order by object_id, geom_id
+	//Use group by clause when 
+	//1)it must group the attributes and 
+	//2)it must not load geometry and 
+	//3)all statistic functions exist in the SGBD 
+	string sGroup="";
 	if(groupAttr)
 	{
-		if(!params_.loadGeom())
+		if(params_->loadGeom())
+			useGroupByClause = false; 
+		else
 		{
-			string sGroup = db->getSQLStatistics(groups);
+			sGroup = db->getSQLStatistics(groups);
 			isGroup_ = true;
 			TeGroupingAttr::iterator it = groups.begin();
 			while(it!= groups.end())
@@ -80,242 +126,169 @@ TeQuerierDBStr1::initPortal(TeRepresentation& rep, TeTSEntry* ent)
 					isGroup_ = false;
 				++it;
 			}
-
 			if(isGroup_)
+				useGroupByClause = true; 
+		}
+		groupInMemory_ = !useGroupByClause;
+	}
+	else
+		useOrderByClause = true;
+
+	// -------- select
+	bool selectNeedGeom = false;
+	if(params_->loadGeom())
+		selectNeedGeom = true;
+	
+	//------------------------------------------- end information to mount SQL
+	
+	//------------------------------------------- begin mount SQL
+	// order and group by clause
+	orderByClause = " ORDER BY "+ linkName_; 
+	if(selectNeedGeom)
+		orderByClause += ", "+ rep.tableName_ +".geom_id";
+	groupByClause = " GROUP BY "+ linkName_;
+
+	// ------------- select clause
+	if(groupAttr)
+	{
+		if(!groupInMemory_) //use statistic function database
+		{
+			bool flag = true;
+			string auxS = sGroup;
+			while(flag)
 			{
-				selectClause  = sGroup;
-				orderByClause = "";
+				size_t pos = auxS.find(",", 0, 1);
+				if (pos == string::npos)
+				{
+					attrs_select.push_back(auxS);
+					flag = false;
+				}
+				else
+				{
+					attrs_select.push_back(auxS.substr(0, pos));
+					auxS = auxS.substr(pos+1);
+				}
 			}
-			
-			//if there is a spatial restriction, group every objects
-			if(!params_.hasSpatialRes())
-				groupByClause = " GROUP BY "+ linkName_;
 		}
-
-		if(!isGroup_)  
+		else //load the attributes from TeGroupingAttr
 		{
-			//group attributes in memory
-			groupInMemory_ = true;
 			//fill select clause from set of attributes
 			string lastAttr = "";
 			TeGroupingAttr::iterator it = groups.begin(); 
 			while(it!= groups.end())
 			{
-				if(lastAttr != it->first.name_)
-				{
-					if(it != groups.begin())
-						selectClause += ",";
-
-					selectClause += it->first.name_;
-				}
-				
+				if(lastAttr != it->first.name_) 
+					attrs_select.push_back(it->first.name_);
 				lastAttr = it->first.name_;
 				++it;
 			}
+
+			// select datatime information
+			if(!attrTable_.name().empty())
+			{
+				times_select.push_back(attrTable_.name()+"."+attrTable_.attInitialTime());
+
+				if(attrTable_.attInitialTime()!=attrTable_.attFinalTime())
+					times_select.push_back(attrTable_.name()+"."+attrTable_.attFinalTime());
+			}
 		}
 	}
-	// load all attributes or the attributes that are in the vector
-	else
+	else // load all attributes or the attributes that are in the vector
 	{
-			//get attribute tables
-		TeAttrTableVector atts; 
-		params_.theme()->getAttTables(atts); 
-		if(atts.empty() && (params_.loadAllAttr() || (!params_.loadAttrs().empty())))
-			return false;
-			
 		// get some information about the attribute tables required
 		for(unsigned int i=0; i<atts.size(); i++)
 		{
-			string initialTime, finalTime;
-
+			//date time information
 			if((atts[i].tableType()==TeAttrEvent) || (atts[i].tableType()==TeFixedGeomDynAttr))
 			{
 				attrTable_ = atts[i]; 
-				initialTime = attrTable_.attInitialTime();
-				finalTime = attrTable_.attFinalTime();
+				times_select.push_back(atts[i].name()+"."+attrTable_.attInitialTime());
+				times_select.push_back(atts[i].name()+"."+attrTable_.attFinalTime());
 			}
 		
-			// fill vector of unique name 
-			string unName = TeConvertToUpperCase(atts[i].uniqueName());
-			string unNameT = TeConvertToUpperCase(atts[i].name()+"."+atts[i].uniqueName());
-			uniqueNames_.push_back(unName);
-			uniqueNames_.push_back(unNameT);
-
+			//unique information
+			unique_select.push_back(atts[i].name()+"."+atts[i].uniqueName());
+			indexesAux.push_back(-1);
+						
 			//fill vector of attributes and sql string with all attributes
-			if(params_.loadAllAttr())
+			if(params_->loadAllAttr())
 			{
 				TeAttributeList::iterator itAttr = atts[i].attributeList().begin();
 				while(itAttr!= atts[i].attributeList().end())
 				{
 					string attribute = atts[i].name() +"."+ (*itAttr).rep_.name_;
-					params_.loadAttrs().push_back(attribute);
-					params_.loadAttrs().push_back((*itAttr).rep_.name_);
-				
-					//select clause
-					if(!selectClause.empty())
-						selectClause += ", ";
-					selectClause += attribute; 
-
-					++itAttr;
-				}
-			}
-			//only fill the sql string with the attributes of the TeSTInstance
-			else // make sure the unique and temporal columns are retrieved
-			{
-				string un = atts[i].name()+"."+ atts[i].uniqueName();
-				if (find(params_.loadAttrs().begin(), params_.loadAttrs().end(), un) == params_.loadAttrs().end())
-				{
-					if(!selectClause.empty())
-						selectClause += ", ";
-					selectClause += un;
-				}
-
-				string ini = atts[i].name()+"."+initialTime;
-				if (!initialTime.empty() && (find(params_.loadAttrs().begin(), params_.loadAttrs().end(), ini) == params_.loadAttrs().end()))
-				{
-					if(!selectClause.empty())
-						selectClause += ", ";
-					selectClause += ini;
-				}
-
-				string fin = atts[i].name()+"."+finalTime;
-				if	(!finalTime.empty() &&  initialTime != finalTime && 
-					(find(params_.loadAttrs().begin(), params_.loadAttrs().end(), fin) == params_.loadAttrs().end()))
-				{
-					if(!selectClause.empty())
-						selectClause += ", ";
-					selectClause += fin;
+					attrs_select.push_back(attribute);
+                    ++itAttr;
 				}
 			}
 		}
 
-		if(!params_.loadAllAttr())
+		if(!params_->loadAllAttr())
 		{
-			vector<string>  newNames;
-			vector<string>::iterator itVec = params_.loadAttrs().begin();
-			while(itVec!=params_.loadAttrs().end())
+			vector<string>::iterator itVec = params_->loadAttrs().begin();
+			while(itVec!=params_->loadAttrs().end())
 			{
-				//insert in select clause
-				if(!selectClause.empty())
-						selectClause += ", ";
-				selectClause += (*itVec);
-			
-				//insert in the attribute name vector without table name
-				size_t pos = (*itVec).find(".", string::npos,1);
-				if (pos != string::npos)
-				{
-					string newNam = (*itVec).substr(pos+1);
-					newNames.push_back(newNam);
-				}
-				++itVec;
-			}
-
-			itVec = newNames.begin();
-			while(itVec!=newNames.end())
-			{
-				params_.loadAttrs().push_back(*itVec);
+				//insert in select clause itVec: deve estar no formato tableName.attrName
+				attrs_select.push_back (*itVec);
 				++itVec;
 			}
 		}
 	}
 	
-	// selecionar o campo de data tamb�m
-	if(groupInMemory_ && params_.loadGeom() && (!attrTable_.name().empty()))
-	{
-		selectClause += ", "+ attrTable_.name()+"."+attrTable_.attInitialTime();
-		if(attrTable_.attInitialTime()!=attrTable_.attFinalTime())
-			selectClause += ", "+ attrTable_.name()+"."+attrTable_.attFinalTime();
-	}
-
-	// --------- end attributes
-
-
-	// --------- begin geometry
-
-	if(!selectClause.empty())
-		selectClause += ", ";
-
-	// select com todos os campos da tabela de geometria
-	if(params_.loadGeom())
+	if(selectNeedGeom)
 	{
-		TeTable table;
-		if(!db->loadTable(rep.tableName_, table))
+		TeAttributeList attrs;
+		if (!db->getAttributeList(rep.tableName_, attrs))
 			return false; 
 
-		vector<string> attrs; 
-		table.attributeNames(attrs); 
 		for(unsigned int i=0; i<attrs.size(); ++i)
-		{
-			if(i>0)
-				selectClause += ",";
-			selectClause += rep.tableName_+"."+ attrs[i];
-		}
-
+			geoms_select.push_back(rep.tableName_+"."+ attrs[i].rep_.name_);
+		
 		// order by clause
 		if((rep.geomRep_ == TePOLYGONS) && (db->dbmsName() != "OracleSpatial") && (db->dbmsName() != "PostGIS") )
 			orderByClause += ", parent_id ASC, num_holes DESC";
-
 	}
-	// select apenas com object_id e geom_id
-	else if(isGroup_)
+	
+	// ------------- from and where clause
+	if(!fromNeedCollTable)
 	{
-		if(params_.hasSpatialRes())
-			selectClause += " MIN("+ linkName_ +") AS terraObjId, MIN("+ rep.tableName_ +".geom_id) AS geom_id ";
+		if(fromNeedGeomTable)
+			fromClause = " FROM " + tableJoin(atts, rep.tableName_, "object_id");
 		else
-			selectClause += " MIN("+ linkName_ +") AS terraObjId "; 
-
-		linkName_ = "terraObjId";
-	}
-	else
-		selectClause += sqlGroup;
-		
-	// --------- end geometry
+			fromClause = " FROM " + tableJoin(atts);
 		
-	// --------- begin restrictions
-	if(!hasCollTable)
-	{
-		TeAttrTableVector atts; 
-		params_.theme()->getAttTables(atts); 
-
-		if(atts.empty())
-			return false;
-
-		fromClause = " FROM " + tableJoin(atts, rep.tableName_, "object_id");
-		whereClause = params_.theme()->sqlWhereRestrictions(&rep);
+		//if the theme does not have collection, it must apply its restrictions (attribute, temporal and spatial)
+		whereClause = params_->theme()->sqlWhereRestrictions(&rep); 
 	}
 	else
 	{
-		if(params_.loadGeom() || params_.hasSpatialRes()) 
-			fromClause = params_.theme()->sqlGridFrom(rep.tableName_);
+		if(fromNeedGeomTable)
+			fromClause = params_->theme()->sqlGridFrom(rep.tableName_);
 		else
-			fromClause = params_.theme()->sqlGridFrom();
+			fromClause = params_->theme()->sqlGridFrom();
 	}
-				
 
 	if(ent)
 	{
 		if(attrTable_.name().empty())
-			params_.theme()->getTemporalTable(attrTable_);
+			params_->theme()->getTemporalTable(attrTable_);
 
 		string iniTime = attrTable_.name()+"."+attrTable_.attInitialTime(); 
 		string finTime = attrTable_.name()+"."+attrTable_.attFinalTime(); 
 		if(!whereClause.empty())
 			whereClause += " AND ";
 
-		if ((params_.chronon()==TeMONTHOFYEAR) || (params_.chronon()==TeDAYOFWEEK))
-			whereClause += db->getSQLTemporalWhere(ent->timeInt_, ent->timeInt_, params_.chronon(), TeTIMEDURING, iniTime, finTime);    
+		if ((params_->chronon()==TeMONTHOFYEAR) || (params_->chronon()==TeDAYOFWEEK))
+			whereClause += db->getSQLTemporalWhere(ent->timeInt_, ent->timeInt_, params_->chronon(), TeTIMEDURING, iniTime, finTime);    
 		else
 		{
 			TeTimeInterval interval = ent->time_;
-			interval.intervalChronon(params_.chronon());
+			interval.intervalChronon(params_->chronon());
 
 			whereClause += db->getSQLTemporalWhere(interval, TeTIMEDURING, iniTime, finTime);
 		}
 	}
 
-	// --------- end restrictions
-
-	//where clause
 	if(!objectId().empty())
 	{
 		if(!whereClause.empty())
@@ -324,7 +297,117 @@ TeQuerierDBStr1::initPortal(TeRepresentation& rep, TeTSEntry* ent)
 		whereClause += linkName_ +" = '"+ objectId() +"'";  
 	}
 
+	//---------- mount select clause and get the indexes
+	unsigned int index=0;
+	unsigned int count=0;
+	selectClause = "";
+	uniqueIndex_[0] = indexesAux;
+	
+	//this attribute list can contain datetime, link and unique information
+	attrIndex1_ = count;
+	for(index=0; index<attrs_select.size(); ++index)
+	{
+		if(!selectClause.empty())
+			selectClause += ", ";
+		selectClause += attrs_select[index];
+		//link index
+		if(TeConvertToUpperCase(linkName_)==TeConvertToUpperCase(attrs_select[index]))
+			linkIndex_[0] = count;
+		//unique index
+		for(unsigned int i=0; i<unique_select.size(); ++i)
+		{
+			if(TeConvertToUpperCase(unique_select[i])==TeConvertToUpperCase(attrs_select[index]))
+				uniqueIndex_[0][i] = count;
+		}
+		
+		//time index
+		for(unsigned int i=0; i<times_select.size(); ++i)
+		{
+			if(TeConvertToUpperCase(times_select[i])==TeConvertToUpperCase(attrs_select[index]))
+			{
+				if(i==0)
+					timeIndex1_[0] = count;
+				else
+					timeIndex2_[0] = count;
+			}
+		}
+		if(timeIndex1_[0]>=0 && timeIndex2_[0]<0)
+			timeIndex2_[0] = timeIndex1_[0];
+		
+		attrIndex2_ = count;
+		++count;
+	}
+
+	//link attribute
+	if(linkIndex_[0]<0)
+	{
+		if(!selectClause.empty())
+			selectClause += ", ";
+		selectClause += linkName_;
+		linkIndex_[0] = count;
+		++count;
+	}
+	
+	//unique attributes
+	for(index=0; index<unique_select.size(); ++index)
+	{
+		if(uniqueIndex_[0][index]<0)
+		{
+			//verify if the unique name is equal to link name
+			if(TeConvertToUpperCase(unique_select[index]) == TeConvertToUpperCase(linkName_))
+				uniqueIndex_[0][index] = linkIndex_[0];
+			else
+			{
+				//adds the unique attributes that were not added
+				if(!selectClause.empty())
+					selectClause += ", ";
+				selectClause += unique_select[index];
+				uniqueIndex_[0][index] = count; 
+				++count;
+			}
+		}
+	}
+
+	//group index
+	if(hasCollTable)
+	{
+		if(!selectClause.empty())
+			selectClause += ", ";
+		if(useGroupByClause)
+			selectClause += " MIN("+ params_->theme()->collectionTable()+".c_legend_id )";
+		else
+			selectClause += params_->theme()->collectionTable()+".c_legend_id";
+			
+		groupIndex_ = count;
+		++count;
+	}
+
+	//time attributes
+	if(timeIndex1_[0]<0 && (!times_select.empty()))
+	{
+		timeIndex1_[0] = count;
+		for(index=0; index<times_select.size(); ++index)
+		{
+			if(!selectClause.empty())
+				selectClause += ", ";
+			selectClause += times_select[index];
+			timeIndex2_[0] = count;
+			++count;
+		}
+	}
 
+	//geometries
+	if(!geoms_select.empty())
+		geomIndex1_[0] = count;
+	for(index=0; index<geoms_select.size(); ++index)
+	{
+		if(!selectClause.empty())
+			selectClause += ", ";
+		selectClause += geoms_select[index];
+		geomIndex2_[0] = count;
+		++count;
+	}
+	
 	//---------- querier restriction
 	string sqlQuerierRest = sqlWhereRestrictions(&rep);
 	if(!whereClause.empty())
@@ -332,17 +415,19 @@ TeQuerierDBStr1::initPortal(TeRepresentation& rep, TeTSEntry* ent)
 
 	whereClause += sqlQuerierRest;
 
-	//----------
-
-	string sql = "SELECT "+ selectClause + fromClause;
+	fromClause_ = fromClause;
+	whereClause_ = whereClause;
+    string sql = "SELECT "+ selectClause + fromClause;
 	if(!whereClause.empty())
 		sql += " WHERE "+ whereClause;
 	
-	if(!groupByClause.empty())
+	if(useGroupByClause)
 		sql += " "+ groupByClause;
 	else
-		sql += orderByClause;
+		sql += " "+ orderByClause;
 	
+	//------------------------------------------- end mount SQL
+
 	// --------- Submit the query
 	portals_.clear();
 	TeDatabasePortal* portal = db->getPortal();
@@ -364,8 +449,16 @@ TeQuerierDBStr1::initPortal(TeRepresentation& rep, TeTSEntry* ent)
 		return false;
 	}
 
-	string id = portal->getData(linkName_);
-	if(id.empty())
+	string id = portal->getData(linkIndex_[0]);
+	bool flag = true;
+	while(id.empty() && flag) 
+	{
+		flag = portal->fetchRow();
+		if(flag)
+			id = portal->getData(0); //object_Id
+	}
+	
+	if(id.empty() || (!flag))
 	{
 		delete (portal);
 		flagPortal_ = false;
@@ -378,24 +471,32 @@ TeQuerierDBStr1::initPortal(TeRepresentation& rep, TeTSEntry* ent)
 	return true;
 }
 
-
 bool 
 TeQuerierDBStr1::initGeomPortal(TeRepresentation& rep, TeTSEntry* ent)
 {
 	string selectClause, fromClause, whereClause, orderByClause, parClause;
 	string initialTime, finalTime;
 	string uniqueName;
+	vector<int> indexesAux;
+	linkIndex_.push_back(-1); 
+	geomIndex1_.push_back(-1);
+	geomIndex2_.push_back(-1);
+	timeIndex1_.push_back(-1);
+	timeIndex2_.push_back(-1);
 	
-	TeDatabase* db = params_.theme()->layer()->database();
+	TeDatabase* db = params_->theme()->layer()->database();
 
 	//------- Get geometry table
 	geomRepr_.push_back(rep);
 	if(rep.tableName_.empty())
 		return false;
-	
-	selectClause = rep.tableName_ +".* ";
-	orderByClause = " ORDER BY "+ rep.tableName_ +".object_id ";
 
+	int ind = linkIndex_.size()-1; //the last position in the vectors
+	
+	selectClause = linkName_; 
+	orderByClause = " ORDER BY "+ linkName_;  
+	linkIndex_[ind] = 0;
+	
 	if((rep.geomRep_ == TePOLYGONS) && (db->dbmsName() != "OracleSpatial") && (db->dbmsName() != "PostGIS") )
 		orderByClause += " , parent_id ASC, num_holes DESC";
 	
@@ -406,28 +507,44 @@ TeQuerierDBStr1::initGeomPortal(TeRepresentation& rep, TeTSEntry* ent)
 		finalTime = attrTable_.name() +"."+ attrTable_.attFinalTime ();
 			
 		// fill vector of unique name 
-		uniqueName = TeConvertToUpperCase(attrTable_.name()+"."+attrTable_.uniqueName());
-						
-		selectClause += ", "+ attrTable_.name()+"."+ attrTable_.uniqueName();
-		selectClause += ", "+ attrTable_.name()+"."+initialTime;
+		uniqueName = attrTable_.name()+"."+attrTable_.uniqueName();
+								
+		selectClause += ", "+ uniqueName;
+		indexesAux.push_back(1);
+		selectClause += ", "+ initialTime;
+		timeIndex1_[ind] = 2;
+		timeIndex2_[ind] = 2;
 
 		if (initialTime != finalTime)
-			selectClause += ", "+ attrTable_.name()+"."+finalTime;
+		{
+			selectClause += ", "+ finalTime;
+			timeIndex2_[ind] = 3;
+		}
 	}
+
+	//adds geometry attributes
+	selectClause += ","+ rep.tableName_ +".* ";
+	uniqueIndex_[ind] = indexesAux;
+	if(indexesAux.empty())
+		geomIndex1_[ind] = 1;
+	else if(timeIndex1_[ind]==timeIndex2_[ind])
+		geomIndex1_[ind] = 3;
+	else
+		geomIndex1_[ind] = 4;
 	
-	if(!db->tableExist(params_.theme()->collectionAuxTable()))
+	if(!db->tableExist(params_->theme()->collectionAuxTable()))
 	{
 		TeAttrTableVector atts; 
-		params_.theme()->getAttTables(atts); 
+		params_->theme()->getAttTables(atts); 
 
 		if(atts.empty())
 			return false;
 
 		fromClause = " FROM " + tableJoin(atts, rep.tableName_, "object_id");
-		whereClause = params_.theme()->sqlWhereRestrictions(&rep);
+		whereClause = params_->theme()->sqlWhereRestrictions(&rep);
 	}
 	else
-		fromClause = params_.theme()->sqlGridFrom(rep.tableName_);
+		fromClause = params_->theme()->sqlGridFrom(rep.tableName_);
 	
 	if(ent)
 	{
@@ -436,12 +553,12 @@ TeQuerierDBStr1::initGeomPortal(TeRepresentation& rep, TeTSEntry* ent)
 		if(!whereClause.empty())
 			whereClause += " AND ";
 
-		if ((params_.chronon()==TeMONTHOFYEAR) || (params_.chronon()==TeDAYOFWEEK))
-			whereClause += db->getSQLTemporalWhere(ent->timeInt_, ent->timeInt_, params_.chronon(), TeTIMEDURING, iniTime, finTime);    
+		if ((params_->chronon()==TeMONTHOFYEAR) || (params_->chronon()==TeDAYOFWEEK))
+			whereClause += db->getSQLTemporalWhere(ent->timeInt_, ent->timeInt_, params_->chronon(), TeTIMEDURING, iniTime, finTime);    
 		else
 		{
 			TeTimeInterval interval = ent->time_;
-			interval.intervalChronon(params_.chronon());
+			interval.intervalChronon(params_->chronon());
 
 			whereClause += db->getSQLTemporalWhere(interval, TeTIMEDURING, iniTime, finTime);
 		}
@@ -481,19 +598,16 @@ TeQuerierDBStr1::initGeomPortal(TeRepresentation& rep, TeTSEntry* ent)
 		return false;
 	}
 
-	if(!portal->fetchRow())
-	{
+	if(portal->fetchRow())
+		portals_.push_back (portal); 
+	else
 		delete portal;
-		return false;
-	}
 
-	portals_.push_back (portal);
 	return true;
 }
 
 
 // ---------- final - initPortal
-
 // It is used in two cases:
 // 1) when it must return all instances of an object 
 // 2) when the attributes was grouped by sql functions - without geometry 
@@ -512,25 +626,19 @@ TeQuerierDBStr1::fillSTOGrouped(TeSTInstance& sto, bool fetchInstance)
 	if(!geomRepr_.empty())
 		rep = &(geomRepr_[0]);
 
-	if(!flagPortal_)
-	{
-		clearVectors();
-		return false;
-	}
-
 	TeTime  minT1, maxT2;
 	
-	// builds an ST object instance
+	// builds a ST object instance
 	TeTime t1, t2;
-	TePropertyVector prop;
+	vector<string> attrValues;
 
 	// verify if exist several geometries for an object
 	bool flagGeom = true;
 	while(flagGeom && fetchInstance)
 	{
-		sto.objectId (portal->getData(linkName_));
+		sto.objectId (portal->getData(linkIndex_[0]));
 						
-		if(rep && (!params_.loadGeom()))
+		if(rep && (!params_->loadGeom()))
 		{
 			int geomId = portal->getInt(rep->tableName_ +".geom_id");
 			
@@ -546,90 +654,73 @@ TeQuerierDBStr1::fillSTOGrouped(TeSTInstance& sto, bool fetchInstance)
 				geomId_ = geomId;
 		}
 		flagGeom = false;
-	}
-	
+	}	
 	
 	// ------------- begin fill attribute
 	// process the records filling the parameters of each instance
-	TeAttributeList attrsPortal = portal->AttributeList();
-	TeAttributeList::iterator it= attrsPortal.begin();
-
-	if(isGroup_)  // it was grouped by sql functions and without geometry 
+	TeAttributeList& attrsPortal = portal->getAttributeList();
+	
+	//get the attributes
+	for(int s=attrIndex1_; s<=attrIndex2_; ++s)
 	{
-		sto.addUniqueId(string(portal->getData(linkName_)));
+		if(s<0)
+			break;
+		attrValues.push_back(portal->getData(s));
+		if(!fetchInstance) //fill the attribute list
+			attrList_->push_back(attrsPortal[s]);
+	}
 
-		unsigned int size = params_.groupAttr().size();
-		for(unsigned int s=0; s<size; ++s)
-		{
-			TeProperty p;
-			p.attr_ = attrsPortal[s];   
-			p.value_ = portal->getData (s);
-			prop.push_back(p);
-		}
+	//get the group index
+	if(groupIndex_!=-1)
+	{
+		int gIndex = portal->getInt(groupIndex_);
+		sto.setSlice(legendIdGroup_[gIndex]);
 	}
+	
+	if(isGroup_)  // it was grouped by sql functions and without geometry 
+		sto.addUniqueId(string(portal->getData(linkIndex_[0])));
 	else
 	{
-		while(it!=attrsPortal.end())
+		//unique id
+		for(unsigned int s=0; s<uniqueIndex_[0].size(); ++s)
 		{
-			TeProperty p;
-			string name = (*it).rep_.name_;
-			p.attr_ = (*it);
+			string uniqueValue = portal->getData(uniqueIndex_[0][s]);
+			sto.addUniqueId(uniqueValue);
+		}
 
-			if(name==attrTable_.attInitialTime())
-			{
-				t1 = portal->getDate(attrTable_.attInitialTime());
-				if(attrTable_.attInitialTime()==attrTable_.attFinalTime())
-				{
-					t2 = t1;
-					sto.timeInterval(TeTimeInterval(t1,t2));
-				}
-			}
-			else if(name==attrTable_.attFinalTime())
-			{
-				t2 = portal->getDate(attrTable_.attFinalTime());
-				sto.timeInterval(TeTimeInterval(t1,t2));
-			}
-			else if(find(uniqueNames_.begin(), uniqueNames_.end(), TeConvertToUpperCase(name)) != uniqueNames_.end())
-			{
-				string uniqueValue = portal->getData(name);
-				sto.addUniqueId(uniqueValue);
-			}
-			
-			if(find(params_.loadAttrs().begin(), params_.loadAttrs().end(), name) != params_.loadAttrs().end())
-			{
-				p.value_ = portal->getData(name);
-				prop.push_back(p);
-			}
-			++it;
+		//date time information
+		if(timeIndex1_[0]>=0 && timeIndex2_[0]>=0)
+		{
+			t1 = portal->getDate(timeIndex1_[0]);
+			t2 = portal->getDate(timeIndex2_[0]);
+			sto.timeInterval(TeTimeInterval(t1,t2));
 		}
 	}
 
 	//! Set the property in the stoInstance
-	sto.properties(prop);	
-	sto.theme(params_.theme());
+	sto.setProperties(attrValues); 
+	sto.setAttrList(attrList_);
 
 	if(!fetchInstance) //only to get the attributes
 		return true;
 
 	// ------------- end fill attribute
-
 	//total time
 	if(t1.isValid() && t1<minT1)
 		minT1 = t1;
 	if(t2.isValid() && maxT2<t2)
 		maxT2 = t2;
 		
-	// ------------- begin fill geometries
-
-	if(params_.loadGeom())
+	// ------------- begin fill geometries  
+	if(params_->loadGeom())
 	{
 		if(t1.isValid() && t2.isValid())
-			flagPortal_ = addGeometry(portal, rep->geomRep_, sto, rep->tableName_, TeTimeInterval(t1,t2), attrTable_.attInitialTime(), attrTable_.attFinalTime());
+			flagPortal_ = addGeometry(portal, rep->geomRep_, sto, linkIndex_[0], geomIndex1_[0], TeTimeInterval(t1,t2), timeIndex1_[0], timeIndex2_[0]);
 		else
-			flagPortal_ = addGeometry(portal, rep->geomRep_, sto, rep->tableName_);
+			flagPortal_ = addGeometry(portal, rep->geomRep_, sto, linkIndex_[0], geomIndex1_[0]);
 	}
 	else
-		flagPortal_ = portal->fetchRow ();
+		flagPortal_ = portal->fetchRow();
 
 	// ------------- end fill geometries
 	
@@ -651,20 +742,22 @@ TeQuerierDBStr1::fillGeomSTO(TeSTInstance& sto, unsigned int index)
 	TeTimeInterval time = sto.timeInterval();
 	bool flag = false;
 	if(time.isValid())
-		flag = addGeometry(portal, rep.geomRep_, sto, rep.tableName_, time, attrTable_.attInitialTime(), attrTable_.attFinalTime());
+		flag = addGeometry(portal, rep.geomRep_, sto, linkIndex_[index], geomIndex1_[index], time, timeIndex1_[index], timeIndex2_[index]);
 	else
-		flag = addGeometry(portal, rep.geomRep_, sto, rep.tableName_);
+		flag = addGeometry(portal, rep.geomRep_, sto, linkIndex_[index], geomIndex1_[index] );
 
-	return flag;
+	if(flag==false)
+		flagPortal_ = false; 
+	
+	return true;
 }
 
-
 // It is used in a case:
 // 1) when the attributes of the object instances must be grouping in memory - with or without geometry 
 bool
 TeQuerierDBStr1::fillSTONoGrouped(TeSTInstance& sto)
 {
-	unsigned int s;
+	int s;
 	if(portals_.empty())
 		return false;
 
@@ -676,125 +769,131 @@ TeQuerierDBStr1::fillSTONoGrouped(TeSTInstance& sto)
 	if(!geomRepr_.empty())
 		rep = &(geomRepr_[0]);
 	
-	//verify if the portal points to any STO
-	if(!flagPortal_)
-	{
-		clearVectors();
-		return false;
-	}
-
-	TePropertyVector prop;
-	map<int, vector<double> >	values;
+	map<int, vector<double> >	valuesDouble;
+	map<int, vector<string> >	valuesString;
 	string lastObj = "";
 
-	TeAttributeList attrsPortal = portal->AttributeList();
+	TeAttributeList& attrsPortal = portal->getAttributeList();
 	
-	if(!params_.loadGeom())
+	//get the group index
+	if(groupIndex_!=-1)
+	{
+		int gIndex = portal->getInt(groupIndex_);
+		sto.setSlice(legendIdGroup_[gIndex]);
+	}
+
+	//when there is spatial restriction, the querier can not group the attributes and
+	//get the geometry at the same time. In this case, it do not get the geometry.
+	if(!params_->loadGeom() || params_->hasSpatialRes())
 	{
+		int cont = 0;
 		do
 		{
-			string objId = portal->getData(linkName_);
-			if(!rep)
-			{
-				lastObj = objId;
-				flagPortal_ = portal->fetchRow();
-				break;
-			}
-
-			int geomId = portal->getInt(rep->tableName_ +".geom_id");
-
-			if(lastObj.empty())
-				geomId_ = geomId;  //first read geomId
-			
-			if((!lastObj.empty()) && (objId != lastObj))
+			string objId = portal->getData(linkIndex_[0]);
+			//if there is a spatial restriction, it groups all instances of all objects of the portal 
+			if(!params_->hasSpatialRes() && (!lastObj.empty() && objId != lastObj))
 				break;  
 					
-			//verify this is the geomId  
-			if(geomId!=geomId_)
-			{
-				flagPortal_ = portal->fetchRow();
-				lastObj = objId;
-				continue;
-			}
-				
 			string val = ""; 
-			unsigned int size = attrsPortal.size();
-			//portal has the attributes that will be grouped and geometric columns (object_id and geom_id)
-			for(unsigned int s=0; s<(size-2); ++s)  
+			//portal has the attributes that will be grouped 
+			for(s=attrIndex1_; s<=attrIndex2_; ++s)
 			{
+				if(s<0)
+					break;
 				val = portal->getData(s);
-				if(val.empty())
-					values[s].push_back (TeMAXFLOAT);  //invalid value
+				if((attrsPortal[s].rep_.type_==TeREAL) || (attrsPortal[s].rep_.type_==TeINT))
+				{
+					if(val.empty())
+						valuesDouble[s].push_back (TeMAXFLOAT);  //invalid value
+					else
+						valuesDouble[s].push_back (atof(val.c_str()));
+				}
 				else
-					values[s].push_back (atof(val.c_str()));
+					valuesString[s].push_back(val);
 			}
 
 			flagPortal_ = portal->fetchRow();
 			lastObj = objId;
+			++cont;
 
 		} while(flagPortal_);
 	}
-	else // -- when fill the geometry
-	{
-		
+	else // -- when it must fill the geometry
+	{		
 		//------- first: load the geometry, attributes and time of the first object 
 		//object id
-		lastObj = portal->getData(rep->tableName_ +".object_id");
+		lastObj = portal->getData(linkIndex_[0]);
 		
 		//attribute val
 		string val = ""; 
-		unsigned int size = attrsPortal.size();
-		for(s=0; s<(size-1); ++s)
+		
+		for(s=attrIndex1_; s<=attrIndex2_; ++s)
 		{
 			val = portal->getData(s);
-			if(val.empty())
-				values[s].push_back (TeMAXFLOAT);  //invalid value
+			if((attrsPortal[s].rep_.type_==TeREAL) || (attrsPortal[s].rep_.type_==TeINT))
+			{
+				if(val.empty())
+					valuesDouble[s].push_back (TeMAXFLOAT);  //invalid value
+				else
+					valuesDouble[s].push_back (atof(val.c_str()));
+			}
 			else
-				values[s].push_back (atof(val.c_str()));
+				valuesString[s].push_back (val);
 		}
 
 		//time
 		TeTime t1, t2;
 		if(!attrTable_.name().empty())
 		{
-			t1 = portal->getDate(attrTable_.attInitialTime());
-			t2 = portal->getDate(attrTable_.attFinalTime());
+			t1 = portal->getDate(timeIndex1_[0]);
+			t2 = portal->getDate(timeIndex2_[0]);
 		}
 		
+		sto.objectId(lastObj);
 		if(t1.isValid() && t2.isValid())
-			flagPortal_ = addGeometry(portal, rep->geomRep_, sto, rep->tableName_, TeTimeInterval(t1,t2), attrTable_.attInitialTime(), attrTable_.attFinalTime());
+			flagPortal_ = addGeometry(portal, rep->geomRep_, sto, linkIndex_[0], geomIndex1_[0], TeTimeInterval(t1,t2), timeIndex1_[0], timeIndex2_[0]);
 		else
-			flagPortal_ = addGeometry(portal, rep->geomRep_, sto, rep->tableName_);
-		
+			flagPortal_ = addGeometry(portal, rep->geomRep_, sto, linkIndex_[0], geomIndex1_[0]);
+				
 		//------- second: load the attributes of the other objects
-		int cont = 0;
+		int cont = 0;   
 		while (flagPortal_)
 		{
-			string objId = portal->getData(rep->tableName_ +".object_id");
-			int geomId = portal->getInt(rep->tableName_ +".geom_id");
-
+			string objId = portal->getData(linkIndex_[0]);
+			//if there is a spatial restriction, it groups all instances of all objects of the portal 
 			if(objId != lastObj)
 				break;  
 			
+			//same object id
+			string gId = portal->getData (geomIndex1_[0]);
+			int geomId = atoi(gId.c_str());
+			if(gId.empty())
+				geomId = cont;   
+			
 			if(!cont)
 				geomId_ = geomId;  //first geom_id 
 			
 			//verify the geomId
-			if(geomId!=geomId_)
+			if(geomId==geomId_)   
 			{
 				flagPortal_ = portal->fetchRow();
 				lastObj = objId;
 				continue;
 			}
-				
+							
 			val = ""; 
-			for(s=0; s<(size-1); ++s)
+			for(s=attrIndex1_; s<=attrIndex2_; ++s)
 			{
 				val = portal->getData(s);
-				if(val.empty())
-					values[s].push_back (TeMAXFLOAT);  //invalid value
+				if((attrsPortal[s].rep_.type_==TeREAL) || (attrsPortal[s].rep_.type_==TeINT))
+				{
+					if(val.empty())
+						valuesDouble[s].push_back (TeMAXFLOAT);  //invalid value
+					else
+						valuesDouble[s].push_back (atof(val.c_str()));
+				}
 				else
-					values[s].push_back (atof(val.c_str()));
+					valuesString[s].push_back (val);
 			}
 
 			flagPortal_ = portal->fetchRow();
@@ -808,80 +907,97 @@ TeQuerierDBStr1::fillSTONoGrouped(TeSTInstance& sto)
 	string lastAttr = "";
 	unsigned int j=0;
 	string colName = "";
-	TeGroupingAttr::iterator it = params().groupAttr().begin(); 
+	TeGroupingAttr::iterator it = params()->groupAttr().begin(); 
 
-	TeStatisticValMap stat;
-	while(it!=params().groupAttr().end())
+	TeStatisticValMap		statDouble;
+	TeStatisticStringValMap statString;
+	
+	TeAttrDataType attrType = TeSTRING;
+	while(it!=params()->groupAttr().end())
 	{
 		if(lastAttr != it->first.name_)
 		{
-			if(j>=(values.size()))
-				return false;
+			statDouble.clear();
+			statString.clear();
+			//if((it->first.type_==TeREAL) || (it->first.type_==TeINT))
+			if((attrsPortal[j].rep_.type_==TeREAL) || (attrsPortal[j].rep_.type_==TeINT))
+			{
+				TeCalculateStatistics(valuesDouble[j].begin(), valuesDouble[j].end(), statDouble);
+				attrType = TeREAL;
+			}
+			else
+			{
+				TeCalculateStatistics(valuesString[j].begin(), valuesString[j].end(), statString);
+				attrType = TeSTRING;
+			}
 			
-			stat.clear();
-			TeCalculateStatistics(values[j].begin(), values[j].end(), stat);
 			colName = attrsPortal[j].rep_.name_;
 			++j;
 		}
 
-		double result;
+		double resultD=0;
+		string resultS="";
 		string prefix;
 		switch(it->second)
 		{
 			case TeCOUNT:
-				result = stat[TeCOUNT]; 
+				resultD = statDouble[TeCOUNT]; 
+				resultS = statString[TeCOUNT];
 				prefix = "count";
 				break;
 			case TeVALIDCOUNT:
-				result = stat[TeVALIDCOUNT]; 
+				resultD = statDouble[TeVALIDCOUNT]; 
+				resultS = statString[TeVALIDCOUNT];
 				prefix = "valCount";
 				break;
 			case TeMINVALUE:
-				result = stat[TeMINVALUE];
+				resultD = statDouble[TeMINVALUE];
+				resultS = statString[TeMINVALUE];
 				prefix = "min";
 				break;
 			case TeMAXVALUE:
-				result = stat[TeMAXVALUE];
+				resultD = statDouble[TeMAXVALUE];
+				resultS = statString[TeMAXVALUE];
 				prefix = "max";
 				break;
 			case TeSUM:
-				result = stat[TeSUM]; 
+				resultD = statDouble[TeSUM]; 
 				prefix = "sum";
 				break;
 			case TeMEAN:
-				result = stat[TeMEAN]; 
+				resultD = statDouble[TeMEAN]; 
 				prefix = "mean";
 				break;
 			case TeSTANDARDDEVIATION:
-				result = stat[TeSTANDARDDEVIATION];
+				resultD = statDouble[TeSTANDARDDEVIATION];
 				prefix = "stDeviation";
 				break;
 			case TeVARIANCE:
-				result = stat[TeVARIANCE];
+				resultD = statDouble[TeVARIANCE];
 				prefix = "variance";
 				break;
 			case TeSKEWNESS:
-				result = stat[TeSKEWNESS];
+				resultD = statDouble[TeSKEWNESS];
 				prefix = "skwness";
 				break;
 			case TeKURTOSIS:
-				result = stat[TeKURTOSIS]; 
+				resultD = statDouble[TeKURTOSIS]; 
 				prefix = "kurtosis";
 				break;
 			case TeAMPLITUDE:
-				result = stat[TeAMPLITUDE]; 
+				resultD = statDouble[TeAMPLITUDE]; 
 				prefix = "amplitude";
 				break;
 			case TeMEDIAN:
-				result = stat[TeMEDIAN]; 
+				resultD = statDouble[TeMEDIAN]; 
 				prefix = "median";
 				break;
 			case TeVARCOEFF:
-				result = stat[TeVARCOEFF]; 
+				resultD = statDouble[TeVARCOEFF]; 
 				prefix = "varcoeff";
 				break;
 			case TeMODE: 
-				result = stat[TeMODE]; 
+				resultD = statDouble[TeMODE]; 
 				prefix = "mode";
 				break;
 			default:
@@ -892,19 +1008,19 @@ TeQuerierDBStr1::fillSTONoGrouped(TeSTInstance& sto)
 		++it;
 
 		//fill the property 
-		TeProperty p;
-		p.attr_.rep_.name_ = prefix +"_"+ colName;
-		p.attr_.rep_.type_ = TeREAL;
-		p.value_ = Te2String(result);
-
-		prop.push_back(p);
+		if(attrType == TeREAL)
+			sto.addPropertyValue(Te2String(resultD));
+		else
+			sto.addPropertyValue(resultS);
 	}
 	
 	//adds the property in the stoInstance
-	sto.properties(prop);	
-	sto.theme(params_.theme());
-	sto.objectId(lastObj);
-	sto.addUniqueId(lastObj);
+	if(!params_->hasSpatialRes())
+	{
+		sto.addUniqueId(lastObj);
+		sto.objectId(lastObj);
+	}
+	sto.setAttrList(attrList_);
 
 	lastObjId_ = sto.objectId(); 
 	return true;
@@ -914,22 +1030,19 @@ TeQuerierDBStr1::fillSTONoGrouped(TeSTInstance& sto)
 bool
 TeQuerierDBStr1::loadInstances(TeTSEntry* ent)
 {
-	if(!params_.theme())
+	if(!params_->theme())
 		return false;
 
-	TeRepresPointerVector repres = params_.theme()->layer()->vectRepres();
+	TeRepresPointerVector repres = params_->theme()->layer()->vectRepres();
 	TeRepresentation rep;
 	
 	//fill instances - first fill the geometry representation of the spatial restriction 
-	if(params_.theme()->hasSpatialRest())
-		rep = **(TeFindRepresentation(repres.begin(), repres.end(), params_.theme()->geomRepRestriction()));
+	if(params_->theme()->hasSpatialRest())
+		rep = **(TeFindRepresentation(repres.begin(), repres.end(), params_->theme()->geomRepRestriction()));
 	else
 	{
 		for(int i=0; i<(int)repres.size(); ++i)
 		{
-			if(repres[i]->geomRep_==TeTEXT)
-				continue; 
-			
 			rep = *repres[i];
 			break;
 		}
@@ -939,34 +1052,34 @@ TeQuerierDBStr1::loadInstances(TeTSEntry* ent)
 		return false;
 
 	//get the attribute list
-	attrList_.clear();
+	attrList_->clear();
 	if(!groupInMemory_)
 	{
 		TeSTInstance i;
 		fillSTOGrouped(i, false);
-		TePropertyVector props = i.getPropertyVector();
-		for(int c=0; c<(int)props.size(); ++c)
-			attrList_.push_back (props[c].attr_);
 	}
 	else
 	{
-		TeGroupingAttr::iterator it = params().groupAttr().begin();
-		while(it!=params().groupAttr().end())
+		TeGroupingAttr::iterator it = params()->groupAttr().begin();
+		while(it!=params()->groupAttr().end())
 		{
 			TeAttribute at;
 			at.rep_ = it->first;
-			attrList_.push_back (at);
+			attrList_->push_back (at);
 			++it;
 		}
 	}
 			
-	if(!params_.loadGeom())
+	if(!params_->loadGeom())
 		return true;
+
+	//set a invalid box
+	TeBox box;
+	params_->box(box);
 	
 	for(unsigned int i=0; i<repres.size(); ++i)
 	{
-		if( (repres[i]->geomRep_ == rep.geomRep_) || 
-			(repres[i]->geomRep_ == TeTEXT) )
+		if(repres[i]->geomRep_ == rep.geomRep_)
 			continue;
 
 		if(!initGeomPortal(*(repres[i]), ent))
@@ -975,7 +1088,6 @@ TeQuerierDBStr1::loadInstances(TeTSEntry* ent)
 			return false;
 		}
 	}
-
 	return true;
 }
 
@@ -984,33 +1096,79 @@ TeQuerierDBStr1::fetchInstance(TeSTInstance&  sto)
 {
 	sto.clear();
 	bool flag = false;
-	
+
+	if(!flagPortal_)
+	{
+		clearVectors();
+		return false;
+	}
+
 	if(groupInMemory_)
 		flag = fillSTONoGrouped(sto); 
 	else
 		flag = fillSTOGrouped(sto); 
 	
-	if((flag==false) || (!params_.loadGeom()))
+	if((flag==false) || (!params_->loadGeom()))
 		return flag;
-	
+    	
 	for(unsigned int i=1; i<portals_.size(); ++i)
 		flag = fillGeomSTO(sto, i);
-	
+
+	updateBox(params_->box(), sto.getGeometries().getBox());
 	return flag;
 }
 
-
 int 
 TeQuerierDBStr1::numElemInstances()
 {
+	//from clause has the geom table
+	if(params_->loadGeom() || params_->hasSpatialRes())
+	{
+		//load the attribute tables
+		TeAttrTableVector atts; 
+		params_->theme()->getAttTables(atts); 
+		if(atts.empty())
+			return 0;
+
+		string selectClause = " DISTINCT ";
+		for(unsigned int i=0; i<atts.size(); ++i)
+		{
+			if(i>0)
+				selectClause+= ",";
+			selectClause+= atts[i].name() +"."+ atts[i].linkName();
+
+			if(atts[i].linkName()!=atts[i].uniqueName())
+				selectClause+= ","+ atts[i].name() +"."+ atts[i].uniqueName();
+		}
+		
+        string sql = "SELECT "+ selectClause + fromClause_;
+		if(!whereClause_.empty())
+			sql += " WHERE "+ whereClause_;
+
+		TeDatabasePortal* portal = params_->theme()->layer()->database()->getPortal();
+		if(!portal)
+			return 0;
+		
+		sql = "SELECT COUNT(*) FROM(" + sql + ")";
+
+		if(!portal->query(sql) || !portal->fetchRow())
+		{
+			delete (portal);
+			return 0;
+		}
+		int result = portal->getInt(0);
+		delete portal;
+		return result;
+	}
+		
 	if((portals_.empty()))
 		return 0;
 
-	TeDatabasePortal* portal = portals_[0];
-	if(!portal)
+	//get the first portal
+	if(!portals_[0])
 		return 0;
 
-	return (portal->numRows());
+	return (portals_[0]->numRows());
 }
 
 
diff --git a/src/terralib/kernel/TeQuerierDBStr1.h b/src/terralib/kernel/TeQuerierDBStr1.h
old mode 100644
new mode 100755
index 89cf967..4ec02a8
--- a/src/terralib/kernel/TeQuerierDBStr1.h
+++ b/src/terralib/kernel/TeQuerierDBStr1.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -21,74 +21,103 @@ indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
 
+/*! \file TeQuerierDBStr1.h
+	\brief This file contains a mechanism named "TeQuerierDBStr1" that is 
+	responsible for loading spatio-temporal elements from a TerraLib database. 
+*/
+
 #ifndef  __TERRALIB_INTERNAL_QUERIER_DBSTR1_H
 #define  __TERRALIB_INTERNAL_QUERIER_DBSTR1_H
 
 #include "TeQuerierDB.h"
 
-//! A class that implement a strategy to build STOs (Spatial Temporal Objects) from a TerraLib database (Strategy 1)
-class TeQuerierDBStr1 : public TeQuerierDB
-{
+/*! \class TeQuerierDBStr1
+	\brief A class responsible for loading spatio-temporal elements from a TerraLib database.
 
-private:
-		
-		vector<string>				uniqueNames_;
-		string						lastObjId_;
-		int							geomId_;
-		bool						isGroup_;			//! if the portal was built with statistics sql funcionts
-		bool						groupInMemory_;		//! if it must group the object instances in the memory 
-		string						linkName_;
-		
-		/* @name Internal functions to initialize portals */
-		//@{
-		bool initPortal(TeRepresentation& rep, TeTSEntry* ent=0);     
-		bool initGeomPortal(TeRepresentation& rep, TeTSEntry* ent=0); 
-		//@}
-
-		/* @name Internal functions to fill the STOs from portals */
-		//@{
-		bool fillSTOGrouped(TeSTInstance& sto, bool fetchInstance = true);
-		bool fillSTONoGrouped(TeSTInstance& sto);
-		bool fillGeomSTO(TeSTInstance& sto, unsigned int index);
-		//@}
+	This class implements a mechanism that is responsible for loading 
+	spatio-temporal elements from a TerraLib database, following a specific strategy. 
+	Each spatio-temporal elements is represented through a TeSTInstance class. 
+	This class is internally used by the factory of queriers. It should NOT be used 
+	by anyone. 
 
-public:
+	\sa
+	TeQuerierDB TeQuerierParams TeSTInstance 
+*/
+class TL_DLL TeQuerierDBStr1 : public TeQuerierDB
+{
+private:		
+	vector<string>				uniqueNames_;
+	string						lastObjId_;
+	int							geomId_;
+	bool						isGroup_;			//! if the portal was built with statistics sql funcionts
+	bool						groupInMemory_;		//! if it must group the object instances in the memory 
+	string						linkName_;
+	
+	string						fromClause_;   //store the sql clause(from and where) to return the number of instances
+	string						whereClause_;
+	
+	/* @name Internal functions to initialize portals */
+	//@{
+	bool initPortal(TeRepresentation& rep, TeTSEntry* ent=0);     
+	bool initGeomPortal(TeRepresentation& rep, TeTSEntry* ent=0); 
+	//@}
+
+	/* @name Internal functions to fill the STOs from portals */
+	//@{
+	bool fillSTOGrouped(TeSTInstance& sto, bool fetchInstance = true);
+	bool fillSTONoGrouped(TeSTInstance& sto);
+	bool fillGeomSTO(TeSTInstance& sto, unsigned int index);
+	//@}
 
-		//! Constructor
-		TeQuerierDBStr1(TeQuerierParams& params) : 
-			TeQuerierDB(params), 
-			lastObjId_(""),
-			isGroup_(false),
-			groupInMemory_(false),
-			linkName_("")
-		{}
-		
-		//! Loads instances
-		bool loadInstances(TeTSEntry* ent=0); 
-		
-		//! Returns each loaded instance
-		bool fetchInstance(TeSTInstance&  sto); 
-
-		//! Returns the number of instances to each time frame
-		int numElemInstances(); 
+public:
+	//! Constructor
+	TeQuerierDBStr1(TeQuerierParams* params) : 
+		TeQuerierDB(params), 
+		lastObjId_(""),
+		isGroup_(false),
+		groupInMemory_(false),
+		linkName_(""),
+		fromClause_(""),
+		whereClause_("")
+	{}
+	
+	//! Loads instances
+	bool loadInstances(TeTSEntry* ent=0); 
+	
+	//! Returns each loaded instance
+	bool fetchInstance(TeSTInstance&  sto); 
+
+	//! Returns the number of instances 
+	int numElemInstances(); 
 };
 
-//! A class that define a factory to build a querier strategy from database(strategy 1)
-class TeQuerierDBStr1Factory : public TeQuerierImplFactory
+/*! \class TeQuerierDBStr1Factory
+	\brief A class that define a factory to build a querier strategy (strategy 1) from TerraLib database.
+
+	\sa
+	TeQuerierImplFactory TeQuerierDBStr1
+*/
+class TL_DLL TeQuerierDBStr1Factory : public TeQuerierImplFactory
 {
 public:
-
 	//! Constructor
 	TeQuerierDBStr1Factory(const string& name) : TeQuerierImplFactory(name) {}
 
 	//! Builds a database querier
 	virtual TeQuerierImpl* build (const TeQuerierParams& arg)
 	{  
-		TeQuerierParams tempArg = arg;
+		TeQuerierParams* tempArg = new TeQuerierParams();
+		*tempArg = arg;
 		return new TeQuerierDBStr1(tempArg); 
 	}
 };
 
+//! Creates a static factory to build TeQuerierDBStr1 
+namespace 
+{
+  static TeQuerierDBStr1Factory querierDBStr1("querierDBStr1");
+};
+
 
 #endif
 
diff --git a/src/terralib/kernel/TeQuerierDBStr2.cpp b/src/terralib/kernel/TeQuerierDBStr2.cpp
old mode 100644
new mode 100755
index 137c98f..1130c94
--- a/src/terralib/kernel/TeQuerierDBStr2.cpp
+++ b/src/terralib/kernel/TeQuerierDBStr2.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright  2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -25,33 +25,51 @@ of this library and its documentation.
 #include "TeDatabase.h"
 #include "TeSTInstance.h"
 
+//It must group the attributes of ONE attribute table using DBMS functions
+// and do not load geometries. It must be used with theme (with collection table).
 bool
 TeQuerierDBStr2::initPortal(TeTSEntry* ent)  
 {
 	string selectClause, fromClause, whereClause, groupByClause;
 	string initialTime, finalTime;
-	TeDatabase* db = params_.theme()->layer()->database();
-
-	if(params_.groupAttr().empty())
+	linkIndex_.clear();
+	linkIndex_.push_back(-1); 
+	attrIndex1_=-1;
+	attrIndex2_=-1;
+	timeIndex1_.clear();
+	timeIndex1_.push_back(-1);
+	timeIndex2_.clear();
+	timeIndex2_.push_back(-1);
+	groupIndex_=-1;
+
+	TeDatabase* db = params_->theme()->layer()->database();
+
+	if(params_->groupAttr().empty())
 		return false;
 
-	//get the table name
+	//get the table name (there is only one attribute table)
 	string tableName;
-	TeGroupingAttr groupAttr = params_.groupAttr();
+	TeGroupingAttr groupAttr = params_->groupAttr();
 	TeGroupingAttr::iterator it = groupAttr.begin();
-	size_t pos = (it->first.name_).find(".", string::npos,1);
+	size_t pos = (it->first.name_).find(".", 0, 1);
 	if (pos != string::npos)
 		tableName = (it->first.name_).substr(0,pos);
+
+	//group information
+	legendIdGroup_.clear();
+	legendIdGroup_[0]=0;
+	TeLegendEntryVector& legVec = params_->theme()->legend();
+	for(unsigned int l=0; l<legVec.size(); ++l)
+		legendIdGroup_[legVec[l].id()]=legVec[l].group();
 		
-	
 	clearVectors();
 
 	// ---------------------------------------------  Mount SQL
+	
 	//------- Select and Group By clause
-
 	//load the attribute table 
 	int index = -1;
-	TeAttrTableVector attr = params_.theme()->attrTables();
+	TeAttrTableVector attr = params_->theme()->attrTables();
 	for(unsigned int i=0; i<attr.size(); ++i)
 	{
 		if(TeConvertToUpperCase(attr[i].name()) == TeConvertToUpperCase(tableName))
@@ -75,36 +93,48 @@ TeQuerierDBStr2::initPortal(TeTSEntry* ent)
 	if(attrTable_.tableType() != TeAttrExternal)
 		linkName = attrTable_.name() +"."+ attrTable_.linkName(); 
 	else
-		linkName = params_.theme()->collectionTable() +".c_object_id "; 
+		linkName = params_->theme()->collectionTable() +".c_object_id "; 
 
-	if(params_.hasSpatialRes())
+	if(params_->hasSpatialRes())
 		selectClause = " MIN("+ linkName +")";		
 	else
-		selectClause = linkName;		
+		selectClause = linkName;	
+	linkIndex_[0]=0;
 
 	if(ent)
 	{
 		//date
 		initialTime = attrTable_.name() +"."+ attrTable_.attInitialTime();
 		
-		groupByClause = db->getSQLTemporalFunction(params_.chronon(), initialTime);
-		
-		if(!params_.hasSpatialRes())
+		groupByClause = db->getSQLTemporalFunction(params_->chronon(), initialTime);
+		if(!params_->hasSpatialRes())
 			groupByClause += ","+ linkName;
 				
 		selectClause += ", MAX("+ initialTime +")";
+		timeIndex1_[0]=1;
+		timeIndex2_[0]=1;
 	}
 	else 
 		groupByClause = linkName;
 
+	
 	//statistic
-	selectClause += ","+ db->getSQLStatistics(groupAttr);   
+	selectClause += ","+ db->getSQLStatistics(groupAttr);  
+	if(timeIndex1_[0]<0)
+		attrIndex1_=1;
+	else
+		attrIndex1_=2;
+	attrIndex2_ = attrIndex1_+(params_->groupAttr().size()-1);
+
+	//group index
+	selectClause += ", MIN("+ params_->theme()->collectionTable()+".c_legend_id )";
+	groupIndex_ = attrIndex2_+1;		
 
 	//---- from clause 
-	if(params_.hasSpatialRes())
+	if(params_->hasSpatialRes())
 	{
 		groupByClause = ""; //It groups all attributes from all objects 
-		string gTable = params_.theme()->layer()->tableName(params_.geomRepRest());
+		string gTable = params_->theme()->layer()->tableName(params_->geomRepRest());
 		fromClause = this->sqlFrom(gTable);
 	}
 	else
@@ -114,8 +144,8 @@ TeQuerierDBStr2::initPortal(TeTSEntry* ent)
 		return false;
 	
 	//where clause
-	if(!params_.objId().empty())
-		whereClause = linkName +" = '"+ params_.objId() +"'";  
+	if(!params_->objId().empty())
+		whereClause = linkName +" = '"+ params_->objId() +"'";  
 
 	//---------- querier restriction
 	string sqlQuerierRest = sqlWhereRestrictions();
@@ -155,8 +185,16 @@ TeQuerierDBStr2::initPortal(TeTSEntry* ent)
 		return false;
 	}
 
-	string id = portal->getData(0); //object_Id
-	if(id.empty())
+	string id = portal->getData(linkIndex_[0]); //object_Id
+	bool flag = true;
+	while(id.empty() && flag) 
+	{
+		flag = portal->fetchRow();
+		if(flag)
+			id = portal->getData(linkIndex_[0]); //object_Id
+	}
+	
+	if(id.empty() || (!flag)) //se o id �vazio ou chegou ao final do portal 
 	{
 		delete (portal);
 		flagPortal_ = false;
@@ -185,20 +223,17 @@ TeQuerierDBStr2::fillSTO(TeSTInstance& sto)
 		return false; 
 	}
 
-	int posInit = 1;
-
 	if(TSEntry_.timeFrame_ > -1)
 	{
 		// first : verify the time
-		TeTime t1 = portal->getDate(1);		// 1: date
+		TeTime t1 = portal->getDate(timeIndex1_[0]);		
 		t1.chronon ((TSEntry_.time_).intervalChronon());
-		posInit = 2;
-	
+			
 		//if the time is before the requested interval 
 		while ( (TSEntry_.time_).before(t1) && flagPortal_)
 		{
 			flagPortal_ = portal->fetchRow();
-			t1 = portal->getDate(1);
+			t1 = portal->getDate(timeIndex1_[0]);
 			t1.chronon ((TSEntry_.time_).intervalChronon());
 		}
 	
@@ -211,29 +246,27 @@ TeQuerierDBStr2::fillSTO(TeSTInstance& sto)
 		timeFramePortal_ = (TSEntry_.timeFrame_)+1; //next time frame 
 	}
 
-	// get object_id
-	string objId = string(portal->getData(0));  // 0: object_id
-	sto.objectId (objId);
-	sto.addUniqueId (objId);
-
-	//get property
-	TeAttributeList attrsPortal = portal->AttributeList();
-	TePropertyVector prop;
-
-	unsigned int size = params_.groupAttr().size();
-	for(unsigned int s=0; s<size; ++s)  // 1 or 2 until size...
+	//if there is spatial restriction, it groups all instances of all objects
+	if(!params_->hasSpatialRes())
 	{
-		TeProperty p;
-		p.attr_ = attrsPortal[posInit];   
-		p.value_ = string(portal->getData(posInit));
-		prop.push_back(p);
-		++posInit;
+		// get object_id
+		string objId = string(portal->getData(linkIndex_[0]));  // 0: object_id
+		sto.objectId (objId);
+		sto.addUniqueId (objId);
+
+		//get the group index
+		if(groupIndex_!=-1)
+		{
+			int gIndex = portal->getInt(groupIndex_);
+			sto.setSlice(legendIdGroup_[gIndex]);
+		}
 	}
-	
-	// set the property in the stoInstance
-	sto.properties(prop);	
-	sto.theme(params_.theme());
 
+	//get property
+	for(int s=attrIndex1_; s<=attrIndex2_; ++s)  
+		sto.addPropertyValue(string(portal->getData(s)));
+
+	sto.setAttrList(attrList_);
 	flagPortal_ = portal->fetchRow();
 	return true;
 }
@@ -242,9 +275,13 @@ TeQuerierDBStr2::fillSTO(TeSTInstance& sto)
 bool
 TeQuerierDBStr2::loadInstances(TeTSEntry* ent) 
 {
-	if(!params_.theme())
+	if(!params_->theme())
 		return false;
 
+	//set a invalid box
+	TeBox box;
+	params_->box(box);
+
 	if(ent)
 	{
 		//if the portal was not initialised (timeFramePortal_==-1) or
@@ -266,21 +303,20 @@ TeQuerierDBStr2::loadInstances(TeTSEntry* ent)
 		timeFramePortal_ = -1;
 	}
 
-	attrList_.clear();
+	attrList_->clear();
 	TeAttribute at;
-	TeGroupingAttr::iterator it = params().groupAttr().begin();
-	while(it!=params().groupAttr().end())
+	TeGroupingAttr::iterator it = params()->groupAttr().begin();
+	while(it!=params()->groupAttr().end())
 	{
 		TeAttribute at;
 		at.rep_ = it->first;
-		attrList_.push_back (at);
+		attrList_->push_back (at);
 		++it;
 	}
 
 	return true;
 }
 
-
 bool
 TeQuerierDBStr2::fetchInstance(TeSTInstance&  sto) 
 {
@@ -290,10 +326,25 @@ TeQuerierDBStr2::fetchInstance(TeSTInstance&  sto)
 		return false; 
 	
 	//build a temporal serie to one object
-	if((ts_) && (ts_->setTSEntryValue(TSEntry_.timeFrame_, sto[0], TeDATA)))
+	string val;
+	sto.getPropertyValue(val, 0);
+	if((ts_) && (ts_->setTSEntryValue(TSEntry_.timeFrame_, atof(val.c_str()), TeDATA)))
 		filledSerie_ = true;
 	
 	return true;
 }
 
+int 
+TeQuerierDBStr2::numElemInstances()
+{
+	if((portals_.empty()))
+		return 0;
+
+	//get the first portal
+	if(!portals_[0])
+		return 0;
+
+	return (portals_[0]->numRows());
+}
+
 
diff --git a/src/terralib/kernel/TeQuerierDBStr2.h b/src/terralib/kernel/TeQuerierDBStr2.h
old mode 100644
new mode 100755
index 581a35d..d64b7fd
--- a/src/terralib/kernel/TeQuerierDBStr2.h
+++ b/src/terralib/kernel/TeQuerierDBStr2.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,6 +20,10 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
+/*! \file TeQuerierDBStr2.h
+	\brief This file contains a mechanism named "TeQuerierDBStr2" that is 
+	responsible for loading spatio-temporal elements from a TerraLib database. 
+*/
 
 #ifndef  __TERRALIB_INTERNAL_QUERIER_DBSTR2_H
 #define  __TERRALIB_INTERNAL_QUERIER_DBSTR2_H
@@ -27,11 +31,22 @@ of this library and its documentation.
 #include "TeQuerierDB.h"
 #include "TeTemporalSeries.h"
 
-//! A class that implement a strategy to build STOs (Spatial Temporal Objects) from a TerraLib database (Strategy 2)
-//! Strategy 2: simple chronon, without geometry, theme with collection table, operator exist in the database  
-class TeQuerierDBStr2: public TeQuerierDB
+/*! \class TeQuerierDBStr2
+	\brief A class responsible for loading spatio-temporal elements from a TerraLib database.
+
+	This class implements a mechanism that is responsible for loading 
+	spatio-temporal elements from a TerraLib database, following a specific strategy (Strategy 2). 
+	Each spatio-temporal elements is represented through a TeSTInstance class. 
+	This class is internally used by the factory of queriers. It should NOT be used 
+	by anyone. This Strategy 2 works with simple chronon, without geometry, 
+	theme with collection table and existence operator in the DBMS.  
+
+	\sa
+	TeQuerierDB TeQuerierParams TeSTInstance 
+*/
+
+class TL_DLL TeQuerierDBStr2: public TeQuerierDB
 {
-	
 private:
 	int				timeFramePortal_;  // the time frame appointed by the portal 
 	TeTSEntry		TSEntry_;
@@ -45,9 +60,8 @@ private:
 	bool fillSTO(TeSTInstance& sto); 
 	
 public:
-	
 	//! Constructor
-	TeQuerierDBStr2(TeQuerierParams& params): 
+	TeQuerierDBStr2(TeQuerierParams* params): 
 		TeQuerierDB(params), 
 		timeFramePortal_(-1)
 	{} 
@@ -57,22 +71,36 @@ public:
 
 	//! Returns each loaded STO
 	bool fetchInstance(TeSTInstance&  sto); 
+
+	//! Returns the number of instances 
+	int  numElemInstances();
 };
 
-//! A class that define a factory to build a querier strategy from database(strategy 2)
-class TeQuerierDBStr2Factory : public TeQuerierImplFactory
+/*! \class TeQuerierDBStr2Factory
+	\brief A class that define a factory to build a querier strategy (strategy 2) from TerraLib database.
+
+	\sa
+	TeQuerierImplFactory TeQuerierDBStr2
+*/
+class TL_DLL TeQuerierDBStr2Factory : public TeQuerierImplFactory
 {
 public:
-
 	//! Constructor
 	TeQuerierDBStr2Factory(const string& name) : TeQuerierImplFactory(name) {}
 
 	//! Builds a database querier
 	virtual TeQuerierImpl* build (const TeQuerierParams& arg)
 	{  
-		TeQuerierParams tempArg = arg;
+		TeQuerierParams* tempArg = new TeQuerierParams();
+		*tempArg = arg;
 		return new TeQuerierDBStr2(tempArg); 
 	}
 };
 
+//! Creates a static factory to build TeQuerierDBStr2 
+namespace 
+{
+  static TeQuerierDBStr2Factory querierDBStr2("querierDBStr2");
+};
+
 #endif
diff --git a/src/terralib/kernel/TeQuerierDBStr3.cpp b/src/terralib/kernel/TeQuerierDBStr3.cpp
old mode 100644
new mode 100755
index 60032a3..887d21a
--- a/src/terralib/kernel/TeQuerierDBStr3.cpp
+++ b/src/terralib/kernel/TeQuerierDBStr3.cpp
@@ -1,6 +1,6 @@
  /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright  2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -21,28 +21,51 @@ indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
 
-#include "TeQuerierDBStr3.h"
-#include "TeDatabase.h"
-#include "TeSTInstance.h"
+#include <TeQuerierDBStr3.h>
+#include <TeDatabase.h>
+#include <TeSTInstance.h>
+#include <TeLayer.h>
 
+//It must group the attributes of ONE attribute table and 
+//load geometries of ONE representation (cells or points) 
+//It must be used with theme (with collection table)
 bool
 TeQuerierDBStr3::initPortal(TeTSEntry* ent)  
 {
 	string selectClause, fromClause, whereClause, groupByClause;
 	string initialTime, finalTime;
-	TeDatabase* db = params_.theme()->layer()->database();
-
-	if(params_.groupAttr().empty())
+	linkIndex_.clear();
+	linkIndex_.push_back(-1); 
+	attrIndex1_=-1;
+	attrIndex2_=-1;
+	timeIndex1_.clear();
+	timeIndex1_.push_back(-1);
+	timeIndex2_.clear();
+	timeIndex2_.push_back(-1);
+	geomIndex1_.clear();
+	geomIndex1_.push_back(-1);
+	groupIndex_=-1;
+
+	TeDatabase* db = params_->theme()->layer()->database();
+
+	if(params_->groupAttr().empty())
 		return false;
 
 	//get the table name
 	string tableName;
-	TeGroupingAttr groupAttr = params_.groupAttr();
+	TeGroupingAttr groupAttr = params_->groupAttr();
 	TeGroupingAttr::iterator it = groupAttr.begin();
-	size_t pos = (it->first.name_).find(".", string::npos,1);
+	size_t pos = (it->first.name_).find(".", 0, 1);
 	if (pos != string::npos)
 		tableName = (it->first.name_).substr(0,pos);
-	
+
+	//group information
+	legendIdGroup_.clear();
+	legendIdGroup_[0]=0;
+	TeLegendEntryVector& legVec = params_->theme()->legend();
+	for(unsigned int l=0; l<legVec.size(); ++l)
+		legendIdGroup_[legVec[l].id()]=legVec[l].group();
+			
 	clearVectors();
 
 	// ---------------------------------------------  Monut SQL
@@ -52,7 +75,7 @@ TeQuerierDBStr3::initPortal(TeTSEntry* ent)
 	//load the attribute table 
 	int index = -1;
 	unsigned int i=0;
-	TeAttrTableVector attr = params_.theme()->attrTables();
+	TeAttrTableVector attr = params_->theme()->attrTables();
 	for(i=0; i<attr.size(); ++i)
 	{
 		if(TeConvertToUpperCase(attr[i].name()) == TeConvertToUpperCase(tableName))
@@ -72,71 +95,81 @@ TeQuerierDBStr3::initPortal(TeTSEntry* ent)
 		return false;
 
 	//geometric Table
-	TeTable geomTable;
-	if(params_.theme()->layer()->hasGeometry(TePOINTS))
+	TeAttributeList geomTableAttrs;
+	string geomTable;
+	if(params_->theme()->layer()->hasGeometry(TePOINTS))
 	{
-		if(!db->loadTable(params_.theme()->layer()->tableName(TePOINTS), geomTable))
+		geomTable = params_->theme()->layer()->tableName(TePOINTS);
+		if(!db->getAttributeList(geomTable, geomTableAttrs))
 			return false; 
 		rep_ = TePOINTS;
 	} 
-	else if (params_.theme()->layer()->hasGeometry(TeCELLS))
+	else if (params_->theme()->layer()->hasGeometry(TeCELLS))
 	{
-		if(!db->loadTable(params_.theme()->layer()->tableName(TeCELLS), geomTable))
-			return false;
+		geomTable = params_->theme()->layer()->tableName(TeCELLS);
+		if(!db->getAttributeList(geomTable, geomTableAttrs))
+			return false; 
 		rep_ = TeCELLS;
 	}
 	else
 		return false; //this strategy is valid only for cells and point geometry
 
 	//object_id
-	string linkName = geomTable.name()+ ".object_id ";
+	string linkName = attrTable_.name() +"."+ attrTable_.linkName(); //geomTable.name()+ ".object_id ";
 	string uniqueIdName = attrTable_.name() +"."+ attrTable_.uniqueName(); 
 	
-	if(params_.hasSpatialRes())
+	if(params_->hasSpatialRes())
 		selectClause = " MIN("+ linkName +")";		
 	else
-		selectClause = linkName;		
+		selectClause = linkName;	
+	linkIndex_[0]=0;
 
 	if(ent)
 	{
 		//date
 		initialTime = attrTable_.name() +"."+ attrTable_.attInitialTime();
 
-		groupByClause = db->getSQLTemporalFunction(params_.chronon(), initialTime);
-		
-		if(!params_.hasSpatialRes())
+		groupByClause = db->getSQLTemporalFunction(params_->chronon(), initialTime);
+		if(!params_->hasSpatialRes())
 			groupByClause += ","+ linkName;
 		
 		selectClause += ", MAX("+ initialTime +")";
+		timeIndex1_[0]=1;
+		timeIndex2_[0]=1;
 	}
-	else if(!params_.hasSpatialRes())
+	else if(!params_->hasSpatialRes())
 		groupByClause = linkName;
 
 	//statistic
 	selectClause += ","+ db->getSQLStatistics(groupAttr);   
+	if(timeIndex1_[0]<0)
+		attrIndex1_=1;
+	else
+		attrIndex1_=2;
+	attrIndex2_ = attrIndex1_+(params_->groupAttr().size()-1);
+
+	//group index
+	selectClause += ", MIN("+ params_->theme()->collectionTable()+".c_legend_id )";
+	groupIndex_ = attrIndex2_+1;	
 	
 	//----- insert geometrical information in the select clause
-	vector<string> attrs; 
-	geomTable.attributeNames(attrs); 
-	for(i=0; i<attrs.size(); ++i)
-	{	
-		if(attrs[i]!="object_id")
-			selectClause += ", MIN( "+ geomTable.name()+"."+ attrs[i] +" ) AS "+ attrs[i];
-	}
+	for(i=0; i<geomTableAttrs.size(); ++i)
+		selectClause += ", MIN( "+ geomTable +"."+ geomTableAttrs[i].rep_.name_ +" ) AS "+ geomTableAttrs[i].rep_.name_;
+	geomIndex1_[0] = attrIndex2_+2;
 	//-----	
 
 	//------- From clause 
-	fromClause = this->sqlFrom(geomTable.name());
+	fromClause = this->sqlFrom(geomTable);
 	if(fromClause.empty())
 		return false;
 
 	//where clause
-	if(!params_.objId().empty())
-		whereClause = linkName +" = '"+ params_.objId() +"'";  
+	if(!params_->objId().empty())
+		whereClause = linkName +" = '"+ params_->objId() +"'";  
 
 	//---------- querier restriction
 	TeRepresentation rep;
-	rep.tableName_ = geomTable.name();
+	rep.tableName_ = geomTable;
 	rep.geomRep_ = rep_;
 
 	string sqlQuerierRest = sqlWhereRestrictions(&rep);
@@ -146,7 +179,9 @@ TeQuerierDBStr3::initPortal(TeTSEntry* ent)
 	whereClause += sqlQuerierRest;
 
 	//----------
-	
+	fromClause_ = fromClause;
+	whereClause_ = whereClause;
+
 	string sql = " SELECT "+ selectClause; 
 	sql += " FROM "+ fromClause; 
 	if(!whereClause.empty())
@@ -176,8 +211,16 @@ TeQuerierDBStr3::initPortal(TeTSEntry* ent)
 		return false;
 	}
 
-	string id = portal->getData(0); //object_Id
-	if(id.empty())
+	string id = portal->getData(linkIndex_[0]); //object_Id
+	bool flag = true;
+	while(id.empty() && flag) 
+	{
+		flag = portal->fetchRow();
+		if(flag)
+			id = portal->getData(linkIndex_[0]); //object_Id
+	}
+	
+	if(id.empty() || (!flag))
 	{
 		delete (portal);
 		flagPortal_ = false;
@@ -206,20 +249,18 @@ TeQuerierDBStr3::fillSTO(TeSTInstance& sto)
 		return false; 
 	}
 
-	int posInit = 1;
-
+	
 	// first : verify the time
 	if(TSEntry_.timeFrame_ > -1)
 	{
-		TeTime t1 = portal->getDate(1);		// 1: date
+		TeTime t1 = portal->getDate(timeIndex1_[0]);		
 		t1.chronon ((TSEntry_.time_).intervalChronon());
-//		int posInit = 2;
 		
 		//if the time is before the requested interval 
 		while ( (TSEntry_.time_).before(t1) && flagPortal_)
 		{
 			flagPortal_ = portal->fetchRow();
-			t1 = portal->getDate(1);
+			t1 = portal->getDate(timeIndex1_[0]);
 			t1.chronon ((TSEntry_.time_).intervalChronon());
 		}
 		
@@ -232,40 +273,39 @@ TeQuerierDBStr3::fillSTO(TeSTInstance& sto)
 		timeFramePortal_ = (TSEntry_.timeFrame_)+1; //next time frame 
 	}
 	
-	// get object_id
-	string objId = string(portal->getData(0));  // 0: object_id
-	sto.objectId (objId);
-	sto.addUniqueId (objId);
-
-	//get property
-	TeAttributeList attrsPortal = portal->AttributeList();
-	TePropertyVector prop;
-	
-	unsigned int size = params_.groupAttr().size();
-	for(unsigned int s=0; s<size; ++s)  // 1 or 2 until size...
+	//if there is spatial restriction, it groups all instances of all objects
+	if(!params_->hasSpatialRes())
 	{
-		TeProperty p;
-		p.attr_ = attrsPortal[posInit];   
-		p.value_ = portal->getData (posInit);
-		prop.push_back(p);
-		++posInit;
+		// get object_id
+		string objId = string(portal->getData(linkIndex_[0]));  // 0: object_id
+		sto.objectId (objId);
+		sto.addUniqueId (objId);
+
+		//get the group index
+		if(groupIndex_!=-1)
+		{
+			int gIndex = portal->getInt(groupIndex_);
+			sto.setSlice(legendIdGroup_[gIndex]);
+		}
 	}
-	
-	// set the property in the stoInstance
-	sto.properties(prop);	
-	sto.theme(params_.theme());
+
+	sto.setAttrList(attrList_);
+
+	//get property
+	for(int s=attrIndex1_; s<=attrIndex2_; ++s)  
+		sto.addPropertyValue(portal->getData(s));
 
 	// get geometry 
 	if(rep_ == TePOINTS)
 	{
 		TePoint point;
-		flagPortal_ = portal->fetchGeometry(point);
+		flagPortal_ = portal->fetchGeometry(point,geomIndex1_[0]);
 		sto.addGeometry (point);
 	}
 	else
 	{
 		TeCell cell;
-		flagPortal_ = portal->fetchGeometry(cell);
+		flagPortal_ = portal->fetchGeometry(cell, geomIndex1_[0]);
 		sto.addGeometry (cell);
 	}
 
@@ -276,9 +316,13 @@ TeQuerierDBStr3::fillSTO(TeSTInstance& sto)
 bool
 TeQuerierDBStr3::loadInstances(TeTSEntry* ent) 
 {
-	if(!params_.theme())
+	if(!params_->theme())
 		return false;
 
+	//set a invalid box
+	TeBox box;
+	params_->box(box);
+
 	if(ent)
 	{
 		//if the portal was not initialised (timeFramePortal_==-1) or
@@ -300,14 +344,14 @@ TeQuerierDBStr3::loadInstances(TeTSEntry* ent)
 		timeFramePortal_ = -1;
 	}
 
-	attrList_.clear();
+	attrList_->clear();
 	TeAttribute at;
-	TeGroupingAttr::iterator it = params().groupAttr().begin();
-	while(it!=params().groupAttr().end())
+	TeGroupingAttr::iterator it = params()->groupAttr().begin();
+	while(it!=params()->groupAttr().end())
 	{
 		TeAttribute at;
 		at.rep_ = it->first;
-		attrList_.push_back (at);
+		attrList_->push_back (at);
 		++it;
 	}
 
@@ -324,12 +368,53 @@ TeQuerierDBStr3::fetchInstance(TeSTInstance&  sto)
 		return false; 
 	
 	//build a temporal serie to one object
-	if((ts_) && (ts_->setTSEntryValue(TSEntry_.timeFrame_, sto[0], TeDATA)))
+	string val;
+	sto.getPropertyValue(val, 0);
+	if((ts_) && (ts_->setTSEntryValue(TSEntry_.timeFrame_, atof(val.c_str()), TeDATA)))
 		filledSerie_ = true;
 	
+	updateBox(params_->box(), sto.getGeometries().getBox());
 	return true;
 }
 
+int 
+TeQuerierDBStr3::numElemInstances()
+{
+	//load the attribute tables
+	TeAttrTableVector atts; 
+	params_->theme()->getAttTables(atts); 
+	if(atts.empty())
+		return 0;
+
+	string selectClause = " DISTINCT ";
+	for(unsigned int i=0; i<atts.size(); ++i)
+	{
+		if(i>0)
+			selectClause+= ",";
+		selectClause+= atts[i].name() +"."+ atts[i].linkName();
+
+		if(atts[i].linkName()!=atts[i].uniqueName())
+			selectClause+= ","+ atts[i].name() +"."+ atts[i].uniqueName();
+	}
+	
+    string sql = "SELECT "+ selectClause + fromClause_;
+	if(!whereClause_.empty())
+		sql += " WHERE "+ whereClause_;
+
+	TeDatabasePortal* portal = params_->theme()->layer()->database()->getPortal();
+	if(!portal)
+		return 0;
+	
+	if(!portal->query(sql) || !portal->fetchRow())
+	{
+		delete (portal);
+		return 0;
+	}
+	int result = portal->numRows();
+	delete portal;
+	return result;
+}
+
 
 
 
diff --git a/src/terralib/kernel/TeQuerierDBStr3.h b/src/terralib/kernel/TeQuerierDBStr3.h
old mode 100644
new mode 100755
index bd9bb4b..23dcbba
--- a/src/terralib/kernel/TeQuerierDBStr3.h
+++ b/src/terralib/kernel/TeQuerierDBStr3.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,22 +20,39 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
+/*! \file TeQuerierDBStr3.h
+	\brief This file contains a mechanism named "TeQuerierDBStr3" that is 
+	responsible for loading spatio-temporal elements from a TerraLib database.
+*/
 #ifndef  __TERRALIB_INTERNAL_QUERIER_DBSTR3_H
 #define  __TERRALIB_INTERNAL_QUERIER_DBSTR3_H
 
 #include "TeQuerierDB.h"
 #include "TeTemporalSeries.h"
 
-//! A class that implement a strategy to build STOs (Spatial Temporal Objects) from a TerraLib database (Strategy 3)
-//! Strategy 3: simple chronon, with geometry (points or cells), theme with collection table, operator exist in the database  
-class TeQuerierDBStr3: public TeQuerierDB
+/*! \class TeQuerierDBStr3
+	\brief A class responsible for loading spatio-temporal elements from a TerraLib database.
+
+	This class implements a mechanism that is responsible for loading 
+	spatio-temporal elements from a TerraLib database, following a specific strategy (Strategy 3). 
+	Each spatio-temporal elements is represented through a TeSTInstance class. 
+	This class is internally used by the factory of queriers. It should NOT be used 
+	by anyone. This Strategy 2 works with simple chronon, with geometry (points or cells), 
+	theme with collection table and existence operator in the DBMS.  
+
+	\sa
+	TeQuerierDB TeQuerierParams TeSTInstance 
+*/
+
+class TL_DLL TeQuerierDBStr3: public TeQuerierDB
 {
-	
 private:
 	int				timeFramePortal_;	// the time frame appointed by the portal 
 	TeTSEntry		TSEntry_;
 	TeGeomRep		rep_;
+
+	string						fromClause_;   //store the sql clause(from and where) to return the number of instances
+	string						whereClause_;
 		
 	/* @name Internal functions to initialize portals */
 	//@{
@@ -45,12 +62,13 @@ private:
 	//! Internal function to fill STO
 	bool fillSTO(TeSTInstance& sto); 
 	
-public:
-	
+public:	
 	//! Constructor
-	TeQuerierDBStr3(TeQuerierParams& params): 
+	TeQuerierDBStr3(TeQuerierParams* params): 
 		TeQuerierDB(params), 
-		timeFramePortal_(-1)
+		timeFramePortal_(-1),
+		fromClause_(""),
+		whereClause_("")
 	{} 
 
 	//! Loads the instances
@@ -58,10 +76,18 @@ public:
 
 	//! Returns each loaded STO
 	bool fetchInstance(TeSTInstance&  sto); 
+
+	//! Returns the number of instances 
+	int  numElemInstances();
 };
 
-//! A class that define a factory to build a querier strategy from database(strategy 3)
-class TeQuerierDBStr3Factory : public TeQuerierImplFactory
+/*! \class TeQuerierDBStr3Factory
+	\brief A class that define a factory to build a querier strategy (strategy 3) from TerraLib database.
+
+	\sa
+	TeQuerierImplFactory TeQuerierDBStr3
+*/
+class TL_DLL TeQuerierDBStr3Factory : public TeQuerierImplFactory
 {
 public:
 
@@ -71,9 +97,16 @@ public:
 	//! Builds a database querier
 	virtual TeQuerierImpl* build (const TeQuerierParams& arg)
 	{  
-		TeQuerierParams tempArg = arg;
+		TeQuerierParams* tempArg = new TeQuerierParams();
+		*tempArg = arg;
 		return new TeQuerierDBStr3(tempArg); 
 	}
 };
 
+//! Creates a static factory to build TeQuerierDBStr3 
+namespace 
+{
+  static TeQuerierDBStr3Factory querierDBStr3("querierDBStr3");
+};
+
 #endif
diff --git a/src/terralib/kernel/TeQuerierImpl.cpp b/src/terralib/kernel/TeQuerierImpl.cpp
old mode 100644
new mode 100755
index 7641500..1894bda
--- a/src/terralib/kernel/TeQuerierImpl.cpp
+++ b/src/terralib/kernel/TeQuerierImpl.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -25,24 +25,72 @@ of this library and its documentation.
 #include "TeTemporalSeries.h"
 
 	
-TeQuerierImpl::TeQuerierImpl(TeQuerierParams& par): params_(par), filledSerie_(false)
+TeQuerierImpl::TeQuerierImpl(TeQuerierParams* par): params_(par), filledSerie_(false)
 {
+	TeAttributeList* att = new TeAttributeList();
+	attrList_ = TeSharedPtr<TeAttributeList>(att);
 	ts_ = 0;
-	if(par.chronon()!=TeNOCHRONON) //if there is a chronon, build ts
+	if(par->chronon()!=TeNOCHRONON) //if there is a chronon, build ts
 	{
-		TeGroupingAttr::iterator it = par.groupAttr().begin();
-		if(it!=par.groupAttr().end())
-			ts_ = new TeTemporalSeries(par.theme(), par.objId(), par.chronon(), it->first.name_, it->first.name_, it->second, it->second);
+		TeGroupingAttr::iterator it = par->groupAttr().begin();
+		if(it!=par->groupAttr().end())
+			ts_ = new TeTemporalSeries(par->theme(), par->objId(), par->chronon(), it->first.name_, it->first.name_, it->second, it->second);
 		else
-			ts_ = new TeTemporalSeries(par.chronon(), par.theme());
+			ts_ = new TeTemporalSeries(par->chronon(), par->theme());
 		ts_->buildFrameIntervals();
 	}
 }
 
+TeQuerierImpl::TeQuerierImpl( const TeQuerierImpl& other)
+{
+	if(ts_)
+		delete ts_;
+
+	if(params_)
+		delete params_;
+
+	ts_ = 0;
+	params_ = 0;
+	if(other.params_) 
+	{
+		params_ = new TeQuerierParams();
+		*params_ = *(other.params_);
+	}
+	filledSerie_ = other.filledSerie_;
+	attrList_ = other.attrList_;
+}
+
+TeQuerierImpl& 
+TeQuerierImpl::operator= (const TeQuerierImpl& other)
+{
+	if ( this != &other )
+	{
+		if(ts_)
+			delete ts_;
+
+		if(params_)
+			delete params_;
+
+		ts_ = 0;
+		params_ = 0;
+		if(other.params_) 
+		{
+			params_ = new TeQuerierParams();
+			*params_ = *(other.params_);
+		}
+		filledSerie_ = other.filledSerie_;
+		attrList_ = other.attrList_;
+	}
+	return *this;
+}
+
 TeQuerierImpl::~TeQuerierImpl() 
 {	
 	if(ts_)
 		delete (ts_);
+
+	if(params_)
+		delete params_;
 }
 
 bool 
@@ -93,3 +141,4 @@ TeQuerierImpl::getTSParams()
 { 
 	return (ts_->TSparams_); 
 }
+
diff --git a/src/terralib/kernel/TeQuerierImpl.h b/src/terralib/kernel/TeQuerierImpl.h
old mode 100644
new mode 100755
index 0a6f11d..adfb440
--- a/src/terralib/kernel/TeQuerierImpl.h
+++ b/src/terralib/kernel/TeQuerierImpl.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,85 +20,98 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
+/*! \file TeQuerierDB.h
+	\brief This file deals an abstract querier class to build STOs (Spatial Temporal Objects)
+*/
 #ifndef  __TERRALIB_INTERNAL_QUERIER_IMPL_H
 #define  __TERRALIB_INTERNAL_QUERIER_IMPL_H
 
 #include "TeQuerierParams.h"
 #include "TeFactory.h" 
+#include "TeSharedPtr.h" 
 
 class TeTSEntry;
 class TeTSParams;
 class TeSTInstance;
 class TeTemporalSeries;
+class TeMultiGeometry;
 
 //! An abstract querier class to build STOs (Spatial Temporal Objects)
-class TeQuerierImpl
+class TL_DLL TeQuerierImpl
 {
-	protected:
-		//! querier parameters that define the used querier strategy  
-		TeQuerierParams				params_;
-		TeTemporalSeries*			ts_;			//! temporal series
-		bool						filledSerie_;	//! this flag indicates if the temporal serie was filled 
-		TeAttributeList				attrList_;		//! list of the attributes of the querier 
+protected:
+	//! querier parameters that define the used querier strategy  
+	TeQuerierParams*				params_;
+	TeTemporalSeries*				ts_;			//! temporal series
+	bool							filledSerie_;	//! this flag indicates if the temporal serie was filled 
+	TeSharedPtr<TeAttributeList>	attrList_;		//! list of the attributes of the querier 
 		
-	public:
+public:
+	//! Constructor
+	TeQuerierImpl(TeQuerierParams* par); 
 
-		//! Constructor
-		TeQuerierImpl(TeQuerierParams& par); 
+	//! Copy constructor
+	TeQuerierImpl( const TeQuerierImpl& other);
 
-		//! Destructor
-		virtual ~TeQuerierImpl(); 
+	//! Operator =
+	TeQuerierImpl& operator= (const TeQuerierImpl& other);
 
-		//! Returns the object identifier
-		string objectId() { return params_.objId();}
+	//! Destructor
+	virtual ~TeQuerierImpl(); 
 
-		//! Returns the theme pointer
-		TeTheme* theme() { return params_.theme();} 
+	//! Returns the object identifier
+	string objectId() { return params_->objId();}
 
-		//! Loads the STOs
-		bool loadTimeFrameInstances(int frame=-1); 
+	//! Returns the theme pointer
+	TeTheme* theme() { return params_->theme();} 
 
-		//! Gets each temporal serie entry, for each time frame
-		bool getTSEntry(TeTSEntry& tsEntry, int frame);
-		
-		//! Gets the number of generated time frames 
-		int getNumTimeFrames(); 
+	//! Loads the STOs
+	bool loadTimeFrameInstances(int frame=-1); 
 
-		//! Gets the full temporal serie
-		bool getTS(TeTemporalSeries& ts);
+	//! Gets each temporal serie entry, for each time frame
+	bool getTSEntry(TeTSEntry& tsEntry, int frame);
+	
+	//! Gets the number of generated time frames 
+	int getNumTimeFrames(); 
 
-		//! Returns the temporal serie params
-		TeTSParams& getTSParams();
+	//! Gets the full temporal serie
+	bool getTS(TeTemporalSeries& ts);
 
-		//! Gets the attribute list from querier
-		TeAttributeList getAttrList() { return attrList_; }
+	//! Returns the temporal serie params
+	TeTSParams& getTSParams();
 
-		//! Returns a default object
-		static TeQuerierImpl* DefaultObject(const TeQuerierParams& /*params*/)  { return 0; }
+	//! Gets the attribute list from querier
+	TeAttributeList getAttrList() { return (*attrList_); }
 
-		//! Returns the querier parameters
-		TeQuerierParams& params() { return params_; }
-		
-		//! Loads the STOs
-		virtual bool loadInstances(TeTSEntry* ent=0) = 0; 
-		
-		//! Returns each loaded STO
-		virtual bool fetchInstance(TeSTInstance& stoi)= 0;  
+	//! Returns a default object
+	static TeQuerierImpl* DefaultObject(const TeQuerierParams& /*params*/)  { return 0; }
 
-		//! Returns the number of instances to each time frame
-		virtual int numElemInstances() { return 0;}
+	//! Returns the querier parameters
+	TeQuerierParams* params() { return params_; }
+	
+	//! Loads the STOs
+	virtual bool loadInstances(TeTSEntry* ent=0) = 0; 
+	
+	//! Returns each loaded STO
+	virtual bool fetchInstance(TeSTInstance& stoi)= 0;  
 
-		//! Empties querier instances
-		virtual void clear() { return; }
+	//! Loads all geometries of the index-th geometry representation  
+	virtual bool loadGeometries(TeMultiGeometry& geometries, unsigned int& index) = 0; 
+
+	//! Loads all geometries 
+	virtual bool loadGeometries(TeMultiGeometry& geometries) = 0;
+
+	//! Returns the number of instances to each time frame
+	virtual int numElemInstances() { return 0;}
+
+	//! Empties querier instances
+	virtual void clear() { return; }
 };
 
 //! A class that define a factory to build querier strategies 
-class TeQuerierImplFactory : public TeFactory<TeQuerierImpl, TeQuerierParams>
+class TL_DLL TeQuerierImplFactory : public TeFactory<TeQuerierImpl, TeQuerierParams>
 {
-
 public:
-
 	//! Builds an appropriate decoder from a identifier
 	TeQuerierImplFactory(const string& name) : TeFactory<TeQuerierImpl, TeQuerierParams>(name) { }
 
diff --git a/src/terralib/kernel/TeQuerierParams.cpp b/src/terralib/kernel/TeQuerierParams.cpp
old mode 100644
new mode 100755
index e4c039f..2cd2587
--- a/src/terralib/kernel/TeQuerierParams.cpp
+++ b/src/terralib/kernel/TeQuerierParams.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -62,7 +62,7 @@ TeQuerierParams::TeQuerierParams(const TeQuerierParams& rhs)
 	hasSpatialRes_ = rhs.hasSpatialRes_; 
 	boxRest_ = rhs.boxRest_;	
 	geomRest_ = rhs.geomRest_;
-	geomRepRest_ = rhs.geomRepRest_;	
+	geomRepRest_ = rhs.geomRepRest_;
 }
 
 
@@ -130,6 +130,8 @@ TeQuerierParams::setParams(TeTheme* theme, TeChronon chr)
 	strategy_ = "querierDBStr1"; 
 
 	bool geomRep = (theme_->layer()->hasGeometry (TeCELLS) || theme_->layer()->hasGeometry (TePOINTS));
+	int numRepres = theme_->layer()->vectRepres().size();
+	
 	bool groupAttr = !(groupingAttr_.empty());
 	bool hasOneTable = true;
 
@@ -140,7 +142,7 @@ TeQuerierParams::setParams(TeTheme* theme, TeChronon chr)
 		while(it!=groupingAttr_.end())
 		{
 			string tableName;
-			size_t pos = (it->first.name_).find(".", string::npos,1);
+			size_t pos = (it->first.name_).find(".", 0, 1);
 			if (pos != string::npos)
 				tableName = (it->first.name_).substr(0,pos);
 
@@ -170,7 +172,7 @@ TeQuerierParams::setParams(TeTheme* theme, TeChronon chr)
 
 	if( groupAttr && hasOneTable && (!loadGeom()))
 		strategy_ = "querierDBStr2";
-	else if( groupAttr && hasOneTable && loadGeom() && geomRep)
+	else if( groupAttr && hasOneTable && loadGeom() && geomRep && (numRepres==1))
 		strategy_ = "querierDBStr3";
 
 	return;
@@ -250,3 +252,35 @@ TeQuerierParams::setSpatialRest(TeGeometry* geom, int relation, TeGeomRep rep)
 	
 	boxRest_ = TeBox();
 }
+
+TeBox& 
+TeQuerierParams::box()
+{
+	return box_; 
+}
+
+void
+TeQuerierParams::clear()
+{
+	loadAttrNames_.clear();			
+	loadAttrNamesSeted_.clear();	
+	groupingAttr_.clear();
+	if(themeFlag_)
+		delete theme_;
+	themeFlag_=false;
+	theme_ = 0;
+	layer_ = 0;				
+	fileName_ = "";
+	box_ = TeBox();
+	chr_ = TeNOCHRONON; 
+	objId_ = "";
+	strategy_="";
+	selectedObjs_=TeAll;  
+	spatialRelation_=TeUNDEFINEDREL;	
+	hasSpatialRes_ = false;		
+	boxRest_=TeBox();
+	geomRest_=0;	
+	geomRepRest_=TeGEOMETRYNONE;	
+}
+
+
diff --git a/src/terralib/kernel/TeQuerierParams.h b/src/terralib/kernel/TeQuerierParams.h
old mode 100644
new mode 100755
index 323d0b7..22dfe1f
--- a/src/terralib/kernel/TeQuerierParams.h
+++ b/src/terralib/kernel/TeQuerierParams.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,54 +20,58 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
+/*! \file TeQuerierParams.h
+	\brief This file contains a class responsible for defining the querier mechanism behavior. 
+*/
 
 #ifndef  __TERRALIB_INTERNAL_QUERIER_PARAMS_H
 #define  __TERRALIB_INTERNAL_QUERIER_PARAMS_H
 
 #include "TeTheme.h"
 
+/*! \class TeQuerierParams
+	\brief A class responsible for defining the querier mechanism behavior.
 
-//! class to handle the parameters that define a querier 
-class TeQuerierParams
-{
+	This class contains a set of attributes that define the querier behavior, 
+	for example, which instances the querier will load or if the querier will load
+	the geometries and which attributes.
+	It is used in the querier constructor. 
 
-private:
+	\sa
+	TeQuerier
+*/
+class TL_DLL TeQuerierParams
+{
+protected:	
+	bool					loadGeometries_;		//!< if the querier must load the geometries of each instance
+	bool					loadAllAttributes_;		//!< if the querier must load all attributes of each instance
+	vector<string>			loadAttrNames_;			//!< which attributes the querier must load
+	vector<string>			loadAttrNamesSeted_;	//!< internal structure
+	TeGroupingAttr			groupingAttr_;			//!< which attributes will be load and which aggregate function will be used in each attribute 
 	
-	/* @name Params used to fill STOs */
-	//@{
-	bool					loadGeometries_;  
-	bool					loadAllAttributes_;
-	vector<string>			loadAttrNames_;
-	vector<string>			loadAttrNamesSeted_;
-	TeGroupingAttr			groupingAttr_;
-	//@}
-
-	bool					themeFlag_;	//! if the theme is a temporary theme
-	TeTheme*				theme_;		//! pointer to a theme
-	TeLayer*				layer_;		//! pointer to a layer
-	string					fileName_;	//! file name (.shp, etc)
+	bool					themeFlag_;		//!< if the theme is temporary
+	TeTheme*				theme_;			//!< pointer to a source theme 
+	TeLayer*				layer_;			//!< pointer to a source layer 
 	
-	TeChronon				chr_;		//! chronon used to generate the slides 
-	string					objId_;		//! object identifier
+	string					fileName_;		//!< source file name (.shp, etc)
+	TeBox					box_;			//!< minimal bounding box that contains all geometries returned by this querier 
+
+	TeChronon				chr_;		//!< chronon used to generate time frames 
+	string					objId_;		//!< object identification
 	
 	//TeStatisticType		tsOper_;		//operator used in the construction of temporal series
 	
-	string					strategy_;		//! strategy name
+	string					strategy_;		//! querier strategy name
 
-	/* @name Restrictions */
-	//@{
-	TeSelectedObjects		selectedObjs_;  
+	TeSelectedObjects		selectedObjs_;  //!< if the querier must load only the instances pointed or queried
 	
-	int						spatialRelation_; 
-	bool					hasSpatialRes_;
-	TeBox					boxRest_;		//box which defines the spatial restriction 
-	TeGeometry*				geomRest_;		//geometry which defines the spatial restriction 
-	TeGeomRep				geomRepRest_;	//geometry representation of the theme which will be 
-											//considered in the spatial restriction  
-	//@}
+	int						spatialRelation_;	//!< spatial relation used by spatial restriction
+	bool					hasSpatialRes_;		//!< Verifies if there is a spatial restriction defined 
+	TeBox					boxRest_;			//!< A bounding box used by spatial restriction 
+	TeGeometry*				geomRest_;			//!< A geometry pointer used by spatial restriction 
+	TeGeomRep				geomRepRest_;		//!< geometric representation of the theme that will be considered by spatial restriction  
 
 public:
-
 	//! Constructor
 	TeQuerierParams(bool loadGeom = false, bool loadAllAttr = true): 
 			loadGeometries_(loadGeom),
@@ -76,6 +80,7 @@ public:
 			theme_ (0),
 			layer_ (0),
 			fileName_(""),
+			box_(TeBox()),
 			chr_ (TeNOCHRONON),
 			objId_(""),
 			selectedObjs_(TeAll),
@@ -92,6 +97,7 @@ public:
 			theme_ (0),
 			layer_ (0),
 			fileName_(""),
+			box_(TeBox()),
 			chr_ (TeNOCHRONON),
 			objId_(""),
 			selectedObjs_(TeAll),
@@ -112,6 +118,7 @@ public:
 			theme_ (0),
 			layer_ (0),
 			fileName_(""),
+			box_(TeBox()),
 			chr_ (TeNOCHRONON),
 			objId_(""),
 			selectedObjs_(TeAll),
@@ -124,85 +131,103 @@ public:
 			}
 	
 	//! Destructor
-	~TeQuerierParams();
+	virtual ~TeQuerierParams();
 
 	//! Copy Constructor
 	TeQuerierParams(const TeQuerierParams& qp);
 
-	TeQuerierParams& operator=(const TeQuerierParams& rhs);
-
-	/* @name Sets params */
-	// @{
-	void setParams(TeLayer* layer);
+	//! Assignment operator
+	virtual TeQuerierParams& operator=(const TeQuerierParams& rhs);
 
-	void setParams(TeTheme* theme, TeChronon chr=TeNOCHRONON); 
+	//! Sets the layer that will be used as source of instances 
+	virtual void setParams(TeLayer* layer);
 
-	void setParams(TeTheme* theme, const string& objId, TeChronon chr=TeNOCHRONON);
+	//! Sets the theme that will be used as source of instances and a chronon that defines the time frames
+	virtual void setParams(TeTheme* theme, TeChronon chr=TeNOCHRONON); 
 
-	void setParams(const string& fileName, TeChronon chr=TeNOCHRONON);
-	// @}
+	//! Sets the theme that will be used as source of instances of a specific object and a chronon that defines the time frames
+	virtual void setParams(TeTheme* theme, const string& objId, TeChronon chr=TeNOCHRONON);
 
-	//! Sets the params to fill the STO
-	void setFillParams(bool loadGeom, bool loadAllAttr, vector<string> loadAttr = vector<string>());
+	//! Sets the file name that will be used as source of instances and a chronon that defines the time frames
+	virtual void setParams(const string& fileName, TeChronon chr=TeNOCHRONON);
+	
+	//! Sets the parameters used to fill the instances 
+	virtual void setFillParams(bool loadGeom, bool loadAllAttr, vector<string> loadAttr = vector<string>());
 
-	//! Sets the params to fill the STO
-	void setFillParams(bool loadGeom, TeGroupingAttr attrG);
+	//! Sets the parameters used to fill the instances
+	virtual void setFillParams(bool loadGeom, TeGroupingAttr attrG);
 	
-	//! Set the spatial restriction to be a spatial relation with a box
-	void setSpatialRest(TeBox& box, int relation = TeWITHIN, TeGeomRep rep = TeGEOMETRYNONE); 
-	//! Set the spatial restriction to be a spatial relation with a geometry
-	void setSpatialRest(TeGeometry* geom, int relation = TeWITHIN, TeGeomRep rep = TeGEOMETRYNONE); 
+	//! Sets a spatial restriction (a spatial relation and a bounding box) 
+	virtual void setSpatialRest(TeBox& box, int relation = TeWITHIN, TeGeomRep rep = TeGEOMETRYNONE); 
 
-	//! Set selected objects
-	void setSelecetObjs(TeSelectedObjects so) { selectedObjs_ = so; }
+	//! Sets a spatial restriction (a spatial relation and a geometry) 
+	virtual void setSpatialRest(TeGeometry* geom, int relation = TeWITHIN, TeGeomRep rep = TeGEOMETRYNONE); 
 
-	//! Sets the attributes that will be loaded
-	void setLoadAttrs(const vector<string>& vec) { loadAttrNames_ = vec; }
+	//! Sets the selected objects
+	virtual void setSelecetObjs(TeSelectedObjects so) { selectedObjs_ = so; }
 
-	//! Returns the identifier of the strategy associated to the querier
-	string decName() { return strategy_; }
+	//! Sets which attributes must be loaded
+	virtual void setLoadAttrs(const vector<string>& vec) { loadAttrNames_ = vec; }
 
-	//! Returns the theme
-	TeTheme* theme() { return theme_; }
+	//! Returns the identification of the strategy associated to the querier
+	virtual string decName() const { return strategy_; }
 
-	//! Returns the layer
-	TeLayer* layer() { return layer_; }
+	//! Returns the source theme
+	virtual TeTheme* theme() { return theme_; }
 
-	//! Returns the file name
-	string fileName() { return fileName_; }
-	
-	//! Returns the chronon
-	TeChronon chronon()	{ return chr_; }
+	//! Returns the source layer
+	virtual TeLayer* layer() { return layer_; }
+
+	//! Returns the source file name
+	virtual string fileName() { return fileName_; }
+
+	//! Returns the minimal bounding box
+	virtual TeBox& box();
+
+	//! Sets the minimal bounding box 
+	virtual void box(TeBox& b) { box_ = b; }
+
+	//! Returns the chronon used to create the time frames
+	virtual TeChronon chronon()	{ return chr_; }
 	
-	//! Returns the object identifier
-	string objId() { return objId_; }
+	//! Returns the object identification
+	virtual string objId() { return objId_; }
 	
-	//! Returns the attributes that will be grouped
-	TeGroupingAttr& groupAttr() { return groupingAttr_;}
+	//! Returns which attributes will be loaded and how they will be grouped
+	virtual TeGroupingAttr& groupAttr() { return groupingAttr_;}
 
-	//! Returns if it loads geometries
-	bool loadGeom ()  { return	loadGeometries_; }
+	//! Returns if the querier must load the geometries
+	virtual bool loadGeom ()  { return	loadGeometries_; }
 	
-	//! Returns if it loads all attributes 
-	bool loadAllAttr() { return loadAllAttributes_;}
+	//! Returns if the querier must load all attributes
+	virtual bool loadAllAttr() { return loadAllAttributes_;}
 
-	//! Returns the attributes that will be loaded
-	vector<string>& loadAttrs() { return loadAttrNames_;}
+	//! Returns the subset of attributes that will be loaded
+	virtual vector<string>& loadAttrs() { return loadAttrNames_;}
 
-	//! Returns the original attributes that will be loaded
-	vector<string>& loadSetedAttrs() { return loadAttrNamesSeted_;}
+	//! Internal function. Returns the subset of attributes that will be loaded
+	virtual vector<string>& loadSetedAttrs() { return loadAttrNamesSeted_;}
 
-	TeSelectedObjects selectedObjs() { return selectedObjs_; }
+	//! Returns which objects must be loaded
+	virtual TeSelectedObjects selectedObjs() { return selectedObjs_; }
 	
-	int spatialRelation() { return spatialRelation_; }
+	//! Returns the spatial relation 
+	virtual int spatialRelation() { return spatialRelation_; }
 
-	bool hasSpatialRes() { return hasSpatialRes_;}
+	//! Verifies if there is a spatial restriction defined
+	virtual bool hasSpatialRes() { return hasSpatialRes_;}
 	
-	TeBox boxRest() { return boxRest_; } 
+	//! Returns the bounding box associated to the spatial restriction
+	virtual TeBox boxRest() { return boxRest_; } 
+
+	//! Returns the geometry associated to the spatial restriction
+	virtual TeGeometry* geomRest() { return geomRest_; }
 
-	TeGeometry* geomRest() { return geomRest_; }
+	//! Returns which theme geometric representation must be considered by the spatial restriction  
+	virtual TeGeomRep  geomRepRest() { return geomRepRest_; }
 
-	TeGeomRep  geomRepRest() { return geomRepRest_; }
+	//! Clear querier params
+	virtual void clear();
 };
 
 #endif
diff --git a/src/terralib/kernel/TeQuerierSHP.h b/src/terralib/kernel/TeQuerierSHP.h
deleted file mode 100644
index c5d7eba..0000000
--- a/src/terralib/kernel/TeQuerierSHP.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/************************************************************************************
-TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The library provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use
-of this library and its documentation.
-*************************************************************************************/
-
-#ifndef  __TERRALIB_INTERNAL_QUERIER_SHP_H
-#define  __TERRALIB_INTERNAL_QUERIER_SHP_H
-
-#include "TeQuerierImpl.h"
-
-
-//! A class to build STOs (Spatial Temporal Objects) from a shape file 
-class TeQuerierSHP : public TeQuerierImpl
-{
-	public:
-
-		//! Constructor
-		TeQuerierSHP(TeQuerierParams& params): TeQuerierImpl(params)
-		{ }
-
-		
-		//! Returns the file name 
-		string fileName () { return params_.fileName(); }
-
-		bool loadInstances(TeTSEntry* /* ent */ = 0) { return false; }
-		
-		bool loadStatistics(TeTSEntry* /* ent */ = 0) { return false; } 
-
-		bool fetchInstance(TeSTInstance& /* stoi */) { return false; } 
-
-		bool getBasicStatistics(TeStatisticValMap& /* stats */, TeTSEntry* /* ent */ = 0) { return false; }
-};
-
-//! A class that define a factory to build a querier strategy from shape file
-class TeQuerierSHPFactory : public TeQuerierImplFactory
-{
-public:
-
-	//! Constructor
-	TeQuerierSHPFactory(const string& name) : TeQuerierImplFactory(name) {}
-
-	//! Builds a shapefile querier
-	virtual TeQuerierImpl* build (const TeQuerierParams& arg)
-	{  
-		TeQuerierParams tempArg = arg;
-		return new TeQuerierSHP(tempArg); 
-	}
-};
-
-#endif
-
-
diff --git a/src/terralib/kernel/TeRTree.h b/src/terralib/kernel/TeRTree.h
new file mode 100755
index 0000000..9868fae
--- /dev/null
+++ b/src/terralib/kernel/TeRTree.h
@@ -0,0 +1,980 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file   TeRTree.h
+    \brief  This file contains an implementation of rtree data structures in main memory for two dimensions.
+	\note   These data structures and algorithms MUST BE USED ONLY BY TerraLib kernel and should NOT be used by anyone because
+	        THIS IS FOR INTERNAL USE ONLY.
+    \author Gilberto Ribeiro de Queiroz <gribeiro at dpi.inpe.br>
+*/
+
+#ifndef  __TERRALIB_INTERNAL_RTREE_H
+#define  __TERRALIB_INTERNAL_RTREE_H
+
+#include "TeGeometry.h"
+#include "TeGeometryAlgorithms.h"
+
+/*! \brief This namespace contain the definitions of various Spatial Data Structures,
+           like K-d-Tree and R-Tree, ONLY FOR INTERNAL USE (must NOT be used by anyone).
+*/
+namespace TeSAM
+{
+//! Class that represents a node of a TeRTree
+/*!
+	If level is 0 so this is a leaf node otherwise this is a internal node.
+
+	WARNING:
+
+	1. A branch is a union, so be carefull with the types used here!
+	
+ */
+template<class DATATYPE, int MAXNODES = 8, int MINNODES = MAXNODES / 2>
+class TeRTreeNode
+{
+	public:
+
+		//! Struct that represents a node-branch of a TeRTree
+		/*!
+			May be data or may be another subtree, if parents level is 0 so this is a data in a leaf node.
+
+		*/
+		struct TeRTreeBranch
+		{
+			TeBox rect_;	//!<	Bounding box for branch or object (if this is a leaf).
+
+			union
+			{
+				TeRTreeNode* child_;		//!< Child node pointer.
+				DATATYPE data_;				//!< Data Id or Ptr.
+			};
+		};
+
+	public:
+
+		int count_;			//!< Count.
+
+		int level_;			//!< Leaf is zero, others positive.
+
+		TeRTreeBranch branch_[MAXNODES];	//!< Branch.
+
+		//! Constructor.
+
+
+		TeRTreeNode()
+			: count_(0), level_(-1)
+		{
+		}
+
+		//! Returns true if this is a internal node.
+        bool isInternalNode() const
+		{
+			return (level_ > 0);
+		}
+
+		//! Returns true if this is a leaf node.
+        bool isLeaf() const
+		{
+			return (level_ == 0);
+		}
+
+		//! This method is used by split, when a node is re-filled.
+		void init()
+		{
+			count_ = 0;
+
+			level_ = -1;
+		}
+
+	private:
+
+		//! No copy allowed
+		TeRTreeNode(const TeRTreeNode& other);
+
+		//! No copy allowed
+		TeRTreeNode& operator=(const TeRTreeNode& other);
+
+};	// end of class TeRTreeNode
+
+//! A class that represents a two dimensional R-Tree
+/*!	
+	This implementation is based on:
+	Antonin Guttman. R-Trees: A Dynamic Index Structure for Spatial Searching. ACM SIGMOD: International Conference on Management of Data, 1984, pp. 47-57.	
+
+	and in his original source code. <BR>
+
+	WARNING: <BR>
+
+	1. Don't use this class! It is for TerraLib internal use. <BR>
+
+	2. Only the basic methods for inserting and searching were implemented. <BR>
+
+	3. In future we will implement: <BR>
+		- the delete method. <BR>
+		- the near query <BR>
+		- point query <BR>
+ */
+template<class DATATYPE, int MAXNODES = 8, int MINNODES = MAXNODES / 2>
+class TeRTree
+{
+	public:
+
+		//! Export this typename.
+		typedef TeRTreeNode<DATATYPE, MAXNODES, MINNODES> TeRTreeNodeType;
+
+		//! Export this typename.
+		typedef typename TeRTreeNodeType::TeRTreeBranch TeRTreeBranch;
+
+	protected:
+
+		//! Structure of auxiliary variables for finding a split partition.
+		struct TePartitionVars
+		{
+			int partition_[MAXNODES + 1];	//!< Auxiliary partition vector.
+			int taken_[MAXNODES + 1];		//!< Flag to indicate that entry is ok.
+			int count_[2];					//!< Number of entries in each new page.
+			TeBox cover_[2];				//!< Auxiliary box of each new page.
+			double area_[2];				//!< Auxiliary area of each new page.
+
+			TeRTreeBranch branchBuf_[MAXNODES + 1];	//!< Auxiliary branch buffer.
+			TeBox coverSplit_;						//!< Auxiliary box covering branchBuf.
+
+			//! Initializes partition vars.
+			void init()
+			{
+				count_[0] = 0;
+				count_[1] = 0;
+
+                for(int i = 0; i <= MAXNODES; ++i)
+                {
+                    taken_[i] = 0;
+                    partition_[i] = -1;
+                }
+			}
+		};		
+		
+		TeRTreeNodeType* root_;		//!< Pointer to root node
+
+		TeBox mbr_;					//!< Bounding box of the tree
+        		
+		mutable unsigned int size_;			//!< The size of R-Tree (number of nodes)		
+
+	public:
+
+		//! Construtor
+		TeRTree(const TeBox& mbr)
+			: root_(0), mbr_(mbr), size_(0)
+		{
+			++size_;
+			root_ = new TeRTreeNodeType();
+            root_->level_ = 0;
+		}
+
+		//! Destructor
+		~TeRTree()
+		{
+			clear();
+
+			if(root_)
+				delete root_;
+		}
+
+		//! The number of elements of the tree
+		const unsigned int& size(void) const
+		{
+			return size_;
+		}
+		
+		//! Return true if the tree is empty
+		bool isEmpty(void) const
+		{
+			return (root_->count_ == 0);
+		}
+
+		//! Clear all tree nodes
+		void clear(void)
+		{
+			if(root_)
+			{
+				erase(root_);
+				root_ = 0;
+				
+				size_ = 1;
+				root_ = new TeRTreeNodeType();
+				root_->level_ = 0;
+			}
+		}
+
+		//! Inserts item into the tree
+		void insert(const TeBox& rect, const DATATYPE& data)
+		{
+			insert(rect, data, &root_, 0);
+		}
+
+		//! Removes item from tree
+		bool remove(const TeBox& rect, const DATATYPE& data)
+		{
+			return remove(rect, data, &root_);
+		}
+
+		//! Range search query
+		int search(const TeBox& rect, vector<DATATYPE>& report) const
+		{
+			int foundObjs = 0;
+
+			if(root_)
+				search(rect, root_, report, foundObjs);
+
+			return foundObjs;
+		}
+
+		//! Sets the bounding box of all elements in the tree
+		void setBox(const TeBox& mbr)
+		{
+			mbr_ = mbr;
+		}
+
+		//! Gets the bounding box of all elements in the tree
+		const TeBox& getBox(void) const
+		{
+			return mbr_;
+		}
+
+	protected:
+
+		//! Insert a data rectangle into an index structure.
+		/*!
+			Insert provides for splitting the root. <BR>
+			Returns true if root was split, false if it was not. <BR>
+			The level argument specifies the number of steps up from the leaf
+			level to insert; e.g. a data rectangle goes in at level = 0. <BR>
+			chooseLeaf does the recursion.
+		*/
+		inline bool insert(const TeBox& rect, const DATATYPE& data, TeRTreeNodeType** root, int level);
+
+		//! Delete a data rectangle from an index structure.		   
+		/*!
+			Pass in a pointer to a Rect, the tid of the record, ptr to ptr to root node. <BR>
+			Returns 1 if record not found, 0 if success. <BR>
+			DeleteRect provides for eliminating the root.
+		*/
+		inline bool remove(const TeBox& rect, const DATATYPE& data, TeRTreeNodeType** root);
+
+		//! Delete a rectangle from non-root part of an index structure.		   
+		/*!
+			Called by DeleteRect. <BR>
+			Descends tree recursively,
+			merges branches on the way back up.
+		*/
+		inline bool remove2(const TeBox& rect, const DATATYPE& data, TeRTreeNodeType* n, vector<TeRTreeNodeType*>& ee);
+
+		//! Disconnect a dependent node.
+		inline void disconBranch(TeRTreeNodeType* n, int i);
+
+		//! Inserts a new data rectangle into the index structure.		   
+		/*!
+			Recursively descends tree, propagates splits back up.
+			Returns false if node was not split.  Old node updated.
+			If node was split, returns true and sets the pointer pointed to by
+			new to point to the new node.  Old node updated to become one of two.
+			The level argument specifies the number of steps up from the leaf
+			level to insert; e.g. a data rectangle goes in at level = 0.
+		*/
+		inline bool chooseLeaf(const TeBox& rect, const DATATYPE& data, TeRTreeNodeType* node, TeRTreeNodeType** newNode, int level);
+
+		//! Recursive range query
+		inline void search(const TeBox& rect, TeRTreeNodeType* node, vector<DATATYPE>& report, int& foundObjs) const;
+
+		//! Find the smallest rectangle that includes all rectangles in branches of a node
+		inline TeBox nodeCover(TeRTreeNodeType* n) const;
+
+		//! Combine two rectangles into larger one containing both
+		inline TeBox combineRect(const TeBox& rectA, const TeBox& rectB) const;
+
+		//! Add a branch to a node.
+		/*!
+			Split the node if necessary. <BR>
+			Returns false if node not split. <BR>
+			Old node updated. <BR>
+			Returns true if node split, sets *new to address of new node. <BR>
+			Old node updated, becomes one of two.
+		*/
+		inline bool addBranch(TeRTreeBranch* branch, TeRTreeNodeType* node, TeRTreeNodeType** newNode) const;
+
+		//! Pick a branch.
+		/*!
+			Pick the one that will need the smallest increase
+			in area to accomodate the new rectangle.  This will result in the
+			least total area for the covering rectangles in the current node.
+			In case of a tie, pick the one which was smaller before, to get
+			the best resolution when searching.
+		*/
+		inline int pickBranch(const TeBox& rect, TeRTreeNodeType* node) const;
+
+		//! Split a node.
+		/*!
+			Divides the nodes branches and the extra one between two nodes. <BR>
+			Old node is one of the new ones, and one really new one is created.
+		*/
+		inline void splitNode(TeRTreeNodeType* node, TeRTreeBranch* branch, TeRTreeNodeType** newNode) const;
+
+		//! Load branch buffer with branches from full node plus the extra branch.
+		inline void getBranches(TeRTreeNodeType* n, TeRTreeBranch* b, TePartitionVars& p) const;
+
+		//! Method 0 for finding a partition.
+		/*!
+		   First find two seeds, one for each group, well separated.
+           Then put other rects in whichever group will be smallest after addition.
+	    */
+		inline void methodZero(TePartitionVars& p) const;
+
+		//! Pick two rects from set to be the first elements of the two groups.
+		/*!	
+		   Pick the two that are separated most along any dimension, or overlap least.
+           Distance for separation or overlap is measured modulo the width of the
+           space covered by the entire set along that dimension.
+	     */
+		inline void pickSeeds(TePartitionVars& p) const;
+
+		//! Put a branch in one of the groups
+		inline void classify(int i, int group, TePartitionVars& p) const;
+
+		//! Put each rect that is not already in a group into a group.
+		/*!	
+           Process one rect at a time, using the following hierarchy of criteria.
+           In case of a tie, go to the next test.<BR>
+           1) If one group already has the max number of elements that will allow
+              the minimum fill for the other group, put r in the other.<BR>
+           2) Put r in the group whose cover will expand less.  This automatically
+		      takes care of the case where one group cover contains r.<BR>
+		   3) Put r in the group whose cover will be smaller.  This takes care of the
+              case where r is contained in both covers.<BR>
+           4) Put r in the group with fewer elements.<BR>
+           5) Put in group 1 (arbitrary).<BR>
+
+           Also update the covers for both groups.
+	     */
+		inline void pigeonhole(TePartitionVars& p) const;
+
+		//! Copy branches from the buffer into two nodes according to the partition.
+		inline void loadNodes(TeRTreeNodeType* n, TeRTreeNodeType* q, TePartitionVars& p) const;
+
+		//! Calculate rect area
+		double rectArea(const TeBox& b) const
+		{
+			return b.width() * b.height();
+		}
+
+		//! Erases a node from the tree and all nodes below it.
+		void erase(TeRTreeNodeType* node)
+		{
+			if(node->isLeaf())
+			{
+				delete node;
+
+				return;
+			}
+
+			for(int i = 0u; i < node->count_; ++i)
+				erase(node->branch_[i].child_);
+	
+			delete node;
+
+			return;
+		}
+
+		//! Only to determine if the two box intersects withou using an epsilon
+		bool rtreeBoxIntersects(const TeBox& bx1, const TeBox& bx2) const
+		{
+			return ::TeIntersects(bx1, bx2);
+		}		
+
+	private:
+
+		//! No copy allowed
+		TeRTree(const TeRTree& other);
+
+		//! No copy allowed
+		TeRTree& operator=(const TeRTree& other);
+
+};	// end of class TeRTree
+
+
+//------------------- Implementation of the templates classes
+
+template<class DATATYPE, int MAXNODES, int MINNODES>
+bool TeRTree<DATATYPE, MAXNODES, MINNODES>::insert(const TeBox& rect, const DATATYPE& data, TeRTreeNodeType** root, int level)
+{
+// this is the algorithm insert
+    TeRTreeNodeType* newRoot;
+	TeRTreeNodeType* newNode;
+    TeRTreeBranch    branch;
+
+    if(chooseLeaf(rect, data, *root, &newNode, level))  // I1
+    {
+// I4
+// if root was split
+// grow a new root, make tree taller
+		++size_;
+        newRoot = new TeRTreeNodeType();  
+
+        newRoot->level_ = (*root)->level_ + 1;
+
+// first half node
+        branch.rect_  = nodeCover(*root);
+        branch.child_ = *root;
+        addBranch(&branch, newRoot, 0);
+
+// second half node
+        branch.rect_ = nodeCover(newNode);
+        branch.child_ = newNode;        
+		addBranch(&branch, newRoot, 0);
+
+        *root = newRoot;
+
+        return true;
+    }
+
+    return false;
+}
+
+template<class DATATYPE, int MAXNODES, int MINNODES>
+bool TeRTree<DATATYPE, MAXNODES, MINNODES>::remove(const TeBox& rect, const DATATYPE& data, TeRTreeNodeType** root)
+{
+	int i;
+	TeRTreeNodeType *t;
+	vector<TeRTreeNodeType*> reInsertList;
+	
+	if(remove2(rect, data, *root, reInsertList))
+	{
+// if we are here, so we have found and deleted a data item
+
+// reinsert any branches from eliminated nodes
+		while(!reInsertList.empty())
+		{
+			t = reInsertList[0];
+			for(i = 0; i < t->count_; ++i)
+				insert(t->branch_[i].rect_, t->branch_[i].data_, root, t->level_);
+	
+// erase node from list
+			reInsertList.erase(reInsertList.begin());
+
+// remove node card from memory
+			delete t;
+			--size_;
+		}
+		
+		/* check for redundant root (not leaf, 1 child) and eliminate */
+		if(((*root)->count_ == 1) && ((*root)->isInternalNode()))
+		{
+			t = (*root)->branch_[0].child_;
+
+			delete (*root);
+			--size_;
+
+			*root = t;
+		}
+		
+		return true;
+	}
+	
+	return false;
+}
+
+template<class DATATYPE, int MAXNODES, int MINNODES>
+bool TeRTree<DATATYPE, MAXNODES, MINNODES>::remove2(const TeBox& rect, const DATATYPE& data, TeRTreeNodeType* n, vector<TeRTreeNodeType*>& ee)
+{
+	int i;	
+
+	if(n->isInternalNode()) /* not a leaf node */
+	{
+		for(i = 0; i < n->count_; ++i)
+		{
+			if(rtreeBoxIntersects(rect, n->branch_[i].rect_))
+			{
+				if(remove2(rect, data, n->branch_[i].child_, ee))
+				{
+					if(n->branch_[i].child_->count_ >= MINNODES)
+						n->branch_[i].rect_ = nodeCover(n->branch_[i].child_);
+					else
+					{
+						/* not enough entries in child, eliminate child node */
+						ee.push_back(n->branch_[i].child_);	//reInsert(n->branch_[i].child_, ee);
+						disconBranch(n, i);
+					}
+
+					return true;	// found item
+				}
+			}
+		}
+
+		return false;	// din't find item
+	}
+	else  /* a leaf node */
+	{
+		for(i = 0; i < n->count_; ++i)
+		{
+			if(n->branch_[i].data_ == data)
+			{
+				disconBranch(n, i);
+				return true;	// found item
+			}
+		}
+
+		return false;	// didn't find item
+	}
+}
+
+/*template<class DATATYPE, int MAXNODES, int MINNODES> void TeRTree<DATATYPE, MAXNODES, MINNODES>::reInsert(TeRTreeNodeType* n, vector<TeRTreeNodeType*>& ee)
+{
+	ee.push_back(n);
+}*/
+
+template<class DATATYPE, int MAXNODES, int MINNODES>
+void TeRTree<DATATYPE, MAXNODES, MINNODES>::disconBranch(TeRTreeNodeType* n, int i)
+{
+// remove element copying the last element in array
+	n->branch_[i] = n->branch_[n->count_ - 1];
+
+	--(n->count_);
+}
+
+// CHOOSELEAF
+template<class DATATYPE, int MAXNODES, int MINNODES>
+bool TeRTree<DATATYPE, MAXNODES, MINNODES>::chooseLeaf(const TeBox& rect, const DATATYPE& data, TeRTreeNodeType* node, TeRTreeNodeType** newNode, int level)
+{
+	TeRTreeBranch    b;
+	TeRTreeNodeType* n2;	
+	
+	if(node->level_ > level)
+	{
+// Still above level for insertion, go down tree recursively
+		int i = pickBranch(rect, node);		// CL3
+
+		if(!chooseLeaf(rect, data, node->branch_[i].child_, &n2, level))
+		{
+// child was not split
+			node->branch_[i].rect_ = combineRect(rect, node->branch_[i].rect_);
+
+			return false;
+		}
+		else		
+		{
+// child was split
+			node->branch_[i].rect_ = nodeCover(node->branch_[i].child_);
+
+			b.child_ = n2;
+			b.rect_ = nodeCover(n2);
+
+			return addBranch(&b, node, newNode);
+		}
+	}
+	else if (node->level_ == level)
+	{
+// have reached level for insertion. Add rect, split if necessary
+
+		b.rect_ = rect;
+		//b.child_ = (TeRTreeNodeType*) data;
+		b.data_ = data;
+
+// child field of leaves contains tid of data record
+		return addBranch(&b, node, newNode);
+	}
+	else
+	{
+// Not supposed to happen
+		throw;
+		return false;
+	}
+}
+
+template<class DATATYPE, int MAXNODES, int MINNODES>
+void TeRTree<DATATYPE, MAXNODES, MINNODES>::search(const TeBox& rect, TeRTreeNodeType* node, vector<DATATYPE>& report, int& foundObjs) const
+{
+	int i;
+// S1
+    if(node->isInternalNode()) // This is an internal node in the tree
+	{
+        for(i = 0; i < node->count_; ++i)
+		{
+            if(rtreeBoxIntersects(rect, node->branch_[i].rect_))
+                search(rect, node->branch_[i].child_, report, foundObjs);
+		}
+	}
+// S2
+	else	// This is a leaf node
+	{
+        for(i = 0; i < node->count_; ++i)
+		{
+            if(rtreeBoxIntersects(rect, node->branch_[i].rect_))
+			{
+                DATATYPE& id = node->branch_[i].data_;
+
+				report.push_back(id);
+
+                ++foundObjs;
+			}
+		}
+	}
+
+	return;
+}
+
+template<class DATATYPE, int MAXNODES, int MINNODES>
+TeBox TeRTree<DATATYPE, MAXNODES, MINNODES>::nodeCover(TeRTreeNodeType* n) const
+{
+	bool flag = true;
+
+	TeBox r;
+	
+	for(int i = 0; i < n->count_; ++i)
+	{
+        if(flag)
+		{
+			r = n->branch_[i].rect_;
+			flag = false;
+		}
+		else
+			r = combineRect(r, n->branch_[i].rect_);
+	}
+
+	return r;
+}
+
+template<class DATATYPE, int MAXNODES, int MINNODES>
+TeBox TeRTree<DATATYPE, MAXNODES, MINNODES>::combineRect(const TeBox& rectA, const TeBox& rectB) const
+{
+    TeBox newRect;
+
+	newRect.x1_ = MIN(rectA.x1_, rectB.x1_);
+	newRect.y1_ = MIN(rectA.y1_, rectB.y1_);
+	newRect.x2_ = MAX(rectA.x2_, rectB.x2_);
+	newRect.y2_ = MAX(rectA.y2_, rectB.y2_);
+
+	return newRect;
+}
+
+template<class DATATYPE, int MAXNODES, int MINNODES>
+bool TeRTree<DATATYPE, MAXNODES, MINNODES>::addBranch(TeRTreeBranch* branch, TeRTreeNodeType* node, TeRTreeNodeType** newNode) const
+{
+    if(node->count_ < MAXNODES)		/* split won't be necessary */
+	{
+		node->branch_[node->count_] = *branch;
+
+		++(node->count_);
+
+		return false;
+	}
+	else
+	{
+        splitNode(node, branch, newNode);
+
+		return true;
+	}
+}
+
+template<class DATATYPE, int MAXNODES, int MINNODES>
+int TeRTree<DATATYPE, MAXNODES, MINNODES>::pickBranch(const TeBox& rect, TeRTreeNodeType* node) const
+{
+// CL3
+	bool flag = true;
+
+	double bestIncr = -1.0;
+
+	double bestArea = 0.;
+
+    int best = 0;
+	
+	for(int i = 0; i < node->count_; ++i)
+	{
+		TeBox rr = node->branch_[i].rect_;
+		double area = rectArea(rr);
+
+		rr = combineRect(rect, rr);
+        
+		double increase = rectArea(rr) - area;
+
+        if((increase <  bestIncr) || flag)
+		{
+			best = i;
+
+            bestArea = area;
+            bestIncr = increase;
+
+            flag = false;
+		}
+		else if((increase == bestIncr) && (area < bestArea))
+		{
+			best = i;
+			bestArea = area;
+			bestIncr = increase;
+		}
+	}
+
+	return best;
+}
+
+template<class DATATYPE, int MAXNODES, int MINNODES>
+void TeRTree<DATATYPE, MAXNODES, MINNODES>::splitNode(TeRTreeNodeType* node, TeRTreeBranch* branch, TeRTreeNodeType** newNode) const
+{
+    TePartitionVars partitions;
+
+// load all the branches into a buffer, initialize old node
+	int level = node->level_;
+
+	getBranches(node, branch, partitions);
+
+// find partition
+	methodZero(partitions);
+
+// put branches from buffer into 2 nodes according to chosen partition
+	++size_;
+
+	*newNode = new TeRTreeNodeType();
+	(*newNode)->level_ = node->level_ = level;
+
+	loadNodes(node, *newNode, partitions);
+}
+
+template<class DATATYPE, int MAXNODES, int MINNODES>
+void TeRTree<DATATYPE, MAXNODES, MINNODES>::getBranches(TeRTreeNodeType* n, TeRTreeBranch* b, TePartitionVars& p) const
+{
+	int i;
+// load the branch buffer
+	for(i = 0; i < MAXNODES; ++i)
+	{
+		p.branchBuf_[i] = n->branch_[i];
+	}
+
+	p.branchBuf_[MAXNODES] = *b;
+
+// calculate rect containing all in the set
+	p.coverSplit_ = p.branchBuf_[0].rect_;
+
+	for(i = 1; i <= MAXNODES; ++i)
+		p.coverSplit_ = combineRect(p.coverSplit_, p.branchBuf_[i].rect_);
+
+	n->init();
+}
+
+template<class DATATYPE, int MAXNODES, int MINNODES>
+void TeRTree<DATATYPE, MAXNODES, MINNODES>::methodZero(TePartitionVars& p) const
+{
+	p.init();
+	pickSeeds(p);
+	pigeonhole(p);
+}
+
+template<class DATATYPE, int MAXNODES, int MINNODES>
+void TeRTree<DATATYPE, MAXNODES, MINNODES>::pickSeeds(TePartitionVars& p) const
+{
+	double w;
+	double separation;
+	double bestSep;
+	double width[2];
+	int leastUpper[2];
+	int greatestLower[2];
+	int seed0;
+	int seed1;
+	int i;
+// LPS1
+// find the rectangles farthest out in each direction along dimens "x"
+	greatestLower[0] = leastUpper[0] = 0;
+
+	for(i = 1; i <= MAXNODES; ++i)
+	{
+		TeBox& r = p.branchBuf_[i].rect_;
+
+		if(r.x1_ > p.branchBuf_[greatestLower[0]].rect_.x1_)
+			greatestLower[0] = i;
+
+		if(r.x2_ < p.branchBuf_[leastUpper[0]].rect_.x2_)
+			leastUpper[0] = i;
+	}
+
+// LPS2
+// LPS3
+// find the width of the whole collection along this dimension
+	width[0] = p.coverSplit_.x2_ - p.coverSplit_.x1_;
+
+// find the rectangles farthest out in each direction along dimens "y"
+	greatestLower[1] = leastUpper[1] = 0;
+
+	for(i = 1; i <= MAXNODES; ++i)
+	{
+		TeBox& r = p.branchBuf_[i].rect_;
+
+		if(r.y1_ > p.branchBuf_[greatestLower[1]].rect_.y1_)
+			greatestLower[1] = i;
+
+		if(r.y2_ < p.branchBuf_[leastUpper[1]].rect_.y2_)
+			leastUpper[1] = i;
+	}
+
+// LPS2
+// LPS3
+// find the width of the whole collection along this dimension
+	width[1] = p.coverSplit_.y2_ - p.coverSplit_.y1_;
+
+
+// pick the best separation dimension and the two seed rects
+
+// divisor for normalizing by width
+
+// x
+	if(width[0] == 0.0)
+		w = 1.0;
+	else
+		w = width[0];
+
+	TeBox rlow  = p.branchBuf_[leastUpper[0]].rect_;
+    TeBox rhigh = p.branchBuf_[greatestLower[0]].rect_;
+
+    seed0 = leastUpper[0];
+	seed1 = greatestLower[0];
+    
+	bestSep = (rhigh.x1_ - rlow.x2_) / w;
+
+// y
+	if(width[1] == 0.0)
+		w = 1.0;
+	else
+		w = width[1];
+
+	rlow  = p.branchBuf_[leastUpper[1]].rect_;
+    rhigh = p.branchBuf_[greatestLower[1]].rect_;
+
+    separation = (rhigh.y1_ - rlow.y2_) / w;
+
+// LPS3
+	if(separation > bestSep)
+	{
+		seed0 = leastUpper[1];
+		seed1 = greatestLower[1];
+
+		bestSep = separation;
+	}
+
+	if(seed0 != seed1)
+	{
+		classify(seed0, 0, p);
+		classify(seed1, 1, p);
+	}
+}
+
+template<class DATATYPE, int MAXNODES, int MINNODES>
+void TeRTree<DATATYPE, MAXNODES, MINNODES>::classify(int i, int group, TePartitionVars& p) const
+{
+    p.partition_[i] = group;
+	p.taken_[i] = 1;
+
+	if(p.count_[group] == 0)
+		p.cover_[group] = p.branchBuf_[i].rect_;
+	else
+		p.cover_[group] = combineRect(p.branchBuf_[i].rect_, p.cover_[group]);
+
+	p.area_[group] = rectArea(p.cover_[group]);
+
+	++(p.count_[group]);
+}
+
+template<class DATATYPE, int MAXNODES, int MINNODES>
+void TeRTree<DATATYPE, MAXNODES, MINNODES>::pigeonhole(TePartitionVars& p) const
+{
+	TeBox newCover[2];
+	
+	double newArea[2];
+	double increase[2];
+
+	for(int i = 0; i <= MAXNODES; ++i)
+	{
+		if(p.taken_[i] == 0)
+		{
+// if one group too full, put rect in the other regardless
+			if(p.count_[0] >= (MAXNODES + 1 - MINNODES))
+			{
+				classify(i, 1, p);
+
+				continue;
+			}
+			else if(p.count_[1] >= (MAXNODES + 1 - MINNODES))
+			{
+				classify(i, 0, p);
+
+				continue;
+			}
+
+// find the areas of the two groups' old and new covers
+			for(int group = 0; group < 2; ++group)
+			{
+				if(p.count_[group] > 0)
+				{
+					newCover[group] = combineRect(p.branchBuf_[i].rect_, p.cover_[group]);
+				}
+				else
+				{
+					newCover[group] = p.branchBuf_[i].rect_;
+				}
+
+				newArea[group] = rectArea(newCover[group]);
+				increase[group] = newArea[group] - p.area_[group];
+			}
+
+// put rect in group whose cover will need to expand less
+			if(increase[0] < increase[1])
+				classify(i, 0, p);
+			else if(increase[1] < increase[0])
+				classify(i, 1, p);
+// put rect in group that will have a smaller area cover
+			else if(p.area_[0] < p.area_[1])
+				classify(i, 0, p);
+			else if(p.area_[1] < p.area_[0])
+				classify(i, 1, p);
+// put rect in group with fewer elements
+			else if(p.count_[0] < p.count_[1])
+				classify(i, 0, p);
+			else
+				classify(i, 1, p);
+		}
+	}
+}
+
+template<class DATATYPE, int MAXNODES, int MINNODES>
+void TeRTree<DATATYPE, MAXNODES, MINNODES>::loadNodes(TeRTreeNodeType* n, TeRTreeNodeType* q, TePartitionVars& p) const
+{
+	for(int i = 0; i <= MAXNODES; ++i)
+	{
+		if(p.partition_[i] == 0)
+			addBranch(&(p.branchBuf_[i]), n, 0);
+		else if(p.partition_[i] == 1)
+			addBranch(&(p.branchBuf_[i]), q, 0);
+		//else
+		//	throw;	// ERROR
+	}
+}
+};	// end namespace TeSAM
+
+
+#endif	// __TERRALIB_INTERNAL_RTREE_H
+
+
+
+
diff --git a/src/terralib/kernel/TeRaster.cpp b/src/terralib/kernel/TeRaster.cpp
old mode 100644
new mode 100755
index ea98cf9..93f02ff
--- a/src/terralib/kernel/TeRaster.cpp
+++ b/src/terralib/kernel/TeRaster.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -28,7 +28,8 @@ of this library and its documentation.
 #include <TeException.h>
 #include "TeRasterRemap.h"
 #include "TeDecoderMemory.h"
-
+#include <TeInitRasterDecoders.h>
+#include <TeVectorRemap.h>
 #include <algorithm>
 
 
@@ -56,19 +57,12 @@ public:
 	void operator() (TeCoordPair& pair)
 	{
 		//xmin and xmax of the segment (line and column index)
-		double xMinSegCM = pair.pt1.x();  
-		double xMaxSegCM = pair.pt2.x();
-
-		//line and column index of the segment
-		TeCoord2D minSegCM(xMinSegCM, y_);
-		TeCoord2D maxSegCM(xMaxSegCM, y_);
+		TeCoord2D minSegLC = raster_->coord2Index(TeCoord2D(pair.pt1.x_, y_));
+		TeCoord2D maxSegLC = raster_->coord2Index(TeCoord2D(pair.pt2.x_, y_));
 
-		TeCoord2D minSegLC = raster_->coord2Index (minSegCM);
-		TeCoord2D maxSegLC = raster_->coord2Index (maxSegCM);
-
-		double xMinLCd = minSegLC.x();
-		double xMaxLCd = maxSegLC.x();
-		double yLC = maxSegLC.y();
+		double xMinLCd = minSegLC.x_;
+		double xMaxLCd = maxSegLC.x_;
+		double yLC = maxSegLC.y_;
 		
 		//verify if is outside raster area 
 		if(xMinLCd<-0.5)
@@ -78,10 +72,8 @@ public:
 			else
 				xMinLCd=-0.5;
 		}
-		
 		strateg(xMinLCd, xMaxLCd, yLC);
 	}
-
 	TeCoordPairVect result() const {return SegOut_;}
 };
 
@@ -117,10 +109,7 @@ public:
 			TeCoord2D minLC (xMinLCi, y);
 			TeCoord2D maxLC (xMaxLCi, y);
 
-			TeCoordPair res;
-			res.pt1 = minLC; 
-			res.pt2 = maxLC; 
-
+			TeCoordPair res(minLC,maxLC);
 			SegOut_.push_back (res);
 		}
 	}
@@ -159,9 +148,7 @@ public:
 		TeCoord2D minLC (xMinLCi, y);
 		TeCoord2D maxLC (xMaxLCi, y);
 			
-		TeCoordPair res;
-		res.pt1 = minLC; 
-		res.pt2 = maxLC; 
+		TeCoordPair res(minLC,maxLC);
 
 		SegOut_.push_back (res);
 	}
@@ -179,10 +166,10 @@ applyStrategic(double& y, double ymin, double xmin, TeStrategicIterator st, TeRa
 	{
 		bool empty=false;
 		if(Segments.empty())
-
 		{
 			empty = true;
 			y -= resy; 
+
 			while((y>=ymin) && (empty)) 
 			{
 				Segments = TeGetIntersections(poly, y);
@@ -226,9 +213,7 @@ applyStrategic(double& y, double ymin, double xmin, TeStrategicIterator st, TeRa
 			TeCoord2D index1(0, lin);
 			TeCoord2D index2(nCols-1,lin);
 			
-			TeCoordPair pair;
-			pair.pt1=index1;
-			pair.pt2=index2;
+			TeCoordPair pair(index1,index2);
 
 			Segments.push_back(pair);
 			return Segments;
@@ -255,8 +240,8 @@ applyStrategic(double& y, double ymin, double xmin, TeStrategicIterator st, TeRa
 			TeCoordPairVect::iterator it = segsIn.begin();
 
 			double colMin = 0;
-			double colMax;
-			double lin;
+			double colMax = 0;
+			double lin = 0;
 
 			while(it!=segsIn.end())
 			{
@@ -271,9 +256,7 @@ applyStrategic(double& y, double ymin, double xmin, TeStrategicIterator st, TeRa
 					TeCoord2D index1(colMin, lin);
 					TeCoord2D index2(colMax, lin);
 				
-					TeCoordPair pair;
-					pair.pt1=index1;
-					pair.pt2=index2;
+					TeCoordPair pair(index1,index2);
 
 					segResult.push_back(pair);
 				}
@@ -285,10 +268,7 @@ applyStrategic(double& y, double ymin, double xmin, TeStrategicIterator st, TeRa
 			TeCoord2D index1(colMin, lin);
 			TeCoord2D index2(nCols-1,lin);
 			
-			TeCoordPair pair;
-			pair.pt1=index1;
-			pair.pt2=index2;
-
+			TeCoordPair pair(index1,index2);
 			segResult.push_back(pair);
 			return segResult;
 		}
@@ -298,23 +278,32 @@ applyStrategic(double& y, double ymin, double xmin, TeStrategicIterator st, TeRa
 }
 
 
+
 TeRaster::TeRaster( TeRasterParams& pars ) 
 {
+	TeInitRasterDecoders();
 	decoder_ = 0;
 	string decName;
-	params_.status_ = TeNOTREADY;
-	if (pars.decoderIdentifier_.empty())   // the decoder is not especified in raster parameters
+	params_.status_ = TeRasterParams::TeNotReady;
+	pars.errorMessage_ = "";
+	if (pars.decoderIdentifier_.empty())   // the decoder is not specified in raster parameters
 	{	
 		if (!pars.fileName_.empty())     // try to guess from the file name
 		{	
-			string ext = TeGetExtension(pars.fileName_.c_str());
+			string ext = TeConvertToUpperCase(TeGetExtension(pars.fileName_.c_str()));
 			decName = TeDecoderFactory::instanceName2Dec()[ext];
 			if ( decName.empty())
+			{
+				pars.errorMessage_ = "Can not instantiate a decoder from the raster file (or table) name.";
 				return;
+			}
 			pars.decoderIdentifier_ = decName;
 		}
 		else // no decoder type, and no filename
+		{
+			pars.errorMessage_ = "Can not instantiate a decoder for the raster data.";
 			return;
+		}
 	}
 	decoder_ = TeDecoderFactory::make(pars);
 	if (decoder_)
@@ -326,23 +315,29 @@ TeRaster::TeRaster( TeRasterParams& pars )
 
 TeRaster::TeRaster( const string& filename, const char& mode ) 
 {
+	TeInitRasterDecoders();
 	params_.fileName_ = filename;
 	params_.mode_ = mode;
 	decoder_ = 0;
-	params_.status_ = TeNOTREADY;
+	params_.status_ = TeRasterParams::TeNotReady;
 	string decName;
 	if (!filename.empty())
 	{
-		string ext = TeGetExtension(filename.c_str());
+		string ext = TeConvertToUpperCase(TeGetExtension(filename.c_str()));
 		decName = TeDecoderFactory::instanceName2Dec()[ext];
 		if (decName.empty())
+		{
+			params_.errorMessage_ = "Can not instantiate a decoder from the raster file (or table) name.";
 			return;
+		}
 	}
 	else
+	{
+		params_.errorMessage_ = "Can not instantiate a decoder for the raster data.";
 		return;
-
+	}
 	params_.decoderIdentifier_= decName;
-	decoder_ = TeDecoderFactory::make (params_);
+	decoder_ = TeDecoderFactory::make(params_);
 	if (decoder_)
 	{
 		params_ = decoder_->params();
@@ -378,33 +373,129 @@ TeRaster::~TeRaster( )
 		delete decoder_;
 }
 
+void TeRaster::updateParams( TeRasterParams& par)
+{
+	params_ = par;	// update raster parameters
+	if (decoder_)
+		decoder_->updateParams(par);		// update its decoder parameters
+	box_ = params_.box();
+}
+
+void TeRaster::setDecoder( TeDecoder* dec )
+{ 
+	if (dec)
+	{
+		decoder_ = dec;					// set the decoder
+		params_ = decoder_->params();	// copy decoder parameters to raster
+		box_ = params_.box();
+	}
+}
+
+void TeRaster::clear()
+{
+	if (decoder_)
+		decoder_->clear();
+}
+
+TeRaster::iterator TeRaster::begin() 
+{
+	return iterator(0,0, params_.ncols_,params_.nlines_, params_.nBands(), this);
+}
+
+TeRaster::iterator TeRaster::end() 
+{
+	return iterator(params_.ncols_,params_.nlines_-1,params_.ncols_,params_.nlines_, params_.nBands(), this);
+}
+
+TeRaster::iteratorPoly TeRaster::end(TePolygon& poly, TeStrategicIterator st, int band) 
+{
+	return iteratorPoly(params_.ncols_,params_.nlines_-1,params_.ncols_,params_.nlines_, params_.nBands(), this, poly, st, band);
+}
+
+bool TeRaster::selectBlocks(TeBox& bb, int resFac, TeRasterParams& parBlock) 
+{
+	if (!decoder_)
+		return false;
+	return decoder_->selectBlocks(bb,resFac,parBlock);
+}
+
+int TeRaster::numberOfSelectedBlocks()
+{
+	if (!decoder_)
+		return 0;
+	return decoder_->numberOfSelectedBlocks();
+}
+
+bool TeRaster::fetchRasterBlock(TeDecoderMemory* memDec)
+{
+	if (!decoder_)
+		return false;
+	return decoder_->getSelectedRasterBlock(memDec);
+}
+
+void TeRaster::clearBlockSelection()
+{
+	if (!decoder_)
+		return ;
+	decoder_->clearBlockSelection();
+}
+
+void TeRaster::iterator::moveForward()
+{
+	this->operator++();
+}
+
+bool TeRaster::iterator::operator==(const iterator& rhs) const
+{
+	return (this->colCurrent_ == rhs.colCurrent_ && this->linCurrent_== rhs.linCurrent_);
+}
+
+bool TeRaster::iterator::operator!=(const iterator& rhs) const
+{
+	return (this->colCurrent_ != rhs.colCurrent_ || this->linCurrent_!= rhs.linCurrent_);
+}
+
+void TeRaster::iteratorPoly::moveForward()
+{
+	this->operator++();
+}
+
 bool TeRaster::init( TeRasterParams& pars )
 { 
 	if (!decoder_ )	
 	{
-		params_.status_ = TeNOTREADY;
+		params_.status_ = TeRasterParams::TeNotReady;
 		string decName;
 		if (params_.decoderIdentifier_.empty())   // the decoder is not especified in raster parameters
 		{	
 			if (!params_.fileName_.empty())     // try to guess from the file name
 			{	
-				string ext = TeGetExtension(params_.fileName_.c_str());
+				string ext = TeConvertToUpperCase(TeGetExtension(params_.fileName_.c_str()));
 				decName = TeDecoderFactory::instanceName2Dec()[ext];
 				if ( decName.empty())
+				{
+					pars.errorMessage_ = "Can not instantiate a decoder from the raster file (or table) name.";
 					return false;
+				}
 				params_.decoderIdentifier_ = decName;
 			}
 			else // no decoder type, and no filename
+			{
+				pars.errorMessage_ = "Can not instantiate a decoder for the raster data.";
 				return false;
+			}
 		}
 		decoder_ = TeDecoderFactory::make(params_);
 		if (!decoder_)
+		{
+			pars.errorMessage_ = "Can not instantiate a decoder for the raster data.";
 			return false;
+		}
 	}
 	decoder_->init(pars);
 	params_ = decoder_->params();
 	box_ = decoder_->params().box();
-	return (params_.status_ != TeNOTREADY);
+	return (params_.status_ != TeRasterParams::TeNotReady);
 }
 
 bool TeRaster::init()
@@ -413,19 +504,26 @@ bool TeRaster::init()
 	{
 		decoder_->init(params_);
 		params_ = decoder_->params();	
-		return (params_.status_ != TeNOTREADY);
+		return (params_.status_ != TeRasterParams::TeNotReady);
 	}
+	params_.errorMessage_ = "There is no decoder associated to the raster data.";
 	return false;
 }
 
 bool TeRaster::setElement (int col, int lin, double val,int band)
 {
-	if (params_.status_!=TeREADYTOWRITE)
+	if (params_.status_!= TeRasterParams::TeReadyToWrite)
+	{
+		params_.errorMessage_ = "Raster is not properly initalizated to be written.";
 		return false;
+	}
 	if ( col < 0 || col >= params_.ncols_ ||
 		 lin < 0 || lin >= params_.nlines_ ||
 		 band < 0 || band >= params_.nBands())
+	{
+		params_.errorMessage_ = "Fail to access element out of the range of the raster dimensions.";
 		return false;
+	}
 
 	bool res = decoder_->setElement(col,lin,val,band);
 	if ( res && (!params_.useDummy_ || val != params_.dummy_[band]))
@@ -451,7 +549,10 @@ bool TeRaster::getElement (int col, int lin, double& val,int band)
 	if (!params_.status_ || col < 0 || col >= params_.ncols_  || 
 		 lin < 0 || lin >= params_.nlines_  ||
 		 band < 0 || band >= params_.nBands())
+	{
+		params_.errorMessage_ = "Fail to access element out of the range of the raster dimensions.";
 		return false;
+	}
 
 	if (decoder_->getElement (col,lin,val,band) && 
 	   (!params_.useDummy_ || val != params_.dummy_[band]))	
@@ -460,6 +561,23 @@ bool TeRaster::getElement (int col, int lin, double& val,int band)
 		return false;
 }
 
+bool TeRaster::setElement(int col, int lin, double Rval, double Gval, double Bval, unsigned int transp) 
+{
+	if (params_.status_!= TeRasterParams::TeReadyToWrite)
+	{
+		params_.errorMessage_ = "Raster is not properly initalizated to be written.";
+		return false;
+	}
+	if ( params_.nBands() != 3 ||
+		 col < 0 || col >= params_.ncols_ ||
+		 lin < 0 || lin >= params_.nlines_ )
+	{
+		params_.errorMessage_ = "Fail to access element out of the range of the raster dimensions.";
+		return false;
+	}
+	return decoder_->setElementRGB(col, lin, Rval, Gval, Bval, transp);
+}
+
 TeRaster::iteratorPoly 
 TeRaster::begin(TePolygon& poly, TeStrategicIterator st, int band)
 {
@@ -470,6 +588,8 @@ TeRaster::begin(TePolygon& poly, TeStrategicIterator st, int band)
 	double	resy = params_.resy_;
 	bool	end = false;
 
+	//box (world coordinates) of the polygon
+	TeBox boxPol = poly.box();
 	if((st==TeBoxPixelOut) || (st==TeBBoxPixelNotInters))  //out polygon
 	{
 		minLinLC = (params_.nlines_-1);
@@ -479,9 +599,6 @@ TeRaster::begin(TePolygon& poly, TeStrategicIterator st, int band)
 	}
 	else  //in polygon
 	{
-		//box (world coordinates) of the polygon
-		TeBox boxPol = poly.box();
-		
 		//change to line and column index
 		TeCoord2D minColLinLC = coord2Index(boxPol.lowerLeft());
 		TeCoord2D maxColLinLC = coord2Index(boxPol.upperRight());
@@ -524,7 +641,7 @@ TeRaster::begin(TePolygon& poly, TeStrategicIterator st, int band)
 	minColCM = MinColLinCM.x();
 	maxLinCM = index2Coord(MaxColLinLC).y();
 	maxColCM = index2Coord(MaxColLinLC).x();
-	
+
 	TeCoordPairVect segRes;
 	bool empty = true;
 	bool first = true;
@@ -569,8 +686,19 @@ TeRaster::begin(TePolygon& poly, TeStrategicIterator st, int band)
 bool
 TeRaster::fillRaster(TeRaster* dstRaster, TeRasterTransform* transf, bool bestRes)
 {	
-	if (!dstRaster->status() || !decoder_)
+	if (!dstRaster ||
+		 dstRaster->params().status_ != TeRasterParams::TeReadyToWrite)
+	{
+		params_.errorMessage_ == "Destination raster non-existing or not ready to write";
+		return false;
+	}
+
+	if (params_.status_ != TeRasterParams::TeReadyToRead &&
+		params_.status_ != TeRasterParams::TeReadyToWrite)
+	{
+		params_.errorMessage_ == "Raster not ready to be extracted";
 		return false;
+	}
 
 	int dt = CLOCKS_PER_SEC/4;
 	int dt2 = CLOCKS_PER_SEC * 5;
@@ -579,7 +707,8 @@ TeRaster::fillRaster(TeRaster* dstRaster, TeRasterTransform* transf, bool bestRe
 	TeRasterRemap fillRemap;
 	fillRemap.setOutput(dstRaster);
 	fillRemap.setInput(this);
-	fillRemap.setTransformer(transf);
+	if (transf)
+		fillRemap.setTransformer(transf);
 	int res = 1;
 	TeBox b = dstRaster->params().boundingBox();
 	if (bestRes)
@@ -630,3 +759,288 @@ TeRaster::fillRaster(TeRaster* dstRaster, TeRasterTransform* transf, bool bestRe
 		TeProgress::instance()->reset();
 	return result;
 }
+
+//! Prefix move forward operator
+TeRaster::iterator& 
+TeRaster::iterator::operator++()
+{
+	if (++colCurrent_ == nCols_)
+	{
+		if (linCurrent_ < nLines_-1)
+		{
+			linCurrent_++;
+			colCurrent_ = 0;
+		}
+	}
+	return *this;
+}
+
+TeRaster::iterator
+TeRaster::iterator::operator++(int)	
+{
+	iterator temp = *this;
+	++(*this);
+	return temp;
+}
+
+vector<double> 
+TeRaster::iterator::operator*()
+{
+	vector<double> vt(nBands_);
+	if ((linCurrent_ < nLines_) && (colCurrent_ < nCols_))
+	{
+		for (int n=0; n<nBands_; n++)
+			raster_->getElement(colCurrent_,linCurrent_,vt[n],n);
+	}
+	return vt;
+}
+
+double 
+TeRaster::iterator::operator*(int band)
+{
+	double val = this->raster_->params().dummy_[band];
+	if ((linCurrent_ < nLines_) && (colCurrent_ < nCols_))
+	{
+		if (raster_->getElement(colCurrent_,linCurrent_,val,band))
+			return val;
+	}
+	return val;
+}
+
+void 
+TeRaster::iteratorPoly::getNewSegment(int linCurr)
+{
+	//change to world coordinates
+	TeCoord2D coord(colMin_,linCurr);
+	TeCoord2D colLinCM = raster_->index2Coord(coord);
+	
+	double linCM = colLinCM.y();
+	double colMinCM = colLinCM.x();
+	
+	//applyStrategic: return the segments 
+	segments_ = applyStrategic(linCM, linMinCM_, colMinCM, strategy_, raster_, poly_);
+
+	if(segments_.empty())
+	{
+		colCurrent_=(int)colMax_;
+		return;
+	}
+	
+	colMin_ = segments_[0].pt1.x();
+	colMax_ = segments_[0].pt2.x();
+	
+	colCurrent_=(int)colMin_;
+	posSegments_ = 0;
+	end_ = false;
+}
+
+//! Prefix move forward operator
+TeRaster::iteratorPoly& 
+TeRaster::iteratorPoly::operator++() //prefix
+{
+	if (++colCurrent_>colMax_)
+	{
+		if((++posSegments_ > (int)(segments_.size()-1)) || (segments_.size()<1))
+		{
+			if(++linCurrent_>linMax_)
+			{
+				end_ = true;
+				*this = raster_->end(poly_,strategy_);
+			}
+			else
+			{	
+				segments_.clear();
+				do
+				{
+					getNewSegment(linCurrent_);
+					if (segments_.empty())
+						linCurrent_++;
+					else
+						break;
+				} while (linCurrent_<=linMax_);
+				if (linCurrent_ > linMax_)
+				{
+					end_ = true;
+					*this = raster_->end(poly_,strategy_);
+				}
+			}
+		}
+		else
+		{
+			colMin_ = segments_[posSegments_].pt1.x();
+			colMax_ = segments_[posSegments_].pt2.x();
+			colCurrent_=(int)colMin_;
+		}
+	}
+	return *this;
+}
+
+TeRaster::iteratorPoly 
+TeRaster::iteratorPoly::operator++(int)
+{
+	iteratorPoly temp = *this;
+	++(*this);
+	return temp;
+}
+
+double 
+TeRaster::iteratorPoly::operator*() 
+{
+	double val = 0.0;
+	if ((linCurrent_ < nLines_) && (colCurrent_ < nCols_))
+	{
+		if (raster_->getElement(colCurrent_,linCurrent_,val,band_))
+			return val;
+	}
+	return 0.0;
+}
+
+//! Returns the value of a given band of the element pointed by the iterator 
+double 
+TeRaster::iteratorPoly::operator*(int band)
+{
+	double val = 0.0;
+	if ((linCurrent_ < nLines_) && (colCurrent_ < nCols_))
+	{
+		raster_->getElement(colCurrent_,linCurrent_,val,band);
+		return val;
+	}
+	return 0.0;
+}
+
+bool 
+TeRaster::iteratorPoly::getProperty(TeProperty& prop) 
+{
+	double val = 0.0;
+	prop.attr_.rep_.type_ = TeREAL;
+	if (!raster_) prop.attr_.rep_.name_ = raster_->params().fileName_ + Te2String(band_);
+	prop.value_ = Te2String (val);
+	
+	if ((linCurrent_ < nLines_) && (colCurrent_ < nCols_))
+	{
+		if (raster_->getElement(colCurrent_,linCurrent_,val,band_))
+		{
+			prop.value_ = Te2String(val);
+			return true;
+		}
+	}
+	return false;
+}
+
+TeRaster*
+TeRasterClipping(TeRaster* whole, TePolygonSet& mask, TeProjection* geomProj, const string& clipName, double background, const string& decId)
+{
+  if( decId.empty() ) {
+    throw TeException( UNKNOWN_DECODER_TECHNOLOGY_TYPE, "Invalid decoder", 
+      false );
+  }
+  
+  if( whole == 0 ) {
+    throw TeException( UNKNOWN_ERROR_TYPE, "Invalid raster pointer", 
+      false );
+  }  
+
+  if( mask.empty() ) {
+    throw TeException( UNKNOWN_ERROR_TYPE, "Invalid polygon set mask", 
+      false );
+  }  
+  
+  if( ( decId != "MEM" ) && clipName.empty() ) {
+    throw TeException( UNKNOWN_ERROR_TYPE, "Invalid clipname", 
+      false );
+  }    
+    
+  if( geomProj == 0 ) {
+    throw TeException( UNKNOWN_ERROR_TYPE, "Invalid projection pointer", 
+      false );
+  }    
+
+	if (whole->params().status_ != TeRasterParams::TeReadyToRead && 
+		whole->params().status_ != TeRasterParams::TeReadyToWrite )
+		return 0;
+	
+	bool isEqualProj = (*whole->projection() == *geomProj);
+	if (!isEqualProj &&
+		(geomProj->name() == "NoProjection" || whole->projection()->name() == "NoProjection"))
+		return 0;
+
+	TePolygonSet mask2;
+	if (!isEqualProj)
+		TeVectorRemap(mask,geomProj,mask2,whole->projection());
+	else
+		mask2 = mask;
+
+	if (!TeIntersects(mask2.box(),whole->params().boundingBox()))
+		return 0;
+
+	TeRasterParams par = whole->params();
+	if (!decId.empty())
+	{
+		par.decoderIdentifier_ = decId;
+		if (decId == "DB")
+		{
+			if (!par.database_)
+				return 0;
+		}
+	}
+	par.fileName_ = clipName;
+	par.mode_ = 'c';
+	TeCoord2D bll = whole->coord2Index(mask2.box().lowerLeft());
+	TeCoord2D bur = whole->coord2Index(mask2.box().upperRight());
+	
+	bll = whole->index2Coord(TeCoord2D(TeRoundRasterIndex(bll.x_),TeRoundRasterIndex(bll.y_)));
+	bur = whole->index2Coord(TeCoord2D(TeRoundRasterIndex(bur.x_),TeRoundRasterIndex(bur.y_)));
+
+	par.boxResolution(bll.x_, bll.y_, bur.x_, bur.y_,par.resx_, par.resy_);
+	par.setDummy(background);
+	TeRaster*  clip = new TeRaster(par);
+	clip->init();
+	if (clip->params().status_ != TeRasterParams::TeReadyToWrite)
+		return 0;
+	
+	TeCoord2D cd = TeCoord2D(0,0);
+	TeCoord2D ul = clip->params().index2Coord(cd);
+	TeCoord2D dxdy = whole->params().coord2Index(ul);
+	int j = TeRoundRasterIndex(dxdy.x_); // column delta
+	int i = TeRoundRasterIndex(dxdy.y_); // line delta
+	unsigned int np = mask2.size();
+	unsigned int nb = whole->params().nBands();
+	unsigned int band;
+	double val;
+
+	//progress bar
+	if(TeProgress::instance())
+	{
+		string caption = "Raster Clipping operation";
+		TeProgress::instance()->setCaption(caption.c_str());
+		string msg = "Executing clipping operation. Please, wait!";
+		TeProgress::instance()->setMessage(msg);
+		TeProgress::instance()->setTotalSteps(np);
+	}
+	for (unsigned int p=0; p<np; ++p)
+	{
+		TeRaster::iteratorPoly it = whole->begin(mask2[p],TeBoxPixelIn);
+		while (!it.end())
+		{
+			for(band = 0; band < nb; ++band)
+			{
+				if (whole->getElement(it.currentColumn(),it.currentLine(),val,band))
+					clip->setElement(it.currentColumn()-j,it.currentLine()-i,val,band);
+			}
+			++it;
+		}
+		//progress bar
+		if(TeProgress::instance())
+		{
+			if(TeProgress::instance()->wasCancelled())
+			{
+				TeProgress::instance()->reset();
+				break;
+			}
+			TeProgress::instance()->setProgress(p);
+		}
+	}
+	if(TeProgress::instance())
+		TeProgress::instance()->reset();
+	return clip;
+}
diff --git a/src/terralib/kernel/TeRaster.h b/src/terralib/kernel/TeRaster.h
old mode 100644
new mode 100755
index 0b597d6..e8e6451
--- a/src/terralib/kernel/TeRaster.h
+++ b/src/terralib/kernel/TeRaster.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,9 +20,8 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeRaster.h
-    This file contains structures and definitions to deal with raster structures
+    \brief This file contains structures and definitions to deal with raster structures
 */
 #ifndef  __TERRALIB_INTERNAL_RASTER_H
 #define  __TERRALIB_INTERNAL_RASTER_H
@@ -55,8 +54,7 @@ enum TeStrategicIterator
     \param raster pointer to raster
 	\param poly polygon        
 	*/
-TeCoordPairVect 
-applyStrategic(double& y, double ymin, double xmin, 
+TL_DLL TeCoordPairVect applyStrategic(double& y, double ymin, double xmin, 
 			   TeStrategicIterator st, TeRaster* raster, TePolygon& poly);
 
 //! Support for a raster geometry 
@@ -70,12 +68,12 @@ applyStrategic(double& y, double ymin, double xmin,
 	that is duplicated in its decoder.
 	\sa TeDecoder TeRasterParams
 */
-class TeRaster : public TeGeometry
+class TL_DLL TeRaster : public TeGeometry
 {
 	TeRasterParams  params_;	//!< structure that describes all information about a raster 
 	TeDecoder		*decoder_;	//!< pointer to a decoder of values
-public:
 
+public:
 	//! Constructor from file
 	/*!
 	  This method tries to instatiate a decoder for this data from the 
@@ -113,54 +111,41 @@ public:
 	//! Destructor
 	~TeRaster ();
 
+  //! Returns the const parameters of the raster
+  const TeRasterParams& params() const;
+
 	//! Returns the parameters of the raster
-	TeRasterParams& params()
-	{ return params_; }
+	TeRasterParams& params();
 	
 	//! Returns the number of lines of the raster
-	int nBands()
-	{ return params_.nBands(); }
+	int nBands();
 
 	//! Update the parametes of a raster file
 	/*!
       \param par a new raster parameters structure
 	*/
-	void updateParams( TeRasterParams& par)
-	{
-		params_ = par;	// update raster parameters
-		if (decoder_)
-			decoder_->updateParams(par);		// update its decoder parameters
-		box_ = params_.box();
-	}
+	void updateParams(TeRasterParams& par);
 
 	//! Returns the type of the geometry
-	TeGeomRep elemType() { return TeRASTER; }
+	TeGeomRep elemType();
 
 	//! Associate a decoder to a raster
 	/*!
       \param dec pointer to a raster decoder
 	*/
-	void setDecoder( TeDecoder* dec )
-	{ 
-		if (dec)
-		{
-			decoder_ = dec;					// set the decoder
-			params_ = decoder_->params();	// copy decoder parameters to raster
-			box_ = params_.box();
-		}
-	}
-
-	//! Returns status of the raster
-	int status() 
-	{ return params_.status_; }
+	void setDecoder(TeDecoder* dec);
+
+	//! Returns status of the raster as a Boolean value
+	/*
+		\return true if raster is ready to be read or written and false otherwise
+	*/
+	bool status();
 
 	//! Returns a pointer to the decoder associated to this raster
-	TeDecoder* decoder( )
-	{ return decoder_; }
+	TeDecoder* decoder();
 
 	//! Returns a pointer to the raster projection
-	TeProjection* projection () 
-	{ return params_.projection(); }
+	TeProjection* projection(); 
 
 	//! Sets the value of a element of the raster 
 	/*!
@@ -191,11 +176,11 @@ public:
 	//! Initalize the raster decoding tool from its parameters
 	/*! The result of this method depends on the mode_ specified in the parameters. 
 		\par 'r' : initializes a raster with reading only permission. If the source
-		of the data doesn�t exist it will fail.
+		of the data does not exist it will fail.
 		\par 'w' : initializes a raster with reading and writting permission. If the source
-		of the data doesn�t exist will fail.
+		of the data does not exist it will fail.
 		\par 'c' : creates a new raster data with default values. Initializes it with 
-		reading and writting permision. Fails if creation fail.
+		reading and writting permision. Fails if creation fails.
 	*/
 	bool init();
 
@@ -206,19 +191,13 @@ public:
 	bool init(TeRasterParams& pars);
   
 	//! Clear internal structures and disable the raster decoding tool
-	void clear()
-	{
-		if (decoder_)
-			decoder_->clear();
-	}
+	void clear();
 
 	//! Transform a coordinate from line/column domain to projection domain
-	TeCoord2D index2Coord(TeCoord2D pt)
-	{ return decoder_->index2Coord(pt); }
+	TeCoord2D index2Coord(TeCoord2D pt);
 
 	//! Transform a coordinate from projection domain domain to line/column
-	TeCoord2D coord2Index(TeCoord2D pt)
-	{ return decoder_->coord2Index(pt); }
+	TeCoord2D coord2Index(TeCoord2D pt);
 
 	//----------------
 	//! A raster iterator
@@ -226,124 +205,81 @@ public:
 		An strucuture that allows the traversal over the raster elements 
 		(pixels) in a similar way as the STL iterators. 
 	*/
-	class iterator
+	class TL_DLL iterator
 	{
-	public:
-
+		public:
 		//! Constructor
 		/*!
-		  \param c0 initial column
-		  \param l0 initial line
-		  \param nc number of columns
-		  \param nl number of lines
-		  \param nb number of bands
-		  \param pt pointer to the raster to iterate
-		*/
-		 iterator(int c0=0, int l0=0, int nc=0, int nl=0, int nb=0, TeRaster* pt=0) : 
-		  linCurrent_(l0),
-		  colCurrent_(c0),
-		  nLines_(nl),
-		  nCols_(nc),
-		  nBands_(nb),
-		  raster_(pt)
-		  {}  
-
-		//! Move iterator forward
-		virtual void moveForward()
-		{
-			this->operator++();
-		}
-
-		//! Prefix move forward operator
-		iterator& operator++()
-		{
-			if (++colCurrent_ == nCols_)
-			{
-				if (linCurrent_ < nLines_-1)
-				{
-					linCurrent_++;
-					colCurrent_ = 0;
-				}
-			}
-			return *this;
-		}
-
-		//! Posfix move forward operator
-		iterator operator++(int)	
-		{
-			iterator temp = *this;
-			++(*this);
-			return temp;
-		}
-
-		//! Returns iterator current line 
-		int currentLine()
-		{ return linCurrent_;}
-
-		//! Returns iterator current column
-		int currentColumn()
-		{return colCurrent_; }
-
-		//! Returns the number of bands
-		int nBands(void)
-		{	return nBands_; }
-
-		//! Iterator de-referencing operator
-		/*!
-			\return a vector (with nbands_ size) with the values in
-			each band, of the element pointed by the iterator
+			\param c0 initial column
+			\param l0 initial line
+			\param nc number of columns
+			\param nl number of lines
+			\param nb number of bands
+			\param pt pointer to the raster to iterate
 		*/
-		vector<double> operator*()
-		{
-			vector<double> vt(nBands_);
-			if ((linCurrent_ < nLines_) && (colCurrent_ < nCols_))
-			{
-				for (int n=0; n<nBands_; n++)
-					raster_->getElement(colCurrent_,linCurrent_,vt[n],n);
-			}
-			return vt;
-		}
+			iterator(int c0=0, int l0=0, int nc=0, int nl=0, int nb=0, TeRaster* pt=0) : 
+			linCurrent_(l0),
+			colCurrent_(c0),
+			nLines_(nl),
+			nCols_(nc),
+			nBands_(nb),
+			raster_(pt)
+			{}
+			
+			//! Destructor
+			virtual ~iterator()
+			{}
+
+			//! Move iterator forward
+			virtual void moveForward();
+
+			//! Prefix move forward operator
+			iterator& operator++();
 		
-		//! Returns the value in a given band of a element pointed by the iterator 
-		double operator*(int band)
-		{
-			double val = 0.0;
-			if ((linCurrent_ < nLines_) && (colCurrent_ < nCols_))
-			{
-				if (raster_->getElement(colCurrent_,linCurrent_,val,band))
-					return val;
-			}
-			return 0.0;
-		}
-
-		//! Returns whether two iterators point to the same element
-		bool operator==(const iterator& rhs) const
-		{
-			return (this->colCurrent_ == rhs.colCurrent_ && this->linCurrent_== rhs.linCurrent_);
-		}
-
-		//! Returns whether two iterators point to the different elements
-		bool operator!=(const iterator& rhs) const
-		{
-			return (this->colCurrent_ != rhs.colCurrent_ || this->linCurrent_!= rhs.linCurrent_);
-		}
-
-	protected:
-		int linCurrent_, colCurrent_;
-		int nLines_, nCols_;
-		int nBands_;
-		TeRaster* raster_;
-	};   
+			//! Posfix move forward operator
+			iterator operator++(int);
+
+			//! Returns iterator current line 
+			int currentLine();
+
+			//! Returns iterator current column
+			int currentColumn();
+
+			//! Returns the number of bands
+			int nBands(void);
+
+			//! Iterator de-referencing operator
+			/*!
+				\return a vector (with nbands_ size) with the values in
+				each band, of the element pointed by the iterator
+			*/
+			vector<double> operator*();
+			
+			//! Returns the value in a given band of a element pointed by the iterator 
+			double operator*(int band);
+
+			//! Returns whether two iterators point to the same element
+			bool operator==(const iterator& rhs) const;
+
+			//! Returns whether two iterators point to the different elements
+			bool operator!=(const iterator& rhs) const;
+
+		protected:
+			int linCurrent_, colCurrent_;
+			int nLines_, nCols_;
+			int nBands_;
+			TeRaster* raster_;
+		};   
 
 	// ---------------------  End of class raster Iterator
 
 	//----------------
 	//! A raster iterator with a restriction of area 
 	/*! 
-		A strucuture that allows to cover the raster elements 
+		A structure that allows to cover the raster elements 
 		(pixels) that are IN or OUT a specific region (polygon)  
 	*/
-	class iteratorPoly : public iterator
+	class TL_DLL iteratorPoly : public iterator
 	{
 		public:
 			//! Constructor
@@ -405,80 +341,13 @@ public:
 			//! destructor
 			virtual ~iteratorPoly() {}
 
-			//! calculate the segment of the current line that intersect the polygon  					
-			void getNewSegment(int linCurr)
-			{
-				//change to world coordinates
-				TeCoord2D coord(colMin_,linCurr);
-				TeCoord2D colLinCM = raster_->index2Coord(coord);
-				
-				double linCM = colLinCM.y();
-				double colMinCM = colLinCM.x();
-				
-				//applyStrategic: return the segments 
-				segments_ = applyStrategic(linCM, linMinCM_, colMinCM, strategy_, raster_, poly_);
-				
-				colMin_ = segments_[0].pt1.x();
-				colMax_ = segments_[0].pt2.x();
-				
-				colCurrent_=(int)colMin_;
-				posSegments_ = 0;
-				end_ = false;
-			}
-
-			void moveForward()
-			{
-				this->operator++();
-			}
+			void moveForward();
 			
 			//! Prefix move forward operator
-			iteratorPoly& operator++() //prefix
-			{
-				if (++colCurrent_>colMax_)
-				{
-					if((++posSegments_ > (int)(segments_.size()-1)) || (segments_.size()<1))
-					{
-						if(++linCurrent_>linMax_)
-						{
-							end_ = true;
-							*this = raster_->end(poly_,strategy_);
-						}
-						else
-						{	
-							segments_.clear();
-							do
-							{
-								getNewSegment(linCurrent_);
-								if (segments_.empty())
-									linCurrent_++;
-								else
-									break;
-							} while (linCurrent_<=linMax_);
-							if (linCurrent_ > linMax_)
-							{
-								end_ = true;
-								*this = raster_->end(poly_,strategy_);
-							}
-						}
-					}
-					else
-					{
-						colMin_ = segments_[posSegments_].pt1.x();
-						colMax_ = segments_[posSegments_].pt2.x();
-						colCurrent_=(int)colMin_;
-					}
-				}
-				
-				return *this;
-			}
+			iteratorPoly& operator++();
 
 			//! Prefix move orward operator
-				iteratorPoly operator++(int)
-				{
-					iteratorPoly temp = *this;
-					++(*this);
-					return temp;
-				}
+			iteratorPoly operator++(int);
 
 			//! Dereferencing operator
 			/*!
@@ -487,65 +356,32 @@ public:
 				If there is a band restriction defined it will return the value associated to that band.
 				Otherwise will return the value associated to band 0.
 			*/
-			double operator*() 
-			{
-				double val = 0.0;
-				if ((linCurrent_ < nLines_) && (colCurrent_ < nCols_))
-				{
-					if (raster_->getElement(colCurrent_,linCurrent_,val,band_))
-						return val;
-				}
-				return 0.0;
-			}
+			double operator*(); 
 
 			//! Returns the value of a given band of the element pointed by the iterator 
-			double operator*(int band)
-			{
-				double val = 0.0;
-				if ((linCurrent_ < nLines_) && (colCurrent_ < nCols_))
-				{
-					if (raster_->getElement(colCurrent_,linCurrent_,val,band))
-						return val;
-				}
-				return 0.0;
-			}
+			double operator*(int band);
 		
 		    //! Returns the value of of the element pointed by the iterator as TeProperty structure
 			/*!
 				If there is a band restriction defined it will return the value associated to that band.
 				Otherwise will return the value associated to band 0.
 			*/
-			bool getProperty(TeProperty& prop) 
-			{
-				double val = 0.0;
-				prop.attr_.rep_.type_ = TeREAL;
-				if (!raster_) prop.attr_.rep_.name_ = raster_->params().fileName_ + Te2String(band_);
-				prop.value_ = Te2String (val);
-				
-				if ((linCurrent_ < nLines_) && (colCurrent_ < nCols_))
-				{
-					if (raster_->getElement(colCurrent_,linCurrent_,val,band_))
-					{
-						prop.value_ = Te2String (val);
-						return true;
-					}
-				}
-				return false;
-			}
+			bool getProperty(TeProperty& prop);
 
 			//! Returns the last past one element in the polygon
-			bool end()
-			{	return end_; }
+			bool end();
 
 			//! Returns the number of lines covered by the iterator
-			int nLinesInPoly()
-			{ return nLinesInPoly_;}
+			int nLinesInPoly();
 
 			//! Returns the number of columns covered by the iterator
-			int nColsInPoly()
-			{ return nColsInPoly_;}
+			int nColsInPoly();
 
 		private:
+
+			//! calculate the segment of the current line that intersect the polygon  					
+			void getNewSegment(int linCurr);
+
 			double				linMin_, linMax_;  
 			double				colMin_, colMax_;
 			TeCoordPairVect		segments_;
@@ -559,10 +395,7 @@ public:
 	};
 
 	//! Returns  an iterator to the first element of the raster
-	iterator begin() 
-	{
-		return iterator(0,0, params_.ncols_,params_.nlines_, params_.nBands(), this);
-	}
+	iterator begin();
 
 	//! Returns an iterator to the first element of the raster IN or OUT the polygon 
 	/*!
@@ -572,56 +405,127 @@ public:
 	*/
 	iteratorPoly begin(TePolygon& poly, TeStrategicIterator st, int band=0);
 
-	
 	//! Returns the end past one position of the elements of the raster
-    iterator end() 
-	{
-		return iterator(params_.ncols_,params_.nlines_-1,params_.ncols_,params_.nlines_, params_.nBands(), this);
-	}
-
+    iterator end() ;
 	//! Returns an iterator to the end element of the raster 
 	/*!
 		\param poly polygon that delimitates the iterator traversal
 		\param st stragetegy used to decide if a pixel is in or out a polygon
 		\param band optional band restriction
 	*/
-	iteratorPoly end(TePolygon& poly, TeStrategicIterator st, int band=0) 
-	{
-		return iteratorPoly(params_.ncols_,params_.nlines_-1,params_.ncols_,params_.nlines_, params_.nBands(), this, poly, st, band);
-	}
+	iteratorPoly end(TePolygon& poly, TeStrategicIterator st, int band=0); 
 
 	//! Select all blocks of raster, in a certain resolution factor that intercepts a given bounding box
-	bool selectBlocks(TeBox& bb, int resFac, TeRasterParams& parBlock) 
-	{
-		if (!decoder_)
-			return false;
-		return decoder_->selectBlocks(bb,resFac,parBlock);
-	}
+	bool selectBlocks(TeBox& bb, int resFac, TeRasterParams& parBlock);
+
 	//! Returns the number of blocks selected by the last block selection
-	int numberOfSelectedBlocks()
-	{
-		if (!decoder_)
-			return 0;
-		return decoder_->numberOfSelectedBlocks();
-	}
+	int numberOfSelectedBlocks();
 
 	//! Returns the current block of a set selected by the last block selection
-	bool fetchRasterBlock(TeDecoderMemory* memDec)
-	{
-		if (!decoder_)
-			return false;
-		return decoder_->getSelectedRasterBlock(memDec);
-	}
+	bool fetchRasterBlock(TeDecoderMemory* memDec);
 
 	//! Clears the current selection of a set selected by the last block selection
-	void clearBlockSelection()
-	{
-		if (!decoder_)
-			return ;
-		decoder_->clearBlockSelection();
-	}
+	void clearBlockSelection();
+
+	//! An optimizated method to set values raster images
+	/*
+		This method should be used only to set the values of images with 3 bands associated
+		respectively to the three colour channes Red, Green and Blue
+		\param col column of the image
+		\param lin line of the image
+		\param Rval the value associated to the band 0 (associated to the R colour Channel)
+		\param Gval the value associated to the band 1 (associated to the G colour Channel)
+		\param Bval the value associated to the band 2 (associated to the B colour Channel)
+		\param transp an optional transparency degree, with a range of 0 (totally transparent) to 255 (totally opaque)
+		\return true if if succeed and false otherwise
+	*/
+	bool setElement(int col, int lin, double Rval, double Gval, double Bval, unsigned int /*transp*/ = 255);
+
+	//! Give access to the last message detected by the raster manipulation
+	const string& errorMessage() const;
+	
+  private :
+  
+	  //! Building a raster instance from another one is forbiden !
+	  TeRaster( const TeRaster& ) : TeGeometry()
+	  {}
+
+	  //! Copying a raster instance from another one is forbiden !
+	  const TeRaster& operator=( const TeRaster& ) { return *this; };	
+
 };
 
+inline const TeRasterParams& TeRaster::params() const
+{ return params_; }
+	
+inline TeRasterParams& TeRaster::params()
+{ return params_; }
+
+inline int TeRaster::nBands()
+{ return params_.nBands(); }
+
+inline TeGeomRep TeRaster::elemType() 
+{ return TeRASTER; }
+
+inline bool TeRaster::status()
+{	return params_.status_ != TeRasterParams::TeNotReady; }
+
+inline TeDecoder* TeRaster::decoder()
+{ return decoder_; }
+
+inline TeProjection* TeRaster::projection() 
+{ return params_.projection(); }
+
+inline TeCoord2D TeRaster::index2Coord(TeCoord2D pt)
+{ return decoder_->index2Coord(pt); }
+
+inline TeCoord2D TeRaster::coord2Index(TeCoord2D pt)
+{ return decoder_->coord2Index(pt); }
+
+	
+inline const string& TeRaster::errorMessage() const
+{	return params_.errorMessage_; }
+
+inline int TeRaster::iterator::currentLine()
+{ return linCurrent_;}
+
+inline int TeRaster::iterator::currentColumn()
+{return colCurrent_; }
+
+inline int TeRaster::iterator::nBands(void)
+{	return nBands_; }
+
+inline bool TeRaster::iteratorPoly::end()
+{	return end_; }
+
+inline int TeRaster::iteratorPoly::nLinesInPoly()
+{ return nLinesInPoly_;}
+
+inline int TeRaster::iteratorPoly::nColsInPoly()
+{ return nColsInPoly_;}
+
+/** @defgroup RasterFunc Raster functions
+	A set of functions that manipulates raster representations
+ *  @{
+ */
+/**	Clips a raster representation using a polygon set as a mask
+	\param	whole		pointer to the raster to be clipped
+	\param  mask		the polygon set used as the mask to clip the raaster
+	\param  geomProj	pointer the projection of the polygons used as mask
+	\param  clipName	name of the file (or database table) that will contains the clipped raster
+	\param  background	value to be used as the background of the clipped raster
+	\param	decId		optional parameter that explicitly indicates the decoder (or format) used to generate the clipped raster
+	\return a pointer to the generated clipped raster if it succeed or a null pointer otherwise.
+	
+	If the decId is equal to "DB" it is assumed that the clipped raster will be generated
+	in the same database as the input raster. If the input raster is not in a database, the 
+	routine returns a error.
+*/
+TL_DLL TeRaster*
+TeRasterClipping(TeRaster* whole, TePolygonSet& mask, TeProjection* geomProj, const string& clipName, double background, const string& decId="");
+
+//@}
+
 #endif
 
 
diff --git a/src/terralib/kernel/TeRasterMemManager.cpp b/src/terralib/kernel/TeRasterMemManager.cpp
new file mode 100755
index 0000000..408dfd7
--- /dev/null
+++ b/src/terralib/kernel/TeRasterMemManager.cpp
@@ -0,0 +1,503 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+#include "TeRasterMemManager.h"
+
+#include "TeUtils.h"
+#include "TeErrorLog.h"
+#include "TeTempFilesRemover.h"
+#include "TeAgnostic.h"
+
+
+TeRasterMemManager::TeRasterMemManager()
+{
+  init();
+}
+
+
+TeRasterMemManager::~TeRasterMemManager()
+{
+  clear();
+}
+
+
+void TeRasterMemManager::clear()
+{
+  if( bands_nmb_ )
+  {
+    /* Cleaning the ram tiles ( the disk tile included !! ) */
+    
+    const unsigned int tottiles = (unsigned int)all_tiles_ptrs_vec_.size();
+    
+    for( unsigned int idx = 0 ; idx < tottiles ; ++idx )
+    {
+      if( all_tiles_ptrs_vec_[ idx ] != cur_disk_tile_ptr_ )
+      {
+        delete[] ( (TilePtrT)(all_tiles_ptrs_vec_[ idx ]) );
+      }
+    }
+    
+    if( cur_disk_tile_ptr_ ) delete[] cur_disk_tile_ptr_;
+    
+    /* closing and removing disk files */
+    
+    for( unsigned int odfidx = 0 ; odfidx < open_disk_files_vec_.size() ; 
+      ++odfidx )
+    {
+      TeTempFilesRemover::instance().removeFile( open_disk_files_vec_[ 
+        odfidx ].second );      
+    }
+    
+    /* cleaning containers */
+    
+    bands_tiles_sizes_.clear();
+    all_tiles_ptrs_vec_.clear();
+    tile2file_vec_.clear();
+    open_disk_files_vec_.clear();
+
+    /* Reseting the the default values */
+    
+    init();
+  }
+}
+
+bool TeRasterMemManager::reset( unsigned int bands, 
+  unsigned int tiles_per_band, const std::vector< unsigned int >& tiles_sizes,
+  MemoryPolicy mem_pol )
+{
+  clear();
+  
+  TEAGN_TRUE_OR_RETURN( ( ( bands != 0 ) && ( tiles_per_band != 0 ) &&
+    ( tiles_sizes.size() == bands ) ), "Invalid parameters" );
+
+  tiles_per_band_ = tiles_per_band;
+  bands_nmb_ = bands;
+  bands_tiles_sizes_ = tiles_sizes;
+  
+  const unsigned int total_tiles_number = tiles_per_band_ * bands_nmb_;
+  
+  /* Allocating support vectors */
+  
+  try
+  {
+    all_tiles_ptrs_vec_.resize( tiles_per_band_ * bands_nmb_ );
+    tile2file_vec_.resize( tiles_per_band_ * bands_nmb_ );
+    
+    Tiles2FileData dummydata;
+    
+    for( unsigned int tiles_vects_index = 0 ; 
+      tiles_vects_index < total_tiles_number ;
+      ++tiles_vects_index ) {
+        
+      all_tiles_ptrs_vec_[ tiles_vects_index ] = 0;
+      tile2file_vec_[ tiles_vects_index ] = dummydata;
+    }      
+  }
+  catch(...)
+  {
+    clear();
+    
+    TEAGN_LOG_AND_RETURN( 
+      "Unable to allocate support vectors" )
+  }
+  
+  /* Allocating the disk tiles mem buffer */
+  
+  try
+  {
+    unsigned int maxtilesize = 0;
+    for( unsigned int curr_band = 0 ; 
+      curr_band < bands_nmb_ ;  ++curr_band ) {    
+      
+      if( bands_tiles_sizes_[ curr_band ] > maxtilesize )
+      {
+        maxtilesize = bands_tiles_sizes_[ curr_band ];
+      }
+    }
+    
+    cur_disk_tile_ptr_ = (TilePtrT) new TileDataT[ maxtilesize ];
+  }
+  catch(...)
+  {
+    clear();
+    
+    TEAGN_LOG_AND_RETURN( 
+      "Unable to allocate disk tiles RAM buffer" )
+  }  
+  
+  /* Allocating tiles */
+  
+  if( mem_pol == DiskMemPol ) {
+    if( ! allocateDiskTilesFiles( 0, 0 ) )
+    {
+      clear();
+      
+      return false;
+    }
+    else
+    {
+      TEAGN_TRUE_OR_THROW( getTilePointer( 0, 0 ),
+        "Invalid tile pointer" )
+    }
+  } else {
+    unsigned int curr_band = 0;
+    unsigned int curr_tile = 0;
+    TilePtrT newtile_ptr = 0;
+    const unsigned long int max_ram_tiles = getMaxRAMTiles( bands_nmb_,
+      tiles_per_band_, bands_tiles_sizes_ );
+    unsigned int curr_ram_tiles_nmb = 0; 
+    
+    for( curr_band = 0 ; curr_band < bands ; ++curr_band ) {
+      unsigned int tile_bytes = bands_tiles_sizes_[ curr_band ];
+      TEAGN_TRUE_OR_THROW( ( tile_bytes > 0 ), "Invalid tile bytes" );      
+      
+      unsigned long int curr_tile_index = 0;
+      
+      for( curr_tile = 0 ; curr_tile < tiles_per_band_ ; ++curr_tile ) {
+        curr_tile_index = ( curr_band * tiles_per_band_ ) + curr_tile;
+        
+        switch( mem_pol ) {
+          case RAMMemPol :
+          {
+            try
+            {
+              newtile_ptr = (TilePtrT) new TileDataT[ tile_bytes ];
+                
+              if( newtile_ptr == 0 ) {
+                clear();
+                
+                return false;
+              } else {
+                all_tiles_ptrs_vec_[ curr_tile_index ] = 
+                  newtile_ptr;
+              }
+            }
+            catch(...)
+            {
+              clear();
+              
+              return false;
+            }
+              
+            break;
+          }
+          case AutoMemPol :
+          {
+            if( curr_ram_tiles_nmb <= max_ram_tiles ) {
+              try
+              {
+                newtile_ptr = (TilePtrT) new TileDataT[ tile_bytes ];
+                  
+                if( newtile_ptr == 0 ) {
+                  if( ! allocateDiskTilesFiles( curr_band, curr_tile ) )
+                  {
+                    clear();
+                    
+                    return false;
+                  }
+                  else
+                  {
+                    TEAGN_TRUE_OR_THROW( getTilePointer( curr_band, 
+                      curr_tile ), "Invalid tile pointer" )
+                      
+                    /* break the tiles loop */
+                    
+                    curr_band = bands;
+                    curr_tile = tiles_per_band_;
+                  }
+                } else {
+                  all_tiles_ptrs_vec_[ curr_tile_index ] = 
+                    newtile_ptr;
+                  
+                  ++curr_ram_tiles_nmb;
+                }
+              }
+              catch(...)
+              {
+                if( ! allocateDiskTilesFiles( curr_band, curr_tile ) )
+                {
+                  clear();
+                  
+                  return false;
+                }
+                else
+                {
+                  TEAGN_TRUE_OR_THROW( getTilePointer( curr_band, 
+                    curr_tile ), "Invalid tile pointer" )
+                    
+                  /* break the tiles loop */
+                  
+                  curr_band = bands;
+                  curr_tile = tiles_per_band_;                    
+                }
+              }
+            } else {
+              if( ! allocateDiskTilesFiles( curr_band, curr_tile ) )
+              {
+                clear();
+                
+                return false;
+              }
+              else
+              {
+                TEAGN_TRUE_OR_THROW( getTilePointer( curr_band, 
+                  curr_tile ), "Invalid tile pointer" )
+                  
+                /* break the tiles loop */
+                
+                curr_band = bands;
+                curr_tile = tiles_per_band_;                  
+              }              
+            }
+                            
+            break;
+          }
+          default :
+          {
+            clear();
+            
+            TEAGN_LOG_AND_THROW( "Invalid memory policy" );
+      
+            break;
+          }
+        }
+      }
+    }
+  }
+  
+  return true;
+}
+
+
+void TeRasterMemManager::init()
+{
+  tiles_per_band_ = 0;
+  bands_nmb_ = 0;
+  max_disk_file_size_ = 1024 * 1024 * 100;
+  cur_disk_tile_ptr_ = 0;
+  cur_disk_tile_idx_ = -1;
+}
+
+
+bool TeRasterMemManager::allocateDiskTilesFiles( 
+  unsigned int starting_band_index, unsigned int starting_tile_index )
+{
+  TEAGN_TRUE_OR_THROW( ( bands_tiles_sizes_.size() == bands_nmb_ ),
+    "Invalid tile sizes vector" );    
+  TEAGN_TRUE_OR_THROW( ( starting_band_index < bands_nmb_ ),
+    "Invalid starting_band_index" );    
+  TEAGN_TRUE_OR_THROW( ( starting_tile_index < tiles_per_band_ ),
+    "Invalid starting_tile_index" );    
+ 
+  /* Allocating disk files */    
+  
+  for( unsigned int curr_band = starting_band_index ; curr_band < bands_nmb_ ; 
+    ++curr_band ) {
+  
+    const unsigned int tile_size = bands_tiles_sizes_[ curr_band ];
+    TEAGN_TRUE_OR_THROW( ( tile_size <= max_disk_file_size_ ), 
+      "Invalid tile size" );
+    
+    const unsigned long int tiles_per_file = ( unsigned long int )
+      floor( ( (double)max_disk_file_size_ ) / ( (double) tile_size ) );
+      
+    const unsigned long int file_size = (unsigned long int)
+      ( tiles_per_file * tile_size );
+    
+    unsigned int curr_tiles_in_file = tiles_per_file + 1;
+      
+    unsigned int curr_tile = 0;
+    if( curr_band == starting_band_index ) {
+      curr_tile = starting_tile_index;
+    }
+    
+    unsigned long int curr_tile_index = 0;
+    
+    FILE* currfileptr = 0;
+    std::string currfilename;
+      
+    while( curr_tile < tiles_per_band_ ) {
+      curr_tile_index = ( curr_band * tiles_per_band_ ) + curr_tile;
+    
+      if( curr_tiles_in_file >= tiles_per_file ) {
+        /* create a new disk file */
+
+        if( ! createNewDiskFile( file_size, currfilename, &currfileptr ) )
+        {
+          TEAGN_LOGERR( "Unable to create temporary disk file" );
+          
+          clear();
+          
+          return false;           
+        }
+        
+        std::pair< FILE*, std::string > temppair;
+        temppair.first = currfileptr;
+        temppair.second = currfilename;
+        
+        open_disk_files_vec_.push_back( temppair );
+        
+        TeTempFilesRemover::instance().addFile( currfilename,
+          currfileptr );
+        
+        curr_tiles_in_file = 0;
+      }
+      
+      tile2file_vec_[ curr_tile_index ].fileptr_ = currfileptr;
+      tile2file_vec_[ curr_tile_index ].fileoff_ = curr_tiles_in_file *
+        tile_size;
+      tile2file_vec_[ curr_tile_index ].tilesize_ = tile_size;
+      
+      ++curr_tiles_in_file;
+      
+      ++curr_tile;
+    }
+    
+  }
+  
+  return true;
+}
+
+
+unsigned long int TeRasterMemManager::getMaxRAMTiles( unsigned int bands, 
+  unsigned int tiles_per_band,
+  const std::vector< unsigned int >& tiles_sizes)
+{
+  const unsigned long int free_vm = TeGetFreeVirtualMemory();
+  
+  if( free_vm < max_disk_file_size_ )
+  {
+    return 0;
+  }
+  else
+  {
+    const unsigned int max_ram  = (unsigned int)
+      ( 0.90 * ( (double)( free_vm ) ) );    
+    unsigned long int max_ram_tiles = 0;
+    unsigned long int curr_used_ram = 0;
+    
+    for( unsigned int curr_band = 0 ; curr_band < bands ; 
+      ++curr_band ) {
+    
+      const unsigned int tile_size = tiles_sizes[ curr_band ];
+      
+      for( unsigned int curr_tile = 0 ; curr_tile < tiles_per_band ;
+        ++curr_tile ) {
+        
+        if( ( curr_used_ram + tile_size ) > max_ram ) {
+          curr_tile = tiles_per_band;
+          curr_band = bands;
+        } else {
+          ++max_ram_tiles;
+          curr_used_ram += tile_size;
+        }
+      }
+    }
+
+    return max_ram_tiles;
+  }
+}
+
+
+void* TeRasterMemManager::getTilePointer( const unsigned int& band, 
+  const unsigned int& tile)
+{
+  const unsigned int reqtileindex = ( band * tiles_per_band_ ) + tile;
+  
+  TEAGN_DEBUG_CONDITION( ( reqtileindex < ( tiles_per_band_ * bands_nmb_ ) ),
+    "The required band/tile out of range" );
+    
+  TilePtrT tileptr = all_tiles_ptrs_vec_[ reqtileindex ];
+  
+  if( tileptr == 0 ) {
+    /* Flushing the current disk tile back to disk */
+  
+    if( cur_disk_tile_idx_ > (-1) ) {
+      Tiles2FileData& curtiledata = tile2file_vec_[
+        cur_disk_tile_idx_ ];
+      
+      TEAGN_TRUE_OR_THROW( 0 == fseek( curtiledata.fileptr_, 
+        (long)( curtiledata.fileoff_ ), SEEK_SET ),
+        "File seek error" );
+        
+      TEAGN_TRUE_OR_THROW( 1 == fwrite( (void*)cur_disk_tile_ptr_, 
+        (size_t)( curtiledata.tilesize_ ), 1, curtiledata.fileptr_ ),
+        "File write error" )        
+        
+      all_tiles_ptrs_vec_[ cur_disk_tile_idx_ ] = 0;
+    }
+    
+    /* Reading the required tile into RAM */
+    
+    Tiles2FileData& reqtiledata = tile2file_vec_[
+      reqtileindex ];    
+    
+    TEAGN_TRUE_OR_THROW( 0 == fseek( reqtiledata.fileptr_, 
+      (long)( reqtiledata.fileoff_ ), SEEK_SET ),
+      "File seek error" )
+      
+    TEAGN_TRUE_OR_THROW( 1 == fread( (void*)cur_disk_tile_ptr_, 
+      (size_t)( reqtiledata.tilesize_ ), 1, reqtiledata.fileptr_ ),
+      "File read error" )
+      
+    all_tiles_ptrs_vec_[ reqtileindex ] = cur_disk_tile_ptr_;
+      
+    cur_disk_tile_idx_ = reqtileindex;
+      
+    return cur_disk_tile_ptr_;
+  }
+  else
+  {
+    return tileptr;
+  }
+}
+
+
+bool TeRasterMemManager::createNewDiskFile( unsigned long int size,
+  std::string& filename, FILE** fileptr )
+{
+  TEAGN_TRUE_OR_RETURN( TeGetTempFileName( filename ),
+    "Unable to get temporary file name" );
+    
+  (*fileptr) = fopen( filename.c_str(), "wb+" );
+  TEAGN_TRUE_OR_RETURN( (*fileptr) != 0, "Invalid file pointer" )
+  
+  long seekoff = (long)( size - 1 );
+  
+  if( 0 != fseek( (*fileptr), seekoff, SEEK_SET ) )
+  {
+    fclose( (*fileptr) );
+    TEAGN_LOGERR( "File seek error" );
+    return false;
+  }
+
+  unsigned char c = '\0';
+  if( 1 != fwrite( &c, 1, 1, (*fileptr) ) )
+  {
+    fclose( (*fileptr) );
+    TEAGN_LOGERR( "File write error" );
+    return false;
+  }
+    
+  return true;
+}
+
diff --git a/src/terralib/kernel/TeRasterMemManager.h b/src/terralib/kernel/TeRasterMemManager.h
new file mode 100755
index 0000000..5384575
--- /dev/null
+++ b/src/terralib/kernel/TeRasterMemManager.h
@@ -0,0 +1,257 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeRasterMemManager.h
+    \brief This file contains a class that deals with a raster memory management
+*/
+
+#ifndef TERASTERMEMMANAGER_H
+  #define TERASTERMEMMANAGER_H
+
+  #include "TeSharedPtr.h"
+  
+  #include <vector>
+  
+  /**
+   * @brief This class deals with a raster memory management.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   */
+  class TL_DLL TeRasterMemManager {
+  
+    public :
+    
+      /**
+       * @enum Memory policy.
+       */ 
+      enum MemoryPolicy {
+        /**
+         * @brief Automatic memory policy ( Try to use RAM or DISK, 
+         * if there is no avaliable RAM ).
+         */
+        AutoMemPol = 1,
+        /**
+         * @brief RAM memory policy.
+         */
+        RAMMemPol = 2,
+        /**
+         * @brief Disk memory policy.
+         */
+        DiskMemPol = 3
+      };    
+    
+      /**
+       * @brief Default Constructor.
+       */
+      TeRasterMemManager();    
+
+      /**
+       * @brief Default Destructor
+       */
+      ~TeRasterMemManager();
+      
+      /**
+       * @brief Clear all data structures.
+       */
+      void clear();
+      
+      /**
+       * @brief Reset the instance following new raster parameters.
+       * @param bands The number of bands (channels).
+       * @param tiles_per_band The tiles inside each band.
+       * @param tiles_sizes The tile size (bytes) for each band.
+       * @param mem_pol Memory policy.
+       * @return true if OK, false on errors.
+       */
+      bool reset( unsigned int bands, unsigned int tiles_per_band,
+        const std::vector< unsigned int >& tiles_sizes,
+         MemoryPolicy mem_pol );
+
+      /**
+       * @brief Returnas a pointer to a internal allocated tile.
+       * @param band Band index.
+       * @param tile Tile index.
+       * @return a pointer to a internal allocated tile. 
+       * @note This pointer is only valid until the next call to this function.
+       */
+      void* getTilePointer( const unsigned int& band, 
+        const unsigned int& tile );      
+      
+    protected :
+    
+      /**
+       * @brief Tiles-to-file data class.
+       */         
+      class Tiles2FileData
+      {
+        public :
+          FILE* fileptr_;
+          unsigned int fileoff_;
+          unsigned int tilesize_;
+          
+          Tiles2FileData()
+          {
+            fileptr_ = 0;
+            fileoff_ = 0;
+            tilesize_ = 0;
+          }
+      };
+            
+      /**
+       * @typedef unsigned char TileDataT 
+       * Tile data type.
+       */    
+      typedef unsigned char TileDataT;    
+    
+      /**
+       * @typedef TileDataT* TilePtrT
+       * Tile pointer type.
+       */    
+      typedef TileDataT* TilePtrT;
+      
+      /**
+       * @typedef std::vector< TilePtrT > TilesPtrsVecT 
+       * Tiles pointers vector type.
+       */    
+      typedef std::vector< TilePtrT > TilesPtrsVecT;   
+      
+      /**
+       * @typedef std::vector< Tiles2FileData >
+       * Tiles to their respective disk file and offset.
+       */         
+      typedef std::vector< Tiles2FileData > 
+        Tiles2FileVecT;
+        
+      /**
+       * @typedef std::vector< std::pair< FILE*, unsigned int > >
+       * Tiles to their respective disk file and offset.
+       */         
+      typedef std::vector< std::pair< FILE*, std::string > > 
+        OpenDiskFilesVecT;        
+      
+      /**
+       * @brief Tiles per band.
+       */    
+      unsigned int tiles_per_band_;
+      
+      /**
+       * @brief The number of bands.
+       */    
+      unsigned int bands_nmb_;
+      
+      /**
+       * @brief The maximum disk file size.
+       */     
+      unsigned long int max_disk_file_size_;      
+      
+      /**
+       * @brief The current active disk tile copy in mem.
+       */     
+      TilePtrT cur_disk_tile_ptr_;
+      
+      /**
+       * @brief The index of the current active disk tile copy in mem
+       * ( default -1 , no disk tile active ).
+       */     
+      long int cur_disk_tile_idx_;      
+      
+      /**
+       * @brief A vector of tiles sizes for each band.
+       */        
+      std::vector< unsigned int > bands_tiles_sizes_;
+    
+      /**
+       * @brief A vector of pointers to all allocated tiles.
+       * @note Declared as a simple vector to optimize the
+       * tile access.
+       */     
+      TilesPtrsVecT all_tiles_ptrs_vec_;
+      
+      /**
+       * @brief A vector mapping tiles indexes to their respective 
+       * disk file pointer and offset inside that file.
+       */        
+      Tiles2FileVecT tile2file_vec_;
+      
+      /**
+       * @brief A vector all opened disk files names.
+       */        
+      OpenDiskFilesVecT open_disk_files_vec_;   
+         
+
+      /**
+       * @brief Initiates the internal variables to their default values.
+       */    
+      void init();
+      
+      /**
+       * @brief Allocate disk files starting at a specific
+       * band and tile number.
+       * @param starting_band_index Starting Band index.
+       * @param starting_tile_index Starting tile index.
+       * @return true if OK, false on errors.
+       * @note bands_ptr_ must be previously allocated.
+       */    
+      bool allocateDiskTilesFiles( 
+        unsigned int starting_band_index,
+        unsigned int starting_tile_index );
+        
+      /**
+       * @brief Return the maximum RAM tiles that can fit in the
+       * current RAM for all bands.
+       * @param bands The number of bands (channels).
+       * @param tiles_per_band The tiles inside each band.
+       * @param tiles_sizes The tile size (bytes) for each band.       
+       * @return Return the maximum RAM tiles.
+       */    
+      unsigned long int getMaxRAMTiles( unsigned int bands, 
+        unsigned int tiles_per_band,
+        const std::vector< unsigned int >& tiles_sizes );        
+        
+      /**
+       * @brief Create a new disk file.
+       * @param filename The file name.
+       * @param size The file size.
+       * @param fileptr The file pointer.
+       * @return true if OK. false on errors.
+       */
+      bool createNewDiskFile( unsigned long int size,
+        std::string& filename, FILE** fileptr );
+      
+    private :
+    
+      /**
+       * @brief Alternative Constructor.
+       * @param ext External reference.
+       */    
+      TeRasterMemManager( const TeRasterMemManager& ) {};
+       
+      /**
+       * @brief =operator implementation.
+       * @param ext External reference.
+       */    
+      const TeRasterMemManager& operator=( const TeRasterMemManager& )
+        { return *this; };
+      
+  };
+  
+#endif
+
diff --git a/src/terralib/kernel/TeRasterParams.cpp b/src/terralib/kernel/TeRasterParams.cpp
old mode 100644
new mode 100755
index 4770127..cfb704c
--- a/src/terralib/kernel/TeRasterParams.cpp
+++ b/src/terralib/kernel/TeRasterParams.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -27,6 +27,11 @@ of this library and its documentation.
 
 #include "TeRasterParams.h"
 #include "TeUtils.h"
+#include "TeAsciiFile.h"
+#include "TeAgnostic.h"
+
+#include <cstring>
+#include <cstdlib>
 
 // copy constructor
 TeRasterParams::TeRasterParams(const TeRasterParams& other)
@@ -40,27 +45,23 @@ TeRasterParams::TeRasterParams(const TeRasterParams& other)
 	swap_		= other.swap_;
 	useDummy_	= other.useDummy_;
 
-	nbitsperPixel_.resize(nbands_);
-	vmin_.resize(nbands_);
-	vmax_.resize(nbands_);
-	bands_.resize(nbands_);
-	photometric_.resize(nbands_);
-	dataType_.resize(nbands_);
-	dummy_.resize(nbands_);
-	compression_.resize(nbands_);
-
-	int i;
-	for (i=0; i<nbands_; i++)
-	{
-		nbitsperPixel_[i] = other.nbitsperPixel_[i];
-		vmin_[i] = other.vmin_[i];
-		vmax_[i] = other.vmax_[i];
-		bands_[i] = other.bands_[i];
-		photometric_[i] = other.photometric_[i];
-		dataType_[i] = other.dataType_[i];
-		dummy_[i] = other.dummy_[i];
-		compression_[i] = other.compression_[i];
-	}
+	nbitsperPixel_.clear();
+	vmin_.clear();
+	vmax_.clear();
+	bands_.clear();
+	photometric_.clear();
+	dataType_.clear();
+	dummy_.clear();
+	compression_.clear();
+
+	nbitsperPixel_= other.nbitsperPixel_;
+	vmin_= other.vmin_;
+	vmax_= other.vmax_;
+	bands_= other.bands_;
+	photometric_= other.photometric_;
+	dataType_= other.dataType_;
+	dummy_= other.dummy_;
+	compression_= other.compression_;
 
 	resx_ = other.resx_;
 	resy_ = other.resy_;
@@ -79,20 +80,30 @@ TeRasterParams::TeRasterParams(const TeRasterParams& other)
 		projection_=0;
 	box_ = other.box_;
 	database_ = other.database_;
+	layerId_ = other.layerId_;
+	objectId_ = other.objectId_;
+
 	interleaving_ = other.interleaving_;
 
+	lutr_.clear();
+	lutg_.clear();
+	lutb_.clear();
 	lutr_ = other.lutr_;
 	lutg_ = other.lutg_;
 	lutb_ = other.lutb_;
+
 	dyJ_ = other.dyJ_;
 	dxI_ = other.dxI_;
 	dyI_ = other.dyI_;
 	dxJ_ = other.dxJ_;
 	x0_ = other.x0_;
 	y0_ = other.y0_;
+	errorMessage_ = other.errorMessage_;
+	hasSetDummy_ = other.hasSetDummy_;
+	date_ = other.date_;
 }
 
-// pperator =
+// operator =
 TeRasterParams& 
 TeRasterParams::operator=(const TeRasterParams& rhs)
 {
@@ -107,26 +118,23 @@ TeRasterParams::operator=(const TeRasterParams& rhs)
 		useDummy_	= rhs.useDummy_;
 		lutName_	= rhs.lutName_;
 
-		nbitsperPixel_.resize(nbands_);
-		vmin_.resize(nbands_);
-		vmax_.resize(nbands_);
-		bands_.resize(nbands_);
-		photometric_.resize(nbands_);
-		dataType_.resize(nbands_);
-		dummy_.resize(nbands_);
-		compression_.resize(nbands_);
-
-		for (int i=0; i<nbands_; i++)
-		{
-			nbitsperPixel_[i] = rhs.nbitsperPixel_[i];
-			vmin_[i] = rhs.vmin_[i];
-			vmax_[i] = rhs.vmax_[i];
-			bands_[i] = rhs.bands_[i];
-			photometric_[i] = rhs.photometric_[i];
-			dataType_[i] = rhs.dataType_[i];
-			dummy_[i] = rhs.dummy_[i];
-			compression_[i] = rhs.compression_[i];
-		}
+		nbitsperPixel_.clear();
+		vmin_.clear();
+		vmax_.clear();
+		bands_.clear();
+		photometric_.clear();
+		dataType_.clear();
+		dummy_.clear();
+		compression_.clear();
+
+		nbitsperPixel_= rhs.nbitsperPixel_;
+		vmin_= rhs.vmin_;
+		vmax_= rhs.vmax_;
+		bands_= rhs.bands_;
+		photometric_= rhs.photometric_;
+		dataType_= rhs.dataType_;
+		dummy_= rhs.dummy_;
+		compression_= rhs.compression_;
 
 		resx_ = rhs.resx_;
 		resy_ = rhs.resy_;
@@ -148,17 +156,26 @@ TeRasterParams::operator=(const TeRasterParams& rhs)
 			projection_ = TeProjectionFactory::make(rhs.projection_->params());
 		box_ = rhs.box_;
 		database_ = rhs.database_;			
+		layerId_ = rhs.layerId_;
+		objectId_ = rhs.objectId_;
 		interleaving_ = rhs.interleaving_;
 
+		lutr_.clear();
+		lutg_.clear();
+		lutb_.clear();
 		lutr_ = rhs.lutr_;
 		lutg_ = rhs.lutg_;
 		lutb_ = rhs.lutb_;
+
 		dyJ_ = rhs.dyJ_;
 		dxI_ = rhs.dxI_;
 		x0_ = rhs.x0_;
 		y0_ = rhs.y0_;
 		dyI_ =  rhs.dyI_;
 		dxJ_ =  rhs.dxJ_;
+		errorMessage_ = rhs.errorMessage_;
+		hasSetDummy_ = rhs.hasSetDummy_;
+		date_ = rhs.date_;
 	}
 	return *this;
 }
@@ -178,7 +195,7 @@ TeRasterParams::resizeToTiling(TeBox& bb, int bWidth, int bHeight)
 
 //! Calculates the *bounding box* when box coordinates are relative to the center of the pixel
 TeBox	
-TeRasterParams::boundingBox ()
+TeRasterParams::boundingBox () const
 { return TeBox (box_.x1()-resx_/2.,
 				box_.y1()-resy_/2.,
 				box_.x2()+resx_/2.,
@@ -333,29 +350,61 @@ TeRasterParams::lowerLeftResolutionSize (double left, double lower,
 void 
 TeRasterParams::nBands(int n)
 {
+  TEAGN_TRUE_OR_THROW( ( n > 0 ), "Invalid number of bands" )
+  
 	if (nbands_ != n)
 	{
-		if (n < 1)
-			n = 1;
-		nbands_ = n;
-		nbitsperPixel_.resize(nbands_);
-		vmin_.resize(nbands_);
-		vmax_.resize(nbands_);
-		bands_.resize(nbands_);
-		photometric_.resize(nbands_);
-		dataType_.resize(nbands_);
-		dummy_.resize(nbands_);
-		compression_.resize(nbands_);
-		double d = dummy_[0];
-		for (int i = 0; i<n; i++)
-		{
-			bands_[i] = i;
-			vmin_[i] = TeMAXFLOAT;
-			vmax_[i] = -TeMAXFLOAT;
-			dataType_[i] = TeUNSIGNEDCHAR;
-			photometric_[i] = TeRASTERUNKNOWN;
-			dummy_[i] = d;
+		if ( nbands_ == 0 ) 
+    {
+		  nbitsperPixel_.clear();
+		  vmin_.clear();
+		  vmax_.clear();
+		  bands_.clear();
+		  photometric_.clear();
+		  dataType_.clear();
+		  dummy_.clear();
+		  compression_.clear();
+
+		  for (int i = 0; i<n; i++)
+		  {
+        nbitsperPixel_.push_back( 8 );
+			  vmin_.push_back( TeMAXFLOAT );
+			  vmax_.push_back( -TeMAXFLOAT );
+        bands_.push_back( i );
+        photometric_.push_back( TeRasterParams::TeUnknown );
+			  dataType_.push_back( TeUNSIGNEDCHAR );
+			  dummy_.push_back( 0 );
+        compression_.push_back( TeNoCompression );
+		  }
+		} 
+    else if ( nbands_ > n ) 
+    {
+		  for( unsigned int count = ( nbands_ - n ) ; count > 0 ; --count ) {
+		    nbitsperPixel_.pop_back();
+		    vmin_.pop_back();
+		    vmax_.pop_back();
+		    bands_.pop_back();
+		    photometric_.pop_back();
+		    dataType_.pop_back();
+		    dummy_.pop_back();
+		    compression_.pop_back();		  
+		  }
+		} 
+    else /* nbands_ < n */
+    {
+		  for( unsigned int count = ( n - nbands_ ) ; count > 0 ; --count ) {
+		    nbitsperPixel_.push_back( nbitsperPixel_[ nbands_ - 1 ] );
+		    vmin_.push_back( vmin_[ nbands_ - 1 ] );
+		    vmax_.push_back( vmax_[ nbands_ - 1 ] );
+		    bands_.push_back( bands_[ nbands_ - 1 ] );
+		    photometric_.push_back( photometric_[ nbands_ - 1 ] );
+		    dataType_.push_back( dataType_[ nbands_ - 1 ] );
+		    dummy_.push_back( dummy_[ nbands_ - 1 ] );
+		    compression_.push_back( compression_[ nbands_ - 1 ] );  
+		  }		
 		}
+		
+		nbands_ = n;
 	}
 }
 
@@ -375,40 +424,55 @@ void
 TeRasterParams::setDataType(TeDataType type, int band)
 {
 	int nb = 8;
+	double defValue = 0.0;
 	switch (type) {
 	case TeUNSIGNEDCHAR:
 		nb = sizeof(unsigned char)*8;
+		defValue = 255;
 		break;
 	case TeCHAR :
+		defValue = 255;
 		nb = sizeof(char)*8;
 		break;
 	case TeUNSIGNEDSHORT:
 		nb = sizeof(unsigned short)*8;
+		defValue = pow(2.,nb)-1;
 		break;
 	case (TeSHORT):
 		nb = sizeof(short)*8;
+		defValue = pow(2.,nb)-1;
 		break;
 	case (TeUNSIGNEDLONG):
 		nb = sizeof(unsigned long)*8;
+		defValue = pow(2.,nb)-1;
 		break;
 	case (TeLONG):
 		nb = sizeof(long)*8;
 		break;
 	case (TeFLOAT):
 		nb = sizeof(float)*8;
+		defValue = pow(2.,nb)-1;
 		break;
 	case (TeDOUBLE):
 		nb = sizeof(double)*8;
+		defValue = TeMAXFLOAT;
         break;
     default:
         break;
 	}
 	if (band<0 || band>= (int)dataType_.size())
-		for (unsigned int i=0; i<dataType_.size(); dataType_[i]=type,nbitsperPixel_[i]=nb,i++);
+		for (unsigned int i=0; i<dataType_.size();++i)
+		{
+			dataType_[i]=type;
+			nbitsperPixel_[i]=nb;
+			if (!hasSetDummy_)
+				dummy_[i]=defValue;
+		}
 	else
 	{
 		dataType_[band]=type;
 		nbitsperPixel_[band]=nb;
+		dummy_[band]=defValue;
 	}
 }
 
@@ -416,13 +480,15 @@ int TeRasterParams::elementSize(int band)
 {
 	switch (dataType_[band]) {
 	case TeUNSIGNEDCHAR:
-		return (sizeof(unsigned char));
+		return sizeof(unsigned char);
 	case TeCHAR :
-		return (sizeof(char));
+		return sizeof(char);
 	case TeUNSIGNEDSHORT:
-		return (sizeof(unsigned short));
+		return sizeof(unsigned short);
 	case (TeSHORT):
-		return (sizeof(short));
+		return sizeof(short);
+	case TeINTEGER:
+		return sizeof(int);
 	case (TeUNSIGNEDLONG):
 		return (sizeof(unsigned long));
 	case (TeLONG):
@@ -436,7 +502,7 @@ int TeRasterParams::elementSize(int band)
 
 
 void 
-TeRasterParams::setPhotometric(short photom, int band)
+TeRasterParams::setPhotometric(TeRasterParams::TeRasterPhotometricInterpretation photom, int band)
 {
 	if (band<0 || band>= (int)photometric_.size())
 		for (unsigned int i=0; i<photometric_.size(); photometric_[i]=photom,i++);
@@ -445,7 +511,7 @@ TeRasterParams::setPhotometric(short photom, int band)
 }
 
 void 
-TeRasterParams::setCompressionMode(TeCompressionMode cmode, int band)
+TeRasterParams::setCompressionMode(TeRasterParams::TeRasterCompressionMode cmode, int band)
 {
 	if (band<0 || band>= (int)compression_.size())
 		for (unsigned int i=0; i<compression_.size(); compression_[i]=cmode,i++);
@@ -461,13 +527,14 @@ TeRasterParams::setDummy(double dummy, int band)
 	else
 		dummy_[band] = dummy;
 	this->useDummy_ = true;
+	hasSetDummy_ = true;
 }
 
 TeCoord2D 
-TeRasterParams::coord2Index (TeCoord2D& pt)
+TeRasterParams::coord2Index (const TeCoord2D& pt) const
 {
 	double i, j;
-	if (dxI_ != 0 || dyJ_ != 0 || dxJ_ != 0 || dyI_ != 0)
+	if (dxI_ != 0 || dyJ_ != 0)
 	{
 		double x = pt.x();
 		double y = pt.y();
@@ -485,17 +552,14 @@ TeRasterParams::coord2Index (TeCoord2D& pt)
 }
 
 TeCoord2D 
-TeRasterParams::index2Coord (TeCoord2D& pt)
+TeRasterParams::index2Coord (const TeCoord2D& pt) const
 {
 	double x,y;
 	double i = pt.y();
 	double j = pt.x();
 		
-	if (dxI_ != 0 || dyJ_ != 0 || dxJ_ != 0 || dyI_ != 0)
+	if (dxI_ != 0 || dyJ_ != 0)
 	{
-		// X= x0 + J*Dx_j + I*Dx_i
-		// Y= Y0 + J*Dy_j + I*Dy_i 
-
 		x = x0_ + i*dxI_ + j*dxJ_;
 		y = y0_ + i*dyI_ + j*dyJ_;
 	}
@@ -507,3 +571,305 @@ TeRasterParams::index2Coord (TeCoord2D& pt)
 	return TeCoord2D (x,y);
 }
 
+void
+TeRasterParams::writeParametersFile()
+{
+	string metFileName = TeGetName (fileName_.c_str())+".met";
+	try {
+		TeAsciiFile metFile(metFileName,"w");
+		string line = "%Raw raster file metadata\n";
+		metFile.writeString(line);
+		line = "NROWS " + Te2String(nlines_);
+		metFile.writeString(line);
+		metFile.writeNewLine();
+		line = "NCOLS " + Te2String(ncols_);
+		metFile.writeString(line);
+		metFile.writeNewLine();
+		line = "NBANDS " + Te2String(this->nBands());
+		metFile.writeString(line);
+		metFile.writeNewLine();
+
+		if (this->nBands() > 1)
+		{
+			line = "INTERLEAVING ";
+			if (interleaving_ == TeRasterParams::TePerPixel)
+				line += "BIP";
+			else if (interleaving_ == TeRasterParams::TePerLine)
+				line += "BIL";
+			else
+				line += "BSQ";
+			metFile.writeString(line);
+			metFile.writeNewLine();
+		}
+
+		int ndecimals = 0;
+		line = "DATATYPE ";
+		if (dataType_[0] == TeBIT)
+			line += "bit";
+		else if (dataType_[0] == TeUNSIGNEDCHAR)
+			line += "unsignedchar";
+		else if (dataType_[0] == TeCHAR)
+			line += "char";
+		else if (dataType_[0] == TeUNSIGNEDSHORT)
+			line += "unsignedshort";
+		else if (dataType_[0] == TeSHORT)
+			line += "short";
+		else if (dataType_[0] == TeINTEGER)
+			line += "integer";
+		else if (dataType_[0] == TeUNSIGNEDLONG)
+			line += "unsignedlong";
+		else if (dataType_[0] == TeLONG)
+			line += "long";
+		else if (dataType_[0] == TeFLOAT)
+		{
+			line += "float";
+			ndecimals = 6;
+		}
+		else if (dataType_[0] == TeDOUBLE)
+		{
+			line += "double";	
+			ndecimals = 10;
+		}
+		metFile.writeString(line);
+		metFile.writeNewLine();
+		
+		if (swap_)
+		{
+			line = "SWAPPED yes";
+			metFile.writeString(line);
+			metFile.writeNewLine();
+		}
+		else
+			line.clear();
+		if (useDummy_)
+		{
+			line += "NO_DATA " + Te2String(dummy_[0], ndecimals);
+			metFile.writeString(line);
+			metFile.writeNewLine();
+		}
+    
+    if( projection_ ) {
+      if (projection_->name() == "NoProjection" ||
+        projection_->name() == "LatLong") {
+        
+        ndecimals = 8;
+      } else {
+        ndecimals = 3;
+      }
+    } else {
+      ndecimals = 8;
+    }
+
+		line = "RESOLUTION_X " + Te2String(resx_,ndecimals);
+		metFile.writeString(line);
+		metFile.writeNewLine();
+		line = "RESOLUTION_Y " + Te2String(resy_,ndecimals);
+		metFile.writeString(line);
+		metFile.writeNewLine();
+		line = "LOWERLEFT_X " + Te2String(this->box().x1_,ndecimals);
+		metFile.writeString(line);
+		metFile.writeNewLine();
+		line = "LOWERLEFT_Y " + Te2String(this->box().y1_,ndecimals);
+		metFile.writeString(line);
+		metFile.writeNewLine();
+		if (this->projection())
+		{
+			line = "PROJECTION ";
+			line += this->projection()->describe();
+			metFile.writeString(line);
+			metFile.writeNewLine();
+			line = "DATUM " +  this->projection()->datum().name();
+			metFile.writeString(line);
+		}
+	}
+	catch(...)
+	{
+	}
+}
+
+
+
+void 
+TeRasterParams::readParametersFile()
+{
+	// read all keys in the metadata file (there is no order expected) 
+	string metFileName = TeGetName (fileName_.c_str())+".met";
+	map<string,string> metadata;
+	try {
+		TeAsciiFile metFile(metFileName,"r");
+		string key, value;
+		while (metFile.isNotAtEOF())
+		{
+			key = metFile.readString();
+			if (key[0] == '%')
+			{
+				metFile.findNewLine();
+				continue;
+			}
+			value = metFile.readString();
+			metadata.insert(make_pair(key,value));
+			metFile.findNewLine();
+		}
+	}
+	catch(...)
+	{
+	}
+	if (!metadata.empty())
+	{
+		double xll=0, yll=0;
+		map<string,string>::iterator it;
+		it = metadata.find("NROWS");
+		if (it != metadata.end())
+			nlines_ = atoi(it->second.c_str());
+		it = metadata.find("NCOLS");
+		if (it != metadata.end())
+			ncols_ = atoi(it->second.c_str());
+		it = metadata.find("NBANDS");
+		if (it != metadata.end())
+			this->nBands(atoi(it->second.c_str()));
+		else
+			this->nBands(1);
+		it = metadata.find("RESOLUTION_X");
+		if (it != metadata.end())
+			resx_ = atof(it->second.c_str());
+		it = metadata.find("RESOLUTION_Y");
+		if (it != metadata.end())
+			resy_ = atof(it->second.c_str());
+		it = metadata.find("LOWERLEFT_X");
+		if (it != metadata.end())
+		{
+			xll = atof(it->second.c_str());
+			it = metadata.find("LOWERLEFT_Y");
+			if (it != metadata.end())
+			{
+				yll = atof(it->second.c_str());
+				lowerLeftResolutionSize(xll,yll, resx_, resy_,ncols_, nlines_);
+			}
+		}
+		it = metadata.find("INTERLEAVING");
+		if (it != metadata.end())
+		{
+			if (it->second == "BIL")
+				interleaving_ = TeRasterParams::TePerLine;
+			else if (it->second == "BSQ")
+				interleaving_ = TeRasterParams::TePerBand;
+			else  interleaving_ = TeRasterParams::TePerPixel;
+		}
+
+		it = metadata.find("DATATYPE");
+		if (it != metadata.end())
+		{
+			if (it->second == "bit")
+				this->setDataType(TeBIT);
+			else if (it->second == "unsignedchar")
+				this->setDataType(TeUNSIGNEDCHAR);
+			else if (it->second == "char")
+				this->setDataType(TeCHAR);
+			else if (it->second == "unsignedshort")
+				this->setDataType(TeUNSIGNEDSHORT);
+			else if (it->second == "short")
+				this->setDataType(TeSHORT);
+			else if (it->second == "integer")
+				this->setDataType(TeINTEGER);
+			else if (it->second == "unsignedlong")
+				this->setDataType(TeUNSIGNEDLONG);
+			else if (it->second == "long")
+				this->setDataType(TeLONG);
+			else if (it->second == "float")
+				this->setDataType(TeFLOAT);
+			else if (it->second == "double")
+				this->setDataType(TeDOUBLE);
+		}
+		it = metadata.find("SWAPPED");
+		if (it != metadata.end() && it->second == "yes")
+			swap_ = true;
+
+		it = metadata.find("NO_DATA");
+		if (it != metadata.end())
+		{
+			useDummy_ = true;
+			this->setDummy(atof(it->second.c_str()));
+		}
+			
+		it = metadata.find("PROJECTION");
+		if (it != metadata.end())
+		{
+			string projdesc = it->second;
+			TeProjectionParams pars;
+			it = metadata.find("DATUM");
+			if (it != metadata.end())
+			{
+				TeDatum dat = TeDatumFactory::make(it->second);
+				pars.datum = dat;
+			}
+			if (decodifyDescription(projdesc,pars))
+			{
+				TeProjection* proj = TeProjectionFactory::make(pars);
+				this->projection(proj);
+			}
+		}
+	}
+}
+
+void 
+TeRasterParams::setNavigationParameters(const vector<double>& nwf)
+{
+	if (nwf.size() < 6)
+		return;
+
+	dxJ_ = nwf[0];
+	dxI_ = nwf[1];
+	dyJ_ = nwf[2];
+	dyI_ = nwf[3];
+	x0_ = nwf[4];
+	y0_ = nwf[5];
+	resx_ = dxJ_;
+	resy_ = ABS(dyI_);
+
+	if (nwf[1] == 0. && nwf[2] == 0)
+	{
+		this->topLeftResolutionSize(nwf[4],nwf[5],nwf[0],-1*nwf[3],ncols_,nlines_);
+		return;
+	}
+
+	// set the bounding box considering the navigation parameters 
+	// assumes that: x0 and y0 are relative to the center of the raster element
+
+	double xmin = min(x0_-0.5*dxJ_-0.5*dxI_,x0_-0.5*dxJ_+(nlines_-0.5)*dxI_);
+	double xmax = max(x0_+(ncols_-0.5)*dxJ_-0.5*dxI_,x0_+(ncols_-0.5)*dxJ_+(nlines_-0.5)*dxI_);
+	double ymin = min(y0_+(nlines_-0.5)*dyI_-0.5*dyJ_,y0_+(nlines_-0.5)*dyI_+(ncols_-0.5)*dyJ_);
+	double ymax = max(y0_-0.5*dyI_-0.5*dyJ_,y0_-0.5*dyI_+(ncols_-0.5)*dyJ_);
+
+	boundingBoxLinesColumns(xmin,ymin,xmax,ymax,nlines_,ncols_);
+}
+
+void 
+TeRasterParams::getNavigationParameters(vector<double>& nwf)
+{
+	nwf.clear();
+	if (dxI_ != 0. || dyJ_ != 0.)
+	{
+		nwf.push_back(dxJ_);
+		nwf.push_back(dxI_);
+		nwf.push_back(dyJ_);
+		nwf.push_back(dyI_);
+		nwf.push_back(x0_);
+		nwf.push_back(y0_);
+	}
+	else
+	{
+		nwf.push_back(resx_);
+		nwf.push_back(0.);
+		nwf.push_back(0.);
+		nwf.push_back(-1*resy_);
+		nwf.push_back(box_.x1_);
+		nwf.push_back(box_.y2_);
+	}
+}
+
+void 
+TeRasterParams::setNLinesNColumns(int nlines, int ncolumns)
+{
+	this->lowerLeftResolutionSize(0.5,0.5,1,1,ncolumns, nlines);
+}
+
diff --git a/src/terralib/kernel/TeRasterParams.h b/src/terralib/kernel/TeRasterParams.h
old mode 100644
new mode 100755
index 50d6548..6a77582
--- a/src/terralib/kernel/TeRasterParams.h
+++ b/src/terralib/kernel/TeRasterParams.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,9 +20,8 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeRasterParams.h
-    This file contains definitions about parameters of a raster structure
+    \brief This file contains definitions about parameters of a raster structure
 */
 #ifndef  __TERRALIB_INTERNAL_RASTERPARAMS_H
 #define  __TERRALIB_INTERNAL_RASTERPARAMS_H
@@ -30,71 +29,88 @@ of this library and its documentation.
 #include "TeProjection.h"
 #include "TeBox.h"
 #include "TeDataTypes.h"
+#include "TeTime.h"
 
 #include <string>
 #include <list>
 #include <vector>
 
-//! Pixels interleaving mode
-enum TeInterLeaving
-{ TePerPixel, TePerLine, TePerBand };
-
 using namespace std;
 
-#define TeRASTERUNKNOWN		0	//!< unknown type of raster (an intermediate state)		
-#define TeRASTERPALETTE		1	//!< a sintetic image that has an associated LUT (pixel val -> RGB triple)	
-#define TeRASTERMULTIBAND	2	//!< an image which 1 to n bands
-#define TeRASTERRGB			3	//!< a particular case of multiband, with exactly 3 bands
-#define TeRASTERTHEMATIC	4	//!< a temathic image
-#define TeRASTEROBJECTID	5	//!< each pixel has an ID of the corresponding object
-#define TeRASTERLDD			6	//!< each pixel is a local drain direction 
-#define TeRASTERKERNEL		7	
-
-#define	TeNOTREADY				0x0000		// Decoder is not read to read or read
-#define	TeREADYTOREAD			0x0001		// Decoder is read to read
-#define	TeREADYTOWRITE			0x0002		// Decoder is read to write
-
-
 class TeDatabase;
 
-//!  A class to handle the parameters set associated with a raster
+//!  A class to handle the parameters set associated with a raster data
 /*! 
- \sa
-  TeRaster
+This class is a data structure to store and manipulate a set of parameters and definitions that characterizes 
+a raster data. It contains parameters relative to storaging, geographical or interpretation aspects.
+Not all parameters are valid, or make sense, for all raster data.
+Most parameters are public and can be accessed directly. The private ones should be acessed
+through the methods provided.
+\sa TeRaster
 */
-class TeRasterParams
+class TL_DLL TeRasterParams
 {
 public:
 
+	//! Pixels interleaving mode: used by rasters in memory and files in raw formats
+	enum TeRasterInterLeavingMode
+	{	
+		TePerPixel, // BIP - Band Interleaved by Pixel
+		TePerLine,	// BIL - Band Interleaved by Line
+		TePerBand	// BSQ - Band Sequential
+	};
+	
+	//! Photometric interpretation of a raster data
+	enum TeRasterPhotometricInterpretation
+	{ TeUnknown, TePallete, TeMultiBand, TeRGB };
+	
+	//! Status of a raster data, in terms of reading and writting possibilities
+	enum TeRasterStatus
+	{ TeNotReady, TeReadyToRead, TeReadyToWrite };
+
+	//! Compression modes of a raster data 
+	enum TeRasterCompressionMode
+	{ TeNoCompression, TeZLib, TeJpeg, TeTiffCompression };
+	
+	//! Tiling type modes to store raster data in a TerraLib database 
+	enum TeRasterTilingType
+	{  TeExpansible=1, TeNoExpansible=2 };
+	
+
 	//! Default contructor
 	TeRasterParams () :
 		nlines_(0),
 		ncols_(0),
 		resx_(1),
 		resy_(1),
-		resolution_(1),
-		subBand_(0),
 		swap_(false),
 		useDummy_(false),
 		mode_('r'),
-		status_(TeNOTREADY),
+		status_(TeRasterParams::TeNotReady),
+		resolution_(1),
+		subBand_(0),
 		offset_(0),
-		tiling_type_(TeExpansible),
+		tiling_type_(TeRasterParams::TeExpansible),
 		blockHeight_(0),
 		blockWidth_(0),
 		nTilesInMemory_(0),
+		blockId_(""),	
+		decoderIdentifier_(""),	
 		database_ (0),
-		interleaving_(TePerPixel),
+		layerId_(-1),
+		objectId_(""),
+		interleaving_(TeRasterParams::TePerPixel),
+		lutName_(""),
 		dxJ_(0.0),
-		dyJ_(0.0),
 		dxI_(0.0),
+		dyJ_(0.0),
 		dyI_(0.0),
 		x0_(0.0),
 		y0_(0.0),
-		nbands_(1),
 		box_(TeBox()),
 		projection_(0)
 	{
+		nbands_= 1;
 		nbitsperPixel_.resize(nbands_);
 		vmin_.resize(nbands_);
 		vmax_.resize(nbands_);
@@ -109,15 +125,16 @@ public:
 			vmin_[i] = TeMAXFLOAT;
 			vmax_[i] = -TeMAXFLOAT;
 			dataType_[i] = TeUNSIGNEDCHAR;
-			photometric_[i] = TeRASTERUNKNOWN;
-			dummy_[i] = 0.0;
+			photometric_[i] = TeRasterParams::TeMultiBand;
+			dummy_[i] = 255;
 		}
+		hasSetDummy_ = false;
 	}
 
 	//! Copy constructor
 	TeRasterParams(const TeRasterParams& other);
 
-	//! Operator =
+	//! Operator=
 	TeRasterParams& operator=(const TeRasterParams& rhs);
 
 	//! Destructor
@@ -126,28 +143,36 @@ public:
 		bands_.clear();
 		vmin_.clear();
 		vmax_.clear();
-		lutr_.clear();
-		lutg_.clear();
-		lutb_.clear();
+		if (!lutr_.empty())
+		{
+			lutr_.clear();
+			lutg_.clear();
+			lutb_.clear();
+		}
 		photometric_.clear();
 		dataType_.clear();
 		dummy_.clear();
 		compression_.clear();
 		if (projection_)
 			delete projection_;
+		hasSetDummy_ = false;
 	}
-
-	//! Return the box based on the coordinates of  center of pixel
-	TeBox box()
+	
+	/** @name Extension
+	*  Methods to deal with the spatial extensions of a raster data
+	*/
+	//@{	
+	//! Returns the box based on the coordinates of center of the corner elements
+	const TeBox& box() const
 	{ return box_; }
 
 	//! Returns the outline box 
-	TeBox boundingBox ();
+	TeBox boundingBox() const;
 
-	//! Sets box parameters
+	//! Sets extension parameters
 	/*
 		This methods recalculates the number of lines and columns and box accordingly to 
-		a desired bounding box and resolution
+		an input bounding box and X and Y resolutions
 		\param x1 bounding box lower left point X coordinate 
 		\param y1 bounding box lower left point Y coordinate 
 		\param x2 bounding box upper right point X coordinate
@@ -157,12 +182,12 @@ public:
 		\param lock corner of the bounding box that should be preserved
 	*/
 	void boundingBoxResolution (double x1, double y1, double x2, double y2, 
-								double resx, double resy, TeBox::TeBoxCorner lock = TeBox::TeUPPERLEFT);
+				double resx, double resy, TeBox::TeBoxCorner lock = TeBox::TeUPPERLEFT);
 
-	//! Sets box parameters
+	//! Sets extension parameters
 	/*
 		This methods recalculates the resolutions and box accordingly to 
-		a desired bounding box and number of lines and columns
+		a given bounding box and number of lines and columns
 		\param x1 bounding box lower left point X coordinate 
 		\param y1 bounding box lower left point Y coordinate 
 		\param x2 bounding box upper right point X coordinate
@@ -174,10 +199,10 @@ public:
 	void boundingBoxLinesColumns (double x1, double y1, double x2, double y2, 
 		                          int nlines, int ncols, TeBox::TeBoxCorner lock = TeBox::TeUPPERLEFT);
 
-	//! Sets box parameters
+	//! Sets extension parameters
 	/*
 		This methods recalculates the number of lines and columns and box accordingly to 
-		a desired box and resolution
+		a given box and X and Y resolutions
 		\param x1 box lower left point X coordinate 
 		\param y1 box lower left point Y coordinate 
 		\param x2 box upper right point X coordinate
@@ -189,10 +214,10 @@ public:
 	void boxResolution (double x1, double y1, double x2, double y2, 
 		                double resx, double resy, TeBox::TeBoxCorner lock = TeBox::TeUPPERLEFT);
 
-	//! Sets box parameters
+	//! Sets extension parameters
 	/*
 		This methods recalculates the resolutions and box accordingly to 
-		a desired box and number of lines and columns
+		a given box and number of lines and columns
 		\param x1 box lower left point X coordinate 
 		\param y1 box lower left point Y coordinate 
 		\param x2 box upper right point X coordinate
@@ -205,7 +230,7 @@ public:
 	void boxLinesColumns (double x1, double y1, double x2, double y2, 
 		                  int nlines, int ncols, TeBox::TeBoxCorner lock = TeBox::TeUPPERLEFT);
 
-	//! Sets box parameters
+	//! Sets extension parameters
 	/*
 		\param left lower left point X coordinate 
 		\param top  upper right point Y coordinate
@@ -217,7 +242,7 @@ public:
 	*/
 	void topLeftResolutionSize (double left, double top, double resx, double resy, int ncol, int nlin, bool coordIsCentrePixel=true);
 		
-	//! Sets box parameters
+	//! Sets extension parameters
 	/*
 		\param left lower left point X coordinate 
 		\param lower lower left point Y coordinate
@@ -229,137 +254,245 @@ public:
 	*/
 	void lowerLeftResolutionSize (double left, double lower, double resx, double resy, int ncol, int nlin, bool coordIsCentrePixel=true);
 
-	//! Resizes the raster bounding box to allow tiling operation
+	//! Sets default extension parameters
+	/* 
+		Sets a valid bouding box, considering a resolution of 1x1 and
+		that the coordinate of the center of lower-left element is (0.5,0.5)
+		\param nlines  number of lines
+		\param ncols number of columns
+	*/
+	void setNLinesNColumns(int nlines, int ncolumns);
+
+	//! Resizes the raster bounding box to cut it exactly in tiles of a give size
 	/*! 
 		\param bb an initial bounding box
 		\param bWidth block width (in number of elements/pixels)
 		\param bHeight block height (in number of elements/pixels)
-		\note uses X an Y resolutions already defined
+		\note keeps the defined X an Y resolutions
 	*/ 
 	void resizeToTiling(TeBox& bb, int bWidth, int bHeight);
+	//@}
 
-	//! Sets the number of bands
+	//! Sets the number of bands, or dimentions in a raster data
+	/*
+		\param n number of bands
+		\note If the required number of bands is greater than the 
+		current number of bands, the last band characteristics 
+		will be copied to the new defined bands.
+	*/
 	void nBands(int n);
 
 	//! Sets the projection
 	/*
-		A new instance of projection is created according to the parameters described
-		by proj.
+		\param proj a pointer to a terralib projection instance
+		A new instance of projection is created according to the parameters described by proj.
 	*/
 	void projection(TeProjection* proj);
 
 	//! Returns the projection
 	TeProjection* projection()
 	{	return projection_; }
+	
 
-	//! Transform a point from projection domain to line/column domain
-	TeCoord2D coord2Index (TeCoord2D& pt);
+	//! Transform a coordinate from world domain to line/column domain
+	TeCoord2D coord2Index (const TeCoord2D& pt) const;
 
-	//! Transform a point from line/column domain to projection domain
-	TeCoord2D index2Coord (TeCoord2D& pt);
+	//! Transform a coordinate from line/column domain to world domain
+	TeCoord2D index2Coord (const TeCoord2D& pt) const;
 
-	//----------------- MEMBERS ---------------------
 
 	int nlines_;			//!< number of lines
-	int ncols_;				//!< number of columns
+	int ncols_;			//!< number of columns
 
-	double	resx_,			//!< pixel horizontal resolution
-			resy_;			//!< pixel vertical resolution	
+	double	resx_,			//!< horizontal resolution
+		resy_;			//!< vertical resolution	
 
+	bool swap_;			//!< a flag to indicate that the values of the elements of the raster are swapped
+	bool useDummy_;			//!< a flag to indicate that raster has dummy values
+	char	mode_;			//!< a character indicating the access mode to the raster data: 'r', 'w' or 'c'
+	TeRasterStatus 	status_;	//! Status for reading and writing to raster	
+	TeTime			date_; //!< The date of the raster
+	
+	/** @name Parameters variable per band
+	*/
+	//@{	
+	vector<int>	nbitsperPixel_;		//!< number of bits per pixel 
+	vector<double>	vmin_;			//!< minimum value 
+	vector<double>	vmax_;			//!< maximum value 
+	vector<int>	bands_;			//!< bands information 
+	vector<double>	dummy_;			//!< no data value
+	vector<TeRasterPhotometricInterpretation>   photometric_;	//!< photometric interpretation
+	vector<TeRasterCompressionMode>	compression_;	//!< compression type 
+	vector<TeDataType> 		dataType_;	//!< computational size of elements
+
+	//! Sets the size of the elements in a particular or in every band
+	/*
+		\param type the computational data type
+		\param band number of the band. Default: all bands 
+	*/
+	void setDataType(TeDataType type, int band=-1);
 
-	int resolution_;		//! resolution level (used in storing raster as wavelets)
-	int subBand_;			//! sub band identification (used in storing rasters as wavelets)
+	//! Returns the size in bytes of each raster element
+	int elementSize(int band=0);
 
-	string	lutName_;		//!< name of a lut table associated to this raster
-	bool swap_;				//!< a flag to indicate that raster has swapped values
-	bool useDummy_;			//!< a flag to indicate that raster has dummy values
+	//! Sets the photometric type in a particular or in every band
+	/*
+		\param photom the photometric interpretation
+		\param band number of the band. Default: all bands 
+	*/
+	void setPhotometric(TeRasterPhotometricInterpretation photom, int band=-1);
 
-	vector<int>		nbitsperPixel_;		//!< number of bits per pixel in each band
-	vector<double>	vmin_;				//!< minimum value per band
-	vector<double>	vmax_;				//!< maximum value per band
-	vector<int>		bands_;				//!< bands information 
-	vector<double>	dummy_;				//!< no data value
-	vector<short>   photometric_;		//!< raster type (palette, multiband, rgb, ...)
-	vector<TeCompressionMode>	compression_;	//!< compression type of tiles as this raster is stored
-	vector<TeDataType> dataType_;				//!< size of each pixel (char,int,unsigned char...), as it will be saved
-
-	string	fileName_;		//!< source of the raster data (table or disk file)
-	char	mode_;			//! Instantiating mode for the raster data 'r', 'w' or 'c'
-	int status_;			//! Status for reading and writing to raster
-	int offset_;			//!< offset 
-	
-	TeRasterTilingType	tiling_type_; //!< raster tiling scheme 
-	int blockHeight_;		//!< block height of tiles as this raster is stored
-	int blockWidth_;		//!< block width of tiles as this raster is stored
+	//! Sets the compression mode of each band
+	/*
+		\param cmode the compression mode
+		\param band number of the band. Default: all bands 
+	*/
+	void setCompressionMode(TeRasterCompressionMode cmode, int band=-1);
 
-	string	decoderIdentifier_;	//!< decoder associated to his raster
-	int nTilesInMemory_;		//!< number of tiles to be kept in virtual memory decoders
+	//! Sets the dummy value in each band
+	/*
+		\param dummy dummy value
+		\param band number of the band. Default: all bands 
+	*/
+	void setDummy(double dummy, int band=-1);
+	//@}
 
-	TeDatabase		*database_;		//!< database associated to this driver
+	/** @name Resolution level parameters
+	* Used when raster has different levels of resolution
+	*/
+	//@{
+	int resolution_;		//! resolution level 
+	int subBand_;			//! sub band identification 
+	//@}
 
-	string blockId_;				//!< block identification
+	/** @name File parameters
+	* Used when raster is stored in files
+	*/
+	//@{	
+	string	fileName_;		//!< name of a raster file
+	int offset_;			//!< offset 
+	//@}
+		
+	/** @name Tilling parameters
+	*/
+	//@{
+	TeRasterTilingType	tiling_type_; //!< raster tiling mode 
+	int blockHeight_;		//!< tiles height 
+	int blockWidth_;		//!< tiles width 
+	int nTilesInMemory_;		//!< number of tiles to be kept in memory
+	string blockId_;		//!< tiles identification  
+	//@}
 
-	TeInterLeaving interleaving_;	//!< interleaving mode
+	string	decoderIdentifier_;	//!< decoder associated to his raster
+	
+	//! Returns the identifier of the decoder associated to the raster
+	const string& decName() const 
+	{ return decoderIdentifier_; }
+		
+	/** @name Tilling parameters
+	*/
+	//@{
+	TeDatabase*	database_;	//!< pointer to a TerraLib database where the raster is stored
+	int 		layerId_;	//!< identification of the layer that contains the raster
+	string 		objectId_;	//!< identification of an object associated to this raster geometry
+	//@}
+
+	TeRasterInterLeavingMode interleaving_;	//!< interleaving mode
 
 	/** @name Raster pallete
 	*  Look up table associated to a raster 
 	*/
 	//@{ 
-	vector<unsigned short> lutr_;  //!<  Red pallete
-	vector<unsigned short> lutg_;  //!<  Green pallete
-	vector<unsigned short> lutb_;  //!<  Blue pallete
+	string	lutName_;		//!< name of a lut table associated to this raster
+	vector<unsigned short> lutr_;  	//!< red pallete
+	vector<unsigned short> lutg_;  	//!< green pallete
+	vector<unsigned short> lutb_;  	//!< blue pallete
+
+	//! Returns the name of the lut 
+	const string& lutName() 
+	{ return lutName_; }
 	//@}
 
-	/** @name TFW parameters
-	*  Parameters associated to TFW codification of georeferencing 
+	/** @name Navigation parameters
+	*  Parameters associated to translation/rotation of the positioning of the raster data
 	*/
 	//@{ 
 	double dxJ_;	//!< X offset due to increase of one column position		       
-	double dyJ_;	//!< Y offset due to increase of one column position		       
 	double dxI_;	//!< X offset due to increase of one line position		       
-	double dyI_;	//!< X offset due to increase of one line position		       
-	double x0_;		//!< X coordinate of the upper left raster pixel
-	double y0_;		//!< Y coordinate of the upper left raster pixel
+	double dyJ_;	//!< Y offset due to increase of one column position		       
+	double dyI_;	//!< Y offset due to increase of one line position		       
+	double x0_;		//!< X coordinate of the upper left raster element
+	double y0_;		//!< Y coordinate of the upper left raster element
+
+	/** Sets the navigation parameters
+		\param nwf the navigation parameters set
+		\note this method should be called after the number of lines and columns has been set
+
+		\verbatim
+		The Navigation parameters describe a transformation from column/line domain (i,j)
+        to geographical world (x,y), so that:
+		| x = x0 + i*dxJ + j*dxI
+		| y = y0 + i*dyJ + j*dyI
+
+		and:
+
+		|i = (dyI*(x-x0) - dxI*(y-y0)) / (dxJ*dyI-dyJ*dxI)
+		|j = (dyJ*(x-x0) - dxJ*(y-y0)) / (dyJ*dxI-dxJ*dyI)
+
+		where:
+		nwf[0] = dxJ : the offset in the X direction along each column
+		nwf[1] = dxI : the offset in the X direction along each line
+		nwf[2] = dyJ : the offset in the Y direction along each column
+		nwf[3] = dyI : the offset in the Y direction along each line
+		nwf[4] = x0  : X coordinate of the center of the upper left raster element
+		nwf[5] = y0  : Y coordinate of the center of the upper left raster element
+		\endverbatim
+	*/
+	void setNavigationParameters(const vector<double>& nwf);
+
+	/** Returns the georeferecing parameters 
+		\param nwf vector of double to return the navigation parameters set
+		\verbatim
+		The Navigation parameters describe a transformation from column/line domain (i,j)
+        to geographical world (x,y), so that:
+		| x = x0 + i*dxJ + j*dxI
+		| y = y0 + i*dyJ + j*dyI
+
+		and:
+
+		|i = (dyI*(x-x0) - dxI*(y-y0)) / (dxJ*dyI-dyJ*dxI)
+		|j = (dyJ*(x-x0) - dxJ*(y-y0)) / (dyJ*dxI-dxJ*dyI)
+
+		where:
+		nwf[0] = dxJ : the offset in the X direction along each column
+		nwf[1] = dxI : the offset in the X direction along each line
+		nwf[2] = dyJ : the offset in the Y direction along each column
+		nwf[3] = dyI : the offset in the Y direction along each line
+		nwf[4] = x0  : X coordinate of the center of the upper left raster element
+		nwf[5] = y0  : Y coordinate of the center of the upper left raster element
+		\endverbatim
+	*/
+	void getNavigationParameters(vector<double>& nwf);
 	//@}
 
-	//! Sets the size of raster element per in each band
-	void setDataType(TeDataType type, int band=-1);
-
-	//! Returns the size in bytes of each raster element
-	int elementSize(int band=0);
-
-	//! Sets the photometric type of each band
-	void setPhotometric(short photom, int band=-1);
-
-	//! Sets the compression mode of each band
-	void setCompressionMode(TeCompressionMode cmode, int band=-1);
-
-	//! Sets the dummy value in each band
-	void setDummy(double dummy, int band=-1);
-
 	//! Returns the number of bands of the raster
 	int nBands() const
-	{	return nbands_; }
-
-	//! Sets the number of entries in the pallete table
-	void setNumberPalleteEntries(int n)
-	{
-		lutr_.resize(n+1);
-		lutg_.resize(n+1);
-		lutb_.resize(n+1);
-	}
-
-	//! Returns the identifier of the decoder associated to the raster
-	string decName()
-	{ return decoderIdentifier_; }
-
-	string lutName()
-	{ return lutName_; }
+	{ return nbands_; }
+	
+	//! Saves the parameters in a ASCII File, in TerraLib format
+	void writeParametersFile();
+	
+	//! Reads the parameters described in a ASCII File, in TerraLib format
+	void readParametersFile();
 
+	//! String that contains any error or warning message that raster manipulation might have detected
+	string errorMessage_;
+	
 private:
-	int		nbands_;		//!< number of bands
+	int	nbands_;		//!< number of bands
 	TeBox	box_;			//!< raster box in center of pixel coordinates
 	TeProjection* projection_;	//!< raster projection
+	bool hasSetDummy_;
 };
 
 #endif
diff --git a/src/terralib/kernel/TeRasterRemap.cpp b/src/terralib/kernel/TeRasterRemap.cpp
old mode 100644
new mode 100755
index 186d967..af7f3f7
--- a/src/terralib/kernel/TeRasterRemap.cpp
+++ b/src/terralib/kernel/TeRasterRemap.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -32,7 +32,6 @@ of this library and its documentation.
 #include <algorithm>	// for max and min
 #include <cstdlib>		// for abs
 
-
 bool TePointOnLine (TeCoord2D& p, TeCoord2D& q, TeCoord2D& t, double tol)
 {
 	int	tx, ty, px, py, qx, qy, dx, dy;
@@ -64,6 +63,18 @@ bool TePointOnLine (TeCoord2D& p, TeCoord2D& q, TeCoord2D& t, double tol)
 	return true;
 }
 
+bool TeRasterRemap::setROI(TeBox& roi)
+{	
+	if (roi.isValid())
+	{
+		TeBox bb;
+		if (rasterIn_ && !TeIntersection(roi,rasterIn_->params().boundingBox(),bb))
+			return false;
+		ROI_ = roi;	
+		return true;
+	}
+	return false;
+}
 
 void TeRasterRemap::TeInterpolateIn ( TeBox &box )
 {
@@ -76,6 +87,9 @@ void TeRasterRemap::TeInterpolateIn ( TeBox &box )
 	if (!projIn || !projOut)
 		return;
 
+	projIn->setDestinationProjection(projOut);
+	projOut->setDestinationProjection(projIn);
+
 // Take coordinates of box corners in output raster projection
 
 	TeCoord2D poll = box.lowerLeft ();
@@ -273,8 +287,7 @@ bool TeRasterRemap::apply( bool showProgress )
 		transformer_->setRasterOut(rasterOut_);
 
 		// pallete raster to a RGB device -> apply input raster pallete
-		if ((paramIn.photometric_[0] == TeRASTERPALETTE || 
-			 paramIn.photometric_[0] == TeRASTERTHEMATIC) &&
+		if ((paramIn.photometric_[0] == TeRasterParams::TePallete) &&
 			 paramOut.nBands() == 3)
 			transformer_->setTransfFunction(&TeRasterTransform::Pallete2ThreeBand);
 		// mono band raster to a RGB device -> repeat band to 3 channels
@@ -284,6 +297,10 @@ bool TeRasterRemap::apply( bool showProgress )
 		else		
 			transformer_->setTransfFunction(&TeRasterTransform::Band2Band);
 	}
+	else if(transformer_->getTransfFunction() == NULL)
+	{
+		transformer_->setTransfFunction(&TeRasterTransform::Band2Band);
+	}
 
 	bool result;
 	// check if datum's are different
@@ -321,15 +338,33 @@ bool TeRasterRemap::apply( bool showProgress )
 
 bool TeRasterRemap::copy ()
 {
-	TeRasterParams paramOut = rasterOut_->params();
+	const TeRasterParams& paramOut = rasterOut_->params();
 	if(showProgress_ && TeProgress::instance())
 		TeProgress::instance()->setTotalSteps(paramOut.nlines_);
+
+	int li, lf, ci, cf;
+	if (ROI_.isValid())
+	{
+		TeCoord2D aux = rasterIn_->coord2Index(ROI_.lowerLeft());
+		lf = TeRoundRasterIndex(aux.y_);
+		ci = TeRoundRasterIndex(aux.x_);
+		aux = rasterIn_->coord2Index(ROI_.upperRight());
+		li = TeRoundRasterIndex(aux.y_);
+		cf = TeRoundRasterIndex(aux.x_);
+	}
+	else
+	{
+		li = ci = 0;
+		lf = paramOut.nlines_;
+		cf = paramOut.ncols_;
+	}
+
 	int c, l;
 	clock_t	ti, tf;
 	ti = clock();
-	for (l=0; l<paramOut.nlines_; l++)
+	for (l=li; l<lf; ++l)
 	{
-		for (c=0; c<paramOut.ncols_; c++)
+		for (c=ci; c<cf; ++c)
 			transformer_->apply(c,l,c,l);
 
 		if (showProgress_ && TeProgress::instance())
@@ -364,6 +399,12 @@ bool TeRasterRemap::resample ()
 	if (!TeIntersection (boxIn,boxOut,boxInter))
 		return false;
 
+	if (ROI_.isValid())
+	{
+		if (!TeIntersection (ROI_,boxInter,boxInter))
+			return false;
+	}
+
 // Take coordinates of intersection box
 
 	TeCoord2D poll = boxInter.lowerLeft ();
@@ -419,29 +460,9 @@ bool TeRasterRemap::resample ()
 	double lin_entra_i = ulPoint.y();	// starting at the upper-left corner	
 	double col_entra_i = ulPoint.x();
 
-	// redefine processing area, so there is no unecessary processing
-	while (TeRoundRasterIndex(lin_entra_i)<0)
-	{
-		lin_entra_i += eDyI;
-		col_entra_i += eDxI;
-		y1 += 1;
-	}
-	while (TeRoundRasterIndex(lin_entra_i+(y2-y1)*eDyI) >= paramIn.nlines_)
-		y2 -= 1;
-
-	while (TeRoundRasterIndex(col_entra_i)<0)
-	{
-		lin_entra_i += eDyJ;
-		col_entra_i += eDxJ;
-		x1 += 1;
-	}
-	while (TeRoundRasterIndex(col_entra_i+(x2-x1)*eDxJ) >= paramIn.ncols_)
-		x2 -= 1;
-
 	if( showProgress_ && TeProgress::instance())
-	{
 		TeProgress::instance()->setTotalSteps((int)(y2-y1));
-	}
+
 	int count = 1;
 	clock_t	ti, tf;
 	ti = clock();
@@ -488,6 +509,8 @@ bool TeRasterRemap::remap()
 	if ( projIn == 0 || projOut == 0)
 		return false;
 
+	projIn->setDestinationProjection(projOut);
+
 	TeBox	boxIn =  paramIn.box();
 	TeBox	boxOut = paramOut.box();
 
@@ -497,6 +520,13 @@ bool TeRasterRemap::remap()
 	if (!TeIntersection (boxIn,boxOut,boxInter))
 		return false;
 
+	if (ROI_.isValid())
+	{
+		boxIn = TeRemapBox (ROI_, projIn, projOut);
+		if (!TeIntersection (boxIn,boxInter,boxInter))
+			return false;
+	}
+
 // Start trying to remap the input quadrilateral
 	TeInterpolateIn ( boxInter );
 	return true;
diff --git a/src/terralib/kernel/TeRasterRemap.h b/src/terralib/kernel/TeRasterRemap.h
old mode 100644
new mode 100755
index 2de8d88..c78c64f
--- a/src/terralib/kernel/TeRasterRemap.h
+++ b/src/terralib/kernel/TeRasterRemap.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,9 +20,8 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeRasterRemap.h
-    This file contains definitions the class and functions need to transform a raster geometry into another geometry
+    \brief This file contains definitions the class and functions need to transform a raster geometry into another geometry
 */
 #ifndef  __TERRALIB_INTERNAL_RASTERREMAP_H
 #define  __TERRALIB_INTERNAL_RASTERREMAP_H
@@ -43,7 +42,7 @@ of this library and its documentation.
 	\note Raster representation in TerraLib is under development, all files that deal
 	with raster representation should be considered as a beta version.
 */
-class TeRasterRemap
+class TL_DLL TeRasterRemap
 {
 protected:
 	TeRaster*	rasterIn_;		//!< input raster
@@ -54,6 +53,9 @@ protected:
 	int	 interpolation_;
 	bool showProgress_;
 
+
+	TeBox ROI_;					// region of interest (from input) where the remmaping should be done
+
 	void TeInterpolateIn (TeBox &box);
 
 	bool remap ();
@@ -73,11 +75,12 @@ public:
 		rasterOut_(rasterOut),
 		transformer_(0),
 		interpolation_(0),
-		showProgress_(showProgress)
+		showProgress_(showProgress),
+		ROI_(TeBox())
 		{}
 
 	//! Sets the input raster
-	void setInput( TeRaster* rasterIn)
+	void setInput(TeRaster* rasterIn)
 	{	
 		rasterIn_ = rasterIn; 
 		if (transformer_)
@@ -85,7 +88,7 @@ public:
 	}
 	
 	//! Sets the output raster
-	void setOutput( TeRaster* rasterOut)
+	void setOutput(TeRaster* rasterOut)
 	{	
 		rasterOut_ = rasterOut; 
 		if (transformer_)
@@ -93,15 +96,18 @@ public:
 	}
 	
 	//! Sets the interpolation flag
-	void setInterpolation( int interpolation )
+	void setInterpolation(int interpolation)
 	{	interpolation_ = interpolation; }
 
 	//! Sets the transformation to be used when doing remap
 	void setTransformer(TeRasterTransform* transf)
 	{	
-		transformer_ = transf; 
-		transformer_->setRasterOut(rasterOut_);
-		transformer_->setRasterIn(rasterIn_);
+		if (transf)
+		{
+			transformer_ = transf; 
+			transformer_->setRasterOut(rasterOut_);
+			transformer_->setRasterIn(rasterIn_);
+		}
 	}
 	
 	//! Returns the transformation to be used when doing remap
@@ -109,7 +115,16 @@ public:
 	{	return transformer_;	}
 
 	//! Applies the remaping
-	bool apply(bool showProgress = false );
+	bool apply(bool showProgress = false);
+
+	//! Defines a region of interest where the remmaping should be done
+	/*
+		\par roi a box that represents the region of interest. It should
+		be inside the raster in bounding box;
+		\return false if the roi in invalid or it is not within the input
+		raster. True otherwise
+	*/
+	bool setROI(TeBox& roi);
 };
 
 #endif
diff --git a/src/terralib/kernel/TeRasterTransform.cpp b/src/terralib/kernel/TeRasterTransform.cpp
old mode 100644
new mode 100755
index d16b4d4..1ba3381
--- a/src/terralib/kernel/TeRasterTransform.cpp
+++ b/src/terralib/kernel/TeRasterTransform.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -22,6 +22,7 @@ of this library and its documentation.
 *************************************************************************************/
 
 #include "TeRasterTransform.h"
+#include "TeVisual.h"
 
 void 
 TeRasterTransform::generateLUT(TeLegendEntryVector& legs, unsigned int nentries, TeColor& backColor)
@@ -30,7 +31,7 @@ TeRasterTransform::generateLUT(TeLegendEntryVector& legs, unsigned int nentries,
 	unsigned int n;
 	double vmin = TeMAXFLOAT;
 	double vmax = TeMINFLOAT;
-	for (n=0; n <legs.size(); n++)
+	for (n=0; n <legs.size(); n++)	
 	{
 		if (atof(legs[n].slice().from_.c_str()) < vmin)
 			vmin = atof(legs[n].slice().from_.c_str());
@@ -64,9 +65,9 @@ TeRasterTransform::generateLUT(TeLegendEntryVector& legs, unsigned int nentries,
 		nunIndx = indexTo - indexFrom + 1;
 		if (nunIndx >= 1)
 		{
-			fill_n(&lutr_[indexFrom],nunIndx,legs[n].getVisualMap()[TePOLYGONS].color().red_);
-			fill_n(&lutg_[indexFrom],nunIndx,legs[n].getVisualMap()[TePOLYGONS].color().green_);
-			fill_n(&lutb_[indexFrom],nunIndx,legs[n].getVisualMap()[TePOLYGONS].color().blue_);
+			fill_n(&lutr_[indexFrom],nunIndx,legs[n].getVisualMap()[TePOLYGONS]->color().red_);
+			fill_n(&lutg_[indexFrom],nunIndx,legs[n].getVisualMap()[TePOLYGONS]->color().green_);
+			fill_n(&lutb_[indexFrom],nunIndx,legs[n].getVisualMap()[TePOLYGONS]->color().blue_);
 		}
 	}
 	lutSize_ = lutr_.size();
@@ -97,6 +98,15 @@ TeRasterTransform::TeRasterTransfFunctions TeRasterTransform::getTransfFunction(
 
 	if (transfFuncPtr_ == &TeRasterTransform::ExtractBands)
 		return TeExtractBands;
+
+	if (transfFuncPtr_ == &TeRasterTransform::ThreeBand2LUTThreeBand)
+		return TeThree2LUTThreeBand;
+
+	if (transfFuncPtr_ == &TeRasterTransform::MonoBand2LUTMonoBand)
+		return TeMono2LUTMonoBand;
+
+	if (transfFuncPtr_ == &TeRasterTransform::ThreeBand2RGB)
+		return TeThreeBand2RGB;
 	else
 		return TeNoTransf;
 }
@@ -123,6 +133,16 @@ void TeRasterTransform::setTransfFunction(TeRasterTransfFunctions func)
 
 	else if (func == TeExtractBands)
 		transfFuncPtr_ = &TeRasterTransform::ExtractBands;
+
+	else if (func == TeThreeBand2RGB)
+		transfFuncPtr_ = &TeRasterTransform::ThreeBand2RGB;
+
+	else if (func == TeThree2LUTThreeBand)
+		transfFuncPtr_ = &TeRasterTransform::ThreeBand2LUTThreeBand;
+
+	else if (func == TeMono2LUTMonoBand)
+		transfFuncPtr_ = &TeRasterTransform::MonoBand2LUTMonoBand;
+
 	else
 		transfFuncPtr_ = 0;
 }
diff --git a/src/terralib/kernel/TeRasterTransform.h b/src/terralib/kernel/TeRasterTransform.h
old mode 100644
new mode 100755
index 08f89d6..1614f8d
--- a/src/terralib/kernel/TeRasterTransform.h
+++ b/src/terralib/kernel/TeRasterTransform.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,9 +20,8 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeRasterTransform.h
-    This file deals with the transformation functions over raster pixels
+    \brief This file deals with the transformation functions over raster pixels
 */
 #ifndef  __TERRALIB_INTERNAL_RASTERTRANSFORM_H
 #define  __TERRALIB_INTERNAL_RASTERTRANSFORM_H
@@ -35,7 +34,7 @@ of this library and its documentation.
 using namespace std;
 
 //! This class defines a way of evaluating the final value of a raster element
-class TeRasterTransform
+class TL_DLL TeRasterTransform
 {
 public:
 
@@ -44,7 +43,9 @@ public:
 
 	enum TeRasterTransfFunctions
 	{	TeNoTransf=0, TeMono2Three=1, TeBand2Band=2, TePall2Three=3, TeLUT2Three=4, 
-		TeExtractRGB=5, TeExtractBand=6, TeExtractBands=7	};
+		TeExtractRGB=5, TeExtractBand=6, TeExtractBands=7, TeThreeBand2RGB=8, 
+		TeThree2LUTThreeBand=9, TeMono2LUTMonoBand=10
+	};
 
 	//! One of the available transformation methods 
 	typedef void (TeRasterTransform::*TransformFunction)(double, double, double, double);
@@ -66,6 +67,13 @@ private:
 
 	int lutSize_;
 
+	double contrastR_, contrastG_, contrastB_;
+	double contrastM_;
+
+	unsigned int transp_;
+
+	std::string lutTable_;
+
 public:
 
 	vector<unsigned char> lutr_;
@@ -81,10 +89,17 @@ public:
 	  mband_(0), 
 	  mbout_(0),
 	  transfFuncPtr_(&TeRasterTransform::Band2Band),
-	  rmin_(TeMINFLOAT),
 	  rmax_(TeMAXFLOAT),
-	  lutSize_(0)
-	 {}
+	  lutSize_(0),
+	  contrastR_(1.0),
+	  contrastG_(1.0),
+	  contrastB_(1.0),
+	  contrastM_(1.0),
+	  transp_(255),
+	  lutTable_("")
+	  { 
+		  rmin_ = -1 * TeMAXFLOAT;
+	 }
 
 	//! Destructor
 	~TeRasterTransform()
@@ -185,11 +200,44 @@ public:
 		offset_ = -1*gain_*vmin+rmin;
 	}
 
+//--- Simple contrast linear factors
+	void setContrastR(double cR)
+	{	contrastR_ = cR;	}
+	void setContrastG(double cG)
+	{	contrastG_ = cG;	}
+	void setContrastB(double cB)
+	{	contrastB_ = cB;	}
+	void setContrastM(double cM)
+	{	contrastM_ = cM;	}
+
+	double getContrastR()
+	{	return contrastR_;	}
+	double getContrastG()
+	{	return contrastG_;	}
+	double getContrastB()
+	{	return contrastB_;	}
+	double getContrastM()
+	{	return contrastM_;	}
+
+
+	void setTransparency(unsigned int transp)
+	{	transp_ = transp; }
+	unsigned int getTransparency()
+	{	return transp_;	}
+
+
+//-- Lut Table
+	void setLutTableName(const std::string& tableName)
+	{	lutTable_ = tableName; }
+	std::string getLutTableName()
+	{	return lutTable_; }
+
+//---
+
 	//! Applies the selected transformation method
 	void apply(double icol, double ilin, double ocol, double olin)
 	{	(this->*transfFuncPtr_)(icol,ilin,ocol,olin); }
 
-
 	//! Returns the identifier of the transformation function currently set
 	TeRasterTransfFunctions getTransfFunction();
 
@@ -203,14 +251,12 @@ public:
 		double val;
 		if (rasterIn_->getElement((int)icol,(int)ilin,val,mband_))
 		{
-			val = val*gain_ + offset_;
+			val = (val*gain_ + offset_)*contrastM_;
 			if (val < rmin_)
 				val = rmin_;
 			else if (val > rmax_)
 				val = rmax_;
-			rasterOut_->setElement((int)ocol,(int)olin,val,0);
-			rasterOut_->setElement((int)ocol,(int)olin,val,1);
-			rasterOut_->setElement((int)ocol,(int)olin,val,2);
+			rasterOut_->setElement((int)ocol,(int)olin, val, val, val, transp_);
 		}
 	}
 
@@ -237,15 +283,29 @@ public:
 		double val;
 		if (rasterIn_->getElement((int)icol,(int)ilin,val))
 		{
-			if (val> 0 && (int)val < lutSize_)
+			if (val>= 0 && (unsigned int)val < rasterIn_->params().lutr_.size())
 			{
-				rasterOut_->setElement((int)ocol,(int)olin,rasterIn_->params().lutr_[(int)val],0);
-				rasterOut_->setElement((int)ocol,(int)olin,rasterIn_->params().lutg_[(int)val],1);
-				rasterOut_->setElement((int)ocol,(int)olin,rasterIn_->params().lutb_[(int)val],2);
+				rasterOut_->setElement((int)ocol,(int)olin,rasterIn_->params().lutr_[(int)val],
+														   rasterIn_->params().lutg_[(int)val],
+														   rasterIn_->params().lutb_[(int)val], transp_);
 			}
 		}
 	}
 
+	//! This transformation repeats the value of the first band in input three bands of the output
+	void ThreeBand2RGB(double icol, double ilin, double ocol, double olin)
+	{
+		double valR, valG, valB;
+		bool flag = rasterIn_->getElement((int)icol,(int)ilin,valR,0);
+		flag = rasterIn_->getElement((int)icol,(int)ilin,valG,1) || flag;
+		flag = rasterIn_->getElement((int)icol,(int)ilin,valB,2) || flag;
+
+		if (flag)
+			rasterOut_->setElement((int)ocol,(int)olin, (valR*gain_ + offset_)*contrastR_, 
+														(valG*gain_ + offset_)*contrastG_, 
+														(valB*gain_ + offset_)*contrastB_, transp_);
+	}
+
 	//! This transformation repeats the value of an external LUT to the first 3 bands of output
 	void LUT2ThreeBand(double icol, double ilin, double ocol, double olin)
 	{
@@ -255,23 +315,88 @@ public:
 			idx = (val*gain_) + offset_;
 			if (idx >= 0 && idx < lutSize_)
 			{
-				rasterOut_->setElement((int)ocol,(int)olin,lutr_[(int)idx],0);
-				rasterOut_->setElement((int)ocol,(int)olin,lutg_[(int)idx],1);
-				rasterOut_->setElement((int)ocol,(int)olin,lutb_[(int)idx],2);
+				rasterOut_->setElement((int)ocol,(int)olin,lutr_[(int)idx]*contrastR_,
+														   lutg_[(int)idx]*contrastG_,
+														   lutb_[(int)idx]*contrastB_, transp_);
+			}
+		}
+	}
+
+	
+	void ThreeBand2LUTThreeBand(double icol, double ilin, double ocol, double olin)
+	{
+		double idxR, valR;
+		double idxG, valG;
+		double idxB, valB;
+		double outR = 0.;
+		double outG = 0.;
+		double outB = 0.;
+
+		if(rgbmap_.empty())
+		{
+			return;
+		}
+
+		bool flag = rasterIn_->getElement((int)icol,(int)ilin,valR,rgbmap_[TeREDCHANNEL]);
+
+		idxR = (valR*gain_) + offset_;
+		if (idxR >= 0 && idxR < lutSize_)
+		{
+			outR = lutr_[(int)idxR]*contrastR_;
+		}
+
+		flag = rasterIn_->getElement((int)icol,(int)ilin,valG,rgbmap_[TeGREENCHANNEL]) || flag;
+
+		idxG = (valG*gain_) + offset_;
+		if (idxG >= 0 && idxG < lutSize_)
+		{
+			outG = lutg_[(int)idxG]*contrastG_;
+		}
+
+		flag = rasterIn_->getElement((int)icol,(int)ilin,valB,rgbmap_[TeBLUECHANNEL]) || flag;
+
+		idxB = (valB*gain_) + offset_;
+		if (idxB >= 0 && idxB < lutSize_)
+		{
+			outB = lutb_[(int)idxB]*contrastB_;
+		}
+
+		if (flag)
+			rasterOut_->setElement((int)ocol,(int)olin, outR, outG, outB, transp_);
+
+	}
+
+	void MonoBand2LUTMonoBand(double icol, double ilin, double ocol, double olin)
+	{
+		double idxMono, valMono;
+		double outMono = 0.;
+
+		bool flag = rasterIn_->getElement((int)icol,(int)ilin,valMono,mband_);
+
+		if(flag)
+		{
+			idxMono = (valMono*gain_) + offset_;
+			if (idxMono >= 0 && idxMono < lutSize_)
+			{
+				outMono = lutr_[(int)idxMono]*contrastR_;
 			}
+
+			rasterOut_->setElement((int)ocol,(int)olin, outMono, outMono, outMono, transp_);
 		}
 	}
 
 	// This transformation is used to define a particular mapping from input bands to RGB channels
 	void ExtractRGB(double icol, double ilin, double ocol, double olin)
 	{
-		double val;
-		if (rasterIn_->getElement((int)icol,(int)ilin,val,rgbmap_[TeREDCHANNEL]))
-			rasterOut_->setElement((int)ocol,(int)olin,val,0);
-		if (rasterIn_->getElement((int)icol,(int)ilin,val,rgbmap_[TeGREENCHANNEL]))
-			rasterOut_->setElement((int)ocol,(int)olin,val,1);
-		if (rasterIn_->getElement((int)icol,(int)ilin,val,rgbmap_[TeBLUECHANNEL]))
-			rasterOut_->setElement((int)ocol,(int)olin,val,2);
+		double valR, valG, valB;
+		bool flag = rasterIn_->getElement((int)icol,(int)ilin,valR,rgbmap_[TeREDCHANNEL]);
+		     flag = rasterIn_->getElement((int)icol,(int)ilin,valG,rgbmap_[TeGREENCHANNEL]) || flag;
+		     flag = rasterIn_->getElement((int)icol,(int)ilin,valB,rgbmap_[TeBLUECHANNEL]) || flag;
+
+		if (flag)
+			rasterOut_->setElement((int)ocol,(int)olin, (valR*gain_ + offset_)*contrastR_, 
+														(valG*gain_ + offset_)*contrastG_, 
+														(valB*gain_ + offset_)*contrastB_, transp_);
 	}
 
 	//! This transformation repeats the value of a particular band in input to a particular band of the output
@@ -285,11 +410,12 @@ public:
 				val = rmin_;
 			else if (val > rmax_)
 				val = rmax_;
-			rasterOut_->setElement((int)ocol,(int)olin,val,mbout_);
+			rasterOut_->setElement((int)ocol,(int)olin,val*contrastM_,mbout_);
 		}
 	}
 
-	// This transformation extracts selected bands of the input raster and writes each to a particular band of the output
+	// This transformation extracts selected bands of the input raster and 
+	// writes each to a particular band of the output
 	void ExtractBands(double icol, double ilin, double ocol, double olin)
 	{
 		double val;
@@ -298,6 +424,8 @@ public:
 		{
 			if (rasterIn_->getElement((int)icol,(int)ilin,val,it->second))
 				rasterOut_->setElement((int)ocol,(int)olin,val,it->first);
+
+			++it;
 		}
 	}
 
diff --git a/src/terralib/kernel/TeRedBlackTree.h b/src/terralib/kernel/TeRedBlackTree.h
old mode 100644
new mode 100755
index 3b6ddb4..adbe1ea
--- a/src/terralib/kernel/TeRedBlackTree.h
+++ b/src/terralib/kernel/TeRedBlackTree.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,14 +20,10 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
-/*! \file TeRedBlackTree.h
-    This file contains structures and definitions for a balanced binary search tree.
- */
-
-/**
-  *@author Gilberto Ribeiro de Queiroz
-  */
+/*! \file  TeRedBlackTree.h
+    \brief This file contains structures and definitions for a balanced binary search tree.
+    \author Gilberto Ribeiro de Queiroz <gribeiro at dpi.inpe.br>
+*/
 
 #ifndef  __TERRALIB_INTERNAL_RED_BLACK_TREE_H
 #define  __TERRALIB_INTERNAL_RED_BLACK_TREE_H
@@ -42,12 +38,12 @@ using namespace std;
 
 #define PRINT
 
+/** @brief Contains structures and definitions necessary to deal with a balanced Binary Search Tree
+*/
 namespace TeREDBLACK
 {
 
-	/*! \enum TeRBNodeColor
-			  Possible values for a node color in a red-black tree.
-	 */
+	//! Possible values for a node color in a red-black tree
 	enum TeRBNodeColor { TeREDNODE, TeBLACKNODE };
 
 	//! Template class for nodes in a Red-Black tree.
@@ -59,7 +55,8 @@ namespace TeREDBLACK
 		taking care of some default attributes that a node must
 		have to implement (left_, right_, parent_, data_).
 	*/
-	template<class T> class TeRedBlackNode
+	template<class T>
+	class TeRedBlackNode
 	{
 		public:
 
@@ -115,7 +112,8 @@ namespace TeREDBLACK
 		rather than copied, so that the only iterators invalidated are those referring to the deleted node.
 		Every data used in nodes must implements a ToString() method.
 	*/
-	template<class NODE> class TeRBTree
+	template<class NODE>
+	class TeRBTree
 	{
 		private:
 
@@ -127,18 +125,16 @@ namespace TeREDBLACK
 
 		protected:
 
-			//! Reference node.
-			NODE* nil_;
-
-			//! Tree's root.
-			NODE* root_;
-
-			//! Count the number of nodes in the tree (excluding nil_ node).
-			unsigned int nodeCount_;
+			NODE* nil_;		//!< Reference node.			
+			NODE* root_;	//!< Tree's root.			
+			unsigned int nodeCount_;	//!< Count the number of nodes in the tree (excluding nil_ node).
 
 		public:
 
+			//! Export node type.
 			typedef NODE* REDBLACKNODEPOINTER;
+
+			//! Export node data type.
 			typedef typename NODE::TeRedBlackNodeData TeRedBlackNodeData;
 
 			//! Constructor.
@@ -645,12 +641,14 @@ namespace TeREDBLACK
 
 				public:
 
+					//! Makes iterator invalid
 					void invalid(void)
 					{
 						node_ = 0;
 						return;
 					}
 
+					//! Returns node pointer
 					Node_i* getNode(void) const
 					{
 						return node_;
diff --git a/src/terralib/kernel/TeRepresentation.cpp b/src/terralib/kernel/TeRepresentation.cpp
old mode 100644
new mode 100755
index e2ce078..272c41f
--- a/src/terralib/kernel/TeRepresentation.cpp
+++ b/src/terralib/kernel/TeRepresentation.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
diff --git a/src/terralib/kernel/TeRepresentation.h b/src/terralib/kernel/TeRepresentation.h
old mode 100644
new mode 100755
index 31a2916..4d35e78
--- a/src/terralib/kernel/TeRepresentation.h
+++ b/src/terralib/kernel/TeRepresentation.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,9 +20,8 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeRepresentation.h
-    This file contains structures and definitions to deal with a geometrical representation
+    \brief This file contains structures and definitions to deal with a geometrical representation
 */
 #ifndef  __TERRALIB_INTERNAL_REPRESENTATION_H
 #define  __TERRALIB_INTERNAL_REPRESENTATION_H
@@ -34,13 +33,13 @@ of this library and its documentation.
 #include <string>
 
 //!  A class to supporting a geometrical representation 
-struct TeRepresentation
+struct TL_DLL TeRepresentation
 {
 	int id_;				//!< representation unique dabatase identifier
 	TeGeomRep geomRep_;		//!< representation type (
-	string	tableName_;		//!< name of the table that stores the geometries associated to this representation
+	std::string	tableName_;		//!< name of the table that stores the geometries associated to this representation
 	TeBox	box_;			//!< representation bounding box
-	string	description_;	//!< representation description
+	std::string	description_;	//!< representation description
 	double	resX_;			//!< the x resolution of the layer cell set geometry
 	double	resY_;			//!< the y resolution of the layer cell set geometry
 	int		nCols_;			//!< number of columns in raster geometry
@@ -56,7 +55,7 @@ struct TeRepresentation
 };
 
 //! A functor class to compare representations by its type
-class TeRepres_eq : public unary_function<TeRepresentation*,bool>
+class TL_DLL TeRepres_eq : public unary_function<TeRepresentation*,bool>
 {
 	TeGeomRep r;
 public:
@@ -64,14 +63,14 @@ public:
 	bool operator()(const TeRepresentation* rep) const { return rep->geomRep_ == r; }
 };
 
-//! An iterator to a vector of TeRepresentation 
-typedef vector<TeRepresentation* >::iterator TeRepresPointerVectorIterator;
+//! An iterator to a std::vector of TeRepresentation 
+typedef std::vector<TeRepresentation* >::iterator TeRepresPointerVectorIterator;
 
-//! A vector of pointers to TeRepresentation
-typedef vector<TeRepresentation* > TeRepresPointerVector;
+//! A std::vector of pointers to TeRepresentation
+typedef std::vector<TeRepresentation* > TeRepresPointerVector;
 
-//! Finds the first representation of a given type in a vector of representations
-TeRepresPointerVectorIterator 
+//! Finds the first representation of a given type in a std::vector of representations
+TL_DLL TeRepresPointerVectorIterator 
 TeFindRepresentation(TeRepresPointerVectorIterator begin, TeRepresPointerVectorIterator end, TeGeomRep rep);
 
 #endif
diff --git a/src/terralib/kernel/TeSTEFunctionsDB.cpp b/src/terralib/kernel/TeSTEFunctionsDB.cpp
deleted file mode 100644
index c18085d..0000000
--- a/src/terralib/kernel/TeSTEFunctionsDB.cpp
+++ /dev/null
@@ -1,623 +0,0 @@
-/************************************************************************************
-TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The library provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use
-of this library and its documentation.
-*************************************************************************************/
-
-#include "TeSTElementSet.h"
-#include "TeSTInstance.h"
-#include "TeSTEvent.h"
-#include "TeProgress.h"
-#include "TeQuerier.h"
-#include "TeQuerierDB.h"
-#include "TeSTEFunctionsDB.h"
-
-//------------------------------- auxiliary functions
-
-bool insertRow (TeSTInstance* elem, TeTable& table, const string& uniqueValue, vector<int>* indexes=0)
-{
-	vector<string> attrs;
-	table.attributeNames(attrs);
-	
-	string ins = " INSERT INTO "+ table.name() +" (";
-	string values = " VALUES ( ";
-	
-	TePropertyVector prop = elem->getPropertyVector();
-	int count=0;
-
-	for(unsigned int i=0; i<prop.size(); ++i)
-	{
-		if(indexes && (find(indexes->begin(), indexes->end(),(int)i) == indexes->end()))
-			continue;
-		
-		string attrName = prop[i].attr_.rep_.name_;
-				
-		if( (find(attrs.begin(), attrs.end(), attrName)!=attrs.end()) &&
-			(attrName != table.uniqueName())      && 
-			(attrName != table.linkName())		  &&
-			(attrName != table.attInitialTime())  &&
-			(attrName != table.attFinalTime())     )
-			
-		{
-			if(count>0)
-			{
-				ins += ",";
-				values += ",";
-			}
-			++count;
-			ins += attrName;
-			if(prop[i].attr_.rep_.type_==TeSTRING)
-				values += "'"+ prop[i].value_ +"'";
-			else if(prop[i].attr_.rep_.type_==TeDATETIME)
-			{
-				TeTime time(prop[i].value_, prop[i].attr_.dateChronon_, prop[i].attr_.dateTimeFormat_, prop[i].attr_.dateSeparator_, prop[i].attr_.timeSeparator_);  
-				values += elem->theme()->layer()->database()->getSQLTime(time);
-			}
-			else
-				values += prop[i].value_;
-		}
-	}
-
-	// -------- object_id, unique_id and timeInterval
-		
-	if(count>0)
-	{
-		ins +=		" ,";
-		values +=	" ,";
-	}
-
-	ins +=		table.linkName();
-	values +=	"'"+ elem->objectId() +"'";
-
-	if(table.linkName() != table.uniqueName())
-	{
-		ins +=		", "+ table.uniqueName();
-		values +=	", '"+ uniqueValue +"'";
-	}
-
-	if(!table.attInitialTime().empty())
-	{
-		TeTime time (elem->timeInterval().getT1());
-		ins +=		", "+ table.attInitialTime();
-		values +=	", "+ elem->theme()->layer()->database()->getSQLTime(time); 
-	}
-
-	if((!table.attFinalTime().empty()) && (table.attInitialTime()!=table.attFinalTime()))
-	{
-		TeTime time (elem->timeInterval().getT2());
-		ins +=		", "+ table.attFinalTime();
-		values +=	", "+ elem->theme()->layer()->database()->getSQLTime(time); 
-	}
-	// ----------
-
-	ins += ") "+ values +" )";
-	
-	if(!elem->theme()->layer()->database ()->execute (ins))
-		return false;
-
-	return true;
-}
-
-
-bool insertRow (TeSTEvent* elem, TeTable& table, const string& uniqueValue, vector<int>* indexes=0)
-{
-	vector<string> attrs;
-	table.attributeNames(attrs);
-	
-	string ins = " INSERT INTO "+ table.name() +" (";
-	string values = " VALUES ( ";
-	
-	TePropertyVector prop = elem->getPropertyVector();
-	int count=0;
-
-	for(unsigned int i=0; i<prop.size(); ++i)
-	{
-		if(indexes && (find(indexes->begin(), indexes->end(),(int)i) == indexes->end()))
-			continue;
-		
-		string attrName = prop[i].attr_.rep_.name_;
-				
-		if( (find(attrs.begin(), attrs.end(), attrName)!=attrs.end()) &&
-			(attrName != table.uniqueName())      && 
-			(attrName != table.linkName())		  &&
-			(attrName != table.attInitialTime())  &&
-			(attrName != table.attFinalTime())     )
-			
-		{
-			if(count>0)
-			{
-				ins += ",";
-				values += ",";
-			}
-			++count;
-			ins += attrName;
-			if(prop[i].attr_.rep_.type_==TeSTRING)
-				values += "'"+ prop[i].value_ +"'";
-			else if(prop[i].attr_.rep_.type_==TeDATETIME)
-			{
-				TeTime time(prop[i].value_, prop[i].attr_.dateChronon_, prop[i].attr_.dateTimeFormat_, prop[i].attr_.dateSeparator_, prop[i].attr_.timeSeparator_);  
-				values += elem->theme()->layer()->database()->getSQLTime(time);
-			}
-			else
-				values += prop[i].value_;
-		}
-	}
-
-	// -------- object_id, unique_id and timeInterval
-		
-	if(count>0)
-	{
-		ins +=		" ,";
-		values +=	" ,";
-	}
-
-	ins +=		table.linkName();
-	values +=	"'"+ elem->objectId() +"'";
-
-	if(table.linkName() != table.uniqueName())
-	{
-		ins +=		", "+ table.uniqueName();
-		values +=	", '"+ uniqueValue +"'";
-	}
-
-	if(!table.attInitialTime().empty())
-	{
-		TeTime time (elem->timeInterval().getT1());
-		ins +=		", "+ table.attInitialTime();
-		values +=	", "+ elem->theme()->layer()->database()->getSQLTime(time); 
-	}
-
-	if((!table.attFinalTime().empty()) && (table.attInitialTime()!=table.attFinalTime()))
-	{
-		TeTime time (elem->timeInterval().getT2());
-		ins +=		", "+ table.attFinalTime();
-		values +=	", "+ elem->theme()->layer()->database()->getSQLTime(time); 
-	}
-	// ----------
-
-	ins += ") "+ values +" )";
-	
-	if(!elem->theme()->layer()->database ()->execute (ins))
-		return false;
-
-	return true;
-}
-
-bool updateRow (TeSTInstance* elem, TeTable table, const string& uniqueId, vector<int>* indexes=0)
-{
-	
-	vector<string> attrs;
-	table.attributeNames(attrs);
-
-	string ins = " UPDATE "+ table.name() +" SET ";
-	
-	TePropertyVector prop = elem->getPropertyVector();
-	int count = 0;
-	for(unsigned int i=0; i<prop.size(); ++i)
-	{
-		if(indexes && (find(indexes->begin(), indexes->end(),(int)i) == indexes->end()))
-			continue;
-
-		string attrName = prop[i].attr_.rep_.name_;
-
-		if( (find(attrs.begin(), attrs.end(), attrName)!=attrs.end()) &&
-			(attrName != table.uniqueName())      && 
-			(attrName != table.linkName())		  &&
-			(attrName != table.attInitialTime())  &&
-			(attrName != table.attFinalTime())     )
-		{
-		
-			if(count>0)
-				ins += ",";
-			
-			++count;
-			ins += attrName +" = ";
-		
-			if(prop[i].attr_.rep_.type_==TeSTRING)
-				ins += "'"+ prop[i].value_ +"'";
-			else if(prop[i].attr_.rep_.type_==TeDATETIME)
-			{
-				TeTime time(prop[i].value_, prop[i].attr_.dateChronon_, prop[i].attr_.dateTimeFormat_, prop[i].attr_.dateSeparator_, prop[i].attr_.timeSeparator_);  
-				ins += elem->theme()->layer()->database()->getSQLTime(time);
-			}
-			else
-				ins += prop[i].value_;
-		}
-	}
-
-	// -------- timeInterval
-	if(!table.attInitialTime().empty())
-	{
-		TeTime time (elem->timeInterval().getT1());
-		ins +=	", "+ table.attInitialTime() +" = ";
-		ins +=	elem->theme()->layer()->database()->getSQLTime(time); 
-	}
-
-	if((!table.attFinalTime().empty()) && (table.attInitialTime()!=table.attFinalTime()))
-	{
-		TeTime time (elem->timeInterval().getT2());
-		ins +=	", "+ table.attFinalTime() +" = ";
-		ins +=	elem->theme()->layer()->database()->getSQLTime(time); 
-	}
-	// ----------
-
-	ins += " WHERE "+ table.uniqueName() +" = '"+ uniqueId +"'";
-	
-	if(!elem->theme()->layer()->database()->execute (ins))
-		return false;
-
-	return true;
-}
-
-bool updateRow (TeSTEvent* elem, TeTable table, const string& uniqueId, vector<int>* indexes=0)
-{
-	
-	vector<string> attrs;
-	table.attributeNames(attrs);
-
-	string ins = " UPDATE "+ table.name() +" SET ";
-	
-	TePropertyVector prop = elem->getPropertyVector();
-	int count = 0;
-	for(unsigned int i=0; i<prop.size(); ++i)
-	{
-		if(indexes && (find(indexes->begin(), indexes->end(),(int)i) == indexes->end()))
-			continue;
-
-		string attrName = prop[i].attr_.rep_.name_;
-
-		if( (find(attrs.begin(), attrs.end(), attrName)!=attrs.end()) &&
-			(attrName != table.uniqueName())      && 
-			(attrName != table.linkName())		  &&
-			(attrName != table.attInitialTime())  &&
-			(attrName != table.attFinalTime())     )
-		{
-		
-			if(count>0)
-				ins += ",";
-			
-			++count;
-			ins += attrName +" = ";
-		
-			if(prop[i].attr_.rep_.type_==TeSTRING)
-				ins += "'"+ prop[i].value_ +"'";
-			else if(prop[i].attr_.rep_.type_==TeDATETIME)
-			{
-				TeTime time(prop[i].value_, prop[i].attr_.dateChronon_, prop[i].attr_.dateTimeFormat_, prop[i].attr_.dateSeparator_, prop[i].attr_.timeSeparator_);  
-				ins += elem->theme()->layer()->database()->getSQLTime(time);
-			}
-			else
-				ins += prop[i].value_;
-		}
-	}
-
-	// -------- timeInterval
-	if(!table.attInitialTime().empty())
-	{
-		TeTime time (elem->timeInterval().getT1());
-		ins +=	", "+ table.attInitialTime() +" = ";
-		ins +=	elem->theme()->layer()->database()->getSQLTime(time); 
-	}
-
-	if((!table.attFinalTime().empty()) && (table.attInitialTime()!=table.attFinalTime()))
-	{
-		TeTime time (elem->timeInterval().getT2());
-		ins +=	", "+ table.attFinalTime() +" = ";
-		ins +=	elem->theme()->layer()->database()->getSQLTime(time); 
-	}
-	// ----------
-
-	ins += " WHERE "+ table.uniqueName() +" = '"+ uniqueId +"'";
-	
-	if(!elem->theme()->layer()->database()->execute (ins))
-		return false;
-
-	return true;
-}
-
-//------------------------------- 
-
-bool
-TeSTOSetBuildDB(TeSTElementSet* stoset, bool loadGeometries, bool loadAllAttributes, vector<string> attrNames)
-{
-	if(!stoset->querier())
-		return false;
-
-	if(!stoset->build(loadGeometries, loadAllAttributes, attrNames))
-		return false;
-	return true;
-}  
-
-bool
-TeSTOSetBuildDB(TeSTElementSet* stoset, TeGroupingAttr& groupAttr, bool loadGeometries)
-{
-	if(!stoset->querier())
-		return false;
-
-	if(!stoset->build(groupAttr, loadGeometries))
-		return false;
-	return true;
-}
-
-bool  
-TeUpdateDBFromSet (TeSTElementSet* elemSet, const string& tableName, vector<int>* indexes)
-{
-	if(!elemSet->theme()->layer())
-		return false;
-
-	TeDatabase* db = elemSet->theme()->layer()->database();
-
-	//progress bar
-	int step = 0;
-	int numSteps = elemSet->numSTInstance();
-	if(TeProgress::instance())
-		TeProgress::instance()->setTotalSteps(numSteps);
-	
-	try
-	{
-		TeAttrTableVector attrTables;
-		elemSet->theme()->getAttTables(attrTables); 
-		if(attrTables.empty())
-			return false;	
-
-		TeTable table;
-		int	uniqueIndex = -1;
-	
-		//! verify if the table is in the stoset
-		for(unsigned int i=0; i<attrTables.size(); i++)
-		{
-			if(attrTables[i].name()==tableName)
-			{
-				uniqueIndex = i;
-				table = attrTables[i];
-				break;
-			}
-		}
-		
-		if((uniqueIndex==-1) || ((table.tableType()!=TeAttrEvent) && 
-								 (table.tableType()!=TeAttrStatic) && 
-								 (table.tableType()!=TeFixedGeomDynAttr) &&
-								 (table.tableType()!=TeAttrExternal)))
-			return false;
-
-		// get some information about the attribute table required
-		string uniqueIdName = table.uniqueName();
-	
-		TeDatabasePortal* portal = db->getPortal();
-		if(!portal)
-			return false;
-
-		vector<string> uniqueIds;
-		string sql = "SELECT "+ uniqueIdName +" FROM "+ table.name();
-		
-		if(!portal->query (sql))
-		{
-			delete portal;
-			return false;
-		}
-
-		while(portal->fetchRow())
-			uniqueIds.push_back(portal->getData(0));
-		
-		delete portal;
-
-		// Update all the objects 
-		TeSTElementSet::iterator itObj = elemSet->begin();
-		while (itObj != elemSet->end())
-		{
-			//verify if all columns exist in the table 
-			if(itObj == elemSet->begin())
-			{
-				TePropertyVector vec = (*itObj).getPropertyVector();
-				for(unsigned int i=0; i<vec.size(); ++i)
-				{
-					if(indexes && (find(indexes->begin(), indexes->end(),(int)i) == indexes->end()))
-						continue;
-
-					//verify if the table has this column 
-					if (!elemSet->theme()->layer()->database()->columnExist(tableName, vec[i].attr_.rep_.name_ , vec[i].attr_))
-					{
-						if(!elemSet->theme()->layer()->database()->addColumn (tableName, vec[i].attr_.rep_))
-							return false; 
-
-						TeAttributeList attrList = table.attributeList();
-						attrList.push_back (vec[i].attr_);
-						table.setAttributeList (attrList);
-					}
-				}
-			}
-			
-			string uniqueId =  (*itObj).uniqueId(uniqueIndex); 
-			
-			if(find(uniqueIds.begin(), uniqueIds.end(), uniqueId) ==  uniqueIds.end())
-			{	
-				if (!insertRow (&(*itObj), table, uniqueId, indexes))
-					return false;
-
-				uniqueIds.push_back(uniqueId);
-			}
-			else
-			{	
-				if (!updateRow (&(*itObj), table, uniqueId, indexes))
-					return false;
-			}
-					
-			++itObj;
-
-			if(TeProgress::instance())
-			{
-				if (TeProgress::instance()->wasCancelled())
-				{
-					TeProgress::instance()->reset();
-					return false;
-				}
-				else
-					TeProgress::instance()->setProgress(step);
-			}	
-			++step;
-		}
-	}
-	catch(...)
-	{
-		if (TeProgress::instance())
-			TeProgress::instance()->reset();
-		return false;
-	}
-	
-	if (TeProgress::instance())
-		TeProgress::instance()->reset();
-	
-	return true;
-}
-
-
-bool  
-TeUpdateDBFromSet (TeSTEventSet* elemSet, const string& tableName, vector<int>* indexes)
-{
-	if(!elemSet->theme()->layer())
-		return false;
-
-	TeDatabase* db = elemSet->theme()->layer()->database();
-
-	//progress bar
-	int step = 0;
-	int numSteps = elemSet->numSTInstance();
-	if(TeProgress::instance())
-		TeProgress::instance()->setTotalSteps(numSteps);
-	
-	try
-	{
-		TeAttrTableVector attrTables;
-		elemSet->theme()->getAttTables(attrTables); 
-		if(attrTables.empty())
-			return false;	
-
-		TeTable table;
-		int	uniqueIndex = -1;
-	
-		//! verify if the table is in the stoset
-		for(unsigned int i=0; i<attrTables.size(); i++)
-		{
-			if(attrTables[i].name()==tableName)
-			{
-				uniqueIndex = i;
-				table = attrTables[i];
-				break;
-			}
-		}
-		
-		if((uniqueIndex==-1) || ((table.tableType()!=TeAttrEvent) && 
-								 (table.tableType()!=TeAttrStatic) && 
-								 (table.tableType()!=TeFixedGeomDynAttr) &&
-								 (table.tableType()!=TeAttrExternal)))
-			return false;
-
-		// get some information about the attribute table required
-		string uniqueIdName = table.uniqueName();
-	
-		TeDatabasePortal* portal = db->getPortal();
-		if(!portal)
-			return false;
-
-		vector<string> uniqueIds;
-		string sql = "SELECT "+ uniqueIdName +" FROM "+ table.name();
-		
-		if(!portal->query (sql))
-		{
-			delete portal;
-			return false;
-		}
-
-		while(portal->fetchRow())
-			uniqueIds.push_back(portal->getData(0));
-		
-		delete portal;
-
-		// Update all the objects 
-		TeSTEventSet::iterator itObj = elemSet->begin();
-		while (itObj != elemSet->end())
-		{
-			//verify if all columns exist in the table 
-			if(itObj == elemSet->begin())
-			{
-				TePropertyVector vec = (*itObj).getPropertyVector();
-				for(unsigned int i=0; i<vec.size(); ++i)
-				{
-					if(indexes && (find(indexes->begin(), indexes->end(),(int)i) == indexes->end()))
-						continue;
-
-					//verify if the table has this column 
-					if (!elemSet->theme()->layer()->database()->columnExist(tableName, vec[i].attr_.rep_.name_ , vec[i].attr_))
-					{
-						if(!elemSet->theme()->layer()->database()->addColumn (tableName, vec[i].attr_.rep_))
-							return false;
-
-						TeAttributeList attrList = table.attributeList();
-						attrList.push_back (vec[i].attr_);
-						table.setAttributeList (attrList);
-					}
-				}
-			}
-			
-			string uniqueId =  (*itObj).uniqueId(uniqueIndex); 
-			
-			if(find(uniqueIds.begin(), uniqueIds.end(), uniqueId) ==  uniqueIds.end())
-			{	
-				if (!insertRow (&(*itObj), table, uniqueId, indexes))
-					return false;
-
-				uniqueIds.push_back(uniqueId);
-			}
-			else
-			{	
-				if (!updateRow (&(*itObj), table, uniqueId, indexes))
-					return false;
-			}
-					
-			++itObj;
-
-			if(TeProgress::instance())
-			{
-				if (TeProgress::instance()->wasCancelled())
-				{
-					TeProgress::instance()->reset();
-					return false;
-				}
-				else
-					TeProgress::instance()->setProgress(step);
-			}	
-			++step;
-		}
-	}
-	catch(...)
-	{
-		if (TeProgress::instance())
-			TeProgress::instance()->reset();
-		return false;
-	}
-	
-	if (TeProgress::instance())
-		TeProgress::instance()->reset();
-	
-	return true;
-
-}
-
-
diff --git a/src/terralib/kernel/TeSTEFunctionsDB.h b/src/terralib/kernel/TeSTEFunctionsDB.h
old mode 100644
new mode 100755
index 2eb3d94..cd3af0b
--- a/src/terralib/kernel/TeSTEFunctionsDB.h
+++ b/src/terralib/kernel/TeSTEFunctionsDB.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,17 +20,17 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
+/*! \file TeSTEFunctionsDB.h
+    \brief This file contains a set of functions to build spatio-temporal sets from a TerraLib databse  
+*/
 #ifndef  __TERRALIB_INTERNAL_STOFUNCTIONS_H
 #define  __TERRALIB_INTERNAL_STOFUNCTIONS_H
 
 #include "TeDatabase.h"
+#include "TeProgress.h"
 #include <vector>
 #include <string>
 
-class TeSTElementSet;
-class TeSTEventSet;
-
 //! Builds the spatial object set from database according to the restrictions previously defined
 /*! 
 	\param stoset				the STOSet that will be filled 
@@ -38,9 +38,8 @@ class TeSTEventSet;
 	\param loadAllAttributes	if the STOSet will be filled with all attributes of the tables of the STOSet 
 	\param attrNames			a subset of the attribute names that will be loaded, if the param loadAllAttributes is false 
 */
-bool
-TeSTOSetBuildDB(TeSTElementSet* stoset, bool loadGeometries = false, bool loadAllAttributes = false, vector<string> attrNames = vector<string>());
-
+template<typename elementSet>
+bool TeSTOSetBuildDB(elementSet* stoset, bool loadGeometries = false, bool loadAllAttributes = false, vector<string> attrNames = vector<string>());
 
 //! Builds the spatial object set from database according to the restrictions previously defined
 /*! 
@@ -48,34 +47,386 @@ TeSTOSetBuildDB(TeSTElementSet* stoset, bool loadGeometries = false, bool loadAl
 	\param groupAttr			a map from attribute name to statistic type  
 	\param loadGeometries		if the STOSet will be filled with the geometries 
 */
-bool
-TeSTOSetBuildDB(TeSTElementSet* stoset, TeGroupingAttr& groupAttr, bool loadGeometries = false);
+template<typename elementSet>
+bool TeSTOSetBuildDB(elementSet* stoset, TeGroupingAttr& groupAttr, bool loadGeometries = false);
 
 
-//! Updates the database table from a element set
-bool  
-TeUpdateDBFromSet (TeSTElementSet* elemSet, const string& tableName, vector<int>* indexes = 0);
+//! Updates or inserts a database table from a spatial object set
+/*! 
+	\param elemSet		the set of spatial objects that will be inserted or updated into database
+	\param tableName	database table name that will be updated  
+	\param indexes		the attribute indexes of the spatial objects that must be updated
+*/
+template<typename elementSet> 
+bool TeUpdateDBFromSet (elementSet* elemSet, const string& tableName, vector<int>* indexes = 0);
 
 
-//! Updates the database table from a element set
-bool  
-TeUpdateDBFromSet (TeSTEventSet* elemSet, const string& tableName, vector<int>* indexes = 0);
+//! Auxiliary function to insert a row
+template<typename Element> 
+bool insertRow (Element* elem, TeTable& table, const string& uniqueValue, TeDatabase* db, vector<int>* indexes=0);
 
+//! Auxiliary function to update a row
+template<typename Element>
+bool updateRow (Element* elem, TeTable table, const string& uniqueId, TeDatabase* db, vector<int>* indexes=0);
 
-/** \example STObjectSetExample1.cpp
- *	This is an example of how to create a new Spatial Temporal Object 
-	Set (STObjectSet) filled whit attributes from a layer .
- */
 
- /** \example STObjectSetExample2.cpp
- *	This is an example of how to create a new Spatial Temporal Object 
-	Set (STObjectSet) filled whit geometries and attributes from a theme.
- */
+//--------------- Implementation
+
+template<typename elementSet> 
+bool TeSTOSetBuildDB(elementSet* stoset, bool loadGeometries, bool loadAllAttributes, vector<string> attrNames)
+{
+	if(!stoset->build(loadGeometries, loadAllAttributes, attrNames))
+		return false;
+	return true;
+}
+
+template<typename elementSet>
+bool TeSTOSetBuildDB(elementSet* stoset, TeGroupingAttr& groupAttr, bool loadGeometries)
+{
+	if(!stoset->build(groupAttr, loadGeometries))
+		return false;
+	return true;
+}
+
+template<typename elementSet>  
+bool TeUpdateDBFromSet (elementSet* elemSet, const string& tableName, vector<int>* indexes)
+{
+	TeDatabase* db = 0;
+	if((elemSet->getTheme()) && (elemSet->theme()->layer()))
+		db = elemSet->getTheme()->layer()->database();
+	else if(elemSet->getLayer())
+		db = elemSet->getLayer()->database();
+	
+	if(!db)
+		return false;
+	 
+	//progress bar
+	int step = 0;
+	int numSteps = elemSet->numSTInstance();
+	if(TeProgress::instance())
+		TeProgress::instance()->setTotalSteps(numSteps);
+	
+	try
+	{
+		TeAttrTableVector attrTables;
+		if(elemSet->getTheme())
+			elemSet->getTheme()->getAttTables(attrTables); 
+		else if(elemSet->getLayer())
+			elemSet->getLayer()->getAttrTables(attrTables); 
+
+		if(attrTables.empty())
+			return false;	
+
+		TeTable table;
+		int	uniqueIndex = -1;
+	
+		//! verify if the table is in the stoset
+		for(unsigned int i=0; i<attrTables.size(); i++)
+		{
+			if(attrTables[i].name()==tableName)
+			{
+				uniqueIndex = i;
+				table = attrTables[i];
+				break;
+			}
+		}
+		
+		if((uniqueIndex==-1) || ((table.tableType()!=TeAttrEvent) && 
+								 (table.tableType()!=TeAttrStatic) && 
+								 (table.tableType()!=TeFixedGeomDynAttr) &&
+								 (table.tableType()!=TeAttrExternal)))
+			return false;
+
+		// get some information about the attribute table required
+		string uniqueIdName = table.uniqueName();
+	
+		TeDatabasePortal* portal = db->getPortal();
+		if(!portal)
+			return false;
+
+		map<string, string> uniqueIds;
+		string sql = "SELECT "+ uniqueIdName +" FROM "+ table.name();
+		
+		if(!portal->query (sql))
+		{
+			delete portal;
+			return false;
+		}
+
+		while(portal->fetchRow())
+			uniqueIds[string(portal->getData(0))] = string(portal->getData(0));
+		
+		delete portal;
+
+		//verifies if the attribute column exists in the table
+		TeAttributeList attList = elemSet->getAttributeList();
+		for(unsigned int i=0; i<attList.size(); ++i)
+		{
+			if(indexes && (find(indexes->begin(), indexes->end(),(int)i) == indexes->end()))
+				continue;
+
+			//verify if the table has this column 
+			string attrName = attList[i].rep_.name_;
+			size_t pos = attrName.find(".", 0, 1);
+			if (pos != string::npos)
+				attList[i].rep_.name_ = attrName.substr(pos+1);
+
+			if (!db->columnExist(tableName, attList[i].rep_.name_, attList[i]))
+			{
+				if(!db->addColumn (tableName, attList[i].rep_))
+					return false; 
+
+				TeAttributeList attrListTable = table.attributeList();
+				attrListTable.push_back (attList[i]);
+				table.setAttributeList(attrListTable);
+			}
+		}
+		
+		// Update all the objects 
+		typename elementSet::iterator itObj = elemSet->begin();
+		while (itObj != elemSet->end())
+		{
+			string uniqueId =  (*itObj).getUniqueId(uniqueIndex); 
+
+			if(uniqueIds.find(uniqueId) ==  uniqueIds.end())
+			{	
+				if (!insertRow (&(*itObj), table, uniqueId, db, indexes))
+					return false;
+
+				uniqueIds[uniqueId] = uniqueId;
+			}
+			else
+			{	
+				if (!updateRow (&(*itObj), table, uniqueId, db, indexes))
+					return false;
+			}
+					
+			++itObj;
 
- /** \example STObjectSetExample3.cpp
- *	This is an example of how to create a new Spatial Temporal Object 
-	Set (STObjectSet) and to use it in spatial algorithms.
+			if(TeProgress::instance())
+			{
+				if (TeProgress::instance()->wasCancelled())
+				{
+					TeProgress::instance()->reset();
+					return false;
+				}
+				else
+					TeProgress::instance()->setProgress(step);
+			}	
+			++step;
+		}
+	}
+	catch(...)
+	{
+		if (TeProgress::instance())
+			TeProgress::instance()->reset();
+		return false;
+	}
+	
+	if (TeProgress::instance())
+		TeProgress::instance()->reset();
+	
+	return true;
+}
+
+template<typename Element> 
+bool insertRow (Element* elem, TeTable& table, const string& uniqueValue, TeDatabase* db, vector<int>* indexes)
+{
+	vector<string> attrs;
+	table.attributeNames(attrs);
+	
+	string ins = " INSERT INTO "+ table.name() +" (";
+	string values = " VALUES ( ";
+	
+	TePropertyVector prop = elem->getPropertyVector();
+	int count=0;
+
+	for(unsigned int i=0; i<prop.size(); ++i)
+	{
+		if(indexes && (find(indexes->begin(), indexes->end(),(int)i) == indexes->end()))
+			continue;
+		
+		string attrName = prop[i].attr_.rep_.name_;
+		size_t pos = attrName.find(".", 0, 1);
+		if (pos != string::npos)
+			attrName = attrName.substr(pos+1);
+				
+		if( (find(attrs.begin(), attrs.end(), attrName)!=attrs.end()) &&
+			(TeStringCompare(attrName, table.uniqueName()) == false) && 
+			(TeStringCompare(attrName,table.linkName()) == false)&&
+			(TeStringCompare(attrName,table.attInitialTime()) == false)&&
+			(TeStringCompare(attrName,table.attFinalTime()) == false)  )
+			
+		{
+			if((prop[i].attr_.rep_.type_!=TeSTRING) && prop[i].value_.empty())
+				continue; 
+
+			if(count>0)
+			{
+				ins += ",";
+				values += ",";
+			}
+			++count;
+			ins += attrName;
+			if(prop[i].attr_.rep_.type_==TeSTRING)
+				values += "'"+ prop[i].value_ +"'";
+			else if(prop[i].attr_.rep_.type_==TeREAL)
+			{
+				std::string strValue = prop[i].value_;
+				replace (strValue.begin(), strValue.end(), ',', '.');
+				values += strValue;
+			}
+			else if(prop[i].attr_.rep_.type_==TeDATETIME)
+			{
+				TeTime time(prop[i].value_, prop[i].attr_.dateChronon_, prop[i].attr_.dateTimeFormat_, prop[i].attr_.dateSeparator_, prop[i].attr_.timeSeparator_);  
+				values += db->getSQLTime(time);
+			}
+			else
+				values += prop[i].value_;
+		}
+	}
+
+	// -------- object_id, unique_id and timeInterval
+		
+	if(count>0)
+	{
+		ins +=		" ,";
+		values +=	" ,";
+	}
+
+	ins +=		table.linkName();
+	values +=	"'"+ elem->objectId() +"'";
+
+	if(table.linkName() != table.uniqueName())
+	{
+		ins +=		", "+ table.uniqueName();
+		values +=	", '"+ uniqueValue +"'";
+	}
+
+	if(!table.attInitialTime().empty())
+	{
+		TeTime time (elem->timeInterval().getT1());
+		ins +=		", "+ table.attInitialTime();
+		values +=	", "+ db->getSQLTime(time); 
+	}
+
+	if((!table.attFinalTime().empty()) && (table.attInitialTime()!=table.attFinalTime()))
+	{
+		TeTime time (elem->timeInterval().getT2());
+		ins +=		", "+ table.attFinalTime();
+		values +=	", "+ db->getSQLTime(time); 
+	}
+	// ----------
+
+	ins += ") "+ values +" )";
+	
+	if(!db->execute (ins))
+		return false;
+
+	return true;
+}
+
+template<typename Element>
+bool updateRow (Element* elem, TeTable table, const string& uniqueId, TeDatabase* db, vector<int>* indexes)
+{
+	
+	vector<string> attrs;
+	table.attributeNames(attrs);
+
+	string ins = " UPDATE "+ table.name() +" SET ";
+	
+	TePropertyVector prop = elem->getPropertyVector();
+	int count = 0;
+	for(unsigned int i=0; i<prop.size(); ++i)
+	{
+		if(indexes && (find(indexes->begin(), indexes->end(),(int)i) == indexes->end()))
+			continue;
+
+		string attrName = prop[i].attr_.rep_.name_;
+		size_t pos = attrName.find(".", 0, 1);
+
+		std::string tableName; 
+		if (pos != string::npos)
+		{
+			attrName = attrName.substr(pos+1);
+			tableName = attrName.substr(0, pos-1);
+			if (tableName != table.name())
+               continue;
+		} 
+
+		if( (find(attrs.begin(), attrs.end(), attrName)!=attrs.end()) &&
+			(TeStringCompare(attrName,table.uniqueName()) == false) && 
+			(TeStringCompare(attrName,table.linkName()) == false) && 
+			(TeStringCompare(attrName,table.attInitialTime()) == false) && 
+			(TeStringCompare(attrName,table.attFinalTime()) == false) )
+		{
+		
+			if((prop[i].attr_.rep_.type_!=TeSTRING) && (prop[i].value_.empty()))
+				continue; 
+
+			if(count>0)
+				ins += ",";
+			
+			++count;
+			ins += attrName +" = ";
+		
+			if(prop[i].attr_.rep_.type_==TeSTRING)
+				ins += "'"+ prop[i].value_ +"'";
+			else if(prop[i].attr_.rep_.type_==TeREAL)
+			{
+				std::string strValue = prop[i].value_;
+				replace (strValue.begin(), strValue.end(), ',', '.');
+				ins += strValue;
+			}
+			else if(prop[i].attr_.rep_.type_==TeDATETIME)
+			{
+				TeTime time(prop[i].value_, prop[i].attr_.dateChronon_, prop[i].attr_.dateTimeFormat_, prop[i].attr_.dateSeparator_, prop[i].attr_.timeSeparator_);  
+				ins += db->getSQLTime(time);
+			}
+			else
+				ins += prop[i].value_;
+		}
+	}
+
+	// -------- timeInterval
+	if(!table.attInitialTime().empty())
+	{
+		TeTime time (elem->timeInterval().getT1());
+		if(count>0)
+			ins +=	", "; 
+		ins += table.attInitialTime() +" = ";
+		ins +=	db->getSQLTime(time); 
+		++count;
+	}
+
+	if((!table.attFinalTime().empty()) && (table.attInitialTime()!=table.attFinalTime()))
+	{
+		TeTime time (elem->timeInterval().getT2());
+		if(count>0)
+			ins +=	", "; 
+		ins += table.attFinalTime() +" = ";
+		ins +=	db->getSQLTime(time);
+		++count;
+	}
+	// ----------
+
+	if ( count == 0 ) 
+		return true; 
+
+	ins += " WHERE "+ table.uniqueName() +" = '"+ uniqueId +"'";
+	
+	if(!db->execute (ins))
+		return false;
+
+	return true;
+}
+ 
+/** \example createSTElementSetFromLayer.cpp
+ 	Shows how to create a new Spatial Temporal Element Set (STElementSet) from a layer
  */
 
+/** \example createSTElementSetFromTheme.cpp
+ 	Shows how to create a new Spatial Temporal Element Set (STElementSet) from a theme
+ */
 #endif
 
diff --git a/src/terralib/kernel/TeSTElement.cpp b/src/terralib/kernel/TeSTElement.cpp
deleted file mode 100644
index fed1069..0000000
--- a/src/terralib/kernel/TeSTElement.cpp
+++ /dev/null
@@ -1,196 +0,0 @@
-/************************************************************************************
-TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The library provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use
-of this library and its documentation.
-*************************************************************************************/
-
-
-#include "TeSTElement.h"
-#include "TeQuerier.h"
-#include "TeQuerierParams.h"
-
-
-TeSTElement::TeSTElement (const string& objId) 
-{
-	object_id_ = objId;
-	time_ = TeTimeInterval();
-	querier_ = 0;
-}
-
-TeSTElement::TeSTElement(TeTheme* theme, const string& objId)
-{
-	TeQuerierParams params; 
-	params.setParams(theme, objId);
-	
-	object_id_ = objId;
-	time_ = TeTimeInterval();
-	querier_ = new TeQuerier(params);
-}
-		
-TeSTElement::TeSTElement(const TeSTElement& other) 
-{	
-	object_id_		= other.object_id_;
-	time_			= other.time_;
-	instances_		= other.instances_;
-	if(other.querier_)
-		querier_ = new TeQuerier(other.querier_->params());
-	else
-		querier_ = 0;
-}
-
-TeSTElement::~TeSTElement()
-{	
-	if(querier_)
-		delete (querier_);
-}
-			
-TeSTElement&					
-TeSTElement::operator= (const TeSTElement& other)
-{	
-	if ( this != &other )
-	{
-		object_id_		= other.object_id_;
-		time_			= other.time_;
-		instances_		= other.instances_;
-		
-		if(other.querier_)
-			querier_ = new TeQuerier(other.querier_->params());
-		else
-			querier_ = 0;
-	}
-	return *this;
-}
-
-void 
-TeSTElement::querier(TeQuerier* qu) 
-{ 
-	if(querier_)
-		delete (querier_);
-
-	querier_ = qu; 
-}
-
-bool 
-TeSTElement::insertSTInstance (TeSTInstance& object)
-{
-	if(object.objectId() != this->objectId())
-		return false;
-
-	instances_.push_back (object);
-	return true;
-}
-	
-bool	
-TeSTElement::build(bool loadGeometries, bool loadAllAttributes, vector<string> attrNames, int slide)
-{
-	if(!querier_)
-		return false;
-
-	TeQuerierParams* param;
-	if(loadAllAttributes)
-		param = new TeQuerierParams(loadGeometries, loadAllAttributes);
-	else
-		param = new TeQuerierParams(loadGeometries, attrNames);
-
-	param->setParams(querier_->params().theme(), objectId());
-
-	querier_->refresh(*param);
-	delete param;
-
-	return(buildImpl(slide));
-}
-
-bool 
-TeSTElement::build(TeGroupingAttr& groupAttr, bool loadGeometries, int slide)
-{
-	if(!querier_)
-		return false;
-
-	TeQuerierParams param(loadGeometries, groupAttr); 
-	param.setParams(querier_->params().theme(), objectId());
-
-	querier_->refresh(param);
-
-	return(buildImpl(slide));
-}
-
-bool 
-TeSTElement::buildImpl(int slide)
-{
-	int dt = CLOCKS_PER_SEC/4, steps = 0;
-	int dt2 = CLOCKS_PER_SEC * 5;
-	clock_t	t0, t1, t2;
-
-	if(!querier_->loadInstances(slide))
-		return false;
-
-	int tot = querier_->numElemInstances();
-	if(TeProgress::instance())
-	{
-		string caption = "Building data";
-		TeProgress::instance()->setCaption(caption.c_str());
-		string msg = "Building in progress. Please, wait!";
-		TeProgress::instance()->setMessage(msg);
-		TeProgress::instance()->setTotalSteps(tot);
-		t2 = clock();
-		t0 = t1 = t2;
-	}
-	
-	TeSTInstance obj;
-	while(querier_->fetchInstance(obj)) 
-	{
-		this->insertSTInstance(obj);
-		obj.clear();
-		if(TeProgress::instance())
-		{
-			steps++;
-			t2 = clock();
-			if (int(t2-t1) > dt)
-			{
-				t1 = t2;
-				if(TeProgress::instance()->wasCancelled())
-					return false;
-				
-				if((int)(t2-t0) > dt2)
-					TeProgress::instance()->setProgress(steps);
-			}
-		}
-	}
-	if(TeProgress::instance())
-		TeProgress::instance()->reset();
-
-	querier_->clear(); //clear instances 
-	return true;
-}
-
-TeSTElement::iterator 
-TeSTElement::begin()     
-{ 
-	return iterator(instances_.begin());
-}
-
-TeSTElement::iterator 
-TeSTElement::end()       
-{
-	return iterator(instances_.end());
-}
-
-
-
diff --git a/src/terralib/kernel/TeSTElement.h b/src/terralib/kernel/TeSTElement.h
deleted file mode 100644
index 9ab2ec8..0000000
--- a/src/terralib/kernel/TeSTElement.h
+++ /dev/null
@@ -1,148 +0,0 @@
-/************************************************************************************
-TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
-
-This code is part of the TerraLib library.
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library.
-
-The authors reassure the license terms regarding the warranties.
-They specifically disclaim any warranties, including, but not limited to,
-the implied warranties of merchantability and fitness for a particular purpose.
-The library provided hereunder is on an "as is" basis, and the authors have no
-obligation to provide maintenance, support, updates, enhancements, or modifications.
-In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
-indirect, special, incidental, or consequential damages arising out of the use
-of this library and its documentation.
-*************************************************************************************/
-
-/*! \file TeSTElement.h
-    This file contains structures and definitions to deal with instances
-	in time of a spatial element  
-*/
-
-#ifndef  __TERRALIB_INTERNAL_STELEMENT_H
-#define  __TERRALIB_INTERNAL_STELEMENT_H
-
-#include "TeSTInstance.h"
-#include "TeTimeInterval.h"
-
-class TeQuerier;
-
-#include <string>
-#include <map> 
-#include <vector>
-using namespace std;
-
-//! A spatial element and its instances in the time 
-class TeSTElement
-{
-	protected:
-		string					object_id_;		// object identification
-		TeTimeInterval			time_;			// validity time
-		TeQuerier*				querier_;		// to fill the instance
-
-		vector<TeSTInstance>	instances_;     // instances ordered by time
-
-		typedef vector<TeSTInstance>::iterator  STElementIterator;
-
-		//! internal function to fill this STElement
-		bool buildImpl(int slide=-1);
-
-	public:
-		//! Constructor that does not create a internal querier
-		TeSTElement(const string& objId= ""); 
-
-		//! Constructor that creates a internal querier
-		TeSTElement(TeTheme* theme, const string& objId);
-
-		//! Copy constructor
-		TeSTElement(const TeSTElement& other);  
-
-		//! Destructor
-		~TeSTElement(); 
-		
-		//! Copy operator
-		TeSTElement&	operator= (const TeSTElement& other);
-
-		//! Returns the object identification
-		string objectId () 
-		{	return object_id_;	}
-	
-		//! Sets the object identification
-		void objectId (const string& id) 
-		{	object_id_ = id;	}
-
-		//! Returns the validity interval
-		TeTimeInterval timeInterval () 
-		{	return time_;	}
-	
-		//! Sets the validity interval
-		void timeInterval (const TeTimeInterval& t) 
-		{	time_ = t;	}
-
-		//! Returns the querier
-		TeQuerier* querier() 
-		{ return querier_; }
-
-		//! Inserts a new instance
-		bool insertSTInstance (TeSTInstance& object); 
-
-		//! Sets the Querier
-		void querier(TeQuerier* qu);  
-				
-		//! Loads the instances of this spatial element 
-		bool build(bool loadGeometries=false, bool loadAllAttributes=true, vector<string> attrNames=vector<string>(), int slide=-1);
-
-		//! Loads the instances of this spatial element
-		bool build(TeGroupingAttr& groupAttr, bool loadGeometries=false, int slide=-1);
-
-		//! Returns the number of instances
-		int numSTInstance() { return instances_.size(); }
-
-		//---------------------
-		//! An iterator to a set of instances 
-		/*! 
-			An strucuture that allows the traversal STElement 
-			in a similar way as the STL iterators. 
-		*/
-		class iterator 
-		{
-			public:
-
-				iterator(STElementIterator it) : elemIt_(it) 
-				{}
-
-				//! Prefix move forward operator
-				iterator& operator++()
-				{	++elemIt_; 	return (*this); }
-			
-				TeSTInstance& operator*()
-				{	return (*elemIt_); 	}
-
-				bool operator==(const iterator& rhs) const
-				{ return (this->elemIt_ == rhs.elemIt_ && this->elemIt_== rhs.elemIt_); }
-
-				bool operator!=(const iterator& rhs) const
-				{ return (this->elemIt_ != rhs.elemIt_ && this->elemIt_!= rhs.elemIt_);	}
-
-			protected:
-				STElementIterator		elemIt_;
-		};
-		//---------------
-
-		//! Returns an iterator to the first instance of the element
-		iterator begin();     
-		
-		//! Returns an iterator to the last instance of the element
-		iterator end();       
-};
-
- 
-#endif 
-
diff --git a/src/terralib/kernel/TeSTElementSet.cpp b/src/terralib/kernel/TeSTElementSet.cpp
old mode 100644
new mode 100755
index 66b95c5..89ad79c
--- a/src/terralib/kernel/TeSTElementSet.cpp
+++ b/src/terralib/kernel/TeSTElementSet.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -21,101 +21,41 @@ indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
 
-#include "TeSTElementSet.h"
-#include "TeQuerier.h" 
-#include "TeQuerierParams.h"
+#include <TeSTElementSet.h>
+#include <TeQuerier.h> 
+#include <TeQuerierParams.h>
 
-
-TeSTElementSet::TeSTElementSet (const TeSTElementSet& other)
-{
-	totalTime_ = other.totalTime_;
-	elements_ = other.elements_;
-	if(other.querier_)
-		querier_ = new TeQuerier(other.querier_->params());
-	else
-		querier_ = 0;
-}
-
-TeSTElementSet::TeSTElementSet(TeTheme* theme)
+TeTimeInterval 
+TeSTElementSet::totalTime() 
 {	
-	TeQuerierParams par; 
-	par.setParams(theme); 
-	querier_ = new TeQuerier(par); 
-}
+	return TeTimeInterval(this->getMinTime().getT1(),this->getMaxTime().getT2());
+} 
 
-TeSTElementSet::TeSTElementSet(TeLayer* layer)
+void 
+TeSTElementSet::totalTime(TeTimeInterval t) 
 {	
-	TeQuerierParams par; 
-	par.setParams (layer);
-	querier_ = new TeQuerier(par);
+	minTime_ = TeTimeInterval(t.getT1(), t.getT1());
+	maxTime_ = TeTimeInterval(t.getT2(), t.getT2());
 }
 
-TeSTElementSet::TeSTElementSet(TeQuerier* querier)
-{
-	querier_ = querier;
-}
-
-
-TeSTElementSet&
-TeSTElementSet::operator= (const TeSTElementSet& other)
-{
-	if ( this != &other )
-	{
-		totalTime_ = other.totalTime_;
-		elements_ = other.elements_;
-		if(other.querier_)
-			querier_ = new TeQuerier(other.querier_->params());
-		else
-			querier_ = 0;
-	}
-	return *this;
-}
-
-TeSTElementSet::~TeSTElementSet()
-{
-	if(querier_)
-		delete (querier_);
-}
-	
-TeTheme* 
-TeSTElementSet::theme()
-{ 
-	if(querier_)
-		return (querier_->theme());
 	
-	return 0;
-}
-
 bool 
-TeSTElementSet::insertSTInstance (TeSTInstance& object) 
-{
-	if (elements_.find (object.objectId()) == elements_.end())  
-	{
-		//ainda n�o existe
-		TeSTElement stElem(object.objectId());
-		stElem.insertSTInstance (object);
-		elements_[object.objectId()] = stElem;
-	}
-	else
-		elements_[object.objectId()].insertSTInstance(object);
-		
-	return true;
+TeSTElementSet::hasElement(const string& objId) 
+{	
+	return (numSTInstance(objId)>0);  
 }
 
-
 bool 
 TeSTElementSet::setGeometry(const string& object_id, const TePolygonSet& geomSet, TeTimeInterval time)
 {
-	STElementSetIterator itSet = elements_.find (object_id);
-	if (itSet == elements_.end()) 
-		return false;
+	vector<TeSTInstance*> result;
+	this->getSTInstances(result, object_id, time);
+	vector<TeSTInstance*>::iterator it = result.begin();
 
-	STElemIterator itGeom = (*itSet).second.begin();
-	while (itGeom != (*itSet).second.end())
+	while(it!=result.end())
 	{
-		if ((!time.isValid()) || ((*itGeom).timeInterval() == time))
-			(*itGeom).setGeometry (geomSet);
-		++itGeom;
+		(*it)->setGeometry(geomSet);
+		++it;
 	}
 	return true;
 }
@@ -123,16 +63,14 @@ TeSTElementSet::setGeometry(const string& object_id, const TePolygonSet& geomSet
 bool 
 TeSTElementSet::setGeometry(const string& object_id, const TeLineSet& geomSet, TeTimeInterval time)
 {
-	STElementSetIterator itSet = elements_.find (object_id);
-	if (itSet == elements_.end()) 
-		return false;
+	vector<TeSTInstance*> result;
+	this->getSTInstances(result, object_id, time);
+	vector<TeSTInstance*>::iterator it = result.begin();
 
-	STElemIterator itGeom = (*itSet).second.begin();
-	while (itGeom != (*itSet).second.end())
+	while(it!=result.end())
 	{
-		if ((!time.isValid()) || ((*itGeom).timeInterval() == time))
-			(*itGeom).setGeometry (geomSet);
-		++itGeom;
+		(*it)->setGeometry(geomSet);
+		++it;
 	}
 	return true;
 }
@@ -140,16 +78,14 @@ TeSTElementSet::setGeometry(const string& object_id, const TeLineSet& geomSet, T
 bool 
 TeSTElementSet::setGeometry(const string& object_id, const TePointSet& geomSet, TeTimeInterval time)
 {
-	STElementSetIterator itSet = elements_.find (object_id);
-	if (itSet == elements_.end()) 
-		return false;
+	vector<TeSTInstance*> result;
+	this->getSTInstances(result, object_id, time);
+	vector<TeSTInstance*>::iterator it = result.begin();
 
-	STElemIterator itGeom = (*itSet).second.begin();
-	while (itGeom != (*itSet).second.end())
+	while(it!=result.end())
 	{
-		if ((!time.isValid()) || ((*itGeom).timeInterval() == time))
-			(*itGeom).setGeometry (geomSet);
-		++itGeom;
+		(*it)->setGeometry(geomSet);
+		++it;
 	}
 	return true;
 }
@@ -157,353 +93,130 @@ TeSTElementSet::setGeometry(const string& object_id, const TePointSet& geomSet,
 bool 
 TeSTElementSet::setGeometry(const string& object_id, const TeCellSet& geomSet, TeTimeInterval time)
 {
-	STElementSetIterator itSet = elements_.find (object_id);
-	if (itSet == elements_.end()) 
-		return false;
+	vector<TeSTInstance*> result;
+	this->getSTInstances(result, object_id, time);
+	vector<TeSTInstance*>::iterator it = result.begin();
 
-	STElemIterator itGeom = (*itSet).second.begin();
-	while (itGeom != (*itSet).second.end())
+	while(it!=result.end())
 	{
-		if ((!time.isValid()) || ((*itGeom).timeInterval() == time))
-			(*itGeom).setGeometry (geomSet);
-		++itGeom;
+		(*it)->setGeometry(geomSet);
+		++it;
 	}
 	return true;
 }
 
 bool 
-TeSTElementSet::setGeometry(const string& object_id, vector<TeGeometry*>& geomSet, TeTimeInterval time)
+TeSTElementSet::setGeometry(const string& object_id, const TeTextSet& geomSet, TeTimeInterval time)
 {
-	STElementSetIterator itSet = elements_.find (object_id);
-	if (itSet == elements_.end()) 
-		return false;
+	vector<TeSTInstance*> result;
+	this->getSTInstances(result, object_id, time);
+	vector<TeSTInstance*>::iterator it = result.begin();
 
-	STElemIterator itGeom = (*itSet).second.begin();
-	while (itGeom != (*itSet).second.end())
+	while(it!=result.end())
 	{
-		if ((!time.isValid()) || ((*itGeom).timeInterval() == time))
-			(*itGeom).setGeometry (geomSet);
-		++itGeom;
+		(*it)->setGeometry(geomSet);
+		++it;
 	}
 	return true;
 }
 
-bool 
-TeSTElementSet::setGeometry(const string& object_id, const TeMultiGeometry& geomSet, TeTimeInterval time)
-{
-	STElementSetIterator itSet = elements_.find (object_id);
-	if (itSet == elements_.end()) 
-		return false;
-
-	STElemIterator itGeom = (*itSet).second.begin();
-	while (itGeom != (*itSet).second.end())
-	{
-		if ((!time.isValid()) || ((*itGeom).timeInterval() == time))
-			(*itGeom).setGeometry (geomSet);
-		++itGeom;
-	}
-	return true;
-}
 
 bool 
 TeSTElementSet::getGeometry(const string& object_id, TePolygonSet& geomSet, TeTimeInterval time)
 {
-	// Verify if object is in the map
-	STElementSetIterator geomSetIt = elements_.find (object_id);
-	if (geomSetIt == elements_.end()) 
-		return false;
-	
-	STElemIterator geomIt = (*geomSetIt).second.begin();
-	while (geomIt != (*geomSetIt).second.end())
-	{
-		if ((!time.isValid()) || ((*geomIt).timeInterval() == time))
-			return ((*geomIt).getGeometry (geomSet));
-
-		++geomIt;
-	}
-	return false;  
+	TeSTInstance* result = this->getSTInstance(object_id, time);
+	if(!result)
+		return false; 
+	geomSet = result->getPolygons();
+	return true;
 }
 
 
 bool 
 TeSTElementSet::getGeometry(const string& object_id, TeLineSet& geomSet, TeTimeInterval time)
 {
-	// Verify if object is in the map
-	STElementSetIterator geomSetIt = elements_.find (object_id);
-	if (geomSetIt == elements_.end()) 
-		return false;
-	
-	STElemIterator geomIt = (*geomSetIt).second.begin();
-	while (geomIt != (*geomSetIt).second.end())
-	{
-		if ((!time.isValid()) || ((*geomIt).timeInterval() == time))
-			return ((*geomIt).getGeometry (geomSet));
-
-		++geomIt;
-	}
-	return false;  
+	TeSTInstance* result = this->getSTInstance(object_id, time);
+	if(!result)
+		return false; 
+	geomSet = result->getLines();
+	return true;
 }
 
 	
 bool 
 TeSTElementSet::getGeometry(const string& object_id, TePointSet& geomSet, TeTimeInterval time)
 {
-	// Verify if object is in the map
-	STElementSetIterator geomSetIt = elements_.find (object_id);
-	if (geomSetIt == elements_.end()) 
-		return false;
-	
-	STElemIterator geomIt = (*geomSetIt).second.begin();
-	while (geomIt != (*geomSetIt).second.end())
-	{
-		if ((!time.isValid()) || ((*geomIt).timeInterval() == time))
-			return ((*geomIt).getGeometry (geomSet));
-
-		++geomIt;
-	}
-	return false;  
+	TeSTInstance* result = this->getSTInstance(object_id, time);
+	if(!result)
+		return false; 
+	geomSet = result->getPoints();
+	return true;
 }
 
 	
 bool 
 TeSTElementSet::getGeometry(const string& object_id, TeCellSet& geomSet, TeTimeInterval time)
 {
-	// Verify if object is in the map
-	STElementSetIterator geomSetIt = elements_.find (object_id);
-	if (geomSetIt == elements_.end()) 
-		return false;
-	
-	STElemIterator geomIt = (*geomSetIt).second.begin();
-	while (geomIt != (*geomSetIt).second.end())
-	{
-		if ((!time.isValid()) || ((*geomIt).timeInterval() == time))
-			return ((*geomIt).getGeometry (geomSet));
-
-		++geomIt;
-	}
-	return false;  
-}
-
-
-bool 
-TeSTElementSet::getGeometry(const string& object_id, vector<TeGeometry*>& geomSet, TeTimeInterval time)
-{
-	// Verify if object is in the map
-	STElementSetIterator geomSetIt = elements_.find (object_id);
-	if (geomSetIt == elements_.end()) 
-		return false;
-	
-	STElemIterator geomIt = (*geomSetIt).second.begin();
-	while (geomIt != (*geomSetIt).second.end())
-	{
-		if ((!time.isValid()) || ((*geomIt).timeInterval() == time))
-			return ((*geomIt).getGeometry (geomSet));
-
-		++geomIt;
-	}
-	return false;  
-}
-	
-
-bool 
-TeSTElementSet::getGeometry(const string& object_id, TeMultiGeometry& geomSet, TeTimeInterval time)
-{
-	// Verify if object is in the map
-	STElementSetIterator geomSetIt = elements_.find (object_id);
-	if (geomSetIt == elements_.end()) 
-		return false;
-	
-	STElemIterator geomIt = (*geomSetIt).second.begin();
-	while (geomIt != (*geomSetIt).second.end())
-	{
-		if ((!time.isValid()) || ((*geomIt).timeInterval() == time))
-			return ((*geomIt).getGeometry (geomSet));
-
-		++geomIt;
-	}
-	return false;  
-}
-
-bool 
-TeSTElementSet::getAttributeValue (const string&  object_id, const string& attr_name, string& val, TeTimeInterval time)
-{
-	STElementSetIterator geomSetIt = elements_.find (object_id);
-	if (geomSetIt == elements_.end()) 
-		return false;
-
-	STElemIterator stoIt = (*geomSetIt).second.begin();
-	while (stoIt != (*geomSetIt).second.end())
-	{
-		if ((!time.isValid()) || ((*stoIt).timeInterval() == time))
-			return ((*stoIt).getPropertyValue (attr_name, val));
-		++stoIt;
-	}
-	return false;
-}
-
-bool 
-TeSTElementSet::getAttributeValue (const string& object_id, int attr_index, string& val, TeTimeInterval time)
-{
-	STElementSetIterator geomSetIt = elements_.find (object_id);
-	if (geomSetIt == elements_.end()) 
-		return false;
-
-	STElemIterator stoIt = (*geomSetIt).second.begin();
-	while (stoIt != (*geomSetIt).second.end())
-	{
-		if ((!time.isValid()) || ((*stoIt).timeInterval() == time))
-			return ((*stoIt).getPropertyValue (val, attr_index));
-		++stoIt;
-	}
-	return false;
-}
-
-bool 
-TeSTElementSet::getAttributeValue (const string& object_id, int attr_index, double& val, TeTimeInterval time)
-{
-	string vals;
-	if(!getAttributeValue (object_id, attr_index, vals, time))
-		return false;
-
-	val = atof(vals.c_str());
-	return true;
-}
-
-int 
-TeSTElementSet::getAttributeIndex (const string& attrName)
-{
-	STElementSetIterator geomSetIt = elements_.begin();
-	if (geomSetIt == elements_.end()) 
-		return -1;
-
-	STElemIterator stoIt = (*geomSetIt).second.begin();
-	if (stoIt == (*geomSetIt).second.end()) 
-		return -1;
-
-	TePropertyVector vec = (*stoIt).getPropertyVector();
-	for (unsigned int i=0; i<vec.size(); ++i)
-	{
-		if(TeConvertToUpperCase(attrName)==TeConvertToUpperCase(vec[i].attr_.rep_.name_))
-			return i;
-	}
-	return -1;
-}
-
-bool 
-TeSTElementSet::getPropertyVector (const string& object_id, TePropertyVector& propVec, TeTimeInterval time)
-{
-	STElementSetIterator geomSetIt = elements_.find (object_id);
-	if (geomSetIt == elements_.end()) 
-		return false;
-
-	STElemIterator stoIt = (*geomSetIt).second.begin();
-	while (stoIt != (*geomSetIt).second.end())
-	{
-		if ((!time.isValid()) || ((*stoIt).timeInterval() == time))
-		{
-			propVec = (*stoIt).getPropertyVector();
-			return true;
-		}
-		++stoIt;
-	}
-	return false;
-
+	TeSTInstance* result = this->getSTInstance(object_id, time);
+	if(!result)
+		return false; 
+	geomSet = result->getCells();
+	return true; 
 }
 
 bool 
-TeSTElementSet::addProperty (const string& object_id, TeProperty& prop)
+TeSTElementSet::getGeometry(const string& object_id, TeTextSet& geomSet, TeTimeInterval time)
 {
-	STElementSetIterator geomSetIt = elements_.find (object_id);
-	if (geomSetIt == elements_.end()) 
-		return false;
-
-	STElemIterator stoIt = (*geomSetIt).second.begin();
-	if (!(*stoIt).setPropertyValue(prop.attr_.rep_.name_, prop.value_))
-		(*stoIt).addProperty(prop);
-
+	TeSTInstance* result = this->getSTInstance(object_id, time);
+	if(!result)
+		return false; 
+	geomSet = result->getTexts();
 	return true;
 }
 
-
 bool 
-TeSTElementSet::existMultiTemporalElem(const string& objId)
-{
-	STElementSetIterator geomSetIt = elements_.find (objId);
-	if (geomSetIt != elements_.end()) 
-		return ((elements_[objId].numSTInstance())>1);
-	
-	return false;
-}
-
-
-int 
-TeSTElementSet::numSTInstance(const string& objectId)
-{
-	if (!objectId.empty())
-	{
-		STElementSetIterator geomSetIt = elements_.find (objectId);
-		if (geomSetIt != elements_.end()) 
-			return (elements_[objectId].numSTInstance());
-		return 0;
-	}
-	else
-	{
-		int ntot = 0;
-		STElementSetIterator geomSetIt = elements_.begin();
-		while (geomSetIt != elements_.end())
-		{
-			ntot += geomSetIt->second.numSTInstance();
-			++geomSetIt;
-		}
-		return ntot;
-	}
-}
-
-
-bool 
-TeSTElementSet::build(bool loadGeometries, bool loadAllAttributes, vector<string> attrNames, int slide)
-{
-	if(!querier_)
-		return false;
-
-	TeQuerierParams param = querier_->params();
-	param.setFillParams(loadGeometries, loadAllAttributes, attrNames);
-
-	querier_->refresh(param);
-
-	return(buildImpl(slide));
-}
-
-bool 
-TeSTElementSet::build(TeGroupingAttr& groupAttr, bool loadGeometries, int slide)
-{
-	if(!querier_)
-		return false;
-
-	TeQuerierParams param = querier_->params();
-	param.setFillParams(loadGeometries, groupAttr);
-
-	querier_->refresh(param);
-
-	return(buildImpl(slide));
-}
-
-bool 
-TeSTElementSet::buildImpl(int slide)
+TeSTElementSet::buildImpl(TeQuerier* querier, const int& slide)
 {
 	int dt = CLOCKS_PER_SEC/4, steps = 0;
 	int dt2 = CLOCKS_PER_SEC * 5;
 	clock_t	t0, t1, t2;
+	
+	t0=t1=t2=clock();
 
-	if(!querier_)
+	if(!querier)
 		return false;
 
-	if(!querier_->loadInstances(slide))
+	if(!querier->loadInstances(slide))
 		return false;
+	
+	//clear all structures
+	attrList_->clear();
+	instances_.clear();
+	objectIdToInstances_.clear();
+	timeToInstances_.clear();
+	sliceToInstances_.clear();
+	if(rTree_)
+		delete rTree_;
+	rTree_ = 0;
+	
+	//Builts another rTree
+	TeBox b;
+	if(theme_)
+		b = theme_->box();
+	else if(layer_)
+		b = layer_->box();
+	else
+		b = this->box_; 
+	rTree_ = new TeSAM::TeRTree<int>(b); 
+
+	TeAttributeList l = querier->getAttrList();
+	setAttributeList(l);
 
-	int tot = querier_->numElemInstances();
+	int tot = querier->numElemInstances();
+	
 	if(TeProgress::instance())
 	{
+		TeProgress::instance()->reset();
 		string caption = "Building data";
 		TeProgress::instance()->setCaption(caption.c_str());
 		string msg = "Building in progress. Please, wait!";
@@ -514,9 +227,10 @@ TeSTElementSet::buildImpl(int slide)
 	}
 	
 	TeSTInstance obj;
-	while(querier_->fetchInstance(obj)) 
+	while(querier->fetchInstance(obj)) 
 	{
 		this->insertSTInstance(obj);
+		
 		obj.clear();
 		if(TeProgress::instance())
 		{
@@ -536,71 +250,7 @@ TeSTElementSet::buildImpl(int slide)
 	if(TeProgress::instance())
 		TeProgress::instance()->reset();
 
-	querier_->clear(); //clear instances 
 	return true;
 }
 
 
-TeSTElementSet::iterator& 
-TeSTElementSet::iterator::operator++()
-{
-	if (++curSTO_ == (*curObj_).second.end())
-	{
-		if (++curObj_ !=  stoSet_->elements().end())
-		{
-			curSTO_ = (*curObj_).second.begin();
-		}
-	}
-	return *this;
-}
-
-double 
-TeSTElementSet::propertyIterator::operator*() 
-{
-	string val;
-	STElemIterator itCur = getCurSTO();
-	if ((*itCur).getPropertyValue (attrName_, val))
-		return (atof(val.c_str()));
-	else
-		return 0.0;
-}
-
-bool 
-TeSTElementSet::propertyIterator::getProperty(TeProperty& prop) 
-{
-	STElemIterator itCur = getCurSTO();
-	if ((*itCur).getProperty (prop, attrName_))
-		return true;
-	else
-		return false;
-}
-
-TeSTElementSet::iterator 
-TeSTElementSet::begin()     
-{ 
-	return iterator(this, elements_.begin(), (*(elements_.begin())).second.begin());
-}
-
-TeSTElementSet::propertyIterator 
-TeSTElementSet::begin(const string& attrName)     
-{ 
-	return propertyIterator(this, elements_.begin(), (*(elements_.begin())).second.begin(),attrName);
-}
-
-TeSTElementSet::iterator 
-TeSTElementSet::end()       
-{
-	if(elements_.size()<1)
-		return iterator(this, elements_.end(), (*(elements_.end())).second.end());
-	
-	return iterator(this, elements_.end(), (*(--elements_.end())).second.end());
-}
-
-TeSTElementSet::propertyIterator 
-TeSTElementSet::end(const string& attrName)       
-{
-	if(elements_.size()<1)
-		return propertyIterator(this, elements_.end(), (*(elements_.end())).second.end(), attrName);
-	
-	return propertyIterator(this, elements_.end(), (*(--elements_.end())).second.end(), attrName);
-}
diff --git a/src/terralib/kernel/TeSTElementSet.h b/src/terralib/kernel/TeSTElementSet.h
old mode 100644
new mode 100755
index 795377d..c2a6416
--- a/src/terralib/kernel/TeSTElementSet.h
+++ b/src/terralib/kernel/TeSTElementSet.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright  2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,235 +20,106 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
+/*! \file TeSTElementSet.h
+	\brief This file contains structures to deal with a set of spatio-temporal 
+	instances. These instances can belong to a specific layer or theme.
+*/
+
+#ifndef  __TERRALIB_INTERNAL_STELEMENTSET_H
+#define  __TERRALIB_INTERNAL_STELEMENTSET_H
+
+#include "TeBaseSTInstanceSet.h"
+#include "TeSTInstance.h"
+#include "TeTimeInterval.h"
+#include "TeMultiGeometry.h"
+
+class TeQuerier;
+class TeTheme;
+class TeLayer;
 
-#ifndef  __TERRALIB_INTERNAL_STOBJECTSET_H
-#define  __TERRALIB_INTERNAL_STOBJECTSET_H
 
-#include "TeSTElement.h"
+/*! \class TeSTElementSet
+	\brief A class that represents a set of spatial temporal instances.
 
-class TeQuerier; 
+	This class specializes the abstract class TeBaseSTInstanceSet representing
+	each spatial temporal instance of the set as a TeSTInstance type. That is, the 
+	geometries of each instance in this set is represented as multi geometries 
+	(TeMultiGeometry class)and its valid time as a time interval (TeTimeInterval class). 
 
-//! A TeSTElementSet is a set of spatial temporal elements
-/*
-	A spatial temporal set of elements or objects is obtained from a theme. 
+	\sa TeBaseSTInstanceSet TeSTInstance TeMultiGeometry TeTimeInterval TeTheme TeLayer
 */
-class TeSTElementSet  
+class TL_DLL TeSTElementSet  : public TeBaseSTInstanceSet<TeMultiGeometry, TeTimeInterval, TeSTInstance>
 {
-
 protected:
 
-	//! valid time interval of all ST elements in the set
-	TeTimeInterval			totalTime_;		
-	
-	//! querier used to fill this structure
-	TeQuerier*				querier_;       
-	
-	//! map of object identification to its instances in time
-	map<string, TeSTElement >	elements_;	
-	
-	typedef map<string, TeSTElement >::iterator  STElementSetIterator;
-	typedef TeSTElement::iterator				 STElemIterator;	
-
-	//! Internal function to build the STElement set
-	bool buildImpl(int slide=-1);
+	//! Builds the set using a given querier and a specific slice
+	bool buildImpl(TeQuerier* querier, const int& slide = -1);
 
 public:
-
-	
-	//! Default constructor
-	TeSTElementSet()
-	{	querier_ = 0; }
-
-	//! Constructor
-	TeSTElementSet(TeTheme* theme); 
-	
-	//! Constructor
-	TeSTElementSet(TeLayer* layer); 
-
 	//! Constructor
-	TeSTElementSet(TeQuerier* querier); 
-	
-	//! Copy constructor
-	TeSTElementSet (const TeSTElementSet& other); 
+	TeSTElementSet() : TeBaseSTInstanceSet<TeMultiGeometry, TeTimeInterval, TeSTInstance>()
+	{ }
 
-	//! Destructor 
-	~TeSTElementSet();  
+	//! Constructor 
+	TeSTElementSet(TeTheme* theme, TeAttributeList attList = TeAttributeList()) : 
+		TeBaseSTInstanceSet<TeMultiGeometry, TeTimeInterval, TeSTInstance>(theme, attList)
+	{ }
 	
-	//! Assignment operator 
-	TeSTElementSet& operator= (const TeSTElementSet& other);
+	//! Constructor 
+	TeSTElementSet(TeLayer* layer, TeAttributeList attList = TeAttributeList()) : 
+		TeBaseSTInstanceSet<TeMultiGeometry, TeTimeInterval, TeSTInstance>(layer, attList)
+	{ }
 
-	//! Operator ==
-	bool operator== (const TeSTElementSet& other) const
-	{ return ((totalTime_==other.totalTime_)); } 
-		
-	//! Returns the time inteval associated with the STOSet
-	TeTimeInterval totalTime() { return totalTime_;} 
 
-	//! Sets the time inteval associated with the STOSet
-	void totalTime(TeTimeInterval t) { totalTime_ = t;}
+	//! Constructor 
+	TeSTElementSet(const TeBox& box, const TeAttributeList& attrList) :
+		TeBaseSTInstanceSet<TeMultiGeometry, TeTimeInterval, TeSTInstance>(box, attrList)
+	{ }
 
-	//! Returns the querier
-	TeQuerier* querier() { return querier_; }
 
-	// Returns the theme
-	TeTheme* theme();  
+	//! Returns the valid time interval for all ST instances
+	TeTimeInterval totalTime(); 
 
-	//! Returns a reference to the map of elements
-	map<string, TeSTElement >& elements() { return elements_; }
+	//! Sets the valid time interval for all ST instances
+	void totalTime(TeTimeInterval t); 
 
-	//! Return if the element (objId) exists in the STElemSet 
-	bool hasElement(const string& objId) { return (elements_.find (objId) != elements_.end()); }
-	
-	//! Insert an ST element instance 
-	bool insertSTInstance (TeSTInstance& object);  
+	//! Deprecated: Verifies if there is a specific element or object in the set 
+	bool hasElement(const string& objId);
 
-	//! Sets the geometries of a STObjetct
+	//! Sets a polygon set and its valid time interval to a specific object or element
 	bool setGeometry(const string& object_id, const TePolygonSet& geomSet, TeTimeInterval time = TeTimeInterval());
+	//! Sets a line set and its valid time interval to a specific object or element
 	bool setGeometry(const string& object_id, const TeLineSet& geomSet, TeTimeInterval time = TeTimeInterval());
+	//! Sets a point set and its valid time interval to a specific object or element
 	bool setGeometry(const string& object_id, const TePointSet& geomSet, TeTimeInterval time = TeTimeInterval());
+	//! Sets a cell set and its valid time interval to a specific object or element
 	bool setGeometry(const string& object_id, const TeCellSet& geomSet, TeTimeInterval time = TeTimeInterval());
-	bool setGeometry(const string& object_id, vector<TeGeometry*>& geomSet, TeTimeInterval time = TeTimeInterval());
-	bool setGeometry(const string& object_id, const TeMultiGeometry& geomSet, TeTimeInterval time = TeTimeInterval());
+	//! Sets a text set and its valid time interval to a specific object or element
+	bool setGeometry(const string& object_id, const TeTextSet& geomSet, TeTimeInterval time = TeTimeInterval()); 
 
-	//! Gets the geometries of an object with a time stamp
+	//! Gets a polygon set of an element or object and its valid time interval
 	bool getGeometry(const string& object_id, TePolygonSet& geomSet, TeTimeInterval time = TeTimeInterval());
+	//! Gets a line set of an element or object and its valid time interval
 	bool getGeometry(const string& object_id, TeLineSet& geomSet, TeTimeInterval time = TeTimeInterval());
+	//! Gets a point set of an element or object and its valid time interval
 	bool getGeometry(const string& object_id, TePointSet& geomSet, TeTimeInterval time = TeTimeInterval());
+	//! Gets a cell set of an element or object and its valid time interval
 	bool getGeometry(const string& object_id, TeCellSet& geomSet, TeTimeInterval time = TeTimeInterval());
-	bool getGeometry(const string& object_id, vector<TeGeometry*>& geomSet, TeTimeInterval time = TeTimeInterval());
-	bool getGeometry(const string& object_id, TeMultiGeometry& geomSet, TeTimeInterval time = TeTimeInterval());
-
- 
-	//! Gets the value of an attribute (as string) of a object with a time stamp
-	bool getAttributeValue (const string&  object_id, const string& attr_name, 
-		                    string& val, TeTimeInterval time = TeTimeInterval()); 
-	
-
-	//! Gets the value of the i-th attribute (as string) of a object with a time stamp
-	bool getAttributeValue (const string& object_id, int attr_index, string& val,
-							TeTimeInterval time = TeTimeInterval()); 
-
-	//! Gets the value of the i-th attribute (as double) of a object with a time stamp
-	bool getAttributeValue (const string& object_id, int attr_index, double& val,
-							TeTimeInterval time = TeTimeInterval()); 
-
-	//! Returns the index of an attribute
-	int getAttributeIndex(const string& attrName);
-
-	//! Gets a vector of attributes or properties of a object with a time stamp
-	bool getPropertyVector (const string& object_id, TePropertyVector& propVec,
-							TeTimeInterval time = TeTimeInterval()); 
+	//! Gets a text set of an element or object and its valid time interval
+	bool getGeometry(const string& object_id, TeTextSet& geomSet, TeTimeInterval time = TeTimeInterval());
+};
 
-	//! Sets the value of the property or adds if there is no such property in the object
-	bool addProperty(const string& object_id, TeProperty& prop);
 
-	//! Returns true if exists in the set, an object with more than one instance
-	bool existMultiTemporalElem(const string& objId);
+/*! \example createSTElementSetFromLayer.cpp
+	Shows how to create a spatio-temporal element set from a layer.
+ */
 
-	//! Adds the instances of a element
-	void insertSTElement(TeSTElement& stElem)
-	{ elements_[stElem.objectId()] = stElem;	}
-	
-	//! Retuns the number of elements in the set
-	int numElements() const  { return elements_.size();}
-
-	//! Returns the number of instances of an object
-	int numSTInstance(const string& objectId = ""); 
-
-	//! Fills the STElement set
-	bool build(bool loadGeometries=false, bool loadAllAttributes=true, vector<string> attrNames=vector<string>(), int slide=-1); 
-
-	//! Fills the STElement set
-	bool build(TeGroupingAttr& groupAttr, bool loadGeometries=false, int slide=-1); 
-
-	//! Clears the set 
-	void clear() { elements_.clear(); }
-		
-	//---------------------
-	//! An iterator to a set of spatial temportal elements
-	/*! 
-		An strucuture that allows the traversal STElement set 
-		(ST elements) in a similar way as the STL iterators. 
-	*/
-	class iterator 
-	{
-		public:
-
-			iterator(TeSTElementSet* stoSet, STElementSetIterator stoSetP, STElemIterator stoVecP) : 
-				curObj_(stoSetP),
-				curSTO_(stoVecP),
-				stoSet_(stoSet) 
-		{}
-
-		//! Prefix move forward operator
-		iterator& operator++(); 
-		
-		TeSTInstance& operator*()
-		{	return (*curSTO_); 	}
-
-		STElemIterator getCurSTO()
-		{	return curSTO_; 	}
-
-		TeSTElementSet* elemSet()
-		{	return stoSet_; 	}
-
-		bool operator==(const iterator& rhs) const
-		{ return (this->curSTO_ == rhs.curSTO_ && this->curObj_== rhs.curObj_); }
-
-		bool operator!=(const iterator& rhs) const
-		{ return (this->curSTO_ != rhs.curSTO_ && this->curObj_!= rhs.curObj_);	}
-
-		protected:
-			STElementSetIterator	curObj_;
-			STElemIterator			curSTO_;
-			TeSTElementSet*			stoSet_;
-	};
-	//---------------
-	
-	//---------------------
-	//! An iterator to a given numeric property in a set of spatial temportal obejcts 
-	/*! 
-		An strucuture that allows the traversal STO set 
-		(ST objects) in a similar way as the STL iterators. 
-	*/
-	class propertyIterator : public iterator
-	{
-		public:
-
-			propertyIterator (TeSTElementSet* stoSet, 
-				STElementSetIterator stoSetP, 
-				STElemIterator stoVecP, 
-				string attrName):
-				iterator(stoSet, stoSetP, stoVecP),
-				attrName_ (attrName)
-				{}
-		
-
-			double operator*();  //if too slow, get property index. The problem is 
-				// that nothing garantees it is going to be the same for all objects.
-		
-			bool getProperty(TeProperty& prop); 
-				// same implemented for raster: to be used when attribute is categorical
-		protected:
-			string	attrName_;
-
-	};
-	//---------------
-
-	//! Returns an iterator to the first element of the set
-	iterator begin();     
-	
-	//! Returns an iterator to the first element of the set
-	propertyIterator begin(const string& attrName);     
-	
-	//! Returns an iterator to the one past last element of the set
-	iterator end();       
-	
-	//! Returns an iterator to the one past last element of the set
-	propertyIterator end(const string& attrName);       
-	
-	//---------------
-};
+/*! \example createSTElementSetFromShapeFile.cpp
+	Shows how to create aspatio-temporal element set from a shapefile.
+ */
 
+/*! \example createSTElementSetFromTheme.cpp
+	Shows how to create aspatio-temporal element set from a theme.
+ */
 #endif
 
diff --git a/src/terralib/kernel/TeSTEvent.cpp b/src/terralib/kernel/TeSTEvent.cpp
old mode 100644
new mode 100755
index 6cfddee..34e9572
--- a/src/terralib/kernel/TeSTEvent.cpp
+++ b/src/terralib/kernel/TeSTEvent.cpp
@@ -1,270 +1,207 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright  2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
 
 #include "TeSTEvent.h"
-#include "TeTheme.h"
-#include "TeTimeInterval.h"
-	
-
-TeSTEvent::TeSTEvent(const string& objId, const TePoint& point, const long& time):
-		object_id_(objId),
-		point_(point),
-		time_(time)
-{
-	unique_id_.push_back (objId);
-}
 
-TeSTEvent::TeSTEvent(const string& objId, const TePoint& point, const vector<double>& attrValue, 
-					 const vector<TeAttributeRep>& attrRep, const long& time):
-		object_id_(objId),
-		point_(point),
-		time_(time),
-		attrValue_(attrValue),
-		attrRep_(attrRep)
+///------------ TeSTEvent
+void 
+TeSTEvent::clear()
 {
-	unique_id_.push_back (objId);
+	TeBaseSTInstance<TePoint, long>::clear();
+	geometries_ = TePoint(); 
+	time_ = -1;
 }
 
-TeSTEvent::TeSTEvent(const TeSTEvent& other) 
-{	
-	unique_id_		= other.unique_id_;
-	object_id_		= other.object_id_;
-	time_			= other.time_;
-	point_			= other.point_;  
-	attrValue_		= other.attrValue_;
-	attrRep_		= other.attrRep_;
-	theme_			= other.theme_;
-	attrOut_		= other.attrOut_;
-}
-			
-TeSTEvent&					
-TeSTEvent::operator= (const TeSTEvent& other)
-{	
-	if ( this != &other )
-	{
-		unique_id_		= other.unique_id_;
-		object_id_		= other.object_id_;
-		time_			= other.time_;
-		point_			= other.point_;  
-		attrValue_		= other.attrValue_;
-		attrRep_		= other.attrRep_;
-		theme_			= other.theme_;
-		attrOut_		= other.attrOut_;
-	}
-	return *this;
-}
-	
-	
 bool 
-TeSTEvent::operator== (const TeSTEvent& other) const
-{	
-	if (this->object_id_ != other.object_id_ || 
-		!(this->time_ == other.time_) ||
-		(this->point_.location().x() != other.point_.location().x()) ||
-		(this->point_.location().y() != other.point_.location().y()))
-		return false;
-
-	return true; 
+TeSTEvent::isTimeValid() 
+{
+	return (time_>=0);
 }
 
+///------------ TeSTEventSet
 
-TeTheme* 
-TeSTEvent::theme()
-{	
-	return theme_; 
-}
-
-void 
-TeSTEvent::theme(TeTheme* t)
+TeSTEventSet::TeSTEventSet(TeTheme* theme, const TeAttributeList& attrList) : 
+	TeBaseSTInstanceSet<TePoint, long, TeSTEvent>(theme, attrList)
 {
-	theme_ = t;
+	kdTree_ = 0;
 }
 
-TeTimeInterval 
-TeSTEvent::timeInterval() 
+TeSTEventSet::~TeSTEventSet()
 {
-	TeTimeInterval t;
-	return t;
+	if(kdTree_)
+		delete kdTree_;
+	kdTree_ = 0;
 }
 
-int 
-TeSTEvent::getPropertyIndex(const string& name)
+bool TeSTEventSet::buildKdTree(const int& n)
 {
-	vector<TeAttributeRep>::iterator itRep = attrRep_.begin();
-	int index=-1;
-	while (itRep!=attrRep_.end())
+	if(!theme_)
+		return false;
+    if(kdTree_)
+		delete kdTree_;
+
+	vector<pair<TeCoord2D, TePoint> >	dataSetAux; //auxiliary structure for kdTree
+	TeSTEventSet::iterator it = this->begin();
+	int index=0;
+	while(it!=this->end())
 	{
+		TePoint point = it->getGeometries();
+		point.geomId(index);
+		dataSetAux.push_back(pair<TeCoord2D, TePoint>(point.location(), point));
+		++it;
 		++index;
-		if(itRep->name_==name)
-			return index;
 	}
-	return index;
-}
-
 
-void 
-TeSTEvent::setPropertyValue(const int& indexAttr, const double& value)
-{
-	if(attrValue_.empty())
-		return; 
-
-	if(indexAttr >(int)(attrValue_.size()-1))
-		return;
-
-	attrValue_[indexAttr] = value;
-}
-
-void 
-TeSTEvent::addProperty(const TeProperty& prop, bool attrIn) 
-{
-	attrValue_.push_back(atof(prop.value_.c_str()));
-	attrRep_.push_back(prop.attr_.rep_);
-	if(!attrIn)
-		attrOut_.push_back((attrValue_.size()-1));
-}
-
-void 
-TeSTEvent::addProperty(const double& val, TeAttributeRep rep, bool attrIn)
-{
-	attrValue_.push_back(val);
-	attrRep_.push_back(rep);
-	if(!attrIn)
-		attrOut_.push_back((attrValue_.size()-1));
+	int bucketSize; 
+	if(n<0)
+		bucketSize= 30;
+	else
+		bucketSize= 2*n;
+	kdTree_ = new kdTree(theme_->box(), bucketSize);
+	kdTree_->build(dataSetAux);
+	return true;
 }
 
-TePropertyVector 
-TeSTEvent::getOutPropertyVector()
+bool TeSTEventSet::search(const TeBox& b, vector<TeSTEvent* >& result)
 {
-	TePropertyVector vec;
-	for(unsigned int i=0; i<attrOut_.size(); ++i)
+	if(!kdTree_)
+		return false;
+	
+	vector<kdNode*> nodes;
+	kdTree_->search(b, nodes);
+	for(unsigned int i=0; i<nodes.size(); ++i)
 	{
-		TeProperty prop;
-		prop.attr_.rep_ = attrRep_[attrOut_[i]];
-		prop.value_ = Te2String(attrValue_[attrOut_[i]]);
-		vec.push_back (prop);
+		for(unsigned int j=0; j<nodes[i]->getData().size(); ++j) //vector<TePoint>
+		{
+			int index = ((nodes[i]->getData())[j]).geomId(); 
+			TeSTEvent* ev = dynamic_cast<TeSTEvent*> (this->getSTInstance(index));
+			result.push_back(ev); 
+		}
 	}
-	return vec;
+	return true;
 }
 
-TePropertyVector 
-TeSTEvent::getPropertyVector()
+bool TeSTEventSet::nearestNeighbourSearch(const TeCoord2D& coord, vector<TeSTEvent* >& result, 
+										  vector<double>& distances, const unsigned int& k)
 {
-	TePropertyVector vec;
-	for(unsigned int i=0; i<attrValue_.size(); ++i)
-	{
-		TeProperty prop;
-		prop.attr_.rep_ = attrRep_[i];
-		prop.value_ = Te2String(attrValue_[i]);
-		vec.push_back (prop);
-	}
-	return vec;
+	vector<TePoint> res;
+	for(unsigned int n=0; n<k; ++n)
+		res.push_back (TePoint(TeMAXFLOAT,TeMAXFLOAT));
+	kdTree_->nearestNeighborSearch(coord, res, distances, k); 
+	for(unsigned int j=0; j<res.size(); ++j)
+		result.push_back(dynamic_cast<TeSTEvent*>(getSTInstance(res[j].geomId()))); 
+	return true;
 }
 
-bool 
-TeSTEvent::getPropertyValue (string& val, int i)
+void TeSTEventSet::clear()
 {
-	if ((i>=0) && (i<(int)attrValue_.size()))
-	{
-		val = Te2String(attrValue_[i]);
-		return true;
-	}
-	else
-		return false;
-}
-
-//------------------------------------------ TeSTEventSet
-
-TeTheme* 
-TeSTEventSet::theme()
-{	
-	return theme_; 
+	TeBaseSTInstanceSet<TePoint, long, TeSTEvent>::clear();
+	if(kdTree_)
+		delete kdTree_;
+	kdTree_ = 0;
 }
 
-void 
-TeSTEventSet::theme(TeTheme* t)
+bool 
+TeSTEventSet::buildImpl(TeQuerier* querier, const int& slide)
 {
-	theme_ = t;
-}
+	int dt = CLOCKS_PER_SEC/4, steps = 0;
+	int dt2 = CLOCKS_PER_SEC * 5;
+	clock_t	t0, t1, t2;
+	
+	t0=t1=t2=clock();
 
-unsigned int 
-TeSTEventSet::size()
-{ 
-	return eventSet_.size(); 
-}
+	if(!querier)
+		return false;
 
-bool
-TeSTEventSet::getAttributeValue (const string& object_id, const string& attr_name, string& val, TeTimeInterval /* time */)
-{
-	int index = getAttributeIndex(attr_name);
-	if(index<0)
+	if(!querier->loadInstances(slide))
 		return false;
+
+	//clear all structures
+	attrList_->clear();
+	instances_.clear();
+	objectIdToInstances_.clear();
+	timeToInstances_.clear();
+	sliceToInstances_.clear();
+	if(rTree_)
+		delete rTree_;
+	rTree_ = 0; 
+	kdTree_->clear();
 	
-	double vald = 0.;
-	bool status =  getAttributeValue (object_id,  index, vald);
-	val = Te2String(vald);
-	return status;
-}
+	//Builts another rTree
+	TeBox b;
+	if(theme_)
+		b = theme_->box();
+	else if(layer_)
+		b = layer_->box();
+	else
+		b = this->box_; 
+	rTree_ = new TeSAM::TeRTree<int>(b); 
 	
-bool 
-TeSTEventSet::getAttributeValue (const string& object_id, int attr_index, string& val, TeTimeInterval /* time */)
-{
-	double vald = 0.;
-	bool status =  getAttributeValue (object_id,  attr_index, vald);
-	val = Te2String(vald);
-	return status;
-}
+	TeAttributeList l = querier->getAttrList();
+	setAttributeList(l);
 
-
-bool 
-TeSTEventSet::getAttributeValue (const string& object_id, int attr_index, double& val,	long /* time */)
-{
+	int tot = querier->numElemInstances();
+	if(TeProgress::instance())
+	{
+		string caption = "Building data";
+		TeProgress::instance()->setCaption(caption.c_str());
+		string msg = "Building in progress. Please, wait!";
+		TeProgress::instance()->setMessage(msg);
+		TeProgress::instance()->setTotalSteps(tot);
+		t2 = clock();
+		t0 = t1 = t2;
+	}
 	
-	STElemIterator it = eventSet_.find(object_id);
-	if(it==eventSet_.end())
-		return false;
+	TeSTInstance obj;
+	while(querier->fetchInstance(obj)) 
+	{
+		TeCoord2D p;
+		obj.centroid(p);
+
+		TeSTEvent event(obj.getObjectId(), TePoint(p), obj.getProperties(), 0, -1);
+		this->insertSTInstance(event);
+
+		if(TeProgress::instance())
+		{
+			steps++;
+			t2 = clock();
+			if (int(t2-t1) > dt)
+			{
+				t1 = t2;
+				if(TeProgress::instance()->wasCancelled())
+					return false;
+				
+				if((int)(t2-t0) > dt2)
+					TeProgress::instance()->setProgress(steps);
+			}
+		}
+	}
+	if(TeProgress::instance())
+		TeProgress::instance()->reset();
 
-	val = (it->second).getPropertyValue(attr_index);
 	return true;
 }
 
-int 
-TeSTEventSet::getAttributeIndex(const string& attrName)
-{
-	STElemIterator it = eventSet_.begin();
-	return(it->second.getPropertyIndex(attrName));
-}
-		
-TeSTEventSet::iterator& 
-TeSTEventSet::iterator::operator++()
-{
-	if(curElem_!=elemSet_->eventSet_.end())
-		++curElem_;
-	return (*this);
-}
-
-
-TeSTEventSet::iterator 
-TeSTEventSet::begin()     
-{ 
-	return iterator(this, eventSet_.begin());
-}
-
-
-TeSTEventSet::iterator 
-TeSTEventSet::end()       
-{
-	return iterator(this, eventSet_.end());
-}
-
-
-void 
-TeSTEventSet::insertSTInstance(TeSTEvent& ev)
-{ 
-	string obj = ev.objectId();
-	eventSet_[obj] = ev; 
-}
-
-
-
-
 
 
 
diff --git a/src/terralib/kernel/TeSTEvent.h b/src/terralib/kernel/TeSTEvent.h
old mode 100644
new mode 100755
index e3a93d2..c2f51f2
--- a/src/terralib/kernel/TeSTEvent.h
+++ b/src/terralib/kernel/TeSTEvent.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright  2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,272 +20,106 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeSTEvent.h
-	This file contains structures and definitions to deal with spatial temporal events. 
-	An spatial temporal event is represented by a point, a time and a set of attributes. 
+	\brief This file contains structures and definitions to deal with spatial 
+	temporal events. 
 */
 
 #ifndef  __TERRALIB_INTERNAL_STEVENT_H
 #define  __TERRALIB_INTERNAL_STEVENT_H
 
+#include "TeBaseSTInstance.h"
+#include "TeBaseSTInstanceSet.h"
 #include "TeGeometry.h"
-#include "TeAttribute.h" 
-#include "TeTimeInterval.h"
+#include "TeKdTree.h"
 
-class TeTheme;
 
-//! A class to represent spatial temporal events
-class TeSTEvent
-{
-protected:
-	vector<string>	unique_id_;		// instance identification for each attribute table
-	string			object_id_;		// event identification
-	TePoint			point_;			// point where the event happened  
-	long			time_;			// time when the event happened   
+/*! \class TeSTEvent
+	\brief A class that represents spatial temporal events (STEvent).
 
-	vector<double>			attrValue_;		// attribute values 
-	vector<TeAttributeRep>	attrRep_;		// attribute representations (name, type, size) 
-	vector<int>				attrOut_;		// indexes of the attributes that were generated
+	A spatial temporal event is represented by a location (point), 
+	a time when it happened and a set of attributes. This class 
+	specializes the base class TeBaseSTInstance representing the geometries 
+	as points (TePoint) and the valid time as a integer (long).
 
-	TeTheme*		theme_;			// theme associated to this event
-		
+	\sa TeBaseSTInstance TePoint 
+*/
+class TL_DLL TeSTEvent : public TeBaseSTInstance<TePoint, long>
+{	
 public:
 	
 	//! Empty constructor
-	TeSTEvent()
+	TeSTEvent() : TeBaseSTInstance<TePoint, long>()
 	{ }
 
 	//! Constructor
-	TeSTEvent(const string& objId, const TePoint& point, const long& time);  
+	TeSTEvent(const string& objId, const TePoint& point, const long& time) :
+		TeBaseSTInstance<TePoint, long>(objId, point, time)
+	{ }
 
 	//! Constructor
-	TeSTEvent(const string& objId, const TePoint& point, const vector<double>& attrValue, 
-		const vector<TeAttributeRep>& attrRep, const long& time);
-	
-	//! Copy constructor
-	TeSTEvent(const TeSTEvent& other); 
-						
-	//! Assignment operator
-	TeSTEvent& operator= (const TeSTEvent& other);
-		
-	//! Operator ==
-	bool operator== (const TeSTEvent& other) const;
-	
-	//! Destructor
-	~TeSTEvent() {} 
-
-	//! Returns the event identification
-	string objectId (void)
-	{ return object_id_; }
-
-	//! Sets the event identification
-	void objectId (const string& objId)
-	{ object_id_ = objId; }
-
-	//! Returns the instance identification
-	vector<string>& uniqueId () 
-	{	return unique_id_;	}
-
-	//! Returns the instance identification
-	string uniqueId (int index_) 
-	{	return unique_id_[index_];	}
-	
-	//! Sets the instance identifications
-	void uniqueId (const vector<string>& ids) 
-	{	unique_id_ = ids;	}
-	
-	//! Get point geometry
-	void getGeometry(TePoint& result)
-	{	result = point_; }
-
-	//! Set point geometry 
-	void setGeometry(const TePoint& result)
-	{	point_ = result; }
-
-	//! Get time
-	long eventTime()
-	{	return time_; }
-
-	//! Set time
-	void eventTime(const long& t)
-	{ time_ = t; }
-
-	//! Get the time as a structure TeTimeInterval
-	TeTimeInterval timeInterval(); 
-	
-	//! Get theme pointer
-	TeTheme* theme();
-
-	//! Set theme pointer
-	void theme(TeTheme* t);
-
-	//! Get attribute values
-	vector<double>& attrValues()
-	{ return attrValue_; }
-
-	//! Set attribute values
-	void attrValues (const vector<double>& attrVal)
-	{ attrValue_ = attrVal; }
-
-	//! Get attribute representations (name, type, size)
-	vector<TeAttributeRep>& getAttributeRep()
-	{ return attrRep_; }
-
-	//! Get the attribute representation of the index-th attribute
-	TeAttributeRep getAttributeRep(const int& index)
-	{ return  attrRep_[index]; }
-
-	//! Set attribute representations (name, type, size)
-	void setAttributeRep (const vector<TeAttributeRep>& attrRep)
-	{ attrRep_ = attrRep; }
-
-	//! Get attribute indexes that were generated
-	vector<int>& attrOutIndexes()
-	{ return attrOut_; }
-
-	//! Set attribute indexes that were generated
-	void attrOutIndexes (const vector<int>& indexes)
-	{ attrOut_ = indexes; }
-
-	//! Get the attribute or property value of the index-th attribute
-	double getPropertyValue(const int& index)
-	{ return  attrValue_[index]; }
-
-	//! Gets the attribute value (as a string) of the i-th property
-	bool getPropertyValue (string& val, int i= 0);	
+	TeSTEvent(const string& objId, const TePoint& point, const vector<string>& attrValues, 
+		TeAttributeList* attList, const long& time) :
+		TeBaseSTInstance<TePoint, long>(objId, attrValues, attList, point, -1, time)
+	{ }
 
-	//! Set the attribute value of the indexAttr-th attribute
-	void setPropertyValue(const int& indexAttr, const double& value);
+	//! Clear
+	virtual void clear(); 
 	
-	//! Get the attribute name of the index-th attribute
-	string getPropertyName(const int& index)
-	{ return  attrRep_[index].name_; }
+	//! Verifies if the time associated to this event is valid
+	virtual bool isTimeValid(); 
 
-	//! Get the property index of attribute called "name"
-	int getPropertyIndex(const string& name); 
-	
-	//! Operator [], get attribute value 
-	double operator[] (const int& index)
-	{ return  attrValue_[index]; 	}
+	//! Deprecated: Gets the event location (point)
+	void getGeometry(TePoint& result)
+	{	result = this->geometries(); }
 
-	//! Add a property that contain the attribute representation and the attribute value
-	void addProperty(const TeProperty& prop, bool attrIn = true); 
+	//! Deprecated: Returns the valid time 
+	virtual TeTimeInterval timeInterval () 
+	{	TeTimeInterval t; return t;	}
+};
 
-	//! Add a property from a attribute representation and a attribute value
-	void addProperty(const double& val, TeAttributeRep rep = TeAttributeRep(), bool attrIn = true);
 
-	//! Return the attributes (representation and value) that were generated as a vector of properties
-	TePropertyVector getOutPropertyVector(); 
+/*! \class TeSTEventSet
+	\brief A class that represents a set of spatial temporal events.
 
-	//! Return all attributes (representation and value) as a vector of properties
-	TePropertyVector getPropertyVector(); 
-};
+	This class specializes the abstract class TeBaseSTInstanceSet representing
+	each spatial temporal instance of the set as a TeSTEvent type. That is, the 
+	geometries of each instance or event in this set is represented as a point 
+	(TePoint class)and its valid time as a simple number (long type). 
 
-//! A class that represents a set of spatial temporal events
-class TeSTEventSet
+	\sa TeBaseSTInstanceSet TeSTEvent TePoint TeTheme TeLayer
+*/
+class TL_DLL TeSTEventSet : public TeBaseSTInstanceSet<TePoint, long, TeSTEvent>
 {
 protected:
-	map<string, TeSTEvent>		eventSet_;  // a map from event identification to event
-	TeChronon					chronon_;	// chronon 
-	TeTheme*					theme_;		// theme associated to this event set
-	TeBox						box_;		
-	
-	typedef map<string, TeSTEvent>::iterator	STElemIterator;
-	
-public:
-
-	//! Constructor	
-	TeSTEventSet(TeTheme* theme=0): 
-	  theme_(theme)
-	{ }
-
-	//! Get theme pointer
-	TeTheme* theme(); 
 
-	//! Set theme pointer
-	void theme(TeTheme* t);
+	typedef TeSAM::TeAdaptativeKdTreeNode<TeCoord2D, vector<TePoint>, TePoint> kdNode;
+	typedef TeSAM::TeAdaptativeKdTree<kdNode> kdTree;
 
-	//! Return the number of events
-	unsigned int size();
+	//! Index structure (KD Tree) to index the point locations
+	kdTree*		kdTree_;
 
-	//! Set the chronon
-	void chronon(const TeChronon& chr) { chronon_ = chr; } 
+	//! Build the set using querier
+	bool buildImpl(TeQuerier* querier, const int& slide = -1);
 
-	//! Set the box
-	void box(const TeBox& b) { box_ = b; } 
-	
-	//! Gets the value of an attribute (as string) called "attr_name"
-	bool getAttributeValue (const string&  object_id, const string& attr_name, 
-		                    string& val, TeTimeInterval time = TeTimeInterval()); 
-		
-	//! Gets the value of the attr_index-th attribute (as string) 
-	bool getAttributeValue (const string& object_id, int attr_index, string& val,
-							TeTimeInterval time = TeTimeInterval());
-	
-	//! Gets the value of the attr_index-th attribute (as double) 
-	bool getAttributeValue (const string& object_id, int attr_index, double& val, long time = -1);
-
-	//! Get the attribute index of attribute called "attrName"
-	int getAttributeIndex(const string& attrName);
+public:			
+	//! Constructor	
+	TeSTEventSet(TeTheme* theme=0, const TeAttributeList& attrList = TeAttributeList()); 
 
-	//! Retuns the number of spatial temporal instances in the set
-	int numSTInstance()
-	{ return eventSet_.size(); }
+	//! Destructor	
+	~TeSTEventSet();
 
-	//! Retuns the number of elements in the set
-	int numElements() 
-	{ return eventSet_.size(); }
-	
-	//! An iterator to a set of spatial temportal events
-	/*! 
-		An strucuture that allows the traversal STEvent set 
-		(ST elements) in a similar way as the STL iterators. 
-	*/
-	class iterator 
-	{
-		public:
-
-		//! Constructor
-		iterator(TeSTEventSet* elemSet, STElemIterator curElem) :
-			curElem_(curElem),
-			elemSet_(elemSet)			
-			{ }
-
-		//! Prefix move forward operator
-		iterator& operator++();
-				
-		//! Operator that return the pointed event
-		TeSTEvent& operator*()
-		{	return (curElem_->second); 	}
-
-		//! Return a pointer to the event set
-		TeSTEventSet* elemSet()
-		{	return elemSet_; 	}
-
-		//! Equal operator
-		bool operator==(const iterator& rhs) const
-		{ return (this->curElem_== rhs.curElem_); }
-
-		//! Unequal operator
-		bool operator!=(const iterator& rhs) const
-		{ return (this->curElem_!= rhs.curElem_);	}
-
-		protected:
-			STElemIterator			curElem_;
-			TeSTEventSet*			elemSet_;
-	};
+	//! Build a index structure (kdTree) over all event points in this set
+	virtual bool buildKdTree(const int& n); 
 	
-	friend class TeSTEventSet::iterator;
+	//! Searchs the event points inside a specific bounding box 
+	virtual bool search(const TeBox& b, vector<TeSTEvent* >& result);
 
-	//! Returns an iterator to the first element of the set
-	iterator begin();     
+	//! Searchs the k-nearest neighbours of a specific coordinate
+	virtual bool nearestNeighbourSearch(const TeCoord2D& coord, vector<TeSTEvent* >& result, vector<double>& distances, const unsigned int& k);
 	
-	//! Returns an iterator to the one past last element of the set
-	iterator end();       
-
-	//! Insert a new event in the set
-	void insertSTInstance(TeSTEvent& ev); 
+	//! Clears the event set 
+	virtual void clear(); 
 };
 
 #endif
diff --git a/src/terralib/kernel/TeSTInstance.cpp b/src/terralib/kernel/TeSTInstance.cpp
old mode 100644
new mode 100755
index ec7eb9b..1bd9ce3
--- a/src/terralib/kernel/TeSTInstance.cpp
+++ b/src/terralib/kernel/TeSTInstance.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -22,136 +22,66 @@ of this library and its documentation.
 *************************************************************************************/
 
 
-#include "TeSTInstance.h"
+#include <TeSTInstance.h>
 
-TeSTInstance::TeSTInstance (const string& object_id, TeProperty& prop ) 
+
+TeSTInstance::TeSTInstance (const string& object_id, TeProperty& prop) :
+	TeBaseSTInstance<TeMultiGeometry, TeTimeInterval>()
 {
 	object_id_ = object_id;
-	time_ = TeTimeInterval();
-	properties_.push_back(prop);
-	slice_ = 0;
-	theme_= 0;
+	properties_.push_back(prop.value_);
 }
-		
 
-TeSTInstance::TeSTInstance(const TeSTInstance& other) 
-{	
-	object_id_		= other.object_id_;
-	time_			= other.time_;
-	properties_     = other.properties_;
-	slice_			= other.slice_;
-	theme_			= other.theme_;
-	unique_id_		= other.unique_id_;
-	geometries_		= other.geometries_;  
-}
-			
-TeSTInstance&					
-TeSTInstance::operator= (const TeSTInstance& other)
-{	
-	if ( this != &other )
-	{
-		object_id_		= other.object_id_;
-		time_			= other.time_;
-		properties_     = other.properties_;
-		slice_			= other.slice_;
-		theme_			= other.theme_;
-		unique_id_		= other.unique_id_;
-		geometries_		= other.geometries_; 
-	}
-	return *this;
+void 
+TeSTInstance::clear() 
+{
+	TeBaseSTInstance<TeMultiGeometry, TeTimeInterval>::clear();
+	geometries_.clear(); 
+	time_ = TeTimeInterval();
 }
-	
-	
-bool 
-TeSTInstance::operator== (const TeSTInstance& other) const
-{	
-	if (this->object_id_ != other.object_id_ || 
-		!(this->time_ == other.time_) )
-		return false;
 
-	return true; 
-}
 
+bool 
+TeSTInstance::isTimeValid()
+{
+	return (this->time_.isValid());
+}
 	
 bool 
-TeSTInstance::getProperty (TeProperty& prop, unsigned int i)	
+TeSTInstance::hasPolygons()	
 { 
-	if (i < properties_.size())
-	{
-		prop = properties_[i];
-		return true;
-	}
-	else
-		return false;
-}
-
+	return (geometries_.hasPolygons()); 
+} 
+	
 bool 
-TeSTInstance::getProperty (TeProperty& prop, string name)	
+TeSTInstance::hasLines()		
 { 
-	string newName; 
-	size_t pos = name.find(".", string::npos,1);
-	if (pos != string::npos)
-		newName = name.substr(pos+1);
-		
-	TePropertyVector::iterator it = properties_.begin();
-	while(it!=properties_.end())
-	{
-		if( ((*it).attr_.rep_.name_ == name) ||
-			((*it).attr_.rep_.name_ == newName))
-		{ 
-			prop = (*it);
-			return true;
-		}
-		++it;
-	}
-	return false;
-}
-
-
+	return (geometries_.hasLines()); 
+} 
+	
 bool 
-TeSTInstance::getPropertyValue (string& val, int i)	
+TeSTInstance::hasPoints()		
 { 
-	if ((i >=0) && (i< (int)properties_.size()))
-	{
-		val = properties_[i].value_;
-		return true;
-	}
-	else
-		return false;
-}
-
+	return (geometries_.hasPoints()); 
+} 
 	
 bool 
-TeSTInstance::getPropertyValue (const string& name, string& val)	
+TeSTInstance::hasCells()		
 { 
-	string newName; 
-	size_t pos = name.find(".", string::npos,1);
-	if (pos != string::npos)
-		newName = name.substr(pos+1);
-
-	TePropertyVector::iterator it = properties_.begin();
-	while(it!=properties_.end())
-	{
-		if(	((*it).attr_.rep_.name_ == name) ||
-			((*it).attr_.rep_.name_ == newName)) 
-		{
-			val = (*it).value_; 
-			return true;
-		}
-		++it;
-	}
-	return false;
-}
+	return (geometries_.hasCells()); 
+} 
 
 bool 
+TeSTInstance::hasTexts()		
+{ 
+	return (geometries_.hasTexts()); 
+} 
+	
+bool 
 TeSTInstance::getGeometry(TePolygonSet& result)
 {
 	if(geometries_.getGeometry(result))
 		return true;
-
-	if((theme_)  && (theme_->layer()->loadGeometrySet(object_id_, result)))
-		return true;
-			
 	return false;
 }
 	
@@ -160,10 +90,6 @@ TeSTInstance::getGeometry(TeLineSet& result)
 {
 	if(geometries_.getGeometry(result))
 		return true;
-
-	if((theme_)  && (theme_->layer()->loadGeometrySet(object_id_, result)))
-		return true;
-			
 	return false;
 }
 
@@ -172,10 +98,6 @@ TeSTInstance::getGeometry(TePointSet& result)
 {
 	if(geometries_.getGeometry(result))
 		return true;
-
-	if((theme_)  && (theme_->layer()->loadGeometrySet(object_id_, result)))
-		return true;
-			
 	return false;
 }
 
@@ -184,10 +106,14 @@ TeSTInstance::getGeometry(TeCellSet& result)
 {
 	if(geometries_.getGeometry(result))
 		return true;
+	return false;
+}
 
-	if((theme_)  && (theme_->layer()->loadGeometrySet(object_id_, result)))
+bool 
+TeSTInstance::getGeometry(TeTextSet& result)
+{
+	if(geometries_.getGeometry(result))
 		return true;
-			
 	return false;
 }
 
@@ -196,62 +122,7 @@ TeSTInstance::getGeometry(vector<TeGeometry*>& result)
 {
 	if(geometries_.getGeometry(result))
 		return true;
-
-	if(theme_)
-	{
-		if(theme_->layer()->hasGeometry (TePOLYGONS))
-		{
-			TePolygonSet pols; 
-			if(!theme_->layer()->loadGeometrySet(object_id_, pols))
-				return false;
-			
-			for(int i=0; i<(int)pols.size(); ++i)
-			{
-				TePolygon* pol = new TePolygon;
-				result.push_back (pol);
-			}
-		}
-		if(theme_->layer()->hasGeometry (TeLINES))
-		{
-			TeLineSet lins; 
-			if(!theme_->layer()->loadGeometrySet(object_id_, lins))
-				return false;
-			
-			for(int i=0; i<(int)lins.size(); ++i)
-			{
-				TeLine2D* line = new TeLine2D;
-				result.push_back (line);
-			}
-		}
-		if(theme_->layer()->hasGeometry (TePOINTS))
-		{
-			TePointSet	points; 
-			if(!theme_->layer()->loadGeometrySet(object_id_, points))
-				return false;
-
-			for(int i=0; i<(int)points.size(); ++i)
-			{
-				TePoint* point = new TePoint;
-				result.push_back (point);
-			}
-		}
-		if(theme_->layer()->hasGeometry (TeCELLS))
-		{
-			TeCellSet cells; 
-			if(!theme_->layer()->loadGeometrySet(object_id_, cells))
-				return false;
-
-			for(int i=0; i<(int)cells.size(); ++i)
-			{
-				TeCell* cell = new TeCell;
-				result.push_back (cell);
-			}
-		}
-	}
-	else
-		return false;
-			
-	return true;
+	return false;
 }
 
 bool 
@@ -271,16 +142,72 @@ TeSTInstance::getGeometry(TeMultiGeometry& result)
 	return (!result.empty());
 }
 
-void 
-TeSTInstance::addProperty(const double& val, TeAttributeRep rep, bool /* attrIn */)
-{
-	TeProperty prop;
-	prop.attr_.rep_ = rep; 
-	prop.value_ = Te2String(val); 
-	properties_.push_back(prop);	
+TePolygonSet&  
+TeSTInstance::getPolygons()
+{	
+	return geometries_.getPolygons(); 
+}
+	
+TeLineSet&  
+TeSTInstance::getLines()
+{	
+	return geometries_.getLines(); 
+}
+
+TePointSet&  
+TeSTInstance::getPoints()
+{	
+	return geometries_.getPoints(); 
+}
+
+TeCellSet&  
+TeSTInstance::getCells()
+{	
+	return geometries_.getCells(); 
 }
 
+TeTextSet&  
+TeSTInstance::getTexts()
+{	
+	return geometries_.getTexts(); 
+}
 
+void 
+TeSTInstance::setGeometry(const TePolygonSet& result)
+{ 
+	geometries_.setGeometry(result); 
+}
+	
+void 
+TeSTInstance::setGeometry(const TeLineSet& result)
+{ 
+	geometries_.setGeometry(result); 
+}
+	
+void 
+TeSTInstance::setGeometry(const TePointSet& result)
+{ 
+	geometries_.setGeometry(result); 
+}
+	
+void 
+TeSTInstance::setGeometry(const TeCellSet& result)
+{ 
+	geometries_.setGeometry(result); 
+}
+	
+void 
+TeSTInstance::setGeometry(const TeTextSet& result)
+{ 
+	geometries_.setGeometry(result); 
+}
+
+void 
+TeSTInstance::setGeometry(const TeMultiGeometry& result)
+{ 
+	geometries_ = result; 
+}
+ 
 bool 
 TeSTInstance::addGeometry(const TePolygon& poly)  
 { 
@@ -325,57 +252,27 @@ TeSTInstance::addGeometry(const TeCell& cell)
 	return false;  
 }
 
-
-bool 
-TeSTInstance::setPropertyValue (const string& name, const string& val)	
+bool
+TeSTInstance::addGeometry(const TeText& text)		
 { 
-	string newName; 
-	size_t pos = name.find(".", string::npos,1);
-	if (pos != string::npos)
-		newName = name.substr(pos+1);
-
-	TePropertyVector::iterator it = properties_.begin();
-	while(it!=properties_.end())
+	if(text.objectId() == objectId())
 	{
-		if( ((*it).attr_.rep_.name_ == name) ||
-			((*it).attr_.rep_.name_ == newName))
-		{
-			(*it).value_ = val; 
-			return true;
-		}
-		++it;
-	}
-	return false;
-}
-
-
-double 
-TeSTInstance::operator[](int i)   
-{
-	TeAttrDataType	attrType = properties_[i].attr_.rep_.type_;
-
-	if ((i >= 0) && (i < (int)properties_.size()) && 
-		(attrType == TeREAL || attrType == TeINT))
-	{
-		if (properties_[i].value_.empty()) 
-			return TeMAXFLOAT;
-		return (atof(properties_[i].value_.c_str()));
+		geometries_.addGeometry (text);
+		return true;
 	}
-	else 
-		return 0.;
+	return false;  
 }
 
-bool 
+void 
 TeSTInstance::centroid(TeCoord2D& centroid, TeGeomRep geomRep)
 {
-	bool status = false;
 	if(geomRep==TePOLYGONS)
 	{ 
 		TePolygonSet pols;
 		if(getGeometry(pols))
 		{
 			centroid = TeFindCentroid(pols);
-			status = true;
+			return;
 		}
 	}
 	if(geomRep==TeLINES)
@@ -384,7 +281,7 @@ TeSTInstance::centroid(TeCoord2D& centroid, TeGeomRep geomRep)
 		if(getGeometry(lins))
 		{
 			centroid = TeFindCentroid(lins);
-			status = true;
+			return;
 		}
 	}
 	if(geomRep==TePOINTS)
@@ -393,7 +290,7 @@ TeSTInstance::centroid(TeCoord2D& centroid, TeGeomRep geomRep)
 		if(getGeometry(points))
 		{
 			centroid = TeFindCentroid(points);
-			status = true;
+			return;
 		}
 	}
 	if(geomRep==TeCELLS)
@@ -402,53 +299,35 @@ TeSTInstance::centroid(TeCoord2D& centroid, TeGeomRep geomRep)
 		if(getGeometry(cells))
 		{
 			centroid = TeFindCentroid(cells);
-			status = true;
+			return;
 		}
 	}
 	if(geomRep==TeGEOMETRYNONE)
 	{
 		if(hasPolygons())
-			status = this->centroid(centroid, TePOLYGONS);
+			this->centroid(centroid, TePOLYGONS);
 		else if(hasLines())
-			status = this->centroid(centroid, TeLINES);
+			this->centroid(centroid, TeLINES);
 		else if (hasPoints())
-			status = this->centroid(centroid, TePOINTS);
+			this->centroid(centroid, TePOINTS);
 		else if (hasCells())
-			status = this->centroid(centroid, TeCELLS);
+			this->centroid(centroid, TeCELLS);
 	}
 
-	return status;
+	return;
 }
 
-bool 
+void 
 TeSTInstance::area(double& a, TeGeomRep geomRep)
 {
-	bool status = false;
+	a = 0.;
 	if(geomRep==TePOLYGONS)
 	{ 
 		TePolygonSet pols;
 		if(getGeometry(pols))
 		{
 			a = TeGeometryArea(pols);
-			status = true;
-		}
-	}
-	if(geomRep==TeLINES)
-	{
-		TeLineSet lins; 
-		if(getGeometry(lins))
-		{
-			a = TeGeometryArea(lins);
-			status = true;
-		}
-	}
-	if(geomRep==TePOINTS)
-	{
-		TePointSet points; 
-		if(getGeometry(points))
-		{
-			a = TeGeometryArea(points);
-			status = true;
+			return;
 		}
 	}
 	if(geomRep==TeCELLS)
@@ -457,34 +336,18 @@ TeSTInstance::area(double& a, TeGeomRep geomRep)
 		if(getGeometry(cells))
 		{
 			a = TeGeometryArea(cells);
-			status = true;
+			return;
 		}
 	}
 	if(geomRep==TeGEOMETRYNONE)
 	{
 		if(hasPolygons())
-			status = this->area(a, TePOLYGONS);
-		else if(hasLines())
-			status = this->area(a, TeLINES);
-		else if (hasPoints())
-			status = this->area(a, TePOINTS);
+			this->area(a, TePOLYGONS);
 		else if (hasCells())
-			status = this->area(a, TeCELLS);
+			this->area(a, TeCELLS);
 	}
 
-	return status;
+	return;
 }
 
-void 
-TeSTInstance::clear()
-{
-	slice_ = 0;
-	theme_ = 0;
-	object_id_.clear();
-	unique_id_.clear();
-	properties_.clear();
-	geometries_.clear();
-}
-
-
 
diff --git a/src/terralib/kernel/TeSTInstance.h b/src/terralib/kernel/TeSTInstance.h
old mode 100644
new mode 100755
index 9594e62..9b981bf
--- a/src/terralib/kernel/TeSTInstance.h
+++ b/src/terralib/kernel/TeSTInstance.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,212 +20,155 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeSTInstance.h
-	This file contains structures and definitions to deal with an instance
-	in time of a spatial element, including their geometry and set of properties  
+	\brief This file contains a class called TeSTInstance that represents 
+	an instance in time of a geographical object or element.  
 */
 
 #ifndef  __TERRALIB_INTERNAL_STINSTANCE_H
 #define  __TERRALIB_INTERNAL_STINSTANCE_H
 
-#include "TeAttribute.h"
 #include "TeTimeInterval.h"
-#include "TeTheme.h"
 #include "TeMultiGeometry.h"
+#include "TeBaseSTInstance.h"
 
 #include <string>
 #include <map> 
 #include <vector>
 using namespace std;
 
-//! An instance in a time of a spatial element
-class TeSTInstance
-{
-	
-protected:
-	string				object_id_;		// object identification
-	vector<string>		unique_id_;		// instance identification for each attribute table
-	int					slice_;			// grouping identification
-	
-	TeTimeInterval		time_;			// validity time
-	TePropertyVector	properties_;	// set of properties
-	TeMultiGeometry	    geometries_;	// set of geometries
-
-	TeTheme*			theme_;			// theme
-
-public:		
-
-	//! Default constructor
-	TeSTInstance() { }
-
-	//! Constructor to an ST object without geometries or time stamp 
-	TeSTInstance (const string& object_id, TeProperty& prop ); 
-			
-	//! Copy constructor
-	TeSTInstance(const TeSTInstance& other); 
-						
-	//! Assignment operator
-	TeSTInstance& operator= (const TeSTInstance& other);
-		
-	//! Operator ==
-	bool operator== (const TeSTInstance& other) const;
-	
-	//! Destructor
-	~TeSTInstance() {} 
-	
-	//! Sets the vector of properties of this ST object
-	void properties(TePropertyVector& p) 
-	{	properties_ = p;	}
-
-	//! Returns the property vector of this instance
-	TePropertyVector& getPropertyVector()
-	{	return properties_;	}
-
-	//! Returns the properties of this instance that was generated for a function
-	TePropertyVector& getOutPropertyVector()
-	{	return properties_;	}
+/*! \class TeSTInstance
+	\brief A class that represents an instance in a time of a spatial object.
 
-	//! Returns the geometries
-	TeMultiGeometry& geometries() { return geometries_;}
+	A spatio-temporal instance (STInstance) is composite of an attribute set and geometries 
+	of a spatial element or object that are valid in a specific time. This class 
+	specializes the base class TeBaseSTInstance representing the geometries 
+	as multigeometries (TeMultiGeometry) and the valid time as a time interval (TeTimeInterval).
 
-	//! Gets the i-th property
-	bool getProperty (TeProperty& prop, unsigned int i = 0);	
-	
-	//! Gets the property named "name
-	bool getProperty (TeProperty& prop, string name);	
+	\sa TeBaseSTInstance TeMultiGeometry TeTimeInterval
 	
-	//! Gets the value (as a string) of of the i-th property
-	bool getPropertyValue (string& val, int i = 0);	
-
-	//! Gets the value (as a string) of a property named 'name'
-	bool getPropertyValue (const string& name, string& val);	
+*/
+class TL_DLL TeSTInstance : public TeBaseSTInstance<TeMultiGeometry, TeTimeInterval>
+{
+public:		
 
-	//! Return true if this has polygons
-	bool hasPolygons()	
-	{ return (geometries_.hasPolygons()); } 
-	
-	//! Return true if this has lines
-	bool hasLines()		
-	{ return (geometries_.hasLines()); } 
-	
-	//! Return true if this has points
-	bool hasPoints()		
-	{ return (geometries_.hasPoints()); } 
-	
-	//! Return true if this has cells
-	bool hasCells()		
-	{ return (geometries_.hasCells()); } 
-	
-	//! Get geometries
+	//! Constructor
+	TeSTInstance() : 
+		TeBaseSTInstance<TeMultiGeometry, TeTimeInterval>() 
+	{ }
+
+	//! Deprecated: Constructor
+	TeSTInstance (const string& object_id, TeProperty& prop); 
+
+	//! Constructor 
+	TeSTInstance (const string& object_id, vector<string>& prop, TeAttributeList* attList = 0, const int& s = -1) : 
+		TeBaseSTInstance<TeMultiGeometry, TeTimeInterval>(object_id, prop, attList, s)
+	{ }
+
+	//! Constructor
+	TeSTInstance (const string& object_id, const TeMultiGeometry& geometries, 
+		const TeTimeInterval& time, const int& s = -1) : 
+		TeBaseSTInstance<TeMultiGeometry, TeTimeInterval>(object_id, geometries, time, s)
+	{ }
+
+	//! Constructor 
+	TeSTInstance (const string& object_id, vector<string>& prop, TeAttributeList* attList, 
+		TeMultiGeometry& geometries, int& slice, TeTimeInterval& time ) :
+		TeBaseSTInstance<TeMultiGeometry, TeTimeInterval>(object_id, prop, attList, geometries, slice, time)
+	{ }
+
+	//! Clear 
+	virtual void clear(); 
+	
+	//! Verifies if the its time is valid
+	virtual bool isTimeValid();
+	
+	//! Deprecated: Verifies if the instance has polygons
+	bool hasPolygons();	
+	//! Deprecated: Verifies if the instance has lines
+	bool hasLines();		
+	//! Deprecated: Verifies if the instance has points
+	bool hasPoints();		
+	//! Deprecated: Verifies if the instance has cells
+	bool hasCells();		
+	//! Deprecated: Return true if this has texts
+	bool hasTexts();		
+	
+	//! Deprecated: Gets a copy of the ST instance polygon set
 	bool getGeometry(TePolygonSet& result); 
+	//! Deprecated: Gets a copy of the ST instance line set
 	bool getGeometry(TeLineSet& result);
+	//! Deprecated: Gets a copy of the ST instance point set
 	bool getGeometry(TePointSet& result);
+	//! Deprecated: Gets a copy of the ST instance cell set
 	bool getGeometry(TeCellSet& result);
+	//! Deprecated: Gets a copy of the ST instance text set
+	bool getGeometry(TeTextSet& result);
+	//! Deprecated: Gets a copy of the ST instance geometry vector
 	bool getGeometry(vector<TeGeometry*>& result);
+	//! Deprecated: Gets a copy of the ST instance multi geometry
 	bool getGeometry(TeMultiGeometry& result);
 
-	//! Adds a property to this ST object
-	void addProperty(TeProperty& prop) 
-	{	properties_.push_back ( prop );		}
-
-	//! Adds a property to this ST object
-	void addProperty(const double& val, TeAttributeRep rep = TeAttributeRep(), bool attrIn = true); 
-
-	//! Set geometries
-	void setGeometry(const TePolygonSet& result)
-	{ geometries_.setGeometry(result); }
-	
-	void setGeometry(const TeLineSet& result)
-	{ geometries_.setGeometry(result); }
-
-	void setGeometry(const TePointSet& result)
-	{ geometries_.setGeometry(result); }
-
-	void setGeometry(const TeCellSet& result)
-	{ geometries_.setGeometry(result); }
-
-	void setGeometry(vector<TeGeometry*>& result)
-	{ geometries_.setGeometry(result); }
-
-	void setGeometry(const TeMultiGeometry& geoms) 
-	{	geometries_ = geoms; }
-
-	//! Add geometries
+	//! Deprecated: Get a reference to the ST instance polygon geometry
+	TePolygonSet&  getPolygons();
+	//! Deprecated: Get a reference to the ST instance line geometry
+	TeLineSet&  getLines();
+	//! Deprecated: Get a reference to the ST instance point geometry 
+	TePointSet&  getPoints();
+	//! Deprecated: Get a reference to the ST instance cell geometry  
+	TeCellSet&  getCells();
+	//! Deprecated: Get a reference to the ST instance text geometry 
+	TeTextSet&  getTexts();
+
+	//! Deprecated: Sets a polygon set to the instance 
+	void setGeometry(const TePolygonSet& result); 
+	//! Deprecated: Sets a line set to the instance 
+	void setGeometry(const TeLineSet& result);
+	//! Deprecated: Sets a point set to the instance 
+	void setGeometry(const TePointSet& result);
+	//! Deprecated: Sets a cell set to the instance 
+	void setGeometry(const TeCellSet& result);
+	//! Deprecated: Sets a text set to the instance 
+	void setGeometry(const TeTextSet& result);
+	//! Deprecated: Sets a text set to the instance 
+	void setGeometry(const TeMultiGeometry& result);
+			
+	//! Deprecated: Adds a polygon to the instance
 	bool addGeometry(const TePolygon& poly);  
+	//! Deprecated: Adds a line to the instance
 	bool addGeometry(const TeLine2D& line);
+	//! Deprecated: Adds a point to the instance
 	bool addGeometry(const TePoint& point);	
+	//! Deprecated: Adds a cell to the instance
 	bool addGeometry(const TeCell& cell);		
-		
-	//! Sets the value (as a string) of a property named 'name' 
-	bool setPropertyValue (const string& name, const string& val);	
-	
-	//! Returns the value (as a double) of the i-th property
-	double operator[](int i);    
-	
-	//! Return the centroid of the geometry
-	bool centroid(TeCoord2D& centroid, TeGeomRep geomRep=TeGEOMETRYNONE); 
-	
-	//! Return the area of the geometry
-	bool area( double& a, TeGeomRep geomRep=TeGEOMETRYNONE);
+	//! Deprecated: Adds a text to the instance
+	bool addGeometry(const TeText& cell);		
+
+	//! Returns a centroid of a geometry representation 
+	virtual void centroid(TeCoord2D& centroid, TeGeomRep geomRep=TeGEOMETRYNONE); 
 	
-	//! Returns the validity interval
-	TeTimeInterval timeInterval () 
-	{	return time_;	}
+	//! Returns an area of a geometry representation
+	virtual void area(double& a, TeGeomRep geomRep=TeGEOMETRYNONE);
+
+	//! Deprecated: Returns the valid time 
+	virtual TeTimeInterval timeInterval () 
+	{	return getTime();	}
 	
-	//! Sets the validity interval
-	void timeInterval (const TeTimeInterval& t) 
-	{	time_ = t;	}
+	//! Deprecated: Sets the valid time interval
+	virtual void timeInterval (const TeTimeInterval& t) 
+	{	setTime(t);	}
 
-	//! Returns the initial time of the validity interval
-	string getInitialDateTime(const string& mask="YYYYsMMsDDsHHsmmsSS") 
+	//! Returns the initial time (as a string) of the valid time interval
+	virtual string getInitialDateTime(const string& mask="YYYYsMMsDDsHHsmmsSS") 
 	{	return time_.getInitialDateTime(mask);	}
 	
-	//! Returns the final time of the validity interval
-	string getFinalDateTime(const string& mask="YYYYsMMsDDsHHsmmsSS") 
+	//! Returns the final time (as a string) of the valid time interval
+	virtual string getFinalDateTime(const string& mask="YYYYsMMsDDsHHsmmsSS") 
 	{	return time_.getFinalDateTime(mask);	}
-
-	//! Returns the object identification
-	string objectId () 
-	{	return object_id_;	}
-	
-	//! Sets the object identification
-	void objectId (const string& id) 
-	{	object_id_ = id;	}
-
-	//! Returns the instance identification
-	vector<string>& uniqueId () 
-	{	return unique_id_;	}
-
-	//! Returns the instance identification
-	string uniqueId (int index_) 
-	{	return unique_id_[index_];	}
 	
-	//! Sets the instance identifications
-	void uniqueId (const vector<string>& ids) 
-	{	unique_id_ = ids;	}
-
-	//! Adds the instance identifications
-	void addUniqueId(const string& id)
-	{	unique_id_.push_back(id); }
-
-	//! Sets the grouping identification of this ST object
-	void slice (int s) 
-	{	slice_ = s; }
-
-	//! Returns the grouping identification of this ST object
-	int slice()
-	{	return slice_; }
-
-	//! Return the theme that the instance belongs 
-	TeTheme* theme() { return theme_; }
-
-	//! Set the theme that the instance belongs
-	void theme(TeTheme* theme)  { theme_ = theme; }
-
-	//! clear instance
-	void clear(); 
 };
 
+//! A spatial temporal element or object (TeSTElement) is composite of a set of spatial temporal instances related to it.  
+typedef vector<TeSTInstance>  TeSTElement;
 
 #endif 
diff --git a/src/terralib/kernel/TeSharedPtr.h b/src/terralib/kernel/TeSharedPtr.h
new file mode 100755
index 0000000..966edce
--- /dev/null
+++ b/src/terralib/kernel/TeSharedPtr.h
@@ -0,0 +1,435 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeSharedPtr.h
+    \brief This file contains a class to deal with automatic dynamic memory allocation / desallocationn
+*/
+#ifndef TESHAREDPTR_H
+  #define TESHAREDPTR_H
+
+  #include "TeMutex.h"
+  #include "TeAgnostic.h"
+
+  /**
+   * @brief This is the class to deal with automatic dynamic memory
+   * allocation / desallocation.
+   * @note This is a thread-safe class.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup Utils
+   */
+  template< class T >
+  class TeSharedPtr {
+    public :
+      /**
+       * @brief Default Constructor( Shared ).
+       *
+       * @param pointer A pointer the the active object.
+       */
+      explicit TeSharedPtr( T* pointer = 0 );
+        
+      /**
+       * @brief Alternative Constructor.
+       *
+       * @param external External object reference.
+       * @param not_shared_flag A flag indication for a static
+       * assignment ( the pointed object will not be deleted at the
+       * this object destruction ).       
+       */
+      TeSharedPtr( const TeSharedPtr< T >& external );        
+        
+      /**
+       * @brief Alternative Constructor.
+       *
+       * @param pointer A pointer the the active object.
+       * @param not_shared_flag A flag indication for a static
+       * assignment ( the pointed object will not be deleted at the
+       * this object destruction ).
+       */
+      explicit TeSharedPtr( T* pointer,  bool not_shared_flag );        
+
+      /**
+       * @brief Default Destructor
+       */
+      ~TeSharedPtr();
+
+      /**
+       * @brief Verifies if the current pointer points to an active object.
+       *
+       * @return true if active, false if not.
+       */
+      inline bool isActive() const;
+      
+      /**
+       * @brief Verifies if the current pointer is shared.
+       *
+       * @return true if shared, false if not.
+       */
+      inline bool isShared() const;      
+
+      /**
+       * @brief Reset the active instance the the new pointer.
+       *
+       * @param pointer A pointer the the active object.
+       * @param not_shared_flag A flag indication for a static
+       * assignment ( the pointed object will not be deleted at the
+       * this object destruction ).
+       */
+      void reset( T* pointer = 0, bool not_shared_flag = false );
+
+      /**
+       * @brief Operator = overload.
+       *
+       * @param external External instance reference.
+       * @return A reference to the current pointer.
+       */
+      const TeSharedPtr< T >& operator=( const TeSharedPtr< T >& external );
+
+      /**
+       * @brief Operator * overload.
+       *
+       * @return The internal instance reference.
+       */
+      inline T& operator*() const;
+
+      /**
+       * @brief Operator -> overload.
+       *
+       * @return The internal instance pointer.
+       */
+      inline T* operator->() const;
+
+      /**
+       * @brief Operator == overload.
+       *
+       * @param external The external instance reference.
+       * @return true if the current pointer and the external pointer
+       * are pointing to the same object.
+       */
+      inline bool operator==( const TeSharedPtr< T >& external ) const;
+      
+      /**
+       * @brief Operator< overload.
+       *
+       * @param external The external instance reference.
+       * @return true if the current pointer pointed address has a lower value 
+       * then the external shared pointer pointed address.
+       */
+      inline bool operator<( const TeSharedPtr< T >& external ) const;      
+
+      
+      /**
+       * @brief Operator> overload.
+       *
+       * @param external The external instance reference.
+       * @return true if the current pointer pointed address has a lower value 
+       * then the external shared pointer pointed address.
+       */
+      inline bool operator>( const TeSharedPtr< T >& external ) const;      
+
+            
+      /**
+       * @brief Operator != overload.
+       *
+       * @param external The external instance reference.
+       * @return true if the current pointer and the external pointer
+       * are not pointing to the same object.
+       */
+      inline bool operator!=( const TeSharedPtr< T >& external ) const;
+
+      /**
+       * @brief A Naked Pointer to the encapsulated object.
+       *
+       * @return The internal instance pointer.
+       */
+      inline T* nakedPointer() const;
+      
+      /**
+       * @brief Builds a non-shared pointer copy from the current instance.
+       *
+       * @return The non-shared pointer copy.
+       */
+      TeSharedPtr< T > getNonSharedCopy() const;      
+      
+      /**
+       * @brief The number of current references to the pointed object.
+       *
+       * @return The number of current references to the pointed object.
+       */
+      unsigned long int getRefCount() const;            
+
+    protected :
+    
+      /**
+       * @brief This instance locking mutex.
+       */    
+      mutable TeMutex this_lock_instance_;
+      
+      /**
+       * @brief A pointer to the shared counter locking mutex.
+       */    
+      mutable TeMutex* counter_lock_instance_ptr_;      
+
+      /**
+       * @brief A pointer to the current number of active users of this pointer.
+       */
+      mutable unsigned long int* counter_;
+
+      /**
+       * @brief A pointer to the current object encapsulated by this
+       * shared pointer.
+       */
+      mutable T* reference_;
+
+      /**
+       * @brief A flag indicating if this shared pointer was created by a
+       * dynamic assignment ( false value ) or by a static
+       * assignment( true value - the encapsulated object will not
+       * be destroyed at the end.
+       */
+      mutable bool not_shared_flag_;
+      
+      /**
+       * @brief Set all internal variables to default values.
+       *
+       */
+      void init();
+  };
+
+  
+  template< class T >
+  TeSharedPtr< T >::TeSharedPtr( T* pointer )
+  {
+    init();
+    reset( pointer, not_shared_flag_ );
+  }
+ 
+   
+  template< class T >
+  TeSharedPtr< T >::TeSharedPtr( const TeSharedPtr< T >& external )
+  {
+    init();
+    operator=( external );
+  } 
+
+    
+  template< class T >
+  TeSharedPtr< T >::TeSharedPtr( T* pointer, bool not_shared_flag )
+  {
+    init();
+    reset( pointer, not_shared_flag );
+  }  
+
+
+  template< class T >
+    TeSharedPtr< T >::~TeSharedPtr()
+  {
+    reset( 0, 0 );
+  }
+
+
+  template< class T >
+  inline bool TeSharedPtr< T >::isActive() const
+  {
+    return ( ( reference_ == 0 ) ? false : true );
+  }
+  
+  
+  template< class T >
+  inline bool TeSharedPtr< T >::isShared() const
+  {
+    return ( ! not_shared_flag_ );
+  }  
+
+
+  template< class T >
+  void TeSharedPtr< T >::reset( T* pointer, bool not_shared_flag )
+  {
+    this_lock_instance_.lock();
+    
+    /* updating the shared objects */
+    
+    if( ( reference_ != 0 ) && ( ! not_shared_flag_ ) ) {
+      counter_lock_instance_ptr_->lock();
+    
+      --(*counter_);
+      
+      /* Cleanning the shared pointed objects if necessary */
+
+      if( (*counter_) == 0 ) {
+        delete counter_;
+        delete reference_;
+        delete counter_lock_instance_ptr_;
+      } else {
+        counter_lock_instance_ptr_->unLock();
+      }
+    }
+     
+    init();
+    
+    /* Acquiring the pointed object */
+
+    if( pointer != 0 ) {
+      if( ! not_shared_flag ) {
+        counter_ = new unsigned long int;
+        (*counter_) = 1;
+        counter_lock_instance_ptr_ = new TeMutex;
+      }
+
+      reference_ = pointer;
+      not_shared_flag_ = not_shared_flag;
+    }
+    
+    this_lock_instance_.unLock();
+  }
+
+
+  template< class T >
+  const TeSharedPtr< T >& TeSharedPtr< T >::operator=(
+    const TeSharedPtr< T >& external )
+  {
+    if( ( &external ) != this ) {
+      reset();
+  
+      this_lock_instance_.lock();
+      
+      if( (&external) != 0 ) {
+        external.this_lock_instance_.lock();
+      
+        if( external.isActive() ) {
+          reference_ = external.reference_;
+        
+          if( ( ! not_shared_flag_ ) && ( ! external.not_shared_flag_ ) ) {
+            
+            counter_ = external.counter_;
+            (*counter_) = (*counter_) + 1;
+            
+            counter_lock_instance_ptr_ = external.counter_lock_instance_ptr_;
+          } else {
+            not_shared_flag_ = true;
+          }
+        }
+        
+        external.this_lock_instance_.unLock();
+      }
+      
+      this_lock_instance_.unLock();
+    }
+
+    return *this;
+  }
+
+
+  template< class T >
+  inline T& TeSharedPtr< T >::operator*() const
+  {
+    TEAGN_DEBUG_CONDITION( isActive(), 
+      "Trying to use an inactive shared pointer instance" );
+
+    return *reference_;
+  }
+
+
+  template< class T >
+  inline T* TeSharedPtr< T >::operator->() const
+  {
+    TEAGN_DEBUG_CONDITION( isActive(), 
+      "Trying to use an inactive shared pointer instance" );
+    
+    return reference_;
+  }
+
+
+  template< class T >
+  inline bool TeSharedPtr< T >::operator==(
+    const TeSharedPtr< T >& external ) const
+  {
+    return ( ( reference_ == external.reference_ ) ? true : false );
+  }
+  
+  
+  template< class T >
+  inline bool TeSharedPtr< T >::operator<(
+    const TeSharedPtr< T >& external ) const
+  {
+    return ( ( reference_ < external.reference_ ) ? true : false );
+  }  
+
+
+  template< class T >
+  inline bool TeSharedPtr< T >::operator>(
+    const TeSharedPtr< T >& external ) const
+  {
+    return ( ( reference_ > external.reference_ ) ? true : false );
+  }  
+    
+
+  template< class T >
+  inline bool TeSharedPtr< T >::operator!=(
+    const TeSharedPtr< T >& external ) const
+  {
+    return ( ( reference_ == external.reference_ ) ? false : true );
+  }
+
+
+  template< class T >
+  inline T* TeSharedPtr< T >::nakedPointer() const
+  {
+    return reference_;
+  }
+  
+  template< class T >
+  TeSharedPtr< T > TeSharedPtr< T >::getNonSharedCopy() const
+  {
+    TeSharedPtr< T > outptr;
+    outptr.reset( reference_, true );
+    return outptr;
+  }
+  
+  template< class T >
+  unsigned long int TeSharedPtr< T >::getRefCount() const
+  {
+    if( reference_ ) {
+      if( counter_) {
+        return (*counter_);
+      } else {
+        return 1;
+      }
+    } else {
+      return 0;
+    }
+  }  
+  
+  template< class T >
+  void TeSharedPtr< T >::init()
+  {
+    counter_ = 0;
+    reference_ = 0;
+    counter_lock_instance_ptr_ = 0;
+    not_shared_flag_ = false;  
+  }  
+
+/** @example TeSharedPtr_test.cpp
+ *    Shows how to use this class.
+ */  
+  
+#endif
+
diff --git a/src/terralib/kernel/TeSingleton.h b/src/terralib/kernel/TeSingleton.h
old mode 100644
new mode 100755
index 16be16b..5f5a645
--- a/src/terralib/kernel/TeSingleton.h
+++ b/src/terralib/kernel/TeSingleton.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,7 +20,9 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
+/*! \file TeSingleton.h
+    \brief This file contains a template for the "Singleton" pattern.
+*/
 #ifndef  __TERRALIB_INTERNAL_SINGLETON_H
 #define  __TERRALIB_INTERNAL_SINGLETON_H
 
@@ -28,6 +30,9 @@ of this library and its documentation.
 /*!
 	\note See "Design Patterns" book, page 127
 */
+
+#include "TeDefines.h"
+
 template <class T>
 class TeSingleton {
 public:
diff --git a/src/terralib/kernel/TeSlice.h b/src/terralib/kernel/TeSlice.h
old mode 100644
new mode 100755
index 2ebb39e..ca2ef13
--- a/src/terralib/kernel/TeSlice.h
+++ b/src/terralib/kernel/TeSlice.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,9 +20,8 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeSlice.h
-    This provides support for a slice structure
+    \brief This file provides support for a slice structure
 */
 #ifndef  __TERRALIB_INTERNAL_SLICE_H
 #define  __TERRALIB_INTERNAL_SLICE_H
@@ -40,7 +39,7 @@ A Slice is a structure that defines an interval of values and associates a
 number of objects that have a certain property, or attribute, whithin this
 interval.
 */ 
-class TeSlice
+class TL_DLL TeSlice
 {
 public:
 	int			count_;			//! number of objects container in the interval
@@ -48,13 +47,28 @@ public:
 	string		to_;			//! interval upper value
 	
 	//! Constructor
-	TeSlice::TeSlice () : count_(0),from_(""),to_("") {}
+	TeSlice () : count_(0),from_(""),to_("") {}
 
 	//! Constructor
-	TeSlice::TeSlice(const string& from, const string& to, int count=0) :
+	TeSlice(const string& from, const string& to, int count=0) :
      count_(count),
 		from_(from),
 		to_(to) {}
+
+	TeSlice(const TeSlice& slice)
+	{
+		from_ = slice.from_;
+		to_ = slice.to_;
+		count_ = slice.count_;
+	}
+
+	TeSlice& operator=(const TeSlice& slice)
+	{
+		from_ = slice.from_;
+		to_ = slice.to_;
+		count_ = slice.count_;
+		return *this;
+	}
 };
 
 //! A vector of slices
diff --git a/src/terralib/kernel/TeSparseMatrix.h b/src/terralib/kernel/TeSparseMatrix.h
old mode 100644
new mode 100755
index e843cca..71acdde
--- a/src/terralib/kernel/TeSparseMatrix.h
+++ b/src/terralib/kernel/TeSparseMatrix.h
@@ -9,6 +9,8 @@
 #else
 #include<hmap.h>
 
+#include "TeDefines.h"
+
 /* If at this point the HMap container is chosen, a function for
    calculating the hash table addresses is needed. As opposed to the
    hash functions described up to now, not only one value, but two are
diff --git a/src/terralib/kernel/TeSpatialOperations.cpp b/src/terralib/kernel/TeSpatialOperations.cpp
old mode 100644
new mode 100755
index d893848..7894ad3
--- a/src/terralib/kernel/TeSpatialOperations.cpp
+++ b/src/terralib/kernel/TeSpatialOperations.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -60,7 +60,7 @@ getProjectionFromGeomTable(const string& geomTable, TeDatabase* db)
 
 // Return if exist or not a totpological relation between two geometries
 // Use the TerraLib topological functions
-bool TopolRelation(TePolygon* geom1, TePolygon* geom2, int relation)
+bool TeTopologicalRelation(const TePolygon* geom1, const TePolygon* geom2, int relation)
 {
 	bool result = false;
 	switch (relation)  
@@ -113,7 +113,7 @@ bool TopolRelation(TePolygon* geom1, TePolygon* geom2, int relation)
 }
 
 
-bool TopolRelation(TePolygon* geom1, TeLine2D* geom2, int relation)
+bool TeTopologicalRelation(const TePolygon* geom1, const TeLine2D* geom2, int relation)
 {
 	bool result = false;
 	switch (relation)
@@ -162,7 +162,7 @@ bool TopolRelation(TePolygon* geom1, TeLine2D* geom2, int relation)
 }
 
 
-bool TopolRelation(TePolygon* geom1, TePoint* geom2, int relation)
+bool TeTopologicalRelation(const TePolygon* geom1, const TePoint* geom2, int relation)
 {
 	bool result = false;
 	switch (relation)
@@ -195,7 +195,7 @@ bool TopolRelation(TePolygon* geom1, TePoint* geom2, int relation)
 	return result;
 }
 
-bool TopolRelation(TeLine2D* geom1, TeLine2D* geom2, int relation)
+bool TeTopologicalRelation(const TeLine2D* geom1, const TeLine2D* geom2, int relation)
 {
 	bool result = false;
 	switch (relation)  
@@ -247,7 +247,7 @@ bool TopolRelation(TeLine2D* geom1, TeLine2D* geom2, int relation)
 	return result;
 }
 
-bool TopolRelation(TeLine2D* geom1, TePoint* geom2, int relation)
+bool TeTopologicalRelation(const TeLine2D* geom1, const TePoint* geom2, int relation)
 {
 	bool result = false;
 	switch (relation)  
@@ -280,7 +280,7 @@ bool TopolRelation(TeLine2D* geom1, TePoint* geom2, int relation)
 	return result;
 }
 
-bool TopolRelation(TePoint* geom1, TePoint* geom2, int relation)
+bool TeTopologicalRelation(const TePoint* geom1, const TePoint* geom2, int relation)
 {
 	bool result = false;
 	switch (relation)  
@@ -309,7 +309,7 @@ bool TopolRelation(TePoint* geom1, TePoint* geom2, int relation)
 	return result;
 }
 
-bool TopolRelation(TeCell* geom1, TeCell* geom2, int relation)
+bool TeTopologicalRelation(const TeCell* geom1, const TeCell* geom2, int relation)
 {
 	bool result = false;
 	switch (relation)  
@@ -361,7 +361,7 @@ bool TopolRelation(TeCell* geom1, TeCell* geom2, int relation)
 	return result;
 }
 
-bool TopolRelation(TeCell* geom1, TePolygon* geom2, int relation)
+bool TeTopologicalRelation(const TeCell* geom1, const TePolygon* geom2, int relation)
 {
 	bool result = false;
 	switch (relation)  
@@ -413,7 +413,7 @@ bool TopolRelation(TeCell* geom1, TePolygon* geom2, int relation)
 	return result;
 }
 
-bool TopolRelation(TeCell* geom1, TeLine2D* geom2, int relation)
+bool TeTopologicalRelation(const TeCell* geom1, const TeLine2D* geom2, int relation)
 {
 	bool result = false;
 	switch (relation)
@@ -462,7 +462,7 @@ bool TopolRelation(TeCell* geom1, TeLine2D* geom2, int relation)
 
 }
 
-bool TopolRelation(TeCell* geom1, TePoint* geom2, int relation)
+bool TeTopologicalRelation(const TeCell* geom1, const TePoint* geom2, int relation)
 {
 	bool result = false;
 	switch (relation)
@@ -499,12 +499,12 @@ bool TopolRelation(TeCell* geom1, TePoint* geom2, int relation)
 
 // Return a string with the identifications of the selected geometries 
 string 
-getStringIds(Keys& IdsIn)
+getStringIds(TeKeys& IdsIn)
 {
 	string Ids = "";
 	int cont = 0;
 	
-	Keys::iterator itIdIn = IdsIn.begin();
+	TeKeys::iterator itIdIn = IdsIn.begin();
 	while (itIdIn != IdsIn.end())
 	{
 		if(cont)
@@ -631,7 +631,7 @@ fillSelectedGeomVector(TeGeomRep actRep, TeSelectedGeom& vetGeom, TeDatabasePort
 //obj: portal geometries
 //basic idea: obj "relate" geom
 bool
-fillResultIdsVector(TeGeometry *geom, TeDatabasePortal *portal, TeGeomRep portalRep, int relate, Keys& resultIds)
+fillResultIdsVector(TeGeometry *geom, TeDatabasePortal *portal, TeGeomRep portalRep, int relate, TeKeys& resultIds)
 {
 	bool flag = false;
 	bool result = false;
@@ -647,7 +647,7 @@ fillResultIdsVector(TeGeometry *geom, TeDatabasePortal *portal, TeGeomRep portal
 		isSet = true;
 		setSize = geom->size();
 	}
-	
+
 	try
 	{
 		do
@@ -685,13 +685,13 @@ fillResultIdsVector(TeGeometry *geom, TeDatabasePortal *portal, TeGeomRep portal
 				*cll = cell;
 				obj = cll;
 			}
-						
+
 			result = false;
 
 			//for each geometry 	
 			for(int i=0; i<setSize; ++i)
 			{
-				TeGeometry* geomTemp;
+				TeGeometry* geomTemp = 0;
 				if(isSet)
 				{
 					if(geomRep==TePOLYGONS)
@@ -710,61 +710,61 @@ fillResultIdsVector(TeGeometry *geom, TeDatabasePortal *portal, TeGeomRep portal
 				{
 						
 					case 1: //polygon with polygon
-						result = TopolRelation((TePolygon*)obj, (TePolygon*)geomTemp, relate);
+						result = TeTopologicalRelation((TePolygon*)obj, (TePolygon*)geomTemp, relate);
 					break;
 
 					case 2://line with line 
-						result = TopolRelation((TeLine2D*)obj, (TeLine2D*)geomTemp, relate);
+						result = TeTopologicalRelation((TeLine2D*)obj, (TeLine2D*)geomTemp, relate);
 					break;
 			
 					case 3://polygon with line
 						if(geomRep == TePOLYGONS)
-							result = TopolRelation((TePolygon*)geomTemp, (TeLine2D*)obj, relate);
+							result = TeTopologicalRelation((TePolygon*)geomTemp, (TeLine2D*)obj, relate);
 						else
-							result = TopolRelation((TePolygon*)obj, (TeLine2D*)geomTemp, relate);
+							result = TeTopologicalRelation((TePolygon*)obj, (TeLine2D*)geomTemp, relate);
 					break;
 				
 					case 4://point with point
-						result = TopolRelation((TePoint*)obj, (TePoint*)geomTemp, relate);
+						result = TeTopologicalRelation((TePoint*)obj, (TePoint*)geomTemp, relate);
 					break;
 				
 					case 5://polygon with point
 						if(geomRep == TePOLYGONS)
-							result = TopolRelation((TePolygon*)geomTemp, (TePoint*)obj, relate);
+							result = TeTopologicalRelation((TePolygon*)geomTemp, (TePoint*)obj, relate);
 						else
-							result = TopolRelation((TePolygon*)obj, (TePoint*)geomTemp, relate);
+							result = TeTopologicalRelation((TePolygon*)obj, (TePoint*)geomTemp, relate);
 					break;
 
 					case 6://line with point 
 						if(geomRep == TeLINES)
-							result = TopolRelation((TeLine2D*)geomTemp, (TePoint*)obj, relate);
+							result = TeTopologicalRelation((TeLine2D*)geomTemp, (TePoint*)obj, relate);
 						else
-							result = TopolRelation((TeLine2D*)obj, (TePoint*)geomTemp, relate);
+							result = TeTopologicalRelation((TeLine2D*)obj, (TePoint*)geomTemp, relate);
 					break;
 					
 					case 256://cell with cell 
-						result = TopolRelation((TeCell*)obj, (TeCell*)geomTemp, relate);
+						result = TeTopologicalRelation((TeCell*)obj, (TeCell*)geomTemp, relate);
 					break;
 
 					case 257://cell with polygon 
 						if(geomRep == TePOLYGONS)
-							result = TopolRelation((TeCell*)obj, (TePolygon*)geomTemp, relate);
+							result = TeTopologicalRelation((TeCell*)obj, (TePolygon*)geomTemp, relate);
 						else
-							result = TopolRelation((TeCell*)geomTemp, (TePolygon*)obj, relate);
+							result = TeTopologicalRelation((TeCell*)geomTemp, (TePolygon*)obj, relate);
 					break;
 					
 					case 258://cell with line 
 						if(geomRep == TeLINES)
-							result = TopolRelation((TeCell*)obj,  (TeLine2D*)geomTemp, relate);
+							result = TeTopologicalRelation((TeCell*)obj,  (TeLine2D*)geomTemp, relate);
 						else
-							result = TopolRelation((TeCell*)geomTemp, (TeLine2D*)obj, relate);
+							result = TeTopologicalRelation((TeCell*)geomTemp, (TeLine2D*)obj, relate);
 					break;
 
 					case 260://cell with point
 						if(geomRep == TeCELLS)
-							result = TopolRelation((TeCell*)geomTemp, (TePoint*)obj, relate);
+							result = TeTopologicalRelation((TeCell*)geomTemp, (TePoint*)obj, relate);
 						else
-							result = TopolRelation((TeCell*)obj,  (TePoint*)geomTemp, relate);
+							result = TeTopologicalRelation((TeCell*)obj,  (TePoint*)geomTemp, relate);
 					break;
 				}
 						
@@ -786,10 +786,10 @@ fillResultIdsVector(TeGeometry *geom, TeDatabasePortal *portal, TeGeomRep portal
 }
 
 
-bool TeTopologicalRelation(const string& actGeomTable, TeGeomRep actRep, Keys& actIdsIn, 
+bool TeTopologicalRelation(const string& actGeomTable, TeGeomRep actRep, TeKeys& actIdsIn, 
 						   TeDatabasePortal *portal, int relation, const string& actColTable)
 {
-	Keys  resultIds;
+	TeKeys  resultIds;
 
 	if(!TeTopologicalRelation(actGeomTable, actRep, actIdsIn, resultIds, portal->getDatabase(), relation, actColTable))
 		return false;
@@ -810,11 +810,11 @@ bool TeTopologicalRelation(const string& actGeomTable, TeGeomRep actRep, Keys& a
 	return true;
 }
 
-bool TeTopologicalRelation(const string& actGeomTable, TeGeomRep actRep, Keys& actIdsIn, 
+bool TeTopologicalRelation(const string& actGeomTable, TeGeomRep actRep, TeKeys& actIdsIn, 
 						   const string& visGeomTable,  TeGeomRep visRep, TeDatabasePortal *portal, 
 						   int relation, const string& visColTable)
 {
-	Keys  resultIds;
+	TeKeys  resultIds;
 
 	if(!TeTopologicalRelation(actGeomTable, actRep, actIdsIn, visGeomTable, visRep, resultIds, portal->getDatabase(), relation, visColTable))
 		return false;
@@ -839,7 +839,7 @@ bool TeTopologicalRelation(const string& actGeomTable, TeGeomRep actRep, TeGeome
 						   TeDatabasePortal *portal, int relation, const string& actCollTable)
 {
 	
-	Keys	resultIds;
+	TeKeys	resultIds;
 	
 	if(!TeTopologicalRelation(actGeomTable, actRep, geom, resultIds, portal->getDatabase(), relation, actCollTable))
 		return false;
@@ -860,8 +860,8 @@ bool TeTopologicalRelation(const string& actGeomTable, TeGeomRep actRep, TeGeome
 	return true;
 }
 	
-bool TeTopologicalRelation(const string& actGeomTable, TeGeomRep actRep, Keys& actIdsIn, 
-						   Keys& actIdsOut, TeDatabase* db, int relation, const string& actCollTable)
+bool TeTopologicalRelation(const string& actGeomTable, TeGeomRep actRep, TeKeys& actIdsIn, 
+						   TeKeys& actIdsOut, TeDatabase* db, int relation, const string& actCollTable)
 {
 	TeSelectedGeom	vetGeom;
 			
@@ -878,6 +878,7 @@ bool TeTopologicalRelation(const string& actGeomTable, TeGeomRep actRep, Keys& a
 		sqlOrderBy += ", parent_id ASC, num_holes DESC ";
 
 	sql += sqlOrderBy;
+	actIdsOut.clear();
 	
 	if(!portal->query(sql) || !portal->fetchRow())
 	{
@@ -893,7 +894,6 @@ bool TeTopologicalRelation(const string& actGeomTable, TeGeomRep actRep, Keys& a
 
 	//iterators
 	TeSelectedGeom::iterator it;
-	actIdsOut.clear();
 	double prec = TePrecision::instance().precision();
 	
 	for (it = vetGeom.begin(); it != vetGeom.end(); it++)
@@ -922,28 +922,31 @@ bool TeTopologicalRelation(const string& actGeomTable, TeGeomRep actRep, Keys& a
 	} 
 		
 	sort(actIdsOut.begin(), actIdsOut.end());
-	unique(actIdsOut.begin(), actIdsOut.end());
+	TeKeys::iterator itUnique = std::unique( actIdsOut.begin(), actIdsOut.end() );
+	if(itUnique!=actIdsOut.end())	actIdsOut.erase(itUnique,actIdsOut.end());
 
 	delete portal;
 	
 	for (it = vetGeom.begin(); it != vetGeom.end(); it++)
 		delete (*it);
 
-	return true;
+	return !actIdsOut.empty();
 }
 
-bool TeTopologicalRelation(const string& actGeomTable, TeGeomRep actRep, Keys& actIdsIn, 
-						   const string& visGeomTable, TeGeomRep visRep, Keys& visIdsOut, 
-						   TeDatabase* db, int relation, const string& visCollTable)
+bool TeTopologicalRelation(const string& actGeomTable, TeGeomRep actRep, TeKeys& actIdsIn, 
+						   const string& visGeomTable, TeGeomRep visRep, TeKeys& visIdsOut, 
+						   TeDatabase* db, int relation, const string& visCollTable, TeDatabase* dbVis)
 {
 	TeSelectedGeom	vetGeom;
 			
 	string Ids = getStringIds(actIdsIn);
+	if(dbVis == 0)
+		dbVis = db;
 
 	//verify projection
 	TeProjection* projAct = getProjectionFromGeomTable(actGeomTable, db);
-	TeProjection* projVis = getProjectionFromGeomTable(visGeomTable, db);
-	
+	TeProjection* projVis = getProjectionFromGeomTable(visGeomTable, dbVis);
+	visIdsOut.clear();
 	TeDatabasePortal* portal = db->getPortal();
 
 	string sql = "SELECT * FROM " + actGeomTable;
@@ -964,9 +967,15 @@ bool TeTopologicalRelation(const string& actGeomTable, TeGeomRep actRep, Keys& a
 		return false; 
 	}
 
+	if(db != dbVis)
+	{
+		delete portal;
+		portal = dbVis->getPortal();
+	}
+
 	//iterators
 	TeSelectedGeom::iterator it;
-	visIdsOut.clear();
+	
 	double prec = TePrecision::instance().precision();
 
 	for (it = vetGeom.begin(); it != vetGeom.end(); it++)
@@ -997,20 +1006,22 @@ bool TeTopologicalRelation(const string& actGeomTable, TeGeomRep actRep, Keys& a
 	delete portal;
 	
 	sort(visIdsOut.begin(), visIdsOut.end());
-	unique(visIdsOut.begin(), visIdsOut.end());
+	TeKeys::iterator itUnique = std::unique( visIdsOut.begin(), visIdsOut.end() );
+	if(itUnique!=visIdsOut.end())	visIdsOut.erase(itUnique,visIdsOut.end());
 
 	for (it = vetGeom.begin(); it != vetGeom.end(); it++)
 		delete (*it);
 
-	return true;
+	return !visIdsOut.empty();
 }
 
 bool TeTopologicalRelation(const string& actGeomTable, TeGeomRep actRep, TeGeometry* geom, 
-						   Keys& actIdsOut, TeDatabase* db, int relation, const string& actCollTable)
+						   TeKeys& actIdsOut, TeDatabase* db, int relation, const string& actCollTable)
 {
 	TeDatabasePortal* portal = db->getPortal();
 	TeBox box = geom->box();
 
+	actIdsOut.clear();
 	double prec = TePrecision::instance().precision();
 	TeBox temp (box.x1()-prec, box.y1()-prec, box.x2()+prec, box.y2()+prec); 
 
@@ -1025,19 +1036,19 @@ bool TeTopologicalRelation(const string& actGeomTable, TeGeomRep actRep, TeGeome
 		return false;
 	}
 	
-	actIdsOut.clear();
+	
 	
 	fillResultIdsVector(geom, portal, actRep, relation, actIdsOut);
 
 	delete portal;
 	
 	sort(actIdsOut.begin(), actIdsOut.end());
-	unique(actIdsOut.begin(), actIdsOut.end());
-
-	return true;
+	TeKeys::iterator it = std::unique( actIdsOut.begin(), actIdsOut.end() );
+	if(it!=actIdsOut.end())	actIdsOut.erase(it,actIdsOut.end());
+	return !actIdsOut.empty();
 }
 
-bool TeGetWithinDistance(const string& actGeomTable, TeGeomRep actRep, const TeCoord2D& point, KeysToDist& IdsDistOut,
+bool TeGetWithinDistance(const string& actGeomTable, TeGeomRep actRep, const TeCoord2D& point, TeKeysToDist& IdsDistOut,
 						 TeDatabase* db, const double& max_dist, const string& actCollTable)
 {
 	if(!db)
@@ -1112,7 +1123,7 @@ bool TeGetWithinDistance(const string& actGeomTable, TeGeomRep actRep, const TeC
 	return true;
 }
 
-bool TeGetArea(const string& actGeomTable, TeGeomRep actRep, Keys& actIdsIn, TeDatabase* db, double& area)
+bool TeGetArea(const string& actGeomTable, TeGeomRep actRep, TeKeys& actIdsIn, TeDatabase* db, double& area)
 {
 	if(actRep != TePOLYGONS && actRep != TeCELLS )
 		return false;
@@ -1158,7 +1169,7 @@ bool TeGetArea(const string& actGeomTable, TeGeomRep actRep, Keys& actIdsIn, TeD
 }
 
 
-bool TeGetLength(const string& actGeomTable, TeGeomRep actRep, Keys& actIdsIn, TeDatabase* db, double& length)
+bool TeGetLength(const string& actGeomTable, TeGeomRep actRep, TeKeys& actIdsIn, TeDatabase* db, double& length)
 {
 	if((actRep != TePOLYGONS) && (actRep != TeLINES) && (actRep != TeCELLS) )
 		return false;
@@ -1215,7 +1226,7 @@ bool TeGetLength(const string& actGeomTable, TeGeomRep actRep, Keys& actIdsIn, T
 }
 
 
-bool TeGetDistance(const string& actGeomTable, TeGeomRep actRep, Keys& IdsIn, TeDatabase* db, double& distance)
+bool TeGetDistance(const string& actGeomTable, TeGeomRep actRep, TeKeys& IdsIn, TeDatabase* db, double& distance)
 {
 	string Ids = getStringIds(IdsIn);
 	
@@ -1292,7 +1303,7 @@ bool TeGetDistance(const string& actGeomTable, TeGeomRep actRep, Keys& IdsIn, Te
 	return true;
 }
 
-bool TeGetConvexHull(const string& actGeomTable, TeGeomRep actRep, Keys& actIds, TeDatabase* db, TePolygonSet& convexHullSet)
+bool TeGetConvexHull(const string& actGeomTable, TeGeomRep actRep, TeKeys& actIds, TeDatabase* db, TePolygonSet& convexHullSet)
 {
 	if(actRep != TePOLYGONS)
 		return false;
@@ -1327,7 +1338,7 @@ bool TeGetConvexHull(const string& actGeomTable, TeGeomRep actRep, Keys& actIds,
 	return true;
 }
 
-bool TeGetCentroid(const string& actGeomTable, TeGeomRep actRep, TeDatabase* db, TePointSet& centroidSet, Keys& actIds, const string& actCollTable)
+bool TeGetCentroid(const string& actGeomTable, TeGeomRep actRep, TeDatabase* db, TePointSet& centroidSet, TeKeys& actIds, const string& actCollTable)
 {
 	TeDatabasePortal* portal = db->getPortal();
 	string Ids = getStringIds(actIds);
@@ -1433,7 +1444,7 @@ bool TeGetCentroid(const string& actGeomTable, TeGeomRep actRep, TeDatabase* db,
 }
 
 
-bool TeGetBuffer(const string& actGeomTable, TeGeomRep actRep, Keys& actIds, TeDatabase* db, TePolygonSet& bufferSet, double dist)
+bool TeGetBuffer(const string& actGeomTable, TeGeomRep actRep, TeKeys& actIds, TeDatabase* db, TePolygonSet& bufferSet, double dist)
 {
 	
 	if(actIds.empty())
@@ -1506,7 +1517,7 @@ bool TeGetBuffer(const string& actGeomTable, TeGeomRep actRep, Keys& actIds, TeD
 }
 
 
-bool TeGetOverlay(const string& actGeomTable, TeGeomRep actRep, Keys& actIds, TeDatabase* db, TeGeometryVect& geomVect, const short& operation)
+bool TeGetOverlay(const string& actGeomTable, TeGeomRep actRep, TeKeys& actIds, TeDatabase* db, TeGeometryVect& geomVect, const short& operation)
 {
 	if((actIds.empty()) || (actRep!=TePOLYGONS && actRep!=TeCELLS))
 		return false;
@@ -1594,21 +1605,44 @@ bool TeGetOverlay(const string& actGeomTable, TeGeomRep actRep, Keys& actIds, Te
 
 
 TeRaster*
-TeMask (TeRaster* rasterIn, TePolygon& poly, TeStrategicIterator st)
+TeMask(TeRaster* whole, TePolygon& poly, TeStrategicIterator st)
 {
-	TeRasterParams paramsInter(rasterIn->params());
-	
-	paramsInter.fileName_ = "";
-	paramsInter.decoderIdentifier_ = "MEM";
-	paramsInter.mode_ = 'c';
+	if (!whole || (whole->params().status_ != TeRasterParams::TeReadyToRead && 
+		whole->params().status_ != TeRasterParams::TeReadyToWrite))
+		return 0;
+
+	if (!TeIntersects(poly.box(),whole->params().boundingBox()))
+		return 0;
 	
-	TeRaster* rasterInter = new TeRaster(paramsInter);
-	if (!rasterInter->init())
+	TeRasterParams par = whole->params();
+	par.decoderIdentifier_ = "MEM";
+	par.mode_ = 'c';
+	par.setDummy(0);
+
+	TeCoord2D bll = whole->coord2Index(poly.box().lowerLeft());
+	TeCoord2D bur = whole->coord2Index(poly.box().upperRight());
+
+	bll = whole->index2Coord(TeCoord2D(TeRoundRasterIndex(bll.x_),TeRoundRasterIndex(bll.y_)));
+	bur = whole->index2Coord(TeCoord2D(TeRoundRasterIndex(bur.x_),TeRoundRasterIndex(bur.y_)));
+
+	par.boxResolution(bll.x_, bll.y_, bur.x_, bur.y_,par.resx_, par.resy_);
+	par.setDummy(0.0);
+	par.useDummy_ = true;
+
+	TeRaster*  clip = new TeRaster(par);
+	clip->init();
+	if (clip->params().status_ != TeRasterParams::TeReadyToWrite)
 		return 0;
 
-	TeRaster::iteratorPoly it = rasterIn->begin(poly, st);
-	int nlines = it.nLinesInPoly();
-	int ncols = it.nColsInPoly();
+	TeCoord2D cd = TeCoord2D(0,0);
+	TeCoord2D ul = clip->params().index2Coord(cd);
+	TeCoord2D dxdy = whole->params().coord2Index(ul);
+	int j = TeRoundRasterIndex(dxdy.x_); // column delta
+	int i = TeRoundRasterIndex(dxdy.y_); // line delta
+
+	TeRaster::iteratorPoly it = whole->begin(poly, st);
+//	int nlines = it.nLinesInPoly();
+//	int ncols = it.nColsInPoly();
 	while(!it.end())
     {
 		int lin = it.currentLine();
@@ -1616,40 +1650,11 @@ TeMask (TeRaster* rasterIn, TePolygon& poly, TeStrategicIterator st)
 		int nbands = it.nBands();
 		vector<double> vals;
 		vals = (*(TeRaster::iterator)it);
-		for(int i=0; i<nbands; i++)
-			rasterInter->setElement (col, lin, vals[i], i);	
+		for (int b=0; b<nbands; b++)
+			clip->setElement(col-j,lin-i,vals[b],b);
 		++it;
 	}
-	
-	TeRasterParams paramsOut(paramsInter);
-	paramsInter.mode_ = 'c';
-	
-	if((st==TeBoxPixelIn) || (st==TeBBoxPixelInters))
-	{
-		TeCoord2D pll = poly.box().lowerLeft();
-		TeCoord2D rll = rasterIn->index2Coord(pll);
-		pll = rasterIn->coord2Index(TeCoord2D(TeRound(rll.x()),TeRound(rll.y())));
-
-		paramsOut.ncols_ = ncols;
-		paramsOut.nlines_= nlines;
-		paramsOut.lowerLeftResolutionSize(pll.x(),pll.y(),paramsOut.resx_,paramsOut.resy_,ncols,nlines,true);  
-	}
-	else if((st==TeBoxPixelOut) || (st==TeBBoxPixelNotInters))
-	{
-		TeBox box = paramsInter.boundingBox();
-		double resx = paramsInter.resx_;
-		double resy = paramsInter.resy_;
-		paramsOut.boundingBoxResolution(box.x1()-resx, box.y1()-resy, box.x2()+resx, box.y2()+resy,resx,resy);  
-	}
-
-	TeRaster* rasterOut = new TeRaster(paramsOut);
-
-	TeRasterRemap remap(rasterInter, rasterOut);
-	if (!remap.apply())			
-		return rasterIn;
-
-	delete rasterInter;
-	return rasterOut;
+	return clip;
 }
 
 
diff --git a/src/terralib/kernel/TeSpatialOperations.h b/src/terralib/kernel/TeSpatialOperations.h
old mode 100644
new mode 100755
index 802db63..55b192d
--- a/src/terralib/kernel/TeSpatialOperations.h
+++ b/src/terralib/kernel/TeSpatialOperations.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,10 +20,8 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeSpatialOperations.h
-    This file contains functions to spatial operations with  
-	geographical objects that are in a SGBD 
+    \brief This file contains functions to spatial operations with geographical objects that are in a SGBD 
 */
 
 #ifndef  __TERRALIB_INTERNAL_SPATIALOPERATIONS_H
@@ -36,7 +34,7 @@ of this library and its documentation.
 typedef vector<TeGeometry*> TeSelectedGeom;
 
 //! Return a string with the identifications of the selected geometries 
-string  getStringIds(Keys& IdsIn);
+TL_DLL string  getStringIds(TeKeys& IdsIn);
 
 
 //! Return a portal with the geometries of a spatial table that have a topological relation with specifics geometries of this spatial table
@@ -50,7 +48,7 @@ string  getStringIds(Keys& IdsIn);
 	\param relation		topological relation that will be computed
 	\param actColTable	collection table name that contains a set of geometries of the spatial table 
 */
-bool TeTopologicalRelation(const string& actGeomTable, TeGeomRep actRep, Keys& actIdsIn, 
+TL_DLL bool TeTopologicalRelation(const string& actGeomTable, TeGeomRep actRep, TeKeys& actIdsIn, 
 						   TeDatabasePortal *portal, int relation, const string& actColTable="");
 
 
@@ -67,7 +65,7 @@ bool TeTopologicalRelation(const string& actGeomTable, TeGeomRep actRep, Keys& a
 	\param relation		topological relation that will be computed 
 	\param visColTable	collection table name that contains a set of geometries of the second spatial table 
 */
-bool TeTopologicalRelation(const string& actGeomTable, TeGeomRep actRep, Keys& actIdsIn, 
+TL_DLL bool TeTopologicalRelation(const string& actGeomTable, TeGeomRep actRep, TeKeys& actIdsIn, 
 						   const string& visGeomTable, TeGeomRep visRep, TeDatabasePortal *portal, 
 						   int relation, const string& visColTable="");
 
@@ -82,7 +80,7 @@ bool TeTopologicalRelation(const string& actGeomTable, TeGeomRep actRep, Keys& a
 	\param relation		topological relation that will be computed 
 	\param actCollTable	collection table name that contains a set of geometries of the spatial table 
 */
-bool TeTopologicalRelation(const string& actGeomTable, TeGeomRep actRep, TeGeometry* geom, 
+TL_DLL bool TeTopologicalRelation(const string& actGeomTable, TeGeomRep actRep, TeGeometry* geom, 
 						   TeDatabasePortal *portal, int relation, const string& actCollTable="");
 
 
@@ -98,8 +96,8 @@ bool TeTopologicalRelation(const string& actGeomTable, TeGeomRep actRep, TeGeome
 	\param relation		topological relation that will be computed 
 	\param actCollTable	collection table name that contains a set of geometries of the spatial table 
 */
-bool TeTopologicalRelation(const string& actGeomTable, TeGeomRep actRep, Keys& actIdsIn, 
-						   Keys& actIdsOut, TeDatabase* db, int relation, const string& actCollTable="");
+TL_DLL bool TeTopologicalRelation(const string& actGeomTable, TeGeomRep actRep, TeKeys& actIdsIn, 
+						   TeKeys& actIdsOut, TeDatabase* db, int relation, const string& actCollTable="");
 
 
 //! Return the identications of the geometries of a spatial table that have a topological relation with specifics geometries of other spatial table 
@@ -116,9 +114,9 @@ bool TeTopologicalRelation(const string& actGeomTable, TeGeomRep actRep, Keys& a
 	\param relation		topological relation that will be computed 
 	\param visCollTable	collection table name that contains a set of geometries of the second spatial table 
 */
-bool TeTopologicalRelation(const string& actGeomTable, TeGeomRep actRep, Keys& actIdsIn, 
-						   const string& visGeomTable, TeGeomRep visRep, Keys& visIdsOut, 
-						   TeDatabase* db, int relation, const string& visCollTable="");
+TL_DLL bool TeTopologicalRelation(const string& actGeomTable, TeGeomRep actRep, TeKeys& actIdsIn, 
+						   const string& visGeomTable, TeGeomRep visRep, TeKeys& visIdsOut, 
+						   TeDatabase* db, int relation, const string& visCollTable="", TeDatabase* = 0);
 
 //! Return the identications of the geometries of a spatial table that have a topological relation with a specific geometry  
 /*!
@@ -131,9 +129,88 @@ bool TeTopologicalRelation(const string& actGeomTable, TeGeomRep actRep, Keys& a
 	\param relation		topological relation that will be computed 
 	\param actCollTable	collection table name that contains a set of geometries of the spatial table 
 */
-bool TeTopologicalRelation(const string& actGeomTable, TeGeomRep actRep, TeGeometry* geom, 
-						   Keys& actIdsOut, TeDatabase* db, int relation, const string& actCollTable="");
+TL_DLL bool TeTopologicalRelation(const string& actGeomTable, TeGeomRep actRep, TeGeometry* geom, 
+						   TeKeys& actIdsOut, TeDatabase* db, int relation, const string& actCollTable="");
+
+//! Return whether the specified topological relation holds between two polygon
+/*!
+	\param geom1	a polygon
+	\param geom2	another polygon
+	\param relation		topological relation to be verified
+*/
+TL_DLL bool TeTopologicalRelation(const TePolygon* geom1, const TePolygon* geom2, int relation);
+
+//! Return whether the specified topological relation holds between a polygon and a line
+/*!
+	\param geom1	a polygon
+	\param geom2	a line
+	\param relation		topological relation to be verified
+*/
+TL_DLL bool TeTopologicalRelation(const TePolygon* geom1, const TeLine2D* geom2, int relation);
+
+//! Return whether the specified topological relation holds between a polygon and a point
+/*!
+	\param geom1	a polygon
+	\param geom2	a point
+	\param relation		topological relation to be verified
+*/
+TL_DLL bool TeTopologicalRelation(const TePolygon* geom1, const TePoint* geom2, int relation);
+
+//! Return whether the specified topological relation holds between two lines
+/*!
+	\param geom1	a line
+	\param geom2	another line
+	\param relation		topological relation to be verified
+*/
+TL_DLL bool TeTopologicalRelation(const TeLine2D* geom1, const TeLine2D* geom2, int relation);
+
+//! Return whether the specified topological relation holds between a line and a point
+/*!
+	\param geom1	a line
+	\param geom2	a point
+	\param relation		topological relation to be verified
+*/
+TL_DLL bool TeTopologicalRelation(const TeLine2D* geom1, const TePoint* geom2, int relation);
+
+//! Return whether the specified topological relation holds between two points
+/*!
+	\param geom1	a point
+	\param geom2	another point
+	\param relation		topological relation to be verified
+*/
+TL_DLL bool TeTopologicalRelation(const TePoint* geom1, const TePoint* geom2, int relation);
 
+//! Return whether the specified topological relation holds between two cells
+/*!
+	\param geom1	a cell
+	\param geom2	another cell
+	\param relation		topological relation to be verified
+*/
+TL_DLL bool TeTopologicalRelation(const TeCell* geom1, const TeCell* geom2, int relation);
+
+//! Return whether the specified topological relation holds between a cell and a polygon
+/*!
+	\param geom1	a cell
+	\param geom2	a polygon
+	\param relation		topological relation to be verified
+*/
+TL_DLL bool TeTopologicalRelation(const TeCell* geom1, const TePolygon* geom2, int relation);
+
+//! Return whether the specified topological relation holds between a cell and a line
+/*!
+	\param geom1	a cell
+	\param geom2	a line
+	\param relation		topological relation to be verified
+*/
+TL_DLL bool TeTopologicalRelation(const TeCell* geom1, const TeLine2D* geom2, int relation);
+
+//! Return whether the specified topological relation holds between a cell and a point
+/*!
+	\param geom1	a cell
+	\param geom2	a point
+	\param relation		topological relation to be verified
+*/
+TL_DLL bool TeTopologicalRelation(const TeCell* geom1, const TePoint* geom2, int relation);
 
 //! Returns the geometries of a geometric table (actGeomTable) that are within a specific distance from a point in memory 
 /*!
@@ -145,7 +222,7 @@ bool TeTopologicalRelation(const string& actGeomTable, TeGeomRep actRep, TeGeome
 	  \param max_dist		maximum distance 
 	  \param actCollTable	collection table name associated with the actGeomTable table
 */
-bool TeGetWithinDistance(const string& actGeomTable, TeGeomRep actRep, const TeCoord2D& point, KeysToDist& IdsDistOut,
+TL_DLL bool TeGetWithinDistance(const string& actGeomTable, TeGeomRep actRep, const TeCoord2D& point, TeKeysToDist& IdsDistOut,
 						 TeDatabase* db, const double& max_dist, const string& actCollTable="");
 
 
@@ -157,15 +234,15 @@ bool TeGetWithinDistance(const string& actGeomTable, TeGeomRep actRep, const TeC
 	\param db			a TeDatabase pointer 
 	\param area			area returned
 */
-bool TeGetArea(const string& actGeomTable, TeGeomRep actRep, Keys& actIdsIn, TeDatabase* db, double& area);
+TL_DLL bool TeGetArea(const string& actGeomTable, TeGeomRep actRep, TeKeys& actIdsIn, TeDatabase* db, double& area);
 
 
 //! Return the length of some specifics geometries of a spatial table 
-bool TeGetLength(const string& actGeomTable, TeGeomRep actRep, Keys& actIdsIn, TeDatabase* db, double& length);
+TL_DLL bool TeGetLength(const string& actGeomTable, TeGeomRep actRep, TeKeys& actIdsIn, TeDatabase* db, double& length);
 
 
 //! Return the distance between two geometries
-bool TeGetDistance(const string& actGeomTable, TeGeomRep actRep, Keys& IdsIn, TeDatabase* db, double& distance);
+TL_DLL bool TeGetDistance(const string& actGeomTable, TeGeomRep actRep, TeKeys& IdsIn, TeDatabase* db, double& distance);
 
 //! Return the convexhull geometries of specifics geometries of a spatial table 
 /*!
@@ -175,22 +252,22 @@ bool TeGetDistance(const string& actGeomTable, TeGeomRep actRep, Keys& IdsIn, Te
 	\param db				a TeDatabase pointer 
 	\param convexHullSet	the convexhull geometries returned
 */
-bool TeGetConvexHull(const string& actGeomTable, TeGeomRep actRep, Keys& actIds, TeDatabase* db, 
+TL_DLL bool TeGetConvexHull(const string& actGeomTable, TeGeomRep actRep, TeKeys& actIds, TeDatabase* db, 
 					 TePolygonSet& convexHullSet);
 
 
 //! Return the centroids of specifics geometries of a spatial table 
-bool TeGetCentroid(const string& actGeomTable, TeGeomRep actRep, TeDatabase* db, TePointSet& centroidSet,
-				   Keys& actIds, const string& actCollTable="");
+TL_DLL bool TeGetCentroid(const string& actGeomTable, TeGeomRep actRep, TeDatabase* db, TePointSet& centroidSet,
+				   TeKeys& actIds, const string& actCollTable="");
 
 
 //! Return the buffer 
-bool TeGetBuffer(const string& actGeomTable, TeGeomRep actRep, Keys& actIds, TeDatabase* db, 
+TL_DLL bool TeGetBuffer(const string& actGeomTable, TeGeomRep actRep, TeKeys& actIds, TeDatabase* db, 
 				 TePolygonSet& bufferSet, double dist);
 
 
 //! Return intersection
-bool TeGetOverlay(const string& actGeomTable, TeGeomRep actRep, Keys& actIds, TeDatabase* db, 
+TL_DLL bool TeGetOverlay(const string& actGeomTable, TeGeomRep actRep, TeKeys& actIds, TeDatabase* db, 
 				  TeGeometryVect& geomVect, const short& operation);
 
 /*!	
@@ -199,7 +276,7 @@ bool TeGetOverlay(const string& actGeomTable, TeGeomRep actRep, Keys& actIds, Te
 	\param poly		polygon that defines the clipping
 	\param st		strategic to the iterator of the raster  
 */
-TeRaster*
+TL_DLL TeRaster*
 TeMask (TeRaster* rasterIn, TePolygon& poly, TeStrategicIterator st);
 
 #endif
diff --git a/src/terralib/kernel/TeStatistics.h b/src/terralib/kernel/TeStatistics.h
old mode 100644
new mode 100755
index e090a78..e771737
--- a/src/terralib/kernel/TeStatistics.h
+++ b/src/terralib/kernel/TeStatistics.h
@@ -1,21 +1,27 @@
-//***********************************************************************
-//      TerraLib is a GIS Classes and Functions Library that 
-//      strongly explores Spatial Database Technologies 
-//
-//      Copyright � 2002 INPE and Tecgraf/PUC-Rio. 
-//
-//      This library is free software; you can redistribute it 
-//      and/or modify it under the terms of the GNU Lesser General 
-//      Public License as published by the Free Software Foundation
-//      version 2.1.(http://www.opensource.org/licenses/lgpl-license.php)
-//
-//      
-//
-//      Send questions or suggestions about the TerraLib Project 
-//      to terralib at dpi.inpe.br .
-//**************************************************************************//
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
 /*! \file TeStatistics.h
-    This file contains functions for calculate statistics  
+    \brief This file contains functions for calculate statistics  
 */
 
 #ifndef TeStatistics_H
@@ -28,14 +34,14 @@
 
 using namespace std;
 
+/** @defgroup Stat Statistical functions
+  @{
+ */
 //! vector of statistics
 typedef vector<double>	stats;
 
-
-/*!	\struct TeStatisticsDimension
-	Associate a statistics set for each dimension 
-*/
-struct TeStatisticsDimension
+//! Associate a statistics set for each dimension 
+struct TL_DLL TeStatisticsDimension
 {
 	int					dimension_;
 	TeStatisticValMap	stat_;
@@ -53,11 +59,10 @@ typedef vector<TeStatisticsDimension>	TeStatisticsDimensionVect;
 typedef map<double, int> TeHistogram;
 
 
-/*!	\function TeCalculateHistogram
-	\brief Calculate the histrogram of a set of values kept in a data structure 
+/** Calculates the histrogram of a set of values kept in a data structure 
 	\param itBegin	the iterator to the begin of the data structure 
 	\param itEnd	the iterator to the end of the data structure
-	\param stat		returned histogram  
+	\param histOut	to return the histogram  
 */
 template<typename T>
 bool TeCalculateHistogram(const T& itBegin, const T& itEnd, TeHistogram& histOut)  
@@ -85,11 +90,10 @@ bool TeCalculateHistogram(const T& itBegin, const T& itEnd, TeHistogram& histOut
 	return true;
 }
 
-/*!	\function TeCalculateStatistics
-	\brief Calculate the statistics of a specific dimension of a data structure 
+/** Calculates the statistics of a specific dimension of a data structure 
 	\param itBegin	the iterator to the begin of the data structure
 	\param itEnd	the iterator to the end of the data structure
-	\param stat		returned statistics  
+	\param stat		to return the statistics  
 	\param dim		the dimension of the data structure  
 */
 template<typename It>  
@@ -100,7 +104,7 @@ bool TeCalculateStatistics(const It& itBegin, const It& itEnd, TeStatisticValMap
 	sum=mean=variance=assim=curtose=stDev=coefVar=amplitude=0.0;
 	
 	minValue = TeMAXFLOAT;
-	maxValue = TeMINFLOAT;
+	maxValue = -minValue ;
 
 	vector<double> values;
 	int count=0;
@@ -195,14 +199,13 @@ bool TeCalculateStatistics(const It& itBegin, const It& itEnd, TeStatisticValMap
 }
 
 
-/*!	\function TeCalculateStatistics
-	\brief Calculate the statistics of a string data structure 
+/**  Calculates the statistics of a string data structure 
 	\param itBegin	the iterator to the begin of the data structure
 	\param itEnd	the iterator to the end of the data structure
-	\param stat		returned string statistics  
+	\param stat		to return the statistics  
 */
 template<typename It>  
-bool TeCalculateStatistics(const It& itBegin, const It& itEnd, TeStatisticStringValMap& stat)
+bool TeCalculateStatistics(const It& itBegin, const It& itEnd, TeStatisticStringValMap& stat, const double &dummy=255, const bool &useDummy=true)
 {
 	string min, max, val;
 	int	count = 0;
@@ -215,13 +218,18 @@ bool TeCalculateStatistics(const It& itBegin, const It& itEnd, TeStatisticString
 	while(it != itEnd)
 	{
 		val = (*it);
+		++it;
+		if((useDummy == false) && (!val.empty()))
+		{
+			if(val.compare(Te2String(dummy))==0)
+				continue;
+		}
 		if(val.empty() == false)
 		{
 			count++;
 			min = MIN(min, val);
 			max = MAX(max, val);
 		}
-		++it;
 		++totalCount;
 	}
 
@@ -233,21 +241,20 @@ bool TeCalculateStatistics(const It& itBegin, const It& itEnd, TeStatisticString
 }
 
 
-/*!	\function TeCalculateStatistics
-	\brief Calculate the statistics of a data structure 
+/** Calculates the statistics of a data structure 
 	\param itBegin	the iterator to the begin of the data structure
 	\param itEnd	the iterator to the end of the data structure
-	\param stat		returned statistics  
+	\param stat		to return the statistics  
 */
 template<typename It>  
-bool TeCalculateStatistics(const It& itBegin, const It& itEnd, TeStatisticValMap& stat)
+bool TeCalculateStatistics(const It& itBegin, const It& itEnd, TeStatisticValMap& stat, const double &dummy=255, const bool &useDummy=true)
 {
 	double	sum, mean, minValue, maxValue, variance, assim, 
 			curtose, stDev, coefVar, amplitude, moda, median;  
-	sum=mean=variance=assim=curtose=stDev=coefVar=amplitude=0.0;
+	sum=mean=variance=assim=curtose=stDev=coefVar=amplitude=moda=0.0;
 	
 	minValue = TeMAXFLOAT;
-	maxValue = TeMINFLOAT;
+	maxValue = -minValue;
 
 	vector<double>	values;
 
@@ -257,6 +264,11 @@ bool TeCalculateStatistics(const It& itBegin, const It& itEnd, TeStatisticValMap
 	while(itt != itEnd)
     {
 		double val = (*itt);
+		++itt;
+		if((useDummy == false) && (val == dummy))
+		{
+			continue;
+		}
 		if(val != TeMAXFLOAT) // MAXFLOAT is considered invalid value
 		{
 			values.push_back (val);
@@ -264,8 +276,6 @@ bool TeCalculateStatistics(const It& itBegin, const It& itEnd, TeStatisticValMap
 			minValue = MIN(minValue, val);
 			maxValue = MAX(maxValue, val);
 		}
-		
-		++itt;
 		++totalCount;
 	}
 
@@ -337,19 +347,28 @@ bool TeCalculateStatistics(const It& itBegin, const It& itEnd, TeStatisticValMap
 	return true;
 }
 
+template<typename It>  
+bool TeCalculateStatistics(It& itBegin, It& itEnd, TeStatisticsDimensionVect& stat)
+{
+	std::vector<double> dummy;
+	return TeCalculateStatistics(itBegin, itEnd,  stat, dummy);
+}
+
 
-/*!	\function TeCalculateStatistics
-	\brief Calculate the statistics of all dimensions of a data structure 
+/** Calculates the statistics of all dimensions of a data structure 
 	\param itBegin	the iterator to the begin of the data structure
 	\param itEnd	the iterator to the end of the data structure
-	\param stat		returned statistics  
+	\param stat		to return the statistics  
 */
 template<typename It>  
-bool TeCalculateStatistics(It& itBegin, It& itEnd, TeStatisticsDimensionVect& stat)
+bool TeCalculateStatistics(It& itBegin, It& itEnd, TeStatisticsDimensionVect& stat, std::vector<double> dummy,const bool &useDummy=true)
 {
 	
 	vector<double>	sum, mean, minValue, maxValue, variance, assim, curtose, 
 					stDev, coefVar, amplitude, moda, median;  
+
+	vector<double>	values;
+	bool			noDummy;
 	
 	int nb = itBegin.nBands();
 	
@@ -373,26 +392,43 @@ bool TeCalculateStatistics(It& itBegin, It& itEnd, TeStatisticsDimensionVect& st
 	map<int,stats> bandValues;
 	
 	int count=0;
+	int validCount=0;
 	It itt = itBegin;	
 	
 	while(itt != itEnd)
     {
-		for (int j=0; j<nb; j++)
+		noDummy=false;
+		values.clear();
+		for(int j=0; j<nb; j++)
 		{
 			double val = itt.operator* (j);
-			bandValues[j].push_back(val);
-			sum[j] += val;
-			
-			if(minValue[j]>val)
-				minValue[j] = val;
-			if(maxValue[j]<val)
-				maxValue[j] = val;
-
-			int size = bandValues[j].size();
-			mean[j] = sum[j]/size;
+			values.push_back(val);
+			if(val!=dummy[j]) noDummy=true;
 		}
-		
 		++itt;
+		if((useDummy==false) && (noDummy==false))
+		{
+			continue;
+		}
+
+		for (int j=0; j<nb; j++)
+		{
+			double val = values[j];
+			if(val!=TeMAXFLOAT)  // MAXFLOAT is considered invalid value
+			{
+				bandValues[j].push_back(val);
+				sum[j] += val;
+			
+				if(minValue[j]>val)
+					minValue[j] = val;
+				if(maxValue[j]<val)
+					maxValue[j] = val;
+
+				int size = bandValues[j].size();
+				mean[j] = sum[j]/size;
+				validCount++;
+			}
+		}
 		++count;
 	}
 
@@ -448,6 +484,7 @@ bool TeCalculateStatistics(It& itBegin, It& itEnd, TeStatisticsDimensionVect& st
 		TeStatisticValMap statVal;
 
 		statVal[TeCOUNT] = count; 
+		statVal[TeVALIDCOUNT]=validCount;
 		statVal[TeMINVALUE] = minValue[jj];
 		statVal[TeMAXVALUE] = maxValue[jj];
 		statVal[TeSUM] = sum[jj];
@@ -501,7 +538,7 @@ double TeSum (It begin, It end)
 }
 
 
-//! calculates the mean (first moment) of the elements of a specific dimension
+//! Calculates the mean (first moment) of the elements of a specific dimension
 template <typename It> 
 double TeFirstMoment (It begin, It end, int dim)
 {
@@ -520,7 +557,7 @@ double TeFirstMoment (It begin, It end, int dim)
 }
 
 
-//! calculates the mean (first moment) of the elements
+//! Calculates the mean (first moment) of the elements
 template <typename It> 
 double TeFirstMoment (It begin, It end)
 {
@@ -539,7 +576,7 @@ double TeFirstMoment (It begin, It end)
 }
 
 
-//! calculates the second moment
+//! Calculates the second moment
 template <typename It> 
 double TeSecondMoment (It begin, It end, double mean)
 {
@@ -559,7 +596,7 @@ double TeSecondMoment (It begin, It end, double mean)
 }
 
 
-//! calculates the second moment
+//! Calculates the second moment
 template <typename It> 
 double TeSecondMoment (It begin, It end, double mean, int dim)
 {
@@ -617,7 +654,7 @@ bool TeMeanVector ( It begin, It end, T& result)
 	return true;
 }
 
-//! calculates the deviations in relation to mean
+//! Calculates the deviations in relation to mean
 template <typename It> 
 bool TeDeviation ( It begin, It end, It result, double mean)
 {
@@ -635,10 +672,15 @@ bool TeDeviation ( It begin, It end, It result, double mean)
 
 
 //! calculates the deviations in relation to mean
-// Keep the result in the ObjsSet
 template <typename iteratorSet> 
 bool TeDeviation ( iteratorSet begin, iteratorSet end, double mean, int index=0)
 {
+	//Adds a new attribute in the attribute list of the set
+	TeAttribute attrRep;
+	attrRep.rep_.name_ = "Z";
+	attrRep.rep_.type_ = TeREAL;
+	begin->addProperty(attrRep);
+	
 	while (begin != end)
 	{
 		double result;
@@ -648,17 +690,11 @@ bool TeDeviation ( iteratorSet begin, iteratorSet end, double mean, int index=0)
 		else
 			result = TeMAXFLOAT;
 		
-		TeAttributeRep attrRep;
-		attrRep.name_ = "Z";
-		attrRep.type_ = TeREAL;
-
-		(*begin).addProperty(result, attrRep, false); 
-
+		(*begin).addPropertyValue(Te2String(result, 9)); 
 		++begin; 
 	}
 	return true;
 }
-
-
+/** @} */
 #endif
 
diff --git a/src/terralib/kernel/TeStdFile.cpp b/src/terralib/kernel/TeStdFile.cpp
old mode 100644
new mode 100755
index 86d8f8b..357389d
--- a/src/terralib/kernel/TeStdFile.cpp
+++ b/src/terralib/kernel/TeStdFile.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
diff --git a/src/terralib/kernel/TeStdFile.h b/src/terralib/kernel/TeStdFile.h
old mode 100644
new mode 100755
index 74396fe..be0080e
--- a/src/terralib/kernel/TeStdFile.h
+++ b/src/terralib/kernel/TeStdFile.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,10 +20,13 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
+/*! \file TeStdFile.h
+    \brief This file contains a class for handling "stdio" files
+*/
 #ifndef  __TERRALIB_INTERNAL_STDFILE_H
 #define  __TERRALIB_INTERNAL_STSFILE_H
 
+#include "TeDefines.h"
 #include <stdio.h>
 #include <string>
 using namespace std;
@@ -33,7 +36,7 @@ using namespace std;
     throws exceptions if things go wrong
 	\sa TeException TeAsciiFile
 */
-class TeStdFile {
+class TL_DLL TeStdFile {
 public:
 
 //! Simple constructor taking the file name and the mode of oppening
diff --git a/src/terralib/kernel/TeStdIOProgress.cpp b/src/terralib/kernel/TeStdIOProgress.cpp
new file mode 100755
index 0000000..c062548
--- /dev/null
+++ b/src/terralib/kernel/TeStdIOProgress.cpp
@@ -0,0 +1,78 @@
+#include "TeStdIOProgress.h"
+
+#include <iostream>
+
+using std::string;
+using std::cout;
+
+TeStdIOProgress::TeStdIOProgress() :
+	totalSteps_(0),
+	curProg_(0)
+{
+}
+
+
+TeStdIOProgress::~TeStdIOProgress()
+{
+}
+
+
+void TeStdIOProgress::setTotalSteps(int n)
+{ 
+  totalSteps_ = n; 
+  curProg_=0;
+}
+
+
+void TeStdIOProgress::reset()
+{ 
+	totalSteps_ = 0; 
+	messageStr_ = "";
+	captionStr_ = "";
+	curProg_ = 0;
+}
+
+
+void TeStdIOProgress::cancel()
+{ 
+	totalSteps_ = 0; 
+	messageStr_ = "";
+	captionStr_ = "";
+	curProg_ = 0;
+}
+
+
+void TeStdIOProgress::setMessage(const string& text)
+{ 
+  messageStr_ = text;
+}
+
+
+string TeStdIOProgress::getMessage() 
+{ 
+  return messageStr_; 
+}
+
+
+bool TeStdIOProgress::wasCancelled()
+{ 
+  return false; 
+}
+	
+
+void TeStdIOProgress::setCaption(const string& cap)
+{ 
+  captionStr_ = cap;
+}
+
+
+void TeStdIOProgress::setProgress(int steps)
+{
+	int prog = (int)(100*steps/(totalSteps_+1));
+	if (prog != curProg_)
+	{
+		cout << messageStr_ << " : " << prog << "%...\n";
+		curProg_ = prog;
+	}
+}
+
diff --git a/src/terralib/kernel/TeStdIOProgress.h b/src/terralib/kernel/TeStdIOProgress.h
old mode 100644
new mode 100755
index 8401582..f1dadb9
--- a/src/terralib/kernel/TeStdIOProgress.h
+++ b/src/terralib/kernel/TeStdIOProgress.h
@@ -1,60 +1,71 @@
-#ifndef TeSTDIOPROGRESS_H
-#define TeSTDIOPROGRESS_H
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
-#include "TeProgressBase.h"
-#include <iostream>
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
 
-class TeStdIOProgress : public TeProgressBase
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeStdIOProgress.h
+    \brief This file an implementation of progress information using stl io stream.
+*/
+#ifndef __TERRALIB_INTERNAL_STDIOPROGRESS_H
+#define __TERRALIB_INTERNAL_STDIOPROGRESS_H
+
+#include <TeProgressBase.h>
+//#include <iostream>
+
+//using std::string;
+//using std::cout;
+
+class TL_DLL TeStdIOProgress : public TeProgressBase
 {
-public:
+	int totalSteps_;
+	int curProg_;
+	string messageStr_;
+	string captionStr_;
 
-	//! Constructor
-	TeStdIOProgress() :
-		totsteps(0),
-		nsteps(0),
-		curstep(-1)
-	{}
+public:
+	TeStdIOProgress();
 
-	//! Destructor
-	~TeStdIOProgress() {}
+	~TeStdIOProgress();
 
 	//! Sets the total number of steps to n 
-	void setTotalSteps(int n) { totsteps = n; }
-
-	//! Sets the current amount of progress made to n
-	void setProgress(int n) 
-	{ 
-		if (totsteps > 0) 
-		{
-			int aux = (int)((n*100)/totsteps);
-			if (aux != curstep)
-			{
-				curstep = aux;
-				cout << curstep << "% ";
-				cout.flush();
-			}
-		}
-	}
+	void setTotalSteps(int n);
 
 	//! Resets the progress interface
-	void reset() { totsteps = nsteps = 0; curstep = -1; }
+	void reset();
 
-	//! Resets the progress dialog
-	void cancel() {};
+	//! Cancel activity being excuted
+	void cancel();
 
 	//! Sets the label's text
-	void setMessage(const string& text) { cout << endl << text << endl;}
+	void setMessage(const string& text);
+
+	//! Returns the label's text
+	string getMessage() ;
 
 	//! Returns true whether the process was cancelled
-	bool wasCancelled() { return false; }
+	bool wasCancelled();
 	
 	//! Sets the caption associated to the progress interface
-	void setCaption(const string& /*cap*/) {};
-
-private:
-	int totsteps;
-	int nsteps;
-	int curstep;
+	void setCaption(const string& cap);
 
+	//! Display progress message
+	void setProgress(int steps);
 };
 #endif
diff --git a/src/terralib/kernel/TeTable.cpp b/src/terralib/kernel/TeTable.cpp
old mode 100644
new mode 100755
index 24f868b..2bbe395
--- a/src/terralib/kernel/TeTable.cpp
+++ b/src/terralib/kernel/TeTable.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -28,13 +28,16 @@ of this library and its documentation.
 using namespace std;
 
 
-string tableJoin(TeAttrTableVector& vecTable, string firstTable, string attrLink)
+string tableJoin(TeAttrTableVector& vecTable, string geomTable, string attrLink)
 {
 	string parClause = "";
 	string fromResult = "";
+	string firstTable = "";
+	string cJoin = "";
+
 	TeAttrTableVector::iterator it; 
 	
-	if(firstTable.empty())
+	if(geomTable.empty())
 	{
 		//find the first static table
 		it = vecTable.begin();
@@ -48,20 +51,29 @@ string tableJoin(TeAttrTableVector& vecTable, string firstTable, string attrLink
 			}
 			++it;
 		}
+		cJoin = " LEFT "; //the first table is a attribute table
+	}
+	else
+	{
+		firstTable = geomTable;
+		cJoin = " LEFT "; //the first table is a geometry table
 	}
+		
+	
+	fromResult += firstTable; 
+	
 	
 	//if don�t exist a table static or temporal 
 	if(firstTable.empty() || attrLink.empty())	
 		return "";
-		
-	fromResult += firstTable;
+			
 	it = vecTable.begin();
 
 	while(it!=vecTable.end())
 	{
 		if( ((*it).name()!=firstTable) && ((*it).tableType()!=TeAttrExternal))
 		{
-			fromResult += " LEFT JOIN "+ (*it).name() +" ON "+ firstTable;
+			fromResult += " "+ cJoin +" JOIN "+ (*it).name() +" ON "+ firstTable;
 			fromResult += "."+ attrLink +" = "+ (*it).name() +"."+ (*it).linkName() +")";
 			parClause += "(";
 		}
@@ -85,12 +97,13 @@ string tableJoin(TeAttrTableVector& vecTable, string firstTable, string attrLink
 			if(nameTableStatic.empty())
 				return "";
 
-			fromResult += " LEFT JOIN "+ (*it).name() +" ON "+ nameTableStatic +"."+ colTableStatic;
+			fromResult += " "+ cJoin +" JOIN "+ (*it).name() +" ON "+ nameTableStatic +"."+ colTableStatic;
 			fromResult += " = " + (*it).name() +"."+ (*it).linkName() +")";
 			parClause += "(";
 		}
 
 		++it;
+		cJoin = " LEFT ";
 	}
 
 	return (parClause + fromResult);
@@ -319,6 +332,21 @@ TeTable::attrLinkPosition()
 	return -1;
 }
 
+int
+TeTable::attrUniquePosition()
+{
+	int i = 0;
+	TeAttributeList::iterator it = attList_.begin();
+	while (it != attList_.end())
+	{
+		if (TeConvertToUpperCase((*it).rep_.name_) == TeConvertToUpperCase(attUnique_))
+			return i;
+		++it;
+		++i;
+	}
+	return -1;
+}
+
 bool 
 TeTable::attributeNames(vector<string>& attrs)
 {
diff --git a/src/terralib/kernel/TeTable.h b/src/terralib/kernel/TeTable.h
old mode 100644
new mode 100755
index 4c15202..aa12604
--- a/src/terralib/kernel/TeTable.h
+++ b/src/terralib/kernel/TeTable.h
@@ -1,6 +1,6 @@
  /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,7 +20,6 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeTable.h
     \brief This file contains class TeTable definitions.
 */
@@ -48,7 +47,7 @@ typedef vector<string> TeTableRow;
 /*!
 	All members are private. This class is used only through the TeTable class
 */
-class TeTableImpl: public TeComposite<TeTableRow>
+class TL_DLL TeTableImpl: public TeComposite<TeTableRow>
 {
 
 friend class TeTable;
@@ -87,8 +86,8 @@ friend class TeTable;
   \sa
   TeAttribute TeTableImpl
 */
-class TeTable {
-
+class TL_DLL TeTable
+{
 public:
 	//! Empty constructor
 	/*!
@@ -253,10 +252,11 @@ public:
 	*/
 	bool attrUnique(TeAttribute& attr);
 	
-
 	//! Returns the position of the link attribute in the attribute list
 	int attrLinkPosition();
 
+	//! Returns the position of the unique attribute in the attribute list
+	int attrUniquePosition();
 
 	/** @name External tables
 	    The following members are used to manipulate information about tables that
@@ -382,12 +382,12 @@ private:
 typedef vector<TeTable> TeAttrTableVector;
 
 //! Return the sql join related with the table vector  
-string tableJoin(TeAttrTableVector& vecTable, string firstTable="", string attrLink=""); 
+TL_DLL string tableJoin(TeAttrTableVector& vecTable, string firstTable="", string attrLink=""); 
 
-/*! \example TableExample1.cpp
-	This is an example of how to use TeDatabase and TeTable to create, populate
-	and retrieve data from an attribute table in a TerraLib database.
+/*! \example createTable.cpp
+	Shows how to execute some operations relative to attribute tables.
  */
+
 #endif
 
 
diff --git a/src/terralib/kernel/TeTempFilesRemover.cpp b/src/terralib/kernel/TeTempFilesRemover.cpp
new file mode 100755
index 0000000..8b7a552
--- /dev/null
+++ b/src/terralib/kernel/TeTempFilesRemover.cpp
@@ -0,0 +1,137 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+
+#include "TeTempFilesRemover.h"
+#include "TeAgnostic.h"
+
+
+TeTempFilesRemover::TeTempFilesRemover()
+{
+}
+
+
+TeTempFilesRemover::~TeTempFilesRemover()
+{
+  removeAllFiles();
+}
+
+void TeTempFilesRemover::addFile( const std::string& fullFileName )
+{
+  if( ! fullFileName.empty() )
+  {
+    ListNode newNode;
+    newNode.filePtr_ = 0;
+    newNode.fullFileName_ = fullFileName;
+    
+    filesNamesList_.push_back( newNode );
+  }
+}
+      
+void TeTempFilesRemover::addFile( const std::string& fullFileName, 
+  FILE* filePtr )
+{
+  if( ! fullFileName.empty() )
+  {
+    ListNode newNode;
+    newNode.filePtr_ = filePtr;
+    newNode.fullFileName_ = fullFileName;
+    
+    filesNamesList_.push_back( newNode );
+  }
+}
+      
+void TeTempFilesRemover::removeFileName( const std::string& fullFileName )
+{
+  if( ! fullFileName.empty() )
+  {
+    std::list< ListNode >::iterator it = filesNamesList_.begin();
+    std::list< ListNode >::iterator itEnd = filesNamesList_.end();
+    std::list< ListNode >::iterator itAux;
+  
+    while( it != itEnd )
+    {
+      if( it->fullFileName_ == fullFileName )
+      {
+        itAux = it;
+        --itAux;
+        
+        filesNamesList_.erase( it );
+        
+        it = itAux;
+      }
+          
+      ++it;
+    }
+  }
+}
+      
+void TeTempFilesRemover::removeFile( const std::string& fullFileName )
+{
+  if( ! fullFileName.empty() )
+  {
+    std::list< ListNode >::iterator it = filesNamesList_.begin();
+    std::list< ListNode >::iterator itEnd = filesNamesList_.end();
+    std::list< ListNode >::iterator itAux;
+  
+    while( it != itEnd )
+    {
+      if( it->fullFileName_ == fullFileName )
+      {
+        if( it->filePtr_ )
+          fclose( it->filePtr_ );
+        
+        remove( it->fullFileName_.c_str() );
+            
+        itAux = it;
+        --itAux;
+        
+        filesNamesList_.erase( it );
+        
+        it = itAux;
+      }
+          
+      ++it;
+    }
+  }
+}
+
+void TeTempFilesRemover::removeAllFiles()
+{
+  std::list< ListNode >::iterator it = filesNamesList_.begin();
+  std::list< ListNode >::iterator itEnd = filesNamesList_.end();
+
+  while( it != itEnd )
+  {
+    if( it->filePtr_ )
+      fclose( it->filePtr_ );
+    
+    remove( it->fullFileName_.c_str() );
+        
+    ++it;
+  }
+  
+  filesNamesList_.clear();
+}
+
+
+
diff --git a/src/terralib/kernel/TeTempFilesRemover.h b/src/terralib/kernel/TeTempFilesRemover.h
new file mode 100755
index 0000000..67b8a37
--- /dev/null
+++ b/src/terralib/kernel/TeTempFilesRemover.h
@@ -0,0 +1,93 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeTempFilesRemover.h
+    \brief Temporary files remover.
+*/
+
+#ifndef TETEMPFILEREMOVER_H
+  #define TETEMPFILEREMOVER_H
+  
+  #include "TeSingleton.h"
+  #include "TeDefines.h"
+
+  #include <stdio.h>
+  #include <string>
+  #include <list>
+
+  /*!
+   * \class TeTempFilesRemover
+   * \brief Hold Temporary files references for file system remotion when 
+   * appropriate or when the singleton is destroyed.
+   * \author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * \ingroup Utils
+   */
+  class TL_DLL TeTempFilesRemover : public TeSingleton< TeTempFilesRemover >
+  {
+    public :
+      
+      TeTempFilesRemover();
+      
+      /*! Add a file to be removed.
+       * \param fullFileName Full file name.
+       */
+      void addFile( const std::string& fullFileName );
+      
+      /*! Add a file to be removed.
+       * \param fullFileName Full file name.
+       * \param filePtr File pointer.
+       * \note The file will be closed just before its deletion.
+       */      
+      void addFile( const std::string& fullFileName, FILE* filePtr );
+      
+      /*! Remove the file reference - The file will not be deleted from
+       * the file system.
+       * \param fullFileName Full file name.
+       */      
+      void removeFileName( const std::string& fullFileName );
+      
+      /*! Remove the file reference and delete it from
+       * the file system.
+       * \param fullFileName Full file name.
+       */       
+      void removeFile( const std::string& fullFileName );
+      
+      /*! Remove all files reference and also from the from
+       * the file system.
+       * \param fullFileName Full file name.
+       */        
+      void removeAllFiles();
+      
+      ~TeTempFilesRemover();
+      
+    protected :
+      
+      struct ListNode
+      {
+        FILE* filePtr_;
+        std::string fullFileName_;
+      };
+      
+      std::list< ListNode > filesNamesList_;
+  };
+
+#endif
diff --git a/src/terralib/kernel/TeTemporalSeries.cpp b/src/terralib/kernel/TeTemporalSeries.cpp
old mode 100644
new mode 100755
index ba01eec..a34d713
--- a/src/terralib/kernel/TeTemporalSeries.cpp
+++ b/src/terralib/kernel/TeTemporalSeries.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -148,13 +148,20 @@ TeTemporalSeries::buildFrameIntervals()
 			//fromClause = TSparams_.orTheme_->sqlGridFrom();
 			string collAuxTable = TSparams_.orTheme_->collectionAuxTable();
 			string uniqueIdName = tempTable.name() +"."+ tempTable.uniqueName(); 
+			string objectIdName = tempTable.name() +"."+ tempTable.linkName(); 
+
 			fromClause = " FROM "+ tempTable.name()+" RIGHT JOIN "+ collAuxTable; 
-			fromClause += " ON "+ uniqueIdName +" = ";;
 			
 			if(tempTable.tableType()==TeFixedGeomDynAttr)
+			{
+				fromClause += " ON "+ uniqueIdName +" = ";
 				fromClause += collAuxTable +".aux0";
+			}
 			else
-				fromClause += collAuxTable +".unique_id";
+			{
+				fromClause += " ON "+ objectIdName +" = ";
+				fromClause += collAuxTable +".object_id";
+			}
 		}
 
 		string sql = " SELECT min("+ initialtime +"), max("+ finaltime +") ";
diff --git a/src/terralib/kernel/TeTemporalSeries.h b/src/terralib/kernel/TeTemporalSeries.h
old mode 100644
new mode 100755
index a68f7ee..8234f2d
--- a/src/terralib/kernel/TeTemporalSeries.h
+++ b/src/terralib/kernel/TeTemporalSeries.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,6 +20,9 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
+/*! \file TeTemporalSeries.h
+    \brief This file contains structures and definitions to deal with temporal series.
+*/
 
 #ifndef  __TERRALIB_INTERNAL_TS_H
 #define  __TERRALIB_INTERNAL_TS_H
@@ -43,10 +46,9 @@ enum TeTSType  { TeATTRDYN, TeATTRDYNGROUP, TeEVENT, TeATTREVENT};
 enum TeTSDataType  { TeDATA, TeMISSING, TeDMISSING, TeOUTLIER, TeDOUTLIER, TePREDICTION };
 
 
-//! A class that represent each time frame of a temporal serie
-class TeTSEntry
+//! A class that represent each time frame of a temporal series
+class TL_DLL TeTSEntry
 {
-
 public:
 	int					timeFrame_;  //the time frame of the temporal series 
 	double 				value_;
@@ -84,13 +86,12 @@ public:
 
 };
 
-//! Parameters of a temporal serie
-class TeTSParams 
+//! Parameters of a temporal series
+class TL_DLL TeTSParams 
 {
-  	
 public:
-	TeTSType			type_;			//! type of the serie
-  	TeChronon			chronon_;		//! Chronon used to generated the serie
+	TeTSType			type_;			//! type of the series
+  	TeChronon			chronon_;		//! Chronon used to generated the series
   	TeTimeInterval		time_;			//! Date/Time validy 
   	TeStatisticType		timeOper_; 		//! operator to temporal grouping - to group objects in each time frame
   	TeStatisticType		spatOper_; 		//! operator to spatial grouping - to group instances to each object 
@@ -139,10 +140,9 @@ public:
 	TeTSParams& operator=(const TeTSParams& other); 
 }; 
 
-//! A class to represent temporal serie
-class TeTemporalSeries
+//! A class to represent temporal series
+class TL_DLL TeTemporalSeries
 {
-
 public:
 	TeTSParams			TSparams_; 
 	vector<TeTSEntry> 	series_; //! serie
@@ -177,7 +177,7 @@ public:
 	//! Returns the time of each frame
 	int timeInt(int frame) { return ((series_[frame-1]).timeInt_); }
 
-	//! Sets the temporal serie entry value
+	//! Sets the temporal series entry value
 	bool setTSEntryValue(unsigned int frame, double val, TeTSDataType type); 
 
 	//! Returns the time of each frame
@@ -185,7 +185,6 @@ public:
 
 };
 
-
 #endif
 
 
diff --git a/src/terralib/kernel/TeTheme.cpp b/src/terralib/kernel/TeTheme.cpp
old mode 100644
new mode 100755
index 4e5ac33..1fa3fd6
--- a/src/terralib/kernel/TeTheme.cpp
+++ b/src/terralib/kernel/TeTheme.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright  2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -21,264 +21,307 @@ of this library and its documentation.
 *************************************************************************************/
 
 #include "TeTheme.h"
-#include "TeUtils.h"
 #include "TeDatabase.h"
 #include "TeGroupingAlgorithms.h"
+#include "TeRasterTransform.h"
+#include "TeQuerier.h"
+#include "TeQuerierParams.h"
 
 extern int  yyparse(string& sqlOut);
 extern int  initParse(const string& strIn, TeDatabase* db);
 
-TeTheme& 
-TeTheme::operator= (TeTheme& other)
+static TeThemeFactory themeFactory;
+
+TeTheme::TeTheme( const string& name, TeLayer* layer, TeViewNode* parent, const int& view, const int& id)
+		: TeAbstractTheme(name, parent, view, id, TeTHEME),
+		layer_(layer),
+        useCollection_(true)
+{
+	//layer id
+	if(layer)
+	{
+		layerId_ = layer->id();
+		if (layer_->database())
+			themeBox_ = layer_->box();
+	}
+	else
+		layerId_ = -1;
+}
+
+TeTheme::TeTheme(const TeViewNodeParams& params) : TeAbstractTheme(params),	layer_(0), layerId_(-1),
+useCollection_(true)
+{
+}
+
+
+// Copy constructor
+TeTheme::TeTheme (const TeTheme& other) :
+	TeAbstractTheme(other)
+{
+	layerId_ = other.layerId_;
+	layer_ = other.layer_;      //the same layer pointer
+	collectionTable_ = other.collectionTable_;
+	collectionAuxTable_ = other.collectionAuxTable_;
+
+	attTableVector_ = other.attTableVector_;
+	sqlFrom_ =  other.sqlFrom_;
+	sqlJoin_ = other.sqlGridJoin_;
+	sqlGridFrom_ = other.sqlGridFrom_;
+	sqlGridJoin_ = other.sqlGridJoin_;
+	aliasVector_ = other.aliasVector_;
+	sqlAttList_ = other.sqlAttList_;
+	sqlNumAttList_ = other.sqlNumAttList_;
+
+    useCollection_ = other.useCollection_;
+}
+
+
+// Destructor
+TeTheme::~TeTheme ()
+{
+	clearAttTableVector();
+	clearAttList();
+	collectionTable_.clear();
+	collectionAuxTable_.clear();
+	sqlFrom_.clear();
+	sqlJoin_.clear();
+	sqlGridFrom_.clear();
+	sqlGridJoin_.clear();
+	aliasVector_.clear();
+	sqlAttList_.clear();
+	sqlNumAttList_.clear();
+}
+
+TeTheme&
+TeTheme::operator= (const TeTheme& other)
 {
 	if ( this != &other )
 	{
-		myParent_ = other.parent(); 
-		id_ = other.id(); 
-		name_= other.name(); 
-		view_ = other.view(); 
-		type_ = other.type();
-		priority_ = other.priority();
-		
-		layerId_ = other.layerId();
-		layer_ = other.layer();      //the same layer pointer
-		generateAttributeRest_ = other.attributeRest();
-		generateTemporalRest_ = other.temporalRest();
-		generateSpatialRest_ = other.spatialRest(); 
-		spatialRelation_ = other.spatialRelation();
-		hasSpatialRes_ =  other.hasSpatialRest();
-		boxRest_ = other.boxRestriction();
-		geomRest_ = other.geomRestriction(); 
-		geomRepRest_ = other.geomRepRestriction();	
-		minScale_ = other.minScale();
-		maxScale_ = other.maxScale();
-		collectionTable_ = other.collectionTable();
-		collectionAuxTable_ = other.collectionAuxTable();
-		visibleRep_ = other.visibleRep();
-		enableVisibility_ = other.visibility();
-
-		if(grouping_)
-			delete grouping_;
-		grouping_ = 0;
-		if(other.grouping())
-		{
-			grouping_ = new TeGrouping();
-			(*grouping_) = (*other.grouping());
-		}
-
-		legend_ = other.legend();
-		outOfCollectionLegend_ = other.outOfCollectionLegend();
-		withoutDataConnectionLegend_ = other.withoutDataConnectionLegend();	
-		defaultLegend_ = other.defaultLegend ();
-		pointingLegend_ = other.pointingLegend();
-		queryLegend_ = other.queryLegend();
-		queryAndPointingLegend_ = other.queryAndPointingLegend(); 
-		
-		attTableVector_ = other.attrTables();
-		sqlFrom_ =  other.sqlFrom();		
-		sqlJoin_ = other.sqlGridJoin();
-		sqlGridFrom_ = other.sqlGridFrom();
-		sqlGridJoin_ = other.sqlGridJoin();
-		aliasVector_ = other.aliasVector();
-		sqlAttList_ = other.sqlAttList();
-		sqlNumAttList_ = other.sqlNumAttList();		
-	
-		if(rasterVisual_)
-			delete rasterVisual_;
-		rasterVisual_ = 0;
-		if(other.rasterVisual())
-		{
-			rasterVisual_ = new TeRasterTransform();
-			(*rasterVisual_) = (*other.rasterVisual());
-		}
+		TeAbstractTheme* absTheme = (TeAbstractTheme*)this;
+		absTheme->operator=(other);
+		layerId_ = other.layerId_;
+		layer_ = other.layer_;      //the same layer pointer
+
+		collectionTable_ = other.collectionTable_;
+		collectionAuxTable_ = other.collectionAuxTable_;
+
+		attTableVector_ = other.attTableVector_;
+		sqlFrom_ =  other.sqlFrom_;
+		sqlJoin_ = other.sqlGridJoin_;
+		sqlGridFrom_ = other.sqlGridFrom_;
+		sqlGridJoin_ = other.sqlGridJoin_;
+		aliasVector_ = other.aliasVector_;
+		sqlAttList_ = other.sqlAttList_;
+		sqlNumAttList_ = other.sqlNumAttList_;
+
+        useCollection_ = other.useCollection_;
 	}
 	return *this;
 }
 
-void 
+
+void TeTheme::layer(TeLayer* layer)
+{
+	layer_ = layer;
+	if (layer)
+	{
+		layerId_ = layer->id();
+//		themeBox_ = layer_->box();
+	}
+}
+
+void
 TeTheme::setSpatialRest(TeBox& box, TeGeomRep rep, TeSpatialRelation relation)
 {
 	hasSpatialRes_ = true;
 	boxRest_ = box;
 	spatialRelation_ = relation;
-	
+
 	if(rep==TeGEOMETRYNONE)
 		geomRepRest_ = layer()->vectRepres()[0]->geomRep_;
 	else
 		geomRepRest_ = rep;
-	
+
 	geomRest_ = 0;
 }
 
-void 
+void
 TeTheme::setSpatialRest(TeGeometry* geom, TeGeomRep rep, TeSpatialRelation relation)
 {
 	hasSpatialRes_ = true;
 	geomRest_ = geom;
 	spatialRelation_ = relation;
-	
+
 	if(rep==TeGEOMETRYNONE)
 		geomRepRest_ = layer()->vectRepres()[0]->geomRep_;
 	else
 		geomRepRest_ = rep;
-	
+
 	boxRest_ = TeBox();
 }
 
-void 
-TeTheme::grouping(TeGrouping* g) 
+string
+TeTheme::sqlWhereRestrictions(TeRepresentation* rep)
 {
-	if(grouping_==g)
-		return;
+	TeKeys objs;
+	string whereClause= " 1 = 1 ";
+	TeDatabase* db = layer()->database();
 
-	if(grouping_) 
-		delete (grouping_);
-	
-	grouping_ = g; 
-} 
+	// load the first representation
+	if(!rep)
+		rep = (layer()->vectRepres())[0];
 
-bool 
-TeTheme::save()  
-{
-	TeDatabase* db = layer()->database();
-	if(!db)
-		return false;
+	// temporal restrictions are applied only to temporal tables
+	if(hasTemporalRest())
+	{
+		string result = "";
 
-	//insert theme in database 
-	if(id()==0)
+		initParse(temporalRest(), db);
+
+		if(!yyparse(result))  //0: accept  1: reject
+			whereClause += " AND "+ result;
+		else
+			return "";
+	}
+
+	// we should test if the attribute restriction is valid
+	if (hasAttrRest())
+		whereClause += " AND "+ attributeRest();
+
+	// spatial restriction with other geometry representation
+	if (hasSpatialRest() && rep)
 	{
-		if(!db->insertTheme(this))
+		if(boxRestriction().isValid())
 		{
-			db->deleteTheme(this->id());
-			return false;
+            TeBox b =  boxRestriction();
+            TeGeomRep gRep = rep->geomRep_;
+//			whereClause += " AND "+ db->getSQLBoxWhere(boxRestriction(), rep->geomRep_);
+			whereClause += " AND "+ db->getSQLBoxWhere(b, gRep);
 		}
-	}
+		else if(geomRestriction())
+		{
+			string geomTableRest = layer()->tableName(geomRepRestriction());
+			TePrecision::instance().setPrecision(TeGetPrecision(layer()->projection()));
 
-	//update te_theme_tables table
-	if(!db->updateThemeTable(this))
-	{
-		db->deleteTheme(this->id());
-		return false;
+			if(db->spatialRelation(geomTableRest, geomRepRestriction(), geomRestriction(),
+							   objs, spatialRelation()))
+			{
+				string obs;
+				for(unsigned int i=0; i<objs.size(); i++)
+				{
+					if(i!=0)
+						obs += ",";
+					obs += "'"+ objs[i] +"'";
+				}
+
+				whereClause += " AND "+ rep->tableName_ +".object_id IN ("+ obs +")";
+			}
+		}
 	}
-	
-	//collection table 
-	if(collectionTable().empty())
-		collectionTable("te_collection_"+ Te2String(id())); 
+	return whereClause;
+}
+
+void TeTheme::createRasterVisual(TeRaster* rst)
+{
+	if (rasterVisual_)
+		delete rasterVisual_;
+
+	if (!rst)
+		rst = layer_->raster();
+
+	if (!rst)
+		return;
 
-	if(!db->createCollectionTable(collectionTable_))
+	rasterVisual_ = new TeRasterTransform();
+
+	if (rst->params().photometric_[0] == TeRasterParams::TePallete)  // raster palette -> uses its palette
 	{
-		db->deleteTheme(this->id());
-		return false;
+		rasterVisual_->setTransfFunction(&TeRasterTransform::Pallete2ThreeBand);
+		rasterVisual_->setLutSize(rst->params().lutr_.size());
+		return;
 	}
 
-	//collection aux table
-	collectionAuxTable(collectionTable() + "_aux");
-	addThemeTable(collectionAuxTable());
-
-	if(!createCollectionAuxTable())
+	if (visibleRep_ & 0x40000000  &&		// sliced raster -> generate the
+		grouping_.groupMode_ == TeRasterSlicing)	// appropriate palette
 	{
-		db->deleteTheme(this->id());
-		return false;
+		int band = atoi(grouping_.groupAttribute_.name_.c_str());
+		rasterVisual_->setSrcBand(band);
+		if (rst->params().dataType_[band] != TeUNSIGNEDCHAR)
+			rasterVisual_->generateLUT(legend_, 1024, defaultLegend_.visual(TePOLYGONS)->color());
+		else
+			rasterVisual_->generateLUT(legend_, 256, defaultLegend_.visual(TePOLYGONS)->color());
+		rasterVisual_->setTransfFunction(&TeRasterTransform::LUT2ThreeBand);
+		return;
 	}
 
-	return true;
+	if (rst->params().dataType_[0] != TeUNSIGNEDCHAR)	// non unsigned char -> generate linear transformation
+		rasterVisual_->setLinearTransfParameters(rst->params().vmin_[0],rst->params().vmax_[0], 0, 255);
+
+	if (rst->params().nBands() == 1)
+		rasterVisual_->setTransfFunction(&TeRasterTransform::Mono2ThreeBand);
+	else if (rst->params().nBands() == 3)
+		rasterVisual_->setTransfFunction(&TeRasterTransform::ThreeBand2RGB);
+	else
+		rasterVisual_->setTransfFunction(&TeRasterTransform::Band2Band);
 }
 
+
+
 bool
-TeTheme::buildCollection()
+TeTheme::buildCollection(std::string objectId)
 {
 	if(id()==0)
 		return false;
-	
-	if(!populateCollection())
-		return false;
 
-	if(!populateCollectionAux())
+	if(!populateCollection(objectId))
 		return false;
 
-	return true;
-}
-
-bool 
-TeTheme::generateLabelPositions()
-{ 
-	TeDatabase* db = layer()->database();
-	if(!db)
+	if(!populateCollectionAux(objectId))
 		return false;
 
-	return (db->generateLabelPositions(this)); 
+	return true;
 }
 
-void 
-TeTheme::resetGrouping ()
+bool
+TeTheme::buildGrouping(const TeGrouping& g, TeSelectedObjects selectedObjects,
+						 vector<double>* dValuesVec)
 {
-	if(grouping_)
-	{
-		if (grouping_->groupMode_ == TeRasterSlicing && rasterVisual_)
-			this->removeRasterVisual();
-		
-		delete(grouping_);
-		grouping_ = 0;
-	}
-
-	legend_.clear();
-	return;
+	return buildGrouping(layer_->database(), g, selectedObjects, dValuesVec);
 }
 
-bool 
-TeTheme::buildGrouping(TeGrouping* g, vector<TeSlice>& slices)
+bool
+TeTheme::buildGrouping(TeDatabase* db, const TeGrouping& g, TeSelectedObjects selectedObjects, vector<double>* dValuesVec)
 {
-	if(slices.size() > 200)
-		return false;
-	grouping(g);
-	legend_.clear(); 
-	
-	for(unsigned int j=0; j<slices.size(); j++)
-	{
-		TeLegendEntry legend(slices[j]);
-		legend.group(j);
-		legend.theme(id());
-		legend_.push_back(legend);
-	}	
-	return true;
-}
-
-bool  
-TeTheme::buildGrouping(TeGrouping* g, TeSelectedObjects selectedObjects, vector<double>* dValuesVec)   
-{ 
-	TeDatabase* db = layer_->database();
-	if(!db || !g)
+	if(!db)
 		return false;
-
+	grouping_ = g;
 	unsigned int i;
 	vector<TeSlice> slices;
-
-	if (g->groupMode_ == TeRasterSlicing)
+	int	nullValues = 0;
+	if (grouping_.groupMode_ == TeRasterSlicing)
 	{
-		int b = atoi(g->groupAttribute_.name_.c_str());
-		if (!layer_->raster() ||  
+		int b = atoi(grouping_.groupAttribute_.name_.c_str());
+		if (!layer_->raster() ||
 			b < 0 ||
 			b > layer_->raster()->params().nBands() ||
-			g->groupNumSlices_ <= 0 ||
-			g->groupNumSlices_ > 200 )
+			grouping_.groupNumSlices_ <= 0)
 			return false;
 
-		if (g->groupMaxVal_ == TeMINFLOAT)
-			g->groupMaxVal_ = layer_->raster()->params().vmax_[b];
+		if (grouping_.groupMaxVal_ == TeMINFLOAT)
+			grouping_.groupMaxVal_ = layer_->raster()->params().vmax_[b];
 
-		if (g->groupMinVal_ == TeMAXFLOAT)
-			g->groupMinVal_ = layer_->raster()->params().vmin_[b];
+		if (grouping_.groupMinVal_ == TeMAXFLOAT)
+			grouping_.groupMinVal_ = layer_->raster()->params().vmin_[b];
 
-		grouping(g);
-		TeGroupByEqualStep(g->groupMinVal_, g->groupMaxVal_,g->groupNumSlices_, slices, g->groupPrecision_);
+		TeGroupByEqualStep(grouping_.groupMinVal_, grouping_.groupMaxVal_,
+			grouping_.groupNumSlices_, slices, grouping_.groupPrecision_);
 	}
 	else
 	{
-		if(g->groupAttribute_.name_.empty())
+        if(grouping_.groupAttribute_.name_.empty())
 			return false;
-		grouping(g);
 
-		//verify what the objects will be consired
+		//verify what the objects will be considered
 		string	input;
 		if(selectedObjects == TeSelectedByPointing)
 		{
@@ -313,52 +356,42 @@ TeTheme::buildGrouping(TeGrouping* g, TeSelectedObjects selectedObjects, vector<
 		string query;
 		bool normal = false;
 		string aggrFunc = "";
-		if(grouping_->groupFunction_.empty())
+		if(grouping_.groupFunction_.empty())
 			aggrFunc = " MIN";
 		else
-			aggrFunc = grouping_->groupFunction_;
+			aggrFunc = grouping_.groupFunction_;
 
-		if(grouping_->groupNormAttribute_.empty())
+		if(grouping_.groupNormAttribute_.empty())
 		{
-//			if(grouping_->groupAttribute_.type_== TeSTRING)
-//				query = " SELECT "+ grouping_->groupAttribute_.name_;  
-//			else
-				query = " SELECT "+ aggrFunc +"("+ grouping_->groupAttribute_.name_ +")";  
+			query = " SELECT "+ aggrFunc +"("+ grouping_.groupAttribute_.name_ +")";
 		}
 		else
 		{
-			query = " SELECT "+ aggrFunc +"("+ grouping_->groupAttribute_.name_ +") / "+ aggrFunc +"("+ grouping_->groupNormAttribute_ + ")";
+			query = " SELECT "+ aggrFunc +"("+ grouping_.groupAttribute_.name_ +") / "+ aggrFunc +"("+ grouping_.groupNormAttribute_ + ")";
 			normal = true;
 		}
-		query += sqlGridFrom(); 
-		
+		query += sqlGridFrom();
+
 		if(selectedObjects != TeAll)
 			query += input;
-
-//		if(grouping_->groupAttribute_.type_!= TeSTRING)
-			query += " GROUP BY " + collectionTable() + ".c_object_id";
-		
+		query += " GROUP BY " + collectionTable() + ".c_object_id";
 		if(!portal->query(query) || !portal->fetchRow())
 		{
 			delete portal;
 			return false;
 		}
-
-		//mount vector in memory
 		vector<double> dValues;  //inputvect
 		vector<string> sValues;	//svec
-
-		double mean, sum; 
+		double mean, sum;
 		mean = sum = 0.;
-		int	nullValues = 0;
-		do  
+		do
 		{
 			string val = portal->getData(0);
-			string valNorm = Te2String(atof(val.c_str()), grouping_->groupPrecision_);
+			string valNorm = Te2String(atof(val.c_str()), grouping_.groupPrecision_);
 
 			if (!val.empty())
 			{
-				if(grouping_->groupMode_== TeUniqueValue)
+				if(grouping_.groupMode_== TeUniqueValue)
 				{
 					if(normal)
 						sValues.push_back(valNorm);
@@ -375,38 +408,28 @@ TeTheme::buildGrouping(TeGrouping* g, TeSelectedObjects selectedObjects, vector<
 			else
 				nullValues++;
 		}while(portal->fetchRow());
+
 		delete portal;
-		
+
 		if(dValues.empty() && sValues.empty())
 			return false;
 
-		if(grouping_->groupMode_== TeEqualSteps)
-			TeGroupByEqualStep(dValues.begin(), dValues.end(), grouping_->groupNumSlices_, slices, grouping_->groupPrecision_);
-		else if(grouping_->groupMode_== TeQuantil)
-			TeGroupByQuantil(dValues.begin(), dValues.end(), grouping_->groupNumSlices_, slices, grouping_->groupPrecision_);
-		else if(grouping_->groupMode_== TeStdDeviation)
+		if(grouping_.groupMode_== TeEqualSteps)
+			TeGroupByEqualStep(dValues.begin(), dValues.end(), grouping_.groupNumSlices_, slices, grouping_.groupPrecision_);
+		else if(grouping_.groupMode_== TeQuantil)
+			TeGroupByQuantil(dValues.begin(), dValues.end(), grouping_.groupNumSlices_, slices, grouping_.groupPrecision_);
+		else if(grouping_.groupMode_== TeStdDeviation)
 		{
 			string m = Te2String(mean);
-			TeGroupByStdDev(dValues.begin(), dValues.end(), grouping_->groupStdDev_, slices, m, grouping_->groupPrecision_);
+			TeGroupByStdDev(dValues.begin(), dValues.end(), grouping_.groupStdDev_, slices, m, grouping_.groupPrecision_);
 		}
-		else if(grouping_->groupMode_== TeUniqueValue)
+		else if(grouping_.groupMode_== TeUniqueValue)
 		{
-			if(grouping_->groupFunction_ == "COUNT")
-				TeGroupByUniqueValue(sValues, TeINT, slices, grouping_->groupPrecision_);
+			if(grouping_.groupFunction_ == "COUNT")
+				TeGroupByUniqueValue(sValues, TeINT, slices, grouping_.groupPrecision_);
 			else
-				TeGroupByUniqueValue(sValues, grouping_->groupAttribute_.type_, slices, grouping_->groupPrecision_);
-		}
-
-		if(grouping_->groupNullAttr_ && nullValues > 0)
-		{
-			TeSlice ps;
-			ps.count_ = nullValues;
-			ps.from_ = "Missing Data";
-			slices.push_back(ps);
-			grouping_->groupNumSlices_ = slices.size() - 1;
+				TeGroupByUniqueValue(sValues, grouping_.groupAttribute_.type_, slices, grouping_.groupPrecision_);
 		}
-		else
-			grouping_->groupNumSlices_ = slices.size();
 
 		if (dValuesVec)
 		{
@@ -414,11 +437,18 @@ TeTheme::buildGrouping(TeGrouping* g, TeSelectedObjects selectedObjects, vector<
 				dValuesVec->push_back(dValues[i]);
 		}
 	}
+	if(grouping_.groupNullAttr_ && nullValues > 0)
+	{
+		TeSlice ps;
+		ps.count_ = nullValues;
+		ps.from_ = "Missing Data";
+		slices.push_back(ps);
+		grouping_.groupNumSlices_ = slices.size() - 1;
+	}
+	else
+		grouping_.groupNumSlices_ = slices.size();
 
-	legend_.clear(); 
-	if(slices.size() > 200)
-		return false;
-	
+	legend_.clear();
 	for(i=0; i<slices.size(); ++i)
 	{
 		TeLegendEntry legend(slices[i]);
@@ -426,53 +456,153 @@ TeTheme::buildGrouping(TeGrouping* g, TeSelectedObjects selectedObjects, vector<
 		legend.theme(id());
 		legend_.push_back(legend);
 	}
-	
 	return true;
 }
 
 bool
-TeTheme::setGroupingVisual(int n, TeVisual& visual, TeGeomRep rep)
+TeTheme::buildGrouping(const TeGrouping& g, TeChronon chr, vector<map<string, string> >& mapObjValVec)
 {
-	if(	(n > grouping_->groupNumSlices_)	||
-		((int)legend_.size() < n)				|| 
-		(legend_.empty()) )
-		return false;
-
-	legend_[(n-1)].setVisual (visual, rep); 
-
-	return true;
+	return buildGrouping(layer_->database(), g, chr, mapObjValVec);
 }
 
 bool
-TeTheme::setGroupingVisual(int n, TeGeomRepVisualMap& vismap)
+TeTheme::buildGrouping(TeDatabase* db, const TeGrouping& g, TeChronon chr, vector<map<string, string> >& mapObjValVec)
 {
-	if(	(n > grouping_->groupNumSlices_)	||
-		((int)legend_.size() < n)		|| 
-		(legend_.empty()) )
+	if(!db || chr == TeNOCHRONON)
 		return false;
 
-	TeGeomRepVisualMap::iterator it = vismap.begin();
-	while (it != vismap.end())
+	grouping_ = g;
+
+	unsigned int i;
+	vector<TeSlice> slices;
+	vector<double> dValues;  //inputvect
+	vector<string> sValues;	//svec
+	double mean, sum;
+	mean = sum = 0.;
+	int	nullValues = 0;
+	string val;
+
+	if (grouping_.groupMode_ == TeRasterSlicing)
 	{
-		legend_[(n-1)].setVisual(it->second,it->first);
-		++it;
+		int b = atoi(grouping_.groupAttribute_.name_.c_str());
+		if (!layer_->raster() ||
+			b < 0 ||
+			b > layer_->raster()->params().nBands() ||
+			grouping_.groupNumSlices_ <= 0)
+			return false;
+
+		if (grouping_.groupMaxVal_ == TeMINFLOAT)
+			grouping_.groupMaxVal_ = layer_->raster()->params().vmax_[b];
+
+		if (grouping_.groupMinVal_ == TeMAXFLOAT)
+			grouping_.groupMinVal_ = layer_->raster()->params().vmin_[b];
+
+		TeGroupByEqualStep(grouping_.groupMinVal_, grouping_.groupMaxVal_,
+			grouping_.groupNumSlices_, slices, grouping_.groupPrecision_);
 	}
-	return true;
-}
+	else
+	{
+		string func;
+		TeStatisticType statType = TeNOSTATISTIC;
+		if (grouping_.groupMode_ == TeUniqueValue && grouping_.groupAttribute_.type_ == TeSTRING)
+			func = "MIN";
+		else
+			func = grouping_.groupFunction_;
+
+		if (func == "MIN")
+			statType = TeMINVALUE;
+		else if (func == "MAX")
+			statType = TeMAXVALUE;
+		else if (func == "MEAN")
+			statType = TeMEAN;
+		else if (func == "SUM")
+			statType = TeSUM;
+		else if (func == "COUNT")
+			statType = TeCOUNT;
+
+		// Set the flag that indicates the geometries must not be loaded
+		bool loadGeometries = false;
+
+		// Insert the attributes in a multimap that relates the attribute
+		// representation and its statistic type
+		TeGroupingAttr attrMMap;
+		pair<TeAttributeRep, TeStatisticType> attr1 (
+			TeAttributeRep(grouping_.groupAttribute_), statType);
+		attrMMap.push_back(attr1);
+
+		// Set querier parameters
+		TeQuerierParams querierParams(loadGeometries, attrMMap);
+		querierParams.setParams(this, chr);
+
+		TeQuerier querier(querierParams);
+
+		// Load instances based on the querier parameters given
+		int numFrames = querier.getNumTimeFrames();
+		TeSTInstance sti;
+		string objId;
+		TePropertyVector vec;
+		mapObjValVec.resize(numFrames);
+
+		for (int frame = 0; frame < numFrames; ++frame)
+		{
+			if (querier.loadInstances(frame) == false)
+				continue;
 
-TeSliceVector 
-TeTheme::getSlices()
-{
-	TeSliceVector sliceVec;
-	for(unsigned int x=0; x<legend_.size(); ++x)
+			// Traverse all the instances
+			while(querier.fetchInstance(sti))
+			{
+				objId = sti.objectId();
+				sti.getPropertyValue(val, 0);
+
+				dValues.push_back(atof(val.c_str()));
+				sValues.push_back(val);
+				map<string, string>& objValMap = mapObjValVec[frame];
+				objValMap.insert(make_pair(objId, val));
+			}
+		}
+
+		if(grouping_.groupMode_== TeEqualSteps)
+			TeGroupByEqualStep(dValues.begin(), dValues.end(), grouping_.groupNumSlices_, slices, grouping_.groupPrecision_);
+		else if(grouping_.groupMode_== TeQuantil)
+			TeGroupByQuantil(dValues.begin(), dValues.end(), grouping_.groupNumSlices_, slices, grouping_.groupPrecision_);
+		else if(grouping_.groupMode_== TeStdDeviation)
+		{
+			string m = Te2String(mean);
+			TeGroupByStdDev(dValues.begin(), dValues.end(), grouping_.groupStdDev_, slices, m, grouping_.groupPrecision_);
+		}
+		else if(grouping_.groupMode_== TeUniqueValue)
+		{
+			if(grouping_.groupFunction_ == "COUNT")
+				TeGroupByUniqueValue(sValues, TeINT, slices, grouping_.groupPrecision_);
+			else
+				TeGroupByUniqueValue(sValues, grouping_.groupAttribute_.type_, slices, grouping_.groupPrecision_);
+		}
+	}
+
+	if(grouping_.groupNullAttr_ && nullValues > 0)
+	{
+		TeSlice ps;
+		ps.count_ = nullValues;
+		ps.from_ = "Missing Data";
+		slices.push_back(ps);
+		grouping_.groupNumSlices_ = slices.size() - 1;
+	}
+	else
+		grouping_.groupNumSlices_ = slices.size();
+
+	legend_.clear();
+	for(i=0; i<slices.size(); ++i)
 	{
-		TeSlice slice = legend_[x].slice();
-		sliceVec.push_back (slice);
+		TeLegendEntry legend(slices[i]);
+		legend.group(i);
+		legend.theme(id());
+		legend_.push_back(legend);
 	}
-	return sliceVec;
+
+	return true;
 }
 
-bool 
+bool
 TeTheme::getAttTables(TeAttrTableVector& attrs, TeAttrTableType attType)
 {
 	TeAttrTableVector::iterator it = attTableVector_.begin();
@@ -485,7 +615,22 @@ TeTheme::getAttTables(TeAttrTableVector& attrs, TeAttrTableType attType)
 	return (!attrs.empty());
 }
 
-bool 
+bool
+TeTheme::getTable(TeTable& table, const string tableName)
+{
+	unsigned int i;
+	for (i = 0; i < attTableVector_.size(); ++i)
+	{
+		if (attTableVector_[i].name() == tableName)
+		{
+			table = attTableVector_[i];
+			return true;
+		}
+	}
+	return false;
+}
+
+bool
 TeTheme::getTemporalTable(TeTable& table)
 {
 	TeAttrTableVector::iterator it = attTableVector_.begin();
@@ -493,7 +638,7 @@ TeTheme::getTemporalTable(TeTable& table)
 	{
 		if (((*it).tableType() == TeAttrEvent) || ((*it).tableType() == TeFixedGeomDynAttr))
 		{
-			table = (*it); 
+			table = (*it);
 			return true;
 		}
 		++it;
@@ -503,60 +648,81 @@ TeTheme::getTemporalTable(TeTable& table)
 
 bool
 TeTheme::saveGrouping(TeSelectedObjects selectedObjects)
-{ 
-	TeDatabase* db = layer_->database();
-	if(!db || !grouping_)
+{
+	return saveGrouping(layer_->database(), selectedObjects);
+}
+
+bool
+TeTheme::saveGrouping(TeDatabase* db, TeSelectedObjects)
+{
+	if(!db)
 		return false;
 
-	//verify if the collection table exists
-	//if there is a grouping definition
-	if (grouping_->groupMode_ != TeRasterSlicing)
-	{
-		if (!db->tableExist(collectionTable_) ||
-		   (grouping_->groupAttribute_.name_.empty()))	
-				return false;
-	}
-	if(legend_.empty())
-		buildGrouping(grouping());
+	vector<TeLegendEntry> legVec = legend_;
 
-	//save grouping in te_gouping table, the legends in te_legend table and
-	//the visual of each legend in the te_visual table
-	if(!db->updateTheme(this))
+	// Delete the theme grouping(if any) from the database
+	if(db->deleteLegend(id()) == false)
 		return false;
 
-	if(grouping_->groupMode_ != TeRasterSlicing)
-	{	//save legend in collection table
-		if(!saveLegendInCollection(selectedObjects))
-			return false;
-	}
-	return true;
-}  
+	if(grouping_.groupMode_ == TeNoGrouping)
+		return true;
 
-bool 
-TeTheme::addThemeTable(TeTable& inputTable)  
-{
-	bool result = true;
-	TeAttrTableType type = inputTable.tableType();
+	// Insert the new grouping
+	if(db->insertGrouping(id(), grouping_) == false)
+		return false;
 
-	if(inputTable.name() == collectionAuxTable_)
-	{
-		loadTablesJoin();
+	legend_ = legVec;
+	// Update (insert) the new legends
+	if (db->updateLegend(legend_) == false)
 		return false;
-	}
-	
-	if (type == TeAttrMedia)
-		return false; 
 
-	if(type != TeAttrStatic)
-	{
-		bool hasTemporal = false;
-		bool hasExtern = false; 
+	setLegendsForObjects();
 
-		TeAttrTableVector::iterator it = attTableVector_.begin();
-		while(it!=attTableVector_.end())
+	if(legend_.size())
+		visibleRep_ = visibleRep_ | 0x40000000;
+	else
+		visibleRep_ = visibleRep_ | 0xbfffffff;
+	string upVis = "UPDATE te_theme SET visible_rep=" + Te2String(visibleRep_) + " WHERE theme_id=" + Te2String(id());
+	return (db->execute(upVis));
+
+	return true;
+}
+
+bool
+TeTheme::loadThemeTables()
+{
+	clearAttTableVector();
+	TeDatabase* db = this->layer()->database();
+	if(!db)
+		return false;
+	return (db->loadThemeTable(this));
+}
+
+bool
+TeTheme::addThemeTable(TeTable& inputTable)
+{
+	bool result = true;
+	TeAttrTableType type = inputTable.tableType();
+
+	if(inputTable.name() == collectionAuxTable_)
+	{
+		loadTablesJoin();
+		return false;
+	}
+
+	if (type == TeAttrMedia)
+		return false;
+
+	if(type != TeAttrStatic)
+	{
+		bool hasTemporal = false;
+		bool hasExtern = false;
+
+		TeAttrTableVector::iterator it = attTableVector_.begin();
+		while(it!=attTableVector_.end())
 		{
 			//temporal
-			if( (it->tableType()==TeAttrEvent) || 
+			if( (it->tableType()==TeAttrEvent) ||
 				(it->tableType()==TeFixedGeomDynAttr) ||
 				(it->tableType()==TeDynGeomDynAttr))
 				hasTemporal = true;
@@ -568,7 +734,7 @@ TeTheme::addThemeTable(TeTable& inputTable)
 			++it;
 		}
 
-		if( ((type==TeAttrEvent) || 
+		if( ((type==TeAttrEvent) ||
 			(type==TeFixedGeomDynAttr) ||
 			(type==TeDynGeomDynAttr)) && (hasTemporal || hasExtern))
 			result = false;
@@ -582,11 +748,11 @@ TeTheme::addThemeTable(TeTable& inputTable)
 	attTableVector_.push_back(inputTable);
 	loadAliasVector();
 	loadAttrLists();
-	loadTablesJoin(); 
+	loadTablesJoin();
 	return true;
 }
 
-void 
+void
 TeTheme::addThemeTable(string tableName)
 {
 	TeTable table(tableName);
@@ -595,8 +761,8 @@ TeTheme::addThemeTable(string tableName)
 
 bool
 TeTheme::setAttTables(TeAttrTableVector& attrs)
-{	
-	attTableVector_.clear();	
+{
+	attTableVector_.clear();
 	int countTemporal = 0;
 	int countExtern = 0;
 	bool result = true;
@@ -605,7 +771,7 @@ TeTheme::setAttTables(TeAttrTableVector& attrs)
 	while(it!=attrs.end())
 	{
 		//temporal
-		if( (it->tableType()==TeAttrEvent) || 
+		if( (it->tableType()==TeAttrEvent) ||
 			(it->tableType()==TeFixedGeomDynAttr) ||
 			(it->tableType()==TeDynGeomDynAttr))
 			++countTemporal;
@@ -626,17 +792,15 @@ TeTheme::setAttTables(TeAttrTableVector& attrs)
 			attTableVector_.push_back(*it);
 			loadAliasVector();
 			loadAttrLists();
-			loadTablesJoin(); 
+			loadTablesJoin();
 		}
-			
 		++it;
 	}
-
 	return result;
 }
 
-bool 
-TeTheme::removeThemeTable(unsigned int index)  
+bool
+TeTheme::removeThemeTable(unsigned int index)
 {
 	if (index > (attTableVector_.size() - 1))
 		return false;
@@ -648,15 +812,67 @@ TeTheme::removeThemeTable(unsigned int index)
 	loadAliasVector();
 	loadAttrLists();
 	loadTablesJoin();
+	return true;
+}
+
+string
+TeTheme::getAttribute(unsigned int pos)
+{
+	unsigned int i;
+	unsigned int sumCols = 0, tableCol;
+	bool found = false;
+	for (i = 0; i < attTableVector_.size(); ++i)
+	{
+		TeAttributeList& attrList = attTableVector_[i].attributeList();
+		if (pos < (sumCols + attrList.size()))
+		{
+			if (i == 0)
+				tableCol = pos;
+			else
+				tableCol = pos - sumCols;
+			found = true;
+			break;
+		}
+		sumCols += attrList.size();
+	}
+
+	if (found == false)
+		return "";
+
+	TeAttributeList& attrList = attTableVector_[i].attributeList();
+	string attrName = attTableVector_[i].name() + "." + attrList[tableCol].rep_.name_;
+	return attrName;
+}
+
+bool
+TeTheme::isIndex(unsigned int pos)
+{
+	string fullAttrName = getAttribute(pos);
+	if (fullAttrName.empty() == true)
+		return false;
+
+	size_t idx = fullAttrName.find(".");
+	string tableName = fullAttrName.substr(0, idx);
+	string attrName = fullAttrName.substr(idx+1);
+
+	// Get the representation of a table given an attribute name
+	TeTable table;
+	if (getTable(table, tableName) == false)
+		return false;
 
-	return true; 
+	// Check if the attribute is index or not
+	if(table.uniqueName() == attrName)
+		return true;
+
+	return false;
 }
 
-bool 
-TeTheme::isThemeTable(int tableId)  
+bool
+TeTheme::isThemeTable(int tableId)
 {
 	bool isThemeTable = false;
-	for (unsigned int i = 0; i < attTableVector_.size(); ++i)
+	unsigned int i;
+	for (i = 0; i < attTableVector_.size(); ++i)
 	{
 		if (attTableVector_[i].id() == tableId)
 		{
@@ -667,8 +883,8 @@ TeTheme::isThemeTable(int tableId)
 	return isThemeTable;
 }
 
-bool 
-TeTheme::isThemeTable(string tableName)  
+bool
+TeTheme::isThemeTable(string tableName)
 {
 	bool isThemeTable = false;
 	for (unsigned int i = 0; i < attTableVector_.size(); ++i)
@@ -689,7 +905,7 @@ TeTheme::getTableName(const string& attrName)
 	size_t pos = attrName.find(".");
 
 	if (pos != string::npos)
-		return tableName = attrName.substr(0, pos-1);
+		return tableName = attrName.substr(0, pos);
 
 	for (unsigned int i = 0; i < attTableVector_.size(); ++i)
 	{
@@ -701,38 +917,26 @@ TeTheme::getTableName(const string& attrName)
 				tableName = attTableVector_[i].name();
 				return tableName;
 			}
-		}	
+		}
 	}
 
 	return tableName;
 }
 
 
-bool 
-TeTheme::loadThemeTables() 
-{
-	clearAttTableVector();
-	TeDatabase* db = this->layer()->database(); 
-	if(!db)
-		return false;
-	
-	return (db->loadThemeTable(this));
-}
-
-
-bool 
-TeTheme::deleteGrouping()  
+bool
+TeTheme::deleteGrouping()
 {
 	TeDatabase* db = layer_->database();
 	if(!db)
 		return false;
 
 	resetGrouping();
-	
+
 	//delete te_legend table
 	if(!db->deleteLegend (this->id()))
 		return false;
-	
+
 	//delete te_grouping table
 	string sql = "DELETE FROM te_grouping WHERE theme_id= "+ Te2String(this->id());
 	db->execute (sql);
@@ -740,13 +944,21 @@ TeTheme::deleteGrouping()
 	return true;
 }
 
-bool 
-TeTheme::createCollectionAuxTable()   
+bool
+TeTheme::createCollectionAuxTable()
+{
+	return createCollectionAuxTable(layer_->database());
+}
+
+bool
+TeTheme::createCollectionAuxTable(TeDatabase* db)
 {
 	unsigned int i, j;
 	bool status;
-	
-	TeDatabase* db = layer_->database();
+	vector<string> indexes;
+
+	if(!db)
+		return false;
 
 	if(!db->tableExist(collectionTable_))
 		return false;
@@ -754,8 +966,11 @@ TeTheme::createCollectionAuxTable()
 	if(db->tableExist(collectionAuxTable_))
 	{
 		status = db->execute("DROP TABLE " + collectionAuxTable_);
-		if(!status)
-			return false; 
+		if(db->tableExist(collectionAuxTable_))
+		{
+			if(!status)
+				return false;
+		}
 	}
 
 	TeAttributeList attList;
@@ -774,44 +989,64 @@ TeTheme::createCollectionAuxTable()
 		{
 			at.rep_.name_ = "aux" + Te2String(j++);
 			attList.push_back(at);
+			indexes.push_back(at.rep_.name_);
 		}
 	}
 
 	at.rep_.isPrimaryKey_ = true;
-//	at.rep_.numChar_ = 200;
 	at.rep_.numChar_ = 0;
 	at.rep_.name_ = "unique_id";
 	at.rep_.isAutoNumber_ = true;
 	at.rep_.type_ = TeINT;
 	attList.push_back(at);
-	
-//	at.rep_.type_ = TeINT;
+
 	at.rep_.name_ = "grid_status";
 	at.rep_.isPrimaryKey_ = false;
 	at.rep_.isAutoNumber_ = false;
 	at.rep_.numChar_ = 0;
-	attList.push_back(at);	
-	
-	status = db->createTable(collectionAuxTable_,attList);
+	attList.push_back(at);
+
+	status = db->createTable(collectionAuxTable_, attList);
 	if(!status)
 		return false;
 
+	string idxName = "te_idx_caux"+ Te2String(this->id());
+
 	//create index to object_id
-	db->createIndex(collectionAuxTable_, collectionAuxTable_+"_index1", "object_id"); 
+	db->createIndex(collectionAuxTable_, idxName+"_objId", "object_id");
+
+	for(unsigned int i=0; i<indexes.size(); ++i)
+		db->createIndex(collectionAuxTable_, idxName+"_"+indexes[i], indexes[i]);
+
+	return true;
+}
+
+bool TeTheme::isUpdated()
+{
+	if(layer() == NULL)
+	{
+		return false;
+	}
+	layer()->reloadLayerEditionTime();
+
+	if(this->getCreationTime() < layer()->getEditionTime())
+	{
+		return false;
+	}
 	return true;
-} 
+}
 
-bool 
-TeTheme::populateCollectionAux()  
-{	
+bool
+TeTheme::populateCollectionAux(std::string objectId)
+{
 	TeDatabase* db = layer_->database();
 	if((!db) || (collectionTable_.empty()) || (collectionAuxTable_.empty()))
 		return false;
-	
-	string whereClause; 
+
+	string whereClause;
 
 	whereClause = " WHERE 1=1 ";
-	
+
 	// Populate the collection auxiliary table
 	string ins = "INSERT INTO " + collectionAuxTable_ + " (object_id";
     unsigned int i, j;
@@ -823,7 +1058,6 @@ TeTheme::populateCollectionAux()
 			ins += ", aux" + Te2String(j++);
 	}
 
-//	ins += ", unique_id, grid_status) SELECT c_object_id";
 	ins += ", grid_status) SELECT c_object_id";
 	for (i = 0; i < attTableVector_.size(); ++i)
 	{
@@ -836,82 +1070,36 @@ TeTheme::populateCollectionAux()
 
 	//attribute restriction
 	if(!generateAttributeRest_.empty())
-		whereClause += " AND "+ generateAttributeRest_; 
+		whereClause += " AND "+ generateAttributeRest_;
 
 	//temporal restriction
 	if(!generateTemporalRest_.empty())
 	{
 		string sqlTemp;
-		initParse(generateTemporalRest_, db); 
-				
+		initParse(generateTemporalRest_, db);
+
 		if(!yyparse(sqlTemp))  //0: accept  1: reject
 			whereClause += " AND "+ sqlTemp;
 		else
 			return false;
 	}
 
-	Keys objs;
-
-	//spatial restriction
-	if(hasSpatialRes_)
-	{
-		//TeRepresentation* rep = layer_->vectRepres()[0];
-		string geomTable = layer_->tableName(geomRepRest_); 
-		
-		if(boxRest_.isValid())
-		{
-			TeBox box = boxRest_;
-			whereClause += " AND "+ db->getSQLBoxWhere(box, geomRepRest_);
-		}
-		else if (geomRest_)
-		{
-			
-			TePrecision::instance().setPrecision(TeGetPrecision(layer()->projection()));
-
-			if(db->spatialRelation(geomTable, geomRepRest_, geomRest_, objs, spatialRelation_))
-			{
-				string obs;
-				for(unsigned int i=0; i<objs.size(); i++)
-				{
-					if(i!=0)
-						obs += ",";
-					obs += "'"+ objs[i] +"'";
-				}
-					
-				whereClause += " AND "+ geomTable +".object_id IN ("+ obs +")";
-			}
-		}
-	}
+	//spatial restriction is already stored in the collection table
 
 	bool usaTemporal = false;
 	for (i = 0; i < attTableVector_.size(); ++i)
 	{
-		if (attTableVector_[i].tableType() == TeAttrExternal ||
-			attTableVector_[i].tableType() == TeFixedGeomDynAttr ||
-			attTableVector_[i].tableType() == TeDynGeomDynAttr)
-		{
-			whereClause += " AND ";
-			whereClause += aliasVector()[i] + "." + attTableVector_[i].uniqueName();
-			whereClause += " IS NOT NULL ";
-		}
 		if (attTableVector_[i].tableType() == TeFixedGeomDynAttr ||
 			attTableVector_[i].tableType() == TeDynGeomDynAttr)
 			usaTemporal = true;
 	}
-	
+	loadThemeTablesJoin();
 	string result = ins + sqlFrom() + whereClause + " ";
-	bool ret = db->execute(result);
-	if(ret == false)
+	if (!objectId.empty() && !whereClause.empty())
+		result += " AND c_object_id = '"+objectId+"'";
+	if (!db->execute(result))
 		return false;
 
-	TeAttribute at;
-	at.rep_.name_ = "unique_id";
-	at.rep_.type_ = TeSTRING;
-	at.rep_.numChar_ = 100;
-	at.rep_.isAutoNumber_ = false;
-	at.rep_.isPrimaryKey_ = true;
-	ret = db->alterTable(collectionAuxTable_, at.rep_);
-
 	if(usaTemporal) // filter collection table
 	{
 		string s = "DELETE FROM " + collectionTable_ + " WHERE c_object_id NOT IN";
@@ -922,15 +1110,15 @@ TeTheme::populateCollectionAux()
 }
 
 
-bool 
-TeTheme::locatePolygon (TeCoord2D &pt, TePolygon &polygon, const double& tol)  
+bool
+TeTheme::locatePolygon (TeCoord2D &pt, TePolygon &polygon, const double& tol)
 {
 	if (!layer()->database() || collectionTable().empty())
 		return false;
 
 	string geomTable = layer()->tableName(TePOLYGONS);
 	string sqlFrom = " "+ geomTable +" INNER JOIN " + collectionTable();
-	sqlFrom += " ON "+ collectionTable() +".c_object_id = "+ geomTable +".object_id "; 
+	sqlFrom += " ON "+ collectionTable() +".c_object_id = "+ geomTable +".object_id ";
 
 	if(!layer()->database()->locatePolygon(sqlFrom, pt, polygon, tol))
 		return false;
@@ -939,15 +1127,15 @@ TeTheme::locatePolygon (TeCoord2D &pt, TePolygon &polygon, const double& tol)
 }
 
 
-bool 
-TeTheme::locatePolygonSet (TeCoord2D &pt, double tol, TePolygonSet &polygons)  
+bool
+TeTheme::locatePolygonSet (TeCoord2D &pt, double tol, TePolygonSet &polygons)
 {
 	if (!layer()->database() || collectionTable().empty())
 		return false;
 
 	string geomTable = layer()->tableName(TePOLYGONS);
 	string sqlFrom = " "+ geomTable +" INNER JOIN " + collectionTable();
-	sqlFrom += " ON "+ collectionTable() +".c_object_id = "+ geomTable +".object_id "; 
+	sqlFrom += " ON "+ collectionTable() +".c_object_id = "+ geomTable +".object_id ";
 
 	if(!layer()->database()->locatePolygonSet(sqlFrom, pt, tol, polygons))
 		return false;
@@ -955,15 +1143,15 @@ TeTheme::locatePolygonSet (TeCoord2D &pt, double tol, TePolygonSet &polygons)
 	return true;
 }
 
-bool 
-TeTheme::locateLine (TeCoord2D &pt, TeLine2D &line, const double& tol)  
+bool
+TeTheme::locateLine (TeCoord2D &pt, TeLine2D &line, const double& tol)
 {
 	if (!layer()->database() || collectionTable().empty())
 		return false;
 
 	string geomTable = layer()->tableName(TeLINES);
 	string sqlFrom = " "+ geomTable +" INNER JOIN " + collectionTable();
-	sqlFrom += " ON "+ collectionTable() +".c_object_id = "+ geomTable +".object_id "; 
+	sqlFrom += " ON "+ collectionTable() +".c_object_id = "+ geomTable +".object_id ";
 
 	if(!layer()->database()->locateLine(sqlFrom, pt, line, tol))
 		return false;
@@ -971,15 +1159,15 @@ TeTheme::locateLine (TeCoord2D &pt, TeLine2D &line, const double& tol)
 	return true;
 }
 
-bool 
-TeTheme::locatePoint (TeCoord2D &pt, TePoint &point, const double& tol)  
+bool
+TeTheme::locatePoint (TeCoord2D &pt, TePoint &point, const double& tol)
 {
 	if (!layer()->database() || collectionTable().empty())
 		return false;
 
 	string geomTable = layer()->tableName(TePOINTS);
 	string sqlFrom = " "+ geomTable +" INNER JOIN " + collectionTable();
-	sqlFrom += " ON "+ collectionTable() +".c_object_id = "+ geomTable +".object_id "; 
+	sqlFrom += " ON "+ collectionTable() +".c_object_id = "+ geomTable +".object_id ";
 
 	if(!layer()->database()->locatePoint(sqlFrom, pt, point, tol))
 		return false;
@@ -987,15 +1175,15 @@ TeTheme::locatePoint (TeCoord2D &pt, TePoint &point, const double& tol)
 	return true;
 }
 
-bool 
-TeTheme::locateCell (TeCoord2D &pt, TeCell &cell, const double&  tol)  
+bool
+TeTheme::locateCell (TeCoord2D &pt, TeCell &cell, const double&  tol)
 {
 	if (!layer()->database() || collectionTable().empty())
 		return false;
 
 	string geomTable = layer()->tableName(TeCELLS);
 	string sqlFrom = " "+ geomTable +" INNER JOIN " + collectionTable();
-	sqlFrom += " ON "+ collectionTable() +".c_object_id = "+ geomTable +".object_id "; 
+	sqlFrom += " ON "+ collectionTable() +".c_object_id = "+ geomTable +".object_id ";
 
 	if(!layer()->database()->locateCell(sqlFrom, pt, cell, tol))
 		return false;
@@ -1004,8 +1192,8 @@ TeTheme::locateCell (TeCoord2D &pt, TeCell &cell, const double&  tol)
 }
 
 //------------------------------ protected methods
-void 
-TeTheme::loadAliasVector()  
+void
+TeTheme::loadAliasVector()
 {
 	unsigned int i, count;
 	TeTable table;
@@ -1032,12 +1220,12 @@ TeTheme::loadAliasVector()
 	}
 }
 
-string 
-TeTheme::sqlGridFrom(const string& geomTable) 
-{ 
+string
+TeTheme::sqlGridFrom(const string& geomTable)
+{
 	if(geomTable.empty())
-		return sqlGridFrom_; 
-	
+		return sqlGridFrom_;
+
 	string result;
 	loadTablesJoin(geomTable);
 	result = sqlGridFrom_;
@@ -1045,70 +1233,17 @@ TeTheme::sqlGridFrom(const string& geomTable)
 	return result;
 }
 
-string 
-TeTheme::sqlWhereRestrictions(TeRepresentation* rep)
+bool
+TeTheme::generateLabelPositions(const std::string& objectId)
 {
-	Keys objs;
-	string whereClause= " 1 = 1 ";
 	TeDatabase* db = layer()->database();
-	
-	// load the first representation 
-	if(!rep)
-		rep = (layer()->vectRepres())[0];
-
-	// temporal restrictions are applied only to temporal tables
-	if(hasTemporalRest())
-	{
-		string result = "";
-		
-		initParse(temporalRest(), db); 
-				
-		if(!yyparse(result))  //0: accept  1: reject
-			whereClause += " AND "+ result;
-		else 
-			return "";
-	}
-			
-	// we should test if the attribute restriction is valid
-	if (hasAttrRest())
-		whereClause += " AND "+ attributeRest();
-
-	// spatial restriction with other geometry representation
-	if (hasSpatialRest() && rep)
-	{
-		if(boxRestriction().isValid())
-		{
-            TeBox b =  boxRestriction();
-            TeGeomRep gRep = rep->geomRep_;
-//			whereClause += " AND "+ db->getSQLBoxWhere(boxRestriction(), rep->geomRep_);
-			whereClause += " AND "+ db->getSQLBoxWhere(b, gRep);
-		}
-		else if(geomRestriction())
-		{
-			string geomTableRest = layer()->tableName(geomRepRestriction());
-			TePrecision::instance().setPrecision(TeGetPrecision(layer()->projection()));
+	if(!db)
+		return false;
 
-			if(db->spatialRelation(geomTableRest, geomRepRestriction(), geomRestriction(),  
-							   objs, spatialRelation()))
-			{
-				string obs;
-				for(unsigned int i=0; i<objs.size(); i++)
-				{
-					if(i!=0)
-						obs += ",";
-					obs += "'"+ objs[i] +"'";
-				}
-				
-				whereClause += " AND "+ rep->tableName_ +".object_id IN ("+ obs +")";
-			}
-		}
-	}
-	return whereClause;
+	return (db->generateLabelPositions(this, objectId));
 }
 
-
-
-void 
+void
 TeTheme::loadTablesJoin(const string& geomTable)  //sqlGridFrom and sqlGridJoin
 {
 	unsigned int i, count;
@@ -1154,7 +1289,7 @@ TeTheme::loadTablesJoin(const string& geomTable)  //sqlGridFrom and sqlGridJoin
             break;
         }
     }
-   
+
     if(!collectionAuxTable_.empty())
     {
         sqlGridFrom_ = " FROM ";
@@ -1185,7 +1320,7 @@ TeTheme::loadTablesJoin(const string& geomTable)  //sqlGridFrom and sqlGridJoin
             {
 				count = tableMMap.count(table.name());
 				if (count == 0)
-					sqlGridFrom_ += " LEFT JOIN " + aliasVec[i];		
+					sqlGridFrom_ += " LEFT JOIN " + aliasVec[i];
 				else
 					sqlGridFrom_ += " LEFT JOIN " + table.name() + " AS " + aliasVec[i];
 
@@ -1197,15 +1332,15 @@ TeTheme::loadTablesJoin(const string& geomTable)  //sqlGridFrom and sqlGridJoin
                 sqlGridFrom_ += " LEFT JOIN " + aliasVec[i];
                 sqlGridFrom_ += " ON " + collectionAuxTable_ + ".aux" + Te2String(numAux++) +" = "+ aliasVec[i] +"."+ table.uniqueName() +")";
             }
-           
+
             sqlGridJoin_ += aliasVec[i] + ".*,";
         }
 
         sqlGridJoin_ += collectionTable_ + ".*, " +  collectionAuxTable_ + ".* " + sqlGridFrom_;
     }
-    loadThemeTablesJoin();
-}
 
+	loadThemeTablesJoin();
+ }
 
 void TeTheme::loadThemeTablesJoin()  ////sqlJoin and sqlFrom
 {
@@ -1238,12 +1373,12 @@ void TeTheme::loadThemeTablesJoin()  ////sqlJoin and sqlFrom
 			{
 				count = tableMMap.count(table.name());
 				if (count == 0)
-					sqlFrom_ += " LEFT JOIN " + aliasVector_[i];		
+					sqlFrom_ += " LEFT JOIN " + aliasVector_[i];
 				else
 					sqlFrom_ += " LEFT JOIN " + table.name() + " AS " + aliasVector_[i];
 
 				tableMMap.insert(multimap<string,int>::value_type(table.name(), ++count));
-				
+
 				sqlFrom_ += " ON " + table.relatedTableName() + "." + table.relatedAttribute() + " = ";
 				sqlFrom_ +=  aliasVector_[i] + "." + table.linkName() + ")";
 			}
@@ -1284,10 +1419,11 @@ void TeTheme::loadThemeTablesJoin()  ////sqlJoin and sqlFrom
 			sqlJoin_ += sqlFrom_;
 		}
 	}
+	return;
 }
 
-void 
-TeTheme::loadAttrLists()  
+void
+TeTheme::loadAttrLists()
 {
 	// Set the new list of attributes of all the theme tables and its new numerical list,
 	unsigned int i, j, count;
@@ -1305,13 +1441,13 @@ TeTheme::loadAttrLists()
 	for (i = 0; i < attTableVector_.size(); ++i)
 	{
 		table = attTableVector_[i];
-
 		// Set the map of attribute names
-		TeAttributeList attrList;
-		db->getAttributeList(table.name(), attrList);
-		for (j = 0; j < attrList.size(); ++j)
+		if(table.attributeList().empty())
+			db->getAttributeList(table.name(), table.attributeList());
+
+		for (j = 0; j < table.attributeList().size(); ++j)
 		{
-			attrName = attrList[j].rep_.name_; 
+			attrName = table.attributeList()[j].rep_.name_;
 			count = attrMMap.count(attrName);
 			attrMMap.insert(multimap<string,int>::value_type(attrName, ++count));
 		}
@@ -1321,12 +1457,13 @@ TeTheme::loadAttrLists()
 	// of the theme tables
 	for (i = 0; i < attTableVector_.size(); ++i)
 	{
-		TeAttributeList attrList;
 		table = attTableVector_[i];
-		db->getAttributeList(table.name(), attrList);
+		TeAttributeList attrList=table.attributeList();
+		if(attrList.empty())
+			db->getAttributeList(table.name(), attrList);
 		for (j = 0; j < attrList.size(); ++j)
 		{
-			attrName = attrList[j].rep_.name_; 
+			attrName = attrList[j].rep_.name_;
 			count = attrMMap.count(attrName);
 			if (count == 1)
 				attrList[j].rep_.name_ = attrName;
@@ -1334,7 +1471,7 @@ TeTheme::loadAttrLists()
 				attrList[j].rep_.name_ = aliasVector_[i] + "." + attrName;
 
 			sqlAttList_.push_back(attrList[j]);
-		}		
+		}
 	}
 
 	// Set the list of attribute names that contains all the numeric attribute names
@@ -1346,66 +1483,240 @@ TeTheme::loadAttrLists()
 	}
 }
 
-bool
-TeTheme::saveLegendInCollection(TeSelectedObjects selectedObjects)   //colocar o count por grupo
+void
+TeTheme::setLegendsForObjects()
 {
-	unsigned int i;
-	if(!grouping_)
-		return false; 
+	if(grouping_.groupMode_ == TeNoGrouping || attTableVector_.empty())
+		return;
 
-	TeAttrDataType		type = grouping_->groupAttribute_.type_;
-	TeLegendEntryVector legVec = legend_;
-	string			groupingAttr = grouping_->groupAttribute_.name_;
-	
-	string input;
-	if(selectedObjects == TeSelectedByPointing)
-	{
-		input = " WHERE (grid_status = 1 OR grid_status = 3";
-		input += " OR (grid_status IS NULL AND (c_object_status = 1 OR c_object_status = 3)))";
-	}
-	else if(selectedObjects == TeNotSelectedByPointing)
-	{
-		input = " WHERE (grid_status = 0 OR grid_status = 2";
-		input += " OR (grid_status is null AND (c_object_status = 0 OR c_object_status = 2)))";
-	}
-	else if(selectedObjects == TeSelectedByQuery)
-	{
-		input = " WHERE (grid_status = 2 OR grid_status = 3";
-		input += " OR (grid_status is null AND (c_object_status = 2 OR c_object_status = 3)))";
-	}
-	else if(selectedObjects == TeNotSelectedByQuery)
-	{
-		input = " WHERE (grid_status = 0 OR grid_status = 1";
-		input += " OR (grid_status is null AND (c_object_status = 0 OR c_object_status = 1)))";
-	}
-	else if(selectedObjects == TeGrouped)
-		input = " WHERE c_legend_id <> 0";
-	else if(selectedObjects == TeNotGrouped)
-		input = " WHERE c_legend_id = 0";
-	
+	unsigned int i, j;
+	string func, query, oid, val;
 
-	string func;
-	if(grouping_->groupFunction_.empty())
-		func = " MIN";
+	TeDatabase *db = layer_->database();
+	TeDatabasePortal* portal = db->getPortal();
+
+	TeAttrDataType type = grouping_.groupAttribute_.type_;
+	string	groupingAttr = grouping_.groupAttribute_.name_;
+
+	vector<string> oidVec;
+	vector<string> oidWithNullValVec;
+	vector<string> valVec;
+	map<int, set<string> > legObjSetMap;
+
+	objLegendMap_.clear();
+
+	if(grouping_.groupFunction_.empty())
+		func = "MIN";
 	else
-		func = grouping_->groupFunction_;
+		func = grouping_.groupFunction_;
 
-	if(grouping_->groupFunction_ == "COUNT")
+	if(grouping_.groupFunction_ == "COUNT")
 		type = TeINT;
 
-	string query = "SELECT MIN(" + collectionTable_ + ".c_object_id)";
-	if(grouping_->groupNormAttribute_.empty())
-		query += ", "+ func +"(" + groupingAttr + ")" + sqlGridFrom();
-	else
-		query += ", "+ func +"(" + groupingAttr + ") / "+ func +"(" + grouping_->groupNormAttribute_ + ")" + sqlGridFrom();
-	
+	query = "SELECT MIN(" + attTableVector_[0].uniqueName() + ")";
+	query += ", " + func + "(" + groupingAttr + ")" + sqlFrom_;
+	query += " GROUP BY " + attTableVector_[0].uniqueName();
+
+	if(portal->query(query) == false)
+	{
+		delete portal;
+		return;
+	}
+
+	while(portal->fetchRow())
+	{
+		oid = portal->getData(0);
+		val = portal->getData(1);
+		if (val.empty() == false)
+		{
+			oidVec.push_back(oid);
+			valVec.push_back(val);
+		}
+		else
+			oidWithNullValVec.push_back(oid);
+	}
+
+	unsigned int legSize = legend_.size();
+	if(grouping_.groupNullAttr_ && oidWithNullValVec.size() > 0)
+		--legSize;
+
+	if (grouping_.groupMode_ == TeUniqueValue)
+	{
+		for (i = 0; i < oidVec.size(); ++i)
+		{
+			oid = oidVec[i];
+			val = valVec[i];
+
+			if(type == TeREAL)
+				val = Te2String(atof(val.c_str()), grouping_.groupPrecision_);
+			else if(type == TeINT)
+				val = Te2String(atoi(val.c_str()));
+
+			for(j = 0; j < legSize; ++j)
+			{
+				TeLegendEntry& leg = legend_[j];
+				if(val == leg.from())
+				{
+					objLegendMap_[oid] = leg.id();
+					set<string>& oidSet = legObjSetMap[leg.id()];
+					oidSet.insert(oid);
+					break;
+				}
+			}
+		}
+	}
+	else
+	{
+		for (i = 0; i < oidVec.size(); ++i)
+		{
+			double dVal, dFrom, dTo;
+			oid = oidVec[i];
+			val = valVec[i];
+
+			if (type == TeREAL)
+				val = Te2String(atof(val.c_str()), grouping_.groupPrecision_);
+
+			for (j = 0; j < legSize; ++j)
+			{
+				TeLegendEntry& leg = legend_[j];
+				if (leg.from().find("mean") != string::npos)
+					continue;
+
+				dVal  = atof(val.c_str());
+				dFrom = atof(leg.from().c_str());
+				dTo = atof(leg.to().c_str());
+
+				if (j < (legSize - 1))
+				{
+					if(dVal >= dFrom && dVal < dTo)
+					{
+						objLegendMap_[oid] = leg.id();
+						set<string>& oidSet = legObjSetMap[leg.id()];
+						oidSet.insert(oid);
+						break;
+					}
+				}
+				else
+				{
+					if(dVal >= dFrom && dVal <= dTo)
+					{
+						objLegendMap_[oid] = leg.id();
+						set<string>& oidSet = legObjSetMap[leg.id()];
+						oidSet.insert(oid);
+						break;
+					}
+				}
+			}
+		}
+	}
+	delete portal;
+
+	// Set the leg id for the objects with null values
+	int legId = defaultLegend_.id();
+	if (grouping_.groupNullAttr_)
+		legId = legend_[legend_.size() - 1].id();
+
+	for (i = 0; i < oidWithNullValVec.size(); ++i)
+	{
+		oid = oidWithNullValVec[i];
+		objLegendMap_[oid] = legId;
+		set<string>& oidSet = legObjSetMap[legId];
+		oidSet.insert(oid);
+	}
+
+/*
+	// Insert the legends in the te_legend table
+	map<int, set<string> >::iterator mapIt;
+	set<string>::iterator setIt;
+	unsigned char *data;
+	string where = " theme_id = " + Te2String(id());
+	for (mapIt = legObjSetMap.begin(); mapIt != legObjSetMap.end(); ++mapIt)
+	{
+		legId = mapIt->first;
+		set<string>& oidSet = mapIt->second;
+		string whereClause = where;
+		whereClause +=  " AND legend_id = " + Te2String(legId);
+		string objStr;
+		for (setIt = oidSet.begin(); setIt != oidSet.end(); ++setIt)
+			objStr += *setIt + ';';
+		data = (unsigned char*)objStr.c_str();
+		db->insertBlob("te_legend", "object_list", whereClause, data, objStr.size());
+	}
+*/
+}
+
+void
+TeTheme::setOwnLegendsForObjects()
+{
+
+}
+
+bool
+TeTheme::saveLegendInCollection(TeSelectedObjects selectedObjects, std::string objectId)
+{
+	return saveLegendInCollection(layer()->database(), selectedObjects, objectId);
+}
+
+bool
+TeTheme::saveLegendInCollection(TeDatabase* db, TeSelectedObjects selectedObjects, std::string objectId)
+{
+	unsigned int i;
+	if(!db || grouping_.groupMode_ == TeNoGrouping)
+		return false;
+
+	TeAttrDataType		type = grouping_.groupAttribute_.type_;
+	TeLegendEntryVector legVec = legend_;
+	string			groupingAttr = grouping_.groupAttribute_.name_;
+
+	string input;
+	if(selectedObjects == TeSelectedByPointing)
+	{
+		input = " WHERE (grid_status = 1 OR grid_status = 3";
+		input += " OR (grid_status IS NULL AND (c_object_status = 1 OR c_object_status = 3)))";
+	}
+	else if(selectedObjects == TeNotSelectedByPointing)
+	{
+		input = " WHERE (grid_status = 0 OR grid_status = 2";
+		input += " OR (grid_status is null AND (c_object_status = 0 OR c_object_status = 2)))";
+	}
+	else if(selectedObjects == TeSelectedByQuery)
+	{
+		input = " WHERE (grid_status = 2 OR grid_status = 3";
+		input += " OR (grid_status is null AND (c_object_status = 2 OR c_object_status = 3)))";
+	}
+	else if(selectedObjects == TeNotSelectedByQuery)
+	{
+		input = " WHERE (grid_status = 0 OR grid_status = 1";
+		input += " OR (grid_status is null AND (c_object_status = 0 OR c_object_status = 1)))";
+	}
+	else if(selectedObjects == TeGrouped)
+		input = " WHERE c_legend_id <> 0";
+	else if(selectedObjects == TeNotGrouped)
+		input = " WHERE c_legend_id = 0";
+
+
+	string func;
+	if(grouping_.groupFunction_.empty())
+		func = " MIN";
+	else
+		func = grouping_.groupFunction_;
+
+	if(grouping_.groupFunction_ == "COUNT")
+		type = TeINT;
+
+	string query = "SELECT MIN(" + collectionTable_ + ".c_object_id)";
+	if(grouping_.groupNormAttribute_.empty())
+		query += ", "+ func +"(" + groupingAttr + ")" + sqlGridFrom();
+	else
+		query += ", "+ func +"(" + groupingAttr + ") / "+ func +"(" + grouping_.groupNormAttribute_ + ")" + sqlGridFrom();
+
 	if(selectedObjects != TeAll)
 		query += input;
 
 	query += " GROUP BY " + collectionTable_ + ".c_object_id";
 
 	map<int, vector<string> > legMap;
-	TeDatabase *db = layer()->database();
+
 	TeDatabasePortal* portal = db->getPortal();
 	if(portal->query(query) == false)
 	{
@@ -1428,7 +1739,7 @@ TeTheme::saveLegendInCollection(TeSelectedObjects selectedObjects)   //colocar o
 		else
 			nullIdVec.push_back(oid);
 	}
-	if (grouping_->groupMode_ == TeUniqueValue)
+	if (grouping_.groupMode_ == TeUniqueValue)
 	{
 		unsigned int j = 0;
 		while( j < idVec.size())
@@ -1438,16 +1749,16 @@ TeTheme::saveLegendInCollection(TeSelectedObjects selectedObjects)   //colocar o
 			if(type == TeREAL)
 			{
 				double a = atof(val.c_str());
-				val = Te2String(a, grouping_->groupPrecision_);
+				val = Te2String(a, grouping_.groupPrecision_);
 			}
 			else if(type == TeINT)
 			{
 				int a = atoi(val.c_str());
 				val = Te2String(a);
 			}
-				
+
 			unsigned int siz = legend_.size();
-			if (nullIdVec.size())
+			if(grouping_.groupNullAttr_ && nullIdVec.size() > 0)
 				--siz;
 			for(i=0; i < siz; i++)
 			{
@@ -1471,16 +1782,16 @@ TeTheme::saveLegendInCollection(TeSelectedObjects selectedObjects)   //colocar o
 			if(type == TeREAL)
 			{
 				double a = atof(val.c_str());
-				val = Te2String(a, grouping_->groupPrecision_);
+				val = Te2String(a, grouping_.groupPrecision_);
 			}
-			
+
 			unsigned int siz = legend_.size();
-			if (nullIdVec.size())
-				--siz;
+			if(grouping_.groupNullAttr_ && !nullIdVec.empty())
+               --siz;
 			for(i=0; i < siz; i++)
 			{
 				TeLegendEntry& leg = legend_[i];
-				int f = leg.from().find("mean", string::npos);
+				int f = leg.from().find("mean");
 				if(f >= 0)
 					continue;
 				double dval = atof(val.c_str());
@@ -1508,7 +1819,9 @@ TeTheme::saveLegendInCollection(TeSelectedObjects selectedObjects)   //colocar o
 	}
 	delete portal;
 
-	int legId = legend_[legend_.size()-1].id();
+	int legId = defaultLegend_.id();
+	if (grouping_.groupNullAttr_)
+		legId = legend_[legend_.size()-1].id();
 	for(i = 0; i < nullIdVec.size(); ++i)
 	{
 		string oid = nullIdVec[i];
@@ -1528,7 +1841,7 @@ TeTheme::saveLegendInCollection(TeSelectedObjects selectedObjects)   //colocar o
 		else
 			nChunks = size / chunkSize;
 
-		j = 0;		
+		j = 0;
 		for (k = 0; k < nChunks; ++k)
 		{
 			i = 0;
@@ -1545,11 +1858,12 @@ TeTheme::saveLegendInCollection(TeSelectedObjects selectedObjects)   //colocar o
 
 		//--- generateInClause
 
-		for(i=0; i<svec.size(); i++)
+		for(i=0; i<svec.size(); ++i)
 		{
 			string up = "UPDATE " + collectionTable_ + " SET c_legend_id = " + Te2String(it->first);
 			up += " WHERE c_object_id IN " + svec[i];
-
+			if (!objectId.empty())
+				up += " AND c_object_id='"+objectId+"'";
 			if(db->execute(up) == false)
 				continue;
 		}
@@ -1560,12 +1874,12 @@ TeTheme::saveLegendInCollection(TeSelectedObjects selectedObjects)   //colocar o
 		visibleRep_ = visibleRep_ | 0x40000000;
 	else
 		visibleRep_ = visibleRep_ | 0xbfffffff;
-	string upVis = "UPDATE te_theme SET visible_rep=" + Te2String(visibleRep_) + " WHERE theme_id=" + Te2String(id_);
+	string upVis = "UPDATE te_theme SET visible_rep=" + Te2String(visibleRep_) + " WHERE theme_id=" + Te2String(id());
 	return (db->execute(upVis));
 }
 
-bool 
-TeTheme::populateCollection()  
+bool
+TeTheme::populateCollection(std::string objectId)
 {
 	TeDatabase* db = layer_->database();
 	if(!db || collectionTable_.empty())
@@ -1573,42 +1887,42 @@ TeTheme::populateCollection()
 
 	if(attTableVector_.empty())
 		attTableVector_ = layer_->attrTables();
-	
-//	TeRepresentation* rep = layer_->vectRepres()[0];
+
 	TeRepresPointerVector& represVec = layer_->vectRepres();
 	for (unsigned int i = 0; i < represVec.size(); ++i)
 	{
 		TeRepresentation* rep = represVec[i];
-		if (rep->geomRep_ == TeTEXT)
+		if(rep->geomRep_ == TeTEXT)
 			continue;
 
-		string geomTable = layer_->tableName(rep->geomRep_); 
+		string geomTable = layer_->tableName(rep->geomRep_);
 
 		string sqlSelect, sqlFrom, sqlWhere;
-		
-		sqlSelect = " SELECT DISTINCT "+ geomTable +".object_id ";  
+
+		sqlSelect = " SELECT DISTINCT "+ geomTable +".object_id ";
 		sqlFrom = tableJoin(attTableVector_, geomTable, "object_id");
-		
-//		sqlWhere = " WHERE 1=1 ";
-		sqlWhere = " WHERE " + geomTable + ".object_id NOT IN (SELECT c_object_id FROM " + collectionTable_ + ")";
-		
+
+		sqlWhere  = " WHERE NOT EXISTS (SELECT * FROM " + collectionTable_;
+		sqlWhere += " WHERE "+ collectionTable_ +".c_object_id = "+ geomTable +".object_id )";
+		sqlWhere += " AND " + geomTable + ".object_id IS NOT NULL ";
+
 		//attribute restriction
 		if(!generateAttributeRest_.empty())
-			sqlWhere += " AND "+ generateAttributeRest_; 
+			sqlWhere += " AND ("+ generateAttributeRest_ +" )";
 
 		//temporal restriction
 		if(!generateTemporalRest_.empty())
 		{
 			string sqlTemp;
-			initParse(generateTemporalRest_, db); 
-					
+			initParse(generateTemporalRest_, db);
+
 			if(!yyparse(sqlTemp))  //0: accept  1: reject
 				sqlWhere += " AND "+ sqlTemp;
 			else
 				return false;
 		}
 
-		Keys objs;
+		TeKeys objs;
 
 		//spatial restriction
 		if(hasSpatialRes_)
@@ -1631,7 +1945,7 @@ TeTheme::populateCollection()
 							obs += ",";
 						obs += "'"+ objs[i] +"'";
 					}
-						
+
 					sqlWhere += " AND "+ geomTable +".object_id IN ("+ obs +")";
 				}
 			}
@@ -1640,64 +1954,569 @@ TeTheme::populateCollection()
 		//populate the collection table
 		string popule;
 		popule = " INSERT INTO "+ collectionTable_ +" (c_object_id) ";
-		popule += sqlSelect +" FROM "+ sqlFrom + sqlWhere; 	
-		
+		popule += sqlSelect +" FROM "+ sqlFrom + sqlWhere;
+		if (!objectId.empty())
+		{
+			if (sqlWhere.length())
+				popule += " AND ";
+			popule += geomTable +".object_id='" +objectId+ "'";
+		}
+
 		if (!db->execute(popule))
-			return false;
+		{
+			//Treats an error in the MySQL database system
+			//Error: 1062 SQLSTATE: 23000 (ER_DUP_ENTRY)
+			//Message: Duplicate entry '%s' for key %d
+			if(db->dbmsName() != "MySQL" || db->errorNum()!=1062)
+                return false;
+		}
 	}
 
 //	int defaultLegend = defaultLegend_.id();
 	string popule = "UPDATE " + collectionTable_;
 	popule += " SET c_legend_id=0, c_legend_own=0, c_object_status=0 ";
-	
+
+	if (!objectId.empty())
+		popule += " WHERE c_object_id='"+objectId+"'";
+
 	if (!db->execute(popule))
 		return false;
 
+	themeBox_= getThemeBox();
 	return true;
 }
 
+bool TeTheme::hasObjectsWithoutGeometries(TeGeomRep geomRep)
+{
+	if(!layer() || !layer()->database())
+		return true;
 
-void TeTheme::createRasterVisual(TeRaster* rst)
+	//get the geometry table
+	string geomTable = layer()->tableName(geomRep);
+	if(geomTable.empty())
+		return true;
+
+	TeDatabasePortal* portal = layer()->database()->getPortal();
+	if(!portal)
+		return true;
+
+	//Verify the collection table or attribute tables
+	if(layer()->database()->tableExist(collectionTable()))
+	{
+		string s = " SELECT COUNT(*) ";
+		s+= " FROM "+  collectionTable();
+		s+= " WHERE NOT EXISTS ";
+		s+= " (SELECT * FROM "+ geomTable;
+		s+= " WHERE "+ collectionTable() +".c_object_id ";
+		s+= " = "+ geomTable +".object_id ) ";
+
+		if(!portal->query(s) || !portal->fetchRow())
+		{
+			delete portal;
+			return true;
+		}
+
+		int numObjs = atoi(portal->getData(0));
+		if(numObjs>0)
+		{
+			delete portal;
+			return true;
+		}
+	}
+	else
+	{
+		//for each static table
+		for(unsigned int i=0; i<this->attrTables().size(); ++i)
+		{
+			if(	this->attrTables()[i].tableType() == TeAttrExternal ||
+				this->attrTables()[i].tableType() == TeAttrMedia ||
+				this->attrTables()[i].tableType() == TeGeocodingData)
+				continue;
+
+			string s = " SELECT COUNT(*) ";
+			s+= " FROM "+  attrTables()[i].name();
+			s+= " WHERE NOT EXISTS ";
+			s+= " (SELECT * FROM "+ geomTable;
+			s+= " WHERE "+ attrTables()[i].name() +"."+ attrTables()[i].linkName();
+			s+= " = "+ geomTable +".object_id ) ";
+
+			if(!portal->query(s) || !portal->fetchRow())
+			{
+				delete portal;
+				return true;
+			}
+
+			int numObjs = atoi(portal->getData(0));
+			if(numObjs>0)
+			{
+				delete portal;
+				return true;
+			}
+		}
+	}
+
+	delete portal;
+	return false;
+}
+
+bool TeTheme::removeObjectsWithoutGeometries(TeGeomRep geomRep)
 {
-	if (rasterVisual_)
-		delete rasterVisual_;
+	if(!layer() || !layer()->database() || !layer()->database()->tableExist(collectionTable()))
+		return true;
 
-	if (!rst)
-		rst = layer_->raster();
+	//get the geometry table
+	string geomTable = layer()->tableName(geomRep);
+	if(geomTable.empty())
+		return true;
 
-	if (!rst)
-		return;
+	string del = " DELETE FROM "+ collectionTable();
+	del += " WHERE NOT EXISTS ";
+	del += " (SELECT * FROM "+ geomTable;
+	del += " WHERE "+ collectionTable() +".c_object_id = ";
+	del += geomTable +".object_id) ";
 
-	rasterVisual_ = new TeRasterTransform();
-										
-	if (rst->params().photometric_[0] == TeRASTERPALETTE || // raster palette -> uses its palette
-	    rst->params().photometric_[0] == TeRASTERTHEMATIC) 
+	if(!layer()->database()->execute(del))
+		return false;
+
+	del = " DELETE FROM "+ collectionAuxTable();
+	del += " WHERE NOT EXISTS ";
+	del += " (SELECT * FROM "+ geomTable;
+	del += " WHERE "+ collectionAuxTable() +".object_id = ";
+	del += geomTable +".object_id) ";
+
+	if(!layer()->database()->execute(del))
+		return false;
+
+	return true;
+}
+
+bool
+TeTheme::save()
+{
+	TeDatabase* db = layer()->database();
+	if(!db)
+		return false;
+
+	//insert theme in database
+	if(id()==0)
 	{
-		rasterVisual_->setTransfFunction(&TeRasterTransform::Pallete2ThreeBand);
-		rasterVisual_->setLutSize(rst->params().lutr_.size());
-		return;
+		if(!db->insertTheme(this)) //updateThemeTable
+		{
+			db->deleteTheme(this->id());
+			return false;
+		}
 	}
 
-	if (visibleRep_ & 0x40000000 && grouping_ &&		// sliced raster -> generate the
-		grouping_->groupMode_ == TeRasterSlicing)	// appropriate palette
+    if(useCollection_)
+    {
+	    //collection table
+	    if(collectionTable().empty())
+		    collectionTable("te_collection_"+ Te2String(id()));
+
+	    if(!db->createCollectionTable(collectionTable_))
+	    {
+		    db->deleteTheme(this->id());
+		    return false;
+	    }
+
+	    //collection aux table
+	    collectionAuxTable(collectionTable() + "_aux");
+	    addThemeTable(collectionAuxTable());
+
+	    if(!createCollectionAuxTable())
+	    {
+		    db->deleteTheme(this->id());
+		    return false;
+	    }
+    }
+
+	return true;
+}
+
+set<string> TeTheme::getObjects(TeSelectedObjects selectedObjects)
+{
+	if (selectedObjects == TeAll)
 	{
-		int band = atoi(grouping_->groupAttribute_.name_.c_str());
-		rasterVisual_->setSrcBand(band);
-		if (rst->params().dataType_[band] != TeUNSIGNEDCHAR)
-			rasterVisual_->generateLUT(legend_, 1024, defaultLegend_.visual(TePOLYGONS).color());
+		if (objectSet_.empty() == false)
+			return objectSet_;
 		else
-			rasterVisual_->generateLUT(legend_, 256, defaultLegend_.visual(TePOLYGONS).color());
-		rasterVisual_->setTransfFunction(&TeRasterTransform::LUT2ThreeBand);
-		return;
+		{
+			if (attTableVector_.empty())
+				return set<string>();
+
+			// Set the new set of objects
+			if (layer_->hasGeometry(TeRASTER) == false)
+			{
+				TeDatabase *db = layer_->database();
+				TeDatabasePortal* portal = db->getPortal();
+
+				string q = "SELECT " + attTableVector_[0].name() + "." + attTableVector_[0].uniqueName() + sqlFrom();
+				if (portal->query(q) == false)
+				{
+					delete portal;
+					return set<string>();
+				}
+
+				while (portal->fetchRow())
+					objectSet_.insert(portal->getData(0));
+
+				delete portal;
+				return objectSet_;
+			}
+		}
 	}
 
-	if (rst->params().dataType_[0] != TeUNSIGNEDCHAR)	// non unsigned char -> generate linear transformation
-		rasterVisual_->setLinearTransfParameters(rst->params().vmin_[0],rst->params().vmax_[0], 0, 255);
+	set<string> oidSet;
+	map<string, int>::iterator it;
+	string oid;
 
-	if (rst->params().nBands() == 1)				
-		rasterVisual_->setTransfFunction(&TeRasterTransform::Mono2ThreeBand);
-	else
-		rasterVisual_->setTransfFunction(&TeRasterTransform::Band2Band);
+	if (selectedObjects == TeSelectedByPointing)
+	{
+		for (it = objStatusMap_.begin(); it != objStatusMap_.end(); ++it)
+		{
+			oid = it->first;
+			if (objStatusMap_[oid] == TePOINTED || objStatusMap_[oid] == TePOINTED_QUERIED)
+				oidSet.insert(oid);
+		}
+	}
+	else if (selectedObjects == TeNotSelectedByPointing)
+	{
+		oidSet = getObjects();
+		for (it = objStatusMap_.begin(); it != objStatusMap_.end(); ++it)
+		{
+			oid = it->first;
+			if (objStatusMap_[oid] == TePOINTED || objStatusMap_[oid] == TePOINTED_QUERIED)
+				oidSet.erase(oid);
+		}
+	}
+	else if (selectedObjects == TeSelectedByQuery)
+	{
+		for (it = objStatusMap_.begin(); it != objStatusMap_.end(); ++it)
+		{
+			oid = it->first;
+			if (objStatusMap_[oid] == TeQUERIED || objStatusMap_[oid] == TePOINTED_QUERIED)
+				oidSet.insert(oid);
+		}
+	}
+	else if (selectedObjects == TeNotSelectedByQuery)
+	{
+		oidSet = getObjects();
+		for (it = objStatusMap_.begin(); it != objStatusMap_.end(); ++it)
+		{
+			oid = it->first;
+			if (objStatusMap_[oid] == TeQUERIED || objStatusMap_[oid] == TePOINTED_QUERIED)
+				oidSet.erase(oid);
+		}
+	}
+	else if(selectedObjects == TeGrouped)
+	{
+		map<string, int>& objLegendMap = getObjLegendMap();
+		for (it = objLegendMap.begin(); it != objLegendMap.end(); ++it)
+		{
+			string oid = it->first;
+			if (objLegendMap[oid] != 0)
+				oidSet.insert(oid);
+		}
+	}
+	else if(selectedObjects == TeNotGrouped)
+	{
+		oidSet = getObjects();
+		map<string, int>& objLegendMap = getObjLegendMap();
+		for (it = objLegendMap.begin(); it != objLegendMap.end(); ++it)
+			oidSet.erase(it->first);
+	}
+	else if(selectedObjects == TeSelectedByPointingOrQuery)
+	{
+		oidSet = getObjects();
+		for (it = objStatusMap_.begin(); it != objStatusMap_.end(); ++it)
+		{
+			oid = it->first;
+			if (objStatusMap_[oid] == TeQUERIED || objStatusMap_[oid] == TePOINTED)
+				oidSet.insert(oid);
+		}
+	}
+	else if(selectedObjects == TeSelectedByPointingAndQuery )
+	{
+		oidSet = getObjects();
+		for (it = objStatusMap_.begin(); it != objStatusMap_.end(); ++it)
+		{
+			oid = it->first;
+			if (objStatusMap_[oid] == TePOINTED_QUERIED )
+				oidSet.insert(oid);
+		}
+	}
+
+	return oidSet;
+}
+
+vector<string> TeTheme::getItemVector(TeSelectedObjects selectedObjects)
+{
+	vector<string> itemVec;
+
+	//======================================================================================
+	//Get all the items
+	vector<string> allItemVec;
+	string item;
+	unsigned int i;
+
+	if (selectedObjects == TeAll || selectedObjects == TeNotSelectedByPointing ||
+		selectedObjects == TeNotSelectedByQuery)
+	{
+		vector<TeTable> tableVec;
+		getAttTables(tableVec);
+
+		string q = "SELECT ";
+		for (i = 0; i < tableVec.size(); ++i)
+		{
+			if (i != 0)
+				q += ",";
+			q += tableVec[i].uniqueName();
+		}
+		q += sqlFrom();
+
+		TeDatabase* db = layer()->database();
+		TeDatabasePortal* portal = db->getPortal();
+
+		if (portal->query(q) == false)
+		{
+			delete portal;
+			return itemVec;
+		}
+
+		while(portal->fetchRow())
+		{
+			item = portal->getData(tableVec[0].uniqueName());
+			for (i = 1; i < tableVec.size(); ++i)
+				item += portal->getData(tableVec[i].uniqueName());
+			allItemVec.push_back(item);
+		}
+
+		delete portal;
+	}
+
+	//======================================================================================
+	// Get the items according to the selectedObjects variable
+	map<string, int>& itemStatusMap = getItemStatusMap();
+	map<string, int>::iterator it;
+
+	if (selectedObjects == TeAll)
+		return allItemVec;
+	else if(selectedObjects == TeSelectedByPointing)
+	{
+		for (it = itemStatusMap.begin(); it != itemStatusMap.end(); ++it)
+		{
+			item = it->first;
+			if (itemStatusMap[item] == TePOINTED || itemStatusMap[item] == TePOINTED_QUERIED)
+				itemVec.push_back(item);
+		}
+	}
+	else if(selectedObjects == TeNotSelectedByPointing)
+	{
+		for (i = 0; i < allItemVec.size(); ++i)
+		{
+			item = allItemVec[i];
+			if (itemStatusMap[item] == TeDEFAULT || itemStatusMap[item] == TeQUERIED)
+				itemVec.push_back(item);
+
+			if (itemStatusMap[item] == TeDEFAULT)
+				itemStatusMap.erase(item);
+		}
+	}
+	else if(selectedObjects == TeSelectedByQuery)
+	{
+		for (it = itemStatusMap.begin(); it != itemStatusMap.end(); ++it)
+		{
+			item = it->first;
+			if (itemStatusMap[item] == TeQUERIED || itemStatusMap[item] == TePOINTED_QUERIED)
+				itemVec.push_back(item);
+		}
+	}
+	else if(selectedObjects == TeNotSelectedByQuery)
+	{
+		for (i = 0; i < allItemVec.size(); ++i)
+		{
+			item = allItemVec[i];
+			if (itemStatusMap[item] == TeDEFAULT || itemStatusMap[item] == TePOINTED)
+				itemVec.push_back(item);
+
+			if (itemStatusMap[item] == TeDEFAULT)
+				itemStatusMap.erase(item);
+		}
+	}
+	else if(selectedObjects == TeGrouped)
+	{
+		set<string> oidSet;
+		map<string, int>& objLegendMap = getObjLegendMap();
+		for (it = objLegendMap.begin(); it != objLegendMap.end(); ++it)
+		{
+			string oid = it->first;
+			if (objLegendMap[oid] != 0)
+				oidSet.insert(oid);
+		}
+
+		itemVec = getItemVector(oidSet);
+	}
+	else if(selectedObjects == TeNotGrouped)
+	{
+		set<string> oidSet = getObjects();
+		map<string, int>& objLegendMap = getObjLegendMap();
+		for (it = objLegendMap.begin(); it != objLegendMap.end(); ++it)
+			oidSet.erase(it->first);
+
+		itemVec = getItemVector(oidSet);
+	}
+	else if(selectedObjects == TeSelectedByPointingOrQuery )
+	{
+		for (it = itemStatusMap.begin(); it != itemStatusMap.end(); ++it)
+		{
+			item = it->first;
+			if( (itemStatusMap[item] == TePOINTED ) ||
+			  (itemStatusMap[item] == TeQUERIED ) ) {
+
+				itemVec.push_back(item);
+			}
+		}
+	}
+
+	return itemVec;
+}
+
+vector<string> TeTheme::getItemVector(const set<string>& oidSet)
+{
+	vector<string> itemVec;
+	vector<TeTable> tableVec = attrTables();
+	set<string>::const_iterator it;
+	unsigned int i;
+
+	if (tableVec.size() == 1)
+	{
+		for (it = oidSet.begin(); it != oidSet.end(); ++it)
+			itemVec.push_back(*it);
+		return itemVec;
+	}
+
+	// Set the expression that represents the concatenation
+	// of the unique names of each theme table
+	string concatIndexStr;
+	vector<string> indexVec;
+	TeDatabase* db = layer()->database();
+	for (i = 0; i < tableVec.size(); ++i)
+		indexVec.push_back(tableVec[i].name() + "." + tableVec[i].uniqueName());
+
+	concatIndexStr = db->getConcatFieldsExpression(indexVec);
+
+	vector<string> queryVec;
+	string query;
+
+
+	set<string>::const_iterator itB = oidSet.begin();
+	set<string>::const_iterator itE = oidSet.end();
+	vector<string> inClauseVec = generateInClauses(itB, itE, db);
+	for (i = 0; i < inClauseVec.size(); ++i)
+	{
+		query = "SELECT " + tableVec[i].name() + "." + tableVec[i].uniqueName();
+		query += ", " + concatIndexStr + sqlFrom() + " WHERE ";
+		query += tableVec[i].name() + "." + tableVec[i].uniqueName() + " IN " + inClauseVec[i];
+		queryVec.push_back(query);
+	}
+
+	TeDatabasePortal* portal = db->getPortal();
+	for (i = 0; i < queryVec.size(); ++i)
+	{
+		if (i != 0)
+			portal->freeResult();
+
+		if(portal->query(queryVec[i]) == false)
+		{
+			delete portal;
+			return itemVec;
+		}
+
+		while(portal->fetchRow())
+			itemVec.push_back(portal->getData(1));
+	}
+
+	delete portal;
+	return itemVec;
+}
+
+
+set<string> TeTheme::getObjects(const vector<string>& itemVec)
+{
+	set<string> oidSet;
+
+	unsigned int i;
+	TeDatabase* db = layer()->database();
+
+	// Get the vector of tables of the theme
+	vector<TeTable> tableVec;
+	getAttTables(tableVec);
+
+	vector<string> indexVec;
+	for (i = 0; i < tableVec.size(); ++i)
+		indexVec.push_back(tableVec[i].name() + "." + tableVec[i].uniqueName());
+
+	string concatIndexStr = db->getConcatFieldsExpression(indexVec);
+
+	std::vector<string>::const_iterator itemVec_it_begin( itemVec.begin() );
+	std::vector<string>::const_iterator itemVec_it_end( itemVec.end() );
+
+	vector<string> inClauseVec = generateInClauses( itemVec_it_begin,
+    itemVec_it_end, db);
+
+	vector<string> queryVec;
+	string selectClause = "SELECT " + concatIndexStr + ", ";
+	selectClause += tableVec[0].name() + "." + tableVec[0].uniqueName() + " " + sqlFrom();
+
+	for (i = 0; i < inClauseVec.size(); ++i)
+	{
+		string query = selectClause + " WHERE " + concatIndexStr + " IN " + inClauseVec[i];
+		queryVec.push_back(query);
+	}
+
+	TeDatabasePortal *portal = db->getPortal();
+	for (i = 0; i < queryVec.size(); ++i)
+	{
+		if (i != 0)
+			portal->freeResult();
+
+		if (portal->query(queryVec[i]))
+		{
+			while (portal->fetchRow())
+				oidSet.insert(portal->getData(1));
+		}
+	}
+	delete portal;
+
+	return oidSet;
+}
+
+unsigned int
+TeTheme::getNumberOfObjects()
+{
+	int numRows = 0;
+	string s = "SELECT COUNT(*) " + this->sqlFrom();
+	TeDatabasePortal* portal = this->layer()->database()->getPortal();
+	if(portal->query(s) && portal->fetchRow() )
+	{
+		numRows = atoi(portal->getData(0));
+	}
+	delete portal;
+	return numRows;
+}
+
+
+void TeTheme::setUsingCollection(const bool& usingCollection)
+{
+    useCollection_ = usingCollection;
 }
 
+TeProjection*
+TeTheme::getThemeProjection()
+{
+	if (layer_)
+		return layer_->projection();
+	else
+		return 0;
+}
 
diff --git a/src/terralib/kernel/TeTheme.h b/src/terralib/kernel/TeTheme.h
old mode 100644
new mode 100755
index d796320..95c755f
--- a/src/terralib/kernel/TeTheme.h
+++ b/src/terralib/kernel/TeTheme.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,746 +20,432 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeTheme.h
-	This file contains definitions about a theme in TerraLib
+	\brief This file contains definitions about a theme in TerraLib database
 */
 #ifndef  __TERRALIB_INTERNAL_THEME_H
 #define  __TERRALIB_INTERNAL_THEME_H
 
-#include "TeViewNode.h"
+#include "TeAbstractTheme.h"
 #include "TeLayer.h"
-#include "TeLegendEntry.h"
-#include "TeDataTypes.h"
-#include "TeRasterTransform.h"
-
-
-//! This structure is used to store the grouping parameters used in a theme
-struct TeGrouping
-{
-
-	//! Returns the attribute used to group the objects of the theme
-	TeAttributeRep	groupAttribute_;
-	
-	//! Returns the attribute used to normalize a grouping 
-	string	groupNormAttribute_;
-	
-	//! Returns the grouping mode 
-	TeGroupingMode	groupMode_;			
-	
-	//! Returns the number of groups
-	int	groupNumSlices_;	
-	
-	//! Returns the numeric precision used to group objects
-	int	groupPrecision_;
-
-	//! Returns the deviation parameter used to group objects
-	double	groupStdDev_;
-
-	//! Aggregate function
-	string	groupFunction_; 
-
-	//! Show missing data
-	bool	groupNullAttr_; 
-
-	//! Minimum value used to calculate a equal step grouping
-	double groupMinVal_;
-
-	//! Maximum value used to calculate a equal step grouping 
-	double groupMaxVal_;
-
-	//! Constructor
-	TeGrouping(TeAttributeRep att=TeAttributeRep(), const string& normAttr="", 
-				TeGroupingMode gMode=TeEqualSteps, int numSlice=0, int gPrecision=6,  
-				double	gStDev=1.0, const string& func=""): 
-			groupAttribute_(att),
-			groupNormAttribute_(normAttr),
-			groupMode_(gMode),
-			groupNumSlices_(numSlice),
-			groupPrecision_(gPrecision),
-			groupStdDev_(gStDev),
-			groupFunction_(func),
-			groupNullAttr_(false),
-			groupMinVal_(TeMAXFLOAT),
-			groupMaxVal_(TeMINFLOAT)
-			{}
-
-	//! Copy constructor
-	TeGrouping(const TeGrouping& other)
-	{	
-		groupAttribute_		= other.groupAttribute_;
-		groupNormAttribute_	= other.groupNormAttribute_;
-		groupMode_			= other.groupMode_;
-		groupNumSlices_		= other.groupNumSlices_;
-		groupPrecision_		= other.groupPrecision_;
-		groupStdDev_		= other.groupStdDev_;
-		groupFunction_		= other.groupFunction_;
-		groupNullAttr_		= other.groupNullAttr_;
-		groupMinVal_		= other.groupMinVal_;
-		groupMaxVal_		= other.groupMaxVal_;
-	}
-			
-	//! Destructor
-	~TeGrouping() {}
-	
-	TeGrouping& operator= (const TeGrouping& other)
-	{	
-		if ( this != &other )
-		{		
-			groupAttribute_		= other.groupAttribute_;
-			groupNormAttribute_	= other.groupNormAttribute_;
-			groupMode_			= other.groupMode_;
-			groupNumSlices_		= other.groupNumSlices_;
-			groupPrecision_		= other.groupPrecision_;
-			groupStdDev_		= other.groupStdDev_;
-			groupFunction_		= other.groupFunction_;
-			groupNullAttr_		= other.groupNullAttr_;
-			groupNullAttr_		= other.groupNullAttr_;
-			groupMinVal_		= other.groupMinVal_;
-			groupMaxVal_		= other.groupMaxVal_;
-		}
-		return *this;
-	}
-};
 
 using namespace std;
 
 //! TerraLib definition of a Theme
 /*!
-\par A Theme is a collection of objects selected from a TeLayer spatial and non spatial 
-criteria. A theme points to the visual presentation parameters of its objects.
-
-\par A Theme store the parameters about how to group its objects according com its attributes. 
-
-\par A theme may have many associated graphics, which includes histogram, pie charts,
-scatterplots, etc. These graphics are visible only when the theme is visible.
-
-\par A theme has a threshold, that defines the minimum and maximum scales 
-at which the Theme is drawn.
-
-  \sa TeView TeTable
+\par 
+A TeTheme represents a collection of objects selected from a TeLayer. This selection is based
+on restrictions that can be non-spatial (e.g. POP > 10000), spatial (e.g. "inside box(0,0,100,100)
+or temporal. The most simple selection is "all" objects of a layer.
+\par 
+A TeTheme contains the list of attribute tables of the layer used by a theme.
+\par 
+A TeTheme contains the visual presentation parameters for the objects that contains, for
+all of its geometrical representations.
+\par 
+A TeTheme can store the parameters associated to how to separate its objects in groups. 
+\par 
+A TeTheme can store parameters associated to the creation of individual graphs on its objects
+(e.g. pie bars that relate two or more of its attributes).
+\par 
+A TeTheme store the range of scales within it should be visible. 
+\sa TeView TeTable
 */
-class TeTheme: public TeViewNode
+class TL_DLL TeTheme: public TeAbstractTheme
 {
 public:
+	//! Constructor
+    TeTheme( const string& name="", TeLayer* layer=0, TeViewNode* parent=0, const int& view=0, const int& id=0);
 
 	//! Constructor
-    TeTheme( const string& name="", TeLayer* layer=0, TeViewNode* parent = 0, int view=0, int id=0)
-		: TeViewNode(name, parent, view, id, TeTHEME),
-		layer_(layer),
-		generateAttributeRest_(""),
-		generateTemporalRest_(""),
-		hasSpatialRes_(false),
-		geomRest_(0),
-		minScale_(0.0),
-		maxScale_(0.0),
-		visibleRep_(0),
-		enableVisibility_(1),
-		grouping_(0),
-		rasterVisual_(0)
-		{	
-			//default legends
-			TeVisual visp(TePOLYGONS);
-			TeVisual visl(TeLINES);
-			TeVisual vispt(TePOINTS);
-			TeVisual vist(TeTEXT);
-			TeColor	color;
-			color.init(100, 220, 220);
-			visp.color(color);
-			visl.color(color);
-			vispt.color(color);
-			color.init(100, 100, 100);
-			visp.contourColor(color);
-			visl.contourColor(color);
-			vispt.contourColor(color);
-			outOfCollectionLegend_.setVisual(visp, TePOLYGONS);		
-			outOfCollectionLegend_.setVisual(visl, TeLINES);		
-			outOfCollectionLegend_.setVisual(vispt, TePOINTS);		
-
-			color.init(220, 100, 220);
-			visp.color(color);
-			visl.color(color);
-			vispt.color(color);
-			color.init(100, 100, 100);
-			visp.contourColor(color);
-			visl.contourColor(color);
-			vispt.contourColor(color);
-			withoutDataConnectionLegend_.setVisual(visp, TePOLYGONS);		
-			withoutDataConnectionLegend_.setVisual(visl, TeLINES);		
-			withoutDataConnectionLegend_.setVisual(vispt, TePOINTS);		
-
-			color.init(220, 0, 0);
-			visp.color(color);
-			color.init(0, 220, 220);
-			visl.color(color);
-			color.init(220, 90, 180);
-			vispt.color(color);
-			color.init(100, 100, 100);
-			visp.contourColor(color);
-			visl.contourColor(color);
-			vispt.contourColor(color);
-			defaultLegend_.setVisual(visp, TePOLYGONS);		
-			defaultLegend_.setVisual(visl, TeLINES);		
-			defaultLegend_.setVisual(vispt, TePOINTS);		
-			color.init(0, 0, 0);
-			vist.color(color);
-			defaultLegend_.setVisual(vist, TeTEXT);		
-
-				
-			color.init(80, 240, 100);
-			visp.color(color);
-			color.init(100, 100, 100);
-			visp.contourColor(color);
-			pointingLegend_.setVisual(visp, TePOLYGONS);		
-			
-			color.init(210, 210, 0);
-			visp.color(color);
-			color.init(100, 100, 100);
-			visp.contourColor(color);		
-			queryLegend_.setVisual(visp, TePOLYGONS);		
-									
-			color.init(255, 255, 0);
-			visp.color(color);
-			color.init(100, 100, 100);
-			visp.contourColor(color);		
-			queryAndPointingLegend_.setVisual(visp, TePOLYGONS);	
-
-			//layer id
-			if(layer)
-			{
-				layerId_ = layer->id();
-			}
-			else
-				layerId_ = -1;
-		}
+	TeTheme(const TeViewNodeParams& params); 
 
 	//! Copy constructor
-	TeTheme (TeTheme& other) : TeViewNode(other.name(), other.parent(), other.view(), other.id(), TeTHEME) 
-	{
-		layerId_ = other.layerId();
-		layer_ = other.layer();      //the same layer pointer
-		generateAttributeRest_ = other.attributeRest();
-		generateTemporalRest_ = other.temporalRest();
-		generateSpatialRest_ = other.spatialRest(); 
-		spatialRelation_ = other.spatialRelation();
-		hasSpatialRes_ =  other.hasSpatialRest();
-		boxRest_ = other.boxRestriction();
-		geomRest_ = other.geomRestriction(); 
-		geomRepRest_ = other.geomRepRestriction();	
-		minScale_ = other.minScale();
-		maxScale_ = other.maxScale();
-		collectionTable_ = other.collectionTable();
-		collectionAuxTable_ = other.collectionAuxTable();
-		visibleRep_ = other.visibleRep();
-		enableVisibility_ = other.visibility();
-
-		if(grouping_)
-			delete grouping_;
-		grouping_ = 0;
-		if(other.grouping())
-		{
-			grouping_ = new TeGrouping();
-			(*grouping_) = (*other.grouping());
-		}
-
-		legend_ = other.legend();
-		outOfCollectionLegend_ = other.outOfCollectionLegend();
-		withoutDataConnectionLegend_ = other.withoutDataConnectionLegend();	
-		defaultLegend_ = other.defaultLegend ();
-		pointingLegend_ = other.pointingLegend();
-		queryLegend_ = other.queryLegend();
-		queryAndPointingLegend_ = other.queryAndPointingLegend(); 
-		
-		attTableVector_ = other.attrTables();
-		sqlFrom_ =  other.sqlFrom();		
-		sqlJoin_ = other.sqlGridJoin();
-		sqlGridFrom_ = other.sqlGridFrom();
-		sqlGridJoin_ = other.sqlGridJoin();
-		aliasVector_ = other.aliasVector();
-		sqlAttList_ = other.sqlAttList();
-		sqlNumAttList_ = other.sqlNumAttList();		
-	
-		if(rasterVisual_)
-			delete rasterVisual_;
-		rasterVisual_ = 0;
-		if(other.rasterVisual())
-		{
-			rasterVisual_ = new TeRasterTransform();
-			(*rasterVisual_) = (*other.rasterVisual());
-		}
-	}
+	TeTheme (const TeTheme& other);
 
 	//! Destructor
-	~TeTheme () 
-	{ 
-		if (rasterVisual_)
-			delete rasterVisual_;
-		if (grouping_)
-			delete grouping_;
-	}
+	~TeTheme ();
 
 	//! Assignment operator
-	TeTheme& operator= (TeTheme& other); 
-	
+	TeTheme& operator= (const TeTheme& other); 
+
+	/** @name Layer
+		Methods related to the layer that gives origin to this theme.
+	*/
+	//@{	
 	//! Returns the id of the source layer
-	int	 layerId () 
+	virtual int layerId() 
 	{	return layerId_; }
 
 	//! Sets the id of the source layer
-	void layerId(int i)
+	virtual void layerId(int i)
 	{	layerId_ = i; }
 
-	//! Set the source layer
-	/*! \param layer a pointer to a layer from which theme get its objects
+	//! Sets the layer that is the source of objects of the theme
+	/*! 
+		\param layer a pointer to a TeLayer
 	*/
-	void layer (TeLayer* layer)
-	{
-		layer_ = layer;
-		if (layer)
-			layerId_ = layer->id();
-	}
+	virtual void layer(TeLayer* layer);
 
 	//! Returns a pointer to the layer from which the theme get its objects
-	TeLayer* layer () { return layer_; }
-
-	//! Returns TRUE if a theme has lower priority than another
-	bool operator< (const TeTheme& r) const
-	{	return priority_ < r.priority_; }
-
-	//! Returns the minimum scale in which the theme is visible
-	double minScale () { return minScale_; }
-	//! Set the minimum scale in which the theme is visible
-	void minScale (double s) { minScale_ = s; }
-
-	//! Returns the maximum scale in which the theme is visible
-	double maxScale () { return maxScale_; }
-	//! Set the maximum scale in which the theme is visible
-	void maxScale (double s) { maxScale_ = s; }
-
-	//! Returns a vector of theme legends
-	TeLegendEntryVector& legend () { return legend_; }
-
-	//! Returns the attribute restriction (where clause) used to generate the theme  
-	string attributeRest() { return generateAttributeRest_; }
-	//! Set the attribute restriction (where clause) used to generate the theme
-	void attributeRest(const string& s) { generateAttributeRest_ = s; }
-	//! Returns if there is an attribute restriction  
-	bool hasAttrRest () { return (!generateAttributeRest_.empty());}
-
-	//! Returns the temporal restriction used to generate the theme
-	string temporalRest() { return generateTemporalRest_; }
-	//! Set the temporal restriction used to generate the theme
-	void temporalRest(const string& t) { generateTemporalRest_ = t; };
-	//! Returns if there is a temporal restriction 
-	bool hasTemporalRest () { return (!generateTemporalRest_.empty());}
-
-	//! Returns the spatial restriction used to generate the theme
-	string spatialRest() { return generateSpatialRest_; }
-	//! Set the spatial restriction used to generate the theme
-	void spatialRest(const string& s) { generateSpatialRest_ = s; };
-	
-	//! Returns the spatial relation 
-	TeSpatialRelation	spatialRelation() {return spatialRelation_;}
-	//! Sets the spatial relation
-	void spatialRelation(TeSpatialRelation s) {spatialRelation_=s;}
-	
-	//! Returns if there is a spatial restriction 
-	bool hasSpatialRest () { return hasSpatialRes_;}
-	//! Sets if there is a spatial restriction 
-	void hasSpatialRest (bool a) {hasSpatialRes_ = a;}
-	
-	//! Returns the box associated with the spatial restriction
-	TeBox boxRestriction() {return boxRest_;}
-	//! Sets the box associated with the spatial restriction
-	void boxRestriction (TeBox& b) {boxRest_ = b;}
-
-	//! Returns a pointer to the geometry associated with the spatial restriction
-	TeGeometry* geomRestriction() { return geomRest_;}
-	//! Sets a pointer to the geometry associated with the spatial restriction
-	void geomRestriction(TeGeometry* g) {geomRest_ = g;}
-
-	//! Returns the geometry representation of the theme which will be considered in the spatial restriction  
-	TeGeomRep geomRepRestriction() { return geomRepRest_; }
-	//! Sets the geometry representation of the theme which will be considered in the spatial restriction  
-	void geomRepRestriction (TeGeomRep& rep) { geomRepRest_ = rep; }
-
-	//! Set the spatial restriction to be a spatial relation with a box
-	void setSpatialRest(TeBox& box, TeGeomRep rep = TeGEOMETRYNONE, TeSpatialRelation relation = TeWITHIN); 
-	//! Set the spatial restriction to be a spatial relation with a geometry
-	void setSpatialRest(TeGeometry* geom, TeGeomRep rep = TeGEOMETRYNONE, TeSpatialRelation relation = TeWITHIN); 
-	
-	//! Returns the name of a table used to store the ids of the objects belonging to the theme
-	string	collectionTable() { return collectionTable_; }
-	//! Set the name of a table used to store the ids of the objects belonging to the theme
-	void collectionTable(const string& s) { collectionTable_ = s; }
+	virtual TeLayer* layer() { return layer_; }
 
-	//! Return the name of the collection auxiliary table
-	string collectionAuxTable() { return collectionAuxTable_; }
-	//! Set the name of the collection auxiliary table
-	void collectionAuxTable(string name) { collectionAuxTable_ = name; }
+	//! Returns a pointer to a projection that is the spatial reference for the objects of this theme: same as of its layer
+	virtual TeProjection* getThemeProjection();
+	//@}
 
-	//! Set the visible representation 
-	void visibleRep (int rep) { visibleRep_ = rep; }
-	//! Return the visible representation 
-	int visibleRep () { return visibleRep_; }
+	//! Sets the spatial restriction to be a spatial relation with a box
+	virtual void setSpatialRest(TeBox& box, TeGeomRep rep = TeGEOMETRYNONE, TeSpatialRelation relation = TeWITHIN); 
 
-	//! Returns the status of a theme
-	/*! 
-		- Returns 0 if the theme is not visible and not active
-		- Returns 1 if the theme is visible and not active
-		- Returns 2 if theme is and active and not visible
-		- Returns 3 if theme is and visible and active
-	 */
-	int visibility()
-	{	return enableVisibility_; }
-	//! Set whether the theme should be visible and/or active
-	void visibility(int v)
-	{	enableVisibility_ = v; }
-
-
-	//! verify if the theme was generated with restrictions
-	bool hasRestriction() { return (!(generateAttributeRest_.empty() || 
-									  generateTemporalRest_.empty()) && hasSpatialRes_); }
-
-	//! Returns a grouping associated the theme 
-	TeGrouping* grouping() {return grouping_; }
-	
-	//! Sets a grouping associated the theme
-	void grouping(TeGrouping* g);
-	
-	//! Returns the legend (visual presentation) of the layer objects that aren�t selected in this layer
-	TeLegendEntry& outOfCollectionLegend () 
-	{ return outOfCollectionLegend_; } 
-	
-	//! Set the legend (visual presentation) of the layer objects that aren�t selected in this layer
-	void outOfCollectionLegend (TeLegendEntry &leg) 
-	{ outOfCollectionLegend_ = leg;}
-	
-	//! Set the visual of the layer objects that aren�t selected in this layer
-	void setVisualOutOfCollection (TeVisual& visual, TeGeomRep rep)
-	{ outOfCollectionLegend_.setVisual(visual, rep); }
+	//! Sets the spatial restriction to be a spatial relation with a geometry
+	virtual void setSpatialRest(TeGeometry* geom, TeGeomRep rep = TeGEOMETRYNONE, TeSpatialRelation relation = TeWITHIN); 
 
-	//! Returns the legend (visual presentation) of the geometries without descriptive attributes
-	TeLegendEntry& withoutDataConnectionLegend () 
-	{ return withoutDataConnectionLegend_; }
+	//! Returns the clause WHERE derived from the combination of all restricitions (spatial, attribute and temporal)
+	virtual string sqlWhereRestrictions(TeRepresentation* rep=0);
 
-	//! Set the legend (visual presentation) of the geometries without descriptive attributes
-	void withoutDataConnectionLegend (TeLegendEntry &leg) 
-	{ withoutDataConnectionLegend_ = leg; }
+	//! Creates an appropriate visual presentation to the raster of the theme
+    virtual void createRasterVisual(TeRaster* rst=0);
 
-	//! Set the visualof the geometries without descriptive attributes
-	void setVisualWithoutDataConnection (TeVisual& visual, TeGeomRep rep)
-	{ withoutDataConnectionLegend_.setVisual(visual, rep); }
+	/** @name Collection
+		Methods related to the materialization in the database of the theme as a collection of objects 
+	*/
+	//@{
+	//! Returns the name of a table used to store the ids of the objects belonging to the theme
+	virtual string	collectionTable() { return collectionTable_; }
 
-	//! Returns the default legend (visual presentation) objects of the theme
-	TeLegendEntry& defaultLegend () 
-	{ return defaultLegend_; }
-	
-	//! Set the default legend (visual presentation) objects of the theme
-	void defaultLegend (TeLegendEntry& leg) 
-	{ defaultLegend_ = leg; }
+	//! Sets the name of a table used to store the ids of the objects belonging to the theme
+	virtual void collectionTable(const string& s) { collectionTable_ = s; }
 
-	//! Set the default visual of the objects of the theme
-	void setVisualDefault (TeVisual& visual, TeGeomRep rep)
-	{ defaultLegend_.setVisual(visual, rep); }
-	
-	//! Returns the legend (visual presentation) of the theme objects selected by pointing
-	TeLegendEntry& pointingLegend () 
-	{ return pointingLegend_; }
-	
-	//! Set the legend (visual presentation) of the theme objects selected by pointing
-	void pointingLegend (TeLegendEntry &leg) 
-	{ pointingLegend_ = leg; }
+	//! Returns the name of the collection auxiliary table
+	virtual string collectionAuxTable() { return collectionAuxTable_; }
 
-	//! Set the visual of the theme objects selected by pointing
-	void setVisualPointing (TeVisual& visual, TeGeomRep rep)
-	{ pointingLegend_.setVisual(visual, rep); }
+	//! Sets the name of the collection auxiliary table
+	virtual void collectionAuxTable(string name) { collectionAuxTable_ = name; }
 
-	//! Returns the legend (visual presentation) of the theme objects selected by a query
-	TeLegendEntry& queryLegend () 
-	{ return queryLegend_; }
-	
-	//! Set the legend (visual presentation) of the theme objects selected by a query
-	void queryLegend (TeLegendEntry &leg) 
-	{ queryLegend_ = leg; }
+	//! Generates a optimized position (x,y) in the spatial extention of each object to position label ou graphs
+	virtual bool generateLabelPositions(const std::string& objectId = ""); 
 
-	//! Set the visual of the theme objects selected by a query
-	void setVisualQuery (TeVisual& visual, TeGeomRep rep)
-	{ queryLegend_.setVisual(visual, rep); }
+	//! Fills the sqlGridJoin_ and sqlGridFrom_ statements according to the status of the database
+	virtual void loadTablesJoin(const string& geomTable="");
 
-	//! Returns the legend (visual presentation) of the theme objects selected by query and pointing
-	TeLegendEntry& queryAndPointingLegend () 
-	{ return queryAndPointingLegend_; }
-	
-	//! Set the legend (visual presentation) of the theme objects selected by query and pointing
-	void queryAndPointingLegend (TeLegendEntry &leg) 
-	{ queryAndPointingLegend_ = leg; }
+	/**
+		Returns a SQL JOIN statement to get all the attributes of the theme objects, 
+	    the attributes of the collection table, and the attributes of the extended 
+		collection table 
+	**/
+	virtual string sqlGridJoin() { return sqlGridJoin_; }
 
-	//! Set the visual of the theme objects selected by query and pointing
-	void setVisualQueryAndPointing (TeVisual& visual, TeGeomRep rep)
-	{ queryAndPointingLegend_.setVisual(visual, rep); }
+	/** Returns a FROM clause of a SQL statement to get attributes of the theme objects, the attributes of the 
+	collection table, and the attributes of the extended collection table 
+	**/
+	virtual string sqlGridFrom(const string& geomTable=""); 
 
-	//! Set the n-th grouping visual to a geometric representation
-	bool setGroupingVisual(int n, TeVisual& visual, TeGeomRep rep);
+	//! Build the theme collection: materializes the selection described in the theme in a collection table
+	virtual bool buildCollection(std::string objectId = "");
 
-	//! Set the n-th grouping visual of a particular group
-	bool setGroupingVisual(int n, TeGeomRepVisualMap& vismap);
+	//! Create the auxiliar collection table used to represent objects with multiple versions in time  
+	virtual bool createCollectionAuxTable();
 
-	//! get the grouping slices from the legends without visual
-	TeSliceVector getSlices();
+	//! Populate the auxiliar collection table used to represent objects with multiple versions in time
+	virtual bool populateCollectionAux(std::string objectId = "");
+	//@}
 
-	//! Returns a vector of the attribute tables of the theme
-	bool getAttTables(TeAttrTableVector& attrs, TeAttrTableType attType = TeAllAttrTypes); 
+	//! Checks if the theme is update. If FALSE, the theme may be not be updated.
+	virtual bool isUpdated();
+		
+	/** @name Grouping
+		Methods related to grouping of objects of the theme. 
+	*/
+	//@{
+	//! Save the grouping parameters in memory when there is no chronon
+	virtual bool buildGrouping(const TeGrouping& g, TeSelectedObjects selectedObjects = TeAll,
+		               vector<double>* dValuesVec = 0);
 
-	//! Returns the temporal attribute table of the theme (TeEvent and TeFixedGeomDynAttr)
-	bool getTemporalTable(TeTable& table);
+	//! Save the grouping parameters in memory when there is chronon
+	virtual bool buildGrouping(const TeGrouping& g, TeChronon chr, vector<map<string, string> >& mapObjValVec);
 	
-	//! Set the theme tables vector
-	bool setAttTables(TeAttrTableVector& attrs);  
+	//! Build the grouping and associate each object to its group in the collection table 
+	virtual bool saveGrouping(TeSelectedObjects selectedObjects = TeAll);
 
-	//! Clear the list of theme tables
-	void clearAttTableVector() 
-	{	attTableVector_.clear();	}
+	//! Save the theme grouping legends in the collection table  
+	virtual bool saveLegendInCollection(TeSelectedObjects selectedObjects = TeAll, std::string objectId = "");
 
-	//! Returns the vector of attribute tables 
-	TeAttrTableVector& attrTables()
-	{	return attTableVector_; }
+	//! Set the legend id for each object of the theme 
+	virtual void setLegendsForObjects();
+
+	//! Set the own legend id for each object of the theme 
+	virtual void setOwnLegendsForObjects();
 
-	//! Return a complete SQL statement to get all the attributes of the theme objects
-	string	sqlJoin() {return sqlJoin_;}
+	//! Delete grouping
+	virtual bool deleteGrouping(); 
+	//@}
+
+	/** @name Attribute Tables
+		A theme can use one or more attribute tables of the layer that gives its data.
+		These methods are related to the manipulation of these tables.
+	*/
+	//@{
+
+	//! Loads the theme tables in the database
+	virtual bool loadThemeTables(); 
 
-	//! Return a FROM CLAUSE of a SQL statement to get attributes of theme objects
-	string	sqlFrom() {return sqlFrom_;}
+	//! Add a new attribute table to a theme 
+	virtual bool addThemeTable (TeTable& table);
 
-	//! Returns a SQL statement to get all the attributes of the theme objects, the attributes of the 
-	//! collection table, and the attributes of the extended collection table 
-	string sqlGridJoin() { return sqlGridJoin_; }
+	//! Add a new attribute table to a theme
+	virtual void addThemeTable (string tableName);
 
-	//! Returns a FROM clause of a SQL statement to get attributes of the theme objects, the attributes of the 
-	//! collection table, and the attributes of the extended collection table 
-	string sqlGridFrom(const string& geomTable=""); 
+	//! Verify if an attribute table is part of a theme
+	virtual bool isThemeTable(int tableId);
 
-	//! Return the clause WHERE from restrictions (spatial, attribute and temporal)
-	string sqlWhereRestrictions(TeRepresentation* rep=0);
+	//! Verify if an attribute table is part of a theme
+	virtual bool isThemeTable(string tableName);
 
-	//! Return the list of attributes of the theme tables 
-	TeAttributeList sqlAttList() {return sqlAttList_;}
+	//! Returns the list of attribute tables used by this theme 
+	virtual TeAttrTableVector& attrTables()
+	{	return attTableVector_; }
 
-	//! Clear the list of attributes associated to the theme tables 
-	void clearAttList() {sqlAttList_.clear();}
+	//! Sets the entire list of attribute tables used by this theme 
+	virtual bool setAttTables(TeAttrTableVector& attrs);  
 
-	//! Return the list of numerical attributes of the theme tables 
-	TeAttributeList sqlNumAttList() {return sqlNumAttList_;}
+	//! Returns a vector of attribute tables, of a specific type, used by this theme
+	virtual bool getAttTables(TeAttrTableVector& attrs, TeAttrTableType attType = TeAllAttrTypes); 
 
-	//! Clear the list of numerical attributes associated to the theme tables 
-	void clearNumAttList() {sqlNumAttList_.clear();}
+	//! Returns a representation of an attribute table  given name 
+	virtual bool getTable(TeTable& table, const string tableName);
 
-	//! Return the alias vector of the names of the theme tables
-	vector<string>&	aliasVector() { return aliasVector_; }
+	//! Clears the list of attribute tables used by this theme
+	virtual void clearAttTableVector() 
+	{	attTableVector_.clear();	}
 
-	//! Save the theme informations in database
-	bool save();
+	//! Returns the temporal attribute table of the theme (TeEvent or TeFixedGeomDynAttr)
+	/*
+		\note A theme supports only one temporal attribute table
+	*/
+	virtual bool getTemporalTable(TeTable& table);
 
-	//! Build the theme collection 
-	bool buildCollection();
+	//! Removes an attribute table from the list of tables of a theme
+	virtual bool removeThemeTable(unsigned int index);
 
-	//! Generate the label positions (x,y) to each object of the theme
-	bool generateLabelPositions();  
+	//! Returns the the name of an attribute table that contains a given attribute
+	virtual string getTableName(const string& attrName);
 
-	//! Clear the existing grouping of objects of this theme
-	void resetGrouping ();
+	/**
+		Returns the full name of the i-th attribute resulting of the join of all attribute
+		tables associated to the theme tables 
+	*/
+	virtual string getAttribute(unsigned int i);
 
-	//! Clean legend
-	void cleanLegend() { legend_.clear(); }
+	/**
+		Check if the name of the i-th attribute resulting of the join of all attribute
+		tables is an index or not
+	*/
+	virtual bool isIndex(unsigned int i);
 
-	//! Save the grouping parameters in memory
-	bool buildGrouping(TeGrouping* g, TeSelectedObjects selectedObjects = TeAll,
-		               vector<double>* dValuesVec = 0);
+	//! Returns the list of attributes of theme tables 
+	virtual TeAttributeList sqlAttList() { return sqlAttList_;}
 
-	//! Save grouping parameters in memory passing an arbitrary set of slices
-	bool buildGrouping(TeGrouping* g, vector<TeSlice>& slices);
+	//! Clears the list of attributes associated to the theme tables 
+	virtual void clearAttList() {sqlAttList_.clear();}
 
-	//! Build the grouping and associate each object to its group in the collection table 
-	bool saveGrouping(TeSelectedObjects selectedObjects = TeAll);
-	
-	//! Add new theme table
-	virtual bool addThemeTable (TeTable& table);
-	virtual void addThemeTable (string tableName);
+	//! Returns the list of numerical attributes of the theme tables 
+	virtual TeAttributeList sqlNumAttList() { return sqlNumAttList_;}
 
-	//! Verify if a table is a theme table, given its id
-	bool isThemeTable(int tableId);
+	//! Clears the list of numerical attributes associated to the theme tables 
+	virtual void clearNumAttList() {sqlNumAttList_.clear();}
 
-	//! Verify if a table is a theme table, given its name
-	bool isThemeTable(string tableName);
+	//! Returns a SQL JOIN statement to reach to all attribute tables used by this theme
+	virtual string	sqlJoin() { return sqlJoin_;}
 
-	//! Return the table name of a given attribute
-	string getTableName(const string& attrName);
+	//! Returns a SQL FROM CLAUSE that gives access to all attribute tables used by this theme
+	virtual string	sqlFrom() { return sqlFrom_;}
 
-	//! Removes an attribute table
-	bool removeThemeTable(unsigned int index);
+	//! Returns the string containing the SQL WHERE clause 
+	virtual string&	sqlWhere() { return sqlWhere_;}
 
-	//! Loads the theme tables in the database
-	bool loadThemeTables();
+	//! Returns the alias vector of the names of the theme tables
+	virtual vector<string>&	aliasVector() { return aliasVector_; }
 
-	//! Delete grouping
-	bool deleteGrouping(); 
+	//! fill aliasVector_
+	virtual void loadAliasVector();
 
-	//! Create the auxiliar collection table based in the theme tables   
-	bool createCollectionAuxTable();
+	//! Refresh list of attributes of all the theme tables.
+	/*
+		\note All attributes are stored into sqlAttList_ and numeric attributes are stored into sqlNumAttList_.
+	*/
+	virtual void loadAttrLists();
+	//@}
 
-	//! Populate the auxiliar collection table based in the theme tables
-	bool populateCollectionAux();
+	//! Refreshes the bounding box of a theme according to its representation
+	/*
+		\note This functions is being kept for compatibility reasons with derived
+		classes. IT SHOULD NOT BE USED BY APPLICATION USING ONLY THE BASIC CLASS.
+	*/
+	virtual void updateThemeBox() {}
 
-	//! Load the new attribute list of all the theme tables.
-	//! All attributes are stored into sqlAttList_ and numeric attributes are stored into sqlNumAttList_.
-	void loadAttrLists();
+	//! Updates the bounding box of a theme (in the database)
+	/*
+		\note This functions is being kept for compatibility reasons with derived
+		classes. IT SHOULD NOT BE USED BY APPLICATION USING ONLY THE BASIC CLASS.
+	*/
+	virtual void updateThemeBox(const TeBox& /*box*/) {}
+	//@}
 
 	/** @name Locate geometries
-	*  Returns the geometry(ies) of the theme that contains a given coordinate
+	    Returns the geometry(ies) of the theme given coordinate
 	*/
 	//@{ 	
-	bool locatePolygon		(TeCoord2D &pt, TePolygon &polygon, const double& tol = 0.0);
-	bool locatePolygonSet   (TeCoord2D &pt, double tol, TePolygonSet &polygons);
-	bool locateLine		(TeCoord2D &pt, TeLine2D &line, const double& tol = 0.0);
-	bool locatePoint	(TeCoord2D &pt, TePoint &point, const double& tol = 0.0);
-	bool locateCell		(TeCoord2D &pt, TeCell &c, const double& tol = 0.0);
+	virtual bool locatePolygon		(TeCoord2D &pt, TePolygon &polygon, const double& tol = 0.0);
+	virtual bool locatePolygonSet   (TeCoord2D &pt, double tol, TePolygonSet &polygons);
+	virtual bool locateLine		(TeCoord2D &pt, TeLine2D &line, const double& tol = 0.0);
+	virtual bool locatePoint	(TeCoord2D &pt, TePoint &point, const double& tol = 0.0);
+	virtual bool locateCell		(TeCoord2D &pt, TeCell &c, const double& tol = 0.0);
 	//@}
+	
+	//! Get the set of objects corresponding to the object selection criteria
+	virtual set<string> getObjects(TeSelectedObjects selectedObjects = TeAll);
 
-	/** @name Raster Visual
-	*  Methods to deal with the visual presentation of the raster
-	*/
-	//@{ 
-	//! Returns the visual presentation of raster geometry
-	TeRasterTransform* rasterVisual() 
-	{ return rasterVisual_; }
-
-	//! Sets the visual presentation of raster geometry
-	void rasterVisual(TeRasterTransform* r) 
-	{ rasterVisual_ = r; } 
-
-	//! Removes the visual presentation of the raster
-	void removeRasterVisual()
-	{ 
-		if (rasterVisual_)
-		{
-			delete rasterVisual_;
-			rasterVisual_ = 0;
-		}
-	}
+	//! Get the set of objects corresponding to the list of items
+	virtual set<string> getObjects(const vector<string>& itemVec);
 
-	//! Creates an appropriate visual presentation to the raster of the theme
-	void createRasterVisual(TeRaster* rst=0);
-	//@}
+	//! Get the set of items corresponding to the object selection criteria
+	virtual vector<string> getItemVector(TeSelectedObjects selectedObjects);
+
+	//! Get the set of items corresponding to the set of objects
+	virtual vector<string> getItemVector(const set<string>& oidSet);
+
+	//! Verifies if there are objects without geometries of a specific geometry representation
+	virtual bool hasObjectsWithoutGeometries(TeGeomRep geomRep);
+
+	//! Removes the objects without geometries of a specific geometry representation
+	virtual bool removeObjectsWithoutGeometries(TeGeomRep geomRep);
+
+	//! Save the the theme parameters in the database
+	virtual bool save(); 
+
+	//! Get the number of objects acessible by this theme
+	virtual unsigned int getNumberOfObjects();
+
+	//! Save the theme metadata in database. In this case, this metadata is saved by TeDatabase
+	virtual bool saveMetadata(TeDatabase*) { return true; } 
+
+    //! Tells if it necessary to build a collection
+	void setUsingCollection(const bool& usingCollection); 
 
 protected:
-	// ----------------- theme information -----------------
 	
-	// General identification
-	int			layerId_;	// layer id
-		
-	// Associated layer and selected objects
-	TeLayer*	layer_;
-	
-	// Selection
-	//attribute restriction
-	string		generateAttributeRest_;
+	//! Create the auxiliar collection table used to represent objects with multiple versions in time  
+	virtual bool createCollectionAuxTable(TeDatabase* db);
+
+	//! Save the grouping parameters in memory when there is no chronon
+	virtual bool buildGrouping(TeDatabase* db, const TeGrouping& g, TeSelectedObjects selectedObjects = TeAll,
+		                       vector<double>* dValuesVec = 0);
+
+	//! Save the grouping parameters in memory when there is chronon
+	virtual bool buildGrouping(TeDatabase* db, const TeGrouping& g, TeChronon chr, vector<map<string, string> >& mapObjValVec);
+
+	//! Build the grouping and associate each object to its group in the collection table 
+	virtual bool saveGrouping(TeDatabase* db, TeSelectedObjects selectedObjects = TeAll);
+
+	//! Save the theme grouping legends in the collection table  
+	virtual bool saveLegendInCollection(TeDatabase* db, TeSelectedObjects selectedObjects = TeAll, std::string objectId = "");
 	
-	// temporal restriction 
-	string		generateTemporalRest_;
+	//! Fill the sqlJoin_ and sqlFrom_ 
+	virtual void loadThemeTablesJoin();
 	
-	//spatial restriction
-	string				generateSpatialRest_; //future use
-
-	TeSpatialRelation	spatialRelation_;
-	bool				hasSpatialRes_;
-	TeBox				boxRest_;		//box which defines the spatial restriction 
-	TeGeometry*			geomRest_;		//geometry which defines the spatial restriction 
-	TeGeomRep			geomRepRest_;	//geometry representation of the theme which will be 
-										//considered in the spatial restriction  
-	// Display scale
-	double	minScale_;
-	double	maxScale_;
+	//! Populate the collection table based in the theme restrictions
+	virtual bool populateCollection(std::string objectId = ""); 
 
-	// collection table name
-	string	collectionTable_;
-	string	collectionAuxTable_;
+	//! list of attribute tables of the theme
+	TeAttrTableVector	attTableVector_;
 
-	//representation visible in the theme
-	int		visibleRep_;
+	//! List containing all the attributes of the theme tables
+	TeAttributeList	sqlAttList_;
+	
+	//! List containing only the numeric attributes of the theme tables
+	TeAttributeList	sqlNumAttList_;		
 
-	//if theme is visible or not
-	int		enableVisibility_;
+	//! Pointer to the layer that gives origin to this theme
+	TeLayer*	layer_;
 
-	// ----------------- grouping information -----------------
-	TeGrouping*		grouping_;
+	//! Layer id
+	int			layerId_;	
+	
+	// collection table name
+	string		collectionTable_;
+	string		collectionAuxTable_;
 
-	// ----------------- legend information -----------------
-	TeLegendEntryVector	legend_;
+    bool useCollection_;
 
-	// Background Legend
-	TeLegendEntry		outOfCollectionLegend_;			//group(-1) 
-	TeLegendEntry		withoutDataConnectionLegend_;	//group(-2) 
-	TeLegendEntry		defaultLegend_;					//group(-3) 
-	TeLegendEntry		pointingLegend_;				//group(-4) 
-	TeLegendEntry		queryLegend_;					//group(-5) 
-	TeLegendEntry		queryAndPointingLegend_;		//group(-6) 
-		
 	// ----------------- theme tables information -----------------
-	TeAttrTableVector	attTableVector_;
-	
+
 	//! clause FROM: join with the theme tables and collection table
-	string				sqlFrom_;		
+	string	sqlFrom_;		
 	
 	//! clause SELECT and FROM: join with the theme tables and collection table
-	string				sqlJoin_;
+	string	sqlJoin_;
 	
+	//! string containing the WHERE clause
+	string sqlWhere_;
+
 	//! clause FROM: join with the theme tables and auxiliar collection table
-	string				sqlGridFrom_;
+	string	sqlGridFrom_;
 	
 	//! clause SELECT and FROM: join with the theme tables and auxiliar collection table
-	string				sqlGridJoin_;
+	string	sqlGridJoin_;
 
 	//! vector of alias to the attribute tables that are used more than once  
-	vector<string>		aliasVector_;
+	vector<string>	aliasVector_;
 
-	//! list containing all the attributes of the theme tables
-	TeAttributeList	sqlAttList_;
-	
-	//! list containing only the numeric attributes of the the theme tables
-	TeAttributeList	sqlNumAttList_;		
+	//! Load the theme metadata from database. In this case, this metadata is loaded by TeDatabase
+	virtual bool loadMetadata(TeDatabase* ) { return true; } 
 
-	//! visual of raster
-	TeRasterTransform*		rasterVisual_;
+	//! Erase the theme metadata in database. In this case, this metadata is erased by TeDatabase
+	virtual bool eraseMetadata(TeDatabase* ) { return true; } 
+};
 
-	//! fill aliasVector_
-	void loadAliasVector();
 
-	//! Fill the sqlJoin_ and sqlFrom_ 
-	void loadThemeTablesJoin();
+//!  This class implements a factory to create theme objects. 
+/*!  
+	 This class is a factory that create view nodes 
+	 of the type TeTHEME, that is, theme objects.
 
-	//! Fill the sqlGridJoin_ and sqlGridFrom_ 
-	void loadTablesJoin(const string& geomTable="");
+	\sa
+     TeViewNodeFactory TeViewNodeParams TeTheme  
+*/
+class TL_DLL TeThemeFactory : public TeViewNodeFactory
+{
+public:
+	//! Constructor 
+	TeThemeFactory() : TeViewNodeFactory((int)TeTHEME)
+	{}
 
-	//! Save the theme grouping legends in the collection table  
-	bool saveLegendInCollection(TeSelectedObjects selectedObjects = TeAll);
-	
-	//! Populate the collection table based in the theme restrictions
-	bool populateCollection(); 
+	//! Created theme objects 
+	TeViewNode* build(TeViewNodeParams* params)
+	{	
+		TeViewNodeParams auxParams = *params;
+		return new TeTheme(auxParams);	
+	}
 
+	TeViewNode* build()
+	{
+		return new TeTheme();
+	}
 };
 
-//! A vector of pointers to Theme
-typedef vector<TeTheme*>	TeThemeVector;
 
-//! A map from theme identifier to pointer to theme
-typedef map<int, TeTheme*>	TeThemeMap;
+/*! \example createTheme.cpp
+	Shows how to create themes in TerraLib.
+ */
 
-/*! \example ThemeExample1.cpp
-	This is an example of how to create themes in TerraLib.
+/*! \example themeGrouping.cpp
+	Shows how to do a grouping on the objects of a TerraLib theme.
  */
 
-/*! \example ThemeExample2.cpp
-	This is an example of how to do a grouping on the objects of a TerraLib theme.
+/*! \example rasterSlicing.cpp
+	Shows how to  create a legend over a raster data, stored in a layer TerraLib.
  */
+
+
 #endif
 
diff --git a/src/terralib/kernel/TeThread.cpp b/src/terralib/kernel/TeThread.cpp
new file mode 100755
index 0000000..5f84827
--- /dev/null
+++ b/src/terralib/kernel/TeThread.cpp
@@ -0,0 +1,285 @@
+#include "TeThread.h"
+#include "TeAgnostic.h"
+
+TeThread::TeThread()
+{
+	init();
+}
+
+TeThread::~TeThread()
+{
+	TEAGN_TRUE_OR_THROW( ( threadStatus_ == TeThreadStopped ),
+		"Trying to delete a running thread handler instance" )
+  freeResources();
+}
+
+bool TeThread::start()
+{
+  if( threadStatus_ != TeThreadStopped )
+	{
+    return false;
+  }
+	else
+	{
+    freeResources();
+    
+    threadStatus_ = TeThreadRunning;
+    
+#if TePLATFORM == TePLATFORMCODE_MSWINDOWS
+
+		threadId_ = 0;
+    threadHandler_ = 0;
+    
+		threadHandler_ = CreateThread(NULL, 0, 
+      (LPTHREAD_START_ROUTINE)TeThread::startThread,
+      (LPVOID)(this), 0, (LPDWORD) &threadId_);
+
+    if( threadHandler_ == 0 )
+    {
+      TEAGN_LOGERR( "Thread creation failed" );
+      threadStatus_ = TeThreadStopped;
+      return false;
+    }
+    
+#elif TePLATFORM == TePLATFORMCODE_LINUX || TePLATFORM == TePLATFORMCODE_AIX
+
+		if( pthread_attr_init(&threadAttr_) != 0 )
+		{
+      TEAGN_LOGERR( "Unable to init thread attributes" );
+      threadStatus_ = TeThreadStopped;
+      return false;
+    }      
+      
+		if( pthread_attr_setdetachstate( &threadAttr_, 
+      PTHREAD_CREATE_JOINABLE ) != 0 )
+    {
+      TEAGN_LOGERR( "Unable to set thread detach attribute" );
+      threadStatus_ = TeThreadStopped;
+      return false;
+    }       
+
+    if( pthread_create( &threadId_, &threadAttr_, 
+      TeThread::startThread, (void *) this ) != 0 )
+    {
+      TEAGN_LOGERR( "Thread creation failed" );
+      threadStatus_ = TeThreadStopped;
+      return false;
+    }       
+      
+#else
+#error "ERROR: Unsupported platform"
+#endif
+
+    if( threadCurrPriority_ != TeThreadNormalPriority )
+		{
+      TEAGN_TRUE_OR_LOG( setPriority(threadCurrPriority_ ), 
+        "Unable to set thread priority" );
+    }
+
+    return true;
+  }
+}
+
+
+const TeThreadStatus& TeThread::getStatus() const
+{
+  return threadStatus_;
+}
+
+const TeThreadPriority& TeThread::getPriority() const
+{
+  return threadCurrPriority_;
+}
+
+
+bool TeThread::setPriority( const TeThreadPriority& newPriority )
+{
+  if( threadStatus_ == TeThreadRunning ) {
+    #if TePLATFORM == TePLATFORMCODE_MSWINDOWS
+      int new_prio_value = THREAD_PRIORITY_NORMAL;
+      
+      switch( newPriority ) {
+        case TeThreadIdlePriority :
+        {
+          new_prio_value = THREAD_PRIORITY_IDLE;
+          break;
+        }
+        case TeThreadBelowNormalPriority :
+        {
+          new_prio_value = THREAD_PRIORITY_BELOW_NORMAL;
+          break;
+        }
+        case TeThreadNormalPriority :
+        {
+          new_prio_value = THREAD_PRIORITY_NORMAL;
+          break;
+        }
+        case TeThreadAboveNormalPriority :
+        {
+          new_prio_value = THREAD_PRIORITY_ABOVE_NORMAL;
+          break;
+        }
+        case TeThreadTimeCriticalPriority :
+        {
+          new_prio_value = THREAD_PRIORITY_TIME_CRITICAL;
+          break;
+        }
+        default :
+        {
+          TEAGN_LOG_AND_THROW( "Invalid thread priority" )
+          break;
+        }                                      
+      }
+      
+      if( SetThreadPriority( threadHandler_, new_prio_value ) ) {
+        threadCurrPriority_ = newPriority;
+        return true;
+      } else {
+        return false;
+      }      
+    #elif TePLATFORM == TePLATFORMCODE_LINUX || TePLATFORM == TePLATFORMCODE_AIX
+      int curr_policy = 0;
+      struct sched_param curr_sched_param; 
+      
+      TEAGN_TRUE_OR_THROW( ( pthread_getschedparam( threadId_, &curr_policy,
+        &curr_sched_param ) == 0 ),
+        "Unable to get thread scheduler parameters" );
+
+	    int min_prio = sched_get_priority_min( curr_policy );
+      int max_prio = sched_get_priority_max( curr_policy );
+      
+      switch( newPriority ) {
+        case TeThreadIdlePriority :
+        {
+          curr_sched_param.sched_priority = min_prio;
+          break;
+        }
+        case TeThreadBelowNormalPriority :
+        {
+          curr_sched_param.sched_priority = (int)
+            ( ( max_prio - min_prio ) / 4 );
+          break;
+        }
+        case TeThreadNormalPriority :
+        {
+          curr_sched_param.sched_priority = (int)
+            ( 2 * ( max_prio - min_prio ) / 4 );
+          break;
+        }
+        case TeThreadAboveNormalPriority :
+        {
+          curr_sched_param.sched_priority = (int)
+            ( 3 * ( max_prio - min_prio ) / 4 );
+          break;
+        }
+        case TeThreadTimeCriticalPriority :
+        {
+          curr_sched_param.sched_priority = max_prio;
+          break;
+        }
+        default :
+        {
+          TEAGN_LOG_AND_THROW( "Invalid thread priority" )
+          break;
+        }                                      
+      }
+      
+      if( pthread_setschedparam( threadId_, curr_policy,
+        &curr_sched_param ) == 0 ) {
+        
+        threadCurrPriority_ = newPriority;
+        return true;        
+      } else {
+        return false;
+      }  
+    #else
+      #error "ERROR: Unsupported platform"
+    #endif    
+  } else {
+    /* Thread not running */
+    
+    threadCurrPriority_ = newPriority;
+    
+    return true;
+  }
+}
+
+bool TeThread::waitToFinish()
+{
+  if( threadStatus_ != TeThreadStopped ) {
+    #if TePLATFORM == TePLATFORMCODE_MSWINDOWS
+      TEAGN_TRUE_OR_RETURN( ( WaitForSingleObjectEx( 
+							threadHandler_, INFINITE, false ) == WAIT_OBJECT_0 ),
+							"Thread joinning failed" )
+    #elif TePLATFORM == TePLATFORMCODE_LINUX || TePLATFORM == TePLATFORMCODE_AIX
+      TEAGN_TRUE_OR_RETURN( ( pthread_join( threadId_, 0 ) == 0 ),
+							"Thread joinning failed" )
+    #else
+      #error "ERROR: Unsupported platform"
+    #endif  
+
+    freeResources();
+  }
+  
+  return true;
+}
+
+void TeThread::init()
+{
+	threadStatus_ = TeThreadStopped;
+
+	threadCurrPriority_ = TeThreadNormalPriority;
+
+#if TePLATFORM == TePLATFORMCODE_MSWINDOWS
+	threadHandler_ = 0;
+	threadId_ = 0;
+#elif TePLATFORM == TePLATFORMCODE_LINUX || TePLATFORM == TePLATFORMCODE_AIX
+  threadId_ = 0;
+#else
+#error "ERROR: Unsupported platform"
+#endif 
+} 
+
+void TeThread::freeResources()
+{
+  #if TePLATFORM == TePLATFORMCODE_MSWINDOWS
+    if( threadHandler_ != 0 ) {
+      WaitForSingleObjectEx( threadHandler_, INFINITE, false );
+            
+      TEAGN_TRUE_OR_THROW( CloseHandle( threadHandler_ ),
+        "Error closing thread handle" );
+        
+      threadHandler_ = 0;
+      threadId_ = 0;
+
+    }
+  #elif TePLATFORM == TePLATFORMCODE_LINUX || TePLATFORM == TePLATFORMCODE_AIX
+    if( threadId_ != 0 ) {
+      pthread_join( threadId_, 0 );
+      
+      threadId_ = 0;
+      
+      TEAGN_TRUE_OR_THROW( ( pthread_attr_destroy( &threadAttr_ ) == 0 ),
+        "Unable to destroy thread attributes" )        
+    } 
+  #else
+    #error "ERROR: Unsupported platform"
+  #endif  
+}
+
+void* TeThread::startThread( void* threadPtr )
+{
+  TEAGN_DEBUG_CONDITION( ( threadPtr != 0 ),
+    "Invalid thread parameter pointer" )
+
+	TeThread* thread = (TeThread*)threadPtr;
+
+	thread->run();
+	thread->threadStatus_ = TeThreadStopped;
+
+	return 0;
+}
+
+
+
+
diff --git a/src/terralib/kernel/TeThread.h b/src/terralib/kernel/TeThread.h
new file mode 100755
index 0000000..d1b64b0
--- /dev/null
+++ b/src/terralib/kernel/TeThread.h
@@ -0,0 +1,157 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/** \file TeThread.h
+ *  \brief This file contains the base thread class.
+ *  \author Emiliano F. Castejon <castejon at dpi.inpe.br>
+ *  \author Gilberto Ribeiro de Queiroz <gribeiro at dpi.inpe.br>
+ */
+
+#ifndef __TERRALIB_INTERNAL_TETRHEAD_H
+#define __TERRALIB_INTERNAL_TETRHEAD_H
+  
+#include "TeThreadDatatypes.h"
+#include "TeDefines.h"
+  
+#if TePLATFORM == TePLATFORMCODE_MSWINDOWS
+#include <windows.h>
+#define TeDelayThread( seconds ) Sleep( seconds * 1000)
+#elif TePLATFORM == TePLATFORMCODE_LINUX || TePLATFORM == TePLATFORMCODE_AIX
+#include <pthread.h>
+#include <unistd.h>
+#define TeDelayThread( seconds ) sleep( seconds )
+#else
+#error "ERROR: Unsupported platform"
+#endif
+
+
+/** \class TeThead
+ *  \brief xxxxx
+ *
+ *
+ *  If you are interested in using TerraLib thread
+ *  support in a object-oriented way, you should create
+ *  a subclass of TeThread in order to creata a threadable
+ *  class. Subclasses must implement the method "run".
+ *  Than in the main thread, you can call the start method,
+ *  it is non-blocking.<br>
+ *  If you have a function and want to make it a thread,
+ *  you should look TeThreadFunctor class.
+ *  
+ *
+ *  \sa TeThreadFunctor
+ *  \author Emiliano F. Castejon <castejon at dpi.inpe.br>
+ *  \author Gilberto Ribeiro de Queiroz <gribeiro at dpi.inpe.br>
+ *  \ingroup Utils
+ *
+ */  
+class TL_DLL TeThread
+{
+    public :
+      
+      
+      /** \brief Default constructor.
+       */
+      TeThread();             
+      
+      /** \brief Virtual destructor
+       */
+      virtual ~TeThread();
+
+      /** \brief Starts the current thread.
+       *  \return true if OK, false on errors.
+       */      
+      bool start();
+      
+      /** \brief Gets the current thread status.
+	     *  \return The current thread status.
+       */
+      const TeThreadStatus& getStatus() const;
+
+      /** \brief Returns the current thread priority.
+	     *  \return The current thread priority.
+       */
+      const TeThreadPriority& getPriority() const;
+
+      /** \brief Changes the current thread priority.
+       *  \param newPriority The new thread priority.
+       *  \return true if OK, false on errors.
+       */      
+      bool setPriority(const TeThreadPriority& newPriority);
+            
+      /** \brief Block the current thread until the thread
+	     *  handled by this instance terminates.
+       *  \return true if OK, false if wait failed.
+       */
+      bool waitToFinish();
+
+	protected:
+
+		/** \brief Thread execution method: this method will be called when the thread starts.
+		 *         Subclasses must reimplement it.
+     */
+		virtual void run() = 0;
+
+		/** \brief Initialize the internal default state.
+		 */
+		void init();
+
+		/** \brief Free all thread allocated resources.
+		 */      
+   void freeResources();
+
+	private:
+
+    /** \brief The thread start function.
+     *  \param threadPtr The thread class pointer.
+     */
+		static void* startThread(void* threadPtr );        
+
+		/** \brief Copy constructor not allowed.
+		 *  \param rhs External reference.
+		 */
+		TeThread(const TeThread& rhs);      
+    
+		/** \brief Assignment operator not aloowed.
+		 *  \param rhs External reference.
+		 *  \return A const reference.
+		 */
+		const TeThread& operator=(const TeThread& rhs);
+
+	protected:
+
+#if TePLATFORM == TePLATFORMCODE_MSWINDOWS
+    HANDLE threadHandler_;			//!< Win32 thread handler.
+		LPDWORD threadId_;				//!< Win32 thread ID
+#elif TePLATFORM == TePLATFORMCODE_LINUX || TePLATFORM == TePLATFORMCODE_AIX
+		pthread_t threadId_;			//!< Pthread thread ID.
+		pthread_attr_t threadAttr_;		//!< Pthread thread attributes.
+#else
+#error "ERROR: Unsupported platform"
+#endif
+
+    TeThreadStatus threadStatus_;			//!< The current thread status variable.
+    TeThreadPriority threadCurrPriority_;   //!< The current thread priority.
+};
+  
+#endif	// __TERRALIB_INTERNAL_TETRHEAD_H
+
diff --git a/src/terralib/kernel/TeThreadDatatypes.h b/src/terralib/kernel/TeThreadDatatypes.h
new file mode 100755
index 0000000..8314ea2
--- /dev/null
+++ b/src/terralib/kernel/TeThreadDatatypes.h
@@ -0,0 +1,59 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/** \file TeThreadDatatypes.h
+ *  \brief xxxxxxx.
+ *  \author Emiliano F. Castejon <castejon at dpi.inpe.br>
+ *  \author Gilberto Ribeiro de Queiroz <gribeiro at dpi.inpe.br>
+ */
+
+#ifndef __TERRALIB_INTERNAL_TETRHEADDATATYPES_H
+#define __TERRALIB_INTERNAL_TETRHEADDATATYPES_H
+
+  
+/**
+ *  \enum TeThreadStatus
+ *  \brief Possible thread status.
+ */
+enum TeThreadStatus
+{
+	TeThreadStopped,	//!< The thread is stopped: it has already finished the job or it doesn't have start it.
+	TeThreadRunning		//!< The thread is running.
+};
+
+
+/**
+ *  \enum TeThreadPriority
+ *  \brief Possible thread priorities.
+ */
+enum TeThreadPriority
+{
+	TeThreadIdlePriority,			/*!< Idle priority. */
+	TeThreadBelowNormalPriority,	/*!< Below normal priority. */
+	TeThreadNormalPriority,			/*!< Normal priority. */
+	TeThreadAboveNormalPriority,	/*!< Above normal priority. */     
+	TeThreadTimeCriticalPriority	/*!< Time critical priority. */
+};
+
+  
+#endif	// __TERRALIB_INTERNAL_TETRHEADDATATYPES_H
+
diff --git a/src/terralib/kernel/TeThreadFunctor.cpp b/src/terralib/kernel/TeThreadFunctor.cpp
new file mode 100755
index 0000000..e6f18dd
--- /dev/null
+++ b/src/terralib/kernel/TeThreadFunctor.cpp
@@ -0,0 +1,76 @@
+#include "TeThreadFunctor.h"
+#include "TeAgnostic.h"
+
+  
+TeThreadFunctor::TeThreadFunctor()
+	: threadReturnValue_(false), threadStartFuncPtr1_(0), 
+	threadStartFuncPtr2_(0), userParamsPtr_( 0 )
+{
+}
+
+TeThreadFunctor::~TeThreadFunctor()
+{
+}
+
+const bool& TeThreadFunctor::getReturnValue() const
+{
+  return threadReturnValue_;
+}
+
+void TeThreadFunctor::setStartFunctPtr( TeThreadStartFunctT1 startFuncPtr )
+{
+  TEAGN_TRUE_OR_THROW( ( threadStatus_ == TeThreadStopped ),
+    "Cannot change start function pointer of a running thread" )
+
+	TEAGN_TRUE_OR_THROW( ( startFuncPtr != 0 ),
+	  "Invalid thread start function pointer" )
+
+  threadStartFuncPtr1_ = startFuncPtr;
+  threadStartFuncPtr2_ = 0;
+}
+
+void TeThreadFunctor::setStartFunctPtr( TeThreadStartFunctT2 startFuncPtr )
+{
+  TEAGN_TRUE_OR_THROW( ( threadStatus_ == TeThreadStopped ),
+    "Cannot change start function pointer of a running thread" )
+
+  TEAGN_TRUE_OR_THROW( ( startFuncPtr != 0 ),
+             "Invalid thread start function pointer" )
+
+  threadStartFuncPtr1_ = 0;
+  threadStartFuncPtr2_ = startFuncPtr;
+}
+
+void TeThreadFunctor::setParameters(const TeThreadParameters& params)
+{
+	TEAGN_TRUE_OR_THROW( ( threadStatus_ == TeThreadStopped ),
+    "Cannot change thread parameters of a running thread" )
+
+	threadUserParams_ = params;
+}
+
+
+void TeThreadFunctor::setParametersPtr( void* userParamsPtr )
+{
+  TEAGN_TRUE_OR_THROW( ( threadStatus_ == TeThreadStopped ),
+    "Cannot change thread parameters of a running thread" )
+  
+  userParamsPtr_ = userParamsPtr;
+}
+
+
+void TeThreadFunctor::run()
+{
+  threadReturnValue_ = false;
+
+	if( threadStartFuncPtr1_ )
+	{
+	  threadReturnValue_ = threadStartFuncPtr1_(threadUserParams_);
+	  threadUserParams_.clear();
+	}
+	else if( threadStartFuncPtr2_ )
+	{
+	  threadReturnValue_ = threadStartFuncPtr2_(userParamsPtr_);
+	}
+}
+
diff --git a/src/terralib/kernel/TeThreadFunctor.h b/src/terralib/kernel/TeThreadFunctor.h
new file mode 100755
index 0000000..9c40ce0
--- /dev/null
+++ b/src/terralib/kernel/TeThreadFunctor.h
@@ -0,0 +1,133 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright  2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/** \file TeThreadFunctor.h
+ *  \brief This file contains a base class for thread in function style manner.
+ *  \author Emiliano F. Castejon <castejon at dpi.inpe.br>
+ *  \author Gilberto Ribeiro de Queiroz <gribeiro at dpi.inpe.br>
+ */
+
+#ifndef __TERRALIB_INTERNAL_TETRHEADFUNCTOR_H
+#define __TERRALIB_INTERNAL_TETRHEADFUNCTOR_H
+  
+#include "TeThread.h"
+#include "TeThreadParameters.h"
+#include "TeSharedPtr.h"
+
+/** \class TeThreadFunctor
+ *  \brief A base class for thread in function style manner.
+ *
+ *
+ *  If you are interested in using TerraLib thread
+ *  support in a function style model, you should create
+ *  objects of this class by specifying a function to be called by
+ *  the thread when it starts.<br>
+ *  To start the thread, call start method,
+ *  it is non-blocking.<br>
+ *  If you want to use the thread support
+ *  in a object oriented way, see TeThread class.
+ *  
+ *
+ *  \sa TeThread
+ *  \author Emiliano F. Castejon <castejon at dpi.inpe.br>
+ *  \author Gilberto Ribeiro de Queiroz <gribeiro at dpi.inpe.br>
+ *  \ingroup Utils
+ *
+ */  
+class TL_DLL TeThreadFunctor : public TeThread
+{
+	public:
+
+    /** \brief Type definition for a thread start function pointer.
+     *  \param params The thread parameters.
+     *  \return true if OK, false on erros.
+     */
+    typedef bool (*TeThreadStartFunctT1)( const TeThreadParameters& params );
+    
+    /** \brief Type definition for a thread start function pointer.
+     *  \param userParamsPtr A pointer to anything required by the user.
+     *  \return true if OK, false on erros.
+     */
+    typedef bool (*TeThreadStartFunctT2)( void* userParamsPtr );        
+
+    /** \deprecated Use TeThreadStartFunctT1. */
+    typedef TeThreadStartFunctT1 TeThreadStartFunctT;
+    
+    /** @typedef TeSharedPtr< TeThread > pointer
+    * Type definition for an thread instance pointer. 
+    */
+    typedef TeSharedPtr< TeThreadFunctor > pointer;         
+
+    /** \brief Default Constructor.
+     */
+    TeThreadFunctor();             
+
+    /** \brief Default Destructor
+     */
+    ~TeThreadFunctor();
+
+    /** \brief Returns the current thread execution return value.
+     */      
+    const bool& getReturnValue() const;
+
+		/** \brief Change the internal thread start function pointer.
+		 *  \param startFuncPtr The new thread start function pointer.
+		 *  \note The thread mus be stopped for calling this method.
+     */      
+    void setStartFunctPtr( TeThreadStartFunctT1 startFuncPtr );
+    
+    /** \brief Change the internal thread start function pointer.
+     *  \param startFuncPtr The new thread start function pointer.
+     *  \note The thread mus be stopped for calling this method.
+     */      
+    void setStartFunctPtr( TeThreadStartFunctT2 startFuncPtr );    
+
+		/** \brief Sets the parameter that will be passed to the function after
+		 *         the thread startup.
+		 *  \param params The parameters to the thread function.
+		 *  \note The thread must be stopped before calling this method.
+		 */
+    void setParameters(const TeThreadParameters& params);
+    
+    /** \brief Sets a pointer that will be passed to the function after
+     *         the thread startup.
+     *  \param userParamsPtr The user parameters pointer.
+     *  \note The thread must be stopped before calling this method.
+     */
+    void setParametersPtr( void* userParamsPtr );    
+
+	protected:
+
+		// Overloaded method from TeThread.
+		void run();
+
+	protected:
+
+		bool threadReturnValue_;					//!< User function return value.
+    TeThreadParameters threadUserParams_;		//!< The current user parameters instance.
+    TeThreadStartFunctT1 threadStartFuncPtr1_;	//!< A pointer to the current user thread start function.
+    TeThreadStartFunctT2 threadStartFuncPtr2_; //!< A pointer to the current user thread start function.
+    void* userParamsPtr_;//!< A pointer to the current user thread start function parameters pointer.
+};
+  
+#endif	// __TERRALIB_INTERNAL_TETRHEADFUNCTOR_H
+
diff --git a/src/terralib/kernel/TeThreadJob.cpp b/src/terralib/kernel/TeThreadJob.cpp
new file mode 100755
index 0000000..53d3607
--- /dev/null
+++ b/src/terralib/kernel/TeThreadJob.cpp
@@ -0,0 +1,9 @@
+#include "TeThreadJob.h"
+
+TeThreadJob::TeThreadJob() 
+{
+};
+
+TeThreadJob::~TeThreadJob() 
+{
+};
diff --git a/src/terralib/kernel/TeThreadJob.h b/src/terralib/kernel/TeThreadJob.h
new file mode 100755
index 0000000..1935a68
--- /dev/null
+++ b/src/terralib/kernel/TeThreadJob.h
@@ -0,0 +1,56 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright  2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+
+#ifndef __TERRALIB_INTERNAL_TETRHEADJOB_H
+#define __TERRALIB_INTERNAL_TETRHEADJOB_H
+
+#include "TeDefines.h"
+
+/*! Base thread job class 
+ * \author Emiliano F. Castejon <castejon at dpi.inpe.br>
+ */
+class TL_DLL TeThreadJob
+{
+  public :
+    
+    virtual ~TeThreadJob();
+    
+    /*! Returns a pointer to a cloned job from this instance.
+     * \return A pointer to a cloned job from this instance (the 
+     * caller of this method must take ownership of the returned
+     * pointer).
+     */
+    virtual TeThreadJob* clone() const = 0;
+    
+    /*! The job code to be executed.
+     */
+    virtual void executeJobCode() = 0;        
+  
+  protected :
+    
+    TeThreadJob();
+};    
+ 
+  
+#endif
+
diff --git a/src/terralib/kernel/TeThreadJobsManager.cpp b/src/terralib/kernel/TeThreadJobsManager.cpp
new file mode 100755
index 0000000..189d147
--- /dev/null
+++ b/src/terralib/kernel/TeThreadJobsManager.cpp
@@ -0,0 +1,343 @@
+#include "TeThreadJobsManager.h"
+#include "TeUtils.h"
+#include "TeThreadFunctor.h"
+
+#include <algorithm>
+
+TeThreadJobsManager::TeThreadJobsManager()
+{
+  managerData_.maxSimulJobs_ = TeGetPhysProcNumber();
+}
+
+TeThreadJobsManager::~TeThreadJobsManager()
+{
+  clearAwaitingJobs();
+  
+  managerData_.mutex_.lock();
+  
+  TEAGN_TRUE_OR_THROW( managerData_.runningJobsList_.size() == 0,
+    "Trying to delete an TeThreadJobsManager with active jobs running" );
+  
+  managerData_.mutex_.unLock();  
+}
+
+TeThreadJob const* const TeThreadJobsManager::executeJob( 
+  const TeThreadJob& job )
+{
+  managerData_.mutex_.lock();
+  
+  TeThreadJob* newJobPtr = 0;
+  
+  if( managerData_.maxSimulJobs_ == 0 )
+  {
+    newJobPtr = job.clone();
+    newJobPtr->executeJobCode();
+    delete newJobPtr;
+  }
+  else
+  {
+    // Inserting job into awaiting jobs list
+    
+    newJobPtr = job.clone();
+    managerData_.awaitingJobsList_.push_back( newJobPtr );
+    
+    // Starting a thread to do the job
+    
+    if( managerData_.threadsList_.size() == 0 )
+    {
+      TeThreadFunctor* newThreadPtr = new TeThreadFunctor();
+      newThreadPtr->setParametersPtr( (void*)(&managerData_) );
+      newThreadPtr->setStartFunctPtr( threadFunction );
+      
+      managerData_.threadsList_.push_back( newThreadPtr );
+      
+      TEAGN_TRUE_OR_THROW(newThreadPtr->start(), "Thread start error" );
+    }
+    else if( managerData_.threadsList_.size() < 
+      managerData_.maxSimulJobs_ )
+    {
+      // locating a stopped thread
+      
+      std::list< TeThreadFunctor* >::iterator it = 
+        managerData_.threadsList_.begin();
+      std::list< TeThreadFunctor* >::iterator it_end = 
+        managerData_.threadsList_.end();
+      
+      bool noStoppedThreadWasFound = true;
+      
+      while( it != it_end )
+      {
+        if( (*it)->getStatus() == TeThreadStopped )
+        {
+          noStoppedThreadWasFound = false;
+          TEAGN_TRUE_OR_THROW( (*it)->start(), "Thread start error" );
+          break;
+        }
+        
+        ++it;
+      }
+      
+      // no stopped threads found
+      
+      if( noStoppedThreadWasFound )
+      {
+        TeThreadFunctor* newThreadPtr = new TeThreadFunctor();
+        newThreadPtr->setParametersPtr( (void*)(&managerData_) );
+        newThreadPtr->setStartFunctPtr( threadFunction );
+        
+        managerData_.threadsList_.push_back( newThreadPtr );
+        
+        TEAGN_TRUE_OR_THROW(newThreadPtr->start(), "Thread start error" );      
+      }
+    }
+    else
+    {
+      // counting the number of working threads
+      
+      std::list< TeThreadFunctor* >::iterator it = 
+        managerData_.threadsList_.begin();
+      std::list< TeThreadFunctor* >::iterator it_end = 
+        managerData_.threadsList_.end();
+      
+      unsigned long int runningThreads = 0;
+      
+      while( it != it_end )
+      {
+        if( (*it)->getStatus() == TeThreadRunning )
+        {
+          ++runningThreads;
+        }
+        
+        ++it;
+      }
+      
+      // try to activate a new thread       
+      
+      if( runningThreads < managerData_.maxSimulJobs_ )
+      {
+        it = managerData_.threadsList_.begin();
+        
+        while( it != it_end )
+        {
+          if( (*it)->getStatus() == TeThreadStopped )
+          {
+            TEAGN_TRUE_OR_THROW( (*it)->start(), "Thread start error" );
+            break;
+          }
+          
+          ++it;
+        }      
+      }
+    }
+  }
+  
+  // Delete other stopped threads following maxSimulJobs_
+  
+  if( managerData_.threadsList_.size() > 
+    managerData_.maxSimulJobs_ )
+  {
+    std::list< TeThreadFunctor* >::iterator it = 
+      managerData_.threadsList_.begin();
+    std::list< TeThreadFunctor* >::iterator it_end = 
+      managerData_.threadsList_.end();    
+    
+    while( it != it_end )
+    {
+      if( (*it)->getStatus() == TeThreadStopped )
+      {
+        std::list< TeThreadFunctor* >::iterator it_aux = it;
+        --it_aux;
+        
+        delete (*it);
+        
+        managerData_.threadsList_.erase( it );
+        
+        it = it_aux;
+      }
+      
+      if( managerData_.threadsList_.size() == 
+        managerData_.maxSimulJobs_)
+      {
+        break;
+      }
+      
+      ++it;
+    }    
+  }  
+  
+  managerData_.mutex_.unLock();
+  
+  return newJobPtr;
+}
+
+void TeThreadJobsManager::setMaxSimulJobs( unsigned long int maxSimulJobs )
+{
+  managerData_.maxSimulJobs_ = maxSimulJobs;
+}
+
+void TeThreadJobsManager::setAutoMaxSimulJobs()
+{
+  managerData_.maxSimulJobs_ = TeGetPhysProcNumber();
+}
+
+unsigned long int TeThreadJobsManager::getMaxSimulJobs() const
+{
+  return managerData_.maxSimulJobs_;
+}
+
+TeThreadSignal& TeThreadJobsManager::getJobFinishedSignal()
+{
+  return managerData_.jobFinishedSig_;
+}
+
+TeThreadJobsManager::JobStatus TeThreadJobsManager::getJobStatus( 
+  TeThreadJob const* const jobId )
+{
+  managerData_.mutex_.lock();
+  
+  // trying to locate inside awaiting jobs list
+  
+  JobsListT::iterator it = managerData_.awaitingJobsList_.begin(); 
+  JobsListT::iterator it_end = managerData_.awaitingJobsList_.end();
+  
+  while( it != it_end )
+  {
+    if( *it == jobId )
+    {
+      managerData_.mutex_.unLock();
+      return JobAwaiting;
+    }
+    
+    ++it;
+  }
+  
+  // trying to locate inside running jobs list
+  
+  it = managerData_.runningJobsList_.begin(); 
+  it_end = managerData_.runningJobsList_.end();
+  
+  while( it != it_end )
+  {
+    if( *it == jobId )
+    {
+      managerData_.mutex_.unLock();
+      return JobRunning;
+    }
+    ++it;
+  }
+  
+  // job not found
+
+  managerData_.mutex_.unLock();
+  return JobNotRunning;
+}
+
+unsigned long int TeThreadJobsManager::getRunningJobsNumber()
+{
+  managerData_.mutex_.lock();
+  
+  unsigned long int number = managerData_.runningJobsList_.size();
+  
+  managerData_.mutex_.unLock();
+  
+  return number;
+}
+
+unsigned long int TeThreadJobsManager::getAwaitingJobsNumber()
+{
+  managerData_.mutex_.lock();
+  
+  unsigned long int number = managerData_.awaitingJobsList_.size();
+  
+  managerData_.mutex_.unLock();
+  
+  return number;
+}
+
+void TeThreadJobsManager::waitAllToFinish()
+{
+  std::list< TeThreadFunctor* >::iterator it = 
+    managerData_.threadsList_.begin();
+  std::list< TeThreadFunctor* >::iterator it_end = 
+    managerData_.threadsList_.end();
+  
+  while( it != it_end )
+  {
+    (*it)->waitToFinish();
+    
+    ++it;
+  }  
+}
+
+void TeThreadJobsManager::clearAwaitingJobs()
+{
+  managerData_.mutex_.lock();
+  
+  JobsListT::iterator it = managerData_.awaitingJobsList_.begin(); 
+  JobsListT::iterator it_end = managerData_.awaitingJobsList_.end();
+  
+  while( it != it_end )
+  {
+    delete (*it);
+    
+    ++it;
+  } 
+  
+  managerData_.mutex_.unLock();
+}
+
+bool TeThreadJobsManager::threadFunction( void* parsPtr )
+{
+  InternalManagerDataStruct* managerData = (InternalManagerDataStruct*)
+    parsPtr;
+  
+  managerData->mutex_.lock();
+  
+  if( managerData->awaitingJobsList_.size() == 0 )
+  {
+    managerData->mutex_.unLock();
+    
+    return true;
+  }
+  else
+  {
+    do
+    {
+      // Pick up a job
+      
+      TeThreadJob* jobPtr = managerData->awaitingJobsList_.front();
+      managerData->awaitingJobsList_.pop_front();
+      
+      // move it to running jobs list
+      
+      managerData->runningJobsList_.push_back( jobPtr );
+      
+      managerData->mutex_.unLock();
+      
+      // Execute job
+      
+      jobPtr->executeJobCode();
+      
+      // delete job object and remove job from running jobs list
+      
+      managerData->mutex_.lock();
+      
+      managerData->runningJobsList_.erase( std::find(
+        managerData->runningJobsList_.begin(),
+        managerData->runningJobsList_.end(),
+        jobPtr ) );
+      
+      delete jobPtr;
+      
+      // Emitting a job complete signal
+      
+      managerData->jobFinishedSig_.emit();
+      
+    } while( managerData->awaitingJobsList_.size() > 0 );
+      
+    managerData->mutex_.unLock();
+    
+    return true;
+  }
+}
+
diff --git a/src/terralib/kernel/TeThreadJobsManager.h b/src/terralib/kernel/TeThreadJobsManager.h
new file mode 100755
index 0000000..d400079
--- /dev/null
+++ b/src/terralib/kernel/TeThreadJobsManager.h
@@ -0,0 +1,144 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright  2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+
+
+#ifndef __TERRALIB_INTERNAL_TETRHEADJOBSMANAGER_H
+#define __TERRALIB_INTERNAL_TETRHEADJOBSMANAGER_H
+
+#include "TeThreadJob.h"
+#include "TeThreadSignal.h"
+#include "TeMutex.h"
+
+#include <list>
+
+class TeThreadFunctor;
+
+/** \brief A class to control the execution of concurrent jobs using
+ *  spawned threads.
+ *  \author Emiliano F. Castejon <castejon at dpi.inpe.br>
+ */  
+class TL_DLL TeThreadJobsManager
+{
+  public :
+    /*! Job status */
+    enum JobStatus { JobRunning, JobAwaiting, JobNotRunning };
+        
+    TeThreadJobsManager();             
+
+    ~TeThreadJobsManager();
+    
+    /*! \brief Add a job to the waiting jobs list to be executed 
+     * when a thread becomes available or execute the job if the
+     * maximum number of simultâneous jobs is set to zero.
+     * \param job Job to be processed.
+     * \return A unique job ID as an intenal address for the added 
+     * job.
+     */    
+    TeThreadJob const* const executeJob( const TeThreadJob& job );
+    
+    /*! Set the number of threaded jobs that can be executed simultaneously.
+     * \param maxSimulJobs The number of jobs that can be executed simultaneously
+     * (if set to zero, no thread will be spawned and the job execution
+     * will block the current process until it finishes).
+     */
+    void setMaxSimulJobs( unsigned long int maxSimulJobs );
+    
+    /*! Set the number of jobs that can be executed simultaneously using
+     * the number of physical processing units (this is the class default).
+     */
+    void setAutoMaxSimulJobs();    
+    
+    /*! Get the number of jobs that can be executed simultaneously.
+     * \return The number of jobs that can be executed simultaneously.
+     */
+    unsigned long int getMaxSimulJobs() const;    
+    
+    /*! \brief A reference to a signal that will be emitted on
+     * each job completion.
+     * \return A reference to a signal that will be emitted on
+     * each job completion.
+     */     
+    TeThreadSignal& getJobFinishedSignal();
+    
+    /*! \brief Return a job status.
+     * \param jobId Job ID.
+     * \return The job status.
+     */
+    JobStatus getJobStatus( TeThreadJob const* const jobId );
+    
+    /*! \brief Return number of running jobs.
+     * \return The number of running jobs.
+     */    
+    unsigned long int getRunningJobsNumber();
+
+    /*! \brief Return number of awaiting jobs.
+     * \return The number of awaiting jobs.
+     */    
+    unsigned long int getAwaitingJobsNumber();
+    
+    /*! \brief Wait all jobs to finish.
+     */      
+    void waitAllToFinish();
+
+    /*! \brief Clear all waiting jobs (not executed yet).
+     */      
+    void clearAwaitingJobs();
+      
+  protected :
+    
+    /*! Jobs list type definition */
+    typedef std::list< TeThreadJob* > JobsListT;
+    
+    struct InternalManagerDataStruct
+    {
+      /*! Maximum number of simultaneous running jobs */
+      unsigned long int maxSimulJobs_;
+      
+      /*! A signal emitted on each job completion. */
+      TeThreadSignal jobFinishedSig_;
+      
+      /*! The awaiting jobs list. */
+      JobsListT awaitingJobsList_;
+      
+      /*! The running jobs list. */
+      JobsListT runningJobsList_;
+      
+      /*! The thread instances list. */
+      std::list< TeThreadFunctor* > threadsList_;
+      
+      /*! A mutex instance to control access to internal resources. */
+      TeMutex mutex_;
+    };
+    
+    InternalManagerDataStruct managerData_;
+
+    /*! \brief Entry point for all threads.
+     * \param parsPtr Parameters pointer.
+     * \return true if OK.
+     */
+    static bool threadFunction( void* parsPtr );
+
+};
+  
+#endif
+
diff --git a/src/terralib/kernel/TeThreadParameters.h b/src/terralib/kernel/TeThreadParameters.h
new file mode 100755
index 0000000..8fe0b8a
--- /dev/null
+++ b/src/terralib/kernel/TeThreadParameters.h
@@ -0,0 +1,40 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeThreadParameters.h
+   \brief Thread parameters class.
+*/
+
+#ifndef TETRHEADPARAMETERS_H
+  #define TETRHEADPARAMETERS_H
+  
+  #include "TeMultiContainer.h"
+  
+  /**
+   * @brief Thread parameters class.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   * @ingroup Utils
+   */
+  class TL_DLL TeThreadParameters : public TeMultiContainer< std::string > {};
+  
+#endif
+
diff --git a/src/terralib/kernel/TeThreadSignal.cpp b/src/terralib/kernel/TeThreadSignal.cpp
new file mode 100755
index 0000000..6688b5d
--- /dev/null
+++ b/src/terralib/kernel/TeThreadSignal.cpp
@@ -0,0 +1,192 @@
+#include "TeThreadSignal.h"
+
+#include "TeAgnostic.h"
+
+#if TePLATFORM == TePLATFORMCODE_MSWINDOWS
+  #include  <stdio.h>
+#elif TePLATFORM == TePLATFORMCODE_LINUX || TePLATFORM == TePLATFORMCODE_AIX
+  #include <sys/time.h>
+  #include <time.h>
+#else
+  #error "Unsuported plataform"
+#endif   
+
+TeThreadSignal::TeThreadSignal()
+{
+  #if TePLATFORM == TePLATFORMCODE_MSWINDOWS
+  
+   waiters_count_ = 0;
+   wait_generation_count_ = 0;
+   release_count_ = 0;
+
+    // Create a manual-reset event.
+    event_ = CreateEvent (NULL,  // no security
+                          TRUE,  // manual-reset
+                          FALSE, // non-signaled initially
+                          NULL); // unnamed
+    
+  #elif TePLATFORM == TePLATFORMCODE_LINUX || TePLATFORM == TePLATFORMCODE_AIX
+
+    /* Creating mutex */
+
+    pthread_mutexattr_t access_attr;
+    TEAGN_TRUE_OR_THROW( ( pthread_mutexattr_init( &access_attr ) == 0 ),
+      "Unable to init mutex attributes" );
+
+    pthread_mutexattr_settype( &access_attr, PTHREAD_MUTEX_DEFAULT );
+    TEAGN_TRUE_OR_THROW( 
+      ( pthread_mutex_init( &m_access_, &access_attr ) == 0 ),
+      "Unable to init mutex" )
+
+    /* Creating condition variable */
+  
+    TEAGN_TRUE_OR_THROW( ( pthread_cond_init( &condition_var_, 0 ) == 0 ),
+      "Unable to create a condition variable" );
+  
+  #else
+    #error "Unsuported plataform"
+  #endif   
+}
+
+
+TeThreadSignal::~TeThreadSignal()
+{
+  #if TePLATFORM == TePLATFORMCODE_MSWINDOWS
+  
+    CloseHandle( event_ );
+    
+  #elif TePLATFORM == TePLATFORMCODE_LINUX || TePLATFORM == TePLATFORMCODE_AIX
+
+    pthread_cond_destroy( &condition_var_ );
+  
+    pthread_mutex_destroy( &m_access_ );
+  
+  #else
+    #error "Unsuported plataform"
+  #endif   
+}
+
+
+void TeThreadSignal::emit()
+{
+  #if TePLATFORM == TePLATFORMCODE_MSWINDOWS
+  
+    waiters_count_lock_.lock();
+    
+    if ( waiters_count_ > 0) {  
+      SetEvent ( event_);
+      // Release all the threads in this generation.
+      release_count_ =  waiters_count_;
+
+      // Start a new generation.
+      wait_generation_count_++;
+    }
+    
+    waiters_count_lock_.unLock();
+
+  #elif TePLATFORM == TePLATFORMCODE_LINUX || TePLATFORM == TePLATFORMCODE_AIX
+
+    TEAGN_TRUE_OR_THROW( ( pthread_cond_broadcast( &condition_var_ ) == 0 ),
+      "Error emiting signal" );
+
+  #else
+    #error "Unsupported platform"
+  #endif   
+}
+
+
+bool TeThreadSignal::wait( unsigned int waiting_time )
+{
+  bool return_value = true;
+  
+  #if TePLATFORM == TePLATFORMCODE_MSWINDOWS
+  
+    // Avoid race conditions.
+    waiters_count_lock_.lock();
+
+    // Increment count of waiters.
+    waiters_count_++;
+
+    // Store current generation in our activation record.
+    int my_generation =  wait_generation_count_;
+
+    waiters_count_lock_.unLock();
+
+    for (;;) {
+      // Wait until the event is signaled.
+      if( waiting_time == 0 ) {
+        if( WaitForSingleObject ( event_, INFINITE ) != WAIT_OBJECT_0 ) {
+          return_value = false;
+          break;
+        }
+      } else {
+        if( WaitForSingleObject ( event_, waiting_time ) != WAIT_OBJECT_0 ) {
+          return_value = false;
+          break;
+        }      
+      }
+
+      waiters_count_lock_.lock();
+      // Exit the loop when the < event_> is signaled and
+      // there are still waiting threads from this <wait_generation>
+      // that haven't been released from this wait yet.
+      int wait_done =  release_count_ > 0
+                      &&  wait_generation_count_ != my_generation;
+      waiters_count_lock_.unLock();
+
+      if (wait_done)
+        break;
+    }
+
+    waiters_count_lock_.lock();
+    waiters_count_--;
+    release_count_--;
+    int last_waiter =  release_count_ == 0;
+    waiters_count_lock_.unLock();
+
+    if (last_waiter)
+      // We're the last waiter to be notified, so reset the manual event.
+      ResetEvent ( event_);
+
+  #elif TePLATFORM == TePLATFORMCODE_LINUX || TePLATFORM == TePLATFORMCODE_AIX
+
+    TEAGN_TRUE_OR_THROW( ( pthread_mutex_lock( &m_access_ ) == 0 ),
+      "Unable to lock mutex" );
+    
+    if( waiting_time == 0 ) {
+      if( pthread_cond_wait( &condition_var_, &m_access_ ) != 0 ) {
+        return_value = false;
+      }
+    } else {
+      struct timeval timevalstr;
+
+      if( gettimeofday( &timevalstr, 0 ) == 0 ) {
+        struct timespec timespecstr;
+
+        /* seconds */
+        timespecstr.tv_sec = timevalstr.tv_sec + ( waiting_time / 1000 );
+        /* nano-seconds */
+        timespecstr.tv_nsec = ( timevalstr.tv_usec * 1000 ) +
+          ( ( waiting_time % 1000 ) * 1000000 );
+
+        if( pthread_cond_timedwait( &condition_var_, &m_access_, 
+          &timespecstr ) != 0 ) {
+  
+          return_value = false;
+        }
+      } else {
+        TEAGN_LOGWARN( "Unable to get the current time" );
+        return_value = false;
+      }
+    }
+
+    TEAGN_TRUE_OR_THROW( ( pthread_mutex_unlock( &m_access_ ) == 0 ),
+      "Unable to unlock mutex" );
+  
+  #else
+    #error "Unsuported plataform"
+  #endif   
+  
+  return return_value;
+}
+
diff --git a/src/terralib/kernel/TeThreadSignal.h b/src/terralib/kernel/TeThreadSignal.h
new file mode 100755
index 0000000..c906588
--- /dev/null
+++ b/src/terralib/kernel/TeThreadSignal.h
@@ -0,0 +1,141 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeThreadSignal.h
+  \brief This file contains definitions about a class to deal thread 
+  signals.
+*/
+
+
+#ifndef TETHREADSIGNAL_H
+  #define TETHREADSIGNAL_H
+  
+  #include "TeDefines.h"
+  
+  #if TePLATFORM == TePLATFORMCODE_MSWINDOWS
+    #include <windows.h>
+    #include "TeMutex.h"
+  #elif TePLATFORM == TePLATFORMCODE_LINUX || TePLATFORM == TePLATFORMCODE_AIX
+    #include <pthread.h>
+    #include  <errno.h>
+  #else
+    #error "ERROR: Unsupported platform"
+  #endif  
+ 
+  /**
+   * @brief A class to deal with thread signals.
+   * @author Emiliano F. Castejon <castejon at dpi.inpe.br>
+   */
+  class TL_DLL TeThreadSignal
+  {
+    public :
+    
+      /**
+       * @brief Default constructor.
+       */    
+      TeThreadSignal();
+
+      /**
+       * @brief Default destructor.
+       */       
+      ~TeThreadSignal();
+      
+      /**
+       * @brief Emit a broadcast signal unblocking all waiting threads.
+       */       
+      void emit();      
+      
+      /**
+       * @brief Block the current thread waiting for a signal.
+       * @param waiting_time The maximim waiting time in milliseconds
+       * ( 0 == INFINITE ).
+       * @return true if a signal was received, false if the waiting
+       * time has finished or an error occurred.
+       */       
+      bool wait( unsigned int waiting_time = 0 );      
+      
+    protected :
+   
+      #if TePLATFORM == TePLATFORMCODE_MSWINDOWS
+    
+        /**
+        * @brief Count of the number of waiters.
+        */      
+        int waiters_count_;
+
+        /**
+        * @brief Serialize access to waiters_count_.
+        */  
+        TeMutex waiters_count_lock_;
+        
+        /**
+        * @brief Number of threads to release via a 
+        * signal broadcast.
+        */ 
+        int release_count_;
+
+        /**
+        * @brief Keeps track of the current "generation" so that we 
+        * don't allow one thread to steal all the "releases" from the 
+        * broadcast.
+        */ 
+        int wait_generation_count_;
+
+        /**
+        * @brief A manual-reset event that's used to block and release 
+        * waiting threads.
+        */ 
+        HANDLE event_;
+      
+      #elif TePLATFORM == TePLATFORMCODE_LINUX || TePLATFORM == TePLATFORMCODE_AIX
+
+        /**
+        * @brief The mutex instance.
+        */        
+        pthread_mutex_t m_access_;
+        
+        /**
+        * @brief The condition var instance.
+        */        
+        pthread_cond_t condition_var_;
+
+      
+      #else
+        #error "Unsuported plataform"
+      #endif   
+   
+    private :
+    
+      /**
+       * @brief Alternative constructor.
+       */    
+      TeThreadSignal(  const TeThreadSignal& ) {};
+   
+      /**
+       * @brief operator= overload.
+       * @return A const reference to the current instance.
+       */      
+      const TeThreadSignal& operator=( const TeThreadSignal& ) { return *this; };
+ 
+  };
+
+#endif
diff --git a/src/terralib/kernel/TeTime.cpp b/src/terralib/kernel/TeTime.cpp
old mode 100644
new mode 100755
index 0f99dec..9b3f1fa
--- a/src/terralib/kernel/TeTime.cpp
+++ b/src/terralib/kernel/TeTime.cpp
@@ -1,6 +1,6 @@
  /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -25,11 +25,13 @@ of this library and its documentation.
 #include <memory.h>
 #include <TeUtils.h>
 #include <iostream>
+#include <cstring>
+#include <cstdlib>
 
 //return the number of the month
-int getMonth(const string& month)
+int getMonth(const std::string& month)
 {
-	string tempM = TeConvertToUpperCase(month);
+	std::string tempM = TeConvertToUpperCase(month);
 	if(tempM=="JAN")
 		return 0;
 	else if(tempM=="FEB")
@@ -59,7 +61,7 @@ int getMonth(const string& month)
 }
 
 //return the month 
-string getMonth(int i)
+std::string getMonth(int i)
 {
 	if(i==0)
 		return "Jan";
@@ -106,7 +108,7 @@ TeTime::TeTime()
 	ts_.tm_min = 0;
 	ts_.tm_hour = 0;
 	ts_.tm_isdst = -1;
-	ts_.tm_mday = 0;
+	ts_.tm_mday = 1;
 	ts_.tm_mon = 0;
 	ts_.tm_year = 0;
 }
@@ -126,27 +128,27 @@ TeTime::TeTime(int h, int m, int s, TeChronon chronon)
 	ts_.tm_min = m;
 	ts_.tm_hour = h;
 	ts_.tm_isdst = -1;
-	ts_.tm_mday = 0;
+	ts_.tm_mday = 1;
 	ts_.tm_mon = 0;
 	ts_.tm_year = 0;
 	last_ = mktime(&ts_);
 	chronon_ = chronon;
 }
 
-TeTime::TeTime(const string& ds, TeChronon chronon, const string& mask, const string& dateS, const string& timeS, const string& indPM)
+TeTime::TeTime(const std::string& ds, TeChronon chronon, const std::string& mask, const std::string& dateS, const std::string& timeS, const std::string& indPM)
 {
 	chronon_ = chronon;
 	ts_.tm_sec = 0;
 	ts_.tm_min = 0;
 	ts_.tm_hour = 0;
 	ts_.tm_isdst = -1; 
-	ts_.tm_mday = 0;
+	ts_.tm_mday = 1;
 	ts_.tm_mon = 0;
 	ts_.tm_year = 0;
 	
 	bool flag = true;
-	string tempDT, tempM;
-	string maskTemp = mask;
+	std::string tempDT, tempM;
+	std::string maskTemp = mask;
 	
 	int posBeginMask = 0;
 	int posBeginDate = 0;
@@ -161,6 +163,18 @@ TeTime::TeTime(const string& ds, TeChronon chronon, const string& mask, const st
 	{
 		sscanf(ds.c_str(),"%2d%2d%4d",&ts_.tm_mday,&ts_.tm_mon,&ts_.tm_year);
 	}
+	else if (mask == "DDAAAAMM" || mask == "ddaaaamm" || mask == "DDYYYYMM" || mask == "ddyyyymm")
+	{
+		sscanf(ds.c_str(),"%2d%4d%2d",&ts_.tm_mday,&ts_.tm_year,&ts_.tm_mon);
+	}
+	else if (mask == "MMDDAAAA" || mask == "mmddaaaa" || mask == "MMDDYYYY" || mask == "mmddyyyy")
+	{
+		sscanf(ds.c_str(),"%2d%4d%2d",&ts_.tm_mon,&ts_.tm_mday,&ts_.tm_year);
+	}
+	else if (mask == "AAAADDMM" || mask == "aaaaddmm" || mask == "YYYYDDMM" || mask == "yyyyddmm")
+	{
+		sscanf(ds.c_str(),"%4d%2d%2d",&ts_.tm_year,&ts_.tm_mday,&ts_.tm_mon);
+	}
 	else
 	{
 		while(flag)
@@ -178,14 +192,14 @@ TeTime::TeTime(const string& ds, TeChronon chronon, const string& mask, const st
 				if(posBeginMask>0)
 					++posEndTotalMask;
 				
-				maskTemp = maskTemp.substr(posEndMask+1, (maskTemp.size()-(posEndMask+1)));
+				maskTemp = maskTemp.substr(posEndMask+1);
 			}
 
 			tempDT.clear();
 			tempM = mask.substr(posBeginMask,(posEndTotalMask-posBeginMask));
 
 			//fill the datetime
-			string dt = ds.substr(posBeginDate,1);
+			std::string dt = ds.substr(posBeginDate,1);
 			while((dt!=dateS) && (dt!=timeS) && (dt!=" ") && (posBeginDate < (int)ds.size()))
 			{
 				tempDT += dt;
@@ -244,7 +258,7 @@ TeTime::TeTime(const string& ds, TeChronon chronon, const string& mask, const st
 		ts_.tm_mon = 1;
         break;
 	case TeMONTH :
-		ts_.tm_mday = 0;
+		ts_.tm_mday = 1;
         break;
 	case TeDAY :
 		ts_.tm_hour = 0;
@@ -274,7 +288,7 @@ time_t TeTime::now(void)
 	return last_;
 }
 
-string
+std::string
 TeTime::getTime() 
 {
 	char tbuf[9];
@@ -284,7 +298,7 @@ TeTime::getTime()
 }
 
 
-string
+std::string
 TeTime::getDate()  
 {
 	char dbuf[12];
@@ -292,17 +306,14 @@ TeTime::getDate()
 	return dbuf;
 }
 
-string
-TeTime::getDateTime (const string& mask, const string& dateS, const string& timeS, const string& indPM, const string& indAM)
+std::string
+TeTime::getDateTime (const std::string& mask, const std::string& dateS, const std::string& timeS, const std::string& indPM, const std::string& indAM)
 {
-	string result = "";
-
-	if(!this->isValid())
-		return result;
+	std::string result = "";
 
 	bool flag = true;
-	string tempM;
-	string maskTemp = mask;
+	std::string tempM;
+	std::string maskTemp = mask;
 	
 	int posBeginMask = 0;
 	int posEndMask;
@@ -313,7 +324,7 @@ TeTime::getDateTime (const string& mask, const string& dateS, const string& time
 	bool am = false;
  
 	//verify if the mask is AM and PM
-	string tempAPM = mask.substr(mask.size()-1, 1);
+	std::string tempAPM = mask.substr(mask.size()-1, 1);
 	if(tempAPM=="T")
 	{
 		if((ts_.tm_hour>12) || ((ts_.tm_hour==12) && (ts_.tm_min>0)) ||
@@ -338,7 +349,7 @@ TeTime::getDateTime (const string& mask, const string& dateS, const string& time
 			if(posBeginMask>0)
 				++posEndTotalMask;
 
-			maskTemp = maskTemp.substr(posEndMask+1, (maskTemp.size()-(posEndMask+1)));
+			maskTemp = maskTemp.substr(posEndMask+1);
 		}
 
 		tempM = mask.substr(posBeginMask,(posEndTotalMask-posBeginMask));
@@ -363,7 +374,7 @@ TeTime::getDateTime (const string& mask, const string& dateS, const string& time
 				result +=  Te2String(ts_.tm_year+1900) + dateS;
 			else
 			{
-				string tempY = Te2String(ts_.tm_year);
+				std::string tempY = Te2String(ts_.tm_year);
 				tempY = tempY.substr(tempY.size()-2, 2);
 				result += tempY + dateS;
 			}
@@ -580,12 +591,21 @@ TeTime::operator<=(const TeTime& time) const
 	return (this->operator<(time) || this->operator==(time));
 }
 
+int 
+TeTime::operator-(const TeTime& other)
+{
+	if(this->chronon_!=other.chronon_)
+		return 0;
+	int t = (int)this->last_- other.last_;
+	return (t);
+}
+
 bool 
 TeTime::isValid()  
 {
 	if(	(chronon_==TeSECOND) && (ts_.tm_sec==0) && (ts_.tm_min==0) && 
-		(ts_.tm_hour==0) && (ts_.tm_mday==0) &&
-		(ts_.tm_mon==0) && (ts_.tm_year==0))
+		(ts_.tm_hour==0) && (ts_.tm_mday==1) &&
+		((ts_.tm_mon==0) || (ts_.tm_mon==-1)) && (ts_.tm_year==0))
 		return false;
 	else
 		return true;
@@ -601,7 +621,7 @@ TeTime::chronon (TeChronon c)
 }
 
 
-ostream& operator<<(ostream& os, TeTime& N)
+std::ostream& operator<<(std::ostream& os, TeTime& N)
 {
 	os << N.getDateTime();
 	return os;
diff --git a/src/terralib/kernel/TeTime.h b/src/terralib/kernel/TeTime.h
old mode 100644
new mode 100755
index ec245c4..322d252
--- a/src/terralib/kernel/TeTime.h
+++ b/src/terralib/kernel/TeTime.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,15 +20,13 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeTime.h
-    This file contains structures and definitions to deal with date and time
+    \brief This file contains structures and definitions to deal with date and time
 */
-
 #ifndef  __TERRALIB_INTERNAL_TIME_H
 #define  __TERRALIB_INTERNAL_TIME_H
 
-
+#include "TeDefines.h"
 #include "TeDataTypes.h"
 
 #include <time.h> 
@@ -36,16 +34,12 @@ of this library and its documentation.
 #include <string>
 #include <iostream>
 
-
-using namespace std;
-
-
 //!  A class for supporting date and time. 
-class TeTime
+class TL_DLL TeTime
 {
-    struct tm ts_; 		// Unix time structure
-    time_t last_;		// time in seconds
-	TeChronon chronon_;
+    struct tm	ts_; 		// Unix time structure
+    time_t		last_;		// time in seconds
+	TeChronon	chronon_;
 
 public:
 	
@@ -62,18 +56,17 @@ public:
 	TeTime(int h, int m, int s, TeChronon chronon);
 
 	//!	Set date and time from arguments, though the time fields.  
-	TeTime(	const string& dt, TeChronon chronon, const string& mask, 
-			const string& dateS = "/", const string& timeS = ":", const string& indPM = "PM");
+	TeTime(	const std::string& dt, TeChronon chronon, const std::string& mask, 
+			const std::string& dateS = "/", const std::string& timeS = ":", const std::string& indPM = "PM");
 
-	//!	Return a time of day string in format "hh:mm:ss"
-	string getTime();
+	//!	Return a time of day std::string in format "hh:mm:ss"
+	std::string getTime();
 
-	//!	Return a string to the date in the form "yyyy-mm-dd"
-	string getDate(void);
+	//!	Return a std::string to the date in the form "yyyy-mm-dd"
+	std::string getDate(void);
 
 	//!	Return a pointer to the date and time in the form passed in mask.  
-	string getDateTime (const string& mask= "DDsMMsYYYYsHHsmmsSS", const string& dateS="/", const string& timeS=":", const string& indPM="PM", const string& indAM="AM");
-
+	std::string getDateTime (const std::string& mask= "DDsMMsYYYYsHHsmmsSS", const std::string& dateS="/", const std::string& timeS=":", const std::string& indPM="PM", const std::string& indAM="AM");
 
 	//! Reset time to the specified arguments. Return time_t: number of seconds since 0:00:00 Jan 1 1987
 	/*!
@@ -86,7 +79,6 @@ public:
 	 */
 	time_t Set(int y, int m, int d, int h = 0, int min = 0, int s = 0);
 
-
 	//! Get year value as an four digit integer
 	int year()	{return ts_.tm_year+1900;}  
 	
@@ -138,17 +130,22 @@ public:
 	//! Operator <
 	bool operator<(const TeTime& time) const;
 
+	//! Operator <=
 	bool operator<=(const TeTime& time) const;
+
+	//!	Returns the difference betwwen the times in seconds
+	int operator-(const TeTime& other);
 	
-	//! verify if the time has null values  
+	//! Verify if the time has null values  
 	bool isValid();  
-	
-	//!	Normal destructor.
+
+    //!	Normal destructor.
     ~TeTime(void) { }
 
 };
 
-ostream& operator<<(ostream& os, TeTime& N);
+//! Operator to display an instance of TeTime
+TL_DLL std::ostream& operator<<(std::ostream& os, TeTime& N);
 
 
 #endif
diff --git a/src/terralib/kernel/TeTimeInterval.cpp b/src/terralib/kernel/TeTimeInterval.cpp
old mode 100644
new mode 100755
index 4b39b92..5685930
--- a/src/terralib/kernel/TeTimeInterval.cpp
+++ b/src/terralib/kernel/TeTimeInterval.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -23,9 +23,9 @@ of this library and its documentation.
 
 #include "TeTimeInterval.h"
 
-TeTimeInterval :: TeTimeInterval(const string& s1, const string& s2, TeChronon chronon, 
-								 const string& mask, const string& dateS, const string& timeS, 
-								 const string& indPM)
+TeTimeInterval :: TeTimeInterval(const std::string& s1, const std::string& s2, TeChronon chronon, 
+								 const std::string& mask, const std::string& dateS, const std::string& timeS, 
+								 const std::string& indPM)
 {
 	intChronon_ = chronon;
 	//build t1 and t2 with the chronon parameter 
@@ -93,7 +93,7 @@ TeTimeInterval :: length ()
 }
 
 void  
-TeTimeInterval :: shift (const string& t)
+TeTimeInterval :: shift (const std::string& t)
 {
 	TeTime new_t1; 
 	if (t == "")  
diff --git a/src/terralib/kernel/TeTimeInterval.h b/src/terralib/kernel/TeTimeInterval.h
old mode 100644
new mode 100755
index 878c95b..146abd2
--- a/src/terralib/kernel/TeTimeInterval.h
+++ b/src/terralib/kernel/TeTimeInterval.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,18 +20,17 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeTimeInterval.h
-    This file contains structures and definitions to deal with date and time intervals
+    \brief This file contains structures and definitions to deal with date and time intervals
 */
 
 #ifndef  __TERRALIB_INTERNAL_TIMEINTERVAL_H
 #define  __TERRALIB_INTERNAL_TIMEINTERVAL_H
 
-#include <TeTime.h> 
+#include "TeTime.h" 
 
 //! This class provides a set of functions for manipulating date and time intervals
-class TeTimeInterval
+class TL_DLL TeTimeInterval
 {
 private:
 
@@ -56,10 +55,10 @@ public:
 	TeTimeInterval(const TeTimeInterval& t): t1_(t.t1_), t2_(t.t2_) {}
 
 	//!	Set date and time from arguments, though the time fields defaults to zero.
-	TeTimeInterval(const string& t1, const string& t2, TeChronon chronon=TeSECOND, const string& mask="YYYYsMMsDDsHHsmmsSS", const string& dateS = "/", const string& timeS = ":", const string& indPM = "PM");
+	TeTimeInterval(const std::string& t1, const std::string& t2, TeChronon chronon=TeSECOND, const std::string& mask="YYYYsMMsDDsHHsmmsSS", const std::string& dateS = "/", const std::string& timeS = ":", const std::string& indPM = "PM");
 
 	//!	Set date and time from arguments, though the time fields defaults to zero.
-	TeTimeInterval(const string& t1, TeChronon chronon=TeSECOND, const string& mask="YYYYsMMsDDsHHsmmsSS", int delta = 0, int numsteps = 1): 
+	TeTimeInterval(const std::string& t1, TeChronon chronon=TeSECOND, const std::string& mask="YYYYsMMsDDsHHsmmsSS", int delta = 0, int numsteps = 1): 
 		t1_ (t1,  chronon, mask)
 	{
 		t2_ = t1_ + (delta-1)*numsteps; 
@@ -72,17 +71,17 @@ public:
 	//! Sets the chronon of the interval
 	void intervalChronon(TeChronon c);  
 
-	//!	Return a time of day string in format "hh:mm:ss"
-	string getInitialTime()			{return t1_.getTime();}
+	//!	Return a time of day std::string in format "hh:mm:ss"
+	std::string getInitialTime()			{return t1_.getTime();}
 
-	//!	Return a time of day string in format "hh:mm:ss"
-	string getFinalTime()			{return t2_.getTime();}
+	//!	Return a time of day std::string in format "hh:mm:ss"
+	std::string getFinalTime()			{return t2_.getTime();}
 
-	//!	Return a string to the date in the form "yyyy-mm-dd"
-	string getInitialDate(void)		{return t1_.getDate();}
+	//!	Return a std::string to the date in the form "yyyy-mm-dd"
+	std::string getInitialDate(void)		{return t1_.getDate();}
 
-	//!	Return a string to the date in the form "yyyy-mm-dd"
-	string getFinalDate(void)		{return t2_.getDate();}
+	//!	Return a std::string to the date in the form "yyyy-mm-dd"
+	std::string getFinalDate(void)		{return t2_.getDate();}
 
 	//! Return the time t1_
 	TeTime& getT1 (void) {return t1_;}
@@ -91,10 +90,10 @@ public:
 	TeTime& getT2 (void) {return t2_;}
 
 	//!	Return a pointer to the date and time in the form passed in mask.  
-	string getInitialDateTime (const string& mask="YYYYsMMsDDsHHsmmsSS", const string& dateS="/", const string& timeS=":", const string& indPM="PM", const string& indAM="AM") {return t1_.getDateTime(mask, dateS, timeS, indPM, indAM);}
+	std::string getInitialDateTime (const std::string& mask="YYYYsMMsDDsHHsmmsSS", const std::string& dateS="/", const std::string& timeS=":", const std::string& indPM="PM", const std::string& indAM="AM") {return t1_.getDateTime(mask, dateS, timeS, indPM, indAM);}
 
 	//!	Return a pointer to the date and time in the form passed in mask.  
-	string getFinalDateTime (const string& mask="YYYYsMMsDDsHHsmmsSS", const string& dateS="/", const string& timeS=":", const string& indPM="PM", const string& indAM="AM") {return t2_.getDateTime(mask, dateS, timeS, indPM, indAM);}
+	std::string getFinalDateTime (const std::string& mask="YYYYsMMsDDsHHsmmsSS", const std::string& dateS="/", const std::string& timeS=":", const std::string& indPM="PM", const std::string& indAM="AM") {return t2_.getDateTime(mask, dateS, timeS, indPM, indAM);}
 
 	
 	//! Reset time to the specified arguments. Return time_t: number of seconds since 0:00:00 Jan 1 1987
@@ -128,6 +127,8 @@ public:
 	//! Operator ==
 	bool operator==(const TeTimeInterval& other) const { return (this->t1_ == other.t1_ && this->t2_ == other.t2_); } 
 
+	bool operator<(const TeTimeInterval& other) const { return (this->t1_ < other.t1_ && this->t2_ < other.t2_); } 
+
 	//! Compute legnth of time interval in units of chonon
 	int length ();
 
@@ -136,7 +137,7 @@ public:
 		If t is not provided, the current final time becomes the initial time. 
 		The interval length is maintained.
 	*/
-	void shift (const string& t = "");
+	void shift (const std::string& t = "");
 
 	
 	//! Shift the interval, begining delta units after the initial time. The interval length is maintained.
@@ -146,20 +147,22 @@ public:
 	void shiftMinus (int delta);
 
 	//! verify if the times have null values
-	bool isValid() { return (t1_.isValid() || t2_.isValid()); } 
+	bool isValid() 
+	{ return (t1_.isValid() || t2_.isValid()); } 
 	
     //!	Normal destructor.
 	~TeTimeInterval(void) { }
 
-	//! verify if a specific time is during the interval time
+	//! Verify if a specific time is during the interval time
 	bool  during (TeTime& time);
 
-	//! verify if a specific time is before the interval time
+	//! Verify if a specific time is before the interval time
 	bool  before (TeTime& time);
 
-
 };
-ostream& operator<<(ostream& os, TeTime& N);
+
+//! Standard output operator definition
+TL_DLL std::ostream& operator<<(std::ostream& os, TeTime& N);
 
 #endif
 
diff --git a/src/terralib/kernel/TeTin.cpp b/src/terralib/kernel/TeTin.cpp
old mode 100644
new mode 100755
index 8d4e055..f5c272a
--- a/src/terralib/kernel/TeTin.cpp
+++ b/src/terralib/kernel/TeTin.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -25,6 +25,7 @@ of this library and its documentation.
 #include "TeStdFile.h"
 #include "TeException.h"
 #include "TeGeometryAlgorithms.h"
+
 #include <iostream>
 #include <fstream>
 #include <algorithm>
@@ -32,14 +33,14 @@ of this library and its documentation.
 // TeTinTriangleSet
 
 bool
-TeTinTriangleSet::loadFromFile(string &fileName)
+TeTinTriangleSet::loadFromFile(std::string &fileName)
 {
 //	Open tin triangles file
-	string trianglesFile = fileName;
+	std::string trianglesFile = fileName;
 	trianglesFile += ".tpl";
 
-	ifstream inStream;
-	inStream.open( trianglesFile.data(), ios::in | ios::binary );
+	std::ifstream inStream;
+	inStream.open( trianglesFile.data(), std::ios::in | std::ios::binary );
 
 	if (! inStream.good() )
 		return false;
@@ -47,18 +48,18 @@ TeTinTriangleSet::loadFromFile(string &fileName)
 	long laux;
 //#if defined(SPRWIN) || defined(LITTLEENDIAN) - File is saved in LITTLEENDIAN
 	inStream.read((char*)&laux, sizeof(long));
-	int numTriangles = laux;
+	long numTriangles = laux;
 
-//	Create and set tin triangles vector
+//	Create and std::set tin triangles std::vector
 	if ( this->size () )
 		this->clear ();
 	this->reserve (numTriangles);
 
 //	Read file for triangles data load
 	long lineid [3];
-	for (int i = 0; i < numTriangles; i++)
+	for (long i = 0; i < numTriangles; i++)
 	{
-		for (int j = 0; j < 3; j++)
+		for (long j = 0; j < 3; j++)
 		{
 			if (! inStream.good() )
 				return false;
@@ -72,14 +73,14 @@ TeTinTriangleSet::loadFromFile(string &fileName)
 }
 
 bool
-TeTinVertexSet::loadFromFile(string &fileName)
+TeTinVertexSet::loadFromFile(std::string &fileName)
 {
 //	Open tin vertices file
-	string verticesFile = fileName;
+	std::string verticesFile = fileName;
 	verticesFile += ".tnd";
 
-	ifstream inStream;
-	inStream.open( verticesFile.data(), ios::in | ios::binary );
+	std::ifstream inStream;
+	inStream.open( verticesFile.data(), std::ios::in | std::ios::binary );
 
 	if (! inStream.good() )
 		return false;
@@ -87,18 +88,18 @@ TeTinVertexSet::loadFromFile(string &fileName)
 	long laux;
 //#if defined(SPRWIN) || defined(LITTLEENDIAN) - File is saved in LITTLEENDIAN
 	inStream.read((char*)&laux, sizeof(long));
-	int numVertices = laux;
+	long numVertices = laux;
 
-//	Create and set tin vertices vector
+//	Create and std::set tin vertices std::vector
 	if ( this->size () )
 		this->clear ();
 	this->reserve (numVertices);
 
 //	Read file for vertices data load
 	double x, y;
-	float value;
+	double value;
 	short vertexType;
-	for (int i = 0; i < numVertices; i++)
+	for (long i = 0; i < numVertices; i++)
 	{
 		if (! inStream.good() )
 			return false;
@@ -108,7 +109,7 @@ TeTinVertexSet::loadFromFile(string &fileName)
 		inStream.read((char*)&y, sizeof(double));
 		if (! inStream.good() )
 			return false;
-		inStream.read((char*)&value, sizeof(float));
+		inStream.read((char*)&value, sizeof(double));
 		if (! inStream.good() )
 			return false;
 		inStream.read((char*)&vertexType, sizeof(short));
@@ -119,14 +120,14 @@ TeTinVertexSet::loadFromFile(string &fileName)
 }
 
 bool
-TeTinEdgeSet::loadFromFile(string &fileName)
+TeTinEdgeSet::loadFromFile(std::string &fileName)
 {
 //	Open tin edges file
-	string edgesFile = fileName;
+	std::string edgesFile = fileName;
 	edgesFile += ".tln";
 
-	ifstream inStream;
-	inStream.open( edgesFile.data(), ios::in | ios::binary );
+	std::ifstream inStream;
+	inStream.open( edgesFile.data(), std::ios::in | std::ios::binary );
 
 	if (! inStream.good() )
 		return false;
@@ -136,14 +137,14 @@ TeTinEdgeSet::loadFromFile(string &fileName)
 	inStream.read((char*)&laux, sizeof(long));
 	long numEdges = laux;
 
-//	Create and set tin edges vector
+//	Create and std::set tin edges std::vector
 	if ( this->size () )
 		this->clear ();
 	this->reserve (numEdges);
 
 //	Read file for edges data load
 	long from, to, left, right;
-	for (int i = 0; i < numEdges; i++)
+	for (long i = 0; i < numEdges; i++)
 	{
 		if (! inStream.good() )
 			return false;
@@ -168,7 +169,7 @@ TeTinEdgeSet::loadFromFile(string &fileName)
 // TeTin
 
 bool
-TeTin::loadFromFile(string &fileName)
+TeTin::loadFromFile(std::string &fileName)
 {
 	if ( triangleSet_.loadFromFile ( fileName ) )
 	{
@@ -184,11 +185,11 @@ TeTin::loadFromFile(string &fileName)
 bool
 TeTin::getLines(TeLineSet &lineSet)
 {
-	vector<TeTinEdge>::iterator i = edgeSet_.begin();
+	std::vector<TeTinEdge>::iterator i = edgeSet_.begin();
 	while ( i != edgeSet_.end() )
 	{
-		int from = (*i).from();
-		int to = (*i).to();
+		long from = (*i).from();
+		long to = (*i).to();
 		TeCoord2D ptf = vertexSet_[from].location();
 		TeCoord2D ptt = vertexSet_[to].location();
 		i++;
@@ -201,11 +202,11 @@ TeTin::getLines(TeLineSet &lineSet)
 	return true;
 }
 
-int
-TeTin::oneEdgeWithVertex(int v)
+long
+TeTin::oneEdgeWithVertex(long v)
 {
-	int vsize = vertexSet_.size();
-	int edge;
+	long vsize = vertexSet_.size();
+	long edge;
 	if (v < vsize)
 	{
 		TeTinVertex vv = vertexSet_[v];
@@ -220,16 +221,17 @@ TeTin::oneEdgeWithVertex(int v)
 			 ( edgeSet_[edge].from() == v ) )
 		return edge;
 
-	static int	oldedge = 0;	// Set one edge only once
+	//Fail safe code, must return from previous code
+	static long	oldedge = 0;	// Set one edge only once
 
-	int j = 0;
+	long j = 0;
 	while (j < 2)
 	{
-		unsigned int i;
+		unsigned long i;
 		for (i = oldedge; i < edgeSet_.size(); i++)
 		{
-			int from = edgeSet_[i].from();
-			int to   = edgeSet_[i].to();
+			long from = edgeSet_[i].from();
+			long to   = edgeSet_[i].to();
 			if ( from == -1 || to == -1 )
 				continue;
 			if (from == v || to == v)
@@ -244,13 +246,13 @@ TeTin::oneEdgeWithVertex(int v)
 	return -1;
 }
 
-int
-TeTin::edgeOppVertex(int t, int v)
+long
+TeTin::edgeOppVertex(TeTinTriangle& t, long v)
 {
-	int edges[3];
-	triangleSet_[t].edges(edges[0],edges[1],edges[2]);
+	long edges[3];
+	t.edges(edges[0],edges[1],edges[2]);
 
-	for (int i = 0; i < 3; i++)
+	for (long i = 0; i < 3; i++)
 	{
 		if ( edgeSet_[edges[i]].from() != v &&
 		     edgeSet_[edges[i]].to()   != v )
@@ -259,14 +261,14 @@ TeTin::edgeOppVertex(int t, int v)
 	return -1;
 }
 
-int
-TeTin::vertexOppEdge(int t, int e)
+long
+TeTin::vertexOppEdge(long t, long e)
 {
-	int edges[3];
+	long edges[3];
 	triangleSet_[t].edges(edges[0],edges[1],edges[2]);
 
-	int vef(-1), vet(-1);
-	unsigned int i;
+	long vef(-1), vet(-1);
+	unsigned long i;
 	for (i = 0; i < 3; i++)
 	{
 		if ( edges[i] == e )
@@ -295,13 +297,13 @@ TeTin::vertexOppEdge(int t, int e)
 	return -1;
 }
 
-int
-TeTin::edgeWithVertexDiffFromEdge(int t, int v, int e)
+long
+TeTin::edgeWithVertexDiffFromEdge(long t, long v, long e)
 {
-	int edges[3];
+	long edges[3];
 	triangleSet_[t].edges(edges[0],edges[1],edges[2]);
 
-	for (int i = 0; i < 3; i++)
+	for (long i = 0; i < 3; i++)
 	{
 		if ( edges[i] == e )
 			continue;
@@ -313,21 +315,21 @@ TeTin::edgeWithVertexDiffFromEdge(int t, int v, int e)
 }
 
 bool
-TeTin::vertexOppEdges(int v, list<int> &edges)
+TeTin::vertexOppEdges(long v, std::list<long> &edges)
 {
 //	Find one line that contains node
-	int a = oneEdgeWithVertex(v);
+	long a = oneEdgeWithVertex(v);
 	if (a == -1)
 		return false;
 
 //	1. Defina td como sendo o tri�ngulo que est� � direita da aresta a e
-	int td = edgeSet_[a].right(); // te como sendo o tri�ngulo que est�
-	int te = edgeSet_[a].left();  // � esquerda de a,
+	long td = edgeSet_[a].right(); // te como sendo o tri�ngulo que est�
+	long te = edgeSet_[a].left();  // � esquerda de a,
 
-	int ai = a; // 2. Defina ai como sendo aresta a 
-	int ti = td;//    e ti como sendo o tri�ngulo td,
+	long ai = a; // 2. Defina ai como sendo aresta a 
+	long ti = td;//    e ti como sendo o tri�ngulo td,
 
-	int ao;
+	long ao;
  
 	if ( ti != -1 ) // 3. Se o tri�ngulo ti n�o for nulo,
 	{				//    insira aresta ao de ti que n�o � diretamente
@@ -354,11 +356,11 @@ TeTin::vertexOppEdges(int v, list<int> &edges)
 			continue;//	 4.1.5. Retorne a 4.
 		}
 
-		int aaux = edgeWithVertexDiffFromEdge ( ti, v, ai );// 4.2. Defina a
+		long aaux = edgeWithVertexDiffFromEdge ( ti, v, ai );// 4.2. Defina a
 		if (aaux == -1)	 // aresta aaux do tri�ngulo ti que conecta o
 			return false;// v�rtice v e � diferente de ai,
 
-		int taux;
+		long taux;
 		if (edgeSet_[aaux].right() == ti) // 4.3. Defina taux como sendo  
 			taux = edgeSet_[aaux].left();//  o tri�ngulo que compartilha
 		else if (edgeSet_[aaux].left() == ti)// a aresta aaux com ti,
@@ -381,19 +383,19 @@ TeTin::vertexOppEdges(int v, list<int> &edges)
 }
 
 bool
-TeTin::vertexEdges(int v, list<int> &edges)
+TeTin::vertexEdges(long v, std::list<long> &edges)
 {
 //	Find one line that contains node
-	int a = oneEdgeWithVertex(v);
+	long a = oneEdgeWithVertex(v);
 	if (a == -1)
 		return false;
 
 //	1. Defina td como sendo o tri�ngulo que est� � direita da aresta a e
-	int td = edgeSet_[a].right(); // te como sendo o tri�ngulo que est�
-	int te = edgeSet_[a].left();  // � esquerda de a,
+	long td = edgeSet_[a].right(); // te como sendo o tri�ngulo que est�
+	long te = edgeSet_[a].left();  // � esquerda de a,
 
-	int ai = a; // 2. Defina ai como sendo aresta a 
-	int ti = td;//    e ti como sendo o tri�ngulo td,
+	long ai = a; // 2. Defina ai como sendo aresta a 
+	long ti = td;//    e ti como sendo o tri�ngulo td,
 
 	edges.push_back (ai);//	3. Insira a aresta ai no conjunto A,
 
@@ -407,11 +409,11 @@ TeTin::vertexEdges(int v, list<int> &edges)
 			continue;// 4.1.4. Retorne a 4.
 		}
 
-		int aaux = edgeWithVertexDiffFromEdge ( ti, v, ai );// 4.2. Defina a
+		long aaux = edgeWithVertexDiffFromEdge ( ti, v, ai );// 4.2. Defina a
 		if (aaux == -1)	 // aresta aaux do tri�ngulo ti que conecta o
 			return false;// v�rtice v e � diferente de ai,
 
-		int taux;
+		long taux;
 		if (edgeSet_[aaux].right() == ti) // 4.3. Defina taux como sendo  
 			taux = edgeSet_[aaux].left();//  o tri�ngulo que compartilha
 		else if (edgeSet_[aaux].left() == ti)// a aresta aaux com ti,
@@ -428,21 +430,21 @@ TeTin::vertexEdges(int v, list<int> &edges)
 }
 
 bool
-TeTin::vertexOppVertices(int v, list<int> &vertices)
+TeTin::vertexOppVertices(long v, std::list<long> &vertices)
 {
 //	Find one line that contains node
-	int a = oneEdgeWithVertex(v);
+	long a = oneEdgeWithVertex(v);
 	if (a == -1)
 		return false;
 
 //	1. Defina td como sendo o tri�ngulo que est� � direita da aresta a e
-	int td = edgeSet_[a].right(); // te como sendo o tri�ngulo que est�
-	int te = edgeSet_[a].left();  // � esquerda de a,
+	long td = edgeSet_[a].right(); // te como sendo o tri�ngulo que est�
+	long te = edgeSet_[a].left();  // � esquerda de a,
 
-	int ai = a; // 2. Defina ai como sendo aresta a 
-	int ti = td;//    e ti como sendo o tri�ngulo td,
+	long ai = a; // 2. Defina ai como sendo aresta a 
+	long ti = td;//    e ti como sendo o tri�ngulo td,
 
-	int vi = edgeSet_[a].from();// 3. Insira o v�rtice diferente de v
+	long vi = edgeSet_[a].from();// 3. Insira o v�rtice diferente de v
 	if (vi == v)				// conectado � aresta ai no conjunto V,
 		vi = edgeSet_[a].to();
 	vertices.push_back (vi);
@@ -457,11 +459,11 @@ TeTin::vertexOppVertices(int v, list<int> &vertices)
 			continue;//	4.1.4. Retorne a 4.
 		}
 
-		int aaux = edgeWithVertexDiffFromEdge ( ti, v, ai );// 4.2. Defina a
+		long aaux = edgeWithVertexDiffFromEdge ( ti, v, ai );// 4.2. Defina a
 		if (aaux == -1)	 // aresta aaux do tri�ngulo ti que conecta o
 			return false;// v�rtice v e � diferente de ai,
 
-		int taux;
+		long taux;
 		if (edgeSet_[aaux].right() == ti) // 4.3. Defina taux como sendo  
 			taux = edgeSet_[aaux].left();//  o tri�ngulo que compartilha
 		else if (edgeSet_[aaux].left() == ti)// a aresta aaux com ti,
@@ -481,19 +483,19 @@ TeTin::vertexOppVertices(int v, list<int> &vertices)
 }
 
 bool
-TeTin::vertexTriangles(int v, list<int> &triangles)
+TeTin::vertexTriangles(long v, std::list<long> &triangles)
 {
 //	Find one line that contains node
-	int a = oneEdgeWithVertex(v);
+	long a = oneEdgeWithVertex(v);
 	if (a == -1)
 		return false;
 
 //	1. Defina td como sendo o tri�ngulo que est� � direita da aresta a e
-	int td = edgeSet_[a].right(); // te como sendo o tri�ngulo que est�
-	int te = edgeSet_[a].left();  // � esquerda de a,
+	long td = edgeSet_[a].right(); // te como sendo o tri�ngulo que est�
+	long te = edgeSet_[a].left();  // � esquerda de a,
 
-	int ai = a; // 2. Defina ai como sendo aresta a 
-	int ti = td;//    e ti como sendo o tri�ngulo td,
+	long ai = a; // 2. Defina ai como sendo aresta a 
+	long ti = td;//    e ti como sendo o tri�ngulo td,
  
 	if ( ti != -1 ) // 3. Se o tri�ngulo ti n�o for nulo,
 	{				//    insira ti no conjunto T,
@@ -514,11 +516,11 @@ TeTin::vertexTriangles(int v, list<int> &triangles)
 			continue;//	 4.1.5. Retorne a 4.
 		}
 
-		int aaux = edgeWithVertexDiffFromEdge ( ti, v, ai );// 4.2. Defina a
+		long aaux = edgeWithVertexDiffFromEdge ( ti, v, ai );// 4.2. Defina a
 		if (aaux == -1)	 // aresta aaux do tri�ngulo ti que conecta o
 			return false;// v�rtice v e � diferente de ai,
 
-		int taux;
+		long taux;
 		if (edgeSet_[aaux].right() == ti) // 4.3. Defina taux como sendo  
 			taux = edgeSet_[aaux].left();//  o tri�ngulo que compartilha
 		else if (edgeSet_[aaux].left() == ti)// a aresta aaux com ti,
@@ -537,15 +539,28 @@ TeTin::vertexTriangles(int v, list<int> &triangles)
 	return true;
 }
 
-int
-TeTin::oneTriangleWithVertex(int v)
+bool
+TeTin::vertexOppEdges(long v, std::list<long> &triset, std::list<long> &edges)
+{
+	std::list<long>::iterator tii;
+	for (tii = triset.begin(); tii != triset.end(); tii++)
+	{
+		long ti = *tii;
+		long nedge = this->edgeOppVertex(ti, v);
+		edges.push_back(nedge);
+	}
+	return true;
+}
+
+long
+TeTin::oneTriangleWithVertex(long v)
 {
 //	Find one line that contains node
-	int a = oneEdgeWithVertex(v);
+	long a = oneEdgeWithVertex(v);
 	if (a == -1)
 		return -1;
 
-	int td = edgeSet_[a].right();
+	long td = edgeSet_[a].right();
 	if ( td == -1 )
 		return edgeSet_[a].left();
 	else
@@ -553,7 +568,7 @@ TeTin::oneTriangleWithVertex(int v)
 }
 
 bool
-TeTin::triangleContainsPoint(int t, TeCoord2D& pt) 
+TeTin::triangleContainsPoint(TeTinTriangle& t, TeCoord2D& pt) 
 {
 	double	totalArea, triangleArea;
 	TeCoord2D	vert[3];
@@ -584,29 +599,25 @@ TeTin::triangleContainsPoint(int t, TeCoord2D& pt)
 	return true;
 }
 
-int
+long
 TeTin::triangleAt (TeCoord2D& pt)
 {
-	double tolvertex = 1; //To be set through interface
-	double tol;
-	tol = TePrecision::instance().precision();
-	TePrecision::instance().setPrecision(tolvertex);
 //Seja v um v�rtice qualquer da triangula��o T e p o ponto para o qual se deseja saber qual tri�ngulo t
 //	o cont�m.
-	int vi1;
+	long vi1;
 
 	TeTinEdgeSet::reverse_iterator i = edgeSet_.rbegin();
 	while ( i != edgeSet_.rend() )
 	{
 		vi1 = (*i++).from();
-		if (vi1 > 0 ) // -1L)
+		if (vi1 >= 0 ) // -1L)
 			break;
 	}
 	if ( i == edgeSet_.rend() )
 		return -1;
 
 //1. Defina o conjunto T={t1,..., tm} com os m tri�ngulos que compartilham o v�rtice vi,
-	list<int> triset;
+	std::list<long> triset;
 	this->vertexTriangles(vi1, triset);
 
 	TeCoord2D pf = vertexSet_[vi1].location();
@@ -616,48 +627,57 @@ TeTin::triangleAt (TeCoord2D& pt)
 		return ( *(triset.begin()) );
 
 //3. Defina A={a1,...,an} com as n arestas opostas a vi,
-	list<int> aedges;
-	this->vertexOppEdges(vi1, aedges);
+	std::list<long> aedges;
+	this->vertexOppEdges(vi1, triset, aedges);
 
 //4. Defina V={v1,...,vm} com os m v�rtices dos tri�ngulos que cont�m o v�rtice vi,
-	list <int> vvertex;
+	std::list <long> vvertex;
 	this->vertexOppVertices(vi1, vvertex);
 
 //5. Insira o v�rtice v no conjunto VI de v�rtices intersectados,
-	set <int> viset;
+	std::set <long> viset;
 	viset.insert(vi1);
 
 //6. Defina o v�rtice auxiliar vaux como sendo vi,
-	int vaux = vi1;
+	long vaux = vi1;
 //   e aresta aaux como sendo inv�lida
-	int aaux = -1;
-	vector<int> auxset(3);
+	long aaux = -1;
+	std::vector<long> auxset(3);
 	for (;;)
 	{
 //7. Para cada tri�ngulo ti de T, fa�a:
-		list<int>::iterator tii;
+		std::list<long>::iterator tii;
 		for (tii = triset.begin(); tii != triset.end(); tii++)
 		{
-			int ti = *tii;
+			long ti = *tii;
 //7.1. Se o tri�ngulo ti cont�m o ponto pn, termine o algoritmo.
 			if ( this->triangleContainsPoint( ti, pt ) )
 				return ti;
 		}
 //8.	Para cada v�rtice vi de V, fa�a:
-		list<int>::iterator vii;
+		std::list<long>::iterator vii;
 		for (vii = vvertex.begin(); vii != vvertex.end(); vii++)
 		{
-			int vi = *vii;
+			long vi = *vii;
 			TeCoord2D ptvi = vertexSet_[vi].location();
 			if ( ptvi == pt )
 //8.1. Se vi � igual a p, o tri�ngulo que cont�m p � um dos tri�ngulos que compartilham vi.
-// Escolha qualquer um dos tri�ngulos e termine o algoritmo.
-				return ( *(triset.begin()) );
+			{
+				for (tii = triset.begin(); tii != triset.end(); tii++)
+				{
+					long ti = *tii;
+					long v0, v1, v2;
+					this->triangleVertices(ti, v0, v1, v2);
+					if ( v0 == vi || v1 == vi || v2 == vi)
+						return ti;
+				}
+				return -1;
+			}
 		}
 //9. Para cada v�rtice vi de V, fa�a:
 		for ( vii = vvertex.begin(); vii != vvertex.end(); vii++)
 		{
-			int vi = *vii;
+			long vi = *vii;
 //9.1.	Se vi est� sobre r, fa�a:
 			TeCoord2D ptvi = vertexSet_[vi].location();
 			TeCoord2D pinter;
@@ -673,10 +693,10 @@ TeTin::triangleAt (TeCoord2D& pt)
 					aedges.clear();
 					this->vertexOppEdges(vi, aedges);
 //9.1.2.	Defina o conjunto Aaux={a1,..., am} com as m arestas compartilhadas por vaux,
-					list <int> vauxedges;
+					std::list <long> vauxedges;
 					this->vertexEdges(vaux, vauxedges);
 //9.1.3.	Exclua do conjunto A todas as arestas que pertencem ao conjunto Aaux,
-					for (list<int>::iterator vai = vauxedges.begin(); vai != vauxedges.end(); vai++)
+					for (std::list<long>::iterator vai = vauxedges.begin(); vai != vauxedges.end(); vai++)
 						aedges.remove ( *vai );
 //9.1.4.	Exclua do conjunto A a aresta aaux,
 					aedges.remove ( aaux ); // better perfomance than remove algorithm
@@ -685,7 +705,7 @@ TeTin::triangleAt (TeCoord2D& pt)
 					vvertex.clear();
 					this->vertexOppVertices(vi, vvertex);
 //9.1.6.	Exclua do conjunto V todos os v�rtices que pertencem ao conjunto VI,
-					for (set<int>::iterator vvi = viset.begin(); vvi != viset.end(); vvi++)
+					for (std::set<long>::iterator vvi = viset.begin(); vvi != viset.end(); vvi++)
 						vvertex.remove ( *vvi );
 //9.1.7.	Redefina o conjunto T={t1, ..., tk } com os k tri�ngulos que cont�m o v�rtice vi,
 					triset.clear();
@@ -695,6 +715,7 @@ TeTin::triangleAt (TeCoord2D& pt)
 //9.1.8.	Insira o v�rtice vi no conjunto VI de v�rtices intersectados,
 					viset.insert(vi);
 //9.1.8.	Retorne a 7,
+					//pf = vertexSet_[vi].location();
 					break;
 				}
 			}
@@ -703,10 +724,10 @@ TeTin::triangleAt (TeCoord2D& pt)
 			continue; // do for (;;)
 
 //10.	Para cada aresta ai de A, fa�a:
-		list<int>::iterator aii;
+		std::list<long>::iterator aii;
 		for (aii = aedges.begin(); aii != aedges.end(); aii++)
 		{
-			int ai = *aii;
+			long ai = *aii;
 //10.1.	Se o ponto p est� sobre ai, fa�a:
 			TeCoord2D pfr = vertexSet_[edgeSet_[ai].from()].location();
 			TeCoord2D pto = vertexSet_[edgeSet_[ai].to()].location();
@@ -719,7 +740,7 @@ TeTin::triangleAt (TeCoord2D& pt)
 				if (TeWithin(pinter, box1) )
 				{
 //10.1.1. Escolha qualquer um dos tri�ngulos que compartilham ai.
-					int ti = edgeSet_[ai].left();
+					long ti = edgeSet_[ai].left();
 //10.1.2.	Termine o algoritmo.
 					if ( (ti != -1) && (this->triangleContainsPoint(ti, pt)) )
 						return ( ti );
@@ -737,19 +758,19 @@ TeTin::triangleAt (TeCoord2D& pt)
 //11.	Para cada aresta ai de A, fa�a:
 		for (aii = aedges.begin(); aii != aedges.end(); aii++)
 		{
-			int ai = *aii;
-			//int vt = edgeSet_[ai].to();
-			//int vf = edgeSet_[ai].from();
+			long ai = *aii;
+			long vt = edgeSet_[ai].to();
+			long vf = edgeSet_[ai].from();
+			TeCoord2D pi;
 //11.1.	Se ai intersecta r, fa�a:
-			TeIntersCoordsVec pinters;
-			//if(TeSegmentIntersection(vertexSet_[vt].location(), vertexSet_[vf].location(), pf, pt, pinters, tol) && pinters.size() < 2)
-			//{
+			if (TeSegmentsIntersectPoint(vertexSet_[vt].location(), vertexSet_[vf].location(), pf, pt, pi) )
+			{
 //11.1.2.	Defina os tri�ngulos t1 e t2 que compartilham a aresta ai.
 //11.1.3.	Se t2 est� contido no conjunto T , ent�o fa�a taux=t1,
-				int taux = edgeSet_[ai].left();
+				long taux = edgeSet_[ai].left();
 				if (taux == -1)
 					return -1;
-				list<int>::iterator pos1 = find (triset.begin(), triset.end(), taux);
+				std::list<long>::iterator pos1 = find (triset.begin(), triset.end(), taux);
 				if ( pos1 != triset.end() )
 //11.1.4.	Sen�o, fa�a taux=t2,
 					taux = edgeSet_[ai].right();
@@ -765,8 +786,8 @@ TeTin::triangleAt (TeCoord2D& pt)
 				aedges.remove( ai );
 //11.1.7.	Redefina o conjunto V={v1}. O v�rtice v1 � o v�rtice do tri�ngulo taux que n�o est�
 //			em nenhuma extremidade da aresta ai,
-				int vaux1 = edgeSet_[ai].from();
-				int vaux2 = edgeSet_[ai].to();
+				long vaux1 = edgeSet_[ai].from();
+				long vaux2 = edgeSet_[ai].to();
 				this->triangleVertices ( taux, auxset[0], auxset[1], auxset[2]);
 				vvertex.clear();
 				vvertex.insert ( vvertex.begin(), auxset.begin(), auxset.end() );
@@ -780,22 +801,24 @@ TeTin::triangleAt (TeCoord2D& pt)
 				aaux = ai;
 //11.1.10.	Retorne a 8;
 				break;
-			//}
+			}
 		}
 //12.	Se n�o h� mais arestas em A, ent�o:
 		if ( aii == aedges.end() )
 		{
 //12.1.	Para cada tri�ngulo ti de T, fa�a:
-			list<int>::iterator tii;
-			for ( tii = triset.begin(); tii != triset.end(); tii++)
-
+//			TeTinTriangleIterator tii;
+//			for ( tii = triangleBegin(); tii != triangleEnd(); tii++)
+			long ti;
+			long tEnd = triangleSet_.size();
+			for ( ti = 0; ti < tEnd; ti++)
 			{
-				int ti = *tii;
+//				TeTinTriangle ti = *tii;
 	//12.1.1.	Se o tri�ngulo ti cont�m o ponto pn, termine o algoritmo.
 				if ( this->triangleContainsPoint( ti, pt ) )
 					return ti;
 			}
-			if (tii == triset.end() )
+			if (ti == tEnd )
 				return -1;
 		}
 	} // Do for (;;)
@@ -803,20 +826,15 @@ TeTin::triangleAt (TeCoord2D& pt)
 }
 
 bool
-TeTin::insertPoint(double x, double y, float value)
+TeTin::insertPoint(double x, double y, double value)
 {
-	double tolvertex = 1; //To be set through interface
-	
-	double tol = TePrecision::instance().precision();
-	TePrecision::instance().setPrecision(tolvertex);
-
-//	Get Point to be inserted from vector
+//	Get Point to be inserted from std::vector
 	TeCoord2D	pt(x,y);
 	if ( ! TeWithin (pt, vertexSet_.box()) )
 		return false;
 
 //	Find the triangle that owns the point pt	
-	int t = triangleAt ( pt );
+	long t = triangleAt ( pt );
 
 	if (t == -1)
 		return false;
@@ -827,36 +845,22 @@ TeTin::insertPoint(double x, double y, float value)
 	
 
 //	Verify if point is too close to one triangle vertex
-	int j;
+	long j;
 	for ( j = 0; j < 3; j++)
 	{
 		if (pt == vert[j]) // Using precision to compare
-		{
-			TePrecision::instance().setPrecision(tol);
 			return false;
-		}
 	}
 
 //	Test if the point is on an edge
-	int nedge = -1;
+	long nedge = -1;
 	double dmin = TeMAXFLOAT;
 	TeCoord2D pmin;
 	for (j = 0; j < 3; j++)
 	{
-		if ( fabs (vert[j].x() - vert[(j+1)%3].x()) > TePrecision::instance().precision() )
-		{
-			if ((pt.x() > vert[j].x()) && (pt.x() > vert[(j+1)%3].x()))
-				continue;
-			if ((pt.x() < vert[j].x()) && (pt.x() < vert[(j+1)%3].x()))
-				continue;
-		}
-		if ( fabs (vert[j].y() - vert[(j+1)%3].y()) > TePrecision::instance().precision() )
-		{
-			if ((pt.y() > vert[j].y()) && (pt.y() > vert[(j+1)%3].y()))
-				continue;
-			if ((pt.y() < vert[j].y()) && (pt.y() < vert[(j+1)%3].y()))
-				continue;
-		}
+		if ( TeWithinOrTouches (pt, vert[j], vert[(j+1)%3]) == false )
+			continue;
+
 		TeCoord2D paux;
 		double daux = TePerpendicularDistance(vert[j], vert[(j+1)%3], pt, paux);
 		if ((daux < TePrecision::instance().precision()) && (daux < dmin))
@@ -867,28 +871,26 @@ TeTin::insertPoint(double x, double y, float value)
 		}
 	}
 
-	TePrecision::instance().setPrecision(tol);
-
 	vertexSet_.add( TeTinVertex (pt, value, NORMALVERTEX, -1 ) );
-	int v = vertexSet_.size()-1;
+	long v = vertexSet_.size()-1;
 
-	set<int> trianglesToTest;
+	std::set<long> trianglesToTest;
 	if (nedge == -1)	// Not on an edge
 	{
 		this->twoNewTriangles(t, v, trianglesToTest);	//If not, split triang
 	}
 	else
 	{
-		int neighids[3];
+		long neighids[3];
 		this->triangle3Neighbors(t, neighids[0],neighids[1],neighids[2]);
-		int edges[3];
+		long edges[3];
 		triangleSet_[t].edges( edges[0], edges[1], edges[2] );
 		for (j = 0; j < 3; j++)
 		{	// Check if neighbor triangle opposite vertex is too close
 			if ( neighids[j] == -1L )
 				continue;
-			int oppVertex = edgeOppVertex(neighids[j], edges[j]);
-			int vsize = vertexSet_.size();
+			long oppVertex = edgeOppVertex(neighids[j], edges[j]);
+			long vsize = vertexSet_.size();
 			if ( oppVertex < vsize )
 			{
 			TeCoord2D ptaux = vertexSet_[oppVertex].location();
@@ -902,10 +904,10 @@ TeTin::insertPoint(double x, double y, float value)
 		}
 
 //		Duplicate triangle and its neighbor on the same edge
-		int an0 = this->duplicateTriangle( t, nedge, v, trianglesToTest);
+		long an0 = this->duplicateTriangle( t, nedge, v, trianglesToTest);
 		if (neighids[nedge] != -1L)
 		{
-			int tv = neighids[nedge];
+			long tv = neighids[nedge];
 			this->dupNeighTriangle( tv, an0, v, trianglesToTest);
 		}
 	}
@@ -914,9 +916,9 @@ TeTin::insertPoint(double x, double y, float value)
 }
 
 bool
-TeTin::trianglePoints(int t, TeCoord2D& pt0, TeCoord2D& pt1, TeCoord2D& pt2)
+TeTin::trianglePoints(TeTinTriangle& t, TeCoord2D& pt0, TeCoord2D& pt1, TeCoord2D& pt2)
 {
-	int vertex0, vertex1, vertex2;
+	long vertex0, vertex1, vertex2;
 	this->triangleVertices(t, vertex0, vertex1, vertex2);
 
 	pt0 = vertexSet_[vertex0].location();
@@ -927,10 +929,10 @@ TeTin::trianglePoints(int t, TeCoord2D& pt0, TeCoord2D& pt1, TeCoord2D& pt2)
 }
 
 bool
-TeTin::triangleVertices(int t, int& vertex0, int& vertex1, int& vertex2)
+TeTin::triangleVertices(TeTinTriangle& t, long& vertex0, long& vertex1, long& vertex2)
 {
-	int edge0, edge1, edge2;
-	triangleSet_[t].edges(edge0,edge1,edge2);
+	long edge0, edge1, edge2;
+	t.edges(edge0,edge1,edge2);
 
 	if (edgeSet_[edge0].to() == edgeSet_[edge1].to())
 	{
@@ -963,9 +965,9 @@ TeTin::triangleVertices(int t, int& vertex0, int& vertex1, int& vertex2)
 }
 
 bool
-TeTin::triangle3Neighbors(int t, int& neighbor0, int& neighbor1, int& neighbor2)
+TeTin::triangle3Neighbors(long t, long& neighbor0, long& neighbor1, long& neighbor2)
 {
-	int edge0, edge1, edge2;
+	long edge0, edge1, edge2;
 	triangleSet_[t].edges(edge0,edge1,edge2);
 
 	if (edgeSet_[edge0].left() == t)
@@ -986,60 +988,60 @@ TeTin::triangle3Neighbors(int t, int& neighbor0, int& neighbor1, int& neighbor2)
 	return true;
 }
 
-int
-TeTin::triangleVertexAt(int t, int vertex)
+long
+TeTin::triangleVertexAt(long t, long vertex)
 {
-	int vertices[3];
+	long vertices[3];
 	this->triangleVertices ( t, vertices[0],vertices[1],vertices[2] );
 
 	return vertices[vertex];
 }
 
 bool
-TeTin::twoNewTriangles(int t, int v, set<int>& triangles)
+TeTin::twoNewTriangles(long t, long v, std::set<long>& triangles)
 {
 //1. Crie o v�rtice vn com os dados da amostra s,
 //	Sint4 vn = nodeId;
 
 //2. Crie 2 novos tri�ngulos t1 e t2,
-	int t1 = triangleSet_.size();
-	int t2 = t1+1;
+	long t1 = triangleSet_.size();
+	long t2 = t1+1;
 
 //3. Crie a nova aresta an0 que conecta os v�rtices vn e v0 e
 //   tem t e t1 como os tri�ngulos que compartilham a aresta.
-	int v0 = this->triangleVertexAt(t,0); //v0 e' o vertice 0 de t
+	long v0 = this->triangleVertexAt(t,0); //v0 e' o vertice 0 de t
 	edgeSet_.add( TeTinEdge (v, v0, t, t1, NORMALEDGE) );
-	int an0 = edgeSet_.size()-1;
+	long an0 = edgeSet_.size()-1;
 	vertexSet_[v].setOneEdge (an0);
 
 //4. Crie a nova aresta an1 que conecta os v�rtices vn e v1 e
 // 	tem t1 e t2 como os tri�ngulos que compartilham a aresta.
-	int v1 = this->triangleVertexAt(t,1); //v1 e' o vertice 1 de t
+	long v1 = this->triangleVertexAt(t,1); //v1 e' o vertice 1 de t
 	edgeSet_.add( TeTinEdge (v, v1, t1, t2, NORMALEDGE) );
-	int an1 = edgeSet_.size()-1;
+	long an1 = edgeSet_.size()-1;
 
 //5. Crie a nova aresta an2 que conecta os v�rtices vn e v2 e
 //	tem t2 e t como os tri�ngulos que compartilham a aresta.
-	int v2 = this->triangleVertexAt(t,2); //v2 e' o vertice 2 de t
+	long v2 = this->triangleVertexAt(t,2); //v2 e' o vertice 2 de t
 	edgeSet_.add( TeTinEdge (v, v2, t2, t, NORMALEDGE) );
-	int an2 = edgeSet_.size()-1;
+	long an2 = edgeSet_.size()-1;
 
 //6. Troque o tri�ngulo t por t1 na aresta a0,
-	int a0 = triangleSet_[t].edgeAt(0); // retorna aresta 0 de t
+	long a0 = triangleSet_[t].edgeAt(0); // retorna aresta 0 de t
 	edgeSet_[a0].exchangeTriangle(t,t1);
 
 //7. Defina as arestas de t1 como sendo an0, a0 e an1,
 	triangleSet_.add ( TeTinTriangle (an0, a0, an1) );
 
 //8. Troque o tri�ngulo t por t2 na aresta a1,
-	int a1 = triangleSet_[t].edgeAt(1); // retorna aresta 1 de t
+	long a1 = triangleSet_[t].edgeAt(1); // retorna aresta 1 de t
 	edgeSet_[a1].exchangeTriangle(t, t2);
 
 //9. Defina as arestas de t2 como sendo an1, a1 e an2,
 	triangleSet_.add ( TeTinTriangle (an1, a1, an2) );
 
 //10. Defina as arestas de t como sendo an2, a2 e an0,
-	int a2 = triangleSet_[t].edgeAt(2); // retorna aresta 2 de t
+	long a2 = triangleSet_[t].edgeAt(2); // retorna aresta 2 de t
 	triangleSet_[t].setEdges(an2, a2, an0);
 
 	triangles.insert(t);
@@ -1048,46 +1050,46 @@ TeTin::twoNewTriangles(int t, int v, set<int>& triangles)
 	return true;
 }
 
-int
-TeTin::duplicateTriangle(int t, int n, int v, set<int>& triangles)
+long
+TeTin::duplicateTriangle(long t, long n, long v, std::set<long>& triangles)
 {
 // Seja t o tri�ngulo que cont�m cuja n-�sima aresta an � a aresta 
 // pr�xima a amostra s ( n E {0,1,2} ). A aresta an conecta os v�rtices 
 // vn e vj, a aresta aj conecta os v�rtices vj e vk e a aresta ak conecta
 // os v�rtices vk e vn, sendo j o resto da divis�o de n+1 por 3 e k o resto
 // da divis�o de n+2 por 3.
-	int edges[3];
+	long edges[3];
 	triangleSet_[t].edges(edges[0],edges[1],edges[2]);
 
-	int an = edges [ n ];
-	int aj = edges [ (n+1)%3 ];
-	int ak = edges [ (n+2)%3 ];
+	long an = edges [ n ];
+	long aj = edges [ (n+1)%3 ];
+	long ak = edges [ (n+2)%3 ];
 
-	int vn = this->triangleVertexAt( t, n );
+	long vn = this->triangleVertexAt( t, n );
 
 //	1. Crie o v�rtice v com os dados da amostra s,
 //	2. Defina o tri�ngulo tv que compartilha a aresta an com t,
-	int tv = 0;
+	long tv = 0;
 	if (edgeSet_[an].left() == t)
 		tv = edgeSet_[an].right();
 	else if (edgeSet_[an].right() == t)
 		tv = edgeSet_[an].left();
 
 //	3. Defina o v�rtice vop do tri�ngulo t que n�o � conectado a aresta an,
-	int vop = this->triangleVertexAt ( t, (n+2)%3 );
+	long vop = this->triangleVertexAt ( t, (n+2)%3 );
 
 //	4. Crie o novo tri�ngulos t1,
-	int t1 = triangleSet_.size();
+	long t1 = triangleSet_.size();
 
 //	5. Crie a nova aresta an0 que conecta os v�rtices v e vn e
 //	   tem t1 e tv como os tri�ngulos que compartilham a aresta.
 	edgeSet_.add( TeTinEdge (v, vn, t1, tv, NORMALEDGE) );
-	int an0 = edgeSet_.size()-1;
+	long an0 = edgeSet_.size()-1;
 
 //	6. Crie a nova aresta an1 que conecta os v�rtices v e vop e
 //	   tem t e t1 como os tri�ngulos que compartilham a aresta.
 	edgeSet_.add( TeTinEdge (v, vop, t, t1, NORMALEDGE) );
-	int an1 = edgeSet_.size()-1;
+	long an1 = edgeSet_.size()-1;
 
 //	7. Modifique a aresta an para conectar o v�rtice v ao inv�s de vn,
 	edgeSet_[an].exchangeVertex( vn, v );
@@ -1109,20 +1111,20 @@ TeTin::duplicateTriangle(int t, int n, int v, set<int>& triangles)
 }
 
 bool
-TeTin::dupNeighTriangle(int tv, int an0, int v, set<int>& triangles)
+TeTin::dupNeighTriangle(long tv, long an0, long v, std::set<long>& triangles)
 {
 //	11.1. Crie o novo tri�ngulo t2,
-	int t2 = triangleSet_.size();
+	long t2 = triangleSet_.size();
 
 //	11.2. Defina a aresta av do tri�ngulo tv que cont�m o v�rtice vn
 //	      (obs: s� h� uma aresta porque a outra foi modificada),
-	int vn = edgeSet_[an0].to(); //Due to assembly, dangerous
+	long vn = edgeSet_[an0].to(); //Due to assembly, dangerous
 	if ( vn == v )
 		vn = edgeSet_[an0].from();
 
-	int edges[3];
+	long edges[3];
 	triangleSet_[tv].edges(edges[0],edges[1],edges[2]);
-	int i;
+	long i;
 	for (i = 0; i < 3; i++)
 	{
 		if ( (edgeSet_[edges[i]].from() == vn) ||
@@ -1131,14 +1133,14 @@ TeTin::dupNeighTriangle(int tv, int an0, int v, set<int>& triangles)
 	}
 	if (i == 3)
 		return false;
-	int av = edges[i];
+	long av = edges[i];
 
 //	11.3. Defina as outras arestas de tv como sendo av1 e av2.
-	int av1 = edges[ (i+1)%3];
-	int av2 = edges[ (i+2)%3];
+	long av1 = edges[ (i+1)%3];
+	long av2 = edges[ (i+2)%3];
 
 //	11.4. Defina o v�rtice vvo conectado a vn por meio da aresta av,
-	int vvo;
+	long vvo;
 	if (edgeSet_[av].from() == vn)
 		vvo = edgeSet_[av].to();
 	else
@@ -1147,7 +1149,7 @@ TeTin::dupNeighTriangle(int tv, int an0, int v, set<int>& triangles)
 //	11.5. Crie a nova aresta an2 que conecta os v�rtices v e vvo e
 //	      tem t e t2 como os tri�ngulos que compartilham a aresta.
 	edgeSet_.add( TeTinEdge (v, vvo, tv, t2, NORMALEDGE) );
-	int an2 = edgeSet_.size()-1;
+	long an2 = edgeSet_.size()-1;
 
 //	11.6. Troque o tri�ngulo tv por t2 na aresta av,
 	edgeSet_[av].exchangeTriangle( tv, t2 );
@@ -1168,25 +1170,25 @@ TeTin::dupNeighTriangle(int tv, int an0, int v, set<int>& triangles)
 }
 
 void
-TeTin::testDelaunayForVertex(int v, set<int>& triangles)
+TeTin::testDelaunayForVertex(long v, std::set<long>& triangles)
 {
 	while ( triangles.size() )
 	{
-		set<int>::iterator i = triangles.begin();
-		int t = *i;
+		std::set<long>::iterator i = triangles.begin();
+		long t = *i;
 		triangles.erase(t);
 		this->testDelaunayAt(t, v, triangles);
 	}
 }
 
 bool
-TeTin::testDelaunayAt(int t, int v, set<int>& triangles)
+TeTin::testDelaunayAt(long t, long v, std::set<long>& triangles)
 {
 	//	Retrieve line of triangle common to neighbor triangle
-	int e = this->edgeOppVertex (t, v);
+	long e = this->edgeOppVertex (t, v);
 
 //	Retrieve neighbour triangle (tviz) pointer
-	int tviz = edgeSet_[e].left();
+	long tviz = edgeSet_[e].left();
 	if ( edgeSet_[e].left() == t )
 		tviz = edgeSet_[e].right();
 	if ( tviz == -1 )
@@ -1197,12 +1199,12 @@ TeTin::testDelaunayAt(int t, int v, set<int>& triangles)
 	this->trianglePoints(t, vert[0], vert[1], vert[2]);
 
 //	Find opposite point to base triangle (tri) inside neighbour (tviz)
-	int vo = this->vertexOppEdge ( tviz, e );
+	long vo = this->vertexOppEdge ( tviz, e );
 	TeCoord2D pto = vertexSet_[vo].location();
 
 //	To avoid overflow
 	TeCoord2D ptmin( TeMAXFLOAT, TeMAXFLOAT );
-	int i;
+	long i;
 	for (i = 0; i < 3; i++)
 		if ( vert[i] < ptmin )
 			ptmin = vert[i];
@@ -1248,7 +1250,7 @@ TeTin::testDelaunayAt(int t, int v, set<int>& triangles)
 }
 
 bool
-TeTin::swapEdges( int t, int tv, int ai )
+TeTin::swapEdges( long t, long tv, long ai )
 {
 	if ( tv == -1 )
 		return false;
@@ -1258,35 +1260,35 @@ TeTin::swapEdges( int t, int tv, int ai )
 //	aresta ak conecta os v�rtices vk e vi, sendo j o resto da divis�o
 //	de i+1 por 3 e k o resto da divis�o de i+2 por 3.
 
-	int tedges[3];
+	long tedges[3];
 	triangleSet_[t].edges ( tedges[0], tedges[1], tedges[2] );
 
-	int vertex[3];
+	long vertex[3];
 	this->triangleVertices ( t, vertex[0], vertex[1], vertex[2]);
-	int i;
+	long i;
 	for ( i= 0; i < 3; i++ )
 		if ( tedges[i] == ai )
 			break;
 
-	int aj = tedges [ (i+1) % 3 ];
-	int ak = tedges [ (i+2) % 3 ];
+	long aj = tedges [ (i+1) % 3 ];
+	long ak = tedges [ (i+2) % 3 ];
 
-	int vi = vertex [ i ];
-	int vj = vertex [ (i+1) % 3 ];
-	int vk = vertex [ (i+2) % 3 ];
+	long vi = vertex [ i ];
+	long vj = vertex [ (i+1) % 3 ];
+	long vk = vertex [ (i+2) % 3 ];
 
 // Seja tv o tri�ngulo que compartilha a aresta ai com t. O v�rtice de
 //	tv que n�o � conectado pela aresta ai � o v�rtice vn. As outras
 //	arestas do tri�ngulo tv s�o am que conecta os v�rtices vi e vn e a
 //	aresta an conecta os v�rtices vn e vj.
 	
-	int vn = this->vertexOppEdge ( tv, ai );
+	long vn = this->vertexOppEdge ( tv, ai );
 
-	int tvedges [3];
+	long tvedges [3];
 	triangleSet_[tv].edges ( tvedges[0], tvedges[1], tvedges[2] );
 
-	int am, an = 0;
-	for ( int j = 0; j < 3; j++ )
+	long am, an = 0;
+	for ( long j = 0; j < 3; j++ )
 	{
 		if ( tvedges [ j ] == ai )
 			continue;
@@ -1318,10 +1320,9 @@ TeTin::swapEdges( int t, int tv, int ai )
 
 //	1. Se o segmento de reta formado conectando o v�rtice vk do
 //	   tri�ngulo t ao v�rtice vn de tv intersecta a aresta ai, fa�a:
-	TeIntersCoordsVec pinters;
-	//if(!TeSegmentIntersection(vertexSet_[vi].location(), vertexSet_[vj].location(), vertexSet_[vk].location(), vertexSet_[vn].location(), pinters, tol)
-	//	|| pinters.size() == 2)
-	//	return false;
+	TeCoord2D pi;
+	if (TeSegmentsIntersectPoint(vertexSet_[vi].location(), vertexSet_[vj].location(), vertexSet_[vk].location(), vertexSet_[vn].location(), pi) == false )
+		return false;
 
 //		1.1. Troque na aresta ai o v�rtice vi pelo vertice vk e o
 //			 v�rtice vj pelo v�rtice vn.
@@ -1366,38 +1367,36 @@ TeTin::swapEdges( int t, int tv, int ai )
 }
 
 bool
-TeTin::edgesInterBySegment( TeCoord2D& pf, TeCoord2D& pn, list<int> &aiset, list<int> &viset )
+TeTin::edgesInterBySegment( TeCoord2D& pf, TeCoord2D& pn, std::list<long> &aiset, std::list<long> &viset )
 {
-	double tolvertex = 1; //To be set through interface
-	TePrecision::instance().setPrecision(tolvertex);
 //		Seja o segmento de reta r que conecta os pontos pf  e pn,
 //1.	Defina o tri�ngulo tf que cont�m o ponto pf,
-	int tf = this->triangleAt (pf);
+	long tf = this->triangleAt (pf);
 	if (tf == -1)
 		return false;
 
 //2.	Defina o v�rtice vaux e aresta aaux, como sendo inv�lidos,
-	int vaux = -1;
-	int aaux = -1;
+	long vaux = -1;
+	long aaux = -1;
 
 //3.	Defina o conjunto A={a1, a2, a3} com as arestas de tf,
-	vector<int> auxset(3);
+	std::vector<long> auxset(3);
 	triangleSet_[tf].edges ( auxset[0], auxset[1], auxset[2] );
-	list<int> aedges ( auxset.begin(), auxset.end() );
+	std::list<long> aedges ( auxset.begin(), auxset.end() );
 
 //4.	Defina o conjunto V={v1, v2, v3} com os v�rtices de tf,
 	this->triangleVertices ( tf, auxset[0], auxset[1], auxset[2]);
-	list <int> vvertex ( auxset.begin(), auxset.end() );
+	std::list <long> vvertex ( auxset.begin(), auxset.end() );
 
 //5.	Defina o conjunto T={tf},
-	list<int> triset( 1, tf );
-	set<int> visetaux;
+	std::list<long> triset( 1, tf );
+	std::set<long> visetaux;
 
 //6.	Para cada v�rtice vi de V, fa�a:
-	list<int>::iterator vii;
+	std::list<long>::iterator vii;
 	for (vii = vvertex.begin(); vii != vvertex.end(); vii++)
 	{
-		int vi = *vii;
+		long vi = *vii;
 		TeCoord2D ptvi = vertexSet_[vi].location();
 		TeCoord2D pinter;
 
@@ -1426,9 +1425,9 @@ TeTin::edgesInterBySegment( TeCoord2D& pf, TeCoord2D& pn, list<int> &aiset, list
 	if ( vii == vvertex.end() )
 	{
 //7.	Para cada aresta ai de A, fa�a:
-		for (list<int>::iterator aii = aedges.begin(); aii != aedges.end(); aii++)
+		for (std::list<long>::iterator aii = aedges.begin(); aii != aedges.end(); aii++)
 		{
-			int ai = *aii;
+			long ai = *aii;
 //7.1.	Se o ponto pf est� sobre ai, fa�a:
 			TeCoord2D pfr = vertexSet_[edgeSet_[ai].from()].location();
 			TeCoord2D pto = vertexSet_[edgeSet_[ai].to()].location();
@@ -1436,7 +1435,7 @@ TeTin::edgesInterBySegment( TeCoord2D& pf, TeCoord2D& pn, list<int> &aiset, list
 			if ( TePerpendicularDistance(pfr, pto, pf, pinter) < TePrecision::instance().precision() )
 			{
 //7.1.1.	Defina o tri�ngulo tv que compartilha ai com tf,
-				int tv = edgeSet_[ai].right();
+				long tv = edgeSet_[ai].right();
 				if (tv == tf)
 					tv = edgeSet_[ai].left();
 				if (tv == -1)
@@ -1472,19 +1471,19 @@ TeTin::edgesInterBySegment( TeCoord2D& pf, TeCoord2D& pn, list<int> &aiset, list
 	for (;;)
 	{
 //8.	Para cada tri�ngulo ti de T, fa�a:
-		list<int>::iterator tii;
+		std::list<long>::iterator tii;
 		for ( tii = triset.begin(); tii != triset.end(); tii++)
 		{
-			int ti = *tii;
+			long ti = *tii;
 //8.1.1.	Se o tri�ngulo ti cont�m o ponto pn, termine o algoritmo.
 			if ( this->triangleContainsPoint( ti, pn ) )
 				return true;
 		}
 //9.	Para cada v�rtice vi de V, fa�a:
-		list<int>::iterator vii;
+		std::list<long>::iterator vii;
 		for (vii = vvertex.begin(); vii != vvertex.end(); vii++)
 		{
-			int vi = *vii;
+			long vi = *vii;
 			TeCoord2D ptvi = vertexSet_[vi].location();
 //9.1.	Se vi coincide com pn, fa�a:
 			if ( ptvi == pn )
@@ -1501,7 +1500,7 @@ TeTin::edgesInterBySegment( TeCoord2D& pf, TeCoord2D& pn, list<int> &aiset, list
 //10.	Para cada v�rtice vi de V, fa�a:
 		for ( vii = vvertex.begin(); vii != vvertex.end(); vii++)
 		{
-			int vi = *vii;
+			long vi = *vii;
 //10.1.	Se vi � diferente de vaux e est� sobre r, fa�a:
 			if ( vi != vaux )
 			{
@@ -1517,14 +1516,14 @@ TeTin::edgesInterBySegment( TeCoord2D& pf, TeCoord2D& pn, list<int> &aiset, list
 //10.1.1.	Redefina o conjunto A={a1,..., an} com as n arestas opostas a vi, excluindo as arestas de AI,
 						aedges.clear();
 						this->vertexOppEdges(vi, aedges);
-						list<int>::iterator aisi;
+						std::list<long>::iterator aisi;
 						for ( aisi = aiset.begin(); aisi != aiset.end(); aisi++)
 							aedges.remove ( *aisi );
 //10.1.2.	Redefina o conjunto V={v1,..., vm} com os m v�rtices dos tri�ngulos que cont�m o v�rtice vi,
 //			excluindo os vertices de Vi,
 						vvertex.clear();
 						this->vertexOppVertices(vi, vvertex);
-						list<int>::iterator visi;
+						std::list<long>::iterator visi;
 						for ( visi = viset.begin(); visi != viset.end(); aisi++)
 							viset.remove ( *visi );
 //101.3.	Redefina o conjunto T={t1, ..., tk } com os k tri�ngulos que cont�m o v�rtice vi,
@@ -1549,10 +1548,10 @@ TeTin::edgesInterBySegment( TeCoord2D& pf, TeCoord2D& pn, list<int> &aiset, list
 			continue; // do for (;;)
 
 //11.	Para cada aresta ai de A, fa�a:
-		list<int>::iterator aii;
+		std::list<long>::iterator aii;
 		for (aii = aedges.begin(); aii != aedges.end(); aii++)
 		{
-			int ai = *aii;
+			long ai = *aii;
 //11.1.	Se o ponto pn est� sobre ai, fa�a:
 			TeCoord2D pfr = vertexSet_[edgeSet_[ai].from()].location();
 			TeCoord2D pto = vertexSet_[edgeSet_[ai].to()].location();
@@ -1577,22 +1576,21 @@ TeTin::edgesInterBySegment( TeCoord2D& pf, TeCoord2D& pn, list<int> &aiset, list
 //12.	Para cada aresta ai de A, fa�a:
 		for (aii = aedges.begin(); aii != aedges.end(); aii++)
 		{
-			int ai = *aii;
+			long ai = *aii;
 			TeCoord2D pinter;
-			//int vt = edgeSet_[ai].to();
-			//int vf = edgeSet_[ai].from();
+			long vt = edgeSet_[ai].to();
+			long vf = edgeSet_[ai].from();
 //12.1.	Se ai intersecta r, fa�a:
-			TeIntersCoordsVec pinters;
-			//if(TeSegmentIntersection(vertexSet_[vt].location(), vertexSet_[vf].location(), pf, pn, pinters) && pinters.size() < 2)			
-			//{
+			if ( TeSegmentsIntersectPoint(vertexSet_[vt].location(), vertexSet_[vf].location(), pf, pn, pinter) )
+			{
 //12.1.1.	Insira a aresta ai no conjunto AI de arestas intersectadas,
 				aiset.push_back ( ai );
 //12.1.2.	Defina os tri�ngulos t1 e t2 que compartilham a aresta ai.
 //12.1.3.	Se t2 est� contido no conjunto T , ent�o fa�a taux=t1,
-				int taux = edgeSet_[ai].left();
+				long taux = edgeSet_[ai].left();
 				if (taux == -1)
 					return false;
-				list<int>::iterator pos1 = find (triset.begin(), triset.end(), taux);
+				std::list<long>::iterator pos1 = find (triset.begin(), triset.end(), taux);
 				if ( pos1 != triset.end() )
 //12.1.4.	Sen�o, fa�a taux=t2,
 					taux = edgeSet_[ai].right();
@@ -1608,8 +1606,8 @@ TeTin::edgesInterBySegment( TeCoord2D& pf, TeCoord2D& pn, list<int> &aiset, list
 				aedges.remove( ai );
 //12.1.7.	Redefina o conjunto V={v1}. O v�rtice v1 � o v�rtice do tri�ngulo taux que n�o est�
 //			em nenhuma extremidade da aresta ai,
-				int vaux1 = edgeSet_[ai].from();
-				int vaux2 = edgeSet_[ai].to();
+				long vaux1 = edgeSet_[ai].from();
+				long vaux2 = edgeSet_[ai].to();
 				this->triangleVertices ( taux, auxset[0], auxset[1], auxset[2]);
 				vvertex.clear();
 				vvertex.insert ( vvertex.begin(), auxset.begin(), auxset.end() );
@@ -1623,7 +1621,7 @@ TeTin::edgesInterBySegment( TeCoord2D& pf, TeCoord2D& pn, list<int> &aiset, list
 				aaux = ai;
 //12.1.10.	Retorne a 8;
 				break;
-			//}
+			}
 		}
 	} // Do for (;;)
 	return true;
@@ -1636,8 +1634,8 @@ TeTin::insertSegment( TeCoord2D& pf, TeCoord2D& pn )
 	{
 		if ( this->insertPoint( pn.x(), pn.y(), 100.) )
 		{
-			list<int> aiset;
-			list<int> viset;
+			std::list<long> aiset;
+			std::list<long> viset;
 			if ( this->edgesInterBySegment( pf, pn, aiset, viset ) )
 			{
 				if ( viset.size() == 0 )
@@ -1645,21 +1643,20 @@ TeTin::insertSegment( TeCoord2D& pf, TeCoord2D& pn )
 					while ( aiset.size() > 0 )
 					{
 //2.	Para cada aresta ai de A, fa�a:
-						list<int>::iterator aii;
+						std::list<long>::iterator aii;
 						for (aii = aiset.begin(); aii != aiset.end(); aii++)
 						{
-							int ai = *aii;
+							long ai = *aii;
 //2.1.	Defina os tri�ngulos td e te compartilham ai,
-							int td = edgeSet_[ai].right();
-							int te = edgeSet_[ai].left();
+							long td = edgeSet_[ai].right();
+							long te = edgeSet_[ai].left();
 //2.2.	Defina os v�rtices vm e vn dos tri�ngulos td e te que n�o est�o sobre a aresta ai,
-							//int vn = this->vertexOppEdge(td, ai)
-							//int vm = this->vertexOppEdge(te, ai);
+							long vn = this->vertexOppEdge(td, ai);
+							long vm = this->vertexOppEdge(te, ai);
 //2.3.	Se r n�o intersecta o segmento que conecta os v�rtices vm e vn, fa�a:
-							TeIntersCoordsVec pinters;
-							//if(!TeSegmentIntersection(vertexSet_[vn].location(), vertexSet_[vm].location(), pf, pn, pinters) ||
-							//	pinters.size() == 2)
-							//{
+							TeCoord2D pi;
+							if ( TeSegmentsIntersectPoint(vertexSet_[vn].location(), vertexSet_[vm].location(), pf, pn, pi) )
+							{
 //2.3.1.	Se ai intersecta o segmento que conecta os v�rtices vm e vn, fa�a:
 								if ( this->swapEdges( td, te, ai ) )
 								{
@@ -1669,7 +1666,7 @@ TeTin::insertSegment( TeCoord2D& pf, TeCoord2D& pn )
 									aiset.remove(ai);
 									break;
 								}
-							//}
+							}
 						}
 						if ( aii != aiset.end() )
 							continue;
@@ -1679,10 +1676,10 @@ TeTin::insertSegment( TeCoord2D& pf, TeCoord2D& pn )
 						aii = aiset.begin();
 						while ( aii != aiset.end() )
 						{
-							int ai = *aii;
+							long ai = *aii;
 //4.1.	Defina os tri�ngulos td e te compartilham ai,
-							int td = edgeSet_[ai].right();
-							int te = edgeSet_[ai].left();
+							long td = edgeSet_[ai].right();
+							long te = edgeSet_[ai].left();
 //4.2.	Defina os v�rtices vm e vn dos tri�ngulos td e te que n�o est�o sobre a aresta ai,
 //4.3.	Se ai intersecta o segmento que conecta os v�rtices vm e vn, fa�a:
 							if ( this->swapEdges( td, te, ai ) )
@@ -1690,22 +1687,22 @@ TeTin::insertSegment( TeCoord2D& pf, TeCoord2D& pn )
 //4.3.1.	Redefina ai como sendo o segmento que conecta os v�rtices vm e vn,
 //4.3.2.	Redefina adequadamente os tri�ngulos tv e tf,
 								TeCoord2D pinter;
-								//int vt = edgeSet_[ai].to();
-								//int vf = edgeSet_[ai].from();
-								TeIntersCoordsVec pinters;
-								//if ( ( vertexSet_[vt].location() == pf ) ||
-								//	 ( vertexSet_[vf].location() == pf ) ||
-								//	 ( vertexSet_[vt].location() == pn ) ||
-								//	 ( vertexSet_[vf].location() == pn ) ||
-								//	 ( (!TeSegmentIntersection(vertexSet_[vt].location(), vertexSet_[vf].location(), pf, pn, pinters) || pinters.size() == 2)))
-								//{
+								long vt = edgeSet_[ai].to();
+								long vf = edgeSet_[ai].from();
+								TeCoord2D pi;
+								if ( ( vertexSet_[vt].location() == pf ) ||
+									 ( vertexSet_[vf].location() == pf ) ||
+									 ( vertexSet_[vt].location() == pn ) ||
+									 ( vertexSet_[vf].location() == pn ) ||
+									 ( TeSegmentsIntersectPoint(vertexSet_[vt].location(), vertexSet_[vf].location(), pf, pn, pi) == false ))
+								{
 //4.3.3.	Se ai n�o intersecta r, fa�a:
 //4.3.3.1.	Remova a aresta ai de A
-								//	aiset.remove(ai);
-								//	aii = aiset.begin();
-								//}
-								//else
-								//	aii++;
+									aiset.remove(ai);
+									aii = aiset.begin();
+								}
+								else
+									aii++;
 							}
 							else
 								aii++;
@@ -1727,10 +1724,10 @@ TeTin::createInitialTriangles(TeBox &box)
 	zoomOut(box, 1./1.01);
 
 	//	Create and insert initial nodes of the Tin
- 	vertexSet_.add( TeTinVertex (box.lowerLeft(), (float)TeMAXFLOAT, NORMALVERTEX, 0 ) ); //v0
- 	vertexSet_.add( TeTinVertex (TeCoord2D(box.x1(),box.y2()), (float)TeMAXFLOAT, NORMALVERTEX, 1 ) ); //v1
- 	vertexSet_.add( TeTinVertex (box.upperRight(), (float)TeMAXFLOAT, NORMALVERTEX, 2 ) ); //v2
- 	vertexSet_.add( TeTinVertex (TeCoord2D(box.x2(),box.y1()), (float)TeMAXFLOAT, NORMALVERTEX, 3 ) ); //v3
+ 	vertexSet_.add( TeTinVertex (box.lowerLeft(), TeMAXFLOAT, NORMALVERTEX, 0 ) ); //v0
+ 	vertexSet_.add( TeTinVertex (TeCoord2D(box.x1(),box.y2()), TeMAXFLOAT, NORMALVERTEX, 1 ) ); //v1
+ 	vertexSet_.add( TeTinVertex (box.upperRight(), TeMAXFLOAT, NORMALVERTEX, 2 ) ); //v2
+ 	vertexSet_.add( TeTinVertex (TeCoord2D(box.x2(),box.y1()), TeMAXFLOAT, NORMALVERTEX, 3 ) ); //v3
 
 //	Create and insert initial lines of the Tin
 	edgeSet_.add( TeTinEdge (0, 1, -1, 0, NORMALEDGE) ); //a0
@@ -1751,12 +1748,49 @@ bool
 TeTin::insertLineSamples ( TeContourLine& line )
 {
 	TeLineSimplify(line, 20., 200.);
-	unsigned int i;
+	unsigned long i;
 	for ( i = 0; i < line.size(); i++ )
 	{
 		TeCoord2D pt = line[i];
-		this->insertPoint(pt.x(), pt.y(), (float)line.value());
+		this->insertPoint(pt.x(), pt.y(), line.value());
 	}
 	return true;
 }
 
+bool
+TeTin::isEdgeTriangle (long t)
+{
+	long neighids[3];
+	this->triangle3Neighbors(t, neighids[0],neighids[1],neighids[2]);
+
+	long i;
+	for (i = 0; i < 3; i++)
+		if ( neighids[i] == -1)
+			return true;
+	return false;
+}
+
+void
+TeTin::convexize ()
+{
+	unsigned long eii;
+
+	for (eii = 0; eii < edgeSet_.size(); eii++)
+	{
+		TeTinEdge ei = this->edge(eii);
+		if ((this->vertex(ei.from()).value() > TeTinBIGFLOAT ) ||
+			(this->vertex(ei.to  ()).value() > TeTinBIGFLOAT ) )
+		{
+			if ((this->vertex(ei.from()).value() > TeTinBIGFLOAT ) && 
+				(this->vertex(ei.to  ()).value() > TeTinBIGFLOAT ) )
+				continue;
+			else
+			{
+				long td = ei.right();
+				long te = ei.left();
+				if ( ! this->isEdgeTriangle(td) || ! this->isEdgeTriangle(te) )
+					this->swapEdges( td, te, eii );
+			}
+		}
+	}
+}
diff --git a/src/terralib/kernel/TeTin.h b/src/terralib/kernel/TeTin.h
old mode 100644
new mode 100755
index 16ec703..3b6d567
--- a/src/terralib/kernel/TeTin.h
+++ b/src/terralib/kernel/TeTin.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,17 +20,22 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeTin.h
-    This provides support for a TIN structure
+    \brief This file provides support for a TIN structure
 */
 #ifndef  __TERRALIB_INTERNAL_TIN_H
 #define  __TERRALIB_INTERNAL_TIN_H
+
 #include "TeGeometry.h"
 #include <list>
 #include <set>
 
-using namespace std;
+/** @} */ 
+ 
+/** @defgroup MathConst Mathematical constants and macro definitions for use in Tin
+  @{
+ */
+const double	TeTinBIGFLOAT = TeMAXFLOAT / 10.;		//!< Near Maximum float value - TeMAXFLOAT / 10.
 
 //!  Tin Vertex types 
 enum TeTinVertexType 
@@ -40,7 +45,7 @@ enum TeTinVertexType
 /*!
 	\sa TeGeometry TeMeasure
 */
-class  TeTinVertex : public TeGeomSingle<TeCoord2D>, public TeMeasure
+class TL_DLL TeTinVertex : public TeGeomSingle<TeCoord2D>, public TeMeasure
 {
 public:
 
@@ -48,18 +53,30 @@ public:
 	TeTinVertex() : TeMeasure ( TeMAXFLOAT ), oneEdge_ (-1) {}
 
 	//! Constructor with parameters
-	TeTinVertex( TeCoord2D xy, float value, TeTinVertexType type,
-		int edge ) :
+	TeTinVertex( TeCoord2D xy, double value, TeTinVertexType type,
+		long edge ) :
 		TeGeomSingle<TeCoord2D> (xy), TeMeasure ( value ),
 		 type_ (type), oneEdge_ ( edge )
 		{ if ( ! xy.tooBig() ) TeGeometry::setBox(TeBox(xy,xy)); }
 
 // -- Methods
 //
-	int oneEdge () 
+	//! Returns TRUE if a TeTinVertex is equal to other
+	bool operator== (const TeTinVertex& other) const
+	{
+		if((value_ == other.value_) && (type_ == other.type_) )
+		{
+			TeCoord2D p1 = location();
+			TeCoord2D p2 = other.location();
+			return p1==p2;
+		}
+		return false;
+	}
+
+	long oneEdge () 
 	{ return oneEdge_; }
 
-	void setOneEdge (int oneEdge) 
+	void setOneEdge (long oneEdge) 
 	{ oneEdge_ = oneEdge; }
 
 	TeTinVertexType type () 
@@ -68,19 +85,22 @@ public:
 	void setType (TeTinVertexType type) 
 	{ type_ = type; }
 
-	void value (float value) 
+	void value (double value) 
 	{ value_ = value; }
 
+	double value () 
+	{ return value_; }
+
 	TeGeomRep elemType() { return TeSAMPLES; }
 
 private:
 
 	TeTinVertexType type_;
-	int oneEdge_;
+	long oneEdge_;
 };
 
-//!  A basic class for handling a set of TeTinVertex
-class TeTinVertexSet : public TeGeomComposite <TeTinVertex>
+//!  A basic class for handling a std::set of TeTinVertex
+class TL_DLL TeTinVertexSet : public TeGeomComposite <TeTinVertex>
 {
 public:
 
@@ -90,7 +110,7 @@ public:
 
 // -- Methods
 
-	bool loadFromFile (string &fileName);
+	bool loadFromFile (std::string &fileName);
 
 	TeGeomRep elemType() { return TeSAMPLES; }
 };
@@ -103,27 +123,38 @@ enum TeTinEdgeType
 /*!
 	\sa TeGeometry
 */
-class TeTinEdge : public TeGeometry
+class TL_DLL TeTinEdge : public TeGeometry
 {
 public:
 
 // -- Constructors
 
 	TeTinEdge() {}
-	TeTinEdge(int from, int to, int left, int right,
+	TeTinEdge(long from, long to, long left, long right,
 		TeTinEdgeType type) :
 	from_ (from), to_ (to), left_ (left), right_ (right), type_ (type)
 	{}
 
 // -- Methods
 
-	int from () 
+	//! Returns TRUE if a TeTinEdge is equal to other
+	bool operator== (const TeTinEdge& other) const
+	{
+		if( (to_ == other.to_) && (from_ == other.from_) &&
+			(left_ == other.left_) && (right_ == other.right_) &&
+			(type_ == other.type_) )
+			return true;
+
+		return false;
+	}
+
+	long from () 
 	{ return from_; }
 
-	int to () 
+	long to () 
 	{ return to_; }
 
-	void setVertices (int from, int to)
+	void setVertices (long from, long to)
 	{ 
 		from_ = from;
 		to_ = to;
@@ -131,18 +162,18 @@ public:
 
 	void swapVertices ()
 	{ 
-		int aux = from_;
+		long aux = from_;
 		from_ = to_;
 		to_ = aux;
 	}
 
-	int left () 
+	long left () 
 	{ return left_; }
 
-	int right ()
+	long right ()
 	{ return right_; }
 
-	void setTriangles (int left, int right)
+	void setTriangles (long left, long right)
 	{ 
 		left_ = left;
 		right_ = right;
@@ -150,12 +181,12 @@ public:
 
 	void swapTriangles ()
 	{ 
-		int aux = left_;
+		long aux = left_;
 		left_ = right_;
 		right_ = aux;
 	}
 	
-	void exchangeTriangle ( int t1, int t2 )
+	void exchangeTriangle ( long t1, long t2 )
 	{
 		if (left_ == t1 )
 			left_ = t2;
@@ -163,7 +194,7 @@ public:
 			right_ = t2;
 	}
 
-	void exchangeVertex ( int v1, int v2 )
+	void exchangeVertex ( long v1, long v2 )
 	{
 		if (from_ == v1 )
 			from_ = v2;
@@ -181,13 +212,13 @@ public:
 
 private:
 
-	int	from_, to_;
-	int	left_, right_;
+	long	from_, to_;
+	long	left_, right_;
 	TeTinEdgeType type_;
 };
 
-//!  A basic class for handling a set of TeTinEdge
-class TeTinEdgeSet : public TeGeomComposite<TeTinEdge>
+//!  A basic class for handling a std::set of TeTinEdge
+class TL_DLL TeTinEdgeSet : public TeGeomComposite<TeTinEdge>
 {
 public:
 
@@ -197,13 +228,13 @@ public:
 
 // -- Methods
 
-	bool loadFromFile (string &fileName);
+	bool loadFromFile (std::string &fileName);
 
 	TeGeomRep elemType() { return TeSAMPLES; }
 };
 
 //! TeTinTriangle: A class for handling a TIN triangle
-class TeTinTriangle : public TeGeometry
+class TL_DLL TeTinTriangle : public TeGeometry
 {
 public:
 
@@ -216,7 +247,7 @@ public:
 		triEdges_[2] = -1;
 	}
 
-	TeTinTriangle(int first, int second, int third) 
+	TeTinTriangle(long first, long second, long third) 
 	{
 		triEdges_[0] = first;
 		triEdges_[1] = second;
@@ -225,21 +256,38 @@ public:
 
 // -- Methods
 
-	void setEdges (int first, int second, int third)
+	//! Returns TRUE if a TeTinTriangle is equal to other
+	bool operator== (const TeTinTriangle& other) const
+	{
+		if( (triEdges_[0] == other.triEdges_[0]) &&
+			(triEdges_[1] == other.triEdges_[1]) &&
+			(triEdges_[2] == other.triEdges_[2]) )
+			return true;
+
+		return false;
+	}
+
+	void setEdges (long first, long second, long third)
 	{
 		triEdges_[0] = first;
 		triEdges_[1] = second;
 		triEdges_[2] = third;
 	}
 
-	void edges (int& first, int& second, int& third)
+	//! Return triangle edges ids
+	/*!
+      \param first  first edge
+      \param second second edge
+      \param third  third edge
+	 */
+	void edges (long& first, long& second, long& third)
 	{
 		first  = triEdges_[0];
 		second = triEdges_[1];
 		third  = triEdges_[2];
 	}
 
-	int edgeAt (short num)
+	long edgeAt (short num)
 	{
 		if ((num > -1) && (num < 3))
 			return triEdges_[num];
@@ -251,11 +299,11 @@ public:
 
 private:
 
-	int	triEdges_[3];
+	long	triEdges_[3];
 };
 
-//! TeTinTriangle: A class for handling a set of TIN triangles
-class TeTinTriangleSet : public TeGeomComposite<TeTinTriangle>
+//! TeTinTriangle: A class for handling a std::set of TIN triangles
+class TL_DLL TeTinTriangleSet : public TeGeomComposite<TeTinTriangle>
 {
 public:
 
@@ -265,13 +313,13 @@ public:
 
 // -- Methods
 
-	bool loadFromFile (string &fileName);
+	bool loadFromFile (std::string &fileName);
 
 	TeGeomRep elemType() { return TeSAMPLES; }
 };
 
 //! A class to handle a TIN
-class TeTin
+class TL_DLL TeTin
 {
 public:
 
@@ -288,14 +336,34 @@ public:
 		edgeSet_.clear();
 	}
 
+	TeBox box()
+	{ return vertexSet_.box(); }
+
 	bool createInitialTriangles(TeBox &box);
 	bool insertLineSamples ( TeContourLine& line );
-	bool loadFromFile(string &fileName);
+	bool loadFromFile(std::string &fileName);
 	bool getLines(TeLineSet &lineSet);
 	bool isEmpty ()
 	{ return ( vertexSet_.empty() && triangleSet_.empty() &&
 	           edgeSet_.empty() ); } 
 
+	TeTinEdge& edge (long i)
+	{ return edgeSet_[i]; }
+
+	TeTinVertex& vertex (long i)
+	{ return vertexSet_[i];	}
+
+	TeTinTriangle& triangle (long i)
+	{ return triangleSet_[i];	}
+
+	typedef TeTinVertexSet::iterator TeTinVertexIterator;
+
+	TeTinVertexIterator vertexBegin()
+	{ return vertexSet_.begin(); }
+
+	TeTinVertexIterator vertexEnd()
+	{ return vertexSet_.end(); }
+
 	typedef  TeTinEdgeSet::iterator TeTinEdgeIterator;
 
 	TeTinEdgeIterator edgeBegin()
@@ -304,50 +372,74 @@ public:
 	TeTinEdgeIterator edgeEnd()
 	{ return edgeSet_.end(); }
 
-	TeTinVertex& vertex (int i)
-	{ return vertexSet_[i];	}
+	typedef  TeTinTriangleSet::iterator TeTinTriangleIterator;
 
-	TeTinEdge& edge (int i)
-	{ return edgeSet_[i]; }
+	TeTinTriangleIterator triangleBegin()
+	{ return triangleSet_.begin(); }
+
+	TeTinTriangleIterator triangleEnd()
+	{ return triangleSet_.end(); }
+
+	bool triangleContainsPoint(TeTinTriangle& t, TeCoord2D& pt);
+	bool triangleContainsPoint(long t, TeCoord2D& pt)
+	{ return triangleContainsPoint(triangleSet_[t], pt); }
+
+	long edgeWithVertexDiffFromEdge(long t, long v, long e);
+	long oneTriangleWithVertex(long vertex);
+	long oneEdgeWithVertex(long vertex);
+
+	long edgeOppVertex(TeTinTriangle& triangle, long vertex);
+	long edgeOppVertex(long triangle, long vertex)
+	{ return edgeOppVertex(triangleSet_[triangle], vertex); }
 
-	bool triangleContainsPoint(int t, TeCoord2D& pt);
-	int edgeWithVertexDiffFromEdge(int t, int v, int e);
-	int oneTriangleWithVertex(int vertex);
-	int oneEdgeWithVertex(int vertex);
-	int edgeOppVertex(int triangle, int vertex);
-	int vertexOppEdge(int triangle, int edge);
-	bool vertexEdges(int vertex, list<int> &edges);
-	bool vertexOppEdges(int vertex, list<int> &edges);
-	bool vertexOppVertices(int vertex, list<int> &vertices);
-	bool vertexTriangles(int vertex, list<int> &triangles);
-	bool triangle3Neighbors(int t, int& neighbor0, int& neighbor1, int& neighbor2);
-	int triangleAt (TeCoord2D& pt);
-
-	bool triangleVertices(int t, int& vertex0, int& vertex1, int& vertex2);
-
-	int triangleVertexAt(int t, int vertex);
-	bool trianglePoints(int t, TeCoord2D& pt0, TeCoord2D& pt1, TeCoord2D& pt2);
+	long vertexOppEdge(long triangle, long edge);
+	bool vertexEdges(long vertex, std::list<long> &edges);
+	bool vertexOppEdges(long vertex, std::list<long> &edges);
+	bool vertexOppEdges(long v, std::list<long> &triset, std::list<long> &edges);
+
+	bool vertexOppVertices(long vertex, std::list<long> &vertices);
+	bool vertexSecondNeighVertices(long v, list<long> &vertices);
+	bool vertexTriangles(long vertex, std::list<long> &triangles);
+	bool triangle3Neighbors(long t, long& neighbor0, long& neighbor1, long& neighbor2);
+	long triangleAt (TeCoord2D& pt);
+
+	bool triangleVertices(TeTinTriangle& t, long& vertex0, long& vertex1, long& vertex2);
+	bool triangleVertices(long t, long& vertex0, long& vertex1, long& vertex2)
+	{ return this->triangleVertices(triangleSet_[t], vertex0, vertex1, vertex2); }
+
+	long triangleVertexAt(long t, long vertex);
+
+	bool trianglePoints(TeTinTriangle& t, TeCoord2D& pt0, TeCoord2D& pt1, TeCoord2D& pt2);
+	bool trianglePoints(long t, TeCoord2D& pt0, TeCoord2D& pt1, TeCoord2D& pt2)
+	{ return trianglePoints( triangleSet_[t], pt0, pt1, pt2); }
 	
-	bool twoNewTriangles(int t, int v, set<int>& triangles);
-	int duplicateTriangle(int t, int n, int v, set<int>& triangles);
-	bool dupNeighTriangle (int t, int e, int v, set<int>& triangles);
+	bool twoNewTriangles(long t, long v, std::set<long>& triangles);
+	long duplicateTriangle(long t, long n, long v, std::set<long>& triangles);
+	bool dupNeighTriangle (long t, long e, long v, std::set<long>& triangles);
+
+	void testDelaunayForVertex(long v, std::set<long>& triangles);
+	bool testDelaunayAt(long t, long v, std::set<long>& triangles);
 
-	void testDelaunayForVertex(int v, set<int>& triangles);
-	bool testDelaunayAt(int t, int v, set<int>& triangles);
-	bool swapEdges( int t, int tv, int ai );
+	bool swapEdges( long t, long tv, long ai );
 
-	bool insertPoint(double x, double y, float value);
+	bool insertPoint(TeSample& xyz)
+	{ return insertPoint ( xyz.location().x(),xyz.location().y(),xyz.value() ); }
 
-	bool edgesInterBySegment( TeCoord2D& pf, TeCoord2D& pn, list<int> &aiset, list<int> &viset );
+	bool insertPoint(double x, double y, double value);
+
+	bool edgesInterBySegment( TeCoord2D& pf, TeCoord2D& pn, std::list<long> &aiset, std::list<long> &viset );
 	bool insertSegment( TeCoord2D& pf, TeCoord2D& pn );
 
+
+	void convexize ();
+	bool isEdgeTriangle (long t);
+
 	TeGeomRep elemType() { return TeSAMPLES; }
 private:
 
 	TeTinVertexSet		vertexSet_;
 	TeTinTriangleSet	triangleSet_;
 	TeTinEdgeSet		edgeSet_;
-
 };
 
 #endif
diff --git a/src/terralib/kernel/TeUtils.cpp b/src/terralib/kernel/TeUtils.cpp
old mode 100644
new mode 100755
index b6a6dcd..7ee8343
--- a/src/terralib/kernel/TeUtils.cpp
+++ b/src/terralib/kernel/TeUtils.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright  2001-2004 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -21,11 +21,37 @@ indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
 
-
 #include "TeUtils.h"
 #include "TeDefines.h"
+#include "TeException.h"
+#include "TeAgnostic.h"
+
 #include <stdio.h>
 #include <ctype.h>
+#include <string>
+#include <cstring> 
+#include <cstdlib>
+
+/* The following includes are needed for memory checking */
+#if TePLATFORM == TePLATFORMCODE_MSWINDOWS
+  #include <windows.h>
+  #include <winbase.h>
+#elif TePLATFORM == TePLATFORMCODE_LINUX || TePLATFORM == TePLATFORMCODE_AIX
+  #include <unistd.h>
+  #include <string.h>
+  #include <errno.h>
+  #include <sys/resource.h>
+  #include <sys/types.h>
+  #include <sys/stat.h>  
+  #include <dirent.h>
+
+  #if defined( __FreeBSD__ )
+    #include <sys/sysctl.h> /* BSD workaround */
+  #endif
+#else
+  #error "Unsuported plataform for physical memory checking"
+#endif
+
 
 string
 Te2String ( const int value )
@@ -39,7 +65,7 @@ string
 Te2String ( const unsigned int value )
 {
 	char name [ TeNAME_LENGTH ];
-	sprintf ( name, "%d", value );
+	sprintf ( name, "%u", value );
 	return name;
 }
 
@@ -55,7 +81,7 @@ string
 Te2String ( const unsigned long value )
 {
 	char name [ TeNAME_LENGTH ];
-	sprintf ( name, "%ld", value );
+	sprintf ( name, "%lu", value );
 	return name;
 }
 
@@ -97,15 +123,19 @@ string
 Te2String ( const double value, int precision )
 {
 	char name [ TeNAME_LENGTH ];
-	if (precision == 0)
-		sprintf ( name, "%f", value );
-	else
-		sprintf ( name, "%.*f", precision, value );
-
-return name;
+	sprintf(name, "%.*f", precision, value );
+	return name;
 }
 
 
+string
+Te2String ( const double value )
+{
+	char name [ TeNAME_LENGTH ];
+	sprintf ( name, "%e", value ); 
+	return name;
+}
+
 string 
 TeGetExtension ( const char* value )
 {
@@ -155,7 +185,7 @@ TeGetPath(const char* value)
 	if (!value)
 		return string(".");
 	string name = string (value);
-	unsigned int ip = name.rfind('/');
+	std::string::size_type ip = name.rfind('/');
 	if (ip == std::string::npos)
 		return string(".");
 	else
@@ -241,7 +271,7 @@ int TeSplitString(const string& input, const string& delimiter, vector<string>&
    }
 
    int numFound = 0;
-   while( newPos > iPos )
+   while( newPos >= iPos )
    {
        numFound++;
        positions.push_back(newPos);
@@ -252,8 +282,14 @@ int TeSplitString(const string& input, const string& delimiter, vector<string>&
    for( unsigned int i=0; i <= positions.size(); i++ )
    {
        string s;
-       if( i == 0 ) { s = input.substr( i, positions[i] ); }
-       int offset = positions[i-1] + sizeS2;
+       if( i == 0 )
+	   {
+	   s = input.substr( i, positions[i] );
+	   }
+	   else
+	   {
+       int offset=0;
+	   if(i>0)	 offset= positions[i-1] + sizeS2;
        if( offset < isize )
        {
            if( i == positions.size() )
@@ -265,6 +301,7 @@ int TeSplitString(const string& input, const string& delimiter, vector<string>&
                 s = input.substr( positions[i-1] + sizeS2, positions[i] - positions[i-1] - sizeS2 );
            }
        }
+	   }
        if( s.size() > 0 )
        {
                results.push_back(s);
@@ -327,9 +364,12 @@ void TeWriteToFile(const string& fileName, const string& text, const string& mod
 
 	f = fopen(fileName.c_str(), mode.c_str());
 
-	fprintf(f, "%s", text.c_str());
+	if(f != NULL)
+	{
+		fprintf(f, "%s", text.c_str());
 
-	fclose(f);
+		fclose(f);
+	}
 
 	return;
 }
@@ -348,74 +388,107 @@ string TeCheckName(const string& name, bool& changed, string& invalidChar)
 {
 	string newName = name;
 
+	changed = false;
+
 	if(newName[0] >= 0x30 && newName[0] <= 0x39)
 	{
-		newName[0] = '_';
-		invalidChar = "begin with a numeric character";
+		invalidChar = "begin with a numeric character\n";
+        changed = true;
 	}
+    if(newName[0] == '_')
+    {
+        invalidChar += "begin with a invalid character: underscore _\n";
+        changed = true;
+    }
 
-	int ff = newName.find(" ", string::npos);
-	while(ff >= 0)
+	int ff = newName.find(" ");
+	if(ff >= 0)
 	{
-		newName.replace(ff, 1, "_");
-		ff = newName.find(" ", string::npos);
-		invalidChar = "blank space";
+        invalidChar += "invalid character: blank space\n";
+        changed = true;
 	}
 
-	ff = newName.find("*", string::npos);
-	while(ff >= 0)
+	ff = newName.find(".");
+	if(ff >= 0)
 	{
-		newName.replace(ff, 1, "_");
-		ff = newName.find("*", string::npos);
-		invalidChar = "mathematical symbol *";
+        invalidChar += "invalid character: dot '.'\n";
+        changed = true;
 	}
 
-	ff = newName.find("/", string::npos);
-	while(ff >= 0)
+	ff = newName.find("*");
+	if(ff >= 0)
 	{
-		newName.replace(ff, 1, "_");
-		ff = newName.find("/", string::npos);
-		invalidChar = "mathematical symbol /";
+        invalidChar += "invalid character: mathematical symbol '*'\n";
+        changed = true;
 	}
 
-	ff = newName.find("-", string::npos);
-	while(ff >= 0)
+	ff = newName.find("/");
+	if(ff >= 0)
 	{
-		newName.replace(ff, 1, "_");
-		ff = newName.find("-", string::npos);
-		invalidChar = "mathematical symbol -";
+        invalidChar += "invalid character: mathematical symbol '/'\n";
+        changed = true;
 	}
 
-	ff = newName.find("+", string::npos);
-	while(ff >= 0)
+	ff = newName.find("(");
+	if(ff >= 0)
 	{
-		newName.replace(ff, 1, "_");
-		ff = newName.find("+", string::npos);
-		invalidChar = "mathematical symbol +";
+        invalidChar += "invalid character: parentheses '('\n";
+        changed = true;
 	}
 
-	ff = newName.find("%", string::npos);
-	while(ff >= 0)
+	ff = newName.find(")");
+	if(ff >= 0)
+	{
+        invalidChar += "invalid character: parentheses ')'\n";
+        changed = true;
+	}
+	ff = newName.find("-");
+	if(ff >= 0)
 	{
-		newName.replace(ff, 1, "_");
-		ff = newName.find("%", string::npos);
-		invalidChar = "mathematical symbol %";
+        invalidChar += "invalid character: mathematical symbol '-'\n";
+        changed = true;
 	}
 
-	ff = newName.find(">", string::npos);
-	while(ff >= 0)
+	ff = newName.find("+");
+	if(ff >= 0)
 	{
-		newName.replace(ff, 1, "_");
-		ff = newName.find(">", string::npos);
-		invalidChar = "mathematical symbol >";
+        invalidChar += "invalid character: mathematical symbol '+'\n";
+        changed = true;
 	}
 
-	ff = newName.find("<", string::npos);
-	while(ff >= 0)
+	ff = newName.find("%");
+	if(ff >= 0)
 	{
-		newName.replace(ff, 1, "_");
-		ff = newName.find("<", string::npos);
-		invalidChar = "mathematical symbol <";
+        invalidChar += "invalid character: mathematical symbol '%'\n";
+        changed = true;
+	}
+
+	ff = newName.find(">");
+	if(ff >= 0)
+	{
+        invalidChar += "invalid character: mathematical symbol '>'\n";
+        changed = true;
+	}
+
+	ff = newName.find("<");
+	if(ff >= 0)
+	{
+        invalidChar += "invalid character: mathematical symbol '<'\n";
+        changed = true;
+	}
+
+	ff = newName.find("&");
+	if(ff >= 0)
+	{
+        invalidChar += "invalid character: mathematical symbol '&'\n";
+        changed = true;
+	}
+
+	ff = newName.find("$");
+	if(ff >= 0)
+	{
+        invalidChar += "invalid symbol: '$'\n";
+        changed = true;
 	}
 
 	string u = TeConvertToUpperCase(newName);
@@ -424,10 +497,11 @@ string TeCheckName(const string& name, bool& changed, string& invalidChar)
 	   u=="DROP" || u=="INTO" || u=="VALUE" || u=="IN" || u=="ASC" || u=="DESC"|| u=="COUNT" || u=="JOIN" ||
 	   u=="LEFT" || u=="RIGHT" || u=="INNER" || u=="UNION" || u=="IS" || u=="NULL" || u=="WHERE" ||
 	   u=="BETWEEN" || u=="DISTINCT" || u=="TRY" || u=="IT" || u=="INSERT" || u=="ALIASES" || u=="CREATE" ||
-	   u=="ALTER" || u=="TABLE" || u=="INDEX" || u=="ALL" || u=="HAVING")
+	   u=="ALTER" || u=="TABLE" || u=="INDEX" || u=="ALL" || u=="HAVING" || u=="EXEC" || u== "SET" ||
+	   u == "AVG" || u == "MAX" || u == "MIN" || u == "SUM" || u == "FILTER" || u == "OFFSET"  || u == "LENGHT" )
 	{
-		invalidChar = newName;	
-		newName += "_";
+        invalidChar += "invalid name: using reserved word " + u + "\n";	
+        changed = true;
 	}
 
 	// check against geometry tables field names
@@ -445,21 +519,301 @@ string TeCheckName(const string& name, bool& changed, string& invalidChar)
 	   n == "alignment_horiz" || n=="from_node" ||
 	   n == "to_node")
 	{
-			invalidChar = newName;
-			newName += "_";
+        invalidChar += "invalid name: using reserved word " + n + "\n";	
+        changed = true;
 	}
 
 	// reserved words
 	if( (n=="zone") || (n=="comp") || (n=="no") || (n=="local") ||
 		(n=="level") || (n=="long"))
 	{
-		invalidChar = newName;
-		newName += "_";
+        invalidChar += "invalid name: using reserved word " + n + "\n";	
+        changed = true;
 	}
 
-	changed = true;
-	if(name == newName)
-		changed = false;
-
 	return newName;
 }
+
+
+unsigned long int TeGetFreePhysicalMemory()
+{
+  unsigned long int freemem = 0;
+
+  #if defined __unix__
+    #if defined( __FreeBSD__ )
+      /* BSD workaround */
+      
+      unsigned int usermem;
+      size_t usermem_len = sizeof( usermem );
+      int mib[2] = { CTL_HW, HW_USERMEM };
+      
+      if( sysctl( mib, ( 2 * sizeof(int) ), &usermem, &usermem_len, NULL, 0 ) 
+        == 0 ) {
+        
+        freemem = (unsigned long int)usermem;
+      } else {
+        throw( "TeGetFreePhysicalMemory error" );
+      }
+    #else
+      /* Other linux stuff */
+      
+      freemem = (unsigned long int) sysconf( _SC_PAGESIZE ) *
+        (unsigned long int) sysconf( _SC_AVPHYS_PAGES );
+    #endif
+  #elif defined WIN32
+      LPMEMORYSTATUS status_buffer = new MEMORYSTATUS;
+      GlobalMemoryStatus( status_buffer );
+      freemem = (unsigned long int) status_buffer->dwAvailPhys;
+      delete status_buffer;
+  #else
+      #error "Unsuported plataform for physical memory checking"
+  #endif
+
+  return freemem;
+}
+
+
+unsigned long int TeGetTotalPhysicalMemory()
+{
+  unsigned long int totalmem = 0;
+
+  #if defined __unix__
+    #if defined( __FreeBSD__ )
+      /* BSD workaround */
+      
+      unsigned int physmem;
+      size_t physmem_len = sizeof( physmem );
+      int mib[2] = { CTL_HW, HW_PHYSMEM };
+      
+      if( sysctl( mib, ( 2 * sizeof(int) ), &physmem, &physmem_len, NULL, 0 ) 
+        == 0 ) {
+        
+        totalmem = (unsigned long int)physmem; 
+      } else {
+        throw( "TeGetTotalPhysicalMemory error" );
+      }
+    #else
+      /* Other linux stuff */  
+  
+      totalmem = (unsigned long int) sysconf( _SC_PAGESIZE ) *
+        (unsigned long int) sysconf( _SC_PHYS_PAGES );
+    #endif
+  #elif defined WIN32
+    LPMEMORYSTATUS status_buffer = new MEMORYSTATUS;
+    GlobalMemoryStatus( status_buffer );
+    totalmem = (unsigned long int) status_buffer->dwTotalPhys;
+    delete status_buffer;
+  #else
+    #error "Unsuported plataform for physical memory checking"
+  #endif
+
+  return totalmem;
+}
+
+unsigned long int TeGetFreeVirtualMemory()
+{
+  unsigned long int freemem = 0;
+
+  #if defined __unix__
+    struct rusage rusageinfo;
+    
+    if( getrusage( RUSAGE_SELF, &rusageinfo ) == 0 )
+    {
+      freemem = TeGetTotalVirtualMemory() - 
+        ((unsigned long int)( rusageinfo.ru_maxrss +
+        rusageinfo.ru_ixrss + 
+        rusageinfo.ru_idrss + 
+        rusageinfo.ru_isrss ) );
+    }
+  #elif defined WIN32
+    LPMEMORYSTATUS status_buffer = new MEMORYSTATUS;
+    GlobalMemoryStatus( status_buffer );
+    freemem = (unsigned long int) status_buffer->dwAvailVirtual;
+    delete status_buffer;
+  #else
+      #error "Unsuported plataform for virtual memory checking"
+  #endif
+
+  return freemem;
+}
+
+
+unsigned long int TeGetTotalVirtualMemory()
+{
+  unsigned long int totalmem = 0;
+
+  #if defined __unix__
+    struct rlimit info;
+     
+    if( getrlimit( RLIMIT_AS, &info ) == 0 )
+    {
+      totalmem = (unsigned long int)info.rlim_max;
+    };
+  #elif defined WIN32
+    LPMEMORYSTATUS status_buffer = new MEMORYSTATUS;
+    GlobalMemoryStatus( status_buffer );
+    totalmem = (unsigned long int) status_buffer->dwTotalVirtual;
+    delete status_buffer;
+  #else
+    #error "Unsuported plataform for virtual memory checking"
+  #endif
+
+  return totalmem;
+}
+
+unsigned int TeGetPhysProcNumber()
+{
+  unsigned int procnmb = 0;
+  
+  #if TePLATFORM == TePLATFORMCODE_MSWINDOWS
+    SYSTEM_INFO siSysInfo;
+    GetSystemInfo(&siSysInfo);
+    procnmb = (unsigned int)siSysInfo.dwNumberOfProcessors;
+  #elif TePLATFORM == TePLATFORMCODE_LINUX || TePLATFORM == TePLATFORMCODE_AIX
+    procnmb = (unsigned int)sysconf(_SC_NPROCESSORS_ONLN );
+  #else
+    #error "ERROR: Unsupported platform"
+  #endif    
+
+  return procnmb;
+}
+  
+  
+bool TeGetTempFileName( std::string& filename )
+{
+  char* name = tempnam( 0, 0 );
+  
+  if( name == 0 ) {
+    filename.clear();
+    return false;
+  } else {
+    filename = std::string( name );
+    return true;
+  }
+}  
+
+
+unsigned long int TeGetFileSize( const std::string& filename )
+{
+  FILE* fileptr = fopen( filename.c_str(), "r" );
+  
+  if( fileptr == 0 ) {
+    throw TeException( CANNOT_OPEN_FILE, "File not found", false );
+  }
+  
+  fseek( fileptr, 0, SEEK_END );
+  
+  unsigned long int filesize = ( unsigned long int ) ftell( fileptr );
+  
+  fclose( fileptr );
+  
+  return filesize;
+}
+
+
+bool TeCheckFileExistence( const std::string& filename )
+{
+  FILE* fileptr = fopen( filename.c_str(), "r" );
+  
+  if( fileptr == 0 ) {
+    return false;
+  } else {
+    fclose( fileptr );
+    return true;
+  }
+}
+
+bool 
+TeGetDirFullFilesNames( const std::string& path,
+  const bool& recursive, std::vector< std::string >& filesnames )
+{
+  #if TePLATFORM == TePLATFORMCODE_MSWINDOWS
+    const std::string separator( "\\" );
+  
+    WIN32_FIND_DATA FindFileData;
+    HANDLE hFind;
+
+    hFind = FindFirstFile( (LPCTSTR)(path + "\\*" ).c_str(), 
+      &FindFileData);
+
+    if ( hFind == INVALID_HANDLE_VALUE ) {
+      return false;
+    } else {
+      while( FindNextFile( hFind, &FindFileData) != 0 ) 
+      {
+        if( FindFileData.dwFileAttributes & 
+          FILE_ATTRIBUTE_DIRECTORY ) 
+        {
+          if( recursive ) 
+          {
+            std::string recursive_path;
+            recursive_path = (char*)(FindFileData.cFileName);
+            
+            if( ! ( TeGetDirFullFilesNames( recursive_path, true,
+              filesnames ) ) ) {
+              
+              return false;
+            } 
+          }
+        } else {
+          std::string filename( (char*)FindFileData.cFileName );
+          filesnames.push_back( path + separator + filename );
+        }
+      } 
+    }
+  #elif TePLATFORM == TePLATFORMCODE_LINUX || TePLATFORM == TePLATFORMCODE_AIX
+    DIR* dirptr = opendir( path.c_str() );
+    
+    if( dirptr == 0 ) 
+    {
+      return false;
+    }
+    else
+    {
+      dirent* direntptr = readdir( dirptr );
+      struct stat stat_buf;
+      char filename[ 3000 ];
+      
+      while( direntptr )
+      {
+        filename[ 0 ] = '\0';
+        strcpy( filename, path.c_str() );
+        strcat( filename, "/" );
+        strcat( filename, direntptr->d_name );
+        
+        if( stat( filename, &stat_buf) )
+        {
+          closedir( dirptr );
+          return false;
+        }
+        else
+        {
+          if( S_ISDIR( stat_buf.st_mode ) )
+          {
+            if( recursive && ( strcmp( direntptr->d_name, "." ) != 0 ) && 
+              ( strcmp( direntptr->d_name, ".." ) != 0 ) )
+            {
+              if( TeGetDirFullFilesNames( filename, true, filesnames ) == false )
+              {
+                closedir( dirptr );
+                return false;
+              }
+            }
+          }
+          else
+          {
+            filesnames.push_back( filename );
+          }
+        }
+        
+        direntptr = readdir( dirptr );
+      }
+      
+      closedir( dirptr );
+    }
+  #else
+    #error "ERROR: Unsuported platform"
+  #endif   
+  
+  return true; 
+}
diff --git a/src/terralib/kernel/TeUtils.h b/src/terralib/kernel/TeUtils.h
old mode 100644
new mode 100755
index 88fd44e..5c85710
--- a/src/terralib/kernel/TeUtils.h
+++ b/src/terralib/kernel/TeUtils.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright  2001-2004 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,9 +20,8 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeUtils.h
-     This file contains some utility functions
+     \brief This file contains some general purpose utilitary  functions
 */
 #ifndef  __TERRALIB_INTERNAL_UTILS_H
 #define  __TERRALIB_INTERNAL_UTILS_H
@@ -42,83 +41,105 @@ of this library and its documentation.
 
 using namespace std;
 
-/** @defgroup FileFunctions Functions to manipulate file 
+/** @defgroup Utils General purpose utilitary functions
+ *  General purpose utilitary functions
+ *  @{
+ */
+
+/** @defgroup FileNameFunctions Functions to manipulate file names 
+	@ingroup  Utils
  *  @{
  */
 	//! Get the extension part (right to the dot) of a string
-	string TeGetExtension ( const char* value );
+	TL_DLL string TeGetExtension ( const char* value );
 
 	//! Get the name part (left to the dot) of a string, path included
-	string TeGetName ( const char* value );
+	TL_DLL string TeGetName ( const char* value );
 
 	//! Get the base name part of a string, strip path information
-	string TeGetBaseName ( const char* value );
+	TL_DLL string TeGetBaseName ( const char* value );
 
 	//! Get the path part of a file name
-	string TeGetPath(const char* value);
+	TL_DLL string TeGetPath(const char* value);
 
-	//! This function writes a string to a file.
-	/*
-		\params fileName the file name to write to, including the directory.
-		\params text     the string with the text to write to.
-		\params mode     the mode used to write to the file (a | w | r).
+	//! Writes a string to a file.
+	/*!
+		\param fileName the file name to write to, including the directory.
+		\param text     the string with the text to write to.
+		\param mode     the mode used to write to the file (a | w | r).
 	*/
-	void TeWriteToFile(const string& fileName, const string& text, const string& mode);
-
+	TL_DLL void TeWriteToFile(const string& fileName, const string& text, const string& mode);
 /** @} */ 
 
 /** @defgroup C2StringFunctions Functions convert numbers to strings
+	@ingroup  Utils
  *  @{
  */
 	//! Transforms an integer to string
-	string Te2String ( const int value );
+	TL_DLL string Te2String ( const int value );
 
 	//! Transforms an unsigned integer to string
-	string Te2String ( const unsigned int value );
+	TL_DLL string Te2String ( const unsigned int value );
 
 	//! Transforms a long to string
-	string Te2String ( const long value );
+	TL_DLL string Te2String ( const long value );
 
 	//! Transforms an unsigned long to string
-	string Te2String ( const unsigned long value );
+	TL_DLL string Te2String ( const unsigned long value );
+
+	//! Transforms a double to string floating point notation with precision decimal places
+	TL_DLL string Te2String ( const double value, int precision );
+
+	//! Transforms a double to string in exponential notation
+	TL_DLL string Te2String ( const double value );
 
-	//! Transforms a double to string
-	string Te2String ( const double value, int precision=0 );
 /** @} */ 
 
 /** @defgroup StringFunctions Functions to manipulate strings
- *  @{
+ 	@ingroup  Utils
+*  @{
  */
 	//! Converts a string to upper case
-	void TeConvertToUpperCase ( const string& , char* );
+	TL_DLL void TeConvertToUpperCase ( const string& , char* );
 
 	//! Converts a string to upper case
-	string TeConvertToUpperCase (const string &name);
+	TL_DLL string TeConvertToUpperCase (const string &name);
 
 	//! Converts a string to lower case
-	string TeConvertToLowerCase (const string &name);
+	TL_DLL string TeConvertToLowerCase (const string &name);
 
 	//! Removes special characteres from a string
-	string TeRemoveSpecialChars ( string& str);
+	TL_DLL string TeRemoveSpecialChars ( string& str);
 
-	//! Removes left and right blank, \t, \n  characters of a string
-	void  TeTrim(string &str);
+	//! Removes left and right blank, tab and carriage return characters of a string
+	TL_DLL void TeTrim(string &str);
 
 	//! Splits a string, given a separator, in a vector of parts
-	int TeSplitString(const string& input, const string& delimiter, vector<string>& results);
+	TL_DLL int TeSplitString(const string& input, const string& delimiter, vector<string>& results);
 
 	//! Compares two strings
 	/*
 		\params caseS flag indicating if it is a case sensitive comparation
 	*/
-	bool TeStringCompare(const string& str1, const string& str2, bool caseS=false);
+	TL_DLL bool TeStringCompare(const string& str1, const string& str2, bool caseS=false);
+
+
+	//! Validate a string to check if it can be used as a column name
+	/*
+		\param name			string to be checked
+		\param changed		output flag to identify that string has changed
+		\param invalidChar	output or sequence of chars that are invalid in the name
+		\return the modified valid name
+	*/
+	TL_DLL string TeCheckName(const string& name, bool& changed, string& invalidChar);
 /** @} */ 
 
 /** @defgroup MathFunctions Mathematical functions
- *  @{
+ 	@ingroup  Utils
+*  @{
  */
 	//! Rounds a double to int
-	inline int TeRound(double val)
+	TL_DLL inline int TeRound(double val)
 	{	
 		if (val>=0)
 			return (int)(val+.5);
@@ -127,10 +148,10 @@ using namespace std;
 	}
 
 	//! Rounds a double value to a given number of decimal digits
-	double TeRoundD(double val, int precision=8);
+	TL_DLL double TeRoundD(double val, int precision=8);
 
 	//! Compares two doubles
-	bool TeCompareDouble(double a, double b, int precision);
+	TL_DLL bool TeCompareDouble(double a, double b, int precision);
 
 	//! Adjust a number to a given precision 
 	/*
@@ -139,14 +160,14 @@ using namespace std;
 		\param reduce flag to indicate that the number should be reduced instead to increased
 		\return the adjusted number
 	*/
-	double TeAdjustToPrecision(double val, int precision, bool reduce=false);
+	TL_DLL double TeAdjustToPrecision(double val, int precision, bool reduce=false);
 
 	//! Rounds a double raster element index to an integer
 	/*
 		Raster elements have area, so raster element in upper-left position has
 		index from [-0.5,+0.5) in i and j dimension.
 	*/
-	inline int TeRoundRasterIndex(double val)
+	TL_DLL inline int TeRoundRasterIndex(double val)
 	{	
 		int ind = (int) val;
 		if (val < (ind-0.5))
@@ -155,13 +176,118 @@ using namespace std;
 			ind += 1;
 		return ind;
 	}
+	/**
+	* Cubic root from x.
+	*
+	* @param x X.
+	* @return The cubic root from x.
+	*/         
+	TL_DLL inline double TeCubicRoot( double x )
+	{
+		if( x < 0 ) {
+		return ( -1. ) * pow(  ( -1. ) * x, ( 1. / 3. ) );
+		} else {
+			return pow(  x, ( 1. / 3. ) );
+		}
+	};
+	
+	/*! Comparassion of two floating points, considering a given precision */
+	TL_DLL inline bool TeFPEquals(double d1, double d2, double precision)
+	{
+		double eps1 = fabs(d1), 
+			eps2 = fabs(d2), 
+			eps;
+		eps = (eps1 > eps2) ? eps1 : eps2;
+		if (eps == 0.0)
+			return true; //both numbers are 0.0
+		eps *= precision;
+		return (fabs(d1 - d2) < eps);
+	}
 
-	//! Check column name and change if necessary
-	/*
-		Raster elements have area, so raster element in upper-left position has
-		index from [-0.5,+0.5) in i and j dimension.
-	*/
-	string TeCheckName(const string& name, bool& changed, string& invalidChar);
+	//! Swap the bytes of a short value
+	static inline short swaps(short value)
+	{
+		short svalue = ((value & 0x00ff) << 8) | ((value >> 8) & 0x00ff);
+		return svalue;
+	}
+  
+  /**
+   * Returns the amount of free physical memory (bytes).
+   *
+   * @return The amount of free physical memory (bytes).
+   */
+  TL_DLL unsigned long int TeGetFreePhysicalMemory();
+
+  /**
+   * Returns the amount of total physical memory (bytes).
+   *
+   * @return The amount of total physical memory (bytes).
+   */
+  TL_DLL unsigned long int TeGetTotalPhysicalMemory();
+  
+  /**
+   * Returns the amount of free virtual memory (bytes)
+   * for the current process (physical + swapped).
+   *
+   * @return The amount of free virtual memory (bytes).
+   */
+  TL_DLL unsigned long int TeGetFreeVirtualMemory();
+
+  /**
+   * Returns the amount of total virtual memory (bytes)
+   * that can be claimed by the current process 
+   * (physical + swapped).
+   *
+   * @return The amount of total virtual memory (bytes).
+   */
+  TL_DLL unsigned long int TeGetTotalVirtualMemory();  
+  
+  /**
+   * Returns the number of physical processors.
+   *
+   * @return The number of physical processors.
+   */
+  TL_DLL unsigned int TeGetPhysProcNumber();  
+    
+  /**
+   * Generates a temporary unique file name.
+   *
+   * @param filename The generated file name.
+   * @return true if ok, false errors.
+   */
+  TL_DLL bool TeGetTempFileName( std::string& filename );    
+  
+  /**
+   * @brief The file size (bytes).
+   *
+   * @note Throws an exception if file not found. 
+   * @param filename The file name.
+   * @return The file size (bytes).
+   */
+  TL_DLL unsigned long int TeGetFileSize( const std::string& filename );  
+  
+  /**
+   * @brief Check the file existence.
+   *
+   * @param filename The file name.
+   * @return true if the file exists, false if not.
+   */
+  TL_DLL bool TeCheckFileExistence( const std::string& filename );
+  
+  //! Get the full names of all files inside the given directory.
+  /*
+    \param path The directory path.
+    \param recursive If true, a recursive search will be performed.
+    \param filesnames The files names.
+    \return true if OK, false on errors.
+  */
+  TL_DLL bool 
+  TeGetDirFullFilesNames( const std::string& path,
+    const bool& recursive,
+    std::vector< std::string >& filesnames );  
+
+
+/** @} */ 
 /** @} */ 
 
 #endif
diff --git a/src/terralib/kernel/TeVectorRemap.cpp b/src/terralib/kernel/TeVectorRemap.cpp
old mode 100644
new mode 100755
index d09e38c..e725e65
--- a/src/terralib/kernel/TeVectorRemap.cpp
+++ b/src/terralib/kernel/TeVectorRemap.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -35,11 +35,10 @@ TeBox TeRemapBox ( TeBox& box, TeProjection* projFrom, TeProjection* projTo)
 	if (*projFrom == *projTo)
 		return box;
 
-	if (projFrom->datum().name() != projTo->datum().name())
-	{
-		projFrom->setDestinationProjection(projTo);
-		projTo->setDestinationProjection(projFrom);
-	}
+	if(projFrom->name() == "NoProjection" || projTo->name() == "NoProjection")
+		return box;
+
+	projFrom->setDestinationProjection(projTo);
 
 	TeCoord2D	pll = box.lowerLeft (),
 				pur = box.upperRight (),
@@ -53,6 +52,18 @@ TeBox TeRemapBox ( TeBox& box, TeProjection* projFrom, TeProjection* projTo)
 	pul = projFrom->PC2LL (pul);
 	plr = projFrom->PC2LL (plr);
 
+// Evaluate the minimum box that includes all four corners
+
+	pll.x(std::min(pll.x(),pul.x()));
+	pll.y(std::min(pll.y(),plr.y()));
+	plr.x(std::max(plr.x(),pur.x()));
+	plr.y(std::min(pll.y(),plr.y()));
+	pur.x(std::max(pur.x(),plr.x()));
+	pur.y(std::max(pul.y(),pur.y()));
+	pul.x(std::min(pll.x(),pul.x()));
+	pul.y(std::max(pul.y(),pur.y()));
+
+
 // Bring coordinates of box corners to target projection
 
 	pll = projTo->LL2PC (pll);
@@ -93,3 +104,53 @@ void TeVectorRemap(TeCell& c1, TeProjection* p1, TeCell& c2, TeProjection* p2)
 	c2.setBox(nb);
 }
 
+TeBox TeRemapBoxPC2Geodetic (const TeBox& box, TeProjection* proj)
+{
+	if (proj == 0)
+		return box;
+
+	proj->setDestinationProjection(0);
+
+	TeCoord2D	pll = box.lowerLeft (),
+				pur = box.upperRight (),
+				pul (pll.x(),pur.y()),
+				plr (pur.x(),pll.y());
+
+	pll = proj->PC2LL (pll);
+	pur = proj->PC2LL (pur);
+	pul = proj->PC2LL (pul);
+	plr = proj->PC2LL (plr);
+
+// Evaluate the minimum box that includes all four corners
+
+	return TeBox (	std::min(pll.x(),pul.x()),
+					std::min(pll.y(),plr.y()),
+					std::max(pur.x(),plr.x()),
+					std::max(pul.y(),pur.y()));
+}
+
+TeBox TeRemapBoxGeodetic2PC (const TeBox& box, TeProjection* proj)
+{
+	if (proj == 0)
+		return box;
+
+	proj->setDestinationProjection(0);
+
+	TeCoord2D	pll = box.lowerLeft (),
+				pur = box.upperRight (),
+				pul (pll.x(),pur.y()),
+				plr (pur.x(),pll.y());
+
+	pll = proj->LL2PC (pll);
+	pur = proj->LL2PC (pur);
+	pul = proj->LL2PC (pul);
+	plr = proj->LL2PC (plr);
+
+// Evaluate the minimum box that includes all four corners
+
+	return TeBox (	std::min(pll.x(),pul.x()),
+					std::min(pll.y(),plr.y()),
+					std::max(pur.x(),plr.x()),
+					std::max(pul.y(),pur.y()));
+}
+
diff --git a/src/terralib/kernel/TeVectorRemap.h b/src/terralib/kernel/TeVectorRemap.h
old mode 100644
new mode 100755
index d4515ca..52a8e60
--- a/src/terralib/kernel/TeVectorRemap.h
+++ b/src/terralib/kernel/TeVectorRemap.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,16 +20,24 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
+/*! \file TeVectorRemap.h
+    \brief This file contains functions to remap vector structures
+*/
 #ifndef  __TERRALIB_INTERNAL_VECTORREMAP_H
 #define  __TERRALIB_INTERNAL_VECTORREMAP_H
 
 #include "TeProjection.h"
 #include "TeGeometry.h"
 
-//! Remaps a geometry from projection p1 to projection p2
+//! Remaps a geometry. Templated by the type of geometry.
+/*
+	\param g1 the input geometry
+	\param p1 the initial projection
+	\param g2 to receive the remapped geometry
+	\param p1 the destination projection
+*/
 template<typename G>
-void 
-TeVectorRemap (G& g1, TeProjection* p1, G& g2, TeProjection* p2)
+void TeVectorRemap (G& g1, TeProjection* p1, G& g2, TeProjection* p2)
 {
 	int nItens = g1.size();
 	for (int i=0; i<nItens; i++)
@@ -41,12 +49,38 @@ TeVectorRemap (G& g1, TeProjection* p1, G& g2, TeProjection* p2)
 	}
 }
 
-void TeVectorRemap(TeCoord2D& pt1, TeProjection* p1, TeCoord2D& pt2, TeProjection* p2);
+//! Especialized version to remap coordinates
+TL_DLL void TeVectorRemap(TeCoord2D& pt1, TeProjection* p1, TeCoord2D& pt2, TeProjection* p2);
 
-void TeVectorRemap(TeCell& c1, TeProjection* p1, TeCell& c2, TeProjection* p2);
+//! Especialized version to remap cells
+TL_DLL void TeVectorRemap(TeCell& c1, TeProjection* p1, TeCell& c2, TeProjection* p2);
 
-void TeVectorRemap(TeText& t1, TeProjection* p1, TeText& t2, TeProjection* p2);
+//! Especialized version to remap texts
+TL_DLL void TeVectorRemap(TeText& t1, TeProjection* p1, TeText& t2, TeProjection* p2);
 
-TeBox TeRemapBox (TeBox& box, TeProjection* projFrom, TeProjection* projTo);
+//! Remaps a box from one projection to another
+/*
+	\param box the input box
+	\param projFrom the initial projection
+	\param projTo the destination projection
+	\returns the remmaped box
+*/
+TL_DLL TeBox TeRemapBox (TeBox& box, TeProjection* projFrom, TeProjection* projTo);
+
+//! Remaps a box from plane coordinate to geodetic coordinate
+/*
+	\param box the input box
+	\param proj the data projection
+	\returns the remmaped box
+*/
+TL_DLL TeBox TeRemapBoxPC2Geodetic (const TeBox& box, TeProjection* proj);
+
+//! Remaps a box from geodetic coordinate to plane coordinate
+/*
+	\param box the input box
+	\param proj the data projection
+	\returns the remmaped box
+*/
+TL_DLL TeBox TeRemapBoxGeodetic2PC (const TeBox& box, TeProjection* proj);
 
 #endif
diff --git a/src/terralib/kernel/TeVersion.h b/src/terralib/kernel/TeVersion.h
new file mode 100755
index 0000000..e0a763e
--- /dev/null
+++ b/src/terralib/kernel/TeVersion.h
@@ -0,0 +1,37 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeVersion.h
+    \brief This file contains a macro to define the version of TerraLib
+*/
+#ifndef  __TERRALIB_INTERNAL_VERSION_H
+#define  __TERRALIB_INTERNAL_VERSION_H
+
+/**
+This macro changes whenever a new version of TerraLib is released.
+Stable versions are named only by numbers (ex. 3.1.1, 3.1.2).
+Whenever the suffix "_dev" is appended do the name of the version
+it means the non-stable development version after the numbered version.
+
+*/
+#define TERRALIB_VERSION "3.3.1"
+#endif
diff --git a/src/terralib/kernel/TeView.h b/src/terralib/kernel/TeView.h
old mode 100644
new mode 100755
index f623809..4f1ce61
--- a/src/terralib/kernel/TeView.h
+++ b/src/terralib/kernel/TeView.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,113 +20,131 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeView.h
-    This file provides TerraLib's definition of a View
+    \brief This file provides TerraLib's definition of a View
 */
 #ifndef  __TERRALIB_INTERNAL_VIEW_H
 #define  __TERRALIB_INTERNAL_VIEW_H
 
 #include "TeLayer.h"
 #include "TeTheme.h"
+#include "TeProjection.h"
+#include "TeViewNode.h"
 #include <algorithm>
 
 using namespace std;
 
 //! A class to deal with views in TerraLib
 /*!
-	A view in TerraLib has its own projections and may belong to a particular user
+	A View is a structure that aggregated themes to be visualized or
+	processed in its own projection. Views may belong to a particular user.
 	\sa TeTheme TeViewNode
 */
-class TeView {
-
+class TL_DLL TeView
+{
 public:
-
 	//! Constructor
     TeView( const string& name="", const string& user="", int id=0)
-		: id_(id), name_(name), user_(user), proj_(0), is_visible_(true), connectedId_(0)
+		: id_(id), name_(name), user_(user), proj_(0), is_visible_(true), connectedId_(0), currentTheme_(-1)
 	{}
 
 	//! Destructor
-	~TeView () {}
+	virtual ~TeView () 
+	{
+		if(proj_)
+			delete proj_;
+	}
 
 	//! Returns view unique id
-	int	id () { return id_; }
+	virtual int	id () { return id_; }
 
 	//! Sets view unique id
-	void id (int id)
+	virtual void id (int id)
 	{
 		id_ = id;	// update view id
 		for (unsigned int th=0;th<viewTree_.size();th++)	//update its themes
 			viewTree_.retrieve(th)->view (id_);
+		viewTree_.view(id); 
 	}
 
 	//! Returns the view name
-	string	name () { return name_; }
+	virtual string	name () { return name_; }
 
 	//! Sets the view name
-	void name (const string& s) { name_ = s; }
+	virtual void name (const string& s) { name_ = s; }
 
 	//! Returns the view user name
-	string	user () { return user_; }
+	virtual string	user () { return user_; }
 
 	//! Sets the view user name
-	void user (const string& i) { user_ = i; }
+	virtual void user (const string& i) { user_ = i; }
 
 	//! Returns the view projection
-	TeProjection* projection () { return proj_; }
+	virtual TeProjection* projection () { return proj_; }
 
 	//! Sets the view projection
-	void projection (TeProjection* p) { proj_ = p; }
+	virtual void projection (TeProjection* p) { proj_ = p; }
 
 	//! Returns TRUE if view is visible
-	bool isVisible () { return is_visible_; }
+	virtual bool isVisible () { return is_visible_; }
 
 	//! Sets whether view is visible
-	void isVisible (bool v) { is_visible_ = v; }
+	virtual void isVisible (bool v) { is_visible_ = v; }
+
+	//! Returns the current box
+	virtual TeBox& getCurrentBox () { return currentBox_; }
+
+	//! Sets the current box
+	virtual void setCurrentBox (const TeBox& b) { currentBox_ = b; }
+
+	//! Returns the current theme id
+	virtual int getCurrentTheme () { return currentTheme_; }
+
+	//! Sets the current theme id
+	virtual void setCurrentTheme (const int& id) { currentTheme_ = id; }
 	
 	//! Returns the view tree where view belongs
-	TeViewTree* root () { return &viewTree_; }
+	virtual TeViewTree* root () { return &viewTree_; }
 
 	//! Adds a view node to the view tree
-	void add( TeViewNode* node )
+	virtual void add( TeViewNode* node )
 	{
 		node->view (id_);
 		viewTree_.add ( node );
 	}
 
 	//! Removes a view node through its name from the view tree
-	TeViewNode* remove(string name)
+	virtual TeViewNode* remove(string name)
 	{
 		return viewTree_.remove(name);
 	}
 
 	//! Removes a view node through its identifier from the view tree
-	TeViewNode* remove (int id)
+	virtual TeViewNode* remove (int id)
 	{
 		return viewTree_.removeID(id);
 	}
 
 	//! Moves a node up
-	void moveUp (TeViewNode* node)
+	virtual void moveUp (TeViewNode* node)
 	{
 		viewTree_.moveUp(node);
 	}
 
 	//! Moves a node down
-	void moveDown(TeViewNode* node)
+	virtual void moveDown(TeViewNode* node)
 	{
 		viewTree_.moveDown(node);
 	}
 
 	//! Returns a node identified by its position
-	TeViewNode* get(int i)
+	virtual TeViewNode* get(int i)
 	{
 		return viewTree_.retrieve(i);
 	}
 
 	//! Returns a node identified by its name and version
-	TeTheme* get(string themeName)
+	virtual TeTheme* get(string themeName)
 	{
 		TeTheme *ret = 0;
 		for (unsigned int th = 0;th < viewTree_.size();th++)
@@ -146,28 +164,51 @@ public:
 	}
 	
 	//! Sort the themes in the view
-	void sort() 
-		{ viewTree_.sort(); }
+	virtual void sort() 
+	{ viewTree_.sort(); }
 
 	//! Swap the order of two themes
-	void swap( unsigned int i, unsigned int j)
+	virtual void swap( unsigned int i, unsigned int j)
 	{
 		viewTree_.swap(i,j);
 	}
 
+	//! Sets the themes visibility 
+	virtual void visibility( int vis )
+	{
+		viewTree_.visibility( vis );
+	}
+
+	//! Returns the themes visibility 
+	virtual int visibility()
+	{
+		return viewTree_.visibility();
+	}
+
 	//! Returns the number of themes in the view
-	unsigned int size()
+	virtual unsigned int size()
 		{ return viewTree_.size() ; }
 
-	//! Returns the vector of themes of the view sorted
-	//! according to their priorities
-	vector<TeViewNode*>& themes()
-		{ return viewTree_.nodes();}
+	//! Returns the vector of themes of the view sorted according to their priorities
+	virtual vector<TeViewNode*>& themes()
+	{ return viewTree_.nodes();}
 
-	void connectedId(int id) {connectedId_ = id;}
+	//! Sets the id of the connected view
+	virtual void connectedId(int id) {connectedId_ = id;}
 
-	int connectedId() {return connectedId_;}
+	//! Returns the id of the connected view
+	virtual int connectedId() {return connectedId_;}
 
+	/*! Returns the boundary box of the view themes
+		\param onlyVisible If is true, returns the boundary box of visible themes, otherwise returns the boundary box of all themes
+	*/
+	virtual TeBox box( bool onlyVisible )
+	{ 
+		TeBox retval;
+		if ( root() ) 
+			retval = root()->box(onlyVisible,proj_); 
+		return retval;		
+	}; 
 
 private:
 	int				id_;	// view id
@@ -178,6 +219,9 @@ private:
 
 	TeViewTree		viewTree_;
 	int				connectedId_; // connected view
+
+	TeBox			currentBox_; // current box
+	int				currentTheme_; // current theme id
 };
 
 //! A map from identifiers to pointers to views
diff --git a/src/terralib/kernel/TeViewNode.cpp b/src/terralib/kernel/TeViewNode.cpp
new file mode 100755
index 0000000..1349ab8
--- /dev/null
+++ b/src/terralib/kernel/TeViewNode.cpp
@@ -0,0 +1,362 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+#include "TeViewNode.h"
+#include "TeTheme.h"
+#include "TeLayer.h"
+#include "TeProjection.h"
+
+TeBox 
+TeViewTree::box(bool onlyVisible, TeProjection* destProjection)
+{
+	TeBox retval;
+	if ( destProjection  == 0 )
+		return retval;
+
+	for (vector<TeViewNode*>::iterator child = nodes_.begin(); child != nodes_.end(); ++child)
+	{
+		TeViewNode* pt = (*child);
+		if( pt->type() == TeTREE )
+			updateBox( retval, ( (TeViewTree*)pt)->box( onlyVisible, destProjection ) );
+		else
+		{
+			
+			TeAbstractTheme* theme = (TeAbstractTheme*)(pt);
+
+			if( onlyVisible && !( theme->visibility() & 0x00000001 ) )
+				continue;
+
+			TeBox themeBox = theme->getThemeBox(); 
+			if(!themeBox.isValid()) 
+				continue;			
+			theme->getThemeProjection()->setDestinationProjection(destProjection);
+			TeCoord2D ll = themeBox.lowerLeft();
+			TeCoord2D ur = themeBox.upperRight();
+			TeBox convertedBox(theme->getThemeProjection()->PC2LL(ll),
+							theme->getThemeProjection()->PC2LL(ur));
+			ll = convertedBox.lowerLeft();
+			ur = convertedBox.upperRight();
+			convertedBox = TeBox(destProjection->LL2PC(ll),destProjection->LL2PC(ur));
+			updateBox(retval, convertedBox);
+		}
+	}
+	return retval;
+}
+
+bool 
+TeViewTree::assertsPriorities()
+{
+	bool updated = false;
+	for ( unsigned int i=0; i<nodes_.size(); ++i)
+	{
+		TeViewNode* node = nodes_[i];
+		if ( (node != NULL) && ( node->priority() != (int)i ) )
+		{
+			node->priority(i);
+			updated = true;
+		}
+		if ( node->type() == TeTREE )
+		{
+			TeViewTree* tree = (TeViewTree*)node;
+			if ( ( tree != NULL ) 
+				&& ( tree->assertsPriorities()== true) 
+				&& ( updated == false ) )
+				updated = true;
+		}	
+	}
+	return updated;
+}
+
+TeViewTree::~TeViewTree ()
+{
+	// For all my children, delete them
+    vector<TeViewNode*>::iterator child = nodes_.begin();
+    while( child != nodes_.end() ) 
+	{
+		// Create a temporary pointer to store the child's
+		// address
+		TeViewNode* pt = (*child);
+
+        // Remove the child from the list
+		nodes_.erase(child);
+		child = nodes_.begin();
+
+		// Ok, now the child's parent points to NULL and we can
+		// safely call the child's destructor
+		delete pt;
+		pt = 0;
+	}
+}
+
+void 
+TeViewTree::visibility(int vis)
+{
+	for (vector<TeViewNode*>::iterator child = nodes_.begin();
+			child != nodes_.end(); ++child)
+	{
+		TeViewNode* pt = (*child);
+		pt->visibility( vis );
+	}
+}
+
+int TeViewTree::visibility()
+{
+	for (vector<TeViewNode*>::iterator child = nodes_.begin();
+			child != nodes_.end(); ++child)
+	{
+		TeViewNode* pt = (*child);
+		if ( pt->visibility() == 1 )
+			return 1;
+	}
+	return 0;
+}
+
+void 
+TeViewTree::swap(unsigned int i, unsigned int j)
+{
+	if (i==j || i>=nodes_.size() || j>=nodes_.size())
+		return;
+	TeViewNode* temp = nodes_[i];
+	nodes_[i] = nodes_[j];
+	nodes_[j] = temp;
+	nodes_[i]->priority (i);
+	nodes_[j]->priority (j);
+}
+
+
+void
+TeViewTree::moveUp(TeViewNode* node)
+{
+	for (unsigned int i=0 ; i<nodes_.size() ; i++)
+	{
+		if (node == nodes_[i])
+		{
+			swap (i, i-1);
+			return;
+		}
+	}
+}
+
+void 
+TeViewTree::moveDown(TeViewNode* node)
+{
+	if (!node)
+		return;
+
+	for (unsigned int i=0 ; i<nodes_.size() ; ++i)
+	{
+		if (node == nodes_[i])
+		{
+			swap (i, i+1);
+			return;
+		}
+	}
+}
+
+void TeViewTree::add(TeViewNode* node)
+{
+	node->setParent ( this ); // I am the father
+	node->priority(static_cast<int>(nodes_.size()));
+	nodes_.push_back (node);
+}
+
+//!	Removes a node identified by its name
+TeViewNode* 
+TeViewTree::remove (const string& name)
+{
+	vector<TeViewNode*>::iterator child = nodes_.begin();
+	while ( child != nodes_.end() )
+	{
+		TeViewNode* pt = (*child);
+		if (pt->name() == name)
+		{
+			nodes_.erase(child);
+			return pt;
+		}
+		if(pt->type() == TeTREE)
+		{
+			TeViewNode* result = pt->remove(name);
+			if(result) return result;
+		}
+		++child;
+	}
+	return 0;
+}
+
+//!	Removes a node through its identifier
+TeViewNode* 
+TeViewTree::removeID (int id) 
+{ 
+	for (vector<TeViewNode*>::iterator child = nodes_.begin();
+			child != nodes_.end(); ++child)
+	{
+		TeViewNode* pt = (*child);
+		if(pt->id() == id)
+		{
+			nodes_.erase(child);
+			return pt;
+		}
+		if(pt->type() == TeTREE)
+		{
+			TeViewNode* result = pt->removeID(id);
+			if(result) return result;
+		}
+	}
+	return 0;
+}
+
+void 
+TeViewTree::draw ()
+{				  
+	vector<TeViewNode*>::iterator child = nodes_.begin();
+	while ( child != nodes_.end() )
+	{
+		TeViewNode* pt = (*child);
+		pt->draw();
+		++child;
+	}
+}
+
+void 
+TeViewTree::sort()
+{
+	int i, j;
+	for (i = 0; i < (int)size() - 1; ++i)
+	{
+		for (j = i+1; j < (int)size(); ++j)
+		{
+			if (nodes_[i]->priority() > nodes_[j]->priority())
+			{
+				TeViewNode* temp = nodes_[i];
+				nodes_[i] = nodes_[j];
+				nodes_[j] = temp;
+			}
+		}
+	}
+}
+
+void 
+TeViewTree::clear()
+{
+	// For all my children, delete them
+    vector<TeViewNode*>::iterator child = nodes_.begin();
+    while( child != nodes_.end() ) 
+	{
+		// Create a temporary pointer to store the child's
+		// address
+		TeViewNode* pt = (*child);
+
+        // Remove the child from the list
+		nodes_.erase(child);
+
+		if( pt->type() == TeTREE )
+			((TeViewTree*)pt)->clear();
+		
+		child = nodes_.begin();
+	}
+}
+
+int 
+TeViewTree::moveTop (TeViewNode* node)
+{
+	TeViewNode* parent = node->parent();
+	if(parent == NULL) 
+		return -1;
+	if(parent->type() != TeTREE) 
+		return -1;
+	TeViewTree* tree = (TeViewTree*)parent;
+	int i = 0;
+	while(tree->retrieve(0) != node && tree->retrieve(0) != NULL)
+	{
+		tree->moveUp(node);
+		++i;
+	}
+	return i;
+}
+
+int 
+TeViewTree::moveBottom(TeViewNode* node)
+{
+	TeViewNode* parent = node->parent();
+	if (parent == 0 || parent->type() != TeTREE)
+		return -1;
+	TeViewTree* tree = (TeViewTree*)parent;
+	int i = 0;
+	while(tree->nodes().back() != node && tree->nodes().back() != 0)
+	{
+		tree->moveDown(node);
+		++i;
+	}
+	return i;
+}
+
+
+void 
+TeViewTree::insertFront(TeViewNode* node)
+{
+	node->setParent( this ); // I am the father
+	nodes_.insert(nodes_.begin(), node);
+	int ind = 0;
+	for (vector<TeViewNode*>::iterator child = nodes_.begin();
+			child != nodes_.end(); ++child)
+	{
+		TeViewNode* pt = (*child);
+		if ( pt )
+			pt->priority( ind++ ); 
+	}
+}
+
+TeViewNode* 
+TeViewTree::find (int id) 
+{ 
+	for (vector<TeViewNode*>::iterator child = nodes_.begin();
+			child != nodes_.end(); ++child)
+	{
+		TeViewNode* pt = (*child);
+		if(pt->id() == id)
+			return pt;
+		if(pt->type() == TeTREE)
+		{
+			TeViewNode* result = ((TeViewTree*)(pt))->find(id);
+			if(result) 
+				return result;
+		}
+	}
+	return 0;
+}
+TeViewNode* 
+TeViewTree::find( std::string name, bool caseS) 
+{ 
+	for (vector<TeViewNode*>::iterator child = nodes_.begin();
+			child != nodes_.end(); ++child)
+	{
+		TeViewNode* pt = (*child);
+		if( TeStringCompare( pt->name(), name, caseS ) )
+			return pt;
+		if( pt->type() == TeTREE )
+		{
+			TeViewNode* result = ((TeViewTree*)(pt))->find( name, caseS );
+			if (result) 
+				return result;
+		}
+	}
+	return 0;
+}
diff --git a/src/terralib/kernel/TeViewNode.h b/src/terralib/kernel/TeViewNode.h
old mode 100644
new mode 100755
index 752f368..4ee7c1b
--- a/src/terralib/kernel/TeViewNode.h
+++ b/src/terralib/kernel/TeViewNode.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,37 +20,107 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeViewNode.h
-    This file provides TerraLib's tree structure of views
+    \brief This file provides TerraLib's tree structure of views
 */
 #ifndef  __TERRALIB_INTERNAL_VIEWNODE_H
 #define  __TERRALIB_INTERNAL_VIEWNODE_H
 
 #define THEME_GROUP
 
+#include "TeDefines.h"
+#include "TeBox.h"
+#include "TeAbstractFactory.h"
+
 #include <iostream>
 #include <string>
 #include <vector>
 using namespace std;
 
-//! Type of node
+class TeProjection;
+class TeViewNode;
+
+//! Type of view node
 enum TeViewNodeType
-{ TeTHEME, TeTREE }; 
+{ TeTHEME=0, TeTREE=1, TeEXTERNALTHEME=2, TeFILETHEME=3 }; 
 
-//! A class to deal with nodes of a view tree structure
-class TeViewNode
+
+//!  A class to represent the view node parameters 
+/*!  
+	 This class contains the main view node parameters and it is used 
+	 by the factory responsible for creating view node objects. 
+	 
+	\sa
+     TeViewNode
+*/
+class TL_DLL TeViewNodeParams
 {
 public:
 	//! Constructor
-    TeViewNode( const string& name, TeViewNode* parent = 0, int view=0, int id=0, TeViewNodeType type= TeTHEME)
-		: myParent_(parent), 
-		  id_(id), 
-		  name_(name), 
-		  view_(view), 
-		  type_(type),
-		  priority_(0)
-	{}
+	TeViewNodeParams(const string& name="", const int& id=0, const int& viewId=0, 
+		const int nodeType=0, const int& priority=0, TeViewNode* parentNode=0,
+		const int parentId=0):
+		name_(name),
+		id_(id),
+		viewId_(viewId),
+		nodeType_(nodeType),
+		priority_(priority),
+		myParent_(parentNode),
+		myParentId_(parentId)
+	{ }
+
+	//! Copy constructor
+	TeViewNodeParams(const TeViewNodeParams& params)
+	{
+		name_ = params.name_;
+        id_ = params.id_;
+		viewId_ = params.viewId_; 
+        nodeType_ = params.nodeType_; 
+		priority_ = params.priority_;
+		myParent_ = params.myParent_;
+		myParentId_ = params.myParentId_; 
+	}
+
+	//! Returns the view node type 
+	int getProductId() { return nodeType_; }
+
+    //! Node name
+	string			name_;		
+	//! Node identity
+	int				id_;
+	//! View identity that contains this node 
+	int				viewId_;	
+	//! Node type
+	int				nodeType_;
+	//! Precedence when stored in a view
+	int				priority_;
+	//! Pointer to its parent 
+	TeViewNode* 	myParent_;  
+	//! Node parent id
+	int 			myParentId_;
+};
+
+
+//!  A class to deal with nodes of a view 
+/*!  
+	 In Terralib, a view is composed of nodes. This is a base class 
+	 used to specialize view node types. 
+
+	\sa
+     TeView TeViewNodeParams
+*/
+class TL_DLL TeViewNode
+{
+public:
+	//! Empty constructor
+    TeViewNode(const string& name="", TeViewNode* parent=0, const int& view=0, const int& id=0, const int& nodeType=0): 
+	  viewNodeParams_(name, id, view, nodeType, 0, parent)
+	{ }
+	
+	//! Constructor
+    TeViewNode(const TeViewNodeParams& viewNodeParams): 
+	  viewNodeParams_(viewNodeParams)
+	{ }
 
 	//! Destructor
 	virtual ~TeViewNode()
@@ -59,7 +129,6 @@ public:
 	//! Inserts a new child in the tree hierachy. Fails if the object is a leaf
 	virtual void add (TeViewNode*) {}
 
-
     //!	Remove an existing child identified by its id from the tree hierarchy
     /*!	
 		Fails if the object is a leaf
@@ -78,228 +147,177 @@ public:
 	virtual TeViewNode* retrieve (int)  { return 0; }
 
 	//! Returns a pointer to a parent node
-	TeViewNode* parent()
-	{ return myParent_; }
+	virtual TeViewNode* parent()
+	{ return viewNodeParams_.myParent_; }
 
 	//! Returns the identifier of a node parent
-	int parentId()
+	virtual int parentId()
 	{
-		if (myParent_)
-			return myParent_->id(); 
+		if (viewNodeParams_.myParent_)
+			return viewNodeParams_.myParent_->id(); 
 		else
-			return 0;
+			return viewNodeParams_.myParentId_;
 	}
 
 	//! Sets the identification of the parent node
-	void parentId(int i) 
+	virtual void parentId(int i) 
 	{
-		if (myParent_)
-			myParent_->id(i);
+		if (viewNodeParams_.myParent_)
+			viewNodeParams_.myParent_->id(i);
+		viewNodeParams_.myParentId_ = i;
 	}
 
 	//! Sets the parent of node
-	void setParent ( TeViewNode* node )
-	{ myParent_ = node; }
+	virtual void setParent ( TeViewNode* node )
+	{ 
+		viewNodeParams_.myParent_ = node; 
+		viewNodeParams_.myParentId_ = (viewNodeParams_.myParent_)? viewNodeParams_.myParent_->id():0;
+	}
 
 	//! Returns the identification of a node
-	int		id () { return id_; }
+	virtual int		id () { return viewNodeParams_.id_; }
+
 	//! Sets the identification of a node
-	void	id (int i){ id_ = i; }
+	virtual void	id (int i){ viewNodeParams_.id_ = i; }
 
 	//! Returns the name of a node
-	string	name () { return name_; }
+	virtual string	name () { return viewNodeParams_.name_; }
 	//! Sets the name of a node
-	void	name (const string& s) { name_ = s; }
+	virtual void	name (const string& s) { viewNodeParams_.name_ = s; }
 
 	//! Returns the priority of a node
-	int		priority () { return priority_; }
+	virtual int		priority() { return viewNodeParams_.priority_; }
 	//! Sets the priority of a node
-	void	priority (int i) { priority_ = i; }
+	virtual void	priority(int i) { viewNodeParams_.priority_ = i; }
 
 	//! Sets the view identification of a node
-	void	view (int view) { view_ = view; }
+	virtual void	view (int viewId) { viewNodeParams_.viewId_ = viewId; }
 	//! Returns the view identification of a node
-	int		view () { return view_ ; }
+	virtual int		view () { return viewNodeParams_.viewId_ ; }
 
 	//! Returns the node type
-	TeViewNodeType type() { return type_; };
+	virtual int type() { return viewNodeParams_.nodeType_; };
 	//! Sets the node type
-	void type(TeViewNodeType t) { type_ = t; }
+	virtual void type(const int& t) { viewNodeParams_.nodeType_ = t; }
 
 	//! Moves a node up in the tree structure
 	virtual void moveUp ()
 	{
-		if (myParent_)
-			myParent_->moveUp (this);
+		if (viewNodeParams_.myParent_)
+			viewNodeParams_.myParent_->moveUp (this);
 	}
 	
 	//! Moves a node down in the tree structure
 	virtual void moveDown ()
 	{
-		if (myParent_)
-			myParent_->moveDown (this);
+		if (viewNodeParams_.myParent_)
+			viewNodeParams_.myParent_->moveDown (this);
 	}
 
 	//! Swaps nodes 
 	virtual void swap ( unsigned int, unsigned int ) {}
 
+	//! Sets the nodes visibility 
+	virtual void visibility ( int ){}; 
+
+	//! Returns the nodes visibility 
+	virtual int visibility(){ return 1; };
+
 	//! Draws a node
 	virtual void draw() {}
 
+	//! Sorts the node
+	virtual void sort() {}
+	
+	static TeViewNode*	DefaultObject()
+	{	return 0; }
+
+	virtual int getProductId() const
+	{	return viewNodeParams_.nodeType_; }
+
+	virtual TeViewNodeParams& viewNodeParams()
+	{	return viewNodeParams_; }
+
+	virtual void viewNodeParams(TeViewNodeParams& p)
+	{	viewNodeParams_ = p; }
+
 
 protected:
 
 	virtual void	moveUp (TeViewNode*) {}
 	virtual void	moveDown (TeViewNode*) {}
 
-	TeViewNode* 	myParent_;
-	int				id_;	// Node id
-	string			name_;	// Node name
-	int				view_;	// view id
+	//! Node parameters
+	TeViewNodeParams	viewNodeParams_;
+};
+
 
-	TeViewNodeType type_;
+//!  This class implements a virtual factory to create view node types. 
+/*!  
+	 This class is a base virtual factory used to specialize 
+	 other factories that create particular node view types. 
 
-// Precedence when stored in a view
-	int			priority_;
+	\sa
+     TeAbstractFactory TeViewNode TeViewNodeParams
+*/
+class TL_DLL TeViewNodeFactory : public TeAbstractFactory<TeViewNode,TeViewNodeParams, int>
+{
+public:
+	//! Constructor based on the view node type
+	TeViewNodeFactory(const int& nodeType) : 
+	  TeAbstractFactory<TeViewNode,TeViewNodeParams, int>(nodeType)
+	{ }
 };
 
 
 //! A class to deal with branchs in a view tree structure  
-class TeViewTree: public TeViewNode
+class TL_DLL TeViewTree: public TeViewNode
 {
 public:
 
 	//! Constructor
-	TeViewTree(const string& name=""): TeViewNode(name)
-	{
-		type_ = TeTREE;
-	}
+	TeViewTree(const string& name=""): TeViewNode(name, 0, 0, 0, (int)TeTREE)
+	{ }
+
+	//! Constructor
+    TeViewTree(const TeViewNodeParams& params): 
+	  TeViewNode(params)
+	{ }
+
 
 	//! Destructor
-	~TeViewTree ()
-	{
-	    // For all my children, delete them
-        vector<TeViewNode*>::iterator child = nodes_.begin();
-		unsigned int size = nodes_.size();
-	    for (unsigned int n=0; n<size; n++ )
-	    {
-			// Create a temporary pointer to store the child's
-			// address
-			TeViewNode* pt = (*child);
-            // Remove the child from the list
-
-			nodes_.erase(child);
-
-			// Ok, now the child's parent points to NULL and we can
-			// safely call the child's destructor
-			delete pt;
-	    }
-	}
+	virtual ~TeViewTree ();
+
+	//! Sets the nodes visibility 
+	virtual void visibility (int vis);
+
+	//! Returns the nodes visibility 
+	virtual int visibility ();
 
 	//! Swap nodes
-	virtual void swap (unsigned int i, unsigned int j)
-	{
-		if (i==j || i>=nodes_.size() || j>=nodes_.size())
-			return;
-		TeViewNode* temp = nodes_[i];
-		nodes_[i] = nodes_[j];
-		nodes_[j] = temp;
-		nodes_[i]->priority (i);
-		nodes_[j]->priority (j);
-	}
+	virtual void swap (unsigned int i, unsigned int j);
 
 	//! Moves a node up in the tree structure
-	virtual void moveUp (TeViewNode* node)
-	{
-		for (unsigned int i=0 ; i<nodes_.size() ; i++)
-		{
-			if (node == nodes_[i])
-			{
-				swap (i, i-1);
-				return;
-			}
-		}
-	}
+	virtual void moveUp (TeViewNode* node);
 
 	//! Moves a node down in the tree structure
-	virtual void moveDown (TeViewNode* node)
-	{
-		for (unsigned int i=0 ; i<nodes_.size() ; i++)
-		{
-			if (node == nodes_[i])
-			{
-				swap (i, i+1);
-				return;
-			}
-		}
-	}
+	virtual void moveDown (TeViewNode* node);
 
 	//! Adds a node to the structure
-	virtual void add (TeViewNode* node)
-	{
-		node->setParent ( this ); // I am the father
-		node->priority(static_cast<int>(nodes_.size()));
-		nodes_.push_back (node);
-	}
+	virtual void add (TeViewNode* node);
 
     //!	Removes a node identified by its name
-	virtual TeViewNode* remove (const string& name)
-	{
-		vector<TeViewNode*>::iterator child = nodes_.begin();
-		while ( child != nodes_.end() )
-		{
-			TeViewNode* pt = (*child);
-			if (pt->name() == name)
-			{
-				nodes_.erase(child);
-				return pt;
-			}
-			if(pt->type() == TeTREE)
-			{
-				TeViewNode* result = pt->remove(name);
-				if(result) return result;
-			}
-			++child;
-		}
-		return 0;
-	}
+	virtual TeViewNode* remove (const string& name);
 
     //!	Removes a node through its identifier
-	virtual TeViewNode* removeID (int id) 
-	{ 
-		for (vector<TeViewNode*>::iterator child = nodes_.begin();
-			 child != nodes_.end(); ++child)
-		{
-			TeViewNode* pt = (*child);
-			if(pt->id() == id)
-			{
-				nodes_.erase(child);
-				return pt;
-			}
-			if(pt->type() == TeTREE)
-			{
-				TeViewNode* result = pt->removeID(id);
-				if(result) return result;
-			}
-		}
-		return 0;
-	}
+	virtual TeViewNode* removeID (int id) ;
 
     //!	Retrieves a node through its index
 	virtual TeViewNode* retrieve (unsigned int i) 
 	{ return nodes_[i]; }
 
 	//! Draw a node
-	virtual void draw ()
-	{				  
-		vector<TeViewNode*>::iterator child = nodes_.begin();
-	    while ( child != nodes_.end() )
-		{
-			TeViewNode* pt = (*child);
-			pt->draw();
-			child++;
-		}
-	}
+	virtual void draw ();
 
 	//! Returns the size of the structure
 	unsigned int size()
@@ -310,28 +328,77 @@ public:
 	{ return nodes_; }
 
 	//! Sort the vector of nodes according to their priorities
-	void sort()
-	{
-		unsigned int i, j;
-		for (i = 0; i < size() - 1; ++i)
-		{
-			for (j = i+1; j < size(); ++j)
-			{
-				if (nodes_[i]->priority() > nodes_[j]->priority())
-				{
-					TeViewNode* temp = nodes_[i];
-					nodes_[i] = nodes_[j];
-					nodes_[j] = temp;
-				}
-			}
-		}
-	}
+	void sort();
+
+	//! Unlinks the nodes from the view tree
+	virtual void clear();
+	
+	/*! Move the given node to the top of it's tree.
+	  \param node to be moved
+	  \return the number of positions the node has been moved
+	*/
+	virtual int moveTop (TeViewNode* node);
+
+	/*!	Move the given node to the bottom of it's tree.
+	  \param node to be moved
+	  \return the number of positions the node has been moved
+	*/
+	int moveBottom(TeViewNode* node);
+
+	/*!
+	Inserts the given node to at the begin of the view tree.
+	\param node node to be added
+	*/
+	virtual void insertFront(TeViewNode* node);
+
+	/*! Look at a View Tree for a node with the given id.
+		\param id Id of the node to be found
+	*/
+	virtual TeViewNode* find (int id);
+
+	/*! Look at a View Tree for a node with the given name.
+		\param name name of the node to be found
+		\param caseS(optional) true if the given name is case sensitive
+	*/
+	virtual TeViewNode* find( std::string name, bool caseS = false );
+
+	/*! Returns the boundary box of the tree view themes
+	\param projection The returned box coordinates will be in the given projection 
+	*/
+	virtual TeBox box(bool onlyVisible, TeProjection* projection );
+
+	/*!	Asserts the nodes priorities by the positions.
+		Returns true if any priority was updated, otherwise returns false.
+	*/
+	virtual bool assertsPriorities();
 
 private:
 	vector<TeViewNode*> nodes_;
 };
 
-#endif
 
+//!  This class implements a factory to create view tree objects. 
+/*!  
+	 This class is a factory that create view nodes 
+	 of the type TeTREE, that is, view tree objects.
 
+	\sa
+     TeViewNodeFactory TeViewNodeParams TeViewTree  
+*/
+class TL_DLL TeViewTreeFactory : public TeViewNodeFactory
+{
+public:
+	//! Constructor 
+	TeViewTreeFactory() : TeViewNodeFactory((int)TeTREE)
+	{}
+
+	//! Created view tree objects 
+	TeViewTree* build(TeViewNodeParams* params)
+	{	
+		TeViewNodeParams auxParams = *params;
+		return new TeViewTree(auxParams);	
+	}
+};
+
+#endif
 
diff --git a/src/terralib/kernel/TeViewTreeIterator.cpp b/src/terralib/kernel/TeViewTreeIterator.cpp
old mode 100644
new mode 100755
diff --git a/src/terralib/kernel/TeViewTreeIterator.h b/src/terralib/kernel/TeViewTreeIterator.h
old mode 100644
new mode 100755
index 7dedd3b..c800ebf
--- a/src/terralib/kernel/TeViewTreeIterator.h
+++ b/src/terralib/kernel/TeViewTreeIterator.h
@@ -1,4 +1,4 @@
-/* $Id: TeViewTreeIterator.h,v 1.2 2005/04/11 20:04:57 juan Exp $
+/* $Id: TeViewTreeIterator.h,v 1.3 2007/10/22 17:05:54 juan Exp $
 ** ---------------------------------------------------------------
 ** TeViewTreeIterator - 
 **
@@ -38,7 +38,7 @@
 ** Class definition:
 */
 
-class TeViewTreeIterator
+class TL_DLL TeViewTreeIterator
 {
 public:
   TeViewTreeIterator(TeViewTree* root);
@@ -67,7 +67,7 @@ private:
   std::stack<StackElem> TravStack; //!< traversal stack
 };
 
-class TeViewTreeRevIterator
+class TL_DLL TeViewTreeRevIterator
 {
 public:
   TeViewTreeRevIterator(TeViewTree* root);
diff --git a/src/terralib/kernel/TeViewTreeUtils.cpp b/src/terralib/kernel/TeViewTreeUtils.cpp
old mode 100644
new mode 100755
diff --git a/src/terralib/kernel/TeViewTreeUtils.h b/src/terralib/kernel/TeViewTreeUtils.h
old mode 100644
new mode 100755
index 04ec379..61dbf19
--- a/src/terralib/kernel/TeViewTreeUtils.h
+++ b/src/terralib/kernel/TeViewTreeUtils.h
@@ -22,8 +22,8 @@
 ** Functions Prototypes:
 */
 
-void TeClearViewTree(TeViewTree* vtree);
-TeTheme* TeFindTheme(TeViewTree& vtree, char* name, bool case_sensitive = false);
+TL_DLL void TeClearViewTree(TeViewTree* vtree);
+TL_DLL TeTheme* TeFindTheme(TeViewTree& vtree, char* name, bool case_sensitive = false);
 
 /*
 ** ---------------------------------------------------------------
diff --git a/src/terralib/kernel/TeVisual.cpp b/src/terralib/kernel/TeVisual.cpp
new file mode 100755
index 0000000..87593f5
--- /dev/null
+++ b/src/terralib/kernel/TeVisual.cpp
@@ -0,0 +1,258 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+#include <TeVisual.h>
+
+TeBaseVisualParams::TeBaseVisualParams(TeGeomRep rep, const string& visualType) :
+		symbId_ (TePolyTypeFill),
+		color_ (255,0,0),
+	    transparency_ (0),
+		width_ (0),
+	   	contourSymbId_ (TeLnTypeContinuous),
+		contourColor_(0,255,255),
+		contourTransparency_ (0),
+		contourWidth_ (1),
+		sizeValue_ (0),
+		ptAngle_ (0),
+		family_ ("Verdana"),
+		bold_ (false),
+		italic_(false),
+		alignmentVert_(0),
+		alignmentHoriz_(0),
+		tabSize_(6),
+		lineSpace_(1),
+		fixedSize_(false),
+		visualType_(visualType),
+		geomRep_(rep)
+{
+	switch (rep)
+	{
+		case TePOLYGONS:
+		case TeCELLS:
+			symbId_= TePolyTypeFill;
+			contourSymbId_= TeLnTypeContinuous;
+			break;
+		case TeLINES:
+			symbId_= TeLnTypeContinuous;
+			width_ = 1;
+			break;
+		case TePOINTS:
+		case TeNODES:
+			symbId_= TePtTypeBox;
+			sizeValue_ = 3;
+			break;
+		case TeTEXT:
+			sizeValue_= 12;
+			break;
+		default:
+			break;
+	}
+}
+
+// Copy constructor
+TeBaseVisualParams::TeBaseVisualParams(const TeBaseVisualParams& other)
+{	
+	symbId_ = other.symbId_;
+	color_ = other.color_;
+	transparency_ = other.transparency_;
+	width_ = other.width_;
+
+	contourSymbId_ = other.contourSymbId_;
+	contourColor_ = other.contourColor_;
+	contourTransparency_ = other.contourTransparency_;
+	contourWidth_ = other.contourWidth_;
+		
+	sizeValue_ = other.sizeValue_;
+	ptAngle_ = other.ptAngle_;
+	
+	family_ = other.family_;
+	bold_ = other.bold_;
+	italic_ = other.italic_;
+	fixedSize_ = other.fixedSize_;
+	alignmentVert_ = other.alignmentVert_;
+	alignmentHoriz_ = other.alignmentHoriz_;
+	tabSize_ = other.tabSize_;
+	lineSpace_ = other.lineSpace_;
+
+	visualType_ = other.visualType_;
+	geomRep_ = other.geomRep_; 
+}
+
+// Assignment operator
+TeBaseVisualParams& 
+TeBaseVisualParams::operator=(const TeBaseVisualParams& vis)
+{
+	if ( this != &vis )
+	{
+		symbId_ = vis.symbId_;
+		color_ = vis.color_;
+		transparency_ = vis.transparency_;
+		width_ = vis.width_;
+
+		contourSymbId_ = vis.contourSymbId_;
+		contourColor_ = vis.contourColor_;
+		contourTransparency_ = vis.contourTransparency_;
+		contourWidth_ = vis.contourWidth_;
+		
+		sizeValue_ = vis.sizeValue_;
+		ptAngle_ = vis.ptAngle_;
+		
+		family_ = vis.family_;
+		bold_ = vis.bold_;
+		italic_ = vis.italic_;
+		fixedSize_ = vis.fixedSize_;
+		alignmentVert_ = vis.alignmentVert_;
+		alignmentHoriz_ = vis.alignmentHoriz_;
+		tabSize_ = vis.tabSize_;
+		lineSpace_ = vis.lineSpace_;
+
+		visualType_ = vis.visualType_;
+		geomRep_ = vis.geomRep_;
+	}
+	return *this;
+}
+
+// Returns TRUE if param1 is equal to param2 or FALSE if they are different.
+bool 
+TeBaseVisualParams::operator== (const TeBaseVisualParams& vis)
+{
+	return ( symbId_ == vis.symbId_ &&
+		color_ == vis.color_ &&
+		transparency_ == vis.transparency_ &&
+		width_ == vis.width_ &&
+		contourSymbId_ == vis.contourSymbId_ &&
+		contourColor_ == vis.contourColor_ &&
+		contourTransparency_ == vis.contourTransparency_ &&
+		contourWidth_ == vis.contourWidth_ &&
+		sizeValue_ == vis.sizeValue_ &&
+		ptAngle_ == vis.ptAngle_ &&
+		family_ == vis.family_ &&
+		bold_ == vis.bold_ &&
+		italic_ == vis.italic_ &&
+		fixedSize_ == vis.fixedSize_ &&
+		alignmentVert_ == vis.alignmentVert_ &&
+		alignmentHoriz_ == vis.alignmentHoriz_ &&
+		tabSize_ == vis.tabSize_ && 
+		lineSpace_ == vis.lineSpace_  &&
+		visualType_ == vis.visualType_ &&
+		geomRep_ == vis.geomRep_);
+}
+
+// Returns visual to the default parameters 
+void 
+TeBaseVisualParams::clear()
+{
+	symbId_ = TePolyTypeFill;
+	color_ = TeColor(255,0,0);
+	transparency_=0;
+	width_ = 0; 
+	contourSymbId_ = TeLnTypeContinuous;
+	contourColor_ = TeColor (0,255,255);
+	contourTransparency_ = 0;
+	contourWidth_ = 1;
+	sizeValue_ = 0;
+	ptAngle_ = 0;
+	family_ = "Verdana";
+	bold_  = false;
+	italic_ = false;
+	alignmentVert_ = 0;
+	alignmentHoriz_ = 0;
+	tabSize_ = 6;
+	lineSpace_ = 1;
+	fixedSize_ = false;
+	geomRep_ = TePOLYGONS;
+	visualType_="tevisual";
+}
+
+// Copies only the basic visual parameters from another visual
+void 
+TeBaseVisualParams::setBasic (TeBaseVisualParams &vis)
+{
+	symbId_ = vis.symbId_;
+	color_ = vis.color_;
+	transparency_ = vis.transparency_;
+	width_ = vis.width_;
+
+	contourSymbId_ = vis.contourSymbId_;
+	contourColor_ = vis.contourColor_;
+	contourTransparency_ = vis.contourTransparency_;
+	contourWidth_ = vis.contourWidth_;
+	
+	sizeValue_ = vis.sizeValue_;
+	ptAngle_ = vis.ptAngle_;
+	
+	family_ = vis.family_;
+	bold_ = vis.bold_;
+	italic_ = vis.italic_;
+	fixedSize_ = vis.fixedSize_;
+	alignmentVert_ = vis.alignmentVert_;
+	alignmentHoriz_ = vis.alignmentHoriz_;
+	tabSize_ = vis.tabSize_;
+	lineSpace_ = vis.lineSpace_;
+	geomRep_ = vis.geomRep_;
+	visualType_="tevisual";
+}
+
+//--------------
+
+TeVisual::TeVisual(TeGeomRep rep) : 
+		params_ (TeBaseVisualParams(rep, "tevisual"))
+{
+}
+		
+// Copy constructor
+TeVisual::TeVisual(const TeVisual& other)
+{	
+	params_ = other.params_;
+}
+
+// Assignment operator
+TeVisual& 
+TeVisual::operator=(const TeVisual& vis)
+{
+	if ( this != &vis )
+		params_ = vis.params_;
+	return *this;
+}
+
+// Returns TRUE if param1 is equal to param2 or FALSE if they are different.
+bool 
+TeVisual::operator== (const TeVisual& vis)
+{
+	return ( params_ == vis.params_);
+}
+
+// Returns visual to the default parameters 
+void 
+TeVisual::clear()
+{
+	params_.clear();
+}
+
+// Copies only the basic visual parameters from another visual
+void 
+TeVisual::setBasic (TeVisual &vis)
+{
+	params_.setBasic(vis.params_);
+}
+
+
diff --git a/src/terralib/kernel/TeVisual.h b/src/terralib/kernel/TeVisual.h
old mode 100644
new mode 100755
index 941c906..1afd986
--- a/src/terralib/kernel/TeVisual.h
+++ b/src/terralib/kernel/TeVisual.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,13 +20,15 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeVisual.h
-    This file deals with the visual presentation characteristics of geometries in TerraLib
+    \brief This file deals with the visual presentation characteristics of geometries in TerraLib
 */
 #ifndef  __TERRALIB_INTERNAL_VISUAL_H
 #define  __TERRALIB_INTERNAL_VISUAL_H
+
+#include "TeDefines.h"
 #include "TeDataTypes.h"
+#include "TeAbstractFactory.h"
 
 class TeRasterTransform;
 
@@ -35,8 +37,9 @@ class TeRasterTransform;
 
 using namespace std;
 
-//! Supports a color definition
-struct TeColor
+
+//! A structure for supporting a color definition
+struct TL_DLL TeColor
 {
 	//! Red component
 	int red_;
@@ -63,9 +66,7 @@ struct TeColor
 	//! Returns TRUE if color1 is equal to color2 or FALSE if they are different.
 	bool operator== (const TeColor& color)
 	{
-		if(red_==color.red_ && green_==color.green_ && blue_==color.blue_)
-			return true;
-		return false;
+		return (red_==color.red_ && green_==color.green_ && blue_==color.blue_);
 	}
 
 	//! Assignment operator
@@ -82,348 +83,287 @@ struct TeColor
 	}
 };
 
-
-//! This class is used to store the presentation characteristics of vector geometries
-class TeVisual
+//!  A class to represent the base visual parameters 
+/*!  
+	 This class contains the base visual parameters and it is used 
+	 by the factory responsible for creating visual objects. 
+	 
+	\sa
+     TeVisual
+*/
+class TL_DLL TeBaseVisualParams
 {
-private :
+public:
+	//! Constructor
+	TeBaseVisualParams(TeGeomRep rep = TePOLYGONS, const string& visualType = "tevisual"); 
+
+	//! Copy constructor
+	TeBaseVisualParams(const TeBaseVisualParams& other);
+
+	//! Destructor
+	virtual ~TeBaseVisualParams() {}
+
+	//! Assignment operator
+	virtual TeBaseVisualParams& operator=(const TeBaseVisualParams& visParams);
 
-	string		libName_;			//! Symbol library name used to geometry filling
-	int			symbId_;			//! Symbol id that define the style for the geometry filling
-	TeColor		color_;				//! Color used for geometry filling (line, point and text color)
-	int			transparency_;		//! Percentage of transparency for the geometry filling
-	int			width_;				//! Width for line geometry
+	//! Returns TRUE if param1 is equal to param2 or FALSE if they are different.
+	virtual bool operator== (const TeBaseVisualParams& visParams);
+
+	//! Returns visual to the default parameters 
+	virtual void clear();
+
+	//! Copies only the basic visual parameters from another visual
+	virtual void setBasic (TeBaseVisualParams &visParams);
+
+	//! Returns the visual params type 
+	string getProductId() { return visualType_; }
+
+	//! Symbol id that define the style for the geometry filling
+    int			symbId_;			
+	//! Color used for geometry filling (line, point and text color)
+	TeColor		color_;				
+	//! Percentage of transparency for the geometry filling
+	int			transparency_;		
+	//! Width for line geometry
+	int			width_;				
 	
-	string		contourLibName_;		//! Symbol library name used to geometry outline
-	int			contourSymbId_;			//! Symbol id that define the style for the geometry outline
-	TeColor		contourColor_;			//! Contour color for the geometry outline
-	int			contourTransparency_;	//! Percentage of transparency for the geometry outline
-	int			contourWidth_;			//! Width for the geometry outline
-
-	int			sizeValue_;
-	int			ptAngle_;
+	//! Symbol id that define the style for the geometry outline
+	int			contourSymbId_;			
+	//! Contour color for the geometry outline
+	TeColor		contourColor_;			
+	//! Percentage of transparency for the geometry outline
+	int			contourTransparency_;	
+	//! Width for the geometry outline
+	int			contourWidth_;			
+
+	//! Point size
+	int			sizeValue_;	
+	//! Point angle
+	int			ptAngle_;				
 	
 	// Text attributes
-	string		family_;			//! Text family
-	bool		bold_;				//! Flag to indicate if text is bold
-	bool		italic_;			//! Flag to indicate if text is italic
-	double		alignmentVert_;		//! Position of vertical alignment
-	double		alignmentHoriz_;	//! Position of horizontal alignmentool		fixedSize_;				//! Flag to indicate that element has a fixed size, don�t follow zoom operations	
-	int			tabSize_;			//! Number of spaces defined in a tab character
-	int			lineSpace_;			//! Spacing between lines
-	bool		fixedSize_;
-	
-	char*	pixmap_;
+	//! Text family
+	string		family_;	
+	//! Flag to indicate if text is bold
+	bool		bold_;			
+	//! Flag to indicate if text is italic
+	bool		italic_;	
+	//! Position of vertical alignment
+	double		alignmentVert_;		
+	//! Position of horizontal alignment
+	double		alignmentHoriz_;	
+	//! Number of spaces defined in a tab character
+	int			tabSize_;		
+	//! Spacing between lines
+	int			lineSpace_;	
+	//! Flag to indicate that element has a fixed size, don�t follow zoom operations	
+	bool		fixedSize_;			
+
+	//! Visual type used in factory strategy
+	string		visualType_;
+	//! Geometric representation associated with this visual 
+	TeGeomRep   geomRep_;				
+};
 
+//! This class is used to store the standard presentation characteristics of vector geometries
+class TL_DLL TeVisual
+{
 public :
-
+	
 	//! Empty constructor
-	TeVisual(TeGeomRep rep = TePOLYGONS) : 
-		libName_ (""),
-		symbId_ (TePolyTypeFill),
-		color_ (255,0,0),
-	    transparency_ (0),
-		width_ (0),
-	   	contourLibName_ (""),
-		contourSymbId_ (TeLnTypeContinuous),
-		contourColor_(0,255,255),
-		contourTransparency_ (0),
-		contourWidth_ (1),
-		sizeValue_ (0),
-		ptAngle_ (0),
-		family_ ("Verdana"),
-		bold_ (false),
-		italic_(false),
-		alignmentVert_(0),
-		alignmentHoriz_(0),
-		tabSize_(6),
-		lineSpace_(1),
-		fixedSize_(false),
-		pixmap_(0)
-		{
-			switch (rep)
-			{
-				case TePOLYGONS:
-				case TeCELLS:
-					symbId_= TePolyTypeFill;
-					contourSymbId_= TeLnTypeContinuous;
-					break;
-				case TeLINES:
-					symbId_= TeLnTypeContinuous;
-					width_ = 1;
-					break;
-				case TePOINTS:
-				case TeNODES:
-					symbId_= TePtTypeBox;
-					sizeValue_ = 3;
-					break;
-				case TeTEXT:
-					sizeValue_= 12;
-					break;
-				default:
-					break;
-			}
-		}
+	TeVisual(TeGeomRep rep = TePOLYGONS);
 
 	//! Destructor
-	~TeVisual () 
-	{ if (pixmap_) delete pixmap_; }
+	virtual ~TeVisual() {}
 
 	//! Copy constructor
-	TeVisual& operator=(const TeVisual& vis)
-	{
-		if ( this == &vis )
-			return *this;
-		else
-		{
-			libName_ = vis.libName_;
-			symbId_ = vis.symbId_;
-			color_ = vis.color_;
-			transparency_ = vis.transparency_;
-			width_ = vis.width_;
-
-			contourLibName_ = vis.contourLibName_;
-			contourSymbId_ = vis.contourSymbId_;
-			contourColor_ = vis.contourColor_;
-			contourTransparency_ = vis.contourTransparency_;
-			contourWidth_ = vis.contourWidth_;
-			
-			sizeValue_ = vis.sizeValue_;
-			ptAngle_ = vis.ptAngle_;
-			
-			family_ = vis.family_;
-			bold_ = vis.bold_;
-			italic_ = vis.italic_;
-			fixedSize_ = vis.fixedSize_;
-		    alignmentVert_ = vis.alignmentVert_;
-		    alignmentHoriz_ = vis.alignmentHoriz_;
-		    tabSize_ = vis.tabSize_;
-		    lineSpace_ = vis.lineSpace_;
-			pixmap_ = vis.pixmap_;
-		}
-		return *this;
-	}
+	TeVisual(const TeVisual& other);
 
-	//! Returns TRUE if vis1 is equal to vis2 or FALSE if they are different.
-	bool operator== (const TeVisual& vis)
-	{
-		if( libName_ == vis.libName_ &&
-			symbId_ == vis.symbId_ &&
-			color_ == vis.color_ &&
-			transparency_ == vis.transparency_ &&
-			width_ == vis.width_ &&
-			contourLibName_ == vis.contourLibName_ &&
-			contourSymbId_ == vis.contourSymbId_ &&
-			contourColor_ == vis.contourColor_ &&
-			contourTransparency_ == vis.contourTransparency_ &&
-			contourWidth_ == vis.contourWidth_ &&
-			sizeValue_ == vis.sizeValue_ &&
-			ptAngle_ == vis.ptAngle_ &&
-			family_ == vis.family_ &&
-			bold_ == vis.bold_ &&
-			italic_ == vis.italic_ &&
-			fixedSize_ == vis.fixedSize_ &&
-			alignmentVert_ == vis.alignmentVert_ &&
-			alignmentHoriz_ == vis.alignmentHoriz_ &&
-			tabSize_ == vis.tabSize_ && 
-			lineSpace_ == vis.lineSpace_ &&
-			pixmap_ == vis.pixmap_)
-				return true;
-		return false;
-	}
-
-	//! Copies visual parameters from another visual
-	void setBasic (TeVisual &vis)
-	{
-		libName_ = vis.libName_;
-		symbId_ = vis.symbId_;
-		color_ = vis.color_;
-		transparency_ = vis.transparency_;
-		width_ = vis.width_;
-
-		contourLibName_ = vis.contourLibName_;
-		contourSymbId_ = vis.contourSymbId_;
-		contourColor_ = vis.contourColor_;
-		contourTransparency_ = vis.contourTransparency_;
-		contourWidth_ = vis.contourWidth_;
-		
-		sizeValue_ = vis.sizeValue_;
-		ptAngle_ = vis.ptAngle_;
-		
-		family_ = vis.family_;
-		bold_ = vis.bold_;
-		italic_ = vis.italic_;
-		fixedSize_ = vis.fixedSize_;
-		alignmentVert_ = vis.alignmentVert_;
-		alignmentHoriz_ = vis.alignmentHoriz_;
-		tabSize_ = vis.tabSize_;
-		lineSpace_ = vis.lineSpace_;
-		pixmap_ = vis.pixmap_;
-	}
-
-	//! Sets the color used for geometry filling and line, point and text color
-	void color(TeColor& color) 
-	{	color_ = color;}
+	//! Assignment operator
+	virtual TeVisual& operator=(const TeVisual& vis);
 
-	//! Returns the color used for geometry filling and line, point and text color
-	TeColor& color() 
-	{ return color_; }
+	//! Returns TRUE if param1 is equal to param2 or FALSE if they are different.
+	virtual bool operator== (const TeVisual& vis);
 
-	//! Sets symbol library name used for filling
-	void libName (const string& name) { libName_ = name; }
+	//! Returns visual to the default parameters 
+	virtual void clear();
 
-	//! Returns symbol library name used for filling
-	string libName () { return libName_; }
+	//! Copies only the basic visual parameters from another visual
+	virtual void setBasic (TeVisual &vis);
 
-	//! Sets symbol library name used for contour
-	void contourLibName (const string& name) { contourLibName_ = name; }
+	//! Sets the color used for geometry filling and line, point and text color
+	virtual void color(const TeColor& color) 
+	{	params_.color_ = color;}
 
-	//! Returns symbol library name used for contour
-	string contourLibName () { return contourLibName_; }
+	//! Returns the color used for geometry filling and line, point and text color
+	virtual TeColor& color() 
+	{ return params_.color_; }
 
 	//! Sets the style for the filling of geometries
-	void style(int s) { symbId_ = s; }
+	virtual void style(int s) 
+	{ params_.symbId_ = s; }
 
 	//! Returns the style for the filling of geometries
-	int	style() { return symbId_; }
+	virtual int	style() 
+	{ return params_.symbId_; }
 
 	//! Sets the percentage of transparency for polygons and cells
-	void transparency(int t)
-	{ transparency_ = t; }
+	virtual void transparency(int t)
+	{ params_.transparency_ = t; }
 
 	//! Returns the percentage of transparency used in polygons and cells
-	int transparency()
-	{ return transparency_; }
+	virtual int transparency()
+	{ return params_.transparency_; }
 
 	//! Sets the color for the polygons and cells outlines
-	void contourColor(TeColor& color) 
-	{ contourColor_ = color;}
+	virtual void contourColor(const TeColor& color) 
+	{ params_.contourColor_ = color;}
 
 	//! Returns the color used in the polygons and cells outlines
-	TeColor& contourColor() 
-	{ return contourColor_; }
+	virtual TeColor& contourColor() 
+	{ return params_.contourColor_; }
 
 	//! Sets the percentage of transparency for the polygon ans cells outlines
-	void contourTransparency(int t) 
-	{ contourTransparency_ = t;}
+	virtual void contourTransparency(int t) 
+	{ params_.contourTransparency_ = t;}
 
 	//! Returns the color used in the polygons and cells outlines
-	int	contourTransparency() 
-	{ return contourTransparency_; }
+	virtual int	contourTransparency() 
+	{ return params_.contourTransparency_; }
 
 	//! Sets the contour width for the polygons and cells outlines
-	void contourWidth(int w) { contourWidth_ = w; }
+	virtual void contourWidth(int w) 
+	{ params_.contourWidth_ = w; }
 
 	//! Returns the contour width used in the polygons and cells outlines
-	int	contourWidth()  { return contourWidth_; }
+	virtual int	contourWidth()  
+	{ return params_.contourWidth_; }
 
 	//! Sets the contour style for the polygons and cells outlines
-	void contourStyle(int s) { contourSymbId_ = s; }
+	virtual void contourStyle(int s) 
+	{ params_.contourSymbId_ = s; }
 
 	//! Returns the contour style used in the polygons and cells outlines
-	int	contourStyle() { return contourSymbId_; }
+	virtual int	contourStyle() 
+	{ return params_.contourSymbId_; }
 
 	//! Sets the width
-	void width(int w) { width_ = w; }
+	virtual void width(int w) 
+	{ params_.width_ = w; }
 
 	//! Returns the width
-	int	 width ()  { return width_; }
+	virtual int	 width ()  
+	{ return params_.width_; }
 
 	//! Sets the point size
-	void size (int s)  { sizeValue_ = s; }
+	virtual void size (int s)  
+	{ params_.sizeValue_ = s; }
 
 	//! Returns the point size
-	int	size ()  { return sizeValue_; }
+	virtual int	size ()  
+	{ return params_.sizeValue_; }
 
 	//! Sets the text family for fonts
-	void family (string f) { family_ = f; }
+	virtual void family (string f) 
+	{ params_.family_ = f; }
 
 	//! Returns font�s family
-	string family () { return family_ ; }
+	virtual string family () 
+	{ return params_.family_ ; }
 
 	//! Sets the bold style for texts
-	void bold (bool b) { bold_ = b; }
+	virtual void bold (bool b) 
+	{ params_.bold_ = b; }
 
 	//! Returns the bold style used in the texts
-	bool bold () { return bold_; }
+	virtual bool bold () 
+	{ return params_.bold_; }
 
 	//! Sets the italic style for texts
-	void italic (bool i) { italic_ = i; }
+	virtual void italic (bool i) 
+	{ params_.italic_ = i; }
 
 	//! Returns the italic style used in the texts
-	bool italic () { return italic_; }
+	virtual bool italic () 
+	{ return params_.italic_; }
 
 	//!  Sets a flag indicating if the text will have a fixed size
-	void fixedSize (bool i) { fixedSize_ = i; }
+	virtual void fixedSize (bool i) 
+	{ params_.fixedSize_ = i; }
 
 	//!  Retuns a flag indicating if an text have a fixed size
-	bool fixedSize () { return fixedSize_; }
+	virtual bool fixedSize () 
+	{ return params_.fixedSize_; }
 
 	//!  Sets the vertical alignment of texts
-	void alignmentVert(double a) { alignmentVert_ = a; }
+	virtual void alignmentVert(double a) 
+	{ params_.alignmentVert_ = a; }
 
 	//!  Retuns the vertical alignment of texts
-	double alignmentVert() { return alignmentVert_; }
+	virtual double alignmentVert() 
+	{ return params_.alignmentVert_; }
 
 	//!  Sets the horizontal alignment of texts
-	void alignmentHoriz(double a) { alignmentHoriz_ = a; }
+	virtual void alignmentHoriz(double a) 
+	{ params_.alignmentHoriz_ = a; }
 
 	//!  Retuns the horizontal alignment of texts
-	double alignmentHoriz() { return alignmentHoriz_; }
+	virtual double alignmentHoriz() 
+	{ return params_.alignmentHoriz_; }
 
 	//! Sets the number of spaces defined in a tab character
-	void tabSize (int s) { tabSize_ = s; }
+	virtual void tabSize (int s) 
+	{ params_.tabSize_ = s; }
 
 	//! Returns the number of spaces defined in a tab character
-	int	tabSize () { return tabSize_; }
+	virtual int	tabSize () 
+	{ return params_.tabSize_; }
 
 	//! Sets the spacing between lines
-	void lineSpace (int s) { lineSpace_ = s; }
+	virtual void lineSpace (int s) 
+	{ params_.lineSpace_ = s; }
 
 	//! Returns the spacing between lines
-	int	lineSpace () { return lineSpace_; }
+	virtual int	lineSpace () 
+	{ return params_.lineSpace_; }
 
 	//! Returns the angle of points and symbols
-	int   ptAngle() {return ptAngle_; }
+	virtual int   ptAngle() 
+	{return params_.ptAngle_; }
 
 	//! Sets the angle of points and symbols
-	void  ptAngle(int p) {ptAngle_ = p;}
+	virtual void  ptAngle(int p) 
+	{params_.ptAngle_ = p;}
 
-	//! Returns  pixmap used in the visual
-	char*	pixmap () { return pixmap_; }
+	//! Creates another visual pointer and copies its content
+	virtual TeVisual* copy()
+	{
+		TeVisual* retval = new TeVisual();
+		*retval = *this;
+		return retval;
+	}
 
-	//! Sets the pixmap used in the visual
-	void	setPixmap( char* pix ) { pixmap_ = pix; }
+	//! Returns a default visual object
+	static TeVisual* DefaultObject()  
+	{ return new TeVisual(); }
 
+protected:
+	TeBaseVisualParams	params_;
 };
 
-typedef TeRasterTransform TeRasterVisual;
 
-/*
-//! This class is used to store the presentation characteristics of raster geometries
-class TeRasterVisual
+//! A factory to build TeVisual objects
+class TL_DLL TeVisualFactory : public TeAbstractFactory<TeVisual, TeBaseVisualParams, string>
 {
 public:
-
-	//! Constructor
-	TeRasterVisual():
-		mBand_(0),
-		gain_(1.),
-		offset_(0)
+	TeVisualFactory(const string& facName) : TeAbstractFactory<TeVisual, TeBaseVisualParams, string>(facName)
 	{}
-
-	int mBand_; 
-
-	double gain_;
-	double offset_;
-
-	map<int,int> bandMap;
-
-	vector<unsigned char> lutr_;
-	vector<unsigned char> lutg_;
-	vector<unsigned char> lutb_;
+		virtual TeVisual* build ()
+	{	return new TeVisual(); }
 };
-*/
+
+//! Export the type that represents the definition of visual for raster data
+typedef TeRasterTransform TeRasterVisual;
 
 #endif
 
diff --git a/src/terralib/kernel/checkvec.h b/src/terralib/kernel/checkvec.h
old mode 100644
new mode 100755
index 8e1d613..057bfc8
--- a/src/terralib/kernel/checkvec.h
+++ b/src/terralib/kernel/checkvec.h
@@ -1,6 +1,6 @@
 /************************************************************************************
  TerraLib - a library for developing GIS applications.
-Copyright � 2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -27,42 +27,43 @@ of this library and its documentation.
 #include<cassert>
 #include<vector>
 
-namespace br_stl {
-
-template<class T>
-class checkedVector : public std::vector<T>    { // inherit
-   public:
-     // inherited types
-     typedef typename checkedVector::size_type size_type;
-     typedef typename checkedVector::iterator iterator;
-     typedef typename checkedVector::difference_type difference_type;
-     typedef typename checkedVector::reference reference;
-     typedef typename checkedVector::const_reference const_reference;
-
-      checkedVector() {
-      }
-
-      checkedVector(size_type n, const T& value = T())
-      : std::vector<T>(n, value) {
-      }
-
-//	  checkedVector(iterator i, iterator j)
-//      : std::vector<T>(i, j) {}
-
-      reference operator[](difference_type index) {
-         assert(index >=0 
-             && index < static_cast<difference_type>(this->size()));
-	      return std::vector<T>::operator[](index);
-      }
-
-
-        const_reference operator[](difference_type index) const {
-         assert(index >=0 
-             && index < static_cast<difference_type>(this->size()));
-         return std::vector<T>::operator[](index);
-      }
-
-};
+namespace br_stl
+{
+	template<class T>
+	class checkedVector : public std::vector<T>
+	{
+	public:
+		// inherited types
+		typedef typename checkedVector::size_type size_type;
+		typedef typename checkedVector::iterator iterator;
+		typedef typename checkedVector::difference_type difference_type;
+		typedef typename checkedVector::reference reference;
+		typedef typename checkedVector::const_reference const_reference;
+
+		checkedVector() {
+		}
+
+		checkedVector(size_type n, const T& value = T())
+		: std::vector<T>(n, value) {
+		}
+
+	//	  checkedVector(iterator i, iterator j)
+	//      : std::vector<T>(i, j) {}
+
+		reference operator[](difference_type index) {
+			assert(index >=0 
+				&& index < static_cast<difference_type>(this->size()));
+			return std::vector<T>::operator[](index);
+		}
+
+
+			const_reference operator[](difference_type index) const {
+			assert(index >=0 
+				&& index < static_cast<difference_type>(this->size()));
+			return std::vector<T>::operator[](index);
+		}
+
+	};
 }
 
 
diff --git a/src/terralib/kernel/dynpq.h b/src/terralib/kernel/dynpq.h
old mode 100644
new mode 100755
index 2a0177c..ba4c184
--- a/src/terralib/kernel/dynpq.h
+++ b/src/terralib/kernel/dynpq.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -27,148 +27,163 @@ of this library and its documentation.
 #include<checkvec.h>
 #include<algorithm>
 #include<showseq.h>
-namespace br_stl {
-
-// compares the associated values of passed iterators
-template<class T>
-struct IterGreater {
-    bool operator()( T x,  T y) const { return *y < *x;}
-};
-
-template <class key_type>
-class  dynamic_priority_queue {
-  public:
-    // public type definitions
-    typedef typename std::vector<key_type>::size_type size_type;
-    typedef typename std::vector<key_type>::difference_type index_type;
-
-    // constructor
-    dynamic_priority_queue(std::vector<key_type>& v);
-
-    // change a value at position 'at'
-    void changeKeyAt(index_type at, key_type k);
-
-    // index of the smallest element (= highest priority)
-    index_type topIndex() const { return c.front() - first; }
-
-    // value of the smallest element (= highest priority)
-    const key_type& topKey() const { return *c.front(); }
-
-    void pop();       // remove smallest element from the heap
-
-    bool empty() const { return csize == 0;}
-    size_type size() const { return csize;}
-
-  private:
-//    checkedVector<index_type> Indices;      // auxiliary vector ANAP
-	 vector<index_type> Indices;      // auxiliary vector
-    typedef typename std::vector<key_type>::iterator randomAccessIterator;
-//    checkedVector<randomAccessIterator> c;  // heap of iterators  ANAP
-	vector<randomAccessIterator> c;  // heap of iterators 
-    randomAccessIterator first;             // beginning of the external vector
-    IterGreater<randomAccessIterator> comp; // comparison object
-    index_type csize;                       // current heap size
-
-    // heap update (see below)
-    void goUp(index_type);
-    void goDown(index_type);
-};
-
-template <class key_type>
-dynamic_priority_queue<key_type>::dynamic_priority_queue(
-     std::vector<key_type>& v)
-  : Indices(v.size()), c(v.size()), first(v.begin()),
-  csize(v.size()) {
-    // store iterators and generate heap
-    for(index_type i = 0; i< csize; ++i) 
-       c[i] = v.begin()+i;
-    make_heap(c.begin(), c.end(), comp);        // STL
-
-    // construct index array
-    for(index_type ii = 0; ii< csize; ++ii) // ANAP i-> ii
-       Indices[c[ii] - first] = ii;
-}
-
-template <class key_type>
-void dynamic_priority_queue<key_type>::changeKeyAt(
-                                index_type at, key_type k) {
-   index_type idx = Indices[at];
-
-//  if (idx < csize) //ANAP
- // {
-   assert(idx < csize);   // value still present in the queue?
-
-   if(*c[idx] != k)       // in case of equality, do nothing
-      if(k > *c[idx]) {
-           *c[idx] = k;   // enter heavier value
-           goDown(idx);   // reorganize heap
-      }
-      else {
-           *c[idx] = k;   // enter lighter value
-           goUp(idx);     // reorganize heap
-      }
-//	 }
-// else cout << "erro no dynamic_priority_queue<key_type>::changeKeyAt" << idx << csize << k << endl;
-}
-
-template <class key_type>
-void dynamic_priority_queue<key_type>::goUp(index_type idx) {
-    index_type Predecessor = (idx-1)/2;
-    randomAccessIterator temp = c[idx];
-
-    while(Predecessor != idx && comp(c[Predecessor], temp)) {
-       c[idx] = c[Predecessor];
-       Indices[c[idx]-first] = idx;
-       idx = Predecessor;
-       Predecessor = (idx-1)/2;
-    }
-    
-    c[idx] = temp;
-    Indices[c[idx]-first] = idx;
-}
-
-template <class key_type>
-void dynamic_priority_queue<key_type>::goDown(index_type idx) {
-     index_type Successor = (idx+1)*2-1;
-
-     if(Successor < csize-1
-        && comp(c[Successor], c[Successor+1]))
-           ++Successor;
-     randomAccessIterator temp = c[idx];
-
-     while(Successor < csize && comp(temp, c[Successor])) {
-        c[idx] = c[Successor];
-        Indices[c[idx]-first] = idx;
-        idx = Successor;
-        Successor = (idx+1)*2-1;
-
-        if(Successor < csize-1
-           && comp(c[Successor], c[Successor+1]))
-              ++Successor;
-     }
-     c[idx] = temp;
-     Indices[c[idx]-first] = idx;
-}
-
-/* The method pop() removes the topmost element from the heap. This is
-   done by moving the last element to the top and blocking the freed
-   position with --csize. Subsequently, the element sinks down to its
-   proper position. */
-
-template <class key_type>
-void dynamic_priority_queue<key_type>::pop() {
-   // overwrite iterator at the top with the 
-   // address of the last element
-   c[0] = c[--csize];
-
-   // enter the new address 0 at the position belonging 
-   // to this element in the auxiliary array
-   Indices[c[0]-first] = 0;
-
-   // let the element at the top sink to the correct
-   // position corresponding to its weight
-   goDown(0);
-}
+
+namespace br_stl
+{
+	// compares the associated values of passed iterators
+	template<class T>
+	struct IterGreater
+	{
+		bool operator()( T x,  T y) const
+		{
+			return *y < *x;
+		}
+	};
+
+	template <class key_type>
+	class dynamic_priority_queue
+	{
+	public:
+		// public type definitions
+		typedef typename std::vector<key_type>::size_type size_type;
+		typedef typename std::vector<key_type>::difference_type index_type;
+
+		// constructor
+		dynamic_priority_queue(std::vector<key_type>& v);
+
+		// change a value at position 'at'
+		void changeKeyAt(index_type at, key_type k);
+
+		// index of the smallest element (= highest priority)
+		index_type topIndex() const { return c.front() - first; }
+
+		// value of the smallest element (= highest priority)
+		const key_type& topKey() const { return *c.front(); }
+
+		void pop();       // remove smallest element from the heap
+
+		bool empty() const { return csize == 0;}
+		size_type size() const { return csize;}
+
+	private:
+	//    checkedVector<index_type> Indices;      // auxiliary vector ANAP
+		vector<index_type> Indices;      // auxiliary vector
+		typedef typename std::vector<key_type>::iterator randomAccessIterator;
+	//    checkedVector<randomAccessIterator> c;  // heap of iterators  ANAP
+		vector<randomAccessIterator> c;  // heap of iterators 
+		randomAccessIterator first;             // beginning of the external vector
+		IterGreater<randomAccessIterator> comp; // comparison object
+		index_type csize;                       // current heap size
+
+		// heap update (see below)
+		void goUp(index_type);
+		void goDown(index_type);
+	};
+
+	template <class key_type>
+	dynamic_priority_queue<key_type>::dynamic_priority_queue(
+		std::vector<key_type>& v)
+	: Indices(v.size()), c(v.size()), first(v.begin()),
+	csize(v.size())
+	{
+		// store iterators and generate heap
+		for(index_type i = 0; i< csize; ++i) 
+		c[i] = v.begin()+i;
+		make_heap(c.begin(), c.end(), comp);        // STL
+
+		// construct index array
+		for(index_type ii = 0; ii< csize; ++ii) // ANAP i-> ii
+		Indices[c[ii] - first] = ii;
+	}
+
+	template <class key_type>
+	void dynamic_priority_queue<key_type>::changeKeyAt(
+									index_type at, key_type k)
+	{
+	index_type idx = Indices[at];
+
+	//  if (idx < csize) //ANAP
+	// {
+	assert(idx < csize);   // value still present in the queue?
+
+	if(*c[idx] != k)       // in case of equality, do nothing
+		if(k > *c[idx])
+		{
+			*c[idx] = k;   // enter heavier value
+			goDown(idx);   // reorganize heap
+		}
+		else
+		{
+			*c[idx] = k;   // enter lighter value
+			goUp(idx);     // reorganize heap
+		}
+	//	 }
+	// else cout << "erro no dynamic_priority_queue<key_type>::changeKeyAt" << idx << csize << k << endl;
+	}
+
+	template <class key_type>
+	void dynamic_priority_queue<key_type>::goUp(index_type idx)
+	{
+		index_type Predecessor = (idx-1)/2;
+		randomAccessIterator temp = c[idx];
+
+		while(Predecessor != idx && comp(c[Predecessor], temp))
+		{
+			c[idx] = c[Predecessor];
+			Indices[c[idx]-first] = idx;
+			idx = Predecessor;
+			Predecessor = (idx-1)/2;
+		}
+	    
+		c[idx] = temp;
+		Indices[c[idx]-first] = idx;
+	}
+
+	template <class key_type>
+	void dynamic_priority_queue<key_type>::goDown(index_type idx)
+	{
+		index_type Successor = (idx+1)*2-1;
+
+		if(Successor < csize-1
+			&& comp(c[Successor], c[Successor+1]))
+			++Successor;
+		randomAccessIterator temp = c[idx];
+
+		while(Successor < csize && comp(temp, c[Successor]))
+		{
+			c[idx] = c[Successor];
+			Indices[c[idx]-first] = idx;
+			idx = Successor;
+			Successor = (idx+1)*2-1;
+
+			if(Successor < csize-1
+			&& comp(c[Successor], c[Successor+1]))
+				++Successor;
+		}
+		c[idx] = temp;
+		Indices[c[idx]-first] = idx;
+	}
+
+	/* The method pop() removes the topmost element from the heap. This is
+	done by moving the last element to the top and blocking the freed
+	position with --csize. Subsequently, the element sinks down to its
+	proper position. */
+
+	template <class key_type>
+	void dynamic_priority_queue<key_type>::pop()
+	{
+	// overwrite iterator at the top with the 
+	// address of the last element
+	c[0] = c[--csize];
+
+	// enter the new address 0 at the position belonging 
+	// to this element in the auxiliary array
+	Indices[c[0]-first] = 0;
+
+	// let the element at the top sink to the correct
+	// position corresponding to its weight
+	goDown(0);
+	}
 
 } // namespace br_stl
 #endif
diff --git a/src/terralib/kernel/gra_util.h b/src/terralib/kernel/gra_util.h
old mode 100644
new mode 100755
diff --git a/src/terralib/kernel/graph.h b/src/terralib/kernel/graph.h
old mode 100644
new mode 100755
index ddf01d3..0f19e16
--- a/src/terralib/kernel/graph.h
+++ b/src/terralib/kernel/graph.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,10 +20,8 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file graph.h
-    This file contains structures and definitions used to manipulate a 
-	graph strucutre
+    \brief This file contains structures and definitions used to manipulate a graph strucutre
 	\note this code came from the book "Desining Components with C++ STL" -
 	Ulrich Breymann - Addison-Wesley - pag 243
 */
@@ -34,329 +32,345 @@ of this library and its documentation.
 #include<map>
 #include<stack>
 #include<iostream>
-namespace br_stl {
-
-// empty parameter class with a minimal set of operations
-// if there are no weights for edges necessary
-struct Empty {
-  public:
-    Empty(int=0) {}
-    bool operator<(const Empty&) const { return true;}
-};
-inline std::ostream& operator<<(std::ostream& os, const Empty&) { return os;}
-inline std::istream& operator>>(std::istream& is, Empty& ) { return is;}
-
-template<class VertexType, class EdgeType>
-class Graph {
-  public:
-    // public type interface
-    typedef std::map<int, EdgeType > Successor;
-    typedef std::pair<VertexType, Successor> vertex;
-    typedef std::vector<vertex> GraphType;
-    typedef typename GraphType::iterator iterator;
-    typedef typename GraphType::const_iterator const_iterator;
-
-    /* The following constructor initializes the output channel with
-       cerr. A parameter must be specified as to whether the graph is
-       directed or undirected, because this is an essential property
-       of a graph. */
-
-    Graph(bool g, std::ostream& os = cerr)
-    : directed(g), pOut(&os) { }
-
-    bool isDirected() const { return directed;}
-
-    /* A graph is a special kind of container to which something can
-       be added and whose elements can be accessed. Therefore, typical
-       container methods follow, which in their extent are limited to
-       those needed in the book's examples. Thus, there is no method
-       for explicit removal of a vertex or an edge from the graph. */
-
-    size_t size() const  { return C.size();}
-
-    iterator begin()     { return C.begin();}
-    iterator end()       { return C.end();}
-
-    // access to vertex i}
-    vertex& operator[](int i) {
-       // the access is safe, because C is a checkedVector
-       return C[i];
-    }
-
-	// return the position of the vertex, if it does not exist return -1
-	int getPosition(const VertexType& e); 
-
-    // addition of a vertex
-    int  insert(const VertexType& e);
-
-    // addition of an edge between e1 and e2
-    void insert(const VertexType& e1, const VertexType& e2,
-                const EdgeType& Value);
-
-    // addition of an edge between vertices no. i and j
-    void connectVertices(int i, int j, const EdgeType& Value);
-
-	// set the edge value between vertices no. i and j
-	bool setEdgeValue(const VertexType& e1, const VertexType& e2, const EdgeType& Value);
-
-    /* The following methods are useful tools for displaying
-       information on a graph and check its structure.*/
-
-    // checking of a read data model
-    // output on the channel passed to check()
-    void check(std::ostream& = std::cout);
-
-    // determine the number of edges
-    size_t CountEdges();
-
-    /* determine whether the graph contains cycles and in which way it
-       is connected. The method combines two tasks, because they can
-       be carried out in a single run.*/
-    void CycleAndConnect(std::ostream& = cout);
-    int sucessors(int index);
-
-  private:
-    bool directed;
-    GraphType C;          // container
-    std::ostream* pOut;
-};      // class Graph
-
-
-template<class VertexType, class EdgeType>
-int Graph<VertexType,EdgeType>::getPosition(const VertexType& e) 
+#include <TeDefines.h>
+
+namespace br_stl
 {
-    for(size_t i = 0; i < size(); ++i)
-       if(e == C[i].first)
-          return i;
+	// empty parameter class with a minimal set of operations
+	// if there are no weights for edges necessary
+	struct TL_DLL Empty
+	{
+	public:
+		Empty(int=0) {}
+		bool operator<(const Empty&) const { return true;}
+	};
 
-    return -1;
-}
-		
-/* In order to avoid ambiguities, a vertex is only entered if it does
-not yet exist. The sequential search is not particularly fast; on the
-other hand, this process is only needed once during the construction
-of the graph. The position of the vertex is returned. */
+	inline std::ostream& operator<<(std::ostream& os, const Empty&) { return os;}
+	inline std::istream& operator>>(std::istream& is, Empty& ) { return is;}
 
-template<class VertexType, class EdgeType>
-int Graph<VertexType,EdgeType>::insert(const VertexType& e) 
-{
-    int pos = getPosition(e);
-	if(pos<0)
+	template<class VertexType, class EdgeType>
+	class Graph
 	{
-		// if not found, insert:
-		C.push_back(vertex(e, Successor()));
-		return size()-1;
-	}
+	public:
+		// public type interface
+		typedef std::map<int, EdgeType > Successor;
+		typedef std::pair<VertexType, Successor> vertex;
+		typedef std::vector<vertex> GraphType;
+		typedef typename GraphType::iterator iterator;
+		typedef typename GraphType::const_iterator const_iterator;
+
+		/* The following constructor initializes the output channel with
+		cerr. A parameter must be specified as to whether the graph is
+		directed or undirected, because this is an essential property
+		of a graph. */
+
+		Graph(bool g, std::ostream& os = cerr)
+		: directed(g), pOut(&os) 
+		{ }
+
+		bool isDirected() const { return directed;}
+
+		/* A graph is a special kind of container to which something can
+		be added and whose elements can be accessed. Therefore, typical
+		container methods follow, which in their extent are limited to
+		those needed in the book's examples. Thus, there is no method
+		for explicit removal of a vertex or an edge from the graph. */
+
+		size_t size() const  { return C.size();}
+
+		iterator begin()     { return C.begin();}
+		iterator end()       { return C.end();}
+
+		// access to vertex i}
+		vertex& operator[](int i)
+		{
+			// the access is safe, because C is a checkedVector
+			return C[i];
+		}
 
-	return pos;
-}
-
-/* An edge is inserted by first inserting the vertices, if needed, and
-by determining their positions. The edge construction itself is 
-carried out by the function connectVertices(). It is passed the
-vertex numbers and, because of the absence of a search procedure, 
-it is very fast. */
-
-template<class VertexType, class EdgeType>
-void Graph<VertexType,EdgeType>::insert(const VertexType& e1,
-                                      const VertexType& e2,
-                                      const EdgeType& Value) {
-    int pos1 = insert(e1);
-    int pos2 = insert(e2);
-    connectVertices(pos1, pos2, Value);
-}
-
-template<class VertexType, class EdgeType>
-void Graph<VertexType,EdgeType>::connectVertices(
-             int pos1, int pos2, const EdgeType& Value) 
-{
-    (C[pos1].second)[pos2] = Value;
+		// return the position of the vertex, if it does not exist return -1
+		int getPosition(const VertexType& e); 
 
-    if(!directed)  // automatically insert opposite direction too
-      (C[pos2].second)[pos1] = Value;
-}
+		// addition of a vertex
+		int  insert(const VertexType& e);
 
-template<class VertexType, class EdgeType>
-bool Graph<VertexType,EdgeType>::setEdgeValue(const VertexType& e1,
-                                      const VertexType& e2,
-                                      const EdgeType& Value) 
-{
-    int pos1 = getPosition(e1);
-	int pos2 = getPosition(e2);
+		// addition of an edge between e1 and e2
+		void insert(const VertexType& e1, const VertexType& e2,
+					const EdgeType& Value);
+
+		// addition of an edge between vertices no. i and j
+		void connectVertices(int i, int j, const EdgeType& Value);
+
+		// set the edge value between vertices no. i and j
+		bool setEdgeValue(const VertexType& e1, const VertexType& e2, const EdgeType& Value);
 
-	if((pos1<0) || (pos2<0))
-		return false;
+		/* The following methods are useful tools for displaying
+		information on a graph and check its structure.*/
 
-	(C[pos1].second)[pos2] = Value;
+		// checking of a read data model
+		// output on the channel passed to check()
+		void check(std::ostream& = std::cout);
 
-	if(!directed)  // automatically insert opposite direction too
-      (C[pos1].second)[pos2] = Value;
+		// determine the number of edges
+		size_t CountEdges();
 
-	return true;
-}
+		/* determine whether the graph contains cycles and in which way it
+		is connected. The method combines two tasks, because they can
+		be carried out in a single run.*/
+		void CycleAndConnect(std::ostream& = cout);
+		int sucessors(int index);
 
+	private:
+		bool directed;
+		GraphType C;          // container
+		std::ostream* pOut;
+	};      // class Graph
 
-template<class VertexType, class EdgeType>
-void Graph<VertexType,EdgeType>::check(std::ostream& os) {
-    os << "The graph is ";
-    if(!isDirected())
-        os << "un";
 
-    os << "directed and has "
-       << size() << " vertices and "
-       << CountEdges()
-       << " edges\n";
-    CycleAndConnect(os);
-}
+	template<class VertexType, class EdgeType>
+	int Graph<VertexType,EdgeType>::getPosition(const VertexType& e) 
+	{
+		for(size_t i = 0; i < size(); ++i)
+		if(e == C[i].first)
+			return i;
 
-template<class VertexType, class EdgeType>
-size_t Graph<VertexType,EdgeType>::CountEdges() {
-    size_t edges = 0;
-    iterator temp = begin();
+		return -1;
+	}
+		
+	/* In order to avoid ambiguities, a vertex is only entered if it does
+	not yet exist. The sequential search is not particularly fast; on the
+	other hand, this process is only needed once during the construction
+	of the graph. The position of the vertex is returned. */
 
-    while(temp != end())
-         edges += (*temp++).second.size();
+	template<class VertexType, class EdgeType>
+	int Graph<VertexType,EdgeType>::insert(const VertexType& e) 
+	{
+		int pos = getPosition(e);
+		if(pos<0)
+		{
+			// if not found, insert:
+			C.push_back(vertex(e, Successor()));
+			return size()-1;
+		}
 
-    if(!directed)
-        edges /= 2;
-    return edges;
-}
+		return pos;
+	}
 
-// Type for next function
-enum VertStatus {notVisited, visited, processed};
+	/* An edge is inserted by first inserting the vertices, if needed, and
+	by determining their positions. The edge construction itself is 
+	carried out by the function connectVertices(). It is passed the
+	vertex numbers and, because of the absence of a search procedure, 
+	it is very fast. */
 
-template<class VertexType, class EdgeType>
-int Graph<VertexType, EdgeType>::sucessors(int index) {
-	typename Successor::const_iterator
-	start  = operator[](index).second.begin(),
-	end    = operator[](index).second.end();
-	int nSucc = 0;
-	while(start != end)
+	template<class VertexType, class EdgeType>
+	void Graph<VertexType,EdgeType>::insert(const VertexType& e1,
+										const VertexType& e2,
+										const EdgeType& Value)
 	{
-		nSucc++;
-		++start;
+		int pos1 = insert(e1);
+		int pos2 = insert(e2);
+		connectVertices(pos1, pos2, Value);
 	}
 
-	return nSucc;
-}
-template<class VertexType, class EdgeType>
-void Graph<VertexType, EdgeType>::CycleAndConnect(std::ostream& os) {
-    int Cycles = 0;
-    int ComponentNumber = 0;
-    std::stack<int, std::vector<int> > verticesStack;  // vertices to be visited
-
-    /* In order to prevent multiple visits to vertices in possible
-       cycles, which entails the risk of infinite loops, the vertices
-       are marked for having been visited or finished being processed.
-       This purpose is served by the vector VertexState. */
-       
-    // assign all vertices the state `not visited'
-    std::vector<VertStatus> VertexState(size(), notVisited);
-
-    /* If, starting from one vertex, an attempt is made to reach all
-       other vertices, success is not guaranteed in weakly or
-       non-connected graphs. Therefore, each vertex is visited. If it
-       is found that a vertex has already been visited, it does not
-       need to be processed any further. */
-
-    // visit all vertices
-    for(size_t i = 0; i < size(); ++i) {
-      if(VertexState[i] == notVisited) {
-         ++ComponentNumber;
-         // store on stack for further processing
-         verticesStack.push(i);
-
-         // process stack
-         while(!verticesStack.empty()) {
-            int theVertex = verticesStack.top();
-            verticesStack.pop();
-            if(VertexState[theVertex] == visited)
-               VertexState[theVertex] = processed;
-            else
-               if(VertexState[theVertex] == notVisited) {
-                  VertexState[theVertex] = visited;
-                  // new vertex, earmark for processed mark
-                  verticesStack.push(theVertex);
-
-                  /* If one of the successors of a newly found vertex
-                     bears the visited mark, the algorithm has already
-                     passed this point once, and there is a cycle. */
-                     
-                  // earmark successor:
-                  typename Successor::const_iterator
-                    start  = operator[](theVertex).second.begin(),
-                    end    = operator[](theVertex).second.end();
-
-                  while(start != end) {
-                       int Succ = (*start).first;
-
-                       if(VertexState[Succ] == visited) {
-                           ++Cycles;   // someone's been here already!
-                           (*pOut) << "at least vertex "
-                           << operator[](Succ).first
-                           << " lies in a cycle\n";
-                       }
-
-                       /* Otherwise, the vertex has already been
-                          processed and therefore should not be
-                          considered again, or it has not yet been
-                          visited and is earmarked on the stack. */
-                          
-                       if(VertexState[Succ] == notVisited)
-                          verticesStack.push(Succ);
-                       ++start;
-                  }
-               }
-         }  // stack empty?
-      }     //  if(VertexState}...
-    }       // for()} ...
-
-    /* Now we only need the output. In case of directed, weakly
-       connected graphs, the algorithm counts several components. In
-       order to make the output conform to the above definitions,
-       although with less content of information, a distinction is
-       made as to whether the graph is directed or not. */
-
-    if(directed)
-    {  if(ComponentNumber == 1)
-          os << "The graph is strongly connected.\n";
-       else
-          os << "The graph is not or weakly "
-                "connected.\n";
-    }
-    else
-       os << "The graph has "
-          << ComponentNumber
-          << " component(s)." << std::endl;
-
-    os << "The graph has ";
-    if(Cycles == 0)
-      os << "no ";
-    os << "cycles." << std::endl;
-}
-
-template<class VertexType, class EdgeType>
-std::ostream& operator<<(std::ostream& os, Graph<VertexType,EdgeType>& G) {
-    // display of vertices with successors
-	for(size_t i = 0; i < G.size(); ++i)
+	template<class VertexType, class EdgeType>
+	void Graph<VertexType,EdgeType>::connectVertices(
+				int pos1, int pos2, const EdgeType& Value) 
 	{
-		os << G[i].first << " <";
-		typename Graph<VertexType,EdgeType>::Successor::const_iterator
-                              startN = G[i].second.begin(),
-                              endN   = G[i].second.end();
+		(C[pos1].second)[pos2] = Value;
+
+		if(!directed)  // automatically insert opposite direction too
+		(C[pos2].second)[pos1] = Value;
+	}
+
+	template<class VertexType, class EdgeType>
+	bool Graph<VertexType,EdgeType>::setEdgeValue(const VertexType& e1,
+										const VertexType& e2,
+										const EdgeType& Value) 
+	{
+		int pos1 = getPosition(e1);
+		int pos2 = getPosition(e2);
+
+		if((pos1<0) || (pos2<0))
+			return false;
 
-        while(startN != endN)
+		(C[pos1].second)[pos2] = Value;
+
+		if(!directed)  // automatically insert opposite direction too
+		(C[pos1].second)[pos2] = Value;
+
+		return true;
+	}
+
+
+	template<class VertexType, class EdgeType>
+	void Graph<VertexType,EdgeType>::check(std::ostream& os)
+	{
+		os << "The graph is ";
+		if(!isDirected())
+			os << "un";
+
+		os << "directed and has "
+		<< size() << " vertices and "
+		<< CountEdges()
+		<< " edges\n";
+		CycleAndConnect(os);
+	}
+
+	template<class VertexType, class EdgeType>
+	size_t Graph<VertexType,EdgeType>::CountEdges()
+	{
+		size_t edges = 0;
+		iterator temp = begin();
+
+		while(temp != end())
+			edges += (*temp++).second.size();
+
+		if(!directed)
+			edges /= 2;
+		return edges;
+	}
+
+	// Type for next function
+	enum VertStatus {notVisited, visited, processed};
+
+	template<class VertexType, class EdgeType>
+	int Graph<VertexType, EdgeType>::sucessors(int index) {
+		typename Successor::const_iterator
+		start  = operator[](index).second.begin(),
+		end    = operator[](index).second.end();
+		int nSucc = 0;
+		while(start != end)
 		{
-            os << G[(*startN).first].first << ' ' // vertex
-               << (*startN).second << ' ';        // edge value
-            ++startN;
-        }
-		os << ">" << std::endl;
-    }
-    return os;
-}
+			nSucc++;
+			++start;
+		}
 
+		return nSucc;
+	}
+	template<class VertexType, class EdgeType>
+	void Graph<VertexType, EdgeType>::CycleAndConnect(std::ostream& os) {
+		int Cycles = 0;
+		int ComponentNumber = 0;
+		std::stack<int, std::vector<int> > verticesStack;  // vertices to be visited
+
+		/* In order to prevent multiple visits to vertices in possible
+		cycles, which entails the risk of infinite loops, the vertices
+		are marked for having been visited or finished being processed.
+		This purpose is served by the vector VertexState. */
+	       
+		// assign all vertices the state `not visited'
+		std::vector<VertStatus> VertexState(size(), notVisited);
+
+		/* If, starting from one vertex, an attempt is made to reach all
+		other vertices, success is not guaranteed in weakly or
+		non-connected graphs. Therefore, each vertex is visited. If it
+		is found that a vertex has already been visited, it does not
+		need to be processed any further. */
+
+		// visit all vertices
+		for(size_t i = 0; i < size(); ++i)
+		{
+			if(VertexState[i] == notVisited)
+			{
+				++ComponentNumber;
+				// store on stack for further processing
+				verticesStack.push(i);
+
+				// process stack
+				while(!verticesStack.empty())
+				{
+					int theVertex = verticesStack.top();
+					verticesStack.pop();
+					if(VertexState[theVertex] == visited)
+					VertexState[theVertex] = processed;
+					else
+					if(VertexState[theVertex] == notVisited)
+					{
+						VertexState[theVertex] = visited;
+						// new vertex, earmark for processed mark
+						verticesStack.push(theVertex);
+
+						/* If one of the successors of a newly found vertex
+							bears the visited mark, the algorithm has already
+							passed this point once, and there is a cycle. */
+		                     
+						// earmark successor:
+						typename Successor::const_iterator
+							start  = operator[](theVertex).second.begin(),
+							end    = operator[](theVertex).second.end();
+
+						while(start != end)
+						{
+							int Succ = (*start).first;
+
+							if(VertexState[Succ] == visited)
+							{
+								++Cycles;   // someone's been here already!
+								(*pOut) << "at least vertex "
+								<< operator[](Succ).first
+								<< " lies in a cycle\n";
+							}
+
+							/* Otherwise, the vertex has already been
+								processed and therefore should not be
+								considered again, or it has not yet been
+								visited and is earmarked on the stack. */
+		                          
+							if(VertexState[Succ] == notVisited)
+								verticesStack.push(Succ);
+							++start;
+						}
+					}
+				}  // stack empty?
+			}     //  if(VertexState}...
+		}       // for()} ...
+
+		/* Now we only need the output. In case of directed, weakly
+		connected graphs, the algorithm counts several components. In
+		order to make the output conform to the above definitions,
+		although with less content of information, a distinction is
+		made as to whether the graph is directed or not. */
+
+		if(directed)
+		{
+			if(ComponentNumber == 1)
+				os << "The graph is strongly connected.\n";
+			else
+				os << "The graph is not or weakly "
+					"connected.\n";
+		}
+		else
+			os	<< "The graph has "
+				<< ComponentNumber
+				<< " component(s)." << std::endl;
+
+		os << "The graph has ";
+		if(Cycles == 0)
+			os << "no ";
+		os << "cycles." << std::endl;
+	}
 
+	template<class VertexType, class EdgeType>
+	std::ostream& operator<<(std::ostream& os, Graph<VertexType,EdgeType>& G)
+	{
+		// display of vertices with successors
+		for(size_t i = 0; i < G.size(); ++i)
+		{
+			os << G[i].first << " <";
+			typename Graph<VertexType,EdgeType>::Successor::const_iterator
+								startN = G[i].second.begin(),
+								endN   = G[i].second.end();
+
+			while(startN != endN)
+			{
+				os << G[(*startN).first].first << ' ' // vertex
+				<< (*startN).second << ' ';        // edge value
+				++startN;
+			}
+			os << ">" << std::endl;
+		}
+		return os;
+	}
 } // namespace br_stl
 
 
diff --git a/src/terralib/kernel/ijl.h b/src/terralib/kernel/ijl.h
deleted file mode 100644
index ef706bd..0000000
--- a/src/terralib/kernel/ijl.h
+++ /dev/null
@@ -1,1513 +0,0 @@
-/*M*
-//
-//
-//               INTEL CORPORATION PROPRIETARY INFORMATION
-//  This software is supplied under the terms of a license agreement or
-//  nondisclosure agreement with Intel Corporation and may not be copied
-//  or disclosed except in accordance with the terms of that agreement.
-//        Copyright (c) 1998 Intel Corporation. All Rights Reserved.
-//
-//
-//  File:
-//    ijl.h
-//
-//  Purpose:
-//    IJL Common Header File
-//    This file contains:  definitions for data types, data
-//    structures, error codes, and function prototypes used
-//    in the Intel(R) JPEG Library (IJL).
-//
-//  Version:
-//    1.5
-//
-*M*/
-
-#ifndef __IJL_H__
-#define __IJL_H__
-
-
-#if defined( __cplusplus )
-extern "C" {
-#endif
-
-
-#ifndef IJL_ALL_WARNINGS
-
-#if _MSC_VER >= 1000
-
-/* nonstandard extension used : nameless struct/union          */
-#pragma warning(disable : 4201)
-/* nonstandard extension used : bit field types other than int */
-#pragma warning(disable : 4214)
-/* unreferenced inline function has been removed               */
-#pragma warning(disable : 4514)
-/* named type definition in parentheses                        */
-#pragma warning(disable : 4115)
-
-#endif /* _MSC_VER >= 1000 */
-
-#endif /* IJL_ALL_WARNINGS */
-
-
-#define IJL_STDCALL __stdcall
-
-
-/* align struct on 8 bytes boundary */
-#pragma pack (8)
-
-
-/* /////////////////////////////////////////////////////////////////////////
-// Macros/Constants */
-
-/* Size of file I/O buffer (4K). */
-#define JBUFSIZE    4096
-
-
-#define IJL_INT64  __int64
-#define IJL_UINT64 unsigned IJL_INT64
-
-
-#ifndef IJLAPI
-  #ifdef IJL_MSEXPORTS
-    #define IJLAPI(type,name,arg) \
-      extern __declspec(dllimport) type IJL_STDCALL name arg
-  #else
-    #define IJLAPI(type,name,arg) \
-      extern type IJL_STDCALL name arg
-  #endif
-#endif
-
-
-
-#define IJL_DIB_ALIGN (sizeof(int) - 1)
-
-#define IJL_DIB_UWIDTH(width,nchannels) \
-  ((width) * (nchannels))
-
-#define IJL_DIB_AWIDTH(width,nchannels) \
-  ( ((IJL_DIB_UWIDTH(width,nchannels) + IJL_DIB_ALIGN) & (~IJL_DIB_ALIGN)) )
-
-#define IJL_DIB_PAD_BYTES(width,nchannels) \
-  ( IJL_DIB_AWIDTH(width,nchannels) - IJL_DIB_UWIDTH(width,nchannels) )
-
-
-#define IJL_DIB_SCALE_SIZE(jpgsize,scale) \
-  ( ((jpgsize) + (scale) - 1) / (scale) )
-
-
-
-
-/*D*
-////////////////////////////////////////////////////////////////////////////
-// Name:        IJLibVersion
-//
-// Purpose:     Stores library version info.
-//
-// Context:
-//
-// Example:
-//   major           - 1
-//   minor           - 0
-//   build           - 1
-//   Name            - "ijl10.dll"
-//   Version         - "1.0.1 Beta1"
-//   InternalVersion - "1.0.1.1"
-//   BuildDate       - "Sep 22 1998"
-//   CallConv        - "DLL"
-//
-////////////////////////////////////////////////////////////////////////////
-*D*/
-
-typedef struct _IJLibVersion
-{
-  int         major;
-  int         minor;
-  int         build;
-  const char* Name;
-  const char* Version;
-  const char* InternalVersion;
-  const char* BuildDate;
-  const char* CallConv;
-
-} IJLibVersion;
-
-
-/*D*
-////////////////////////////////////////////////////////////////////////////
-// Name:        IJL_RECT
-//
-// Purpose:     Keep coordinates for rectangle region of image
-//
-// Context:     Used to specify roi
-//
-// Fields:
-//
-////////////////////////////////////////////////////////////////////////////
-*D*/
-
-typedef struct _IJL_RECT
-{
-  long  left;
-  long  top;
-  long  right;
-  long  bottom;
-
-} IJL_RECT;
-
-
-/*D*
-////////////////////////////////////////////////////////////////////////////
-// Name:        IJL_HANDLE
-//
-// Purpose:     file handle
-//
-// Context:     used internally
-//
-// Fields:
-//
-////////////////////////////////////////////////////////////////////////////
-*D*/
-
-typedef void* IJL_HANDLE;
-
-
-/*D*
-////////////////////////////////////////////////////////////////////////////
-// Name:        IJLIOTYPE
-//
-// Purpose:     Possible types of data read/write/other operations to be
-//              performed by the functions IJL_Read and IJL_Write.
-//
-//              See the Developer's Guide for details on appropriate usage.
-//
-// Fields:
-//
-//  IJL_JFILE_XXXXXXX   Indicates JPEG data in a stdio file.
-//
-//  IJL_JBUFF_XXXXXXX   Indicates JPEG data in an addressable buffer.
-//
-////////////////////////////////////////////////////////////////////////////
-*D*/
-
-typedef enum _IJLIOTYPE
-{
-  IJL_SETUP                   = -1,
-
-
-  /* Read JPEG parameters (i.e., height, width, channels, sampling, etc.) */
-  /* from a JPEG bit stream. */
-  IJL_JFILE_READPARAMS        =  0,
-  IJL_JBUFF_READPARAMS        =  1,
-
-  /* Read a JPEG Interchange Format image. */
-  IJL_JFILE_READWHOLEIMAGE    =  2,
-  IJL_JBUFF_READWHOLEIMAGE    =  3,
-
-  /* Read JPEG tables from a JPEG Abbreviated Format bit stream. */
-  IJL_JFILE_READHEADER        =  4,
-  IJL_JBUFF_READHEADER        =  5,
-
-  /* Read image info from a JPEG Abbreviated Format bit stream. */
-  IJL_JFILE_READENTROPY       =  6,
-  IJL_JBUFF_READENTROPY       =  7,
-
-  /* Write an entire JFIF bit stream. */
-  IJL_JFILE_WRITEWHOLEIMAGE   =  8,
-  IJL_JBUFF_WRITEWHOLEIMAGE   =  9,
-
-  /* Write a JPEG Abbreviated Format bit stream. */
-  IJL_JFILE_WRITEHEADER       = 10,
-  IJL_JBUFF_WRITEHEADER       = 11,
-
-  /* Write image info to a JPEG Abbreviated Format bit stream. */
-  IJL_JFILE_WRITEENTROPY      = 12,
-  IJL_JBUFF_WRITEENTROPY      = 13,
-
-
-  /* Scaled Decoding Options: */
-
-  /* Reads a JPEG image scaled to 1/2 size. */
-  IJL_JFILE_READONEHALF       = 14,
-  IJL_JBUFF_READONEHALF       = 15,
-
-  /* Reads a JPEG image scaled to 1/4 size. */
-  IJL_JFILE_READONEQUARTER    = 16,
-  IJL_JBUFF_READONEQUARTER    = 17,
-
-  /* Reads a JPEG image scaled to 1/8 size. */
-  IJL_JFILE_READONEEIGHTH     = 18,
-  IJL_JBUFF_READONEEIGHTH     = 19,
-
-  /* Reads an embedded thumbnail from a JFIF bit stream. */
-  IJL_JFILE_READTHUMBNAIL     = 20,
-  IJL_JBUFF_READTHUMBNAIL     = 21
-
-} IJLIOTYPE;
-
-
-/*D*
-////////////////////////////////////////////////////////////////////////////
-// Name:        IJL_COLOR
-//
-// Purpose:     Possible color space formats.
-//
-//              Note these formats do *not* necessarily denote
-//              the number of channels in the color space.
-//              There exists separate "channel" fields in the
-//              JPEG_CORE_PROPERTIES data structure specifically
-//              for indicating the number of channels in the
-//              JPEG and/or DIB color spaces.
-//
-//              See the Developer's Guide for details on appropriate usage.
-//
-////////////////////////////////////////////////////////////////////////////
-*D*/
-
-typedef enum _IJL_COLOR
-{
-  IJL_RGB         = 1,    /* Red-Green-Blue color space. */
-  IJL_BGR         = 2,    /* Reversed channel ordering from IJL_RGB. */
-  IJL_YCBCR       = 3,    /* Luminance-Chrominance color space as defined */
-                          /* by CCIR Recommendation 601. */
-  IJL_G           = 4,    /* Grayscale color space. */
-  IJL_RGBA_FPX    = 5,    /* FlashPix RGB 4 channel color space that */
-                          /* has pre-multiplied opacity. */
-  IJL_YCBCRA_FPX  = 6,    /* FlashPix YCbCr 4 channel color space that */
-                          /* has pre-multiplied opacity. */
-
-  IJL_OTHER       = 255   /* Some other color space not defined by the IJL. */
-                          /* (This means no color space conversion will */
-                          /* be done by the IJL.) */
-
-} IJL_COLOR;
-
-
-/*D*
-////////////////////////////////////////////////////////////////////////////
-// Name:        IJL_JPGSUBSAMPLING
-//
-// Purpose:     Possible subsampling formats used in the JPEG.
-//
-//              See the Developer's Guide for details on appropriate usage.
-//
-////////////////////////////////////////////////////////////////////////////
-*D*/
-
-typedef enum _IJL_JPGSUBSAMPLING
-{
-  IJL_NONE    = 0,    /* Corresponds to "No Subsampling". */
-                      /* Valid on a JPEG w/ any number of channels. */
-  IJL_411     = 1,    /* Valid on a JPEG w/ 3 channels. */
-  IJL_422     = 2,    /* Valid on a JPEG w/ 3 channels. */
-
-  IJL_4114    = 3,    /* Valid on a JPEG w/ 4 channels. */
-  IJL_4224    = 4     /* Valid on a JPEG w/ 4 channels. */
-
-} IJL_JPGSUBSAMPLING;
-
-
-/*D*
-////////////////////////////////////////////////////////////////////////////
-// Name:        IJL_DIBSUBSAMPLING
-//
-// Purpose:     Possible subsampling formats used in the DIB.
-//
-//              See the Developer's Guide for details on appropriate usage.
-//
-////////////////////////////////////////////////////////////////////////////
-*D*/
-
-typedef IJL_JPGSUBSAMPLING IJL_DIBSUBSAMPLING;
-
-
-/*D*
-////////////////////////////////////////////////////////////////////////////
-// Name:        HUFFMAN_TABLE
-//
-// Purpose:     Stores Huffman table information in a fast-to-use format.
-//
-// Context:     Used by Huffman encoder/decoder to access Huffman table
-//              data.  Raw Huffman tables are formatted to fit this
-//              structure prior to use.
-//
-// Fields:
-//  huff_class  0 == DC Huffman or lossless table, 1 == AC table.
-//  ident       Huffman table identifier, 0-3 valid (Extended Baseline).
-//  huffelem    Huffman elements for codes <= 8 bits long;
-//              contains both zero run-length and symbol length in bits.
-//  huffval     Huffman values for codes 9-16 bits in length.
-//  mincode     Smallest Huffman code of length n.
-//  maxcode     Largest Huffman code of length n.
-//  valptr      Starting index into huffval[] for symbols of length k.
-//
-////////////////////////////////////////////////////////////////////////////
-*D*/
-
-typedef struct _HUFFMAN_TABLE
-{
-  int             huff_class;
-  int             ident;
-  unsigned int    huffelem[256];
-  unsigned short  huffval[256];
-  unsigned short  mincode[17];
-  short           maxcode[18];
-  unsigned short  valptr[17];
-
-} HUFFMAN_TABLE;
-
-
-/*D*
-////////////////////////////////////////////////////////////////////////////
-// Name:        JPEGHuffTable
-//
-// Purpose:     Stores pointers to JPEG-binary spec compliant
-//              Huffman table information.
-//
-// Context:     Used by interface and table methods to specify encoder
-//              tables to generate and store JPEG images.
-//
-// Fields:
-//  bits        Points to number of codes of length i (<=16 supported).
-//  vals        Value associated with each Huffman code.
-//  hclass      0 == DC table, 1 == AC table.
-//  ident       Specifies the identifier for this table.
-//              0-3 for extended JPEG compliance.
-//
-////////////////////////////////////////////////////////////////////////////
-*D*/
-
-typedef struct _JPEGHuffTable
-{
-  unsigned char* bits;
-  unsigned char* vals;
-  unsigned char  hclass;
-  unsigned char  ident;
-
-} JPEGHuffTable;
-
-
-/*D*
-////////////////////////////////////////////////////////////////////////////
-// Name:        QUANT_TABLE
-//
-// Purpose:     Stores quantization table information in a
-//              fast-to-use format.
-//
-// Context:     Used by quantizer/dequantizer to store formatted
-//              quantization tables.
-//
-// Fields:
-//  precision   0 => elements contains 8-bit elements,
-//              1 => elements contains 16-bit elements.
-//  ident       Table identifier (0-3).
-//  elements    Pointer to 64 table elements + 16 extra elements to catch
-//              input data errors that may cause malfunction of the
-//              Huffman decoder.
-//  elarray     Space for elements (see above) plus 8 bytes to align
-//              to a quadword boundary.
-//
-////////////////////////////////////////////////////////////////////////////
-*D*/
-
-typedef struct _QUANT_TABLE
-{
-  int    precision;
-  int    ident;
-  short* elements;
-  short  elarray [84];
-
-} QUANT_TABLE;
-
-
-/*D*
-////////////////////////////////////////////////////////////////////////////
-// Name:        JPEGQuantTable
-//
-// Purpose:     Stores pointers to JPEG binary spec compliant
-//              quantization table information.
-//
-// Context:     Used by interface and table methods to specify encoder
-//              tables to generate and store JPEG images.
-//
-// Fields:
-//  quantizer   Zig-zag order elements specifying quantization factors.
-//  ident       Specifies identifier for this table.
-//              0-3 valid for Extended Baseline JPEG compliance.
-//
-////////////////////////////////////////////////////////////////////////////
-*D*/
-
-typedef struct _JPEGQuantTable
-{
-  unsigned char* quantizer;
-  unsigned char  ident;
-
-} JPEGQuantTable;
-
-
-/*D*
-////////////////////////////////////////////////////////////////////////////
-// Name:        FRAME_COMPONENT
-//
-// Purpose:     One frame-component structure is allocated per component
-//              in a frame.
-//
-// Context:     Used by Huffman decoder to manage components.
-//
-// Fields:
-//  ident       Component identifier.  The tables use this ident to
-//              determine the correct table for each component.
-//  hsampling   Horizontal subsampling factor for this component,
-//              1-4 are legal.
-//  vsampling   Vertical subsampling factor for this component,
-//              1-4 are legal.
-//  quant_sel   Quantization table selector.  The quantization table
-//              used by this component is determined via this selector.
-//
-////////////////////////////////////////////////////////////////////////////
-*D*/
-
-typedef struct _FRAME_COMPONENT
-{
-  int ident;
-  int hsampling;
-  int vsampling;
-  int quant_sel;
-
-} FRAME_COMPONENT;
-
-
-/*D*
-////////////////////////////////////////////////////////////////////////////
-// Name:        FRAME
-//
-// Purpose:     Stores frame-specific data.
-//
-// Context:     One Frame structure per image.
-//
-// Fields:
-//  precision       Sample precision in bits.
-//  width           Width of the source image in pixels.
-//  height          Height of the source image in pixels.
-//  MCUheight       Height of a frame MCU.
-//  MCUwidth        Width of a frame MCU.
-//  max_hsampling   Max horiz sampling ratio of any component in the frame.
-//  max_vsampling   Max vert sampling ratio of any component in the frame.
-//  ncomps          Number of components/channels in the frame.
-//  horMCU          Number of horizontal MCUs in the frame.
-//  totalMCU        Total number of MCUs in the frame.
-//  comps           Array of 'ncomps' component descriptors.
-//  restart_interv  Indicates number of MCUs after which to restart the
-//                  entropy parameters.
-//  SeenAllDCScans  Used when decoding Multiscan images to determine if
-//                  all channels of an image have been decoded.
-//  SeenAllACScans  (See SeenAllDCScans)
-//
-////////////////////////////////////////////////////////////////////////////
-*D*/
-
-typedef struct _FRAME
-{
-  int              precision;
-  int              width;
-  int              height;
-  int              MCUheight;
-  int              MCUwidth;
-  int              max_hsampling;
-  int              max_vsampling;
-  int              ncomps;
-  int              horMCU;
-  long             totalMCU;
-  FRAME_COMPONENT* comps;
-  int              restart_interv;
-  int              SeenAllDCScans;
-  int              SeenAllACScans;
-
-} FRAME;
-
-
-/*D*
-////////////////////////////////////////////////////////////////////////////
-// Name:        SCAN_COMPONENT
-//
-// Purpose:     One scan-component structure is allocated per component
-//              of each scan in a frame.
-//
-// Context:     Used by Huffman decoder to manage components within scans.
-//
-// Fields:
-//  comp        Component number, index to the comps member of FRAME.
-//  hsampling   Horizontal sampling factor.
-//  vsampling   Vertical sampling factor.
-//  dc_table    DC Huffman table pointer for this scan.
-//  ac_table    AC Huffman table pointer for this scan.
-//  quant_table Quantization table pointer for this scan.
-//
-////////////////////////////////////////////////////////////////////////////
-*D*/
-
-typedef struct _SCAN_COMPONENT
-{
-  int            comp;
-  int            hsampling;
-  int            vsampling;
-  HUFFMAN_TABLE* dc_table;
-  HUFFMAN_TABLE* ac_table;
-  QUANT_TABLE*   quant_table;
-
-} SCAN_COMPONENT;
-
-
-/*D*
-////////////////////////////////////////////////////////////////////////////
-// Name:        SCAN
-//
-// Purpose:     One SCAN structure is allocated per scan in a frame.
-//
-// Context:     Used by Huffman decoder to manage scans.
-//
-// Fields:
-//  ncomps          Number of image components in a scan, 1-4 legal.
-//  gray_scale      If TRUE, decode only the Y channel.
-//  start_spec      Start coefficient of spectral or predictor selector.
-//  end_spec        End coefficient of spectral selector.
-//  approx_high     High bit position in successive approximation
-//                  Progressive coding.
-//  approx_low      Low bit position in successive approximation
-//                  Progressive coding.
-//  restart_interv  Restart interval, 0 if disabled.
-//  curxMCU         Next horizontal MCU index to be processed after
-//                  an interrupted SCAN.
-//  curyMCU         Next vertical MCU index to be processed after
-//                  an interrupted SCAN.
-//  dc_diff         Array of DC predictor values for DPCM modes.
-//  comps           Array of ncomps SCAN_COMPONENT component identifiers.
-//
-////////////////////////////////////////////////////////////////////////////
-*D*/
-
-typedef struct _SCAN
-{
-  int             ncomps;
-  int             gray_scale;
-  int             start_spec;
-  int             end_spec;
-  int             approx_high;
-  int             approx_low;
-  unsigned int    restart_interv;
-  int             curxMCU;
-  int             curyMCU;
-  int             dc_diff[4];
-  SCAN_COMPONENT* comps;
-
-} SCAN;
-
-
-/*D*
-////////////////////////////////////////////////////////////////////////////
-// Name:        DCTTYPE
-//
-// Purpose:     Possible algorithms to be used to perform the discrete
-//              cosine transform (DCT).
-//
-// Fields:
-//  IJL_AAN     The AAN (Arai, Agui, and Nakajima) algorithm from
-//              Trans. IEICE, vol. E 71(11), 1095-1097, Nov. 1988.
-//  IJL_IPP     The modified K. R. Rao and P. Yip algorithm from
-//              Intel Performance Primitives Library
-//
-////////////////////////////////////////////////////////////////////////////
-*D*/
-
-typedef enum _DCTTYPE
-{
-  IJL_AAN = 0,
-  IJL_IPP = 1
-
-} DCTTYPE;
-
-
-/*D*
-////////////////////////////////////////////////////////////////////////////
-// Name:        UPSAMPLING_TYPE
-//
-// Purpose:            -  Possible algorithms to be used to perform upsampling
-//
-// Fields:
-//  IJL_BOX_FILTER      - the algorithm is simple replication of the input pixel
-//                        onto the corresponding output pixels (box filter);
-//  IJL_TRIANGLE_FILTER - 3/4 * nearer pixel + 1/4 * further pixel in each
-//                        dimension
-////////////////////////////////////////////////////////////////////////////
-*D*/
-
-typedef enum _UPSAMPLING_TYPE
-{
-  IJL_BOX_FILTER      = 0,
-  IJL_TRIANGLE_FILTER = 1
-
-} UPSAMPLING_TYPE;
-
-
-/*D*
-////////////////////////////////////////////////////////////////////////////
-// Name:        SAMPLING_STATE
-//
-// Purpose:     Stores current conditions of sampling. Only for upsampling 
-//              with triangle filter is used now.
-//
-// Fields:
-//  top_row        - pointer to buffer with MCUs, that are located above than
-//                   current row of MCUs;
-//  cur_row        - pointer to buffer with current row of MCUs;
-//  bottom_row     - pointer to buffer with MCUs, that are located below than
-//                   current row of MCUs;
-//  last_row       - pointer to bottom boundary of last row of MCUs
-//  cur_row_number - number of row of MCUs, that is decoding;
-//  user_interrupt - field to store jprops->interrupt, because of we prohibit 
-//                   interrupts while top row of MCUs is upsampling.
-////////////////////////////////////////////////////////////////////////////
-*D*/
-
-typedef struct _SAMPLING_STATE
-{
-  short* top_row;
-  short* cur_row;
-  short* bottom_row;
-  short* last_row;
-  int    cur_row_number;
-
-} SAMPLING_STATE;
-
-
-/*D*
-////////////////////////////////////////////////////////////////////////////
-// Name:        PROCESSOR_TYPE
-//
-// Purpose:     Possible types of processors.
-//              Note that the enums are defined in ascending order
-//              depending upon their various IA32 instruction support.
-//
-// Fields:
-//
-// IJL_OTHER_PROC
-//      Does not support the CPUID instruction and
-//      assumes no Pentium(R) processor instructions.
-//
-// IJL_PENTIUM_PROC
-//      Corresponds to an Intel(R) Pentium(R) processor
-//      (or a 100% compatible) that supports the
-//      Pentium(R) processor instructions.
-//
-// IJL_PENTIUM_PRO_PROC
-//      Corresponds to an Intel(R) Pentium(R) Pro processor
-//      (or a 100% compatible) that supports the
-//      Pentium(R) Pro processor instructions.
-//
-// IJL_PENTIUM_PROC_MMX_TECH
-//      Corresponds to an Intel(R) Pentium(R) processor
-//      with MMX(TM) technology (or a 100% compatible)
-//      that supports the MMX(TM) instructions.
-//
-// IJL_PENTIUM_II_PROC
-//      Corresponds to an Intel(R) Pentium(R) II processor
-//      (or a 100% compatible) that supports both the
-//      Pentium(R) Pro processor instructions and the
-//      MMX(TM) instructions.
-//
-// IJL_PENTIUM_III_PROC
-//      Corresponds to an Intel(R) Pentium(R) III processor
-//
-// IJL_NEW_PROCESSOR
-//      Correponds to new processor
-//
-//  Any additional processor types that support a superset
-//  of both the Pentium(R) Pro processor instructions and the
-//  MMX(TM) instructions should be given an enum value greater
-//  than IJL_PENTIUM_III_PROC.
-//
-////////////////////////////////////////////////////////////////////////////
-*D*/
-
-typedef enum _PROCESSOR_TYPE
-{
-  IJL_OTHER_PROC            = 0,
-  IJL_PENTIUM_PROC          = 1,
-  IJL_PENTIUM_PRO_PROC      = 2,
-  IJL_PENTIUM_PROC_MMX_TECH = 3,
-  IJL_PENTIUM_II_PROC       = 4,
-  IJL_PENTIUM_III_PROC      = 5,
-  IJL_PENTIUM_4_PROC        = 6,
-  IJL_NEW_PROCESSOR         = 7
-
-} PROCESSOR_TYPE;
-
-
-/*D*
-////////////////////////////////////////////////////////////////////////////
-// Name:        RAW_DATA_TYPES_STATE
-//
-// Purpose:     Stores data types: raw dct coefficients or raw sampled data.
-//              Pointer to structure in JPEG_PROPERTIES is NULL, if any raw
-//              data isn't request (DIBBytes!=NULL).
-//
-// Fields:
-//  short* raw_ptrs[4] - pointers to buffers with raw data; one pointer 
-//                       corresponds one JPG component;
-//  data_type          - 0 - raw dct coefficients, 1 - raw sampled data.
-////////////////////////////////////////////////////////////////////////////
-*D*/
-typedef struct _RAW_DATA_TYPES_STATE
-{
-  int data_type;
-  unsigned short* raw_ptrs[4];
-
-} RAW_DATA_TYPES_STATE;
-
-
-/*D*
-////////////////////////////////////////////////////////////////////////////
-// Name:        ENTROPYSTRUCT
-//
-// Purpose:     Stores the decoder state information necessary to "jump"
-//              to a particular MCU row in a compressed entropy stream.
-//
-// Context:     Used to persist the decoder state within Decode_Scan when
-//              decoding using ROIs.
-//
-// Fields:
-//      offset              Offset (in bytes) into the entropy stream
-//                          from the beginning.
-//      dcval1              DC val at the beginning of the MCU row
-//                          for component 1.
-//      dcval2              DC val at the beginning of the MCU row
-//                          for component 2.
-//      dcval3              DC val at the beginning of the MCU row
-//                          for component 3.
-//      dcval4              DC val at the beginning of the MCU row
-//                          for component 4.
-//      bit_buffer_64       64-bit Huffman bit buffer.  Stores current
-//                          bit buffer at the start of a MCU row.
-//                          Also used as a 32-bit buffer on 32-bit
-//                          architectures.
-//      bitbuf_bits_valid   Number of valid bits in the above bit buffer.
-//      unread_marker       Have any markers been decoded but not
-//                          processed at the beginning of a MCU row?
-//                          This entry holds the unprocessed marker, or
-//                          0 if none.
-//
-////////////////////////////////////////////////////////////////////////////
-*D*/
-
-typedef struct _ENTROPYSTRUCT
-{
-  unsigned int   offset;
-  int            dcval1;
-  int            dcval2;
-  int            dcval3;
-  int            dcval4;
-  IJL_UINT64     bit_buffer_64;
-  int            bitbuf_bits_valid;
-  unsigned char  unread_marker;
-
-} ENTROPYSTRUCT;
-
-
-/*D*
-////////////////////////////////////////////////////////////////////////////
-// Name:        STATE
-//
-// Purpose:     Stores the active state of the IJL.
-//
-// Context:     Used by all low-level routines to store pseudo-global or
-//              state variables.
-//
-// Fields:
-//      bit_buffer_64           64-bit bitbuffer utilized by Huffman
-//                              encoder/decoder algorithms utilizing routines
-//                              designed for MMX(TM) technology.
-//      bit_buffer_32           32-bit bitbuffer for all other Huffman
-//                              encoder/decoder algorithms.
-//      bitbuf_bits_valid       Number of bits in the above two fields that
-//                              are valid.
-//
-//      cur_entropy_ptr         Current position (absolute address) in
-//                              the entropy buffer.
-//      start_entropy_ptr       Starting position (absolute address) of
-//                              the entropy buffer.
-//      end_entropy_ptr         Ending position (absolute address) of
-//                              the entropy buffer.
-//      entropy_bytes_processed Number of bytes actually processed
-//                              (passed over) in the entropy buffer.
-//      entropy_buf_maxsize     Max size of the entropy buffer.
-//      entropy_bytes_left      Number of bytes left in the entropy buffer.
-//      Prog_EndOfBlock_Run     Progressive block run counter.
-//
-//      DIB_ptr                 Temporary offset into the input/output DIB.
-//
-//      unread_marker           If a marker has been read but not processed,
-//                              stick it in this field.
-//      processor_type          (0, 1, or 2) == current processor does not
-//                              support MMX(TM) instructions.
-//                              (3 or 4) == current processor does
-//                              support MMX(TM) instructions.
-//      cur_scan_comp           On which component of the scan are we working?
-//      file                    Process file handle, or
-//                              0x00000000 if no file is defined.
-//      JPGBuffer               Entropy buffer (~4K).
-//
-//
-////////////////////////////////////////////////////////////////////////////
-*D*/
-
-typedef struct _STATE
-{
-  /* Bit buffer. */
-  IJL_UINT64     bit_buffer_64;
-  unsigned int   bit_buffer_32;
-  int            bitbuf_bits_valid;
-
-  /* Entropy. */
-  unsigned char* cur_entropy_ptr;
-  unsigned char* start_entropy_ptr;
-  unsigned char* end_entropy_ptr;
-  int            entropy_bytes_processed;
-  int            entropy_buf_maxsize;
-  int            entropy_bytes_left;
-  int            Prog_EndOfBlock_Run;
-
-  /* Input or output DIB. */
-  unsigned char* DIB_ptr;
-
-  /* Control. */
-  unsigned char  unread_marker;
-  PROCESSOR_TYPE processor_type;
-  int            cur_scan_comp;
-  IJL_HANDLE     file;
-  unsigned char  JPGBuffer [JBUFSIZE];
-
-} STATE;
-
-
-/*D*
-////////////////////////////////////////////////////////////////////////////
-// Name:        FAST_MCU_PROCESSING_TYPE
-//
-// Purpose:     Advanced Control Option.  Do NOT modify.
-//              WARNING:  Used for internal reference only.
-//
-// Fields:
-//
-//   IJL_(sampling)_(JPEG color space)_(sampling)_(DIB color space)
-//      Decode is read left to right w/ upsampling.
-//      Encode is read right to left w/ subsampling.
-//
-////////////////////////////////////////////////////////////////////////////
-*D*/
-
-typedef enum _FAST_MCU_PROCESSING_TYPE
-{
-  IJL_NO_CC_OR_US                   = 0,
-
-  IJL_111_YCBCR_111_RGB             = 1,
-  IJL_111_YCBCR_111_BGR             = 2,
-
-  IJL_411_YCBCR_111_RGB             = 3,
-  IJL_411_YCBCR_111_BGR             = 4,
-
-  IJL_422_YCBCR_111_RGB             = 5,
-  IJL_422_YCBCR_111_BGR             = 6,
-
-  IJL_111_YCBCR_1111_RGBA_FPX       = 7,
-  IJL_411_YCBCR_1111_RGBA_FPX       = 8,
-  IJL_422_YCBCR_1111_RGBA_FPX       = 9,
-
-  IJL_1111_YCBCRA_FPX_1111_RGBA_FPX = 10,
-  IJL_4114_YCBCRA_FPX_1111_RGBA_FPX = 11,
-  IJL_4224_YCBCRA_FPX_1111_RGBA_FPX = 12,
-
-  IJL_111_RGB_1111_RGBA_FPX         = 13,
-
-  IJL_1111_RGBA_FPX_1111_RGBA_FPX   = 14,
-
-  IJL_111_OTHER_111_OTHER           = 15,
-  IJL_411_OTHER_111_OTHER           = 16,
-  IJL_422_OTHER_111_OTHER           = 17,
-
-  IJL_YCBYCR_YCBCR                  = 18,
-
-  IJL_YCBCR_YCBYCR                  = 19   // decoding to YCbCr 422 format
-
-} FAST_MCU_PROCESSING_TYPE;
-
-
-/*D*
-////////////////////////////////////////////////////////////////////////////
-// Name:        JPEG_PROPERTIES
-//
-// Purpose:     Stores low-level and control information.  It is used by
-//              both the encoder and decoder.  An advanced external user
-//              may access this structure to expand the interface
-//              capability.
-//
-//              See the Developer's Guide for an expanded description
-//              of this structure and its use.
-//
-// Context:     Used by all interface methods and most IJL routines.
-//
-// Fields:
-//
-//  iotype              IN:     Specifies type of data operation
-//                              (read/write/other) to be
-//                              performed by IJL_Read or IJL_Write.
-//  roi                 IN:     Rectangle-Of-Interest to read from, or
-//                              write to, in pixels.
-//  dcttype             IN:     DCT alogrithm to be used.
-//  fast_processing     OUT:    Supported fast pre/post-processing path.
-//                              This is set by the IJL.
-//  interrupt           IN:     Signals an interrupt has been requested.
-//
-//  DIBBytes            IN:     Pointer to buffer of uncompressed data.
-//  DIBWidth            IN:     Width of uncompressed data.
-//  DIBHeight           IN:     Height of uncompressed data.
-//  DIBPadBytes         IN:     Padding (in bytes) at end of each
-//                              row in the uncompressed data.
-//  DIBChannels         IN:     Number of components in the
-//                              uncompressed data.
-//  DIBColor            IN:     Color space of uncompressed data.
-//  DIBSubsampling      IN:     Required to be IJL_NONE or IJL_422.
-//  DIBLineBytes        OUT:    Number of bytes in an output DIB line
-//                              including padding.
-//
-//  JPGFile             IN:     Pointer to file based JPEG.
-//  JPGBytes            IN:     Pointer to buffer based JPEG.
-//  JPGSizeBytes        IN:     Max buffer size. Used with JPGBytes.
-//                      OUT:    Number of compressed bytes written.
-//  JPGWidth            IN:     Width of JPEG image.
-//                      OUT:    After reading (except READHEADER).
-//  JPGHeight           IN:     Height of JPEG image.
-//                      OUT:    After reading (except READHEADER).
-//  JPGChannels         IN:     Number of components in JPEG image.
-//                      OUT:    After reading (except READHEADER).
-//  JPGColor            IN:     Color space of JPEG image.
-//  JPGSubsampling      IN:     Subsampling of JPEG image.
-//                      OUT:    After reading (except READHEADER).
-//  JPGThumbWidth       OUT:    JFIF embedded thumbnail width [0-255].
-//  JPGThumbHeight      OUT:    JFIF embedded thumbnail height [0-255].
-//
-//  cconversion_reqd    OUT:    If color conversion done on decode, TRUE.
-//  upsampling_reqd     OUT:    If upsampling done on decode, TRUE.
-//  jquality            IN:     [0-100] where highest quality is 100.
-//  jinterleaveType     IN/OUT: 0 => MCU interleaved file, and
-//                              1 => 1 scan per component.
-//  numxMCUs            OUT:    Number of MCUs in the x direction.
-//  numyMCUs            OUT:    Number of MCUs in the y direction.
-//
-//  nqtables            IN/OUT: Number of quantization tables.
-//  maxquantindex       IN/OUT: Maximum index of quantization tables.
-//  nhuffActables       IN/OUT: Number of AC Huffman tables.
-//  nhuffDctables       IN/OUT: Number of DC Huffman tables.
-//  maxhuffindex        IN/OUT: Maximum index of Huffman tables.
-//  jFmtQuant           IN/OUT: Formatted quantization table info.
-//  jFmtAcHuffman       IN/OUT: Formatted AC Huffman table info.
-//  jFmtDcHuffman       IN/OUT: Formatted DC Huffman table info.
-//
-//  jEncFmtQuant        IN/OUT: Pointer to one of the above, or
-//                              to externally persisted table.
-//  jEncFmtAcHuffman    IN/OUT: Pointer to one of the above, or
-//                              to externally persisted table.
-//  jEncFmtDcHuffman    IN/OUT: Pointer to one of the above, or
-//                              to externally persisted table.
-//
-//  use_default_qtables IN:     Set to default quantization tables.
-//                              Clear to supply your own.
-//  use_default_htables IN:     Set to default Huffman tables.
-//                              Clear to supply your own.
-//  rawquanttables      IN:     Up to 4 sets of quantization tables.
-//  rawhufftables       IN:     Alternating pairs (DC/AC) of up to 4
-//                              sets of raw Huffman tables.
-//  HuffIdentifierAC    IN:     Indicates what channel the user-
-//                              supplied Huffman AC tables apply to.
-//  HuffIdentifierDC    IN:     Indicates what channel the user-
-//                              supplied Huffman DC tables apply to.
-//
-//  jframe              OUT:    Structure with frame-specific info.
-//  needframe           OUT:    TRUE when a frame has been detected.
-//
-//  jscan               Persistence for current scan pointer when
-//                      interrupted.
-//
-//  state               OUT:    Contains info on the state of the IJL.
-//  SawAdobeMarker      OUT:    Decoder saw an APP14 marker somewhere.
-//  AdobeXform          OUT:    If SawAdobeMarker TRUE, this indicates
-//                              the JPEG color space given by that marker.
-//
-//  rowoffsets          Persistence for the decoder MCU row origins
-//                      when decoding by ROI.  Offsets (in bytes
-//                      from the beginning of the entropy data)
-//                      to the start of each of the decoded rows.
-//                      Fill the offsets with -1 if they have not
-//                      been initalized and NULL could be the
-//                      offset to the first row.
-//
-//  MCUBuf              OUT:    Quadword aligned internal buffer.
-//                              Big enough for the largest MCU
-//                              (10 blocks) with extra room for
-//                              additional operations.
-//  tMCUBuf             OUT:    Version of above, without alignment.
-//
-//  processor_type      OUT:    Determines type of processor found
-//                              during initialization.
-//
-//  raw_coefs           IN:     Place to hold pointers to raw data buffers or
-//                              raw DCT coefficients buffers
-//
-//  progressive_found   OUT:    1 when progressive image detected.
-//  coef_buffer         IN:     Pointer to a larger buffer containing
-//                              frequency coefficients when they
-//                              cannot be decoded dynamically
-//                              (i.e., as in progressive decoding).
-//
-//  upsampling_type     IN:     Type of sampling:
-//                              IJL_BOX_FILTER or IJL_TRIANGLE_FILTER.
-//  SAMPLING_STATE*    OUT:     pointer to structure, describing current
-//                              condition of upsampling
-//
-//  AdobeVersion       OUT      version field, if Adobe APP14 marker detected
-//  AdobeFlags0        OUT      flags0 field, if Adobe APP14 marker detected
-//  AdobeFlags1        OUT      flags1 field, if Adobe APP14 marker detected
-//
-//  jfif_app0_detected OUT:     1 - if JFIF APP0 marker detected,  
-//                              0 - if not
-//  jfif_app0_version  IN/OUT   The JFIF file version
-//  jfif_app0_units    IN/OUT   units for the X and Y densities
-//                              0 - no units, X and Y specify
-//                                  the pixel aspect ratio
-//                              1 - X and Y are dots per inch
-//                              2 - X and Y are dots per cm
-//  jfif_app0_Xdensity IN/OUT   horizontal pixel density
-//  jfif_app0_Ydensity IN/OUT   vertical pixel density
-//
-//  jpeg_comment       IN       pointer to JPEG comments
-//  jpeg_comment_size  IN/OUT   size of JPEG comments, in bytes
-//
-//  raw_coefs          IN/OUT   if !NULL, then pointer to vector of pointers
-//                              (size = JPGChannels) to buffers for raw (short)
-//                              dct coefficients. 1 pointer corresponds to one
-//                              component;
-//
-////////////////////////////////////////////////////////////////////////////
-*D*/
-
-typedef struct _JPEG_PROPERTIES
-{
-  /* Compression/Decompression control. */
-  IJLIOTYPE                iotype;               /* default = IJL_SETUP */
-  IJL_RECT                 roi;                  /* default = 0 */
-  DCTTYPE                  dcttype;              /* default = IJL_AAN */
-  FAST_MCU_PROCESSING_TYPE fast_processing;      /* default = IJL_NO_CC_OR_US */
-  int                      interrupt;            /* default = FALSE */
-
-  /* DIB specific I/O data specifiers. */
-  unsigned char*           DIBBytes;             /* default = NULL */
-  int                      DIBWidth;             /* default = 0 */
-  int                      DIBHeight;            /* default = 0 */
-  int                      DIBPadBytes;          /* default = 0 */
-  int                      DIBChannels;          /* default = 3 */
-  IJL_COLOR                DIBColor;             /* default = IJL_BGR */
-  IJL_DIBSUBSAMPLING       DIBSubsampling;       /* default = IJL_NONE */
-  int                      DIBLineBytes;         /* default = 0 */
-
-  /* JPEG specific I/O data specifiers. */
-  const char*              JPGFile;              /* default = NULL */
-  unsigned char*           JPGBytes;             /* default = NULL */
-  int                      JPGSizeBytes;         /* default = 0 */
-  int                      JPGWidth;             /* default = 0 */
-  int                      JPGHeight;            /* default = 0 */
-  int                      JPGChannels;          /* default = 3 */
-  IJL_COLOR                JPGColor;             /* default = IJL_YCBCR */
-  IJL_JPGSUBSAMPLING       JPGSubsampling;       /* default = IJL_411 */
-  int                      JPGThumbWidth;        /* default = 0 */
-  int                      JPGThumbHeight;       /* default = 0 */
-
-  /* JPEG conversion properties. */
-  int                      cconversion_reqd;     /* default = TRUE */
-  int                      upsampling_reqd;      /* default = TRUE */
-  int                      jquality;             /* default = 75 */
-  int                      jinterleaveType;      /* default = 0 */
-  int                      numxMCUs;             /* default = 0 */
-  int                      numyMCUs;             /* default = 0 */
-
-  /* Tables. */
-  int                      nqtables;
-  int                      maxquantindex;
-  int                      nhuffActables;
-  int                      nhuffDctables;
-  int                      maxhuffindex;
-
-  QUANT_TABLE              jFmtQuant[4];
-  HUFFMAN_TABLE            jFmtAcHuffman[4];
-  HUFFMAN_TABLE            jFmtDcHuffman[4];
-
-  short*                   jEncFmtQuant[4];
-  HUFFMAN_TABLE*           jEncFmtAcHuffman[4];
-  HUFFMAN_TABLE*           jEncFmtDcHuffman[4];
-
-  /* Allow user-defined tables. */
-  int                      use_external_qtables;
-  int                      use_external_htables;
-
-  JPEGQuantTable           rawquanttables[4];
-  JPEGHuffTable            rawhufftables[8];
-  char                     HuffIdentifierAC[4];
-  char                     HuffIdentifierDC[4];
-
-  /* Frame specific members. */
-  FRAME                    jframe;
-  int                      needframe;
-
-  /* SCAN persistent members. */
-  SCAN*                    jscan;
-
-  /* State members. */
-  STATE                    state;
-  int                      SawAdobeMarker;
-  int                      AdobeXform;
-
-  /* ROI decoder members. */
-  ENTROPYSTRUCT*           rowoffsets;
-
-  /* Intermediate buffers. */
-  unsigned char*           MCUBuf;
-  unsigned char            tMCUBuf[720*2];
-
-  /* Processor detected. */
-  PROCESSOR_TYPE           processor_type;
-
-  RAW_DATA_TYPES_STATE*    raw_coefs;
-
-  /* Progressive mode members. */
-  int                      progressive_found;
-  short*                   coef_buffer;
-
-  /* Upsampling mode members. */
-  UPSAMPLING_TYPE          upsampling_type;
-  SAMPLING_STATE*          sampling_state_ptr;
-
-  /* Adobe APP14 segment variables */
-  unsigned short           AdobeVersion;         /* default = 100 */
-  unsigned short           AdobeFlags0;          /* default = 0 */
-  unsigned short           AdobeFlags1;          /* default = 0 */
-
-  /* JFIF APP0 segment variables */
-  int                      jfif_app0_detected;
-  unsigned short           jfif_app0_version;    /* default = 0x0101 */
-  unsigned char            jfif_app0_units;      /* default = 0 - pixel */
-  unsigned short           jfif_app0_Xdensity;   /* default = 1 */
-  unsigned short           jfif_app0_Ydensity;   /* default = 1 */
-
-  /* comments related fields */
-  char*                    jpeg_comment;         /* default = NULL */
-  unsigned short           jpeg_comment_size;    /* default = 0 */
-
-} JPEG_PROPERTIES;
-
-
-/*D*
-////////////////////////////////////////////////////////////////////////////
-// Name:        JPEG_CORE_PROPERTIES
-//
-// Purpose:     This is the primary data structure between the IJL and
-//              the external user.  It stores JPEG state information
-//              and controls the IJL.  It is user-modifiable.
-//
-//              See the Developer's Guide for details on appropriate usage.
-//
-// Context:     Used by all low-level IJL routines to store
-//              pseudo-global information.
-//
-// Fields:
-//
-//  UseJPEGPROPERTIES   Set this flag != 0 if you wish to override
-//                      the JPEG_CORE_PROPERTIES "IN" parameters with
-//                      the JPEG_PROPERTIES parameters.
-//
-//  DIBBytes            IN:     Pointer to buffer of uncompressed data.
-//  DIBWidth            IN:     Width of uncompressed data.
-//  DIBHeight           IN:     Height of uncompressed data.
-//  DIBPadBytes         IN:     Padding (in bytes) at end of each
-//                              row in the uncompressed data.
-//  DIBChannels         IN:     Number of components in the
-//                              uncompressed data.
-//  DIBColor            IN:     Color space of uncompressed data.
-//  DIBSubsampling      IN:     Required to be IJL_NONE or IJL_422.
-//
-//  JPGFile             IN:     Pointer to file based JPEG.
-//  JPGBytes            IN:     Pointer to buffer based JPEG.
-//  JPGSizeBytes        IN:     Max buffer size. Used with JPGBytes.
-//                      OUT:    Number of compressed bytes written.
-//  JPGWidth            IN:     Width of JPEG image.
-//                      OUT:    After reading (except READHEADER).
-//  JPGHeight           IN:     Height of JPEG image.
-//                      OUT:    After reading (except READHEADER).
-//  JPGChannels         IN:     Number of components in JPEG image.
-//                      OUT:    After reading (except READHEADER).
-//  JPGColor            IN:     Color space of JPEG image.
-//  JPGSubsampling      IN:     Subsampling of JPEG image.
-//                      OUT:    After reading (except READHEADER).
-//  JPGThumbWidth       OUT:    JFIF embedded thumbnail width [0-255].
-//  JPGThumbHeight      OUT:    JFIF embedded thumbnail height [0-255].
-//
-//  cconversion_reqd    OUT:    If color conversion done on decode, TRUE.
-//  upsampling_reqd     OUT:    If upsampling done on decode, TRUE.
-//  jquality            IN:     [0-100] where highest quality is 100.
-//
-//  jprops              "Low-Level" IJL data structure.
-//
-////////////////////////////////////////////////////////////////////////////
-*D*/
-
-typedef struct _JPEG_CORE_PROPERTIES
-{
-  int                UseJPEGPROPERTIES;         /* default = 0 */
-
-  /* DIB specific I/O data specifiers. */
-  unsigned char*     DIBBytes;                  /* default = NULL */
-  int                DIBWidth;                  /* default = 0 */
-  int                DIBHeight;                 /* default = 0 */
-  int                DIBPadBytes;               /* default = 0 */
-  int                DIBChannels;               /* default = 3 */
-  IJL_COLOR          DIBColor;                  /* default = IJL_BGR */
-  IJL_DIBSUBSAMPLING DIBSubsampling;            /* default = IJL_NONE */
-
-  /* JPEG specific I/O data specifiers. */
-  const char*        JPGFile;                   /* default = NULL */
-  unsigned char*     JPGBytes;                  /* default = NULL */
-  int                JPGSizeBytes;              /* default = 0 */
-  int                JPGWidth;                  /* default = 0 */
-  int                JPGHeight;                 /* default = 0 */
-  int                JPGChannels;               /* default = 3 */
-  IJL_COLOR          JPGColor;                  /* default = IJL_YCBCR */
-  IJL_JPGSUBSAMPLING JPGSubsampling;            /* default = IJL_411 */
-  int                JPGThumbWidth;             /* default = 0 */
-  int                JPGThumbHeight;            /* default = 0 */
-
-  /* JPEG conversion properties. */
-  int                cconversion_reqd;          /* default = TRUE */
-  int                upsampling_reqd;           /* default = TRUE */
-  int                jquality;                  /* default = 75 */
-
-  /* Low-level properties. */
-  JPEG_PROPERTIES    jprops;
-
-} JPEG_CORE_PROPERTIES;
-
-
-/*D*
-////////////////////////////////////////////////////////////////////////////
-// Name:        IJLERR
-//
-// Purpose:     Listing of possible "error" codes returned by the IJL.
-//
-//              See the Developer's Guide for details on appropriate usage.
-//
-// Context:     Used for error checking.
-//
-////////////////////////////////////////////////////////////////////////////
-*D*/
-
-typedef enum _IJLERR
-{
-  /* The following "error" values indicate an "OK" condition. */
-  IJL_OK                          = 0,
-  IJL_INTERRUPT_OK                = 1,
-  IJL_ROI_OK                      = 2,
-
-  /* The following "error" values indicate an error has occurred. */
-  IJL_EXCEPTION_DETECTED          =  -1,
-  IJL_INVALID_ENCODER             =  -2,
-  IJL_UNSUPPORTED_SUBSAMPLING     =  -3,
-  IJL_UNSUPPORTED_BYTES_PER_PIXEL =  -4,
-  IJL_MEMORY_ERROR                =  -5,
-  IJL_BAD_HUFFMAN_TABLE           =  -6,
-  IJL_BAD_QUANT_TABLE             =  -7,
-  IJL_INVALID_JPEG_PROPERTIES     =  -8,
-  IJL_ERR_FILECLOSE               =  -9,
-  IJL_INVALID_FILENAME            = -10,
-  IJL_ERROR_EOF                   = -11,
-  IJL_PROG_NOT_SUPPORTED          = -12,
-  IJL_ERR_NOT_JPEG                = -13,
-  IJL_ERR_COMP                    = -14,
-  IJL_ERR_SOF                     = -15,
-  IJL_ERR_DNL                     = -16,
-  IJL_ERR_NO_HUF                  = -17,
-  IJL_ERR_NO_QUAN                 = -18,
-  IJL_ERR_NO_FRAME                = -19,
-  IJL_ERR_MULT_FRAME              = -20,
-  IJL_ERR_DATA                    = -21,
-  IJL_ERR_NO_IMAGE                = -22,
-  IJL_FILE_ERROR                  = -23,
-  IJL_INTERNAL_ERROR              = -24,
-  IJL_BAD_RST_MARKER              = -25,
-  IJL_THUMBNAIL_DIB_TOO_SMALL     = -26,
-  IJL_THUMBNAIL_DIB_WRONG_COLOR   = -27,
-  IJL_BUFFER_TOO_SMALL            = -28,
-  IJL_UNSUPPORTED_FRAME           = -29,
-  IJL_ERR_COM_BUFFER              = -30,
-  IJL_RESERVED                    = -99
-
-} IJLERR;
-
-
-
-
-/* /////////////////////////////////////////////////////////////////////////
-//                     Function Prototypes (API Calls)                    //
-///////////////////////////////////////////////////////////////////////// */
-
-
-/*F*
-////////////////////////////////////////////////////////////////////////////
-// Name:        ijlInit
-//
-// Purpose:     Used to initalize the IJL.
-//
-//              See the Developer's Guide for details on appropriate usage.
-//
-// Context:     Always call this before anything else.
-//              Also, only call this with a new jcprops structure, or
-//              after calling IJL_Free.  Otherwise, dynamically
-//              allocated memory may be leaked.
-//
-// Returns:     Any IJLERR value.  IJL_OK indicates success.
-//
-// Parameters:
-//  jcprops     Pointer to an externally allocated
-//              JPEG_CORE_PROPERTIES structure.
-//
-////////////////////////////////////////////////////////////////////////////
-*F*/
-
-IJLAPI(IJLERR, ijlInit, ( JPEG_CORE_PROPERTIES* jcprops ));
-
-
-/*F*
-////////////////////////////////////////////////////////////////////////////
-// Name:        ijlFree
-//
-// Purpose:     Used to properly close down the IJL.
-//
-//              See the Developer's Guide for details on appropriate usage.
-//
-// Context:     Always call this when done using the IJL to perform
-//              clean-up of dynamically allocated memory.
-//              Note, IJL_Init will have to be called to use the
-//              IJL again.
-//
-// Returns:     Any IJLERR value.  IJL_OK indicates success.
-//
-// Parameters:
-//  jcprops     Pointer to an externally allocated
-//              JPEG_CORE_PROPERTIES structure.
-//
-////////////////////////////////////////////////////////////////////////////
-*F*/
-
-IJLAPI(IJLERR, ijlFree, ( JPEG_CORE_PROPERTIES* jcprops ));
-
-
-/*F*
-////////////////////////////////////////////////////////////////////////////
-// Name:        IJL_Read
-//
-// Purpose:     Used to read JPEG data (entropy, or header, or both) into
-//              a user-supplied buffer (to hold the image data) and/or
-//              into the JPEG_CORE_PROPERTIES structure (to hold the
-//              header info).
-//
-// Context:     See the Developer's Guide for a detailed description
-//              on the use of this function.  The jcprops main data
-//              members are checked for consistency.
-//
-// Returns:     Any IJLERR value.  IJL_OK indicates success.
-//
-// Parameters:
-//  jcprops     Pointer to an externally allocated
-//              JPEG_CORE_PROPERTIES structure.
-//  iotype      Specifies what type of read operation to perform.
-//
-////////////////////////////////////////////////////////////////////////////
-*F*/
-
-IJLAPI(IJLERR, ijlRead, ( JPEG_CORE_PROPERTIES* jcprops, IJLIOTYPE iotype ));
-
-
-/*F*
-////////////////////////////////////////////////////////////////////////////
-// Name:        ijlWrite
-//
-// Purpose:     Used to write JPEG data (entropy, or header, or both) into
-//              a user-supplied buffer (to hold the image data) and/or
-//              into the JPEG_CORE_PROPERTIES structure (to hold the
-//              header info).
-//
-// Context:     See the Developer's Guide for a detailed description
-//              on the use of this function.  The jcprops main data
-//              members are checked for consistency.
-//
-// Returns:     Any IJLERR value.  IJL_OK indicates success.
-//
-// Parameters:
-//  jcprops     Pointer to an externally allocated
-//              JPEG_CORE_PROPERTIES structure.
-//  iotype      Specifies what type of write operation to perform.
-//
-////////////////////////////////////////////////////////////////////////////
-*F*/
-
-IJLAPI(IJLERR, ijlWrite, ( JPEG_CORE_PROPERTIES* jcprops, IJLIOTYPE iotype ));
-
-
-/*F*
-////////////////////////////////////////////////////////////////////////////
-// Name:        ijlGetLibVersion
-//
-// Purpose:     To identify the version number of the IJL.
-//
-// Context:     Call to get the IJL version number.
-//
-// Returns:     pointer to IJLibVersion struct
-//
-// Parameters:  none
-//
-////////////////////////////////////////////////////////////////////////////
-*F*/
-
-IJLAPI(const IJLibVersion*, ijlGetLibVersion, (void));
-
-
-/*F*
-////////////////////////////////////////////////////////////////////////////
-// Name:        ijlErrorStr
-//
-// Purpose:     Gets the string to describe error code.
-//
-// Context:     Is called to get descriptive string on arbitrary IJLERR code.
-//
-// Returns:     pointer to string
-//
-// Parameters:  IJLERR - IJL error code
-//
-////////////////////////////////////////////////////////////////////////////
-*F*/
-
-IJLAPI(const char*, ijlErrorStr, (IJLERR code));
-
-
-
-
-#if defined( __cplusplus )
-}
-#endif
-
-#endif  /* __IJL_H__ */
diff --git a/src/terralib/kernel/jpeg.cpp b/src/terralib/kernel/jpeg.cpp
deleted file mode 100644
index e183bfe..0000000
--- a/src/terralib/kernel/jpeg.cpp
+++ /dev/null
@@ -1,452 +0,0 @@
-//** JPEG.CPP, the code used to wrap IJL
-
-
-//############################################################################
-//##                                                                        ##
-//##  JPEG.CPP                                                                 ##
-//##                                                                        ##
-//##  Wrapper class to load a jpeg from a block of memory.                  ##
-//##                                                                        ##
-//##  OpenSourced 2/4/2000 by John W. Ratcliff                                ##
-//##                                                                        ##
-//##  No warranty expressed or implied.  Released as part of the triangle   ##
-//##  throughput testbed project.                                           ##
-//############################################################################
-//##                                                                        ##
-//##  Contact John W. Ratcliff at jratcliff at verant.com                      ##
-//############################################################################
-#include "jpeg.h"
-#include "ijl.h" // intel jpeg library header file.
-
-// read image parameters.
-bool  Jpeg::ReadFileParams(int &width,
-                       int &height,
-                       int &nchannels,
-                       char *name)
-{
-  JPEG_CORE_PROPERTIES jcprops;
-
-  if ( ijlInit(&jcprops) != IJL_OK )
-  {
-    ijlFree(&jcprops);
-    return false;
-  }
-
-  jcprops.JPGFile = name;
-
-  if ( ijlRead(&jcprops,IJL_JFILE_READPARAMS) != IJL_OK )
-  {
-    ijlFree(&jcprops);
-    return false;
-  }
-
-  width  = jcprops.JPGWidth;
-  height = jcprops.JPGHeight;
-  nchannels = jcprops.JPGChannels;
-  return true;
-}
-
-// read image file into this buffer.
-bool Jpeg::ReadFile(int width,
-                       int height,
-                       int nchannels,
-                       char *name,
-					   unsigned char *pixbuff)
-{
-  JPEG_CORE_PROPERTIES jcprops;
-
-  if ( ijlInit(&jcprops) != IJL_OK )
-  {
-    ijlFree(&jcprops);
-    return false;
-  }
-
-  jcprops.JPGFile = name;
-
-  IJLIOTYPE mode;
-
-  mode = IJL_JFILE_READWHOLEIMAGE;
-
-  jcprops.DIBWidth  = width;
-  jcprops.DIBHeight = height;
-  jcprops.JPGWidth  = width;
-  jcprops.JPGHeight = height;
-  jcprops.DIBChannels = nchannels;
-  jcprops.JPGChannels = nchannels;
-
-  jcprops.DIBPadBytes = 0;
-  jcprops.DIBBytes = (unsigned char *)pixbuff;
-
-  if ( jcprops.JPGChannels == 3 )
-  {
-    jcprops.DIBColor = IJL_RGB;
-    jcprops.JPGColor = IJL_YCBCR;
-    jcprops.JPGSubsampling = IJL_411;
-    jcprops.DIBSubsampling = (IJL_DIBSUBSAMPLING) 0;
-  }
-  else
-  {
-    jcprops.DIBColor = IJL_G;
-    jcprops.JPGColor = IJL_G;
-    jcprops.JPGSubsampling = (IJL_JPGSUBSAMPLING) 0;
-    jcprops.DIBSubsampling = (IJL_DIBSUBSAMPLING) 0;
-  }
-
-  if ( ijlRead(&jcprops, mode) != IJL_OK )
-  {
-    ijlFree(&jcprops);
-    return false;
-  }
-
-  if ( ijlFree(&jcprops) != IJL_OK ) return false;
-
-  return true;
-}
-
-// read image into this buffer.
-void * Jpeg::ReadImage(int &width,
-                       int &height,
-                       int &nchannels,
-                       const void *buffer,
-                       int sizebytes)
-{
-  JPEG_CORE_PROPERTIES jcprops;
-
-   _IJLERR res;
-
-  res = ijlInit(&jcprops);
-  if ( res != IJL_OK )
-  {
-    ijlFree(&jcprops);
-    return 0;
-  }
-
-  jcprops.JPGBytes = (unsigned char *) buffer;
-  jcprops.JPGSizeBytes = sizebytes;
-  jcprops.jquality = 100;
-
-  res = ijlRead(&jcprops,IJL_JBUFF_READPARAMS);
-  if ( res != IJL_OK )
-  {
-    ijlFree(&jcprops);
-    return 0;
-  }
-
-  width  = jcprops.JPGWidth;
-  height = jcprops.JPGHeight;
-  IJLIOTYPE mode;
-
-  mode = IJL_JBUFF_READWHOLEIMAGE;
-  nchannels = jcprops.JPGChannels;
-  unsigned char * pixbuff = new unsigned char[width*height*nchannels];
-  if ( !pixbuff )
-  {
-    ijlFree(&jcprops);
-    return 0;
-  }
-
-  jcprops.DIBWidth  = width;
-  jcprops.DIBHeight = height;
-  jcprops.DIBChannels = nchannels;
-  jcprops.DIBPadBytes = 0;
-  jcprops.DIBBytes = (unsigned char *)pixbuff;
-
-  if ( jcprops.JPGChannels == 3 )
-  {
-    jcprops.DIBColor = IJL_RGB;
-    jcprops.JPGColor = IJL_YCBCR;
-    jcprops.JPGSubsampling = IJL_411;
-    jcprops.DIBSubsampling = (IJL_DIBSUBSAMPLING) 0;
-  }
-  else
-  {
-    jcprops.DIBColor = IJL_G;
-    jcprops.JPGColor = IJL_G;
-    jcprops.JPGSubsampling = (IJL_JPGSUBSAMPLING) 0;
-    jcprops.DIBSubsampling = (IJL_DIBSUBSAMPLING) 0;
-  }
-
-  
-  res = ijlRead(&jcprops, mode);
-  if (res != IJL_OK )
-  {
-	const char* desc = ijlErrorStr(res);
-    ijlFree(&jcprops);
-    return 0;
-  }
-
-  if ( ijlFree(&jcprops) != IJL_OK ) return 0;
-
-  return (void *)pixbuff;
-}
-
-
-void* Jpeg::Compress(const void *source,
-                      int width,
-                      int height,
-                      int bpp,
-                      int &len,
-                      int quality)
-{
-  JPEG_CORE_PROPERTIES jcprops;
-
-  if ( ijlInit(&jcprops) != IJL_OK )
-  {
-    ijlFree(&jcprops);
-    return 0;
-  }
-
-  jcprops.DIBWidth    = width;
-  jcprops.DIBHeight   = height;
-  jcprops.JPGWidth    = width;
-  jcprops.JPGHeight   = height;
-  jcprops.DIBBytes    = (unsigned char *) source;
-  jcprops.DIBPadBytes = 0;
-  jcprops.DIBChannels = bpp;
-  jcprops.JPGChannels = bpp;
-
-  if ( bpp == 3 )
-  {
-    jcprops.DIBColor = IJL_RGB;
-    jcprops.JPGColor = IJL_YCBCR;
-    jcprops.JPGSubsampling = IJL_411;
-    jcprops.DIBSubsampling = (IJL_DIBSUBSAMPLING) 0;
-  }
-  else
-  {
-    jcprops.DIBColor = IJL_G;
-    jcprops.JPGColor = IJL_G;
-    jcprops.JPGSubsampling = (IJL_JPGSUBSAMPLING) 0;
-    jcprops.DIBSubsampling = (IJL_DIBSUBSAMPLING) 0;
-  }
-
-  int size = width*height*bpp;
-
-  unsigned char * buffer = new unsigned char[size];
-
-  jcprops.JPGSizeBytes = size;
-  jcprops.JPGBytes     = buffer;
-
-  jcprops.jquality = quality;
-
-
-  if ( ijlWrite(&jcprops,IJL_JBUFF_WRITEWHOLEIMAGE) != IJL_OK )
-  {
-    ijlFree(&jcprops);
-    delete buffer;
-    return 0;
-  }
-
-
-  if ( ijlFree(&jcprops) != IJL_OK )
-  {
-    delete buffer;
-    return 0;
-  }
-
-  len = jcprops.JPGSizeBytes;
-  return buffer;
-}
-
-bool Jpeg::WriteFile(const void *source,
-                      int width,
-                      int height,
-                      int bpp,
-                       char *name,
-                      int quality)
-{
-  JPEG_CORE_PROPERTIES jcprops;
-
-  if ( ijlInit(&jcprops) != IJL_OK )
-  {
-    ijlFree(&jcprops);
-    return false;
-  }
-
-  jcprops.JPGFile     = name;
-  jcprops.DIBWidth    = width;
-  jcprops.DIBHeight   = height;
-  jcprops.JPGWidth    = width;
-  jcprops.JPGHeight   = height;
-  jcprops.DIBBytes    = (unsigned char *) source;
-  jcprops.DIBPadBytes = 0;
-  jcprops.DIBChannels = bpp;
-  jcprops.JPGChannels = bpp;
-
-  if ( bpp == 3 )
-  {
-    jcprops.DIBColor = IJL_RGB;
-    jcprops.JPGColor = IJL_YCBCR;
-    jcprops.JPGSubsampling = IJL_411;
-    jcprops.DIBSubsampling = (IJL_DIBSUBSAMPLING) 0;
-  }
-  else
-  {
-    jcprops.DIBColor = IJL_G;
-    jcprops.JPGColor = IJL_G;
-    jcprops.JPGSubsampling = (IJL_JPGSUBSAMPLING) 0;
-    jcprops.DIBSubsampling = (IJL_DIBSUBSAMPLING) 0;
-  }
-
-  jcprops.jquality = quality;
-  
-  IJLERR error;
-  error = ijlWrite(&jcprops,IJL_JFILE_WRITEWHOLEIMAGE);
-  if ( error != IJL_OK )
-  {
-    ijlFree(&jcprops);
-    return false;
-  }
-
-
-  if ( ijlFree(&jcprops) != IJL_OK )
-    return false;
-
-  return true;
-}
-
-bool Jpeg::Compress(const void *source,
-					  unsigned char *dest,
-                      int width,
-                      int height,
-                      int bpp,
-                      unsigned long &len,
-                      int quality)
-{
- 
-  if (!source || ! dest)
-	  return false;
-
-  JPEG_CORE_PROPERTIES jcprops;
-
-  if ( ijlInit(&jcprops) != IJL_OK )
-  {
-    ijlFree(&jcprops);
-    return false;
-  }
-
-  jcprops.DIBWidth    = width;
-  jcprops.DIBHeight   = height;
-  jcprops.JPGWidth    = width;
-  jcprops.JPGHeight   = height;
-  jcprops.DIBBytes    = (unsigned char *) source;
-  jcprops.DIBPadBytes = 0;
-  jcprops.DIBChannels = bpp;
-  jcprops.JPGChannels = bpp;
-
-  if ( bpp == 3 )
-  {
-    jcprops.DIBColor = IJL_RGB;
-    jcprops.JPGColor = IJL_YCBCR;
-    jcprops.JPGSubsampling = IJL_411;
-    jcprops.DIBSubsampling = (IJL_DIBSUBSAMPLING) 0;
-  }
-  else
-  {
-    jcprops.DIBColor = IJL_G;
-    jcprops.JPGColor = IJL_G;
-    jcprops.JPGSubsampling = (IJL_JPGSUBSAMPLING) 0;
-    jcprops.DIBSubsampling = (IJL_DIBSUBSAMPLING) 0;
-  }
-
-  int size = width*height*bpp;
-
-  jcprops.JPGSizeBytes = size;
-  jcprops.JPGBytes     = dest;
-
-  jcprops.jquality = quality;
-
-
-  if ( ijlWrite(&jcprops,IJL_JBUFF_WRITEWHOLEIMAGE) != IJL_OK )
-  {
-    ijlFree(&jcprops);
-    return false;
-  }
-
-
-  if ( ijlFree(&jcprops) != IJL_OK )
-  {
-    return false;
-  }
-
-  len = jcprops.JPGSizeBytes;
-  return true;
-}
-
-
-
-// read image into this buffer.
-bool Jpeg::ReadImage(int &width,
-                       int &height,
-                       int &nchannels,
-                       const void *buffer,
-                       long sizebytes,
-					   unsigned char* dest)
-{
-  
-	if (!dest || !buffer)
-		return false;
-
-	JPEG_CORE_PROPERTIES jcprops;
-
-   _IJLERR res;
-
-  res = ijlInit(&jcprops);
-  if ( res != IJL_OK )
-  {
-    ijlFree(&jcprops);
-    return 0;
-  }
-
-  jcprops.JPGBytes = (unsigned char *) buffer;
-  jcprops.JPGSizeBytes = sizebytes;
-  jcprops.jquality = 100;
-
-  res = ijlRead(&jcprops,IJL_JBUFF_READPARAMS);
-  if ( res != IJL_OK )
-  {
-    ijlFree(&jcprops);
-    return 0;
-  }
-
-  width  = jcprops.JPGWidth;
-  height = jcprops.JPGHeight;
-  IJLIOTYPE mode;
-
-  mode = IJL_JBUFF_READWHOLEIMAGE;
-  nchannels = jcprops.JPGChannels;
-
-  jcprops.DIBWidth  = width;
-  jcprops.DIBHeight = height;
-  jcprops.DIBChannels = nchannels;
-  jcprops.DIBPadBytes = 0;
-  jcprops.DIBBytes = (unsigned char *)dest;
-
-  if ( jcprops.JPGChannels == 3 )
-  {
-    jcprops.DIBColor = IJL_RGB;
-    jcprops.JPGColor = IJL_YCBCR;
-    jcprops.JPGSubsampling = IJL_411;
-    jcprops.DIBSubsampling = (IJL_DIBSUBSAMPLING) 0;
-  }
-  else
-  {
-    jcprops.DIBColor = IJL_G;
-    jcprops.JPGColor = IJL_G;
-    jcprops.JPGSubsampling = (IJL_JPGSUBSAMPLING) 0;
-    jcprops.DIBSubsampling = (IJL_DIBSUBSAMPLING) 0;
-  }
-
-  
-  res = ijlRead(&jcprops, mode);
-  if (res != IJL_OK )
-  {
-    ijlFree(&jcprops);
-    return 0;
-  }
-
-  if ( ijlFree(&jcprops) != IJL_OK ) return 0;
-
-  return true;
-}
-
diff --git a/src/terralib/kernel/jpeg.h b/src/terralib/kernel/jpeg.h
deleted file mode 100644
index e0ac8f7..0000000
--- a/src/terralib/kernel/jpeg.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/*Intel Corporation has released a number of extremely useful libraries and tools as part
-of their performance suite.  These tools are designed to assist developers in taking
-advantage of their advanced processors.
-
-One excellent tool is the Intel Jpeg Library which provides a single small DLL which
-will rapidly compress and decompress Jpeg images, a common graphics file format.
-
-The following code snippet provides a static wrapper class for this library.  The 
-only thing you need besides this code snippet is IJL.H, IJL.LIB, IJL.DLL which can
-be found at the following URL.
-
-
-http://www-cs.intel.com/support/performancetools/libraries/ijl/index.htm
-
-When you see the quantity of code required just to compress or decompress a JPEG image
-using IJL I think you will see the value of the following simplified wrapper layer.
-
-John W. Ratcliff
-jratcliff at verant.com
-*/
-//*** The JPEG.H wrapper layer header file.
-
-#ifndef JPEG_H
-#define JPEG_H
-
-//############################################################################
-//##                                                                        ##
-//##  JPEG.H                                                                ##
-//##                                                                        ##
-//##  Wrapper class to compress or decompress a jpeg from a block of memory ##
-//##  using the Intel Jpeg Library.                                         ##
-//##  OpenSourced 2/4/2000 by John W. Ratcliff                              ##
-//##                                                                        ##
-//##  No warranty expressed or implied.  Released as part of the triangle   ##
-//##  throughput testbed project.                                           ##
-//############################################################################
-//##                                                                        ##
-//##  Contact John W. Ratcliff at jratcliff at verant.com                      ##
-//############################################################################
-
-class Jpeg
-{
-public:
-
-  static bool  ReadFileParams(int &width,
-						int &height,
-						int &nchannels,
-						char *name);
-
-  static bool  ReadFile(int width,
-						int height,
-						int nchannels,
-						char *name,
-						unsigned char *pixbuff);
-
-  static void *ReadImage(int &width,   // width of the image loaded.
-                         int &height,  // height of the image loaded.
-                         int &bpp,     // BYTES (not bits) PER PIXEL.
-                         const void *buffer, // memory address containing jpeg compressed data.
-                         int sizebytes); // size of jpeg compressed data.
-
-
-  static void * Compress(const void *buffer, // address of image in memory
-                         int width, // width of image in pixels
-                         int height, // height of image in pixels.
-                         int bpp, // *BYTES* per pixel of image 1 or 3
-                         int &len, // returns length of compressed data
-                         int quality=75); // image quality as a percentage
-
-  static bool  WriteFile(const void *buffer, // address of image in memory
-                         int width, // width of image in pixels
-                         int height, // height of image in pixels.
-                         int bpp, // *BYTES* per pixel of image 1 or 3
-						 char *name,
-                         int quality=75); // image quality as a percentage
-
-  static bool Compress(const void *source,  // address of image in memory
-					  unsigned char *dest,  // buffer to hold the compressed image
-                      int width, // width of image in pixels
-                      int height, // height of image in pixels
-                      int bpp, // *BYTES* per pixel of image 1 or 3
-                      unsigned long &len, // returns length of compressed data
-                      int quality=75); // image quality as a percentage
-
-  static bool ReadImage(int &width,   // width of the image loaded.
-                         int &height,  // height of the image loaded.
-                         int &bpp,     // BYTES (not bits) PER PIXEL.
-                         const void *buffer, // memory address containing jpeg compressed data.
-                         long sizebytes,   // size of jpeg compressed data.
-   					     unsigned char* dest); // buffer to hold the uncompressed image
-
-};
-
-#endif
-
diff --git a/src/terralib/kernel/lexTemporal.cpp b/src/terralib/kernel/lexTemporal.cpp
old mode 100644
new mode 100755
index 4791b83..be24237
--- a/src/terralib/kernel/lexTemporal.cpp
+++ b/src/terralib/kernel/lexTemporal.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -24,7 +24,7 @@ of this library and its documentation.
 /* A lexical scanner generated by flex */
 
 /* Scanner skeleton version:
- * $Header: /home/terralib/src/terralib/kernel/lexTemporal.cpp,v 1.5 2004/11/12 18:32:46 juan Exp $
+ * $Header: /home/terralib/src/terralib/kernel/lexTemporal.cpp,v 1.9 2009/01/21 13:00:00 enivaldo Exp $
  */
 
 #define FLEX_SCANNER
@@ -627,7 +627,7 @@ char *yytext;
 #include <yyTemporal.h>
 
 extern const char *myinputptr;	/* current position in myinput */
-extern int myinputlim;		/* end of data */
+extern long  myinputlim;		/* end of data */
 
 int   lineno;
 char lexOut[1000];
@@ -650,7 +650,8 @@ void initLexOut()
 int my_yyinput(char* buf, int max_size)
 {
 	int n = max_size;
-	int s = myinputlim - (int)myinputptr;
+//	int s = myinputlim - (int)myinputptr;
+	long s = myinputlim - (long)myinputptr;
 	if(max_size>s)
 		n = s;
 		
@@ -995,7 +996,9 @@ YY_RULE_SETUP
 case 31:
 YY_RULE_SETUP
 {
+#if TePLATFORM != TePLATFORMCODE_AIX
 		int	yyinput();
+#endif
 		unsigned char c1=0,c2=yyinput();
 		while (1)
 		{
@@ -1010,7 +1013,9 @@ YY_RULE_SETUP
 case 32:
 YY_RULE_SETUP
 {
+#if TePLATFORM != TePLATFORMCODE_AIX
 		int	yyinput();
+#endif
 		unsigned char c1=yyinput();
 		while (1)
 		{
diff --git a/src/terralib/kernel/showseq.h b/src/terralib/kernel/showseq.h
old mode 100644
new mode 100755
diff --git a/src/terralib/kernel/yyTemporal.cpp b/src/terralib/kernel/yyTemporal.cpp
old mode 100644
new mode 100755
index 83bb961..af50c96
--- a/src/terralib/kernel/yyTemporal.cpp
+++ b/src/terralib/kernel/yyTemporal.cpp
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -57,7 +57,7 @@ string aux;
 
 const char*	myinputptr;
 string  myinputptr_aux;
-int myinputlim;	
+long myinputlim;	
 
 TeDatabase* database_;
 
@@ -74,7 +74,7 @@ int initParse(const string& strIn, TeDatabase* db)
 	myinputptr_aux = strIn;
 	myinputptr = myinputptr_aux.c_str();
 	
-	myinputlim = (int)myinputptr + strIn.size ();	
+	myinputlim = (long)myinputptr + strIn.size ();	
 	database_ = db;
 	return 1;
 }
diff --git a/src/terralib/kernel/yyTemporal.h b/src/terralib/kernel/yyTemporal.h
old mode 100644
new mode 100755
index 0077010..d0ee19e
--- a/src/terralib/kernel/yyTemporal.h
+++ b/src/terralib/kernel/yyTemporal.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
diff --git a/src/terralib/stat/TeBayesFunctions.cpp b/src/terralib/stat/TeBayesFunctions.cpp
old mode 100644
new mode 100755
index ff10c67..efccbf5
--- a/src/terralib/stat/TeBayesFunctions.cpp
+++ b/src/terralib/stat/TeBayesFunctions.cpp
@@ -1,8 +1,4 @@
 #include "TeBayesFunctions.h"
-#include "TeStatDataStructures.h"
-#include "TeProxMatrixConstructionStrategy.h"
-#include "TeGeneralizedProxMatrix.h"
-#include "TeSTElementSet.h"
 
 // TeGlobalEmpiricalBayes				// Function declaration
 bool TeGlobalEmpiricalBayes(TeSTStatInstanceSet *rs, double rate)
@@ -55,23 +51,23 @@ bool TeGlobalEmpiricalBayes(TeSTStatInstanceSet *rs, double rate)
 		it = rs->begin();
 		aux = s2 - (m_hat/n_);
 	
-		if(aux<0)
+		if(aux<=0)
 		{
-			(*it).setDoubleProperty(2,m_hat);
-			++it;
-		}
-		else
+            aux = 0;
+        }
+
+		double Theta_i, Ci, pop, cases;
+		while(it != rs->end())
 		{
- 			double Theta_i, Ci, pop, cases;
-			while(it != rs->end())
-			{
-				(*it).getDoubleProperty(0,pop);
-				(*it).getDoubleProperty(1,cases);
-				Ci = (aux)/(aux + (m_hat/pop));
-				Theta_i = Ci*(cases/pop) + (1-Ci)*m_hat;
-				(*it).setDoubleProperty(2,Theta_i*rate);
-				++it;
-			}
+			(*it).getDoubleProperty(0,pop);
+			(*it).getDoubleProperty(1,cases);
+			if ((aux == 0) && (m_hat == 0))
+                Ci = 1;
+            else 
+			    Ci = (aux)/(aux + (m_hat/pop));
+			Theta_i = Ci*(cases/pop) + (1-Ci)*m_hat;
+			(*it).setDoubleProperty(2,Theta_i*rate);
+			++it;
 		}
 
 	}catch(TeGlobalBayesException e)
@@ -91,142 +87,4 @@ bool TeGlobalEmpiricalBayes(TeSTStatInstanceSet *rs, double rate)
 
 
 
-/* Taxa Bayesiana Local -- recebe conjunto de areas, cria matriz de vizinhanca,
-   e estima taxa local baseado na vizinhanca.
-
-   As duas primeiras propriedades das areas sao populacao e casos.
-   Ha mais duas propriedades double onde serao armazenados total de casos e total
-   de populacao dos vizinhos.
-
-  teta[i]=w[i]*r[i]+(1-w[i])*c[i]
-  w[i]=V/(V+r[i]))
-  V=Sum(Area i,Pop[i]*(ri-m)^2)/Sum(Area i,Pop[i])-m/PopMedia
-*/
-// TeGlobalEmpiricalBayes				// Function declaration
-bool TeLocalEmpiricalBayes(TeSTElementSet *rs, string& colname, double /*rate*/)
-{
-
-
-  //Monta vizinhanca
-	TeProxMatrixLocalAdjacencyStrategy matrix(rs, TePOLYGONS);         
-	TeGeneralizedProxMatrix neighMatrix(&matrix);
-
-  //Percorre areas, calculando populacao e contagem total dos vizinhos
-
-  TeSTElementSet::iterator it = rs->begin(); 
-	double neiPop, neiCases;
-  double totPop, mPop;
-
-  totPop = 0;
-  std::string val;
-
-	while ( it != rs->end())
-	{
-		
-    //Inicializa total de casos e de populacao
-    neiPop = neiCases = 0;
-    (*it).getPropertyValue(val, 0);
-    mPop = atof(val.c_str());
-    if (mPop == 0)
-      return false;
-    totPop += mPop;
-
-
-		TeNeighboursMap  neighbors = neighMatrix.getMapNeighbours((*it).objectId());
-
-    if (neighbors.size() > 0) {
 
-      TeNeighboursMap::iterator itNeigs = neighbors.begin();
-      
-      //Total de casos e de populacao
-      while(itNeigs != neighbors.end()){
-        
-        //Pega numero de casos e de populacao
-        it.elemSet()->getAttributeValue((*itNeigs).first, 0, val);
-        neiPop += atof(val.c_str());
-        it.elemSet()->getAttributeValue((*itNeigs).first, 1, val);
-        neiCases += atof(val.c_str());
-        (++itNeigs);
-      }
-    }
-
-    //Insere propriedades na area
-    
-    TeProperty prop;
-    prop.attr_.rep_.type_ = TeREAL;
-
-    prop.attr_.rep_.name_ = "neiPop";
-    prop.value_ = Te2String(neiPop, 9);
-    (*it).addProperty(prop);
-
-    prop.attr_.rep_.name_ = "neiCases";
-    prop.value_ = Te2String(neiCases, 9);
-    (*it).addProperty(prop);
-
-    (++it);
-  }       
-
-
-  double m, variance, V, W, LocalBayesRate;
-  double myPop, myCases, neiJPop, neiJCases;
-
-  TeProperty rateProp;
-  rateProp.attr_.rep_.type_ = TeREAL;
-  rateProp.attr_.rep_.name_ = colname;
-
-  it = rs->begin(); 
-	while ( it != rs->end())
-	{
-
-    //Pega numero de casos e de populacao
-    (*it).getPropertyValue(val, 0);
-    myPop = atof(val.c_str());
-    (*it).getPropertyValue(val, 1);
-    myCases = atof(val.c_str());
-
-    (*it).getPropertyValue("neiPop", val);
-    neiPop = atof(val.c_str());
-    (*it).getPropertyValue("neiCases", val);
-    neiCases = atof(val.c_str());
-
-    m = (double)neiCases/(double)neiPop;
-    variance = 0;
-
-    TeNeighboursMap  neighbors = neighMatrix.getMapNeighbours((*it).objectId());
-      
-    if (neighbors.size() == 0) {
-       LocalBayesRate = (double)myCases/(double)myPop;
-    }
-    else {
-
-      TeNeighboursMap::iterator itNeigs = neighbors.begin();
-
-      //Total de casos e de populacao
-      while(itNeigs != neighbors.end()){
-        
-        //Pega numero de casos e de populacao
-        it.elemSet()->getAttributeValue((*itNeigs).first, 0, val);
-        neiJPop = atof(val.c_str());
-        it.elemSet()->getAttributeValue((*itNeigs).first, 1, val);
-        neiJCases = atof(val.c_str());
-
-        //Atualiza numS
-        variance += (double)neiJPop * pow((double)neiJCases/(double)neiJPop - m,2);
-        (++itNeigs);
-      }
-   
-
-      V = (variance/(double)myPop) - (m * (double)neighbors.size()/(double)neiPop);
-      if (V < 0)
-        V = 0;
-      W = V/(V + (m/(double)myPop));
-      LocalBayesRate = W * (double)myCases/(double)myPop + (1 - W) * m;
-
-    }
-    rateProp.value_ = Te2String(LocalBayesRate, 9);
-    (*it).addProperty(rateProp);
-    (++it);
-  }       
-
-  return (true);
-}
diff --git a/src/terralib/stat/TeBayesFunctions.h b/src/terralib/stat/TeBayesFunctions.h
old mode 100644
new mode 100755
index bd127f8..18f5bad
--- a/src/terralib/stat/TeBayesFunctions.h
+++ b/src/terralib/stat/TeBayesFunctions.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001, 2002, 2003 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,20 +20,29 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
+/*! \file TeBayesFunctions.h
+    \brief This file contains functions to calculate Bayesian Indexes 
+*/
+
 #ifndef __TEBAYESFUNCTIONSH__
 #define __TEBAYESFUNCTIONSH__
 
 #include "TeStatDataStructures.h"
+#include "TeSTElementSet.h"
+#include "TeNeighbours.h"
 
-// Class for error treatment
+/** @defgroup STEBayesEstimation Bayes Estimation from TerraLib's spatio-temporal containers
+ *  @ingroup SpatialStatistics
+ *  @{
+*/
+//! Error codes
 enum TeGlobalBayesError {
    BAYES_GREATER_CASES,
    BAYES_NULL_POPULATION
 };
 
-class TeGlobalBayesException  {
-
-
+//! A class of exceptions
+class STAT_DLL TeGlobalBayesException  {
    TeGlobalBayesError error_;
 
 public:
@@ -48,10 +57,8 @@ public:
 };
 
 
-// TeGlobalEmpiricalBayes				// Function declaration
-bool TeGlobalEmpiricalBayes(TeSTStatInstanceSet *rs, double rate);
-
-
+//! Calculates the Global Empirical Bayes 
+STAT_DLL bool TeGlobalEmpiricalBayes(TeSTStatInstanceSet *rs, double rate);
 
 /* Taxa Bayesiana Local -- recebe conjunto de areas, cria matriz de vizinhanca,
    e estima taxa local baseado na vizinhanca.
@@ -64,8 +71,138 @@ bool TeGlobalEmpiricalBayes(TeSTStatInstanceSet *rs, double rate);
   w[i]=V/(V+r[i]))
   V=Sum(Area i,Pop[i]*(ri-m)^2)/Sum(Area i,Pop[i])-m/PopMedia
 */
-// TeGlobalEmpiricalBayes				// Function declaration
-bool TeLocalEmpiricalBayes(TeSTElementSet *rs, string& colname, double rate);
-
-
+/** Calculates the local Empirical Bayes	*/
+template<typename Matrix> bool 
+TeLocalEmpiricalBayes(TeSTElementSet *rs, Matrix* neighMatrix, string& colname, double rate);
+/** @} */
+
+//Implementation 
+template<typename Matrix> bool 
+TeLocalEmpiricalBayes(TeSTElementSet *rs, Matrix* neighMatrix, string& colname, double rate)
+{
+	//Percorre areas, calculando populacao e contagem total dos vizinhos
+	typename TeSTElementSet::iterator it = rs->begin(); 
+	double 	neiPop,  //Somatorio da populacao de uma area e seus vizinhos
+		neiCases; //Somatorio de casos de uma area e seus vizinhos
+	double 	myPop,    //Populacao de uma area
+		myCases;  //Casos de uma area
+
+	std::string val;
+
+	//Adds a new property in the element set
+	TeAttribute r;
+	r.rep_.name_ = "neiPop";
+	r.rep_.type_ = TeREAL;
+	r.rep_.decimals_ = 15;
+    	rs->addProperty(r);
+	r.rep_.name_ = "neiCases";
+	rs->addProperty(r);
+
+	//! Gets the indexes of the added attributes
+	int indexAttrPop = rs->getAttributeIndex("neiPop");
+	int indexAttrCases = rs->getAttributeIndex("neiCases");
+   
+	//Calcula numero de casos e populacao de uma area e seus vizinhos para todas as 
+   	//areas --> propriedades neiPop e neiCases
+    	while ( it != rs->end()) 
+	{
+		
+		//Inicializa total de casos e de populacao
+		(*it).getPropertyValue(val, 0);
+		myPop = atof(val.c_str());
+		neiPop = myPop;
+		(*it).getPropertyValue(val, 1);
+		neiCases = atof(val.c_str());
+
+		TeNeighboursMap  neighbors = neighMatrix->getMapNeighbours((*it).objectId());
+		if ((myPop > 0)  && (neighbors.size() > 0)) 
+		{
+			typename TeNeighboursMap::iterator itNeigs = neighbors.begin();
+			//Total de casos e de populacao
+			while(itNeigs != neighbors.end())
+			{
+			//Pega numero de casos e de populacao
+			rs->getAttributeValue((*itNeigs).first, 0, val);
+			neiPop += atof(val.c_str());
+			rs->getAttributeValue((*itNeigs).first, 1, val);
+			neiCases += atof(val.c_str());
+			(++itNeigs);
+			}
+        	}
+
+        	(*it).addPropertyValue(Te2String(neiPop, 9));
+		(*it).addPropertyValue(Te2String(neiCases, 9));
+        	(++it);
+	}
+
+	double 	m, //taxa de uma area e seus vizinhos
+		variance, //variancia de uma area e seus vizinhos
+		V, W, LocalBayesRate;
+	double 	neiJPop, //Populacao de uma area vizinha
+		neiJCases; //Casos de uma area vizinha
+
+	// adds rate property
+	r.rep_.name_ = colname;
+	r.rep_.type_ = TeREAL;
+	r.rep_.decimals_ = 15;
+    	rs->addProperty(r);
+	it = rs->begin(); 
+	//Calcula taxa corrigida local para cada area
+   	 while ( it != rs->end())
+	{
+		//Pega numero de casos e de populacao
+		(*it).getPropertyValue(val, 0);
+		myPop = atof(val.c_str());
+		(*it).getPropertyValue(val, 1);
+		myCases = atof(val.c_str());
+	
+		(*it).getPropertyValue(val, indexAttrPop);
+		neiPop = atof(val.c_str());
+		(*it).getPropertyValue(val, indexAttrCases);
+		neiCases = atof(val.c_str());
+
+        	if (neiPop <= 0) 
+			return false;
+		m = (double)neiCases/(double)neiPop;
+
+        	TeNeighboursMap  neighbors = neighMatrix->getMapNeighbours((*it).objectId());
+	        if (neighbors.size() == 0) 
+		{
+            		LocalBayesRate = (myPop > 0) ? (double)myCases/(double)myPop : 0.0;
+        	}
+        	else 
+		{
+			//Calculo da variancia
+			typename TeNeighboursMap::iterator itNeigs = neighbors.begin();
+			variance = (double)myPop * pow((double)myCases/(double)myPop - m,2);
+			//Total de casos e de populacao
+			while(itNeigs != neighbors.end())
+			{
+				//Pega numero de casos e de populacao
+				rs->getAttributeValue((*itNeigs).first, 0, val);
+				neiJPop = atof(val.c_str());
+				rs->getAttributeValue((*itNeigs).first, 1, val);
+				neiJCases = atof(val.c_str());
+			
+				variance += (double)neiJPop * pow((double)neiJCases/(double)neiJPop - m,2);
+				(++itNeigs);
+			}
+        		variance /= (double) neiPop;
+			//Calculo da taxa
+			V = variance - (m * ((double)neighbors.size()+1)/(double)neiPop);
+			if (V < 0) 
+			V = 0;
+			if ((V == 0) && (m == 0))
+			W  = 1;
+			else 
+			W = V/(V + (m/(double)myPop));
+			LocalBayesRate = W * (double)myCases/(double)myPop + (1 - W) * m;
+
+    		}
+    		LocalBayesRate *= rate;
+		(*it).addPropertyValue(Te2String(LocalBayesRate, 9));
+    		(++it);
+  	}
+	return true;
+}
 #endif
diff --git a/src/terralib/stat/TeKMeansGrouping.h b/src/terralib/stat/TeKMeansGrouping.h
old mode 100644
new mode 100755
index 7b04384..b654d33
--- a/src/terralib/stat/TeKMeansGrouping.h
+++ b/src/terralib/stat/TeKMeansGrouping.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,9 +20,8 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeKMeansGrouping.h
-    This file contains functions related to the K Means clustering algorithm
+    \brief This file contains functions related to the K Means clustering algorithm
 */
 #ifndef  __TERRALIB_INTERNAL_KMEANSGROUPING_H
 #define  __TERRALIB_INTERNAL_KMEANSGROUPING_H
diff --git a/src/terralib/stat/TeKernelFunctions.cpp b/src/terralib/stat/TeKernelFunctions.cpp
old mode 100644
new mode 100755
index 467990f..0b1d7c4
--- a/src/terralib/stat/TeKernelFunctions.cpp
+++ b/src/terralib/stat/TeKernelFunctions.cpp
@@ -1,7 +1,6 @@
 /************************************************************************************
 Exploring and analysis of geographical data using TerraLib and TerraView
-
-Copyright � 2003,2004 INPE and LESTE/UFMG.
+Copyright � 2003-2007 INPE and LESTE/UFMG.
 
 Partially funded by CNPq - Project SAUDAVEL, under grant no. 552044/2002-4,
 SENASP-MJ and INPE
diff --git a/src/terralib/stat/TeKernelFunctions.h b/src/terralib/stat/TeKernelFunctions.h
old mode 100644
new mode 100755
index 442809b..646b2ce
--- a/src/terralib/stat/TeKernelFunctions.h
+++ b/src/terralib/stat/TeKernelFunctions.h
@@ -1,7 +1,6 @@
 /************************************************************************************
 Exploring and analysis of geographical data using TerraLib and TerraView
-
-Copyright � 2003,2004 INPE and LESTE/UFMG.
+Copyright � 2003-2007 INPE and LESTE/UFMG.
 
 Partially funded by CNPq - Project SAUDAVEL, under grant no. 552044/2002-4,
 SENASP-MJ and INPE
@@ -19,9 +18,8 @@ You must have received a copy of the GNU General Public License with this progra
 In negative case, write to the Free Software Foundation, Inc. in the following
 address: 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
 ***********************************************************************************/
-
 /*! \file TeKernelFunctions.h
-    This file contains functions to spatial kernel estimation: basic, adaptive and ratio 
+    \brief This file contains functions to spatial kernel estimation: basic, adaptive and ratio 
 */
 
 #ifndef __TERRALIB_INTERNAL_KERNELFUNCTIONS_H
@@ -29,7 +27,8 @@ address: 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
 
 #include "TeException.h"
 #include "TeKernelParams.h"
-#include "TeDefines.h"
+#include "TeStatDefines.h"
+#include "TeGeometryAlgorithms.h"
 #include "TeProgress.h"
 
 
@@ -41,8 +40,6 @@ address: 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
 #define IDX_KERNEL1         0
 #define IDX_KERNEL2         1
 
-double TeDistance(const TeCoord2D& c1, const TeCoord2D& c2);
-
 enum TeKernelError {
  KERNEL_NO_CENTROID,
    KERNEL_ALL_NULL,
@@ -51,8 +48,7 @@ enum TeKernelError {
    KERNEL_NO_VALUE
 };
 
-class TeKernelException  {
-
+class STAT_DLL TeKernelException  {
 
   TeKernelError error_;
 
@@ -75,11 +71,11 @@ public:
  * \param distance distance between event and region centroid
  * \param intensity attribute value for event
 */
-double TeKernelQuartic(double tau, double distance, double intensity);
-double TeKernelNormal(double tau, double distance, double intensity);
-double TeKernelUniform(double tau, double distance, double intensity);
-double TeKernelTriangular(double tau, double distance, double intensity);
-double TeKernelNegExponential(double tau, double distance, double intensity);
+STAT_DLL double TeKernelQuartic(double tau, double distance, double intensity);
+STAT_DLL double TeKernelNormal(double tau, double distance, double intensity);
+STAT_DLL double TeKernelUniform(double tau, double distance, double intensity);
+STAT_DLL double TeKernelTriangular(double tau, double distance, double intensity);
+STAT_DLL double TeKernelNegExponential(double tau, double distance, double intensity);
 
 
 /**
@@ -172,9 +168,7 @@ double TeKernelValue (TeCoord2D& center, ItEvt& begin, ItEvt& end,
 	ItEvt it = begin;
 	while (it != end) 
 	{
-		if (!(*it).centroid(location)) {
-			throw TeKernelException(KERNEL_NO_CENTROID);
-		}
+		(*it).centroid(location);
 
 		//If there is no properties, assume intensity of one
 	    if (!(*it).getDoubleProperty(IDX_ATTR, intensity)) {
@@ -252,8 +246,7 @@ bool TeKernelNormalize(EventSet& events,
         break;
       case TeKDensity:
         //If region does not have an area, assumes one
-        if (!(*regIter).area(area))
-          area = 1;
+        (*regIter).area(area); 
         if (area <= 0) {
           throw TeKernelException(KERNEL_INVALID_AREA);
         }
@@ -318,9 +311,7 @@ bool TeStatIntKernel(EventSet& events,
     //Iterates through regions
     while (regIter != regionsEnd) 
     {
-      if (!(*regIter).centroid(location)) {
-        throw TeKernelException(KERNEL_NO_CENTROID);
-      }
+      (*regIter).centroid(location); 
       
       //Define iterators for event sets -- may optimize
       typename EventSet::iterator subSetBegin = events.begin(location,radius);
@@ -428,9 +419,7 @@ bool TeStatAdaptiveGeoMeanIntKernel(EventSet& events,
     //Iterates through regions
     while (regIter != regionsEnd) 
     {
-      if (!(*regIter).centroid(location)) {
-        throw TeKernelException(KERNEL_NO_CENTROID);
-      }
+      (*regIter).centroid(location); 
       
       //Define iterators for event sets -- may optimize
       typename EventSet::iterator subSetBegin = events.begin(location,radius);
@@ -493,7 +482,7 @@ bool TeStatAdaptiveGeoMeanIntKernel(EventSet& events,
 /*! Class to apply kernel method
 *
 */
-class  TeStatKernel {
+class STAT_DLL TeStatKernel {
 
 public:
 
@@ -555,7 +544,7 @@ public:
 
 
 
-class TeStatKernelRatio
+class STAT_DLL TeStatKernelRatio
 {
   public:
   int						numReg_;
@@ -675,8 +664,8 @@ class TeStatKernelRatio
         kernel = (k1 + k2) * area;
         break;
       }
-      (*regIter).setDoubleProperty(IDX_KERNEL, kernel);
-      ++regIter; 
+	  (*regIter).setDoubleProperty(IDX_KERNEL, kernel);
+	  ++regIter; 
     }
     
     return true;
diff --git a/src/terralib/stat/TeKernelParams.h b/src/terralib/stat/TeKernelParams.h
old mode 100644
new mode 100755
index ce9902d..47cd5ff
--- a/src/terralib/stat/TeKernelParams.h
+++ b/src/terralib/stat/TeKernelParams.h
@@ -1,7 +1,6 @@
 /************************************************************************************
 Exploring and analysis of geographical data using TerraLib and TerraView
-
-Copyright � 2003,2004 INPE and LESTE/UFMG.
+Copyright � 2003-2007 INPE and LESTE/UFMG.
 
 Partially funded by CNPq - Project SAUDAVEL, under grant no. 552044/2002-4,
 SENASP-MJ and INPE
@@ -19,12 +18,13 @@ You must have received a copy of the GNU General Public License with this progra
 In negative case, write to the Free Software Foundation, Inc. in the following
 address: 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
 ***********************************************************************************/
-
 /*! \file TeKernelParams.h
-    This file contains structures and definitions about Kernel parameters
+    \brief This file contains structures and definitions about Kernel parameters
 */
 #ifndef __TERRALIB_INTERNAL_KERNELPARAMS_H
 #define __TERRALIB_INTERNAL_KERNELPARAMS_H
+
+#include "TeStatDefines.h"
 #include "TeUtils.h"
 
 #include <string>
@@ -47,7 +47,7 @@ enum TeKernelCombinationType
 /*! \struct TeKernelParams
 	Kernel parameters representation
 */
-struct TeKernelParams
+struct STAT_DLL TeKernelParams
 {
 	//first event theme
 	int						eventThemeId1_;			// event theme id
diff --git a/src/terralib/application/TeMSVFactory.cpp b/src/terralib/stat/TeMSVFactory.cpp
old mode 100644
new mode 100755
similarity index 100%
rename from src/terralib/application/TeMSVFactory.cpp
rename to src/terralib/stat/TeMSVFactory.cpp
diff --git a/src/terralib/stat/TeMSVFactory.h b/src/terralib/stat/TeMSVFactory.h
new file mode 100755
index 0000000..43b7745
--- /dev/null
+++ b/src/terralib/stat/TeMSVFactory.h
@@ -0,0 +1,191 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeMSVFactory.h
+    \brief This file contains support do deal with Measures of Spatial Variability
+*/
+#ifndef __TERRALIB_INTERNAL_SPATIALMEASUREFACTORY_H
+#define __TERRALIB_INTERNAL_SPATIALMEASUREFACTORY_H
+
+#ifdef WIN32 
+#pragma warning ( disable: 4786 ) 
+#endif
+
+
+#include <map>
+#include <string>
+#include <TeMatrix.h>
+#include <TeFactory.h>
+
+using namespace std;
+
+/** @defgroup MSV Classes and structures to deal with measures of spatial variability 
+ *  @{
+ 	@ingroup SpatialStatistics
+ */
+//! Struct of parameters for measures of spatial variability 
+struct TeMSVParams
+{
+	TeMatrix	MSVPmatrix_;
+	double		MSVPdir_;
+	double		MSVPtoldir_;
+	double		MSVPincr_;
+	double		MSVPnlag_;
+};
+
+//! An abstract class for measures of spatial variability 
+class TeMSV		
+{
+public:
+	TeMSV (){};
+	virtual ~TeMSV () {}
+
+	virtual TeMatrix	calculate ()=0;
+	static TeMSV* DefaultObject(TeMSVParams){ return 0; }		
+	void setMatrix(TeMatrix* m) {MSVmatrix_ = m;}
+
+protected:
+	TeMatrix*	MSVmatrix_;
+	double		MSVdir_;
+	double		MSVtoldir_;
+	double		MSVincr_;
+	double		MSVnlag_;		
+};
+
+
+//! A class that represents a semivariogram
+class TeSemivariogram : public TeMSV
+{
+public:
+	TeSemivariogram(const TeMSVParams& params){
+		MSVdir_ = params.MSVPdir_;
+		MSVtoldir_ = params.MSVPtoldir_;
+		MSVincr_ = params.MSVPincr_;
+		MSVnlag_ = params.MSVPnlag_;
+	}
+	
+	~TeSemivariogram() { }
+
+	virtual TeMatrix	calculate ();	
+};
+
+
+//! A class that represents a correlogram
+class TeCorrelogram : public TeMSV
+{
+public:
+		TeCorrelogram(const TeMSVParams& params){
+		MSVdir_ = params.MSVPdir_;
+		MSVtoldir_ = params.MSVPtoldir_;
+		MSVincr_ = params.MSVPincr_;
+		MSVnlag_ = params.MSVPnlag_;
+	}		
+	
+	~TeCorrelogram(){};
+
+	virtual TeMatrix	calculate ();	
+};
+
+//! A class that represents a Semimadogram
+class TeSemimadogram : public TeMSV
+{
+public:
+		TeSemimadogram(const TeMSVParams& params){
+		MSVdir_ = params.MSVPdir_;
+		MSVtoldir_ = params.MSVPtoldir_;
+		MSVincr_ = params.MSVPincr_;
+		MSVnlag_ = params.MSVPnlag_;
+	}		
+	
+	~TeSemimadogram(){};
+
+	virtual TeMatrix	calculate ();	
+};
+
+//! A class that represents a covariance
+class TeCovariance : public TeMSV
+{
+public:
+		TeCovariance(const TeMSVParams& params){
+		MSVdir_ = params.MSVPdir_;
+		MSVtoldir_ = params.MSVPtoldir_;
+		MSVincr_ = params.MSVPincr_;
+		MSVnlag_ = params.MSVPnlag_;
+	}		
+	
+	~TeCovariance(){};
+
+	virtual TeMatrix	calculate ();	
+};
+
+
+//! An abstract factory of spatial variability measures
+class TeMSVFactory : public TeFactory<TeMSV, TeMSVParams>
+{
+public:
+	TeMSVFactory(const string& name) : TeFactory<TeMSV, TeMSVParams>(name){}
+	virtual TeMSV* build(const TeMSVParams&) = 0;
+};
+
+
+//! A concrete factory of semivariograms
+class TeSemivariogram_Factory : public TeMSVFactory
+{
+public:
+	TeSemivariogram_Factory (const string& name) : TeMSVFactory(name){}
+
+	virtual TeMSV* build(const TeMSVParams& params){return new TeSemivariogram(params);}
+};
+
+
+//! A concrete factory of correlograms
+class TeCorrelogram_Factory : public TeMSVFactory
+{
+public:
+	TeCorrelogram_Factory (const string& name) : TeMSVFactory (name){}
+
+	virtual TeMSV* build (const TeMSVParams& params){return new TeCorrelogram(params);}
+};
+
+
+//! A concrete factory of semimadograms
+class TeSemimadogram_Factory : public TeMSVFactory
+{
+public:
+	TeSemimadogram_Factory (const string& name) : TeMSVFactory (name){}
+
+	virtual TeMSV* build (const TeMSVParams& params){return new TeSemimadogram(params);}
+};
+
+
+//! A concrete factory of covariances
+class TeCovariance_Factory : public TeMSVFactory
+{
+public:
+	TeCovariance_Factory (const string& name) : TeMSVFactory (name){}
+
+	virtual TeMSV* build (const TeMSVParams& params){return new TeCovariance(params);}
+};
+/** @} */ 
+#endif
+
+
diff --git a/src/terralib/application/TeSemivarModelFactory.cpp b/src/terralib/stat/TeSemivarModelFactory.cpp
old mode 100644
new mode 100755
similarity index 100%
rename from src/terralib/application/TeSemivarModelFactory.cpp
rename to src/terralib/stat/TeSemivarModelFactory.cpp
diff --git a/src/terralib/stat/TeSemivarModelFactory.h b/src/terralib/stat/TeSemivarModelFactory.h
new file mode 100755
index 0000000..19d115c
--- /dev/null
+++ b/src/terralib/stat/TeSemivarModelFactory.h
@@ -0,0 +1,154 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeSemivarModelFactory.h
+    \brief This file contains support do deal with factory semivar model
+*/
+
+#ifndef __TERRALIB_INTERNAL_SEMIVARMODEL_H
+#define __TERRALIB_INTERNAL_SEMIVARMODEL_H
+
+#ifdef WIN32 
+#pragma warning ( disable: 4786 ) 
+#endif
+
+#include <TeMatrix.h>
+#include <TeFactory.h>
+
+/** @defgroup Semivar Classes to deal with the adjust of semivariogram models 
+ *  @{
+	@ingroup SpatialStatistics
+ */
+//! The parameters of a semivariogram model
+struct TeSemivarModelParams
+{
+	double		efeitopepita_;
+	double		contribuicao_;
+	double		alcance_;
+};
+
+
+//! An abstract semivariogram adjust model
+class TeSemivarModel		
+{
+public:
+	TeSemivarModel (){};
+	virtual ~TeSemivarModel (){};
+
+	virtual TeMatrix	calculate (TeMatrix&)=0;
+	static TeSemivarModel* DefaultObject(TeSemivarModelParams){ return 0; }
+
+protected:
+	double		modeloefeitopepita_;
+	double		modelocontribuicao_;
+	double		modeloalcance_;
+};
+
+//! A spherical semivariogram adjust model
+class TeEsfericSemivarModel : public TeSemivarModel
+{
+public:
+		TeEsfericSemivarModel(const TeSemivarModelParams& params){
+		modeloefeitopepita_ = params.efeitopepita_;
+		modelocontribuicao_ = params.contribuicao_;
+		modeloalcance_ = params.alcance_;
+	}		
+	
+	virtual ~TeEsfericSemivarModel(){};
+
+	virtual TeMatrix	calculate (TeMatrix&);	
+};
+
+//! An exponential semivariogram adjust model
+class TeExponentialSemivarModel : public TeSemivarModel
+{
+public:
+		TeExponentialSemivarModel(const TeSemivarModelParams& params){
+		modeloefeitopepita_ = params.efeitopepita_;
+		modelocontribuicao_ = params.contribuicao_;
+		modeloalcance_ = params.alcance_;
+	}		
+	
+	virtual ~TeExponentialSemivarModel(){};
+
+	virtual TeMatrix	calculate (TeMatrix&);	
+};
+
+//! A gaussian semivariogram adjust model
+class TeGaussianSemivarModel : public TeSemivarModel
+{
+public:
+		TeGaussianSemivarModel(const TeSemivarModelParams& params){
+		modeloefeitopepita_ = params.efeitopepita_;
+		modelocontribuicao_ = params.contribuicao_;
+		modeloalcance_ = params.alcance_;
+	}		
+	
+	virtual ~TeGaussianSemivarModel(){};
+
+	virtual TeMatrix	calculate (TeMatrix&);	
+};
+
+//! An abstract factory of a semivariogram adjust model
+class TeSemivarModelFactory : public TeFactory<TeSemivarModel, TeSemivarModelParams>
+{
+public:
+	TeSemivarModelFactory( const string& name) : TeFactory<TeSemivarModel, TeSemivarModelParams>(name){}
+
+	virtual TeSemivarModel* build( const TeSemivarModelParams&) = 0;
+};
+
+
+//! A concrete factory to build a spheric adjust model
+class TeEsfericSemivar_Factory : public TeSemivarModelFactory
+{
+public:
+	TeEsfericSemivar_Factory (const string& name) : TeSemivarModelFactory(name){}
+
+	virtual TeSemivarModel* build(const TeSemivarModelParams& params){return new TeEsfericSemivarModel(params);}
+};
+
+
+//! A concrete factory to build a exponential adjust model
+class TeExponentialSemivar_Factory : public TeSemivarModelFactory
+{
+public:
+	TeExponentialSemivar_Factory (const string& name) : TeSemivarModelFactory(name){}
+
+	virtual TeSemivarModel* build(const TeSemivarModelParams& params){return new TeExponentialSemivarModel(params);}
+};
+
+
+//! A concrete factory to build a gaussian adjust model
+class TeGaussianSemivar_Factory : public TeSemivarModelFactory
+{
+public:
+	TeGaussianSemivar_Factory (const string& name) : TeSemivarModelFactory(name){}
+
+	virtual TeSemivarModel* build(const TeSemivarModelParams& params){return new TeGaussianSemivarModel(params);}
+};
+/** @} */ 
+
+
+#endif
+
+
diff --git a/src/terralib/stat/TeSkaterArvore.cpp b/src/terralib/stat/TeSkaterArvore.cpp
old mode 100644
new mode 100755
diff --git a/src/terralib/stat/TeSkaterArvore.h b/src/terralib/stat/TeSkaterArvore.h
old mode 100644
new mode 100755
index 760d9de..3627998
--- a/src/terralib/stat/TeSkaterArvore.h
+++ b/src/terralib/stat/TeSkaterArvore.h
@@ -1,10 +1,12 @@
 //---------------------------------------------------------------------------
 #ifndef ArvoreH
 #define ArvoreH
+
+#include "TeStatDefines.h"
 #include "TeSkaterGrafo.h"
 #include "heap.h"
 
-class TArvore{
+class STAT_DLL TArvore{
   private:
       THeap *Heap;
       void  Prim(TSkaterGrafo *);
diff --git a/src/terralib/stat/TeSkaterFunctions.cpp b/src/terralib/stat/TeSkaterFunctions.cpp
old mode 100644
new mode 100755
index 5fc2b01..589699e
--- a/src/terralib/stat/TeSkaterFunctions.cpp
+++ b/src/terralib/stat/TeSkaterFunctions.cpp
@@ -3,38 +3,13 @@
 #ifdef WIN32
 #pragma hdrstop
 #endif
-#include "TeSkaterGrafo.h"
-#include "TeSkaterArvore.h"
-#include "filaR.h"
-#include "filaDouble.h"
-#include "filaInt.h"
+
 #include "TeSkaterFunctions.h"
 #include <TeDefines.h>
 #include "TeAttribute.h"
 #include "TeUtils.h"
 #include "TeSTElementSet.h"
 
-
-
-class TParticao{
-private:
-  double*  BFS_Media(int,int,long*);
-  double  BFS_Desvio(int,int,double*);
-  double  Dist(int,double*);
-  void  BFS_Main(TFilaR::Item_ptr);//Raiz,Populacao,Desvio
-  TSkaterGrafo *Grafo;
-  long PopMin;
-  int Num_Grupos;
-public:
-  TFilaR *Clusters;
-  TParticao(TSkaterGrafo*);
-  ~TParticao();
-  TFilaDouble *QuedaDesv; 
-  void  Particiona(int,long);
-  void  BFS_Salva(TeSTElementSet& regSet, string name);
-};
-
-
 //---------------------------------------------------------------------------
 TParticao::TParticao(TSkaterGrafo *G){
   Grafo=G;
@@ -329,14 +304,16 @@ void  TParticao::BFS_Salva(TeSTElementSet& regSet, string name){
  TFilaInt *Fila;
  int Raiz;
 
- TeProperty prop;
- prop.attr_.rep_.name_ = name;
- prop.attr_.rep_.type_ = TeREAL;
+ TeAttributeRep rep;
+ rep.name_ = name;
+ rep.type_ = TeINT;
+ regSet.addProperty(rep, "");
+ int index = regSet.getAttributeIndex(name); //get the index of the inserted attribute
 
  Raiz=Clusters->Proximo();
  while (Raiz != -1){
 
-   prop.value_ = Te2String(i);
+   string value = Te2String(i);
 
    Fila = new TFilaInt;
    Fila->Insere(Raiz);
@@ -346,11 +323,15 @@ void  TParticao::BFS_Salva(TeSTElementSet& regSet, string name){
 
      /** Insere Filhos na Lista **/
      Grafo->MyGrafo->Nos[Atual].ArViz->Adjacente(&Indice,&Peso);
-     while(Indice != -1){
+     while(Indice != -1)
+	 {
         Fila->Insere(Indice);
         Grafo->MyGrafo->Nos[Atual].ArViz->Adjacente(&Indice,&Peso);
      };
-     regSet.addProperty(Grafo->MyGrafo->Nos[Atual].Label, prop);
+     //set the attribute in the set
+	 TeSTInstance* ins = regSet.getSTInstance(Grafo->MyGrafo->Nos[Atual].Label);
+	 if(ins)
+		ins->setPropertyValue(index, value); 
    }
    i++;
    Raiz=Clusters->Proximo();
@@ -359,56 +340,4 @@ void  TParticao::BFS_Salva(TeSTElementSet& regSet, string name){
 
 
 
-bool TeSkaterFunction(bool hasPop, int tipo, int nGrupos, int popMin,
-                      TeSTElementSet& regSet, string name,
-                      vector<double>& hetDrop) {
-  
-	TParticao *Particao = 0;
-	try
-	{
-		//Monta grafo a partir do conjunto 
-	  TSkaterGrafo g(hasPop);
-	  if (!g.MontaGrafo(regSet)) {
-		return false;
-	  }
-
-	  TArvore* a = new TArvore();
-	  a->Monta_Arvore(&g);
-	  delete a;
-
-  
-	  Particao = new TParticao(&g);
-	  switch (tipo) {
-	  case SKATER_POR_GRUPO:
-		 Particao->Particiona(nGrupos,-1);
-		 break;
-	  case SKATER_POR_POPULACAO:
-		 Particao->Particiona(0,popMin);
-		 break;
-	  case SKATER_POR_AMBOS:
-		 Particao->Particiona(nGrupos,popMin);
-		 break;
-	  }
-
-	  Particao->BFS_Salva(regSet, name);
-
-	  //Copia as quedas a partir do numero de grupos para hetDrop,
-	  //comecando do menor
-	  hetDrop.clear();
-	  int size = Particao->QuedaDesv->Size();
-	  for (int gr = 0; gr < size; gr++) {
-		double het = Particao->QuedaDesv->Retira();
-		hetDrop.push_back(het);
-	  }
-	  delete Particao;
-	}
-	catch(...)
-	{
-		if(Particao)
-			delete Particao;
-
-		return false;
-	}
-
-  return true;
-}
+
diff --git a/src/terralib/stat/TeSkaterFunctions.h b/src/terralib/stat/TeSkaterFunctions.h
old mode 100644
new mode 100755
index 1e47d90..ec39077
--- a/src/terralib/stat/TeSkaterFunctions.h
+++ b/src/terralib/stat/TeSkaterFunctions.h
@@ -12,10 +12,35 @@
 #define SKATER_POR_POPULACAO 1
 #define SKATER_POR_AMBOS     2
 
+#include "TeSkaterGrafo.h"
+#include "TeSkaterArvore.h"
+#include "filaR.h"
+#include "filaDouble.h"
+#include "filaInt.h"
 #include <string>
 #include <vector>
 using namespace std;
 
+class TeElementSet;
+
+class STAT_DLL TParticao{
+private:
+  double*  BFS_Media(int,int,long*);
+  double  BFS_Desvio(int,int,double*);
+  double  Dist(int,double*);
+  void  BFS_Main(TFilaR::Item_ptr);//Raiz,Populacao,Desvio
+  TSkaterGrafo *Grafo;
+  long PopMin;
+  int Num_Grupos;
+public:
+  TFilaR *Clusters;
+  TParticao(TSkaterGrafo*);
+  ~TParticao();
+  TFilaDouble *QuedaDesv; 
+  void  Particiona(int,long);
+  void  BFS_Salva(TeSTElementSet& regSet, string name);
+};
+
 /** Funcao de regionalizacao de um conjunto de poligonos
  *  hasPop: se ha atributo de populacao, que devera ser o ultimo
  *  tipo:   tipo de quebra, por grupo, por populacao ou por ambos
@@ -24,9 +49,65 @@ using namespace std;
  *  regSet:  conjunto de areas a serem regionalizadas, com seus atributos
  *  hetDrop: heterogeneidade dado cada uma das divisoes
  **/
-bool TeSkaterFunction(bool hasPop, int tipo, int nGrupos, int popMin,
-                      TeSTElementSet& regSet, string resName,
-                      vector<double>& hetDrop); 
+template<typename Matrix> bool 
+TeSkaterFunction(bool hasPop, int tipo, int nGrupos, int popMin, TeSTElementSet& regSet, 
+				  Matrix* proxMatrix, string resName, vector<double>& hetDrop); 
+
+
+template<typename Matrix> bool 
+TeSkaterFunction(bool hasPop, int tipo, int nGrupos, int popMin, TeSTElementSet& regSet, 
+				 Matrix* proxMatrix, string name, vector<double>& hetDrop) 
+{
+  
+	TParticao *Particao = 0;
+	try
+	{
+		//Monta grafo a partir do conjunto 
+	  TSkaterGrafo g(hasPop);
+	  if (!g.MontaGrafo(regSet, proxMatrix)) {
+		return false;
+	  }
+
+	  TArvore* a = new TArvore();
+	  a->Monta_Arvore(&g);
+	  delete a;
+
+  
+	  Particao = new TParticao(&g);
+	  switch (tipo) {
+	  case SKATER_POR_GRUPO:
+		 Particao->Particiona(nGrupos,-1);
+		 break;
+	  case SKATER_POR_POPULACAO:
+		 Particao->Particiona(0,popMin);
+		 break;
+	  case SKATER_POR_AMBOS:
+		 Particao->Particiona(nGrupos,popMin);
+		 break;
+	  }
+
+	  Particao->BFS_Salva(regSet, name);
+
+	  //Copia as quedas a partir do numero de grupos para hetDrop,
+	  //comecando do menor
+	  hetDrop.clear();
+	  int size = Particao->QuedaDesv->Size();
+	  for (int gr = 0; gr < size; gr++) {
+		double het = Particao->QuedaDesv->Retira();
+		hetDrop.push_back(het);
+	  }
+	  delete Particao;
+	}
+	catch(...)
+	{
+		if(Particao)
+			delete Particao;
+
+		return false;
+	}
+
+  return true;
+}
 
 //---------------------------------------------------------------------------
 #endif
diff --git a/src/terralib/stat/TeSkaterGrafo.cpp b/src/terralib/stat/TeSkaterGrafo.cpp
old mode 100644
new mode 100755
index c6f9cb3..c20ab91
--- a/src/terralib/stat/TeSkaterGrafo.cpp
+++ b/src/terralib/stat/TeSkaterGrafo.cpp
@@ -7,10 +7,6 @@
 #endif
 
 #include "TeSkaterGrafo.h"
-#include "lista.h"
-#include "TeProxMatrixConstructionStrategy.h"
-#include "TeGeneralizedProxMatrix.h"
-#include "TeSTElementSet.h"
 
 
 TSkaterGrafo::TSkaterGrafo(bool hasPop){
@@ -18,7 +14,6 @@ TSkaterGrafo::TSkaterGrafo(bool hasPop){
    MyGrafo= new MyGrafo_t;
    MyGrafo->Nos = (Grafo_ptr) malloc(sizeof(Grafo_t));
    MyGrafo->Size = 0;
-   Hash = new THash;
    Tem_Pop = (hasPop) ? 1 : 0;
 };
 
@@ -31,112 +26,6 @@ int TSkaterGrafo::GetSize(){
 
 
 /*************************/
-/*************************/
-
-bool  TSkaterGrafo::MontaGrafo(TeSTElementSet& regSet) {
-
-//  long nAreas = regSet.numElements();
-
-  TeSTElementSet::iterator it = regSet.begin(); 
-  int  nCov   = (*it).getPropertyVector().size();
-
-
-  //Monta lista de areas
-
-  TeCoord2D centroid;
-  (*it).centroid(centroid);
-  X_min=X_max=centroid.x();
-  Y_min=Y_max=centroid.y();
-  //Obtem o numero de variaveis --> se tem populacao e menos um
-  if (this->Tem_Pop)
-          MyGrafo->Num_Var = nCov-1; //Obtem o numero de variaveis
-  else
-          MyGrafo->Num_Var = nCov;
-
-  string val;
-  int i;
-
-  //Monta areas
-  while (it != regSet.end()) 
-  {
-		(*it).centroid(centroid);    
-		MyGrafo->Nos = 
-		  (Grafo_ptr) realloc(MyGrafo->Nos,sizeof(Grafo_t)*((MyGrafo->Size)+1));
-		sprintf(MyGrafo->Nos[MyGrafo->Size].Label,"%s",(*it).objectId().c_str());
-		MyGrafo->Nos[MyGrafo->Size].Vizinhos = NULL;
-		MyGrafo->Nos[MyGrafo->Size].ArViz = NULL;
-		Hash->Insere(MyGrafo->Nos[MyGrafo->Size].Label,MyGrafo->Size);
-		MyGrafo->Nos[MyGrafo->Size].X = centroid.x();
-		if(centroid.x() < X_min) X_min =centroid.x();// Procura limites da tela
-		else if(centroid.x() > X_max) X_max = centroid.x();
-    
-		MyGrafo->Nos[MyGrafo->Size].Y =centroid.y();
-		if(centroid.y()< Y_min) Y_min = centroid.y(); //Procura limites da tela
-		else if(centroid.y() > Y_max) Y_max = centroid.y();
-    
-		MyGrafo->Nos[MyGrafo->Size].Variaveis = 
-		  (double *) malloc(sizeof(double)*MyGrafo->Num_Var);
-		for(i=0;i<MyGrafo->Num_Var;i++) {
-		  (*it).getPropertyValue(val, i);
-		  MyGrafo->Nos[MyGrafo->Size].Variaveis[i] = atof(val.c_str()); 
-		}
-		if (Tem_Pop) {
-		  (*it).getPropertyValue(val, MyGrafo->Num_Var);
-		  MyGrafo->Nos[MyGrafo->Size].Populacao = (int)atof(val.c_str());//covs[a*nCov+nCov-1];
-		}
-		else
-		  MyGrafo->Nos[MyGrafo->Size].Populacao = 0;
-    
-		MyGrafo->Nos[MyGrafo->Size].Mark=1;
-		(MyGrafo->Size)++;
-		(++it);
-  }
-
-
-  //Monta vizinhanca
-   //Monta matriz de vizinhanca
-	TeProxMatrixLocalAdjacencyStrategy matrix(&regSet, TePOLYGONS);         
-	TeGeneralizedProxMatrix neighMatrix(&matrix);
-
-  int L_indice,V_indice;
-  double dist;
-
-  it = regSet.begin();
-	
-	while ( it != regSet.end())
-	{
-		TeNeighboursMap	neighbors = neighMatrix.getMapNeighbours((*it).objectId());
-
-		//Grafo eh desconexo
-		if (neighbors.size() == 0) 
-		{
-		  delete Hash;
-		  return false;
-		}
-
-		L_indice = Hash->Pesquisa((*it).objectId().c_str());
-		MyGrafo->Nos[L_indice].Vizinhos = new TListaVizinho;
-		MyGrafo->Nos[L_indice].ArViz = new TListaVizinho;
-
-		TeNeighboursMap::iterator itNeigs = neighbors.begin();
-	 			
-		while(itNeigs != neighbors.end())
-		{
-     
-		   V_indice = Hash->Pesquisa(((*itNeigs).first).c_str());
-		   dist = Distancia(L_indice,V_indice);
-		   MyGrafo->Nos[L_indice].Vizinhos->Insere(V_indice,dist);
-		   (++itNeigs);
-		}
-		(++it);
-	}
-
-  delete Hash;
-  return true;
-}
-
-
-/*************************/
 double TSkaterGrafo::Distancia(int L_indice, int V_indice){
 
    int i;
diff --git a/src/terralib/stat/TeSkaterGrafo.h b/src/terralib/stat/TeSkaterGrafo.h
old mode 100644
new mode 100755
index 7ae0304..8d28dfb
--- a/src/terralib/stat/TeSkaterGrafo.h
+++ b/src/terralib/stat/TeSkaterGrafo.h
@@ -1,18 +1,21 @@
-#include "hash.h"
-#include "lista.h"
-#define RAIO 4
+
 //---------------------------------------------------------------------------
 #ifndef GrafoH
 #define GrafoH
 //---------------------------------------------------------------------------
 
-class TeSTElementSet;
+#include "TeSTElementSet.h"
+#include "TeNeighbours.h"
+#include "lista.h"
+
+#define RAIO 4
 
-class TSkaterGrafo {
+class STAT_DLL TSkaterGrafo {
 
 public:
 
-    typedef struct No_Grafo{
+    typedef struct No_Grafo
+	{
       char Label[50];
       double X;
       double Y;
@@ -23,7 +26,8 @@ public:
       char Mark;
     } Grafo_t, *Grafo_ptr;
 
-    typedef struct Grafo{
+    typedef struct Grafo
+	{
        Grafo_ptr Nos;
        int Num_Var;
        int Size;
@@ -31,7 +35,7 @@ public:
 
 /**** Funcoes Publicas ****/
  TSkaterGrafo(bool hasPop);
- bool  MontaGrafo(TeSTElementSet& regSet);
+ template<typename Matrix> bool  MontaGrafo(TeSTElementSet& regSet, Matrix* proxMatrix);
  void  Escalona(double *,double *);
  void  Escala(int,int);
  void  Adjacente(int *,double *,int i);
@@ -49,8 +53,9 @@ public:
  /***** Area Privada *****/
 private:
     MyGrafo_ptr MyGrafo;
-    THash *Hash;
-    double X_min,X_max;//Usado para conversao de escala
+	std::map<std::string,unsigned int> Hash_;
+
+	double X_min,X_max;//Usado para conversao de escala
     double Y_min,Y_max;//Usado para conversao de escala
     double Cx,Gamax;   //Usados na conversao de escala
     double Cy,Gamay;   //Usados na conversao de escala
@@ -72,4 +77,112 @@ private:
     friend class TEstatistica;
 };
 
+template<typename Matrix> bool  
+TSkaterGrafo::MontaGrafo(TeSTElementSet& regSet, Matrix* proxMatrix)
+{
+
+//  long nAreas = regSet.numElements();
+
+  typename TeSTElementSet::iterator it = regSet.begin(); 
+  int  nCov   = (*it).getProperties().size();
+
+
+  //Monta lista de areas
+
+  TeCoord2D centroid;
+  (*it).centroid(centroid);
+  X_min=X_max=centroid.x();
+  Y_min=Y_max=centroid.y();
+  //Obtem o numero de variaveis --> se tem populacao e menos um
+  if (this->Tem_Pop)
+          MyGrafo->Num_Var = nCov-1; //Obtem o numero de variaveis
+  else
+          MyGrafo->Num_Var = nCov;
+
+  string val;
+  int i;
+
+  //Monta areas
+  while (it != regSet.end()) 
+  {
+		(*it).centroid(centroid);    
+		MyGrafo->Nos = 
+		  (Grafo_ptr) realloc(MyGrafo->Nos,sizeof(Grafo_t)*((MyGrafo->Size)+1));
+		sprintf(MyGrafo->Nos[MyGrafo->Size].Label,"%s",(*it).objectId().c_str());
+		MyGrafo->Nos[MyGrafo->Size].Vizinhos = NULL;
+		MyGrafo->Nos[MyGrafo->Size].ArViz = NULL;
+
+		Hash_[std::string(MyGrafo->Nos[MyGrafo->Size].Label)] = MyGrafo->Size;
+
+		MyGrafo->Nos[MyGrafo->Size].X = centroid.x();
+		if(centroid.x() < X_min) X_min =centroid.x();// Procura limites da tela
+		else if(centroid.x() > X_max) X_max = centroid.x();
+    
+		MyGrafo->Nos[MyGrafo->Size].Y =centroid.y();
+		if(centroid.y()< Y_min) Y_min = centroid.y(); //Procura limites da tela
+		else if(centroid.y() > Y_max) Y_max = centroid.y();
+    
+		MyGrafo->Nos[MyGrafo->Size].Variaveis = 
+		  (double *) malloc(sizeof(double)*MyGrafo->Num_Var);
+		for(i=0;i<MyGrafo->Num_Var;i++) {
+		  (*it).getPropertyValue(val, i);
+		  MyGrafo->Nos[MyGrafo->Size].Variaveis[i] = atof(val.c_str()); 
+		}
+		if (Tem_Pop) {
+		  (*it).getPropertyValue(val, MyGrafo->Num_Var);
+		  MyGrafo->Nos[MyGrafo->Size].Populacao = (int)atof(val.c_str());//covs[a*nCov+nCov-1];
+		}
+		else
+		  MyGrafo->Nos[MyGrafo->Size].Populacao = 0;
+    
+		MyGrafo->Nos[MyGrafo->Size].Mark=1;
+		(MyGrafo->Size)++;
+		(++it);
+  }
+
+  int L_indice,V_indice;
+  double dist;
+
+  it = regSet.begin();
+	
+	while ( it != regSet.end())
+	{
+		TeNeighboursMap	neighbors = proxMatrix->getMapNeighbours((*it).objectId());
+
+		//Grafo eh desconexo
+		if (neighbors.size() == 0) 
+		{
+			Hash_.clear();
+		  return false;
+		}
+		
+		std::map<std::string,unsigned int>::iterator ith = Hash_.find((*it).objectId());
+		if (ith != Hash_.end())
+			L_indice = ith->second;
+		else
+			L_indice = 0;
+
+		MyGrafo->Nos[L_indice].Vizinhos = new TListaVizinho;
+		MyGrafo->Nos[L_indice].ArViz = new TListaVizinho;
+
+		typename TeNeighboursMap::iterator itNeigs = neighbors.begin();
+	 			
+		while(itNeigs != neighbors.end())
+		{
+			ith = Hash_.find((*itNeigs).first);
+			if (ith != Hash_.end())
+				V_indice = ith->second;
+			else
+				V_indice = 0;
+		   dist = Distancia(L_indice,V_indice);
+		   MyGrafo->Nos[L_indice].Vizinhos->Insere(V_indice,dist);
+		   (++itNeigs);
+		}
+		(++it);
+	}
+
+  Hash_.clear();
+  return true;
+}
+
 #endif
diff --git a/src/terralib/stat/TeSpatialStatistics.cpp b/src/terralib/stat/TeSpatialStatistics.cpp
deleted file mode 100644
index 5baf107..0000000
--- a/src/terralib/stat/TeSpatialStatistics.cpp
+++ /dev/null
@@ -1,987 +0,0 @@
-#include "TeSpatialStatistics.h"
-#include "TeLayer.h"
-#include "TeGeneralizedProxMatrix.h"
-#include "TeSTEvent.h"
-#include "TeSTElementSet.h"
-#include "TeStatistics.h"
-#include "TeProgress.h"
-
-
-bool 
-TeLocalMean (TeSTEventSet* elemSet, TeGeneralizedProxMatrix* proxMatrix, int indexAttr)
-{
-	
-	TeSTEventSet::iterator itObjs = elemSet->begin();
-	double numberNeighbors;
-
-	while (itObjs != elemSet->end())
-	{
-		double sum = 0.;
-		double localMean = 0.;
-
-		TeNeighboursMap neighbors = proxMatrix->getMapNeighbours((*itObjs).objectId());
-		TeNeighboursMap::iterator itNeigs = neighbors.begin();
-		numberNeighbors = neighbors.size();
-		
-		while(itNeigs != neighbors.end())
-		{
-			//retrieve the neighbor attribute value
-			double val;
-			if(!elemSet->getAttributeValue ((*itNeigs).first, indexAttr, val))
-				return false;
-						
-			// find the weight associated with the neighbor (attribute of index 0)
-			double weight = (*itNeigs).second.Weight();
-
-			sum +=  weight * val;  
-			++itNeigs;
-		}
-
-		localMean = sum;
-		
-		TeAttributeRep rep;
-		rep.name_ = "LocalMean";
-		rep.type_ = TeREAL;
-		(*itObjs).addProperty(localMean, rep, false);
-		
-		rep.name_  = "NumNeighbors";
-		rep.type_ = TeINT;
-		(*itObjs).addProperty((double)numberNeighbors, rep, false);
-		
-		++itObjs;
-	}
-
-	return true;
-}
-
-double
-TeMoranIndex2 (TeSTEventSet* elemSet, const double& mean, const double& var, TeGeneralizedProxMatrix* proxMatrix, int indexAttr)
-{
-	double moran = 0;
-	TeSTEventSet::iterator itObjs = elemSet->begin();
-	int numberObjs = elemSet->numSTInstance();
-
-	while ( itObjs != elemSet->end())
-	{
-		double normObjVal = (*itObjs)[indexAttr] - mean;
-		double li = 0.;
-		double weightSum = 0.;
-
-		
-		TeNeighboursMap neighbors = proxMatrix->getMapNeighbours((*itObjs).objectId());
-		TeNeighboursMap::iterator itNeigs = neighbors.begin();
-
-		while(itNeigs != neighbors.end())
-		{
-			//retrieve the neighbor attribute value
-			double val;
-			if(!elemSet->getAttributeValue ((*itNeigs).first, indexAttr, val))
-				return 0.;
-									
-			 // normalize the property
-			double normNeighVal =  val - mean;
-
-			// find the weight associated with the neighbor (attribute of index 0)
-			double weight = (*itNeigs).second.Weight();
-			li +=  weight * ( normNeighVal )  * ( normObjVal );  // se dividir pela vari�ncia � o �ndice local de moran
-			weightSum += weight;
-			++itNeigs;
-		}
-
-		if (weightSum != 0.)
-			li /= weightSum;
-		
-
-		moran += li;
-
-		++itObjs;
-	}
-
-	if ( numberObjs > 1 )
-		return moran /  ( var * ( numberObjs - 1 ) );
-	else 
-		return moran / var;
-}
-
-double
-TeMoranIndex (TeSTEventSet* elemSet, int indexZ, int indexWZ)
-{
-	double variance = 0.;
-	double sum = 0;
-	int number = 0;
-
-	variance = TeSecondMoment (elemSet->begin(), elemSet->end(), 0, indexZ);  
-	TeSTEventSet::iterator it = elemSet->begin();
-	
-	while (it != elemSet->end())
-	{
-		double z = (*it)[indexZ];
-		double wz = (*it)[indexWZ];
-		double ZxWZ;
-		if(variance==0)
-			ZxWZ = 0.;
-		else
-			ZxWZ = (z*wz)/variance; 
-
-		//keep 
-		TeAttributeRep rep;
-		rep.name_ = "MoranIndex"; 
-		rep.type_ = TeREAL;
-		(*it).addProperty(ZxWZ, rep, false); 
-		
-		sum += ZxWZ;
-		number++; 
-		++it; 
-	}
-	
-	return sum /= number;
-}
-
-double
-TeGlobalMoranSignificance (TeSTEventSet* elemSet, TeGeneralizedProxMatrix* proxMatrix, int indexAttr,
-						   unsigned int permutationsNumber, double moranIndex)
-{
-	
-	vector<double> permutationsResults(permutationsNumber);
-	double significance;
-	
-	unsigned int objectsNumber = elemSet->numSTInstance();
-	
-	//progress bar
-	if(TeProgress::instance())
-		TeProgress::instance()->setTotalSteps(permutationsNumber);
-		
-	vector<double> deviations(objectsNumber);
-	vector<double>::iterator itDev = deviations.begin();
-	TeSTEventSet::iterator itObjs = elemSet->begin();
-	while(itObjs != elemSet->end())
-	{
-		(*itDev) = (*itObjs)[indexAttr]; //attribute value
-		++itObjs;
-		++itDev;
-	}
-
-	TeStatisticValMap stat;
-	if(!TeCalculateStatistics(elemSet->begin(), elemSet->end(), stat, 0))
-		return 0.;
-
-	double mean = stat[TeMEAN];
-	double var = stat[TeVARIANCE];
-	
-	srand(time(0));
-	unsigned int i;
-	for (i = 0; i < permutationsNumber; i++)
-	{
-		TeSTEventSet changedObjects;
-
-		itObjs = elemSet->begin();
-
-		// chande values 
-		while(itObjs != elemSet->end())
-		{
-			TeSTEvent stoChange; 
-			stoChange.objectId((*itObjs).objectId());
-			
-			double ranaux = rand();
-			int randon = (int) ((ranaux * (objectsNumber-1))/RAND_MAX );
-			double value = deviations[randon];
-						
-			stoChange.addProperty(value);
-			
-			changedObjects.insertSTInstance (stoChange);
-			++itObjs;
-		}
-		
-		permutationsResults[i] = TeMoranIndex2 (&changedObjects, mean, var, proxMatrix, 0);
-
-		if(TeProgress::instance())
-		{
-			if (TeProgress::instance()->wasCancelled())
-			{
-				TeProgress::instance()->reset();
-				return 0.;
-			}
-			else
-				TeProgress::instance()->setProgress(i);
-		}
-	}
-
-	// verify the significance
-	int position = 0;
-	significance = 0;
-	unsigned int k;
-	for (k = 0; k < permutationsNumber; k++)
-	{
-		if (moranIndex < permutationsResults[k]) //>
-			position++;
-	}
-	if ( moranIndex >= 0)
-		significance = (double) (position+1) / (permutationsNumber+1);
-	else
-		significance = (double) (permutationsNumber-position)/(permutationsNumber+1);
-		
-	
-	if (TeProgress::instance())
-		TeProgress::instance()->reset();
-		
-	return significance;
-}
-
-
-void
-TeMoranMap (TeSTEventSet* elemSet, int indexLISAMap, int indexBoxMap)
-{
-	TeSTEventSet::iterator it = elemSet->begin();
-	while ( it != elemSet->end())
-	{
-		double result = 0.0;
-		int lisaMap = (int)((*it)[indexLISAMap]);
-
-		if (lisaMap != 0)
-			result = (*it)[indexBoxMap];
-				
-		//keep
-		TeAttributeRep rep;
-		rep.name_ = "MoranMap"; 
-		rep.type_ = TeREAL;
-		(*it).addProperty(result, rep, false); 
-
-		++it;
-	}
-}
-
-bool 
-TeGStatistics (TeSTEventSet* elemSet, TeGeneralizedProxMatrix* proxMatrix, int indexAttr)
-{
-
-	TeSTEventSet::iterator itObjs = elemSet->begin();
-	double totalSum = 0.;
-	double excludSum = 0.;
-
-	totalSum = TeSum(itObjs, elemSet->end(), indexAttr);
-	
-	itObjs = elemSet->begin();
-
-	//progress bar
-	int step = 0;
-	int numSteps = elemSet->numSTInstance();
-	if(TeProgress::instance())
-		TeProgress::instance()->setTotalSteps(numSteps);
-
-	while ( itObjs != elemSet->end() )
-	{
-		double valObj = (*itObjs)[indexAttr];
-		excludSum = totalSum - valObj;
-		
-		double G = 0;
-		double GStar = valObj;
-	
-		TeNeighboursMap neighbors = proxMatrix->getMapNeighbours((*itObjs).objectId());
-		TeNeighboursMap::iterator itNeigs = neighbors.begin();
-		int neigNumber = neighbors.size();
-
-		if(itNeigs != neighbors.end())
-		{
-			while(itNeigs != neighbors.end())
-			{
-				// retrieve the property value associated to this neighbor 
-				double val;
-				if(!elemSet->getAttributeValue ((*itNeigs).first, indexAttr, val))
-					return false;
-
-				G +=  val;
-				GStar +=  val;
-				
-				++itNeigs;
-			}
-
-			G /= neigNumber;
-			GStar /= (neigNumber+1);
-				
-			G /= excludSum; 
-			GStar /= totalSum;
-		}
-	
-		//insert the indexes in the sET
-		TeAttributeRep rep;
-		rep.name_ = "G"; 
-		rep.type_ = TeREAL;
-		(*itObjs).addProperty(G, rep, false); 
-
-		rep.name_ = "GStar";
-		(*itObjs).addProperty(GStar, rep, false); 
-
-		++itObjs;
-
-		if(TeProgress::instance())
-		{
-			if (TeProgress::instance()->wasCancelled())
-			{
-				TeProgress::instance()->reset();
-				return false;
-			}
-			else
-				TeProgress::instance()->setProgress(step);
-		}	
-		++step;
-	}
-	
-
-	if (TeProgress::instance())
-		TeProgress::instance()->reset();
-	return true;
-}
-
-void
-TeBoxMap (TeSTEventSet* elemSet, int indexZ, int indexWZ, double mean)
-{
-	
-	TeSTEventSet::iterator it_begin = elemSet->begin(); 
-	while ( it_begin != elemSet->end())
-	{
-		int result=0;
-
-		if ( ((*it_begin)[indexZ] >= mean) &&  ((*it_begin)[indexWZ] >= mean))   
-			result = 1;
-		else if ( ((*it_begin)[indexZ] < mean)  &&  ((*it_begin)[indexWZ] >= mean))	
-			result = 4;	
-		else if ( ((*it_begin)[indexZ] < mean)  &&  ((*it_begin)[indexWZ] < mean))
-			result = 2;		
-		else if ( ((*it_begin)[indexZ] >= mean) &&  ((*it_begin)[indexWZ] < mean))
-			result = 3;
-
-		//keep
-		TeAttributeRep rep;
-		rep.name_ = "BoxMap"; 
-		rep.type_ = TeINT;
-		(*it_begin).addProperty((double)result, rep, false); 
-
-		++it_begin;
-	}	
-}
-
-bool TeLisaStatisticalSignificance ( TeSTEventSet* elemSet, int indexZ, int indexLISA, 
-									 int indexNeighNum, int permutationsNumber) 
- {
-	double sum;
-	double WZperm;
-	double significance;
-
-	TeSTEventSet::iterator it = elemSet->begin();
-
-	double variance = TeSecondMoment (it, elemSet->end(), 0, indexZ);
-
-	int index = 0;
-	it = elemSet->begin();
-	int objectsNumber = elemSet->numSTInstance();
-
-	//progress bar
-	int step = 0;
-	if(TeProgress::instance())
-		TeProgress::instance()->setTotalSteps(objectsNumber);
-
-	vector<double> deviations(objectsNumber);
-	vector<double>::iterator it_dev = deviations.begin();
-	while(it != elemSet->end())
-	{
-		(*it_dev) = (*it)[indexZ];
-		++it;
-		++it_dev;
-	}
-	
-	srand(time(0));
-	it = elemSet->begin();
-	
-
-	while ( it != elemSet->end())
-	{
-		int neighborsNumber = (int)((*it)[indexNeighNum]);
-
-		vector<double> permut(permutationsNumber);
-		for (int j = 0; j < permutationsNumber; j++)
-		{
-			int randon = 0;
-			sum = 0;
-			set<int> setNeigh;
-			for (int k = 0; k < neighborsNumber; k++)
-			{
-				double ranaux = rand();
-				randon = (int)((ranaux * (objectsNumber-1))/RAND_MAX);
-				if (index == randon || (setNeigh.find(randon) != setNeigh.end()) )
-					k--;	// raffle annulled	
-				else
-				{		
-					setNeigh.insert(randon);
-					sum += deviations[randon];
-				}
-			}
-
-			if(neighborsNumber==0)
-				WZperm = 0.;
-			else
-				WZperm = sum/neighborsNumber;
-
-			if(variance==0)
-				permut[j] = 0.;
-			else
-				permut[j] = deviations[index] * WZperm / variance;
-		}	
-
-		int position = 0;
-		for (int k = 0; k < permutationsNumber; k++)
-		{
-			if (((*it)[indexLISA]) > permut[k])
-				position++;
-		}
- 		if ( ((*it)[indexLISA]) >= 0)
-			significance = (double) (permutationsNumber-position)/(permutationsNumber+1);
-		else
-			significance = (double) position/( permutationsNumber + 1 );
-			
-		//keep
-		TeAttributeRep rep;
-		rep.name_ = "LISASig"; 
-		rep.type_ = TeREAL;
-		(*it).addProperty(significance, rep, false); 
-
-		++it;
-		++index;
-
-		if(TeProgress::instance())
-		{
-			if (TeProgress::instance()->wasCancelled())
-			{
-				TeProgress::instance()->reset();
-				return false;
-			}
-			else
-				TeProgress::instance()->setProgress(step);
-		}	
-		++step;
-	}
-
-	if (TeProgress::instance())
-		TeProgress::instance()->reset();
-
-	return true;
-}
-
-
-void
-TeLisaMap (TeSTEventSet* elemSet, int indexSignifLISA, int /* permutationNumber */)
-{
-	TeSTEventSet::iterator begin = elemSet->begin();
-	while (begin != elemSet->end())
-	{
-		int significanceClass = 0;
-		if ( ( (*begin)[indexSignifLISA] <= 0.001 ))  /*&& (permutationNumber >= 999)*/ 
-			significanceClass = 3;
-		else if ( ((*begin)[indexSignifLISA] <= 0.01) && ((*begin)[indexSignifLISA] > 0.001 )) /*&& (permutationNumber >= 99)*/ 
-			significanceClass = 2;
-		else if ( ((*begin)[indexSignifLISA] <= 0.05) && ((*begin)[indexSignifLISA] > 0.01))
-			significanceClass = 1;
-
-		//keep
-		TeAttributeRep rep;
-		rep.name_ = "LISAMap"; 
-		rep.type_ = TeINT;
-		(*begin).addProperty((double)significanceClass, rep, false); 
-
-		++begin;
-	}
-}
-
-//-------------------- using TeSTElementSet
-//-------------------- not templated because Visual C++ 6.0
-
-bool 
-TeLocalMean (TeSTElementSet* elemSet, TeGeneralizedProxMatrix* proxMatrix, int indexAttr)
-{
-	
-	TeSTElementSet::iterator itObjs = elemSet->begin();
-	double numberNeighbors;
-
-	while (itObjs != elemSet->end())
-	{
-		double sum = 0.;
-		double localMean = 0.;
-
-		TeNeighboursMap neighbors = proxMatrix->getMapNeighbours((*itObjs).objectId());
-		TeNeighboursMap::iterator itNeigs = neighbors.begin();
-		numberNeighbors = neighbors.size();
-		
-		while(itNeigs != neighbors.end())
-		{
-			//retrieve the neighbor attribute value
-			double val;
-			if(!elemSet->getAttributeValue ((*itNeigs).first, indexAttr, val))
-				return false;
-						
-			// find the weight associated with the neighbor (attribute of index 0)
-			double weight = (*itNeigs).second.Weight();
-
-			sum +=  weight * val;  
-			++itNeigs;
-		}
-
-		localMean = sum;
-		
-		TeAttributeRep rep;
-		rep.name_ = "LocalMean";
-		rep.type_ = TeREAL;
-		(*itObjs).addProperty(localMean, rep, false);
-		
-		rep.name_  = "NumNeighbors";
-		rep.type_ = TeINT;
-		(*itObjs).addProperty((double)numberNeighbors, rep, false);
-		
-		++itObjs;
-	}
-
-	return true;
-}
-
-double
-TeMoranIndex2 (TeSTElementSet* elemSet, const double& mean, const double& var, TeGeneralizedProxMatrix* proxMatrix, int indexAttr)
-{
-	double moran = 0;
-	TeSTElementSet::iterator itObjs = elemSet->begin();
-	int numberObjs = elemSet->numSTInstance();
-
-	while ( itObjs != elemSet->end())
-	{
-		double normObjVal = (*itObjs)[indexAttr] - mean;
-		double li = 0.;
-		double weightSum = 0.;
-
-		
-		TeNeighboursMap neighbors = proxMatrix->getMapNeighbours((*itObjs).objectId());
-		TeNeighboursMap::iterator itNeigs = neighbors.begin();
-
-		while(itNeigs != neighbors.end())
-		{
-			//retrieve the neighbor attribute value
-			double val;
-			if(!elemSet->getAttributeValue ((*itNeigs).first, indexAttr, val))
-				return 0.;
-									
-			 // normalize the property
-			double normNeighVal =  val - mean;
-
-			// find the weight associated with the neighbor (attribute of index 0)
-			double weight = (*itNeigs).second.Weight();
-			li +=  weight * ( normNeighVal )  * ( normObjVal );  // se dividir pela vari�ncia � o �ndice local de moran
-			weightSum += weight;
-			++itNeigs;
-		}
-
-		if (weightSum != 0.)
-			li /= weightSum;
-		
-
-		moran += li;
-
-		++itObjs;
-	}
-
-	if ( numberObjs > 1 )
-		return moran /  ( var * ( numberObjs - 1 ) );
-	else 
-		return moran / var;
-}
-
-double
-TeMoranIndex (TeSTElementSet* elemSet, int indexZ, int indexWZ)
-{
-	double variance = 0.;
-	double sum = 0;
-	int number = 0;
-
-	variance = TeSecondMoment (elemSet->begin(), elemSet->end(), 0, indexZ);  
-	TeSTElementSet::iterator it = elemSet->begin();
-	
-	while (it != elemSet->end())
-	{
-		double z = (*it)[indexZ];
-		double wz = (*it)[indexWZ];
-		double ZxWZ;
-		if(variance==0)
-			ZxWZ = 0.;
-		else
-			ZxWZ = (z*wz)/variance; 
-
-		//keep 
-		TeAttributeRep rep;
-		rep.name_ = "MoranIndex"; 
-		rep.type_ = TeREAL;
-		(*it).addProperty(ZxWZ, rep, false); 
-		
-		sum += ZxWZ;
-		number++; 
-		++it; 
-	}
-	
-	return sum /= number;
-}
-
-double
-TeGlobalMoranSignificance (TeSTElementSet* elemSet, TeGeneralizedProxMatrix* proxMatrix, int indexAttr,
-						   unsigned int permutationsNumber, double moranIndex)
-{
-	
-	vector<double> permutationsResults(permutationsNumber);
-	double significance;
-	
-	unsigned int objectsNumber = elemSet->numSTInstance();
-	
-	//progress bar
-	if(TeProgress::instance())
-		TeProgress::instance()->setTotalSteps(permutationsNumber);
-		
-	vector<double> deviations(objectsNumber);
-	vector<double>::iterator itDev = deviations.begin();
-	TeSTElementSet::iterator itObjs = elemSet->begin();
-	while(itObjs != elemSet->end())
-	{
-		(*itDev) = (*itObjs)[indexAttr]; //attribute value
-		++itObjs;
-		++itDev;
-	}
-
-	TeStatisticValMap stat;
-	if(!TeCalculateStatistics(elemSet->begin(), elemSet->end(), stat, 0))
-		return 0.;
-
-	double mean = stat[TeMEAN];
-	double var = stat[TeVARIANCE];
-
-	srand(time(0));	
-	unsigned int i;
-	for (i = 0; i < permutationsNumber; i++)
-	{
-		TeSTElementSet changedObjects;
-
-		itObjs = elemSet->begin();
-
-		// chande values 
-		while(itObjs != elemSet->end())
-		{
-			TeSTInstance stoChange; 
-			stoChange.objectId((*itObjs).objectId());
-
-			double ranaux = rand();
-			int randon = (int) ((ranaux * (objectsNumber-1))/RAND_MAX);
-			double value = deviations[randon];
-						
-			stoChange.addProperty(value);
-			
-			changedObjects.insertSTInstance (stoChange);
-			++itObjs;
-		}
-		
-		permutationsResults[i] = TeMoranIndex2 (&changedObjects, mean, var, proxMatrix, 0);
-
-		if(TeProgress::instance())
-		{
-			if (TeProgress::instance()->wasCancelled())
-			{
-				TeProgress::instance()->reset();
-				return 0.;
-			}
-			else
-				TeProgress::instance()->setProgress(i);
-		}
-	}
-
-	// verify the significance
-	int position = 0;
-	significance = 0;
-	unsigned int k;
-	for (k = 0; k < permutationsNumber; k++)
-	{
-		if (moranIndex < permutationsResults[k]) //>
-			position++;
-	}
-	if ( moranIndex >= 0)
-		significance = (double) (position+1) / (permutationsNumber+1);
-	else
-		significance = (double) (permutationsNumber-position)/(permutationsNumber+1);
-		
-	
-	if (TeProgress::instance())
-		TeProgress::instance()->reset();
-		
-	return significance;
-}
-
-
-void
-TeMoranMap (TeSTElementSet* elemSet, int indexLISAMap, int indexBoxMap)
-{
-	TeSTElementSet::iterator it = elemSet->begin();
-	while ( it != elemSet->end())
-	{
-		double result = 0.0;
-		int lisaMap = (int)((*it)[indexLISAMap]);
-
-		if (lisaMap != 0)
-			result = (*it)[indexBoxMap];
-				
-		//keep
-		TeAttributeRep rep;
-		rep.name_ = "MoranMap"; 
-		rep.type_ = TeREAL;
-		(*it).addProperty(result, rep, false); 
-
-		++it;
-	}
-}
-
-bool 
-TeGStatistics (TeSTElementSet* elemSet, TeGeneralizedProxMatrix* proxMatrix, int indexAttr)
-{
-
-	TeSTElementSet::iterator itObjs = elemSet->begin();
-	double totalSum = 0.;
-	double excludSum = 0.;
-
-	totalSum = TeSum(itObjs, elemSet->end(), indexAttr);
-	
-	itObjs = elemSet->begin();
-
-	//progress bar
-	int step = 0;
-	int numSteps = elemSet->numSTInstance();
-	if(TeProgress::instance())
-		TeProgress::instance()->setTotalSteps(numSteps);
-
-	while ( itObjs != elemSet->end() )
-	{
-		double valObj = (*itObjs)[indexAttr];
-		excludSum = totalSum - valObj;
-		
-		double G = 0;
-		double GStar = valObj;
-	
-		TeNeighboursMap neighbors = proxMatrix->getMapNeighbours((*itObjs).objectId());
-		TeNeighboursMap::iterator itNeigs = neighbors.begin();
-		int neigNumber = neighbors.size();
-
-		if(itNeigs != neighbors.end())
-		{
-			while(itNeigs != neighbors.end())
-			{
-				// retrieve the property value associated to this neighbor 
-				double val;
-				if(!elemSet->getAttributeValue ((*itNeigs).first, indexAttr, val))
-					return false;
-
-				G +=  val;
-				GStar +=  val;
-				
-				++itNeigs;
-			}
-
-			G /= neigNumber;
-			GStar /= (neigNumber+1);
-				
-			G /= excludSum; 
-			GStar /= totalSum;
-		}
-	
-		//insert the indexes in the sET
-		TeAttributeRep rep;
-		rep.name_ = "G"; 
-		rep.type_ = TeREAL;
-		(*itObjs).addProperty(G, rep, false); 
-
-		rep.name_ = "GStar";
-		(*itObjs).addProperty(GStar, rep, false); 
-
-		++itObjs;
-
-		if(TeProgress::instance())
-		{
-			if (TeProgress::instance()->wasCancelled())
-			{
-				TeProgress::instance()->reset();
-				return false;
-			}
-			else
-				TeProgress::instance()->setProgress(step);
-		}	
-		++step;
-	}
-	
-
-	if (TeProgress::instance())
-		TeProgress::instance()->reset();
-	return true;
-}
-
-void
-TeBoxMap (TeSTElementSet* elemSet, int indexZ, int indexWZ, double mean)
-{
-	
-	TeSTElementSet::iterator it_begin = elemSet->begin(); 
-	while ( it_begin != elemSet->end())
-	{
-		int result=0;
-
-		if ( ((*it_begin)[indexZ] >= mean) &&  ((*it_begin)[indexWZ] >= mean))   
-			result = 1;
-		else if ( ((*it_begin)[indexZ] < mean)  &&  ((*it_begin)[indexWZ] >= mean))	
-			result = 4;	
-		else if ( ((*it_begin)[indexZ] < mean)  &&  ((*it_begin)[indexWZ] < mean))
-			result = 2;		
-		else if ( ((*it_begin)[indexZ] >= mean) &&  ((*it_begin)[indexWZ] < mean))
-			result = 3;
-
-		//keep
-		TeAttributeRep rep;
-		rep.name_ = "BoxMap"; 
-		rep.type_ = TeINT;
-		(*it_begin).addProperty((double)result, rep, false); 
-
-		++it_begin;
-	}	
-}
-
-bool TeLisaStatisticalSignificance ( TeSTElementSet* elemSet, int indexZ, int indexLISA, 
-									 int indexNeighNum, int permutationsNumber) 
- {
-	double sum;
-	double WZperm;
-	double significance;
-
-	TeSTElementSet::iterator it = elemSet->begin();
-
-	double variance = TeSecondMoment (it, elemSet->end(), 0, indexZ);
-
-	int index = 0;
-	it = elemSet->begin();
-	int objectsNumber = elemSet->numSTInstance();
-
-	//progress bar
-	int step = 0;
-	if(TeProgress::instance())
-		TeProgress::instance()->setTotalSteps(objectsNumber);
-
-	vector<double> deviations(objectsNumber);
-	vector<double>::iterator it_dev = deviations.begin();
-	while(it != elemSet->end())
-	{
-		(*it_dev) = (*it)[indexZ];
-		++it;
-		++it_dev;
-	}
-
-	it = elemSet->begin();
-	srand(time(0));
-	while ( it != elemSet->end())
-	{
-		int neighborsNumber = (int)((*it)[indexNeighNum]);
-
-		vector<double> permut(permutationsNumber);
-		
-		for (int j = 0; j < permutationsNumber; j++)
-		{
-			int randon = 0;
-			sum = 0;
-			set<int> setNeigh;
-			for (int k = 0; k < neighborsNumber; k++)
-			{
-				double ranaux = rand();
-				randon = (int)((ranaux * (objectsNumber-1))/RAND_MAX);
-				if (index == randon || (setNeigh.find(randon) != setNeigh.end()) )
-					k--;	// raffle annulled	
-				else
-				{		
-					setNeigh.insert(randon);
-					sum += deviations[randon];
-				}
-			}
-
-			if(neighborsNumber==0)
-				WZperm = 0.;
-			else
-				WZperm = sum/neighborsNumber;
-
-			if(variance==0)
-				permut[j] = 0.;
-			else
-				permut[j] = deviations[index] * WZperm / variance;
-		}	
-
-		int position = 0;
-		for (int k = 0; k < permutationsNumber; k++)
-		{
-			if (((*it)[indexLISA]) > permut[k])
-				position++;
-		}
- 		if ( ((*it)[indexLISA]) >= 0)
-			significance = (double) (permutationsNumber-position)/(permutationsNumber+1);
-		else
-			significance = (double) position/( permutationsNumber + 1 );
-			
-		//keep
-		TeAttributeRep rep;
-		rep.name_ = "LISASig"; 
-		rep.type_ = TeREAL;
-		(*it).addProperty(significance, rep, false); 
-
-		++it;
-		++index;
-
-		if(TeProgress::instance())
-		{
-			if (TeProgress::instance()->wasCancelled())
-			{
-				TeProgress::instance()->reset();
-				return false;
-			}
-			else
-				TeProgress::instance()->setProgress(step);
-		}	
-		++step;
-	}
-
-	if (TeProgress::instance())
-		TeProgress::instance()->reset();
-
-	return true;
-}
-
-
-void
-TeLisaMap (TeSTElementSet* elemSet, int indexSignifLISA, int /* permutationNumber */)
-{
-	TeSTElementSet::iterator begin = elemSet->begin();
-	while (begin != elemSet->end())
-	{
-		int significanceClass = 0;
-		if ( ( (*begin)[indexSignifLISA] <= 0.001 ))  /*&& (permutationNumber >= 999)*/ 
-			significanceClass = 3;
-		else if ( ((*begin)[indexSignifLISA] <= 0.01) && ((*begin)[indexSignifLISA] > 0.001 )) /*&& (permutationNumber >= 99)*/ 
-			significanceClass = 2;
-		else if ( ((*begin)[indexSignifLISA] <= 0.05) && ((*begin)[indexSignifLISA] > 0.01))
-			significanceClass = 1;
-
-		//keep
-		TeAttributeRep rep;
-		rep.name_ = "LISAMap"; 
-		rep.type_ = TeINT;
-		(*begin).addProperty((double)significanceClass, rep, false); 
-
-		++begin;
-	}
-}
-
-
-
-
-
-
-
-
-
diff --git a/src/terralib/stat/TeSpatialStatistics.h b/src/terralib/stat/TeSpatialStatistics.h
old mode 100644
new mode 100755
index 75472bb..74a6b92
--- a/src/terralib/stat/TeSpatialStatistics.h
+++ b/src/terralib/stat/TeSpatialStatistics.h
@@ -1,6 +1,6 @@
 /************************************************************************************
 TerraLib - a library for developing GIS applications.
-Copyright � 2001-2004 INPE and Tecgraf/PUC-Rio.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
 
 This code is part of the TerraLib library.
 This library is free software; you can redistribute it and/or
@@ -20,11 +20,8 @@ In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for dir
 indirect, special, incidental, or consequential damages arising out of the use
 of this library and its documentation.
 *************************************************************************************/
-
 /*! \file TeSpatialStatistics.h
-    This file provides support for spatial statistics functions
-	\note for a general overview of spatial statistics, please see
-  "Spatial Data Analysis by Example", Bailey and  Gattrell
+    \brief This file provides support for spatial statistics functions
 */
 #ifndef  __TERRALIB_INTERNAL_SPATIALSTATISTICS_H
 #define  __TERRALIB_INTERNAL_SPATIALSTATISTICS_H
@@ -35,216 +32,136 @@ of this library and its documentation.
 #include <set>
 using namespace std;
 
-class TeSTEventSet;
-class TeSTElementSet;
-class TeGeneralizedProxMatrix;
-
+#include "TeStatistics.h"
+#include "TeProgress.h"
+#include "TeSTEvent.h"
+#include "TeNeighbours.h"
  
 /** @defgroup SpatialStatistics Spatial Statistics Algorithms
  *  TerraLib spatial statistics algorithms.
  *  @{
 */
 
-/*! \fn void TeLocalMean(TeSTEventSet* elemSet, ProxMatrix& proxMatrix, int indexAttr);
-    \brief calculates the local mean (WZ) and the number of neighbors for each object 
+/** Calculates the local mean of an attribute of and the number of neighbors for a set of objects
 	\param elemSet		a set of objects  
-	\param proxMatrix	proximity matrix  
-	\param indexAttr	the index of the objects which keeps the attributes  
+	\param proxMatrix	the proximity matrix of this object set  
+	\param indexAttr	the position in the objects vector of properties that contains the requested attribute 
+	\return the function adds two properties to the objects: "Local Mean" and "NumNeighbors" and returns true of false
 */
+template<typename Set, typename Matrix> 
 bool 
-TeLocalMean (TeSTEventSet* elemSet, TeGeneralizedProxMatrix* proxMatrix, int indexAttr=0); 
-
+TeLocalMean (Set* elemSet, Matrix* proxMatrix, int indexAttr=0); 
 
-/*! \fn void TeLocalMean(TeSTElementSet* elemSet, ProxMatrix& proxMatrix, int indexAttr);
-    \brief calculates the local mean (WZ) and the number of neighbors for each object 
+/** Calculates the standard deviation of an attribute and the local mean of the standard deviation  for a set of objects
 	\param elemSet		a set of objects  
-	\param proxMatrix	proximity matrix  
-	\param indexAttr	the index of the objects which keeps the attributes  
+	\param proxMatrix	the proximity matrix of this object set  
+	\param indexAttr	the position in the objects vector of properties that contains the requested attribute 
+	\return the function adds two properties to the objects: "Z" and "WZ" and returns true of false
 */
+template<typename Set, typename Matrix>  
 bool 
-TeLocalMean (TeSTElementSet* elemSet, TeGeneralizedProxMatrix* proxMatrix, int indexAttr=0); 
-
+TeZAndWZ (Set* elemSet, Matrix* proxMatrix, int indexAttr);
 
 /** @defgroup TeMoranIndex Moran Index Algorithm
  *  @ingroup SpatialStatistics
  *  @{
 */
 
-/*! \fn double TeMoranIndex2 (TeSTEventSet* elemSet, ProxMatrix& proxMatrix, int indexAttr)
-    \brief calculates the local moran index for each object and returns the global moran index  
-	\param elemSet		a set of objects 
-	\param proxMatrix	proximity matrix  
-	\param indexAttr	the index of the objects which keeps the attributes  
-*/
-double
-TeMoranIndex2 (TeSTEventSet* elemSet, const double& mean, const double& var, TeGeneralizedProxMatrix* proxMatrix, int indexAttr=0); 
-
-/*! \fn double TeMoranIndex2 (TeSTElementSet* elemSet, ProxMatrix& proxMatrix, int indexAttr)
-    \brief calculates the local moran index for each object and returns the global moran index  
-	\param elemSet		a set of objects 
-	\param proxMatrix	proximity matrix  
-	\param indexAttr	the index of the objects which keeps the attributes  
-*/
-double
-TeMoranIndex2 (TeSTElementSet* elemSet, const double& mean, const double& var, TeGeneralizedProxMatrix* proxMatrix, int indexAttr=0); 
-
-
-/*! \fn double TeMoranIndex (TeSTEventSet* elemSet, int indexZ, int indexWZ)
-    \brief calculates the local moran index (WZ) for each object and returns the global moran index  
+/** Calculates the Global Moran index of an attribute  for a set of objects 
 	\param elemSet		a set of objects 
-	\param indexZ		the index of the objects which keeps the deviations (Z)    
-	\param indexWZ		the index of the objects which keeps the local mean deviations (WZ) 
+	\param mean			the global mean for the choosen the atrribute
+	\param var			the variance for the choosen the atrribute
+	\param proxMatrix	the proximity matrix of this object set  
+	\param indexAttr	the position in the objects vector of properties that contains the requested attribute  
+	\return the Global Moran index
 */
+template<typename Set, typename Matrix> 
 double
-TeMoranIndex (TeSTEventSet* elemSet, int indexZ, int indexWZ); 
+TeMoranIndex2 (Set* elemSet, const double& mean, const double& var, Matrix* proxMatrix, int indexAttr=0); 
 
-/*! \fn double TeMoranIndex (TeSTElementSet* elemSet, int indexZ, int indexWZ)
-    \brief calculates the local moran index (WZ) for each object and returns the global moran index  
+/** Calculates the Local and the Global Moran index of an attribute for a set of objects
 	\param elemSet		a set of objects 
-	\param indexZ		the index of the objects which keeps the deviations (Z)    
-	\param indexWZ		the index of the objects which keeps the local mean deviations (WZ) 
+	\param indexZ		the position in the objects vector of properties that contains the deviations (Z)    
+	\param indexWZ		the position in the objects vector of properties that contains the local mean deviations (WZ) 
+	\return the function adds one property to the objects: "MoranIndex" and returns the Global Moran index
 */
+template<typename Set> 
 double
-TeMoranIndex (TeSTElementSet* elemSet, int indexZ, int indexWZ); 
+TeMoranIndex (Set* elemSet, int indexZ, int indexWZ); 
 
-/*! \fn double TeGlobalMoranSignificance (TeSTEventSet* elemSet, ProxMatrix& proxMatrix, int indexZ, unsigned int permutationsNumber, double moranIndex)
-    \brief calculates and returns the global moran significance    
-	\param elemSet		a set of objects  
-	\param proxMatrix	proximity matrix      
-	\param indexZ		the index of the objects which keeps the deviations (Z)    
-	\param permutationsNumber	number of the permutations used to calculate the significance
-	\param moranIndex	the global moran index 
-*/
-double
-TeGlobalMoranSignificance (TeSTEventSet* elemSet, TeGeneralizedProxMatrix* proxMatrix, int indexAttr,
-						   unsigned int permutationsNumber, double moranIndex); 
 
-/*! \fn double TeGlobalMoranSignificance (TeSTElementSet* elemSet, ProxMatrix& proxMatrix, int indexZ, unsigned int permutationsNumber, double moranIndex)
-    \brief calculates and returns the global moran significance    
-	\param elemSet		a set of objects  
-	\param proxMatrix	proximity matrix      
-	\param indexZ		the index of the objects which keeps the deviations (Z)    
+/** Calculates the Global Moran significance of an attribute  for a set of objects  
+	\param elemSet				a set of objects  
+	\param proxMatrix			the proximity matrix of this object set   
+	\param indexAttr			the position in the objects vector of properties that contains the deviations (Z)    
 	\param permutationsNumber	number of the permutations used to calculate the significance
-	\param moranIndex	the global moran index 
+	\param moranIndex			the Global Moran index 
+	\return the Global Moran significance
 */
+template<typename Set, typename Matrix> 
 double
-TeGlobalMoranSignificance (TeSTElementSet* elemSet, TeGeneralizedProxMatrix* proxMatrix, int indexAttr,
+TeGlobalMoranSignificance (Set* elemSet, Matrix* proxMatrix, int indexAttr,
 						   unsigned int permutationsNumber, double moranIndex); 
 
 
-
-/*! \fn void TeMoranMap (TeSTEventSet* elemSet, int indexLISAMap, int indexBoxMap)
-    \brief classifies the objects based in the scatterplot of moran index and statistical significance
+/** Classifies the objects based in the scatterplot of Moran index and its statistical significance
 	\param elemSet		a set of objects 
-	\param indexLISAMap	the index of the objects which keeps the statistical significances of the moran local indexes (LISA) 
-	\param indexBoxMap	the index of the objects which keeps the classifications of the statistical significance of the moran local indexes 
+	\param indexLISAMap	the position in the objects vector of properties that contains the statistical significances of the moran local indexes (LISA) 
+	\param indexBoxMap	the position in the objects vector of properties that contains the classifications of the statistical significance of the moran local indexes 
+	\return the function adds one property to the objects: "MoranMap"
 */
+template<typename Set> 
 void
-TeMoranMap (TeSTEventSet* elemSet, int indexLISAMap, int indexBoxMap); 
-
-/*! \fn void TeMoranMap (TeSTElementSet* elemSet, int indexLISAMap, int indexBoxMap)
-    \brief classifies the objects based in the scatterplot of moran index and statistical significance
-	\param elemSet		a set of objects 
-	\param indexLISAMap	the index of the objects which keeps the statistical significances of the moran local indexes (LISA) 
-	\param indexBoxMap	the index of the objects which keeps the classifications of the statistical significance of the moran local indexes 
-*/
-void
-TeMoranMap (TeSTElementSet* elemSet, int indexLISAMap, int indexBoxMap); 
-
+TeMoranMap (Set* elemSet, int indexLISAMap, int indexBoxMap); 
 
 /** @} */ 
 
-/*! \fn void TeGStatistics (TeSTEventSet* elemSet, ProxMatrix& proxMatrix, int indexAttr)
-    \brief calculates the G and G* statistics for each object 
+/** Calculates the G and G* statistics of an attribute  for a set of objects 
 	\param elemSet		a set of objects 
-	\param proxMatrix	proximity matrix      
-	\param indexAttr	the index of the objects which keeps the attributes  
+	\param proxMatrix	the proximity matrix of this object set      
+	\param indexAttr	the position in the objects vector of properties that contains the requested attribute  
+	\return the function adds two properties to the objects: "G" and "GStar"
 */
-bool 
-TeGStatistics (TeSTEventSet* elemSet, TeGeneralizedProxMatrix* proxMatrix, int indexAttr=0 ); 
+template<typename Set, typename Matrix> bool 
+TeGStatistics (Set* elemSet, Matrix* proxMatrix, int indexAttr=0 ); 
 
 
-/*! \fn void TeGStatistics (TeSTElementSet* elemSet, ProxMatrix& proxMatrix, int indexAttr)
-    \brief calculates the G and G* statistics for each object 
+/** Classifies the objects in quadrants based in the scatterplot of moran index 
 	\param elemSet		a set of objects 
-	\param proxMatrix	proximity matrix      
-	\param indexAttr	the index of the objects which keeps the attributes  
-*/
-bool 
-TeGStatistics (TeSTElementSet* elemSet, TeGeneralizedProxMatrix* proxMatrix, int indexAttr=0 ); 
-
-
-
-/*! \fn void TeBoxMap (TeSTEventSet* elemSet, int indexZ, int indexWZ, double mean)
-    \brief classifies the objects in quadrants based in the scatterplot of moran index 
-	\param elemSet		a set of objects 
-	\param indexZ		the index of the objects which keeps the deviations (Z)    
-	\param indexWZ		the index of the objects which keeps the local mean deviations (WZ) 
+	\param indexZ		the position in the objects vector of properties that contains the deviations (Z)    
+	\param indexWZ		the position in the objects vector of properties that contains the local mean deviations (WZ) 
 	\param mean			the global mean
+	\return the function adds one property to the objects: "BoxMap"
 */
-void
-TeBoxMap (TeSTEventSet* elemSet, int indexZ, int indexWZ, double mean); 
-
+template<typename Set> void
+TeBoxMap (Set* elemSet, int indexZ, int indexWZ, double mean); 
 
-/*! \fn void TeBoxMap (TeSTElementSet* elemSet, int indexZ, int indexWZ, double mean)
-    \brief classifies the objects in quadrants based in the scatterplot of moran index 
+/** Evaluates the statistical significance of the moran local indexes (LISA) 
 	\param elemSet		a set of objects 
-	\param indexZ		the index of the objects which keeps the deviations (Z)    
-	\param indexWZ		the index of the objects which keeps the local mean deviations (WZ) 
-	\param mean			the global mean
-*/
-void
-TeBoxMap (TeSTElementSet* elemSet, int indexZ, int indexWZ, double mean); 
-
-
-
-/*! \fn void TeLisaStatisticalSignificance ( TeSTEventSet* elemSet, int indexZ, int indexLISA, int indexNeighNum, int permutationsNumber)
-    \brief evaluates the statistical significance of the moran local indexes (LISA) 
-	\param elemSet		a set of objects 
-	\param indexZ		the index of the objects which keeps the deviations (Z)    
-	\param indexLISA	the index of the objects which keeps the local moran indexes (LISA) 
-	\param indexNeighNum		the index of the objects which keeps the numbers of neighbours  
+	\param indexZ		the position in the objects vector of properties that contains the deviations (Z)    
+	\param indexLISA	the position in the objects vector of properties that contains the local moran indexes (LISA) 
+	\param indexNeighNum		the position in the objects vector of properties that contains the the numbers of neighbours of an object  
 	\param permutationsNumber	number of the permutations used to evaluate the significance
+	\return the function adds one property to the objects: "LISASig"
 */
-bool TeLisaStatisticalSignificance ( TeSTEventSet* elemSet, int indexZ, int indexLISA, 
-									 int indexNeighNum, int permutationsNumber);  
- 
-/*! \fn void TeLisaStatisticalSignificance ( TeSTElementSet* elemSet, int indexZ, int indexLISA, int indexNeighNum, int permutationsNumber)
-    \brief evaluates the statistical significance of the moran local indexes (LISA) 
-	\param elemSet		a set of objects 
-	\param indexZ		the index of the objects which keeps the deviations (Z)    
-	\param indexLISA	the index of the objects which keeps the local moran indexes (LISA) 
-	\param indexNeighNum		the index of the objects which keeps the numbers of neighbours  
-	\param permutationsNumber	number of the permutations used to evaluate the significance
-*/
-bool TeLisaStatisticalSignificance ( TeSTElementSet* elemSet, int indexZ, int indexLISA, 
-									 int indexNeighNum, int permutationsNumber);  
-
-
-/*! \fn void TeLisaMap ( TeSTEventSet* elemSet, int indexSignifLISA, int permutationNumber)
-    \brief classifies the objects based in the statistical significance of the moran local indexes (LISA) 
-	\param elemSet				a set of objects  
-	\param indexSignifLISA		the index of the objects which keeps the statistical significances of the local moran indexes (LISA) 
-	\param permutationNumber	number of the permutations used to evaluate the significance
-*/
-void
-TeLisaMap (TeSTEventSet* elemSet, int indexSignifLISA, int /* permutationNumber */); 
+template<typename Set> bool 
+TeLisaStatisticalSignificance ( Set* elemSet, int indexZ, int indexLISA, int indexNeighNum, int permutationsNumber);  
 
 
-/*! \fn void TeLisaMap ( TeSTElementSet* elemSet, int indexSignifLISA, int permutationNumber)
-    \brief classifies the objects based in the statistical significance of the moran local indexes (LISA) 
+/** Classifies the objects based in the statistical significance of the moran local indexes (LISA) 
 	\param elemSet				a set of objects  
-	\param indexSignifLISA		the index of the objects which keeps the statistical significances of the local moran indexes (LISA) 
+	\param indexSignifLISA		the position in the objects vector of properties that contains the statistical significances of the local moran indexes (LISA) 
 	\param permutationNumber	number of the permutations used to evaluate the significance
+	\return the function adds one property to the objects: "LISAMap"
 */
-void
-TeLisaMap (TeSTElementSet* elemSet, int indexSignifLISA, int /* permutationNumber */); 
+template<typename Set> void
+TeLisaMap (Set* elemSet, int indexSignifLISA, int /* permutationNumber */); 
 
-/** @defgroup BayesEstimation Bayes estimation Algorithm
+/** @defgroup ContBayesEstimation Bayes Estimation from general containers
  *  @ingroup SpatialStatistics
  *  @{
 */
-//! Calculates the empirical Bayes estimation
+/** Calculates the empirical Bayes estimation from a container of values */
 template <typename It> void
 TeEmpiricalBayes (It rBegin, It rEnd, It n, double mean, double variance, It bayes)
 {
@@ -257,7 +174,7 @@ TeEmpiricalBayes (It rBegin, It rEnd, It n, double mean, double variance, It bay
 	}
 }
 
-//! Calculates the local Bayes estimation
+//* Calculates the Local Bayes estimation from a container of values */
 template <typename It> void
 TeSpatialEmpiricalBayes (It rBegin, It rEnd, It n, It mean, It variance, It bayes)
 {
@@ -273,11 +190,607 @@ TeSpatialEmpiricalBayes (It rBegin, It rEnd, It n, It mean, It variance, It baye
 /** @} */ 
 /** @} */ 
 
-/** \example STObjectSetExample3.cpp
- *	This is an example of how to use spatial statistic algorithms from 
-	a Spatial Temporal Object Set (STObjectSet) and proximity matrix.
- */
+// --- Template function implementation ---
+template<typename Set, typename Matrix>  bool 
+TeLocalMean (Set* elemSet, Matrix* proxMatrix, int indexAttr)
+{
+	typename Set::iterator itObjs = elemSet->begin();
+	int numberNeighbors;
+
+	if(!proxMatrix->getWeightsParams())
+		return false;
+	bool isNorm = proxMatrix->getWeightsParams()->norm_;
+
+	//adds the attributes in the set
+	TeAttribute att;
+	att.rep_.type_ = TeREAL;
+	att.rep_.decimals_ = 15;
+	att.rep_.name_ = "LocalMean";
+
+	elemSet->addProperty(att);
+	
+	att.rep_.name_  = "NumNeighbors";
+	att.rep_.type_ = TeINT;
+	elemSet->addProperty(att);
+
+	while (itObjs != elemSet->end())
+	{
+		double sum = 0.;
+		double localMean = 0.;
+
+		TeNeighboursMap neighbors = proxMatrix->getMapNeighbours((*itObjs).objectId());
+		typename TeNeighboursMap::iterator itNeigs = neighbors.begin();
+		numberNeighbors = neighbors.size();
+		
+		while(itNeigs != neighbors.end())
+		{
+			//retrieve the neighbor attribute value
+			string valAux;
+			string objIdAux = (*itNeigs).first;
+			if(!elemSet->getAttributeValue(objIdAux, indexAttr, valAux))
+				return false;
+			double val = atof(valAux.c_str());
+						
+			// find the weight associated with the neighbor (attribute of index 0)
+			double weight = (*itNeigs).second.Weight();
+			//verify if the weight is normalized by number of neighbours
+			if(!isNorm)
+				weight = weight/numberNeighbors;
+			sum +=  weight * val;  
+			++itNeigs;
+		}
+
+		localMean = sum;
+		
+		(*itObjs).addPropertyValue(Te2String(localMean,9));
+		(*itObjs).addPropertyValue(Te2String(numberNeighbors)); 
+		
+		++itObjs;
+	}
+
+	return true;
+}
+
+template<typename Set, typename Matrix>  
+bool 
+TeZAndWZ (Set* elemSet, Matrix* proxMatrix, int indexAttr)
+{
+	// calculate the standard deviation Z
+	double mean = TeFirstMoment (elemSet->begin(), elemSet->end(), 0); 
+
+	TeAttribute att;
+	att.rep_.type_ = TeREAL;
+	att.rep_.decimals_ = 15;
+	att.rep_.name_ = "Z";
+	elemSet->addProperty(att);
+
+	typename Set::iterator it = elemSet->begin();
+	while (it != elemSet->end())
+	{
+		double val = (*it)[indexAttr];
+		(*it).addPropertyValue(Te2String((val-mean), 9)); 
+		++it;
+	}
+
+	int indexZ = elemSet->getAttributeList().size()-1;
+
+	// calculate the local mean of Z (WZ)
+	att.rep_.name_ = "WZ";
+	att.rep_.type_ = TeREAL;
+	elemSet->addProperty(att);
+	
+	typename Set::iterator itObjs = elemSet->begin();
+	int numberNeighbors;
+
+	if(!proxMatrix->getWeightsParams())
+		return false;
+	bool isNorm = proxMatrix->getWeightsParams()->norm_;
+
+	while (itObjs != elemSet->end())
+	{
+		double sum = 0.;
+		TeNeighboursMap neighbors = proxMatrix->getMapNeighbours((*itObjs).objectId());
+		typename TeNeighboursMap::iterator itNeigs = neighbors.begin();
+		numberNeighbors = neighbors.size();
+		
+		while(itNeigs != neighbors.end())
+		{
+			//retrieve the neighbor attribute value
+			string valAux;
+			string objIdAux = (*itNeigs).first;
+			if(!elemSet->getAttributeValue(objIdAux, indexZ, valAux))
+				return false;
+			double val = atof(valAux.c_str());
+						
+			// find the weight associated with the neighbor (attribute of index 0)
+			double weight = (*itNeigs).second.Weight();
+			//verify if the weight is normalized by number of neighbours
+			if(!isNorm)
+				weight = weight/numberNeighbors;
+			sum +=  weight * val;  
+			++itNeigs;
+		}
+		(*itObjs).addPropertyValue(Te2String(sum,9));	
+		++itObjs;
+	}
+	return true;
+}
+
+template<typename Set, typename Matrix> double
+TeMoranIndex2 (Set* elemSet, const double& mean, const double& var, Matrix* proxMatrix, int indexAttr)
+{
+	double moran = 0;
+	typename Set::iterator itObjs = elemSet->begin();
+	int numberObjs = elemSet->numSTInstance();
+	if(!proxMatrix->getWeightsParams())
+		return false;
+	bool isNorm = proxMatrix->getWeightsParams()->norm_;
+
+	while ( itObjs != elemSet->end())
+	{
+		double normObjVal = (*itObjs)[indexAttr] - mean;
+		double li = 0.;
+		double weightSum = 0.;
+
+		
+		TeNeighboursMap neighbors = proxMatrix->getMapNeighbours((*itObjs).objectId());
+		typename TeNeighboursMap::iterator itNeigs = neighbors.begin();
+		int numberNeighbors = neighbors.size();
+
+		while(itNeigs != neighbors.end())
+		{
+			//retrieve the neighbor attribute value
+			string valAux; 
+			string objIdAux = (*itNeigs).first;
+			if(!elemSet->getAttributeValue (objIdAux, indexAttr, valAux))
+				return 0.;
+			double val = atof(valAux.c_str());	
+
+			 // normalize the property
+			double normNeighVal =  val - mean;
+
+			// find the weight associated with the neighbor (attribute of index 0)
+			double weight = (*itNeigs).second.Weight();
+			//verify if the weight is normalized by number of neighbours
+			if(!isNorm)
+				weight = weight/numberNeighbors;
+			li +=  weight * ( normNeighVal )  * ( normObjVal );  // se dividir pela vari�ncia � o �ndice local de moran
+			weightSum += weight;
+			++itNeigs;
+		}
+
+		if (weightSum != 0.)
+			li /= weightSum;
+		
+		moran += li;
+
+		++itObjs;
+	}
+
+	if ( numberObjs > 1 )
+		return moran /  ( var * ( numberObjs - 1 ) );
+	else 
+		return moran / var;
+}
+
+template<typename Set> double
+TeMoranIndex (Set* elemSet, int indexZ, int indexWZ)
+{
+	double variance = 0.;
+	double sum = 0;
+	int number = 0;
+
+	variance = TeSecondMoment (elemSet->begin(), elemSet->end(), 0, indexZ);  
+	typename Set::iterator it = elemSet->begin();
+
+	//keep 
+	TeAttribute att;
+	att.rep_.type_ = TeREAL;
+	att.rep_.decimals_ = 15;
+	att.rep_.name_ = "MoranIndex"; 
+	elemSet->addProperty(att); 
+	
+	while (it != elemSet->end())
+	{
+		double z = (*it)[indexZ];
+		double wz = (*it)[indexWZ];
+		double ZxWZ;
+		if(variance==0)
+			ZxWZ = 0.;
+		else
+			ZxWZ = (z*wz)/variance; 
+
+		//keep 
+		(*it).addPropertyValue(Te2String(ZxWZ, 9)); 
+		
+		sum += ZxWZ;
+		number++; 
+		++it; 
+	}
+	
+	return sum /= number;
+}
+
+template<typename Set, typename Matrix> double
+TeGlobalMoranSignificance (Set* elemSet, Matrix* proxMatrix, int indexAttr,
+						   unsigned int permutationsNumber, double moranIndex)
+{
+	
+	vector<double> permutationsResults(permutationsNumber);
+	double significance;
+	
+	unsigned int objectsNumber = elemSet->numSTInstance();
+	
+	//progress bar
+	if(TeProgress::instance())
+		TeProgress::instance()->setTotalSteps(permutationsNumber);
+		
+	vector<double> deviations(objectsNumber);
+	vector<double>::iterator itDev = deviations.begin();
+	typename Set::iterator itObjs = elemSet->begin();
+	while(itObjs != elemSet->end())
+	{
+		(*itDev) = (*itObjs)[indexAttr]; //attribute value
+		++itObjs;
+		++itDev;
+	}
+
+	TeStatisticValMap stat;
+	if(!TeCalculateStatistics(elemSet->begin(), elemSet->end(), stat, 0))
+		return 0.;
+
+	double mean = stat[TeMEAN];
+	double var = stat[TeVARIANCE];
+
+	srand(time(0));	
+	unsigned int i;
+	for (i = 0; i < permutationsNumber; i++)
+	{
+		Set changedObjects;
+		if(elemSet->getTheme())
+			changedObjects.setTheme(elemSet->getTheme());
+		else if(elemSet->getLayer())
+			changedObjects.setLayer(elemSet->getLayer());
+
+		changedObjects.setAttributeList(elemSet->getAttributeList());
+
+		itObjs = elemSet->begin();
+
+		// chande values 
+		while(itObjs != elemSet->end())
+		{
+			TeSTEvent stoChange;
+			stoChange.objectId((*itObjs).objectId());
+
+			double ranaux = rand();
+			int randon = (int) ((ranaux * (objectsNumber-1))/RAND_MAX);
+			double value = deviations[randon];
+			stoChange.addPropertyValue(Te2String(value,9));
+			changedObjects.insertSTInstance (stoChange);
+			++itObjs;
+		}
+		
+		permutationsResults[i] = TeMoranIndex2 (&changedObjects, mean, var, proxMatrix, 0);
+
+		if(TeProgress::instance())
+		{
+			if (TeProgress::instance()->wasCancelled())
+			{
+				TeProgress::instance()->reset();
+				return 0.;
+			}
+			else
+				TeProgress::instance()->setProgress(i);
+		}
+	}
+
+	// verify the significance
+	int position = 0;
+	significance = 0;
+	unsigned int k;
+	for (k = 0; k < permutationsNumber; k++)
+	{
+		if (moranIndex < permutationsResults[k]) //>
+			position++;
+	}
+	if ( moranIndex >= 0)
+		significance = (double) (position+1) / (permutationsNumber+1);
+	else
+		significance = (double) (permutationsNumber-position)/(permutationsNumber+1);
+		
+	
+	if (TeProgress::instance())
+		TeProgress::instance()->reset();
+		
+	return significance;
+}
+
+
+template<typename Set>  void
+TeMoranMap (Set* elemSet, int indexLISAMap, int indexBoxMap)
+{
+	//keep
+	TeAttribute att;
+	att.rep_.decimals_ = 15;
+	att.rep_.type_ = TeREAL;
+	att.rep_.name_ = "MoranMap"; 
+	elemSet->addProperty(att); 
+
+	typename Set::iterator it = elemSet->begin();
+	while ( it != elemSet->end())
+	{
+		double result = 0.0;
+		int lisaMap = (int)((*it)[indexLISAMap]);
+
+		if (lisaMap != 0)
+			result = (*it)[indexBoxMap];
+				
+		//keep
+		(*it).addPropertyValue(Te2String(result, 9)); 
+
+		++it;
+	}
+}
 
+template<typename Set, typename Matrix>  bool 
+TeGStatistics (Set* elemSet, Matrix* proxMatrix, int indexAttr)
+{
+
+	typename Set::iterator itObjs = elemSet->begin();
+	double totalSum = 0.;
+	double excludSum = 0.;
+
+	totalSum = TeSum(itObjs, elemSet->end(), indexAttr);
+	
+	itObjs = elemSet->begin();
+
+	//progress bar
+	int step = 0;
+	int numSteps = elemSet->numSTInstance();
+	if(TeProgress::instance())
+		TeProgress::instance()->setTotalSteps(numSteps);
+
+	//adds the index attributes in the sET
+	TeAttribute att;
+	att.rep_.name_ = "G"; 
+	att.rep_.type_ = TeREAL;
+	att.rep_.decimals_ = 15;
+	elemSet->addProperty(att); 
+	
+	att.rep_.name_ = "GStar";
+	elemSet->addProperty(att); 
+	
+	while ( itObjs != elemSet->end() )
+	{
+		double valObj = (*itObjs)[indexAttr];
+		excludSum = totalSum - valObj;
+		
+		double G = 0;
+		double GStar = valObj;
+	
+		TeNeighboursMap neighbors = proxMatrix->getMapNeighbours((*itObjs).objectId());
+		typename TeNeighboursMap::iterator itNeigs = neighbors.begin();
+		int neigNumber = neighbors.size();
+
+		if(itNeigs != neighbors.end())
+		{
+			while(itNeigs != neighbors.end())
+			{
+				// retrieve the property value associated to this neighbor 
+				double val;
+				string valAux;
+				string objIdAux = (*itNeigs).first;
+				if(!elemSet->getAttributeValue (objIdAux, indexAttr, valAux))
+					return false;
+				val = atof(valAux.c_str());
+				G +=  val;
+				GStar +=  val;
+				
+				++itNeigs;
+			}
+
+			G /= neigNumber;
+			GStar /= (neigNumber+1);
+				
+			G /= excludSum; 
+			GStar /= totalSum;
+		}
+	
+		//insert the index G in the set
+		(*itObjs).addPropertyValue(Te2String(G, 9)); 
+		//insert the index GStar in the set
+		(*itObjs).addPropertyValue(Te2String(GStar,9)); 
+
+		++itObjs;
+
+		if(TeProgress::instance())
+		{
+			if (TeProgress::instance()->wasCancelled())
+			{
+				TeProgress::instance()->reset();
+				return false;
+			}
+			else
+				TeProgress::instance()->setProgress(step);
+		}	
+		++step;
+	}
+	
+
+	if (TeProgress::instance())
+		TeProgress::instance()->reset();
+	return true;
+}
+
+template<typename Set>  void
+TeBoxMap (Set* elemSet, int indexZ, int indexWZ, double mean)
+{	
+	//keep in the set
+	TeAttribute att;
+	att.rep_.name_ = "BoxMap"; 
+	att.rep_.type_ = TeINT;
+	elemSet->addProperty(att);
+
+	typename Set::iterator it_begin = elemSet->begin(); 
+	while ( it_begin != elemSet->end())
+	{
+		int result=0;
+
+		if ( ((*it_begin)[indexZ] >= mean) &&  ((*it_begin)[indexWZ] >= mean))   
+			result = 1;
+		else if ( ((*it_begin)[indexZ] < mean)  &&  ((*it_begin)[indexWZ] >= mean))	
+			result = 4;	
+		else if ( ((*it_begin)[indexZ] < mean)  &&  ((*it_begin)[indexWZ] < mean))
+			result = 2;		
+		else if ( ((*it_begin)[indexZ] >= mean) &&  ((*it_begin)[indexWZ] < mean))
+			result = 3;
+
+		(*it_begin).addPropertyValue(Te2String(result)); 
+
+		++it_begin;
+	}	
+}
+
+template<typename Set>  bool
+TeLisaStatisticalSignificance (Set* elemSet, int indexZ, int indexLISA, 
+									 int indexNeighNum, int permutationsNumber) 
+ {
+	double sum;
+	double WZperm;
+	double significance;
+
+	typename Set::iterator it = elemSet->begin();
+
+	double variance = TeSecondMoment (it, elemSet->end(), 0, indexZ);
+
+	int index = 0;
+	it = elemSet->begin();
+	int objectsNumber = elemSet->numSTInstance();
+
+	//progress bar
+	int step = 0;
+	if(TeProgress::instance())
+		TeProgress::instance()->setTotalSteps(objectsNumber);
+
+	vector<double> deviations(objectsNumber);
+	vector<double>::iterator it_dev = deviations.begin();
+	while(it != elemSet->end())
+	{
+		(*it_dev) = (*it)[indexZ];
+		++it;
+		++it_dev;
+	}
+
+	it = elemSet->begin();
+	srand(time(0));
+
+	//keep
+	TeAttribute att;
+	att.rep_.name_ = "LISASig"; 
+	att.rep_.type_ = TeREAL;
+	att.rep_.decimals_ = 15;
+	elemSet->addProperty(att); 
+
+	while ( it != elemSet->end())
+	{
+		int neighborsNumber = (int)((*it)[indexNeighNum]);
+
+		vector<double> permut(permutationsNumber);
+		
+		for (int j = 0; j < permutationsNumber; j++)
+		{
+			int randon = 0;
+			sum = 0;
+			set<int> setNeigh;
+			for (int k = 0; k < neighborsNumber; k++)
+			{
+				double ranaux = rand();
+				randon = (int)((ranaux * (objectsNumber-1))/RAND_MAX);
+				if (index == randon || (setNeigh.find(randon) != setNeigh.end()) )
+					k--;	// raffle annulled	
+				else
+				{		
+					setNeigh.insert(randon);
+					sum += deviations[randon];
+				}
+			}
+
+			if(neighborsNumber==0)
+				WZperm = 0.;
+			else
+				WZperm = sum/neighborsNumber;
+
+			if(variance==0)
+				permut[j] = 0.;
+			else
+				permut[j] = deviations[index] * WZperm / variance;
+		}	
+
+		int position = 0;
+		for (int k = 0; k < permutationsNumber; k++)
+		{
+			if (((*it)[indexLISA]) > permut[k])
+				position++;
+		}
+ 		if ( ((*it)[indexLISA]) >= 0)
+			significance = (double) (permutationsNumber-position)/(permutationsNumber+1);
+		else
+			significance = (double) position/( permutationsNumber + 1 );
+			
+		(*it).addPropertyValue(Te2String(significance, 9)); 
+
+		++it;
+		++index;
+
+		if(TeProgress::instance())
+		{
+			if (TeProgress::instance()->wasCancelled())
+			{
+				TeProgress::instance()->reset();
+				return false;
+			}
+			else
+				TeProgress::instance()->setProgress(step);
+		}	
+		++step;
+	}
+
+	if (TeProgress::instance())
+		TeProgress::instance()->reset();
+
+	return true;
+}
+
+
+template<typename Set> void 
+TeLisaMap (Set* elemSet, int indexSignifLISA, int /* permutationNumber */)
+{
+	//keep
+	TeAttribute att;
+	att.rep_.name_ = "LISAMap"; 
+	att.rep_.type_ = TeINT;
+	elemSet->addProperty(att); 
+
+	typename Set::iterator begin = elemSet->begin();
+	while (begin != elemSet->end())
+	{
+		int significanceClass = 0;
+		if ( ( (*begin)[indexSignifLISA] <= 0.001 ))  /*&& (permutationNumber >= 999)*/ 
+			significanceClass = 3;
+		else if ( ((*begin)[indexSignifLISA] <= 0.01) && ((*begin)[indexSignifLISA] > 0.001 )) /*&& (permutationNumber >= 99)*/ 
+			significanceClass = 2;
+		else if ( ((*begin)[indexSignifLISA] <= 0.05) && ((*begin)[indexSignifLISA] > 0.01))
+			significanceClass = 1;
+
+		//keep
+		(*begin).addPropertyValue(Te2String(significanceClass));
+
+		++begin;
+	}
+}
 
+/*! \example proxMatrixAndSpatialStatistics.cpp
+	Shows how to create a proximity matrix from a Spatial Temporal Element Set (STElementSet) and calculate spatial statistics
+   */
 #endif
 
diff --git a/src/terralib/stat/TeStatDataStructures.cpp b/src/terralib/stat/TeStatDataStructures.cpp
old mode 100644
new mode 100755
index 4b9e726..4782bd3
--- a/src/terralib/stat/TeStatDataStructures.cpp
+++ b/src/terralib/stat/TeStatDataStructures.cpp
@@ -1,7 +1,6 @@
 /************************************************************************************
 Exploring and analysis of geographical data using TerraLib and TerraView
-
-Copyright � 2003,2004 INPE and LESTE/UFMG.
+Copyright � 2003-2007 INPE and LESTE/UFMG.
 
 Partially funded by CNPq - Project SAUDAVEL, under grant no. 552044/2002-4,
 SENASP-MJ and INPE
@@ -31,7 +30,7 @@ TeSTStatInstance::TeSTStatInstance(int nDlbProp) : TeSTInstance()
 }
 
         
-TeSTStatInstance::TeSTStatInstance(TeSTInstance other, int nd, int ad): TeSTInstance(other)
+TeSTStatInstance::TeSTStatInstance(TeSTInstance& other, int nd, int ad): TeSTInstance(other)
 {
       initDbl(nd+ad);
       int n;
@@ -55,25 +54,48 @@ TeSTStatInstance::TeSTStatInstance(TeSTInstance other, int nd, int ad): TeSTInst
     
 TeSTStatInstance::TeSTStatInstance(const TeSTStatInstance& other) : TeSTInstance(other) 
 {
-      initDbl(other.nDblProperties_);
-      int n;
-      for(n = 0; n < nDblProperties_; n++) 
-	  {
-        dblProperties_[n] = other.dblProperties_[n];
-      }
+    dblProperties_.clear();  
+	for(unsigned int n = 0; n < other.dblProperties_.size(); n++) 
+	{
+       dblProperties_.push_back (other.dblProperties_[n]);
+    }
+}
+    
+TeSTStatInstance& 
+TeSTStatInstance::operator=(const TeSTStatInstance& other)
+{
+	if ( this != &other )
+	{
+		this->dblProperties_.clear();
+		for(unsigned int n = 0; n < other.dblProperties_.size(); n++) 
+		{
+			dblProperties_.push_back (other.dblProperties_[n]);
+		}
+	}
+	return *this;
 }
     
 
+TeSTStatInstanceSet& 
+TeSTStatInstanceSet::operator=(const TeSTStatInstanceSet& other)
+{
+	if ( this != &other )
+	{
+		this->objs_=other.objs_;
+	}
+	return *this;
+}
+
 void
 TeSTStatInstanceSet::Copy(TeSTElementSet& stoSet, int nDbl, int aDbl) 
 {
-      
       TeSTElementSet::iterator it = stoSet.begin();
-      while (it != stoSet.end()) {
+      while (it != stoSet.end()) 
+	  {
         //Insere elemento no mapa atual e inicializa double
-        TeSTStatInstance* nObj = new TeSTStatInstance(*it, nDbl, aDbl);
-        objs_.push_back(*nObj);  
-        ++it;
+        TeSTStatInstance st(*it, nDbl, aDbl);
+        objs_.push_back(st);  
+		++it;
       }
 }
     
diff --git a/src/terralib/stat/TeStatDataStructures.h b/src/terralib/stat/TeStatDataStructures.h
old mode 100644
new mode 100755
index 7055446..f1cebd0
--- a/src/terralib/stat/TeStatDataStructures.h
+++ b/src/terralib/stat/TeStatDataStructures.h
@@ -1,7 +1,6 @@
 /************************************************************************************
 Exploring and analysis of geographical data using TerraLib and TerraView
-
-Copyright � 2003,2004 INPE and LESTE/UFMG.
+Copyright � 2003-2007 INPE and LESTE/UFMG.
 
 Partially funded by CNPq - Project SAUDAVEL, under grant no. 552044/2002-4,
 SENASP-MJ and INPE
@@ -19,13 +18,13 @@ You must have received a copy of the GNU General Public License with this progra
 In negative case, write to the Free Software Foundation, Inc. in the following
 address: 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
 ***********************************************************************************/
-
 /*! \file TeStatDataStructures.h
-    This file deals with special data structures for spatial statistics 
+    \brief This file deals with special data structures for spatial statistics 
 */
 #ifndef __TERRALIB_INTERNAL_STATDATASTRUCTURES_H
 #define __TERRALIB_INTERNAL_STATDATASTRUCTURES_H
 
+#include "TeStatDefines.h"
 #include "TeProjection.h"
 #include "TeRaster.h"
 #include "TeAttribute.h"
@@ -34,7 +33,7 @@ address: 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
 
 class TeSTElementSet;
 
-class TeGridElement
+class STAT_DLL TeGridElement
 {
 	TeRaster* parent_;
 
@@ -60,13 +59,12 @@ public:
 		parent_->setElement(col_,lin_,val);
 	}
 
-	bool getDoubleProperty(int /* idx */, double& value) 
-	{	return parent_->getElement(col_, lin_, value);	}
+	bool getDoubleProperty(int idx, double& value) 
+	{	return parent_->getElement(col_, lin_, value, idx);	}
 
-	bool setDoubleProperty(int /* idx */, double value) 
-	{	return parent_->setElement(col_,lin_, value);	}
+	bool setDoubleProperty(int idx , double value) 
+	{	return parent_->setElement(col_,lin_, value, idx);	}
 
-	//** ANDREA -- adaptive kernel support
 	bool getPropertyValue(const string& /* name */, string& value) 
 	{
 		double val;
@@ -79,7 +77,6 @@ public:
 		return false;
 	}
 
-	//** ANDREA -- adaptive kernel support
 	bool setPropertyValue(const string& /* name */, const string&  value) 
 	{
 		double val;
@@ -107,31 +104,35 @@ public:
 	 so that Kernel Map algorithms can use it in the same way as when using 
 	 a set of polygonal regions as support.
 */
-class TeKernelGridSupport
+class STAT_DLL TeKernelGridSupport
 {
 	TeRaster* rasterImp_;
 public:
 
-	TeKernelGridSupport(TeBox& bb, int ncols, TeProjection* proj)
+	TeKernelGridSupport(TeBox& bb, int ncols, TeProjection* proj, unsigned int nBands = 1)
 	{
 		TeRasterParams par;
 		par.decoderIdentifier_=  "MEM";
 		par.fileName_ = "rasterTemp";
+		rasterImp_ =0;
 
 		double resx = bb.width()/ncols;
 		TeBox newBox = adjustToCut(bb,resx,resx);
 		par.boundingBoxResolution(newBox.x1_,newBox.y1_,newBox.x2_,newBox.y2_,resx,resx);
 		newBox = par.boundingBox();
-		par.nBands(1);
+		par.nBands(nBands);
 		par.projection(proj);
 		par.setDataType(TeDOUBLE);
 		par.setDummy(-TeMAXFLOAT);
-		par.setPhotometric(TeRASTERMULTIBAND);
+		par.setPhotometric(TeRasterParams::TeMultiBand);
 		par.useDummy_ = true;
 		par.mode_ = 'c';
 
 		rasterImp_ = new TeRaster(par);
-		if (!rasterImp_ || !rasterImp_->init())
+		if(!rasterImp_)
+			rasterImp_ = 0;
+
+		if (!rasterImp_->init())
 		{
 			delete rasterImp_;
 			rasterImp_ = 0;
@@ -141,7 +142,7 @@ public:
 
 	~TeKernelGridSupport()
 	{
-		if (!rasterImp_)
+		if (rasterImp_)
 		{
 			delete rasterImp_;
 			rasterImp_ = 0;
@@ -151,12 +152,10 @@ public:
 	bool status()
 	{	return (rasterImp_ && rasterImp_->status()); }
 
-	/** ANDREA -- method to return total area from polygon cut, if any **/
 	double totalArea() 
 	{ return TeGeometryArea(rasterImp_->params().boundingBox()); }
 
-  /** ANDREA -- method to returnal number of elements, adaptive kernel **/
-	int numObjects() 
+ 	int numObjects() 
 	{
 		TeRasterParams par;
 		par = rasterImp_->params();
@@ -306,58 +305,57 @@ public:
 /////////////////////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////////
 //! An instance in time of a spatial object, with specialized members for TerraStat
-class TeSTStatInstance : public  TeSTInstance
+class STAT_DLL TeSTStatInstance : public  TeSTInstance
 {
 
   protected:
 
-  int     nDblProperties_;
-  double* dblProperties_;
+	vector<double> dblProperties_;
 
-  void initDbl(int n) {
-    nDblProperties_ = n;
-    if (n == 0) {
-      dblProperties_ = NULL;
-    }
-    else {
-      dblProperties_ = new double[n];
-    }
-  }
+	//! inicialize the vector of double
+	void initDbl(int n) 
+	{
+		for(int i=0; i<n; ++i)
+			dblProperties_.push_back (0.0);
+	}
 
   public:
     
+	//! Constructor
 	TeSTStatInstance(int nDlbProp = 0); 
 
-     //! Copy constructor
-    TeSTStatInstance(TeSTInstance other, int nd, int ad); 
-
-    //! Copy constructor
+    //! Constructor
+    TeSTStatInstance(TeSTInstance& other, int nd, int ad); 
+    
+	//! Copy constructor
     TeSTStatInstance(const TeSTStatInstance& other);     
 
-    bool setDoubleProperty(int idx, double value) {
-      if ((idx < 0) || (idx > nDblProperties_))
-        return false;
-      dblProperties_[idx] = value;
-      return true;
-    }
+	//! Destructor
+    virtual ~TeSTStatInstance()
+	{ }
 
-    bool getDoubleProperty(int idx, double& value) {
-      if ((idx < 0) || (idx > nDblProperties_))
-        return false;
-      value = dblProperties_[idx];
-      return true;
+	//! Assign operator
+	TeSTStatInstance& operator=(const TeSTStatInstance& other);
+
+    bool setDoubleProperty(unsigned int idx, double value) 
+	{
+		if (idx >= dblProperties_.size())
+        	return false;
+		dblProperties_[idx] = value;
+		return true;
     }
 
-	  //! Destructor
-    ~TeSTStatInstance(){
-      
-      if (dblProperties_ != NULL)
-        delete [] dblProperties_;
+    bool getDoubleProperty(unsigned int idx, double& value) 
+	{
+		if (idx >= dblProperties_.size())
+			return false;
+		value = dblProperties_[idx];
+		return true;
     }
 
 };
  
-class TeSTStatInstanceSet  
+class STAT_DLL TeSTStatInstanceSet  
 {
   
   
@@ -368,9 +366,23 @@ class TeSTStatInstanceSet
     
   public:
     
-    //Constroi um a partir de outro
-    TeSTStatInstanceSet() {
-    }
+   //! Constructor 
+    TeSTStatInstanceSet() 
+	{}
+
+	//! Destructor
+	virtual ~TeSTStatInstanceSet()
+	{}
+
+	//! Copy constructor
+    TeSTStatInstanceSet(const TeSTStatInstanceSet& other)
+	{
+		this->objs_ = other.objs_;
+	}
+
+	//! Assign operator
+	virtual TeSTStatInstanceSet& operator=(const TeSTStatInstanceSet& other);
+
     
     void Copy(TeSTElementSet& stoSet, int nDbl=0, int aDbl = 0); 
     
@@ -423,12 +435,17 @@ class TeSTStatInstanceSet
 };
 
 // Classe de eventos pontuais
-class TePointTInstanceSet : public TeSTStatInstanceSet
+class STAT_DLL TePointTInstanceSet : public TeSTStatInstanceSet
 {
 
   public:
 
-  TePointTInstanceSet() : TeSTStatInstanceSet() {}
+	TePointTInstanceSet() : TeSTStatInstanceSet() 
+	{}
+
+  //! Destructor
+	~TePointTInstanceSet()
+	{}
 
   
   iterator begin(const TeCoord2D& /* center */, const double& /* radius */)
diff --git a/src/terralib/stat/TeStatDefines.h b/src/terralib/stat/TeStatDefines.h
new file mode 100644
index 0000000..2def9ef
--- /dev/null
+++ b/src/terralib/stat/TeStatDefines.h
@@ -0,0 +1,56 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeDefines.h
+    \brief Provides a set of general definitions used by Terralib
+*/
+#ifndef  __STAT_INTERNAL_DEFINES_H
+#define  __STAT_INTERNAL_DEFINES_H
+
+#include <string> 
+
+/** @defgroup Defines Defines and constants
+  @{
+ */
+
+/** @defgroup STAT_AS_DLL macros.
+  @{
+ */
+#if defined( WIN32 ) || defined( __WIN32__ ) || defined ( _WIN32 ) || defined( WIN64 ) || defined( _WIN32_WCE )
+
+#if defined(_MSC_VER) /* MSVC Compiler */
+#pragma warning(disable: 4251)
+#endif
+
+#ifdef STAT_AS_DLL
+#define STAT_DLL __declspec(dllexport)
+#else
+#define STAT_DLL __declspec(dllimport)
+#endif
+
+#else
+#define STAT_DLL
+#endif
+/** @} */ 
+
+#endif
+
diff --git a/src/terralib/stat/TeTreeMinimum.cpp b/src/terralib/stat/TeTreeMinimum.cpp
old mode 100644
new mode 100755
index f5d7394..72262e0
--- a/src/terralib/stat/TeTreeMinimum.cpp
+++ b/src/terralib/stat/TeTreeMinimum.cpp
@@ -22,9 +22,11 @@ of this library and its documentation.
 *************************************************************************************/
 #include <math.h>
 #include "TeTreeMinimum.h"
+#include "TeSTElementSet.h"
+#include "TeGeneralizedProxMatrix.h"
 
 bool 
-compare_dissimilarity(const graph_link &graph_link1, const graph_link &graph_link2)
+compare_dissimilarity(const TeMSTGraphLink &graph_link1, const TeMSTGraphLink &graph_link2)
 {
 	if (graph_link1.Dissimilarity_ < graph_link2.Dissimilarity_) 
 		return true;
@@ -32,40 +34,44 @@ compare_dissimilarity(const graph_link &graph_link1, const graph_link &graph_lin
 		return false;
 }
 
-void TeCreateDissMatrix (TeSelectedObjectMap& objects, TeProxMatrix& proxMatrix, 
-					  matrix& mat_diss, double &Diss_max) 
+void TeCreateDissMatrix (TeSTElementSet* objects, TeGeneralizedProxMatrix* proxMatrix,
+					   TeMSTMatrix& mat_diss, double& Diss_max)
 {
-	string GeoId1, GeoId2;
-	TeSelectedObjectVector  neighbors;
+	
+	string objectId1, objectId2;
+	TeNeighboursMap neighbors; 
 	int num_neighbors;
 	double val1, val2;
 	int DISS_TYPE = 1;
 	double Diss = 0.;	
 	Diss_max = 0.;	
-	graph graph_;
+	TeMSTGraph graph_;
 	int tamanho = 0;
 
-	TeSelectedObjectMap::iterator it = objects.begin();
-	int num_objects = objects.size();
-
-	while ( it != objects.end() )
+	TeSTElementSet::iterator it = objects->begin();
+	while ( it != objects->end() )
 	{
-		((*it).second).slice_ = 0.;
-		GeoId1 = (*it).first;
-		neighbors = proxMatrix [GeoId1];
+		it->slice(0);
+		objectId1 = it->objectId();
+		
+		neighbors = proxMatrix->getMapNeighbours(objectId1);
+		TeNeighboursMap::iterator itNeigs = neighbors.begin();
 		num_neighbors = neighbors.size();
 		graph_.clear();
 		tamanho = graph_.size();
 		double difer = 0.;
-		for (int i = 0; i< num_neighbors;   i++)
+		while(itNeigs != neighbors.end())
 		{
-			GeoId2 = neighbors[i].geoid_;
-			TeSelectedObjectMap::iterator it2 = objects.find(GeoId2);
-			//leitura dos valores
-			for (int j = 0; j < (*it).second.properties_.size(); j++)
+			objectId2 = itNeigs->first;
+			Diss = 0.; 
+			TePropertyVector* propVec = objects->getPropertyVector(objectId2);
+			if(!propVec)
+				continue;
+
+			for(unsigned j=0; j<propVec->size(); ++j)
 			{
-				val1 = atof ( ((*it).second).properties_[j].value_.c_str() );
-				val2 = atof ( ((*it2).second).properties_[j].value_.c_str() );		
+				val1 = it->operator[](j);
+				val2 = atof(propVec->operator[](j).value_.c_str());		
 				difer = val1 - val2;
 				if (DISS_TYPE)
 					Diss+= difer*difer;		// distancia euclidiana (y=1)
@@ -80,134 +86,196 @@ void TeCreateDissMatrix (TeSelectedObjectMap& objects, TeProxMatrix& proxMatrix,
 				Diss_max = Diss;
 
 			//escrever na estrutura map de grafos
-			if (GeoId1 != GeoId2)
-				graph_.push_back(graph_link(GeoId1,GeoId2,Diss));
+			if (objectId1 != objectId2)
+				graph_.push_back(TeMSTGraphLink(objectId1,objectId2,Diss));
+			
+			++itNeigs;
 		}
 		sort(graph_.begin(), graph_.end(), compare_dissimilarity); 
-		mat_diss[GeoId1] = graph_;
-		it++;
-	}
+		mat_diss[objectId1] = graph_;
+		++it;
+    }
 }
 
+
 void
-TeCreateMinimumTree (TeSelectedObjectMap& objects, matrix& DissMatrix, 
-					 graph& Min_Tree, double Diss_max)
+TeCreateMinimumTree (TeSTElementSet* objects, TeMSTMatrix& DissMatrix, 
+					 TeMSTGraph& Min_Tree, double Diss_max)
 {
 	// GERAR ARVORE MINIMA
-	map<int,string> nos_MimTree;  //container que armazenar� n�s da �rvore minima
+	vector<string> nos_MimTree;
+	
 	// escolha do primeiro n�
-	TeSelectedObjectMap::iterator it = objects.begin();
-
-	string GeoId1 = (*it).first;	
+	TeSTElementSet::iterator it = objects->begin();
+	string objId1 = it->objectId();	
 	int num_nos = 0;	//n�mero de n�s na �rvore m�nima
 
-	nos_MimTree[num_nos++] = GeoId1;
-	string GeoId2 = DissMatrix[GeoId1][0].GeoId2_;  //A matriz possui as linhas ordenadas pela menor dissimilaridade
-	nos_MimTree[num_nos++] = GeoId2;
+	//armazena o primeiro vizinho do primeiro objeto. Os vizinhos est�o ordenados pela dissimilaridade
+	nos_MimTree.push_back(objId1); 
+	++num_nos;
+	string objId2 = DissMatrix[objId1][0].GeoId2_;  //A matriz possui as linhas ordenadas pela menor dissimilaridade
+	nos_MimTree.push_back(objId2);
+	++num_nos;
 
-	graph_link link1(GeoId1, GeoId2, DissMatrix[GeoId1][0].Dissimilarity_);
+	//Min_Tree: grafo da �rvore m�nima
+	TeMSTGraphLink link1(objId1, objId2, DissMatrix[objId1][0].Dissimilarity_);
 	Min_Tree.push_back(link1);
 
+	//apaga o vizinho que entrou na �rvore m�nima da matrix
 	double Diss_mim;
-	graph::iterator it_link = DissMatrix[GeoId1].begin();
-	DissMatrix[GeoId1].erase(it_link);	//apaga link j� analisado
+	TeMSTGraph::iterator it_link = DissMatrix[objId1].begin();
+	if(it_link!=DissMatrix[objId1].end())
+		DissMatrix[objId1].erase(it_link);	//apaga link j� analisado
 
-	int num_objects = objects.size();
+	int num_objects = objects->numSTInstance();
 	bool no_novo = false;
 
+	//Min_Tree ter� num_objects n�s e num_objects-1 arestas
 	while ((num_nos) < num_objects)
 	{
 		Diss_mim = Diss_max;
 		no_novo = false;
-		for (int i = 0; i < nos_MimTree.size(); i++)
+		//para cada n� da �rvore m�nima selecione as arestas que ligam a um v�tice ainda n�o existente na 
+		//�rvore m�nima
+		// e escolha a aresta com menor dissimilaridade para entrar na �rvore m�nima
+		for (unsigned int i = 0; i < nos_MimTree.size(); i++)
 		{
 			string no_atual = nos_MimTree[i];
-			if ((DissMatrix[no_atual].size() != 0) & (DissMatrix[no_atual][0].Dissimilarity_ < Diss_mim))
+			unsigned int size = DissMatrix[no_atual].size();
+			double diss = DissMatrix[no_atual][0].Dissimilarity_;
+			if ((size != 0) && (diss <= Diss_mim))
 			{
-				GeoId1 = DissMatrix[nos_MimTree[i]][0].GeoId1_;
-				GeoId2 = DissMatrix[nos_MimTree[i]][0].GeoId2_;
-				Diss_mim = DissMatrix[nos_MimTree[i]][0].Dissimilarity_;
+				objId1 = DissMatrix[nos_MimTree[i]][0].GeoId1_; 
+				objId2 = DissMatrix[nos_MimTree[i]][0].GeoId2_;
+				Diss_mim = DissMatrix[nos_MimTree[i]][0].Dissimilarity_; 
 				no_novo = true;
 			}
 		}
 
-		// verifica se n� j� pertence � �rvore
-		string no_atual;
-		for (int j = 0; j < nos_MimTree.size(); j++)
-		{
-			no_atual = nos_MimTree[j];
-			if(no_atual == GeoId2)
-				no_novo = false;
-		}
+		if(!no_novo) //n�o achou nenhuma aresta
+			num_nos = num_objects;
 
+		// verifica se n� j� pertence � �rvore
+		//se objId2 j� existe na �rove n�o podemos considerar essa aresta
+		vector<string>::iterator itFind = find(nos_MimTree.begin(), nos_MimTree.end(), objId2);
+		if(itFind!=nos_MimTree.end())
+			no_novo = false;
+				
 		// se n� � novo, inclui link na �rvore m�nima
 		if (no_novo)
 		{
-			nos_MimTree[num_nos++] = GeoId2;
-			graph_link link2(GeoId1, GeoId2, Diss_mim);
+			//nos_MimTree[num_nos++] = objId2;
+			nos_MimTree.push_back(objId2);
+			++num_nos;
+			TeMSTGraphLink link2(objId1, objId2, Diss_mim);
 			Min_Tree.push_back(link2);
 		}
-
-		DissMatrix[GeoId1].erase(DissMatrix[GeoId1].begin());
+		
+		TeMSTGraph::iterator it_link2 = DissMatrix[objId1].begin();
+		if(it_link2!=DissMatrix[objId1].end())
+			DissMatrix[objId1].erase(it_link2);	//apaga link j� analisado
 	}
 }
 
 
 void
-TeCreateSubTrees( TeSelectedObjectMap& objects,graph& Min_Tree, 
-				 TeSelectedObjectMap& result, int num_regioes)
+TeCreateSubTrees(TeSTElementSet* objects, TeMSTGraph& Min_Tree, int num_regioes)
 { 
 	double	SSA1 = 0., SSA2 = 0., SSTO = 0.;
-	graph::iterator it1 = Min_Tree.begin();
-	graph::iterator it2 = Min_Tree.begin();
-	graph::iterator itMax = Min_Tree.begin();
-	result.clear();
-	TeSelectedObjectMap::iterator it = objects.begin();
-
+	TeMSTGraph::iterator it1 = Min_Tree.begin();
+	TeMSTGraph::iterator it2 = Min_Tree.begin();
+	TeMSTGraph::iterator itMax = Min_Tree.begin();
+	
 	vector<string> subtree_vertexes_1, subtree1;
 	vector<string> subtree_vertexes_2, subtree2;
 
+	int attributes_number = objects->begin()->getPropertyVector().size();
+
+	//estruturas para armazenar estatisticas
+	vector <double> sum1(attributes_number, 0.);
+	vector <double> sum2(attributes_number, 0.);
+	vector <double> total_sum(attributes_number, 0.);
+	vector <double> mean1(attributes_number, 0.);
+	vector <double> mean2(attributes_number, 0.);
+	vector <double> global_mean(attributes_number, 0.);
+
+	//pegar os atributos e colocar em um map
+	map<string, vector<double> >  attrObjects;
+	TeSTElementSet::iterator attrIt =  objects->begin();
+	while(attrIt!=objects->end())
+	{
+		vector<double> attrs;
+		for(int i=0; i<attributes_number; ++i)
+			attrs.push_back(atof((*attrIt).getPropertyVector()[i].value_.c_str()));
+		attrObjects[(*attrIt).objectId()]=attrs;
+
+		++attrIt;
+	}
+	
 	// h� necessidade de zerar o slice!
 	for (int regiao = 1; regiao < num_regioes; regiao++)
 	{
 		double link_cost = 0.;
-		graph_link bigest_cost("","",0.); 
+		TeMSTGraphLink bigest_cost("","",0.); 
 		int contagem = 0;
 		it1 = Min_Tree.begin();
 		while (it1 != Min_Tree.end())
 		{
-			graph MT_copy;
- 
+			TeMSTGraph MT_copy;
+			 
 			string GeoId1 = it1->GeoId1_;
 			string GeoId2 = it1->GeoId2_;
 			subtree_vertexes_1.clear();			
 			subtree_vertexes_2.clear();
 
+			//estruturas para armazenar as estat�sticas
+			fill(sum1.begin(), sum1.end(), 0.);
+			fill(sum2.begin(), sum2.end(), 0.);
+			fill(total_sum.begin(), total_sum.end(), 0.);
+			fill(mean1.begin(), mean1.end(), 0.);
+			fill(mean2.begin(), mean2.end(), 0.);
+			fill(global_mean.begin(), global_mean.end(), 0.);
+
 			subtree_vertexes_1.push_back(GeoId1);
 			subtree_vertexes_2.push_back(GeoId2);
+			for (int i = 0; i < attributes_number  ; ++i)
+			{
+                sum1[i] += attrObjects[GeoId1][i];
+				sum2[i] += attrObjects[GeoId2][i];
+			}
 
-			int actual_vert = 0;
 			string new_vertixe;
 
+			unsigned int actual_vert = 0;
+			bool new_v = false;
+
+			//percorre o primeiro vetor
 			while (actual_vert < subtree_vertexes_1.size())
 			{
 				it2 = Min_Tree.begin();
-				bool new_v = false;
-
+				new_v = false; //verificar a posi��o desse
 				while (it2 != Min_Tree.end())
 				{
 					if ((subtree_vertexes_1[actual_vert] == it2->GeoId1_) && 
 						(subtree_vertexes_2[0] != it2->GeoId2_ ))
 					{
-						new_vertixe = it2->GeoId2_; new_v = true;
-					} else if ((subtree_vertexes_1[actual_vert] == it2->GeoId2_) && 
+						new_vertixe = it2->GeoId2_; 
+						new_v = true;
+					} 
+					else if ((subtree_vertexes_1[actual_vert] == it2->GeoId2_) && 
 						(subtree_vertexes_2[0] != it2->GeoId1_ ))
 					{
-						new_vertixe = it2->GeoId1_; new_v = true;
+						new_vertixe = it2->GeoId1_; 
+						new_v = true;
 					}
 					if ((new_v) && (find(subtree_vertexes_1.begin(), subtree_vertexes_1.end(), new_vertixe) == subtree_vertexes_1.end()))
+					{
 							subtree_vertexes_1.push_back(new_vertixe);
-					it2++;
+							//pegar a soma
+							for (int i = 0; i < attributes_number  ; ++i)
+								sum1[i] += attrObjects[new_vertixe][i];
+					}
+					++it2;
 				}
 				actual_vert++;
 			}
@@ -216,7 +284,7 @@ TeCreateSubTrees( TeSelectedObjectMap& objects,graph& Min_Tree,
 			while (actual_vert < subtree_vertexes_2.size())
 			{
 				it2 = Min_Tree.begin();
-				bool new_v = false;
+				new_v = false;
 
 				while (it2 != Min_Tree.end())
 				{
@@ -230,62 +298,25 @@ TeCreateSubTrees( TeSelectedObjectMap& objects,graph& Min_Tree,
 						new_vertixe = it2->GeoId1_; new_v = true;
 					}
 					if ((new_v) && (find(subtree_vertexes_2.begin(), subtree_vertexes_2.end(), new_vertixe) == subtree_vertexes_2.end()))
+					{
 							subtree_vertexes_2.push_back(new_vertixe);
-					it2++;
+							//pegar a soma
+							for (int i = 0; i < attributes_number  ; ++i)
+								sum2[i] += attrObjects[new_vertixe][i];
+					}
+					++it2;
 				}
-				actual_vert++;
+				++actual_vert;
 			}				
 
+			//-----------------------------------------------------------
 			//Calcular o vetor m�dia
 			int tam1 = subtree_vertexes_1.size();
 			int tam2 = subtree_vertexes_2.size();
 			
-			int attributes_number = ((*it).second).properties_.size();
-
-			vector <double> sum1, sum2, total_sum;	
-			vector<double> mean1, mean2, global_mean;
-			for (int i = 0; i < attributes_number  ; i++)
-			{
-				sum1.push_back(0.);	sum2.push_back(0.);	total_sum.push_back(0.);
-				mean1.push_back(0.); mean2.push_back(0.); global_mean.push_back(0.);
-			}
-
-
-			string GeoId;
-			vector<string>::iterator it_s = subtree_vertexes_1.begin();
-
-			double valor = 0.;
-			while ( it_s != subtree_vertexes_1.end() )
-			{
-				GeoId = (*it_s).c_str();
-				it = objects.find(GeoId);				
-				for (int i = 0; i < attributes_number  ; i++)
-				{
-					valor = atof ( ((*it).second).properties_[i].value_.c_str() );
-					sum1[i] += valor;
-				}
-				it_s++;
-			}
-
-			it_s = subtree_vertexes_2.begin();
-			while ( it_s != subtree_vertexes_2.end() )
-			{
-				GeoId = (*it_s).c_str();
-				it = objects.find(GeoId);				
-				for (int i = 0; i < attributes_number ; i++)
-				{
-					valor = atof ( ((*it).second).properties_[i].value_.c_str() );
-					sum2[i] += valor;
-				}	
-				it_s++;
-			}
-
 			for (int k = 0; k < attributes_number ; k++)
-			{
 				total_sum[k] = sum1[k] + sum2[k];
-			}				
-
-
+			
 			for (int j = 0; j < attributes_number ; j++)
 			{
 				 mean1[j] = sum1[j]/tam1; 
@@ -296,37 +327,33 @@ TeCreateSubTrees( TeSelectedObjectMap& objects,graph& Min_Tree,
 			// Calculo do SSTO e SSA's		
 			double SSA1 = 0.; SSA2 = 0.; SSTO = 0.; 
 			double desvio1 = 0., desvio2 = 0., desvioGlobal = 0.;
-
-			it_s = subtree_vertexes_1.begin();
-			while ( it_s != subtree_vertexes_1.end() )
+			double valor = 0.;
+			vector<string>::iterator it_s = subtree_vertexes_1.begin();
+			while ( it_s != subtree_vertexes_1.end() ) //calcula desvio dos atributos dos objetos que est�o no vetor 1
 			{
-				GeoId = (*it_s).c_str();
-				it = objects.find(GeoId);				
 				for (int i=0; i<attributes_number; i++)
 				{
-					valor = atof ( ((*it).second).properties_[i].value_.c_str() );
+					valor = attrObjects[(*it_s).c_str()][i];
 					desvio1 = valor - mean1[i];
 					desvioGlobal = valor - global_mean[i];
 					SSA1 += desvio1*desvio1;
 					SSTO += desvioGlobal*desvioGlobal;
 				}
-				it_s++;
+				++it_s;
 			}
 
 			it_s = subtree_vertexes_2.begin();
-			while ( it_s != subtree_vertexes_2.end() )
+			while ( it_s != subtree_vertexes_2.end() )  //calcula desvio dos atributos dos objetos que est�o no vetor 2
 			{
-				GeoId = (*it_s).c_str();
-				it = objects.find(GeoId);
 				for (int i=0; i<attributes_number; i++)
 				{
-					valor = atof ( ((*it).second).properties_[i].value_.c_str() );
+					valor = attrObjects[(*it_s).c_str()][i];
 					desvio2 = valor - mean2[i];
 					desvioGlobal = valor - global_mean[i];
 					SSA2 += desvio2*desvio2;
 					SSTO += desvioGlobal*desvioGlobal;
 				}
-				it_s++;
+				++it_s;
 			}
 			
 			// Calculo do custo de aresta
@@ -342,7 +369,7 @@ TeCreateSubTrees( TeSelectedObjectMap& objects,graph& Min_Tree,
 				itMax = it1; //armazena o iterator para o n� mais caro
 			}
 
-			it1++;
+			++it1;
 		}
 		// excluir link
 		string teste1 = itMax->GeoId1_;
@@ -354,26 +381,11 @@ TeCreateSubTrees( TeSelectedObjectMap& objects,graph& Min_Tree,
 		int contador = 0;
 		while (it_s != subtree2.end())
 		{
-			it = objects.find((*it_s).c_str());
-			((*it).second).slice_ = regiao;						
+			TeSTInstance* st = objects->getSTInstance((*it_s).c_str());
+			if(st)
+				st->slice (regiao);
 			it_s++;
 			contador++;
 		}
-
 	}
-
-	// Transfer objects to map
-//	TeSelectedObjectMap	*objectsMap = layer.objectMap();//->objectMap();
-	it = objects.begin();
-	while ( it != objects.end() )
-	{
-		string GeoId = (*it).first;
-//		(*objectsMap)[GeoId] = (*it).second;
-		TeSelectedObject obj = ( *it ).second;
-		obj.properties_[0].attr_.semantic_ = "Cluster index";
-		obj.properties_[0].value_ = Te2String (((*it).second).slice_ );
-		result [ obj.geoid_] = obj;
-		++it;
-	}
-
 }
\ No newline at end of file
diff --git a/src/terralib/stat/TeTreeMinimum.h b/src/terralib/stat/TeTreeMinimum.h
old mode 100644
new mode 100755
index 6562286..168cf17
--- a/src/terralib/stat/TeTreeMinimum.h
+++ b/src/terralib/stat/TeTreeMinimum.h
@@ -31,34 +31,33 @@ of this library and its documentation.
 #include <map>
 #include <string>
 
-#include "TeSelectedObject.h"
-#include "TeSpatialStatistics.h"
-#include "TeLayer.h"
+class TeSTElementSet;
+class TeGeneralizedProxMatrix;
 
 using namespace std;
 
-class graph_link
+class TeMSTGraphLink
 {
 public:
 	string GeoId1_;
 	string GeoId2_;
 	double Dissimilarity_;
 
-	~graph_link()
+	~TeMSTGraphLink()
 	{}
 
 
-	graph_link() :
+	TeMSTGraphLink() :
 		GeoId1_(""),
 		GeoId2_("")
 	{}
 
-	graph_link(const string& GeoId1, const string& GeoId2):
+	TeMSTGraphLink(const string& GeoId1, const string& GeoId2):
 		GeoId1_(GeoId1),
 		GeoId2_(GeoId2)
 	{}
 
-	graph_link(const string& GeoId1, const string& GeoId2, const double Dissimilarity)  :
+	TeMSTGraphLink(const string& GeoId1, const string& GeoId2, const double Dissimilarity)  :
 		GeoId1_(GeoId1),
 		GeoId2_(GeoId2),
 		Dissimilarity_(Dissimilarity)
@@ -68,22 +67,22 @@ public:
 	void set_Dissimilatiry (const double Dissimilarity)
 	{	Dissimilarity_ = Dissimilarity;	}
 
-	bool compare_dissimilarity(const graph_link &graph_link1, const graph_link &graph_link2);
-//	bool graph_link::operator<(const graph_link &graph_link1, const graph_link &graph_link2);
+	bool compare_dissimilarity(const TeMSTGraphLink& graph_link1, const TeMSTGraphLink& graph_link2);
 };
 
 
 
-typedef vector<graph_link> graph;
+typedef vector<TeMSTGraphLink> TeMSTGraph;
 
-typedef map<string,graph> matrix;
+typedef map<string,TeMSTGraph> TeMSTMatrix;
 
-void TeCreateDissMatrix (TeSelectedObjectMap& Objects, TeProxMatrix& proxMatrix,
-					   matrix& mat_diss, double& Diss_max);
+//! Calcula a dissimilaridade entre os vizinhos e gera um grafo de dissimilaridade 
+void TeCreateDissMatrix (TeSTElementSet* Objects, TeGeneralizedProxMatrix* proxMatrix, TeMSTMatrix& mat_diss, double& Diss_max);
 
-void TeCreateMinimumTree ( TeSelectedObjectMap& Objects, matrix& DissMatrix, graph& Min_Tree, double Diss_max);
+//! Gera a �rvore m�nima
+void TeCreateMinimumTree (TeSTElementSet* Objects, TeMSTMatrix& DissMatrix, TeMSTGraph& Min_Tree, double Diss_max);
 
-void TeCreateSubTrees( TeSelectedObjectMap& Objects, graph& Min_Tree,
-					  TeSelectedObjectMap& result, int num_regioes);
+//! Divide a �rvore m�nima em sub �rvores regionalizadas
+void TeCreateSubTrees(TeSTElementSet* objects, TeMSTGraph& Min_Tree, int num_regioes);
 
 #endif
\ No newline at end of file
diff --git a/src/terralib/stat/erro.h b/src/terralib/stat/erro.h
old mode 100644
new mode 100755
diff --git a/src/terralib/stat/filaDouble.cpp b/src/terralib/stat/filaDouble.cpp
old mode 100644
new mode 100755
diff --git a/src/terralib/stat/filaDouble.h b/src/terralib/stat/filaDouble.h
old mode 100644
new mode 100755
index 2830aab..9275dbd
--- a/src/terralib/stat/filaDouble.h
+++ b/src/terralib/stat/filaDouble.h
@@ -1,7 +1,10 @@
 //---------------------------------------------------------------------------
 #ifndef FilaDoubleH
 #define FilaDoubleH
-class TFilaDouble {
+
+#include "TeStatDefines.h"
+
+class STAT_DLL TFilaDouble {
   private:
     typedef struct it {
       double Item;
diff --git a/src/terralib/stat/filaInt.cpp b/src/terralib/stat/filaInt.cpp
old mode 100644
new mode 100755
diff --git a/src/terralib/stat/filaInt.h b/src/terralib/stat/filaInt.h
old mode 100644
new mode 100755
index cd98d67..4812883
--- a/src/terralib/stat/filaInt.h
+++ b/src/terralib/stat/filaInt.h
@@ -1,7 +1,11 @@
 //---------------------------------------------------------------------------
 #ifndef FilaIntH
 #define FilaIntH
-class TFilaInt {
+
+#include "TeStatDefines.h"
+
+class STAT_DLL TFilaInt 
+{
   private:
     typedef struct it {
       int Raiz;
diff --git a/src/terralib/stat/filaR.cpp b/src/terralib/stat/filaR.cpp
old mode 100644
new mode 100755
diff --git a/src/terralib/stat/filaR.h b/src/terralib/stat/filaR.h
old mode 100644
new mode 100755
index ee0b32e..26b0ce4
--- a/src/terralib/stat/filaR.h
+++ b/src/terralib/stat/filaR.h
@@ -2,7 +2,9 @@
 #ifndef FilaRH
 #define FilaRH
 
-class TFilaR {
+#include "TeStatDefines.h"
+
+class STAT_DLL TFilaR {
 public:
     typedef struct Item {
       int Raiz; // Indice no vetor da raiz do grupamento
diff --git a/src/terralib/stat/hash.cpp b/src/terralib/stat/hash.cpp
old mode 100644
new mode 100755
index 3606b78..5ed036a
--- a/src/terralib/stat/hash.cpp
+++ b/src/terralib/stat/hash.cpp
@@ -1,3 +1,9 @@
+/*
+DO NOT USE!
+This is a DEPRECATED file not used anymore in any part of the statics library
+used by TerraLib. Its being kept for compatibility reasons and it will be removed 
+from further TerraLib distributions.
+*/
 //---------------------------------------------------------------------------
 #ifdef WIN32
 #pragma hdrstop
diff --git a/src/terralib/stat/hash.h b/src/terralib/stat/hash.h
old mode 100644
new mode 100755
index fbf17c2..2c5e93a
--- a/src/terralib/stat/hash.h
+++ b/src/terralib/stat/hash.h
@@ -1,3 +1,10 @@
+/*
+DO NOT USE!
+This is a DEPRECATED file not used anymore in any part of the statics library
+used by TerraLib. Its being kept for compatibility reasons and it will be removed 
+from further TerraLib distributions.
+*/
+
 //---------------------------------------------------------------------------
 #ifndef HashH
 #define HashH
diff --git a/src/terralib/stat/heap.cpp b/src/terralib/stat/heap.cpp
old mode 100644
new mode 100755
index 72f2ad2..d8d88b2
--- a/src/terralib/stat/heap.cpp
+++ b/src/terralib/stat/heap.cpp
@@ -8,6 +8,7 @@
 #include "heap.h"
 #include "erro.h"
 
+
 /********* Mantem a propriedade de Heap (Para Baixo) *****/
 void  THeap::DownHeap(int i){
    int l;// esquerda
diff --git a/src/terralib/stat/heap.h b/src/terralib/stat/heap.h
old mode 100644
new mode 100755
index 3c0cf00..ee69385
--- a/src/terralib/stat/heap.h
+++ b/src/terralib/stat/heap.h
@@ -1,9 +1,11 @@
 //---------------------------------------------------------------------------
 #ifndef heapH
 #define heapH
+
+#include "TeStatDefines.h"
 #include "TeSkaterGrafo.h"
 //---------------------------------------------------------------------------
-class THeap {
+class STAT_DLL THeap {
 
 /********  Area Privada  *********/
 private:
diff --git a/src/terralib/stat/lista.cpp b/src/terralib/stat/lista.cpp
old mode 100644
new mode 100755
index 3b19370..42f8131
--- a/src/terralib/stat/lista.cpp
+++ b/src/terralib/stat/lista.cpp
@@ -43,10 +43,16 @@ void  TListaVizinho::Adjacente(int *Indice,double *Peso)
 	try
 	{
 		if(!Lista) 
+		{
+			*Indice =-1;
 			return;
+		}
 		
 		if(Lista->Size==0)
+		{ 
+			*Indice =-1;
 			return; 
+		}
 
 		if (Lista->Next) {
 		 *Indice = Lista->Next->Indice;
diff --git a/src/terralib/stat/lista.h b/src/terralib/stat/lista.h
old mode 100644
new mode 100755
index a2385d2..b72745a
--- a/src/terralib/stat/lista.h
+++ b/src/terralib/stat/lista.h
@@ -1,8 +1,10 @@
 #ifndef ListaH
 #define ListaH
 
+#include "TeStatDefines.h"
 #include "erro.h"
-class TListaVizinho{
+
+class STAT_DLL TListaVizinho{
 
 private:
     typedef struct Vizinho {
diff --git a/src/terralib/utils/TeColorUtils.cpp b/src/terralib/utils/TeColorUtils.cpp
new file mode 100755
index 0000000..fe336d5
--- /dev/null
+++ b/src/terralib/utils/TeColorUtils.cpp
@@ -0,0 +1,750 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright  2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+#include <TeColorUtils.h>
+#include <TeDatabase.h>
+#include <TeAsciiFile.h>
+#include <cstring>
+
+bool getColors(std::vector<std::string>& ramps, int nc, std::vector<TeColor> &colors)
+{
+	if (ramps.empty())
+		ramps.push_back("RED");
+
+	TeColor	RGB;
+	map<string, TeColor> mapcor;
+
+	RGB.name_ = "RED";
+	RGB.red_ = 240;
+	RGB.green_ = 0;
+	RGB.blue_ = 0;
+	mapcor["RED"] = RGB;
+
+	RGB.name_ = "GREEN";
+	RGB.red_ = 0;
+	RGB.green_ = 240;
+	RGB.blue_ = 0;
+	mapcor["GREEN"] = RGB;
+
+	RGB.name_ = "BLUE";
+	RGB.red_ = 0;
+	RGB.green_ = 0;
+	RGB.blue_ = 240;
+	mapcor["BLUE"] = RGB;
+
+	RGB.name_ = "YELLOW";
+	RGB.red_ = 255;
+	RGB.green_ = 255;
+	RGB.blue_ = 100;
+	mapcor["YELLOW"] = RGB;
+
+	RGB.name_ = "CYAN";
+	RGB.red_ = 100;
+	RGB.green_ = 255;
+	RGB.blue_ = 255;
+	mapcor["CYAN"] = RGB;
+
+	RGB.name_ = "MAGENTA";
+	RGB.red_ = 255;
+	RGB.green_ = 100;
+	RGB.blue_ = 255;
+	mapcor["MAGENTA"] = RGB;
+
+	RGB.name_ = "ORANGE";
+	RGB.red_ = 255;
+	RGB.green_ = 140;
+	RGB.blue_ = 0;
+	mapcor["ORANGE"] = RGB;
+
+	RGB.name_ = "GRAY";
+	RGB.red_ = 240;
+	RGB.green_ = 240;
+	RGB.blue_ = 240;
+	mapcor["GRAY"] = RGB;
+
+	RGB.name_ = "BLACK";
+	RGB.red_ = 0;
+	RGB.green_ = 0;
+	RGB.blue_ = 0;
+	mapcor["BLACK"] = RGB;
+
+	int	ii, jj;
+	int n = 200;
+	
+	TeColor cfrom = mapcor[ramps[0]];
+	TeColor	cto, cor;
+
+	vector<TeColor> allColors;
+	if (ramps.size() == 1)
+	{
+		cto.red_ = cfrom.red_ / 5;
+		cto.green_ = cfrom.green_ / 5;
+		cto.blue_ = cfrom.blue_ / 5;
+		double dr = (double)(cto.red_ - cfrom.red_) / (double)n;
+		double dg = (double)(cto.green_ - cfrom.green_) / (double)n;
+		double db = (double)(cto.blue_ - cfrom.blue_) / (double)n;
+
+		for(jj=0; jj<n; jj++)
+		{
+			cor.red_ = cfrom.red_ + (int)(dr * (double)jj);
+			cor.green_ = cfrom.green_ + (int)(dg * (double)jj);
+			cor.blue_ = cfrom.blue_ + (int)(db * (double)jj);
+			allColors.push_back(cor);
+		}
+	}
+	else
+	{
+		ii = 1;
+		while(ii < (int)ramps.size())
+		{
+			cto = mapcor[ramps[ii]];
+
+			double dr = (double)(cto.red_ - cfrom.red_) / (double)n;
+			double dg = (double)(cto.green_ - cfrom.green_) / (double)n;
+			double db = (double)(cto.blue_ - cfrom.blue_) / (double)n;
+
+			for(jj=0; jj<n; jj++)
+			{
+				cor.red_ = cfrom.red_ + (int)(dr * (double)jj);
+				cor.green_ = cfrom.green_ + (int)(dg * (double)jj);
+				cor.blue_ = cfrom.blue_ + (int)(db * (double)jj);
+				allColors.push_back(cor);
+			}
+			cfrom = cto;
+			ii++;
+		}
+	}
+	double step = 0.;
+	if (nc > 1)
+		step = (double)(allColors.size()) / (double)(nc-1);
+	for (int i=0; i<nc; i++)
+	{
+		int ind = (int)(step * (double)i + .5);
+		if (ind > (int)(allColors.size() - 1))
+			ind = allColors.size() - 1;
+		colors.push_back(allColors[ind]);
+	}
+	allColors.clear();
+	return true;
+}
+
+
+void generateColorBarMap(vector<ColorBar>& inputColorVec, int ncores, map<int, vector<TeColor> >& colorMap)
+{
+	if(inputColorVec.empty())
+	{
+		TeColor c(255, 0, 0);
+		ColorBar b;
+		b.color(c);
+//		b.distance_ = 1.;
+		b.distance_ = 0.;
+		inputColorVec.push_back(b);
+
+		c.init(60, 0, 0);
+		b.color(c);
+		b.distance_ = 1.;
+		inputColorVec.push_back(b);
+	}
+
+	int i, nc;
+	if(inputColorVec.empty())
+		return;
+
+	double totalDistance = inputColorVec[inputColorVec.size()-1].distance_;
+	double dd = (double)ncores / totalDistance;
+
+	colorMap.clear();
+	for(i=0; i<(int)inputColorVec.size()-1; ++i)
+	{
+		nc = TeRound(dd * (fabs(inputColorVec[i+1].distance_) - fabs(inputColorVec[i].distance_)));
+		TeColor corFrom, corTo;
+		hsv2Rgb(corFrom,inputColorVec[i].h_, inputColorVec[i].s_, inputColorVec[i].v_);
+		hsv2Rgb(corTo,inputColorVec[i+1].h_, inputColorVec[i+1].s_, inputColorVec[i+1].v_);
+//		TeColor corFrom = inputColorVec[i].cor_;
+//		TeColor corTo = inputColorVec[i+1].cor_;
+		colorMap[i] = getColors(corFrom, corTo, nc);
+	}
+	vector<TeColor> vv;
+	colorMap[i] = vv;
+}
+
+vector<TeColor> getColors(TeColor cfrom, TeColor cto, int nc)
+{
+	int n = 255, i, j;
+	vector<TeColor> colorVec;
+	TeColor cor;
+
+	vector<TeColor> allColors;
+	double dr = (double)(cto.red_ - cfrom.red_) / (double)n;
+	double dg = (double)(cto.green_ - cfrom.green_) / (double)n;
+	double db = (double)(cto.blue_ - cfrom.blue_) / (double)n;
+
+	for(j=0; j<n; j++)
+	{
+		cor.red_ = cfrom.red_ + (int)(dr * (double)j);
+		cor.green_ = cfrom.green_ + (int)(dg * (double)j);
+		cor.blue_ = cfrom.blue_ + (int)(db * (double)j);
+		allColors.push_back(cor);
+	}
+	double step = 0.;
+	if (nc > 1)
+		step = (double)(allColors.size()) / (double)(nc-1);
+	for (i=0; i<nc; ++i)
+	{
+		int ind = (int)(step * (double)i + .5);
+		if (ind > (int)(allColors.size() - 1))
+			ind = allColors.size() - 1;
+		colorVec.push_back(allColors[ind]);
+	}
+	allColors.clear();
+	return colorVec;
+}
+
+vector<ColorBar>  getColorBarVector(string& groupingColors, const bool& first)
+{
+	vector<ColorBar> cbVec;
+	char	buf[1000];
+	string ss;
+	TeColor	cor(255, 255, 255);
+
+	if(groupingColors.empty())
+		groupingColors = "R-";
+	if(groupingColors.size() == 1)
+		groupingColors += "-";
+
+	size_t t = groupingColors.find(";");
+	string s = groupingColors;
+
+	if(t == string::npos)
+	{
+		s += "-";
+		size_t a = s.find("-");
+
+		double dist = -1.;
+		while(a != string::npos)
+		{
+			memset(buf, '\0', 1000);
+			s.copy(buf, a);
+			ss = buf;
+
+			a++;
+			memset(buf, '\0', 1000);
+			s.copy(buf, s.size()-a, a);
+			s = buf;
+			a = s.find("-");
+
+			if("R" == ss)
+				cor.init(240, 0, 0);
+			else if("G" == ss)
+				cor.init(0, 240, 0);
+			else if("B" == ss)
+				cor.init(0, 0, 240);
+			else if("Cy" == ss)
+				cor.init(100, 255, 255);
+			else if("Or" == ss)
+				cor.init(255, 140, 0);
+			else if("Mg" == ss)
+				cor.init(255, 100, 255);
+			else if("Y" == ss)
+				cor.init(255, 255, 100);
+			else
+				cor.init(240, 240, 240);
+
+			ColorBar cb;
+			cb.color(cor);
+			dist += 1.;
+			cb.distance_ = dist;
+			cbVec.push_back(cb);
+		}
+		if(cbVec.size() == 1)
+		{
+			cor.init(cor.red_/5, cor.green_/5, cor.blue_/5);
+			ColorBar cb;
+			cb.color(cor);
+			dist += 1.;
+			cb.distance_ = dist;
+			cbVec.push_back(cb);
+		}
+	}
+	else
+	{
+		t = groupingColors.find("|");
+		if(first)
+		{
+			if(t != string::npos)
+			{
+				memset(buf, '\0', 1000);
+				s.copy(buf, t, 0);
+				s = buf;
+			}
+		}
+		else
+		{
+			if(t != string::npos)
+			{
+				memset(buf, '\0', 1000);
+				s.copy(buf, s.size()-t-1, t+1);
+				s = buf;
+			}
+			else // error
+			{
+				ColorBar cb;
+				cbVec.clear();
+				TeColor c;
+				hsv2Rgb(c, 0, 255, 255);
+				cb.color(c);
+				cb.distance_ = 0.;
+				cbVec.push_back(cb);
+				hsv2Rgb(c, 240, 255, 255);
+				cb.color(c);
+				cb.distance_ = 1.;
+				cbVec.push_back(cb);
+				return cbVec;
+			}
+		}
+
+		size_t a = s.find("-");
+
+		while(a != string::npos)
+		{
+			if(a == 0) // hue = -1
+				a = s.find("-", 1);
+			int cc = 0;
+			memset(buf, '\0', 1000);
+			s.copy(buf, a);
+			ss = buf;
+
+			a++;
+			memset(buf, '\0', 1000);
+			s.copy(buf, s.size()-a, a);
+			s = buf;
+			a = s.find("-");
+			if(a == 0) // hue = -1
+				a = s.find("-", 1);
+			
+			string sss;
+			vector<double> vVec;
+			size_t aa = ss.find(";");
+			while(aa != string::npos)
+			{
+				cc++;
+				memset(buf, '\0', 1000);
+				ss.copy(buf, aa);
+				sss = buf;
+				double v = atof(sss.c_str());
+				vVec.push_back(v);
+
+				aa++;
+				memset(buf, '\0', 1000);
+				ss.copy(buf, ss.size()-aa, aa);
+				ss = buf;
+				aa = ss.find(";");
+			}
+			ColorBar cb;
+			double brilho, dist = atof(ss.c_str());
+			cb.distance_ = dist;
+
+			if(vVec.empty()) // error in group color
+			{
+				cbVec.clear();
+				TeColor c;
+				hsv2Rgb(c, 0, 255, 255);
+				cb.color(c);
+				cb.distance_ = 0.;
+				cbVec.push_back(cb);
+				hsv2Rgb(c, 240, 255, 255);
+				cb.color(c);
+				cb.distance_ = 1.;
+				cbVec.push_back(cb);
+				return cbVec;
+			}
+
+			if(vVec.size() >= 4)
+			{
+				cor.init((int)vVec[0], (int)vVec[1], (int)vVec[2]);
+				brilho = vVec[3];
+				cb.color(cor);
+			}
+			else
+			{
+				int h = (int)vVec[0];
+				int	s = (int)vVec[1];
+				int v = (int)vVec[2];
+				TeColor c;
+				hsv2Rgb(c, h, s, v);
+				cb.color(c);
+			}
+
+			cbVec.push_back(cb);
+
+			if(a == string::npos)
+			{
+				cc = 0;
+				vVec.clear();
+				ss = s;
+				size_t aa = ss.find(";");
+				while(aa != string::npos)
+				{
+					cc++;
+					memset(buf, '\0', 1000);
+					ss.copy(buf, aa);
+					sss = buf;
+					double v = atof(sss.c_str());
+					vVec.push_back(v);
+
+					aa++;
+					memset(buf, '\0', 1000);
+					ss.copy(buf, ss.size()-aa, aa);
+					ss = buf;
+					aa = ss.find(";");
+				}
+				ColorBar cb;
+				double brilho, dist = atof(ss.c_str());
+				cb.distance_ = dist;
+
+				if(vVec.size() >= 4)
+				{
+					cor.init((int)vVec[0], (int)vVec[1], (int)vVec[2]);
+					brilho = vVec[3];
+					cb.color(cor);
+				}
+				else
+				{
+					int h = (int)vVec[0];
+					int	s = (int)vVec[1];
+					int v = (int)vVec[2];
+					TeColor c;
+					hsv2Rgb(c, h, s, v);
+					cb.color(c);
+				}
+
+				cbVec.push_back(cb);
+			}
+		}
+	}
+	return cbVec;
+}
+
+
+vector<TeColor> getColors(vector<ColorBar>& iVec, int ncores)
+{
+	vector<TeColor> cVec;
+	vector<TeColor> outVec;
+	map<int, vector<TeColor> > colorMap;
+
+	generateColorBarMap(iVec, ncores * 255, colorMap);
+
+	map<int, vector<TeColor> > :: iterator it = colorMap.begin();
+
+	while(it != colorMap.end())
+	{
+		vector<TeColor>& cores = it->second;
+		vector<TeColor> :: iterator i = cores.begin();
+
+		while(i != cores.end())
+		{
+			cVec.push_back(*i);
+			i++;
+		}
+		it++;
+	}
+
+	int s = (int)cVec.size();
+	double d, dd = (double)s /(double)(ncores-1);
+	int	i = 0, j;
+
+	while(i < ncores)
+	{
+		d = dd * (double)i;
+		j = TeRound(d);
+		if(j >= s)
+			j = s - 1;
+		if((int)cVec.size() > j)
+			outVec.push_back(cVec[j]);
+		i++;
+	}
+	return outVec;
+}
+
+string getColors(vector<ColorBar>& aVec, vector<ColorBar>& bVec, int groupingMode)
+{
+	string s, ss;
+	vector<ColorBar> colorBarVec = aVec;
+	vector<ColorBar> :: iterator it;
+
+	int r, g, b;
+	double d;
+//	double br, d;
+
+	it = colorBarVec.begin();
+	while(it != colorBarVec.end())
+	{
+		ColorBar cb = (*it);
+		TeColor cor;
+		hsv2Rgb(cor, cb.h_, cb.s_, cb.v_);
+		r = cor.red_;
+		g = cor.green_;
+		b = cor.blue_;
+		d = cb.distance_;
+
+		s += Te2String(cb.h_) + ";" + Te2String(cb.s_) + ";" + Te2String(cb.v_) + ";" + Te2String(d, 2);
+		if(s.size() > 255)
+		{
+			s = ss;
+			break;
+		}
+
+		ss = s;		
+		it++;
+		if(it != colorBarVec.end())
+			s += "-";
+	}
+
+	if(groupingMode == TeStdDeviation)
+	{
+		s += "|";
+
+		colorBarVec = bVec;
+		it = colorBarVec.begin();
+		while(it != colorBarVec.end())
+		{
+			ColorBar cb = (*it);
+			TeColor cor;
+			hsv2Rgb(cor, cb.h_, cb.s_, cb.v_);
+			r = cor.red_;
+			g = cor.green_;
+			b = cor.blue_;
+			d = cb.distance_;
+
+			s += Te2String(cb.h_) + ";" + Te2String(cb.s_) + ";" + Te2String(cb.v_) + ";" + Te2String(d, 2);
+			if(s.size() > 255)
+			{
+				s = ss;
+				break;
+			}
+
+			ss = s;		
+			it++;
+			if(it != colorBarVec.end())
+				s += "-";
+		}
+	}
+
+	return s;
+}
+
+void rgb2Hsv(const TeColor& c, int& h, int& s, int& v)
+{
+	double r = (double)(c.red_ / 255.);
+	double g = (double)(c.green_ / 255.);
+	double b = (double)(c.blue_ / 255.);
+
+	double hh, ss, vv;
+	RGBtoHSV(r, g, b, hh, ss, vv);
+
+	h = TeRound(hh);
+	s = TeRound(255. * ss);
+	v = TeRound(255. * vv);
+}
+
+// r,g,b values are from 0 to 1
+// h = [0,360], s = [0,1], v = [0,1]
+//		if s == 0, then h = -1 (undefined)
+
+void RGBtoHSV(const double& r, const double& g, const double& b, double& h, double& s, double& v )
+{
+	if(r == g && g == b) // achromatic (grey)
+	{
+		h = - 1;
+		s = 0;
+		v = r;
+		return;
+	}
+
+	double min, max, delta;
+
+	min = MIN(r, g);
+	min = MIN(min, b);
+	max = MAX(r, g);
+	max = MAX(max, b);
+	v = max;				// v
+
+	delta = max - min;
+
+	if( max != 0 )
+		s = delta / max;		// s
+	else {
+		// r = g = b = 0		// s = 0, v is undefined
+		s = 0;
+		h = -1;
+		return;
+	}
+
+	if( r == max )
+		h = ( g - b ) / delta;		// between yellow & magenta
+	else if( g == max )
+		h = 2 + ( b - r ) / delta;	// between cyan & yellow
+	else
+		h = 4 + ( r - g ) / delta;	// between magenta & cyan
+
+	h *= 60;				// degrees
+	if( h < 0 )
+		h += 360;
+
+}
+
+void hsv2Rgb(TeColor& c, const int& h, const int& s, const int& v)
+{
+	double	r, g, b;
+	double hh = (double)h;
+	double ss = (double)s / 255.;
+	double vv = (double)v / 255.;
+
+	HSVtoRGB(r, g, b, hh, ss, vv);
+
+	c.red_ = TeRound(r * 255.);
+	c.green_ = TeRound(g * 255.);
+	c.blue_ = TeRound(b * 255.);
+}
+
+void HSVtoRGB( double& r, double& g, double& b, const double& h, const double& s, const double& v )
+{
+	int i;
+	double f, p, q, t, hh = h;
+
+	if( s == 0 || h == -1) {
+		// achromatic (grey)
+		r = g = b = v;
+		return;
+	}
+
+	hh /= 60;			// sector 0 to 5
+	i = TeRound(floor(hh));
+	f = hh - i;			// factorial part of h
+	p = v * ( 1 - s );
+	q = v * ( 1 - s * f );
+	t = v * ( 1 - s * ( 1 - f ) );
+
+	switch( i ) {
+		case 0:
+			r = v;
+			g = t;
+			b = p;
+			break;
+		case 1:
+			r = q;
+			g = v;
+			b = p;
+			break;
+		case 2:
+			r = p;
+			g = v;
+			b = t;
+			break;
+		case 3:
+			r = p;
+			g = q;
+			b = v;
+			break;
+		case 4:
+			r = t;
+			g = p;
+			b = v;
+			break;
+		default:		// case 5:
+			r = v;
+			g = p;
+			b = q;
+			break;
+	}
+}
+
+
+unsigned int  TeReadColorRampTextFile(const string& fileName, map<string,string>& colorRamps)
+{
+	string name;
+	string rgb;
+	vector<string> aux;
+	double r, g, b;
+	double h, s, v;
+	unsigned int ncolors = 0;
+	unsigned int n;
+	try
+	{
+		TeAsciiFile file(fileName);
+		do
+		{
+			string ramp;
+			try 
+			{
+				name = file.readLine();
+				ncolors = file.readInt();
+				file.findNewLine();
+				for (n=0; n<ncolors-1; ++n)
+				{
+					rgb = file.readLine();
+					aux.clear();
+					TeSplitString(rgb, ",", aux);
+					TeTrim(aux[0]);
+					TeTrim(aux[1]);
+					TeTrim(aux[2]);
+					r = atof(aux[0].c_str());	
+					g = atof(aux[1].c_str());
+					b = atof(aux[2].c_str());
+					RGBtoHSV(r, g, b, h, s, v);
+	                
+					ramp += Te2String(int(h)) + ";";
+					ramp += Te2String(int(s*255.)) + ";";
+					ramp += Te2String(int(v)) + ";";
+					ramp += Te2String(n) + "-";
+				}
+				rgb = file.readLine();
+				aux.clear();
+				TeSplitString(rgb, ",", aux);
+				TeTrim(aux[0]);
+				TeTrim(aux[1]);
+				TeTrim(aux[2]);
+				r = atof(aux[0].c_str());	
+				g = atof(aux[1].c_str());
+				b = atof(aux[2].c_str());
+				RGBtoHSV(r, g, b, h, s, v);
+	            
+				ramp += Te2String(int(h)) + ";";
+				ramp += Te2String(int(s*255.)) + ";";
+				ramp += Te2String(int(v))+ ";";
+				ramp += Te2String(n);
+				++ncolors;
+				TeTrim(name);
+				colorRamps[name]=ramp;
+			}
+			catch(...)
+			{
+				break;
+			}
+		}while(true);
+	}
+	catch(...)
+	{
+		return 0;
+	}
+	return colorRamps.size();
+}
diff --git a/src/terralib/utils/TeColorUtils.h b/src/terralib/utils/TeColorUtils.h
new file mode 100755
index 0000000..989a34c
--- /dev/null
+++ b/src/terralib/utils/TeColorUtils.h
@@ -0,0 +1,92 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeColorUtils.h
+    \brief This file contains functions to manipulate a structure representing a color
+*/
+#ifndef  __TERRALIB_INTERNAL_COLORUTILS_H
+#define  __TERRALIB_INTERNAL_COLORUTILS_H
+
+
+#include "TeVisual.h"
+#include "TeUtils.h"
+
+void rgb2Hsv(const TeColor& c, int& h, int& s, int& v);
+void RGBtoHSV(const double& r, const double& g, const double& b, double& h, double& s, double& v );
+void hsv2Rgb(TeColor& c, const int& h, const int& s, const int& v);
+void HSVtoRGB( double& r, double& g, double& b, const double& h, const double& s, const double& v );
+
+struct ColorBar {
+	TeColor cor_;
+	int		h_;
+	int		s_;
+	int		v_;
+	double	distance_;
+
+	void color(const TeColor& c){cor_ = c; rgb2Hsv(cor_, h_, s_, v_);}
+
+	ColorBar& operator= (const ColorBar& cb)
+	{
+		cor_ = cb.cor_;
+		h_ = cb.h_;
+		s_ = cb.s_;
+		v_ = cb.v_;
+		distance_ = cb.distance_;
+
+		return *this;
+	}
+
+	bool operator<= (const ColorBar& cb) const
+	{
+		return (distance_ <= cb.distance_);
+	}
+
+	bool operator< (const ColorBar& cb) const
+	{
+		return (distance_ < cb.distance_);
+	}
+};
+
+#include <vector>
+#include <string>
+#include <map>
+
+//! Generates a graduated color scale following a sequence of basic colors
+/*!
+	The possible basic colors are "RED", "GREEN", "BLUE", "YELLOW", "CYAN", "MAGENTA", "GRAY" and  "BLACK"
+	\param ramps	vector with the sequence color ramps used to build the scale 
+	\param nc		desired number of colors on the scale
+	\param colors	resulting color scale
+	\returns true if color scale was successfully generated and false otherwise
+*/
+bool getColors(std::vector<std::string>& ramps, int nc, std::vector<TeColor>& colors);
+vector<TeColor> getColors(TeColor cfrom, TeColor cto, int nc);
+vector<TeColor> getColors(vector<ColorBar>& iVec, int ncores);
+string getColors(vector<ColorBar>& aVec, vector<ColorBar>& bVec, int groupingMode);
+void generateColorBarMap(vector<ColorBar>& inputColorVec, int ncores, map<int, vector<TeColor> >& colorMap);
+vector<ColorBar> getColorBarVector(string& scores, const bool& first);
+unsigned int  TeReadColorRampTextFile(const string& fileName, map<string,string>& colorRamps);
+
+#endif
+
+
+
diff --git a/src/terralib/utils/TeDatabaseUtils.cpp b/src/terralib/utils/TeDatabaseUtils.cpp
new file mode 100755
index 0000000..7b61c50
--- /dev/null
+++ b/src/terralib/utils/TeDatabaseUtils.cpp
@@ -0,0 +1,582 @@
+/************************************************************************************
+TerraView - visualization and exploration of geographical databases using TerraLib.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+This file is part of TerraView. TerraView is free software; you can redistribute it 
+and/or modify it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
+
+You should have received a copy of the GNU General Public License
+along with TerraView.
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The software provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use of
+this program and its documentation.
+*************************************************************************************/
+
+#include <TeDatabaseUtils.h>
+#include <TeLayerFunctions.h>
+
+
+bool isTerralibModel(TeDatabase* db)
+{
+	vector<string>::iterator it;
+	vector<string> tables;
+	db->listTables(tables);
+
+	for(unsigned int i = 0; i<tables.size(); i++)
+	{
+		if((it = find(tables.begin(), tables.end(), "te_projection")) == tables.end())
+			return false;
+		if((it = find(tables.begin(), tables.end(), "te_layer")) == tables.end())
+			return false;
+		if((it = find(tables.begin(), tables.end(), "te_layer_table")) == tables.end())
+			return false;
+		if((it = find(tables.begin(), tables.end(), "te_tables_relation")) == tables.end())
+			return false;
+		if((it = find(tables.begin(), tables.end(), "te_representation")) == tables.end())
+			return false;
+		if((it = find(tables.begin(), tables.end(), "te_view")) == tables.end())
+			return false;
+		if((it = find(tables.begin(), tables.end(), "te_theme")) == tables.end())
+			return false;
+		if((it = find(tables.begin(), tables.end(), "te_grouping")) == tables.end())
+			return false;
+		if((it = find(tables.begin(), tables.end(), "te_theme_table")) == tables.end())
+			return false;
+		if((it = find(tables.begin(), tables.end(), "te_legend")) == tables.end())
+			return false;
+		if((it = find(tables.begin(), tables.end(), "te_visual")) == tables.end())
+			return false;
+		if((it = find(tables.begin(), tables.end(), "te_visual_raster")) == tables.end())
+			return false;
+		if((it = find(tables.begin(), tables.end(), "te_database")) == tables.end())
+			return false;
+	}
+	if(tables.size() == 0)
+		return false;
+
+	return true;
+}
+
+
+bool TeCopyDatabase(TeDatabase* dbFrom, TeDatabase* dbTo)
+{
+	// -- Step 1 : copies the external tables
+	TeAttrTableVector externs;
+	dbFrom->getAttrTables(externs,TeAttrExternal);
+	if (!externs.empty())
+	{
+		TeDatabasePortal* portal = dbFrom->getPortal();
+		if (!portal)
+		{
+			// log error here
+			return false;
+		}
+
+		for (unsigned int nt=0; nt < externs.size(); nt++)
+		{
+			TeTable table = externs[nt];
+			table.setId(-1);
+			string sql = "select * from " + table.name();
+			if (!portal->query(sql) || portal->numRows() == 0)
+			{
+				portal->freeResult();
+				continue;
+			}
+			if (!dbTo->createTable(table.name(),table.attributeList()))
+			{
+				portal->freeResult();
+				continue;
+			}
+			unsigned int nr=0;
+			while (portal->fetchRow())
+			{
+				TeTableRow row;
+				for(int i = 0; i < portal->numFields(); i++)
+					row.push_back(portal->getData(i));
+				table.add(row);
+				nr++;
+				if (nr % 200)
+				{
+					dbTo->insertTable(table);
+					table.clear();
+					nr = 0;
+				}
+			}
+			if (table.size() >0)
+				dbTo->insertTable(table);
+				table.clear();	
+			dbTo->insertTableInfo(-1,table);
+			portal->freeResult();
+		}
+		delete portal;
+	}
+
+	// -- Step 2: Copies the layers
+	if(!dbFrom->loadLayerSet())
+	{
+		// log error here
+		return false;
+	}
+
+	TeLayerMap& fromLayerMap = dbFrom->layerMap();
+	TeLayerMap::iterator itFrom = fromLayerMap.begin();
+
+	while(itFrom != fromLayerMap.end())
+	{
+		TeLayer* fromLayer = (*itFrom).second;
+		TeLayer* toLayer = new TeLayer(fromLayer->name(), dbTo, fromLayer->projection());
+		map<string, string> tables;
+		if (!TeCopyLayerToLayer(fromLayer, toLayer, &tables))
+		{
+			// log error here: layer couldn�t be copied
+		}
+		++itFrom;
+	}
+	// -- Set 3: Copies the views and themes
+	if(!dbFrom->loadViewSet(dbFrom->user()))
+	{
+		// log error here
+		return false;
+	}
+
+	if(!dbTo->loadLayerSet())
+	{
+		// log error here
+		return false;
+	}
+
+	TeViewMap&	fromViewMap = dbFrom->viewMap();
+	TeViewMap::iterator itvFrom = fromViewMap.begin();
+	while (itvFrom != fromViewMap.end())
+	{
+		TeView* fromView = (*itvFrom).second;			
+		TeView* toView = new TeView();
+
+		TeProjection* toViewProjection = 0;
+		if (fromView->projection())
+			 toViewProjection = TeProjectionFactory::make(fromView->projection()->params());
+		
+		toView->projection(toViewProjection);
+		toView->name(fromView->name());
+		toView->user(dbTo->user());
+		toView->isVisible(fromView->isVisible());
+
+		TeBox b;
+		toView->setCurrentBox(b);
+		toView->setCurrentTheme(-1);
+
+		if (!dbTo->insertView(toView))
+		{
+			// log error here
+			++itvFrom;
+			continue;
+		}
+		dbTo->insertView(toView);
+		if(dbTo->projectMap().empty() == false)
+		{
+			TeProjectMap& pm = dbTo->projectMap();
+			TeProject* project = pm.begin()->second;
+			project->addView(toView->id());
+		}
+		dbTo->insertProjectViewRel(1, toView->id());
+
+		TeLayerMap& toLayerMap = dbTo->layerMap();			
+		vector<TeViewNode*>& themeVec = fromView->themes();
+		for (unsigned int i = 0; i < themeVec.size(); ++i)
+		{
+			TeTheme* themeFrom = (TeTheme*) themeVec[i];
+			string fromLayerName = themeFrom->layer()->name();
+			TeLayer* toLayer = 0;
+			TeLayerMap::iterator itTo = toLayerMap.begin();
+			while(itTo != toLayerMap.end())
+			{
+				if(itTo->second->name() == fromLayerName)
+				{
+					toLayer = itTo->second;
+					break;
+				}
+				++itTo;
+			}
+
+			if (!toLayer )
+			{
+				// log error here
+				continue;
+			}
+			
+			TeTheme* themeTo = new TeTheme(themeFrom->name(), toLayer);
+			toView->add(themeTo);
+						
+			themeTo->outOfCollectionLegend(themeFrom->outOfCollectionLegend());
+			themeTo->withoutDataConnectionLegend(themeFrom->withoutDataConnectionLegend ());
+			themeTo->defaultLegend(themeFrom->defaultLegend());
+			themeTo->pointingLegend(themeFrom->pointingLegend());
+			themeTo->queryLegend(themeFrom->queryLegend());
+
+			TeAttrTableVector tftablevec = themeFrom->attrTables();
+			TeAttrTableVector tttablevec;
+
+			for (unsigned int nt=0; nt<tftablevec.size(); nt++)
+			{
+				TeTable attTable(tftablevec[nt].name());
+				dbTo->loadTableInfo(attTable);
+				tttablevec.push_back(attTable);
+			}
+			themeTo->setAttTables(tttablevec);
+			themeTo->attributeRest(themeFrom->attributeRest());
+			themeTo->temporalRest(themeFrom->temporalRest());
+			themeTo->spatialRest(themeFrom->spatialRest());
+			themeTo->visibleRep(themeFrom->visibleRep());
+			if(!themeTo->save() || !themeTo->buildCollection())
+			{
+				// log error here
+				continue;
+			}
+			themeTo->generateLabelPositions();
+			
+			if(themeFrom->grouping().groupMode_ != TeNoGrouping)
+			{
+				TeGrouping grouping;
+				grouping = themeFrom->grouping();				
+				themeTo->buildGrouping(grouping);
+				TeLegendEntryVector& legends = themeFrom->legend();
+				for (unsigned int nl=0; nl<legends.size(); nl++)
+					themeTo->setGroupingVisual(nl+1,legends[nl].getVisualMap());
+				if (!themeTo->saveGrouping())
+				{
+						// log error here
+				}
+			}
+		} // end for each theme
+		++itvFrom;
+	} // end for each view
+	return true;
+}
+
+vector<string> getObjects(TeTheme* theme, int sel)
+{
+	vector<string> svec;
+	if(!theme)
+		return svec;
+
+	TeDatabase* db = 0;
+	if(theme->getProductId() == TeEXTERNALTHEME)
+		db = static_cast<TeExternalTheme*>(theme)->getSourceDatabase();
+	else if(theme->getProductId() == TeTHEME)
+		db = static_cast<TeTheme*>(theme)->layer()->database();
+
+	if(db == 0)
+		return svec;
+
+	string C = theme->collectionTable();
+	string CA = theme->collectionAuxTable();
+	string input;
+
+	if(sel == TeSelectedByPointing)
+		input += " WHERE " + C + ".c_object_status = 1 OR " + C + ".c_object_status = 3";
+	else if(sel == TeNotSelectedByPointing)
+		input += " WHERE " + C + ".c_object_status = 0 OR " + C + ".c_object_status = 2";
+	else if(sel == TeSelectedByQuery)
+		input += " WHERE " + C + ".c_object_status = 2 OR " + C + ".c_object_status = 3";
+	else if(sel == TeNotSelectedByQuery)
+		input += " WHERE " + C + ".c_object_status = 0 OR " + C + ".c_object_status = 1";
+	else if(sel == TeSelectedByPointingAndQuery)
+		input += " WHERE " + C + ".c_object_status = 3";
+	else if(sel == TeSelectedByPointingOrQuery)
+		input += " WHERE " + C + ".c_object_status <> 0";
+	else if(sel == TeGrouped)
+		input += " WHERE " + C + ".c_legend_id <> 0";
+	else if(sel == TeNotGrouped)
+		input += " WHERE " + C + ".c_legend_id = 0";
+
+	string query = "SELECT " + C + ".c_object_id FROM " + C + " LEFT JOIN " + CA;
+	query += " ON " + C + ".c_object_id = " + CA + ".object_id" + input;
+
+	TeDatabasePortal* portal = db->getPortal();
+	if (portal->query(query) == false)
+	{
+		delete portal;
+		return svec;
+	}
+	while (portal->fetchRow())
+		svec.push_back(portal->getData(0));
+
+	delete portal;
+	return svec;
+}
+
+vector<string> getItems(TeTheme* theme, int sel)
+{
+	vector<string> svec;
+	if(!theme)
+		return svec;
+
+	TeDatabase* db = 0;
+	if(theme->getProductId() == TeEXTERNALTHEME)
+		db = static_cast<TeExternalTheme*>(theme)->getSourceDatabase();
+	else if(theme->getProductId() == TeTHEME)
+		db = static_cast<TeTheme*>(theme)->layer()->database();
+
+	if(db == 0)
+		return svec;
+
+	string C = theme->collectionTable();
+	string CA = theme->collectionAuxTable();
+	string input;
+
+	if(sel == TeSelectedByPointing)
+		input += " WHERE " + CA + ".grid_status = 1 OR " + CA + ".grid_status = 3";
+	else if(sel == TeNotSelectedByPointing)
+		input += " WHERE " + CA + ".grid_status = 0 OR " + CA + ".grid_status = 2";
+	else if(sel == TeSelectedByQuery)
+		input += " WHERE " + CA + ".grid_status = 2 OR " + CA + ".grid_status = 3";
+	else if(sel == TeNotSelectedByQuery)
+		input += " WHERE " + CA + ".grid_status = 0 OR " + CA + ".grid_status = 1";
+	else if(sel == TeSelectedByPointingAndQuery)
+		input += " WHERE " + CA + ".grid_status = 3";
+	else if(sel == TeSelectedByPointingOrQuery)
+		input += " WHERE " + CA + ".grid_status <> 0";
+	else if(sel == TeGrouped)
+		input += " WHERE " + C + ".c_legend_id <> 0";
+	else if(sel == TeNotGrouped)
+		input += " WHERE " + C + ".c_legend_id = 0";
+
+	string query = "SELECT " + CA + ".unique_id FROM " + C + " LEFT JOIN " + CA;
+	query += " ON " + C + ".c_object_id = " + CA + ".object_id" + input;
+
+	TeDatabasePortal* portal = db->getPortal();
+	if (portal->query(query) == false)
+	{
+		delete portal;
+		return svec;
+	}
+	while (portal->fetchRow())
+		svec.push_back(portal->getData(0));
+
+	delete portal;
+	return svec;
+}
+
+vector<string> getObjects(TeTheme* theme, vector<string>& itens)
+{
+	vector<string> svec;
+	if(!theme)
+		return svec;
+
+	TeDatabase* db = 0;
+	if(theme->getProductId() == TeEXTERNALTHEME)
+		db = static_cast<TeExternalTheme*>(theme)->getSourceDatabase();
+	else if(theme->getProductId() == TeTHEME)
+		db = static_cast<TeTheme*>(theme)->layer()->database();
+
+	if(db == 0)
+		return svec;
+
+	TeDatabasePortal* portal = db->getPortal();
+	string C = theme->collectionTable();
+	string CA = theme->collectionAuxTable();
+
+	string query = "SELECT " + C + ".c_object_id FROM " + C + " LEFT JOIN " + CA;
+	query += " ON " + C + ".c_object_id = " + CA + ".object_id";
+	query += " WHERE " + CA + ".unique_id IN ";
+
+	set<string> idSet;
+  
+  vector< string >::iterator it_begin = itens.begin();
+  vector< string >::iterator it_end = itens.end();
+  
+	vector<string> inVec = generateInClauses(it_begin, it_end, db, false);
+	vector<string>::iterator it;
+	for(it=inVec.begin(); it!=inVec.end(); ++it)
+	{
+		if((*it).empty() == false)
+		{
+			string sel = query + *it;
+			if (portal->query(sel) == false)
+			{
+				delete portal;
+				return svec;
+			}
+			while (portal->fetchRow())
+				idSet.insert(portal->getData(0));
+			portal->freeResult();
+		}
+	}
+	delete portal;
+
+	set<string>::iterator sit;
+	for(sit=idSet.begin(); sit!=idSet.end(); ++sit)
+		svec.push_back(*sit);
+	return svec;
+}
+
+vector<string> getItems(TeTheme* theme, vector<string>& objects)
+{
+	vector<string> svec;
+	if(!theme)
+		return svec;
+
+	TeDatabase* db = 0;
+	if(theme->getProductId() == TeEXTERNALTHEME)
+		db = static_cast<TeExternalTheme*>(theme)->getSourceDatabase();
+	else if(theme->getProductId() == TeTHEME)
+		db = static_cast<TeTheme*>(theme)->layer()->database();
+
+	if(db == 0)
+		return svec;
+
+	TeDatabasePortal* portal = db->getPortal();
+	string C = theme->collectionTable();
+	string CA = theme->collectionAuxTable();
+
+	string query = "SELECT " + CA + ".unique_id FROM " + C + " LEFT JOIN " + CA;
+	query += " ON " + C + ".c_object_id = " + CA + ".object_id";
+	query += " WHERE " + C + ".c_object_id IN ";
+  
+  vector< string >::iterator it_begin = objects.begin();
+  vector< string >::iterator it_end = objects.end();  
+
+	vector<string> inVec = generateInClauses(it_begin, it_end, db);
+	vector<string>::iterator it;
+	for(it=inVec.begin(); it!=inVec.end(); ++it)
+	{
+		if((*it).empty() == false)
+		{
+			string sel = query + *it;
+			if (portal->query(sel) == false)
+			{
+				delete portal;
+				return svec;
+			}
+			while (portal->fetchRow())
+				svec.push_back(portal->getData(0));
+			portal->freeResult();
+		}
+	}
+	delete portal;
+	return svec;
+}
+
+map<string, vector<string> > getObject2ItemsMap(TeTheme* theme, vector<string>& itens)
+{
+	map<string, vector<string> > outMap;
+	if(!theme)
+		return outMap;
+
+	TeDatabase* db = 0;
+	if(theme->getProductId() == TeEXTERNALTHEME)
+		db = static_cast<TeExternalTheme*>(theme)->getSourceDatabase();
+	else if(theme->getProductId() == TeTHEME)
+		db = static_cast<TeTheme*>(theme)->layer()->database();
+
+	if(db == 0)
+		return outMap;
+
+	TeDatabasePortal* portal = db->getPortal();
+	string C = theme->collectionTable();
+	string CA = theme->collectionAuxTable();
+
+	string query = "SELECT " + C + ".c_object_id, " + CA + ".unique_id FROM " + C + " LEFT JOIN " + CA;
+	query += " ON " + C + ".c_object_id = " + CA + ".object_id";
+	query += " WHERE " + CA + ".unique_id IN ";
+  
+  vector< string >::iterator it_begin = itens.begin();
+  vector< string >::iterator it_end = itens.end();   
+
+	vector<string> inVec = generateInClauses(it_begin, it_end, db, false);
+	vector<string>::iterator it;
+	for(it=inVec.begin(); it!=inVec.end(); ++it)
+	{
+		if((*it).empty() == false)
+		{
+			string sel = query + *it;
+			if (portal->query(sel) == false)
+			{
+				delete portal;
+				return outMap;
+			}
+			while (portal->fetchRow())
+				outMap[portal->getData(0)].push_back(portal->getData(1));
+			portal->freeResult();
+		}
+	}
+	delete portal;
+
+	return outMap;
+}
+
+vector<string>
+generateItemsInClauseVec(TeTheme* theme, string& where)
+{
+	vector<string> inClauseVector;
+	TeDatabase* db = 0;
+	string	CT = theme->collectionTable();
+	string	CA = theme->collectionAuxTable();
+	string	from = " FROM " + CT + " LEFT JOIN " + CA + " ON " + CT + ".c_object_id = " + CA + ".object_id";
+
+	if(theme->getProductId()==TeTHEME)
+		db = theme->layer()->database();
+	else if(theme->getProductId()==TeEXTERNALTHEME)
+		db = ((TeExternalTheme*) theme)->getSourceDatabase();
+
+	if(db == 0)
+		return inClauseVector;
+
+	TeDatabasePortal* portal = db->getPortal();
+	string sel = "SELECT " + CT + ".c_object_id, " + CA + ".unique_id " + from;
+
+	if(where.empty() == false)
+		sel += " " + where;
+
+	map<string, vector<string> > objMap;
+	if(portal->query(sel))
+	{
+		while(portal->fetchRow())
+			objMap[portal->getData(0)].push_back(portal->getData(1));
+	}
+
+	map<string, vector<string> >::iterator mit;
+	vector<string>::iterator it;
+
+	int i, chunkSize = 200;
+	string inClause;
+	
+	i = 0;
+	bool chunk = true;
+	for(mit=objMap.begin(); mit!=objMap.end(); ++mit)
+	{
+		if (chunk == true)
+		{
+			chunk = false;
+			if (!inClause.empty())
+			{
+				inClause[inClause.size() - 1] = ')';
+				inClauseVector.push_back(inClause);
+				inClause.clear();
+			}
+			inClause = "(";
+		}
+		for(it=mit->second.begin(); it!=mit->second.end(); ++it)
+		{
+			inClause += *it + ",";
+			i++;
+			if (i%chunkSize == 0)
+				chunk = true;
+		}
+	}
+	if (!inClause.empty())
+	{
+		inClause[inClause.size() - 1] = ')';
+		inClauseVector.push_back(inClause);
+	}
+	return inClauseVector;
+}
+
+
+
diff --git a/src/terralib/utils/TeDatabaseUtils.h b/src/terralib/utils/TeDatabaseUtils.h
new file mode 100755
index 0000000..9824915
--- /dev/null
+++ b/src/terralib/utils/TeDatabaseUtils.h
@@ -0,0 +1,122 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeDatabaseUtils.h
+    \brief This file contains some utilitary functions to extended the TerraLib data model for TerraView like applications.
+*/
+#ifndef __TERRALIB_INTERNAL_DATABASEUTILS_H
+#define __TERRALIB_INTERNAL_DATABASEUTILS_H
+
+
+#include <TeDatabase.h>
+#include <TeExternalTheme.h>
+#include <string>
+#include <vector>
+using std::string;
+using std::vector;
+
+
+/** @defgroup DBUtils Utilitary functions
+    @ingroup  DatabaseUtils
+	A set of utilitary functions
+ *  @{
+ */
+/**  This function copies the contents of a TerraLib database to another TerraLib database
+	\param dbFrom A pointer to the source database
+	\param dbTo	  A pointer to the destination database
+*/
+bool TeCopyDatabase(TeDatabase* dbFrom, TeDatabase* dbTo);
+
+
+/** Returns true whether a database contains the TerraLib data model
+	\param db	pointer do a TerraLib database
+*/
+bool isTerralibModel(TeDatabase* db);
+
+vector<string> generateItemsInClauseVec(TeTheme* theme, string& where);
+
+vector<string> getObjects(TeTheme* theme, int sel);
+
+vector<string> getItems(TeTheme* theme, int sel);
+
+vector<string> getObjects(TeTheme* theme, vector<string>& itens);
+
+map<string, vector<string> > getObject2ItemsMap(TeTheme* theme, vector<string>& itens);
+
+vector<string> getItems(TeTheme* theme, vector<string>& objcts);
+
+template <typename Iterator>
+vector<string>
+generateItemsInClauses(Iterator& begin, Iterator& end, TeTheme* theme)
+{
+	vector<string> itenVec;
+	Iterator temp = begin;
+	while (temp != end)
+	{
+		itenVec.push_back(*temp);
+		temp++;
+	}
+
+	map<string, vector<string> > objMap = getObject2ItemsMap(theme, itenVec);
+	map<string, vector<string> >::iterator mit;
+	vector<string>::iterator it;
+
+	int i, chunkSize = 200;
+	string inClause;
+	vector<string> inClauseVector;
+	
+	i = 0;
+	bool chunk = true;
+	for(mit=objMap.begin(); mit!=objMap.end(); ++mit)
+	{
+		if (chunk == true)
+		{
+			chunk = false;
+			if (!inClause.empty())
+			{
+				inClause[inClause.size() - 1] = ')';
+				inClauseVector.push_back(inClause);
+				inClause.clear();
+			}
+			inClause = "(";
+		}
+		for(it=mit->second.begin(); it!=mit->second.end(); ++it)
+		{
+			inClause += *it + ",";
+			i++;
+			if (i%chunkSize == 0)
+				chunk = true;
+		}
+	}
+	if (!inClause.empty())
+	{
+		inClause[inClause.size() - 1] = ')';
+		inClauseVector.push_back(inClause);
+	}
+	return inClauseVector;
+}
+
+
+//@}
+
+#endif
+
diff --git a/src/terralib/utils/TeUpdateDBVersion.cpp b/src/terralib/utils/TeUpdateDBVersion.cpp
new file mode 100755
index 0000000..96d19d6
--- /dev/null
+++ b/src/terralib/utils/TeUpdateDBVersion.cpp
@@ -0,0 +1,1641 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+
+#include "TeUpdateDBVersion.h"
+
+bool isLowerVersion(const std::string& version1, const std::string& version2)
+{
+	bool isLower = false;
+
+	std::vector<std::string> vecVersion1;
+	std::vector<std::string> vecVersion2;
+	
+	TeSplitString(version1, ".", vecVersion1);
+	TeSplitString(version2, ".", vecVersion2);
+
+	if(vecVersion1.size() < vecVersion2.size())
+	{
+		for(unsigned int i = vecVersion1.size(); i < vecVersion2.size(); ++i)
+		{
+			vecVersion1.push_back("0");
+		}
+	}
+	else if(vecVersion2.size() < vecVersion1.size())
+	{
+		for(unsigned int i = vecVersion2.size(); i < vecVersion1.size(); ++i)
+		{
+			vecVersion2.push_back("0");
+		}
+	}
+
+	for(unsigned int i = 0; i < vecVersion1.size(); ++i)
+	{
+		int sub1 = atoi(vecVersion1[i].c_str());
+		int sub2 = atoi(vecVersion2[i].c_str());
+
+		if(sub1 != sub2)
+		{
+			if(sub1 < sub2)
+			{
+				isLower = true;
+			}
+			break;
+		}
+	}
+	
+	return isLower;
+}
+
+bool needUpdateDB(TeDatabase* db, string& DBversion)
+{
+	TeDatabasePortal* portal = db->getPortal();
+	if(!portal)
+		return false;
+
+	string sql = " SELECT db_version FROM te_database ";
+	//The database does not have the te_database connection
+	if(!portal->query(sql))
+	{
+		DBversion = "";
+		delete portal;
+		return false;
+	}
+
+	if(!portal->fetchRow())
+	{
+		DBversion = "";
+		delete portal;
+		return true;
+	}
+
+	DBversion = portal->getData(0);
+	if(DBversion==TeDBVERSION)
+	{
+		delete portal;
+		return false;
+	}
+	
+	delete portal;
+	return true;
+}
+
+
+bool updateDBVersion(TeDatabase* db, string& DBversion, string& errorMessage)
+{
+	//from old version to 3.0
+	db->beginTransaction();
+	if(DBversion=="")
+	{
+		if(!updateDB30To301(db, errorMessage))
+		{
+			db->rollbackTransaction();
+			return false;
+		}
+
+		if(!updateDB20To30(db, errorMessage))
+		{
+			db->rollbackTransaction();
+			return false;
+		}
+		
+		DBversion = "3.0.1";
+	}
+
+	//from 3.0 to 3.0.1
+	if(DBversion=="3.0") 
+	{
+		if(!updateDB30To301(db, errorMessage))
+		{
+			db->rollbackTransaction();
+			return false;
+		}
+
+		DBversion = "3.0.1";
+	}
+
+	//from 3.0.1 to 3.0.2
+	if(DBversion=="3.0.1") 
+	{
+		if(!updateDB301To302(db, errorMessage))
+		{
+			db->rollbackTransaction();
+			return false;
+		}
+
+		DBversion = "3.0.2";
+	}
+
+	//from 3.0.2 to 3.1.0
+	if(DBversion=="3.0.2") 
+	{
+		if(!updateDB302To310(db, errorMessage))
+		{
+			db->rollbackTransaction();
+			return false;
+		}
+
+		DBversion = "3.1.0";
+	}
+
+	if(DBversion=="3.1.0")
+	{
+		if(!updateDB310To311(db, errorMessage))
+		{
+			db->rollbackTransaction();
+			return false;
+		}
+
+		DBversion = "3.1.1";
+	}
+
+	if(DBversion=="3.1.1")
+	{
+		if(!updateDB311To320(db, errorMessage))
+		{
+			db->rollbackTransaction();
+			return false;
+		}
+		DBversion = "3.2.0";
+	}
+
+	if(DBversion=="3.2.0")
+	{
+		if(!updateDB320To3201(db, errorMessage))
+		{
+			db->rollbackTransaction();
+			return false;
+		}
+		DBversion = "3.2.0.1";
+	}
+
+	if(DBversion=="3.2.0.1")
+	{
+		if(!updateDB3201To331(db, errorMessage))
+		{
+			db->rollbackTransaction();
+			return false;
+		}
+		DBversion = "3.3.1";
+	}
+	
+	if(DBversion!=TeDBVERSION)
+	{
+		db->rollbackTransaction();
+		return false;
+	}
+
+	string del= "DELETE FROM te_database"; 
+	if(!db->execute(del))
+	{
+		db->rollbackTransaction();
+		return false;
+	}
+
+	string ins = "INSERT INTO te_database (db_version) VALUES ('"+ TeDBVERSION +"')";
+	if(!db->execute(ins))
+	{
+		db->rollbackTransaction();
+		return false;
+	}
+
+	db->commitTransaction();
+	return true;
+}
+
+
+bool updateDB20To30(TeDatabase* db, string& errorMessage)
+{
+	TeAttribute fattr;
+
+	// ----- te_grouping 
+
+	if(db->columnExist("te_grouping", "grouping_function", fattr) == false)
+	{
+		TeAttributeRep atRep;
+		atRep.type_ = TeSTRING;
+		atRep.name_ = "grouping_function";
+		atRep.numChar_ = 10;
+		if(db->addColumn("te_grouping", atRep) == false)
+		{
+			errorMessage = "The column grouping_function could not be appended!\n";
+			errorMessage += db->errorMessage();
+			return false;
+		}
+
+		string upd;
+		if(db->columnExist("te_theme_application", "group_function", fattr))
+		{
+			upd =	" UPDATE te_grouping g, te_theme_application ta ";
+			upd +=	" SET g.grouping_function = ta.group_function ";
+			upd +=	" WHERE ta.theme_id = g.theme_id ";
+
+			if(!db->execute (upd))
+			{
+				errorMessage = db->errorMessage();
+				return false;
+			}
+
+			db->deleteColumn("te_theme_application", "group_function");
+		}
+		else
+		{
+			upd =	" UPDATE te_grouping g ";
+			upd +=	" SET g.grouping_function = 'AVG' ";
+			
+			if(!db->execute (upd))
+			{
+				errorMessage = db->errorMessage();
+				return false;
+			}
+		}
+	}
+
+	// ----- te_theme_application
+
+	if(db->columnExist("te_theme_application", "chart_function", fattr) == false)
+	{
+		TeAttributeRep atRep;
+		atRep.type_ = TeSTRING;
+		atRep.name_ = "chart_function";
+		atRep.numChar_ = 10;
+		if(db->addColumn("te_theme_application", atRep) == false)
+		{
+			errorMessage = "The column chart_function could not be appended!\n";
+			errorMessage += db->errorMessage();
+			return false;
+		}
+		db->execute("UPDATE te_theme_application SET chart_function = 'AVG'");
+	}
+
+	// ----- te_theme 
+	if(db->columnExist("te_theme", "visible_rep", fattr) == false)
+	{
+		TeAttributeRep atRep;
+		atRep.type_ = TeINT;
+		atRep.name_ = "visible_rep";
+		if(db->addColumn("te_theme", atRep) == false)
+		{
+			errorMessage = "The column visible_rep could not be appended!\n";
+			errorMessage += db->errorMessage();
+			return false;
+		}
+
+		atRep.name_ = "enable_visibility";
+		if(db->addColumn("te_theme", atRep) == false)
+		{
+			errorMessage = "The column enable_visibility could not be appended!\n";
+			errorMessage += db->errorMessage();
+			return false;
+		}
+
+		string upd = " UPDATE te_theme t, te_theme_application ta ";
+		upd +=       " SET t.visible_rep = ta.visible_rep ";
+		upd +=       " WHERE ta.theme_id = t.theme_id ";
+		if(!db->execute (upd))
+		{
+			errorMessage = db->errorMessage();
+			return false;
+		}
+
+		upd =		 " UPDATE te_theme t, te_theme_application ta ";
+		upd +=       " SET t.enable_visibility = ta.enable_visibility ";
+		upd +=       " WHERE ta.theme_id = t.theme_id ";
+		if(!db->execute (upd))
+		{
+			errorMessage = db->errorMessage();
+			return false;
+		}
+			
+		db->deleteColumn("te_theme_application", "visible_rep");
+		db->deleteColumn("te_theme_application", "enable_visibility");
+	}
+
+	//if for ADO passar todas as tabelas para aceitar comprimento iguel a zero!!!
+	if(db->dbmsName() == "Ado")
+	{
+		//te_layer 
+		//te_layer_table
+		db->allowEmptyString ("te_layer_table", "attr_initial_time");
+		db->allowEmptyString ("te_layer_table", "attr_final_time");
+		db->allowEmptyString ("te_layer_table", "user_name");
+
+		//te_representation
+		db->allowEmptyString ("te_representation", "description");
+		
+		//te_view
+		db->allowEmptyString ("te_view", "user_name");
+
+		//te_visual
+		db->allowEmptyString ("te_visual", "lib_name");
+		db->allowEmptyString ("te_visual", "contour_lib_name");
+		db->allowEmptyString ("te_visual", "family");
+
+		//te_legend
+		db->allowEmptyString ("te_legend", "lower_value");
+		db->allowEmptyString ("te_legend", "upper_value");
+		db->allowEmptyString ("te_legend", "label");
+		
+		//te_theme
+		db->allowEmptyString ("te_theme", "generate_attribute_where");
+		db->allowEmptyString ("te_theme", "generate_spatial_where");
+		db->allowEmptyString ("te_theme", "generate_temporal_where");
+		db->allowEmptyString ("te_theme", "collection_table");
+
+		//te_grouping
+		db->allowEmptyString ("te_grouping", "grouping_attr");
+		db->allowEmptyString ("te_grouping", "grouping_norm_attr");
+		db->allowEmptyString ("te_grouping", "grouping_function");
+
+		//te_theme_application
+		db->allowEmptyString ("te_theme_application", "refine_attribute_where");
+		db->allowEmptyString ("te_theme_application", "refine_spatial_where");
+		db->allowEmptyString ("te_theme_application", "refine_temporal_where");
+		db->allowEmptyString ("te_theme_application", "grouping_color");
+		db->allowEmptyString ("te_theme_application", "pie_dimension_attr");
+		db->allowEmptyString ("te_theme_application", "text_table");
+		db->allowEmptyString ("te_theme_application", "chart_function");
+	}
+
+	//------------ auxiliary collection  
+	TeDatabasePortal* portal = db->getPortal();
+	if(!portal)
+		return false;
+
+	string sql = " SELECT theme_id, visible_rep FROM te_theme ";
+	if(!portal->query(sql))
+	{
+		delete portal;
+		return true;
+	}
+
+	while(portal->fetchRow ())
+	{
+		string	themeId = portal->getData(0);
+		int		visRep  = atoi(portal->getData(1));
+
+		string collExtTable = "te_collection_"+ themeId +"_aux";
+		
+		if	((db->tableExist("te_collection_"+ themeId)) && 
+			((visRep & TeRASTER) != TeRASTER)			 && 
+			(!db->tableExist(collExtTable)))
+		{
+			TeTheme* theme = new TeTheme();
+			theme->id(atoi(themeId.c_str()));
+			if(!db->loadTheme (theme))
+			{
+				delete portal;
+				return false;
+			}
+
+			string up = "UPDATE " + theme->collectionTable() + " SET c_object_status = 0";
+			up += " WHERE c_object_status <> " + Te2String(theme->pointingLegend().id());
+			up += " AND c_object_status <> " + Te2String(theme->queryLegend().id());
+			up += " AND c_object_status <> " + Te2String(theme->queryAndPointingLegend().id());
+			db->execute(up);
+
+			up = "UPDATE " + theme->collectionTable() + " SET c_object_status = 1";
+			up += " WHERE c_object_status = " + Te2String(theme->pointingLegend().id());
+			db->execute(up);
+
+			up = "UPDATE " + theme->collectionTable() + " SET c_object_status = 2";
+			up += " WHERE c_object_status = " + Te2String(theme->queryLegend().id());
+			db->execute(up);
+
+			up = "UPDATE " + theme->collectionTable() + " SET c_object_status = 3";
+			up += " WHERE c_object_status = " + Te2String(theme->queryAndPointingLegend().id());
+			db->execute(up);
+
+			if ((!theme->createCollectionAuxTable()) || (!theme->populateCollectionAux())) 
+			{
+				errorMessage = "Fail to mount the auxiliary table of the collection!\n";
+				errorMessage += db->errorMessage();
+				delete portal;
+				return false;
+			}
+
+			theme->collectionAuxTable(collExtTable);
+			theme->addThemeTable(collExtTable);
+					
+			string oldTCE = theme->collectionTable() + "_ext";
+			if (db->tableExist(oldTCE))
+			{
+				string delTable = "DROP TABLE " + oldTCE;
+				db->execute(delTable);
+			}
+		}
+		
+	}
+	//------------ end auxiliary collection  
+
+	portal->freeResult();
+
+	//------------ text table  
+	// if text table have not text visual table associated, create it
+	string sel = "SELECT geom_table FROM te_representation WHERE";
+	sel += " geom_type = " + Te2String(TeTEXT);
+	if(portal->query(sel))
+	{
+		while(portal->fetchRow())
+		{
+			string table = portal->getData(0);
+			string tvis = table + "_txvisual";
+			if(!db->tableExist(tvis))
+			{
+				TeAttributeList atl;
+				TeAttribute		at;
+
+				at.rep_.name_ = "geom_id";
+				at.rep_.type_ = TeINT;
+				at.rep_.numChar_ = 0;
+				at.rep_.isPrimaryKey_ = true;
+				atl.push_back(at);
+
+				at.rep_.isPrimaryKey_ = false;
+				at.rep_.name_ = "dot_height";
+				at.rep_.type_ = TeINT;
+				atl.push_back(at);
+
+				at.rep_.name_ = "fix_size";
+				at.rep_.type_ = TeINT;
+				atl.push_back(at);
+
+				at.rep_.name_ = "color";
+				at.rep_.type_ = TeINT;
+				atl.push_back(at);
+
+				at.rep_.name_ = "family";
+				at.rep_.type_ = TeSTRING;
+				at.rep_.numChar_ = 128;
+				atl.push_back(at);
+
+				at.rep_.name_ = "bold";
+				at.rep_.type_ = TeINT;
+				at.rep_.numChar_ = 0;
+				atl.push_back(at);
+
+				at.rep_.name_ = "italic";
+				at.rep_.type_ = TeINT;
+				atl.push_back(at);
+
+				db->createTable(tvis, atl);
+				string fk = "fk_" + tvis;
+				db->createRelation(fk, tvis, "geom_id", table, "geom_id", true);
+				string ins = "INSERT INTO " + tvis + " (geom_id) SELECT geom_id FROM " + table;
+				db->execute(ins);
+
+				string popule = "UPDATE " + tvis;
+				popule += " SET dot_height = 12";
+				popule += ", fix_size = 0";
+				popule += ", color = 16711680";
+				popule += ", family = 'verdana'";
+				popule += ", bold = 1";
+				popule += ", italic = 0";
+				if(!db->execute(popule))
+				{
+					errorMessage = "Fail to generate the text visual table!\n";
+					errorMessage += db->errorMessage();
+					delete portal;
+					return false;;
+				}
+			}
+		}
+	}
+	//------------ end text table  
+	delete portal;
+	return true;
+}
+
+
+bool updateDB30To301(TeDatabase* db, string& errorMessage)
+{
+	TeAttribute fattr;
+
+	TeDatabasePortal* portal = db->getPortal();
+	if(!portal)
+		return false;
+
+	// ----- collection_table
+
+	string sql = " SELECT collection_table FROM te_theme ";   
+	if(!portal->query(sql))
+	{
+		delete portal;
+		return false;
+	}
+
+	while(portal->fetchRow())
+	{
+		string collName = portal->getData(0);
+		if(	(db->tableExist(collName)) && 
+			(!db->columnExist(collName, "c_object_status", fattr)))
+		{
+			TeAttributeRep atRep;
+			atRep.type_ = TeINT;
+			atRep.name_ = "c_object_status";
+			if(db->addColumn(collName, atRep) == false)
+			{
+				errorMessage = "The column c_object_status could not be appended!\n";
+				errorMessage += db->errorMessage();
+				delete portal;
+				return false;
+			}
+
+			string upd = " UPDATE "+collName+" t1, "+collName+" t2 ";
+			upd +=	" SET t1.c_object_status = t2.c_legend_result ";
+			upd +=	" WHERE t1.c_object_id = t2.c_object_id ";
+
+			if(!db->execute (upd))
+			{
+				errorMessage = db->errorMessage();
+				delete portal;
+				return false;
+			}
+
+			db->deleteColumn(collName, "c_legend_result");
+		}
+	}
+
+	delete portal;
+	return true; 
+}
+
+
+bool updateDB301To302(TeDatabase* db, string& errorMessage)
+{
+		
+	TeDatabasePortal* portal = db->getPortal();
+	if(!portal)
+		return false;
+
+	// ----- valid attribute table 
+	
+	TeAttrTableVector attrTableVec;
+	if(db->getAttrTables(attrTableVec))
+	{
+		for(unsigned int i=0; i<attrTableVec.size(); ++i)
+		{
+			TeTable fromTable = attrTableVec[i];
+			bool	flag = false;
+			
+			if(fromTable.tableType()==TeAttrMedia)
+				continue;
+
+			//verify if there is another table with the same name
+			for(unsigned int j=0; j<i; ++j)
+			{
+				if(TeConvertToUpperCase(attrTableVec[j].name())==TeConvertToUpperCase(fromTable.name())) 
+				{
+					flag = true;
+					break;
+				}
+			}
+
+			if(flag)
+				continue;
+			
+			if(db->validTable(fromTable)) //fromTable was modified
+			{
+				TeAttributeList newAttrList = fromTable.attributeList();
+				TeAttributeList oldAttrList = attrTableVec[i].attributeList();
+				TeAttributeList::iterator newAttIt = newAttrList.begin();
+				TeAttributeList::iterator oldAttIt = oldAttrList.begin();
+
+				bool change = false;
+				while(newAttIt!=newAttrList.end())
+				{
+					if(((*oldAttIt).rep_.name_) != ((*newAttIt).rep_.name_))
+					{
+						TeAttributeRep rep = (*newAttIt).rep_;
+						if(db->alterTable(fromTable.name(), rep, (*oldAttIt).rep_.name_))
+							change = true;
+					}
+
+					++newAttIt;
+					++oldAttIt;
+				}
+
+				if(change)
+				{
+					// update te_layer_table
+					string upd = " UPDATE te_layer_table ";
+					upd +=	" SET unique_id = '"+ fromTable.uniqueName() +"'";
+					upd +=  ", attr_link = '"+ fromTable.linkName() +"'";
+					upd +=	" WHERE attr_table = '"+ fromTable.name() +"'";
+
+					if(!db->execute (upd))
+					{
+						delete portal;
+						errorMessage = "Error updating te_layer_table!\n";
+						errorMessage += db->errorMessage();
+						return false;
+					}
+				}
+			}//if
+		}//for
+		portal->freeResult();
+	}
+
+	// ----- te_grouping table
+
+	string sel = " SELECT theme_id, grouping_attr, grouping_attr_type FROM te_grouping ";
+	if(!portal->query(sel))
+	{
+		delete portal;
+		return false;
+	}
+
+	while(portal->fetchRow())
+	{
+		string themeId, gAttr;
+		themeId = portal->getData(0);
+		gAttr = portal->getData(1);
+		int gTypr = portal->getInt(2);
+		
+		if(((gAttr.empty()) || (gAttr=="NONE")) && (gTypr==0))
+		{
+			string del = " DELETE FROM te_grouping WHERE theme_id = "+ themeId; 
+			db->execute(del);
+		}
+	}
+
+	// ----- te_grouping table
+
+	delete portal;
+	return true; 
+}
+
+bool PostgreSQLUpdateDB302To310(TeDatabase* db, TeGeomRep rep, const string& geomTableName)
+{
+	string geomColumnName = "spatial_box";
+
+	if(rep & TeRASTER)
+		geomColumnName = "block_box";
+
+	TeAttribute attr;
+
+// verifies if table already has a box column
+	if(db->columnExist(geomTableName, geomColumnName, attr))
+		return true;
+
+// add box column
+	string sql  = "ALTER TABLE " + geomTableName;
+			sql += " ADD COLUMN " + geomColumnName + " BOX";
+
+	if(!db->execute(sql))
+		return false;
+
+// make sure box column exist	
+	if(!db->columnExist(geomTableName, geomColumnName, attr))
+		return false;
+
+// populate column with values from older one
+	sql  = "UPDATE " + geomTableName;
+
+	if(rep & TePOINTS)
+		sql += " SET " + geomColumnName + " = box(point(x, y), point(x, y))";
+	else
+		sql += " SET " + geomColumnName + " = box(point(upper_x, upper_y), point(lower_x, lower_y))";
+
+	if(!db->execute(sql))
+		return false;
+
+// check if there is no null values
+	sql  = "SELECT * FROM " + geomTableName;
+	sql += " WHERE " + geomColumnName + " IS NULL";
+
+	TeDatabasePortal* p = db->getPortal();
+
+	if(!p)
+		return false;
+
+	 if(!p->query(sql))
+	 {
+		 delete p;
+
+		 return false;
+	 }
+
+     if(p->fetchRow())
+     {
+         delete p;
+
+         return false;
+	 }
+
+     delete p;
+
+// add not null for box column
+	sql  = "ALTER TABLE " + geomTableName;
+	sql += " ALTER COLUMN " + geomColumnName + " SET NOT NULL";
+
+	if(!db->execute(sql))
+		return false;
+	
+// create GiST index
+	if(!db->createSpatialIndex(geomTableName, geomColumnName))
+		return false;
+
+// for points is enough
+	if(rep & TePOINTS)
+		return true;
+
+// drop older B-Tree index
+	sql = "DROP INDEX " +  geomTableName + "_idx_box";
+
+	if(!db->execute(sql))
+		return false;
+
+// drop older box column
+	sql  = "ALTER TABLE " + geomTableName;
+	sql += " DROP COLUMN lower_x";
+
+	if(!db->execute(sql))
+		return false;
+
+	sql  = "ALTER TABLE " + geomTableName;
+	sql += " DROP COLUMN lower_y";
+
+	if(!db->execute(sql))
+		return false;
+
+	sql  = "ALTER TABLE " + geomTableName;
+	sql += " DROP COLUMN upper_x";
+
+	if(!db->execute(sql))
+		return false;
+
+	sql  = "ALTER TABLE " + geomTableName;
+	sql += " DROP COLUMN upper_y";
+
+	if(!db->execute(sql))
+		return false;
+
+	return true;
+}
+
+bool updateDB302To310(TeDatabase* db, string& errorMessage)
+{
+	// Append the column "grouping_chronon" in the "te_grouping"
+	// table if he column doesn�t exist
+	TeAttribute attr;
+	if(db->columnExist("te_grouping", "grouping_chronon", attr) == false)
+	{
+		TeAttributeRep atRep;
+		atRep.type_ = TeINT;
+		atRep.name_ = "grouping_chronon";
+		if(db->addColumn("te_grouping", atRep) == false)
+		{
+			errorMessage = "The column grouping_chronon could not be appended!\n";
+			errorMessage += db->errorMessage();
+			return false;
+		}
+
+		// Set the new column "grouping_chronon" to no chronon
+		string upd = " UPDATE te_grouping ";
+		upd +=	" SET grouping_chronon = 0 ";	
+		if(!db->execute (upd))
+		{
+			errorMessage = db->errorMessage();
+			return false;
+		}
+
+	}
+
+	if(db->dbmsName() == "MySQL")
+	{
+		TeAttributeRep rep;
+		rep.name_ = "visible_rep";
+		rep.type_ = TeINT;
+		
+		if (db->alterTable("te_theme", rep) == false)
+		{
+			errorMessage = db->errorMessage();
+			return false;
+		}
+	}
+	else if(db->dbmsName() == "PostgreSQL")
+	{
+		if(!db->execute("BEGIN TRANSACTION"))
+		{
+			errorMessage = db->errorMessage();
+			return false;
+		}
+
+		if(!db->loadLayerSet())
+		{
+			db->execute("ROLLBACK TRANSACTION");
+			return false;
+		}
+
+		TeLayerMap& layerMap = db->layerMap();
+
+		TeLayerMap::iterator itLayer = layerMap.begin();
+
+//		for each layer, find representations to update box columns
+		while(itLayer != layerMap.end())
+		{
+// update point geometry table
+			TeRepresentation* rep = itLayer->second->getRepresentation(TePOINTS);
+
+			if(rep)
+			{
+				string geomTableName = rep->tableName_;
+
+				if(!PostgreSQLUpdateDB302To310(db, TePOINTS, geomTableName))
+				{
+					db->execute("ROLLBACK TRANSACTION");
+
+					return false;
+				}
+			}
+
+// update line geometry table
+			rep = itLayer->second->getRepresentation(TeLINES);
+
+			if(rep)
+			{
+				string geomTableName = rep->tableName_;
+
+				if(!PostgreSQLUpdateDB302To310(db, TeLINES, geomTableName))
+				{
+					db->execute("ROLLBACK TRANSACTION");
+
+					return false;
+				}
+			}
+
+// update polygon geometry table
+			rep = itLayer->second->getRepresentation(TePOLYGONS);
+
+			if(rep)
+			{
+				string geomTableName = rep->tableName_;
+
+				if(!PostgreSQLUpdateDB302To310(db, TePOLYGONS, geomTableName))
+				{
+					db->execute("ROLLBACK TRANSACTION");
+
+					return false;
+				}
+			}
+
+// update raster geometry table
+			rep = itLayer->second->getRepresentation(TeRASTER);
+
+			if(rep)
+			{
+				string rasterGeomTableName = rep->tableName_;
+
+				string sql = "SELECT raster_table FROM " + rasterGeomTableName;
+
+				TeDatabasePortal* p = db->getPortal();
+
+				if(!p)
+				{
+					db->execute("ROLLBACK TRANSACTION");
+
+					return false;
+				}
+
+				if(!p->query(sql))
+				{
+					delete p;
+
+					db->execute("ROLLBACK TRANSACTION");
+
+					return false;
+				}
+
+				while(p->fetchRow())
+				{
+					string geomTableName = p->getData(0);
+
+					if(!PostgreSQLUpdateDB302To310(db, TeRASTER, geomTableName))
+					{
+						delete p;
+
+						db->execute("ROLLBACK TRANSACTION");
+
+						return false;
+					}
+				}
+
+				delete p;
+			}
+
+// update cell geometry table
+			rep = itLayer->second->getRepresentation(TeCELLS);
+
+			if(rep)
+			{
+				string geomTableName = rep->tableName_;
+
+				if(!PostgreSQLUpdateDB302To310(db, TeCELLS, geomTableName))
+				{
+					db->execute("ROLLBACK TRANSACTION");
+
+					return false;
+				}
+			}
+
+// update node geometry table
+			rep = itLayer->second->getRepresentation(TeNODES);
+
+			if(rep)
+			{
+				string geomTableName = rep->tableName_;
+
+				if(!PostgreSQLUpdateDB302To310(db, TeNODES, geomTableName))
+				{
+					db->execute("ROLLBACK TRANSACTION");
+
+					return false;
+				}
+			}
+
+			++itLayer;
+		}
+
+		if(!db->execute("COMMIT TRANSACTION"))
+		{
+			errorMessage = db->errorMessage();
+			return false;
+		}
+	}
+	else if(db->dbmsName() == "PostGIS")
+	{
+		if(!db->execute("BEGIN TRANSACTION"))
+		{
+			errorMessage = db->errorMessage();
+			return false;
+		}
+
+		if(!db->loadLayerSet())
+		{
+			db->execute("ROLLBACK TRANSACTION");
+
+			return false;
+		}
+
+		TeLayerMap& layerMap = db->layerMap();
+
+		TeLayerMap::iterator itLayer = layerMap.begin();
+
+//		for each layer, find representations to update box columns
+		while(itLayer != layerMap.end())
+		{
+// update raster geometry table
+			TeRepresentation* rep = itLayer->second->getRepresentation(TeRASTER);
+
+			if(rep)
+			{
+				string rasterGeomTableName = rep->tableName_;
+
+				string sql = "SELECT raster_table FROM " + rasterGeomTableName;
+
+				TeDatabasePortal* p = db->getPortal();
+
+				if(!p)
+				{
+					db->execute("ROLLBACK TRANSACTION");
+
+					return false;
+				}
+
+				if(!p->query(sql))
+				{
+					delete p;
+
+					db->execute("ROLLBACK TRANSACTION");
+
+					return false;
+				}
+
+				while(p->fetchRow())
+				{
+					string geomTableName = p->getData(0);
+
+					if(!PostgreSQLUpdateDB302To310(db, TeRASTER, geomTableName))
+					{
+						delete p;
+
+						db->execute("ROLLBACK TRANSACTION");
+
+						return false;
+					}
+				}
+
+				delete p;
+			}
+
+			++itLayer;
+		}
+
+		if(!db->execute("COMMIT TRANSACTION"))
+		{
+			errorMessage = db->errorMessage();
+			return false;
+		}
+	}
+
+	return true;
+}
+
+bool updateDB310To311(TeDatabase* db, string& errorMessage)
+{
+	string sql = " SELECT collection_table FROM te_theme ";
+	TeDatabasePortal* portal = db->getPortal();
+	if(!portal)
+		return false;
+
+	if(!portal->query(sql))
+	{
+		delete portal;
+		return false;
+	}
+
+	while(portal->fetchRow())
+	{
+		string tableName = portal->getData(0);
+		if(!db->tableExist(tableName+"_aux"))
+			continue;
+
+		TeDatabasePortal* portal2 = db->getPortal();
+		if(!portal2)
+		{
+			delete portal;
+			return false;
+		}
+
+		sql = " SELECT * FROM "+ tableName+"_aux WHERE 1=2";
+		if(!portal2->query(sql))
+		{
+			delete portal;
+			delete portal2;
+			return false;
+		}
+
+		TeAttributeList attrList;
+		for(int i=0; i<portal2->numFields(); ++i)
+		{
+      TeAttribute attr = portal2->getAttribute(i);
+      attr.rep_.isPrimaryKey_= false;
+			if(TeConvertToUpperCase(portal2->getAttribute(i).rep_.name_) != "UNIQUE_ID" )
+				attrList.push_back(attr);
+		}
+
+        delete portal2;
+
+		//add new autonumber column
+		TeAttribute attr;
+		attr.rep_.name_= "unique_id" ;
+		attr.rep_.type_= TeINT;
+		attr.rep_.isAutoNumber_ = true;
+		attr.rep_.isPrimaryKey_ = true;
+		attrList.push_back(attr);
+		
+		//create new table 
+		if(!db->createTable(tableName+"_aux2", attrList))
+		{
+			errorMessage = "Error creating table "+ tableName+"_aux2 !\n";
+			errorMessage += db->errorMessage();
+			delete portal;
+			return false;
+		}
+
+		//insert records
+		string ins = " INSERT INTO "+ tableName +"_aux2 ( ";
+		string ins2 ="";
+		for(unsigned int j=0; j<(attrList.size()-1); ++j)
+		{
+			if(j>0)
+				ins2 += ",";
+			ins2 += attrList[j].rep_.name_;
+		}
+		ins += ins2 +" ) SELECT "+ ins2;
+		ins += " FROM "+ tableName+"_aux";
+		if(!db->execute(ins))
+		{
+			errorMessage = "Error inserting table "+ tableName+"_aux2 !\n";
+			errorMessage += db->errorMessage();
+			delete portal;
+			return false;
+		}
+
+		sql = " DROP TABLE "+ tableName+"_aux";
+		if(db->tableExist(tableName+"_aux"))
+		{
+			if(!db->execute(sql))
+			{
+				errorMessage = "Error dropping table "+ tableName+"_aux2 !\n";
+				errorMessage += db->errorMessage();
+				delete portal;
+				return false;
+			}
+		}
+		
+		if(!db->alterTable(tableName+"_aux2", tableName+"_aux"))
+		{
+			errorMessage = "Error renaming table "+ tableName+"_aux2 !\n";
+			errorMessage += db->errorMessage();
+			delete portal;
+			return false;
+		}
+	}
+
+	delete portal;
+	return true;
+}
+
+bool updateDB311To320(TeDatabase* db, string& errorMessage)
+{
+	if (!db->tableExist("te_project"))
+	{
+		if (!db->createProjectTable())
+		{
+			errorMessage = "Error creating te_project table\n";
+			errorMessage += db->errorMessage();
+			return false;
+		}
+	}
+
+	if (!db->tableExist("te_project_view"))
+	{
+		if (!db->createProjectViewTable())
+ 		{
+			errorMessage = "Error creating te_project_view table\n";
+			errorMessage += db->errorMessage();
+			return false;
+		}
+	}
+	
+	//remove columns of the table te_visual
+	TeAttribute	attr;
+	attr.rep_.name_ = "lib_name";
+	attr.rep_.type_ = TeSTRING;
+		
+	if(db->columnExist("te_visual", attr.rep_.name_,attr))
+	{
+        //remove column lib_name
+		if(!db->deleteColumn("te_visual", attr.rep_.name_))
+		{
+			errorMessage = "Error removing a column of the te_visual table\n";
+			errorMessage += db->errorMessage();
+			return false;
+		}
+	}
+
+	attr.rep_.name_ = "contour_lib_name";
+	if(db->columnExist("te_visual", attr.rep_.name_,attr))
+	{
+        //remove column lib_name
+		if(!db->deleteColumn("te_visual", attr.rep_.name_))
+		{
+			errorMessage = "Error removing a column of the te_visual table\n";
+			errorMessage += db->errorMessage();
+			return false;
+		}
+	}
+
+	return true;
+}
+
+bool updateDB320To3201(TeDatabase* db, string& errorMessage)
+{
+	//--- remove the table te_color_scheme
+	if(db->tableExist("te_color_scheme"))
+	{
+		db->deleteTable("te_color_scheme");
+	}
+	
+	//--- store the theme box 
+	//verify if the theme box is stored 
+	TeAttribute	attr;
+	attr.rep_.name_ = "lower_x";
+	attr.rep_.type_ = TeREAL;
+
+  //create the columns
+	TeAttributeRep atRep;
+	atRep.type_ = TeREAL;
+	atRep.name_ = "lower_x";
+	atRep.decimals_ = 15;
+	atRep.defaultValue_ = "0.0";
+
+	if(!db->columnExist("te_theme", attr.rep_.name_,attr))
+	{
+		if(db->addColumn("te_theme", atRep) == false)
+		{
+			errorMessage = "The theme box could not be appended!\n";
+			errorMessage += db->errorMessage();
+			return false;
+		}
+	}
+	attr.rep_.name_ = "lower_y";
+	if(!db->columnExist("te_theme", attr.rep_.name_,attr))
+	{
+		atRep.name_ = "lower_y";
+		if(db->addColumn("te_theme", atRep) == false)
+		{
+			errorMessage = "The theme box could not be appended!\n";
+			errorMessage += db->errorMessage();
+			return false;
+		}
+	}
+	attr.rep_.name_ = "upper_x";
+	if(!db->columnExist("te_theme", attr.rep_.name_,attr))
+	{
+		atRep.name_ = "upper_x";
+		if(db->addColumn("te_theme", atRep) == false)
+		{
+			errorMessage = "The theme box could not be appended!\n";
+			errorMessage += db->errorMessage();
+			return false;
+		}
+	}
+	attr.rep_.name_ = "upper_y";
+	if(!db->columnExist("te_theme", attr.rep_.name_,attr))
+	{
+		atRep.name_ = "upper_y";
+		if(db->addColumn("te_theme", atRep) == false)
+		{
+			errorMessage = "The theme box could not be appended!\n";
+			errorMessage += db->errorMessage();
+			return false;
+		}
+	}
+
+	//--- store the view box and current theme 
+	//verify if the view box is stored 
+	attr.rep_.name_ = "lower_x";
+	attr.rep_.type_ = TeREAL;
+
+	//create the columns
+	if(!db->columnExist("te_view", attr.rep_.name_,attr))
+	{
+		atRep.type_ = TeREAL;
+		atRep.name_ = "lower_x";
+		atRep.decimals_ = 15;
+		atRep.defaultValue_ = "0.0";
+		if(db->addColumn("te_view", atRep) == false)
+		{
+			//delete portal;
+			errorMessage = "The view box could not be appended!\n";
+			errorMessage += db->errorMessage();
+			return false;
+		}
+	}
+	attr.rep_.name_ = "lower_y";
+	if(!db->columnExist("te_view", attr.rep_.name_,attr))
+	{
+		atRep.name_ = "lower_y";
+		if(db->addColumn("te_view", atRep) == false)
+		{
+			//delete portal;
+			errorMessage = "The view box could not be appended!\n";
+			errorMessage += db->errorMessage();
+			return false;
+		}
+	}
+	attr.rep_.name_ = "upper_x";
+	if(!db->columnExist("te_view", attr.rep_.name_,attr))
+	{
+		atRep.name_ = "upper_x";
+		if(db->addColumn("te_view", atRep) == false)
+		{
+			//delete portal;
+			errorMessage = "The view box could not be appended!\n";
+			errorMessage += db->errorMessage();
+			return false;
+		}
+	}
+	attr.rep_.name_ = "upper_y";
+	if(!db->columnExist("te_view", attr.rep_.name_,attr))
+	{
+		atRep.name_ = "upper_y";
+		if(db->addColumn("te_view", atRep) == false)
+		{
+			//delete portal;
+			errorMessage = "The view box could not be appended!\n";
+			errorMessage += db->errorMessage();
+			return false;
+		}
+	}
+	atRep.type_ = TeINT;
+	atRep.name_ = "current_theme";
+	atRep.decimals_ = 0;
+	attr.rep_.name_ = "current_theme";
+	if(!db->columnExist("te_view", attr.rep_.name_,attr))
+	{
+		if(db->addColumn("te_view", atRep) == false)
+		{
+			//delete portal;
+			errorMessage = "The view current theme could not be appended!\n";
+			errorMessage += db->errorMessage();
+			return false;
+		}
+		//create foreign key
+		if (!db->createRelation("fk_view_current_theme", "te_view", "current_theme", "te_theme", "theme_id", false))
+		{
+			//delete portal;
+			errorMessage = "Error creating foreign key in the view table!\n";
+			errorMessage += db->errorMessage();
+			return false;
+		}
+	}
+
+	//fill the box theme
+	string sql = "SELECT te_theme.name, te_view.user_name ";
+	sql += " FROM te_theme INNER JOIN te_view ON te_theme.view_id = te_view.view_id ";
+	TeDatabasePortal* portal = db->getPortal();
+	if(!portal)
+		return false;
+	
+	if(!portal->query(sql))
+	{
+		delete portal;
+		return false;
+	}
+
+	string originalUser = db->user();
+	while(portal->fetchRow())
+	{
+		string themeName = string(portal->getData(0));
+		string userName = string(portal->getData(1));
+		db->user(userName);
+
+		TeTheme theme(themeName);
+		if(!db->loadTheme(&theme))
+		{
+			delete portal;
+			errorMessage = "Error updating theme box!";
+			return false;
+		}
+
+		if(theme.type()==TeTREE)
+			continue;
+
+		//select the theme box
+		TeBox bb;
+		if (theme.layer()->hasGeometry(TeRASTER))
+			bb = theme.layer()->box();
+
+		if (theme.layer()->hasGeometry(TeRASTERFILE))
+			updateBox(bb,theme.layer()->getRepresentation(TeRASTERFILE)->box_);
+
+		string colTabName = theme.collectionTable();
+		if (!colTabName.empty())
+		{
+			string sqlfrom;
+			string geomTable;
+			if (theme.layer()->hasGeometry(TePOINTS))
+			{
+				geomTable = theme.layer()->tableName(TePOINTS);
+				sqlfrom = colTabName + " LEFT JOIN " + geomTable;
+				sqlfrom += " ON " + colTabName + ".c_object_id = " + geomTable + ".object_id";
+				TeBox bpt;
+				if(db->getMBRSelectedObjects(geomTable,"spatial_data", sqlfrom, "","",TePOINTS,bpt))
+					updateBox(bb,bpt);
+			}
+			if (theme.layer()->hasGeometry(TeLINES))
+			{
+				geomTable = theme.layer()->tableName(TeLINES);
+				sqlfrom = colTabName + " LEFT JOIN " + geomTable;
+				sqlfrom += " ON " + colTabName + ".c_object_id = " + geomTable + ".object_id";
+				TeBox bln;
+				if (db->getMBRSelectedObjects(geomTable,"spatial_data", sqlfrom, "","",TeLINES,bln))
+					updateBox(bb,bln);
+			}
+			if (theme.layer()->hasGeometry(TePOLYGONS))
+			{
+				geomTable = theme.layer()->tableName(TePOLYGONS);
+				sqlfrom = colTabName + " LEFT JOIN " + geomTable;
+				sqlfrom += " ON " + colTabName + ".c_object_id = " + geomTable + ".object_id";
+				TeBox bpol;
+				if (db->getMBRSelectedObjects(geomTable,"spatial_data", sqlfrom, "","",TePOLYGONS,bpol))
+					updateBox(bb,bpol);
+			}
+
+			if (theme.layer()->hasGeometry(TeCELLS))
+			{
+				geomTable = theme.layer()->tableName(TeCELLS);
+				sqlfrom = colTabName + " LEFT JOIN " + geomTable;
+				sqlfrom += " ON " + colTabName + ".c_object_id = " + geomTable + ".object_id";
+				TeBox bpol;
+				if (db->getMBRSelectedObjects(geomTable,"spatial_data", sqlfrom, "","",TeCELLS,bpol))
+					updateBox(bb,bpol);
+			}
+
+			if (theme.layer()->hasGeometry(TeTEXT))
+			{
+				geomTable = theme.layer()->tableName(TeTEXT);
+				sqlfrom = colTabName + " LEFT JOIN " + geomTable;
+				sqlfrom += " ON " + colTabName + ".c_object_id = " + geomTable + ".object_id";
+				TeBox bpol;
+				if (db->getMBRSelectedObjects(geomTable,"spatial_data", sqlfrom, "","",TeTEXT,bpol))
+					updateBox(bb,bpol);
+			}	
+		}
+					
+		//update theme box
+		string update = "UPDATE te_theme SET ";
+		update += "  lower_x = " + Te2String(bb.x1()); 
+		update += ", lower_y = " + Te2String(bb.y1()); 
+		update += ", upper_x = " + Te2String(bb.x2()); 
+		update += ", upper_y = " + Te2String(bb.y2()); 
+		update += " WHERE theme_id=" + Te2String (theme.id());
+		if(!db->execute(update))
+		{
+			delete portal;
+			errorMessage = "Error updating theme box!\n";
+			errorMessage += db->errorMessage();
+			return false;
+		}
+    }
+
+	db->clear();
+	portal->freeResult();
+	db->user(originalUser);
+
+	//fill the box view
+	sql = "SELECT view_id, MIN(lower_x), MIN(lower_y), MAX(upper_x), MAX(upper_y) ";
+	sql += " FROM te_theme GROUP BY view_id ";
+	
+	if(!portal->query(sql))
+	{
+		delete portal;
+		return false;
+	}
+
+	while(portal->fetchRow())
+	{
+		string viewId = string(portal->getData(0));
+		string update = " UPDATE te_view SET ";
+		update += " lower_x = "+ string(portal->getData(1));
+		update += ", lower_y = "+ string(portal->getData(2));
+		update += ", upper_x = "+ string(portal->getData(3));
+		update += ", upper_y = "+ string(portal->getData(4));
+		update += ", current_theme = NULL ";
+		update += " WHERE view_id = "+ viewId;
+
+		if(!db->execute(update))
+		{
+			delete portal;
+			errorMessage = "Error updating view box!\n";
+			errorMessage += db->errorMessage();
+			return false;
+		}
+    }
+
+	//------ Project information
+	attr.rep_.name_ = "current_view";
+	attr.rep_.type_ = TeINT;
+
+	//if there is the column "current_view", delete it and create it again 
+	if(db->columnExist("te_project", attr.rep_.name_, attr))
+		db->deleteColumn("te_project", attr.rep_.name_);
+	
+	attr.rep_.defaultValue_ = "0";
+	if(!db->addColumn("te_project", attr.rep_))
+	{
+		delete portal;
+		errorMessage = "The project view could not be appended!\n";
+		errorMessage += db->errorMessage();
+		return false;
+	}
+	
+	TeProject project;
+	project.setName("TV_Project");
+	project.setDescription("TerraView_Default_Project");
+	project.setCurrentViewId(-1); // not have project
+	if(!db->insertProject(&project))
+	{
+		delete portal;
+		errorMessage = "Error inserting terraView default project!\n";
+		errorMessage += db->errorMessage();
+		return false;
+	}
+
+	portal->freeResult();
+	if(!portal->query("SELECT view_id FROM te_view"))
+	{
+		errorMessage = db->errorMessage();
+		delete portal;
+		return false;
+	}
+	while(portal->fetchRow())
+	{
+		string viewId = string(portal->getData(0));
+		string ins = "INSERT INTO te_project_view (project_id, view_id) VALUES (";
+		ins += Te2String(project.id()) +  "," + viewId + ")";
+		if(!db->execute(ins))
+		{
+			errorMessage = db->errorMessage();
+			delete portal;
+			return false;
+		}
+	}
+
+	delete portal;
+	return true;
+}
+
+bool updateDB3201To331(TeDatabase* db, string& errorMessage)
+{
+//alter the columns types
+	TeAttributeRep repAlter;
+	repAlter.name_ = "generate_attribute_where";
+	repAlter.type_ = TeSTRING;
+	repAlter.numChar_ = 0;
+	if(!db->alterTable("te_theme", repAlter))
+	{
+		errorMessage = "Could not alter the 'generate_attribute_where' column type!\n";
+		errorMessage += db->errorMessage();
+		return false;
+	}
+
+	repAlter.name_ = "generate_spatial_where";
+	if(!db->alterTable("te_theme", repAlter))
+	{
+		errorMessage = "Could not alter the 'generate_spatial_where' column type!\n";
+		errorMessage += db->errorMessage();
+		return false;
+	}
+
+	repAlter.name_ = "generate_temporal_where";
+	if(!db->alterTable("te_theme", repAlter))
+	{
+		errorMessage = "Could not alter the 'generate_temporal_where' column type!\n";
+		errorMessage += db->errorMessage();
+		return false;
+	}
+
+//create the time columns
+	TeAttributeRep rep;
+	rep.name_ = "edition_time";
+	rep.type_ = TeDATETIME;
+
+	TeAttribute	attr;	
+    if(!db->columnExist("te_layer", rep.name_, attr))
+	{
+		if(db->addColumn("te_layer", rep) == false)
+		{
+			errorMessage = "The edition time column could not be added to the layer table!\n";
+			errorMessage += db->errorMessage();
+			return false;
+		}
+	}
+
+	rep.name_ = "creation_time";
+	if(!db->columnExist("te_theme", rep.name_, attr))
+	{
+		if(db->addColumn("te_theme", rep) == false)
+		{
+			errorMessage = "The creation time column could not be added to the theme table!\n";
+			errorMessage += db->errorMessage();
+			return false;
+		}
+	}
+
+//update the time columns
+	TeTime timeNow;
+	timeNow.now();
+
+	std::string sql = "UPDATE te_layer SET edition_time = " + db->getSQLTime(timeNow);
+	if(!db->execute(sql))
+	{
+		errorMessage = "Could not update the edition time column in the layer table!\n";
+		errorMessage += db->errorMessage();
+		return false;
+	}
+
+	sql = "UPDATE te_theme SET creation_time = " + db->getSQLTime(timeNow);
+	if(!db->execute(sql))
+	{
+		errorMessage = "Could not update the creation time column in the theme table!\n";
+		errorMessage += db->errorMessage();
+		return false;
+	}
+
+	return true;
+}
+
diff --git a/src/terralib/utils/TeUpdateDBVersion.h b/src/terralib/utils/TeUpdateDBVersion.h
new file mode 100755
index 0000000..52c63c3
--- /dev/null
+++ b/src/terralib/utils/TeUpdateDBVersion.h
@@ -0,0 +1,66 @@
+/************************************************************************************
+ TerraLib - a library for developing GIS applications.
+Copyright � 2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+/*! \file TeUpdateDBVersion.h
+    \brief This file contains the routines to update a TerraLib database to its different versions
+*/
+
+#ifndef  __TERRALIB_INTERNAL_UPDATEDBVERSION_H
+#define  __TERRALIB_INTERNAL_UPDATEDBVERSION_H
+
+#include "TeDatabase.h"
+
+//! verify if a version is lower than othen version 
+bool isLowerVersion(const std::string& version1, const std::string& version2);
+
+//! verify if the database needs update 
+bool needUpdateDB(TeDatabase* db, string& DBversion);
+
+//! update database version 
+bool updateDBVersion(TeDatabase* db, string& DBversion, string& errorMessage);
+
+//! update database from release 2.0 to release 3.0
+bool updateDB20To30(TeDatabase* db, string& errorMessage);
+
+//! update database from release 3.0 to release 3.0.1
+bool updateDB30To301(TeDatabase* db, string& errorMessage);
+
+//! update database from release 3.0.1 to release 3.0.2 (3.0 Plus)
+bool updateDB301To302(TeDatabase* db, string& errorMessage); 
+ 
+//! update database from release 3.0.2 to release 3.1.0
+bool updateDB302To310(TeDatabase* db, string& errorMessage); 
+
+//! update database from release 3.1.0 to release 3.1.1
+bool updateDB310To311(TeDatabase* db, string& errorMessage); 
+
+//! update database from release 3.1.1 to release 3.2.0
+bool updateDB311To320(TeDatabase* db, string& errorMessage); 
+
+//! update database from release 3.2.0 to release 3.2.0.1
+bool updateDB320To3201(TeDatabase* db, string& errorMessage);
+
+//! update database from release 3.2.0.1 to release 3.3.1
+bool updateDB3201To331(TeDatabase* db, string& errorMessage);
+
+#endif
+
diff --git a/src/terralib/utils/TeWKBGeometryDecoder.cpp b/src/terralib/utils/TeWKBGeometryDecoder.cpp
new file mode 100644
index 0000000..436600a
--- /dev/null
+++ b/src/terralib/utils/TeWKBGeometryDecoder.cpp
@@ -0,0 +1,372 @@
+#include <TeWKBGeometryDecoder.h>
+
+//TerraLib include files
+#include <TeGeometry.h>
+#include <TeException.h>
+
+#ifdef WIN32
+#include <winsock.h>
+#else
+#include <netinet/in.h>
+#endif
+
+//STL include files
+#include <cstring>
+
+bool isLittleEndian = !(((unsigned int) 1) == htonl((unsigned int) 1));
+
+unsigned int SwapUInt(const unsigned int& uintVal)
+{
+	char uintIn[4], uintOut[4];
+
+	unsigned int outVal;
+
+	memcpy(uintIn,&uintVal,4);
+
+	uintOut[0] = uintIn[3];
+	uintOut[1] = uintIn[2];
+	uintOut[2] = uintIn[1];
+	uintOut[3] = uintIn[0];
+
+	memcpy (&outVal,uintOut,4);
+
+	return outVal;
+}
+
+void encodeRing(const TeLine2D& line, char*& wkbLine, unsigned int& size)
+{
+	unsigned int nPoints = line.size();
+	size = sizeof(unsigned int) + (nPoints*2*sizeof(double));
+
+	wkbLine = new char[size];
+	char* l = wkbLine;
+
+	//nPoints
+	memcpy(l, &nPoints , sizeof(unsigned int));
+	l += sizeof(unsigned int);
+
+	for(unsigned int i = 0; i < nPoints ; ++i)
+	{
+		double x = line[i].x();
+		double y = line[i].y();
+
+		memcpy(l, &x, sizeof(double));
+		l += sizeof(double);
+		
+		memcpy(l, &y, sizeof(double));
+		l += sizeof(double);
+	}
+}
+
+void decodeCoord(const char*& wkb, TeCoord2D& point, const char& byteOrder)
+{
+
+	union
+	{
+		double dWord_;
+		unsigned int aux_[2];
+	} swapx1, swapy1;
+
+	memcpy(&swapx1.dWord_, wkb, sizeof(double));
+	memcpy(&swapy1.dWord_, wkb + sizeof(double), sizeof(double));
+
+	wkb += 2*(sizeof(double)); // x + y
+
+	// 0 = Big Endian (wkbXDR)
+	if((byteOrder == 0) && isLittleEndian)
+	{
+		union
+		{
+			double dWord_;
+			unsigned int aux_[2];
+		} swapx2, swapy2;
+
+		swapx2.aux_[1] = ntohl(swapx1.aux_[0]);
+		swapx2.aux_[0] = ntohl(swapx1.aux_[1]);
+
+		swapy2.aux_[1] = ntohl(swapy1.aux_[0]);
+		swapy2.aux_[0] = ntohl(swapy1.aux_[1]);	
+		
+		point.x(swapx2.dWord_);
+		point.y(swapy2.dWord_);
+
+		return;
+	}
+	else if((byteOrder == 0) && !isLittleEndian)
+	{
+		union
+		{
+			double dWord_;
+			unsigned int aux_[2];
+		} swapx2, swapy2;
+
+		swapx2.aux_[1] = SwapUInt(swapx1.aux_[0]);
+		swapx2.aux_[0] = SwapUInt(swapx1.aux_[1]);
+
+		swapy2.aux_[1] = SwapUInt(swapy1.aux_[0]);
+		swapy2.aux_[0] = SwapUInt(swapy1.aux_[1]);
+		
+		point.x(swapx2.dWord_);
+		point.y(swapy2.dWord_);
+
+		return ;
+	}
+
+	point.x(swapx1.dWord_);
+	point.y(swapy1.dWord_);
+}
+
+void decodeRing(const char*& wkb, TeLine2D& line, const char& byteOrder, const int& lineSize)
+{
+	const char* aux = wkb;
+	
+	for(int i = 0; i < lineSize; i++)
+	{
+		TeCoord2D point;
+		decodeCoord(aux, point, byteOrder);
+		line.add(point);
+	}
+}
+
+void getWKBHeader(const char*& wkb, char& byteOrder, unsigned int& wkbType, unsigned int& numGeometries)
+{
+	const int byteOrderPlusGeomType = sizeof(unsigned char) + sizeof(unsigned int);	
+
+	memcpy(&byteOrder, wkb, sizeof(unsigned char));		
+	memcpy(&wkbType, wkb + sizeof(unsigned char), sizeof(unsigned int));
+
+	const char* aux = wkb;
+	aux += byteOrderPlusGeomType;
+	
+
+	// 0 = Big Endian (wkbXDR) e 1 = Little Endian (wkbNDR)
+	if(byteOrder == 0 && isLittleEndian)
+	{
+		wkbType = ntohl(wkbType);
+	}
+	else if(byteOrder == 1 && !isLittleEndian)
+	{
+		wkbType = SwapUInt(wkbType);
+	}	
+
+	numGeometries = 0;
+
+	if(wkbType > 1 && wkbType <= 7)
+	{
+		memcpy(&numGeometries, aux, sizeof(unsigned int));
+		aux += sizeof(unsigned int);
+
+		// 0 = Big Endian (wkbXDR) e 1 = Little Endian (wkbNDR)
+		if(byteOrder == 0 && isLittleEndian)
+		{
+			numGeometries = ntohl(numGeometries);	
+		}
+		else if(byteOrder == 1 && !isLittleEndian)
+		{
+			numGeometries = SwapUInt(numGeometries);
+		}
+	}
+}
+
+void TeWKBGeometryDecoder::encodePolygon(const TePolygon& polygon, char*& wkbPoly, unsigned int& size)
+{
+	char byteOrder;
+	unsigned int wkbType = 3;//WKBPolygon
+	unsigned int nRings = polygon.size();
+
+	// 0 = Big Endian (wkbXDR) e 1 = Little Endian (wkbNDR)
+	if(((unsigned int) 1) == htonl((unsigned int) 1))
+	{
+		byteOrder = 0;
+	}
+	else
+	{
+		byteOrder = 1;		
+	}
+
+	//cabecalho
+	size = sizeof(char) + (2*sizeof(unsigned int));
+
+	//rings
+	for(unsigned int i = 0; i < nRings ; ++i)
+	{
+		size += sizeof(unsigned int) + (2 * sizeof(double) * polygon[i].size());
+	}
+	
+	wkbPoly = new char[size];
+	char* p = wkbPoly;
+
+	//byteOrder	
+	memcpy(p, &byteOrder , sizeof(char));
+	p += sizeof(char);
+
+	//WKBPolygon
+	memcpy(p, &wkbType , sizeof(unsigned int));
+	p += sizeof(unsigned int);
+
+	//Rings
+	memcpy(p, &nRings , sizeof(unsigned int));
+	p += sizeof(unsigned int);
+
+	TePolygon::iterator it;
+
+	for(it = polygon.begin(); it != polygon.end(); ++it)
+	{
+		char* ring;
+		unsigned int rSize;
+		
+		encodeRing((*it), ring, rSize);
+
+		memcpy(p, ring, rSize);
+		p += rSize; 
+
+		delete [] ring;
+	}
+}
+
+void TeWKBGeometryDecoder::encodeLine(const TeLine2D& line, char*& wkbLine, unsigned int& size)
+{
+	char byteOrder;
+	unsigned int nPoints = line.size();
+	unsigned int wkbType = 2;//WKBLineString
+
+	// 0 = Big Endian (wkbXDR) e 1 = Little Endian (wkbNDR)
+	if(((unsigned int) 1) == htonl((unsigned int) 1))
+	{
+		byteOrder = 0;
+	}
+	else
+	{
+		byteOrder = 1;		
+	}
+
+	size = sizeof(char) + sizeof(unsigned int) + sizeof(unsigned int) + (2 * sizeof(double) * nPoints);
+
+	wkbLine = new char[size];
+	char* l = wkbLine;
+
+	//byteOrder	
+	memcpy(l, &byteOrder , sizeof(char));
+	l += sizeof(char);
+
+	//WKBLineString
+	memcpy(l, &wkbType , sizeof(unsigned int));
+	l += sizeof(unsigned int);
+
+	char* ring;
+	unsigned int lSize;
+	encodeRing(line, ring, lSize);
+
+	memcpy(l, ring, lSize);
+	delete []ring;
+}
+
+void TeWKBGeometryDecoder::encodePoint(const TeCoord2D& point, char*& wkbPoint, unsigned int& size)
+{
+	char byteOrder;
+	unsigned int wkbType = 1;//WKBPoint
+
+	// 0 = Big Endian (wkbXDR) e 1 = Little Endian (wkbNDR)
+	if(((unsigned int) 1) == htonl((unsigned int) 1))
+	{
+		byteOrder = 0;
+	}
+	else
+	{
+		byteOrder = 1;		
+	}
+
+	//cabecalho
+	size = sizeof(char) + sizeof(int) + (2 * sizeof(double));
+	
+	char* p = new char[size];
+	wkbPoint = p;
+
+	//byteOrder	
+	memcpy(p, &byteOrder , sizeof(char));
+	p += sizeof(char);
+
+	//WKBPoint
+	memcpy(p, &wkbType , sizeof(unsigned int));
+	p += sizeof(unsigned int);
+
+	double x = point.x();
+	double y = point.y();
+
+	memcpy(p, &x, sizeof(double));
+	p += sizeof(double);
+	memcpy(p, &y, sizeof(double));
+	p += sizeof(double);
+}
+
+void TeWKBGeometryDecoder::decodePolygon(const char*& wkbPoly, TePolygon& poly)
+{
+	char byteOrder;
+	unsigned int wkbType;
+	unsigned int numGeometries;
+
+	getWKBHeader(wkbPoly, byteOrder, wkbType, numGeometries);
+	
+	if(wkbType != 3)
+	{
+		throw TeException(UNKNOWN_ERROR_TYPE, "Binary data doesn't supported!");
+	}
+
+	const char* aux = wkbPoly;
+
+	//Size of header
+	aux += sizeof(char) + (2*sizeof(unsigned int));
+
+	for(unsigned int i = 0; i < numGeometries; i++)
+	{
+		unsigned int ringSize;
+		memcpy(&ringSize, aux, sizeof(unsigned int));
+
+		aux += sizeof(unsigned int);
+
+		TeLinearRing ring;
+		decodeRing(aux, ring, byteOrder, ringSize);
+
+		aux += ringSize*2*sizeof(double);
+		poly.add(ring);
+	}
+}
+
+void TeWKBGeometryDecoder::decodeLine(const char*& wkbLine, TeLine2D& line)
+{
+	char byteOrder;
+	unsigned int wkbType;
+	unsigned int numCoords;
+
+	getWKBHeader(wkbLine, byteOrder, wkbType, numCoords);
+	
+	if(wkbType != 2)
+	{
+		throw TeException(UNKNOWN_ERROR_TYPE, "Binary data doesn't supported!");
+	}
+
+	//Size of header
+	const char* aux = wkbLine;
+	aux += sizeof(char) + (2*sizeof(unsigned int));
+
+	decodeRing(aux, line, byteOrder, numCoords);
+}
+
+void TeWKBGeometryDecoder::decodePoint(const char*& wkbPoint, TeCoord2D& point)
+{
+	char byteOrder;
+	unsigned int wkbType;
+	unsigned int numGeometries;
+
+	getWKBHeader(wkbPoint, byteOrder, wkbType, numGeometries);
+	
+	if(wkbType != 1)
+		throw TeException(UNKNOWN_ERROR_TYPE, "Binary data doesn't supported!");
+
+	//Size of header
+
+	wkbPoint += sizeof(char) + sizeof(int);
+
+	decodeCoord(wkbPoint, point, byteOrder);
+}
+
diff --git a/src/terralib/utils/TeWKBGeometryDecoder.h b/src/terralib/utils/TeWKBGeometryDecoder.h
new file mode 100644
index 0000000..22a71b5
--- /dev/null
+++ b/src/terralib/utils/TeWKBGeometryDecoder.h
@@ -0,0 +1,94 @@
+/************************************************************************************
+TerraLib - a library for developing GIS applications.
+Copyright  2001-2007 INPE and Tecgraf/PUC-Rio.
+
+This code is part of the TerraLib library.
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library.
+
+The authors reassure the license terms regarding the warranties.
+They specifically disclaim any warranties, including, but not limited to,
+the implied warranties of merchantability and fitness for a particular purpose.
+The library provided hereunder is on an "as is" basis, and the authors have no
+obligation to provide maintenance, support, updates, enhancements, or modifications.
+In no event shall INPE and Tecgraf / PUC-Rio be held liable to any party for direct,
+indirect, special, incidental, or consequential damages arising out of the use
+of this library and its documentation.
+*************************************************************************************/
+
+#ifndef  __TERRALIB_INTERNAL_WKBGEOMETRYDECODER_H
+#define  __TERRALIB_INTERNAL_WKBGEOMETRYDECODER_H
+
+//Forward declarations
+class TePolygon;
+class TeLine2D;
+class TeCoord2D;
+
+/** @namespace TeWKBGeometryDecoder
+ *
+ * @brief Contains decoding/encoding functions for TerraLib geometries into WKB-like geometries. 
+ *
+ * WKB format is used to struct information about geomtries in well-know manner. It is an interchange format.
+ * For more information about WBK format see 
+ * <A HREF="">WKB representation.</A>.
+ */
+namespace TeWKBGeometryDecoder
+{
+    /** @name Encoding Methods
+		* Methods used to encode TeGeometry objects into pointers to char* in WKB format.
+		*/
+	//@{		
+
+	/** @brief Encodes a TePolygon into a WKB. 
+	 *	@param polygon Polygon to be encoded. [in]
+	 *	@param wkbPoly WKB genenerated by the polygon. [out]
+	 *	@param size The size of WKB in byte. [out]
+	 */
+	void encodePolygon(const TePolygon& polygon, char*& wkbPoly, unsigned int& size);
+
+	/** @brief Encodes a TeLine2D into a WKB. 
+	 *	@param line Polygon to be encoded. [in]
+	 *	@param wkbLIne WKB genenerated by the line. [out]
+	 *	@param size The size of WKB in byte. [out]
+	 */
+	void encodeLine(const TeLine2D& line, char*& wkbLine, unsigned int& size);
+
+	/** @brief Encodes a TeCoord2D into a WKB. 
+	 *	@param polygon Polygon to be encoded. [in]
+	 *	@param wkbPoly WKB genenerated by the polygon. [out]
+	 *	@param size The size of WKB in byte. [out]
+	 */
+	void encodePoint(const TeCoord2D& point, char*& wkbPoint, unsigned int& size);
+	//@}
+
+    /** @name Decoding Methods
+		* Methods used to decode pointers to char* in WKB format into code TeGeometry objects.
+		*/
+	//@{		
+
+	/** @brief Decodes a WKB into a TePolygon object.
+	 *	@param wkbPoly WKB to be decoded. [in]
+	 *	@param poly TePolygon decoded. [out]
+	 */
+	void decodePolygon(const char*& wkbPoly, TePolygon& poly);
+
+	/** @brief Decodes a WKB into a TeLine2D object.
+	 *	@param wkbLine WKB to be decoded. [in]
+	 *	@param line TeLine2D decoded. [out]
+	 */
+	void decodeLine(const char*& wkbLine, TeLine2D& line);
+
+	/** @brief Decodes a WKB into a TeCoord2D object.
+	 *	@param wkbPoint WKB to be decoded. [in]
+	 *	@param point TeCoord2D decoded. [out]
+	 */
+	void decodePoint(const char*& wkbPoint, TeCoord2D& point);
+	//@}
+};
+
+#endif  //__TERRALIB_INTERNAL_WKBGEOMETRYENCODER_H
diff --git a/src/tiff/cpl_csv.c b/src/tiff/cpl_csv.c
deleted file mode 100644
index 0c55abf..0000000
--- a/src/tiff/cpl_csv.c
+++ /dev/null
@@ -1,1013 +0,0 @@
-/******************************************************************************
- * Copyright (c) 1999, Frank Warmerdam
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- ******************************************************************************
- *
- * cpl_csv.c: Support functions for accessing CSV files.
- *
- * $Log: cpl_csv.c,v $
- * Revision 1.3  2004/03/19 11:51:23  lubia
- * Atualizada as bibliotecas Tif e GeoTif
- *
- * Revision 1.15  2003/01/20 06:46:35  warmerda
- * search for pcs.csv, not horiz_cs.csv
- *
- * Revision 1.14  2003/01/15 04:39:58  warmerda
- * change internal name of CSVAccess
- *
- * Revision 1.13  2002/11/28 22:26:41  warmerda
- * upgraded to proper CSV formatting, and in-memory caching
- *
- * Revision 1.12  2002/06/19 03:51:15  warmerda
- * migrated cpl_csv.h into cpl_serv.h
- *
- * Revision 1.11  2001/03/05 04:49:56  warmerda
- * try to clear CPLReadLine buffer on deaccess
- *
- * Revision 1.10  2001/01/17 15:32:19  warmerda
- * Include /usr/share/epsg_csv and share/epsg_csv in csv search path.
- *
- * Revision 1.9  2000/12/12 19:34:36  warmerda
- * Use CSV_DATA_DIR if defined.
- *
- * Revision 1.8  2000/08/22 04:33:33  warmerda
- * added support for /usr/local/shared/epsg_csv
- *
- * Revision 1.7  1999/12/03 14:42:59  warmerda
- * Passing a NULL filename into CSVAccess() now results in a graceful
- * failure to open the file.
- *
- * Revision 1.6  1999/06/26 17:28:51  warmerda
- * Fixed reading of records with newlines embedded in quoted strings.
- *
- * Revision 1.5  1999/05/04 03:07:24  warmerda
- * avoid warning
- *
- * Revision 1.4  1999/04/28 19:59:56  warmerda
- * added some doxygen style documentation
- *
- * Revision 1.3  1999/03/17 19:53:15  geotiff
- * sys includes moved to cpl_serv.h
- *
- * Revision 1.2  1999/03/10 16:54:42  geotiff
- * Added use of the GEOTIFF_CSV environment variable to locate CSV files.
- *
- * Revision 1.1  1999/03/09 15:57:04  geotiff
- * New
- *
- * Revision 1.2  1999/02/24 16:23:21  warmerda
- * added lots
- *
- * Revision 1.1  1999/01/05 16:52:36  warmerda
- * New
- *
- */
-
-#include "cpl_serv.h"
-#include "geo_tiffp.h"
-
-/* ==================================================================== */
-/*      The CSVTable is a persistant set of info about an open CSV      */
-/*      table.  While it doesn't currently maintain a record index,     */
-/*      or in-memory copy of the table, it could be changed to do so    */
-/*      in the future.                                                  */
-/* ==================================================================== */
-typedef struct ctb {
-    FILE        *fp;
-
-    struct ctb *psNext;
-
-    char        *pszFilename;
-
-    char        **papszFieldNames;
-
-    char        **papszRecFields;
-
-    int         iLastLine;
-
-    /* Cache for whole file */
-    int         nLineCount;
-    char        **papszLines;
-    int         *panLineIndex;
-    char        *pszRawData;
-} CSVTable;
-
-static CSVTable *psCSVTableList = NULL;
-
-/************************************************************************/
-/*                             CSVAccess()                              */
-/*                                                                      */
-/*      This function will fetch a handle to the requested table.       */
-/*      If not found in the ``open table list'' the table will be       */
-/*      opened and added to the list.  Eventually this function may     */
-/*      become public with an abstracted return type so that            */
-/*      applications can set options about the table.  For now this     */
-/*      isn't done.                                                     */
-/************************************************************************/
-
-static CSVTable *gtCSVAccess( const char * pszFilename )
-
-{
-    CSVTable    *psTable;
-    FILE        *fp;
-
-/* -------------------------------------------------------------------- */
-/*      Is the table already in the list.                               */
-/* -------------------------------------------------------------------- */
-    for( psTable = psCSVTableList; psTable != NULL; psTable = psTable->psNext )
-    {
-        if( EQUAL(psTable->pszFilename,pszFilename) )
-        {
-            /*
-             * Eventually we should consider promoting to the front of
-             * the list to accelerate frequently accessed tables.
-             */
-            
-            return( psTable );
-        }
-    }
-
-/* -------------------------------------------------------------------- */
-/*      If not, try to open it.                                         */
-/* -------------------------------------------------------------------- */
-    fp = VSIFOpen( pszFilename, "rb" );
-    if( fp == NULL )
-        return NULL;
-
-/* -------------------------------------------------------------------- */
-/*      Create an information structure about this table, and add to    */
-/*      the front of the list.                                          */
-/* -------------------------------------------------------------------- */
-    psTable = (CSVTable *) CPLCalloc(sizeof(CSVTable),1);
-
-    psTable->fp = fp;
-    psTable->pszFilename = CPLStrdup( pszFilename );
-    psTable->psNext = psCSVTableList;
-    
-    psCSVTableList = psTable;
-
-/* -------------------------------------------------------------------- */
-/*      Read the table header record containing the field names.        */
-/* -------------------------------------------------------------------- */
-    psTable->papszFieldNames = CSVReadParseLine( fp );
-
-    return( psTable );
-}
-
-/************************************************************************/
-/*                            CSVDeaccess()                             */
-/************************************************************************/
-
-void CSVDeaccess( const char * pszFilename )
-
-{
-    CSVTable    *psLast, *psTable;
-    
-/* -------------------------------------------------------------------- */
-/*      A NULL means deaccess all tables.                               */
-/* -------------------------------------------------------------------- */
-    if( pszFilename == NULL )
-    {
-        while( psCSVTableList != NULL )
-            CSVDeaccess( psCSVTableList->pszFilename );
-        
-        return;
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Find this table.                                                */
-/* -------------------------------------------------------------------- */
-    psLast = NULL;
-    for( psTable = psCSVTableList;
-         psTable != NULL && !EQUAL(psTable->pszFilename,pszFilename);
-         psTable = psTable->psNext )
-    {
-        psLast = psTable;
-    }
-
-    if( psTable == NULL )
-    {
-        return;
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Remove the link from the list.                                  */
-/* -------------------------------------------------------------------- */
-    if( psLast != NULL )
-        psLast->psNext = psTable->psNext;
-    else
-        psCSVTableList = psTable->psNext;
-
-/* -------------------------------------------------------------------- */
-/*      Free the table.                                                 */
-/* -------------------------------------------------------------------- */
-    if( psTable->fp != NULL )
-        VSIFClose( psTable->fp );
-
-    CSLDestroy( psTable->papszFieldNames );
-    CSLDestroy( psTable->papszRecFields );
-    CPLFree( psTable->pszFilename );
-    CPLFree( psTable->panLineIndex );
-    CPLFree( psTable->pszRawData );
-    CPLFree( psTable->papszLines );
-
-    CPLFree( psTable );
-
-    CPLReadLine( NULL );
-}
-
-/************************************************************************/
-/*                            CSVSplitLine()                            */
-/*                                                                      */
-/*      Tokenize a CSV line into fields in the form of a string         */
-/*      list.  This is used instead of the CPLTokenizeString()          */
-/*      because it provides correct CSV escaping and quoting            */
-/*      semantics.                                                      */
-/************************************************************************/
-
-static char **CSVSplitLine( const char *pszString )
-
-{
-    char        **papszRetList = NULL;
-    char        *pszToken;
-    int         nTokenMax, nTokenLen;
-
-    pszToken = (char *) CPLCalloc(10,1);
-    nTokenMax = 10;
-    
-    while( pszString != NULL && *pszString != '\0' )
-    {
-        int     bInString = FALSE;
-
-        nTokenLen = 0;
-        
-        /* Try to find the next delimeter, marking end of token */
-        for( ; *pszString != '\0'; pszString++ )
-        {
-
-            /* End if this is a delimeter skip it and break. */
-            if( !bInString && *pszString == ',' )
-            {
-                pszString++;
-                break;
-            }
-            
-            if( *pszString == '"' )
-            {
-                if( !bInString || pszString[1] != '"' )
-                {
-                    bInString = !bInString;
-                    continue;
-                }
-                else  /* doubled quotes in string resolve to one quote */
-                {
-                    pszString++;
-                }
-            }
-
-            if( nTokenLen >= nTokenMax-2 )
-            {
-                nTokenMax = nTokenMax * 2 + 10;
-                pszToken = (char *) CPLRealloc( pszToken, nTokenMax );
-            }
-
-            pszToken[nTokenLen] = *pszString;
-            nTokenLen++;
-        }
-
-        pszToken[nTokenLen] = '\0';
-        papszRetList = CSLAddString( papszRetList, pszToken );
-
-        /* If the last token is an empty token, then we have to catch
-         * it now, otherwise we won't reenter the loop and it will be lost. 
-         */
-        if ( *pszString == '\0' && *(pszString-1) == ',' )
-        {
-            papszRetList = CSLAddString( papszRetList, "" );
-        }
-    }
-
-    if( papszRetList == NULL )
-        papszRetList = (char **) CPLCalloc(sizeof(char *),1);
-
-    CPLFree( pszToken );
-
-    return papszRetList;
-}
-
-/************************************************************************/
-/*                          CSVFindNextLine()                           */
-/*                                                                      */
-/*      Find the start of the next line, while at the same time zero    */
-/*      terminating this line.  Take into account that there may be     */
-/*      newline indicators within quoted strings, and that quotes       */
-/*      can be escaped with a backslash.                                */
-/************************************************************************/
-
-static char *CSVFindNextLine( char *pszThisLine )
-
-{
-    int  nQuoteCount = 0, i;
-
-    for( i = 0; pszThisLine[i] != '\0'; i++ )
-    {
-        if( pszThisLine[i] == '\"'
-            && (i == 0 || pszThisLine[i-1] != '\\') )
-            nQuoteCount++;
-
-        if( (pszThisLine[i] == 10 || pszThisLine[i] == 13)
-            && (nQuoteCount % 2) == 0 )
-            break;
-    }
-
-    while( pszThisLine[i] == 10 || pszThisLine[i] == 13 )
-        pszThisLine[i++] = '\0';
-
-    if( pszThisLine[i] == '\0' )
-        return NULL;
-    else
-        return pszThisLine + i;
-}
-
-/************************************************************************/
-/*                             CSVIngest()                              */
-/*                                                                      */
-/*      Load entire file into memory and setup index if possible.       */
-/************************************************************************/
-
-static void CSVIngest( const char *pszFilename )
-
-{
-    CSVTable *psTable = gtCSVAccess( pszFilename );
-    int       nFileLen, i, nMaxLineCount, iLine = 0;
-    char *pszThisLine;
-
-    if( psTable->pszRawData != NULL )
-        return;
-
-/* -------------------------------------------------------------------- */
-/*      Ingest whole file.                                              */
-/* -------------------------------------------------------------------- */
-    VSIFSeek( psTable->fp, 0, SEEK_END );
-    nFileLen = VSIFTell( psTable->fp );
-    VSIRewind( psTable->fp );
-
-    psTable->pszRawData = (char *) CPLMalloc(nFileLen+1);
-    if( (int) VSIFRead( psTable->pszRawData, 1, nFileLen, psTable->fp ) 
-        != nFileLen )
-    {
-        CPLFree( psTable->pszRawData );
-        psTable->pszRawData = NULL;
-
-        CPLError( CE_Failure, CPLE_FileIO, "Read of file %s failed.", 
-                  psTable->pszFilename );
-        return;
-    }
-
-    psTable->pszRawData[nFileLen] = '\0';
-
-/* -------------------------------------------------------------------- */
-/*      Get count of newlines so we can allocate line array.            */
-/* -------------------------------------------------------------------- */
-    nMaxLineCount = 0;
-    for( i = 0; i < nFileLen; i++ )
-    {
-        if( psTable->pszRawData[i] == 10 )
-            nMaxLineCount++;
-    }
-
-    psTable->papszLines = (char **) CPLCalloc(sizeof(char*),nMaxLineCount);
-    
-/* -------------------------------------------------------------------- */
-/*      Build a list of record pointers into the raw data buffer        */
-/*      based on line terminators.  Zero terminate the line             */
-/*      strings.                                                        */
-/* -------------------------------------------------------------------- */
-    /* skip header line */
-    pszThisLine = CSVFindNextLine( psTable->pszRawData );
-
-    while( pszThisLine != NULL && iLine < nMaxLineCount )
-    {
-        psTable->papszLines[iLine++] = pszThisLine;
-        pszThisLine = CSVFindNextLine( pszThisLine );
-    }
-
-    psTable->nLineCount = iLine;
-
-/* -------------------------------------------------------------------- */
-/*      Allocate and populate index array.  Ensure they are in          */
-/*      ascending order so that binary searches can be done on the      */
-/*      array.                                                          */
-/* -------------------------------------------------------------------- */
-    psTable->panLineIndex = (int *) CPLMalloc(sizeof(int)*psTable->nLineCount);
-    for( i = 0; i < psTable->nLineCount; i++ )
-    {
-        psTable->panLineIndex[i] = atoi(psTable->papszLines[i]);
-
-        if( i > 0 && psTable->panLineIndex[i] < psTable->panLineIndex[i-1] )
-        {
-            CPLFree( psTable->panLineIndex );
-            psTable->panLineIndex = NULL;
-            break;
-        }
-    }
-
-    psTable->iLastLine = -1;
-
-/* -------------------------------------------------------------------- */
-/*      We should never need the file handle against, so close it.      */
-/* -------------------------------------------------------------------- */
-    VSIFClose( psTable->fp );
-    psTable->fp = NULL;
-}
-
-/************************************************************************/
-/*                          CSVReadParseLine()                          */
-/*                                                                      */
-/*      Read one line, and return split into fields.  The return        */
-/*      result is a stringlist, in the sense of the CSL functions.      */
-/************************************************************************/
-
-char **CSVReadParseLine( FILE * fp )
-
-{
-    const char  *pszLine;
-    char        *pszWorkLine;
-    char        **papszReturn;
-
-    CPLAssert( fp != NULL );
-    if( fp == NULL )
-        return( NULL );
-    
-    pszLine = CPLReadLine( fp );
-    if( pszLine == NULL )
-        return( NULL );
-
-/* -------------------------------------------------------------------- */
-/*      If there are no quotes, then this is the simple case.           */
-/*      Parse, and return tokens.                                       */
-/* -------------------------------------------------------------------- */
-    if( strchr(pszLine,'\"') == NULL )
-        return CSVSplitLine( pszLine );
-
-/* -------------------------------------------------------------------- */
-/*      We must now count the quotes in our working string, and as      */
-/*      long as it is odd, keep adding new lines.                       */
-/* -------------------------------------------------------------------- */
-    pszWorkLine = CPLStrdup( pszLine );
-
-    while( TRUE )
-    {
-        int             i, nCount = 0;
-
-        for( i = 0; pszWorkLine[i] != '\0'; i++ )
-        {
-            if( pszWorkLine[i] == '\"'
-                && (i == 0 || pszWorkLine[i-1] != '\\') )
-                nCount++;
-        }
-
-        if( nCount % 2 == 0 )
-            break;
-
-        pszLine = CPLReadLine( fp );
-        if( pszLine == NULL )
-            break;
-
-        pszWorkLine = (char *)
-            CPLRealloc(pszWorkLine,
-                       strlen(pszWorkLine) + strlen(pszLine) + 1);
-        strcat( pszWorkLine, pszLine );
-    }
-    
-    papszReturn = CSVSplitLine( pszWorkLine );
-
-    CPLFree( pszWorkLine );
-
-    return papszReturn;
-}
-
-/************************************************************************/
-/*                             CSVCompare()                             */
-/*                                                                      */
-/*      Compare a field to a search value using a particular            */
-/*      criteria.                                                       */
-/************************************************************************/
-
-static int CSVCompare( const char * pszFieldValue, const char * pszTarget,
-                       CSVCompareCriteria eCriteria )
-
-{
-    if( eCriteria == CC_ExactString )
-    {
-        return( strcmp( pszFieldValue, pszTarget ) == 0 );
-    }
-    else if( eCriteria == CC_ApproxString )
-    {
-        return( EQUAL( pszFieldValue, pszTarget ) );
-    }
-    else if( eCriteria == CC_Integer )
-    {
-        return( atoi(pszFieldValue) == atoi(pszTarget) );
-    }
-
-    return FALSE;
-}
-
-/************************************************************************/
-/*                            CSVScanLines()                            */
-/*                                                                      */
-/*      Read the file scanline for lines where the key field equals     */
-/*      the indicated value with the suggested comparison criteria.     */
-/*      Return the first matching line split into fields.               */
-/************************************************************************/
-
-char **CSVScanLines( FILE *fp, int iKeyField, const char * pszValue,
-                     CSVCompareCriteria eCriteria )
-
-{
-    char        **papszFields = NULL;
-    int         bSelected = FALSE, nTestValue;
-
-    CPLAssert( pszValue != NULL );
-    CPLAssert( iKeyField >= 0 );
-    CPLAssert( fp != NULL );
-    
-    nTestValue = atoi(pszValue);
-    
-    while( !bSelected ) {
-        papszFields = CSVReadParseLine( fp );
-        if( papszFields == NULL )
-            return( NULL );
-
-        if( CSLCount( papszFields ) < iKeyField+1 )
-        {
-            /* not selected */
-        }
-        else if( eCriteria == CC_Integer
-                 && atoi(papszFields[iKeyField]) == nTestValue )
-        {
-            bSelected = TRUE;
-        }
-        else
-        {
-            bSelected = CSVCompare( papszFields[iKeyField], pszValue,
-                                    eCriteria );
-        }
-
-        if( !bSelected )
-        {
-            CSLDestroy( papszFields );
-            papszFields = NULL;
-        }
-    }
-    
-    return( papszFields );
-}
-
-/************************************************************************/
-/*                        CSVScanLinesIndexed()                         */
-/*                                                                      */
-/*      Read the file scanline for lines where the key field equals     */
-/*      the indicated value with the suggested comparison criteria.     */
-/*      Return the first matching line split into fields.               */
-/************************************************************************/
-
-static char **
-CSVScanLinesIndexed( CSVTable *psTable, int nKeyValue )
-
-{
-    int         iTop, iBottom, iMiddle, iResult = -1;
-
-    CPLAssert( psTable->panLineIndex != NULL );
-
-/* -------------------------------------------------------------------- */
-/*      Find target record with binary search.                          */
-/* -------------------------------------------------------------------- */
-    iTop = psTable->nLineCount-1;
-    iBottom = 0;
-
-    while( iTop >= iBottom )
-    {
-        iMiddle = (iTop + iBottom) / 2;
-        if( psTable->panLineIndex[iMiddle] > nKeyValue )
-            iTop = iMiddle - 1;
-        else if( psTable->panLineIndex[iMiddle] < nKeyValue )
-            iBottom = iMiddle + 1;
-        else
-        {
-            iResult = iMiddle;
-            break;
-        }
-    }
-
-    if( iResult == -1 )
-        return NULL;
-
-/* -------------------------------------------------------------------- */
-/*      Parse target line, and update iLastLine indicator.              */
-/* -------------------------------------------------------------------- */
-    psTable->iLastLine = iResult;
-    
-    return CSVSplitLine( psTable->papszLines[iResult] );
-}
-
-/************************************************************************/
-/*                        CSVScanLinesIngested()                        */
-/*                                                                      */
-/*      Read the file scanline for lines where the key field equals     */
-/*      the indicated value with the suggested comparison criteria.     */
-/*      Return the first matching line split into fields.               */
-/************************************************************************/
-
-static char **
-CSVScanLinesIngested( CSVTable *psTable, int iKeyField, const char * pszValue,
-                      CSVCompareCriteria eCriteria )
-
-{
-    char        **papszFields = NULL;
-    int         bSelected = FALSE, nTestValue;
-
-    CPLAssert( pszValue != NULL );
-    CPLAssert( iKeyField >= 0 );
-
-    nTestValue = atoi(pszValue);
-    
-/* -------------------------------------------------------------------- */
-/*      Short cut for indexed files.                                    */
-/* -------------------------------------------------------------------- */
-    if( iKeyField == 0 && eCriteria == CC_Integer 
-        && psTable->panLineIndex != NULL )
-        return CSVScanLinesIndexed( psTable, nTestValue );
-    
-/* -------------------------------------------------------------------- */
-/*      Scan from in-core lines.                                        */
-/* -------------------------------------------------------------------- */
-    while( !bSelected && psTable->iLastLine+1 < psTable->nLineCount ) {
-        psTable->iLastLine++;
-        papszFields = CSVSplitLine( psTable->papszLines[psTable->iLastLine] );
-
-        if( CSLCount( papszFields ) < iKeyField+1 )
-        {
-            /* not selected */
-        }
-        else if( eCriteria == CC_Integer
-                 && atoi(papszFields[iKeyField]) == nTestValue )
-        {
-            bSelected = TRUE;
-        }
-        else
-        {
-            bSelected = CSVCompare( papszFields[iKeyField], pszValue,
-                                    eCriteria );
-        }
-
-        if( !bSelected )
-        {
-            CSLDestroy( papszFields );
-            papszFields = NULL;
-        }
-    }
-    
-    return( papszFields );
-}
-
-/************************************************************************/
-/*                            CSVScanFile()                             */
-/*                                                                      */
-/*      Scan a whole file using criteria similar to above, but also     */
-/*      taking care of file opening and closing.                        */
-/************************************************************************/
-
-char **CSVScanFile( const char * pszFilename, int iKeyField,
-                    const char * pszValue, CSVCompareCriteria eCriteria )
-
-{
-    CSVTable    *psTable;
-
-/* -------------------------------------------------------------------- */
-/*      Get access to the table.                                        */
-/* -------------------------------------------------------------------- */
-    CPLAssert( pszFilename != NULL );
-
-    if( iKeyField < 0 )
-        return NULL;
-
-    psTable = gtCSVAccess( pszFilename );
-    if( psTable == NULL )
-        return NULL;
-    
-    CSVIngest( pszFilename );
-
-/* -------------------------------------------------------------------- */
-/*      Does the current record match the criteria?  If so, just        */
-/*      return it again.                                                */
-/* -------------------------------------------------------------------- */
-    if( iKeyField >= 0
-        && iKeyField < CSLCount(psTable->papszRecFields)
-        && CSVCompare(pszValue,psTable->papszRecFields[iKeyField],eCriteria) )
-    {
-        return psTable->papszRecFields;
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Scan the file from the beginning, replacing the ``current       */
-/*      record'' in our structure with the one that is found.           */
-/* -------------------------------------------------------------------- */
-    psTable->iLastLine = -1;
-    CSLDestroy( psTable->papszRecFields );
-
-    if( psTable->pszRawData != NULL )
-        psTable->papszRecFields = 
-            CSVScanLinesIngested( psTable, iKeyField, pszValue, eCriteria );
-    else
-    {
-        VSIRewind( psTable->fp );
-        CPLReadLine( psTable->fp );         /* throw away the header line */
-    
-        psTable->papszRecFields =
-            CSVScanLines( psTable->fp, iKeyField, pszValue, eCriteria );
-    }
-
-    return( psTable->papszRecFields );
-}
-
-/************************************************************************/
-/*                           CPLGetFieldId()                            */
-/*                                                                      */
-/*      Read the first record of a CSV file (rewinding to be sure),     */
-/*      and find the field with the indicated name.  Returns -1 if      */
-/*      it fails to find the field name.  Comparison is case            */
-/*      insensitive, but otherwise exact.  After this function has      */
-/*      been called the file pointer will be positioned just after      */
-/*      the first record.                                               */
-/************************************************************************/
-
-int CSVGetFieldId( FILE * fp, const char * pszFieldName )
-
-{
-    char        **papszFields;
-    int         i;
-    
-    CPLAssert( fp != NULL && pszFieldName != NULL );
-
-    VSIRewind( fp );
-
-    papszFields = CSVReadParseLine( fp );
-    for( i = 0; papszFields != NULL && papszFields[i] != NULL; i++ )
-    {
-        if( EQUAL(papszFields[i],pszFieldName) )
-        {
-            CSLDestroy( papszFields );
-            return i;
-        }
-    }
-
-    CSLDestroy( papszFields );
-
-    return -1;
-}
-
-/************************************************************************/
-/*                         CSVGetFileFieldId()                          */
-/*                                                                      */
-/*      Same as CPLGetFieldId(), except that we get the file based      */
-/*      on filename, rather than having an existing handle.             */
-/************************************************************************/
-
-int CSVGetFileFieldId( const char * pszFilename, const char * pszFieldName )
-
-{
-    CSVTable    *psTable;
-    int         i;
-    
-/* -------------------------------------------------------------------- */
-/*      Get access to the table.                                        */
-/* -------------------------------------------------------------------- */
-    CPLAssert( pszFilename != NULL );
-
-    psTable = gtCSVAccess( pszFilename );
-    if( psTable == NULL )
-        return -1;
-
-/* -------------------------------------------------------------------- */
-/*      Find the requested field.                                       */
-/* -------------------------------------------------------------------- */
-    for( i = 0;
-         psTable->papszFieldNames != NULL
-             && psTable->papszFieldNames[i] != NULL;
-         i++ )
-    {
-        if( EQUAL(psTable->papszFieldNames[i],pszFieldName) )
-        {
-            return i;
-        }
-    }
-
-    return -1;
-}
-
-
-/************************************************************************/
-/*                         CSVScanFileByName()                          */
-/*                                                                      */
-/*      Same as CSVScanFile(), but using a field name instead of a      */
-/*      field number.                                                   */
-/************************************************************************/
-
-char **CSVScanFileByName( const char * pszFilename,
-                          const char * pszKeyFieldName,
-                          const char * pszValue, CSVCompareCriteria eCriteria )
-
-{
-    int         iKeyField;
-
-    iKeyField = CSVGetFileFieldId( pszFilename, pszKeyFieldName );
-    if( iKeyField == -1 )
-        return NULL;
-
-    return( CSVScanFile( pszFilename, iKeyField, pszValue, eCriteria ) );
-}
-
-/************************************************************************/
-/*                            CSVGetField()                             */
-/*                                                                      */
-/*      The all-in-one function to fetch a particular field value       */
-/*      from a CSV file.  Note this function will return an empty       */
-/*      string, rather than NULL if it fails to find the desired        */
-/*      value for some reason.  The caller can't establish that the     */
-/*      fetch failed.                                                   */
-/************************************************************************/
-
-const char *CSVGetField( const char * pszFilename,
-                         const char * pszKeyFieldName,
-                         const char * pszKeyFieldValue,
-                         CSVCompareCriteria eCriteria,
-                         const char * pszTargetField )
-
-{
-    CSVTable    *psTable;
-    char        **papszRecord;
-    int         iTargetField;
-    
-/* -------------------------------------------------------------------- */
-/*      Find the table.                                                 */
-/* -------------------------------------------------------------------- */
-    psTable = gtCSVAccess( pszFilename );
-    if( psTable == NULL )
-        return "";
-
-/* -------------------------------------------------------------------- */
-/*      Find the correct record.                                        */
-/* -------------------------------------------------------------------- */
-    papszRecord = CSVScanFileByName( pszFilename, pszKeyFieldName,
-                                     pszKeyFieldValue, eCriteria );
-
-    if( papszRecord == NULL )
-        return "";
-
-/* -------------------------------------------------------------------- */
-/*      Figure out which field we want out of this.                     */
-/* -------------------------------------------------------------------- */
-    iTargetField = CSVGetFileFieldId( pszFilename, pszTargetField );
-    if( iTargetField < 0 )
-        return "";
-
-    if( iTargetField >= CSLCount( papszRecord ) )
-        return "";
-
-    return( papszRecord[iTargetField] );
-}
-
-/************************************************************************/
-/*                            CSVFilename()                             */
-/*                                                                      */
-/*      Return the full path to a particular CSV file.  This will       */
-/*      eventually be something the application can override.           */
-/************************************************************************/
-
-static const char *(*pfnCSVFilenameHook)(const char *) = NULL;
-
-const char * CSVFilename( const char *pszBasename )
-
-{
-    static char		szPath[512];
-
-    if( pfnCSVFilenameHook == NULL )
-    {
-        FILE	*fp = NULL;
-
-        if( getenv("GEOTIFF_CSV") != NULL )
-        {
-            sprintf( szPath, "%s/%s", getenv("GEOTIFF_CSV"), pszBasename );
-        }
-#ifdef CSV_DATA_DIR
-        else 
-        {
-            sprintf( szPath, "%s/%s", CSV_DATA_DIR, pszBasename );
-        }
-#else
-        else if( (fp = fopen( "/usr/local/share/epsg/csv/pcs.csv", "rt" )) != NULL )
-        {
-            sprintf( szPath, "/usr/local/share/epsg/csv/%s", pszBasename );
-        }
-        else if( (fp = fopen( "csv/pcs.csv", "rt" )) != NULL )
-        {
-            sprintf( szPath, "csv/%s", pszBasename );
-        }
-        else if( (fp = fopen( "share/epsg_csv/pcs.csv", "rt" )) != NULL )
-        {
-            sprintf( szPath, "share/epsg_csv/%s", pszBasename );
-        }
-        else if( (fp = fopen( "/usr/share/epsg_csv/pcs.csv", "rt" )) != NULL )
-        {
-            sprintf( szPath, "/usr/share/epsg_csv/%s", pszBasename );
-        }
-        else
-        {
-            sprintf( szPath, "/usr/local/share/epsg_csv/%s", pszBasename );
-        }
-#endif
-
-        if( fp != NULL )
-            fclose( fp );
-        
-        return( szPath );
-    }
-    else
-        return( pfnCSVFilenameHook( pszBasename ) );
-}
-
-/************************************************************************/
-/*                         SetCSVFilenameHook()                         */
-/*                                                                      */
-/*      Applications can use this to set a function that will           */
-/*      massage CSV filenames.                                          */
-/************************************************************************/
-
-/**
- * Override CSV file search method.
- *
- * @param CSVFileOverride The pointer to a function which will return the
- * full path for a given filename.
-  *
-
-This function allows an application to override how the GTIFGetDefn() and related function find the CSV (Comma Separated
-Value) values required. The pfnHook argument should be a pointer to a function that will take in a CSV filename and return a
-full path to the file. The returned string should be to an internal static buffer so that the caller doesn't have to free the result.
-
-<b>Example:</b><br>
-
-The listgeo utility uses the following override function if the user
-specified a CSV file directory with the -t commandline switch (argument
-put into CSVDirName).  <p>
-
-<pre>
-
-    ...
-
-
-    SetCSVFilenameHook( CSVFileOverride );
-
-    ...
-
-
-static const char *CSVFileOverride( const char * pszInput )
-
-{
-    static char         szPath[1024];
-
-#ifdef WIN32
-    sprintf( szPath, "%s\\%s", CSVDirName, pszInput );
-#else    
-    sprintf( szPath, "%s/%s", CSVDirName, pszInput );
-#endif    
-
-    return( szPath );
-}
-</pre>
-
-*/
-
-void SetCSVFilenameHook( const char *(*pfnNewHook)( const char * ) )
-
-{
-    pfnCSVFilenameHook = pfnNewHook;
-}
diff --git a/src/tiff/cpl_csv.h b/src/tiff/cpl_csv.h
deleted file mode 100644
index db4a1f8..0000000
--- a/src/tiff/cpl_csv.h
+++ /dev/null
@@ -1,86 +0,0 @@
-/******************************************************************************
- * $Id: cpl_csv.h,v 1.1 2002/07/30 19:57:50 juan Exp $
- *
- * Project:  Common Portability Library
- * Purpose:  Functions for reading and scaning CSV (comma separated,
- *           variable length text files holding tables) files.  
- * Author:   Frank Warmerdam, warmerda at home.com
- *
- ******************************************************************************
- * Copyright (c) 1999, Frank Warmerdam
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- ******************************************************************************
- *
- * $Log: cpl_csv.h,v $
- * Revision 1.1  2002/07/30 19:57:50  juan
- * File added
- *
- * Revision 1.1  2002/02/04 18:49:02  juan
- * Arquivo adicionado
- *
- * Revision 1.1  1999/10/06 19:26:24  juan
- * Add files for geotiff
- *
- * Revision 1.2  1999/03/17 20:42:40  geotiff
- * Dont export the CSV functions from the DLL
- *
- * Revision 1.1  1999/03/09 15:57:04  geotiff
- * New
- *
- * Revision 1.2  1999/02/24 16:22:58  warmerda
- * cpl_csv.c
- *
- */
-
-#ifndef CPL_CSV_H_INCLUDED
-#define CPL_CSV_H_INCLUDED
-
-#include "cpl_serv.h"
-
-CPL_C_START
-
-typedef enum {
-    CC_ExactString,
-    CC_ApproxString,
-    CC_Integer
-} CSVCompareCriteria;
-
-const char  *CSVFilename( const char * );
-
-char  **CSVReadParseLine( FILE * );
-char  **CSVScanLines( FILE *, int, const char *, CSVCompareCriteria );
-char  **CSVScanFile( const char *, int, const char *,
-                            CSVCompareCriteria );
-char  **CSVScanFileByName( const char *, const char *, const char *,
-                                  CSVCompareCriteria );
-int  CSVGetFieldId( FILE *, const char * );
-int  CSVGetFileFieldId( const char *, const char * );
-
-void  CSVDeaccess( const char * );
-
-const char  *CSVGetField( const char *, const char *, const char *,
-                                 CSVCompareCriteria, const char * );
-
-void CPL_DLL SetCSVFilenameHook( const char *(*)(const char *) );
-
-CPL_C_END
-
-#endif /* ndef CPL_CSV_H_INCLUDED */
-
diff --git a/src/tiff/cpl_serv.c b/src/tiff/cpl_serv.c
deleted file mode 100644
index 7f8f7a6..0000000
--- a/src/tiff/cpl_serv.c
+++ /dev/null
@@ -1,599 +0,0 @@
-/******************************************************************************
- * Copyright (c) 1998, Frank Warmerdam
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- ******************************************************************************
- *
- * cpl_serv.c: Various Common Portability Library derived convenience functions
- *
- * $Log: cpl_serv.c,v $
- * Revision 1.3  2004/03/19 11:51:23  lubia
- * Atualizada as bibliotecas Tif e GeoTif
- *
- * Revision 1.8  2001/07/09 20:14:37  warmerda
- * Another problem freeing pszRLBuffer and not setting to NULL.
- *
- * Revision 1.7  2001/04/17 13:40:43  warmerda
- * fixed freeing of line buffer in CPLReadLine(), init ptr to NULL
- *
- * Revision 1.6  2001/03/05 04:56:17  warmerda
- * make it possible to deallocate CPLReadLine buffer
- *
- * Revision 1.5  2000/09/30 03:35:05  warmerda
- * Fixed CPLReadLine() to use avoid calling VSIRealloc() on a NULL pointer.
- *
- * Revision 1.4  1999/06/25 04:35:26  warmerda
- * Fixed to actually support long lines.
- *
- * Revision 1.3  1999/03/17 20:43:03  geotiff
- * Avoid use of size_t keyword
- *
- * Revision 1.2  1999/03/10 18:22:39  geotiff
- * Added string.h, fixed backslash escaping
- *
- * Revision 1.1  1999/03/09 15:57:04  geotiff
- * New
- *
- */
-
-#include "cpl_serv.h"
-#include "geo_tiffp.h"
-
-#ifdef HAVE_STRING_H
-#  include <string.h>
-#endif
-#if defined(HAVE_STRINGS_H) && !defined(HAVE_STRING_H)
-#  include <strings.h>
-#endif
-
-/************************************************************************/
-/*                             CPLCalloc()                              */
-/************************************************************************/
-
-void *CPLCalloc( int nCount, int nSize )
-
-{
-    void	*pReturn;
-
-    if( nSize == 0 )
-        return NULL;
-    
-    pReturn = VSICalloc( nCount, nSize );
-    if( pReturn == NULL )
-    {
-        CPLError( CE_Fatal, CPLE_OutOfMemory,
-                  "CPLCalloc(): Out of memory allocating %d bytes.\n",
-                  nSize * nCount );
-    }
-
-    return pReturn;
-}
-
-/************************************************************************/
-/*                             CPLMalloc()                              */
-/************************************************************************/
-
-void *CPLMalloc( int nSize )
-
-{
-    void	*pReturn;
-
-    if( nSize == 0 )
-        return NULL;
-    
-    pReturn = VSIMalloc( nSize );
-    if( pReturn == NULL )
-    {
-        CPLError( CE_Fatal, CPLE_OutOfMemory,
-                  "CPLMalloc(): Out of memory allocating %d bytes.\n",
-                  nSize );
-    }
-
-    return pReturn;
-}
-
-/************************************************************************/
-/*                             CPLRealloc()                             */
-/************************************************************************/
-
-void * CPLRealloc( void * pData, int nNewSize )
-
-{
-    void	*pReturn;
-
-    if( pData == NULL )
-        pReturn = VSIMalloc( nNewSize );
-    else
-        pReturn = VSIRealloc( pData, nNewSize );
-    
-    if( pReturn == NULL )
-    {
-        CPLError( CE_Fatal, CPLE_OutOfMemory,
-                  "CPLRealloc(): Out of memory allocating %d bytes.\n",
-                  nNewSize );
-    }
-
-    return pReturn;
-}
-
-/************************************************************************/
-/*                             CPLStrdup()                              */
-/************************************************************************/
-
-char *CPLStrdup( const char * pszString )
-
-{
-    char	*pszReturn;
-
-    if( pszString == NULL )
-        pszString = "";
-
-    pszReturn = VSIMalloc( strlen(pszString)+1 );
-        
-    if( pszReturn == NULL )
-    {
-        CPLError( CE_Fatal, CPLE_OutOfMemory,
-                  "CPLStrdup(): Out of memory allocating %d bytes.\n",
-                  strlen(pszString) );
-        
-    }
-
-    strcpy( pszReturn, pszString );
-    
-    return( pszReturn );
-}
-
-/************************************************************************/
-/*                            CPLReadLine()                             */
-/*                                                                      */
-/*      Read a line of text from the given file handle, taking care     */
-/*      to capture CR and/or LF and strip off ... equivelent of         */
-/*      DKReadLine().  Pointer to an internal buffer is returned.       */
-/*      The application shouldn't free it, or depend on it's value      */
-/*      past the next call to CPLReadLine()                             */
-/************************************************************************/
-
-const char *CPLReadLine( FILE * fp )
-
-{
-    static char	*pszRLBuffer = NULL;
-    static int	nRLBufferSize = 0;
-    int		nLength, nReadSoFar = 0;
-
-/* -------------------------------------------------------------------- */
-/*      Cleanup case.                                                   */
-/* -------------------------------------------------------------------- */
-    if( fp == NULL )
-    {
-        CPLFree( pszRLBuffer );
-        pszRLBuffer = NULL;
-        nRLBufferSize = 0;
-        return NULL;
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Loop reading chunks of the line till we get to the end of       */
-/*      the line.                                                       */
-/* -------------------------------------------------------------------- */
-    do {
-/* -------------------------------------------------------------------- */
-/*      Grow the working buffer if we have it nearly full.  Fail out    */
-/*      of read line if we can't reallocate it big enough (for          */
-/*      instance for a _very large_ file with no newlines).             */
-/* -------------------------------------------------------------------- */
-        if( nRLBufferSize-nReadSoFar < 128 )
-        {
-            nRLBufferSize = nRLBufferSize*2 + 128;
-            if( pszRLBuffer == NULL )
-                pszRLBuffer = (char *) VSIMalloc(nRLBufferSize);
-            else
-                pszRLBuffer = (char *) VSIRealloc(pszRLBuffer, nRLBufferSize);
-            if( pszRLBuffer == NULL )
-            {
-                nRLBufferSize = 0;
-                return NULL;
-            }
-        }
-
-/* -------------------------------------------------------------------- */
-/*      Do the actual read.                                             */
-/* -------------------------------------------------------------------- */
-        if( VSIFGets( pszRLBuffer+nReadSoFar, nRLBufferSize-nReadSoFar, fp )
-            == NULL )
-        {
-            CPLFree( pszRLBuffer );
-            pszRLBuffer = NULL;
-            nRLBufferSize = 0;
-
-            return NULL;
-        }
-
-        nReadSoFar = strlen(pszRLBuffer);
-
-    } while( nReadSoFar == nRLBufferSize - 1
-             && pszRLBuffer[nRLBufferSize-2] != 13
-             && pszRLBuffer[nRLBufferSize-2] != 10 );
-
-/* -------------------------------------------------------------------- */
-/*      Clear CR and LF off the end.                                    */
-/* -------------------------------------------------------------------- */
-    nLength = strlen(pszRLBuffer);
-    if( nLength > 0
-        && (pszRLBuffer[nLength-1] == 10 || pszRLBuffer[nLength-1] == 13) )
-    {
-        pszRLBuffer[--nLength] = '\0';
-    }
-    
-    if( nLength > 0
-        && (pszRLBuffer[nLength-1] == 10 || pszRLBuffer[nLength-1] == 13) )
-    {
-        pszRLBuffer[--nLength] = '\0';
-    }
-
-    return( pszRLBuffer );
-}
-
-
-/*=====================================================================
-                    StringList manipulation functions.
- =====================================================================*/
-
-/**********************************************************************
- *                       CSLAddString()
- *
- * Append a string to a StringList and return a pointer to the modified
- * StringList.
- * If the input StringList is NULL, then a new StringList is created.
- **********************************************************************/
-char **CSLAddString(char **papszStrList, const char *pszNewString)
-{
-    int nItems=0;
-
-    if (pszNewString == NULL)
-        return papszStrList;    /* Nothing to do!*/
-
-    /* Allocate room for the new string */
-    if (papszStrList == NULL)
-        papszStrList = (char**) CPLCalloc(2,sizeof(char*));
-    else
-    {
-        nItems = CSLCount(papszStrList);
-        papszStrList = (char**)CPLRealloc(papszStrList, 
-                                          (nItems+2)*sizeof(char*));
-    }
-
-    /* Copy the string in the list */
-    papszStrList[nItems] = CPLStrdup(pszNewString);
-    papszStrList[nItems+1] = NULL;
-
-    return papszStrList;
-}
-
-/**********************************************************************
- *                       CSLCount()
- *
- * Return the number of lines in a Stringlist.
- **********************************************************************/
-int CSLCount(char **papszStrList)
-{
-    int nItems=0;
-
-    if (papszStrList)
-    {
-        while(*papszStrList != NULL)
-        {
-            nItems++;
-            papszStrList++;
-        }
-    }
-
-    return nItems;
-}
-
-
-/************************************************************************/
-/*                            CSLGetField()                             */
-/*                                                                      */
-/*      Fetches the indicated field, being careful not to crash if      */
-/*      the field doesn't exist within this string list.  The           */
-/*      returned pointer should not be freed, and doesn't               */
-/*      necessarily last long.                                          */
-/************************************************************************/
-
-const char * CSLGetField( char ** papszStrList, int iField )
-
-{
-    int         i;
-
-    if( papszStrList == NULL || iField < 0 )
-        return( "" );
-
-    for( i = 0; i < iField+1; i++ )
-    {
-        if( papszStrList[i] == NULL )
-            return "";
-    }
-
-    return( papszStrList[iField] );
-}
-
-/**********************************************************************
- *                       CSLDestroy()
- *
- * Free all memory used by a StringList.
- **********************************************************************/
-void CSLDestroy(char **papszStrList)
-{
-    char **papszPtr;
-
-    if (papszStrList)
-    {
-        papszPtr = papszStrList;
-        while(*papszPtr != NULL)
-        {
-            CPLFree(*papszPtr);
-            papszPtr++;
-        }
-
-        CPLFree(papszStrList);
-    }
-}
-
-
-/**********************************************************************
- *                       CSLDuplicate()
- *
- * Allocate and return a copy of a StringList.
- **********************************************************************/
-char    **CSLDuplicate(char **papszStrList)
-{
-    char **papszNewList, **papszSrc, **papszDst;
-    int  nLines;
-
-    nLines = CSLCount(papszStrList);
-
-    if (nLines == 0)
-        return NULL;
-
-    papszNewList = (char **)CPLMalloc((nLines+1)*sizeof(char*));
-    papszSrc = papszStrList;
-    papszDst = papszNewList;
-
-    while(*papszSrc != NULL)
-    {
-        *papszDst = CPLStrdup(*papszSrc);
-
-        papszSrc++;
-        papszDst++;
-    }
-    *papszDst = NULL;
-
-    return papszNewList;
-}
-
-/**********************************************************************
- *                       CSLTokenizeString()
- *
- * Tokenizes a string and returns a StringList with one string for
- * each token.
- **********************************************************************/
-char    **CSLTokenizeString( const char *pszString )
-{
-    return CSLTokenizeStringComplex( pszString, " ", TRUE, FALSE );
-}
-
-/************************************************************************/
-/*                      CSLTokenizeStringComplex()                      */
-/*                                                                      */
-/*      The ultimate tokenizer?                                         */
-/************************************************************************/
-
-char ** CSLTokenizeStringComplex( const char * pszString,
-                                  const char * pszDelimiters,
-                                  int bHonourStrings, int bAllowEmptyTokens )
-
-{
-    char	**papszRetList = NULL;
-    char 	*pszToken;
-    int		nTokenMax, nTokenLen;
-
-    pszToken = (char *) CPLCalloc(10,1);
-    nTokenMax = 10;
-    
-    while( pszString != NULL && *pszString != '\0' )
-    {
-        int	bInString = FALSE;
-
-        nTokenLen = 0;
-        
-        /* Try to find the next delimeter, marking end of token */
-        for( ; *pszString != '\0'; pszString++ )
-        {
-
-            /* End if this is a delimeter skip it and break. */
-            if( !bInString && strchr(pszDelimiters, *pszString) != NULL )
-            {
-                pszString++;
-                break;
-            }
-            
-            /* If this is a quote, and we are honouring constant
-               strings, then process the constant strings, with out delim
-               but don't copy over the quotes */
-            if( bHonourStrings && *pszString == '"' )
-            {
-                if( bInString )
-                {
-                    bInString = FALSE;
-                    continue;
-                }
-                else
-                {
-                    bInString = TRUE;
-                    continue;
-                }
-            }
-
-            /* Within string constants we allow for escaped quotes, but
-               in processing them we will unescape the quotes */
-            if( bInString && pszString[0] == '\\' && pszString[1] == '"' )
-            {
-                pszString++;
-            }
-
-            /* Within string constants a \\ sequence reduces to \ */
-            else if( bInString
-                     && pszString[0] == '\\' && pszString[1] == '\\' )
-            {
-                pszString++;
-            }
-
-            if( nTokenLen >= nTokenMax-1 )
-            {
-                nTokenMax = nTokenMax * 2 + 10;
-                pszToken = (char *) CPLRealloc( pszToken, nTokenMax );
-            }
-
-            pszToken[nTokenLen] = *pszString;
-            nTokenLen++;
-        }
-
-        pszToken[nTokenLen] = '\0';
-
-        if( pszToken[0] != '\0' || bAllowEmptyTokens )
-        {
-            papszRetList = CSLAddString( papszRetList, pszToken );
-        }
-    }
-
-    if( papszRetList == NULL )
-        papszRetList = (char **) CPLCalloc(sizeof(char *),1);
-
-    CPLFree( pszToken );
-
-    return papszRetList;
-}
-
-/* static buffer to store the last error message.  We'll assume that error
- * messages cannot be longer than 2000 chars... which is quite reasonable
- * (that's 25 lines of 80 chars!!!)
- */
-static char gszCPLLastErrMsg[2000] = "";
-static int  gnCPLLastErrNo = 0;
-
-static void (*gpfnCPLErrorHandler)(CPLErr, int, const char *) = NULL;
-
-/**********************************************************************
- *                          CPLError()
- *
- * This function records an error code and displays the error message
- * to stderr.
- *
- * The error code can be accessed later using CPLGetLastErrNo()
- **********************************************************************/
-void    CPLError(CPLErr eErrClass, int err_no, const char *fmt, ...)
-{
-    va_list args;
-
-    /* Expand the error message 
-     */
-    va_start(args, fmt);
-    vsprintf(gszCPLLastErrMsg, fmt, args);
-    va_end(args);
-
-    /* If the user provided his own error handling function, then call
-     * it, otherwise print the error to stderr and return.
-     */
-    gnCPLLastErrNo = err_no;
-
-    if (gpfnCPLErrorHandler != NULL)
-    {
-        gpfnCPLErrorHandler(eErrClass, err_no, gszCPLLastErrMsg);
-    }
-    else
-    {
-        fprintf(stderr, "ERROR %d: %s\n", gnCPLLastErrNo, gszCPLLastErrMsg);
-    }
-
-    if( eErrClass == CE_Fatal )
-        abort();
-}
-
-/**********************************************************************
- *                          CPLErrorReset()
- *
- * Erase any traces of previous errors.
- **********************************************************************/
-void    CPLErrorReset()
-{
-    gnCPLLastErrNo = 0;
-    gszCPLLastErrMsg[0] = '\0';
-}
-
-
-/**********************************************************************
- *                          CPLGetLastErrorNo()
- *
- **********************************************************************/
-int     CPLGetLastErrorNo()
-{
-    return gnCPLLastErrNo;
-}
-
-/**********************************************************************
- *                          CPLGetLastErrorMsg()
- *
- **********************************************************************/
-const char* CPLGetLastErrorMsg()
-{
-    return gszCPLLastErrMsg;
-}
-
-/**********************************************************************
- *                          CPLSetErrorHandler()
- *
- * Allow the library's user to specify his own error handler function.
- *
- * A valid error handler is a C function with the following prototype:
- *
- *     void MyErrorHandler(int errno, const char *msg)
- *
- * Pass NULL to come back to the default behavior.
- **********************************************************************/
-
-void     CPLSetErrorHandler(void (*pfnErrorHandler)(CPLErr, int, const char *))
-{
-    gpfnCPLErrorHandler = pfnErrorHandler;
-}
-
-/************************************************************************/
-/*                             _CPLAssert()                             */
-/*                                                                      */
-/*      This function is called only when an assertion fails.           */
-/************************************************************************/
-
-void _CPLAssert( const char * pszExpression, const char * pszFile,
-                 int iLine )
-
-{
-    CPLError( CE_Fatal, CPLE_AssertionFailed,
-              "Assertion `%s' failed\n"
-              "in file `%s', line %d\n",
-              pszExpression, pszFile, iLine );
-}
diff --git a/src/tiff/cpl_serv.h b/src/tiff/cpl_serv.h
deleted file mode 100644
index 6672056..0000000
--- a/src/tiff/cpl_serv.h
+++ /dev/null
@@ -1,276 +0,0 @@
-/******************************************************************************
- * Copyright (c) 1998, Frank Warmerdam
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- ******************************************************************************
- *
- * cpl_serv.h
- *
- * This include file derived and simplified from the GDAL Common Portability
- * Library.
- */
-
-#ifndef CPL_SERV_H_INCLUDED
-#define CPL_SERV_H_INCLUDED
-
-/* ==================================================================== */
-/*	Standard include files.						*/
-/* ==================================================================== */
-
-#include "geo_config.h"
-#include <stdio.h>
-
-#include <math.h>
-
-#ifdef HAVE_STRING_H
-#  include <string.h>
-#endif
-#if defined(HAVE_STRINGS_H) && !defined(HAVE_STRING_H)
-#  include <strings.h>
-#endif
-#ifdef HAVE_STDLIB_H
-#  include <stdlib.h>
-#endif
-
-/**********************************************************************
- * Do we want to build as a DLL on windows?
- **********************************************************************/
-#if !defined(CPL_DLL)
-#  if defined(_WIN32) && defined(BUILD_AS_DLL)
-#    define CPL_DLL     __declspec(dllexport)
-#  else
-#    define CPL_DLL
-#  endif
-#endif
-
-/* ==================================================================== */
-/*      Other standard services.                                        */
-/* ==================================================================== */
-#ifdef __cplusplus
-#  define CPL_C_START		extern "C" {
-#  define CPL_C_END		}
-#else
-#  define CPL_C_START
-#  define CPL_C_END
-#endif
-
-#ifndef NULL
-#  define NULL	0
-#endif
-
-#ifndef FALSE
-#  define FALSE	0
-#endif
-
-#ifndef TRUE
-#  define TRUE	1
-#endif
-
-#ifndef MAX
-#  define MIN(a,b)      ((a<b) ? a : b)
-#  define MAX(a,b)      ((a>b) ? a : b)
-#endif
-
-#ifndef NULL
-#define NULL 0
-#endif
-
-#ifndef ABS
-#  define ABS(x)        ((x<0) ? (-1*(x)) : x)
-#endif
-
-#ifndef EQUAL
-#if defined(_WIN32) && !defined(__CYGWIN__)
-#  define EQUALN(a,b,n)           (strnicmp(a,b,n)==0)
-#  define EQUAL(a,b)              (stricmp(a,b)==0)
-#else
-#  define EQUALN(a,b,n)           (strncasecmp(a,b,n)==0)
-#  define EQUAL(a,b)              (strcasecmp(a,b)==0)
-#endif
-#endif
-
-/* ==================================================================== */
-/*      VSI Services (just map directly onto Standard C services.       */
-/* ==================================================================== */
-
-#define VSIFOpen	fopen
-#define VSIFClose	fclose
-#define VSIFEof		feof
-#define VSIFPrintf	fprintf
-#define VSIFPuts	fputs
-#define VSIFPutc	fputc
-#define VSIFGets	fgets
-#define VSIRewind	rewind
-#define VSIFSeek        fseek
-#define VSIFTell        ftell
-#define VSIFRead        fread
-
-#ifndef notdef
-#define VSICalloc(x,y)	_GTIFcalloc(x*y)
-#define VSIMalloc	_GTIFcalloc
-#define VSIFree	        _GTIFFree
-#define VSIRealloc      _GTIFrealloc
-#else
-#define VSICalloc(x,y)	(((char *) _GTIFcalloc(x*y+4)) + 4)
-#define VSIMalloc(x)	(((char *) _GTIFcalloc((x)+4)) + 4)
-#define VSIFree(x)      _GTIFFree(((char *) (x)) - 4)
-#define VSIRealloc(p,n) (((char *) _GTIFrealloc(((char *)p)-4,(n)+4)) + 4)
-#endif
-
-/* -------------------------------------------------------------------- */
-/*      Safe malloc() API.  Thin cover over VSI functions with fatal    */
-/*      error reporting if memory allocation fails.                     */
-/* -------------------------------------------------------------------- */
-CPL_C_START
-
-#define CPLMalloc  gtCPLMalloc
-#define CPLCalloc  gtCPLCalloc
-#define CPLRealloc gtCPLRealloc
-#define CPLStrdup  gtCPLStrdup
-
-void  *CPLMalloc( int );
-void  *CPLCalloc( int, int );
-void  *CPLRealloc( void *, int );
-char  *CPLStrdup( const char * );
-
-#define CPLFree(x)	{ if( x != NULL ) VSIFree(x); }
-
-/* -------------------------------------------------------------------- */
-/*      Read a line from a text file, and strip of CR/LF.               */
-/* -------------------------------------------------------------------- */
-
-#define CPLReadLine gtCPLReadLine
-
-const char *CPLReadLine( FILE * );
-
-/*=====================================================================
-                   Error handling functions (cpl_error.c)
- =====================================================================*/
-
-typedef enum
-{
-    CE_None = 0,
-    CE_Log = 1,
-    CE_Warning = 2,
-    CE_Failure = 3,
-    CE_Fatal = 4
-} CPLErr;
-
-#define CPLError      gtCPLError
-#define CPLErrorReset gtCPLErrorReset
-#define CPLGetLastErrorNo gtCPLGetLastErrorNo
-#define CPLGetLastErrorMsg gtCPLGetLastErrorMsg
-#define CPLSetErrorHandler gtCPLSetErrorHandler
-#define _CPLAssert    gt_CPLAssert
-
-void  CPLError(CPLErr eErrClass, int err_no, const char *fmt, ...);
-void  CPLErrorReset();
-int   CPLGetLastErrorNo();
-const char  * CPLGetLastErrorMsg();
-void  CPLSetErrorHandler(void(*pfnErrorHandler)(CPLErr,int,
-                                                       const char *));
-void  _CPLAssert( const char *, const char *, int );
-
-#ifdef DEBUG
-#  define CPLAssert(expr)  ((expr) ? (void)(0) : _CPLAssert(#expr,__FILE__,__LINE__))
-#else
-#  define CPLAssert(expr)
-#endif
-
-CPL_C_END
-
-/* ==================================================================== */
-/*      Well known error codes.                                         */
-/* ==================================================================== */
-
-#define CPLE_AppDefined			1
-#define CPLE_OutOfMemory		2
-#define CPLE_FileIO			3
-#define CPLE_OpenFailed			4
-#define CPLE_IllegalArg			5
-#define CPLE_NotSupported		6
-#define CPLE_AssertionFailed		7
-#define CPLE_NoWriteAccess		8
-
-/*=====================================================================
-                   Stringlist functions (strlist.c)
- =====================================================================*/
-CPL_C_START
-
-#define CSLAddString gtCSLAddString
-#define CSLCount     gtCSLCount
-#define CSLGetField  gtCSLGetField
-#define CSLDestroy   gtCSLDestroy
-#define CSLDuplicate gtCSLDuplicate
-#define CSLTokenizeString gtCSLTokenizeString
-#define CSLTokenizeStringComplex gtCSLTokenizeStringComplex
-
-char    **CSLAddString(char **papszStrList, const char *pszNewString);
-int     CSLCount(char **papszStrList);
-const char *CSLGetField( char **, int );
-void    CSLDestroy(char **papszStrList);
-char    **CSLDuplicate(char **papszStrList);
-
-char    **CSLTokenizeString(const char *pszString );
-char    **CSLTokenizeStringComplex(const char *pszString,
-                                   const char *pszDelimiter,
-                                   int bHonourStrings, int bAllowEmptyTokens );
-
-/* ==================================================================== */
-/*      .csv file related functions (from cpl_csv.c)                    */
-/* ==================================================================== */
-
-typedef enum {
-    CC_ExactString,
-    CC_ApproxString,
-    CC_Integer
-} CSVCompareCriteria;
-
-#define CSVFilename gtCSVFilename
-#define CSVReadParseLine gtCSVReadParseLine
-#define CSVScanLines gtCSVScanLines
-#define CSVScanFile gtCSVScanFile
-#define CSVScanFileByName gtCSVScanFileByName
-#define CSVGetFieldId gtCSVGetFieldId
-#define CSVDeaccess gtCSVDeaccess
-#define CSVGetField gtCSVGetField
-#define SetCSVFilenameHook gtSetCSVFilenameHook
-#define CSVGetFileFieldId gtCSVGetFileFieldId
-
-const char  *CSVFilename( const char * );
-
-char  **CSVReadParseLine( FILE * );
-char  **CSVScanLines( FILE *, int, const char *, CSVCompareCriteria );
-char  **CSVScanFile( const char *, int, const char *,
-                            CSVCompareCriteria );
-char  **CSVScanFileByName( const char *, const char *, const char *,
-                                  CSVCompareCriteria );
-int  CSVGetFieldId( FILE *, const char * );
-int  CSVGetFileFieldId( const char *, const char * );
-
-void  CSVDeaccess( const char * );
-
-const char  *CSVGetField( const char *, const char *, const char *,
-                                 CSVCompareCriteria, const char * );
-
-void CPL_DLL SetCSVFilenameHook( const char *(*)(const char *) );
-
-CPL_C_END
-
-#endif /* ndef CPL_SERV_H_INCLUDED */
diff --git a/src/tiff/csv/README b/src/tiff/csv/README
deleted file mode 100644
index 41e83fd..0000000
--- a/src/tiff/csv/README
+++ /dev/null
@@ -1,38 +0,0 @@
-	EPSG Tables
-	===========
-
-The .csv files in this directory are an extract of tables from the EPSG
-projection database in CSV (comma separated value) format.  These same
-files come with the source distribution in the libgeotiff/csv directory.
-Information and source to extract these tables from the EPSG database
-can be found in the source distribution libgeotiff/csv/odbc2csv directory.
-
-Detailed information on the EPSG database can be found at:
-
-  http://www.petroconsultants.com/products/geodetic.htm
-
-
-The tables containing the basic data are: 
-
- compd_cs:	compound coordinate system data. 
- ellipsoid:	ellipsoid data. 
- ellips_alias:	ellipsoid alias data. 
- geod_datum:	geodetic datum data. 
- gdatum_alias:	geodetic datum alias data. 
- geod_trf:	geodetic transformation data. 
- horiz_cs:	geographic and projected coordinate system data (GCS/PCS codes)
- p_meridian:	prime meridian data. 
- trf_method:	transformation method and parameter data. 
- trf_nonpolynomial: projection and 3- or 7-parameter geodetic
-                    transformation parameter values. 
- trf_path:	geodetic transformation path data. 
- uom_angle:	angle unit data. 
- uom_an_alias:	angle unit alias data: currently not populated. 
- uom_length:	length unit data. 
- uom_le_alias:	length unit alias data. 
- uom_scale:	scale unit data. 
- uom_sc_alias:	scale unit alias data: currently not populated. 
- vert_datum:	vertical datum data. 
- vert_cs:	vertical coordinate system data. 
- vert_offset:	vertical coordinate system transformation data.
-
diff --git a/src/tiff/csv/alias.csv b/src/tiff/csv/alias.csv
deleted file mode 100644
index 8f581dd..0000000
--- a/src/tiff/csv/alias.csv
+++ /dev/null
@@ -1,2001 +0,0 @@
-"ALIAS CODE","OBJECT_TABLE_NAME","OBJECT_CODE","NAMING_SYSTEM_CODE","ALIAS","REMARKS"
-1,Coordinate_Operation,1274,7300,LKS94(ETRF89) to WGS 84 (1),
-4,Datum,6258,7300,ETRF89,
-5,Ellipsoid,7013,7300,Modified Clarke 1880 (South Africa),The Clarke 1880 (Arc) figure is one of several modifications to the original definition.  The name Clarke Modified is usually taken to be the RGS modification.  But in southern Africa it is usually taken to be the Arc or Cape modification.
-6,Coordinate_Operation,8570,7300,ED50 to EUREF89 (2),
-7,Unit of Measure,9001,7300,meter,
-8,Unit of Measure,9036,7300,kilometer,Spelling used in US
-9,Coordinate Reference System,21100,7300,Genuk / NEIEZ,
-10,Coordinate_Operation,1036,7301,OSTN97,
-11,Coordinate_Operation,1123,7301,Genuk to WGS 84 (1),
-12,Coordinate_Operation,1149,7301,ETRF89 to WGS 84 (1),
-13,Coordinate_Operation,1273,7301,HD72 to ETRF89 (1),
-14,Coordinate_Operation,1309,7301,DHDN to ETRF89 (1),
-15,Coordinate_Operation,1310,7301,Pulkovo 1942 to ETRF89 (1),
-16,Coordinate_Operation,1311,7301,ED50 to WGS 84 (18),
-17,Coordinate_Operation,1331,7301,EST92 to ETRF89 (1),
-19,Coordinate_Operation,1513,7301,Final Datum 1958 to WGS 84 (1),
-20,Coordinate_Operation,1571,7301,Amersfoort to ETRF89 (1),
-21,Coordinate_Operation,1584,7301,Levant to WGS 72BE (1),
-22,Coordinate_Operation,1585,7301,Levant to WGS 84 (2),
-23,Coordinate_Operation,1586,7301,Levant to WGS 84 (3),
-24,Coordinate_Operation,1587,7301,Levant to WGS 84 (4),
-26,Coordinate_Operation,1589,7301,ED50 to ETRF89 (3),
-28,Coordinate_Operation,1611,7301,IRENET95 to ETRF89 (1),
-29,Coordinate Reference System,2140,7301,NAD83(CSRS98) / SCoPQ zone 3,
-30,Coordinate Reference System,2141,7301,NAD83(CSRS98) / SCoPQ zone 4,
-31,Coordinate Reference System,2142,7301,NAD83(CSRS98) / SCoPQ zone 5,
-32,Coordinate Reference System,2143,7301,NAD83(CSRS98) / SCoPQ zone 6,
-33,Coordinate Reference System,2144,7301,NAD83(CSRS98) / SCoPQ zone 7,
-34,Coordinate Reference System,2145,7301,NAD83(CSRS98) / SCoPQ zone 8,
-35,Coordinate Reference System,2146,7301,NAD83(CSRS98) / SCoPQ zone 9,
-36,Coordinate Reference System,2147,7301,NAD83(CSRS98) / SCoPQ zone 10,
-37,Coordinate Reference System,2159,7301,Sierra Leone 1924 / Peninsular Grid,
-38,Coordinate Reference System,2291,7301,NAD83 / PEI Stereo,
-39,Coordinate Reference System,3200,7301,Final Datum 1958 / Iraq zone,
-40,Coordinate Reference System,4132,7301,Final Datum 1958 (Iran),
-41,Coordinate Reference System,4140,7301,NAD83(CSRS),
-42,Coordinate Reference System,4172,7301,National Geodetic System [Argentina],see http://www.igm.gov.ar/posgar.html
-43,Coordinate Reference System,4211,7301,Genuk,
-44,Datum,4218,7301,Bogota,
-45,Coordinate Reference System,4227,7301,Levant,
-46,Coordinate Reference System,4258,7301,ETRF89,
-47,Coordinate Reference System,4272,7301,GD49,
-48,Coordinate Reference System,4813,7301,Genuk (Jakarta),
-49,Datum,5104,7301,Huang Hai 1956,
-50,Datum,6120,7301,Old Greek,"Adjective ""Old"" applied since introduction of GGRS87 (code 6121)"
-51,Datum,6125,7301,Samboja P2 exc T9,
-52,Datum,6160,7301,Quini-Huao,
-53,Datum,6174,7301,Sierra Leone Peninsular 1924,
-54,Datum,6211,7301,Genuk,
-55,Datum,6218,7301,Bogota,
-56,Datum,6222,7301,South Africa,
-57,Datum,6227,7301,Levant,
-58,Datum,6258,7301,European Terrestrial Reference Frame 1989,
-59,Datum,6269,7301,NAD83 (1986),
-60,Datum,6272,7301,GD49,
-61,Datum,6308,7301,Rikets koordinatsystem 1938,
-62,Ellipsoid,7012,7301,Clarke Modified 1880,The Clarke 1880 (RGS) figure is one of several modifications to the original definition.  The name Clarke Modified is usually taken to be the RGS modification.
-63,Ellipsoid,7013,7301,Clarke 1880 (Cape),
-64,Ellipsoid,7019,7301,International 1979,Adopted by IUGG 1979 Canberra as the Geodetic Reference Spheroid of 1980 (GRS 1980).
-65,Ellipsoid,7022,7301,Hayford 1909,Described as a=6378388 m. and b=6356909 m. from which 1/f derived to be 296.95926...   The figure was adopted as the International ellipsoid in 1924 but with 1/f taken as 297 exactly from which b is derved as 6356911.946 m.
-66,Ellipsoid,7029,7301,McCaw 1924,
-67,Ellipsoid,7030,7301,WGS84,
-68,Ellipsoid,7036,7301,International 1967,More usually known as GRS 1967 to avoid confusion with the International 1924 figure.
-69,Ellipsoid,7043,7301,NWL 10D,Used by Transit Broadcast Ephemeris before 1989. Also referred to as WGS72 spheroid.
-70,Coordinate_Operation,8568,7301,Levant to WGS 84 (1),
-71,Coordinate_Operation,8570,7301,ED50 to ETRF89 (2),
-72,Coordinate_Operation Parameter,8602,7301,Longitude rotation,
-73,Prime Meridian,8913,7301,Kristiania,
-74,Unit of Measure,9001,7301,International metre,
-75,Unit of Measure,9002,7301,international foot,
-76,Unit of Measure,9003,7301,American foot,
-77,Unit of Measure,9005,7301,South African geodetic foot,Not to be confused with the Cape foot.
-78,Unit of Measure,9030,7301,International nautical mile,
-79,Unit of Measure,9039,7301,link (Clarke's ratio),
-80,Unit of Measure,9040,7301,yard,
-81,Unit of Measure,9041,7301,foot,
-82,Unit of Measure,9042,7301,chain,
-83,Unit of Measure,9043,7301,link,
-84,Unit of Measure,9050,7301,yard,
-85,Unit of Measure,9051,7301,foot,
-86,Unit of Measure,9052,7301,chain,
-87,Unit of Measure,9053,7301,link,
-88,Unit of Measure,9060,7301,yard,
-89,Unit of Measure,9061,7301,foot,
-90,Unit of Measure,9062,7301,chain,
-91,Unit of Measure,9063,7301,link,
-92,Unit of Measure,9070,7301,foot,
-93,Unit of Measure,9080,7301,Indian geodetic foot,
-94,Unit of Measure,9081,7301,Indian geodetic foot,
-95,Unit of Measure,9084,7301,yard,= 3 Indian feet.
-96,Unit of Measure,9085,7301,yard,= 3 Indian feet.
-97,Unit of Measure,9094,7301,foot,
-98,Unit of Measure,9114,7301,mil,"Alias also applies to other variations of a mil, especially mil_6300 and mil_6000."
-100,Coordinate_Operation,17001,7301,Ghana TM,
-101,Coordinate_Operation,17901,7301,Mount Eden Circuit 1949,
-102,Coordinate_Operation,17902,7301,Bay of Plenty Circuit 1949,
-103,Coordinate_Operation,17903,7301,Poverty Bay Circuit 1949,
-104,Coordinate_Operation,17904,7301,Hawkes Bay Circuit 1949,
-105,Coordinate_Operation,17905,7301,Taranaki Circuit 1949,
-106,Coordinate_Operation,17906,7301,Tuhirangi Circuit 1949,
-107,Coordinate_Operation,17907,7301,Wanganui Circuit 1949,
-108,Coordinate_Operation,17908,7301,Wairarapa Circuit 1949,
-109,Coordinate_Operation,17909,7301,Wellington Circuit 1949,
-110,Coordinate_Operation,17910,7301,Collingwood Circuit 1949,
-111,Coordinate_Operation,17911,7301,Nelson Circuit 1949,
-112,Coordinate_Operation,17912,7301,Karamea Circuit 1949,
-113,Coordinate_Operation,17913,7301,Buller Circuit 1949,
-114,Coordinate_Operation,17914,7301,Grey Circuit 1949,
-115,Coordinate_Operation,17915,7301,Amuri Circuit 1949,
-116,Coordinate_Operation,17916,7301,Marlborough Circuit 1949,
-117,Coordinate_Operation,17917,7301,Hokitika Circuit 1949,
-118,Coordinate_Operation,17918,7301,Okarito Circuit 1949,
-119,Coordinate_Operation,17919,7301,Jacksons Bay Circuit 1949,
-120,Coordinate_Operation,17920,7301,Mount Pleasant Circuit 1949,
-121,Coordinate_Operation,17921,7301,Gawler Circuit 1949,
-122,Coordinate_Operation,17922,7301,Timaru Circuit 1949,
-123,Coordinate_Operation,17923,7301,Lindis Peak Circuit 1949,
-124,Coordinate_Operation,17924,7301,Mount Nicholas Circuit 1949,
-125,Coordinate_Operation,17925,7301,Mount York Circuit 1949,
-126,Coordinate_Operation,17926,7301,Observation Point Circuit 1949,
-127,Coordinate_Operation,17927,7301,North Taieri Circuit 1949,
-128,Coordinate_Operation,17928,7301,Bluff Circuit 1949,
-129,Coordinate_Operation,19906,7301,IOEPC Lambert,Sometimes seen defined with 2 standard parallels.
-130,Coordinate_Operation,19959,7301,Gold Coast Grid,
-131,Coordinate_Operation,19963,7301,Sierra Leone Peninsula Grid,
-132,Coordinate Reference System,21100,7301,Genuk (Jakarta) / NEIEZ,
-133,Coordinate Reference System,21148,7301,Genuk / UTM zone 48S,
-134,Coordinate Reference System,21150,7301,Genuk / UTM zone 50S,
-135,Coordinate Reference System,22700,7301,Levant / Levant Zone,
-136,Coordinate Reference System,22770,7301,Levant / Syria Lambert,
-137,Coordinate Reference System,22780,7301,Levant / Levant Stereographic,
-138,Coordinate Reference System,25828,7301,ETRF89 / UTM zone 28N,
-139,Coordinate Reference System,25829,7301,ETRF89 / UTM zone 29N,
-140,Coordinate Reference System,25830,7301,ETRF89 / UTM zone 30N,
-141,Coordinate Reference System,25831,7301,ETRF89 / UTM zone 31N,
-142,Coordinate Reference System,25832,7301,ETRF89 / UTM zone 32N,
-143,Coordinate Reference System,25833,7301,ETRF89 / UTM zone 33N,
-144,Coordinate Reference System,25834,7301,ETRF89 / UTM zone 34N,
-145,Coordinate Reference System,25835,7301,ETRF89 / UTM zone 35N,
-146,Coordinate Reference System,25836,7301,ETRF89 / UTM zone 36N,
-147,Coordinate Reference System,25837,7301,ETRF89 / UTM zone 37N,
-148,Coordinate Reference System,25838,7301,ETRF89 / UTM zone 38N,
-149,Coordinate Reference System,25884,7301,ETRF89 / TM Baltic93,
-150,Coordinate Reference System,27258,7301,GD49 / UTM zone 58,
-151,Coordinate Reference System,27259,7301,GD49 / UTM zone 59,
-152,Coordinate Reference System,27260,7301,GD49 / UTM zone 60,
-153,Coordinate Reference System,27291,7301,GD49 / North Island Grid,
-154,Coordinate Reference System,27292,7301,GD49 / South Island Grid,
-155,Coordinate Reference System,30592,7301,Nord Sahara 1959/Voirol Unifie S Algerie,
-156,Coordinate Reference System,30791,7301,Nord Sahara 1959 / Lambert Nord Voirol Unifie 1960,Voirol Unifie 1960 is NOT a geodetic datum nor GeogCRS.  It is two Lambert projected coordinate reference systems based on Nord Sahara 1959 Datum. See also code 30792.
-157,Coordinate Reference System,30792,7301,Nord Sahara 1959 / Lambert Sud Voirol Unifie 1960,Voirol Unifie 1960 is NOT a geodetic datum nor GeogCRS.  It is two Lambert projected coordinate reference systems based on Nord Sahara 1959 Datum. See also code 30791.
-158,Coordinate Reference System,31170,7301,Zanderij / Surinam Old TM,Old country name spelling.
-159,Coordinate Reference System,31171,7301,Zanderij / Surinam TM,Old spelling for country name.
-160,Coordinate Reference System,31300,7301,Belge Lambert 72,
-161,Coordinate_Operation,1026,7302,Madrid to ED50 (1),
-162,Coordinate_Operation,1027,7302,Madrid to ED50 (2),
-163,Coordinate_Operation,1028,7302,Madrid to ED50 (3),
-164,Coordinate_Operation,1029,7302,RD New to ED50/UTM31 (1),
-165,Coordinate_Operation,1030,7302,ED50/UTM31 to RD New (1),
-166,Coordinate_Operation,1031,7302,RD New to ED50/UTM31 (2),
-167,Coordinate_Operation,1032,7302,ED50/UTM31 to RD New (2),
-168,Coordinate_Operation,1274,7302,CS42 to LKS94 (1),
-169,Coordinate_Operation,1283,7302,LKS94 to WGS 84 (1),
-170,Coordinate Reference System,2000,7302,Anguilla 1957 / BWI Grid,
-171,Coordinate Reference System,2001,7302,Antigua 1943 / BWI Grid,
-172,Coordinate Reference System,2002,7302,Dominica 1945 / BWI Grid,
-173,Coordinate Reference System,2003,7302,Grenada 1953 / BWI Grid,
-174,Coordinate Reference System,2004,7302,Montserrat 58 / BWI Grid,
-175,Coordinate Reference System,2005,7302,St Kitts 1955 / BWI Grid,
-176,Coordinate Reference System,2006,7302,St Lucia 1955 / BWI Grid,
-177,Coordinate Reference System,2007,7302,St Vincent 45 / BWI Grid,
-178,Coordinate Reference System,2008,7302,CGQ77 / SCoPQ zone 2,
-179,Coordinate Reference System,2009,7302,CGQ77 / SCoPQ zone 3,
-180,Coordinate Reference System,2010,7302,CGQ77 / SCoPQ zone 4,
-181,Coordinate Reference System,2011,7302,CGQ77 / SCoPQ zone 5,
-182,Coordinate Reference System,2012,7302,CGQ77 / SCoPQ zone 6,
-183,Coordinate Reference System,2013,7302,CGQ77 / SCoPQ zone 7,
-184,Coordinate Reference System,2014,7302,CGQ77 / SCoPQ zone 8,
-185,Coordinate Reference System,2015,7302,CGQ77 / SCoPQ zone 9,
-186,Coordinate Reference System,2016,7302,CGQ77 / SCoPQ zone 10,
-187,Coordinate Reference System,2036,7302,NAD83(CSRS) / NB Stereo,
-188,Coordinate Reference System,2037,7302,NAD83(CSRS) / UTM 19N,
-189,Coordinate Reference System,2038,7302,NAD83(CSRS) / UTM 20N,
-190,Coordinate Reference System,2039,7302,Israeli TM Grid,
-191,Coordinate Reference System,2040,7302,Locodjo 65 / UTM 30N,
-192,Coordinate Reference System,2041,7302,Abidjan 87 / UTM 30N,
-193,Coordinate Reference System,2042,7302,Locodjo 65 / UTM 29N,
-194,Coordinate Reference System,2043,7302,Abidjan 87 / UTM 29N,
-195,Coordinate Reference System,2044,7302,Hanoi 72 / Gauss zone 18,
-196,Coordinate Reference System,2045,7302,Hanoi 72 / Gauss zone 19,
-197,Coordinate Reference System,2046,7302,New S African CS zone 15,
-198,Coordinate Reference System,2047,7302,New S African CS zone 17,
-199,Coordinate Reference System,2048,7302,New S African CS zone 19,
-200,Coordinate Reference System,2049,7302,New S African CS zone 21,
-201,Coordinate Reference System,2050,7302,New S African CS zone 23,
-202,Coordinate Reference System,2051,7302,New S African CS zone 25,
-203,Coordinate Reference System,2052,7302,New S African CS zone 27,
-204,Coordinate Reference System,2053,7302,New S African CS zone 29,
-205,Coordinate Reference System,2054,7302,New S African CS zone 31,
-206,Coordinate Reference System,2055,7302,New S African CS zone 33,
-207,Coordinate Reference System,2056,7302,LV95,
-208,Coordinate Reference System,2066,7302,Mount Dillon / Tobago,
-209,Coordinate Reference System,2067,7302,Naparima 1955 / UTM 20N,
-210,Coordinate Reference System,2081,7302,Chos Malal / Argentina 2,
-211,Coordinate Reference System,2082,7302,Pampa d Castillo / Arg 2,
-212,Coordinate Reference System,2083,7302,Hito XVIII / Argentina 2,
-213,Coordinate Reference System,2084,7302,Hito XVIII / UTM 19S,
-214,Coordinate Reference System,2089,7302,Yemen NGN96 / UTM 38N,
-215,Coordinate Reference System,2090,7302,Yemen NGN96 / UTM 39N,
-216,Coordinate Reference System,2091,7302,S Yemen / Gauss zone 8,
-217,Coordinate Reference System,2092,7302,S Yemen / Gauss zone 9,
-218,Coordinate Reference System,2096,7302,Korean 1985 / East Belt,
-219,Coordinate Reference System,2097,7302,Korean 1985 / Cen. Belt,
-220,Coordinate Reference System,2098,7302,Korean 1985 / West Belt,
-221,Coordinate Reference System,2099,7302,Qatar Plane CS,
-222,Coordinate Reference System,2136,7301,Accra / Gold Coast Grid,
-223,Coordinate Reference System,2137,7301,Accra / Ghana TM,
-224,Coordinate Reference System,2157,7302,IRENET95 / ITM,
-225,Coordinate Reference System,2200,7302,ATS77 / NB Stereographic,
-226,Coordinate Reference System,2290,7302,ATS77 / PEI Stereo,
-227,Coordinate Reference System,2291,7302,NAD83(CSRS) / PEI Stereo,
-228,Coordinate Reference System,2294,7302,ATS77 / MTM NS zone 4,
-229,Coordinate Reference System,2295,7302,ATS77 / MTM NS zone 5,
-230,Coordinate Reference System,2393,7302,KKJ / Finland zone 3,
-231,Coordinate Reference System,2600,7302,LKS94,
-232,Coordinate Reference System,3561,7302,Old Hawaiian / SP zone 1,
-233,Coordinate Reference System,3562,7302,Old Hawaiian / SP zone 2,
-234,Coordinate Reference System,3563,7302,Old Hawaiian / SP zone 3,
-235,Coordinate Reference System,3564,7302,Old Hawaiian / SP zone 4,
-236,Coordinate Reference System,3565,7302,Old Hawaiian / SP zone 5,
-237,Coordinate Reference System,3991,7302,Puerto Rico SPCS 27,
-238,Coordinate Reference System,4134,7302,PSD93,
-239,Coordinate Reference System,4215,7302,BD 50,
-240,Coordinate Reference System,4268,7302,NAD Michigan,
-241,Coordinate Reference System,4313,7302,BD 72,
-242,Coordinate Reference System,4609,7302,CGQ77,
-243,Coordinate Reference System,4809,7302,BD 50 (Brussels),
-244,Datum,5100,7302,msl,
-245,Datum,5101,7302,ODN,
-246,Datum,5102,7302,NGVD29,
-247,Datum,5103,7302,NAVD88,
-248,Datum,5104,7302,Yellow Sea,
-249,Datum,5105,7302,Baltic,
-250,Datum,5106,7302,Caspian,
-251,Datum,5107,7302,NGF,
-252,Datum,5109,7302,NAP,
-253,Datum,5111,7302,AHD,
-254,Datum,5112,7302,AHD (Tasmania),
-255,Datum,5114,7302,CVD28,
-256,Datum,5115,7302,Piraeus86,
-257,Datum,5116,7302,N60,
-258,Datum,5117,7302,RH70,
-259,Datum,5118,7302,NGF - Lallemand,
-260,Datum,5119,7302,NGF - IGN69,
-261,Datum,5120,7302,NGF - IGN78,
-262,Datum,5122,7302,JapanVD,
-263,Datum,5123,7302,PHD93,
-264,Datum,5127,7302,LN02,
-265,Datum,5128,7302,LHN95,
-266,Datum,5129,7302,EVRF2000,
-267,Coordinate Reference System,5701,7302,ODN,
-268,Coordinate Reference System,5702,7302,NGVD29,
-269,Coordinate Reference System,5703,7302,NAVD88,
-270,Coordinate Reference System,5709,7302,NAP,
-271,Coordinate Reference System,5711,7302,AHD,
-272,Coordinate Reference System,5712,7302,AHD (Tasmania),
-273,Coordinate Reference System,5713,7302,CVD28,
-274,Coordinate Reference System,5714,7302,msl height,
-275,Coordinate Reference System,5715,7302,msl depth,
-276,Coordinate Reference System,5723,7302,Japan Levelling Datum,
-277,Coordinate Reference System,5724,7302,PHD93,
-278,Coordinate Reference System,5728,7302,LN02,
-279,Coordinate Reference System,5729,7302,LHN95,
-280,Coordinate Reference System,5730,7302,EVRS2000,
-281,Datum,6121,7302,GGRS87,
-282,Datum,6122,7302,ATS77,
-283,Datum,6123,7302,KKJ,
-284,Datum,6124,7302,RT90,
-285,Datum,6126,7302,LKS94 (ETRS89),
-286,Datum,6130,7302,Moznet,
-287,Datum,6132,7302,FD58,
-288,Datum,6133,7302,EST92,
-289,Datum,6134,7302,PSD93,
-290,Datum,6140,7302,NAD83(CSRS98),
-291,Datum,6151,7302,CHTRF95,
-292,Datum,6152,7302,NAD83(HARN),
-293,Datum,6154,7302,ED50(ED77),
-294,Datum,6156,7302,S-JTSK,
-295,Datum,6159,7302,ELD79,
-296,Datum,6163,7302,YNGN96,
-297,Datum,6170,7302,SIRGAS,
-298,Datum,6171,7302,RGF93,
-299,Datum,6172,7302,POSGAR,
-300,Datum,6202,7302,AGD66,
-301,Datum,6203,7302,AGD84,
-302,Datum,6204,7302,Ain el Abd,
-303,Datum,6215,7302,Belge 1950,
-304,Datum,6230,7302,ED50,
-305,Datum,6231,7302,ED87,
-306,Datum,6237,7302,HD72,
-307,Datum,6238,7302,ID74,
-308,Datum,6242,7302,JAD69,
-309,Datum,6246,7302,KOC,
-310,Datum,6248,7302,PSAD56,
-311,Datum,6258,7302,ETRS89,
-312,Datum,6267,7302,NAD27,
-313,Datum,6269,7302,NAD83,
-314,Datum,6272,7302,NZGD49,
-315,Datum,6275,7302,NTF,
-316,Datum,6278,7302,OSGB70,
-317,Datum,6279,7302,OS(SN)80,
-318,Datum,6280,7302,Padang,
-319,Datum,6283,7302,GDA94,
-320,Datum,6291,7302,SAD69,
-321,Datum,6297,7302,Tananarive,
-322,Datum,6303,7302,TC(1948),
-323,Datum,6305,7302,Voirol Unifie,
-324,Datum,6308,7302,RT38,
-325,Datum,6312,7302,MGI,
-326,Datum,6313,7302,Belge 1972,
-327,Datum,6314,7302,DHDN,
-328,Datum,6318,7302,NGN,
-329,Datum,6319,7302,KUDAMS,
-330,Datum,6322,7302,WGS 72,
-331,Datum,6324,7302,WGS 72BE,
-332,Datum,6326,7302,WGS 84,
-333,Datum,6608,7302,NAD27(76),
-334,Datum,6609,7302,CGQ77,
-335,Datum,6901,7302,ATF (Paris),
-336,Datum,6902,7302,NDG (Paris),
-337,Ellipsoid,7003,7302,ANS,
-338,Coordinate Reference System,7401,7302,NTF / France II + Lalle,
-339,Coordinate Reference System,7402,7302,NTF / France II + IGN69,
-340,Coordinate Reference System,7403,7302,NTF / France III + IGN69,
-341,Coordinate Reference System,7405,7302,GB National Grid + ODN,
-342,Coordinate Reference System,7407,7302,NAD27 / TX_N + NGVD29,
-343,Coordinate_Operation Parameter,8663,7302,k,
-344,Unit of Measure,9001,7302,m,
-345,Unit of Measure,9002,7302,ft,
-346,Unit of Measure,9003,7302,ftUS,
-347,Unit of Measure,9005,7302,ftCla,
-348,Unit of Measure,9014,7302,f,
-349,Unit of Measure,9030,7302,NM,
-350,Unit of Measure,9031,7302,GLM,
-351,Unit of Measure,9033,7302,chUS,
-352,Unit of Measure,9034,7302,lkUS,
-353,Unit of Measure,9035,7302,miUS,
-354,Unit of Measure,9036,7302,km,
-355,Unit of Measure,9037,7302,ydCla,
-356,Unit of Measure,9038,7302,chCla,
-357,Unit of Measure,9039,7302,lkCla,
-358,Unit of Measure,9040,7302,ydSe,
-359,Unit of Measure,9041,7302,ftSe,
-360,Unit of Measure,9042,7302,chSe,
-361,Unit of Measure,9043,7302,lkSe,
-362,Unit of Measure,9050,7302,ydBnA,
-363,Unit of Measure,9051,7302,ftBnA,
-364,Unit of Measure,9052,7302,chBnA,
-365,Unit of Measure,9053,7302,lkBnA,
-366,Unit of Measure,9060,7302,ydBnB,
-367,Unit of Measure,9061,7302,ftBnB,
-368,Unit of Measure,9062,7302,chBnB,
-369,Unit of Measure,9063,7302,lkBnB,
-370,Unit of Measure,9070,7302,ftBr(65),
-371,Unit of Measure,9080,7302,ftInd,
-372,Unit of Measure,9081,7302,ftInd(37),
-373,Unit of Measure,9082,7302,ftInd(62),
-374,Unit of Measure,9083,7302,ftInd(75),
-375,Unit of Measure,9084,7302,ydInd,
-376,Unit of Measure,9085,7302,ydInd(37),
-377,Unit of Measure,9086,7302,ydInd(62),
-378,Unit of Measure,9087,7302,ydInd(75),
-379,Unit of Measure,9093,7302,mi,
-380,Unit of Measure,9094,7302,ftGC,
-381,Unit of Measure,9101,7302,rad,
-382,Unit of Measure,9102,7302,deg,
-383,Unit of Measure,9103,7302,min,
-384,Unit of Measure,9104,7302,sec,
-385,Unit of Measure,9105,7302,gr,
-386,Unit of Measure,9106,7302,g,
-387,Unit of Measure,9107,7302,DMS,
-388,Unit of Measure,9108,7302,DMSH,
-389,Unit of Measure,9109,7302,�rad,
-390,Unit of Measure,9110,7302,DDD.MMSSsss,
-391,Unit of Measure,9111,7302,DDD.MMm,
-392,Unit of Measure,9112,7302,c,
-393,Unit of Measure,9113,7302,cc,
-394,Unit of Measure,9114,7302,mil,
-395,Unit of Measure,9202,7302,ppm,
-396,Unit of Measure,9204,7302,Bin330ftUS,
-397,Unit of Measure,9205,7302,Bin165ftUS,
-398,Unit of Measure,9206,7302,Bin82.5ftUS,
-399,Unit of Measure,9207,7302,Bin37.5m,
-400,Unit of Measure,9208,7302,Bin25m,
-401,Unit of Measure,9209,7302,Bin12.5m,
-402,Unit of Measure,9210,7302,Bin6.25m,
-403,Unit of Measure,9211,7302,Bin3.125m,
-404,Coordinate_Operation Method,9633,7302,OSTN,
-405,Coordinate_Operation Method,9824,7302,UTM,
-406,Coordinate_Operation,10101,7302,Alabama East,
-407,Coordinate_Operation,10102,7302,Alabama West,
-408,Coordinate_Operation,10131,7302,Alabama East,
-409,Coordinate_Operation,10132,7302,Alabama West,
-410,Coordinate_Operation,10201,7302,Arizona East,
-411,Coordinate_Operation,10202,7302,Arizona Central,
-412,Coordinate_Operation,10203,7302,Arizona West,
-413,Coordinate_Operation,10231,7302,Arizona East,
-414,Coordinate_Operation,10232,7302,Arizona Central,
-415,Coordinate_Operation,10233,7302,Arizona West,
-416,Coordinate_Operation,10301,7302,Arkansas North,
-417,Coordinate_Operation,10302,7302,Arkansas South,
-418,Coordinate_Operation Method,9809,7301,Roussilhe,
-419,Coordinate_Operation,10331,7302,Arkansas North,
-420,Coordinate_Operation,10332,7302,Arkansas South,
-421,Coordinate_Operation,10401,7302,California zone I,
-422,Coordinate_Operation,10402,7302,California zone II,
-423,Coordinate_Operation,10403,7302,California zone III,
-424,Coordinate_Operation,10404,7302,California zone IV,
-425,Coordinate_Operation,10405,7302,California zone V,
-426,Coordinate_Operation,10406,7302,California zone VI,
-427,Coordinate_Operation,10407,7302,California zone VII,
-428,Coordinate_Operation,10431,7302,California zone 1,
-429,Coordinate_Operation,10432,7302,California zone 2,
-430,Coordinate_Operation,10433,7302,California zone 3,
-431,Coordinate_Operation,10434,7302,California zone 4,
-432,Coordinate_Operation,10435,7302,California zone 5,
-433,Coordinate_Operation,10436,7302,California zone 6,
-434,Coordinate_Operation,10501,7302,Colorado North,
-435,Coordinate_Operation,10503,7302,Colorado South,
-436,Coordinate_Operation,10531,7302,Colorado North,
-437,Coordinate_Operation,10533,7302,Colorado South,
-438,Coordinate_Operation,10600,7302,Connecticut,
-439,Coordinate_Operation,10630,7302,Connecticut,
-440,Coordinate_Operation,10700,7302,Delaware,
-441,Coordinate_Operation,10730,7302,Delaware,
-442,Coordinate_Operation,10901,7302,Florida East,
-443,Coordinate_Operation,10902,7302,Florida West,
-444,Coordinate_Operation,10903,7302,Florida North,
-445,Coordinate_Operation,10931,7302,Florida East,
-446,Coordinate_Operation,10932,7302,Florida West,
-447,Coordinate_Operation,10933,7302,Florida North,
-448,Coordinate_Operation,11001,7302,Georgia East,
-449,Coordinate_Operation,11002,7302,Georgia West,
-450,Coordinate_Operation,11031,7302,Georgia East,
-451,Coordinate_Operation,11032,7302,Georgia West,
-452,Coordinate_Operation,11101,7302,Idaho East,
-453,Coordinate_Operation,11102,7302,Idaho Central,
-454,Coordinate_Operation,11103,7302,Idaho West,
-455,Coordinate_Operation,11131,7302,Idaho East,
-456,Coordinate_Operation,11132,7302,Idaho Central,
-457,Coordinate_Operation,11133,7302,Idaho West,
-458,Coordinate_Operation,11201,7302,Illinois East,
-459,Coordinate_Operation,11202,7302,Illinois West,
-460,Coordinate_Operation,11231,7302,Illinois East,
-461,Coordinate_Operation,11232,7302,Illinois West,
-462,Coordinate_Operation,11301,7302,Indiana East,
-463,Coordinate_Operation,11302,7302,Indiana West,
-464,Coordinate_Operation,11331,7302,Indiana East,
-465,Coordinate_Operation,11332,7302,Indiana West,
-466,Coordinate_Operation,11401,7302,Iowa North,
-467,Coordinate_Operation,11402,7302,Iowa South,
-468,Coordinate_Operation,11431,7302,Iowa North,
-469,Coordinate_Operation,11432,7302,Iowa South,
-470,Coordinate_Operation,11501,7302,Kansas North,
-471,Coordinate_Operation,11502,7302,Kansas South,
-472,Coordinate_Operation,11531,7302,Kansas North,
-473,Coordinate_Operation,11532,7302,Kansas South,
-474,Coordinate_Operation,11601,7302,Kentucky North,
-475,Coordinate_Operation,11602,7302,Kentucky South,
-476,Coordinate_Operation,11631,7302,Kentucky North,
-477,Coordinate_Operation,11632,7302,Kentucky South,
-478,Coordinate_Operation,11701,7302,Louisiana North,
-479,Coordinate_Operation,11702,7302,Louisiana South,
-480,Coordinate_Operation,11731,7302,Louisiana North,
-481,Coordinate_Operation,11732,7302,Louisiana South,
-482,Coordinate_Operation,11801,7302,Maine East,
-483,Coordinate_Operation,11802,7302,Maine West,
-484,Coordinate_Operation,11831,7302,Maine East,
-485,Coordinate_Operation,11832,7302,Maine West,
-486,Coordinate_Operation,11900,7302,Maryland,
-487,Coordinate_Operation,11930,7302,Maryland,
-488,Coordinate_Operation,12001,7302,Massachusetts Mainland,
-489,Coordinate_Operation,12002,7302,Massachusetts Island,
-490,Coordinate_Operation,12031,7302,Massachusetts Mainland,
-491,Coordinate_Operation,12032,7302,Massachusetts Island,
-492,Coordinate_Operation,12101,7302,Michigan East,
-493,Coordinate_Operation,12102,7302,Michigan Old Central,
-494,Coordinate_Operation,12111,7302,Michigan North,
-495,Coordinate_Operation,12112,7302,Michigan Central,
-496,Coordinate_Operation,12113,7302,Michigan South,
-497,Coordinate_Operation,12141,7302,Michigan North,
-498,Coordinate_Operation,12142,7302,Michigan Central,
-499,Coordinate_Operation,12143,7302,Michigan South,
-500,Coordinate_Operation,12201,7302,Minnesota North,
-501,Coordinate_Operation,12202,7302,Minnesota Central,
-502,Coordinate_Operation,12203,7302,Minnesota South,
-503,Coordinate_Operation,12231,7302,Minnesota North,
-504,Coordinate_Operation,12232,7302,Minnesota Central,
-505,Coordinate_Operation,12233,7302,Minnesota South,
-506,Coordinate_Operation,12301,7302,Mississippi East,
-507,Coordinate_Operation,12302,7302,Mississippi West,
-508,Coordinate_Operation,12331,7302,Mississippi East,
-509,Coordinate_Operation,12332,7302,Mississippi West,
-510,Coordinate_Operation,12401,7302,Missouri  East,
-511,Coordinate_Operation,12402,7302,Missouri Central,
-512,Coordinate_Operation,12403,7302,Missouri West,
-513,Coordinate_Operation,12431,7302,Missouri East,
-514,Coordinate_Operation,12432,7302,Missouri Central,
-515,Coordinate_Operation,12433,7302,Missouri West,
-516,Coordinate_Operation,12501,7302,Montana North,
-517,Coordinate_Operation,12502,7302,Montana Central,
-518,Coordinate_Operation,12503,7302,Montana South,
-519,Coordinate_Operation,12530,7302,Montana,
-520,Coordinate_Operation,12601,7302,Nebraska North,
-521,Coordinate_Operation,12602,7302,Nebraska South,
-522,Coordinate_Operation,12630,7302,Nebraska,
-523,Coordinate_Operation,12701,7302,Nevada  East,
-524,Coordinate_Operation,12702,7302,Nevada Central,
-525,Coordinate_Operation,12703,7302,Nevada West,
-526,Coordinate_Operation,12731,7302,Nevada East,
-527,Coordinate_Operation,12732,7302,Nevada Central,
-528,Coordinate_Operation,12733,7302,Nevada West,
-529,Coordinate_Operation,12800,7302,New Hampshire,
-530,Coordinate_Operation,12830,7302,New Hampshire,
-531,Coordinate_Operation,12900,7302,New Jersey,
-532,Coordinate_Operation,12930,7302,New Jersey,
-533,Coordinate_Operation,13001,7302,New Mexico East,
-534,Coordinate_Operation,13002,7302,New Mexico Central,
-535,Coordinate_Operation,13003,7302,New Mexico West,
-536,Coordinate_Operation,13031,7302,New Mexico East,
-537,Coordinate_Operation,13032,7302,New Mexico Central,
-538,Coordinate_Operation,13033,7302,New Mexico West,
-539,Coordinate_Operation,13101,7302,New York East,
-540,Coordinate_Operation,13102,7302,New York Central,
-541,Coordinate_Operation,13103,7302,New York  West,
-542,Coordinate_Operation,13104,7302,New York Long Island,
-543,Coordinate_Operation,13131,7302,New York East,
-544,Coordinate_Operation,13132,7302,New York Central,
-545,Coordinate_Operation,13133,7302,New York  West,
-546,Coordinate_Operation,13134,7302,New York Long Island,
-547,Coordinate_Operation,13200,7302,North Carolina,
-548,Coordinate_Operation,13230,7302,North Carolina,
-549,Coordinate_Operation,13301,7302,North Dakota North,
-550,Coordinate_Operation,13302,7302,North Dakota South,
-551,Coordinate_Operation,13331,7302,North Dakota North,
-552,Coordinate_Operation,13332,7302,North Dakota South,
-553,Coordinate_Operation,13401,7302,Ohio North,
-554,Coordinate_Operation,13402,7302,Ohio South,
-555,Coordinate_Operation,13431,7302,Ohio North,
-556,Coordinate_Operation,13432,7302,Ohio South,
-557,Coordinate_Operation,13501,7302,Oklahoma North,
-558,Coordinate_Operation,13502,7302,Oklahoma South,
-559,Coordinate_Operation,13531,7302,Oklahoma North,
-560,Coordinate_Operation,13532,7302,Oklahoma South,
-561,Coordinate_Operation,13601,7302,Oregon North,
-562,Coordinate_Operation,13602,7302,Oregon South,
-563,Coordinate_Operation,13631,7302,Oregon North,
-564,Coordinate_Operation,13632,7302,Oregon South,
-565,Coordinate_Operation,13701,7302,Pennsylvania North,
-566,Coordinate_Operation,13702,7302,Pennsylvania South,
-567,Coordinate_Operation,13731,7302,Pennsylvania North,
-568,Coordinate_Operation,13732,7302,Pennsylvania South,
-569,Coordinate_Operation,13800,7302,Rhode Island,
-570,Coordinate_Operation,13830,7302,Rhode Island,
-571,Coordinate_Operation,13901,7302,South Carolina North,
-572,Coordinate_Operation,13902,7302,South Carolina South,
-573,Coordinate_Operation,13930,7302,South Carolina,
-574,Coordinate_Operation,14001,7302,South Dakota North,
-575,Coordinate_Operation,14002,7302,South Dakota South,
-576,Coordinate_Operation,14031,7302,South Dakota North,
-577,Coordinate_Operation,14032,7302,South Dakota South,
-578,Coordinate_Operation,14100,7302,Tennessee,
-579,Coordinate_Operation,14130,7302,Tennessee,
-580,Coordinate_Operation,14201,7302,Texas North,
-581,Coordinate_Operation,14202,7302,Texas North Central,
-582,Coordinate_Operation,14203,7302,Texas Central,
-583,Coordinate_Operation,14204,7302,Texas South Central,
-584,Coordinate_Operation,14205,7302,Texas South,
-585,Coordinate_Operation,14231,7302,Texas North,
-586,Coordinate_Operation,14232,7302,Texas North Central,
-587,Coordinate_Operation,14233,7302,Texas Central,
-588,Coordinate_Operation,14234,7302,Texas South Central,
-589,Coordinate_Operation,14235,7302,Texas South,
-590,Coordinate_Operation,14301,7302,Utah North,
-591,Coordinate_Operation,14302,7302,Utah Central,
-592,Coordinate_Operation,14303,7302,Utah South,
-593,Coordinate_Operation,14331,7302,Utah North,
-594,Coordinate_Operation,14332,7302,Utah Central,
-595,Coordinate_Operation,14333,7302,Utah South,
-596,Coordinate_Operation,14400,7302,Vermont,
-597,Coordinate_Operation,14430,7302,Vermont,
-598,Coordinate_Operation,14501,7302,Virginia North,
-599,Coordinate_Operation,14502,7302,Virginia South,
-600,Coordinate_Operation,14531,7302,Virginia North,
-601,Coordinate_Operation,14532,7302,Virginia South,
-602,Coordinate_Operation,14601,7302,Washington North,
-603,Coordinate_Operation,14602,7302,Washington South,
-604,Coordinate_Operation,14631,7302,Washington North,
-605,Coordinate_Operation,14632,7302,Washington South,
-606,Coordinate_Operation,14701,7302,West Virginia North,
-607,Coordinate_Operation,14702,7302,West Virginia South,
-608,Coordinate_Operation,14731,7302,West Virginia North,
-609,Coordinate_Operation,14732,7302,West Virginia South,
-610,Coordinate_Operation,14801,7302,Wisconsin North,
-611,Coordinate_Operation,14802,7302,Wisconsin Central,
-612,Coordinate_Operation,14803,7302,Wisconsin South,
-613,Coordinate_Operation,14831,7302,Wisconsin North,
-614,Coordinate_Operation,14832,7302,Wisconsin Central,
-615,Coordinate_Operation,14833,7302,Wisconsin South,
-616,Coordinate_Operation,14901,7302,Wyoming East,
-617,Coordinate_Operation,14902,7302,Wyoming East Central,
-618,Coordinate_Operation,14903,7302,Wyoming West Central,
-619,Coordinate_Operation,14904,7302,Wyoming West,
-620,Coordinate_Operation,14931,7302,Wyoming East,
-621,Coordinate_Operation,14932,7302,Wyoming East Central,
-622,Coordinate_Operation,14933,7302,Wyoming West Central,
-623,Coordinate_Operation,14934,7302,Wyoming West,
-624,Coordinate_Operation,15001,7302,Alaska zone 1,
-625,Coordinate_Operation,15002,7302,Alaska zone 2,
-626,Coordinate_Operation,15003,7302,Alaska zone 3,
-627,Coordinate_Operation,15004,7302,Alaska zone 4,
-628,Coordinate_Operation,15005,7302,Alaska zone 5,
-629,Coordinate_Operation,15006,7302,Alaska zone 6,
-630,Coordinate_Operation,15007,7302,Alaska zone 7,
-631,Coordinate_Operation,15008,7302,Alaska zone 8,
-632,Coordinate_Operation,15009,7302,Alaska zone 9,
-633,Coordinate_Operation,15010,7302,Alaska zone 10,
-634,Coordinate_Operation,15031,7302,Alaska zone 1,
-635,Coordinate_Operation,15032,7302,Alaska zone 2,
-636,Coordinate_Operation,15033,7302,Alaska zone 3,
-637,Coordinate_Operation,15034,7302,Alaska zone 4,
-638,Coordinate_Operation,15035,7302,Alaska zone 5,
-639,Coordinate_Operation,15036,7302,Alaska zone 6,
-640,Coordinate_Operation,15037,7302,Alaska zone 7,
-641,Coordinate_Operation,15038,7302,Alaska zone 8,
-642,Coordinate_Operation,15039,7302,Alaska zone 9,
-643,Coordinate_Operation,15040,7302,Alaska zone 10,
-644,Coordinate_Operation,15101,7302,Hawaii  zone 1,
-645,Coordinate_Operation,15102,7302,Hawaii  zone 2,
-646,Coordinate_Operation,15103,7302,Hawaii  zone 3,
-647,Coordinate_Operation,15104,7302,Hawaii  zone 4,
-648,Coordinate_Operation,15105,7302,Hawaii  zone 5,
-649,Coordinate_Operation,15131,7302,Hawaii zone 1,
-650,Coordinate_Operation,15132,7302,Hawaii zone 2,
-651,Coordinate_Operation,15133,7302,Hawaii zone 3,
-652,Coordinate_Operation,15134,7302,Hawaii zone 4,
-653,Coordinate_Operation,15135,7302,Hawaii zone 5,
-654,Coordinate_Operation,15201,7302,Puerto Rico,
-655,Coordinate_Operation,15202,7302,St. Croix,
-656,Coordinate_Operation,15230,7302,Puerto Rico & Virgin Is.,
-657,Coordinate_Operation,15914,7302,BLM 14N (ftUS),
-658,Coordinate_Operation,15915,7302,BLM 15N (ftUS),
-659,Coordinate_Operation,15916,7302,BLM 16N (ftUS),
-660,Coordinate_Operation,15917,7302,BLM 17N (ftUS),
-661,Coordinate_Operation,16061,7302,UPS North,
-662,Coordinate_Operation,16062,7302,UPS South,
-663,Coordinate_Operation,16261,7302,3-degree Gauss zone 1,
-664,Coordinate_Operation,16262,7302,3-degree Gauss zone 2,
-665,Coordinate_Operation,16263,7302,3-degree Gauss zone 3,
-666,Coordinate_Operation,16264,7302,3-degree Gauss zone 4,
-667,Coordinate_Operation,16265,7302,3-degree Gauss zone 5,
-668,Coordinate_Operation,16266,7302,3-degree Gauss zone 6,
-669,Coordinate_Operation,16267,7302,3-degree Gauss zone 7,
-670,Coordinate_Operation,16268,7302,3-degree Gauss zone 8,
-671,Coordinate_Operation,16361,7302,3-deg Gauss-Kruger 3E,
-672,Coordinate_Operation,16362,7302,3-deg Gauss-Kruger 6E,
-673,Coordinate_Operation,16363,7302,3-deg Gauss-Kruger 9E,
-674,Coordinate_Operation,16364,7302,3-deg Gauss-Kruger 12E,
-675,Coordinate_Operation,16365,7302,3-deg Gauss-Kruger 15E,
-676,Coordinate_Operation,16366,7302,3-deg Gauss-Kruger 18E,
-677,Coordinate_Operation,16367,7302,3-deg Gauss-Kruger 21E,
-678,Coordinate_Operation,16368,7302,3-deg Gauss-Kruger 24E,
-679,Coordinate_Operation,17348,7302,MGA zone 48,
-680,Coordinate_Operation,17349,7302,MGA zone 49,
-681,Coordinate_Operation,17350,7302,MGA zone 50,
-682,Coordinate_Operation,17351,7302,MGA zone 51,
-683,Coordinate_Operation,17352,7302,MGA zone 52,
-684,Coordinate_Operation,17353,7302,MGA zone 53,
-685,Coordinate_Operation,17354,7302,MGA zone 54,
-686,Coordinate_Operation,17355,7302,MGA zone 55,
-687,Coordinate_Operation,17356,7302,MGA zone 56,
-688,Coordinate_Operation,17357,7302,MGA zone 57,
-689,Coordinate_Operation,17358,7302,MGA zone 58,
-690,Coordinate_Operation,17448,7302,AMG zone 48,
-691,Coordinate_Operation,17449,7302,AMG zone 49,
-692,Coordinate_Operation,17450,7302,AMG zone 50,
-693,Coordinate_Operation,17451,7302,AMG zone 51,
-694,Coordinate_Operation,17452,7302,AMG zone 52,
-695,Coordinate_Operation,17453,7302,AMG zone 53,
-696,Coordinate_Operation,17454,7302,AMG zone 54,
-697,Coordinate_Operation,17455,7302,AMG zone 55,
-698,Coordinate_Operation,17456,7302,AMG zone 56,
-699,Coordinate_Operation,17457,7302,AMG zone 57,
-700,Coordinate_Operation,17458,7302,AMG zone 58,
-701,Coordinate_Operation,17515,7302,S. African Grid zone 15,
-702,Coordinate_Operation,17517,7302,S. African Grid zone 17,
-703,Coordinate_Operation,17519,7302,S. African Grid zone 19,
-704,Coordinate_Operation,17521,7302,S. African Grid zone 21,
-705,Coordinate_Operation,17523,7302,S. African Grid zone 23,
-706,Coordinate_Operation,17525,7302,S. African Grid zone 25,
-707,Coordinate_Operation,17527,7302,S. African Grid zone 27,
-708,Coordinate_Operation,17529,7302,S. African Grid zone 29,
-709,Coordinate_Operation,17531,7302,S. African Grid zone 31,
-710,Coordinate_Operation,17533,7302,S. African Grid zone 33,
-711,Coordinate_Operation,17611,7302,SW African Grid zone 11,
-712,Coordinate_Operation,17613,7302,SW African Grid zone 13,
-713,Coordinate_Operation,17615,7302,SW African Grid zone 15,
-714,Coordinate_Operation,17617,7302,SW African Grid zone 17,
-715,Coordinate_Operation,17619,7302,SW African Grid zone 19,
-716,Coordinate_Operation,17621,7302,SW African Grid zone 21,
-717,Coordinate_Operation,17623,7302,SW African Grid zone 23,
-718,Coordinate_Operation,17625,7302,SW African Grid zone 25,
-719,Coordinate_Operation,17702,7302,MTM zone 2,
-720,Coordinate_Operation,17801,7302,Japan zone I,
-721,Coordinate_Operation,17802,7302,Japan zone II,
-722,Coordinate_Operation,17803,7302,Japan zone III,
-723,Coordinate_Operation,17804,7302,Japan zone IV,
-724,Coordinate_Operation,17805,7302,Japan zone V,
-725,Coordinate_Operation,17806,7302,Japan zone VI,
-726,Coordinate_Operation,17807,7302,Japan zone VII,
-727,Coordinate_Operation,17808,7302,Japan zone VIII,
-728,Coordinate_Operation,17809,7302,Japan zone IX,
-729,Coordinate_Operation,17810,7302,Japan zone X,
-730,Coordinate_Operation,17811,7302,Japan zone XI,
-731,Coordinate_Operation,17812,7302,Japan zone XII,
-732,Coordinate_Operation,17813,7302,Japan zone XIII,
-733,Coordinate_Operation,17814,7302,Japan zone XIV,
-734,Coordinate_Operation,17815,7302,Japan zone XV,
-735,Coordinate_Operation,17816,7302,Japan zone XVI,
-736,Coordinate_Operation,17817,7302,Japan zone XVII,
-737,Coordinate_Operation,17818,7302,Japan zone XVIII,
-738,Coordinate_Operation,17901,7302,Mt Eden Circuit,
-739,Coordinate_Operation,17920,7302,Mt Pleasant Circuit,
-740,Coordinate_Operation,17924,7302,Mt Nicholas Circuit,
-741,Coordinate_Operation,17925,7302,Mt York Circuit,
-742,Coordinate_Operation,17926,7302,Observation Pt Circuit,
-743,Coordinate_Operation,18031,7302,Argentina 1,
-744,Coordinate_Operation,18032,7302,Argentina 2,
-745,Coordinate_Operation,18033,7302,Argentina 3,
-746,Coordinate_Operation,18034,7302,Argentina 4,
-747,Coordinate_Operation,18035,7302,Argentina 5,
-748,Coordinate_Operation,18036,7302,Argentina 6,
-749,Coordinate_Operation,18037,7302,Argentina 7,
-750,Coordinate_Operation,18044,7302,M28,
-751,Coordinate_Operation,18045,7302,M31,
-752,Coordinate_Operation,18046,7302,M34,
-753,Coordinate_Operation,18051,7302,Colombia 3W,
-754,Coordinate_Operation,18052,7302,Colombia Bogota,
-755,Coordinate_Operation,18053,7302,Colombia 3E,
-756,Coordinate_Operation,18054,7302,Colombia 6E,
-757,Coordinate_Operation,18071,7302,Blue Belt,
-758,Coordinate_Operation,18072,7302,Red Belt,
-759,Coordinate_Operation,18073,7302,Purple Belt,
-760,Coordinate_Operation,18074,7302,Extended Purple Belt,
-761,Coordinate_Operation,18141,7302,North Island Grid,
-762,Coordinate_Operation,18142,7302,South Island Grid,
-763,Coordinate_Operation,18193,7302,Finland zone 3,
-764,Coordinate_Operation,18203,7302,ICS,
-765,Coordinate_Operation,18204,7302,ITM,
-766,Coordinate_Operation,18231,7302,India zone I,
-767,Coordinate_Operation,18232,7302,India zone IIa,
-768,Coordinate_Operation,18233,7302,India zone IIIa,
-769,Coordinate_Operation,18234,7302,India zone IVa,
-770,Coordinate_Operation,18235,7302,India zone IIb,
-771,Coordinate_Operation,18236,7302,India zone I,
-772,Coordinate_Operation,18237,7302,India zone IIa,
-773,Coordinate_Operation,18238,7302,India zone IIb,
-774,Coordinate_Operation,19900,7302,Bahrain Grid,
-775,Coordinate_Operation,19905,7302,NEIEZ,
-776,Coordinate_Operation,19917,7302,NZMG,
-777,Coordinate_Operation,19922,7302,LV03,
-778,Coordinate_Operation,19923,7302,LV03C,
-779,Coordinate_Operation,19928,7302,KTM,
-780,Coordinate_Operation,19929,7302,2.5 gon West,
-781,Coordinate_Operation,19931,7302,EOV,
-782,Coordinate_Operation,19933,7302,PEI Stereographic ATS77,
-783,Coordinate_Operation,19935,7302,R.S.O. Malaya,
-784,Coordinate_Operation,19945,7302,NB Stereographic ATS77,
-785,Coordinate_Operation,19946,7302,NB Stereographic NAD83,
-786,Coordinate_Operation,19950,7302,LV95,
-787,Coordinate_Operation,19951,7302,Nakhl e Taqi,
-788,Coordinate_Operation,19956,7302,R.S.O. Borneo (chSe),
-789,Coordinate_Operation,19957,7302,R.S.O. Borneo (ftSe),
-790,Coordinate_Operation,19958,7302,R.S.O. Borneo (m),
-791,Coordinate_Operation,19960,7302,PEI Stereographic NAD83,
-792,Coordinate_Operation,19962,7302,ITM,
-793,Coordinate Reference System,20004,7302,1995 Coord. Sys. zone 4,
-794,Coordinate Reference System,20005,7302,1995 Coord. Sys. zone 5,
-795,Coordinate Reference System,20006,7302,1995 Coord. Sys. zone 6,
-796,Coordinate Reference System,20007,7302,1995 Coord. Sys. zone 7,
-797,Coordinate Reference System,20008,7302,1995 Coord. Sys. zone 8,
-798,Coordinate Reference System,20009,7302,1995 Coord. Sys. zone 9,
-799,Coordinate Reference System,20010,7302,1995 Coord. Sys. zone 10,
-800,Coordinate Reference System,20011,7302,1995 Coord. Sys. zone 11,
-801,Coordinate Reference System,20012,7302,1995 Coord. Sys. zone 12,
-802,Coordinate Reference System,20013,7302,1995 Coord. Sys. zone 13,
-803,Coordinate Reference System,20014,7302,1995 Coord. Sys. zone 14,
-804,Coordinate Reference System,20015,7302,1995 Coord. Sys. zone 15,
-805,Coordinate Reference System,20016,7302,1995 Coord. Sys. zone 16,
-806,Coordinate Reference System,20017,7302,1995 Coord. Sys. zone 17,
-807,Coordinate Reference System,20018,7302,1995 Coord. Sys. zone 18,
-808,Coordinate Reference System,20019,7302,1995 Coord. Sys. zone 19,
-809,Coordinate Reference System,20020,7302,1995 Coord. Sys. zone 20,
-810,Coordinate Reference System,20021,7302,1995 Coord. Sys. zone 21,
-811,Coordinate Reference System,20022,7302,1995 Coord. Sys. zone 22,
-812,Coordinate Reference System,20023,7302,1995 Coord. Sys. zone 23,
-813,Coordinate Reference System,20024,7302,1995 Coord. Sys. zone 24,
-814,Coordinate Reference System,20025,7302,1995 Coord. Sys. zone 25,
-815,Coordinate Reference System,20026,7302,1995 Coord. Sys. zone 26,
-816,Coordinate Reference System,20027,7302,1995 Coord. Sys. zone 27,
-817,Coordinate Reference System,20028,7302,1995 Coord. Sys. zone 28,
-818,Coordinate Reference System,20029,7302,1995 Coord. Sys. zone 29,
-819,Coordinate Reference System,20030,7302,1995 Coord. Sys. zone 30,
-820,Coordinate Reference System,20031,7302,1995 Coord. Sys. zone 31,
-821,Coordinate Reference System,20032,7302,1995 Coord. Sys. zone 32,
-822,Coordinate Reference System,20064,7302,Pulkovo 1995 / Gauss 4N,
-823,Coordinate Reference System,20065,7302,Pulkovo 1995 / Gauss 5N,
-824,Coordinate Reference System,20066,7302,Pulkovo 1995 / Gauss 6N,
-825,Coordinate Reference System,20067,7302,Pulkovo 1995 / Gauss 7N,
-826,Coordinate Reference System,20068,7302,Pulkovo 1995 / Gauss 8N,
-827,Coordinate Reference System,20069,7302,Pulkovo 1995 / Gauss 9N,
-828,Coordinate Reference System,20070,7302,Pulkovo 1995 / Gauss 10N,
-829,Coordinate Reference System,20071,7302,Pulkovo 1995 / Gauss 11N,
-830,Coordinate Reference System,20072,7302,Pulkovo 1995 / Gauss 12N,
-831,Coordinate Reference System,20073,7302,Pulkovo 1995 / Gauss 13N,
-832,Coordinate Reference System,20074,7302,Pulkovo 1995 / Gauss 14N,
-833,Coordinate Reference System,20075,7302,Pulkovo 1995 / Gauss 15N,
-834,Coordinate Reference System,20076,7302,Pulkovo 1995 / Gauss 16N,
-835,Coordinate Reference System,20077,7302,Pulkovo 1995 / Gauss 17N,
-836,Coordinate Reference System,20078,7302,Pulkovo 1995 / Gauss 18N,
-837,Coordinate Reference System,20079,7302,Pulkovo 1995 / Gauss 19N,
-838,Coordinate Reference System,20080,7302,Pulkovo 1995 / Gauss 20N,
-839,Coordinate Reference System,20081,7302,Pulkovo 1995 / Gauss 21N,
-840,Coordinate Reference System,20082,7302,Pulkovo 1995 / Gauss 22N,
-841,Coordinate Reference System,20083,7302,Pulkovo 1995 / Gauss 23N,
-842,Coordinate Reference System,20084,7302,Pulkovo 1995 / Gauss 24N,
-843,Coordinate Reference System,20085,7302,Pulkovo 1995 / Gauss 25N,
-844,Coordinate Reference System,20086,7302,Pulkovo 1995 / Gauss 26N,
-845,Coordinate Reference System,20087,7302,Pulkovo 1995 / Gauss 27N,
-846,Coordinate Reference System,20088,7302,Pulkovo 1995 / Gauss 28N,
-847,Coordinate Reference System,20089,7302,Pulkovo 1995 / Gauss 29N,
-848,Coordinate Reference System,20090,7302,Pulkovo 1995 / Gauss 30N,
-849,Coordinate Reference System,20091,7302,Pulkovo 1995 / Gauss 31N,
-850,Coordinate Reference System,20092,7302,Pulkovo 1995 / Gauss 32N,
-851,Coordinate Reference System,20437,7302,Ain el Abd / UTM 37N,
-852,Coordinate Reference System,20438,7302,Ain el Abd / UTM 38N,
-853,Coordinate Reference System,20439,7302,Ain el Abd / UTM 39N,
-854,Coordinate Reference System,20790,7302,Lisbon / Portuguese National Grid,
-855,Coordinate Reference System,21100,7302,Batavia / NEIEZ,
-856,Coordinate Reference System,21291,7302,Barbados 1938 / BWI Grid,
-857,Coordinate Reference System,21292,7302,Barbados NationaI Grid,
-858,Coordinate Reference System,21413,7302,Beijing / Gauss zone 13,
-859,Coordinate Reference System,21414,7302,Beijing / Gauss zone 14,
-860,Coordinate Reference System,21415,7302,Beijing / Gauss zone 15,
-861,Coordinate Reference System,21416,7302,Beijing / Gauss zone 16,
-862,Coordinate Reference System,21417,7302,Beijing / Gauss zone 17,
-863,Coordinate Reference System,21418,7302,Beijing / Gauss zone 18,
-864,Coordinate Reference System,21419,7302,Beijing / Gauss zone 19,
-865,Coordinate Reference System,21420,7302,Beijing / Gauss zone 20,
-866,Coordinate Reference System,21421,7302,Beijing / Gauss zone 21,
-867,Coordinate Reference System,21422,7302,Beijing / Gauss zone 22,
-868,Coordinate Reference System,21423,7302,Beijing / Gauss zone 23,
-869,Coordinate Reference System,21473,7302,Beijing / Gauss 13N,
-870,Coordinate Reference System,21474,7302,Beijing / Gauss 14N,
-871,Coordinate Reference System,21475,7302,Beijing / Gauss 15N,
-872,Coordinate Reference System,21476,7302,Beijing / Gauss 16N,
-873,Coordinate Reference System,21477,7302,Beijing / Gauss 17N,
-874,Coordinate Reference System,21478,7302,Beijing / Gauss 18N,
-875,Coordinate Reference System,21479,7302,Beijing / Gauss 19N,
-876,Coordinate Reference System,21480,7302,Beijing / Gauss 20N,
-877,Coordinate Reference System,21481,7302,Beijing / Gauss 21N,
-878,Coordinate Reference System,21482,7302,Beijing / Gauss 22N,
-879,Coordinate Reference System,21483,7302,Beijing / Gauss 23N,
-880,Coordinate Reference System,21500,7302,Belge Lambert 50,
-881,Coordinate Reference System,21780,7302,LV03C,
-882,Coordinate Reference System,21781,7302,LV03,
-883,Coordinate Reference System,21891,7302,Bogota / Colombia 3W,
-884,Coordinate Reference System,21892,7302,Bogota / Colombia Bogota,
-885,Coordinate Reference System,21893,7302,Bogota / Colombia 3E,
-886,Coordinate Reference System,21894,7302,Bogota / Colombia 6E,
-887,Coordinate Reference System,22191,7302,C Inchauspe /Argentina 1,
-888,Coordinate Reference System,22192,7302,C Inchauspe /Argentina 2,
-889,Coordinate Reference System,22193,7302,C Inchauspe /Argentina 3,
-890,Coordinate Reference System,22194,7302,C Inchauspe /Argentina 4,
-891,Coordinate Reference System,22195,7302,C Inchauspe /Argentina 5,
-892,Coordinate Reference System,22196,7302,C Inchauspe /Argentina 6,
-893,Coordinate Reference System,22197,7302,C Inchauspe /Argentina 7,
-894,Coordinate Reference System,22275,7302,South African CS zone 15,
-895,Coordinate Reference System,22277,7302,South African CS zone 17,
-896,Coordinate Reference System,22279,7302,South African CS zone 19,
-897,Coordinate Reference System,22281,7302,South African CS zone 21,
-898,Coordinate Reference System,22283,7302,South African CS zone 23,
-899,Coordinate Reference System,22285,7302,South African CS zone 25,
-900,Coordinate Reference System,22287,7302,South African CS zone 27,
-901,Coordinate Reference System,22289,7302,South African CS zone 29,
-902,Coordinate Reference System,22291,7302,South African CS zone 31,
-903,Coordinate Reference System,22293,7302,South African CS zone 33,
-904,Coordinate Reference System,22300,7302,Tunisia Mining Grid,
-905,Coordinate Reference System,22523,7302,Corrego Alegre / UTM 23S,
-906,Coordinate Reference System,22524,7302,Corrego Alegre / UTM 24S,
-907,Coordinate Reference System,22994,7302,Egypt 1907 / Ext. Purple,
-908,Coordinate Reference System,23946,7302,Indian 1954 / UTM 46N,
-909,Coordinate Reference System,23947,7302,Indian 1954 / UTM 47N,
-910,Coordinate Reference System,23948,7302,Indian 1954 / UTM 48N,
-911,Coordinate Reference System,24047,7302,Indian 1975 / UTM 47N,
-912,Coordinate Reference System,24048,7302,Indian 1975 / UTM 48N,
-913,Coordinate Reference System,24100,7302,Jamaica 1875 / Old Grid,
-914,Coordinate Reference System,24200,7302,JAD69 / Jamaica Grid,
-915,Coordinate Reference System,24305,7302,Kalianpur 37 / UTM 45N,
-916,Coordinate Reference System,24306,7302,Kalianpur 37 / UTM 46N,
-917,Coordinate Reference System,24311,7302,Kalianpur 62 / UTM 41N,
-918,Coordinate Reference System,24312,7302,Kalianpur 62 / UTM 42N,
-919,Coordinate Reference System,24313,7302,Kalianpur 62 / UTM 43N,
-920,Coordinate Reference System,24342,7302,Kalianpur 75 / UTM 42N,
-921,Coordinate Reference System,24343,7302,Kalianpur 75 / UTM 43N,
-922,Coordinate Reference System,24344,7302,Kalianpur 75 / UTM 44N,
-923,Coordinate Reference System,24345,7302,Kalianpur 75 / UTM 45N,
-924,Coordinate Reference System,24346,7302,Kalianpur 75 / UTM 46N,
-925,Coordinate Reference System,24347,7302,Kalianpur 75 / UTM 47N,
-926,Coordinate Reference System,24370,7302,Kalianpur / India 0,
-927,Coordinate Reference System,24371,7302,Kalianpur / India I,
-928,Coordinate Reference System,24372,7302,Kalianpur / India IIa,
-929,Coordinate Reference System,24373,7302,Kalianpur / India III,
-930,Coordinate Reference System,24374,7302,Kalianpur / India IV,
-931,Coordinate Reference System,24375,7302,Kalianpur 37 / India IIb,
-932,Coordinate Reference System,24376,7302,Kalianpur 62 / India I,
-933,Coordinate Reference System,24377,7302,Kalianpur 62 / India IIa,
-934,Coordinate Reference System,24378,7302,Kalianpur 75 / India I,
-935,Coordinate Reference System,24379,7302,Kalianpur 75 / India IIa,
-936,Coordinate Reference System,24380,7302,Kalianpur 75 / India IIb,
-937,Coordinate Reference System,24381,7302,Kalianpur 75 / India III,
-938,Coordinate Reference System,24382,7302,Kalianpur / India IIb,
-939,Coordinate Reference System,24383,7302,Kalianpur 75 / India IV,
-940,Coordinate Reference System,24892,7302,PSAD56 / Peru central,
-941,Coordinate Reference System,25000,7302,Leigon / Ghana Grid,
-942,Coordinate Reference System,25391,7302,Luzon / Philippines I,
-943,Coordinate Reference System,25392,7302,Luzon / Philippines II,
-944,Coordinate Reference System,25393,7302,Luzon / Philippines III,
-945,Coordinate Reference System,25394,7302,Luzon / Philippines IV,
-946,Coordinate Reference System,25395,7302,Luzon / Philippines V,
-947,Coordinate Reference System,25700,7302,Makassar / NEIEZ,
-948,Coordinate Reference System,25932,7302,Malongo 1987 / UTM 32S,
-949,Coordinate Reference System,26391,7302,Minna / Nigeria West,
-950,Coordinate Reference System,26393,7302,Minna / Nigeria East,
-951,Coordinate Reference System,26591,7302,Monte Mario / Italy 1,
-952,Coordinate Reference System,26592,7302,Monte Mario / Italy 2,
-953,Coordinate Reference System,26632,7302,M'poraloko / UTM 32N,
-954,Coordinate Reference System,26692,7302,M'poraloko / UTM 32S,
-955,Coordinate Reference System,26741,7302,NAD27 / California I,
-956,Coordinate Reference System,26742,7302,NAD27 / California II,
-957,Coordinate Reference System,26743,7302,NAD27 / California III,
-958,Coordinate Reference System,26744,7302,NAD27 / California IV,
-959,Coordinate Reference System,26745,7302,NAD27 / California V,
-960,Coordinate Reference System,26746,7302,NAD27 / California VI,
-961,Coordinate Reference System,26747,7302,NAD27 / California VII,
-962,Coordinate Reference System,26786,7302,NAD27 / Massachusetts,
-963,Coordinate Reference System,26787,7302,NAD27 / Massachusetts Is,
-964,Coordinate Reference System,26792,7302,NAD27 / Minnesota Cent.,
-965,Coordinate Reference System,26801,7302,NAD27 / Michigan East,
-966,Coordinate Reference System,26802,7302,NAD27 / Michigan Old Cen,
-967,Coordinate Reference System,26803,7302,NAD27 / Michigan West,
-968,Coordinate Reference System,26811,7302,NAD27 / Michigan North,
-969,Coordinate Reference System,26812,7302,NAD27 / Michigan Central,
-970,Coordinate Reference System,26813,7302,NAD27 / Michigan South,
-971,Coordinate Reference System,26941,7302,NAD83 / California 1,
-972,Coordinate Reference System,26942,7302,NAD83 / California 2,
-973,Coordinate Reference System,26943,7302,NAD83 / California 3,
-974,Coordinate Reference System,26944,7302,NAD83 / California 4,
-975,Coordinate Reference System,26945,7302,NAD83 / California 5,
-976,Coordinate Reference System,26946,7302,NAD83 / California 6,
-977,Coordinate Reference System,26986,7302,NAD83 / Massachusetts,
-978,Coordinate Reference System,26987,7302,NAD83 / Massachusetts Is,
-979,Coordinate Reference System,26992,7302,NAD83 / Minnesota Cent.,
-980,Coordinate Reference System,27038,7302,Nahrwan 1967 / UTM 38N,
-981,Coordinate Reference System,27039,7302,Nahrwan 1967 / UTM 39N,
-982,Coordinate Reference System,27040,7302,Nahrwan 1967 / UTM 40N,
-983,Coordinate Reference System,27120,7302,Naparima 1972 / UTM 20N,
-984,Coordinate Reference System,27200,7302,GD49 / NZ Map Grid,
-985,Coordinate Reference System,27391,7302,NGO 1948 / I,
-986,Coordinate Reference System,27392,7302,NGO 1948 / II,
-987,Coordinate Reference System,27393,7302,NGO 1948 / III,
-988,Coordinate Reference System,27394,7302,NGO 1948 / IV,
-989,Coordinate Reference System,27395,7302,NGO 1948 / V,
-990,Coordinate Reference System,27396,7302,NGO 1948 / VI,
-991,Coordinate Reference System,27397,7302,NGO 1948 / VII,
-992,Coordinate Reference System,27398,7302,NGO 1948 / VIII,
-993,Coordinate Reference System,27500,7302,ATF / Nord de Guerre,
-994,Coordinate Reference System,27581,7302,NTF / France I,
-995,Coordinate Reference System,27582,7302,NTF / France II,
-996,Coordinate Reference System,27583,7302,NTF / France III,
-997,Coordinate Reference System,27584,7302,NTF / France IV,
-998,Coordinate Reference System,27591,7302,NTF / Nord France,
-999,Coordinate Reference System,27592,7302,NTF / Centre France,
-1000,Coordinate Reference System,27593,7302,NTF / Sud France,
-1001,Coordinate Reference System,27594,7302,NTF / Corse,
-1002,Coordinate Reference System,27700,7302,British National Grid,
-1003,Coordinate Reference System,28191,7302,Palestine Grid,
-1004,Coordinate Reference System,28192,7302,Palestine Belt,
-1005,Coordinate Reference System,28193,7302,Israeli CS Grid,
-1006,Coordinate Reference System,28232,7302,Point Noire / UTM 32S,
-1007,Coordinate Reference System,28402,7302,1942 Coord. Sys. zone 2,
-1008,Coordinate Reference System,28403,7302,1942 Coord. Sys. zone 3,
-1009,Coordinate Reference System,28404,7302,1942 Coord. Sys. zone 4,
-1010,Coordinate Reference System,28405,7302,1942 Coord. Sys. zone 5,
-1011,Coordinate Reference System,28406,7302,1942 Coord. Sys. zone 6,
-1012,Coordinate Reference System,28407,7302,1942 Coord. Sys. zone 7,
-1013,Coordinate Reference System,28408,7302,1942 Coord. Sys. zone 8,
-1014,Coordinate Reference System,28409,7302,1942 Coord. Sys. zone 9,
-1015,Coordinate Reference System,28410,7302,1942 Coord. Sys. zone 10,
-1016,Coordinate Reference System,28411,7302,1942 Coord. Sys. zone 11,
-1017,Coordinate Reference System,28412,7302,1942 Coord. Sys. zone 12,
-1018,Coordinate Reference System,28413,7302,1942 Coord. Sys. zone 13,
-1019,Coordinate Reference System,28414,7302,1942 Coord. Sys. zone 14,
-1020,Coordinate Reference System,28415,7302,1942 Coord. Sys. zone 15,
-1021,Coordinate Reference System,28416,7302,1942 Coord. Sys. zone 16,
-1022,Coordinate Reference System,28417,7302,1942 Coord. Sys. zone 17,
-1023,Coordinate Reference System,28418,7302,1942 Coord. Sys. zone 18,
-1024,Coordinate Reference System,28419,7302,1942 Coord. Sys. zone 19,
-1025,Coordinate Reference System,28420,7302,1942 Coord. Sys. zone 20,
-1026,Coordinate Reference System,28421,7302,1942 Coord. Sys. zone 21,
-1027,Coordinate Reference System,28422,7302,1942 Coord. Sys. zone 22,
-1028,Coordinate Reference System,28423,7302,1942 Coord. Sys. zone 23,
-1029,Coordinate Reference System,28424,7302,1942 Coord. Sys. zone 24,
-1030,Coordinate Reference System,28425,7302,1942 Coord. Sys. zone 25,
-1031,Coordinate Reference System,28426,7302,1942 Coord. Sys. zone 26,
-1032,Coordinate Reference System,28427,7302,1942 Coord. Sys. zone 27,
-1033,Coordinate Reference System,28428,7302,1942 Coord. Sys. zone 28,
-1034,Coordinate Reference System,28429,7302,1942 Coord. Sys. zone 29,
-1035,Coordinate Reference System,28430,7302,1942 Coord. Sys. zone 30,
-1036,Coordinate Reference System,28431,7302,1942 Coord. Sys. zone 31,
-1037,Coordinate Reference System,28432,7302,1942 Coord. Sys. zone 32,
-1038,Coordinate Reference System,28462,7302,Pulkovo / Gauss 2N,
-1039,Coordinate Reference System,28463,7302,Pulkovo / Gauss 3N,
-1040,Coordinate Reference System,28464,7302,Pulkovo / Gauss 4N,
-1041,Coordinate Reference System,28465,7302,Pulkovo / Gauss 5N,
-1042,Coordinate Reference System,28466,7302,Pulkovo / Gauss 6N,
-1043,Coordinate Reference System,28467,7302,Pulkovo / Gauss 7N,
-1044,Coordinate Reference System,28468,7302,Pulkovo / Gauss 8N,
-1045,Coordinate Reference System,28469,7302,Pulkovo / Gauss 9N,
-1046,Coordinate Reference System,28470,7302,Pulkovo / Gauss 10N,
-1047,Coordinate Reference System,28471,7302,Pulkovo / Gauss 11N,
-1048,Coordinate Reference System,28472,7302,Pulkovo / Gauss 12N,
-1049,Coordinate Reference System,28473,7302,Pulkovo / Gauss 13N,
-1050,Coordinate Reference System,28474,7302,Pulkovo / Gauss 14N,
-1051,Coordinate Reference System,28475,7302,Pulkovo / Gauss 15N,
-1052,Coordinate Reference System,28476,7302,Pulkovo / Gauss 16N,
-1053,Coordinate Reference System,28477,7302,Pulkovo / Gauss 17N,
-1054,Coordinate Reference System,28478,7302,Pulkovo / Gauss 18N,
-1055,Coordinate Reference System,28479,7302,Pulkovo / Gauss 19N,
-1056,Coordinate Reference System,28480,7302,Pulkovo / Gauss 20N,
-1057,Coordinate Reference System,28481,7302,Pulkovo / Gauss 21N,
-1058,Coordinate Reference System,28482,7302,Pulkovo / Gauss 22N,
-1059,Coordinate Reference System,28483,7302,Pulkovo / Gauss 23N,
-1060,Coordinate Reference System,28484,7302,Pulkovo / Gauss 24N,
-1061,Coordinate Reference System,28485,7302,Pulkovo / Gauss 25N,
-1062,Coordinate Reference System,28486,7302,Pulkovo / Gauss 26N,
-1063,Coordinate Reference System,28487,7302,Pulkovo / Gauss 27N,
-1064,Coordinate Reference System,28488,7302,Pulkovo / Gauss 28N,
-1065,Coordinate Reference System,28489,7302,Pulkovo / Gauss 29N,
-1066,Coordinate Reference System,28490,7302,Pulkovo / Gauss 30N,
-1067,Coordinate Reference System,28491,7302,Pulkovo / Gauss 31N,
-1068,Coordinate Reference System,28492,7302,Pulkovo / Gauss 32N,
-1069,Coordinate Reference System,28600,7302,Qatar National Grid,
-1070,Coordinate Reference System,29220,7302,Sapper Hill / UTM 20S,
-1071,Coordinate Reference System,29221,7302,Sapper Hill / UTM 21S,
-1072,Coordinate Reference System,29333,7302,Schwarzeck / UTM 33S,
-1073,Coordinate Reference System,29371,7302,SW African CS zone 11,
-1074,Coordinate Reference System,29373,7302,SW African CS zone 13,
-1075,Coordinate Reference System,29375,7302,SW African CS zone 15,
-1076,Coordinate Reference System,29377,7302,SW African CS zone 17,
-1077,Coordinate Reference System,29379,7302,SW African CS zone 19,
-1078,Coordinate Reference System,29381,7302,SW African CS zone 21,
-1079,Coordinate Reference System,29383,7302,SW African CS zone 23,
-1080,Coordinate Reference System,29385,7302,SW African CS zone 25,
-1081,Coordinate Reference System,29700,7302,Tananarive  / Laborde,
-1082,Coordinate Reference System,29738,7302,Tananarive / UTM 38S,
-1083,Coordinate Reference System,29739,7302,Tananarive / UTM 39S,
-1084,Coordinate Reference System,29849,7302,Timbalai 1948 / UTM 49N,
-1085,Coordinate Reference System,29850,7302,Timbalai 1948 / UTM 50N,
-1086,Coordinate Reference System,29871,7302,Timbalai  / Borneo (ch),
-1087,Coordinate Reference System,29872,7302,Timbalai  / Borneo (ft),
-1088,Coordinate Reference System,29873,7302,Timbalai  / Borneo (m),
-1089,Coordinate Reference System,29900,7302,TM65 / Irish Nat Grid,
-1090,Coordinate Reference System,30161,7302,Tokyo / Japan zone I,
-1091,Coordinate Reference System,30162,7302,Tokyo / Japan zone II,
-1092,Coordinate Reference System,30163,7302,Tokyo / Japan zone III,
-1093,Coordinate Reference System,30164,7302,Tokyo / Japan zone IV,
-1094,Coordinate Reference System,30165,7302,Tokyo / Japan zone V,
-1095,Coordinate Reference System,30166,7302,Tokyo / Japan zone VI,
-1096,Coordinate Reference System,30167,7302,Tokyo / Japan zone VII,
-1097,Coordinate Reference System,30168,7302,Tokyo / Japan zone VIII,
-1098,Coordinate Reference System,30169,7302,Tokyo / Japan zone IX,
-1099,Coordinate Reference System,30170,7302,Tokyo / Japan zone X,
-1100,Coordinate Reference System,30171,7302,Tokyo / Japan zone XI,
-1101,Coordinate Reference System,30172,7302,Tokyo / Japan zone XII,
-1102,Coordinate Reference System,30173,7302,Tokyo / Japan zone XIII,
-1103,Coordinate Reference System,30174,7302,Tokyo / Japan zone XIV,
-1104,Coordinate Reference System,30175,7302,Tokyo / Japan zone XV,
-1105,Coordinate Reference System,30176,7302,Tokyo / Japan zone XVI,
-1106,Coordinate Reference System,30177,7302,Tokyo / Japan zone XVII,
-1107,Coordinate Reference System,30178,7302,Tokyo / Japan zone XVIII,
-1108,Coordinate Reference System,30200,7302,Trinidad 1903 / Trinidad,
-1109,Coordinate Reference System,30491,7302,Voirol /N Algerie ancien,
-1110,Coordinate Reference System,30492,7302,Voirol /S Algerie ancien,
-1111,Coordinate Reference System,30729,7302,Nord Sahara / UTM 29N,
-1112,Coordinate Reference System,30730,7302,Nord Sahara / UTM 30N,
-1113,Coordinate Reference System,30731,7302,Nord Sahara / UTM 31N,
-1114,Coordinate Reference System,30732,7302,Nord Sahara / UTM 32N,
-1115,Coordinate Reference System,30791,7302,Nord Sahara / N Algerie,
-1116,Coordinate Reference System,30792,7302,Nord Sahara / S Algerie,
-1117,Coordinate Reference System,31265,7302,MGI / Gauss zone 5,
-1118,Coordinate Reference System,31266,7302,MGI / Gauss zone 6,
-1119,Coordinate Reference System,31267,7302,MGI / Gauss zone 7,
-1120,Coordinate Reference System,31268,7302,MGI / Gauss zone 8,
-1121,Coordinate Reference System,31291,7302,MGI / Austria West,
-1122,Coordinate Reference System,31292,7302,MGI / Austria Central,
-1123,Coordinate Reference System,31293,7302,MGI / Austria East,
-1124,Coordinate Reference System,31370,7302,BD 72 / Lambert 72,
-1125,Coordinate Reference System,31461,7302,DHDN / Gauss zone 1,
-1126,Coordinate Reference System,31462,7302,DHDN / Gauss zone 2,
-1127,Coordinate Reference System,31463,7302,DHDN / Gauss zone 3,
-1128,Coordinate Reference System,31464,7302,DHDN / Gauss zone 4,
-1129,Coordinate Reference System,31465,7302,DHDN / Gauss zone 5,
-1130,Coordinate Reference System,31600,7302,Stereo 33,
-1131,Coordinate Reference System,31700,7302,Stereo 70,
-1132,Coordinate Reference System,32013,7302,NAD27 / New Mexico Cent.,
-1133,Coordinate Reference System,32018,7302,NAD27 / New York Long Is,
-1134,Coordinate Reference System,32020,7302,NAD27 / North Dakota N,
-1135,Coordinate Reference System,32021,7302,NAD27 / North Dakota S,
-1136,Coordinate Reference System,32028,7302,NAD27 / Pennsylvania N,
-1137,Coordinate Reference System,32029,7302,NAD27 / Pennsylvania S,
-1138,Coordinate Reference System,32031,7302,NAD27 / South Carolina N,
-1139,Coordinate Reference System,32033,7302,NAD27 / South Carolina S,
-1140,Coordinate Reference System,32034,7302,NAD27 / South Dakota N,
-1141,Coordinate Reference System,32035,7302,NAD27 / South Dakota S,
-1142,Coordinate Reference System,32038,7302,NAD27 / Texas North Cen.,
-1143,Coordinate Reference System,32040,7302,NAD27 / Texas South Cen.,
-1144,Coordinate Reference System,32050,7302,NAD27 / West Virginia N,
-1145,Coordinate Reference System,32051,7302,NAD27 / West Virginia S,
-1146,Coordinate Reference System,32053,7302,NAD27 / Wisconsin Cen.,
-1147,Coordinate Reference System,32056,7302,NAD27 / Wyoming E. Cen.,
-1148,Coordinate Reference System,32057,7302,NAD27 / Wyoming W. Cen.,
-1149,Coordinate Reference System,32113,7302,NAD83 / New Mexico Cent.,
-1150,Coordinate Reference System,32118,7302,NAD83 / New York Long Is,
-1151,Coordinate Reference System,32120,7302,NAD83 / North Dakota N,
-1152,Coordinate Reference System,32121,7302,NAD83 / North Dakota S,
-1153,Coordinate Reference System,32128,7302,NAD83 / Pennsylvania N,
-1154,Coordinate Reference System,32129,7302,NAD83 / Pennsylvania S,
-1155,Coordinate Reference System,32134,7302,NAD83 / South Dakota N,
-1156,Coordinate Reference System,32135,7302,NAD83 / South Dakota S,
-1157,Coordinate Reference System,32138,7302,NAD83 / Texas North Cen.,
-1158,Coordinate Reference System,32140,7302,NAD83 / Texas South Cen.,
-1159,Coordinate Reference System,32150,7302,NAD83 / West Virginia N,
-1160,Coordinate Reference System,32151,7302,NAD83 / West Virginia S,
-1161,Coordinate Reference System,32153,7302,NAD83 / Wisconsin Cen.,
-1162,Coordinate Reference System,32156,7302,NAD83 / Wyoming E. Cen.,
-1163,Coordinate Reference System,32157,7302,NAD83 / Wyoming W. Cen.,
-1164,Unit of Measure,9001,7306,m,
-1165,Unit of Measure,9002,7306,ft,
-1166,Unit of Measure,9003,7306,ftUS,
-1167,Unit of Measure,9005,7306,ftCla,
-1168,Unit of Measure,9014,7306,fathom,
-1169,Unit of Measure,9030,7306,nautmi,
-1170,Unit of Measure,9031,7306,mGer,
-1171,Unit of Measure,9033,7306,chUS,
-1172,Unit of Measure,9034,7306,lkUS,
-1173,Unit of Measure,9035,7306,miUS,
-1174,Unit of Measure,9036,7306,km,
-1175,Unit of Measure,9037,7306,ydCla,
-1176,Unit of Measure,9038,7306,chCla,
-1177,Unit of Measure,9039,7306,lkCla,
-1178,Unit of Measure,9040,7306,ydSe,
-1179,Unit of Measure,9041,7306,ftSe,
-1180,Unit of Measure,9042,7306,chSe,
-1181,Unit of Measure,9043,7306,lkSe,
-1182,Unit of Measure,9050,7306,ydBnA,
-1183,Unit of Measure,9051,7306,ftBnA,
-1184,Unit of Measure,9052,7306,chBnA,
-1185,Unit of Measure,9053,7306,lkBnA,
-1186,Unit of Measure,9060,7306,ydBnB,
-1187,Unit of Measure,9061,7306,ftBnB,
-1188,Unit of Measure,9062,7306,chBnB,
-1189,Unit of Measure,9063,7306,lkBnB,
-1190,Unit of Measure,9070,7306,ftBr(65),
-1191,Unit of Measure,9080,7306,ftInd,
-1192,Unit of Measure,9081,7306,ftInd(37),
-1193,Unit of Measure,9082,7306,ftInd(62),
-1194,Unit of Measure,9083,7306,ftInd(75),
-1195,Unit of Measure,9084,7306,ydInd,
-1196,Unit of Measure,9085,7306,ydInd(37),
-1197,Unit of Measure,9086,7306,ydInd(62),
-1198,Unit of Measure,9087,7306,ydInd(75),
-1199,Unit of Measure,9093,7306,mi,
-1200,Unit of Measure,9094,7306,ftGC,
-1201,Unit of Measure,9101,7306,rad,
-1202,Unit of Measure,9102,7306,dega,
-1203,Unit of Measure,9103,7306,mina,
-1204,Unit of Measure,9104,7306,seca,
-1205,Unit of Measure,9105,7306,gr,
-1206,Unit of Measure,9106,7306,gon,
-1207,Unit of Measure,9107,7306,dega,
-1208,Unit of Measure,9108,7306,dega,
-1209,Unit of Measure,9109,7306,urad,
-1210,Unit of Measure,9110,7306,dega,
-1211,Unit of Measure,9111,7306,dega,
-1212,Unit of Measure,9112,7306,cgr,
-1213,Unit of Measure,9113,7306,ccgr,
-1214,Unit of Measure,9114,7306,mila,
-1215,Coordinate_Operation Method,9824,7302,UTM grid system,
-1216,Coordinate Reference System,4143,7301,C�te D'Ivoire,Same alias also applied to Locodjo 1965 (code 4142).
-1217,Coordinate Reference System,4143,7301,Port Bouet,Same alias also applied to Locodjo 1965 (code 4142).
-1218,Coordinate Reference System,4142,7301,Port Bouet,Same alias also applied to Abidjan 1987 (code 4143).
-1219,Coordinate Reference System,4142,7301,C�te D'Ivoire,Same alias also applied to Abidjan 1987 (code 4143).
-1220,Coordinate Reference System,2164,7301,Cote d'Ivoire / TM 5 NW,Same alias used for Abidjan 1987 / TM 5 NW (code 2165).
-1221,Coordinate Reference System,2164,7301,Port Bouet / TM 5 NW,Same alias used for Abidjan 1987 / TM 5 NW (code 2165).
-1222,Coordinate Reference System,2165,7301,Cote d'Ivoire / TM 5 NW,Same alias used for Locodjo 1965 / TM 5 NW (code 2164).
-1223,Coordinate Reference System,2165,7301,Port Bouet / TM 5 NW,Same alias used for Abidjan 1987 / TM 5 NW (code 2165).
-1224,Coordinate_Operation,1588,7301,ED50 to EUREF89 (1),
-1225,Coordinate_Operation,1588,7301,ED50 to ETRF89 (1),
-1227,Coordinate_Operation,1589,7301,ED50 to EUREF89 (3),
-1229,Datum,6181,7301,LUREF,
-1230,Datum,6180,7302,EST97,
-1231,Datum,6179,7301,42/58,
-1232,Datum,6178,7301,42/83,
-1233,Datum,6312,7308,HR1901,
-1234,Datum,6312,7309,D48,
-1235,Coordinate_Operation Method,9807,7301,Gauss-Kruger,
-1236,Coordinate_Operation Method,9807,7302,TM,
-1237,Datum,6818,7301,Jednotn� Trigonometrick� S�te Katastr�ln� (Ferro),
-1238,Coordinate Reference System,2393,7301,KKJ / Basic Coordinate System zone 3,
-1239,Coordinate Reference System,2391,7301,KKJ / Basic Coordinate System zone 1,
-1240,Coordinate Reference System,2392,7301,KKJ / Basic Coordinate System zone 2,
-1241,Coordinate Reference System,2394,7301,KKJ / Basic Coordinate System zone 4,
-1242,Coordinate Reference System,31467,7301,DHDN / 3-degree Gauss-Kruger zone 3,
-1243,Coordinate Reference System,31468,7301,DHDN / 3-degree Gauss-Kruger zone 4,
-1244,Coordinate Reference System,31469,7301,DHDN / 3-degree Gauss-Kruger zone 5,
-1247,Coordinate Reference System,4178,7301,42/83,
-1248,Coordinate Reference System,31466,7301,DHDN / 3-degree Gauss-Kruger zone 2,
-1249,Coordinate Reference System,2166,7301,Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 3,
-1250,Coordinate Reference System,2167,7301,Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 4,
-1251,Coordinate Reference System,4181,7301,LUREF,
-1253,Coordinate Reference System,4258,7301,EUREF89,
-1254,Coordinate Reference System,2170,7301,EUREF89 / CS92,
-1255,Coordinate Reference System,4312,7308,HR1901,
-1256,Coordinate Reference System,4312,7309,D48,
-1257,Coordinate Reference System,4805,7308,HR1901 (Ferro),
-1258,Coordinate Reference System,4805,7309,D48 (Ferro),
-1259,Coordinate Reference System,31275,7308,HDKS zone 5,HDKS = Hrvatski Drzavni Koordinatni Sustav
-1260,Coordinate Reference System,31276,7308,HDKS zone 6,HDKS = Hrvatski Drzavni Koordinatni Sustav
-1261,Coordinate Reference System,31275,7309,D48 zone 5,
-1262,Coordinate Reference System,2169,7301,LUREF / Gauss,
-1263,Coordinate Reference System,31467,7310,PD/83 / Gauss-Kruger zone 3,PD/83 is the result of the transformation from Pulkovo 1942(83) to DHDN for Thuringen.
-1264,Coordinate Reference System,31468,7310,PD/83 / Gauss-Kruger zone 4,PD/83 is the result of the transformation from Pulkovo 1942(83) to DHDN for Thuringen.
-1265,Coordinate Reference System,31468,7310,RD/83 / Gauss-Kruger zone 4,RD/83 is the result of the transformation from Pulkovo 1942(83) to DHDN for Sachsen.
-1266,Coordinate Reference System,31469,7310,RD/83 / Gauss-Kruger zone 4,RD/83 is the result of the transformation from Pulkovo 1942(83) to DHDN for Sachsen.
-1267,Coordinate_Operation,1620,7308,HR1901 to ETRS89 (2),
-1268,Coordinate_Operation,1619,7307,AT_MGI to ETRS89,
-1269,Coordinate_Operation,1622,7307,CZ_S-JTSK to ETRS89,
-1270,Coordinate_Operation,1620,7307,HR_HDKS to ETRS89,
-1271,Coordinate_Operation,1624,7307,SK_S-JTSK to ETRS89,
-1272,Coordinate_Operation,1626,7307,DK_ED50 to ETRS89,
-1273,Coordinate_Operation,1628,7307,GI_ED50 to ETRS89,
-1274,Coordinate_Operation,1630,7307,ES_ED50 (BAL99) to ETRS89,
-1275,Coordinate_Operation,1632,7307,ES_ED50 (EST99) to ETRS89,
-1276,Coordinate_Operation,1634,7307,ES_ED50 (ZNW99) to ETRS89,
-1277,Coordinate_Operation,1636,7307,TR_ED50 to ETRS89,
-1278,Coordinate_Operation,1638,7307,FI_KKJ to ETRS89,
-1279,Coordinate_Operation,1640,7307,IE_Ireland65 to ETRS89,IE_Ireland65 to ETRS89 applies to the Republic of Ireland. Also referred to in EuroGeographics as NI_Ireland65 to ETRS89 for Northern Ireland.
-1280,Coordinate_Operation,1642,7307,LU_LUREF to ETRS89,
-1281,Coordinate_Operation,1644,7307,PL_42/58 to ETRS89,
-1282,Coordinate_Operation,1646,7307,CH_CH1903 to ETRS89,
-1283,Coordinate_Operation,1647,7307,CH_CH1903+ to ETRS89,
-1284,Coordinate_Operation,1648,7307,EE_L-EST97 to ETRS89,
-1285,Coordinate_Operation,1650,7307,FR_ED50 to ETRS89,
-1286,Coordinate_Operation,1651,7307,FR_NTF to ETRS89,
-1287,Coordinate_Operation,1653,7307,NO_NGO1948 to ETRS89,
-1288,Coordinate_Operation,1657,7307,PT_D73 to ETRS89,
-1289,Coordinate_Operation,1655,7307,PT_DLX(HAY) to ETRS89,
-1290,Coordinate_Operation,1652,7307,BE_BD72 to ETRS89,
-1291,Coordinate Reference System,31282,7302,MGI / Austria Central,
-1292,Coordinate Reference System,31283,7302,MGI / Austria East,
-1293,Coordinate Reference System,31281,7302,MGI / Austria West,
-1294,Datum,6176,7302,AAD98,
-1295,Coordinate Reference System,4176,7302,AAD98,
-1296,Datum,6167,7302,NZGD2000,
-1297,Coordinate Reference System,2193,7302,NZGD2000 / NZTM,
-1298,Coordinate_Operation,19971,7302,NZTM,
-1299,Datum,6186,7302,S-JTSK,
-1300,Datum,5119,7301,Nivellement general de la France,This alias is also used for other datum realisations: see NGF - Lallemand (code 5118) and NGF - IGN78 (code 5120).
-1301,Datum,5119,7301,NGF,This alias is also used for other datum realisations: see NGF - Lallemand (code 5118) and NGF - IGN78 (code 5120).
-1302,Datum,5120,7301,NGF,This alias is also used for other datum realisations: see NGF - Lallemand (code 5118) and NGF - IGN69 (code 5119).
-1303,Datum,5118,7301,NGF,This alias is also used for other datum realisations: see NGF - IGN69 (code 5119) and NGF - IGN78 (code 5120).
-1304,Datum,5120,7301,Nivellement general de la France,This alias is also used for other datum realisations: see NGF - Lallemand (code 5118) and NGF - IGN69 (code 5119).
-1305,Datum,5118,7301,Nivellement general de la France,This alias is also used for other datum realisations: see NGF - IGN69 (code 5119) and NGF - IGN78 (code 5120).
-1306,Datum,6143,7301,C�te D'Ivoire (Ivory Coast),This alias is not unique: it is also used for code 6142.
-1307,Datum,6142,7301,C�te D'Ivoire (Ivory Coast),This alias is not unique: it is also used for code 6143.
-1308,Coordinate Reference System,4300,7301,1975 Mapping Adjustment,
-1309,Coordinate Reference System,2196,7301,EUREF89 / Kp2000 Jutland,
-1310,Coordinate Reference System,2196,7301,System 2000 Jylland zoner,
-1311,Coordinate Reference System,2197,7301,EUREF89 / Kp2000 Zealand,
-1312,Coordinate Reference System,2197,7301,System 2000 Sjaelland zoner,
-1313,Coordinate Reference System,2198,7301,EUREF89 / Kp2000 Bornholm,
-1314,Coordinate Reference System,2198,7301,System 2000 Bornholm zoner,
-1315,Datum,6189,7301,SIRGAS-REGVEN,
-1316,Datum,6189,7302,REGVEN,
-1317,datum,6171,7300,R�seau G�od�sique Fran�ais 1993,
-1318,datum,6172,7300,Posiciones Geod�sicas Argentinas,
-1319,datum,6186,7300,Jednotn� Trigonometrick� S�te Katastr�ln�,
-1320,Coordinate Reference System,4314,7310,PD/83,Used for describing result of transformation from Pulkovo 1942(83) to DHDN for Thuringen.
-1321,Coordinate Reference System,4314,7310,RD/83,Used for describing result of transformation from Pulkovo 1942(83) to DHDN for Sachsen.
-1322,Coordinate_Operation,15304,7302,Arizona East (ft),
-1323,Coordinate_Operation,15305,7302,Arizona Central (ft),
-1324,Coordinate_Operation,15306,7302,Arizona West (ft),
-1325,Coordinate_Operation,15307,7302,California zone 1 (ftUS),
-1326,Coordinate_Operation,15308,7302,California zone 2 (ftUS),
-1327,Coordinate_Operation,15309,7302,California zone 3 (ftUS),
-1328,Coordinate_Operation,15310,7302,California zone 4 (ftUS),
-1329,Coordinate_Operation,15311,7302,California zone 5 (ftUS),
-1330,Coordinate_Operation,15312,7302,California zone 6 (ftUS),
-1331,Coordinate_Operation,15313,7302,Colorado North (ftUS),
-1332,Coordinate_Operation,15314,7302,Colorado Central (ftUS),
-1333,Coordinate_Operation,15315,7302,Colorado South (ftUS),
-1334,Coordinate_Operation,15316,7301,Connecticut (ft US),
-1335,Coordinate_Operation,15317,7302,Delaware (ftUS),
-1336,Coordinate_Operation,15318,7301,Florida East (ft US),
-1337,Coordinate_Operation,15319,7302,Florida West (ftUS),
-1338,Coordinate_Operation,15320,7302,Florida North (ftUS),
-1339,Coordinate_Operation,15321,7302,Georgia East (ftUS),
-1340,Coordinate_Operation,15322,7302,Georgia West (ftUS),
-1341,Coordinate_Operation,15323,7302,Idaho East (ftUS),
-1342,Coordinate_Operation,15324,7302,Idaho Central (ftUS),
-1343,Coordinate_Operation,15325,7302,Idaho West (ftUS),
-1344,Coordinate_Operation,15326,7302,Indiana East (ftUS),
-1345,Coordinate_Operation,15327,7302,Indiana West (ftUS),
-1346,Coordinate_Operation,15328,7302,Kentucky North (ftUS),
-1347,Coordinate_Operation,15329,7302,Kentucky South (ftUS),
-1348,Coordinate_Operation,15330,7302,Maryland (ftUS),
-1349,Coordinate_Operation,15331,7302,Massachusetts Mainland (ftUS),
-1350,Coordinate_Operation,15332,7302,Massachusetts Island (ftUS),
-1351,Coordinate_Operation,15333,7302,Michigan North (ft),
-1352,Coordinate_Operation,15334,7302,Michigan Central (ft),
-1353,Coordinate_Operation,15335,7302,Michigan South (ft),
-1354,Coordinate_Operation,15336,7302,Mississippi East (ftUS),
-1355,Coordinate_Operation,15337,7302,Mississippi West (ftUS),
-1356,Coordinate_Operation,15338,7301,Montana (ftUS),
-1357,Coordinate_Operation,15339,7302,New Mexico East (ftUS),
-1358,Coordinate_Operation,15340,7302,New Mexico Central (ftUS),
-1359,Coordinate_Operation,15341,7302,New Mexico West (ftUS),
-1360,Coordinate_Operation,15342,7302,New York East (ftUS),
-1361,Coordinate_Operation,15343,7302,New York Central (ftUS),
-1362,Coordinate_Operation,15344,7302,New York  West (ftUS),
-1363,Coordinate_Operation,15345,7302,New York Long Island (ftUS),
-1364,Coordinate_Operation,15346,7302,North Carolina (ftUS),
-1365,Coordinate_Operation,15347,7302,North Dakota North (ft),
-1366,Coordinate_Operation,15348,7302,North Dakota South (ft),
-1367,Coordinate_Operation,15349,7302,Oklahoma North (ftUS),
-1368,Coordinate_Operation,15350,7302,Oklahoma South (ftUS),
-1369,Coordinate_Operation,15351,7302,Oregon North (ft),
-1370,Coordinate_Operation,15352,7302,Oregon South (ft),
-1371,Coordinate_Operation,15353,7302,Pennsylvania North (ftUS),
-1372,Coordinate_Operation,15354,7301,Pennsylvania South (ftUS),
-1373,Coordinate_Operation,15355,7302,South Carolina (ft),
-1374,Coordinate_Operation,15356,7302,Tennessee (ftUS),
-1375,Coordinate_Operation,15357,7302,Texas North (ftUS),
-1376,Coordinate_Operation,15358,7302,Texas North Central (ftUS),
-1377,Coordinate_Operation,15359,7302,Texas Central (ftUS),
-1378,Coordinate_Operation,15360,7302,Texas South Central (ftUS),
-1379,Coordinate_Operation,15361,7302,Texas South (ftUS),
-1380,Coordinate_Operation,15362,7302,Utah North (ft),
-1381,Coordinate_Operation,15363,7302,Utah Central (ft),
-1382,Coordinate_Operation,15364,7302,Utah South (ft),
-1383,Coordinate_Operation,15365,7302,Virginia North (ftUS),
-1384,Coordinate_Operation,15366,7302,Virginia South (ftUS),
-1385,Coordinate_Operation,15367,7302,Washington North (ftUS),
-1386,Coordinate_Operation,15368,7302,Washington South (ftUS),
-1387,Coordinate_Operation,15369,7302,Wisconsin North (ftUS),
-1388,Coordinate_Operation,15370,7302,Wisconsin Central (ftUS),
-1389,Coordinate_Operation,15371,7302,Wisconsin South (ftUS),
-1390,datum,6190,7302,POSGAR 98,
-1391,datum,6190,7300,Posiciones Geod�sicas Argentinas 1998,
-1392,Coordinate Reference System,4190,7301,National Geodetic System [Argentina],see http://www.igm.gov.ar/posgar.html
-1393,datum,6182,7301,Observatario Flores,
-1394,datum,6182,7302,Azores Occidental 1939,
-1395,datum,6183,7301,Graciosa Base SW,
-1396,datum,6183,7302,Azores Central 1948,
-1397,datum,6184,7301,Sao Bras,
-1398,datum,6184,7302,Azores Oriental 1940,
-1399,Coordinate Reference System,4182,7301,Observatorio Flores,
-1400,Coordinate Reference System,4183,7301,Graciosa,
-1401,Coordinate Reference System,4184,7301,Sao Braz,
-1402,Coordinate_Operation,18084,7301,France zone IV,
-1403,Coordinate_Operation,18083,7301,France zone III,
-1404,Coordinate_Operation,18082,7301,France zone II,
-1405,Coordinate_Operation,18081,7301,France zone I,
-1406,Coordinate_Operation,18093,7301,Sud France,
-1407,Coordinate_Operation,18094,7301,Corse,
-1408,Coordinate_Operation,18092,7301,Centre France,
-1409,Coordinate_Operation,18091,7301,Nord France,
-1410,Coordinate Reference System,27561,7301,NTF (Paris) / Nord France,
-1411,Coordinate Reference System,27562,7301,NTF (Paris) / Centre France,
-1412,Coordinate Reference System,27563,7301,NTF (Paris) / Sud France,
-1413,Coordinate Reference System,27564,7301,NTF (Paris) / Corse,
-1414,Coordinate Reference System,27571,7301,NTF (Paris) / France I,
-1415,Coordinate Reference System,27572,7301,NTF (Paris) / France II,
-1416,Coordinate Reference System,27573,7301,NTF (Paris) / France III,
-1417,Coordinate Reference System,27574,7301,NTF (Paris) / France IV,
-1418,Coordinate Reference System,27572,7301,NTF (Paris) / Lambert zone II Etendue,
-1419,datum,6156,7300,Jednotn� Trigonometrick� S�te Katastr�ln�,
-1421,Coordinate_Operation,1751,7301,Amersfoort to ETRF89 (1),
-1422,Coordinate Reference System,2168,7301,Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 5,
-1423,Coordinate_Operation,15302,7302,Tennessee,
-1424,Coordinate_Operation,16269,7302,3-degree Gauss zone 9,
-1425,Coordinate_Operation,16270,7302,3-degree Gauss zone 10,
-1426,Coordinate_Operation,16271,7302,3-degree Gauss zone 11,
-1427,Coordinate_Operation,16272,7302,3-degree Gauss zone 12,
-1428,Coordinate_Operation,16273,7302,3-degree Gauss zone 13,
-1429,Coordinate_Operation,16274,7302,3-degree Gauss zone 14,
-1430,Coordinate_Operation,16275,7302,3-degree Gauss zone 15,
-1431,datum,6123,7300,Kartasto Koordinaati J�rjestelm� 1966,
-1432,Coordinate Reference System,2181,7301,ED50 / Turkey zone 9,
-1433,Coordinate Reference System,2182,7301,ED50 / Turkey zone 10,
-1434,Coordinate Reference System,2183,7301,ED50 / Turkey zone 11,
-1435,Coordinate Reference System,2184,7301,ED50 / Turkey zone 12,
-1436,Coordinate Reference System,2185,7301,ED50 / Turkey zone 13,
-1437,Coordinate Reference System,2186,7301,ED50 / Turkey zone 14,
-1438,Coordinate Reference System,2187,7301,ED50 / Turkey zone 15,
-1439,Coordinate Reference System,2188,7301,Observatorio Flores / UTM zone 25N,
-1440,Coordinate Reference System,2189,7301,Graciosa / UTM zone 26N,
-1441,Coordinate Reference System,2190,7301,Sao Braz / UTM zone 26N,
-1442,Coordinate_Operation,1781,7310,PD/83 to ETRS89,
-1443,Coordinate_Operation,1782,7310,RD/83 to ETRS89,
-1444,Coordinate Reference System,4207,7301,Lisbon 1937,
-1445,Coordinate Reference System,4803,7301,Lisbon 1937 (Lisbon),
-1446,Coordinate Reference System,20791,7301,Lisbon 1937 (Lisbon)/Portuguese Grid,
-1447,Coordinate Reference System,20790,7301,Lisbon 1937 (Lisbon)/Portuguese National Grid,
-1448,Coordinate_Operation,18411,7301,Afrique Occidentale Fran�aise Senegal zone,
-1449,Coordinate_Operation,18412,7301,Afrique Occidentale Fran�aise C�te d'Ivoire zone,
-1450,Coordinate_Operation,18413,7301,Afrique Occidentale Fran�aise Dahomey zone,
-1451,Coordinate_Operation,18415,7301,Afrique Equatoriale Fran�aise ouest zone,
-1452,Coordinate_Operation,18416,7301,Afrique Equatoriale Fran�aise centrale zone,
-1453,Coordinate_Operation,18417,7301,Afrique Equatoriale Fran�aise est zone,
-1454,Coordinate_Operation,18414,7301,Afrique Occidentale Fran�aise Niger zone,
-1455,Coordinate_Operation,18411,7302,AOF Senegal zone,
-1456,Coordinate_Operation,18412,7302,AOF C�te d'Ivoire zone,
-1457,Coordinate_Operation,18413,7302,AOF Dahomey zone,
-1458,Coordinate_Operation,18414,7302,AOF Niger zone,
-1459,Coordinate_Operation,18415,7302,AEF west,
-1460,Coordinate_Operation,18416,7302,AEF central,
-1461,Coordinate_Operation,18417,7302,AEF east,
-1462,Coordinate_Operation Method,9823,7301,Plate Carr�e,This alias only applies if the latitude of natural origin is at the equator.
-1464,Coordinate_Operation,1469,7301,C�te D'Ivoire to WGS 84 (1),Same alias also applied to Abidjan 1987 to WGS 84 (1) (code 1470).
-1465,Coordinate_Operation,1469,7301,Port Bouet to WGS 84 (1),Same alias also applied to Abidjan 1987 to WGS 84 (1) (code 1470).
-1466,Coordinate_Operation,1470,7301,C�te D'Ivoire to WGS 84 (1),Same alias also applied to Locodjo 1965 to WGS 84 (1) (code 1469).
-1467,Coordinate_Operation,1470,7301,Port Bouet to WGS 84 (1),Same alias also applied to Locodjo 1965 to WGS 84 (1) (code 1469).
-1468,Coordinate Reference System,2040,7301,Port Bouet / UTM zone 30N,Same alias used for Abidjan 1987 / UTM zone 30N (code 2041).
-1469,Coordinate Reference System,2040,7301,C�te d'Ivoire / UTM zone 30N,Same alias used for Abidjan 1987 / UTM zone 30N (code 2041).
-1470,Coordinate Reference System,2041,7301,Port Bouet / UTM zone 30N,Same alias used for Locodjo 1965 / UTM zone 30N (code 2040).
-1471,Coordinate Reference System,2041,7301,C�te d'Ivoire / UTM zone 30N,Same alias used for Locodjo 1965 / UTM zone 30N (code 2040).
-1472,Coordinate Reference System,2042,7301,Port Bouet / UTM zone 29N,Same alias used for Abidjan 1987 / UTM zone 29N (code 2043).
-1473,Coordinate Reference System,2042,7301,C�te d'Ivoire / UTM zone 29N,Same alias used for Abidjan 1987 / UTM zone 29N (code 2043).
-1474,Coordinate Reference System,2043,7301,Port Bouet / UTM zone 29N,Same alias used for Locodjo 1965 / UTM zone 29N (code 2042).
-1475,Coordinate Reference System,2043,7301,C�te d'Ivoire / UTM zone 29N,Same alias used for Locodjo 1965 / UTM zone 29N (code 2042).
-1479,Coordinate_Operation,18421,7301,Greenland zone 1 west,
-1480,Coordinate_Operation,18428,7301,Greenland zone 8 west,
-1481,Coordinate Reference System,2297,7301,Qornoq 1927 / Greenland zone 1 west,
-1482,Coordinate Reference System,2307,7301,Qornoq 1927 / Greenland zone 8 west,
-1483,Coordinate Reference System,32113,7301,NAD83 / New Mexico Central (m),
-1484,Coordinate Reference System,26949,7301,NAD83 / Arizona Central (m),
-1485,Coordinate Reference System,26929,7301,NAD83 / Alabama East (m),
-1486,Coordinate Reference System,26930,7301,NAD83 / Alabama West (m),
-1487,Coordinate Reference System,26931,7301,NAD83 / Alaska zone 1 (m),
-1488,Coordinate Reference System,26940,7301,NAD83 / Alaska zone 10 (m),
-1489,Coordinate Reference System,26932,7301,NAD83 / Alaska zone 2 (m),
-1490,Coordinate Reference System,26933,7301,NAD83 / Alaska zone 3 (m),
-1491,Coordinate Reference System,26934,7301,NAD83 / Alaska zone 4 (m),
-1492,Coordinate Reference System,26935,7301,NAD83 / Alaska zone 5 (m),
-1493,Coordinate Reference System,26936,7301,NAD83 / Alaska zone 6 (m),
-1494,Coordinate Reference System,26937,7301,NAD83 / Alaska zone 7 (m),
-1495,Coordinate Reference System,26938,7301,NAD83 / Alaska zone 8 (m),
-1496,Coordinate Reference System,26939,7301,NAD83 / Alaska zone 9 (m),
-1497,Coordinate Reference System,26948,7301,NAD83 / Arizona East (m),
-1498,Coordinate Reference System,26950,7301,NAD83 / Arizona West (m),
-1499,Coordinate Reference System,26951,7301,NAD83 / Arkansas North (m),
-1500,Coordinate Reference System,26952,7301,NAD83 / Arkansas South (m),
-1501,Coordinate Reference System,26941,7301,NAD83 / California zone 1 (m),
-1502,Coordinate Reference System,26942,7301,NAD83 / California zone 2 (m),
-1503,Coordinate Reference System,26943,7301,NAD83 / California zone 3 (m),
-1504,Coordinate Reference System,26944,7301,NAD83 / California zone 4 (m),
-1505,Coordinate Reference System,26945,7301,NAD83 / California zone 5 (m),
-1506,Coordinate Reference System,26946,7301,NAD83 / California zone 6 (m),
-1507,Coordinate Reference System,26954,7301,NAD83 / Colorado Central (m),
-1508,Coordinate Reference System,26953,7301,NAD83 / Colorado North (m),
-1509,Coordinate Reference System,26955,7301,NAD83 / Colorado South (m),
-1510,Coordinate Reference System,26956,7301,NAD83 / Connecticut (m),
-1511,Coordinate Reference System,26957,7301,NAD83 / Delaware (m),
-1512,Coordinate Reference System,26958,7301,NAD83 / Florida East (m),
-1513,Coordinate Reference System,26960,7301,NAD83 / Florida North (m),
-1514,Coordinate Reference System,26959,7301,NAD83 / Florida West (m),
-1515,Coordinate Reference System,26966,7301,NAD83 / Georgia East (m),
-1516,Coordinate Reference System,26967,7301,NAD83 / Georgia West (m),
-1517,Coordinate Reference System,26961,7301,NAD83 / Hawaii zone 1 (m),
-1518,Coordinate Reference System,26962,7301,NAD83 / Hawaii zone 2 (m),
-1519,Coordinate Reference System,26963,7301,NAD83 / Hawaii zone 3 (m),
-1520,Coordinate Reference System,26964,7301,NAD83 / Hawaii zone 4 (m),
-1521,Coordinate Reference System,26965,7301,NAD83 / Hawaii zone 5 (m),
-1522,Coordinate Reference System,26969,7301,NAD83 / Idaho Central (m),
-1523,Coordinate Reference System,26968,7301,NAD83 / Idaho East (m),
-1524,Coordinate Reference System,26970,7301,NAD83 / Idaho West (m),
-1525,Coordinate Reference System,26971,7301,NAD83 / Illinois East (m),
-1526,Coordinate Reference System,26972,7301,NAD83 / Illinois West (m),
-1527,Coordinate Reference System,26973,7301,NAD83 / Indiana East (m),
-1528,Coordinate Reference System,26974,7301,NAD83 / Indiana West (m),
-1529,Coordinate Reference System,26975,7301,NAD83 / Iowa North (m),
-1530,Coordinate Reference System,26976,7301,NAD83 / Iowa South (m),
-1531,Coordinate Reference System,26977,7301,NAD83 / Kansas North (m),
-1532,Coordinate Reference System,26978,7301,NAD83 / Kansas South (m),
-1533,Coordinate Reference System,2205,7301,NAD83 / Kentucky North (m),
-1534,Coordinate Reference System,26980,7301,NAD83 / Kentucky South (m),
-1535,Coordinate Reference System,26981,7301,NAD83 / Louisiana North (m),
-1536,Coordinate Reference System,26982,7301,NAD83 / Louisiana South (m),
-1537,Coordinate Reference System,26983,7301,NAD83 / Maine East (m),
-1538,Coordinate Reference System,26984,7301,NAD83 / Maine West (m),
-1539,Coordinate Reference System,26985,7301,NAD83 / Maryland (m),
-1540,Coordinate Reference System,26987,7301,NAD83 / Massachusetts Island (m),
-1541,Coordinate Reference System,26986,7301,NAD83 / Massachusetts Mainland (m),
-1542,Coordinate Reference System,26989,7301,NAD83 / Michigan Central (m),
-1543,Coordinate Reference System,26988,7301,NAD83 / Michigan North (m),
-1544,Coordinate Reference System,26990,7301,NAD83 / Michigan South (m),
-1545,Coordinate Reference System,26992,7301,NAD83 / Minnesota Central (m),
-1546,Coordinate Reference System,26991,7301,NAD83 / Minnesota North (m),
-1547,Coordinate Reference System,26993,7301,NAD83 / Minnesota South (m),
-1548,Coordinate Reference System,26994,7301,NAD83 / Mississippi East (m),
-1549,Coordinate Reference System,26995,7301,NAD83 / Mississippi West (m),
-1550,Coordinate Reference System,26997,7301,NAD83 / Missouri Central (m),
-1551,Coordinate Reference System,26996,7301,NAD83 / Missouri East (m),
-1552,Coordinate Reference System,26998,7301,NAD83 / Missouri West (m),
-1553,Coordinate Reference System,32100,7301,NAD83 / Montana (m),
-1554,Coordinate Reference System,32104,7301,NAD83 / Nebraska (m),
-1555,Coordinate Reference System,32108,7301,NAD83 / Nevada Central (m),
-1556,Coordinate Reference System,32107,7301,NAD83 / Nevada East (m),
-1557,Coordinate Reference System,32109,7301,NAD83 / Nevada West (m),
-1558,Coordinate Reference System,32110,7301,NAD83 / New Hampshire (m),
-1559,Coordinate Reference System,32111,7301,NAD83 / New Jersey (m),
-1560,Coordinate Reference System,32112,7301,NAD83 / New Mexico East (m),
-1561,Coordinate Reference System,32114,7301,NAD83 / New Mexico West (m),
-1562,Coordinate Reference System,32116,7301,NAD83 / New York Central (m),
-1563,Coordinate Reference System,32115,7301,NAD83 / New York East (m),
-1564,Coordinate Reference System,32118,7301,NAD83 / New York Long Island (m),
-1565,Coordinate Reference System,32117,7301,NAD83 / New York West (m),
-1566,Coordinate Reference System,32119,7301,NAD83 / North Carolina (m),
-1567,Coordinate Reference System,32120,7301,NAD83 / North Dakota North (m),
-1568,Coordinate Reference System,32121,7301,NAD83 / North Dakota South (m),
-1569,Coordinate Reference System,32122,7301,NAD83 / Ohio North (m),
-1570,Coordinate Reference System,32123,7301,NAD83 / Ohio South (m),
-1571,Coordinate Reference System,32124,7301,NAD83 / Oklahoma North (m),
-1572,Coordinate Reference System,32125,7301,NAD83 / Oklahoma South (m),
-1573,Coordinate Reference System,32126,7301,NAD83 / Oregon North (m),
-1574,Coordinate Reference System,32127,7301,NAD83 / Oregon South (m),
-1575,Coordinate Reference System,32128,7301,NAD83 / Pennsylvania North (m),
-1576,Coordinate Reference System,32129,7301,NAD83 / Pennsylvania South (m),
-1577,Coordinate Reference System,32130,7301,NAD83 / Rhode Island (m),
-1578,Coordinate Reference System,32133,7301,NAD83 / South Carolina (m),
-1579,Coordinate Reference System,32134,7301,NAD83 / South Dakota North (m),
-1580,Coordinate Reference System,32135,7301,NAD83 / South Dakota South (m),
-1581,Coordinate Reference System,32136,7301,NAD83 / Tennessee (m),
-1582,Coordinate Reference System,32139,7301,NAD83 / Texas Central (m),
-1583,Coordinate Reference System,32137,7301,NAD83 / Texas North (m),
-1584,Coordinate Reference System,32138,7301,NAD83 / Texas North Central (m),
-1585,Coordinate Reference System,32141,7301,NAD83 / Texas South (m),
-1586,Coordinate Reference System,32140,7301,NAD83 / Texas South Central (m),
-1587,Coordinate Reference System,32143,7301,NAD83 / Utah Central (m),
-1588,Coordinate Reference System,32142,7301,NAD83 / Utah North (m),
-1589,Coordinate Reference System,32144,7301,NAD83 / Utah South (m),
-1590,Coordinate Reference System,32145,7301,NAD83 / Vermont (m),
-1591,Coordinate Reference System,32146,7301,NAD83 / Virginia North (m),
-1592,Coordinate Reference System,32147,7301,NAD83 / Virginia South (m),
-1593,Coordinate Reference System,32148,7301,NAD83 / Washington North (m),
-1594,Coordinate Reference System,32149,7301,NAD83 / Washington South (m),
-1595,Coordinate Reference System,32150,7301,NAD83 / West Virginia North (m),
-1596,Coordinate Reference System,32151,7301,NAD83 / West Virginia South (m),
-1597,Coordinate Reference System,32153,7301,NAD83 / Wisconsin Central (m),
-1598,Coordinate Reference System,32152,7301,NAD83 / Wisconsin North (m),
-1599,Coordinate Reference System,32154,7301,NAD83 / Wisconsin South (m),
-1600,Coordinate Reference System,32155,7301,NAD83 / Wyoming East (m),
-1601,Coordinate Reference System,32156,7301,NAD83 / Wyoming East Central (m),
-1602,Coordinate Reference System,32158,7301,NAD83 / Wyoming West (m),
-1603,Coordinate Reference System,32157,7301,NAD83 / Wyoming West Central (m),
-1604,Coordinate Reference System,32161,7301,NAD83 / Puerto Rico & Virgin Is. (m),
-1605,Coordinate_Operation,10131,7301,Alabama CS83 East zone,
-1606,Coordinate_Operation,10132,7301,Alabama CS83 West zone,
-1607,Coordinate_Operation,10231,7301,Arizona CS83 East zone,
-1608,Coordinate_Operation,10232,7301,Arizona CS83 Central zone,
-1609,Coordinate_Operation,10233,7301,Arizona CS83 West zone,
-1610,Coordinate_Operation,10331,7301,Arkansas CS83 North zone,
-1611,Coordinate_Operation,10332,7301,Arkansas CS83 South zone,
-1612,Coordinate_Operation,10431,7301,California CS83 zone 1,
-1613,Coordinate_Operation,10432,7301,California CS83 zone 2,
-1614,Coordinate_Operation,10433,7301,California CS83 zone 3,
-1615,Coordinate_Operation,10434,7301,California CS83 zone 4,
-1616,Coordinate_Operation,10435,7301,California CS83 zone 5,
-1617,Coordinate_Operation,10436,7301,California CS83 zone 6,
-1618,Coordinate_Operation,10531,7301,Colorado CS83 North zone,
-1619,Coordinate_Operation,10532,7301,Colorado CS83 Central zone,
-1620,Coordinate_Operation,10533,7301,Colorado CS83 South zone,
-1621,Coordinate_Operation,10630,7301,Connecticut CS83,
-1622,Coordinate_Operation,10730,7301,Delaware CS83,
-1623,Coordinate_Operation,10931,7301,Florida CS83 East zone,
-1624,Coordinate_Operation,10932,7301,Florida CS83 West zone,
-1625,Coordinate_Operation,10933,7301,Florida CS83 North zone,
-1626,Coordinate_Operation,11031,7301,Georgia CS83 East zone,
-1627,Coordinate_Operation,11032,7301,Georgia CS83 West zone,
-1628,Coordinate_Operation,11131,7301,Idaho CS83 East zone,
-1629,Coordinate_Operation,11132,7301,Idaho CS83 Central zone,
-1630,Coordinate_Operation,11133,7301,Idaho CS83 West zone,
-1631,Coordinate_Operation,11231,7301,Illinois CS83 East zone,
-1632,Coordinate_Operation,11232,7301,Illinois CS83 West zone,
-1633,Coordinate_Operation,11331,7301,Indiana CS83 East zone,
-1634,Coordinate_Operation,11332,7301,Indiana CS83 West zone,
-1635,Coordinate_Operation,11431,7301,Iowa CS83 North zone,
-1636,Coordinate_Operation,11432,7301,Iowa CS83 South zone,
-1637,Coordinate_Operation,11531,7301,Kansas CS83 North zone,
-1638,Coordinate_Operation,11532,7301,Kansas CS83 South zone,
-1640,Coordinate_Operation,11632,7301,Kentucky CS83 South zone,
-1641,Coordinate_Operation,11731,7301,Louisiana CS83 North zone,
-1642,Coordinate_Operation,11732,7301,Louisiana CS83 South zone,
-1643,Coordinate_Operation,11831,7301,Maine CS83 East zone,
-1644,Coordinate_Operation,11832,7301,Maine CS83 West zone,
-1645,Coordinate_Operation,11930,7301,Maryland CS83,
-1646,Coordinate_Operation,12031,7301,Massachusetts CS83 Mainland zone,
-1647,Coordinate_Operation,12032,7301,Massachusetts CS83 Island zone,
-1648,Coordinate_Operation,12141,7301,Michigan CS83 North zone,
-1649,Coordinate_Operation,12142,7301,Michigan CS83 Central zone,
-1650,Coordinate_Operation,12143,7301,Michigan CS83 South zone,
-1651,Coordinate_Operation,12231,7301,Minnesota CS83 North zone,
-1652,Coordinate_Operation,12232,7301,Minnesota CS83 Central zone,
-1653,Coordinate_Operation,12233,7301,Minnesota CS83 South zone,
-1654,Coordinate_Operation,12331,7301,Mississippi CS83 East zone,
-1655,Coordinate_Operation,12332,7301,Mississippi CS83 West zone,
-1656,Coordinate_Operation,12431,7301,Missouri CS83 East zone,
-1657,Coordinate_Operation,12433,7301,Missouri CS83 West zone,
-1658,Coordinate_Operation,12530,7301,Montana CS83,
-1659,Coordinate_Operation,12630,7301,Nebraska CS83,
-1660,Coordinate_Operation,12731,7301,Nevada CS83 East zone,
-1661,Coordinate_Operation,12732,7301,Nevada CS83 Central zone,
-1662,Coordinate_Operation,12733,7301,Nevada CS83 West zone,
-1663,Coordinate_Operation,12830,7301,New Hampshire CS83,
-1664,Coordinate_Operation,12930,7301,New Jersey CS83,
-1665,Coordinate_Operation,13031,7301,New Mexico CS83 East zone,
-1666,Coordinate_Operation,13032,7301,New Mexico CS83 Central zone,
-1667,Coordinate_Operation,13033,7301,New Mexico CS83 West zone,
-1668,Coordinate_Operation,13131,7301,New York CS83 East zone,
-1669,Coordinate_Operation,13132,7301,New York CS83 Central zone,
-1670,Coordinate_Operation,13133,7301,New York CS83 West zone,
-1671,Coordinate_Operation,13134,7301,New York CS83 Long Island zone,
-1672,Coordinate_Operation,13230,7301,North Carolina CS83,
-1673,Coordinate_Operation,13331,7301,North Dakota CS83 North zone,
-1674,Coordinate_Operation,13332,7301,North Dakota CS83 South zone,
-1675,Coordinate_Operation,13431,7301,Ohio CS83 North zone,
-1676,Coordinate_Operation,13432,7301,Ohio CS83 South zone,
-1677,Coordinate_Operation,13531,7301,Oklahoma CS83 North zone,
-1678,Coordinate_Operation,13532,7301,Oklahoma CS83 South zone,
-1679,Coordinate_Operation,13631,7301,Oregon CS83 North zone,
-1680,Coordinate_Operation,13632,7301,Oregon CS83 South zone,
-1681,Coordinate_Operation,13731,7301,Pennsylvania CS83 North zone,
-1682,Coordinate_Operation,13732,7301,Pennsylvania CS83 South zone,
-1683,Coordinate_Operation,13830,7301,Rhode Island CS83,
-1684,Coordinate_Operation,13930,7301,South Carolina CS83,
-1685,Coordinate_Operation,14031,7301,South Dakota CS83 North zone,
-1686,Coordinate_Operation,14032,7301,South Dakota CS83 South zone,
-1687,Coordinate_Operation,14130,7301,Tennessee CS83,
-1688,Coordinate_Operation,14231,7301,Texas CS83 North zone,
-1689,Coordinate_Operation,14232,7301,Texas CS83 North Central zone,
-1690,Coordinate_Operation,14233,7301,Texas CS83 Central zone,
-1691,Coordinate_Operation,14234,7301,Texas CS83 South Central zone,
-1692,Coordinate_Operation,14235,7301,Texas CS83 South zone,
-1693,Coordinate_Operation,14331,7301,Utah CS83 North zone,
-1694,Coordinate_Operation,14332,7301,Utah CS83 Central zone,
-1695,Coordinate_Operation,14333,7301,Utah CS83 South zone,
-1696,Coordinate_Operation,14430,7301,Vermont CS83,
-1697,Coordinate_Operation,14531,7301,Virginia CS83 North zone,
-1698,Coordinate_Operation,14532,7301,Virginia CS83 South zone,
-1699,Coordinate_Operation,14631,7301,Washington CS83 North zone,
-1700,Coordinate_Operation,14632,7301,Washington CS83 South zone,
-1701,Coordinate_Operation,14731,7301,West Virginia CS83 North zone,
-1702,Coordinate_Operation,14732,7301,West Virginia CS83 South zone,
-1703,Coordinate_Operation,14831,7301,Wisconsin CS83 North zone,
-1704,Coordinate_Operation,14832,7301,Wisconsin CS83 Central zone,
-1705,Coordinate_Operation,14833,7301,Wisconsin CS83 South zone,
-1706,Coordinate_Operation,14931,7301,Wyoming CS83 East zone,
-1707,Coordinate_Operation,14932,7301,Wyoming CS83 East Central zone,
-1708,Coordinate_Operation,14933,7301,Wyoming CS83 West Central zone,
-1709,Coordinate_Operation,14934,7301,Wyoming CS83 West zone,
-1710,Coordinate_Operation,15031,7301,Alaska CS83 zone 1,
-1711,Coordinate_Operation,15032,7301,Alaska CS83 zone 2,
-1712,Coordinate_Operation,15033,7301,Alaska CS83 zone 3,
-1713,Coordinate_Operation,15034,7301,Alaska CS83 zone 4,
-1714,Coordinate_Operation,15035,7301,Alaska CS83 zone 5,
-1715,Coordinate_Operation,15036,7301,Alaska CS83 zone 6,
-1716,Coordinate_Operation,15037,7301,Alaska CS83 zone 7,
-1717,Coordinate_Operation,15038,7301,Alaska CS83 zone 8,
-1718,Coordinate_Operation,15039,7301,Alaska CS83 zone 9,
-1719,Coordinate_Operation,15040,7301,Alaska CS83 zone 10,
-1720,Coordinate_Operation,15131,7301,Hawaii CS83 zone 1,
-1721,Coordinate_Operation,15132,7301,Hawaii CS83 zone 2,
-1722,Coordinate_Operation,15133,7301,Hawaii CS83 zone 3,
-1723,Coordinate_Operation,15134,7301,Hawaii CS83 zone 4,
-1724,Coordinate_Operation,15135,7301,Hawaii CS83 zone 5,
-1725,Coordinate_Operation,15230,7301,Puerto Rico & Virgin Islands CS83,
-1726,Coordinate_Operation,15303,7301,Kentucky CS83 North zone,
-1727,Coordinate_Operation,12432,7301,Missouri CS83 Central zone,
-1728,Coordinate_Operation,15303,7302,Kentucky North,
-1729,Coordinate_Operation,10532,7302,Colorado Central,
-1730,Coordinate Reference System,4282,7301,Congo 1960 Pointe Noire,
-1731,Coordinate Reference System,28232,7301,Congo 1960 Pointe Noire / UTM zone 32S,
-1732,Coordinate_Operation,1801,7301,Congo 1960 Pointe Noire to WGS 84 (2),
-1733,Coordinate_Operation,1802,7301,Congo 1960 Pointe Noire to WGS 84 (3),
-1734,Coordinate_Operation,1200,7301,Congo 1960 Pointe Noire to WGS 84 (1),
-1735,Coordinate_Operation,15914,7301,BLM zone 14N in feet,
-1736,Coordinate_Operation,15915,7301,BLM zone 15N in feet,
-1737,Coordinate_Operation,15916,7301,BLM zone 16N in feet,
-1738,Coordinate_Operation,15917,7301,BLM zone 17N in feet,
-1739,Coordinate Reference System,21149,7301,Genuk / UTM zone 49S,
-1740,Coordinate Reference System,2308,7301,Genuk / TM 109 SE,
-1741,Datum,5133,7302,AIOC95,
-1742,Coordinate Reference System,5705,7301,Kronshstadt,
-1743,Datum,6199,7301,New Egyptian,Old Egyptian is an alias for Egypt 1907 (code 6229).
-1744,Datum,6229,7301,Old Egyptian,New Egyptian is an alias for Egypt 1930 (code 6199).
-1745,Coordinate Reference System,4199,7301,New Egyptian,Old Egyptian is an alias for Egypt 1907 (code 4229).
-1746,Coordinate Reference System,4229,7301,Old Egyptian,New Egyptian is an alias for Egypt 1930 (code 4199).
-1747,Coordinate_Operation,1516,7301,PSAD56 to WGS 84,
-1748,Coordinate_Operation,1813,7301,Genuk to WGS 84 (ONWJ),
-1749,Coordinate Reference System,32064,7301,NAD27 / UTM zone 14N (ftUS),Non-metric equivalent of NAD27 / UTM zone 14N (code 26714). UTM is a metric system so strictly this is not UTM.
-1750,Coordinate Reference System,32065,7301,NAD27 / UTM zone 15N (ftUS),Non-metric equivalent of NAD27 / UTM zone 15N (code 26715). UTM is a metric system so strictly this is not UTM.
-1751,Coordinate Reference System,32066,7301,NAD27 / UTM zone 16N (ftUS),Non-metric equivalent of NAD27 / UTM zone 16N (code 26716). UTM is a metric system so strictly this is not UTM.
-1752,Coordinate Reference System,32067,7301,NAD27 / UTM zone 17N (ftUS),Non-metric equivalent of NAD27 / UTM zone 17N (code 26717). UTM is a metric system so strictly this is not UTM.
-1754,Coordinate Reference System,2319,7301,ED50 / 3-degree Gauss-Kruger CM 27E,
-1755,Coordinate Reference System,2320,7301,ED50 / 3-degree Gauss-Kruger CM 30E,
-1756,Coordinate Reference System,2321,7301,ED50 / 3-degree Gauss-Kruger CM 33E,
-1757,Coordinate Reference System,2322,7301,ED50 / 3-degree Gauss-Kruger CM 36E,
-1758,Coordinate Reference System,2323,7301,ED50 / 3-degree Gauss-Kruger CM 39E,
-1759,Coordinate Reference System,2324,7301,ED50 / 3-degree Gauss-Kruger CM 42E,
-1760,Coordinate Reference System,2325,7301,ED50 / 3-degree Gauss-Kruger CM 45E,
-1761,Datum,6612,7302,JGD2000,
-1762,Datum,5137,7301,Huang Hai 1985,
-1763,Datum,5135,7302,HKPD,
-1765,Coordinate Reference System,5736,7301,Huang Hai 1956,
-1766,Coordinate Reference System,5738,7302,HKPD,
-1767,Coordinate Reference System,2343,7301,Xian 1980 / 6-degree Gauss-Kruger CM 105E,
-1768,Coordinate Reference System,2344,7301,Xian 1980 / 6-degree Gauss-Kruger CM 111E,
-1769,Coordinate Reference System,2338,7301,Xian 1980 / 6-degree Gauss-Kruger CM 75E,
-1770,Coordinate Reference System,2342,7301,Xian 1980 / 6-degree Gauss-Kruger CM 99E,
-1771,Coordinate Reference System,2348,7301,Xian 1980 / 6-degree Gauss-Kruger CM 135E,
-1772,Coordinate Reference System,2339,7301,Xian 1980 / 6-degree Gauss-Kruger CM 81E,
-1773,Coordinate Reference System,2340,7301,Xian 1980 / 6-degree Gauss-Kruger CM 87E,
-1774,Coordinate Reference System,2341,7301,Xian 1980 / 6-degree Gauss-Kruger CM 93E,
-1775,Coordinate Reference System,2345,7301,Xian 1980 / 6-degree Gauss-Kruger CM 117E,
-1776,Coordinate Reference System,2346,7301,Xian 1980 / 6-degree Gauss-Kruger CM 123E,
-1777,Coordinate Reference System,2347,7301,Xian 1980 / 6-degree Gauss-Kruger CM 129E,
-1778,Datum,6611,7302,HK80,
-1779,Datum,5135,7301,Ordnance Datum,This is the former name.
-1780,Datum,5136,7301,Admiralty Datum,This is the former name.
-1781,Coordinate Reference System,5737,7301,Huang Hai 1985,
-1782,Coordinate Reference System,2326,7302,HK 1980 Grid System,
-1783,Coordinate Reference System,4611,7302,HK1980,
-1784,Coordinate_Operation Parameter,8802,7301,Central Meridian,"Abbeviated as ""CM""."
-1785,Coordinate_Operation Parameter,8802,7302,CM,"Abbreviation for ""Central Meridian""."
-1786,Coordinate Reference System,2327,7301,Xian 1980 / 6-degree Gauss-Kruger zone 13,Part of the China National Coordinate System of 1980.
-1787,Coordinate Reference System,2328,7301,Xian 1980 / 6-degree Gauss-Kruger zone 14,Part of the China National Coordinate System of 1980.
-1788,Coordinate Reference System,2329,7301,Xian 1980 / 6-degree Gauss-Kruger zone 15,Part of the China National Coordinate System of 1980.
-1789,Coordinate Reference System,2330,7301,Xian 1980 / 6-degree Gauss-Kruger zone 16,Part of the China National Coordinate System of 1980.
-1790,Coordinate Reference System,2331,7301,Xian 1980 / 6-degree Gauss-Kruger zone 17,Part of the China National Coordinate System of 1980.
-1791,Coordinate Reference System,2332,7301,Xian 1980 / 6-degree Gauss-Kruger zone 18,Part of the China National Coordinate System of 1980.
-1792,Coordinate Reference System,2333,7301,Xian 1980 / 6-degree Gauss-Kruger zone 19,Part of the China National Coordinate System of 1980.
-1793,Coordinate Reference System,2334,7301,Xian 1980 / 6-degree Gauss-Kruger zone 20,Part of the China National Coordinate System of 1980.
-1794,Coordinate Reference System,2335,7301,Xian 1980 / 6-degree Gauss-Kruger zone 21,Part of the China National Coordinate System of 1980.
-1795,Coordinate Reference System,2336,7301,Xian 1980 / 6-degree Gauss-Kruger zone 22,Part of the China National Coordinate System of 1980.
-1796,Coordinate Reference System,2333,7301,Xian 1980 / 6-degree Gauss-Kruger zone 23,Part of the China National Coordinate System of 1980.
-1797,Coordinate Reference System,21413,7301,Beijing 1954 / 6-degree Gauss-Kruger zone 13,
-1798,Coordinate Reference System,21414,7301,Beijing 1954 / 6-degree Gauss-Kruger zone 14,
-1799,Coordinate Reference System,21415,7301,Beijing 1954 / 6-degree Gauss-Kruger zone 15,
-1800,Coordinate Reference System,21416,7301,Beijing 1954 / 6-degree Gauss-Kruger zone 16,
-1801,Coordinate Reference System,21417,7301,Beijing 1954 / 6-degree Gauss-Kruger zone 17,
-1802,Coordinate Reference System,21418,7301,Beijing 1954 / 6-degree Gauss-Kruger zone 18,
-1803,Coordinate Reference System,21419,7301,Beijing 1954 / 6-degree Gauss-Kruger zone 19,
-1804,Coordinate Reference System,21420,7301,Beijing 1954 / 6-degree Gauss-Kruger zone 20,
-1805,Coordinate Reference System,21421,7301,Beijing 1954 / 6-degree Gauss-Kruger zone 21,
-1806,Coordinate Reference System,21422,7301,Beijing 1954 / 6-degree Gauss-Kruger zone 22,
-1807,Coordinate Reference System,21423,7301,Beijing 1954 / 6-degree Gauss-Kruger zone 23,
-1808,Coordinate Reference System,21453,7301,Beijing 1954 / 6-degree Gauss-Kruger CM 75E,
-1809,Coordinate Reference System,21454,7301,Beijing 1954 / 6-degree Gauss-Kruger CM 81E,
-1810,Coordinate Reference System,21455,7301,Beijing 1954 / 6-degree Gauss-Kruger CM 87E,
-1811,Coordinate Reference System,21456,7301,Beijing 1954 / 6-degree Gauss-Kruger CM 93E,
-1812,Coordinate Reference System,21457,7301,Beijing 1954 / 6-degree Gauss-Kruger CM 99E,
-1813,Coordinate Reference System,21458,7301,Beijing 1954 / 6-degree Gauss-Kruger CM 105E,
-1814,Coordinate Reference System,21459,7301,Beijing 1954 / 6-degree Gauss-Kruger CM 111E,
-1815,Coordinate Reference System,21460,7301,Beijing 1954 / 6-degree Gauss-Kruger CM 117E,
-1816,Coordinate Reference System,21461,7301,Beijing 1954 / 6-degree Gauss-Kruger CM 123E,
-1817,Coordinate Reference System,21462,7301,Beijing 1954 / 6-degree Gauss-Kruger CM 129E,
-1818,Coordinate Reference System,21463,7301,Beijing 1954 / 6-degree Gauss-Kruger CM 135E,
-1819,Coordinate_Operation,5405,7302,HKPD to Hong Kong Chart,
-1820,Coordinate Reference System,2044,7301,Hanoi 1972 / 6-degree Gauss-Kruger zone 18,
-1821,Coordinate Reference System,2045,7301,Hanoi 1972 / 6-degree Gauss-Kruger zone 18,
-1822,Coordinate Reference System,2462,7301,Albanian 1987 / 6-degree Gauss-Kruger zone 4,
-1823,Coordinate Reference System,2397,7301,Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 3,
-1824,Coordinate Reference System,2398,7301,Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 4,
-1825,Coordinate Reference System,2399,7301,Pulkovo 1942(83) / 3-degree Gauss-Kruger zone 3,
-1826,Coordinate Reference System,2395,7302,S Yemen / Gauss zone 8,
-1827,Coordinate Reference System,2396,7302,S Yemen / Gauss zone 9,
-1828,Coordinate Reference System,2396,7301,South Yemen / 6-degree Gauss-Kruger zone 9,
-1829,Coordinate Reference System,2395,7301,South Yemen / 6-degree Gauss-Kruger zone 8,
-1830,Coordinate_Operation,18031,7301,Gauss-Kruger zone 1,
-1831,Coordinate_Operation,18032,7301,Gauss-Kruger zone 2,
-1832,Coordinate_Operation,18033,7301,Gauss-Kruger zone 3,
-1833,Coordinate_Operation,18034,7301,Gauss-Kruger zone 4,
-1834,Coordinate_Operation,18035,7301,Gauss-Kruger zone 5,
-1835,Coordinate_Operation,18036,7301,Gauss-Kruger zone 6,
-1836,Coordinate_Operation,18037,7301,Gauss-Kruger zone 7,
-1837,Coordinate Reference System,22191,7301,Campo Inchauspe / Gauss-Kruger zone 1,
-1838,Coordinate Reference System,22192,7301,Campo Inchauspe / Gauss-Kruger zone 2,
-1839,Coordinate Reference System,22193,7301,Campo Inchauspe / Gauss-Kruger zone 3,
-1840,Coordinate Reference System,22194,7301,Campo Inchauspe / Gauss-Kruger zone 4,
-1841,Coordinate Reference System,22195,7301,Campo Inchauspe / Gauss-Kruger zone 5,
-1842,Coordinate Reference System,22196,7301,Campo Inchauspe / Gauss-Kruger zone 6,
-1843,Coordinate Reference System,22197,7301,Campo Inchauspe / Gauss-Kruger zone 7,
-1844,Coordinate Reference System,2081,7301,Chos Malal 1914 / Gauss-Kruger zone 2,
-1845,Coordinate Reference System,2082,7301,Pampa del Castillo / Gauss-Kruger zone 2,
-1846,Coordinate Reference System,2083,7301,Hito XVIII 1963 / Gauss-Kruger zone 2,
-1847,Coordinate Reference System,20004,7301,Pulkovo 1995 / 6-degree Gauss-Kruger zone 4,
-1848,Coordinate Reference System,20005,7301,Pulkovo 1995 / 6-degree Gauss-Kruger zone 5,
-1849,Coordinate Reference System,20006,7301,Pulkovo 1995 / 6-degree Gauss-Kruger zone 6,
-1850,Coordinate Reference System,20007,7301,Pulkovo 1995 / 6-degree Gauss-Kruger zone 7,
-1851,Coordinate Reference System,20008,7301,Pulkovo 1995 / 6-degree Gauss-Kruger zone 8,
-1852,Coordinate Reference System,20009,7301,Pulkovo 1995 / 6-degree Gauss-Kruger zone 9,
-1853,Coordinate Reference System,20010,7301,Pulkovo 1995 / 6-degree Gauss-Kruger zone 10,
-1854,Coordinate Reference System,20011,7301,Pulkovo 1995 / 6-degree Gauss-Kruger zone 11,
-1855,Coordinate Reference System,20012,7301,Pulkovo 1995 / 6-degree Gauss-Kruger zone 12,
-1856,Coordinate Reference System,20013,7301,Pulkovo 1995 / 6-degree Gauss-Kruger zone 13,
-1857,Coordinate Reference System,20014,7301,Pulkovo 1995 / 6-degree Gauss-Kruger zone 14,
-1858,Coordinate Reference System,20015,7301,Pulkovo 1995 / 6-degree Gauss-Kruger zone 15,
-1859,Coordinate Reference System,20016,7301,Pulkovo 1995 / 6-degree Gauss-Kruger zone 16,
-1860,Coordinate Reference System,20017,7301,Pulkovo 1995 / 6-degree Gauss-Kruger zone 17,
-1861,Coordinate Reference System,20018,7301,Pulkovo 1995 / 6-degree Gauss-Kruger zone 18,
-1862,Coordinate Reference System,20019,7301,Pulkovo 1995 / 6-degree Gauss-Kruger zone 19,
-1863,Coordinate Reference System,20020,7301,Pulkovo 1995 / 6-degree Gauss-Kruger zone 20,
-1864,Coordinate Reference System,20021,7301,Pulkovo 1995 / 6-degree Gauss-Kruger zone 21,
-1865,Coordinate Reference System,20022,7301,Pulkovo 1995 / 6-degree Gauss-Kruger zone 22,
-1866,Coordinate Reference System,20023,7301,Pulkovo 1995 / 6-degree Gauss-Kruger zone 23,
-1867,Coordinate Reference System,20024,7301,Pulkovo 1995 / 6-degree Gauss-Kruger zone 24,
-1868,Coordinate Reference System,20025,7301,Pulkovo 1995 / 6-degree Gauss-Kruger zone 25,
-1869,Coordinate Reference System,20026,7301,Pulkovo 1995 / 6-degree Gauss-Kruger zone 26,
-1870,Coordinate Reference System,20027,7301,Pulkovo 1995 / 6-degree Gauss-Kruger zone 27,
-1871,Coordinate Reference System,20028,7301,Pulkovo 1995 / 6-degree Gauss-Kruger zone 28,
-1872,Coordinate Reference System,20029,7301,Pulkovo 1995 / 6-degree Gauss-Kruger zone 29,
-1873,Coordinate Reference System,20030,7301,Pulkovo 1995 / 6-degree Gauss-Kruger zone 30,
-1874,Coordinate Reference System,20031,7301,Pulkovo 1995 / 6-degree Gauss-Kruger zone 31,
-1875,Coordinate Reference System,20032,7301,Pulkovo 1995 / 6-degree Gauss-Kruger zone 32,
-1876,Coordinate Reference System,28402,7301,Pulkovo 1942 / 6-degree Gauss-Kruger zone 2,
-1877,Coordinate Reference System,28403,7301,Pulkovo 1942 / 6-degree Gauss-Kruger zone 3,
-1878,Coordinate Reference System,28404,7301,Pulkovo 1942 / 6-degree Gauss-Kruger zone 4,
-1879,Coordinate Reference System,28405,7301,Pulkovo 1942 / 6-degree Gauss-Kruger zone 5,
-1880,Coordinate Reference System,28406,7301,Pulkovo 1942 / 6-degree Gauss-Kruger zone 6,
-1881,Coordinate Reference System,28407,7301,Pulkovo 1942 / 6-degree Gauss-Kruger zone 7,
-1882,Coordinate Reference System,28408,7301,Pulkovo 1942 / 6-degree Gauss-Kruger zone 8,
-1883,Coordinate Reference System,28409,7301,Pulkovo 1942 / 6-degree Gauss-Kruger zone 9,
-1884,Coordinate Reference System,28410,7301,Pulkovo 1942 / 6-degree Gauss-Kruger zone 10,
-1885,Coordinate Reference System,28411,7301,Pulkovo 1942 / 6-degree Gauss-Kruger zone 11,
-1886,Coordinate Reference System,28412,7301,Pulkovo 1942 / 6-degree Gauss-Kruger zone 12,
-1887,Coordinate Reference System,28413,7301,Pulkovo 1942 / 6-degree Gauss-Kruger zone 13,
-1888,Coordinate Reference System,28414,7301,Pulkovo 1942 / 6-degree Gauss-Kruger zone 14,
-1889,Coordinate Reference System,28415,7301,Pulkovo 1942 / 6-degree Gauss-Kruger zone 15,
-1890,Coordinate Reference System,28416,7301,Pulkovo 1942 / 6-degree Gauss-Kruger zone 16,
-1891,Coordinate Reference System,28417,7301,Pulkovo 1942 / 6-degree Gauss-Kruger zone 17,
-1892,Coordinate Reference System,28418,7301,Pulkovo 1942 / 6-degree Gauss-Kruger zone 18,
-1893,Coordinate Reference System,28419,7301,Pulkovo 1942 / 6-degree Gauss-Kruger zone 19,
-1894,Coordinate Reference System,28420,7301,Pulkovo 1942 / 6-degree Gauss-Kruger zone 20,
-1895,Coordinate Reference System,28421,7301,Pulkovo 1942 / 6-degree Gauss-Kruger zone 21,
-1896,Coordinate Reference System,28422,7301,Pulkovo 1942 / 6-degree Gauss-Kruger zone 22,
-1897,Coordinate Reference System,28423,7301,Pulkovo 1942 / 6-degree Gauss-Kruger zone 23,
-1898,Coordinate Reference System,28424,7301,Pulkovo 1942 / 6-degree Gauss-Kruger zone 24,
-1899,Coordinate Reference System,28425,7301,Pulkovo 1942 / 6-degree Gauss-Kruger zone 25,
-1900,Coordinate Reference System,28426,7301,Pulkovo 1942 / 6-degree Gauss-Kruger zone 26,
-1901,Coordinate Reference System,28427,7301,Pulkovo 1942 / 6-degree Gauss-Kruger zone 27,
-1902,Coordinate Reference System,28428,7301,Pulkovo 1942 / 6-degree Gauss-Kruger zone 28,
-1903,Coordinate Reference System,28429,7301,Pulkovo 1942 / 6-degree Gauss-Kruger zone 29,
-1904,Coordinate Reference System,28430,7301,Pulkovo 1942 / 6-degree Gauss-Kruger zone 30,
-1905,Coordinate Reference System,28431,7301,Pulkovo 1942 / 6-degree Gauss-Kruger zone 31,
-1906,Coordinate Reference System,28432,7301,Pulkovo 1942 / 6-degree Gauss-Kruger zone 32,
-1907,Coordinate Reference System,2463,7301,Pulkovo 1995 / 6-degree Gauss-Kruger CM 21E,
-1908,Coordinate Reference System,2464,7301,Pulkovo 1995 / 6-degree Gauss-Kruger CM 27E,
-1909,Coordinate Reference System,2465,7301,Pulkovo 1995 / 6-degree Gauss-Kruger CM 33E,
-1910,Coordinate Reference System,2466,7301,Pulkovo 1995 / 6-degree Gauss-Kruger CM 39E,
-1911,Coordinate Reference System,2467,7301,Pulkovo 1995 / 6-degree Gauss-Kruger CM 45E,
-1912,Coordinate Reference System,2468,7301,Pulkovo 1995 / 6-degree Gauss-Kruger CM 51E,
-1913,Coordinate Reference System,2469,7301,Pulkovo 1995 / 6-degree Gauss-Kruger CM 57E,
-1914,Coordinate Reference System,2470,7301,Pulkovo 1995 / 6-degree Gauss-Kruger CM 63E,
-1915,Coordinate Reference System,2471,7301,Pulkovo 1995 / 6-degree Gauss-Kruger CM 69E,
-1916,Coordinate Reference System,2472,7301,Pulkovo 1995 / 6-degree Gauss-Kruger CM 75E,
-1917,Coordinate Reference System,2473,7301,Pulkovo 1995 / 6-degree Gauss-Kruger CM 81E,
-1918,Coordinate Reference System,2474,7301,Pulkovo 1995 / 6-degree Gauss-Kruger CM 87E,
-1919,Coordinate Reference System,2475,7301,Pulkovo 1995 / 6-degree Gauss-Kruger CM 93E,
-1920,Coordinate Reference System,2476,7301,Pulkovo 1995 / 6-degree Gauss-Kruger CM 99E,
-1921,Coordinate Reference System,2477,7301,Pulkovo 1995 / 6-degree Gauss-Kruger CM 105E,
-1922,Coordinate Reference System,2478,7301,Pulkovo 1995 / 6-degree Gauss-Kruger CM 111E,
-1923,Coordinate Reference System,2479,7301,Pulkovo 1995 / 6-degree Gauss-Kruger CM 117E,
-1924,Coordinate Reference System,2480,7301,Pulkovo 1995 / 6-degree Gauss-Kruger CM 123E,
-1925,Coordinate Reference System,2481,7301,Pulkovo 1995 / 6-degree Gauss-Kruger CM 129E,
-1926,Coordinate Reference System,2482,7301,Pulkovo 1995 / 6-degree Gauss-Kruger CM 135E,
-1927,Coordinate Reference System,2483,7301,Pulkovo 1995 / 6-degree Gauss-Kruger CM 141E,
-1928,Coordinate Reference System,2484,7301,Pulkovo 1995 / 6-degree Gauss-Kruger CM 147E,
-1929,Coordinate Reference System,2485,7301,Pulkovo 1995 / 6-degree Gauss-Kruger CM 153E,
-1930,Coordinate Reference System,2486,7301,Pulkovo 1995 / 6-degree Gauss-Kruger CM 159E,
-1931,Coordinate Reference System,2487,7301,Pulkovo 1995 / 6-degree Gauss-Kruger CM 165E,
-1932,Coordinate Reference System,2488,7301,Pulkovo 1995 / 6-degree Gauss-Kruger CM 171E,
-1933,Coordinate Reference System,2489,7301,Pulkovo 1995 / 6-degree Gauss-Kruger CM 177E,
-1934,Coordinate Reference System,2490,7301,Pulkovo 1995 / 6-degree Gauss-Kruger CM 177W,
-1935,Coordinate Reference System,2491,7301,Pulkovo 1995 / 6-degree Gauss-Kruger CM 171W,
-1936,Coordinate Reference System,2492,7301,Pulkovo 1942 / 6-degree Gauss-Kruger CM 9E,
-1937,Coordinate Reference System,2493,7301,Pulkovo 1942 / 6-degree Gauss-Kruger CM 15E,
-1938,Coordinate Reference System,2494,7301,Pulkovo 1942 / 6-degree Gauss-Kruger CM 21E,
-1939,Coordinate Reference System,2495,7301,Pulkovo 1942 / 6-degree Gauss-Kruger CM 27E,
-1940,Coordinate Reference System,2496,7301,Pulkovo 1942 / 6-degree Gauss-Kruger CM 33E,
-1941,Coordinate Reference System,2497,7301,Pulkovo 1942 / 6-degree Gauss-Kruger CM 39E,
-1942,Coordinate Reference System,2498,7301,Pulkovo 1942 / 6-degree Gauss-Kruger CM 45E,
-1943,Coordinate Reference System,2499,7301,Pulkovo 1942 / 6-degree Gauss-Kruger CM 51E,
-1944,Coordinate Reference System,2500,7301,Pulkovo 1942 / 6-degree Gauss-Kruger CM 57E,
-1945,Coordinate Reference System,2501,7301,Pulkovo 1942 / 6-degree Gauss-Kruger CM 63E,
-1946,Coordinate Reference System,2502,7301,Pulkovo 1942 / 6-degree Gauss-Kruger CM 69E,
-1947,Coordinate Reference System,2503,7301,Pulkovo 1942 / 6-degree Gauss-Kruger CM 75E,
-1948,Coordinate Reference System,2504,7301,Pulkovo 1942 / 6-degree Gauss-Kruger CM 81E,
-1949,Coordinate Reference System,2505,7301,Pulkovo 1942 / 6-degree Gauss-Kruger CM 87E,
-1950,Coordinate Reference System,2506,7301,Pulkovo 1942 / 6-degree Gauss-Kruger CM 93E,
-1951,Coordinate Reference System,2507,7301,Pulkovo 1942 / 6-degree Gauss-Kruger CM 99E,
-1952,Coordinate Reference System,2508,7301,Pulkovo 1942 / 6-degree Gauss-Kruger CM 105E,
-1953,Coordinate Reference System,2509,7301,Pulkovo 1942 / 6-degree Gauss-Kruger CM 111E,
-1954,Coordinate Reference System,2510,7301,Pulkovo 1942 / 6-degree Gauss-Kruger CM 117E,
-1955,Coordinate Reference System,2511,7301,Pulkovo 1942 / 6-degree Gauss-Kruger CM 123E,
-1956,Coordinate Reference System,2512,7301,Pulkovo 1942 / 6-degree Gauss-Kruger CM 129E,
-1957,Coordinate Reference System,2513,7301,Pulkovo 1942 / 6-degree Gauss-Kruger CM 135E,
-1958,Coordinate Reference System,2514,7301,Pulkovo 1942 / 6-degree Gauss-Kruger CM 141E,
-1959,Coordinate Reference System,2515,7301,Pulkovo 1942 / 6-degree Gauss-Kruger CM 147E,
-1960,Coordinate Reference System,2516,7301,Pulkovo 1942 / 6-degree Gauss-Kruger CM 153E,
-1961,Coordinate Reference System,2517,7301,Pulkovo 1942 / 6-degree Gauss-Kruger CM 159E,
-1962,Coordinate Reference System,2518,7301,Pulkovo 1942 / 6-degree Gauss-Kruger CM 165E,
-1963,Coordinate Reference System,2519,7301,Pulkovo 1942 / 6-degree Gauss-Kruger CM 171E,
-1964,Coordinate Reference System,2520,7301,Pulkovo 1942 / 6-degree Gauss-Kruger CM 177E,
-1965,Coordinate Reference System,2521,7301,Pulkovo 1942 / 6-degree Gauss-Kruger CM 177W,
-1966,Coordinate Reference System,2522,7301,Pulkovo 1942 / 6-degree Gauss-Kruger CM 171W,
-1967,Unit of Measure,9115,7302,DM,
-1968,Unit of Measure,9115,7306,dega,
-1969,Coordinate_Operation,1833,7311,ID74 to DGN-95 (3),DGN-95 is a synonym in Indonesia for WGS 84.
-1970,Coordinate_Operation,1832,7311,ID74 to DGN-95 (2),DGN-95 is a synonym in Indonesia for WGS 84.
-1971,Coordinate_Operation,1248,7311,ID74 to DGN-95 (1),DGN-95 is a synonym in Indonesia for WGS 84.
-1972,Coordinate Reference System,2309,7311,DGN-95 / TM 116 SE,Datum Geodesi Nasional 1995 (DGN-95) is a synonym for WGS 84 in Indonesia.
-1973,Coordinate Reference System,2310,7311,DGN-95 / TM 132 SE,Datum Geodesi Nasional 1995 (DGN-95) is a synonym for WGS 84 in Indonesia.
-1974,Coordinate Reference System,32646,7311,DGN-95 / UTM zone 46N,Datum Geodesi Nasional 1995 (DGN-95) is a synonym for WGS 84 in Indonesia.
-1975,Coordinate Reference System,32647,7311,DGN-95 / UTM zone 47N,Datum Geodesi Nasional 1995 (DGN-95) is a synonym for WGS 84 in Indonesia.
-1976,Coordinate Reference System,32648,7311,DGN-95 / UTM zone 48N,Datum Geodesi Nasional 1995 (DGN-95) is a synonym for WGS 84 in Indonesia.
-1977,Coordinate Reference System,32649,7311,DGN-95 / UTM zone 49N,Datum Geodesi Nasional 1995 (DGN-95) is a synonym for WGS 84 in Indonesia.
-1978,Coordinate Reference System,32650,7311,DGN-95 / UTM zone 50N,Datum Geodesi Nasional 1995 (DGN-95) is a synonym for WGS 84 in Indonesia.
-1979,Coordinate Reference System,32651,7311,DGN-95 / UTM zone 51N,Datum Geodesi Nasional 1995 (DGN-95) is a synonym for WGS 84 in Indonesia.
-1980,Coordinate Reference System,32652,7311,DGN-95 / UTM zone 52N,Datum Geodesi Nasional 1995 (DGN-95) is a synonym for WGS 84 in Indonesia.
-1981,Coordinate Reference System,32747,7311,DGN-95 / UTM zone 47S,Datum Geodesi Nasional 1995 (DGN-95) is a synonym for WGS 84 in Indonesia.
-1982,Coordinate Reference System,32748,7311,DGN-95 / UTM zone 48S,Datum Geodesi Nasional 1995 (DGN-95) is a synonym for WGS 84 in Indonesia.
-1983,Coordinate Reference System,32749,7311,DGN-95 / UTM zone 49S,Datum Geodesi Nasional 1995 (DGN-95) is a synonym for WGS 84 in Indonesia.
-1984,Coordinate Reference System,32750,7311,DGN-95 / UTM zone 50S,Datum Geodesi Nasional 1995 (DGN-95) is a synonym for WGS 84 in Indonesia.
-1985,Coordinate Reference System,32751,7311,DGN-95 / UTM zone 51S,Datum Geodesi Nasional 1995 (DGN-95) is a synonym for WGS 84 in Indonesia.
-1986,Coordinate Reference System,32752,7311,DGN-95 / UTM zone 52S,Datum Geodesi Nasional 1995 (DGN-95) is a synonym for WGS 84 in Indonesia.
-1987,Coordinate Reference System,32753,7311,DGN-95 / UTM zone 53S,Datum Geodesi Nasional 1995 (DGN-95) is a synonym for WGS 84 in Indonesia.
-1988,Coordinate Reference System,32754,7311,DGN-95 / UTM zone 54S,Datum Geodesi Nasional 1995 (DGN-95) is a synonym for WGS 84 in Indonesia.
-1990,Coordinate Reference System,4326,7311,DGN-95,Datum Geodesi Nasional 1995 (DGN-95) is a synonym for WGS 84 in Indonesia.
-1991,Coordinate Reference System,4327,7311,DGN-95 (geographic 3D),Datum Geodesi Nasional 1995 (DGN-95) is a synonym for WGS 84 in Indonesia.
-1992,Coordinate Reference System,4328,7311,DGN-95 (geocentric),Datum Geodesi Nasional 1995 (DGN-95) is a synonym for WGS 84 in Indonesia.
-1993,Datum,6326,7311,DGN-95,Datum Geodesi Nasional 1995 (DGN-95) is a synonym for WGS 84 in Indonesia.
-1994,Coordinate_Operation,1814,7301,Genuk to WGS 84 (3),
-1996,Datum,6820,7302,Segara (Jakarta),
-1997,Datum,6613,7302,Segara,
-1998,Datum,6613,7301,Samboja,Samboja-1 is one of two stations used as the baseline for extension to government triangulation by Total Indonesia in 1970-71.
-1999,Datum,6613,7301,P2 Exc,P2 Exc is one of two stations used as the baseline for extension to government triangulation by Total Indonesia in 1970-71. P2 Exc is a replacement satellite station to the destroyed station P2.
-2000,Datum,6613,7301,P2 Exc-T9,P2 Exc was a replacement satellite station to the destroyed station P2 from which several Toran stations including T9 were coordinated in 1970-71. When further control work was executed in 1995 P2 Exc was by then destroyed and T9 was used as its origin.
-2001,Coordinate Reference System,4613,7301,Samboja,Oil industry extension in the Mahakam delta region. Also known as P2 Exc and P2 Exc-T9.
-2002,Coordinate Reference System,4613,7301,P2 Exc-T9,Oil industry extension in the Mahakam delta region. Also known as P2 Exc and Samboja.
-2003,Coordinate Reference System,4613,7301,P2 Exc,Oil industry extension in the Mahakam delta region. Also known as P2 Exc-T9 and Samboja.
-2004,Coordinate_Operation,1838,7301,Samboja to WGS 84 (4),
-2005,Coordinate_Operation,1838,7301,P2 Exc-T9 to WGS 84 (4),
-2006,Datum,6614,7302,QND95,
-2008,Coordinate Reference System,2933,7301,Samboja / UTM zone 50S,
-2009,Coordinate Reference System,2933,7301,P2 Exc-T9 / UTM zone 50S,
-2010,Unit of Measure,9110,7301,sexagesimal degree,
-2011,Coordinate Reference System,2952,7301,NAD83(CSRS) / SCoPQ zone 10,
-2012,Coordinate Reference System,2945,7301,NAD83(CSRS) / SCoPQ zone 3,
-2013,Coordinate Reference System,2946,7301,NAD83(CSRS) / SCoPQ zone 4,
-2014,Coordinate Reference System,2947,7301,NAD83(CSRS) / SCoPQ zone 5,
-2015,Coordinate Reference System,2948,7301,NAD83(CSRS) / SCoPQ zone 6,
-2016,Coordinate Reference System,2949,7301,NAD83(CSRS) / SCoPQ zone 7,
-2017,Coordinate Reference System,2950,7301,NAD83(CSRS) / SCoPQ zone 8,
-2018,Coordinate Reference System,2951,7301,NAD83(CSRS) / SCoPQ zone 9,
-2019,Coordinate_Operation,18071,7301,Green Belt,
-2020,Coordinate Reference System,22991,7301,Egypt 1907 / Green Belt,
-2021,Coordinate_Operation Parameter,8806,7301,False westing,"This alias applies only in the case of projection methods which have an axis positive west, e.g. Transverse Mercator (South Orientated)."
-2022,Coordinate_Operation Parameter,8807,7301,False southing,"This alias applies only in the case of projection methods which have an axis positive south, e.g. Transverse Mercator (South Orientated)."
diff --git a/src/tiff/csv/area.csv b/src/tiff/csv/area.csv
deleted file mode 100644
index 3e0fe93..0000000
--- a/src/tiff/csv/area.csv
+++ /dev/null
@@ -1,1751 +0,0 @@
-"AREA_CODE","AREA_NAME","AREA_OF_USE","ISO_A2_CODE","ISO_A3_CODE","ISO_N_CODE","REMARKS","INFORMATION_SOURCE","DATA_SOURCE","REVISION_DATE","CHANGE_ID","DEPRECATED"
-1118,China - Hong Kong,China - Hong Kong special administrative region.,HK,HKG,344,"""Hong Kong"" in ISO 3166",EPSG,EPSG,2002-06-22 00:00:00,2002.16,0
-1119,Hungary,Hungary.,HU,HUN,348,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1120,Iceland,Iceland.,IS,ISL,352,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1121,India,India.,IN,IND,356,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1122,Indonesia,Indonesia.,ID,IDN,360,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1123,"Iran, Islamic Republic of",Islamic Republic of Iran,IR,IRN,364,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1124,Iraq,Iraq.,IQ,IRQ,368,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1125,Ireland,Ireland.,IE,IRL,372,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1126,Israel,Israel.,IL,ISR,376,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1127,Italy,Italy.,IT,ITA,380,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1128,Jamaica,Jamaica.,JM,JAM,388,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1129,Japan,Japan.,JP,JPN,392,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1130,Jordan,Jordan.,JO,JOR,400,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1131,Kazakstan,Kazakstan.,KZ,KAZ,398,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1132,Kenya,Kenya.,KE,KEN,404,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1133,Kiribati,Kiribati.,KI,KIR,296,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1134,"Korea, Democratic People's Republic of (North Korea)",Democratic People's Republic of Korea (North Korea).,KP,PRK,408,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1135,"Korea, Republic of (South Korea)",Republic of Korea (South Korea).,KR,KOR,410,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1136,Kuwait,Kuwait.,KW,KWT,414,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1137,Kyrgyzstan,Kyrgyzstan.,KG,KGZ,417,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1138,Lao People's Democratic Republic (Laos).,Lao People's Democratic Republic (Laos).,LA,LAO,418,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1139,Latvia,Latvia.,LV,LVA,428,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1140,Lebanon,Lebanon.,LB,LBN,422,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1141,Lesotho,Lesotho.,LS,LSO,426,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1142,Liberia,Liberia.,LR,LBR,430,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1143,Libyan Arab Jamahiriya,Libyan Arab Jamahiriya.,LY,LBY,434,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1144,Liechtenstein,Liechtenstein.,LI,LIE,438,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1145,Lithuania,Lithuania.,LT,LTU,440,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1146,Luxembourg,Luxembourg.,LU,LUX,442,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1147,China - Macau,China - Macau special administrative region.,MO,MAC,446,"""Macau"" in ISO 3166.",EPSG,EPSG,2002-06-22 00:00:00,2002.16,0
-1148,"Macedonia, The Former Yugoslav Republic of",The Former Yugoslav Republic of Macedonia.,MK,MKD,807,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1149,Madagascar,Madagascar.,MG,MDG,450,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1150,Malawi,Malawi.,MW,MWI,454,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1151,Malaysia,Malaysia.,MY,MYS,458,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1152,Maldives,Maldives.,MV,MDV,462,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1153,Mali,Mali.,ML,MLI,466,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1154,Malta,Malta.,MT,MLT,470,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1155,Marshall Islands,Marshall Islands.,MH,MHL,584,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1156,Martinique,Martinique.,MQ,MTQ,474,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1157,Mauritania,Mauritania.,MR,MRT,478,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1158,Mauritius,Mauritius.,MU,MUS,480,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1159,Mayotte,Mayotte.,YT,MYT,175,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1160,Mexico,Mexico.,MX,MEX,484,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1161,"Micronesia, Federated States of",Federated States of Micronesia.,FM,FSM,583,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1162,"Moldova, Republic of",Republic of Moldova,MD,MDA,498,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1163,Monaco,Monaco.,MC,MCO,492,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1164,Mongolia,Mongolia.,MN,MNG,496,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1165,Montserrat,Montserrat.,MS,MSR,500,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1166,Morocco,Morocco.,MA,MAR,504,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1167,Mozambique,Mozambique.,MZ,MOZ,508,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1168,Myanmar (Burma),Myanmar (Burma).,MM,MMR,104,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/isoISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1169,Namibia,Namibia.,NA,NAM,516,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1170,Nauru,Nauru.,NR,NRU,520,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1171,Nepal,Nepal.,NP,NPL,524,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1172,Netherlands,Netherlands.,NL,NLD,528,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1173,Netherlands Antilles,Netherlands Antilles.,AN,ANT,530,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1174,New Caledonia,New Caledonia.,NC,NCL,540,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1175,New Zealand,New Zealand.,NZ,NZL,554,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1176,Nicaragua,Nicaragua.,NI,NIC,558,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1177,Niger,Niger.,NE,NER,562,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1178,Nigeria,Nigeria.,NG,NGA,566,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1179,Niue,Niue.,NU,NIU,570,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1180,Norfolk Island,Norfolk Island.,NF,NFK,574,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1181,Northern Mariana Islands,Northern Mariana Islands.,MP,MNP,580,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1182,Norway,Norway.,NO,NOR,578,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1183,Oman,Oman.,OM,OMN,512,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1184,Pakistan,Pakistan.,PK,PAK,586,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1185,Palau,Palau.,PW,PLW,585,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1186,Panama,Panama.,PA,PAN,591,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1187,Papua New Guinea (PNG),Papua New Guinea (PNG).,PG,PNG,598,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1188,Paraguay,Paraguay.,PY,PRY,600,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1189,Peru,Peru.,PE,PER,604,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1190,Philippines,Philippines.,PH,PHL,608,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1191,Pitcairn,Pitcairn.,PN,PCN,612,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1192,Poland,Poland.,PL,POL,616,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1193,Portugal,Portugal.,PT,PRT,620,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1194,Puerto Rico,Puerto Rico.,PR,PRI,630,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1195,Qatar,Qatar.,QA,QAT,634,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1196,Reunion,Reunion.,RE,REU,638,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1197,Romania,Romania.,RO,ROU,642,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1198,Russian Federation,Russian Federation.,RU,RUS,643,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1199,Rwanda,Rwanda.,RW,RWA,646,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1200,Saint Kitts and Nevis,Saint Kitts and Nevis.,KN,KNA,659,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1201,Saint Lucia,Saint Lucia.,LC,LCA,662,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1202,Saint Vincent and the Grenadines,Saint Vincent and the Grenadines.,VC,VCT,670,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1203,Samoa,Samoa.,WS,WSM,882,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1204,San Marino,San Marino.,SM,SMR,674,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1205,Sao Tome and Principe,Sao Tome and Principe.,ST,STP,678,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1206,Saudi Arabia,Saudi Arabia.,SA,SAU,682,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1207,Senegal,Senegal.,SN,SEN,686,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1208,Seychelles,Seychelles.,SC,SYC,690,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1209,Sierra Leone,Sierra Leone.,SL,SLE,694,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1210,Singapore,Singapore.,SG,SGP,702,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1211,Slovakia (Slovak Republic),Slovakia (Slovak Republic).,SK,SVK,703,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1212,Slovenia,Slovenia.,SI,SVN,705,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1213,Solomon Islands,Solomon Islands.,SB,SLB,90,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1214,Somalia,Somalia.,SO,SOM,706,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1215,South Africa,South Africa.,ZA,ZAF,710,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1216,South Georgia and the South Sandwich Islands,South Georgia and the South Sandwich Islands.,GS,SGS,239,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1217,Spain,Spain.,ES,ESP,724,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1218,Sri Lanka,Sri Lanka.,LK,LKA,144,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1219,Saint Helena,Saint Helena.,SH,SHN,654,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1220,Saint Pierre and Miquelon,Saint Pierre and Miquelon.,PM,SPM,666,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1221,Sudan,Sudan.,SD,SDN,736,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1222,Suriname,Suriname.,SR,SUR,740,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1223,Svalbard and Jan Mayen,Svalbard and Jan Mayen.,SJ,SJM,744,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1224,Swaziland,Swaziland.,SZ,SWZ,748,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1225,Sweden,Sweden.,SE,SWE,752,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1226,Switzerland,Switzerland.,CH,CHE,756,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1227,Syrian Arab Republic,Syrian Arab Republic.,SY,SYR,760,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1228,"Taiwan, Province of China","Taiwan, Province of China",TW,TWN,158,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1229,Tajikistan,Tajikistan.,TJ,TJK,762,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1230,"Tanzania, United Republic of",United Republic of Tanzania.,TZ,TZA,834,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1231,Thailand,Thailand.,TH,THA,764,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1232,Togo,Togo.,TG,TGO,768,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1233,Tokelau,Tokelau.,TK,TKL,772,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1234,Tonga,Tonga.,TO,TON,776,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1235,Trinidad and Tobago,Trinidad and Tobago.,TT,TTO,780,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1236,Tunisia,Tunisia.,TN,TUN,788,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1237,Turkey,Turkey.,TR,TUR,792,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1238,Turkmenistan,Turkmenistan.,TM,TKM,795,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1239,Turks and Caicos Islands,Turks and Caicos Islands.,TC,TCA,796,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1240,Tuvalu,Tuvalu.,TV,TUV,798,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1241,Uganda,Uganda.,UG,UGA,800,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1242,Ukraine,Ukraine.,UA,UKR,804,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1243,United Arab Emirates (UAE),United Arab Emirates (UAE).,AE,ARE,784,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1244,United Kingdom (UK),United Kingdom (UK).,GB,GBR,826,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1245,United States (USA),United States (USA).,US,USA,840,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1246,United States Minor Outlying Islands,United States Minor Outlying Islands,UM,UMI,581,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1247,Uruguay,Uruguay.,UY,URY,858,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1248,Uzbekistan,Uzbekistan.,UZ,UZB,860,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1249,Vanuatu,Vanuatu.,VU,VUT,548,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1250,Holy See (Vatican City State),Holy See (Vatican City State),VA,VAT,336,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1251,Venezuela,Venezuela.,VE,VEN,862,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1252,Vietnam,Vietnam.,VN,VNM,704,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1253,"Virgin Islands, British",British Virgin Islands.,VG,VGB,92,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1254,"Virgin Islands, US",US Virgin Islands.,VI,VIR,850,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1255,Wallis and Futuna,Wallis and Futuna.,WF,WLF,876,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1256,Western Sahara,Western Sahara.,EH,ESH,732,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1257,Yemen,Yemen.,YE,YEM,887,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1258,Yugoslavia,Yugoslavia.,YU,YUG,891,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1259,"Congo, The Democratic Republic of the Congo (Zaire)",The Democratic Republic of the Congo (Zaire).,CD,COD,180,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1260,Zambia,Zambia.,ZM,ZMB,894,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1261,Zimbabwe,Zimbabwe.,ZW,ZWE,716,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1262,World,World.,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-1263,Not specified,Not specified.,,,,,EPSG,EPSG,2000-06-23 00:00:00,,0
-1264,UK - Great Britain onshore,United Kingdom (UK) - Great Britain - England  Scotland  Wales - onshore; Isle of Man.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-1265,Argentina - Comodoro Rivadavia,Argentina - Comodoro Rivadavia area.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1266,Venezuela - Puerto La Cruz,Venezuela - Puerto La Cruz area.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1267,Venezuela - Barinas,Venezuela - Barinas area.,,,,,EPSG,EPSG,2000-06-23 00:00:00,,0
-1268,Venezuela - Falcon state,Venezuela - Falcon state.,,,,,EPSG,EPSG,2000-06-23 00:00:00,,0
-1269,Venezuela - Pedregal area of Falcon state,Venezuela - Pedregal area of Falcon state.,,,,,EPSG,EPSG,2000-06-23 00:00:00,,0
-1270,Venezuela - Maracaibo south,Venezuela - south Maracaibo area.,,,,,EPSG,EPSG,2000-06-23 00:00:00,,0
-1271,Africa - Ethiopia and Sudan,Ethiopia; Sudan.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1272,Asia - Middle East - Kuwait and Saudi,Kuwait; Saudi Arabia.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1273,Antigua,Antigua and Barbuda - Antigua.,,,,,EPSG,EPSG,1999-04-22 00:00:00,,0
-1274,Brazil - Aratu,Brazil - coastal areas south of 2 deg 55 min South.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1275,Netherlands - onshore,Netherlands - onshore.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-1276,"Africa - Botswana, Malawi, Zambia, Zimbabwe.",Botswana; Malawi; Zambia; Zimbabwe.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1277,"Africa - Kenya, Tanzania and Uganda",Kenya; Tanzania; Uganda.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1278,Antarctica - Australian sector,Antarctica - Australian sector.,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-1279,Australasia - Australia and PNG - AGD66,Australia - Australian Capital Territory (ACT); New South Wales (NSW); Northern Territory (NT); Tasmania; Victoria.  Papua New Guinea (PNG).,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1280,Australia - Western Australia (WA),Australia - Western Australia (WA).,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-1281,Australia - mainland,Australia - Australian Capital Territory (ACT); New South Wales (NSW); Northern Territories (NT); Queensland; South Australia (SA); Western Australia (WA); Victoria.,,,,,EPSG,EPSG,1996-09-12 00:00:00,,0
-1282,Australia - Tasmania,Australia - Tasmania.,,,,,EPSG,EPSG,1996-09-12 00:00:00,,0
-1283,Canada - Maritime Provinces,Canada - New Brunswick; Nova Scotia; Prince Edward Island.,,,,,EPSG,EPSG,1997-07-22 00:00:00,,0
-1284,Europe - Soviet Union,Armenia;  Azerbaijan;  Belorus;  Estonia;  Georgia;  Kazakstan;  Kirgizstan;  Latvia;  Lithuania;  Moldavia;  Russian Federation;  Tadzhikistan;  Turkmenistan;  Ukraine;  Uzbekistan.,,,,,EPSG,EPSG,1996-09-12 00:00:00,,0
-1285,Indonesia - Java,Indonesia - Java.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1286,Europe - Liechtenstein and Switzerland.,Liechtenstein; Switzerland.,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-1287,Indonesia - Banga & Belitung Islands.,Indonesia - Banga & Belitung Islands.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1288,Angola - Angola proper,Angola - Angola proper,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1289,Canada - CVD28,Canada - Alberta; British Columbia; Manitoba; New Brunswick; Nova Scotia; Ontario; Prince Edward Island; Quebec; Saskatchewan.,,,,,EPSG,EPSG,1996-12-12 00:00:00,,0
-1290,Africa - Botswana and South Africa.,Botswana; South Africa.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1291,Asia - Caspian Sea,Azerbaijan - offshore; Kazakstan - offshore;  Russian Federation - Caspian Sea;  Turkmenistan - offshore.,,,,,EPSG,EPSG,1996-09-12 00:00:00,,0
-1292,Argentina - Neuquen province,Argentina - Neuquen province.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1024,Afghanistan,Afghanistan.,AF,AFG,4,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1025,Albania,Albania.,AL,ALB,8,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1026,Algeria,Algeria.,DZ,DZA,12,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1027,American Samoa,American Samoa.,AS,ASM,16,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1028,Andorra,Andorra.,AD,AND,20,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1029,Angola,Angola.,AO,AGO,24,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1030,Anguilla,Anguilla.,AI,AIA,660,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1031,Antarctica,Antarctica.,AQ,ATA,10,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1032,Antigua and Barbuda,Antigua and Barbuda.,AG,ATG,28,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1033,Argentina,Argentina.,AR,ARG,32,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1034,Armenia,Armenia.,AM,ARM,51,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1035,Aruba,Aruba.,AW,ABW,533,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1036,Australia,Australia.,AU,AUS,36,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1037,Austria,Austria.,AT,AUT,40,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1038,Azerbaijan,Azerbaijan.,AZ,AZE,31,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1039,Bahamas,Bahamas.,BS,BHS,44,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1040,Bahrain,Bahrain.,BH,BHR,48,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1041,Bangladesh,Bangladesh.,BD,BGD,50,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1042,Barbados,Barbados.,BB,BRB,52,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1043,Belarus,Belarus.,BY,BLR,112,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1044,Belgium,Belgium.,BE,BEL,56,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1045,Belize,Belize.,BZ,BLZ,84,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1046,Benin,Benin.,BJ,BEN,204,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1047,Bermuda,Bermuda.,BM,BMU,60,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1048,Bhutan,Bhutan.,BT,BTN,64,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1049,Bolivia,Bolivia.,BO,BOL,68,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1050,Bosnia and Herzegowina,Bosnia and Herzegowina.,BA,BIH,70,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1051,Botswana,Botswana.,BW,BWA,72,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1052,Bouvet Island,Bouvet Island.,BV,BVT,74,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1053,Brazil,Brazil.,BR,BRA,76,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1054,British Indian Ocean Territory,British Indian Ocean Territory.,IO,IOT,86,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1055,Brunei Darussalam,Brunei Darussalam.,BN,BRN,96,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1056,Bulgaria,Bulgaria.,BG,BGR,100,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1057,Burkina Faso,Burkina Faso.,BF,BFA,854,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1058,Burundi,Burundi.,BI,BDI,108,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1059,Cambodia,Cambodia.,KH,KHM,116,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1060,Cameroon,Cameroon.,CM,CMR,120,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1061,Canada,Canada - Alberta; British Columbia; Manitoba; New Brunswick; Newfoundland; Northwest Territories; Nova Scotia; Nunavut; Ontario; Prince Edward Island; Quebec; Saskatchewan; Yukon.,CA,CAN,124,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1062,Cape Verde,Cape Verde.,CV,CPV,132,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1063,Cayman Islands,Cayman Islands.,KY,CYM,136,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1064,Central African Republic,Central African Republic.,CF,CAF,140,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1065,Chad,Chad.,TD,TCD,148,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1066,Chile,Chile.,CL,CHL,152,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1067,China,China.,CN,CHN,156,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1068,Christmas Island,Christmas Island.,CX,CXR,162,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1069,Cocos (Keeling) Islands,Cocos (Keeling) Islands.,CC,CCK,166,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1070,Colombia,Colombia.,CO,COL,170,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1071,Comoros,Comoros.,KM,COM,174,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1072,Congo,Congo.,CG,COG,178,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1073,Cook Islands,Cook Islands.,CK,COK,184,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1074,Costa Rica,Costa Rica.,CR,CRI,188,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1075,Cote d'Ivoire (Ivory Coast),C�te d'Ivoire (Ivory Coast).,CI,CIV,384,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1076,Croatia,Croatia.,HR,HRV,191,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1077,Cuba,Cuba.,CU,CUB,192,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1078,Cyprus,Cyprus.,CY,CYP,196,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1079,Czech Republic,Czech Republic.,CZ,CZE,203,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1080,Denmark,Denmark.,DK,DNK,208,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1081,Djibouti,Djibouti.,DJ,DJI,262,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1082,Dominica,Dominica.,DM,DMA,212,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1083,Dominican Republic,Dominican Republic.,DO,DOM,214,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1084,East Timor,East Timor.,TP,TMP,626,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1085,Ecuador,Ecuador.,EC,ECU,218,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1086,Egypt,Egypt.,EG,EGY,818,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1087,El Salvador,El Salvador.,SV,SLV,222,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1088,Equatorial Guinea,Equatorial Guinea.,GQ,GNQ,226,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1089,Eritrea,Eritrea.,ER,ERI,232,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1090,Estonia,Estonia.,EE,EST,233,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1091,Ethiopia,Ethiopia.,ET,ETH,231,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1092,Falkland Islands (Malvinas),Falkland Islands (Malvinas).,FK,FLK,238,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1093,Faroe Islands,Faroe Islands.,FO,FRO,234,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1094,Fiji,Fiji.,FJ,FJI,242,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1095,Finland,Finland.,FI,FIN,246,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1096,France,France.,FR,FRA,250,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1097,French Guiana,French Guiana.,GF,GUF,254,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1098,French Polynesia,French Polynesia.,PF,PYF,258,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1099,French Southern Territories,French Southern Territories.,TF,ATF,260,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1100,Gabon,Gabon.,GA,GAB,266,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1101,Gambia,Gambia.,GM,GMB,270,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1102,Georgia,Georgia.,GE,GEO,268,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1103,Germany,Germany.,DE,DEU,276,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1104,Ghana,Ghana.,GH,GHA,288,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1105,Gibraltar,Gibraltar.,GI,GIB,292,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1106,Greece,Greece.,GR,GRC,300,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1107,Greenland,Greenland.,GL,GRL,304,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1108,Grenada,Grenada.,GD,GRD,308,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1109,Guadeloupe,Guadeloupe.,GP,GLP,312,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1110,Guam,Guam.,GU,GUM,316,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1111,Guatemala,Guatemala.,GT,GTM,320,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1112,Guinea,Guinea.,GN,GIN,324,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1113,Guinea-Bissau,Guinea-Bissau.,GW,GNB,624,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1114,Guyana,Guyana.,GY,GUY,328,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1115,Haiti,Haiti.,HT,HTI,332,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1116,Heard Island and McDonald Islands,Heard Island and McDonald Islands.,HM,HMD,334,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1117,Honduras,Honduras.,HN,HND,340,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,2002.341,0
-1293,Brazil - Corrego Alegre,Brazil - NE coastal area between 45 deg W and 40 deg West.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1294,Portugal - onshore,Portugal - onshore.,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-1295,Germany - DHDN,"Germany - onshore - Baden-Wurtemberg, Bayern, Hessen, Niedersachsen, Nordrhein-Westfalen, Rheinland-Pfalz, Saarland, Schleswig-Holstein. Also former DDR states of Sachsen and Thuringen by transformation.",,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-1296,Europe - ED50,Europe - west - Denmark; Faroe Islands; France offshore; Italy; Ireland offshore; Netherlands offshore; Germany offshore; Greece (offshore); North Sea; Norway; Spain; Turkey; United Kingdom UKCS offshore. Egypt - Western Desert.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1297,Europe - ED87,Europe - west.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1298,Europe - ETRS89,Europe: Austria; Belgium; Bosnia and Herzegovina; Croatia; Czech Republic; Denmark; Estonia; Finland; France; Germany; Hungary; Italy; Latvia; Liechtenstein; Lithuania; Luxembourg; Netherlands; Norway; Poland; Portugal; Romania; Slovakia; Slovenia; Spain; Sweden; Switzerland; United Kingdom (UK).,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-1299,Europe - EVRF2000,Europe: Austria; Belgium; Bosnia and Herzegovina; Croatia; Czech Republic; Denmark; Estonia; Finland; France; Germany; Hungary; Italy; Latvia; Liechtenstein; Lithuania; Luxembourg; Netherlands; Norway; Poland; Portugal; Romania; Slovakia; Slovenia; Spain; Sweden; Switzerland; United Kingdom (UK).,,,,,EPSG,EPSG,2001-09-03 00:00:00,,0
-1300,Iran - FD58,Islamic Republic of Iran - Gulf coast and Arwaz areas.,,,,,EPSG,EPSG,1998-11-11 00:00:00,,0
-1301,Portugal - central Azores,"Portugal - central Azores - Graciosa, Terceira, Sao Jorge, Pico, Faial.",,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-1302,Asia - Cambodia and Vietnam,Cambodia; Vietnam.,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-1303,South America - Tierra del Fuego.,Argentina and Chile - Tierra del Fuego.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1304,Asia - Myanmar and Thailand,Myanmar (Burma); Thailand.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1305,Europe - Ireland (Republic and Ulster),Ireland. United Kingdom (UK) - Northern Ireland (Ulster).,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-1306,Europe - Czechoslovakia,Czech Republic; Slovakia.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1307,Asia - Bangladesh; India; Myanmur; Pakistan.,Bangladesh; India; Myanmar (Burma); Pakistan.,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-1308,Asia - Bangladesh; India; Pakistan.,Bangladesh; India; Pakistan.,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-1309,Asia - Malaysia (west) and Singapore.,Malaysia - West Malaysia; Singapore.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1310,Kuwait - Kuwait City,Kuwait - Kuwait City.,,,,,EPSG,EPSG,1996-04-12 00:00:00,,0
-1311,Venezuela - Cabinas,Venezuela - Cabinas area.,,,,,EPSG,EPSG,2000-06-23 00:00:00,,0
-1312,Venezuela - Lake Maracaibo,Venezuela - Lake Maracaibo area.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1313,Venezuela - Loma Quintana,Venezuela - north.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1314,Portugal - Madeira islands,"Portugal - Madeira, Porto Santo and Desertas islands.",,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-1315,Mozambique - west.,Mozambique - west.,,,,,EPSG,EPSG,1998-04-16 00:00:00,,0
-1316,Indonesia - Sulawesi SW,Indonesia - south west Sulawesi.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1317,Angola - Cabinda offshore,Angola - Cabinda offshore.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1318,Angola - Cabinda,Angola - Cabinda,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1319,Venezuela - Maracaibo area,Venezuela - Maracaibo area.,,,,,EPSG,EPSG,2000-06-23 00:00:00,,0
-1320,Venezuela - Maturin,Venezuela - Maturin area.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1321,Europe - MGI,"Austria. Bosnia and Herzegowina. Croatia. FYR Macedonia. Slovenia. Yugoslavia (Serbia, Montenegro).",,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1322,Trinidad and Tobago - Tobago,Trinidad and Tobago - Tobago.,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-1323,USA - conus,United States (USA) - Alabama; Arizona; Arkansas; California; Colorado; Connecticut; Delaware; Florida; Georgia; Idaho; Illinois; Indiana; Iowa; Kansas; Kentucky; Louisiana; Maine; Maryland; Massachusetts; Michigan; Minnesota; Mississippi; Missouri; Montana; Nebraska; Nevada; New Hampshire; New Jersey; New Mexico; New York; North Carolina; North Dakota; Ohio; Oklahoma; Oregon; Pennsylvania; Rhode Island; South Carolina; South Dakota; Tennessee; Texas; Utah; Vermont; Virg [...]
-1324,USA (all states),United States (USA) - Alabama; Alaska; Arizona; Arkansas; California; Colorado; Connecticut; Delaware; Florida; Georgia; Hawaii; Idaho; Illinois; Indiana; Iowa; Kansas; Kentucky; Louisiana; Maine; Maryland; Massachusetts; Michigan; Minnesota; Mississippi; Missouri; Montana; Nebraska; Nevada; New Hampshire; New Jersey; New Mexico; New York; North Carolina; North Dakota; Ohio; Oklahoma; Oregon; Pennsylvania; Rhode Island; South Carolina; South Dakota; Tennessee; Texas [...]
-1325,North America - all Canada and USA subunits,North America: Canada - Alberta; British Columbia; Manitoba; New Brunswick; Newfoundland; North West Territories; Nova Scotia; Nunavet; Ontario; Prince Edward Island; Quebec; Saskatchewan; Yukon. United States (USA) - Alabama; Alaska; Arizona; Arkansas; California; Colorado; Connecticut; Delaware; Florida; Georgia; Idaho; Illinois; Indiana; Iowa; Kansas; Kentucky; Louisiana; Maine; Maryland; Massachusetts; Michigan; Minnesota; Mississippi; [...]
-1326,France - mainland,France - mainland.,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-1327,France - Corsica,France - Corsica.,,,,,EPSG,EPSG,1996-09-12 00:00:00,,0
-1328,Indonesia - Kalimantan E - Mahakam delta,Indonesia - east Kalimantan - Mahakam delta area.,,,,,EPSG,EPSG,1997-11-13 00:00:00,,0
-1329,Mozambique - south,Mozambique - south.,,,,,EPSG,EPSG,1998-04-16 00:00:00,,0
-1330,USA - Alaska,United States (USA) - Alaska,,,,,EPSG,EPSG,2001-09-03 00:00:00,,0
-1331,USA - Alaska - St. George Island,United States (USA) - Alaska - St. George Island.,,,,,EPSG,EPSG,1999-05-24 00:00:00,,0
-2040,WGS84 / UTM zone 21N,Between 60 and 54 deg West; northern hemisphere. Barbados. Brazil. Canada - Newfoundland; Quebec. French Guiana. Greenland. Guyana. St. Pierre and Miquelon. Suriname.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2041,WGS84 / UTM zone 21S,Between 60 and 54 deg West; southern hemisphere. Argentina. Bolivia. Brazil. Falkland Islands (Malvinas). Paraguay. Uruguay.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2042,WGS84 / UTM zone 22N,Between 54 and 48 deg West; northern hemisphere. Brazil. Canada - Newfoundland. French Guiana. Greenland.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2043,WGS84 / UTM zone 22S,Between 54 and 48 deg West; southern hemisphere. Brazil.  Uruguay.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2044,WGS84 / UTM zone 23N,Between 48 and 42 deg West; northern hemisphere. Greenland.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2045,WGS84 / UTM zone 23S,Between 48 and 42 deg West; southern hemisphere. Brazil.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2046,WGS84 / UTM zone 24N,Between 42 and 36 deg West; northern hemisphere. Greenland.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2047,WGS84 / UTM zone 24S,Between 42 and 36 deg West; southern hemisphere. Brazil. South Georgia and the South Sandwich Islands.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2048,WGS84 / UTM zone 25N,Between 36 and 30 deg West; northern hemisphere. Greenland.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2049,WGS84 / UTM zone 25S,Between 36 and 30 deg West; southern hemisphere. Brazil.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2050,WGS84 / UTM zone 26N,Between 30 and 24 deg West; northern hemisphere. Greenland. Iceland.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2051,WGS84 / UTM zone 26S,Between 30 and 24 deg West; southern hemisphere.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2052,WGS84 / UTM zone 27N,Between 24 and 18 deg West; northern hemisphere. Greenland. Iceland.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2053,WGS84 / UTM zone 27S,Between 24 and 18 deg West; southern hemisphere.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2054,WGS84 / UTM zone 28N,Between 18 and 12 deg West; northern hemisphere. Gambia. Greenland. Guinea. Guinea-Bissau. Iceland. Ireland - offshore Porcupine Basin. Mauritania. Morocco. Senegal. Sierra Leone. Western Sahara.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2055,WGS84 / UTM zone 28S,Between 18 and 12 deg West; southern hemisphere.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2056,WGS84 / UTM zone 29N,Between 12 and 6 deg West; northern hemisphere. Algeria. Cote D'Ivoire (Ivory Coast). Faroe Islands. Guinea. Ireland. Mali. Mauritania. Morocco. Portugal. Sierra Leone. Spain. United Kingdom (UK). Western Sahara.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2057,WGS84 / UTM zone 29S,Between 12 and 6 deg West; southern hemisphere.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2058,WGS84 / UTM zone 30N,Between 6 deg West and 0 deg East; northern hemisphere. Algeria. Burkino Faso. Cote' Ivoire (Ivory Coast). Faroe Islands - offshore. France. Ghana. Gibraltar. Ireland - offshore Irish Sea. Mali. Mauritania. Morocco. Spain. United Kingdom (UK).,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2059,WGS84 / UTM zone 30S,Between 6 deg West and 0 deg East; southern hemisphere.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2060,WGS84 / UTM zone 31N,Between 0 and 6 deg East; northern hemisphere. Algeria. Andorra. Benin. Bukino Faso. Denmark - North Sea. France. Germany - North Sea. Ghana. Luxembourg. Mali. Netherlands. Niger. Nigeria. Norway. Spain. Togo. United Kingdom (UK) - North Sea.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2061,WGS84 / UTM zone 31S,Between 0 and 6 deg East; southern hemisphere.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2062,WGS84 / UTM zone 32N,Between 6 and 12 deg East; northern hemisphere. Algeria. Austria. Cameroon. Denmark. Equatorial Guinea. France. Gabon. Germany. Italy. Libya. Liechtenstein. Monaco. Netherlands. Niger. Nigeria. Norway. Sao Tome and Principe. Svalbard and Jan Mayen Islands. Sweden. Switzerland. Tunisia. Vatican City State.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2063,WGS84 / UTM zone 32S,Between 6 and 12 deg East; southern hemisphere. Angola. Congo. Gabon. Namibia.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2064,WGS84 / UTM zone 33N,Between 12 and 18 deg East; northern hemisphere. Austria. Bosnia and Herzegowina. Cmeroon. Central African Republic. Chad. Congo. Croatia. Czech Republic. Democratic Republic of the Congo (Zaire). Gabon. Germany. Hungary. Italy. Libya. Malta. Niger. Nigeria. Norway. Poland. San Marino. Slovakia. Slovenia. Svalbard and Jan Mayen Islands. Sweden.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2065,WGS84 / UTM zone 33S,Between 12 and 18 deg East; southern hemisphere. Angola. Congo. Democratic Republic of the Congo (Zaire). Gabon. Namibia. South Africa.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2066,WGS84 / UTM zone 34N,Between 18 and 24 deg East; northern hemisphere. Albania. Belarus. Bosnia and Herzegowina. Bulgaria. Central African Republic. Chad. Croatia. Democratic Republic of the Congo (Zaire). Estonia. Finland. FYR Macedonia. Greece. Hungary. Italy. Latvia. Libya. Lithuania. Norway. Poland. Romania. Russian Federation. Slovakia. Sudan. Svalbard. Sweden. Ukraine. Yugoslavia.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2067,WGS84 / UTM zone 34S,Between 18 and 24 deg East; southern hemisphere. Angola. Botswana. Democratic Republic of the Congo (Zaire). Namibia. South Africa. Zambia.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2068,WGS84 / UTM zone 35N,Between 24 and 30 deg East; northern hemisphere. Belarus. Bulgaria. Central African Republic. Democratic Republic of the Congo (Zaire). Egypt. Estonia. Finland. Greece. Latvia. Lesotho. Libya. Lithuania. Moldova. Norway. Romania. Russian Federation. Sudan. Svalbard. Turkey. Uganda. Ukraine.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2069,WGS84 / UTM zone 35S,Between 24 and 30 deg East; southern hemisphere. Botswana. Burundi. Democratic Republic of the Congo (Zaire). Rwanda. South Africa. Tanzania. Uganda. Zambia. Zimbabwe.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2070,WGS84 / UTM zone 36N,Between 30 and 36 deg East; northern hemisphere. Belarus. Cyprus. Egypt. Ethiopia. Finland. Israel. Jordan. Kenya. Lebanon. Norway. Russian Federation. Saudi Arabia. Sudan. Syria. Turkey. Uganda. Ukraine.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2071,WGS84 / UTM zone 36S,Between 30 and 36 deg East; southern hemisphere. Burundi. Kenya. Malawi. Mozambique. Rwanda. South Africa. Swaziland. Tanzania. Uganda. Zambia. Zimbabwe.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2072,WGS84 / UTM zone 37N,Between 36 and 42 deg East; northern hemisphere. Djibouti. Egypt. Eritrea. Ethiopia. Georgia. Iraq. Jordan. Kenya. Lebanon. Russian Federation. Saudi Arabia. Somalia. Sudan. Syria. Turkey. Ukraine.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2073,WGS84 / UTM zone 37S,Between 36 and 42 deg East; southern hemisphere. Kenya. Mozambique. Tanzania.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2074,WGS84 / UTM zone 38N,Between 42 and 48 deg East; northern hemisphere. Armenia. Azerbaijan. Djibouti. Eritrea. Ethiopia. Georgia. Islamic Republic of Iran. Iraq. Kazakstan. Kuwait. Russian Federation. Saudi Arabia. Somalia. Turkey. Yemen.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2075,WGS84 / UTM zone 38S,Between 42 and 48 deg East; southern hemisphere. Madagascar.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2076,WGS84 / UTM zone 39N,Between 48 and 54 deg East; northern hemisphere. Azerbaijan. Bahrain. Islamic Republic of Iran. Kazakstan. Kuwait. Oman. Qatar. Russian Federation. Saudi Arabia. Somalia. Turkmenistan. United Arab Emirates. Yemen.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2077,WGS84 / UTM zone 39S,Between 48 and 54 deg East; southern hemisphere. Madagascar.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2078,WGS84 / UTM zone 40N,Between 54 and 60 deg East; northern hemisphere. Islamic Republic of Iran. Kazakstan. Oman. Russian Federation. Saudi Arabia. Turkmenistan. United Arab Emirates. Uzbekistan.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2079,WGS84 / UTM zone 40S,Between 54 and 60 deg East; southern hemisphere. Seychelles.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2080,WGS84 / UTM zone 41N,Between 60 and 66 deg East; northern hemisphere. Afghanistan. Islamic Republic of Iran. Kazakstan. Pakistan. Russian Federation. Turkmenistan.  Uzbekistan.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2081,WGS84 / UTM zone 41S,Between 60 and 66 deg East; southern hemisphere.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2082,WGS84 / UTM zone 42N,Between 66 and 72 deg East; northern hemisphere. Afghanistan. India. Kazakstan. Kyrgyzstan. Pakistan. Russian Federation. Tajikistan. Uzbekistan.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2083,WGS84 / UTM zone 42S,Between 66 and 72 deg East; southern hemisphere.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2084,WGS84 / UTM zone 43N,Between 72 and 78 deg East; northern hemisphere. China. India. Kazakstan. Kyrgyzstan. Maldives. Pakistan. Russian Federation. Tajikistan.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2085,WGS84 / UTM zone 43S,Between 72 and 78 deg East; southern hemisphere.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1332,USA - Alaska - St. Lawrence Island,United States (USA) - Alaska - St. Lawrence Island.,,,,,EPSG,EPSG,1999-05-24 00:00:00,,0
-1333,USA - Alaska - St. Paul Island,United States (USA) - Alaska - St. Paul Island.,,,,,EPSG,EPSG,1999-05-24 00:00:00,,0
-1334,USA - Hawaii,United States (USA) - Hawaii.,,,,,EPSG,EPSG,1999-05-24 00:00:00,,0
-1335,Caribbean - Puerto Rico and the Virgin Islands,Puerto Rico; Virgin Islands (British); Virgin Islands (US).,,,,,EPSG,EPSG,1999-05-24 00:00:00,,0
-1336,Canada - CSRS98,Canada - Alberta; New Brunswick; Saskatchewan; Prince Edward Island; and Quebec.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,1
-1337,USA and American Samoa HARN,American Samoa. United States (USA) - Alabama; Arizona; Arkansas; California; Colorado; Connecticut; Delaware; Florida; Georgia; Hawaii; Idaho; Illinois; Indiana; Iowa; Kansas; Kentucky; Louisiana; Maine; Maryland; Massachusetts; Michigan; Minnesota; Mississippi; Missouri; Montana; Nebraska; Nevada; New Hampshire; New Jersey; New Mexico; New York; North Dakota; Ohio; Oklahoma; Oregon; Rhode Island; South Dakota; Tennessee; Texas; Utah; Vermont; Virginia;  [...]
-1338,Iran - Taheri refinery,Islamic Republic of Iran - Taheri refinery site only.,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-1339,Trinidad and Tobago - Trinidad,Trinidad and Tobago - Trinidad.,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-1340,Yemen - South Yemen,Yemen - South Yemen.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1341,South America - all countries,"South America - Argentina, Brazil, Bolivia, Chile, Colombia, Ecuador, French Guiana, Guyana, Paraguay, Peru, Suriname, Uruguay, Venezuela.",,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-1342,Sierra Leone - Freetown Peninsula,Sierra Leone - Freetown Peninsula.,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-1343,Germany - east Germany all states,Germany - states of former East Germany (DDR) - Brandenburg; Mecklenburg-Vorpommern; Sachsen; Sachsen-Anhalt; Thuringen.,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-1344,Portugal - western Azores,"Portugal - western Azores - Flores, Corvo.",,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-1345,Portugal - eastern Azores,"Portugal - eastern Azores - Sao Miguel, Santa Maria.",,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-1346,Qatar - onshore,Qatar - onshore.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1347,Belgium - onshore,Belgium - onshore.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-1348,South America - PSAD56,Bolivia; Ecuador; Peru; [Venezuela].,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1349,North America - NAD27,North and central America: Antigua and Barbuda. Belize. Canada - Alberta; British Columbia; Manitoba; New Brunswick; Newfoundland; North West Territories; Nova Scotia; Nunavut; Ontario; Prince Edward Island; Quebec; Saskatchewan; Yukon. Costa Rica. Cuba. El Salvador. Guatemala. Honduras. Mexico. Nicaragua. United States (USA) - Alabama; Alaska; Arizona; Arkansas; California; Colorado; Connecticut; Delaware; Florida; Georgia; Idaho; Illinois; Indiana; Iowa; Kans [...]
-1350,North America - NAD83,North America: Canada - Alberta; British Columbia; Manitoba; New Brunswick; Newfoundland; North West Territories; Nova Scotia; Nunavet; Ontario; Prince Edward Island; Quebec; Saskatchewan; Yukon. Greenland. Mexico. United States (USA) - Alabama; Alaska; Arizona; Arkansas; California; Colorado; Connecticut; Delaware; Florida; Georgia; Hawaii; Idaho; Illinois; Indiana; Iowa; Kansas; Kentucky; Louisiana; Maine; Maryland; Massachusetts; Michigan; Minnesota; Mississ [...]
-1351,Asia - Middle East - Nahrwan,Arabian Gulf; Kuwait; Qatar - offshore; United Arab Emirates (UAE) - Abu Dhabi; Dubai; Sharjah; Ajman; Fujairah; Ras Al Kaimah; Umm Al Qaiwain.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1352,Norway - onshore,Norway - onshore.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1353,France - onshore,France - onshore.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1354,Europe - British Isles - UK and Ireland,Ireland - onshore.  United Kingdom (UK) - onshore - England; Scotland; Wales; Northern Ireland.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1355,Indonesia - Sumatra,Indonesia - Sumatra.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1356,"Asia - Middle East - Israel, Jordan and Palestine Territory",Israel; Jordan; Palestine Territory.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.34,0
-1357,Europe - Pulkovo,Armenia; Azerbaijan; Belarus; Estonia; Georgia; Kazakstan; Kirgistan; Latvia; Lithuania; Moldova; Russian Federation; Tadzhikstan; Turkmenistan; Ukraine; Uzbekistan; Germany (former DDR); Czech Republic; Slovakia; Hungary; Poland; Romania; Latvia; Lithuania; Estonia; Albania.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1358,South America - SAD69,South America - Brazil.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1359,Indonesia - Kalimantan SE,Indonesia - southeast Kalimantan.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1360,Indonesia - Kalimantan E,Indonesia - east Kalimantan.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1361,Sudan - south,Sudan - south.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1362,Asia - Brunei and East Malaysia,Brunei; Malaysia - East Malaysia (Sabah; Sarawak).,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-1363,UAE - Abu Dhabi and Dubai,United Arab Emirates (UAE) - Abu Dhabi; Dubai.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1364,Asia - Japan and Korea,Japan; North Korea; South Korea.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1365,Algeria - N of 32 deg N,Algeria - north of 32 deg North.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1366,"Africa - Algeria, Morocco and Tunisia",Algeria; Morocco; Tunisia.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-1367,Canada - Ontario,Canada - Ontario.,,,,,EPSG,EPSG,1999-05-12 00:00:00,,0
-1368,Canada - Quebec,Canada - Quebec.,,,,,EPSG,EPSG,1999-10-22 00:00:00,,0
-1369,France - Alsace,France - Alsace.,,,,,EPSG,EPSG,1996-09-12 00:00:00,,0
-1370,Venezuela - Deltana,Venezuela - Deltana area.,,,,,EPSG,EPSG,2000-06-23 00:00:00,,0
-1371,Venezuela - Guarico state,Venezuela - Guarico state.,,,,,EPSG,EPSG,2000-06-23 00:00:00,,0
-1372,USA - Alabama,United States (USA) - Alabama.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-1373,USA - Arizona,United States (USA) - Arizona.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-1374,USA - Arkansas,United States (USA) - Arkansas.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-1375,USA - California,United States (USA) - California.,,,,,EPSG,EPSG,2001-09-03 00:00:00,,0
-1376,USA - Colorado,United States (USA) - Colorado.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-1377,USA - Connecticut,United States (USA) - Connecticut - counties of Fairfield; Hartford; Litchfield; Middlesex; New Haven; New London; Tolland; Windham.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-1378,USA - Delaware,United States (USA) - Delaware - counties of Kent; New Castle; Sussex.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-1379,USA - Florida,United States (USA) - Florida.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-1380,USA - Georgia,United States (USA) - Georgia.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-1381,USA - Idaho,United States (USA) - Idaho.,,,,,EPSG,EPSG,2001-09-03 00:00:00,,0
-1382,USA - Illinois,United States (USA) - Illinois.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-1383,USA - Indiana,United States (USA) - Indiana.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-1384,USA - Iowa,United States (USA) - Iowa.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-1385,USA - Kansas,United States (USA) - Kansas.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-1386,USA - Kentucky,United States (USA) - Kentucky.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-1387,USA - Louisiana,United States (USA) - Louisiana.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-1388,USA - Maine,United States (USA) - Maine.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-1389,USA - Maryland,United States (USA) - Maryland - counties of Allegany; Anne Arundel; Baltimore; Calvert; Caroline; Carroll; Cecil; Charles; Dorchester; Frederick; Garrett; Harford; Howard; Kent; Montgomery; Prince Georges; Queen Annes; Somerset; St. Marys; Talbot; Washington; Wicomico; Worcester.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-1390,USA - Massachusetts,United States (USA) - Massachusetts.,,,,,EPSG,EPSG,2001-09-03 00:00:00,,0
-1391,USA - Michigan,United States (USA) - Michigan.,,,,,EPSG,EPSG,1996-12-12 00:00:00,,0
-1392,USA - Minnesota,United States (USA) - Minnesota.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-1393,USA - Mississippi,United States (USA) - Mississippi.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-1394,USA - Missouri,United States (USA) - Missouri.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-1395,USA - Montana,United States (USA) - Montana - counties of Beaverhead; Big Horn; Blaine; Broadwater; Carbon; Carter; Cascade; Chouteau; Custer; Daniels; Dawson; Deer Lodge; Fallon; Fergus; Flathead; Gallatin; Garfield; Glacier; Golden Valley; Granite; Hill; Jefferson; Judith Basin; Lake; Lewis and Clark; Liberty; Lincoln; Madison; McCone; Meagher; Mineral; Missoula; Musselshell; Park; Petroleum; Phillips; Pondera; Powder River; Powell; Prairie; Ravalli; Richland; Roosevelt; Rosebud;  [...]
-1396,USA - Nebraska,United States (USA) - Nebraska - counties of Adams; Antelope; Arthur; Banner; Blaine; Boone; Box Butte; Boyd; Brown; Buffalo; Burt; Butler; Cass; Cedar; Chase; Cherry; Cheyenne; Clay; Colfax; Cuming; Custer; Dakota; Dawes; Dawson; Deuel; Dixon; Dodge; Douglas; Dundy; Fillmore; Franklin; Frontier; Furnas; Gage; Garden; Garfield; Gosper; Grant; Greeley; Hall; Hamilton; Harlan; Hayes; Hitchcock; Holt; Hooker; Howard; Jefferson; Johnson; Kearney; Keith; Keya Paha; Kimball [...]
-1397,USA - Nevada,United States (USA) - Nevada.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-1398,USA - New Hampshire,United States (USA) - New Hampshire - counties of Belknap; Carroll; Cheshire; Coos; Grafton; Hillsborough; Merrimack; Rockingham; Strafford; Sullivan.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1399,USA - New Jersey,United States (USA) - New Jersey - counties of Atlantic; Bergen; Burlington; Camden; Cape May; Cumberland; Essex; Gloucester; Hudson; Hunterdon; Mercer; Middlesex; Monmouth; Morris; Ocean; Passaic; Salem; Somerset; Sussex; Union; Warren.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1400,USA - New Mexico,United States (USA) - New Mexico.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-1401,USA - New York,United States (USA) - New York.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-1402,USA - North Carolina,United States (USA) - North Carolina - counties of Alamance; Alexander; Alleghany; Anson; Ashe; Avery; Beaufort; Bertie; Bladen; Brunswick; Buncombe; Burke; Cabarrus; Caldwell; Camden; Carteret; Caswell; Catawba; Chatham; Cherokee; Chowan; Clay; Cleveland; Columbus; Craven; Cumberland; Currituck; Dare; Davidson; Davie; Duplin; Durham; Edgecombe; Forsyth; Franklin; Gaston; Gates; Graham; Granville; Greene; Guilford; Halifax; Harnett; Haywood; Henderson; Hertford; [...]
-1403,USA - North Dakota,United States (USA) - North Dakota.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-1404,USA - Ohio,United States (USA) - Ohio.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-1405,USA - Oklahoma,United States (USA) - Oklahoma.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-1406,USA - Oregon,United States (USA) - Oregon.,,,,,EPSG,EPSG,2001-09-03 00:00:00,,0
-1407,USA - Pennsylvania,United States (USA) - Pennsylvania.,,,,,EPSG,EPSG,2001-09-03 00:00:00,,0
-1408,USA - Rhode Island,United States (USA) - Rhode Island - counties of Bristol; Kent; Newport; Providence; Washington.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1409,USA - South Carolina,United States (USA) - South Carolina - counties of Abbeville; Aiken; Allendale; Anderson; Bamberg; Barnwell; Beaufort; Berkeley; Calhoun; Charleston; Cherokee; Chester; Chesterfield; Clarendon; Colleton; Darlington; Dillon; Dorchester; Edgefield; Fairfield; Florence; Georgetown; Greenville; Greenwood; Hampton; Horry; Jasper; Kershaw; Lancaster; Laurens; Lee; Lexington; Marion; Marlboro; McCormick; Newberry; Oconee; Orangeburg; Pickens; Richland; Saluda; Spartanb [...]
-1410,USA - South Dakota,United States (USA) - South Dakota.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-1411,USA - Tennessee,United States (USA) - Tennessee - counties of Anderson; Bedford; Benton; Bledsoe; Blount; Bradley; Campbell; Cannon; Carroll; Carter; Cheatham; Chester; Claiborne; Clay; Cocke; Coffee; Crockett; Cumberland; Davidson; De Kalb; Decatur; Dickson; Dyer; Fayette; Fentress; Franklin; Gibson; Giles; Grainger; Greene; Grundy; Hamblen; Hamilton; Hancock; Hardeman; Hardin; Hawkins; Haywood; Henderson; Henry; Hickman; Houston; Humphreys; Jackson; Jefferson; Johnson; Knox; Lake; [...]
-1412,USA - Texas,United States (USA) - Texas.,,,,,EPSG,EPSG,2001-09-03 00:00:00,,0
-1413,USA - Utah,United States (USA) - Utah.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-1414,USA - Vermont,United States (USA) - Vermont - counties of Addison; Bennington; Caledonia; Chittenden; Essex; Franklin; Grand Isle; Lamoille; Orange; Orleans; Rutland; Washington; Windham; Windsor.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1415,USA - Virginia,United States (USA) - Virginia.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-1416,USA - Washington,United States (USA) - Washington.,,,,,EPSG,EPSG,2001-09-03 00:00:00,,0
-1417,USA - West Virginia,United States (USA) - West Virginia.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-1418,USA - Wisconsin,United States (USA) - Wisconsin.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-1419,USA - Wyoming,United States (USA) - Wyoming.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-1420,Canada - Quebec - E of 57 deg W,Canada - Quebec - east of 57 deg West.,,,,,EPSG,EPSG,1997-11-13 00:00:00,,0
-1421,Canada - Quebec - 60 to 57 deg W.,Canada - Quebec between 60 and 57 deg West.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-1422,Canada - Quebec - 63 to 60 deg W,Canada - Quebec between 63 and 60 deg West.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-1423,Canada - Quebec - 66 to 63 deg W,Canada - Quebec between 66 and 63 deg West.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-1424,Canada - Quebec - 69 to 66 deg W,Canada - Quebec between 69 and  66 deg West.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-1425,Canada - Quebec - 72 to 69 deg W,Canada - Quebec between 72 and 69 deg West.,,,,,EPSG,EPSG,1997-11-13 00:00:00,,0
-1426,Canada - Quebec - 75 to 72 deg W,Canada - Quebec between 75 and 72 deg West.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-1427,Canada - Quebec - 78 to 75 deg W,Canada - Quebec between 78 and 75 deg West.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-1428,Canada - Quebec - W of 78 deg W,Canada - Quebec west of 78 deg West.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-1429,Canada - Ontario - E of 75 deg W,Canada - Ontario - east of 75 deg West.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1430,Canada - Ontario - 78 to 75 deg W,Canada - Ontario - between 78 and 75 deg West.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1431,Canada - Ontario - MTM zone 10,Canada - Ontario - between 79 deg 30 min and 78 deg W in area to north of 47 deg N; between 80 deg 15 min and 78 deg W in area between 46 deg and 47 deg N; between 81 deg and 78 deg W in area south of 46 deg N.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1432,Canada - Ontario - MTM zone 11,Canada - Ontario - south of 46 deg N and west of 81 deg West.,,,,,EPSG,EPSG,1997-11-13 00:00:00,,0
-1433,Canada - Ontario - MTM zone 12,Canada - Ontario - between 82 deg 30 min and 79 deg 30 min W in area to north of 47 deg N; between 82 deg 30 min and 80 deg 15 min W in area between 46 deg and 47 deg N; between 82 deg 30 min and 79 deg 30 min W in area north of 47 deg N.,,,,,EPSG,EPSG,1997-11-13 00:00:00,,0
-1434,Canada - Ontario - MTM zone 13,Canada - Ontario - between 85 deg 30 min and 82 deg 30 min West and north of 46 deg North.,,,,,EPSG,EPSG,1997-11-13 00:00:00,,0
-1435,Canada - Ontario - 88.5 to 85.5 deg W,Canada - Ontario - between 88 deg 30 min and 85 deg 30 min West.,,,,,EPSG,EPSG,1997-11-13 00:00:00,,0
-1436,Canada - Ontario - 91.5 to 88.5 deg W,Canada - Ontario - between 91 deg 30 min and 88 deg 30 min West.,,,,,EPSG,EPSG,1997-11-13 00:00:00,,0
-1437,Canada - Ontario - 94.5 to 91.5 deg W,Canada - Ontario - between 94 deg 30 min and 91 deg 30 min West.,,,,,EPSG,EPSG,1997-11-13 00:00:00,,0
-1438,Canada - Ontario - W of 94.5 deg W,Canada - Ontario - west of 94 deg 30 min West.,,,,,EPSG,EPSG,1997-11-13 00:00:00,,0
-1439,Canada - Ontario - 96 to 90 deg W,Canada - Ontario - between 96 and 90 deg West.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1440,Canada - Ontario - 90 to 84 deg W,Canada - Ontario - between 90 and 84 deg West.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1441,Canada - Ontario - 84 to 78 deg W,Canada - Ontario - between 84 and 78 deg West.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1442,Canada - Ontario - E of 78 deg W,Canada - Ontario - east of 78 deg West.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1443,Canada - Quebec - 78 to 72 deg W,Canada - Quebec - between 78 and 72 deg West.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-1444,Canada - Quebec - 72 to 66 deg W,Canada - Quebec - between 72 and 66 deg West.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1445,Canada - Quebec - 66 to 60 deg W,Canada - Quebec - between 66 and 60 deg West.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1446,Canada - Quebec - E of 60 deg W,Canada - Quebec - east of 60 deg West.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-1447,Canada - New Brunswick,Canada - New Brunswick.,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-1448,Canada - 72 to 66 deg W,Canada - New Brunswick west of 66 deg West; Quebec between 72 and 66 deg West.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1449,Canada - 66 to 60 deg W,Canada - New Brunswick east of 66 deg West; Nova Scotia; Prince Edward Island; Quebec between 66 and 60 deg West.,,,,,EPSG,EPSG,2002-07-13 00:00:00,2002.41,0
-1450,Cote d'Ivoire (Ivory Coast) - E of 6 deg W,C�te d'Ivoire (Ivory Coast) east of 6 deg West.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1451,Cote d'Ivoire (Ivory Coast) - W of 6 deg W,C�te d'Ivoire (Ivory Coast) west of 6 deg West.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1452,Vietnam - W of 108 deg E,Vietnam - west of 108 deg East.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1453,Vietnam - E of 108 deg E,Vietnam - east of 108 deg East.,,,,,EPSG,EPSG,1998-11-11 00:00:00,,0
-1454,South Africa - Walvis Bay,South Africa - Walvis Bay.,,,,,EPSG,EPSG,1996-04-12 00:00:00,,0
-1455,South Africa - W of 18 deg E,South Africa - west of 18 deg East.,,,,,EPSG,EPSG,1996-04-12 00:00:00,,0
-1456,South Africa - 18 to 20 deg E,South Africa - between 18 and 20 deg East.,,,,,EPSG,EPSG,1996-04-12 00:00:00,,0
-1457,South Africa - 20 to 22 deg E,South Africa - between 20 and 22 deg East.,,,,,EPSG,EPSG,1996-04-12 00:00:00,,0
-1458,South Africa - 22 to 24 deg E,South Africa - between 22 and 24 deg East.,,,,,EPSG,EPSG,1996-04-12 00:00:00,,0
-1459,South Africa - 24 to 26 deg E,Lesotho  - west of 26 deg East. South Africa - between 24 and 26 deg East.,,,,,EPSG,EPSG,1996-04-12 00:00:00,,0
-1460,South Africa - 26 to 28 deg E,Lesotho  - east of 26 deg East.  South Africa - between 26 and 28 deg East.,,,,,EPSG,EPSG,1996-04-12 00:00:00,,0
-1461,South Africa - 28 to 30 deg E,South Africa - between 28 and 30 deg East.,,,,,EPSG,EPSG,1996-04-12 00:00:00,,0
-1462,South Africa - 30 to 32 deg E,South Africa - between 30 and 32 deg East.  Swaziland.,,,,,EPSG,EPSG,1996-04-12 00:00:00,,0
-1463,South Africa - E of 32 deg E,South Africa - east of 32 deg East.,,,,,EPSG,EPSG,1996-04-12 00:00:00,,0
-1464,Iran - W of 48 deg E,Islamic Republic of Iran - west of 48 deg East.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1465,Iran - 48 to 54 deg E,Islamic Republic of Iran - between 48 and 54 deg East.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1466,Iran - 54 to 60 deg E,Islamic Republic of Iran - between 54 and 60 deg East.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1467,Iran - E of 60 deg E,Islamic Republic of Iran - east of 60 deg East.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1468,Guinea - W of 12 deg W,Guinea - west of 12 deg West.,,,,,EPSG,EPSG,1999-12-09 00:00:00,,0
-1469,Guinea - E of 12 deg W,Guinea - east of 12 deg West.,,,,,EPSG,EPSG,1999-12-09 00:00:00,,0
-1470,Libya - W of 10 degrees E,Libyan Arab Jamahiriya - west of 10 deg East.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1471,Libya - 10 to 12 degrees E,Libyan Arab Jamahiriya - between 10 and 12 deg East.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1472,Libya - 12 to 14 degrees E,Libyan Arab Jamahiriya - between 12 and 14 deg East.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1473,Libya - 14 to 16 degrees E,Libyan Arab Jamahiriya - between 14 and 16 deg East.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1474,Libya - 16 to 18 degrees E,Libyan Arab Jamahiriya - between 16 and 18 deg East.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1475,Libya - 18 to 20 degrees E,Libyan Arab Jamahiriya - between 18 and 20 deg East.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1476,Libya - 20 to 22 degrees E,Libyan Arab Jamahiriya - between 20 and 22 deg East.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1477,Libya - 22 to 24 degrees E,Libyan Arab Jamahiriya - between 22 and 24 deg East.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1478,Libya - E of 24 degrees E,Libyan Arab Jamahiriya - east of 24 deg East.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1479,Libya - W of 12 degrees E,Libyan Arab Jamahiriya - west of 12 deg East.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1480,Libya - 12 to 18 degrees E,Libyan Arab Jamahiriya - between 12 and 18 deg East.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1481,Libya - 18 to 24 degrees E,Libyan Arab Jamahiriya - between 18 and 24 deg East.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1482,Libya - W of 15 degrees E,Libyan Arab Jamahiriya - west of 15 deg East.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1483,Argentina - Neuquen province - 70.5 to 67.5 deg W,Argentina - Neuquen province between 70 deg 30 min and 67 deg 30 min West.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1484,Argentina - Comodoro Rivadavia - W of 67.5 deg W,Argentina - Comodoro Rivadavia area west of 67 deg 30 min West.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1485,Argentina - Tierra del Fuego - onshore W of 67.5 deg W,Argentina - Tierra del Fuego onshore west of 67 deg 30 min West.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1486,Argentina - Tierra del Fuego - offshore,Argentina - Tierra del Fuego offshore.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1487,Cuba - N of 21.5 deg N,Cuba - north of 21deg 30min North.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-1488,Cuba - S of 21.5 deg N,Cuba - south of 21deg 30min North.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-1489,Tunisia - offshore,Tunisia - offshore.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1490,Yemen - W of 48 deg E,Yemen - west of 48 deg East.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1491,Yemen - E of 48 deg E,Yemen - east of 48 deg East.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1492,Yemen - South Yemen - W of 48 deg E,Yemen - South Yemen west of 48 deg East.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1493,Yemen - South Yemen - E of 48 deg E,Yemen - South Yemen east of 48 deg East.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1494,Vietnam - Meekong delta,Vietnam - Meekong delta.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1495,Vietnam - offshore Nam Con Son basin,Vietnam - offshore Nam Con Son basin.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1496,South Korea - E of 128 deg E,Republic of Korea (South Korea) - east of 128 deg East.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1497,South Korea - 126 to 128 deg E.,Republic of Korea (South Korea) - between 126 and 128 deg East.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1498,South Korea - W of 126 deg E,Republic of Korea (South Korea) - west of 126 deg East.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1499,Venezuela - Maracaibo - blocks I II and III..,"Venezuela - Maracaibo area offshore blocks I, II and III.",,,,,EPSG,EPSG,2000-06-23 00:00:00,,0
-1500,New Zealand - North Island,New Zealand - North Island.,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-1501,New Zealand - South Island,New Zealand - South Island.,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-1502,New Zealand - offshore W of 168 deg E,New Zealand - offshore west of 168 deg East.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-1503,New Zealand - offshore 168 to 174 deg E,New Zealand - offshore between 168 and 174 deg East.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-1504,New Zealand - offshore E of 174 deg E,New Zealand - offshore east of 174 deg East.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-1505,Ghana - offshore,Ghana - offshore.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-1506,Canada - Saskatchewan - E of 108 deg W,Canada - Saskatchewan east of 108 deg West.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-1507,Canada - Alberta and Saskatchewan - 114 to 108 deg W,Canada - Alberta east of 114 deg West; Saskatchewan west of 108 deg West.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-1508,Canada - Alberta W of 114 deg W,Canada - Alberta west of 114 deg West.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-1509,Sierra Leone - W of 12 deg W,Sierra Leone - west of 12 deg West.,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-1510,Sierra Leone - E of 12 deg W,Sierra Leone - east of 12 deg West.,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-1511,USA - conus and Alaska,United States (USA) - Alabama; Alaska; Arizona; Arkansas; California; Colorado; Connecticut; Delaware; Florida; Georgia; Idaho; Illinois; Indiana; Iowa; Kansas; Kentucky; Louisiana; Maine; Maryland; Massachusetts; Michigan; Minnesota; Mississippi; Missouri; Montana; Nebraska; Nevada; New Hampshire; New Jersey; New Mexico; New York; North Carolina; North Dakota; Ohio; Oklahoma; Oregon; Pennsylvania; Rhode Island; South Carolina; South Dakota; Tennessee; Texas;  [...]
-1512,Germany - east Germany - W of 10.5 deg E,Germany - states of former East Germany (DDR) west of 10 deg 30 min East - Thuringen.,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-1513,Germany - east Germany - 10.5 to 13.5 deg E,Germany - states of former East Germany (DDR) between 10 deg 30 min and 13 deg 30 min East - Brandenburg; Mecklenburg-Vorpommern; Sachsen; Sachsen-Anhalt; Thuringen.,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-1514,Germany - east Germany - E of 13.5 deg E,Germany - states of former East Germany (DDR) east of 13 deg 30 min East - Brandenburg; Mecklenburg-Vorpommern; Sachsen.,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-1515,Poland - zone I,Poland - southeast - south of 52 deg 20 min North and east of 18 deg East.,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-1516,Poland - zone II,Poland - northeast - north of 51 deg 20 min North and east of 19 deg East.,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-1517,Poland - zone III,Poland - northwest - north of 52 deg 10 min North and west of 20 deg East.,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-1518,Poland - zone IV,Poland - southwest - south of  53 deg 20 min North and west of 19 deg 05 min East.,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-1519,Poland - zone V,"Poland - south central - between 49 deg 20 min North and 51 deg 20 min North, 18 deg 20 min East and 19 deg 40min East.",,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-1520,Poland - W of 16.5 deg E,Poland - west of 16 deg 30 min East.,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-1521,Poland - 16.5 to 19.5 deg E,Poland - between 16 deg 30 min and 19 deg 30 min East.,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-1522,Poland - 19.5 to 22.5 deg E,Poland - between 19 deg 30 min and 22 deg 30 min East.,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-1523,Poland - E of 22.5 deg E,Poland - east of 22 deg 30 min East.,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-1524,Turkey - W of 28.5 deg E,Turkey west of 28 deg 30 min East.,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-1525,Turkey - 28.5 to 31.5 deg E,Turkey between 28 deg 30 min and 31 deg 30 min East.,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-1526,Turkey - 31.5 to 34.5 deg E,Turkey between 31 deg 30 min and 34 deg 30 min East.,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-1527,Turkey - 34.5 to 37.5 deg E,Turkey between 34 deg 30 min and 37 deg 30 min East.,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-1528,Turkey - 37.5 to 40.5 deg E,Turkey between 37 deg 30 min and 40 deg 30 min East.,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-1529,Turkey - 40.5 to 43.5 deg E,Turkey between 40 deg 30 min and 43 deg 30 min East.,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-1530,Turkey - E of 43.5 deg E,Turkey east of 43 deg 30 min East.,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-1531,Canada - New Brunswick - W of 66 deg W,Canada - New Brunswick - west of 66 deg West.,,,,,EPSG,EPSG,1997-07-22 00:00:00,,0
-1532,Canada - Maritime Provinces - E of 66 deg W,Canada - New Brunswick - east of 66 deg W.; Canada - Nova Scotia; Canada - Prince Edward Island.,,,,,EPSG,EPSG,1997-07-22 00:00:00,,0
-1533,Canada - Prince Edward Island,Canada - Prince Edward Island.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-1534,Canada - Nova Scotia - E of 63 deg W,Canada - Nova Scotia - east of 63 deg West.,,,,,EPSG,EPSG,1999-05-24 00:00:00,,0
-1535,Canada - Nova Scotia - W of 63 deg W,Canada - Nova Scotia - west of 63 deg West.,,,,,EPSG,EPSG,1999-05-24 00:00:00,,0
-1536,Finland - W of 22.5 deg E,Finland - west of 22 deg 30 min East.,,,,,EPSG,EPSG,1997-07-22 00:00:00,,0
-1537,Finland - 22.5 deg to 25.5 deg E,Finland - between 22 deg 30 min and 25 deg 30 min East.,,,,,EPSG,EPSG,1997-07-22 00:00:00,,0
-1538,Finland - zone 3,Finland - between 25 deg 30 min and 28 deg 30 min East for Basic Coordinate System and all Finland for Uniform Coordinate System.,,,,,EPSG,EPSG,2001-09-03 00:00:00,,0
-1539,Finland - E of 28.5 deg E,Finland - east of 28 deg 30 min East.,,,,,EPSG,EPSG,1997-07-22 00:00:00,,0
-1540,Mozambique - W of 36 deg E,Mozambique - west of 36 deg East.,,,,,EPSG,EPSG,1998-04-16 00:00:00,,0
-1541,Mozambique - E of 36 deg E,Mozambique - east of 36 deg East.,,,,,EPSG,EPSG,1998-04-16 00:00:00,,0
-1542,Asia - Cambodia and Vietnam - W of 108 deg E,Cambodia; Vietnam west of 108 deg East.,,,,,EPSG,EPSG,1998-11-11 00:00:00,,0
-1544,Oman - W of 54 deg E,Oman - west of 54 deg East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1545,Oman - E of 54 deg E,Oman - east of 54 deg East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1546,USA - Hawaii - island of Hawaii,United States (USA) - Hawaii - island of Hawaii.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-1547,USA - Hawaii - Maui; Kahoolawe; Lanai; Molokai.,United States (USA) - Hawaii - Maui; Kahoolawe; Lanai; Molokai.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-1548,USA - Hawaii - Oahu.,United States (USA) - Hawaii - Oahu.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-1549,USA - Hawaii - Kauai.,United States (USA) - Hawaii - Kauai.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-1550,USA - Hawaii - Niihau.,United States (USA) - Hawaii - Niihau.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-1551,Grenada including Grenada Grenadines,Grenada (including Grenada Grenadines).,,,,,EPSG,EPSG,1999-04-22 00:00:00,,0
-1552,Africa - Ethiopia and Sudan - W of 42 deg E,Ethiopia - west of 42 degrees East.  Sudan - west of 42 degrees East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1553,Africa - Ethiopia and Sudan - E of 42 deg E,Ethiopia - east of 42 degrees East.  Sudan - east of 42 degrees East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1554,Somalia - W of 48 deg E,Somalia - west of 48 degrees East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1555,Somalia - E of 48 deg E,Somalia - east of 48 degrees East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1556,Australia - 102 to 108 deg E,Australia - between 102 and 108 deg East.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-1557,Australia - 108 to 114 deg E,Australia - between 108 and 114 deg East.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-1558,Australia - 114 to 120 deg E,Australia - between 114 and 120 deg East.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-1559,Australia - 120 to 126 deg E,Australia - between 120 and 126 deg East.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-1560,Australia - 126 to 132 deg E,Australia - between 126 and 132 deg East.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-1561,Australia - 132 to 138 deg E,Australia - between 132 and 138 deg East.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-1562,Australia - 138 to 144 deg E,Australia - between 138 and 144 deg East.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-1563,Australia - 144 to 150 deg E,Australia - between 144 and 150 deg East.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-1564,Australia - 150 to 156 deg E,Australia - between 150 and 156 deg East.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-1565,Australia - 156 to 162 deg E,Australia - between 156 and 162 deg East.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-1566,Australia - 162 to 168 deg E,Australia - between 162 and 168 deg East.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-1567,Australasia - Australia and PNG - 138 to 144 deg E,Australia - between 138 and 144 deg East.  Papua New Guinea (PNG) - west of 144 deg East.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-1568,Australasia - Australia and PNG - 144 to 150 deg E,Australia - between 144 and 150 deg East.  Papua New Guinea (PNG) - east of 144 deg East.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-1569,Saudi Arabia - W of 42 deg E,Saudi Arabia - west of 42 deg East.,,,,,EPSG,EPSG,1997-11-13 00:00:00,,0
-1570,Saudi Arabia - E of 48 deg E,Saudi Arabia - east of 48 deg East.,,,,,EPSG,EPSG,1997-11-13 00:00:00,,0
-1571,Asia - Middle East - Kuwait and Saudi - 42 to 48 deg E,Kuwait.  Saudi Arabia - between 42 and 48 deg East.,,,,,EPSG,EPSG,1997-11-13 00:00:00,,0
-1572,Brazil - Aratu - W of 48 deg W,Brazil - coastal areas south of 2 deg 55 min South and west of 48 deg West.,,,,,EPSG,EPSG,1995-07-21 00:00:00,,0
-1573,Brazil - Aratu - 48 to 42 deg W,Brazil - coastal areas south of 2 deg 55 min South and between 48 and 42 deg West; offshore Santos basin.,,,,,EPSG,EPSG,1995-07-21 00:00:00,,0
-1574,Brazil - Aratu - E of 42 deg W,Brazil - coastal areas south of 2 deg 55 min South and east of 42 deg West; offshore Campos basin.,,,,,EPSG,EPSG,1995-07-21 00:00:00,,0
-1575,Africa - Botswana and Zambia - W of 24 deg E,Botswana and Zambia - west of 24 deg East.,,,,,EPSG,EPSG,1997-11-13 00:00:00,,0
-1576,"Africa - Botswana, Zambia and Zimbabwe - 24 to 30 deg E",Botswana - east of 24 deg East; Zambia - between 24 and 30 deg East; Zimbabwe west of 30 deg East .,,,,,EPSG,EPSG,1997-11-13 00:00:00,,0
-1577,"Africa - Malawi, Zambia and Zimbabwe - E of 30 deg E",Malawi.  Zambia and Zimbabwe - east of 30 deg East.,,,,,EPSG,EPSG,1997-11-13 00:00:00,,0
-1578,Uganda - N of equator and W of 30 deg E,Uganda - north of equator and west of 30 deg East.,,,,,EPSG,EPSG,1997-11-13 00:00:00,,0
-1579,Africa - Tanzania and Uganda - S of equator and W of 30 deg E,Tanzania - west of 30 deg East; Uganda south of equator and west of 30 deg East.,,,,,EPSG,EPSG,1997-11-13 00:00:00,,0
-1580,Africa - Kenya and Uganda - N of equator and 30 to 36 deg E,Kenya - north of equator and west of 36 deg East; Uganda north of equator and east of 30 deg East.,,,,,EPSG,EPSG,1997-11-13 00:00:00,,0
-1581,"Africa - Kenya, Tanzania and Uganda - S of equator and 30 to 36 deg E",Kenya - south of equator and west of 36 deg East; Tanzania - 30 to 36 deg East; Uganda south of equator and east of 30 deg East.,,,,,EPSG,EPSG,1997-11-13 00:00:00,,0
-1582,Kenya - N of equator and E of 36 deg E,Kenya - north of equator and east of 36 deg East.,,,,,EPSG,EPSG,1997-11-13 00:00:00,,0
-1583,Africa - Kenya and Tanzania - S of equator and E of 36 deg E,Kenya - south of equator and east of 36 deg East; Tanzania - east of 36 deg East.,,,,,EPSG,EPSG,1997-11-13 00:00:00,,0
-1584,Indonesia - Java - W of 108 deg E,Indonesia - Java - west of 108 deg East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1585,Indonesia - Java - E of 114 deg E,Indonesia - Java - east of 114 deg East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1586,Indonesia - Java - 108 to 114 deg E,Indonesia - Java - between 108 and 114 deg East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1587,China - W of 78 deg E,China - west of 78 deg East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1588,China - 78 to 84 deg E,China - between 78 and 84 deg East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1589,China - 84 to 90 deg E,China - between 84 and 90 deg East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1590,China - 90 to 96 deg E,China - between 90 and 96 deg East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1591,China - 96 to 102 deg E,China - between 96 and 102 deg East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1592,China - 102 to 108 deg E,China - between 102 and 108 deg East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1593,China - 108 to 114 deg E,China - between 108 and 114 deg East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1594,China - 114 to 120 deg E,China - between 114 and 120 deg East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1595,China - 120 to 126 deg E,China - between 120 and 126 deg East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1596,China - 126 to 132 deg E,China - between 126 and 132 deg East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1597,China - E of 132 deg E,China - east of 132 deg East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1598,Colombia - W of 75d 35m W,Colombia - west of 1 deg 30 min W of Bogota (75d 34m 51.30s W of Greenwich).,,,,,EPSG,EPSG,1997-04-11 00:00:00,,0
-1599,Colombia - 75d 35m to 72d 35m W,Colombia - between 1 deg 30 min W and 1 deg 30 min E of Bogota (75d 35m W and 72d 35m W of Greenwich).,,,,,EPSG,EPSG,1997-04-11 00:00:00,,0
-1600,Colombia - 72d 35m to 69d 35m W,Colombia - between 1 deg 30 min and 4 deg 30 min E of Bogota (72d 35m and 69d 34m W of Greenwich).,,,,,EPSG,EPSG,1997-04-11 00:00:00,,0
-1601,Colombia - E of 69d 35m W,Colombia - east of 4 deg 30 min E of Bogota (69d 34m 51.3s W of Greenwich).,,,,,EPSG,EPSG,1997-04-11 00:00:00,,0
-1602,Colombia - offshore W of 78 deg W,Colombia - offshore west of 78 deg W of Greenwich.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-1603,Colombia - offshore E of 78 deg W,Colombia - offshore east of 78 deg W of Greenwich.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-1604,Angola - Angola proper - offshore,Angola - Angola proper - offshore,,,,,EPSG,EPSG,1998-11-11 00:00:00,,0
-1605,Angola - Angola proper - offshore block 15,Angola - Angola proper - offshore block 15,,,,,EPSG,EPSG,1998-11-11 00:00:00,,0
-1606,Angola - Angola proper - offshore - W of 12 deg E,Angola - Angola proper - offshore - west of 12 deg East.,,,,,EPSG,EPSG,1997-11-13 00:00:00,,0
-1607,Angola - 12 to 18 deg E,Angola - between 12 and 18 deg East.,,,,,EPSG,EPSG,1997-11-13 00:00:00,,0
-1608,Argentina - W of 70.5 deg W,Argentina - west of 70 deg 30 min West.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-1609,Argentina - 70.5 to 67.5 deg W,Argentina - between 70 deg 30 min and 67 deg 30 min West.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-1610,Argentina - 67.5 to 64.5 deg W,Argentina - between 67 deg 30 min and 64 deg 30 min West.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-1611,Argentina - 64.5 to 61.5 deg W,Argentina - between 64 deg 30 min and 61 deg 30 min West.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-1612,Argentina - 61.5 to 58.5 deg W,Argentina - between 61 deg 30 min and 58 deg 30 min West.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-1613,Argentina - 58.5 to 55.5 deg W,Argentina - between 58 deg 30 min and 55 deg 30 min West.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-1614,Argentina - E of 55.5 deg W,Argentina - east of 55 deg 30 min West.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-1615,Botswana - W of 21 deg E,Botswana - west of 21 deg East.,,,,,EPSG,EPSG,1995-12-08 00:00:00,,0
-1616,Botswana - 21 to 27 deg E,Botswana - between 21 and 27deg East.,,,,,EPSG,EPSG,1995-12-08 00:00:00,,0
-1617,Botswana - E of 27 deg E,Botswana - east of 27 deg East.,,,,,EPSG,EPSG,1995-12-08 00:00:00,,0
-1618,Tunisia - onshore,Tunisia - onshore.,,,,,EPSG,EPSG,1999-11-15 00:00:00,,0
-1619,Tunisia - N of 34 deg 39 min N,Tunisia - north of 38.5 grads (34 deg 39 min) North.,,,,,EPSG,EPSG,1996-09-12 00:00:00,,0
-1620,Tunisia - S of 34 deg 39 min N,Tunisia - south of 38.5 grads (34 deg 39 min) North.,,,,,EPSG,EPSG,1996-09-12 00:00:00,,0
-1621,Brazil - Corrego Alegre - W of 42 deg W,Brazil - NE coastal area between 45 deg West and 42 deg West.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1622,Brazil - Corrego Alegre - E of 42 deg W,Brazil - NE coastal area between 42 deg West and 40 deg West.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1623,Asia - Middle East - Lebanon and Syria,Lebanon. Syrian Arab Republic.,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-1624,Germany - W of 7.5 deg E,"Germany west of 7 deg 30 min East - Niedersachsen, Nordrhein-Westfalen, Rheinland-Pfalz, Saarland.",,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1625,Germany - 7.5 to 10.5 deg E,"Germany - former West Germany onshore between 7 deg 30 min and 10 deg 30 min East - Baden-Wurtemberg, Bayern, Hessen, Niedersachsen, Nordrhein-Westfalen, Rhineland-Pfalz, Schleswig-Holstein. Also former East German (DDR) state of Thuringen by transformation.",,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1626,Germany - 10.5 to 13.5 deg E,"Germany - former West Germany onshore between 10 deg 30 min and 13 deg 30 min East - Bayern, Niedersachsen, Schleswig-Holstein. Also former East German (DDR) states of Sachsen and Thuringen by transformation.",,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1627,Germany - 13.5 to 16.5 deg E,Germany - former West Germany onshore east of 13 deg 30 min East - Bayern. Also former East German (DDR) state of Sachsen by transformation.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1628,Germany - W of 4.5 deg E,Germany - onshore west of 4 deg 30 min East.,,,,Not valid - do not use !,EPSG,EPSG,2000-03-07 00:00:00,,1
-1629,UK - offshore North Sea,United Kingdom (UKCS) - offshore North Sea.,,,,,EPSG,EPSG,1998-11-11 00:00:00,,0
-1630,Netherlands - offshore,Netherlands - offshore North Sea.,,,,,EPSG,EPSG,1998-11-11 00:00:00,,0
-1631,Europe - ED50 / UTM 28,Europe - between 18 and 12 deg West - Ireland offshore; Spain (Canary Islands); United Kingdom (UKCS) offshore.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1632,Europe - ED50 / UTM 29,Europe - between 12 and 6 deg West - Portugal; Spain; Ireland offshore; United Kingdom (UKCS) offshore.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1633,Europe - ED50 / UTM 30,Europe - between 6 deg West and 0 deg East - Faroe Islands; France offshore; Gibraltar; Ireland offshore; Spain; United Kingdom - UKCS offshore - North Sea west of 0 d eg East).,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1634,Europe - ED50 / UTM 31,Europe - between 0 and 6 deg East - Denmark (North Sea); Germany offshore; Netherlands offshore; Norway; Spain (Balearic Islands); United Kingdom (UKCS) offshore.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1635,Europe - ED50 / UTM 32,Europe - between 6 and 12 deg East - Denmark; Germany offshore; Italy; Netherlands offshore; Norway.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1636,Europe - ED50 / UTM 33,Europe - between 12 and 18 deg East - Denmark (Bornholm); Italy; Norway.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1637,Europe - ED50 / UTM 34,Europe - between 18 and 24 deg East - Greece; Norway.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1638,Europe - ED50 / UTM 35,Europe - between 24 and 30 deg East - Greece; Norway; Turkey. Egypt - Western Desert.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1639,Europe - ED50 / UTM 36,Europe - between 30 and 36 deg East - Turkey.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1640,Europe - ED50 / UTM 37,Europe - between 36 and 42 deg East - Turkey.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1641,Europe - ED50 / UTM 38,Europe - between 42 and 48 deg East - Turkey.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1642,Egypt - Sinai peninsula,Egypt - Sinai peninsula.,,,,,EPSG,EPSG,1999-04-22 00:00:00,,0
-1643,Egypt - E of 29 deg E,Egypt - east of 29 deg East.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-1644,Egypt - W of 29 deg E; N of 28 deg 11 min N,Egypt - west of 29 deg E; north of approximately 28 deg 11 min North.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-1645,Egypt - W of 29 deg E; S of 28 deg 11 min N,Egypt - west of 29 deg E; south of approximately 28 deg 11 min North.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-1646,Europe - Estonia;  Latvia;  Lithuania.,Estonia;  Latvia;  Lithuania.,,,,,EPSG,EPSG,1998-12-14 00:00:00,,0
-1647,Indonesia - N of equator and W of 96 deg E,Indonesia - north of equator and west of 96 deg East.,,,,,EPSG,EPSG,1995-08-08 00:00:00,,0
-1648,Indonesia - S of equator and W of 96 deg E,Indonesia - south of equator and west of 96 deg East.,,,,,EPSG,EPSG,1995-08-08 00:00:00,,0
-1649,Indonesia - N of equator and 96 to 102 deg E,Indonesia - north of equator and between 96 and 102 deg East.,,,,,EPSG,EPSG,1995-07-21 00:00:00,,0
-1650,Indonesia - S of equator and 96 to 102 deg E,Indonesia - south of equator and between 96 and 102 deg East.,,,,,EPSG,EPSG,1995-07-21 00:00:00,,0
-1651,Indonesia - N of equator and 102 to 108 deg E,Indonesia - north of equator and between 102 and 108 deg East.,,,,,EPSG,EPSG,1995-07-21 00:00:00,,0
-1652,Indonesia - S of equator and 102 to 108 deg E,Indonesia - south of equator and between 102 and 108 deg East.,,,,,EPSG,EPSG,1995-07-21 00:00:00,,0
-1653,Indonesia - N of equator and 108 to 114 deg E,Indonesia - north of equator and between 108 and 114 deg East.,,,,,EPSG,EPSG,1995-07-21 00:00:00,,0
-1654,Indonesia - S of equator and 108 to 114 deg E,Indonesia - south of equator and between 108 and 114 deg East.,,,,,EPSG,EPSG,1995-07-21 00:00:00,,0
-1655,Indonesia - N of equator and 114 to 120 deg E,Indonesia - north of equator and between 114 and 120 deg East.,,,,,EPSG,EPSG,1995-07-21 00:00:00,,0
-1656,Indonesia - S of equator and 114 to 120 deg E,Indonesia - south of equator and between 114 and 120 deg East.,,,,,EPSG,EPSG,1995-07-21 00:00:00,,0
-1657,Indonesia - N of equator and 120 to 126 deg E,Indonesia - north of equator and between 120 and 126 deg East.,,,,,EPSG,EPSG,1995-07-21 00:00:00,,0
-1658,Indonesia - S of equator and 120 to 126 deg E,Indonesia - south of equator and between 120 and 126 deg East.,,,,,EPSG,EPSG,1995-07-21 00:00:00,,0
-1659,Indonesia - N of equator and 126 to 132 deg E,Indonesia - north of equator and between 126 and 132 deg East.,,,,,EPSG,EPSG,1995-07-21 00:00:00,,0
-1660,Indonesia - S of equator and 126 to 132 deg E,Indonesia - south of equator and between 126 and 132 deg East.,,,,,EPSG,EPSG,1995-07-21 00:00:00,,0
-1661,Indonesia - N of equator and 132 to 138 deg E,Indonesia - north of equator and east of 132 deg East.,,,,,EPSG,EPSG,1995-07-21 00:00:00,,0
-1662,Indonesia - S of equator and 132 to 138 deg E,Indonesia - south of equator and between 132 and 138 deg East.,,,,,EPSG,EPSG,1995-07-21 00:00:00,,0
-1663,Indonesia - S of equator and E of 138 deg E,Indonesia - south of equator and east of 138 deg East.,,,,,EPSG,EPSG,1995-07-21 00:00:00,,0
-1664,Myanmar (Burma) - W of 96 deg E,Myanmar (Burma) - west of 96 deg East.,,,,,EPSG,EPSG,1998-06-13 00:00:00,,0
-1665,Asia - Myanmar and Thailand - 96 to 102 deg E,Myanmar (Burma) - east of 96 deg East; Thailand - west of 102 deg East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1666,Thailand - E of 102 deg E,Thailand - east of 102 deg East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1667,Thailand - W of 102 deg E,Thailand - west of 102 deg East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1668,Pakistan - N of 35 deg 35 min N,Pakistan - north of 35 deg 35 min North.,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-1669,Asia - India; Pakistan - 28 to 35.5 deg N,India north of 28 deg North; Pakistan 28 deg to 35 deg 35 min North.,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-1670,Asia - India; Pakistan - zone IIa,India - between 21 and 28 deg North and west of 82 deg East; Pakistan - south of 28 deg North.,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-1671,Asia - Bangladesh; India; Myanmur; Pakistan - zone IIb,Bangladesh; India - north of 22 deg North and east of 82 deg East; Myanmar (Burma) - north of 22 deg North.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1672,India - 15 to 21 deg N,India - between 15 and 21 deg North.,,,,,EPSG,EPSG,2000-04-23 00:00:00,,0
-1673,India - S of 15 deg N,India - south of 15 deg North.,,,,,EPSG,EPSG,2000-04-23 00:00:00,,0
-1674,Bangladesh - W of 90 deg E,Bangladesh - west of 90 deg East.,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-1675,Bangladesh - E of 90 deg E,Bangladesh - east of 90 deg East.,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-1676,India - N of 28 deg N,India - north of 28 deg North.,,,,,EPSG,EPSG,2000-04-23 00:00:00,,0
-1677,India - 21 to 28deg N and W of 82 deg E,India - between 21 and 28 deg North and west of 82 deg East.,,,,,EPSG,EPSG,2000-04-23 00:00:00,,0
-1678,India - N of 21 deg N and E of 82 deg E,India - north of 21 deg North and east of 82 deg East.,,,,,EPSG,EPSG,2000-04-23 00:00:00,,0
-1679,India - W of 72 deg E,India - west of 72 deg East.,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-1680,India - 72 to 78 deg E,India - between 72 and 78 deg East.,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-1681,India - 78 to 84 deg E,India - between 78 and 84 deg East.,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-1682,India - 84 to 90 deg E,India - between 84 and 90 deg East.,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-1683,India - 90 to 96 deg E,India - between 90 and 96 deg East.,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-1684,India - E of 96 deg E,India - east of 96 deg East.,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-1685,Pakistan - N of 28 deg N,Pakistan - north of 28 deg North.,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-1686,Pakistan - S of 28 deg N,Pakistan - south of 28 deg North.,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-1687,Pakistan - W of 66 deg E,Pakistan - west of 66 deg East.,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-1688,Pakistan - 66 to 72 deg E,Pakistan - between 66 and 72 deg East.,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-1689,Pakistan - E of 72 deg E,Pakistan - east of 72 deg East.,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-1690,Malaysia - West Malaysia,Malaysia - West Malaysia.,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-1691,Malaysia - West Malaysia - W of 102 deg E,Malaysia - West Malaysia west of 102 deg East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1692,Malaysia - West Malaysia - E of 102 deg E,Malaysia - West Malaysia east of 102 deg East.,,,,,EPSG,EPSG,1995-07-21 00:00:00,,0
-1693,Venezuela - W of 72 deg W,Venezuela - west of 72 deg West.,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-1694,Venezuela - 72 to 66 deg W,Venezuela - between 72 and 66 deg West.,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-1695,Venezuela - E of 66 deg W,Venezuela - east of 66 deg West.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1696,Gabon - N of equator,Gabon - north of equator.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1697,Gabon - S of equator,Gabon - south of equator.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1698,Philippines - zone I,Philippines - west of 118 deg East.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1699,Philippines - zone II,Philippines - Palawan; Calamian Islands.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1700,Philippines - zone III,Philippines - Luzon (except SE part;); Mindoro.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1701,Philippines - zone IV,Philippines - SE Luzon; Tablas; Masbate; Panay; Cebu; Negros; west Mindanao.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1702,Philippines - zone V,Philippines - east Mindanao; Bohol; Samar.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1703,Morocco - N of 31.5 deg N,Morocco north of 35 grads (31 deg 30 min) North.,,,,,EPSG,EPSG,1996-09-12 00:00:00,,0
-1704,Morocco - 27.9 to 31.5 deg N,Morocco between 31 and 35 grads (27 deg 54 min and 31 deg 30 min) North.,,,,,EPSG,EPSG,1996-09-12 00:00:00,,0
-1705,Morocco - S of 27.9 deg N,Morocco south of 31grads  (27 deg 54 min) North.,,,,,EPSG,EPSG,1996-09-12 00:00:00,,0
-1706,Austria - W of 11 deg 50 min E,Austria west of 11deg 50min East of Greenwich (29 deg 30 min East of Ferro).,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-1707,Austria - 11 deg 50 min to 14deg 50min E,Austria between 11deg 50min and 14deg 50min East of Greenwich (29 deg 30 min and 32 deg 30 min East of Ferro).,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-1708,Austria - E of 14 deg 50 min E,Austria east of 14deg 50min East of Greenwich (32 deg 30 min East of Ferro).,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-1709,Europe - former Yugoslavia - W of 16.5 deg E,Bosnia and Herzegowina west of 16 deg 30 min E; Croatia west of 16 deg 30 min E; Slovenia.,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-1710,Europe - former Yugoslavia - 16.5 to 29.5 deg E,Bosnia and Herzegowina east of 16 deg 30 min E; Croatia east of 16 deg 30 min E; Yugoslavia west of 19 deg 30 min E.,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-1711,Europe - former Yugoslavia - 19.5 to 22.5 deg E,FYR Macedonia west of 22 deg 30 min E; Yugoslavia between 19 deg 30 min and 22 deg 30 min E.,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-1712,Europe - former Yugoslavia - E of 22.5 deg E,FYR Macedonia and Yugoslavia east of 22 deg 30 min E.,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-1713,Nigeria - E of 10.5 deg E,Nigeria east of 10 deg 30 min East.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-1714,Nigeria - 6.5 to10.5 deg E,Nigeria between 6 deg 30 min and 10 deg 30 min East.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-1715,Nigeria - W of 6.5 deg E,Nigeria west of 6 deg 30 min East.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-1716,Nigeria - offshore deep water - W of 6 deg E,Nigeria - offshore beyond continental shelf west of 6 deg East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1717,Nigeria - offshore deep water,Nigeria - offshore beyond continental shelf.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1718,Italy - W of 12 deg E,Italy - west of 12 deg East.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-1719,Italy - E of 12 deg E,Italy - east of 12 deg East.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-1720,USA - Michigan - SPCS - E,United States (USA) - Michigan - counties of Alcona; Alpena; Arenac; Bay; Cheboygan; Clinton; Crawford; Genesee; Gladwin; Gratiot; Hillsdale; Huron; Ingham; Iosco; Jackson; Lapeer; Lenawee; Livingston; Macomb; Midland; Monroe; Montmorency; Oakland; Ogemaw; Oscoda; Otsego; Presque Isle; Roscommon; Saginaw; Sanilac; Shiawassee; St. Clair; Tuscola; Washtenaw; Wayne.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1721,USA - Michigan - SPCS - old central,United States (USA) - Michigan - counties of Allegan; Antrim; Barry; Benzie; Berrien; Branch; Calhoun; Cass; Charlevoix; Clare; Eaton; Emmet; Grand Traverse; Ionia; Isabella; Kalamazoo; Kalkaska; Kent; Lake; Leelanau; Manistee; Mason; Mecosta; Missaukee; Montcalm; Muskegon; Newaygo; Oceana; Osceola; Ottawa; St. Joseph; Van Buren; Wexford.,,,,,EPSG,EPSG,1998-11-11 00:00:00,,0
-1722,USA - Michigan - SPCS - W,United States (USA) - Michigan - counties of Alger; Baraga; Chippewa; Delta; Dickinson; Gogebic; Houghton; Iron; Keweenaw; Luce; Mackinac; Marquette; Menominee; Ontonagon; Schoolcraft.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1723,USA - Michigan - SPCS - N,United States (USA) - Michigan north of approximately 45d 45m North - counties of Alger; Baraga; Chippewa; Delta; Dickinson; Gogebic; Houghton; Iron; Keweenaw; Luce; Mackinac; Marquette; Menominee; Ontonagon; Schoolcraft.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-1724,USA - Michigan - SPCS - central,United States (USA) - Michigan between approximately 45d 45m & 43d 55m North - counties of Alcona; Alpena; Antrim; Arenac; Benzie; Charlevoix; Cheboygan; Clare; Crawford; Emmet; Gladwin; Grand Traverse; Iosco; Kalkaska; Lake; Leelanau; Manistee; Mason; Missaukee; Montmorency; Ogemaw; Osceola; Oscoda; Otsego; Presque Isle; Roscommon; Wexford.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-1725,USA - Michigan - SPCS - S,United States (USA) - Michigan south of approximately 43d 55m North - counties of Allegan; Barry; Bay; Berrien; Branch; Calhoun; Cass; Clinton; Eaton; Genesee; Gratiot; Hillsdale; Huron; Ingham; Ionia; Isabella; Jackson; Kalamazoo; Kent; Lapeer; Lenawee; Livingston; Macomb; Mecosta; Midland; Monroe; Montcalm; Muskegon; Newaygo; Oakland; Oceana; Ottawa; Saginaw; Sanilac; Shiawassee; St. Clair; St. Joseph; Tuscola; Van Buren; Washtenaw; Wayne.,,,,,EPSG,EPSG,2 [...]
-1726,Mozambique - offshore,Mozambique - offshore.,,,,,EPSG,EPSG,1998-11-11 00:00:00,,0
-1727,Suriname - offshore,Suriname - offshore.,,,,,EPSG,EPSG,2000-06-10 00:00:00,,0
-1728,Algeria - N of 34 deg 39 min N,Algeria - north of 38.5 grads (34 deg 39 min) North.,,,,,EPSG,EPSG,1996-09-12 00:00:00,,0
-1729,Algeria - 31 deg 30 min  of 34 deg 39 min N,Algeria - 35 grads to 38.5 grads (31 deg 30 min to 34 deg 39 min) North.,,,,,EPSG,EPSG,1996-09-12 00:00:00,,0
-1730,North America - NAVD88,North America: Canada - Alberta; British Columbia; Manitoba; New Brunswick; Newfoundland; North West Territories; Nova Scotia; Nunavut; Ontario; Prince Edward Island; Quebec; Saskatchewan; Yukon. United States (USA) - Alabama; Alaska; Arizona; Arkansas; California; Colorado; Connecticut; Delaware; Florida; Georgia; Idaho; Illinois; Indiana; Iowa; Kansas; Kentucky; Louisiana; Maine; Maryland; Massachusetts; Michigan; Minnesota; Mississippi; Missouri; Montana; N [...]
-1731,France - N of 48.15 deg N,France north of 53.5 grads (48 deg 09 min) North.,,,,,EPSG,EPSG,1996-09-12 00:00:00,,0
-1732,France - 45.45 to 48.15 deg N,France 50.5 to 53.5 grads (45 deg 27 min to 48 deg 09 min) North.,,,,,EPSG,EPSG,1996-04-12 00:00:00,,0
-1733,France - S of 45.45 deg N,France south of 50.5 grads (45 deg 27 min) North.,,,,,EPSG,EPSG,1996-09-12 00:00:00,,0
-1734,France - 45.45 to 48.15 deg N. Also all mainland.,France 50.5 to 53.5 grads (45 deg 27 min to 48 deg 09 min) North. Also used over all mainland France.,,,,,EPSG,EPSG,1996-09-12 00:00:00,,0
-1735,Algeria - W of 6 deg W,Algeria - west of 6 deg West (of Greenwich).,,,,,EPSG,EPSG,1996-04-12 00:00:00,,0
-1736,Algeria - 6 to 0 deg W,Algeria - between 6 deg West and 0 deg East (of Greenwich).,,,,,EPSG,EPSG,1996-04-12 00:00:00,,0
-1737,Algeria - 0 to 6 deg E,Algeria - between 0 and 6 deg East (of Greenwich).,,,,,EPSG,EPSG,1996-04-12 00:00:00,,0
-1738,Algeria - E of 6 deg E,Algeria - east of 6 deg East (of Greenwich).,,,,,EPSG,EPSG,1996-04-12 00:00:00,,0
-1739,Kuwait - W of 48 deg E,Kuwait - west of 48 deg East.,,,,,EPSG,EPSG,1996-04-12 00:00:00,,0
-1740,Kuwait - E of 48 deg E,Kuwait - east of 48 deg East.,,,,,EPSG,EPSG,1996-04-12 00:00:00,,0
-1741,Norway - zone I,Norway - west of 3deg 30min W of Oslo (7deg 13min 22.5sec E of Greenwich).,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-1742,Norway - zone II,Norway - between 3deg 30min W and 1deg 10min W of Oslo (7deg 13min 22.5sec E  and 9deg 33min 22.5sec E of Greenwich).,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-1743,Norway - zone III,Norway - between 1deg 10min W and 1deg 15min E of Oslo (9deg 33min 22.5sec E and 11deg 58min 22.5sec E of Greenwich).,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-1744,Norway - zone IV,Norway - between 1deg 15min E and 4deg 20min E of Oslo (11deg 58min 22.5sec E and 15deg 03min 22.5sec E of Greenwich).,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-1745,Norway - zone V,Norway - between 4deg 20min E and 8deg 10min E of Oslo (15deg 03min 22.5sec E and 18deg 53min 22.5sec E of Greenwich).,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-1746,Norway - zone VI,Norway - between 8deg 10min E and 12deg 10min E of Oslo (18deg 53min 22.5sec E and 22deg 53min 22.5sec E of Greenwich).,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-1747,Norway - zone VII,Norway - between 12deg 10min E and 16deg 15min E of Oslo (22deg 53min 22.5sec E and 26deg 58min 22.5sec E of Greenwich).,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-1748,Norway - zone VIII,Norway - east of 16deg 15min E of Oslo (26deg 58min 22.5sec E of Greenwich).,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-1749,Asia - Middle East - Nahrwan / UTM 39,Kuwait east of 48 deg East.  Qatar - offshore.  United Arab Emirates (UAE) - Abu Dhabi - west of 54 deg East.,,,,,EPSG,EPSG,1996-04-12 00:00:00,,0
-1750,UAE - E of 54 deg E,United Arab Emirates (UAE) - Abu Dhabi east of 54 deg East; Dubai; Sharjah; Ajman; Fujairah; Ras Al Kaimah; Umm Al Qaiwain.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1751,Peru - E of 73 deg W,Peru - east of 73 deg West.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-1752,Peru - 79 to 73 deg W,Peru - between 79 and 73 deg West.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-1753,Peru - W of 79 deg W,Peru - west of 79 deg West.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-1754,Brazil - offshore Amazon Cone,Brazil - offshore Amazon Cone.,,,,,EPSG,EPSG,1999-04-22 00:00:00,,0
-1755,South America - PSAD56 / UTM 17S,"South America (Chile; Ecuador; Peru) between 84 and 78 deg West, southern hemisphere.",,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1756,South America - PSAD56 / UTM 18N,"South America (Ecuador;  [Venezuela]) between 78 and 72 deg West, northern hemisphere.",,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1757,South America - PSAD56 / UTM 18S,"South America (Chile; Ecuador; Peru) between 78 and 72 deg West, southern hemisphere.",,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1758,South America - PSAD56 / UTM 19N,"South America (Netherlands Antilles; [Venezuela]) between 72 and 66 deg West, northern hemisphere.",,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1759,South America - PSAD56 / UTM 19S,"South America (Bolivia; Chile; Peru) between 72 and 66 deg West, southern hemisphere.",,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1760,South America - PSAD56 / UTM 20N,"South America (Guyana; [Venezuela]) between 66 and 60 deg West, northern hemisphere.",,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1761,South America - PSAD56 / UTM 20S,"South America (Bolivia) between 66 and 60 deg West, southern hemisphere.",,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1762,South America - PSAD56 / UTM 21N,"South America (Guyana) between 60 and 54 deg West, northern hemisphere.",,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1763,Russia - W of 24 deg E,Russian Federation - west of 24 deg East.,,,,,EPSG,EPSG,1996-09-12 00:00:00,,0
-1764,Russia - 24 to 30 deg E,Russian Federation - between 24 and 30 deg East.,,,,,EPSG,EPSG,1996-09-12 00:00:00,,0
-1765,Russia - 30 to 36 deg E,Russian Federation - between 30 and 36 deg East.,,,,,EPSG,EPSG,1996-09-12 00:00:00,,0
-1766,Russia - 36 to 42 deg E,Russian Federation - between 36 and 42 deg East.,,,,,EPSG,EPSG,1996-09-12 00:00:00,,0
-1767,Russia - 42 to 48 deg E,Russian Federation - between 42 and 48 deg East.,,,,,EPSG,EPSG,1996-09-12 00:00:00,,0
-1768,Russia - 48 to 54 deg E,Russian Federation - between 48 and 54 deg East.,,,,,EPSG,EPSG,1996-09-12 00:00:00,,0
-1769,Russia - 54 to 60 deg E,Russian Federation - between 54 and 60 deg East.,,,,,EPSG,EPSG,1996-09-12 00:00:00,,0
-1770,Russia - 60 to 66 deg E,Russian Federation - between 60 and 66 deg East.,,,,,EPSG,EPSG,1996-09-12 00:00:00,,0
-1771,Russia - 66 to 72 deg E,Russian Federation - between 66 and 72 deg East .,,,,,EPSG,EPSG,1996-09-12 00:00:00,,0
-1772,Russia - 72 to 78 deg E,Russian Federation - between 72 and 78 deg East.,,,,,EPSG,EPSG,1996-09-12 00:00:00,,0
-1773,Russia - 78 to 84 deg E,Russian Federation - between 78 and 84 deg East.,,,,,EPSG,EPSG,1996-09-12 00:00:00,,0
-1774,Russia - 84 to 90 deg E,Russian Federation - between 84 and 90 deg East.,,,,,EPSG,EPSG,1996-09-12 00:00:00,,0
-1775,Russia - 90 to 96 deg E,Russian Federation - between 90 and 96 deg East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1776,Russia - 96 to 102 deg E,Russian Federation - between 96 and 102 deg East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1777,Russia - 102 to 108 deg E,Russian Federation - between 102 and 108 deg East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1778,Russia - 108 to 114 deg E,Russian Federation - between 108 and 114 deg East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1779,Russia - 114 to 120 deg E,Russian Federation - between 114 and 120 deg East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1780,Russia - 120 to 126 deg E,Russian Federation - between 120 and 126 deg East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1781,Russia - 126 to 132 deg E,Russian Federation - between 126 and 132 deg East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1782,Russia - 132 to 138 deg E,Russian Federation - between 132 and 138 deg East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1783,Russia - 138 to 144 deg E,Russian Federation - between 138 and 144 deg East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1784,Russia - 144 to 150 deg E,Russian Federation - between 144 and 150 deg East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1785,Russia - 150 to 156 deg E,Russian Federation - between 150 and 156 deg East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1786,Russia - 156 to 162 deg E,Russian Federation - between 156 and 162 deg East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1787,Russia - 162 to 168 deg E,Russian Federation - between 162 and 168 deg East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1788,Russia - 168 to 174 deg E,Russian Federation - between 168 and 174 deg East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1789,Russia - 174 to 180 deg E,Russian Federation - between 174 and 180 deg East .,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1790,Russia - 180 to 174 deg W,Russian Federation - between 180 deg East and 174 deg West.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1791,Russia - E of 174 deg W,Russian Federation - east of 174 deg West.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1792,Europe - 6deg GK CM 15,Czech Republic and Germany ( former DDR) - east of 12 deg East; Poland and Slovakia - west of 18 deg East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.361,0
-1793,Europe - 6deg GK CM 21,Estonia; Latvia; Lithuania; Russian Federation; Ukraine; - west of 24 deg East; Poland - east of 24 deg East; Slovakia east of 18 deg East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.361,0
-1794,Europe - 6deg GK CM 27,Belarus - west of 30 deg East;  Estonia; Latvia & Lithuania - east of 24 deg East;  Moldova;  Russian Federation &  Ukraine - 24 to 30 deg East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.361,0
-1795,Europe - 6deg GK CM 33,Belarus - east of 30 deg East;  Russian Federation  &  Ukraine  - 30 to 36 deg East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.361,0
-1796,Europe - 6deg GK CM 39,Georgia - west of 36 deg East;  Russian Federation  - 36 to 42 deg East;  Ukraine - east of 36 deg East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.361,0
-1797,Europe - 6deg GK CM 45,Armenia - west of 48 deg East;  Azerbaijan - west of 48 deg East;  Georgia - east of 42 deg East;  Russian Federation - 42 to 48 deg East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.361,0
-1798,Asia - 6deg GK CM 51,Azerbaijan - east of 48 deg East;  Kazakstan - west of 54 deg East;  Russian Federation - 48 to 54 deg East;  Turkmenistan - west of 54 deg East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.361,0
-1799,Asia - 6deg GK CM 57,Kazakstan;  Russian Federation;  Turkmenistan  - 54 deg  to 60 deg East; Uzbekistan - west of 60 deg East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.361,0
-1800,Asia - 6deg GK CM 63,Kazakstan;  Russian Federation;  Uzbekistan - 60 to 66 deg East;  Turkmenistan - east of 60 deg East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.361,0
-1801,Asia - 6deg GK CM 69,Kazakstan &  Russian Federation - 66 to 72 deg East;  Kirgistan & Tadzhikstan - west of 72 deg East;  Uzbekistan - east of 66 deg East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.361,0
-1802,Asia - 6deg GK CM 75,Kazakstan;  Kirgizstan;  Russian Federation - 72 to 78 deg East;  Tadzhikstan - east of 72 deg East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.361,0
-1803,Asia - 6deg GK CM 81,Kazakstan &  Russian Federation - 78 to 84 deg East; Kirgizstan - east of 78 deg East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.361,0
-1804,Asia - 6deg GK CM 87,Kazakstan - east of 84 deg East;  Russian Federation - 84 to 90 deg East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.361,0
-1805,Europe - 6deg GK CM 9,Czech Republic and Germany (former DDR) - west of 12 deg East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.361,0
-1806,South America - SAD69 / UTM 17S,South America - between 84 and 78 deg West; southern hemisphere.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1807,South America - SAD69 / UTM 18N,South America - between 78 and 72 deg West; northern hemisphere.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1808,South America - SAD69 / UTM 18S,South America - Brazil - between 78 and 72 deg West; southern hemisphere.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1809,South America - SAD69 / UTM 19N,South America - between 72 and 66 deg West; northern hemisphere.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1810,South America - SAD69 / UTM 19S,South America - Brazil - between 72 and 66 deg West; southern hemisphere.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1811,South America - SAD69 / UTM 20N,South America - between 66 and 60 deg West; northern hemisphere.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1812,South America - SAD69 / UTM 20S,South America - Brazil - between 66 and 60 deg West; southern hemisphere.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1813,South America - SAD69 / UTM 21N,South America - between 60 and 54 deg West; northern hemisphere.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1814,South America - SAD69 / UTM 21S,South America - Brazil - between 60 and 54 deg West; southern hemisphere.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1815,South America - SAD69 / UTM 22N,South America - 54deg West to 48deg West; northern hemisphere. Brazil - offshore - Amazon cone.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1816,South America - SAD69 / UTM 22S,South America - Brazil - between 54 and 48 deg West; southern hemisphere.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1817,South America - SAD69 / UTM 23S,South America - between 48 and 42 deg West.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1818,South America - SAD69 / UTM 24S,South America - Brazil - between 42 and 36 deg West.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1819,South America - SAD69 / UTM 25S,South America - between 36 and 30 deg West.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1820,Falkland Islands - W of 60 deg W,Falkland Islands (Malvinas) - west of 60 deg West.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1821,Falkland Islands - E of 60 deg W,Falkland Islands (Malvinas) - east of 60 deg West.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1822,Namibia - offshore,Namibia - offshore.,,,,,EPSG,EPSG,1996-04-12 00:00:00,,0
-1823,South America - SIRGAS / UTM 17N,Between 84 and 78deg West; northern hemisphere. Ecuador - north of equator. Colombia.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-1824,South America - SIRGAS / UTM 17S,Between 84 and 78deg West; southern hemisphere.  Chile. Colombia. Ecuador. Peru.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-1825,South America - SIRGAS / UTM 18N,Between 78 and 72deg West; northern hemisphere. Colombia. Ecuador. Venezuela.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-1826,South America - SIRGAS / UTM 18S,Between 78 and 72deg West; southern hemisphere. Argentina. Brazil. Chile. Colombia. Ecuador. Peru.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-1827,South America - SIRGAS / UTM 19N,Between 72 and 66deg West; northern hemisphere. Brazil. Colombia. Venezuela.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-1828,South America - SIRGAS / UTM 19S,Between 72 and 66deg West; southern hemisphere. Argentina. Bolivia. Brazil. Chile. Colombia. Peru.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-1829,South America - SIRGAS / UTM 20N,Between 66 and 60deg West; northern hemisphere. Brazil. Guyana. Venezuela,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-1830,South America - SIRGAS / UTM 20S,Between 66 and 60deg West; southern hemisphere. Argentina. Bolivia. Brazil. Falkland Islands (Malvinas). Paraguay.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-1831,South America - SIRGAS / UTM 21N,Between 60 and 54deg West; northern hemisphere.  Brazil. French Guiana. Guyana.  Suriname.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-1832,South America - SIRGAS / UTM 21S,Between 60 and 54deg West; southern hemisphere. Argentina. Bolivia. Brazil. Falkland Islands (Malvinas). Paraguay. Uruguay.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-1833,South America - SIRGAS / UTM 22N,Between 54 and 48deg West; northern hemisphere. Brazil.  French Guiana.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-1834,South America - SIRGAS / UTM 22S,Between 54 and 48deg West; southern hemisphere. Brazil.  Uruguay.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-1835,South America - SIRGAS / UTM 23S,Between 48 and 42deg West; southern hemisphere. Brazil.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-1836,South America - SIRGAS / UTM 24S,Between 42 and 36deg West; southern hemisphere. Brazil,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-1837,South America - SIRGAS / UTM 25S,Between 36 and 30deg West; southern hemisphere. Brazil.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-1838,Namibia - W of 12 deg E,Namibia - west of 12 deg East.,,,,,EPSG,EPSG,1997-06-16 00:00:00,,0
-1839,Namibia - 12 to 14 deg E,Namibia - between 12 and 14 deg East.,,,,,EPSG,EPSG,1997-06-16 00:00:00,,0
-1840,Namibia - 14 to 16 deg E,Namibia - between 14 and 16 deg East.,,,,,EPSG,EPSG,1997-06-16 00:00:00,,0
-1841,Namibia - 16 to 18 deg E,Namibia - between 16 and 18 deg East.,,,,,EPSG,EPSG,1997-06-16 00:00:00,,0
-1842,Namibia - 18 to 20 deg E,Namibia - between 18 and 20 deg East.,,,,,EPSG,EPSG,1997-06-16 00:00:00,,0
-1843,Namibia - 20 to 22 deg E,Namibia - between 20 and 22 deg East.,,,,,EPSG,EPSG,1997-06-16 00:00:00,,0
-1844,Namibia - 22 to 24 deg E,Namibia - between 22 and 24 deg East.,,,,,EPSG,EPSG,1997-06-16 00:00:00,,0
-1845,Namibia - E of 24 deg E,Namibia - east of 24 deg East.,,,,,EPSG,EPSG,1997-06-16 00:00:00,,0
-1846,Sudan - south - W of 30 deg E,Sudan south - west of 30 deg East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1847,Sudan - south - E of 30 deg E,Sudan south - east of 30 deg East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1848,Madagascar - offshore - W of 48 deg E,Madagascar - offshore west of 48 deg East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1849,Madagascar - offshore - E of 48 deg E,Madagascar - offshore east of 48 deg East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1850,UAE - Abu Dhabi - W of 54 deg E,United Arab Emirates (UAE) - Abu Dhabi west of 54 deg East.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1851,Malaysia - East Malaysia,Malaysia - East Malaysia (Sabah; Sarawak).,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-1852,Asia - Brunei and East Malaysia - UTM zone 49,Brunei - offshore; Malaysia - East Malaysia (Sarawak).,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1853,Asia - Brunei and East Malaysia - UTM zone 50,Brunei - offshore; Malaysia - East Malaysia (Sabah).,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1854,Japan - zone I,Japan - Kyushu west of approximately 130 deg East - Nagasaki-ken; islands of Kagoshima-ken between 27 and 32 deg N and between 128 deg 18 min and 130 deg E (between 128 deg 18 min and 30 deg 13 min E for Amami islands).,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-1855,Japan - zone II,Japan - Kyushu east of approximately 130 deg East - Fukuoka-ken; Saga-ken; Kumamoto-ken; Oita-ken; Miyazaki-ken; Kagoshima-ken (except for area within Japan Plane Rectangular Coordinate System zone I).,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-1856,Japan - zone III,Japan - Honshu west of approximately 133 deg 15 min East - Yamaguchi-ken; Shimane-ken; Hiroshima-ken.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-1857,Japan - zone IV,Japan - Shikoku - Kagawa-ken; Ehime-ken; Tokushima-ken; Kochi-ken.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-1858,Japan - zone V,Japan - Honshu between approximately 133 deg 15 min and 135 deg 10 min East - Hyogo-ken; Tottori-ken; Okayama-ken.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-1859,Japan - zone VI,Japan - Honshu between approximately 135 deg 10 min and 136 deg 45 min East - Kyoto-fu; Osaka-fu; Fukui-ken; Shiga-ken; Mie-ken; Nara-ken; Wakayama-ken.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-1860,Japan - zone VII,Japan - Honshu between approximately 136 deg 15 min and 137 deg 45 min East - Ishikawa-ken; Toyama-ken; Gifu-ken; Aichi-ken.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-1861,Japan - zone VIII,Japan - Honshu between approximately 137 deg 45 min and 139 deg East - Niigata-ken; Nagano-ken; Yamanashi-ken; Shizuoka-ken.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-1862,Japan - zone IX,"Japan - Honshu - Tokyo-to. (Excludes offshore island areas of Tokyo-to covered by Japan Plane Rectangular Coordinate System zones XIV, XVIII and XIX).",,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-1863,Japan - zone X,Japan - Honshu north of 38 deg North approximately - Aomori-ken; Akita-ken; Yamagata-ken; Iwate-ken; Miyagi-ken.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-1864,Japan - zone XI,Japan - Hokkaido west of approximately 141 deg  East  - Otaru city; Hakodate city; Date city; Usu-gun and Abuta-gun of Iburi-shicyo; area of Hiyama-shicyo; area of Shiribeshi-shicyo; Oshima-shicyo.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-1865,Japan - zone XII,Japan - Hokkaido between approximately 141 and 143 deg min East - Sapporo city; Asahikawa city; Wakkanai city; Rumoi city; Bibai city; Yubari city; Iwamizawa city; Tomakomai city; Muroran city; Shibetsu city; Nayoro city; Ashibetsu city; Akabira city; Mikasa city; Takikawa city; Sunagawa city; Ebetsu city; Chitose city; Utashinai city; Fukagawa city; Monbetsu city; Furano city; Noboribetsu city; Eniwa city; Ishikari-shicyo; Monbetsu-gun of Abashiri-shicyo; Kamikawa- [...]
-1866,Japan - zone XIII,Japan - Hokkaido east of approximately 143 deg East  - Kitami city; Obihiro city; Kushiro city; Abashiri city; Nemuro city; Nemuro-shicyo; Kushiro-shicyo; Abashiri-shicyo (except Monbetsu-gun); Tokachi-shicyo.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-1867,Japan - zone XIV,Japan - Tokyo-to south of 28 deg North & between 140 deg 30 min & 143 deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-1868,Japan - zone XV,Japan - Okinawa-ken between 126 and 130 deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-1869,Japan - zone XVI,Japan - Okinawa-ken west of 126 deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-1870,Japan - zone XVII,Japan - Okinawa-ken east of 130 deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-1871,Japan - zone XVIII,Japan - Tokyo-to south of 28 deg North and west of 140 deg 30 min East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-1872,Japan - zone XIX,Japan - Tokyo-to south of 28 deg North & east of 143 deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-1873,6-degree TM - N hemisphere CM 177 deg W,Between 180 deg and 174 deg West; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1874,6-degree TM - S hemisphere CM 177 deg W,Between 180 deg and 174 deg West; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1875,6-degree TM - N hemisphere CM 171 deg W,Between 174 and 168 deg West; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1876,6-degree TM - S hemisphere CM 171 deg W,Between 174 and 168 deg West; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1877,6-degree TM - N hemisphere CM 165 deg W,Between 168 and 162 deg West; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1878,6-degree TM - S hemisphere CM 165 deg W,Between 168 and 162 deg West; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1879,6-degree TM - N hemisphere CM 159 deg W,Between 162 and 156 deg West; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1880,6-degree TM - S hemisphere CM 159 deg W,Between 162 and 156 deg West; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1881,6-degree TM - N hemisphere CM 153 deg W,Between 156 and 150 deg West; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1882,6-degree TM - S hemisphere CM 153 deg W,Between 156 and 150 deg West; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1883,6-degree TM - N hemisphere CM 147 deg W,Between 150 and 144 deg West; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1884,6-degree TM - S hemisphere CM 147 deg W,Between 150 and 144 deg West; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1885,6-degree TM - N hemisphere CM 141 deg W,Between 144 and 138 deg West; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1886,6-degree TM - S hemisphere CM 141 deg W,Between 144 and 138 deg West; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1887,6-degree TM - N hemisphere CM 135 deg W,Between 138 and 132 deg West; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1888,6-degree TM - S hemisphere CM 135 deg W,Between 138 and 132 deg West; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1889,6-degree TM - N hemisphere CM 129 deg W,Between 132 and 126 deg West; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1890,6-degree TM - S hemisphere CM 129 deg W,Between 132 and 126 deg West; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1891,6-degree TM - N hemisphere CM 123 deg W,Between 126 and 120 deg West; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1892,6-degree TM - S hemisphere CM 123 deg W,Between 126 and 120 deg West; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1893,6-degree TM - N hemisphere CM 117 deg W,Between 120 and 114 deg West; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1894,6-degree TM - S hemisphere CM 117 deg W,Between 120 and 114 deg West; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1895,6-degree TM - N hemisphere CM 111 deg W,Between 114 and 108 deg West; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1896,6-degree TM - S hemisphere CM 111 deg W,Between 114 and 108 deg West; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1897,6-degree TM - N hemisphere CM 105 deg W,Between 108 and 102 deg West; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1898,6-degree TM - S hemisphere CM 105 deg W,Between 108 and 102 deg West; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1899,6-degree TM - N hemisphere CM 99 deg W,Between 102 and 96 deg West; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1900,6-degree TM - S hemisphere CM 99 deg W,Between 102 and 96 deg West; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1901,6-degree TM - N hemisphere CM 93 deg W,Between 96 and 90 deg West; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1902,6-degree TM - S hemisphere CM 93 deg W,Between 96 and 90 deg West; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1903,6-degree TM - N hemisphere CM 87 deg W,Between 90 and 84 deg West; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1904,6-degree TM - S hemisphere CM 87 deg W,Between 90 and 84 deg West; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1905,6-degree TM - N hemisphere CM 81 deg W,Between 84 and 78 deg West; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1906,6-degree TM - S hemisphere CM 81 deg W,Between 84 and 78 deg West; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1907,6-degree TM - N hemisphere CM 75 deg W,Between 78 and 72 deg West; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1908,6-degree TM - S hemisphere CM 75 deg W,Between 78 and 72 deg West; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1909,6-degree TM - N hemisphere CM 69 deg W,Between 72 and 66 deg West; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1910,6-degree TM - S hemisphere CM 69 deg W,Between 72 and 66 deg West; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1911,6-degree TM - N hemisphere CM 63 deg W,Between 66 and 60 deg West; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1912,6-degree TM - S hemisphere CM 63 deg W,Between 66 and 60 deg West; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1913,6-degree TM - N hemisphere CM 57 deg W,Between 60 and 54 deg West; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1914,6-degree TM - S hemisphere CM 57 deg W,Between 60 and 54 deg West; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1915,6-degree TM - N hemisphere CM 51 deg W,Between 54 and 48 deg West; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1916,6-degree TM - S hemisphere CM 51 deg W,Between 54 and 48 deg West; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1917,6-degree TM - N hemisphere CM 45 deg W,Between 48 and 42 deg West; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1918,6-degree TM - S hemisphere CM 45 deg W,Between 48 and 42 deg West; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1919,6-degree TM - N hemisphere CM 39 deg W,Between 42 and 36 deg West; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1920,6-degree TM - S hemisphere CM 39 deg W,Between 42 and 36 deg West; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1921,6-degree TM - N hemisphere CM 33 deg W,Between 36 and 30 deg West; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1922,6-degree TM - S hemisphere CM 33 deg W,Between 36 and 30 deg West; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1923,6-degree TM - N hemisphere CM 27 deg W,Between 30 and 24 deg West; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1924,6-degree TM - S hemisphere CM 27 deg W,Between 30 and 24 deg West; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1925,6-degree TM - N hemisphere CM 21 deg W,Between 24 and 18 deg West; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1926,6-degree TM - S hemisphere CM 21 deg W,Between 24 and 18 deg West; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1927,6-degree TM - N hemisphere CM 15 deg W,Between 18 and 12 deg West; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1928,6-degree TM - S hemisphere CM 15 deg W,Between 18 and 12 deg West; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1929,6-degree TM - N hemisphere CM 9 deg W,Between 12 and 6 deg West; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1930,6-degree TM - S hemisphere CM 9 deg W,Between 12 and 6 deg West; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1931,6-degree TM - N hemisphere CM 3 deg W,Between 6 deg West and 0 deg East; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1932,6-degree TM - S hemisphere CM 3 deg W,Between 6 deg West and 0 deg East; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1933,6-degree TM - N hemisphere CM 3 deg E,Between 0 and 6 deg East; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1934,6-degree TM - S hemisphere CM 3 deg E,Between 0 and 6 deg East; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1935,6-degree TM - N hemisphere CM 9 deg E,Between 6 and 12 deg East; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1936,6-degree TM - S hemisphere CM 9 deg E,Between 6 and 12 deg East; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1937,6-degree TM - N hemisphere CM 15 deg E,Between 12 and 18 deg East; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1938,6-degree TM - S hemisphere CM 15 deg E,Between 12 and 18 deg East; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1939,6-degree TM - N hemisphere CM 21 deg E,Between 18 and 24 deg East; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1940,6-degree TM - S hemisphere CM 21 deg E,Between 18 and 24 deg East; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1941,6-degree TM - N hemisphere CM 27 deg E,Between 24 and 30 deg East; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1942,6-degree TM - S hemisphere CM 27 deg E,Between 24 and 30 deg East; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1943,6-degree TM - N hemisphere CM 33 deg E,Between 30 and 36 deg East; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1944,6-degree TM - S hemisphere CM 33 deg E,Between 30 and 36 deg East; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1945,6-degree TM - N hemisphere CM 39 deg E,Between 36 and 42 deg East; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1946,6-degree TM - S hemisphere CM 39 deg E,Between 36 and 42 deg East; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1947,6-degree TM - N hemisphere CM 45 deg E,Between 42 and 48 deg East; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1948,6-degree TM - S hemisphere CM 45 deg E,Between 42 and 48 deg East; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1949,6-degree TM - N hemisphere CM 51 deg E,Between 48 and 54 deg East; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1950,6-degree TM - S hemisphere CM 51 deg E,Between 48 and 54 deg East; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1951,6-degree TM - N hemisphere CM 57 deg E,Between 54 and 60 deg East; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1952,6-degree TM - S hemisphere CM 57 deg E,Between 54 and 60 deg East; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1953,6-degree TM - N hemisphere CM 63 deg E,Between 60 and 66 deg East; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1954,6-degree TM - S hemisphere CM 63 deg E,Between 60 and 66 deg East; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1955,6-degree TM - N hemisphere CM 69 deg E,Between 66 and 72 deg East; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1956,6-degree TM - S hemisphere CM 69 deg E,Between 66 and 72 deg East; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1957,6-degree TM - N hemisphere CM 75 deg E,Between 72 and 78 deg East; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1958,6-degree TM - S hemisphere CM 75 deg E,Between 72 and 78 deg East; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1959,6-degree TM - N hemisphere CM 81 deg E,Between 78 and 84 deg East; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1960,6-degree TM - S hemisphere CM 81 deg E,Between 78 and 84 deg East; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1961,6-degree TM - N hemisphere CM 87 deg E,Between 84 and 90 deg East; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1962,6-degree TM - S hemisphere CM 87 deg E,Between 84 and 90 deg East; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1963,6-degree TM - N hemisphere CM 93 deg E,Between 90 and 96 deg East; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1964,6-degree TM - S hemisphere CM 93 deg E,Between 90 and 96 deg East; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1965,6-degree TM - N hemisphere CM 99 deg E,Between 96 and 102eg East; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1966,6-degree TM - S hemisphere CM 99 deg E,Between 96 and 102eg East; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1967,6-degree TM - N hemisphere CM 105 deg E,Between 102 and 108 deg East; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1968,6-degree TM - S hemisphere CM 105 deg E,Between 102 and 108 deg East; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1969,6-degree TM - N hemisphere CM 111 deg E,Between 108 and 114 deg East; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1970,6-degree TM - S hemisphere CM 111 deg E,Between 108 and 114 deg East; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1971,6-degree TM - N hemisphere CM 117 deg E,Between 114 and 120 deg East; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1972,6-degree TM - S hemisphere CM 117 deg E,Between 114 and 120 deg East; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1973,6-degree TM - N hemisphere CM 123 deg E,Between 120 and 126 deg East; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1974,6-degree TM - S hemisphere CM 123 deg E,Between 120 and 126 deg East; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1975,6-degree TM - N hemisphere CM 129 deg E,Between 126 and 132 deg East; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1976,6-degree TM - S hemisphere CM 129 deg E,Between 126 and 132 deg East; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1977,6-degree TM - N hemisphere CM 135 deg E,Between 132 and 138 deg East; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1978,6-degree TM - S hemisphere CM 135 deg E,Between 132 and 138 deg East; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1979,6-degree TM - N hemisphere CM 141 deg E,Between 138 and 144 deg East; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1980,6-degree TM - S hemisphere CM 141 deg E,Between 138 and 144 deg East; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1981,6-degree TM - N hemisphere CM 147 deg E,Between 144 and 150 deg East; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1982,6-degree TM - S hemisphere CM 147 deg E,Between 144 and 150 deg East; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1983,6-degree TM - N hemisphere CM 153 deg E,Between 150 and 156 deg East; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1984,6-degree TM - S hemisphere CM 153 deg E,Between 150 and 156 deg East; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1985,6-degree TM - N hemisphere CM 159 deg E,Between 156 and 162 deg East; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1986,6-degree TM - S hemisphere CM 159 deg E,Between 156 and 162 deg East; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1987,6-degree TM - N hemisphere CM 165 deg E,Between 162 and 168 deg East; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1988,6-degree TM - S hemisphere CM 165 deg E,Between 162 and 168 deg East; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1989,6-degree TM - N hemisphere CM 171 deg E,Between 168 and 174 deg East; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1990,6-degree TM - S hemisphere CM 171 deg E,Between 168 and 174 deg East; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1991,6-degree TM - N hemisphere CM 177 deg E,Between 174 and 180 deg; northern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1992,6-degree TM - S hemisphere CM 177 deg E,Between 174 and 180 deg; southern hemisphere.,,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-1993,WGS72BE / UTM zone 48N,Between 102 and 108 deg East; northern hemisphere.  Vietnam - offshore.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1994,WGS72BE / UTM zone 49N,Between 108 and 114 deg East; northern hemisphere. Vietnam - offshore.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1995,WGS72BE / UTM zone 49S,Between 108 and 114 deg East; southern hemisphere.  Indonesia - offshore.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-1996,UPS - north,Northern hemisphere polar area.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1997,UPS - south,Southern hemisphere polar area.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-1998,UTM north,Northern hemisphere between equator and 84 deg North.,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-1999,UTM south,Southern hemisphere between equator and 80 deg South.,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-2000,WGS84 / UTM zone 1N,Between 180 deg and 174 deg West; northern hemisphere; Russian Federation.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2001,WGS84 / UTM zone 1S,Between 180 deg and 174 deg West; southern hemisphere.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2002,WGS84 / UTM zone 2N,Between 174 and 168 deg West; northern hemisphere. Russian Federation; United States (USA) - Alaska (AK).,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2003,WGS84 / UTM zone 2S,Between 174 and 168 deg West; southern hemisphere.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2004,WGS84 / UTM zone 3N,Between 168 and 162 deg West; northern hemisphere. United States (USA) - Alaska (AK).,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2005,WGS84 / UTM zone 3S,Between 168 and 162 deg West; southern hemisphere.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2006,WGS84 / UTM zone 4N,Between 162 and 156 deg West; northern hemisphere. United States (USA) - Alaska (AK).,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2007,WGS84 / UTM zone 4S,Between 162 and 156 deg West; southern hemisphere.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2008,WGS84 / UTM zone 5N,Between 156 and 150 deg West; northern hemisphere. United States (USA) - Alaska (AK).,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2009,WGS84 / UTM zone 5S,Between 156 and 150 deg West; southern hemisphere.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2010,WGS84 / UTM zone 6N,Between 150 and 144 deg West; northern hemisphere. United States (USA) - Alaska (AK).,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2011,WGS84 / UTM zone 6S,Between 150 and 144 deg West; southern hemisphere.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2012,WGS84 / UTM zone 7N,Between 144 and 138 deg West; northern hemisphere. Canada - British Columbia (BC); Yukon. United States (USA) - Alaska (AK).,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2013,WGS84 / UTM zone 7S,Between 144 and 138 deg West; southern hemisphere.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2014,WGS84 / UTM zone 8N,Between 138 and 132 deg West; northern hemisphere. Canada - British Columbia (BC); North West Territiories; Yukon. United States (USA) - Alaska (AK).,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2015,WGS84 / UTM zone 8S,Between 138 and 132 deg West; southern hemisphere.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2016,WGS84 / UTM zone 9N,Between 132 and 126 deg West; northern hemisphere. Canada - British Columbia (BC); North West Territories; Yukon. United States (USA) - Alaska (AK).,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2017,WGS84 / UTM zone 9S,Between 132 and 126 deg West; southern hemisphere.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2018,WGS84 / UTM zone 10N,Between 126 and 120 deg West; northern hemisphere. Canada - British Columbia (BC); North West Territories; Nunavut; Yukon. United States (USA) - Alaska (AK).,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2019,WGS84 / UTM zone 10S,Between 126 and 120 deg West; southern hemisphere.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2020,WGS84 / UTM zone 11N,Between 120 and 114 deg West; northern hemisphere. Canada - Alberta; British Columbia (BC); North West Territories; Nunavut. Mexico. United States (USA).,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2021,WGS84 / UTM zone 11S,Between 120 and 114 deg West; southern hemisphere.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2022,WGS84 / UTM zone 12N,Between 114 and 108 deg West; northern hemisphere. Canada - Alberta; North West Territories; Nunavut; Saskatchewan.  Mexico.  United States (USA).,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2023,WGS84 / UTM zone 12S,Between 114 and 108 deg West; southern hemisphere.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2024,WGS84 / UTM zone 13N,Between 108 and 102 deg West; northern hemisphere. Canada - North West Territories; Nunavut; Saskatchewan.  Mexico.  United States (USA).,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2025,WGS84 / UTM zone 13S,Between 108 and 102 deg West; southern hemisphere.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2026,WGS84 / UTM zone 14N,Between 102 and 96 deg West; northern hemisphere. Canada - Manitoba; Nunavut; Saskatchewan.  Mexico.  United States (USA).,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2027,WGS84 / UTM zone 14S,Between 102 and 96 deg West; southern hemisphere.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2028,WGS84 / UTM zone 15N,Between 96 and 90 deg West; northern hemisphere. Canada - Manitoba; Nunavut; Ontario.  Guatemala.  Mexico.  United States (USA) - Gulf of Mexico (GoM).,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2029,WGS84 / UTM zone 15S,Between 96 and 90 deg West; southern hemisphere.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2030,WGS84 / UTM zone 16N,Between 90 and 84 deg West; northern hemisphere. Belize. Canada - Manitoba; Nunavut; Ontario.  Costa Rica. Cuba. El Salvador. Guatemala. Honduras. Mexico. Nicaragua. Puerto Rico. United States (USA).,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2031,WGS84 / UTM zone 16S,Between 90 and 84 deg West; southern hemisphere.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2032,WGS84 / UTM zone 17N,Between 84 and 78 deg West; northern hemisphere. Bahamas. Ecuador - north of equator. Canada - Nunavut; Ontario; Quebec.  Cayman Islands.  Colombia. Costa Rica. Jamaica. Nicaragua. Panama. Puerto Rico. United States (USA).,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2033,WGS84 / UTM zone 17S,Between 84 and 78 deg West; southern hemisphere. Ecuador. Peru.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2034,WGS84 / UTM zone 18N,Between 78 and 72 deg West; northern hemisphere. Bahamas. Canada - Nunavut; Ontario; Quebec. Colombia. Cuba. Ecuador. Greenland. Haiti. Jamica. Panama. Turks and Caicos Islands. United States (USA). Venezuela.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2035,WGS84 / UTM zone 18S,Between 78 and 72 deg West; southern hemisphere. Argentina. Brazil. Chile. Colombia. Ecuador. Peru.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2036,WGS84 / UTM zone 19N,Between 72 and 66 deg West; northern hemisphere. Aruba. Bahamas. Brazil. Canada - New Brunswick (NB); Newfoundland; Nunavut; Nova Scotia (NS); Quebec. Colombia. Dominican Republic. Greenland. Netherlands Antilles. Puerto Rico. Turks and Caicos Islands. United States. Venezuela.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2037,WGS84 / UTM zone 19S,Between 72 and 66 deg West; southern hemisphere. Argentina. Bolivia. Brazil. Chile. Colombia. Peru.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2038,WGS84 / UTM zone 20N,Between 66 and 60 deg West; northern hemisphere. Anguilla. Antigua & Barbuda. Bermuda. Brazil. Canada - New Brunswick (NB); Newfoundland; North west Territories; Nova Scotia (NS); Prince Edward Island; Quebec. Dominica. Greenland. Grenada. Guadeloupe. Guyana. Martinique. Montserrat. Saint Kitts and Nevis. Saint Lucia. Saint Vncent and the Grenadines. Trinidad and Tobago. Venezuela. Virgin islands.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2039,WGS84 / UTM zone 20S,Between 66 and 60 deg West; southern hemisphere. Argentina. Bolivia. Brazil. Falkland Islands (Malvinas). Paraguay.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2086,WGS84 / UTM zone 44N,Between 78 and 84 deg East; northern hemisphere. China. India. Kazakstan. Kyrgyzstan. Nepal. Russian Federation. Sri Lanka.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2087,WGS84 / UTM zone 44S,Between 78 and 84 deg East; southern hemisphere.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2088,WGS84 / UTM zone 45N,Between 84 and 90 deg East; northern hemisphere. Bangladesh. Bhutan. China. India. Kazakstan. Mongolia. Nepal. Russian Federation.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2089,WGS84 / UTM zone 45S,Between 84 and 90 deg East; southern hemisphere.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2090,WGS84 / UTM zone 46N,Between 90 and 96 deg East; northern hemisphere. Bangladesh. Bhutan. China. Indonesia. Mongolia. Myanmar (Burma). Russian Federation.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2091,WGS84 / UTM zone 46S,Between 90 and 96 deg East; southern hemisphere.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2092,WGS84 / UTM zone 47N,Between 96 and 102 deg East; northern hemisphere. China. Indonesia. Laos. Malaysia - West Malaysia. Mongolia. Myanmar (Burma). Russian Federation. Thailand.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2093,WGS84 / UTM zone 47S,Between 96 and 102 deg East; southern hemisphere. Indonesia.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2094,WGS84 / UTM zone 48N,Between 102 and 108 deg East; northern hemisphere. Cambodia. China. Indonesia. Laos. Malaysia - West Malaysia. Mongolia. Russian Federation. Singapore. Thailand. Vietnam.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2095,WGS84 / UTM zone 48S,Between 102 and 108 deg East; southern hemisphere. Indonesia.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2096,WGS84 / UTM zone 49N,Between 108 and 114 deg East; northern hemisphere. China. Hong Kong. Indonesia. Macau. Malaysia - East Malaysia - Sarawak. Mongolia. Russian Federation. Vietnam.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2097,WGS84 / UTM zone 49S,Between 108 and 114 deg East; southern hemisphere. Australia. Indonesia.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2098,WGS84 / UTM zone 50N,Between 114 and 120 deg East; northern hemisphere. Brunei. China. Hong Kong. Indonesia. Malaysia - East Malaysia - Sarawak. Mongolia. Philippines. Russian Federation. Taiwan.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2099,WGS84 / UTM zone 50S,Between 114 and 120 deg East; southern hemisphere. Australia. Indonesia.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2100,WGS84 / UTM zone 51N,Between 120 and 126 deg East; northern hemisphere. China. Indonesia. Japan. North Korea. Philippines. Russian Federation.  South Korea. Taiwan.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2101,WGS84 / UTM zone 51S,Between 120 and 126 deg East; southern hemisphere. Australia. East Timor. Indonesia.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2102,WGS84 / UTM zone 52N,Between 126 and 132 deg East; northern hemisphere. China. Indonesia. Japan. North Korea. Russian Federation. South Korea.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2103,WGS84 / UTM zone 52S,Between 126 and 132 deg East; southern hemisphere. Australia. East Timor. Indonesia.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2104,WGS84 / UTM zone 53N,Between 132 and 138 deg East; northern hemisphere. China. Japan. Russian Federation.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2105,WGS84 / UTM zone 53S,Between 132 and 138 deg East; southern hemisphere. Australia.  Indonesia.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2106,WGS84 / UTM zone 54N,Between 138 and 144 deg East; northern hemisphere. Japan. Russian Federation.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2107,WGS84 / UTM zone 54S,Between 138 and 144 deg East; southern hemisphere. Australia. Indonesia. Papua New Guinea.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2108,WGS84 / UTM zone 55N,Between 144 and 150 deg East; northern hemisphere. Japan. Russian Federation.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2109,WGS84 / UTM zone 55S,Between 144 and 150 deg East; southern hemisphere. Australia. Papua New Guinea.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2110,WGS84 / UTM zone 56N,Between 150 and 156 deg East; northern hemisphere. Russian Federation.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2111,WGS84 / UTM zone 56S,Between 150 and 156 deg East; southern hemisphere. Australia. Papua New Guinea.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2112,WGS84 / UTM zone 57N,Between 156 and 162 deg East; northern hemisphere. Russian Federation.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2113,WGS84 / UTM zone 57S,Between 156 and 162 deg East; southern hemisphere.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2114,WGS84 / UTM zone 58N,Between 162 and 168 deg East; northern hemisphere. Russian Federation.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2115,WGS84 / UTM zone 58S,Between 162 and 168 deg East; southern hemisphere.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2116,WGS84 / UTM zone 59N,Between 168 and 174 deg East; northern hemisphere. Russian Federation.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2117,WGS84 / UTM zone 59S,Between 168 and 174 deg East; southern hemisphere. New Zealand.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2118,WGS84 / UTM zone 60N,Between 174 and 180 deg East; northern hemisphere. Russian Federation.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2119,WGS84 / UTM zone 60S,Between 174 and 180 deg East; southern hemisphere. New Zealand.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2120,Guatemala - N of 15 deg 50 min N,Guatemala - north of 15 deg 50 min North.,,,,,EPSG,EPSG,1999-08-16 00:00:00,,0
-2121,Guatemala - S of 15 deg 50 min N,Guatemala - south of 15 deg 50 min North.,,,,,EPSG,EPSG,2000-01-06 00:00:00,,0
-2122,Europe - ETRS89 / UTM 28,Europe - between 18 and 12 deg West - United Kingdom (UKCS) offshore.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-2123,Europe - ETRS89 / UTM 29,Europe - between 12 and 6 deg West - United Kingdom (UKCS) offshore.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-2124,Europe - ETRS89 / UTM 30,Europe - between 6 and 0 deg West.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-2125,Europe - ETRS89 / UTM 31,Europe - between 0 and 6 deg East - Norway.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-2126,Europe - ETRS89 / UTM 32,Europe - between 6 and 12deg East - Norway.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-2127,Europe - ETRS89 / UTM 33,Europe - between 12 and 18deg East - Germany - Brandenburg; Norway.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-2128,Europe - ETRS89 / UTM 34,Europe - between 18 and 24deg East - Norway.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-2129,Europe - ETRS89 / UTM 35,Europe - between 24 and 30deg East - Norway.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-2130,Europe - ETRS89 / UTM 36,Europe - between 30 and 36deg East.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-2131,Europe - ETRS89 / UTM 37,Europe - between 36 and 42deg East.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-2132,Europe - ETRS89 / UTM 38,Europe - between 42 and 48deg East.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-2133,North America - UTM zone 3,North America - between 168 and 162 deg West. United States (USA) - Alaska.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2134,North America - UTM zone 4,North America - between 162 and 156 deg West. United States (USA) - Alaska.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2135,North America - UTM zone 5,North America - between 156 and 150 deg West. United States (USA) - Alaska.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2136,North America - UTM zone 6,North America - between 150 and 144 deg West. United States (USA) - Alaska.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2137,North America - UTM zone 7,North America - between 144 and 138 deg West. Canada - British Columbia (BC); Yukon. United States (USA) - Alaska (AK).,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2138,North America - UTM zone 8,North America - between 138 and 132 deg West. Canada - British Columbia (BC); North West Territiories; Yukon. United States (USA) - Alaska (AK).,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2139,North America - UTM zone 9,North America - between 132 and 126 deg West. Canada - British Columbia (BC); North West Territories; Yukon. United States (USA) - Alaska (AK).,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2140,North America - UTM zone 10,North America - between 130 and 120 deg West. Canada - British Columbia (BC); North West Territories; Nunavut; Yukon. United States (USA) - Alaska (AK).,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2141,North America - UTM zone 11,North America - between 120 and 114 deg West. Canada - Alberta; British Columbia (BC); North West Territories; Nunavut. Mexico. United States (USA).,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2142,North America - UTM zone 12,North America - between 114 and 108 deg West. Canada - Alberta; North West Territories; Nunavut; Saskatchewan.  Mexico.  United States (USA).,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2143,North America - UTM zone 13,North America - between 108 and 102 deg West. Canada - North West Territories; Nunavut; Saskatchewan.  Mexico.  United States (USA).,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2144,North America - UTM zone 14,North America - between 102 and 96 deg West. Canada - Manitoba; Nunavut; Saskatchewan.  Mexico.  United States (USA).,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2145,North America - UTM zone 15,North America - between 96 and 90 deg West. Canada - Manitoba; Nunavut; Ontario.  Guatemala.  Mexico.  United States (USA) - Gulf of Mexico (GoM).,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2146,North America - UTM zone 16,North America - between 90 and 84 deg West.  Belize. Canada - Manitoba; Nunavut; Ontario.  Costa Rica. Cuba. El Salvador. Guatemala. Honduras. Mexico. Nicaragua. United States (USA).,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2147,North America - UTM zone 17,North America - between 84 and 78 deg West. Canada - Nunavut; Ontario; Quebec.  Mexico.  United States (USA).,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2148,North America - UTM zone 18,North America - between 78 and 72 deg West. Canada - Nunavut; Ontario; Quebec. United States (USA).,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2149,North America - UTM zone 19,North America - between 72 and 66 deg West. Canada - New Brunswick (NB); Newfoundland; Nunavut; Nova Scotia (NS); Quebec. United States (USA).,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2150,North America - UTM zone 20,North America - between 66 and 60 deg West. Canada - New Brunswick (NB); Newfoundland; North west Territories; Nova Scotia (NS); Prince Edward Island; Quebec. United States (USA) offshore Atlantic,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2151,Canada - UTM zone 21,North America - between 60 and 54 deg West. Canada - Newfoundland; Quebec.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2152,Canada - UTM zone 22,North America - between 54 and 48 deg West. Canada - Newfoundland.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2153,Canada - UTM zone 23,North America - Canada offshore Atlantic - between 48 and 42 deg West.,,,,,EPSG,EPSG,1995-06-02 00:00:00,,0
-2154,USA - Alabama - SPCS - E,United States (USA) - Alabama east of approximately 86d 37m West - counties Barbour; Bullock; Calhoun; Chambers; Cherokee; Clay; Cleburne; Coffee; Coosa; Covington; Crenshaw; Dale; De Kalb; Elmore; Etowah; Geneva; Henry; Houston; Jackson; Lee; Macon; Madison; Marshall; Montgomery; Pike; Randolph; Russell; St.Clair; Talladega; Tallapoosa.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-2155,USA - Alabama - SPCS - W,United States (USA) - Alabama west of approximately 86d 37m West - counties Autauga; Baldwin; Bibb; Blount; Butler; Chilton; Choctaw; Clarke; Colbert; Conecuh; Cullman; Dallas; Escambia; Fayette; Franklin; Greene; Hale; Jefferson; Lamar; Lauderdale; Lawrence; Limestone; Lowndes; Marengo; Marion; Mobile; Monroe; Morgan; Perry; Pickens; Shelby; Sumter; Tuscaloosa; Walker; Washington; Wilcox; Winston.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-2156,USA - Alaska - Panhandle,United States (USA) - Alaska - east of 141 deg West; i.e. Panhandle.,,,,,EPSG,EPSG,1996-09-12 00:00:00,,0
-2157,USA - Alaska - Aleutian Islands,United States (USA) - Alaska - Aleutian Islands.,,,,,EPSG,EPSG,1999-04-22 00:00:00,,0
-2158,USA - Alaska - 144 to 141 deg W,United States (USA) - Alaska - 144 to 141 deg West.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-2159,USA - Alaska - 148 to 144 deg W,United States (USA) - Alaska - 148 to 144 deg West.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-2160,USA - Alaska - 152 to 148 deg W,United States (USA) - Alaska - 152 to 148 deg West.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-2161,USA - Alaska - 156 to 152 deg W,United States (USA) - Alaska - 156 to 152 deg West.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-2162,USA - Alaska - 160 to 156 deg W,United States (USA) - Alaska - 160 to 156 deg West.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-2163,USA - Alaska - 164 to 160 deg W,United States (USA) - Alaska - 164 to 160 deg West.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-2164,USA - Alaska - N of 54.5 deg N; 168 to 164 deg W,United States (USA) - Alaska - north of 54d 30m North and between 168 to 164 deg West.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-2165,USA - Alaska - N of 54.5 deg N; W of 168 deg W,United States (USA) - Alaska - north of 54d 30m North and west of 168 deg West.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-2166,USA - Arizona - SPCS - central,United States (USA) - Arizona between approximately 110d 45m and 113d 20m West - counties Coconino; Maricopa; Pima; Pinal; Santa Cruz; Yavapai.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2167,USA - Arizona - SPCS - E,United States (USA) - Arizona east of approximately 110d 45m West - counties Apache; Cochise; Gila; Graham; Greenlee; Navajo.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2168,USA - Arizona - SPCS - W,United States (USA) - Arizona west of approximately 113d 20m West - counties La Paz; Mohave; Yuma.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2169,USA - Arkansas - SPCS - N,United States (USA) - Arkansas north of approximately 34d 50m North - counties Baxter; Benton; Boone; Carroll; Clay; Cleburne; Conway; Craighead; Crawford; Crittenden; Cross; Faulkner; Franklin; Fulton; Greene; Independence; Izard; Jackson; Johnson; Lawrence; Logan; Madison; Marion; Mississippi; Newton; Perry; Poinsett; Pope; Randolph; Scott; Searcy; Sebastian; Sharp; St. Francis; Stone; Van Buren; Washington; White; Woodruff; Yell.,,,,,EPSG,EPSG,1999-04-22 [...]
-2170,USA - Arkansas - SPCS - S,United States (USA) - Arkansas south of approximately 34d 50m North - counties Arkansas; Ashley; Bradley; Calhoun; Chicot; Clark; Cleveland; Columbia; Dallas; Desha; Drew; Garland; Grant; Hempstead; Hot Spring; Howard; Jefferson; Lafayette; Lee; Lincoln; Little River; Lonoke; Miller; Monroe; Montgomery; Nevada; Ouachita; Phillips; Pike; Polk; Prairie; Pulaski; Saline; Sevier; Union.,,,,,EPSG,EPSG,1999-04-22 00:00:00,,0
-2171,USA - GoM OCS - W of 96 deg W,United States (USA) - Gulf of Mexico outer continental shelf (GoM OCS) west of approximately 96 deg West - protraction areas Corpus Christi; Port Isabel.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-2172,USA - GoM OCS - 96 to 90 deg W,United States (USA) - Gulf of Mexico outer continental shelf (GoM OCS) between approximately 96 deg and 90 deg West - protraction areas East Breaks (EB); Alaminos Canyon (AC); Garden Banks (GB); Keathley Canyon (KC); Ewing Bank (EW); Green Canyon (GC); Walker Ridge (WR).,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-2173,USA - GoM OCS - 90 to 84 deg W,United States (USA) - Gulf of Mexico outer continental shelf (GoM OCS) between approximately 90 deg and 84 deg West - protraction areas Mobile (MO); Viosca Knoll (VK); Mississippi Canyon (MC); Atwater Valley (AT); Lund; Pensacola; Destin Dome (DD); De Soto Canyon; Lloyd; Henderson; Apalachicola; Florida Middle Ground; The Elbow; Vernon Basin; Howell Hook; Rankin.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-2174,USA - GoM OCS - E of 84 deg W,United States (USA) - Gulf of Mexico outer continental shelf (GoM OCS) east of approximately 84 deg West - protraction areas Gainesville; Tarpon Springs; St. Petersburg; Charlotte Harbor; Pulley Ridge; Dry Tortugas; Miami; Key West.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-2175,USA - California - SPCS - 1,United States (USA) - California north of approximately 40 deg North - counties Del Norte; Humboldt; Lassen; Modoc; Plumas; Shasta; Siskiyou; Tehama; Trinity.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2176,USA - California - SPCS - 2,United States (USA) - California between approximately 40 deg & 38d 15m North - counties Alpine; Amador; Butte; Colusa; El Dorado; Glenn; Lake; Mendocino; Napa; Nevada; Placer; Sacramento; Sierra; Solano; Sonoma; Sutter; Yolo; Yuba.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2177,USA - California - SPCS - 3,United States (USA) - California between approximately 38d 15m & 37d North - counties Alameda; Calaveras; Contra Costa; Madera; Marin; Mariposa; Merced; Mono; San Francisco; San Joaquin; San Mateo; Santa Clara; Santa Cruz; Stanislaus; Tuolumne.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2178,USA - California - SPCS - 4,United States (USA) - California between approximately 37d & 35d 30m North - counties Fresno; Inyo; Kings; Monterey; San Benito; Tulare.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2179,USA - California - SPCS27 - 5,United States (USA) - California between approximately 35d 50m & 34d North excluding LA - counties Kern; San Bernardino; San Luis Obispo; Santa Barbara; Ventura.,,,,,EPSG,EPSG,1999-04-22 00:00:00,,0
-2180,USA - California - SPCS - 6,United States (USA) - California south of approximately 38d 30m North - counties Imperial; Orange; Riverside; San Diego.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2181,USA - California - SPCS27 - 7,United States (USA) - California - Los Angeles county.,,,,,EPSG,EPSG,1999-04-22 00:00:00,,0
-2182,USA - California - SPCS83 - 5,United States (USA) - California between approximately 35d 50m & 34d North - counties Kern; Los Angeles; San Bernardino; San Luis Obispo; Santa Barbara; Ventura.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2183,USA - Colorado - SPCS - C,United States (USA) - Colorado between approximately 39d 50m & 38d 30m North - counties Arapahoe; Chaffee; Cheyenne; Clear Creek; Delta; Denver; Douglas; Eagle; El Paso; Elbert; Fremont; Garfield; Gunnison; Jefferson; Kit Carson; Lake; Lincoln; Mesa; Park; Pitkin; Summit; Teller.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2184,USA - Colorado - SPCS - N,United States (USA) - Colorado north of approximately 39d 50m North - counties Adams; Boulder; Gilpin; Grand; Jackson; Larimer; Logan; Moffat; Morgan; Phillips; Rio Blanco; Routt; Sedgwick; Washington; Weld; Yuma.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2185,USA - Colorado - SPCS - S,United States (USA) - Colorado south of approximately 38d 30m North - counties Alamosa; Archuleta; Baca; Bent; Conejos; Costilla; Crowley; Custer; Dolores; Hinsdale; Huerfano; Kiowa; La Plata; Las Animas; Mineral; Montezuma; Montrose; Otero; Ouray; Prowers; Pueblo; Rio Grande; Saguache; San Juan; San Miguel.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2186,USA - Florida - SPCS - E,United States (USA) - Florida east of approximately 81d 45m West - counties of Brevard; Broward; Clay; Collier; Dade; Duval; Flagler; Glades; Hendry; Highlands; Indian River; Lake; Martin; Monroe; Nassau; Okeechobee; Orange; Osceola; Palm Beach; Putnam; Seminole; St. Johns; St. Lucie; Volusia.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2187,USA - Florida - SPCS - N,United States (USA) - Florida north of approximately 29d 30m North & west of approximately 82d West - counties of Alachua; Baker; Bay; Bradford; Calhoun; Columbia; Dixie; Escambia; Franklin; Gadsden; Gilchrist; Gulf; Hamilton; Holmes; Jackson; Jefferson; Lafayette; Leon; Liberty; Madison; Okaloosa; Santa Rosa; Suwannee; Taylor; Union; Wakulla; Walton; Washington.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2188,USA - Florida - SPCS - W,United States (USA) - Florida west of approximately 81d 45m West & south of approximately 29d 30m North - counties of Charlotte; Citrus; De Soto; Hardee; Hernando; Hillsborough; Lee; Levy; Manatee; Marion; Pasco; Pinellas; Polk; Sarasota; Sumter.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2189,USA - Georgia - SPCS - E,United States (USA) - Georgia east of approximately 83d 15m West - counties of Appling; Atkinson; Bacon; Baldwin; Brantley; Bryan; Bulloch; Burke; Camden; Candler; Charlton; Chatham; Clinch; Coffee; Columbia; Dodge; Echols; Effingham; Elbert; Emanuel; Evans; Franklin; Glascock; Glynn; Greene; Hancock; Hart; Jeff Davis; Jefferson; Jenkins; Johnson; Lanier; Laurens; Liberty; Lincoln; Long; Madison; McDuffie; McIntosh; Montgomery; Oglethorpe; Pierce; Richmond;  [...]
-2190,USA - Georgia - SPCS - W,United States (USA) - Georgia west of approximately 83d 15m West - counties of Baker; Banks; Barrow; Bartow; Ben Hill; Berrien; Bibb; Bleckley; Brooks; Butts; Calhoun; Carroll; Catoosa; Chattahoochee; Chattooga; Cherokee; Clarke; Clay; Clayton; Cobb; Colquitt; Cook; Coweta; Crawford; Crisp; Dade; Dawson; De Kalb; Decatur; Dooly; Dougherty; Douglas; Early; Fannin; Fayette; Floyd; Forsyth; Fulton; Gilmer; Gordon; Grady; Gwinnett; Habersham; Hall; Haralson; Har [...]
-2191,USA - Idaho - SPCS - central,United States (USA) - Idaho between approximately 113d & 115d West - counties of Blaine; Butte; Camas; Cassia; Custer; Gooding; Jerome; Lemhi; Lincoln; Minidoka; Twin Falls.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2192,USA - Idaho - SPCS - E,United States (USA) - Idaho east of approximately 113d West - counties of Bannock; Bear Lake; Bingham; Bonneville; Caribou; Clark; Franklin; Fremont; Jefferson; Madison; Oneida; Power; Teton.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2193,USA - Idaho - SPCS - W,United States (USA) - Idaho - west of approximately 115d West - counties of Ada; Adams; Benewah; Boise; Bonner; Boundary; Canyon; Clearwater; Elmore; Gem; Idaho; Kootenai; Latah; Lewis; Nez Perce; Owyhee; Payette; Shoshone; Valley; Washington.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2194,USA - Illinois - SPCS - E,United States (USA) - Illinois east of approximately 89d 05m West - counties of Boone; Champaign; Clark; Clay; Coles; Cook; Crawford; Cumberland; De Kalb; De Witt; Douglas; Du Page; Edgar; Edwards; Effingham; Fayette; Ford; Franklin; Gallatin; Grundy; Hamilton; Hardin; Iroquois; Jasper; Jefferson; Johnson; Kane; Kankakee; Kendall; La Salle; Lake; Lawrence; Livingston; Macon; Marion; Massac; McHenry; McLean; Moultrie; Piatt; Pope; Richland; Saline; Shelby; V [...]
-2195,USA - Illinois - SPCS - W,United States (USA) - Illinois west of approximately 89d 05m West - counties of Adams; Alexander; Bond; Brown; Bureau; Calhoun; Carroll; Cass; Christian; Clinton; Fulton; Greene; Hancock; Henderson; Henry; Jackson; Jersey; Jo Daviess; Knox; Lee; Logan; Macoupin; Madison; Marshall; Mason; McDonough; Menard; Mercer; Monroe; Montgomery; Morgan; Ogle; Peoria; Perry; Pike; Pulaski; Putnam; Randolph; Rock Island; Sangamon; Schuyler; Scott; St. Clair; Stark; Steph [...]
-2196,USA - Indiana - SPCS - E,United States (USA) - Indiana east of approximately 86d 25m West - counties of Adams; Allen; Bartholomew; Blackford; Brown; Cass; Clark; De Kalb; Dearborn; Decatur; Delaware; Elkhart; Fayette; Floyd; Franklin; Fulton; Grant; Hamilton; Hancock; Harrison; Henry; Howard; Huntington; Jackson; Jay; Jefferson; Jennings; Johnson; Kosciusko; Lagrange; Madison; Marion; Marshall; Miami; Noble; Ohio; Randolph; Ripley; Rush; Scott; Shelby; St. Joseph; Steuben; Switzerla [...]
-2197,USA - Indiana - SPCS - W,United States (USA) - Indiana west of approximately 86d 25m West - counties of Benton; Boone; Carroll; Clay; Clinton; Crawford; Daviess; Dubois; Fountain; Gibson; Greene; Hendricks; Jasper; Knox; La Porte; Lake; Lawrence; Martin; Monroe; Montgomery; Morgan; Newton; Orange; Owen; Parke; Perry; Pike; Porter; Posey; Pulaski; Putnam; Spencer; Starke; Sullivan; Tippecanoe; Vanderburgh; Vermillion; Vigo; Warren; Warrick; White.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2198,USA - Iowa - SPCS - N,United States (USA) - Iowa north of approximately 42deg North - counties of Allamakee; Benton; Black Hawk; Boone; Bremer; Buchanan; Buena Vista; Butler; Calhoun; Carroll; Cerro Gordo; Cherokee; Chickasaw; Clay; Clayton; Crawford; Delaware; Dickinson; Dubuque; Emmet; Fayette; Floyd; Franklin; Greene; Grundy; Hamilton; Hancock; Hardin; Howard; Humboldt; Ida; Jackson; Jones; Kossuth; Linn; Lyon; Marshall; Mitchell; Monona; O'Brien; Osceola; Palo Alto; Plymouth; Po [...]
-2199,USA - Iowa - SPCS - S,United States (USA) - Iowa south of approximately 42deg North - counties of Adair; Adams; Appanoose; Audubon; Cass; Cedar; Clarke; Clinton; Dallas; Davis; Decatur; Des Moines; Fremont; Guthrie; Harrison; Henry; Iowa; Jasper; Jefferson; Johnson; Keokuk; Lee; Louisa; Lucas; Madison; Mahaska; Marion; Mills; Monroe; Montgomery; Muscatine; Page; Polk; Pottawattamie; Poweshiek; Ringgold; Scott; Shelby; Taylor; Union; Van Buren; Wapello; Warren; Washington; Wayne.,,,, [...]
-2200,USA - Kansas - SPCS - N,United States (USA) - Kansas north of approximately 38d 45m North - counties of Atchison; Brown; Cheyenne; Clay; Cloud; Decatur; Dickinson; Doniphan; Douglas; Ellis; Ellsworth; Geary; Gove; Graham; Jackson; Jefferson; Jewell; Johnson; Leavenworth; Lincoln; Logan; Marshall; Mitchell; Morris; Nemaha; Norton; Osborne; Ottawa; Phillips; Pottawatomie; Rawlins; Republic; Riley; Rooks; Russell; Saline; Shawnee; Sheridan; Sherman; Smith; Thomas; Trego; Wabaunsee; Wal [...]
-2201,USA - Kansas - SPCS - S,United States (USA) - Kansas south of approximately 38d 45m North - counties of Allen; Anderson; Barber; Barton; Bourbon; Butler; Chase; Chautauqua; Cherokee; Clark; Coffey; Comanche; Cowley; Crawford; Edwards; Elk; Finney; Ford; Franklin; Grant; Gray; Greeley; Greenwood; Hamilton; Harper; Harvey; Haskell; Hodgeman; Kearny; Kingman; Kiowa; Labette; Lane; Linn; Lyon; Marion; McPherson; Meade; Miami; Montgomery; Morton; Neosho; Ness; Osage; Pawnee; Pratt; Reno; [...]
-2202,USA - Kentucky - SPCS - N,United States (USA) - Kentucky north of approximately 37d 55m North - counties of Anderson; Bath; Boone; Bourbon; Boyd; Bracken; Bullitt; Campbell; Carroll; Carter; Clark; Elliott; Fayette; Fleming; Franklin; Gallatin; Grant; Greenup; Harrison; Henry; Jefferson; Jessamine; Kenton; Lawrence; Lewis; Mason; Menifee; Montgomery; Morgan; Nicholas; Oldham; Owen; Pendleton; Robertson; Rowan; Scott; Shelby; Spencer; Trimble; Woodford.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2203,USA - Kentucky - SPCS - S,United States (USA) - Kentucky south of approximately 37d 55m North - counties of Adair; Allen; Ballard; Barren; Bell; Boyle; Breathitt; Breckinridge; Butler; Caldwell; Calloway; Carlisle; Casey; Christian; Clay; Clinton; Crittenden; Cumberland; Daviess; Edmonson; Estill; Floyd; Fulton; Garrard; Graves; Grayson; Green; Hancock; Hardin; Harlan; Hart; Henderson; Hickman; Hopkins; Jackson; Johnson; Knott; Knox; Larue; Laurel; Lee; Leslie; Letcher; Lincoln; Liv [...]
-2204,USA - Louisiana - SPCS - N,United States (USA) - Louisiana north of approximately 30d 55m North - counties of Avoyelles; Bienville; Bossier; Caddo; Caldwell; Catahoula; Claiborne; Concordia; De Soto; East Carroll; Franklin; Grant; Jackson; La Salle; Lincoln; Madison; Morehouse; Natchitoches; Ouachita; Rapides; Red River; Richland; Sabine; Tensas; Union; Vernon; Webster; West Carroll; Winn.,,,,,EPSG,EPSG,1999-04-22 00:00:00,,0
-2205,USA - Louisiana - SPCS27 - S,United States (USA) - Louisiana south of approximately 30d 55m North - counties of Acadia; Allen; Ascension; Assumption; Beauregard; Calcasieu; Cameron; East Baton Rouge; East Feliciana; Evangeline; Iberia; Iberville; Jefferson; Jefferson Davis; Lafayette; LaFourche; Livingston; Orleans; Plaquemines; Pointe Coupee; St. Bernard; St. Charles; St. Helena; St. James; St. John the Baptist; St. Landry; St. Martin; St. Mary; St. Tammany; Tangipahoa; Terrebonne; [...]
-2206,USA - Maine - SPCS - E,United States (USA) - Maine east of approximately 69d 30m West - counties of Aroostook; Hancock; Knox; Penobscot; Piscataquis; Waldo; Washington.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-2207,USA - Maine - SPCS - W,United States (USA) - Maine west of approximately 69d 30m West - counties of Androscoggin; Cumberland; Franklin; Kennebec; Lincoln; Oxford; Sagadahoc; Somerset; York.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-2208,USA - Massachusetts - SPCS - islands,United States (USA) - Massachusetts offshore - counties of Dukes; Nantucket.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2209,USA - Massachusetts - SPCS - mainland,United States (USA) - Massachusetts onshore - counties of Barnstable; Berkshire; Bristol; Essex; Franklin; Hampden; Hampshire; Middlesex; Norfolk; Plymouth; Suffolk; Worcester.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2210,USA - Montana - SPCS27 - central,United States (USA) - Montana between approximately 47d 50m & 46d 40m North - counties of Cascade; Dawson; Fergus; Garfield; Judith Basin; Lake; Lewis and Clark; McCone; Meagher; Mineral; Missoula; Petroleum; Powell; Prairie; Richland; Sanders; Wibaux.,,,,,EPSG,EPSG,1999-04-22 00:00:00,,0
-2211,USA - Montana - SPCS27 - N,United States (USA) - Montana north of approximately 47d 50m North - counties of Blaine; Chouteau; Daniels; Flathead; Glacier; Hill; Liberty; Lincoln; Phillips; Pondera; Roosevelt; Sheridan; Teton; Toole; Valley.,,,,,EPSG,EPSG,1999-04-22 00:00:00,,0
-2212,USA - Montana - SPCS27 - S,United States (USA) - Montana south of approximately 46d 40m North - counties of Beaverhead; Big Horn; Broadwater; Carbon; Carter; Custer; Deer Lodge; Fallon; Gallatin; Golden Valley; Granite; Jefferson; Madison; Musselshell; Park; Powder River; Ravalli; Rosebud; Silver Bow; Stillwater; Sweet Grass; Treasure; Wheatland; Yellowstone.,,,,,EPSG,EPSG,1999-04-22 00:00:00,,0
-2213,USA - Minnesota - SPCS - central,United States (USA) - Minnesota between approximately 47d 10m & 45d 30m North - counties of Aitkin; Becker; Benton; Carlton; Cass; Chisago; Clay; Crow Wing; Douglas; Grant; Hubbard; Isanti; Kanabec; Mille Lacs; Morrison; Otter Tail; Pine; Pope; Stearns; Stevens; Todd; Traverse; Wadena; Wilkin.,,,,,EPSG,EPSG,1999-04-22 00:00:00,,0
-2214,USA - Minnesota - SPCS - N,United States (USA) - Minnesota north of approximately 47d 10m North - counties of Beltrami; Clearwater; Cook; Itasca; Kittson; Koochiching; Lake; Lake of the Woods; Mahnomen; Marshall; Norman; Pennington; Polk; Red Lake; Roseau; St. Louis.,,,,,EPSG,EPSG,1999-04-22 00:00:00,,0
-2215,USA - Minnesota - SPCS - S,United States (USA) - Minnesota south of approximately 45d 30m North - counties of Anoka; Big Stone; Blue Earth; Brown; Carver; Chippewa; Cottonwood; Dakota; Dodge; Faribault; Fillmore; Freeborn; Goodhue; Hennepin; Houston; Jackson; Kandiyohi; Lac Qui Parle; Le Sueur; Lincoln; Lyon; Martin; McLeod; Meeker; Mower; Murray; Nicollet; Nobles; Olmsted; Pipestone; Ramsey; Redwood; Renville; Rice; Rock; Scott; Sherburne; Sibley; Steele; Swift; Wabasha; Waseca; Wa [...]
-2216,USA - Mississippi - SPCS - E,United States (USA) - Mississippi east of approximately 89d 40m West - counties of Alcorn; Attala; Benton; Calhoun; Chickasaw; Choctaw; Clarke; Clay; Covington; Forrest; George; Greene; Hancock; Harrison; Itawamba; Jackson; Jasper; Jones; Kemper; Lafayette; Lamar; Lauderdale; Leake; Lee; Lowndes; Marshall; Monroe; Neshoba; Newton; Noxubee; Oktibbeha; Pearl River; Perry; Pontotoc; Prentiss; Scott; Smith; Stone; Tippah; Tishomingo; Union; Wayne; Webster; W [...]
-2217,USA - Mississippi - SPCS - W,United States (USA) - Mississippi west of approximately 89d 40m West - counties of Adams; Amite; Bolivar; Carroll; Claiborne; Coahoma; Copiah; De Soto; Franklin; Grenada; Hinds; Holmes; Humphreys; Issaquena; Jefferson; Jefferson Davis; Lawrence; Leflore; Lincoln; Madison; Marion; Montgomery; Panola; Pike; Quitman; Rankin; Sharkey; Simpson; Sunflower; Tallahatchie; Tate; Tunica; Walthall; Warren; Washington; Wilkinson; Yalobusha; Yazoo.,,,,,EPSG,EPSG,2001 [...]
-2218,USA - Missouri - SPCS - central,United States (USA) - Missouri between approximately 91d 45m & 93d 35m West - counties of Adair; Audrain; Benton; Boone; Callaway; Camden; Carroll; Chariton; Christian; Cole; Cooper; Dallas; Douglas; Greene; Grundy; Hickory; Howard; Howell; Knox; Laclede; Linn; Livingston; Macon; Maries; Mercer; Miller; Moniteau; Monroe; Morgan; Osage; Ozark; Pettis; Phelps; Polk; Pulaski; Putnam; Randolph; Saline; Schuyler; Scotland; Shelby; Stone; Sullivan; Taney; T [...]
-2219,USA - Missouri - SPCS - E,United States (USA) - Missouri east of approximately 91d 45m West - counties of Bollinger; Butler; Cape Girardeau; Carter; Clark; Crawford; Dent; Dunklin; Franklin; Gasconade; Iron; Jefferson; Lewis; Lincoln; Madison; Marion; Mississippi; Montgomery; New Madrid; Oregon; Pemiscot; Perry; Pike; Ralls; Reynolds; Ripley; Scott; Shannon; St. Charles; St. Francois; St. Louis; Ste. Genevieve; Stoddard; Warren; Washington; Wayne.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-2220,USA - Missouri - SPCS - W,United States (USA) - Missouri west of approximately 93d 35m West - counties of Andrew; Atchison; Barry; Barton; Bates; Buchanan; Caldwell; Cass; Cedar; Clay; Clinton; Dade; Daviess; De Kalb; Gentry; Harrison; Henry; Holt; Jackson; Jasper; Johnson; Lafayette; Lawrence; McDonald; Newton; Nodaway; Platte; Ray; St. Clair; Vernon; Worth.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-2221,USA - Nebraska - SPCS27 - N,United States (USA) - Nebraska - counties of Antelope; Blaine; Box Butte; Boyd; Brown; Burt; Cedar; Cherry; Cuming; Dakota; Dawes; Dixon; Garfield; Grant; Holt; Hooker; Keya Paha; Knox; Loup; Madison; Pierce; Rock; Sheridan; Sioux; Stanton; Thomas; Thurston; Wayne; Wheeler.,,,,,EPSG,EPSG,1999-04-22 00:00:00,,0
-2222,USA - Nebraska - SPCS27 - S,United States (USA) - Nebraska - counties of Adams; Arthur; Banner; Boone; Buffalo; Butler; Cass; Chase; Cheyenne; Clay; Colfax; Custer; Dawson; Deuel; Dodge; Douglas; Dundy; Fillmore; Franklin; Frontier; Furnas; Gage; Garden; Gosper; Greeley; Hall; Hamilton; Harlan; Hayes; Hitchcock; Howard; Jefferson; Johnson; Kearney; Keith; Kimball; Lancaster; Lincoln; Logan; McPherson; Merrick; Morrill; Nance; Nemaha; Nuckolls; Otoe; Pawnee; Perkins; Phelps; Platte;  [...]
-2223,USA - Nevada - SPCS - central,United States (USA) - Nevada between approximately 117d 15m and 116d West - counties of Lander; Nye.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-2224,USA - Nevada - SPCS - E,United States (USA) - Nevada east of approximately 116d  West - counties of Clark; Elko; Eureka; Lincoln; White Pine.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-2225,USA - Nevada - SPCS - W,United States (USA) - Nevada west of approximately 117d 15m West - counties of Churchill; Douglas; Esmeralda; Humboldt; Lyon; Mineral; Pershing; Storey; Washoe.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-2226,Canada - Newfoundland - E of 54.5 deg W,Canada - Newfoundland - east of 54 deg 30 min West.,,,,,EPSG,EPSG,1997-11-13 00:00:00,,0
-2227,Canada - Newfoundland - 57.5 to 54.5 deg W,Canada - Newfoundland and Labrador between 57 deg 30 min and 54 de 30 min West.,,,,,EPSG,EPSG,1997-11-13 00:00:00,,0
-2228,USA - New Mexico - SPCS - E,United States (USA) - New Mexico east of approximately 105d West - counties of Chaves; Colfax; Curry; De Baca; Eddy; Guadalupe; Harding; Lea; Mora; Quay; Roosevelt; San Miguel; Union.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2229,USA - New Mexico - SPCS27 - central,United States (USA) - New Mexico between approximately 105d & 107d 15m West - counties of Bernalillo; Dona Ana; Lincoln; Los Alamos; Otero; Rio Arriba; Sandoval; Santa Fe; Socorro; Taos; Torrance.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-2230,USA - New Mexico - SPCS27 - W,United States (USA) - New Mexico west of approximately 107d 15m West - counties of Catron; Cibola; Grant; Hidalgo; Luna; McKinley; San Juan; Sierra; Valencia.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-2231,USA - New Mexico - SPCS83 - central,United States (USA) - New Mexico between approximately 105d & 107d 15m West - counties of Bernalillo; Dona Ana; Lincoln; Los Alamos; Otero; Rio Arriba; Sandoval; Santa Fe; Socorro; Taos; Torrance; Valencia.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2232,USA - New Mexico - SPCS83 - W,United States (USA) - New Mexico west of approximately 107d 15m West - counties of Catron; Cibola; Grant; Hidalgo; Luna; McKinley; San Juan; Sierra.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2233,USA - New York - SPCS - central,United States (USA) - New York between approximately 75d 15m & 77d 30m West - counties of Broome; Cayuga; Chemung; Chenango; Cortland; Jefferson; Lewis; Madison; Oneida; Onondaga; Ontario; Oswego; Schuyler; Seneca; Steuben; Tioga; Tompkins; Wayne; Yates.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2234,USA - New York - SPCS - E,United States (USA) - New York mainland east of approximately 75d 15m West - counties of Albany; Clinton; Columbia; Delaware; Dutchess; Essex; Franklin; Fulton; Greene; Hamilton; Herkimer; Montgomery; Orange; Otsego; Putnam; Rensselaer; Rockland; Saratoga; Schenectady; Schoharie; St. Lawrence; Sullivan; Ulster; Warren; Washington; Westchester.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2235,USA - New York - SPCS - Long island,United States (USA) - New York - counties of Bronx; Kings; Nassau; New York; Queens; Richmond; Suffolk.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2236,USA - New York - SPCS - W,United States (USA) - New York west of approximately 77d 30m West - counties of Allegany; Cattaraugus; Chautauqua; Erie; Genesee; Livingston; Monroe; Niagara; Orleans; Wyoming.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2237,USA - North Dakota - SPCS - N,United States (USA) - North Dakota north of approximately 47d 25m North - counties of Benson; Bottineau; Burke; Cavalier; Divide; Eddy; Foster; Grand Forks; Griggs; McHenry; McKenzie; McLean; Mountrial; Nelson; Pembina; Pierce; Ramsey; Renville; Rolette; Sheridan; Steele; Towner; Traill; Walsh; Ward; Wells; Williams.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2238,USA - North Dakota - SPCS - S,United States (USA) - North Dakota south of approximately 47d 25m North - counties of Adams; Barnes; Billings; Bowman; Burleigh; Cass; Dickey; Dunn; Emmons; Golden Valley; Grant; Hettinger; Kidder; La Moure; Logan; McIntosh; Mercer; Morton; Oliver; Ransom; Richland; Sargent; Sioux; Slope; Stark; Stutsman.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2239,USA - Ohio - SPCS - N,United States (USA) - Ohio north of approximately 40d 15m North - counties of Allen;Ashland; Ashtabula; Auglaize; Carroll; Columbiana; Coshocton; Crawford; Cuyahoga; Defiance; Delaware; Erie; Fulton; Geauga; Hancock; Hardin; Harrison; Henry; Holmes; Huron; Jefferson; Knox; Lake; Logan; Lorain; Lucas; Mahoning; Marion; Medina; Mercer; Morrow; Ottawa; Paulding; Portage; Putnam; Richland; Sandusky; Seneca; Shelby; Stark; Summit; Trumbull; Tuscarawas; Union; Van We [...]
-2240,USA - Ohio - SPCS - S,United States (USA) - Ohio south of approximately 40d 15m North - counties of Adams; Athens; Belmont; Brown; Butler; Champaign; Clark; Clermont; Clinton; Darke; Fairfield; Fayette; Franklin; Gallia; Greene; Guernsey; Hamilton; Highland; Hocking; Jackson; Lawrence; Licking; Madison; Meigs; Miami; Monroe; Montgomery; Morgan; Muskingum; Noble; Perry; Pickaway; Pike; Preble; Ross; Scioto; Vinton; Warren; Washington.,,,,,EPSG,EPSG,1999-04-22 00:00:00,,0
-2241,USA - Oklahoma - SPCS - N,United States (USA) - Oklahoma north of approximately 35d 20m North - counties of Adair; Alfalfa; Beaver; Blaine; Canadian; Cherokee; Cimarron; Craig; Creek; Custer; Delaware; Dewey; Ellis; Garfield; Grant; Harper; Kay; Kingfisher; Lincoln; Logan; Major; Mayes; Muskogee; Noble; Nowata; Okfuskee; Oklahoma; Okmulgee; Osage; Ottawa; Pawnee; Payne; Roger Mills; Rogers; Sequoyah; Texas; Tulsa; Wagoner; Washington; Woods; Woodward.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2242,USA - Oklahoma - SPCS - S,United States (USA) - Oklahoma south of approximately 35d 20m North - counties of Atoka; Beckham; Bryan; Caddo; Carter; Choctaw; Cleveland; Coal; Comanche; Cotton; Garvin; Grady; Greer; Harmon; Haskell; Hughes; Jackson; Jefferson; Johnston; Kiowa; Latimer; Le Flore; Love; Marshall; McClain; McCurtain; McIntosh; Murray; Pittsburg; Pontotoc; Pottawatomie; Pushmataha; Seminole; Stephens; Tillman; Washita.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2243,USA - Oregon - SPCS - N,United States (USA) - Oregon north of approximately 44d 15m North - counties of Baker; Benton; Clackamas; Clatsop; Columbia; Gilliam; Grant; Hood River; Jefferson; Lincoln; Linn; Marion; Morrow; Multnomah; Polk; Sherman; Tillamook; Umatilla; Union; Wallowa; Wasco; Washington; Wheeler; Yamhill.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2244,USA - Oregon - SPCS - S,United States (USA) - Oregon south of approximately 44d 15m North - counties of Coos; Crook; Curry; Deschutes; Douglas; Harney; Jackson; Josephine; Klamath; Lake; Lane; Malheur.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2245,USA - Pennsylvania - SPCS - N,United States (USA) - Pennsylvania north of approximately 40d 50m North - counties of Bradford; Cameron; Carbon; Centre; Clarion; Clearfield; Clinton; Columbia; Crawford; Elk; Erie; Forest; Jefferson; Lackawanna; Luzerne; Lycoming; McKean; Mercer; Monroe; Montour; Northumberland; Pike; Potter; Sullivan; Susquehanna; Tioga; Union; Venango; Warren; Wayne; Wyoming.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2246,USA - Pennsylvania - SPCS - S,United States (USA) - Pennsylvania south of approximately 40d 50m North - counties of Adams; Allegheny; Armstrong; Beaver; Bedford; Berks; Blair; Bucks; Butler; Cambria; Chester; Cumberland; Dauphin; Delaware; Fayette; Franklin; Fulton; Greene; Huntingdon; Indiana; Juniata; Lancaster; Lawrence; Lebanon; Lehigh; Mifflin; Montgomery; Northampton; Perry; Philadelphia; Schuylkill; Snyder; Somerset; Washington; Westmoreland; York.,,,,,EPSG,EPSG,2001-11-06 00 [...]
-2247,USA - South Carolina  - SPCS27 - N,United States (USA) - South Carolina - counties of Abbeville; Anderson; Calhoun; Cherokee; Chester; Chesterfield; Darlington; Dillon; Edgefield; Fairfield; Florence; Greenville; Greenwood; Horry; Kershaw; Lancaster; Laurens; Lee; Lexington; Marion; Marlboro; McCormick; Newberry; Oconee; Pickens; Richland; Saluda; Spartanburg; Sumter; Union; York.,,,,,EPSG,EPSG,1999-04-22 00:00:00,,0
-2248,USA - South Carolina  - SPCS27 - S,United States (USA) - South Carolina - counties of Aiken; Allendale; Bamberg; Barnwell; Beaufort; Berkeley; Charleston; Clarendon; Colleton; Dorchester; Georgetown; Hampton; Jasper; Orangeburg; Williamsburg.,,,,,EPSG,EPSG,1999-04-22 00:00:00,,0
-2249,USA - South Dakota - SPCS - N,United States (USA) - South Dakota north of approximately 44d 20m North - counties of Beadle; Brookings; Brown; Butte; Campbell; Clark; Codington; Corson; Day; Deuel; Dewey; Edmunds; Faulk; Grant; Hamlin; Hand; Harding; Hyde; Kingsbury; Lawrence; Marshall; McPherson; Meade; Perkins; Potter; Roberts; Spink; Sully; Walworth; Ziebach.,,,,,EPSG,EPSG,1999-04-22 00:00:00,,0
-2250,USA - South Dakota - SPCS - S,United States (USA) - South Dakota south of approximately 44d 20m North - counties of Aurora; Bennett; Bon Homme; Brule; Buffalo; Charles Mix; Clay; Custer; Davison; Douglas; Fall River; Gregory; Haakon; Hanson; Hughes; Hutchinson; Jackson; Jerauld; Jones; Lake; Lincoln; Lyman; McCook; Mellette; Miner; Minnehaha; Moody; Pennington; Sanborn; Shannon; Stanley; Todd; Tripp; Turner; Union; Yankton.,,,,,EPSG,EPSG,1999-04-22 00:00:00,,0
-2251,Caribbean - Puerto Rico and the US Virgin Islands,Puerto Rico and Virgin Islands (US).,,,,,EPSG,EPSG,1999-04-22 00:00:00,,0
-2252,USA - Texas - SPCS - central,United States (USA) - Texas between approximately 32deg & 30d 10m North - counties of Anderson; Angelina; Bastrop; Bell; Blanco; Bosque; Brazos; Brown; Burleson; Burnet; Cherokee; Coke; Coleman; Comanche; Concho; Coryell; Crane; Crockett; Culberson; Ector; El Paso; Falls; Freestone; Gillespie; Glasscock; Grimes; Hamilton; Hardin; Houston; Hudspeth; Irion; Jasper; Jeff Davis; Kimble; Lampasas; Lee; Leon; Liberty; Limestone; Llano; Loving; Madison; Mason;  [...]
-2253,USA - Texas - SPCS - N,United States (USA) - Texas north of approximately 34d 20m North - counties of: Armstrong; Briscoe; Carson; Castro; Childress; Collingsworth; Dallam; Deaf Smith; Donley; Gray; Hall; Hansford; Hartley; Hemphill; Hutchinson; Lipscomb; Moore; Ochiltree; Oldham; Parmer; Potter; Randall; Roberts; Sherman; Swisher; Wheeler.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2254,USA - Texas - SPCS - N central,United States (USA) - Texas between approximately 34d 20m & 32deg North - counties of: Andrews; Archer; Bailey; Baylor; Borden; Bowie; Callahan; Camp; Cass; Clay; Cochran; Collin; Cooke; Cottle; Crosby; Dallas; Dawson; Delta; Denton; Dickens; Eastland; Ellis; Erath; Fannin; Fisher; Floyd; Foard; Franklin; Gaines; Garza; Grayson; Gregg; Hale; Hardeman; Harrison; Haskell; Henderson; Hill; Hockley; Hood; Hopkins; Howard; Hunt; Jack; Johnson; Jones; Kaufma [...]
-2255,USA - Texas - SPCS27 - S,United States (USA) - Texas south of approximately 28d 05m North - counties of Brooks; Cameron; Duval; Hidalgo; Jim Hogg; Jim Wells; Kenedy; Kleberg; Nueces; San Patricio; Starr; Webb; Willacy; Zapata.  Gulf of Mexico outer continental shelf (GoM OCS) protraction areas: South Padre Island; North Padre Island; Mustang Island.,,,,,EPSG,EPSG,1999-04-22 00:00:00,,0
-2256,USA - Texas - SPCS27 - S central,United States (USA) - Texas between approximately 30d 10m & 28d 05m North - counties of Aransas; Atascosa; Austin; Bandera; Bee; Bexar; Brazoria; Brewster; Caldwell; Calhoun; Chambers; Colorado; Comal; De Witt; Dimmit; Edwards; Fayette; Fort Bend; Frio; Galveston; Goliad; Gonzales; Guadalupe; Harris; Hays; Jackson; Jefferson; Karnes; Kendall; Kerr; Kinney; La Salle; Lavaca; Live Oak; Matagorda; Maverick; McMullen; Medina; Presidio; Real; Refugio; Ter [...]
-2257,USA - Utah - SPCS - central,United States (USA) - Utah between approximately 40d 50m & 38d 30m North - counties of Carbon; Duchesne; Emery; Grand; Juab; Millard; Salt Lake; Sanpete; Sevier; Tooele; Uintah; Utah; Wasatch.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2258,USA - Utah - SPCS - N,United States (USA) - Utah north of approximately 40d 50m North - counties of Box Elder; Cache; Daggett; Davis; Morgan; Rich; Summit; Weber.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2259,USA - Utah - SPCS - S,United States (USA) - Utah south of approximately 38d 30m North - counties of Beaver; Garfield; Iron; Kane; Piute; San Juan; Washington; Wayne.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2260,USA - Virginia - SPCS - N,United States (USA) - Virginia north of approximately 38d 05m North - counties of Arlington; Augusta; Bath; Caroline; Clarke; Culpeper; Fairfax; Fauquier; Frederick; Greene; Highland; King George; Loudoun; Madison; Orange; Page; Prince William; Rappahannock; Rockingham; Shenandoah; Spotsylvania; Stafford; Warren; Westmoreland.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2261,USA - Virginia - SPCS - S,United States (USA) - Virginia south of approximately 38d 05m North - counties of Accomack; Albemarle; Alleghany; Amelia; Amherst; Appomattox; Bedford; Bland; Botetourt; Bristol; Brunswick; Buchanan; Buckingham; Campbell; Carroll; Charles City; Charlotte; Chesapeake; Chesterfield; Colonial Heights; Craig; Cumberland; Dickenson; Dinwiddie; Essex; Floyd; Fluvanna; Franklin; Giles; Gloucester; Goochland; Grayson; Greensville; Halifax; Hampton; Hanover; Henrico [...]
-2262,USA - Washington - SPCS27 - N,United States (USA) - Washington north of approximately 47d 30m North - counties of Chelan; Clallam; Douglas; Ferry; Island; Jefferson; King; Kitsap; Lincoln; Okanogan; Pend Oreille; San Juan; Skagit; Snohomish; Spokane; Stevens; Whatcom.,,,,,EPSG,EPSG,1999-04-22 00:00:00,,0
-2263,USA - Washington - SPCS27 - S,United States (USA) - Washington south of approximately 47d 30m North - counties of Adams; Asotin; Benton; Clark; Columbia; Cowlitz; Franklin; Garfield; Grant; Grays Harbor; Kittitas; Klickitat; Lewis; Mason; Pacific; Pierce; Skamania; Thurston; Wahkiakum; Walla Walla; Whitman; Yakima.,,,,,EPSG,EPSG,1999-04-22 00:00:00,,0
-2264,USA - West Virginia - SPCS - N,United States (USA) - West Virginia north of approximately 39deg North - counties of Barbour; Berkeley; Brooke; Doddridge; Grant; Hampshire; Hancock; Hardy; Harrison; Jefferson; Marion; Marshall; Mineral; Monongalia; Morgan; Ohio; Pleasants; Preston; Ritchie; Taylor; Tucker; Tyler; Wetzel; Wirt; Wood.,,,,,EPSG,EPSG,1999-04-22 00:00:00,,0
-2265,USA - West Virginia - SPCS - S,United States (USA) - West Virginia south of approximately 39deg North - counties of Boone; Braxton; Cabell; Calhoun; Clay; Fayette; Gilmer; Greenbrier; Jackson; Kanawha; Lewis; Lincoln; Logan; Mason; McDowell; Mercer; Mingo; Monroe; Nicholas; Pendleton; Pocahontas; Putnam; Raleigh; Randolph; Roane; Summers; Upshur; Wayne; Webster; Wyoming.,,,,,EPSG,EPSG,1999-04-22 00:00:00,,0
-2266,USA - Wisconsin - SPCS - central,United States (USA) - Wisconsin between approximately 45d 35m & 44d 15m North - counties of Barron; Brown; Buffalo; Chippewa; Clark; Door; Dunn; Eau Claire; Jackson; Kewaunee; Langlade; Lincoln; Marathon; Marinette; Menominee; Oconto; Outagamie; Pepin; Pierce; Polk; Portage; Rusk; Shawano; St. Croix; Taylor; Trempealeau; Waupaca; Wood.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2267,USA - Wisconsin - SPCS - N,United States (USA) - Wisconsin north of approximately 45d 35m North - counties of Ashland; Bayfield; Burnett; Douglas; Florence; Forest; Iron; Oneida; Price; Sawyer; Vilas; Washburn.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2268,USA - Wisconsin - SPCS - S,United States (USA) - Wisconsin south of approximately 44d 15m North - counties of Adams; Calumet; Columbia; Crawford; Dane; Dodge; Fond Du Lac; Grant; Green; Green Lake; Iowa; Jefferson; Juneau; Kenosha; La Crosse; Lafayette; Manitowoc; Marquette; Milwaukee; Monroe; Ozaukee; Racine; Richland; Rock; Sauk; Sheboygan; Vernon; Walworth; Washington; Waukesha; Waushara; Winnebago.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2269,USA - Wyoming - SPCS - E,United States (USA) - Wyoming east of approximately 106d West - counties of Albany; Campbell; Converse; Crook; Goshen; Laramie; Niobrara; Platte; Weston.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-2270,USA - Wyoming - SPCS - E central,United States (USA) - Wyoming between approximately 106d & 108d 10m West - counties of Big Horn; Carbon; Johnson; Natrona; Sheridan; Washakie.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-2271,USA - Wyoming - SPCS - W,United States (USA) - Wyoming west of approximately 109d 40m West - counties of Lincoln; Sublette; Teton; Uinta.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-2272,USA - Wyoming - SPCS - W central,United States (USA) - Wyoming between approximately 108d 10m & 109d 40m West - counties of Fremont; Hot Springs; Park; Sweetwater.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-2273,USA - Washington - SPCS83 - N,United States (USA) - Washington north of approximately 47d 30m North - counties of Chelan; Clallam; Douglas; Ferry; Grant north of approximately 47d30m; Island; Jefferson; King; Kitsap; Lincoln; Okanogan; Pend Oreille; San Juan; Skagit; Snohomish; Spokane; Stevens; Whatcom.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2274,USA - Washington - SPCS83 - S,United States (USA) - Washington south of approximately 47d 30m North - counties of Adams; Asotin; Benton; Clark; Columbia; Cowlitz; Franklin; Garfield; Grant south of approximately 47d30m; Grays Harbor; Kittitas; Klickitat; Lewis; Mason; Pacific; Pierce; Skamania; Thurston; Wahkiakum; Walla Walla; Whitman; Yakima.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2275,Canada - Newfoundland - 60.5 to 57.5 deg W,Canada - Newfoundland and Labrador between 60 deg and 57 deg 30 min West.,,,,,EPSG,EPSG,1997-11-13 00:00:00,,0
-2276,Canada - Quebec and Newfoundland - 63 to 60 deg W,Canada - Quebec and Newfoundland (Labrador) between 63 deg and 60 deg West.,,,,,EPSG,EPSG,1997-11-13 00:00:00,,0
-2277,Canada - Quebec and Newfoundland - 66 to 63 deg W,Canada - Quebec and Newfoundland (Labrador) between 66 deg and 63 deg West.,,,,,EPSG,EPSG,1997-11-13 00:00:00,,0
-2278,Canada - Quebec and Newfoundland - 69 to 66 deg W,Canada - Quebec and Newfoundland (Labrador) between 69 deg and  66 deg West.,,,,,EPSG,EPSG,1997-11-13 00:00:00,,0
-2279,Canada - Quebec and Ontario - 75 to 72 deg W,Canada - Quebec between 75 deg and 72 deg West.; Canada - Ontario - east of 75 deg West.,,,,,EPSG,EPSG,1997-11-13 00:00:00,,0
-2280,Canada - Quebec and Ontario - 78 to 75 deg W,Canada - Quebec and Ontario - between 78 deg and 75 deg West.,,,,,EPSG,EPSG,1997-11-13 00:00:00,,0
-2281,Canada - Quebec and Ontario - MTM zone 10,Canada - Quebec west of 78 deg West; Canada - Ontario - between 79 deg 30 min and 78 deg W in area to north of 47 deg N; between 80 deg 15 min and 78 deg W in area between 46 deg and 47 deg N; between 81 deg and 78 deg W in area south of 46 deg N.,,,,,EPSG,EPSG,1997-11-13 00:00:00,,0
-2282,Cote d'Ivoire (Ivory Coast) - Abidjan area,C�te d'Ivoire (Ivory Coast) - Abidjan area.,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-2283,Australia - Australian Capital Territory (ACT),Australia - Australian Capital Territory (ACT).,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-2284,Australia - Northern Territory (NT),Australia - Northern Territory (NT).,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-2285,Australia - Victoria,Australia - Victoria.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-2286,Australia - New South Wales (NSW and Victoria,Australia - New South Wales (NSW) and Victoria.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-2287,Australia - SE Australia (ACT NSW VIC),"Australia - Australian Capital Territory (ACT), New South Wales (NSW), Victoria.",,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-2288,American Samoa - Tutuila and Aunu'u islands,American Samoa - Tutuila and Aunu'u islands.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-2289,"American Samoa - Ofu, Olesega and Ta'u islands","American Samoa - Ofu, Olesega and Ta'u islands.",,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-2290,Canada - Quebec and Newfoundland - MTM zone 3,Canada - Newfoundland and Labrador between 60 deg and 57 deg 30 min West; Canada - Quebec between 60 deg and 57 deg West.,,,,,EPSG,EPSG,1997-11-13 00:00:00,,0
-2291,Australasia - Australia and PNG - 150 to 156 deg E,Australia - between 150 and 156 deg East.  Papua New Guinea east of 150 deg East.,,,,,EPSG,EPSG,1995-12-02 00:00:00,,0
-2292,Myanmar (Burma) - 15 to 21 deg N,Myanmar (Burma) - between 15 and 21 deg North.,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-2293,Myanmar (Burma) - S of 15 deg N,Myanmar (Burma) - south of 15 deg North.,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-2294,Asia - Middle East - Iraq zone,Islamic Republic of Iran - south of 36 deg North. Iraq. Kuwait.,,,,,EPSG,EPSG,1996-04-12 00:00:00,,0
-2295,Caribbean - Windward and Leeward Islands,Windward Islands - Dominica  Grenada  Saint Lucia  Saint Vincent;  Leeward Islands - Anguilla   Antigua (excluding Barbuda)  Montserrat   Saint Kitts and Nevis; Barbados.,,,,,EPSG,EPSG,1999-04-22 00:00:00,,0
-2296,Cote d'Ivoire (Ivory Coast) - offshore.,C�te d'Ivoire (Ivory Coast) - offshore.,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-2297,USA - California - N of 38 deg N,United States (USA) - California north of 38 deg North.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-2298,USA - California - S of 38 deg N,United States (USA) - California south of 38 deg North,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-2299,3-degree TM - N hemisphere CM 3 deg E,"Between 1 deg 30 min and 4 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2300,3-degree TM - N hemisphere CM 6 deg E,"Between 4 deg 30 min and 7 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2301,3-degree TM - N hemisphere CM 9 deg E,"Between 7 deg 30 min and 10 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2302,3-degree TM - N hemisphere CM 12 deg E,"Between 10 deg 30 min and 13 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2303,3-degree TM - N hemisphere CM 15 deg E,"Between 13 deg 30 min and 16 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2304,3-degree TM - N hemisphere CM 18 deg E,"Between 16 deg 30 min and 19 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2305,3-degree TM - N hemisphere CM 21 deg E,"Between 19 deg 30 min and 22 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2306,3-degree TM - N hemisphere CM 24 deg E,"Between 22 deg 30 min and 25 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2307,Brazil - Campos; Espirito Santo and Santos basins,Brazil - Campos; Espirito Santo and Santos basins.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-2308,Brazil - Tucano basin north,Brazil - Tucano basin north.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-2309,Brazil - Tucano basin central,Brazil - Tucano basin central.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-2310,Brazil - Tucano basin south,Brazil - Tucano basin south.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-2311,Africa - Kenya and Tanzania,Kenya; Tanzania.,,,,,EPSG,EPSG,1996-10-18 00:00:00,,0
-2312,"Africa - Botswana, Lesotho, Malawi, Swaziland, Zaire, Zambia, Zimbabwe",Botswana; Lesotho; Malawi; Swaziland; Zaire; Zambia; Zimbabwe.,,,,,EPSG,EPSG,1996-10-18 00:00:00,,0
-2313,Canada - Nova Scotia,Canada - Nova Scotia.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-2314,Asia - Caspian FSU states,Azerbaijan; Kazakstan; Russian Federation; Turkmenistan - Caspian Sea,,,,,EPSG,EPSG,1999-09-07 00:00:00,,0
-2315,Colombia - Cusiana,Colombia - Casanare province BP Cusiana/Cupiagua field areas.  Also used by Total in Rivera and Gatanas blocks.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-2316,Angola - offshore block 5,Angola - offshore block 5.,,,,,EPSG,EPSG,1998-11-11 00:00:00,,0
-2317,Angola - offshore block 2,Angola - offshore block 2.,,,,,EPSG,EPSG,1998-11-11 00:00:00,,0
-2318,Angola - offshore block 3,Angola - offshore block 3.,,,,,EPSG,EPSG,1998-11-11 00:00:00,,0
-2319,Angola - offshore block 7,Angola - offshore block 7.,,,,,EPSG,EPSG,1998-11-11 00:00:00,,0
-2320,Angola - offshore blocks 7 8 24 + WGC spec,Angola - offshore blocks 7 and 8.  Also used rounded to integer metre in offshore block 24 and for GSI/HGS/Western Geophysical speculative seismic data throughout offshore Angola.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-2321,Angola - offshore blocks 1 and 16,Angola - offshore blocks 1 and 16.,,,,,EPSG,EPSG,1998-12-14 00:00:00,,0
-2322,Angola - offshore blocks 3  7  15 and 17.,"Angola - offshore blocks 3, 7,15 and 17.",,,,,EPSG,EPSG,1998-11-11 00:00:00,,0
-2323,Angola - offshore blocks 1 16 and 18.,"Angola - offshore blocks 1, 16 and 18.",,,,,EPSG,EPSG,1998-12-14 00:00:00,,0
-2324,Angola - offshore blocks 2  3 17 and 31-33.,"Angola - offshore blocks 2,  3, 17 and 31-33.",,,,,EPSG,EPSG,1998-11-11 00:00:00,,0
-2325,Argentina - Neuquen province Chos Malal area,Argentina - Neuquen province - Chos Malal area.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-2326,Germany - former west Germany,Germany - former west Germany.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-2327,Syria - Al Whaleed area,Syrian Arab Republic - Al Whaleed area,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-2328,Syria - Shaddadeh area,Syrian Arab Republic - Shaddadeh area (36d N 41d E),,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-2329,Syria - Deir area,Syrian Arab Republic - Deir area (35d 22m N 40d 06m E),,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-2330,Europe - North Sea,Denmark - North Sea;  Germany - North Sea;  Netherlands - offshore;  Norway - North Sea south of 62 deg N; United Kingdom (UKCS) - North Sea south of 62 deg N.,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-2331,Norway - offshore N of 65 deg N,Norway - offshore north of 65 deg North.,,,,,EPSG,EPSG,1996-10-18 00:00:00,,0
-2332,Norway - offshore N of 65 deg N;  Svalbard; Jan Mayen,Norway - offshore north of 65 deg N;  Svalbard and Jan Mayen Islands.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-2333,Norway - offshore 62 to 65 deg N and W of 5 deg E,Norway - offshore between 62 and 65 deg North and west of 5 deg East.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-2334,Norway - North Sea - offshore S of 62 deg N.,Norway - North Sea - offshore south of 62 deg North.,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-2335,Spain - Balearic Islands,Spain - Balearic Islands.,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-2336,Spain - mainland except northwest,Spain - mainland except northwest (north of 41 deg 30m N and west of 4 deg 30 min W).,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-2337,Spain - northwest,Spain - northwest (north of 41 deg 30m N and west of 4 deg 30 min W).,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-2338,Europe - Portugal and Spain,Portugal; Spain.,,,,,EPSG,EPSG,1996-10-18 00:00:00,,0
-2339,Italy - Sardinia,Italy - Sardinia.,,,,,EPSG,EPSG,1997-04-11 00:00:00,,0
-2340,Italy - Sicily,Italy - Sicily.,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-2341,Egypt - Gulf of Suez,Egypt - Gulf of Suez.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-2342,Europe - common offshore,Denmark - offshore. United Kingdom - UKCS offshore east of 6 deg West.,,,,,EPSG,EPSG,1998-06-30 00:00:00,,0
-2343,Europe - British Isles,Ireland; United Kingdom (UK).,,,,,EPSG,EPSG,1996-10-18 00:00:00,,0
-2344,Europe - Finland and Norway,Finland; Norway.,,,,,EPSG,EPSG,1996-10-18 00:00:00,,0
-2345,Asia - Middle East - Iraq; Israel; Jordan; Lebanon; Kuwait; Saudi Arabia; Syria.,Iraq; Israel; Jordan; Lebanon; Kuwait; Saudi Arabia; Syria.,,,,,EPSG,EPSG,1996-10-18 00:00:00,,0
-2346,WGS72BE to WGS84,World.  Vietnam - offshore.,,,,,EPSG,EPSG,1996-12-12 00:00:00,,0
-2347,Algeria - N of 31.5 deg North,Algeria - north of 35g (31 deg 30 min) North.,,,,,EPSG,EPSG,1998-03-12 00:00:00,,0
-2348,Brunei - offshore,Brunei Darussalam - offshore.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-2349,Brunei - onshore,Brunei Darussalam - onshore.,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-2350,Mozambique - A,Mozambique - Maputo province and southern part of Gaza province; i.e. south of approximately 24 deg S.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-2351,Mozambique - B,Mozambique - provinces of Gaza; Inhambane and southern parts of Sofala and Manhica; i.e. between approximately 24 and 20 deg South.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-2352,Mozambique - C,Mozambique - provinces of Sofala north of Beira corridor; Manhica; Tete and Zambezia; i.e. between approximately 20 and 16 deg South.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-2353,Mozambique - D,Mozambique - provinces of Nampula; Niassa; Cabo Delgado; i.e. north of approximately 16 deg S.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-2354,Indonesia - Kalimantan,Indonesia - Kalimantan.,,,,,EPSG,EPSG,1998-03-12 00:00:00,,0
-2355,Falkland Islands - East Falkland Island,Falkland Islands (Malvinas) - East Falkland Island.,,,,,EPSG,EPSG,1996-10-18 00:00:00,,0
-2356,Ecuador - Galapagos,Ecuador - Baltra; Galapagos.,,,,,EPSG,EPSG,1996-10-18 00:00:00,,0
-2357,Argentina - Tierra del Fuego,Argentina - Tierra del Fuego,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-2358,Thailand - Bongkot field,Thailand - Bongkot field.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-2359,Vietnam - near 16 deg N,Vietnam - near 16 deg North.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-2360,Vietnam - Con Son Island,Vietnam - Con Son Island.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-2361,Myanmar (Burma) - Moattama area,Myanmar (Burma) - Moattama area.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-2362,Iran - Kangan district,Islamic Republic of Iran - Kangan district.,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-2363,Venezuela - east,Venezuela - east - Delta Amacuro; Anzoategui; Bolivar; Monagas; Sucre states.,,,,,EPSG,EPSG,1999-11-05 00:00:00,,0
-2364,Philippines - excluding Mindanao,Philippines (excluding Mindanao).,,,,,EPSG,EPSG,1996-10-18 00:00:00,,0
-2365,Philippines - Mindanao,Philippines - Mindanao.,,,,,EPSG,EPSG,1996-10-18 00:00:00,,0
-2366,Spain - mainland,Spain - mainland.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-2367,Spain - mainland NE,Spain - mainland north of the parallel of 42 deg N from the Atlantic Ocean to 42 deg N  4 deg W of Greenwich and then a line from 42 deg N  4 deg W of Greenwich through 40 deg N 0 deg E of Greenwich.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-2368,Spain - mainland SW,Spain - mainland south of the parallel of 42 deg N from the Atlantic Ocean to 42 deg N  4 deg W of Greenwich and then a line from 42 deg N  4 deg W of Greenwich through 40 deg N 0 deg E of Greenwich.,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-2369,Seychelles - Mahe Island,Seychelles - Mahe Island.,,,,,EPSG,EPSG,1996-10-18 00:00:00,,0
-2370,Europe - Boznia and Herzegovina; Croatia; Serbia; Slovenia.,Boznia and Herzegovina; Croatia; Serbia; Slovenia.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2371,Nigeria - south,Nigeria - south.,,,,,EPSG,EPSG,2001-08-28 00:00:00,,0
-2372,Italy - mainland,Italy - mainland.,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-2373,USA - Alaska including EEZ.,United States (USA) - Alaska including EEZ.,,,,,EPSG,EPSG,2001-08-28 00:00:00,,0
-2374,USA - conus including EEZ.,United States (USA) - lower 48 states including EEZ - Alabama; Arizona; Arkansas; California; Colorado; Connecticut; Delaware; Florida; Georgia; Idaho; Illinois; Indiana; Iowa; Kansas; Kentucky; Louisiana; Maine; Maryland; Massachusetts; Michigan; Minnesota; Mississippi; Missouri; Montana; Nebraska; Nevada; New Hampshire; New Jersey; New Mexico; New York; North Carolina; North Dakota; Ohio; Oklahoma; Oregon; Pennsylvania; Rhode Island; South Carolina; Sout [...]
-2375,Canada - Saskatchewan,Canada - Saskatchewan.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-2376,Canada - Alberta,Canada - Alberta,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-2377,USA - Delaware and Maryland,United States (USA) - Delaware and Maryland.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-2378,"USA - New England - south (CT, MA, NH, RI, VT)",United States (USA) - Connecticut; Massachusetts; New Hampshire; Rhode Island; Vermont.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-2379,USA - Texas E of 100 deg W,United States (USA) - Texas east of 100 deg West.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-2380,USA - Texas W of 100 deg W,United States (USA) - Texas west of 100 deg West.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-2381,USA - Oregon and Washington.,United States (USA) - Oregon and Washington.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-2382,USA - Idaho and Montana - E of 113 deg W,United States (USA) - Idaho and Montana - east of 113 deg West.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-2383,USA - Idaho and Montana - W of 113 deg W,United States (USA) - Idaho and Montana - west of 113 deg West.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-2384,Canada - Alberta and British Columbia.,Canada - Alberta; British Columbia.,,,,,EPSG,EPSG,1996-10-18 00:00:00,,0
-2385,Panama - Canal Zone,Panama - Canal Zone.,,,,,EPSG,EPSG,1996-10-18 00:00:00,,0
-2386,Greenland - Hayes Peninsula,Greenland - Hayes Peninsula.,,,,,EPSG,EPSG,1996-10-18 00:00:00,,0
-2387,USA - Alaska - Aleutian Islands east of 180 deg,United States (USA) - Alaska - Aleutian Islands east of 180 deg.,,,,,EPSG,EPSG,1997-04-11 00:00:00,,0
-2388,USA - Alaska - Aleutian Islands west of 180 deg,United States (USA) - Alaska - Aleutian Islands west of 180 deg.,,,,,EPSG,EPSG,1997-04-11 00:00:00,,0
-2389,USA - conus east of Mississippi River,United States (USA) - CONUS east of Mississippi River including Louisiana; Missouri; Minnesota.,,,,,EPSG,EPSG,1996-10-18 00:00:00,,0
-2390,USA - conus west of Mississippi River,United States (USA) - CONUS west of Mississippi River.,,,,,EPSG,EPSG,1996-10-18 00:00:00,,0
-2391,Oman - Masirah Island,Oman - Masirah Island.,,,,,EPSG,EPSG,1996-10-18 00:00:00,,0
-2392,UAE - Abu al Bu Khoosh,United Arab Emirates (UAE) - Abu Dhabi - Abu al Bu Khoosh,,,,,EPSG,EPSG,2000-03-07 00:00:00,,0
-2393,Algeria - Hassi Messaoud,Algeria - Hassi Messaoud.,,,,,EPSG,EPSG,2000-06-23 00:00:00,,0
-2394,UK - Great Britain and UKCS,United Kingdom (UKCS) - Great Britain (GB) - England; Scotland; Wales; - North Sea.,,,,,EPSG,EPSG,1998-11-11 00:00:00,,0
-2395,UK - England,United Kingdom (UK) - England.,,,,,EPSG,EPSG,1996-10-18 00:00:00,,0
-2396,UK - England; Wales; Isle of Man,United Kingdom (UK) - England; Wales; Isle of Man.,,,,,EPSG,EPSG,1996-10-18 00:00:00,,0
-2397,UK - Scotland,United Kingdom (UK) - Scotland (including Shetland Islands).,,,,,EPSG,EPSG,1996-10-18 00:00:00,,0
-2398,UK - Wales,United Kingdom (UK) - Wales.,,,,,EPSG,EPSG,1996-10-18 00:00:00,,0
-2399,South America - Bolivia; Chile; Colombia;  Ecuador; Guyana; Peru; Venezuela.,Bolivia; Chile; Colombia;  Ecuador; Guyana; Peru; Venezuela.,,,,,EPSG,EPSG,1996-10-18 00:00:00,,0
-2400,Bolivia - Madidi,Bolivia - Madidi.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-2401,Bolivia - Block 20,Bolivia - Block 20.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-2402,Chile - north,Chile - north (near 19 deg South).,,,,,EPSG,EPSG,1996-10-18 00:00:00,,0
-2403,Chile - south,Chile - south (near 43 deg South).,,,,,EPSG,EPSG,1996-10-18 00:00:00,,0
-2404,Oman - block 4,Oman - block 4.,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-2405,Kazakstan - Caspian Sea,Kazakstan - Caspian Sea.,,,,,EPSG,EPSG,2000-02-02 00:00:00,,0
-2406,Qatar - offshore,Qatar - offshore.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-2407,Greenland - south,Greenland (South).,,,,,EPSG,EPSG,1996-10-18 00:00:00,,0
-2408,Japan - Okinawa,Japan - Okinawa.,,,,,EPSG,EPSG,1996-10-18 00:00:00,,0
-2409,Asia - Japan and South Korea,Japan; South Korea; Okinawa.,,,,,EPSG,EPSG,1996-10-18 00:00:00,,0
-2410,Canada - NWT; Nunavut; Saskatchewan,Canada - Northwest Territories; Nunavut; Saskatchewan.,,,,,EPSG,EPSG,1996-10-18 00:00:00,,0
-2411,Asia - India and Nepal,India; Nepal.,,,,,EPSG,EPSG,1999-10-20 00:00:00,,0
-2412,USA - Alaska excluding Aleutian Islands,United States (USA) - Alaska (Excluding Aleutian Islands).,,,,,EPSG,EPSG,1996-10-18 00:00:00,,0
-2413,Bahamas (Except San Salvador Island).,Bahamas (Except San Salvador Island).,,,,,EPSG,EPSG,1996-10-18 00:00:00,,0
-2414,Bahamas (San Salvador Island).,Bahamas (San Salvador Island).,,,,,EPSG,EPSG,1996-10-18 00:00:00,,0
-2415,Canada - Manitoba and Ontario,Canada - Manitoba; Ontario.,,,,,EPSG,EPSG,1996-10-18 00:00:00,,0
-2416,Canada - New Brunswick; Newfoundland; Nova Scotia; Quebec,Canada - New Brunswick; Newfoundland; Nova Scotia; Quebec.,,,,,EPSG,EPSG,1996-10-18 00:00:00,,0
-2417,Canada - Yukon,Canada - Yukon.,,,,,EPSG,EPSG,1996-10-18 00:00:00,,0
-2418,Caribbean - central,Antigua; Barbados; Barbuda; Caicos Islands; Cuba; Dominican Republic; Grand Cayman; Jamaica; Turks and Caicos Islands.,,,,,EPSG,EPSG,1996-10-18 00:00:00,,0
-2419,Central America -,Belize; Costa Rica; El Salvador; Guatemala; Honduras; Nicaragua.,,,,,EPSG,EPSG,1996-10-18 00:00:00,,0
-2420,Europe - west,Austria; Belgium; Denmark; Faroe Islands; Finland; France; Germany (west); Gibraltar; Greece; Italy; Luxembourg; Netherlands; Norway; Portugal; Spain; Sweden; Switzerland.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,0
-2421,Europe - west central,Austria; Denmark; France; Germany (west); Netherlands; Switzerland.,,,,,EPSG,EPSG,1996-10-18 00:00:00,,0
-2424,USA - HARN,American Samoa; Puerto Rico and the Virgin Islands; United States (USA) - Alabama; Alaska; Arizona; Arkansas; California; Colorado; Connecticut; Delaware; Florida; Georgia; Hawaii; Idaho; Illinois; Indiana; Iowa; Kansas; Kentucky; Louisiana; Maine; Maryland; Massachusetts; Michigan; Minnesota; Mississippi; Missouri; Montana; Nebraska; Nevada; New Hampshire; New Jersey; New Mexico; New York; North Carolina; North Dakota; Ohio; Oklahoma; Oregon; Pennsylvania; Rhode Island;  [...]
-2425,Japan - 45d 20m to 46d N; 141d to 142d E.,Japan - 45deg 20min to 46deg North; 141deg to 142deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2426,Japan - 45d 20m to 46d N; 142d to 143d E.,Japan - 45deg 20min to 46deg North; 142deg to 143deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2427,Japan - 44deg 40min to 45deg 20min N; 141deg to 142deg E.,Japan - 44deg 40min to 45deg 20min North; 141deg to 142deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2428,Japan - 44deg 40min to 45deg 20min N; 142deg to 143deg E.,Japan - 44deg 40min to 45deg 20min North; 142deg to 143deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2429,Japan - 44deg to 44deg 40min N; 141deg to 142deg E.,Japan - 44deg to 44deg 40min North; 141deg to 142deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2430,Japan - 44deg to 44deg 40min N; 142deg to 143deg E.,Japan - 44deg to 44deg 40min North; 142deg to 143deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2431,Japan - 44deg to 44deg 40min N; 143deg to 144deg E.,Japan - 44deg to 44deg 40min North; 143deg to 144deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2432,Japan - 44deg to 44deg 40min N; 144deg to 145deg E.,Japan - 44deg to 44deg 40min North; 144deg to 145deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2433,Japan - 43deg 20min to 44deg N; 141deg to 142deg E.,Japan - 43deg 20min to 44deg North; 141deg to 142deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2434,Japan - 43deg 20min to 44deg N; 142deg to 143deg E.,Japan - 43deg 20min to 44deg North; 142deg to 143deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2435,Japan - 43deg 20min to 44deg N; 143deg to 144deg E.,Japan - 43deg 20min to 44deg North; 143deg to 144deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2436,Japan - 43deg 20min to 44deg N; 144deg to 145deg E.,Japan - 43deg 20min to 44deg North; 144deg to 145deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2437,Japan - 43deg 20min to 44deg N; 145deg to 146deg E.,Japan - 43deg 20min to 44deg North; 145deg to 146deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2438,Japan - 42deg 40min to 43deg 20min N; 140deg to 141deg E.,Japan - 42deg 40min to 43deg 20min North; 140deg to 141deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2439,Japan - 42deg 40min to 43deg 20min N; 141deg to 142deg E.,Japan - 42deg 40min to 43deg 20min North; 141deg to 142deg East.,,,,,EPSG,EPSG,1999-11-12 00:00:00,,0
-2440,Japan - 42deg 40min to 43deg 20min N; 142deg to 143deg E.,Japan - 42deg 40min to 43deg 20min North; 142deg to 143deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2441,Japan - 42deg 40min to 43deg 20min N; 143deg to 144deg E.,Japan - 42deg 40min to 43deg 20min North; 143deg to 144deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2442,Japan - 42deg 40min to 43deg 20min N; 144deg to 145deg E.,Japan - 42deg 40min to 43deg 20min North; 144deg to 145deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2443,Japan - 42deg 40min to 43deg 20min N; 145deg to 146deg E.,Japan - 42deg 40min to 43deg 20min North; 145deg to 146deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2444,Japan - 42deg to 42deg 40min N; 139deg to 140deg E.,Japan - 42deg to 42deg 40min North; 139deg to 140deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2445,Japan - 42deg to 42deg 40min N; 140deg to 141deg E.,Japan - 42deg to 42deg 40min North; 140deg to 141deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2446,Japan - 42deg to 42deg 40min N; 141deg to 142deg E.,Japan - 42deg to 42deg 40min North; 141deg to 142deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2447,Japan - 42deg to 42deg 40min N; 142deg to 143deg E.,Japan - 42deg to 42deg 40min North; 142deg to 143deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2448,Japan - 42deg to 42deg 40min N; 143deg to 144deg E.,Japan - 42deg to 42deg 40min North; 143deg to 144deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2449,Japan - 41deg 20min to 42deg N; 140deg to 141deg E.,Japan - 41deg 20min to 42deg North; 140deg to 141deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2450,Japan - 41deg 20min to 42deg N; 141deg to 142deg E.,Japan - 41deg 20min to 42deg North; 141deg to 142deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2451,Japan - 40deg 40min to 41deg 20min N; 140deg to 141deg E.,Japan - 40deg 40min to 41deg 20min North; 140deg to 141deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2452,Japan - 40deg 40min to 41deg 20min N; 141deg to 142deg E.,Japan - 40deg 40min to 41deg 20min North; 141deg to 142deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2453,Japan - 40deg to 40deg 40min N; 139deg to 140deg E.,Japan - 40deg to 40deg 40min North; 139deg to 140deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2454,Japan - 40deg to 40deg 40min N; 140deg to 141deg E.,Japan - 40deg to 40deg 40min North; 140deg to 141deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2455,Japan - 40deg to 40deg 40min N; 141deg to 142deg E.,Japan - 40deg to 40deg 40min North; 141deg to 142deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2456,Japan - 39deg 20min to 40deg N; 139deg to 140deg E.,Japan - 39deg 20min to 40deg North; 139deg to 140deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2457,Japan - 39deg 20min to 40deg N; 140deg to 141deg E.,Japan - 39deg 20min to 40deg North; 140deg to 141deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2458,Japan - 39deg 20min to 40deg N; 141deg to 142deg E.,Japan - 39deg 20min to 40deg North; 141deg to 142deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2459,Japan - 38deg 40min to 39deg 20min N; 139deg to 140deg E.,Japan - 38deg 40min to 39deg 20min North; 139deg to 140deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2460,Japan - 38deg 40min to 39deg 20min N; 140deg to 141deg E.,Japan - 38deg 40min to 39deg 20min North; 140deg to 141deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2461,Japan - 38deg 40min to 39deg 20min N; 141deg to 142deg E.,Japan - 38deg 40min to 39deg 20min North; 141deg to 142deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2462,Japan - 38deg to 38deg 40min N; 139deg to 140deg E.,Japan - 38deg to 38deg 40min North; 139deg to 140deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2463,Japan - 38deg to 38deg 40min N; 140deg to 141deg E.,Japan - 38deg to 38deg 40min North; 140deg to 141deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2464,Japan - 38deg to 38deg 40min N; 141deg to 142deg E.,Japan - 38deg to 38deg 40min North; 141deg to 142deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2465,Japan - 37deg 20min to 38deg N; 136deg to 137deg E.,Japan - 37deg 20min to 38deg North; 136deg to 137deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2466,Japan - 37deg 20min to 38deg N; 137deg to 138deg E.,Japan - 37deg 20min to 38deg North; 137deg to 138deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2467,Japan - 37deg 20min to 38deg N; 138deg to 139deg E.,Japan - 37deg 20min to 38deg North; 138deg to 139deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2468,Japan - 37deg 20min to 38deg N; 139deg to 140deg E.,Japan - 37deg 20min to 38deg North; 139deg to 140deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2469,Japan - 37deg 20min to 38deg N; 140deg to 141deg E.,Japan - 37deg 20min to 38deg North; 140deg to 141deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2470,Japan - 37deg 20min to 38deg N; 141deg to 142deg E.,Japan - 37deg 20min to 38deg North; 141deg to 142deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2471,Japan - 36deg 40min to 37deg 20min N; 136deg to 137deg E.,Japan - 36deg 40min to 37deg 20min North; 136deg to 137deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2472,Japan - 36deg 40min to 37deg 20min N; 137deg to 138deg E.,Japan - 36deg 40min to 37deg 20min North; 137deg to 138deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2473,Japan - 36deg 40min to 37deg 20min N; 138deg to 139deg E.,Japan - 36deg 40min to 37deg 20min North; 138deg to 139deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2474,Japan - 36deg 40min to 37deg 20min N; 139deg to 140deg E.,Japan - 36deg 40min to 37deg 20min North; 139deg to 140deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2475,Japan - 36deg 40min to 37deg 20min N; 140deg to 141deg E.,Japan - 36deg 40min to 37deg 20min North; 140deg to 141deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2476,Japan - 36deg to 37deg 40min N; 136deg to 137deg E.,Japan - 36deg to 36deg 40min North; 136deg to 137deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2477,Japan - 36deg to 37deg 40min N; 137deg to 138deg E.,Japan - 36deg to 36deg 40min North; 137deg to 138deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2478,Japan - 36deg to 37deg 40min N; 138deg to 139deg E.,Japan - 36deg to 36deg 40min North; 138deg to 139deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2479,Japan - 36deg to 37deg 40min N; 139deg to 140deg E.,Japan - 36deg to 36deg 40min North; 139deg to 140deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2480,Japan - 36deg to 37deg 40min N; 140deg to 141deg E.,Japan - 36deg to 36deg 40min North; 140deg to 141deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2481,Japan - 35deg 20min to 36deg N; 132deg to 133deg E.,Japan - 35deg 20min to 36deg North; 132deg to 133deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2482,Japan - 35deg 20min to 36deg N; 133deg to 134deg E.,Japan - 35deg 20min to 36deg North; 133deg to 134deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2483,Japan - 35deg 20min to 36deg N; 134deg to 135deg E.,Japan - 35deg 20min to 36deg North; 134deg to 135deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2484,Japan - 35deg 20min to 36deg N; 135deg to 136deg E.,Japan - 35deg 20min to 36deg North; 135deg to 136deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2485,Japan - 35deg 20min to 36deg N; 136deg to 137deg E.,Japan - 35deg 20min to 36deg North; 136deg to 137deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2486,Japan - 35deg 20min to 36deg N; 137deg to 138deg E.,Japan - 35deg 20min to 36deg North; 137deg to 138deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2487,Japan - 35deg 20min to 36deg N; 138deg to 139deg E.,Japan - 35deg 20min to 36deg North; 138deg to 139deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2488,Japan - 35deg 20min to 36deg N; 139deg to 140deg E.,Japan - 35deg 20min to 36deg North; 139deg to 140deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2489,Japan - 35deg 20min to 36deg N; 140deg to 141deg E.,Japan - 35deg 20min to 36deg North; 140deg to 141deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2490,Japan - 34deg 40min to 35deg 20min N; 132deg to 133deg E.,Japan - 34deg 40min to 35deg 20min North; 132deg to 133deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2491,Japan - 34deg 40min to 35deg 20min N; 133deg to 134deg E.,Japan - 34deg 40min to 35deg 20min North; 133deg to 134deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2492,Japan - 34deg 40min to 35deg 20min N; 134deg to 135deg E.,Japan - 34deg 40min to 35deg 20min North; 134deg to 135deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2493,Japan - 34deg 40min to 35deg 20min N; 135deg to 136deg E.,Japan - 34deg 40min to 35deg 20min North; 135deg to 136deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2494,Japan - 34deg 40min to 35deg 20min N; 136deg to 137deg E.,Japan - 34deg 40min to 35deg 20min North; 136deg to 137deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2495,Japan - 34deg 40min to 35deg 20min N; 137deg to 138deg E.,Japan - 34deg 40min to 35deg 20min North; 137deg to 138deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2496,Japan - 34deg 40min to 35deg 20min N; 138deg to 139deg E.,Japan - 34deg 40min to 35deg 20min North; 138deg to 139deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2497,Japan - 34deg 40min to 35deg 20min N; 139deg to 140deg E.,Japan - 34deg 40min to 35deg 20min North; 139deg to 140deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2498,Japan - 34deg 40min to 35deg 20min N; 140deg to 141deg E.,Japan - 34deg 40min to 35deg 20min North; 140deg to 141deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2499,Japan - 34deg to 34deg 40min N; 130deg to 131deg E.,Japan - 34deg to 34deg 40min North; 130deg to 131deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2500,Japan - 34deg to 34deg 40min N; 131deg to 132deg E.,Japan - 34deg to 34deg 40min North; 131deg to 132deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2501,Japan - 34deg to 34deg 40min N; 132deg to 133deg E.,Japan - 34deg to 34deg 40min North; 132deg to 133deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2502,Japan - 34deg to 34deg 40min N; 133deg to 134deg E.,Japan - 34deg to 34deg 40min North; 133deg to 134deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2503,Japan - 34deg to 34deg 40min N; 134deg to 135deg E.,Japan - 34deg to 34deg 40min North; 134deg to 135deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2504,Japan - 34deg to 34deg 40min N; 135deg to 136deg E.,Japan - 34deg to 34deg 40min North; 135deg to 136deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2505,Japan - 34deg to 34deg 40min N; 136deg to 137deg E.,Japan - 34deg to 34deg 40min North; 136deg to 137deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2506,Japan - 34deg to 34deg 40min N; 137deg to 138deg E.,Japan - 34deg to 34deg 40min North; 137deg to 138deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2507,Japan - 34deg to 34deg 40min N; 138deg to 139deg E.,Japan - 34deg to 34deg 40min North; 138deg to 139deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2508,Japan - 33deg 20min to 34deg N; 129deg to 130deg E.,Japan - 33deg 20min to 34deg North; 129deg to 130deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2509,Japan - 33deg 20min to 34deg N; 130deg to 131deg E.,Japan - 33deg 20min to 34deg North; 130deg to 131deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2510,Japan - 33deg 20min to 34deg N; 131deg to 132deg E.,Japan - 33deg 20min to 34deg North; 131deg to 132deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2511,Japan - 33deg 20min to 34deg N; 132deg to 133deg E.,Japan - 33deg 20min to 34deg North; 132deg to 133deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2512,Japan - 33deg 20min to 34deg N; 133deg to 134deg E.,Japan - 33deg 20min to 34deg North; 133deg to 134deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2513,Japan - 33deg 20min to 34deg N; 134deg to 135deg E.,Japan - 33deg 20min to 34deg North; 134deg to 135deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2514,Japan - 33deg 20min to 34deg N; 135deg to 136deg E.,Japan - 33deg 20min to 34deg North; 135deg to 136deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2515,Japan - 33deg 20min to 34deg N; 136deg to 137deg E.,Japan - 33deg 20min to 34deg North; 136deg to 137deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2516,Japan - 32deg 40min to 33deg 20min N; 129deg to 130deg E.,Japan - 32deg 40min to 33deg 20min North; 129deg to 130deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2517,Japan - 32deg 40min to 33deg 20min N; 130deg to 131deg E.,Japan - 32deg 40min to 33deg 20min North; 130deg to 131deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2518,Japan - 32deg 40min to 33deg 20min N; 131deg to 132deg E.,Japan - 32deg 40min to 33deg 20min North; 131deg to 132deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2519,Japan - 32deg 40min to 33deg 20min N; 132deg to 133deg E.,Japan - 32deg 40min to 33deg 20min North; 132deg to 133deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2520,Japan - 32deg 40min to 33deg 20min N; 133deg to 134deg E.,Japan - 32deg 40min to 33deg 20min North; 133deg to 134deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2521,Japan - 32deg 40min to 33deg 20min N; 134deg to 135deg E.,Japan - 32deg 40min to 33deg 20min North; 134deg to 135deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2522,Japan - 32deg to 32deg 40min N; 130deg to 131deg E.,Japan - 32deg to 32deg 40min North; 130deg to 131deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2523,Japan - 32deg to 32deg 40min N; 131deg to 132deg E.,Japan - 32deg to 32deg 40min North; 131deg to 132deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2524,Japan - 31deg 20min to 32deg N; 130deg to 131deg E.,Japan - 31deg 20min to 32deg North; 130deg to 131deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2525,Japan - 31deg 20min to 32deg N; 131deg to 132deg E.,Japan - 31deg 20min to 32deg North; 131deg to 132deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2526,Japan - 30deg 40min to 31deg 20min N; 130deg to 131deg E.,Japan - 30deg 40min to 31deg 20min North; 130deg to 131deg East.,,,,,EPSG,EPSG,1998-12-12 00:00:00,,0
-2527,USA - Texas - SPCS83 - S central,United States (USA) - Texas between approximately 30d 10m & 28d 05m North - counties of Aransas; Atascosa; Austin; Bandera; Bee; Bexar; Brazoria; Brewster; Caldwell; Calhoun; Chambers; Colorado; Comal; De Witt; Dimmit; Edwards; Fayette; Fort Bend; Frio; Galveston; Goliad; Gonzales; Guadalupe; Harris; Hays; Jackson; Jefferson; Karnes; Kendall; Kerr; Kinney; La Salle; Lavaca; Live Oak; Matagorda; Maverick; McMullen; Medina; Presidio; Real; Refugio; Ter [...]
-2528,USA - Texas - SPCS83 - S,United States (USA) - Texas south of approximately 28d 05m North - counties of Brooks; Cameron; Duval; Hidalgo; Jim Hogg; Jim Wells; Kenedy; Kleberg; Nueces; San Patricio; Starr; Webb; Willacy; Zapata.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2529,USA - Louisiana - SPCS83 - S,United States (USA) - Louisiana south of approximately 30d 55m North - counties of Acadia; Allen; Ascension; Assumption; Beauregard; Calcasieu; Cameron; East Baton Rouge; East Feliciana; Evangeline; Iberia; Iberville; Jefferson; Jefferson Davis; Lafayette; LaFourche; Livingston; Orleans; Plaquemines; Pointe Coupee; St. Bernard; St. Charles; St. Helena; St. James; St. John the Baptist; St. Landry; St. Martin; St. Mary; St. Tammany; Tangipahoa; Terrebonne; [...]
-2530,UK - Northern Ireland,United Kingdom (UK) - Northern Ireland (Ulster).,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2531,Denmark - Jutland and Fuen,Denmark - Jutland and Fuen.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2532,Denmark - Zealand and Lolland,Denmark - Zealand and Lolland.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2533,Denmark - Bornholm,Denmark - Bornholm.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2534,3-degree TM - N hemisphere CM 27 deg E,"Between 25 deg 30 min and 28 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2535,3-degree TM - N hemisphere CM 30 deg E,"Between 28 deg 30 min and 31 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2536,3-degree TM - N hemisphere CM 33 deg E,"Between 31 deg 30 min and 34 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2537,3-degree TM - N hemisphere CM 36 deg E,"Between 34 deg 30 min and 37 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2538,3-degree TM - N hemisphere CM 39 deg E,"Between 37 deg 30 min and 40 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2539,3-degree TM - N hemisphere CM 42 deg E,"Between 40 deg 30 min and 43 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2540,3-degree TM - N hemisphere CM 45 deg E,"Between 43 deg 30 min and 46 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2541,Germany - former west Germany N,Germany - former west Germany north of 52deg 20min N.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2542,Germany - former west Germany C,Germany - former west Germany between 50deg 20min and 52deg 20min N.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2543,Germany - former west Germany S,Germany - former west Germany south of 50deg 20min N.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2544,Germany - Thuringen,Germany - Thuringen.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2545,Germany - Sachsen,Germany - Sachsen.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2546,Romania - offshore,Romania - offshore.,,,,,EPSG,EPSG,2001-11-06 00:00:00,,0
-2547,Yugoslavia - Montenegro,Yugoslavia - Montenegro.,,,,,EPSG,EPSG,2002-01-18 00:00:00,,0
-2548,Africa - AOF W of 10deg W,French West Africa west of 10deg West.,,,,,EPSG,EPSG,2002-01-18 00:00:00,,0
-2549,Africa - AOF 10 to 3.5deg W,French West Africa between 10deg and 3deg 30min West.,,,,,EPSG,EPSG,2002-01-18 00:00:00,,0
-2550,Africa - AOF 3.5deg W to 4deg E,French West Africa between 3deg 30min West and 4deg East.,,,,,EPSG,EPSG,2002-01-18 00:00:00,,0
-2551,Africa - AOF 4 to 9deg E,French West Africa between 4deg and 9deg East.,,,,,EPSG,EPSG,2002-01-18 00:00:00,,0
-2552,Africa - AEF 9 to 14deg E,French Equatorial Africa between 9deg and 14deg East.,,,,,EPSG,EPSG,2002-01-18 00:00:00,,0
-2553,Africa - AEF 14 to 21deg E,French Equatorial Africa between 14deg and 21deg East.,,,,,EPSG,EPSG,2002-01-18 00:00:00,,0
-2554,Africa - AEF east of 21deg E,French Equatorial Africa east of 21deg East.,,,,,EPSG,EPSG,2002-01-18 00:00:00,,0
-2555,Cameroon - coastal area,Cameroon - coastal area.,,,,,EPSG,EPSG,2002-01-18 00:00:00,,0
-2556,Greenland - north of 81 deg N,Greenland - north of 81 deg North.,,,,,EPSG,EPSG,2002-01-18 00:00:00,,0
-2557,Greenland - east - 78 to 81 deg N,Greenland - east of 44 deg West and between 78 deg and 81 deg North.,,,,,EPSG,EPSG,2002-01-18 00:00:00,,0
-2558,Greenland - east - 75 to 78 deg N,Greenland - east of 42 deg West and between 75 deg and 78 deg North.,,,,,EPSG,EPSG,2002-01-18 00:00:00,,0
-2559,Greenland - east - 72 to 75 deg N,Greenland - east of 38 deg West and between 72 deg and 75 deg North.,,,,,EPSG,EPSG,2002-01-18 00:00:00,,0
-2560,Greenland - east - 69 to 72 deg N,Greenland - east of 38 deg West and between 69 deg and 72 deg North.,,,,,EPSG,EPSG,2002-01-18 00:00:00,,0
-2561,Greenland - east - 66 to 69 deg N,Greenland - east of 42 deg West and between 66 deg and 69 deg North.,,,,,EPSG,EPSG,2002-01-18 00:00:00,,0
-2562,Greenland - east - 63 to 66 deg N,Greenland - east of 46 deg West and between 63 deg and 66 deg North.,,,,,EPSG,EPSG,2002-01-18 00:00:00,,0
-2563,Greenland - west - 78 to 81 deg N,Greenland - west of 44 deg West and between 78 deg and 81 deg North.,,,,,EPSG,EPSG,2002-01-18 00:00:00,,0
-2564,Greenland - west - 75 to 78 deg N,Greenland - west of 44 deg West and between 75 deg and 78 deg North.,,,,,EPSG,EPSG,2002-01-18 00:00:00,,0
-2565,Greenland - west - 72 to 75 deg N,Greenland - west of 38 deg West and between 72 deg and 75 deg North.,,,,,EPSG,EPSG,2002-01-18 00:00:00,,0
-2566,Greenland - west - 69 to 72 deg N,Greenland - west of 38 deg West and between 69 deg and 72 deg North.,,,,,EPSG,EPSG,2002-01-18 00:00:00,,0
-2567,Greenland - west - 66 to 69 deg N,Greenland - west of 42 deg West and between 66 deg and 69 deg North.,,,,,EPSG,EPSG,2002-01-18 00:00:00,,0
-2568,Greenland - west - 63 to 66 deg N,Greenland - west of 46 deg West and between 63 deg and 66 deg North.,,,,,EPSG,EPSG,2002-01-18 00:00:00,,0
-2569,Greenland - south of 63 deg N,Greenland - south of 63 deg North.,,,,,EPSG,EPSG,2002-01-18 00:00:00,,0
-2570,Greenland - Scoresbysund area,Greenland - Scoresbysund area.,,,,,EPSG,EPSG,2002-01-18 00:00:00,,0
-2571,Greenland - Ammassalik area,Greenland - Ammassalik area.,,,,,EPSG,EPSG,2002-01-18 00:00:00,,0
-2572,Greenland - E of 48d W,Greenland east of 48 deg West.,,,,,EPSG,EPSG,2002-01-18 00:00:00,,0
-2573,Greenland - W of 48d W,Greenland west of 48 deg West.,,,,,EPSG,EPSG,2002-01-18 00:00:00,,0
-2574,Congo - coastal area and offshore,Congo - coastal area and offshore.,,,,,EPSG,EPSG,2002-01-18 00:00:00,,0
-2575,Australia - all states,Australia - Australian Capital Territory (ACT); New South Wales (NSW); Northern Territories (NT); Queensland (Qld); South Australia (SA); Tasmania (Tas); Western Australia (WA); Victoria (Vic).,,,,,EPSG,EPSG,2002-01-18 00:00:00,,0
-2576,Australia - AGD84,"Australia - Queensland (Qld), South Australia (SA), Western Australia (WA).",,,,,EPSG,EPSG,2002-01-18 00:00:00,,0
-2577,Indonesia - Java Sea - ONWJ,Indonesia - Java Sea - offshore northwest Java.,,,,,EPSG,EPSG,2002-02-12 00:00:00,,0
-2588,Indonesia - Java Sea - E,Indonesia - eastern Java Sea.,,,,,EPSG,EPSG,2002-02-12 00:00:00,,0
-2589,Indonesia - Irian Jaya - Tangguh,Indonesia - Irian Jaya - Tangguh.,,,,,EPSG,EPSG,2002-02-12 00:00:00,,0
-2590,Cameroon - Garoua area,Cameroon - Garoua area.,,,,,EPSG,EPSG,2002-01-18 00:00:00,,0
-2591,Cameroon - N'Djamena area,Cameroon - N'Djamena area.,,,,,EPSG,EPSG,2002-01-18 00:00:00,,0
-2592,Azerbaijan - offshore and Sangachal,Azerbaijan - offshore and Sangachal terminal.,,,,,EPSG,EPSG,2002-02-12 00:00:00,,0
-2593,Asia - Azerbaijan and Georgia,Azerbaijan and Georgia,,,,,EPSG,EPSG,2002-02-12 00:00:00,,0
-2594,Azerbaijan - coastal area Baku to Astara,Azerbaijan - coastal area Baku to Astara.,,,,,EPSG,EPSG,2002-02-12 00:00:00,,0
-2595,Egypt - Western Desert,Egypt - Western Desert.,,,,,EPSG,EPSG,2002-02-12 00:00:00,,0
-2596,Argentina - Tierra del Fuego - offshore W of 66W,Argentina - Tierra del Fuego offshore west of 66 deg West.,,,,,EPSG,EPSG,2002-02-12 00:00:00,,0
-2597,Argentina - Tierra del Fuego - offshore E of 66W,Argentina - Tierra del Fuego offshore east of 66 deg West.,,,,,EPSG,EPSG,2002-02-12 00:00:00,,0
-2598,Algeria - District 3,Algeria - District 3 (In Salah).,,,,,EPSG,EPSG,2002-02-12 00:00:00,,0
-2599,Algeria - In Amenas,Algeria - In Amenas block.,,,,,EPSG,EPSG,2002-02-12 00:00:00,,0
-2600,Algeria - Hassi Bir Reikaz,Algeria - Hassi Bir Reikaz.,,,,,EPSG,EPSG,2002-02-12 00:00:00,,0
-2601,Norway - offshore N of 62 deg N;  Svalbard; Jan Mayen,Norway - offshore north of 62 deg N;  Svalbard and Jan Mayen Islands.,,,,,EPSG,EPSG,2001-08-15 00:00:00,,0
-2602,"Palestine Territory, Occupied","Palestine Territory, Occupied.",PS,PSE,275,,ISO 3166 Maintenance Agency.  ftp://ftp.fu-berlin.de/pub/doc/iso,EPSG,2002-06-22 00:00:00,,0
-2603,Asia - Middle East - Israel and Palestine Territory,Asia - Middle East - Israel and Palestine Territory.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2604,3-degree TM - N hemisphere CM 48 deg E,"Between 46 deg 30 min and 49 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2605,3-degree TM - N hemisphere CM 51 deg E,"Between 49 deg 30 min and 52 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2606,3-degree TM - N hemisphere CM 54 deg E,"Between 52 deg 30 min and 55 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2607,3-degree TM - N hemisphere CM 57 deg E,"Between 55 deg 30 min and 58 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2608,3-degree TM - N hemisphere CM 60 deg E,"Between 58 deg 30 min and 61 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2609,3-degree TM - N hemisphere CM 63 deg E,"Between 61 deg 30 min and 64 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2610,3-degree TM - N hemisphere CM 66 deg E,"Between 64 deg 30 min and 67 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2611,3-degree TM - N hemisphere CM 69 deg E,"Between 67 deg 30 min and 70 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2612,3-degree TM - N hemisphere CM 72 deg E,"Between 70 deg 30 min and 73 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2613,3-degree TM - N hemisphere CM 75 deg E,"Between 73 deg 30 min and 76 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2614,3-degree TM - N hemisphere CM 78 deg E,"Between 76 deg 30 min and 79 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2615,3-degree TM - N hemisphere CM 81 deg E,"Between 79 deg 30 min and 82 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2616,3-degree TM - N hemisphere CM 84 deg E,"Between 82 deg 30 min and 85 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2617,3-degree TM - N hemisphere CM 87 deg E,"Between 85 deg 30 min and 88 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2618,3-degree TM - N hemisphere CM 90 deg E,"Between 88 deg 30 min and 91 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2619,3-degree TM - N hemisphere CM 93 deg E,"Between 91 deg 30 min and 94 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2620,3-degree TM - N hemisphere CM 96 deg E,"Between 94 deg 30 min and 97 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2621,3-degree TM - N hemisphere CM 99 deg E,"Between 97 deg 30 min and 100 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2622,3-degree TM - N hemisphere CM 102 deg E,"Between 100 deg 30 min and 103 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2623,3-degree TM - N hemisphere CM 105 deg E,"Between 103 deg 30 min and 106 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2624,3-degree TM - N hemisphere CM 108 deg E,"Between 106 deg 30 min and 109 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2625,3-degree TM - N hemisphere CM 111 deg E,"Between 109 deg 30 min and 112 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2626,3-degree TM - N hemisphere CM 114 deg E,"Between 112 deg 30 min and 115 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2627,3-degree TM - N hemisphere CM 117 deg E,"Between 115 deg 30 min and 118 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2628,3-degree TM - N hemisphere CM 120 deg E,"Between 118 deg 30 min and 121 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2629,3-degree TM - N hemisphere CM 123 deg E,"Between 121 deg 30 min and 124 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2630,3-degree TM - N hemisphere CM 126 deg E,"Between 124 deg 30 min and 127 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2631,3-degree TM - N hemisphere CM 129 deg E,"Between 127 deg 30 min and 130 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2632,3-degree TM - N hemisphere CM 132 deg E,"Between 130 deg 30 min and 133 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2633,3-degree TM - N hemisphere CM 135 deg E,"Between 133 deg 30 min and 136 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2634,3-degree TM - N hemisphere CM 138 deg E,"Between 136 deg 30 min and 139 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2635,3-degree TM - N hemisphere CM 141 deg E,"Between 139 deg 30 min and 142 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2636,3-degree TM - N hemisphere CM 144 deg E,"Between 142 deg 30 min and 145 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2637,3-degree TM - N hemisphere CM 147 deg E,"Between 145 deg 30 min and 148 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2638,3-degree TM - N hemisphere CM 150 deg E,"Between 148 deg 30 min and 151 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2639,3-degree TM - N hemisphere CM 153 deg E,"Between 151 deg 30 min and 154 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2640,3-degree TM - N hemisphere CM 156 deg E,"Between 154 deg 30 min and 157 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2641,3-degree TM - N hemisphere CM 159 deg E,"Between 157 deg 30 min and 160 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2642,3-degree TM - N hemisphere CM 162 deg E,"Between 160 deg 30 min and 163 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2643,3-degree TM - N hemisphere CM 165 deg E,"Between 163 deg 30 min and 166 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2644,3-degree TM - N hemisphere CM 168 deg E,"Between 166 deg 30 min and 169 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2645,3-degree TM - N hemisphere CM 171 deg E,"Between 169 deg 30 min and 172 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2646,3-degree TM - N hemisphere CM 174 deg E,"Between 172 deg 30 min and 175 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2647,3-degree TM - N hemisphere CM 177 deg E,"Between 175 deg 30 min and 178 deg 30 min East, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2648,3-degree TM - N hemisphere CM 180 deg,"Between 178 deg 30 min East and 178 deg 30 min West, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2649,3-degree TM - N hemisphere CM 177 deg W,"Between 178 deg 30 min and 175 deg 30 min West, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2650,3-degree TM - N hemisphere CM 174 deg W,"Between 175 deg 30 min and 172 deg 30 min West, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2651,3-degree TM - N hemisphere CM 171 deg W,"Between 172 deg 30 min and 169 deg 30 min West, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2652,3-degree TM - N hemisphere CM 168 deg W,"Between 169 deg 30 min and 166 deg 30 min West, northern hemisphere.",,,,,EPSG,EPSG,2002-06-22 00:00:00,2002.341,0
-2653,Europe - 3deg GK CM 21 deg E,Russian Federation and Ukraine - between 19 deg 30 min and 22 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2654,Europe - 3deg GK CM 24 deg E,"Belarus, Russian Federation and Ukraine - between 22 deg 30 min and 25 deg 30 min East.",,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2655,Europe - 3deg GK CM 27 deg E,"Belarus, Moldova, Russian Federation and Ukraine - between 25 deg 30 min and 28 deg 30 min East.",,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2656,Europe - 3deg GK CM 30 deg E,"Belarus, Moldova, Russian Federation and Ukraine - between 28 deg 30 min and 31 deg 30 min East.",,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2657,Europe - 3deg GK CM 33 deg E,"Belarus, Russian Federation and Ukraine - between 31 deg 30 min and 34 deg 30 min East.",,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2658,Europe - 3deg GK CM 36 deg E,Russian Federation and Ukraine - between 34 deg 30 min and 37 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2659,Europe - 3deg GK CM 39 deg E,"Georgia, Russian Federation  and Ukraine - between 37 deg 30 min and 40 deg 30 min East.",,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2660,Europe - 3deg GK CM 42 deg E,"Georgia, Russian Federation - between 40 deg 30 min and 43 deg 30 min East.",,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2661,Europe - 3deg GK CM 45 deg E,"Armenia, Azerbaijan, Georgia and Russian Federation - between 43 deg 30 min and 46 deg 30 min East.",,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2662,Europe - 3deg GK CM 48 deg E,"Azerbaijan, Georgia and Russian Federation - between 46 deg 30 min and 49 deg 30 min East.",,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2663,Europe - 3deg GK CM 51 deg E,"Azerbaijan, Georgia and Russian Federation - between 49 deg 30 min and 52 deg 30 min East.",,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2664,Asia - 3deg GK CM 54 deg E,"Kazakstan, Russian Federation and Turkmenistan - between 52 deg 30 min and 55 deg 30 min East.",,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2665,Asia - 3deg GK CM 57 deg E,"Kazakstan, Russian Federation and Turkmenistan - between 55 deg 30 min and 58 deg 30 min East.",,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2666,Asia - 3deg GK CM 60 deg E,"Kazakstan, Russian Federation, Turkmenistan and Uzbekistan - between 58 deg 30 min and 61 deg 30 min East.",,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2667,Asia - 3deg GK CM 63 deg E,"Kazakstan, Russian Federation, Turkmenistan and Uzbekistan - between 61 deg 30 min and 64 deg 30 min East.",,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2668,Asia - 3deg GK CM 66 deg E,"Kazakstan, Russian Federation, Turkmenistan and Uzbekistan - between 64 deg 30 min and 67 deg 30 min East.",,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2669,Asia - 3deg GK CM 69 deg E,"Kazakstan, Kyrgyzstan, Russian Federation, Tajikistan and Uzbekistan - between 67 deg 30 min and 70 deg 30 min East.",,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2670,Asia - 3deg GK CM 72 deg E,"Kazakstan, Kyrgyzstan, Russian Federation, Tajikistan and Uzbekistan - between 70 deg 30 min and 73 deg 30 min East.",,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2671,Asia - 3deg GK CM 75 deg E,"Kazakstan, Kyrgyzstan, Russian Federation and Tajikistan - between 73 deg 30 min and 76 deg 30 min East.",,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2672,Asia - 3deg GK CM 78 deg E,"Kazakstan, Kyrgyzstan and Russian Federation - between 76 deg 30 min and 79 deg 30 min East.",,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2673,Asia - 3deg GK CM 81 deg E,"Kazakstan, Kyrgyzstan and Russian Federation - between 79 deg 30 min and 82 deg 30 min East.",,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2674,Asia - 3deg GK CM 84 deg E,Kazakstan and Russian Federation - between 82 deg 30 min and 85 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2675,Asia - 3deg GK CM 87 deg E,Kazakstan and Russian Federation - between 85 deg 30 min and 88 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2676,Russia - 88.5 to 91.5 deg E,Russian Federation - between 88 deg 30 min and 91 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2677,Russia - 91.5 to 94.5 deg E,Russian Federation - between 91 deg 30 min and 94 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2678,Russia - 94.5 to 97.5 deg E,Russian Federation - between 94 deg 30 min and 97 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2679,Russia - 97.5 to 100.5 deg E,Russian Federation - between 97 deg 30 min and 100 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2680,Russia - 100.5 to 103.5 deg E,Russian Federation - between 100 deg 30 min and 103 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2681,Russia - 103.5 to 106.5 deg E,Russian Federation - between 103 deg 30 min and 106 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2682,Russia - 106.5 to 109.5 deg E,Russian Federation - between 106 deg 30 min and 109 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2683,Russia - 109.5 to 112.5 deg E,Russian Federation - between 109 deg 30 min and 112 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2684,Russia - 112.5 to 115.5 deg E,Russian Federation - between 112 deg 30 min and 115 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2685,Russia - 115.5 to 118.5 deg E,Russian Federation - between 115 deg 30 min and 118 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2686,Russia - 118.5 to 121.5 deg E,Russian Federation - between 118 deg 30 min and 121 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2687,Russia - 121.5 to 124.5 deg E,Russian Federation - between 121 deg 30 min and 124 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2688,Russia - 124.5 to 127.5 deg E,Russian Federation - between 124 deg 30 min and 127 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2689,Russia - 127.5 to 130.5 deg E,Russian Federation - between 127 deg 30 min and 130 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2690,Russia - 130.5 to 133.5 deg E,Russian Federation - between 130 deg 30 min and 133 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2691,Russia - 133.5 to 136.5 deg E,Russian Federation - between 133 deg 30 min and 136 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2692,Russia - 136.5 to 139.5 deg E,Russian Federation - between 136 deg 30 min and 139 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2693,Russia - 139.5 to 142.5 deg E,Russian Federation - between 139 deg 30 min and 142 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2694,Russia - 142.5 to 145.5 deg E,Russian Federation - between 142 deg 30 min and 145 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2695,Russia - 145.5 to 148.5 deg E,Russian Federation - between 145 deg 30 min and 148 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2696,Russia - 148.5 to 151.5 deg E,Russian Federation - between 148 deg 30 min and 151 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2697,Russia - 151.5 to 154.5 deg E,Russian Federation - between 151 deg 30 min and 154 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2698,Russia - 154.5 to 157.5 deg E,Russian Federation - between 154 deg 30 min and 157 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2699,Russia - 157.5 to 160.5 deg E,Russian Federation - between 157 deg 30 min and 160 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2700,Russia - 160.5 to 163.5 deg E,Russian Federation - between 160 deg 30 min and 163 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2701,Russia - 163.5 to 166.5 deg E,Russian Federation - between 163 deg 30 min and 166 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2702,Russia - 166.5 to 170.5 deg E,Russian Federation - between 166 deg 30 min and 169 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2703,Russia - 169.5 to 172.5 deg E,Russian Federation - between 169 deg 30 min and 172 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2704,Russia - 172.5 to 175.5 deg E,Russian Federation - between 172 deg 30 min and 175 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2705,Russia - 175.5 to 178.5 deg E,Russian Federation - between 175 deg 30 min and 178 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2706,Russia - 178.5E to 178.5 deg W,Russian Federation - between 178 deg 30 min East and 178 deg 30 min West.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2707,Russia - 178.5 to 175.5 deg W,Russian Federation - between 178 deg 30 min and 175 deg 30 min West.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2708,Russia - 175.5 to 172.5 deg W,Russian Federation - between 175 deg 30 min and 172 deg 30 min West.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2709,Russia - 172.5 to 169.5 deg W,Russian Federation - between 172 deg 30 min and 169 deg 30 min West.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2710,Russia - 169.5 to 166.5 deg W,Russian Federation - between 169 deg 30 min and 166 deg 30 min West.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2711,China - 73.5 to 76.5 deg E,China - between 73 deg 30 min and 76 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2712,China - 76.5 to 79.5 deg E,China - between 76 deg 30 min and 79 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2713,China - 79.5 to 82.5 deg E,China - between 79 deg 30 min and 82 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2714,China - 82.5 to 85.5 deg E,China - between 82 deg 30 min and 85 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2715,China - 85.5 to 88.5 deg E,China - between 85 deg 30 min and 88 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2716,China - 88.5 to 91.5 deg E,China - between 88 deg 30 min and 91 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2717,China - 91.5 to 94.5 deg E,China - between 91 deg 30 min and 94 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2718,China - 94.5 to 97.5 deg E,China - between 94 deg 30 min and 97 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2719,China - 97.5 to 100.5 deg E,China - between 97 deg 30 min and 100 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2720,China - 100.5 to 103.5 deg E,China - between 100 deg 30 min and 103 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2721,China - 103.5 to 106.5 deg E,China - between 103 deg 30 min and 106 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2722,China - 106.5 to 109.5 deg E,China - between 106 deg 30 min and 109 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2723,China - 109.5 to 112.5 deg E,China - between 109 deg 30 min and 112 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2724,China - 112.5 to 115.5 deg E,China - between 112 deg 30 min and 115 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2725,China - 115.5 to 118.5 deg E,China - between 115 deg 30 min and 118 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2726,China - 118.5 to 121.5 deg E,China - between 118 deg 30 min and 121 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2727,China - 121.5 to 124.5 deg E,China - between 121 deg 30 min and 124 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2728,China - 124.5 to 127.5 deg E,China - between 124 deg 30 min and 127 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2729,China - 127.5 to 130.5 deg E,China - between 127 deg 30 min and 130 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2730,China - 130.5 to 133.5 deg E,China - between 130 deg 30 min and 133 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2731,China - 133.5 to 136.5 deg E,China - between 133 deg 30 min and 136 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2732,6-degree TM - CM 81 deg W,Between 84 and 78 deg West.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2733,6-degree TM - CM 75 deg W,Between 78 and 72 deg West.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2734,6-degree TM - CM 69 deg W,Between 72 and 66 deg West.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2735,6-degree TM - CM 63 deg W,Between 66 and 60 deg West.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2736,6-degree TM - CM 57 deg W,Between 60 and 54 deg West.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2737,6-degree TM - CM 51 deg W,Between 54 and 48 deg West.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2738,6-degree TM - CM 45 deg W,Between 48 and 42 deg West.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2739,6-degree TM - CM 39 deg W,Between 42 and 36 deg West.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2740,6-degree TM - CM 33 deg W,Between 36 and 30 deg West.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2741,6-degree TM - CM 9 deg E,Between 6 and 12 deg East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2742,6-degree TM - CM 15 deg E,Between 12 and 18 deg East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2743,6-degree TM - CM 21 deg E,Between 18 and 24 deg East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2744,6-degree TM - CM 27 deg E,Between 24 and 30 deg East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2745,6-degree TM - CM 33 deg E,Between 30 and 36 deg East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2746,6-degree TM - CM 39 deg E,Between 36 and 42 deg East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2747,Russia - 19.5 to 22.5 deg E,Russian Federation - between 19 deg 30 min and 22 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2748,Russia - 22.5 to 25.5 deg E,Russian Federation - between 22 deg 30 min and 25 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2749,Russia - 25.5 to 28.5 deg E,Russian Federation - between 25 deg 30 min and 28 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2750,Russia - 28.5 to 31.5 deg E,Russian Federation - between 28 deg 30 min and 31 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2751,Russia - 31.5 to 34.5 deg E,Russian Federation - between 31 deg 30 min and 34 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2752,Russia - 34.5 to 37.5 deg E,Russian Federation - between 34 deg 30 min and 37 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2753,Russia - 37.5 to 40.5 deg E,Russian Federation - between 37 deg 30 min and 40 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2754,Russia - 40.5 to 43.5 deg E,Russian Federation - between 40 deg 30 min and 43 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2755,Russia - 43.5 to 46.5 deg E,Russian Federation - between 43 deg 30 min and 46 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2756,Russia - 46.5 to 49.5 deg E,Russian Federation - between 46 deg 30 min and 49 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2757,Russia - 49.5 to 52.5 deg E,Russian Federation - between 49 deg 30 min and 52 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2758,Russia - 52.5 to 55.5 deg E,Russian Federation - between 52 deg 30 min and 55 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2759,Russia - 55.5 to 58.5 deg E,Russian Federation - between 55 deg 30 min and 58 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2760,Russia - 58.5 to 61.5 deg E,Russian Federation - between 58 deg 30 min and 61 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2761,Russia - 61.5 to 64.5 deg E,Russian Federation - between 61 deg 30 min and 64 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2762,Russia - 64.5 to 67.5 deg E,Russian Federation - between 64 deg 30 min and 67 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2763,Russia - 67.5 to 70.5 deg E,Russian Federation - between 67 deg 30 min and 70 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2764,Russia - 70.5 to 73.5 deg E,Russian Federation - between 70 deg 30 min and 73 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2765,Russia - 73.5 to 76.5 deg E,Russian Federation - between 73 deg 30 min and 76 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2766,Russia - 76.5 to 79.5 deg E,Russian Federation - between 76 deg 30 min and 79 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2767,Russia - 79.5 to 82.5 deg E,Russian Federation - between 79 deg 30 min and 82 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2768,Russia - 82.5 to 85.5 deg E,Russian Federation - between 82 deg 30 min and 85 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2769,Russia - 85.5 to 88.5 deg E,Russian Federation - between 85 deg 30 min and 88 deg 30 min East.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2770,Indonesia - Kalimantan NE,Indonesia - northeast Kalimantan.,,,,,EPSG,EPSG,2002-06-22 00:00:00,,0
-2771,Niger - SE,Niger - south east,,,,,EPSG,EPSG,2002-06-28 00:00:00,,0
-2772,Asia - CS63 zone A1,Armenia and Georgia west of 43deg 02min E.,,,,,EPSG,EPSG,2002-06-28 00:00:00,,0
-2773,Asia - CS63 zone A2,Armenia and Georgia between 43 deg 02min and 46 deg 02 min E; Azerbaijan west of 46 deg 02 min E.,,,,,EPSG,EPSG,2002-06-28 00:00:00,,0
-2774,Asia - CS63 zone A3,Armenia and Georgia east of 46 deg 02 min E; Azerbaijan between 46 deg 02min and 49 deg 02 min E.,,,,,EPSG,EPSG,2002-06-28 00:00:00,,0
-2775,Asia - CS63 zone A4,Azerbaijan east of 49 deg 02 min E.,,,,,EPSG,EPSG,2002-06-28 00:00:00,,0
-2776,Asia - CS63 zone K2,Kazakstan between 49 deg 16 min and 52 deg 16 min E.,,,,,EPSG,EPSG,2002-06-28 00:00:00,,0
-2777,Asia - CS63 zone K3,Kazakstan between 52 deg 16 min and 55 deg 16 min E.,,,,,EPSG,EPSG,2002-06-28 00:00:00,,0
-2778,Asia - CS63 zone K4,Kazakstan between 55 deg 16 min and 58 deg 16 min E.,,,,,EPSG,EPSG,2002-06-28 00:00:00,,0
-2779,Portugal - Selvagens,Portugal - Selvagens island (Madeira group).,,,,,EPSG,EPSG,2001-06-05 00:00:00,,0
-2780,Malaysia - East Malaysia - offshore,Malaysia - East Malaysia (Sabah; Sarawak) - offshore.,,,,,EPSG,EPSG,2002-07-13 00:00:00,,0
-2781,Iran - Kharg Island,Islamic Republic of Iran - Kharg Island.,,,,,EPSG,EPSG,2002-07-13 00:00:00,,0
-2782,Iran - Lavan Island and Balal field,Islamic Republic of Iran - Lavan Island and Balal field.,,,,,EPSG,EPSG,2002-07-13 00:00:00,,0
-2783,Iran - South Pars block 2,Islamic Republic of Iran - South Pars field blocks 2 and 3.,,,,,EPSG,EPSG,2002-07-13 00:00:00,,0
-2784,Canada - CSRS,Canada - Alberta; New Brunswick; Nova Scotia; Saskatchewan; Prince Edward Island; and Quebec.,,,,,EPSG,EPSG,2002-07-13 00:00:00,,0
-2785,Libya - Murzuq,Libyan Arab Jamahiriya - Murzuq field,,,,,EPSG,EPSG,2002-07-16 00:00:00,,0
-2786,Libya - Mabruk,Libyan Arab Jamahiriya - Mabruk field,,,,,EPSG,EPSG,2002-07-16 00:00:00,,0
diff --git a/src/tiff/csv/codes.csv b/src/tiff/csv/codes.csv
deleted file mode 100644
index 9bd878f..0000000
--- a/src/tiff/csv/codes.csv
+++ /dev/null
@@ -1,84 +0,0 @@
-"RECORD_ID","TABLE_NAME","TABLE_CONTENTS","CODE_MINIMUM","CODE_MAXIMUM","ALLOCATED_LOW","ALLOCATED_HIGH","REMARKS"
-0.01,Note: EPSG codes reserved range.,,0,32767,,,EPSG reserved code range 0-32766.  Users should allocated codes outside of this range.
-1.0,Alias,Aliases for data in all tables.,1,,1,2020,Autonumbered. Code range also used in other tables.
-2.0,Area,Area of use,1024,32767,1024,2784,Allocated sequentially - codes have no meaning. Code range also used in other tables.
-3.0,Change,Change records,,,,,Allocated sequentially with calendar year.
-4.0,Codes,EPSG codes,,,,,(This table)
-5.0,Coordinate Axis,Coordinate system attributes,,,,,No codes allocated - intersection table using dual key codes of related tables.
-6.0,Coordinate Axis Name,Coordinate system axis names,9900,9999,9901,9928,Allocated sequentially - codes have no meaning.
-7.0,Coordinate Reference System,Coordinate Reference System data,,,,,
-7.1,Coordinate Reference System,      Geographic coordinate reference systems,,,,,
-7.11,Coordinate Reference System,            geogCRS unspecified datum,4000,4099,4001,4047,
-7.12,Coordinate Reference System,            geogCRS non-WGS systems (1),4120,4139,4120,4139,Form ProjCRS 20yy to 39yy.  Range full.
-7.13,Coordinate Reference System,            geogCRS non-WGS systems (2),4140,4199,4140,4199,Added sequentially - codes have no meaning. Range full.
-7.14,Coordinate Reference System,            geogCRS non-WGS systems (3),4200,4319,4200,4319,Form ProjCRS 200yy to 319yy.  Range full.
-7.15,Coordinate Reference System,            geogCRS non-WGS systems (4),4600,4799,4600,4617,Added sequentially - codes have no meaning.
-7.16,Coordinate Reference System,            geogCRS NAD systems overflow,4320,4321,4320,4321,Form ProjCRS 320yy to 321yy.  Range full.
-7.17,Coordinate Reference System,            geogCRS WGS systems,4322,4327,4322,4327,Form ProjCRS 322yy to 327yy.  Range full.
-7.18,Coordinate Reference System,            geogCRS non-Greenwich prime meridian equivalent,4800,4899,4801,4820,Form ProjCRS 20yy to 39yy and 200yy to 319yy as in 6.12 and 6.14.
-7.19,Coordinate Reference System,            geogCRS no Greenwich prime meridian,4900,4999,4901,4904,
-7.3,Coordinate Reference System,      Projected coordinate reference systems,,,,,
-7.31,Coordinate Reference System,            projCRS (1a),2000,3999,2000,3992,Historically allocated from geogCRS 4120-4139. Now being infilled sequentially.
-7.32,Coordinate Reference System,            projCRS (1b),2000,3999,2000,2963,Now being allocated sequentially around codes previously allocated from geogCRS 4120-4139.
-7.35,Coordinate Reference System,            projCRS (2),20000,32766,20004,32766,Historically allocated from geogCRS 4200-4327. Will be infilled sequentially after range 2000-3999 full.
-7.4,Coordinate Reference System,      Vertical coordinate reference systems,,,,,
-7.41,Coordinate Reference System,            using ellipsoidal datum,,,,,Deleted in v3.2
-7.42,Coordinate Reference System,            using geoidal datum,5600,5799,5701,5739,
-7.5,Coordinate Reference System,      Engineering coordinate reference systems,5800,5999,5800,5816,
-7.6,Coordinate Reference System,      Compound coordinate reference systems,7400,7999,7401,7413,
-8.0,Coordinate System,Coordinate System descriptions,,,,,
-8.1,Coordinate System,    Cartesian coordinate systems used in geocentric CRSs,6500,6500,6500,6500,
-8.2,Coordinate System,    Cartesian coordinate systems used in projected CRSs,4400,4599,4400,4532,
-8.3,Coordinate System,    Cartesian coordinate systems used only in Engineering CRSs,6501,6599,,,
-8.4,Coordinate System,    Ellipsoidal and spherical coordinate systems,6400,6449,6401,6404,
-8.5,Coordinate System,    Gravity-related coordinate systems,6450,6499,6497,6499,
-9.0,Coordinate_Operation,Coordinate Operations,,,,,
-9.1,Coordinate_Operation,      Map Projections (Coordinate Conversions),,,,,Codes between 10000 and 19999.
-9.11,Coordinate_Operation,             US State Plane,10000,15999,10001,15917,non-continuous allocation due to semi-heirarchical coding by State.
-9.12,Coordinate_Operation,             global zoned systems,16000,16399,160,163,last two digits indicate zone number
-9.13,Coordinate_Operation,             TM (pseudo UTM) systems NE hem.,16400,16580,16400,16506,systems in the N and E hemispheres.  Digits indicate longitude of origin.
-9.14,Coordinate_Operation,             TM (pseudo UTM) systems SE hem.,16600,16780,16611,16732,systems in the S and E hemispheres.  Digits indicate longitude of origin.
-9.15,Coordinate_Operation,             TM (pseudo UTM) systems SW hem.,16800,16980,,,systems in the S and W hemispheres.  Digits indicate longitude of origin.
-9.16,Coordinate_Operation,             TM (pseudo UTM) systems NW hem.,17000,17180,17001,17054,systems in the N and W hemispheres.  Digits indicate longitude of origin.
-9.17,Coordinate_Operation,             large zoned systems,17200,17999,173,179,last two digits usually indicate zone number
-9.18,Coordinate_Operation,             small zoned systems,18000,18999,1801,1844,last digit indicates zone number
-9.19,Coordinate_Operation,             individual zones,19000,19999,19000,19979,
-9.3,Coordinate_Operation,      Coordinate Transformations,,,,,
-9.31,Coordinate_Operation,             Single-step geodetic transformations,1024,1099,1025,1038,
-9.32,Coordinate_Operation,             Single-step geodetic transformations,1100,1099,1025,1864,
-9.34,Coordinate_Operation,             Concatenated geodetic transformations,8000,8999,8046,8635,
-9.37,Coordinate_Operation,             Vertical offset data,5400,5599,5400,5405,
-10.0,Coordinate_Operation Method,Coordinate Operation methods and required parameter names,,,,,
-10.1,Coordinate_Operation Method,    transformation methods,9600,9699,9601,9636,
-10.2,Coordinate_Operation Method,    reserved for operation methods,9700,9799,,,
-10.3,Coordinate_Operation Method,    conversion (map projection) methods,9800,9899,9801,9828,
-11.0,Coordinate_Operation Parameter,Coordinate Operation parameter names and descriptions,8600,8899,,,
-11.1,Coordinate_Operation Parameter,    Parameters used in transformations,8600,8699,8601,8667,
-11.2,Coordinate_Operation Parameter,    reserved for operation parameters,8700,8799,,,
-11.3,Coordinate_Operation Parameter,    Parameters used in conversions,8880,8899,8801,8831,
-12.0,Coordinate_Operation Parameter Usage,Links parameters with operation methods,,,,,No codes allocated - intersection table using dual key codes of related tables.
-13.0,Coordinate_Operation Parameter Value,Values of transformation and conversion parameters,,,,,No codes allocated - intersection table using triple key codes of related tables.
-14.0,Coordinate_Operation Path,Concatenated transformation steps,,,,,No codes allocated - intersection table using dual key codes of related tables.
-15.1,Datum,Geodetic Datum data,,,,,
-15.11,Datum,    unspecified datum,6000,6099,6001,6047,Form GeogCRS 4000 to 4099.
-15.12,Datum,    WGS systems,6322,6327,6322,6327,Form GeogCRS 4322 to 4327.  Range full.
-15.13,Datum,    NAD systems overflow,6320,6321,6320,6321,Form GeogCRS 4320 to 4321.  Range full.
-15.14,Datum,    non-WGS systems (1),6120,6139,6120,6139,Form GeogCRS 4120 to 4139.  Range full.
-15.15,Datum,    non-WGS systems (2),6140,6199,6140,6199,Form GeogCRS 4140 to 4199.  Range full.
-15.16,Datum,    non-WGS systems (3),6200,6319,6200,6319,Form GeogCRS 4200 to 4319.  Range full.
-15.17,Datum,    non-WGS systems (4),6600,6799,6600,6617,Form GeogCRS 4600 to 4799.
-15.18,Datum,    non-Greenwich prime meridian equivalent,6800,6899,6801,6820,Form GeogCRS 4800 to 4899.
-15.19,Datum,    no Greenwich prime meridian,6900,6999,6901,6904,Form GeogCRS 4900 to 4999.
-15.3,Datum,Vertical datum data,,,,,
-15.31,Datum,    ellipsoidal datum,,,,,Deleted in v3.2
-15.32,Datum,    geoidal datum,5000,5199,5100,5137,
-15.4,Datum,Engineering Datum data,9300,9599,9300,9313,
-16.0,Deprecation,Deprecated records reasons and replacement trail,1,,2,426,Autonumbered. Code range also used in other tables.
-17.0,Ellipsoid,Ellipsoid data,7000,7299,7001,7049,
-18.0,Naming System,Naming System names,7300,7399,7300,7311,
-19.0,Prime Meridian,Prime Meridian data,8900,8999,8901,8913,
-20.0,Unit of Measure,,,,,,
-20.1,Unit of Measure,Angle unit data,9100,9199,9101,9115,
-20.2,Unit of Measure,Length unit data,9000,9099,9001,9094,
-20.3,Unit of Measure,Scale unit data,9200,9299,9201,9211,
-21.0,Version History,,,,,,
diff --git a/src/tiff/csv/compd_cs.c b/src/tiff/csv/compd_cs.c
deleted file mode 100644
index ff62cb7..0000000
--- a/src/tiff/csv/compd_cs.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#include "defs.h"
-datafile_rows_t compd_cs_row_1[] = {"COMPOUNDCS_CODE","COMPOUNDCS_EPSG_NAME","COMPOUNDCS_EPSG_ABBR","COMPOUNDCS_USER_NAME","DESCRIPTION","AREA_OF_USE","HORIZCS_CODE","VERTCS_CODE","REVISION_DATE","INFORMATION_SOURCE","DATA_SOURCE","REMARKS","CHANGE_ID",NULL};
-datafile_rows_t compd_cs_row_2[] = {"7400","NTF (Paris) + NGF IGN69","","","","France - mainland.","4807","5720","1997-11-13 00:00:00","","EPSG","","",NULL};
-datafile_rows_t compd_cs_row_3[] = {"7401","NTF (Paris) / France II + NGF Lallemand","NTF / France II + Lalle","","","France - mainland.","27582","5719","1997-11-13 00:00:00","","EPSG","","",NULL};
-datafile_rows_t compd_cs_row_4[] = {"7402","NTF (Paris) / France II + NGF IGN69","NTF / France II + IGN69","","","France - mainland.","27582","5720","1997-11-13 00:00:00","","EPSG","","",NULL};
-datafile_rows_t compd_cs_row_5[] = {"7403","NTF (Paris) / France III + NGF IGN69","NTF / France III + IGN69","","","France south of 50.5 grads (45 deg 27 min) North.","27583","5720","1997-11-13 00:00:00","","EPSG","","",NULL};
-datafile_rows_t compd_cs_row_6[] = {"7404","RT90 + RH70","","","","Sweden.","4124","5718","1997-11-13 00:00:00","National Land Survey of Sweden","EPSG","When combined with geoid model RN92 forms geographic 3D coordinate system RR92.","",NULL};
-datafile_rows_t compd_cs_row_7[] = {"7405","OSGB36 / British National Grid + ODN","GB National Grid + ODN","","","United Kingdom (UK) - Great Britain.","27700","5701","1997-11-13 00:00:00","","EPSG","","",NULL};
-datafile_rows_t compd_cs_row_8[] = {"7406","NAD27 + NGVD29","","","","United States (USA).","4267","5702","1997-11-13 00:00:00","","EPSG","","",NULL};
-datafile_rows_t compd_cs_row_9[] = {"7407","NAD27 / Texas North + NGVD29","NAD27 / TX_N + NGVD29","","","United States (USA) - Texas.","32037","5702","1997-11-13 00:00:00","","EPSG","","",NULL};
-
-datafile_rows_t *compd_cs_rows[] = {compd_cs_row_1,compd_cs_row_2,compd_cs_row_3,compd_cs_row_4,compd_cs_row_5,compd_cs_row_6,compd_cs_row_7,compd_cs_row_8,compd_cs_row_9,NULL};
diff --git a/src/tiff/csv/compd_cs.csv b/src/tiff/csv/compd_cs.csv
deleted file mode 100644
index 6cd788a..0000000
--- a/src/tiff/csv/compd_cs.csv
+++ /dev/null
@@ -1,9 +0,0 @@
-"COMPOUNDCS_CODE","COMPOUNDCS_EPSG_NAME","COMPOUNDCS_EPSG_ABBR","COMPOUNDCS_USER_NAME","DESCRIPTION","AREA_OF_USE","HORIZCS_CODE","VERTCS_CODE","REVISION_DATE","INFORMATION_SOURCE","DATA_SOURCE","REMARKS","CHANGE_ID"
-7400,NTF (Paris) + NGF IGN69,,,,France - mainland.,4807,5720,1997-11-13 00:00:00,,EPSG,,
-7401,NTF (Paris) / France II + NGF Lallemand,NTF / France II + Lalle,,,France - mainland.,27582,5719,1997-11-13 00:00:00,,EPSG,,
-7402,NTF (Paris) / France II + NGF IGN69,NTF / France II + IGN69,,,France - mainland.,27582,5720,1997-11-13 00:00:00,,EPSG,,
-7403,NTF (Paris) / France III + NGF IGN69,NTF / France III + IGN69,,,France south of 50.5 grads (45 deg 27 min) North.,27583,5720,1997-11-13 00:00:00,,EPSG,,
-7404,RT90 + RH70,,,,Sweden.,4124,5718,1997-11-13 00:00:00,National Land Survey of Sweden,EPSG,When combined with geoid model RN92 forms geographic 3D coordinate system RR92.,
-7405,OSGB36 / British National Grid + ODN,GB National Grid + ODN,,,United Kingdom (UK) - Great Britain.,27700,5701,1997-11-13 00:00:00,,EPSG,,
-7406,NAD27 + NGVD29,,,,United States (USA).,4267,5702,1997-11-13 00:00:00,,EPSG,,
-7407,NAD27 / Texas North + NGVD29,NAD27 / TX_N + NGVD29,,,United States (USA) - Texas.,32037,5702,1997-11-13 00:00:00,,EPSG,,
diff --git a/src/tiff/csv/coordinate_axis.csv b/src/tiff/csv/coordinate_axis.csv
deleted file mode 100644
index 70f8d47..0000000
--- a/src/tiff/csv/coordinate_axis.csv
+++ /dev/null
@@ -1,75 +0,0 @@
-"COORD_SYS_CODE","COORD_AXIS_NAME_CODE","COORD_AXIS_ORIENTATION","COORD_AXIS_ABBREVIATION","UOM_CODE","ORDER"
-4400,9906,east,E,9001,1
-4400,9907,north,N,9001,2
-4401,9906,east,E,9062,1
-4401,9907,north,N,9062,2
-4402,9906,east,E,9042,1
-4402,9907,north,N,9042,2
-4403,9906,east,E,9005,1
-4403,9907,north,N,9005,2
-4404,9906,east,E,9094,1
-4404,9907,north,N,9094,2
-4405,9906,east,E,9041,1
-4405,9907,north,N,9041,2
-4406,9906,east,X,9036,1
-4406,9907,north,Y,9036,2
-4407,9906,east,E,9039,1
-4407,9907,north,N,9039,2
-4408,9906,east,E,9084,1
-4408,9907,north,N,9084,2
-4409,9906,east,E,9040,1
-4409,9907,north,N,9040,2
-4495,9906,east,X,9002,1
-4495,9907,north,Y,9002,2
-4496,9906,east,E(X),9001,1
-4496,9907,north,N(Y),9001,2
-4497,9906,east,X,9003,1
-4497,9907,north,Y,9003,2
-4498,9906,east,Y,9001,1
-4498,9907,north,X,9001,2
-4499,9906,east,X,9001,1
-4499,9907,north,Y,9001,2
-4500,9906,east,E,9001,2
-4500,9907,north,N,9001,1
-4501,9907,north,N,9001,1
-4501,9908,west,E,9001,2
-4530,9906,east,Y,9001,2
-4530,9907,north,X,9001,1
-4531,9906,east,y,9001,2
-4531,9907,north,x,9001,1
-4532,9906,east,X,9001,2
-4532,9907,north,Y,9001,1
-6401,9901,north,Lat,9108,1
-6401,9902,east,Long,9108,2
-6401,9903,up,h,9001,3
-6402,9901,north,Lat,9108,1
-6402,9902,east,Long,9108,2
-6403,9901,north,Lat,9105,1
-6403,9902,east,Long,9105,2
-6404,9926,north,lat,9102,1
-6404,9927,east,long,9102,2
-6404,9928,up,R,9001,3
-6497,9904,up,H,9003,1
-6498,9905,down,D,9001,1
-6499,9904,up,H,9001,1
-6500,9910,Geocentre > equator/PM,X,9001,1
-6500,9911,Geocentre > equator/90dE,Y,9001,2
-6500,9912,Geocentre > north pole,Z,9001,3
-6501,9908,west,Y,9001,2
-6501,9909,south,X,9001,1
-6502,9908,west,Y,9031,1
-6502,9909,south,X,9031,2
-6503,9908,west,Y,9001,1
-6503,9909,south,X,9001,2
-6504,9918,north-east,e,9001,2
-6504,9919,north-west,n,9001,1
-6505,9913,north-west,n,9001,1
-6505,9914,north-east,e,9001,2
-6506,9913,east-south-east,I,9205,1
-6506,9914,north-north-east,J,9204,2
-6507,9913,north,X,9001,1
-6507,9914,west,Y,9001,2
-6508,9920,east south east,I,9208,2
-6508,9921,north north east,J,9209,1
-6509,9908,west,M,9001,2
-6509,9909,south,P,9001,1
diff --git a/src/tiff/csv/coordinate_axis_name.csv b/src/tiff/csv/coordinate_axis_name.csv
deleted file mode 100644
index 9b98cdb..0000000
--- a/src/tiff/csv/coordinate_axis_name.csv
+++ /dev/null
@@ -1,29 +0,0 @@
-"COORD_AXIS_NAME_CODE","COORD_AXIS_NAME","DESCRIPTION","REMARKS","INFORMATION_SOURCE","DATA_SOURCE","REVISION_DATE","CHANGE_ID","DEPRECATED"
-9901,Geodetic latitude,"Angle from the equatorial plane to the perpendicular to the ellipsoid through a given point, northwards usually treated as positive.",Used in geographic 2D and geographic 3D coordinate systems.,EPSG,EPSG,2000-03-07 00:00:00,,0
-9902,Geodetic longitude,"Angle from the prime meridian plane to the meridian plane passing through the given point, eastwards usually treated as positive.",Used in geographic 2D and geographic 3D coordinate systems.,EPSG,EPSG,2000-03-07 00:00:00,,0
-9903,Ellipsoidal height,Distance of a point from the ellipsoid measured along the perpendicular from the ellipsoid to this point.  Positive if upwards or outside of the ellipsoid.,"Used only as part of a geographic 3D coordinate system, never on its own.",EPSG based on ISO 19111,EPSG,2000-03-07 00:00:00,,0
-9904,Gravity-related height,"Height influenced by the Earth's gravity field.  In particular, orthometric height or normal height which are both approximations of the distance of a point above sea level. Positive upwards.",Used in a 1D vertical coordinate system.,"ISO 19111 ""Geographical Information - Spatial Referencing by Coordinates"".",EPSG,2000-03-07 00:00:00,,0
-9905,Gravity-related depth,"Depth influenced by the Earth's gravity field, positive downwards.","Similar to gravity-related height, but with the positive increments in the opposite direction.",EPSG,EPSG,2000-03-07 00:00:00,,0
-9906,Easting,East pointing axis used in 2D projected coordinate systems.,,EPSG,EPSG,2000-03-07 00:00:00,,0
-9907,Northing,North pointing axis used in 2D projected coordinate systems.,,EPSG,EPSG,2000-03-07 00:00:00,,0
-9908,Westing,West pointing axis used in 2D projected coordinate systems (e.g. south oriented transverse Mercator),,EPSG,EPSG,2000-03-07 00:00:00,,0
-9909,Southing,South pointing axis used in 2D projected coordinate systems (e.g. south oriented transverse Mercator),,EPSG,EPSG,2000-03-07 00:00:00,,0
-9910,Geocentric X,"First axis of a right-handed earth centered 3D cartesian coordinate system; lies in the zero-longitude plane, such that a vector pointing in the direction of the positive X will have a longitude of zero.",,EPSG,EPSG,2000-03-07 00:00:00,,0
-9911,Geocentric Y,"Second axis of a right-handed earth centered 3D cartesian coordinate system; perpendicular to the zero-longitude plane, pointing eastward",,EPSG,EPSG,2000-03-07 00:00:00,,0
-9912,Geocentric Z,"Third axis of a right-handed earth centered 3D coordinate system; perpendicular to both X and Y, such that it completes a right-handed coordinate system, the Z-axis is approximately parallel to the earth's rotation axis, positive towards the north pole.",,EPSG,EPSG,2000-03-07 00:00:00,,0
-9913,First local axis,First axis of any local coordinate system.,First and second local coordinate axes are assumed to be horizontal and may be supplemented by 'local height' or 'local depth' to form a local 3D coordinate system.,EPSG,EPSG,2000-03-07 00:00:00,,0
-9914,Second local axis,Second axis of any local coordinate system.,,EPSG,EPSG,2000-03-07 00:00:00,,0
-9915,Third local axis,Third axis of any local coordinate system.,"If the local coordinate system is 3-dimensional, then the first and second local coordinate axes shall be horizontal and the third axis vertical.",EPSG,EPSG,2000-06-22 00:00:00,,0
-9916,Local height,"Height influenced by the Earth's gravity field, positive upwards.",Differs from gravity-related height in having an origin offset from sea level.,EPSG,EPSG,2000-03-07 00:00:00,,0
-9917,Local depth,"Depth influenced by the Earth's gravity field, positive downwards.","Similar to local height, but with the positive increments in the opposite direction.",EPSG,EPSG,2000-03-07 00:00:00,,0
-9918,Plant East,An axis of a local engineering grid 2D or 3D coordinate system.  Plant East is 90 degrees clockwise from the Plant North axis when viewed from above the plane containing the two axes.,Not necessarily orientated to geographical east.,EPSG,EPSG,2000-06-23 00:00:00,,0
-9919,Plant North,An axis of a local engineering grid 2D or 3D coordinate system.  Plant North is 90 degrees counter-clockwise from the Plant East axis when viewed from above the plane containing the two axes.,Not necessarily orientated to geographical north.,EPSG,EPSG,2000-06-23 00:00:00,,0
-9920,Bin grid I,First axis of seismic bin grid;  positive I is 90 degrees clockwise from positive J-axis when viewed from above the plane containing the two axes.,,EPSG,EPSG,2000-03-07 00:00:00,,0
-9921,Bin grid J,Second axis of seismic bin grid;  positive J is 90 degrees counter-clockwise from positive I-axis when viewed from above the plane containing the two axes.,,EPSG,EPSG,2000-03-07 00:00:00,,0
-9922,Inline,First axis of a seismic bingrid.,"Inline is an ambiguous term, varying by usage.",EPSG,EPSG,2000-03-07 00:00:00,,0
-9923,Crossline,Second axis of a seismic bingrid.,"Crossline is an ambiguous term, varying by usage.",EPSG,EPSG,2000-03-07 00:00:00,,0
-9924,Platform East,An axis of an offshore platform engineering grid 2D or 3D coordinate system.  Platform East is 90 degrees clockwise from the Platform North axis when viewed from above the plane containing the two axes.,Not necessarily orientated to geographical east.,EPSG,EPSG,2000-06-23 00:00:00,,0
-9925,Platform North,An axis of an offshore platform engineering grid 2D or 3D coordinate system.  Platform North is 90 degrees counter-clockwise from the Platform East axis when viewed from above the plane containing the two axes.,Not necessarily orientated to geographical east.,EPSG,EPSG,2000-06-23 00:00:00,,0
-9926,Spherical latitude,"Angle from the equatorial plane to the geocentric point vector, northwards usually treated as positive.",,Open GIS Consortium,EPSG,2002-02-12 00:00:00,,0
-9927,Spherical longitude,"Angle from the prime meridian plane to the meridian plane passing through a point, eastwards usually treated as positive.",,Open GIS Consortium,EPSG,2002-02-12 00:00:00,,0
-9928,Geocentric radius,The distance from the (geocentric) coordinate system origin to a point. The third axis of a spherical coordinate system.,Used to avoid the singularity when the two angles in a 3D polar coordinate system lie in the same plane.,Open GIS Consortium,EPSG,2002-02-12 00:00:00,,0
diff --git a/src/tiff/csv/coordinate_operation.csv b/src/tiff/csv/coordinate_operation.csv
deleted file mode 100644
index d8ca81b..0000000
--- a/src/tiff/csv/coordinate_operation.csv
+++ /dev/null
@@ -1,2020 +0,0 @@
-"COORD_OP_CODE","COORD_OP_NAME","COORD_OP_TYPE","SOURCE_CRS_CODE","TARGET_CRS_CODE","COORD_TFM_VERSION","COORD_OP_VARIANT","AREA_OF_USE_CODE","COORD_OP_SCOPE","COORD_OP_METHOD_CODE","UOM_CODE_SOURCE_OFFSETS","UOM_CODE_TARGET_OFFSETS","REMARKS","INFORMATION_SOURCE","DATA_SOURCE","REVISION_DATE","CHANGE_ID","SHOW_OPERATION","DEPRECATED"
-1025,ED50 to ED87 (1),transformation,4230,4231,5Nat-NSea-90,1,2330,?,9630,9102,9102,Latitude differences from ED50 to ED87 in decimal degrees given by coefficients A0 through A14 where m=(latitude - 55) degrees and n=longitude in decimal degrees.  Longitude differences given through coefficients B0 through B14.,Norwegian Mapping Authority publication 1990:1,EPSG,2002-06-22 00:00:00,99.74  2000.55 2002.40,1,0
-1026,Madrid 1870 (Madrid) to ED50 (1),transformation,4903,4230,IGB-Esp,1,2366,?,9617,,,It is preferable to use whichever of either Madrid 1870 (Madrid) to ED50 (2) (code 1002) or Madrid 1870 (Madrid) to ED50 (3) (code 1003) is applicable to the area.,Institut de Geomatica; Barcelona,EPSG,2000-03-07 00:00:00,99.82  99.74,1,0
-1027,Madrid 1870 (Madrid) to ED50 (2),transformation,4903,4230,IGB-Esp N,2,2367,?,9617,,,Use in preference to Madrid 1870 (Madrid) to ED50 (1) (code 1001).,Institut de Geomatica; Barcelona,EPSG,2000-03-07 00:00:00,99.82  99.74,1,0
-1028,Madrid 1870 (Madrid) to ED50 (3),transformation,4903,4230,IGB-Esp S,3,2368,?,9617,,,Use in preference to Madrid 1870 (Madrid) to ED50 (1) (code 1001).,Institut de Geomatica; Barcelona,EPSG,2000-03-07 00:00:00,99.82  99.74,1,0
-1029,Amersfoort / RD New to ED50 / UTM zone 31N (1),transformation,28992,23031,NCG-Nld,1,1172,?,9632,9001,9001,For reverse transformation see ED50 / UTM 31N to Amersfoort / RD New (1) (code 1030).,"Nederlandse Commissie voor Geodesie publication 30; ""Globale en Lokale Geodetische Systemen""; G. Strang van Hees.",EPSG,2000-03-07 00:00:00,,1,0
-1030,ED50 / UTM zone 31N to Amersfoort / RD New (1),transformation,23031,28992,NCG-Nld,1,1172,?,9632,9001,9001,For reverse transformation see Amersfoort / RD New to ED50 / UTM zone 31 (1) (code 1029).,"Nederlandse Commissie voor Geodesie publication 30; ""Globale en Lokale Geodetische Systemen""; G. Strang van Hees.",EPSG,2000-03-07 00:00:00,,1,0
-1031,Amersfoort / RD New to ED50 / UTM zone 31N (2),transformation,28992,23031,NAM-Nld,2,1172,Oil exploration.,9632,9001,9001,Used by NAM.  For reverse transformation see ED50 / UTM zone 31N to Amersfoort / RD New (2) (code 1032).,Shell / NAM,EPSG,2000-03-07 00:00:00,,1,0
-1032,ED50 / UTM zone 31N to Amersfoort / RD New (2),transformation,23031,28992,NAM-Nld,2,1172,Oil exploration.,9632,9001,9001,Used by NAM.  For reverse transformation see Amersfoort / RD New to ED50 / UTM zone 31 (2) (code 1031).,Shell / NAM,EPSG,2000-03-07 00:00:00,,1,0
-1033,Belge 72 / Lambert to ED50 / UTM zone 31N (1),transformation,31300,23031,NCG-Bel,1,1044,?,9631,9001,9001,For reverse transformation see ED50 / UTM 31N to Belge 72 / Lambert (code 1034).,"Nederlandse Commissie voor Geodesie publication 30; ""Globale en Lokale Geodetische Systemen""; G. Strang van Hees.",EPSG,2000-03-07 00:00:00,,1,0
-1034,ED50 / UTM zone 31N to Belge 72 / Lambert (1),transformation,23031,31300,NCG-Bel,1,1044,?,9631,9001,9001,For reverse transformation see Belge 72 / Lambert to ED50 / UTM 31N (code 1033).,"Nederlandse Commissie voor Geodesie publication 30; ""Globale en Lokale Geodetische Systemen""; G. Strang van Hees.",EPSG,2000-03-07 00:00:00,,1,0
-1035,Astra Minas to Campo Inchauspe / Argentina 2,transformation,5800,22192,IHS-Arg ComRiv,1,1265,Oil exploration.,9621,,,,IHS Energy,EPSG,2000-06-23 00:00:00,,1,0
-1036,OSGB 1936 / British National Grid to ETRS89 (1),transformation,27700,4258,OSGB-Gbr,1,1264,Accuracy 0.2m at 67% confidence level.,9633,,,May be taken as approximate transformation OSGB 1936 / British National Grid to WGS 84 - see code 1681.,http://www.gps.gov.uk/gpssurveying.asp,EPSG,2000-10-19 00:00:00,,1,0
-1037,Amersfoort / RD New to ED50 / TM 5 NE (1),transformation,28992,23095,NAM-Nld,1,1630,Oil exploration.,9632,9001,9001,Used by NAM.  For reverse transformation see ED50 / TM 5 NE to Amersfoort / RD New (1) (code 1038).,Shell / NAM,EPSG,2002-07-13 00:00:00,,1,0
-1038,ED50 / TM 5 NE to Amersfoort / RD New (1),transformation,23095,28992,NAM-Nld,2,1630,Oil exploration.,9632,9001,9001,Used by NAM.  For reverse transformation see Amersfoort / RD New to ED50 / TM 5 NE (1) (code 1037).,Shell / NAM,EPSG,2002-07-13 00:00:00,,1,0
-1100,Adindan to WGS 84 (1),transformation,4201,4326,DMA-Eth Sud,1,1271,For military purposes only. Accuracy 5m in each axis.,9603,,,Derived at 22 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1101,Adindan to WGS 84 (2),transformation,4201,4326,DMA-Bfa,2,1057,For military purposes.  Accuracy 25m in each axis.,9603,,,"Derived at 1 station connected to the Adindan network through the 1968-69 12th parallel traverse. Note: Adindan datum is used in Ethiopia and Sudan, not Burkino Faso.",U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,2002-06-22 00:00:00,2002.38,1,0
-1102,Adindan to WGS 84 (3),transformation,4201,4326,DMA-Cmr,3,1060,For military purposes.  Accuracy 25m in each axis.,9603,,,"Derived at 1 station connected to the Adindan network through the 1968-69 12th parallel traverse. Note: Adindan datum is used in Ethiopia and Sudan, not Cameroon.",U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,2002-06-22 00:00:00,2002.38,1,0
-1103,Adindan to WGS 84 (4),transformation,4201,4326,DMA-Eth,4,1091,For military purposes.  Accuracy 3m in each axis.,9603,,,Derived at 8 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1104,Adindan to WGS 84 (5),transformation,4201,4326,DMA-Mli,5,1153,For military purposes.  Accuracy 25m in each axis.,9603,,,"Derived at 1 station connected to the Adindan network through the 1968-69 12th parallel traverse. Note: Adindan datum is used in Ethiopia and Sudan, not Mali.",U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,2002-06-22 00:00:00,2002.38,1,0
-1105,Adindan to WGS 84 (6),transformation,4201,4326,DMA-Sen,6,1207,For military purposes.  Accuracy 25m in each axis.,9603,,,"Derived at 2 stations connected to the Adindan network through the 1968-69 12th parallel traverse. Note: Adindan datum is used in Ethiopia and Sudan, not Senegal.",U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,2002-06-22 00:00:00,2002.38,1,0
-1106,Adindan to WGS 84 (7),transformation,4201,4326,DMA-Sud,7,1221,"For military purposes.  Accuracy 3m, 5m and 3m in X, Y and Z axes.",9603,,,Derived at 14 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1107,Afgooye to WGS 84 (1),transformation,4205,4326,DMA-Som,1,1214,For military purposes.  Accuracy 25m in each axis.,9603,,,Derived at 1 station.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1108,AGD66 to WGS 84 (1),transformation,4202,4326,DMA-Aus,1,1036,For military purposes only.  Accuracy 3m in each axis.,9603,,,Derived at 105 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1109,AGD84 to WGS 84 (1),transformation,4203,4326,DMA-Aus,1,1036,For military purposes only.  Accuracy 2m in each axis.,9603,,,Derived at 90 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1110,Ain el Abd to WGS 84 (1),transformation,4204,4326,DMA-Bhr,1,1040,For military purposes.  Accuracy 25m in each axis.,9603,,,Derived at 2 stations.,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,1997-04-11 00:00:00,97.06,1,0
-1111,Ain el Abd to WGS 84 (2),transformation,4204,4326,DMA-Sau,2,1206,For military purposes.  Accuracy 10m in each axis.,9603,,,Derived at 9 stations.,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,1996-10-18 00:00:00,,1,0
-1112,Amersfoort to WGS 84 (1),transformation,4289,4326,NCG-Nld 93,1,1172,?,9606,,,Superseded by Amersfoort to ETRS89 (2) (code 1751) and Amersfoort to WGS 84 (2) (code 1672).,Nederlandse Commissie voor Geodesie publication 30; 1993.,EPSG,1997-04-11 00:00:00,97.07,1,0
-1113,Arc 1950 to WGS 84 (1),transformation,4209,4326,DMA-mean,1,2312,"For military purposes only.  Accuracy 20m, 33m and 20m in X, Y and Z axes.",9603,,,Derived at 41 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1114,Arc 1950 to WGS 84 (2),transformation,4209,4326,DMA-Bwa,2,1051,"For military purposes.  Accuracy 3m, 5m and 3m in X, Y and Z axes.",9603,,,Derived at 9 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1115,Arc 1950 to WGS 84 (3),transformation,4209,4326,DMA-Bdi,3,1058,For military purposes.  Accuracy 20m in each axis.,9603,,,Derived at 3 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1116,Arc 1950 to WGS 84 (4),transformation,4209,4326,DMA-Lso,4,1141,"For military purposes.  Accuracy 3m, 3m and 8m in X, Y and Z axes.",9603,,,Derived at 5 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1117,Arc 1950 to WGS 84 (5),transformation,4209,4326,DMA-Mwi,5,1150,"For military purposes.  Accuracy 9m, 24m and 8m in X, Y and Z axes.",9603,,,Derived at 6 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1118,Arc 1950 to WGS 84 (6),transformation,4209,4326,DMA-Swz,6,1224,For military purposes.  Accuracy 15m in each axis.,9603,,,Derived at 4 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1119,Arc 1950 to WGS 84 (7),transformation,4209,4326,DMA-Cod,7,1259,For military purposes.  Accuracy 25m in each axis.,9603,,,Derived at 2 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1120,Arc 1950 to WGS 84 (8),transformation,4209,4326,DMA-Zmb,8,1260,"For military purposes.  Accuracy 21m, 21m and 27m in X, Y and Z axes.",9603,,,Derived at 5 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1121,Arc 1950 to WGS 84 (9),transformation,4209,4326,DMA-Zwe,9,1261,"For military purposes.  Accuracy 5m, 8m and 11m in X, Y and Z axes.",9603,,,Derived at 10 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1122,Arc 1960 to WGS 84 (1),transformation,4210,4326,DMA-Ken Tza,1,2311,For military purposes only.  Accuracy 20m in each axis.,9603,,,Derived at 25 stations.,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,1996-10-18 00:00:00,,1,0
-1123,Batavia to WGS 84 (1),transformation,4211,4326,DMA-Idn Sumatra,1,1355,For military purposes.  Accuracy 3m in each axis.,9603,,,Note: The area of use cited for this transformation (Sumatra) is not consistent with the area of use (Java) for the Batavia (Genuk) coordinate system. Derived at 5 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1124,Bermuda 1957 to WGS 84 (1),transformation,4216,4326,DMA-Bmu,1,1047,For military purposes.  Accuracy 20m in each axis.,9603,,,Derived at 3 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1125,Bogota 1975 to WGS 84 (1),transformation,4218,4326,DMA-Col,1,1070,"For military purposes.  Accuracy 6m, 5m and 6m in X, Y and Z axes.",9603,,,Derived in 1987 at 7 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1126,Bukit Rimpah to WGS 84 (1),transformation,4219,4326,DMA-Idn BBI,1,1287,For military purposes.,9603,,,Accuracy estimates unavailable.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,2002-06-22 00:00:00,2002.151,1,0
-1127,Campo Inchauspe to WGS 84 (1),transformation,4221,4326,DMA-Arg,1,1033,For military purposes.  Accuracy 5m in each axis.,9603,,,Derived at 20 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1128,Cape to WGS 84 (1),transformation,4222,4326,DMA-Zaf,1,1215,"For military purposes.  Accuracy 3m, 6m and 6m in X, Y and Z axes.",9603,,,Derived at 5 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1129,Cape to WGS 84 (2),transformation,4222,4326,DSLI-Zaf,2,1215,?,9603,,,Parameter values are from Cape to Hartebeesthoek94 (1) (code 1504) assuming that Hartebeesthoek94 and WGS 84 are equivalent within the accuracy of the transformation.,"Private Communication, Directorate of Surveys and Land Information, Cape Town.",EPSG,1996-10-18 00:00:00,,1,0
-1130,Carthage to WGS 84 (1),transformation,4223,4326,DMA-Tun,1,1236,"For military purposes.  Accuracy 6m, 9m and 8m in X, Y and Z axes.",9603,,,Derived at 5 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1131,Chua to WGS 84 (1),transformation,4224,4326,DMA-Pry,1,1188,"For military purposes.  Accuracy 6m, 9m and 5m in X, Y and Z axes.",9603,,,Derived at 6 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1132,Corrego Alegre to WGS 84 (1),transformation,4225,4326,DMA-Bra,1,1053,"For military purposes.  Accuracy 5m, 3m and 5m in X, Y and Z axes.",9603,,,Derived at 17 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1133,ED50 to WGS 84 (1),transformation,4230,4326,DMA-mean,1,2420,"For military purposes only.  Accuracy 3m, 8m and 5m in X, Y and Z axes.",9603,,,Derived at 85 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,97.02,1,0
-1134,ED50 to WGS 84 (2),transformation,4230,4326,DMA-cenEur,2,2421,For military purposes only.  Accuracy 3m each axis.,9603,,,Derived at 52 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1135,ED50 to WGS 84 (3),transformation,4230,4326,DMA-midEast,3,2345,For military purposes only.,9603,,,Accuracy estimate not available.,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,1996-10-18 00:00:00,,1,0
-1136,ED50 to WGS 84 (4),transformation,4230,4326,DMA-Cyp,4,1078,For military purposes only.  Accuracy 15m in each axis.,9603,,,Derived at 4 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1137,ED50 to WGS 84 (5),transformation,4230,4326,DMA-Egy,5,1086,"For military purposes.  Accuracy 6m, 8m and 8m in X, Y and Z axes.",9603,,,Derived at 14 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1138,ED50 to WGS 84 (6),transformation,4230,4326,DMA-Irl Gbr,6,2343,For military purposes only.  Accuracy 3m in each axis.,9603,,,Derived at 40 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1139,ED50 to WGS 84 (7),transformation,4230,4326,DMA-Fin Nor,7,2344,"For military purposes.  Accuracy 3m, 5m and 3m in X, Y and Z axes.",9603,,,Derived at 20 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1140,ED50 to WGS 84 (8),transformation,4230,4326,DMA-Grc,8,1106,For military purposes only.  Accuracy 25m in each axis.,9603,,,Derived at 2 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1141,ED50(ED77) to WGS 84 (2),transformation,4154,4326,DMA-Irn,2,1123,"For military purposes.  Accuracy 9m, 12m and 11m in X, Y and Z axes.",9603,,,Given by DMA as from ED50.  EPSG interpret that as ED50(ED77) in Iran. Derived at 27 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,2000-03-07 00:00:00,2000.06,1,0
-1142,ED50 to WGS 84 (10),transformation,4230,4326,DMA-Ita Sard,10,2339,For military purposes only.  Accuracy 25m in each axis.,9603,,,Derived at 2 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1143,ED50 to WGS 84 (11),transformation,4230,4326,DMA-Ita Sic,11,2340,For military purposes only.  Accuracy 20m in each axis.,9603,,,Derived at 3 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1144,ED50 to WGS 84 (12),transformation,4230,4326,DMA-Mlt,12,1154,For military purposes only.  Accuracy 25m in each axis.,9603,,,Derived at 1 station.,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,1996-10-18 00:00:00,,1,0
-1145,ED50 to WGS 84 (13),transformation,4230,4326,DMA-Prt Esp,13,2338,"For military purposes only.  Accuracy 5m, 6m and 3m in X, Y and Z axes.",9603,,,Derived at 18 stations.,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,1996-10-18 00:00:00,,1,0
-1146,ED87 to WGS 84 (1),transformation,4231,4326,5Nat-NSea-90,1,2330,?,9606,,,,"Norwegian Mapping Authority publication 1990:1 and note of 13-Feb-1991 ""Om Transformasjon mellom Geodetiske Datum i Norge""",EPSG,1997-04-11 00:00:00,97.03  97.04,1,0
-1147,ED50 to ED87 (2),transformation,4230,4231,NMA-Nor N65,2,2331,Geodetic purposes.,9606,,,,"Norwegian Mapping Authority note of 13-Feb-1991 ""Om Transformasjon mellom Geodetiske Datum i Norge""",EPSG,1997-04-11 00:00:00,97.04,1,0
-1148,Egypt 1907 to WGS 84 (1),transformation,4229,4326,DMA-Egy,1,1086,"For military purposes.  Accuracy 3m, 6m and 8m in X, Y and Z axes.",9603,,,Derived at 14 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1149,ETRS89 to WGS 84 (1),transformation,4258,4326,EPSG-eur,1,2420,ETRS89 is a realisation of WGS 84 coincident to within 1.5 metres.  This transformation has an accuracy equal to the coincidence figure.,9603,,,,EPSG,EPSG,2000-10-19 00:00:00,97.24  2000.72,1,0
-1150,GDA94 to WGS 84 (1),transformation,4283,4326,EPSG-Aus,1,1036,GDA94 is a realisation of WGS 84 coincident to within 1.5 metres.  This transformation has an accuracy equal to the coincidence figure.,9603,,,,EPSG,EPSG,1996-10-18 00:00:00,,1,0
-1151,NZGD49 to WGS 84 (1),transformation,4272,4326,DMA-Nzl,1,1175,"For military purposes only.  Accuracy 5m, 3m and 5m in X, Y and Z axes.",9603,,,Derived at 14 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1152,Hu Tzu Shan to WGS 84 (1),transformation,4236,4326,DMA-Twn,1,1228,For military purposes.  Accuracy 15m in each axis.,9603,,,Derived at 4 stations.,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,1996-10-18 00:00:00,,1,0
-1153,Indian 1954 to WGS 84 (1),transformation,4239,4326,DMA-Tha,1,1231,"For military purposes.  Accuracy 15m, 6m and 12m in X, Y and Z axes.",9603,,,Derived at 11 stations.,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,1997-04-11 00:00:00,97.06,1,0
-1154,Indian 1975 to WGS 84 (1),transformation,4240,4326,DMA-Tha,1,1231,"For military purposes.  Accuracy 3m, 2m and 3m in X, Y and Z axes.",9603,,,Derived at 62 stations.,U.S. Defense Mapping Agency  TR8350.2 second edition September 1991,EPSG,1996-10-18 00:00:00,,1,0
-1155,Kalianpur 1937 to WGS 84 (1),transformation,4144,4326,DMA-Bgd,1,1041,"For military purposes.  Accuracy 10m, 8m and 12m in X, Y and Z axes.",9603,,,Derived at 6 stations.,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,1999-10-20 00:00:00,97.235,1,0
-1156,Kalianpur 1975 to WGS 84 (1),transformation,4146,4326,DMA-Ind Npl,1,2411,"For military purposes.  Accuracy 12m, 10m and 15m in X, Y and Z axes.",9603,,,Care!  DMA ellipsoid is inconsistent with EPSG ellipsoid - transformation parameter values may not be appropriate. Derived at 7 stations.,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,1999-10-20 00:00:00,97.235,1,0
-1157,Kandawala to WGS 84 (1),transformation,4244,4326,DMA-Lka,1,1218,For military purposes.  Accuracy 20m in each axis.,9603,,,Derived at 3 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1158,Kertau to WGS 84 (1),transformation,4245,4326,DMA-Mys Sgp,1,1309,"For military purposes.  Accuracy 10m, 8m and 6m in X, Y and Z axes.",9603,,,Derived at 6 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1159,Leigon to WGS 84 (1),transformation,4250,4326,DMA-Gha,1,1104,"For military purposes.  Accuracy 2m, 3m and 2m in X, Y and Z axes.",9603,,,Derived at 8 stations.,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,1996-10-18 00:00:00,,1,0
-1160,Liberia 1964 to WGS 84 (1),transformation,4251,4326,DMA-Lbr,1,1142,For military purposes only.  Accuracy 15m in each axis.,9603,,,Derived at 4 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1161,Luzon 1911 to WGS 84 (1),transformation,4253,4326,DMA-Phl N,1,2364,"For military purposes.  Accuracy 8m, 11m and 9m in X, Y and Z axes.",9603,,,Derived at 6 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1162,Luzon 1911 to WGS 84 (2),transformation,4253,4326,DMA-Phl Min,2,2365,For military purposes.  Accuracy 25m in each axis.,9603,,,Derived at 1 station.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1163,M'poraloko to WGS 84 (1),transformation,4266,4326,DMA-Gab,1,1100,For military purposes only.  Accuracy 25m in each axis.,9603,,,Derived at 1 station.,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,1996-10-18 00:00:00,,1,0
-1164,Mahe 1971 to WGS 84 (1),transformation,4256,4326,DMA-Syc,1,2369,For military purposes.  Accuracy 25m in each axis.,9603,,,Derived at 1 station.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1165,Massawa to WGS 84 (1),transformation,4262,4326,DMA-Eth,1,1089,For military purposes only.  Accuracy 25m in each axis.,9603,,,Derived at 1 station.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1166,Merchich to WGS 84 (1),transformation,4261,4326,DMA-Mar,1,1166,"For military purposes.  Accuracy 5m, 3m and 3m in X, Y and Z axes.",9603,,,Derived at 9 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1167,Minna to WGS 84 (1),transformation,4263,4326,DMA-Cmr,1,1060,For military purposes only.  Accuracy 25m in each axis.,9603,,,"Derived at 2 stations.  Note: Minna is used in Nigeria, not Cameroon.",U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,1996-10-18 00:00:00,,1,0
-1168,Minna to WGS 84 (2),transformation,4263,4326,DMA-Nga,2,1178,"For military purposes.  Accuracy 3m, 6m and 5m in X, Y and Z axes.",9603,,,Derived at 6 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1169,Monte Mario to WGS 84 (1),transformation,4265,4326,DMA-Ita Sar,1,2339,For military purposes.  Accuracy 25m in each axis.,9603,,,Derived at 1 station.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1170,NAD27 to WGS 84 (1),transformation,4267,4326,DMA-Carib,1,2418,"For military purposes.  Accuracy 3m, 9m and 12m in X, Y and Z axes.",9603,,,Derived at 15 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1171,NAD27 to WGS 84 (2),transformation,4267,4326,DMA-Cen Am,2,2419,"For military purposes only.  Accuracy 8m, 3m and 5m in X, Y and Z axes.",9603,,,Derived at 19 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1172,NAD27 to WGS 84 (3),transformation,4267,4326,DMA-Can,3,1061,"For military purposes only.  Accuracy 15m, 11m and 6m in X, Y and Z axes.",9603,,,Derived at 112 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1173,NAD27 to WGS 84 (4),transformation,4267,4326,DMA-Conus,4,1323,"For military purposes only.  Accuracy 5m, 5m and 6m in X, Y and Z axes.",9603,,,Derived at 405 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1174,NAD27 to WGS 84 (5),transformation,4267,4326,DMA-ConusE,5,2389,"For military purposes only.  Accuracy 5m, 5m and 8m in X, Y and Z axes.",9603,,,Derived at 129 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1175,NAD27 to WGS 84 (6),transformation,4267,4326,DMA-ConusW,6,2390,"For military purposes only.  Accuracy 5m, 3m and 3m in X, Y and Z axes.",9603,,,Derived at 276 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1176,NAD27 to WGS 84 (7),transformation,4267,4326,DMA-USA AK,7,2412,"For military purposes only.  Accuracy 5m, 9m and 5m in X, Y and Z axes.",9603,,,Derived at 47 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1177,NAD27 to WGS 84 (8),transformation,4267,4326,DMA-Bha xSalv,8,2413,"For military purposes.  Accuracy 5m, 3m and 5m in X, Y and Z axes.",9603,,,Derived at 11 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1178,NAD27 to WGS 84 (9),transformation,4267,4326,DMA-Bha Salv,9,2414,For military purposes.  Accuracy 25m in each axis.,9603,,,Derived at 1 station.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1179,NAD27 to WGS 84 (10),transformation,4267,4326,DMA-Can AB BC,10,2384,"For military purposes only.  Accuracy 8m, 8m and 6m in X, Y and Z axes.",9603,,,Derived at 25 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1180,NAD27 to WGS 84 (11),transformation,4267,4326,DMA-Can MN ON,11,2415,"For military purposes only.  Accuracy 9m, 5m and 5m in X, Y and Z axes.",9603,,,Derived at 25 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1181,NAD27 to WGS 84 (12),transformation,4267,4326,DMA-Can E,12,2416,"For military purposes only.  Accuracy 6m, 6m and 3m in X, Y and Z axes.",9603,,,Derived at 37 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1182,NAD27 to WGS 84 (13),transformation,4267,4326,DMA-Can NWT,13,2410,"For military purposes only.  Accuracy 5m, 5m and 3m in X, Y and Z axes.",9603,,,Derived at 17 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1183,NAD27 to WGS 84 (14),transformation,4267,4326,DMA-Can Yuk,14,2417,"For military purposes only.  Accuracy 5m, 8m and 3m in X, Y and Z axes.",9603,,,Derived at 8 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1184,NAD27 to WGS 84 (15),transformation,4267,4326,DMA-Pan,15,2385,For military purposes.  Accuracy 20m in each axis.,9603,,,Derived at 3 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1185,NAD27 to WGS 84 (16),transformation,4267,4326,DMA-Cuba,16,1077,For military purposes.  Accuracy 25m in each axis.,9603,,,Derived at 1 station.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1186,NAD27 to WGS 84 (17),transformation,4267,4326,DMA-Grl,17,2386,For military purposes.  Accuracy 25m in each axis.,9603,,,Derived at 2 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1187,NAD27 to WGS 84 (18),transformation,4267,4326,DMA-Mex,18,1160,"For military purposes only.  Accuracy 8m, 6m and 6m in X, Y and Z axes.",9603,,,Derived at 22 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1188,NAD83 to WGS 84 (1),transformation,4269,4326,DMA-N Am,1,1325,Accuracy 2m in each axis.,9603,,,Derived at 312 stations.,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,1996-10-18 00:00:00,97.06,1,0
-1189,Nahrwan 1967 to WGS 84 (1),transformation,4270,4326,DMA-Omn Mas,1,2391,For military purposes.  Accuracy 25m in each axis.,9603,,,Derived at 2 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1190,Nahrwan 1967 to WGS 84 (2),transformation,4270,4326,DMA-Sau,2,1206,For military purposes.  Accuracy 20m in each axis.,9603,,,Derived at 3 stations.,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,1996-10-18 00:00:00,,1,0
-1191,Nahrwan 1967 to WGS 84 (3),transformation,4270,4326,DMA-UAE,3,1243,For military purposes.  Accuracy 25m in each axis.,9603,,,Derived at 2 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1192,Naparima 1972 to WGS 84 (1),transformation,4271,4326,DMA-Tto,1,1235,For military purposes only.,9603,,,CAUTION: EPSG believes that these parameter values include a blunder and that if NIMA transformation parameters are to be used the 1987 version (EPSG code 1307) be used.,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,1998-06-30 00:00:00,98.102,1,0
-1193,NTF to WGS 84 (1),transformation,4275,4326,IGN-Fra,1,1096,For applications to an accuracy of 2 metres.,9603,,,,IGN technical report RT/G 14; January 1988.,EPSG,1996-10-18 00:00:00,,1,0
-1195,OSGB 1936 to WGS 84 (1),transformation,4277,4326,DMA-Gbr,1,1264,"For military purposes only.  Accuracy 10m, 10m and 15m in X, Y and Z axes.",9603,,,Derived at 38 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1196,OSGB 1936 to WGS 84 (2),transformation,4277,4326,DMA-Gbr Eng,2,2395,"For military purposes only.  Accuracy 5m, 5m and 6m in X, Y and Z axes.",9603,,,Derived at 24 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1197,OSGB 1936 to WGS 84 (3),transformation,4277,4326,DMA-Gbr E&W,3,2396,"For military purposes only.  Accuracy 10m, 10m and 15m in X, Y and Z axes.",9603,,,Derived at 25 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1198,OSGB 1936 to WGS 84 (4),transformation,4277,4326,DMA-Gbr Sco,4,2397,For military purposes only.  Accuracy 10m in each axis.,9603,,,Derived at 13 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1199,OSGB 1936 to WGS 84 (5),transformation,4277,4326,DMA-Gbr Wal,5,2398,For military purposes only.  Accuracy 20m in each axis.,9603,,,Derived at 3 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1200,Pointe Noire to WGS 84 (1),transformation,4282,4326,DMA-Cog,1,1072,For military purposes only.  Accuracy 25m in each axis.,9603,,,Derived at 1 station.,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,1996-10-18 00:00:00,,1,0
-1201,PSAD56 to WGS 84 (1),transformation,4248,4326,DMA-mean,1,2399,"For military purposes only.  Accuracy 17m, 27m and 27m in X, Y and Z axes.",9603,,,Derived at 63 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1202,PSAD56 to WGS 84 (2),transformation,4248,4326,DMA-Bol,2,1049,"For military purposes only.  Accuracy 5m, 11m and 14m in X, Y and Z axes.",9603,,,Derived at 5 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1203,PSAD56 to WGS 84 (3),transformation,4248,4326,DMA-Chl N,3,2402,For military purposes.  Accuracy 25m in each axis.,9603,,,Derived at 1 station.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1204,PSAD56 to WGS 84 (4),transformation,4248,4326,DMA-Chl S,4,2403,For military purposes.  Accuracy 20m in each axis.,9603,,,Derived at 3 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1205,PSAD56 to WGS 84 (5),transformation,4248,4326,DMA-Col,5,1070,For military purposes.  Accuracy 15m in each axis.,9603,,,Derived at 4 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1206,PSAD56 to WGS 84 (6),transformation,4248,4326,DMA-Ecu,6,1085,"For military purposes.  Accuracy 3m, 5m and 3m in X, Y and Z axes.",9603,,,Derived at 11 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1207,PSAD56 to WGS 84 (7),transformation,4248,4326,DMA-Guy,7,1114,"For military purposes.  Accuracy 6m, 14m and 5m in X, Y and Z axes.",9603,,,Derived at 9 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1208,PSAD56 to WGS 84 (8),transformation,4248,4326,DMA-Per,8,1189,"For military purposes only.  Accuracy 6m, 8m and 12m in X, Y and Z axes.",9603,,,Derived at 6 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1209,PSAD56 to WGS 84 (9),transformation,4248,4326,DMA-Ven,9,1251,"For military purposes only.  Accuracy 9m, 14m and 15m in X, Y and Z axes.",9603,,,Derived at 24 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1211,Qornoq to WGS 84 (1),transformation,4287,4326,DMA-Grl S,1,2407,"For military purposes.  Accuracy 25m, 25m and 32m in X, Y and Z axes.",9603,,,Derived at 2 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,1
-1212,SAD69 to WGS 84 (1),transformation,4291,4326,DMA-mean,1,1341,"For military purposes only.  Accuracy 15m, 6m and 9m in X, Y and Z axes.",9603,,,Derived at 84 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1213,SAD69 to WGS 84 (2),transformation,4291,4326,DMA-Arg,2,1033,For military purposes only.  Accuracy 5m in each axis.,9603,,,Derived at 10 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1214,SAD69 to WGS 84 (3),transformation,4291,4326,DMA-Bol,3,1049,For military purposes.  Accuracy 15m in each axis.,9603,,,Derived at 4 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1215,SAD69 to WGS 84 (4),transformation,4291,4326,DMA-Bra,4,1053,"For military purposes only.  Accuracy 3m, 5m and 5m in X, Y and Z axes.",9603,,,Derived at 22 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1216,SAD69 to WGS 84 (5),transformation,4291,4326,DMA-Chile,5,1066,"For military purposes only.  Accuracy 15m, 8m and 11m in X, Y and Z axes.",9603,,,Derived at 9 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1217,SAD69 to WGS 84 (6),transformation,4291,4326,DMA-Col,6,1070,"For military purposes only.  Accuracy 6m, 6m and 5m in X, Y and Z axes.",9603,,,Derived at 7 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1218,SAD69 to WGS 84 (7),transformation,4291,4326,DMA-Ecu,7,1085,For military purposes.  Accuracy 3m in each axis.,9603,,,Derived at 11 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1219,SAD69 to WGS 84 (8),transformation,4291,4326,DMA-Ecu Gal,8,2356,For military purposes.  Accuracy 25m in each axis.,9603,,,Derived at 1 station.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1220,SAD69 to WGS 84 (9),transformation,4291,4326,DMA-Guy,9,1114,"For military purposes only.  Accuracy 9m, 5m and 5m in X, Y and Z axes.",9603,,,Derived at 5 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1221,SAD69 to WGS 84 (10),transformation,4291,4326,DMA-Pgy,10,1188,For military purposes.  Accuracy 15m in each axis.,9603,,,Derived at 4 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1222,SAD69 to WGS 84 (11),transformation,4291,4326,DMA-Peru,11,1189,For military purposes.  Accuracy 5m in each axis.,9603,,,Derived at 6 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1223,SAD69 to WGS 84 (12),transformation,4291,4326,DMA-Tto,12,1235,For military purposes only.  Accuracy 25m in each axis.,9603,,,Derived at 1 station.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1224,SAD69 to WGS 84 (13),transformation,4291,4326,DMA-Ven,13,1251,"For military purposes only.  Accuracy 3m, 6m and 3m in X, Y and Z axes.",9603,,,Derived at 5 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1225,Sapper Hill 1943 to WGS 84 (1),transformation,4292,4326,DMA-Flk E,1,2355,For military purposes.  Accuracy 1m in each axis.,9603,,,Derived at 5 stations.,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,1996-10-18 00:00:00,,1,0
-1226,Schwarzeck to WGS 84 (1),transformation,4293,4326,DMA-Nam,1,1169,For military purposes only.  Accuracy 20m in each axis.,9603,,,Derived at 3 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1227,Tananarive to WGS 84 (1),transformation,4297,4326,DMA-Mdg,1,1149,For military purposes.,9603,,,Accuracy estimate not available.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1228,Timbalai 1948 to WGS 84 (1),transformation,4298,4326,DMA-Borneo,1,1362,"For military purposes.  Accuracy 10m, 10m and 12m in X, Y and Z axes.",9603,,,Derived at 8 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1229,TM65 to WGS 84 (1),transformation,4299,4326,DMA-Ire,1,1305,For military purposes only.  Accuracy 3m in each axis.,9603,,,Derived at 7 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1230,Tokyo to WGS 84 (1),transformation,4301,4326,DMA-Jpn Kor,1,2409,"For military purposes only.  Accuracy 20m, 5m and 20m in X, Y and Z axes.",9603,,,Derived at 31 stations.,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,1996-10-18 00:00:00,97.06,1,0
-1231,Tokyo to WGS 84 (2),transformation,4301,4326,DMA-Jpn,2,1129,"For military purposes only.  Accuracy 8m, 5m and 8m in X, Y and Z axes.",9603,,,Derived at 16 stations.,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,1996-10-18 00:00:00,,1,0
-1232,Tokyo to WGS 84 (3),transformation,4301,4326,DMA-Kor,3,1135,For military purposes only.  Accuracy 2m in each axis.,9603,,,Derived at 29 stations.,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,1996-10-18 00:00:00,97.06,1,0
-1233,Tokyo to WGS 84 (4),transformation,4301,4326,DMA-Jpn Ok,4,2408,"For military purposes only.  Accuracy 20m, 5m and 20m in X, Y and Z axes.",9603,,,Derived at 3 stations.,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,1996-10-18 00:00:00,,1,0
-1234,Yacare to WGS 84 (1),transformation,4309,4326,DMA-Ury,1,1247,For military purposes.,9603,,,Accuracy estimate not available.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1235,Zanderij to WGS 84 (1),transformation,4311,4326,DMA-Sur,1,1222,"For military purposes.  Accuracy 5m, 5m and 8m in X, Y and Z axes.",9603,,,Derived at 5 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1996-10-18 00:00:00,,1,0
-1236,AGD84 to WGS 84 (2),transformation,4203,4326,Auslig-Aus old,2,1036,Preliminary estimate - now superseded.,9607,,,"""Higgins parameters"". Superseded by AGD84 to GDA94 (2) (code 1280) and AGD84 to WGS 84 (7) (code 1669).",Australian Surveying and Land Information Group - www.auslig.gov.au/geodesy,EPSG,1997-11-13 00:00:00,,1,0
-1237,WGS 72 to WGS 84 (1),transformation,4322,4326,DMA1,1,1262,For scientific purposes.,9606,,,,,EPSG,1996-12-12 00:00:00,,1,0
-1238,WGS 72 to WGS 84 (2),transformation,4322,4326,DMA2,2,1262,For scientific purposes.,9606,,,,,EPSG,1996-12-12 00:00:00,,1,0
-1239,WGS 72BE to WGS 72 (1),transformation,4324,4322,DMA,1,1262,Geodesy.,9606,,,,,EPSG,1996-12-12 00:00:00,,1,0
-1240,WGS 72BE to WGS 84 (1),transformation,4324,4326,DMA,1,2346,Geodesy.,9606,,,,,EPSG,1996-12-12 00:00:00,,1,0
-1241,NAD27 to NAD83 (1),transformation,4267,4269,NGS-Usa Conus,1,2374,"Accuracy at 67% confidence level is 0.15m onshore, 5m nearshore and undetermined farther offshore.",9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRS NAD27 (code 4267) and NAD83 (code 4269) have longitudes positive east.,US Coast & Geodetic Survey  www.ngs.noaa.gov,EPSG,2000-03-07 00:00:00,98.201  98.53  2000.14,1,0
-1243,NAD27 to NAD83 (2),transformation,4267,4269,NGS-Usa AK,2,2373,"Accuracy at 67% confidence level is 0.5m onshore, 5m nearshore and undetermined farther offshore.",9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRS NAD27 (code 4267) and NAD83 (code 4269) have longitudes positive east.,US Coast & Geodetic Survey  www.ngs.noaa.gov,EPSG,2000-03-07 00:00:00,98.201  98.53  2000.14,1,0
-1245,ED50 to WGS 84 (16),transformation,4230,4326,DMA-Tun,16,1236,For military purposes only.  Accuracy 25m in each axis.,9603,,,Derived at 4 stations.,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,1998-04-16 00:00:00,98.11,1,0
-1246,Herat North to WGS 84 (1),transformation,4255,4326,DMA-Afg,1,1024,For military purposes only.,9603,,,No accuracy estimate available.,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,1997-04-11 00:00:00,,1,0
-1247,Kalianpur 1962 to WGS 84 (1),transformation,4145,4326,DMA-Pak,1,1184,For military purposes.,9603,,,Care!  DMA ellipsoid is inconsistent with EPSG ellipsoid - transformation parameter values may not be appropriate.  No accuracy estimate available.,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,1999-10-20 00:00:00,97.235,1,0
-1248,ID74 to WGS 84 (1),transformation,4238,4326,DMA-Idn,1,1122,For military purposes.  Accuracy 25m in each axis.,9603,,,Derived at 1 station.,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,2002-06-22 00:00:00,2002.151,1,0
-1249,NAD27 to WGS 84 (21),transformation,4267,4326,DMA-AK AluE,21,2387,"For military purposes only.  Accuracy 6m, 8m and 10m in X, Y and Z axes.",9603,,,Derived at 6 stations.,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,1997-04-11 00:00:00,,1,0
-1250,NAD27 to WGS 84 (22),transformation,4267,4326,DMA-AK AluW,22,2388,For military purposes.  Accuracy 10m in each axis.,9603,,,Derived at 5 stations.,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,1997-04-11 00:00:00,,1,0
-1251,NAD83 to WGS 84 (2),transformation,4269,4326,DMA-AK Alu,2,2157,"For military purposes only.  Accuracy 5m, 2m and 5m in X, Y and Z axes.",9603,,,Derived at 42 stations.,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,1997-04-11 00:00:00,,1,0
-1252,NAD83 to WGS 84 (3),transformation,4269,4326,DMA-USA Hi,3,1334,For military purposes only.  Accuracy 2m in each axis.,9603,,,Derived at 6 stations.,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,1997-04-11 00:00:00,,1,0
-1253,Nord Sahara 1959 to WGS 84 (1),transformation,4307,4326,DMA-Alg,1,1026,For military purposes only.  Accuracy 25m in each axis.,9603,,,Derived at 3 stations.,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,1997-04-11 00:00:00,,1,0
-1254,Pulkovo 1942 to WGS 84 (1),transformation,4284,4326,DMA-Rus,1,1198,For military purposes.,9603,,,Accuracy estimate not available.,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,1997-04-11 00:00:00,,1,0
-1255,Nord Sahara 1959 to WGS 84 (2),transformation,4307,4326,DMA-Dza N,2,1365,For military purposes only.  Accuracy 25m in each axis.,9603,,,CAUTION:  Source CRS described by DMA as from Voirol 1960. EPSG believes that the data used in the derivation of these parameters contains a blunder.  We recommend using transformation North Sahara 1959 to WGS84 (1) (code 1253). Derived at 2 stations.,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,2000-06-23 00:00:00,98.15  2000.47,1,0
-1256,Fahud to WGS 84 (1),transformation,4232,4326,DMA-Omn,1,1183,"For military purposes.  Accuracy 3m, 3m and 9m in X, Y and Z axes.",9603,,,"Derived at 7 stations. Source CRS  in information source is called ""Oman"".",U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,1997-04-11 00:00:00,,1,0
-1258,Bogota 1975 (Bogota) to Bogota 1975 (Greenwich),transformation,4802,4218,IGAC-Col,1,1070,Change of prime meridian.,9601,,,,EPSG,EPSG,1999-11-12 00:00:00,99.79,1,1
-1259,Lisbon (Lisbon) to Lisbon (Greenwich),transformation,4803,4207,IGC-Prt,1,1294,Change of prime meridian.,9601,,,,EPSG,EPSG,1999-11-12 00:00:00,99.79,1,1
-1260,Makassar (Jakarta) to Makassar,transformation,4804,4257,EPSG-Idn Sulawesi,1,1316,Change of prime meridian.,9601,,,,EPSG,EPSG,1999-11-12 00:00:00,99.79,1,0
-1261,MGI (Ferro) to MGI (Greenwich),transformation,4805,4312,BEV-Aut balk,1,1166,Change of prime meridian.,9601,,,,EPSG,EPSG,1999-11-12 00:00:00,99.79,1,1
-1262,Monte Mario (Rome) to Monte Mario,transformation,4806,4265,EPSG-Ita,1,1127,Change of prime meridian.,9601,,,,EPSG,EPSG,1999-11-12 00:00:00,98.37  99.79,1,0
-1263,Padang (Jakarta) to Padang (Greenwich),transformation,4808,4280,EPSG-Idn Sumatra,1,1355,Change of prime meridian.,9601,,,,EPSG,EPSG,1999-11-12 00:00:00,99.79,1,1
-1264,Belge 1950 (Brussels) to Belge 1950,transformation,4809,4215,IGN-Bel,1,1347,Change of prime meridian.,9601,,,,EPSG,EPSG,1999-11-12 00:00:00,99.79,1,0
-1265,Tananarive (Paris) to Tananarive,transformation,4810,4297,EPSG-Mdg,1,1149,Change of prime meridian.,9601,,,,EPSG,EPSG,1999-11-12 00:00:00,99.79,1,0
-1266,Voirol 1875 (Paris) to Voirol 1875,transformation,4811,4304,IGN-Dza,1,2347,Change of prime meridian.,9601,,,,EPSG,EPSG,1999-11-12 00:00:00,99.79,1,0
-1268,Batavia (Jakarta) to Batavia (Greenwich),transformation,4813,4211,EPSG-Idn Java,1,1285,Change of prime meridian.,9601,,,,EPSG,EPSG,1999-11-12 00:00:00,99.79,1,1
-1269,RT38 (Stockholm) to RT38 (Greenwich),transformation,4814,4308,NLS-Swe,1,1225,Change of prime meridian.,9601,,,,EPSG,EPSG,1999-11-12 00:00:00,99.79,1,1
-1270,Greek (Athens) to Greek (Greenwich),transformation,4815,4120,NTU-Grc,1,1106,Change of prime meridian.,9601,,,,Topography Department; National Technical University of Athens.,EPSG,1999-11-12 00:00:00,99.79,1,1
-1271,Schwarzeck to WGS 84 (2),transformation,4293,4326,SLI-Nam,2,1169,?,9603,,,Beware!   Schwarzeck CRS uses German legal metres.  Example:  Schwarzeck Lat 19d 35m 46.952s S Long 20d 41m 50.649s E; X=5623409.40 Y=2124618.00 Z=-2125847.62 GLM; X=5623485.86 Y=2124646.89 Z=-2125876.53 m; WGS84 X=5624101.50 Y=2124748.97 Z=2126132.34 m.,Chief Directorate Surveys and Land Information; Mowbray; South Africa.,EPSG,1997-11-13 00:00:00,97.48,1,0
-1272,GGRS87 to WGS 84 (1),transformation,4121,4326,Hel-Grc,1,1106,?,9603,,,,Geodesy Department; Public Petroleum Corporation of Greece.,EPSG,1997-06-16 00:00:00,,1,0
-1273,HD72 to ETRS89 (1),transformation,4237,4258,ELTE-Hun,1,1119,?,9607,,,May be taken as approximate transformation HD72 to WGS 84 - see code 1677.,http://lazarus.elte.hu/gb/geodez/geod5.htm,EPSG,1997-11-13 00:00:00,97.47,1,1
-1274,Pulkovo 1942 to LKS94(ETRS89) (1),transformation,4284,4126,HNIT-Ltu,1,1145,?,9607,,,May be taken as approximate transformation Pulkovo 1942 to WGS 84 - see code 1679.,HNIT-BALTIC GeoInfoServisas.,EPSG,1998-03-12 00:00:00,,1,0
-1275,ED50 to WGS 84 (17),transformation,4230,4326,IGN-Fra,17,1096,For applications to an accuracy of 2 metres.,9603,,,,IGN technical report 14 (January 1988).,EPSG,1998-04-16 00:00:00,98.11,1,0
-1276,NTF to ED50 (1),transformation,4275,4230,IGN-Fra,1,1096,For applications to an accuracy of 2 metres.,9603,,,,IGN technical report 7 (October 1981).,EPSG,1997-11-13 00:00:00,,1,0
-1277,NTF to WGS 72 (1),transformation,4275,4322,IGN-Fra,1,1096,For applications to an accuracy of 2 metres.,9603,,,,IGN technical report 7 (October 1981).,EPSG,1997-11-13 00:00:00,,1,0
-1278,AGD66 to GDA94 (1),transformation,4202,4283,Auslig-Aus 5m,1,1036,5m accuracy.,9603,,,Parameter values are given to greater precision but no better accuracy at http://www.dehaa.sa.gov.au/res_inform/sicom/where/geobas14.html  For higher accuracy requirements see various regional transformations.,GDA Technical Manual. http://www.anzlic.org.au/icsm/gdatm/molodens.htm,EPSG,1997-11-13 00:00:00,,1,0
-1279,AGD84 to GDA94 (1),transformation,4203,4283,Auslig-Aus 5m,1,1036,5m accuracy.,9603,,,Parameter values are given to greater precision but no better accuracy at http://www.dehaa.sa.gov.au/res_inform/sicom/where/geobas14.html,GDA Technical Manual. http://www.anzlic.org.au/icsm/gdatm/molodens.htm,EPSG,1997-11-13 00:00:00,,1,0
-1280,AGD84 to GDA94 (2),transformation,4203,4283,Auslig-Aus 1m,2,1036,1m accuracy.,9607,,,Supersedes AGD84 to WGS 84 (2) (code 1236).  May be taken as approximate transformation AGD84 to WGS 84 - see code 1669.,GDA Technical Manual. http://www.anzlic.org.au/icsm/gdatm/simil.htm,EPSG,1997-11-13 00:00:00,,1,0
-1282,Samboja to WGS 84 (1),transformation,4125,4326,TOT-Idn Mah,1,1328,Oil exploration.,9603,,,Datum shift derived through ITRF93.,Total Indonesia.,EPSG,2000-03-07 00:00:00,2000.23,1,1
-1283,LKS94(ETRS89) to WGS 84 (1),transformation,4126,4326,HNIT-Ltu,1,1145,LKS94 is a realisation of WGS 84 coincident to within 1.5 metres.  This transformation has an accuracy equal to the coincidence figure.,9603,,,,HNIT-BALTIC GeoInfoServisas.,EPSG,1998-03-12 00:00:00,98.13,1,0
-1284,Arc 1960 to WGS 84 (2),transformation,4210,4326,NIMA-Ken,2,1132,"For military purposes.  Accuracy 4m, 3m and 3m in X, Y and Z axes.",9603,,,Derived at 24 stations.,U.S. National Imagery and Mapping Agency  TR8350.2 revision of October 1997; http://164.214.2.59/geospatial/products/GandG/tr83502b/toc.html,EPSG,1998-03-12 00:00:00,,1,0
-1285,Arc 1960 to WGS 84 (3),transformation,4210,4326,NIMA-Tza,3,1230,"For military purposes.  Accuracy 6m, 9m and 10m in X, Y and Z axes.",9603,,,Derived at 12 stations.,U.S. National Imagery and Mapping Agency  TR8350.2 revision of October 1997; http://164.214.2.59/geospatial/products/GandG/tr83502b/toc.html,EPSG,1998-03-12 00:00:00,,1,0
-1286,Segora to WGS 84 (1),transformation,4294,4326,NIMA-Idn Kal,1,2354,For military purposes.,9603,,,Accuracy estimate not available.,U.S. National Imagery and Mapping Agency  TR8350.2 revision of October 1997; http://164.214.2.59/geospatial/products/GandG/tr83502b/toc.html,EPSG,1998-03-12 00:00:00,,1,1
-1287,Pulkovo 1942 to WGS 84 (3),transformation,4284,4326,NIMA-Hun,3,1119,For military purposes.  Accuracy 2m in each axis.,9603,,,Derived at 5 stations.,U.S. National Imagery and Mapping Agency  TR8350.2 revision of October 1997; http://164.214.2.59/geospatial/products/GandG/tr83502b/toc.html,EPSG,1998-04-16 00:00:00,98.11,1,0
-1288,Pulkovo 1942 to WGS 84 (4),transformation,4284,4326,NIMA-Pol,4,1192,"For military purposes only.  Accuracy 4m, 2m and 4m in X, Y and Z axes.",9603,,,Derived at 11 stations.,U.S. National Imagery and Mapping Agency  TR8350.2 revision of October 1997; http://164.214.2.59/geospatial/products/GandG/tr83502b/toc.html,EPSG,1998-04-16 00:00:00,98.11,1,0
-1289,Pulkovo 1942 to WGS 84 (5),transformation,4284,4326,NIMA-Cze,5,1079,"For military purposes only.  Accuracy 3m, 3m and 2m in X, Y and Z axes.",9603,,,Derived at 6 stations.,U.S. National Imagery and Mapping Agency  TR8350.2 revision of October 1997; http://164.214.2.59/geospatial/products/GandG/tr83502b/toc.html,EPSG,1998-04-16 00:00:00,98.11,1,0
-1290,Pulkovo 1942 to WGS 84 (6),transformation,4284,4326,NIMA-Lva,6,1139,For military purposes.  Accuracy 2m in each axis.,9603,,,Derived at 5 stations.,U.S. National Imagery and Mapping Agency  TR8350.2 revision of October 1997; http://164.214.2.59/geospatial/products/GandG/tr83502b/toc.html,EPSG,1998-04-16 00:00:00,98.11,1,0
-1291,Pulkovo 1942 to WGS 84 (7),transformation,4284,4326,NIMA-Kaz,7,1131,For military purposes.  Accuracy 25m in each axis.,9603,,,Derived at 2 stations.,U.S. National Imagery and Mapping Agency  TR8350.2 revision of October 1997; http://164.214.2.59/geospatial/products/GandG/tr83502b/toc.html,EPSG,1998-04-16 00:00:00,98.11,1,0
-1292,Pulkovo 1942 to WGS 84 (8),transformation,4284,4326,NIMA-Alb,8,1025,For military purposes.  Accuracy 3m in each axis.,9603,,,Derived at 7 stations.,U.S. National Imagery and Mapping Agency  TR8350.2 revision of October 1997; http://164.214.2.59/geospatial/products/GandG/tr83502b/toc.html,EPSG,1998-04-16 00:00:00,98.11,1,0
-1293,Pulkovo 1942 to WGS 84 (9),transformation,4284,4326,NIMA-Rom,9,1197,"For military purposes.  Accuracy 3m, 5m and 3m in X, Y and Z axes.",9603,,,Derived at 4 stations.,U.S. National Imagery and Mapping Agency  TR8350.2 revision of October 1997; http://164.214.2.59/geospatial/products/GandG/tr83502b/toc.html,EPSG,1998-04-16 00:00:00,98.11,1,0
-1294,Voirol 1875 to WGS 84 (1),transformation,4304,4326,NIMA-Dza N,1,2347,For military purposes.,9603,,,Accuracy estimate not available.,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,1998-03-12 00:00:00,,1,0
-1296,Trinidad 1903 to WGS 84 (1),transformation,4302,4326,Amoco-Tto Trin,1,1339,Oil exploration.,9603,,,Derived in 1989 by ONI for Amoco.,Trinidad Ministry of Energy and Energy Industries.,EPSG,1998-11-11 00:00:00,98.38,1,0
-1297,Tete to Moznet (1),transformation,4127,4130,DNGC-Moz,1,1167,Residuals as high as 30 metres.,9607,,,Mean of 32 stations. To reduce the size of the residuals; four regional parameter sets (see codes 1298-1301) were developed. May be taken as approximate transformation Moznet to WGS 84 - see code 1683.,Direc��o Nacional de Geografia e Cadastral (DINAGECA).,EPSG,1998-04-16 00:00:00,,1,0
-1298,Tete to Moznet (2),transformation,4127,4130,DNGC-Moz A,2,2350,Residuals are generally under 1 metre.,9607,,,Mean of 9 stations. May be taken as approximate transformation Moznet to WGS 84 - see code 1684.,Direc��o Nacional de Geografia e Cadastral (DINAGECA).,EPSG,1998-04-16 00:00:00,,1,0
-1299,Tete to Moznet (3),transformation,4127,4130,DNGC-Moz B,3,2351,Residuals are generally under 4 metres.,9607,,,Mean of 6 stations. May be taken as approximate transformation Moznet to WGS 84 - see code 1685.,Direc��o Nacional de Geografia e Cadastral (DINAGECA).,EPSG,1998-04-16 00:00:00,,1,0
-1300,Tete to Moznet (4),transformation,4127,4130,DNGC-Moz C,4,2352,Residuals are generally under 3 metres.,9607,,,Mean of 11 stations. May be taken as approximate transformation Moznet to WGS 84 - see code 1686.,Direc��o Nacional de Geografia e Cadastral (DINAGECA).,EPSG,1998-04-16 00:00:00,,1,0
-1301,Tete to Moznet (5),transformation,4127,4130,DNGC-Moz D,5,2353,Residuals are 5-10 metres.,9607,,,Mean of 7 stations. May be taken as approximate transformation Moznet to WGS 84 - see code 1687.,Direc��o Nacional de Geografia e Cadastral (DINAGECA).,EPSG,1998-04-16 00:00:00,,1,0
-1302,Moznet to WGS 84 (1),transformation,4130,4326,EPSG-Moz,1,1167,For many purposes Moznet can be considered to be coincident with WGS 84. Accuracy better than 1 metre.,9607,,,,EPSG,EPSG,1998-04-16 00:00:00,,1,0
-1303,Pulkovo 1942 to WGS 84 (10),transformation,4284,4326,KCS-Kaz Cas,10,2405,Residuals under 2 m.,9606,,,Mean of 13 stations along entire Kazak coastline.,KazakCaspiShelf consortium.,EPSG,2000-02-02 00:00:00,2000.05,1,0
-1304,Indian 1975 to WGS 84 (2),transformation,4240,4326,NIMA-Tha,2,1231,"For military purposes.  Accuracy 3m, 2m and 3m in X, Y and Z axes.",9603,,,Derived at 62 stations.,U.S. National Imagery and Mapping Agency  TR8350.2 revision of October 1997; http://164.214.2.59/geospatial/products/GandG/tr83502b/toc.html,EPSG,1998-04-16 00:00:00,,1,0
-1305,Tokyo to WGS 84 (5),transformation,4301,4326,NIMA-Kor,5,1135,For military purposes.,9603,,,Derived at 29 stations.,U.S. National Imagery and Mapping Agency  TR8350.2 revision of October 1997; http://164.214.2.59/geospatial/products/GandG/tr83502b/toc.html,EPSG,1998-04-16 00:00:00,,1,0
-1306,MGI to WGS 84 (1),transformation,4312,4326,NIMA-balk,1,2370,For military purposes only.,9603,,,Accuracy estimate not available.,U.S. National Imagery and Mapping Agency  TR8350.2 revision of October 1997; http://164.214.2.59/geospatial/products/GandG/tr83502b/toc.html,EPSG,1998-04-16 00:00:00,,1,0
-1307,Naparima 1972 to WGS 84 (3),transformation,4271,4326,NIMA-Tto Tob,3,1322,For military purposes only.  Accuracy 15m in each axis.,9603,,,(1) See remarks for tfm code 1192.  (2) Naparima 1972 is an extension to Tobago of the Napaima 1955 geographic CRS of Trindad.  In Trinidad this transformation may also be considered to use Napaima 1955 (code 4158) as its source CRS: see tfm code 1556.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,1998-04-16 00:00:00,,1,0
-1308,NAD83 to WGS 84 (4),transformation,4269,4326,NGS-Usa ITRF94,4,1323,Historical record only - superseded - see remarks.,9607,,,Strictly between NAD83 and ITRF94(1996.0).  Superseded by NAD83 to WGS 84 (5) (code 1515).,US National Geodetic Survey  http://www.ngs.noaa.gov/CORS/Derivation.html,EPSG,1999-04-22 00:00:00,99.12  99.38,1,0
-1309,DHDN to ETRS89 (1),transformation,4314,4258,IfAG-Deu W,1,2326,For applications with an accuracy at 5 m level.,9607,,,Mean of 69 stations. May be taken as approximate transformation DHDN to WGS 84 - see code 1673. Also given by EuroGeographics at http://crs.ifag.de/ as a Position Vector transformation with changed values for rotations.,Institute for Cartography and Geodesy; Leipzig.,EPSG,2000-10-19 00:00:00,2000.72,1,0
-1310,Pulkovo 1942 to ETRS89 (1),transformation,4284,4258,IfAG-Deu E,1,1343,Residuals under 2 m.,9607,,,Mean of 20 stations.,Institute for Cartography and Geodesy; Leipzig.,EPSG,2000-10-19 00:00:00,2000.72,1,1
-1311,ED50 to WGS 84 (Common Offshore),transformation,4230,4326,UKOOA-CO,18,2342,Recommended transformation for UKCS petroleum purposes.,9606,,,Based on ED50 to WGS72 (precise ephemeris) 6-nations agreement of 1981 to which precise to broadcast and broadcast to WGS 84 transformations have been concatenated.,The Hydrographic Journal; vol 52 page 50.,EPSG,1998-06-30 00:00:00,98.27,1,0
-1312,NAD27 to NAD83 (3),transformation,4267,4269,GC-Can NT1,3,1061,Historic record only - now superseded - see remarks.,9614,,,Uses NTv1 method.  Superseded in Quebec by code 1462 and elsewhere in 1997 by NTv2 (transformation code 1313).  Input expects longitudes to be positive west; EPSG GeogCRS NAD27 (code 4267) and NAD83 (code 4269) have longitudes positive east.,Geomatics Canada - Geodetic Survey Division.,EPSG,2000-03-07 00:00:00,98.57  2000.14,1,0
-1313,NAD27 to NAD83 (4),transformation,4267,4269,GC-Can NT2,4,1061,Accuracy 1-2 metres.,9615,,,Uses NTv2 data files.  Supersedes  NTv1 (transformation code 1312) except in Quebec.  Input expects longitudes to be positive west; EPSG GeogCRS NAD27 (code 4267) and (code 4269) have longitudes positive east.,http://www.geod.nrcan.gc.ca/products/html-public/GSDapps/English/NTv2_Fact_Sheet.html,EPSG,2000-03-07 00:00:00,98.57  2000.14,1,0
-1314,OSGB 1936 to WGS 84 (Petroleum),transformation,4277,4326,UKOOA-Pet,6,2394,Oil exploration. Accuracy better than 4m and generally better than 2m.,9606,,,For a more accurate transformation see OSGB 1936 / British National Grid to ETRS89 (1) (code 1036): contact the Ordnance Survey of Great Britain (http://www.gps.gov.uk/gpssurveying.asp) for details.,UK Offshore Operators Association. Also at EuroGeographics at http://crs.ifag.de,EPSG,1998-11-11 00:00:00,,1,0
-1315,OSGB 1936 to ED50 (UKOOA),transformation,4277,4230,UKOOA-UKCS,1,2394,For oil exploration. Accuracy better than 4m and generally better than 2m.,9606,,,This transformation is concatenated from OSGB36 to WGS 84 (Petroleum) (code 1314) minus ED50 to WGS 84 (Common Offshore) (code 1311).,UK Offshore Operators Association.,EPSG,1998-11-11 00:00:00,,1,0
-1316,Manoca to WGS 84 (1),transformation,4260,4326,SCS-Cmr,1,1060,?,9603,,,,Stolt Comex Seaway and Geoid for Elf.,EPSG,1998-11-11 00:00:00,,1,1
-1317,Camacupa to WGS 72BE (1),transformation,4220,4324,GSI-Ago,1,1604,Oil exploration.,9603,,,Derived by Geophysical Services Inc. in 1979 from mean of Transit results at 7 stations.,EPSG,EPSG,1998-11-11 00:00:00,,1,0
-1318,Camacupa to WGS 84 (1),transformation,4220,4326,CON-Ago B5,1,2316,Used for oil exploration by Conoco.,9603,,,,EPSG,EPSG,1998-11-11 00:00:00,,1,0
-1319,Camacupa to WGS 84 (2),transformation,4220,4326,TEX-Ago B2,2,2317,Used for oil exploration by Texaco.,9603,,,,EPSG,EPSG,1998-11-11 00:00:00,,1,0
-1320,Camacupa to WGS 84 (3),transformation,4220,4326,SHL-Ago old,3,2321,Used by Shell prior to 1994.,9606,,,Superseded by Camacupa to WGS 84 (9).,EPSG,EPSG,1998-12-14 00:00:00,98.56,1,0
-1321,Camacupa to WGS 84 (4),transformation,4220,4326,GSI-Ago,4,2320,Used for oil exploration.,9603,,,"Derived as mean of 123 Transit passes at station Cabo Ledo NE base in November 1990. Used by Elf for block 7 up to December 1992 then superseded by Camacupa to WGS 84 (7). Used by Total in block 8, ExxonMobil block 24, Western Geophysical for spec. data.",EPSG,EPSG,2000-03-07 00:00:00,2000.16,1,0
-1322,Camacupa to WGS 84 (5),transformation,4220,4326,ELF-Ago B3 old,5,2318,Used for oil exploration by Elf for block 3 up to December 1992 then Superseded by Camacupa to WGS 84 (7).,9603,,,Derived at station Djeno during coordination of platform PAL F2 in February 1992.,EPSG,EPSG,1998-11-11 00:00:00,,1,0
-1323,Camacupa to WGS 84 (6),transformation,4220,4326,ELF-Ago B7 old,6,2319,Used for oil exploration by Elf for 1993 block 7 shallow water survey.,9603,,,Derived at Luanda observatory December 1992.,EPSG,EPSG,1998-11-11 00:00:00,,1,0
-1324,Camacupa to WGS 84 (7),transformation,4220,4326,ELF-Ago B15,7,2322,"Used for oil exploration by Elf for blocks 3, 7 and 17 between December 1992 and 1994 then Superseded by Camacupa to WGS 84 (10).  Used by Exxon for block 15 since 1993.",9603,,,Derived at platform PAL F2 in December 1992.,EPSG,EPSG,1998-11-11 00:00:00,,1,0
-1325,Camacupa to WGS 84 (8),transformation,4220,4326,ELF-Ago B2 old,8,2317,Used for oil exploration by Total for block 2 between December 1992 and 1994 then Superseded by Camacupa to WGS 84 (10).,9603,,,Derived at platform PAL F2 in December 1992.,EPSG,EPSG,1998-11-11 00:00:00,,1,0
-1326,Camacupa to WGS 84 (9),transformation,4220,4326,SHL-Ago B16,9,2323,Used by Shell since 1994.,9606,,,Supersedes Camacupa to WGS 84 (3).,EPSG,EPSG,1998-12-14 00:00:00,98.56,1,0
-1327,Camacupa to WGS 84 (10),transformation,4220,4326,ELF-Ago N,10,2324,Used for oil exploration by Elf in blocks 3 and 17 since 1994.  Used by Total in block 2 since 1994. Adopted by BP-Amoco Elf and Exxon for blocks 31-33.,9603,,,Derived at platform PAL F2 in 1994 by Topnav using Doris.,EPSG,EPSG,1998-11-11 00:00:00,,1,0
-1328,Malongo 1987 to Mhast (1),transformation,4259,4264,CHV-Ago Cab,1,1317,Used for oil exploration.,9603,,,Malongo 1987 is an offshore extension of Mhast adopted by Chevron in 1987.,EPSG,EPSG,1998-11-11 00:00:00,,1,0
-1329,Mhast to WGS 84 (1),transformation,4264,4326,CHV-Ago Cab,1,1317,"Used for oil exploration by Chevron until superseded in 1990 by trf Malongo 1987 to WGS 84 (2), code 1557.",9603,,,"Superseded in 1990 by trf Malongo 1987 to WGS 84 (2), code 1557.  Malongo 1987 is an offshore extension of the Mhast cooordinate system.",Chevron.,EPSG,1998-11-11 00:00:00,,1,0
-1330,Malongo 1987 to WGS 84 (1),transformation,4259,4326,CHV-Ago Cab89,1,1317,"Used for oil exploration by Chevron until superseded in 1990 by trf Malongo 1987 to WGS 84 (2), code 1557.",9603,,,Derived at Station Y in 1989 via WGS72.,Chevron.,EPSG,1998-11-11 00:00:00,,1,0
-1331,EST92 to ETRS89 (1),transformation,4133,4258,UT-Est,1,1090,?,9607,,,,http://www.geo.ut.ee/~raivo/estcoord.html,EPSG,2000-10-19 00:00:00,2000.72,1,0
-1332,Pulkovo 1942 to EST92 (1),transformation,4284,4133,UT-Est,1,1090,?,9607,,,,http://www.geo.ut.ee/~raivo/estcoord.html,EPSG,1998-12-14 00:00:00,,1,0
-1333,EST92 to WGS 84 (1),transformation,4133,4326,UT-Est,1,1090,?,9607,,,,http://www.geo.ut.ee/~raivo/estcoord.html,EPSG,1998-12-14 00:00:00,,1,0
-1334,Pulkovo 1942 to WGS 84 (12),transformation,4284,4326,UT-Est,12,1090,?,9607,,,,http://www.geo.ut.ee/~raivo/estcoord.html,EPSG,1998-12-14 00:00:00,,1,0
-1335,Tokyo to WGS 84 (6),transformation,4301,4326,GSI-Jpn 452141,6,2425,For medium accuracy.,9618,,,,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,1998-12-12 00:00:00,,1,1
-1336,Tokyo to WGS 84 (7),transformation,4301,4326,GSI-Jpn 452142,7,2426,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1337,Tokyo to WGS 84 (8),transformation,4301,4326,GSI-Jpn 444141,8,2427,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1338,Tokyo to WGS 84 (9),transformation,4301,4326,GSI-Jpn 444142,9,2428,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1339,Tokyo to WGS 84 (10),transformation,4301,4326,GSI-Jpn 440141,10,2429,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1340,Tokyo to WGS 84 (11),transformation,4301,4326,GSI-Jpn 440142,11,2430,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1341,Tokyo to WGS 84 (12),transformation,4301,4326,GSI-Jpn 440143,12,2431,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1342,Tokyo to WGS 84 (13),transformation,4301,4326,GSI-Jpn 440144,13,2432,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1343,Tokyo to WGS 84 (14),transformation,4301,4326,GSI-Jpn 432141,14,2433,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1344,Tokyo to WGS 84 (15),transformation,4301,4326,GSI-Jpn 432142,15,2434,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1345,Tokyo to WGS 84 (16),transformation,4301,4326,GSI-Jpn 432143,16,2435,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1346,Tokyo to WGS 84 (17),transformation,4301,4326,GSI-Jpn 432144,17,2436,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1347,Tokyo to WGS 84 (18),transformation,4301,4326,GSI-Jpn 432145,18,2437,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1348,Tokyo to WGS 84 (19),transformation,4301,4326,GSI-Jpn 424140,19,2438,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1349,Tokyo to WGS 84 (20),transformation,4301,4326,GSI-Jpn 424141,20,2439,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,99.77 2002.08,1,0
-1350,Tokyo to WGS 84 (21),transformation,4301,4326,GSI-Jpn 424142,21,2440,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1351,Tokyo to WGS 84 (22),transformation,4301,4326,GSI-Jpn 424143,22,2441,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1352,Tokyo to WGS 84 (23),transformation,4301,4326,GSI-Jpn 424144,23,2442,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1353,Tokyo to WGS 84 (24),transformation,4301,4326,GSI-Jpn 424145,24,2443,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1354,Tokyo to WGS 84 (25),transformation,4301,4326,GSI-Jpn 420139,25,2444,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1355,Tokyo to WGS 84 (26),transformation,4301,4326,GSI-Jpn 420140,26,2445,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1356,Tokyo to WGS 84 (27),transformation,4301,4326,GSI-Jpn 420141,27,2446,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1357,Tokyo to WGS 84 (28),transformation,4301,4326,GSI-Jpn 420142,28,2447,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1358,Tokyo to WGS 84 (29),transformation,4301,4326,GSI-Jpn 420143,29,2448,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1359,Tokyo to WGS 84 (30),transformation,4301,4326,GSI-Jpn 412140,30,2449,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1360,Tokyo to WGS 84 (31),transformation,4301,4326,GSI-Jpn 412141,31,2450,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1361,Tokyo to WGS 84 (32),transformation,4301,4326,GSI-Jpn 404140,32,2451,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1362,Tokyo to WGS 84 (33),transformation,4301,4326,GSI-Jpn 404141,33,2452,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1363,Tokyo to WGS 84 (34),transformation,4301,4326,GSI-Jpn 400139,34,2453,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1364,Tokyo to WGS 84 (35),transformation,4301,4326,GSI-Jpn 400140,35,2454,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1365,Tokyo to WGS 84 (36),transformation,4301,4326,GSI-Jpn 400141,36,2455,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1366,Tokyo to WGS 84 (37),transformation,4301,4326,GSI-Jpn 392139,37,2456,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1367,Tokyo to WGS 84 (38),transformation,4301,4326,GSI-Jpn 392140,38,2457,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1368,Tokyo to WGS 84 (39),transformation,4301,4326,GSI-Jpn 392141,39,2458,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1369,Tokyo to WGS 84 (40),transformation,4301,4326,GSI-Jpn 384139,40,2459,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1370,Tokyo to WGS 84 (41),transformation,4301,4326,GSI-Jpn 384140,41,2460,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1371,Tokyo to WGS 84 (42),transformation,4301,4326,GSI-Jpn 384141,42,2461,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1372,Tokyo to WGS 84 (43),transformation,4301,4326,GSI-Jpn 380139,43,2462,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1373,Tokyo to WGS 84 (44),transformation,4301,4326,GSI-Jpn 380140,44,2463,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1374,Tokyo to WGS 84 (45),transformation,4301,4326,GSI-Jpn 380141,45,2464,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1375,Tokyo to WGS 84 (46),transformation,4301,4326,GSI-Jpn 372136,46,2465,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1376,Tokyo to WGS 84 (47),transformation,4301,4326,GSI-Jpn 372137,47,2466,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1377,Tokyo to WGS 84 (48),transformation,4301,4326,GSI-Jpn 372138,48,2467,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1378,Tokyo to WGS 84 (49),transformation,4301,4326,GSI-Jpn 372139,49,2468,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1379,Tokyo to WGS 84 (50),transformation,4301,4326,GSI-Jpn 372140,50,2469,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1380,Tokyo to WGS 84 (51),transformation,4301,4326,GSI-Jpn 372141,51,2470,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1381,Tokyo to WGS 84 (52),transformation,4301,4326,GSI-Jpn 364136,52,2471,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1382,Tokyo to WGS 84 (53),transformation,4301,4326,GSI-Jpn 364137,53,2472,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1383,Tokyo to WGS 84 (54),transformation,4301,4326,GSI-Jpn 364138,54,2473,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1384,Tokyo to WGS 84 (55),transformation,4301,4326,GSI-Jpn 364139,55,2474,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1385,Tokyo to WGS 84 (56),transformation,4301,4326,GSI-Jpn 364140,56,2475,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1386,Tokyo to WGS 84 (57),transformation,4301,4326,GSI-Jpn 360136,57,2476,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1387,Tokyo to WGS 84 (58),transformation,4301,4326,GSI-Jpn 360137,58,2477,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1388,Tokyo to WGS 84 (59),transformation,4301,4326,GSI-Jpn 360138,59,2478,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1389,Tokyo to WGS 84 (60),transformation,4301,4326,GSI-Jpn 360139,60,2479,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1390,Tokyo to WGS 84 (61),transformation,4301,4326,GSI-Jpn 360140,61,2480,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1391,Tokyo to WGS 84 (62),transformation,4301,4326,GSI-Jpn 352132,62,2481,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1392,Tokyo to WGS 84 (63),transformation,4301,4326,GSI-Jpn 352133,63,2482,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1393,Tokyo to WGS 84 (64),transformation,4301,4326,GSI-Jpn 352134,64,2483,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1394,Tokyo to WGS 84 (65),transformation,4301,4326,GSI-Jpn 352135,65,2484,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1395,Tokyo to WGS 84 (66),transformation,4301,4326,GSI-Jpn 352136,66,2485,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1396,Tokyo to WGS 84 (67),transformation,4301,4326,GSI-Jpn 352137,67,2486,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1397,Tokyo to WGS 84 (68),transformation,4301,4326,GSI-Jpn 352138,68,2487,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1398,Tokyo to WGS 84 (69),transformation,4301,4326,GSI-Jpn 352139,69,2488,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1399,Tokyo to WGS 84 (70),transformation,4301,4326,GSI-Jpn 352140,70,2489,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1400,Tokyo to WGS 84 (71),transformation,4301,4326,GSI-Jpn 344132,71,2490,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1401,Tokyo to WGS 84 (72),transformation,4301,4326,GSI-Jpn 344133,72,2491,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1402,Tokyo to WGS 84 (73),transformation,4301,4326,GSI-Jpn 344134,73,2492,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1403,Tokyo to WGS 84 (74),transformation,4301,4326,GSI-Jpn 344135,74,2493,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1404,Tokyo to WGS 84 (75),transformation,4301,4326,GSI-Jpn 344136,75,2494,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1405,Tokyo to WGS 84 (76),transformation,4301,4326,GSI-Jpn 344137,76,2495,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1406,Tokyo to WGS 84 (77),transformation,4301,4326,GSI-Jpn 344138,77,2496,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1407,Tokyo to WGS 84 (78),transformation,4301,4326,GSI-Jpn 344139,78,2497,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1408,Tokyo to WGS 84 (79),transformation,4301,4326,GSI-Jpn 344140,79,2498,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1409,Tokyo to WGS 84 (80),transformation,4301,4326,GSI-Jpn 340130,80,2499,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1410,Tokyo to WGS 84 (81),transformation,4301,4326,GSI-Jpn 340131,81,2500,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1411,Tokyo to WGS 84 (82),transformation,4301,4326,GSI-Jpn 340132,82,2501,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1412,Tokyo to WGS 84 (83),transformation,4301,4326,GSI-Jpn 340133,83,2502,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1413,Tokyo to WGS 84 (84),transformation,4301,4326,GSI-Jpn 340134,84,2503,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1414,Tokyo to WGS 84 (85),transformation,4301,4326,GSI-Jpn 340135,85,2504,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1415,Tokyo to WGS 84 (86),transformation,4301,4326,GSI-Jpn 340136,86,2505,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1416,Tokyo to WGS 84 (87),transformation,4301,4326,GSI-Jpn 340137,87,2506,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1417,Tokyo to WGS 84 (88),transformation,4301,4326,GSI-Jpn 340138,88,2507,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1418,Tokyo to WGS 84 (89),transformation,4301,4326,GSI-Jpn 332129,89,2508,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1419,Tokyo to WGS 84 (90),transformation,4301,4326,GSI-Jpn 332130,90,2509,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1420,Tokyo to WGS 84 (91),transformation,4301,4326,GSI-Jpn 332131,91,2510,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1421,Tokyo to WGS 84 (92),transformation,4301,4326,GSI-Jpn 332132,92,2511,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1422,Tokyo to WGS 84 (93),transformation,4301,4326,GSI-Jpn 332133,93,2512,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1423,Tokyo to WGS 84 (94),transformation,4301,4326,GSI-Jpn 332134,94,2513,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1424,Tokyo to WGS 84 (95),transformation,4301,4326,GSI-Jpn 332135,95,2514,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1425,Tokyo to WGS 84 (96),transformation,4301,4326,GSI-Jpn 332136,96,2515,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1426,Tokyo to WGS 84 (97),transformation,4301,4326,GSI-Jpn 324129,97,2516,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1427,Tokyo to WGS 84 (98),transformation,4301,4326,GSI-Jpn 324130,98,2517,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1428,Tokyo to WGS 84 (99),transformation,4301,4326,GSI-Jpn 324131,99,2518,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1429,Tokyo to WGS 84 (100),transformation,4301,4326,GSI-Jpn 324132,100,2519,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1430,Tokyo to WGS 84 (101),transformation,4301,4326,GSI-Jpn 324133,101,2520,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1431,Tokyo to WGS 84 (102),transformation,4301,4326,GSI-Jpn 324134,102,2521,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1432,Tokyo to WGS 84 (103),transformation,4301,4326,GSI-Jpn 320130,103,2522,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1433,Tokyo to WGS 84 (104),transformation,4301,4326,GSI-Jpn 320131,104,2523,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1434,Tokyo to WGS 84 (105),transformation,4301,4326,GSI-Jpn 320132,105,2524,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1435,Tokyo to WGS 84 (106),transformation,4301,4326,GSI-Jpn 312130,106,2525,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1436,Tokyo to WGS 84 (107),transformation,4301,4326,GSI-Jpn 312131,107,2526,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,2002.08,1,0
-1437,RT90 to ETRS89 (1),transformation,4124,4258,NLS-Swe,1,1225,Accuracy 0.5m.,9607,,,This transformation is actually between ETRS89 and RR92.  RR92 is a geographic 3D coordinate system where the horizontal component is RT90. Also at EuroGeographics; http:/crs.ifag.de/ with change of rotation convention (transformation method). Derived at,National Land Survey of Sweden.,EPSG,2000-10-19 00:00:00,99.11  2000.72,1,0
-1438,Fahud to WGS 84 (2),transformation,4232,4326,PDO-Omn,2,1183,Oil exploration.,9606,,,,Petroleum Development Oman,EPSG,1999-04-22 00:00:00,,1,0
-1439,PSD93 to WGS 84 (1),transformation,4134,4326,PDO-Omn 97,1,1183,Oil exploration. Residuals 0.5m at 67% probability level.,9606,,,Superseded PSD93 to WGS 84 (2) (code 8581) in 1997.,Petroleum Development Oman,EPSG,2001-06-05 00:00:00,2000.28,1,0
-1440,ED50 to WGS 84 (19),transformation,4230,4326,HEL-Grc,19,1106,Used in oil industry.,9603,,,,Geodesy Department; Hellenic Petroleum s.a.,EPSG,1999-04-22 00:00:00,,1,0
-1441,Antigua 1943 to WGS 84 (1),transformation,4601,4326,DOS-Atg Ant,1,1273,?,9603,,,,Ordnance Survey of Great Britain,EPSG,1999-04-22 00:00:00,,1,0
-1442,Dominica 1945 to WGS 84 (1),transformation,4602,4326,DOS-Dma,1,1082,?,9603,,,,Ordnance Survey of Great Britain,EPSG,1999-04-22 00:00:00,,1,0
-1443,Grenada 1953 to WGS 84 (1),transformation,4603,4326,DOS-Grd,1,1108,?,9603,,,,Ordnance Survey of Great Britain,EPSG,1999-04-22 00:00:00,,1,0
-1444,Montserrat 1958 to WGS 84 (1),transformation,4604,4326,DOS-Msr,1,1165,?,9603,,,,Ordnance Survey of Great Britain,EPSG,1999-04-22 00:00:00,,1,0
-1445,St. Kitts 1955 to WGS 84 (1),transformation,4605,4326,DOS-Kna,1,1200,?,9603,,,,Ordnance Survey of Great Britain,EPSG,1999-04-22 00:00:00,,1,0
-1446,St. Lucia 1955 to WGS 84 (1),transformation,4606,4326,DOS-Lca,1,1201,?,9603,,,,Ordnance Survey of Great Britain,EPSG,1999-04-22 00:00:00,,1,0
-1447,Anguilla 1957 to WGS 84 (1),transformation,4600,4326,DOS-Aia,1,1030,?,9619,,,,Ordnance Survey of Great Britain,EPSG,1999-04-22 00:00:00,,1,0
-1450,ED50 to WGS 84 (20),transformation,4230,4326,NMA-Nor 6265W,20,2333,Oil exploration before 1997/2001.,9620,,,Valid 1991-1997. Superseded in 1997 by ED50 to WGS 84 (22) (code 1590) and in 2001 by ED50 to WGS 84 (23) (code 1612).,"Norwegian Mapping Authority note of 13-Feb-1991 ""Om Transformasjon mellom Geodetiske Datum i Norge"".",EPSG,2000-03-07 00:00:00,2000.14,1,0
-1451,NAD27(CGQ77) to NAD83 (1),transformation,4609,4269,SGQ-Can QC NT1,1,1368,Historic record only - now superseded - see remarks.,9614,,,Superseded by NAD27(CGQ77) to NAD83 (2) (code 1575).  Uses NT method which expects longitudes positive west; EPSG GeogCRSs CGQ77 (code 4609) and NAD83 (code 4269) have longitudes positive east.,Geodetic Service of Quebec.  Contact alain.bernard at mrn.gouv.qc.ca,EPSG,2000-03-07 00:00:00,2000.14,1,0
-1454,Old Hawaiian to NAD83 (1),transformation,4135,4269,NGS-Usa HI,1,1334,Accuracy at 67% confidence level is 0.2m.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs Old Hawaiian (code 4135) and NAD83 (code 4269) have longitudes positive east.  NADCON data converts from Old Hawaiian Datum to but makes the transformation appear to be from NAD27.,US Coast & Geodetic Survey  www.ngs.noaa.gov,EPSG,2000-03-07 00:00:00,2000.14,1,0
-1455,St. Lawrence Island to NAD83 (1),transformation,4136,4269,NGS-Usa AK StL,1,1332,Accuracy 0.5m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs St. Lawrence (code 4136) and NAD83 (code 4269) have longitudes positive east. NADCON data converts from St. Lawrence Datum to but makes the transformation appear to be from NAD27.,US Coast & Geodetic Survey  www.ngs.noaa.gov,EPSG,2000-03-07 00:00:00,2000.14,1,0
-1456,St. Paul Island to NAD83 (1),transformation,4137,4269,NGS-Usa AK StP,1,1333,Accuracy 0.5m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs St. Paul (code 4137) and NAD83 (code 4269) have longitudes positive east. NADCON data converts from St. Paul Datum to but makes the transformation appear to be from NAD27.,US Coast & Geodetic Survey  www.ngs.noaa.gov,EPSG,2000-03-07 00:00:00,2000.14,1,0
-1457,St. George Island to NAD83 (1),transformation,4138,4269,NGS-Usa AK StG,1,1331,Accuracy 0.5m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs St. George (code 4138) and NAD83 (code 4269) have longitudes positive east. NADCON data converts from St. George Datum to but makes the transformation appear to be from NAD27.,US Coast & Geodetic Survey  www.ngs.noaa.gov,EPSG,2000-03-07 00:00:00,2000.14,1,0
-1458,AGD66 to GDA94 (2),transformation,4202,4283,Auslig-ACT 1m,2,2283,Recommended for mid-accuracy use in A.C.T.  1m accuracy.,9607,,,For higher accuracy requirements see AGD66 to GDA94 (10) (code 1596).  May be taken as approximate transformation AGD66 to WGS 84 - see code 1665.,GDA Technical Manual. http://www.anzlic.org.au/icsm/gdatm/regional.htm,EPSG,1999-05-25 00:00:00,,1,0
-1459,AGD66 to GDA94 (3),transformation,4202,4283,Auslig-Tas 1m old,3,1282,1m accuracy.,9607,,,Superseded in 2000 by AGD66 to GDA94 (8) (code 1594). Differences are sub-metre.,GDA Technical Manual version Dec 1998. http://www.anzlic.org.au/icsm/gdatm/regional.htm,EPSG,1999-05-25 00:00:00,2000.68,1,0
-1460,AGD66 to GDA94 (4),transformation,4202,4283,Auslig-NSW Vic 1m,4,2286,Recommended for mid-accuracy use in NSW and Victoria.  1m accuracy.,9607,,,For higher accuracy requirements see AGD66 to GDA94 (10) (code 1596).  May be taken as approximate transformation AGD66 to WGS 84 - see code 1666.,GDA Technical Manual. http://www.anzlic.org.au/icsm/gdatm/regional.htm,EPSG,1999-05-25 00:00:00,,1,0
-1461,Puerto Rico to NAD83 (1),transformation,4139,4269,NGS-PRVI,1,1335,Accuracy 0.05m at 67% confidence level.,9613,,,,US Coast & Geodetic Survey  www.ngs.noaa.gov,EPSG,2000-03-07 00:00:00,2000.14,1,0
-1462,NAD27 to NAD83 (5),transformation,4267,4269,SGQ-Can QC NT1,5,1368,Historic record only - now superseded - see remarks.,9614,,,Densification for Quebec of code 1312. Superseded by NAD27 to NAD83 (6) (code 1573).  Uses NT method which expects longitudes positive west; EPSG GeogCRSs NAD27 (code 4267) and NAD83 (code 4269) have longitudes positive east.,Geodetic Service of Quebec.  Contact alain.bernard at mrn.gouv.qc.ca,EPSG,2000-03-07 00:00:00,2000.14,1,0
-1463,NAD27(76) to NAD83 (1),transformation,4608,4269,SGQ-Can Ont,1,1367,?,9615,,,Uses NT method which expects longitudes positive west; EPSG GeogCRSs NAD27(76) (code 4608) and NAD83 (code 4269) have longitudes positive east. May be taken as approximate transformation NAD27(76) to WGS 84 - see code 1690.,Geodetic Survey of Canada   http://www.geod.emr.ca/html-public/GSDapps/English/NTv2_Fact_Sheet.html,EPSG,2000-03-07 00:00:00,2000.14,1,0
-1464,AGD66 to GDA94 (5),transformation,4202,4283,OSG-Aus Vic old,5,2285,0.1m accuracy.,9615,,,Superseded by AGD66 to GDA94 (10) (code 1596) and then by AGD66 to GDA94 (11) (code 1803).  Input expects longitudes to be positive west; EPSG GeogCRS AGD66 (code 4202) and GDA94 (code 4283) both have longitudes positive east.,http://www.osg.vic.gov.au/tools.htm,EPSG,2000-03-07 00:00:00,99.67  2000.14  2000.68,1,0
-1466,NGO 1948 (Oslo) to NGO1948 (Greenwich),transformation,4817,4273,NGO-Nor,1,1352,Change of prime meridian.,9601,,,,"J. Danielsen; ""Transformasjoner ved Norges Geografiske Oppm�ling""; Kart Og Plan nr 1; 1982.",EPSG,1999-11-12 00:00:00,99.79,1,1
-1467,NTF (Paris) to NTF (Greenwich) (1),transformation,4807,4275,IGN-Fra,1,1096,Change of prime meridian.,9601,,,,IGN Paris.,EPSG,1999-11-12 00:00:00,99.63  99.79,1,1
-1468,NTF (Paris) to NTF (Greenwich) (2),transformation,4807,4275,RGS,2,1096,Change of prime meridian.,9601,,,EPSG prefers value from IGN Paris (code 1467).,Royal Geographic Society; London,EPSG,1999-11-12 00:00:00,99.63  99.79,1,1
-1469,Locodjo 1965 to WGS 84 (1),transformation,4142,4326,IGN-Civ,1,2282,?,9603,,,,IGN Paris,EPSG,1999-10-20 00:00:00,,1,0
-1470,Abidjan 1987 to WGS 84 (1),transformation,4143,4326,IGN-Civ,1,2282,?,9603,,,,IGN Paris,EPSG,1999-10-20 00:00:00,,1,0
-1471,MGI to WGS 84 (2),transformation,4312,4326,BEV-Aut,1,1037,For applications to an accuracy of 1.5 metres.,9606,,,,Bundesamt f�r Eich- und Vermessungswesen,EPSG,1999-10-20 00:00:00,,1,1
-1472,ATS77 to NAD83(CSRS98) (1),transformation,4122,4140,GIC-Can NB,1,1447,?,9615,,,Introduced in 1999. Can be taken as an approximate transformation ATS77 to WGS 84 - see code 1688.,New Brunswick Geographic Information Corporation land and water information standards manual.,EPSG,2000-10-19 00:00:00,2000.14  2000.66,1,1
-1473,NAD83(CSRS98) to WGS 84 (1),transformation,4140,4326,EPSG-Can,1,1336,Approximation at the +/- 1m level assuming that NAD83(CSRS98) is equivalent to WGS 84.,9603,,,For many purposes NAD83(CSRS98) can be considered to be coincident with WGS 84.,EPSG,EPSG,1999-10-20 00:00:00,,1,1
-1474,NAD83 to NAD83(HARN) (1),transformation,4269,4152,NGS-Usa AL,1,1372,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.  May be taken as approximate transformation NAD83-WGS 84 - see code 1717.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,2000-03-07 00:00:00,99.931  2000.14,1,0
-1475,NAD83 to NAD83(HARN) (2),transformation,4269,4152,NGS-Usa AZ,2,1373,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.   May be taken as approximate transformation NAD83-WGS 84 - see code 1728.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,2000-03-07 00:00:00,99.931  2000.14,1,0
-1476,NAD83 to NAD83(HARN) (3),transformation,4269,4152,NGS-Usa CA n,3,2297,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.   May be taken as approximate transformation NAD83-WGS 84 - see code 1739.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,2000-03-07 00:00:00,99.931  2000.14,1,0
-1477,NAD83 to NAD83(HARN) (4),transformation,4269,4152,NGS-Usa CA s,4,2298,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.   May be taken as approximate transformation NAD83-WGS 84 - see code 1750.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,2000-03-07 00:00:00,99.931  2000.14,1,0
-1478,NAD83 to NAD83(HARN) (5),transformation,4269,4152,NGS-Usa CO,5,1376,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.   May be taken as approximate transformation NAD83-WGS 84 - see code 1712.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,2000-03-07 00:00:00,99.931  2000.14,1,0
-1479,NAD83 to NAD83(HARN) (6),transformation,4269,4152,NGS-Usa GA,6,1380,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.   May be taken as approximate transformation NAD83-WGS 84 - see code 1713.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,2000-03-07 00:00:00,99.931  2000.14,1,0
-1480,NAD83 to NAD83(HARN) (7),transformation,4269,4152,NGS-Usa FL,7,1379,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.   May be taken as approximate transformation NAD83-WGS 84 - see code 1714.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,2000-03-07 00:00:00,99.931  2000.14,1,0
-1481,NAD83 to NAD83(HARN) (8),transformation,4269,4152,NGS-Usa ID MT e,8,2382,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.  May be taken as approximate transformation NAD83-WGS 84 - see code 1715.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,2000-03-07 00:00:00,99.931  2000.14,1,0
-1482,NAD83 to NAD83(HARN) (9),transformation,4269,4152,NGS-Usa ID MT w,9,2383,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.   May be taken as approximate transformation NAD83-WGS 84 - see code 1716.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,2000-03-07 00:00:00,99.931  2000.14,1,0
-1483,NAD83 to NAD83(HARN) (10),transformation,4269,4152,NGS-Usa KY,10,1386,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.   May be taken as approximate transformation NAD83-WGS 84 - see code 1718.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,2000-03-07 00:00:00,99.931  2000.14,1,0
-1484,NAD83 to NAD83(HARN) (11),transformation,4269,4152,NGS-Usa LA,11,1387,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.   May be taken as approximate transformation NAD83-WGS 84 - see code 1719.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,2000-03-07 00:00:00,99.931  2000.14,1,0
-1485,NAD83 to NAD83(HARN) (12),transformation,4269,4152,NGS-Usa DE MD,12,2377,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.   May be taken as approximate transformation NAD83-WGS 84 - see code 1720.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,2000-03-07 00:00:00,99.931  2000.14,1,0
-1486,NAD83 to NAD83(HARN) (13),transformation,4269,4152,NGS-Usa ME,13,1388,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.   May be taken as approximate transformation NAD83-WGS 84 - see code 1721.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,2000-03-07 00:00:00,99.931  2000.14,1,0
-1487,NAD83 to NAD83(HARN) (14),transformation,4269,4152,NGS-Usa MI,14,1391,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.   May be taken as approximate transformation NAD83-WGS 84 - see code 1722.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,2000-03-07 00:00:00,99.931  2000.14,1,0
-1488,NAD83 to NAD83(HARN) (15),transformation,4269,4152,NGS-Usa MS,15,1393,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.   May be taken as approximate transformation NAD83-WGS 84 - see code 1723.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,2000-03-07 00:00:00,99.931  2000.14,1,0
-1489,NAD83 to NAD83(HARN) (16),transformation,4269,4152,NGS-Usa NE,16,1396,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.   May be taken as approximate transformation NAD83-WGS 84 - see code 1724.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,2000-03-07 00:00:00,99.931  2000.14,1,0
-1490,NAD83 to NAD83(HARN) (17),transformation,4269,4152,NGS-Usa NewEng,17,2378,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.   May be taken as approximate transformation NAD83-WGS 84 - see code 1725.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,2000-03-07 00:00:00,99.931  2000.14,1,0
-1491,NAD83 to NAD83(HARN) (18),transformation,4269,4152,NGS-Usa NM,18,1400,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.   May be taken as approximate transformation NAD83-WGS 84 - see code 1726.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,2000-03-07 00:00:00,99.931  2000.14,1,0
-1492,NAD83 to NAD83(HARN) (19),transformation,4269,4152,NGS-Usa NY,19,1401,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.   May be taken as approximate transformation NAD83-WGS 84 - see code 1727.,US Coast & Geodetic Survey  ftp://ftp.ngs.noaa.gov/pub/pcsoft/nadcon,EPSG,2000-03-07 00:00:00,99.931  2000.14,1,0
-1493,NAD83 to NAD83(HARN) (20),transformation,4269,4152,NGS-Usa ND,20,1403,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.   May be taken as approximate transformation NAD83-WGS 84 - see code 1729.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,2000-03-07 00:00:00,99.931  2000.14,1,0
-1494,NAD83 to NAD83(HARN) (21),transformation,4269,4152,NGS-Usa OK,21,1405,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.   May be taken as approximate transformation NAD83-WGS 84 - see code 1730.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,2000-03-07 00:00:00,99.931  2000.14,1,0
-1495,NAD83 to NAD83(HARN) (22),transformation,4269,4152,NGS-PRVI,22,1335,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.   May be taken as approximate transformation NAD83-WGS 84 - see code 1731.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,2000-03-07 00:00:00,99.931  2000.14,1,0
-1496,NAD83 to NAD83(HARN) (23),transformation,4269,4152,NGS-Usa SD,23,1410,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.   May be taken as approximate transformation NAD83-WGS 84 - see code 1732.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,2000-03-07 00:00:00,99.931  2000.14,1,0
-1497,NAD83 to NAD83(HARN) (24),transformation,4269,4152,NGS-Usa TN,24,1411,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.   May be taken as approximate transformation NAD83-WGS 84 - see code 1733.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,2000-03-07 00:00:00,99.931  2000.14,1,0
-1498,NAD83 to NAD83(HARN) (25),transformation,4269,4152,NGS-Usa TX e,25,2379,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.   May be taken as approximate transformation NAD83-WGS 84 - see code 1734.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,2000-03-07 00:00:00,99.931  2000.14,1,0
-1499,NAD83 to NAD83(HARN) (26),transformation,4269,4152,NGS-Usa TX w,26,2380,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.   May be taken as approximate transformation NAD83-WGS 84 - see code 1735.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,2000-03-07 00:00:00,99.931  2000.14,1,0
-1500,NAD83 to NAD83(HARN) (27),transformation,4269,4152,NGS-Usa VA,27,1415,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.   May be taken as approximate transformation NAD83-WGS 84 - see code 1736.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,2000-03-07 00:00:00,99.931  2000.14,1,0
-1501,NAD83 to NAD83(HARN) (28),transformation,4269,4152,NGS-Usa OR WA,28,2381,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.   May be taken as approximate transformation NAD83-WGS 84 - see code 1737.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,2000-03-07 00:00:00,99.931  2000.14,1,0
-1502,NAD83 to NAD83(HARN) (29),transformation,4269,4152,NGS-Usa WI,29,1418,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.   May be taken as approximate transformation NAD83-WGS 84 - see code 1738.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,2000-03-07 00:00:00,99.931  2000.14,1,0
-1503,NAD83 to NAD83(HARN) (30),transformation,4269,4152,NGS-Usa WY,30,1419,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.   May be taken as approximate transformation NAD83-WGS 84 - see code 1740.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,2000-03-07 00:00:00,99.931  2000.14,1,0
-1504,Cape to Hartebeesthoek94 (1),transformation,4222,4148,DSM-Zaf,1,1215,?,9603,,,Also used to transform Cape to WGS 84 - see code 1129.,Directorate of Surveys and Mapping; http://w3sli.wcape.gov.za/surveys/mapping/wgs84.htm,EPSG,2000-01-06 00:00:00,99.96,1,0
-1505,Hartebeesthoek94 to WGS 84 (1),transformation,4148,4326,EPSG-Zaf,1,1215,For many purposes Hartebeesthoek94 datum can be considered to be coincident with WGS 84.,9603,,,,EPSG,EPSG,2000-01-06 00:00:00,99.96,1,0
-1506,AGD66 to GDA94 (6),transformation,4202,4283,OSG-Tas 0.1m,6,1282,0.1m accuracy.,9615,,,Superseded by AGD66 to GDA94 (11) (code 1803). Input expects longitudes to be positive west; EPSG GeogCRS AGD66 (code 4202) and GDA94 (code 4283) both have longitudes positive east.,http://www.delm.tas.gov.au/osg/Geodetic_transform.htm,EPSG,2000-03-07 00:00:00,2000.14,1,0
-1507,AGD66 to GDA94 (7),transformation,4202,4283,Auslig-NT 0.1m,7,2284,0.1m accuracy.,9615,,,Superseded by AGD66 to GDA94 (11) (code 1803). Input expects longitudes to be positive west; EPSG GeogCRS AGD66 (code 4202) and GDA94 (code 4283) both have longitudes positive east.,GDA Technical Manual. http://www.anzlic.org.au/icsm/gdatm/chapter7.htm#high,EPSG,2000-03-07 00:00:00,2000.14,1,0
-1508,CH1903 to WGS 84 (1),transformation,4149,4326,BfL-CH 1,1,1286,?,9607,,,Implemented in Bundesamt f�r Landestopographie programme GRANIT.,Bundesamt f�r Landestopographie.  Aufbau der Landesvermessung der Schweiz 'LV95' Teil 3: Terrestrische Bezugssysteme und Bezugsrahmen. L+T 1999.,EPSG,1999-10-20 00:00:00,,1,1
-1509,CH1903+ to CHTRF95 (1),transformation,4150,4151,BfL-CH,1,1286,For applications to an accuracy of 0.1 metres.,9603,,,This transformation is also given as CH1903+ to ETRS89 (1) (code 1647). CHTRF95 is a realisation of ETRS89. May be taken as approximate transformation CH1903+ to WGS 84 - see code 1676.,Bundesamt f�r Landestopographie.  Aufbau der Landesvermessung der Schweiz 'LV95' Teil 3: Terrestrische Bezugssysteme und Bezugsrahmen. L+T 1999.,EPSG,1999-10-20 00:00:00,,1,0
-1510,CH1903 to WGS 84 (2),transformation,4149,4326,BfL-CH 2,2,1286,Accuracy 1.5 metres.,9603,,,These parameters are strictly between CH1903+ and CHTRF95 but are used from CH1903 as an approximation which is within the accuracy of the distortions in the CH1903 network.,Bundesamt f�r Landestopographie.  Aufbau der Landesvermessung der Schweiz 'LV95' Teil 3: Terrestrische Bezugssysteme und Bezugsrahmen. L+T 1999.,EPSG,1999-10-20 00:00:00,,1,1
-1511,CHTRF95 to WGS 84 (1),transformation,4151,4326,EPSG-CH,1,1286,For many purposes CHTRF95 can be considered to be coincident with WGS 84.,9603,,,,EPSG,EPSG,1999-10-20 00:00:00,,1,0
-1512,Rassadiran to WGS 84 (1),transformation,4153,4326,TOT-Irn Taheri,1,1338,Oil industry engineering survey. Used only for terminal site.,9603,,,Derived in 1998 at Assaluyeh (Taheri refinery) by Geoid for Total. Used for South Pars phases 2 and 3.,Total-Fina,EPSG,1999-10-20 00:00:00,,1,0
-1513,FD58 to WGS 84 (1),transformation,4132,4326,TOT-Irn Kangan,1,2362,Oil exploration.,9603,,,Derived in 1998 in Kangan district by Geoid for Total. Used for South Pars phases 2 and 3.,Total-Fina,EPSG,1999-10-20 00:00:00,,1,0
-1514,ED50(ED77) to WGS 84 (1),transformation,4154,4326,NCCI-Irn,1,1123,?,9606,,,"Used for South Pars phases 6, 7 and 8.",National Cartographic Centre of Iran,EPSG,1999-10-20 00:00:00,,1,0
-1515,NAD83 to WGS 84 (5),transformation,4269,4326,NGS-Usa ITRF96,5,1323,Geodesy.,9607,,,Strictly between NAD83 and ITRF96(1997.0).  Supersedes NAD83 to WGS 84 (4) (code 1308)., http://www.ngs.noaa.gov/CORS/Derivation.html,EPSG,1999-11-05 00:00:00,,1,0
-1516,La Canoa to WGS 84 (1),transformation,4247,4326,LAG-Ven E,1,2363,Parameter values estimated accuracy: � 2.0m;  � 2.7m;  � 1.3m respectively.,9603,,,Also used for PSAD56 to WGS 84 transformations.,"Lagoven; Gonzalez Losano y Rodriguez; ""Determination de los Parametros de Transformacion para el Oriente del Pais""; VII Venezuelan Geophysical Congress; September 1994.",EPSG,1999-11-05 00:00:00,,1,0
-1517,Conakry 1905 to WGS 84 (1),transformation,4315,4326,IGN-Gin,1,1112,?,9603,,,,IGN Paris,EPSG,1999-12-09 00:00:00,,1,0
-1518,Dabola 1981 to WGS 84 (1),transformation,4155,4326,IGN-Gin,1,1112,?,9603,,,,IGN Paris,EPSG,1999-12-09 00:00:00,,1,0
-1519,Bern 1898 (Bern) to CH1903 (Greenwich),transformation,4801,4149,BfL-CH,1,1286,Change of prime meridian.,9601,,,,EPSG,EPSG,1999-12-09 00:00:00,,1,1
-1520,NAD83 to NAD83(HARN) (31),transformation,4269,4152,NGS-Usa HI,31,1334,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.   May be taken as approximate transformation NAD83-WGS 84 - see code 1741.,US Coast & Geodetic Survey  ftp://ftp.ngs.noaa.gov/pub/pcsoft/nadcon,EPSG,2000-01-06 00:00:00,,1,0
-1521,NAD83 to NAD83(HARN) (32),transformation,4269,4152,NGS-Usa IN,32,1383,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.   May be taken as approximate transformation NAD83-WGS 84 - see code 1742.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,2000-01-06 00:00:00,,1,0
-1522,NAD83 to NAD83(HARN) (33),transformation,4269,4152,NGS-Usa KS,33,1385,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.   May be taken as approximate transformation NAD83-WGS 84 - see code 1743.,US Coast & Geodetic Survey  ftp://ftp.ngs.noaa.gov/pub/pcsoft/nadcon,EPSG,2000-01-06 00:00:00,,1,0
-1523,NAD83 to NAD83(HARN) (34),transformation,4269,4152,NGS-Usa NV,34,1397,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.   May be taken as approximate transformation NAD83-WGS 84 - see code 1744.,US Coast & Geodetic Survey  ftp://ftp.ngs.noaa.gov/pub/pcsoft/nadcon,EPSG,2000-01-06 00:00:00,,1,0
-1524,NAD83 to NAD83(HARN) (35),transformation,4269,4152,NGS-Usa OH,35,1404,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.   May be taken as approximate transformation NAD83-WGS 84 - see code 1745.,US Coast & Geodetic Survey  ftp://ftp.ngs.noaa.gov/pub/pcsoft/nadcon,EPSG,2000-01-06 00:00:00,,1,0
-1525,NAD83 to NAD83(HARN) (36),transformation,4269,4152,NGS-Usa UT,36,1413,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.   May be taken as approximate transformation NAD83-WGS 84 - see code 1746.,US Coast & Geodetic Survey  ftp://ftp.ngs.noaa.gov/pub/pcsoft/nadcon,EPSG,2000-01-06 00:00:00,,1,0
-1526,NAD83 to NAD83(HARN) (37),transformation,4269,4152,NGS-Usa WV,37,1417,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.   May be taken as approximate transformation NAD83-WGS 84 - see code 1747.,US Coast & Geodetic Survey  ftp://ftp.ngs.noaa.gov/pub/pcsoft/nadcon,EPSG,2000-01-06 00:00:00,,1,0
-1527,Campo Inchauspe to WGS 84 (2),transformation,4221,4326,TOT-Arg Neu,2,2325,Oil exploration.,9603,,,Derived through ties at 2 stations (Cerro Colorado and Chihuido Sur) to 4 IGS stations,Total-Fina,EPSG,2000-03-07 00:00:00,,1,0
-1528,Chos Malal 1914 to Campo Inchauspe (1),transformation,4160,4221,TOT-Arg Neu,1,2325,Oil exploration. Accuracy 10 metres.,9603,,,Derived through common coordinates at 5 stations.,Total-Fina,EPSG,2000-03-07 00:00:00,,1,0
-1529,Hito XVIII to WGS 84 (1),transformation,4254,4326,TOT-Arg TdF,1,2357,Oil exploration.,9606,,,,Total-Fina,EPSG,2000-03-07 00:00:00,,1,0
-1530,NAD27 to WGS 84 (30),transformation,4267,4326,ICH-Cub,30,1077,?,9603,,,,Institut Cubano di Hidrografia (ICH),EPSG,2000-03-07 00:00:00,,1,0
-1531,Nahrwan 1967 to WGS 84 (4),transformation,4270,4326,TOT-UAE Abk,4,2392,Oil exploration.,9603,,,,Total-Fina,EPSG,2000-03-07 00:00:00,,1,0
-1532,M'poraloko to WGS 84 (2),transformation,4266,4326,Elf-Gab94,2,1100,Oil exploration.,9603,,,Derived as mean of Doris determinations at 3 stations in Port Gentil area.,TotalFinaElf,EPSG,2000-03-07 00:00:00,,1,0
-1533,Kalianpur 1937 to WGS 84 (2),transformation,4144,4326,TOT-Mmr Moat,2,2361,Oil exploration.,9603,,,,Total-Fina,EPSG,2000-03-07 00:00:00,,1,0
-1534,Minna to WGS 84 (3),transformation,4263,4326,SHL-Nig S,3,2371,Oil exploration.,9606,,,,Shell Petroleum Development Company,EPSG,2000-03-07 00:00:00,,1,1
-1536,Nahrwan 1967 to WGS 84 (5),transformation,4270,4326,B&R-Qat off,5,1346,Oil exploration.,9603,,,Derived by Brown & Root in 1992 for Qatar General Petroleum Corporation North Field development. Adopted by QGPC for all offshore Qatar.,Qatar General Petroleum Corporation and Total-Fina,EPSG,2000-03-07 00:00:00,2000.53,1,0
-1537,Indian 1975 to WGS 84 (3),transformation,4240,4326,Fug-Tha,3,2358,Oil exploration.,9603,,,Derived in 1995 at point RTSD181.,Total-Fina,EPSG,2000-03-07 00:00:00,,1,0
-1538,Carthage to WGS 84 (2),transformation,4223,4326,Elf-Tun,2,1489,Oil exploration.,9603,,,Derived at station Chaffar January 1995.,Total / Elf,EPSG,2000-03-07 00:00:00,,1,0
-1539,South Yemen to Yemen NGN96 (1),transformation,4164,4163,IGN-Yem South,1,1340,?,9603,,,,IGN Paris,EPSG,2000-03-07 00:00:00,,1,0
-1540,Yemen NGN96 to WGS 84 (1),transformation,4163,4326,IGN-Yem,1,1257,Accuracy better than 1 metre.,9603,,,,IGN Paris,EPSG,2000-03-07 00:00:00,,1,0
-1541,Indian 1960 to WGS 72BE (1),transformation,4131,4324,PV-Vnm,1,1495,Oil exploration.,9603,,,Derived in Vung Tau area by Technical Navigation for Deminex in 1978.,PetroVietnam,EPSG,2000-03-07 00:00:00,,1,0
-1542,Indian 1960 to WGS 84 (2),transformation,4131,4326,DMA-Vnm 16N,2,2359,For military purposes.  Accuracy 25m in each axis.,9603,,,Derived at 2 stations.,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,2000-03-07 00:00:00,,1,0
-1543,Indian 1960 to WGS 84 (3),transformation,4131,4326,DMA-Vnm ConSon,3,2360,For military purposes.  Accuracy 25m in each axis.,9603,,,Derived at 1 station.,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,2000-03-07 00:00:00,,1,0
-1544,Hanoi 1972 to WGS 84 (1),transformation,4147,4326,BP-Vnm,1,1494,Oil exploration.,9603,,,Derived in Vung Tau area.,BP Amoco,EPSG,2000-03-07 00:00:00,,1,0
-1545,Egypt 1907 to WGS 72 (1),transformation,4229,4322,MCE-Egy,1,1086,?,9603,,,,UK Mapping and Charting Establishment,EPSG,2000-03-07 00:00:00,,1,0
-1546,Egypt 1907 to WGS 84 (3),transformation,4229,4326,Racal-Egy GoS,3,2341,Used for oil exploration by GUPCO.,9603,,,,Maridive,EPSG,2000-03-07 00:00:00,,1,0
-1547,Bissau to WGS 84 (1),transformation,4165,4326,DMA-Gnb,1,1113,For military purposes only.  Accuracy 25m in each axis.,9603,,,Derived at 2 stations.,U.S. Defense Mapping Agency  TR8350.2 second edition September 1991,EPSG,2000-03-07 00:00:00,,1,0
-1548,SAD69 to WGS 84 (14),transformation,4291,4326,IGBE-Bra,14,1053,Medium and small scale mapping.,9603,,,Derived by Brazilean Institute of Geography and Statistics (IGBE) in 1989. Used by ANP.,Agencia Nacional do Petroleo (ANP).,EPSG,2000-03-07 00:00:00,,1,0
-1549,Aratu to WGS 84 (1),transformation,4208,4326,PB-Bra Camp,1,2307,Oil exploration.,9603,,,,Petrobras.,EPSG,2000-03-07 00:00:00,,1,0
-1550,Aratu to WGS 84 (2),transformation,4208,4326,PB-Bra TucN,2,2308,Oil exploration.,9603,,,,Petrobras.,EPSG,2000-03-07 00:00:00,,1,0
-1551,Aratu to WGS 84 (3),transformation,4208,4326,PB-Bra TucC,3,2309,Oil exploration.,9603,,,,Petrobras.,EPSG,2000-03-07 00:00:00,,1,0
-1552,Aratu to WGS 84 (4),transformation,4208,4326,PB-Bra TucS,4,2310,Oil exploration.,9603,,,,Petrobras.,EPSG,2000-03-07 00:00:00,,1,0
-1553,NAD83 to NAD83(HARN) (38),transformation,4269,4152,NGS-Usa IL,38,1382,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.   May be taken as approximate transformation NAD83-WGS 84 - see code 1748.,US Coast & Geodetic Survey  ftp://ftp.ngs.noaa.gov/pub/pcsoft/nadcon,EPSG,2000-01-06 00:00:00,,1,0
-1554,NAD83 to NAD83(HARN) (39),transformation,4269,4152,NGS-Usa NJ,39,1399,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.   May be taken as approximate transformation NAD83-WGS 84 - see code 1749.,US Coast & Geodetic Survey  ftp://ftp.ngs.noaa.gov/pub/pcsoft/nadcon,EPSG,2000-01-06 00:00:00,,1,0
-1555,Naparima 1955 to WGS 84 (2),transformation,4158,4326,Amoco-Tto Trin,2,1339,Oil exploration.,9603,,,Derived in 1989 by ONI for Amoco.,Trinidad Ministry of Energy and Energy Industries.,EPSG,2000-03-07 00:00:00,2000.351,1,0
-1556,Naparima 1955 to WGS 84 (3),transformation,4158,4326,NIMA-Tto Trin,3,1339,For military purposes.,9603,,,Described by NIMA as Naparima 1972 to WGS 84.  In Trinidad the source CRS is better known as Napaima 1955. EPSG has duplicated the tfm using the alternative source CRSs.  See also tfm code 1307.,EPSG after U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,2000-03-07 00:00:00,2000.351,1,0
-1557,Malongo 1987 to WGS 84 (2),transformation,4259,4326,CHV-Ago Cab90,2,1317,Used for oil exploration by Chevron since 1990.,9603,,,Supersedes trf code 1330.  Derived at station Y.,Chevron.,EPSG,2000-05-08 00:00:00,,1,0
-1558,Korean 1995 to WGS 84 (1),transformation,4166,4326,NIMA-Kor,1,1135,For military purposes. Accuracy better than 1 metre.,9603,,,Derived at 5 stations.,NIMA TR8350.2  ftp://164.214.2.65/pub/gg/tr8350.2/changes.pdf,EPSG,2000-06-10 00:00:00,,1,0
-1559,AGD84 to GDA94 (3),transformation,4203,4283,DOLA-Aus WA 0.1m old,3,1280,0.1m accuracy.,9615,,,Superseded by AGD84 to GDA94 (4) (code 1593) (binary file format error) and then by AGD84 to GDA94 (5) (code 1804). Input expects longitudes to be positive west; EPSG GeogCRS AGD84 (code 4203) and GDA94 (code 4283) both have longitudes positive east.,http://www.dola.wa.gov.au/lotl/survey_geodesy/gda1994/download.html,EPSG,2000-06-10 00:00:00,2000.68,1,1
-1560,Nord Sahara 1959 to WGS 72BE (1),transformation,4307,4324,CGG-Alg HM,1,2393,Oil exploration.,9603,,,Derived at IGN monument CFP19 using Transit.,Various oil company sources.,EPSG,2000-06-23 00:00:00,,1,0
-1561,Qatar 1974 to WGS 84 (1),transformation,4285,4326,DMA-Qat,1,1195,For military purposes only.  Accuracy 20m in each axis.,9603,,,Derived at 3 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,2000-10-19 00:00:00,,1,0
-1562,Qatar 1974 to WGS 84 (2),transformation,4285,4326,B&R-Qat off,2,2406,Oil exploration.,9603,,,Derived by Brown & Root in 1992 for Qatar General Petroleum Corporation.,Qatar General Petroleum Corporation and Total-Fina,EPSG,2000-10-19 00:00:00,,1,0
-1563,Qatar 1974 to WGS 84 (3),transformation,4285,4326,CGIS-Qat,3,1346,Oil exploration.,9603,,,Derived by Qatar Centre for GIS.  See Qatar 1974 to WGS 84 (2) (code 1562) for transformation used by QGPC for offshore petroleum industry.,Qatar Centre for GIS,EPSG,2000-10-19 00:00:00,,1,0
-1564,NZGD49 to WGS 84 (2),transformation,4272,4326,OSG-Nzl 4m,2,1175,Transformation accuracy about 4 metres.,9607,,,These parameter values are taken from NZGD49 to NZGD2000 (4) (code 1701) and assume that NZGD2000 and WGS 84 are coincident to within the accuracy of the transformation. For improved accuracy use NZGD49 to WGS 84 (4) (code 1670).,Land Information New Zealand Office of Surveyor General policy statement 97/3.,EPSG,2000-10-19 00:00:00,,1,0
-1565,NZGD2000 to WGS 84 (1),transformation,4167,4326,OSG-Nzl,1,1175,Assumes NZGD2000 is coincident to WGS 84 to the 1m accuracy level.,9603,,,,http://www.linz.govt.nz/services/surveysystem/osgpublications/nzgd2000_trans.html,EPSG,2000-10-19 00:00:00,,1,0
-1566,NZGD49 to NZGD2000 (1),transformation,4272,4167,OSG-Nzl 5m,1,1175,5m accuracy.,9603,,,For better accuracy use  NZGD49 to NZGD2000 (4) (code 1701) or NZGD49 to NZGD2000 (3) (code 1568).,http://www.linz.govt.nz/services/surveysystem/osgpublications/nzgd2000_trans.html,EPSG,2000-10-19 00:00:00,,1,0
-1567,NZGD49 to NZGD2000 (2),transformation,4272,4167,OSG-Nzl 4m,2,1175,4m accuracy.,9607,,,4m accuracy.  For better accuracy use NZGD49 to NZGD2000 (3) (code 1568),http://www.linz.govt.nz/services/surveysystem/osgpublications/nzgd2000_trans.html,EPSG,2000-10-19 00:00:00,,1,1
-1568,NZGD49 to NZGD2000 (3),transformation,4272,4167,OSG-Nzl 1m,3,1175,0.2m accuracy.,9615,,,These same parameter values may be used to transform to WGS 84 - see NZGD49 to WGS 84 (4) (code 1670).,http://www.linz.govt.nz/services/surveysystem/osgpublications/nzgd2000_trans.html,EPSG,2000-10-19 00:00:00,,1,0
-1569,Accra to WGS 84 (1),transformation,4168,4326,MCE-Gha,1,1104,Military survey,9603,,,Derived at 3 common points.,Ordnance Survey International,EPSG,2000-10-19 00:00:00,,1,0
-1570,Accra to WGS 72BE (1),transformation,4168,4324,GSI-Gha,1,1505,Oil exploration.,9603,,,Derived be single point Transit observation at several locations.,Various oil industry sources,EPSG,2000-10-19 00:00:00,,1,0
-1571,Amersfoort to ETRS89 (1),transformation,4258,4326,NCG-Nld 2000,1,1172,Accuracy 0.5m,9607,,,"Dutch sources also quote an equivalent transformation with parameter values dX=+593.032 dY=+26.000 dZ=+478.741m, rX rY rZ and dS as this tfm. These values belong to a different transformation method and cannot be used with the Coordinate Frame method.",http://rdnap.kadaster.nl/rd/index.html  Also Nederlandse Commissie voor Geodesie publication 30; 3rd edition 1997.  Also with change of method [...]
-1572,NAD83 to NAD83(CSRS98) (1),transformation,4269,4140,SGQ-Can QC,1,1368,Accuracy 1-2 metres.,9615,,,Uses NT method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(CSRS98) (code 4140) have longitudes positive east. Can be taken as an approximate transformation NAD83 to WGS 84 - see code 1696.,Geodetic Service of Quebec.  Contact alain.bernard at mrn.gouv.qc.ca,EPSG,2000-10-19 00:00:00,,1,1
-1573,NAD27 to NAD83 (6),transformation,4267,4269,SGQ-Can QC NT2,6,1368,Accuracy 1-2 metres.,9615,,,Supersedes NAD27 to NAD83 (5) (code 1462).  Uses NT method which expects longitudes positive west; EPSG GeogCRSs NAD27 (code 4267) and NAD83 (code 4269) have longitudes positive east.,Geodetic Service of Quebec.  Contact alain.bernard at mrn.gouv.qc.ca,EPSG,2000-10-19 00:00:00,,1,0
-1574,NAD27 to NAD83(CSRS98) (1),transformation,4267,4140,SGQ-Can QC,1,1368,Accuracy 1-2 metres.,9615,,,Uses NT method which expects longitudes positive west; EPSG GeogCRSs NAD27 (code 4267) and NAD83(CSRS98) (code 4140) have longitudes positive east. Can be taken as an approximate transformation NAD27 to WGS 84 - see code 1692.,Geodetic Service of Quebec.  Contact alain.bernard at mrn.gouv.qc.ca,EPSG,2000-10-19 00:00:00,,1,1
-1575,NAD27(CGQ77) to NAD83 (2),transformation,4609,4269,SGQ-Can QC NT2,2,1368,Accuracy 1-2 metres.,9615,,,Supersedes NAD27(CGQ77) to NAD83 (1) (code 1451).  Uses NT method which expects longitudes positive west; EPSG GeogCRSs CGQ77 and NAD83 (codes 4609 and 4269) have longitudes positive east. Can be taken as approx transformation to WGS 84 - see code 1691.,Geodetic Service of Quebec.  Contact alain.bernard at mrn.gouv.qc.ca,EPSG,2000-10-19 00:00:00,,1,0
-1576,NAD27(CGQ77) to NAD83(CSRS98) (1),transformation,4609,4140,SGQ-Can QC,1,1368,Accuracy 1-2 metres.,9615,,,Uses NT method which expects longitudes positive west; EPSG GeogCRSs NAD27(CGQ77) (code 4609) and NAD83(CSRS98) (code 4140) have longitudes positive east. Can be taken as an approximate transformation NAD27(CGQ77) to WGS 84 - see code 1691.,Geodetic Service of Quebec.  Contact alain.bernard at mrn.gouv.qc.ca,EPSG,2000-10-19 00:00:00,,1,1
-1577,American Samoa 1962 to WGS 84 (1),transformation,4169,4326,NIMA-Asm,1,1027,For military purposes. One sigma uncertainty is 25m in each axis.,9603,,,Transformation based on observations at 2 stations in 1993.,NIMA TR8350.2 revision of January 2000.,EPSG,2000-10-19 00:00:00,,1,0
-1578,American Samoa 1962 to NAD83(HARN) (1),transformation,4169,4152,NGS-Asm W,1,2288,Geodetic survey. No accuracy stated.,9613,,,NADCON method which expects longitudes positive west; EPSG GeogCRSs American Samoa 1962 and NAD83(HARN) (codes 4169 and 4159) have longitudes positive east.  NADCON expects latitudes in northern hemisphere and values must be made positive prior to input.,ftp://ftp.ngs.noaa.gov/pub/pcsoft/nadcon/samoa_readme.txt,EPSG,2000-10-19 00:00:00,,1,0
-1579,American Samoa 1962 to NAD83(HARN) (2),transformation,4169,4152,NGS-Asm E,2,2289,Geodetic survey. No accuracy stated.,9613,,,NADCON method which expects longitudes positive west; EPSG GeogCRSs American Samoa 1962 and NAD83(HARN) (codes 4169 and 4159) have longitudes positive east.  NADCON expects latitudes in northern hemisphere and values must be made positive prior to input.,ftp://ftp.ngs.noaa.gov/pub/pcsoft/nadcon/samoa_readme.txt,EPSG,2000-10-19 00:00:00,,1,0
-1580,NAD83(HARN) to WGS 84 (1),transformation,4152,4326,EPSG-Usa,1,2424,Approximation at the +/- 1m level assuming that NAD83(HARN) is equivalent to WGS 84.,9603,,,For many purposes NAD83(HARN) can be considered to be coincident with WGS 84.,EPSG,EPSG,2000-10-19 00:00:00,,1,0
-1581,SIRGAS to WGS 84 (1),transformation,4170,4326,NIMA-S America,1,1341,For military purposes.,9603,,,,NIMA TR8350.2 revision of January 2000.,EPSG,2000-10-19 00:00:00,2001.33,1,0
-1582,PSAD56 to WGS 84 (10),transformation,4248,4326,TOT-Bol  Mad,10,2400,Oil exploration.,9603,,,Derived May 1995 by Geoid for Total.  OSU91A geoid model used.,TotalFinaElf,EPSG,2000-10-19 00:00:00,,1,0
-1583,PSAD56 to WGS 84 (11),transformation,4248,4326,TOT-Bol  B20,11,2401,Oil exploration.,9603,,,Derived July 1997 by Geoid from data recorded by UGA for Total.  OSU91A geoid model used.,Total-Fina,EPSG,2000-10-19 00:00:00,,1,0
-1584,Deir ez Zor to WGS 72BE (1),transformation,4227,4324,GECO-Syr,1,2329,Oil exploration.,9603,,,Derived by Transit at station 254 Deir.,Elf,EPSG,2000-10-19 00:00:00,,1,0
-1585,Deir ez Zor to WGS 84 (2),transformation,4227,4326,IGN-Syr,2,1227,?,9603,,,,IGN Paris,EPSG,2000-10-19 00:00:00,,1,0
-1586,Deir ez Zor to WGS 84 (3),transformation,4227,4326,SHL-Syr Whal,3,2327,Oil exploration.,9606,,,Derived in 1995.,Elf,EPSG,2000-10-19 00:00:00,,1,0
-1587,Deir ez Zor to WGS 84 (4),transformation,4227,4326,ELF-Syr Shad,4,2328,Oil exploration.,9603,,,Derived at four stations by Topnav in 1997.,Elf,EPSG,2000-10-19 00:00:00,,1,0
-1588,ED50 to ETRS89 (1),transformation,4230,4258,NMA-Nor N65 1997,1,2332,Accuracy 1m.,9606,,,Included in Statens Kartverk programme wsktrans from 1997. The same parameter values were adopted for ED50 to WGS84 (variant 23) transformation offshore Norway north of 62N from April 2001 - see code 1612.,Statens Kartverk.,EPSG,2001-06-05 00:00:00,2001.06,1,0
-1589,ED50 to ETRS89 (3),transformation,4230,4258,NMA-Nor 6265W,3,2333,Accuracy 2m.,9620,,,Included in Statens Kartverk programme wsktrans from 1997. See ED50 to WGS84 (23) (code 1612) for a simpler transformation accurate to better than 4m.,Statens Kartverk,EPSG,2000-10-19 00:00:00,,1,0
-1590,ED50 to WGS 84 (22),transformation,4230,4326,NMA-Nor 6265W 1997,22,2333,Oil exploration before 2001.,9620,,,Included in Statens Kartverk programme wsktrans between 1997 (v3.1) and 2001 (v4.0). Superseded ED50 to WGS 84 (20) (code 1450) in 1997. Superseded by ED50 to WGS 84 (23) (code 1612) in April 2001.,Statens Kartverk.,EPSG,2000-10-19 00:00:00,,1,0
-1591,RGF93 to ETRS89 (1),transformation,4171,4258,IGN-Fra,1,1096,RGF93 is a regional realisation of ETRS89.,9603,,,May be taken as approximate transformation RGF93 to WGS 84 - see code 1671.,TotalFinaElf,EPSG,2000-10-10 00:00:00,,1,0
-1592,Timbalai 1948 to WGS 84 (2),transformation,4298,4326,BSP-Brn,2,2348,Offshore oil exploration.,9603,,,These parameters produce a coordinate difference of 10m horizontally and 50m vertically compared to Timbalai 1948 to WGS 84 (3) (code 1615).,Brunei Shell Petroleum,EPSG,2002-10-19 00:00:00,,1,0
-1593,AGD84 to GDA94 (4),transformation,4203,4283,DOLA-Aus WA 0.1m,4,1280,0.1m accuracy.,9615,,,Replaced AGD84 to GDA94 (3) (code 1559) but then superseded by AGD84 to GDA94 (5) (code 1804). Input expects longitudes to be positive west; EPSG GeogCRS AGD84 (code 4203) and GDA94 (code 4283) both have longitudes positive east.,http://www.dola.wa.gov.au/lotl/survey_geodesy/gda1994/download.html,EPSG,2000-10-19 00:00:00,,1,0
-1594,AGD66 to GDA94 (8),transformation,4202,4283,OSG-Tas 1m,8,1282,Recommended for mid-accuracy use in Tasmania.  1m accuracy.,9607,,,Supersedes AGD66 to GDA94 (3) (code 1459) from August 2000.  For higher accuracy requirements see AGD66 to GDA94 (6) (code 1506).  May be taken as approximate transformation AGD66 to WGS 84 - see code 1667.,GDA Technical Manual (August 2000 revision) and http://www.delm.tas.gov.au/osg/Geodetic_transform.htm,EPSG,2000-10-19 00:00:00,,1,0
-1595,AGD66 to GDA94 (9),transformation,4202,4283,Auslig-NT 1m,9,2284,Recommended for mid-accuracy use in Northern Territory. 1m accuracy.,9607,,,For higher accuracy requirements see AGD66 to GDA94 (7) (code 1507).  May be taken as approximate transformation AGD66 to WGS 84 - see code 1668.,GDA Technical Manual. http://www.anzlic.org.au/icsm/gdatm/regional.htm,EPSG,2000-10-19 00:00:00,,1,0
-1596,AGD66 to GDA94 (10),transformation,4202,4283,OSG-Aus SE 0.1m,10,2287,0.1m accuracy.,9615,,,In Victoria supersedes AGD66 to GDA94 (5) (code 1464). Superseded by AGD66 to GDA94 (11) (code 1803).  Input expects longitudes to be positive west; EPSG GeogCRS AGD66 (code 4202) and GDA94 (code 4283) both have longitudes positive east.,http://www.osg.vic.gov.au/tools.htm,EPSG,2000-10-19 00:00:00,,1,0
-1597,Bogota 1975 to WGS 84 (2),transformation,4218,4326,BP-Col CusCup,2,2315,Oil exploration.,9603,,,Derived in 1995 by WGC at first order stations Recreo and Mena via multi-day ties to 4 IGS stations. Residuals under 20cm.,Various industry sources,EPSG,2000-10-19 00:00:00,,1,0
-1598,POSGAR to WGS 84 (1),transformation,4172,4326,EPSG-Arg,1,1033,?,9603,,,,EPSG,EPSG,2000-10-19 00:00:00,,1,1
-1599,ATS77 to NAD83(CSRS98) (2),transformation,4122,4140,PEI DOT-Can PEI,2,1533,?,9615,,,Can be taken as an approximate transformation ATS77 to WGS 84 - see code 1689.,PEI Department of Transportation & Public Works,EPSG,2000-10-19 00:00:00,,1,1
-1600,NAD27 to NAD83(CSRS98) (2),transformation,4267,4140,SK PMC-Can SK,2,2375,Accuracy 1-2 metres.,9615,,,Can be taken as an approximate transformation NAD27 to WGS 84 - see code 1703.,Dir Geodetic Surveys; SaskGeomatics Div.; Saskatchewan Property Management Company.,EPSG,2000-10-19 00:00:00,,1,1
-1601,NAD83 to NAD83(CSRS98) (2),transformation,4269,4140,SK PMC-Can SK,2,2375,Accuracy 1-2 metres.,9615,,,Can be taken as an approximate transformation NAD83 to WGS 84 - see code 1697.,Dir Geodetic Surveys; SaskGeomatics Div.; Saskatchewan Property Management Company.,EPSG,2000-10-19 00:00:00,,1,1
-1602,NAD83 to NAD83(CSRS98) (3),transformation,4267,4140,AB Env-Can AB,2,2376,Accuracy 1-2 metres.,9615,,,"This gridded difference file  AB_CSRS.DAC will need to be renamed to AB_CSRS.gsb to run in some software suites.  Formats identical, but AB file is provincial fit only.",Geodetic Control Section; Land and Forest Svc; Alberta Environment; http://www.gov.ab.ca/env/land/dos/ or email to geoff.banham at gov.ab.ca,EPSG,2000-10-19 00:00:00,,1,1
-1603,NAD27 to ATS77 (1),transformation,4267,4122,SNB-Can NB,1,1447,?,9634,,,For reverse transformation see ATS77 to NAD27 (1) (code 1606),Survey of New Brunswick,EPSG,2000-10-19 00:00:00,,1,0
-1604,NAD27 to ATS77 (2),transformation,4267,4122,SNB-Can PEI,2,1533,?,9634,,,For reverse transformation see ATS77 to NAD27 (2) (code 1607),Survey of New Brunswick,EPSG,2000-10-19 00:00:00,,1,0
-1605,NAD27 to ATS77 (3),transformation,4267,4122,SNB-Can NS,3,2313,?,9634,,,For reverse transformation see ATS77 to NAD27 (3) (code 1608),Survey of New Brunswick,EPSG,2000-10-19 00:00:00,,1,0
-1606,ATS77 to NAD27 (1),transformation,4122,4267,SNB-Can NB,1,1447,?,9634,,,For reverse transformation see NAD27 to ATS77 (1) (code 1603),Survey of New Brunswick,EPSG,2000-10-19 00:00:00,,1,0
-1607,ATS77 to NAD27 (2),transformation,4122,4267,SNB-Can NS,2,2313,?,9634,,,For reverse transformation see NAD27 to ATS77 (2) (code 1604),Survey of New Brunswick,EPSG,2000-10-19 00:00:00,,1,0
-1608,ATS77 to NAD27 (3),transformation,4122,4267,SNB-Can PEI,3,1533,?,9634,,,For reverse transformation see NAD27 to ATS77 (3) (code 1605),Survey of New Brunswick,EPSG,2000-10-19 00:00:00,,1,0
-1609,BD72 to WGS 84 (1),transformation,4313,4326,IGN-Bel 7,1,1044,For applications to an accuracy of 1 metre.,9607,,,,IGN Brussels www.ngi.be/FR/FR2-1-5-1.shtm,EPSG,2000-10-19 00:00:00,,1,0
-1610,BD72 to WGS 84 (2),transformation,4313,4326,IGN-Bel 3,2,1044,For applications to an accuracy of 5 metres.,9603,,,,IGN Brussels www.ngi.be/FR/FR2-1-5-1.shtm,EPSG,2000-10-19 00:00:00,,1,0
-1611,IRENET95 to ETRS89 (1),transformation,4173,4258,OSI-Ire,1,1305,?,9603,,,May be taken as approximate transformation IRENET95 to WGS 84 - see code 1678.,Ordnance Survey of Ireland,EPSG,2000-10-19 00:00:00,,1,0
-1612,ED50 to WGS 84 (23),transformation,4230,4326,EPSG-Nor N62 2001,23,2601,Oil industry offshore.,9606,,,"Parameter values are taken from ED50 to ETRS89 (1), code 1588. Adopted for ED50 to WGS84 transformations offshore Norway north of 62N from April 2001 when it superseded code 1590. Included in Statens Kartverk programme wsktrans from v4.0.",EPSG Guidance Note #10,EPSG,2001-06-05 00:00:00,,1,0
-1613,ED50 to WGS 84 (24),transformation,4230,4326,EPSG-Nor S62 2001,24,2334,Approximation to 1 metre for oil industry use.,9606,,,"Approximation to 1 metre of concatenated transformation ED50 to WGS 84 (14), code 8046. 8046 remains the transformation promulgated by Statens Kartverk but 1613 recommended by EPSG for practical oil industry usage.",EPSG Guidance Note #10,EPSG,2001-06-05 00:00:00,,1,0
-1614,Sierra Leone 1968 to WGS 84 (1),transformation,4175,4326,NIMA-Sle,1,1209,Accuracy +/- 15m in each axis.,9603,,,Determined at 8 stations. Info. source has the source CRS as Sierra Leone 1960.  Sierra Leone 1968 is a readjustment of the 1960 network: coordinates changed by less than 3 metres.,"NIMA TR8350.2 revision 3, 1997.",EPSG,2001-06-05 00:00:00,,1,0
-1615,Timbalai 1948 to WGS 84 (3),transformation,4298,4326,SD-Brn,3,2349,Topographic and engineering survey onshore.,9603,,,These parameters produce a coordinate difference of 10m horizontally and 50m vertically compared to Timbalai 1948 to WGS 84 (2) (code 1592).,Brunei Survey Department,EPSG,2001-06-05 00:00:00,,1,0
-1616,PSD93 to WGS 72 (1),transformation,4134,4322,PDO-Omn 93,1,1183,Oil exploration. Residuals 1.2m at 67% probability level.,9606,,,,Petroleum Development Oman,EPSG,2001-06-05 00:00:00,,1,0
-1617,PSD93 to WGS 84 (3),transformation,4134,4326,Tot-Omn 95,3,2404,Oil exploration.,9606,,,Accuracy better than 0.5m in block 4.,TotalFinaElf,EPSG,2001-06-05 00:00:00,,1,0
-1618,MGI to WGS 84 (3),transformation,4312,4326,BEV-Aut,3,1037,For applications to an accuracy of 1.5 metres.,9606,,,Same transformation parameters but to lesser precision used for MGI to ETRS89 (1) (code 1619).,Bundesamt f�r Eich- und Vermessungswesen via EuroGeographics http://crs.ifag.de,EPSG,2001-06-05 00:00:00,,1,0
-1619,MGI to ETRS89 (1),transformation,4312,4258,BEV-Aut,1,1037,For applications to an accuracy of 1.5 metres.,9606,,,Same transformation parameters but to greater precision used for MGI to WGS 84 (3) (code 1618).,Bundesamt f�r Eich- und Vermessungswesen via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-1620,MGI to ETRS89 (2),transformation,4312,4258,DGU-Hrv,2,1076,For applications to an accuracy of 1 metre.,9606,,,May be taken as approximate transformation MGI to WGS 84 - see code 1621.,Drzavna Geodetska Uprava via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-1621,MGI to WGS 84 (4),transformation,4312,4326,EPSG-Hrv,4,1076,For applications to an accuracy of 1 metre.,9606,,,Parameter values from MGI to ETRS89 (2) (code 1620). Assumes ETRS89 and WGS 84 can be considered the same to within the accuracy of the transformation.,EPSG,EPSG,2001-06-05 00:00:00,,1,0
-1622,S-JTSK to ETRS89 (1),transformation,4156,4258,CUZK-Cze,1,1079,For applications to an accuracy of 1 metre.,9606,,,May be taken as approximate transformation S-JTSK to WGS 84 - see code 1623.,Cesky Urad Zememericky a Katastraln via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-1623,S-JTSK to WGS 84 (1),transformation,4156,4326,EPSG-Cze,1,1079,For applications to an accuracy of 1 metre.,9606,,,Parameter values from S-JTSK to ETRS89 (1) (code 1622). Assumes ETRS89 and WGS 84 can be considered the same to within the accuracy of the transformation.,EPSG,EPSG,2001-06-05 00:00:00,,1,0
-1624,S-JTSK to ETRS89 (2),transformation,4156,4258,UGKK-Svk,2,1211,For applications to an accuracy of 1 metre.,9606,,,May be taken as approximate transformation S-JTSK to WGS 84 - see code 1625.,"Urad Geodezie, Kartografie a Katastra via EuroGeographics; http://crs.ifag.de/",EPSG,2001-06-05 00:00:00,,1,0
-1625,S-JTSK to WGS 84 (2),transformation,4156,4326,EPSG-Svk,2,1211,For applications to an accuracy of 1 metre.,9606,,,Parameter values from S-JTSK to ETRS89 (2) (code 1624). Assumes ETRS89 and WGS 84 can be considered the same to within the accuracy of the transformation.,EPSG,EPSG,2001-06-05 00:00:00,,1,0
-1626,ED50 to ETRS89 (4),transformation,4230,4258,KMS-Dnk,4,1080,For applications to an accuracy of 1 metre.,9606,,,May be taken as approximate transformation ED50 to WGS 84 - see code 1627.,Kort & Matrikelstyrelsen via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-1627,ED50 to WGS 84 (25),transformation,4230,4326,EPSG-Dnk,25,1080,For applications to an accuracy of 1 metre.,9606,,,Parameter values from ED50 to ETRS89 (4) (code 1626). Assumes ETRS89 and WGS 84 can be considered the same to within the accuracy of the transformation.,EPSG,EPSG,2001-06-05 00:00:00,,1,0
-1628,ED50 to ETRS89 (5),transformation,4230,4258,DGC-Gib,5,1105,For applications to an accuracy of 1 metre.,9603,,,May be taken as approximate transformation ED50 to WGS 84 - see code 1629.,UK Defence Geographic and Imagery Intelligence Agency via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-1629,ED50 to WGS 84 (26),transformation,4230,4326,EPSG-Gib,26,1105,For applications to an accuracy of 1 metre.,9603,,,Parameter values from ED50 to ETRS89 (5) (code 1628). Assumes ETRS89 and WGS 84 can be considered the same to within the accuracy of the transformation.,EPSG,EPSG,2001-06-05 00:00:00,,1,0
-1630,ED50 to ETRS89 (6),transformation,4230,4258,IGN-Esp Bal,6,2335,For applications to an accuracy of 1.5 metres.,9606,,,May be taken as approximate transformation ED50 to WGS 84 - see code 1631.,Centro Nacional de Informacion Geografica via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-1631,ED50 to WGS 84 (27),transformation,4230,4326,EPSG-Esp Bal,27,2335,For applications to an accuracy of 1.5 metres.,9606,,,Parameter values from ED50 to ETRS89 (6) (code 1630). Assumes ETRS89 and WGS 84 can be considered the same to within the accuracy of the transformation.,EPSG,EPSG,2001-06-05 00:00:00,,1,0
-1632,ED50 to ETRS89 (7),transformation,4230,4258,IGN-Esp,7,2336,For applications to an accuracy of 1.5 metres.,9606,,,May be taken as approximate transformation ED50 to WGS 84 - see code 1633.,Centro Nacional de Informacion Geografica via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-1633,ED50 to WGS 84 (28),transformation,4230,4326,EPSG-Esp,28,2336,For applications to an accuracy of 1.5 metres.,9606,,,Parameter values from ED50 to ETRS89 (7) (code 1632). Assumes ETRS89 and WGS 84 can be considered the same to within the accuracy of the transformation.,EPSG,EPSG,2001-06-05 00:00:00,,1,0
-1634,ED50 to ETRS89 (8),transformation,4230,4258,IGN-Esp NW,8,2337,For applications to an accuracy of 1.5 metres.,9606,,,May be taken as approximate transformation ED50 to WGS 84 - see code 1635.,Centro Nacional de Informacion Geografica via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-1635,ED50 to WGS 84 (29),transformation,4230,4326,EPSG-Esp NW,29,2337,For applications to an accuracy of 1.5 metres.,9606,,,Parameter values from ED50 to ETRS89 (8) (code 1634). Assumes ETRS89 and WGS 84 can be considered the same to within the accuracy of the transformation.,EPSG,EPSG,2001-06-05 00:00:00,,1,0
-1638,KKJ to ETRS89 (1),transformation,4123,4258,NLS-Fin,1,1095,For applications to an accuracy of 1 to 2 metres.,9606,,,May be taken as approximate transformation KKJ to WGS 84 - see code 1639.,National Land Survey of Finland via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-1639,KKJ to WGS 84 (1),transformation,4123,4326,EPSG-Fin,1,1095,For applications to an accuracy of 1 to 2 metres.,9606,,,Parameter values from KKJ to ETRS89 (1) (code 1638). Assumes ETRS89 and WGS 84 can be considered the same to within the accuracy of the transformation.,EPSG,EPSG,2001-06-05 00:00:00,,1,0
-1640,TM65 to ETRS89 (1),transformation,4299,4258,OSI-Ire,1,1305,For applications to an accuracy of 1 metre.,9606,,,May be taken as approximate transformation TM65 to WGS 84 - see code 1641.,Ordnance Survey Ireland via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-1641,TM65 to WGS 84 (2),transformation,4299,4326,EPSG-Ire,2,1305,For applications to an accuracy of 1 metre.,9606,,,Parameter values from TM65 to ETRS89 (1) (code 1640). Assumes ETRS89 and WGS 84 can be considered the same to within the accuracy of the transformation.,EPSG,EPSG,2001-06-05 00:00:00,,1,0
-1642,Luxembourg 1930 to ETRS89 (1),transformation,4181,4258,ACT-Lux,1,1146,For applications to an accuracy of 1 metre.,9606,,,May be taken as approximate transformation Luxembourg 1930 to WGS 84 - see code 1643.,Administration du Cadastre et de la Topographie via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-1643,Luxembourg 1930 to WGS 84 (1),transformation,4181,4326,EPSG-Lux,1,1146,For applications to an accuracy of 1 metre.,9606,,,Parameter values from Luxembourg 1930 to ETRS89 (1) (code 1642). Assumes ETRS89 and WGS 84 can be considered the same to within the accuracy of the transformation.,EPSG,EPSG,2001-06-05 00:00:00,,1,0
-1644,Pulkovo 1942(58) to ETRS89 (1),transformation,4179,4258,GUGK-Pol,1,1192,For applications to an accuracy of 1 metre.,9606,,,May be taken as approximate transformation Pulkovo 1942(58) to WGS 84 - see code 1645.,Glowny Urzad Geodezji i Kartografii via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-1645,Pulkovo 1942(58) to WGS 84 (1),transformation,4179,4326,EPSG-Pol,1,1192,For applications to an accuracy of 1 metre.,9606,,,Parameter values from Pulkovo 1942(58) to ETRS89 (1) (code 1644). Assumes ETRS89 and WGS 84 can be considered the same to within the accuracy of the transformation.,EPSG,EPSG,2001-06-05 00:00:00,,1,0
-1646,CH1903 to ETRS89 (1),transformation,4149,4258,BfL-Che,1,1286,Accuracy 1.5 metres.,9603,,,These parameters are strictly from CH1903+ to CHTRF95 or ETRS89 but are used as from CH1903 as an approximation which is within the accuracy of the distortions in the CH1903 network. They are given to full precision as CH1903 to WGS 84 (1) (code 1510).,Bundesamt f�r Landestopographie via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-1647,CH1903+ to ETRS89 (1),transformation,4150,4258,BfL-Che,1,1286,For applications to an accuracy of 0.1 metres.,9603,,,This transformation is also given as CH1903+ to CHTRF95 (1) (code 1509). CHTRF95 is a local realisation of ETRS89.,Bundesamt f�r Landestopographie via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-1648,EST97 to ETRS89 (1),transformation,4180,4258,NLB-Est,1,1090,EST97 is a realisation of ETRS89.,9603,,,May be taken as approximate transformation EST97 to WGS 84 - see code 1649.,Estonian National Land Board via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-1649,EST97 to WGS 84 (1),transformation,4180,4326,EPSG-Est,1,1090,For applications to an accuracy of 1 metre.,9603,,,Assumes ETRS89 and WGS 84 can be considered the same to within the accuracy of the transformation.,EPSG,EPSG,2001-06-05 00:00:00,,1,0
-1650,ED50 to ETRS89 (10),transformation,4230,4258,IGN-Fra,10,1096,For applications to an accuracy of 2 metres.,9603,,,These same parameter values are used to transform to WGS 84. See ED50 to WGS 84 (17) (code 1275).,Institut Geographique National via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-1651,NTF to ETRS89 (1),transformation,4275,4258,IGN-Fra,1,1096,For applications to an accuracy of 2 metres.,9603,,,These same parameter values are used to transform to WGS 84. See NTF to WGS 84 (1) (code 1193).,Institut Geographique National via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-1652,BD72 to ETRS89 (1),transformation,4313,4258,IGN-Bel,1,1044,For applications to an accuracy of 1 metre.,9606,,,May be taken as approximate transformation BD72 to WGS 84 - see code 1609.,Institut Geographique National via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-1653,NGO 1948 to ETRS89 (1),transformation,4273,4258,SKV-Nor,1,1352,For applications to an accuracy of 3 metres.,9606,,,May be taken as approximate transformation NGO 1948 to WGS 84 - see code 1654.,Statens Kartverk via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-1654,NGO 1948 to WGS 84 (1),transformation,4273,4326,EPSG-Nor,1,1352,For applications to an accuracy of 3 metres.,9606,,,Parameter values from NGO 1948 to ETRS89 (1) (code 1653). Assumes ETRS89 and WGS 84 can be considered the same to within the accuracy of the transformation.,EPSG,EPSG,2001-06-05 00:00:00,,1,0
-1655,Lisbon to ETRS89 (1),transformation,4207,4258,ICC-Prt 2000,1,1294,For applications to an accuracy of 3 metres.,9606,,,Derived in 2000 at 8 stations.  Superseded by 2001 derivation (code 1790).,Instituto Portugues de Cartografia e Cadastro via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-1656,Lisbon to WGS 84 (1),transformation,4207,4258,EPSG-Prt 2000,1,1294,For applications to an accuracy of 3 metres.,9606,,,Parameter values from Lisbon to ETRS89 (1) (code 1655). Assumes ETRS89 and WGS 84 can be considered the same to within the accuracy of the transformation.,EPSG,EPSG,2001-06-05 00:00:00,,1,1
-1657,Datum 73 to ETRS89 (1),transformation,4274,4258,ICC-Prt 2000,1,1294,For applications to an accuracy of 2 metres.,9606,,,Derived in 2000 at 8 stations.  Superseded by 2001 derivation (code 1792).,Instituto Portugues de Cartografia e Cadastro via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-1658,Datum 73 to WGS 84 (1),transformation,4274,4258,EPSG-Prt 2000,1,1294,For applications to an accuracy of 2 metres.,9606,,,Parameter values from Datum 73 to ETRS89 (1) (code 1657). Assumes ETRS89 and WGS 84 can be considered the same to within the accuracy of the transformation.,EPSG,EPSG,2001-06-05 00:00:00,,1,1
-1659,Monte Mario to ETRS89 (1),transformation,4265,4258,IGM-Ita main,1,2372,Accuracy: 4 metres,9606,,,May be taken as approximate transformation Monte Mario to WGS 84 - see code 1660.,Istituto Geografico Militare Italiano via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-1660,Monte Mario to WGS 84 (4),transformation,4265,4326,EPSG-Ita main,4,2372,Accuracy: 4 metres,9606,,,Parameter values from Monte Mario to ETRS89 (1) (code 1659). Assumes ETRS89 and WGS 84 can be considered the same to within the accuracy of the transformation.,EPSG,EPSG,2001-06-05 00:00:00,,1,0
-1661,Monte Mario to ETRS89 (2),transformation,4265,4258,IGM-Ita Sar,2,2339,Accuracy: 4 metres,9606,,,May be taken as approximate transformation Monte Mario to WGS 84 - see code 1662.,Istituto Geografico Militare Italiano via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-1662,Monte Mario to WGS 84 (2),transformation,4265,4326,EPSG-Ita Sar,2,2339,Accuracy: 4 metres,9606,,,Parameter values from Monte Mario to ETRS89 (2) (code 1661). Assumes ETRS89 and WGS 84 can be considered the same to within the accuracy of the transformation.,EPSG,EPSG,2001-06-05 00:00:00,,1,0
-1663,Monte Mario to ETRS89 (3),transformation,4265,4258,IGM-Ita Sic,3,2340,Accuracy: 4 metres,9606,,,May be taken as approximate transformation Monte Mario to WGS 84 - see code 1664.,Istituto Geografico Militare Italiano via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-1664,Monte Mario to WGS 84 (3),transformation,4265,4326,EPSG-Ita Sic,3,2340,Accuracy: 4 metres,9606,,,Parameter values from Monte Mario to ETRS89 (3) (code 1663). Assumes ETRS89 and WGS 84 can be considered the same to within the accuracy of the transformation.,EPSG,EPSG,2001-06-05 00:00:00,,1,0
-1665,AGD66 to WGS 84 (12),transformation,4202,4326,EPSG-ACT 1m,12,2283,Recommended for mid-accuracy use in A.C.T.  1m accuracy.,9607,,,Parameter values from AGD66 to GDA94 (2) (code 1458). Assumes GDA94 and WGS 84 can be considered the same to within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1666,AGD66 to WGS 84 (13),transformation,4202,4326,EPSG-NSW Vic 1m,13,2286,Recommended for mid-accuracy use in NSW and Victoria.  1m accuracy.,9607,,,Parameter values from AGD66 to GDA94 (4) (code 1460). Assumes GDA94 and WGS 84 can be considered the same to within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1667,AGD66 to WGS 84 (14),transformation,4202,4326,EPSG-Tas 1m,14,1282,Recommended for mid-accuracy use in Tasmania.  1m accuracy.,9607,,,Parameter values from AGD66 to GDA94 (8) (code 1594). Assumes GDA94 and WGS 84 can be considered the same to within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1668,AGD66 to WGS 84 (15),transformation,4202,4326,EPSG-NT 1m,15,2284,Recommended for mid-accuracy use in Northern Territory. 1m accuracy.,9607,,,Parameter values from AGD66 to GDA94 (9) (code 1595). Assumes GDA94 and WGS 84 can be considered the same to within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1669,AGD84 to WGS 84 (7),transformation,4203,4326,EPSG-Aus 1m,7,1036,1m accuracy.,9607,,,Parameter values from AGD84 to GDA94 (2) (code 1280). Assumes GDA94 and WGS 84 can be considered the same to within the accuracy of the transformation. Supersedes AGD84 to WGS 84 (2) (code 1236).,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1670,NZGD49 to WGS 84 (3),transformation,4272,4326,EPSG-Nzl 1m,3,1175,Accuracy about 1m.,9615,,,Parameter file is from NZGD49 to NZGD2000 (3) (code 1568) and assumes  WGS 84 is coincident with NZGD2000 to the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1671,RGF93 to WGS 84 (1),transformation,4171,4326,EPSG-Fra,1,1096,Approximation at the +/- 1m level.,9603,,,Parameter values from RGF93 to ETRS89 (1) (code 1591) assuming that ETRS89 is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1672,Amersfoort to WGS 84 (2),transformation,4289,4326,EPSG-Nld,2,1275,Approximation at the +/- 1m level.,9607,,,Parameter values from Amersfoort to ETRS89 (2) (code 1751) assuming that ETRS89 is equivalent to WGS 84 within the accuracy of the transformation. Supersedes Amersfoort to WGS 84 (1) (code 1112).,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1673,DHDN to WGS 84 (1),transformation,4314,4326,EPSG-Deu W,1,2326,For applications with an accuracy at 5 m level.,9607,,,Parameter values from DHDN to ETRS89 (1) (code 1309) assuming that ETRS89 is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1674,Pulkovo 1942(83) to ETRS89 (1),transformation,4178,4258,IfAG-Deu E,1,1343,Residuals under 2 m.,9607,,,Mean of 20 stations. May be taken as approximate transformation to WGS 84 - see code 1675. Also given by EuroGeographics at http://crs.ifag.de/ as a Position Vector transformation with changed values for rotations. Superseded in 2001 by code 1775.,Institute for Cartography and Geodesy; Leipzig.,EPSG,2001-08-15 00:00:00,,1,0
-1675,Pulkovo 1942(83) to WGS 84 (1),transformation,4178,4326,EPSG-Deu E,1,1343,Residuals under 2 m.,9607,,,Parameter values from Pulkovo 1942(83) to ETRS89 (1) (code 1674) assuming that ETRS89 is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1676,CH1903+ to WGS 84 (1),transformation,4150,4326,BfL-CH,1,1286,Approximation at the +/- 1m level.,9603,,,Parameter values are from CH1903+ to CHTRF95 (1) (code 1509) assuming that CHTRF95 is equivalent to WGS 84. That transformation is also given as CH1903+ to ETRS89 (1) (code 1647). CHTRF95 is a realisation of ETRS89.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1677,HD72 to WGS 84 (1),transformation,4237,4326,EPSG-Hun,1,1119,Approximation at the +/- 1m level.,9607,,,Parameter values taken from HD72 to ETRS89 (1) (code 1273) assuming that ETRS89 is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,1
-1678,IRENET95 to WGS 84 (1),transformation,4173,4326,EPSG-Ire,1,1305,Approximation at the +/- 1m level.,9603,,,Assumes that ETRS89 is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1679,Pulkovo 1942 to WGS 84 (2),transformation,4284,4326,EPSG-Ltu,2,1145,Approximation at the +/- 1m level.,9607,,,Parameter values taken from Pulkovo 1942 to LKS94(ETRS89) (1) (code 1274) assuming that LKS94(ETRS89) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1680,RT90 to WGS 84 (1),transformation,4124,4326,EPSG-Swe,1,1225,Approximation at the +/- 1m level.,9607,,,Parameter values from RT90 to ETRS89 (1) (code 1437) assuming that ETRS89 is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1681,OSGB 1936 / British National Grid to WGS 84 (1),transformation,27700,4326,EPSG-Gbr,1,1264,Accuracy about 0.5m.,9633,,,Parameter values taken from OSGB 1936 / British National Grid to ETRS89 (1) (code 1036) assuming that ETRS89 is coincident with WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1682,South Yemen to WGS 84 (1),transformation,4164,4326,EPSG-Yem South,1,1340,Approximation at the +/- 1m level.,9603,,,Parameter values taken from South Yemen to Yemen NGN96 (1) (code 1539) assuming that NGN96 is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1683,Tete to WGS 84 (1),transformation,4127,4326,EPSG-Moz,1,1167,Residuals as high as 30 metres.,9607,,,Parameter values taken from Tete to Moznet (1) (code 1297) assuming that Moznet is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1684,Tete to WGS 84 (2),transformation,4127,4326,EPSG-Moz A,2,2350,Residuals are generally under 1 metre.,9607,,,Parameter values taken from Tete to Moznet (2) (code 1298) assuming that Moznet is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1685,Tete to WGS 84 (3),transformation,4127,4326,EPSG-Moz B,3,2351,Residuals are generally under 4 metres.,9607,,,Parameter values taken from Tete to Moznet (3) (code 1299) assuming that Moznet is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1686,Tete to WGS 84 (4),transformation,4127,4326,EPSG-Moz C,4,2352,Residuals are generally under 3 metres.,9607,,,Parameter values taken from Tete to Moznet (4) (code 1300) assuming that Moznet is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1687,Tete to WGS 84 (5),transformation,4127,4326,EPSG-Moz D,5,2353,Residuals are 5-10 metres.,9607,,,Parameter values taken from Tete to Moznet (5) (code 1301) assuming that Moznet is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1688,ATS77 to WGS 84 (1),transformation,4122,4326,EPSG-Can NB,1,1447,Approximation at the +/- 1m level.,9615,,,Parameter file is from ATS77 to NAD83(CSRS) (1) (code 1841) assuming that NAD83(CSRS) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1689,ATS77 to WGS 84 (2),transformation,4122,4326,EPSG-Can PEI,2,1533,Approximation at the +/- 1m level.,9615,,,Parameter file is from ATS77 to NAD83(CSRS) (2) (code 1846) assuming that NAD83(CSRS) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1690,NAD27(76) to WGS 84 (1),transformation,4608,4326,EPSG-Can On,1,1367,Approximation at the +/- 1m level.,9615,,,Parameter file is from NAD27(76) to NAD83 (1) (code 1463) assuming that NAD83 is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1691,NAD27(CGQ77) to WGS 84 (3),transformation,4609,4326,EPSG-Can Qc NT2,3,1368,Approximation at the +/- 1m level.,9615,,,Parameter file is from NAD27(CGQ77) to NAD83(CSRS) (1) (code 1845) assuming that NAD83(CSRS98) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1692,NAD27 to WGS 84 (34),transformation,4267,4326,EPSG-Can QC,34,1368,Approximation at the +/- 1m level.,9615,,,Parameter file is from NAD27 to NAD83(CSRS) (1) (code 1844) assuming that NAD83(CSRS) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1693,NAD27 to WGS 84 (33),transformation,4267,4326,EPSG-Can,33,1061,Approximation at the +/- 1m level.,9615,,,Parameter file is from NAD27 to NAD83 (4) (code 1313) assuming that NAD83 is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1694,American Samoa 1962 to WGS 84 (2),transformation,4169,4326,EPSG-Asm W,2,2288,Accuracy 1m.,9613,,,"Parameter files are from American Samoa 1962 to NAD83(HARN) (1) (code 1578), but for many purposes NAD83(HARN) can be considered to be coincident with WGS 84 within the accuracy of the transformation.",EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1695,American Samoa 1962 to WGS 84 (3),transformation,4169,4326,EPSG-Asm E,3,2289,Accuracy 1m.,9613,,,"Parameter files are from American Samoa 1962 to NAD83(HARN) (2) (code 1579), but for many purposes NAD83(HARN) can be considered to be coincident with WGS 84 within the accuracy of the transformation.",EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1696,NAD83 to WGS 84 (6),transformation,4269,4326,EPSG-Can QC,6,1368,Approximation at the +/- 1m level.,9615,,,Parameter file is from NAD83 to NAD83(CSRS) (1) (code 1843) assuming that NAD83(CSRS) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1697,NAD83 to WGS 84 (7),transformation,4269,4326,EPSG-Can SK,7,2375,Approximation at the +/- 1m level.,9615,,,Parameter file is from NAD83 to NAD83(CSRS8) (2) (code 1848) assuming that NAD83(CSRS) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1698,St. George Island to WGS 84 (1),transformation,4138,4326,EPSG-Usa AK StG,1,1331,Approximation at the +/- 1 to 2m level.,9613,,,Parameter files are from St. George Island to NAD83 (1) (code 1457) assuming that NAD83 is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1699,St. Lawrence Island to WGS 84 (1),transformation,4136,4326,EPSG-Usa AK StL,1,1332,Approximation at the +/- 1 to 2m level.,9613,,,Parameter files are from St. Lawrence Island to NAD83 (1) (code 1455) assuming that NAD83 is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1700,St. Paul Island to WGS 84 (1),transformation,4137,4326,EPSG-Usa AK StP,1,1333,Approximation at the +/- 1 to 2m level.,9613,,,Parameter files are from St. Paul Island to NAD83 (1) (code 1456) assuming that NAD83 is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1701,NZGD49 to NZGD2000 (2),transformation,4272,4167,OSG-Nzl 4m,2,1175,4m accuracy.,9607,,,For better accuracy use NZGD49 to NZGD2000 (3) (code 1568).,http://www.linz.govt.nz/services/surveysystem/osgpublications/nzgd2000_trans.html,EPSG,2001-08-28 00:00:00,,1,0
-1702,NAD83 to WGS 84 (8),transformation,4269,4326,EPSG-Can AB,8,2376,Approximation at the +/- 1m level.,9615,,,Parameter file is from NAD83 to NAD83(CSRS) (3) (code 1849) assuming that NAD83(CSRS) is equivalent to WGS 84 within the accuracy of the transformation. This file  AB_CSRS.DAC will need to be renamed to AB_CSRS.gsb to run in some sodtware.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1703,NAD27 to WGS 84 (32),transformation,4267,4326,EPSG-Can SK,32,2375,Approximation at the +/- 1m level.,9615,,,Parameter file is from NAD27 to NAD83(CSRS98) (1) (code 1600) assuming that NAD83(CSRS98) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1704,NAD83 to NAD83(HARN) (40),transformation,4269,4152,NGS-Usa AR,40,1374,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.   May be taken as approximate transformation NAD83-WGS 84 - see code 1708.,US Coast & Geodetic Survey  ftp://ftp.ngs.noaa.gov/pub/pcsoft/nadcon,EPSG,2001-08-15 00:00:00,,1,0
-1705,NAD83 to NAD83(HARN) (41),transformation,4269,4152,NGS-Usa IA,41,1384,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.  May be taken as approximate transformation NAD83-WGS 84 - see code 1709.,US Coast & Geodetic Survey  ftp://ftp.ngs.noaa.gov/pub/pcsoft/nadcon,EPSG,2001-08-15 00:00:00,,1,0
-1706,NAD83 to NAD83(HARN) (42),transformation,4269,4152,NGS-Usa MN,42,1392,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.   May be taken as approximate transformation NAD83-WGS 84 - see code 1710.,US Coast & Geodetic Survey  ftp://ftp.ngs.noaa.gov/pub/pcsoft/nadcon,EPSG,2001-08-15 00:00:00,,1,0
-1707,NAD83 to NAD83(HARN) (43),transformation,4269,4152,NGS-Usa MO,43,1394,Geodetic survey. Accuracy 0.05m at 67% confidence level.,9613,,,Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(HARN) (code 4152) have longitudes positive east.  May be taken as approximate transformation NAD83-WGS 84 - see code 1711.,US Coast & Geodetic Survey  ftp://ftp.ngs.noaa.gov/pub/pcsoft/nadcon,EPSG,2001-08-15 00:00:00,,1,0
-1708,NAD83 to WGS 84 (12),transformation,4269,4326,EPSG-USA Ar,12,1374,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (40) (code 1704) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1709,NAD83 to WGS 84 (13),transformation,4269,4326,EPSG-Usa IA,13,1384,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (41) (code 1705) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1710,NAD83 to WGS 84 (14),transformation,4269,4326,EPSG-Usa MN,14,1392,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (42) (code 1706) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1711,NAD83 to WGS 84 (15),transformation,4269,4326,EPSG-Usa MO,15,1394,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (43) (code 1707) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1712,NAD83 to WGS 84 (16),transformation,4269,4326,EPSG-Usa CO,16,1376,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (5) (code 1478) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1713,NAD83 to WGS 84 (17),transformation,4269,4326,EPSG-Usa GA,17,1380,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (6) (code 1479) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1714,NAD83 to WGS 84 (18),transformation,4269,4326,EPSG-Usa FL,18,1379,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (7) (code 1480) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1715,NAD83 to WGS 84 (19),transformation,4269,4326,EPSG-Usa ID MT e,19,2382,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (8) (code 1481) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1716,NAD83 to WGS 84 (20),transformation,4269,4326,EPSG-Usa ID MT w,20,2383,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (9) (code 1482) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1717,NAD83 to WGS 84 (21),transformation,4269,4326,EPSG-Usa AL,21,1372,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (1) (code 1474) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1718,NAD83 to WGS 84 (22),transformation,4269,4326,EPSG-Usa KY,22,1386,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (10) (code 1483) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1719,NAD83 to WGS 84 (23),transformation,4269,4326,EPSG-Usa LA,23,1387,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (11) (code 1484) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1720,NAD83 to WGS 84 (24),transformation,4269,4326,EPSG-Usa DE MD,24,2377,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (12) (code 1485) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1721,NAD83 to WGS 84 (25),transformation,4269,4326,EPSG-Usa ME,25,1388,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (13) (code 1486) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1722,NAD83 to WGS 84 (26),transformation,4269,4326,EPSG-Usa MI,26,1391,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (14) (code 1487) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1723,NAD83 to WGS 84 (27),transformation,4269,4326,EPSG-Usa MS,27,1393,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (15) (code 1488) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1724,NAD83 to WGS 84 (28),transformation,4269,4326,EPSG-Usa NE,28,1396,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (16) (code 1489) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1725,NAD83 to WGS 84 (29),transformation,4269,4326,EPSG-Usa NewEng,29,2378,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (17) (code 1490) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1726,NAD83 to WGS 84 (30),transformation,4269,4326,EPSG-Usa NM,30,1400,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (18) (code 1491) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1727,NAD83 to WGS 84 (31),transformation,4269,4326,EPSG-Usa NY,31,1401,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (19) (code 1492) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1728,NAD83 to WGS 84 (32),transformation,4269,4326,EPSG-Usa AZ,32,1373,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (2) (code 1475) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1729,NAD83 to WGS 84 (33),transformation,4269,4326,EPSG-Usa ND,33,1403,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (20) (code 1493) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1730,NAD83 to WGS 84 (34),transformation,4269,4326,EPSG-Usa OK,34,1405,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (21) (code 1494) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1731,NAD83 to WGS 84 (35),transformation,4269,4326,EPSG-PRVI,35,1335,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (22) (code 1495) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1732,NAD83 to WGS 84 (36),transformation,4269,4326,EPSG-Usa SD,36,1410,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (23) (code 1496) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1733,NAD83 to WGS 84 (37),transformation,4269,4326,EPSG-Usa TN,37,1411,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (24) (code 1497) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1734,NAD83 to WGS 84 (38),transformation,4269,4326,EPSG-Usa TX e,38,2379,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (25) (code 1498) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1735,NAD83 to WGS 84 (39),transformation,4269,4326,EPSG-Usa TX w,39,2380,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (26) (code 1499) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1736,NAD83 to WGS 84 (40),transformation,4269,4326,EPSG-Usa VA,40,1415,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (27) (code 1500) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1737,NAD83 to WGS 84 (41),transformation,4269,4326,EPSG-Usa OR WA,41,2381,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (28) (code 1501) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1738,NAD83 to WGS 84 (42),transformation,4269,4326,EPSG-Usa WI,42,1418,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (29) (code 1502) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1739,NAD83 to WGS 84 (43),transformation,4269,4326,EPSG-Usa CA n,43,2297,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (3) (code 1476) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1740,NAD83 to WGS 84 (44),transformation,4269,4326,EPSG-Usa WY,44,1419,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (30) (code 1503) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1741,NAD83 to WGS 84 (45),transformation,4269,4326,EPSG-Usa HI,45,1334,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (31) (code 1520) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1742,NAD83 to WGS 84 (46),transformation,4269,4326,EPSG-Usa IN,46,1383,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (32) (code 1521) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1743,NAD83 to WGS 84 (47),transformation,4269,4326,EPSG-Usa KS,47,1385,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (33) (code 1522) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1744,NAD83 to WGS 84 (48),transformation,4269,4326,EPSG-Usa NV,48,1397,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (34) (code 1523) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1745,NAD83 to WGS 84 (49),transformation,4269,4326,EPSG-Usa OH,49,1404,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (35) (code 1524) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1746,NAD83 to WGS 84 (50),transformation,4269,4326,EPSG-Usa UT,50,1413,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (36) (code 1525) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1747,NAD83 to WGS 84 (51),transformation,4269,4326,EPSG-Usa WV,51,1417,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (37) (code 1526) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1748,NAD83 to WGS 84 (52),transformation,4269,4326,EPSG-Usa IL,52,1382,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (38) (code 1553) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1749,NAD83 to WGS 84 (53),transformation,4269,4326,EPSG-Usa NJ,53,1399,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (39) (code 1554) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1750,NAD83 to WGS 84 (54),transformation,4269,4326,EPSG-Usa CA s,54,2298,Approximation at the +/- 1m level.,9613,,,Parameter files are from NAD83 to NAD83(HARN) (4) (code 1477) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-1751,Amersfoort to ETRS89 (1),transformation,4289,4258,NCG-Nld 2000,1,1172,Accuracy 0.5m,9607,,,"Dutch sources also quote an equivalent transformation with parameter values dX=+593.032 dY=+26.000 dZ=+478.741m, rX rY rZ and dS as this tfm. These values belong to a different transformation method and cannot be used with the Coordinate Frame method.",http://rdnap.kadaster.nl/rd/index.html  Also Nederlandse Commissie voor Geodesie publication 30; 3rd edition 1997.  Also with change of method [...]
-1752,NAD83 to NAD83(CSRS98) (3),transformation,4269,4140,AB Env-Can AB,3,2376,?,9615,,,"This gridded difference file  AB_CSRS.DAC will need to be renamed to AB_CSRS.gsb to run in some software suites.  Formats identical, but AB file is provincial fit only.  Can be taken as an approximate transformation NAD83 to WGS 84 - see code 1702.",Geodetic Control Section; Land and Forest Svc; Alberta Environment; http://www.gov.ab.ca/env/land/dos/ or email to geoff.banham at gov.ab.ca,EPSG,2000-10-19  [...]
-1753,CH1903 to WGS 84 (1),transformation,4149,4326,BfL-CH 1,1,1286,?,9607,,,Implemented in Bundesamt f�r Landestopographie programme GRANIT.,Bundesamt f�r Landestopographie.  Aufbau der Landesvermessung der Schweiz 'LV95' Teil 3: Terrestrische Bezugssysteme und Bezugsrahmen. L+T 1999.,EPSG,2001-08-28 00:00:00,,1,0
-1754,Minna to WGS 84 (3),transformation,4263,4326,SHL-Nga S,3,2371,Oil exploration.,9606,,,"Used by Shell SPDC throughout southern Nigeria onshore, delta and shallow offshore from 1994; adopted by Total for offshore OPL246.",Shell Petroleum Development Company,EPSG,2002-03-15 00:00:00,2001.38  2002.29,1,0
-1755,Bogota 1975 (Bogota) to Bogota 1975,transformation,4802,4218,IGAC-Col,1,1070,Change of prime meridian.,9601,,,,EPSG,EPSG,2001-10-04 00:00:00,2001.39,1,0
-1756,Lisbon (Lisbon) to Lisbon,transformation,4803,4207,IGC-Prt,1,1294,Change of prime meridian.,9601,,,,EPSG,EPSG,2001-10-04 00:00:00,2001.39,1,0
-1757,MGI (Ferro) to MGI,transformation,4805,4312,BEV-Aut balk,1,1166,Change of prime meridian.,9601,,,,EPSG,EPSG,2001-10-04 00:00:00,2001.39,1,0
-1758,Padang (Jakarta) to Padang,transformation,4808,4280,EPSG-Idn Sumatra,1,1355,Change of prime meridian.,9601,,,,EPSG,EPSG,2001-10-04 00:00:00,2001.39,1,0
-1759,Batavia (Jakarta) to Batavia,transformation,4813,4211,EPSG-Idn Java,1,1285,Change of prime meridian.,9601,,,,EPSG,EPSG,2001-10-04 00:00:00,2001.39,1,0
-1760,RT38 (Stockholm) to RT38,transformation,4814,4308,NLS-Swe,1,1225,Change of prime meridian.,9601,,,,EPSG,EPSG,2001-10-04 00:00:00,2001.39,1,0
-1761,Greek (Athens) to Greek,transformation,4815,4120,NTU-Grc,1,1106,Change of prime meridian.,9601,,,,Topography Department; National Technical University of Athens.,EPSG,2001-10-04 00:00:00,2001.39,1,0
-1762,NGO 1948 (Oslo) to NGO1948,transformation,4817,4273,NGO-Nor,1,1352,Change of prime meridian.,9601,,,,"J. Danielsen; ""Transformasjoner ved Norges Geografiske Oppm�ling""; Kart Og Plan nr 1; 1982.",EPSG,2001-10-04 00:00:00,2001.39,1,0
-1763,NTF (Paris) to NTF (1),transformation,4807,4275,IGN-Fra,1,1096,Change of prime meridian.,9601,,,,IGN Paris.,EPSG,2001-10-04 00:00:00,2001.39,1,0
-1764,NTF (Paris) to NTF (2),transformation,4807,4275,RGS,2,1096,Change of prime meridian.,9601,,,EPSG prefers value from IGN Paris (code 1467).,Royal Geographic Society; London,EPSG,2001-10-04 00:00:00,2001.39,1,0
-1765,Bern 1898 (Bern) to CH1903,transformation,4801,4149,BfL-CH,1,1286,Change of prime meridian.,9601,,,,EPSG,EPSG,2001-10-04 00:00:00,2001.39,1,0
-1766,CH1903 to WGS 84 (2),transformation,4149,4326,BfL-CH 2,2,1286,Accuracy 1.5 metres.,9603,,,These parameters are strictly between CH1903+ and CHTRF95 (code 1509) or ETRS89 (code 1647) but are used given to lesser precision from CH1903 to WGS 84 as an approximation which is within the accuracy of the distortions in the CH1903 network.,Bundesamt f�r Landestopographie.  Aufbau der Landesvermessung der Schweiz 'LV95' Teil 3: Terrestrische Bezugssysteme und Bezugsrahmen. L+T 1999.,EPSG,200 [...]
-1767,REGVEN to SIRGAS (1),transformation,4189,4170,CN-Ven,1,1251,Accuracy 2 centimetres.,9603,,,,Instituto Geografia de Venezuela Simon Bolivar,EPSG,2001-11-06 00:00:00,,1,0
-1768,REGVEN to WGS 84 (1),transformation,4189,4326,EPSG-Ven,1,1251,Approximation at the +/- 1m level.,9603,,,,EPSG,EPSG,2001-11-06 00:00:00,,1,0
-1769,PSAD56 to REGVEN (1),transformation,4248,4189,IGSB-Ven,1,1251,?,9636,,,,Instituto Geografia de Venezuela Simon Bolivar,EPSG,2001-11-06 00:00:00,,1,0
-1770,PSAD56 to WGS84 (1),transformation,4248,4326,EPSG-Ven,1,1251,Approximation at the +/- 1m level.,9636,,,Parameter vales are from PSAD56 to REGVEN (1) (code 1769) assuming that REGVEN is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-11-06 00:00:00,,1,0
-1771,La Canoa to REGVEN (1),transformation,4247,4189,IGSB-Ven,1,1251,?,9636,,,,Instituto Geografia de Venezuela Simon Bolivar,EPSG,2001-11-06 00:00:00,,1,0
-1772,La Canoa to WGS84 (1),transformation,4247,4326,EPSG-Ven,1,1251,Approximation at the +/- 1m level.,9636,,,Parameter vales are from La Canoa to REGVEN (1) (code 1771) assuming that REGVEN is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-11-06 00:00:00,,1,0
-1773,POSGAR 98 to WGS 84 (1),transformation,4190,4326,EPSG-Arg,1,1033,Approximation at the +/- 1m level.,9603,,,,EPSG,EPSG,2001-11-06 00:00:00,,1,0
-1774,POSGAR 98 to SIRGAS (1),transformation,4190,4170,IGM-Arg,1,1033,POSGAR 98 is a densification of SIRGAS.,9603,,,,ISBN 85-240-0647-1. Sistema de Refer�ncia Geoc�ntrico para a Am�rica do Sul: Relat�rio Final. IGBE Rio de Janeiro 1997.,EPSG,2001-11-06 00:00:00,,1,0
-1775,Pulkovo 1942(83) to ETRS89 (2),transformation,4178,4258,IfAG-Deu E 0.1m,2,1343,For applications with an accuracy at 0.1m level,9606,,,Derived at 35 points of the German GPS Network DREF. From 2001 supersedes Pulkovo 1942(83) to ETRS89 (1) (code 1674).,Institute for Cartography and Geodesy; Leipzig via EuroGeographics; http://crs.ifag.de/,EPSG,2001-11-06 00:00:00,,1,0
-1776,DHDN to ETRS89 (2),transformation,4314,4258,IfAG-Deu W 3m,2,2326,For applications with an accuracy at 3 m level,9606,,,Mean of 109 stations. May be taken as approximate transformation DHDN to WGS 84 - see code 1777.,Institute for Cartography and Geodesy; Leipzig via EuroGeographics; http://crs.ifag.de/,EPSG,2001-11-06 00:00:00,,1,0
-1777,DHDN to WGS 84 (2),transformation,4314,4326,EPSG-Deu W 3m,2,2326,For applications with an accuracy at 3 m level,9606,,,Parameter values from DHDN to ETRS89 (2) (code 1776) assuming that ETRS89 is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-11-06 00:00:00,,1,0
-1778,DHDN to ETRS89 (3),transformation,4314,4258,IfAG-Deu W-S,3,2543,For applications with an accuracy at 0.1m level,9606,,,Derived at 10 points of the German GPS Network DREF.,Institute for Cartography and Geodesy; Leipzig via EuroGeographics; http://crs.ifag.de/,EPSG,2001-11-06 00:00:00,,1,0
-1779,DHDN to ETRS89 (4),transformation,4314,4258,IfAG-Deu W-cen,4,2542,For applications with an accuracy at 0.1m level,9606,,,Derived at 27 points of the German GPS Network DREF.,Institute for Cartography and Geodesy; Leipzig via EuroGeographics; http://crs.ifag.de/,EPSG,2001-11-06 00:00:00,,1,0
-1780,DHDN to ETRS89 (5),transformation,4314,4258,IfAG-Deu W-N,5,2541,For applications with an accuracy at 0.1m level,9606,,,Derived at 21 points of the German GPS Network DREF.,Institute for Cartography and Geodesy; Leipzig via EuroGeographics; http://crs.ifag.de/,EPSG,2001-11-06 00:00:00,,1,0
-1781,DHDN to ETRS89 (6),transformation,4314,4258,IfAG-Deu Thur,6,2544,For applications with an accuracy at 0.1m level,9606,,,Derived at 10 points of the German GPS Network DREF.,Institute for Cartography and Geodesy; Leipzig via EuroGeographics; http://crs.ifag.de/,EPSG,2001-11-06 00:00:00,,1,0
-1782,DHDN to ETRS89 (7),transformation,4314,4258,IfAG-Deu Sach,7,2545,For applications with an accuracy at 0.1m level,9606,,,Derived at 35 points of the German GPS Network DREF.,Institute for Cartography and Geodesy; Leipzig via EuroGeographics; http://crs.ifag.de/,EPSG,2001-11-06 00:00:00,,1,0
-1783,ED50 to ETRS89 (9),transformation,4230,4258,HGK-Tur,9,1237,For applications to an accuracy of 2 metres.,9606,,,May be taken as approximate transformation ED50 to WGS 84 - see code 1784.,General Command of Mapping via EuroGeographics; http://crs.ifag.de/,EPSG,2001-11-06 00:00:00,,1,0
-1784,ED50 to WGS 84 (30),transformation,4230,4326,EPSG-Tur,30,1237,For applications to an accuracy of 2 metres.,9606,,,Parameter values from ED50 to ETRS89 (9) (code 1783). Assumes ETRS89 and WGS 84 can be considered the same to within the accuracy of the transformation.,EPSG,EPSG,2001-11-06 00:00:00,,1,0
-1785,MGI to ETRS89 (3),transformation,4312,4258,GURS-Svn,3,1212,For applications to an accuracy of 1 metre.,9606,,,May be taken as approximate transformation MGI to WGS 84 - see code 1786.,Geodetska Uprava Republike Slovenij via EuroGeographics; http://crs.ifag.de/,EPSG,2001-11-06 00:00:00,,1,0
-1786,MGI to WGS 84 (5),transformation,4312,4326,EPSG-Svn,5,1212,For applications to an accuracy of 1 metre.,9606,,,Parameter values from MGI to ETRS89 (3) (code 1785). Assumes ETRS89 and WGS 84 can be considered the same to within the accuracy of the transformation.,EPSG,EPSG,2001-11-06 00:00:00,,1,0
-1787,RT90 to ETRS89 (2),transformation,4124,4258,NLS-Swe 2001,2,1225,Accuracy 0.1m.,9607,,,Derived at 165 points. Supersedes RT90 to ETRS89 (1) (code 1437). May be taken as approximate transformation RT90 to WGS 84 - see code 1787.,National Land Survey of Sweden (http://www.lm.se/geodesi/refsys/eng/refsys-eng.htm) via EuroGeographics; http://crs.ifag.de/,EPSG,2001-11-06 00:00:00,,1,0
-1788,RT90 to WGS 84 (2),transformation,4124,4326,EPSG-Swe 2001,2,1225,Approximation at the +/- 1m level.,9607,,,Parameter values from RT90 to ETRS89 (1) (code 1787) assuming that ETRS89 is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-11-06 00:00:00,,1,0
-1789,Dealui Piscului 1933 to WGS 84 (1),transformation,4316,4326,NAMR-Rom,1,1197,?,9603,,,,Petromar and NAMR,EPSG,2001-11-06 00:00:00,,1,0
-1790,Lisbon to ETRS89 (2),transformation,4207,4258,ICC-Prt 2001,2,1294,For applications to an accuracy of 2 metres.,9606,,,Derived in 2001.  Supersedes Lisbon to ETRS89 (1) (code 1655). May be taken as approximate transformation Lisbon to WGS 84 - see code 1791.,Instituto Portugues de Cartografia e Cadastro via EuroGeographics; http://crs.ifag.de/,EPSG,2002-01-18 00:00:00,,1,0
-1791,Lisbon to WGS 84 (2),transformation,4207,4258,EPSG-Prt 2001,2,1294,For applications to an accuracy of 2 metres.,9606,,,Parameter values from Lisbon to ETRS89 (2) (code 1790). Assumes ETRS89 and WGS 84 can be considered the same to within the accuracy of the transformation.,EPSG,EPSG,2002-01-18 00:00:00,,1,0
-1792,Datum 73 to ETRS89 (2),transformation,4274,4258,ICC-Prt 2001,2,1294,For applications to an accuracy of 1 metre.,9606,,,Derived in 2001.  Supersedes Datum 73 to ETRS89 (1) (code 1657).  May be taken as approximate transformation Datum 73 to WGS 84 - see code 1793.,Instituto Portugues de Cartografia e Cadastro via EuroGeographics; http://crs.ifag.de/,EPSG,2002-01-18 00:00:00,,1,0
-1793,Datum 73 to WGS 84 (2),transformation,4274,4258,EPSG-Prt 2001,2,1294,For applications to an accuracy of 1 metre.,9606,,,Parameter values from Datum 73 to ETRS89 (2) (code 1792). Assumes ETRS89 and WGS 84 can be considered the same to within the accuracy of the transformation.,EPSG,EPSG,2002-01-18 00:00:00,,1,0
-1794,MGI to WGS 84 (6),transformation,4312,4326,JPet-Yug,6,2547,Oil industry,9603,,,For more accurate transformation see MGI to WGS 84 (7) (code 1795).,Jugopetrol,EPSG,2002-01-18 00:00:00,,1,0
-1795,MGI to WGS 84 (7),transformation,4312,4326,JPET-Yug MB,7,2547,Oil industry,9636,,,,Jugopetrol,EPSG,2002-01-18 00:00:00,,1,0
-1796,Manoca 1962 to WGS 84 (1),transformation,4193,4326,ELF94-Cmr,1,2555,Oil industry,9603,,,"Derived at two points, checked at a third by Stolt Comex Seaway and Geoid for Elf.",TotalFinaElf,EPSG,2002-01-18 00:00:00,,1,0
-1797,Qornoq 1927 to WGS 84 (1),transformation,4194,4326,DMA-Grl S,1,2407,"For military purposes.  Accuracy 25m, 25m and 32m in X, Y and Z axes.",9603,,,Derived at 2 stations.,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,2002-01-18 00:00:00,,1,0
-1798,Qornoq 1927 to WGS 84 (2),transformation,4194,4326,KMS-Grl,2,1107,Topographic mapping.,9606,,,,"Kort og Matrikelstyrelsen, Copenhagen.",EPSG,2002-01-26 00:00:00,,1,0
-1799,Scoresbysund 1952 to WGS 84 (1),transformation,4195,4326,KMS-Grl Scosd,1,2570,Topographic mapping.,9606,,,,"Kort og Matrikelstyrelsen, Copenhagen.",EPSG,2002-01-26 00:00:00,,1,0
-1800,Ammassalik 1958 to WGS 84 (1),transformation,4196,4326,KMS-Grl Ammlk,1,2571,Topographic mapping.,9606,,,,"Kort og Matrikelstyrelsen, Copenhagen.",EPSG,2002-01-26 00:00:00,,1,0
-1801,Pointe Noire to WGS 84 (2),transformation,4282,4326,CGG94-Cog,2,2574,?,9603,,,Derived in 1994 by CGG/Topnav using DORIS system on various stations along the coastline.,TotalFinaElf,EPSG,2002-02-08 00:00:00,,1,0
-1802,Pointe Noire to WGS 84 (3),transformation,4282,4326,ELF95-Cog,3,2574,Used by Elf since May 1995 for all offshore Congo operations.,9606,,,Derived by Geoid for Elf in May 1995 using GPS and IGS data by tying 4 geodetic points to ITRF93 epoch 1995.4.,TotalFinaElf,EPSG,2002-02-08 00:00:00,,1,0
-1803,AGD66 to GDA94 (11),transformation,4202,4283,ICSM-Aus 0.1m,11,2575,0.1m accuracy.,9615,,,"Supersedes AGD66 to GDA94 variants 6, 7 and 10 (codes 1506 1507 1596). Variant 10 (1596) superseded #5 (1464). Input expects longitudes to be positive west; EPSG GeogCRS AGD66 (code 4202) and GDA94 (code 4283) both have longitudes positive east.",GDA Technical Manual.  http://www.anzlic.org.au/icsm/gdatm/chapter7.htm,EPSG,2002-01-18 00:00:00,,1,0
-1804,AGD84 to GDA94 (5),transformation,4203,4283,Auslig-Aus 0.1m,5,2576,0.1m accuracy.,9615,,,Supersedes AGD84 to GDA94 (4) (code 1593) which itself replaced variant 3 (code1159).  Input expects longitudes to be positive west; EPSG GeogCRS AGD84 (code 4203) and GDA94 (code 4283) both have longitudes positive east.,GDA Technical Manual.  http://www.anzlic.org.au/icsm/gdatm/chapter7.htm,EPSG,2002-01-18 00:00:00,,1,0
-1805,Garoua to WGS 72BE (1),transformation,4197,4324,ELF-Cmr,1,2590,Oil industry exploration.,9603,,,Derived in 1981 by Decca Survey France for Elf Serepca.,TotalFinaElf,EPSG,2002-02-12 00:00:00,,1,0
-1806,Kousseri to WGS 72BE (1),transformation,4198,4324,ELF-Cmr,1,2591,Oil industry expoloration.,9603,,,Derived in 1981 by Decca Survey France for Elf Serepca.,TotalFinaElf,EPSG,2002-02-12 00:00:00,,1,0
-1807,Pulkovo 1942 to WGS 84 (13),transformation,4284,4326,BP-Aze Aioc95,13,1038,Oil industry operations by AIOC prior to 1997.,9606,,,"Derived via WGS72 values taken from SOCAR Magnavox 1502 manual. Used by AIOC 1995-1997 then superseded by the AIOC97 values (tfm code 1808).
-Do not confuse with AIOC95 vertical datum as used in southern Caspian Sea and at Sangachal terminal by AIOC.",BP,EPSG,2002-02-12 00:00:00,,1,0
-1808,Pulkovo 1942 to WGS 84 (14),transformation,4284,4326,BP-Aze Aioc97,14,2593,Oil industry operations.,9606,,,"Mean of 3 stations in western Georgia, 4 stations in eastern Georgia and 4 stations in eastern Azerbaijan.  Derived for use on AIOC early oil western export pipeline, but adopted for all AIOC work superseding the 1995 AIOC transformation (code 1807).",BP,EPSG,2002-02-12 00:00:00,,1,0
-1809,Pulkovo 1942 to WGS 84 (15),transformation,4284,4326,TFE-Aze97,15,2594,Oil industry operations.,9606,,,Parameter values calculated by Elf Exp[loration and Production based on geodetic survey carried out by Azerbaijan State Committee for Geodesy and Cartography.,TotalFinaElf,EPSG,2002-02-12 00:00:00,,1,0
-1810,ED50 to WGS 84 (31),transformation,4230,4326,wgc72-Egy,31,2595,Oil industry exploration and production operations.,9606,,,Derived via concatenation through WGS72.  The ED50 to WGS72 step is the Sepplin 1974 value for all Europe.,Western Geophysical,EPSG,2002-02-12 00:00:00,,1,0
-1811,PSAD56 to WGS 84 (12),transformation,4248,4326,PB-Braz N,12,1754,Oil industry exploration.,9603,,,Used by Petrobras for shelf operations.,Petrobras,EPSG,2002-02-12 00:00:00,,1,0
-1812,Indian 1975 to WGS 84 (4),transformation,4240,4326,Auslig-Tha,4,1231,Cadastral survey.,9606,,,,Auslig via GPS World.,EPSG,2002-02-12 00:00:00,,1,0
-1813,Batavia to WGS 84 (2),transformation,4211,4326,ARCO-Idn ONWJ,2,2577,Oil industry operations.,9603,,,,Arco geodetic database,EPSG,2002-02-12 00:00:00,,1,0
-1814,Batavia to WGS 84 (3),transformation,4211,4326,KOM-Idn EJGP,3,2588,Oil industry operations.,9603,,,Used by PT Komaritim for Nippon Steel during East Java Gas Pipeline construction.,PT Komaritim report S808/91.,EPSG,2002-02-12 00:00:00,,1,0
-1815,Nord Sahara 1959 to WGS 84 (4),transformation,4307,4326,BP-Alg D3,4,2598,Oil industry operations.,9606,,,Used by BP in District 3 and In Salah Gas.,BP,EPSG,2002-02-12 00:00:00,,1,0
-1816,Nord Sahara 1959 to WGS 84 (5),transformation,4307,4326,BPA-Alg InAm,5,2599,Oil industry operations.,9603,,,Derived at astro station central to concession.  Significant and varying differences (>100m) at 4 neighbouring astro stations.,BP,EPSG,2002-02-12 00:00:00,,1,0
-1817,Nord Sahara 1959 to WGS 84 (6),transformation,4307,4326,ARCO-Alg HBR,6,2600,Oil industry operations.,9603,,,Derived at astro station Guerrara.,Arco geodetic database,EPSG,2002-02-12 00:00:00,,1,0
-1818,Minna to WGS 84 (4),transformation,4263,4326,RSL-Nga,4,1717,Oil industry operations.,9606,,,Concatenated via WGS 72BE. Adopted by Statoil.,Racal Survey Nigeria,EPSG,2002-02-12 00:00:00,,1,0
-1819,Minna to WGS 84 (5),transformation,4263,4326,SPD-Nga S,5,2371,Oil industry operations.,9606,,,Used by Shell in southern Nigeria and Total in OPL246.,TotalFinaElf,EPSG,2002-02-12 00:00:00,,1,1
-1820,Minna to WGS 84 (6),transformation,4263,4326,CON89-Nga,6,1717,Oil industry operations.,9603,,,Derived by Nortech at station L40 Minna using NNPC 1989 GPS network tied to 4 ADOS stations. Used by Conoco in OPLs 219-220 to cm precision and ExxonMobil in OPL 209 to dm precision..,TotalFinaElf,EPSG,2002-07-16 00:00:00,2002.29,1,0
-1821,Minna to WGS 84 (7),transformation,4263,4326,ELF94-Nga,7,1717,Oil industry operations.,9603,,,"Derived by Elf Petroleum Nigeria in 1994 at 3 stations (M101 onshore, offshore platforms XSW06 and XSV39) and used in OMLs 99-102 and OPLs 222-223.",TotalFinaElf,EPSG,2002-07-16 00:00:00,2002.29,1,0
-1822,Minna to WGS 84 (8),transformation,4263,4326,SHL-Nga OPL W,8,1717,Oil industry exploration and production.,9603,,,"Used by Shell SNEPCO for OPLs 209-213 and 316. Derived during 1990 Niger Delta control survey at 4 stations (XSU27, 30 31 and 35).",Shell Nigeria Exploration and Production Company,EPSG,2002-03-15 00:00:00,,1,0
-1823,Minna to WGS 84 (9),transformation,4263,4326,SHL-Nga OPL S,9,1717,Oil industry exploration and production.,9603,,,"Used by Shell SNEPCO for OPLs 217-223. Derived during 1990 Niger Delta control survey at 4 stations (XSU38, 41, 44 and 45).",Shell Nigeria Exploration and Production Company,EPSG,2002-03-15 00:00:00,,1,0
-1824,Minna to WGS 84 (10),transformation,4263,4326,SHL-Nga Gongola,10,2371,Oil industry exploration and production.,9603,,,Used by Shell SNEPCO for Gongola basin.,Shell International Exploration and Production,EPSG,2002-03-15 00:00:00,,1,0
-1825,Hong Kong 1980 to WGS 84 (1),transformation,4611,4326,LSD-HKG 2002,1,1118,Accuracy to 1m level.,9606,,,Published 1st March 2002.,"Geodetic Survey Section, Survey and Mapping Office, Lands Department, Hong Kong. http://www.info.gov.hk/landsd/mapping/tindex.htm",EPSG,2002-06-22 00:00:00,,1,0
-1826,JGD2000 to WGS 84 (1),transformation,4612,4326,EPSG-Jpn,1,1129,Approximation at the +/- 1m level.,9603,,,,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-1827,Tokyo to WGS 84 (6),transformation,4301,4326,GSI-Jpn 452141,6,2425,For medium accuracy.,9618,,,,http://vldb.gsi.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,2002-06-22 00:00:00,,1,0
-1828,Yoff to WGS 72 (1),transformation,4310,4322,DMA-SEN,1,1207,Military survey.,9603,,,,DMA,EPSG,2002-06-22 00:00:00,,1,0
-1829,HD72 to ETRS89 (1),transformation,4237,4258,FOMI-Hun,1,1119,Accuracy at decimetre level throughout Hungary.,9607,,,May be taken as approximate transformation HD72 to WGS 84 - see code 1830.,Institute of Geodetic Survey and Remote Sensing (FOMI) reflected at http://lazarus.elte.hu/gb/geodez/geod5.htm,EPSG,2002-06-22 00:00:00,,1,0
-1830,HD72 to WGS 84 (1),transformation,4237,4326,EPSG-Hun,1,1119,Approximation at the +/- 1m level assuming that ETRS89 is equivalent to WGS 84.,9607,,,Parameter values taken from HD72 to ETRS89 (1) (code 1829) assuming that ETRS89 is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-1831,HD72 to WGS 84 (2),transformation,4237,4326,ELTE-Hun,2,1119,Accuracy better than 1m in all three dimensions throughout Hungary.,9603,,,Derived at fundamental point Szolohegy and tested at 99 stations throughout Hungary.,"Timar, Molnar and Pasztor; Eotvos University, in Geodezia es Kartografia 54(1) pp11-16.  www.fomi.hu/internet/magyar/szaklap/geodkart.htm",EPSG,2002-06-22 00:00:00,,1,0
-1832,ID74 to WGS 84 (2),transformation,4238,4326,Rac91-Idn,2,1122,For oil industry purposes.,9606,,,Derived via coordinates of 2 Pulse8 stations. Use of D74 to WGS 84 (3) (code 1833) is recommended.,Racal Survey,EPSG,2002-06-22 00:00:00,,1,0
-1833,ID74 to WGS 84 (3),transformation,4238,4326,Bak-Idn,3,1122,"Standard deviations of translations are 1.3, 1.1 and 3.6m, of rotations 0.11, 0.06 and 0.04 sec and ppm 0.18.",9607,,,Derived at 38 stations.,Bakosurtanal.,EPSG,2002-06-22 00:00:00,,1,0
-1834,Segara to WGS 84 (1),transformation,4294,4326,NIMA-Idn Kal,1,2354,For military purposes.,9603,,,Accuracy estimate not available.,U.S. National Imagery and Mapping Agency  TR8350.2 revision of October 1997; http://164.214.2.59/geospatial/products/GandG/tr83502b/toc.html,EPSG,2002-06-22 00:00:00,,1,0
-1835,Segara to WGS 84 (2),transformation,4294,4326,Shl-Idn Kal E,2,1360,Oil exploration.,9603,,,,Shell,EPSG,2002-06-22 00:00:00,,1,0
-1836,Segara to WGS 84 (3),transformation,4294,4326,Shl-Idn Kal NE,3,2770,Oil exploration.,9603,,,,Shell,EPSG,2002-06-22 00:00:00,,1,0
-1837,Makassar to WGS 84 (1),transformation,4257,4326,Shl-Idn Sul SW,1,1316,Oil exploration.,9603,,,,Shell,EPSG,2002-06-22 00:00:00,,1,0
-1838,Segara to WGS 84 (4),transformation,4613,4326,TOT-Idn Mah,4,1328,Oil exploration.,9603,,,Datum shift derived through ITRF93.,Total Indonesia.,EPSG,2002-06-22 00:00:00,,1,0
-1839,Beduaram to WGS 72BE (1),transformation,4213,4324,ELF-Ner SE,1,2771,Oil exploration.,9603,,,,TotalFinaElf,EPSG,2002-06-28 00:00:00,,1,0
-1840,QND95 to WGS 84 (1),transformation,4614,4326,CGIS-Qat,1,1346,Parameter values are defined and therefore exact.,9606,,,"Transformation defines QND95. May be approximated to 1m throughout Qatar by geocentric translation transformation with dX=-127.78098m, dY=-283.37477m, dZ=+21.24081m.",Qatar Centre for Geographic Information.,EPSG,2002-06-28 00:00:00,,1,0
-1841,ATS77 to NAD83(CSRS) (1),transformation,4122,4617,GIC-Can NB,1,1447,Accuracy 1-2 metres.,9615,,,Introduced in 1999. Can be taken as an approximate transformation ATS77 to WGS 84 - see code 1688.,New Brunswick Geographic Information Corporation land and water information standards manual.,EPSG,2002-07-13 00:00:00,,1,0
-1842,NAD83(CSRS) to WGS 84 (1),transformation,4617,4326,EPSG-Can,1,1336,Approximation at the +/- 1m level assuming that NAD83(CSRS) is equivalent to WGS 84.,9603,,,For many purposes NAD83(CSRS) can be considered to be coincident with WGS 84.,EPSG,EPSG,2002-07-13 00:00:00,,1,0
-1843,NAD83 to NAD83(CSRS) (1),transformation,4269,4617,SGQ-Can QC,1,1368,Accuracy 1-2 metres.,9615,,,Uses NT method which expects longitudes positive west; EPSG GeogCRSs NAD83 (code 4269) and NAD83(CSRS) (code 4617) have longitudes positive east. Can be taken as an approximate transformation NAD83 to WGS 84 - see code 1696.,Geodetic Service of Quebec.  Contact alain.bernard at mrn.gouv.qc.ca,EPSG,2002-07-13 00:00:00,,1,0
-1844,NAD27 to NAD83(CSRS) (1),transformation,4267,4617,SGQ-Can QC,1,1368,Accuracy 1-2 metres.,9615,,,Uses NT method which expects longitudes positive west; EPSG GeogCRSs NAD27 (code 4267) and NAD83(CSRS) (code 4617) have longitudes positive east. Can be taken as an approximate transformation NAD27 to WGS 84 - see code 1692.,Geodetic Service of Quebec.  Contact alain.bernard at mrn.gouv.qc.ca,EPSG,2002-07-13 00:00:00,,1,0
-1845,NAD27(CGQ77) to NAD83(CSRS) (1),transformation,4609,4617,SGQ-Can QC,1,1368,Accuracy 1-2 metres.,9615,,,Uses NT method which expects longitudes positive west; EPSG GeogCRSs NAD27(CGQ77) (code 4609) and NAD83(CSRS) (code 4617) have longitudes positive east. Can be taken as an approximate transformation NAD27(CGQ77) to WGS 84 - see code 1691.,Geodetic Service of Quebec.  Contact alain.bernard at mrn.gouv.qc.ca,EPSG,2002-07-13 00:00:00,,1,0
-1846,ATS77 to NAD83(CSRS) (2),transformation,4122,4617,PEI DOT-Can PEI,2,1533,Accuracy 1-2 metres.,9615,,,Can be taken as an approximate transformation ATS77 to WGS 84 - see code 1689.,PEI Department of Transportation & Public Works,EPSG,2002-07-13 00:00:00,,1,0
-1847,NAD27 to NAD83(CSRS) (2),transformation,4267,4617,SK PMC-Can SK,2,2375,Accuracy 1-2 metres.,9615,,,Can be taken as an approximate transformation NAD27 to WGS 84 - see code 1703.,Dir Geodetic Surveys; SaskGeomatics Div.; Saskatchewan Property Management Company.,EPSG,2002-07-13 00:00:00,,1,0
-1848,NAD83 to NAD83(CSRS) (2),transformation,4269,4617,SK PMC-Can SK,2,2375,Accuracy 1-2 metres.,9615,,,Can be taken as an approximate transformation NAD83 to WGS 84 - see code 1697.,Dir Geodetic Surveys; SaskGeomatics Div.; Saskatchewan Property Management Company.,EPSG,2002-07-13 00:00:00,,1,0
-1849,NAD83 to NAD83(CSRS) (3),transformation,4269,4617,AB Env-Can AB,3,2376,Accuracy 1-2 metres.,9615,,,"This gridded difference file  AB_CSRS.DAC will need to be renamed to AB_CSRS.gsb to run in some software suites.  Formats identical, but AB file is provincial fit only.  Can be taken as an approximate transformation NAD83 to WGS 84 - see code 1702.",Geodetic Control Section; Land and Forest Svc; Alberta Environment; http://www.gov.ab.ca/env/land/dos/ or email to geoff.banham at gov.ab.ca [...]
-1850,ATS77 to NAD83(CSRS) (3),transformation,4122,4617,NSGC-Can NS,2,2313,Accuracy 1-2 metres.,9615,,,Can be taken as an approximate transformation ATS77 to WGS 84 - see code 1851.,Nova Scotia Geomatics Centre -   Contact aflemmin at linux1.nsgc.gov.ns.ca or telephone 902-667-6409,EPSG,2002-07-13 00:00:00,,1,0
-1851,ATS77 to WGS 84 (3),transformation,4122,4326,EPSG-Can NS,2,2313,Approximation at the +/- 1m level.,9615,,,Parameter file is from ATS77 to NAD83(CSRS) (3) (code 1850) assuming that NAD83(CSRS) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2002-07-13 00:00:00,,1,0
-1852,Timbalai 1948 to WGS 84 (4),transformation,4298,4326,SSB-Mys E,4,2780,Oil exploration.,9606,,,Derived by Racal Survey for SSB at 24 coastal stations (including Timbalai fundamental point and 6 other primary triangulation stations) between in Sabah (Kudat southwards) and Sarawak (Sibu northwards).,Sarawak Shell Berhard,EPSG,2002-07-13 00:00:00,,1,0
-1854,FD58 to WGS 84 (2),transformation,4132,4326,TFE-Irn Lavan,2,2782,Oil Exploration,9603,,,Derived by Geoid for Elf in 1999.  EGM96 geoid used.,TotalFinaElf,EPSG,2002-07-13 00:00:00,,1,0
-1855,FD58 to WGS 84 (3),transformation,4132,4326,TFE-Irn Kharg,3,2781,Oil Exploration,9603,,,Derived by Geoid for Elf in 1999.  EGM96 geoid used.,TotalFinaElf,EPSG,2002-07-13 00:00:00,,1,0
-1856,ED50(ED77) to WGS 84 (3),transformation,4154,4326,TFE-Irn SPars,3,2783,Oil Exploration,9603,,,Derived in Kangan district by Geoid for Total in 1998.  Used for South Pars phases 2 and 3.,TotalFinaElf,EPSG,2002-07-13 00:00:00,,1,0
-1857,ED50(ED77) to WGS 84 (4),transformation,4154,4326,TFE-Irn Lavan,4,2782,Oil Exploration,9603,,,Derived in 1999 on Lavan island by Geoid for Elf.,TotalFinaElf,EPSG,2002-07-13 00:00:00,,1,0
-1858,ED50(ED77) to WGS 84 (5),transformation,4154,4326,TFE-Irn Kharg,5,2781,Oil Exploration,9603,,,Derived by Geoid for Elf in 1999.  EGM96 geoid used.,TotalFinaElf,EPSG,2002-07-13 00:00:00,,1,0
-1859,ELD79 to WGS 84 (1),transformation,4159,4326,REP-Lby MZQ,1,2785,Oil Exploration,9603,,,Used by Repsol. Reliability of connection to ELD79 questionned.,Oil industry sources.,EPSG,2002-07-16 00:00:00,,1,0
-1860,ELD79 to WGS 84 (2),transformation,4159,4326,TFE-Lby MZQ,2,2785,Oil Exploration. 3-dimensional SD at 11 points is 0.5m.,9603,,,Derived December 2001 by NAGECO. Connected to ITRF via Remsa 2000 data. Used by TotalFinaElf.,TotalFinaElf,EPSG,2002-07-16 00:00:00,,1,0
-1861,ELD79 to WGS 84 (3),transformation,4159,4326,TFE-Lby MBK94,3,2786,Oil Exploration,9603,,,Derived by GEOID in 1994 from Transit satellite data. Used by TotalFinaElf.,TotalFinaElf,EPSG,2002-07-16 00:00:00,,1,0
-1862,ELD79 to WGS 84 (4),transformation,4159,4326,TFE-Lby MBK00,4,2786,Oil Exploration,9606,,,Derived by Geoid in 2000 from ITRF connection by NAGECO for TotalFinaElf. For historic compatibility TFE use the 1994 tfm ELD79 to WGS 84 (3) (code 1861).,TotalFinaElf,EPSG,2002-07-16 00:00:00,,1,0
-1863,ELD79 to WGS 84 (5),transformation,4159,4326,GMRA-Lby,5,2786,Engineering survey and oil exploration,9607,,,Derived for the Great Man-made River Authority (GMRA). Used by Saga in Mabruk blocks A and B.,Norsk Hydro,EPSG,2002-07-16 00:00:00,,1,0
-5400,Baltic to Caspian,transformation,5705,5706,Caspian Sea,1,2314,Vertical datum change for hydrographic charting.,9616,,,Baltic datum is 28m above Caspian datum.,,EPSG,1999-09-07 00:00:00,97.61,1,0
-5401,Belfast to Malin Head,transformation,5732,5731,OSNI-Gbr NI,1,1305,Vertical datum change for large scale topographic mapping and engineering survey.,9616,,,Belfast datum is 37mm above Malin Head datum.,,EPSG,2001-11-06 00:00:00,,1,0
-5402,Baltic to AIOC95,transformation,5705,5734,AIOC95-Aze,1,2592,Vertical datum change for engineering surveying.,9616,,,Baltic datum is 26.3m above AIOC95 datum.,BP,EPSG,2002-02-12 00:00:00,,1,0
-5403,AIOC95 to Caspian,transformation,5734,5706,AIOC95-Aze,1,2592,Vertical datum change for hydrographic charting.,9616,,,AIOC95 datum is 1.7m above Caspian datum.,BP,EPSG,2002-02-12 00:00:00,,1,0
-5404,Baltic to Black Sea,transformation,5705,5735,Black Sea,1,1102,Vertical datum change.,9616,,,Baltic datum is 0.4m above Black Sea datum.,BP,EPSG,2002-02-12 00:00:00,,1,0
-5405,Hong Kong Principal height to Hong Kong Chart depth,transformation,5738,5739,SMO-HK,1,1118,Vertical datum change for hydrographic charting.,9616,,,HKPD is 0.146m above chart datum.,"Survey and Mapping Office, Lands Department. Http://www.info.gov.hk/landsd/mapping/tindex.htm",EPSG,2002-06-22 00:00:00,,1,0
-8046,ED50 to WGS 84 (14),concatenated operation,4230,4326,5Nat-NSea90,14,2330,Primarily oil industry usage.,,,,"1990 agreement between Denmark, Germany, Great Britain, Netherlands and Norway.  Supersedes 1981 6-nations agreement between ED50 and WGS72 or WGS72BE. Only actively used offshore Norway but see ED50 to WGS 84 (24) (code 1613) for simpler transformation.","Norwegian Mapping Authority publication 1990:1 ""The transformation between ED50 and WGS84 for exploration purposes in the  [...]
-8047,ED50 to WGS 84 (15),concatenated operation,4230,4326,NMA-Nor N65 1991,15,2331,Oil exploration before 2001.,,,,"Superseded by codes 8569 and 1612 in 1997 and 2001.
-The concatenation of transformations 1147 and 1146 gives the following position vector tfm: dX=-84.491  dY=-100.559  dZ=-114.209 metres rX= -2.4006  rY=-0.5367  rZ=-2.3742 microradians  dS=+0.2947 ppm.","Statenskartverk note of January 1991 ""Om transformasjon mellom geodetiske datum i Norge"".",EPSG,1996-10-18 00:00:00,,1,0
-8094,NTF (Paris) to WGS 84 (1),concatenated operation,4807,4326,EPSG-Fra,1,1096,?,,,,,EPSG,EPSG,1996-10-18 00:00:00,,1,0
-8174,Bogota 1975 (Bogota) to WGS 84 (1),concatenated operation,4802,4326,DMA-Col,1,1070,"For military purposes.  Accuracy 6m, 5m and 6m in X, Y and Z axes.",,,,,EPSG,EPSG,1997-04-11 00:00:00,,1,0
-8175,Monte Mario (Rome) to WGS 84 (1),concatenated operation,4806,4326,EPSG-Ita,1,2339,For military purposes.  Accuracy 25m in each axis.,,,,,EPSG,EPSG,1997-04-11 00:00:00,,1,0
-8176,Tananarive (Paris) to WGS 84 (1),concatenated operation,4810,4326,EPSG-Mdg,1,1149,For military purposes.  Accuracy not available.,,,,,EPSG,EPSG,1997-04-11 00:00:00,,1,0
-8178,Batavia (Jakarta) to WGS 84 (1),concatenated operation,4813,4326,EPSG-Idn Sumatra,1,1355,For military purposes.  Accuracy 3m in each axis.,,,,,EPSG,EPSG,1997-04-11 00:00:00,,1,0
-8183,HD72 to WGS 84 (1),concatenated operation,4237,4326,EPSG-Hun,1,1119,Approximation at the +/- 1m level assuming that ETRS89 is equivalent to WGS 84.,,,,Approximation at the +/- 1m level assuming that ETRF89 is equivalent to WGS 84.,EPSG,EPSG,1997-07-22 00:00:00,,1,1
-8186,NTF (Paris) to ED50 (1),concatenated operation,4807,4230,EPSG-Fra,1,1096,?,,,,,EPSG,EPSG,1997-11-13 00:00:00,,1,0
-8188,NTF (Paris) to WGS 72 (1),concatenated operation,4807,4322,EPSG-Fra,1,1096,?,,,,,EPSG,EPSG,1997-11-13 00:00:00,,1,0
-8190,AGD66 to WGS 84 (2),concatenated operation,4202,4326,EPSG-Aus 5m,2,1036,Approximation at the +/- 1m level assuming that GDA94 is equivalent to WGS 84.,,,,Approximation at the +/- 1m level assuming that GDA94 is equivalent to WGS 84.  0.1m accuracy.,EPSG,EPSG,1998-12-16 00:00:00,98.50,1,1
-8192,AGD84 to WGS 84 (3),concatenated operation,4203,4326,EPSG-Aus 5m,3,1036,5m accuracy. Approximation assuming that GDA94 is equivalent to WGS 84.,,,,Approximation assuming that GDA94 is equivalent to WGS 84.,EPSG,EPSG,1998-12-16 00:00:00,98.50,1,1
-8194,AGD84 to WGS 84 (4),concatenated operation,4203,4326,EPSG-Aus 1m,4,1036,Approximation at the +/- 1m level assuming that GDA94 is equivalent to WGS 84.,,,,Approximation at the +/- 1m level assuming that GDA94 is equivalent to WGS 84.,EPSG,EPSG,1998-12-16 00:00:00,98.50,1,1
-8195,RT90 to WGS 84 (1),concatenated operation,4124,4326,EPSG-Swe,1,1225,Approximation at the +/- 1m level assuming that ETRS89 is equivalent to WGS 84.,,,,Approximation at the +/- 1m level assuming that ETRF89 is equivalent to WGS 84.,EPSG,EPSG,1999-04-22 00:00:00,99.11,1,1
-8199,Pulkovo 1942 to WGS 84 (2),concatenated operation,4284,4326,EPSG-Ltu,2,1145,Approximation at the +/- 1m level assuming that LKS94(ETRS89) is equivalent to WGS 84.,,,,Approximation at the +/- 1m level assuming that LKS94(ETRS89) is equivalent to WGS 84.,EPSG,EPSG,1998-03-12 00:00:00,,1,1
-8211,Voirol 1875 (Paris) to WGS 84 (1),concatenated operation,4811,4326,EPSG-Dza N,1,2347,Oil exploration.,,,,,EPSG,EPSG,1998-03-12 00:00:00,,1,0
-8215,Tete to WGS 84 (1),concatenated operation,4127,4326,EPSG-Moz,1,1167,Approximation at the +/- 1m level assuming that Moznet is equivalent to WGS 84.,,,,Approximation at the +/- 1m level assuming that Moznet is equivalent to WGS 84.,EPSG,EPSG,1998-04-16 00:00:00,,1,1
-8217,Tete to WGS 84 (2),concatenated operation,4127,4326,EPSG-Moz A,2,2350,Approximation at the +/- 1m level assuming that Moznet is equivalent to WGS 84.,,,,Approximation at the +/- 1m level assuming that Moznet is equivalent to WGS 84.,EPSG,EPSG,1998-04-16 00:00:00,,1,1
-8219,Tete to WGS 84 (3),concatenated operation,4127,4326,EPSG-Moz B,3,2351,Approximation at the +/- 1m level assuming that Moznet is equivalent to WGS 84.,,,,Approximation at the +/- 1m level assuming that Moznet is equivalent to WGS 84.,EPSG,EPSG,1998-04-16 00:00:00,,1,1
-8221,Tete to WGS 84 (4),concatenated operation,4127,4326,EPSG-Moz C,4,2352,Approximation at the +/- 1m level assuming that Moznet is equivalent to WGS 84.,,,,Approximation at the +/- 1m level assuming that Moznet is equivalent to WGS 84.,EPSG,EPSG,1998-04-16 00:00:00,,1,1
-8223,Tete to WGS 84 (5),concatenated operation,4127,4326,EPSG-Moz D,5,2353,Approximation at the +/- 1m level assuming that Moznet is equivalent to WGS 84.,,,,Approximation at the +/- 1m level assuming that Moznet is equivalent to WGS 84.,EPSG,EPSG,1998-04-16 00:00:00,,1,1
-8234,DHDN to WGS 84 (1),concatenated operation,4314,4326,EPSG-Deu W,1,2326,Approximation at the +/- 1m level assuming that ETRS89 is equivalent to WGS 84.,,,,Approximation at the +/- 1m level assuming that ETRF89 is equivalent to WGS 84.,EPSG,EPSG,1998-06-30 00:00:00,,1,1
-8236,Pulkovo 1942 to WGS 84 (11),concatenated operation,4284,4326,EPSG-Deu E,11,1343,Approximation at the +/- 1m level assuming that ETRF89 is equivalent to WGS 84.,,,,Approximation at the +/- 1m level assuming that ETRF89 is equivalent to WGS 84.,EPSG,EPSG,1998-06-30 00:00:00,,1,1
-8241,Madrid 1870 (Madrid) to WGS 84 (1),concatenated operation,4903,4326,EPSG-Esp,1,1217,?,,,,,See individual transformations.,EPSG,1998-11-11 00:00:00,,1,0
-8243,NAD27 to WGS 84 (25),concatenated operation,4267,4326,EPSG-Can old,25,1061,Approximation at the +/- 1m level assuming that NAD83 is equivalent to WGS 84.,,,,Approximation at the +/- 1m level assuming that NAD83 is equivalent to WGS 84.  Superseded by NAD27 to WGS 84 (27) (code 8404) in Quebec and NAD27 to WGS 84 (26) (code 8245) elsewhere in Canada.,EPSG,EPSG,1998-11-11 00:00:00,,1,1
-8245,NAD27 to WGS 84 (26),concatenated operation,4267,4326,EPSG-Can,26,1061,Approximation at the +/- 1m level assuming that NAD83 is equivalent to WGS 84.,,,,Approximation at the +/- 1m level assuming that NAD83 is equivalent to WGS 84.,EPSG,EPSG,1998-11-11 00:00:00,,1,1
-8263,MGI (Ferro) to WGS 84 (1),concatenated operation,4805,4326,DMA-balk,1,2370,For military purposes only.,,,,Accuracy estimate is not available.,EPSG,EPSG,1998-12-12 00:00:00,,1,0
-8386,Old Hawaiian to WGS 84 (1),concatenated operation,4135,4326,EPSG-Usa Hi,1,1334,Approximation at the +/- 1m level assuming that NAD83 is equivalent to WGS 84.,,,,Approximation at the +/- 1m level assuming that NAD83 is equivalent to WGS 84.,EPSG,EPSG,1999-05-24 00:00:00,,1,1
-8388,St. Lawrence Island to WGS 84 (1),concatenated operation,4136,4326,EPSG-Usa AK StL,1,1332,Approximation at the +/- 1m level assuming that NAD83 is equivalent to WGS 84.,,,,Approximation at the +/- 1m level assuming that NAD83 is equivalent to WGS 84.,EPSG,EPSG,1999-05-24 00:00:00,,1,1
-8390,St. Paul Island to WGS 84 (1),concatenated operation,4137,4326,EPSG-Usa AK StP,1,1333,Approximation at the +/- 1m level assuming that NAD83 is equivalent to WGS 84.,,,,Approximation at the +/- 1m level assuming that NAD83 is equivalent to WGS 84.,EPSG,EPSG,1999-05-24 00:00:00,,1,1
-8392,St. George Island to WGS 84 (1),concatenated operation,4138,4326,EPSG-Usa AK StG,1,1331,Approximation at the +/- 1m level assuming that NAD83 is equivalent to WGS 84.,,,,Approximation at the +/- 1m level assuming that NAD83 is equivalent to WGS 84.,EPSG,EPSG,1999-05-24 00:00:00,,1,1
-8394,NAD27(CGQ77) to WGS 84 (1),concatenated operation,4609,4326,EPSG-Can Qc NT1,1,1368,Approximation at the +/- 1m level assuming that NAD83 is equivalent to WGS 84.,,,,Approximation at the +/- 1m level assuming that NAD83 is equivalent to WGS 84.  Superseded by NAD27(CGQ77) to WGS 84 (2) (code 8564).,EPSG,EPSG,1999-05-24 00:00:00,,1,1
-8396,AGD66 to WGS 84 (3),concatenated operation,4202,4326,EPSG-Aus ACT 1m,3,2283,Approximation at the +/- 1m level assuming that GDA94 is equivalent to WGS 84.,,,,Approximation at the +/- 1m level assuming that GDA94 is equivalent to WGS 84.  Superseded by AGD66 to WGS 84 (11) (code 8581).,EPSG,EPSG,1999-05-24 00:00:00,,1,1
-8398,AGD66 to WGS 84 (4),concatenated operation,4202,4326,EPSG-Aus Tas 1m,4,1282,Approximation at the +/- 1m level assuming that GDA94 is equivalent to WGS 84.,,,,Approximation at the +/- 1m level assuming that GDA94 is equivalent to WGS 84.  Superseded by AGD66 to WGS 84 (9) (code 8576).,EPSG,EPSG,1999-05-24 00:00:00,,1,1
-8400,AGD66 to WGS 84 (5),concatenated operation,4202,4326,EPSG-Aus NSW Vic 1m,5,2286,Approximation at the +/- 1m level assuming that GDA94 is equivalent to WGS 84.,,,,Approximation at the +/- 1m level assuming that GDA94 is equivalent to WGS 84.,EPSG,EPSG,1999-05-24 00:00:00,,1,1
-8402,Puerto Rico to WGS 84 (1),concatenated operation,4139,4326,EPSG-PRVI,1,1335,Approximation at the +/- 1m level assuming that NAD83 is equivalent to WGS 84.,,,,Approximation at the +/- 1m level assuming that NAD83 is equivalent to WGS 84.,EPSG,EPSG,1999-05-24 00:00:00,,1,1
-8404,NAD27 to WGS 84 (27),concatenated operation,4267,4326,EPSG-Can QC,27,1368,Approximation at the +/- 1m level assuming that NAD83 is equivalent to WGS 84.,,,,Approximation at the +/- 1m level assuming that NAD83 is equivalent to WGS 84.  Superseded by NAD27 to WGS 84 (31) (code 8565).,EPSG,EPSG,1999-05-24 00:00:00,,1,1
-8406,NAD27(76) to WGS 84 (1),concatenated operation,4608,4326,EPSG-Can On,1,1367,Approximation at the +/- 1m level assuming that NAD83 is equivalent to WGS 84.,,,,Approximation at the +/- 1m level assuming that NAD83 is equivalent to WGS 84.,EPSG,EPSG,1999-05-24 00:00:00,,1,1
-8408,AGD66 to WGS 84 (6),concatenated operation,4202,4326,EPSG-Aus Vic 0.1m,6,2285,Approximation at the +/- 1m level assuming that GDA94 is equivalent to WGS 84.,,,,Approximation at the +/- 1m level assuming that GDA94 is equivalent to WGS 84.   Superseded by AGD66 to WGS 84 (11) (code 8578).,EPSG,EPSG,1999-05-24 00:00:00,,1,1
-8418,ATS77 to WGS 84 (1),concatenated operation,4122,4326,EPSG-Can NB,1,1447,Approximation at the +/- 1m level assuming that NAD83(CSRS98) is equivalent to WGS 84.,,,,Approximation at the +/- 1m level assuming that NAD83(CSRS98) is equivalent to WGS 84.,EPSG,EPSG,1999-10-20 00:00:00,,1,1
-8419,ATS77 to WGS 84 (2),concatenated operation,4122,4326,EPSG-Can PEI,2,1533,Approximation at the +/- 1m level assuming that NAD83(CSRS98) is equivalent to WGS 84.,,,,Approximation at the +/- 1m level assuming that NAD83(CSRS98) is equivalent to WGS 84.,EPSG,EPSG,2000-10-19 00:00:00,,1,1
-8420,NAD27 to WGS 84 (32),concatenated operation,4267,4326,SK PMC-Can SK,32,2375,Approximation at the +/- 1m level assuming that NAD83(CSRS98) is equivalent to WGS 84.,,,,,Dir Geodetic Surveys; SaskGeomatics Div.; Saskatchewan Property Management Company.,EPSG,2000-10-19 00:00:00,,1,1
-8421,NAD83 to WGS 84 (7),concatenated operation,4269,4326,SK PMC-Can SK,7,2375,Approximation at the +/- 1m level assuming that NAD83(CSRS98) is equivalent to WGS 84.,,,,,Dir Geodetic Surveys; SaskGeomatics Div.; Saskatchewan Property Management Company.,EPSG,2000-10-19 00:00:00,,1,1
-8422,NAD83 to WGS 84 (8),concatenated operation,4269,4326,Alb Env-Can AB,8,2376,Approximation at the +/- 1m level assuming that NAD83(CSRS98) is equivalent to WGS 84.,,,,"The gridded difference file  AB_CSRS.DAC in STEP 1 will need to be renamed to AB_CSRS.gsb to run in some software suites.  Formats identical, but AB file is provincial fit only.",Geodetic Control Section; Land and Forest Svc; Alberta Environment; http://www.gov.ab.ca/env/land/dos/ or email to geoff.banham at gov.ab.ca,EPSG [...]
-8453,AGD66 to WGS 84 (7),concatenated operation,4202,4326,EPSG-Aus Tas 0.1m,7,1282,Approximation at the +/- 1m level assuming that GDA94 is equivalent to WGS 84.,,,,Approximation at the +/- 1m level assuming that GDA94 is equivalent to WGS 84.,EPSG,EPSG,1999-10-20 00:00:00,,1,1
-8454,AGD66 to WGS 84 (8),concatenated operation,4202,4326,EPSG-Aus NT 0.1m,8,2284,Approximation at the +/- 1m level assuming that GDA94 is equivalent to WGS 84.,,,,Approximation at the +/- 1m level assuming that GDA94 is equivalent to WGS 84.,EPSG,EPSG,1999-10-20 00:00:00,,1,1
-8457,CH1903+ to WGS 84 (1),concatenated operation,4150,4326,EPSG-CH,1,1286,Approximation at the +/- 1m level assuming that CHTRF95 is equivalent to WGS 84.,,,,Approximation at the +/- 1m level assuming that CHTRF95 is equivalent to WGS 84.,EPSG,EPSG,1999-10-20 00:00:00,,1,1
-8460,NAD27 to NAD83(HARN) (1),concatenated operation,4267,4152,NGS-Usa AL,1,1372,"Accuracy at 67% confidence level is 0.2m onshore, 5m nearshore and undetermined farther offshore.",,,,May be taken as approximate transformation NAD27 to WGS 84 - see code 8590.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,1999-10-20 00:00:00,,1,0
-8461,NAD27 to NAD83(HARN) (2),concatenated operation,4267,4152,NGS-Usa AZ,2,1373,Accuracy at 67% confidence level is 0.2m.,,,,May be taken as approximate transformation NAD27 to WGS 84 - see code 8591.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,1999-10-20 00:00:00,,1,0
-8462,NAD27 to NAD83(HARN) (3),concatenated operation,4267,4152,NGS-Usa CA n,3,2297,"Accuracy at 67% confidence level is 0.2m onshore, 5m nearshore and undetermined farther offshore.",,,,May be taken as approximate transformation NAD27 to WGS 84 - see code 8593.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,1999-10-20 00:00:00,,1,0
-8463,NAD27 to NAD83(HARN) (4),concatenated operation,4267,4152,NGS-Usa CA s,4,2298,"Accuracy at 67% confidence level is 0.2m onshore, 5m nearshore and undetermined farther offshore.",,,,May be taken as approximate transformation NAD27 to WGS 84 - see code 8594.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,1999-10-20 00:00:00,,1,0
-8464,NAD27 to NAD83(HARN) (5),concatenated operation,4267,4152,NGS-Usa CO,5,1376,Accuracy at 67% confidence level is 0.2m.,,,,May be taken as approximate transformation NAD27 to WGS 84 - see code 8595.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,1999-10-20 00:00:00,,1,0
-8465,NAD27 to NAD83(HARN) (6),concatenated operation,4267,4152,NGS-Usa GA,6,1380,Accuracy at 67% confidence level is 0.2m.,,,,May be taken as approximate transformation NAD27 to WGS 84 - see code 8597.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,1999-10-20 00:00:00,,1,0
-8466,NAD27 to NAD83(HARN) (7),concatenated operation,4267,4152,NGS-Usa FL,7,1379,"Accuracy at 67% confidence level is 0.2m onshore, 5m nearshore and undetermined farther offshore.",,,,May be taken as approximate transformation NAD27 to WGS 84 - see code 8596.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,1999-10-20 00:00:00,,1,0
-8467,NAD27 to NAD83(HARN) (8),concatenated operation,4267,4152,NGS-Usa ID MT e,8,2382,Accuracy at 67% confidence level is 0.2m.,,,,May be taken as approximate transformation NAD27 to WGS 84 - see code 8611.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,1999-10-20 00:00:00,,1,0
-8468,NAD27 to NAD83(HARN) (9),concatenated operation,4267,4152,NGS-Usa ID MT w,9,2383,Accuracy at 67% confidence level is 0.2m.,,,,May be taken as approximate transformation NAD27 to WGS 84 - see code 8612.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,1999-10-20 00:00:00,,1,0
-8469,NAD27 to NAD83(HARN) (10),concatenated operation,4267,4152,NGS-Usa KY,10,1386,Accuracy at 67% confidence level is 0.2m.,,,,May be taken as approximate transformation NAD27 to WGS 84 - see code 8602.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,1999-10-20 00:00:00,,1,0
-8470,NAD27 to NAD83(HARN) (11),concatenated operation,4267,4152,NGS-Usa LA,11,1387,"Accuracy at 67% confidence level is 0.2m onshore, 5m nearshore and undetermined farther offshore.",,,,May be taken as approximate transformation NAD27 to WGS 84 - see code 8603.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,1999-10-20 00:00:00,,1,0
-8471,NAD27 to NAD83(HARN) (12),concatenated operation,4267,4152,NGS-Usa DE MD,12,2377,Accuracy at 67% confidence level is 0.2m.,,,,May be taken as approximate transformation NAD27 to WGS 84 - see code 8605.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,1999-10-20 00:00:00,,1,0
-8472,NAD27 to NAD83(HARN) (13),concatenated operation,4267,4152,NGS-Usa ME,13,1388,"Accuracy at 67% confidence level is 0.2m onshore, 5m nearshore and undetermined farther offshore.",,,,May be taken as approximate transformation NAD27 to WGS 84 - see code 8604.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,1999-10-20 00:00:00,,1,0
-8473,NAD27 to NAD83(HARN) (14),concatenated operation,4267,4152,NGS-Usa MI,14,1391,Accuracy at 67% confidence level is 0.2m.,,,,May be taken as approximate transformation NAD27 to WGS 84 - see code 8607.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,1999-10-20 00:00:00,,1,0
-8474,NAD27 to NAD83(HARN) (15),concatenated operation,4267,4152,NGS-Usa MS,15,1393,"Accuracy at 67% confidence level is 0.2m onshore, 5m nearshore and undetermined farther offshore.",,,,May be taken as approximate transformation NAD27 to WGS 84 - see code 8609.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,1999-10-20 00:00:00,,1,0
-8475,NAD27 to NAD83(HARN) (16),concatenated operation,4267,4152,NGS-Usa NE,16,1396,Accuracy at 67% confidence level is 0.2m.,,,,May be taken as approximate transformation NAD27 to WGS 84 - see code 8613.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,1999-10-20 00:00:00,,1,0
-8476,NAD27 to NAD83(HARN) (17),concatenated operation,4267,4152,NGS-Usa NewEng,17,2378,"Accuracy at 67% confidence level is 0.2m onshore, 5m nearshore and undetermined farther offshore.",,,,May be taken as approximate transformation NAD27 to WGS 84 - see code 8606.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,1999-10-20 00:00:00,,1,0
-8477,NAD27 to NAD83(HARN) (18),concatenated operation,4267,4152,NGS-Usa NM,18,1400,Accuracy at 67% confidence level is 0.2m.,,,,May be taken as approximate transformation NAD27 to WGS 84 - see code 8616.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,1999-10-20 00:00:00,,1,0
-8478,NAD27 to NAD83(HARN) (19),concatenated operation,4267,4152,NGS-Usa NY,19,1401,"Accuracy at 67% confidence level is 0.2m onshore, 5m nearshore and undetermined farther offshore.",,,,May be taken as approximate transformation NAD27 to WGS 84 - see code 8617.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,1999-10-20 00:00:00,,1,0
-8479,NAD27 to NAD83(HARN) (20),concatenated operation,4267,4152,NGS-Usa ND,20,1403,Accuracy at 67% confidence level is 0.2m.,,,,May be taken as approximate transformation NAD27 to WGS 84 - see code 8618.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,1999-10-20 00:00:00,,1,0
-8480,NAD27 to NAD83(HARN) (21),concatenated operation,4267,4152,NGS-Usa OK,21,1405,Accuracy at 67% confidence level is 0.2m.,,,,May be taken as approximate transformation NAD27 to WGS 84 - see code 8620.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,1999-10-20 00:00:00,,1,0
-8481,Puerto Rico to NAD83(HARN) (1),concatenated operation,4139,4152,NGS-PRVI,1,1335,Accuracy 0.1m at 67% confidence level.,,,,May be taken as approximate transformation Puerto Rico to WGS 84 - see code 8583.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,1999-10-20 00:00:00,,1,0
-8482,NAD27 to NAD83(HARN) (22),concatenated operation,4267,4152,NGS-Usa SD,22,1410,Accuracy at 67% confidence level is 0.2m.,,,,May be taken as approximate transformation NAD27 to WGS 84 - see code 8622.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,1999-10-20 00:00:00,,1,0
-8483,NAD27 to NAD83(HARN) (23),concatenated operation,4267,4152,NGS-Usa TN,23,1411,Accuracy at 67% confidence level is 0.2m.,,,,May be taken as approximate transformation NAD27 to WGS 84 - see code 8623.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,1999-10-20 00:00:00,,1,0
-8484,NAD27 to NAD83(HARN) (24),concatenated operation,4267,4152,NGS-Usa TX e,24,2379,"Accuracy at 67% confidence level is 0.2m onshore, 5m nearshore and undetermined farther offshore.",,,,May be taken as approximate transformation NAD27 to WGS 84 - see code 8624.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,1999-10-20 00:00:00,,1,0
-8485,NAD27 to NAD83(HARN) (25),concatenated operation,4267,4152,NGS-Usa TX w,25,2380,Accuracy at 67% confidence level is 0.2m.,,,,May be taken as approximate transformation NAD27 to WGS 84 - see code 8625.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,1999-10-20 00:00:00,,1,0
-8486,NAD27 to NAD83(HARN) (26),concatenated operation,4267,4152,NGS-Usa VA,26,1415,Accuracy at 67% confidence level is 0.2m.,,,,May be taken as approximate transformation NAD27 to WGS 84 - see code 8627.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,1999-10-20 00:00:00,,1,0
-8487,NAD27 to NAD83(HARN) (27),concatenated operation,4267,4152,NGS-Usa OR WA,27,2381,"Accuracy at 67% confidence level is 0.2m onshore, 5m nearshore and undetermined farther offshore.",,,,May be taken as approximate transformation NAD27 to WGS 84 - see code 8621.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,1999-10-20 00:00:00,,1,0
-8488,NAD27 to NAD83(HARN) (28),concatenated operation,4267,4152,NGS-Usa WI,28,1418,Accuracy at 67% confidence level is 0.2m.,,,,May be taken as approximate transformation NAD27 to WGS 84 - see code 8629.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,1999-10-20 00:00:00,,1,0
-8489,NAD27 to NAD83(HARN) (29),concatenated operation,4267,4152,NGS-Usa WY,29,1419,Accuracy at 67% confidence level is 0.2m.,,,,May be taken as approximate transformation NAD27 to WGS 84 - see code 8630.,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,1999-10-20 00:00:00,,1,0
-8496,NAD27 to WGS 84 (28),concatenated operation,4267,4326,NGS-Usa conus,28,2374,Geodetic survey.,,,,,Both transformations from US National Geodetic Survey.,EPSG,1999-10-20 00:00:00,,1,0
-8497,NAD27 to WGS 84 (29),concatenated operation,4267,4326,NGS-Usa AK,29,2373,Geodetic survey.,,,,,Both transformations from US National Geodetic Survey.,EPSG,1999-10-20 00:00:00,,1,1
-8508,Old Hawaiian to NAD83(HARN) (1),concatenated operation,4135,4152,NGS-Usa HI,1,1334,Assumes NAD83 is coincident with NAD83(HARN). Accuracy about 1m.,,,,"Uses NADCON method which expects longitudes positive west; EPSG GeogCRSs Old Hawaiian (code 4135), NAD83 (code 4269) and NAD83(HARN) have longitudes positive east.  May be taken as approximate transformation Old Hawaiin to WGS 84 - see code 8582.",US Coast & Geodetic Survey  ftp://ftp.ngs.noaa.gov/pub/pcsoft/nadcon,EPSG,2000-01-06 00 [...]
-8509,NAD27 to NAD83(HARN) (30),concatenated operation,4267,4152,NGS-Usa IN,30,1383,Accuracy at 67% confidence level is 0.2m.,,,,May be taken as approximate transformation NAD27 to WGS 84 - see code 8599.,US Coast & Geodetic Survey  ftp://ftp.ngs.noaa.gov/pub/pcsoft/nadcon,EPSG,2000-01-06 00:00:00,,1,0
-8510,NAD27 to NAD83(HARN) (31),concatenated operation,4267,4152,NGS-Usa KS,31,1385,Accuracy at 67% confidence level is 0.2m.,,,,May be taken as approximate transformation NAD27 to WGS 84 - see code 8601.,US Coast & Geodetic Survey  ftp://ftp.ngs.noaa.gov/pub/pcsoft/nadcon,EPSG,2000-01-06 00:00:00,,1,0
-8511,NAD27 to NAD83(HARN) (32),concatenated operation,4267,4152,NGS-Usa NV,32,1397,Accuracy at 67% confidence level is 0.2m.,,,,May be taken as approximate transformation NAD27 to WGS 84 - see code 8614.,US Coast & Geodetic Survey  ftp://ftp.ngs.noaa.gov/pub/pcsoft/nadcon,EPSG,2000-01-06 00:00:00,,1,0
-8512,NAD27 to NAD83(HARN) (33),concatenated operation,4267,4152,NGS-Usa OH,33,1404,Accuracy at 67% confidence level is 0.2m.,,,,May be taken as approximate transformation NAD27 to WGS 84 - see code 8619.,US Coast & Geodetic Survey  ftp://ftp.ngs.noaa.gov/pub/pcsoft/nadcon,EPSG,2000-01-06 00:00:00,,1,0
-8513,NAD27 to NAD83(HARN) (34),concatenated operation,4267,4152,NGS-Usa UT,34,1413,Accuracy at 67% confidence level is 0.2m.,,,,May be taken as approximate transformation NAD27 to WGS 84 - see code 8626.,US Coast & Geodetic Survey  ftp://ftp.ngs.noaa.gov/pub/pcsoft/nadcon,EPSG,2000-01-06 00:00:00,,1,0
-8514,NAD27 to NAD83(HARN) (35),concatenated operation,4267,4152,NGS-Usa WV,35,1417,Accuracy at 67% confidence level is 0.2m.,,,,May be taken as approximate transformation NAD27 to WGS 84 - see code 8628.,US Coast & Geodetic Survey  ftp://ftp.ngs.noaa.gov/pub/pcsoft/nadcon,EPSG,2000-01-06 00:00:00,,1,0
-8517,Chos Malal 1914 to WGS 84 (1),concatenated operation,4160,4326,TOT-Arg Neu,1,2325,Oil exploration,,,,May be implemented using a single step geocentric translations of dx=+5.5m dY=+176.7m dZ=+141.4m.,Total-Fina,EPSG,2000-03-07 00:00:00,,1,0
-8530,South Yemen to WGS 84 (1),concatenated operation,4164,4326,IGN-Yem South,1,1340,Approximation at the +/- 1m level assuming that NGN96 is equivalent to WGS 84.,,,,May be implemented as a single transformation using geocentric translations transformation method with parameter values dX=-76m dY=-138m dZ=+67m.,IGN Paris,EPSG,2000-03-07 00:00:00,,1,1
-8532,Indian 1960 to WGS 84 (1),concatenated operation,4131,4326,PV-Vnm,1,1495,Oil exploration.,,,,May be implemented as a single transformation using position vector 7-parameter geocentric transformation method with parameter values dX=+199m dY=+931m dZ=+318.9m rX=rY=0 sec rZ=+0.814 sec dS=-0.38 ppm.,Various oil company sources.,EPSG,2000-03-07 00:00:00,,1,0
-8537,Egypt 1907 to WGS 84 (2),concatenated operation,4229,4326,MCE-Egy,2,1086,Oil exploration.,,,,Used by Shell.  May be implemented as a single transformation using position vector 7-parameter geocentric transformation method with parameter values dX=-121.8m dY=+98.1m dZ=-10.7m rX=rY=0 sec rZ=+0.554 sec dS=+0.2263 ppm.,Maridive,EPSG,2000-03-07 00:00:00,,1,0
-8553,NAD27 to NAD83(HARN) (36),concatenated operation,4267,4152,NGS-Usa IL,36,1382,Accuracy at 67% confidence level is 0.2m.,,,,May be taken as approximate transformation NAD27 to WGS 84 - see code 8598.,US Coast & Geodetic Survey  ftp://ftp.ngs.noaa.gov/pub/pcsoft/nadcon,EPSG,2000-01-06 00:00:00,,1,0
-8554,NAD27 to NAD83(HARN) (37),concatenated operation,4267,4152,NGS-Usa NJ,37,1399,Accuracy at 67% confidence level is 0.2m.,,,,May be taken as approximate transformation NAD27 to WGS 84 - see code 8615.,US Coast & Geodetic Survey  ftp://ftp.ngs.noaa.gov/pub/pcsoft/nadcon,EPSG,2000-01-06 00:00:00,,1,0
-8560,AGD84 to WGS 84 (5),concatenated operation,4203,4326,EPSG-Aus WA,5,1280,Approximation at the +/- 1m level assuming that GDA94 is equivalent to WGS 84.,,,,Approximation at the +/- 1m level assuming that GDA94 is equivalent to WGS 84.  Superseded by AGD84 to WGS 84 (6) (code 8579).,EPSG,EPSG,2000-06-10 00:00:00,,1,1
-8562,Nord Sahara 1959 to WGS 84 (3),concatenated operation,4307,4326,CGG-Alg HM,3,2393,Oil exploration.,,,,Derived at IGN monument CFP19 using Transit.  Can be implemented as a single 7-param Position Vector transformation with parameter values of dX=-156m dY=-87.2m dZ=+287.8m; rX=rY=0 rZ=+0.814sec; dS=-0.38ppm.,,EPSG,2000-06-23 00:00:00,,1,0
-8563,NZGD49 to WGS 84 (3),concatenated operation,4272,4326,OSG-Nzl 1m,3,1175,Assumes WGS 84 is coincident with NZGD2000. Accuracy about 1m.,,,,Assumes WGS 84 is coincident with NZGD2000. Accuracy about 1m.,EPSG,EPSG,2000-10-19 00:00:00,,1,1
-8564,NAD27(CGQ77) to WGS 84 (2),concatenated operation,4609,4326,EPSG-Can Qc NT2,2,1368,Approximation at the +/- 1m level assuming that NAD83(CSRS98) is equivalent to WGS 84.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,1,1
-8565,NAD27 to WGS 84 (31),concatenated operation,4267,4326,EPSG-Can Que,31,1368,Approximation at the +/- 1m level assuming that NAD83(CSRS98) is equivalent to WGS 84.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,1,1
-8566,NAD83 to WGS 84 (6),concatenated operation,4269,4326,EPSG-Can Qc,6,1368,Approximation at the +/- 1m level assuming that NAD83(CSRS98) is equivalent to WGS 84.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,1,1
-8567,OSGB36 / National Grid to WGS 84 (1),concatenated operation,27700,4326,EPSG-Gbr,1,1264,Assumes ETRS89 is coincident with WGS 84.  Accuracy about 0.5m.,,,,Assumes ETRF89 is coincident with WGS 84.  Accuracy about 0.5m.,EPSG,EPSG,2000-10-19 00:00:00,,1,1
-8568,Deir ez Zor to WGS 84 (1),concatenated operation,4227,4326,EPSG-Syr,1,2329,Oil exploration,,,,"Can be implemented as a position vector tfm with param. values dX=-174.6  dY=-3.1 dZ=238.1m; rX=rY=0 rZ=0.814""; dS=-0.38 ppm.",EPSG,EPSG,2000-10-19 00:00:00,,1,0
-8569,ED50 to WGS 84 (21),concatenated operation,4230,4326,EPSG-Nor N65 1997,21,2332,Oil exploration before 1997/2001.,,,,Included in Statens Kartverk programme wsktrans between 1997 (v3.1) and 2001 (v4.0). Superseded by ED50 to WGS 84 (23) (code 1612) in April 2001.,EPSG guidance note #10.,EPSG,2000-10-19 00:00:00,2001.224,1,0
-8570,ED50 to ETRS89 (2),concatenated operation,4230,4258,5Nat-NSea98,2,2330,Offshore.,,,,Taken from ED50 to WGS 84 (14) (code 8046). In 1998 agreed that within the accuracy of that transformation WGS 84 equates to ETRS89 and the transformation would relate ED50 to ETRS89.,Statens Kartverk.,EPSG,2001-06-05 00:00:00,2000.72  2001.06,1,0
-8571,Accra to WGS 84 (2),concatenated operation,4168,4326,EPSG-Gha,2,1505,Oil industry.,,,,"Can be implemented as a position vector tfm with param. values dX=-171.16 dY=17.29 dZ=325.21m; rX=rY=0 rZ=0.814""; dS=-0.38 ppm. Found in use within oil industry erroneously concatenated as dX=-171.16 dY=17.29 dZ=327.81m; rX=rY0 rZ=0.554"" dS=0.2263 ppm.",EPSG,EPSG,2000-10-19 00:00:00,,1,0
-8572,Amersfoort to WGS 84 (2),concatenated operation,4289,4326,EPSG-Nld,2,1275,Approximation at the +/- 1m level assuming that ETRS89 is equivalent to WGS 84.,,,,Parameter values for step 1 from Amersfoort to ETRS89 (2) (code 1751). Step 2 assumes that ETRS89 is equivalent to WGS 84 within the accuracy of the transformation. Supersedes Amersfoort to WGS 84 (1) (code 1112).,EPSG,EPSG,2000-10-19 00:00:00,,1,1
-8573,RGF93 to WGS 84 (1),concatenated operation,4171,4326,EPSG-Fra,1,1096,Approximation at the +/- 1m level assuming that ETRS89 is equivalent to WGS 84.,,,,,EPSG,EPSG,2000-10-19 00:00:00,,1,1
-8574,American Samoa 1962 to WGS 84 (2),concatenated operation,4169,4326,EPSG-Asm,2,2288,"Transformation actually to NAD83(HARN), but for many purposes NAD83(HARN) can be considered to be coincident with WGS 84.",,,,"Transformation actually to NAD83(HARN), but for many purposes NAD83(HARNS) can be considered to be coincident with WGS 84.",EPSG,EPSG,2000-10-19 00:00:00,,1,1
-8575,American Samoa 1962 to WGS 84 (3),concatenated operation,4169,4326,EPSG-Asm,3,2289,"Transformation actually to NAD83(HARN), but for many purposes NAD83(HARN) can be considered to be coincident with WGS 84.",,,,"Transformation actually to NAD83(HARN), but for many purposes NAD83(HARNS) can be considered to be coincident with WGS 84.",EPSG,EPSG,2000-10-19 00:00:00,,1,1
-8576,AGD66 to WGS 84 (9),concatenated operation,4202,4326,EPSG-Aus Tas 1m,9,1282,Approximation at the +/- 1m level assuming that GDA94 is equivalent to WGS 84.,,,,Approximation at the +/- 1m level assuming that GDA94 is equivalent to WGS 84.  Supersedes AGD66 to WGS 84 (4) (code 8398).,EPSG,EPSG,2000-10-19 00:00:00,,1,1
-8577,AGD66 to WGS 84 (10),concatenated operation,4202,4326,EPSG-Aus NT,10,2284,Approximation at the +/- 1m level assuming that GDA94 is equivalent to WGS 84.,,,,Approximation at the +/- 1m level assuming that GDA94 is equivalent to WGS 84.,EPSG,EPSG,2000-10-19 00:00:00,,1,1
-8578,AGD66 to WGS 84 (11),concatenated operation,4202,4326,EPSG-Aus,11,2287,Approximation at the +/- 1m level assuming that GDA94 is equivalent to WGS 84.,,,,Approximation at the +/- 1m level assuming that GDA94 is equivalent to WGS 84.   Supersedes AGD66 to WGS 84 (3) (code 8396) and AGD66 to WGS 84 (6) (code 8408).,EPSG,EPSG,2000-10-19 00:00:00,,1,1
-8579,AGD84 to WGS 84 (6),concatenated operation,4203,4326,EPSG-Aus WA,6,1280,Approximation at the +/- 1m level assuming that GDA94 is equivalent to WGS 84.,,,,Approximation at the +/- 1m level assuming that GDA94 is equivalent to WGS 84.  Supersedes AGD84 to WGS 84 (5) (code 8560).,EPSG,EPSG,2000-10-19 00:00:00,,1,1
-8580,IRENET95 to WGS 84 (1),concatenated operation,4173,4326,OSI-Ire,1,1305,Approximation at the +/- 1m level assuming that ETRS89 is equivalent to WGS 84.,,,,Approximation at the +/- 1m level assuming that ETRS89 is equivalent to WGS 84.,EPSG,EPSG,2000-10-19 00:00:00,,1,1
-8581,PSD93 to WGS 84 (2),concatenated operation,4134,4326,PDO-Omn 93,2,1183,Oil exploration.,,,,"Superseded by PSD93 to WGS 84 (1) (code 1439) in 1997. Can be implemented as a position vector tfm with parameter values dX= -182.046 dY= -225.604 dZ=+173.384m rX= -0.616 rY= -1.655 rZ=+8.378"" dS=16.8673ppm.",Petroleum Development Oman,EPSG,2001-06-05 00:00:00,,1,0
-8582,Old Hawaiian to WGS 84 (2),concatenated operation,4135,4326,EPSG-Usa Hi,2,1334,Approximation at the +/- 1m level.,,,,Transformation steps are from Old Hawaiian to NAD83(HARN) (1) (code 8508) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-8583,Puerto Rico to WGS 84 (2),concatenated operation,4139,4326,EPSG-PRVI,2,1335,Approximation at the +/- 1m level.,,,,Transformation steps are from Puerto Rico to NAD83(HARN) (1) (code 8481) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2002-01-18 00:00:00,2002.02,1,0
-8584,NAD27 to NAD83(CSRS98) (3),concatenated operation,4267,4140,EPSG-Can AB,3,2376,Accuracy 1-2 metres.,,,,Can be taken as an approximate transformation NAD27 to WGS 84 - see code 8585.,EPSG,EPSG,2001-08-15 00:00:00,,1,1
-8585,NAD27 to WGS 84 (36),concatenated operation,4267,4326,EPSG-Can AB,36,2376,Approximation at the +/- 1m level.,,,,Steps based on concatenated transformation NAD27 to NAD83(CSRS) (3) (code 8635) assuming that NAD83(CSRS) is equivalent to WGS 84.,EPSG,EPSG,2002-07-13 00:00:00,2002.41,1,0
-8586,NAD27 to NAD83(HARN) (38),concatenated operation,4267,4152,NGS-Usa AR,38,1374,Accuracy at 67% confidence level is 0.2m.,,,,May be taken as approximate transformation NAD27 to WGS 84 - see code 8592.,US Coast & Geodetic Survey  ftp://ftp.ngs.noaa.gov/pub/pcsoft/nadcon,EPSG,2001-08-15 00:00:00,,1,0
-8587,NAD27 to NAD83(HARN) (39),concatenated operation,4267,4152,NGS-Usa IA,39,1384,Accuracy at 67% confidence level is 0.2m.,,,,May be taken as approximate transformation NAD27 to WGS 84 - see code 8600.,US Coast & Geodetic Survey  ftp://ftp.ngs.noaa.gov/pub/pcsoft/nadcon,EPSG,2001-08-15 00:00:00,,1,0
-8588,NAD27 to NAD83(HARN) (40),concatenated operation,4267,4152,NGS-Usa MN,40,1392,Accuracy at 67% confidence level is 0.2m.,,,,May be taken as approximate transformation NAD27 to WGS 84 - see code 8608.,US Coast & Geodetic Survey  ftp://ftp.ngs.noaa.gov/pub/pcsoft/nadcon,EPSG,2001-08-15 00:00:00,,1,0
-8589,NAD27 to NAD83(HARN) (41),concatenated operation,4267,4152,NGS-Usa MO,41,1394,Accuracy at 67% confidence level is 0.2m.,,,,May be taken as approximate transformation NAD27 to WGS 84 - see code 8610.,US Coast & Geodetic Survey  ftp://ftp.ngs.noaa.gov/pub/pcsoft/nadcon,EPSG,2001-08-15 00:00:00,,1,0
-8590,NAD27 to WGS 84 (37),concatenated operation,4267,4152,EPSG-Usa AL,37,1372,Approximation at the +/- 1m level.,,,,Transformation steps are from NAD27 to NAD83(HARN) (1) (code 8460) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-8591,NAD27 to WGS 84 (38),concatenated operation,4267,4326,EPSG-Usa AZ,38,1373,Approximation at the +/- 1m level.,,,,Transformation steps are from NAD27 to NAD83(HARN) (2) (code 8461) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-8592,NAD27 to WGS 84 (39),concatenated operation,4267,4326,EPSG-Usa AR,39,1374,Approximation at the +/- 1m level.,,,,Transformation steps are from NAD27 to NAD83(HARN) (38) (code 8586) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-8593,NAD27 to WGS 84 (40),concatenated operation,4267,4326,EPSG-Usa CA n,40,2297,Approximation at the +/- 1m level.,,,,Transformation steps are from NAD27 to NAD83(HARN) (3) (code 8462) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-8594,NAD27 to WGS 84 (41),concatenated operation,4267,4326,EPSG-Usa CA s,41,2298,Approximation at the +/- 1m level.,,,,Transformation steps are from NAD27 to NAD83(HARN) (4) (code 8463) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-8595,NAD27 to WGS 84 (42),concatenated operation,4267,4326,EPSG-Usa CO,42,1376,Approximation at the +/- 1m level.,,,,Transformation steps are from NAD27 to NAD83(HARN) (5) (code 8464) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-8596,NAD27 to WGS 84 (43),concatenated operation,4267,4326,EPSG-Usa FL,43,1379,Approximation at the +/- 1m level.,,,,Transformation steps are from NAD27 to NAD83(HARN) (7) (code 8466) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-8597,NAD27 to WGS 84 (44),concatenated operation,4267,4326,EPSG-Usa GA,44,1380,Approximation at the +/- 1m level.,,,,Transformation steps are from NAD27 to NAD83(HARN) (6) (code 8465) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-8598,NAD27 to WGS 84 (45),concatenated operation,4267,4326,EPSG-Usa IL,45,1382,Approximation at the +/- 1m level.,,,,Transformation steps are from NAD27 to NAD83(HARN) (36) (code 8553) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-8599,NAD27 to WGS 84 (46),concatenated operation,4267,4326,EPSG-Usa IN,46,1383,Approximation at the +/- 1m level.,,,,Transformation steps are from NAD27 to NAD83(HARN) (30) (code 8509) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-8600,NAD27 to WGS 84 (47),concatenated operation,4267,4326,EPSG-Usa IA,47,1384,Approximation at the +/- 1m level.,,,,Transformation steps are from NAD27 to NAD83(HARN) (39) (code 8587) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-8601,NAD27 to WGS 84 (48),concatenated operation,4267,4326,EPSG-Usa KS,48,1385,Approximation at the +/- 1m level.,,,,Transformation steps are from NAD27 to NAD83(HARN) (31) (code 8510) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-8602,NAD27 to WGS 84 (49),concatenated operation,4267,4326,EPSG-Usa KY,49,1386,Approximation at the +/- 1m level.,,,,Transformation steps are from NAD27 to NAD83(HARN) (10) (code 8469) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-8603,NAD27 to WGS 84 (50),concatenated operation,4267,4326,EPSG-Usa LA,50,1387,Approximation at the +/- 1m level.,,,,Transformation steps are from NAD27 to NAD83(HARN) (11) (code 8470) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-8604,NAD27 to WGS 84 (51),concatenated operation,4267,4326,EPSG-Usa ME,51,1388,Approximation at the +/- 1m level.,,,,Transformation steps are from NAD27 to NAD83(HARN) (13) (code 8472) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-8605,NAD27 to WGS 84 (52),concatenated operation,4267,4326,EPSG-Usa DE MD,52,2377,Approximation at the +/- 1m level.,,,,Transformation steps are from NAD27 to NAD83(HARN) (12) (code 8471) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-8606,NAD27 to WGS 84 (53),concatenated operation,4267,4326,EPSG-Usa NewEng,53,2378,Approximation at the +/- 1m level.,,,,Transformation steps are from NAD27 to NAD83(HARN) (17) (code 8476) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-8607,NAD27 to WGS 84 (54),concatenated operation,4267,4326,EPSG-Usa MI,54,1391,Approximation at the +/- 1m level.,,,,Transformation steps are from NAD27 to NAD83(HARN) (14) (code 8473) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-8608,NAD27 to WGS 84 (55),concatenated operation,4267,4326,EPSG-Usa MN,55,1392,Approximation at the +/- 1m level.,,,,Transformation steps are from NAD27 to NAD83(HARN) (40) (code 8588) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-8609,NAD27 to WGS 84 (56),concatenated operation,4267,4326,EPSG-Usa MS,56,1393,Approximation at the +/- 1m level.,,,,Transformation steps are from NAD27 to NAD83(HARN) (15) (code 8474) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-8610,NAD27 to WGS 84 (57),concatenated operation,4267,4326,EPSG-Usa MO,57,1394,Approximation at the +/- 1m level.,,,,Transformation steps are from NAD27 to NAD83(HARN) (41) (code 8589) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-8611,NAD27 to WGS 84 (58),concatenated operation,4267,4326,EPSG-Usa ID MT e,58,2382,Approximation at the +/- 1m level.,,,,Transformation steps are from NAD27 to NAD83(HARN) (8) (code 8467) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-8612,NAD27 to WGS 84 (59),concatenated operation,4267,4326,EPSG-Usa ID MT w,59,2383,Approximation at the +/- 1m level.,,,,Transformation steps are from NAD27 to NAD83(HARN) (9) (code 8468) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-8613,NAD27 to WGS 84 (60),concatenated operation,4267,4326,EPSG-Usa NE,60,1396,Approximation at the +/- 1m level.,,,,Transformation steps are from NAD27 to NAD83(HARN) (16) (code 8475) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-8614,NAD27 to WGS 84 (61),concatenated operation,4267,4326,EPSG-Usa NV,61,1397,Approximation at the +/- 1m level.,,,,Transformation steps are from NAD27 to NAD83(HARN) (32) (code 8511) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-8615,NAD27 to WGS 84 (62),concatenated operation,4267,4326,EPSG-Usa NJ,62,1399,Approximation at the +/- 1m level.,,,,Transformation steps are from NAD27 to NAD83(HARN) (37) (code 8554) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-8616,NAD27 to WGS 84 (63),concatenated operation,4267,4326,EPSG-Usa NM,63,1400,Approximation at the +/- 1m level.,,,,Transformation steps are from NAD27 to NAD83(HARN) (18) (code 8477) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-8617,NAD27 to WGS 84 (64),concatenated operation,4267,4326,EPSG-Usa NY,64,1401,Approximation at the +/- 1m level.,,,,Transformation steps are from NAD27 to NAD83(HARN) (19) (code 8478) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-8618,NAD27 to WGS 84 (65),concatenated operation,4267,4326,EPSG-Usa ND,65,1403,Approximation at the +/- 1m level.,,,,Transformation steps are from NAD27 to NAD83(HARN) (20) (code 8479) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-8619,NAD27 to WGS 84 (66),concatenated operation,4267,4326,EPSG-Usa OH,66,1404,Approximation at the +/- 1m level.,,,,Transformation steps are from NAD27 to NAD83(HARN) (33) (code 8512) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-8620,NAD27 to WGS 84 (67),concatenated operation,4267,4326,EPSG-Usa OK,67,1405,Approximation at the +/- 1m level.,,,,Transformation steps are from NAD27 to NAD83(HARN) (21) (code 8480) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-8621,NAD27 to WGS 84 (68),concatenated operation,4267,4326,EPSG-Usa OR WA,68,2381,Approximation at the +/- 1m level.,,,,Transformation steps are from NAD27 to NAD83(HARN) (27) (code 8487) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-8622,NAD27 to WGS 84 (69),concatenated operation,4267,4326,EPSG-Usa SD,69,1410,Approximation at the +/- 1m level.,,,,Transformation steps are from NAD27 to NAD83(HARN) (22) (code 8482) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-8623,NAD27 to WGS 84 (70),concatenated operation,4267,4326,EPSG-Usa TN,70,1411,Approximation at the +/- 1m level.,,,,Transformation steps are from NAD27 to NAD83(HARN) (23) (code 8483) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-8624,NAD27 to WGS 84 (71),concatenated operation,4267,4326,EPSG-Usa TX e,71,2379,Approximation at the +/- 1m level.,,,,Transformation steps are from NAD27 to NAD83(HARN) (24) (code 8484) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-8625,NAD27 to WGS 84 (72),concatenated operation,4267,4326,EPSG-Usa TX w,72,2380,Approximation at the +/- 1m level.,,,,Transformation steps are from NAD27 to NAD83(HARN) (25) (code 8485) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-8626,NAD27 to WGS 84 (73),concatenated operation,4267,4326,EPSG-Usa UT,73,1413,Approximation at the +/- 1m level.,,,,Transformation steps are from NAD27 to NAD83(HARN) (34) (code 8513) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-8627,NAD27 to WGS 84 (74),concatenated operation,4267,4326,EPSG-Usa VA,74,1415,Approximation at the +/- 1m level.,,,,Transformation steps are from NAD27 to NAD83(HARN) (26) (code 8486) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-8628,NAD27 to WGS 84 (75),concatenated operation,4267,4326,EPSG-Usa WV,75,1417,Approximation at the +/- 1m level.,,,,Transformation steps are from NAD27 to NAD83(HARN) (35) (code 8514) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-8629,NAD27 to WGS 84 (76),concatenated operation,4267,4326,EPSG-Usa WI,76,1418,Approximation at the +/- 1m level.,,,,Transformation steps are from NAD27 to NAD83(HARN) (28) (code 8488) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-8630,NAD27 to WGS 84 (77),concatenated operation,4267,4326,EPSG-Usa WY,77,1419,Approximation at the +/- 1m level.,,,,Transformation steps are from NAD27 to NAD83(HARN) (29) (code 8489) assuming that NAD83(HARN) is equivalent to WGS 84 within the accuracy of the transformation.,EPSG,EPSG,2001-08-15 00:00:00,,1,0
-8631,Garoua to WGS 84 (1),concatenated operation,4197,4326,EPSG-Cmr,1,2590,Oil industry.,,,,,EPSG,EPSG,2002-02-12 00:00:00,,1,0
-8632,Kousseri to WGS 84 (1),concatenated operation,4198,4326,EPSG-Cmr,1,2591,Oil industry.,,,,,EPSG,EPSG,2002-02-12 00:00:00,,1,0
-8633,Yoff to WGS 84 (1),concatenated operation,4310,4326,EPSG-SEN,1,1207,Military purposes.,,,,"Derived via WGS72. Can be used as a single positon vector transformation with parameter vaues of dX = -37 m, dY = +157 m, dZ = +89.5 m, rX = rY = 0 sec, RZ = 0.554 sec, dS = 0.219 ppm",TotalFinaElf,EPSG,2002-06-22 00:00:00,,1,0
-8634,Beduaram to WGS 84 (1),concatenated operation,4213,4326,ELF-Ner SE,1,2771,Oil exploration.,,,,"Derived via WGS72BE. Can be used as a single positon vector transformation with parameter vaues of dX = -101 m, dY = -111 m, dZ = +188.9 m, rX = rY = 0 sec, RZ = 0.814 sec, dS = -0.38 ppm",TotalFinaElf,EPSG,2002-06-28 00:00:00,,1,0
-8635,NAD27 to NAD83(CSRS) (3),concatenated operation,4267,4617,EPSG-Can AB,3,2376,Accuracy 1-2 metres.,,,,Can be taken as an approximate transformation NAD27 to WGS 84 - see code 8585.,EPSG,EPSG,2002-07-13 00:00:00,,1,0
-10101,Alabama CS27 East zone,conversion,,,,,2154,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-10102,Alabama CS27 West zone,conversion,,,,,2155,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-10131,SPCS83 Alabama East zone (meters),conversion,,,,,2154,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-10132,SPCS83 Alabama West zone (meters),conversion,,,,,2155,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-10201,Arizona Coordinate System East zone,conversion,,,,,2167,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,2000-03-07 00:00:00,95.30  96.29  2000.092,1,0
-10202,Arizona Coordinate System Central zone,conversion,,,,,2166,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-10203,Arizona Coordinate System West zone,conversion,,,,,2168,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,2000-03-07 00:00:00,95.30  96.29  2000.092,1,0
-10231,SPCS83 Arizona East zone (meters),conversion,,,,,2167,Used for large and medium scale topographic mapping and engineering survey.,9807,,,State law defines origin in International feet.  FE = 700000ft.  See code 15304 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2000.093  2001.03,1,0
-10232,SPCS83 Arizona Central zone (meters),conversion,,,,,2166,Used for large and medium scale topographic mapping and engineering survey.,9807,,,State law defines origin in International feet.  FE = 700000ft.  See code 15305 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-10233,SPCS83 Arizona West zone (meters),conversion,,,,,2168,Used for large and medium scale topographic mapping and engineering survey.,9807,,,State law defines origin in International feet.  FE = 700000ft.  See code 15306 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2000.093  2001.03,1,0
-10301,Arkansas CS27 North,conversion,,,,,2169,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-10302,Arkansas CS27 South,conversion,,,,,2170,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-10331,SPCS83 Arkansas North zone (meters),conversion,,,,,2169,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-10332,SPCS83 Arkansas South zone (meters),conversion,,,,,2170,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-10401,California CS27 zone I,conversion,,,,,2175,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-10402,California CS27 zone II,conversion,,,,,2176,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-10403,California CS27 zone III,conversion,,,,,2177,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-10404,California CS27 zone IV,conversion,,,,,2178,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-10405,California CS27 zone V,conversion,,,,,2179,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-10406,California CS27 zone VI,conversion,,,,,2180,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-10407,California CS27 zone VII,conversion,,,,,2181,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-10431,SPCS83 California zone 1 (meters),conversion,,,,,2175,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15307 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-10432,SPCS83 California zone 2 (meters),conversion,,,,,2176,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15308 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-10433,SPCS83 California zone 3 (meters),conversion,,,,,2177,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15309 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-10434,SPCS83 California zone 4 (meters),conversion,,,,,2178,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15310 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-10435,SPCS83 California zone 5 (meters),conversion,,,,,2182,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15311 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-10436,SPCS83 California zone 6 (meters),conversion,,,,,2180,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15312 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-10501,Colorado CS27 North zone,conversion,,,,,2184,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-10502,Colorado CS27 Central zone,conversion,,,,,2183,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-10503,Colorado CS27 South zone,conversion,,,,,2185,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-10531,SPCS83 Colorado North zone (meters),conversion,,,,,2184,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15313 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-10532,SPCS83 Colorado Central zone (meters),conversion,,,,,2183,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15314 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-10533,SPCS83 Colorado South zone (meters),conversion,,,,,2185,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15315 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-10600,Connecticut CS27,conversion,,,,,1377,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,2000-03-07 00:00:00,95.30  96.29  99.28  2000.094,1,0
-10630,SPCS83 Connecticut zone (meters),conversion,,,,,1377,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15316 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2000.094  2001.03,1,0
-10700,Delaware CS27,conversion,,,,,1378,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,2000-03-07 00:00:00,95.30  96.29  2000.092,1,0
-10730,SPCS83 Delaware zone (meters),conversion,,,,,1378,Used for large and medium scale topographic mapping and engineering survey.,9807,,,See code 15317 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2000.094  2001.03,1,0
-10901,Florida CS27 East zone,conversion,,,,,2186,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,2000-03-07 00:00:00,95.30  96.29  2000.092,1,0
-10902,Florida CS27 West zone,conversion,,,,,2188,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,2000-03-07 00:00:00,95.30  96.29  2000.092,1,0
-10903,Florida CS27 North zone,conversion,,,,,2187,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-10931,SPCS83 Florida East zone (meters),conversion,,,,,2186,Used for large and medium scale topographic mapping and engineering survey.,9807,,,See code 15318 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-10932,SPCS83 Florida West zone (meters),conversion,,,,,2188,Used for large and medium scale topographic mapping and engineering survey.,9807,,,See code 15319 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-10933,SPCS83 Florida North zone (meters),conversion,,,,,2187,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15320 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-11001,Georgia CS27 East zone,conversion,,,,,2189,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,2000-03-07 00:00:00,95.30  96.29  2000.092,1,0
-11002,Georgia CS27 West zone,conversion,,,,,2190,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,2000-03-07 00:00:00,95.30  96.29  2000.092,1,0
-11031,SPCS83 Georgia East zone (meters),conversion,,,,,2189,Used for large and medium scale topographic mapping and engineering survey.,9807,,,See code 15321 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-11032,SPCS83 Georgia West zone (meters),conversion,,,,,2190,Used for large and medium scale topographic mapping and engineering survey.,9807,,,See code 15322 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-11101,Idaho CS27 East zone,conversion,,,,,2192,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,2000-03-07 00:00:00,95.30  96.29  2000.092,1,0
-11102,Idaho CS27 Central zone,conversion,,,,,2191,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,2000-03-07 00:00:00,95.30  96.29  2000.092,1,0
-11103,Idaho CS27 West zone,conversion,,,,,2193,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,2000-03-07 00:00:00,95.30  96.29  2000.092,1,0
-11131,SPCS83 Idaho East zone (meters),conversion,,,,,2192,Used for large and medium scale topographic mapping and engineering survey.,9807,,,See code 15323 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-11132,SPCS83 Idaho Central zone (meters),conversion,,,,,2191,Used for large and medium scale topographic mapping and engineering survey.,9807,,,See code 15324 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-11133,SPCS83 Idaho West zone (meters),conversion,,,,,2193,Used for large and medium scale topographic mapping and engineering survey.,9807,,,See code 15325 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-11201,Illinois CS27 East zone,conversion,,,,,2194,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,2000-03-07 00:00:00,95.30  96.29  2000.092,1,0
-11202,Illinois CS27 West zone,conversion,,,,,2195,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,2000-03-07 00:00:00,95.30  96.29  2000.092,1,0
-11231,SPCS83 Illinois East zone (meters),conversion,,,,,2194,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-11232,SPCS83 Illinois West zone (meters),conversion,,,,,2195,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-11301,Indiana CS27 East zone,conversion,,,,,2196,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,2000-03-07 00:00:00,95.30  96.29  2000.092,1,0
-11302,Indiana CS27 West zone,conversion,,,,,2197,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,2000-03-07 00:00:00,95.30  96.29  2000.092,1,0
-11331,SPCS83 Indiana East zone (meters),conversion,,,,,2196,Used for large and medium scale topographic mapping and engineering survey.,9807,,,See code 15326 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-11332,SPCS83 Indiana West zone (meters),conversion,,,,,2197,Used for large and medium scale topographic mapping and engineering survey.,9807,,,See code 15327 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-11401,Iowa CS27 North zone,conversion,,,,,2198,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-11402,Iowa CS27 South zone,conversion,,,,,2199,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-11431,SPCS83 Iowa North zone (meters),conversion,,,,,2198,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-11432,SPCS83 Iowa South zone (meters),conversion,,,,,2199,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-11501,Kansas CS27 North zone,conversion,,,,,2200,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-11502,Kansas CS27 South zone,conversion,,,,,2201,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-11531,SPCS83 Kansas North zone (meters),conversion,,,,,2200,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-11532,SPCS83 Kansas South zone (meters),conversion,,,,,2201,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-11601,Kentucky CS27 North zone,conversion,,,,,2202,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-11602,Kentucky CS27 South zone,conversion,,,,,2203,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-11631,Kentucky CS83 North zone,conversion,,,,,2202,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28,1,1
-11632,SPCS83 Kentucky South zone (meters),conversion,,,,,2203,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15329 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-11701,Louisiana CS27 North zone,conversion,,,,,2204,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-11702,Louisiana CS27 South zone,conversion,,,,,2205,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-11731,SPCS83 Louisiana North zone (meters),conversion,,,,,2204,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-11732,SPCS83 Louisiana South zone (meters),conversion,,,,,2529,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-11801,Maine CS27 East zone,conversion,,,,,2206,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,2000-03-07 00:00:00,95.30  96.29  2000.092,1,0
-11802,Maine CS27 West zone,conversion,,,,,2207,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,2000-03-07 00:00:00,95.30  96.29  2000.092,1,0
-11831,SPCS83 Maine East zone (meters),conversion,,,,,2206,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-11832,SPCS83 Maine West zone (meters),conversion,,,,,2207,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-11900,Maryland CS27,conversion,,,,,1389,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,2000-03-07 00:00:00,95.30  96.29  99.28  2000.094,1,0
-11930,SPCS83 Maryland zone (meters),conversion,,,,,1389,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15330 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2000.094  2001.03,1,0
-12001,Massachusetts CS27 Mainland zone,conversion,,,,,2209,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-12002,Massachusetts CS27 Island zone,conversion,,,,,2208,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-12031,SPCS83 Massachusetts Mainland zone (meters),conversion,,,,,2209,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15331 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28  2001.03,1,0
-12032,SPCS83 Massachusetts Island zone (meters),conversion,,,,,2208,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15332 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-12101,Michigan State Plane East zone,conversion,,,,,1720,Obsolete.,9807,,,Superseded by north central and south zones.,USGS Professional Paper #1395,EPSG,2000-03-07 00:00:00,95.30  96.29  98.22  2000.092,1,0
-12102,Michigan State Plane Old Central zone,conversion,,,,,1721,Obsolete.,9807,,,Superseded by north central and south zones.,USGS Professional Paper #1395,EPSG,1998-11-11 00:00:00,95.30  96.29  98.22,1,0
-12103,Michigan State Plane West zone,conversion,,,,,1722,Obsolete.,9807,,,Superseded by north central and south zones.,USGS Professional Paper #1395,EPSG,2000-03-07 00:00:00,95.30  96.29  98.22  2000.092,1,0
-12111,Michigan CS27 North zone,conversion,,,,,1723,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.28  96.29  98.22  99.28,1,0
-12112,Michigan CS27 Central zone,conversion,,,,,1724,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.28  96.29  98.22  99.28,1,0
-12113,Michigan CS27 South zone,conversion,,,,,1725,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.28  96.29  98.22  99.28,1,0
-12141,SPCS83 Michigan North zone (meters),conversion,,,,,1723,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15333 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-12142,SPCS83 Michigan Central zone (meters),conversion,,,,,1724,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15334 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-12143,SPCS83 Michigan South zone (meters),conversion,,,,,1725,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15335 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-12201,Minnesota CS27 North zone,conversion,,,,,2214,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-12202,Minnesota CS27 Central zone,conversion,,,,,2213,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-12203,Minnesota CS27 South zone,conversion,,,,,2215,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-12231,SPCS83 Minnesota North zone (meters),conversion,,,,,2214,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-12232,SPCS83 Minnesota Central zone (meters),conversion,,,,,2213,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-12233,SPCS83 Minnesota South zone (meters),conversion,,,,,2215,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-12301,Mississippi CS27 East zone,conversion,,,,,2216,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-12302,Mississippi CS27 West zone,conversion,,,,,2217,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-12331,SPCS83 Mississippi East zone (meters),conversion,,,,,2216,Used for large and medium scale topographic mapping and engineering survey.,9807,,,See code 15336 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-12332,SPCS83 Mississippi West zone (meters),conversion,,,,,2217,Used for large and medium scale topographic mapping and engineering survey.,9807,,,See code 15337 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-12401,Missouri CS27 East zone,conversion,,,,,2219,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,2000-03-07 00:00:00,95.18  95.30  96.29  2000.092,1,0
-12402,Missouri CS27 Central zone,conversion,,,,,2218,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-12403,Missouri CS27 West zone,conversion,,,,,2220,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,2000-03-07 00:00:00,95.30  96.29  2000.092,1,0
-12431,SPCS83 Missouri East zone (meters),conversion,,,,,2219,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-12432,SPCS83 Missouri Central zone (meters),conversion,,,,,2218,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-12433,SPCS83 Missouri West zone (meters),conversion,,,,,2220,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-12501,Montana CS27 North zone,conversion,,,,,2211,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-12502,Montana CS27 Central zone,conversion,,,,,2210,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-12503,Montana CS27 South zone,conversion,,,,,2212,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-12530,SPCS83 Montana zone (meters),conversion,,,,,1395,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15338 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2000.094  2001.03,1,0
-12601,Nebraska CS27 North zone,conversion,,,,,2221,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-12602,Nebraska CS27 South zone,conversion,,,,,2222,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-12630,SPCS83 Nebraska zone (meters),conversion,,,,,1396,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2000.094  2001.03,1,0
-12701,Nevada CS27 East zone,conversion,,,,,2224,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,2000-03-07 00:00:00,95.30  96.29  2000.092,1,0
-12702,Nevada CS27 Central zone,conversion,,,,,2223,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,2000-03-07 00:00:00,95.30  96.29  2000.093,1,0
-12703,Nevada CS27 West zone,conversion,,,,,2225,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,2000-03-07 00:00:00,95.30  96.29  2000.092,1,0
-12731,SPCS83 Nevada East zone (meters),conversion,,,,,2224,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-12732,SPCS83 Nevada Central zone (meters),conversion,,,,,2223,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-12733,SPCS83 Nevada West zone (meters),conversion,,,,,2225,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-12800,New Hampshire CS27,conversion,,,,,1398,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,2000-03-07 00:00:00,95.30  96.29  2000.092,1,0
-12830,SPCS83 New Hampshire zone (meters),conversion,,,,,1398,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2000.094  2001.03,1,0
-12900,New Jersey CS27,conversion,,,,,1399,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,2000-03-07 00:00:00,95.30  96.29  2000.094,1,0
-12930,SPCS83 New Jersey zone (meters),conversion,,,,,1399,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2000.094  2001.03,1,0
-13001,New Mexico CS27 East zone,conversion,,,,,2228,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,2000-03-07 00:00:00,95.30  96.29  2000.092,1,0
-13002,New Mexico CS27 Central zone,conversion,,,,,2229,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-13003,New Mexico CS27 West zone,conversion,,,,,2230,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,2000-03-07 00:00:00,95.30  96.29  2000.092,1,0
-13031,SPCS83 New Mexico East zone (meters),conversion,,,,,2228,Used for large and medium scale topographic mapping and engineering survey.,9807,,,See code 15339 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-13032,SPCS83 New Mexico Central zone (meters),conversion,,,,,2231,Used for large and medium scale topographic mapping and engineering survey.,9807,,,See code 15340 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-13033,SPCS83 New Mexico West zone (meters),conversion,,,,,2232,Used for large and medium scale topographic mapping and engineering survey.,9807,,,See code 15341 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-13101,New York CS27 East zone,conversion,,,,,2234,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,2000-03-07 00:00:00,95.18  95.30  96.29  2000.092,1,0
-13102,New York CS27 Central zone,conversion,,,,,2233,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-13103,New York CS27 West zone,conversion,,,,,2236,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,2000-03-07 00:00:00,95.30  96.29  2000.092,1,0
-13104,New York CS27 Long Island zone,conversion,,,,,2235,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-13131,SPCS83 New York East zone (meters),conversion,,,,,2234,Used for large and medium scale topographic mapping and engineering survey.,9807,,,See code 15342 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-13132,SPCS83 New York Central zone (meters),conversion,,,,,2233,Used for large and medium scale topographic mapping and engineering survey.,9807,,,See code 15343 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-13133,SPCS83 New York West zone (meters),conversion,,,,,2236,Used for large and medium scale topographic mapping and engineering survey.,9807,,,See code 15344 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-13134,SPCS83 New York Long Island zone (meters),conversion,,,,,2235,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15345 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-13200,North Carolina CS27,conversion,,,,,1402,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,2000-03-07 00:00:00,95.30  96.29  99.28  2000.094,1,0
-13230,SPCS83 North Carolina zone (meters),conversion,,,,,1402,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15346 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2000.094  2001.03,1,0
-13301,North Dakota CS27 North zone,conversion,,,,,2237,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-13302,North Dakota CS27 South zone,conversion,,,,,2238,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-13331,SPCS83 North Dakota North zone (meters),conversion,,,,,2237,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15347 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-13332,SPCS83 North Dakota South zone (meters),conversion,,,,,2238,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15348 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-13401,Ohio CS27 North zone,conversion,,,,,2239,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-13402,Ohio CS27 South zone,conversion,,,,,2240,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-13431,SPCS83 Ohio North zone (meters),conversion,,,,,2239,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-13432,SPCS83 Ohio South zone (meters),conversion,,,,,2240,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-13501,Oklahoma CS27 North zone,conversion,,,,,2241,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-13502,Oklahoma CS27 South zone,conversion,,,,,2242,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-13531,SPCS83 Oklahoma North zone (meters),conversion,,,,,2241,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15349 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-13532,SPCS83 Oklahoma South zone (meters),conversion,,,,,2242,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15350 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-13601,Oregon CS27 North zone,conversion,,,,,2243,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-13602,Oregon CS27 South zone,conversion,,,,,2244,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-13631,SPCS83 Oregon North zone (meters),conversion,,,,,2243,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15351 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-13632,SPCS83 Oregon South zone (meters),conversion,,,,,2244,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15352 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-13701,Pennsylvania CS27 North zone,conversion,,,,,2245,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-13702,Pennsylvania CS27 South zone,conversion,,,,,2246,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-13731,SPCS83 Pennsylvania North zone (meters),conversion,,,,,2245,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15353 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-13732,SPCS83 Pennsylvania South zone (meters),conversion,,,,,2246,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15354 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-13800,Rhode Island CS27,conversion,,,,,1408,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,2000-03-07 00:00:00,95.30  96.29  2000.094,1,0
-13830,SPCS83 Rhode Island zone (meters),conversion,,,,,1408,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2000.094  2001.03,1,0
-13901,South Carolina CS27 North zone,conversion,,,,,2247,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-13902,South Carolina CS27 South zone,conversion,,,,,2248,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-13930,SPCS83 South Carolina zone (meters),conversion,,,,,1409,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15355 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2000.094  2001.03,1,0
-14001,South Dakota CS27 North zone,conversion,,,,,2249,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-14002,South Dakota CS27 South zone,conversion,,,,,2250,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-14031,SPCS83 South Dakota North zone (meters),conversion,,,,,2249,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-14032,SPCS83 South Dakota South zone (meters),conversion,,,,,2250,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-14100,Tennessee CS27,conversion,,,,,1411,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,2000-03-07 00:00:00,95.30  96.29  99.28  2000.094,1,1
-14130,SPCS83 Tennessee zone (meters),conversion,,,,,1411,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15356 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2000.094  2001.03,1,0
-14201,Texas CS27 North zone,conversion,,,,,2253,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-14202,Texas CS27 North Central zone,conversion,,,,,2254,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-14203,Texas CS27 Central zone,conversion,,,,,2252,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-14204,Texas CS27 South Central zone,conversion,,,,,2256,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-14205,Texas CS27 South zone,conversion,,,,,2255,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-14231,SPCS83 Texas North zone (meters),conversion,,,,,2253,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15357 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-14232,SPCS83 Texas North Central zone (meters),conversion,,,,,2254,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15358 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-14233,SPCS83 Texas Central zone (meters),conversion,,,,,2252,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15359 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-14234,SPCS83 Texas South Central zone (meters),conversion,,,,,2527,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15360 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-14235,SPCS83 Texas South zone (meters),conversion,,,,,2528,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15361 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-14301,Utah CS27 North zone,conversion,,,,,2258,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-14302,Utah CS27 Central zone,conversion,,,,,2257,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-14303,Utah CS27 South zone,conversion,,,,,2259,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-14331,SPCS83 Utah North zone (meters),conversion,,,,,2258,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15362 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-14332,SPCS83 Utah Central zone (meters),conversion,,,,,2257,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15363 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-14333,SPCS83 Utah South zone (meters),conversion,,,,,2259,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15364 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-14400,Vermont CS27,conversion,,,,,1414,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,2000-03-07 00:00:00,95.30  96.29  2000.094,1,0
-14430,SPCS83 Vermont zone (meters),conversion,,,,,1414,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2000.094  2001.03,1,0
-14501,Virginia CS27 North zone,conversion,,,,,2260,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-14502,Virginia CS27 South zone,conversion,,,,,2261,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-14531,SPCS83 Virginia North zone (meters),conversion,,,,,2260,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15365 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-14532,SPCS83 Virginia South zone (meters),conversion,,,,,2261,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15366 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-14601,Washington CS27 North zone,conversion,,,,,2262,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-14602,Washington CS27 South zone,conversion,,,,,2263,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-14631,SPCS83 Washington North zone (meters),conversion,,,,,2273,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15367 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-14632,SPCS83 Washington South zone (meters),conversion,,,,,2274,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15368 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-14701,West Virginia CS27 North zone,conversion,,,,,2264,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-14702,West Virginia CS27 South zone,conversion,,,,,2265,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-14731,SPCS83 West Virginia North zone (meters),conversion,,,,,2264,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-14732,SPCS83 West Virginia South zone (meters),conversion,,,,,2265,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-14801,Wisconsin CS27 North zone,conversion,,,,,2267,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-14802,Wisconsin CS27 Central zone,conversion,,,,,2266,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-14803,Wisconsin CS27 South zone,conversion,,,,,2268,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-14831,SPCS83 Wisconsin North zone (meters),conversion,,,,,2267,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15369 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-14832,SPCS83 Wisconsin Central zone (meters),conversion,,,,,2266,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15370 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-14833,SPCS83 Wisconsin South zone (meters),conversion,,,,,2268,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15371 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-14901,Wyoming CS27 East zone,conversion,,,,,2269,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,2000-03-07 00:00:00,95.30  96.29  2000.092,1,0
-14902,Wyoming CS27 East Central zone,conversion,,,,,2270,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,2000-03-07 00:00:00,95.30  96.29  2000.092,1,0
-14903,Wyoming CS27 West Central zone,conversion,,,,,2272,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,2000-03-07 00:00:00,95.30  96.29  2000.092,1,0
-14904,Wyoming CS27 West zone,conversion,,,,,2271,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,2000-03-07 00:00:00,95.30  96.29  2000.092,1,0
-14931,SPCS83 Wyoming East zone (meters),conversion,,,,,2269,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2000.092  2001.03,1,0
-14932,SPCS83 Wyoming East Central zone (meters),conversion,,,,,2270,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2000.092  2001.03,1,0
-14933,SPCS83 Wyoming West Central zone (meters),conversion,,,,,2272,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2000.092  2001.03,1,0
-14934,SPCS83 Wyoming West zone (meters),conversion,,,,,2271,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2000.092  2001.03,1,0
-15001,Alaska CS27 zone 1,conversion,,,,,2156,Used for large and medium scale topographic mapping and engineering survey.,9812,,,"If using Oblique Mercator method (code 9815), Ec=2685642.82 ftUS, Nc=1887198.47 ftUS.",USGS Professional Paper #1395,EPSG,1997-04-11 00:00:00,96.29  97.08,1,0
-15002,Alaska CS27 zone 2,conversion,,,,,2158,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-15003,Alaska CS27 zone 3,conversion,,,,,2159,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-15004,Alaska CS27 zone 4,conversion,,,,,2160,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-15005,Alaska CS27 zone 5,conversion,,,,,2161,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-15006,Alaska CS27 zone 6,conversion,,,,,2162,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-15007,Alaska CS27 zone 7,conversion,,,,,2163,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-15008,Alaska CS27 zone 8,conversion,,,,,2164,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-15009,Alaska CS27 zone 9,conversion,,,,,2165,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-15010,Alaska CS27 zone 10,conversion,,,,,2157,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-15031,SPCS83 Alaska zone 1 (meters),conversion,,,,,2156,Used for large and medium scale topographic mapping and engineering survey.,9812,,,"If using Oblique Mercator method (code 9815), Ec=818585.57 m, Nc=575219.25 m.",NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,96.29  2001.03,1,0
-15032,SPCS83 Alaska zone 2 (meters),conversion,,,,,2158,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-15033,SPCS83 Alaska zone 3 (meters),conversion,,,,,2159,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-15034,SPCS83 Alaska zone 4 (meters),conversion,,,,,2160,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-15035,SPCS83 Alaska zone 5 (meters),conversion,,,,,2161,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-15036,SPCS83 Alaska zone 6 (meters),conversion,,,,,2162,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-15037,SPCS83 Alaska zone 7 (meters),conversion,,,,,2163,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-15038,SPCS83 Alaska zone 8 (meters),conversion,,,,,2164,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-15039,SPCS83 Alaska zone 9 (meters),conversion,,,,,2165,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-15040,SPCS83 Alaska zone 10 (meters),conversion,,,,,2157,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-15101,Hawaii CS27 zone 1,conversion,,,,,1546,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-15102,Hawaii CS27 zone 2,conversion,,,,,1547,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-15103,Hawaii CS27 zone 3,conversion,,,,,1548,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-15104,Hawaii CS27 zone 4,conversion,,,,,1549,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-15105,Hawaii CS27 zone 5,conversion,,,,,1550,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,USGS Professional Paper #1395,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-15131,SPCS83 Hawaii zone 1 (meters),conversion,,,,,1546,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-15132,SPCS83 Hawaii zone 2 (meters),conversion,,,,,1547,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-15133,SPCS83 Hawaii zone 3 (meters),conversion,,,,,1548,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-15134,SPCS83 Hawaii zone 4 (meters),conversion,,,,,1549,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-15135,SPCS83 Hawaii zone 5 (meters),conversion,,,,,1550,Used for large and medium scale topographic mapping and engineering survey.,9807,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  2001.03,1,0
-15201,Puerto Rico CS27,conversion,,,,,1194,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,2000-03-07 00:00:00,95.30  96.29  99.28  2000.094,1,0
-15202,St. Croix CS27,conversion,,,,,1254,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,2000-03-07 00:00:00,95.30  96.29  99.28  2000.094,1,0
-15230,SPCS83 Puerto Rico & Virgin Islands zone (meters),conversion,,,,,2251,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,NOAA manual NOS NGS 5,EPSG,2001-11-06 00:00:00,95.30  96.29  99.28  2001.03,1,0
-15300,American Samoa Lambert,conversion,,,,,1027,Used for large and medium scale topographic mapping and engineering survey.,9801,,,Per Snyder: Map Projections - a Working Manual:  At origin x=500000 ft; y=o but radius to latitude of origin = -82000000 feet.  US National Geodetic Survey confirms use of zero for False Northing.,US National Geodetic Survey (NGS),EPSG,2000-10-19 00:00:00,,1,1
-15301,American Samoa Lambert,conversion,,,,,1027,Used for large and medium scale topographic mapping and engineering survey.,9801,,,Per Snyder: Map Projections - a Working Manual:  At origin x=500000 ft; y=o but radius to latitude of origin = -82000000 feet.  US National Geodetic Survey confirms use of zero for False Northing.,US National Geodetic Survey (NGS),EPSG,2001-08-28 00:00:00,,1,0
-15302,Tennessee CS27,conversion,,,,,1411,Used for large and medium scale topographic mapping and engineering survey.,9802,,,,USGS Professional Paper #1395,EPSG,2001-10-04 00:00:00,2001.45,1,0
-15303,SPCS83 Kentucky North zone (meters),conversion,,,,,2202,Used for large and medium scale topographic mapping and engineering survey.,9802,,,See code 15328 for equivalent non-metric definition.,NOAA manual NOS NGS 5,EPSG,2001-10-04 00:00:00,2001.03  2001.45,1,0
-15304,SPCS83 Arizona East zone (International feet),conversion,,,,,2167,Used for large and medium scale topographic mapping and engineering survey.,9807,,,State law defines grid unit as International feet (note: not US Survey feet). For equivalent metric Federal definition see code 10231.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15305,SPCS83 Arizona Central zone (International feet),conversion,,,,,2166,Used for large and medium scale topographic mapping and engineering survey.,9807,,,State law defines grid unit as International feet (note: not US Survey feet). For equivalent metric Federal definition see code 10232.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15306,SPCS83 Arizona West zone (International feet),conversion,,,,,2168,Used for large and medium scale topographic mapping and engineering survey.,9807,,,State law defines grid unit as International feet (note: not US Survey feet). For equivalent metric Federal definition see code 10233.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15307,SPCS83 California zone 1 (US Survey feet),conversion,,,,,2175,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 10431.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15308,SPCS83 California zone 2 (US Survey feet),conversion,,,,,2176,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 10432.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15309,SPCS83 California zone 3 (US Survey feet),conversion,,,,,2177,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 10433.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15310,SPCS83 California zone 4 (US Survey feet),conversion,,,,,2178,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 10434.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15311,SPCS83 California zone 5 (US Survey feet),conversion,,,,,2182,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 10435.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15312,SPCS83 California zone 6 (US Survey feet),conversion,,,,,2180,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 10436.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15313,SPCS83 Colorado North zone (US Survey feet),conversion,,,,,2184,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 10531.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15314,SPCS83 Colorado Central zone (US Survey feet),conversion,,,,,2183,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 10532.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15315,SPCS83 Colorado South zone (US Survey feet),conversion,,,,,2185,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 10533.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15316,SPCS83 Connecticut zone (US Survey feet),conversion,,,,,1377,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 10630.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15317,SPCS83 Delaware zone (US Survey feet),conversion,,,,,1378,Used for large and medium scale topographic mapping and engineering survey.,9807,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 10730.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15318,SPCS83 Florida East zone (US Survey feet),conversion,,,,,2186,Used for large and medium scale topographic mapping and engineering survey.,9807,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 10931.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15319,SPCS83 Florida West zone (US Survey feet),conversion,,,,,2188,Used for large and medium scale topographic mapping and engineering survey.,9807,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 10932.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15320,SPCS83 Florida North zone (US Survey feet),conversion,,,,,2187,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 10933.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15321,SPCS83 Georgia East zone (US Survey feet),conversion,,,,,2189,Used for large and medium scale topographic mapping and engineering survey.,9807,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 11031.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15322,SPCS83 Georgia West zone (US Survey feet),conversion,,,,,2190,Used for large and medium scale topographic mapping and engineering survey.,9807,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 10031.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15323,SPCS83 Idaho East zone (US Survey feet),conversion,,,,,2192,Used for large and medium scale topographic mapping and engineering survey.,9807,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 11131.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15324,SPCS83 Idaho Central zone (US Survey feet),conversion,,,,,2191,Used for large and medium scale topographic mapping and engineering survey.,9807,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 11132.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15325,SPCS83 Idaho West zone (US Survey feet),conversion,,,,,2193,Used for large and medium scale topographic mapping and engineering survey.,9807,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 11133.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15326,SPCS83 Indiana East zone (US Survey feet),conversion,,,,,2196,Used for large and medium scale topographic mapping and engineering survey.,9807,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 11331.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15327,SPCS83 Indiana West zone (US Survey feet),conversion,,,,,2197,Used for large and medium scale topographic mapping and engineering survey.,9807,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 11332.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15328,SPCS83 Kentucky North zone (US Survey feet),conversion,,,,,2202,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 15303.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15329,SPCS83 Kentucky South zone (US Survey feet),conversion,,,,,2203,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 11632.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15330,SPCS83 Maryland zone (US Survey feet),conversion,,,,,1389,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 11930.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15331,SPCS83 Massachusetts Mainland zone (US Survey feet),conversion,,,,,2209,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 12031.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15332,SPCS83 Massachusetts Island zone (US Survey feet),conversion,,,,,2208,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 12032.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15333,SPCS83 Michigan North zone (International feet),conversion,,,,,1723,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as International feet (note: not US Survey feet). For equivalent metric Federal definition see code 12141.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15334,SPCS83 Michigan Central zone (International feet),conversion,,,,,1724,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as International feet (note: not US Survey feet). For equivalent metric Federal definition see code 12142.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15335,SPCS83 Michigan South zone (International feet),conversion,,,,,1725,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as International feet (note: not US Survey feet). For equivalent metric Federal definition see code 12143.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15336,SPCS83 Mississippi East zone (US Survey feet),conversion,,,,,2216,Used for large and medium scale topographic mapping and engineering survey.,9807,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 12331.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15337,SPCS83 Mississippi West zone (US Survey feet),conversion,,,,,2217,Used for large and medium scale topographic mapping and engineering survey.,9807,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 12332.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15338,SPCS83 Montana zone (International feet),conversion,,,,,1395,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as International feet (note: not US Survey feet). For equivalent metric Federal definition see code 12530.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15339,SPCS83 New Mexico East zone (US Survey feet),conversion,,,,,2228,Used for large and medium scale topographic mapping and engineering survey.,9807,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 13031.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15340,SPCS83 New Mexico Central zone (US Survey feet),conversion,,,,,2231,Used for large and medium scale topographic mapping and engineering survey.,9807,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 13032.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15341,SPCS83 New Mexico West zone (US Survey feet),conversion,,,,,2232,Used for large and medium scale topographic mapping and engineering survey.,9807,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 13033.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15342,SPCS83 New York East zone (US Survey feet),conversion,,,,,2234,Used for large and medium scale topographic mapping and engineering survey.,9807,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 13131.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15343,SPCS83 New York Central zone (US Survey feet),conversion,,,,,2233,Used for large and medium scale topographic mapping and engineering survey.,9807,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 13132.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15344,SPCS83 New York West zone (US Survey feet),conversion,,,,,2236,Used for large and medium scale topographic mapping and engineering survey.,9807,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 13133.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15345,SPCS83 New York Long Island zone (US Survey feet),conversion,,,,,2235,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 13134.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15346,SPCS83 North Carolina zone (US Survey feet),conversion,,,,,1402,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 13230.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15347,SPCS83 North Dakota North zone (International feet),conversion,,,,,2237,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as International feet (note: not US Survey feet). For equivalent metric Federal definition see code 13331.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15348,SPCS83 North Dakota South zone (International feet),conversion,,,,,2238,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as International feet (note: not US Survey feet). For equivalent metric Federal definition see code 13332.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15349,SPCS83 Oklahoma North zone (US Survey feet),conversion,,,,,2241,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 13531.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15350,SPCS83 Oklahoma South zone (US Survey feet),conversion,,,,,2242,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 13532.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15351,SPCS83 Oregon North zone (International feet),conversion,,,,,2243,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as International feet (note: not US Survey feet). For equivalent metric Federal definition see code 13631.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15352,SPCS83 Oregon South zone (International feet),conversion,,,,,2244,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as International feet (note: not US Survey feet). For equivalent metric Federal definition see code 13632.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15353,SPCS83 Pennsylvania North zone (US Survey feet),conversion,,,,,2245,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 13731.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15354,SPCS83 Pennsylvania South zone (US Survey feet),conversion,,,,,2246,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 13732.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15355,SPCS83 South Carolina zone (International feet),conversion,,,,,1409,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as International feet (note: not US Survey feet). For equivalent metric Federal definition see code 13930.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15356,SPCS83 Tennessee zone (US Survey feet),conversion,,,,,1411,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 14130.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15357,SPCS83 Texas North zone (US Survey feet),conversion,,,,,2253,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 14231.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15358,SPCS83 Texas North Central zone (US Survey feet),conversion,,,,,2254,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 14232.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15359,SPCS83 Texas Central zone (US Survey feet),conversion,,,,,2252,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 14233.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15360,SPCS83 Texas South Central zone (US Survey feet),conversion,,,,,2527,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 14234.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15361,SPCS83 Texas South zone (US Survey feet),conversion,,,,,2528,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 14235.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15362,SPCS83 Utah North zone (International feet),conversion,,,,,2258,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as International feet (note: not US Survey feet). For equivalent metric Federal definition see code 14331.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15363,SPCS83 Utah Central zone (International feet),conversion,,,,,2257,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as International feet (note: not US Survey feet). For equivalent metric Federal definition see code 14333.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15364,SPCS83 Utah South zone (International feet),conversion,,,,,2259,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as International feet (note: not US Survey feet). For equivalent metric Federal definition see code 14334.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15365,SPCS83 Virginia North zone (US Survey feet),conversion,,,,,2260,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 14531.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15366,SPCS83 Virginia South zone (US Survey feet),conversion,,,,,2261,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 14532.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15367,SPCS83 Washington North zone (US Survey feet),conversion,,,,,2273,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 14631.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15368,SPCS83 Washington South zone (US Survey feet),conversion,,,,,2274,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 14632.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15369,SPCS83 Wisconsin North zone (US Survey feet),conversion,,,,,2267,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 14831.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15370,SPCS83 Wisconsin Central zone (US Survey feet),conversion,,,,,2266,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 14832.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15371,SPCS83 Wisconsin South zone (US Survey feet),conversion,,,,,2268,Used for large and medium scale topographic mapping and engineering survey.,9802,,,State law defines grid unit as US Survey feet. For equivalent metric Federal definition see code 14833.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-15914,BLM zone 14N (US survey feet),conversion,,,,,2171,US survey foot form of UTM zone 14N,9807,,,"Sometimes locally referred to as ""UTM zone 14"".",Minerals Management Service offshore protraction diagrams.,EPSG,2002-02-12 00:00:00,95.30  96.29  2002.12,1,0
-15915,BLM zone 15N (US survey feet),conversion,,,,,2172,US survey foot form of UTM zone 15N,9807,,,"Sometimes locally referred to as ""UTM zone 15"".",Minerals Management Service offshore protraction diagrams.,EPSG,2002-02-12 00:00:00,95.30  96.29  2002.12,1,0
-15916,BLM zone 16N (US survey feet),conversion,,,,,2173,US survey foot form of UTM zone 16N,9807,,,"Sometimes locally referred to as ""UTM zone 16"".",Minerals Management Service offshore protraction diagrams.,EPSG,2002-02-12 00:00:00,95.30  96.29  2002.12,1,0
-15917,BLM zone 17N (US survey feet),conversion,,,,,2174,US survey foot form of UTM zone 17N,9807,,,"Sometimes locally referred to as ""UTM zone 17"".",Minerals Management Service offshore protraction diagrams.,EPSG,2002-02-12 00:00:00,95.30  96.29  2002.12,1,0
-16000,UTM grid system (northern hemisphere),conversion,,,,,1998,For strict use within zone boundaries,9824,,,Use UTM zone xx N (codes 16001-16060) for use outwith zone boundary or when easting is not prefixed by zone number.,EPSG,EPSG,2001-06-05 00:00:00,,1,0
-16001,UTM zone 1N,conversion,,,,,1873,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16002,UTM zone 2N,conversion,,,,,1875,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16003,UTM zone 3N,conversion,,,,,1877,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16004,UTM zone 4N,conversion,,,,,1879,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16005,UTM zone 5N,conversion,,,,,1881,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16006,UTM zone 6N,conversion,,,,,1883,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16007,UTM zone 7N,conversion,,,,,1885,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16008,UTM zone 8N,conversion,,,,,1887,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16009,UTM zone 9N,conversion,,,,,1889,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16010,UTM zone 10N,conversion,,,,,1891,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16011,UTM zone 11N,conversion,,,,,1893,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16012,UTM zone 12N,conversion,,,,,1895,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16013,UTM zone 13N,conversion,,,,,1897,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16014,UTM zone 14N,conversion,,,,,1899,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16015,UTM zone 15N,conversion,,,,,1901,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16016,UTM zone 16N,conversion,,,,,1903,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16017,UTM zone 17N,conversion,,,,,1905,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16018,UTM zone 18N,conversion,,,,,1907,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16019,UTM zone 19N,conversion,,,,,1909,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16020,UTM zone 20N,conversion,,,,,1911,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16021,UTM zone 21N,conversion,,,,,1913,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16022,UTM zone 22N,conversion,,,,,1915,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16023,UTM zone 23N,conversion,,,,,1917,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16024,UTM zone 24N,conversion,,,,,1919,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16025,UTM zone 25N,conversion,,,,,1921,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16026,UTM zone 26N,conversion,,,,,1923,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16027,UTM zone 27N,conversion,,,,,1925,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16028,UTM zone 28N,conversion,,,,,1927,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16029,UTM zone 29N,conversion,,,,,1929,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16030,UTM zone 30N,conversion,,,,,1931,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16031,UTM zone 31N,conversion,,,,,1933,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16032,UTM zone 32N,conversion,,,,,1935,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16033,UTM zone 33N,conversion,,,,,1937,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16034,UTM zone 34N,conversion,,,,,1939,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16035,UTM zone 35N,conversion,,,,,1941,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16036,UTM zone 36N,conversion,,,,,1943,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16037,UTM zone 37N,conversion,,,,,1945,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16038,UTM zone 38N,conversion,,,,,1947,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16039,UTM zone 39N,conversion,,,,,1949,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16040,UTM zone 40N,conversion,,,,,1951,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16041,UTM zone 41N,conversion,,,,,1953,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16042,UTM zone 42N,conversion,,,,,1955,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16043,UTM zone 43N,conversion,,,,,1957,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16044,UTM zone 44N,conversion,,,,,1959,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16045,UTM zone 45N,conversion,,,,,1961,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16046,UTM zone 46N,conversion,,,,,1963,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16047,UTM zone 47N,conversion,,,,,1965,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16048,UTM zone 48N,conversion,,,,,1967,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16049,UTM zone 49N,conversion,,,,,1969,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16050,UTM zone 50N,conversion,,,,,1971,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16051,UTM zone 51N,conversion,,,,,1973,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16052,UTM zone 52N,conversion,,,,,1975,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16053,UTM zone 53N,conversion,,,,,1977,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16054,UTM zone 54N,conversion,,,,,1979,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16055,UTM zone 55N,conversion,,,,,1981,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16056,UTM zone 56N,conversion,,,,,1983,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16057,UTM zone 57N,conversion,,,,,1985,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16058,UTM zone 58N,conversion,,,,,1987,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16059,UTM zone 59N,conversion,,,,,1989,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16060,UTM zone 60N,conversion,,,,,1991,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16061,Universal Polar Stereographic North,conversion,,,,,1996,Large and medium scale topographic mapping and engineering survey.,9810,,,,,EPSG,2000-03-07 00:00:00,97.18  2000.094,1,0
-16070,3-degree Gauss-Kruger zone 40,conversion,,,,,2628,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 120E (code 16170). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16071,3-degree Gauss-Kruger zone 41,conversion,,,,,2629,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 123E (code 16171). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16072,3-degree Gauss-Kruger zone 42,conversion,,,,,2630,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 126E (code 16172). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16073,3-degree Gauss-Kruger zone 43,conversion,,,,,2631,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 129E (code 16173). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16074,3-degree Gauss-Kruger zone 44,conversion,,,,,2632,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 132E (code 16174). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16075,3-degree Gauss-Kruger zone 45,conversion,,,,,2633,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 135E (code 16175). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16076,3-degree Gauss-Kruger zone 46,conversion,,,,,2634,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 138E (code 16176). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16077,3-degree Gauss-Kruger zone 47,conversion,,,,,2635,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 141E (code 16177). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16078,3-degree Gauss-Kruger zone 48,conversion,,,,,2636,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 144E (code 16178). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16079,3-degree Gauss-Kruger zone 49,conversion,,,,,2637,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 147E (code 16179). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16080,3-degree Gauss-Kruger zone 50,conversion,,,,,2638,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 150E (code 16180). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16081,3-degree Gauss-Kruger zone 51,conversion,,,,,2639,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 153E (code 16181). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16082,3-degree Gauss-Kruger zone 52,conversion,,,,,2640,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 156E (code 16182). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16083,3-degree Gauss-Kruger zone 53,conversion,,,,,2641,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 159E (code 16183). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16084,3-degree Gauss-Kruger zone 54,conversion,,,,,2642,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 162E (code 16184). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16085,3-degree Gauss-Kruger zone 55,conversion,,,,,2643,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 165E (code 16185). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16086,3-degree Gauss-Kruger zone 56,conversion,,,,,2644,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 168E (code 16186). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16087,3-degree Gauss-Kruger zone 57,conversion,,,,,2645,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 171E (code 16187). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16088,3-degree Gauss-Kruger zone 58,conversion,,,,,2646,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 174E (code 16188). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16089,3-degree Gauss-Kruger zone 59,conversion,,,,,2647,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 177E (code 16189). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16090,3-degree Gauss-Kruger zone 60,conversion,,,,,2648,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 180 (code 16190). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16091,3-degree Gauss-Kruger zone 61,conversion,,,,,2649,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 177W (code 16191). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16092,3-degree Gauss-Kruger zone 62,conversion,,,,,2650,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 174W (code 16192). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16093,3-degree Gauss-Kruger zone 63,conversion,,,,,2651,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 171W (code 16193). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16094,3-degree Gauss-Kruger zone 64,conversion,,,,,2652,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 168W (code 16194). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16100,UTM grid system (southern hemisphere),conversion,,,,,1999,For strict use within zone boundaries,9824,,,Use UTM zone xx S (codes 16101-16160) for use outwith zone boundary or when easting is not prefixed by zone number.,EPSG,EPSG,2001-06-05 00:00:00,,1,0
-16101,UTM zone 1S,conversion,,,,,1874,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16102,UTM zone 2S,conversion,,,,,1876,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16103,UTM zone 3S,conversion,,,,,1878,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16104,UTM zone 4S,conversion,,,,,1880,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16105,UTM zone 5S,conversion,,,,,1882,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16106,UTM zone 6S,conversion,,,,,1884,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16107,UTM zone 7S,conversion,,,,,1886,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16108,UTM zone 8S,conversion,,,,,1888,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16109,UTM zone 9S,conversion,,,,,1890,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16110,UTM zone 10S,conversion,,,,,1892,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16111,UTM zone 11S,conversion,,,,,1894,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16112,UTM zone 12S,conversion,,,,,1896,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16113,UTM zone 13S,conversion,,,,,1898,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16114,UTM zone 14S,conversion,,,,,1900,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16115,UTM zone 15S,conversion,,,,,1902,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16116,UTM zone 16S,conversion,,,,,1904,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16117,UTM zone 17S,conversion,,,,,1906,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16118,UTM zone 18S,conversion,,,,,1908,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16119,UTM zone 19S,conversion,,,,,1910,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16120,UTM zone 20S,conversion,,,,,1912,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16121,UTM zone 21S,conversion,,,,,1914,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16122,UTM zone 22S,conversion,,,,,1916,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16123,UTM zone 23S,conversion,,,,,1918,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16124,UTM zone 24S,conversion,,,,,1920,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16125,UTM zone 25S,conversion,,,,,1922,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16126,UTM zone 26S,conversion,,,,,1924,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16127,UTM zone 27S,conversion,,,,,1926,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16128,UTM zone 28S,conversion,,,,,1928,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16129,UTM zone 29S,conversion,,,,,1930,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16130,UTM zone 30S,conversion,,,,,1932,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16131,UTM zone 31S,conversion,,,,,1934,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16132,UTM zone 32S,conversion,,,,,1936,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16133,UTM zone 33S,conversion,,,,,1938,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16134,UTM zone 34S,conversion,,,,,1940,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16135,UTM zone 35S,conversion,,,,,1942,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16136,UTM zone 36S,conversion,,,,,1944,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16137,UTM zone 37S,conversion,,,,,1946,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16138,UTM zone 38S,conversion,,,,,1948,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16139,UTM zone 39S,conversion,,,,,1950,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16140,UTM zone 40S,conversion,,,,,1952,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16141,UTM zone 41S,conversion,,,,,1954,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16142,UTM zone 42S,conversion,,,,,1956,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16143,UTM zone 43S,conversion,,,,,1958,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16144,UTM zone 44S,conversion,,,,,1960,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16145,UTM zone 45S,conversion,,,,,1962,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16146,UTM zone 46S,conversion,,,,,1964,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16147,UTM zone 47S,conversion,,,,,1966,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16148,UTM zone 48S,conversion,,,,,1968,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16149,UTM zone 49S,conversion,,,,,1970,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16150,UTM zone 50S,conversion,,,,,1972,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16151,UTM zone 51S,conversion,,,,,1974,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16152,UTM zone 52S,conversion,,,,,1976,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16153,UTM zone 53S,conversion,,,,,1978,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16154,UTM zone 54S,conversion,,,,,1980,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16155,UTM zone 55S,conversion,,,,,1982,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16156,UTM zone 56S,conversion,,,,,1984,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16157,UTM zone 57S,conversion,,,,,1986,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16158,UTM zone 58S,conversion,,,,,1988,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16159,UTM zone 59S,conversion,,,,,1990,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16160,UTM zone 60S,conversion,,,,,1992,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.28,1,0
-16161,Universal Polar Stereographic South,conversion,,,,,1997,Large and medium scale topographic mapping and engineering survey.,9810,,,,,EPSG,2000-03-07 00:00:00,97.18  2000.094,1,0
-16170,3-degree Gauss-Kruger CM 120E,conversion,,,,,2628,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 40N (code 16070) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16171,3-degree Gauss-Kruger CM 123E,conversion,,,,,2629,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 41N (code 16071) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16172,3-degree Gauss-Kruger CM 126E,conversion,,,,,2630,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 42N (code 16072) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16173,3-degree Gauss-Kruger CM 129E,conversion,,,,,2631,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 43N (code 16073) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16174,3-degree Gauss-Kruger CM 132E,conversion,,,,,2632,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 44N (code 16074) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16175,3-degree Gauss-Kruger CM 135E,conversion,,,,,2633,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 45N (code 16075) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16176,3-degree Gauss-Kruger CM 138E,conversion,,,,,2634,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 46N (code 16076) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16177,3-degree Gauss-Kruger CM 141E,conversion,,,,,2635,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 47N (code 16077) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16178,3-degree Gauss-Kruger CM 144E,conversion,,,,,2636,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 48N (code 16078) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16179,3-degree Gauss-Kruger CM 147E,conversion,,,,,2637,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 49N (code 16079) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16180,3-degree Gauss-Kruger CM 150E,conversion,,,,,2638,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 50N (code 16080) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16181,3-degree Gauss-Kruger CM 153E,conversion,,,,,2639,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 51N (code 16081) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16182,3-degree Gauss-Kruger CM 156E,conversion,,,,,2640,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 52N (code 16082) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16183,3-degree Gauss-Kruger CM 159E,conversion,,,,,2641,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 53N (code 16083) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16184,3-degree Gauss-Kruger CM 162E,conversion,,,,,2642,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 54N (code 16084) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16185,3-degree Gauss-Kruger CM 165E,conversion,,,,,2643,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 55N (code 16085) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16186,3-degree Gauss-Kruger CM 168E,conversion,,,,,2644,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 56N (code 16086) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16187,3-degree Gauss-Kruger CM 171E,conversion,,,,,2645,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 57N (code 16087) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16188,3-degree Gauss-Kruger CM 174E,conversion,,,,,2646,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 58N (code 16088) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16189,3-degree Gauss-Kruger CM 177E,conversion,,,,,2647,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 59N (code 16089) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16190,3-degree Gauss-Kruger CM 180,conversion,,,,,2648,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 60N (code 16090) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16191,3-degree Gauss-Kruger CM 177W,conversion,,,,,2649,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 61N (code 16091) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16192,3-degree Gauss-Kruger CM 174W,conversion,,,,,2650,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 62N (code 16092) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16193,3-degree Gauss-Kruger CM 171W,conversion,,,,,2651,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 63N (code 16093) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16194,3-degree Gauss-Kruger CM 168W,conversion,,,,,2652,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 64N (code 16094) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16201,6-degree Gauss-Kruger zone 1,conversion,,,,,1933,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 3E (code 16301). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16202,6-degree Gauss-Kruger zone 2,conversion,,,,,2741,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 9E (code 16302). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16203,6-degree Gauss-Kruger zone 3,conversion,,,,,2742,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 15E (code 16303). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16204,6-degree Gauss-Kruger zone 4,conversion,,,,,2743,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 21E (code 16304). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16205,6-degree Gauss-Kruger zone 5,conversion,,,,,2744,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 27E (code 16305). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16206,6-degree Gauss-Kruger zone 6,conversion,,,,,2745,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 33E (code 16306). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16207,6-degree Gauss-Kruger zone 7,conversion,,,,,2746,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 39E (code 16307). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16208,6-degree Gauss-Kruger zone 8,conversion,,,,,1947,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 45E (code 16308). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16209,6-degree Gauss-Kruger zone 9,conversion,,,,,1949,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 51E (code 16309). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16210,6-degree Gauss-Kruger zone 10,conversion,,,,,1951,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 57E (code 16310). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16211,6-degree Gauss-Kruger zone 11,conversion,,,,,1953,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 63E (code 16311). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16212,6-degree Gauss-Kruger zone 12,conversion,,,,,1955,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 69E (code 16312). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16213,6-degree Gauss-Kruger zone 13,conversion,,,,,1957,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 75E (code 16313). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16214,6-degree Gauss-Kruger zone 14,conversion,,,,,1959,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 81E (code 16314). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16215,6-degree Gauss-Kruger zone 15,conversion,,,,,1961,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 87E (code 16315). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16216,6-degree Gauss-Kruger zone 16,conversion,,,,,1963,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 93E (code 16316). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16217,6-degree Gauss-Kruger zone 17,conversion,,,,,1965,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 99E (code 16317). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16218,6-degree Gauss-Kruger zone 18,conversion,,,,,1967,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 105E (code 16318). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16219,6-degree Gauss-Kruger zone 19,conversion,,,,,1969,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 111E (code 16319). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16220,6-degree Gauss-Kruger zone 20,conversion,,,,,1971,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 117E (code 16320). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16221,6-degree Gauss-Kruger zone 21,conversion,,,,,1973,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 123E (code 16321). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16222,6-degree Gauss-Kruger zone 22,conversion,,,,,1975,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 129E (code 16322). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16223,6-degree Gauss-Kruger zone 23,conversion,,,,,1977,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 135E (code 16323). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16224,6-degree Gauss-Kruger zone 24,conversion,,,,,1979,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 141E (code 16324). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16225,6-degree Gauss-Kruger zone 25,conversion,,,,,1981,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 147E (code 16325). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16226,6-degree Gauss-Kruger zone 26,conversion,,,,,1983,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 153E (code 16326). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16227,6-degree Gauss-Kruger zone 27,conversion,,,,,1985,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 159E (code 16327). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16228,6-degree Gauss-Kruger zone 28,conversion,,,,,1987,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 165E (code 16328). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16229,6-degree Gauss-Kruger zone 29,conversion,,,,,1989,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 171E (code 16329). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16230,6-degree Gauss-Kruger zone 30,conversion,,,,,1991,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 177E (code 16330). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16231,6-degree Gauss-Kruger zone 31,conversion,,,,,1873,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 177W (code 16331). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16232,6-degree Gauss-Kruger zone 32,conversion,,,,,1875,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 171W (code 16332). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16233,6-degree Gauss-Kruger zone 33,conversion,,,,,1877,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 165W (code 16333). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16234,6-degree Gauss-Kruger zone 34,conversion,,,,,1879,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 159W (code 16334). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16235,6-degree Gauss-Kruger zone 35,conversion,,,,,1881,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 153W (code 16335). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16236,6-degree Gauss-Kruger zone 36,conversion,,,,,1883,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 147W (code 16336). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16237,6-degree Gauss-Kruger zone 37,conversion,,,,,1885,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 141W (code 16337). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16238,6-degree Gauss-Kruger zone 38,conversion,,,,,1887,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 135W (code 16338). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16239,6-degree Gauss-Kruger zone 39,conversion,,,,,1889,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 129W (code 16339). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16240,6-degree Gauss-Kruger zone 40,conversion,,,,,1891,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 123W (code 16340). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16241,6-degree Gauss-Kruger zone 41,conversion,,,,,1893,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 117W (code 16341). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16242,6-degree Gauss-Kruger zone 42,conversion,,,,,1895,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 111W (code 16342). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16243,6-degree Gauss-Kruger zone 43,conversion,,,,,1897,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 105W (code 16343). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16244,6-degree Gauss-Kruger zone 44,conversion,,,,,1899,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 99W (code 16344). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16245,6-degree Gauss-Kruger zone 45,conversion,,,,,1901,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 93W (code 16345). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16246,6-degree Gauss-Kruger zone 46,conversion,,,,,1903,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 87W (code 16346). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16247,6-degree Gauss-Kruger zone 47,conversion,,,,,2732,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 81W (code 16347). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16248,6-degree Gauss-Kruger zone 48,conversion,,,,,2733,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 75W (code 16348). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16249,6-degree Gauss-Kruger zone 49,conversion,,,,,2734,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 69W (code 16349). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16250,6-degree Gauss-Kruger zone 50,conversion,,,,,2735,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 63W (code 16350). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16251,6-degree Gauss-Kruger zone 51,conversion,,,,,2736,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 57W (code 16351). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16252,6-degree Gauss-Kruger zone 52,conversion,,,,,2737,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 51W (code 16352). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16253,6-degree Gauss-Kruger zone 53,conversion,,,,,2738,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 45W (code 16353). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16254,6-degree Gauss-Kruger zone 54,conversion,,,,,2739,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 39W (code 16354). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16255,6-degree Gauss-Kruger zone 55,conversion,,,,,1921,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 33W (code 16355). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16256,6-degree Gauss-Kruger zone 56,conversion,,,,,1923,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 27W (code 16356). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16257,6-degree Gauss-Kruger zone 57,conversion,,,,,1925,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 21W (code 16357). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16258,6-degree Gauss-Kruger zone 58,conversion,,,,,1927,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 15W (code 16358). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16259,6-degree Gauss-Kruger zone 59,conversion,,,,,1929,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 9W (code 16359). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16260,6-degree Gauss-Kruger zone 60,conversion,,,,,1931,Medium scale topographic mapping.,9807,,,Also found with zone truncated from false easting: see 6-degree Gauss-Kruger cm 3W (code 16360). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16261,3-degree Gauss-Kruger zone 1,conversion,,,,,2299,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 3E (code 16361). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16262,3-degree Gauss-Kruger zone 2,conversion,,,,,2300,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 6E (code 16362). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16263,3-degree Gauss-Kruger zone 3,conversion,,,,,2301,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 9E (code 16363). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16264,3-degree Gauss-Kruger zone 4,conversion,,,,,2302,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 12E (code 16364). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16265,3-degree Gauss-Kruger zone 5,conversion,,,,,2303,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 15E (code 16365). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16266,3-degree Gauss-Kruger zone 6,conversion,,,,,2304,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 18E (code 16366). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16267,3-degree Gauss-Kruger zone 7,conversion,,,,,2305,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 21E (code 16367). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16268,3-degree Gauss-Kruger zone 8,conversion,,,,,2306,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 24E (code 16368). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16269,3-degree Gauss-Kruger zone 9,conversion,,,,,2534,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 27E (code 16369). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16270,3-degree Gauss-Kruger zone 10,conversion,,,,,2535,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 30E (code 16370). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16271,3-degree Gauss-Kruger zone 11,conversion,,,,,2536,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 33E (code 16371). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16272,3-degree Gauss-Kruger zone 12,conversion,,,,,2537,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 36E (code 16372). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16273,3-degree Gauss-Kruger zone 13,conversion,,,,,2538,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 39E (code 16373). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16274,3-degree Gauss-Kruger zone 14,conversion,,,,,2539,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 42E (code 16374). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16275,3-degree Gauss-Kruger zone 15,conversion,,,,,2540,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 45E (code 16375). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16276,3-degree Gauss-Kruger zone 16,conversion,,,,,2604,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 48E (code 16376). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16277,3-degree Gauss-Kruger zone 17,conversion,,,,,2605,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 51E (code 16377). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16278,3-degree Gauss-Kruger zone 18,conversion,,,,,2606,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 54E (code 16378). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16279,3-degree Gauss-Kruger zone 19,conversion,,,,,2607,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 57E (code 16379). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16280,3-degree Gauss-Kruger zone 20,conversion,,,,,2608,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 60E (code 16380). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16281,3-degree Gauss-Kruger zone 21,conversion,,,,,2609,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 63E (code 16381). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16282,3-degree Gauss-Kruger zone 22,conversion,,,,,2610,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 66E (code 16382). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16283,3-degree Gauss-Kruger zone 23,conversion,,,,,2611,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 69E (code 16383). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16284,3-degree Gauss-Kruger zone 24,conversion,,,,,2612,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 72E (code 16384). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16285,3-degree Gauss-Kruger zone 25,conversion,,,,,2613,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 75E (code 16385). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16286,3-degree Gauss-Kruger zone 26,conversion,,,,,2614,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 78E (code 16386). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16287,3-degree Gauss-Kruger zone 27,conversion,,,,,2615,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 81E (code 16387). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16288,3-degree Gauss-Kruger zone 28,conversion,,,,,2616,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 84E (code 16388). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16289,3-degree Gauss-Kruger zone 29,conversion,,,,,2617,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 87E (code 16389). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16290,3-degree Gauss-Kruger zone 30,conversion,,,,,2618,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 90E (code 16390). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16291,3-degree Gauss-Kruger zone 31,conversion,,,,,2619,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 93E (code 16391). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16292,3-degree Gauss-Kruger zone 32,conversion,,,,,2620,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 96E (code 16392). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16293,3-degree Gauss-Kruger zone 33,conversion,,,,,2621,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 99E (code 16393). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16294,3-degree Gauss-Kruger zone 34,conversion,,,,,2622,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 102E (code 16394). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16295,3-degree Gauss-Kruger zone 35,conversion,,,,,2623,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 105E (code 16395). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16296,3-degree Gauss-Kruger zone 36,conversion,,,,,2624,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 108E (code 16396). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16297,3-degree Gauss-Kruger zone 37,conversion,,,,,2625,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 111E (code 16397). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16298,3-degree Gauss-Kruger zone 38,conversion,,,,,2626,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 114E (code 16398). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16299,3-degree Gauss-Kruger zone 39,conversion,,,,,2627,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,Also found with zone truncated from false easting: see 3-degree Gauss-Kruger cm 117E (code 16399). Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16301,6-degree Gauss-Kruger CM 3E,conversion,,,,,1933,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 1N (code 16201) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16302,6-degree Gauss-Kruger CM 9E,conversion,,,,,1935,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 2N (code 16202) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16303,6-degree Gauss-Kruger CM 15E,conversion,,,,,1937,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 3N (code 16203) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16304,6-degree Gauss-Kruger CM 21E,conversion,,,,,1939,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 4N (code 16204) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16305,6-degree Gauss-Kruger CM 27E,conversion,,,,,1941,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 5N (code 16205) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16306,6-degree Gauss-Kruger CM 33E,conversion,,,,,1943,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 6N (code 16206) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16307,6-degree Gauss-Kruger CM 39E,conversion,,,,,1945,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 7N (code 16207) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16308,6-degree Gauss-Kruger CM 45E,conversion,,,,,1947,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 8N (code 16208) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16309,6-degree Gauss-Kruger CM 51E,conversion,,,,,1949,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 9N (code 16209) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16310,6-degree Gauss-Kruger CM 57E,conversion,,,,,1951,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 10N (code 16210) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16311,6-degree Gauss-Kruger CM 63E,conversion,,,,,1953,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 11N (code 16211) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16312,6-degree Gauss-Kruger CM 69E,conversion,,,,,1955,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 12N (code 16212) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16313,6-degree Gauss-Kruger CM 75E,conversion,,,,,1957,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 13N (code 16213) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16314,6-degree Gauss-Kruger CM 81E,conversion,,,,,1959,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 14N (code 16214) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16315,6-degree Gauss-Kruger CM 87E,conversion,,,,,1961,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 15N (code 16215) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16316,6-degree Gauss-Kruger CM 93E,conversion,,,,,1963,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 16N (code 16216) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16317,6-degree Gauss-Kruger CM 99E,conversion,,,,,1965,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 17N (code 16217) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16318,6-degree Gauss-Kruger CM 105E,conversion,,,,,1967,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 18N (code 16218) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16319,6-degree Gauss-Kruger CM 111E,conversion,,,,,1969,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 19N (code 16219) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16320,6-degree Gauss-Kruger CM 117E,conversion,,,,,1971,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 20N (code 16220) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16321,6-degree Gauss-Kruger CM 123E,conversion,,,,,1973,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 21N (code 16221) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16322,6-degree Gauss-Kruger CM 129E,conversion,,,,,1975,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 22N (code 16222) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16323,6-degree Gauss-Kruger CM 135E,conversion,,,,,1977,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 23N (code 16223) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16324,6-degree Gauss-Kruger CM 141E,conversion,,,,,1979,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 24N (code 16224) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16325,6-degree Gauss-Kruger CM 147E,conversion,,,,,1981,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 25N (code 16225) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16326,6-degree Gauss-Kruger CM 153E,conversion,,,,,1983,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 26N (code 16226) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16327,6-degree Gauss-Kruger CM 159E,conversion,,,,,1985,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 27N (code 16227) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16328,6-degree Gauss-Kruger CM 165E,conversion,,,,,1987,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 28N (code 16228) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16329,6-degree Gauss-Kruger CM 171E,conversion,,,,,1989,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 29N (code 16229) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16330,6-degree Gauss-Kruger CM 177E,conversion,,,,,1991,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 30N (code 16230) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16331,6-degree Gauss-Kruger CM 177W,conversion,,,,,1873,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 31N (code 16231) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16332,6-degree Gauss-Kruger CM 171W,conversion,,,,,1875,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 32N (code 16232) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,95.28 2002.36,1,0
-16333,6-degree Gauss-Kruger CM 165W,conversion,,,,,1877,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 33N (code 16233) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16334,6-degree Gauss-Kruger CM 159W,conversion,,,,,1879,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 34N (code 16234) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16335,6-degree Gauss-Kruger CM 153W,conversion,,,,,1881,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 35N (code 16235) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16336,6-degree Gauss-Kruger CM 147W,conversion,,,,,1883,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 36N (code 16236) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16337,6-degree Gauss-Kruger CM 141W,conversion,,,,,1885,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 37N (code 16237) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16338,6-degree Gauss-Kruger CM 135W,conversion,,,,,1887,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 38N (code 16238) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16339,6-degree Gauss-Kruger CM 129W,conversion,,,,,1889,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 39N (code 16239) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16340,6-degree Gauss-Kruger CM 123W,conversion,,,,,1891,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 40N (code 16240) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16341,6-degree Gauss-Kruger CM 117W,conversion,,,,,1893,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 41N (code 16241) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16342,6-degree Gauss-Kruger CM 111W,conversion,,,,,1895,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 42N (code 16242) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16343,6-degree Gauss-Kruger CM 105W,conversion,,,,,1897,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 43N (code 16243) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16344,6-degree Gauss-Kruger CM 99W,conversion,,,,,1899,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 44N (code 16244) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16345,6-degree Gauss-Kruger CM 93W,conversion,,,,,1901,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 45N (code 16245) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16346,6-degree Gauss-Kruger CM 87W,conversion,,,,,1903,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 46N (code 16246) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16347,6-degree Gauss-Kruger CM 81W,conversion,,,,,1905,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 47N (code 16247) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16348,6-degree Gauss-Kruger CM 75W,conversion,,,,,1907,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 48N (code 16248) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16349,6-degree Gauss-Kruger CM 69W,conversion,,,,,1909,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 49N (code 16249) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16350,6-degree Gauss-Kruger CM 63W,conversion,,,,,1911,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 50N (code 16250) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16351,6-degree Gauss-Kruger CM 57W,conversion,,,,,1913,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 51N (code 16251) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16352,6-degree Gauss-Kruger CM 51W,conversion,,,,,1915,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 52N (code 16252) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16353,6-degree Gauss-Kruger CM 45W,conversion,,,,,1917,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 53N (code 16253) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16354,6-degree Gauss-Kruger CM 39W,conversion,,,,,1919,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 54N (code 16254) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16355,6-degree Gauss-Kruger CM 33W,conversion,,,,,1921,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 55N (code 16255) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16356,6-degree Gauss-Kruger CM 27W,conversion,,,,,1923,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 56N (code 16256) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16357,6-degree Gauss-Kruger CM 21W,conversion,,,,,1925,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 57N (code 16257) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16358,6-degree Gauss-Kruger CM 15W,conversion,,,,,1927,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 58N (code 16258) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16359,6-degree Gauss-Kruger CM 9W,conversion,,,,,1929,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 59N (code 16259) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16360,6-degree Gauss-Kruger CM 3W,conversion,,,,,1931,Medium scale topographic mapping.,9807,,,6-degree Gauss-Kruger zone 60N (code 16260) without zone prefix to FE. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16361,3-degree Gauss-Kruger CM 3E,conversion,,,,,2299,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 1N (code 16261) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16362,3-degree Gauss-Kruger CM 6E,conversion,,,,,2300,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 2N (code 16262) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16363,3-degree Gauss-Kruger CM 9E,conversion,,,,,2301,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 3N (code 16263) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16364,3-degree Gauss-Kruger CM 12E,conversion,,,,,2302,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 4N (code 16264) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16365,3-degree Gauss-Kruger CM 15E,conversion,,,,,2303,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 5N (code 16265) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16366,3-degree Gauss-Kruger CM 18E,conversion,,,,,2304,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 6N (code 16266) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16367,3-degree Gauss-Kruger CM 21E,conversion,,,,,2305,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 7N (code 16267) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16368,3-degree Gauss-Kruger CM 24E,conversion,,,,,2306,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 8N (code 16268) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-16369,3-degree Gauss-Kruger CM 27E,conversion,,,,,2534,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 9N (code 16269) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16370,3-degree Gauss-Kruger CM 30E,conversion,,,,,2535,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 10N (code 16270) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16371,3-degree Gauss-Kruger CM 33E,conversion,,,,,2536,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 11N (code 16271) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16372,3-degree Gauss-Kruger CM 36E,conversion,,,,,2537,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 12N (code 16272) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16373,3-degree Gauss-Kruger CM 39E,conversion,,,,,2538,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 13N (code 16273) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16374,3-degree Gauss-Kruger CM 42E,conversion,,,,,2539,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 14N (code 16274) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16375,3-degree Gauss-Kruger CM 45E,conversion,,,,,2540,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 15N (code 16275) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16376,3-degree Gauss-Kruger CM 48E,conversion,,,,,2604,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 16N (code 16276) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16377,3-degree Gauss-Kruger CM 51E,conversion,,,,,2605,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 17N (code 16277) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16378,3-degree Gauss-Kruger CM 54E,conversion,,,,,2606,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 18N (code 16278) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16379,3-degree Gauss-Kruger CM 57E,conversion,,,,,2607,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 19N (code 16279) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16380,3-degree Gauss-Kruger CM 60E,conversion,,,,,2608,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 20N (code 16280) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16381,3-degree Gauss-Kruger CM 63E,conversion,,,,,2609,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 21N (code 16281) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16382,3-degree Gauss-Kruger CM 66E,conversion,,,,,2610,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 22N (code 16282) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16383,3-degree Gauss-Kruger CM 69E,conversion,,,,,2611,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 23N (code 16283) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16384,3-degree Gauss-Kruger CM 72E,conversion,,,,,2612,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 24N (code 16284) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16385,3-degree Gauss-Kruger CM 75E,conversion,,,,,2613,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 25N (code 16285) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16386,3-degree Gauss-Kruger CM 78E,conversion,,,,,2614,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 26N (code 16286) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16387,3-degree Gauss-Kruger CM 81E,conversion,,,,,2615,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 27N (code 16287) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16388,3-degree Gauss-Kruger CM 84E,conversion,,,,,2616,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 28N (code 16288) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16389,3-degree Gauss-Kruger CM 87E,conversion,,,,,2617,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 29N (code 16289) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16390,3-degree Gauss-Kruger CM 90E,conversion,,,,,2618,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 30N (code 16290) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16391,3-degree Gauss-Kruger CM 93E,conversion,,,,,2619,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 31N (code 16291) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16392,3-degree Gauss-Kruger CM 96E,conversion,,,,,2620,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 32N (code 16292) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16393,3-degree Gauss-Kruger CM 99E,conversion,,,,,2621,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 33N (code 16293) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16394,3-degree Gauss-Kruger CM 102E,conversion,,,,,2622,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 34N (code 16294) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16395,3-degree Gauss-Kruger CM 105E,conversion,,,,,2623,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 35N (code 16295) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16396,3-degree Gauss-Kruger CM 108E,conversion,,,,,2624,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 36N (code 16296) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16397,3-degree Gauss-Kruger CM 111E,conversion,,,,,2625,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 37N (code 16297) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16398,3-degree Gauss-Kruger CM 114E,conversion,,,,,2626,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 38N (code 16298) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16399,3-degree Gauss-Kruger CM 117E,conversion,,,,,2627,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,3-degree Gauss-Kruger zone 39N (code 16299) without zone prefix to false easting value. Original transformation by Gauss-Kruger formula.,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-16400,TM 0 N,conversion,,,,,1629,Oil exploration.,9807,,,,Shell UK,EPSG,1998-11-11 00:00:00,,1,0
-16405,TM 5 NE,conversion,,,,,1630,Oil exploration.,9807,,,,NAM,EPSG,1998-11-11 00:00:00,,1,0
-16406,TM 6 NE,conversion,,,,,1717,Oil exploration.,9807,,,Used by ExxonMobil for deepwater blocks offshore Nigeria.,ExxonMobil,EPSG,2002-02-12 00:00:00,,1,0
-16411,TM 11 NE,conversion,,,,,1489,Oil exploration.,9807,,,,Total-Fina,EPSG,2000-03-07 00:00:00,,1,0
-16412,TM 12 NE,conversion,,,,,1143,Oil exploration.,9807,,,,Total-Fina,EPSG,2000-03-07 00:00:00,,1,0
-16413,TM 13 NE,conversion,,,,,2771,Oil exploration.,9807,,,,TotalFinaElf,EPSG,2002-06-28 00:00:00,,1,0
-16430,TM 30 NE,conversion,,,,,2546,Oil exploration.,9807,,,,TotalFinaElf,EPSG,2001-11-06 00:00:00,,1,0
-16506,TM 106 NE,conversion,,,,,1495,Oil exploration.,9807,,,,PetroVietnam,EPSG,2000-03-07 00:00:00,,1,0
-16586,GK 106 NE,conversion,,,,,1494,Oil exploration.,9807,,,,BP Amoco,EPSG,2000-03-07 00:00:00,,1,0
-16611,TM 11.30 SE,conversion,,,,,1605,Oil exploration.,9807,,,,Esso Angola,EPSG,1998-11-11 00:00:00,,1,0
-16612,TM 12 SE,conversion,,,,,1604,Oil exploration.,9807,,,,Shell Angola,EPSG,1998-11-11 00:00:00,,1,0
-16636,TM 36 SE,conversion,,,,,1726,Oil exploration.,9807,,,,BP Mozambique,EPSG,1998-11-11 00:00:00,,1,0
-16709,TM 109 SE,conversion,,,,,2577,Oil exploration.,9807,,,Used by Arco and BP for ONWJ.,BP,EPSG,2002-02-12 00:00:00,,1,0
-16716,TM 116 SE,conversion,,,,,2588,Oil exploration.,9807,,,Used by BP for Terang-Sirasun.,BP,EPSG,2002-02-12 00:00:00,,1,0
-16732,TM 132 SE,conversion,,,,,2589,Oil exploration.,9807,,,Used for Tangguh developments.,BP,EPSG,2002-02-12 00:00:00,,1,0
-17001,TM 1 NW,conversion,,,,,1505,Oil exploration.,9807,,,,Various industry sources,EPSG,2000-10-19 00:00:00,,1,0
-17005,TM 5 NW,conversion,,,,,2296,Oil exploration.,9807,,,,Various oil industry sources,EPSG,2001-06-05 00:00:00,,1,0
-17054,TM 54 NW,conversion,,,,,1727,Oil exploration.,9807,,,,Shell,EPSG,2000-06-10 00:00:00,,1,0
-17348,Map Grid of Australia zone 48,conversion,,,,,1556,Large and medium scale topographic mapping and engineering survey.,9807,,,Grid convergence uses opposite sign convention to UTM,Australian Surveying and Land Information Group Internet WWW page.,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-17349,Map Grid of Australia zone 49,conversion,,,,,1557,Large and medium scale topographic mapping and engineering survey.,9807,,,Grid convergence uses opposite sign convention to UTM,Australian Surveying and Land Information Group Internet WWW page.,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-17350,Map Grid of Australia zone 50,conversion,,,,,1558,Large and medium scale topographic mapping and engineering survey.,9807,,,Grid convergence uses opposite sign convention to UTM,Australian Surveying and Land Information Group Internet WWW page.,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-17351,Map Grid of Australia zone 51,conversion,,,,,1559,Large and medium scale topographic mapping and engineering survey.,9807,,,Grid convergence uses opposite sign convention to UTM,Australian Surveying and Land Information Group Internet WWW page.,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-17352,Map Grid of Australia zone 52,conversion,,,,,1560,Large and medium scale topographic mapping and engineering survey.,9807,,,Grid convergence uses opposite sign convention to UTM,Australian Surveying and Land Information Group Internet WWW page.,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-17353,Map Grid of Australia zone 53,conversion,,,,,1561,Large and medium scale topographic mapping and engineering survey.,9807,,,Grid convergence uses opposite sign convention to UTM,Australian Surveying and Land Information Group Internet WWW page.,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-17354,Map Grid of Australia zone 54,conversion,,,,,1562,Large and medium scale topographic mapping and engineering survey.,9807,,,Grid convergence uses opposite sign convention to UTM,Australian Surveying and Land Information Group Internet WWW page.,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-17355,Map Grid of Australia zone 55,conversion,,,,,1563,Large and medium scale topographic mapping and engineering survey.,9807,,,Grid convergence uses opposite sign convention to UTM,Australian Surveying and Land Information Group Internet WWW page.,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-17356,Map Grid of Australia zone 56,conversion,,,,,1564,Large and medium scale topographic mapping and engineering survey.,9807,,,Grid convergence uses opposite sign convention to UTM,Australian Surveying and Land Information Group Internet WWW page.,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-17357,Map Grid of Australia zone 57,conversion,,,,,1565,Large and medium scale topographic mapping and engineering survey.,9807,,,Grid convergence uses opposite sign convention to UTM,Australian Surveying and Land Information Group Internet WWW page.,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-17358,Map Grid of Australia zone 58,conversion,,,,,1566,Large and medium scale topographic mapping and engineering survey.,9807,,,Grid convergence uses opposite sign convention to UTM,Australian Surveying and Land Information Group Internet WWW page.,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-17448,Australian Map Grid zone 48,conversion,,,,,1556,Large and medium scale topographic mapping and engineering survey.,9807,,,Grid convergence uses opposite sign convention to UTM,The Australian Map Grid Technical Manual; National Mapping Council of Australia; 1972,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-17449,Australian Map Grid zone 49,conversion,,,,,1557,Large and medium scale topographic mapping and engineering survey.,9807,,,Grid convergence uses opposite sign convention to UTM,The Australian Map Grid Technical Manual; National Mapping Council of Australia; 1972,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-17450,Australian Map Grid zone 50,conversion,,,,,1558,Large and medium scale topographic mapping and engineering survey.,9807,,,Grid convergence uses opposite sign convention to UTM,The Australian Map Grid Technical Manual; National Mapping Council of Australia; 1972,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-17451,Australian Map Grid zone 51,conversion,,,,,1559,Large and medium scale topographic mapping and engineering survey.,9807,,,Grid convergence uses opposite sign convention to UTM,The Australian Map Grid Technical Manual; National Mapping Council of Australia; 1972,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-17452,Australian Map Grid zone 52,conversion,,,,,1560,Large and medium scale topographic mapping and engineering survey.,9807,,,Grid convergence uses opposite sign convention to UTM,The Australian Map Grid Technical Manual; National Mapping Council of Australia; 1972,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-17453,Australian Map Grid zone 53,conversion,,,,,1561,Large and medium scale topographic mapping and engineering survey.,9807,,,Grid convergence uses opposite sign convention to UTM,The Australian Map Grid Technical Manual; National Mapping Council of Australia; 1972,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-17454,Australian Map Grid zone 54,conversion,,,,,1567,Large and medium scale topographic mapping and engineering survey.,9807,,,Grid convergence uses opposite sign convention to UTM,The Australian Map Grid Technical Manual; National Mapping Council of Australia; 1972,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-17455,Australian Map Grid zone 55,conversion,,,,,1568,Large and medium scale topographic mapping and engineering survey.,9807,,,Grid convergence uses opposite sign convention to UTM,The Australian Map Grid Technical Manual; National Mapping Council of Australia; 1972,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-17456,Australian Map Grid zone 56,conversion,,,,,2291,Large and medium scale topographic mapping and engineering survey.,9807,,,Grid convergence uses opposite sign convention to UTM,The Australian Map Grid Technical Manual; National Mapping Council of Australia; 1972,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-17457,Australian Map Grid zone 57,conversion,,,,,1565,Large and medium scale topographic mapping and engineering survey.,9807,,,Grid convergence uses opposite sign convention to UTM,The Australian Map Grid Technical Manual; National Mapping Council of Australia; 1972,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-17458,Australian Map Grid zone 58,conversion,,,,,1566,Large and medium scale topographic mapping and engineering survey.,9807,,,Grid convergence uses opposite sign convention to UTM,The Australian Map Grid Technical Manual; National Mapping Council of Australia; 1972,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-17515,South African Survey Grid zone 15,conversion,,,,,1454,"Large and medium scale topographic mapping, cadastral and engineering survey.",9808,,,"Transformation method sometimes described as ""Gauss conform"".",,EPSG,1996-04-12 00:00:00,95.30  96.29,1,0
-17517,South African Survey Grid zone 17,conversion,,,,,1455,"Large and medium scale topographic mapping, cadastral and engineering survey.",9808,,,"Transformation method sometimes described as ""Gauss conform"".",,EPSG,1996-04-12 00:00:00,95.30  96.29,1,0
-17519,South African Survey Grid zone 19,conversion,,,,,1456,"Large and medium scale topographic mapping, cadastral and engineering survey.",9808,,,"Transformation method sometimes described as ""Gauss conform"".",,EPSG,1996-04-12 00:00:00,95.30  96.29,1,0
-17521,South African Survey Grid zone 21,conversion,,,,,1457,"Large and medium scale topographic mapping, cadastral and engineering survey.",9808,,,"Transformation method sometimes described as ""Gauss conform"".",,EPSG,1996-04-12 00:00:00,95.30  96.29,1,0
-17523,South African Survey Grid zone 23,conversion,,,,,1458,"Large and medium scale topographic mapping, cadastral and engineering survey.",9808,,,"Transformation method sometimes described as ""Gauss conform"".",,EPSG,1996-04-12 00:00:00,95.30  96.29,1,0
-17525,South African Survey Grid zone 25,conversion,,,,,1459,"Large and medium scale topographic mapping, cadastral and engineering survey.",9808,,,"Transformation method sometimes described as ""Gauss conform"".",,EPSG,1996-04-12 00:00:00,95.30  96.29,1,0
-17527,South African Survey Grid zone 27,conversion,,,,,1460,"Large and medium scale topographic mapping, cadastral and engineering survey.",9808,,,"Transformation method sometimes described as ""Gauss conform"".",,EPSG,1996-04-12 00:00:00,95.30  96.29,1,0
-17529,South African Survey Grid zone 29,conversion,,,,,1461,"Large and medium scale topographic mapping, cadastral and engineering survey.",9808,,,"Transformation method sometimes described as ""Gauss conform"".",,EPSG,1996-04-12 00:00:00,95.30  96.29,1,0
-17531,South African Survey Grid zone 31,conversion,,,,,1462,"Large and medium scale topographic mapping, cadastral and engineering survey.",9808,,,"Transformation method sometimes described as ""Gauss conform"".",,EPSG,1996-04-12 00:00:00,95.30  96.29,1,0
-17533,South African Survey Grid zone 33,conversion,,,,,1463,"Large and medium scale topographic mapping, cadastral and engineering survey.",9808,,,"Transformation method sometimes described as ""Gauss conform"".",,EPSG,1996-04-12 00:00:00,95.30  96.29,1,0
-17611,South West African Survey Grid zone 11,conversion,,,,,1838,"Large and medium scale topographic mapping, cadastral and engineering survey.",9808,,,"Transformation method sometimes described as ""Gauss conform"".",Chief Directorate Surveys and Land Information; Mowbray; South Africa.,EPSG,1997-06-16 00:00:00,95.30  96.29  97.16,1,0
-17613,South West African Survey Grid zone 13,conversion,,,,,1839,"Large and medium scale topographic mapping, cadastral and engineering survey.",9808,,,"Transformation method sometimes described as ""Gauss conform"".",Chief Directorate Surveys and Land Information; Mowbray; South Africa.,EPSG,1997-06-16 00:00:00,95.30  96.29  97.16,1,0
-17615,South West African Survey Grid zone 15,conversion,,,,,1840,"Large and medium scale topographic mapping, cadastral and engineering survey.",9808,,,"Transformation method sometimes described as ""Gauss conform"".",Chief Directorate Surveys and Land Information; Mowbray; South Africa.,EPSG,1997-06-16 00:00:00,95.30  96.29  97.16,1,0
-17617,South West African Survey Grid zone 17,conversion,,,,,1841,"Large and medium scale topographic mapping, cadastral and engineering survey.",9808,,,"Transformation method sometimes described as ""Gauss conform"".",Chief Directorate Surveys and Land Information; Mowbray; South Africa.,EPSG,1997-06-16 00:00:00,95.30  96.29  97.16,1,0
-17619,South West African Survey Grid zone 19,conversion,,,,,1842,"Large and medium scale topographic mapping, cadastral and engineering survey.",9808,,,"Transformation method sometimes described as ""Gauss conform"".",Chief Directorate Surveys and Land Information; Mowbray; South Africa.,EPSG,1997-06-16 00:00:00,95.30  96.29  97.16,1,0
-17621,South West African Survey Grid zone 21,conversion,,,,,1843,"Large and medium scale topographic mapping, cadastral and engineering survey.",9808,,,"Transformation method sometimes described as ""Gauss conform"".",Chief Directorate Surveys and Land Information; Mowbray; South Africa.,EPSG,1997-06-16 00:00:00,95.30  96.29  97.16,1,0
-17623,South West African Survey Grid zone 23,conversion,,,,,1844,"Large and medium scale topographic mapping, cadastral and engineering survey.",9808,,,"Transformation method sometimes described as ""Gauss conform"".",Chief Directorate Surveys and Land Information; Mowbray; South Africa.,EPSG,1997-06-16 00:00:00,95.30  96.29  97.16,1,0
-17625,South West African Survey Grid zone 25,conversion,,,,,1845,"Large and medium scale topographic mapping, cadastral and engineering survey.",9808,,,"Transformation method sometimes described as ""Gauss conform"".",Chief Directorate Surveys and Land Information; Mowbray; South Africa.,EPSG,1997-06-16 00:00:00,95.30  96.29  97.16,1,0
-17700,MTM Quebec zone 2,conversion,,,,,1420,Large and medium scale topographic mapping and engineering survey.,9807,,,,Topographic Mapping Section; Quebec Ministry of Natural Resources.,EPSG,1997-11-13 00:00:00,,1,0
-17701,MTM zone 1,conversion,,,,,2226,Large and medium scale topographic mapping and engineering survey.,9807,,,,Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.,EPSG,1997-11-13 00:00:00,,1,0
-17702,MTM Newfoundland zone 2,conversion,,,,,2227,Large and medium scale topographic mapping and engineering survey.,9807,,,,Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.,EPSG,1997-11-13 00:00:00,,1,0
-17703,MTM zone 3,conversion,,,,,2290,Large and medium scale topographic mapping and engineering survey.,9807,,,,Topographic Mapping Section; Quebec Ministry of Natural Resources. Also Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.,EPSG,1997-11-13 00:00:00,,1,0
-17704,MTM zone 4,conversion,,,,,2276,Large and medium scale topographic mapping and engineering survey.,9807,,,,Topographic Mapping Section; Quebec Ministry of Natural Resources. Also Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.,EPSG,1997-11-13 00:00:00,,1,0
-17705,MTM zone 5,conversion,,,,,2277,Large and medium scale topographic mapping and engineering survey.,9807,,,,Topographic Mapping Section; Quebec Ministry of Natural Resources. Also Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.,EPSG,1997-11-13 00:00:00,,1,0
-17706,MTM zone 6,conversion,,,,,2278,Large and medium scale topographic mapping and engineering survey.,9807,,,,Topographic Mapping Section; Quebec Ministry of Natural Resources. Also Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.,EPSG,1997-11-13 00:00:00,,1,0
-17707,MTM zone 7,conversion,,,,,1425,Large and medium scale topographic mapping and engineering survey.,9807,,,,Topographic Mapping Section; Quebec Ministry of Natural Resources.,EPSG,1997-11-13 00:00:00,,1,0
-17708,MTM zone 8,conversion,,,,,2279,Large and medium scale topographic mapping and engineering survey.,9807,,,,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,1997-11-13 00:00:00,,1,0
-17709,MTM zone 9,conversion,,,,,2280,Large and medium scale topographic mapping and engineering survey.,9807,,,,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,1997-11-13 00:00:00,,1,0
-17710,MTM zone 10,conversion,,,,,2281,Large and medium scale topographic mapping and engineering survey.,9807,,,,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,1997-11-13 00:00:00,,1,0
-17711,MTM zone 11,conversion,,,,,1432,Large and medium scale topographic mapping and engineering survey.,9807,,,,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,1997-11-13 00:00:00,,1,0
-17712,MTM zone 12,conversion,,,,,1433,Large and medium scale topographic mapping and engineering survey.,9807,,,,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,1997-11-13 00:00:00,,1,0
-17713,MTM zone 13,conversion,,,,,1434,Large and medium scale topographic mapping and engineering survey.,9807,,,,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,1997-11-13 00:00:00,,1,0
-17714,MTM zone 14,conversion,,,,,1435,Large and medium scale topographic mapping and engineering survey.,9807,,,,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,1997-11-13 00:00:00,,1,0
-17715,MTM zone 15,conversion,,,,,1436,Large and medium scale topographic mapping and engineering survey.,9807,,,,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,1997-11-13 00:00:00,,1,0
-17716,MTM zone 16,conversion,,,,,1437,Large and medium scale topographic mapping and engineering survey.,9807,,,,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,1997-11-13 00:00:00,,1,0
-17717,MTM zone 17,conversion,,,,,1438,Large and medium scale topographic mapping and engineering survey.,9807,,,,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,1997-11-13 00:00:00,,1,0
-17794,MTM Nova Scotia zone 4,conversion,,,,,1534,Large and medium scale topographic mapping and engineering survey.,9807,,,,Geomatics Centre; Nova Scotia Ministry of Housing and Municipal Affairs.,EPSG,1999-05-24 00:00:00,99.042,1,0
-17795,MTM Nova Scotia zone 5,conversion,,,,,1535,Large and medium scale topographic mapping and engineering survey.,9807,,,,Geomatics Centre; Nova Scotia Ministry of Housing and Municipal Affairs.,EPSG,1999-05-24 00:00:00,99.042,1,0
-17801,Japan Plane Rectangular CS zone I,conversion,,,,,1854,"Large and medium scale topographic mapping, cadastral and engineering survey.",9807,,,Original transformation by Gauss-Kruger formula.,Ministry of Construction; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/image/heichoku2.gif,EPSG,2002-06-22 00:00:00,99.97 2002.08,1,0
-17802,Japan Plane Rectangular CS zone II,conversion,,,,,1855,"Large and medium scale topographic mapping, cadastral and engineering survey.",9807,,,Original transformation by Gauss-Kruger formula.,Ministry of Construction; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/image/heichoku2.gif,EPSG,2002-06-22 00:00:00,99.97 2002.08,1,0
-17803,Japan Plane Rectangular CS zone III,conversion,,,,,1856,"Large and medium scale topographic mapping, cadastral and engineering survey.",9807,,,Original transformation by Gauss-Kruger formula.,Ministry of Construction; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/image/heichoku2.gif,EPSG,2002-06-22 00:00:00,99.97 2002.08,1,0
-17804,Japan Plane Rectangular CS zone IV,conversion,,,,,1857,"Large and medium scale topographic mapping, cadastral and engineering survey.",9807,,,Original transformation by Gauss-Kruger formula.,Ministry of Construction; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/image/heichoku2.gif,EPSG,2002-06-22 00:00:00,99.97 2002.08,1,0
-17805,Japan Plane Rectangular CS zone V,conversion,,,,,1858,"Large and medium scale topographic mapping, cadastral and engineering survey.",9807,,,Original transformation by Gauss-Kruger formula.,Ministry of Construction; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/image/heichoku2.gif,EPSG,2002-06-22 00:00:00,99.97 2002.08,1,0
-17806,Japan Plane Rectangular CS zone VI,conversion,,,,,1859,"Large and medium scale topographic mapping, cadastral and engineering survey.",9807,,,Original transformation by Gauss-Kruger formula.,Ministry of Construction; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/image/heichoku2.gif,EPSG,2002-06-22 00:00:00,99.97 2002.08,1,0
-17807,Japan Plane Rectangular CS zone VII,conversion,,,,,1860,"Large and medium scale topographic mapping, cadastral and engineering survey.",9807,,,Original transformation by Gauss-Kruger formula.,Ministry of Construction; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/image/heichoku2.gif,EPSG,2002-06-22 00:00:00,99.97 2002.08,1,0
-17808,Japan Plane Rectangular CS zone VIII,conversion,,,,,1861,"Large and medium scale topographic mapping, cadastral and engineering survey.",9807,,,Original transformation by Gauss-Kruger formula.,Ministry of Construction; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/image/heichoku2.gif,EPSG,2002-06-22 00:00:00,99.97 2002.08,1,0
-17809,Japan Plane Rectangular CS zone IX,conversion,,,,,1862,"Large and medium scale topographic mapping, cadastral and engineering survey.",9807,,,Original transformation by Gauss-Kruger formula.,Ministry of Construction; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/image/heichoku2.gif,EPSG,2002-06-22 00:00:00,99.97 2002.08,1,0
-17810,Japan Plane Rectangular CS zone X,conversion,,,,,1863,"Large and medium scale topographic mapping, cadastral and engineering survey.",9807,,,Original transformation by Gauss-Kruger formula.,Ministry of Construction; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/image/heichoku2.gif,EPSG,2002-06-22 00:00:00,99.97 2002.08,1,0
-17811,Japan Plane Rectangular CS zone XI,conversion,,,,,1864,"Large and medium scale topographic mapping, cadastral and engineering survey.",9807,,,Original transformation by Gauss-Kruger formula.,Ministry of Construction; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/image/heichoku2.gif,EPSG,2002-06-22 00:00:00,99.97 2002.08,1,0
-17812,Japan Plane Rectangular CS zone XII,conversion,,,,,1865,"Large and medium scale topographic mapping, cadastral and engineering survey.",9807,,,Original transformation by Gauss-Kruger formula.,Ministry of Construction; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/image/heichoku2.gif,EPSG,2002-06-22 00:00:00,99.97 2002.08,1,0
-17813,Japan Plane Rectangular CS zone XIII,conversion,,,,,1866,"Large and medium scale topographic mapping, cadastral and engineering survey.",9807,,,Original transformation by Gauss-Kruger formula.,Ministry of Construction; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/image/heichoku2.gif,EPSG,2002-06-22 00:00:00,99.97 2002.08,1,0
-17814,Japan Plane Rectangular CS zone XIV,conversion,,,,,1867,"Large and medium scale topographic mapping, cadastral and engineering survey.",9807,,,Original transformation by Gauss-Kruger formula.,Ministry of Construction; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/image/heichoku2.gif,EPSG,2002-06-22 00:00:00,2002.08,1,0
-17815,Japan Plane Rectangular CS zone XV,conversion,,,,,1868,"Large and medium scale topographic mapping, cadastral and engineering survey.",9807,,,Original transformation by Gauss-Kruger formula.,Ministry of Construction; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/image/heichoku2.gif,EPSG,2002-06-22 00:00:00,2002.08,1,0
-17816,Japan Plane Rectangular CS zone XVI,conversion,,,,,1869,"Large and medium scale topographic mapping, cadastral and engineering survey.",9807,,,Original transformation by Gauss-Kruger formula.,Ministry of Construction; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/image/heichoku2.gif,EPSG,2002-06-22 00:00:00,2002.08,1,0
-17817,Japan Plane Rectangular CS zone XVII,conversion,,,,,1870,"Large and medium scale topographic mapping, cadastral and engineering survey.",9807,,,Original transformation by Gauss-Kruger formula.,Ministry of Construction; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/image/heichoku2.gif,EPSG,2002-06-22 00:00:00,2002.08,1,0
-17818,Japan Plane Rectangular CS zone XVIII,conversion,,,,,1871,"Large and medium scale topographic mapping, cadastral and engineering survey.",9807,,,Original transformation by Gauss-Kruger formula.,Ministry of Construction; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/image/heichoku2.gif,EPSG,2002-06-22 00:00:00,2002.08,1,0
-17819,Japan Plane Rectangular CS zone XIX,conversion,,,,,1872,"Large and medium scale topographic mapping, cadastral and engineering survey.",9807,,,Original transformation by Gauss-Kruger formula.,Ministry of Construction; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/image/heichoku2.gif,EPSG,2002-06-22 00:00:00,2002.08,1,0
-17901,Mount Eden Circuit,conversion,,,,,1500,Cadastral surveying.,9807,,,Superseded Imperial measure circuit in 1972.  Superseded by Mount Eden Circuit 2000 (code 17931) from March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17902,Bay of Plenty Circuit,conversion,,,,,1500,Cadastral surveying.,9807,,,Superseded Imperial measure circuit in 1972.  Superseded by Bay of Plenty Circuit 2000 (code 17932) from March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17903,Poverty Bay Circuit,conversion,,,,,1500,Cadastral surveying.,9807,,,Superseded Imperial measure circuit in 1972.  Superseded by Poverty Bay Circuit 2000 (code 17933) from March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17904,Hawkes Bay Circuit,conversion,,,,,1500,Cadastral surveying.,9807,,,Superseded Imperial measure circuit in 1972.  Superseded by Hawkes Bay Circuit 2000 (code 17934) from March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17905,Taranaki Circuit,conversion,,,,,1500,Cadastral surveying.,9807,,,Superseded Imperial measure circuit in 1972.  Superseded by Taranaki Circuit 2000 (code 17935) from March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17906,Tuhirangi Circuit,conversion,,,,,1500,Cadastral surveying.,9807,,,Superseded Imperial measure circuit in 1972.  Superseded by Tuhirangi Circuit 2000 (code 17936) from March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17907,Wanganui Circuit,conversion,,,,,1500,Cadastral surveying.,9807,,,Superseded Imperial measure circuit in 1972.  Superseded by Wanganui Circuit 2000 (code 17937) from March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17908,Wairarapa Circuit,conversion,,,,,1500,Cadastral surveying.,9807,,,Superseded Imperial measure circuit in 1972.  Superseded by Wairarapa Circuit 2000 (code 17938) from March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17909,Wellington Circuit,conversion,,,,,1500,Cadastral surveying.,9807,,,Superseded Imperial measure circuit in 1972.  Superseded by Wellington Circuit 2000 (code 17939) from March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17910,Collingwood Circuit,conversion,,,,,1501,Cadastral surveying.,9807,,,Superseded Imperial measure circuit in 1972.  Superseded by Collingwood Circuit 2000 (code 17940) from March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17911,Nelson Circuit,conversion,,,,,1501,Cadastral surveying.,9807,,,Superseded Imperial measure circuit in 1972.  Superseded by Nelson Circuit 2000 (code 17941) from March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17912,Karamea Circuit,conversion,,,,,1501,Cadastral surveying.,9807,,,Superseded Imperial measure circuit in 1972.  Superseded by Karamea Circuit 2000 (code 17942) from March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17913,Buller Circuit,conversion,,,,,1501,Cadastral surveying.,9807,,,Superseded Imperial measure circuit in 1972.  Superseded by Buller Circuit 2000 (code 17943) from March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17914,Grey Circuit,conversion,,,,,1501,Cadastral surveying.,9807,,,Superseded Imperial measure circuit in 1972.  Superseded by Grey Circuit 2000 (code 17944) from March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17915,Amuri Circuit,conversion,,,,,1501,Cadastral surveying.,9807,,,Superseded Imperial measure circuit in 1972.  Superseded by Amuri Circuit 2000 (code 17945) from March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17916,Marlborough Circuit,conversion,,,,,1501,Cadastral surveying.,9807,,,Superseded Imperial measure circuit in 1972.  Superseded by Marlborough Circuit 2000 (code 17946) from March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17917,Hokitika Circuit,conversion,,,,,1501,Cadastral surveying.,9807,,,Superseded Imperial measure circuit in 1972.  Superseded by Hokitika Circuit 2000 (code 17947) from March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17918,Okarito Circuit,conversion,,,,,1501,Cadastral surveying.,9807,,,Superseded Imperial measure circuit in 1972.  Superseded by Okarito Circuit 2000 (code 17948) from March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17919,Jacksons Bay Circuit,conversion,,,,,1501,Cadastral surveying.,9807,,,Superseded Imperial measure circuit in 1972.  Superseded by Jacksons Bay Circuit 2000 (code 17949) from March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17920,Mount Pleasant Circuit,conversion,,,,,1501,Cadastral surveying.,9807,,,Superseded Imperial measure circuit in 1972.  Superseded by Mount Pleasant Circuit 2000 (code 17950) from March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17921,Gawler Circuit,conversion,,,,,1501,Cadastral surveying.,9807,,,Superseded Imperial measure circuit in 1972.  Superseded by Gawler Circuit 2000 (code 17951) from March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17922,Timaru Circuit,conversion,,,,,1501,Cadastral surveying.,9807,,,Superseded Imperial measure circuit in 1972.  Superseded by Timaru Circuit 2000 (code 17952) from March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17923,Lindis Peak Circuit,conversion,,,,,1501,Cadastral surveying.,9807,,,Superseded Imperial measure circuit in 1972.  Superseded by Lindis Peak Circuit 2000 (code 17953) from March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17924,Mount Nicholas Circuit,conversion,,,,,1501,Cadastral surveying.,9807,,,Superseded Imperial measure circuit in 1972.  Superseded by Mount Nicholas Circuit 2000 (code 17954) from March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17925,Mount York Circuit,conversion,,,,,1501,Cadastral surveying.,9807,,,Superseded Imperial measure circuit in 1972.  Superseded by Mount York Circuit 2000 (code 17955) from March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17926,Observation Point Circuit,conversion,,,,,1501,Cadastral surveying.,9807,,,Superseded Imperial measure circuit in 1972.  Superseded by Observation Point Circuit 2000 (code 17956) from March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17927,North Taieri Circuit,conversion,,,,,1501,Cadastral surveying.,9807,,,Superseded Imperial measure circuit in 1972.  Superseded by North Taieri Circuit 2000 (code 17957) from March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17928,Bluff Circuit,conversion,,,,,1501,Cadastral surveying.,9807,,,Superseded Imperial measure circuit in 1972.  Superseded by Bluff Circuit 2000 (code 17958) from March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17931,Mount Eden Circuit 2000,conversion,,,,,1500,Cadastral surveying.,9807,,,Supersedes Mount Eden Circuit (code 17901) after 1st March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17932,Bay of Plenty Circuit 2000,conversion,,,,,1500,Cadastral surveying.,9807,,,Supersedes Bay of Plenty Circuit (code 17902) after 1st March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17933,Poverty Bay Circuit 2000,conversion,,,,,1500,Cadastral surveying.,9807,,,Supersedes Poverty Bay Circuit (code 17903) after 1st March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17934,Hawkes Bay Circuit 2000,conversion,,,,,1500,Cadastral surveying.,9807,,,Supersedes Hawkes Bay Circuit (code 17904) after 1st March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17935,Taranaki Circuit 2000,conversion,,,,,1500,Cadastral surveying.,9807,,,Supersedes Taranaki Circuit (code 17905) after 1st March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17936,Tuhirangi Circuit 2000,conversion,,,,,1500,Cadastral surveying.,9807,,,Supersedes Tuhirangi Circuit (code 17906) after 1st March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17937,Wanganui Circuit 2000,conversion,,,,,1500,Cadastral surveying.,9807,,,Supersedes Wanganui Circuit (code 17907) after 1st March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17938,Wairarapa Circuit 2000,conversion,,,,,1500,Cadastral surveying.,9807,,,Supersedes Wairarapa Circuit (code 17908) after 1st March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17939,Wellington Circuit 2000,conversion,,,,,1500,Cadastral surveying.,9807,,,Supersedes Wellington Circuit (code 17909) after 1st March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17940,Collingwood Circuit 2000,conversion,,,,,1501,Cadastral surveying.,9807,,,Supersedes Collingwood Circuit (code 17910) after 1st March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17941,Nelson Circuit 2000,conversion,,,,,1501,Cadastral surveying.,9807,,,Supersedes Nelson Circuit (code 17911) after 1st March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17942,Karamea Circuit 2000,conversion,,,,,1501,Cadastral surveying.,9807,,,Supersedes Karamea Circuit (code 17912) after 1st March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17943,Buller Circuit 2000,conversion,,,,,1501,Cadastral surveying.,9807,,,Supersedes Buller Circuit (code 17913) after 1st March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17944,Grey Circuit 2000,conversion,,,,,1501,Cadastral surveying.,9807,,,Supersedes Grey Circuit (code 17914) after 1st March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17945,Amuri Circuit 2000,conversion,,,,,1501,Cadastral surveying.,9807,,,Supersedes Amuri Circuit (code 17915) after 1st March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17946,Marlborough Circuit 2000,conversion,,,,,1501,Cadastral surveying.,9807,,,Supersedes Marlborough Circuit (code 17916) after 1st March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17947,Hokitika Circuit 2000,conversion,,,,,1501,Cadastral surveying.,9807,,,Supersedes Hokitika Circuit (code 17917) after 1st March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17948,Okarito Circuit 2000,conversion,,,,,1501,Cadastral surveying.,9807,,,Supersedes Okarito Circuit (code 17918) after 1st March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17949,Jacksons Bay Circuit 2000,conversion,,,,,1501,Cadastral surveying.,9807,,,Supersedes Jacksons Bay Circuit (code 17919) after 1st March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17950,Mount Pleasant Circuit 2000,conversion,,,,,1501,Cadastral surveying.,9807,,,Supersedes Mount Pleasant Circuit (code 17920) after 1st March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17951,Gawler Circuit 2000,conversion,,,,,1501,Cadastral surveying.,9807,,,Supersedes Gawler Circuit (code 17921) after 1st March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17952,Timaru Circuit 2000,conversion,,,,,1501,Cadastral surveying.,9807,,,Supersedes Timaru Circuit (code 17922) after 1st March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17953,Lindis Peak Circuit 2000,conversion,,,,,1501,Cadastral surveying.,9807,,,Supersedes Lindis Peak Circuit (code 17923) after 1st March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17954,Mount Nicholas Circuit 2000,conversion,,,,,1501,Cadastral surveying.,9807,,,Supersedes Mount Nicholas Circuit (code 17924) after 1st March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17955,Mount York Circuit 2000,conversion,,,,,1501,Cadastral surveying.,9807,,,Supersedes Mount York Circuit (code 17925) after 1st March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17956,Observation Point Circuit 2000,conversion,,,,,1501,Cadastral surveying.,9807,,,Supersedes Observation Point Circuit (code 17926) after 1st March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17957,North Taieri Circuit 2000,conversion,,,,,1501,Cadastral surveying.,9807,,,Supersedes North Taieri Circuit (code 17927) after 1st March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-17958,Bluff Circuit 2000,conversion,,,,,1501,Cadastral surveying.,9807,,,Supersedes Bluff Circuit (code 17928) after 1st March 2000.,Land Information New Zealand OSG Technical Report 8; April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-18011,Nord Algerie (ancienne),conversion,,,,,1728,Large and medium scale topographic mapping and engineering survey.,9801,,,Used with Voirol 1875 datum - now superseded.,,EPSG,1996-09-12 00:00:00,,1,0
-18012,Sud Algerie (ancienne),conversion,,,,,1729,Large and medium scale topographic mapping and engineering survey.,9801,,,Used with Voirol 1875 datum - now superseded.,,EPSG,1996-09-12 00:00:00,,1,0
-18021,Nord Algerie,conversion,,,,,1728,Large and medium scale topographic mapping and engineering survey.,9801,,,Use with Nord Sahara 1959 datum.,,EPSG,1996-09-12 00:00:00,,1,0
-18022,Sud Algerie,conversion,,,,,1729,Large and medium scale topographic mapping and engineering survey.,9801,,,Use with Nord Sahara 1959 datum.,,EPSG,1996-09-12 00:00:00,,1,0
-18031,Argentina zone 1,conversion,,,,,1608,Large and medium scale topographic mapping and engineering survey.,9807,,,Original transformation by Gauss-Kruger formula,,EPSG,2002-06-22 00:00:00,95.30 2002.36,1,0
-18032,Argentina zone 2,conversion,,,,,1609,Large and medium scale topographic mapping and engineering survey.,9807,,,Original transformation by Gauss-Kruger formula,,EPSG,2002-06-22 00:00:00,95.30 2002.36,1,0
-18033,Argentina zone 3,conversion,,,,,1610,Large and medium scale topographic mapping and engineering survey.,9807,,,Original transformation by Gauss-Kruger formula,,EPSG,2002-06-22 00:00:00,95.30 2002.36,1,0
-18034,Argentina zone 4,conversion,,,,,1611,Large and medium scale topographic mapping and engineering survey.,9807,,,Original transformation by Gauss-Kruger formula,,EPSG,2002-06-22 00:00:00,95.30 2002.36,1,0
-18035,Argentina zone 5,conversion,,,,,1612,Large and medium scale topographic mapping and engineering survey.,9807,,,Original transformation by Gauss-Kruger formula,,EPSG,2002-06-22 00:00:00,95.30 2002.36,1,0
-18036,Argentina zone 6,conversion,,,,,1613,Large and medium scale topographic mapping and engineering survey.,9807,,,Original transformation by Gauss-Kruger formula,,EPSG,2002-06-22 00:00:00,95.30 2002.36,1,0
-18037,Argentina zone 7,conversion,,,,,1614,Large and medium scale topographic mapping and engineering survey.,9807,,,Original transformation by Gauss-Kruger formula,,EPSG,2002-06-22 00:00:00,95.30 2002.36,1,0
-18041,Austria West Zone,conversion,,,,,1706,Large and medium scale topographic mapping and engineering survey.,9807,,,Superseded by M28 (EPSG code 18044).,,EPSG,1997-04-11 00:00:00,95.30  96.29  97.01  98.48,1,0
-18042,Austria Central Zone,conversion,,,,,1707,Large and medium scale topographic mapping and engineering survey.,9807,,,Superseded by M31 (EPSG code 18045).,,EPSG,1997-04-11 00:00:00,95.30  96.29  97.01  98.48,1,0
-18043,Austria East Zone,conversion,,,,,1708,Large and medium scale topographic mapping and engineering survey.,9807,,,Superseded by M34 (EPSG code 18046).,,EPSG,1997-04-11 00:00:00,95.30  96.29  97.01  98.48,1,0
-18044,Austria M28,conversion,,,,,1706,Large and medium scale topographic mapping and engineering survey.,9807,,,Supersedes Austria West zone (EPSG code 18041).,Bundesamt f�r Eich- und Vermessungswesen,EPSG,1999-10-20 00:00:00,,1,0
-18045,Austria M31,conversion,,,,,1707,Large and medium scale topographic mapping and engineering survey.,9807,,,Supersedes Austria Central zone (EPSG code 18042).,Bundesamt f�r Eich- und Vermessungswesen,EPSG,1999-10-20 00:00:00,,1,0
-18046,Austria M34,conversion,,,,,1708,Large and medium scale topographic mapping and engineering survey.,9807,,,Supersedes Austria East zone (EPSG code 18043).,Bundesamt f�r Eich- und Vermessungswesen,EPSG,1999-10-20 00:00:00,,1,0
-18051,Colombia West zone,conversion,,,,,1598,Large and medium scale topographic mapping and engineering survey.,9807,,,"Original transformation by Gauss-Kruger formula.  Zone name sometimes referred to as ""6 west"".",,EPSG,1997-04-11 00:00:00,95.30  96.29  97.11,1,0
-18052,Colombia Bogota zone,conversion,,,,,1599,Large and medium scale topographic mapping and engineering survey.,9807,,,Original transformation by Gauss-Kruger formula,,EPSG,1997-04-11 00:00:00,95.30  96.29  97.11,1,0
-18053,Colombia East Central zone,conversion,,,,,1600,Large and medium scale topographic mapping and engineering survey.,9807,,,"Original transformation by Gauss-Kruger formula.  Zone name sometimes referred to as ""3 east"".",,EPSG,1997-04-11 00:00:00,95.30  96.29  97.11,1,0
-18054,Colombia East zone,conversion,,,,,1601,Large and medium scale topographic mapping and engineering survey.,9807,,,"Original transformation by Gauss-Kruger formula.  Zone name sometimes referred to as ""6 east"".",,EPSG,1997-04-11 00:00:00,95.30  96.29  97.11,1,0
-18061,Cuba Norte,conversion,,,,,1487,Large and medium scale topographic mapping and engineering survey.,9801,,,,,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-18062,Cuba Sur,conversion,,,,,1488,Large and medium scale topographic mapping and engineering survey.,9801,,,,,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-18071,Egypt Blue Belt,conversion,,,,,1642,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,2002-07-16 00:00:00,2002.49,1,0
-18072,Egypt Red Belt,conversion,,,,,1643,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.30,1,0
-18073,Egypt Purple Belt,conversion,,,,,1644,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.30,1,0
-18074,Egypt Extended Purple Belt,conversion,,,,,1645,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.30,1,0
-18081,Lambert zone I,conversion,,,,,1731,Large and medium scale topographic mapping and engineering survey.,9801,,,Introduced 1972. Supersedes Lambert Nord France (code 18091).,IGN Paris.,EPSG,2001-11-06 00:00:00,95.26  2001.54,1,0
-18082,Lambert zone II,conversion,,,,,1734,Large and medium scale topographic mapping and engineering survey.,9801,,,Introduced 1972. Supersedes Lambert Centre France (code 18092).,IGN Paris.,EPSG,2001-11-06 00:00:00,95.26  2001.54,1,0
-18083,Lambert zone III,conversion,,,,,1733,Large and medium scale topographic mapping and engineering survey.,9801,,,Introduced 1972. Supersedes Lambert Sud France (code 18093).,IGN Paris.,EPSG,2001-11-06 00:00:00,95.26  2001.54,1,0
-18084,Lambert zone IV,conversion,,,,,1327,Large and medium scale topographic mapping and engineering survey.,9801,,,Introduced 1972. Supersedes Lambert Corse (code 18094).,IGN Paris.,EPSG,2001-11-06 00:00:00,2001.54,1,0
-18085,Lambert-93,conversion,,,,,1326,Large and medium scale topographic mapping and engineering survey.,9802,,,,IGN - Paris,EPSG,2000-10-19 00:00:00,,1,0
-18086,France EuroLambert,conversion,,,,,1326,Medium scale topographic and statistical mapping.,9801,,,This is Lambert zone II (code 18082) parameters converted from grads/Paris to degrees/Greenwich for use with ED50.,IGN Paris via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-18091,Lambert Nord France,conversion,,,,,1731,Large and medium scale topographic mapping and engineering survey.,9801,,,Superseded in 1972 by Lambert zone I (code 18081).,IGN Paris.,EPSG,2001-11-06 00:00:00,95.26  2001.54,1,0
-18092,Lambert Centre France,conversion,,,,,1734,Large and medium scale topographic mapping and engineering survey.,9801,,,Superseded in 1972 by Lambert zone II (code 18082).,IGN Paris.,EPSG,2001-11-06 00:00:00,95.26  2001.54,1,0
-18093,Lambert Sud France,conversion,,,,,1733,Large and medium scale topographic mapping and engineering survey.,9801,,,Superseded in 1972 by Lambert zone III (code 18083).,IGN Paris.,EPSG,2001-11-06 00:00:00,95.26  2001.54,1,0
-18094,Lambert Corse,conversion,,,,,1327,Large and medium scale topographic mapping and engineering survey.,9801,,,Superseded in 1972 by Lambert zone IV (code 18084).,IGN Paris.,EPSG,2001-11-06 00:00:00,2001.54,1,0
-18110,India zone 0,conversion,,,,,1668,Large and medium scale topographic mapping and engineering survey.,9801,,,BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.,US Army Map Service projection tables; 1943.,EPSG,1999-10-20 00:00:00,95.30  96.01  96.02  96.29  97.23,1,0
-18111,India zone I,conversion,,,,,1669,Large and medium scale topographic mapping and engineering survey.,9801,,,BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.,US Army Map Service projection tables; 1943.,EPSG,1999-10-20 00:00:00,95.30  96.02  96.29  97.23,1,0
-18112,India zone IIa,conversion,,,,,1670,Large and medium scale topographic mapping and engineering survey.,9801,,,BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.,US Army Map Service projection tables; 1943.,EPSG,1999-10-20 00:00:00,95.28  96.02  97.23,1,0
-18113,India zone IIb,conversion,,,,,1671,Large and medium scale topographic mapping and engineering survey.,9801,,,BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.,US Army Map Service projection tables; 1943.,EPSG,2000-03-07 00:00:00,95.28  96.02  97.23  2000.094,1,0
-18114,India zone IIIa,conversion,,,,,1672,Large and medium scale topographic mapping and engineering survey.,9801,,,BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.,US Army Map Service projection tables; 1943.,EPSG,2000-03-07 00:00:00,95.28  96.02  97.23  2000.094,1,0
-18115,India zone IIIb,conversion,,,,,2292,Large and medium scale topographic mapping and engineering survey.,9801,,,BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.,US Army Map Service projection tables; 1943.,EPSG,1999-10-20 00:00:00,95.28  96.02  97.23,1,0
-18116,India zone IVa,conversion,,,,,1673,Large and medium scale topographic mapping and engineering survey.,9801,,,BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.,US Army Map Service projection tables; 1943.,EPSG,2000-03-07 00:00:00,95.28  96.02  97.23  2000.094,1,0
-18117,India zone IVb,conversion,,,,,2293,Large and medium scale topographic mapping and engineering survey.,9801,,,BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.,US Army Map Service projection tables; 1943.,EPSG,1999-10-20 00:00:00,95.28  96.02  97.23,1,0
-18121,Italy zone 1,conversion,,,,,1718,Large and medium scale topographic mapping and engineering survey.,9807,,,Original transformation by Gauss-Boaga formula,,EPSG,1995-12-02 00:00:00,,1,0
-18122,Italy zone 2,conversion,,,,,1719,Large and medium scale topographic mapping and engineering survey.,9807,,,Original transformation by Gauss-Boaga formula,,EPSG,1995-12-02 00:00:00,,1,0
-18131,Nord Maroc,conversion,,,,,1703,Large and medium scale topographic mapping and engineering survey.,9801,,,A projection with the same parameter values used the Lambert Conic Near-Conformal method (EPSG code 9817) prior to 1953.,IGN Paris.,EPSG,1996-09-12 00:00:00,99.203,1,0
-18132,Sud Maroc,conversion,,,,,1704,Large and medium scale topographic mapping and engineering survey.,9801,,,A projection with the same parameter values used the Lambert Conic Near-Conformal method (EPSG code 9817) prior to 1953.,IGN Paris.,EPSG,1996-09-12 00:00:00,99.203,1,0
-18133,Sahara,conversion,,,,,1705,Large and medium scale topographic mapping and engineering survey.,9801,,,Created in 1977 to cover Sahara Marocain (ex Spanish Sahara),IGN Paris.,EPSG,1996-09-12 00:00:00,,1,0
-18141,New Zealand North Island National Grid,conversion,,,,,1500,Large and medium scale topographic mapping and engineering survey.,9807,,,Superseded by New Zealand Map Grid (code 19917).  Used for topographic mapping.,,EPSG,1999-10-20 00:00:00,95.30  96.29  97.231,1,0
-18142,New Zealand South Island National Grid,conversion,,,,,1501,Large and medium scale topographic mapping and engineering survey.,9807,,,Superseded by New Zealand Map Grid (code 19917).  Used for topographic mapping.,,EPSG,1999-10-20 00:00:00,95.30  96.29  97.231,1,0
-18151,Nigeria West Belt,conversion,,,,,1715,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-18152,Nigeria Mid Belt,conversion,,,,,1714,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-18153,Nigeria East Belt,conversion,,,,,1713,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-18161,Peru west zone,conversion,,,,,1753,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-18162,Peru central zone,conversion,,,,,1752,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-18163,Peru east zone,conversion,,,,,1751,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-18171,Philippines zone I,conversion,,,,,1698,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,2000-03-07 00:00:00,95.30 2000.93,1,0
-18172,Philippines zone II,conversion,,,,,1699,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,2000-03-07 00:00:00,95.30 2000.93,1,0
-18173,Philippines zone III,conversion,,,,,1700,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,2000-03-07 00:00:00,95.30 2000.93,1,0
-18174,Philippines zone IV,conversion,,,,,1701,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,2000-03-07 00:00:00,95.30 2000.93,1,0
-18175,Philippines zone V,conversion,,,,,1702,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,2000-03-07 00:00:00,95.30 2000.93,1,0
-18181,Nord Tunisie,conversion,,,,,1619,Large and medium scale topographic mapping and engineering survey.,9801,,,,,EPSG,1996-09-12 00:00:00,95.30,1,0
-18182,Sud Tunisie,conversion,,,,,1620,Large and medium scale topographic mapping and engineering survey.,9801,,,,,EPSG,1996-09-12 00:00:00,,1,0
-18191,Finland zone 1,conversion,,,,,1536,Large and medium scale topographic mapping and engineering survey.,9807,,,,www.nls.fi/maa/papers/kkj.html,EPSG,1997-07-22 00:00:00,,1,0
-18192,Finland zone 2,conversion,,,,,1537,Large and medium scale topographic mapping and engineering survey.,9807,,,,www.nls.fi/maa/papers/kkj.html,EPSG,1997-07-22 00:00:00,,1,0
-18193,Finland Uniform Coordinate System,conversion,,,,,1095,Large and medium scale topographic mapping and engineering survey.,9807,,,Used by Uniform Coordinate System over all country and also by zone 3 of Basic Coordinate System at larger scales.,www.nls.fi/maa/papers/kkj.html,EPSG,1997-07-22 00:00:00,,1,0
-18194,Finland zone 4,conversion,,,,,1539,Large and medium scale topographic mapping and engineering survey.,9807,,,,www.nls.fi/maa/papers/kkj.html,EPSG,1997-07-22 00:00:00,,1,0
-18201,Palestine Grid,conversion,,,,,1356,Large and medium scale topographic mapping and engineering survey.,9806,,,Also encountered as a Transverse Mercator projection with scale factor of 1.  The difference in conversion caused by the change of formula does not exceed 2m within Israel.  Within the State of Israel superseded by the Israeli CS Grid (EPSG code 18203).,,EPSG,1999-04-22 00:00:00,,1,0
-18202,Palestine Belt,conversion,,,,,1356,Large and medium scale topographic mapping and engineering survey.,9807,,,"Originally constructed as the Palestine Grid - EPSG code 18201. Adopted by the US Army Map Service as ""Palestine Belt"" with change of projection method and false northing (FN). Sometimes seen with unchanged FN of 126867.909.",,EPSG,1999-04-22 00:00:00,,1,0
-18203,Israeli CS,conversion,,,,,2603,Large and medium scale topographic mapping and engineering survey.,9806,,,,Survey of Israel   ftp://ftp.rd.soi.gov.il/doc,EPSG,2002-06-22 00:00:00,2002.34,1,0
-18204,Israeli TM,conversion,,,,,2603,Large and medium scale topographic mapping and engineering survey.,9807,,,Designed to approximate Israeli CRS grid in north-central Israel.,Survey of Israel   ftp://ftp.rd.soi.gov.il/doc,EPSG,2002-06-22 00:00:00,2002.34,1,0
-18211,Guatemala Norte,conversion,,,,,2120,Large and medium scale topographic mapping and engineering survey.,9801,,,,,EPSG,1999-08-16 00:00:00,,1,0
-18212,Guatemala Sur,conversion,,,,,2121,Large and medium scale topographic mapping and engineering survey.,9801,,,,,EPSG,2000-01-06 00:00:00,99.95,1,0
-18221,NGO zone I,conversion,,,,,1741,"Large and medium scale topographic mapping, cadastral and engineering survey.",9807,,,,"J. Danielsen; ""Transformasjoner ved Norges Geografiske Oppm�ling""; Kart Og Plan nr 1; 1982.",EPSG,1999-10-20 00:00:00,,1,0
-18222,NGO zone II,conversion,,,,,1742,"Large and medium scale topographic mapping, cadastral and engineering survey.",9807,,,,"J. Danielsen; ""Transformasjoner ved Norges Geografiske Oppm�ling""; Kart Og Plan nr 1; 1982.",EPSG,1999-10-20 00:00:00,,1,0
-18223,NGO zone III,conversion,,,,,1743,"Large and medium scale topographic mapping, cadastral and engineering survey.",9807,,,,"J. Danielsen; ""Transformasjoner ved Norges Geografiske Oppm�ling""; Kart Og Plan nr 1; 1982.",EPSG,1999-10-20 00:00:00,,1,0
-18224,NGO zone IV,conversion,,,,,1744,"Large and medium scale topographic mapping, cadastral and engineering survey.",9807,,,,"J. Danielsen; ""Transformasjoner ved Norges Geografiske Oppm�ling""; Kart Og Plan nr 1; 1982.",EPSG,1999-10-20 00:00:00,,1,0
-18225,NGO zone V,conversion,,,,,1745,"Large and medium scale topographic mapping, cadastral and engineering survey.",9807,,,,"J. Danielsen; ""Transformasjoner ved Norges Geografiske Oppm�ling""; Kart Og Plan nr 1; 1982.",EPSG,1999-10-20 00:00:00,,1,0
-18226,NGO zone VI,conversion,,,,,1746,"Large and medium scale topographic mapping, cadastral and engineering survey.",9807,,,,"J. Danielsen; ""Transformasjoner ved Norges Geografiske Oppm�ling""; Kart Og Plan nr 1; 1982.",EPSG,1999-10-20 00:00:00,,1,0
-18227,NGO zone VII,conversion,,,,,1747,"Large and medium scale topographic mapping, cadastral and engineering survey.",9807,,,,"J. Danielsen; ""Transformasjoner ved Norges Geografiske Oppm�ling""; Kart Og Plan nr 1; 1982.",EPSG,1999-10-20 00:00:00,,1,0
-18228,NGO zone VIII,conversion,,,,,1748,"Large and medium scale topographic mapping, cadastral and engineering survey.",9807,,,,"J. Danielsen; ""Transformasjoner ved Norges Geografiske Oppm�ling""; Kart Og Plan nr 1; 1982.",EPSG,1999-10-20 00:00:00,,1,0
-18231,India zone I (1975 metres),conversion,,,,,1676,Large and medium scale topographic mapping and engineering survey.,9801,,,BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.,,EPSG,2000-04-23 00:00:00,2000.39,1,0
-18232,India zone IIa (1975 metres),conversion,,,,,1677,Large and medium scale topographic mapping and engineering survey.,9801,,,BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.,,EPSG,2000-04-23 00:00:00,2000.39,1,0
-18233,India zone IIIa (1975 metres),conversion,,,,,1672,Large and medium scale topographic mapping and engineering survey.,9801,,,BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.,,EPSG,2000-04-23 00:00:00,2000.39,1,0
-18234,India zone IVa (1975 metres),conversion,,,,,1673,Large and medium scale topographic mapping and engineering survey.,9801,,,BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.,,EPSG,2000-04-23 00:00:00,2000.39,1,0
-18235,India zone IIb (1975 metres),conversion,,,,,1678,Large and medium scale topographic mapping and engineering survey.,9801,,,BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.,,EPSG,2000-04-23 00:00:00,2000.39,1,0
-18236,India zone I (1962 metres),conversion,,,,,1685,Large and medium scale topographic mapping and engineering survey.,9801,,,BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.,,EPSG,1999-10-20 00:00:00,,1,0
-18237,India zone IIa (1962 metres),conversion,,,,,1686,Large and medium scale topographic mapping and engineering survey.,9801,,,BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.,,EPSG,1999-10-20 00:00:00,,1,0
-18238,India zone IIb (1937 metres),conversion,,,,,1041,Large and medium scale topographic mapping and engineering survey.,9801,,,BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.,,EPSG,2000-04-23 00:00:00,2000.39,1,0
-18240,Libya zone 5,conversion,,,,,1470,Large and medium scale topographic mapping and engineering survey.,9807,,,,Brown and Root,EPSG,2000-03-07 00:00:00,,1,0
-18241,Libya zone 6,conversion,,,,,1471,Large and medium scale topographic mapping and engineering survey.,9807,,,,Brown and Root,EPSG,2000-03-07 00:00:00,,1,0
-18242,Libya zone 7,conversion,,,,,1472,Large and medium scale topographic mapping and engineering survey.,9807,,,,Brown and Root,EPSG,2000-03-07 00:00:00,,1,0
-18243,Libya zone 8,conversion,,,,,1473,Large and medium scale topographic mapping and engineering survey.,9807,,,,Brown and Root,EPSG,2000-03-07 00:00:00,,1,0
-18244,Libya zone 9,conversion,,,,,1474,Large and medium scale topographic mapping and engineering survey.,9807,,,,Brown and Root,EPSG,2000-03-07 00:00:00,,1,0
-18245,Libya zone 10,conversion,,,,,1475,Large and medium scale topographic mapping and engineering survey.,9807,,,,Brown and Root,EPSG,2000-03-07 00:00:00,,1,0
-18246,Libya zone 11,conversion,,,,,1476,Large and medium scale topographic mapping and engineering survey.,9807,,,,Brown and Root,EPSG,2000-03-07 00:00:00,,1,0
-18247,Libya zone 12,conversion,,,,,1477,Large and medium scale topographic mapping and engineering survey.,9807,,,,Brown and Root,EPSG,2000-03-07 00:00:00,,1,0
-18248,Libya zone 13,conversion,,,,,1478,Large and medium scale topographic mapping and engineering survey.,9807,,,,Brown and Root,EPSG,2000-03-07 00:00:00,,1,0
-18251,Korea East Belt,conversion,,,,,1496,Large and medium scale topographic mapping and engineering survey.,9807,,,,Clifford J. Mugnier; Photogrammertric Engineering and Remote Sensing,EPSG,2000-03-07 00:00:00,,1,0
-18252,Korea Central Belt,conversion,,,,,1497,Large and medium scale topographic mapping and engineering survey.,9807,,,,Clifford J. Mugnier; Photogrammertric Engineering and Remote Sensing,EPSG,2000-03-07 00:00:00,,1,0
-18253,Korea West Belt,conversion,,,,,1498,Large and medium scale topographic mapping and engineering survey.,9807,,,,Clifford J. Mugnier; Photogrammertric Engineering and Remote Sensing,EPSG,2000-03-07 00:00:00,,1,0
-18260,Maracaibo Grid (M1),conversion,,,,,1319,Oil exploration.,9801,,,Grid coordinates are (0 0) at Maracaibo Cathedral.,Various oil company sources.,EPSG,2000-03-07 00:00:00,,1,0
-18261,Maracaibo Grid,conversion,,,,,1319,Oil exploration.,9801,,,Grid coordinates are (200000 200000) at Maracaibo Cathedral.,Various oil company sources.,EPSG,2000-03-07 00:00:00,,1,0
-18262,Maracaibo Grid (M3),conversion,,,,,1319,Oil exploration.,9801,,,Grid coordinates are (500000 500000) at Maracaibo Cathedral.,Various oil company sources.,EPSG,2000-03-07 00:00:00,,1,0
-18263,Maracaibo La Rosa Grid,conversion,,,,,1319,Oil exploration.,9801,,,Grid coordinates are (-17044E 29545N) at Maracaibo Cathedral.,Various oil company sources.,EPSG,2000-06-23 00:00:00,,1,0
-18275,Balkans zone 5,conversion,,,,,1709,Large and medium scale topographic mapping and engineering survey.,9807,,,,EPSG,EPSG,2001-06-05 00:00:00,,1,0
-18276,Balkans zone 6,conversion,,,,,1710,Large and medium scale topographic mapping and engineering survey.,9807,,,,EPSG,EPSG,2001-06-05 00:00:00,,1,0
-18277,Balkans zone 7,conversion,,,,,1711,Large and medium scale topographic mapping and engineering survey.,9807,,,,EPSG,EPSG,2001-06-05 00:00:00,,1,0
-18278,Balkans zone 8,conversion,,,,,1712,Large and medium scale topographic mapping and engineering survey.,9807,,,,EPSG,EPSG,2001-06-05 00:00:00,,1,0
-18281,Poland zone I,conversion,,,,,1515,"Civilian topographic mapping, cadastral and engineering survey.",9809,,,,Glowny Urzad Geodezji i Kartografii via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-18282,Poland zone II,conversion,,,,,1516,"Civilian topographic mapping, cadastral and engineering survey.",9809,,,,Glowny Urzad Geodezji i Kartografii via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-18283,Poland zone III,conversion,,,,,1517,"Civilian topographic mapping, cadastral and engineering survey.",9809,,,,Glowny Urzad Geodezji i Kartografii via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-18284,Poland zone IV,conversion,,,,,1518,"Civilian topographic mapping, cadastral and engineering survey.",9809,,,,Glowny Urzad Geodezji i Kartografii via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-18285,Poland zone V,conversion,,,,,1519,"Civilian topographic mapping, cadastral and engineering survey.",9807,,,,Glowny Urzad Geodezji i Kartografii via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-18300,Poland CS92,conversion,,,,,1192,"Mapping at scales of 1:10,000 and smaller",9807,,,See Poland CS2000 zones (codes 18305-08) for cadastral survey and mapping at larger scales.,Glowny Urzad Geodezji i Kartografii via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-18305,Poland CS2000 zone 5,conversion,,,,,1520,"Topographic mapping at scales of 1:5,000 and larger, cadastral and engineering survey.",9807,,,"See Poland CS92 (code 18300) for mapping at 1:10,000 and smaller scales.",Glowny Urzad Geodezji i Kartografii via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-18306,Poland CS2000 zone 6,conversion,,,,,1521,"Topographic mapping at scales of 1:5,000 and larger, cadastral and engineering survey.",9807,,,"See Poland CS92 (code 18300) for mapping at 1:10,000 and smaller scales.",Glowny Urzad Geodezji i Kartografii via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-18307,Poland CS2000 zone 7,conversion,,,,,1522,"Topographic mapping at scales of 1:5,000 and larger, cadastral and engineering survey.",9807,,,"See Poland CS92 (code 18300) for mapping at 1:10,000 and smaller scales.",Glowny Urzad Geodezji i Kartografii via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-18308,Poland CS2000 zone 8,conversion,,,,,1523,"Topographic mapping at scales of 1:5,000 and larger, cadastral and engineering survey.",9807,,,"See Poland CS92 (code 18300) for mapping at 1:10,000 and smaller scales.",Glowny Urzad Geodezji i Kartografii via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-18401,Kp2000 Jylland og Fyn,conversion,,,,,2531,"Topographic mapping at scales of 1:5,000 and larger, cadastral and engineering survey.",9807,,,"See UTM zone 32N (code 16032) for mapping at 1:10,000 and smaller scales.",Kort og Matrikelstyrelsen,EPSG,2001-11-06 00:00:00,,1,0
-18402,Kp2000 Sjaelland,conversion,,,,,2532,"Topographic mapping at scales of 1:5,000 and larger, cadastral and engineering survey.",9807,,,"See UTM zone 32N (code 16032) for mapping at 1:10,000 and smaller scales.",Kort og Matrikelstyrelsen,EPSG,2001-11-06 00:00:00,,1,0
-18403,Kp2000 Bornholm,conversion,,,,,2533,"Topographic mapping at scales of 1:5,000 and larger, cadastral and engineering survey.",9807,,,"See UTM zone 33N (code 16033) for mapping at 1:10,000 and smaller scales.",Kort og Matrikelstyrelsen,EPSG,2001-11-06 00:00:00,,1,0
-18411,French West Africa Senegal zone,conversion,,,,,2548,Small scale topographic mapping.,9807,,,Superseded in 1950 by UTM.,TotatFinaElf,EPSG,2002-01-18 00:00:00,,1,0
-18412,French West Africa Ivory Coast zone,conversion,,,,,2549,Small scale topographic mapping.,9807,,,Superseded in 1950 by UTM.,TotatFinaElf,EPSG,2002-01-18 00:00:00,,1,0
-18413,French West Africa Dahomey zone,conversion,,,,,2550,Small scale topographic mapping.,9807,,,Superseded in 1950 by UTM.,TotatFinaElf,EPSG,2002-01-18 00:00:00,,1,0
-18414,French West Africa Niger zone,conversion,,,,,2551,Small scale topographic mapping.,9807,,,Superseded in 1950 by UTM.,TotatFinaElf,EPSG,2002-01-18 00:00:00,,1,0
-18415,French Equatorial Africa west zone,conversion,,,,,2552,Small scale topographic mapping.,9807,,,Superseded in 1950 by UTM.,TotatFinaElf,EPSG,2002-01-18 00:00:00,,1,0
-18416,French Equatorial Africa central zone,conversion,,,,,2553,Small scale topographic mapping.,9807,,,Superseded in 1950 by UTM.,TotatFinaElf,EPSG,2002-01-18 00:00:00,,1,0
-18417,French Equatorial Africa east zone,conversion,,,,,2554,Small scale topographic mapping.,9807,,,Superseded in 1950 by UTM.,TotatFinaElf,EPSG,2002-01-18 00:00:00,,1,0
-18421,Greenland zone 1 east,conversion,,,,,2556,Topographic mapping,9826,,,,"Kort og Matrikelstyrelsen, Copenhagen.",EPSG,2002-01-26 00:00:00,,1,0
-18422,Greenland zone 2 east,conversion,,,,,2557,Topographic mapping,9826,,,,"Kort og Matrikelstyrelsen, Copenhagen.",EPSG,2002-01-26 00:00:00,,1,0
-18423,Greenland zone 3 east,conversion,,,,,2558,Topographic mapping,9826,,,,"Kort og Matrikelstyrelsen, Copenhagen.",EPSG,2002-01-26 00:00:00,,1,0
-18424,Greenland zone 4 east,conversion,,,,,2559,Topographic mapping,9826,,,,"Kort og Matrikelstyrelsen, Copenhagen.",EPSG,2002-01-26 00:00:00,,1,0
-18425,Greenland zone 5 east,conversion,,,,,2560,Topographic mapping,9826,,,,"Kort og Matrikelstyrelsen, Copenhagen.",EPSG,2002-01-26 00:00:00,,1,0
-18426,Greenland zone 6 east,conversion,,,,,2561,Topographic mapping,9826,,,,"Kort og Matrikelstyrelsen, Copenhagen.",EPSG,2002-01-26 00:00:00,,1,0
-18427,Greenland zone 7 east,conversion,,,,,2562,Topographic mapping,9826,,,,"Kort og Matrikelstyrelsen, Copenhagen.",EPSG,2002-01-26 00:00:00,,1,0
-18428,Greenland zone 8 east,conversion,,,,,2569,Topographic mapping,9826,,,,"Kort og Matrikelstyrelsen, Copenhagen.",EPSG,2002-01-26 00:00:00,,1,0
-18432,Greenland zone 2 west,conversion,,,,,2563,Topographic mapping,9826,,,,"Kort og Matrikelstyrelsen, Copenhagen.",EPSG,2002-01-26 00:00:00,,1,0
-18433,Greenland zone 3 west,conversion,,,,,2564,Topographic mapping,9826,,,,"Kort og Matrikelstyrelsen, Copenhagen.",EPSG,2002-01-26 00:00:00,,1,0
-18434,Greenland zone 4 west,conversion,,,,,2565,Topographic mapping,9826,,,,"Kort og Matrikelstyrelsen, Copenhagen.",EPSG,2002-01-26 00:00:00,,1,0
-18435,Greenland zone 5 west,conversion,,,,,2566,Topographic mapping,9826,,,,"Kort og Matrikelstyrelsen, Copenhagen.",EPSG,2002-01-26 00:00:00,,1,0
-18436,Greenland zone 6 west,conversion,,,,,2567,Topographic mapping,9826,,,,"Kort og Matrikelstyrelsen, Copenhagen.",EPSG,2002-01-26 00:00:00,,1,0
-18437,Greenland zone 7 west,conversion,,,,,2568,Topographic mapping,9826,,,,"Kort og Matrikelstyrelsen, Copenhagen.",EPSG,2002-01-26 00:00:00,,1,0
-18441,CS63 zone A1,conversion,,,,,2772,Large scale topographic mapping and engineering survey.,9807,,,,EPSG,EPSG,2002-06-28 00:00:00,,1,0
-18442,CS63 zone A2,conversion,,,,,2773,Large scale topographic mapping and engineering survey.,9807,,,,EPSG,EPSG,2002-06-28 00:00:00,,1,0
-18443,CS63 zone A3,conversion,,,,,2774,Large scale topographic mapping and engineering survey.,9807,,,,EPSG,EPSG,2002-06-28 00:00:00,,1,0
-18444,CS63 zone A4,conversion,,,,,2775,Large scale topographic mapping and engineering survey.,9807,,,,EPSG,EPSG,2002-06-28 00:00:00,,1,0
-18446,CS63 zone K2,conversion,,,,,2776,Large scale topographic mapping and engineering survey.,9807,,,,EPSG,EPSG,2002-06-28 00:00:00,,1,0
-18447,CS63 zone K3,conversion,,,,,2777,Large scale topographic mapping and engineering survey.,9807,,,,EPSG,EPSG,2002-06-28 00:00:00,,1,0
-18448,CS63 zone K4,conversion,,,,,2778,Large scale topographic mapping and engineering survey.,9807,,,,KazGeodezia,EPSG,2002-06-28 00:00:00,,1,0
-19900,Bahrain State Grid,conversion,,,,,1040,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.30,1,0
-19901,Belge Lambert 50,conversion,,,,,1347,Large and medium scale topographic mapping and engineering survey.,9802,,,"If software cannot handle latitude of false origin of 90 deg N, use latitude of false origin = 50.5 sexagesimal degrees with northing at false origin = 131983.890 m.","""Systemes de reference et formules de transformation en usage en Belgique""; IGN Brussels",EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-19902,Belge Lambert 72,conversion,,,,,1347,Large and medium scale topographic mapping and engineering survey.,9803,,,"Rotation from Belge Lambert 50 to Belge Lambert 72 is +29.2985sec. An equivalent using the conventional Lambert Conic Conformal (2SP) method (Belgian Lambert 72, code 19961) was introduced in 2000.","""Systemes de reference et formules de transformation en usage en Belgique""; IGN Brussels",EPSG,1999-04-22 00:00:00,95.30  96.29  99.28,1,0
-19903,Nord de Guerre,conversion,,,,,1369,Obsolete.,9801,,,,,EPSG,1996-09-12 00:00:00,,1,0
-19904,Ghana Metre Grid,conversion,,,,,1104,Large and medium scale topographic mapping and engineering survey.,9807,,,Supersedes Ghana National Grid (code 19959) from 1978.  British foot (Sears 1922) used to convert projection defining parameters.,Ordnance Survey International,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-19905,Netherlands East Indies Equatorial Zone,conversion,,,,,1122,Large and medium scale topographic mapping and engineering survey.,9804,,,,US Army Map Service projection tables; 1943.,EPSG,1995-12-02 00:00:00,95.30,1,0
-19906,Iraq zone,conversion,,,,,2294,Large and medium scale topographic mapping and engineering survey.,9801,,,,US Army Map Service projection tables; 1943.,EPSG,1996-04-12 00:00:00,95.30  96.29,1,0
-19907,Iraq National Grid,conversion,,,,,1124,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-19908,Irish National Grid,conversion,,,,,1305,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.30  96.29,1,1
-19909,Jamaica (Old Grid),conversion,,,,,1128,Large and medium scale topographic mapping and engineering survey.,9801,,,Superseded by Jamaica (New Grid).,,EPSG,1995-12-02 00:00:00,95.28,1,0
-19910,Jamaica National Grid,conversion,,,,,1128,Large and medium scale topographic mapping and engineering survey.,9801,,,Supersedes Jamaica (Old Grid).,,EPSG,1995-12-02 00:00:00,95.28,1,0
-19911,Laborde Grid,conversion,,,,,1149,Large and medium scale topographic mapping and engineering survey.,9815,,,Can also use transformation method 9813.,,EPSG,1997-11-13 00:00:00,97.613,1,0
-19913,RD Old,conversion,,,,,1275,Large and medium scale topographic mapping and engineering survey.,9809,,,,Nederlandse Commissie voor Geodesie publication 30.,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-19914,RD New,conversion,,,,,1275,Large and medium scale topographic mapping and engineering survey.,9809,,,,Nederlandse Commissie voor Geodesie publication 30.,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-19915,Aden Zone,conversion,,,,,1257,Large and medium scale topographic mapping and engineering survey.,9801,,,,US Army Map Service projection tables; 1943.,EPSG,1995-12-02 00:00:00,95.28,1,0
-19916,British National Grid,conversion,,,,,1264,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.30,1,0
-19917,New Zealand Map Grid,conversion,,,,,1175,Large and medium scale topographic mapping and engineering survey.,9811,,,Supersedes North and South Island National Grids (codes 18141-2).  Used for topographic mapping.,Dept. of Lands and Surveys Technical Circular 1973/32; 23 Nov 1973.,EPSG,1995-12-02 00:00:00,95.28,1,0
-19919,Qatar National Grid,conversion,,,,,1195,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-19920,Singapore Grid,conversion,,,,,1210,Large and medium scale topographic mapping and engineering survey.,9806,,,,,EPSG,1995-12-02 00:00:00,95.30  96.29,1,0
-19921,Spain,conversion,,,,,1217,Large and medium scale topographic mapping and engineering survey.,9801,,,Superseded by UTM,,EPSG,1995-12-02 00:00:00,95.28,1,0
-19922,Swiss New Grid,conversion,,,,,1286,Large and medium scale topographic mapping and engineering survey.,9815,,,,"""Die Projektionen der schweizerischen Plan- und Kartenwerke""; J. Bolliger 1967",EPSG,1997-11-13 00:00:00,95.30  96.29  97.27  97.612  97.62,1,0
-19923,Swiss Old Grid,conversion,,,,,1286,Large and medium scale topographic mapping and engineering survey.,9815,,,Superseded by LV03 (19922).,"""Die Projektionen der schweizerischen Plan- und Kartenwerke""; J. Bolliger 1967",EPSG,1997-11-13 00:00:00,95.30  96.29  97.612  97.62,1,0
-19924,Tobago Grid,conversion,,,,,1322,Large and medium scale topographic mapping and engineering survey.,9806,,,,,EPSG,1999-10-20 00:00:00,95.30  96.29  97.231,1,0
-19925,Trinidad Grid,conversion,,,,,1339,Large and medium scale topographic mapping and engineering survey.,9806,,,,,EPSG,1999-10-20 00:00:00,95.30  96.29  97.231,1,0
-19926,Stereo 70,conversion,,,,,1197,Large and medium scale topographic mapping and engineering survey.,9809,,,Supersedes Stereo 33 (code 19927).,,EPSG,1996-04-12 00:00:00,,1,0
-19927,Stereo 33,conversion,,,,,1197,Large and medium scale topographic mapping and engineering survey.,9809,,,Superseded by Stereo 70 (code 19926),,EPSG,1996-04-12 00:00:00,96.29,1,0
-19928,Kuwait TM,conversion,,,,,1310,Large and medium scale topographic mapping and engineering survey.,9807,,,,,EPSG,1996-04-12 00:00:00,,1,0
-19929,Swedish National Projection,conversion,,,,,1225,"Large and medium scale topographic mapping, cadastral and engineering survey.",9807,,,"Used since 1938 superseding 6 old zones.  Longitude of natural origin is 2.5 gon west of Stockholm prime meridian; transformation is also known as ""2.5 gon West of old Stockholm observatory"".",Lantmateriet of Sweden; private communication.,EPSG,1997-11-13 00:00:00,96.29  97.39,1,0
-19930,Greek Grid,conversion,,,,,1106,Large and medium scale topographic mapping and engineering survey.,9807,,,Created for use with GGRS87.,Geodesy Department; Public Petroleum Corporation of Greece.,EPSG,1997-06-16 00:00:00,,1,0
-19931,Egyseges Orszagos Vetuleti,conversion,,,,,1119,Large and medium scale topographic mapping and engineering survey.,9815,,,EOV = Uniform National Projection,http://lazarus.elte.hu/gb/geodez/geod2.htm,EPSG,1997-07-22 00:00:00,,1,0
-19933,Prince Edward Island Stereographic (ATS77),conversion,,,,,1533,Large and medium scale topographic mapping and engineering survey.,9809,,,In use from 1979.  To be phased out in late 1990's.,Geomatics Centre; Nova Scotia Ministry of Housing and Municipal Affairs.,EPSG,1997-11-13 00:00:00,,1,0
-19934,Lithuania 1994,conversion,,,,,1145,Large and medium scale topographic mapping and engineering survey.,9807,,,,HNIT-BALTIC GeoInfoServisas,EPSG,1998-03-12 00:00:00,,1,0
-19935,Rectified Skew Orthomorphic Malaya Grid,conversion,,,,,1690,Large and medium scale topographic mapping and engineering survey.,9812,,,"If using Oblique Mercator method (code 9815), Ec=23505.515 chSe, Nc=21992.646 chSe.",UK Directorate of Overseas Surveys paper,EPSG,1999-10-20 00:00:00,97.231,1,0
-19936,Portuguese National Grid,conversion,,,,,1294,Large and medium scale topographic mapping and engineering survey for military purposes.,9807,,,Original transformation by Gauss-Kruger formula.,Instituto Portugues de Cartografia e Cadastro,EPSG,1998-11-11 00:00:00,95.30  96.29  98.42,1,0
-19937,Tunisia Mining Grid,conversion,,,,,1618,Minerals licencing,9816,,,Origin: Djebel Kebar,Mining decree of 1st January 1953,EPSG,1999-11-15 00:00:00,99.81,1,0
-19938,Estonian National Grid,conversion,,,,,1090,Large and medium scale topographic mapping and engineering survey.,9802,,,Coordinates at the projection origin match those of TM Baltic 93.,http://www.geo.ut.ee/~raivo/estcoord.html,EPSG,1999-04-22 00:00:00,99.28,1,0
-19939,TM Baltic 93,conversion,,,,,1646,Large and medium scale topographic mapping and engineering survey.,9807,,,,http://www.geo.ut.ee/~raivo/estcoord.html,EPSG,1998-12-14 00:00:00,,1,0
-19940,Levant Zone,conversion,,,,,1623,Large and medium scale topographic mapping and engineering survey.,9817,,,Superseded by projection using full Lambert formula  (EPSG code 19948) from 1973.,US Army Map Service projection tables; 1943.,EPSG,1999-04-22 00:00:00,,1,0
-19941,Brazil Polyconic,conversion,,,,,1053,Small scale mapping,9818,,,,PetroBras,EPSG,1999-10-20 00:00:00,99.55,1,0
-19942,British West Indies Grid,conversion,,,,,2295,Large and medium scale topographic mapping and engineering survey.,9807,,,,"UK Royal Engineers projection tables P10/25, 1943.",EPSG,1999-04-22 00:00:00,,1,0
-19943,Barbados National Grid,conversion,,,,,1042,Large and medium scale topographic mapping and engineering survey.,9807,,,Superseded British West Indies Grid (19942) after 1983.,Ordnance Survey of Great Britain,EPSG,1999-04-22 00:00:00,,1,0
-19944,Quebec Lambert Projection,conversion,,,,,1368,Medium and small scale mapping,9802,,,,Service de la Cartographie; Minist�re des Ressources Naturelles; Quebec,EPSG,1999-10-22 00:00:00,,1,0
-19945,New Brunswick Stereographic (ATS77),conversion,,,,,1447,Large and medium scale topographic mapping and engineering survey.,9809,,,In use from 1979.  To be phased out in late 1990's.,New Brunswick Geographic Information Corporation land and water information standards manual.,EPSG,1999-10-20 00:00:00,99.61,1,0
-19946,New Brunswick Stereographic (NAD83),conversion,,,,,1447,Large and medium scale topographic mapping and engineering survey.,9809,,,In use from 1999.,New Brunswick Geographic Information Corporation land and water information standards manual.,EPSG,1999-10-20 00:00:00,,1,0
-19947,Austria Lambert,conversion,,,,,1037,Medium and small scale mapping,9802,,,,Bundesamt f�r Eich- und Vermessungswesen,EPSG,2000-01-07 00:00:00,99.94,1,0
-19948,Syria Lambert,conversion,,,,,1623,Large and medium scale topographic mapping and engineering survey.,9801,,,Superseded Levant zone using same parameters but truncated near-conformal method (code 19940) from 1973.,IGN Paris,EPSG,1999-10-20 00:00:00,,1,0
-19949,Levant Stereographic,conversion,,,,,1623,Large and medium scale topographic mapping and engineering survey.,9809,,,Used  prior to World War II for cadastral and large scale topographic mapping.,IGN Paris,EPSG,1999-10-20 00:00:00,,1,0
-19950,Landesvermessung 1995,conversion,,,,,1286,Large and medium scale topographic mapping and engineering survey.,9815,,,,Bundesamt f�r Landestopographie.  Aufbau der Landesvermessung der Schweiz 'LV95' Teil 3: Terrestrische Bezugssysteme und Bezugsrahmen. L+T 1999.,EPSG,1999-10-20 00:00:00,,1,0
-19951,Nakhl e Taqi Oblique Mercator,conversion,,,,,1338,Large and medium scale topographic mapping and engineering survey.,9815,,,Used only for terminal site.,Total-Fina,EPSG,1999-10-20 00:00:00,,1,0
-19952,Krovak,conversion,,,,,1306,Large and medium scale topographic mapping and engineering survey.,9819,,,,Research Institute for Geodesy Topography and Cartography (VUGTK); Prague.,EPSG,2000-03-07 00:00:00,,1,0
-19953,Qatar Grid,conversion,,,,,1346,Large and medium scale topographic mapping and engineering survey.,9806,,,,Maersk Oil and Gas,EPSG,2000-03-07 00:00:00,,1,0
-19954,Suriname Old TM,conversion,,,,,1222,Large and medium scale topographic mapping and engineering survey.,9807,,,Introduced in 1975.  Superseded by Suriname TM in 1979.,Shell International,EPSG,2000-06-10 00:00:00,,1,0
-19955,Suriname TM,conversion,,,,,1222,Large and medium scale topographic mapping and engineering survey.,9807,,,Superseded Suriname Old TM in 1979 (scale factor changed).,Shell International,EPSG,2000-06-10 00:00:00,,1,0
-19956,Rectified Skew Orthomorphic Borneo Grid (chains),conversion,,,,,1362,Large and medium scale topographic mapping and engineering survey.,9815,,,See 19957 and 19958 for feet and metres versions. If using Hotine Oblique Mercator method (code 9812) FE = FN = 0 chSe.  Being superseded by metric version (code 19958).,Directorate of Colonial Surveys projection tables 1954 revision.,EPSG,2002-07-13 00:00:00,2002.47,1,0
-19957,Rectified Skew Orthomorphic Borneo Grid (feet),conversion,,,,,1851,Large and medium scale topographic mapping and engineering survey.,9815,,,See 19956 and 19958 for chains and metres versions. If using Hotine Oblique Mercator method (code 9812) FE = FN = 0 ftSe.   Being superseded by metric version (code 19958).,EPSG unit conversion of Directorate of Colonial Surveys projection tables 1954 revision.,EPSG,2002-07-13 00:00:00,2002.47,1,0
-19958,Rectified Skew Orthomorphic Borneo Grid (metres),conversion,,,,,1362,Large and medium scale topographic mapping and engineering survey.,9815,,,See 19956 and 19957 for chains and feet versions.  Uses Sear's 1922 British yard-metre ratio as given by Bomford as 39.370147 inches per metre.  If using Hotine Oblique Mercator method (code 9812) FE = FN = 0 m.,EPSG unit conversion of Directorate of Colonial Surveys projection tables 1954 revision.,EPSG,2000-10-19 00:00:00,,1,0
-19959,Ghana National Grid,conversion,,,,,1104,Large and medium scale topographic mapping and engineering survey.,9807,,,Superseded by Ghana metric grid (code 19904).,Ordnance Survey International,EPSG,2000-10-19 00:00:00,,1,0
-19960,Prince Edward Isl. Stereographic (NAD83),conversion,,,,,1533,Large and medium scale topographic mapping and engineering survey.,9809,,,False Easting and False Northing changed from values used with ATS77  (which were FE=700000m; FN=400000m) to these new values when used with NAD83 (CSRS).   New values are FE=400000m; FN=800000m; adopted in 2000.,PEI Department of Transportation & Public Works; Mr. Serge Bernard,EPSG,2000-10-19 00:00:00,,1,0
-19961,Belgian Lambert 72,conversion,,,,,1347,Large and medium scale topographic mapping and engineering survey.,9802,,,"Introduced in 2000. Equivalent to Belge Lambert 72 (code 19902).  
-If software cannot handle latitude of false origin of 90 deg N, use latitude of false origin = 50� 47' 57.704"" with northing at false origin = 165 372.956 m.",IGN Brussels www.ngi.be/FR/FR2-1-5-1.shtm and EuroGeographics; http://crs.ifag.de/,EPSG,2000-10-19 00:00:00,,1,0
-19962,Irish Transverse Mercator,conversion,,,,,1305,Large and medium scale topographic mapping and engineering survey.,9807,,,,Ordnance Survey of Ireland,EPSG,2000-10-19 00:00:00,,1,0
-19963,Sierra Leone New Colony Grid,conversion,,,,,1342,Topographic mapping and engineering survey.,9807,,,Supersedes the Sierra Leone Colony Grid. New grid is 422.3 ft west and 112.1 ft south of old grid.,Ordnance Survey International,EPSG,2001-06-05 00:00:00,,1,0
-19964,New War Office Sierra Leone Grid,conversion,,,,,1342,Topographic mapping and engineering survey.,9807,,,Supersedes the War Office Sierra Leone Grid. New grid is 422.3 ft west and 112.1 ft south of old grid.,Ordnance Survey International,EPSG,2001-06-05 00:00:00,,1,0
-19965,US National Atlas Equal Area,conversion,,,,,1245,Statistical mapping,9821,,,,"United States Geological Survey, Western Geographic Science Center.",EPSG,2001-06-05 00:00:00,,1,0
-19966,Luxembourg Gauss,conversion,,,,,1146,Large and medium scale topographic mapping and engineering survey.,9807,,,,Administration du Cadastre et de la Topographie via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-19967,Slovenia Grid,conversion,,,,,1212,Large and medium scale topographic mapping and engineering survey.,9807,,,,Geodetska Uprava Republike Slovenije via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-19968,Plate Carree,conversion,,,,,1262,Graticule coordinates in rectangular Cartesian form.,9823,,,Origin at intersection of equator and prime meridian.,EPSG,EPSG,2001-06-05 00:00:00,,1,0
-19969,Portuguese Grid,conversion,,,,,1294,Large and medium scale topographic mapping and engineering survey.,9807,,,Original transformation by Gauss-Kruger formula.,Instituto Portugues de Cartografia e Cadastro via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-19971,New Zealand Transverse Mercator,conversion,,,,,1175,Large and medium scale topographic mapping and engineering survey.,9807,,,,Land Information New Zealand,EPSG,2001-08-28 00:00:00,,1,0
-19972,Irish Grid,conversion,,,,,1305,Large and medium scale topographic mapping and engineering survey.,9807,,,Defined as part of the 1965 and 1975 mapping adustments in which the scale factor was introduced as a best fit to retain existing grid coordinates.,Ordnance Survey of Ireland.,EPSG,2001-11-06 00:00:00,,1,0
-19973,Irish National Grid,conversion,,,,,2530,Large and medium scale topographic mapping and engineering survey.,9807,,,Used only with the 1952 geodetic adjustment. Superseded by the 1975 Mapping Adjustment: see code 19972.,Ordnance Survey of Northern Ireland.,EPSG,2001-11-06 00:00:00,,1,0
-19974,Modified Portuguese Grid,conversion,,,,,1294,Large and medium scale topographic mapping and engineering survey.,9807,,,Applied to Datum 73. Grid position at origin is coincident with the unmodified grid applied to Lisbon datum.,Instituto Portugues de Cartografia e Cadastro via EuroGeographics; http://crs.ifag.de/,EPSG,2001-11-06 00:00:00,,1,0
-19975,Trinidad Grid (Clarke's feet),conversion,,,,,1339,Oil industry exploration and production.,9806,,,"Foot version of EPSG code 19925. Not an official system, but used by some US-based organisations including Amoco Trinidad.",BP,EPSG,2002-02-12 00:00:00,,1,0
-19976,ICN Regional,conversion,,,,,1251,Small scale topographic and geological mapping.,9802,,,,Institute Cartografica Nacional,EPSG,2002-02-12 00:00:00,,1,0
-19977,Aramco Lambert,conversion,,,,,1206,Oil industry exploration and production.,9802,,,Used by Saudi Aramco when area of interest crosses UTM zone boundary. Adopted by partners for Core Venture 1 (South Ghawar) area.,Saudi Aramco,EPSG,2002-02-12 00:00:00,,1,0
-19978,Hong Kong 1980 Grid,conversion,,,,,1118,"Large scale topographic mapping, cadastral and engineering survey.",9807,,,"Grid origin is Partiridge Hill triangulation station (old trig ""2"").","Survey and Mapping Office, Lands Department. Http://www.info.gov.hk/landsd/mapping/tindex.htm",EPSG,2002-06-22 00:00:00,,1,0
-19979,Portugal Bonne,conversion,,,,,1294,"1:50,000 topographic mapping.",9828,,,,"Instituto Portugues de Cartografia e Cadastro, http://www.ipcc.pt/portuguese/produtos/cartografia/50m.html",EPSG,2002-07-13 00:00:00,,1,0
diff --git a/src/tiff/csv/coordinate_operation_method.csv b/src/tiff/csv/coordinate_operation_method.csv
deleted file mode 100644
index bc0956c..0000000
--- a/src/tiff/csv/coordinate_operation_method.csv
+++ /dev/null
@@ -1,1513 +0,0 @@
-"COORD_OP_METHOD_CODE","COORD_OP_METHOD_NAME","REVERSE_OP","FORMULA","EXAMPLE","REMARKS","INFORMATION_SOURCE","DATA_SOURCE","REVISION_DATE","CHANGE_ID","DEPRECATED"
-9601,Longitude rotation,1,Target_longitude = Source_longitude + longitude_offset.,,This transformation allows calculation of the longitude of a point in the target system by adding the parameter value to the longitude value of the point in the source system.,EPSG guidance note #7.,EPSG,1999-11-12 00:00:00,99.79,0
-9602,Geographic/geocentric conversions,1,"Latitude, P, and Longitude, L, in terms of Geographic Coordinate Reference System A may 
-be expressed in terms of a geocentric (earth centred) Cartesian coordinate reference system X, Y, Z 
-with the Z axis corresponding with the Polar axis positive northwards, the X axis through 
-the intersection of the Greenwich meridian and equator, and the Y axis through the 
-intersection of the equator with longitude 90 degrees E. If the prime meridian for geogCRS A is not 
-Greewich, longitudes must first be transformed to their Greenwich equivalent. If the earth's 
-spheroidal semi major axis is a, semi minor axis  b, and inverse flattening 1/f,  then
-
-   XA=   (nu + hA) cos P cos L
-   YA=   (nu + hA) cos P sin L
-   ZA=  ((1 - e^2) nu + hA) sin P
-
-where nu is the prime vertical radius of curvature at latitude P and is equal to 
-   nu = a /(1 - e^2*sin^2(P))^0.5,
-   P and L are respectively the latitude and longitude (related to Greenwich) of the point 
-   h is height above the ellipsoid, (topographic height plus geoidal height), and
-   e is the eccentricity of the ellipsoid where e^2 = (a^2 -b^2)/a^2 = 2f -f^2
-                                                                                                                                                 
-Cartesian coordinates in geocentric coordinate reference system B may be used to derive geographical coordinates in terms of geographic coordinate reference system B by:
-   P   =  arctan (ZB + e^2* nu*sin P) / (XB^2 + YB^2)^0.5 by iteration
-   L   = arctan YB/XB
-   hB  =  XB sec L sec P  - nu
-
-where LB is relative to Greenwich. If the geographic system has a non Greenwich prime 
-meridian, the Greenwich value of the local prime meridian should be applied to longitude.
-
-(Note that h is the height above the ellipsoid. This is the height value which is 
-delivered by Transit and GPS satellite observations but is not the topographic 
-height value which is normally used for national mapping and levelling operations. 
-The topographic height is usually the height above mean sea level or an alternative 
-level reference for the country. If one starts with a topographic height,  it will be 
-necessary to convert it to an ellipsoid height before using the above transformation 
-formulas. h = N + H, where N is the geoid height above the ellipsoid at the point 
-and is sometimes negative, and H is the height of the point above the geoid. The 
-height above the geoid is often taken to be that above mean sea level, perhaps with 
-a constant correction applied. Geoid heights of points above the nationally used 
-ellipsoid may not be readily available. For the WGS84 ellipsoid the value of N, 
-representing the height of the geoid relative to the ellipsoid, can vary between 
-values of -100m in the Sri Lanka area to +60m in the North Atlantic.)","Consider a North Sea point with coordinates derived by GPS satellite in the WGS 84 geographical coordinate system with coordinates of:
-
-           latitude    53 deg 48 min 33.82 sec N, 
-           longitude 02 deg 07 min 46.38 sec E, 
-    and ellipsoidal height 73.0m, 
-
-whose coordinates are required in terms of the ED50 geographical coordinate system which takes the International 1924 ellipsoid. The three parameter datum shift from WGS 84 to ED50 for this North Sea area is given as dX = +84.87m, dY = +96.49m, dZ = +116.95m. 
-
-The WGS 84 geographical coordinates convert to the following geocentric values using the above formulas for X, Y, Z:
-
-   XA = 3771 793.97m
-   YA =   140 253.34m
-   ZA = 5124 304.35m
-
-Applying the quoted datum shifts to these, we obtain new geocentric values now related to ED50:
-
-   XB = 3771 878.84m
-   YB =   140 349.83m
-   ZB = 5124 421.30m
-
-These convert to ED50 values on the International 1924 ellipsoid as:
-           latitude    53 deg 48 min 36.565 sec N, 
-           longitude 02 deg 07 min 51.477 sec E, 
-    and ellipsoidal height 28.02 m, 
-
-Note that the derived height is referred to the International 1924 ellipsoidal surface and will need a further correction for the height of the geoid at this point in order to relate it to Mean Sea Level.","This is a parameter-less conversion.   It is often concatenated in applications with the 3- or 7-parameter transformations 9603, 9606 and 9607 to form a geographic to geographic transformation.","EPSG guidance note #7 from ""Transformation from spatial to geographical coordinates""; B [...]
-9603,Geocentric translations,1,Xt = Xs + dX;  Yt = Ys + dY;  Zt = Zs + dZ,"Given a three parameter datum shift from WGS 84 to ED50 for this North Sea area is given as 
-dX = +84.87m, dY = +96.49m, dZ = +116.95m. 
-
-The WGS84 geographical coordinates convert to the following WGS 84 geocentric values using 
-the above formulas for X, Y, Z:
-
-   XA = 3771 793.97m
-   YA =   140 253.34m
-   ZA = 5124 304.35m
-
-Applying the given datum shifts to these, we obtain new geocentric values now related 
-to ED50:
-
-   XB = 3771 878.84m
-   YB =   140 349.83m
-   ZB = 5124 421.30m",This transformation allows calculation of coordinates in the target system by adding the parameter value to the corresponding coordinate values of the point in the source system.,EPSG guidance note #7.,EPSG,1996-09-18 00:00:00,,0
-9604,Molodenski,1,See information source.,See information source.,,,EPSG,1996-09-18 00:00:00,,0
-9605,Abridged Molodenski,1,"As an alternative to the computation of the new latitude, longitude and height above ellipsoid in discrete steps through geocentric coordinates, the changes in these geographic coordinates may be derived directly by formulas derived by Molodenski. Abridged versions of these formulas, which are quite satisfactory for three parameter transformations, are as follows:
-
-Dlat "" = [(-dX*sin(lat)*cos(lon)) - (dY*sin(lat)*sin(lon)) + (dZ*cos(lat)) + (((a*Df) + (f*Da))*sin(2*lat))] / (rho * sin(1""))
-
-Dlon "" = (-dX*sin(lon) + dY*cos(lon)) / ((nu*cos(lat)) * sin(1""))
-
-Dh = (dX*cos(lat)*cos(lon)) + (dY*cos(lat)*sin(lon)) + (dZ*sin(lat)) + ((a*Df + f*Da)*(sin(lat)^2)) - Da
-
-where the dX, dY and dZ terms are as before, and rho and nu are the meridian and prime vertical radii of curvature at the given latitude (lat) on the first ellipsoid, Da is the difference in the semi-major axes (a1 - a2) of the first and second ellipsoids and Df  is the difference in the flattening of the two ellipsoids.
-
-The formulas for Dlat and Dlon indicate changes in latitude and longitude in arc-seconds.",See information source.,"This transformation is a truncated Taylor series expansion of a transformation between two geographic coordinate systems, modelled as a set of geocentric translations.",EPSG guidance note #7.,EPSG,1999-04-22 00:00:00,99.01,0
-9606,Position Vector 7-param. transformation,1,"Transformation of coordinates from one geographic coordinate reference system into another (also known as a ""datum transformation"") is usually carried out as an implicit concatenation of three transformations:
-[geographical to geocentric >> geocentric to geocentric >> geocentric to geographic]
-
-The middle part of the concatenated transformation, from geocentric to geocentric, is usually described as a simplified 7-parameter Helmert transformation, expressed in matrix form with 7 parameters, in what is known as the ""Bursa-Wolf"" formula:
-
-   (Xt)             (  1       -Rz    +Ry)      (Xs)     (dX)
-   (Yt)  =  M *  ( +Rz      1      -Rx)  *  (Ys)  + (dY)
-   (Zt)              ( -Ry   +Rx       1 )      (Zs)      (dZ)
-
-The parameters are commonly referred to defining the transformation ""from source coordinate reference system to target coordinate reference system"", whereby (Xs, Ys, Zs) are the coordinates of the point in the source geocentric coordinate reference system and (Xt, Yt, Zt) are the coordinates of the point in the target geocentric coordinate reference system.  But that does not define the parameters uniquely; neither is the definition of the parameters implied in the formula, as is often [...]
-
-(dX, dY, dZ)   :Translation vector, to be added to the point's position vector in the source coordinate reference system in order to transform from source system to target system; also: the coordinates of the origin of the source coordinate reference system in the target coordinate reference system.
-
-(Rx, Ry, Rz)   :Rotations to be applied to the point's vector.  The sign convention is such that a positive rotation about an axis is defined as a clockwise rotation of the position vector when viewed from the origin of the Cartesian coordinate reference system in the positive direction of that axis; e.g. a positive rotation about the Z-axis only from source system to target system will result in a larger longitude value for the point in the target system.  Although rotation angles may b [...]
-
-M                  :The scale correction to be made to the position vector in the source coordinate reference system in order to obtain the correct scale in the target coordinate reference system. M = (1 + dS*10^-6), where dS is the scale correction expressed in parts per million. 
-
-<<<<<This text continues in the description of the Coordinate Frame Rotation formula>>>>>","Input point: 
-Coordinate reference system: WGS 72 (geographic 3D)
-  Latitude =   55 deg 00 min 00 sec 
-  Longitude =  4 deg 00 min 00 sec 
-  Ellipsoidal height =  0 m
-
-This transforms to Cartesian geocentric coords:
-    X = 3 657 660.66 (m)  
-    Y =    255 768.55 (m)
-    Z = 5 201 382.11 (m)
-
-Transformation parameters WGS 72 to WGS 84:
-   dX (m) = 0.000 
-   dY (m) = 0.000 
-   dZ (m) = +4.5
-   RX ("") = 0.000 
-   RY ("") = 0.000
-   RZ ("") = +0.554
-   Scale (ppm) = +0.219
-
-Application of the 7 parameter Position Vector Transformation results in WGS 84 coordinates of:
-   X = 3 657 660.78 (m)
-   Y =    255 778.43 (m)
-   Z = 5 201 387.75 (m)
-
-This converts into:
-   Latitude =   55 deg 00 min 00.090 sec
-   Longitude =  4 deg 00 min 00.554 sec
-   Ellipsoidal height =  +3.22 m
-on the WGS 84 geographic 3D coordinate reference system.",Note the analogy with the Coordinate Frame Rotation (code 9607) but beware of the differences!  The Position Vector convention is used by IAG and recommended by ISO 19111.,EPSG guidance note #7.,EPSG,1996-09-18 00:00:00,98.16,0
-9607,Coordinate Frame rotation,1,"<<<<<This text is continued from the description of the Position Vector Transformation formula>>>>>
-
-Although being common practice particularly in the European E&P industry, the Position Vector Transformation sign convention is not universally accepted.  A variation on this formula is also used, particularly in the USA E&P industry.  That formula is based on the same definition of translation and scale parameters, but a different definition of the rotation parameters.  The associated convention is known as the ""Coordinate Frame Rotation"" convention (EPSG coordinate operation method c [...]
-The formula is:
-
-   (X�)             (  1      +Rz      -Ry)     (X)      (dX)
-   (Y�)  =  M *  ( -Rz       1      +Rx)  * (Y)  +  (dY)
-   (Z�)              ( +Ry   -Rx        1 )     (Z)       (dZ)
-
-and the parameters are defined as:
-
-(dX, dY, dZ)   : Translation vector, to be added to the point's position vector in the source coordinate reference system in order to transform from source coordinate reference system to target coordinate reference system; also: the coordinates of the origin of source coordinate reference system in the target frame.
-
-(Rx, Ry, Rz)   : Rotations to be applied to the coordinate reference frame.  The sign convention is such that a positive rotation of the frame about an axis is defined as a clockwise rotation of the coordinate reference frame when viewed from the origin of the Cartesian coordinate reference system in the positive direction of that axis, that is a positive rotation about the Z-axis only from source coordinate reference system to target coordinate reference system will result in a smaller  [...]
-
-M                  : The scale factor to be applied to the position vector in the source coordinate reference system  in order to obtain the correct scale of the target coordinate reference system. M = (1+dS*10^-6), where dS is the scale correction expressed in parts per million.
-
-In the absence of rotations the two formulas are identical; the difference is solely in the rotations. The name of the second method reflects this.
-
-Note that the same rotation that is defined as positive in the first method is consequently negative in the second and vice versa.  It is therefore crucial that the convention underlying the definition of the rotation parameters is clearly understood and is communicated when exchanging datum transformation parameters, so that the parameters may be associated with the correct coordinate transformation method (algorithm).","The same example as for the Position Vector Transformation (coordi [...]
-
-Transformation parameters Coordinate Frame Rotation convention:
-dX (m) = 0.000 
-dY (m) = 0.000 
-dZ (m) = +4.5 
-RX ("") = 0.000
-RY ("") = 0.000
-RZ ("") = -0.554
-Scale (ppm) = +0.219
-
-Please note that only the rotation has changed sign as compared to the Position Vector Transformation.",Note the analogy with the Position Vector transformation (code 9606) but beware of the differences!  The Position Vector convention is used by IAG and recommended by ISO 19111.,EPSG guidance note #7.,EPSG,1996-09-18 00:00:00,,0
-9613,NADCON,1,See information source.,,Geodetic transformation operating on geographic coordinate differences by bi-linear interpolation.  Input expects longitudes to be positive west.,US Coast and geodetic Survey - http://www.ngs.noaa.gov,EPSG,1996-09-18 00:00:00,,0
-9614,NTv1,1,See information source.,,Geodetic transformation operating on geographic coordinate differences by bi-linear interpolation.  Superseded in 1997 by NTv2 (transformation method code 9615).   Input expects longitudes to be positive west.,Geomatics Canada - Geodetic Survey Division.,EPSG,1997-11-13 00:00:00,,0
-9615,NTv2,1,See information source.,,Geodetic transformation operating on geographic coordinate differences by bi-linear interpolation.  Supersedes  NTv1 (transformation method code 9614).  Input expects longitudes to be positive west.,http://www.geod.nrcan.gc.ca/products/html-public/GSDapps/English/NTv2_Fact_Sheet.html,EPSG,1997-11-13 00:00:00,,0
-9616,Vertical Offset,1,"Xt = [(Xs * Us) + (A * Ua)] * (m / Ut)
-
-where 
-Xt = value in the target vertical coordinate reference system.
-
-Xs = value in the source vertical coordinate reference system; 
-
-A is the value of the origin of the target system in the source system.
-
-m is unit direction multiplier (m=1 if both systems are height or both are depth; m = �1 if one system is height and the other system is depth; the value of m is implied through the vertical coordinate reference system type attribute).
-
-Us Ut and Ua are unit conversion ratios to metres for the source and target systems and the offset value A respectively.",,This transformation allows calculation of height (or depth) in the target system by adding the parameter value to the height (or depth)-value of the point in the source system.,EPSG guidance note #7.,EPSG,1999-11-12 00:00:00,99.79,0
-9617,Madrid to ED50,0,"The polynomial expressions are:
-
-      dLat seconds = A0 + (A1*lat) + (A2*lon) + (A3*H)
-      dLon seconds = B00 + B0 + (B1*lat) + (B2*lon) + (B3*H)
-
-where latitude lat and longitude lon are in decimal degrees referred to the Madrid 1870 (Madrid) geographic coordinate reference system and H is gravity-related height in metres.  B00 is the longitude (in seconds) of the Madrid meridian measured from the Greenwich meridian; it is the value to be applied to a longitude relative to the Madrid meridian to transform it to a longitude relative to the Greenwich meridan.
-
-The results of these expressions are applied through the formulae:
-Lat(ED50) = Lat(M1870(M))  + dLat
-and Lon(ED50) = Lon(M1870(M))  + dLon.","Input point coordinate system: Madrid 1870 (Madrid) (geographic 3D)
-   Latitude    =  42 deg 38 min 52.77 sec N 
-                    = 42.647992 degrees
-   Longitude  =    3 deg 39 min 34.57 sec E of Madrid
-                     = +3.659603 degrees from the Madrid meridian.
-   Height        =  0 m
-
-For the north zone transformation:
-A1 = 11.328779
-A2 = -0.1674
-A3 = -0.03852
-A4 = 0.0000379
-B0 = -13276.58
-B1 = 2.5079425
-B2 = 0.8352
-B3 = -0.00864
-B4 = -0.0000038
-
-dLat = +4.05 seconds
-
-Then ED50 latitude = 42 deg 38 min 52.77 sec N + 4.05sec
-                               = 42 deg 38 min 56.82 sec N
-
-
-dLon = -13270.54 seconds  = -3 deg 41 min 10.54 sec
-
-Then ED50 longitude = 3 deg 39 min 34.57 sec E - 3 deg 41 min 10.54 sec
-                                  = 0 deg 01 min 35.97 sec W of Greenwich.",,"EPSG guidance note #7, after Institut de Geomatica; Barcelona.",EPSG,2000-03-07 00:00:00,99.284  99.82  99.64,0
-9618,Geographical and Height Offsets,1,"Lat_T = Lat_S + latitude_offset 
-Lon_T = Lon_S + longitude_offset 
-EllipsoidHeight_T = GravityHeight_S + gravity-related_to_ellipsoid_height_offset.",,This transformation allows calculation of coordinates in the target system by adding the parameter value to the coordinate values of the point in the source system.,EPSG guidance note #7.,EPSG,1999-11-12 00:00:00,99.79,0
-9619,Geographical Offsets,1,"Lat_T = Lat_S + latitude_offset 
-Lon_T = Lon_S + longitude_offset.",,This transformation allows calculation of coordinates in the target system by adding the parameter value to the coordinate values of the point in the source system.,EPSG guidance note #7.,EPSG,1999-11-12 00:00:00,99.79,0
-9620,Norway Offshore Interpolation,0,See information source.,,,"Norwegian Mapping Authority note of 13-Feb-1991 ""Om Transformasjon mellom Geodetiske Datum i Norge"".",EPSG,1999-04-22 00:00:00,,0
-9621,Similarity transformation,0,"The similarity transformation in algebraic form is:
-
-XT = XT0  + XS. dS. cos q  + YS. dS . sin q
-YT = YT0  � XS. dS. sin q  + YS. dS . cos q
-
-where:
-XT0 , YT0    =   the coordinates of the origin point of the source coordinate reference system expressed in the target coordinate reference system;
-1+dS           =  the length of one unit in the source coordinate reference system expressed in units of the target coordinate reference system;
-q                  = the angle about which the axes of the source coordinate reference system need to be rotated to coincide with the axes of the target coordinate reference system, counter-clockwise being positive. Alternatively, the bearing of the source coordinate reference system Y-axis measured relative to target coordinate reference system north.
-
-The similarity transformation can also be described as a special case of the parametric affine transformation where coefficients A1 = B2  and  A2 =  - B1.
-
-Reversibility
-In contrast with the affine transformation, the similarity transformation parameters are reversible, but only on the condition that the scale difference between the two coordinate systems is small (order of several parts per million).  Then dS is the deviation from unity of the ratio of the units of measure of the two coordinate reference systems. In these cases the reverse transformation would require a scale correction of 1/(1+dS) * (1-dS).  This enables usage of the same scale and rot [...]
-Target coordinate system:	Campo Inchauspe / Argentina 2 (projected 2D system)
-
-Note that for the Astra Minas Grid the coordinate axes are:
-X  (positive axis oriented north)
-Y  (positive axis oriented west)
-and coordinates are quoted in that order.
-
-whereas for Campo Inchauspe / Argentina 2 the axes are:
-X (positive axis oriented north)
-Y (positive axis oriented east)
-and coordinates are quoted in that order.
-
-Thus the Astra Minas grid X and Y axes map to the Campo Inchauspe / Argentina 2 Y and X-axes respectively.  With respect to the symbols in the formulas,
-XS  = Astra Minas X
-YS  = Astra Minas Y
-XT  = Campo Inchauspe / Argentina 2 Y
-YT  = Campo Inchauspe / Argentina 2 X
-
-Parameters of the similarity transformation:
-XT0	=	2610200.48 metre
-YT0	=	4905282.73 metre
-*	= 271o 05� 30�  = 271.0916667 degrees
-k	= 0  whence (1+k)=1.0
-
-Forward calculation for Astra Minas point :  X (north) =10000 m, Y (west) =50000 m. 
-
-XS  = Astra Minas X = 10000
-YS  = Astra Minas Y = 50000
-
-Gauss-Kruger zone 2 Easting (Y) = XT = XT0  + XS. dS. cos q  + YS. dS . sin q
-					  = 2610200.48 + (50000 * 1.0 * cos(271.0916667deg)) 
-						+ (10000 * 1.0 * sin(271.0916667deg))
-					  = 2601154.90 m.
-
-Gauss-Kruger zone 2 Northing (X) =YT = YT0  � XS. dS. sin q  + YS. dS . cos q
-				    = 4905282.73 - (50000*1.0* sin(271.0916667deg))
-					+ (10000 * 1.0 * cos(271.0916667deg))
-						    = 4955464.17 m.",Defined for two-dimensional coordinate systems.,EPSG guidance note #7.,EPSG,2000-10-19 00:00:00,2000.83,0
-9622,Affine orthogonal geometric transformation,0,"XT = XT0   +   XS .  k . dSX . cos q   +   YS .  k .  dSY  . sin q
-YT = YT0   �   XS .  k .  dSX . sin q    +   YS .  k .  dSY  . cos q
-
-where:
-
-XT0 ,YT0  = the coordinates of the origin point of the source coordinate reference system, expressed in the target coordinate reference system;
-dSX , dSY  = the length of one unit of the source  axis, expressed in units of the target axis, for the X axes and the Y- axes respectively;
-k = point scale factor of the target coordinate reference system in a chosen reference point;
-q  = the angle through which the source coordinate reference system axes must be rotated to coincide with the target coordinate refderence system axes (counter-clockwise is positive). Alternatively, the bearing (clockwise positive) of the source coordinate reference system Y-axis measured relative to target coordinate reference system north.","Source coordinate system: imaginary 3D seismic acquisition bin grid.  The two axes are orthogonal, but the unit on the I-axis is 25 metres, whilst [...]
-The target projected coordinate system is WGS 84 / UTM Zone 31N and the origin of the bin grid (centre of bin 0,0) is defined at E = 456781.0, N = 5836723.0.  The projected coordinate system point scale factor at the bin grid origin is 0.99984.
-The map grid bearing of the I and J axes are 110* and 20* respectively.  Thus the angle through which both the positive I and J axes need to be rotated to coincide with the positive Easting axis and Northing axis respectively is +20 degrees.
-
-Hence: 
-XT0 ,	=    456 781.0 m
-YT0	= 5 836 723.0 m
-dSX 	= 25
-dSY	= 12.5
-k 	= 0.99984
-q	= +20 degrees
-
-Forward calculation for centre of bin with coordinates: I = 300, J = 247:
-
-XT = Easting   = XT0   +   XS . k . dSX . cos q   +   YS . k . dSY  . sin q    = 464 855.62 m.
-
-YT = Northing = YT0   �   XS . k . dSX . sin q    +   YS . k . dSY  . cos q  = 5 837 055.90 m
-
-Reverse calculation for this point:
-XS = [( XT  � XT0) . cos qY  �  (YT � YT0) . sin qY ] / [k . dSX  . cos (qX � qY)] = 230 bins
-
-YS = [(XT   � XT0) . sin qX   +  (YT � YT0) . cos qX ] / [k . dSY . cos (qX � qY)]  = 162 bins",,EPSG guidance note #7.,EPSG,2000-06-10 00:00:00,,0
-9623,Affine general geometric transformation,0,"The geometric representation of the general affine transformation:
-XT = XT0   +  XS . k . dSX  . cos qX   +  YS . k . dSY  . sin qY
-YT = YT0  �  XS . k . dSX   . sin qX   +  YS . k. dSY  . cos qY 
-where:
-
-XT0 ,YT0  = the coordinates of the origin point of the source coordinate reference system, expressed in the target coordinate reference system;
-dSX , dSY  = the length of one unit of the source axis, expressed in units of the target axis, for the first and second source and target axis pairs respectively;
-qX , qY   = the angles about which the source coordinate reference system axes XS and YS must be rotated to coincide with the target coordinate reference system axes XT and YT respectively (counter-clockwise being positive).
-k = point scale factor of the target coordinate reference system in a chosen reference point;
- 
-Comparing the algebraic representation with the parameters of the parameteric form (code 9624) it can be seen that the parametric and geometric forms of the affine transformation are related as follows:
-A0  =  XT0
-A1  = k . dSX . cos qX  
-A2  = k . dSY . sin qY
-B0  =  YT0
-B1  =   � k . dSX . sin qX
-B2  =   k . dSY . cos qY
-
-Reversibility
-The parameters for an affine transformation cannot be used for the reverse transformation.  However, the reverse transformation is another affine transformation using the same formulas but with different parameters.  The reverse parameter values can be calculated from from the formulae provided above and applying those to same algorithm.  Alternatively the reverse transformation can be described by a different formula, as shown below, using the same parameters as the forward transformation:
-
-XS = [( XT  � XT0) . cos qY  �  (YT � YT0) . sin qY ] / [k . dSX  . cos (qX � qY)]
-YS = [(XT   � XT0) . sin qX   +  (YT � YT0) . cos qX ] / [k . dSY . cos (qX � qY)]",,,EPSG guidance note #7.,EPSG,2000-06-10 00:00:00,,0
-9624,Affine general parametric transformation,0,"XT   =  A0  +  A1. XS  +  A2.YS
-YT   =  B0  +  B1. XS  +  B2.YS
-where
-XT , YT  are the coordinates of a point P in the target coordinate reference system;
-XS , YS   are the coordinates of P in the source coordinate reference system.
-
-Reversibility
-The parameter values for an affine transformation cannot be used for the reverse transformation.  However, the reverse transformation is another affine transformation using the same formulas but with different parameter values.  The reverse parameter values, indicated by a prime (�), can be calculated from those of the forward transformation as follows:
-
-D    = A1 . B2   �   A2 . B1
-A0� = (A2 . B0   �   B2 . A0) / D
-B0� = (B1 . A0   �   A1 . B0) / D
-A1� = +B2 / D
-A2� = � A2 / D
-B1� = � B1 / D
-B2� = +A1 / D",,,EPSG guidance note #7,EPSG,2000-06-10 00:00:00,,0
-9625,General polynomial (2nd-order),0,"The simplest of all polynomials is the general polynomial function. In order to avoid problems of numerical instability this type of polynomial should be used after reducing the input parameters, usually coordinate offsets U and V relative to a central evaluation point, to �manageable� numbers, between �10 and +10 at most.
-
-U = XS - XS0 in defined units (which may not be those of the coordinate reference system),
-V = YS - YS0
-
-Then (XT - XT0) = (XS - XS0) + dX
-         (YT - YT0) = (YS - YS0) + dY 
-or
-XT  = XS - XS0 + XT0 + dX
-YT  = YS - YS0 + YT0 + dY
-
-where
-XT , YT   are coordinates in the target coordinate reference system,
-XS , YS  are coordinates in the source coordinate reference system,
-XS0 , YS0 are coordinates of the evaluation point in the source coordinate reference system,
-XT0 , YT0  are coordinates of the evaluation point in the target coordinate reference system.
-
-and where
-dX = A0 + A1.U + A2.V + A3.U2 + A4.U.V + A5.V2
-dY = B0 + B1.U + B2.V +B3.U2 +B4.U.V +B5.V2",,,EPSG guidance note #7.,EPSG,2000-03-07 00:00:00,,0
-9626,General polynomial (3rd-order),0,"The simplest of all polynomials is the general polynomial function. In order to avoid problems of numerical instability this type of polynomial should be used after reducing the input parameters, usually coordinate offsets U and V relative to a central evaluation point, to �manageable� numbers, between �10 and +10 at most.
-
-U = XS - XS0 in defined units (which may not be those of the coordinate reference system),
-V = YS - YS0
-
-Then (XT - XT0) = (XS - XS0) + dX
-         (YT - YT0) = (YS - YS0) + dY 
-or
-XT  = XS - XS0 + XT0 + dX
-YT  = YS - YS0 + YT0 + dY
-
-where
-XT , YT   are coordinates in the target coordinate reference system,
-XS , YS  are coordinates in the source coordinate reference system,
-XS0 , YS0 are coordinates of the evaluation point in the source coordinate reference system,
-XT0 , YT0  are coordinates of the evaluation point in the target coordinate reference system.
-
-and where
-dX = A0 + A1.U + A2.V + A3.U2 + A4.U.V + A5.V2 + A6.U3 + A7.U2.V + A8.U.V2 + A9.V3
-dY = B0 + B1.U + B2.V +B3.U2 +B4.U.V +B5.V2 + B6.U3 +B7.U2.V +B8.U.V2 +B9.V3",,,EPSG guidance note #7.,EPSG,2000-03-07 00:00:00,,0
-9627,General polynomial (4th-order),0,"The simplest of all polynomials is the general polynomial function. In order to avoid problems of numerical instability this type of polynomial should be used after reducing the input parameters, usually coordinate offsets U and V relative to a central evaluation point, to �manageable� numbers, between �10 and +10 at most.
-
-U = XS - XS0 in defined units (which may not be those of the coordinate reference system),
-V = YS - YS0
-
-Then (XT - XT0) = (XS - XS0) + dX
-         (YT - YT0) = (YS - YS0) + dY 
-or
-XT  = XS - XS0 + XT0 + dX
-YT  = YS - YS0 + YT0 + dY
-
-where
-XT , YT   are coordinates in the target coordinate reference system,
-XS , YS  are coordinates in the source coordinate reference system,
-XS0 , YS0 are coordinates of the evaluation point in the source coordinate reference system,
-XT0 , YT0  are coordinates of the evaluation point in the target coordinate reference system.
-
-and where
-dX = A0 + A1.U + A2.V + A3.U2 + A4.U.V + A5.V2 + A6.U3 + A7.U2.V + A8.U.V2 + A9.V3 + A10.U4 + A11.U3.V + A12.U2.V2 + A13.U.V3 + A14.V4
-
-dY = B0 + B1.U + B2.V +B3.U2 +B4.U.V +B5.V2 + B6.U3 +B7.U2.V +B8.U.V2 +B9.V3 + B10.U4 + B11.U3.V + B12.U2.V2 + B13.U.V3 + B14.V4",,,EPSG guidance note #7.,EPSG,2000-03-07 00:00:00,,0
-9628,Reversible polynomial (2nd-order),1,See EPSG Guidance Note 7.,,Reversibility is subject to constraints.  See Guidance Note 7 for clarification.,EPSG guidance note #7.,EPSG,2000-03-07 00:00:00,99.64,0
-9629,Reversible polynomial (3rd-order),1,See EPSG Guidance Note 7.,,Reversibility is subject to constraints.  See Guidance Note 7 for clarification.,EPSG guidance note #7.,EPSG,2000-03-07 00:00:00,99.64,0
-9630,Reversible polynomial (4th-order),1,See EPSG Guidance Note 7.,"For geodetic transformation ED50 to ED87 (1)
-
-Offset unit:  degree
-Ordinate 1 of evaluation point X0  =   55� 00' 00.000""N  = +55 degrees
-Ordinate 2 of evaluation point Y0  =     0� 00' 00.000""E   =   +0 degrees
-
-Parameters:
-A0 = -5.56098E-06   A1 = -1.55391E-06   ...   A14 = -4.01383E-09
-B0 = +1.48944E-05   B2 = +2.68191E-05  ...   B14 = +7.62236E-09
-
-Forward calculation for: 
-ED50 Latitude     = Xs =52* 30�30""N   =     +52.508333333 degrees
-ED50 Longitude  = Ys =  2*E=      +2.0 degrees   
-
-U = XS - X0 =  * ED50 - X0  = 52.508333333 - 55.0 = -2.491666667 degrees
-V = YS - Y0 =  * ED50 - Y0   = 2.0 - 0.0 = 2.0 degrees
-
-dX = A0 + A1.U + ... + A14.V4
-      = -5.56098E-06 + (-1.55391E-06 * -2.491666667) + ... + (-4.01383E-09 * 2.0^4)
-      = -3.12958E-06 degrees
-
-dY = B0 + B1.U + ... + B14.V4
-      = +1.48944E-05 + (2.68191E-05 * -2.491666667) + ... + (7.62236E-09 * 2.0^4)
-      = +9.80126E-06 degrees
-
-Then  ED87 Latitude  =   XT = XS + dX
-                                  =  52.508333333 - 3.12958E-06   degrees
-                                  = 52* 30� 29.9887"" N
-
-ED87 Longitude  =   YT = YS + dY
-                           = 2* 00� 00.0353"" E
-
-
-Reverse calculation for transformation ED50 to ED87 (1).
-The transformation method for the ED50 to ED87 (1) transformation, 4th-order reversible polynomial, is reversible. The same formulas may be applied for the reverse calculation, but coefficients A0 through A14 and B0 through B14 are applied with reversal of their signs. Sign reversal is not applied to the coordinates of the evaluation point. Thus:
-Ordinate 1 of evaluation point X0  =   55� 00' 00.000""N  = +55 degrees
-Ordinate 2 of evaluation point Y0  =     0� 00' 00.000""E   =   +0 degrees
-A0  = +5.56098E-06   A1 = +1.55391E-06   ...   A14 = +4.01383E-09
-B0  = -1.48944E-05    B1 = -2.68191E-05    ...   B14 = -7.62236E-09
-
-Reverse calculation for: 
-ED87 Latitude     = XS = 52� 30�29.9887""N   =     +52.5083301944 degrees
-ED87 Longitude  = YS =   2� 00� 00.0353"" E   =     +2.0000098055 degrees   
-
-U = 52.5083301944 - 55.0 = -2.4916698056 degrees
-V = 2.0000098055 - 0.0 = 2.0000098055 degrees
-
-dX = A0 + A1.U + ... + A14.V4
-      = +5.56098E-06 + (1.55391E-06 * -2.491666667) + ... + (4.01383E-09 * 2.0000098055^4)
-      = +3.12957E-06 degrees
-
-dY = B0 + B1.U + ... + B14.V4
-      = -1.48944E-05 + (-2.68191E-05 * -2.491666667) + ... + (-7.62236E-09 * 2.0000098055^4)
-      = -9.80124E-06 degrees
-
-Then ED50 Latitude  =   XT = XS + dX
-                                 = 52.5083301944 + 3.12957E-06   degrees
-                                 = 52� 30� 30.000"" N
-
-ED50 Longitude  =   YT = YS + dY
-                           = 2� 00� 00.000"" E",Reversibility is subject to constraints.  See Guidance Note 7 for clarification.,EPSG guidance note #7.,EPSG,2000-03-07 00:00:00,99.64,0
-9631,Complex polynomial (3rd-order),0,"The relationship between two projected coordinate reference systems may be approximated more elegantly by a single polynomial regression formula written in terms of complex numbers. The advantage is that the dependence between the �A� and �B� coefficients (for U and V) is taken into account in the formula, resulting in fewer coefficients for the same order polynomial. A third-order polynomial in complex numbers is used in Belgium.  A fourth-order po [...]
-
-(dX + i. dY) = (A1 + i. A2).(U + i.V) + (A3 + i. A4).(U + i.V)^2 + (A5 + i. A6).(U + i.V)^3 
-
-where U = (XS - XS0).10-5
-and     V = (YS - YS0).10-5
-
-Then
-XT  = XS - XS0 + XT0 + dX
-YT  = YS - YS0 + YT0 + dY
-
-where
-XT , YT      are coordinates in the target coordinate reference system,
-XS , YS      are coordinates in the source coordinate reference system,
-XS0 , YS0   are coordinates of the evaluation point in the source coordinate reference system,
-XT0 , YT0   are coordinates of the evaluation point in the target coordinate reference system.
-
-Note that the zero order coefficients of the general polynomial, A0 and B0, have apparently disappeared.  In reality they are absorbed by the different coordinates of the source and of the target evaluation point, which in this case, are numerically very different because of the use of two different projected coordinate reference systems for source and target.
-
-The transformation parameter values (the coefficients) are not reversible.  For the reverse transformation a different set of parameter values are required, used within the same formulas as the forward direction","For transformation Belge Lambert 72 to ED50 / UTM zone 31N,
-
-Eo1 = 0
-No1 = 0
-Eo2 = 449681.702
-No2 = 5460505.326
-A1 = -71.3747
-A2 = 1858.8407
-A3 = -5.4504
-A4 = -16.9681
-A5 = 4.0783
-A6 = 0.2193
-
-For source coordinate system E1=200000  N1=100000, then
-E2 = 647737.377  N2 = 5564124.227.",Coordinate pairs treated as complex numbers.  This exploits the correlation between the polynomial coefficients and leads to a smaller number of coefficients than the regular 3rd-order polynomial.,EPSG guidance note #7.,EPSG,2000-03-07 00:00:00,,0
-9632,Complex polynomial (4th-order),0,"The relationship between two projected coordinate reference systems may be approximated more elegantly by a single polynomial regression formula written in terms of complex numbers. The advantage is that the dependence between the �A� and �B� coefficients (for U and V) is taken into account in the formula, resulting in fewer coefficients for the same order polynomial. A third-order polynomial in complex numbers is used in Belgium.  A fourth-order po [...]
-
-(dX + i. dY) = (A1 + i. A2).(U + i.V) + (A3 + i. A4).(U + i.V)^2 + (A5 + i. A6).(U + i.V)^3 + (A7 + i.A8).(U + i.V)^4
-
-where U = (XS - XS0).10-5
-and     V = (YS - YS0).10-5
-
-Then
-XT  = XS - XS0 + XT0 + dX
-YT  = YS - YS0 + YT0 + dY
-
-where
-XT , YT      are coordinates in the target coordinate reference system,
-XS , YS      are coordinates in the source coordinate reference system,
-XS0 , YS0   are coordinates of the evaluation point in the source coordinate reference system,
-XT0 , YT0   are coordinates of the evaluation point in the target coordinate reference system.
-
-Note that the zero order coefficients of the general polynomial, A0 and B0, have apparently disappeared.  In reality they are absorbed by the different coordinates of the source and of the target evaluation point, which in this case, are numerically very different because of the use of two different projected coordinate reference systems for source and target.
-
-The transformation parameter values (the coefficients) are not reversible.  For the reverse transformation a different set of parameter values are required, used within the same formulas as the forward direction.","For transformation RD / Netherlands New to ED50 / UTM zone 31N,
-
-Eo1 = 155000
-No1 = 463000
-Eo2 = 663395.607
-No2 = 5781194.380
-A1 = -51.681
-A2 = 3290.525
-A3 = 20.172
-A4 = 1.133
-A5 = 2.075
-A6 = 0.251
-A7 = 0.075
-A8 = -0.012
-
-For source coordinate system E1=200000  N1=500000, then
-E2 =707155.557  N2 = 5819663.128.",Coordinate pairs treated as complex numbers.  This exploits the correlation between the polynomial coefficients and leads to a smaller number of coefficients than the regular 4th-order polynomial.,EPSG guidance note #7.,EPSG,2000-03-07 00:00:00,,0
-9633,Ordnance Survey National Transformation,1,See information source.,See information source.,Geodetic transformation between ETRS89 (or WGS 84) and OSGB36 / National Grid.  Uses ETRS89 / National Grid as an intermediate coordinate system for bi-linear interpolation of gridded grid coordinate differences.,http://www.gps.gov.uk/gpssurveying.asp,EPSG,2000-10-19 00:00:00,,0
-9634,Maritime Provinces polynomial interpolation,0,"The transformation makes use of a residual file for each Canadian maritime province.  The process of residual interpolation accounts for local variations in the coordinate system and provides a transformation accuracy of +/- 5 cm.
-
-By using a second residual file, the transformation may be reversed.  Only one residual file is in use by the method during any given execution.",,This transformation is an executable module within the application NBGeocalc.  It is an adaptation of the ESTPM program developed by Geodetic Survey of Canada.,Survey of New Brunswick,EPSG,2000-10-19 00:00:00,,0
-9635,Geographic3D to Geographic2D+GravityRelatedHeight,1,"This is a complex, multi-step transformation, involving the application of a geoid height difference interpolated at a point in a ""geoid model"". The geoid model should be available as a regular grid of latitude and longitude with the height of the geoid above the ellipsoid at each grid node. Only the height is affected by this transformation; the geodetic latitude and longitude are not.
-
-The transformation involves the following sequence of steps:
-�  Selection of a subset of the geoid file covering the extent of the points to be transformed.
-�  If the geoid file is not based on the source or target CRS, it needs to be transformed first. This involves transformation of the chosen subset of the geoid file from its orignal Geographic 3D CRS to the Geographic 3D CRS that is the source or the target of this transformation.
-�  Calculation of the height of the geoid above the ellipsoid (""geoid undulation"") at the relevant point(s). This is achieved through a bi-linear interpolation of the geoid undulation, using the latitude and longitude to locate the point in the sub-grid.  This step results in the height of the geoid above the ellipsoid (N) of the Geographic 3D CRS, whether source or target.
-�  At each point, the application of the calculated geoid undulation to the height to be transformed.
-
-H=h-N for Geographic3D to Geographic2D+GravityRelatedHeight
-
-h=H+N for Geographic2D+GravityRelatedHeight to Geographic3D
-
-where h = the ellipsoidal height (height above the ellipsoid in a geographic 3D CRS)
-and H = the Gravity-Related Height component of the compound CRS.",,"Transformation from a Geographic 3D CRS to a Compound CRS consisting of a Geographic 2D CRS and a Vertical CRS, or vice versa. The Geographic 3D and the Geographic 2D CRS must be based on the same Geodetic Datum.",,EPSG,2001-06-05 00:00:00,,0
-9636,Molodenski-Badekas transformation,1,"To eliminate high correlation between the translations and rotations in the derivation of parameter values for the Helmert transformation methods (coordinate operation metghod codes 9606 and 9607), instead of the rotations being derived about the geocentric coordinate reference system origin they may be derived at a location within the points used in the determination. Three additional parameters, the coordinates of the rotation point, are then r [...]
-
-   (Xt)             (  1       +Rz    -Ry)      (Xs - Xp)      (Xp)       (dX)
-   (Yt)  =  M *  ( -Rz      1      +Rx)  *  (Ys - Yp)  +  (Yp)  +  (dY)
-   (Zt)              ( +Ry   -Rx       1 )      (Zs - Zp)      (Zp)       (dZ)
-
-and the parameters are defined as:
-
-(dX, dY, dZ)   : Translation vector, to be added to the point's position vector in the source coordinate system in order to transform from source coordinate reference system to target coordinate reference system; also: the coordinates of the origin of source coordinate reference system in the target frame.
-
-(Rx, Ry, Rz)   : Rotations to be applied to the coordinate reference frame.  The sign convention is such that a positive rotation of the frame about an axis is defined as a clockwise rotation of the coordinate reference frame when viewed from the origin of the Cartesian coordinate system in the positive direction of that axis, that is a positive rotation about the Z-axis only from source coordinate reference system to target coordinate reference system will result in a smaller longitude  [...]
-
-(Xp, Yp, Zp)   : Coordinates of the point about which the coordinate reference frame is rotated, given in the source Cartesian coordinate reference system. 
-
-M                  : The scale factor to be applied to the position vector in the source coordinate reference system  in order to obtain the correct scale of the target coordinate reference system. M = (1+dS*10^-6), where dS is the scale correction expressed in parts per million.
-
-Reversibility.
-The Molodensky-Badekas transformation in a strict mathematical sense is not reversible, i.e. in principle the same parameter values cannot be used to execute the reverse transformation. This is because the evaluation point coordinates are in the forward direction source coordinate reference system and the rotations have been derived about this point. They should not be applied about the point having the same coordinate values in the target coordinate reference system, as is required for  [...]
-9801,Lambert Conic Conformal (1SP),1,"To derive the projected Easting and Northing coordinates of a point with geographical coordinates (lat,lon) the formulas for the one standard parallel case are:
-
-E = FE + r sin(theta)
-N = FN + r0 - r cos(theta)
-where
-n = sin lat0
-r = a F t^n k0     for r0, and r
-m = cos(lat)/(1 - e^2 sin^2(lat))^0.5     for m0, lat0, and m2, lat2 where lat1 and lat2 are the latitudes of the standard parallels.
-t  = tan(pi/4 - lat/2)/[(1 - e sin(lat))/(1 + e sin(lat))]^(e/2)   for t0 and t using lat0 and lat respectively.
-F = m0/(n  t1^n)
-theta = n(lon - lon0)
-
-The reverse formulas to derive the latitude and longitude of a point from its Easting and Northing values are:
-
-lat = pi/2 - 2arctan{t'[(1 - esin(lat))/(1 + esin(lat))]^(e/2)}
-lon = theta'/n +lon0
-where
-theta' = arctan[(E - FE)/{r0 -(N - FN)}]
-r' = +/-[(E - FE)^2 + {r0 - (N - FN)}^2]^0.5
-t' = (r'/(a k0 F))^(1/n)
-and n, F, and rF are derived as for the forward calculation.","For Projected Coordinate System JAD69 / Jamaica National Grid
-
-Parameters:
-Ellipsoid:  Clarke 1866, a = 6378206.400 m., 1/f = 294.97870
-                                   then  e = 0.08227185 and e^2 = 0.00676866
-
-Latitude Natural Origin         18 deg 00 min 00 sec N  =  0.31415927 rad
-Longitude Natural Origin     77 deg 00 min 00 sec W = -1.34390352 rad
-Scale factor at origin            1.000000
-False Eastings  FE               250000.00 m
-False Northings FN              150000.00 m
-
-Forward calculation for: 
-Latitude:     17 deg 55 min 55.80 sec N  =  0.31297535 rad
-Longitude:  76 deg 56 min 37.26 sec W = -1.34292061 rad
-first gives
-m0    =  0.95136402        t0 =  0.72806411
-F       =  3.39591092        n  =  0.30901699
-r        =  19643955.26     r0  =  19636447.86
-theta =  0.00030374        t   =  0.728965259
-
-Then Easting E   =     255966.58 m
-         Northing N =      142493.51 m
-
-Reverse calculation for the same easting and northing first gives
-
-theta' =  0.000303736
-t'        =  0.728965259
-m0     =  0.95136402
-r'        =  19643955.26
-
-Then Latitude     = 17 deg 55 min 55.800 sec N
-         Longitude  = 76 deg 56 min 37.260 sec W",,EPSG guidance note #7.,EPSG,2001-06-05 00:00:00,2001.08,0
-9802,Lambert Conic Conformal (2SP),1,"To derive the projected Easting and Northing coordinates of a point with geographical coordinates (lat,lon) the formulas for the one standard parallel case are:
-
-E = EF + r sin(theta)
-N = NF + rF - r cos(theta)
-where
-m = cos(lat)/(1 - e^2 sin^2(lat))^0.5     for m1, lat1, and m2, lat2 where lat1 and lat2 are the latitudes of the standard parallels.
-t  = tan(pi/4 - lat/2)/[(1 - e sin(lat))/(1 + e sin(lat))]^(e/2)   for t1, t2, tF and t using lat1, lat2, latF and lat respectively.
-n = (loge(m1) - loge(m2))/(loge(t1) - loge(t2))
-F = m1/(n  t1^n)
-r =  a F t^n         for rF and r, where rF is the radius of the parallel of latitude of the false origin.
-theta = n(lon - lon0)
-
-The reverse formulas to derive the latitude and longitude of a point from its Easting and Northing values are:
-
-lat = pi/2 - 2arctan{t'[(1 - esin(lat))/(1 + esin(lat))]^(e/2)}
-lon = theta'/n +lon0
-where
-r' = +/-[(E - EF)^2 + {rF - (N - NF)}^2]^0.5 , taking the sign of n
-t' = (r'/(aF))^(1/n)
-theta' = arctan [(E- EF)/(rF - (N- NF))]
-and n, F, and rF are derived as for the forward calculation.","For Projected Coordinate System NAD27 / Texas South Central
-
-Parameters:
-Ellipsoid  Clarke 1866, a = 6378206.400 metres = 20925832.16 US survey feet
-                                   1/f = 294.97870
-then e = 0.08227185 and e^2 = 0.00676866
-
-First Standard Parallel          28o23'00""N  =   0.49538262 rad
-Second Standard Parallel    30o17'00""N  =   0.52854388 rad
-Latitude False Origin            27o50'00""N  =   0.48578331 rad
-Longitude False Origin         99o00'00""W = -1.72787596 rad
-Easting at false origin           2000000.00  US survey feet
-Northing at false origin          0.00  US survey feet
-
-Forward calculation for: 
-Latitude       28o30'00.00""N  =  0.49741884 rad
-Longitude    96o00'00.00""W = -1.67551608 rad
-
-first gives :
-m1    = 0.88046050      m2 = 0.86428642
-t        = 0.59686306      tF  = 0.60475101
-t1      = 0.59823957      t2 = 0.57602212
-n       = 0.48991263       F = 2.31154807
-r        = 37565039.86    rF = 37807441.20
-theta = 0.02565177
-
-Then Easting E =      2963503.91 US survey feet
-         Northing N =      254759.80 US survey feet
-
-Reverse calculation for same easting and northing first gives:
-theta' = 0.025651765     r' = 37565039.86
-t'        = 0.59686306
-
-Then Latitude     	= 28o30'00.000""N
-         Longitude   = 96o00'00.000""W",,EPSG guidance note #7.,EPSG,2001-06-05 00:00:00,99.281  2001.08,0
-9803,Lambert Conic Conformal (2SP Belgium),1,"For the Lambert Conic Conformal (2 SP Belgium), the formulas for the regular two standard parallel case (coordinate operation method code 9802) are used except for: 
-
-Easting, E = EF + r sin (theta - alpha)
-Northing, N = NF + rF - r cos (theta - alpha)
-
-and for the reverse formulas
-lon = ((theta' + alpha)/n) +lon0
-where alpha = 29.2985 seconds.","For Projected Coordinate System Belge 1972 / Belge Lambert 72
-
-Parameters:
-Ellipsoid  International 1924,  a = 6378388 metres
-                                              1/f = 297
-then e = 0.08199189 and e^2 = 0.006722670
-
-First Standard Parallel        49o50'00""N       =   0.86975574 rad
-Second Standard Parallel  51o10'00""N       =   0.89302680 rad
-Latitude False Origin          90o00'00""N       =   1.57079633 rad
-Longitude False Origin         4o21'24.983""E = 0.07604294 rad
-Easting at false origin EF        150000.01  metres
-Northing at false origin NF    5400088.44  metres
-
-Forward calculation for: 
-Latitude        50o40'46.461""N  =  0.88452540 rad
-Longitude       5o48'26.533""E   = 0.10135773 rad
-
-first gives :
-m1     = 0.64628304         m2 = 0.62834001
-t        = 0.59686306          tF  = 0.00000000
-t1      = 0.36750382           t2 = 0.35433583
-n       = 0.77164219            F = 1.81329763
-r        = 37565039.86         rF = 0.00
-alpha =	0.00014204     theta = 0.01953396
-
-Then Easting E  =      251763.20 metres
-         Northing N =      153034.13 metres
-
-Reverse calculation for same easting and northing first gives:
-theta' = 0.01939192      r' = 548041.03
-t' = 0.35913403
-Then Latitude   =    50o40'46.461""N
-         Longitude =     5o48'26.533""E",In 2000 this modification was replaced through use of the regular Lambert Conic Conformal (2SP) method [9802] with appropriately modified parameter values.,EPSG guidance note #7.,EPSG,1999-04-22 00:00:00,99.281,0
-9804,Mercator (1SP),1,"The formulas to derive projected Easting and Northing coordinates are:
-
-E = FE + a*k0(lon - lon0)              
-N = FN + a*k0* ln{tan(pi/4 + lat/2)[(1 - esin(lat))/(1 + esin(lat))]^e/2} where symbols are as listed above and logarithms are natural.
-
-The reverse formulas to derive latitude and longitude from E and N values are:
-
-lat = chi + (esq/2 + 5e^4/24 + e^6/12 + 13e^8/360) sin(2chi) 
-+ (7e^4/48 + 29e^6/240 + 811e^8/11520) sin(4chi)
-+ (7e^6/120 +  81e^8/1120) sin(6chi)  + (4279e^8/161280) sin(8chi)
-
-where chi = pi/2 - 2 arctan t
-t = B^((FN-N)/(a*k0)) 
-B = base of the natural logarithm, 2.7182818...
-and  for the 2 SP Case, k0 is calculated as for the forward transformation above.
-lon  =  ((E - FE)/(a*k0))  + lon0","For Projected Coordinate System Makassar / NEIEZ
-
-Parameters:
-Ellipsoid   Bessel 1841  a = 6377397.155 m   1/f = 299.15281
-then e = 0.08169683
-
-Latitude Natural Origin         00o00'00""N  = 0.0000000 rad
-Longitude Natural Origin    110o00'00""E  = 1.91986218 rad
-Scale factor ko                  0.997
-False Eastings FE              3900000.00 m
-False Northings FN              900000.00 m
-
-Forward calculation for: 
-Latitude            3o00'00.00""S   = -0.05235988 rad
-Longitude     120o00'00.00""E   =  2.09439510 rad
-gives
-Easting  E   =      5009726.58 m
-Northing N  =        569150.82 m
-
-Reverse calculation for same easting and northing first gives :
-t    = 1.0534121
-chi = -0.0520110
-
-Then Latitude     =   3o00'00.000""S
-         Longitude  = 120o00'00.000""E",,EPSG guidance note #7.,EPSG,2001-06-05 00:00:00,2001.08,0
-9805,Mercator (2SP),1,"The formulas to derive projected Easting and Northing coordinates are:
-
-For the two standard parallel case, k0 is first calculated from
-
-k0 = cos(latSP1)/(1 - e^2*sin^2(latSP1))^0.5 
- 
-where latSP1 is the absolute value of the first standard parallel (i.e. positive).  
-
-Then, for both one and two standard parallel cases, 
-
-E = FE + a*k0(lon - lon0)              
-N = FN + a*k0* ln{tan(pi/4 + lat/2)[(1 - esin(lat))(1 + esin(lat))]^e/2} where symbols are as listed above and logarithms are natural.
-
-The reverse formulas to derive latitude and longitude from E and N values are:
-
-lat = chi + (esq/2 + 5e^4/24 + e^6/12 + 13e^8/360) sin(2chi) 
-+ (7e^4/48 + 29e^6/240 + 811e^8/11520) sin(4chi)
-+ (7e^6/120 +  81e^8/1120) sin(6chi)  + (4279e^8/161280) sin(8chi)
-
-where chi = pi/2 - 2 arctan t
-t = B^((FN-N)/a*k0) 
-B = base of the natural logarithm, 2.7182818...
-and  for the 2 SP Case, k0 is calculated as for the forward transformation above.
-lon  =  ((E - FE)/a*k0)  + lon0","For Projected Coordinate System Pulkovo 1942 / Mercator Caspian Sea
-
-Parameters:
-Ellipsoid  Krassowski 1940   a = 6378245.00m   1/f = 298.300
-then e = 0.08181333 and e^2 = 0.00669342
-
-Latitude first SP                             42o00'00""N = 0.73303829 rad
-Longitude Natural Origin                51o00'00""E = 0.89011792 rad
-False Eastings FE                          0.00 m
-False Northings (at equator) FN     0.00 m
-  
-then natural origin at latitude of 0oN has scale factor k0=  0.74426089
-
-Forward calculation for: 
-Latitude        53o00'00.00""N = 0.9250245 rad
-Longitude     53o00'00.00""E  = 0.9250245 rad
-
-gives Easting E   =     165704.29 m 
-          Northing N =   5171848.07 m
-
-Reverse calculation for same easting and northing first gives :
-t = 0.33639129    chi = 0.92179596
-
-Then Latitude     =  53o00'00.000""N
-          Longitude  =  53o00'00.000""E",,EPSG guidance note #7.,EPSG,1996-09-18 00:00:00,,0
-9806,Cassini-Soldner,1,"The formulas to derive projected Easting and Northing coordinates are:
-
-Easting E = FE + nu[A - TA^3/6 -(8 - T + 8C)TA^5/120]
-
-Northing N = FN + M - M0 + nu*tan(lat)*[A^2/2 + (5 - T + 6C)A^4/24]
-
-where A = (lon - lon0)cos(lat)
-T = tan^2(lat)
-C = e2 cos2*/(1 - e2)        nu = a /(1 - esq*sin^2(lat))^0.5 
-and M, the distance along the meridian from equator to latitude lat, is given by
-M = a[1 - e^2/4 - 3e^4/64 - 5e^6/256 -....)*lat - (3e^2/8 + 3e^4/32 + 45e^6/1024 +....)sin(2*lat) + (15e^4/256 + 45e^6/1024 +.....)sin(4*lat) - (35e^6/3072 + ....)sin(6*lat) + .....]
-with lat in radians.
-
-M0 is the value of M calculated for the latitude of the chosen origin. This may not necessarily be chosen as the equator.
-
-To compute latitude and longitude from Easting and Northing the reverse formulas are:
-lat = lat1 - (nu1tan(lat1)/rho1)[D2/2 - (1 + 3*T1)D^4/24]
-lon =  lon0 + [D - T1*D^3/3 + (1 + 3*T1)T1*D^5/15]/cos(lat1)
-
-where lat1 is the latitude of the point on the central meridian which has the same Northing as the point whose coordinates are sought, and is found from:
-lat1 = mu1 + (3*e1/2 - 27*e1^3/32 +.....)sin(2*mu1) + (21*e1^2/16 - 55*e1^4/32 + ....)sin(4*mu1)+ (151*e1^3/96 +.....)sin(6*mu1) + (1097*e1^4/512 - ....)sin(8*mu1) + ......
-where
-e1 = [1- (1 - esq)^0.5]/[1 + (1 - esq)^0.5]
-mu1 = M1/[a(1 - esq/4 - 3e^4/64 - 5e^6/256 - ....)]
-M1 = M0 + (N - FN)
-T1 = tan^2(lat1)
-D = (E - FE)/nu1","For Projected Coordinate System Trinidad 1903 / Trinidad Grid 
-Parameters:
-Ellipsoid   Clarke 1858     a = 20926348 ft    = 31706587.88 links
-                                        b = 20855233 ft
-
-then 1/f = 294.97870 and e^2 = 0.00676866
-
-Latitude Natural Origin       10o26'30""N  =  0.182241463 rad
-Longitude Natural Origin    61o20'00""W = -1.07046861 rad
-False Eastings FE              430000.00 links
-False Northings FN            325000.00 links
-
-Forward calculation for: 
-Latitude       10o00'00.00"" N = 0.17453293 rad
-Longitude    62o00'00.00""W = -1.08210414 rad
-
-A = -0.01145876      C = 0.00662550
-T = 0.03109120      M = 5496860.24    nu = 31709831.92     M0 = 5739691.12
-
-Then Easting E    =  66644.94 links
-          Northing N =  82536.22 links
-
-Reverse calculation for same easting and northing first gives :
-e1    =   0.00170207       D  =     -0.01145875
-T1   = 0.03109544         M1 =      5497227.34
-nu1  = 31709832.34       mu1 =    0.17367306
-phi1 = 0.17454458         rho1 =    31501122.40
-
-
-Then Latitude     = 10o00'00.000""N
-         Longitude  =  62o00'00.000""W",,EPSG guidance note #7.,EPSG,1996-09-18 00:00:00,,0
-9807,Transverse Mercator,1,"The formulas to derive the projected Easting and Northing coordinates are in the form of a series as follows:
-
-Easting, E =  FE + k0*nu[A + (1 - T + C)A^3/6 + (5 - 18T + T^2 + 72C - 58e'sq)A^5/120]	
-
-Northing, N =  FN + k0{M - M0 + nu*tan(lat)[A^2/2 + (5 - T + 9C + 4C^2)A^4/24 + (61 - 58T + T^2 + 600C - 330e'sq)A^6/720]} 
-where T = tan^2(lat)                nu = a /(1 - esq*sin^2(lat))^0.5
-C = esq*cos^2(lat)/(1 - esq)
-A = (lon - lon0)cos(lat), with lon and lon0 in radians.
-M = a[(1 - esq/4 - 3e^4/64 - 5e^6/256 -....)lat - (3esq/8 + 3e^4/32 + 45e^6/1024+....)sin(2*lat) + (15e^4/256 + 45e^6/1024 +.....)sin(4*lat) - (35e^6/3072 + ....)sin(6*lat) + .....]
-with lat in radians and M0 for lat0, the latitude of the origin, derived in the same way.
-
-The reverse formulas to convert Easting and Northing projected coordinates to latitude and longitude are:
-
-lat = lat1 - (nu1*tan(lat1)/rho1)[D^2/2 - (5 + 3*T1 + 10*C1 - 4*C1^2 - 9*e'^2)D^4/24 + (61 + 90*T1 + 298*C1 + 45*T1^2 - 252*e'^2 - 3*C1^2)D^6/720]
-lon = lon0 + [D - (1 + 2*T1 + C1)D^3/6 + (5 - 2*C1 + 28*T1 - 3*C1^2 + 8*e'^2 + 24*T1^2)D^5/120] / cos(lat1)
-where lat1 may be found as for the Cassini projection from:
-
-lat1 = mu1 + ((3*e1)/2 - 27*e1^3/32 +.....)sin(2*lat1) + (21*e1^2/16 -55*e1^4/32 + ....)sin(4*lat1)+ (151*e1^3/96 +.....)sin(6*lat1) + (1097*e1^4/512 - ....)sin(8*lat1) + ......
-and where  nu1 = a /(1 - esq*sin^2(lat1))^0.5                                     rho1 = a(1 - esq)/(1 - esq*sin^2(lat1))^1.5
-e1 = [1- (1 - esq)^0.5]/[1 + (1 - esq)^0.5]
-mu1 = M1/[a(1 - esq/4 - 3e^4/64 - 5e^6/256 - ....)]
-M1 = M0 + (N - FN)/k0
-T1 = tan^2(lat1)
-C1 = e'^2*cos^2(lat1)
-D = (E - FE)/(nu1*k0), with nu1 = nu for lat1
-
-For areas south of the equator the value of latitude lat will be negative and the formulas above, to compute the E and N,  will automatically result in the correct values. Note that the false northings of the origin, if the equator, will need to be large to avoid negative northings and for the UTM projection is in fact 10,000,000m. Alternatively, as in the case of Argentina's Transverse Mercator (Gauss-Kruger) zones, the origin is at the south pole with a northings of zero. However each  [...]
-different zones having the same eastings, every point in the country, irrespective of its projection zone, will have a unique set of projected system coordinates. Strict application of the above formulas, with south latitudes negative, will result in the derivation of the correct Eastings and Northings. 
-
-Similarly, in applying the reverse formulas to determine a latitude south of the equator, a negative sign for lat results from a negative lat1 which in turn results from a negative M1.","For Projected Coordinate System OSGB 1936 / British National Grid
-
-Parameters:
-Ellipsoid  Airy 1830  a = 6377563.396 m  1/f = 299.32496
-then e'^2 = 0.00671534 and e^2 = 0.00667054
-
-Latitude Natural Origin         49o00'00""N   = 0.85521133 rad
-Longitude Natural Origin        2o00'00""W  = -0.03490659 rad
-Scale factor ko                     0.9996013                                                                                              False Eastings FE                 400000.00 m
-False Northings FN              -100000.00 m
-
-Forward calculation for: 
-Latitude       50o30'00.00""N  = 0.88139127 rad
-Longitude    00o30'00.00""E  = 0.00872665 rad
-A  = 0.02775415       C = 0.00271699
-T =  1.47160434       M = 5596050.46
-M0 = 5429228.60     nu  = 6390266.03
-
-Then Easting E =        577274.99 m
-          Northing N =       69740.50 m
-
-Reverse calculations for same easting and northing first gives :
-e1 =    0.00167322      mu1 = 0.87939562
-M1 = 5599036.80        nu1 = 6390275.88
-phi1  = 0.88185987      D = 0.02775243
-rho1 =6372980.21       C1 =  0.00271391
-T1 = 1.47441726
-
-Then Latitude       = 50o30'00.000""N
-         Longitude    = 00o30'00.000""E",,EPSG guidance note #7.,EPSG,1996-09-18 00:00:00,,0
-9808,Transverse Mercator (South Orientated),1,"For the mapping of southern Africa a south oriented Transverse Mercator projection is used. Here the coordinate axes are called Westings and Southings and increment to the West and South from the origin respectively.  The standard Transverse Mercator formulas (coordinate operation method code 9807) need to be modified to cope with this arrangement with
-
-Westing, W = FE - k0 nu[A + (1 - T + C)A^3/6 + (5 - 18*T + T^2 + 72*C - 58*e'^2)A^5/120]
-
-Southing, S = FN - k0{M - M0 + nu*tan(lat)*[A^2/2 + (5 - T + 9*C + 4*C^2)A^4/24 + (61 - 58*T + T^2 + 600*C - 330*e'^2)A^6/720]}
-
-In these formulas the terms FE and FN retain their definition, i.e. in the Transverse Mercator (South Orientated) method they increase the Westing and Southing value at the natural origin. In this method they are effectively false westing (FW) and false southing (FS) respectively.
-
-For the reverse formulas, those for the standard Transverse Mercator above apply, with the exception that:
-
-M1 = M0 - (S - FN)/k0
-and D = -(W - FE)/(nu1*k0), with nu1 = nu for lat1",,,EPSG guidance note #7.,EPSG,2002-07-31 00:00:00,2002.51,0
-9809,Oblique Stereographic,1,"Given the geodetic origin of the projection at the tangent point (lat0, lon0), the parameters defining the conformal sphere are:
-
-R= sqrt( rho0 * nu0)
-n=  sqrt{1+[(e2*cos^4(lat0))/(1-e2)}
-c=  [(n+sin(lat0)) (1-sin(chi0))]/[(n-sin(lat0)) (1+sin(chi0))]
-
-where:	sin(chi0) = (w1-1)/(w1+1)
-w1 = (S1.(S2)^e)^n
-S1 = (1+sin(lat0))/(1-sin(lat0))
-S2 = (1-e sin(lat0))/(1+e sin(lat0))
-
-The conformal latitude and longitude (chi0,lambda0) of the origin are then computed from :
-
-chi0 = asin[(w2-1)/(w2+1)]
-
-where S1 and S2 are as above and  w2 = c (S1(S2)^e)^n
- 
-lambda0  = lon0
-
-For any point with geodetic coordinates (lat, lon) the equivalent conformal latitude and longitude (chi, lambda) are computed from 
-lambda = n(lon-lambda0) + lambda0
-chi = asin[(w-1)/(w+1)]
-
-where w = c (Ss (Sb)^e)^n
-Sa = (1+sin(lat))/(1-sin(lat))
-Sb = (1-e.sin(lat))/(1+e.sin(lat))
- 
-Then B = [1+sin(chi) sin(chi0) + cos(chi) cos(chi0) cos(lambda-lambda0)]
-
-N = FN + 2 R k0 [sin(chi) cos(chi0) - cos(chi) sin(chi0) cos(lambda-lambda0)] / B
-
-E = FE + 2 R k0 cos(chi) sin(lambda-lambda0) / B
-
-
-The reverse formulae to compute the geodetic coordinates from the grid coordinates involves computing the conformal values, then the isometric latitude and finally the geodetic values.
-
-The parameters of the conformal sphere and conformal latitude and longitude at the origin are computed as above. Then for any point with Stereographic grid coordinates (E,N) :
-
-chi = chi0 + 2 atan[{(N-FN)-(E-FE) tan (j/2)} / (2 R k0)]
-
-lambda = j + 2 i + lambda0
-
-where g = 2 R k0 tan(pi/4 - chi0/2)
-h = 4 R k0 tan(chi0) + g
-i = atan[(E-FE) / {h+(N-FN)}]
-j = atan[(E-FE) / (g-(N-FN)] - i
-
-Geodetic longitude lon = (lambda-lambda0 ) / n +  lambda0
-
-Isometric latitude psi = 0.5 ln [(1+ sin(chi)) / { c (1-  sin(chi))}] / n
-
-First approximation lat1 = 2 atan(e^psi)  - pi/2  where e=base of natural logarithms.
-
-psii = isometric latitude at lati
-
-where psii= ln[{tan(lati/2 + pi/4}  {(1-e sin(lati))/(1+e sin(lati))}^(e/2)]
- 
-Then iterate lat(i+1) = lati - ( psii - psi ) cos(lati) (1 -e^2 sin^2(lati)) / (1 - e^2)
-
-until the change in lat is sufficiently small.
-
-For Oblique Stereographic projections centred on points in the southern hemisphere,  the signs of E, N, lon0, lon,  must be reversed to be used in the equations and lat will be negative anyway as a southerly latitude.
-
-An alternative approach is given by Snyder, where, instead of defining a single conformal sphere at the origin point, the conformal latitude at each point on the ellipsoid is computed.  The conformal longitude is then always equivalent to the geodetic longitude.  This approach is a valid alternative to the above, but gives slightly different results away from the origin point. It is therefore considered by EPSG to be a different coordinate operation method to that described above.","For  [...]
-
-Parameters:
-Ellipsoid   Bessel 1841    a = 6377397.155 m    1/f = 299.15281
-then e = 0.08169683
-
-Latitude Natural Origin      52o09'22.178""N  = 0.910296727 rad
-Longitude Natural Origin     5o23'15.500""E  =  0.094032038 rad
-Scale factor k0                 0.9999079
-False Eastings FE             155000.00 m
-False Northings FN           463000.00 m
-
-Forward calculation for: 
-
-Latitude    53oN = 0.925024504 rad
-Longitude   6oE = 0.104719755 rad
-
-first gives the conformal sphere constants:
-
-rho0 = 6374588.71    nu0 = 6390710.613
-R = 6382644.571    n = 1.000475857    c  = 1.007576465
-
-where S1 = 8.509582274  S2 = 0.878790173  w1 = 8.428769183
-sin chi0 = 0.787883237
-
-w   = 8.492629457   chi0 = 0.909684757      D0 = d0 
-
-for the point  chi  = 0.924394997    D = 0.104724841
-
-hence B = 1.999870665    N = 557057.739    E = 196105.283
-
-reverse calculation for the same Easting and Northing first gives:
-
-g = 4379954.188    h = 37197327.96   i = 0.001102255   j = 0.008488122
-
-then  D = 0.10472467  Longitude = 0.104719584 rad =  6 deg E
-
-chi  = 0.924394767    psi = 1.089495123
-phi1 = 0.921804948       psi1 = 1.084170164
-phi2 = 0.925031162       psi2 = 1.089506925
-phi3 = 0.925024504       psi3 = 1.089495505
-phi4 = 0.925024504
-
-Then Latitude      = 53o00'00.000""N
-          Longitude   =   6o00'00.000""E","This is not the same as the projection method of the same name in USGS Professional Paper no. 1395, ""Map Projections - A Working Manual"" by John P. Snyder.",EPSG guidance note #7.,EPSG,1999-11-15 00:00:00,99.811,0
-9810,Polar Stereographic,1,"For the forward transformation from latitude and longitude,
-
-E = FE + rho sin(lon - lon0)
-N = FN - rho cos(lon - lon0)
-where
-rho = 2 a ko t /{[((1+e)^(1+e)) ((1-e)^(1-e))]^0.5}
-t = tan (pi/4 - lat/2) / [(1-esin(lat) ) / (1 + e sin(lat))]^(e/2)
-
-For the reverse transformation,
-
-lat = chi+ (e^2/2 + 5e^4/24 + e^6/12 + 13e^8/360) sin(2 chi) 
-+ (7e^4/48 + 29e^6/240 + 811e^8/11520) sin(4 chi)
-+ (7e^6/120 +  81e^8/1120) sin(6 chi)  + (4279e^8/161280) sin(8 chi)
-
-lon = lon0+ arctan [(E-FE) / (FN-N)]
-
-where chi  = pi/2 - 2 arctan t
-t   =  rho [((1+e)^(1+e)) ((1-e)^(1-e))]^0.5} / 2 a ko
-rho = [(E-FE)^2  + (N - FN)^2]^0.5",,,"US Geological Survey Professional Paper 1395; ""Map Projections - A Working Manual"";  J. Snyder",EPSG,1996-09-18 00:00:00,,0
-9811,New Zealand Map Grid,1,b,,,New Zealand Department of Lands technical circular 1973/32,EPSG,1996-09-18 00:00:00,,0
-9812,Hotine Oblique Mercator,1,"The following constants for the projection may be calculated :
-
-B = (1 + esq * cos^4(latc) / (1 - esq ))^0.5
-A = a * B * kc *(1 - esq )^0.5 / ( 1 - esq * sin^2(latc))
-t0 = tan(pi/4 - latc/2) / ((1 - e*sin(latc)) / (1 + e*sin(latc)))^(e/2)
-D = B (1 - esq)^0.5  / (cos(latc) * ( 1 - esq*sin^2(latc))^0.5)
-if D < 1 to avoid problems with computation of F make D^2  = 1 
-F = D + (D^2 - 1)^0.5  * SIGN(latc)
-H = F* t0*B
-G = (F - 1/F) / 2
-gamma0 = asin(sin(alphac) / D)
-lon0 = lonc - (asin(G*tan(gamma0))) / B
-
-Then compute the (uc , vc) co-ordinates for the centre point (fc , lc).
-vc =0
-
-In general: uc = (A / B) atan((Dsq - 1)^0.5 / cos (alphac) ) * SIGN(latc)
-but for the special cases where alphac = 90 degrees then 
-uc = A*(lonc - lon0)  
-
- 
-Forward case: To compute (E,N) from a given (lat,lon) :
-
-t = tan(pi/4 - lat/2) / ((1 - e sin (lat)) / (1 + e sin (lat)))^(e/2)
-Q = H / t^B
-S = (Q - 1 / Q) / 2
-T = (Q + 1 / Q) / 2
-V = sin(B (lon - lon0))
-U = (- V cos(gamma0) + S sin(gamma0)) / T
-v = A ln((1 - U) / (1 + U)) / 2 B
-u = A atan((S cos(gamma0) + V sin(gamma0)) / cos(B (lon - lon0 ))) / B
-
-The rectified skew co-ordinates are then derived from:
-E = v cos(gammac) + u sin(gammac) + FE
-N = u cos(gammac) - v sin(gammac) + FN
-
-Reverse case: Compute (lat,lon)  from a given (E,N)  :
-
-v� = (E - FE) cos(gammac) - (N - FN) sin(gammac)
-u� = (N - FN) cos(gammac) + (E - FE) sin(gammac)
-
-Q� = e- (B v �/ A)  where e is the base of natural logarithms.
-S' = (Q� - 1 / Q�) / 2
-T� = (Q� + 1 / Q�) / 2
-V� = sin (B u� / A)
-U� = (V� cos(gammac) + S� sin(gammac)) / T�
-t� = (H / ((1 + U�) / (1 - U�))^0.5)^(1 / B)
-
-chi = pi / 2 - 2 atan(t�)
-
-lat = chi + sin(2chi).( e^2 / 2 + 5*e^4 / 24 + e^6 / 12 + 13*e^8 / 360) +  sin(4*chi).( 7*e^4 /48 + 29*e^6 / 240 + 811*e8 / 11520) +  sin(6chi).( 7*e^6 / 120 + 81*e8 / 1120) +  sin(8chi).(4279 e^8 / 161280)
-
-lon=  lon0  - atan ((S� cos(gammac) - V� sin(gammac)) / cos(B*u� / A)) / B","For Projected Coordinate System  Timbalai 1948 / R.S.O. Borneo (m)
-
-Parameters:
-Ellipsoid:  Everest 1830 (1967 Definition)
-a = 6377298.556 metres 1/f = 300.8017
-then e = 0.081472981and e2 = 0.006637847
-
-Latitude Projection Centre fc = 4o00'00""N = 0.069813170 rad
-Longitude Projection Centre lc = 115o00'00""E = 2.007128640 rad
-Azimuth of central line ac = 53o18'56.9537"" = 0.930536611 rad
-Rectified to skew gc= 53o07'48.3685"" = 0.927295218 rad
-Scale factor ko= 0.99984
-False Eastings FE = 0.00 m
-False Northings FN = 0.00 m
-
-Forward calculation for: 
-Latitude lat = 5o23'14.1129""N = 0.094025313 rad
-Longitude lon = 115o48'19.8196""E = 2.021187362 rad
-
-B = 1.003303209            F = 1.072121256
-A =6376278.686            H = 1.000002991
-to = 0.932946976          g0 = 0.927295218
-D = 1.002425787           lon0 = 1.914373469
-D2 =1.004857458
-uc =738096.09              vc =0.00
-
-t =0.910700729             Q =1.098398182
-S =0.093990763            T = 1.004407419
-V =0.106961709            U = 0.010967247
-v =-69702.787                u =901334.257
-
-Then Easting E =      679245.73 m
-        Northing N =     596562.78 m
-
-Reverse calculations for same easting and northing first gives :
-v� =   -69702.787              u� =901334.257
-Q� = 1.011028053
-S�  = 0.010967907          T� = 1.000060146
-V� = 0.141349378           U� = 0.093578324
-t� = 0.910700729             c = 0.093404829
-
-Then Latitude = 5o23'14.113""N
-         Longitude = 115o48'19.820""E",,EPSG guidance note #7.,EPSG,1999-11-15 00:00:00,97.62  99.811,0
-9813,Laborde Oblique Mercator,1,See information source.,See information source.,Can be accomodated by Oblique Mercator method (code 9815).,"""La nouvelle projection du Service Geographique de Madagascar""; J. Laborde; 1928",EPSG,1996-09-18 00:00:00,97.613,0
-9814,Swiss Oblique Cylindrical,1,See information source.,See information source.,Can be accomodated by Oblique Mercator method (code 9815).,"""Die projecktionen der Schweizerischen Plan und Kartenwerke""; J Bollinger; 1967",EPSG,1996-09-18 00:00:00,97.612,0
-9815,Oblique Mercator,1,"The following constants for the projection may be calculated :
-
-B = (1 + e^2 * cos^4(latc) / (1 - e^2 ))^0.5
-A = a * B * kc *(1 - e^2 )^0.5 / ( 1 - e^2 * sin^2(latc))
-t0 = tan(pi/4 - latc/2) / ((1 - e*sin(latc)) / (1 + e*sin(latc)))^(e/2)
-D = B (1 - e^2)^0.5  / (cos(latc) * ( 1 - e^2*sin^2(latc))^0.5)
-if D < 1 to avoid problems with computation of F make D^2  = 1 
-F = D + (D^2 - 1)^0.5  * SIGN(latc)
-H = F* t0*B
-G = (F - 1/F) / 2
-gamma0 = asin(sin(alphac) / D)
-lon0 = lonc - (asin(G*tan(gamma0))) / B
-vc =0
-In general: uc = (A / B) atan((Dsq - 1)^0.5 / cos (alphac) ) * SIGN(latc)
-but for the special cases where alphac = 90 degrees (e.g. Hungary, Switzerland) then 
-uc = A*(lonc - lon0)  
-
- 
-Forward case: To compute (E,N) from a given (lat,lon) :
-
-t = tan(pi/4 - lat/2) / ((1 - e sin (lat)) / (1 + e sin (lat)))^(e/2)
-Q = H / t^B
-S = (Q - 1 / Q) / 2
-T = (Q + 1 / Q) / 2
-V = sin(B (lon - lon0))
-U = (- V cos(gamma0) + S sin(gamma0)) / T
-v = A ln((1 - U) / (1 + U)) / 2 B
-u = (A atan((S cos(gamma0) + V sin(gamma0)) / cos(B (lon - lon0 ))) / B) - (uc . SIGN(lon - lonc))
-
-The rectified skew co-ordinates are then derived from:
-E = v cos(gammac) + u sin(gammac) + Ec
-N = u cos(gammac) - v sin(gammac) + Nc
-
-Reverse case: Compute (lat,lon)  from a given (E,N)  :
-
-v� = (E - Ec) cos(gammac) - (N - Nc) sin(gammac)
-u� = (N - Nc) cos(gammac) + (E - Ec) sin(gammac) + uc
-
-Q� = e- (B v �/ A)  where e is the base of natural logarithms.
-S' = (Q� - 1 / Q�) / 2
-T� = (Q� + 1 / Q�) / 2
-V� = sin (B u� / A)
-U� = (V� cos(gammac) + S� sin(gammac)) / T�
-t� = (H / ((1 + U�) / (1 - U�))^0.5)^(1 / B)
-
-chi = pi / 2 - 2 atan(t�)
-
-lat = chi + sin(2chi).( e^2 / 2 + 5*e^4 / 24 + e^6 / 12 + 13*e^8 / 360) +  sin(4*chi).( 7*e^4 /48 + 29*e^6 / 240 + 811*e8 / 11520) +  sin(6chi).( 7*e^6 / 120 + 81*e8 / 1120) +  sin(8chi).(4279 e^8 / 161280)
-
-lon=  lon0  - atan ((S� cos(gammac) - V� sin(gammac)) / cos(B*u� / A)) / B","For Projected Coordinate System  Timbalai 1948 / R.S.O. Borneo (m)
-
-Parameters:
-Ellipsoid:  Everest 1830 (1967 Definition)
-a = 6377298.556 metres 1/f = 300.8017
-then e = 0.081472981and e2 = 0.006637847
-
-Latitude Projection Centre fc = 4o00'00""N = 0.069813170 rad
-Longitude Projection Centre lc = 115o00'00""E = 2.007128640 rad
-Azimuth of central line ac = 53o18'56.9537"" = 0.930536611 rad
-Rectified to skew gc= 53o07'48.3685"" = 0.927295218 rad
-Scale factor ko= 0.99984
-Easting at projection centre Ec = 590476.87 m
-Northing at projection centre Nc = 442857.65 m
-
-Forward calculation for: 
-Latitude lat = 5o23'14.1129""N = 0.094025313 rad
-Longitude lon = 115o48'19.8196""E = 2.021187362 rad
-
-B = 1.003303209            F = 1.072121256
-A =6376278.686            H = 1.000002991
-to = 0.932946976          g0 = 0.927295218
-D = 1.002425787           lon0 = 1.914373469
-D2 =1.004857458
-uc =738096.09              vc =0.00
-
-t =0.910700729             Q =1.098398182
-S =0.093990763            T = 1.004407419
-V =0.106961709            U = 0.010967247
-v =-69702.787                u =163238.163
-
-Then Easting E =      679245.73 m
-        Northing N =     596562.78 m
-
-Reverse calculations for same easting and northing first gives :
-v� =   -69702.787              u� =901334.257
-Q� = 1.011028053
-S�  = 0.010967907          T� = 1.000060146
-V� = 0.141349378           U� = 0.093578324
-t� = 0.910700729             c = 0.093404829
-
-Then Latitude = 5o23'14.113""N
-         Longitude = 115o48'19.820""E",,EPSG guidance note #7.,EPSG,1999-11-15 00:00:00,99.811,0
-9816,Tunisia Mining Grid,1,"This grid is used as the basis for mineral leasing in Tunsia.  Lease areas are approximately 2 x 2 km or 400 hectares.  The corners of these blocks are defined through a six figure grid reference where the first three digits are an easting in kilometres and the last three digits are a northing.  The latitudes and longitudes for block corners at 2 km intervals are tabulated in a mining decree dated 1st January 1953.  From this tabulation in which geographical c [...]
-a)  the minimum easting is 94 km, on which the longitude is 5.68989 grads east of Paris.
-b)  the maximum easting is 490 km, on which the longitude is 10.51515 grads east of Paris.
-c)  each 2 km grid easting interval equals 0.02437 grads.
-d)  the minimum northing is 40 km, on which the latitude is 33.39 grads.
-e)  the maximum northing is 860 km, on which the latitude is 41.6039 grads.
-f)  between 40 km N and 360 km N, each 2 km grid northing interval equals 0.02004 grads.
-g)  between 360 km N and 860 km N, each 2 km grid northing interval equals 0.02003 grads.
-
-Formulae are:
-
-Grads from Paris
-
-Lat (grads) = 36.5964 + [(N - 360) * A] 
-where N is in kilometres and A = 0.010015 if N > 360, else A = 0.01002.
-
-LonParis (grads) = 7.83445 + [(E - 270) * 0.012185], where E is in kilometres.
-
-The reverse formulae are:
-
-E (km) = 270 + [(LonParis - 7.83445) / 0.012185] where LonParis is in grads.
-
-N (km) = 360 + [(Lat - 36.5964) / B] 
-where Lat is in grads and B = 0.010015  if  lat>36.5964, else B = 0.01002.
-
-Degrees from Greenwich.
-
-Modern practice in Tunisia is to quote latitude and longitude in degrees with longitudes referenced to the Greenwich meridian.  The formulae required in addition to the above are:
-
-Lat (degrees) =  (Latg * 0.9) where Latg is in grads.
-LonGreenwich (degrees) = [(LonParis + 2.5969213) * 0.9] where LonParis is in grads.
-
-
-Lat (grads) =  (Latd / 0.9) where Latd is in decimal degrees.
-LonParis (grads) = [(LonGreenwich / 0.9) - 2.5969213)] where LonGreenwich is in decimal degrees.","For grid location 302598,
-Latitude = 36.5964 + [(598 - 360) * A].  As N > 360, A = 0.010015.
-Latitude = 38.97997 grads = 35.08197 degrees.
-
-Longitude  = 7.83445 + [(E - 270) * 0.012185, where E = 302.
-Longitude  = 8.22437 grads east of Paris = 9.73916 degrees east of Greenwich.",,EPSG guidance note #7.,EPSG,2000-03-07 00:00:00,99.811  2000.08,0
-9817,Lambert Conic Near-Conformal,1,"To compute the Lambert Conic Near-Conformal the following formulae are used;
-
-E = FE + r sin(theta)
-N = FN + M + r sin(theta) tan(theta/2) using the natural origin rather than the false origin.
-
-Compute constants for the ellipse:
-
-n = (a-b)/(a+b)  
-A� = a [ 1- n + 5 (n^2 - n^3 ) / 4 + 81 ( n^4 - n^5 ) / 64]*pi /180 
-B� = 3 a [ n - n^2 + 7 ( n^3 - n^4 ) / 8 + 55 n^5 / 64] / 2
-C� = 15 a [ n^2 -n^3 + 3 ( n^4 - n^5 ) / 4 ] / 16
-D� = 35 a [ n^3 - n^4 + 11 n^5 / 16 ] / 48
-E� = 315 a [ n^4 - n^5 ] / 512
-
-Then compute the meridional arc from the equator to the parallel.
-s0 = A� lat0 - B� sin(2 lat0) + C� sin(4 lat0) - D� sin(6 lat0) + E� sin(8 lat0) where lat0 in the first term is in degrees
-s0 = A� lat - B� sin(2 lat) + C� sin(4 lat) - D� sin(6 lat) + E� sin(8 lat) where lat0 in the first term is in degrees
-m = s - s0
-A = 1 / (6 rho0 nu0) 
-M = ko ( m + A m^3.  This is the term that is truncated to the third order.
-Ms = M per second of arc = M / ((lat - lat0) * 3600)
-
-theta = (lon - lon0) sin(lat0)
-ro = ko nu0 / tan(lat0)
-r = ro - M
-
-The reverse formulas for lat and lon  from E and N with r0 and Ms as above:
-
-lat  = M�/ (Ms * 3600) + lat0   where lat0 and lat are in degrees
-lon  =  lon0 + theta� / sin(lat0)  where lont0 and lon are in radians
-
-where
-E� = E - FE              N� = N - FN
-theta� = arctan [E� / (r0 - N�)]
-r� = E� / sin(theta�) 
-M� = r0 - r'","For Projected Coordinate System: Deir ez Zor / Levant Zone
-
-Parameters:
-Ellipsoid  Clarke 1880 (IGN)  a = 6378249.2 m  1/f = 293.46602
-then b = 6356515.000    n = 0.001706682563
-
-Latitude Natural Origin  = 34o 39'00"" N = 0.604756586 rad
-Longitude Natural Origin = 37o 21'00"" E=  0.651880476 rad
-Scale factor at origin ko = 0.99962560
-False Eastings FE  = 300000.00 m
-False Northings FN  = 300000.00 m
-
-Forward calculation for: 
-Latitude of 37d 31' 17.625"" N = 0.654874806 rad
-Longitude of 34d 08' 11.291"" E = 0.595793792 rad
-first gives
-A = 4.1067494 * 10e-15      A�=111131.8633
-B�= 16300.64407     C�= 17.38751     D�= 0.02308      E�= 0.000033
-so = 3835482.233    s  = 4154101.458     m = 318619.225
-M = 318632.72         Ms = 30.82262319
-q = -0.03188875       ro = 9235264.405     r = 8916631.685
-
-Then Easting E =   15707.96 m (c.f. E =   15708.00 using full formulae)
-         Northing N =      623165.96 m (c.f. N = 623167.20 using full formulae)
-
-Reverse calculation for the same easting and northing first gives
-
-q' = -0.03188875
-r�  =  8916631.685
-M�= 318632.72 
-
-Latitude =      0.654874806 rad = 37d 31' 17.625"" N
-Longitude = 0.595793792 rad =  34d 08' 11.291"" E",The Lambert Near-Conformal projection is derived from the Lambert Conformal Conic projection by truncating the series expansion of the projection formulae.,EPSG guidance note #7.,EPSG,1999-11-15 00:00:00,99.811,0
-9818,American Polyconic,1,See information source.,,See information source for formula and example.,"US Geological Survey Professional Paper 1395; ""Map Projections - A Working Manual"";  J. Snyder",EPSG,1999-10-20 00:00:00,99.55,0
-9819,Krovak Oblique Conic Conformal,1,"From the defining parameters the following constants for the projection may be calculated :
-
-B=((1 + e^2 cos^4(latC)) / (1 - e^2 ))^0.5
-A=a (1 - e^2 )^0.5 / ( 1 - e^2 sin^2 (latC))
-gamma0=asin(sin (latC) / B)
-t0 =tan(pi / 4 + gamma0 / 2) . ((1 + e sin(latC)) / (1 - e sin (latC)))^(e.B/2) / tan(pi / 4 + latC/ 2)^B
-n = sin lat1
-r0=kc  A / tan (lat1)
-
-To derive the projected Southing and Westing coordinates of a point with geographical coordinates (lat, lon) the formulas for the oblique conic conformal are:
-
-Southing:    X  = Ec + r cos theta
-Westing:     Y = Nc + r sin theta
- 
-where
-
-U=2 (atan ( k tan^B (lat/2 + pi / 4 ) ((1 + e sin (lat)) / (1 - e sin (lat)))^(e.B/2 )) - pi / 4)
-V=B (lonc -  lon)
-S=asin ( cos (alphaC) sin ( U ) + sin (alphaC) cos (U) cos (V) )
-D=asin ( cos ( U ) sin ( V ) / cos ( S ) )
-theta=n D
-r=r0 tan(pi / 4 + gamma0/ 2) / tan^n ( S/2 + pi / 4 )
-
-The reverse formulas to derive the latitude and longitude of a point from its Southing and Westing values are:
-
-latj = 2*(atan(k^(-1/B) tan^(1/B) ( U�/2 + pi / 4 ) ((1 + e sin ( lat j-1) / (1 - e sin ( latj-1))^(e/2) ) - pi / 4) 
-where j = 1,2 and the latitude is found by iteration.
-lon = lonc - V' / B
-where
-r' =[(X - Ec)^2 + (Y - Nc)^2]^(1/2)  
-theta'=arctan [(X- Ec)/(Y- Nc)]
-D'=theta' / sin ( lat1)
-S'=2*(atan((r0 / r )^(1/n) tan(pi / 4 + lat0/ 2)) - pi / 4)
-U'=asin ( cos (alphaC) sin ( S' ) - sin (alphaC) cos (S') cos (D') )
-V'=asin ( cos (S') sin (D') / cos (U'))","For Projected Coordinate Reference System: S-JTSK (Ferro) / Krovak
-
-N.B. Krovak projection uses Ferro as the prime meridian. This has a longitude with reference to Greenwich of 17 deg 40 min West. To apply the formulae the defining longitudes must be corrected to the Greenwich meridian.
-
-Parameters:
-Ellipsoid  Bessel 1841   a = 6377397.155m  1/f = 299.15281
-    then    e = 0.081696831        e2 = 0.006674372
-
-Latitude of projection centre = 49o 30'00"" N =  0.604756586 rad
-Longitude of Origin = 42o 30'00"" East of Ferro
-Longitude of Ferro is 17o 40'00"" West of Greenwich
-Longitude of Origin = 24o 50'00"" East of Greenwich = 0.433423431   rad
-Latitude of pseudo standard parallel = 78o 30'00"" N
-Azimuth of centre line = 30o 17' 17.303""
-Scale factor on pseudo Standard Parallel (ko) = 0.99990
-Easting at projection centre (Ec) = 0.00 m
-Northing  at projection centre = 0.00 m
-
-Projection constants:
-B=1.000597498
-A=6380703.61
-*gamma0=0.863239103
-t0=1.003419164
-n= 0.979924705
-r0=1298039.005
-
-Forward calculation for: 
-Latitude = 50o 12' 32.4416"" N = 0.876312566 rad
-Longitude = 16o 50' 59.1790"" E = 0.294083999 rad
-
-Gives
-
-U=0.875596949
-V=0.139422687
-S=1.386275049
-D=0.506554623
-theta=0.496385389
-r0=1194731.014
-
-Then Southing X =  1050538.643 m
-         Westing  Y =    568990.997 m
-
-Reverse calculation for the same Southing and Westing gives
-
-r' =1194731.014
-theta' =0.496385389
-D'=0.506554623
-S'=1.386275049
-U'=0.875596949
-V'=0.139422687
-lat(iteration 1)=0.876310601 
-lat(iteration 2)=0.876312560
-lat(iteration3)=0.876312566
-
-Latitude = 0.876312566 rad = 50o 12' 32.4416"" N
-Longitude = 0.595793792 rad = 16o 50' 59.1790"" E",,Research Institute for Geodesy Topography and Cartography (VUGTK); Prague.,EPSG,2000-03-07 00:00:00,,0
-9820,Lambert Azimuthal Equal Area,1,See information source or EPSG Guidance Note 7.,See information source.,This is the ellipsoidal form of the projection.,"USGS Professional Paper 1395, ""Map Projections - A Working Manual"" by John P. Snyder.",EPSG,2001-06-05 00:00:00,,0
-9821,Lambert Azimuthal Equal Area (Spherical),1,See information source.,See information source.,This is the spherical form of the projection.  See coordinate operation method Lambert Azimuthal Equal Area (code 9820) for ellipsoidal form.  Differences of several tens of metres result from comparison of the two methods.,"USGS Professional Paper 1395, ""Map Projections - A Working Manual"" by John P. Snyder.",EPSG,2001-06-05 00:00:00,,0
-9822,Albers Equal Area,1,See information source or EPSG Guidance Note 7.,See Information Source.,,"USGS Professional Paper 1395, ""Map Projections - A Working Manual"" by John P. Snyder.",EPSG,2001-06-05 00:00:00,,0
-9823,Equidistant Cylindrical,1,"This method has one of the simplest formulas available. If the latitude of natural origin (*O) is at the equator the method is also known as Plate Carr�e. It is not used for rigorous topographic mapping because its distortion characteristics are unsuitable. Formulas are included to distinguish this map projection method from an approach sometimes mistakenly called by the same name and used for simple computer display of geographic coordinates � see Pseudo  [...]
-
-For the forward calculation:
-
-X =  R . (lon - lonO) . cos(latO)
-Y =  R .  lat
-
-where R = [a^2 * (1 �  e^2)]^0.5
-and lat and lon are expressed in radians.
-
-For the reverse calculation:
-
-lat = Y / R  
-lon = lonO + (X / R cos(latO))
-
-where R is as for the forward method.",See information source.,"If the latitude of natural origin is at the equator, also known as Plate Carr�e. See also Pseudo Plate Carree, method code 9825.","US Geological Survey Professional Paper 1395; ""Map Projections - A Working Manual"";  J. Snyder.",EPSG,2001-11-06 00:00:00,,0
-9824,Transverse Mercator Zoned Grid System,1,"The standard Transverse Mercator formulas (coordinate operation method 9807) are modified as follows:
-
-Zone number, Z, = int((Long + LongI + W) / W)  with Long,  LongI and W in degrees. 
-where (LongI) is the Initial Longitude of the zoned grid system
-and W is the width of each zone of the zoned grid system.
-If Long < 0, Long = (Long + 360) degrees.
-
-Then,
-   Long0  = [Z * W] � [LongI + (W/2)]
-
-For the forward calculation,
-   Easting, E =  Z*10^6 + FE + k0.nu[A + (1 - T + C)A^3/6 + (5 - 18T + T^2 + 72C - 58e'^2)A^5/120]
-   
-and in the reverse calculation for longitude, 
-   D = (E � [FE + Z*10^6])/(nu1.k0)",,If locations fall outwith the fixed zones the general Transverse Mercator method (code 9807) must be used for each zone.,EPSG Guidance Note #7.,EPSG,2001-06-05 00:00:00,,0
-9825,Pseudo Plate Carree,1,"X = Lon
-Y = Lat
-
-Lat = Y
-Lon = X",,"Used only for depiction of graticule (latitude/longitude) coordinates on a computer display. The axes units are decimal degrees and of variable scale. The origin is at Lat = 0, Long = 0. See Equidistant Cylindrical, code 9823, for proper Plate Carr�e.",EPSG,EPSG,2001-11-06 00:00:00,,0
-9826,Lambert Conic Conformal (West Orientated),1,"In older mapping of Denmark and Greenland the Lambert Conic Conformal is used with axes positive north and west. To derive the projected Westing and Northing coordinates of a point with geographical coordinates (Lat, Lon) the formulas are as for the standard Lambert Conic Conformal (1SP) case (coordinate operation method code 9801) except for:
-
-W =  FE � r.sin(theta)
-
-In this formula the term FE retains its definition, i.e. in the Lambert Conic Conformal (West Orientated) method it increases the Westing value at the natural origin. In this method it is effectively false westing (FW).
-
-The reverse formulas to derive the latitude and longitude of a point from its Westing and Northing values are as for the standard Lambert Conic Conformal (1SP) case except for:
-
-theta' = arctan[(FE � W)/{r0 � (N � FN)}]
-r' = +/-[(FE � W)^2 + {r0 � (N � FN)}^2]^0.5",,,EPSG guidance note #7.,EPSG,2002-01-16 00:00:00,,0
-9827,Bonne,1,See information source or EPSG Guidance Note 7.,See information source.,,"US Geological Survey Professional Paper 1395, ""Map Projections - A Working Manual"" by John P Snyder.",EPSG,2002-07-13 00:00:00,,0
-9828,Bonne (South Orientated),1,See EPSG Guidance Note 7.,,,EPSG Guidance Note number 7.,EPSG,2002-07-13 00:00:00,,0
diff --git a/src/tiff/csv/coordinate_operation_parameter.csv b/src/tiff/csv/coordinate_operation_parameter.csv
deleted file mode 100644
index 480aa35..0000000
--- a/src/tiff/csv/coordinate_operation_parameter.csv
+++ /dev/null
@@ -1,99 +0,0 @@
-"PARAMETER_CODE","PARAMETER_NAME","DESCRIPTION","INFORMATION_SOURCE","DATA_SOURCE","REVISION_DATE","CHANGE_ID","DEPRECATED"
-8601,Latitude offset,The difference between the latitude values of a point in the target and source coordinate reference systems.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8602,Longitude offset,The difference between the longitude values of a point in the target and source coordinate reference systems.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8603,Vertical Offset,The difference between the height or depth values of a point in the target and source coordinate reference systems.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8604,Geoid undulation,"The height of the geoid above a specified ellipsoid.  Indicated by symbol N.  Usually interpolated within a geoid model.
-N = h - H, where h is the height above the ellipsoid and H is the gravity-related height.",EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8605,X-axis translation,The difference between the X values of a point in the target and source coordinate reference systems.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8606,Y-axis translation,The difference between the Y values of a point in the target and source coordinate reference systems.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8607,Z-axis translation,The difference between the Z values of a point in the target and source coordinate reference systems.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8608,X-axis rotation,"The angular difference between the Y and Z axes directions of target and source coordinate reference systems. This is a rotation about the X axis as viewed from the origin looking along that axis. The particular method defines which direction is positive, and what is being rotated (point or axis).",EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8609,Y-axis rotation,"The angular difference between the X and Z axes directions of target and source coordinate reference systems. This is a rotation about theY axis as viewed from the origin looking along that axis. The particular method defines which direction is positive, and what is being rotated (point or axis).",EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8610,Z-axis rotation,"The angular difference between the X and Y axes directions of target and source coordinate reference systems. This is a rotation about the Z axis as viewed from the origin looking along that axis. The particular method defines which direction is positive, and what is being rotated (point or axis).",EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8611,Scale difference,"The scale difference increased by unity equals the ratio of an the length of an arbitrary distance between two points in target and source coordinate reference systems.  This is usually averaged for the intersection area of the two coordinate reference systems. 
-
-If a distance of 100 km in the source coordinate reference system translates into a distance of 100.001 km in the target coordinate reference system, the scale difference is 1 ppm (the ratio being 1.000001).",EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8612,Scale factor for source coordinate reference system first axis,"The unit of measure of the source coordinate reference system first axis, expressed in the unit of measure of the target coordinate reference system.",EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8613,Scale factor for source coordinate reference system second axis,"The unit of measure of the source coordinate reference system second axis, expressed in the unit of measure of the target coordinate reference system",EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8614,Rotation angle of source coordinate reference system axes,"Angle (counter-clockwise positive) through which both of the source coordinate reference system axes need to rotated to coincide with the corresponding target coordinate reference system axes.  
-
-Alternatively, the bearing (clockwise positive) of the source coordinate reference system YS-axis measured relative to target coordinate reference system north.",EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8615,Rotation angle of source coordinate reference system first axis,Angle (counter-clockwise positive) through which the source coordinate reference system's first axis needs to rotated to coincide with the corresponding axis of the target coordinate reference system.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8616,Rotation angle of source coordinate reference system second axis,Angle (counter-clockwise positive) through which the source coordinate reference system's second axis needs to rotated to coincide with the corresponding axis of the target coordinate reference system.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8617,Ordinate 1 of evaluation point,The value of the first ordinate value of the evaluation point.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8618,Ordinate 2 of evaluation point,The value of the second ordinate of the evaluation point.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8619,Ordinate 1 of evaluation point in source CRS,The value of the first ordinate of the evaluation point expressed in the source coordinate reference system.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8620,Ordinate 2 of evaluation point in source CRS,The value of the second ordinate of the evaluation point expressed in the source coordinate reference system.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8621,Ordinate 1 of evaluation point in target CRS,The value of the first ordinate of the evaluation point expressed in the target coordinate reference system.  In the case of an affine transformation the evaluation point is the origin of the source coordinate reference system.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8622,Ordinate 2 of evaluation point in target CRS,The value of the second ordinate of the evaluation point expressed in the target coordinate reference system.  In the case of an affine transformation the evaluation point is the origin of the source coordinate reference system.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8623,A0,Coefficient used in affine (general parametric) and polynomial transformations.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8624,A1,Coefficient used in affine (general parametric) and polynomial transformations.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8625,A2,Coefficient used in affine (general parametric) and polynomial transformations.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8626,A3,Coefficient used in polynomial transformations.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8627,A4,Coefficient used in polynomial transformations.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8628,A5,Coefficient used in polynomial transformations.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8629,A6,Coefficient used in polynomial transformations.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8630,A7,Coefficient used in polynomial transformations.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8631,A8,Coefficient used in polynomial transformations.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8632,A9,Coefficient used in polynomial transformations.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8633,A10,Coefficient used in polynomial transformations.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8634,A11,Coefficient used in polynomial transformations.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8635,A12,Coefficient used in polynomial transformations.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8636,A13,Coefficient used in polynomial transformations.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8637,A14,Coefficient used in polynomial transformations.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8638,B00,Coefficient used only in the Madrid to ED50 polynomial transformation method.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8639,B0,Coefficient used in affine (general parametric) and polynomial transformations.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8640,B1,Coefficient used in affine (general parametric) and polynomial transformations.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8641,B2,Coefficient used in affine (general parametric) and polynomial transformations.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8642,B3,Coefficient used in polynomial transformations.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8643,B4,Coefficient used in polynomial transformations.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8644,B5,Coefficient used in polynomial transformations.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8645,B6,Coefficient used in polynomial transformations.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8646,B7,Coefficient used in polynomial transformations.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8647,B8,Coefficient used in polynomial transformations.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8648,B9,Coefficient used in polynomial transformations.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8649,B10,Coefficient used in polynomial transformations.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8650,B11,Coefficient used in polynomial transformations.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8651,B12,Coefficient used in polynomial transformations.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8652,B13,Coefficient used in polynomial transformations.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8653,B14,Coefficient used in polynomial transformations.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8654,Semi-major axis length difference,The difference between the semi-major axis values of the ellipsoids used in the target and source coordinate reference systems.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8655,Flattening difference,"The difference between the flattening values of the ellipsoids used in the target and source coordinate reference systems. 
-
-flattening  = 1 / (inverse_flattening).",EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8656,Latitude and longitude difference file,The name of the [path and] file containing latitude and longitude differences.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8657,Latitude difference file,The name of the [path and] file containing latitude differences.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8658,Longitude difference file,The name of the [path and] file containing longitude differences.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8659,Geod. tfm. code for northern boundary,The EPSG code for the geodetic transformation applied at the northern boundary of the interpolation area.  Applies to Norwegian offshore interpolation method.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8660,Geod. tfm. code for southern boundary,The EPSG code for the geodetic transformation applied at the southern boundary of the interpolation area.  Applies to Norwegian offshore interpolation method.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8661,Geod. tfm. name for northern boundary,The EPSG name for the geodetic transformation applied at the northern boundary of the interpolation area.  Applies to Norwegian offshore interpolation method.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8662,Geod. tfm. name for southern boundary,The EPSG name for the geodetic transformation applied at the southern boundary of the interpolation area.  Applies to Norwegian offshore interpolation method.,EPSG guidance note number 7.,EPSG,2000-06-23 00:00:00,,0
-8663,Point scale factor,The point scale factor in a selected point of the target coordinate reference system. to be used as representative figure of the scale of the target coordinate reference system in a the area to which a coordinate transformation is defined.,EPSG guidance note number 7 (June 2000 Revision),EPSG,2000-06-29 00:00:00,,0
-8664,Easting and northing difference file,The name of the [path and] file containing easting and northing differences.,Ordnance Survey of Great Britain,EPSG,2000-10-19 00:00:00,,0
-8665,Maritime Province residual file,Coordinate differences at control points,Survey of New Brunswick,EPSG,2000-10-19 00:00:00,,0
-8666,Geoid model file,The name of the [path and] file containing geoid heights.,EPSG,EPSG,2001-06-05 00:00:00,,0
-8667,Ordinate 3 of evaluation point,The value of the third ordinate of the evaluation point.,EPSG guidance note number 7.,EPSG,2001-11-06 00:00:00,,0
-8801,Latitude of natural origin,"The latitude of the point from which the values of both the geographical coordinates on the ellipsoid and the grid coordinates on the projection are deemed to increment or decrement for computational purposes. Alternatively it may be considered as the latitude of the point which in the absence of application of false coordinates has grid coordinates of (0,0).",EPSG guidance note number 7.,EPSG,1999-09-09 00:00:00,,0
-8802,Longitude of natural origin,"The longitude of the point from which the values of both the geographical coordinates on the ellipsoid and the grid coordinates on the projection are deemed to increment or decrement for computational purposes. Alternatively it may be considered as the longitude of the point which in the absence of application of false coordinates has grid coordinates of (0,0).  Sometimes known as ""central meridian (CM)"".",EPSG guidance note number 7.,EPSG,2002-06-22 0 [...]
-8805,Scale factor at natural origin,"The factor by which the map grid is reduced or enlarged during the projection process, defined by its value at the natural origin.",EPSG guidance note number 7.,EPSG,1999-09-09 00:00:00,,0
-8806,False easting,"Since the natural origin may be at or near the centre of the projection and under normal coordinate circumstances would thus give rise to negative coordinates over parts of the mapped area, this origin is usually given false coordinates which are large enough to avoid this inconvenience. The False Easting, FE, is the value assigned to the abscissa (east or west) axis of the projection grid at the natural origin.",EPSG guidance note number 7.,EPSG,2002-07-31 00:00:00,2 [...]
-8807,False northing,"Since the natural origin may be at or near the centre of the projection and under normal coordinate circumstances would thus give rise to negative coordinates over parts of the mapped area, this origin is usually given false coordinates which are large enough to avoid this inconvenience. The False Northing, FN, is the value assigned to the ordinate (north or south) axis of the projection grid at the natural origin.",EPSG guidance note number 7.,EPSG,2002-07-31 00:00: [...]
-8811,Latitude of projection centre,"For an oblique projection, this is the latitude of the point at which the azimuth of the central line is defined.",EPSG guidance note number 7.,EPSG,1999-09-09 00:00:00,,0
-8812,Longitude of projection centre,"For an oblique projection, this is the longitude of the point at which the azimuth of the central line is defined.",EPSG guidance note number 7.,EPSG,1999-09-09 00:00:00,,0
-8813,Azimuth of initial line,"The azimuthal direction (north zero, east of north being positive) of the great circle which is the centre line of an oblique projection. The azimuth is given at the projection center.",EPSG guidance note number 7.,EPSG,1999-09-09 00:00:00,,0
-8814,Angle from Rectified to Skew Grid,The angle at the natural origin of an oblique projection through which the natural coordinate reference system is rotated to make the projection north axis parallel with true north.,EPSG guidance note number 7.,EPSG,1999-09-09 00:00:00,,0
-8815,Scale factor on initial line,"The factor by which the map grid is reduced or enlarged during the projection process, defined by its value at the projection center.",EPSG guidance note number 7.,EPSG,1999-09-09 00:00:00,,0
-8816,Easting at projection centre,The easting value assigned to the projection centre.,EPSG guidance note number 7.,EPSG,1999-09-09 00:00:00,,0
-8817,Northing at projection centre,The northing value assigned to the projection centre.,EPSG guidance note number 7.,EPSG,1999-09-09 00:00:00,,0
-8818,Latitude of pseudo standard parallel,"Latitude of the parallel on which the conic or cylindrical projection is based.  This latitude is not geographic, but is defined on the conformal sphere AFTER its rotation to obtain the oblique aspect of the projection",EPSG guidance note number 7,EPSG,2000-03-07 00:00:00,,0
-8819,Scale factor on pseudo standard parallel,"The factor by which the map grid is reduced or enlarged during the projection process, defined by its value at the pseudo-standard parallel.",EPSG guidance note number 7.,EPSG,2000-03-07 00:00:00,,0
-8821,Latitude of false origin,The latitude of the point which is not the natural origin and at which grid coordinate values false easting and false northing are defined.,EPSG guidance note number 7.,EPSG,1999-09-09 00:00:00,,0
-8822,Longitude of false origin,The longitude of the point which is not the natural origin and at which grid coordinate values false easting and false northing are defined.,EPSG guidance note number 7.,EPSG,1999-09-09 00:00:00,,0
-8823,Latitude of 1st standard parallel,"For a conic projection with two standard parallels, this is the latitude of intersection of the cone with the ellipsoid that is nearest the pole.  Scale is true along this parallel.",EPSG guidance note number 7.,EPSG,1999-09-09 00:00:00,,0
-8824,Latitude of 2nd standard parallel,"For a conic projection with two standard parallels, this is the latitude of intersection of the cone with the ellipsoid that is furthest from the pole.  Scale is true along this parallel.",EPSG guidance note number 7.,EPSG,1999-09-09 00:00:00,,0
-8826,Easting at false origin,The easting value assigned to the false origin.,EPSG guidance note number 7.,EPSG,1999-09-09 00:00:00,,0
-8827,Northing at false origin,The northing value assigned to the false origin.,EPSG guidance note number 7.,EPSG,1999-09-09 00:00:00,,0
-8828,Spherical latitude of origin,The latitude of the point from which the values of both the geographical coordinates on the sphere and the grid coordinates on a spherical projection are deemed to increment or decrement for computational purposes.,EPSG guidance note number 7.,EPSG,2001-06-05 00:00:00,,0
-8829,Spherical longitude of origin,The longitude of the point from which the values of both the geographical coordinates on the sphere and the grid coordinates on a spherical projection are deemed to increment or decrement for computational purposes.,EPSG guidance note number 7.,EPSG,2001-06-05 00:00:00,,0
-8830,Initial longitude,The longitude of the western limit of the first zone of a Transverse Mercator zoned grid system.,EPSG,EPSG,2001-06-05 00:00:00,,0
-8831,Zone width,The longitude width of a zone of a Transverse Mercator zoned grid system.,EPSG,EPSG,2001-06-05 00:00:00,,0
diff --git a/src/tiff/csv/coordinate_operation_parameter_value.csv b/src/tiff/csv/coordinate_operation_parameter_value.csv
deleted file mode 100644
index dc26765..0000000
--- a/src/tiff/csv/coordinate_operation_parameter_value.csv
+++ /dev/null
@@ -1,8406 +0,0 @@
-"COORD_OP_CODE","COORD_OP_METHOD_CODE","PARAMETER_CODE","PARAMETER_VALUE","PARAM_VALUE_FILE_REF","UOM_CODE"
-1025,9630,8617,55.0,,9102
-1025,9630,8618,0.0,,9102
-1025,9630,8623,-0.00000556098,,9203
-1025,9630,8624,-0.00000155391,,9203
-1025,9630,8625,-0.00000040262,,9203
-1025,9630,8626,-0.000000509693,,9203
-1025,9630,8627,-0.000000819775,,9203
-1025,9630,8628,-0.000000247592,,9203
-1025,9630,8629,0.000000136682,,9203
-1025,9630,8630,0.000000186198,,9203
-1025,9630,8631,0.00000012335,,9203
-1025,9630,8632,0.0000000568797,,9203
-1025,9630,8633,-0.00000000232217,,9203
-1025,9630,8634,-0.00000000769931,,9203
-1025,9630,8635,-0.00000000786953,,9203
-1025,9630,8636,-0.00000000612216,,9203
-1025,9630,8637,-0.00000000401382,,9203
-1025,9630,8639,0.0000148944,,9203
-1025,9630,8640,0.00000268191,,9203
-1025,9630,8641,0.0000024529,,9203
-1025,9630,8642,0.0000002944,,9203
-1025,9630,8643,0.0000015226,,9203
-1025,9630,8644,0.000000910592,,9203
-1025,9630,8645,-0.000000382241,,9203
-1025,9630,8646,-0.000000851732,,9203
-1025,9630,8647,-0.000000566713,,9203
-1025,9630,8648,-0.000000185188,,9203
-1025,9630,8649,0.0000000284312,,9203
-1025,9630,8650,0.0000000684853,,9203
-1025,9630,8651,0.0000000500828,,9203
-1025,9630,8652,0.0000000415937,,9203
-1025,9630,8653,0.00000000762236,,9203
-1026,9617,8623,8.4386918,,9203
-1026,9617,8624,-0.0972,,9203
-1026,9617,8625,-0.03672,,9203
-1026,9617,8626,0.0000406,,9203
-1026,9617,8638,-13276.58,,9203
-1026,9617,8639,2.6620443,,9203
-1026,9617,8640,0.07992,,9203
-1026,9617,8641,-0.0036,,9203
-1026,9617,8642,-0.0000109,,9203
-1027,9617,8623,11.328779,,9203
-1027,9617,8624,-0.1674,,9203
-1027,9617,8625,-0.03852,,9203
-1027,9617,8626,0.0000379,,9203
-1027,9617,8638,-13276.58,,9203
-1027,9617,8639,2.5079425,,9203
-1027,9617,8640,0.08352,,9203
-1027,9617,8641,-0.00864,,9203
-1027,9617,8642,-0.0000038,,9203
-1028,9617,8623,6.2280987,,9203
-1028,9617,8624,-0.03924,,9203
-1028,9617,8625,-0.03276,,9203
-1028,9617,8626,0.0000284,,9203
-1028,9617,8638,-13276.58,,9104
-1028,9617,8639,2.9368989,,9203
-1028,9617,8640,0.07272,,9203
-1028,9617,8641,0.00216,,9203
-1028,9617,8642,-0.0000179,,9203
-1029,9632,8619,155000.0,,9001
-1029,9632,8620,463000.0,,9001
-1029,9632,8621,663395.607,,9001
-1029,9632,8622,5781194.38,,9001
-1029,9632,8624,-51.681,,9203
-1029,9632,8625,3290.525,,9203
-1029,9632,8626,20.172,,9203
-1029,9632,8627,1.133,,9203
-1029,9632,8628,2.075,,9203
-1029,9632,8629,0.251,,9203
-1029,9632,8630,0.075,,9203
-1029,9632,8631,-0.012,,9203
-1030,9632,8619,663395.607,,9001
-1030,9632,8620,5781194.38,,9001
-1030,9632,8621,155000.0,,9001
-1030,9632,8622,463000.0,,9001
-1030,9632,8624,56.619,,9203
-1030,9632,8625,3290.362,,9203
-1030,9632,8626,20.184,,9203
-1030,9632,8627,-0.861,,9203
-1030,9632,8628,2.082,,9203
-1030,9632,8629,-0.023,,9203
-1030,9632,8630,0.07,,9203
-1030,9632,8631,-0.025,,9203
-1031,9632,8619,155000.0,,9001
-1031,9632,8620,463000.0,,9001
-1031,9632,8621,663395.563,,9001
-1031,9632,8622,5781194.442,,9001
-1031,9632,8624,-51.718,,9203
-1031,9632,8625,3290.521,,9203
-1031,9632,8626,20.154,,9203
-1031,9632,8627,1.152,,9203
-1031,9632,8628,2.061,,9203
-1031,9632,8629,0.238,,9203
-1031,9632,8630,0.058,,9203
-1031,9632,8631,-0.013,,9203
-1032,9632,8619,663395.563,,9001
-1032,9632,8620,5781194.442,,9001
-1032,9632,8621,155000.0,,9001
-1032,9632,8622,463000.0,,9001
-1032,9632,8624,99943.4175,,9203
-1032,9632,8625,-3290.3612,,9203
-1032,9632,8626,-20.1673,,9203
-1032,9632,8627,0.8387,,9203
-1032,9632,8628,-2.0651,,9203
-1032,9632,8629,0.0334,,9203
-1032,9632,8630,-0.0523,,9203
-1032,9632,8631,0.23,,9203
-1033,9631,8619,0.0,,9001
-1033,9631,8620,0.0,,9001
-1033,9631,8621,449681.702,,9001
-1033,9631,8622,5460505.326,,9001
-1033,9631,8624,-71.3747,,9203
-1033,9631,8625,1858.8407,,9203
-1033,9631,8626,-5.4504,,9203
-1033,9631,8627,-16.9681,,9203
-1033,9631,8628,4.0783,,9203
-1033,9631,8629,0.2193,,9203
-1034,9631,8619,500000.0,,9001
-1034,9631,8620,5500000.0,,9001
-1034,9631,8621,448933.793,,9001
-1034,9631,8622,5461423.984,,9001
-1034,9631,8624,28.7827,,9203
-1034,9631,8625,-1843.8236,,9203
-1034,9631,8626,0.0864,,9203
-1034,9631,8627,11.9065,,9203
-1034,9631,8628,-4.0793,,9203
-1034,9631,8629,0.0809,,9203
-1035,9621,8611,0.0,,9202
-1035,9621,8614,271.053,,9110
-1035,9621,8621,2610200.48,,9001
-1035,9621,8622,4905282.73,,9001
-1036,9633,8664,,ostn97.txt,
-1037,9632,8619,155000.0,,9001
-1037,9632,8620,463000.0,,9001
-1037,9632,8621,526577.124,,9001
-1037,9632,8622,5778575.474,,9001
-1037,9632,8624,99969.1014,,9203
-1037,9632,8625,533.6385,,9203
-1037,9632,8626,3.3943,,9203
-1037,9632,8627,-0.1391,,9203
-1037,9632,8628,2.0658,,9203
-1037,9632,8629,0.0677,,9203
-1037,9632,8630,0.0561,,9203
-1037,9632,8631,-0.0148,,9203
-1038,9632,8619,526577.124,,9001
-1038,9632,8620,5778575.474,,9001
-1038,9632,8621,155000.0,,9001
-1038,9632,8622,463000.0,,9001
-1038,9632,8624,100028.0577,,9203
-1038,9632,8625,-533.9532,,9203
-1038,9632,8626,-3.3943,,9203
-1038,9632,8627,0.1935,,9203
-1038,9632,8628,-2.0687,,9203
-1038,9632,8629,-0.0235,,9203
-1038,9632,8630,-0.0554,,9203
-1038,9632,8631,0.0167,,9203
-1100,9603,8605,-166.0,,9001
-1100,9603,8606,-15.0,,9001
-1100,9603,8607,204.0,,9001
-1101,9603,8605,-118.0,,9001
-1101,9603,8606,-14.0,,9001
-1101,9603,8607,218.0,,9001
-1102,9603,8605,-134.0,,9001
-1102,9603,8606,-2.0,,9001
-1102,9603,8607,210.0,,9001
-1103,9603,8605,-165.0,,9001
-1103,9603,8606,-11.0,,9001
-1103,9603,8607,206.0,,9001
-1104,9603,8605,-123.0,,9001
-1104,9603,8606,-20.0,,9001
-1104,9603,8607,220.0,,9001
-1105,9603,8605,-128.0,,9001
-1105,9603,8606,-18.0,,9001
-1105,9603,8607,224.0,,9001
-1106,9603,8605,-161.0,,9001
-1106,9603,8606,-14.0,,9001
-1106,9603,8607,205.0,,9001
-1107,9603,8605,-43.0,,9001
-1107,9603,8606,-163.0,,9001
-1107,9603,8607,45.0,,9001
-1108,9603,8605,-133.0,,9001
-1108,9603,8606,-48.0,,9001
-1108,9603,8607,148.0,,9001
-1109,9603,8605,-134.0,,9001
-1109,9603,8606,-48.0,,9001
-1109,9603,8607,149.0,,9001
-1110,9603,8605,-150.0,,9001
-1110,9603,8606,-250.0,,9001
-1110,9603,8607,-1.0,,9001
-1111,9603,8605,-143.0,,9001
-1111,9603,8606,-236.0,,9001
-1111,9603,8607,7.0,,9001
-1112,9606,8605,593.16,,9001
-1112,9606,8606,26.15,,9001
-1112,9606,8607,478.54,,9001
-1112,9606,8608,-6.3239,,9109
-1112,9606,8609,-0.5008,,9109
-1112,9606,8610,-5.5487,,9109
-1112,9606,8611,4.0775,,9202
-1113,9603,8605,-143.0,,9001
-1113,9603,8606,-90.0,,9001
-1113,9603,8607,-294.0,,9001
-1114,9603,8605,-138.0,,9001
-1114,9603,8606,-105.0,,9001
-1114,9603,8607,-289.0,,9001
-1115,9603,8605,-153.0,,9001
-1115,9603,8606,-5.0,,9001
-1115,9603,8607,-292.0,,9001
-1116,9603,8605,-125.0,,9001
-1116,9603,8606,-108.0,,9001
-1116,9603,8607,-295.0,,9001
-1117,9603,8605,-161.0,,9001
-1117,9603,8606,-73.0,,9001
-1117,9603,8607,-317.0,,9001
-1118,9603,8605,-134.0,,9001
-1118,9603,8606,-105.0,,9001
-1118,9603,8607,-295.0,,9001
-1119,9603,8605,-169.0,,9001
-1119,9603,8606,-19.0,,9001
-1119,9603,8607,-278.0,,9001
-1120,9603,8605,-147.0,,9001
-1120,9603,8606,-74.0,,9001
-1120,9603,8607,-283.0,,9001
-1121,9603,8605,-142.0,,9001
-1121,9603,8606,-96.0,,9001
-1121,9603,8607,-293.0,,9001
-1122,9603,8605,-160.0,,9001
-1122,9603,8606,-6.0,,9001
-1122,9603,8607,-302.0,,9001
-1123,9603,8605,-377.0,,9001
-1123,9603,8606,681.0,,9001
-1123,9603,8607,-50.0,,9001
-1124,9603,8605,-73.0,,9001
-1124,9603,8606,213.0,,9001
-1124,9603,8607,296.0,,9001
-1125,9603,8605,307.0,,9001
-1125,9603,8606,304.0,,9001
-1125,9603,8607,-318.0,,9001
-1126,9603,8605,-384.0,,9001
-1126,9603,8606,664.0,,9001
-1126,9603,8607,-48.0,,9001
-1127,9603,8605,-148.0,,9001
-1127,9603,8606,136.0,,9001
-1127,9603,8607,90.0,,9001
-1128,9603,8605,-136.0,,9001
-1128,9603,8606,-108.0,,9001
-1128,9603,8607,-292.0,,9001
-1129,9603,8605,-134.73,,9001
-1129,9603,8606,-110.92,,9001
-1129,9603,8607,-292.66,,9001
-1130,9603,8605,-263.0,,9001
-1130,9603,8606,6.0,,9001
-1130,9603,8607,431.0,,9001
-1131,9603,8605,-134.0,,9001
-1131,9603,8606,229.0,,9001
-1131,9603,8607,-29.0,,9001
-1132,9603,8605,-206.0,,9001
-1132,9603,8606,172.0,,9001
-1132,9603,8607,-6.0,,9001
-1133,9603,8605,-87.0,,9001
-1133,9603,8606,-98.0,,9001
-1133,9603,8607,-121.0,,9001
-1134,9603,8605,-87.0,,9001
-1134,9603,8606,-96.0,,9001
-1134,9603,8607,-120.0,,9001
-1135,9603,8605,-103.0,,9001
-1135,9603,8606,-106.0,,9001
-1135,9603,8607,-141.0,,9001
-1136,9603,8605,-104.0,,9001
-1136,9603,8606,-101.0,,9001
-1136,9603,8607,-140.0,,9001
-1137,9603,8605,-130.0,,9001
-1137,9603,8606,-117.0,,9001
-1137,9603,8607,-151.0,,9001
-1138,9603,8605,-86.0,,9001
-1138,9603,8606,-96.0,,9001
-1138,9603,8607,-120.0,,9001
-1139,9603,8605,-87.0,,9001
-1139,9603,8606,-95.0,,9001
-1139,9603,8607,-120.0,,9001
-1140,9603,8605,-84.0,,9001
-1140,9603,8606,-95.0,,9001
-1140,9603,8607,-130.0,,9001
-1141,9603,8605,-117.0,,9001
-1141,9603,8606,-132.0,,9001
-1141,9603,8607,-164.0,,9001
-1142,9603,8605,-97.0,,9001
-1142,9603,8606,-103.0,,9001
-1142,9603,8607,-120.0,,9001
-1143,9603,8605,-97.0,,9001
-1143,9603,8606,-88.0,,9001
-1143,9603,8607,-135.0,,9001
-1144,9603,8605,-107.0,,9001
-1144,9603,8606,-88.0,,9001
-1144,9603,8607,-149.0,,9001
-1145,9603,8605,-84.0,,9001
-1145,9603,8606,-107.0,,9001
-1145,9603,8607,-120.0,,9001
-1146,9606,8605,-82.981,,9001
-1146,9606,8606,-99.719,,9001
-1146,9606,8607,-110.709,,9001
-1146,9606,8608,-0.5076,,9109
-1146,9606,8609,0.1503,,9109
-1146,9606,8610,0.3898,,9109
-1146,9606,8611,-0.3143,,9202
-1147,9606,8605,-1.51,,9001
-1147,9606,8606,-0.84,,9001
-1147,9606,8607,-3.5,,9001
-1147,9606,8608,-1.893,,9109
-1147,9606,8609,-0.687,,9109
-1147,9606,8610,-2.764,,9109
-1147,9606,8611,0.609,,9202
-1148,9603,8605,-130.0,,9001
-1148,9603,8606,110.0,,9001
-1148,9603,8607,-13.0,,9001
-1149,9603,8605,0.0,,9001
-1149,9603,8606,0.0,,9001
-1149,9603,8607,0.0,,9001
-1150,9603,8605,0.0,,9001
-1150,9603,8606,0.0,,9001
-1150,9603,8607,0.0,,9001
-1151,9603,8605,84.0,,9001
-1151,9603,8606,-22.0,,9001
-1151,9603,8607,209.0,,9001
-1152,9603,8605,-637.0,,9001
-1152,9603,8606,-549.0,,9001
-1152,9603,8607,-203.0,,9001
-1153,9603,8605,217.0,,9001
-1153,9603,8606,823.0,,9001
-1153,9603,8607,299.0,,9001
-1154,9603,8605,209.0,,9001
-1154,9603,8606,818.0,,9001
-1154,9603,8607,290.0,,9001
-1155,9603,8605,282.0,,9001
-1155,9603,8606,726.0,,9001
-1155,9603,8607,254.0,,9001
-1156,9603,8605,295.0,,9001
-1156,9603,8606,736.0,,9001
-1156,9603,8607,257.0,,9001
-1157,9603,8605,-97.0,,9001
-1157,9603,8606,787.0,,9001
-1157,9603,8607,86.0,,9001
-1158,9603,8605,-11.0,,9001
-1158,9603,8606,851.0,,9001
-1158,9603,8607,5.0,,9001
-1159,9603,8605,-130.0,,9001
-1159,9603,8606,29.0,,9001
-1159,9603,8607,364.0,,9001
-1160,9603,8605,-90.0,,9001
-1160,9603,8606,40.0,,9001
-1160,9603,8607,88.0,,9001
-1161,9603,8605,-133.0,,9001
-1161,9603,8606,-77.0,,9001
-1161,9603,8607,-51.0,,9001
-1162,9603,8605,-133.0,,9001
-1162,9603,8606,-79.0,,9001
-1162,9603,8607,-72.0,,9001
-1163,9603,8605,-74.0,,9001
-1163,9603,8606,-130.0,,9001
-1163,9603,8607,42.0,,9001
-1164,9603,8605,41.0,,9001
-1164,9603,8606,-220.0,,9001
-1164,9603,8607,-134.0,,9001
-1165,9603,8605,639.0,,9001
-1165,9603,8606,405.0,,9001
-1165,9603,8607,60.0,,9001
-1166,9603,8605,31.0,,9001
-1166,9603,8606,146.0,,9001
-1166,9603,8607,47.0,,9001
-1167,9603,8605,-81.0,,9001
-1167,9603,8606,-84.0,,9001
-1167,9603,8607,115.0,,9001
-1168,9603,8605,-92.0,,9001
-1168,9603,8606,-93.0,,9001
-1168,9603,8607,122.0,,9001
-1169,9603,8605,-225.0,,9001
-1169,9603,8606,-65.0,,9001
-1169,9603,8607,9.0,,9001
-1170,9603,8605,-3.0,,9001
-1170,9603,8606,142.0,,9001
-1170,9603,8607,183.0,,9001
-1171,9603,8605,0.0,,9001
-1171,9603,8606,125.0,,9001
-1171,9603,8607,194.0,,9001
-1172,9603,8605,-10.0,,9001
-1172,9603,8606,158.0,,9001
-1172,9603,8607,187.0,,9001
-1173,9603,8605,-8.0,,9001
-1173,9603,8606,160.0,,9001
-1173,9603,8607,176.0,,9001
-1174,9603,8605,-9.0,,9001
-1174,9603,8606,161.0,,9001
-1174,9603,8607,179.0,,9001
-1175,9603,8605,-8.0,,9001
-1175,9603,8606,159.0,,9001
-1175,9603,8607,175.0,,9001
-1176,9603,8605,-5.0,,9001
-1176,9603,8606,135.0,,9001
-1176,9603,8607,172.0,,9001
-1177,9603,8605,-4.0,,9001
-1177,9603,8606,154.0,,9001
-1177,9603,8607,178.0,,9001
-1178,9603,8605,1.0,,9001
-1178,9603,8606,140.0,,9001
-1178,9603,8607,165.0,,9001
-1179,9603,8605,-7.0,,9001
-1179,9603,8606,162.0,,9001
-1179,9603,8607,188.0,,9001
-1180,9603,8605,-9.0,,9001
-1180,9603,8606,157.0,,9001
-1180,9603,8607,184.0,,9001
-1181,9603,8605,-22.0,,9001
-1181,9603,8606,160.0,,9001
-1181,9603,8607,190.0,,9001
-1182,9603,8605,4.0,,9001
-1182,9603,8606,159.0,,9001
-1182,9603,8607,188.0,,9001
-1183,9603,8605,-7.0,,9001
-1183,9603,8606,139.0,,9001
-1183,9603,8607,181.0,,9001
-1184,9603,8605,0.0,,9001
-1184,9603,8606,125.0,,9001
-1184,9603,8607,201.0,,9001
-1185,9603,8605,-9.0,,9001
-1185,9603,8606,152.0,,9001
-1185,9603,8607,178.0,,9001
-1186,9603,8605,11.0,,9001
-1186,9603,8606,114.0,,9001
-1186,9603,8607,195.0,,9001
-1187,9603,8605,-12.0,,9001
-1187,9603,8606,130.0,,9001
-1187,9603,8607,190.0,,9001
-1188,9603,8605,0.0,,9001
-1188,9603,8606,0.0,,9001
-1188,9603,8607,0.0,,9001
-1189,9603,8605,-247.0,,9001
-1189,9603,8606,-148.0,,9001
-1189,9603,8607,369.0,,9001
-1190,9603,8605,-243.0,,9001
-1190,9603,8606,-192.0,,9001
-1190,9603,8607,477.0,,9001
-1191,9603,8605,-249.0,,9001
-1191,9603,8606,-156.0,,9001
-1191,9603,8607,381.0,,9001
-1192,9603,8605,-10.0,,9001
-1192,9603,8606,375.0,,9001
-1192,9603,8607,165.0,,9001
-1193,9603,8605,-168.0,,9001
-1193,9603,8606,-60.0,,9001
-1193,9603,8607,320.0,,9001
-1195,9603,8605,375.0,,9001
-1195,9603,8606,-111.0,,9001
-1195,9603,8607,431.0,,9001
-1196,9603,8605,371.0,,9001
-1196,9603,8606,-112.0,,9001
-1196,9603,8607,434.0,,9001
-1197,9603,8605,371.0,,9001
-1197,9603,8606,-111.0,,9001
-1197,9603,8607,434.0,,9001
-1198,9603,8605,384.0,,9001
-1198,9603,8606,-111.0,,9001
-1198,9603,8607,425.0,,9001
-1199,9603,8605,370.0,,9001
-1199,9603,8606,-108.0,,9001
-1199,9603,8607,434.0,,9001
-1200,9603,8605,-148.0,,9001
-1200,9603,8606,51.0,,9001
-1200,9603,8607,-291.0,,9001
-1201,9603,8605,-288.0,,9001
-1201,9603,8606,175.0,,9001
-1201,9603,8607,-376.0,,9001
-1202,9603,8605,-270.0,,9001
-1202,9603,8606,188.0,,9001
-1202,9603,8607,-388.0,,9001
-1203,9603,8605,-270.0,,9001
-1203,9603,8606,183.0,,9001
-1203,9603,8607,-390.0,,9001
-1204,9603,8605,-305.0,,9001
-1204,9603,8606,243.0,,9001
-1204,9603,8607,-442.0,,9001
-1205,9603,8605,-282.0,,9001
-1205,9603,8606,169.0,,9001
-1205,9603,8607,-371.0,,9001
-1206,9603,8605,-278.0,,9001
-1206,9603,8606,171.0,,9001
-1206,9603,8607,-367.0,,9001
-1207,9603,8605,-298.0,,9001
-1207,9603,8606,159.0,,9001
-1207,9603,8607,-369.0,,9001
-1208,9603,8605,-279.0,,9001
-1208,9603,8606,175.0,,9001
-1208,9603,8607,-379.0,,9001
-1209,9603,8605,-295.0,,9001
-1209,9603,8606,173.0,,9001
-1209,9603,8607,-371.0,,9001
-1211,9603,8605,164.0,,9001
-1211,9603,8606,138.0,,9001
-1211,9603,8607,-189.0,,9001
-1212,9603,8605,-57.0,,9001
-1212,9603,8606,1.0,,9001
-1212,9603,8607,-41.0,,9001
-1213,9603,8605,-62.0,,9001
-1213,9603,8606,-1.0,,9001
-1213,9603,8607,-37.0,,9001
-1214,9603,8605,-61.0,,9001
-1214,9603,8606,2.0,,9001
-1214,9603,8607,-48.0,,9001
-1215,9603,8605,-60.0,,9001
-1215,9603,8606,-2.0,,9001
-1215,9603,8607,-41.0,,9001
-1216,9603,8605,-75.0,,9001
-1216,9603,8606,-1.0,,9001
-1216,9603,8607,-44.0,,9001
-1217,9603,8605,-44.0,,9001
-1217,9603,8606,6.0,,9001
-1217,9603,8607,-36.0,,9001
-1218,9603,8605,-48.0,,9001
-1218,9603,8606,3.0,,9001
-1218,9603,8607,-44.0,,9001
-1219,9603,8605,-47.0,,9001
-1219,9603,8606,26.0,,9001
-1219,9603,8607,-42.0,,9001
-1220,9603,8605,-53.0,,9001
-1220,9603,8606,3.0,,9001
-1220,9603,8607,-47.0,,9001
-1221,9603,8605,-61.0,,9001
-1221,9603,8606,2.0,,9001
-1221,9603,8607,-33.0,,9001
-1222,9603,8605,-58.0,,9001
-1222,9603,8606,0.0,,9001
-1222,9603,8607,-44.0,,9001
-1223,9603,8605,-45.0,,9001
-1223,9603,8606,12.0,,9001
-1223,9603,8607,-33.0,,9001
-1224,9603,8605,-45.0,,9001
-1224,9603,8606,8.0,,9001
-1224,9603,8607,-33.0,,9001
-1225,9603,8605,-355.0,,9001
-1225,9603,8606,21.0,,9001
-1225,9603,8607,72.0,,9001
-1226,9603,8605,616.0,,9001
-1226,9603,8606,97.0,,9001
-1226,9603,8607,-251.0,,9001
-1227,9603,8605,-189.0,,9001
-1227,9603,8606,-242.0,,9001
-1227,9603,8607,-91.0,,9001
-1228,9603,8605,-679.0,,9001
-1228,9603,8606,669.0,,9001
-1228,9603,8607,-48.0,,9001
-1229,9603,8605,506.0,,9001
-1229,9603,8606,-122.0,,9001
-1229,9603,8607,611.0,,9001
-1230,9603,8605,-148.0,,9001
-1230,9603,8606,507.0,,9001
-1230,9603,8607,685.0,,9001
-1231,9603,8605,-148.0,,9001
-1231,9603,8606,507.0,,9001
-1231,9603,8607,685.0,,9001
-1232,9603,8605,-146.0,,9001
-1232,9603,8606,507.0,,9001
-1232,9603,8607,687.0,,9001
-1233,9603,8605,-158.0,,9001
-1233,9603,8606,507.0,,9001
-1233,9603,8607,676.0,,9001
-1234,9603,8605,-155.0,,9001
-1234,9603,8606,171.0,,9001
-1234,9603,8607,37.0,,9001
-1235,9603,8605,-265.0,,9001
-1235,9603,8606,120.0,,9001
-1235,9603,8607,-358.0,,9001
-1236,9607,8605,-116.0,,9001
-1236,9607,8606,-50.47,,9001
-1236,9607,8607,141.69,,9001
-1236,9607,8608,-0.23,,9104
-1236,9607,8609,-0.39,,9104
-1236,9607,8610,-0.344,,9104
-1236,9607,8611,0.0983,,9202
-1237,9606,8605,0.0,,9001
-1237,9606,8606,0.0,,9001
-1237,9606,8607,4.5,,9001
-1237,9606,8608,0.0,,9104
-1237,9606,8609,0.0,,9104
-1237,9606,8610,0.554,,9104
-1237,9606,8611,0.2263,,9202
-1238,9606,8605,0.0,,9001
-1238,9606,8606,0.0,,9001
-1238,9606,8607,4.5,,9001
-1238,9606,8608,0.0,,9104
-1238,9606,8609,0.0,,9104
-1238,9606,8610,0.554,,9104
-1238,9606,8611,0.219,,9202
-1239,9606,8605,0.0,,9001
-1239,9606,8606,0.0,,9001
-1239,9606,8607,-2.6,,9001
-1239,9606,8608,0.0,,9104
-1239,9606,8609,0.0,,9104
-1239,9606,8610,0.26,,9104
-1239,9606,8611,-0.6063,,9202
-1240,9606,8605,0.0,,9001
-1240,9606,8606,0.0,,9001
-1240,9606,8607,1.9,,9001
-1240,9606,8608,0.0,,9104
-1240,9606,8609,0.0,,9104
-1240,9606,8610,0.814,,9104
-1240,9606,8611,-0.38,,9202
-1241,9613,8657,,conus.las,
-1241,9613,8658,,conus.los,
-1243,9613,8657,,alaska.las,
-1243,9613,8658,,alaska.los,
-1245,9603,8605,-112.0,,9001
-1245,9603,8606,-77.0,,9001
-1245,9603,8607,-145.0,,9001
-1246,9603,8605,-333.0,,9001
-1246,9603,8606,-222.0,,9001
-1246,9603,8607,114.0,,9001
-1247,9603,8605,283.0,,9001
-1247,9603,8606,682.0,,9001
-1247,9603,8607,231.0,,9001
-1248,9603,8605,-24.0,,9001
-1248,9603,8606,-15.0,,9001
-1248,9603,8607,5.0,,9001
-1249,9603,8605,-2.0,,9001
-1249,9603,8606,152.0,,9001
-1249,9603,8607,149.0,,9001
-1250,9603,8605,2.0,,9001
-1250,9603,8606,204.0,,9001
-1250,9603,8607,105.0,,9001
-1251,9603,8605,-2.0,,9001
-1251,9603,8606,0.0,,9001
-1251,9603,8607,4.0,,9001
-1252,9603,8605,1.0,,9001
-1252,9603,8606,1.0,,9001
-1252,9603,8607,-1.0,,9001
-1253,9603,8605,-186.0,,9001
-1253,9603,8606,-93.0,,9001
-1253,9603,8607,310.0,,9001
-1254,9603,8605,28.0,,9001
-1254,9603,8606,-130.0,,9001
-1254,9603,8607,-95.0,,9001
-1255,9603,8605,-123.0,,9001
-1255,9603,8606,-206.0,,9001
-1255,9603,8607,219.0,,9001
-1256,9603,8605,-346.0,,9001
-1256,9603,8606,-1.0,,9001
-1256,9603,8607,224.0,,9001
-1258,9601,8602,-74.04513,,9110
-1259,9601,8602,-9.0754862,,9110
-1260,9601,8602,106.482779,,9110
-1261,9601,8602,-17.4,,9110
-1262,9601,8602,12.27084,,9110
-1263,9601,8602,106.482779,,9110
-1264,9601,8602,4.220471,,9110
-1265,9601,8602,2.5969213,,9105
-1266,9601,8602,2.5969213,,9105
-1268,9601,8602,106.482779,,9110
-1269,9601,8602,18.03298,,9110
-1270,9601,8602,23.4258815,,9110
-1271,9603,8605,615.64,,9001
-1271,9603,8606,102.08,,9001
-1271,9603,8607,-255.81,,9001
-1272,9603,8605,-199.87,,9001
-1272,9603,8606,74.79,,9001
-1272,9603,8607,246.62,,9001
-1273,9607,8605,-56.0,,9001
-1273,9607,8606,75.77,,9001
-1273,9607,8607,15.31,,9001
-1273,9607,8608,-0.37,,9104
-1273,9607,8609,-0.2,,9104
-1273,9607,8610,-0.21,,9104
-1273,9607,8611,-1.01,,9202
-1274,9607,8605,-40.595,,9001
-1274,9607,8606,-18.55,,9001
-1274,9607,8607,-69.339,,9001
-1274,9607,8608,-2.508,,9104
-1274,9607,8609,-1.832,,9104
-1274,9607,8610,2.611,,9104
-1274,9607,8611,-4.299,,9202
-1275,9603,8605,-84.0,,9001
-1275,9603,8606,-97.0,,9001
-1275,9603,8607,-117.0,,9001
-1276,9603,8605,-84.0,,9001
-1276,9603,8606,37.0,,9001
-1276,9603,8607,437.0,,9001
-1277,9603,8605,-168.0,,9001
-1277,9603,8606,-72.0,,9001
-1277,9603,8607,314.0,,9001
-1278,9603,8605,-127.8,,9001
-1278,9603,8606,-52.3,,9001
-1278,9603,8607,152.9,,9001
-1279,9603,8605,-128.5,,9001
-1279,9603,8606,-53.0,,9001
-1279,9603,8607,153.4,,9001
-1280,9607,8605,-117.763,,9001
-1280,9607,8606,-51.51,,9001
-1280,9607,8607,139.061,,9001
-1280,9607,8608,-0.292,,9104
-1280,9607,8609,-0.443,,9104
-1280,9607,8610,-0.277,,9104
-1280,9607,8611,-0.191,,9202
-1282,9603,8605,-404.78,,9001
-1282,9603,8606,685.68,,9001
-1282,9603,8607,45.47,,9001
-1283,9603,8605,0.0,,9001
-1283,9603,8606,0.0,,9001
-1283,9603,8607,0.0,,9001
-1284,9603,8605,-157.0,,9001
-1284,9603,8606,-2.0,,9001
-1284,9603,8607,-299.0,,9001
-1285,9603,8605,-175.0,,9001
-1285,9603,8606,-23.0,,9001
-1285,9603,8607,-303.0,,9001
-1286,9603,8605,-403.0,,9001
-1286,9603,8606,684.0,,9001
-1286,9603,8607,41.0,,9001
-1287,9603,8605,28.0,,9001
-1287,9603,8606,-121.0,,9001
-1287,9603,8607,-77.0,,9001
-1288,9603,8605,23.0,,9001
-1288,9603,8606,-124.0,,9001
-1288,9603,8607,-82.0,,9001
-1289,9603,8605,26.0,,9001
-1289,9603,8606,-121.0,,9001
-1289,9603,8607,-78.0,,9001
-1290,9603,8605,24.0,,9001
-1290,9603,8606,-124.0,,9001
-1290,9603,8607,-82.0,,9001
-1291,9603,8605,15.0,,9001
-1291,9603,8606,-130.0,,9001
-1291,9603,8607,-84.0,,9001
-1292,9603,8605,24.0,,9001
-1292,9603,8606,-130.0,,9001
-1292,9603,8607,-92.0,,9001
-1293,9603,8605,28.0,,9001
-1293,9603,8606,-121.0,,9001
-1293,9603,8607,-77.0,,9001
-1294,9603,8605,-73.0,,9001
-1294,9603,8606,-247.0,,9001
-1294,9603,8607,227.0,,9001
-1296,9603,8605,-61.702,,9001
-1296,9603,8606,284.488,,9001
-1296,9603,8607,472.052,,9001
-1297,9607,8605,-115.064,,9001
-1297,9607,8606,-87.39,,9001
-1297,9607,8607,-101.716,,9001
-1297,9607,8608,0.058,,9104
-1297,9607,8609,-4.001,,9104
-1297,9607,8610,2.062,,9104
-1297,9607,8611,9.366,,9202
-1298,9607,8605,-82.875,,9001
-1298,9607,8606,-57.097,,9001
-1298,9607,8607,-156.768,,9001
-1298,9607,8608,2.158,,9104
-1298,9607,8609,-1.524,,9104
-1298,9607,8610,0.982,,9104
-1298,9607,8611,-0.359,,9202
-1299,9607,8605,-138.527,,9001
-1299,9607,8606,-91.999,,9001
-1299,9607,8607,-114.591,,9001
-1299,9607,8608,0.14,,9104
-1299,9607,8609,-3.363,,9104
-1299,9607,8610,2.217,,9104
-1299,9607,8611,11.748,,9202
-1300,9607,8605,-73.472,,9001
-1300,9607,8606,-51.66,,9001
-1300,9607,8607,-112.482,,9001
-1300,9607,8608,-0.953,,9104
-1300,9607,8609,-4.6,,9104
-1300,9607,8610,2.368,,9104
-1300,9607,8611,0.586,,9202
-1301,9607,8605,219.315,,9001
-1301,9607,8606,168.975,,9001
-1301,9607,8607,-166.145,,9001
-1301,9607,8608,-0.198,,9104
-1301,9607,8609,-5.926,,9104
-1301,9607,8610,2.356,,9104
-1301,9607,8611,-57.104,,9202
-1302,9607,8605,0.0,,9001
-1302,9607,8606,0.0,,9001
-1302,9607,8607,0.0,,9001
-1302,9607,8608,0.0,,9104
-1302,9607,8609,0.0,,9104
-1302,9607,8610,0.0,,9104
-1302,9607,8611,0.0,,9202
-1303,9606,8605,43.822,,9001
-1303,9606,8606,-108.842,,9001
-1303,9606,8607,-119.585,,9001
-1303,9606,8608,1.455,,9104
-1303,9606,8609,-0.761,,9104
-1303,9606,8610,0.737,,9104
-1303,9606,8611,0.549,,9202
-1304,9603,8605,210.0,,9001
-1304,9603,8606,814.0,,9001
-1304,9603,8607,289.0,,9001
-1305,9603,8605,-147.0,,9001
-1305,9603,8606,506.0,,9001
-1305,9603,8607,687.0,,9001
-1306,9603,8605,682.0,,9001
-1306,9603,8606,-203.0,,9001
-1306,9603,8607,480.0,,9001
-1307,9603,8605,-2.0,,9001
-1307,9603,8606,374.0,,9001
-1307,9603,8607,172.0,,9001
-1308,9607,8605,-0.9738,,9001
-1308,9607,8606,1.9453,,9001
-1308,9607,8607,0.5486,,9001
-1308,9607,8608,-0.00000013357,,9101
-1308,9607,8609,-0.00000004872,,9101
-1308,9607,8610,-0.00000005507,,9101
-1308,9607,8611,0.0,,9202
-1309,9607,8605,582.0,,9001
-1309,9607,8606,105.0,,9001
-1309,9607,8607,414.0,,9001
-1309,9607,8608,-1.04,,9104
-1309,9607,8609,-0.35,,9104
-1309,9607,8610,3.08,,9104
-1309,9607,8611,8.3,,9202
-1310,9607,8605,24.0,,9001
-1310,9607,8606,-123.0,,9001
-1310,9607,8607,-94.0,,9001
-1310,9607,8608,-0.02,,9104
-1310,9607,8609,0.25,,9104
-1310,9607,8610,0.13,,9104
-1310,9607,8611,1.1,,9202
-1311,9606,8605,-89.5,,9001
-1311,9606,8606,-93.8,,9001
-1311,9606,8607,-123.1,,9001
-1311,9606,8608,0.0,,9104
-1311,9606,8609,0.0,,9104
-1311,9606,8610,-0.156,,9104
-1311,9606,8611,1.2,,9202
-1312,9614,8656,,NTv1_0.gsb,
-1313,9615,8656,,NTv2_0.gsb,
-1314,9606,8605,446.448,,9001
-1314,9606,8606,-125.157,,9001
-1314,9606,8607,542.06,,9001
-1314,9606,8608,0.15,,9104
-1314,9606,8609,0.247,,9104
-1314,9606,8610,0.842,,9104
-1314,9606,8611,-20.489,,9202
-1315,9606,8605,535.948,,9001
-1315,9606,8606,-31.357,,9001
-1315,9606,8607,665.16,,9001
-1315,9606,8608,0.15,,9104
-1315,9606,8609,0.247,,9104
-1315,9606,8610,0.998,,9104
-1315,9606,8611,-21.689,,9202
-1316,9603,8605,-70.9,,9001
-1316,9603,8606,-151.8,,9001
-1316,9603,8607,-41.4,,9001
-1317,9603,8605,-37.2,,9001
-1317,9603,8606,-370.6,,9001
-1317,9603,8607,-228.5,,9001
-1318,9603,8605,-42.01,,9001
-1318,9603,8606,-332.21,,9001
-1318,9603,8607,-229.75,,9001
-1319,9603,8605,-40.0,,9001
-1319,9603,8606,-354.0,,9001
-1319,9603,8607,-224.0,,9001
-1320,9606,8605,-37.2,,9001
-1320,9606,8606,-370.6,,9001
-1320,9606,8607,-224.0,,9001
-1320,9606,8608,0.0,,9104
-1320,9606,8609,0.0,,9104
-1320,9606,8610,0.554,,9104
-1320,9606,8611,0.219,,9202
-1321,9603,8605,-41.8,,9001
-1321,9603,8606,-342.2,,9001
-1321,9603,8607,-228.2,,9001
-1322,9603,8605,-55.5,,9001
-1322,9603,8606,-348.0,,9001
-1322,9603,8607,-229.2,,9001
-1323,9603,8605,-43.0,,9001
-1323,9603,8606,-337.0,,9001
-1323,9603,8607,-233.0,,9001
-1324,9603,8605,-48.0,,9001
-1324,9603,8606,-345.0,,9001
-1324,9603,8607,-231.0,,9001
-1325,9603,8605,-48.6,,9001
-1325,9603,8606,-345.1,,9001
-1325,9603,8607,-230.8,,9001
-1326,9606,8605,-41.057,,9001
-1326,9606,8606,-374.564,,9001
-1326,9606,8607,-226.287,,9001
-1326,9606,8608,0.0,,9104
-1326,9606,8609,0.0,,9104
-1326,9606,8610,0.554,,9104
-1326,9606,8611,0.219,,9202
-1327,9603,8605,-50.9,,9001
-1327,9603,8606,-347.6,,9001
-1327,9603,8607,-231.0,,9001
-1328,9603,8605,0.0,,9001
-1328,9603,8606,0.0,,9001
-1328,9603,8607,0.0,,9001
-1329,9603,8605,-252.95,,9001
-1329,9603,8606,-4.11,,9001
-1329,9603,8607,-96.38,,9001
-1330,9603,8605,-252.95,,9001
-1330,9603,8606,-4.11,,9001
-1330,9603,8607,-96.38,,9001
-1331,9607,8605,0.0,,9001
-1331,9607,8606,0.0,,9001
-1331,9607,8607,0.0,,9001
-1331,9607,8608,0.0,,9104
-1331,9607,8609,0.0,,9104
-1331,9607,8610,0.0,,9104
-1331,9607,8611,0.0,,9202
-1332,9607,8605,21.53219,,9001
-1332,9607,8606,-97.00027,,9001
-1332,9607,8607,-60.74046,,9001
-1332,9607,8608,-0.99548,,9104
-1332,9607,8609,-0.58147,,9104
-1332,9607,8610,-0.2418,,9104
-1332,9607,8611,-4.5981,,9202
-1333,9607,8605,0.055,,9001
-1333,9607,8606,-0.541,,9001
-1333,9607,8607,-0.185,,9001
-1333,9607,8608,-0.0183,,9104
-1333,9607,8609,0.0003,,9104
-1333,9607,8610,0.007,,9104
-1333,9607,8611,-0.014,,9202
-1334,9607,8605,21.58719,,9001
-1334,9607,8606,-97.54127,,9001
-1334,9607,8607,-60.92546,,9001
-1334,9607,8608,-1.01378,,9104
-1334,9607,8609,-0.58117,,9104
-1334,9607,8610,-0.2348,,9104
-1334,9607,8611,-4.6121,,9202
-1335,9618,8601,7.92,,9108
-1335,9618,8602,-13.88,,9104
-1335,9618,8604,26.1,,9001
-1336,9618,8601,7.94,,9104
-1336,9618,8602,-13.97,,9104
-1336,9618,8604,26.9,,9001
-1337,9618,8601,8.1,,9104
-1337,9618,8602,-13.81,,9104
-1337,9618,8604,27.2,,9001
-1338,9618,8601,8.15,,9104
-1338,9618,8602,-13.95,,9104
-1338,9618,8604,28.4,,9001
-1339,9618,8601,8.37,,9104
-1339,9618,8602,-13.65,,9104
-1339,9618,8604,29.0,,9001
-1340,9618,8601,8.44,,9104
-1340,9618,8602,-13.87,,9104
-1340,9618,8604,30.9,,9001
-1341,9618,8601,8.61,,9104
-1341,9618,8602,-14.08,,9104
-1341,9618,8604,30.7,,9001
-1342,9618,8601,8.73,,9104
-1342,9618,8602,-14.3,,9104
-1342,9618,8604,30.9,,9001
-1343,9618,8601,8.63,,9104
-1343,9618,8602,-13.49,,9104
-1343,9618,8604,30.9,,9001
-1344,9618,8601,8.71,,9104
-1344,9618,8602,-13.73,,9104
-1344,9618,8604,31.6,,9001
-1345,9618,8601,8.84,,9104
-1345,9618,8602,-14.03,,9104
-1345,9618,8604,31.2,,9001
-1346,9618,8601,8.98,,9104
-1346,9618,8602,-14.33,,9104
-1346,9618,8604,32.5,,9001
-1347,9618,8601,9.1,,9104
-1347,9618,8602,-14.56,,9104
-1347,9618,8604,32.6,,9001
-1348,9618,8601,8.79,,9104
-1348,9618,8602,-13.0,,9104
-1348,9618,8604,33.3,,9001
-1349,9618,8601,8.84,,9104
-1349,9618,8602,-13.31,,9104
-1349,9618,8604,31.4,,9001
-1350,9618,8601,8.98,,9104
-1350,9618,8602,-13.59,,9104
-1350,9618,8604,30.9,,9001
-1351,9618,8601,9.1,,9104
-1351,9618,8602,-13.91,,9104
-1351,9618,8604,29.3,,9001
-1352,9618,8601,9.17,,9104
-1352,9618,8602,-14.27,,9104
-1352,9618,8604,31.3,,9001
-1353,9618,8601,9.23,,9104
-1353,9618,8602,-14.52,,9104
-1353,9618,8604,31.4,,9001
-1354,9618,8601,8.9,,9104
-1354,9618,8602,-12.68,,9104
-1354,9618,8604,34.4,,9001
-1355,9618,8601,8.99,,9104
-1355,9618,8602,-12.8,,9104
-1355,9618,8604,34.2,,9001
-1356,9618,8601,9.0,,9104
-1356,9618,8602,-13.07,,9104
-1356,9618,8604,31.7,,9001
-1357,9618,8601,9.21,,9104
-1357,9618,8602,-13.51,,9104
-1357,9618,8604,27.5,,9001
-1358,9618,8601,9.33,,9104
-1358,9618,8602,-13.66,,9104
-1358,9618,8604,23.8,,9001
-1359,9618,8601,9.25,,9104
-1359,9618,8602,-12.72,,9104
-1359,9618,8604,34.2,,9001
-1360,9618,8601,9.39,,9104
-1360,9618,8602,-12.91,,9104
-1360,9618,8604,31.8,,9001
-1361,9618,8601,9.55,,9104
-1361,9618,8602,-12.63,,9104
-1361,9618,8604,35.6,,9001
-1362,9618,8601,9.62,,9104
-1362,9618,8602,-12.82,,9104
-1362,9618,8604,34.7,,9001
-1363,9618,8601,9.81,,9104
-1363,9618,8602,-12.29,,9104
-1363,9618,8604,36.6,,9001
-1364,9618,8601,9.81,,9104
-1364,9618,8602,-12.45,,9104
-1364,9618,8604,37.5,,9001
-1365,9618,8601,9.92,,9104
-1365,9618,8602,-12.79,,9104
-1365,9618,8604,38.3,,9001
-1366,9618,8601,9.91,,9104
-1366,9618,8602,-12.21,,9104
-1366,9618,8604,36.6,,9001
-1367,9618,8601,10.08,,9104
-1367,9618,8602,-12.35,,9104
-1367,9618,8604,39.0,,9001
-1368,9618,8601,10.19,,9104
-1368,9618,8602,-12.74,,9104
-1368,9618,8604,40.3,,9001
-1369,9618,8601,10.29,,9104
-1369,9618,8602,-12.13,,9104
-1369,9618,8604,38.5,,9001
-1370,9618,8601,10.33,,9104
-1370,9618,8602,-12.27,,9104
-1370,9618,8604,40.1,,9001
-1371,9618,8601,10.45,,9104
-1371,9618,8602,-12.61,,9104
-1371,9618,8604,41.7,,9001
-1372,9618,8601,10.54,,9104
-1372,9618,8602,-11.96,,9104
-1372,9618,8604,39.1,,9001
-1373,9618,8601,10.65,,9104
-1373,9618,8602,-12.27,,9104
-1373,9618,8604,41.7,,9001
-1374,9618,8601,10.67,,9104
-1374,9618,8602,-12.5,,9104
-1374,9618,8604,41.1,,9001
-1375,9618,8601,10.67,,9104
-1375,9618,8602,-10.86,,9104
-1375,9618,8604,38.5,,9001
-1376,9618,8601,10.68,,9104
-1376,9618,8602,-10.97,,9104
-1376,9618,8604,36.0,,9001
-1377,9618,8601,10.8,,9104
-1377,9618,8602,-11.53,,9104
-1377,9618,8604,39.7,,9001
-1378,9618,8601,10.8,,9104
-1378,9618,8602,-11.73,,9104
-1378,9618,8604,40.9,,9001
-1379,9618,8601,10.92,,9104
-1379,9618,8602,-12.16,,9104
-1379,9618,8604,42.3,,9001
-1380,9618,8601,11.0,,9104
-1380,9618,8602,-12.25,,9104
-1380,9618,8604,41.2,,9001
-1381,9618,8601,10.83,,9104
-1381,9618,8602,-10.77,,9104
-1381,9618,8604,36.2,,9001
-1382,9618,8601,10.95,,9104
-1382,9618,8602,-11.0,,9104
-1382,9618,8604,38.7,,9001
-1383,9618,8601,10.97,,9104
-1383,9618,8602,-11.34,,9104
-1383,9618,8604,40.8,,9001
-1384,9618,8601,11.04,,9104
-1384,9618,8602,-11.69,,9104
-1384,9618,8604,43.3,,9001
-1385,9618,8601,11.17,,9104
-1385,9618,8602,-12.05,,9104
-1385,9618,8604,42.6,,9001
-1386,9618,8601,11.11,,9104
-1386,9618,8602,-10.59,,9104
-1386,9618,8604,37.3,,9001
-1387,9618,8601,11.16,,9104
-1387,9618,8602,-10.97,,9104
-1387,9618,8604,40.3,,9001
-1388,9618,8601,11.29,,9104
-1388,9618,8602,-11.23,,9104
-1388,9618,8604,42.4,,9001
-1389,9618,8601,11.36,,9104
-1389,9618,8602,-11.59,,9104
-1389,9618,8604,42.5,,9001
-1390,9618,8601,11.44,,9104
-1390,9618,8602,-11.88,,9104
-1390,9618,8604,40.3,,9001
-1391,9618,8601,11.27,,9104
-1391,9618,8602,-9.31,,9104
-1391,9618,8604,30.9,,9001
-1392,9618,8601,11.33,,9104
-1392,9618,8602,-9.52,,9104
-1392,9618,8604,33.8,,9001
-1393,9618,8601,11.38,,9104
-1393,9618,8602,-9.86,,9104
-1393,9618,8604,34.9,,9001
-1394,9618,8601,11.41,,9104
-1394,9618,8602,-10.14,,9104
-1394,9618,8604,35.7,,9001
-1395,9618,8601,11.39,,9104
-1395,9618,8602,-10.52,,9104
-1395,9618,8604,37.5,,9001
-1396,9618,8601,11.49,,9104
-1396,9618,8602,-10.83,,9104
-1396,9618,8604,39.3,,9001
-1397,9618,8601,11.58,,9104
-1397,9618,8602,-11.21,,9104
-1397,9618,8604,41.7,,9001
-1398,9618,8601,11.65,,9104
-1398,9618,8602,-11.53,,9104
-1398,9618,8604,38.5,,9001
-1399,9618,8601,11.72,,9104
-1399,9618,8602,-11.8,,9104
-1399,9618,8604,34.5,,9001
-1400,9618,8601,11.44,,9104
-1400,9618,8602,-9.21,,9104
-1400,9618,8604,32.7,,9001
-1401,9618,8601,11.47,,9104
-1401,9618,8602,-9.52,,9104
-1401,9618,8604,35.2,,9001
-1402,9618,8601,11.55,,9104
-1402,9618,8602,-9.8,,9104
-1402,9618,8604,35.4,,9001
-1403,9618,8601,11.61,,9104
-1403,9618,8602,-10.12,,9104
-1403,9618,8604,35.9,,9001
-1404,9618,8601,11.66,,9104
-1404,9618,8602,-10.47,,9104
-1404,9618,8604,37.0,,9001
-1405,9618,8601,11.78,,9104
-1405,9618,8602,-10.79,,9104
-1405,9618,8604,39.8,,9001
-1406,9618,8601,11.85,,9104
-1406,9618,8602,-11.13,,9104
-1406,9618,8604,39.9,,9001
-1407,9618,8601,11.9,,9104
-1407,9618,8602,-11.47,,9104
-1407,9618,8604,36.9,,9001
-1408,9618,8601,11.91,,9104
-1408,9618,8602,-11.69,,9104
-1408,9618,8604,33.7,,9001
-1409,9618,8601,11.65,,9104
-1409,9618,8602,-8.59,,9104
-1409,9618,8604,29.7,,9001
-1410,9618,8601,11.68,,9104
-1410,9618,8602,-8.8,,9104
-1410,9618,8604,30.5,,9001
-1411,9618,8601,11.73,,9104
-1411,9618,8602,-9.04,,9104
-1411,9618,8604,30.9,,9001
-1412,9618,8601,11.72,,9104
-1412,9618,8602,-9.48,,9104
-1412,9618,8604,35.1,,9001
-1413,9618,8601,11.81,,9104
-1413,9618,8602,9.74,,9104
-1413,9618,8604,35.8,,9001
-1414,9618,8601,11.88,,9104
-1414,9618,8602,-10.1,,9104
-1414,9618,8604,37.1,,9001
-1415,9618,8601,11.91,,9104
-1415,9618,8602,-10.35,,9104
-1415,9618,8604,37.9,,9001
-1416,9618,8601,11.9,,9104
-1416,9618,8602,-10.7,,9104
-1416,9618,8604,39.3,,9001
-1417,9618,8601,12.02,,9104
-1417,9618,8602,-11.09,,9104
-1417,9618,8604,38.2,,9001
-1418,9618,8601,11.87,,9104
-1418,9618,8602,-8.23,,9104
-1418,9618,8604,29.7,,9001
-1419,9618,8601,11.84,,9104
-1419,9618,8602,-8.44,,9104
-1419,9618,8604,30.6,,9001
-1420,9618,8601,11.94,,9104
-1420,9618,8602,-8.71,,9104
-1420,9618,8604,30.2,,9001
-1421,9618,8601,11.99,,9104
-1421,9618,8602,-9.02,,9104
-1421,9618,8604,30.9,,9001
-1422,9618,8601,12.05,,9104
-1422,9618,8602,-9.36,,9104
-1422,9618,8604,35.0,,9001
-1423,9618,8601,12.1,,9104
-1423,9618,8602,-9.64,,9104
-1423,9618,8604,35.5,,9001
-1424,9618,8601,12.1,,9104
-1424,9618,8602,-10.08,,9104
-1424,9618,8604,37.3,,9001
-1425,9618,8601,12.07,,9104
-1425,9618,8602,-10.25,,9104
-1425,9618,8604,37.3,,9001
-1426,9618,8601,12.0,,9104
-1426,9618,8602,-8.15,,9104
-1426,9618,8604,32.1,,9001
-1427,9618,8601,12.06,,9104
-1427,9618,8602,-8.38,,9104
-1427,9618,8604,31.0,,9001
-1428,9618,8601,12.17,,9104
-1428,9618,8602,-8.69,,9104
-1428,9618,8604,30.3,,9001
-1429,9618,8601,12.23,,9104
-1429,9618,8602,-8.99,,9104
-1429,9618,8604,31.7,,9001
-1430,9618,8601,12.21,,9104
-1430,9618,8602,-9.21,,9104
-1430,9618,8604,34.3,,9001
-1431,9618,8601,12.28,,9104
-1431,9618,8602,-9.6,,9104
-1431,9618,8604,33.3,,9001
-1432,9618,8601,12.28,,9104
-1432,9618,8602,-8.25,,9104
-1432,9618,8604,31.0,,9001
-1433,9618,8601,12.37,,9104
-1433,9618,8602,-8.55,,9104
-1433,9618,8604,29.1,,9001
-1434,9618,8601,12.53,,9104
-1434,9618,8602,-8.21,,9104
-1434,9618,8604,31.0,,9001
-1435,9618,8601,12.57,,9104
-1435,9618,8602,-8.4,,9104
-1435,9618,8604,28.4,,9001
-1436,9618,8601,12.71,,9104
-1436,9618,8602,-8.17,,9104
-1436,9618,8604,29.9,,9001
-1437,9607,8605,419.3836,,9001
-1437,9607,8606,99.3335,,9001
-1437,9607,8607,591.3451,,9001
-1437,9607,8608,-0.850389,,9104
-1437,9607,8609,-1.817277,,9104
-1437,9607,8610,7.862238,,9104
-1437,9607,8611,-0.99496,,9202
-1438,9606,8605,-333.102,,9001
-1438,9606,8606,-11.02,,9001
-1438,9606,8607,230.69,,9001
-1438,9606,8608,0.0,,9104
-1438,9606,8609,0.0,,9104
-1438,9606,8610,0.554,,9104
-1438,9606,8611,0.219,,9202
-1439,9606,8605,-180.624,,9001
-1439,9606,8606,-225.516,,9001
-1439,9606,8607,173.919,,9001
-1439,9606,8608,-0.81,,9104
-1439,9606,8609,-1.898,,9104
-1439,9606,8610,8.336,,9104
-1439,9606,8611,16.71006,,9202
-1440,9603,8605,-86.0,,9001
-1440,9603,8606,-92.2,,9001
-1440,9603,8607,-127.5,,9001
-1441,9603,8605,-255.0,,9001
-1441,9603,8606,-15.0,,9001
-1441,9603,8607,71.0,,9001
-1442,9603,8605,725.0,,9001
-1442,9603,8606,685.0,,9001
-1442,9603,8607,536.0,,9001
-1443,9603,8605,72.0,,9001
-1443,9603,8606,213.7,,9001
-1443,9603,8607,93.0,,9001
-1444,9603,8605,174.0,,9001
-1444,9603,8606,359.0,,9001
-1444,9603,8607,365.0,,9001
-1445,9603,8605,9.0,,9001
-1445,9603,8606,183.0,,9001
-1445,9603,8607,236.0,,9001
-1446,9603,8605,-149.0,,9001
-1446,9603,8606,128.0,,9001
-1446,9603,8607,296.0,,9001
-1447,9619,8601,-18.0,,9104
-1447,9619,8602,4.4,,9104
-1450,9620,8659,8047.0,,
-1450,9620,8660,8046.0,,
-1450,9620,8661,,ED50 to WGS 84 (15),
-1450,9620,8662,,ED50 to WGS 84 (14),
-1451,9614,8656,,PQV4.DAC,
-1454,9613,8657,,hawaii.las,
-1454,9613,8658,,hawaii.los,
-1455,9613,8657,,stlrnc.las,
-1455,9613,8658,,stlrnc.los,
-1456,9613,8657,,stpaul.las,
-1456,9613,8658,,stpaul.los,
-1457,9613,8657,,stgeorge.las,
-1457,9613,8658,,stgeorge.los,
-1458,9607,8605,-129.193,,9001
-1458,9607,8606,-41.212,,9001
-1458,9607,8607,130.73,,9001
-1458,9607,8608,-0.246,,9104
-1458,9607,8609,-0.374,,9104
-1458,9607,8610,-0.329,,9104
-1458,9607,8611,-2.955,,9202
-1459,9607,8605,-120.695,,9001
-1459,9607,8606,-62.73,,9001
-1459,9607,8607,165.46,,9001
-1459,9607,8608,-0.109,,9104
-1459,9607,8609,0.141,,9104
-1459,9607,8610,0.116,,9104
-1459,9607,8611,2.733,,9202
-1460,9607,8605,-119.353,,9001
-1460,9607,8606,-48.301,,9001
-1460,9607,8607,139.484,,9001
-1460,9607,8608,-0.415,,9104
-1460,9607,8609,-0.26,,9104
-1460,9607,8610,-0.437,,9104
-1460,9607,8611,-0.613,,9202
-1461,9613,8657,,prvi.las,
-1461,9613,8658,,prvi.los,
-1462,9614,8656,,GS2783v1.QUE,
-1463,9615,8656,,May76v20.gsb,
-1464,9615,8656,,vic_0799.gsb,
-1466,9601,8602,10.43225,,9110
-1467,9601,8602,2.5969213,,9105
-1468,9601,8602,2.201395,,9110
-1469,9603,8605,-125.0,,9001
-1469,9603,8606,53.0,,9001
-1469,9603,8607,467.0,,9001
-1470,9603,8605,-124.76,,9001
-1470,9603,8606,53.0,,9001
-1470,9603,8607,466.79,,9001
-1471,9606,8605,-577.326,,9001
-1471,9606,8606,-90.129,,9001
-1471,9606,8607,-463.919,,9001
-1471,9606,8608,-15.8537,,9113
-1471,9606,8609,-4.55,,9113
-1471,9606,8610,-16.3489,,9113
-1471,9606,8611,-2.4232,,9201
-1472,9615,8656,,NB7783v2.gsb,
-1473,9603,8605,0.0,,9001
-1473,9603,8606,0.0,,9001
-1473,9603,8607,0.0,,9001
-1474,9613,8657,,alhpgn.las,
-1474,9613,8658,,alhpgn.los,
-1475,9613,8657,,azhpgn.las,
-1475,9613,8658,,azhpgn.los,
-1476,9613,8657,,cnhpgn.las,
-1476,9613,8658,,cnhpgn.los,
-1477,9613,8657,,cshpgn.las,
-1477,9613,8658,,cshpgn.los,
-1478,9613,8657,,cohpgn.las,
-1478,9613,8658,,cohpgn.los,
-1479,9613,8657,,gahpgn.las,
-1479,9613,8658,,gahpgn.los,
-1480,9613,8657,,flhpgn.las,
-1480,9613,8658,,flhpgn.los,
-1481,9613,8657,,emhpgn.las,
-1481,9613,8658,,emhpgn.los,
-1482,9613,8657,,wmhpgn.las,
-1482,9613,8658,,wmhpgn.los,
-1483,9613,8657,,kyhpgn.las,
-1483,9613,8658,,kyhpgn.los,
-1484,9613,8657,,lahpgn.las,
-1484,9613,8658,,lahpgn.los,
-1485,9613,8657,,mdhpgn.las,
-1485,9613,8658,,mdhpgn.los,
-1486,9613,8657,,mehpgn.las,
-1486,9613,8658,,mehpgn.los,
-1487,9613,8657,,mihpgn.las,
-1487,9613,8658,,mihpgn.los,
-1488,9613,8657,,mshpgn.las,
-1488,9613,8658,,mshpgn.los,
-1489,9613,8657,,nbhpgn.las,
-1489,9613,8658,,nbhpgn.los,
-1490,9613,8657,,nehpgn.las,
-1490,9613,8658,,nehpgn.los,
-1491,9613,8657,,nmhpgn.las,
-1491,9613,8658,,nmhpgn.los,
-1492,9613,8657,,nyhpgn.las,
-1492,9613,8658,,nyhpgn.los,
-1493,9613,8657,,ndhpgn.las,
-1493,9613,8658,,ndhpgn.los,
-1494,9613,8657,,okhpgn.las,
-1494,9613,8658,,okhpgn.los,
-1495,9613,8657,,pvhpgn.las,
-1495,9613,8658,,pvhpgn.los,
-1496,9613,8657,,sdhpgn.las,
-1496,9613,8658,,sdhpgn.los,
-1497,9613,8657,,tnhpgn.las,
-1497,9613,8658,,tnhpgn.los,
-1498,9613,8657,,ethpgn.las,
-1498,9613,8658,,ethpgn.los,
-1499,9613,8657,,wthpgn.las,
-1499,9613,8658,,wthpgn.los,
-1500,9613,8657,,vahpgn.las,
-1500,9613,8658,,vahpgn.los,
-1501,9613,8657,,wohpgn.las,
-1501,9613,8658,,wohpgn.los,
-1502,9613,8657,,wihpgn.las,
-1502,9613,8658,,wihpgn.los,
-1503,9613,8657,,wyhpgn.las,
-1503,9613,8658,,wyhpgn.los,
-1504,9603,8605,-134.73,,9001
-1504,9603,8606,-110.92,,9001
-1504,9603,8607,-292.66,,9001
-1505,9603,8605,0.0,,9001
-1505,9603,8606,0.0,,9001
-1505,9603,8607,0.0,,9001
-1506,9615,8656,,tas_1098.gsb,
-1507,9615,8656,,nt_0599.gsb,
-1508,9607,8605,660.077,,9001
-1508,9607,8606,13.551,,9001
-1508,9607,8607,369.344,,9001
-1508,9607,8608,2.484,,9113
-1508,9607,8609,1.783,,9113
-1508,9607,8610,2.939,,9113
-1508,9607,8611,5.66,,9201
-1509,9603,8605,674.374,,9001
-1509,9603,8606,15.056,,9001
-1509,9603,8607,405.346,,9001
-1510,9603,8605,674.374,,9001
-1510,9603,8606,15.056,,9001
-1510,9603,8607,405.346,,9001
-1511,9603,8605,0.0,,9001
-1511,9603,8606,0.0,,9001
-1511,9603,8607,0.0,,9001
-1512,9603,8605,-133.63,,9001
-1512,9603,8606,-157.5,,9001
-1512,9603,8607,-158.62,,9001
-1513,9603,8605,-241.54,,9001
-1513,9603,8606,-163.64,,9001
-1513,9603,8607,396.06,,9001
-1514,9606,8605,-110.33,,9001
-1514,9606,8606,-97.73,,9001
-1514,9606,8607,-119.85,,9001
-1514,9606,8608,0.3423,,9104
-1514,9606,8609,1.1634,,9104
-1514,9606,8610,0.2715,,9104
-1514,9606,8611,0.063,,9202
-1515,9607,8605,-0.991,,9001
-1515,9607,8606,1.9072,,9001
-1515,9607,8607,0.5129,,9001
-1515,9607,8608,-0.000000125033,,9101
-1515,9607,8609,-0.000000046785,,9101
-1515,9607,8610,-0.000000056529,,9101
-1515,9607,8611,0.0,,9202
-1516,9603,8605,-273.5,,9001
-1516,9603,8606,110.6,,9001
-1516,9603,8607,-357.9,,9001
-1517,9603,8605,-23.0,,9001
-1517,9603,8606,259.0,,9001
-1517,9603,8607,-9.0,,9001
-1518,9603,8605,-83.0,,9001
-1518,9603,8606,37.0,,9001
-1518,9603,8607,124.0,,9001
-1519,9601,8602,7.26225,,9110
-1520,9613,8657,,hihpgn.las,
-1520,9613,8658,,hihpgn.los,
-1521,9613,8657,,inhpgn.las,
-1521,9613,8658,,inhpgn.los,
-1522,9613,8657,,kshpgn.las,
-1522,9613,8658,,kshpgn.los,
-1523,9613,8657,,nvhpgn.las,
-1523,9613,8658,,nvhpgn.los,
-1524,9613,8657,,ohhpgn.las,
-1524,9613,8658,,ohhpgn.los,
-1525,9613,8657,,uthpgn.las,
-1525,9613,8658,,uthpgn.los,
-1526,9613,8657,,wvhpgn.las,
-1526,9613,8658,,wvhpgn.los,
-1527,9603,8605,-154.5,,9001
-1527,9603,8606,150.7,,9001
-1527,9603,8607,100.4,,9001
-1528,9603,8605,160.0,,9001
-1528,9603,8606,26.0,,9001
-1528,9603,8607,41.0,,9001
-1529,9606,8605,18.38,,9001
-1529,9606,8606,192.45,,9001
-1529,9606,8607,96.82,,9001
-1529,9606,8608,0.056,,9104
-1529,9606,8609,-0.142,,9104
-1529,9606,8610,-0.2,,9104
-1529,9606,8611,-0.0013,,9202
-1530,9603,8605,-4.2,,9001
-1530,9603,8606,135.4,,9001
-1530,9603,8607,181.9,,9001
-1531,9603,8605,-245.0,,9001
-1531,9603,8606,-153.9,,9001
-1531,9603,8607,382.8,,9001
-1532,9603,8605,-80.7,,9001
-1532,9603,8606,-132.5,,9001
-1532,9603,8607,41.1,,9001
-1533,9603,8605,214.0,,9001
-1533,9603,8606,804.0,,9001
-1533,9603,8607,268.0,,9001
-1534,9606,8605,-111.92,,9001
-1534,9606,8606,-87.85,,9001
-1534,9606,8607,114.5,,9001
-1534,9606,8608,1.875,,9104
-1534,9606,8609,0.202,,9104
-1534,9606,8610,0.219,,9104
-1534,9606,8611,0.032,,9201
-1536,9603,8605,-250.2,,9001
-1536,9603,8606,-153.09,,9001
-1536,9603,8607,391.7,,9001
-1537,9603,8605,204.64,,9001
-1537,9603,8606,834.74,,9001
-1537,9603,8607,293.8,,9001
-1538,9603,8605,-260.1,,9001
-1538,9603,8606,5.5,,9001
-1538,9603,8607,432.2,,9001
-1539,9603,8605,-76.0,,9001
-1539,9603,8606,-138.0,,9001
-1539,9603,8607,67.0,,9001
-1540,9603,8605,0.0,,9001
-1540,9603,8606,0.0,,9001
-1540,9603,8607,0.0,,9001
-1541,9603,8605,199.0,,9001
-1541,9603,8606,931.0,,9001
-1541,9603,8607,317.0,,9001
-1542,9603,8605,198.0,,9001
-1542,9603,8606,881.0,,9001
-1542,9603,8607,317.0,,9001
-1543,9603,8605,182.0,,9001
-1543,9603,8606,915.0,,9001
-1543,9603,8607,344.0,,9001
-1544,9603,8605,-17.51,,9001
-1544,9603,8606,-108.32,,9001
-1544,9603,8607,-62.39,,9001
-1545,9603,8605,-121.8,,9001
-1545,9603,8606,98.1,,9001
-1545,9603,8607,-15.2,,9001
-1546,9603,8605,-146.21,,9001
-1546,9603,8606,112.63,,9001
-1546,9603,8607,4.05,,9001
-1547,9603,8605,-173.0,,9001
-1547,9603,8606,253.0,,9001
-1547,9603,8607,27.0,,9001
-1548,9603,8605,-66.87,,9001
-1548,9603,8606,4.37,,9001
-1548,9603,8607,-38.52,,9001
-1549,9603,8605,-158.0,,9001
-1549,9603,8606,315.0,,9001
-1549,9603,8607,-148.0,,9001
-1550,9603,8605,-139.62,,9001
-1550,9603,8606,290.53,,9001
-1550,9603,8607,-150.29,,9001
-1551,9603,8605,-141.15,,9001
-1551,9603,8606,293.44,,9001
-1551,9603,8607,-150.56,,9001
-1552,9603,8605,-142.48,,9001
-1552,9603,8606,296.03,,9001
-1552,9603,8607,-149.74,,9001
-1553,9613,8657,,ilhpgn.las,
-1553,9613,8658,,ilhpgn.los,
-1554,9613,8657,,njhpgn.las,
-1554,9613,8658,,njhpgn.los,
-1555,9603,8605,-0.465,,9001
-1555,9603,8606,372.095,,9001
-1555,9603,8607,171.736,,9001
-1556,9603,8605,-2.0,,9001
-1556,9603,8606,374.0,,9001
-1556,9603,8607,172.0,,9001
-1557,9603,8605,-254.1,,9001
-1557,9603,8606,-5.4,,9001
-1557,9603,8607,-100.3,,9001
-1558,9603,8605,0.0,,9001
-1558,9603,8606,0.0,,9001
-1558,9603,8607,0.0,,9001
-1559,9615,8656,,wa_0400.gsb,
-1560,9603,8605,-156.5,,9001
-1560,9603,8606,-87.2,,9001
-1560,9603,8607,285.9,,9001
-1561,9603,8605,-128.0,,9001
-1561,9603,8606,-283.0,,9001
-1561,9603,8607,22.0,,9001
-1562,9603,8605,-128.16,,9001
-1562,9603,8606,-282.42,,9001
-1562,9603,8607,21.93,,9001
-1563,9603,8605,-128.033,,9001
-1563,9603,8606,-283.697,,9001
-1563,9603,8607,21.052,,9001
-1564,9607,8605,59.47,,9001
-1564,9607,8606,-5.04,,9001
-1564,9607,8607,187.44,,9001
-1564,9607,8608,-0.47,,9104
-1564,9607,8609,0.1,,9104
-1564,9607,8610,-1.024,,9104
-1564,9607,8611,-4.5993,,9202
-1565,9603,8605,0.0,,9001
-1565,9603,8606,0.0,,9001
-1565,9603,8607,0.0,,9001
-1566,9603,8605,54.4,,9001
-1566,9603,8606,-20.1,,9001
-1566,9603,8607,183.1,,9001
-1567,9607,8605,59.47,,9001
-1567,9607,8606,-5.04,,9001
-1567,9607,8607,187.44,,9001
-1567,9607,8608,-0.47,,9104
-1567,9607,8609,0.1,,9104
-1567,9607,8610,1.024,,9104
-1567,9607,8611,-4.5993,,9202
-1568,9615,8656,,nzgd2kgrid0005.gsb,
-1569,9603,8605,-199.0,,9001
-1569,9603,8606,32.0,,9001
-1569,9603,8607,322.0,,9001
-1570,9603,8605,-171.16,,9001
-1570,9603,8606,17.29,,9001
-1570,9603,8607,323.31,,9001
-1571,9607,8605,565.04,,9001
-1571,9607,8606,49.91,,9001
-1571,9607,8607,465.84,,9001
-1571,9607,8608,1.9848,,9109
-1571,9607,8609,-1.7439,,9109
-1571,9607,8610,9.0587,,9109
-1571,9607,8611,4.0772,,9202
-1572,9615,8656,,NAD83-98.gsb,
-1573,9615,8656,,QUE27-83.gsb,
-1574,9615,8656,,QUE27-98.gsb,
-1575,9615,8656,,CGQ77-83.gsb,
-1576,9615,8656,,CGQ77-98.gsb,
-1577,9603,8605,-115.0,,9001
-1577,9603,8606,118.0,,9001
-1577,9603,8607,426.0,,9001
-1578,9613,8657,,wshpgn.las,
-1578,9613,8658,,wshpgn.los,
-1579,9613,8657,,eshpgn.las,
-1579,9613,8658,,eshpgn.los,
-1580,9603,8605,0.0,,9001
-1580,9603,8606,0.0,,9001
-1580,9603,8607,0.0,,9001
-1581,9603,8605,0.0,,9001
-1581,9603,8606,0.0,,9001
-1581,9603,8607,0.0,,9001
-1582,9603,8605,-259.73,,9001
-1582,9603,8606,173.12,,9001
-1582,9603,8607,-398.27,,9001
-1583,9603,8605,-307.7,,9001
-1583,9603,8606,265.3,,9001
-1583,9603,8607,-363.5,,9001
-1584,9603,8605,-174.6,,9001
-1584,9603,8606,-3.1,,9001
-1584,9603,8607,236.2,,9001
-1585,9603,8605,-177.5,,9001
-1585,9603,8606,14.1,,9001
-1585,9603,8607,237.6,,9001
-1586,9606,8605,-175.09,,9001
-1586,9606,8606,1.218,,9001
-1586,9606,8607,238.831,,9001
-1586,9606,8608,-0.047,,9104
-1586,9606,8609,0.019,,9104
-1586,9606,8610,0.808,,9104
-1586,9606,8611,0.1698,,9202
-1587,9603,8605,-191.77,,9001
-1587,9603,8606,15.01,,9001
-1587,9603,8607,235.07,,9001
-1588,9606,8605,-116.641,,9001
-1588,9606,8606,-56.931,,9001
-1588,9606,8607,-110.559,,9001
-1588,9606,8608,4.327,,9109
-1588,9606,8609,4.464,,9109
-1588,9606,8610,-4.444,,9109
-1588,9606,8611,-3.52,,9202
-1589,9620,8659,1588.0,,
-1589,9620,8660,8570.0,,
-1589,9620,8661,,ED50 to ETRF89 (1),
-1589,9620,8662,,ED50 to ETRF89 (2),
-1590,9620,8659,8569.0,,
-1590,9620,8660,8046.0,,
-1590,9620,8661,,ED50 to WGS 84 (21),
-1590,9620,8662,,ED50 to WGS 84 (14),
-1591,9603,8605,0.0,,9001
-1591,9603,8606,0.0,,9001
-1591,9603,8607,0.0,,9001
-1592,9603,8605,-678.0,,9001
-1592,9603,8606,670.0,,9001
-1592,9603,8607,-48.0,,9001
-1593,9615,8656,,wa_0700.gsb,
-1594,9607,8605,-120.271,,9001
-1594,9607,8606,-64.543,,9001
-1594,9607,8607,161.632,,9001
-1594,9607,8608,-0.217,,9104
-1594,9607,8609,0.067,,9104
-1594,9607,8610,0.129,,9104
-1594,9607,8611,2.499,,9202
-1595,9607,8605,-124.133,,9001
-1595,9607,8606,-42.003,,9001
-1595,9607,8607,137.4,,9001
-1595,9607,8608,0.008,,9104
-1595,9607,8609,-0.557,,9104
-1595,9607,8610,-0.178,,9104
-1595,9607,8611,-1.854,,9202
-1596,9615,8656,,SEAust_21_06_00.gsb,
-1597,9603,8605,304.5,,9001
-1597,9603,8606,306.5,,9001
-1597,9603,8607,-318.1,,9001
-1598,9603,8605,0.0,,9001
-1598,9603,8606,0.0,,9001
-1598,9603,8607,0.0,,9001
-1599,9615,8656,,PE7783V2.gsb,
-1600,9615,8656,,SK27-98.gsb,
-1601,9615,8656,,SK83-98.gsb,
-1602,9615,8656,,AB_CSRS.DAC,
-1603,9634,8665,,TRNB2777.DAT,
-1604,9634,8665,,TRNS2777.DAT,
-1605,9634,8665,,TRPE2777.DAT,
-1606,9634,8665,,TRNB2777.DAT,
-1607,9634,8665,,TRNS2777.DAT,
-1608,9634,8665,,TRPE2777.DAT,
-1609,9607,8605,-99.059,,9001
-1609,9607,8606,53.322,,9001
-1609,9607,8607,-112.486,,9001
-1609,9607,8608,-0.419,,9104
-1609,9607,8609,0.83,,9104
-1609,9607,8610,-1.885,,9104
-1609,9607,8611,0.999999,,9201
-1610,9603,8605,-125.8,,9001
-1610,9603,8606,79.9,,9001
-1610,9603,8607,-100.5,,9001
-1611,9603,8605,0.0,,9001
-1611,9603,8606,0.0,,9001
-1611,9603,8607,0.0,,9001
-1612,9606,8605,-116.641,,9001
-1612,9606,8606,-56.931,,9001
-1612,9606,8607,-110.559,,9001
-1612,9606,8608,0.893,,9104
-1612,9606,8609,0.921,,9104
-1612,9606,8610,-0.917,,9104
-1612,9606,8611,-3.52,,9202
-1613,9606,8605,-90.365,,9001
-1613,9606,8606,-101.13,,9001
-1613,9606,8607,-123.384,,9001
-1613,9606,8608,0.333,,9104
-1613,9606,8609,0.077,,9104
-1613,9606,8610,0.894,,9104
-1613,9606,8611,1.994,,9202
-1614,9603,8605,-88.0,,9001
-1614,9603,8606,4.0,,9001
-1614,9603,8607,101.0,,9001
-1615,9603,8605,-726.282,,9001
-1615,9603,8606,703.611,,9001
-1615,9603,8607,-48.999,,9001
-1616,9606,8605,-182.046,,9001
-1616,9606,8606,-225.604,,9001
-1616,9606,8607,168.884,,9001
-1616,9606,8608,-0.616,,9104
-1616,9606,8609,-1.655,,9104
-1616,9606,8610,7.824,,9104
-1616,9606,8611,16.641,,9202
-1617,9606,8605,-191.808,,9001
-1617,9606,8606,-250.512,,9001
-1617,9606,8607,167.861,,9001
-1617,9606,8608,-0.792,,9104
-1617,9606,8609,-1.653,,9104
-1617,9606,8610,8.558,,9104
-1617,9606,8611,20.703,,9202
-1618,9606,8605,577.326,,9001
-1618,9606,8606,90.129,,9001
-1618,9606,8607,463.919,,9001
-1618,9606,8608,5.137,,9104
-1618,9606,8609,1.474,,9104
-1618,9606,8610,5.297,,9104
-1618,9606,8611,2.4232,,9202
-1619,9606,8605,577.3,,9001
-1619,9606,8606,90.1,,9001
-1619,9606,8607,463.9,,9001
-1619,9606,8608,5.137,,9104
-1619,9606,8609,1.474,,9104
-1619,9606,8610,5.297,,9104
-1619,9606,8611,2.42,,9202
-1620,9606,8605,551.7,,9001
-1620,9606,8606,162.9,,9001
-1620,9606,8607,467.9,,9001
-1620,9606,8608,6.04,,9104
-1620,9606,8609,1.96,,9104
-1620,9606,8610,-11.38,,9104
-1620,9606,8611,-4.82,,9202
-1621,9606,8605,551.7,,9001
-1621,9606,8606,162.9,,9001
-1621,9606,8607,467.9,,9001
-1621,9606,8608,6.04,,9104
-1621,9606,8609,1.96,,9104
-1621,9606,8610,-11.38,,9104
-1621,9606,8611,-4.82,,9202
-1622,9606,8605,570.8,,9001
-1622,9606,8606,85.7,,9001
-1622,9606,8607,462.8,,9001
-1622,9606,8608,4.998,,9104
-1622,9606,8609,1.587,,9104
-1622,9606,8610,5.261,,9104
-1622,9606,8611,3.56,,9202
-1623,9606,8605,570.8,,9001
-1623,9606,8606,85.7,,9001
-1623,9606,8607,462.8,,9001
-1623,9606,8608,4.998,,9104
-1623,9606,8609,1.587,,9104
-1623,9606,8610,5.261,,9104
-1623,9606,8611,3.56,,9202
-1624,9606,8605,559.0,,9001
-1624,9606,8606,68.7,,9001
-1624,9606,8607,451.5,,9001
-1624,9606,8608,7.92,,9104
-1624,9606,8609,4.073,,9104
-1624,9606,8610,4.251,,9104
-1624,9606,8611,5.71,,9202
-1625,9606,8605,559.0,,9001
-1625,9606,8606,68.7,,9001
-1625,9606,8607,451.5,,9001
-1625,9606,8608,7.92,,9104
-1625,9606,8609,4.073,,9104
-1625,9606,8610,4.251,,9104
-1625,9606,8611,5.71,,9202
-1626,9606,8605,-81.1,,9001
-1626,9606,8606,-89.4,,9001
-1626,9606,8607,-115.8,,9001
-1626,9606,8608,0.485,,9104
-1626,9606,8609,0.024,,9104
-1626,9606,8610,0.413,,9104
-1626,9606,8611,-0.54,,9202
-1627,9606,8605,-81.1,,9001
-1627,9606,8606,-89.4,,9001
-1627,9606,8607,-115.8,,9001
-1627,9606,8608,0.485,,9104
-1627,9606,8609,0.024,,9104
-1627,9606,8610,0.413,,9104
-1627,9606,8611,-0.54,,9202
-1628,9603,8605,-116.8,,9001
-1628,9603,8606,-106.4,,9001
-1628,9603,8607,-154.4,,9001
-1629,9603,8605,-116.8,,9001
-1629,9603,8606,-106.4,,9001
-1629,9603,8607,-154.4,,9001
-1630,9606,8605,-181.5,,9001
-1630,9606,8606,-90.3,,9001
-1630,9606,8607,-187.2,,9001
-1630,9606,8608,0.144,,9104
-1630,9606,8609,0.492,,9104
-1630,9606,8610,-0.394,,9104
-1630,9606,8611,17.57,,9202
-1631,9606,8605,-181.5,,9001
-1631,9606,8606,-90.3,,9001
-1631,9606,8607,-187.2,,9001
-1631,9606,8608,0.144,,9104
-1631,9606,8609,0.492,,9104
-1631,9606,8610,-0.394,,9104
-1631,9606,8611,17.57,,9202
-1632,9606,8605,-131.0,,9001
-1632,9606,8606,-100.3,,9001
-1632,9606,8607,-163.4,,9001
-1632,9606,8608,-1.244,,9104
-1632,9606,8609,-0.02,,9104
-1632,9606,8610,-1.144,,9104
-1632,9606,8611,9.39,,9202
-1633,9606,8605,-131.0,,9001
-1633,9606,8606,-100.3,,9001
-1633,9606,8607,-163.4,,9001
-1633,9606,8608,-1.244,,9104
-1633,9606,8609,-0.02,,9104
-1633,9606,8610,-1.144,,9104
-1633,9606,8611,9.39,,9202
-1634,9606,8605,-178.4,,9001
-1634,9606,8606,-83.2,,9001
-1634,9606,8607,-221.3,,9001
-1634,9606,8608,0.54,,9104
-1634,9606,8609,-0.532,,9104
-1634,9606,8610,-0.126,,9104
-1634,9606,8611,21.2,,9202
-1635,9606,8605,-178.4,,9001
-1635,9606,8606,-83.2,,9001
-1635,9606,8607,-221.3,,9001
-1635,9606,8608,0.54,,9104
-1635,9606,8609,-0.532,,9104
-1635,9606,8610,-0.126,,9104
-1635,9606,8611,21.2,,9202
-1638,9606,8605,-90.7,,9001
-1638,9606,8606,-106.1,,9001
-1638,9606,8607,-119.2,,9001
-1638,9606,8608,4.09,,9104
-1638,9606,8609,0.218,,9104
-1638,9606,8610,-1.05,,9104
-1638,9606,8611,1.37,,9202
-1639,9606,8605,-90.7,,9001
-1639,9606,8606,-106.1,,9001
-1639,9606,8607,-119.2,,9001
-1639,9606,8608,4.09,,9104
-1639,9606,8609,0.218,,9104
-1639,9606,8610,-1.05,,9104
-1639,9606,8611,1.37,,9202
-1640,9606,8605,482.5,,9001
-1640,9606,8606,-130.6,,9001
-1640,9606,8607,564.6,,9001
-1640,9606,8608,-1.042,,9104
-1640,9606,8609,-0.214,,9104
-1640,9606,8610,-0.631,,9104
-1640,9606,8611,8.15,,9202
-1641,9606,8605,482.5,,9001
-1641,9606,8606,-130.6,,9001
-1641,9606,8607,564.6,,9001
-1641,9606,8608,-1.042,,9104
-1641,9606,8609,-0.214,,9104
-1641,9606,8610,-0.631,,9104
-1641,9606,8611,8.15,,9202
-1642,9606,8605,-193.0,,9001
-1642,9606,8606,13.7,,9001
-1642,9606,8607,-39.3,,9001
-1642,9606,8608,-0.41,,9104
-1642,9606,8609,-2.933,,9104
-1642,9606,8610,2.688,,9104
-1642,9606,8611,0.43,,9202
-1643,9606,8605,-193.0,,9001
-1643,9606,8606,13.7,,9001
-1643,9606,8607,-39.3,,9001
-1643,9606,8608,-0.41,,9104
-1643,9606,8609,-2.933,,9104
-1643,9606,8610,2.688,,9104
-1643,9606,8611,0.43,,9202
-1644,9606,8605,33.4,,9001
-1644,9606,8606,-146.6,,9001
-1644,9606,8607,-76.3,,9001
-1644,9606,8608,-0.359,,9104
-1644,9606,8609,-0.053,,9104
-1644,9606,8610,0.844,,9104
-1644,9606,8611,-0.84,,9202
-1645,9606,8605,33.4,,9001
-1645,9606,8606,-146.6,,9001
-1645,9606,8607,-76.3,,9001
-1645,9606,8608,-0.359,,9104
-1645,9606,8609,-0.053,,9104
-1645,9606,8610,0.844,,9104
-1645,9606,8611,-0.84,,9202
-1646,9603,8605,674.4,,9001
-1646,9603,8606,15.1,,9001
-1646,9603,8607,405.3,,9001
-1647,9603,8605,674.374,,9001
-1647,9603,8606,15.056,,9001
-1647,9603,8607,405.346,,9001
-1648,9603,8605,0.0,,9001
-1648,9603,8606,0.0,,9001
-1648,9603,8607,0.0,,9001
-1649,9603,8605,0.0,,9001
-1649,9603,8606,0.0,,9001
-1649,9603,8607,0.0,,9001
-1650,9603,8605,-84.0,,9001
-1650,9603,8606,-97.0,,9001
-1650,9603,8607,-117.0,,9001
-1651,9603,8605,-168.0,,9001
-1651,9603,8606,-60.0,,9001
-1651,9603,8607,320.0,,9001
-1652,9606,8605,-99.1,,9001
-1652,9606,8606,53.3,,9001
-1652,9606,8607,-112.5,,9001
-1652,9606,8608,0.419,,9104
-1652,9606,8609,-0.83,,9104
-1652,9606,8610,1.885,,9104
-1652,9606,8611,-1.0,,9202
-1653,9606,8605,278.3,,9001
-1653,9606,8606,93.0,,9001
-1653,9606,8607,474.5,,9001
-1653,9606,8608,7.889,,9104
-1653,9606,8609,0.05,,9104
-1653,9606,8610,-6.61,,9104
-1653,9606,8611,6.21,,9202
-1654,9606,8605,278.3,,9001
-1654,9606,8606,93.0,,9001
-1654,9606,8607,474.5,,9001
-1654,9606,8608,7.889,,9104
-1654,9606,8609,0.05,,9104
-1654,9606,8610,-6.61,,9104
-1654,9606,8611,6.21,,9202
-1655,9606,8605,-280.9,,9001
-1655,9606,8606,-89.8,,9001
-1655,9606,8607,130.2,,9001
-1655,9606,8608,-1.721,,9104
-1655,9606,8609,0.355,,9104
-1655,9606,8610,-0.371,,9104
-1655,9606,8611,-5.92,,9202
-1656,9606,8605,-280.9,,9001
-1656,9606,8606,-89.8,,9001
-1656,9606,8607,130.2,,9001
-1656,9606,8608,-1.721,,9104
-1656,9606,8609,0.355,,9104
-1656,9606,8610,-0.371,,9104
-1656,9606,8611,-5.92,,9202
-1657,9606,8605,-238.2,,9001
-1657,9606,8606,85.2,,9001
-1657,9606,8607,29.9,,9001
-1657,9606,8608,0.166,,9104
-1657,9606,8609,0.046,,9104
-1657,9606,8610,1.248,,9104
-1657,9606,8611,2.03,,9202
-1658,9606,8605,-238.2,,9001
-1658,9606,8606,85.2,,9001
-1658,9606,8607,29.9,,9001
-1658,9606,8608,0.166,,9104
-1658,9606,8609,0.046,,9104
-1658,9606,8610,1.248,,9104
-1658,9606,8611,2.03,,9202
-1659,9606,8605,-104.1,,9001
-1659,9606,8606,-49.1,,9001
-1659,9606,8607,-9.9,,9001
-1659,9606,8608,0.971,,9104
-1659,9606,8609,-2.917,,9104
-1659,9606,8610,0.714,,9104
-1659,9606,8611,-11.68,,9202
-1660,9606,8605,-104.1,,9001
-1660,9606,8606,-49.1,,9001
-1660,9606,8607,-9.9,,9001
-1660,9606,8608,0.971,,9104
-1660,9606,8609,-2.917,,9104
-1660,9606,8610,0.714,,9104
-1660,9606,8611,-11.68,,9202
-1661,9606,8605,-168.6,,9001
-1661,9606,8606,-34.0,,9001
-1661,9606,8607,38.6,,9001
-1661,9606,8608,-0.374,,9104
-1661,9606,8609,-0.679,,9104
-1661,9606,8610,-1.379,,9104
-1661,9606,8611,-9.48,,9202
-1662,9606,8605,-168.6,,9001
-1662,9606,8606,-34.0,,9001
-1662,9606,8607,38.6,,9001
-1662,9606,8608,-0.374,,9104
-1662,9606,8609,-0.679,,9104
-1662,9606,8610,-1.379,,9104
-1662,9606,8611,-9.48,,9202
-1663,9606,8605,-50.2,,9001
-1663,9606,8606,-50.4,,9001
-1663,9606,8607,84.8,,9001
-1663,9606,8608,-0.69,,9104
-1663,9606,8609,-2.012,,9104
-1663,9606,8610,0.459,,9104
-1663,9606,8611,-28.08,,9202
-1664,9606,8605,-50.2,,9001
-1664,9606,8606,-50.4,,9001
-1664,9606,8607,84.8,,9001
-1664,9606,8608,-0.69,,9104
-1664,9606,8609,-2.012,,9104
-1664,9606,8610,0.459,,9104
-1664,9606,8611,-28.08,,9202
-1665,9607,8605,-129.193,,9001
-1665,9607,8606,-41.212,,9001
-1665,9607,8607,130.73,,9001
-1665,9607,8608,-0.246,,9104
-1665,9607,8609,-0.374,,9104
-1665,9607,8610,-0.329,,9104
-1665,9607,8611,-2.955,,9202
-1666,9607,8605,-119.353,,9001
-1666,9607,8606,-48.301,,9001
-1666,9607,8607,139.484,,9001
-1666,9607,8608,-0.415,,9104
-1666,9607,8609,-0.26,,9104
-1666,9607,8610,-0.437,,9104
-1666,9607,8611,-0.613,,9202
-1667,9607,8605,-120.271,,9001
-1667,9607,8606,-64.543,,9001
-1667,9607,8607,161.632,,9001
-1667,9607,8608,-0.217,,9104
-1667,9607,8609,0.067,,9104
-1667,9607,8610,0.129,,9104
-1667,9607,8611,2.499,,9202
-1668,9607,8605,-124.133,,9001
-1668,9607,8606,-42.003,,9001
-1668,9607,8607,137.4,,9001
-1668,9607,8608,0.008,,9104
-1668,9607,8609,-0.557,,9104
-1668,9607,8610,-0.178,,9104
-1668,9607,8611,-1.854,,9202
-1669,9607,8605,-117.763,,9001
-1669,9607,8606,-51.51,,9001
-1669,9607,8607,139.061,,9001
-1669,9607,8608,-0.292,,9104
-1669,9607,8609,-0.443,,9104
-1669,9607,8610,-0.277,,9104
-1669,9607,8611,-0.191,,9202
-1670,9615,8656,,nzgd2kgrid0005.gsb,
-1671,9603,8605,0.0,,9001
-1671,9603,8606,0.0,,9001
-1671,9603,8607,0.0,,9001
-1672,9607,8605,565.04,,9001
-1672,9607,8606,49.91,,9001
-1672,9607,8607,465.84,,9001
-1672,9607,8608,1.9848,,9109
-1672,9607,8609,-1.7439,,9109
-1672,9607,8610,9.0587,,9109
-1672,9607,8611,4.0772,,9202
-1673,9607,8605,582.0,,9001
-1673,9607,8606,105.0,,9001
-1673,9607,8607,414.0,,9001
-1673,9607,8608,-1.04,,9104
-1673,9607,8609,-0.35,,9104
-1673,9607,8610,3.08,,9104
-1673,9607,8611,8.3,,9202
-1674,9607,8605,24.0,,9001
-1674,9607,8606,-123.0,,9001
-1674,9607,8607,-94.0,,9001
-1674,9607,8608,-0.02,,9104
-1674,9607,8609,0.25,,9104
-1674,9607,8610,0.13,,9104
-1674,9607,8611,1.1,,9202
-1675,9607,8605,24.0,,9001
-1675,9607,8606,-123.0,,9001
-1675,9607,8607,-94.0,,9001
-1675,9607,8608,-0.02,,9104
-1675,9607,8609,0.25,,9104
-1675,9607,8610,0.13,,9104
-1675,9607,8611,1.1,,9202
-1676,9603,8605,674.374,,9001
-1676,9603,8606,15.056,,9001
-1676,9603,8607,405.346,,9001
-1677,9607,8605,56.0,,9001
-1677,9607,8606,75.77,,9001
-1677,9607,8607,15.31,,9001
-1677,9607,8608,-0.37,,9104
-1677,9607,8609,-0.2,,9104
-1677,9607,8610,-0.21,,9104
-1677,9607,8611,-1.01,,9202
-1678,9603,8605,0.0,,9001
-1678,9603,8606,0.0,,9001
-1678,9603,8607,0.0,,9001
-1679,9607,8605,-40.595,,9001
-1679,9607,8606,-18.55,,9001
-1679,9607,8607,-69.339,,9001
-1679,9607,8608,-2.508,,9104
-1679,9607,8609,-1.832,,9104
-1679,9607,8610,2.611,,9104
-1679,9607,8611,-4.299,,9202
-1680,9607,8605,419.3836,,9001
-1680,9607,8606,99.3335,,9001
-1680,9607,8607,591.3451,,9001
-1680,9607,8608,-0.850389,,9104
-1680,9607,8609,-1.817277,,9104
-1680,9607,8610,7.862238,,9104
-1680,9607,8611,-0.99496,,9202
-1681,9633,8664,,ostn97.txt,
-1682,9603,8605,-76.0,,9001
-1682,9603,8606,-138.0,,9001
-1682,9603,8607,67.0,,9001
-1683,9607,8605,-115.064,,9001
-1683,9607,8606,-87.39,,9001
-1683,9607,8607,-101.716,,9001
-1683,9607,8608,0.058,,9104
-1683,9607,8609,-4.001,,9104
-1683,9607,8610,2.062,,9104
-1683,9607,8611,9.366,,9202
-1684,9607,8605,-82.875,,9001
-1684,9607,8606,-57.097,,9001
-1684,9607,8607,-156.768,,9001
-1684,9607,8608,2.158,,9104
-1684,9607,8609,-1.524,,9104
-1684,9607,8610,0.982,,9104
-1684,9607,8611,-0.359,,9202
-1685,9607,8605,-138.527,,9001
-1685,9607,8606,-91.999,,9001
-1685,9607,8607,-114.591,,9001
-1685,9607,8608,0.14,,9104
-1685,9607,8609,-3.363,,9104
-1685,9607,8610,2.217,,9104
-1685,9607,8611,11.748,,9202
-1686,9607,8605,-73.472,,9001
-1686,9607,8606,-51.66,,9001
-1686,9607,8607,-112.482,,9001
-1686,9607,8608,-0.953,,9104
-1686,9607,8609,-4.6,,9104
-1686,9607,8610,2.368,,9104
-1686,9607,8611,0.586,,9202
-1687,9607,8605,219.315,,9001
-1687,9607,8606,168.975,,9001
-1687,9607,8607,-166.145,,9001
-1687,9607,8608,-0.198,,9104
-1687,9607,8609,-5.926,,9104
-1687,9607,8610,2.356,,9104
-1687,9607,8611,-57.104,,9202
-1688,9615,8656,,NB7783v2.gsb,
-1689,9615,8656,,PE7783V2.gsb,
-1690,9615,8656,,May76v20.gsb,
-1691,9615,8656,,CGQ77-98.gsb,
-1692,9615,8656,,QUE27-98.gsb,
-1693,9615,8656,,NTv2_0.gsb,
-1694,9613,8657,,wshpgn.las,
-1694,9613,8658,,wshpgn.los,
-1695,9613,8657,,eshpgn.las,
-1695,9613,8658,,eshpgn.los,
-1696,9615,8656,,NAD83-98.gsb,
-1697,9615,8656,,SK83-98.gsb,
-1698,9613,8657,,stgeorge.las,
-1698,9613,8658,,stgeorge.los,
-1699,9613,8657,,stlrnc.las,
-1699,9613,8658,,stlrnc.los,
-1700,9613,8657,,stpaul.las,
-1700,9613,8658,,stpaul.los,
-1701,9607,8605,59.47,,9001
-1701,9607,8606,-5.04,,9001
-1701,9607,8607,187.44,,9001
-1701,9607,8608,-0.47,,9104
-1701,9607,8609,0.1,,9104
-1701,9607,8610,-1.024,,9104
-1701,9607,8611,-4.5993,,9202
-1702,9615,8656,,AB_CSRS.DAC,
-1703,9615,8656,,SK27-98.gsb,
-1704,9613,8657,,arhpgn.las,
-1704,9613,8658,,arhpgn.los,
-1705,9613,8657,,iahpgn.las,
-1705,9613,8658,,iahpgn.los,
-1706,9613,8657,,mnhpgn.las,
-1706,9613,8658,,mnhpgn.los,
-1707,9613,8657,,mohpgn.las,
-1707,9613,8658,,mohpgn.los,
-1708,9613,8657,,arhpgn.las,
-1708,9613,8658,,arhpgn.los,
-1709,9613,8657,,iahpgn.las,
-1709,9613,8658,,iahpgn.los,
-1710,9613,8657,,mnhpgn.las,
-1710,9613,8658,,mnhpgn.los,
-1711,9613,8657,,mohpgn.las,
-1711,9613,8658,,mohpgn.los,
-1712,9613,8657,,cohpgn.las,
-1712,9613,8658,,cohpgn.los,
-1713,9613,8657,,gahpgn.las,
-1713,9613,8658,,gahpgn.los,
-1714,9613,8657,,flhpgn.las,
-1714,9613,8658,,flhpgn.los,
-1715,9613,8657,,emhpgn.las,
-1715,9613,8658,,emhpgn.los,
-1716,9613,8657,,wmhpgn.las,
-1716,9613,8658,,wmhpgn.los,
-1717,9613,8657,,alhpgn.las,
-1717,9613,8658,,alhpgn.los,
-1718,9613,8657,,kyhpgn.las,
-1718,9613,8658,,kyhpgn.los,
-1719,9613,8657,,lahpgn.las,
-1719,9613,8658,,lahpgn.los,
-1720,9613,8657,,mdhpgn.las,
-1720,9613,8658,,mdhpgn.los,
-1721,9613,8657,,mehpgn.las,
-1721,9613,8658,,mehpgn.los,
-1722,9613,8657,,mihpgn.las,
-1722,9613,8658,,mihpgn.los,
-1723,9613,8657,,mshpgn.las,
-1723,9613,8658,,mshpgn.los,
-1724,9613,8657,,nbhpgn.las,
-1724,9613,8658,,nbhpgn.los,
-1725,9613,8657,,nehpgn.las,
-1725,9613,8658,,nehpgn.los,
-1726,9613,8657,,nmhpgn.las,
-1726,9613,8658,,nmhpgn.los,
-1727,9613,8657,,nyhpgn.las,
-1727,9613,8658,,nyhpgn.los,
-1728,9613,8657,,azhpgn.las,
-1728,9613,8658,,azhpgn.los,
-1729,9613,8657,,ndhpgn.las,
-1729,9613,8658,,ndhpgn.los,
-1730,9613,8657,,okhpgn.las,
-1730,9613,8658,,okhpgn.los,
-1731,9613,8657,,pvhpgn.las,
-1731,9613,8658,,pvhpgn.los,
-1732,9613,8657,,sdhpgn.las,
-1732,9613,8658,,sdhpgn.los,
-1733,9613,8657,,tnhpgn.las,
-1733,9613,8658,,tnhpgn.los,
-1734,9613,8657,,ethpgn.las,
-1734,9613,8658,,ethpgn.los,
-1735,9613,8657,,wthpgn.las,
-1735,9613,8658,,wthpgn.los,
-1736,9613,8657,,vahpgn.las,
-1736,9613,8658,,vahpgn.los,
-1737,9613,8657,,wohpgn.las,
-1737,9613,8658,,wohpgn.los,
-1738,9613,8657,,wihpgn.las,
-1738,9613,8658,,wihpgn.los,
-1739,9613,8657,,cnhpgn.las,
-1739,9613,8658,,cnhpgn.los,
-1740,9613,8657,,wyhpgn.las,
-1740,9613,8658,,wyhpgn.los,
-1741,9613,8657,,hihpgn.las,
-1741,9613,8658,,hihpgn.los,
-1742,9613,8657,,inhpgn.las,
-1742,9613,8658,,inhpgn.los,
-1743,9613,8657,,kshpgn.las,
-1743,9613,8658,,kshpgn.los,
-1744,9613,8657,,nvhpgn.las,
-1744,9613,8658,,nvhpgn.los,
-1745,9613,8657,,ohhpgn.las,
-1745,9613,8658,,ohhpgn.los,
-1746,9613,8657,,uthpgn.las,
-1746,9613,8658,,uthpgn.los,
-1747,9613,8657,,wvhpgn.las,
-1747,9613,8658,,wvhpgn.los,
-1748,9613,8657,,ilhpgn.las,
-1748,9613,8658,,ilhpgn.los,
-1749,9613,8657,,njhpgn.las,
-1749,9613,8658,,njhpgn.los,
-1750,9613,8657,,cshpgn.las,
-1750,9613,8658,,cshpgn.los,
-1751,9607,8605,565.04,,9001
-1751,9607,8606,49.91,,9001
-1751,9607,8607,465.84,,9001
-1751,9607,8608,1.9848,,9109
-1751,9607,8609,-1.7439,,9109
-1751,9607,8610,9.0587,,9109
-1751,9607,8611,4.0772,,9202
-1752,9615,8656,,AB_CSRS.DAC,
-1753,9607,8605,660.077,,9001
-1753,9607,8606,13.551,,9001
-1753,9607,8607,369.344,,9001
-1753,9607,8608,2.484,,9113
-1753,9607,8609,1.783,,9113
-1753,9607,8610,2.939,,9113
-1753,9607,8611,5.66,,9202
-1754,9606,8605,-111.92,,9001
-1754,9606,8606,-87.85,,9001
-1754,9606,8607,114.5,,9001
-1754,9606,8608,1.875,,9104
-1754,9606,8609,0.202,,9104
-1754,9606,8610,0.219,,9104
-1754,9606,8611,0.032,,9202
-1755,9601,8602,-74.04513,,9110
-1756,9601,8602,-9.0754862,,9110
-1757,9601,8602,-17.4,,9110
-1758,9601,8602,106.482779,,9110
-1759,9601,8602,106.482779,,9110
-1760,9601,8602,18.03298,,9110
-1761,9601,8602,23.4258815,,9110
-1762,9601,8602,10.43225,,9110
-1763,9601,8602,2.5969213,,9105
-1764,9601,8602,2.201395,,9110
-1765,9601,8602,7.26225,,9110
-1766,9603,8605,674.4,,9001
-1766,9603,8606,15.1,,9001
-1766,9603,8607,405.3,,9001
-1767,9603,8605,0.0,,9001
-1767,9603,8606,0.0,,9001
-1767,9603,8607,0.0,,9001
-1768,9603,8605,0.0,,9001
-1768,9603,8606,0.0,,9001
-1768,9603,8607,0.0,,9001
-1769,9636,8605,-270.933,,9001
-1769,9636,8606,115.599,,9001
-1769,9636,8607,-360.226,,9001
-1769,9636,8608,-5.266,,9104
-1769,9636,8609,-1.238,,9104
-1769,9636,8610,2.381,,9104
-1769,9636,8611,-5.109,,9202
-1769,9636,8617,2464351.59,,9001
-1769,9636,8618,-5783466.61,,9001
-1769,9636,8667,974809.81,,9001
-1770,9636,8605,-270.933,,9001
-1770,9636,8606,115.599,,9001
-1770,9636,8607,-360.226,,9001
-1770,9636,8608,-5.266,,9104
-1770,9636,8609,-1.238,,9104
-1770,9636,8610,2.381,,9104
-1770,9636,8611,-5.109,,9202
-1770,9636,8617,2464351.59,,9001
-1770,9636,8618,-5783466.61,,9001
-1770,9636,8667,974809.81,,9001
-1771,9636,8605,-270.933,,9001
-1771,9636,8606,115.599,,9001
-1771,9636,8607,-360.226,,9001
-1771,9636,8608,-5.266,,9104
-1771,9636,8609,-1.238,,9104
-1771,9636,8610,2.381,,9104
-1771,9636,8611,-5.109,,9202
-1771,9636,8617,2464351.59,,9001
-1771,9636,8618,-5783466.61,,9001
-1771,9636,8667,974809.81,,9001
-1772,9636,8605,-270.933,,9001
-1772,9636,8606,115.599,,9001
-1772,9636,8607,-360.226,,9001
-1772,9636,8608,-5.266,,9104
-1772,9636,8609,-1.238,,9104
-1772,9636,8610,2.381,,9104
-1772,9636,8611,-5.109,,9202
-1772,9636,8617,2464351.59,,9001
-1772,9636,8618,-5783466.61,,9001
-1772,9636,8667,974809.81,,9001
-1773,9603,8605,0.0,,9001
-1773,9603,8606,0.0,,9001
-1773,9603,8607,0.0,,9001
-1774,9603,8605,0.0,,9001
-1774,9603,8606,0.0,,9001
-1774,9603,8607,0.0,,9001
-1775,9606,8605,24.9,,9001
-1775,9606,8606,-126.4,,9001
-1775,9606,8607,-93.2,,9001
-1775,9606,8608,-0.063,,9104
-1775,9606,8609,-0.247,,9104
-1775,9606,8610,-0.041,,9104
-1775,9606,8611,1.01,,9202
-1776,9606,8605,598.1,,9001
-1776,9606,8606,73.7,,9001
-1776,9606,8607,418.2,,9001
-1776,9606,8608,0.202,,9104
-1776,9606,8609,0.045,,9104
-1776,9606,8610,-2.455,,9104
-1776,9606,8611,6.7,,9202
-1777,9606,8605,598.1,,9001
-1777,9606,8606,73.7,,9001
-1777,9606,8607,418.2,,9001
-1777,9606,8608,0.202,,9104
-1777,9606,8609,0.045,,9104
-1777,9606,8610,-2.455,,9104
-1777,9606,8611,6.7,,9202
-1778,9606,8605,597.1,,9001
-1778,9606,8606,71.4,,9001
-1778,9606,8607,412.1,,9001
-1778,9606,8608,0.894,,9104
-1778,9606,8609,0.068,,9104
-1778,9606,8610,-1.563,,9104
-1778,9606,8611,7.58,,9202
-1779,9606,8605,584.8,,9001
-1779,9606,8606,67.0,,9001
-1779,9606,8607,400.3,,9001
-1779,9606,8608,0.105,,9104
-1779,9606,8609,0.013,,9104
-1779,9606,8610,-2.378,,9104
-1779,9606,8611,10.29,,9202
-1780,9606,8605,590.5,,9001
-1780,9606,8606,69.5,,9001
-1780,9606,8607,411.6,,9001
-1780,9606,8608,-0.796,,9104
-1780,9606,8609,-0.052,,9104
-1780,9606,8610,-3.601,,9104
-1780,9606,8611,8.3,,9202
-1781,9606,8605,599.4,,9001
-1781,9606,8606,72.4,,9001
-1781,9606,8607,419.2,,9001
-1781,9606,8608,-0.062,,9104
-1781,9606,8609,-0.022,,9104
-1781,9606,8610,-2.723,,9104
-1781,9606,8611,6.46,,9202
-1782,9606,8605,612.4,,9001
-1782,9606,8606,77.0,,9001
-1782,9606,8607,440.2,,9001
-1782,9606,8608,-0.054,,9104
-1782,9606,8609,0.057,,9104
-1782,9606,8610,-2.797,,9104
-1782,9606,8611,2.55,,9202
-1783,9606,8605,-84.1,,9001
-1783,9606,8606,-101.8,,9001
-1783,9606,8607,-129.7,,9001
-1783,9606,8608,0.0,,9104
-1783,9606,8609,0.0,,9104
-1783,9606,8610,0.468,,9104
-1783,9606,8611,1.05,,9202
-1784,9606,8605,-84.1,,9001
-1784,9606,8606,-101.8,,9001
-1784,9606,8607,-129.7,,9001
-1784,9606,8608,0.0,,9104
-1784,9606,8609,0.0,,9104
-1784,9606,8610,0.468,,9104
-1784,9606,8611,1.05,,9202
-1785,9606,8605,426.9,,9001
-1785,9606,8606,142.6,,9001
-1785,9606,8607,460.1,,9001
-1785,9606,8608,4.91,,9104
-1785,9606,8609,4.49,,9104
-1785,9606,8610,-12.42,,9104
-1785,9606,8611,17.1,,9202
-1786,9606,8605,426.9,,9001
-1786,9606,8606,142.6,,9001
-1786,9606,8607,460.1,,9001
-1786,9606,8608,4.91,,9104
-1786,9606,8609,4.49,,9104
-1786,9606,8610,-12.42,,9104
-1786,9606,8611,17.1,,9202
-1787,9607,8605,414.1,,9001
-1787,9607,8606,41.3,,9001
-1787,9607,8607,603.1,,9001
-1787,9607,8608,-0.855,,9104
-1787,9607,8609,2.141,,9104
-1787,9607,8610,-7.023,,9104
-1787,9607,8611,0.0,,9202
-1788,9607,8605,414.1,,9001
-1788,9607,8606,41.3,,9001
-1788,9607,8607,603.1,,9001
-1788,9607,8608,-0.855,,9104
-1788,9607,8609,2.141,,9104
-1788,9607,8610,-7.023,,9104
-1788,9607,8611,0.0,,9202
-1789,9603,8605,103.25,,9001
-1789,9603,8606,-100.4,,9001
-1789,9603,8607,-307.19,,9001
-1790,9606,8605,-282.1,,9001
-1790,9606,8606,-72.2,,9001
-1790,9606,8607,120.0,,9001
-1790,9606,8608,-1.592,,9104
-1790,9606,8609,0.145,,9104
-1790,9606,8610,-0.89,,9104
-1790,9606,8611,-4.46,,9202
-1791,9606,8605,-282.1,,9001
-1791,9606,8606,-72.2,,9001
-1791,9606,8607,120.0,,9001
-1791,9606,8608,-1.592,,9104
-1791,9606,8609,0.145,,9104
-1791,9606,8610,-0.89,,9104
-1791,9606,8611,-4.46,,9202
-1792,9606,8605,-231.0,,9001
-1792,9606,8606,102.6,,9001
-1792,9606,8607,29.8,,9001
-1792,9606,8608,0.615,,9104
-1792,9606,8609,-0.198,,9104
-1792,9606,8610,0.881,,9104
-1792,9606,8611,1.79,,9202
-1793,9606,8605,-231.0,,9001
-1793,9606,8606,102.6,,9001
-1793,9606,8607,29.8,,9001
-1793,9606,8608,0.615,,9104
-1793,9606,8609,-0.198,,9104
-1793,9606,8610,0.881,,9104
-1793,9606,8611,1.79,,9202
-1794,9603,8605,695.5,,9001
-1794,9603,8606,-216.6,,9001
-1794,9603,8607,491.1,,9001
-1795,9636,8605,408.0895,,9001
-1795,9636,8606,-288.9616,,9001
-1795,9636,8607,791.5498,,9001
-1795,9636,8608,-4.078662,,9104
-1795,9636,8609,0.022669,,9104
-1795,9636,8610,9.825424,,9104
-1795,9636,8611,94.060626,,9202
-1795,9636,8617,4444943.0248,,9001
-1795,9636,8618,1518098.4827,,9001
-1795,9636,8667,4302370.0765,,9001
-1796,9603,8605,-70.9,,9001
-1796,9603,8606,-151.8,,9001
-1796,9603,8607,-41.4,,9001
-1797,9603,8605,164.0,,9001
-1797,9603,8606,138.0,,9001
-1797,9603,8607,-189.0,,9001
-1798,9606,8605,163.511,,9001
-1798,9606,8606,127.533,,9001
-1798,9606,8607,-159.789,,9001
-1798,9606,8608,0.0,,9104
-1798,9606,8609,0.0,,9104
-1798,9606,8610,0.814,,9104
-1798,9606,8611,-0.6,,9202
-1799,9606,8605,105.0,,9001
-1799,9606,8606,326.0,,9001
-1799,9606,8607,-102.5,,9001
-1799,9606,8608,0.0,,9104
-1799,9606,8609,0.0,,9104
-1799,9606,8610,0.814,,9104
-1799,9606,8611,-0.6,,9202
-1800,9606,8605,-45.0,,9001
-1800,9606,8606,417.0,,9001
-1800,9606,8607,-3.5,,9001
-1800,9606,8608,0.0,,9104
-1800,9606,8609,0.0,,9104
-1800,9606,8610,0.814,,9104
-1800,9606,8611,-0.6,,9202
-1801,9603,8605,-145.0,,9001
-1801,9603,8606,52.7,,9001
-1801,9603,8607,-291.6,,9001
-1802,9606,8605,-178.3,,9001
-1802,9606,8606,-316.7,,9001
-1802,9606,8607,-131.5,,9001
-1802,9606,8608,5.278,,9104
-1802,9606,8609,6.077,,9104
-1802,9606,8610,10.979,,9104
-1802,9606,8611,19.166,,9202
-1803,9615,8656,,A66 National (13.09.01).gsb,
-1804,9615,8656,,National 84 (02.07.01).gsb,
-1805,9603,8605,-56.1,,9001
-1805,9603,8606,-167.8,,9001
-1805,9603,8607,13.1,,9001
-1806,9603,8605,-104.4,,9001
-1806,9603,8606,-136.6,,9001
-1806,9603,8607,201.2,,9001
-1807,9606,8605,27.0,,9001
-1807,9606,8606,-135.0,,9001
-1807,9606,8607,-84.5,,9001
-1807,9606,8608,0.0,,9104
-1807,9606,8609,0.0,,9104
-1807,9606,8610,0.554,,9104
-1807,9606,8611,0.2263,,9202
-1808,9606,8605,686.1,,9001
-1808,9606,8606,-123.5,,9001
-1808,9606,8607,-574.4,,9001
-1808,9606,8608,8.045,,9104
-1808,9606,8609,-23.366,,9104
-1808,9606,8610,10.791,,9104
-1808,9606,8611,-2.926,,9202
-1809,9606,8605,926.4,,9001
-1809,9606,8606,-715.9,,9001
-1809,9606,8607,-186.4,,9001
-1809,9606,8608,-10.364,,9104
-1809,9606,8609,-20.78,,9104
-1809,9606,8610,26.452,,9104
-1809,9606,8611,-7.224,,9202
-1810,9606,8605,-84.0,,9001
-1810,9606,8606,-103.0,,9001
-1810,9606,8607,-122.5,,9001
-1810,9606,8608,0.0,,9104
-1810,9606,8609,0.0,,9104
-1810,9606,8610,0.554,,9104
-1810,9606,8611,0.2263,,9202
-1811,9603,8605,-291.87,,9001
-1811,9603,8606,106.37,,9001
-1811,9603,8607,-364.52,,9001
-1812,9606,8605,293.0,,9001
-1812,9606,8606,836.0,,9001
-1812,9606,8607,318.0,,9001
-1812,9606,8608,0.5,,9104
-1812,9606,8609,1.6,,9104
-1812,9606,8610,-2.8,,9104
-1812,9606,8611,2.1,,9202
-1813,9603,8605,-378.873,,9001
-1813,9603,8606,676.002,,9001
-1813,9603,8607,-46.255,,9001
-1814,9603,8605,-377.7,,9001
-1814,9603,8606,675.1,,9001
-1814,9603,8607,-52.2,,9001
-1815,9606,8605,-152.9,,9001
-1815,9606,8606,43.8,,9001
-1815,9606,8607,358.3,,9001
-1815,9606,8608,2.714,,9104
-1815,9606,8609,1.386,,9104
-1815,9606,8610,-2.788,,9104
-1815,9606,8611,-6.743,,9202
-1816,9603,8605,-95.7,,9001
-1816,9603,8606,10.2,,9001
-1816,9603,8607,158.9,,9001
-1817,9603,8605,-165.914,,9001
-1817,9603,8606,-70.607,,9001
-1817,9603,8607,305.009,,9001
-1818,9606,8605,-89.0,,9001
-1818,9606,8606,-112.0,,9001
-1818,9606,8607,125.9,,9001
-1818,9606,8608,0.0,,9104
-1818,9606,8609,0.0,,9104
-1818,9606,8610,0.814,,9104
-1818,9606,8611,-0.38,,9202
-1819,9606,8605,-111.92,,9001
-1819,9606,8606,-87.85,,9001
-1819,9606,8607,114.5,,9001
-1819,9606,8608,1.875,,9104
-1819,9606,8609,0.202,,9104
-1819,9606,8610,0.219,,9104
-1819,9606,8611,0.032,,9202
-1820,9603,8605,-93.2,,9001
-1820,9603,8606,-93.31,,9001
-1820,9603,8607,121.156,,9001
-1821,9603,8605,-88.98,,9001
-1821,9603,8606,-83.23,,9001
-1821,9603,8607,113.55,,9001
-1822,9603,8605,-92.726,,9001
-1822,9603,8606,-90.304,,9001
-1822,9603,8607,115.735,,9001
-1823,9603,8605,-93.134,,9001
-1823,9603,8606,-86.647,,9001
-1823,9603,8607,114.196,,9001
-1824,9603,8605,-93.0,,9001
-1824,9603,8606,-94.0,,9001
-1824,9603,8607,124.0,,9001
-1825,9606,8605,-162.619,,9001
-1825,9606,8606,-276.959,,9001
-1825,9606,8607,-161.764,,9001
-1825,9606,8608,0.067753,,9104
-1825,9606,8609,-2.243649,,9104
-1825,9606,8610,-1.158827,,9104
-1825,9606,8611,-1.094246,,9202
-1826,9603,8605,0.0,,9001
-1826,9603,8606,0.0,,9001
-1826,9603,8607,0.0,,9001
-1827,9618,8601,7.92,,9104
-1827,9618,8602,-13.88,,9104
-1827,9618,8604,26.1,,9001
-1828,9603,8605,-37.0,,9001
-1828,9603,8606,157.0,,9001
-1828,9603,8607,85.0,,9001
-1829,9607,8605,56.0,,9001
-1829,9607,8606,-75.77,,9001
-1829,9607,8607,-15.31,,9001
-1829,9607,8608,0.37,,9104
-1829,9607,8609,0.2,,9104
-1829,9607,8610,0.21,,9104
-1829,9607,8611,1.01,,9202
-1830,9607,8605,56.0,,9001
-1830,9607,8606,-75.77,,9001
-1830,9607,8607,-15.31,,9001
-1830,9607,8608,0.37,,9104
-1830,9607,8609,0.2,,9104
-1830,9607,8610,0.21,,9104
-1830,9607,8611,1.01,,9202
-1831,9603,8605,57.01,,9001
-1831,9603,8606,-69.97,,9001
-1831,9603,8607,-9.29,,9001
-1832,9606,8605,2.691,,9001
-1832,9606,8606,-14.757,,9001
-1832,9606,8607,4.724,,9001
-1832,9606,8608,0.0,,9104
-1832,9606,8609,0.0,,9104
-1832,9606,8610,0.774,,9104
-1832,9606,8611,-0.6,,9202
-1833,9607,8605,-1.977,,9001
-1833,9607,8606,-13.06,,9001
-1833,9607,8607,-9.993,,9001
-1833,9607,8608,-0.364,,9104
-1833,9607,8609,-0.254,,9104
-1833,9607,8610,-0.689,,9104
-1833,9607,8611,-1.037,,9202
-1834,9603,8605,-403.0,,9001
-1834,9603,8606,684.0,,9001
-1834,9603,8607,41.0,,9001
-1835,9603,8605,-387.06,,9001
-1835,9603,8606,636.53,,9001
-1835,9603,8607,46.29,,9001
-1836,9603,8605,-403.4,,9001
-1836,9603,8606,681.12,,9001
-1836,9603,8607,46.56,,9001
-1837,9603,8605,-587.8,,9001
-1837,9603,8606,519.75,,9001
-1837,9603,8607,145.76,,9001
-1838,9603,8605,-404.78,,9001
-1838,9603,8606,685.68,,9001
-1838,9603,8607,45.47,,9001
-1839,9603,8605,-101.0,,9001
-1839,9603,8606,-111.0,,9001
-1839,9603,8607,187.0,,9001
-1840,9606,8605,-119.4248,,9001
-1840,9606,8606,-303.65872,,9001
-1840,9606,8607,-11.00061,,9001
-1840,9606,8608,1.164298,,9104
-1840,9606,8609,0.174458,,9104
-1840,9606,8610,1.096259,,9104
-1840,9606,8611,3.657065,,9202
-1841,9615,8656,,NB7783v2.gsb,
-1842,9603,8605,0.0,,9001
-1842,9603,8606,0.0,,9001
-1842,9603,8607,0.0,,9001
-1843,9615,8656,,NAD83-98.gsb,
-1844,9615,8656,,QUE27-98.gsb,
-1845,9615,8656,,CGQ77-98.gsb,
-1846,9615,8656,,PE7783V2.gsb,
-1847,9615,8656,,SK27-98.gsb,
-1848,9615,8656,,SK83-98.gsb,
-1849,9615,8656,,AB_CSRS.DAC,
-1850,9615,8656,,NS778301.gsb,
-1851,9615,8656,,NS778301.gsb,
-1852,9606,8605,-533.4,,9001
-1852,9606,8606,669.2,,9001
-1852,9606,8607,-52.5,,9001
-1852,9606,8608,0.0,,9104
-1852,9606,8609,0.0,,9104
-1852,9606,8610,4.28,,9104
-1852,9606,8611,9.4,,9202
-1854,9603,8605,-239.1,,9001
-1854,9603,8606,-170.02,,9001
-1854,9603,8607,397.5,,9001
-1855,9603,8605,-244.72,,9001
-1855,9603,8606,-162.773,,9001
-1855,9603,8607,400.75,,9001
-1856,9603,8605,-122.89,,9001
-1856,9603,8606,-159.08,,9001
-1856,9603,8607,-168.74,,9001
-1857,9603,8605,-84.78,,9001
-1857,9603,8606,-107.55,,9001
-1857,9603,8607,-137.25,,9001
-1858,9603,8605,-123.92,,9001
-1858,9603,8606,-155.515,,9001
-1858,9603,8607,-157.721,,9001
-1859,9603,8605,-69.06,,9001
-1859,9603,8606,-90.71,,9001
-1859,9603,8607,-142.56,,9001
-1860,9603,8605,-113.997,,9001
-1860,9603,8606,-97.076,,9001
-1860,9603,8607,-152.312,,9001
-1861,9603,8605,-114.5,,9001
-1861,9603,8606,-96.1,,9001
-1861,9603,8607,-151.9,,9001
-1862,9606,8605,-194.513,,9001
-1862,9606,8606,-63.978,,9001
-1862,9606,8607,-25.759,,9001
-1862,9606,8608,-3.4027,,9104
-1862,9606,8609,3.756,,9104
-1862,9606,8610,-3.352,,9104
-1862,9606,8611,-0.9175,,9202
-1863,9607,8605,-389.691,,9001
-1863,9607,8606,64.502,,9001
-1863,9607,8607,210.209,,9001
-1863,9607,8608,-0.086,,9104
-1863,9607,8609,-14.314,,9104
-1863,9607,8610,6.39,,9104
-1863,9607,8611,0.9264,,9202
-5400,9616,8603,-28.0,,9001
-5401,9616,8603,-0.037,,9001
-5402,9616,8603,-26.3,,9001
-5403,9616,8603,-1.7,,9001
-5404,9616,8603,-0.4,,9001
-5405,9616,8603,0.146,,9001
-10101,9807,8801,30.3,,9110
-10101,9807,8802,-85.5,,9110
-10101,9807,8805,0.99996,,9201
-10101,9807,8806,500000.0,,9003
-10101,9807,8807,0.0,,9003
-10102,9807,8801,30.0,,9110
-10102,9807,8802,-87.3,,9110
-10102,9807,8805,0.999933333,,9201
-10102,9807,8806,500000.0,,9003
-10102,9807,8807,0.0,,9003
-10131,9807,8801,30.3,,9110
-10131,9807,8802,-85.5,,9110
-10131,9807,8805,0.99996,,9201
-10131,9807,8806,200000.0,,9001
-10131,9807,8807,0.0,,9001
-10132,9807,8801,30.0,,9110
-10132,9807,8802,-87.3,,9110
-10132,9807,8805,0.999933333,,9201
-10132,9807,8806,600000.0,,9001
-10132,9807,8807,0.0,,9001
-10201,9807,8801,31.0,,9110
-10201,9807,8802,-110.1,,9110
-10201,9807,8805,0.9999,,9201
-10201,9807,8806,500000.0,,9003
-10201,9807,8807,0.0,,9003
-10202,9807,8801,31.0,,9110
-10202,9807,8802,-111.55,,9110
-10202,9807,8805,0.9999,,9201
-10202,9807,8806,500000.0,,9003
-10202,9807,8807,0.0,,9003
-10203,9807,8801,31.0,,9110
-10203,9807,8802,-113.45,,9110
-10203,9807,8805,0.999933333,,9201
-10203,9807,8806,500000.0,,9003
-10203,9807,8807,0.0,,9003
-10231,9807,8801,31.0,,9110
-10231,9807,8802,-110.1,,9110
-10231,9807,8805,0.9999,,9201
-10231,9807,8806,213360.0,,9001
-10231,9807,8807,0.0,,9001
-10232,9807,8801,31.0,,9110
-10232,9807,8802,-111.55,,9110
-10232,9807,8805,0.9999,,9201
-10232,9807,8806,213360.0,,9001
-10232,9807,8807,0.0,,9001
-10233,9807,8801,31.0,,9110
-10233,9807,8802,-113.45,,9110
-10233,9807,8805,0.999933333,,9201
-10233,9807,8806,213360.0,,9001
-10233,9807,8807,0.0,,9001
-10301,9802,8821,34.2,,9110
-10301,9802,8822,-92.0,,9110
-10301,9802,8823,36.14,,9110
-10301,9802,8824,34.56,,9110
-10301,9802,8826,2000000.0,,9003
-10301,9802,8827,0.0,,9003
-10302,9802,8821,32.4,,9110
-10302,9802,8822,-92.0,,9110
-10302,9802,8823,34.46,,9110
-10302,9802,8824,33.18,,9110
-10302,9802,8826,2000000.0,,9003
-10302,9802,8827,0.0,,9003
-10331,9802,8821,34.2,,9110
-10331,9802,8822,-92.0,,9110
-10331,9802,8823,36.14,,9110
-10331,9802,8824,34.56,,9110
-10331,9802,8826,400000.0,,9001
-10331,9802,8827,0.0,,9001
-10332,9802,8821,32.4,,9110
-10332,9802,8822,-92.0,,9110
-10332,9802,8823,34.46,,9110
-10332,9802,8824,33.18,,9110
-10332,9802,8826,400000.0,,9001
-10332,9802,8827,400000.0,,9001
-10401,9802,8821,39.2,,9110
-10401,9802,8822,-122.0,,9110
-10401,9802,8823,41.4,,9110
-10401,9802,8824,40.0,,9110
-10401,9802,8826,2000000.0,,9003
-10401,9802,8827,0.0,,9003
-10402,9802,8821,37.4,,9110
-10402,9802,8822,-122.0,,9110
-10402,9802,8823,39.5,,9110
-10402,9802,8824,38.2,,9110
-10402,9802,8826,2000000.0,,9003
-10402,9802,8827,0.0,,9003
-10403,9802,8821,36.3,,9110
-10403,9802,8822,-120.3,,9110
-10403,9802,8823,38.26,,9110
-10403,9802,8824,37.04,,9110
-10403,9802,8826,2000000.0,,9003
-10403,9802,8827,0.0,,9003
-10404,9802,8821,35.2,,9110
-10404,9802,8822,-119.0,,9110
-10404,9802,8823,37.15,,9110
-10404,9802,8824,36.0,,9110
-10404,9802,8826,2000000.0,,9003
-10404,9802,8827,0.0,,9003
-10405,9802,8821,33.3,,9110
-10405,9802,8822,-118.0,,9110
-10405,9802,8823,35.28,,9110
-10405,9802,8824,34.02,,9110
-10405,9802,8826,2000000.0,,9003
-10405,9802,8827,0.0,,9003
-10406,9802,8821,32.1,,9110
-10406,9802,8822,-116.15,,9110
-10406,9802,8823,33.53,,9110
-10406,9802,8824,32.47,,9110
-10406,9802,8826,2000000.0,,9003
-10406,9802,8827,0.0,,9003
-10407,9802,8821,34.08,,9110
-10407,9802,8822,-118.2,,9110
-10407,9802,8823,34.25,,9110
-10407,9802,8824,33.52,,9110
-10407,9802,8826,4186692.58,,9003
-10407,9802,8827,416926.74,,9003
-10431,9802,8821,39.2,,9110
-10431,9802,8822,-122.0,,9110
-10431,9802,8823,41.4,,9110
-10431,9802,8824,40.0,,9110
-10431,9802,8826,2000000.0,,9001
-10431,9802,8827,500000.0,,9001
-10432,9802,8821,37.4,,9110
-10432,9802,8822,-122.0,,9110
-10432,9802,8823,39.5,,9110
-10432,9802,8824,38.2,,9110
-10432,9802,8826,2000000.0,,9001
-10432,9802,8827,500000.0,,9001
-10433,9802,8821,36.3,,9110
-10433,9802,8822,-120.3,,9110
-10433,9802,8823,38.26,,9110
-10433,9802,8824,37.04,,9110
-10433,9802,8826,2000000.0,,9001
-10433,9802,8827,500000.0,,9001
-10434,9802,8821,35.2,,9110
-10434,9802,8822,-119.0,,9110
-10434,9802,8823,37.15,,9110
-10434,9802,8824,36.0,,9110
-10434,9802,8826,2000000.0,,9001
-10434,9802,8827,500000.0,,9001
-10435,9802,8821,33.3,,9110
-10435,9802,8822,-118.0,,9110
-10435,9802,8823,35.28,,9110
-10435,9802,8824,34.02,,9110
-10435,9802,8826,2000000.0,,9001
-10435,9802,8827,500000.0,,9001
-10436,9802,8821,32.1,,9110
-10436,9802,8822,-116.15,,9110
-10436,9802,8823,33.53,,9110
-10436,9802,8824,32.47,,9110
-10436,9802,8826,2000000.0,,9001
-10436,9802,8827,500000.0,,9001
-10501,9802,8821,39.2,,9110
-10501,9802,8822,-105.3,,9110
-10501,9802,8823,39.43,,9110
-10501,9802,8824,40.47,,9110
-10501,9802,8826,2000000.0,,9003
-10501,9802,8827,0.0,,9003
-10502,9802,8821,37.5,,9110
-10502,9802,8822,-105.3,,9110
-10502,9802,8823,39.45,,9110
-10502,9802,8824,38.27,,9110
-10502,9802,8826,2000000.0,,9003
-10502,9802,8827,0.0,,9003
-10503,9802,8821,36.4,,9110
-10503,9802,8822,-105.3,,9110
-10503,9802,8823,38.26,,9110
-10503,9802,8824,37.14,,9110
-10503,9802,8826,2000000.0,,9003
-10503,9802,8827,0.0,,9003
-10531,9802,8821,39.2,,9110
-10531,9802,8822,-105.3,,9110
-10531,9802,8823,40.47,,9110
-10531,9802,8824,39.43,,9110
-10531,9802,8826,914401.8289,,9001
-10531,9802,8827,304800.6096,,9001
-10532,9802,8821,37.5,,9110
-10532,9802,8822,-105.3,,9110
-10532,9802,8823,39.45,,9110
-10532,9802,8824,38.27,,9110
-10532,9802,8826,914401.8289,,9001
-10532,9802,8827,304800.6096,,9001
-10533,9802,8821,36.4,,9110
-10533,9802,8822,-105.3,,9110
-10533,9802,8823,38.26,,9110
-10533,9802,8824,37.14,,9110
-10533,9802,8826,914401.8289,,9001
-10533,9802,8827,304800.6096,,9001
-10600,9802,8821,40.5,,9110
-10600,9802,8822,-72.45,,9110
-10600,9802,8823,41.52,,9110
-10600,9802,8824,41.12,,9110
-10600,9802,8826,600000.0,,9003
-10600,9802,8827,0.0,,9003
-10630,9802,8821,40.5,,9110
-10630,9802,8822,-72.45,,9110
-10630,9802,8823,41.52,,9110
-10630,9802,8824,41.12,,9110
-10630,9802,8826,304800.6096,,9001
-10630,9802,8827,152400.3048,,9001
-10700,9807,8801,38.0,,9110
-10700,9807,8802,-75.25,,9110
-10700,9807,8805,0.999995,,9201
-10700,9807,8806,500000.0,,9003
-10700,9807,8807,0.0,,9003
-10730,9807,8801,38.0,,9110
-10730,9807,8802,-75.25,,9110
-10730,9807,8805,0.999995,,9201
-10730,9807,8806,200000.0,,9001
-10730,9807,8807,0.0,,9001
-10901,9807,8801,24.2,,9110
-10901,9807,8802,-81.0,,9110
-10901,9807,8805,0.999941177,,9201
-10901,9807,8806,500000.0,,9003
-10901,9807,8807,0.0,,9003
-10902,9807,8801,24.2,,9110
-10902,9807,8802,-82.0,,9110
-10902,9807,8805,0.999941177,,9201
-10902,9807,8806,500000.0,,9003
-10902,9807,8807,0.0,,9003
-10903,9802,8821,29.0,,9110
-10903,9802,8822,-84.3,,9110
-10903,9802,8823,30.45,,9110
-10903,9802,8824,29.35,,9110
-10903,9802,8826,2000000.0,,9003
-10903,9802,8827,0.0,,9003
-10931,9807,8801,24.2,,9110
-10931,9807,8802,-81.0,,9110
-10931,9807,8805,0.999941177,,9201
-10931,9807,8806,200000.0,,9001
-10931,9807,8807,0.0,,9001
-10932,9807,8801,24.2,,9110
-10932,9807,8802,-82.0,,9110
-10932,9807,8805,0.999941177,,9201
-10932,9807,8806,200000.0,,9001
-10932,9807,8807,0.0,,9001
-10933,9802,8821,29.0,,9110
-10933,9802,8822,-84.3,,9110
-10933,9802,8823,30.45,,9110
-10933,9802,8824,29.35,,9110
-10933,9802,8826,600000.0,,9001
-10933,9802,8827,0.0,,9001
-11001,9807,8801,30.0,,9110
-11001,9807,8802,-82.1,,9110
-11001,9807,8805,0.9999,,9201
-11001,9807,8806,500000.0,,9003
-11001,9807,8807,0.0,,9003
-11002,9807,8801,30.0,,9110
-11002,9807,8802,-84.1,,9110
-11002,9807,8805,0.9999,,9201
-11002,9807,8806,500000.0,,9003
-11002,9807,8807,0.0,,9003
-11031,9807,8801,30.0,,9110
-11031,9807,8802,-82.1,,9110
-11031,9807,8805,0.9999,,9201
-11031,9807,8806,200000.0,,9001
-11031,9807,8807,0.0,,9001
-11032,9807,8801,30.0,,9110
-11032,9807,8802,-84.1,,9110
-11032,9807,8805,0.9999,,9201
-11032,9807,8806,700000.0,,9001
-11032,9807,8807,0.0,,9001
-11101,9807,8801,41.4,,9110
-11101,9807,8802,-112.1,,9110
-11101,9807,8805,0.999947368,,9201
-11101,9807,8806,500000.0,,9003
-11101,9807,8807,0.0,,9003
-11102,9807,8801,41.4,,9110
-11102,9807,8802,-114.0,,9110
-11102,9807,8805,0.999947368,,9201
-11102,9807,8806,500000.0,,9003
-11102,9807,8807,0.0,,9003
-11103,9807,8801,41.4,,9110
-11103,9807,8802,-115.45,,9110
-11103,9807,8805,0.999933333,,9201
-11103,9807,8806,500000.0,,9003
-11103,9807,8807,0.0,,9003
-11131,9807,8801,41.4,,9110
-11131,9807,8802,-112.1,,9110
-11131,9807,8805,0.999947368,,9201
-11131,9807,8806,200000.0,,9001
-11131,9807,8807,0.0,,9001
-11132,9807,8801,41.4,,9110
-11132,9807,8802,-114.0,,9110
-11132,9807,8805,0.999947368,,9201
-11132,9807,8806,500000.0,,9001
-11132,9807,8807,0.0,,9001
-11133,9807,8801,41.4,,9110
-11133,9807,8802,-115.45,,9110
-11133,9807,8805,0.999933333,,9201
-11133,9807,8806,800000.0,,9001
-11133,9807,8807,0.0,,9001
-11201,9807,8801,36.4,,9110
-11201,9807,8802,-88.2,,9110
-11201,9807,8805,0.999975,,9201
-11201,9807,8806,500000.0,,9003
-11201,9807,8807,0.0,,9003
-11202,9807,8801,36.4,,9110
-11202,9807,8802,-90.1,,9110
-11202,9807,8805,0.999941177,,9201
-11202,9807,8806,500000.0,,9003
-11202,9807,8807,0.0,,9003
-11231,9807,8801,36.4,,9110
-11231,9807,8802,-88.2,,9110
-11231,9807,8805,0.999975,,9201
-11231,9807,8806,300000.0,,9001
-11231,9807,8807,0.0,,9001
-11232,9807,8801,36.4,,9110
-11232,9807,8802,-90.1,,9110
-11232,9807,8805,0.999941177,,9201
-11232,9807,8806,700000.0,,9001
-11232,9807,8807,0.0,,9001
-11301,9807,8801,37.3,,9110
-11301,9807,8802,-85.4,,9110
-11301,9807,8805,0.999966667,,9201
-11301,9807,8806,500000.0,,9003
-11301,9807,8807,0.0,,9003
-11302,9807,8801,37.3,,9110
-11302,9807,8802,-87.05,,9110
-11302,9807,8805,0.999966667,,9201
-11302,9807,8806,500000.0,,9003
-11302,9807,8807,0.0,,9003
-11331,9807,8801,37.3,,9110
-11331,9807,8802,-85.4,,9110
-11331,9807,8805,0.999966667,,9201
-11331,9807,8806,100000.0,,9001
-11331,9807,8807,250000.0,,9001
-11332,9807,8801,37.3,,9110
-11332,9807,8802,-87.05,,9110
-11332,9807,8805,0.999966667,,9201
-11332,9807,8806,900000.0,,9001
-11332,9807,8807,250000.0,,9001
-11401,9802,8821,41.3,,9110
-11401,9802,8822,-93.3,,9110
-11401,9802,8823,43.16,,9110
-11401,9802,8824,42.04,,9110
-11401,9802,8826,2000000.0,,9003
-11401,9802,8827,0.0,,9003
-11402,9802,8821,40.0,,9110
-11402,9802,8822,-93.3,,9110
-11402,9802,8823,41.47,,9110
-11402,9802,8824,40.37,,9110
-11402,9802,8826,2000000.0,,9003
-11402,9802,8827,0.0,,9003
-11431,9802,8821,41.3,,9110
-11431,9802,8822,-93.3,,9110
-11431,9802,8823,43.16,,9110
-11431,9802,8824,42.04,,9110
-11431,9802,8826,1500000.0,,9001
-11431,9802,8827,1000000.0,,9001
-11432,9802,8821,40.0,,9110
-11432,9802,8822,-93.3,,9110
-11432,9802,8823,41.47,,9110
-11432,9802,8824,40.37,,9110
-11432,9802,8826,500000.0,,9001
-11432,9802,8827,0.0,,9001
-11501,9802,8821,38.2,,9110
-11501,9802,8822,-98.0,,9110
-11501,9802,8823,39.47,,9110
-11501,9802,8824,38.43,,9110
-11501,9802,8826,2000000.0,,9003
-11501,9802,8827,0.0,,9003
-11502,9802,8821,36.4,,9110
-11502,9802,8822,-98.3,,9110
-11502,9802,8823,38.34,,9110
-11502,9802,8824,37.16,,9110
-11502,9802,8826,2000000.0,,9003
-11502,9802,8827,0.0,,9003
-11531,9802,8821,38.2,,9110
-11531,9802,8822,-98.0,,9110
-11531,9802,8823,39.47,,9110
-11531,9802,8824,38.43,,9110
-11531,9802,8826,400000.0,,9001
-11531,9802,8827,0.0,,9001
-11532,9802,8821,36.4,,9110
-11532,9802,8822,-98.3,,9110
-11532,9802,8823,38.34,,9110
-11532,9802,8824,37.16,,9110
-11532,9802,8826,400000.0,,9001
-11532,9802,8827,400000.0,,9001
-11601,9802,8821,37.3,,9110
-11601,9802,8822,-84.15,,9110
-11601,9802,8823,37.58,,9110
-11601,9802,8824,38.58,,9110
-11601,9802,8826,2000000.0,,9003
-11601,9802,8827,0.0,,9003
-11602,9802,8821,36.2,,9110
-11602,9802,8822,-85.45,,9110
-11602,9802,8823,36.44,,9110
-11602,9802,8824,37.56,,9110
-11602,9802,8826,2000000.0,,9003
-11602,9802,8827,0.0,,9003
-11631,9802,8821,37.3,,9110
-11631,9802,8822,-84.15,,9110
-11631,9802,8823,37.58,,9110
-11631,9802,8824,37.58,,9110
-11631,9802,8826,500000.0,,9001
-11631,9802,8827,0.0,,9001
-11632,9802,8821,36.2,,9110
-11632,9802,8822,-85.45,,9110
-11632,9802,8823,37.56,,9110
-11632,9802,8824,36.44,,9110
-11632,9802,8826,500000.0,,9001
-11632,9802,8827,500000.0,,9001
-11701,9802,8821,30.4,,9110
-11701,9802,8822,-92.3,,9110
-11701,9802,8823,31.1,,9110
-11701,9802,8824,32.4,,9110
-11701,9802,8826,2000000.0,,9003
-11701,9802,8827,0.0,,9003
-11702,9802,8821,28.4,,9110
-11702,9802,8822,-91.2,,9110
-11702,9802,8823,29.18,,9110
-11702,9802,8824,30.42,,9110
-11702,9802,8826,2000000.0,,9003
-11702,9802,8827,0.0,,9003
-11731,9802,8821,30.3,,9110
-11731,9802,8822,-92.3,,9110
-11731,9802,8823,32.4,,9110
-11731,9802,8824,31.1,,9110
-11731,9802,8826,1000000.0,,9001
-11731,9802,8827,0.0,,9001
-11732,9802,8821,28.3,,9110
-11732,9802,8822,-91.2,,9110
-11732,9802,8823,30.42,,9110
-11732,9802,8824,29.18,,9110
-11732,9802,8826,1000000.0,,9001
-11732,9802,8827,0.0,,9001
-11801,9807,8801,43.5,,9110
-11801,9807,8802,-68.3,,9110
-11801,9807,8805,0.9999,,9201
-11801,9807,8806,500000.0,,9003
-11801,9807,8807,0.0,,9003
-11802,9807,8801,42.5,,9110
-11802,9807,8802,-70.1,,9110
-11802,9807,8805,0.999966667,,9201
-11802,9807,8806,500000.0,,9003
-11802,9807,8807,0.0,,9003
-11831,9807,8801,43.4,,9110
-11831,9807,8802,-68.3,,9110
-11831,9807,8805,0.9999,,9201
-11831,9807,8806,300000.0,,9001
-11831,9807,8807,0.0,,9001
-11832,9807,8801,42.5,,9110
-11832,9807,8802,-70.1,,9110
-11832,9807,8805,0.999966667,,9201
-11832,9807,8806,900000.0,,9001
-11832,9807,8807,0.0,,9001
-11900,9802,8821,37.5,,9110
-11900,9802,8822,-77.0,,9110
-11900,9802,8823,38.18,,9110
-11900,9802,8824,39.27,,9110
-11900,9802,8826,800000.0,,9003
-11900,9802,8827,0.0,,9003
-11930,9802,8821,37.4,,9110
-11930,9802,8822,-77.0,,9110
-11930,9802,8823,39.27,,9110
-11930,9802,8824,38.18,,9110
-11930,9802,8826,400000.0,,9001
-11930,9802,8827,0.0,,9001
-12001,9802,8821,41.0,,9110
-12001,9802,8822,-71.3,,9110
-12001,9802,8823,41.43,,9110
-12001,9802,8824,42.41,,9110
-12001,9802,8826,600000.0,,9003
-12001,9802,8827,0.0,,9003
-12002,9802,8821,41.0,,9110
-12002,9802,8822,-70.3,,9110
-12002,9802,8823,41.17,,9110
-12002,9802,8824,41.29,,9110
-12002,9802,8826,200000.0,,9003
-12002,9802,8827,0.0,,9003
-12031,9802,8821,41.0,,9110
-12031,9802,8822,-71.3,,9110
-12031,9802,8823,42.41,,9110
-12031,9802,8824,41.43,,9110
-12031,9802,8826,200000.0,,9001
-12031,9802,8827,750000.0,,9001
-12032,9802,8821,41.0,,9110
-12032,9802,8822,-70.3,,9110
-12032,9802,8823,41.29,,9110
-12032,9802,8824,41.17,,9110
-12032,9802,8826,500000.0,,9001
-12032,9802,8827,0.0,,9001
-12101,9807,8801,41.3,,9110
-12101,9807,8802,-83.4,,9110
-12101,9807,8805,0.999942857,,9201
-12101,9807,8806,500000.0,,9003
-12101,9807,8807,0.0,,9003
-12102,9807,8801,41.3,,9110
-12102,9807,8802,-85.45,,9110
-12102,9807,8805,0.999909091,,9201
-12102,9807,8806,500000.0,,9003
-12102,9807,8807,0.0,,9003
-12103,9807,8801,41.3,,9110
-12103,9807,8802,-88.45,,9110
-12103,9807,8805,0.999909091,,9201
-12103,9807,8806,500000.0,,9003
-12103,9807,8807,0.0,,9003
-12111,9802,8821,44.47,,9110
-12111,9802,8822,-87.0,,9110
-12111,9802,8823,45.29,,9110
-12111,9802,8824,47.05,,9110
-12111,9802,8826,2000000.0,,9003
-12111,9802,8827,0.0,,9003
-12112,9802,8821,43.19,,9110
-12112,9802,8822,-84.2,,9110
-12112,9802,8823,44.11,,9110
-12112,9802,8824,45.42,,9110
-12112,9802,8826,2000000.0,,9003
-12112,9802,8827,0.0,,9003
-12113,9802,8821,41.3,,9110
-12113,9802,8822,-84.2,,9110
-12113,9802,8823,42.06,,9110
-12113,9802,8824,43.4,,9110
-12113,9802,8826,2000000.0,,9003
-12113,9802,8827,0.0,,9003
-12141,9802,8821,44.47,,9110
-12141,9802,8822,-87.0,,9110
-12141,9802,8823,47.05,,9110
-12141,9802,8824,45.29,,9110
-12141,9802,8826,8000000.0,,9001
-12141,9802,8827,0.0,,9001
-12142,9802,8821,43.19,,9110
-12142,9802,8822,-84.22,,9110
-12142,9802,8823,45.42,,9110
-12142,9802,8824,44.11,,9110
-12142,9802,8826,6000000.0,,9001
-12142,9802,8827,0.0,,9001
-12143,9802,8821,41.3,,9110
-12143,9802,8822,-84.22,,9110
-12143,9802,8823,43.4,,9110
-12143,9802,8824,42.06,,9110
-12143,9802,8826,4000000.0,,9001
-12143,9802,8827,0.0,,9001
-12201,9802,8821,46.3,,9110
-12201,9802,8822,-93.06,,9110
-12201,9802,8823,47.02,,9110
-12201,9802,8824,48.38,,9110
-12201,9802,8826,2000000.0,,9003
-12201,9802,8827,0.0,,9003
-12202,9802,8821,45.0,,9110
-12202,9802,8822,-94.15,,9110
-12202,9802,8823,45.37,,9110
-12202,9802,8824,47.03,,9110
-12202,9802,8826,2000000.0,,9003
-12202,9802,8827,0.0,,9003
-12203,9802,8821,43.0,,9110
-12203,9802,8822,-94.0,,9110
-12203,9802,8823,43.47,,9110
-12203,9802,8824,45.13,,9110
-12203,9802,8826,2000000.0,,9003
-12203,9802,8827,0.0,,9003
-12231,9802,8821,46.3,,9110
-12231,9802,8822,-93.06,,9110
-12231,9802,8823,48.38,,9110
-12231,9802,8824,47.02,,9110
-12231,9802,8826,800000.0,,9001
-12231,9802,8827,100000.0,,9001
-12232,9802,8821,45.0,,9110
-12232,9802,8822,-94.15,,9110
-12232,9802,8823,47.03,,9110
-12232,9802,8824,45.37,,9110
-12232,9802,8826,800000.0,,9001
-12232,9802,8827,100000.0,,9001
-12233,9802,8821,43.0,,9110
-12233,9802,8822,-94.0,,9110
-12233,9802,8823,45.13,,9110
-12233,9802,8824,43.47,,9110
-12233,9802,8826,800000.0,,9001
-12233,9802,8827,100000.0,,9001
-12301,9807,8801,29.4,,9110
-12301,9807,8802,-88.5,,9110
-12301,9807,8805,0.99996,,9201
-12301,9807,8806,500000.0,,9003
-12301,9807,8807,0.0,,9003
-12302,9807,8801,30.3,,9110
-12302,9807,8802,-90.2,,9110
-12302,9807,8805,0.999941177,,9201
-12302,9807,8806,500000.0,,9003
-12302,9807,8807,0.0,,9003
-12331,9807,8801,29.3,,9110
-12331,9807,8802,-88.5,,9110
-12331,9807,8805,0.99995,,9201
-12331,9807,8806,300000.0,,9001
-12331,9807,8807,0.0,,9001
-12332,9807,8801,29.3,,9110
-12332,9807,8802,-90.2,,9110
-12332,9807,8805,0.99995,,9201
-12332,9807,8806,700000.0,,9001
-12332,9807,8807,0.0,,9001
-12401,9807,8801,35.5,,9110
-12401,9807,8802,-90.3,,9110
-12401,9807,8805,0.999933333,,9201
-12401,9807,8806,500000.0,,9003
-12401,9807,8807,0.0,,9003
-12402,9807,8801,35.5,,9110
-12402,9807,8802,-92.3,,9110
-12402,9807,8805,0.999933333,,9201
-12402,9807,8806,500000.0,,9003
-12402,9807,8807,0.0,,9003
-12403,9807,8801,36.1,,9110
-12403,9807,8802,-94.3,,9110
-12403,9807,8805,0.999941177,,9201
-12403,9807,8806,500000.0,,9003
-12403,9807,8807,0.0,,9003
-12431,9807,8801,35.5,,9110
-12431,9807,8802,-90.3,,9110
-12431,9807,8805,0.999933333,,9201
-12431,9807,8806,250000.0,,9001
-12431,9807,8807,0.0,,9001
-12432,9807,8801,35.5,,9110
-12432,9807,8802,-92.3,,9110
-12432,9807,8805,0.999933333,,9201
-12432,9807,8806,500000.0,,9001
-12432,9807,8807,0.0,,9001
-12433,9807,8801,36.1,,9110
-12433,9807,8802,-94.3,,9110
-12433,9807,8805,0.999941177,,9201
-12433,9807,8806,850000.0,,9001
-12433,9807,8807,0.0,,9001
-12501,9802,8821,47.0,,9110
-12501,9802,8822,-109.3,,9110
-12501,9802,8823,48.43,,9110
-12501,9802,8824,47.51,,9110
-12501,9802,8826,2000000.0,,9003
-12501,9802,8827,0.0,,9003
-12502,9802,8821,45.5,,9110
-12502,9802,8822,-109.3,,9110
-12502,9802,8823,47.53,,9110
-12502,9802,8824,46.27,,9110
-12502,9802,8826,2000000.0,,9003
-12502,9802,8827,0.0,,9003
-12503,9802,8821,44.0,,9110
-12503,9802,8822,-109.3,,9110
-12503,9802,8823,46.24,,9110
-12503,9802,8824,44.52,,9110
-12503,9802,8826,2000000.0,,9003
-12503,9802,8827,0.0,,9003
-12530,9802,8821,44.15,,9110
-12530,9802,8822,-109.3,,9110
-12530,9802,8823,49.0,,9110
-12530,9802,8824,45.0,,9110
-12530,9802,8826,600000.0,,9001
-12530,9802,8827,0.0,,9001
-12601,9802,8821,41.2,,9110
-12601,9802,8822,-100.0,,9110
-12601,9802,8823,41.51,,9110
-12601,9802,8824,42.49,,9110
-12601,9802,8826,2000000.0,,9003
-12601,9802,8827,0.0,,9003
-12602,9802,8821,39.4,,9110
-12602,9802,8822,-99.3,,9110
-12602,9802,8823,40.17,,9110
-12602,9802,8824,41.43,,9110
-12602,9802,8826,2000000.0,,9003
-12602,9802,8827,0.0,,9003
-12630,9802,8821,39.5,,9110
-12630,9802,8822,-100.0,,9110
-12630,9802,8823,43.0,,9110
-12630,9802,8824,40.0,,9110
-12630,9802,8826,500000.0,,9001
-12630,9802,8827,0.0,,9001
-12701,9807,8801,34.45,,9110
-12701,9807,8802,-115.35,,9110
-12701,9807,8805,0.9999,,9201
-12701,9807,8806,500000.0,,9003
-12701,9807,8807,0.0,,9003
-12702,9807,8801,34.45,,9110
-12702,9807,8802,-116.4,,9110
-12702,9807,8805,0.9999,,9201
-12702,9807,8806,500000.0,,9003
-12702,9807,8807,0.0,,9003
-12703,9807,8801,34.45,,9110
-12703,9807,8802,-118.35,,9110
-12703,9807,8805,0.9999,,9201
-12703,9807,8806,500000.0,,9003
-12703,9807,8807,0.0,,9003
-12731,9807,8801,34.45,,9110
-12731,9807,8802,-115.35,,9110
-12731,9807,8805,0.9999,,9201
-12731,9807,8806,200000.0,,9001
-12731,9807,8807,8000000.0,,9001
-12732,9807,8801,34.45,,9110
-12732,9807,8802,-116.4,,9110
-12732,9807,8805,0.9999,,9201
-12732,9807,8806,500000.0,,9001
-12732,9807,8807,6000000.0,,9001
-12733,9807,8801,34.45,,9110
-12733,9807,8802,-118.35,,9110
-12733,9807,8805,0.9999,,9201
-12733,9807,8806,800000.0,,9001
-12733,9807,8807,4000000.0,,9001
-12800,9807,8801,42.3,,9110
-12800,9807,8802,-71.4,,9110
-12800,9807,8805,0.999966667,,9201
-12800,9807,8806,500000.0,,9003
-12800,9807,8807,0.0,,9003
-12830,9807,8801,42.3,,9110
-12830,9807,8802,-71.4,,9110
-12830,9807,8805,0.999966667,,9201
-12830,9807,8806,300000.0,,9001
-12830,9807,8807,0.0,,9001
-12900,9807,8801,38.5,,9110
-12900,9807,8802,-74.4,,9110
-12900,9807,8805,0.999975,,9201
-12900,9807,8806,2000000.0,,9003
-12900,9807,8807,0.0,,9003
-12930,9807,8801,38.5,,9110
-12930,9807,8802,-74.3,,9110
-12930,9807,8805,0.9999,,9201
-12930,9807,8806,150000.0,,9001
-12930,9807,8807,0.0,,9001
-13001,9807,8801,31.0,,9110
-13001,9807,8802,-104.2,,9110
-13001,9807,8805,0.999909091,,9201
-13001,9807,8806,500000.0,,9003
-13001,9807,8807,0.0,,9003
-13002,9807,8801,31.0,,9110
-13002,9807,8802,-106.15,,9110
-13002,9807,8805,0.9999,,9201
-13002,9807,8806,500000.0,,9003
-13002,9807,8807,0.0,,9003
-13003,9807,8801,31.0,,9110
-13003,9807,8802,-107.5,,9110
-13003,9807,8805,0.999916667,,9201
-13003,9807,8806,500000.0,,9003
-13003,9807,8807,0.0,,9003
-13031,9807,8801,31.0,,9110
-13031,9807,8802,-104.2,,9110
-13031,9807,8805,0.999909091,,9201
-13031,9807,8806,165000.0,,9001
-13031,9807,8807,0.0,,9001
-13032,9807,8801,31.0,,9110
-13032,9807,8802,-106.15,,9110
-13032,9807,8805,0.9999,,9201
-13032,9807,8806,500000.0,,9001
-13032,9807,8807,0.0,,9001
-13033,9807,8801,31.0,,9110
-13033,9807,8802,-107.5,,9110
-13033,9807,8805,0.999916667,,9201
-13033,9807,8806,830000.0,,9001
-13033,9807,8807,0.0,,9001
-13101,9807,8801,40.0,,9110
-13101,9807,8802,-74.2,,9110
-13101,9807,8805,0.999966667,,9201
-13101,9807,8806,500000.0,,9003
-13101,9807,8807,0.0,,9003
-13102,9807,8801,40.0,,9110
-13102,9807,8802,-76.35,,9110
-13102,9807,8805,0.9999375,,9201
-13102,9807,8806,500000.0,,9003
-13102,9807,8807,0.0,,9003
-13103,9807,8801,40.0,,9110
-13103,9807,8802,-78.35,,9110
-13103,9807,8805,0.9999375,,9201
-13103,9807,8806,500000.0,,9003
-13103,9807,8807,0.0,,9003
-13104,9802,8821,40.3,,9110
-13104,9802,8822,-74.0,,9110
-13104,9802,8823,41.02,,9110
-13104,9802,8824,40.4,,9110
-13104,9802,8826,1000000.0,,9003
-13104,9802,8827,0.0,,9003
-13131,9807,8801,38.5,,9110
-13131,9807,8802,-74.3,,9110
-13131,9807,8805,0.9999,,9201
-13131,9807,8806,150000.0,,9001
-13131,9807,8807,0.0,,9001
-13132,9807,8801,40.0,,9110
-13132,9807,8802,-76.35,,9110
-13132,9807,8805,0.9999375,,9201
-13132,9807,8806,250000.0,,9001
-13132,9807,8807,0.0,,9001
-13133,9807,8801,40.0,,9110
-13133,9807,8802,-78.35,,9110
-13133,9807,8805,0.9999375,,9201
-13133,9807,8806,350000.0,,9001
-13133,9807,8807,0.0,,9001
-13134,9802,8821,40.1,,9110
-13134,9802,8822,-74.0,,9110
-13134,9802,8823,41.02,,9110
-13134,9802,8824,40.4,,9110
-13134,9802,8826,300000.0,,9001
-13134,9802,8827,0.0,,9001
-13200,9802,8821,33.45,,9110
-13200,9802,8822,-79.0,,9110
-13200,9802,8823,34.2,,9110
-13200,9802,8824,36.1,,9110
-13200,9802,8826,2000000.0,,9003
-13200,9802,8827,0.0,,9003
-13230,9802,8821,33.45,,9110
-13230,9802,8822,-79.0,,9110
-13230,9802,8823,36.1,,9110
-13230,9802,8824,34.2,,9110
-13230,9802,8826,609601.22,,9001
-13230,9802,8827,0.0,,9001
-13301,9802,8821,47.0,,9110
-13301,9802,8822,-100.3,,9110
-13301,9802,8823,47.26,,9110
-13301,9802,8824,48.44,,9110
-13301,9802,8826,2000000.0,,9003
-13301,9802,8827,0.0,,9003
-13302,9802,8821,45.4,,9110
-13302,9802,8822,-100.3,,9110
-13302,9802,8823,46.11,,9110
-13302,9802,8824,47.29,,9110
-13302,9802,8826,2000000.0,,9003
-13302,9802,8827,0.0,,9003
-13331,9802,8821,47.0,,9110
-13331,9802,8822,-100.3,,9110
-13331,9802,8823,48.44,,9110
-13331,9802,8824,47.26,,9110
-13331,9802,8826,600000.0,,9001
-13331,9802,8827,0.0,,9001
-13332,9802,8821,45.4,,9110
-13332,9802,8822,-100.3,,9110
-13332,9802,8823,47.29,,9110
-13332,9802,8824,46.11,,9110
-13332,9802,8826,600000.0,,9001
-13332,9802,8827,0.0,,9001
-13401,9802,8821,39.4,,9110
-13401,9802,8822,-82.3,,9110
-13401,9802,8823,40.26,,9110
-13401,9802,8824,41.42,,9110
-13401,9802,8826,2000000.0,,9003
-13401,9802,8827,0.0,,9003
-13402,9802,8821,38.0,,9110
-13402,9802,8822,-82.3,,9110
-13402,9802,8823,38.44,,9110
-13402,9802,8824,40.02,,9110
-13402,9802,8826,2000000.0,,9003
-13402,9802,8827,0.0,,9003
-13431,9802,8821,39.4,,9110
-13431,9802,8822,-82.3,,9110
-13431,9802,8823,41.42,,9110
-13431,9802,8824,40.26,,9110
-13431,9802,8826,600000.0,,9001
-13431,9802,8827,0.0,,9001
-13432,9802,8821,38.0,,9110
-13432,9802,8822,-82.3,,9110
-13432,9802,8823,40.02,,9110
-13432,9802,8824,38.44,,9110
-13432,9802,8826,600000.0,,9001
-13432,9802,8827,0.0,,9001
-13501,9802,8821,35.0,,9110
-13501,9802,8822,-98.0,,9110
-13501,9802,8823,35.34,,9110
-13501,9802,8824,36.46,,9110
-13501,9802,8826,2000000.0,,9003
-13501,9802,8827,0.0,,9003
-13502,9802,8821,33.2,,9110
-13502,9802,8822,-98.0,,9110
-13502,9802,8823,33.56,,9110
-13502,9802,8824,35.14,,9110
-13502,9802,8826,2000000.0,,9003
-13502,9802,8827,0.0,,9003
-13531,9802,8821,35.0,,9110
-13531,9802,8822,-98.0,,9110
-13531,9802,8823,36.46,,9110
-13531,9802,8824,35.34,,9110
-13531,9802,8826,600000.0,,9001
-13531,9802,8827,0.0,,9001
-13532,9802,8821,33.2,,9110
-13532,9802,8822,-98.0,,9110
-13532,9802,8823,35.14,,9110
-13532,9802,8824,33.56,,9110
-13532,9802,8826,600000.0,,9001
-13532,9802,8827,0.0,,9001
-13601,9802,8821,43.4,,9110
-13601,9802,8822,-120.3,,9110
-13601,9802,8823,44.2,,9110
-13601,9802,8824,46.0,,9110
-13601,9802,8826,2000000.0,,9003
-13601,9802,8827,0.0,,9003
-13602,9802,8821,41.4,,9110
-13602,9802,8822,-120.3,,9110
-13602,9802,8823,42.2,,9110
-13602,9802,8824,44.0,,9110
-13602,9802,8826,2000000.0,,9003
-13602,9802,8827,0.0,,9003
-13631,9802,8821,43.4,,9110
-13631,9802,8822,-120.3,,9110
-13631,9802,8823,46.0,,9110
-13631,9802,8824,44.2,,9110
-13631,9802,8826,2500000.0,,9001
-13631,9802,8827,0.0,,9001
-13632,9802,8821,41.4,,9110
-13632,9802,8822,-120.3,,9110
-13632,9802,8823,44.0,,9110
-13632,9802,8824,42.2,,9110
-13632,9802,8826,1500000.0,,9001
-13632,9802,8827,0.0,,9001
-13701,9802,8821,40.1,,9110
-13701,9802,8822,-77.45,,9110
-13701,9802,8823,40.53,,9110
-13701,9802,8824,41.57,,9110
-13701,9802,8826,2000000.0,,9003
-13701,9802,8827,0.0,,9003
-13702,9802,8821,39.2,,9110
-13702,9802,8822,-77.45,,9110
-13702,9802,8823,39.56,,9110
-13702,9802,8824,40.48,,9110
-13702,9802,8826,2000000.0,,9003
-13702,9802,8827,0.0,,9003
-13731,9802,8821,40.1,,9110
-13731,9802,8822,-77.45,,9110
-13731,9802,8823,41.57,,9110
-13731,9802,8824,40.53,,9110
-13731,9802,8826,600000.0,,9001
-13731,9802,8827,0.0,,9001
-13732,9802,8821,39.2,,9110
-13732,9802,8822,-77.45,,9110
-13732,9802,8823,40.58,,9110
-13732,9802,8824,39.56,,9110
-13732,9802,8826,600000.0,,9001
-13732,9802,8827,0.0,,9001
-13800,9807,8801,41.05,,9110
-13800,9807,8802,-71.3,,9110
-13800,9807,8805,0.9999938,,9201
-13800,9807,8806,500000.0,,9003
-13800,9807,8807,0.0,,9003
-13830,9807,8801,41.05,,9110
-13830,9807,8802,-71.3,,9110
-13830,9807,8805,0.99999375,,9201
-13830,9807,8806,100000.0,,9001
-13830,9807,8807,0.0,,9001
-13901,9802,8821,33.0,,9110
-13901,9802,8822,-81.0,,9110
-13901,9802,8823,33.46,,9110
-13901,9802,8824,34.58,,9110
-13901,9802,8826,2000000.0,,9003
-13901,9802,8827,0.0,,9003
-13902,9802,8821,31.5,,9110
-13902,9802,8822,-81.0,,9110
-13902,9802,8823,32.2,,9110
-13902,9802,8824,33.4,,9110
-13902,9802,8826,2000000.0,,9003
-13902,9802,8827,0.0,,9003
-13930,9802,8821,31.5,,9110
-13930,9802,8822,-81.0,,9110
-13930,9802,8823,34.5,,9110
-13930,9802,8824,32.3,,9110
-13930,9802,8826,609600.0,,9001
-13930,9802,8827,0.0,,9001
-14001,9802,8821,43.5,,9110
-14001,9802,8822,-100.0,,9110
-14001,9802,8823,44.25,,9110
-14001,9802,8824,45.41,,9110
-14001,9802,8826,2000000.0,,9003
-14001,9802,8827,0.0,,9003
-14002,9802,8821,42.2,,9110
-14002,9802,8822,-100.2,,9110
-14002,9802,8823,42.5,,9110
-14002,9802,8824,44.24,,9110
-14002,9802,8826,2000000.0,,9003
-14002,9802,8827,0.0,,9003
-14031,9802,8821,43.5,,9110
-14031,9802,8822,-100.0,,9110
-14031,9802,8823,45.41,,9110
-14031,9802,8824,44.25,,9110
-14031,9802,8826,600000.0,,9001
-14031,9802,8827,0.0,,9001
-14032,9802,8821,42.2,,9110
-14032,9802,8822,-100.2,,9110
-14032,9802,8823,44.24,,9110
-14032,9802,8824,42.5,,9110
-14032,9802,8826,600000.0,,9001
-14032,9802,8827,0.0,,9001
-14100,9802,8821,34.4,,9110
-14100,9802,8822,-86.0,,9110
-14100,9802,8823,35.15,,9110
-14100,9802,8824,36.25,,9110
-14100,9802,8826,100000.0,,9003
-14100,9802,8827,0.0,,9003
-14130,9802,8821,34.2,,9110
-14130,9802,8822,-86.0,,9110
-14130,9802,8823,36.25,,9110
-14130,9802,8824,35.15,,9110
-14130,9802,8826,600000.0,,9001
-14130,9802,8827,0.0,,9001
-14201,9802,8821,34.0,,9110
-14201,9802,8822,-101.3,,9110
-14201,9802,8823,34.39,,9110
-14201,9802,8824,36.11,,9110
-14201,9802,8826,2000000.0,,9003
-14201,9802,8827,0.0,,9003
-14202,9802,8821,31.4,,9110
-14202,9802,8822,-97.3,,9110
-14202,9802,8823,32.08,,9110
-14202,9802,8824,33.58,,9110
-14202,9802,8826,2000000.0,,9003
-14202,9802,8827,0.0,,9003
-14203,9802,8821,29.4,,9110
-14203,9802,8822,-100.2,,9110
-14203,9802,8823,30.07,,9110
-14203,9802,8824,31.53,,9110
-14203,9802,8826,2000000.0,,9003
-14203,9802,8827,0.0,,9003
-14204,9802,8821,27.5,,9110
-14204,9802,8822,-99.0,,9110
-14204,9802,8823,28.23,,9110
-14204,9802,8824,30.17,,9110
-14204,9802,8826,2000000.0,,9003
-14204,9802,8827,0.0,,9003
-14205,9802,8821,25.4,,9110
-14205,9802,8822,-98.3,,9110
-14205,9802,8823,26.1,,9110
-14205,9802,8824,27.5,,9110
-14205,9802,8826,2000000.0,,9003
-14205,9802,8827,0.0,,9003
-14231,9802,8821,34.0,,9110
-14231,9802,8822,-101.3,,9110
-14231,9802,8823,36.11,,9110
-14231,9802,8824,34.39,,9110
-14231,9802,8826,200000.0,,9001
-14231,9802,8827,1000000.0,,9001
-14232,9802,8821,31.4,,9110
-14232,9802,8822,-98.3,,9110
-14232,9802,8823,33.58,,9110
-14232,9802,8824,32.08,,9110
-14232,9802,8826,600000.0,,9001
-14232,9802,8827,2000000.0,,9001
-14233,9802,8821,29.4,,9110
-14233,9802,8822,-100.2,,9110
-14233,9802,8823,31.53,,9110
-14233,9802,8824,30.07,,9110
-14233,9802,8826,700000.0,,9001
-14233,9802,8827,3000000.0,,9001
-14234,9802,8821,27.5,,9110
-14234,9802,8822,-99.0,,9110
-14234,9802,8823,30.17,,9110
-14234,9802,8824,28.23,,9110
-14234,9802,8826,600000.0,,9001
-14234,9802,8827,4000000.0,,9001
-14235,9802,8821,25.4,,9110
-14235,9802,8822,-98.3,,9110
-14235,9802,8823,27.5,,9110
-14235,9802,8824,26.1,,9110
-14235,9802,8826,300000.0,,9001
-14235,9802,8827,5000000.0,,9001
-14301,9802,8821,40.2,,9110
-14301,9802,8822,-111.3,,9110
-14301,9802,8823,40.43,,9110
-14301,9802,8824,41.47,,9110
-14301,9802,8826,2000000.0,,9003
-14301,9802,8827,0.0,,9003
-14302,9802,8821,38.2,,9110
-14302,9802,8822,-111.3,,9110
-14302,9802,8823,39.01,,9110
-14302,9802,8824,40.39,,9110
-14302,9802,8826,2000000.0,,9003
-14302,9802,8827,0.0,,9003
-14303,9802,8821,36.4,,9110
-14303,9802,8822,-111.3,,9110
-14303,9802,8823,37.13,,9110
-14303,9802,8824,38.21,,9110
-14303,9802,8826,2000000.0,,9003
-14303,9802,8827,0.0,,9003
-14331,9802,8821,40.2,,9110
-14331,9802,8822,-111.3,,9110
-14331,9802,8823,41.47,,9110
-14331,9802,8824,40.43,,9110
-14331,9802,8826,500000.0,,9001
-14331,9802,8827,1000000.0,,9001
-14332,9802,8821,38.2,,9110
-14332,9802,8822,-111.3,,9110
-14332,9802,8823,40.39,,9110
-14332,9802,8824,39.01,,9110
-14332,9802,8826,500000.0,,9001
-14332,9802,8827,2000000.0,,9001
-14333,9802,8821,36.4,,9110
-14333,9802,8822,-111.3,,9110
-14333,9802,8823,38.21,,9110
-14333,9802,8824,37.13,,9110
-14333,9802,8826,500000.0,,9001
-14333,9802,8827,3000000.0,,9001
-14400,9807,8801,42.3,,9110
-14400,9807,8802,-72.3,,9110
-14400,9807,8805,0.999964286,,9201
-14400,9807,8806,500000.0,,9003
-14400,9807,8807,0.0,,9003
-14430,9807,8801,42.3,,9110
-14430,9807,8802,-72.3,,9110
-14430,9807,8805,0.999964286,,9201
-14430,9807,8806,500000.0,,9001
-14430,9807,8807,0.0,,9001
-14501,9802,8821,37.4,,9110
-14501,9802,8822,-78.3,,9110
-14501,9802,8823,38.02,,9110
-14501,9802,8824,39.12,,9110
-14501,9802,8826,2000000.0,,9003
-14501,9802,8827,0.0,,9003
-14502,9802,8821,36.2,,9110
-14502,9802,8822,-78.3,,9110
-14502,9802,8823,36.46,,9110
-14502,9802,8824,37.58,,9110
-14502,9802,8826,2000000.0,,9003
-14502,9802,8827,0.0,,9003
-14531,9802,8821,37.4,,9110
-14531,9802,8822,-78.3,,9110
-14531,9802,8823,39.12,,9110
-14531,9802,8824,38.02,,9110
-14531,9802,8826,3500000.0,,9001
-14531,9802,8827,2000000.0,,9001
-14532,9802,8821,36.2,,9110
-14532,9802,8822,-78.3,,9110
-14532,9802,8823,37.58,,9110
-14532,9802,8824,36.46,,9110
-14532,9802,8826,3500000.0,,9001
-14532,9802,8827,1000000.0,,9001
-14601,9802,8821,47.0,,9110
-14601,9802,8822,-120.5,,9110
-14601,9802,8823,47.3,,9110
-14601,9802,8824,48.44,,9110
-14601,9802,8826,2000000.0,,9003
-14601,9802,8827,0.0,,9003
-14602,9802,8821,45.2,,9110
-14602,9802,8822,-120.3,,9110
-14602,9802,8823,45.5,,9110
-14602,9802,8824,47.2,,9110
-14602,9802,8826,2000000.0,,9003
-14602,9802,8827,0.0,,9003
-14631,9802,8821,47.0,,9110
-14631,9802,8822,-120.5,,9110
-14631,9802,8823,48.44,,9110
-14631,9802,8824,47.3,,9110
-14631,9802,8826,500000.0,,9001
-14631,9802,8827,0.0,,9001
-14632,9802,8821,45.2,,9110
-14632,9802,8822,-120.3,,9110
-14632,9802,8823,47.2,,9110
-14632,9802,8824,45.5,,9110
-14632,9802,8826,500000.0,,9001
-14632,9802,8827,0.0,,9001
-14701,9802,8821,38.3,,9110
-14701,9802,8822,-79.3,,9110
-14701,9802,8823,39.0,,9110
-14701,9802,8824,40.15,,9110
-14701,9802,8826,2000000.0,,9003
-14701,9802,8827,0.0,,9003
-14702,9802,8821,37.0,,9110
-14702,9802,8822,-81.0,,9110
-14702,9802,8823,37.29,,9110
-14702,9802,8824,38.53,,9110
-14702,9802,8826,2000000.0,,9003
-14702,9802,8827,0.0,,9003
-14731,9802,8821,38.3,,9110
-14731,9802,8822,-79.3,,9110
-14731,9802,8823,40.15,,9110
-14731,9802,8824,39.0,,9110
-14731,9802,8826,600000.0,,9001
-14731,9802,8827,0.0,,9001
-14732,9802,8821,37.0,,9110
-14732,9802,8822,-81.0,,9110
-14732,9802,8823,38.53,,9110
-14732,9802,8824,37.29,,9110
-14732,9802,8826,600000.0,,9001
-14732,9802,8827,0.0,,9001
-14801,9802,8821,45.1,,9110
-14801,9802,8822,-90.0,,9110
-14801,9802,8823,45.34,,9110
-14801,9802,8824,46.46,,9110
-14801,9802,8826,2000000.0,,9003
-14801,9802,8827,0.0,,9003
-14802,9802,8821,43.5,,9110
-14802,9802,8822,-90.0,,9110
-14802,9802,8823,44.15,,9110
-14802,9802,8824,45.3,,9110
-14802,9802,8826,2000000.0,,9003
-14802,9802,8827,0.0,,9003
-14803,9802,8821,42.0,,9110
-14803,9802,8822,-90.0,,9110
-14803,9802,8823,42.44,,9110
-14803,9802,8824,44.04,,9110
-14803,9802,8826,2000000.0,,9003
-14803,9802,8827,0.0,,9003
-14831,9802,8821,45.1,,9110
-14831,9802,8822,-90.0,,9110
-14831,9802,8823,46.46,,9110
-14831,9802,8824,45.34,,9110
-14831,9802,8826,600000.0,,9001
-14831,9802,8827,0.0,,9001
-14832,9802,8821,43.5,,9110
-14832,9802,8822,-90.0,,9110
-14832,9802,8823,45.3,,9110
-14832,9802,8824,44.15,,9110
-14832,9802,8826,600000.0,,9001
-14832,9802,8827,0.0,,9001
-14833,9802,8821,42.0,,9110
-14833,9802,8822,-90.0,,9110
-14833,9802,8823,44.04,,9110
-14833,9802,8824,42.44,,9110
-14833,9802,8826,600000.0,,9001
-14833,9802,8827,0.0,,9001
-14901,9807,8801,40.4,,9110
-14901,9807,8802,-105.1,,9110
-14901,9807,8805,0.999941177,,9201
-14901,9807,8806,500000.0,,9003
-14901,9807,8807,0.0,,9003
-14902,9807,8801,40.4,,9110
-14902,9807,8802,-107.2,,9110
-14902,9807,8805,0.999941177,,9201
-14902,9807,8806,500000.0,,9003
-14902,9807,8807,0.0,,9003
-14903,9807,8801,40.4,,9110
-14903,9807,8802,-108.45,,9110
-14903,9807,8805,0.999941177,,9201
-14903,9807,8806,500000.0,,9003
-14903,9807,8807,0.0,,9003
-14904,9807,8801,40.4,,9110
-14904,9807,8802,-110.05,,9110
-14904,9807,8805,0.999941177,,9201
-14904,9807,8806,500000.0,,9003
-14904,9807,8807,0.0,,9003
-14931,9807,8801,40.3,,9110
-14931,9807,8802,-105.1,,9110
-14931,9807,8805,0.9999375,,9201
-14931,9807,8806,200000.0,,9001
-14931,9807,8807,0.0,,9001
-14932,9807,8801,40.3,,9110
-14932,9807,8802,-107.2,,9110
-14932,9807,8805,0.9999375,,9201
-14932,9807,8806,400000.0,,9001
-14932,9807,8807,100000.0,,9001
-14933,9807,8801,40.3,,9110
-14933,9807,8802,-108.45,,9110
-14933,9807,8805,0.9999375,,9201
-14933,9807,8806,600000.0,,9001
-14933,9807,8807,0.0,,9001
-14934,9807,8801,40.3,,9110
-14934,9807,8802,-110.05,,9110
-14934,9807,8805,0.9999375,,9201
-14934,9807,8806,800000.0,,9001
-14934,9807,8807,100000.0,,9001
-15001,9812,8806,16404166.67,,9003
-15001,9812,8807,-16404166.67,,9003
-15001,9812,8811,57.0,,9110
-15001,9812,8812,-133.4,,9110
-15001,9812,8813,323.07483685,,9110
-15001,9812,8814,323.07483685,,9110
-15001,9812,8815,0.9999,,9201
-15002,9807,8801,54.0,,9102
-15002,9807,8802,-142.0,,9102
-15002,9807,8805,0.9999,,9201
-15002,9807,8806,500000.0,,9003
-15002,9807,8807,0.0,,9003
-15003,9807,8801,54.0,,9102
-15003,9807,8802,-146.0,,9102
-15003,9807,8805,0.9999,,9201
-15003,9807,8806,500000.0,,9003
-15003,9807,8807,0.0,,9003
-15004,9807,8801,54.0,,9102
-15004,9807,8802,-150.0,,9102
-15004,9807,8805,0.9999,,9201
-15004,9807,8806,500000.0,,9003
-15004,9807,8807,0.0,,9003
-15005,9807,8801,54.0,,9102
-15005,9807,8802,-154.0,,9102
-15005,9807,8805,0.9999,,9201
-15005,9807,8806,500000.0,,9003
-15005,9807,8807,0.0,,9003
-15006,9807,8801,54.0,,9102
-15006,9807,8802,-158.0,,9102
-15006,9807,8805,0.9999,,9201
-15006,9807,8806,500000.0,,9003
-15006,9807,8807,0.0,,9003
-15007,9807,8801,54.0,,9102
-15007,9807,8802,-162.0,,9102
-15007,9807,8805,0.9999,,9201
-15007,9807,8806,700000.0,,9003
-15007,9807,8807,0.0,,9003
-15008,9807,8801,54.0,,9102
-15008,9807,8802,-166.0,,9102
-15008,9807,8805,0.9999,,9201
-15008,9807,8806,500000.0,,9003
-15008,9807,8807,0.0,,9003
-15009,9807,8801,54.0,,9102
-15009,9807,8802,-170.0,,9102
-15009,9807,8805,0.9999,,9201
-15009,9807,8806,600000.0,,9003
-15009,9807,8807,0.0,,9003
-15010,9802,8821,51.0,,9110
-15010,9802,8822,-176.0,,9110
-15010,9802,8823,53.5,,9110
-15010,9802,8824,51.5,,9110
-15010,9802,8826,3000000.0,,9003
-15010,9802,8827,0.0,,9003
-15031,9812,8806,5000000.0,,9001
-15031,9812,8807,-5000000.0,,9001
-15031,9812,8811,57.0,,9110
-15031,9812,8812,-133.4,,9110
-15031,9812,8813,323.07483685,,9110
-15031,9812,8814,323.07483685,,9110
-15031,9812,8815,0.9999,,9201
-15032,9807,8801,54.0,,9102
-15032,9807,8802,-142.0,,9102
-15032,9807,8805,0.9999,,9201
-15032,9807,8806,500000.0,,9001
-15032,9807,8807,0.0,,9001
-15033,9807,8801,54.0,,9102
-15033,9807,8802,-146.0,,9102
-15033,9807,8805,0.9999,,9201
-15033,9807,8806,500000.0,,9001
-15033,9807,8807,0.0,,9001
-15034,9807,8801,54.0,,9102
-15034,9807,8802,-150.0,,9102
-15034,9807,8805,0.9999,,9201
-15034,9807,8806,500000.0,,9001
-15034,9807,8807,0.0,,9001
-15035,9807,8801,54.0,,9102
-15035,9807,8802,-154.0,,9102
-15035,9807,8805,0.9999,,9201
-15035,9807,8806,500000.0,,9001
-15035,9807,8807,0.0,,9001
-15036,9807,8801,54.0,,9102
-15036,9807,8802,-158.0,,9102
-15036,9807,8805,0.9999,,9201
-15036,9807,8806,500000.0,,9001
-15036,9807,8807,0.0,,9001
-15037,9807,8801,54.0,,9102
-15037,9807,8802,-162.0,,9102
-15037,9807,8805,0.9999,,9201
-15037,9807,8806,500000.0,,9001
-15037,9807,8807,0.0,,9001
-15038,9807,8801,54.0,,9102
-15038,9807,8802,-166.0,,9102
-15038,9807,8805,0.9999,,9201
-15038,9807,8806,500000.0,,9001
-15038,9807,8807,0.0,,9001
-15039,9807,8801,54.0,,9102
-15039,9807,8802,-170.0,,9102
-15039,9807,8805,0.9999,,9201
-15039,9807,8806,500000.0,,9001
-15039,9807,8807,0.0,,9001
-15040,9802,8821,51.0,,9110
-15040,9802,8822,-176.0,,9110
-15040,9802,8823,53.5,,9110
-15040,9802,8824,51.5,,9110
-15040,9802,8826,1000000.0,,9001
-15040,9802,8827,0.0,,9001
-15101,9807,8801,18.5,,9110
-15101,9807,8802,-155.3,,9110
-15101,9807,8805,0.999966667,,9201
-15101,9807,8806,500000.0,,9003
-15101,9807,8807,0.0,,9003
-15102,9807,8801,20.2,,9110
-15102,9807,8802,-156.4,,9110
-15102,9807,8805,0.999966667,,9201
-15102,9807,8806,500000.0,,9003
-15102,9807,8807,0.0,,9003
-15103,9807,8801,21.1,,9110
-15103,9807,8802,-158.0,,9110
-15103,9807,8805,0.99999,,9201
-15103,9807,8806,500000.0,,9003
-15103,9807,8807,0.0,,9003
-15104,9807,8801,21.5,,9110
-15104,9807,8802,-159.3,,9110
-15104,9807,8805,0.99999,,9201
-15104,9807,8806,500000.0,,9003
-15104,9807,8807,0.0,,9003
-15105,9807,8801,21.4,,9110
-15105,9807,8802,-160.1,,9110
-15105,9807,8805,1.0,,9201
-15105,9807,8806,500000.0,,9003
-15105,9807,8807,0.0,,9003
-15131,9807,8801,18.5,,9110
-15131,9807,8802,-155.3,,9110
-15131,9807,8805,0.999966667,,9201
-15131,9807,8806,500000.0,,9001
-15131,9807,8807,0.0,,9001
-15132,9807,8801,20.2,,9110
-15132,9807,8802,-156.4,,9110
-15132,9807,8805,0.999966667,,9201
-15132,9807,8806,500000.0,,9001
-15132,9807,8807,0.0,,9001
-15133,9807,8801,21.1,,9110
-15133,9807,8802,-158.0,,9110
-15133,9807,8805,0.99999,,9201
-15133,9807,8806,500000.0,,9001
-15133,9807,8807,0.0,,9001
-15134,9807,8801,21.5,,9110
-15134,9807,8802,-159.3,,9110
-15134,9807,8805,0.99999,,9201
-15134,9807,8806,500000.0,,9001
-15134,9807,8807,0.0,,9001
-15135,9807,8801,21.4,,9110
-15135,9807,8802,-160.1,,9110
-15135,9807,8805,1.0,,9201
-15135,9807,8806,500000.0,,9001
-15135,9807,8807,0.0,,9001
-15201,9802,8821,17.5,,9110
-15201,9802,8822,-66.26,,9110
-15201,9802,8823,18.26,,9110
-15201,9802,8824,18.02,,9110
-15201,9802,8826,500000.0,,9003
-15201,9802,8827,0.0,,9003
-15202,9802,8821,17.5,,9110
-15202,9802,8822,-66.26,,9110
-15202,9802,8823,18.26,,9110
-15202,9802,8824,18.02,,9110
-15202,9802,8826,500000.0,,9003
-15202,9802,8827,100000.0,,9003
-15230,9802,8821,17.5,,9110
-15230,9802,8822,-66.26,,9110
-15230,9802,8823,18.26,,9110
-15230,9802,8824,18.02,,9110
-15230,9802,8826,200000.0,,9001
-15230,9802,8827,200000.0,,9001
-15300,9801,8801,-14.16,,9110
-15300,9801,8802,170.0,,9110
-15300,9801,8805,1.0,,9201
-15300,9801,8806,500000.0,,9003
-15300,9801,8807,0.0,,9003
-15301,9801,8801,-14.16,,9110
-15301,9801,8802,-170.0,,9110
-15301,9801,8805,1.0,,9201
-15301,9801,8806,500000.0,,9003
-15301,9801,8807,0.0,,9003
-15302,9802,8821,34.4,,9110
-15302,9802,8822,-86.0,,9110
-15302,9802,8823,35.15,,9110
-15302,9802,8824,36.25,,9110
-15302,9802,8826,2000000.0,,9003
-15302,9802,8827,100000.0,,9003
-15303,9802,8821,37.3,,9110
-15303,9802,8822,-84.15,,9110
-15303,9802,8823,37.58,,9110
-15303,9802,8824,38.58,,9110
-15303,9802,8826,500000.0,,9001
-15303,9802,8827,0.0,,9001
-15304,9807,8801,31.0,,9110
-15304,9807,8802,-110.1,,9110
-15304,9807,8805,0.9999,,9201
-15304,9807,8806,700000.0,,9002
-15304,9807,8807,0.0,,9002
-15305,9807,8801,31.0,,9110
-15305,9807,8802,-111.55,,9110
-15305,9807,8805,0.9999,,9201
-15305,9807,8806,700000.0,,9002
-15305,9807,8807,0.0,,9002
-15306,9807,8801,31.0,,9110
-15306,9807,8802,-113.45,,9110
-15306,9807,8805,0.999933333,,9201
-15306,9807,8806,700000.0,,9002
-15306,9807,8807,0.0,,9002
-15307,9802,8821,39.2,,9110
-15307,9802,8822,-122.0,,9110
-15307,9802,8823,41.4,,9110
-15307,9802,8824,40.0,,9110
-15307,9802,8826,6561666.667,,9003
-15307,9802,8827,1640416.667,,9003
-15308,9802,8821,37.4,,9110
-15308,9802,8822,-122.0,,9110
-15308,9802,8823,39.5,,9110
-15308,9802,8824,38.2,,9110
-15308,9802,8826,6561666.667,,9003
-15308,9802,8827,1640416.667,,9003
-15309,9802,8821,36.3,,9110
-15309,9802,8822,-120.3,,9110
-15309,9802,8823,38.26,,9110
-15309,9802,8824,37.04,,9110
-15309,9802,8826,6561666.667,,9003
-15309,9802,8827,1640416.667,,9003
-15310,9802,8821,35.2,,9110
-15310,9802,8822,-119.0,,9110
-15310,9802,8823,37.15,,9110
-15310,9802,8824,36.0,,9110
-15310,9802,8826,6561666.667,,9003
-15310,9802,8827,1640416.667,,9003
-15311,9802,8821,33.3,,9110
-15311,9802,8822,-118.0,,9110
-15311,9802,8823,35.28,,9110
-15311,9802,8824,34.02,,9110
-15311,9802,8826,6561666.667,,9003
-15311,9802,8827,1640416.667,,9003
-15312,9802,8821,32.1,,9110
-15312,9802,8822,-116.15,,9110
-15312,9802,8823,33.53,,9110
-15312,9802,8824,32.47,,9110
-15312,9802,8826,6561666.667,,9003
-15312,9802,8827,1640416.667,,9003
-15313,9802,8821,39.2,,9110
-15313,9802,8822,-105.3,,9110
-15313,9802,8823,40.47,,9110
-15313,9802,8824,39.43,,9110
-15313,9802,8826,3000000.0,,9003
-15313,9802,8827,1000000.0,,9003
-15314,9802,8821,37.5,,9110
-15314,9802,8822,-105.3,,9110
-15314,9802,8823,39.45,,9110
-15314,9802,8824,38.27,,9110
-15314,9802,8826,3000000.0,,9003
-15314,9802,8827,1000000.0,,9003
-15315,9802,8821,36.4,,9110
-15315,9802,8822,-105.3,,9110
-15315,9802,8823,38.26,,9110
-15315,9802,8824,37.14,,9110
-15315,9802,8826,3000000.0,,9003
-15315,9802,8827,1000000.0,,9003
-15316,9802,8821,40.5,,9110
-15316,9802,8822,-72.45,,9110
-15316,9802,8823,41.52,,9110
-15316,9802,8824,41.12,,9110
-15316,9802,8826,1000000.0,,9003
-15316,9802,8827,500000.0,,9003
-15317,9807,8801,38.0,,9110
-15317,9807,8802,-75.25,,9110
-15317,9807,8805,0.999995,,9201
-15317,9807,8806,656166.667,,9003
-15317,9807,8807,0.0,,9003
-15318,9807,8801,24.2,,9110
-15318,9807,8802,-81.0,,9110
-15318,9807,8805,0.999941177,,9201
-15318,9807,8806,656166.667,,9003
-15318,9807,8807,0.0,,9003
-15319,9807,8801,24.2,,9110
-15319,9807,8802,-82.0,,9110
-15319,9807,8805,0.999941177,,9201
-15319,9807,8806,656166.667,,9003
-15319,9807,8807,0.0,,9003
-15320,9802,8821,29.0,,9110
-15320,9802,8822,-84.3,,9110
-15320,9802,8823,30.45,,9110
-15320,9802,8824,29.35,,9110
-15320,9802,8826,1968500.0,,9003
-15320,9802,8827,0.0,,9003
-15321,9807,8801,30.0,,9110
-15321,9807,8802,-82.1,,9110
-15321,9807,8805,0.9999,,9201
-15321,9807,8806,656166.667,,9003
-15321,9807,8807,0.0,,9003
-15322,9807,8801,30.0,,9110
-15322,9807,8802,-84.1,,9110
-15322,9807,8805,0.9999,,9201
-15322,9807,8806,2296583.333,,9003
-15322,9807,8807,0.0,,9003
-15323,9807,8801,41.4,,9110
-15323,9807,8802,-112.1,,9110
-15323,9807,8805,0.999947368,,9201
-15323,9807,8806,656166.667,,9003
-15323,9807,8807,0.0,,9003
-15324,9807,8801,41.4,,9110
-15324,9807,8802,-114.0,,9110
-15324,9807,8805,0.999947368,,9201
-15324,9807,8806,1640416.667,,9003
-15324,9807,8807,0.0,,9003
-15325,9807,8801,41.4,,9110
-15325,9807,8802,-115.45,,9110
-15325,9807,8805,0.999933333,,9201
-15325,9807,8806,2624666.667,,9003
-15325,9807,8807,0.0,,9003
-15326,9807,8801,37.3,,9110
-15326,9807,8802,-85.4,,9110
-15326,9807,8805,0.999966667,,9201
-15326,9807,8806,328083.333,,9003
-15326,9807,8807,818125.0,,9003
-15327,9807,8801,37.3,,9110
-15327,9807,8802,-87.05,,9110
-15327,9807,8805,0.999966667,,9201
-15327,9807,8806,2952750.0,,9003
-15327,9807,8807,818125.0,,9003
-15328,9802,8821,37.3,,9110
-15328,9802,8822,-84.15,,9110
-15328,9802,8823,37.58,,9110
-15328,9802,8824,38.58,,9110
-15328,9802,8826,1640416.667,,9003
-15328,9802,8827,0.0,,9003
-15329,9802,8821,36.2,,9110
-15329,9802,8822,-85.45,,9110
-15329,9802,8823,37.56,,9110
-15329,9802,8824,36.44,,9110
-15329,9802,8826,1640416.667,,9003
-15329,9802,8827,1640416.667,,9003
-15330,9802,8821,37.4,,9110
-15330,9802,8822,-77.0,,9110
-15330,9802,8823,39.27,,9110
-15330,9802,8824,38.18,,9110
-15330,9802,8826,1312333.333,,9003
-15330,9802,8827,0.0,,9003
-15331,9802,8821,41.0,,9110
-15331,9802,8822,-71.3,,9110
-15331,9802,8823,42.41,,9110
-15331,9802,8824,41.43,,9110
-15331,9802,8826,656166.667,,9003
-15331,9802,8827,2460625.0,,9003
-15332,9802,8821,41.0,,9110
-15332,9802,8822,-70.3,,9110
-15332,9802,8823,41.29,,9110
-15332,9802,8824,41.17,,9110
-15332,9802,8826,1640416.667,,9003
-15332,9802,8827,0.0,,9003
-15333,9802,8821,44.47,,9110
-15333,9802,8822,-87.0,,9110
-15333,9802,8823,47.05,,9110
-15333,9802,8824,45.29,,9110
-15333,9802,8826,26246719.16,,9002
-15333,9802,8827,0.0,,9002
-15334,9802,8821,43.19,,9110
-15334,9802,8822,-84.22,,9110
-15334,9802,8823,45.42,,9110
-15334,9802,8824,44.11,,9110
-15334,9802,8826,19685039.37,,9002
-15334,9802,8827,0.0,,9002
-15335,9802,8821,41.3,,9110
-15335,9802,8822,-84.22,,9110
-15335,9802,8823,43.4,,9110
-15335,9802,8824,42.06,,9110
-15335,9802,8826,13123359.58,,9002
-15335,9802,8827,0.0,,9002
-15336,9807,8801,29.3,,9110
-15336,9807,8802,-88.5,,9110
-15336,9807,8805,0.99995,,9201
-15336,9807,8806,984250.0,,9003
-15336,9807,8807,0.0,,9003
-15337,9807,8801,29.3,,9110
-15337,9807,8802,-90.2,,9110
-15337,9807,8805,0.99995,,9201
-15337,9807,8806,2296583.333,,9003
-15337,9807,8807,0.0,,9003
-15338,9802,8821,44.15,,9110
-15338,9802,8822,-109.3,,9110
-15338,9802,8823,49.0,,9110
-15338,9802,8824,45.0,,9110
-15338,9802,8826,1968503.937,,9002
-15338,9802,8827,0.0,,9002
-15339,9807,8801,31.0,,9110
-15339,9807,8802,-104.2,,9110
-15339,9807,8805,0.999909091,,9201
-15339,9807,8806,541337.5,,9003
-15339,9807,8807,0.0,,9003
-15340,9807,8801,31.0,,9110
-15340,9807,8802,-106.15,,9110
-15340,9807,8805,0.9999,,9201
-15340,9807,8806,1640416.667,,9003
-15340,9807,8807,0.0,,9003
-15341,9807,8801,31.0,,9110
-15341,9807,8802,-107.5,,9110
-15341,9807,8805,0.999916667,,9201
-15341,9807,8806,2723091.667,,9003
-15341,9807,8807,0.0,,9003
-15342,9807,8801,38.5,,9110
-15342,9807,8802,-74.3,,9110
-15342,9807,8805,0.9999,,9201
-15342,9807,8806,492125.0,,9003
-15342,9807,8807,0.0,,9003
-15343,9807,8801,40.0,,9110
-15343,9807,8802,-76.35,,9110
-15343,9807,8805,0.9999375,,9201
-15343,9807,8806,820208.333,,9003
-15343,9807,8807,0.0,,9003
-15344,9807,8801,40.0,,9110
-15344,9807,8802,-78.35,,9110
-15344,9807,8805,0.9999375,,9201
-15344,9807,8806,1148291.667,,9003
-15344,9807,8807,0.0,,9003
-15345,9802,8821,40.1,,9110
-15345,9802,8822,-74.0,,9110
-15345,9802,8823,41.02,,9110
-15345,9802,8824,40.4,,9110
-15345,9802,8826,984250.0,,9003
-15345,9802,8827,0.0,,9003
-15346,9802,8821,33.45,,9110
-15346,9802,8822,-79.0,,9110
-15346,9802,8823,36.1,,9110
-15346,9802,8824,34.2,,9110
-15346,9802,8826,2000000.0,,9003
-15346,9802,8827,0.0,,9003
-15347,9802,8821,47.0,,9110
-15347,9802,8822,-100.3,,9110
-15347,9802,8823,48.44,,9110
-15347,9802,8824,47.26,,9110
-15347,9802,8826,1968503.937,,9002
-15347,9802,8827,0.0,,9002
-15348,9802,8821,45.4,,9110
-15348,9802,8822,-100.3,,9110
-15348,9802,8823,47.29,,9110
-15348,9802,8824,46.11,,9110
-15348,9802,8826,1968503.937,,9002
-15348,9802,8827,0.0,,9002
-15349,9802,8821,35.0,,9110
-15349,9802,8822,-98.0,,9110
-15349,9802,8823,36.46,,9110
-15349,9802,8824,35.34,,9110
-15349,9802,8826,1968500.0,,9003
-15349,9802,8827,0.0,,9003
-15350,9802,8821,33.2,,9110
-15350,9802,8822,-98.0,,9110
-15350,9802,8823,35.14,,9110
-15350,9802,8824,33.56,,9110
-15350,9802,8826,1968500.0,,9003
-15350,9802,8827,0.0,,9003
-15351,9802,8821,43.4,,9110
-15351,9802,8822,-120.3,,9110
-15351,9802,8823,46.0,,9110
-15351,9802,8824,44.2,,9110
-15351,9802,8826,8202099.738,,9002
-15351,9802,8827,0.0,,9002
-15352,9802,8821,41.4,,9110
-15352,9802,8822,-120.3,,9110
-15352,9802,8823,44.0,,9110
-15352,9802,8824,42.2,,9110
-15352,9802,8826,4921259.843,,9002
-15352,9802,8827,0.0,,9002
-15353,9802,8821,40.1,,9110
-15353,9802,8822,-77.45,,9110
-15353,9802,8823,41.57,,9110
-15353,9802,8824,40.53,,9110
-15353,9802,8826,1968500.0,,9003
-15353,9802,8827,0.0,,9003
-15354,9802,8821,39.2,,9110
-15354,9802,8822,-77.45,,9110
-15354,9802,8823,40.58,,9110
-15354,9802,8824,39.56,,9110
-15354,9802,8826,1968500.0,,9003
-15354,9802,8827,0.0,,9003
-15355,9802,8821,31.5,,9110
-15355,9802,8822,-81.0,,9110
-15355,9802,8823,34.5,,9110
-15355,9802,8824,32.3,,9110
-15355,9802,8826,2000000.0,,9002
-15355,9802,8827,0.0,,9002
-15356,9802,8821,34.2,,9110
-15356,9802,8822,-86.0,,9110
-15356,9802,8823,36.25,,9110
-15356,9802,8824,35.15,,9110
-15356,9802,8826,1968500.0,,9003
-15356,9802,8827,0.0,,9003
-15357,9802,8821,34.0,,9110
-15357,9802,8822,-101.3,,9110
-15357,9802,8823,36.11,,9110
-15357,9802,8824,34.39,,9110
-15357,9802,8826,656166.667,,9003
-15357,9802,8827,3280833.333,,9003
-15358,9802,8821,31.4,,9110
-15358,9802,8822,-98.3,,9110
-15358,9802,8823,33.58,,9110
-15358,9802,8824,32.08,,9110
-15358,9802,8826,1968500.0,,9003
-15358,9802,8827,6561666.667,,9003
-15359,9802,8821,29.4,,9110
-15359,9802,8822,-100.2,,9110
-15359,9802,8823,31.53,,9110
-15359,9802,8824,30.07,,9110
-15359,9802,8826,2296583.333,,9003
-15359,9802,8827,9842500.0,,9003
-15360,9802,8821,27.5,,9110
-15360,9802,8822,-99.0,,9110
-15360,9802,8823,30.17,,9110
-15360,9802,8824,28.23,,9110
-15360,9802,8826,1968500.0,,9003
-15360,9802,8827,13123333.333,,9003
-15361,9802,8821,25.4,,9110
-15361,9802,8822,-98.3,,9110
-15361,9802,8823,27.5,,9110
-15361,9802,8824,26.1,,9110
-15361,9802,8826,984250.0,,9003
-15361,9802,8827,16404166.667,,9003
-15362,9802,8821,40.2,,9110
-15362,9802,8822,-111.3,,9110
-15362,9802,8823,41.47,,9110
-15362,9802,8824,40.43,,9110
-15362,9802,8826,1640419.948,,9002
-15362,9802,8827,3280839.895,,9002
-15363,9802,8821,38.2,,9110
-15363,9802,8822,-111.3,,9110
-15363,9802,8823,40.39,,9110
-15363,9802,8824,39.01,,9110
-15363,9802,8826,1640419.948,,9002
-15363,9802,8827,6561679.79,,9002
-15364,9802,8821,36.4,,9110
-15364,9802,8822,-111.3,,9110
-15364,9802,8823,38.21,,9110
-15364,9802,8824,37.13,,9110
-15364,9802,8826,1640419.948,,9002
-15364,9802,8827,9842519.685,,9002
-15365,9802,8821,37.4,,9110
-15365,9802,8822,-78.3,,9110
-15365,9802,8823,39.12,,9110
-15365,9802,8824,38.02,,9110
-15365,9802,8826,11482916.667,,9003
-15365,9802,8827,6561666.667,,9003
-15366,9802,8821,36.2,,9110
-15366,9802,8822,-78.3,,9110
-15366,9802,8823,37.58,,9110
-15366,9802,8824,36.46,,9110
-15366,9802,8826,11482916.667,,9003
-15366,9802,8827,3280833.333,,9003
-15367,9802,8821,47.0,,9110
-15367,9802,8822,-120.5,,9110
-15367,9802,8823,48.44,,9110
-15367,9802,8824,47.3,,9110
-15367,9802,8826,1640416.667,,9003
-15367,9802,8827,0.0,,9003
-15368,9802,8821,45.2,,9110
-15368,9802,8822,-120.3,,9110
-15368,9802,8823,47.2,,9110
-15368,9802,8824,45.5,,9110
-15368,9802,8826,1640416.667,,9003
-15368,9802,8827,0.0,,9003
-15369,9802,8821,45.1,,9110
-15369,9802,8822,-90.0,,9110
-15369,9802,8823,46.46,,9110
-15369,9802,8824,45.34,,9110
-15369,9802,8826,1968500.0,,9003
-15369,9802,8827,0.0,,9003
-15370,9802,8821,43.5,,9110
-15370,9802,8822,-90.0,,9110
-15370,9802,8823,45.3,,9110
-15370,9802,8824,44.15,,9110
-15370,9802,8826,1968500.0,,9003
-15370,9802,8827,0.0,,9003
-15371,9802,8821,42.0,,9110
-15371,9802,8822,-90.0,,9110
-15371,9802,8823,44.04,,9110
-15371,9802,8824,42.44,,9110
-15371,9802,8826,1968500.0,,9003
-15371,9802,8827,0.0,,9003
-15914,9807,8801,0.0,,9102
-15914,9807,8802,-99.0,,9102
-15914,9807,8805,0.9996,,9201
-15914,9807,8806,1640416.67,,9003
-15914,9807,8807,0.0,,9003
-15915,9807,8801,0.0,,9102
-15915,9807,8802,-93.0,,9102
-15915,9807,8805,0.9996,,9201
-15915,9807,8806,1640416.67,,9003
-15915,9807,8807,0.0,,9003
-15916,9807,8801,0.0,,9102
-15916,9807,8802,-87.0,,9102
-15916,9807,8805,0.9996,,9201
-15916,9807,8806,1640416.67,,9003
-15916,9807,8807,0.0,,9003
-15917,9807,8801,0.0,,9102
-15917,9807,8802,-81.0,,9102
-15917,9807,8805,0.9996,,9201
-15917,9807,8806,1640416.67,,9003
-15917,9807,8807,0.0,,9003
-16000,9824,8801,0.0,,9102
-16000,9824,8805,0.9996,,9201
-16000,9824,8806,500000.0,,9001
-16000,9824,8807,0.0,,9001
-16000,9824,8830,-180.0,,9102
-16000,9824,8831,6.0,,9102
-16001,9807,8801,0.0,,9102
-16001,9807,8802,-177.0,,9102
-16001,9807,8805,0.9996,,9201
-16001,9807,8806,500000.0,,9001
-16001,9807,8807,0.0,,9001
-16002,9807,8801,0.0,,9102
-16002,9807,8802,-171.0,,9102
-16002,9807,8805,0.9996,,9201
-16002,9807,8806,500000.0,,9001
-16002,9807,8807,0.0,,9001
-16003,9807,8801,0.0,,9102
-16003,9807,8802,-165.0,,9102
-16003,9807,8805,0.9996,,9201
-16003,9807,8806,500000.0,,9001
-16003,9807,8807,0.0,,9001
-16004,9807,8801,0.0,,9102
-16004,9807,8802,-159.0,,9102
-16004,9807,8805,0.9996,,9201
-16004,9807,8806,500000.0,,9001
-16004,9807,8807,0.0,,9001
-16005,9807,8801,0.0,,9102
-16005,9807,8802,-153.0,,9102
-16005,9807,8805,0.9996,,9201
-16005,9807,8806,500000.0,,9001
-16005,9807,8807,0.0,,9001
-16006,9807,8801,0.0,,9102
-16006,9807,8802,-147.0,,9102
-16006,9807,8805,0.9996,,9201
-16006,9807,8806,500000.0,,9001
-16006,9807,8807,0.0,,9001
-16007,9807,8801,0.0,,9102
-16007,9807,8802,-141.0,,9102
-16007,9807,8805,0.9996,,9201
-16007,9807,8806,500000.0,,9001
-16007,9807,8807,0.0,,9001
-16008,9807,8801,0.0,,9102
-16008,9807,8802,-135.0,,9102
-16008,9807,8805,0.9996,,9201
-16008,9807,8806,500000.0,,9001
-16008,9807,8807,0.0,,9001
-16009,9807,8801,0.0,,9102
-16009,9807,8802,-129.0,,9102
-16009,9807,8805,0.9996,,9201
-16009,9807,8806,500000.0,,9001
-16009,9807,8807,0.0,,9001
-16010,9807,8801,0.0,,9102
-16010,9807,8802,-123.0,,9102
-16010,9807,8805,0.9996,,9201
-16010,9807,8806,500000.0,,9001
-16010,9807,8807,0.0,,9001
-16011,9807,8801,0.0,,9102
-16011,9807,8802,-117.0,,9102
-16011,9807,8805,0.9996,,9201
-16011,9807,8806,500000.0,,9001
-16011,9807,8807,0.0,,9001
-16012,9807,8801,0.0,,9102
-16012,9807,8802,-111.0,,9102
-16012,9807,8805,0.9996,,9201
-16012,9807,8806,500000.0,,9001
-16012,9807,8807,0.0,,9001
-16013,9807,8801,0.0,,9102
-16013,9807,8802,-105.0,,9102
-16013,9807,8805,0.9996,,9201
-16013,9807,8806,500000.0,,9001
-16013,9807,8807,0.0,,9001
-16014,9807,8801,0.0,,9102
-16014,9807,8802,-99.0,,9102
-16014,9807,8805,0.9996,,9201
-16014,9807,8806,500000.0,,9001
-16014,9807,8807,0.0,,9001
-16015,9807,8801,0.0,,9102
-16015,9807,8802,-93.0,,9102
-16015,9807,8805,0.9996,,9201
-16015,9807,8806,500000.0,,9001
-16015,9807,8807,0.0,,9001
-16016,9807,8801,0.0,,9102
-16016,9807,8802,-87.0,,9102
-16016,9807,8805,0.9996,,9201
-16016,9807,8806,500000.0,,9001
-16016,9807,8807,0.0,,9001
-16017,9807,8801,0.0,,9102
-16017,9807,8802,-81.0,,9102
-16017,9807,8805,0.9996,,9201
-16017,9807,8806,500000.0,,9001
-16017,9807,8807,0.0,,9001
-16018,9807,8801,0.0,,9102
-16018,9807,8802,-75.0,,9102
-16018,9807,8805,0.9996,,9201
-16018,9807,8806,500000.0,,9001
-16018,9807,8807,0.0,,9001
-16019,9807,8801,0.0,,9102
-16019,9807,8802,-69.0,,9102
-16019,9807,8805,0.9996,,9201
-16019,9807,8806,500000.0,,9001
-16019,9807,8807,0.0,,9001
-16020,9807,8801,0.0,,9102
-16020,9807,8802,-63.0,,9102
-16020,9807,8805,0.9996,,9201
-16020,9807,8806,500000.0,,9001
-16020,9807,8807,0.0,,9001
-16021,9807,8801,0.0,,9102
-16021,9807,8802,-57.0,,9102
-16021,9807,8805,0.9996,,9201
-16021,9807,8806,500000.0,,9001
-16021,9807,8807,0.0,,9001
-16022,9807,8801,0.0,,9102
-16022,9807,8802,-51.0,,9102
-16022,9807,8805,0.9996,,9201
-16022,9807,8806,500000.0,,9001
-16022,9807,8807,0.0,,9001
-16023,9807,8801,0.0,,9102
-16023,9807,8802,-45.0,,9102
-16023,9807,8805,0.9996,,9201
-16023,9807,8806,500000.0,,9001
-16023,9807,8807,0.0,,9001
-16024,9807,8801,0.0,,9102
-16024,9807,8802,-39.0,,9102
-16024,9807,8805,0.9996,,9201
-16024,9807,8806,500000.0,,9001
-16024,9807,8807,0.0,,9001
-16025,9807,8801,0.0,,9102
-16025,9807,8802,-33.0,,9102
-16025,9807,8805,0.9996,,9201
-16025,9807,8806,500000.0,,9001
-16025,9807,8807,0.0,,9001
-16026,9807,8801,0.0,,9102
-16026,9807,8802,-27.0,,9102
-16026,9807,8805,0.9996,,9201
-16026,9807,8806,500000.0,,9001
-16026,9807,8807,0.0,,9001
-16027,9807,8801,0.0,,9102
-16027,9807,8802,-21.0,,9102
-16027,9807,8805,0.9996,,9201
-16027,9807,8806,500000.0,,9001
-16027,9807,8807,0.0,,9001
-16028,9807,8801,0.0,,9102
-16028,9807,8802,-15.0,,9102
-16028,9807,8805,0.9996,,9201
-16028,9807,8806,500000.0,,9001
-16028,9807,8807,0.0,,9001
-16029,9807,8801,0.0,,9102
-16029,9807,8802,-9.0,,9102
-16029,9807,8805,0.9996,,9201
-16029,9807,8806,500000.0,,9001
-16029,9807,8807,0.0,,9001
-16030,9807,8801,0.0,,9102
-16030,9807,8802,-3.0,,9102
-16030,9807,8805,0.9996,,9201
-16030,9807,8806,500000.0,,9001
-16030,9807,8807,0.0,,9001
-16031,9807,8801,0.0,,9102
-16031,9807,8802,3.0,,9102
-16031,9807,8805,0.9996,,9201
-16031,9807,8806,500000.0,,9001
-16031,9807,8807,0.0,,9001
-16032,9807,8801,0.0,,9102
-16032,9807,8802,9.0,,9102
-16032,9807,8805,0.9996,,9201
-16032,9807,8806,500000.0,,9001
-16032,9807,8807,0.0,,9001
-16033,9807,8801,0.0,,9102
-16033,9807,8802,15.0,,9102
-16033,9807,8805,0.9996,,9201
-16033,9807,8806,500000.0,,9001
-16033,9807,8807,0.0,,9001
-16034,9807,8801,0.0,,9102
-16034,9807,8802,21.0,,9102
-16034,9807,8805,0.9996,,9201
-16034,9807,8806,500000.0,,9001
-16034,9807,8807,0.0,,9001
-16035,9807,8801,0.0,,9102
-16035,9807,8802,27.0,,9102
-16035,9807,8805,0.9996,,9201
-16035,9807,8806,500000.0,,9001
-16035,9807,8807,0.0,,9001
-16036,9807,8801,0.0,,9102
-16036,9807,8802,33.0,,9102
-16036,9807,8805,0.9996,,9201
-16036,9807,8806,500000.0,,9001
-16036,9807,8807,0.0,,9001
-16037,9807,8801,0.0,,9102
-16037,9807,8802,39.0,,9102
-16037,9807,8805,0.9996,,9201
-16037,9807,8806,500000.0,,9001
-16037,9807,8807,0.0,,9001
-16038,9807,8801,0.0,,9102
-16038,9807,8802,45.0,,9102
-16038,9807,8805,0.9996,,9201
-16038,9807,8806,500000.0,,9001
-16038,9807,8807,0.0,,9001
-16039,9807,8801,0.0,,9102
-16039,9807,8802,51.0,,9102
-16039,9807,8805,0.9996,,9201
-16039,9807,8806,500000.0,,9001
-16039,9807,8807,0.0,,9001
-16040,9807,8801,0.0,,9102
-16040,9807,8802,57.0,,9102
-16040,9807,8805,0.9996,,9201
-16040,9807,8806,500000.0,,9001
-16040,9807,8807,0.0,,9001
-16041,9807,8801,0.0,,9102
-16041,9807,8802,63.0,,9102
-16041,9807,8805,0.9996,,9201
-16041,9807,8806,500000.0,,9001
-16041,9807,8807,0.0,,9001
-16042,9807,8801,0.0,,9102
-16042,9807,8802,69.0,,9102
-16042,9807,8805,0.9996,,9201
-16042,9807,8806,500000.0,,9001
-16042,9807,8807,0.0,,9001
-16043,9807,8801,0.0,,9102
-16043,9807,8802,75.0,,9102
-16043,9807,8805,0.9996,,9201
-16043,9807,8806,500000.0,,9001
-16043,9807,8807,0.0,,9001
-16044,9807,8801,0.0,,9102
-16044,9807,8802,81.0,,9102
-16044,9807,8805,0.9996,,9201
-16044,9807,8806,500000.0,,9001
-16044,9807,8807,0.0,,9001
-16045,9807,8801,0.0,,9102
-16045,9807,8802,87.0,,9102
-16045,9807,8805,0.9996,,9201
-16045,9807,8806,500000.0,,9001
-16045,9807,8807,0.0,,9001
-16046,9807,8801,0.0,,9102
-16046,9807,8802,93.0,,9102
-16046,9807,8805,0.9996,,9201
-16046,9807,8806,500000.0,,9001
-16046,9807,8807,0.0,,9001
-16047,9807,8801,0.0,,9102
-16047,9807,8802,99.0,,9102
-16047,9807,8805,0.9996,,9201
-16047,9807,8806,500000.0,,9001
-16047,9807,8807,0.0,,9001
-16048,9807,8801,0.0,,9102
-16048,9807,8802,105.0,,9102
-16048,9807,8805,0.9996,,9201
-16048,9807,8806,500000.0,,9001
-16048,9807,8807,0.0,,9001
-16049,9807,8801,0.0,,9102
-16049,9807,8802,111.0,,9102
-16049,9807,8805,0.9996,,9201
-16049,9807,8806,500000.0,,9001
-16049,9807,8807,0.0,,9001
-16050,9807,8801,0.0,,9102
-16050,9807,8802,117.0,,9102
-16050,9807,8805,0.9996,,9201
-16050,9807,8806,500000.0,,9001
-16050,9807,8807,0.0,,9001
-16051,9807,8801,0.0,,9102
-16051,9807,8802,123.0,,9102
-16051,9807,8805,0.9996,,9201
-16051,9807,8806,500000.0,,9001
-16051,9807,8807,0.0,,9001
-16052,9807,8801,0.0,,9102
-16052,9807,8802,129.0,,9102
-16052,9807,8805,0.9996,,9201
-16052,9807,8806,500000.0,,9001
-16052,9807,8807,0.0,,9001
-16053,9807,8801,0.0,,9102
-16053,9807,8802,135.0,,9102
-16053,9807,8805,0.9996,,9201
-16053,9807,8806,500000.0,,9001
-16053,9807,8807,0.0,,9001
-16054,9807,8801,0.0,,9102
-16054,9807,8802,141.0,,9102
-16054,9807,8805,0.9996,,9201
-16054,9807,8806,500000.0,,9001
-16054,9807,8807,0.0,,9001
-16055,9807,8801,0.0,,9102
-16055,9807,8802,147.0,,9102
-16055,9807,8805,0.9996,,9201
-16055,9807,8806,500000.0,,9001
-16055,9807,8807,0.0,,9001
-16056,9807,8801,0.0,,9102
-16056,9807,8802,153.0,,9102
-16056,9807,8805,0.9996,,9201
-16056,9807,8806,500000.0,,9001
-16056,9807,8807,0.0,,9001
-16057,9807,8801,0.0,,9102
-16057,9807,8802,159.0,,9102
-16057,9807,8805,0.9996,,9201
-16057,9807,8806,500000.0,,9001
-16057,9807,8807,0.0,,9001
-16058,9807,8801,0.0,,9102
-16058,9807,8802,165.0,,9102
-16058,9807,8805,0.9996,,9201
-16058,9807,8806,500000.0,,9001
-16058,9807,8807,0.0,,9001
-16059,9807,8801,0.0,,9102
-16059,9807,8802,171.0,,9102
-16059,9807,8805,0.9996,,9201
-16059,9807,8806,500000.0,,9001
-16059,9807,8807,0.0,,9001
-16060,9807,8801,0.0,,9102
-16060,9807,8802,177.0,,9102
-16060,9807,8805,0.9996,,9201
-16060,9807,8806,500000.0,,9001
-16060,9807,8807,0.0,,9001
-16061,9810,8801,90.0,,9102
-16061,9810,8802,0.0,,9102
-16061,9810,8805,0.994,,9201
-16061,9810,8806,2000000.0,,9001
-16061,9810,8807,2000000.0,,9001
-16070,9807,8801,0.0,,9102
-16070,9807,8802,120.0,,9102
-16070,9807,8805,1.0,,9201
-16070,9807,8806,40500000.0,,9001
-16070,9807,8807,0.0,,9001
-16071,9807,8801,0.0,,9102
-16071,9807,8802,123.0,,9102
-16071,9807,8805,1.0,,9201
-16071,9807,8806,41500000.0,,9001
-16071,9807,8807,0.0,,9001
-16072,9807,8801,0.0,,9102
-16072,9807,8802,126.0,,9102
-16072,9807,8805,1.0,,9201
-16072,9807,8806,42500000.0,,9001
-16072,9807,8807,0.0,,9001
-16073,9807,8801,0.0,,9102
-16073,9807,8802,129.0,,9102
-16073,9807,8805,1.0,,9201
-16073,9807,8806,43500000.0,,9001
-16073,9807,8807,0.0,,9001
-16074,9807,8801,0.0,,9102
-16074,9807,8802,132.0,,9102
-16074,9807,8805,1.0,,9201
-16074,9807,8806,44500000.0,,9001
-16074,9807,8807,0.0,,9001
-16075,9807,8801,0.0,,9102
-16075,9807,8802,135.0,,9102
-16075,9807,8805,1.0,,9201
-16075,9807,8806,45500000.0,,9001
-16075,9807,8807,0.0,,9001
-16076,9807,8801,0.0,,9102
-16076,9807,8802,138.0,,9102
-16076,9807,8805,1.0,,9201
-16076,9807,8806,46500000.0,,9001
-16076,9807,8807,0.0,,9001
-16077,9807,8801,0.0,,9102
-16077,9807,8802,141.0,,9102
-16077,9807,8805,1.0,,9201
-16077,9807,8806,47500000.0,,9001
-16077,9807,8807,0.0,,9001
-16078,9807,8801,0.0,,9102
-16078,9807,8802,144.0,,9102
-16078,9807,8805,1.0,,9201
-16078,9807,8806,48500000.0,,9001
-16078,9807,8807,0.0,,9001
-16079,9807,8801,0.0,,9102
-16079,9807,8802,147.0,,9102
-16079,9807,8805,1.0,,9201
-16079,9807,8806,49500000.0,,9001
-16079,9807,8807,0.0,,9001
-16080,9807,8801,0.0,,9102
-16080,9807,8802,150.0,,9102
-16080,9807,8805,1.0,,9201
-16080,9807,8806,50500000.0,,9001
-16080,9807,8807,0.0,,9001
-16081,9807,8801,0.0,,9102
-16081,9807,8802,153.0,,9102
-16081,9807,8805,1.0,,9201
-16081,9807,8806,51500000.0,,9001
-16081,9807,8807,0.0,,9001
-16082,9807,8801,0.0,,9102
-16082,9807,8802,156.0,,9102
-16082,9807,8805,1.0,,9201
-16082,9807,8806,52500000.0,,9001
-16082,9807,8807,0.0,,9001
-16083,9807,8801,0.0,,9102
-16083,9807,8802,159.0,,9102
-16083,9807,8805,1.0,,9201
-16083,9807,8806,53500000.0,,9001
-16083,9807,8807,0.0,,9001
-16084,9807,8801,0.0,,9102
-16084,9807,8802,162.0,,9102
-16084,9807,8805,1.0,,9201
-16084,9807,8806,54500000.0,,9001
-16084,9807,8807,0.0,,9001
-16085,9807,8801,0.0,,9102
-16085,9807,8802,165.0,,9102
-16085,9807,8805,1.0,,9201
-16085,9807,8806,55500000.0,,9001
-16085,9807,8807,0.0,,9001
-16086,9807,8801,0.0,,9102
-16086,9807,8802,168.0,,9102
-16086,9807,8805,1.0,,9201
-16086,9807,8806,56500000.0,,9001
-16086,9807,8807,0.0,,9001
-16087,9807,8801,0.0,,9102
-16087,9807,8802,171.0,,9102
-16087,9807,8805,1.0,,9201
-16087,9807,8806,57500000.0,,9001
-16087,9807,8807,0.0,,9001
-16088,9807,8801,0.0,,9102
-16088,9807,8802,174.0,,9102
-16088,9807,8805,1.0,,9201
-16088,9807,8806,58500000.0,,9001
-16088,9807,8807,0.0,,9001
-16089,9807,8801,0.0,,9102
-16089,9807,8802,177.0,,9102
-16089,9807,8805,1.0,,9201
-16089,9807,8806,59500000.0,,9001
-16089,9807,8807,0.0,,9001
-16090,9807,8801,0.0,,9102
-16090,9807,8802,180.0,,9102
-16090,9807,8805,1.0,,9201
-16090,9807,8806,60000000.0,,9001
-16090,9807,8807,0.0,,9001
-16091,9807,8801,0.0,,9102
-16091,9807,8802,-177.0,,9102
-16091,9807,8805,1.0,,9201
-16091,9807,8806,61500000.0,,9001
-16091,9807,8807,0.0,,9001
-16092,9807,8801,0.0,,9102
-16092,9807,8802,-174.0,,9102
-16092,9807,8805,1.0,,9201
-16092,9807,8806,62500000.0,,9001
-16092,9807,8807,0.0,,9001
-16093,9807,8801,0.0,,9102
-16093,9807,8802,-171.0,,9102
-16093,9807,8805,1.0,,9201
-16093,9807,8806,63500000.0,,9001
-16093,9807,8807,0.0,,9001
-16094,9807,8801,0.0,,9102
-16094,9807,8802,-168.0,,9102
-16094,9807,8805,1.0,,9201
-16094,9807,8806,64500000.0,,9001
-16094,9807,8807,0.0,,9001
-16100,9824,8801,0.0,,9102
-16100,9824,8805,0.9996,,9201
-16100,9824,8806,500000.0,,9001
-16100,9824,8807,10000000.0,,9001
-16100,9824,8830,-180.0,,9102
-16100,9824,8831,6.0,,9102
-16101,9807,8801,0.0,,9102
-16101,9807,8802,-177.0,,9102
-16101,9807,8805,0.9996,,9201
-16101,9807,8806,500000.0,,9001
-16101,9807,8807,10000000.0,,9001
-16102,9807,8801,0.0,,9102
-16102,9807,8802,-171.0,,9102
-16102,9807,8805,0.9996,,9201
-16102,9807,8806,500000.0,,9001
-16102,9807,8807,10000000.0,,9001
-16103,9807,8801,0.0,,9102
-16103,9807,8802,-165.0,,9102
-16103,9807,8805,0.9996,,9201
-16103,9807,8806,500000.0,,9001
-16103,9807,8807,10000000.0,,9001
-16104,9807,8801,0.0,,9102
-16104,9807,8802,-159.0,,9102
-16104,9807,8805,0.9996,,9201
-16104,9807,8806,500000.0,,9001
-16104,9807,8807,10000000.0,,9001
-16105,9807,8801,0.0,,9102
-16105,9807,8802,-153.0,,9102
-16105,9807,8805,0.9996,,9201
-16105,9807,8806,500000.0,,9001
-16105,9807,8807,10000000.0,,9001
-16106,9807,8801,0.0,,9102
-16106,9807,8802,-147.0,,9102
-16106,9807,8805,0.9996,,9201
-16106,9807,8806,500000.0,,9001
-16106,9807,8807,10000000.0,,9001
-16107,9807,8801,0.0,,9102
-16107,9807,8802,-141.0,,9102
-16107,9807,8805,0.9996,,9201
-16107,9807,8806,500000.0,,9001
-16107,9807,8807,10000000.0,,9001
-16108,9807,8801,0.0,,9102
-16108,9807,8802,-135.0,,9102
-16108,9807,8805,0.9996,,9201
-16108,9807,8806,500000.0,,9001
-16108,9807,8807,10000000.0,,9001
-16109,9807,8801,0.0,,9102
-16109,9807,8802,-129.0,,9102
-16109,9807,8805,0.9996,,9201
-16109,9807,8806,500000.0,,9001
-16109,9807,8807,10000000.0,,9001
-16110,9807,8801,0.0,,9102
-16110,9807,8802,-123.0,,9102
-16110,9807,8805,0.9996,,9201
-16110,9807,8806,500000.0,,9001
-16110,9807,8807,10000000.0,,9001
-16111,9807,8801,0.0,,9102
-16111,9807,8802,-117.0,,9102
-16111,9807,8805,0.9996,,9201
-16111,9807,8806,500000.0,,9001
-16111,9807,8807,10000000.0,,9001
-16112,9807,8801,0.0,,9102
-16112,9807,8802,-111.0,,9102
-16112,9807,8805,0.9996,,9201
-16112,9807,8806,500000.0,,9001
-16112,9807,8807,10000000.0,,9001
-16113,9807,8801,0.0,,9102
-16113,9807,8802,-105.0,,9102
-16113,9807,8805,0.9996,,9201
-16113,9807,8806,500000.0,,9001
-16113,9807,8807,10000000.0,,9001
-16114,9807,8801,0.0,,9102
-16114,9807,8802,-99.0,,9102
-16114,9807,8805,0.9996,,9201
-16114,9807,8806,500000.0,,9001
-16114,9807,8807,10000000.0,,9001
-16115,9807,8801,0.0,,9102
-16115,9807,8802,-93.0,,9102
-16115,9807,8805,0.9996,,9201
-16115,9807,8806,500000.0,,9001
-16115,9807,8807,10000000.0,,9001
-16116,9807,8801,0.0,,9102
-16116,9807,8802,-87.0,,9102
-16116,9807,8805,0.9996,,9201
-16116,9807,8806,500000.0,,9001
-16116,9807,8807,10000000.0,,9001
-16117,9807,8801,0.0,,9102
-16117,9807,8802,-81.0,,9102
-16117,9807,8805,0.9996,,9201
-16117,9807,8806,500000.0,,9001
-16117,9807,8807,10000000.0,,9001
-16118,9807,8801,0.0,,9102
-16118,9807,8802,-75.0,,9102
-16118,9807,8805,0.9996,,9201
-16118,9807,8806,500000.0,,9001
-16118,9807,8807,10000000.0,,9001
-16119,9807,8801,0.0,,9102
-16119,9807,8802,-69.0,,9102
-16119,9807,8805,0.9996,,9201
-16119,9807,8806,500000.0,,9001
-16119,9807,8807,10000000.0,,9001
-16120,9807,8801,0.0,,9102
-16120,9807,8802,-63.0,,9102
-16120,9807,8805,0.9996,,9201
-16120,9807,8806,500000.0,,9001
-16120,9807,8807,10000000.0,,9001
-16121,9807,8801,0.0,,9102
-16121,9807,8802,-57.0,,9102
-16121,9807,8805,0.9996,,9201
-16121,9807,8806,500000.0,,9001
-16121,9807,8807,10000000.0,,9001
-16122,9807,8801,0.0,,9102
-16122,9807,8802,-51.0,,9102
-16122,9807,8805,0.9996,,9201
-16122,9807,8806,500000.0,,9001
-16122,9807,8807,10000000.0,,9001
-16123,9807,8801,0.0,,9102
-16123,9807,8802,-45.0,,9102
-16123,9807,8805,0.9996,,9201
-16123,9807,8806,500000.0,,9001
-16123,9807,8807,10000000.0,,9001
-16124,9807,8801,0.0,,9102
-16124,9807,8802,-39.0,,9102
-16124,9807,8805,0.9996,,9201
-16124,9807,8806,500000.0,,9001
-16124,9807,8807,10000000.0,,9001
-16125,9807,8801,0.0,,9102
-16125,9807,8802,-33.0,,9102
-16125,9807,8805,0.9996,,9201
-16125,9807,8806,500000.0,,9001
-16125,9807,8807,10000000.0,,9001
-16126,9807,8801,0.0,,9102
-16126,9807,8802,-27.0,,9102
-16126,9807,8805,0.9996,,9201
-16126,9807,8806,500000.0,,9001
-16126,9807,8807,10000000.0,,9001
-16127,9807,8801,0.0,,9102
-16127,9807,8802,-21.0,,9102
-16127,9807,8805,0.9996,,9201
-16127,9807,8806,500000.0,,9001
-16127,9807,8807,10000000.0,,9001
-16128,9807,8801,0.0,,9102
-16128,9807,8802,-15.0,,9102
-16128,9807,8805,0.9996,,9201
-16128,9807,8806,500000.0,,9001
-16128,9807,8807,10000000.0,,9001
-16129,9807,8801,0.0,,9102
-16129,9807,8802,-9.0,,9102
-16129,9807,8805,0.9996,,9201
-16129,9807,8806,500000.0,,9001
-16129,9807,8807,10000000.0,,9001
-16130,9807,8801,0.0,,9102
-16130,9807,8802,-3.0,,9102
-16130,9807,8805,0.9996,,9201
-16130,9807,8806,500000.0,,9001
-16130,9807,8807,10000000.0,,9001
-16131,9807,8801,0.0,,9102
-16131,9807,8802,3.0,,9102
-16131,9807,8805,0.9996,,9201
-16131,9807,8806,500000.0,,9001
-16131,9807,8807,10000000.0,,9001
-16132,9807,8801,0.0,,9102
-16132,9807,8802,9.0,,9102
-16132,9807,8805,0.9996,,9201
-16132,9807,8806,500000.0,,9001
-16132,9807,8807,10000000.0,,9001
-16133,9807,8801,0.0,,9102
-16133,9807,8802,15.0,,9102
-16133,9807,8805,0.9996,,9201
-16133,9807,8806,500000.0,,9001
-16133,9807,8807,10000000.0,,9001
-16134,9807,8801,0.0,,9102
-16134,9807,8802,21.0,,9102
-16134,9807,8805,0.9996,,9201
-16134,9807,8806,500000.0,,9001
-16134,9807,8807,10000000.0,,9001
-16135,9807,8801,0.0,,9102
-16135,9807,8802,27.0,,9102
-16135,9807,8805,0.9996,,9201
-16135,9807,8806,500000.0,,9001
-16135,9807,8807,10000000.0,,9001
-16136,9807,8801,0.0,,9102
-16136,9807,8802,33.0,,9102
-16136,9807,8805,0.9996,,9201
-16136,9807,8806,500000.0,,9001
-16136,9807,8807,10000000.0,,9001
-16137,9807,8801,0.0,,9102
-16137,9807,8802,39.0,,9102
-16137,9807,8805,0.9996,,9201
-16137,9807,8806,500000.0,,9001
-16137,9807,8807,10000000.0,,9001
-16138,9807,8801,0.0,,9102
-16138,9807,8802,45.0,,9102
-16138,9807,8805,0.9996,,9201
-16138,9807,8806,500000.0,,9001
-16138,9807,8807,10000000.0,,9001
-16139,9807,8801,0.0,,9102
-16139,9807,8802,51.0,,9102
-16139,9807,8805,0.9996,,9201
-16139,9807,8806,500000.0,,9001
-16139,9807,8807,10000000.0,,9001
-16140,9807,8801,0.0,,9102
-16140,9807,8802,57.0,,9102
-16140,9807,8805,0.9996,,9201
-16140,9807,8806,500000.0,,9001
-16140,9807,8807,10000000.0,,9001
-16141,9807,8801,0.0,,9102
-16141,9807,8802,63.0,,9102
-16141,9807,8805,0.9996,,9201
-16141,9807,8806,500000.0,,9001
-16141,9807,8807,10000000.0,,9001
-16142,9807,8801,0.0,,9102
-16142,9807,8802,69.0,,9102
-16142,9807,8805,0.9996,,9201
-16142,9807,8806,500000.0,,9001
-16142,9807,8807,10000000.0,,9001
-16143,9807,8801,0.0,,9102
-16143,9807,8802,75.0,,9102
-16143,9807,8805,0.9996,,9201
-16143,9807,8806,500000.0,,9001
-16143,9807,8807,10000000.0,,9001
-16144,9807,8801,0.0,,9102
-16144,9807,8802,81.0,,9102
-16144,9807,8805,0.9996,,9201
-16144,9807,8806,500000.0,,9001
-16144,9807,8807,10000000.0,,9001
-16145,9807,8801,0.0,,9102
-16145,9807,8802,87.0,,9102
-16145,9807,8805,0.9996,,9201
-16145,9807,8806,500000.0,,9001
-16145,9807,8807,10000000.0,,9001
-16146,9807,8801,0.0,,9102
-16146,9807,8802,93.0,,9102
-16146,9807,8805,0.9996,,9201
-16146,9807,8806,500000.0,,9001
-16146,9807,8807,10000000.0,,9001
-16147,9807,8801,0.0,,9102
-16147,9807,8802,99.0,,9102
-16147,9807,8805,0.9996,,9201
-16147,9807,8806,500000.0,,9001
-16147,9807,8807,10000000.0,,9001
-16148,9807,8801,0.0,,9102
-16148,9807,8802,105.0,,9102
-16148,9807,8805,0.9996,,9201
-16148,9807,8806,500000.0,,9001
-16148,9807,8807,10000000.0,,9001
-16149,9807,8801,0.0,,9102
-16149,9807,8802,111.0,,9102
-16149,9807,8805,0.9996,,9201
-16149,9807,8806,500000.0,,9001
-16149,9807,8807,10000000.0,,9001
-16150,9807,8801,0.0,,9102
-16150,9807,8802,117.0,,9102
-16150,9807,8805,0.9996,,9201
-16150,9807,8806,500000.0,,9001
-16150,9807,8807,10000000.0,,9001
-16151,9807,8801,0.0,,9102
-16151,9807,8802,123.0,,9102
-16151,9807,8805,0.9996,,9201
-16151,9807,8806,500000.0,,9001
-16151,9807,8807,10000000.0,,9001
-16152,9807,8801,0.0,,9102
-16152,9807,8802,129.0,,9102
-16152,9807,8805,0.9996,,9201
-16152,9807,8806,500000.0,,9001
-16152,9807,8807,10000000.0,,9001
-16153,9807,8801,0.0,,9102
-16153,9807,8802,135.0,,9102
-16153,9807,8805,0.9996,,9201
-16153,9807,8806,500000.0,,9001
-16153,9807,8807,10000000.0,,9001
-16154,9807,8801,0.0,,9102
-16154,9807,8802,141.0,,9102
-16154,9807,8805,0.9996,,9201
-16154,9807,8806,500000.0,,9001
-16154,9807,8807,10000000.0,,9001
-16155,9807,8801,0.0,,9102
-16155,9807,8802,147.0,,9102
-16155,9807,8805,0.9996,,9201
-16155,9807,8806,500000.0,,9001
-16155,9807,8807,10000000.0,,9001
-16156,9807,8801,0.0,,9102
-16156,9807,8802,153.0,,9102
-16156,9807,8805,0.9996,,9201
-16156,9807,8806,500000.0,,9001
-16156,9807,8807,10000000.0,,9001
-16157,9807,8801,0.0,,9102
-16157,9807,8802,159.0,,9102
-16157,9807,8805,0.9996,,9201
-16157,9807,8806,500000.0,,9001
-16157,9807,8807,10000000.0,,9001
-16158,9807,8801,0.0,,9102
-16158,9807,8802,165.0,,9102
-16158,9807,8805,0.9996,,9201
-16158,9807,8806,500000.0,,9001
-16158,9807,8807,10000000.0,,9001
-16159,9807,8801,0.0,,9102
-16159,9807,8802,171.0,,9102
-16159,9807,8805,0.9996,,9201
-16159,9807,8806,500000.0,,9001
-16159,9807,8807,10000000.0,,9001
-16160,9807,8801,0.0,,9102
-16160,9807,8802,177.0,,9102
-16160,9807,8805,0.9996,,9201
-16160,9807,8806,500000.0,,9001
-16160,9807,8807,10000000.0,,9001
-16161,9810,8801,-90.0,,9102
-16161,9810,8802,0.0,,9102
-16161,9810,8805,0.994,,9201
-16161,9810,8806,2000000.0,,9001
-16161,9810,8807,2000000.0,,9001
-16170,9807,8801,0.0,,9102
-16170,9807,8802,120.0,,9102
-16170,9807,8805,1.0,,9201
-16170,9807,8806,500000.0,,9001
-16170,9807,8807,0.0,,9001
-16171,9807,8801,0.0,,9102
-16171,9807,8802,123.0,,9102
-16171,9807,8805,1.0,,9201
-16171,9807,8806,500000.0,,9001
-16171,9807,8807,0.0,,9001
-16172,9807,8801,0.0,,9102
-16172,9807,8802,126.0,,9102
-16172,9807,8805,1.0,,9201
-16172,9807,8806,500000.0,,9001
-16172,9807,8807,0.0,,9001
-16173,9807,8801,0.0,,9102
-16173,9807,8802,129.0,,9102
-16173,9807,8805,1.0,,9201
-16173,9807,8806,500000.0,,9001
-16173,9807,8807,0.0,,9001
-16174,9807,8801,0.0,,9102
-16174,9807,8802,132.0,,9102
-16174,9807,8805,1.0,,9201
-16174,9807,8806,500000.0,,9001
-16174,9807,8807,0.0,,9001
-16175,9807,8801,0.0,,9102
-16175,9807,8802,135.0,,9102
-16175,9807,8805,1.0,,9201
-16175,9807,8806,500000.0,,9001
-16175,9807,8807,0.0,,9001
-16176,9807,8801,0.0,,9102
-16176,9807,8802,138.0,,9102
-16176,9807,8805,1.0,,9201
-16176,9807,8806,500000.0,,9001
-16176,9807,8807,0.0,,9001
-16177,9807,8801,0.0,,9102
-16177,9807,8802,141.0,,9102
-16177,9807,8805,1.0,,9201
-16177,9807,8806,500000.0,,9001
-16177,9807,8807,0.0,,9001
-16178,9807,8801,0.0,,9102
-16178,9807,8802,144.0,,9102
-16178,9807,8805,1.0,,9201
-16178,9807,8806,500000.0,,9001
-16178,9807,8807,0.0,,9001
-16179,9807,8801,0.0,,9102
-16179,9807,8802,147.0,,9102
-16179,9807,8805,1.0,,9201
-16179,9807,8806,500000.0,,9001
-16179,9807,8807,0.0,,9001
-16180,9807,8801,0.0,,9102
-16180,9807,8802,150.0,,9102
-16180,9807,8805,1.0,,9201
-16180,9807,8806,500000.0,,9001
-16180,9807,8807,0.0,,9001
-16181,9807,8801,0.0,,9102
-16181,9807,8802,153.0,,9102
-16181,9807,8805,1.0,,9201
-16181,9807,8806,500000.0,,9001
-16181,9807,8807,0.0,,9001
-16182,9807,8801,0.0,,9102
-16182,9807,8802,156.0,,9102
-16182,9807,8805,1.0,,9201
-16182,9807,8806,500000.0,,9001
-16182,9807,8807,0.0,,9001
-16183,9807,8801,0.0,,9102
-16183,9807,8802,159.0,,9102
-16183,9807,8805,1.0,,9201
-16183,9807,8806,500000.0,,9001
-16183,9807,8807,0.0,,9001
-16184,9807,8801,0.0,,9102
-16184,9807,8802,162.0,,9102
-16184,9807,8805,1.0,,9201
-16184,9807,8806,500000.0,,9001
-16184,9807,8807,0.0,,9001
-16185,9807,8801,0.0,,9102
-16185,9807,8802,165.0,,9102
-16185,9807,8805,1.0,,9201
-16185,9807,8806,500000.0,,9001
-16185,9807,8807,0.0,,9001
-16186,9807,8801,0.0,,9102
-16186,9807,8802,168.0,,9102
-16186,9807,8805,1.0,,9201
-16186,9807,8806,500000.0,,9001
-16186,9807,8807,0.0,,9001
-16187,9807,8801,0.0,,9102
-16187,9807,8802,171.0,,9102
-16187,9807,8805,1.0,,9201
-16187,9807,8806,500000.0,,9001
-16187,9807,8807,0.0,,9001
-16188,9807,8801,0.0,,9102
-16188,9807,8802,174.0,,9102
-16188,9807,8805,1.0,,9201
-16188,9807,8806,500000.0,,9001
-16188,9807,8807,0.0,,9001
-16189,9807,8801,0.0,,9102
-16189,9807,8802,177.0,,9102
-16189,9807,8805,1.0,,9201
-16189,9807,8806,500000.0,,9001
-16189,9807,8807,0.0,,9001
-16190,9807,8801,0.0,,9102
-16190,9807,8802,180.0,,9102
-16190,9807,8805,1.0,,9201
-16190,9807,8806,500000.0,,9001
-16190,9807,8807,0.0,,9001
-16191,9807,8801,0.0,,9102
-16191,9807,8802,-177.0,,9102
-16191,9807,8805,1.0,,9201
-16191,9807,8806,500000.0,,9001
-16191,9807,8807,0.0,,9001
-16192,9807,8801,0.0,,9102
-16192,9807,8802,-174.0,,9102
-16192,9807,8805,1.0,,9201
-16192,9807,8806,500000.0,,9001
-16192,9807,8807,0.0,,9001
-16193,9807,8801,0.0,,9102
-16193,9807,8802,-171.0,,9102
-16193,9807,8805,1.0,,9201
-16193,9807,8806,500000.0,,9001
-16193,9807,8807,0.0,,9001
-16194,9807,8801,0.0,,9102
-16194,9807,8802,-168.0,,9102
-16194,9807,8805,1.0,,9201
-16194,9807,8806,500000.0,,9001
-16194,9807,8807,0.0,,9001
-16201,9807,8801,0.0,,9102
-16201,9807,8802,3.0,,9102
-16201,9807,8805,1.0,,9201
-16201,9807,8806,1500000.0,,9001
-16201,9807,8807,0.0,,9001
-16202,9807,8801,0.0,,9102
-16202,9807,8802,9.0,,9102
-16202,9807,8805,1.0,,9201
-16202,9807,8806,2500000.0,,9001
-16202,9807,8807,0.0,,9001
-16203,9807,8801,0.0,,9102
-16203,9807,8802,15.0,,9102
-16203,9807,8805,1.0,,9201
-16203,9807,8806,3500000.0,,9001
-16203,9807,8807,0.0,,9001
-16204,9807,8801,0.0,,9102
-16204,9807,8802,21.0,,9102
-16204,9807,8805,1.0,,9201
-16204,9807,8806,4500000.0,,9001
-16204,9807,8807,0.0,,9001
-16205,9807,8801,0.0,,9102
-16205,9807,8802,27.0,,9102
-16205,9807,8805,1.0,,9201
-16205,9807,8806,5500000.0,,9001
-16205,9807,8807,0.0,,9001
-16206,9807,8801,0.0,,9102
-16206,9807,8802,33.0,,9102
-16206,9807,8805,1.0,,9201
-16206,9807,8806,6500000.0,,9001
-16206,9807,8807,0.0,,9001
-16207,9807,8801,0.0,,9102
-16207,9807,8802,39.0,,9102
-16207,9807,8805,1.0,,9201
-16207,9807,8806,7500000.0,,9001
-16207,9807,8807,0.0,,9001
-16208,9807,8801,0.0,,9102
-16208,9807,8802,45.0,,9102
-16208,9807,8805,1.0,,9201
-16208,9807,8806,8500000.0,,9001
-16208,9807,8807,0.0,,9001
-16209,9807,8801,0.0,,9102
-16209,9807,8802,51.0,,9102
-16209,9807,8805,1.0,,9201
-16209,9807,8806,9500000.0,,9001
-16209,9807,8807,0.0,,9001
-16210,9807,8801,0.0,,9102
-16210,9807,8802,57.0,,9102
-16210,9807,8805,1.0,,9201
-16210,9807,8806,10500000.0,,9001
-16210,9807,8807,0.0,,9001
-16211,9807,8801,0.0,,9102
-16211,9807,8802,63.0,,9102
-16211,9807,8805,1.0,,9201
-16211,9807,8806,11500000.0,,9001
-16211,9807,8807,0.0,,9001
-16212,9807,8801,0.0,,9102
-16212,9807,8802,69.0,,9102
-16212,9807,8805,1.0,,9201
-16212,9807,8806,12500000.0,,9001
-16212,9807,8807,0.0,,9001
-16213,9807,8801,0.0,,9102
-16213,9807,8802,75.0,,9102
-16213,9807,8805,1.0,,9201
-16213,9807,8806,13500000.0,,9001
-16213,9807,8807,0.0,,9001
-16214,9807,8801,0.0,,9102
-16214,9807,8802,81.0,,9102
-16214,9807,8805,1.0,,9201
-16214,9807,8806,14500000.0,,9001
-16214,9807,8807,0.0,,9001
-16215,9807,8801,0.0,,9102
-16215,9807,8802,87.0,,9102
-16215,9807,8805,1.0,,9201
-16215,9807,8806,15500000.0,,9001
-16215,9807,8807,0.0,,9001
-16216,9807,8801,0.0,,9102
-16216,9807,8802,93.0,,9102
-16216,9807,8805,1.0,,9201
-16216,9807,8806,16500000.0,,9001
-16216,9807,8807,0.0,,9001
-16217,9807,8801,0.0,,9102
-16217,9807,8802,99.0,,9102
-16217,9807,8805,1.0,,9201
-16217,9807,8806,17500000.0,,9001
-16217,9807,8807,0.0,,9001
-16218,9807,8801,0.0,,9102
-16218,9807,8802,105.0,,9102
-16218,9807,8805,1.0,,9201
-16218,9807,8806,18500000.0,,9001
-16218,9807,8807,0.0,,9001
-16219,9807,8801,0.0,,9102
-16219,9807,8802,111.0,,9102
-16219,9807,8805,1.0,,9201
-16219,9807,8806,19500000.0,,9001
-16219,9807,8807,0.0,,9001
-16220,9807,8801,0.0,,9102
-16220,9807,8802,117.0,,9102
-16220,9807,8805,1.0,,9201
-16220,9807,8806,20500000.0,,9001
-16220,9807,8807,0.0,,9001
-16221,9807,8801,0.0,,9102
-16221,9807,8802,123.0,,9102
-16221,9807,8805,1.0,,9201
-16221,9807,8806,21500000.0,,9001
-16221,9807,8807,0.0,,9001
-16222,9807,8801,0.0,,9102
-16222,9807,8802,129.0,,9102
-16222,9807,8805,1.0,,9201
-16222,9807,8806,22500000.0,,9001
-16222,9807,8807,0.0,,9001
-16223,9807,8801,0.0,,9102
-16223,9807,8802,135.0,,9102
-16223,9807,8805,1.0,,9201
-16223,9807,8806,23500000.0,,9001
-16223,9807,8807,0.0,,9001
-16224,9807,8801,0.0,,9102
-16224,9807,8802,141.0,,9102
-16224,9807,8805,1.0,,9201
-16224,9807,8806,24500000.0,,9001
-16224,9807,8807,0.0,,9001
-16225,9807,8801,0.0,,9102
-16225,9807,8802,147.0,,9102
-16225,9807,8805,1.0,,9201
-16225,9807,8806,25500000.0,,9001
-16225,9807,8807,0.0,,9001
-16226,9807,8801,0.0,,9102
-16226,9807,8802,153.0,,9102
-16226,9807,8805,1.0,,9201
-16226,9807,8806,26500000.0,,9001
-16226,9807,8807,0.0,,9001
-16227,9807,8801,0.0,,9102
-16227,9807,8802,159.0,,9102
-16227,9807,8805,1.0,,9201
-16227,9807,8806,27500000.0,,9001
-16227,9807,8807,0.0,,9001
-16228,9807,8801,0.0,,9102
-16228,9807,8802,165.0,,9102
-16228,9807,8805,1.0,,9201
-16228,9807,8806,28500000.0,,9001
-16228,9807,8807,0.0,,9001
-16229,9807,8801,0.0,,9102
-16229,9807,8802,171.0,,9102
-16229,9807,8805,1.0,,9201
-16229,9807,8806,29500000.0,,9001
-16229,9807,8807,0.0,,9001
-16230,9807,8801,0.0,,9102
-16230,9807,8802,177.0,,9102
-16230,9807,8805,1.0,,9201
-16230,9807,8806,30500000.0,,9001
-16230,9807,8807,0.0,,9001
-16231,9807,8801,0.0,,9102
-16231,9807,8802,-177.0,,9102
-16231,9807,8805,1.0,,9201
-16231,9807,8806,31500000.0,,9001
-16231,9807,8807,0.0,,9001
-16232,9807,8801,0.0,,9102
-16232,9807,8802,-171.0,,9102
-16232,9807,8805,1.0,,9201
-16232,9807,8806,32500000.0,,9001
-16232,9807,8807,0.0,,9001
-16233,9807,8801,0.0,,9102
-16233,9807,8802,-165.0,,9102
-16233,9807,8805,1.0,,9201
-16233,9807,8806,33500000.0,,9001
-16233,9807,8807,0.0,,9001
-16234,9807,8801,0.0,,9102
-16234,9807,8802,-159.0,,9102
-16234,9807,8805,1.0,,9201
-16234,9807,8806,34500000.0,,9001
-16234,9807,8807,0.0,,9001
-16235,9807,8801,0.0,,9102
-16235,9807,8802,-153.0,,9102
-16235,9807,8805,1.0,,9201
-16235,9807,8806,35500000.0,,9001
-16235,9807,8807,0.0,,9001
-16236,9807,8801,0.0,,9102
-16236,9807,8802,-147.0,,9102
-16236,9807,8805,1.0,,9201
-16236,9807,8806,36500000.0,,9001
-16236,9807,8807,0.0,,9001
-16237,9807,8801,0.0,,9102
-16237,9807,8802,-141.0,,9102
-16237,9807,8805,1.0,,9201
-16237,9807,8806,37500000.0,,9001
-16237,9807,8807,0.0,,9001
-16238,9807,8801,0.0,,9102
-16238,9807,8802,-135.0,,9102
-16238,9807,8805,1.0,,9201
-16238,9807,8806,38500000.0,,9001
-16238,9807,8807,0.0,,9001
-16239,9807,8801,0.0,,9102
-16239,9807,8802,-129.0,,9102
-16239,9807,8805,1.0,,9201
-16239,9807,8806,39500000.0,,9001
-16239,9807,8807,0.0,,9001
-16240,9807,8801,0.0,,9102
-16240,9807,8802,-123.0,,9102
-16240,9807,8805,1.0,,9201
-16240,9807,8806,40500000.0,,9001
-16240,9807,8807,0.0,,9001
-16241,9807,8801,0.0,,9102
-16241,9807,8802,-117.0,,9102
-16241,9807,8805,1.0,,9201
-16241,9807,8806,41500000.0,,9001
-16241,9807,8807,0.0,,9001
-16242,9807,8801,0.0,,9102
-16242,9807,8802,-111.0,,9102
-16242,9807,8805,1.0,,9201
-16242,9807,8806,42500000.0,,9001
-16242,9807,8807,0.0,,9001
-16243,9807,8801,0.0,,9102
-16243,9807,8802,-105.0,,9102
-16243,9807,8805,1.0,,9201
-16243,9807,8806,43500000.0,,9001
-16243,9807,8807,0.0,,9001
-16244,9807,8801,0.0,,9102
-16244,9807,8802,-99.0,,9102
-16244,9807,8805,1.0,,9201
-16244,9807,8806,44500000.0,,9001
-16244,9807,8807,0.0,,9001
-16245,9807,8801,0.0,,9102
-16245,9807,8802,-93.0,,9102
-16245,9807,8805,1.0,,9201
-16245,9807,8806,45500000.0,,9001
-16245,9807,8807,0.0,,9001
-16246,9807,8801,0.0,,9102
-16246,9807,8802,-87.0,,9102
-16246,9807,8805,1.0,,9201
-16246,9807,8806,46500000.0,,9001
-16246,9807,8807,0.0,,9001
-16247,9807,8801,0.0,,9102
-16247,9807,8802,-81.0,,9102
-16247,9807,8805,1.0,,9201
-16247,9807,8806,47500000.0,,9001
-16247,9807,8807,0.0,,9001
-16248,9807,8801,0.0,,9102
-16248,9807,8802,-75.0,,9102
-16248,9807,8805,1.0,,9201
-16248,9807,8806,48500000.0,,9001
-16248,9807,8807,0.0,,9001
-16249,9807,8801,0.0,,9102
-16249,9807,8802,-69.0,,9102
-16249,9807,8805,1.0,,9201
-16249,9807,8806,49500000.0,,9001
-16249,9807,8807,0.0,,9001
-16250,9807,8801,0.0,,9102
-16250,9807,8802,-63.0,,9102
-16250,9807,8805,1.0,,9201
-16250,9807,8806,50500000.0,,9001
-16250,9807,8807,0.0,,9001
-16251,9807,8801,0.0,,9102
-16251,9807,8802,-57.0,,9102
-16251,9807,8805,1.0,,9201
-16251,9807,8806,51500000.0,,9001
-16251,9807,8807,0.0,,9001
-16252,9807,8801,0.0,,9102
-16252,9807,8802,-51.0,,9102
-16252,9807,8805,1.0,,9201
-16252,9807,8806,52500000.0,,9001
-16252,9807,8807,0.0,,9001
-16253,9807,8801,0.0,,9102
-16253,9807,8802,-45.0,,9102
-16253,9807,8805,1.0,,9201
-16253,9807,8806,53500000.0,,9001
-16253,9807,8807,0.0,,9001
-16254,9807,8801,0.0,,9102
-16254,9807,8802,-39.0,,9102
-16254,9807,8805,1.0,,9201
-16254,9807,8806,54500000.0,,9001
-16254,9807,8807,0.0,,9001
-16255,9807,8801,0.0,,9102
-16255,9807,8802,-33.0,,9102
-16255,9807,8805,1.0,,9201
-16255,9807,8806,55500000.0,,9001
-16255,9807,8807,0.0,,9001
-16256,9807,8801,0.0,,9102
-16256,9807,8802,-27.0,,9102
-16256,9807,8805,1.0,,9201
-16256,9807,8806,56500000.0,,9001
-16256,9807,8807,0.0,,9001
-16257,9807,8801,0.0,,9102
-16257,9807,8802,-21.0,,9102
-16257,9807,8805,1.0,,9201
-16257,9807,8806,57500000.0,,9001
-16257,9807,8807,0.0,,9001
-16258,9807,8801,0.0,,9102
-16258,9807,8802,-15.0,,9102
-16258,9807,8805,1.0,,9201
-16258,9807,8806,58500000.0,,9001
-16258,9807,8807,0.0,,9001
-16259,9807,8801,0.0,,9102
-16259,9807,8802,-9.0,,9102
-16259,9807,8805,1.0,,9201
-16259,9807,8806,59500000.0,,9001
-16259,9807,8807,0.0,,9001
-16260,9807,8801,0.0,,9102
-16260,9807,8802,-3.0,,9102
-16260,9807,8805,1.0,,9201
-16260,9807,8806,60500000.0,,9001
-16260,9807,8807,0.0,,9001
-16261,9807,8801,0.0,,9102
-16261,9807,8802,3.0,,9102
-16261,9807,8805,1.0,,9201
-16261,9807,8806,1500000.0,,9001
-16261,9807,8807,0.0,,9001
-16262,9807,8801,0.0,,9102
-16262,9807,8802,6.0,,9102
-16262,9807,8805,1.0,,9201
-16262,9807,8806,2500000.0,,9001
-16262,9807,8807,0.0,,9001
-16263,9807,8801,0.0,,9102
-16263,9807,8802,9.0,,9102
-16263,9807,8805,1.0,,9201
-16263,9807,8806,3500000.0,,9001
-16263,9807,8807,0.0,,9001
-16264,9807,8801,0.0,,9102
-16264,9807,8802,12.0,,9102
-16264,9807,8805,1.0,,9201
-16264,9807,8806,4500000.0,,9001
-16264,9807,8807,0.0,,9001
-16265,9807,8801,0.0,,9102
-16265,9807,8802,15.0,,9102
-16265,9807,8805,1.0,,9201
-16265,9807,8806,5500000.0,,9001
-16265,9807,8807,0.0,,9001
-16266,9807,8801,0.0,,9102
-16266,9807,8802,18.0,,9102
-16266,9807,8805,1.0,,9201
-16266,9807,8806,6500000.0,,9001
-16266,9807,8807,0.0,,9001
-16267,9807,8801,0.0,,9102
-16267,9807,8802,21.0,,9102
-16267,9807,8805,1.0,,9201
-16267,9807,8806,7500000.0,,9001
-16267,9807,8807,0.0,,9001
-16268,9807,8801,0.0,,9102
-16268,9807,8802,24.0,,9102
-16268,9807,8805,1.0,,9201
-16268,9807,8806,8500000.0,,9001
-16268,9807,8807,0.0,,9001
-16269,9807,8801,0.0,,9102
-16269,9807,8802,27.0,,9102
-16269,9807,8805,1.0,,9201
-16269,9807,8806,9500000.0,,9001
-16269,9807,8807,0.0,,9001
-16270,9807,8801,0.0,,9102
-16270,9807,8802,30.0,,9102
-16270,9807,8805,1.0,,9201
-16270,9807,8806,10500000.0,,9001
-16270,9807,8807,0.0,,9001
-16271,9807,8801,0.0,,9102
-16271,9807,8802,33.0,,9102
-16271,9807,8805,1.0,,9201
-16271,9807,8806,11500000.0,,9001
-16271,9807,8807,0.0,,9001
-16272,9807,8801,0.0,,9102
-16272,9807,8802,36.0,,9102
-16272,9807,8805,1.0,,9201
-16272,9807,8806,12500000.0,,9001
-16272,9807,8807,0.0,,9001
-16273,9807,8801,0.0,,9102
-16273,9807,8802,39.0,,9102
-16273,9807,8805,1.0,,9201
-16273,9807,8806,13500000.0,,9001
-16273,9807,8807,0.0,,9001
-16274,9807,8801,0.0,,9102
-16274,9807,8802,42.0,,9102
-16274,9807,8805,1.0,,9201
-16274,9807,8806,14500000.0,,9001
-16274,9807,8807,0.0,,9001
-16275,9807,8801,0.0,,9102
-16275,9807,8802,45.0,,9102
-16275,9807,8805,1.0,,9201
-16275,9807,8806,15500000.0,,9001
-16275,9807,8807,0.0,,9001
-16276,9807,8801,0.0,,9102
-16276,9807,8802,48.0,,9102
-16276,9807,8805,1.0,,9201
-16276,9807,8806,16500000.0,,9001
-16276,9807,8807,0.0,,9001
-16277,9807,8801,0.0,,9102
-16277,9807,8802,51.0,,9102
-16277,9807,8805,1.0,,9201
-16277,9807,8806,17500000.0,,9001
-16277,9807,8807,0.0,,9001
-16278,9807,8801,0.0,,9102
-16278,9807,8802,54.0,,9102
-16278,9807,8805,1.0,,9201
-16278,9807,8806,18500000.0,,9001
-16278,9807,8807,0.0,,9001
-16279,9807,8801,0.0,,9102
-16279,9807,8802,57.0,,9102
-16279,9807,8805,1.0,,9201
-16279,9807,8806,19500000.0,,9001
-16279,9807,8807,0.0,,9001
-16280,9807,8801,0.0,,9102
-16280,9807,8802,60.0,,9102
-16280,9807,8805,1.0,,9201
-16280,9807,8806,20500000.0,,9001
-16280,9807,8807,0.0,,9001
-16281,9807,8801,0.0,,9102
-16281,9807,8802,63.0,,9102
-16281,9807,8805,1.0,,9201
-16281,9807,8806,21500000.0,,9001
-16281,9807,8807,0.0,,9001
-16282,9807,8801,0.0,,9102
-16282,9807,8802,66.0,,9102
-16282,9807,8805,1.0,,9201
-16282,9807,8806,22500000.0,,9001
-16282,9807,8807,0.0,,9001
-16283,9807,8801,0.0,,9102
-16283,9807,8802,69.0,,9102
-16283,9807,8805,1.0,,9201
-16283,9807,8806,23500000.0,,9001
-16283,9807,8807,0.0,,9001
-16284,9807,8801,0.0,,9102
-16284,9807,8802,72.0,,9102
-16284,9807,8805,1.0,,9201
-16284,9807,8806,24500000.0,,9001
-16284,9807,8807,0.0,,9001
-16285,9807,8801,0.0,,9102
-16285,9807,8802,75.0,,9102
-16285,9807,8805,1.0,,9201
-16285,9807,8806,25500000.0,,9001
-16285,9807,8807,0.0,,9001
-16286,9807,8801,0.0,,9102
-16286,9807,8802,78.0,,9102
-16286,9807,8805,1.0,,9201
-16286,9807,8806,26500000.0,,9001
-16286,9807,8807,0.0,,9001
-16287,9807,8801,0.0,,9102
-16287,9807,8802,81.0,,9102
-16287,9807,8805,1.0,,9201
-16287,9807,8806,27500000.0,,9001
-16287,9807,8807,0.0,,9001
-16288,9807,8801,0.0,,9102
-16288,9807,8802,84.0,,9102
-16288,9807,8805,1.0,,9201
-16288,9807,8806,28500000.0,,9001
-16288,9807,8807,0.0,,9001
-16289,9807,8801,0.0,,9102
-16289,9807,8802,87.0,,9102
-16289,9807,8805,1.0,,9201
-16289,9807,8806,29500000.0,,9001
-16289,9807,8807,0.0,,9001
-16290,9807,8801,0.0,,9102
-16290,9807,8802,90.0,,9102
-16290,9807,8805,1.0,,9201
-16290,9807,8806,30500000.0,,9001
-16290,9807,8807,0.0,,9001
-16291,9807,8801,0.0,,9102
-16291,9807,8802,93.0,,9102
-16291,9807,8805,1.0,,9201
-16291,9807,8806,31500000.0,,9001
-16291,9807,8807,0.0,,9001
-16292,9807,8801,0.0,,9102
-16292,9807,8802,96.0,,9102
-16292,9807,8805,1.0,,9201
-16292,9807,8806,32500000.0,,9001
-16292,9807,8807,0.0,,9001
-16293,9807,8801,0.0,,9102
-16293,9807,8802,99.0,,9102
-16293,9807,8805,1.0,,9201
-16293,9807,8806,33500000.0,,9001
-16293,9807,8807,0.0,,9001
-16294,9807,8801,0.0,,9102
-16294,9807,8802,102.0,,9102
-16294,9807,8805,1.0,,9201
-16294,9807,8806,34500000.0,,9001
-16294,9807,8807,0.0,,9001
-16295,9807,8801,0.0,,9102
-16295,9807,8802,105.0,,9102
-16295,9807,8805,1.0,,9201
-16295,9807,8806,35500000.0,,9001
-16295,9807,8807,0.0,,9001
-16296,9807,8801,0.0,,9102
-16296,9807,8802,108.0,,9102
-16296,9807,8805,1.0,,9201
-16296,9807,8806,36500000.0,,9001
-16296,9807,8807,0.0,,9001
-16297,9807,8801,0.0,,9102
-16297,9807,8802,111.0,,9102
-16297,9807,8805,1.0,,9201
-16297,9807,8806,37500000.0,,9001
-16297,9807,8807,0.0,,9001
-16298,9807,8801,0.0,,9102
-16298,9807,8802,114.0,,9102
-16298,9807,8805,1.0,,9201
-16298,9807,8806,38500000.0,,9001
-16298,9807,8807,0.0,,9001
-16299,9807,8801,0.0,,9102
-16299,9807,8802,117.0,,9102
-16299,9807,8805,1.0,,9201
-16299,9807,8806,39500000.0,,9001
-16299,9807,8807,0.0,,9001
-16301,9807,8801,0.0,,9102
-16301,9807,8802,3.0,,9102
-16301,9807,8805,1.0,,9201
-16301,9807,8806,500000.0,,9001
-16301,9807,8807,0.0,,9001
-16302,9807,8801,0.0,,9102
-16302,9807,8802,9.0,,9102
-16302,9807,8805,1.0,,9201
-16302,9807,8806,500000.0,,9001
-16302,9807,8807,0.0,,9001
-16303,9807,8801,0.0,,9102
-16303,9807,8802,15.0,,9102
-16303,9807,8805,1.0,,9201
-16303,9807,8806,500000.0,,9001
-16303,9807,8807,0.0,,9001
-16304,9807,8801,0.0,,9102
-16304,9807,8802,21.0,,9102
-16304,9807,8805,1.0,,9201
-16304,9807,8806,500000.0,,9001
-16304,9807,8807,0.0,,9001
-16305,9807,8801,0.0,,9102
-16305,9807,8802,27.0,,9102
-16305,9807,8805,1.0,,9201
-16305,9807,8806,500000.0,,9001
-16305,9807,8807,0.0,,9001
-16306,9807,8801,0.0,,9102
-16306,9807,8802,33.0,,9102
-16306,9807,8805,1.0,,9201
-16306,9807,8806,500000.0,,9001
-16306,9807,8807,0.0,,9001
-16307,9807,8801,0.0,,9102
-16307,9807,8802,39.0,,9102
-16307,9807,8805,1.0,,9201
-16307,9807,8806,500000.0,,9001
-16307,9807,8807,0.0,,9001
-16308,9807,8801,0.0,,9102
-16308,9807,8802,45.0,,9102
-16308,9807,8805,1.0,,9201
-16308,9807,8806,500000.0,,9001
-16308,9807,8807,0.0,,9001
-16309,9807,8801,0.0,,9102
-16309,9807,8802,51.0,,9102
-16309,9807,8805,1.0,,9201
-16309,9807,8806,500000.0,,9001
-16309,9807,8807,0.0,,9001
-16310,9807,8801,0.0,,9102
-16310,9807,8802,57.0,,9102
-16310,9807,8805,1.0,,9201
-16310,9807,8806,500000.0,,9001
-16310,9807,8807,0.0,,9001
-16311,9807,8801,0.0,,9102
-16311,9807,8802,63.0,,9102
-16311,9807,8805,1.0,,9201
-16311,9807,8806,500000.0,,9001
-16311,9807,8807,0.0,,9001
-16312,9807,8801,0.0,,9102
-16312,9807,8802,69.0,,9102
-16312,9807,8805,1.0,,9201
-16312,9807,8806,500000.0,,9001
-16312,9807,8807,0.0,,9001
-16313,9807,8801,0.0,,9102
-16313,9807,8802,75.0,,9102
-16313,9807,8805,1.0,,9201
-16313,9807,8806,500000.0,,9001
-16313,9807,8807,0.0,,9001
-16314,9807,8801,0.0,,9102
-16314,9807,8802,81.0,,9102
-16314,9807,8805,1.0,,9201
-16314,9807,8806,500000.0,,9001
-16314,9807,8807,0.0,,9001
-16315,9807,8801,0.0,,9102
-16315,9807,8802,87.0,,9102
-16315,9807,8805,1.0,,9201
-16315,9807,8806,500000.0,,9001
-16315,9807,8807,0.0,,9001
-16316,9807,8801,0.0,,9102
-16316,9807,8802,93.0,,9102
-16316,9807,8805,1.0,,9201
-16316,9807,8806,500000.0,,9001
-16316,9807,8807,0.0,,9001
-16317,9807,8801,0.0,,9102
-16317,9807,8802,99.0,,9102
-16317,9807,8805,1.0,,9201
-16317,9807,8806,500000.0,,9001
-16317,9807,8807,0.0,,9001
-16318,9807,8801,0.0,,9102
-16318,9807,8802,105.0,,9102
-16318,9807,8805,1.0,,9201
-16318,9807,8806,500000.0,,9001
-16318,9807,8807,0.0,,9001
-16319,9807,8801,0.0,,9102
-16319,9807,8802,111.0,,9102
-16319,9807,8805,1.0,,9201
-16319,9807,8806,500000.0,,9001
-16319,9807,8807,0.0,,9001
-16320,9807,8801,0.0,,9102
-16320,9807,8802,117.0,,9102
-16320,9807,8805,1.0,,9201
-16320,9807,8806,500000.0,,9001
-16320,9807,8807,0.0,,9001
-16321,9807,8801,0.0,,9102
-16321,9807,8802,123.0,,9102
-16321,9807,8805,1.0,,9201
-16321,9807,8806,500000.0,,9001
-16321,9807,8807,0.0,,9001
-16322,9807,8801,0.0,,9102
-16322,9807,8802,129.0,,9102
-16322,9807,8805,1.0,,9201
-16322,9807,8806,500000.0,,9001
-16322,9807,8807,0.0,,9001
-16323,9807,8801,0.0,,9102
-16323,9807,8802,135.0,,9102
-16323,9807,8805,1.0,,9201
-16323,9807,8806,500000.0,,9001
-16323,9807,8807,0.0,,9001
-16324,9807,8801,0.0,,9102
-16324,9807,8802,141.0,,9102
-16324,9807,8805,1.0,,9201
-16324,9807,8806,500000.0,,9001
-16324,9807,8807,0.0,,9001
-16325,9807,8801,0.0,,9102
-16325,9807,8802,147.0,,9102
-16325,9807,8805,1.0,,9201
-16325,9807,8806,500000.0,,9001
-16325,9807,8807,0.0,,9001
-16326,9807,8801,0.0,,9102
-16326,9807,8802,153.0,,9102
-16326,9807,8805,1.0,,9201
-16326,9807,8806,500000.0,,9001
-16326,9807,8807,0.0,,9001
-16327,9807,8801,0.0,,9102
-16327,9807,8802,159.0,,9102
-16327,9807,8805,1.0,,9201
-16327,9807,8806,500000.0,,9001
-16327,9807,8807,0.0,,9001
-16328,9807,8801,0.0,,9102
-16328,9807,8802,165.0,,9102
-16328,9807,8805,1.0,,9201
-16328,9807,8806,500000.0,,9001
-16328,9807,8807,0.0,,9001
-16329,9807,8801,0.0,,9102
-16329,9807,8802,171.0,,9102
-16329,9807,8805,1.0,,9201
-16329,9807,8806,500000.0,,9001
-16329,9807,8807,0.0,,9001
-16330,9807,8801,0.0,,9102
-16330,9807,8802,177.0,,9102
-16330,9807,8805,1.0,,9201
-16330,9807,8806,500000.0,,9001
-16330,9807,8807,0.0,,9001
-16331,9807,8801,0.0,,9102
-16331,9807,8802,-177.0,,9102
-16331,9807,8805,1.0,,9201
-16331,9807,8806,500000.0,,9001
-16331,9807,8807,0.0,,9001
-16332,9807,8801,0.0,,9102
-16332,9807,8802,-171.0,,9102
-16332,9807,8805,1.0,,9201
-16332,9807,8806,500000.0,,9001
-16332,9807,8807,0.0,,9001
-16333,9807,8801,0.0,,9102
-16333,9807,8802,-165.0,,9102
-16333,9807,8805,1.0,,9201
-16333,9807,8806,500000.0,,9001
-16333,9807,8807,0.0,,9001
-16334,9807,8801,0.0,,9102
-16334,9807,8802,-159.0,,9102
-16334,9807,8805,1.0,,9201
-16334,9807,8806,500000.0,,9001
-16334,9807,8807,0.0,,9001
-16335,9807,8801,0.0,,9102
-16335,9807,8802,-153.0,,9102
-16335,9807,8805,1.0,,9201
-16335,9807,8806,500000.0,,9001
-16335,9807,8807,0.0,,9001
-16336,9807,8801,0.0,,9102
-16336,9807,8802,-147.0,,9102
-16336,9807,8805,1.0,,9201
-16336,9807,8806,500000.0,,9001
-16336,9807,8807,0.0,,9001
-16337,9807,8801,0.0,,9102
-16337,9807,8802,-141.0,,9102
-16337,9807,8805,1.0,,9201
-16337,9807,8806,500000.0,,9001
-16337,9807,8807,0.0,,9001
-16338,9807,8801,0.0,,9102
-16338,9807,8802,-135.0,,9102
-16338,9807,8805,1.0,,9201
-16338,9807,8806,500000.0,,9001
-16338,9807,8807,0.0,,9001
-16339,9807,8801,0.0,,9102
-16339,9807,8802,-129.0,,9102
-16339,9807,8805,1.0,,9201
-16339,9807,8806,500000.0,,9001
-16339,9807,8807,0.0,,9001
-16340,9807,8801,0.0,,9102
-16340,9807,8802,-123.0,,9102
-16340,9807,8805,1.0,,9201
-16340,9807,8806,500000.0,,9001
-16340,9807,8807,0.0,,9001
-16341,9807,8801,0.0,,9102
-16341,9807,8802,-117.0,,9102
-16341,9807,8805,1.0,,9201
-16341,9807,8806,500000.0,,9001
-16341,9807,8807,0.0,,9001
-16342,9807,8801,0.0,,9102
-16342,9807,8802,-111.0,,9102
-16342,9807,8805,1.0,,9201
-16342,9807,8806,500000.0,,9001
-16342,9807,8807,0.0,,9001
-16343,9807,8801,0.0,,9102
-16343,9807,8802,-105.0,,9102
-16343,9807,8805,1.0,,9201
-16343,9807,8806,500000.0,,9001
-16343,9807,8807,0.0,,9001
-16344,9807,8801,0.0,,9102
-16344,9807,8802,-99.0,,9102
-16344,9807,8805,1.0,,9201
-16344,9807,8806,500000.0,,9001
-16344,9807,8807,0.0,,9001
-16345,9807,8801,0.0,,9102
-16345,9807,8802,-93.0,,9102
-16345,9807,8805,1.0,,9201
-16345,9807,8806,500000.0,,9001
-16345,9807,8807,0.0,,9001
-16346,9807,8801,0.0,,9102
-16346,9807,8802,-87.0,,9102
-16346,9807,8805,1.0,,9201
-16346,9807,8806,500000.0,,9001
-16346,9807,8807,0.0,,9001
-16347,9807,8801,0.0,,9102
-16347,9807,8802,-81.0,,9102
-16347,9807,8805,1.0,,9201
-16347,9807,8806,500000.0,,9001
-16347,9807,8807,0.0,,9001
-16348,9807,8801,0.0,,9102
-16348,9807,8802,-75.0,,9102
-16348,9807,8805,1.0,,9201
-16348,9807,8806,500000.0,,9001
-16348,9807,8807,0.0,,9001
-16349,9807,8801,0.0,,9102
-16349,9807,8802,-69.0,,9102
-16349,9807,8805,1.0,,9201
-16349,9807,8806,500000.0,,9001
-16349,9807,8807,0.0,,9001
-16350,9807,8801,0.0,,9102
-16350,9807,8802,-63.0,,9102
-16350,9807,8805,1.0,,9201
-16350,9807,8806,500000.0,,9001
-16350,9807,8807,0.0,,9001
-16351,9807,8801,0.0,,9102
-16351,9807,8802,-57.0,,9102
-16351,9807,8805,1.0,,9201
-16351,9807,8806,500000.0,,9001
-16351,9807,8807,0.0,,9001
-16352,9807,8801,0.0,,9102
-16352,9807,8802,-51.0,,9102
-16352,9807,8805,1.0,,9201
-16352,9807,8806,500000.0,,9001
-16352,9807,8807,0.0,,9001
-16353,9807,8801,0.0,,9102
-16353,9807,8802,-45.0,,9102
-16353,9807,8805,1.0,,9201
-16353,9807,8806,500000.0,,9001
-16353,9807,8807,0.0,,9001
-16354,9807,8801,0.0,,9102
-16354,9807,8802,-39.0,,9102
-16354,9807,8805,1.0,,9201
-16354,9807,8806,500000.0,,9001
-16354,9807,8807,0.0,,9001
-16355,9807,8801,0.0,,9102
-16355,9807,8802,-33.0,,9102
-16355,9807,8805,1.0,,9201
-16355,9807,8806,500000.0,,9001
-16355,9807,8807,0.0,,9001
-16356,9807,8801,0.0,,9102
-16356,9807,8802,-27.0,,9102
-16356,9807,8805,1.0,,9201
-16356,9807,8806,500000.0,,9001
-16356,9807,8807,0.0,,9001
-16357,9807,8801,0.0,,9102
-16357,9807,8802,-21.0,,9102
-16357,9807,8805,1.0,,9201
-16357,9807,8806,500000.0,,9001
-16357,9807,8807,0.0,,9001
-16358,9807,8801,0.0,,9102
-16358,9807,8802,-15.0,,9102
-16358,9807,8805,1.0,,9201
-16358,9807,8806,500000.0,,9001
-16358,9807,8807,0.0,,9001
-16359,9807,8801,0.0,,9102
-16359,9807,8802,-9.0,,9102
-16359,9807,8805,1.0,,9201
-16359,9807,8806,500000.0,,9001
-16359,9807,8807,0.0,,9001
-16360,9807,8801,0.0,,9102
-16360,9807,8802,-3.0,,9102
-16360,9807,8805,1.0,,9201
-16360,9807,8806,500000.0,,9001
-16360,9807,8807,0.0,,9001
-16361,9807,8801,0.0,,9102
-16361,9807,8802,3.0,,9102
-16361,9807,8805,1.0,,9201
-16361,9807,8806,500000.0,,9001
-16361,9807,8807,0.0,,9001
-16362,9807,8801,0.0,,9102
-16362,9807,8802,6.0,,9102
-16362,9807,8805,1.0,,9201
-16362,9807,8806,500000.0,,9001
-16362,9807,8807,0.0,,9001
-16363,9807,8801,0.0,,9102
-16363,9807,8802,9.0,,9102
-16363,9807,8805,1.0,,9201
-16363,9807,8806,500000.0,,9001
-16363,9807,8807,0.0,,9001
-16364,9807,8801,0.0,,9102
-16364,9807,8802,12.0,,9102
-16364,9807,8805,1.0,,9201
-16364,9807,8806,500000.0,,9001
-16364,9807,8807,0.0,,9001
-16365,9807,8801,0.0,,9102
-16365,9807,8802,15.0,,9102
-16365,9807,8805,1.0,,9201
-16365,9807,8806,500000.0,,9001
-16365,9807,8807,0.0,,9001
-16366,9807,8801,0.0,,9102
-16366,9807,8802,18.0,,9102
-16366,9807,8805,1.0,,9201
-16366,9807,8806,500000.0,,9001
-16366,9807,8807,0.0,,9001
-16367,9807,8801,0.0,,9102
-16367,9807,8802,21.0,,9102
-16367,9807,8805,1.0,,9201
-16367,9807,8806,500000.0,,9001
-16367,9807,8807,0.0,,9001
-16368,9807,8801,0.0,,9102
-16368,9807,8802,24.0,,9102
-16368,9807,8805,1.0,,9201
-16368,9807,8806,500000.0,,9001
-16368,9807,8807,0.0,,9001
-16369,9807,8801,0.0,,9102
-16369,9807,8802,27.0,,9102
-16369,9807,8805,1.0,,9201
-16369,9807,8806,500000.0,,9001
-16369,9807,8807,0.0,,9001
-16370,9807,8801,0.0,,9102
-16370,9807,8802,30.0,,9102
-16370,9807,8805,1.0,,9201
-16370,9807,8806,500000.0,,9001
-16370,9807,8807,0.0,,9001
-16371,9807,8801,0.0,,9102
-16371,9807,8802,33.0,,9102
-16371,9807,8805,1.0,,9201
-16371,9807,8806,500000.0,,9001
-16371,9807,8807,0.0,,9001
-16372,9807,8801,0.0,,9102
-16372,9807,8802,36.0,,9102
-16372,9807,8805,1.0,,9201
-16372,9807,8806,500000.0,,9001
-16372,9807,8807,0.0,,9001
-16373,9807,8801,0.0,,9102
-16373,9807,8802,39.0,,9102
-16373,9807,8805,1.0,,9201
-16373,9807,8806,500000.0,,9001
-16373,9807,8807,0.0,,9001
-16374,9807,8801,0.0,,9102
-16374,9807,8802,42.0,,9102
-16374,9807,8805,1.0,,9201
-16374,9807,8806,500000.0,,9001
-16374,9807,8807,0.0,,9001
-16375,9807,8801,0.0,,9102
-16375,9807,8802,45.0,,9102
-16375,9807,8805,1.0,,9201
-16375,9807,8806,500000.0,,9001
-16375,9807,8807,0.0,,9001
-16376,9807,8801,0.0,,9102
-16376,9807,8802,48.0,,9102
-16376,9807,8805,1.0,,9001
-16376,9807,8806,500000.0,,9001
-16376,9807,8807,0.0,,9201
-16377,9807,8801,0.0,,9102
-16377,9807,8802,51.0,,9102
-16377,9807,8805,1.0,,9201
-16377,9807,8806,500000.0,,9001
-16377,9807,8807,0.0,,9001
-16378,9807,8801,0.0,,9102
-16378,9807,8802,54.0,,9102
-16378,9807,8805,1.0,,9201
-16378,9807,8806,500000.0,,9001
-16378,9807,8807,0.0,,9001
-16379,9807,8801,0.0,,9102
-16379,9807,8802,57.0,,9102
-16379,9807,8805,1.0,,9201
-16379,9807,8806,500000.0,,9001
-16379,9807,8807,0.0,,9001
-16380,9807,8801,0.0,,9102
-16380,9807,8802,60.0,,9102
-16380,9807,8805,1.0,,9201
-16380,9807,8806,500000.0,,9001
-16380,9807,8807,0.0,,9001
-16381,9807,8801,0.0,,9102
-16381,9807,8802,63.0,,9102
-16381,9807,8805,1.0,,9201
-16381,9807,8806,500000.0,,9001
-16381,9807,8807,0.0,,9001
-16382,9807,8801,0.0,,9102
-16382,9807,8802,66.0,,9102
-16382,9807,8805,1.0,,9201
-16382,9807,8806,500000.0,,9001
-16382,9807,8807,0.0,,9001
-16383,9807,8801,0.0,,9102
-16383,9807,8802,69.0,,9102
-16383,9807,8805,1.0,,9201
-16383,9807,8806,500000.0,,9001
-16383,9807,8807,0.0,,9001
-16384,9807,8801,0.0,,9102
-16384,9807,8802,72.0,,9102
-16384,9807,8805,1.0,,9201
-16384,9807,8806,500000.0,,9001
-16384,9807,8807,0.0,,9001
-16385,9807,8801,0.0,,9102
-16385,9807,8802,75.0,,9102
-16385,9807,8805,1.0,,9201
-16385,9807,8806,500000.0,,9001
-16385,9807,8807,0.0,,9001
-16386,9807,8801,0.0,,9102
-16386,9807,8802,78.0,,9102
-16386,9807,8805,1.0,,9201
-16386,9807,8806,500000.0,,9001
-16386,9807,8807,0.0,,9001
-16387,9807,8801,0.0,,9102
-16387,9807,8802,81.0,,9102
-16387,9807,8805,1.0,,9201
-16387,9807,8806,500000.0,,9001
-16387,9807,8807,0.0,,9001
-16388,9807,8801,0.0,,9102
-16388,9807,8802,84.0,,9102
-16388,9807,8805,1.0,,9201
-16388,9807,8806,500000.0,,9001
-16388,9807,8807,0.0,,9001
-16389,9807,8801,0.0,,9102
-16389,9807,8802,87.0,,9102
-16389,9807,8805,1.0,,9201
-16389,9807,8806,500000.0,,9001
-16389,9807,8807,0.0,,9001
-16390,9807,8801,0.0,,9102
-16390,9807,8802,90.0,,9102
-16390,9807,8805,1.0,,9201
-16390,9807,8806,500000.0,,9001
-16390,9807,8807,0.0,,9001
-16391,9807,8801,0.0,,9102
-16391,9807,8802,93.0,,9102
-16391,9807,8805,1.0,,9201
-16391,9807,8806,500000.0,,9001
-16391,9807,8807,0.0,,9001
-16392,9807,8801,0.0,,9102
-16392,9807,8802,96.0,,9102
-16392,9807,8805,1.0,,9201
-16392,9807,8806,500000.0,,9001
-16392,9807,8807,0.0,,9001
-16393,9807,8801,0.0,,9102
-16393,9807,8802,99.0,,9102
-16393,9807,8805,1.0,,9201
-16393,9807,8806,500000.0,,9001
-16393,9807,8807,0.0,,9001
-16394,9807,8801,0.0,,9102
-16394,9807,8802,102.0,,9102
-16394,9807,8805,1.0,,9201
-16394,9807,8806,500000.0,,9001
-16394,9807,8807,0.0,,9001
-16395,9807,8801,0.0,,9102
-16395,9807,8802,105.0,,9102
-16395,9807,8805,1.0,,9201
-16395,9807,8806,500000.0,,9001
-16395,9807,8807,0.0,,9001
-16396,9807,8801,0.0,,9102
-16396,9807,8802,108.0,,9102
-16396,9807,8805,1.0,,9201
-16396,9807,8806,500000.0,,9001
-16396,9807,8807,0.0,,9001
-16397,9807,8801,0.0,,9102
-16397,9807,8802,111.0,,9102
-16397,9807,8805,1.0,,9201
-16397,9807,8806,500000.0,,9001
-16397,9807,8807,0.0,,9001
-16398,9807,8801,0.0,,9102
-16398,9807,8802,114.0,,9102
-16398,9807,8805,1.0,,9201
-16398,9807,8806,500000.0,,9001
-16398,9807,8807,0.0,,9001
-16399,9807,8801,0.0,,9102
-16399,9807,8802,117.0,,9102
-16399,9807,8805,1.0,,9201
-16399,9807,8806,500000.0,,9001
-16399,9807,8807,0.0,,9001
-16400,9807,8801,0.0,,9102
-16400,9807,8802,0.0,,9102
-16400,9807,8805,0.9996,,9201
-16400,9807,8806,500000.0,,9001
-16400,9807,8807,0.0,,9001
-16405,9807,8801,0.0,,9102
-16405,9807,8802,5.0,,9102
-16405,9807,8805,0.9996,,9201
-16405,9807,8806,500000.0,,9001
-16405,9807,8807,0.0,,9001
-16406,9807,8801,0.0,,9102
-16406,9807,8802,6.0,,9102
-16406,9807,8805,0.9996,,9201
-16406,9807,8806,500000.0,,9001
-16406,9807,8807,0.0,,9001
-16411,9807,8801,0.0,,9102
-16411,9807,8802,11.0,,9102
-16411,9807,8805,0.9996,,9201
-16411,9807,8806,500000.0,,9001
-16411,9807,8807,0.0,,9001
-16412,9807,8801,0.0,,9102
-16412,9807,8802,12.0,,9102
-16412,9807,8805,0.9996,,9201
-16412,9807,8806,500000.0,,9001
-16412,9807,8807,0.0,,9001
-16413,9807,8801,0.0,,9102
-16413,9807,8802,13.0,,9102
-16413,9807,8805,0.9996,,9201
-16413,9807,8806,500000.0,,9001
-16413,9807,8807,0.0,,9001
-16430,9807,8801,0.0,,9102
-16430,9807,8802,30.0,,9102
-16430,9807,8805,0.9996,,9201
-16430,9807,8806,500000.0,,9001
-16430,9807,8807,0.0,,9001
-16506,9807,8801,0.0,,9102
-16506,9807,8802,106.0,,9102
-16506,9807,8805,0.9996,,9201
-16506,9807,8806,500000.0,,9001
-16506,9807,8807,0.0,,9001
-16586,9807,8801,0.0,,9102
-16586,9807,8802,106.0,,9102
-16586,9807,8805,1.0,,9201
-16586,9807,8806,500000.0,,9001
-16586,9807,8807,0.0,,9001
-16611,9807,8801,0.0,,9110
-16611,9807,8802,11.3,,9110
-16611,9807,8805,0.9996,,9201
-16611,9807,8806,500000.0,,9001
-16611,9807,8807,10000000.0,,9001
-16612,9807,8801,0.0,,9102
-16612,9807,8802,12.0,,9102
-16612,9807,8805,0.9996,,9201
-16612,9807,8806,500000.0,,9001
-16612,9807,8807,10000000.0,,9001
-16636,9807,8801,0.0,,9102
-16636,9807,8802,36.0,,9102
-16636,9807,8805,0.9996,,9201
-16636,9807,8806,500000.0,,9001
-16636,9807,8807,10000000.0,,9001
-16709,9807,8801,0.0,,9102
-16709,9807,8802,109.0,,9102
-16709,9807,8805,0.9996,,9201
-16709,9807,8806,500000.0,,9001
-16709,9807,8807,10000000.0,,9001
-16716,9807,8801,0.0,,9102
-16716,9807,8802,116.0,,9102
-16716,9807,8805,0.9996,,9201
-16716,9807,8806,500000.0,,9001
-16716,9807,8807,10000000.0,,9001
-16732,9807,8801,0.0,,9102
-16732,9807,8802,132.0,,9102
-16732,9807,8805,0.9996,,9201
-16732,9807,8806,500000.0,,9001
-16732,9807,8807,10000000.0,,9001
-17001,9807,8801,0.0,,9102
-17001,9807,8802,-1.0,,9102
-17001,9807,8805,0.9996,,9201
-17001,9807,8806,500000.0,,9001
-17001,9807,8807,0.0,,9001
-17005,9807,8801,0.0,,9102
-17005,9807,8802,-5.0,,9102
-17005,9807,8805,0.9996,,9201
-17005,9807,8806,500000.0,,9001
-17005,9807,8807,0.0,,9001
-17054,9807,8801,0.0,,9102
-17054,9807,8802,-54.0,,9102
-17054,9807,8805,0.9996,,9201
-17054,9807,8806,500000.0,,9001
-17054,9807,8807,0.0,,9001
-17348,9807,8801,0.0,,9102
-17348,9807,8802,105.0,,9102
-17348,9807,8805,0.9996,,9201
-17348,9807,8806,500000.0,,9001
-17348,9807,8807,10000000.0,,9001
-17349,9807,8801,0.0,,9102
-17349,9807,8802,111.0,,9102
-17349,9807,8805,0.9996,,9201
-17349,9807,8806,500000.0,,9001
-17349,9807,8807,10000000.0,,9001
-17350,9807,8801,0.0,,9102
-17350,9807,8802,117.0,,9102
-17350,9807,8805,0.9996,,9201
-17350,9807,8806,500000.0,,9001
-17350,9807,8807,10000000.0,,9001
-17351,9807,8801,0.0,,9102
-17351,9807,8802,123.0,,9102
-17351,9807,8805,0.9996,,9201
-17351,9807,8806,500000.0,,9001
-17351,9807,8807,10000000.0,,9001
-17352,9807,8801,0.0,,9102
-17352,9807,8802,129.0,,9102
-17352,9807,8805,0.9996,,9201
-17352,9807,8806,500000.0,,9001
-17352,9807,8807,10000000.0,,9001
-17353,9807,8801,0.0,,9102
-17353,9807,8802,135.0,,9102
-17353,9807,8805,0.9996,,9201
-17353,9807,8806,500000.0,,9001
-17353,9807,8807,10000000.0,,9001
-17354,9807,8801,0.0,,9102
-17354,9807,8802,141.0,,9102
-17354,9807,8805,0.9996,,9201
-17354,9807,8806,500000.0,,9001
-17354,9807,8807,10000000.0,,9001
-17355,9807,8801,0.0,,9102
-17355,9807,8802,147.0,,9102
-17355,9807,8805,0.9996,,9201
-17355,9807,8806,500000.0,,9001
-17355,9807,8807,10000000.0,,9001
-17356,9807,8801,0.0,,9102
-17356,9807,8802,153.0,,9102
-17356,9807,8805,0.9996,,9201
-17356,9807,8806,500000.0,,9001
-17356,9807,8807,10000000.0,,9001
-17357,9807,8801,0.0,,9102
-17357,9807,8802,159.0,,9102
-17357,9807,8805,0.9996,,9201
-17357,9807,8806,500000.0,,9001
-17357,9807,8807,10000000.0,,9001
-17358,9807,8801,0.0,,9102
-17358,9807,8802,165.0,,9102
-17358,9807,8805,0.9996,,9201
-17358,9807,8806,500000.0,,9001
-17358,9807,8807,10000000.0,,9001
-17448,9807,8801,0.0,,9102
-17448,9807,8802,105.0,,9102
-17448,9807,8805,0.9996,,9201
-17448,9807,8806,500000.0,,9001
-17448,9807,8807,10000000.0,,9001
-17449,9807,8801,0.0,,9102
-17449,9807,8802,111.0,,9102
-17449,9807,8805,0.9996,,9201
-17449,9807,8806,500000.0,,9001
-17449,9807,8807,10000000.0,,9001
-17450,9807,8801,0.0,,9102
-17450,9807,8802,117.0,,9102
-17450,9807,8805,0.9996,,9201
-17450,9807,8806,500000.0,,9001
-17450,9807,8807,10000000.0,,9001
-17451,9807,8801,0.0,,9102
-17451,9807,8802,123.0,,9102
-17451,9807,8805,0.9996,,9201
-17451,9807,8806,500000.0,,9001
-17451,9807,8807,10000000.0,,9001
-17452,9807,8801,0.0,,9102
-17452,9807,8802,129.0,,9102
-17452,9807,8805,0.9996,,9201
-17452,9807,8806,500000.0,,9001
-17452,9807,8807,10000000.0,,9001
-17453,9807,8801,0.0,,9102
-17453,9807,8802,135.0,,9102
-17453,9807,8805,0.9996,,9201
-17453,9807,8806,500000.0,,9001
-17453,9807,8807,10000000.0,,9001
-17454,9807,8801,0.0,,9102
-17454,9807,8802,141.0,,9102
-17454,9807,8805,0.9996,,9201
-17454,9807,8806,500000.0,,9001
-17454,9807,8807,10000000.0,,9001
-17455,9807,8801,0.0,,9102
-17455,9807,8802,147.0,,9102
-17455,9807,8805,0.9996,,9201
-17455,9807,8806,500000.0,,9001
-17455,9807,8807,10000000.0,,9001
-17456,9807,8801,0.0,,9102
-17456,9807,8802,153.0,,9102
-17456,9807,8805,0.9996,,9201
-17456,9807,8806,500000.0,,9001
-17456,9807,8807,10000000.0,,9001
-17457,9807,8801,0.0,,9102
-17457,9807,8802,159.0,,9102
-17457,9807,8805,0.9996,,9201
-17457,9807,8806,500000.0,,9001
-17457,9807,8807,10000000.0,,9001
-17458,9807,8801,0.0,,9102
-17458,9807,8802,165.0,,9102
-17458,9807,8805,0.9996,,9201
-17458,9807,8806,500000.0,,9001
-17458,9807,8807,10000000.0,,9001
-17515,9808,8801,0.0,,9102
-17515,9808,8802,15.0,,9102
-17515,9808,8805,1.0,,9201
-17515,9808,8806,0.0,,9001
-17515,9808,8807,0.0,,9001
-17517,9808,8801,0.0,,9102
-17517,9808,8802,17.0,,9102
-17517,9808,8805,1.0,,9201
-17517,9808,8806,0.0,,9001
-17517,9808,8807,0.0,,9001
-17519,9808,8801,0.0,,9102
-17519,9808,8802,19.0,,9102
-17519,9808,8805,1.0,,9201
-17519,9808,8806,0.0,,9001
-17519,9808,8807,0.0,,9001
-17521,9808,8801,0.0,,9102
-17521,9808,8802,21.0,,9102
-17521,9808,8805,1.0,,9201
-17521,9808,8806,0.0,,9001
-17521,9808,8807,0.0,,9001
-17523,9808,8801,0.0,,9102
-17523,9808,8802,23.0,,9102
-17523,9808,8805,1.0,,9201
-17523,9808,8806,0.0,,9001
-17523,9808,8807,0.0,,9001
-17525,9808,8801,0.0,,9102
-17525,9808,8802,25.0,,9102
-17525,9808,8805,1.0,,9201
-17525,9808,8806,0.0,,9001
-17525,9808,8807,0.0,,9001
-17527,9808,8801,0.0,,9102
-17527,9808,8802,27.0,,9102
-17527,9808,8805,1.0,,9201
-17527,9808,8806,0.0,,9001
-17527,9808,8807,0.0,,9001
-17529,9808,8801,0.0,,9102
-17529,9808,8802,29.0,,9102
-17529,9808,8805,1.0,,9201
-17529,9808,8806,0.0,,9001
-17529,9808,8807,0.0,,9001
-17531,9808,8801,0.0,,9102
-17531,9808,8802,31.0,,9102
-17531,9808,8805,1.0,,9201
-17531,9808,8806,0.0,,9001
-17531,9808,8807,0.0,,9001
-17533,9808,8801,0.0,,9102
-17533,9808,8802,33.0,,9102
-17533,9808,8805,1.0,,9201
-17533,9808,8806,0.0,,9001
-17533,9808,8807,0.0,,9001
-17611,9808,8801,-22.0,,9102
-17611,9808,8802,11.0,,9102
-17611,9808,8805,1.0,,9201
-17611,9808,8806,0.0,,9031
-17611,9808,8807,0.0,,9031
-17613,9808,8801,-22.0,,9102
-17613,9808,8802,13.0,,9102
-17613,9808,8805,1.0,,9201
-17613,9808,8806,0.0,,9031
-17613,9808,8807,0.0,,9031
-17615,9808,8801,-22.0,,9102
-17615,9808,8802,15.0,,9102
-17615,9808,8805,1.0,,9201
-17615,9808,8806,0.0,,9031
-17615,9808,8807,0.0,,9031
-17617,9808,8801,-22.0,,9102
-17617,9808,8802,17.0,,9102
-17617,9808,8805,1.0,,9201
-17617,9808,8806,0.0,,9031
-17617,9808,8807,0.0,,9031
-17619,9808,8801,-22.0,,9102
-17619,9808,8802,19.0,,9102
-17619,9808,8805,1.0,,9201
-17619,9808,8806,0.0,,9031
-17619,9808,8807,0.0,,9031
-17621,9808,8801,-22.0,,9102
-17621,9808,8802,21.0,,9102
-17621,9808,8805,1.0,,9201
-17621,9808,8806,0.0,,9031
-17621,9808,8807,0.0,,9031
-17623,9808,8801,-22.0,,9102
-17623,9808,8802,23.0,,9102
-17623,9808,8805,1.0,,9201
-17623,9808,8806,0.0,,9031
-17623,9808,8807,0.0,,9031
-17625,9808,8801,-22.0,,9102
-17625,9808,8802,25.0,,9102
-17625,9808,8805,1.0,,9201
-17625,9808,8806,0.0,,9031
-17625,9808,8807,0.0,,9031
-17700,9807,8801,0.0,,9110
-17700,9807,8802,-55.3,,9110
-17700,9807,8805,0.9999,,9201
-17700,9807,8806,304800.0,,9001
-17700,9807,8807,0.0,,9001
-17701,9807,8801,0.0,,9102
-17701,9807,8802,-53.0,,9102
-17701,9807,8805,0.9999,,9201
-17701,9807,8806,304800.0,,9001
-17701,9807,8807,0.0,,9001
-17702,9807,8801,0.0,,9102
-17702,9807,8802,-56.0,,9102
-17702,9807,8805,0.9999,,9201
-17702,9807,8806,304800.0,,9001
-17702,9807,8807,0.0,,9001
-17703,9807,8801,0.0,,9110
-17703,9807,8802,-58.3,,9110
-17703,9807,8805,0.9999,,9201
-17703,9807,8806,304800.0,,9001
-17703,9807,8807,0.0,,9001
-17704,9807,8801,0.0,,9110
-17704,9807,8802,-61.3,,9110
-17704,9807,8805,0.9999,,9201
-17704,9807,8806,304800.0,,9001
-17704,9807,8807,0.0,,9001
-17705,9807,8801,0.0,,9110
-17705,9807,8802,-64.3,,9110
-17705,9807,8805,0.9999,,9201
-17705,9807,8806,304800.0,,9001
-17705,9807,8807,0.0,,9001
-17706,9807,8801,0.0,,9110
-17706,9807,8802,-67.3,,9110
-17706,9807,8805,0.9999,,9201
-17706,9807,8806,304800.0,,9001
-17706,9807,8807,0.0,,9001
-17707,9807,8801,0.0,,9110
-17707,9807,8802,-70.3,,9110
-17707,9807,8805,0.9999,,9201
-17707,9807,8806,304800.0,,9001
-17707,9807,8807,0.0,,9001
-17708,9807,8801,0.0,,9110
-17708,9807,8802,-73.3,,9110
-17708,9807,8805,0.9999,,9201
-17708,9807,8806,304800.0,,9001
-17708,9807,8807,0.0,,9001
-17709,9807,8801,0.0,,9110
-17709,9807,8802,-76.3,,9110
-17709,9807,8805,0.9999,,9201
-17709,9807,8806,304800.0,,9001
-17709,9807,8807,0.0,,9001
-17710,9807,8801,0.0,,9110
-17710,9807,8802,-79.3,,9110
-17710,9807,8805,0.9999,,9201
-17710,9807,8806,304800.0,,9001
-17710,9807,8807,0.0,,9001
-17711,9807,8801,0.0,,9110
-17711,9807,8802,-82.3,,9110
-17711,9807,8805,0.9999,,9201
-17711,9807,8806,304800.0,,9001
-17711,9807,8807,0.0,,9001
-17712,9807,8801,0.0,,9102
-17712,9807,8802,-81.0,,9102
-17712,9807,8805,0.9999,,9201
-17712,9807,8806,304800.0,,9001
-17712,9807,8807,0.0,,9001
-17713,9807,8801,0.0,,9102
-17713,9807,8802,-84.0,,9102
-17713,9807,8805,0.9999,,9201
-17713,9807,8806,304800.0,,9001
-17713,9807,8807,0.0,,9001
-17714,9807,8801,0.0,,9102
-17714,9807,8802,-87.0,,9102
-17714,9807,8805,0.9999,,9201
-17714,9807,8806,304800.0,,9001
-17714,9807,8807,0.0,,9001
-17715,9807,8801,0.0,,9102
-17715,9807,8802,-90.0,,9102
-17715,9807,8805,0.9999,,9201
-17715,9807,8806,304800.0,,9001
-17715,9807,8807,0.0,,9001
-17716,9807,8801,0.0,,9102
-17716,9807,8802,-93.0,,9102
-17716,9807,8805,0.9999,,9201
-17716,9807,8806,304800.0,,9001
-17716,9807,8807,0.0,,9001
-17717,9807,8801,0.0,,9102
-17717,9807,8802,-96.0,,9102
-17717,9807,8805,0.9999,,9201
-17717,9807,8806,304800.0,,9001
-17717,9807,8807,0.0,,9001
-17794,9807,8801,0.0,,9110
-17794,9807,8802,-61.3,,9110
-17794,9807,8805,0.9999,,9201
-17794,9807,8806,4500000.0,,9001
-17794,9807,8807,0.0,,9001
-17795,9807,8801,0.0,,9110
-17795,9807,8802,-64.3,,9110
-17795,9807,8805,0.9999,,9201
-17795,9807,8806,5500000.0,,9001
-17795,9807,8807,0.0,,9001
-17801,9807,8801,33.0,,9110
-17801,9807,8802,129.3,,9110
-17801,9807,8805,0.9999,,9201
-17801,9807,8806,0.0,,9001
-17801,9807,8807,0.0,,9001
-17802,9807,8801,33.0,,9110
-17802,9807,8802,131.0,,9110
-17802,9807,8805,0.9999,,9201
-17802,9807,8806,0.0,,9001
-17802,9807,8807,0.0,,9001
-17803,9807,8801,36.0,,9110
-17803,9807,8802,132.1,,9110
-17803,9807,8805,0.9999,,9201
-17803,9807,8806,0.0,,9001
-17803,9807,8807,0.0,,9001
-17804,9807,8801,33.0,,9110
-17804,9807,8802,133.3,,9110
-17804,9807,8805,0.9999,,9201
-17804,9807,8806,0.0,,9001
-17804,9807,8807,0.0,,9001
-17805,9807,8801,36.0,,9110
-17805,9807,8802,134.2,,9110
-17805,9807,8805,0.9999,,9201
-17805,9807,8806,0.0,,9001
-17805,9807,8807,0.0,,9001
-17806,9807,8801,36.0,,9110
-17806,9807,8802,136.0,,9110
-17806,9807,8805,0.9999,,9201
-17806,9807,8806,0.0,,9001
-17806,9807,8807,0.0,,9001
-17807,9807,8801,36.0,,9110
-17807,9807,8802,137.1,,9110
-17807,9807,8805,0.9999,,9201
-17807,9807,8806,0.0,,9001
-17807,9807,8807,0.0,,9001
-17808,9807,8801,36.0,,9110
-17808,9807,8802,138.3,,9110
-17808,9807,8805,0.9999,,9201
-17808,9807,8806,0.0,,9001
-17808,9807,8807,0.0,,9001
-17809,9807,8801,36.0,,9110
-17809,9807,8802,139.5,,9110
-17809,9807,8805,0.9999,,9201
-17809,9807,8806,0.0,,9001
-17809,9807,8807,0.0,,9001
-17810,9807,8801,40.0,,9110
-17810,9807,8802,140.5,,9110
-17810,9807,8805,0.9999,,9201
-17810,9807,8806,0.0,,9001
-17810,9807,8807,0.0,,9001
-17811,9807,8801,44.0,,9110
-17811,9807,8802,140.15,,9110
-17811,9807,8805,0.9999,,9201
-17811,9807,8806,0.0,,9001
-17811,9807,8807,0.0,,9001
-17812,9807,8801,44.0,,9110
-17812,9807,8802,142.15,,9110
-17812,9807,8805,0.9999,,9201
-17812,9807,8806,0.0,,9001
-17812,9807,8807,0.0,,9001
-17813,9807,8801,44.0,,9110
-17813,9807,8802,144.15,,9110
-17813,9807,8805,0.9999,,9201
-17813,9807,8806,0.0,,9001
-17813,9807,8807,0.0,,9001
-17814,9807,8801,26.0,,9110
-17814,9807,8802,142.0,,9110
-17814,9807,8805,0.9999,,9201
-17814,9807,8806,0.0,,9001
-17814,9807,8807,0.0,,9001
-17815,9807,8801,26.0,,9110
-17815,9807,8802,127.3,,9110
-17815,9807,8805,0.9999,,9201
-17815,9807,8806,0.0,,9001
-17815,9807,8807,0.0,,9001
-17816,9807,8801,26.0,,9110
-17816,9807,8802,124.0,,9110
-17816,9807,8805,0.9999,,9201
-17816,9807,8806,0.0,,9001
-17816,9807,8807,0.0,,9001
-17817,9807,8801,26.0,,9110
-17817,9807,8802,131.0,,9110
-17817,9807,8805,0.9999,,9201
-17817,9807,8806,0.0,,9001
-17817,9807,8807,0.0,,9001
-17818,9807,8801,20.0,,9110
-17818,9807,8802,136.0,,9110
-17818,9807,8805,0.9999,,9201
-17818,9807,8806,0.0,,9001
-17818,9807,8807,0.0,,9001
-17819,9807,8801,26.0,,9110
-17819,9807,8802,154.0,,9110
-17819,9807,8805,0.9999,,9201
-17819,9807,8806,0.0,,9001
-17819,9807,8807,0.0,,9001
-17901,9807,8801,-36.5247515,,9110
-17901,9807,8802,174.45516217,,9110
-17901,9807,8805,0.9999,,9201
-17901,9807,8806,300000.0,,9001
-17901,9807,8807,700000.0,,9001
-17902,9807,8801,-37.45404993,,9110
-17902,9807,8802,176.27583101,,9110
-17902,9807,8805,1.0,,9201
-17902,9807,8806,300000.0,,9001
-17902,9807,8807,700000.0,,9001
-17903,9807,8801,-38.372893,,9110
-17903,9807,8802,177.53082906,,9110
-17903,9807,8805,1.0,,9201
-17903,9807,8806,300000.0,,9001
-17903,9807,8807,700000.0,,9001
-17904,9807,8801,-39.39033455,,9110
-17904,9807,8802,176.40252499,,9110
-17904,9807,8805,1.0,,9201
-17904,9807,8806,300000.0,,9001
-17904,9807,8807,700000.0,,9001
-17905,9807,8801,-39.08087299,,9110
-17905,9807,8802,174.13408423,,9110
-17905,9807,8805,1.0,,9201
-17905,9807,8806,300000.0,,9001
-17905,9807,8807,700000.0,,9001
-17906,9807,8801,-39.30448934,,9110
-17906,9807,8802,175.38241325,,9110
-17906,9807,8805,1.0,,9201
-17906,9807,8806,300000.0,,9001
-17906,9807,8807,700000.0,,9001
-17907,9807,8801,-40.14310097,,9110
-17907,9807,8802,175.29171586,,9110
-17907,9807,8805,1.0,,9201
-17907,9807,8806,300000.0,,9001
-17907,9807,8807,700000.0,,9001
-17908,9807,8801,-40.55319175,,9110
-17908,9807,8802,175.38504588,,9110
-17908,9807,8805,1.0,,9201
-17908,9807,8806,300000.0,,9001
-17908,9807,8807,700000.0,,9001
-17909,9807,8801,-41.18047507,,9110
-17909,9807,8802,174.46358432,,9110
-17909,9807,8805,1.0,,9201
-17909,9807,8806,300000.0,,9001
-17909,9807,8807,700000.0,,9001
-17910,9807,8801,-40.42531326,,9110
-17910,9807,8802,172.40193674,,9110
-17910,9807,8805,1.0,,9201
-17910,9807,8806,300000.0,,9001
-17910,9807,8807,700000.0,,9001
-17911,9807,8801,-41.1628361,,9110
-17911,9807,8802,173.17575405,,9110
-17911,9807,8805,1.0,,9201
-17911,9807,8806,300000.0,,9001
-17911,9807,8807,700000.0,,9001
-17912,9807,8801,-41.17236815,,9110
-17912,9807,8802,172.06325015,,9110
-17912,9807,8805,1.0,,9201
-17912,9807,8806,300000.0,,9001
-17912,9807,8807,700000.0,,9001
-17913,9807,8801,-41.48388903,,9110
-17913,9807,8802,171.34525362,,9110
-17913,9807,8805,1.0,,9201
-17913,9807,8806,300000.0,,9001
-17913,9807,8807,700000.0,,9001
-17914,9807,8801,-42.20012994,,9110
-17914,9807,8802,171.32591767,,9110
-17914,9807,8805,1.0,,9201
-17914,9807,8806,300000.0,,9001
-17914,9807,8807,700000.0,,9001
-17915,9807,8801,-42.41208197,,9110
-17915,9807,8802,173.00364802,,9110
-17915,9807,8805,1.0,,9201
-17915,9807,8806,300000.0,,9001
-17915,9807,8807,700000.0,,9001
-17916,9807,8801,-41.3240152,,9110
-17916,9807,8802,173.48074668,,9110
-17916,9807,8805,1.0,,9201
-17916,9807,8806,300000.0,,9001
-17916,9807,8807,700000.0,,9001
-17917,9807,8801,-42.53107605,,9110
-17917,9807,8802,170.58479766,,9110
-17917,9807,8805,1.0,,9201
-17917,9807,8806,300000.0,,9001
-17917,9807,8807,700000.0,,9001
-17918,9807,8801,-43.06364613,,9110
-17918,9807,8802,170.1539333,,9110
-17918,9807,8805,1.0,,9201
-17918,9807,8806,300000.0,,9001
-17918,9807,8807,700000.0,,9001
-17919,9807,8801,-43.58400904,,9110
-17919,9807,8802,168.36225612,,9110
-17919,9807,8805,1.0,,9201
-17919,9807,8806,300000.0,,9001
-17919,9807,8807,700000.0,,9001
-17920,9807,8801,-43.35262953,,9110
-17920,9807,8802,172.43378969,,9110
-17920,9807,8805,1.0,,9201
-17920,9807,8806,300000.0,,9001
-17920,9807,8807,700000.0,,9001
-17921,9807,8801,-43.44553616,,9110
-17921,9807,8802,171.21386945,,9110
-17921,9807,8805,1.0,,9201
-17921,9807,8806,300000.0,,9001
-17921,9807,8807,700000.0,,9001
-17922,9807,8801,-44.24079933,,9110
-17922,9807,8802,171.0326103,,9110
-17922,9807,8805,1.0,,9201
-17922,9807,8806,300000.0,,9001
-17922,9807,8807,700000.0,,9001
-17923,9807,8801,-44.44069647,,9110
-17923,9807,8802,169.28039183,,9110
-17923,9807,8805,1.0,,9201
-17923,9807,8806,300000.0,,9001
-17923,9807,8807,700000.0,,9001
-17924,9807,8801,-45.07584493,,9110
-17924,9807,8802,168.23551083,,9110
-17924,9807,8805,1.0,,9201
-17924,9807,8806,300000.0,,9001
-17924,9807,8807,700000.0,,9001
-17925,9807,8801,-45.33494142,,9110
-17925,9807,8802,167.44199024,,9110
-17925,9807,8805,1.0,,9201
-17925,9807,8806,300000.0,,9001
-17925,9807,8807,700000.0,,9001
-17926,9807,8801,-45.48583078,,9110
-17926,9807,8802,170.37429426,,9110
-17926,9807,8805,1.0,,9201
-17926,9807,8806,300000.0,,9001
-17926,9807,8807,700000.0,,9001
-17927,9807,8801,-45.51414481,,9110
-17927,9807,8802,170.16573208,,9110
-17927,9807,8805,0.99996,,9201
-17927,9807,8806,300000.0,,9001
-17927,9807,8807,700000.0,,9001
-17928,9807,8801,-46.36000346,,9110
-17928,9807,8802,168.20343392,,9110
-17928,9807,8805,1.0,,9201
-17928,9807,8806,300002.66,,9001
-17928,9807,8807,699999.58,,9001
-17931,9807,8801,-36.5247,,9110
-17931,9807,8802,174.4551,,9110
-17931,9807,8805,0.9999,,9201
-17931,9807,8806,400000.0,,9001
-17931,9807,8807,800000.0,,9001
-17932,9807,8801,-37.454,,9110
-17932,9807,8802,176.2758,,9110
-17932,9807,8805,1.0,,9201
-17932,9807,8806,400000.0,,9001
-17932,9807,8807,800000.0,,9001
-17933,9807,8801,-38.3728,,9110
-17933,9807,8802,177.5308,,9110
-17933,9807,8805,1.0,,9201
-17933,9807,8806,400000.0,,9001
-17933,9807,8807,800000.0,,9001
-17934,9807,8801,-39.3903,,9110
-17934,9807,8802,176.4025,,9110
-17934,9807,8805,1.0,,9201
-17934,9807,8806,400000.0,,9001
-17934,9807,8807,800000.0,,9001
-17935,9807,8801,-39.0808,,9110
-17935,9807,8802,174.134,,9110
-17935,9807,8805,1.0,,9201
-17935,9807,8806,400000.0,,9001
-17935,9807,8807,800000.0,,9001
-17936,9807,8801,-39.3044,,9110
-17936,9807,8802,175.3824,,9110
-17936,9807,8805,1.0,,9201
-17936,9807,8806,400000.0,,9001
-17936,9807,8807,800000.0,,9001
-17937,9807,8801,-40.1431,,9110
-17937,9807,8802,175.2917,,9110
-17937,9807,8805,1.0,,9201
-17937,9807,8806,400000.0,,9001
-17937,9807,8807,800000.0,,9001
-17938,9807,8801,-40.5531,,9110
-17938,9807,8802,175.385,,9110
-17938,9807,8805,1.0,,9201
-17938,9807,8806,400000.0,,9001
-17938,9807,8807,800000.0,,9001
-17939,9807,8801,-41.1804,,9110
-17939,9807,8802,174.4635,,9110
-17939,9807,8805,1.0,,9201
-17939,9807,8806,400000.0,,9001
-17939,9807,8807,800000.0,,9001
-17940,9807,8801,-40.4253,,9110
-17940,9807,8802,172.4019,,9110
-17940,9807,8805,1.0,,9201
-17940,9807,8806,400000.0,,9001
-17940,9807,8807,800000.0,,9001
-17941,9807,8801,-41.1628,,9110
-17941,9807,8802,173.1757,,9110
-17941,9807,8805,1.0,,9201
-17941,9807,8806,400000.0,,9001
-17941,9807,8807,800000.0,,9001
-17942,9807,8801,-41.1723,,9110
-17942,9807,8802,172.0632,,9110
-17942,9807,8805,1.0,,9201
-17942,9807,8806,400000.0,,9001
-17942,9807,8807,800000.0,,9001
-17943,9807,8801,-41.4838,,9110
-17943,9807,8802,171.3452,,9110
-17943,9807,8805,1.0,,9201
-17943,9807,8806,400000.0,,9001
-17943,9807,8807,800000.0,,9001
-17944,9807,8801,-42.2001,,9110
-17944,9807,8802,171.3259,,9110
-17944,9807,8805,1.0,,9201
-17944,9807,8806,400000.0,,9001
-17944,9807,8807,800000.0,,9001
-17945,9807,8801,-42.412,,9110
-17945,9807,8802,173.0036,,9110
-17945,9807,8805,1.0,,9201
-17945,9807,8806,400000.0,,9001
-17945,9807,8807,800000.0,,9001
-17946,9807,8801,-41.324,,9110
-17946,9807,8802,173.4807,,9110
-17946,9807,8805,1.0,,9201
-17946,9807,8806,400000.0,,9001
-17946,9807,8807,800000.0,,9001
-17947,9807,8801,-42.531,,9110
-17947,9807,8802,170.5847,,9110
-17947,9807,8805,1.0,,9201
-17947,9807,8806,400000.0,,9001
-17947,9807,8807,800000.0,,9001
-17948,9807,8801,-43.0636,,9110
-17948,9807,8802,170.1539,,9110
-17948,9807,8805,1.0,,9201
-17948,9807,8806,400000.0,,9001
-17948,9807,8807,800000.0,,9001
-17949,9807,8801,-43.584,,9110
-17949,9807,8802,168.3622,,9110
-17949,9807,8805,1.0,,9201
-17949,9807,8806,400000.0,,9001
-17949,9807,8807,800000.0,,9001
-17950,9807,8801,-43.3526,,9110
-17950,9807,8802,172.4337,,9110
-17950,9807,8805,1.0,,9201
-17950,9807,8806,400000.0,,9001
-17950,9807,8807,800000.0,,9001
-17951,9807,8801,-43.4455,,9110
-17951,9807,8802,171.2138,,9110
-17951,9807,8805,1.0,,9201
-17951,9807,8806,400000.0,,9001
-17951,9807,8807,800000.0,,9001
-17952,9807,8801,-44.2407,,9110
-17952,9807,8802,171.0326,,9110
-17952,9807,8805,1.0,,9201
-17952,9807,8806,400000.0,,9001
-17952,9807,8807,800000.0,,9001
-17953,9807,8801,-44.4406,,9110
-17953,9807,8802,169.2803,,9110
-17953,9807,8805,1.0,,9201
-17953,9807,8806,400000.0,,9001
-17953,9807,8807,800000.0,,9001
-17954,9807,8801,-45.0758,,9110
-17954,9807,8802,168.2355,,9110
-17954,9807,8805,1.0,,9201
-17954,9807,8806,400000.0,,9001
-17954,9807,8807,800000.0,,9001
-17955,9807,8801,-45.3349,,9110
-17955,9807,8802,167.4419,,9110
-17955,9807,8805,1.0,,9201
-17955,9807,8806,400000.0,,9001
-17955,9807,8807,800000.0,,9001
-17956,9807,8801,-45.4858,,9110
-17956,9807,8802,170.3742,,9110
-17956,9807,8805,1.0,,9201
-17956,9807,8806,400000.0,,9001
-17956,9807,8807,800000.0,,9001
-17957,9807,8801,-45.5141,,9110
-17957,9807,8802,170.1657,,9110
-17957,9807,8805,0.99996,,9201
-17957,9807,8806,400000.0,,9001
-17957,9807,8807,800000.0,,9001
-17958,9807,8801,-46.36,,9110
-17958,9807,8802,168.2034,,9110
-17958,9807,8805,1.0,,9201
-17958,9807,8806,400000.0,,9001
-17958,9807,8807,800000.0,,9001
-18011,9801,8801,40.0,,9105
-18011,9801,8802,3.0,,9105
-18011,9801,8805,0.999625544,,9201
-18011,9801,8806,500000.0,,9001
-18011,9801,8807,300000.0,,9001
-18012,9801,8801,37.0,,9105
-18012,9801,8802,3.0,,9105
-18012,9801,8805,0.999625769,,9201
-18012,9801,8806,500000.0,,9001
-18012,9801,8807,300000.0,,9001
-18021,9801,8801,40.0,,9105
-18021,9801,8802,3.0,,9105
-18021,9801,8805,0.999625544,,9201
-18021,9801,8806,500135.0,,9001
-18021,9801,8807,300090.0,,9001
-18022,9801,8801,37.0,,9105
-18022,9801,8802,3.0,,9105
-18022,9801,8805,0.999625769,,9201
-18022,9801,8806,500135.0,,9001
-18022,9801,8807,300090.0,,9001
-18031,9807,8801,-90.0,,9102
-18031,9807,8802,-72.0,,9102
-18031,9807,8805,1.0,,9201
-18031,9807,8806,1500000.0,,9001
-18031,9807,8807,0.0,,9001
-18032,9807,8801,-90.0,,9102
-18032,9807,8802,-69.0,,9102
-18032,9807,8805,1.0,,9201
-18032,9807,8806,2500000.0,,9001
-18032,9807,8807,0.0,,9001
-18033,9807,8801,-90.0,,9102
-18033,9807,8802,-66.0,,9102
-18033,9807,8805,1.0,,9201
-18033,9807,8806,3500000.0,,9001
-18033,9807,8807,0.0,,9001
-18034,9807,8801,-90.0,,9102
-18034,9807,8802,-63.0,,9102
-18034,9807,8805,1.0,,9201
-18034,9807,8806,4500000.0,,9001
-18034,9807,8807,0.0,,9001
-18035,9807,8801,-90.0,,9102
-18035,9807,8802,-60.0,,9102
-18035,9807,8805,1.0,,9201
-18035,9807,8806,5500000.0,,9001
-18035,9807,8807,0.0,,9001
-18036,9807,8801,-90.0,,9102
-18036,9807,8802,-57.0,,9102
-18036,9807,8805,1.0,,9201
-18036,9807,8806,6500000.0,,9001
-18036,9807,8807,0.0,,9001
-18037,9807,8801,-90.0,,9102
-18037,9807,8802,-54.0,,9102
-18037,9807,8805,1.0,,9201
-18037,9807,8806,7500000.0,,9001
-18037,9807,8807,0.0,,9001
-18041,9807,8801,0.0,,9102
-18041,9807,8802,28.0,,9102
-18041,9807,8805,1.0,,9201
-18041,9807,8806,0.0,,9001
-18041,9807,8807,0.0,,9001
-18042,9807,8801,0.0,,9102
-18042,9807,8802,31.0,,9102
-18042,9807,8805,1.0,,9201
-18042,9807,8806,0.0,,9001
-18042,9807,8807,0.0,,9001
-18043,9807,8801,0.0,,9102
-18043,9807,8802,34.0,,9102
-18043,9807,8805,1.0,,9201
-18043,9807,8806,0.0,,9001
-18043,9807,8807,0.0,,9001
-18044,9807,8801,0.0,,9110
-18044,9807,8802,10.2,,9110
-18044,9807,8805,1.0,,9201
-18044,9807,8806,150000.0,,9001
-18044,9807,8807,0.0,,9001
-18045,9807,8801,0.0,,9110
-18045,9807,8802,13.2,,9110
-18045,9807,8805,1.0,,9201
-18045,9807,8806,450000.0,,9001
-18045,9807,8807,0.0,,9001
-18046,9807,8801,0.0,,9110
-18046,9807,8802,16.2,,9110
-18046,9807,8805,1.0,,9201
-18046,9807,8806,750000.0,,9001
-18046,9807,8807,0.0,,9001
-18051,9807,8801,4.355657,,9110
-18051,9807,8802,-77.04513,,9110
-18051,9807,8805,1.0,,9201
-18051,9807,8806,1000000.0,,9001
-18051,9807,8807,1000000.0,,9001
-18052,9807,8801,4.355657,,9110
-18052,9807,8802,-74.04513,,9110
-18052,9807,8805,1.0,,9201
-18052,9807,8806,1000000.0,,9001
-18052,9807,8807,1000000.0,,9001
-18053,9807,8801,4.355657,,9110
-18053,9807,8802,-71.04513,,9110
-18053,9807,8805,1.0,,9201
-18053,9807,8806,1000000.0,,9001
-18053,9807,8807,1000000.0,,9001
-18054,9807,8801,4.355657,,9110
-18054,9807,8802,-68.04513,,9110
-18054,9807,8805,1.0,,9201
-18054,9807,8806,1000000.0,,9001
-18054,9807,8807,1000000.0,,9001
-18061,9801,8801,22.21,,9110
-18061,9801,8802,-81.0,,9110
-18061,9801,8805,0.99993602,,9201
-18061,9801,8806,500000.0,,9001
-18061,9801,8807,280296.016,,9001
-18062,9801,8801,20.43,,9110
-18062,9801,8802,-76.5,,9110
-18062,9801,8805,0.99994848,,9201
-18062,9801,8806,500000.0,,9001
-18062,9801,8807,229126.939,,9001
-18071,9807,8801,30.0,,9102
-18071,9807,8802,35.0,,9102
-18071,9807,8805,1.0,,9201
-18071,9807,8806,300000.0,,9001
-18071,9807,8807,1100000.0,,9001
-18072,9807,8801,30.0,,9102
-18072,9807,8802,31.0,,9102
-18072,9807,8805,1.0,,9201
-18072,9807,8806,615000.0,,9001
-18072,9807,8807,810000.0,,9001
-18073,9807,8801,30.0,,9102
-18073,9807,8802,27.0,,9102
-18073,9807,8805,1.0,,9201
-18073,9807,8806,700000.0,,9001
-18073,9807,8807,200000.0,,9001
-18074,9807,8801,30.0,,9102
-18074,9807,8802,27.0,,9102
-18074,9807,8805,1.0,,9201
-18074,9807,8806,700000.0,,9001
-18074,9807,8807,1200000.0,,9001
-18081,9801,8801,55.0,,9105
-18081,9801,8802,0.0,,9105
-18081,9801,8805,0.999877341,,9201
-18081,9801,8806,600000.0,,9001
-18081,9801,8807,1200000.0,,9001
-18082,9801,8801,52.0,,9105
-18082,9801,8802,0.0,,9105
-18082,9801,8805,0.99987742,,9201
-18082,9801,8806,600000.0,,9001
-18082,9801,8807,2200000.0,,9001
-18083,9801,8801,49.0,,9105
-18083,9801,8802,0.0,,9105
-18083,9801,8805,0.999877499,,9201
-18083,9801,8806,600000.0,,9001
-18083,9801,8807,3200000.0,,9001
-18084,9801,8801,46.85,,9105
-18084,9801,8802,0.0,,9105
-18084,9801,8805,0.99994471,,9201
-18084,9801,8806,234.358,,9001
-18084,9801,8807,4185861.369,,9001
-18085,9802,8821,46.3,,9110
-18085,9802,8822,3.0,,9110
-18085,9802,8823,49.0,,9110
-18085,9802,8824,44.0,,9110
-18085,9802,8826,700000.0,,9001
-18085,9802,8827,6600000.0,,9001
-18086,9801,8801,46.48,,9110
-18086,9801,8802,2.2014025,,9110
-18086,9801,8805,0.99987742,,9201
-18086,9801,8806,600000.0,,9001
-18086,9801,8807,2200000.0,,9001
-18091,9801,8801,55.0,,9105
-18091,9801,8802,0.0,,9105
-18091,9801,8805,0.999877341,,9201
-18091,9801,8806,600000.0,,9001
-18091,9801,8807,200000.0,,9001
-18092,9801,8801,52.0,,9105
-18092,9801,8802,0.0,,9105
-18092,9801,8805,0.99987742,,9201
-18092,9801,8806,600000.0,,9001
-18092,9801,8807,200000.0,,9001
-18093,9801,8801,49.0,,9105
-18093,9801,8802,0.0,,9105
-18093,9801,8805,0.999877499,,9201
-18093,9801,8806,600000.0,,9001
-18093,9801,8807,200000.0,,9001
-18094,9801,8801,46.85,,9105
-18094,9801,8802,0.0,,9105
-18094,9801,8805,0.99994471,,9201
-18094,9801,8806,234.358,,9001
-18094,9801,8807,185861.369,,9001
-18110,9801,8801,39.3,,9110
-18110,9801,8802,68.0,,9110
-18110,9801,8805,0.99846154,,9201
-18110,9801,8806,2355500.0,,9084
-18110,9801,8807,2590000.0,,9084
-18111,9801,8801,32.3,,9110
-18111,9801,8802,68.0,,9110
-18111,9801,8805,0.99878641,,9201
-18111,9801,8806,3000000.0,,9084
-18111,9801,8807,1000000.0,,9084
-18112,9801,8801,26.0,,9102
-18112,9801,8802,74.0,,9102
-18112,9801,8805,0.99878641,,9201
-18112,9801,8806,3000000.0,,9084
-18112,9801,8807,1000000.0,,9084
-18113,9801,8801,26.0,,9102
-18113,9801,8802,90.0,,9102
-18113,9801,8805,0.99878641,,9201
-18113,9801,8806,3000000.0,,9084
-18113,9801,8807,1000000.0,,9084
-18114,9801,8801,19.0,,9102
-18114,9801,8802,80.0,,9102
-18114,9801,8805,0.99878641,,9201
-18114,9801,8806,3000000.0,,9084
-18114,9801,8807,1000000.0,,9084
-18115,9801,8801,19.0,,9102
-18115,9801,8802,100.0,,9102
-18115,9801,8805,0.99878641,,9201
-18115,9801,8806,3000000.0,,9084
-18115,9801,8807,1000000.0,,9084
-18116,9801,8801,12.0,,9102
-18116,9801,8802,80.0,,9102
-18116,9801,8805,0.99878641,,9201
-18116,9801,8806,3000000.0,,9084
-18116,9801,8807,1000000.0,,9084
-18117,9801,8801,12.0,,9102
-18117,9801,8802,100.0,,9102
-18117,9801,8805,0.99878641,,9201
-18117,9801,8806,3000000.0,,9084
-18117,9801,8807,1000000.0,,9084
-18121,9807,8801,0.0,,9102
-18121,9807,8802,9.0,,9102
-18121,9807,8805,0.9996,,9201
-18121,9807,8806,1500000.0,,9001
-18121,9807,8807,0.0,,9001
-18122,9807,8801,0.0,,9102
-18122,9807,8802,15.0,,9102
-18122,9807,8805,0.9996,,9201
-18122,9807,8806,2520000.0,,9001
-18122,9807,8807,0.0,,9001
-18131,9801,8801,37.0,,9105
-18131,9801,8802,-6.0,,9105
-18131,9801,8805,0.999625769,,9201
-18131,9801,8806,500000.0,,9001
-18131,9801,8807,300000.0,,9001
-18132,9801,8801,33.0,,9105
-18132,9801,8802,-6.0,,9105
-18132,9801,8805,0.999615596,,9201
-18132,9801,8806,500000.0,,9001
-18132,9801,8807,300000.0,,9001
-18133,9801,8801,29.0,,9105
-18133,9801,8802,-6.0,,9105
-18133,9801,8805,0.9996,,9201
-18133,9801,8806,1200000.0,,9001
-18133,9801,8807,400000.0,,9001
-18141,9807,8801,-39.0,,9110
-18141,9807,8802,175.3,,9110
-18141,9807,8805,1.0,,9201
-18141,9807,8806,300000.0,,9040
-18141,9807,8807,400000.0,,9040
-18142,9807,8801,-44.0,,9110
-18142,9807,8802,171.3,,9110
-18142,9807,8805,1.0,,9201
-18142,9807,8806,500000.0,,9040
-18142,9807,8807,500000.0,,9040
-18151,9807,8801,4.0,,9110
-18151,9807,8802,4.3,,9110
-18151,9807,8805,0.99975,,9201
-18151,9807,8806,230738.26,,9001
-18151,9807,8807,0.0,,9001
-18152,9807,8801,4.0,,9110
-18152,9807,8802,8.3,,9110
-18152,9807,8805,0.99975,,9201
-18152,9807,8806,670553.98,,9001
-18152,9807,8807,0.0,,9001
-18153,9807,8801,4.0,,9110
-18153,9807,8802,12.3,,9110
-18153,9807,8805,0.99975,,9201
-18153,9807,8806,1110369.7,,9001
-18153,9807,8807,0.0,,9001
-18161,9807,8801,-6.0,,9110
-18161,9807,8802,-80.3,,9110
-18161,9807,8805,0.99983008,,9201
-18161,9807,8806,222000.0,,9001
-18161,9807,8807,1426834.743,,9001
-18162,9807,8801,-9.3,,9110
-18162,9807,8802,-76.0,,9110
-18162,9807,8805,0.99932994,,9201
-18162,9807,8806,720000.0,,9001
-18162,9807,8807,1039979.159,,9001
-18163,9807,8801,-9.3,,9110
-18163,9807,8802,-70.3,,9110
-18163,9807,8805,0.99952992,,9201
-18163,9807,8806,1324000.0,,9001
-18163,9807,8807,1040084.558,,9001
-18171,9807,8801,0.0,,9102
-18171,9807,8802,117.0,,9102
-18171,9807,8805,0.99995,,9201
-18171,9807,8806,500000.0,,9001
-18171,9807,8807,0.0,,9001
-18172,9807,8801,0.0,,9102
-18172,9807,8802,119.0,,9102
-18172,9807,8805,0.99995,,9201
-18172,9807,8806,500000.0,,9001
-18172,9807,8807,0.0,,9001
-18173,9807,8801,0.0,,9102
-18173,9807,8802,121.0,,9102
-18173,9807,8805,0.99995,,9201
-18173,9807,8806,500000.0,,9001
-18173,9807,8807,0.0,,9001
-18174,9807,8801,0.0,,9102
-18174,9807,8802,123.0,,9102
-18174,9807,8805,0.99995,,9201
-18174,9807,8806,500000.0,,9001
-18174,9807,8807,0.0,,9001
-18175,9807,8801,0.0,,9102
-18175,9807,8802,125.0,,9102
-18175,9807,8805,0.99995,,9201
-18175,9807,8806,500000.0,,9001
-18175,9807,8807,0.0,,9001
-18181,9801,8801,40.0,,9105
-18181,9801,8802,11.0,,9105
-18181,9801,8805,0.999625544,,9201
-18181,9801,8806,500000.0,,9001
-18181,9801,8807,300000.0,,9001
-18182,9801,8801,37.0,,9105
-18182,9801,8802,11.0,,9105
-18182,9801,8805,0.999625769,,9201
-18182,9801,8806,500000.0,,9001
-18182,9801,8807,300000.0,,9001
-18191,9807,8801,0.0,,9102
-18191,9807,8802,21.0,,9102
-18191,9807,8805,1.0,,9201
-18191,9807,8806,1500000.0,,9001
-18191,9807,8807,0.0,,9001
-18192,9807,8801,0.0,,9102
-18192,9807,8802,24.0,,9102
-18192,9807,8805,1.0,,9201
-18192,9807,8806,2500000.0,,9001
-18192,9807,8807,0.0,,9001
-18193,9807,8801,0.0,,9102
-18193,9807,8802,27.0,,9102
-18193,9807,8805,1.0,,9201
-18193,9807,8806,3500000.0,,9001
-18193,9807,8807,0.0,,9001
-18194,9807,8801,0.0,,9102
-18194,9807,8802,30.0,,9102
-18194,9807,8805,1.0,,9201
-18194,9807,8806,4500000.0,,9001
-18194,9807,8807,0.0,,9001
-18201,9806,8801,31.4402749,,9110
-18201,9806,8802,35.124349,,9110
-18201,9806,8806,170251.555,,9001
-18201,9806,8807,126867.909,,9001
-18202,9807,8801,31.4402749,,9110
-18202,9807,8802,35.124349,,9110
-18202,9807,8805,1.0,,9201
-18202,9807,8806,170251.555,,9001
-18202,9807,8807,1126867.909,,9001
-18203,9806,8801,31.4402749,,9110
-18203,9806,8802,35.124349,,9110
-18203,9806,8806,170251.555,,9001
-18203,9806,8807,1126867.909,,9001
-18204,9807,8801,31.4403817,,9110
-18204,9807,8802,35.1216261,,9110
-18204,9807,8805,1.0000067,,9201
-18204,9807,8806,219529.584,,9001
-18204,9807,8807,626907.39,,9001
-18211,9801,8801,16.49,,9110
-18211,9801,8802,-90.2,,9110
-18211,9801,8805,0.99992226,,9201
-18211,9801,8806,500000.0,,9001
-18211,9801,8807,292209.579,,9001
-18212,9801,8801,14.54,,9110
-18212,9801,8802,-90.2,,9110
-18212,9801,8805,0.99989906,,9201
-18212,9801,8806,500000.0,,9001
-18212,9801,8807,325992.681,,9001
-18221,9807,8801,58.0,,9110
-18221,9807,8802,-4.4,,9110
-18221,9807,8805,1.0,,9201
-18221,9807,8806,0.0,,9001
-18221,9807,8807,0.0,,9001
-18222,9807,8801,58.0,,9110
-18222,9807,8802,-2.2,,9110
-18222,9807,8805,1.0,,9201
-18222,9807,8806,0.0,,9001
-18222,9807,8807,0.0,,9001
-18223,9807,8801,58.0,,9110
-18223,9807,8802,0.0,,9110
-18223,9807,8805,1.0,,9201
-18223,9807,8806,0.0,,9001
-18223,9807,8807,0.0,,9001
-18224,9807,8801,58.0,,9110
-18224,9807,8802,2.3,,9110
-18224,9807,8805,1.0,,9201
-18224,9807,8806,0.0,,9001
-18224,9807,8807,0.0,,9001
-18225,9807,8801,58.0,,9110
-18225,9807,8802,6.1,,9110
-18225,9807,8805,1.0,,9201
-18225,9807,8806,0.0,,9001
-18225,9807,8807,0.0,,9001
-18226,9807,8801,58.0,,9110
-18226,9807,8802,10.1,,9110
-18226,9807,8805,1.0,,9201
-18226,9807,8806,0.0,,9001
-18226,9807,8807,0.0,,9001
-18227,9807,8801,58.0,,9110
-18227,9807,8802,14.1,,9110
-18227,9807,8805,1.0,,9201
-18227,9807,8806,0.0,,9001
-18227,9807,8807,0.0,,9001
-18228,9807,8801,58.0,,9110
-18228,9807,8802,18.2,,9110
-18228,9807,8805,1.0,,9201
-18228,9807,8806,0.0,,9001
-18228,9807,8807,0.0,,9001
-18231,9801,8801,32.3,,9110
-18231,9801,8802,68.0,,9110
-18231,9801,8805,0.99878641,,9201
-18231,9801,8806,2743195.5,,9001
-18231,9801,8807,914398.5,,9001
-18232,9801,8801,26.0,,9102
-18232,9801,8802,74.0,,9102
-18232,9801,8805,0.99878641,,9201
-18232,9801,8806,2743195.5,,9001
-18232,9801,8807,914398.5,,9001
-18233,9801,8801,19.0,,9102
-18233,9801,8802,80.0,,9102
-18233,9801,8805,0.99878641,,9201
-18233,9801,8806,2743195.5,,9001
-18233,9801,8807,914398.5,,9001
-18234,9801,8801,12.0,,9102
-18234,9801,8802,80.0,,9102
-18234,9801,8805,0.99878641,,9201
-18234,9801,8806,2743195.5,,9001
-18234,9801,8807,914398.5,,9001
-18235,9801,8801,26.0,,9102
-18235,9801,8802,90.0,,9102
-18235,9801,8805,0.99878641,,9201
-18235,9801,8806,2743195.5,,9001
-18235,9801,8807,914398.5,,9001
-18236,9801,8801,32.3,,9110
-18236,9801,8802,68.0,,9110
-18236,9801,8805,0.99878641,,9201
-18236,9801,8806,2743196.4,,9001
-18236,9801,8807,914398.8,,9001
-18237,9801,8801,26.0,,9102
-18237,9801,8802,74.0,,9102
-18237,9801,8805,0.99878641,,9201
-18237,9801,8806,2743196.4,,9001
-18237,9801,8807,914398.8,,9001
-18238,9801,8801,26.0,,9102
-18238,9801,8802,90.0,,9102
-18238,9801,8805,0.99878641,,9201
-18238,9801,8806,2743185.69,,9001
-18238,9801,8807,914395.23,,9001
-18240,9807,8801,0.0,,9102
-18240,9807,8802,9.0,,9102
-18240,9807,8805,0.9999,,9201
-18240,9807,8806,200000.0,,9001
-18240,9807,8807,0.0,,9001
-18241,9807,8801,0.0,,9102
-18241,9807,8802,11.0,,9102
-18241,9807,8805,0.9999,,9201
-18241,9807,8806,200000.0,,9001
-18241,9807,8807,0.0,,9001
-18242,9807,8801,0.0,,9102
-18242,9807,8802,13.0,,9102
-18242,9807,8805,0.9999,,9201
-18242,9807,8806,200000.0,,9001
-18242,9807,8807,0.0,,9001
-18243,9807,8801,0.0,,9102
-18243,9807,8802,15.0,,9102
-18243,9807,8805,0.9999,,9201
-18243,9807,8806,200000.0,,9001
-18243,9807,8807,0.0,,9001
-18244,9807,8801,0.0,,9102
-18244,9807,8802,17.0,,9102
-18244,9807,8805,0.9999,,9201
-18244,9807,8806,200000.0,,9001
-18244,9807,8807,0.0,,9001
-18245,9807,8801,0.0,,9102
-18245,9807,8802,19.0,,9102
-18245,9807,8805,0.9999,,9201
-18245,9807,8806,200000.0,,9001
-18245,9807,8807,0.0,,9001
-18246,9807,8801,0.0,,9102
-18246,9807,8802,21.0,,9102
-18246,9807,8805,0.9999,,9201
-18246,9807,8806,200000.0,,9001
-18246,9807,8807,0.0,,9001
-18247,9807,8801,0.0,,9102
-18247,9807,8802,23.0,,9102
-18247,9807,8805,0.9999,,9201
-18247,9807,8806,200000.0,,9001
-18247,9807,8807,0.0,,9001
-18248,9807,8801,0.0,,9102
-18248,9807,8802,25.0,,9102
-18248,9807,8805,0.9999,,9201
-18248,9807,8806,200000.0,,9001
-18248,9807,8807,0.0,,9001
-18251,9807,8801,38.0,,9102
-18251,9807,8802,129.0,,9102
-18251,9807,8805,1.0,,9201
-18251,9807,8806,200000.0,,9001
-18251,9807,8807,500000.0,,9001
-18252,9807,8801,38.0,,9102
-18252,9807,8802,127.0,,9102
-18252,9807,8805,1.0,,9201
-18252,9807,8806,200000.0,,9001
-18252,9807,8807,500000.0,,9001
-18253,9807,8801,38.0,,9102
-18253,9807,8802,125.0,,9102
-18253,9807,8805,1.0,,9201
-18253,9807,8806,200000.0,,9001
-18253,9807,8807,500000.0,,9001
-18260,9801,8801,10.1,,9110
-18260,9801,8802,-71.3620224,,9110
-18260,9801,8805,1.0,,9201
-18260,9801,8806,0.0,,9001
-18260,9801,8807,-52684.972,,9001
-18261,9801,8801,10.1,,9110
-18261,9801,8802,-71.3620224,,9110
-18261,9801,8805,1.0,,9201
-18261,9801,8806,200000.0,,9001
-18261,9801,8807,147315.028,,9001
-18262,9801,8801,10.1,,9110
-18262,9801,8802,-71.3620224,,9110
-18262,9801,8805,1.0,,9201
-18262,9801,8806,500000.0,,9001
-18262,9801,8807,447315.028,,9001
-18263,9801,8801,10.1,,9110
-18263,9801,8802,-71.3620224,,9110
-18263,9801,8805,1.0,,9201
-18263,9801,8806,-17044.0,,9001
-18263,9801,8807,-23139.97,,9001
-18275,9807,8801,0.0,,9102
-18275,9807,8802,15.0,,9102
-18275,9807,8805,0.9999,,9201
-18275,9807,8806,5500000.0,,9001
-18275,9807,8807,0.0,,9001
-18276,9807,8801,0.0,,9102
-18276,9807,8802,18.0,,9102
-18276,9807,8805,0.9999,,9201
-18276,9807,8806,6500000.0,,9001
-18276,9807,8807,0.0,,9001
-18277,9807,8801,0.0,,9102
-18277,9807,8802,21.0,,9102
-18277,9807,8805,0.9999,,9201
-18277,9807,8806,7500000.0,,9001
-18277,9807,8807,0.0,,9001
-18278,9807,8801,0.0,,9102
-18278,9807,8802,24.0,,9102
-18278,9807,8805,0.9999,,9201
-18278,9807,8806,8500000.0,,9001
-18278,9807,8807,0.0,,9001
-18281,9809,8801,50.373,,9110
-18281,9809,8802,21.05,,9110
-18281,9809,8805,0.9998,,9201
-18281,9809,8806,4637000.0,,9001
-18281,9809,8807,5647000.0,,9001
-18282,9809,8801,53.0007,,9110
-18282,9809,8802,21.301,,9110
-18282,9809,8805,0.9998,,9201
-18282,9809,8806,4603000.0,,9001
-18282,9809,8807,5806000.0,,9001
-18283,9809,8801,53.35,,9110
-18283,9809,8802,17.003,,9110
-18283,9809,8805,0.9998,,9201
-18283,9809,8806,3501000.0,,9001
-18283,9809,8807,5999000.0,,9001
-18284,9809,8801,51.4015,,9110
-18284,9809,8802,16.402,,9110
-18284,9809,8805,0.9998,,9201
-18284,9809,8806,3703000.0,,9001
-18284,9809,8807,5627000.0,,9001
-18285,9807,8801,0.0,,9110
-18285,9807,8802,18.573,,9110
-18285,9807,8805,0.999983,,9201
-18285,9807,8806,237000.0,,9001
-18285,9807,8807,-4700000.0,,9001
-18300,9807,8801,0.0,,9102
-18300,9807,8802,19.0,,9102
-18300,9807,8805,0.9993,,9201
-18300,9807,8806,500000.0,,9001
-18300,9807,8807,-5300000.0,,9001
-18305,9807,8801,0.0,,9102
-18305,9807,8802,15.0,,9102
-18305,9807,8805,0.999923,,9201
-18305,9807,8806,5500000.0,,9001
-18305,9807,8807,0.0,,9001
-18306,9807,8801,0.0,,9102
-18306,9807,8802,18.0,,9102
-18306,9807,8805,0.999923,,9201
-18306,9807,8806,6500000.0,,9001
-18306,9807,8807,0.0,,9001
-18307,9807,8801,0.0,,9102
-18307,9807,8802,21.0,,9102
-18307,9807,8805,0.999923,,9201
-18307,9807,8806,7500000.0,,9001
-18307,9807,8807,0.0,,9001
-18308,9807,8801,0.0,,9102
-18308,9807,8802,24.0,,9102
-18308,9807,8805,0.999923,,9201
-18308,9807,8806,8500000.0,,9001
-18308,9807,8807,0.0,,9001
-18401,9807,8801,0.0,,9110
-18401,9807,8802,9.3,,9110
-18401,9807,8805,0.99995,,9201
-18401,9807,8806,200000.0,,9001
-18401,9807,8807,0.0,,9001
-18402,9807,8801,0.0,,9102
-18402,9807,8802,12.0,,9102
-18402,9807,8805,0.99995,,9201
-18402,9807,8806,500000.0,,9001
-18402,9807,8807,0.0,,9001
-18403,9807,8801,0.0,,9102
-18403,9807,8802,15.0,,9102
-18403,9807,8805,1.0,,9201
-18403,9807,8806,900000.0,,9001
-18403,9807,8807,0.0,,9001
-18411,9807,8801,0.0,,9110
-18411,9807,8802,-13.3,,9110
-18411,9807,8805,0.999,,9201
-18411,9807,8806,1000000.0,,9001
-18411,9807,8807,1000000.0,,9001
-18412,9807,8801,0.0,,9110
-18412,9807,8802,-6.3,,9110
-18412,9807,8805,0.999,,9201
-18412,9807,8806,1000000.0,,9001
-18412,9807,8807,1000000.0,,9001
-18413,9807,8801,0.0,,9110
-18413,9807,8802,0.3,,9110
-18413,9807,8805,0.999,,9201
-18413,9807,8806,1000000.0,,9001
-18413,9807,8807,1000000.0,,9001
-18414,9807,8801,0.0,,9110
-18414,9807,8802,7.3,,9110
-18414,9807,8805,0.999,,9201
-18414,9807,8806,1000000.0,,9001
-18414,9807,8807,1000000.0,,9001
-18415,9807,8801,0.0,,9110
-18415,9807,8802,10.3,,9110
-18415,9807,8805,0.999,,9201
-18415,9807,8806,1000000.0,,9001
-18415,9807,8807,1000000.0,,9001
-18416,9807,8801,0.0,,9110
-18416,9807,8802,17.4,,9110
-18416,9807,8805,0.999,,9201
-18416,9807,8806,1000000.0,,9001
-18416,9807,8807,1000000.0,,9001
-18417,9807,8801,0.0,,9110
-18417,9807,8802,24.3,,9110
-18417,9807,8805,0.999,,9201
-18417,9807,8806,1000000.0,,9001
-18417,9807,8807,1000000.0,,9001
-18421,9826,8801,82.3,,9110
-18421,9826,8802,-40.0,,9110
-18421,9826,8805,1.0,,9201
-18421,9826,8806,0.0,,9001
-18421,9826,8807,0.0,,9001
-18422,9826,8801,79.3,,9110
-18422,9826,8802,-24.0,,9110
-18422,9826,8805,1.0,,9201
-18422,9826,8806,0.0,,9001
-18422,9826,8807,0.0,,9001
-18423,9826,8801,76.3,,9110
-18423,9826,8802,-20.0,,9110
-18423,9826,8805,1.0,,9201
-18423,9826,8806,0.0,,9001
-18423,9826,8807,0.0,,9001
-18424,9826,8801,73.3,,9110
-18424,9826,8802,-24.0,,9110
-18424,9826,8805,1.0,,9201
-18424,9826,8806,0.0,,9001
-18424,9826,8807,0.0,,9001
-18425,9826,8801,70.3,,9110
-18425,9826,8802,-24.0,,9110
-18425,9826,8805,1.0,,9201
-18425,9826,8806,0.0,,9001
-18425,9826,8807,0.0,,9001
-18426,9826,8801,67.3,,9110
-18426,9826,8802,-32.0,,9110
-18426,9826,8805,1.0,,9201
-18426,9826,8806,0.0,,9001
-18426,9826,8807,0.0,,9001
-18427,9826,8801,64.3,,9110
-18427,9826,8802,-40.0,,9110
-18427,9826,8805,1.0,,9201
-18427,9826,8806,0.0,,9001
-18427,9826,8807,0.0,,9001
-18428,9826,8801,61.3,,9110
-18428,9826,8802,-48.0,,9110
-18428,9826,8805,1.0,,9201
-18428,9826,8806,0.0,,9001
-18428,9826,8807,0.0,,9001
-18432,9826,8801,79.3,,9110
-18432,9826,8802,-64.0,,9110
-18432,9826,8805,1.0,,9201
-18432,9826,8806,0.0,,9001
-18432,9826,8807,0.0,,9001
-18433,9826,8801,76.3,,9110
-18433,9826,8802,-64.0,,9110
-18433,9826,8805,1.0,,9201
-18433,9826,8806,0.0,,9001
-18433,9826,8807,0.0,,9001
-18434,9826,8801,73.3,,9110
-18434,9826,8802,-52.0,,9110
-18434,9826,8805,1.0,,9201
-18434,9826,8806,0.0,,9001
-18434,9826,8807,0.0,,9001
-18435,9826,8801,70.3,,9110
-18435,9826,8802,-52.0,,9110
-18435,9826,8805,1.0,,9201
-18435,9826,8806,0.0,,9001
-18435,9826,8807,0.0,,9001
-18436,9826,8801,67.3,,9110
-18436,9826,8802,-52.0,,9110
-18436,9826,8805,1.0,,9201
-18436,9826,8806,0.0,,9001
-18436,9826,8807,0.0,,9001
-18437,9826,8801,64.3,,9110
-18437,9826,8802,-52.0,,9110
-18437,9826,8805,1.0,,9201
-18437,9826,8806,0.0,,9001
-18437,9826,8807,0.0,,9001
-18441,9807,8801,0.07,,9110
-18441,9807,8802,41.32,,9110
-18441,9807,8805,1.0,,9003
-18441,9807,8806,1300000.0,,9001
-18441,9807,8807,0.0,,9001
-18442,9807,8801,0.07,,9110
-18442,9807,8802,44.32,,9110
-18442,9807,8805,1.0,,9003
-18442,9807,8806,2300000.0,,9001
-18442,9807,8807,0.0,,9001
-18443,9807,8801,0.07,,9110
-18443,9807,8802,47.32,,9110
-18443,9807,8805,1.0,,9201
-18443,9807,8806,3300000.0,,9001
-18443,9807,8807,0.0,,9001
-18444,9807,8801,0.07,,9110
-18444,9807,8802,50.32,,9110
-18444,9807,8805,1.0,,9201
-18444,9807,8806,4300000.0,,9001
-18444,9807,8807,0.0,,9001
-18446,9807,8801,0.08,,9110
-18446,9807,8802,50.46,,9110
-18446,9807,8805,1.0,,9201
-18446,9807,8806,2300000.0,,9001
-18446,9807,8807,0.0,,9001
-18447,9807,8801,0.08,,9110
-18447,9807,8802,53.46,,9110
-18447,9807,8805,1.0,,9201
-18447,9807,8806,3300000.0,,9001
-18447,9807,8807,0.0,,9001
-18448,9807,8801,0.08,,9110
-18448,9807,8802,56.46,,9110
-18448,9807,8805,1.0,,9201
-18448,9807,8806,4300000.0,,9001
-18448,9807,8807,0.0,,9001
-19900,9807,8801,0.0,,9102
-19900,9807,8802,51.0,,9102
-19900,9807,8805,0.9996,,9201
-19900,9807,8806,500000.0,,9001
-19900,9807,8807,0.0,,9001
-19901,9802,8821,90.0,,9110
-19901,9802,8822,0.0,,9110
-19901,9802,8823,49.5,,9110
-19901,9802,8824,51.1,,9110
-19901,9802,8826,150000.0,,9001
-19901,9802,8827,5400000.0,,9001
-19902,9803,8821,90.0,,9110
-19902,9803,8822,4.2124983,,9110
-19902,9803,8823,49.5,,9110
-19902,9803,8824,51.1,,9110
-19902,9803,8826,150000.01256,,9001
-19902,9803,8827,5400088.4378,,9001
-19903,9801,8801,55.0,,9105
-19903,9801,8802,6.0,,9105
-19903,9801,8805,0.99950908,,9201
-19903,9801,8806,500000.0,,9001
-19903,9801,8807,300000.0,,9001
-19904,9807,8801,4.4,,9110
-19904,9807,8802,-1.0,,9110
-19904,9807,8805,0.99975,,9201
-19904,9807,8806,274319.51,,9001
-19904,9807,8807,0.0,,9001
-19905,9804,8801,0.0,,9102
-19905,9804,8802,110.0,,9102
-19905,9804,8805,0.997,,9201
-19905,9804,8806,3900000.0,,9001
-19905,9804,8807,900000.0,,9001
-19906,9801,8801,32.3,,9110
-19906,9801,8802,45.0,,9110
-19906,9801,8805,0.9987864078,,9201
-19906,9801,8806,1500000.0,,9001
-19906,9801,8807,1166200.0,,9001
-19907,9807,8801,29.0134566,,9110
-19907,9807,8802,46.3,,9110
-19907,9807,8805,0.9994,,9201
-19907,9807,8806,800000.0,,9001
-19907,9807,8807,0.0,,9001
-19908,9807,8801,53.3,,9110
-19908,9807,8802,-8.0,,9110
-19908,9807,8805,1.000035,,9201
-19908,9807,8806,200000.0,,9001
-19908,9807,8807,250000.0,,9001
-19909,9801,8801,18.0,,9102
-19909,9801,8802,-77.0,,9102
-19909,9801,8805,1.0,,9201
-19909,9801,8806,550000.0,,9005
-19909,9801,8807,400000.0,,9005
-19910,9801,8801,18.0,,9102
-19910,9801,8802,-77.0,,9102
-19910,9801,8805,1.0,,9201
-19910,9801,8806,250000.0,,9001
-19910,9801,8807,150000.0,,9001
-19911,9815,8811,-21.0,,9105
-19911,9815,8812,49.0,,9105
-19911,9815,8813,21.0,,9105
-19911,9815,8814,21.0,,9105
-19911,9815,8815,0.9995,,9201
-19911,9815,8816,400000.0,,9001
-19911,9815,8817,800000.0,,9001
-19913,9809,8801,52.0922178,,9110
-19913,9809,8802,5.23155,,9110
-19913,9809,8805,0.9999079,,9201
-19913,9809,8806,0.0,,9001
-19913,9809,8807,0.0,,9001
-19914,9809,8801,52.0922178,,9110
-19914,9809,8802,5.23155,,9110
-19914,9809,8805,0.9999079,,9201
-19914,9809,8806,155000.0,,9001
-19914,9809,8807,463000.0,,9001
-19915,9801,8801,15.0,,9102
-19915,9801,8802,45.0,,9102
-19915,9801,8805,0.999365678,,9201
-19915,9801,8806,1500000.0,,9001
-19915,9801,8807,1000000.0,,9001
-19916,9807,8801,49.0,,9102
-19916,9807,8802,-2.0,,9102
-19916,9807,8805,0.999601272,,9201
-19916,9807,8806,400000.0,,9001
-19916,9807,8807,-100000.0,,9001
-19917,9811,8801,-41.0,,9102
-19917,9811,8802,173.0,,9102
-19917,9811,8806,2510000.0,,9001
-19917,9811,8807,6023150.0,,9001
-19919,9807,8801,24.27,,9110
-19919,9807,8802,51.13,,9110
-19919,9807,8805,0.99999,,9201
-19919,9807,8806,200000.0,,9001
-19919,9807,8807,300000.0,,9001
-19920,9806,8801,1.1715528,,9110
-19920,9806,8802,103.5110808,,9110
-19920,9806,8806,30000.0,,9001
-19920,9806,8807,30000.0,,9001
-19921,9801,8801,40.0,,9102
-19921,9801,8802,0.0,,9102
-19921,9801,8805,0.9988085293,,9201
-19921,9801,8806,600000.0,,9001
-19921,9801,8807,600000.0,,9001
-19922,9815,8811,46.570866,,9110
-19922,9815,8812,7.26225,,9110
-19922,9815,8813,90.0,,9110
-19922,9815,8814,90.0,,9110
-19922,9815,8815,1.0,,9201
-19922,9815,8816,600000.0,,9001
-19922,9815,8817,200000.0,,9001
-19923,9815,8811,46.570866,,9110
-19923,9815,8812,0.0,,9110
-19923,9815,8813,90.0,,9110
-19923,9815,8814,90.0,,9110
-19923,9815,8815,1.0,,9201
-19923,9815,8816,0.0,,9001
-19923,9815,8817,0.0,,9001
-19924,9806,8801,11.1507843,,9110
-19924,9806,8802,-60.4109632,,9110
-19924,9806,8806,187500.0,,9039
-19924,9806,8807,180000.0,,9039
-19925,9806,8801,10.263,,9110
-19925,9806,8802,-61.2,,9110
-19925,9806,8806,430000.0,,9039
-19925,9806,8807,325000.0,,9039
-19926,9809,8801,46.0,,9102
-19926,9809,8802,25.0,,9102
-19926,9809,8805,0.99975,,9201
-19926,9809,8806,500000.0,,9001
-19926,9809,8807,500000.0,,9001
-19927,9809,8801,45.54,,9110
-19927,9809,8802,25.23328772,,9110
-19927,9809,8805,0.9996667,,9201
-19927,9809,8806,500000.0,,9001
-19927,9809,8807,500000.0,,9001
-19928,9807,8801,0.0,,9102
-19928,9807,8802,48.0,,9102
-19928,9807,8805,0.9996,,9201
-19928,9807,8806,500000.0,,9001
-19928,9807,8807,0.0,,9001
-19929,9807,8801,0.0,,9110
-19929,9807,8802,15.48298,,9110
-19929,9807,8805,1.0,,9201
-19929,9807,8806,1500000.0,,9001
-19929,9807,8807,0.0,,9001
-19930,9807,8801,0.0,,9102
-19930,9807,8802,24.0,,9102
-19930,9807,8805,0.9996,,9201
-19930,9807,8806,500000.0,,9001
-19930,9807,8807,0.0,,9001
-19931,9815,8811,47.08398174,,9110
-19931,9815,8812,19.02548584,,9110
-19931,9815,8813,90.0,,9110
-19931,9815,8814,90.0,,9110
-19931,9815,8815,0.99993,,9201
-19931,9815,8816,650000.0,,9001
-19931,9815,8817,200000.0,,9001
-19933,9809,8801,47.15,,9110
-19933,9809,8802,-63.0,,9110
-19933,9809,8805,0.999912,,9201
-19933,9809,8806,700000.0,,9001
-19933,9809,8807,400000.0,,9001
-19934,9807,8801,0.0,,9102
-19934,9807,8802,24.0,,9102
-19934,9807,8805,0.9998,,9201
-19934,9807,8806,500000.0,,9001
-19934,9807,8807,0.0,,9001
-19935,9812,8806,40000.0,,9062
-19935,9812,8807,0.0,,9062
-19935,9812,8811,4.0,,9110
-19935,9812,8812,102.15,,9110
-19935,9812,8813,323.01328458,,9110
-19935,9812,8814,323.07483685,,9110
-19935,9812,8815,0.99984,,9201
-19936,9807,8801,39.4,,9110
-19936,9807,8802,1.0,,9110
-19936,9807,8805,1.0,,9201
-19936,9807,8806,200000.0,,9001
-19936,9807,8807,300000.0,,9001
-19937,9816,8821,38.81973,,9105
-19937,9816,8822,7.83445,,9105
-19937,9816,8826,270.0,,9036
-19937,9816,8827,582.0,,9036
-19938,9802,8821,57.310319415,,9110
-19938,9802,8822,24.0,,9110
-19938,9802,8823,59.2,,9110
-19938,9802,8824,58.0,,9110
-19938,9802,8826,500000.0,,9001
-19938,9802,8827,6375000.0,,9001
-19939,9807,8801,0.0,,9102
-19939,9807,8802,24.0,,9102
-19939,9807,8805,0.9996,,9201
-19939,9807,8806,500000.0,,9001
-19939,9807,8807,0.0,,9001
-19940,9817,8801,34.39,,9110
-19940,9817,8802,37.21,,9110
-19940,9817,8805,0.9996256,,9201
-19940,9817,8806,300000.0,,9001
-19940,9817,8807,300000.0,,9001
-19941,9818,8801,0.0,,9102
-19941,9818,8802,-54.0,,9102
-19941,9818,8806,5000000.0,,9001
-19941,9818,8807,10000000.0,,9001
-19942,9807,8801,0.0,,9102
-19942,9807,8802,-62.0,,9102
-19942,9807,8805,0.9995,,9201
-19942,9807,8806,400000.0,,9001
-19942,9807,8807,0.0,,9001
-19943,9807,8801,13.1035,,9110
-19943,9807,8802,-59.3335,,9110
-19943,9807,8805,0.9999986,,9201
-19943,9807,8806,30000.0,,9001
-19943,9807,8807,75000.0,,9001
-19944,9802,8821,44.0,,9110
-19944,9802,8822,-68.3,,9110
-19944,9802,8823,60.0,,9110
-19944,9802,8824,46.0,,9110
-19944,9802,8826,0.0,,9001
-19944,9802,8827,0.0,,9001
-19945,9809,8801,46.3,,9110
-19945,9809,8802,-66.3,,9110
-19945,9809,8805,0.999912,,9201
-19945,9809,8806,300000.0,,9001
-19945,9809,8807,800000.0,,9001
-19946,9809,8801,46.3,,9110
-19946,9809,8802,-66.3,,9110
-19946,9809,8805,0.999912,,9201
-19946,9809,8806,2500000.0,,9001
-19946,9809,8807,7500000.0,,9001
-19947,9802,8821,47.3,,9110
-19947,9802,8822,13.2,,9110
-19947,9802,8823,49.0,,9110
-19947,9802,8824,46.0,,9110
-19947,9802,8826,400000.0,,9001
-19947,9802,8827,400000.0,,9001
-19948,9801,8801,34.39,,9110
-19948,9801,8802,37.21,,9110
-19948,9801,8805,0.9996256,,9201
-19948,9801,8806,300000.0,,9001
-19948,9801,8807,300000.0,,9001
-19949,9809,8801,38.0,,9105
-19949,9809,8802,43.5,,9105
-19949,9809,8805,0.9995341,,9201
-19949,9809,8806,0.0,,9001
-19949,9809,8807,0.0,,9001
-19950,9815,8811,46.570866,,9110
-19950,9815,8812,7.26225,,9110
-19950,9815,8813,90.0,,9110
-19950,9815,8814,90.0,,9110
-19950,9815,8815,1.0,,9201
-19950,9815,8816,2600000.0,,9001
-19950,9815,8817,1200000.0,,9001
-19951,9815,8811,27.31077837,,9110
-19951,9815,8812,52.3612741,,9110
-19951,9815,8813,0.34179803,,9110
-19951,9815,8814,0.34179803,,9110
-19951,9815,8815,0.999895934,,9201
-19951,9815,8816,658377.437,,9001
-19951,9815,8817,3044969.194,,9001
-19952,9819,8811,49.3,,9110
-19952,9819,8812,42.3,,9110
-19952,9819,8813,30.1717303,,9110
-19952,9819,8816,0.0,,9001
-19952,9819,8817,0.0,,9001
-19952,9819,8818,78.3,,9110
-19952,9819,8819,0.9999,,9201
-19953,9806,8801,25.22565,,9110
-19953,9806,8802,50.4541,,9110
-19953,9806,8806,100000.0,,9001
-19953,9806,8807,100000.0,,9001
-19954,9807,8801,0.0,,9110
-19954,9807,8802,-55.41,,9110
-19954,9807,8805,0.9996,,9201
-19954,9807,8806,500000.0,,9001
-19954,9807,8807,0.0,,9001
-19955,9807,8801,0.0,,9110
-19955,9807,8802,-55.41,,9110
-19955,9807,8805,0.9999,,9201
-19955,9807,8806,500000.0,,9001
-19955,9807,8807,0.0,,9001
-19956,9815,8811,4.0,,9110
-19956,9815,8812,115.0,,9110
-19956,9815,8813,53.18569537,,9110
-19956,9815,8814,53.07483685,,9110
-19956,9815,8815,0.99984,,9201
-19956,9815,8816,29352.4763,,9042
-19956,9815,8817,22014.3572,,9042
-19957,9815,8811,4.0,,9110
-19957,9815,8812,115.0,,9110
-19957,9815,8813,53.18569537,,9110
-19957,9815,8814,53.07483685,,9110
-19957,9815,8815,0.99984,,9201
-19957,9815,8816,1937263.44,,9041
-19957,9815,8817,1452947.58,,9041
-19958,9815,8811,4.0,,9110
-19958,9815,8812,115.0,,9110
-19958,9815,8813,53.18569537,,9110
-19958,9815,8814,53.07483685,,9110
-19958,9815,8815,0.99984,,9201
-19958,9815,8816,590476.87,,9001
-19958,9815,8817,442857.65,,9001
-19959,9807,8801,4.4,,9110
-19959,9807,8802,-1.0,,9110
-19959,9807,8805,0.99975,,9201
-19959,9807,8806,900000.0,,9094
-19959,9807,8807,0.0,,9094
-19960,9809,8801,47.15,,9110
-19960,9809,8802,-63.0,,9110
-19960,9809,8805,0.999912,,9201
-19960,9809,8806,400000.0,,9001
-19960,9809,8807,800000.0,,9001
-19961,9802,8821,90.0,,9110
-19961,9802,8822,4.2202952,,9110
-19961,9802,8823,51.100000204,,9110
-19961,9802,8824,49.500000204,,9110
-19961,9802,8826,150000.013,,9001
-19961,9802,8827,5400088.438,,9001
-19962,9807,8801,53.3,,9110
-19962,9807,8802,-8.0,,9110
-19962,9807,8805,0.99982,,9201
-19962,9807,8806,600000.0,,9001
-19962,9807,8807,750000.0,,9001
-19963,9807,8801,6.4,,9110
-19963,9807,8802,-12.0,,9110
-19963,9807,8805,1.0,,9201
-19963,9807,8806,500000.0,,9094
-19963,9807,8807,0.0,,9094
-19964,9807,8801,6.4,,9110
-19964,9807,8802,-12.0,,9110
-19964,9807,8805,1.0,,9201
-19964,9807,8806,800000.0,,9094
-19964,9807,8807,600000.0,,9094
-19965,9821,8806,0.0,,9001
-19965,9821,8807,0.0,,9001
-19965,9821,8828,45.0,,9102
-19965,9821,8829,-100.0,,9102
-19966,9807,8801,49.5,,9110
-19966,9807,8802,6.1,,9110
-19966,9807,8805,1.0,,9201
-19966,9807,8806,80000.0,,9001
-19966,9807,8807,100000.0,,9001
-19967,9807,8801,0.0,,9110
-19967,9807,8802,15.0,,9110
-19967,9807,8805,0.9999,,9201
-19967,9807,8806,500000.0,,9001
-19967,9807,8807,0.0,,9001
-19968,9823,8801,0.0,,9102
-19968,9823,8802,0.0,,9102
-19969,9807,8801,39.4,,9110
-19969,9807,8802,1.0,,9110
-19969,9807,8805,1.0,,9201
-19969,9807,8806,0.0,,9001
-19969,9807,8807,0.0,,9001
-19971,9807,8801,0.0,,9102
-19971,9807,8802,173.0,,9102
-19971,9807,8805,0.9996,,9201
-19971,9807,8806,1600000.0,,9001
-19971,9807,8807,10000000.0,,9001
-19972,9807,8801,53.3,,9110
-19972,9807,8802,-8.0,,9110
-19972,9807,8805,1.000035,,9201
-19972,9807,8806,200000.0,,9001
-19972,9807,8807,250000.0,,9001
-19973,9807,8801,53.3,,9110
-19973,9807,8802,-8.0,,9110
-19973,9807,8805,1.0,,9201
-19973,9807,8806,200000.0,,9001
-19973,9807,8807,250000.0,,9001
-19974,9807,8801,39.4,,9110
-19974,9807,8802,-8.0754862,,9110
-19974,9807,8805,1.0,,9201
-19974,9807,8806,180.598,,9001
-19974,9807,8807,-86.99,,9001
-19975,9806,8801,10.263,,9110
-19975,9806,8802,-61.2,,9110
-19975,9806,8806,283800.0,,9005
-19975,9806,8807,214500.0,,9005
-19976,9802,8821,6.0,,9102
-19976,9802,8822,-66.0,,9102
-19976,9802,8823,9.0,,9102
-19976,9802,8824,3.0,,9102
-19976,9802,8826,1000000.0,,9001
-19976,9802,8827,1000000.0,,9001
-19977,9802,8821,25.0522236,,9110
-19977,9802,8822,48.0,,9102
-19977,9802,8823,17.0,,9102
-19977,9802,8824,33.0,,9102
-19977,9802,8826,0.0,,9001
-19977,9802,8827,0.0,,9001
-19978,9807,8801,22.184368,,9110
-19978,9807,8802,114.10428,,9110
-19978,9807,8805,1.0,,9201
-19978,9807,8806,836694.05,,9001
-19978,9807,8807,819069.8,,9001
-19979,9828,8801,39.4,,9110
-19979,9828,8802,1.0,,9110
-19979,9828,8806,0.0,,9001
-19979,9828,8807,0.0,,9001
diff --git a/src/tiff/csv/coordinate_operation_path.csv b/src/tiff/csv/coordinate_operation_path.csv
deleted file mode 100644
index afaf70b..0000000
--- a/src/tiff/csv/coordinate_operation_path.csv
+++ /dev/null
@@ -1,336 +0,0 @@
-"CONCAT_OPERATION_CODE","SINGLE_OPERATION_CODE","OP_PATH_STEP"
-8046,1025,1
-8046,1146,2
-8047,1146,2
-8047,1147,1
-8094,1193,2
-8094,1763,1
-8174,1125,2
-8174,1755,1
-8175,1169,2
-8175,1262,1
-8176,1227,2
-8176,1265,1
-8178,1123,2
-8178,1759,1
-8183,1149,2
-8183,1273,1
-8186,1276,2
-8186,1763,1
-8188,1277,2
-8188,1763,1
-8190,1150,2
-8190,1278,1
-8192,1150,2
-8192,1279,1
-8194,1150,2
-8194,1280,1
-8195,1149,2
-8195,1437,1
-8199,1274,1
-8199,1283,2
-8211,1266,1
-8211,1294,2
-8215,1297,1
-8215,1302,2
-8217,1298,1
-8217,1302,2
-8219,1299,1
-8219,1302,2
-8221,1300,1
-8221,1302,2
-8223,1301,1
-8223,1302,2
-8234,1149,2
-8234,1309,1
-8236,1149,2
-8236,1310,1
-8241,1026,1
-8241,1145,2
-8243,1188,2
-8243,1312,1
-8245,1188,2
-8245,1313,1
-8263,1306,2
-8263,1757,1
-8386,1188,2
-8386,1454,1
-8388,1188,2
-8388,1455,1
-8390,1188,2
-8390,1456,1
-8392,1188,2
-8392,1457,1
-8394,1188,2
-8394,1451,1
-8396,1150,2
-8396,1458,1
-8398,1150,2
-8398,1459,1
-8400,1150,2
-8400,1460,1
-8402,1188,2
-8402,1461,1
-8404,1188,2
-8404,1462,1
-8406,1188,2
-8406,1463,1
-8408,1150,2
-8408,1464,1
-8418,1472,1
-8418,1473,2
-8419,1473,2
-8419,1599,1
-8420,1473,2
-8420,1600,1
-8421,1473,2
-8421,1601,1
-8422,1473,2
-8422,1602,1
-8453,1150,2
-8453,1506,1
-8454,1150,2
-8454,1507,1
-8457,1509,1
-8457,1511,2
-8460,1241,1
-8460,1474,2
-8461,1241,1
-8461,1475,2
-8462,1241,1
-8462,1476,2
-8463,1241,1
-8463,1477,2
-8464,1241,1
-8464,1478,2
-8465,1241,1
-8465,1479,2
-8466,1241,1
-8466,1480,2
-8467,1241,1
-8467,1481,2
-8468,1241,1
-8468,1482,2
-8469,1241,1
-8469,1483,2
-8470,1241,1
-8470,1484,2
-8471,1241,1
-8471,1485,2
-8472,1241,1
-8472,1486,2
-8473,1241,1
-8473,1487,2
-8474,1241,1
-8474,1488,2
-8475,1241,1
-8475,1489,2
-8476,1241,1
-8476,1490,2
-8477,1241,1
-8477,1491,2
-8478,1241,1
-8478,1492,2
-8479,1241,1
-8479,1493,2
-8480,1241,1
-8480,1494,2
-8481,1241,1
-8481,1495,2
-8482,1496,2
-8482,1747,1
-8483,1241,1
-8483,1497,2
-8484,1241,1
-8484,1498,2
-8485,1241,1
-8485,1499,2
-8486,1241,1
-8486,1500,2
-8487,1241,1
-8487,1501,2
-8488,1241,1
-8488,1502,2
-8489,1241,1
-8489,1503,2
-8496,1241,1
-8496,1515,2
-8497,1243,1
-8497,1515,2
-8508,1454,1
-8508,1520,2
-8509,1241,1
-8509,1521,2
-8510,1241,1
-8510,1522,2
-8511,1241,1
-8511,1523,2
-8512,1241,1
-8512,1524,2
-8513,1241,1
-8513,1525,2
-8514,1241,1
-8514,1526,2
-8517,1527,2
-8517,1528,1
-8530,1539,1
-8530,1540,2
-8532,1240,2
-8532,1541,1
-8537,1237,2
-8537,1545,1
-8553,1241,1
-8553,1553,2
-8554,1241,1
-8554,1554,2
-8560,1150,2
-8560,1559,1
-8562,1240,2
-8562,1560,1
-8563,1565,2
-8563,1568,1
-8564,1473,2
-8564,1576,1
-8565,1188,2
-8565,1574,1
-8566,1188,2
-8566,1572,1
-8567,1036,1
-8567,1149,2
-8568,1240,2
-8568,1584,1
-8569,1149,2
-8569,1588,1
-8570,1025,1
-8570,1146,2
-8570,1149,3
-8571,1240,2
-8571,1570,1
-8572,1149,2
-8572,1571,1
-8573,1149,2
-8573,1591,1
-8574,1578,1
-8574,1580,2
-8575,1579,1
-8575,1580,2
-8576,1150,2
-8576,1594,1
-8577,1150,2
-8577,1595,1
-8578,1150,2
-8578,1596,1
-8579,1150,2
-8579,1593,1
-8580,1149,2
-8580,1611,1
-8581,1237,2
-8581,1616,1
-8582,1454,1
-8582,1741,2
-8583,1461,1
-8583,1731,2
-8584,1313,1
-8584,1752,2
-8585,1313,1
-8585,1702,2
-8586,1241,1
-8586,1704,2
-8587,1241,1
-8587,1705,2
-8588,1241,1
-8588,1706,2
-8589,1241,1
-8589,1707,2
-8590,1241,1
-8590,1717,2
-8591,1241,1
-8591,1728,2
-8592,1241,1
-8592,1708,2
-8593,1241,1
-8593,1739,2
-8594,1241,1
-8594,1750,2
-8595,1241,1
-8595,1712,2
-8596,1241,1
-8596,1714,2
-8597,1241,1
-8597,1713,2
-8598,1241,1
-8598,1748,2
-8599,1241,1
-8599,1742,2
-8600,1241,1
-8600,1709,2
-8601,1241,1
-8601,1743,2
-8602,1241,1
-8602,1718,2
-8603,1241,1
-8603,1719,2
-8604,1241,1
-8604,1721,2
-8605,1241,1
-8605,1720,2
-8606,1241,1
-8606,1725,2
-8607,1241,1
-8607,1722,2
-8608,1241,1
-8608,1710,2
-8609,1241,1
-8609,1723,2
-8610,1241,1
-8610,1711,2
-8611,1241,1
-8611,1715,2
-8612,1241,1
-8612,1716,2
-8613,1241,1
-8613,1724,2
-8614,1241,1
-8614,1744,2
-8615,1241,1
-8615,1749,2
-8616,1241,1
-8616,1726,2
-8617,1241,1
-8617,1727,2
-8618,1241,1
-8618,1729,2
-8619,1241,1
-8619,1745,2
-8620,1241,1
-8620,1730,2
-8621,1241,1
-8621,1737,2
-8622,1241,1
-8622,1732,2
-8623,1241,1
-8623,1733,2
-8624,1241,1
-8624,1734,2
-8625,1241,1
-8625,1735,2
-8626,1241,1
-8626,1746,2
-8627,1241,1
-8627,1736,2
-8628,1241,1
-8628,1747,2
-8629,1241,1
-8629,1738,2
-8630,1241,1
-8630,1740,2
-8631,1240,2
-8631,1805,1
-8632,1240,2
-8632,1806,1
-8633,1238,2
-8633,1828,1
-8634,1240,2
-8634,1839,1
-8635,1313,1
-8635,1849,2
diff --git a/src/tiff/csv/coordinate_reference_system.csv b/src/tiff/csv/coordinate_reference_system.csv
deleted file mode 100644
index f6e94b7..0000000
--- a/src/tiff/csv/coordinate_reference_system.csv
+++ /dev/null
@@ -1,2609 +0,0 @@
-"COORD_REF_SYS_CODE","COORD_REF_SYS_NAME","AREA_OF_USE_CODE","COORD_REF_SYS_KIND","COORD_SYS_CODE","DATUM_CODE","SOURCE_GEOGCRS_CODE","PROJECTION_CONV_CODE","CMPD_HORIZCRS_CODE","CMPD_VERTCRS_CODE","CRS_SCOPE","REMARKS","INFORMATION_SOURCE","DATA_SOURCE","REVISION_DATE","CHANGE_ID","SHOW_CRS","DEPRECATED"
-2100,GGRS87 / Greek Grid,1106,projected,4400,,4121,19930,,,Large and medium scale topographic mapping and engineering survey.,Oil industry uses ED50 / UTM zone 34N and ED50 / UTM zone 35N.,Geodesy Department; Public Petroleum Corporation of Greece.,EPSG,1997-06-16 00:00:00,,1,0
-2101,Lake / Maracaibo Grid M1,1319,projected,4499,,4249,18260,,,Oil exploration.,Grid coordinates are (0 0) at Maracaibo Cathedral (10deg 38min 34.678sec N; 71deg 36min 20.224sec W; Lake datum).   Used by Creole; MGO and Sun.,Various oil company sources.,EPSG,2000-06-10 00:00:00,,1,0
-2102,Lake / Maracaibo Grid,1319,projected,4499,,4249,18261,,,Oil exploration.,Grid coordinates are (200000 200000) at Maracaibo Cathedral (10deg 38min 34.678sec N; 71deg 36min 20.224sec W; Lake datum).  Used for Lake triangulation coordinate listing.,Various oil company sources.,EPSG,2000-06-10 00:00:00,,1,0
-2103,Lake / Maracaibo Grid M3,1319,projected,4499,,4249,18262,,,Oil exploration.,Grid coordinates are (500000 500000) at Maracaibo Cathedral (10deg 38min 34.678sec N; 71deg 36min 20.224sec W; Lake datum).  Used by Varco.,Various oil company sources.,EPSG,2000-06-10 00:00:00,,1,0
-2104,Lake / Maracaibo La Rosa Grid,1499,projected,4499,,4249,18263,,,Oil exploration.,"Grid coordinates are (X=-17044 Y=29545) at Maracaibo Cathedral (10deg 38min 34.678sec N; 71deg 36min 20.224sec W; Lake datum).
-Do not confuse with the La Rosa grid used in the Cabinas area (code 5810).",Various oil company sources.,EPSG,2000-06-23 00:00:00,,1,0
-2105,NZGD2000 / Mount Eden Circuit 2000,1500,projected,4500,,4167,17931,,,Cadastral surveys.,Superseded NZGD49 / Mount Eden Circuit 2000 (code 27205) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-2106,NZGD2000 / Bay of Plenty Circuit 2000,1500,projected,4500,,4167,17932,,,Cadastral surveys.,Superseded NZGD49 / Bay of Plenty Circuit 2000 (code 27206) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-2107,NZGD2000 / Poverty Bay Circuit 2000,1500,projected,4500,,4167,17933,,,Cadastral surveys.,Superseded NZGD49 / Poverty Bay 2000 (code 27207) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-2108,NZGD2000 / Hawkes Bay Circuit 2000,1500,projected,4500,,4167,17934,,,Cadastral surveys.,Superseded NZGD49 / Hawkes Bay Circuit 2000 (code 27208) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-2109,NZGD2000 / Taranaki Circuit 2000,1500,projected,4500,,4167,17935,,,Cadastral surveys.,Superseded NZGD49 / Taranaki Circuit 2000 (code 27209) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-2110,NZGD2000 / Tuhirangi Circuit 2000,1500,projected,4500,,4167,17936,,,Cadastral surveys.,Superseded NZGD49 / Tuhirangi Circuit 2000 (code 27210) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-2111,NZGD2000 / Wanganui Circuit 2000,1500,projected,4500,,4167,17937,,,Cadastral surveys.,Superseded NZGD49 / Wanganui Circuit 2000 (code 27211) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-2112,NZGD2000 / Wairarapa Circuit 2000,1500,projected,4500,,4167,17938,,,Cadastral surveys.,Superseded NZGD49 / Wairarapa Circuit 2000 (code 27212) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-2113,NZGD2000 / Wellington Circuit 2000,1500,projected,4500,,4167,17939,,,Cadastral surveys.,Superseded NZGD49 / Wellington Circuit 2000 (code 27213) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-2114,NZGD2000 / Collingwood Circuit 2000,1501,projected,4500,,4167,17940,,,Cadastral surveys.,Superseded NZGD49 / Collingwood Circuit 2000 (code 27214) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-2115,NZGD2000 / Nelson Circuit 2000,1501,projected,4500,,4167,17941,,,Cadastral surveys.,Superseded NZGD49 / Nelson Circuit 2000 (code 27215) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-2116,NZGD2000 / Karamea Circuit 2000,1501,projected,4500,,4167,17942,,,Cadastral surveys.,Superseded NZGD49 / Karamea Circuit 2000 (code 27216) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-2117,NZGD2000 / Buller Circuit 2000,1501,projected,4500,,4167,17943,,,Cadastral surveys.,Superseded NZGD49 / Buller Circuit 2000 (code 27217) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-2118,NZGD2000 / Grey Circuit 2000,1501,projected,4500,,4167,17944,,,Cadastral surveys.,Superseded NZGD49 / Grey Circuit 2000 (code 27218) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-2119,NZGD2000 / Amuri Circuit 2000,1501,projected,4500,,4167,17945,,,Cadastral surveys.,Superseded NZGD49 / Amuri Circuit 2000 (code 27219) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-2120,NZGD2000 / Marlborough Circuit 2000,1501,projected,4500,,4167,17946,,,Cadastral surveys.,Superseded NZGD49 / Marlborough Circuit 2000 (code 27220) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-2121,NZGD2000 / Hokitika Circuit 2000,1501,projected,4500,,4167,17947,,,Cadastral surveys.,Superseded NZGD49 / Hokitika Circuit 2000 (code 27221) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-2122,NZGD2000 / Okarito Circuit 2000,1501,projected,4500,,4167,17948,,,Cadastral surveys.,Superseded NZGD49 / Okarito Circuit 2000 (code 27222) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-2123,NZGD2000 / Jacksons Bay Circuit 2000,1501,projected,4500,,4167,17949,,,Cadastral surveys.,Superseded NZGD49 / Jacksons Bay Circuit 2000 (code 27223) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-2124,NZGD2000 / Mount Pleasant Circuit 2000,1501,projected,4500,,4167,17950,,,Cadastral surveys.,Superseded NZGD49 / Mount Pleasant Circuit 2000 (code 27224) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-2125,NZGD2000 / Gawler Circuit 2000,1501,projected,4500,,4167,17951,,,Cadastral surveys.,Superseded NZGD49 / Gawler Circuit 2000 (code 27225) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-2126,NZGD2000 / Timaru Circuit 2000,1501,projected,4500,,4167,17952,,,Cadastral surveys.,Superseded NZGD49 / Timaru Circuit 2000 (code 27226) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-2127,NZGD2000 / Lindis Peak Circuit 2000,1501,projected,4500,,4167,17953,,,Cadastral surveys.,Superseded NZGD49 / Lindis Peak Circuit 2000 (code 27227) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-2128,NZGD2000 / Mount Nicholas Circuit 2000,1501,projected,4500,,4167,17954,,,Cadastral surveys.,Superseded NZGD49 / Mount Nicholas Circuit 2000 (code 27228) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-2129,NZGD2000 / Mount York Circuit 2000,1501,projected,4500,,4167,17955,,,Cadastral surveys.,Superseded NZGD49 / Mount York Circuit 2000 (code 27229) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-2130,NZGD2000 / Observation Point Circuit 2000,1501,projected,4500,,4167,17956,,,Cadastral surveys.,Superseded NZGD49 / Observation Point Circuit 2000 (code 27230) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-2131,NZGD2000 / North Taieri Circuit 2000,1501,projected,4500,,4167,17957,,,Cadastral surveys.,Superseded NZGD49 / North Taieri Circuit 2000 (code 27231) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-2132,NZGD2000 / Bluff Circuit 2000,1501,projected,4500,,4167,17958,,,Cadastral surveys.,Superseded NZGD49 / Bluff Circuit 2000 (code 27232) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-2133,NZGD2000 / UTM zone 58S,1502,projected,4400,,4167,16158,,,Large and medium scale topographic mapping and engineering survey.,Supersedes NZGD49 / UTM zone 58S (code 27258) from March 2000.,,EPSG,2000-10-19 00:00:00,,1,0
-2134,NZGD2000 / UTM zone 59S,1503,projected,4400,,4167,16159,,,Large and medium scale topographic mapping and engineering survey.,Supersedes NZGD49 / UTM zone 59S (code 27259) from March 2000.,,EPSG,2000-10-19 00:00:00,,1,0
-2135,NZGD2000 / UTM zone 60S,1504,projected,4400,,4167,16160,,,Large and medium scale topographic mapping and engineering survey.,Supersedes NZGD49 / UTM zone 60S (code 27260) from March 2000.,,EPSG,2000-10-19 00:00:00,,1,0
-2136,Accra / Ghana National Grid,1104,projected,4404,,4168,19959,,,Large and medium scale topographic mapping and engineering survey.,"Ellipsoid semi-major axis (a)=20926201 Gold Coast feet.  ProjCRS sometimes found in metric form: 1 Gold Coast foot = 0.3047997101815 m.
-Superseded by Leigon / Ghana Metric Grid from 1978.",Ordnance Survey International,EPSG,2000-10-19 00:00:00,,1,0
-2137,Accra / TM 1 NW,1505,projected,4400,,4168,17001,,,Oil exploration.,,Various oil industry sources,EPSG,2000-10-19 00:00:00,,1,0
-2138,NAD27(CGQ77) / Quebec Lambert,1368,projected,4499,,4609,19944,,,Medium and small scale mapping.,Superseded NAD27 / Quebec Lambert (code 32098) in 1977.,Service de la Cartographie; Minist�re des Ressources Naturelles; Quebec,EPSG,2000-10-19 00:00:00,,1,0
-2139,NAD83(CSRS98) / SCoPQ zone 2,1420,projected,4499,,4140,17700,,,Large and medium scale topographic mapping and engineering survey.,,Topographic Mapping Section; Quebec Ministry of Natural Resources.,EPSG,2000-10-19 00:00:00,,1,1
-2140,NAD83(CSRS98) / MTM zone 3,1421,projected,4496,,4140,17703,,,Large and medium scale topographic mapping and engineering survey.,"Known in Quebec as ""NAD83(CSRS98) / SCoPQ zone 3"" with axis 1 and 2 abbreviations of ""X"" and ""Y"" respectively.",Topographic Mapping Section; Quebec Ministry of Natural Resources.,EPSG,2000-10-19 00:00:00,,1,1
-2141,NAD83(CSRS98) / MTM zone 4,1422,projected,4496,,4140,17704,,,Large and medium scale topographic mapping and engineering survey.,"Known in Quebec as ""NAD83(CSRS98) / SCoPQ zone 4"" with axis 1 and 2 abbreviations of ""X"" and ""Y"" respectively.",Topographic Mapping Section; Quebec Ministry of Natural Resources.,EPSG,2000-10-19 00:00:00,,1,1
-2142,NAD83(CSRS98) / MTM zone 5,1423,projected,4496,,4140,17705,,,Large and medium scale topographic mapping and engineering survey.,"Known in Quebec as ""NAD83(CSRS98) / SCoPQ zone 5"" with axis 1 and 2 abbreviations of ""X"" and ""Y"" respectively.",Topographic Mapping Section; Quebec Ministry of Natural Resources.,EPSG,2000-10-19 00:00:00,,1,1
-2143,NAD83(CSRS98) / MTM zone 6,1424,projected,4496,,4140,17706,,,Large and medium scale topographic mapping and engineering survey.,"Known in Quebec as ""NAD83(CSRS98) / SCoPQ zone 6"" with axis 1 and 2 abbreviations of ""X"" and ""Y"" respectively.",Topographic Mapping Section; Quebec Ministry of Natural Resources.,EPSG,2000-10-19 00:00:00,,1,1
-2144,NAD83(CSRS98) / MTM zone 7,1425,projected,4496,,4140,17707,,,Large and medium scale topographic mapping and engineering survey.,"Known in Quebec as ""NAD83(CSRS98) / SCoPQ zone 7"" with axis 1 and 2 abbreviations of ""X"" and ""Y"" respectively.",Topographic Mapping Section; Quebec Ministry of Natural Resources.,EPSG,2000-10-19 00:00:00,,1,1
-2145,NAD83(CSRS98) / MTM zone 8,1426,projected,4496,,4140,17708,,,Large and medium scale topographic mapping and engineering survey.,"Known in Quebec as ""NAD83(CSRS98) / SCoPQ zone 8"" with axis 1 and 2 abbreviations of ""X"" and ""Y"" respectively.",Topographic Mapping Section; Quebec Ministry of Natural Resources.,EPSG,2000-10-19 00:00:00,,1,1
-2146,NAD83(CSRS98) / MTM zone 9,1427,projected,4496,,4140,17709,,,Large and medium scale topographic mapping and engineering survey.,"Known in Quebec as ""NAD83(CSRS98) / SCoPQ zone 9"" with axis 1 and 2 abbreviations of ""X"" and ""Y"" respectively.",Topographic Mapping Section; Quebec Ministry of Natural Resources.,EPSG,2000-10-19 00:00:00,,1,1
-2147,NAD83(CSRS98) / MTM zone 10,1428,projected,4496,,4140,17710,,,Large and medium scale topographic mapping and engineering survey.,"Known in Quebec as ""NAD83(CSRS98) / SCoPQ zone 10"" with axis 1 and 2 abbreviations of ""X"" and ""Y"" respectively.",Topographic Mapping Section; Quebec Ministry of Natural Resources.,EPSG,2000-10-19 00:00:00,,1,1
-2148,NAD83(CSRS98) / UTM zone 21N,1446,projected,4400,,4140,16021,,,Large and medium scale topographic mapping and engineering survey.,In use from 2000.,Geomatics Canada.,EPSG,2000-10-19 00:00:00,,1,1
-2149,NAD83(CSRS98) / UTM zone 18N,1443,projected,4400,,4140,16018,,,Large and medium scale topographic mapping and engineering survey.,In use from 2000.,Geomatics Canada.,EPSG,2000-10-19 00:00:00,,1,1
-2150,NAD83(CSRS98) / UTM zone 17N,1428,projected,4400,,4140,16017,,,Large and medium scale topographic mapping and engineering survey.,In use from 2000.,Geomatics Canada.,EPSG,2000-10-19 00:00:00,,1,1
-2151,NAD83(CSRS98) / UTM zone 13N,1506,projected,4400,,4140,16013,,,Large and medium scale topographic mapping and engineering survey.,In use from 2000.,Geomatics Canada.,EPSG,2000-10-19 00:00:00,,1,1
-2152,NAD83(CSRS98) / UTM zone 12N,1507,projected,4400,,4140,16012,,,Large and medium scale topographic mapping and engineering survey.,In use from 2000.,Geomatics Canada.,EPSG,2000-10-19 00:00:00,,1,1
-2153,NAD83(CSRS98) / UTM zone 11N,1508,projected,4400,,4140,16011,,,Large and medium scale topographic mapping and engineering survey.,In use from 2000.,Geomatics Canada.,EPSG,2000-10-19 00:00:00,,1,1
-2154,RGF93 / Lambert-93,1326,projected,4499,,4171,18085,,,Large and medium scale topographic mapping and engineering survey.,,IGN - Paris,EPSG,2000-10-19 00:00:00,,1,0
-2155,American Samoa 1962 / American Samoa Lambert,1027,projected,4497,,4169,15300,,,Large and medium scale topographic mapping and engineering survey.,Superseded by projCRS 2156 as of mid-2000.,US National Geodetic Survey (NGS)  http://www.ngs.noaa.gov/,EPSG,2000-10-19 00:00:00,,1,1
-2156,NAD83(HARN) / UTM zone 59S,1027,projected,4400,,4152,16159,,,Large and medium scale topographic mapping and engineering survey.,Supersedes projCRS 2155; effective in 2000.    Deprecated due to error in projection and replaced by code 2195.,US National Geodetic Survey (NGS)  http://www.ngs.noaa.gov/,EPSG,2000-10-19 00:00:00,,1,1
-2157,IRENET95 / Irish Transverse Mercator,1305,projected,4400,,4173,19962,,,Large and medium scale topographic mapping and engineering survey.,Supersedes TM75 / Irish Grid (code 29903) from 1/1/2001.,Ordnance Survey of Ireland,EPSG,2000-10-19 00:00:00,,1,0
-2158,IRENET95 / UTM zone 29N,1305,projected,4400,,4173,16029,,,Large and medium scale topographic mapping and engineering survey.,,Ordnance Survey of Ireland,EPSG,2000-10-19 00:00:00,,1,0
-2159,Sierra Leone 1924 / New Colony Grid,1342,projected,4404,,4174,19963,,,Topographic mapping and engineering survey.,Supersedes the Sierra Leone 1924 / Colony Grid. New grid is 422.3 ft west and 112.1 ft south of old grid.  Ellipsoid semi-major axis (a)=20926201 Gold Coast feet; 1 Gold Coast foot = 0.3047997101815 m.,Ordnance Survey International,EPSG,2001-06-05 00:00:00,,1,0
-2160,Sierra Leone 1924 / New War Office Grid,1342,projected,4404,,4174,19964,,,Topographic mapping,Supersedes the Sierra Leone War Office Grid. New grid is 422.3 ft west and 112.1 ft south of old grid. Ellipsoid semi-major axis (a)=20926201 Gold Coast feet; 1 Gold Coast foot = 0.3047997101815 m.,Ordnance Survey International,EPSG,2001-06-05 00:00:00,,1,0
-2161,Sierra Leone 1968 / UTM zone 28N,1509,projected,4400,,4175,16028,,,Topographic mapping and engineering survey.,Supersedes Sierra Leone 1960 / UTM zone 28N.  The 1968 readjustment coordinates are within 3m of the 1960 provisional adjustment.,Ordnance Survey International,EPSG,2001-06-05 00:00:00,,1,0
-2162,Sierra Leone 1968 / UTM zone 29N,1510,projected,4400,,4175,16029,,,Topographic mapping and engineering survey.,Supersedes Sierra Leone 1960 / UTM zone 29N.  The 1968 readjustment coordinates are within 3m of the 1960 provisional adjustment.,Ordnance Survey International,EPSG,2001-06-05 00:00:00,,1,0
-2163,US National Atlas Equal Area,1245,projected,4499,,4047,19965,,,For small scale (1:1million and smaller) statistical mapping.,Uses spherical projection formulae.  USGS describe geogCRS as NAD83 but this would require ellipsoidal projection formulae.,"United States Geological Survey, Western Geographic Science Center",EPSG,2001-06-05 00:00:00,,1,0
-2164,Locodjo 1965 / TM 5 NW,2296,projected,4400,,4142,17005,,,Oil industry use.,,Various oil industry sources,EPSG,2001-06-05 00:00:00,,1,0
-2165,Abidjan 1987 / TM 5 NW,2296,projected,4400,,4143,17005,,,Oil Industry,,Various oil industry sources,EPSG,2001-06-05 00:00:00,,1,0
-2166,Pulkovo 1942(83) / Gauss Kruger zone 3,1512,projected,4530,,4178,16263,,,"Large and medium scale topographic mapping and engineering survey, cadastral survey.",In Thuringen superseded by DHDN / Gauss Kruger zone 3.,EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,1
-2167,Pulkovo 1942(83) / Gauss Kruger zone 4,1513,projected,4530,,4178,16264,,,"Large and medium scale topographic mapping and engineering survey, cadastral survey.","In Brandenburg superseded by ETRS89 / UTM zone 33N. 
-In Sachsen and Thuringen superseded by DHDN / Gauss Kruger zone 4.",Bundesamt f�r Kartographie und Geod�sie via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,1
-2168,Pulkovo 1942(83) / Gauss Kruger zone 5,1512,projected,4530,,4178,16265,,,"Large and medium scale topographic mapping and engineering survey, cadastral survey.","In Brandenburg superseded by ETRS89 / UTM zone 33N. 
-In Sachsen superseded by DHDN / Gauss Kruger zone 5.",Bundesamt f�r Kartographie und Geod�sie via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,1
-2169,Luxembourg 1930 / Gauss,1146,projected,4530,,4181,19966,,,Large and medium scale topographic mapping and engineering survey.,,Administration du Cadastre et de la Topographie via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-2170,MGI / Slovenia Grid,1212,projected,4530,,4312,19967,,,Large and medium scale topographic mapping and engineering survey.,Truncated form of MGI / Balkans zone 5 (code 31275).,,EPSG,2001-06-05 00:00:00,,1,0
-2171,Pulkovo 1942(58) / Poland zone I,1515,projected,4530,,4179,18281,,,Large and medium scale topographic mapping and engineering survey.,To be phased out after 2009. Superseded by ETRS89 / Poland CS2000 zones 7 and 8 (codes 2178-79).,Glowny Urzad Geodezji i Kartografii via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-2172,Pulkovo 1942(58) / Poland zone II,1516,projected,4530,,4179,18282,,,Large and medium scale topographic mapping and engineering survey.,To be phased out after 2009. Superseded by ETRS89 / Poland CS2000 zones 7 and 8 (codes 2178-79).,Glowny Urzad Geodezji i Kartografii via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-2173,Pulkovo 1942(58) / Poland zone III,1517,projected,4530,,4179,18283,,,Large and medium scale topographic mapping and engineering survey.,To be phased out after 2009. Superseded by ETRS89 / Poland CS2000 zones 5 and 6 (codes 2176-77).,Glowny Urzad Geodezji i Kartografii via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-2174,Pulkovo 1942(58) / Poland zone IV,1518,projected,4530,,4179,18284,,,Large and medium scale topographic mapping and engineering survey.,To be phased out after 2009. Superseded by ETRS89 / Poland CS2000 zones 5 and 6 (codes 2176-77).,Glowny Urzad Geodezji i Kartografii via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-2175,Pulkovo 1942(58) / Poland zone V,1519,projected,4530,,4179,18285,,,Large and medium scale topographic mapping and engineering survey.,To be phased out after 2009. Superseded by ETRS89 / Poland CS2000 zone 6 (code 2177).,Glowny Urzad Geodezji i Kartografii via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-2176,ETRS89 / Poland CS2000 zone 5,1520,projected,4531,,4258,18305,,,"Large (1:5,000 and greater) scale topographic mapping and cadastral survey.",See ETRS89 / Poland CS92 (code 2170) for smaller scale mapping.,Glowny Urzad Geodezji i Kartografii via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-2177,ETRS89 / Poland CS2000 zone 6,1521,projected,4531,,4258,18306,,,"Large (1:5,000 and greater) scale topographic mapping and cadastral survey.",See ETRS89 / Poland CS92 (code 2170) for smaller scale mapping.,Glowny Urzad Geodezji i Kartografii via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-2178,ETRS89 / Poland CS2000 zone 7,1522,projected,4531,,4258,18307,,,"Large (1:5,000 and greater) scale topographic mapping and cadastral survey.",See ETRS89 / Poland CS92 (code 2170) for smaller scale mapping.,Glowny Urzad Geodezji i Kartografii via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-2179,ETRS89 / Poland CS2000 zone 8,1523,projected,4531,,4258,18308,,,"Large (1:5,000 and greater) scale topographic mapping and cadastral survey.",See ETRS89 / Poland CS92 (code 2170) for smaller scale mapping.,Glowny Urzad Geodezji i Kartografii via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-2180,ETRS89 / Poland CS92,1192,projected,4531,,4258,18300,,,"Medium and small scale topographic mapping (1:10,000 and smaller).",See ETRS89 / Poland CS2000 zones 5- 8 (codes 2176-79) for large scale purposes.,Glowny Urzad Geodezji i Kartografii via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-2188,Azores Occidental 1939 / UTM zone 25N,1344,projected,4400,,4182,16025,,,Topographic mapping.,,Instituto Geografico e Cadastral Lisbon via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-2189,Azores Central 1948 / UTM zone 26N,1301,projected,4400,,4183,16026,,,Topographic mapping.,,Instituto Geografico e Cadastral Lisbon via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-2190,Azores Oriental 1940 / UTM zone 26N,1345,projected,4400,,4184,16026,,,Topographic mapping.,,Instituto Geografico e Cadastral Lisbon via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-2191,Madeira 1936 / UTM zone 28N,1314,projected,4400,,4185,16028,,,Topographic mapping.,,Instituto Geografico e Cadastral Lisbon via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,1
-2192,ED50 / France EuroLambert,1326,projected,4499,,4230,18086,,,Medium scale topographic and statistical mapping.,,IGN Paris via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-2193,NZGD2000 / New Zealand Transverse Mercator,1175,projected,4500,,4167,19971,,,Large and medium scale topographic mapping and engineering survey.,Supersedes NZGD49 / New Zealand Map Grid (code 27200) from July 2001.,Shell Todd Oil Services.,EPSG,2001-08-28 00:00:00,,1,0
-2194,American Samoa 1962 / American Samoa Lambert,1027,projected,4497,,4169,15301,,,Large and medium scale topographic mapping and engineering survey.,Superseded by projCRS 2156 as of mid-2000.,US National Geodetic Survey (NGS)  http://www.ngs.noaa.gov/,EPSG,2001-08-28 00:00:00,,1,0
-2195,NAD83(HARN) / UTM zone 2S,1027,projected,4400,,4152,16102,,,Large and medium scale topographic mapping and engineering survey.,Supersedes projCRS 2194; effective in 2000,US National Geodetic Survey (NGS)  http://www.ngs.noaa.gov/,EPSG,2001-08-28 00:00:00,,1,0
-2196,ETRS89 / Kp2000 Jutland,2531,projected,4400,,4258,18401,,,"Large and scale topographic mapping, cadastral and engineering survey.  Note: for medium scale topographic mapping ETRS89 / UTM zone 32N (code 25832) is used.",Supersedes System 34 Jutland zone.,Kort & Matrikelstyrelsen,EPSG,2001-11-06 00:00:00,,1,0
-2197,ETRS89 / Kp2000 Zealand,2532,projected,4400,,4258,18402,,,"Large and scale topographic mapping, cadastral and engineering survey.  Note: for medium scale topographic mapping ETRS89 / UTM zone 32N (code 25832) is used.",Supersedes System 34 Zealand zone.,Kort & Matrikelstyrelsen,EPSG,2001-11-06 00:00:00,,1,0
-2198,ETRS89 / Kp2000 Bornholm,2533,projected,4400,,4258,18403,,,"Large and scale topographic mapping, cadastral and engineering survey.  Note: for medium scale topographic mapping ETRS89 / UTM zone 33N (code 25833) is used.",Supersedes System 45.,Kort & Matrikelstyrelsen,EPSG,2001-11-06 00:00:00,,1,0
-2199,Albanian 1987 / Gauss Kruger zone 4,1025,projected,4530,,4191,16204,,,"Large and medium scale topographic mapping and engineering survey, cadastral survey.",,EuroGeographics; http://crs.ifag.de/,EPSG,2001-11-06 00:00:00,,1,1
-2200,ATS77 / New Brunswick Stereographic (ATS77),1447,projected,4500,,4122,19945,,,Large and medium scale topographic mapping and engineering survey.,In use from 1979.  To be phased out in late 1990's.,New Brunswick Geographic Information Corporation land and water information standards manual.,EPSG,1999-10-20 00:00:00,99.61,1,0
-2201,REGVEN / UTM zone 18N,1693,projected,4400,,4189,16018,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2001-11-06 00:00:00,,1,0
-2000,Anguilla 1957 / British West Indies Grid,1030,projected,4400,,4600,19942,,,Large and medium scale topographic mapping and engineering survey.,,Ordnance Survey of Great Britain,EPSG,2000-03-07 00:00:00,99.74,1,0
-2001,Antigua 1943 / British West Indies Grid,1273,projected,4400,,4601,19942,,,Large and medium scale topographic mapping and engineering survey.,,Ordnance Survey of Great Britain,EPSG,2000-03-07 00:00:00,99.74,1,0
-2002,Dominica 1945 / British West Indies Grid,1082,projected,4400,,4602,19942,,,Large and medium scale topographic mapping and engineering survey.,,Ordnance Survey of Great Britain,EPSG,2000-03-07 00:00:00,99.74,1,0
-2003,Grenada 1953 / British West Indies Grid,1551,projected,4400,,4603,19942,,,Large and medium scale topographic mapping and engineering survey.,,Ordnance Survey of Great Britain,EPSG,2000-03-07 00:00:00,99.74,1,0
-2004,Montserrat 58 / British West Indies Grid,1165,projected,4400,,4604,19942,,,Large and medium scale topographic mapping and engineering survey.,,Ordnance Survey of Great Britain,EPSG,2000-03-07 00:00:00,99.74,1,0
-2005,St Kitts 1955 / British West Indies Grid,1200,projected,4400,,4605,19942,,,Large and medium scale topographic mapping and engineering survey.,,Ordnance Survey of Great Britain,EPSG,2000-03-07 00:00:00,99.74,1,0
-2006,St Lucia 1955 / British West Indies Grid,1201,projected,4400,,4606,19942,,,Large and medium scale topographic mapping and engineering survey.,,Ordnance Survey of Great Britain,EPSG,2000-03-07 00:00:00,99.74,1,0
-2007,St Vincent 45 / British West Indies Grid,1202,projected,4400,,4607,19942,,,Large and medium scale topographic mapping and engineering survey.,,Ordnance Survey of Great Britain,EPSG,2000-03-07 00:00:00,99.74,1,0
-2008,NAD27(CGQ77) / SCoPQ zone 2,1420,projected,4499,,4609,17700,,,Large and medium scale topographic mapping and engineering survey.,,Geodetic Service of Quebec; Quebec Ministry of Natural Resources.,EPSG,2000-03-07 00:00:00,99.74,1,0
-2009,NAD27(CGQ77) / SCoPQ zone 3,1421,projected,4499,,4609,17703,,,Large and medium scale topographic mapping and engineering survey.,,Geodetic Service of Quebec; Quebec Ministry of Natural Resources.,EPSG,2000-03-07 00:00:00,99.74,1,0
-2010,NAD27(CGQ77) / SCoPQ zone 4,1422,projected,4499,,4609,17704,,,Large and medium scale topographic mapping and engineering survey.,,Geodetic Service of Quebec; Quebec Ministry of Natural Resources.,EPSG,2000-03-07 00:00:00,99.74,1,0
-2011,NAD27(CGQ77) / SCoPQ zone 5,1423,projected,4499,,4609,17705,,,Large and medium scale topographic mapping and engineering survey.,,Geodetic Service of Quebec; Quebec Ministry of Natural Resources.,EPSG,2000-03-07 00:00:00,99.74,1,0
-2012,NAD27(CGQ77) / SCoPQ zone 6,1424,projected,4499,,4609,17706,,,Large and medium scale topographic mapping and engineering survey.,,Geodetic Service of Quebec; Quebec Ministry of Natural Resources.,EPSG,2000-03-07 00:00:00,99.74,1,0
-2013,NAD27(CGQ77) / SCoPQ zone 7,1425,projected,4499,,4609,17707,,,Large and medium scale topographic mapping and engineering survey.,,Geodetic Service of Quebec; Quebec Ministry of Natural Resources.,EPSG,2000-03-07 00:00:00,99.74,1,0
-2014,NAD27(CGQ77) / SCoPQ zone 8,1426,projected,4499,,4609,17708,,,Large and medium scale topographic mapping and engineering survey.,,Geodetic Service of Quebec; Quebec Ministry of Natural Resources.,EPSG,2000-03-07 00:00:00,99.74,1,0
-2015,NAD27(CGQ77) / SCoPQ zone 9,1427,projected,4499,,4609,17709,,,Large and medium scale topographic mapping and engineering survey.,,Geodetic Service of Quebec; Quebec Ministry of Natural Resources.,EPSG,2000-03-07 00:00:00,99.74,1,0
-2016,NAD27(CGQ77) / SCoPQ zone 10,1428,projected,4499,,4609,17710,,,Large and medium scale topographic mapping and engineering survey.,,Geodetic Service of Quebec; Quebec Ministry of Natural Resources.,EPSG,2000-03-07 00:00:00,99.74,1,0
-2017,NAD27(76) / MTM zone 8,1429,projected,4499,,4608,17708,,,Large and medium scale topographic mapping and engineering survey.,,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,2000-03-07 00:00:00,99.74,1,0
-2018,NAD27(76) / MTM zone 9,1430,projected,4499,,4608,17709,,,Large and medium scale topographic mapping and engineering survey.,,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,2000-03-07 00:00:00,99.74,1,0
-2019,NAD27(76) / MTM zone 10,1431,projected,4499,,4608,17710,,,Large and medium scale topographic mapping and engineering survey.,,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,2000-03-07 00:00:00,99.74,1,0
-2020,NAD27(76) / MTM zone 11,1432,projected,4400,,4608,17711,,,Large and medium scale topographic mapping and engineering survey.,,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,2000-03-07 00:00:00,99.74,1,0
-2021,NAD27(76) / MTM zone 12,1433,projected,4400,,4608,17712,,,Large and medium scale topographic mapping and engineering survey.,,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,2000-03-07 00:00:00,99.74,1,0
-2022,NAD27(76) / MTM zone 13,1434,projected,4400,,4608,17713,,,Large and medium scale topographic mapping and engineering survey.,,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,2000-03-07 00:00:00,99.74,1,0
-2023,NAD27(76) / MTM zone 14,1435,projected,4400,,4608,17714,,,Large and medium scale topographic mapping and engineering survey.,,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,2000-03-07 00:00:00,99.74,1,0
-2024,NAD27(76) / MTM zone 15,1436,projected,4400,,4608,17715,,,Large and medium scale topographic mapping and engineering survey.,,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,2000-03-07 00:00:00,99.74,1,0
-2025,NAD27(76) / MTM zone 16,1437,projected,4400,,4608,17716,,,Large and medium scale topographic mapping and engineering survey.,,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,2000-03-07 00:00:00,99.74,1,0
-2026,NAD27(76) / MTM zone 17,1438,projected,4400,,4608,17717,,,Large and medium scale topographic mapping and engineering survey.,,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,2000-03-07 00:00:00,99.74,1,0
-2027,NAD27(76) / UTM zone 15N,1439,projected,4400,,4608,16015,,,Large and medium scale topographic mapping and engineering survey.,Supersedes NAD27 / UTM zone 15N (code 26715).,,EPSG,2000-03-07 00:00:00,99.74,1,0
-2028,NAD27(76) / UTM zone 16N,1440,projected,4400,,4608,16016,,,Large and medium scale topographic mapping and engineering survey.,Supersedes NAD27 / UTM zone 16N (code 26716).,,EPSG,2000-03-07 00:00:00,99.74,1,0
-2029,NAD27(76) / UTM zone 17N,1441,projected,4400,,4608,16017,,,Large and medium scale topographic mapping and engineering survey.,Supersedes NAD27 / UTM zone 17N (code 26717).,,EPSG,2000-03-07 00:00:00,99.74,1,0
-2030,NAD27(76) / UTM zone 18N,1442,projected,4400,,4608,16018,,,Large and medium scale topographic mapping and engineering survey.,Supersedes NAD27 / UTM zone 18N (code 26718).,,EPSG,2000-03-07 00:00:00,99.74,1,0
-2031,NAD27(CGQ77) / UTM zone 17N,1428,projected,4400,,4609,16017,,,Large and medium scale topographic mapping and engineering survey.,Supersedes NAD27 / UTM zone 17N (code 26717).,,EPSG,2000-03-07 00:00:00,99.74,1,0
-2032,NAD27(CGQ77) / UTM zone 18N,1443,projected,4400,,4609,16018,,,Large and medium scale topographic mapping and engineering survey.,Supersedes NAD27 / UTM zone 18N (code 26718).,,EPSG,2000-03-07 00:00:00,99.74,1,0
-2033,NAD27(CGQ77) / UTM zone 19N,1444,projected,4400,,4609,16019,,,Large and medium scale topographic mapping and engineering survey.,Supersedes NAD27 / UTM zone 19N (code 26719).,,EPSG,2000-03-07 00:00:00,99.74,1,0
-2034,NAD27(CGQ77) / UTM zone 20N,1445,projected,4400,,4609,16020,,,Large and medium scale topographic mapping and engineering survey.,Supersedes NAD27 / UTM zone 20N (code 26720).,,EPSG,2000-03-07 00:00:00,99.74,1,0
-2035,NAD27(CGQ77) / UTM zone 21N,1446,projected,4400,,4609,16021,,,Large and medium scale topographic mapping and engineering survey.,Supersedes NAD27 / UTM zone 21N (code 26721).,,EPSG,2000-03-07 00:00:00,99.74,1,0
-2036,NAD83(CSRS98) / New Brunswick Stereo,1447,projected,4500,,4140,19946,,,Large and medium scale topographic mapping and engineering survey.,In use from 1999.,Service New Brunswick Land and Information Standards Manual,EPSG,2000-03-07 00:00:00,99.74  99.90,1,1
-2037,NAD83(CSRS98) / UTM zone 19N,1448,projected,4400,,4140,16019,,,Large and medium scale topographic mapping and engineering survey.,In use from 1999.,Service New Brunswick Land and Information Standards Manual,EPSG,2000-03-07 00:00:00,99.74  99.90,1,1
-2038,NAD83(CSRS98) / UTM zone 20N,1449,projected,4400,,4140,16020,,,Large and medium scale topographic mapping and engineering survey.,In use from 1999.,Service New Brunswick Land and Information Standards Manual,EPSG,2000-03-07 00:00:00,99.74  99.90,1,1
-2039,Israel / Israeli TM Grid,2603,projected,4400,,4141,18204,,,Large and medium scale topographic mapping and engineering survey.,Supersedes Israeli CS Grid (EPSG code 28193).,Survey of Israel.,EPSG,2002-06-22 00:00:00,99.74  2002.34,1,0
-2040,Locodjo 1965 / UTM zone 30N,1450,projected,4400,,4142,16030,,,Large and medium scale topographic mapping and engineering survey.,Superseded by Abidjan 87 / UTM 30N (EPSG code 2041).,IGN Paris,EPSG,2000-03-07 00:00:00,99.74,1,0
-2041,Abidjan 1987 / UTM zone 30N,1450,projected,4400,,4143,16030,,,Large and medium scale topographic mapping and engineering survey.,Supersedes Locodjo 65 / UTM 30N (EPSG code 2040).,IGN Paris,EPSG,2000-03-07 00:00:00,99.74,1,0
-2042,Locodjo 1965 / UTM zone 29N,1451,projected,4400,,4142,16029,,,Large and medium scale topographic mapping and engineering survey.,Superseded by Abidjan 87 / UTM 29N (EPSG code 2043).,IGN Paris,EPSG,2000-03-07 00:00:00,99.74,1,0
-2043,Abidjan 1987 / UTM zone 29N,1451,projected,4400,,4143,16029,,,Large and medium scale topographic mapping and engineering survey.,Supersedes Locodjo 65 / UTM 29N (EPSG code 2042).,IGN Paris,EPSG,2000-03-07 00:00:00,99.74,1,0
-2044,Hanoi 1972 / Gauss-Kruger zone 18,1452,projected,4530,,4147,16218,,,Large and medium scale topographic mapping and engineering survey.,Replaces use of Indian 1960 / UTM zone 48 after 1988.,,EPSG,2000-03-07 00:00:00,99.74,1,0
-2045,Hanoi 1972 / Gauss-Kruger zone 19,1453,projected,4530,,4147,16219,,,Large and medium scale topographic mapping and engineering survey.,Replaces use of Indian 1960 / UTM zone 49 after 1988.,,EPSG,2000-03-07 00:00:00,99.74,1,0
-2046,Hartebeesthoek94 / Lo15,1454,projected,6503,,4148,17515,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",,Directorate of Surveys and Mapping; http://w3sli.wcape.gov.za/surveys/mapping/wgs84.htm,EPSG,2000-03-07 00:00:00,99.74  99.96  99.98  2000.04,1,0
-2047,Hartebeesthoek94 / Lo17,1455,projected,6503,,4148,17517,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",,Directorate of Surveys and Mapping; http://w3sli.wcape.gov.za/surveys/mapping/wgs84.htm,EPSG,2000-03-07 00:00:00,99.74  99.96  99.98  2000.04,1,0
-2048,Hartebeesthoek94 / Lo19,1456,projected,6503,,4148,17519,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",,Directorate of Surveys and Mapping; http://w3sli.wcape.gov.za/surveys/mapping/wgs84.htm,EPSG,2000-03-07 00:00:00,99.74  99.96  99.98  2000.04,1,0
-2049,Hartebeesthoek94 / Lo21,1457,projected,6503,,4148,17521,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",,Directorate of Surveys and Mapping; http://w3sli.wcape.gov.za/surveys/mapping/wgs84.htm,EPSG,2000-03-07 00:00:00,99.74  99.96  99.98  2000.04,1,0
-2050,Hartebeesthoek94 / Lo23,1458,projected,6503,,4148,17523,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",,Directorate of Surveys and Mapping; http://w3sli.wcape.gov.za/surveys/mapping/wgs84.htm,EPSG,2000-03-07 00:00:00,99.74  99.96  99.98  2000.04,1,0
-2051,Hartebeesthoek94 / Lo25,1459,projected,6503,,4148,17525,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",,Directorate of Surveys and Mapping; http://w3sli.wcape.gov.za/surveys/mapping/wgs84.htm,EPSG,2000-03-07 00:00:00,99.74  99.96  99.98  2000.04,1,0
-2052,Hartebeesthoek94 / Lo27,1460,projected,6503,,4148,17527,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",,Directorate of Surveys and Mapping; http://w3sli.wcape.gov.za/surveys/mapping/wgs84.htm,EPSG,2000-03-07 00:00:00,99.74  99.96  99.98  2000.04,1,0
-2053,Hartebeesthoek94 / Lo29,1461,projected,6503,,4148,17529,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",,Directorate of Surveys and Mapping; http://w3sli.wcape.gov.za/surveys/mapping/wgs84.htm,EPSG,2000-03-07 00:00:00,99.74  99.96  99.98  2000.04,1,0
-2054,Hartebeesthoek94 / Lo31,1462,projected,6503,,4148,17531,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",,Directorate of Surveys and Mapping; http://w3sli.wcape.gov.za/surveys/mapping/wgs84.htm,EPSG,2000-03-07 00:00:00,99.74  99.96  99.98  2000.04,1,0
-2055,Hartebeesthoek94 / Lo33,1463,projected,6503,,4148,17533,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",,Directorate of Surveys and Mapping; http://w3sli.wcape.gov.za/surveys/mapping/wgs84.htm,EPSG,2000-03-07 00:00:00,99.74  99.96  99.98  2000.04,1,0
-2056,CH1903+ / LV95,1286,projected,4498,,4150,19950,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Supersedes CH1903/LV03 (code 21781).,,EPSG,2000-03-07 00:00:00,99.74,1,0
-2057,Rassadiran / Nakhl e Taqi,1338,projected,4400,,4153,19951,,,Engineering survey for terminal site only.,,Total-Fina,EPSG,2000-03-07 00:00:00,99.74,1,0
-2058,ED50(ED77) / UTM zone 38N,1464,projected,4400,,4154,16038,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,99.74,1,0
-2059,ED50(ED77) / UTM zone 39N,1465,projected,4400,,4154,16039,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,99.74,1,0
-2060,ED50(ED77) / UTM zone 40N,1466,projected,4400,,4154,16040,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,99.74,1,0
-2061,ED50(ED77) / UTM zone 41N,1467,projected,4400,,4154,16041,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,99.74,1,0
-2062,Madrid 1870 (Madrid) / Spain,1217,projected,4499,,4903,19921,,,Large and medium scale topographic mapping and engineering survey.,Superseded by ED50 / UTM after 1966.,,EPSG,2000-03-07 00:00:00,99.74,1,0
-2063,Dabola 1981 / UTM zone 28N,1468,projected,4400,,4315,16028,,,Large and medium scale topographic mapping and engineering survey.,Supersedes Conakry 1905 / UTM zone 28 (EPSG code 31528).,,EPSG,1999-12-09 00:00:00,,1,0
-2064,Dabola 1981 / UTM zone 29N,1469,projected,4400,,4315,16029,,,Large and medium scale topographic mapping and engineering survey.,Supersedes Conakry 1905 / UTM zone 29 (EPSG code 31529).,,EPSG,1999-12-09 00:00:00,,1,0
-2065,S-JTSK (Ferro) / Krovak,1306,projected,6501,,4818,19952,,,Large and medium scale topographic mapping and engineering survey.,,Research Institute for Geodesy Topography and Cartography (VUGTK); Prague.,EPSG,2000-03-07 00:00:00,,1,0
-2066,Mount Dillon / Tobago Grid,1322,projected,4407,,4157,19924,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,,1,0
-2067,Naparima 1955 / UTM zone 20N,1339,projected,4400,,4158,16020,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,,1,0
-2068,ELD79 / Libya zone 5,1470,projected,4499,,4159,18240,,,Large and medium scale topographic mapping and engineering survey.,,Brown and Root,EPSG,2000-03-07 00:00:00,,1,0
-2069,ELD79 / Libya zone 6,1471,projected,4499,,4159,18241,,,Large and medium scale topographic mapping and engineering survey.,,Brown and Root,EPSG,2000-03-07 00:00:00,,1,0
-2070,ELD79 / Libya zone 7,1472,projected,4499,,4159,18242,,,Large and medium scale topographic mapping and engineering survey.,,Brown and Root,EPSG,2000-03-07 00:00:00,,1,0
-2071,ELD79 / Libya zone 8,1473,projected,4499,,4159,18243,,,Large and medium scale topographic mapping and engineering survey.,,Brown and Root,EPSG,2000-03-07 00:00:00,,1,0
-2072,ELD79 / Libya zone 9,1474,projected,4499,,4159,18244,,,Large and medium scale topographic mapping and engineering survey.,,Brown and Root,EPSG,2000-03-07 00:00:00,,1,0
-2073,ELD79 / Libya zone 10,1475,projected,4499,,4159,18245,,,Large and medium scale topographic mapping and engineering survey.,,Brown and Root,EPSG,2000-03-07 00:00:00,,1,0
-2074,ELD79 / Libya zone 11,1476,projected,4499,,4159,18246,,,Large and medium scale topographic mapping and engineering survey.,,Brown and Root,EPSG,2000-03-07 00:00:00,,1,0
-2075,ELD79 / Libya zone 12,1477,projected,4499,,4159,18247,,,Large and medium scale topographic mapping and engineering survey.,,Brown and Root,EPSG,2000-03-07 00:00:00,,1,0
-2076,ELD79 / Libya zone 13,1478,projected,4499,,4159,18248,,,Large and medium scale topographic mapping and engineering survey.,,Brown and Root,EPSG,2000-03-07 00:00:00,,1,0
-2077,ELD79 / UTM zone 32N,1479,projected,4400,,4159,16032,,,Large and medium scale topographic mapping and engineering survey.,,Brown and Root,EPSG,2000-03-07 00:00:00,,1,0
-2078,ELD79 / UTM zone 33N,1480,projected,4400,,4159,16033,,,Large and medium scale topographic mapping and engineering survey.,,Brown and Root,EPSG,2000-03-07 00:00:00,,1,0
-2079,ELD79 / UTM zone 34N,1481,projected,4400,,4159,16034,,,Large and medium scale topographic mapping and engineering survey.,,Brown and Root,EPSG,2000-03-07 00:00:00,,1,0
-2080,ELD79 / UTM zone 35N,1478,projected,4400,,4159,16035,,,Large and medium scale topographic mapping and engineering survey.,,Brown and Root,EPSG,2000-03-07 00:00:00,,1,0
-2081,Chos Malal 1914 / Argentina zone 2,1483,projected,4530,,4160,18032,,,Oil exploration.,,Various oil industry records,EPSG,2002-06-22 00:00:00,2002.36,1,0
-2082,Pampa del Castillo / Argentina zone 2,1484,projected,4530,,4161,18032,,,Oil exploration.,,Various oil industry records,EPSG,2002-06-22 00:00:00,2002.36,1,0
-2083,Hito XVIII 1963 / Argentina zone 2,1485,projected,4530,,4254,18032,,,Large and medium scale topographic mapping and engineering survey.,,Total-Fina,EPSG,2002-06-22 00:00:00,2002.36,1,0
-2084,Hito XVIII 1963 / UTM zone 19S,1486,projected,4400,,4254,16119,,,Large and medium scale topographic mapping and engineering survey.,,Total-Fina,EPSG,2000-03-07 00:00:00,,1,0
-2085,NAD27 / Cuba Norte,1487,projected,4532,,4267,18061,,,Large and medium scale topographic mapping and engineering survey.,,Institut Cubano di Hidrografia (ICH),EPSG,2000-03-07 00:00:00,,1,0
-2086,NAD27 / Cuba Sur,1488,projected,4532,,4267,18062,,,Large and medium scale topographic mapping and engineering survey.,,Institut Cubano di Hidrografia (ICH),EPSG,2000-03-07 00:00:00,,1,0
-2087,ELD79 / TM 12 NE,1482,projected,4400,,4159,16412,,,Oil exploration.,,Total-Fina,EPSG,2000-03-07 00:00:00,,1,0
-2088,Carthage / TM 11 NE,1489,projected,4400,,4223,16411,,,Oil exploration by Total.,,Total-Fina,EPSG,2000-03-07 00:00:00,,1,0
-2089,Yemen NGN96 / UTM zone 38N,1490,projected,4400,,4163,16038,,,Large and medium scale topographic mapping and engineering survey.,,IGN Paris,EPSG,2000-03-07 00:00:00,,1,0
-2090,Yemen NGN96 / UTM zone 39N,1491,projected,4400,,4163,16039,,,Large and medium scale topographic mapping and engineering survey.,,IGN Paris,EPSG,2000-03-07 00:00:00,,1,0
-2091,South Yemen / Gauss Kruger zone 8,1492,projected,4530,,4164,16208,,,Large and medium scale topographic mapping and engineering survey.,,IGN Paris,EPSG,2000-03-07 00:00:00,,1,1
-2092,South Yemen / Gauss Kruger zone 9,1493,projected,4530,,4164,16209,,,Large and medium scale topographic mapping and engineering survey.,,IGN Paris,EPSG,2000-03-07 00:00:00,,1,1
-2093,Hanoi 1972 / GK 106 NE,1494,projected,4530,,4147,16586,,,Used for cadastral and large scale topographic mapping.,,BP Amoco,EPSG,2000-03-07 00:00:00,,1,0
-2094,WGS 72BE / TM 106 NE,1495,projected,4400,,4324,16506,,,Oil exploration by Total for blocks 10 and 11-1.,,Total-Fina,EPSG,2000-03-07 00:00:00,,1,0
-2095,Bissau / UTM zone 28N,1113,projected,4400,,4165,16028,,,Large and medium scale topographic mapping and engineering survey.,,US National Imagery and Mapping Agency TR8350.2.,EPSG,2000-03-07 00:00:00,,1,0
-2096,Korean 1985 / Korea East Belt,1496,projected,4530,,4162,18251,,,Large and medium scale topographic mapping and engineering survey.,,Clifford J. Mugnier; in Photogrammetric Engineering & Remote Sensing November 1999. http://www.asprs.org/resources.html,EPSG,2000-03-07 00:00:00,2001.28,1,0
-2097,Korean 1985 / Korea Central Belt,1497,projected,4530,,4162,18252,,,Large and medium scale topographic mapping and engineering survey.,,Clifford J. Mugnier; in Photogrammetric Engineering & Remote Sensing November 1999. http://www.asprs.org/resources.html,EPSG,2000-03-07 00:00:00,2001.28,1,0
-2098,Korean 1985 / Korea West Belt,1498,projected,4530,,4162,18253,,,Large and medium scale topographic mapping and engineering survey.,,Clifford J. Mugnier; in Photogrammetric Engineering & Remote Sensing November 1999. http://www.asprs.org/resources.html,EPSG,2000-03-07 00:00:00,2001.28,1,0
-2099,Qatar 1948 / Qatar Grid,1346,projected,4400,,4286,19953,,,Large and medium scale topographic mapping and engineering survey.,Also known as Qatar Plane Coordinate or QPC system.  Superseded by Qatar National Grid (code 28600).,,EPSG,2000-03-07 00:00:00,,1,0
-2202,REGVEN / UTM zone 19N,1694,projected,4400,,4189,16019,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2001-11-06 00:00:00,,1,0
-2203,REGVEN / UTM zone 20N,1695,projected,4400,,4189,16020,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2001-11-06 00:00:00,,1,0
-2204,NAD27 / Tennessee,1411,projected,4497,,4267,15302,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2001-11-06 00:00:00,2001.45,1,0
-2205,NAD83 / Kentucky North,2202,projected,4499,,4269,15303,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2246 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,2001-11-06 00:00:00,2001.45,1,0
-2206,ED50 / 3-degree Gauss-Kruger zone 9,1524,projected,4530,,4230,16269,,,Large scale topographic mapping and cadastral survey.,Also found with truncated false easting - see ED50 / TM27 (code 2319).,EPSG,EPSG,2001-11-06 00:00:00,,1,0
-2207,ED50 / 3-degree Gauss-Kruger zone 10,1525,projected,4530,,4230,16270,,,Large scale topographic mapping and cadastral survey.,Also found with truncated false easting - see ED50 / TM30 (code 2320).,EPSG,EPSG,2001-11-06 00:00:00,,1,0
-2208,ED50 / 3-degree Gauss-Kruger zone 11,1526,projected,4530,,4230,16271,,,Large scale topographic mapping and cadastral survey.,Also found with truncated false easting - see ED50 / TM33 (code 2321).,EPSG,EPSG,2001-11-06 00:00:00,,1,0
-2209,ED50 / 3-degree Gauss-Kruger zone 12,1527,projected,4530,,4230,16272,,,Large scale topographic mapping and cadastral survey.,Also found with truncated false easting - see ED50 / TM36 (code 2322).,EPSG,EPSG,2001-11-06 00:00:00,,1,0
-2210,ED50 / 3-degree Gauss-Kruger zone 13,1528,projected,4530,,4230,16273,,,Large scale topographic mapping and cadastral survey.,Also found with truncated false easting - see ED50 / TM39 (code 2323).,EPSG,EPSG,2001-11-06 00:00:00,,1,0
-2211,ED50 / 3-degree Gauss-Kruger zone 14,1529,projected,4530,,4230,16274,,,Large scale topographic mapping and cadastral survey.,Also found with truncated false easting - see ED50 / TM42 (code 2324).,EPSG,EPSG,2001-11-06 00:00:00,,1,0
-2212,ED50 / 3-degree Gauss-Kruger zone 15,1530,projected,4530,,4230,16275,,,Large scale topographic mapping and cadastral survey.,Also found with truncated false easting - see ED50 / TM45 (code 2325).,EPSG,EPSG,2001-11-06 00:00:00,,1,0
-2213,ETRS89 / TM 30 NE,2546,projected,4400,,4258,16430,,,Oil industry usage.,,,EPSG,2001-11-06 00:00:00,,1,0
-2214,Douala 1948 / AOF west,1060,projected,4400,,4192,18415,,,Medium and small scale topographic mapping and engineering survey.,Superseded by Manoca 1962 / UTM zone 32N (code 2215).,,EPSG,2002-01-18 00:00:00,,1,0
-2215,Manoca 1962 / UTM zone 32N,1060,projected,4400,,4193,16032,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2002-01-18 00:00:00,,1,0
-2216,Qornoq 1927 / UTM zone 22N,2573,projected,4400,,4194,16022,,,Topographic mapping.,,"Kort & Matrikelstyrelsen, Copenhagen.",EPSG,2002-01-18 00:00:00,,1,0
-2217,Qornoq 1927 / UTM zone 23N,2572,projected,4400,,4194,16023,,,Topographic mapping.,,"Kort & Matrikelstyrelsen, Copenhagen.",EPSG,2002-01-18 00:00:00,,1,0
-2218,Scoresbysund 1952 / Greenland zone 5 east,2560,projected,4501,,4195,18425,,,Topographic mapping.,Coordinate system second axis has abbreviation E but is positive to the west.,"Kort & Matrikelstyrelsen, Copenhagen.",EPSG,2002-01-26 00:00:00,,1,0
-2219,ATS77 / UTM zone 19N,1531,projected,4400,,4122,16019,,,Large and medium scale topographic mapping and engineering survey.,In use from 1979.  To be phased out in late 1990's.,New Brunswick Geographic Information Corporation land and water information standards manual.,EPSG,1997-07-22 00:00:00,,1,0
-2220,ATS77 / UTM zone 20N,1532,projected,4400,,4122,16020,,,Large and medium scale topographic mapping and engineering survey.,In use from 1979.  To be phased out in late 1990's.,New Brunswick Geographic Information Corporation land and water information standards manual.,EPSG,1997-07-22 00:00:00,,1,0
-2221,Scoresbysund 1952 / Greenland zone 6 east,2561,projected,4501,,4195,18426,,,Topographic mapping.,Coordinate system second axis has abbreviation E but is positive to the west.,"Kort & Matrikelstyrelsen, Copenhagen.",EPSG,2002-01-26 00:00:00,,1,0
-2222,NAD83 / Arizona East (ft),2167,projected,4495,,4269,15304,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in International feet (note: not US survey feet).  Federal definition is metric - see code 26948. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2223,NAD83 / Arizona Central (ft),2166,projected,4495,,4269,15305,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in International feet (note: not US survey feet).  Federal definition is metric - see code 26949. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2224,NAD83 / Arizona West (ft),2168,projected,4495,,4269,15306,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in International feet (note: not US survey feet).  Federal definition is metric - see code 26950. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2225,NAD83 / California zone 1 (ftUS),2175,projected,4497,,4269,15307,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 26941. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2226,NAD83 / California zone 2 (ftUS),2176,projected,4497,,4269,15308,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 26942. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2227,NAD83 / California zone 3 (ftUS),2177,projected,4497,,4269,15309,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 26943. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2228,NAD83 / California zone 4 (ftUS),2178,projected,4497,,4269,15310,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 26944. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2229,NAD83 / California zone 5 (ftUS),2182,projected,4497,,4269,15311,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 26945. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2230,NAD83 / California zone 6 (ftUS),2180,projected,4497,,4269,15312,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 26946. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2231,NAD83 / Colorado North (ftUS),2184,projected,4497,,4269,15313,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 26953. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2232,NAD83 / Colorado Central (ftUS),2183,projected,4497,,4269,15314,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 26954. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2233,NAD83 / Colorado South (ftUS),2185,projected,4497,,4269,15315,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 26955. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2234,NAD83 / Connecticut (ftUS),1377,projected,4497,,4269,15316,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 26956. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2235,NAD83 / Delaware (ftUS),1378,projected,4497,,4269,15317,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 26957. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2236,NAD83 / Florida East (ftUS),2186,projected,4497,,4269,15318,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 26958. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2237,NAD83 / Florida West (ftUS),2188,projected,4497,,4269,15319,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 26959. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2238,NAD83 / Florida North (ftUS),2187,projected,4497,,4269,15320,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 26960. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2239,NAD83 / Georgia East (ftUS),2189,projected,4497,,4269,15321,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 26966. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2240,NAD83 / Georgia West (ftUS),2190,projected,4497,,4269,15322,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 26967. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2241,NAD83 / Idaho East (ftUS),2192,projected,4497,,4269,15323,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 26968. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2242,NAD83 / Idaho Central (ftUS),2191,projected,4497,,4269,15324,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 26969. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2243,NAD83 / Idaho West (ftUS),2193,projected,4497,,4269,15325,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 26970. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2244,NAD83 / Indiana East (ftUS),2196,projected,4497,,4269,15326,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 26973. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2245,NAD83 / Indiana West (ftUS),2197,projected,4497,,4269,15327,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 26974. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2246,NAD83 / Kentucky North (ftUS),2202,projected,4497,,4269,15328,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 2205. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2247,NAD83 / Kentucky South (ftUS),2203,projected,4497,,4269,15329,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 26980. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2248,NAD83 / Maryland (ftUS),1389,projected,4497,,4269,15330,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 26985. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2249,NAD83 / Massachusetts Mainland (ftUS),2209,projected,4497,,4269,15331,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 26986. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2250,NAD83 / Massachusetts Island (ftUS),2208,projected,4497,,4269,15332,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 26987. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2251,NAD83 / Michigan North (ft),1723,projected,4495,,4269,15333,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in International feet (note: not US survey feet).  Federal definition is metric - see code 26988. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2252,NAD83 / Michigan Central (ft),1724,projected,4495,,4269,15334,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in International feet (note: not US survey feet).  Federal definition is metric - see code 26989. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2253,NAD83 / Michigan South (ft),1725,projected,4495,,4269,15335,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in International feet (note: not US survey feet).  Federal definition is metric - see code 26990. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2254,NAD83 / Mississippi East (ftUS),2216,projected,4497,,4269,15336,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 26994. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2255,NAD83 / Mississippi West (ftUS),2217,projected,4497,,4269,15337,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 26995. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2256,NAD83 / Montana (ft),1395,projected,4495,,4269,15338,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in International feet (note: not US survey feet).  Federal definition is metric - see code 32100. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2257,NAD83 / New Mexico East (ftUS),2228,projected,4497,,4269,15339,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 32112. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2258,NAD83 / New Mexico Central (ftUS),2231,projected,4497,,4269,15340,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 32113. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2259,NAD83 / New Mexico West (ftUS),2232,projected,4497,,4269,15341,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 32114. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2260,NAD83 / New York East (ftUS),2234,projected,4497,,4269,15342,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 32115. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2261,NAD83 / New York Central (ftUS),2233,projected,4497,,4269,15343,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 32116. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2262,NAD83 / New York West (ftUS),2236,projected,4497,,4269,15344,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 32117. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2263,NAD83 / New York Long Island (ftUS),2235,projected,4497,,4269,15345,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 32118. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2264,NAD83 / North Carolina (ftUS),1402,projected,4497,,4269,15346,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 32119.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2265,NAD83 / North Dakota North (ft),2237,projected,4495,,4269,15347,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in International feet (note: not US survey feet).  Federal definition is metric - see code 32120. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2266,NAD83 / North Dakota South (ft),2238,projected,4495,,4269,15348,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in International feet (note: not US survey feet).  Federal definition is metric - see code 32121. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2267,NAD83 / Oklahoma North (ftUS),2241,projected,4497,,4269,15349,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 32124. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2268,NAD83 / Oklahoma South (ftUS),2242,projected,4497,,4269,15350,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 32125. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2269,NAD83 / Oregon North (ft),2243,projected,4495,,4269,15351,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in International feet (note: not US survey feet).  Federal definition is metric - see code 32126. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2270,NAD83 / Oregon South (ft),2244,projected,4495,,4269,15352,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in International feet (note: not US survey feet).  Federal definition is metric - see code 32127. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2271,NAD83 / Pennsylvania North (ftUS),2245,projected,4497,,4269,15353,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 32128.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2272,NAD83 / Pennsylvania South (ftUS),2246,projected,4497,,4269,15354,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 32129.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2273,NAD83 / South Carolina (ft),1409,projected,4495,,4269,15355,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 32133.,National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2274,NAD83 / Tennessee (ftUS),1411,projected,4497,,4269,15356,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 32136. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2275,NAD83 / Texas North (ftUS),2253,projected,4497,,4269,15357,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 32137. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2276,NAD83 / Texas North Central (ftUS),2254,projected,4497,,4269,15358,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 32138. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2277,NAD83 / Texas Central (ftUS),2252,projected,4497,,4269,15359,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 32139. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2278,NAD83 / Texas South Central (ftUS),2527,projected,4497,,4269,15360,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 32140. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2279,NAD83 / Texas South (ftUS),2528,projected,4497,,4269,15361,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 32141. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2280,NAD83 / Utah North (ft),2258,projected,4495,,4269,15362,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in International feet (note: not US survey feet).  Federal definition is metric - see code 32142. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2281,NAD83 / Utah Central (ft),2257,projected,4495,,4269,15363,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in International feet (note: not US survey feet).  Federal definition is metric - see code 32143. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2282,NAD83 / Utah South (ft),2259,projected,4495,,4269,15364,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in International feet (note: not US survey feet).  Federal definition is metric - see code 32144. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2283,NAD83 / Virginia North (ftUS),2260,projected,4497,,4269,15365,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 32146. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2284,NAD83 / Virginia South (ftUS),2261,projected,4497,,4269,15366,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 32147. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2285,NAD83 / Washington North (ftUS),2273,projected,4497,,4269,15367,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 32148. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2286,NAD83 / Washington South (ftUS),2274,projected,4497,,4269,15368,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 32149. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2287,NAD83 / Wisconsin North (ftUS),2267,projected,4497,,4269,15369,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 32152. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2288,NAD83 / Wisconsin Central (ftUS),2266,projected,4497,,4269,15370,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 32153. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2289,NAD83 / Wisconsin South (ftUS),2268,projected,4497,,4269,15371,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  Federal definition is metric - see code 32154. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",National Geodetic Survey  http://www.ngs.noaa.gov/INFO/Policy/st_plane.html,EPSG,2001-11-06 00:00:00,,1,0
-2290,ATS77 / Prince Edward Isl. Stereographic (ATS77),1533,projected,4496,,4122,19933,,,Large and medium scale topographic mapping and engineering survey.,In use from 1979.  To be phased out in late 1990's.,Geomatics Centre; Nova Scotia Ministry of Housing and Municipal Affairs.,EPSG,1997-11-13 00:00:00,,1,0
-2291,NAD83(CSRS98) / Prince Edward Isl. Stereographic (NAD83),1533,projected,4496,,4122,19960,,,Large and medium scale topographic mapping and engineering survey.,Deprecated due to error in source geogCRS.,PEI Department of Transportation & Public Works,EPSG,2000-10-19 00:00:00,,1,1
-2292,NAD83(CSRS98) / Prince Edward Isl. Stereographic (NAD83),1533,projected,4496,,4140,19960,,,Large and medium scale topographic mapping and engineering survey.,,PEI Department of Transportation & Public Works,EPSG,2001-08-28 00:00:00,,1,1
-2294,ATS77 / MTM Nova Scotia zone 4,1534,projected,4400,,4122,17794,,,Large and medium scale topographic mapping and engineering survey.,In use from 1979.  To be phased out in late 1990's.,Geomatics Centre; Nova Scotia Ministry of Housing and Municipal Affairs.,EPSG,1997-11-13 00:00:00,,1,0
-2295,ATS77 / MTM Nova Scotia zone 5,1535,projected,4400,,4122,17795,,,Large and medium scale topographic mapping and engineering survey.,In use from 1979.  To be phased out in late 1990's.,Geomatics Centre; Nova Scotia Ministry of Housing and Municipal Affairs.,EPSG,1997-11-13 00:00:00,,1,0
-2296,Ammassalik 1958 / Greenland zone 7 east,2562,projected,4501,,4196,18427,,,Topographic mapping.,Coordinate system second axis has abbreviation E but is positive to the west.,"Kort & Matrikelstyrelsen, Copenhagen.",EPSG,2002-01-26 00:00:00,,1,0
-2297,Qornoq 1927 / Greenland zone 1 east,2556,projected,4501,,4194,18421,,,Topographic mapping.,Coordinate system second axis has abbreviation E but is positive to the west.,"Kort & Matrikelstyrelsen, Copenhagen.",EPSG,2002-01-26 00:00:00,,1,0
-2298,Qornoq 1927 / Greenland zone 2 east,2557,projected,4501,,4194,18422,,,Topographic mapping.,Coordinate system second axis has abbreviation E but is positive to the west.,"Kort & Matrikelstyrelsen, Copenhagen.",EPSG,2002-01-26 00:00:00,,1,0
-2299,Qornoq 1927 / Greenland zone 2 west,2563,projected,4501,,4194,18432,,,Topographic mapping.,Coordinate system second axis has abbreviation E but is positive to the west.,"Kort & Matrikelstyrelsen, Copenhagen.",EPSG,2002-01-26 00:00:00,,1,0
-2300,Qornoq 1927 / Greenland zone 3 east,2558,projected,4501,,4194,18423,,,Topographic mapping.,Coordinate system second axis has abbreviation E but is positive to the west.,"Kort & Matrikelstyrelsen, Copenhagen.",EPSG,2002-01-26 00:00:00,,1,0
-2301,Qornoq 1927 / Greenland zone 3 west,2564,projected,4501,,4194,18433,,,Topographic mapping.,Coordinate system second axis has abbreviation E but is positive to the west.,"Kort & Matrikelstyrelsen, Copenhagen.",EPSG,2002-01-26 00:00:00,,1,0
-2302,Qornoq 1927 / Greenland zone 4 east,2559,projected,4501,,4194,18424,,,Topographic mapping.,Coordinate system second axis has abbreviation E but is positive to the west.,"Kort & Matrikelstyrelsen, Copenhagen.",EPSG,2002-01-26 00:00:00,,1,0
-2303,Qornoq 1927 / Greenland zone 4 west,2565,projected,4501,,4194,18434,,,Topographic mapping.,Coordinate system second axis has abbreviation E but is positive to the west.,"Kort & Matrikelstyrelsen, Copenhagen.",EPSG,2002-01-26 00:00:00,,1,0
-2304,Qornoq 1927 / Greenland zone 5 west,2566,projected,4501,,4194,18435,,,Topographic mapping.,Coordinate system second axis has abbreviation E but is positive to the west.,"Kort & Matrikelstyrelsen, Copenhagen.",EPSG,2002-01-26 00:00:00,,1,0
-2305,Qornoq 1927 / Greenland zone 6 west,2567,projected,4501,,4194,18436,,,Topographic mapping.,Coordinate system second axis has abbreviation E but is positive to the west.,"Kort & Matrikelstyrelsen, Copenhagen.",EPSG,2002-01-26 00:00:00,,1,0
-2306,Qornoq 1927 / Greenland zone 7 west,2568,projected,4501,,4194,18437,,,Topographic mapping.,Coordinate system second axis has abbreviation E but is positive to the west.,"Kort & Matrikelstyrelsen, Copenhagen.",EPSG,2002-01-26 00:00:00,,1,0
-2307,Qornoq 1927 / Greenland zone 8 east,2569,projected,4501,,4194,18428,,,Topographic mapping.,Coordinate system second axis has abbreviation E but is positive to the west.,"Kort & Matrikelstyrelsen, Copenhagen.",EPSG,2002-01-26 00:00:00,,1,0
-2308,Batavia / TM 109 SE,2577,projected,4400,,4211,16709,,,Used by Arco and BP for ONWJ.,,BP Indonesia.,EPSG,2002-02-12 00:00:00,,1,0
-2309,WGS 84 / TM 116 SE,2588,projected,4400,,4326,16716,,,Used by BP for Terang-Sirasun.,,BP Indonesia.,EPSG,2002-06-22 00:00:00,2002.151,1,0
-2310,WGS 84 / TM 132 SE,2589,projected,4400,,4326,16732,,,Used for hydrocarbons exploration and development.,,BP Indonesia.,EPSG,2002-06-22 00:00:00,2002.151,1,0
-2311,WGS 84 / TM 6 NE,1717,projected,4400,,4326,16406,,,Used for oil exploration by ExxonMobil.,,ExxonMobil.,EPSG,2002-02-12 00:00:00,,1,0
-2312,Garoua / UTM zone 33N,2590,projected,4400,,4197,16033,,,Large and medium scale topographic mapping and engineering survey.,,TotalFinaElf,EPSG,2002-02-12 00:00:00,,1,0
-2313,Kousseri / UTM zone 33N,2591,projected,4400,,4198,16033,,,Large and medium scale topographic mapping and engineering survey.,,TotalFinaElf,EPSG,2002-02-12 00:00:00,,1,0
-2314,Trinidad 1903 / Trinidad Grid (ftCla),1322,projected,4403,,4302,19975,,,Oil industry exploration and production.,Foot version of Trinidad 1903 / Trinidad Grid (code 30200) used by some US-based companies including Amoco Trinidad.,BP,EPSG,2002-02-12 00:00:00,,1,0
-2315,Campo Inchauspe / UTM zone 19S,2596,projected,4400,,4221,16119,,,Oil industry exploration.,,TotalFinaElf,EPSG,2002-02-12 00:00:00,,1,0
-2316,Campo Inchauspe / UTM zone 20S,2597,projected,4400,,4221,16120,,,Oil industry exploration.,,TotalFinaElf,EPSG,2002-02-12 00:00:00,,1,0
-2317,PSAD56 / ICN Regional,1251,projected,4499,,4248,19976,,,Small scale topographic and geological mapping.,,Institute Cartografica Nacional,EPSG,2002-02-12 00:00:00,,1,0
-2318,Ain el Abd / Aramco Lambert,1206,projected,4400,,4204,19977,,,Oil industry exploration and production.,Used by Saudi Aramco when area of interest crosses UTM zone boundary. Adopted by partners for Core Venture 1 (South Ghawar) area.,Saudi Aramco,EPSG,2002-02-12 00:00:00,,1,0
-2319,ED50 / TM27,1524,projected,4530,,4230,16369,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with zone number prefix to false easting - see ED50 / 3-degree Gauss-Kruger zone 9 (code 2206).,General Command of Mapping via EuroGeographics; http://crs.ifag.de/,EPSG,2002-06-22 00:00:00,,1,0
-2320,ED50 / TM30,1525,projected,4530,,4230,16370,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with zone number prefix to false easting - see ED50 / 3-degree Gauss-Kruger zone 10 (code 2207).,General Command of Mapping via EuroGeographics; http://crs.ifag.de/,EPSG,2002-06-22 00:00:00,,1,0
-2321,ED50 / TM33,1526,projected,4530,,4230,16371,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with zone number prefix to false easting - see ED50 / 3-degree Gauss-Kruger zone 11 (code 2208).,General Command of Mapping via EuroGeographics; http://crs.ifag.de/,EPSG,2002-06-22 00:00:00,,1,0
-2322,ED50 / TM36,1527,projected,4530,,4230,16372,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with zone number prefix to false easting - see ED50 / 3-degree Gauss-Kruger zone 12 (code 2209).,General Command of Mapping via EuroGeographics; http://crs.ifag.de/,EPSG,2002-06-22 00:00:00,,1,0
-2323,ED50 / TM39,1528,projected,4530,,4230,16373,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with zone number prefix to false easting - see ED50 / 3-degree Gauss-Kruger zone 13 (code 2210).,General Command of Mapping via EuroGeographics; http://crs.ifag.de/,EPSG,2002-06-22 00:00:00,,1,0
-2324,ED50 / TM42,1529,projected,4530,,4230,16374,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with zone number prefix to false easting - see ED50 / 3-degree Gauss-Kruger zone 14 (code 2211).,General Command of Mapping via EuroGeographics; http://crs.ifag.de/,EPSG,2002-06-22 00:00:00,,1,0
-2325,ED50 / TM45,1530,projected,4530,,4230,16375,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with zone number prefix to false easting - see ED50 / 3-degree Gauss-Kruger zone 15 (code 2212).,General Command of Mapping via EuroGeographics; http://crs.ifag.de/,EPSG,2002-06-22 00:00:00,,1,0
-2326,Hong Kong 1980 Grid System,1118,projected,4500,,4611,19978,,,"Large scale topographic mapping, cadastral and engineering survey.",Supersedes Hong Kong 1963 Grid system and its 1976 metric variant.,"Survey and Mapping Office, Lands Department. Http://www.info.gov.hk/landsd/mapping/tindex.htm",EPSG,2002-06-22 00:00:00,,1,0
-2327,Xian 1980 / Gauss-Kruger zone 13,1587,projected,4530,,4610,16213,,,Medium scale topographic mapping.,Also found with truncated false easting - see Xian 1980 / [6-degree] Gauss-Kruger CM 75E (code 2338).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2328,Xian 1980 / Gauss-Kruger zone 14,1588,projected,4530,,4610,16214,,,Medium scale topographic mapping.,Also found with truncated false easting - see Xian 1980 / [6-degree] Gauss-Kruger CM 81E (code 2339).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2329,Xian 1980 / Gauss-Kruger zone 15,1589,projected,4530,,4610,16215,,,Medium scale topographic mapping.,Also found with truncated false easting - see Xian 1980 / [6-degree] Gauss-Kruger CM 87E (code 2340).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2330,Xian 1980 / Gauss-Kruger zone 16,1590,projected,4530,,4610,16216,,,Medium scale topographic mapping.,Also found with truncated false easting - see Xian 1980 / [6-degree] Gauss-Kruger CM 93E (code 2341).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2331,Xian 1980 / Gauss-Kruger zone 17,1591,projected,4530,,4610,16217,,,Medium scale topographic mapping.,Also found with truncated false easting - see Xian 1980 / [6-degree] Gauss-Kruger CM 99E (code 2342).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2332,Xian 1980 / Gauss-Kruger zone 18,1592,projected,4530,,4610,16218,,,Medium scale topographic mapping.,Also found with truncated false easting - see Xian 1980 / [6-degree] Gauss-Kruger CM 105E (code 2343).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2333,Xian 1980 / Gauss-Kruger zone 19,1593,projected,4530,,4610,16219,,,Medium scale topographic mapping.,Also found with truncated false easting - see Xian 1980 / [6-degree] Gauss-Kruger CM 111E (code 2344).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2334,Xian 1980 / Gauss-Kruger zone 20,1594,projected,4530,,4610,16220,,,Medium scale topographic mapping.,Also found with truncated false easting - see Xian 1980 / [6-degree] Gauss-Kruger CM 117E (code 2345).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2335,Xian 1980 / Gauss-Kruger zone 21,1595,projected,4530,,4610,16221,,,Medium scale topographic mapping.,Also found with truncated false easting - see Xian 1980 / [6-degree] Gauss-Kruger CM 123E (code 2346).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2336,Xian 1980 / Gauss-Kruger zone 22,1596,projected,4530,,4610,16222,,,Medium scale topographic mapping.,Also found with truncated false easting - see Xian 1980 / [6-degree] Gauss-Kruger CM 129E (code 2347).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2337,Xian 1980 / Gauss-Kruger zone 23,1597,projected,4530,,4610,16223,,,Medium scale topographic mapping.,Also found with truncated false easting - see Xian 1980 / [6-degree] Gauss-Kruger CM 135E (code 2348).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2338,Xian 1980 / Gauss-Kruger CM 75E,1587,projected,4530,,4610,16313,,,Medium scale topographic mapping.,Truncated form of Xian 1980 / [6-degree] Gauss-Kruger zone 13 (code 2327).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2339,Xian 1980 / Gauss-Kruger CM 81E,1588,projected,4530,,4610,16314,,,Medium scale topographic mapping.,Truncated form of Xian 1980 / [6-degree] Gauss-Kruger zone 14 (code 2328).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2340,Xian 1980 / Gauss-Kruger CM 87E,1589,projected,4530,,4610,16315,,,Medium scale topographic mapping.,Truncated form of Xian 1980 / [6-degree] Gauss-Kruger zone 15 (code 2329).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2341,Xian 1980 / Gauss-Kruger CM 93E,1590,projected,4530,,4610,16316,,,Medium scale topographic mapping.,Truncated form of Xian 1980 / [6-degree] Gauss-Kruger zone 16 (code 2330).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2342,Xian 1980 / Gauss-Kruger CM 99E,1591,projected,4530,,4610,16317,,,Medium scale topographic mapping.,Truncated form of Xian 1980 / [6-degree] Gauss-Kruger zone 17 (code 2331).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2343,Xian 1980 / Gauss-Kruger CM 105E,1592,projected,4530,,4610,16318,,,Medium scale topographic mapping.,Truncated form of Xian 1980 / [6-degree] Gauss-Kruger zone 18 (code 2332).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2344,Xian 1980 / Gauss-Kruger CM 111E,1593,projected,4530,,4610,16319,,,Medium scale topographic mapping.,Truncated form of Xian 1980 / [6-degree] Gauss-Kruger zone 19 (code 2333).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2345,Xian 1980 / Gauss-Kruger CM 117E,1594,projected,4530,,4610,16320,,,Medium scale topographic mapping.,Truncated form of Xian 1980 / [6-degree] Gauss-Kruger zone 20 (code 2334).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2346,Xian 1980 / Gauss-Kruger CM 123E,1595,projected,4530,,4610,16321,,,Medium scale topographic mapping.,Truncated form of Xian 1980 / [6-degree] Gauss-Kruger zone 21 (code 2335).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2347,Xian 1980 / Gauss-Kruger CM 129E,1596,projected,4530,,4610,16322,,,Medium scale topographic mapping.,Truncated form of Xian 1980 / [6-degree] Gauss-Kruger zone 22 (code 2336).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2348,Xian 1980 / Gauss-Kruger CM 135E,1597,projected,4530,,4610,16323,,,Medium scale topographic mapping.,Truncated form of Xian 1980 / [6-degree] Gauss-Kruger zone 23 (code 2337).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2349,Xian 1980 / 3-degree Gauss-Kruger zone 25,2711,projected,4530,,4610,16285,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Xian 1980 / 3-degree Gauss-Kruger CM 75E (code 2370).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2350,Xian 1980 / 3-degree Gauss-Kruger zone 26,2712,projected,4530,,4610,16286,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Xian 1980 / 3-degree Gauss-Kruger CM 78E (code 2371).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2351,Xian 1980 / 3-degree Gauss-Kruger zone 27,2713,projected,4530,,4610,16287,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Xian 1980 / 3-degree Gauss-Kruger CM 81E (code 2372).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2352,Xian 1980 / 3-degree Gauss-Kruger zone 28,2714,projected,4530,,4610,16288,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Xian 1980 / 3-degree Gauss-Kruger CM 84E (code 2373).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2353,Xian 1980 / 3-degree Gauss-Kruger zone 29,2715,projected,4530,,4610,16289,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Xian 1980 / 3-degree Gauss-Kruger CM 87E (code 2374).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2354,Xian 1980 / 3-degree Gauss-Kruger zone 30,2716,projected,4530,,4610,16290,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Xian 1980 / 3-degree Gauss-Kruger CM 90E (code 2375).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2355,Xian 1980 / 3-degree Gauss-Kruger zone 31,2717,projected,4530,,4610,16291,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Xian 1980 / 3-degree Gauss-Kruger CM 93E (code 2376).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2356,Xian 1980 / 3-degree Gauss-Kruger zone 32,2718,projected,4530,,4610,16292,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Xian 1980 / 3-degree Gauss-Kruger CM 96E (code 2377).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2357,Xian 1980 / 3-degree Gauss-Kruger zone 33,2719,projected,4530,,4610,16293,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Xian 1980 / 3-degree Gauss-Kruger CM 99E (code 2378).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2358,Xian 1980 / 3-degree Gauss-Kruger zone 34,2720,projected,4530,,4610,16294,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Xian 1980 / 3-degree Gauss-Kruger CM 102E (code 2379).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2359,Xian 1980 / 3-degree Gauss-Kruger zone 35,2721,projected,4530,,4610,16295,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Xian 1980 / 3-degree Gauss-Kruger CM 105E (code 2380).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2360,Xian 1980 / 3-degree Gauss-Kruger zone 36,2722,projected,4530,,4610,16296,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Xian 1980 / 3-degree Gauss-Kruger CM 108E (code 2381).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2361,Xian 1980 / 3-degree Gauss-Kruger zone 37,2723,projected,4530,,4610,16297,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Xian 1980 / 3-degree Gauss-Kruger CM 111E (code 2382).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2362,Xian 1980 / 3-degree Gauss-Kruger zone 38,2724,projected,4530,,4610,16298,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Xian 1980 / 3-degree Gauss-Kruger CM 114E (code 2383).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2363,Xian 1980 / 3-degree Gauss-Kruger zone 39,2725,projected,4530,,4610,16299,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Xian 1980 / 3-degree Gauss-Kruger CM 117E (code 2384).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2364,Xian 1980 / 3-degree Gauss-Kruger zone 40,2726,projected,4530,,4610,16070,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Xian 1980 / 3-degree Gauss-Kruger CM 123E (code 2385).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2365,Xian 1980 / 3-degree Gauss-Kruger zone 41,2727,projected,4530,,4610,16071,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Xian 1980 / 3-degree Gauss-Kruger CM 126E (code 2386).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2366,Xian 1980 / 3-degree Gauss-Kruger zone 42,2728,projected,4530,,4610,16072,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Xian 1980 / 3-degree Gauss-Kruger CM 126E (code 2387).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2367,Xian 1980 / 3-degree Gauss-Kruger zone 43,2729,projected,4530,,4610,16073,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Xian 1980 / 3-degree Gauss-Kruger CM 129E (code 2388).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2368,Xian 1980 / 3-degree Gauss-Kruger zone 44,2730,projected,4530,,4610,16074,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Xian 1980 / 3-degree Gauss-Kruger CM 132E (code 2389).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2369,Xian 1980 / 3-degree Gauss-Kruger zone 45,2731,projected,4530,,4610,16075,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Xian 1980 / 3-degree Gauss-Kruger CM 135E (code 2390).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2370,Xian 1980 / 3-degree Gauss-Kruger CM 75E,2711,projected,4530,,4610,16385,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Xian 1980 / 3-degree Gauss-Kruger zone 25 (code 2349).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2371,Xian 1980 / 3-degree Gauss-Kruger CM 78E,2712,projected,4530,,4610,16386,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Xian 1980 / 3-degree Gauss-Kruger zone 26 (code 2350).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2372,Xian 1980 / 3-degree Gauss-Kruger CM 81E,2713,projected,4530,,4610,16387,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Xian 1980 / 3-degree Gauss-Kruger zone 27 (code 2351).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2373,Xian 1980 / 3-degree Gauss-Kruger CM 84E,2714,projected,4530,,4610,16388,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Xian 1980 / 3-degree Gauss-Kruger zone 28 (code 2352).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2374,Xian 1980 / 3-degree Gauss-Kruger CM 87E,2715,projected,4530,,4610,16389,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Xian 1980 / 3-degree Gauss-Kruger zone 29 (code 2353).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2375,Xian 1980 / 3-degree Gauss-Kruger CM 90E,2716,projected,4530,,4610,16390,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Xian 1980 / 3-degree Gauss-Kruger zone 30 (code 2354).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2376,Xian 1980 / 3-degree Gauss-Kruger CM 93E,2717,projected,4530,,4610,16391,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Xian 1980 / 3-degree Gauss-Kruger zone 31 (code 2355).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2377,Xian 1980 / 3-degree Gauss-Kruger CM 96E,2718,projected,4530,,4610,16392,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Xian 1980 / 3-degree Gauss-Kruger zone 32 (code 2356).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2378,Xian 1980 / 3-degree Gauss-Kruger CM 99E,2719,projected,4530,,4610,16393,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Xian 1980 / 3-degree Gauss-Kruger zone 33 (code 2357).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2379,Xian 1980 / 3-degree Gauss-Kruger CM 102E,2720,projected,4530,,4610,16394,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Xian 1980 / 3-degree Gauss-Kruger zone 34 (code 2358).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2380,Xian 1980 / 3-degree Gauss-Kruger CM 105E,2721,projected,4530,,4610,16395,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Xian 1980 / 3-degree Gauss-Kruger zone 35 (code 2359).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2381,Xian 1980 / 3-degree Gauss-Kruger CM 108E,2722,projected,4530,,4610,16396,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Xian 1980 / 3-degree Gauss-Kruger zone 36 (code 2360).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2382,Xian 1980 / 3-degree Gauss-Kruger CM 111E,2723,projected,4530,,4610,16397,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Xian 1980 / 3-degree Gauss-Kruger zone 37 (code 2361).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2383,Xian 1980 / 3-degree Gauss-Kruger CM 114E,2724,projected,4530,,4610,16398,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Xian 1980 / 3-degree Gauss-Kruger zone 38 (code 2362).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2384,Xian 1980 / 3-degree Gauss-Kruger CM 117E,2725,projected,4530,,4610,16399,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Xian 1980 / 3-degree Gauss-Kruger zone 39 (code 2363).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2385,Xian 1980 / 3-degree Gauss-Kruger CM 120E,2726,projected,4530,,4610,16170,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Xian 1980 / 3-degree Gauss-Kruger zone 40 (code 2364).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2386,Xian 1980 / 3-degree Gauss-Kruger CM 123E,2727,projected,4530,,4610,16171,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Xian 1980 / 3-degree Gauss-Kruger zone 41 (code 2365).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2387,Xian 1980 / 3-degree Gauss-Kruger CM 126E,2728,projected,4530,,4610,16172,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Xian 1980 / 3-degree Gauss-Kruger zone 42 (code 2366).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2388,Xian 1980 / 3-degree Gauss-Kruger CM 129E,2729,projected,4530,,4610,16173,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Xian 1980 / 3-degree Gauss-Kruger zone 43 (code 2367).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2389,Xian 1980 / 3-degree Gauss-Kruger CM 132E,2730,projected,4530,,4610,16174,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Xian 1980 / 3-degree Gauss-Kruger zone 44 (code 2368).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2390,Xian 1980 / 3-degree Gauss-Kruger CM 135E,2731,projected,4530,,4610,16175,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Xian 1980 / 3-degree Gauss-Kruger zone 45 (code 2369).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2391,KKJ / Finland zone 1,1536,projected,4530,,4123,18191,,,Large and medium scale topographic mapping and engineering survey.,,www.nls.fi/maa/papers/kkj.html,EPSG,1997-07-22 00:00:00,,1,0
-2392,KKJ / Finland zone 2,1537,projected,4530,,4123,18192,,,Large and medium scale topographic mapping and engineering survey.,,www.nls.fi/maa/papers/kkj.html,EPSG,1997-07-22 00:00:00,,1,0
-2393,KKJ / Finland Uniform Coordinate System,1538,projected,4530,,4123,18193,,,Large and medium scale topographic mapping and engineering survey.,Known as Uniform Coordinate System when used over all country and also as Basic Coordinate System zone 3 at larger scales.,www.nls.fi/maa/papers/kkj.html,EPSG,1997-07-22 00:00:00,,1,0
-2394,KKJ / Finland zone 4,1539,projected,4530,,4123,18194,,,Large and medium scale topographic mapping and engineering survey.,,www.nls.fi/maa/papers/kkj.html,EPSG,1997-07-22 00:00:00,,1,0
-2395,South Yemen / Gauss-Kruger zone 8,1492,projected,4530,,4164,16208,,,Large and medium scale topographic mapping and engineering survey.,,IGN Paris,EPSG,2002-06-22 00:00:00,,1,0
-2396,South Yemen / Gauss-Kruger zone 9,1493,projected,4530,,4164,16209,,,Large and medium scale topographic mapping and engineering survey.,,IGN Paris,EPSG,2002-06-22 00:00:00,,1,0
-2397,Pulkovo 1942(83) / Gauss-Kruger zone 3,1512,projected,4530,,4178,16263,,,"Large and medium scale topographic mapping and engineering survey, cadastral survey.",In Thuringen superseded by DHDN / Gauss Kruger zone 3.,EuroGeographics; http://crs.ifag.de/,EPSG,2002-06-22 00:00:00,,1,0
-2398,Pulkovo 1942(83) / Gauss-Kruger zone 4,1513,projected,4530,,4178,16264,,,"Large and medium scale topographic mapping and engineering survey, cadastral survey.","In Brandenburg superseded by ETRS89 / UTM zone 33N. 
-In Sachsen and Thuringen superseded by DHDN / Gauss Kruger zone 4.",Bundesamt f�r Kartographie und Geod�sie via EuroGeographics; http://crs.ifag.de/,EPSG,2002-06-22 00:00:00,,1,0
-2399,Pulkovo 1942(83) / Gauss-Kruger zone 5,1512,projected,4530,,4178,16265,,,"Large and medium scale topographic mapping and engineering survey, cadastral survey.","In Brandenburg superseded by ETRS89 / UTM zone 33N. 
-In Sachsen superseded by DHDN / Gauss Kruger zone 5.",Bundesamt f�r Kartographie und Geod�sie via EuroGeographics; http://crs.ifag.de/,EPSG,2002-06-22 00:00:00,,1,0
-2400,RT90 2.5 gon W,1225,projected,4530,,4124,19929,,,Large and medium scale topographic mapping and engineering survey.,,National Land Survey of Sweden,EPSG,1997-11-13 00:00:00,,1,0
-2401,Beijing 1954 / 3-degree Gauss-Kruger zone 25,2711,projected,4530,,4214,16285,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Beijing 1954 / 3-degree Gauss-Kruger CM 75E (code 2422). Superseded by Xian 1980 / 3-degree Gauss-Kruger zone 25 (code 2349).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2402,Beijing 1954 / 3-degree Gauss-Kruger zone 26,2712,projected,4530,,4214,16286,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Beijing 1954 / 3-degree Gauss-Kruger CM 78E (code 2423). Superseded by Xian 1980 / 3-degree Gauss-Kruger zone 26 (code 2350).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2403,Beijing 1954 / 3-degree Gauss-Kruger zone 27,2713,projected,4530,,4214,16287,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Beijing 1954 / 3-degree Gauss-Kruger CM 81E (code 2424). Superseded by Xian 1980 / 3-degree Gauss-Kruger zone 27 (code 2351).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2404,Beijing 1954 / 3-degree Gauss-Kruger zone 28,2714,projected,4530,,4214,16288,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Beijing 1954 / 3-degree Gauss-Kruger CM 84E (code 2425). Superseded by Xian 1980 / 3-degree Gauss-Kruger zone 28 (code 2352).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2405,Beijing 1954 / 3-degree Gauss-Kruger zone 29,2715,projected,4530,,4214,16289,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Beijing 1954 / 3-degree Gauss-Kruger CM 87E (code 2426). Superseded by Xian 1980 / 3-degree Gauss-Kruger zone 29 (code 2353).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2406,Beijing 1954 / 3-degree Gauss-Kruger zone 30,2716,projected,4530,,4214,16290,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Beijing 1954 / 3-degree Gauss-Kruger CM 90E (code 2427). Superseded by Xian 1980 / 3-degree Gauss-Kruger zone 30 (code 2354).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2407,Beijing 1954 / 3-degree Gauss-Kruger zone 31,2717,projected,4530,,4214,16291,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Beijing 1954 / 3-degree Gauss-Kruger CM 93E (code 2428). Superseded by Xian 1980 / 3-degree Gauss-Kruger zone 31 (code 2355).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2408,Beijing 1954 / 3-degree Gauss-Kruger zone 32,2718,projected,4530,,4214,16292,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Beijing 1954 / 3-degree Gauss-Kruger CM 96E (code 2429). Superseded by Xian 1980 / 3-degree Gauss-Kruger zone 32 (code 2356).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2409,Beijing 1954 / 3-degree Gauss-Kruger zone 33,2719,projected,4530,,4214,16293,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Beijing 1954 / 3-degree Gauss-Kruger CM 99E (code 2430). Superseded by Xian 1980 / 3-degree Gauss-Kruger zone 33 (code 2357).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2410,Beijing 1954 / 3-degree Gauss-Kruger zone 34,2720,projected,4530,,4214,16294,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Beijing 1954 / 3-degree Gauss-Kruger CM 102E (code 2431). Superseded by Xian 1980 / 3-degree Gauss-Kruger zone 34 (code 2358).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2411,Beijing 1954 / 3-degree Gauss-Kruger zone 35,2721,projected,4530,,4214,16295,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Beijing 1954 / 3-degree Gauss-Kruger CM 105E (code 2432). Superseded by Xian 1980 / 3-degree Gauss-Kruger zone 35 (code 2359).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2412,Beijing 1954 / 3-degree Gauss-Kruger zone 36,2722,projected,4530,,4214,16296,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Beijing 1954 / 3-degree Gauss-Kruger CM 108E (code 2433). Superseded by Xian 1980 / 3-degree Gauss-Kruger zone 36 (code 2360).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2413,Beijing 1954 / 3-degree Gauss-Kruger zone 37,2723,projected,4530,,4214,16297,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Beijing 1954 / 3-degree Gauss-Kruger CM 111E (code 2434). Superseded by Xian 1980 / 3-degree Gauss-Kruger zone 37 (code 2361).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2414,Beijing 1954 / 3-degree Gauss-Kruger zone 38,2724,projected,4530,,4214,16298,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Beijing 1954 / 3-degree Gauss-Kruger CM 114E (code 2435). Superseded by Xian 1980 / 3-degree Gauss-Kruger zone 38 (code 2362).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2415,Beijing 1954 / 3-degree Gauss-Kruger zone 39,2725,projected,4530,,4214,16299,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Beijing 1954 / 3-degree Gauss-Kruger CM 117E (code 2436). Superseded by Xian 1980 / 3-degree Gauss-Kruger zone 39 (code 2363).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2416,Beijing 1954 / 3-degree Gauss-Kruger zone 40,2726,projected,4530,,4214,16070,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Beijing 1954 / 3-degree Gauss-Kruger CM 120E (code 2437). Superseded by Xian 1980 / 3-degree Gauss-Kruger zone 40 (code 2364).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2417,Beijing 1954 / 3-degree Gauss-Kruger zone 41,2727,projected,4530,,4214,16071,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Beijing 1954 / 3-degree Gauss-Kruger CM 123E (code 2438). Superseded by Xian 1980 / 3-degree Gauss-Kruger zone 41 (code 2365).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2418,Beijing 1954 / 3-degree Gauss-Kruger zone 42,2728,projected,4530,,4214,16072,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Beijing 1954 / 3-degree Gauss-Kruger CM 126E (code 2439). Superseded by Xian 1980 / 3-degree Gauss-Kruger zone 42 (code 2366).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2419,Beijing 1954 / 3-degree Gauss-Kruger zone 43,2729,projected,4530,,4214,16073,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Beijing 1954 / 3-degree Gauss-Kruger CM 129E (code 2440). Superseded by Xian 1980 / 3-degree Gauss-Kruger zone 43 (code 2367).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2420,Beijing 1954 / 3-degree Gauss-Kruger zone 44,2730,projected,4530,,4214,16074,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Beijing 1954 / 3-degree Gauss-Kruger CM 132E (code 2441). Superseded by Xian 1980 / 3-degree Gauss-Kruger zone 44 (code 2368).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2421,Beijing 1954 / 3-degree Gauss-Kruger zone 45,2731,projected,4530,,4214,16075,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Beijing 1954 / 3-degree Gauss-Kruger CM 135E (code 2442). Superseded by Xian 1980 / 3-degree Gauss-Kruger zone 45 (code 2369).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2422,Beijing 1954 / 3-degree Gauss-Kruger CM 75E,2711,projected,4530,,4214,16385,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Beijing 1954 / 3-degree Gauss-Kruger zone 25 (code 2401). Superseded by Xian 1980 / 3-degree Gauss-Kruger CM 75E (code 2370).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2423,Beijing 1954 / 3-degree Gauss-Kruger CM 78E,2712,projected,4530,,4214,16386,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Beijing 1954 / 3-degree Gauss-Kruger zone 26 (code 2402). Superseded by Xian 1980 / 3-degree Gauss-Kruger CM 78E (code 2371).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2424,Beijing 1954 / 3-degree Gauss-Kruger CM 81E,2713,projected,4530,,4214,16387,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Beijing 1954 / 3-degree Gauss-Kruger zone 27 (code 2403). Superseded by Xian 1980 / 3-degree Gauss-Kruger CM 81E (code 2372).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2425,Beijing 1954 / 3-degree Gauss-Kruger CM 84E,2714,projected,4530,,4214,16388,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Beijing 1954 / 3-degree Gauss-Kruger zone 28 (code 2404). Superseded by Xian 1980 / 3-degree Gauss-Kruger CM 84E (code 2373).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2426,Beijing 1954 / 3-degree Gauss-Kruger CM 87E,2715,projected,4530,,4214,16389,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Beijing 1954 / 3-degree Gauss-Kruger zone 29 (code 2405). Superseded by Xian 1980 / 3-degree Gauss-Kruger CM 87E (code 2374).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2427,Beijing 1954 / 3-degree Gauss-Kruger CM 90E,2716,projected,4530,,4214,16390,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Beijing 1954 / 3-degree Gauss-Kruger zone 30 (code 2406). Superseded by Xian 1980 / 3-degree Gauss-Kruger CM 90E (code 2375).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2428,Beijing 1954 / 3-degree Gauss-Kruger CM 93E,2717,projected,4530,,4214,16391,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Beijing 1954 / 3-degree Gauss-Kruger zone 31 (code 2407). Superseded by Xian 1980 / 3-degree Gauss-Kruger CM 93E (code 2376).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2429,Beijing 1954 / 3-degree Gauss-Kruger CM 96E,2718,projected,4530,,4214,16392,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Beijing 1954 / 3-degree Gauss-Kruger zone 32 (code 2408). Superseded by Xian 1980 / 3-degree Gauss-Kruger CM 96E (code 2377).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2430,Beijing 1954 / 3-degree Gauss-Kruger CM 99E,2719,projected,4530,,4214,16393,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Beijing 1954 / 3-degree Gauss-Kruger zone 33 (code 2409). Superseded by Xian 1980 / 3-degree Gauss-Kruger CM 99E (code 2378).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2431,Beijing 1954 / 3-degree Gauss-Kruger CM 102E,2720,projected,4530,,4214,16394,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Beijing 1954 / 3-degree Gauss-Kruger zone 45 (code 2421). Superseded by Xian 1980 / 3-degree Gauss-Kruger CM 102E (code 2379).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2432,Beijing 1954 / 3-degree Gauss-Kruger CM 105E,2721,projected,4530,,4214,16395,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Beijing 1954 / 3-degree Gauss-Kruger zone 35 (code 2411). Superseded by Xian 1980 / 3-degree Gauss-Kruger CM 105E (code 2380).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2433,Beijing 1954 / 3-degree Gauss-Kruger CM 108E,2722,projected,4530,,4214,16396,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Beijing 1954 / 3-degree Gauss-Kruger zone 36 (code 2412). Superseded by Xian 1980 / 3-degree Gauss-Kruger CM 108E (code 2381).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2434,Beijing 1954 / 3-degree Gauss-Kruger CM 111E,2723,projected,4530,,4214,16397,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Beijing 1954 / 3-degree Gauss-Kruger zone 37 (code 2413). Superseded by Xian 1980 / 3-degree Gauss-Kruger CM 111E (code 2382).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2435,Beijing 1954 / 3-degree Gauss-Kruger CM 114E,2724,projected,4530,,4214,16398,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Beijing 1954 / 3-degree Gauss-Kruger zone 38 (code 2414). Superseded by Xian 1980 / 3-degree Gauss-Kruger CM 114E (code 2383).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2436,Beijing 1954 / 3-degree Gauss-Kruger CM 117E,2725,projected,4530,,4214,16399,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Beijing 1954 / 3-degree Gauss-Kruger zone 39 (code 2415). Superseded by Xian 1980 / 3-degree Gauss-Kruger CM 117E (code 2384).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2437,Beijing 1954 / 3-degree Gauss-Kruger CM 120E,2726,projected,4530,,4214,16170,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Beijing 1954 / 3-degree Gauss-Kruger zone 40 (code 2416). Superseded by Xian 1980 / 3-degree Gauss-Kruger CM 120E (code 2385).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2438,Beijing 1954 / 3-degree Gauss-Kruger CM 123E,2727,projected,4530,,4214,16171,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Beijing 1954 / 3-degree Gauss-Kruger zone 41 (code 2417). Superseded by Xian 1980 / 3-degree Gauss-Kruger CM 123E (code 2386).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2439,Beijing 1954 / 3-degree Gauss-Kruger CM 126E,2728,projected,4530,,4214,16172,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Beijing 1954 / 3-degree Gauss-Kruger zone 42 (code 2418). Superseded by Xian 1980 / 3-degree Gauss-Kruger CM 126E (code 2387).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2440,Beijing 1954 / 3-degree Gauss-Kruger CM 129E,2729,projected,4530,,4214,16173,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Beijing 1954 / 3-degree Gauss-Kruger zone 43 (code 2419). Superseded by Xian 1980 / 3-degree Gauss-Kruger CM 129E (code 2388).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2441,Beijing 1954 / 3-degree Gauss-Kruger CM 132E,2730,projected,4530,,4214,16174,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Beijing 1954 / 3-degree Gauss-Kruger zone 44 (code 2420). Superseded by Xian 1980 / 3-degree Gauss-Kruger CM 132E (code 2389).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2442,Beijing 1954 / 3-degree Gauss-Kruger CM 135E,2731,projected,4530,,4214,16175,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Beijing 1954 / 3-degree Gauss-Kruger zone 45 (code 2421). Superseded by Xian 1980 / 3-degree Gauss-Kruger CM 135E (code 2390).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2443,JGD2000 / Japan Plane Rectangular CS I,1854,projected,4530,,4612,17801,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Supersedes Tokyo / Japan Plane Rectangular CS I (code 30161).,Geographic Survey Institute; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/tokyodatum.html,EPSG,2002-06-22 00:00:00,,1,0
-2444,JGD2000 / Japan Plane Rectangular CS II,1855,projected,4530,,4612,17802,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Supersedes Tokyo / Japan Plane Rectangular CS II (code 30162).,Geographic Survey Institute; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/tokyodatum.html,EPSG,2002-06-22 00:00:00,,1,0
-2445,JGD2000 / Japan Plane Rectangular CS III,1856,projected,4530,,4612,17803,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Supersedes Tokyo / Japan Plane Rectangular CS III (code 30163).,Geographic Survey Institute; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/tokyodatum.html,EPSG,2002-06-22 00:00:00,,1,0
-2446,JGD2000 / Japan Plane Rectangular CS IV,1857,projected,4530,,4612,17804,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Supersedes Tokyo / Japan Plane Rectangular CS IV (code 30164).,Geographic Survey Institute; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/tokyodatum.html,EPSG,2002-06-22 00:00:00,,1,0
-2447,JGD2000 / Japan Plane Rectangular CS V,1858,projected,4530,,4612,17805,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Supersedes Tokyo / Japan Plane Rectangular CS V (code 30165).,Geographic Survey Institute; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/tokyodatum.html,EPSG,2002-06-22 00:00:00,,1,0
-2448,JGD2000 / Japan Plane Rectangular CS VI,1859,projected,4530,,4612,17806,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Supersedes Tokyo / Japan Plane Rectangular CS VI (code 30166).,Geographic Survey Institute; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/tokyodatum.html,EPSG,2002-06-22 00:00:00,,1,0
-2449,JGD2000 / Japan Plane Rectangular CS VII,1860,projected,4530,,4612,17807,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Supersedes Tokyo / Japan Plane Rectangular CS VII (code 30167).,Geographic Survey Institute; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/tokyodatum.html,EPSG,2002-06-22 00:00:00,,1,0
-2450,JGD2000 / Japan Plane Rectangular CS VIII,1861,projected,4530,,4612,17808,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Supersedes Tokyo / Japan Plane Rectangular CS VIII (code 30168).,Geographic Survey Institute; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/tokyodatum.html,EPSG,2002-06-22 00:00:00,,1,0
-2451,JGD2000 / Japan Plane Rectangular CS IX,1862,projected,4530,,4612,17809,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Supersedes Tokyo / Japan Plane Rectangular CS IX (code 30169).,Geographic Survey Institute; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/tokyodatum.html,EPSG,2002-06-22 00:00:00,,1,0
-2452,JGD2000 / Japan Plane Rectangular CS X,1863,projected,4530,,4612,17810,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Supersedes Tokyo / Japan Plane Rectangular CS X (code 30170).,Geographic Survey Institute; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/tokyodatum.html,EPSG,2002-06-22 00:00:00,,1,0
-2453,JGD2000 / Japan Plane Rectangular CS XI,1864,projected,4530,,4612,17811,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Supersedes Tokyo / Japan Plane Rectangular CS XI (code 30171).,Geographic Survey Institute; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/tokyodatum.html,EPSG,2002-06-22 00:00:00,,1,0
-2454,JGD2000 / Japan Plane Rectangular CS XII,1865,projected,4530,,4612,17812,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Supersedes Tokyo / Japan Plane Rectangular CS XII (code 30172).,Geographic Survey Institute; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/tokyodatum.html,EPSG,2002-06-22 00:00:00,,1,0
-2455,JGD2000 / Japan Plane Rectangular CS XIII,1866,projected,4530,,4612,17813,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Supersedes Tokyo / Japan Plane Rectangular CS XIII (code 30173).,Geographic Survey Institute; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/tokyodatum.html,EPSG,2002-06-22 00:00:00,,1,0
-2456,JGD2000 / Japan Plane Rectangular CS XIV,1867,projected,4530,,4612,17814,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Supersedes Tokyo / Japan Plane Rectangular CS XIV (code 30174).,Geographic Survey Institute; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/tokyodatum.html,EPSG,2002-06-22 00:00:00,,1,0
-2457,JGD2000 / Japan Plane Rectangular CS XV,1868,projected,4530,,4612,17815,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Supersedes Tokyo / Japan Plane Rectangular CS XV (code 30175).,Geographic Survey Institute; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/tokyodatum.html,EPSG,2002-06-22 00:00:00,,1,0
-2458,JGD2000 / Japan Plane Rectangular CS XVI,1869,projected,4530,,4612,17816,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Supersedes Tokyo / Japan Plane Rectangular CS XVI (code 30176).,Geographic Survey Institute; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/tokyodatum.html,EPSG,2002-06-22 00:00:00,,1,0
-2459,JGD2000 / Japan Plane Rectangular CS XVII,1870,projected,4530,,4612,17817,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Supersedes Tokyo / Japan Plane Rectangular CS XVII (code 30177).,Geographic Survey Institute; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/tokyodatum.html,EPSG,2002-06-22 00:00:00,,1,0
-2460,JGD2000 / Japan Plane Rectangular CS XVIII,1871,projected,4530,,4612,17818,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Supersedes Tokyo / Japan Plane Rectangular CS XVIII (code 30178).,Geographic Survey Institute; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/tokyodatum.html,EPSG,2002-06-22 00:00:00,,1,0
-2461,JGD2000 / Japan Plane Rectangular CS XIX,1872,projected,4530,,4612,17819,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Supersedes Tokyo / Japan Plane Rectangular CS XIX (code 30179).,Geographic Survey Institute; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/tokyodatum.html,EPSG,2002-06-22 00:00:00,,1,0
-2462,Albanian 1987 / Gauss-Kruger zone 4,1025,projected,4530,,4191,16204,,,"Large and medium scale topographic mapping and engineering survey, cadastral survey.",,EuroGeographics; http://crs.ifag.de/,EPSG,2002-06-22 00:00:00,,1,0
-2463,Pulkovo 1995 / Gauss-Kruger CM 21E,1763,projected,4530,,4200,16304,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1995 / Gauss-Kruger zone 4 (code 20004).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,1996-09-12 00:00:00,,1,0
-2464,Pulkovo 1995 / Gauss-Kruger CM 27E,1764,projected,4530,,4200,16305,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1995 / Gauss-Kruger zone 5 (code 20005).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,,1,0
-2465,Pulkovo 1995 / Gauss-Kruger CM 33E,1765,projected,4530,,4200,16306,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1995 / Gauss-Kruger zone 6 (code 20006).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,,1,0
-2466,Pulkovo 1995 / Gauss-Kruger CM 39E,1766,projected,4530,,4200,16307,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1995 / Gauss-Kruger zone 7 (code 20007).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,,1,0
-2467,Pulkovo 1995 / Gauss-Kruger CM 45E,1767,projected,4530,,4200,16308,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1995 / Gauss-Kruger zone 8 (code 20008).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,,1,0
-2468,Pulkovo 1995 / Gauss-Kruger CM 51E,1768,projected,4530,,4200,16309,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1995 / Gauss-Kruger zone 9 (code 20009).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,,1,0
-2469,Pulkovo 1995 / Gauss-Kruger CM 57E,1769,projected,4530,,4200,16310,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1995 / Gauss-Kruger zone 10 (code 20010).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,,1,0
-2470,Pulkovo 1995 / Gauss-Kruger CM 63E,1770,projected,4530,,4200,16311,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1995 / Gauss-Kruger zone 11 (code 20011).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,,1,0
-2471,Pulkovo 1995 / Gauss-Kruger CM 69E,1771,projected,4530,,4200,16312,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1995 / Gauss-Kruger zone 12 (code 20012).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,,1,0
-2472,Pulkovo 1995 / Gauss-Kruger CM 75E,1772,projected,4530,,4200,16313,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1995 / Gauss-Kruger zone 13 (code 20013).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,,1,0
-2473,Pulkovo 1995 / Gauss-Kruger CM 81E,1773,projected,4530,,4200,16314,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1995 / Gauss-Kruger zone 14 (code 20014).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,,1,0
-2474,Pulkovo 1995 / Gauss-Kruger CM 87E,1774,projected,4530,,4200,16315,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1995 / Gauss-Kruger zone 15 (code 20015).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,,1,0
-2475,Pulkovo 1995 / Gauss-Kruger CM 93E,1775,projected,4530,,4200,16316,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1995 / Gauss-Kruger zone 16 (code 20016).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,,1,0
-2476,Pulkovo 1995 / Gauss-Kruger CM 99E,1776,projected,4530,,4200,16317,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1995 / Gauss-Kruger zone 17 (code 20017).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,,1,0
-2477,Pulkovo 1995 / Gauss-Kruger CM 105E,1777,projected,4530,,4200,16318,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1995 / Gauss-Kruger zone 18 (code 20018).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,,1,0
-2478,Pulkovo 1995 / Gauss-Kruger CM 111E,1778,projected,4530,,4200,16319,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1995 / Gauss-Kruger zone 19 (code 20019).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,,1,0
-2479,Pulkovo 1995 / Gauss-Kruger CM 117E,1779,projected,4530,,4200,16320,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1995 / Gauss-Kruger zone 20 (code 20020).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,,1,0
-2480,Pulkovo 1995 / Gauss-Kruger CM 123E,1780,projected,4530,,4200,16321,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1995 / Gauss-Kruger zone 21 (code 20021).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,,1,0
-2481,Pulkovo 1995 / Gauss-Kruger CM 129E,1781,projected,4530,,4200,16322,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1995 / Gauss-Kruger zone 22 (code 20022).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,,1,0
-2482,Pulkovo 1995 / Gauss-Kruger CM 135E,1782,projected,4530,,4200,16323,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1995 / Gauss-Kruger zone 23 (code 20023).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,,1,0
-2483,Pulkovo 1995 / Gauss-Kruger CM 141E,1783,projected,4530,,4200,16324,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1995 / Gauss-Kruger zone 24 (code 20024).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,,1,0
-2484,Pulkovo 1995 / Gauss-Kruger CM 147E,1784,projected,4530,,4200,16325,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1995 / Gauss-Kruger zone 25 (code 20025).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,,1,0
-2485,Pulkovo 1995 / Gauss-Kruger CM 153E,1785,projected,4530,,4200,16326,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1995 / Gauss-Kruger zone 26 (code 20026).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,,1,0
-2486,Pulkovo 1995 / Gauss-Kruger CM 159E,1786,projected,4530,,4200,16327,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1995 / Gauss-Kruger zone 27 (code 20027).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,,1,0
-2487,Pulkovo 1995 / Gauss-Kruger CM 165E,1787,projected,4530,,4200,16328,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1995 / Gauss-Kruger zone 28 (code 20028).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,,1,0
-2488,Pulkovo 1995 / Gauss-Kruger CM 171E,1788,projected,4530,,4200,16329,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1995 / Gauss-Kruger zone 29 (code 20029).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,,1,0
-2489,Pulkovo 1995 / Gauss-Kruger CM 177E,1789,projected,4530,,4200,16330,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1995 / Gauss-Kruger zone 30 (code 20030).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,,1,0
-2490,Pulkovo 1995 / Gauss-Kruger CM 177W,1790,projected,4530,,4200,16331,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1995 / Gauss-Kruger zone 31 (code 20031).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,,1,0
-2491,Pulkovo 1995 / Gauss-Kruger CM 171W,1791,projected,4530,,4200,16332,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1995 / Gauss-Kruger zone 32 (code 20032).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,,1,0
-2492,Pulkovo 1942 / Gauss-Kruger CM 9E,1805,projected,4530,,4284,16302,,,Military mapping.,Truncated form of Pulkovo 1942 / Gauss-Kruger zone 2 (code 28402).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2493,Pulkovo 1942 / Gauss-Kruger CM 15E,1792,projected,4530,,4284,16303,,,Military mapping.,Truncated form of Pulkovo 1942 / Gauss-Kruger zone 3 (code 28403).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2494,Pulkovo 1942 / Gauss-Kruger CM 21E,1793,projected,4530,,4284,16304,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1942 / Gauss-Kruger zone 4 (code 28404).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2495,Pulkovo 1942 / Gauss-Kruger CM 27E,1794,projected,4530,,4284,16305,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1942 / Gauss-Kruger zone 5 (code 28405).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2496,Pulkovo 1942 / Gauss-Kruger CM 33E,1795,projected,4530,,4284,16306,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1942 / Gauss-Kruger zone 6 (code 28406).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2497,Pulkovo 1942 / Gauss-Kruger CM 39E,1796,projected,4530,,4284,16307,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1942 / Gauss-Kruger zone 7 (code 28407).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2498,Pulkovo 1942 / Gauss-Kruger CM 45E,1797,projected,4530,,4284,16308,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1942 / Gauss-Kruger zone 8 (code 28408).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2499,Pulkovo 1942 / Gauss-Kruger CM 51E,1798,projected,4530,,4284,16309,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1942 / Gauss-Kruger zone 9 (code 28409).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2500,Pulkovo 1942 / Gauss-Kruger CM 57E,1799,projected,4530,,4284,16310,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1942 / Gauss-Kruger zone 10 (code 28410).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2501,Pulkovo 1942 / Gauss-Kruger CM 63E,1800,projected,4530,,4284,16311,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1942 / Gauss-Kruger zone 11 (code 28411).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2502,Pulkovo 1942 / Gauss-Kruger CM 69E,1801,projected,4530,,4284,16312,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1942 / Gauss-Kruger zone 12 (code 28412).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2503,Pulkovo 1942 / Gauss-Kruger CM 75E,1802,projected,4530,,4284,16313,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1942 / Gauss-Kruger zone 13 (code 28413).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2504,Pulkovo 1942 / Gauss-Kruger CM 81E,1803,projected,4530,,4284,16314,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1942 / Gauss-Kruger zone 14 (code 28414).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2505,Pulkovo 1942 / Gauss-Kruger CM 87E,1804,projected,4530,,4284,16315,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1942 / Gauss-Kruger zone 15 (code 28415).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2506,Pulkovo 1942 / Gauss-Kruger CM 93E,1775,projected,4530,,4284,16316,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1942 / Gauss-Kruger zone 16 (code 28416).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2507,Pulkovo 1942 / Gauss-Kruger CM 99E,1776,projected,4530,,4284,16317,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1942 / Gauss-Kruger zone 17 (code 28417).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2508,Pulkovo 1942 / Gauss-Kruger CM 105E,1777,projected,4530,,4284,16318,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1942 / Gauss-Kruger zone 18 (code 28418).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2509,Pulkovo 1942 / Gauss-Kruger CM 111E,1778,projected,4530,,4284,16319,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1942 / Gauss-Kruger zone 19 (code 28419).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2510,Pulkovo 1942 / Gauss-Kruger CM 117E,1779,projected,4530,,4284,16320,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1942 / Gauss-Kruger zone 20 (code 28420).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2511,Pulkovo 1942 / Gauss-Kruger CM 123E,1780,projected,4530,,4284,16321,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1942 / Gauss-Kruger zone 21 (code 28421).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2512,Pulkovo 1942 / Gauss-Kruger CM 129E,1781,projected,4530,,4284,16322,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1942 / Gauss-Kruger zone 22 (code 28422).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2513,Pulkovo 1942 / Gauss-Kruger CM 135E,1782,projected,4530,,4284,16323,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1942 / Gauss-Kruger zone 23 (code 28423).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2514,Pulkovo 1942 / Gauss-Kruger CM 141E,1783,projected,4530,,4284,16324,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1942 / Gauss-Kruger zone 24 (code 28424).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2515,Pulkovo 1942 / Gauss-Kruger CM 147E,1784,projected,4530,,4284,16325,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1942 / Gauss-Kruger zone 25 (code 28425).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2516,Pulkovo 1942 / Gauss-Kruger CM 153E,1785,projected,4530,,4284,16326,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1942 / Gauss-Kruger zone 26 (code 28426).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2517,Pulkovo 1942 / Gauss-Kruger CM 159E,1786,projected,4530,,4284,16327,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1942 / Gauss-Kruger zone 27 (code 28427).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2518,Pulkovo 1942 / Gauss-Kruger CM 165E,1787,projected,4530,,4284,16328,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1942 / Gauss-Kruger zone 28 (code 28428).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2519,Pulkovo 1942 / Gauss-Kruger CM 171E,1788,projected,4530,,4284,16329,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1942 / Gauss-Kruger zone 29 (code 28429).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2520,Pulkovo 1942 / Gauss-Kruger CM 177E,1789,projected,4530,,4284,16330,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1942 / Gauss-Kruger zone 30 (code 28430).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2521,Pulkovo 1942 / Gauss-Kruger CM 177W,1790,projected,4530,,4284,16331,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1942 / Gauss-Kruger zone 31 (code 28431).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2522,Pulkovo 1942 / Gauss-Kruger CM 171W,1791,projected,4530,,4284,16332,,,Medium scale topographic mapping.,Truncated form of Pulkovo 1942 / Gauss-Kruger zone 32 (code 28432).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2523,Pulkovo 1942 / 3-degree Gauss-Kruger zone 7,2653,projected,4530,,4284,16267,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 21E (code 2582).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2524,Pulkovo 1942 / 3-degree Gauss-Kruger zone 8,2654,projected,4530,,4284,16268,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 24E (code 2583).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2525,Pulkovo 1942 / 3-degree Gauss-Kruger zone 9,2655,projected,4530,,4284,16269,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 27E (code 2584).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2526,Pulkovo 1942 / 3-degree Gauss-Kruger zone 10,2656,projected,4530,,4284,16270,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 30E (code 2585).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2527,Pulkovo 1942 / 3-degree Gauss-Kruger zone 11,2657,projected,4530,,4284,16271,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 33E (code 2586).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2528,Pulkovo 1942 / 3-degree Gauss-Kruger zone 12,2658,projected,4530,,4284,16272,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 36E (code 2587).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2529,Pulkovo 1942 / 3-degree Gauss-Kruger zone 13,2659,projected,4530,,4284,16273,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 39E (code 2588).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2530,Pulkovo 1942 / 3-degree Gauss-Kruger zone 14,2660,projected,4530,,4284,16274,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 42E (code 2589).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2531,Pulkovo 1942 / 3-degree Gauss-Kruger zone 15,2661,projected,4530,,4284,16275,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 45E (code 2590).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2532,Pulkovo 1942 / 3-degree Gauss-Kruger zone 16,2662,projected,4530,,4284,16276,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 48E (code 2591).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2533,Pulkovo 1942 / 3-degree Gauss-Kruger zone 17,2663,projected,4530,,4284,16277,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 51E (code 2592).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2534,Pulkovo 1942 / 3-degree Gauss-Kruger zone 18,2664,projected,4530,,4284,16278,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 54E (code 2593).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2535,Pulkovo 1942 / 3-degree Gauss-Kruger zone 19,2665,projected,4530,,4284,16279,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 57E (code 2594).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2536,Pulkovo 1942 / 3-degree Gauss-Kruger zone 20,2666,projected,4530,,4284,16280,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 60E (code 2595).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2537,Pulkovo 1942 / 3-degree Gauss-Kruger zone 21,2667,projected,4530,,4284,16281,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 63E (code 2596).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2538,Pulkovo 1942 / 3-degree Gauss-Kruger zone 22,2668,projected,4530,,4284,16282,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 66E (code 2597).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2539,Pulkovo 1942 / 3-degree Gauss-Kruger zone 23,2669,projected,4530,,4284,16283,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 69E (code 2598).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2540,Pulkovo 1942 / 3-degree Gauss-Kruger zone 24,2670,projected,4530,,4284,16284,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 72E (code 2599).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2541,Pulkovo 1942 / 3-degree Gauss-Kruger zone 25,2671,projected,4530,,4284,16285,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 75E (code 2601).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2542,Pulkovo 1942 / 3-degree Gauss-Kruger zone 26,2672,projected,4530,,4284,16286,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 78E (code 2602).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2543,Pulkovo 1942 / 3-degree Gauss-Kruger zone 27,2673,projected,4530,,4284,16287,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 81E (code 2603).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2544,Pulkovo 1942 / 3-degree Gauss-Kruger zone 28,2674,projected,4530,,4284,16288,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 84E (code 2604).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2545,Pulkovo 1942 / 3-degree Gauss-Kruger zone 29,2675,projected,4530,,4284,16289,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 87E (code 2605).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2546,Pulkovo 1942 / 3-degree Gauss-Kruger zone 30,2676,projected,4530,,4284,16290,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 90E (code 2606).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2547,Pulkovo 1942 / 3-degree Gauss-Kruger zone 31,2677,projected,4530,,4284,16291,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 93E (code 2607).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2548,Pulkovo 1942 / 3-degree Gauss-Kruger zone 32,2678,projected,4530,,4284,16292,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 96E (code 2608).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2549,Pulkovo 1942 / 3-degree Gauss-Kruger zone 33,2679,projected,4530,,4284,16293,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 99E (code 2609).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2550,Samboja / UTM zone 50S,1328,projected,4400,,4125,16150,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1997-11-13 00:00:00,,1,1
-2551,Pulkovo 1942 / 3-degree Gauss-Kruger zone 34,2680,projected,4530,,4284,16294,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 102E (code 2610).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2552,Pulkovo 1942 / 3-degree Gauss-Kruger zone 35,2681,projected,4530,,4284,16295,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 105E (code 2611).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2553,Pulkovo 1942 / 3-degree Gauss-Kruger zone 36,2682,projected,4530,,4284,16296,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 108E (code 2612).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2554,Pulkovo 1942 / 3-degree Gauss-Kruger zone 37,2683,projected,4530,,4284,16297,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 111E (code 2613).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2555,Pulkovo 1942 / 3-degree Gauss-Kruger zone 38,2684,projected,4530,,4284,16298,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 114E (code 2614).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2556,Pulkovo 1942 / 3-degree Gauss-Kruger zone 39,2685,projected,4530,,4284,16299,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 117E (code 2615).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2557,Pulkovo 1942 / 3-degree Gauss-Kruger zone 40,2686,projected,4530,,4284,16070,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 120E (code 2616).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2558,Pulkovo 1942 / 3-degree Gauss-Kruger zone 41,2687,projected,4530,,4284,16071,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 123E (code 2617).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2559,Pulkovo 1942 / 3-degree Gauss-Kruger zone 42,2688,projected,4530,,4284,16072,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 126E (code 2618).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2560,Pulkovo 1942 / 3-degree Gauss-Kruger zone 43,2689,projected,4530,,4284,16073,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 129E (code 2619).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2561,Pulkovo 1942 / 3-degree Gauss-Kruger zone 44,2690,projected,4530,,4284,16074,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 132E (code 2620).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2562,Pulkovo 1942 / 3-degree Gauss-Kruger zone 45,2691,projected,4530,,4284,16075,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 135E (code 2621).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2563,Pulkovo 1942 / 3-degree Gauss-Kruger zone 46,2692,projected,4530,,4284,16076,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 138E (code 2622).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2564,Pulkovo 1942 / 3-degree Gauss-Kruger zone 47,2693,projected,4530,,4284,16077,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 141E (code 2623).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2565,Pulkovo 1942 / 3-degree Gauss-Kruger zone 48,2694,projected,4530,,4284,16078,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 144E (code 2624).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2566,Pulkovo 1942 / 3-degree Gauss-Kruger zone 49,2695,projected,4530,,4284,16079,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 147E (code 2625).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2567,Pulkovo 1942 / 3-degree Gauss-Kruger zone 50,2696,projected,4530,,4284,16080,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 150E (code 2626).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2568,Pulkovo 1942 / 3-degree Gauss-Kruger zone 51,2697,projected,4530,,4284,16081,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 153E (code 2627).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2569,Pulkovo 1942 / 3-degree Gauss-Kruger zone 52,2698,projected,4530,,4284,16082,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 156E (code 2628).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2570,Pulkovo 1942 / 3-degree Gauss-Kruger zone 53,2699,projected,4530,,4284,16083,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 159E (code 2629).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2571,Pulkovo 1942 / 3-degree Gauss-Kruger zone 54,2700,projected,4530,,4284,16084,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 162E (code 2630).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2572,Pulkovo 1942 / 3-degree Gauss-Kruger zone 55,2701,projected,4530,,4284,16085,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 165E (code 2631).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2573,Pulkovo 1942 / 3-degree Gauss-Kruger zone 56,2702,projected,4530,,4284,16086,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 168E (code 2632).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2574,Pulkovo 1942 / 3-degree Gauss-Kruger zone 57,2703,projected,4530,,4284,16087,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 171E (code 2633).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2575,Pulkovo 1942 / 3-degree Gauss-Kruger zone 58,2704,projected,4530,,4284,16088,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 174E (code 2634).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2576,Pulkovo 1942 / 3-degree Gauss-Kruger zone 59,2705,projected,4530,,4284,16089,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 177E (code 2635).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2577,Pulkovo 1942 / 3-degree Gauss-Kruger zone 60,2706,projected,4530,,4284,16090,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 180E (code 2636).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2578,Pulkovo 1942 / 3-degree Gauss-Kruger zone 61,2707,projected,4530,,4284,16091,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 177W (code 2637).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2579,Pulkovo 1942 / 3-degree Gauss-Kruger zone 62,2708,projected,4530,,4284,16092,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 174W (code 2638).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2580,Pulkovo 1942 / 3-degree Gauss-Kruger zone 63,2709,projected,4530,,4284,16093,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 171W (code 2639).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2581,Pulkovo 1942 / 3-degree Gauss-Kruger zone 64,2710,projected,4530,,4284,16094,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1942 / 3-degree Gauss-Kruger CM 168W (code 2640).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2582,Pulkovo 1942 / 3-degree Gauss-Kruger CM 21E,2747,projected,4530,,4284,16367,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 7 (code 2523).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2583,Pulkovo 1942 / 3-degree Gauss-Kruger CM 24E,2654,projected,4530,,4284,16368,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 8 (code 2524).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2584,Pulkovo 1942 / 3-degree Gauss-Kruger CM 27E,2655,projected,4530,,4284,16369,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 9 (code 2525).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2585,Pulkovo 1942 / 3-degree Gauss-Kruger CM 30E,2656,projected,4530,,4284,16370,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 10 (code 2526).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2586,Pulkovo 1942 / 3-degree Gauss-Kruger CM 33E,2657,projected,4530,,4284,16371,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 11 (code 2527).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2587,Pulkovo 1942 / 3-degree Gauss-Kruger CM 36E,2658,projected,4530,,4284,16372,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 12 (code 2528).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2588,Pulkovo 1942 / 3-degree Gauss-Kruger CM 39E,2659,projected,4530,,4284,16373,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 13 (code 2529).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2589,Pulkovo 1942 / 3-degree Gauss-Kruger CM 42E,2660,projected,4530,,4284,16374,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 14 (code 2530).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2590,Pulkovo 1942 / 3-degree Gauss-Kruger CM 45E,2661,projected,4530,,4284,16375,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 15 (code 2531).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2591,Pulkovo 1942 / 3-degree Gauss-Kruger CM 48E,2662,projected,4530,,4284,16376,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 16 (code 2532).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2592,Pulkovo 1942 / 3-degree Gauss-Kruger CM 51E,2663,projected,4530,,4284,16377,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 17 (code 2533).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2593,Pulkovo 1942 / 3-degree Gauss-Kruger CM 54E,2664,projected,4530,,4284,16378,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 18 (code 2534).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2594,Pulkovo 1942 / 3-degree Gauss-Kruger CM 57E,2665,projected,4530,,4284,16379,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 19 (code 2535).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2595,Pulkovo 1942 / 3-degree Gauss-Kruger CM 60E,2666,projected,4530,,4284,16380,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 20 (code 2536).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2596,Pulkovo 1942 / 3-degree Gauss-Kruger CM 63E,2667,projected,4530,,4284,16381,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 21 (code 2537).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2597,Pulkovo 1942 / 3-degree Gauss-Kruger CM 66E,2668,projected,4530,,4284,16382,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 22 (code 2538).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2598,Pulkovo 1942 / 3-degree Gauss-Kruger CM 69E,2669,projected,4530,,4284,16383,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 23 (code 2539).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2599,Pulkovo 1942 / 3-degree Gauss-Kruger CM 72E,2670,projected,4530,,4284,16384,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 24 (code 2540).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2600,Lietuvos Koordinoei Sistema 1994,1145,projected,4530,,4126,19934,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1998-03-12 00:00:00,,1,0
-2601,Pulkovo 1942 / 3-degree Gauss-Kruger CM 75E,2671,projected,4530,,4284,16385,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 25 (code 2541).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2602,Pulkovo 1942 / 3-degree Gauss-Kruger CM 78E,2672,projected,4530,,4284,16386,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 26 (code 2542).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2603,Pulkovo 1942 / 3-degree Gauss-Kruger CM 81E,2673,projected,4530,,4284,16387,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 27 (code 2543).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2604,Pulkovo 1942 / 3-degree Gauss-Kruger CM 84E,2674,projected,4530,,4284,16388,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 28 (code 2544).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2605,Pulkovo 1942 / 3-degree Gauss-Kruger CM 87E,2675,projected,4530,,4284,16389,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 29 (code 2545).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2606,Pulkovo 1942 / 3-degree Gauss-Kruger CM 90E,2676,projected,4530,,4284,16390,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 30 (code 2546).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2607,Pulkovo 1942 / 3-degree Gauss-Kruger CM 93E,2677,projected,4530,,4284,16391,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 31 (code 2547).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2608,Pulkovo 1942 / 3-degree Gauss-Kruger CM 96E,2678,projected,4530,,4284,16392,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 32 (code 2548).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2609,Pulkovo 1942 / 3-degree Gauss-Kruger CM 99E,2679,projected,4530,,4284,16393,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 33 (code 2549).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2610,Pulkovo 1942 / 3-degree Gauss-Kruger CM 102E,2680,projected,4530,,4284,16394,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 34 (code 2551).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2611,Pulkovo 1942 / 3-degree Gauss-Kruger CM 105E,2681,projected,4530,,4284,16395,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 35 (code 2552).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2612,Pulkovo 1942 / 3-degree Gauss-Kruger CM 108E,2682,projected,4530,,4284,16396,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 36 (code 2553).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2613,Pulkovo 1942 / 3-degree Gauss-Kruger CM 111E,2683,projected,4530,,4284,16397,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 37 (code 2554).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2614,Pulkovo 1942 / 3-degree Gauss-Kruger CM 114E,2684,projected,4530,,4284,16398,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 38 (code 2555).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2615,Pulkovo 1942 / 3-degree Gauss-Kruger CM 117E,2685,projected,4530,,4284,16399,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 39 (code 2556).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2616,Pulkovo 1942 / 3-degree Gauss-Kruger CM 120E,2686,projected,4530,,4284,16170,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 40 (code 2557).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2617,Pulkovo 1942 / 3-degree Gauss-Kruger CM 123E,2687,projected,4530,,4284,16171,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 41 (code 2558).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2618,Pulkovo 1942 / 3-degree Gauss-Kruger CM 126E,2688,projected,4530,,4284,16172,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 42 (code 2559).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2619,Pulkovo 1942 / 3-degree Gauss-Kruger CM 129E,2689,projected,4530,,4284,16173,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 43 (code 2560).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2620,Pulkovo 1942 / 3-degree Gauss-Kruger CM 132E,2690,projected,4530,,4284,16174,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 44 (code 2561).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2621,Pulkovo 1942 / 3-degree Gauss-Kruger CM 135E,2691,projected,4530,,4284,16175,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 45 (code 2562).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2622,Pulkovo 1942 / 3-degree Gauss-Kruger CM 138E,2692,projected,4530,,4284,16176,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 46 (code 2563).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2623,Pulkovo 1942 / 3-degree Gauss-Kruger CM 141E,2693,projected,4530,,4284,16177,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 47 (code 2564).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2624,Pulkovo 1942 / 3-degree Gauss-Kruger CM 144E,2694,projected,4530,,4284,16178,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 48 (code 2565).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2625,Pulkovo 1942 / 3-degree Gauss-Kruger CM 147E,2695,projected,4530,,4284,16179,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 49 (code 2566).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2626,Pulkovo 1942 / 3-degree Gauss-Kruger CM 150E,2696,projected,4530,,4284,16180,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 50 (code 2567).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2627,Pulkovo 1942 / 3-degree Gauss-Kruger CM 153E,2697,projected,4530,,4284,16181,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 51 (code 2568).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2628,Pulkovo 1942 / 3-degree Gauss-Kruger CM 156E,2698,projected,4530,,4284,16182,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 52 (code 2569).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2629,Pulkovo 1942 / 3-degree Gauss-Kruger CM 159E,2699,projected,4530,,4284,16183,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 53 (code 2570).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2630,Pulkovo 1942 / 3-degree Gauss-Kruger CM 162E,2700,projected,4530,,4284,16184,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 54 (code 2571).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2631,Pulkovo 1942 / 3-degree Gauss-Kruger CM 165E,2701,projected,4530,,4284,16185,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 55 (code 2572).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2632,Pulkovo 1942 / 3-degree Gauss-Kruger CM 168E,2702,projected,4530,,4284,16186,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 56 (code 2573).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2633,Pulkovo 1942 / 3-degree Gauss-Kruger CM 171E,2703,projected,4530,,4284,16187,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 57 (code 2574).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2634,Pulkovo 1942 / 3-degree Gauss-Kruger CM 174E,2704,projected,4530,,4284,16188,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 58 (code 2575).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2635,Pulkovo 1942 / 3-degree Gauss-Kruger CM 177E,2705,projected,4530,,4284,16189,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 59 (code 2576).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2636,Pulkovo 1942 / 3-degree Gauss-Kruger CM 180E,2706,projected,4530,,4284,16190,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 60 (code 2577).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2637,Pulkovo 1942 / 3-degree Gauss-Kruger CM 177W,2707,projected,4530,,4284,16191,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 61 (code 2578).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2638,Pulkovo 1942 / 3-degree Gauss-Kruger CM 174W,2708,projected,4530,,4284,16192,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 62 (code 2579).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2639,Pulkovo 1942 / 3-degree Gauss-Kruger CM 171W,2709,projected,4530,,4284,16193,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 63 (code 2580).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2640,Pulkovo 1942 / 3-degree Gauss-Kruger CM 168W,2710,projected,4530,,4284,16194,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1942 / 3-degree Gauss-Kruger zone 64 (code 2581).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2641,Pulkovo 1995 / 3-degree Gauss-Kruger zone 7,2747,projected,4530,,4284,16267,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 21E (code 2699).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2642,Pulkovo 1995 / 3-degree Gauss-Kruger zone 8,2748,projected,4530,,4284,16268,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 24E (code 2700).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2643,Pulkovo 1995 / 3-degree Gauss-Kruger zone 9,2749,projected,4530,,4284,16269,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 27E (code 2701).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2644,Pulkovo 1995 / 3-degree Gauss-Kruger zone 10,2750,projected,4530,,4284,16270,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 30E (code 2702).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2645,Pulkovo 1995 / 3-degree Gauss-Kruger zone 11,2751,projected,4530,,4284,16271,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 33E (code 2703).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2646,Pulkovo 1995 / 3-degree Gauss-Kruger zone 12,2752,projected,4530,,4284,16272,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 36E (code 2704).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2647,Pulkovo 1995 / 3-degree Gauss-Kruger zone 13,2753,projected,4530,,4284,16273,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 39E (code 2705).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2648,Pulkovo 1995 / 3-degree Gauss-Kruger zone 14,2754,projected,4530,,4284,16274,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 42E (code 2706).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2649,Pulkovo 1995 / 3-degree Gauss-Kruger zone 15,2755,projected,4530,,4284,16275,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 45E (code 2707).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2650,Pulkovo 1995 / 3-degree Gauss-Kruger zone 16,2756,projected,4530,,4284,16276,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 48E (code 2708).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2651,Pulkovo 1995 / 3-degree Gauss-Kruger zone 17,2757,projected,4530,,4284,16277,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 51E (code 2709).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2652,Pulkovo 1995 / 3-degree Gauss-Kruger zone 18,2758,projected,4530,,4284,16278,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 54E (code 2710).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2653,Pulkovo 1995 / 3-degree Gauss-Kruger zone 19,2759,projected,4530,,4284,16279,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 57E (code 2711).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2654,Pulkovo 1995 / 3-degree Gauss-Kruger zone 20,2760,projected,4530,,4284,16280,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 60E (code 2712).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2655,Pulkovo 1995 / 3-degree Gauss-Kruger zone 21,2761,projected,4530,,4284,16281,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 63E (code 2713).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2656,Pulkovo 1995 / 3-degree Gauss-Kruger zone 22,2762,projected,4530,,4284,16282,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 66E (code 2714).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2657,Pulkovo 1995 / 3-degree Gauss-Kruger zone 23,2763,projected,4530,,4284,16283,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 69E (code 2715).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2658,Pulkovo 1995 / 3-degree Gauss-Kruger zone 24,2764,projected,4530,,4284,16284,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 72E (code 2716).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2659,Pulkovo 1995 / 3-degree Gauss-Kruger zone 25,2765,projected,4530,,4284,16285,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 75E (code 2717).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2660,Pulkovo 1995 / 3-degree Gauss-Kruger zone 26,2766,projected,4530,,4284,16286,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 78E (code 2718).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2661,Pulkovo 1995 / 3-degree Gauss-Kruger zone 27,2767,projected,4530,,4284,16287,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 81E (code 2719).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2662,Pulkovo 1995 / 3-degree Gauss-Kruger zone 28,2768,projected,4530,,4284,16288,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 84E (code 2720).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2663,Pulkovo 1995 / 3-degree Gauss-Kruger zone 29,2769,projected,4530,,4284,16289,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 87E (code 2721).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2664,Pulkovo 1995 / 3-degree Gauss-Kruger zone 30,2676,projected,4530,,4284,16290,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 90E (code 2722).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2665,Pulkovo 1995 / 3-degree Gauss-Kruger zone 31,2677,projected,4530,,4284,16291,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 93E (code 2723).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2666,Pulkovo 1995 / 3-degree Gauss-Kruger zone 32,2678,projected,4530,,4284,16292,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 96E (code 2724).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2667,Pulkovo 1995 / 3-degree Gauss-Kruger zone 33,2679,projected,4530,,4284,16293,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 99E (code 2725).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2668,Pulkovo 1995 / 3-degree Gauss-Kruger zone 34,2680,projected,4530,,4284,16294,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 102E (code 2726).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2669,Pulkovo 1995 / 3-degree Gauss-Kruger zone 35,2681,projected,4530,,4284,16295,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 105E (code 2727).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2670,Pulkovo 1995 / 3-degree Gauss-Kruger zone 36,2682,projected,4530,,4284,16296,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 108E (code 2728).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2671,Pulkovo 1995 / 3-degree Gauss-Kruger zone 37,2683,projected,4530,,4284,16297,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 111E (code 2729).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2672,Pulkovo 1995 / 3-degree Gauss-Kruger zone 38,2684,projected,4530,,4284,16298,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 114E (code 2730).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2673,Pulkovo 1995 / 3-degree Gauss-Kruger zone 39,2685,projected,4530,,4284,16299,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 117E (code 2731).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2674,Pulkovo 1995 / 3-degree Gauss-Kruger zone 40,2686,projected,4530,,4284,16070,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 120E (code 2732).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2675,Pulkovo 1995 / 3-degree Gauss-Kruger zone 41,2687,projected,4530,,4284,16071,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 123E (code 2733).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2676,Pulkovo 1995 / 3-degree Gauss-Kruger zone 42,2688,projected,4530,,4284,16072,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 126E (code 2734).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2677,Pulkovo 1995 / 3-degree Gauss-Kruger zone 43,2689,projected,4530,,4284,16073,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 129E (code 2735).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2678,Pulkovo 1995 / 3-degree Gauss-Kruger zone 44,2690,projected,4530,,4284,16074,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 132E (code 2738).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2679,Pulkovo 1995 / 3-degree Gauss-Kruger zone 45,2691,projected,4530,,4284,16075,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 135E (code 2739).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2680,Pulkovo 1995 / 3-degree Gauss-Kruger zone 46,2692,projected,4530,,4284,16076,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 138E (code 2740).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2681,Pulkovo 1995 / 3-degree Gauss-Kruger zone 47,2693,projected,4530,,4284,16077,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 141E (code 2741).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2682,Pulkovo 1995 / 3-degree Gauss-Kruger zone 48,2694,projected,4530,,4284,16078,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 144E (code 2742).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2683,Pulkovo 1995 / 3-degree Gauss-Kruger zone 49,2695,projected,4530,,4284,16079,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 147E (code 2743).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2684,Pulkovo 1995 / 3-degree Gauss-Kruger zone 50,2696,projected,4530,,4284,16080,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 150E (code 2744).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2685,Pulkovo 1995 / 3-degree Gauss-Kruger zone 51,2697,projected,4530,,4284,16081,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 153E (code 2745).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2686,Pulkovo 1995 / 3-degree Gauss-Kruger zone 52,2698,projected,4530,,4284,16082,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 156E (code 2746).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2687,Pulkovo 1995 / 3-degree Gauss-Kruger zone 53,2699,projected,4530,,4284,16083,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 159E (code 2747).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2688,Pulkovo 1995 / 3-degree Gauss-Kruger zone 54,2700,projected,4530,,4284,16084,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 162E (code 2748).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2689,Pulkovo 1995 / 3-degree Gauss-Kruger zone 55,2701,projected,4530,,4284,16085,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 165E (code 2749).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2690,Pulkovo 1995 / 3-degree Gauss-Kruger zone 56,2702,projected,4530,,4284,16086,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 168E (code 2750).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2691,Pulkovo 1995 / 3-degree Gauss-Kruger zone 57,2703,projected,4530,,4284,16087,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 171E (code 2751).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2692,Pulkovo 1995 / 3-degree Gauss-Kruger zone 58,2704,projected,4530,,4284,16088,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 174E (code 2752).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2693,Pulkovo 1995 / 3-degree Gauss-Kruger zone 59,2705,projected,4530,,4284,16089,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 177E (code 2753).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2694,Pulkovo 1995 / 3-degree Gauss-Kruger zone 60,2706,projected,4530,,4284,16090,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 180E (code 2754).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2695,Pulkovo 1995 / 3-degree Gauss-Kruger zone 61,2707,projected,4530,,4284,16091,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 177W (code 2755).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2696,Pulkovo 1995 / 3-degree Gauss-Kruger zone 62,2708,projected,4530,,4284,16092,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 174W (code 2756).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2697,Pulkovo 1995 / 3-degree Gauss-Kruger zone 63,2709,projected,4530,,4284,16093,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 171W (code 2757).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2698,Pulkovo 1995 / 3-degree Gauss-Kruger zone 64,2710,projected,4530,,4284,16094,,,"Large scale topographic mapping, cadastral and engineering survey.",Also found with truncated false easting - see Pulkovo 1995 / 3-degree Gauss-Kruger CM 168W (code 2758).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2699,Pulkovo 1995 / 3-degree Gauss-Kruger CM 21E,2747,projected,4530,,4284,16367,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 7 (code 2641).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2700,Pulkovo 1995 / 3-degree Gauss-Kruger CM 24E,2654,projected,4530,,4284,16368,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 8 (code 2642).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2701,Pulkovo 1995 / 3-degree Gauss-Kruger CM 27E,2655,projected,4530,,4284,16369,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 9 (code 2643).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2702,Pulkovo 1995 / 3-degree Gauss-Kruger CM 30E,2656,projected,4530,,4284,16370,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 10 (code 2644).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2703,Pulkovo 1995 / 3-degree Gauss-Kruger CM 33E,2657,projected,4530,,4284,16371,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 11 (code 2645).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2704,Pulkovo 1995 / 3-degree Gauss-Kruger CM 36E,2658,projected,4530,,4284,16372,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 12 (code 2646).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2705,Pulkovo 1995 / 3-degree Gauss-Kruger CM 39E,2659,projected,4530,,4284,16373,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 13 (code 2647).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2706,Pulkovo 1995 / 3-degree Gauss-Kruger CM 42E,2660,projected,4530,,4284,16374,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 14 (code 2648).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2707,Pulkovo 1995 / 3-degree Gauss-Kruger CM 45E,2661,projected,4530,,4284,16375,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 15 (code 2649).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2708,Pulkovo 1995 / 3-degree Gauss-Kruger CM 48E,2662,projected,4530,,4284,16376,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 16 (code 2650).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2709,Pulkovo 1995 / 3-degree Gauss-Kruger CM 51E,2663,projected,4530,,4284,16377,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 17 (code 2651).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2710,Pulkovo 1995 / 3-degree Gauss-Kruger CM 54E,2664,projected,4530,,4284,16378,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 18 (code 2652).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2711,Pulkovo 1995 / 3-degree Gauss-Kruger CM 57E,2665,projected,4530,,4284,16379,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 19 (code 2653).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2712,Pulkovo 1995 / 3-degree Gauss-Kruger CM 60E,2666,projected,4530,,4284,16380,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 20 (code 2654).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2713,Pulkovo 1995 / 3-degree Gauss-Kruger CM 63E,2667,projected,4530,,4284,16381,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 21 (code 2655).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2714,Pulkovo 1995 / 3-degree Gauss-Kruger CM 66E,2668,projected,4530,,4284,16382,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 22 (code 2656).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2715,Pulkovo 1995 / 3-degree Gauss-Kruger CM 69E,2669,projected,4530,,4284,16383,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 23 (code 2657).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2716,Pulkovo 1995 / 3-degree Gauss-Kruger CM 72E,2670,projected,4530,,4284,16384,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 24 (code 2658).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2717,Pulkovo 1995 / 3-degree Gauss-Kruger CM 75E,2671,projected,4530,,4284,16385,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 25 (code 2659).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2718,Pulkovo 1995 / 3-degree Gauss-Kruger CM 78E,2672,projected,4530,,4284,16386,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 26 (code 2660).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2719,Pulkovo 1995 / 3-degree Gauss-Kruger CM 81E,2673,projected,4530,,4284,16387,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 27 (code 2661).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2720,Pulkovo 1995 / 3-degree Gauss-Kruger CM 84E,2674,projected,4530,,4284,16388,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 28 (code 2662).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2721,Pulkovo 1995 / 3-degree Gauss-Kruger CM 87E,2675,projected,4530,,4284,16389,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 29 (code 2663).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2722,Pulkovo 1995 / 3-degree Gauss-Kruger CM 90E,2676,projected,4530,,4284,16390,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 30 (code 2664).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2723,Pulkovo 1995 / 3-degree Gauss-Kruger CM 93E,2677,projected,4530,,4284,16391,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 31 (code 2665).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2724,Pulkovo 1995 / 3-degree Gauss-Kruger CM 96E,2678,projected,4530,,4284,16392,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 32 (code 2666).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2725,Pulkovo 1995 / 3-degree Gauss-Kruger CM 99E,2679,projected,4530,,4284,16393,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 33 (code 2667).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2726,Pulkovo 1995 / 3-degree Gauss-Kruger CM 102E,2680,projected,4530,,4284,16394,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 34 (code 2668).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2727,Pulkovo 1995 / 3-degree Gauss-Kruger CM 105E,2681,projected,4530,,4284,16395,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 35 (code 2669).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2728,Pulkovo 1995 / 3-degree Gauss-Kruger CM 108E,2682,projected,4530,,4284,16396,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 36 (code 2670).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2729,Pulkovo 1995 / 3-degree Gauss-Kruger CM 111E,2683,projected,4530,,4284,16397,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 37 (code 2671).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2730,Pulkovo 1995 / 3-degree Gauss-Kruger CM 114E,2684,projected,4530,,4284,16398,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 38 (code 2672).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2731,Pulkovo 1995 / 3-degree Gauss-Kruger CM 117E,2685,projected,4530,,4284,16399,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 39 (code 2673).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2732,Pulkovo 1995 / 3-degree Gauss-Kruger CM 120E,2686,projected,4530,,4284,16170,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 40 (code 2674).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2733,Pulkovo 1995 / 3-degree Gauss-Kruger CM 123E,2687,projected,4530,,4284,16171,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 41 (code 2675).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2734,Pulkovo 1995 / 3-degree Gauss-Kruger CM 126E,2688,projected,4530,,4284,16172,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 42 (code 2676).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2735,Pulkovo 1995 / 3-degree Gauss-Kruger CM 129E,2689,projected,4530,,4284,16173,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 43 (code 2677).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2736,Tete / UTM zone 36S,1540,projected,4400,,4127,16136,,,Large and medium scale topographic mapping and engineering survey.,,Direc��o Nacional de Geografia e Cadastral (DINAGECA).,EPSG,1998-04-16 00:00:00,,1,0
-2737,Tete / UTM zone 37S,1541,projected,4400,,4127,16137,,,Large and medium scale topographic mapping and engineering survey.,,Direc��o Nacional de Geografia e Cadastral (DINAGECA).,EPSG,1998-04-16 00:00:00,,1,0
-2738,Pulkovo 1995 / 3-degree Gauss-Kruger CM 132E,2690,projected,4530,,4284,16174,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 44 (code 2678).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2739,Pulkovo 1995 / 3-degree Gauss-Kruger CM 135E,2691,projected,4530,,4284,16175,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 45 (code 2679).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2740,Pulkovo 1995 / 3-degree Gauss-Kruger CM 138E,2692,projected,4530,,4284,16176,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 46 (code 2680).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2741,Pulkovo 1995 / 3-degree Gauss-Kruger CM 141E,2693,projected,4530,,4284,16177,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 47 (code 2681).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2742,Pulkovo 1995 / 3-degree Gauss-Kruger CM 144E,2694,projected,4530,,4284,16178,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 48 (code 2682).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2743,Pulkovo 1995 / 3-degree Gauss-Kruger CM 147E,2695,projected,4530,,4284,16179,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 49 (code 2683).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2744,Pulkovo 1995 / 3-degree Gauss-Kruger CM 150E,2696,projected,4530,,4284,16180,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 50 (code 2684).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2745,Pulkovo 1995 / 3-degree Gauss-Kruger CM 153E,2697,projected,4530,,4284,16181,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 51 (code 2685).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2746,Pulkovo 1995 / 3-degree Gauss-Kruger CM 156E,2698,projected,4530,,4284,16182,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 52 (code 2686).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2747,Pulkovo 1995 / 3-degree Gauss-Kruger CM 159E,2699,projected,4530,,4284,16183,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 53 (code 2687).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2748,Pulkovo 1995 / 3-degree Gauss-Kruger CM 162E,2700,projected,4530,,4284,16184,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 54 (code 2688).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2749,Pulkovo 1995 / 3-degree Gauss-Kruger CM 165E,2701,projected,4530,,4284,16185,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 55 (code 2689).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2750,Pulkovo 1995 / 3-degree Gauss-Kruger CM 168E,2702,projected,4530,,4284,16186,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 56 (code 2690).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2751,Pulkovo 1995 / 3-degree Gauss-Kruger CM 171E,2703,projected,4530,,4284,16187,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 57 (code 2691).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2752,Pulkovo 1995 / 3-degree Gauss-Kruger CM 174E,2704,projected,4530,,4284,16188,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 58 (code 2692).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2753,Pulkovo 1995 / 3-degree Gauss-Kruger CM 177E,2705,projected,4530,,4284,16189,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 59 (code 2693).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2754,Pulkovo 1995 / 3-degree Gauss-Kruger CM 180E,2706,projected,4530,,4284,16190,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 60 (code 2694).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2755,Pulkovo 1995 / 3-degree Gauss-Kruger CM 177W,2707,projected,4530,,4284,16191,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 61 (code 2695).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2756,Pulkovo 1995 / 3-degree Gauss-Kruger CM 174W,2708,projected,4530,,4284,16192,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 62 (code 2696).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2757,Pulkovo 1995 / 3-degree Gauss-Kruger CM 171W,2709,projected,4530,,4284,16193,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 63 (code 2697).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2758,Pulkovo 1995 / 3-degree Gauss-Kruger CM 168W,2710,projected,4530,,4284,16194,,,"Large scale topographic mapping, cadastral and engineering survey.",Truncated form of Pulkovo 1995 / 3-degree Gauss-Kruger zone 64 (code 2698).,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2759,NAD83(HARN) / Alabama East,2154,projected,4499,,4152,10131,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2760,NAD83(HARN) / Alabama West,2155,projected,4499,,4152,10132,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2761,NAD83(HARN) / Arizona East,2167,projected,4499,,4152,10231,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in International feet (note: not US survey feet).  See code 2222 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2762,NAD83(HARN) / Arizona Central,2166,projected,4499,,4152,10232,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in International feet (note: not US survey feet).  See code 2223 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2763,NAD83(HARN) / Arizona West,2168,projected,4499,,4152,10233,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in International feet (note: not US survey feet).  See code 2224 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2764,NAD83(HARN) / Arkansas North,2169,projected,4499,,4152,10331,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2765,NAD83(HARN) / Arkansas South,2170,projected,4499,,4152,10332,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2766,NAD83(HARN) / California zone 1,2175,projected,4499,,4152,10431,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2225 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2767,NAD83(HARN) / California zone 2,2176,projected,4499,,4152,10432,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2226 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2768,NAD83(HARN) / California zone 3,2177,projected,4499,,4152,10433,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2227 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2769,NAD83(HARN) / California zone 4,2178,projected,4499,,4152,10434,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2228 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2770,NAD83(HARN) / California zone 5,2182,projected,4499,,4152,10435,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2229 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2771,NAD83(HARN) / California zone 6,2180,projected,4499,,4152,10436,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2230 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2772,NAD83(HARN) / Colorado North,2184,projected,4499,,4152,10531,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2231 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2773,NAD83(HARN) / Colorado Central,2183,projected,4499,,4152,10532,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2232 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2774,NAD83(HARN) / Colorado South,2185,projected,4499,,4152,10533,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2233 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2775,NAD83(HARN) / Connecticut,1377,projected,4499,,4152,10630,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2234 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2776,NAD83(HARN) / Delaware,1378,projected,4499,,4152,10730,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2235 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2777,NAD83(HARN) / Florida East,2186,projected,4499,,4152,10931,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2236 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2778,NAD83(HARN) / Florida West,2188,projected,4499,,4152,10932,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2237 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2779,NAD83(HARN) / Florida North,2187,projected,4499,,4152,10933,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2238 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2780,NAD83(HARN) / Georgia East,2189,projected,4499,,4152,11031,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2239 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2781,NAD83(HARN) / Georgia West,2190,projected,4499,,4152,11032,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2240 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2782,NAD83(HARN) / Hawaii zone 1,1546,projected,4499,,4152,15131,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2783,NAD83(HARN) / Hawaii zone 2,1547,projected,4499,,4152,15132,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2784,NAD83(HARN) / Hawaii zone 3,1548,projected,4499,,4152,15133,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2785,NAD83(HARN) / Hawaii zone 4,1549,projected,4499,,4152,15134,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2786,NAD83(HARN) / Hawaii zone 5,1550,projected,4499,,4152,15135,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2787,NAD83(HARN) / Idaho East,2192,projected,4499,,4152,11131,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2241 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2788,NAD83(HARN) / Idaho Central,2191,projected,4499,,4152,11132,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2242 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2789,NAD83(HARN) / Idaho West,2193,projected,4499,,4152,11133,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2243 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2790,NAD83(HARN) / Illinois East,2194,projected,4499,,4152,11231,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2791,NAD83(HARN) / Illinois West,2195,projected,4499,,4152,11232,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2792,NAD83(HARN) / Indiana East,2196,projected,4499,,4152,11331,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2244 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2793,NAD83(HARN) / Indiana West,2197,projected,4499,,4152,11332,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2245 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2794,NAD83(HARN) / Iowa North,2198,projected,4499,,4152,11431,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2795,NAD83(HARN) / Iowa South,2199,projected,4499,,4152,11432,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2796,NAD83(HARN) / Kansas North,2200,projected,4499,,4152,11531,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2797,NAD83(HARN) / Kansas South,2201,projected,4499,,4152,11532,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2798,NAD83(HARN) / Kentucky North,2202,projected,4499,,4152,15303,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2246 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2799,NAD83(HARN) / Kentucky South,2203,projected,4499,,4152,11632,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2247 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2800,NAD83(HARN) / Louisiana North,2204,projected,4499,,4152,11731,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2801,NAD83(HARN) / Louisiana South,2529,projected,4499,,4152,11732,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2802,NAD83(HARN) / Maine East,2206,projected,4499,,4152,11831,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2803,NAD83(HARN) / Maine West,2207,projected,4499,,4152,11832,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2804,NAD83(HARN) / Maryland,1389,projected,4499,,4152,11930,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2248 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2805,NAD83(HARN) / Massachusetts Mainland,2209,projected,4499,,4152,12031,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2249 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2806,NAD83(HARN) / Massachusetts Island,2208,projected,4499,,4152,12032,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2250 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2807,NAD83(HARN) / Michigan North,1723,projected,4499,,4152,12141,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in International feet (note: not US survey feet).  See code 2251 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2808,NAD83(HARN) / Michigan Central,1724,projected,4499,,4152,12142,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in International feet (note: not US survey feet).  See code 2252 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2809,NAD83(HARN) / Michigan South,1725,projected,4499,,4152,12143,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in International feet (note: not US survey feet).  See code 2253 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2810,NAD83(HARN) / Minnesota North,2214,projected,4499,,4152,12231,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2811,NAD83(HARN) / Minnesota Central,2213,projected,4499,,4152,12232,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2812,NAD83(HARN) / Minnesota South,2215,projected,4499,,4152,12233,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2813,NAD83(HARN) / Mississippi East,2216,projected,4499,,4152,12331,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2254 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2814,NAD83(HARN) / Mississippi West,2217,projected,4499,,4152,12332,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2255 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2815,NAD83(HARN) / Missouri East,2219,projected,4499,,4152,12431,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2816,NAD83(HARN) / Missouri Central,2218,projected,4499,,4152,12432,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2817,NAD83(HARN) / Missouri West,2220,projected,4499,,4152,12433,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2818,NAD83(HARN) / Montana,1395,projected,4499,,4152,12530,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in International feet (note: not US survey feet).  See code 2256 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2819,NAD83(HARN) / Nebraska,1396,projected,4499,,4152,12630,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2820,NAD83(HARN) / Nevada East,2224,projected,4499,,4152,12731,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2821,NAD83(HARN) / Nevada Central,2223,projected,4499,,4152,12732,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2822,NAD83(HARN) / Nevada West,2225,projected,4499,,4152,12733,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2823,NAD83(HARN) / New Hampshire,1398,projected,4499,,4152,12830,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2824,NAD83(HARN) / New Jersey,1399,projected,4499,,4152,12930,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2825,NAD83(HARN) / New Mexico East,2228,projected,4499,,4152,13031,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2257 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2826,NAD83(HARN) / New Mexico Central,2231,projected,4499,,4152,13032,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2258 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2827,NAD83(HARN) / New Mexico West,2232,projected,4499,,4152,13033,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2259 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2828,NAD83(HARN) / New York East,2234,projected,4499,,4152,13131,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2260 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2829,NAD83(HARN) / New York Central,2233,projected,4499,,4152,13132,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2261 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2830,NAD83(HARN) / New York West,2236,projected,4499,,4152,13133,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2263 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2831,NAD83(HARN) / New York Long Island,2235,projected,4499,,4152,13134,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2264 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2832,NAD83(HARN) / North Dakota North,2237,projected,4499,,4152,13331,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in International feet (note: not US survey feet).  See code 2265 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2833,NAD83(HARN) / North Dakota South,2238,projected,4499,,4152,13332,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in International feet (note: not US survey feet).  See code 2266 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2834,NAD83(HARN) / Ohio North,2239,projected,4499,,4152,13431,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2835,NAD83(HARN) / Ohio South,2240,projected,4499,,4152,13432,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2836,NAD83(HARN) / Oklahoma North,2241,projected,4499,,4152,13531,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2267 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2837,NAD83(HARN) / Oklahoma South,2242,projected,4499,,4152,13532,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2268 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2838,NAD83(HARN) / Oregon North,2243,projected,4499,,4152,13631,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in International feet (note: not US survey feet).  See code 2269 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2839,NAD83(HARN) / Oregon South,2244,projected,4499,,4152,13632,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in International feet (note: not US survey feet).  See code 2270 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2840,NAD83(HARN) / Rhode Island,1408,projected,4499,,4152,13830,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2841,NAD83(HARN) / South Dakota North,2249,projected,4499,,4152,14031,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2842,NAD83(HARN) / South Dakota South,2250,projected,4499,,4152,14032,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2843,NAD83(HARN) / Tennessee,1411,projected,4499,,4152,14130,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2274 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2844,NAD83(HARN) / Texas North,2253,projected,4499,,4152,14231,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2275 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2845,NAD83(HARN) / Texas North Central,2254,projected,4499,,4152,14232,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2276 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2846,NAD83(HARN) / Texas Central,2252,projected,4499,,4152,14233,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2277 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2847,NAD83(HARN) / Texas South Central,2527,projected,4499,,4152,14234,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2278 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2848,NAD83(HARN) / Texas South,2528,projected,4499,,4152,14235,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2279 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2849,NAD83(HARN) / Utah North,2258,projected,4499,,4152,14331,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in International feet (note: not US survey feet).  See code 2280 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2850,NAD83(HARN) / Utah Central,2257,projected,4499,,4152,14332,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in International feet (note: not US survey feet).  See code 2281 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2851,NAD83(HARN) / Utah South,2259,projected,4499,,4152,14333,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in International feet (note: not US survey feet).  See code 2282 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2852,NAD83(HARN) / Vermont,1414,projected,4499,,4152,14430,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2853,NAD83(HARN) / Virginia North,2260,projected,4499,,4152,14531,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2283 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2854,NAD83(HARN) / Virginia South,2261,projected,4499,,4152,14532,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2284 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2855,NAD83(HARN) / Washington North,2273,projected,4499,,4152,14631,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2285 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2856,NAD83(HARN) / Washington South,2274,projected,4499,,4152,14632,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2286 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2857,NAD83(HARN) / West Virginia North,2264,projected,4499,,4152,14731,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2858,NAD83(HARN) / West Virginia South,2265,projected,4499,,4152,14732,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2859,NAD83(HARN) / Wisconsin North,2267,projected,4499,,4152,14831,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2287 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2860,NAD83(HARN) / Wisconsin Central,2266,projected,4499,,4152,14832,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2288 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2861,NAD83(HARN) / Wisconsin South,2268,projected,4499,,4152,14833,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2289 for equivalent non-metric definition.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2862,NAD83(HARN) / Wyoming East,2269,projected,4499,,4152,14931,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2863,NAD83(HARN) / Wyoming East Central,2270,projected,4499,,4152,14932,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2864,NAD83(HARN) / Wyoming West Central,2272,projected,4499,,4152,14933,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2865,NAD83(HARN) / Wyoming West,2271,projected,4499,,4152,14934,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2866,NAD83(HARN) / Puerto Rico & Virgin Is.,2251,projected,4499,,4152,15230,,,Large and medium scale topographic mapping and engineering survey.,,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2867,NAD83(HARN) / Arizona East (ft),2167,projected,4495,,4152,15304,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in International feet (note: not US survey feet).  Federal definition is metric - see code 26948.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2868,NAD83(HARN) / Arizona Central (ft),2166,projected,4495,,4152,15305,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in International feet (note: not US survey feet).  Federal definition is metric - see code 26949.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2869,NAD83(HARN) / Arizona West (ft),2168,projected,4495,,4152,15306,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in International feet (note: not US survey feet).  Federal definition is metric - see code 26950.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2870,NAD83(HARN) / California zone 1 (ftUS),2175,projected,4497,,4152,15307,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 26941.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2871,NAD83(HARN) / California zone 2 (ftUS),2176,projected,4497,,4152,15308,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 26942.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2872,NAD83(HARN) / California zone 3 (ftUS),2177,projected,4497,,4152,15309,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 26943.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2873,NAD83(HARN) / California zone 4 (ftUS),2178,projected,4497,,4152,15310,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 26944.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2874,NAD83(HARN) / California zone 5 (ftUS),2182,projected,4497,,4152,15311,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 26945.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2875,NAD83(HARN) / California zone 6 (ftUS),2180,projected,4497,,4152,15312,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 26946.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2876,NAD83(HARN) / Colorado North (ftUS),2184,projected,4497,,4152,15313,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 26953.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2877,NAD83(HARN) / Colorado Central (ftUS),2183,projected,4497,,4152,15314,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 26954.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2878,NAD83(HARN) / Colorado South (ftUS),2185,projected,4497,,4152,15315,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 26955.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2879,NAD83(HARN) / Connecticut (ftUS),1377,projected,4497,,4152,15316,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 26956.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2880,NAD83(HARN) / Delaware (ftUS),1378,projected,4497,,4152,15317,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 26957.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2881,NAD83(HARN) / Florida East (ftUS),2186,projected,4497,,4152,15318,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 26958.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2882,NAD83(HARN) / Florida West (ftUS),2188,projected,4497,,4152,15319,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 26959.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2883,NAD83(HARN) / Florida North (ftUS),2187,projected,4497,,4152,15320,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 26960.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2884,NAD83(HARN) / Georgia East (ftUS),2189,projected,4497,,4152,15321,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 26966.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2885,NAD83(HARN) / Georgia West (ftUS),2190,projected,4497,,4152,15322,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 26967.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2886,NAD83(HARN) / Idaho East (ftUS),2192,projected,4497,,4152,15323,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 26968.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2887,NAD83(HARN) / Idaho Central (ftUS),2191,projected,4497,,4152,15324,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 26969.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2888,NAD83(HARN) / Idaho West (ftUS),2193,projected,4497,,4152,15325,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 26970.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2889,NAD83(HARN) / Indiana East (ftUS),2196,projected,4497,,4152,15326,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 26973.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2890,NAD83(HARN) / Indiana West (ftUS),2197,projected,4497,,4152,15327,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 26974.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2891,NAD83(HARN) / Kentucky North (ftUS),2202,projected,4497,,4152,15328,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 26979.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2892,NAD83(HARN) / Kentucky South (ftUS),2203,projected,4497,,4152,15329,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 26980.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2893,NAD83(HARN) / Maryland (ftUS),1389,projected,4497,,4152,15330,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 26985.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2894,NAD83(HARN) / Massachusetts Mainland (ftUS),2209,projected,4497,,4152,15331,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 26986.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2895,NAD83(HARN) / Massachusetts Island (ftUS),2208,projected,4497,,4152,15332,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 26987.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2896,NAD83(HARN) / Michigan North (ft),1723,projected,4495,,4152,15333,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in International feet (note: not US survey feet).  Federal definition is metric - see code 26988.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2897,NAD83(HARN) / Michigan Central (ft),1724,projected,4495,,4152,15334,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in International feet (note: not US survey feet).  Federal definition is metric - see code 26989.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2898,NAD83(HARN) / Michigan South (ft),1725,projected,4495,,4152,15335,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in International feet (note: not US survey feet).  Federal definition is metric - see code 26990.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2899,NAD83(HARN) / Mississippi East (ftUS),2216,projected,4497,,4152,15336,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 26994.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2900,NAD83(HARN) / Mississippi West (ftUS),2217,projected,4497,,4152,15337,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 26995.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2901,NAD83(HARN) / Montana (ft),1395,projected,4495,,4152,15338,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in International feet (note: not US survey feet).  Federal definition is metric - see code 32100.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2902,NAD83(HARN) / New Mexico East (ftUS),2228,projected,4497,,4152,15339,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 32112.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2903,NAD83(HARN) / New Mexico Central (ftUS),2231,projected,4497,,4152,15340,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 32113.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2904,NAD83(HARN) / New Mexico West (ftUS),2232,projected,4497,,4152,15341,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 32114.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2905,NAD83(HARN) / New York East (ftUS),2234,projected,4497,,4152,15342,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 32115.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2906,NAD83(HARN) / New York Central (ftUS),2233,projected,4497,,4152,15343,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 32116.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2907,NAD83(HARN) / New York West (ftUS),2236,projected,4497,,4152,15344,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 32117.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2908,NAD83(HARN) / New York Long Island (ftUS),2235,projected,4497,,4152,15345,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 32118.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2909,NAD83(HARN) / North Dakota North (ft),2237,projected,4495,,4152,15347,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in International feet (note: not US survey feet).  Federal definition is metric - see code 32120.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2910,NAD83(HARN) / North Dakota South (ft),2238,projected,4495,,4152,15348,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in International feet (note: not US survey feet).  Federal definition is metric - see code 32121.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2911,NAD83(HARN) / Oklahoma North (ftUS),2241,projected,4497,,4152,15349,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 32124.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2912,NAD83(HARN) / Oklahoma South (ftUS),2242,projected,4497,,4152,15350,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 32125.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2913,NAD83(HARN) / Oregon North (ft),2243,projected,4495,,4152,15351,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in International feet (note: not US survey feet).  Federal definition is metric - see code 32126.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2914,NAD83(HARN) / Oregon South (ft),2244,projected,4495,,4152,15352,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in International feet (note: not US survey feet).  Federal definition is metric - see code 32127.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2915,NAD83(HARN) / Tennessee (ftUS),1411,projected,4497,,4152,15356,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 32136.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2916,NAD83(HARN) / Texas North (ftUS),2253,projected,4497,,4152,15357,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 32137.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2917,NAD83(HARN) / Texas North Central (ftUS),2254,projected,4497,,4152,15358,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 32138.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2918,NAD83(HARN) / Texas Central (ftUS),2252,projected,4497,,4152,15359,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 32139.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2919,NAD83(HARN) / Texas South Central (ftUS),2527,projected,4497,,4152,15360,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 32140.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2920,NAD83(HARN) / Texas South (ftUS),2528,projected,4497,,4152,15361,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 32141.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2921,NAD83(HARN) / Utah North (ft),2258,projected,4495,,4152,15362,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in International feet (note: not US survey feet).  Federal definition is metric - see code 32142.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2922,NAD83(HARN) / Utah Central (ft),2257,projected,4495,,4152,15363,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in International feet (note: not US survey feet).  Federal definition is metric - see code 32143.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2923,NAD83(HARN) / Utah South (ft),2259,projected,4495,,4152,15364,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in International feet (note: not US survey feet).  Federal definition is metric - see code 32144.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2924,NAD83(HARN) / Virginia North (ftUS),2260,projected,4497,,4152,15365,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 32146.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2925,NAD83(HARN) / Virginia South (ftUS),2261,projected,4497,,4152,15366,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 32147.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2926,NAD83(HARN) / Washington North (ftUS),2273,projected,4497,,4152,15367,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 32148.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2927,NAD83(HARN) / Washington South (ftUS),2274,projected,4497,,4152,15368,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 32149.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2928,NAD83(HARN) / Wisconsin North (ftUS),2267,projected,4497,,4152,15369,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 32152.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2929,NAD83(HARN) / Wisconsin Central (ftUS),2266,projected,4497,,4152,15370,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 32153.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2930,NAD83(HARN) / Wisconsin South (ftUS),2268,projected,4497,,4152,15371,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  Federal definition is metric - see code 32154.,National Geodetic Survey,EPSG,2002-06-22 00:00:00,,1,0
-2931,Beduaram / TM 13 NE,2771,projected,4497,,4213,16413,,,Oil exploration.,Used by Elf in 1986.,TotalFinaElf,EPSG,2002-06-28 00:00:00,,1,0
-2932,QND95 / Qatar National Grid,1346,projected,4400,,4614,19919,,,Large and medium scale topographic mapping and engineering survey.,,Qatar Centre for Geographic Information.,EPSG,2002-06-28 00:00:00,,1,0
-2933,Segara / UTM zone 50S,1328,projected,4400,,4613,16150,,,Large and medium scale topographic mapping and engineering survey.,,TotalFinaElf,EPSG,2002-06-22 00:00:00,,1,0
-2934,Segara (Jakarta) / NEIEZ,1360,projected,4499,,4820,19905,,,Large and medium scale topographic mapping and engineering survey.,,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-2935,Pulkovo 1942 / CS63 zone A1,2772,projected,4530,,4284,18441,,,"Large scale topographic mapping, cadastral and engineering survey.",,EPSG,EPSG,2002-06-28 00:00:00,,1,0
-2936,Pulkovo 1942 / CS63 zone A2,2773,projected,4530,,4284,18442,,,"Large scale topographic mapping, cadastral and engineering survey.",,EPSG,EPSG,2002-06-28 00:00:00,,1,0
-2937,Pulkovo 1942 / CS63 zone A3,2774,projected,4530,,4284,18443,,,"Large scale topographic mapping, cadastral and engineering survey.",,EPSG,EPSG,2002-06-28 00:00:00,,1,0
-2938,Pulkovo 1942 / CS63 zone A4,2775,projected,4530,,4284,18444,,,"Large scale topographic mapping, cadastral and engineering survey.",,EPSG,EPSG,2002-06-28 00:00:00,,1,0
-2939,Pulkovo 1942 / CS63 zone K2,2776,projected,4530,,4284,18446,,,"Large scale topographic mapping, cadastral and engineering survey.",,EPSG,EPSG,2002-06-28 00:00:00,,1,0
-2940,Pulkovo 1942 / CS63 zone K3,2777,projected,4530,,4284,18447,,,"Large scale topographic mapping, cadastral and engineering survey.",,EPSG,EPSG,2002-06-28 00:00:00,,1,0
-2941,Pulkovo 1942 / CS63 zone K4,2778,projected,4530,,4284,18448,,,"Large scale topographic mapping, cadastral and engineering survey.",,EPSG,EPSG,2002-06-28 00:00:00,,1,0
-2942,Porto Santo / UTM zone 28N,1314,projected,4400,,4615,16028,,,Topographic mapping.,,Instituto Geografico e Cadastral Lisbon; http://www.ipcc.pt,EPSG,2002-07-13 00:00:00,,1,0
-2943,Selvagem Grande / UTM zone 28N,2779,projected,4400,,4616,16028,,,Topographic mapping.,,Instituto Geografico e Cadastral Lisbon; http://www.ipcc.pt,EPSG,2002-07-13 00:00:00,,1,0
-2944,NAD83(CSRS) / SCoPQ zone 2,1420,projected,4499,,4617,17700,,,Large and medium scale topographic mapping and engineering survey.,,Topographic Mapping Section; Quebec Ministry of Natural Resources.,EPSG,2002-07-13 00:00:00,,1,0
-2945,NAD83(CSRS) / MTM zone 3,1421,projected,4496,,4617,17703,,,Large and medium scale topographic mapping and engineering survey.,"Known in Quebec as ""NAD83(CSRS98) / SCoPQ zone 3"" with axis 1 and 2 abbreviations of ""X"" and ""Y"" respectively.",Topographic Mapping Section; Quebec Ministry of Natural Resources.,EPSG,2002-07-13 00:00:00,,1,0
-2946,NAD83(CSRS) / MTM zone 4,1422,projected,4496,,4617,17704,,,Large and medium scale topographic mapping and engineering survey.,"Known in Quebec as ""NAD83(CSRS98) / SCoPQ zone 4"" with axis 1 and 2 abbreviations of ""X"" and ""Y"" respectively.",Topographic Mapping Section; Quebec Ministry of Natural Resources.,EPSG,2002-07-13 00:00:00,,1,0
-2947,NAD83(CSRS) / MTM zone 5,1423,projected,4496,,4617,17705,,,Large and medium scale topographic mapping and engineering survey.,"Known in Quebec as ""NAD83(CSRS98) / SCoPQ zone 5"" with axis 1 and 2 abbreviations of ""X"" and ""Y"" respectively.",Topographic Mapping Section; Quebec Ministry of Natural Resources.,EPSG,2002-07-13 00:00:00,,1,0
-2948,NAD83(CSRS) / MTM zone 6,1424,projected,4496,,4617,17706,,,Large and medium scale topographic mapping and engineering survey.,"Known in Quebec as ""NAD83(CSRS98) / SCoPQ zone 6"" with axis 1 and 2 abbreviations of ""X"" and ""Y"" respectively.",Topographic Mapping Section; Quebec Ministry of Natural Resources.,EPSG,2002-07-13 00:00:00,,1,0
-2949,NAD83(CSRS) / MTM zone 7,1425,projected,4496,,4617,17707,,,Large and medium scale topographic mapping and engineering survey.,"Known in Quebec as ""NAD83(CSRS98) / SCoPQ zone 7"" with axis 1 and 2 abbreviations of ""X"" and ""Y"" respectively.",Topographic Mapping Section; Quebec Ministry of Natural Resources.,EPSG,2002-07-13 00:00:00,,1,0
-2950,NAD83(CSRS) / MTM zone 8,1426,projected,4496,,4617,17708,,,Large and medium scale topographic mapping and engineering survey.,"Known in Quebec as ""NAD83(CSRS98) / SCoPQ zone 8"" with axis 1 and 2 abbreviations of ""X"" and ""Y"" respectively.",Topographic Mapping Section; Quebec Ministry of Natural Resources.,EPSG,2002-07-13 00:00:00,,1,0
-2951,NAD83(CSRS) / MTM zone 9,1427,projected,4496,,4617,17709,,,Large and medium scale topographic mapping and engineering survey.,"Known in Quebec as ""NAD83(CSRS98) / SCoPQ zone 9"" with axis 1 and 2 abbreviations of ""X"" and ""Y"" respectively.",Topographic Mapping Section; Quebec Ministry of Natural Resources.,EPSG,2002-07-13 00:00:00,,1,0
-2952,NAD83(CSRS) / MTM zone 10,1428,projected,4496,,4617,17710,,,Large and medium scale topographic mapping and engineering survey.,"Known in Quebec as ""NAD83(CSRS98) / SCoPQ zone 10"" with axis 1 and 2 abbreviations of ""X"" and ""Y"" respectively.",Topographic Mapping Section; Quebec Ministry of Natural Resources.,EPSG,2002-07-13 00:00:00,,1,0
-2953,NAD83(CSRS) / New Brunswick Stereo,1447,projected,4500,,4617,19946,,,Large and medium scale topographic mapping and engineering survey.,In use from 1999.,Service New Brunswick Land and Information Standards Manual,EPSG,2002-07-13 00:00:00,,1,0
-2954,NAD83(CSRS) / Prince Edward Isl. Stereographic (NAD83),1533,projected,4496,,4617,19960,,,Large and medium scale topographic mapping and engineering survey.,,PEI Department of Transportation & Public Works,EPSG,2002-07-13 00:00:00,,1,0
-2955,NAD83(CSRS) / UTM zone 11N,1508,projected,4400,,4617,16011,,,Large and medium scale topographic mapping and engineering survey.,In use from 2000.,Geomatics Canada.,EPSG,2002-07-13 00:00:00,,1,0
-2956,NAD83(CSRS) / UTM zone 12N,1507,projected,4400,,4617,16012,,,Large and medium scale topographic mapping and engineering survey.,In use from 2000.,Geomatics Canada.,EPSG,2002-07-13 00:00:00,,1,0
-2957,NAD83(CSRS) / UTM zone 13N,1506,projected,4400,,4617,16013,,,Large and medium scale topographic mapping and engineering survey.,In use from 2000.,Geomatics Canada.,EPSG,2002-07-13 00:00:00,,1,0
-2958,NAD83(CSRS) / UTM zone 17N,1428,projected,4400,,4617,16017,,,Large and medium scale topographic mapping and engineering survey.,In use from 2000.,Geomatics Canada.,EPSG,2002-07-13 00:00:00,,1,0
-2959,NAD83(CSRS) / UTM zone 18N,1443,projected,4400,,4617,16018,,,Large and medium scale topographic mapping and engineering survey.,In use from 2000.,Geomatics Canada.,EPSG,2002-07-13 00:00:00,,1,0
-2960,NAD83(CSRS) / UTM zone 19N,1448,projected,4400,,4617,16019,,,Large and medium scale topographic mapping and engineering survey.,In use from 1999.,Service New Brunswick Land and Information Standards Manual,EPSG,2002-07-13 00:00:00,,1,0
-2961,NAD83(CSRS) / UTM zone 20N,1449,projected,4400,,4617,16020,,,Large and medium scale topographic mapping and engineering survey.,In use from 1999.,Service New Brunswick Land and Information Standards Manual,EPSG,2002-07-13 00:00:00,,1,0
-2962,NAD83(CSRS) / UTM zone 21N,1446,projected,4400,,4617,16021,,,Large and medium scale topographic mapping and engineering survey.,In use from 2000.,Geomatics Canada.,EPSG,2002-07-13 00:00:00,,1,0
-2963,Lisbon 1890 (Lisbon) / Portugal Bonne,1294,projected,6509,,4904,19979,,,Medium scale topographic mapping.,,Instituto Geografico e Cadastral Lisbon; http://www.ipcc.pt/portuguese/produtos/cartografia/50m.html,EPSG,2002-07-13 00:00:00,,1,0
-3036,Moznet / UTM zone 36S,1540,projected,4400,,4130,16136,,,Large and medium scale topographic mapping and engineering survey.,,Direc��o Nacional de Geografia e Cadastral (DINAGECA).,EPSG,1998-04-16 00:00:00,,1,0
-3037,Moznet / UTM zone 37S,1541,projected,4400,,4130,16137,,,Large and medium scale topographic mapping and engineering survey.,,Direc��o Nacional de Geografia e Cadastral (DINAGECA).,EPSG,1998-04-16 00:00:00,,1,0
-3148,Indian 1960 / UTM zone 48N,1542,projected,4400,,4131,16048,,,Large and medium scale topographic mapping and engineering survey.,In Vietnam superseded by Hanoi 72 / Gauss zone 18 from 1988 onwards.,,EPSG,1998-11-11 00:00:00,,1,0
-3149,Indian 1960 / UTM zone 49N,1453,projected,4400,,4131,16049,,,Large and medium scale topographic mapping and engineering survey.,Superseded by Hanoi 72 / Gauss zone 18 from 1988 onwards.,,EPSG,1998-11-11 00:00:00,,1,0
-3176,Indian 1960 / TM 106 NE,1495,projected,4400,,4131,16506,,,Used by Petrovietnam for offshore block 15.,,Petrovietnam,EPSG,1998-11-11 00:00:00,,1,0
-3200,FD58 / Iraq zone,1300,projected,4400,,4132,19906,,,Large and medium scale topographic mapping and engineering survey.,,IOEPC records.,EPSG,1998-11-11 00:00:00,,1,0
-3300,Estonian Coordinate System of 1992,1090,projected,4530,,4133,19938,,,Used for 1:20000 and larger scale mapping.,Superseded by Estonian Coordinate System of 1997 (code 3301).,http://www.geo.ut.ee/~raivo/estcoord.html,EPSG,1998-12-14 00:00:00,,1,0
-3301,Estonian Coordinate System of 1997,1090,projected,4530,,4180,19938,,,Used for 1:20000 and larger scale mapping.,Supersedes Estonian Coordinate System of 1992 (code 3300).,Estonian National Land Board via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-3439,PSD93 / UTM zone 39N,1544,projected,4400,,4134,16039,,,Oil exploration and production.,Supersedes Fahud / UTM zone 39N projCS (code 23239). Maximum differences to Fahud adjustment are 20 metres.,Petroleum Development Oman,EPSG,1999-04-22 00:00:00,,1,0
-3440,PSD93 / UTM zone 40N,1545,projected,4400,,4134,16040,,,Oil exploration and production.,Supersedes Fahud / UTM zone 40N projCS (code 23240). Maximum differences to Fahud adjustment are 20 metres.,Petroleum Development Oman,EPSG,1999-04-22 00:00:00,,1,0
-3561,Old Hawaiian / Hawaii zone 1,1546,projected,4497,,4135,15101,,,Large and medium scale topographic mapping and engineering survey.,Sometimes erroneously referred to as NAD27 / Hawaii zone 1.,,EPSG,1999-05-24 00:00:00,99.322,1,0
-3562,Old Hawaiian / Hawaii zone 2,1547,projected,4497,,4135,15102,,,Large and medium scale topographic mapping and engineering survey.,Sometimes erroneously referred to as NAD27 / Hawaii zone 2.,,EPSG,1999-05-24 00:00:00,99.322,1,0
-3563,Old Hawaiian / Hawaii zone 3,1548,projected,4497,,4135,15103,,,Large and medium scale topographic mapping and engineering survey.,Sometimes erroneously referred to as NAD27 / Hawaii zone 3.,,EPSG,1999-05-24 00:00:00,99.322,1,0
-3564,Old Hawaiian / Hawaii zone 4,1549,projected,4497,,4135,15104,,,Large and medium scale topographic mapping and engineering survey.,Sometimes erroneously referred to as NAD27 / Hawaii zone 4.,,EPSG,1999-05-24 00:00:00,99.322,1,0
-3565,Old Hawaiian / Hawaii zone 5,1550,projected,4497,,4135,15105,,,Large and medium scale topographic mapping and engineering survey.,Sometimes erroneously referred to as NAD27 / Hawaii zone 5.,,EPSG,1999-05-24 00:00:00,99.322,1,0
-3920,Puerto Rico / UTM zone 20N,1253,projected,4400,,4139,16020,,,Large and medium scale topographic mapping and engineering survey.,NAD27 / UTM zone 20 N (code 26720) used for military purposes.,Ordnance Survey of Great Britain,EPSG,1999-04-22 00:00:00,,1,0
-3991,Puerto Rico State Plane CS of 1927,1194,projected,4497,,4139,15201,,,Large and medium scale topographic mapping and engineering survey.,Sometimes erroneously referred to as NAD27 / Puerto Rico State Plane CS.,US National Geodetic Survey,EPSG,1999-05-24 00:00:00,99.323,1,0
-3992,Puerto Rico / St. Croix,1254,projected,4497,,4139,15202,,,Large and medium scale topographic mapping and engineering survey.,Sometimes erroneously referred to as NAD27 / St. Croix State Plane CS.,US National Geodetic Survey,EPSG,1999-05-24 00:00:00,99.323,1,0
-4001,Unknown datum based upon the Airy 1830 ellipsoid,1263,geographic 2D,6402,6001,,,,,Not recommended.,Use only in cases where geodetic datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0,0
-4002,Unknown datum based upon the Airy Modified 1849 ellipsoid,1263,geographic 2D,6402,6002,,,,,Not recommended.,Use only in cases where geodetic datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0,0
-4003,Unknown datum based upon the Australian National Spheroid,1263,geographic 2D,6402,6003,,,,,Not recommended.,Use only in cases where geodetic datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0,0
-4004,Unknown datum based upon the Bessel 1841 ellipsoid,1263,geographic 2D,6402,6004,,,,,Not recommended.,Use only in cases where geodetic datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0,0
-4005,Unknown datum based upon the Bessel Modified ellipsoid,1263,geographic 2D,6402,6005,,,,,Not recommended.,Use only in cases where geodetic datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0,0
-4006,Unknown datum based upon the Bessel Namibia ellipsoid,1263,geographic 2D,6402,6006,,,,,Not recommended.,Use only in cases where geodetic datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0,0
-4007,Unknown datum based upon the Clarke 1858 ellipsoid,1263,geographic 2D,6402,6007,,,,,Not recommended.,Use only in cases where geodetic datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0,0
-4008,Unknown datum based upon the Clarke 1866 ellipsoid,1263,geographic 2D,6402,6008,,,,,Not recommended.,Use only in cases where geodetic datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0,0
-4009,Unknown datum based upon the Clarke 1866 Michigan ellipsoid,1263,geographic 2D,6402,6009,,,,,Not recommended.,Use only in cases where geodetic datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0,0
-4010,Unknown datum based upon the Clarke 1880 (Benoit) ellipsoid,1263,geographic 2D,6402,6010,,,,,Not recommended.,Use only in cases where geodetic datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0,0
-4011,Unknown datum based upon the Clarke 1880 (IGN) ellipsoid,1263,geographic 2D,6402,6011,,,,,Not recommended.,Use only in cases where geodetic datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0,0
-4012,Unknown datum based upon the Clarke 1880 (RGS) ellipsoid,1263,geographic 2D,6402,6012,,,,,Not recommended.,Use only in cases where geodetic datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0,0
-4013,Unknown datum based upon the Clarke 1880 (Arc) ellipsoid,1263,geographic 2D,6402,6013,,,,,Not recommended.,Use only in cases where geodetic datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0,0
-4014,Unknown datum based upon the Clarke 1880 (SGA 1922) ellipsoid,1263,geographic 2D,6402,6014,,,,,Not recommended.,Use only in cases where geodetic datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0,0
-4015,Unknown datum based upon the Everest 1830 (1937 Adjustment) ellipsoid,1263,geographic 2D,6402,6015,,,,,Not recommended.,Use only in cases where geodetic datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0,0
-4016,Unknown datum based upon the Everest 1830 (1967 Definition) ellipsoid,1263,geographic 2D,6402,6016,,,,,Not recommended.,Use only in cases where geodetic datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0,0
-4018,Unknown datum based upon the Everest 1830 Modified ellipsoid,1263,geographic 2D,6402,6018,,,,,Not recommended.,Use only in cases where geodetic datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0,0
-4019,Unknown datum based upon the GRS 1980 ellipsoid,1263,geographic 2D,6402,6019,,,,,Not recommended.,Use only in cases where geodetic datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0,0
-4020,Unknown datum based upon the Helmert 1906 ellipsoid,1263,geographic 2D,6402,6020,,,,,Not recommended.,Use only in cases where geodetic datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0,0
-4021,Unknown datum based upon the Indonesian National Spheroid,1263,geographic 2D,6402,6021,,,,,Not recommended.,Use only in cases where geodetic datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0,0
-4022,Unknown datum based upon the International 1924 ellipsoid,1263,geographic 2D,6402,6022,,,,,Not recommended.,Use only in cases where geodetic datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0,0
-4024,Unknown datum based upon the Krassowsky 1940 ellipsoid,1263,geographic 2D,6402,6024,,,,,Not recommended.,Use only in cases where geodetic datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0,0
-4025,Unknown datum based upon the NWL 9D ellipsoid,1263,geographic 2D,6402,6025,,,,,Not recommended.,Use only in cases where geodetic datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0,0
-4027,Unknown datum based upon the Plessis 1817 ellipsoid,1263,geographic 2D,6402,6027,,,,,Not recommended.,Use only in cases where geodetic datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0,0
-4028,Unknown datum based upon the Struve 1860 ellipsoid,1263,geographic 2D,6402,6028,,,,,Not recommended.,Use only in cases where geodetic datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0,0
-4029,Unknown datum based upon the War Office ellipsoid,1263,geographic 2D,6402,6029,,,,,Not recommended.,Use only in cases where geodetic datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0,0
-4030,Unknown datum based upon the WGS 84 ellipsoid,1263,geographic 2D,6402,6030,,,,,Not recommended.,Use only in cases where geodetic datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0,0
-4031,Unknown datum based upon the GEM 10C ellipsoid,1263,geographic 2D,6402,6031,,,,,Not recommended.,Use only in cases where geodetic datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0,0
-4032,Unknown datum based upon the OSU86F ellipsoid,1263,geographic 2D,6402,6032,,,,,Not recommended.,Use only in cases where geodetic datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0,0
-4033,Unknown datum based upon the OSU91A ellipsoid,1263,geographic 2D,6402,6033,,,,,Not recommended.,Use only in cases where geodetic datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0,0
-4034,Unknown datum based upon the Clarke 1880 ellipsoid,1263,geographic 2D,6402,6034,,,,,Not recommended.,Use only in cases where geodetic datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0,0
-4035,Unknown datum based upon the Authalic Sphere,1263,geographic 2D,6402,6035,,,,,Not recommended.,Deprecated. Use code 4047.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0,1
-4036,Unknown datum based upon the GRS 1967 ellipsoid,1263,geographic 2D,6402,6036,,,,,Not recommended.,Use only in cases where geodetic datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,2000.42,0,0
-4041,Unknown datum based upon the Average Terrestrial System 1977 ellipsoid,1263,geographic 2D,6402,6041,,,,,Not recommended.,Use only in cases where geodetic datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,2000.42,0,0
-4042,Unknown datum based upon the Everest (1830 Definition) ellipsoid,1263,geographic 2D,6402,6042,,,,,Not recommended.,Use only in cases where geodetic datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,2000.42,0,0
-4043,Unknown datum based upon the WGS 72 ellipsoid,1263,geographic 2D,6402,6043,,,,,Not recommended.,Use only in cases where geodetic datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,2000.42,0,0
-4044,Unknown datum based upon the Everest 1830 (1962 Definition) ellipsoid,1263,geographic 2D,6402,6044,,,,,Not recommended.,Use only in cases where geodetic datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,2000.42,0,0
-4045,Unknown datum based upon the Everest 1830 (1975 Definition) ellipsoid,1263,geographic 2D,6402,6045,,,,,Not recommended.,Use only in cases where geodetic datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,2000.42,0,0
-4047,Unspecified based upon the GRS 1980 Authalic Sphere,1263,geographic 2D,6402,6047,,,,,Small scale statistical mapping.,Use only in cases where geodetic datum is unknown.,EPSG,EPSG,2001-06-05 00:00:00,,0,0
-4120,Greek,1106,geographic 2D,6402,6120,,,,,Geodetic survey.,,Topography Department; National Technical University of Greece.,EPSG,1997-06-16 00:00:00,,1,0
-4121,GGRS87,1106,geographic 2D,6402,6121,,,,,Geodetic survey.,,Geodesy Department; Public Petroleum Corporation of Greece.,EPSG,1997-06-16 00:00:00,,1,0
-4122,ATS77,1283,geographic 2D,6402,6122,,,,,Geodetic survey.,In use from 1979.  To be phased out in late 1990's.,New Brunswick Geographic Information Corporation land and water information standards manual.,EPSG,1997-07-22 00:00:00,,1,0
-4123,KKJ,1095,geographic 2D,6402,6123,,,,,Geodetic survey.,,www.nls.fi/maa/papers/kkj.html,EPSG,1997-07-22 00:00:00,,1,0
-4124,RT90,1225,geographic 2D,6402,6124,,,,,Geodetic survey.,,National Land Survey of Sweden,EPSG,1997-11-13 00:00:00,,1,0
-4125,Samboja,1328,geographic 2D,6402,6125,,,,,Geodetic survey.,,,EPSG,1997-11-13 00:00:00,,1,1
-4126,LKS94 (ETRS89),1145,geographic 2D,6402,6126,,,,,Geodetic survey.,,,EPSG,1998-03-13 00:00:00,,1,0
-4127,Tete,1167,geographic 2D,6402,6127,,,,,Geodetic survey.,,Direc��o Nacional de Geografia e Cadastral (DINAGECA).,EPSG,1998-04-16 00:00:00,,1,0
-4128,Madzansua,1315,geographic 2D,6402,6128,,,,,Geodetic survey.,Superseded by values transformed to Tete geogCS (code 4127).,Direc��o Nacional de Geografia e Cadastral (DINAGECA).,EPSG,1998-04-16 00:00:00,,1,0
-4129,Observatario,1329,geographic 2D,6402,6129,,,,,Geodetic survey.,Superseded by values transformed to Tete geogCS (code 4127).,Direc��o Nacional de Geografia e Cadastral (DINAGECA).,EPSG,1998-04-16 00:00:00,,1,0
-4130,Moznet,1167,geographic 2D,6402,6130,,,,,Geodetic survey.,,Direc��o Nacional de Geografia e Cadastral (DINAGECA).,EPSG,1998-04-16 00:00:00,,1,0
-4131,Indian 1960,1302,geographic 2D,6402,6131,,,,,Geodetic survey.,,,EPSG,1998-11-11 00:00:00,,1,0
-4132,FD58,1300,geographic 2D,6402,6132,,,,,Geodetic survey.,,IOEPC records.,EPSG,1998-11-11 00:00:00,,1,0
-4133,EST92,1090,geographic 2D,6402,6133,,,,,Geodetic survey.,Superseded by EST97 (code 4180).,http://www.geo.ut.ee/~raivo/estcoord.html,EPSG,1998-12-14 00:00:00,,1,0
-4134,PDO Survey Datum 1993,1183,geographic 2D,6402,6134,,,,,Geodetic survey.,Supersedes Fahud geogCS (code 4232). Maximum differences to Fahud adjustment are 20 metres.,Petroleum Development Oman,EPSG,1999-04-22 00:00:00,,1,0
-4135,Old Hawaiian,1334,geographic 2D,6402,6135,,,,,Geodetic survey.,Note: this coordinate system includes longitudes which are POSITIVE EAST.,,EPSG,1999-05-24 00:00:00,,1,0
-4136,St. Lawrence Island,1332,geographic 2D,6402,6136,,,,,Geodetic survey.,Note: this coordinate system includes longitudes which are POSITIVE EAST.,,EPSG,1999-05-24 00:00:00,,1,0
-4137,St. Paul Island,1333,geographic 2D,6402,6137,,,,,Geodetic survey.,Note: this coordinate system includes longitudes which are POSITIVE EAST.,,EPSG,1999-05-24 00:00:00,,1,0
-4138,St. George Island,1331,geographic 2D,6402,6138,,,,,Geodetic survey.,Note: this coordinate system includes longitudes which are POSITIVE EAST.,,EPSG,1999-05-24 00:00:00,,1,0
-4139,Puerto Rico,1335,geographic 2D,6402,6139,,,,,Geodetic surveying for civilian purposes.,NAD27 (code 4267) used for military purposes.  Note: this coordinate system includes longitudes which are POSITIVE EAST.,,EPSG,1999-05-24 00:00:00,,1,0
-4140,NAD83(CSRS98),1336,geographic 2D,6402,6140,,,,,Geodetic survey.,In New Brunswick superseded ATS77 from 1999.,Service New Brunswick Land and Information Standards Manual,EPSG,2000-10-19 00:00:00,99.90,1,1
-4141,Israel,2603,geographic 2D,6402,6141,,,,,Geodetic survey.,Supersedes Palestine 1923.,Survey of Israel,EPSG,2002-06-22 00:00:00,2002.34,1,0
-4142,Locodjo 1965,1075,geographic 2D,6402,6142,,,,,Geodetic survey.,Superseded by Abidjan 1987 (EPSG code 4143).,IGN Paris,EPSG,1999-10-20 00:00:00,,1,0
-4143,Abidjan 1987,1075,geographic 2D,6402,6143,,,,,Geodetic survey.,Supersedes Locodjo 1965 (EPSG code 4142).,IGN Paris,EPSG,2001-06-05 00:00:00,2001.11,1,0
-4144,Kalianpur 1937,1308,geographic 2D,6402,6144,,,,,Geodetic survey.,Adopts 1937 metric conversion of 0.30479841 metres per Indian foot.,"G. Bomford; ""The Re-adjustment of the Indian Triangulation""; Survey of India Professional Paper 28; 1939.",EPSG,1999-10-20 00:00:00,,1,0
-4145,Kalianpur 1962,1184,geographic 2D,6402,6145,,,,,Geodetic survey.,Adopts 1962 metric conversion of 0.3047996 metres per Indian foot.,,EPSG,1999-10-20 00:00:00,,1,0
-4146,Kalianpur 1975,1121,geographic 2D,6402,6146,,,,,Geodetic survey.,Adopts 1975 metric conversion of 0.3047995 metres per Indian foot.,,EPSG,1999-10-20 00:00:00,,1,0
-4147,Hanoi 1972,1252,geographic 2D,6402,6147,,,,,Geodetic survey.,,,EPSG,1999-10-20 00:00:00,,1,0
-4148,Hartebeesthoek94,1215,geographic 2D,6402,6148,,,,,Geodetic survey.,Supersedes Cape (code 4222) from 1999.,Directorate of Surveys and Mapping; http://w3sli.wcape.gov.za/surveys/mapping/wgs84.htm,EPSG,2000-01-06 00:00:00,99.96  2000.04,1,0
-4149,CH1903,1286,geographic 2D,6402,6149,,,,,Geodetic survey.,,,EPSG,1999-10-20 00:00:00,,1,0
-4150,CH1903+,1286,geographic 2D,6402,6150,,,,,Geodetic survey.,,,EPSG,1999-10-20 00:00:00,,1,0
-4151,CHTRF95,1286,geographic 2D,6402,6151,,,,,Geodetic survey.,,,EPSG,1999-10-20 00:00:00,,1,0
-4152,NAD83(HARN),1337,geographic 2D,6402,6152,,,,,Geodetic survey.,,National Geodetic Survey,EPSG,1999-10-20 00:00:00,,1,0
-4153,Rassadiran,1338,geographic 2D,6402,6153,,,,,Geodetic survey.,,Total-Fina,EPSG,1999-10-20 00:00:00,,1,0
-4154,ED50(ED77),1123,geographic 2D,6402,6154,,,,,Geodetic survey.,,National Cartographic Centre of Iran,EPSG,1999-10-20 00:00:00,,1,0
-4155,Dabola 1981,1112,geographic 2D,6402,6155,,,,,Geodetic survey.,Supersedes Conakry 1905 (EPSG code 4315).,IGN Paris,EPSG,1999-12-09 00:00:00,,1,0
-4156,S-JTSK,1306,geographic 2D,6402,6156,,,,,Geodetic survey.,"S-JTSK is the Uniform Trigonometric Cadastral Network.  It is a modification of the Austrian MGI geogCRS, code 4312.",Research Institute for Geodesy Topography and Cartography (VUGTK); Prague.,EPSG,2001-08-28 00:00:00,2001.26,1,0
-4157,Mount Dillon,1322,geographic 2D,6402,6157,,,,,Geodetic survey.,,University of the West Indies Geodetic Services.,EPSG,2000-03-07 00:00:00,,1,0
-4158,Naparima 1955,1339,geographic 2D,6402,6158,,,,,Geodetic survey.,Naparima 1972 is an extension of the Naparima 1955 network of Trinidad to include Tobago.,Ordnance Survey International.,EPSG,2000-03-07 00:00:00,,1,0
-4159,ELD79,1143,geographic 2D,6402,6159,,,,,Geodetic survey.,,Various oil company records.,EPSG,2000-03-07 00:00:00,,1,0
-4160,Chos Malal 1914,1292,geographic 2D,6402,6160,,,,,Geodetic survey.,Superseded by Campo Inchauspe (geogCS code 4221).,Various oil company records.,EPSG,2000-03-07 00:00:00,,1,0
-4161,Pampa del Castillo,1265,geographic 2D,6402,6161,,,,,Geodetic surveying within the oil industry.,Superseded by Campo Inchauspe (geogCS code 4221).,Various oil company records.,EPSG,2000-03-07 00:00:00,,1,0
-4162,Korean 1985,1135,geographic 2D,6402,6162,,,,,Geodetic survey.,Supersedes use of Tokyo datum.,Clifford J. Mugnier; in Photogrammetric Engineering & Remote Sensing November 1999. http://www.asprs.org/resources.html,EPSG,2000-03-07 00:00:00,2001.28,1,0
-4163,Yemen NGN96,1257,geographic 2D,6402,6163,,,,,Geodetic survey.,,IGN Paris,EPSG,2000-03-07 00:00:00,,1,0
-4164,South Yemen,1340,geographic 2D,6402,6164,,,,,Geodetic survey.,,IGN Paris,EPSG,2000-03-07 00:00:00,,1,0
-4165,Bissau,1113,geographic 2D,6402,6165,,,,,Geodetic survey.,,NIMA,EPSG,2000-03-07 00:00:00,,1,0
-4166,Korean 1995,1135,geographic 2D,6402,6166,,,,,Geodetic survey.,,NIMA TR8350.2  ftp://164.214.2.65/pub/gg/tr8350.2/changes.pdf,EPSG,2000-05-08 00:00:00,,1,0
-4167,NZGD2000,1175,geographic 2D,6402,6167,,,,,Geodetic survey.,Supersedes NZGD49 (code 4272) from March 2000.,Land Information New Zealand.,EPSG,2000-10-19 00:00:00,,1,0
-4168,Accra,1104,geographic 2D,6402,6168,,,,,Geodetic survey.,"Ellipsoid semi-major axis (a)=20926201 exactly Gold Coast feet. 
-Superseded by Leigon (code 4250) in 1978.",Ordnance Survey International,EPSG,2000-10-19 00:00:00,,1,0
-4169,American Samoa 1962,1027,geographic 2D,6402,6169,,,,,Geodetic survey.,,NIMA TR8350.2 revision of January 2000 and ftp://ftp.ngs.noaa.gov/pub/pcsoft/nadcon/samoa_readme.txt,EPSG,2000-10-19 00:00:00,,1,0
-4170,SIRGAS,1341,geographic 2D,6402,6170,,,,,Geodetic survey.,,NIMA TR8350.2 revision of January 2000.,EPSG,2000-10-19 00:00:00,2001.33,1,0
-4171,RGF93,1096,geographic 2D,6402,6171,,,,,Geodetic survey.,,TotalFinaElf,EPSG,2000-10-19 00:00:00,,1,0
-4172,POSGAR,1033,geographic 2D,6402,6172,,,,,Geodetic survey.,"A geodetic network of 127 high accuracy surved points that define the National Geodetic System (Sistema Geod�sico Nacional), adopted by IGM in May 1997",http://www.igm.gov.ar/posgar.html,EPSG,2000-10-19 00:00:00,2001.051,1,1
-4173,IRENET95,1305,geographic 2D,6402,6173,,,,,Geodetic survey.,,Ordnance Survey of Ireland,EPSG,2000-10-19 00:00:00,,1,0
-4174,Sierra Leone 1924,1342,geographic 2D,6402,6174,,,,,Geodetic survey.,Ellipsoid semi-major axis (a)=20926201 exactly Gold Coast feet; 1 Gold Coast foot = 0.3047997101815 m.,Ordnance Survey International,EPSG,2001-06-05 00:00:00,,1,0
-4175,Sierra Leone 1968,1209,geographic 2D,6402,6175,,,,,Geodetic survey.,Supersedes Sierra Leone 1960.  The 1968 readjustment coordinates are within 3m of the 1960 provisional adjustment.,Ordnance Survey International.,EPSG,2001-06-05 00:00:00,,1,0
-4176,Australian Antarctic,1278,geographic 2D,6402,6176,,,,,Geodetic survey.,,Standards Australia,ISO 19127,2001-06-05 00:00:00,,1,0
-4178,Pulkovo 1942(83),1343,geographic 2D,6402,6178,,,,,Geodetic survey.,"In Brandenburg superseded by ETRS89. 
-In Sachsen and Thuringen superseded by DHDN.",Bundesamt f�r Kartographie und Geod�sie via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-4179,Pulkovo 1942(58),1192,geographic 2D,6402,6179,,,,,Geodetic survey.,,Glowny Urzad Geodezji i Kartografii via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-4180,EST97,1090,geographic 2D,6402,6180,,,,,Geodetic survey.,Supersedes EST92 (code 4133).,Estonian National Land Board via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-4181,Luxembourg 1930,1146,geographic 2D,6402,6181,,,,,Geodetic survey,,Administration du Cadastre et de la Topographie via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-4182,Azores Occidental 1939,1344,geographic 2D,6402,6182,,,,,Geodetic survey.,,Instituto Geografico e Cadastral Lisbon via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-4183,Azores Central 1948,1301,geographic 2D,6402,6183,,,,,Geodetic survey.,,Instituto Geografico e Cadastral Lisbon via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-4184,Azores Oriental 1940,1345,geographic 2D,6402,6184,,,,,Geodetic survey.,,Instituto Geografico e Cadastral Lisbon via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-4185,Madeira 1936,1314,geographic 2D,6402,6185,,,,,Geodetic survey.,,Instituto Geografico e Cadastral Lisbon via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,1
-4188,OSNI 1952,2530,geographic 2D,6402,6188,,,,,Geodesy and topographic mapping.,Superseded by 1975 Mapping Adjustment.  See code 4300.,Ordnance Survey of Northern Ireland.,EPSG,2001-11-06 00:00:00,,0,0
-4189,REGVEN,1251,geographic 2D,6402,6189,,,,,Geodetic survey.,Densification in Venezuela of SIRGAS.,Servicio Autonomo de Geografia y Cartografia Nacional.,EPSG,2001-11-06 00:00:00,,1,0
-4190,POSGAR 98,1033,geographic 2D,6402,6190,,,,,Geodetic survey.,A geodetic network of 127 high accuracy surved points that define the National Geodetic System (Sistema Geod�sico Nacional). Densification of SIRGAS 1995.,http://www.igm.gov.ar/posgar.html,EPSG,2001-11-06 00:00:00,,1,0
-4191,Albanian 1987,1025,geographic 2D,6402,6191,,,,,Geodetic survey.,,EuroGeographics; http://crs.ifag.de/,EPSG,2001-11-06 00:00:00,,1,0
-4192,Douala 1948,1060,geographic 2D,6402,6192,,,,,Geodetic survey.,Superseded by Manoca 1962 (code 4193).,TotalFinaElf,EPSG,2002-01-18 00:00:00,,1,0
-4193,Manoca 1962,1060,geographic 2D,6402,6193,,,,,Geodetic survey.,Supersedes Doula 1948 (code 4192). The intent of the Bukuva 1953 conference was to adopt the Clarke 1880 (RGN) ellipsoid (code 7012) but in practice this datum has used the IGN version.,TotalFinaElf,EPSG,2002-01-18 00:00:00,,1,0
-4194,Qornoq 1927,1107,geographic 2D,6402,6194,,,,,Geodetic survey.,,"Kort & Matrikelstyrelsen, Copenhagen.",EPSG,2002-01-18 00:00:00,,1,0
-4195,Scoresbysund 1952,2570,geographic 2D,6402,6195,,,,,Geodetic survey.,,"Kort & Matrikelstyrelsen, Copenhagen.",EPSG,2002-01-18 00:00:00,,1,0
-4196,Ammassalik 1958,2571,geographic 2D,6402,6196,,,,,Geodetic survey.,,"Kort & Matrikelstyrelsen, Copenhagen.",EPSG,2002-01-18 00:00:00,,1,0
-4197,Garoua,2590,geographic 2D,6402,6197,,,,,Geodetic survey.,The intent of the Bukuva 1953 conference was to adopt the Clarke 1880 (RGN) ellipsoid (code 7012) but in practice this datum has used the IGN version.,TotalFinaElf,EPSG,2002-02-12 00:00:00,,1,0
-4198,Kousseri,2591,geographic 2D,6402,6198,,,,,Geodetic survey.,,TotalFinaElf,EPSG,2002-02-12 00:00:00,,1,0
-4199,Egypt 1930,1086,geographic 2D,6402,6199,,,,,Scientific purposes only.,"Note that Egypt 1930 uses the International 1924 ellipsoid, unlike the Egypt 1907 CRS (code 4229) which uses the Helmert ellipsoid. Oil industry references to the Egypt 1930 name and the Helmert ellipsoid probably mean Egypt 1907.",,EPSG,2002-02-12 00:00:00,,1,0
-4200,Pulkovo 1995,1198,geographic 2D,6402,6200,,,,,Geodetic survey.,,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,1996-09-12 00:00:00,,1,0
-4201,Adindan,1271,geographic 2D,6402,6201,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4202,AGD66,1279,geographic 2D,6402,6202,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4203,AGD84,1036,geographic 2D,6402,6203,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4204,Ain el Abd,1272,geographic 2D,6402,6204,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4205,Afgooye,1214,geographic 2D,6402,6205,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4206,Agadez,1177,geographic 2D,6402,6206,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4207,Lisbon,1294,geographic 2D,6402,6207,,,,,Geodetic survey.,Supersedes Lisbon 1890 system which used Bessel 1841 ellipsoid. Superseded by Datum 73 (code 4274).,Instituto Geografico e Cadastral; Lisbon,EPSG,1995-06-02 00:00:00,2001.551,1,0
-4208,Aratu,1274,geographic 2D,6402,6208,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4209,Arc 1950,1276,geographic 2D,6402,6209,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4210,Arc 1960,1277,geographic 2D,6402,6210,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4211,Batavia,1285,geographic 2D,6402,6211,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4212,Barbados 1938,1042,geographic 2D,6402,6212,,,,,Geodetic survey.,,,EPSG,1999-04-22 00:00:00,99.171,1,0
-4213,Beduaram,2771,geographic 2D,6402,6213,,,,,Geodetic survey.,,,EPSG,2002-06-28 00:00:00,2002.43,1,0
-4214,Beijing 1954,1067,geographic 2D,6402,6214,,,,,Geodetic survey.,Superseded by Xian 1980 (code 4610).,,EPSG,1995-06-02 00:00:00,,1,0
-4215,Belge 1950,1347,geographic 2D,6402,6215,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4216,Bermuda 1957,1047,geographic 2D,6402,6216,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4218,Bogota 1975,1070,geographic 2D,6402,6218,,,,,Geodetic survey.,"Supersedes earlier 3 adjustments of 1951, 1944 and 1941.","IGAC special publication no. 1, ""Geodesia"" 4th edition, 1975.",EPSG,2000-10-19 00:00:00,2000.20,1,0
-4219,Bukit Rimpah,1287,geographic 2D,6402,6219,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4220,Camacupa,1288,geographic 2D,6402,6220,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4221,Campo Inchauspe,1033,geographic 2D,6402,6221,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4222,Cape,1290,geographic 2D,6402,6222,,,,,Geodetic survey.,Superseded by Hartbeesthoek94 from 1999.,"Directorate of Surveys and Mapping, Mowbray, South Africa.",EPSG,1995-06-02 00:00:00,2000.04,1,0
-4223,Carthage,1236,geographic 2D,6402,6223,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4224,Chua,1053,geographic 2D,6402,6224,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4225,Corrego Alegre,1293,geographic 2D,6402,6225,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4226,Cote d'Ivoire,1075,geographic 2D,6402,6226,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,1
-4227,Deir ez Zor,1623,geographic 2D,6402,6227,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4228,Douala,1060,geographic 2D,6402,6228,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,1
-4229,Egypt 1907,1086,geographic 2D,6402,6229,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4230,ED50,1296,geographic 2D,6402,6230,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4231,ED87,1297,geographic 2D,6402,6231,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4232,Fahud,1183,geographic 2D,6402,6232,,,,,Geodetic survey.,Since 1993 superseded by PSD93 geogCS (code 4134). Maximum differences to Fahud adjustment are 20 metres.,,EPSG,1995-06-02 00:00:00,,1,0
-4233,Gandajika 1970,1152,geographic 2D,6402,6233,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4234,Garoua,1060,geographic 2D,6402,6234,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,1
-4235,Guyane Francaise,1097,geographic 2D,6402,6235,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4236,Hu Tzu Shan,1228,geographic 2D,6402,6236,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4237,HD72,1119,geographic 2D,6402,6237,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4238,ID74,1122,geographic 2D,6402,6238,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4239,Indian 1954,1304,geographic 2D,6402,6239,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4240,Indian 1975,1231,geographic 2D,6402,6240,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4241,Jamaica 1875,1128,geographic 2D,6402,6241,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4242,JAD69,1128,geographic 2D,6402,6242,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4243,Kalianpur 1880,1307,geographic 2D,6402,6243,,,,,Geodetic survey.,,"G. Bomford; ""The Re-adjustment of the Indian Triangulation""; Survey of India Professional Paper 28; 1939.",EPSG,1999-10-20 00:00:00,97.23,1,0
-4244,Kandawala,1218,geographic 2D,6402,6244,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4245,Kertau,1309,geographic 2D,6402,6245,,,,,Geodetic survey.,Adopts metric conversion of 39.370113 inches per metre.,,EPSG,1995-06-02 00:00:00,,1,0
-4246,KOC,1136,geographic 2D,6402,6246,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4247,La Canoa,1251,geographic 2D,6402,6247,,,,,Geodetic survey.,PSAD56 uses same origin.,,EPSG,1995-06-02 00:00:00,,1,0
-4248,PSAD56,1348,geographic 2D,6402,6248,,,,,Geodetic survey.,Origin is same as La Canoa.  In Venezuela known as La Canoa.,,EPSG,1995-06-02 00:00:00,,1,0
-4249,Lake,1312,geographic 2D,6402,6249,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4250,Leigon,1104,geographic 2D,6402,6250,,,,,Geodetic survey.,Superseded Accra (code 4168) from 1978.,Ordnance Survey International,EPSG,1995-06-02 00:00:00,,1,0
-4251,Liberia 1964,1142,geographic 2D,6402,6251,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4252,Lome,1232,geographic 2D,6402,6252,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4253,Luzon 1911,1190,geographic 2D,6402,6253,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4254,Hito XVIII 1963,1303,geographic 2D,6402,6254,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4255,Herat North,1024,geographic 2D,6402,6255,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4256,Mahe 1971,1208,geographic 2D,6402,6256,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4257,Makassar,1316,geographic 2D,6402,6257,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4258,ETRS89,1298,geographic 2D,6402,6258,,,,,Geodetic survey.,The distinction in usage between ETRF89 and ETRS89 is confused: although in principle conceptually different in practice both are used as synonyms.,Norwegian Geodetic Institute geodetic publication 1990:1,EPSG,2000-10-19 00:00:00,97.11  99.11 2000.72,1,0
-4259,Malongo 1987,1317,geographic 2D,6402,6259,,,,,Geodetic survey.,Offshore extension of Mhast GeogCS (4264) using Transit translocation from Station Y at Malongo base camp.,Chevron Petroleum Technology,EPSG,1995-06-02 00:00:00,,1,0
-4260,Manoca,1060,geographic 2D,6402,6260,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,2002.01,1,1
-4261,Merchich,1166,geographic 2D,6402,6261,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4262,Massawa,1089,geographic 2D,6402,6262,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4263,Minna,1178,geographic 2D,6402,6263,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4264,Mhast,1318,geographic 2D,6402,6264,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4265,Monte Mario,1127,geographic 2D,6402,6265,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4266,M'poraloko,1100,geographic 2D,6402,6266,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4267,NAD27,1349,geographic 2D,6402,6267,,,,,Geodetic survey.,Note: this coordinate system includes longitudes which are POSITIVE EAST.  Superseded by NAD27(76) (code 4608) in Ontario and CGQ77 (code 4609) in Quebec.,,EPSG,1995-06-02 00:00:00,99.04,1,0
-4268,NAD27 Michigan,1391,geographic 2D,6402,6268,,,,,Geodetic survey.,Ellipsoid taken to be 800ft above geoid. Note: this coordinate system includes longitudes which are POSITIVE EAST.,,EPSG,1996-12-12 00:00:00,96.28,1,0
-4269,NAD83,1350,geographic 2D,6402,6269,,,,,Geodetic survey.,Note: this coordinate system includes longitudes which are POSITIVE EAST.,,EPSG,1995-06-02 00:00:00,,1,0
-4270,Nahrwan 1967,1351,geographic 2D,6402,6270,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4271,Naparima 1972,1322,geographic 2D,6402,6271,,,,,Geodetic survey.,Naparima 1972 is an extension of the Naparima 1955 network of Trinidad to include Tobago.,Ordnance Survey International.,EPSG,1995-06-02 00:00:00,,1,0
-4272,NZGD49,1175,geographic 2D,6402,6272,,,,,Geodetic survey.,Superseded by NZGD49 in March 2000.,New Zealand Department of Lands and Surveys Technical Report No. 1; 1978.,EPSG,2000-10-19 00:00:00,2000.702,1,0
-4273,NGO 1948,1352,geographic 2D,6402,6273,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4274,Datum 73,1294,geographic 2D,6402,6274,,,,,Geodetic survey.,,Instituto Geografico e Cadastral; Lisbon,EPSG,1995-06-02 00:00:00,,1,0
-4275,NTF,1353,geographic 2D,6402,6275,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4276,NSWC 9Z-2,1262,geographic 2D,6402,6276,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4277,OSGB 1936,1264,geographic 2D,6402,6277,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4278,OSGB70,1264,geographic 2D,6402,6278,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4279,OS(SN)80,1354,geographic 2D,6402,6279,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4280,Padang,1355,geographic 2D,6402,6280,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4281,Palestine 1923,1356,geographic 2D,6402,6281,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4282,Pointe Noire,1072,geographic 2D,6402,6282,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,2002.05,1,0
-4283,GDA94,1036,geographic 2D,6402,6283,,,,,Geodetic survey.,,Australian Surveying and Land Information Group Internet WWW page.,EPSG,1995-06-02 00:00:00,,1,0
-4284,Pulkovo 1942,1357,geographic 2D,6402,6284,,,,,Geodetic survey.,For Germany see Pulkovo 1942(83); for Poland see Pulkovo 1942(58).,,EPSG,1995-06-02 00:00:00,,1,0
-4285,Qatar 1974,1346,geographic 2D,6402,6285,,,,,Geodetic survey.,,Qatar Centre for Geographic Information.,EPSG,2000-03-07 00:00:00,2000.29  (2001.27),1,0
-4286,Qatar 1948,1346,geographic 2D,6402,6286,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4287,Qornoq,1107,geographic 2D,6402,6287,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,1
-4288,Loma Quintana,1313,geographic 2D,6402,6288,,,,,Geodetic survey.,Superseded by La Canoa (code 4247).,,EPSG,1995-06-02 00:00:00,,1,0
-4289,Amersfoort,1275,geographic 2D,6402,6289,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4291,SAD69,1358,geographic 2D,6402,6291,,,,,Geodetic survey.,Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.251.  Error introduced if not using the truncated precision is 0 to 31mm.,,EPSG,1995-06-02 00:00:00,97.252,1,0
-4292,Sapper Hill 1943,1092,geographic 2D,6402,6292,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4293,Schwarzeck,1169,geographic 2D,6402,6293,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4294,Segora,1359,geographic 2D,6402,6294,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,1
-4295,Serindung,1360,geographic 2D,6402,6295,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4296,Sudan,1361,geographic 2D,6402,6296,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4297,Tananarive,1149,geographic 2D,6402,6297,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4298,Timbalai 1948,1362,geographic 2D,6402,6298,,,,,Geodetic survey.,Adopts metric conversion of 39.370147 inches per metre.,,EPSG,1995-06-02 00:00:00,,1,0
-4299,TM65,1125,geographic 2D,6402,6299,,,,,Basis for topographic mapping in Republic of Ireland between 1965 and 1975; for scientific purposes only in Northern Ireland.,Superseded by 1975 Mapping Adjustment. See code 4300.,,EPSG,1995-06-02 00:00:00,,1,0
-4300,TM75,1305,geographic 2D,6402,6300,,,,,Basis for topographic mapping.,,,EPSG,1995-06-02 00:00:00,,1,0
-4301,Tokyo,1364,geographic 2D,6402,6301,,,,,Geodetic survey.,Superseded by JGD2000 (code 4612) from April 2002.,Geographic Survey Institute; Japan; Bulletin 40 (March 1994).  Also http://vldb.gsi.go.jp/sokuchi/datum/tokyodatum.html,EPSG,2002-06-22 00:00:00,2002.08,1,0
-4302,Trinidad 1903,1322,geographic 2D,6402,6302,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4303,TC(1948),1363,geographic 2D,6402,6303,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4304,Voirol 1875,1365,geographic 2D,6402,6304,,,,,Geodetic survey.,,IGN Paris,EPSG,1995-06-02 00:00:00,,1,0
-4306,Bern 1938,1286,geographic 2D,6402,6306,,,,,Used for the geographic coordinates overprinted on topographic maps constructed on the CH1903 / LV03 projected CS (code 21781).,,,EPSG,1995-06-02 00:00:00,,1,0
-4307,Nord Sahara 1959,1366,geographic 2D,6402,6307,,,,,Geodetic survey.,Sometimes incorrectly referred to as Voirol Unifie 1960. Voirol Unifie 1960 is NOT a GeogCRS:  it is two projected coordinate reference systems based on  Nord Sahara 1959.  See codes 30791 and 30792.,"""Le System Geodesique Nord-Sahara""; IGN Paris",EPSG,2002-08-29 00:00:00,2000.47  2002.56,1,0
-4308,RT38,1225,geographic 2D,6402,6308,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,97.09,1,0
-4309,Yacare,1247,geographic 2D,6402,6309,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4310,Yoff,1207,geographic 2D,6402,6310,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4311,Zanderij,1222,geographic 2D,6402,6311,,,,,Geodetic survey.,Introduced in 1975.,Shell International,EPSG,1995-06-02 00:00:00,,1,0
-4312,MGI,1321,geographic 2D,6402,6312,,,,,Geodetic survey.,,Bundesamt fur Eich- und Vermessungswesen; Wien,EPSG,1995-06-02 00:00:00,,1,0
-4313,Belge 1972,1347,geographic 2D,6402,6313,,,,,Geodetic survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-4314,DHDN,1295,geographic 2D,6402,6314,,,,,Geodetic survey.,,EPSG,EPSG,1995-06-02 00:00:00,,1,0
-4315,Conakry 1905,1112,geographic 2D,6402,6315,,,,,Geodetic survey.,Superseded by Dabola 1981 (EPSG code 4155).,IGN Paris,EPSG,1995-06-02 00:00:00,,1,0
-4316,Dealul Piscului 1933,1197,geographic 2D,6402,6316,,,,,Geodetic survey.,Superseded by 1970 system (geogCS code 4317).,,EPSG,1996-04-12 00:00:00,,1,0
-4317,Dealul Piscului 1970,1197,geographic 2D,6402,6317,,,,,Geodetic survey.,Supersedes 1933 system (geogCS code 4316).,,EPSG,1996-04-12 00:00:00,,1,0
-4318,NGN,1136,geographic 2D,6402,6318,,,,,Geodetic survey.,,,EPSG,1996-04-12 00:00:00,,1,0
-4319,KUDAMS,1310,geographic 2D,6402,6319,,,,,Geodetic survey.,,,EPSG,1996-04-12 00:00:00,,1,0
-4322,WGS 72,1262,geographic 2D,6402,6322,,,,,Geodetic survey.,Superseded by WGS 84.,,EPSG,1995-06-02 00:00:00,,1,0
-4324,WGS 72BE,1262,geographic 2D,6402,6324,,,,,Geodetic survey.,Broadcast ephemeris. Superseded by WGS 84.,,EPSG,1995-06-02 00:00:00,,1,0
-4326,WGS 84,1262,geographic 2D,6402,6326,,,,,Used by the GPS satellite navigation system and for NATO military geodetic surveying.,,,EPSG,2002-06-22 00:00:00,2002.151,1,0
-4327,WGS 84 (geographic 3D),1262,geographic 3D,6401,6326,,,,,Used by the GPS satellite navigation system.,,,EPSG,2002-06-22 00:00:00,2002.151,1,0
-4328,WGS 84 (geocentric),1262,geocentric,6500,6326,,,,,Used by the GPS satellite navigation system.,,,EPSG,2002-06-22 00:00:00,2002.151,1,0
-4600,Anguilla 1957,1030,geographic 2D,6402,6600,,,,,Geodetic survey.,,,EPSG,1999-04-22 00:00:00,,1,0
-4601,Antigua 1943,1273,geographic 2D,6402,6601,,,,,Geodetic survey.,,,EPSG,1999-04-22 00:00:00,,1,0
-4602,Dominica 1945,1082,geographic 2D,6402,6602,,,,,Geodetic survey.,,,EPSG,1999-04-22 00:00:00,,1,0
-4603,Grenada 1953,1551,geographic 2D,6402,6603,,,,,Geodetic survey.,,,EPSG,1999-04-22 00:00:00,,1,0
-4604,Montserrat 1958,1165,geographic 2D,6402,6604,,,,,Geodetic survey.,,,EPSG,1999-04-22 00:00:00,,1,0
-4605,St. Kitts 1955,1200,geographic 2D,6402,6605,,,,,Geodetic survey.,,,EPSG,1999-04-22 00:00:00,,1,0
-4606,St. Lucia 1955,1201,geographic 2D,6402,6606,,,,,Geodetic survey.,,,EPSG,1999-04-22 00:00:00,,1,0
-4607,St. Vincent 1945,1202,geographic 2D,6402,6607,,,,,Geodetic survey.,,,EPSG,1999-04-22 00:00:00,,1,0
-4608,NAD27(76),1367,geographic 2D,6402,6608,,,,,Geodetic survey.,Note: this coordinate system includes longitudes which are POSITIVE EAST.,,EPSG,1999-05-12 00:00:00,,1,0
-4609,NAD27(CGQ77),1368,geographic 2D,6402,6609,,,,,Geodetic survey.,Note: this coordinate system includes longitudes which are POSITIVE EAST.,,EPSG,1999-05-12 00:00:00,,1,0
-4610,Xian 1980,1067,geographic 2D,6402,6610,,,,,Geodesy.,Supersedes Beijing 1954 (code 4214).,,EPSG,2002-02-12 00:00:00,,1,0
-4611,Hong Kong 1980,1118,geographic 2D,6402,6611,,,,,Geodetic and engineering surveying.,Supersedes Hong Kong 1963.,"Survey and Mapping Office, Lands Department. Http://www.info.gov.hk/landsd/mapping/tindex.htm",EPSG,2002-06-22 00:00:00,,1,0
-4612,JGD2000,1129,geographic 2D,6402,6612,,,,,Geodesy.,Supersedes Tokyo (code 4301) from April 2002.,Japanese Survey Federation.,EPSG,2002-04-25 00:00:00,,1,0
-4613,Segara,1360,geographic 2D,6402,6613,,,,,Geodetic survey.,,EPSG,EPSG,2002-06-22 00:00:00,,1,0
-4614,QND95,1346,geographic 2D,6402,6614,,,,,Geodetic survey.,,Qatar Centre for Geographic Information.,EPSG,2002-06-28 00:00:00,,1,0
-4615,Porto Santo,1314,geographic 2D,6402,6615,,,,,Geodetic survey.,,Instituto Geografico e Cadastral Lisbon; http://www.ipcc.pt,EPSG,2002-07-13 00:00:00,,1,0
-4616,Selvagem Grande,2779,geographic 2D,6402,6616,,,,,Geodetic survey.,,Instituto Geografico e Cadastral Lisbon; http://www.ipcc.pt,EPSG,2002-07-13 00:00:00,,1,0
-4617,NAD83(CSRS),1336,geographic 2D,6402,6140,,,,,Geodetic survey.,In New Brunswick superseded ATS77 from 1999.,Service New Brunswick Land and Information Standards Manual,EPSG,2002-07-13 00:00:00,,1,0
-4801,Bern 1898 (Bern),1286,geographic 2D,6402,6801,,,,,Geodetic survey.,,,EPSG,2000-03-07 00:00:00,2000.07,1,0
-4802,Bogota 1975 (Bogota),1070,geographic 2D,6402,6802,,,,,Geodetic survey.,"Supersedes earlier 3 adjustments of 1951, 1944 and 1941.","IGAC special publication no. 1, ""Geodesia"" 4th edition, 1975.",EPSG,2000-10-19 00:00:00,2000.07 2000.20,1,0
-4803,Lisbon (Lisbon),1294,geographic 2D,6402,6803,,,,,Geodetic survey.,Supersedes Lisbon 1890 system which used Bessel 1841 ellipsoid.  Superseded by Datum 73 (code 4274).,Instituto Geografico e Cadastral; Lisbon,EPSG,2000-03-07 00:00:00,97.12  2000.07  2001.551,1,0
-4804,Makassar (Jakarta),1316,geographic 2D,6402,6804,,,,,Geodetic survey.,,,EPSG,2000-03-07 00:00:00,2000.07,1,0
-4805,MGI (Ferro),1321,geographic 2D,6402,6805,,,,,Geodetic survey.,,Bundesamt fur Eich- und Vermessungswesen; Wien,EPSG,2000-03-07 00:00:00,2000.07,1,0
-4806,Monte Mario (Rome),1127,geographic 2D,6402,6806,,,,,Geodetic survey.,,,EPSG,2000-03-07 00:00:00,2000.07,1,0
-4807,NTF (Paris),1353,geographic 2D,6403,6807,,,,,Geodetic survey.,,,EPSG,2000-03-07 00:00:00,2000.07,1,0
-4808,Padang (Jakarta),1355,geographic 2D,6402,6808,,,,,Geodetic survey.,,,EPSG,2000-03-07 00:00:00,2000.07,1,0
-4809,Belge 1950 (Brussels),1347,geographic 2D,6402,6809,,,,,Geodetic survey.,,,EPSG,2000-03-07 00:00:00,2000.07,1,0
-4810,Tananarive (Paris),1149,geographic 2D,6403,6810,,,,,Geodetic survey.,,,EPSG,2000-03-07 00:00:00,2000.07,1,0
-4811,Voirol 1875 (Paris),1365,geographic 2D,6403,6811,,,,,Geodetic survey.,Superseded by Nord Sahara 1959 (Paris) (code 4812).,IGN Paris,EPSG,2000-03-07 00:00:00,2000.07,1,0
-4813,Batavia (Jakarta),1285,geographic 2D,6402,6813,,,,,Geodetic survey.,,,EPSG,2000-03-07 00:00:00,2000.07,1,0
-4814,RT38 (Stockholm),1225,geographic 2D,6402,6814,,,,,Geodetic survey.,,,EPSG,2000-03-07 00:00:00,2000.07,1,0
-4815,Greek (Athens),1106,geographic 2D,6402,6815,,,,,Geodetic survey.,,Topography Department; National Technical University of Greece.,EPSG,2000-03-07 00:00:00,2000.07,1,0
-4816,Carthage (Paris),1236,geographic 2D,6403,6816,,,,,Geodetic survey.,Superseded by Greenwich-based Carthage geogCS.,,EPSG,2000-03-07 00:00:00,2000.07,1,0
-4817,NGO 1948 (Oslo),1352,geographic 2D,6402,6817,,,,,Geodetic survey.,,,EPSG,2000-03-07 00:00:00,2000.07,1,0
-4818,S-JTSK (Ferro),1306,geographic 2D,6402,6818,,,,,Geodetic survey.,"S-JTSK(Ferro) is the Uniform Trigonometric Cadastral Network.  It is a modification of  the Austrian MGI (Ferro) geogCS, code 4805.",Research Institute for Geodesy Topography and Cartography (VUGTK); Prague.,EPSG,2000-03-07 00:00:00,,1,0
-4819,Nord Sahara 1959 (Paris),1366,geographic 2D,6403,6819,,,,,Geodetic survey.,,"""Le System Geodesique Nord-Sahara""; IGN Paris",EPSG,2000-10-19 00:00:00,2000.74,1,0
-4820,Segara (Jakarta),1285,geographic 2D,6402,6820,,,,,Geodetic survey.,,,EPSG,2002-06-22 00:00:00,,1,0
-4901,ATF (Paris),1326,geographic 2D,6403,6901,,,,,Geodetic survey.,,,EPSG,2000-03-07 00:00:00,2000.07,1,0
-4902,NDG (Paris),1369,geographic 2D,6403,6902,,,,,Geodetic survey.,,,EPSG,2000-03-07 00:00:00,2000.07,1,0
-4903,Madrid 1870 (Madrid),1217,geographic 2D,6402,6903,,,,,Geodetic survey.,,Institut de Geomatica; Barcelona.,EPSG,2000-03-07 00:00:00,2000.07,1,0
-4904,Lisbon 1890 (Lisbon),1294,geographic 2D,6402,6904,,,,,Geodetic survey.,Superseded by Lisbon 1937 system which uses International 1924 ellipsoid.,Instituto Geografico e Cadastral; Lisbon,EPSG,2002-07-13 00:00:00,,1,0
-5701,Newlyn,1264,vertical,6499,5101,,,,,Geodetic and engineering surveying.,,,EPSG,1995-06-02 00:00:00,,1,0
-5702,National Geodetic Vertical Datum of 1929,1323,vertical,6497,5102,,,,,Geodetic and engineering surveying.,,,EPSG,1996-10-18 00:00:00,,1,0
-5703,North American Vertical Datum of 1988,1730,vertical,6499,5103,,,,,Geodetic and engineering surveying.,,,EPSG,1996-10-18 00:00:00,,1,0
-5704,Yellow Sea,1067,vertical,6499,5104,,,,,Geodetic and engineering surveying.,,,EPSG,1995-06-02 00:00:00,,1,1
-5705,Baltic,1284,vertical,6499,5105,,,,,Geodetic and engineering surveying.,,,EPSG,1996-09-12 00:00:00,,1,0
-5706,Caspian,1291,vertical,6498,5106,,,,,Used for Soviet Union nautical charting of the Caspian Sea.,Capsian Sea water levels are now offset appreciably from this datum.,,EPSG,1996-09-12 00:00:00,,1,0
-5709,Normaal Amsterdams Peil,1275,vertical,6499,5109,,,,,Geodetic and engineering surveying.,,Nederlandse Commissie voor Geodesie publication 30; 1993,EPSG,2000-03-07 00:00:00,2000.10,1,0
-5710,Oostende,1347,vertical,6499,5110,,,,,Geodetic and engineering surveying.,,Nederlandse Commissie voor Geodesie publication 30; 1993,EPSG,1996-09-12 00:00:00,,1,0
-5711,Australian Height Datum,1281,vertical,6499,5111,,,,,Geodetic and engineering surveying.,,http://www.auslig.gov.au/geodesy,EPSG,1996-09-12 00:00:00,,1,0
-5712,Australian Height Datum (Tasmania),1282,vertical,6499,5112,,,,,Geodetic and engineering surveying.,,,EPSG,1996-09-12 00:00:00,,1,0
-5713,Canadian Vertical Datum of 1928,1289,vertical,6499,5114,,,,,Geodetic and engineering surveying.,,,EPSG,1996-12-12 00:00:00,,1,0
-5714,mean sea level height,1262,vertical,6499,5100,,,,,Used for hydrographic surveying.,Approximates geoid.  Not specific to any location or epoch.,,EPSG,1996-04-12 00:00:00,,1,0
-5715,mean sea level depth,1262,vertical,6498,5100,,,,,Used for hydrographic surveying.,Approximates geoid.  Not specific to any location or epoch.,,EPSG,1996-10-18 00:00:00,,1,0
-5716,Piraeus,1106,vertical,6499,5115,,,,,Geodetic and engineering surveying.,,Geodesy Department; Public Petroleum Corporation of Greece.,EPSG,1997-06-16 00:00:00,,1,0
-5717,N60,1095,vertical,6499,5116,,,,,Geodetic and engineering surveying.,In use since 1968.,www.nls.fi/maa/papers/kkj.html,EPSG,1997-07-22 00:00:00,,1,0
-5718,RH70,1225,vertical,6499,5117,,,,,Geodetic and engineering surveying.,,National and Survey of Sweden,EPSG,1997-11-13 00:00:00,,1,0
-5719,NGF Lallemand,1326,vertical,6499,5118,,,,,Geodetic and engineering surveying.,Generally but not entirely superseded by NGF IGN69 (code 5720).,"Conseil National de l'Information Geographique groupe de travail ""Reseaux de Nivellement"" recommendations v5.1 April 1994",EPSG,1997-11-13 00:00:00,,1,0
-5720,NGF IGN69,1326,vertical,6499,5119,,,,,Geodetic and engineering surveying.,,"Conseil National de l'Information Geographique groupe de travail ""Reseaux de Nivellement"" recommendations v5.1 April 1994",EPSG,1997-11-13 00:00:00,,1,0
-5721,NGF IGN78,1327,vertical,6499,5120,,,,,Geodetic and engineering surveying.,,"Conseil National de l'Information Geographique groupe de travail ""Reseaux de Nivellement"" recommendations v5.1 April 1994",EPSG,1997-11-13 00:00:00,,1,0
-5722,Maputo,1167,vertical,6499,5121,,,,,Geodetic and engineering surveying.,,Direc��o Nacional de Geografia e Cadastral (DINAGECA).,EPSG,1998-04-16 00:00:00,,1,0
-5723,Japanese Standard Levelling Datum,1129,vertical,6499,5122,,,,,Geodetic and engineering surveying.,,Ministry of Construction; Japan.  http://vldb.gsi-mc.jp/sokuchi/datum/image/heichoku2.gif,EPSG,2002-06-22 00:00:00,2002.08,1,0
-5724,PDO Height Datum 1993,1183,vertical,6499,5123,,,,,Geodetic and engineering surveying.,Supersedes Fahud vertical datum (code 5725) from 1993.,Petroleum Development Oman,EPSG,1999-04-22 00:00:00,,1,0
-5725,Fahud Height Datum 1993,1183,vertical,6499,5124,,,,,Geodetic and engineering surveying.,Superseded by PHD93 (code 5724)  from 1993.,Petroleum Development Oman,EPSG,1999-04-22 00:00:00,,1,0
-5726,Ha Tien 1960,1302,vertical,6499,5125,,,,,Geodetic and engineering surveying.,In Vietnam superseded by Hon Dau from 1992.,,EPSG,1999-10-20 00:00:00,,1,0
-5727,Hon Dau 1992,1252,vertical,6499,5126,,,,,Geodetic and engineering surveying.,In Vietnam supersedes Ha Tien from 1992.,,EPSG,1999-10-20 00:00:00,,1,0
-5728,Landesnivellement 1902,1286,vertical,6499,5127,,,,,Geodetic and engineering surveying.,To be superseded by LHN95 (code 5729).,Bundesamt f�r Landestopographie,EPSG,1999-10-20 00:00:00,,1,0
-5729,Landeshohennetz 1995,1286,vertical,6499,5128,,,,,Geodetic and engineering surveying.,To supersede LN02 (code 5728).,Bundesamt f�r Landestopographie,EPSG,1999-10-20 00:00:00,,1,0
-5730,European Vertical Reference System 2000,1298,vertical,6499,5129,,,,,For pan-European products and services.,,IAG subcommission for Europe,EPSG,2000-10-19 00:00:00,,1,0
-5731,Malin Head,1305,vertical,6499,5130,,,,,Topographic mapping at all scales in Republic and medium and small scales in Northern Ireland.,Belfast (code 5732) used for large scale topographic mapping in Northern Ireland.,Ordnance Survey of Ireland.,EPSG,2001-11-06 00:00:00,,1,0
-5732,Belfast,2530,vertical,6499,5131,,,,,Large scale topographic mapping.,Malin Head (code 5731) used for medium and small scale topographic mapping.,Ordnance Survey of Northern Ireland.,EPSG,2001-11-06 00:00:00,,1,0
-5733,Dansk Normal Nul,1080,vertical,6499,5132,,,,,Topographic mapping and engineering survey.,,Kort & Matrikelstyrelsen,EPSG,2001-11-06 00:00:00,,1,0
-5734,AIOC95 depths,2592,vertical,6498,5133,,,,,Used by AIOC and BP for all offshore Azerbaijan activities and also as a height system for engineering survey at Sangachal terminal.,AIOC95 datum is 1.7m above Caspian datum and 26.3m below Baltic datum.,BP,EPSG,2002-02-12 00:00:00,,1,0
-5735,Black Sea,1102,vertical,6499,5134,,,,,Hydrographic surveying and since breakup of Former Soviet Union also topographic mapping.,Black Sea datum is 0.4m below Baltic datum.,BP,EPSG,2002-02-12 00:00:00,,1,0
-5736,Yellow Sea 1956,1067,vertical,6499,5104,,,,,Geodetic and engineering surveying.,Superseded by Yellow Sea 1985 (code 5737).,Guangdong Province Land Resource Information Centre,EPSG,2002-06-22 00:00:00,,1,0
-5737,Yellow Sea 1985,1067,vertical,6499,5137,,,,,Geodetic and engineering surveying.,Supersedes Yellow Sea 1956 (code 5736).,Guangdong Province Land Resource Information Centre,EPSG,2002-06-22 00:00:00,,1,0
-5738,Hong Kong Principal Datum,1118,vertical,6499,5135,,,,,"Geodetic, topographic and engineering surveying.",,"Survey and Mapping Office, Lands Department. Http://www.info.gov.hk/landsd/mapping/tindex.htm",EPSG,2002-06-22 00:00:00,,1,0
-5739,Hong Kong Chart Datum,1118,vertical,6498,5136,,,,,Hydrographic charting.,Chart datum is 0.15 metres below Hong Kong Principal Datum (CRS code 5738) and 1.38m below MSL at Quarry Bay.,"Survey and Mapping Office, Lands Department. Http://www.info.gov.hk/landsd/mapping/tindex.htm",EPSG,2002-06-22 00:00:00,,1,0
-5800,Astra Minas Grid,1265,engineering,6507,9300,,,,,Oil exploration.,,,EPSG,2000-03-07 00:00:00,,1,0
-5801,Barcelona Grid B1,1266,engineering,4500,9301,,,,,Oil exploration by MGO and Talon.,Centre of the gateway of San Cristobal chuch; Plaza Boyaca; Barcelona.  500000E 300000 N at 10deg 08min 06sec N  64deg 41min 17sec W.,Ministry of Mines standards manual of 1974.,EPSG,2000-03-07 00:00:00,,1,0
-5802,Barcelona Grid B2,1266,engineering,4500,9301,,,,,Oil exploration by Phillips; Mobil; Texas; Mercedes; Varco.,Centre of the gateway of San Cristobal chuch; Plaza Boyaca; Barcelona.  500000E 300000 N at 10deg 08min 06sec N  64deg 41min 07.5sec W.,Ministry of Mines standards manual of 1974.,EPSG,2000-03-07 00:00:00,,1,0
-5803,Maturin Grid,1320,engineering,4500,9302,,,,,Oil exploration by MGO and Talon.,Centre of the gateway of San Cristobal chuch; Plaza Boyaca; Barcelona.  500000E 300000 N at 10deg 08min 06sec N  64deg 41min 17sec W.,Ministry of Mines standards manual of 1974.,EPSG,2000-03-07 00:00:00,,1,0
-5804,EPSG seismic bin grid example A,1263,engineering,6508,9312,,,,,Example only - fictitious.,"Bin grid I=J=1 at WGS 84 / UTM zone 31N 456781E 5836723N.
-Bin grid orientation = 20 degrees grid.  Bin width I=25m, J=12.5m.  Bin increment I=1, J=1.  Scale factor at origin 0.99984",UKOOA P6/98 seismic bin grid guideline.,EPSG,2000-06-23 00:00:00,,1,0
-5805,EPSG seismic bin grid example B,1263,engineering,6506,9312,,,,,Example only - fictitious.,,,EPSG,2000-06-23 00:00:00,,1,0
-5806,EPSG local engineering grid example A,1263,engineering,6505,9313,,,,,Example only - fictitious.,"Coordinates are 0,0 at conductor slot A1.",EPSG,EPSG,2000-06-23 00:00:00,,1,0
-5807,EPSG local engineering grid example B,1263,engineering,6504,9313,,,,,Example only - fictitious.,"Shows alternative use of coordinate axis name.
-
-Coordinates are 0,0 at conductor slot A1.",EPSG,EPSG,2000-06-23 00:00:00,,1,0
-5808,Maracaibo Cross Grid M4,1319,engineering,4500,9303,,,,,Oil exploration by Chevron and CVP.,Grid coordinates 200000N 200000E at Cruz Canada Morillo in Maracaibo.  The cross is ascribed coordinates of 10deg 38min 22sec N; 71deg 37min 18sec W.,Ministry of Mines standards manual of 1974.,EPSG,2000-06-23 00:00:00,,1,0
-5809,Maracaibo Cross Grid M5,1319,engineering,4500,9303,,,,,Oil exploration by Texas.,Grid coordinates 200000N 200000E at Cruz Canada Morillo in Maracaibo.  The cross is ascribed coordinates of 10deg 38min 32.3sec N; 71deg 37min 12.1sec W.,Ministry of Mines standards manual of 1974.,EPSG,2000-06-23 00:00:00,,1,0
-5810,La Rosa Grid,1311,engineering,4500,9304,,,,,Oil exploration.,Grid coordinates (0 0) at the monument in La Rosa (10deg 22min 40.417sec N 71deg 26min 59.488sec W; Loma Qunitana datum).  Origin possibly at Cerro Penal (71deg 12min 58sec W) where grid north aligned to true north.  See Lake / Maracaibo La Rosa grid.,Ministry of Mines standards manual of 1974.,EPSG,2000-06-23 00:00:00,,1,0
-5811,Mene Grande,1270,engineering,4500,9305,,,,,Oil exploration by Shell.,Grid coordinates (0 0) at the monument in Santa Barabara; Mene Grande.  The monument is ascribed coordinates of 9deg 52min 25.488sec N; 70deg 54min 35.310sec W.,Ministry of Mines standards manual of 1974.,EPSG,2000-06-23 00:00:00,,1,0
-5812,El Cubo,1269,engineering,4500,9306,,,,,Oil exploration by Shell.,Grid coordinates (0 0) at El Cubo (8deg 44min 17.258sec N; 72deg 30min 09.01sec W).,Ministry of Mines standards manual of 1974.,EPSG,2000-06-23 00:00:00,,1,0
-5813,Dabajuro,1268,engineering,4500,9307,,,,,Oil exploration by Chevron Creole and Texas.,Grid coordinates 200000N 200000E at the centre of the tower of the church at Dabajuro.  The tower is ascribed coordinates of 11deg 01min 19sec N; 70deg 40min 40sec W.,Ministry of Mines standards manual of 1974.,EPSG,2000-06-23 00:00:00,,1,0
-5814,Tucupita,1370,engineering,4500,9308,,,,,Oil exploration by Creole and Texas.,Grid coordinates 200000N 200000E at centre of the Bolivar plaza in Tucupita.  The plaza is ascribed coordinates of 9deg 03min 32sec N; 62deg 03min 07.6sec W.,Ministry of Mines standards manual of 1974.,EPSG,2000-06-23 00:00:00,,1,0
-5815,Santa Maria de Ipire,1371,engineering,4500,9310,,,,,Oil exploration by Creole  Phillips and Varco.,Grid coordinates 200000N 200000E at concrete monument PR-1 in the Bolivar plaza in Santa Maria de Ipire.  The monument is ascribed coordinates of 8deg 40min 06sec N; 65deg 19min 09sec W.,Ministry of Mines standards manual of 1974.,EPSG,2000-06-23 00:00:00,,1,0
-5816,Barinas west base,1267,engineering,4500,9311,,,,,Oil exploration by Sinclair.,Grid coordinates 200000N 200000E at the west base monument in Barinas.,Ministry of Mines standards manual of 1974.,EPSG,2000-06-23 00:00:00,,1,0
-7400,NTF (Paris) + NGF IGN69,1326,compound,,,,,4807,5720,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1997-11-13 00:00:00,,1,0
-7401,NTF (Paris) / France II + NGF Lallemand,1326,compound,,,,,27582,5719,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1997-11-13 00:00:00,,1,1
-7402,NTF (Paris) / France II + NGF IGN69,1326,compound,,,,,27582,5720,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1997-11-13 00:00:00,,1,1
-7403,NTF (Paris) / France III + NGF IGN69,1733,compound,,,,,27583,5720,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1997-11-13 00:00:00,,1,1
-7404,RT90 + RH70,1225,compound,,,,,4124,5718,Large and medium scale topographic mapping and engineering survey.,When combined with geoid model RN92 forms geographic 3D coordinate system RR92.,National Land Survey of Sweden,EPSG,1997-11-13 00:00:00,,1,0
-7405,OSGB36 / British National Grid + ODN,1264,compound,,,,,27700,5701,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1997-11-13 00:00:00,,1,0
-7406,NAD27 + NGVD29,1323,compound,,,,,4267,5702,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1997-11-13 00:00:00,,1,0
-7407,NAD27 / Texas North + NGVD29,2253,compound,,,,,32037,5702,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1997-11-13 00:00:00,,1,0
-7408,RD/NAP,1275,compound,,,,,4289,5709,Large and medium scale topographic mapping and engineering survey.,,http://rdnap.kadaster.nl/rd/index.html,EPSG,2000-10-19 00:00:00,,1,0
-7409,ETRS89 + EVRS2000,1298,compound,,,,,4258,5730,For pan-European products and services.,,IAG subcommission for Europe,EPSG,2000-10-19 00:00:00,,1,0
-7410,PSHD93,1183,compound,,,,,4134,5724,Oil exploration.,,Petroleum Development Oman,EPSG,2001-06-05 00:00:00,,1,0
-7411,NTF (Paris) / Lambert zone II + NGF Lallemand,1326,compound,,,,,27572,5719,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2001-11-06 00:00:00,,1,0
-7412,NTF (Paris) / Lambert zone II + NGF IGN69,1326,compound,,,,,27572,5719,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2001-11-06 00:00:00,,1,0
-7413,NTF (Paris) / Lambert zone III + NGF IGN69,1733,compound,,,,,27573,5719,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2001-11-06 00:00:00,,1,0
-20004,Pulkovo 1995 / Gauss-Kruger zone 4,1763,projected,4530,,4200,16204,,,Medium scale topographic mapping.,Also found with truncated false easting - see Pulkovo 1995 / Gauss-Kruger CM 21E (code 2463).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,2002.36,1,0
-20005,Pulkovo 1995 / Gauss-Kruger zone 5,1764,projected,4530,,4200,16205,,,Medium scale topographic mapping.,Also found with truncated false easting - see Pulkovo 1995 / Gauss-Kruger CM 27E (code 2464).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,2002.36,1,0
-20006,Pulkovo 1995 / Gauss-Kruger zone 6,1765,projected,4530,,4200,16206,,,Medium scale topographic mapping.,Also found with truncated false easting - see Pulkovo 1995 / Gauss-Kruger CM 33E (code 2465).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,2002.36,1,0
-20007,Pulkovo 1995 / Gauss-Kruger zone 7,1766,projected,4530,,4200,16207,,,Medium scale topographic mapping.,Also found with truncated false easting - see Pulkovo 1995 / Gauss-Kruger CM 39E (code 2466).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,2002.36,1,0
-20008,Pulkovo 1995 / Gauss-Kruger zone 8,1767,projected,4530,,4200,16208,,,Medium scale topographic mapping.,Also found with truncated false easting - see Pulkovo 1995 / Gauss-Kruger CM 45E (code 2467).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,2002.36,1,0
-20009,Pulkovo 1995 / Gauss-Kruger zone 9,1768,projected,4530,,4200,16209,,,Medium scale topographic mapping.,Also found with truncated false easting - see Pulkovo 1995 / Gauss-Kruger CM 51E (code 2468).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,2002.36,1,0
-20010,Pulkovo 1995 / Gauss-Kruger zone 10,1769,projected,4530,,4200,16210,,,Medium scale topographic mapping.,Also found with truncated false easting - see Pulkovo 1995 / Gauss-Kruger CM 57E (code 2469).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,2002.36,1,0
-20011,Pulkovo 1995 / Gauss-Kruger zone 11,1770,projected,4530,,4200,16211,,,Medium scale topographic mapping.,Also found with truncated false easting - see Pulkovo 1995 / Gauss-Kruger CM 63E (code 2470).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,2002.36,1,0
-20012,Pulkovo 1995 / Gauss-Kruger zone 12,1771,projected,4530,,4200,16212,,,Medium scale topographic mapping.,Also found with truncated false easting - see Pulkovo 1995 / Gauss-Kruger CM 69E (code 2471).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,2002.36,1,0
-20013,Pulkovo 1995 / Gauss-Kruger zone 13,1772,projected,4530,,4200,16213,,,Medium scale topographic mapping.,Also found with truncated false easting - see Pulkovo 1995 / Gauss-Kruger CM 75E (code 2472).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,2002.36,1,0
-20014,Pulkovo 1995 / Gauss-Kruger zone 14,1773,projected,4530,,4200,16214,,,Medium scale topographic mapping.,Also found with truncated false easting - see Pulkovo 1995 / Gauss-Kruger CM 81E (code 2473).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,2002.36,1,0
-20015,Pulkovo 1995 / Gauss-Kruger zone 15,1774,projected,4530,,4200,16215,,,Medium scale topographic mapping.,Also found with truncated false easting - see Pulkovo 1995 / Gauss-Kruger CM 87E (code 2474).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,2002.36,1,0
-20016,Pulkovo 1995 / Gauss-Kruger zone 16,1775,projected,4530,,4200,16216,,,Medium scale topographic mapping.,Also found with truncated false easting - see Pulkovo 1995 / Gauss-Kruger CM 93E (code 2475).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,2002.36,1,0
-20017,Pulkovo 1995 / Gauss-Kruger zone 17,1776,projected,4530,,4200,16217,,,Medium scale topographic mapping.,Also found with truncated false easting - see Pulkovo 1995 / Gauss-Kruger CM 99E (code 2476).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,2002.36,1,0
-20018,Pulkovo 1995 / Gauss-Kruger zone 18,1777,projected,4530,,4200,16218,,,Medium scale topographic mapping.,Also found with truncated false easting - see Pulkovo 1995 / Gauss-Kruger CM 105E (code 2477).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,2002.36,1,0
-20019,Pulkovo 1995 / Gauss-Kruger zone 19,1778,projected,4530,,4200,16219,,,Medium scale topographic mapping.,Also found with truncated false easting - see Pulkovo 1995 / Gauss-Kruger CM 111E (code 2478).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,2002.36,1,0
-20020,Pulkovo 1995 / Gauss-Kruger zone 20,1779,projected,4530,,4200,16220,,,Medium scale topographic mapping.,Also found with truncated false easting - see Pulkovo 1995 / Gauss-Kruger CM 117E (code 2479).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,2002.36,1,0
-20021,Pulkovo 1995 / Gauss-Kruger zone 21,1780,projected,4530,,4200,16221,,,Medium scale topographic mapping.,Also found with truncated false easting - see Pulkovo 1995 / Gauss-Kruger CM 123E (code 2480).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,2002.36,1,0
-20022,Pulkovo 1995 / Gauss-Kruger zone 22,1781,projected,4530,,4200,16222,,,Medium scale topographic mapping.,Also found with truncated false easting - see Pulkovo 1995 / Gauss-Kruger CM 129E (code 2481).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,2002.36,1,0
-20023,Pulkovo 1995 / Gauss-Kruger zone 23,1782,projected,4530,,4200,16223,,,Medium scale topographic mapping.,Also found with truncated false easting - see Pulkovo 1995 / Gauss-Kruger CM 135E (code 2482).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,2002.36,1,0
-20024,Pulkovo 1995 / Gauss-Kruger zone 24,1783,projected,4530,,4200,16224,,,Medium scale topographic mapping.,Also found with truncated false easting - see Pulkovo 1995 / Gauss-Kruger CM 141E (code 2483).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,2002.36,1,0
-20025,Pulkovo 1995 / Gauss-Kruger zone 25,1784,projected,4530,,4200,16225,,,Medium scale topographic mapping.,Also found with truncated false easting - see Pulkovo 1995 / Gauss-Kruger CM 147E (code 2484).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,2002.36,1,0
-20026,Pulkovo 1995 / Gauss-Kruger zone 26,1785,projected,4530,,4200,16226,,,Medium scale topographic mapping.,Also found with truncated false easting - see Pulkovo 1995 / Gauss-Kruger CM 153E (code 2485).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,2002.36,1,0
-20027,Pulkovo 1995 / Gauss-Kruger zone 27,1786,projected,4530,,4200,16227,,,Medium scale topographic mapping.,Also found with truncated false easting - see Pulkovo 1995 / Gauss-Kruger CM 159E (code 2486).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,2002.36,1,0
-20028,Pulkovo 1995 / Gauss-Kruger zone 28,1787,projected,4530,,4200,16228,,,Medium scale topographic mapping.,Also found with truncated false easting - see Pulkovo 1995 / Gauss-Kruger CM 165E (code 2487).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,2002.36,1,0
-20029,Pulkovo 1995 / Gauss-Kruger zone 29,1788,projected,4530,,4200,16229,,,Medium scale topographic mapping.,Also found with truncated false easting - see Pulkovo 1995 / Gauss-Kruger CM 171E (code 2488).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,2002.36,1,0
-20030,Pulkovo 1995 / Gauss-Kruger zone 30,1789,projected,4530,,4200,16230,,,Medium scale topographic mapping.,Also found with truncated false easting - see Pulkovo 1995 / Gauss-Kruger CM 177E (code 2489).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,2002.36,1,0
-20031,Pulkovo 1995 / Gauss-Kruger zone 31,1790,projected,4530,,4200,16231,,,Medium scale topographic mapping.,Also found with truncated false easting - see Pulkovo 1995 / Gauss-Kruger CM 177W (code 2490).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,2002.36,1,0
-20032,Pulkovo 1995 / Gauss-Kruger zone 32,1791,projected,4530,,4200,16232,,,Medium scale topographic mapping.,Also found with truncated false easting - see Pulkovo 1995 / Gauss-Kruger CM 171W (code 2491).,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,2002-06-22 00:00:00,2002.36,1,0
-20064,Pulkovo 1995 / Gauss-Kruger 4N,1763,projected,4530,,4200,16304,,,Truncated form of Gauss-Kruger zone 4,,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,1996-09-12 00:00:00,,1,1
-20065,Pulkovo 1995 / Gauss-Kruger 5N,1764,projected,4530,,4200,16305,,,Truncated form of Gauss-Kruger zone 5,,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,1996-09-12 00:00:00,,1,1
-20066,Pulkovo 1995 / Gauss-Kruger 6N,1765,projected,4530,,4200,16306,,,Truncated form of Gauss-Kruger zone 6,,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,1996-09-12 00:00:00,,1,1
-20067,Pulkovo 1995 / Gauss-Kruger 7N,1766,projected,4530,,4200,16307,,,Truncated form of Gauss-Kruger zone 7,,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,1996-09-12 00:00:00,,1,1
-20068,Pulkovo 1995 / Gauss-Kruger 8N,1767,projected,4530,,4200,16308,,,Truncated form of Gauss-Kruger zone 8,,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,1996-09-12 00:00:00,,1,1
-20069,Pulkovo 1995 / Gauss-Kruger 9N,1768,projected,4530,,4200,16309,,,Truncated form of Gauss-Kruger zone 9,,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,1996-09-12 00:00:00,,1,1
-20070,Pulkovo 1995 / Gauss-Kruger 10N,1769,projected,4530,,4200,16310,,,Truncated form of Gauss-Kruger zone 10,,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,1996-09-12 00:00:00,,1,1
-20071,Pulkovo 1995 / Gauss-Kruger 11N,1770,projected,4530,,4200,16311,,,Truncated form of Gauss-Kruger zone 11,,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,1996-09-12 00:00:00,,1,1
-20072,Pulkovo 1995 / Gauss-Kruger 12N,1771,projected,4530,,4200,16312,,,Truncated form of Gauss-Kruger zone 12,,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,1996-09-12 00:00:00,,1,1
-20073,Pulkovo 1995 / Gauss-Kruger 13N,1772,projected,4530,,4200,16313,,,Truncated form of Gauss-Kruger zone 13,,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,1996-09-12 00:00:00,,1,1
-20074,Pulkovo 1995 / Gauss-Kruger 14N,1773,projected,4530,,4200,16314,,,Truncated form of Gauss-Kruger zone 14,,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,1996-09-12 00:00:00,,1,1
-20075,Pulkovo 1995 / Gauss-Kruger 15N,1774,projected,4530,,4200,16315,,,Truncated form of Gauss-Kruger zone 15,,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,1996-09-12 00:00:00,,1,1
-20076,Pulkovo 1995 / Gauss-Kruger 16N,1775,projected,4530,,4200,16316,,,Truncated form of Gauss-Kruger zone 16,,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,1996-09-12 00:00:00,,1,1
-20077,Pulkovo 1995 / Gauss-Kruger 17N,1776,projected,4530,,4200,16317,,,Truncated form of Gauss-Kruger zone 17,,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,1996-09-12 00:00:00,,1,1
-20078,Pulkovo 1995 / Gauss-Kruger 18N,1777,projected,4530,,4200,16318,,,Truncated form of Gauss-Kruger zone 18,,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,1996-09-12 00:00:00,,1,1
-20079,Pulkovo 1995 / Gauss-Kruger 19N,1778,projected,4530,,4200,16319,,,Truncated form of Gauss-Kruger zone 19,,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,1996-09-12 00:00:00,,1,1
-20080,Pulkovo 1995 / Gauss-Kruger 20N,1779,projected,4530,,4200,16320,,,Truncated form of Gauss-Kruger zone 20,,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,1996-09-12 00:00:00,,1,1
-20081,Pulkovo 1995 / Gauss-Kruger 21N,1780,projected,4530,,4200,16321,,,Truncated form of Gauss-Kruger zone 21,,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,1996-09-12 00:00:00,,1,1
-20082,Pulkovo 1995 / Gauss-Kruger 22N,1781,projected,4530,,4200,16322,,,Truncated form of Gauss-Kruger zone 22,,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,1996-09-12 00:00:00,,1,1
-20083,Pulkovo 1995 / Gauss-Kruger 23N,1782,projected,4530,,4200,16323,,,Truncated form of Gauss-Kruger zone 23,,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,1996-09-12 00:00:00,,1,1
-20084,Pulkovo 1995 / Gauss-Kruger 24N,1783,projected,4530,,4200,16324,,,Truncated form of Gauss-Kruger zone 24,,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,1996-09-12 00:00:00,,1,1
-20085,Pulkovo 1995 / Gauss-Kruger 25N,1784,projected,4530,,4200,16325,,,Truncated form of Gauss-Kruger zone 25,,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,1996-09-12 00:00:00,,1,1
-20086,Pulkovo 1995 / Gauss-Kruger 26N,1785,projected,4530,,4200,16326,,,Truncated form of Gauss-Kruger zone 26,,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,1996-09-12 00:00:00,,1,1
-20087,Pulkovo 1995 / Gauss-Kruger 27N,1786,projected,4530,,4200,16327,,,Truncated form of Gauss-Kruger zone 27,,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,1996-09-12 00:00:00,,1,1
-20088,Pulkovo 1995 / Gauss-Kruger 28N,1787,projected,4530,,4200,16328,,,Truncated form of Gauss-Kruger zone 28,,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,1996-09-12 00:00:00,,1,1
-20089,Pulkovo 1995 / Gauss-Kruger 29N,1788,projected,4530,,4200,16329,,,Truncated form of Gauss-Kruger zone 29,,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,1996-09-12 00:00:00,,1,1
-20090,Pulkovo 1995 / Gauss-Kruger 30N,1789,projected,4530,,4200,16330,,,Truncated form of Gauss-Kruger zone 30,,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,1996-09-12 00:00:00,,1,1
-20091,Pulkovo 1995 / Gauss-Kruger 31N,1790,projected,4530,,4200,16331,,,Truncated form of Gauss-Kruger zone 31,,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,1996-09-12 00:00:00,,1,1
-20092,Pulkovo 1995 / Gauss-Kruger 32N,1791,projected,4530,,4200,16332,,,Truncated form of Gauss-Kruger zone 32,,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,1996-09-12 00:00:00,,1,1
-20137,Adindan / UTM zone 37N,1552,projected,4400,,4201,16037,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-20138,Adindan / UTM zone 38N,1553,projected,4400,,4201,16038,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-20248,AGD66 / AMG zone 48,1556,projected,4400,,4202,17448,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-20249,AGD66 / AMG zone 49,1557,projected,4400,,4202,17449,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-20250,AGD66 / AMG zone 50,1558,projected,4400,,4202,17450,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-20251,AGD66 / AMG zone 51,1559,projected,4400,,4202,17451,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-20252,AGD66 / AMG zone 52,1560,projected,4400,,4202,17452,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-20253,AGD66 / AMG zone 53,1561,projected,4400,,4202,17453,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-20254,AGD66 / AMG zone 54,1567,projected,4400,,4202,17454,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-20255,AGD66 / AMG zone 55,1568,projected,4400,,4202,17455,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-20256,AGD66 / AMG zone 56,1564,projected,4400,,4202,17456,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-20257,AGD66 / AMG zone 57,1565,projected,4400,,4202,17457,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-20258,AGD66 / AMG zone 58,1566,projected,4400,,4202,17458,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-20348,AGD84 / AMG zone 48,1556,projected,4400,,4203,17448,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-20349,AGD84 / AMG zone 49,1557,projected,4400,,4203,17449,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-20350,AGD84 / AMG zone 50,1558,projected,4400,,4203,17450,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-20351,AGD84 / AMG zone 51,1559,projected,4400,,4203,17451,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-20352,AGD84 / AMG zone 52,1560,projected,4400,,4203,17452,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-20353,AGD84 / AMG zone 53,1561,projected,4400,,4203,17453,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-20354,AGD84 / AMG zone 54,1562,projected,4400,,4203,17454,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-20355,AGD84 / AMG zone 55,1563,projected,4400,,4203,17455,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-20356,AGD84 / AMG zone 56,1564,projected,4400,,4203,17456,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-20357,AGD84 / AMG zone 57,1565,projected,4400,,4203,17457,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-20358,AGD84 / AMG zone 58,1566,projected,4400,,4203,17458,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-20437,Ain el Abd / UTM zone 37N,1569,projected,4400,,4204,16037,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1997-11-13 00:00:00,97.59,1,0
-20438,Ain el Abd / UTM zone 38N,1571,projected,4400,,4204,16038,,,"Large and medium scale topographic mapping and engineering survey. In Kuwait Oil production (but not exploration - see KOC Lambert, code 24600).","Known in Kuwait as ""KOC UTM"". Used by KOC for engineering but not explorartion (see KOC Lambert, code 24600).",,EPSG,1997-11-13 00:00:00,97.59,1,0
-20439,Ain el Abd / UTM zone 39N,1570,projected,4400,,4204,16039,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1997-11-13 00:00:00,97.59,1,0
-20499,Ain el Abd / Bahrain Grid,1040,projected,4400,,4204,19900,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-20538,Afgooye / UTM zone 38N,1554,projected,4400,,4205,16038,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-20539,Afgooye / UTM zone 39N,1555,projected,4400,,4205,16039,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-20790,Lisbon (Lisbon)/Portuguese National Grid,1294,projected,4499,,4803,19936,,,Large and medium scale topographic mapping and engineering survey for military purposes.,,Instituto Geografico e Cadastral; Lisbon,EPSG,1998-11-11 00:00:00,98.42  2000.551,1,0
-20791,Lisbon (Lisbon)/Portuguese Grid,1294,projected,4499,,4803,19969,,,Large and medium scale topographic mapping and engineering survey.,,Instituto Geografico e Cadastral Lisbon via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-20822,Aratu / UTM zone 22S,1572,projected,4400,,4208,16122,,,Oil exploration and production.,,,EPSG,1995-07-21 00:00:00,95.191,1,0
-20823,Aratu / UTM zone 23S,1573,projected,4400,,4208,16123,,,Oil exploration and production.,,,EPSG,1995-07-21 00:00:00,95.191,1,0
-20824,Aratu / UTM zone 24S,1574,projected,4400,,4208,16124,,,Oil exploration and production.,,,EPSG,1995-07-21 00:00:00,95.191,1,0
-20934,Arc 1950 / UTM zone 34S,1575,projected,4400,,4209,16134,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1997-11-13 00:00:00,,1,0
-20935,Arc 1950 / UTM zone 35S,1576,projected,4400,,4209,16135,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1997-11-13 00:00:00,,1,0
-20936,Arc 1950 / UTM zone 36S,1577,projected,4400,,4209,16136,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1997-11-13 00:00:00,,1,0
-21035,Arc 1960 / UTM zone 35S,1579,projected,4400,,4210,16135,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1997-11-13 00:00:00,,1,0
-21036,Arc 1960 / UTM zone 36S,1581,projected,4400,,4210,16136,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1997-11-13 00:00:00,,1,0
-21037,Arc 1960 / UTM zone 37S,1583,projected,4400,,4210,16137,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1997-11-13 00:00:00,,1,0
-21095,Arc 1960 / UTM zone 35N,1578,projected,4400,,4210,16035,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1997-11-13 00:00:00,,1,0
-21096,Arc 1960 / UTM zone 36N,1580,projected,4400,,4210,16036,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1997-11-13 00:00:00,,1,0
-21097,Arc 1960 / UTM zone 37N,1582,projected,4400,,4210,16037,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1997-11-13 00:00:00,,1,0
-21100,Batavia (Jakarta) / NEIEZ,1285,projected,4499,,4813,19905,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-21148,Batavia / UTM zone 48S,1584,projected,4400,,4211,16148,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-21149,Batavia / UTM zone 49S,1586,projected,4400,,4211,16149,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-21150,Batavia / UTM zone 50S,1585,projected,4400,,4211,16150,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-21291,Barbados 1938 / British West Indies Grid,1042,projected,4400,,4212,19942,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Superseded by Barbados National Grid (code 21292) from 1983.,Ordnance Survey of Great Britain,EPSG,1999-04-22 00:00:00,,1,0
-21292,Barbados 1938 / Barbados National Grid,1042,projected,4400,,4212,19943,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Supersedes Barbados 1938 / BWI Grid (code 21291) from 1983.,Ordnance Survey of Great Britain,EPSG,1999-04-22 00:00:00,,1,0
-21413,Beijing 1954 / Gauss-Kruger zone 13,1587,projected,4530,,4214,16213,,,Medium scale topographic mapping.,Also found with truncated false easting - see Beijing 1954 / Gauss-Kruger CM 75E (code 24153). Superseded by Xian 1980 / Gauss-Kruger zone 13 (code 2327).,,EPSG,2002-06-22 00:00:00,2002.16,1,0
-21414,Beijing 1954 / Gauss-Kruger zone 14,1588,projected,4530,,4214,16214,,,Medium scale topographic mapping.,Also found with truncated false easting - see Beijing 1954 / Gauss-Kruger CM 81E (code 24154). Superseded by Xian 1980 / Gauss-Kruger zone 14 (code 2328).,,EPSG,2002-06-22 00:00:00,2002.16,1,0
-21415,Beijing 1954 / Gauss-Kruger zone 15,1589,projected,4530,,4214,16215,,,Medium scale topographic mapping.,Also found with truncated false easting - see Beijing 1954 / Gauss-Kruger CM 87E (code 24155). Superseded by Xian 1980 / Gauss-Kruger zone 15 (code 2329).,,EPSG,2002-06-22 00:00:00,2002.16,1,0
-21416,Beijing 1954 / Gauss-Kruger zone 16,1590,projected,4530,,4214,16216,,,Medium scale topographic mapping.,Also found with truncated false easting - see Beijing 1954 / Gauss-Kruger CM 93E (code 24156). Superseded by Xian 1980 / Gauss-Kruger zone 16 (code 2330).,,EPSG,2002-06-22 00:00:00,2002.16,1,0
-21417,Beijing 1954 / Gauss-Kruger zone 17,1591,projected,4530,,4214,16217,,,Medium scale topographic mapping.,Also found with truncated false easting - see Beijing 1954 / Gauss-Kruger CM 99E (code 24157). Superseded by Xian 1980 / Gauss-Kruger zone 17 (code 2331).,,EPSG,2002-06-22 00:00:00,2002.16,1,0
-21418,Beijing 1954 / Gauss-Kruger zone 18,1592,projected,4530,,4214,16218,,,Medium scale topographic mapping.,Also found with truncated false easting - see Beijing 1954 / Gauss-Kruger CM 105E (code 24158). Superseded by Xian 1980 / Gauss-Kruger zone 18 (code 2332).,,EPSG,2002-06-22 00:00:00,2002.16,1,0
-21419,Beijing 1954 / Gauss-Kruger zone 19,1593,projected,4530,,4214,16219,,,Medium scale topographic mapping.,Also found with truncated false easting - see Beijing 1954 / Gauss-Kruger CM 111E (code 24159). Superseded by Xian 1980 / Gauss-Kruger zone 19 (code 2333).,,EPSG,2002-06-22 00:00:00,2002.16,1,0
-21420,Beijing 1954 / Gauss-Kruger zone 20,1594,projected,4530,,4214,16220,,,Medium scale topographic mapping.,Also found with truncated false easting - see Beijing 1954 / Gauss-Kruger CM 117E (code 24160). Superseded by Xian 1980 / Gauss-Kruger zone 20 (code 2334).,,EPSG,2002-06-22 00:00:00,2002.16,1,0
-21421,Beijing 1954 / Gauss-Kruger zone 21,1595,projected,4530,,4214,16221,,,Medium scale topographic mapping.,Also found with truncated false easting - see Beijing 1954 / Gauss-Kruger CM 123E (code 24161). Superseded by Xian 1980 / Gauss-Kruger zone 21 (code 2335).,,EPSG,2002-06-22 00:00:00,2002.16,1,0
-21422,Beijing 1954 / Gauss-Kruger zone 22,1596,projected,4530,,4214,16222,,,Medium scale topographic mapping.,Also found with truncated false easting - see Beijing 1954 / Gauss-Kruger CM 129E (code 24162). Superseded by Xian 1980 / Gauss-Kruger zone 22 (code 2336).,,EPSG,2002-06-22 00:00:00,2002.16,1,0
-21423,Beijing 1954 / Gauss-Kruger zone 23,1597,projected,4530,,4214,16223,,,Medium scale topographic mapping.,Also found with truncated false easting - see Beijing 1954 / Gauss-Kruger CM 135E (code 24163). Superseded by Xian 1980 / Gauss-Kruger zone 23 (code 2337).,,EPSG,2002-06-22 00:00:00,2002.16,1,0
-21453,Beijing 1954 / Gauss-Kruger CM 75E,1587,projected,4530,,4214,16313,,,Medium scale topographic mapping.,Truncated form of Beijing 1954 / Gauss-Kruger zone 13 (code 21413). Superseded by Xian 1980 / Gauss-Kruger CM 75E (code 2338).,,EPSG,2002-06-22 00:00:00,,1,0
-21454,Beijing 1954 / Gauss-Kruger CM 81E,1588,projected,4530,,4214,16314,,,Medium scale topographic mapping.,Truncated form of Beijing 1954 / Gauss-Kruger zone 14 (code 21414). Superseded by Xian 1980 / Gauss-Kruger CM 81E (code 2339).,,EPSG,2002-06-22 00:00:00,,1,0
-21455,Beijing 1954 / Gauss-Kruger CM 87E,1589,projected,4530,,4214,16315,,,Medium scale topographic mapping.,Truncated form of Beijing 1954 / Gauss-Kruger zone 15 (code 21415). Superseded by Xian 1980 / Gauss-Kruger CM 87E (code 2340).,,EPSG,2002-06-22 00:00:00,,1,0
-21456,Beijing 1954 / Gauss-Kruger CM 93E,1590,projected,4530,,4214,16316,,,Medium scale topographic mapping.,Truncated form of Beijing 1954 / Gauss-Kruger zone 16 (code 21416). Superseded by Xian 1980 / Gauss-Kruger CM 93E (code 2341).,,EPSG,2002-06-22 00:00:00,,1,0
-21457,Beijing 1954 / Gauss-Kruger CM 99E,1591,projected,4530,,4214,16317,,,Medium scale topographic mapping.,Truncated form of Beijing 1954 / Gauss-Kruger zone 17 (code 21417). Superseded by Xian 1980 / Gauss-Kruger CM 99E (code 2342).,,EPSG,2002-06-22 00:00:00,,1,0
-21458,Beijing 1954 / Gauss-Kruger CM 105E,1592,projected,4530,,4214,16318,,,Medium scale topographic mapping.,Truncated form of Beijing 1954 / Gauss-Kruger zone 18 (code 21418). Superseded by Xian 1980 / Gauss-Kruger CM 105E (code 2343).,,EPSG,2002-06-22 00:00:00,,1,0
-21459,Beijing 1954 / Gauss-Kruger CM 111E,1593,projected,4530,,4214,16319,,,Medium scale topographic mapping.,Truncated form of Beijing 1954 / Gauss-Kruger zone 19 (code 21419). Superseded by Xian 1980 / Gauss-Kruger CM 111E (code 2344).,,EPSG,2002-06-22 00:00:00,,1,0
-21460,Beijing 1954 / Gauss-Kruger CM 117E,1594,projected,4530,,4214,16320,,,Medium scale topographic mapping.,Truncated form of Beijing 1954 / Gauss-Kruger zone 20 (code 21420). Superseded by Xian 1980 / Gauss-Kruger CM 117E (code 2345).,,EPSG,2002-06-22 00:00:00,,1,0
-21461,Beijing 1954 / Gauss-Kruger CM 123E,1595,projected,4530,,4214,16321,,,Medium scale topographic mapping.,Truncated form of Beijing 1954 / Gauss-Kruger zone 21 (code 21421). Superseded by Xian 1980 / Gauss-Kruger CM 123E (code 2346).,,EPSG,2002-06-22 00:00:00,,1,0
-21462,Beijing 1954 / Gauss-Kruger CM 129E,1596,projected,4530,,4214,16322,,,Medium scale topographic mapping.,Truncated form of Beijing 1954 / Gauss-Kruger zone 22 (code 21422). Superseded by Xian 1980 / Gauss-Kruger CM 129E (code 2347).,,EPSG,2002-06-22 00:00:00,,1,0
-21463,Beijing 1954 / Gauss-Kruger CM 135E,1597,projected,4530,,4214,16323,,,Medium scale topographic mapping.,Truncated form of Beijing 1954 / Gauss-Kruger zone 33 (code 21423). Superseded by Xian 1980 / Gauss-Kruger CM 135E (code 2348).,,EPSG,2002-06-22 00:00:00,,1,0
-21473,Beijing 1954 / Gauss-Kruger 13N,1587,projected,4530,,4214,16313,,,Truncated form of Gauss-Kruger zone 13,,,EPSG,1995-06-02 00:00:00,,1,1
-21474,Beijing 1954 / Gauss-Kruger 14N,1588,projected,4530,,4214,16314,,,Truncated form of Gauss-Kruger zone 14,,,EPSG,1995-06-02 00:00:00,,1,1
-21475,Beijing 1954 / Gauss-Kruger 15N,1589,projected,4530,,4214,16315,,,Truncated form of Gauss-Kruger zone 15,,,EPSG,1995-06-02 00:00:00,,1,1
-21476,Beijing 1954 / Gauss-Kruger 16N,1590,projected,4530,,4214,16316,,,Truncated form of Gauss-Kruger zone 16,,,EPSG,1995-06-02 00:00:00,,1,1
-21477,Beijing 1954 / Gauss-Kruger 17N,1591,projected,4530,,4214,16317,,,Truncated form of Gauss-Kruger zone 17,,,EPSG,1995-06-02 00:00:00,,1,1
-21478,Beijing 1954 / Gauss-Kruger 18N,1592,projected,4530,,4214,16318,,,Truncated form of Gauss-Kruger zone 18,,,EPSG,1995-06-02 00:00:00,,1,1
-21479,Beijing 1954 / Gauss-Kruger 19N,1593,projected,4530,,4214,16319,,,Truncated form of Gauss-Kruger zone 19,,,EPSG,1995-06-02 00:00:00,,1,1
-21480,Beijing 1954 / Gauss-Kruger 20N,1594,projected,4530,,4214,16320,,,Truncated form of Gauss-Kruger zone 20,,,EPSG,1995-06-02 00:00:00,,1,1
-21481,Beijing 1954 / Gauss-Kruger 21N,1595,projected,4530,,4214,16321,,,Truncated form of Gauss-Kruger zone 21,,,EPSG,1995-06-02 00:00:00,,1,1
-21482,Beijing 1954 / Gauss-Kruger 22N,1596,projected,4530,,4214,16322,,,Truncated form of Gauss-Kruger zone 22,,,EPSG,1995-06-02 00:00:00,,1,1
-21483,Beijing 1954 / Gauss-Kruger 23N,1597,projected,4530,,4214,16323,,,Truncated form of Gauss-Kruger zone 23,,,EPSG,1995-06-02 00:00:00,,1,1
-21500,Belge 1950 (Brussels) / Belge Lambert 50,1347,projected,4499,,4809,19901,,,Large and medium scale topographic mapping and engineering survey.,Superseded by Belge 1972 / Belge Lambert 72 (code 31300) and Belge 1972 / Belgian Lambert 72 (code 31370).,,EPSG,1997-04-11 00:00:00,97.13,1,0
-21780,Bern 1898 (Bern) / LV03C,1286,projected,4498,,4801,19923,,,Large and medium scale topographic mapping and engineering survey.,Superseded by CH1903 / LV03 (code 21781).,,EPSG,1997-06-30 00:00:00,97.27  97.62,1,0
-21781,CH1903 / LV03,1286,projected,4498,,4149,19922,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Supersedes LV03C (code 21780).  Superseded by CH1903+/LV95 (code 2056).,,EPSG,1999-10-20 00:00:00,2001.29,1,0
-21817,Bogota 1975 / UTM zone 17N,1602,projected,4400,,4218,16017,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-10-19 00:00:00,2000.20,1,0
-21818,Bogota 1975 / UTM zone 18N,1603,projected,4400,,4218,16018,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-10-19 00:00:00,2000.20,1,0
-21891,Bogota 1975 / Colombia West zone,1598,projected,4499,,4218,18051,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-10-19 00:00:00,97.11  97.57 2000.20,1,0
-21892,Bogota 1975 / Colombia Bogota zone,1599,projected,4499,,4218,18052,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-10-19 00:00:00,97.11  97.57 2000.20,1,0
-21893,Bogota 1975 / Colombia East Central zone,1600,projected,4499,,4218,18053,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-10-19 00:00:00,97.11  97.57 2000.20,1,0
-21894,Bogota 1975 / Colombia East,1601,projected,4499,,4218,18054,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-10-19 00:00:00,97.11  97.57 2000.20,1,0
-22032,Camacupa / UTM zone 32S,1606,projected,4400,,4220,16132,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1997-11-13 00:00:00,97.58,1,0
-22033,Camacupa / UTM zone 33S,1607,projected,4400,,4220,16133,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1997-11-13 00:00:00,97.58,1,0
-22091,Camacupa / TM 11.30 SE,1605,projected,4400,,4220,16611,,,Oil exploration by Esso Angola offshore blocks 15 and 24.,,Esso Angola,EPSG,1998-11-11 00:00:00,,1,0
-22092,Camacupa / TM 12 SE,1604,projected,4400,,4220,16612,,,"Oil exploration by Shell Angola for offshore blocks 1 and 16  and by BP Amoco, Elf and Esso for offshore blocks 31-33.",,Shell Angola,EPSG,1998-11-11 00:00:00,,1,0
-22191,Campo Inchauspe / Argentina 1,1608,projected,4530,,4221,18031,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2002-06-22 00:00:00,97.72 2002.36,1,0
-22192,Campo Inchauspe / Argentina 2,1609,projected,4530,,4221,18032,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2002-06-22 00:00:00,97.72 2002.36,1,0
-22193,Campo Inchauspe / Argentina 3,1610,projected,4530,,4221,18033,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2002-06-22 00:00:00,97.72 2002.36,1,0
-22194,Campo Inchauspe / Argentina 4,1611,projected,4530,,4221,18034,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2002-06-22 00:00:00,97.72 2002.36,1,0
-22195,Campo Inchauspe / Argentina 5,1612,projected,4530,,4221,18035,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2002-06-22 00:00:00,97.72 2002.36,1,0
-22196,Campo Inchauspe / Argentina 6,1613,projected,4530,,4221,18036,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2002-06-22 00:00:00,97.72 2002.36,1,0
-22197,Campo Inchauspe / Argentina 7,1614,projected,4530,,4221,18037,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2002-06-22 00:00:00,97.72 2002.36,1,0
-22234,Cape / UTM zone 34S,1615,projected,4400,,4222,16134,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-12-08 00:00:00,,1,0
-22235,Cape / UTM zone 35S,1617,projected,4400,,4222,16135,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-12-08 00:00:00,,1,0
-22236,Cape / UTM zone 36S,1616,projected,4400,,4222,16136,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-12-08 00:00:00,,1,0
-22275,South African Coordinate System zone 15,1454,projected,6503,,4222,17515,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",,"Directorate of Surveys and Mapping, Mowbray, South Africa.",EPSG,2000-03-07 00:00:00,99.98  2000.04,1,0
-22277,South African Coordinate System zone 17,1455,projected,6503,,4222,17517,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",,"Directorate of Surveys and Mapping, Mowbray, South Africa.",EPSG,2000-03-07 00:00:00,99.98  2000.04,1,0
-22279,South African Coordinate System zone 19,1456,projected,6503,,4222,17519,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",,"Directorate of Surveys and Mapping, Mowbray, South Africa.",EPSG,2000-03-07 00:00:00,99.98  2000.04,1,0
-22281,South African Coordinate System zone 21,1457,projected,6503,,4222,17521,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",,"Directorate of Surveys and Mapping, Mowbray, South Africa.",EPSG,2000-03-07 00:00:00,99.98  2000.04,1,0
-22283,South African Coordinate System zone 23,1458,projected,6503,,4222,17523,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",,"Directorate of Surveys and Mapping, Mowbray, South Africa.",EPSG,2000-03-07 00:00:00,99.98  2000.04,1,0
-22285,South African Coordinate System zone 25,1459,projected,6503,,4222,17525,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",,"Directorate of Surveys and Mapping, Mowbray, South Africa.",EPSG,2000-03-07 00:00:00,99.98  2000.04,1,0
-22287,South African Coordinate System zone 27,1460,projected,6503,,4222,17527,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",,"Directorate of Surveys and Mapping, Mowbray, South Africa.",EPSG,2000-03-07 00:00:00,99.98  2000.04,1,0
-22289,South African Coordinate System zone 29,1461,projected,6503,,4222,17529,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",,"Directorate of Surveys and Mapping, Mowbray, South Africa.",EPSG,2000-03-07 00:00:00,99.98  2000.04,1,0
-22291,South African Coordinate System zone 31,1462,projected,6503,,4222,17531,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",,"Directorate of Surveys and Mapping, Mowbray, South Africa.",EPSG,2000-03-07 00:00:00,99.98  2000.04,1,0
-22293,South African Coordinate System zone 33,1463,projected,6503,,4222,17533,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",,"Directorate of Surveys and Mapping, Mowbray, South Africa.",EPSG,2000-03-07 00:00:00,99.98  2000.04,1,0
-22300,Carthage (Paris) / Tunisia Mining Grid,1618,projected,4406,,4816,19937,,,Large and medium scale topographic mapping and engineering survey.,CAUTION: Carthage datum did not exist when the 1953 decree was issued and an inference is that grid should be applied to the Voirol 1875 geogCS.  Common practice assumes that the current Tunisian geodetic datum of Carthage applies.,,EPSG,1998-11-11 00:00:00,,1,0
-22332,Carthage / UTM zone 32N,1489,projected,4400,,4223,16032,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-22391,Carthage / Nord Tunisie,1619,projected,4499,,4223,18181,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-22392,Carthage / Sud Tunisie,1620,projected,4499,,4223,18182,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-22523,Corrego Alegre / UTM zone 23S,1621,projected,4400,,4225,16123,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-22524,Corrego Alegre / UTM zone 24S,1622,projected,4400,,4225,16124,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-22700,Deir ez Zor / Levant Zone,1623,projected,4499,,4227,19940,,,Large and medium scale topographic mapping and engineering survey.,Superseded by Deir ez Zor / Syria Lambert (EPSG code 22770) from 1973.,,EPSG,1999-04-22 00:00:00,,1,0
-22770,Deir ez Zor / Syria Lambert,1623,projected,4499,,4227,19948,,,Large and medium scale topographic mapping and engineering survey.,Supersedes Deir ez Zor / Levant zone (EPSG code 22700) from 1973.,,EPSG,1999-10-20 00:00:00,,1,0
-22780,Deir ez Zor / Levant Stereographic,1623,projected,4499,,4227,19949,,,Used  prior to World War II for cadastral and large scale topographic mapping.,,,EPSG,2000-10-19 00:00:00,,1,0
-22832,Douala / UTM zone 32N,1060,projected,4400,,4228,16032,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,1
-22991,Egypt 1907 / Blue Belt,1642,projected,4400,,4229,18071,,,Military topographic mapping.  Oil industry usually uses Egypt 1907 / Red Belt rather than this projected CRS.,Also known as Egypt 1907 / Green Belt.,,EPSG,2002-07-16 00:00:00,2002.49,1,0
-22992,Egypt 1907 / Red Belt,1643,projected,4400,,4229,18072,,,Large and medium scale topographic mapping and engineering survey.,See also Egypt 1907 / Blue Belt for non oil industry usage in Sinai peninsula.,,EPSG,1995-06-02 00:00:00,,1,0
-22993,Egypt 1907 / Purple Belt,1644,projected,4400,,4229,18073,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-22994,Egypt 1907 / Extended Purple Belt,1645,projected,4400,,4229,18074,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-23028,ED50 / UTM zone 28N,1631,projected,4400,,4230,16028,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-23029,ED50 / UTM zone 29N,1632,projected,4400,,4230,16029,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-23030,ED50 / UTM zone 30N,1633,projected,4400,,4230,16030,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-23031,ED50 / UTM zone 31N,1634,projected,4400,,4230,16031,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-23032,ED50 / UTM zone 32N,1635,projected,4400,,4230,16032,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-23033,ED50 / UTM zone 33N,1636,projected,4400,,4230,16033,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-23034,ED50 / UTM zone 34N,1637,projected,4400,,4230,16034,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-23035,ED50 / UTM zone 35N,1638,projected,4400,,4230,16035,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-23036,ED50 / UTM zone 36N,1639,projected,4400,,4230,16036,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-23037,ED50 / UTM zone 37N,1640,projected,4400,,4230,16037,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-23038,ED50 / UTM zone 38N,1641,projected,4400,,4230,16038,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-23090,ED50 / TM 0 N,1629,projected,4400,,4230,16400,,,Used by Shell UK for UKCS North Sea oil exploration and production.,,Shell UK,EPSG,1998-11-11 00:00:00,,1,0
-23095,ED50 / TM 5 NE,1630,projected,4400,,4230,16405,,,Used by NAM for Dutch Sector of the North Sea oil exploration and production.,,NAM,EPSG,1998-11-11 00:00:00,,1,0
-23239,Fahud / UTM zone 39N,1544,projected,4400,,4232,16039,,,Large and medium scale topographic mapping and engineering survey.,Since 1993 superseded by PSD93 / UTM zone 39N projCS (code 3439). Maximum differences to Fahud adjustment are 20 metres.,,EPSG,1995-06-02 00:00:00,,1,0
-23240,Fahud / UTM zone 40N,1545,projected,4400,,4232,16040,,,Large and medium scale topographic mapping and engineering survey.,Since 1993 superseded by PSD93 / UTM zone 40N projCS (code 3440). Maximum differences to Fahud adjustment are 20 metres.,,EPSG,1995-06-02 00:00:00,,1,0
-23433,Garoua / UTM zone 33N,1060,projected,4400,,4234,16033,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,1
-23700,HD72 / EOV,1119,projected,4498,,4237,19931,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1997-07-22 00:00:00,,1,0
-23846,ID74 / UTM zone 46N,1647,projected,4400,,4238,16046,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-08-08 00:00:00,95.193  95.20,1,0
-23847,ID74 / UTM zone 47N,1649,projected,4400,,4238,16047,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-07-21 00:00:00,95.193,1,0
-23848,ID74 / UTM zone 48N,1651,projected,4400,,4238,16048,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-07-21 00:00:00,95.193,1,0
-23849,ID74 / UTM zone 49N,1653,projected,4400,,4238,16049,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-07-21 00:00:00,95.193,1,0
-23850,ID74 / UTM zone 50N,1655,projected,4400,,4238,16050,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-07-21 00:00:00,95.193,1,0
-23851,ID74 / UTM zone 51N,1657,projected,4400,,4238,16051,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-07-21 00:00:00,95.193,1,0
-23852,ID74 / UTM zone 52N,1659,projected,4400,,4238,16052,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-07-21 00:00:00,95.193,1,0
-23853,ID74 / UTM zone 53N,1661,projected,4400,,4238,16053,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-07-21 00:00:00,95.193,1,0
-23886,ID74 / UTM zone 46S,1648,projected,4400,,4238,16146,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-08-08 00:00:00,95.193  95.20,1,0
-23887,ID74 / UTM zone 47S,1650,projected,4400,,4238,16147,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-07-21 00:00:00,95.193,1,0
-23888,ID74 / UTM zone 48S,1652,projected,4400,,4238,16148,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-07-21 00:00:00,95.193,1,0
-23889,ID74 / UTM zone 49S,1654,projected,4400,,4238,16149,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-07-21 00:00:00,95.193,1,0
-23890,ID74 / UTM zone 50S,1656,projected,4400,,4238,16150,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-07-21 00:00:00,95.193,1,0
-23891,ID74 / UTM zone 51S,1658,projected,4400,,4238,16151,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-07-21 00:00:00,95.193,1,0
-23892,ID74 / UTM zone 52S,1660,projected,4400,,4238,16152,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-07-21 00:00:00,95.193,1,0
-23893,ID74 / UTM zone 53S,1662,projected,4400,,4238,16153,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-07-21 00:00:00,95.193,1,0
-23894,ID74 / UTM zone 54S,1663,projected,4400,,4238,16154,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-07-21 00:00:00,95.193,1,0
-23946,Indian 1954 / UTM zone 46N,1664,projected,4400,,4239,16046,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1998-06-13 00:00:00,,1,0
-23947,Indian 1954 / UTM zone 47N,1665,projected,4400,,4239,16047,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-23948,Indian 1954 / UTM zone 48N,1666,projected,4400,,4239,16048,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-24047,Indian 1975 / UTM zone 47N,1667,projected,4400,,4240,16047,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-24048,Indian 1975 / UTM zone 48N,1666,projected,4400,,4240,16048,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-24100,Jamaica 1875 / Jamaica (Old Grid),1128,projected,4403,,4241,19909,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Superseded by 24200 (JAD69 / Jamaica National Grid).,,EPSG,1995-06-02 00:00:00,,1,0
-24200,JAD69 / Jamaica National Grid,1128,projected,4400,,4242,19910,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Supersedes 24100 (JAD69 / Jamaica National Grid).,,EPSG,1995-06-02 00:00:00,,1,0
-24305,Kalianpur 1937 / UTM zone 45N,1674,projected,4400,,4144,16045,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1999-10-20 00:00:00,,1,0
-24306,Kalianpur 1937 / UTM zone 46N,1675,projected,4400,,4144,16046,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1999-10-20 00:00:00,,1,0
-24311,Kalianpur 1962 / UTM zone 41N,1687,projected,4400,,4145,16041,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1999-10-20 00:00:00,,1,0
-24312,Kalianpur 1962 / UTM zone 42N,1688,projected,4400,,4145,16042,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1999-10-20 00:00:00,,1,0
-24313,Kalianpur 1962 / UTM zone 43N,1689,projected,4400,,4145,16043,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1999-10-20 00:00:00,,1,0
-24342,Kalianpur 1975 / UTM zone 42N,1679,projected,4400,,4146,16042,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1999-10-20 00:00:00,,1,0
-24343,Kalianpur 1975 / UTM zone 43N,1680,projected,4400,,4146,16043,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1999-10-20 00:00:00,,1,0
-24344,Kalianpur 1975 / UTM zone 44N,1681,projected,4400,,4146,16044,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1999-10-20 00:00:00,,1,0
-24345,Kalianpur 1975 / UTM zone 45N,1682,projected,4400,,4146,16045,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1999-10-20 00:00:00,,1,0
-24346,Kalianpur 1975 / UTM zone 46N,1683,projected,4400,,4146,16046,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1999-10-20 00:00:00,,1,0
-24347,Kalianpur 1975 / UTM zone 47N,1684,projected,4400,,4146,16047,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1999-10-20 00:00:00,,1,0
-24370,Kalianpur 1880 / India zone 0,1668,projected,4408,,4243,18110,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1999-10-20 00:00:00,97.23,1,0
-24371,Kalianpur 1880 / India zone I,1669,projected,4408,,4243,18111,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1999-10-20 00:00:00,97.23,1,0
-24372,Kalianpur 1880 / India zone IIa,1670,projected,4408,,4243,18112,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1999-10-20 00:00:00,97.23,1,0
-24373,Kalianpur 1880 / India zone III,1672,projected,4408,,4243,18114,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1999-10-20 00:00:00,97.23,1,0
-24374,Kalianpur 1880 / India zone IV,1673,projected,4408,,4243,18116,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1999-10-20 00:00:00,97.23,1,0
-24375,Kalianpur 1937 / India zone IIb,1041,projected,4400,,4144,18238,,,Large and medium scale topographic mapping and engineering survey.,Used by Bangladesh since metrication.  Metric conversion applies A.R.Clarke's Indian foot-British foot ratio of 0.99999566 and Benoit's 1895 British inch-metre ratio of 39.370115 rounded as Ind ft = 0.30479841m exactly.,,EPSG,1999-10-20 00:00:00,97.23,1,0
-24376,Kalianpur 1962 / India zone I,1685,projected,4400,,4145,18236,,,Large and medium scale topographic mapping and engineering survey.,Used by Pakistan since metrication.  Metric conversion applies A.R.Clarke's Indian foot-British foot ratio of 0.99999566 and J.S.Clark's 1865 British inch-metre ratio of 39.369971 rounded by G.Bomford with slight error as Ind ft = 0.3048996m exactly.,,EPSG,1999-10-20 00:00:00,97.23,1,0
-24377,Kalianpur 1962 / India zone IIa,1686,projected,4400,,4145,18237,,,Large and medium scale topographic mapping and engineering survey.,Used by Pakistan since metrication.  Metric conversion applies A.R.Clarke's Indian foot-British foot ratio of 0.99999566 and J.S.Clark's 1865 British inch-metre ratio of 39.369971 rounded by G.Bomford with slight error as Ind ft = 0.3048996m exactly.,,EPSG,1999-10-20 00:00:00,97.23,1,0
-24378,Kalianpur 1975 / India zone I,1676,projected,4400,,4146,18231,,,Large and medium scale topographic mapping and engineering survey.,Used by India since metrication.  Metric conversion applies A.R.Clarke's Indian foot-British foot ratio of 0.99999566 and J.S.Clark's 1865 British inch-metre ratio of 39.369971 rounded as 1 Ind ft = 0.3048995m exactly.,,EPSG,1999-10-20 00:00:00,97.23,1,0
-24379,Kalianpur 1975 / India zone IIa,1677,projected,4400,,4146,18232,,,Large and medium scale topographic mapping and engineering survey.,Used by India since metrication.  Metric conversion applies A.R.Clarke's Indian foot-British foot ratio of 0.99999566 and J.S.Clark's 1865 British inch-metre ratio of 39.369971 rounded as 1 Ind ft = 0.3048995m exactly.,,EPSG,1999-10-20 00:00:00,97.23,1,0
-24380,Kalianpur 1975 / India zone IIb,1678,projected,4400,,4146,18235,,,Large and medium scale topographic mapping and engineering survey.,Used by India since metrication.  Metric conversion applies A.R.Clarke's Indian foot-British foot ratio of 0.99999566 and J.S.Clark's 1865 British inch-metre ratio of 39.369971 rounded as 1 Ind ft = 0.3048995m exactly.,,EPSG,1999-10-20 00:00:00,97.23,1,0
-24381,Kalianpur 1975 / India zone III,1672,projected,4400,,4146,18233,,,Large and medium scale topographic mapping and engineering survey.,Used by India since metrication.  Metric conversion applies A.R.Clarke's Indian foot-British foot ratio of 0.99999566 and J.S.Clark's 1865 British inch-metre ratio of 39.369971 rounded as 1 Ind ft = 0.3048995m exactly.,,EPSG,1999-10-20 00:00:00,97.23,1,0
-24382,Kalianpur 1880 / India zone IIb,1671,projected,4408,,4243,18113,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1999-10-20 00:00:00,97.23,1,0
-24383,Kalianpur 1975 / India zone IV,1673,projected,4400,,4146,18234,,,Large and medium scale topographic mapping and engineering survey.,Used by India since metrication.  Metric conversion applies A.R.Clarke's Indian foot-British foot ratio of 0.99999566 and J.S.Clark's 1865 British inch-metre ratio of 39.369971 rounded as 1 Ind ft = 0.3048995m exactly.,,EPSG,1999-10-20 00:00:00,97.23,1,0
-24500,Kertau / Singapore Grid,1210,projected,4400,,4245,19920,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-24547,Kertau / UTM zone 47N,1691,projected,4400,,4245,16047,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-24548,Kertau / UTM zone 48N,1692,projected,4400,,4245,16048,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-07-21 00:00:00,95.192,1,0
-24571,Kertau / R.S.O. Malaya (ch),1690,projected,4401,,4245,19935,,,Large and medium scale topographic mapping and engineering survey.,Adopts metric conversion of 39.370113 inches per metre.,,EPSG,1999-10-20 00:00:00,97.231,1,0
-24600,KOC Lambert,1136,projected,4400,,4246,19906,,,"Oil industry exploration (but not production - see Ain el Abd / UTM zone 38N, code 20438).","Used by KOC for exploration but not engineering (see Ain el Abd / UTM zone 38N, code 24600).",,EPSG,1996-04-12 00:00:00,,1,0
-24718,La Canoa / UTM zone 18N,1693,projected,4400,,4247,16018,,,Large and medium scale topographic mapping and engineering survey.,Sometimes referred to as PSAD56 / UTM zone 18N.,,EPSG,1999-10-20 00:00:00,,1,0
-24719,La Canoa / UTM zone 19N,1694,projected,4400,,4247,16019,,,Large and medium scale topographic mapping and engineering survey.,Sometimes referred to as PSAD56 / UTM zone 19N.,,EPSG,1999-10-20 00:00:00,,1,0
-24720,La Canoa / UTM zone 20N,1695,projected,4400,,4247,16020,,,Large and medium scale topographic mapping and engineering survey.,Sometimes referred to as PSAD56 / UTM zone 20N.,,EPSG,1995-06-02 00:00:00,,1,0
-24818,PSAD56 / UTM zone 18N,1756,projected,4400,,4248,16018,,,Large and medium scale topographic mapping and engineering survey.,In Venezuela also known as La Canoa / UTM zone 18N.,,EPSG,1995-06-02 00:00:00,,1,0
-24819,PSAD56 / UTM zone 19N,1758,projected,4400,,4248,16019,,,Large and medium scale topographic mapping and engineering survey.,In Venezuela also known as La Canoa / UTM zone 19N.,,EPSG,1995-06-02 00:00:00,,1,0
-24820,PSAD56 / UTM zone 20N,1760,projected,4400,,4248,16020,,,Large and medium scale topographic mapping and engineering survey.,In Venezuela also known as La Canoa / UTM zone 20N.,,EPSG,1995-06-02 00:00:00,,1,0
-24821,PSAD56 / UTM zone 21N,1762,projected,4400,,4248,16021,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-24877,PSAD56 / UTM zone 17S,1755,projected,4400,,4248,16117,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-24878,PSAD56 / UTM zone 18S,1757,projected,4400,,4248,16118,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-24879,PSAD56 / UTM zone 19S,1759,projected,4400,,4248,16119,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-24880,PSAD56 / UTM zone 20S,1761,projected,4400,,4248,16120,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-24882,PSAD56 / UTM zone 22S,1754,projected,4400,,4248,16122,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1999-04-22 00:00:00,,1,0
-24891,PSAD56 / Peru west zone,1753,projected,4499,,4248,18161,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-24892,PSAD56 / Peru central zone,1752,projected,4499,,4248,18162,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-24893,PSAD56 / Peru east zone,1751,projected,4499,,4248,18163,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-25000,Leigon / Ghana Metre Grid,1104,projected,4400,,4250,19904,,,Large and medium scale topographic mapping and engineering survey.,Superseded Accra / Ghana National Grid (code 2136) in 1978.,,EPSG,1995-06-02 00:00:00,,1,0
-25231,Lome / UTM zone 31N,1232,projected,4400,,4252,16031,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-25391,Luzon 1911 / Philippines zone I,1698,projected,4499,,4253,18171,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-25392,Luzon 1911 / Philippines zone II,1699,projected,4499,,4253,18172,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-25393,Luzon 1911 / Philippines zone III,1700,projected,4499,,4253,18173,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-25394,Luzon 1911 / Philippines zone IV,1701,projected,4499,,4253,18174,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-25395,Luzon 1911 / Philippines zone V,1702,projected,4499,,4253,18175,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-25700,Makassar (Jakarta) / NEIEZ,1316,projected,4499,,4804,19905,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-25828,ETRS89 / UTM zone 28N,2122,projected,4400,,4258,16028,,,Large and medium scale topographic mapping and engineering survey.,The distinction in usage between ETRF89 and ETRS89 is confused: although in principle conceptually different in practice both are used as synonyms.,,EPSG,2000-10-19 00:00:00,99.11 2000.72,1,0
-25829,ETRS89 / UTM zone 29N,2123,projected,4400,,4258,16029,,,Large and medium scale topographic mapping and engineering survey.,The distinction in usage between ETRF89 and ETRS89 is confused: although in principle conceptually different in practice both are used as synonyms.,,EPSG,2000-10-19 00:00:00,99.11 2000.72,1,0
-25830,ETRS89 / UTM zone 30N,2124,projected,4400,,4258,16030,,,Large and medium scale topographic mapping and engineering survey.,The distinction in usage between ETRF89 and ETRS89 is confused: although in principle conceptually different in practice both are used as synonyms.,,EPSG,2000-10-19 00:00:00,99.11 2000.72,1,0
-25831,ETRS89 / UTM zone 31N,2125,projected,4400,,4258,16031,,,Large and medium scale topographic mapping and engineering survey.,The distinction in usage between ETRF89 and ETRS89 is confused: although in principle conceptually different in practice both are used as synonyms.,,EPSG,2000-10-19 00:00:00,99.11 2000.72,1,0
-25832,ETRS89 / UTM zone 32N,2126,projected,4400,,4258,16032,,,Large and medium scale topographic mapping and engineering survey.,The distinction in usage between ETRF89 and ETRS89 is confused: although in principle conceptually different in practice both are used as synonyms.,,EPSG,2000-10-19 00:00:00,99.11 2000.72,1,0
-25833,ETRS89 / UTM zone 33N,2127,projected,4400,,4258,16033,,,Large and medium scale topographic mapping and engineering survey.,Used for all state of Brandenburg including those areas west of 12 deg E.,,EPSG,2000-10-19 00:00:00,99.11 2000.72,1,0
-25834,ETRS89 / UTM zone 34N,2128,projected,4400,,4258,16034,,,Large and medium scale topographic mapping and engineering survey.,The distinction in usage between ETRF89 and ETRS89 is confused: although in principle conceptually different in practice both are used as synonyms.,,EPSG,2000-10-19 00:00:00,99.11 2000.72,1,0
-25835,ETRS89 / UTM zone 35N,2129,projected,4400,,4258,16035,,,Large and medium scale topographic mapping and engineering survey.,The distinction in usage between ETRF89 and ETRS89 is confused: although in principle conceptually different in practice both are used as synonyms.,,EPSG,2000-10-19 00:00:00,99.11 2000.72,1,0
-25836,ETRS89 / UTM zone 36N,2130,projected,4400,,4258,16036,,,Large and medium scale topographic mapping and engineering survey.,The distinction in usage between ETRF89 and ETRS89 is confused: although in principle conceptually different in practice both are used as synonyms.,,EPSG,2000-10-19 00:00:00,99.11 2000.72,1,0
-25837,ETRS89 / UTM zone 37N,2131,projected,4400,,4258,16037,,,Large and medium scale topographic mapping and engineering survey.,The distinction in usage between ETRF89 and ETRS89 is confused: although in principle conceptually different in practice both are used as synonyms.,,EPSG,2000-10-19 00:00:00,99.11 2000.72,1,0
-25838,ETRS89 / UTM zone 38N,2132,projected,4400,,4258,16038,,,Large and medium scale topographic mapping and engineering survey.,The distinction in usage between ETRF89 and ETRS89 is confused: although in principle conceptually different in practice both are used as synonyms.,,EPSG,2000-10-19 00:00:00,99.11 2000.72,1,0
-25884,ETRS89 / TM Baltic93,1646,projected,4530,,4258,19939,,,Large and medium scale topographic mapping and engineering survey.,Used as a common coordinate system for the Baltic states and for medium and small scale mapping in Estonia since 1993.,http://www.geo.ut.ee/~raivo/estcoord.html,EPSG,2000-10-19 00:00:00,99.11 2000.72,1,0
-25932,Malongo 1987 / UTM zone 32S,1317,projected,4400,,4259,16132,,,Oil exploration,,,EPSG,1995-06-02 00:00:00,,1,0
-26191,Merchich / Nord Maroc,1703,projected,4499,,4261,18131,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26192,Merchich / Sud Maroc,1704,projected,4499,,4261,18132,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26193,Merchich / Sahara,1705,projected,4499,,4261,18133,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26237,Massawa / UTM zone 37N,1089,projected,4400,,4262,16037,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26331,Minna / UTM zone 31N,1716,projected,4400,,4263,16031,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26332,Minna / UTM zone 32N,1717,projected,4400,,4263,16032,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26391,Minna / Nigeria West Belt,1715,projected,4400,,4263,18151,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26392,Minna / Nigeria Mid Belt,1714,projected,4400,,4263,18152,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26393,Minna / Nigeria East Belt,1713,projected,4400,,4263,18153,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26432,Mhast / UTM zone 32S,1318,projected,4400,,4264,16132,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26591,Monte Mario (Rome) / Italy zone 1,1718,projected,4499,,4806,18121,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26592,Monte Mario (Rome) / Italy zone 2,1719,projected,4499,,4806,18122,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26632,M'poraloko / UTM zone 32N,1696,projected,4400,,4266,16032,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26692,M'poraloko / UTM zone 32S,1697,projected,4400,,4266,16132,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26703,NAD27 / UTM zone 3N,2133,projected,4400,,4267,16003,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26704,NAD27 / UTM zone 4N,2134,projected,4400,,4267,16004,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26705,NAD27 / UTM zone 5N,2135,projected,4400,,4267,16005,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26706,NAD27 / UTM zone 6N,2136,projected,4400,,4267,16006,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26707,NAD27 / UTM zone 7N,2137,projected,4400,,4267,16007,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26708,NAD27 / UTM zone 8N,2138,projected,4400,,4267,16008,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26709,NAD27 / UTM zone 9N,2139,projected,4400,,4267,16009,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26710,NAD27 / UTM zone 10N,2140,projected,4400,,4267,16010,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26711,NAD27 / UTM zone 11N,2141,projected,4400,,4267,16011,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26712,NAD27 / UTM zone 12N,2142,projected,4400,,4267,16012,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26713,NAD27 / UTM zone 13N,2143,projected,4400,,4267,16013,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26714,NAD27 / UTM zone 14N,2144,projected,4400,,4267,16014,,,Large and medium scale topographic mapping and engineering survey.,See NAD27 / BLM 14N (feet) (code 32064) for non-metric equivalent used in US Gulf of Mexico.,,EPSG,1995-06-02 00:00:00,,1,0
-26715,NAD27 / UTM zone 15N,2145,projected,4400,,4267,16015,,,Large and medium scale topographic mapping and engineering survey.,In Ontario superseded by NAD27(76) / UTM zone 15N (code 2027). See NAD27 / BLM 15N (feet) (code 32065) for non-metric equivalent used in US Gulf of Mexico.,,EPSG,1995-06-02 00:00:00,,1,0
-26716,NAD27 / UTM zone 16N,2146,projected,4400,,4267,16016,,,Large and medium scale topographic mapping and engineering survey.,In Ontario superseded by NAD27(76) / UTM zone 16N (code 2028). See NAD27 / BLM 16N (feet) (code 32066) for non-metric equivalent used in US Gulf of Mexico.,,EPSG,1995-06-02 00:00:00,,1,0
-26717,NAD27 / UTM zone 17N,2147,projected,4400,,4267,16017,,,Large and medium scale topographic mapping and engineering survey.,In Ontario superseded by NAD27(76) / UTM zone 17N (code 2029).  In Quebec superseded by NAD27(CGQ77) / UTM zone 17N (code 2031). See NAD27 / BLM 17N (feet) (code 32067) for non-metric equivalent used in US Gulf of Mexico.,,EPSG,1995-06-02 00:00:00,,1,0
-26718,NAD27 / UTM zone 18N,2148,projected,4400,,4267,16018,,,Large and medium scale topographic mapping and engineering survey.,In Ontario superseded by NAD27(76) / UTM zone 18N (code 2030).  In Quebec superseded by NAD27(CGQ77) / UTM zone 18N (code 2032).,,EPSG,1995-06-02 00:00:00,,1,0
-26719,NAD27 / UTM zone 19N,2149,projected,4400,,4267,16019,,,Large and medium scale topographic mapping and engineering survey.,In Quebec superseded by NAD27(CGQ77) / UTM zone 19N (code 2033).,,EPSG,1995-06-02 00:00:00,,1,0
-26720,NAD27 / UTM zone 20N,2150,projected,4400,,4267,16020,,,Large and medium scale topographic mapping and engineering survey.,In Quebec superseded by NAD27(CGQ77) / UTM zone 20N (code 2034).,,EPSG,1995-06-02 00:00:00,,1,0
-26721,NAD27 / UTM zone 21N,2151,projected,4400,,4267,16021,,,Large and medium scale topographic mapping and engineering survey.,In Quebec superseded by NAD27(CGQ77) / UTM zone 21N (code 2035).,,EPSG,1995-06-02 00:00:00,,1,0
-26722,NAD27 / UTM zone 22N,2152,projected,4400,,4267,16022,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26729,NAD27 / Alabama East,2154,projected,4497,,4267,10101,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26730,NAD27 / Alabama West,2155,projected,4497,,4267,10102,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26731,NAD27 / Alaska zone 1,2156,projected,4497,,4267,15001,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26732,NAD27 / Alaska zone 2,2158,projected,4497,,4267,15002,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26733,NAD27 / Alaska zone 3,2159,projected,4497,,4267,15003,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26734,NAD27 / Alaska zone 4,2160,projected,4497,,4267,15004,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26735,NAD27 / Alaska zone 5,2161,projected,4497,,4267,15005,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26736,NAD27 / Alaska zone 6,2162,projected,4497,,4267,15006,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26737,NAD27 / Alaska zone 7,2163,projected,4497,,4267,15007,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26738,NAD27 / Alaska zone 8,2164,projected,4497,,4267,15008,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26739,NAD27 / Alaska zone 9,2165,projected,4497,,4267,15009,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26740,NAD27 / Alaska zone 10,2157,projected,4497,,4267,15010,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26741,NAD27 / California zone I,2175,projected,4497,,4267,10401,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26742,NAD27 / California zone II,2176,projected,4497,,4267,10402,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26743,NAD27 / California zone III,2177,projected,4497,,4267,10403,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26744,NAD27 / California zone IV,2178,projected,4497,,4267,10404,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26745,NAD27 / California zone V,2179,projected,4497,,4267,10405,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26746,NAD27 / California zone VI,2180,projected,4497,,4267,10406,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26747,NAD27 / California zone VII,2181,projected,4497,,4267,10407,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26748,NAD27 / Arizona East,2167,projected,4497,,4267,10201,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,95.25  2000.091,1,0
-26749,NAD27 / Arizona Central,2166,projected,4497,,4267,10202,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-08-22 00:00:00,95.25,1,0
-26750,NAD27 / Arizona West,2168,projected,4497,,4267,10203,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,95.25  2000.091,1,0
-26751,NAD27 / Arkansas North,2169,projected,4497,,4267,10301,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26752,NAD27 / Arkansas South,2170,projected,4497,,4267,10302,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26753,NAD27 / Colorado North,2184,projected,4497,,4267,10501,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26754,NAD27 / Colorado Central,2183,projected,4497,,4267,10502,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26755,NAD27 / Colorado South,2185,projected,4497,,4267,10503,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26756,NAD27 / Connecticut,1377,projected,4497,,4267,10600,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,2000.091,1,0
-26757,NAD27 / Delaware,1378,projected,4497,,4267,10700,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,2000.091,1,0
-26758,NAD27 / Florida East,2186,projected,4497,,4267,10901,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,2000.091,1,0
-26759,NAD27 / Florida West,2188,projected,4497,,4267,10902,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,2000.091,1,0
-26760,NAD27 / Florida North,2187,projected,4497,,4267,10903,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26766,NAD27 / Georgia East,2189,projected,4497,,4267,11001,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,2000.091,1,0
-26767,NAD27 / Georgia West,2190,projected,4497,,4267,11002,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,2000.091,1,0
-26768,NAD27 / Idaho East,2192,projected,4497,,4267,11101,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,2000.091,1,0
-26769,NAD27 / Idaho Central,2191,projected,4497,,4267,11102,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,2000.091,1,0
-26770,NAD27 / Idaho West,2193,projected,4497,,4267,11103,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,2000.091,1,0
-26771,NAD27 / Illinois East,2194,projected,4497,,4267,11201,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,2000.091,1,0
-26772,NAD27 / Illinois West,2195,projected,4497,,4267,11202,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,2000.091,1,0
-26773,NAD27 / Indiana East,2196,projected,4497,,4267,11301,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,2000.091,1,0
-26774,NAD27 / Indiana West,2197,projected,4497,,4267,11302,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,2000.091,1,0
-26775,NAD27 / Iowa North,2198,projected,4497,,4267,11401,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26776,NAD27 / Iowa South,2199,projected,4497,,4267,11402,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26777,NAD27 / Kansas North,2200,projected,4497,,4267,11501,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26778,NAD27 / Kansas South,2201,projected,4497,,4267,11502,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26779,NAD27 / Kentucky North,2202,projected,4497,,4267,11601,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26780,NAD27 / Kentucky South,2203,projected,4497,,4267,11602,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26781,NAD27 / Louisiana North,2204,projected,4497,,4267,11701,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26782,NAD27 / Louisiana South,2205,projected,4497,,4267,11702,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26783,NAD27 / Maine East,2206,projected,4497,,4267,11801,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,2000.091,1,0
-26784,NAD27 / Maine West,2207,projected,4497,,4267,11802,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,2000.091,1,0
-26785,NAD27 / Maryland,1389,projected,4497,,4267,11900,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,2000.091,1,0
-26786,NAD27 / Massachusetts Mainland,2209,projected,4497,,4267,12001,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26787,NAD27 / Massachusetts Island,2208,projected,4497,,4267,12002,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26791,NAD27 / Minnesota North,2214,projected,4497,,4267,12201,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26792,NAD27 / Minnesota Central,2213,projected,4497,,4267,12202,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26793,NAD27 / Minnesota South,2215,projected,4497,,4267,12203,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26794,NAD27 / Mississippi East,2216,projected,4497,,4267,12301,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26795,NAD27 / Mississippi West,2217,projected,4497,,4267,12302,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26796,NAD27 / Missouri East,2219,projected,4497,,4267,12401,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,2000.091,1,0
-26797,NAD27 / Missouri Central,2218,projected,4497,,4267,12402,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26798,NAD27 / Missouri West,2220,projected,4497,,4267,12403,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26801,NAD Michigan / Michigan East,1720,projected,4497,,4268,12101,,,Large and medium scale topographic mapping and engineering survey.,Superseded by 26811 26812 and 26813.,,EPSG,1998-11-11 00:00:00,95.25  97.19  98.22  2000.091,1,0
-26802,NAD Michigan / Michigan Old Central,1721,projected,4497,,4268,12102,,,Large and medium scale topographic mapping and engineering survey.,Superseded by 26811 26812 and 26813.,,EPSG,1998-11-11 00:00:00,95.25  97.19  98.22,1,0
-26803,NAD Michigan / Michigan West,1722,projected,4497,,4268,12103,,,Large and medium scale topographic mapping and engineering survey.,Superseded by 26811 26812 and 26813.,,EPSG,1998-11-11 00:00:00,95.25  97.19  98.22  2000.091,1,0
-26811,NAD Michigan / Michigan North,1723,projected,4497,,4268,12111,,,Large and medium scale topographic mapping and engineering survey.,Supersedes 26801 26802 and 26803.,,EPSG,1998-11-11 00:00:00,96.28  98.22,1,0
-26812,NAD Michigan / Michigan Central,1724,projected,4497,,4268,12112,,,Large and medium scale topographic mapping and engineering survey.,Supersedes 26801 26802 and 26803.,,EPSG,1998-11-11 00:00:00,96.28  97.19  98.22,1,0
-26813,NAD Michigan / Michigan South,1725,projected,4497,,4268,12113,,,Large and medium scale topographic mapping and engineering survey.,Supersedes 26801 26802 and 26803.,,EPSG,1998-11-11 00:00:00,96.28  97.19  98.22,1,0
-26903,NAD83 / UTM zone 3N,2133,projected,4400,,4269,16003,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26904,NAD83 / UTM zone 4N,2134,projected,4400,,4269,16004,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26905,NAD83 / UTM zone 5N,2135,projected,4400,,4269,16005,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26906,NAD83 / UTM zone 6N,2136,projected,4400,,4269,16006,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26907,NAD83 / UTM zone 7N,2137,projected,4400,,4269,16007,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26908,NAD83 / UTM zone 8N,2138,projected,4400,,4269,16008,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26909,NAD83 / UTM zone 9N,2139,projected,4400,,4269,16009,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26910,NAD83 / UTM zone 10N,2140,projected,4400,,4269,16010,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26911,NAD83 / UTM zone 11N,2141,projected,4400,,4269,16011,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26912,NAD83 / UTM zone 12N,2142,projected,4400,,4269,16012,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26913,NAD83 / UTM zone 13N,2143,projected,4400,,4269,16013,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26914,NAD83 / UTM zone 14N,2144,projected,4400,,4269,16014,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26915,NAD83 / UTM zone 15N,2145,projected,4400,,4269,16015,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26916,NAD83 / UTM zone 16N,2146,projected,4400,,4269,16016,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26917,NAD83 / UTM zone 17N,2147,projected,4400,,4269,16017,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26918,NAD83 / UTM zone 18N,2148,projected,4400,,4269,16018,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26919,NAD83 / UTM zone 19N,2149,projected,4400,,4269,16019,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26920,NAD83 / UTM zone 20N,2150,projected,4400,,4269,16020,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26921,NAD83 / UTM zone 21N,2151,projected,4400,,4269,16021,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26922,NAD83 / UTM zone 22N,2152,projected,4400,,4269,16022,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26923,NAD83 / UTM zone 23N,2153,projected,4400,,4269,16023,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26929,NAD83 / Alabama East,2154,projected,4499,,4269,10131,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-26930,NAD83 / Alabama West,2155,projected,4499,,4269,10132,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-26931,NAD83 / Alaska zone 1,2156,projected,4499,,4269,15031,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26932,NAD83 / Alaska zone 2,2158,projected,4499,,4269,15032,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26933,NAD83 / Alaska zone 3,2159,projected,4499,,4269,15033,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26934,NAD83 / Alaska zone 4,2160,projected,4499,,4269,15034,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26935,NAD83 / Alaska zone 5,2161,projected,4499,,4269,15035,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26936,NAD83 / Alaska zone 6,2162,projected,4499,,4269,15036,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26937,NAD83 / Alaska zone 7,2163,projected,4499,,4269,15037,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26938,NAD83 / Alaska zone 8,2164,projected,4499,,4269,15038,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26939,NAD83 / Alaska zone 9,2165,projected,4499,,4269,15039,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26940,NAD83 / Alaska zone 10,2157,projected,4499,,4269,15040,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-26941,NAD83 / California zone 1,2175,projected,4499,,4269,10431,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2225 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-26942,NAD83 / California zone 2,2176,projected,4499,,4269,10432,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2226 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-26943,NAD83 / California zone 3,2177,projected,4499,,4269,10433,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2227 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-26944,NAD83 / California zone 4,2178,projected,4499,,4269,10434,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2228 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-26945,NAD83 / California zone 5,2182,projected,4499,,4269,10435,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2229 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-26946,NAD83 / California zone 6,2180,projected,4499,,4269,10436,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2230 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-26948,NAD83 / Arizona East,2167,projected,4499,,4269,10231,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in International feet (note: not US survey feet).  See code 2222 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,2000-03-07 00:00:00,2000.091,1,0
-26949,NAD83 / Arizona Central,2166,projected,4499,,4269,10232,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in International feet (note: not US survey feet).  See code 2223 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-26950,NAD83 / Arizona West,2168,projected,4499,,4269,10233,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in International feet (note: not US survey feet).  See code 2224 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-26951,NAD83 / Arkansas North,2169,projected,4499,,4269,10331,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-26952,NAD83 / Arkansas South,2170,projected,4499,,4269,10332,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-26953,NAD83 / Colorado North,2184,projected,4499,,4269,10531,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2231 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-26954,NAD83 / Colorado Central,2183,projected,4499,,4269,10532,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2232 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-26955,NAD83 / Colorado South,2185,projected,4499,,4269,10533,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2233 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-26956,NAD83 / Connecticut,1377,projected,4499,,4269,10630,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2234 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,2000-03-07 00:00:00,2000.091,1,0
-26957,NAD83 / Delaware,1378,projected,4499,,4269,10730,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2235 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,2000-03-07 00:00:00,2000.091,1,0
-26958,NAD83 / Florida East,2186,projected,4499,,4269,10931,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2236 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,2000-03-07 00:00:00,2000.091,1,0
-26959,NAD83 / Florida West,2188,projected,4499,,4269,10932,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2237 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,2000-03-07 00:00:00,2000.091,1,0
-26960,NAD83 / Florida North,2187,projected,4499,,4269,10933,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2238 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-26961,NAD83 / Hawaii zone 1,1546,projected,4499,,4269,15131,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,2000-03-07 00:00:00,2000.091,1,0
-26962,NAD83 / Hawaii zone 2,1547,projected,4499,,4269,15132,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,2000-03-07 00:00:00,2000.091,1,0
-26963,NAD83 / Hawaii zone 3,1548,projected,4499,,4269,15133,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,2000-03-07 00:00:00,2000.091,1,0
-26964,NAD83 / Hawaii zone 4,1549,projected,4499,,4269,15134,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,2000-03-07 00:00:00,2000.091,1,0
-26965,NAD83 / Hawaii zone 5,1550,projected,4499,,4269,15135,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,2000-03-07 00:00:00,2000.091,1,0
-26966,NAD83 / Georgia East,2189,projected,4499,,4269,11031,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2239 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,2000-03-07 00:00:00,2000.091,1,0
-26967,NAD83 / Georgia West,2190,projected,4499,,4269,11032,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2240 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-26968,NAD83 / Idaho East,2192,projected,4499,,4269,11131,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2241 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,2000-03-07 00:00:00,2000.091,1,0
-26969,NAD83 / Idaho Central,2191,projected,4499,,4269,11132,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2242 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,2000-03-07 00:00:00,2000.091,1,0
-26970,NAD83 / Idaho West,2193,projected,4499,,4269,11133,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2243 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,2000-03-07 00:00:00,2000.091,1,0
-26971,NAD83 / Illinois East,2194,projected,4499,,4269,11231,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,2000-03-07 00:00:00,2000.091,1,0
-26972,NAD83 / Illinois West,2195,projected,4499,,4269,11232,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,2000-03-07 00:00:00,2000.091,1,0
-26973,NAD83 / Indiana East,2196,projected,4499,,4269,11331,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2244 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,2000-03-07 00:00:00,2000.091,1,0
-26974,NAD83 / Indiana West,2197,projected,4499,,4269,11332,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2245 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,2000-03-07 00:00:00,2000.091,1,0
-26975,NAD83 / Iowa North,2198,projected,4499,,4269,11431,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-26976,NAD83 / Iowa South,2199,projected,4499,,4269,11432,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-26977,NAD83 / Kansas North,2200,projected,4499,,4269,11531,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-26978,NAD83 / Kansas South,2201,projected,4499,,4269,11532,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-26979,NAD83 / Kentucky North,2202,projected,4499,,4269,11631,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,2000.091,1,1
-26980,NAD83 / Kentucky South,2203,projected,4499,,4269,11632,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2247 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-26981,NAD83 / Louisiana North,2204,projected,4499,,4269,11731,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-26982,NAD83 / Louisiana South,2529,projected,4499,,4269,11732,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-26983,NAD83 / Maine East,2206,projected,4499,,4269,11831,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,2000-03-07 00:00:00,2000.091,1,0
-26984,NAD83 / Maine West,2207,projected,4499,,4269,11832,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,2000-03-07 00:00:00,2000.091,1,0
-26985,NAD83 / Maryland,1389,projected,4499,,4269,11930,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2248 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,2000-03-07 00:00:00,2000.091,1,0
-26986,NAD83 / Massachusetts Mainland,2209,projected,4499,,4269,12031,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2249 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-26987,NAD83 / Massachusetts Island,2208,projected,4499,,4269,12032,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2250 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-26988,NAD83 / Michigan North,1723,projected,4499,,4269,12141,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in International feet (note: not US survey feet).  See code 2251 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-26989,NAD83 / Michigan Central,1724,projected,4499,,4269,12142,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in International feet (note: not US survey feet).  See code 2252 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-26990,NAD83 / Michigan South,1725,projected,4499,,4269,12143,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in International feet (note: not US survey feet).  See code 2253 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-26991,NAD83 / Minnesota North,2214,projected,4499,,4269,12231,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-26992,NAD83 / Minnesota Central,2213,projected,4499,,4269,12232,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-26993,NAD83 / Minnesota South,2215,projected,4499,,4269,12233,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-26994,NAD83 / Mississippi East,2216,projected,4499,,4269,12331,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2254 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-26995,NAD83 / Mississippi West,2217,projected,4499,,4269,12332,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2255 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-26996,NAD83 / Missouri East,2219,projected,4499,,4269,12431,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,2000-03-07 00:00:00,2000.091,1,0
-26997,NAD83 / Missouri Central,2218,projected,4499,,4269,12432,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-26998,NAD83 / Missouri West,2220,projected,4499,,4269,12433,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,2000-03-07 00:00:00,2000.091,1,0
-27038,Nahrwan 1967 / UTM zone 38N,1739,projected,4400,,4270,16038,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1996-04-12 00:00:00,,1,0
-27039,Nahrwan 1967 / UTM zone 39N,1749,projected,4400,,4270,16039,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1996-04-12 00:00:00,96.12,1,0
-27040,Nahrwan 1967 / UTM zone 40N,1750,projected,4400,,4270,16040,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-27120,Naparima 1972 / UTM zone 20N,1322,projected,4400,,4271,16020,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,2000.351,1,0
-27200,NZGD49 / New Zealand Map Grid,1175,projected,4400,,4272,19917,,,Large and medium scale topographic mapping and engineering survey.,Supersedes 27291 (NZGD49 / North Island Grid) and 27292 (NZGD49 / South Island Grid) from 1972.,,EPSG,2000-10-19 00:00:00,2000.702,1,0
-27205,NZGD49 / Mount Eden Circuit,1501,projected,4500,,4272,17901,,,Cadastral survey.,Superseded Imperial measure version in 1972.  Superseded by NZGD2000 / Mount Eden Circuit 2000 (code 2105) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-27206,NZGD49 / Bay of Plenty Circuit,1500,projected,4500,,4272,17902,,,Cadastral survey.,Superseded Imperial measure version in 1972.  Superseded by NZGD2000 / Bay of Plenty Circuit 2000 (code 2106) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-27207,NZGD49 / Poverty Bay Circuit,1500,projected,4500,,4272,17903,,,Cadastral survey.,Superseded Imperial measure version in 1972.  Superseded by NZGD2000 / Poverty Bay Circuit 2000 (code 2107) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-27208,NZGD49 / Hawkes Bay Circuit,1500,projected,4500,,4272,17904,,,Cadastral survey.,Superseded Hawkes Bay 1931 datum with Imperial measure version of projection in 1972.  Superseded by NZGD2000 / Hawkes Bay Circuit 2000 (code 2108) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-27209,NZGD49 / Taranaki Circuit,1500,projected,4500,,4272,17905,,,Cadastral survey.,Superseded Imperial measure version in 1972.  Superseded by NZGD2000 / Taranaki Circuit 2000 (code 2109) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-27210,NZGD49 / Tuhirangi Circuit,1500,projected,4500,,4272,17906,,,Cadastral survey.,Superseded Imperial measure version in 1972.  Superseded by NZGD2000 / Tuhirangi Circuit 2000 (code 2110) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-27211,NZGD49 / Wanganui Circuit,1500,projected,4500,,4272,17907,,,Cadastral survey.,Superseded Imperial measure version in 1972.  Superseded by NZGD2000 / Wanganui Circuit 2000 (code 2111) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-27212,NZGD49 / Wairarapa Circuit,1500,projected,4500,,4272,17908,,,Cadastral survey.,Superseded Imperial measure version in 1972.  Superseded by NZGD2000 / Wairarapa Circuit 2000 (code 2112) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-27213,NZGD49 / Wellington Circuit,1500,projected,4500,,4272,17909,,,Cadastral survey.,Superseded Imperial measure version in 1972.  Superseded by NZGD2000 / Wellington Circuit 2000 (code 2113) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-27214,NZGD49 / Collingwood Circuit,1501,projected,4500,,4272,17910,,,Cadastral survey.,Superseded Imperial measure version in 1972.  Superseded by NZGD2000 / Collingwood Circuit 2000 (code 2114) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-27215,NZGD49 / Nelson Circuit,1501,projected,4500,,4272,17911,,,Cadastral survey.,Superseded Imperial measure version in 1972.  Superseded by NZGD2000 / Nelson Circuit 2000 (code 2115) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-27216,NZGD49 / Karamea Circuit,1501,projected,4500,,4272,17912,,,Cadastral survey.,Superseded Imperial measure version in 1972.  Superseded by NZGD2000 / Karamea Circuit 2000 (code 2116) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-27217,NZGD49 / Buller Circuit,1501,projected,4500,,4272,17913,,,Cadastral survey.,Superseded Imperial measure version in 1972.  Superseded by NZGD2000 / Buller Circuit 2000 (code 2117) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-27218,NZGD49 / Grey Circuit,1501,projected,4500,,4272,17914,,,Cadastral survey.,Superseded Imperial measure version in 1972.  Superseded by NZGD2000 / Grey Circuit 2000 (code 2118) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-27219,NZGD49 / Amuri Circuit,1501,projected,4500,,4272,17915,,,Cadastral survey.,Superseded Imperial measure version in 1972.  Superseded by NZGD2000 / Amuri Circuit 2000 (code 2119) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-27220,NZGD49 / Marlborough Circuit,1501,projected,4500,,4272,17916,,,Cadastral survey.,Superseded Imperial measure version in 1972.  Superseded by NZGD2000 / Marlborough Circuit 2000 (code 2120) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-27221,NZGD49 / Hokitika Circuit,1501,projected,4500,,4272,17917,,,Cadastral survey.,Superseded Imperial measure version in 1972.  Superseded by NZGD2000 / Hokitika Circuit 2000 (code 2121) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-27222,NZGD49 / Okarito Circuit,1501,projected,4500,,4272,17918,,,Cadastral survey.,Superseded Imperial measure version in 1972.  Superseded by NZGD2000 / Okarito Circuit 2000 (code 2122) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-27223,NZGD49 / Jacksons Bay Circuit,1501,projected,4500,,4272,17919,,,Cadastral survey.,Superseded Imperial measure version in 1972.  Superseded by NZGD2000 / Jacksons Bay Circuit 2000 (code 2123) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-27224,NZGD49 / Mount Pleasant Circuit,1501,projected,4500,,4272,17920,,,Cadastral survey.,Superseded Imperial measure version in 1972.  Superseded by NZGD2000 / Mount Pleasant Circuit 2000 (code 2124) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-27225,NZGD49 / Gawler Circuit,1501,projected,4500,,4272,17921,,,Cadastral survey.,Superseded Imperial measure version in 1972.  Superseded by NZGD2000 / Gawler Circuit 2000 (code 2125) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-27226,NZGD49 / Timaru Circuit,1501,projected,4500,,4272,17922,,,Cadastral survey.,Superseded Imperial measure version in 1972.  Superseded by NZGD2000 / Timaru Circuit 2000 (code 2126) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-27227,NZGD49 / Lindis Peak Circuit,1501,projected,4500,,4272,17923,,,Cadastral survey.,Superseded Imperial measure version in 1972.  Superseded by NZGD2000 / Lindis Peak Circuit 2000 (code 2127) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-27228,NZGD49 / Mount Nicholas Circuit,1501,projected,4500,,4272,17924,,,Cadastral survey.,Superseded Imperial measure version in 1972.  Superseded by NZGD2000 / Mount Nicholas Circuit 2000 (code 2128) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-27229,NZGD49 / Mount York Circuit,1501,projected,4500,,4272,17925,,,Cadastral survey.,Superseded Imperial measure version in 1972.  Superseded by NZGD2000 / Mount York Circuit 2000 (code 2129) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-27230,NZGD49 / Observation Point Circuit,1501,projected,4500,,4272,17926,,,Cadastral survey.,Superseded Imperial measure version in 1972.  Superseded by NZGD2000 / Observation Point Circuit 2000 (code 2130) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-27231,NZGD49 / North Taieri Circuit,1501,projected,4500,,4272,17927,,,Cadastral survey.,Superseded Imperial measure version in 1972.  Superseded by NZGD2000 / North Taieri Circuit 2000 (code 2131) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-27232,NZGD49 / Bluff Circuit,1501,projected,4500,,4272,17928,,,Cadastral survey.,Superseded Imperial measure version in 1972.  Superseded by NZGD2000 / Bluff Circuit 2000 (code 2132) from March 2000.,Land Information New Zealand OSG Technical Report 8; 16 April 1999.,EPSG,2000-10-19 00:00:00,,1,0
-27258,NZGD49 / UTM zone 58S,1502,projected,4400,,4272,16158,,,Oil exploration.,Superseded by NZGD2000 / UTM zone 58S (code 2133) from March 2000.,,EPSG,2000-10-19 00:00:00,,1,0
-27259,NZGD49 / UTM zone 59S,1503,projected,4400,,4272,16159,,,Oil exploration.,Superseded by NZGD2000 / UTM zone 59S (code 2134) from March 2000.,,EPSG,2000-10-19 00:00:00,,1,0
-27260,NZGD49 / UTM zone 60S,1504,projected,4400,,4272,16160,,,Oil exploration.,Superseded by NZGD2000 / UTM zone 60S (code 2135) from March 2000.,,EPSG,2000-10-19 00:00:00,,1,0
-27291,NZGD49 / North Island Grid,1500,projected,4409,,4272,18141,,,Large and medium scale topographic mapping and engineering survey.,Sears 1922 British foot-metre conversion factor applied to ellipsoid.  Superseded by 27200 (GD49 / New Zealand Map Grid) in 1972.,,EPSG,2000-10-19 00:00:00,97.231 2000.702,1,0
-27292,NZGD49 / South Island Grid,1501,projected,4409,,4272,18142,,,Large and medium scale topographic mapping and engineering survey.,Sears 1922 British foot-metre conversion factor applied to ellipsoid.  Superseded by 27200 (GD49 / New Zealand Map Grid) in 1972.,,EPSG,2000-10-19 00:00:00,97.231 2000.702,1,0
-27391,NGO 1948 (Oslo) / NGO zone I,1741,projected,4531,,4817,18221,,,Large (>1:50000) scale mapping and cadastral work.,To be phased out and replaced by ETRF89 / UTM zone 32N.,,EPSG,1999-10-20 00:00:00,,1,0
-27392,NGO 1948 (Oslo) / NGO zone II,1742,projected,4531,,4817,18222,,,Large (>1:50000) scale mapping and cadastral work.,To be phased out and replaced by ETRF89 / UTM zone 32N.,,EPSG,1999-10-20 00:00:00,,1,0
-27393,NGO 1948 (Oslo) / NGO zone III,1743,projected,4531,,4817,18223,,,Large (>1:50000) scale mapping and cadastral work.,To be phased out and replaced by ETRF89 / UTM zone 32N.,,EPSG,1999-10-20 00:00:00,,1,0
-27394,NGO 1948 (Oslo) / NGO zone IV,1744,projected,4531,,4817,18224,,,Large (>1:50000) scale mapping and cadastral work.,To be phased out and replaced by ETRF89 / UTM zone 32N and ETRF89 / UTM zone 33N.,,EPSG,1999-10-20 00:00:00,,1,0
-27395,NGO 1948 (Oslo) / NGO zone V,1745,projected,4531,,4817,18225,,,Large (>1:50000) scale mapping and cadastral work.,To be phased out and replaced by ETRF89 / UTM zone 33N and ETRF89 / UTM zone 34N.,,EPSG,1999-10-20 00:00:00,,1,0
-27396,NGO 1948 (Oslo) / NGO zone VI,1746,projected,4531,,4817,18226,,,Large (>1:50000) scale mapping and cadastral work.,To be phased out and replaced by ETRF89 / UTM zone 34N.,,EPSG,1999-10-20 00:00:00,,1,0
-27397,NGO 1948 (Oslo) / NGO zone VII,1747,projected,4531,,4817,18227,,,Large (>1:50000) scale mapping and cadastral work.,To be phased out and replaced by ETRF89 / UTM zone 34N and ETRF89 / UTM zone 35N.,,EPSG,1999-10-20 00:00:00,,1,0
-27398,NGO 1948 (Oslo) / NGO zone VIII,1748,projected,4531,,4817,18228,,,Large (>1:50000) scale mapping and cadastral work.,To be phased out and replaced by ETRF89 / UTM zone 35N.,,EPSG,1999-10-20 00:00:00,,1,0
-27429,Datum 73 / UTM zone 29N,1294,projected,4400,,4274,16029,,,Large and medium scale topographic mapping and engineering survey.,,Instituto Geografico e Cadastral; Lisbon,EPSG,1995-06-02 00:00:00,,1,0
-27492,Datum 73 / Modified Portuguese Grid,1294,projected,4530,,4274,19974,,,Large and medium scale topographic mapping and engineering survey.,,Instituto Geografico e Cadastral Lisbon via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-27500,ATF (Paris) / Nord de Guerre,1369,projected,4499,,4901,19903,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-27561,NTF (Paris) / Lambert Nord France,1731,projected,4499,,4807,18091,,,Large and medium scale topographic mapping and engineering survey.,Superseded by NTF (Paris) / France zone I (code 27571) from 1972.,,EPSG,2001-11-06 00:00:00,,1,0
-27562,NTF (Paris) / Lambert Centre France,1732,projected,4499,,4807,18092,,,Large and medium scale topographic mapping and engineering survey.,Superseded by NTF (Paris) / France zone II (code 27572) from 1972.,,EPSG,2001-11-06 00:00:00,,1,0
-27563,NTF (Paris) / Lambert Sud France,1733,projected,4499,,4807,18093,,,Large and medium scale topographic mapping and engineering survey.,Superseded by NTF (Paris) / France zone III (code 27573) from 1972.,,EPSG,2001-11-06 00:00:00,,1,0
-27564,NTF (Paris) / Lambert Corse,1327,projected,4499,,4807,18094,,,Large and medium scale topographic mapping and engineering survey.,Superseded by NTF (Paris) / France zone IV (code 27574) from 1972.,,EPSG,2001-11-06 00:00:00,,1,0
-27571,NTF (Paris) / Lambert zone I,1731,projected,4499,,4807,18081,,,Large and medium scale topographic mapping and engineering survey.,Introduced 1972. Supersedes NTF (Paris) / Lambert Nord France (code 27561).,,EPSG,2001-11-06 00:00:00,,1,0
-27572,NTF (Paris) / Lambert zone II,1734,projected,4499,,4807,18082,,,Large and medium scale topographic mapping and engineering survey.,Introduced 1972. Supersedes NTF (Paris) / Lambert Centre France (code 27562).,,EPSG,2001-11-06 00:00:00,,1,0
-27573,NTF (Paris) / Lambert zone III,1733,projected,4499,,4807,18083,,,Large and medium scale topographic mapping and engineering survey.,Introduced 1972. Supersedes NTF (Paris) / Lambert Sud France (code 27563).,,EPSG,2001-11-06 00:00:00,,1,0
-27574,NTF (Paris) / Lambert zone IV,1327,projected,4499,,4807,18084,,,Large and medium scale topographic mapping and engineering survey.,Introduced 1972. Supersedes NTF (Paris) / Lambert Corse (code 27564).,,EPSG,2001-11-06 00:00:00,,1,0
-27581,NTF (Paris) / France I,1731,projected,4499,,4807,18081,,,Large and medium scale topographic mapping and engineering survey.,Introduced 1972. Supersedes NTF / Nord France (code 27591).,,EPSG,1996-04-12 00:00:00,95.26,1,1
-27582,NTF (Paris) / France II,1734,projected,4499,,4807,18082,,,Large and medium scale topographic mapping and engineering survey.,Introduced 1972. Supersedes NTF / Centre France (code 27592).,,EPSG,1996-04-12 00:00:00,95.26,1,1
-27583,NTF (Paris) / France III,1733,projected,4499,,4807,18083,,,Large and medium scale topographic mapping and engineering survey.,Introduced 1972. Supersedes NTF / Sud France (code 27593).,,EPSG,1996-04-12 00:00:00,95.26,1,1
-27584,NTF (Paris) / France IV,1327,projected,4499,,4807,18084,,,Large and medium scale topographic mapping and engineering survey.,Introduced 1972. Supersedes NTF / Corse (code 27594).,,EPSG,1996-04-12 00:00:00,,1,1
-27591,NTF (Paris) / Nord France,1731,projected,4499,,4807,18091,,,Large and medium scale topographic mapping and engineering survey.,Superseded by NTF / France I (code 27581) from 1972.,,EPSG,1996-04-12 00:00:00,95.26,1,1
-27592,NTF (Paris) / Centre France,1732,projected,4499,,4807,18092,,,Large and medium scale topographic mapping and engineering survey.,Superseded by NTF / France II (code 27582) from 1972.,,EPSG,1996-04-12 00:00:00,95.26,1,1
-27593,NTF (Paris) / Sud France,1733,projected,4499,,4807,18093,,,Large and medium scale topographic mapping and engineering survey.,Superseded by NTF / France III (code 27583) from 1972.,,EPSG,1996-04-12 00:00:00,95.26,1,1
-27594,NTF (Paris) / Corse,1327,projected,4499,,4807,18094,,,Large and medium scale topographic mapping and engineering survey.,Superseded by NTF / France IV (code 27584) from 1972.,,EPSG,1996-04-12 00:00:00,,1,1
-27700,OSGB 1936 / British National Grid,1264,projected,4400,,4277,19916,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-28191,Palestine 1923 / Palestine Grid,1356,projected,4400,,4281,18201,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1999-04-22 00:00:00,,1,0
-28192,Palestine 1923 / Palestine Belt,1356,projected,4400,,4281,18202,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1999-04-22 00:00:00,,1,0
-28193,Palestine 1923 / Israeli CS Grid,2603,projected,4400,,4281,18203,,,Large and medium scale topographic mapping and engineering survey.,Superseded by Israeli TM Grid (EPSG code 2039).,Survey of Israel.,EPSG,2002-06-22 00:00:00,2002.34,1,0
-28232,Pointe Noire / UTM zone 32S,1072,projected,4400,,4282,16132,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,2002.05,1,0
-28348,GDA94 / MGA zone 48,1556,projected,4400,,4283,17348,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-28349,GDA94 / MGA zone 49,1557,projected,4400,,4283,17349,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-28350,GDA94 / MGA zone 50,1558,projected,4400,,4283,17350,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-28351,GDA94 / MGA zone 51,1559,projected,4400,,4283,17351,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-28352,GDA94 / MGA zone 52,1560,projected,4400,,4283,17352,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-28353,GDA94 / MGA zone 53,1561,projected,4400,,4283,17353,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-28354,GDA94 / MGA zone 54,1562,projected,4400,,4283,17354,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-28355,GDA94 / MGA zone 55,1563,projected,4400,,4283,17355,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-28356,GDA94 / MGA zone 56,1564,projected,4400,,4283,17356,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-28357,GDA94 / MGA zone 57,1565,projected,4400,,4283,17357,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-28358,GDA94 / MGA zone 58,1566,projected,4400,,4283,17358,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-28402,Pulkovo 1942 / Gauss-Kruger zone 2,1805,projected,4530,,4284,16202,,,Military mapping.,Also found with truncated fase easting - see Pulkovo 1942 / Gauss-Kruger CM 9E (code 2492).,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-28403,Pulkovo 1942 / Gauss-Kruger zone 3,1792,projected,4530,,4284,16203,,,Military mapping.,Also found with truncated fase easting - see Pulkovo 1942 / Gauss-Kruger CM 15E (code 2493).,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-28404,Pulkovo 1942 / Gauss-Kruger zone 4,1793,projected,4530,,4284,16204,,,Medium scale topographic mapping.,Also found with truncated fase easting - see Pulkovo 1942 / Gauss-Kruger CM 21E (code 2494).,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-28405,Pulkovo 1942 / Gauss-Kruger zone 5,1794,projected,4530,,4284,16205,,,Medium scale topographic mapping.,Also found with truncated fase easting - see Pulkovo 1942 / Gauss-Kruger CM 27E (code 2495).,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-28406,Pulkovo 1942 / Gauss-Kruger zone 6,1795,projected,4530,,4284,16206,,,Medium scale topographic mapping.,Also found with truncated fase easting - see Pulkovo 1942 / Gauss-Kruger CM 33E (code 2496).,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-28407,Pulkovo 1942 / Gauss-Kruger zone 7,1796,projected,4530,,4284,16207,,,Medium scale topographic mapping.,Also found with truncated fase easting - see Pulkovo 1942 / Gauss-Kruger CM 39E (code 2497).,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-28408,Pulkovo 1942 / Gauss-Kruger zone 8,1797,projected,4530,,4284,16208,,,Medium scale topographic mapping.,Also found with truncated fase easting - see Pulkovo 1942 / Gauss-Kruger CM 45E (code 2498).,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-28409,Pulkovo 1942 / Gauss-Kruger zone 9,1798,projected,4530,,4284,16209,,,Medium scale topographic mapping.,Also found with truncated fase easting - see Pulkovo 1942 / Gauss-Kruger CM 51E (code 2499).,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-28410,Pulkovo 1942 / Gauss-Kruger zone 10,1799,projected,4530,,4284,16210,,,Medium scale topographic mapping.,Also found with truncated fase easting - see Pulkovo 1942 / Gauss-Kruger CM 57E (code 2500).,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-28411,Pulkovo 1942 / Gauss-Kruger zone 11,1800,projected,4530,,4284,16211,,,Medium scale topographic mapping.,Also found with truncated fase easting - see Pulkovo 1942 / Gauss-Kruger CM 63E (code 2501).,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-28412,Pulkovo 1942 / Gauss-Kruger zone 12,1801,projected,4530,,4284,16212,,,Medium scale topographic mapping.,Also found with truncated fase easting - see Pulkovo 1942 / Gauss-Kruger CM 69E (code 2502).,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-28413,Pulkovo 1942 / Gauss-Kruger zone 13,1802,projected,4530,,4284,16213,,,Medium scale topographic mapping.,Also found with truncated fase easting - see Pulkovo 1942 / Gauss-Kruger CM 75E (code 2503).,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-28414,Pulkovo 1942 / Gauss-Kruger zone 14,1803,projected,4530,,4284,16214,,,Medium scale topographic mapping.,Also found with truncated fase easting - see Pulkovo 1942 / Gauss-Kruger CM 81E (code 2504).,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-28415,Pulkovo 1942 / Gauss-Kruger zone 15,1804,projected,4530,,4284,16215,,,Medium scale topographic mapping.,Also found with truncated fase easting - see Pulkovo 1942 / Gauss-Kruger CM 87E (code 2505).,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-28416,Pulkovo 1942 / Gauss-Kruger zone 16,1775,projected,4530,,4284,16216,,,Medium scale topographic mapping.,Also found with truncated fase easting - see Pulkovo 1942 / Gauss-Kruger CM 93E (code 2506).,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-28417,Pulkovo 1942 / Gauss-Kruger zone 17,1776,projected,4530,,4284,16217,,,Medium scale topographic mapping.,Also found with truncated fase easting - see Pulkovo 1942 / Gauss-Kruger CM 99E (code 2507).,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-28418,Pulkovo 1942 / Gauss-Kruger zone 18,1777,projected,4530,,4284,16218,,,Medium scale topographic mapping.,Also found with truncated fase easting - see Pulkovo 1942 / Gauss-Kruger CM 105E (code 2508).,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-28419,Pulkovo 1942 / Gauss-Kruger zone 19,1778,projected,4530,,4284,16219,,,Medium scale topographic mapping.,Also found with truncated fase easting - see Pulkovo 1942 / Gauss-Kruger CM 111E (code 2509).,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-28420,Pulkovo 1942 / Gauss-Kruger zone 20,1779,projected,4530,,4284,16220,,,Medium scale topographic mapping.,Also found with truncated fase easting - see Pulkovo 1942 / Gauss-Kruger CM 117E (code 2510).,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-28421,Pulkovo 1942 / Gauss-Kruger zone 21,1780,projected,4530,,4284,16221,,,Medium scale topographic mapping.,Also found with truncated fase easting - see Pulkovo 1942 / Gauss-Kruger CM 123E (code 2511).,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-28422,Pulkovo 1942 / Gauss-Kruger zone 22,1781,projected,4530,,4284,16222,,,Medium scale topographic mapping.,Also found with truncated fase easting - see Pulkovo 1942 / Gauss-Kruger CM 129E (code 2512).,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-28423,Pulkovo 1942 / Gauss-Kruger zone 23,1782,projected,4530,,4284,16223,,,Medium scale topographic mapping.,Also found with truncated fase easting - see Pulkovo 1942 / Gauss-Kruger CM 135E (code 2513).,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-28424,Pulkovo 1942 / Gauss-Kruger zone 24,1783,projected,4530,,4284,16224,,,Medium scale topographic mapping.,Also found with truncated fase easting - see Pulkovo 1942 / Gauss-Kruger CM 141E (code 2514).,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-28425,Pulkovo 1942 / Gauss-Kruger zone 25,1784,projected,4530,,4284,16225,,,Medium scale topographic mapping.,Also found with truncated fase easting - see Pulkovo 1942 / Gauss-Kruger CM 147E (code 2515).,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-28426,Pulkovo 1942 / Gauss-Kruger zone 26,1785,projected,4530,,4284,16226,,,Medium scale topographic mapping.,Also found with truncated fase easting - see Pulkovo 1942 / Gauss-Kruger CM 153E (code 2516).,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-28427,Pulkovo 1942 / Gauss-Kruger zone 27,1786,projected,4530,,4284,16227,,,Medium scale topographic mapping.,Also found with truncated fase easting - see Pulkovo 1942 / Gauss-Kruger CM 159E (code 2517).,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-28428,Pulkovo 1942 / Gauss-Kruger zone 28,1787,projected,4530,,4284,16228,,,Medium scale topographic mapping.,Also found with truncated fase easting - see Pulkovo 1942 / Gauss-Kruger CM 165E (code 2518).,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-28429,Pulkovo 1942 / Gauss-Kruger zone 29,1788,projected,4530,,4284,16229,,,Medium scale topographic mapping.,Also found with truncated fase easting - see Pulkovo 1942 / Gauss-Kruger CM 171E (code 2519).,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-28430,Pulkovo 1942 / Gauss-Kruger zone 30,1789,projected,4530,,4284,16230,,,Medium scale topographic mapping.,Also found with truncated fase easting - see Pulkovo 1942 / Gauss-Kruger CM 177E (code 2520).,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-28431,Pulkovo 1942 / Gauss-Kruger zone 31,1790,projected,4530,,4284,16231,,,Medium scale topographic mapping.,Also found with truncated fase easting - see Pulkovo 1942 / Gauss-Kruger CM 177W (code 2521).,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-28432,Pulkovo 1942 / Gauss-Kruger zone 32,1791,projected,4530,,4284,16232,,,Medium scale topographic mapping.,Also found with truncated fase easting - see Pulkovo 1942 / Gauss-Kruger CM 171W (code 2522).,EPSG,EPSG,2002-06-22 00:00:00,2002.36,1,0
-28462,Pulkovo 1942 / Gauss-Kruger 2N,1805,projected,4530,,4284,16302,,,Truncated form of Gauss-Kruger zone 2,,,EPSG,1998-06-30 00:00:00,,1,1
-28463,Pulkovo 1942 / Gauss-Kruger 3N,1792,projected,4530,,4284,16303,,,Military mapping.,Truncated form of Gauss-Kruger zone 3,,EPSG,1998-06-30 00:00:00,,1,1
-28464,Pulkovo 1942 / Gauss-Kruger 4N,1793,projected,4530,,4284,16304,,,Military mapping.,,,EPSG,1995-06-02 00:00:00,,1,1
-28465,Pulkovo 1942 / Gauss-Kruger 5N,1794,projected,4530,,4284,16305,,,Truncated form of Gauss-Kruger zone 5,,,EPSG,1995-06-02 00:00:00,,1,1
-28466,Pulkovo 1942 / Gauss-Kruger 6N,1795,projected,4530,,4284,16306,,,Truncated form of Gauss-Kruger zone 6,,,EPSG,1995-06-02 00:00:00,,1,1
-28467,Pulkovo 1942 / Gauss-Kruger 7N,1796,projected,4530,,4284,16307,,,Truncated form of Gauss-Kruger zone 7,,,EPSG,1995-06-02 00:00:00,,1,1
-28468,Pulkovo 1942 / Gauss-Kruger 8N,1797,projected,4530,,4284,16308,,,Truncated form of Gauss-Kruger zone 8,,,EPSG,1995-06-02 00:00:00,,1,1
-28469,Pulkovo 1942 / Gauss-Kruger 9N,1798,projected,4530,,4284,16309,,,Truncated form of Gauss-Kruger zone 9,,,EPSG,1995-06-02 00:00:00,,1,1
-28470,Pulkovo 1942 / Gauss-Kruger 10N,1799,projected,4530,,4284,16310,,,Truncated form of Gauss-Kruger zone 10,,,EPSG,1995-06-02 00:00:00,,1,1
-28471,Pulkovo 1942 / Gauss-Kruger 11N,1800,projected,4530,,4284,16311,,,Truncated form of Gauss-Kruger zone 11,,,EPSG,1995-06-02 00:00:00,,1,1
-28472,Pulkovo 1942 / Gauss-Kruger 12N,1801,projected,4530,,4284,16312,,,Truncated form of Gauss-Kruger zone 12,,,EPSG,1995-06-02 00:00:00,,1,1
-28473,Pulkovo 1942 / Gauss-Kruger 13N,1802,projected,4530,,4284,16313,,,Truncated form of Gauss-Kruger zone 13,,,EPSG,1995-06-02 00:00:00,,1,1
-28474,Pulkovo 1942 / Gauss-Kruger 14N,1803,projected,4530,,4284,16314,,,Truncated form of Gauss-Kruger zone 14,,,EPSG,1995-06-02 00:00:00,,1,1
-28475,Pulkovo 1942 / Gauss-Kruger 15N,1804,projected,4530,,4284,16315,,,Truncated form of Gauss-Kruger zone 15,,,EPSG,1995-06-02 00:00:00,,1,1
-28476,Pulkovo 1942 / Gauss-Kruger 16N,1775,projected,4530,,4284,16316,,,Truncated form of Gauss-Kruger zone 16,,,EPSG,1995-06-02 00:00:00,,1,1
-28477,Pulkovo 1942 / Gauss-Kruger 17N,1776,projected,4530,,4284,16317,,,Truncated form of Gauss-Kruger zone 17,,,EPSG,1995-06-02 00:00:00,,1,1
-28478,Pulkovo 1942 / Gauss-Kruger 18N,1777,projected,4530,,4284,16318,,,Truncated form of Gauss-Kruger zone 18,,,EPSG,1995-06-02 00:00:00,,1,1
-28479,Pulkovo 1942 / Gauss-Kruger 19N,1778,projected,4530,,4284,16319,,,Truncated form of Gauss-Kruger zone 19,,,EPSG,1995-06-02 00:00:00,,1,1
-28480,Pulkovo 1942 / Gauss-Kruger 20N,1779,projected,4530,,4284,16320,,,Truncated form of Gauss-Kruger zone 20,,,EPSG,1995-06-02 00:00:00,,1,1
-28481,Pulkovo 1942 / Gauss-Kruger 21N,1780,projected,4530,,4284,16321,,,Truncated form of Gauss-Kruger zone 21,,,EPSG,1995-06-02 00:00:00,,1,1
-28482,Pulkovo 1942 / Gauss-Kruger 22N,1781,projected,4530,,4284,16322,,,Truncated form of Gauss-Kruger zone 22,,,EPSG,1995-06-02 00:00:00,,1,1
-28483,Pulkovo 1942 / Gauss-Kruger 23N,1782,projected,4530,,4284,16323,,,Truncated form of Gauss-Kruger zone 23,,,EPSG,1995-06-02 00:00:00,,1,1
-28484,Pulkovo 1942 / Gauss-Kruger 24N,1783,projected,4530,,4284,16324,,,Truncated form of Gauss-Kruger zone 24,,,EPSG,1995-06-02 00:00:00,,1,1
-28485,Pulkovo 1942 / Gauss-Kruger 25N,1784,projected,4530,,4284,16325,,,Truncated form of Gauss-Kruger zone 25,,,EPSG,1995-06-02 00:00:00,,1,1
-28486,Pulkovo 1942 / Gauss-Kruger 26N,1785,projected,4530,,4284,16326,,,Truncated form of Gauss-Kruger zone 26,,,EPSG,1995-06-02 00:00:00,,1,1
-28487,Pulkovo 1942 / Gauss-Kruger 27N,1786,projected,4530,,4284,16327,,,Truncated form of Gauss-Kruger zone 27,,,EPSG,1995-06-02 00:00:00,,1,1
-28488,Pulkovo 1942 / Gauss-Kruger 28N,1787,projected,4530,,4284,16328,,,Truncated form of Gauss-Kruger zone 28,,,EPSG,1995-06-02 00:00:00,,1,1
-28489,Pulkovo 1942 / Gauss-Kruger 29N,1788,projected,4530,,4284,16329,,,Truncated form of Gauss-Kruger zone 29,,,EPSG,1995-06-02 00:00:00,,1,1
-28490,Pulkovo 1942 / Gauss-Kruger 30N,1789,projected,4530,,4284,16330,,,Truncated form of Gauss-Kruger zone 30,,,EPSG,1995-06-02 00:00:00,,1,1
-28491,Pulkovo 1942 / Gauss-Kruger 31N,1790,projected,4530,,4284,16331,,,Truncated form of Gauss-Kruger zone 31,,,EPSG,1995-06-02 00:00:00,,1,1
-28492,Pulkovo 1942 / Gauss-Kruger 32N,1791,projected,4530,,4284,16332,,,Truncated form of Gauss-Kruger zone 32,,,EPSG,1995-06-02 00:00:00,,1,1
-28600,Qatar 1974 / Qatar National Grid,1346,projected,4400,,4285,19919,,,Large and medium scale topographic mapping and engineering survey.,,Qatar Centre for Geographic Information.,EPSG,2000-03-07 00:00:00,2000.29,1,0
-28991,Amersfoort / RD Old,1275,projected,4499,,4289,19913,,,Large and medium scale topographic mapping and engineering survey.,Superseded by 28992 (Amersfoort / RD New).,,EPSG,2000-03-07 00:00:00,2000.37,1,0
-28992,Amersfoort / RD New,1275,projected,4499,,4289,19914,,,Large and medium scale topographic mapping and engineering survey.,Supersedes 28991 (Amersfoort / RD Old).,,EPSG,2000-03-07 00:00:00,2000.37,1,0
-29100,SAD69 / Brazil Polyconic,1053,projected,4499,,4291,19941,,,Small scale mapping.,,PetroBras,EPSG,1999-04-22 00:00:00,,1,0
-29118,SAD69 / UTM zone 18N,1807,projected,4400,,4291,16018,,,Large and medium scale topographic mapping and engineering survey.,Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.251.  Error introduced if not using the truncated precision will not exceed 5 cm.,,EPSG,1995-06-02 00:00:00,97.252,1,0
-29119,SAD69 / UTM zone 19N,1809,projected,4400,,4291,16019,,,Large and medium scale topographic mapping and engineering survey.,Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.252.  Error introduced if not using the truncated precision will not exceed 5 cm.,,EPSG,1995-06-02 00:00:00,97.252,1,0
-29120,SAD69 / UTM zone 20N,1811,projected,4400,,4291,16020,,,Large and medium scale topographic mapping and engineering survey.,Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.252.  Error introduced if not using the truncated precision will not exceed 5 cm.,,EPSG,1995-06-02 00:00:00,97.252,1,0
-29121,SAD69 / UTM zone 21N,1813,projected,4400,,4291,16021,,,Large and medium scale topographic mapping and engineering survey.,Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.252.  Error introduced if not using the truncated precision will not exceed 5 cm.,,EPSG,1995-06-02 00:00:00,97.252,1,0
-29122,SAD69 / UTM zone 22N,1815,projected,4400,,4291,16022,,,Large and medium scale topographic mapping and engineering survey.,Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.252.  Error introduced if not using the truncated precision will not exceed 5 cm.,,EPSG,1995-06-02 00:00:00,97.252,1,0
-29177,SAD69 / UTM zone 17S,1806,projected,4400,,4291,16117,,,Large and medium scale topographic mapping and engineering survey.,Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.252.  Error introduced if not using the truncated precision will not exceed 5 cm.,,EPSG,1995-06-02 00:00:00,97.252,1,0
-29178,SAD69 / UTM zone 18S,1808,projected,4400,,4291,16118,,,Large and medium scale topographic mapping and engineering survey.,Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.252.  Error introduced if not using the truncated precision will not exceed 5 cm.,,EPSG,1995-06-02 00:00:00,97.252,1,0
-29179,SAD69 / UTM zone 19S,1810,projected,4400,,4291,16119,,,Large and medium scale topographic mapping and engineering survey.,Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.252.  Error introduced if not using the truncated precision will not exceed 5 cm.,,EPSG,1995-06-02 00:00:00,97.252,1,0
-29180,SAD69 / UTM zone 20S,1812,projected,4400,,4291,16120,,,Large and medium scale topographic mapping and engineering survey.,Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.252.  Error introduced if not using the truncated precision will not exceed 5 cm.,,EPSG,1995-06-02 00:00:00,97.252,1,0
-29181,SAD69 / UTM zone 21S,1814,projected,4400,,4291,16121,,,Large and medium scale topographic mapping and engineering survey.,Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.252.  Error introduced if not using the truncated precision will not exceed 5 cm.,,EPSG,1995-06-02 00:00:00,97.252,1,0
-29182,SAD69 / UTM zone 22S,1816,projected,4400,,4291,16122,,,Large and medium scale topographic mapping and engineering survey.,Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.252.  Error introduced if not using the truncated precision will not exceed 5 cm.,,EPSG,1995-06-02 00:00:00,97.252,1,0
-29183,SAD69 / UTM zone 23S,1817,projected,4400,,4291,16123,,,Large and medium scale topographic mapping and engineering survey.,Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.252.  Error introduced if not using the truncated precision will not exceed 5 cm.,,EPSG,1995-06-02 00:00:00,97.252,1,0
-29184,SAD69 / UTM zone 24S,1818,projected,4400,,4291,16124,,,Large and medium scale topographic mapping and engineering survey.,Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.252.  Error introduced if not using the truncated precision will not exceed 5 cm.,,EPSG,1995-06-02 00:00:00,97.252,1,0
-29185,SAD69 / UTM zone 25S,1819,projected,4400,,4291,16125,,,Large and medium scale topographic mapping and engineering survey.,Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.252.  Error introduced if not using the truncated precision will not exceed 5 cm.,,EPSG,1995-06-02 00:00:00,97.252,1,0
-29220,Sapper Hill 1943 / UTM zone 20S,1820,projected,4400,,4292,16120,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-29221,Sapper Hill 1943 / UTM zone 21S,1821,projected,4400,,4292,16121,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-29333,Schwarzeck / UTM zone 33S,1822,projected,4400,,4293,16133,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1996-04-12 00:00:00,,1,0
-29371,South West African Coord. System zone 11,1838,projected,6502,,4293,17611,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",,,EPSG,2000-03-07 00:00:00,97.16  99.98,1,0
-29373,South West African Coord. System zone 13,1839,projected,6502,,4293,17613,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",,,EPSG,2000-03-07 00:00:00,97.16  99.98,1,0
-29375,South West African Coord. System zone 15,1840,projected,6502,,4293,17615,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",,,EPSG,2000-03-07 00:00:00,97.16  99.98,1,0
-29377,South West African Coord. System zone 17,1841,projected,6502,,4293,17617,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",,,EPSG,2000-03-07 00:00:00,97.16  99.98,1,0
-29379,South West African Coord. System zone 19,1842,projected,6502,,4293,17619,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",,,EPSG,2000-03-07 00:00:00,97.16  99.98,1,0
-29381,South West African Coord. System zone 21,1843,projected,6502,,4293,17621,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",,,EPSG,2000-03-07 00:00:00,97.16  99.98,1,0
-29383,South West African Coord. System zone 23,1844,projected,6502,,4293,17623,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",,,EPSG,2000-03-07 00:00:00,97.16  99.98,1,0
-29385,South West African Coord. System zone 25,1845,projected,6502,,4293,17625,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",,,EPSG,2000-03-07 00:00:00,97.16  99.98,1,0
-29635,Sudan / UTM zone 35N,1846,projected,4400,,4296,16035,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-29636,Sudan / UTM zone 36N,1847,projected,4400,,4296,16036,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-29700,Tananarive (Paris) / Laborde Grid,1149,projected,4499,,4810,19911,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-29738,Tananarive / UTM zone 38S,1848,projected,4400,,4297,16138,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-29739,Tananarive / UTM zone 39S,1849,projected,4400,,4297,16139,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-29849,Timbalai 1948 / UTM zone 49N,1852,projected,4400,,4298,16049,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-29850,Timbalai 1948 / UTM zone 50N,1853,projected,4400,,4298,16050,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-29871,Timbalai 1948 / R.S.O. Borneo (ch),1362,projected,4402,,4298,19956,,,Large and medium scale topographic mapping and engineering survey.,Adopts metric conversion of 39.370147 inches per metre. Being superseded by metric version (code 29873).,,EPSG,2002-07-13 00:00:00,97.231  2000.60  2002.47,1,0
-29872,Timbalai 1948 / R.S.O. Borneo (ft),1851,projected,4405,,4298,19957,,,Large and medium scale topographic mapping and engineering survey.,Original projection definition in chains.  1 chain = 66 feet.  Adopts Sears 1922 metric conversion of 39.370147 inches per metre.  Being superseded by metric version (code 29873).,,EPSG,2002-07-13 00:00:00,97.231  2000.60  2002.47,1,0
-29873,Timbalai 1948 / R.S.O. Borneo (m),1362,projected,4400,,4298,19958,,,Large and medium scale topographic mapping and engineering survey.,Original projection definition in chains.  1 chain = 66 feet=792 inches.  Adopts Sears 1922 metric conversion of 39.370147 inches per metre.,,EPSG,2000-10-19 00:00:00,2000.60,1,0
-29900,TM65 / Irish National Grid,1305,projected,4400,,4299,19908,,,Large and medium scale topographic mapping and engineering survey.,Superseded by IRENET95 / Irish Transverse Mercator (code 2157) from 1/1/2001.  Deprecated due to change of name - see 29902.,Ordnance Survey of Ireland,EPSG,1995-06-02 00:00:00,,1,1
-29901,OSNI 1952 / Irish National Grid,2530,projected,4400,,4188,19973,,,Large and medium scale topographic mapping and engineering survey.,Not used in Republic of Ireland.  Superseded in 1975 by TM75 / Irish Grid (code 29903).,Ordnance Survey of Northern Ireland.,EPSG,2001-11-06 00:00:00,,1,0
-29902,TM65 / Irish Grid,1125,projected,4400,,4299,19972,,,Large and medium scale topographic mapping and engineering survey.,Not used in Northern Ireland.  Superseded by TM75 / Irish Grid (code 29903) in 1975.,Ordnance Survey of Ireland.,EPSG,2001-11-06 00:00:00,,1,0
-29903,TM75 / Irish Grid,1305,projected,4400,,4300,19972,,,Large and medium scale topographic mapping and engineering survey.,Supersedes both OSNI 1952 / Irish National Grid (code 29901) and TM65 / Irish Grid (code 29902) from 1975.  Superseded by IRENET95 / Irish Transverse Mercator (code 2157) from 1/1/2001.,Ordnance Survey of Ireland,EPSG,2001-11-06 00:00:00,,1,0
-30161,Tokyo / Japan Plane Rectangular CS I,1854,projected,4530,,4301,17801,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Superseded by JGD2000 / Japan Plane Rectangular CS I (code 2443) from April 2002.,Geographic Survey Institute; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/tokyodatum.html,EPSG,2002-06-22 00:00:00,99.97 2002.08,1,0
-30162,Tokyo / Japan Plane Rectangular CS II,1855,projected,4530,,4301,17802,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Superseded by JGD2000 / Japan Plane Rectangular CS II (code 2444) from April 2002.,Geographic Survey Institute; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/tokyodatum.html,EPSG,2002-06-22 00:00:00,99.97 2002.08,1,0
-30163,Tokyo / Japan Plane Rectangular CS III,1856,projected,4530,,4301,17803,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Superseded by JGD2000 / Japan Plane Rectangular CS III (code 2445) from April 2002.,Geographic Survey Institute; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/tokyodatum.html,EPSG,2002-06-22 00:00:00,99.97 2002.08,1,0
-30164,Tokyo / Japan Plane Rectangular CS IV,1857,projected,4530,,4301,17804,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Superseded by JGD2000 / Japan Plane Rectangular CS IV (code 2446) from April 2002.,Geographic Survey Institute; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/tokyodatum.html,EPSG,2002-06-22 00:00:00,99.97 2002.08,1,0
-30165,Tokyo / Japan Plane Rectangular CS V,1858,projected,4530,,4301,17805,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Superseded by JGD2000 / Japan Plane Rectangular CS V (code 2447) from April 2002.,Geographic Survey Institute; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/tokyodatum.html,EPSG,2002-06-22 00:00:00,99.97 2002.08 2002.081,1,0
-30166,Tokyo / Japan Plane Rectangular CS VI,1859,projected,4530,,4301,17806,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Superseded by JGD2000 / Japan Plane Rectangular CS VI (code 2448) from April 2002.,Geographic Survey Institute; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/tokyodatum.html,EPSG,2002-06-22 00:00:00,99.97 2002.08 2002.081,1,0
-30167,Tokyo / Japan Plane Rectangular CS VII,1860,projected,4530,,4301,17807,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Superseded by JGD2000 / Japan Plane Rectangular CS VII (code 2449) from April 2002.,Geographic Survey Institute; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/tokyodatum.html,EPSG,2002-06-22 00:00:00,99.97 2002.08 2002.081,1,0
-30168,Tokyo / Japan Plane Rectangular CS VIII,1861,projected,4530,,4301,17808,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Superseded by JGD2000 / Japan Plane Rectangular CS VIII (code 2450) from April 2002.,Geographic Survey Institute; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/tokyodatum.html,EPSG,2002-06-22 00:00:00,99.97 2002.08 2002.081,1,0
-30169,Tokyo / Japan Plane Rectangular CS IX,1862,projected,4530,,4301,17809,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Superseded by JGD2000 / Japan Plane Rectangular CS IX (code 2451) from April 2002.,Geographic Survey Institute; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/tokyodatum.html,EPSG,2002-06-22 00:00:00,99.97 2002.08 2002.081,1,0
-30170,Tokyo / Japan Plane Rectangular CS X,1863,projected,4530,,4301,17810,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Superseded by JGD2000 / Japan Plane Rectangular CS X (code 2452) from April 2002.,Geographic Survey Institute; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/tokyodatum.html,EPSG,2002-06-22 00:00:00,99.97 2002.08,1,0
-30171,Tokyo / Japan Plane Rectangular CS XI,1864,projected,4530,,4301,17811,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Superseded by JGD2000 / Japan Plane Rectangular CS XI (code 2453) from April 2002.,Geographic Survey Institute; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/tokyodatum.html,EPSG,2002-06-22 00:00:00,99.97 2002.08,1,0
-30172,Tokyo / Japan Plane Rectangular CS XII,1865,projected,4530,,4301,17812,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Superseded by JGD2000 / Japan Plane Rectangular CS XII (code 2454) from April 2002.,Geographic Survey Institute; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/tokyodatum.html,EPSG,2002-06-22 00:00:00,99.97 2002.08,1,0
-30173,Tokyo / Japan Plane Rectangular CS XIII,1866,projected,4530,,4301,17813,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Superseded by JGD2000 / Japan Plane Rectangular CS XIII (code 2455) from April 2002.,Geographic Survey Institute; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/tokyodatum.html,EPSG,2002-06-22 00:00:00,99.97 2002.08,1,0
-30174,Tokyo / Japan Plane Rectangular CS XIV,1867,projected,4530,,4301,17814,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Although legally defined as Tokyo datum the accuracy of the geodetic connection to mainland Japan is low. Superseded by JGD2000 / Japan Plane Rectangular CS XIV (code 2456) from April 2002.,Geographic Survey Institute; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/tokyodatum.html,EPSG,2002-06-22 00:00:00,2002.08,1,0
-30175,Tokyo / Japan Plane Rectangular CS XV,1868,projected,4530,,4301,17815,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Superseded by JGD2000 / Japan Plane Rectangular CS XV (code 2457) from April 2002.,Geographic Survey Institute; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/tokyodatum.html,EPSG,2002-06-22 00:00:00,99.97 2002.08 2002.081,1,0
-30176,Tokyo / Japan Plane Rectangular CS XVI,1869,projected,4530,,4301,17816,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Superseded by JGD2000 / Japan Plane Rectangular CS XVI (code 2458) from April 2002.,Geographic Survey Institute; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/tokyodatum.html,EPSG,2002-06-22 00:00:00,2002.08,1,0
-30177,Tokyo / Japan Plane Rectangular CS XVII,1870,projected,4530,,4301,17817,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Although legally defined as Tokyo datum the accuracy of the geodetic connection to mainland Japan is low. Superseded by JGD2000 / Japan Plane Rectangular CS XVII (code 2459) from April 2002.,Geographic Survey Institute; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/tokyodatum.html,EPSG,2002-06-22 00:00:00,99.97 2002.08 2002.081,1,0
-30178,Tokyo / Japan Plane Rectangular CS XVIII,1871,projected,4530,,4301,17818,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Although legally defined as Tokyo datum the accuracy of the geodetic connection to mainland Japan is low. Superseded by JGD2000 / Japan Plane Rectangular CS XVIII (code 2460) from April 2002.,Geographic Survey Institute; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/tokyodatum.html,EPSG,2002-06-22 00:00:00,99.97 2002.08 2002.081,1,0
-30179,Tokyo / Japan Plane Rectangular CS XIX,1872,projected,4530,,4301,17819,,,"Large and medium scale topographic mapping, cadastral and engineering survey.",Although legally defined as Tokyo datum the accuracy of the geodetic connection to mainland Japan is low. Superseded by JGD2000 / Japan Plane Rectangular CS XIX (code 2461) from April 2002.,Geographic Survey Institute; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/tokyodatum.html,EPSG,2002-06-22 00:00:00,99.97 2002.08 2002.081,1,0
-30200,Trinidad 1903 / Trinidad Grid,1322,projected,4407,,4302,19925,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1999-10-20 00:00:00,97.231,1,0
-30339,TC(1948) / UTM zone 39N,1850,projected,4400,,4303,16039,,,Oil exploration.,,,EPSG,1995-06-02 00:00:00,,1,0
-30340,TC(1948) / UTM zone 40N,1750,projected,4400,,4303,16040,,,Oil exploration.,,,EPSG,1995-06-02 00:00:00,,1,0
-30491,Voirol 1875 / Nord Algerie (ancienne),1728,projected,4499,,4304,18011,,,Large and medium scale topographic mapping and engineering survey.,Superseded by Nord Sahara 1959 / Voirol Unifie Nord (code 30791).,,EPSG,1995-06-02 00:00:00,,1,0
-30492,Voirol 1875 / Sud Algerie (ancienne),1729,projected,4499,,4304,18012,,,Large and medium scale topographic mapping and engineering survey.,Superseded by Nord Sahara 1959 / Voirol Unifie Nord (code 30792).,,EPSG,1995-06-02 00:00:00,,1,0
-30729,Nord Sahara 1959 / UTM zone 29N,1735,projected,4400,,4307,16029,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1996-04-12 00:00:00,,1,0
-30730,Nord Sahara 1959 / UTM zone 30N,1736,projected,4400,,4307,16030,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1996-04-12 00:00:00,,1,0
-30731,Nord Sahara 1959 / UTM zone 31N,1737,projected,4400,,4307,16031,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1996-04-12 00:00:00,,1,0
-30732,Nord Sahara 1959 / UTM zone 32N,1738,projected,4400,,4307,16032,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1996-04-12 00:00:00,,1,0
-30791,Nord Sahara 1959 / Voirol Unifie Nord,1728,projected,4499,,4307,18021,,,Large and medium scale topographic mapping and engineering survey.,Supersedes Voirol 1875 / Nord Algeria ancienne (code 30491).  Grid coordinates on average across Algeria are unchanged although local differences reach 30 metres; geographic coordinate equivalents do change.,"""Le System Geodesique Nord-Sahara""; IGN Paris",EPSG,2002-08-29 00:00:00,2002.56,1,0
-30792,Nord Sahara 1959 / Voirol Unifie Sud,1729,projected,4499,,4307,18022,,,Large and medium scale topographic mapping and engineering survey.,Supersedes Voirol 1875 / Sud Algeria ancienne (code 30492).  Grid coordinates on average across Algeria are unchanged although local differences reach 30 metres; geographic coordinate equivalents do change.,"""Le System Geodesique Nord-Sahara""; IGN Paris",EPSG,2002-08-29 00:00:00,2002.56,1,0
-30800,RT38 2.5 gon W,1225,projected,4530,,4308,19929,,,Large and medium scale topographic mapping and engineering survey.,,National Land Survey of Sweden,EPSG,1997-11-13 00:00:00,97.14  97.39,1,0
-31028,Yoff / UTM zone 28N,1207,projected,4400,,4310,16028,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-31121,Zanderij / UTM zone 21N,1222,projected,4400,,4311,16021,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-31154,Zanderij / TM 54 NW,1727,projected,4400,,4311,17054,,,Large and medium scale topographic mapping and engineering survey.,,Shell International,EPSG,2000-06-10 00:00:00,,1,0
-31170,Zanderij / Suriname Old TM,1222,projected,4400,,4311,19954,,,Large and medium scale topographic mapping and engineering survey.,Introduced in 1975.  Superseded by Zanderij / Suriname TM in 1979.,Shell International,EPSG,2000-06-10 00:00:00,,1,0
-31171,Zanderij / Suriname TM,1222,projected,4400,,4311,19955,,,Large and medium scale topographic mapping and engineering survey.,Superseded Zanderij / Suriname Old TM in 1979.,Shell International,EPSG,2000-06-10 00:00:00,,1,0
-31265,MGI / 3-degree Gauss zone 5,1709,projected,4499,,4312,16265,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,,1,1
-31266,MGI / 3-degree Gauss zone 6,1710,projected,4499,,4312,16266,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,,1,1
-31267,MGI / 3-degree Gauss zone 7,1711,projected,4499,,4312,16267,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,,1,1
-31268,MGI / 3-degree Gauss zone 8,1712,projected,4499,,4312,16268,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,,1,1
-31275,MGI / Balkans zone 5,1709,projected,4530,,4312,18275,,,Large and medium scale topographic mapping and engineering survey.,In Slovenia the truncated form MGI / Slovenia Grid (code 2169) is preferred.,EPSG,EPSG,2001-06-05 00:00:00,,1,0
-31276,MGI / Balkans zone 6,1710,projected,4530,,4312,18276,,,Large and medium scale topographic mapping and engineering survey.,,EPSG,EPSG,2001-06-05 00:00:00,,1,0
-31277,MGI / Balkans zone 7,1711,projected,4530,,4312,18277,,,Large and medium scale topographic mapping and engineering survey.,,EPSG,EPSG,2001-06-05 00:00:00,,1,0
-31278,MGI / Balkans zone 8,1712,projected,4530,,4312,18277,,,Large and medium scale topographic mapping and engineering survey.,,EPSG,EPSG,2001-06-05 00:00:00,,1,1
-31279,MGI / Balkans zone 8,1712,projected,4530,,4312,18278,,,Large and medium scale topographic mapping and engineering survey.,,EPSG,EPSG,2001-08-28 00:00:00,,1,0
-31281,MGI (Ferro) / Austria West Zone,1706,projected,4530,,4805,18041,,,Large and medium scale topographic mapping and engineering survey.,Superseded by MGI / M28 (EPSG code 31284) based on Greenwich meridian.,Bundesamt fur Eich- und Vermessungswesen; Wien,EPSG,2001-06-05 00:00:00,,1,0
-31282,MGI (Ferro) / Austria Central Zone,1708,projected,4530,,4805,18042,,,Large and medium scale topographic mapping and engineering survey.,Superseded by MGI / M31 (EPSG code 31285) based on Greenwich meridian.,Bundesamt fur Eich- und Vermessungswesen; Wien,EPSG,2001-06-05 00:00:00,,1,0
-31283,MGI (Ferro) / Austria East Zone,1707,projected,4530,,4805,18043,,,Large and medium scale topographic mapping and engineering survey.,Superseded by MGI / M34 (EPSG code 31286) based on Greenwich meridian.,Bundesamt fur Eich- und Vermessungswesen; Wien,EPSG,2001-06-05 00:00:00,,1,0
-31284,MGI / M28,1706,projected,4530,,4312,18044,,,Large and medium scale topographic mapping and engineering survey.,Supersedes MGI (Ferro) / Austria West zone (EPSG code 31281).,Bundesamt fur Eich- und Vermessungswesen; Wien,EPSG,2001-06-05 00:00:00,,1,0
-31285,MGI / M31,1707,projected,4530,,4312,18045,,,Large and medium scale topographic mapping and engineering survey.,Supersedes MGI (Ferro) / Austria Central zone (EPSG code 31282).,Bundesamt fur Eich- und Vermessungswesen; Wien,EPSG,2001-06-05 00:00:00,,1,0
-31286,MGI / M34,1708,projected,4530,,4312,18046,,,Large and medium scale topographic mapping and engineering survey.,Supersedes MGI (Ferro) / Austria East zone (EPSG code 31283).,Bundesamt fur Eich- und Vermessungswesen; Wien,EPSG,2001-06-05 00:00:00,,1,0
-31287,MGI / Austria Lambert,1037,projected,4530,,4312,19947,,,Medium and small scale mapping.,,Bundesamt fur Eich- und Vermessungswesen; Wien,EPSG,2001-06-05 00:00:00,,1,0
-31291,MGI (Ferro) / Austria West Zone,1706,projected,4499,,4805,18041,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,97.01,1,1
-31292,MGI (Ferro) / Austria Central Zone,1708,projected,4499,,4805,18042,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,97.01,1,1
-31293,MGI (Ferro) / Austria East Zone,1707,projected,4499,,4805,18043,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,97.01,1,1
-31294,MGI / M28,1706,projected,4499,,4312,18044,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1999-10-20 00:00:00,97.01,1,1
-31295,MGI / M31,1707,projected,4499,,4312,18045,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1999-10-20 00:00:00,97.01,1,1
-31296,MGI / M34,1708,projected,4499,,4312,18046,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1999-10-20 00:00:00,97.01,1,1
-31297,MGI / Austria Lambert,1037,projected,4499,,4312,19947,,,Medium and small scale mapping.,,,EPSG,1999-10-20 00:00:00,97.01,1,1
-31300,Belge 1972 / Belge Lambert 72,1347,projected,4499,,4313,19902,,,Large and medium scale topographic mapping and engineering survey.,Supersedes 21500 (Belge 1950 / Belge Lambert 50).  An alternative - Belge 1972 / Belgian Lambert 72 (code 31370) - was introduced in 2000 to use the standard Lambert Conic Conformal (2SP) projection method (code 9802).  EPSG recommends this alternative.,IGN Brussels.,EPSG,1995-06-02 00:00:00,,1,0
-31370,Belge 1972 / Belgian Lambert 72,1347,projected,4499,,4313,19961,,,Large and medium scale topographic mapping and engineering survey.,"Introduced in 2000 as an alternative to CRS code 31300 to avoid the special projection method LCC (2SP Belgium) (code 9803). If software cannot handle latitude of origin 90�N, use latitude of origin = 50� 47' 57.704""N with Nf = 165372.956 m.",IGN Brussels www.ngi.be/html-files/french/0038.html,EPSG,2000-10-19 00:00:00,,1,0
-31461,DHDN / 3-degree Gauss zone 1,1628,projected,4499,,4314,16261,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,2000.101,1,1
-31462,DHDN / 3-degree Gauss zone 2,1624,projected,4499,,4314,16262,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,2000.101,1,1
-31463,DHDN / 3-degree Gauss zone 3,1625,projected,4499,,4314,16263,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,2000.101,1,1
-31464,DHDN / 3-degree Gauss zone 4,1626,projected,4499,,4314,16264,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,2000.101,1,1
-31465,DHDN / 3-degree Gauss zone 5,1627,projected,4499,,4314,16265,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,2000.101,1,1
-31466,DHDN / Gauss-Kruger zone 2,1624,projected,4530,,4314,16262,,,"Large and medium scale topographic mapping and engineering survey, cadastral survey.",Zone width 3 degrees.,Bundesamt f�r Kartographie und Geod�sie via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-31467,DHDN / Gauss-Kruger zone 3,1625,projected,4530,,4314,16263,,,"Large and medium scale topographic mapping and engineering survey, cadastral survey.",Zone width 3 degrees.,Bundesamt f�r Kartographie und Geod�sie via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-31468,DHDN / Gauss-Kruger zone 4,1626,projected,4530,,4314,16264,,,"Large and medium scale topographic mapping and engineering survey, cadastral survey.",Zone width 3 degrees.,Bundesamt f�r Kartographie und Geod�sie via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-31469,DHDN / Gauss-Kruger zone 5,1627,projected,4530,,4314,16265,,,"Large and medium scale topographic mapping and engineering survey, cadastral survey.",Zone width 3 degrees.,Bundesamt f�r Kartographie und Geod�sie via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1,0
-31528,Conakry 1905 / UTM zone 28N,1468,projected,4400,,4315,16028,,,Large and medium scale topographic mapping and engineering survey.,Superseded by Dabola 1981 / UTM zone 28 (EPSG code 2063).,,EPSG,1999-12-09 00:00:00,,1,0
-31529,Conakry 1905 / UTM zone 29N,1469,projected,4400,,4315,16029,,,Large and medium scale topographic mapping and engineering survey.,Superseded by Dabola 1981 / UTM zone 29 (EPSG code 2064).,,EPSG,1999-12-09 00:00:00,,1,0
-31600,Dealul Piscului 1933/ Stereo 33,1197,projected,4499,,4316,19927,,,Large and medium scale topographic mapping and engineering survey.,Superseded by Stereo 70 system (ProjCS code 31700).,,EPSG,1996-04-12 00:00:00,,1,0
-31700,Dealul Piscului 1970/ Stereo 70,1197,projected,4530,,4317,19926,,,Large and medium scale topographic mapping and engineering survey.,Supersedes Stereo 33 system.,,EPSG,1996-04-12 00:00:00,,1,0
-31838,NGN / UTM zone 38N,1739,projected,4400,,4318,16038,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1996-04-12 00:00:00,,1,0
-31839,NGN / UTM zone 39N,1740,projected,4400,,4318,16039,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1996-04-12 00:00:00,,1,0
-31900,KUDAMS / KTM,1310,projected,4400,,4319,19928,,,Large scale engineering and utility mapping.,,,EPSG,1996-04-12 00:00:00,,1,0
-31986,SIRGAS / UTM zone 17N,1823,projected,4400,,4170,16017,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-10-19 00:00:00,,1,0
-31987,SIRGAS / UTM zone 18N,1825,projected,4400,,4170,16018,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-10-19 00:00:00,,1,0
-31988,SIRGAS / UTM zone 19N,1827,projected,4400,,4170,16019,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-10-19 00:00:00,,1,0
-31989,SIRGAS / UTM zone 20N,1829,projected,4400,,4170,16020,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-10-19 00:00:00,,1,0
-31990,SIRGAS / UTM zone 21N,1831,projected,4400,,4170,16021,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-10-19 00:00:00,,1,0
-31991,SIRGAS / UTM zone 22N,1833,projected,4400,,4170,16022,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-10-19 00:00:00,,1,0
-31992,SIRGAS / UTM zone 17S,1824,projected,4400,,4170,16117,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-10-19 00:00:00,,1,0
-31993,SIRGAS / UTM zone 18S,1826,projected,4400,,4170,16118,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-10-19 00:00:00,,1,0
-31994,SIRGAS / UTM zone 19S,1828,projected,4400,,4170,16119,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-10-19 00:00:00,,1,0
-31995,SIRGAS / UTM zone 20S,1830,projected,4400,,4170,16120,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-10-19 00:00:00,,1,0
-31996,SIRGAS / UTM zone 21S,1832,projected,4400,,4170,16121,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-10-19 00:00:00,,1,0
-31997,SIRGAS / UTM zone 22S,1834,projected,4400,,4170,16122,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-10-19 00:00:00,,1,0
-31998,SIRGAS / UTM zone 23S,1835,projected,4400,,4170,16123,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-10-19 00:00:00,,1,0
-31999,SIRGAS / UTM zone 24S,1836,projected,4400,,4170,16124,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-10-19 00:00:00,,1,0
-32000,SIRGAS / UTM zone 25S,1837,projected,4400,,4170,16125,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-10-19 00:00:00,,1,0
-32001,NAD27 / Montana North,2211,projected,4497,,4267,12501,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32002,NAD27 / Montana Central,2210,projected,4497,,4267,12502,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32003,NAD27 / Montana South,2212,projected,4497,,4267,12503,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32005,NAD27 / Nebraska North,2221,projected,4497,,4267,12601,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32006,NAD27 / Nebraska South,2222,projected,4497,,4267,12602,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32007,NAD27 / Nevada East,2224,projected,4497,,4267,12701,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,2000.091,1,0
-32008,NAD27 / Nevada Central,2223,projected,4497,,4267,12702,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32009,NAD27 / Nevada West,2225,projected,4497,,4267,12703,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,2000.091,1,0
-32010,NAD27 / New Hampshire,1398,projected,4497,,4267,12800,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,2000.091,1,0
-32011,NAD27 / New Jersey,1399,projected,4497,,4267,12900,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,2000.091,1,0
-32012,NAD27 / New Mexico East,2228,projected,4497,,4267,13001,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,2000.091,1,0
-32013,NAD27 / New Mexico Central,2229,projected,4497,,4267,13002,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32014,NAD27 / New Mexico West,2230,projected,4497,,4267,13003,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,2000.091,1,0
-32015,NAD27 / New York East,2234,projected,4497,,4267,13101,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,2000.091,1,0
-32016,NAD27 / New York Central,2233,projected,4497,,4267,13102,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32017,NAD27 / New York West,2236,projected,4497,,4267,13103,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,2000.091,1,0
-32018,NAD27 / New York Long Island,2235,projected,4497,,4267,13104,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32019,NAD27 / North Carolina,1402,projected,4497,,4267,13200,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,2000.091,1,0
-32020,NAD27 / North Dakota North,2237,projected,4497,,4267,13301,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32021,NAD27 / North Dakota South,2238,projected,4497,,4267,13302,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32022,NAD27 / Ohio North,2239,projected,4497,,4267,13401,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32023,NAD27 / Ohio South,2240,projected,4497,,4267,13402,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32024,NAD27 / Oklahoma North,2241,projected,4497,,4267,13501,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32025,NAD27 / Oklahoma South,2242,projected,4497,,4267,13502,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32026,NAD27 / Oregon North,2243,projected,4497,,4267,13601,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32027,NAD27 / Oregon South,2244,projected,4497,,4267,13602,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32028,NAD27 / Pennsylvania North,2245,projected,4497,,4267,13701,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32029,NAD27 / Pennsylvania South,2246,projected,4497,,4267,13702,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32030,NAD27 / Rhode Island,1408,projected,4497,,4267,13800,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,2000.091,1,0
-32031,NAD27 / South Carolina North,2247,projected,4497,,4267,13901,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32033,NAD27 / South Carolina South,2248,projected,4497,,4267,13902,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32034,NAD27 / South Dakota North,2249,projected,4497,,4267,14001,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32035,NAD27 / South Dakota South,2250,projected,4497,,4267,14002,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32036,NAD27 / Tennessee,1411,projected,4497,,4267,14100,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,2000.091,1,1
-32037,NAD27 / Texas North,2253,projected,4497,,4267,14201,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32038,NAD27 / Texas North Central,2254,projected,4497,,4267,14202,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32039,NAD27 / Texas Central,2252,projected,4497,,4267,14203,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32040,NAD27 / Texas South Central,2256,projected,4497,,4267,14204,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32041,NAD27 / Texas South,2255,projected,4497,,4267,14205,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32042,NAD27 / Utah North,2258,projected,4497,,4267,14301,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32043,NAD27 / Utah Central,2257,projected,4497,,4267,14302,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32044,NAD27 / Utah South,2259,projected,4497,,4267,14303,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,2000.091,1,0
-32045,NAD27 / Vermont,1414,projected,4497,,4267,14400,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32046,NAD27 / Virginia North,2260,projected,4497,,4267,14501,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32047,NAD27 / Virginia South,2261,projected,4497,,4267,14502,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32048,NAD27 / Washington North,2262,projected,4497,,4267,14601,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32049,NAD27 / Washington South,2263,projected,4497,,4267,14602,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32050,NAD27 / West Virginia North,2264,projected,4497,,4267,14701,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32051,NAD27 / West Virginia South,2265,projected,4497,,4267,14702,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32052,NAD27 / Wisconsin North,2267,projected,4497,,4267,14801,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32053,NAD27 / Wisconsin Central,2266,projected,4497,,4267,14802,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32054,NAD27 / Wisconsin South,2268,projected,4497,,4267,14803,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32055,NAD27 / Wyoming East,2269,projected,4497,,4267,14901,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,2000.091,1,0
-32056,NAD27 / Wyoming East Central,2270,projected,4497,,4267,14902,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,2000.091,1,0
-32057,NAD27 / Wyoming West Central,2272,projected,4497,,4267,14903,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,2000.091,1,0
-32058,NAD27 / Wyoming West,2271,projected,4497,,4267,14904,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,2000.091,1,0
-32061,NAD27 / Guatemala Norte,2120,projected,4499,,4267,18211,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1999-08-18 00:00:00,,1,0
-32062,NAD27 / Guatemala Sur,2121,projected,4499,,4267,18212,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-01-06 00:00:00,99.95,1,0
-32064,NAD27 / BLM 14N (ftUS),2171,projected,4497,,4267,15914,,,"Minerals (including oil) management, exploration and production.",,EPSG,EPSG,2002-02-12 00:00:00,,1,0
-32065,NAD27 / BLM 15N (ftUS),2171,projected,4497,,4267,15915,,,"Minerals (including oil) management, exploration and production.",,EPSG,EPSG,2002-02-12 00:00:00,,1,0
-32066,NAD27 / BLM 16N (ftUS),2171,projected,4497,,4267,15916,,,"Minerals (including oil) management, exploration and production.",,EPSG,EPSG,2002-02-12 00:00:00,,1,0
-32067,NAD27 / BLM 17N (ftUS),2171,projected,4497,,4267,15917,,,"Minerals (including oil) management, exploration and production.",,EPSG,EPSG,2002-02-12 00:00:00,,1,0
-32074,NAD27 / BLM 14N (feet),2171,projected,4497,,4267,15914,,,"Minerals (including oil) management, exploration and production.",,,EPSG,1996-04-12 00:00:00,96.03,1,1
-32075,NAD27 / BLM 15N (feet),2172,projected,4497,,4267,15915,,,"Minerals (including oil) management, exploration and production.",,,EPSG,1996-04-12 00:00:00,96.03,1,1
-32076,NAD27 / BLM 16N (feet),2173,projected,4497,,4267,15916,,,"Minerals (including oil) management, exploration and production.",,,EPSG,1996-04-12 00:00:00,95.27  96.03,1,1
-32077,NAD27 / BLM 17N (feet),2174,projected,4497,,4267,15917,,,"Minerals (including oil) management, exploration and production.",,,EPSG,1996-04-12 00:00:00,96.03,1,1
-32081,NAD27 / MTM zone 1,2226,projected,4400,,4267,17701,,,Large and medium scale topographic mapping and engineering survey.,,Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.,EPSG,1997-11-13 00:00:00,,1,0
-32082,NAD27 / MTM zone 2,2227,projected,4400,,4267,17702,,,Large and medium scale topographic mapping and engineering survey.,,Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.,EPSG,1997-11-13 00:00:00,,1,0
-32083,NAD27 / MTM zone 3,2275,projected,4400,,4267,17703,,,Large and medium scale topographic mapping and engineering survey.,,Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.,EPSG,1997-11-13 00:00:00,,1,0
-32084,NAD27 / MTM zone 4,2276,projected,4400,,4267,17704,,,Large and medium scale topographic mapping and engineering survey.,,Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.,EPSG,1997-11-13 00:00:00,,1,0
-32085,NAD27 / MTM zone 5,2277,projected,4400,,4267,17705,,,Large and medium scale topographic mapping and engineering survey.,,Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.,EPSG,1997-11-13 00:00:00,,1,0
-32086,NAD27 / MTM zone 6,2278,projected,4400,,4267,17706,,,Large and medium scale topographic mapping and engineering survey.,,Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.,EPSG,1997-11-13 00:00:00,,1,0
-32098,NAD27 / Quebec Lambert,1368,projected,4499,,4267,19944,,,Large and medium scale topographic mapping and engineering survey.,Superseded by NAD27(CGQ77) / Quebec Lambert (code 2137) in 1977.,Service de la Cartographie; Minist�re des Ressources Naturelles; Quebec,EPSG,2000-10-19 00:00:00,,1,0
-32100,NAD83 / Montana,1395,projected,4499,,4269,12530,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in International feet (note: not US survey feet).  See code 2256 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,2000-03-07 00:00:00,2000.091,1,0
-32104,NAD83 / Nebraska,1396,projected,4499,,4269,12630,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,2000-03-07 00:00:00,2000.091,1,0
-32107,NAD83 / Nevada East,2224,projected,4499,,4269,12731,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,2000-03-07 00:00:00,2000.091,1,0
-32108,NAD83 / Nevada Central,2223,projected,4499,,4269,12732,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-32109,NAD83 / Nevada West,2225,projected,4499,,4269,12733,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-32110,NAD83 / New Hampshire,1398,projected,4499,,4269,12830,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,2000-03-07 00:00:00,2000.091,1,0
-32111,NAD83 / New Jersey,1399,projected,4499,,4269,12930,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,2000-03-07 00:00:00,2000.091,1,0
-32112,NAD83 / New Mexico East,2228,projected,4499,,4269,13031,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2257 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-32113,NAD83 / New Mexico Central,2231,projected,4499,,4269,13032,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2258 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-32114,NAD83 / New Mexico West,2232,projected,4499,,4269,13033,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2259 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-32115,NAD83 / New York East,2234,projected,4499,,4269,13131,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2260 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,2000-03-07 00:00:00,2000.091,1,0
-32116,NAD83 / New York Central,2233,projected,4499,,4269,13132,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2261 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-32117,NAD83 / New York West,2236,projected,4499,,4269,13133,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2263 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,2000-03-07 00:00:00,2000.091,1,0
-32118,NAD83 / New York Long Island,2235,projected,4499,,4269,13134,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2264 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-32119,NAD83 / North Carolina,1402,projected,4499,,4269,13230,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2264 for equivalent non-metric definition.,,EPSG,2000-03-07 00:00:00,98.30  2000.091,1,0
-32120,NAD83 / North Dakota North,2237,projected,4499,,4269,13331,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in International feet (note: not US survey feet).  See code 2265 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-32121,NAD83 / North Dakota South,2238,projected,4499,,4269,13332,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in International feet (note: not US survey feet).  See code 2266 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-32122,NAD83 / Ohio North,2239,projected,4499,,4269,13431,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-32123,NAD83 / Ohio South,2240,projected,4499,,4269,13432,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-32124,NAD83 / Oklahoma North,2241,projected,4499,,4269,13531,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2267 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-32125,NAD83 / Oklahoma South,2242,projected,4499,,4269,13532,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2268 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-32126,NAD83 / Oregon North,2243,projected,4499,,4269,13631,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in International feet (note: not US survey feet).  See code 2269 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-32127,NAD83 / Oregon South,2244,projected,4499,,4269,13632,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in International feet (note: not US survey feet).  See code 2270 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-32128,NAD83 / Pennsylvania North,2245,projected,4499,,4269,13731,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2271 for equivalent non-metric definition.,,EPSG,1995-06-02 00:00:00,,1,0
-32129,NAD83 / Pennsylvania South,2246,projected,4499,,4269,13732,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in US survey feet.  See code 2272 for equivalent non-metric definition.,,EPSG,1995-06-02 00:00:00,,1,0
-32130,NAD83 / Rhode Island,1408,projected,4499,,4269,13830,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,2000-03-07 00:00:00,2000.091,1,0
-32133,NAD83 / South Carolina,1409,projected,4499,,4269,13930,,,Large and medium scale topographic mapping and engineering survey.,State law defines system in International feet (note: not US survey feet).  See code 2273 for equivalent non-metric definition.,,EPSG,1995-06-02 00:00:00,,1,0
-32134,NAD83 / South Dakota North,2249,projected,4499,,4269,14031,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-32135,NAD83 / South Dakota South,2250,projected,4499,,4269,14032,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-32136,NAD83 / Tennessee,1411,projected,4499,,4269,14130,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2274 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,2000-03-07 00:00:00,2000.091,1,0
-32137,NAD83 / Texas North,2253,projected,4499,,4269,14231,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2275 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-32138,NAD83 / Texas North Central,2254,projected,4499,,4269,14232,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2276 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-32139,NAD83 / Texas Central,2252,projected,4499,,4269,14233,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2277 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-32140,NAD83 / Texas South Central,2527,projected,4499,,4269,14234,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2278 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-32141,NAD83 / Texas South,2528,projected,4499,,4269,14235,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2279 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-32142,NAD83 / Utah North,2258,projected,4499,,4269,14331,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in International feet (note: not US survey feet).  See code 2280 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-32143,NAD83 / Utah Central,2257,projected,4499,,4269,14332,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in International feet (note: not US survey feet).  See code 2281 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-32144,NAD83 / Utah South,2259,projected,4499,,4269,14333,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in International feet (note: not US survey feet).  See code 2282 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-32145,NAD83 / Vermont,1414,projected,4499,,4269,14430,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2000-03-07 00:00:00,2000.091,1,0
-32146,NAD83 / Virginia North,2260,projected,4499,,4269,14531,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2283 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-32147,NAD83 / Virginia South,2261,projected,4499,,4269,14532,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2284 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-32148,NAD83 / Washington North,2273,projected,4499,,4269,14631,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2285 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-32149,NAD83 / Washington South,2274,projected,4499,,4269,14632,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2286 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-32150,NAD83 / West Virginia North,2264,projected,4499,,4269,14731,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-32151,NAD83 / West Virginia South,2265,projected,4499,,4269,14732,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-32152,NAD83 / Wisconsin North,2267,projected,4499,,4269,14831,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2287 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-32153,NAD83 / Wisconsin Central,2266,projected,4499,,4269,14832,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2288 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-32154,NAD83 / Wisconsin South,2268,projected,4499,,4269,14833,,,Large and medium scale topographic mapping and engineering survey.,"State law defines system in US survey feet.  See code 2289 for equivalent non-metric definition. For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-32155,NAD83 / Wyoming East,2269,projected,4499,,4269,14931,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,2000-03-07 00:00:00,2000.091,1,0
-32156,NAD83 / Wyoming East Central,2270,projected,4499,,4269,14932,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,2000-03-07 00:00:00,2000.091,1,0
-32157,NAD83 / Wyoming West Central,2272,projected,4499,,4269,14933,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,2000-03-07 00:00:00,2000.091,1,0
-32158,NAD83 / Wyoming West,2271,projected,4499,,4269,14934,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,2000-03-07 00:00:00,2000.091,1,0
-32161,NAD83 / Puerto Rico & Virgin Is.,2251,projected,4499,,4269,15230,,,Large and medium scale topographic mapping and engineering survey.,"For applications with an accuracy of better than 1m, superseded by NAD83(HARN) / SPCS.",,EPSG,1995-06-02 00:00:00,,1,0
-32180,NAD83 / SCoPQ zone 2,1420,projected,4499,,4269,17700,,,Large and medium scale topographic mapping and engineering survey.,,Topographic Mapping Section; Quebec Ministry of Natural Resources.,EPSG,1997-11-13 00:00:00,,1,0
-32181,NAD83 / MTM zone 1,2226,projected,4496,,4269,17701,,,Large and medium scale topographic mapping and engineering survey.,,Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.,EPSG,1997-11-13 00:00:00,,1,0
-32182,NAD83 / MTM zone 2,2227,projected,4496,,4269,17702,,,Large and medium scale topographic mapping and engineering survey.,,Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.,EPSG,1997-11-13 00:00:00,,1,0
-32183,NAD83 / MTM zone 3,2275,projected,4496,,4269,17703,,,Large and medium scale topographic mapping and engineering survey.,"Known in Quebec as ""NAD83 / SCoPQ zone 3"" with axis 1 and 2 abbreviations of ""X"" and ""Y"" respectively.",Topographic Mapping Section; Quebec Ministry of Natural Resources. Also Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.,EPSG,1997-11-13 00:00:00,,1,0
-32184,NAD83 / MTM zone 4,2276,projected,4496,,4269,17704,,,Large and medium scale topographic mapping and engineering survey.,"Known in Quebec as ""NAD83 / SCoPQ zone 4"" with axis 1 and 2 abbreviations of ""X"" and ""Y"" respectively.",Topographic Mapping Section; Quebec Ministry of Natural Resources. Also Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.,EPSG,1997-11-13 00:00:00,,1,0
-32185,NAD83 / MTM zone 5,2277,projected,4496,,4269,17705,,,Large and medium scale topographic mapping and engineering survey.,"Known in Quebec as ""NAD83 / SCoPQ zone 5"" with axis 1 and 2 abbreviations of ""X"" and ""Y"" respectively.",Topographic Mapping Section; Quebec Ministry of Natural Resources. Also Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.,EPSG,1997-11-13 00:00:00,,1,0
-32186,NAD83 / MTM zone 6,2278,projected,4496,,4269,17706,,,Large and medium scale topographic mapping and engineering survey.,"Known in Quebec as ""NAD83 / SCoPQ zone 6"" with axis 1 and 2 abbreviations of ""X"" and ""Y"" respectively.",Topographic Mapping Section; Quebec Ministry of Natural Resources. Also Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.,EPSG,1997-11-13 00:00:00,,1,0
-32187,NAD83 / MTM zone 7,1425,projected,4496,,4269,17707,,,Large and medium scale topographic mapping and engineering survey.,"Known in Quebec as ""NAD83 / SCoPQ zone 7"" with axis 1 and 2 abbreviations of ""X"" and ""Y"" respectively.",Topographic Mapping Section; Quebec Ministry of Natural Resources.,EPSG,1997-11-13 00:00:00,,1,0
-32188,NAD83 / MTM zone 8,2279,projected,4496,,4269,17708,,,Large and medium scale topographic mapping and engineering survey.,"Known in Quebec as ""NAD83 / SCoPQ zone 8"" with axis 1 and 2 abbreviations of ""X"" and ""Y"" respectively.",Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,1997-11-13 00:00:00,,1,0
-32189,NAD83 / MTM zone 9,2280,projected,4496,,4269,17709,,,Large and medium scale topographic mapping and engineering survey.,"Known in Quebec as ""NAD83 / SCoPQ zone 9"" with axis 1 and 2 abbreviations of ""X"" and ""Y"" respectively.",Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,1997-11-13 00:00:00,,1,0
-32190,NAD83 / MTM zone 10,2281,projected,4496,,4269,17710,,,Large and medium scale topographic mapping and engineering survey.,"Known in Quebec as ""NAD83 / SCoPQ zone 10"" with axis 1 and 2 abbreviations of ""X"" and ""Y"" respectively.",Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,1997-11-13 00:00:00,,1,0
-32191,NAD83 / MTM zone 11,1432,projected,4400,,4269,17711,,,Large and medium scale topographic mapping and engineering survey.,,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,1997-11-13 00:00:00,,1,0
-32192,NAD83 / MTM zone 12,1433,projected,4400,,4269,17712,,,Large and medium scale topographic mapping and engineering survey.,,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,1997-11-13 00:00:00,,1,0
-32193,NAD83 / MTM zone 13,1434,projected,4400,,4269,17713,,,Large and medium scale topographic mapping and engineering survey.,,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,1997-11-13 00:00:00,,1,0
-32194,NAD83 / MTM zone 14,1435,projected,4400,,4269,17714,,,Large and medium scale topographic mapping and engineering survey.,,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,1997-11-13 00:00:00,,1,0
-32195,NAD83 / MTM zone 15,1436,projected,4400,,4269,17715,,,Large and medium scale topographic mapping and engineering survey.,,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,1997-11-13 00:00:00,,1,0
-32196,NAD83 / MTM zone 16,1437,projected,4400,,4269,17716,,,Large and medium scale topographic mapping and engineering survey.,,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,1997-11-13 00:00:00,,1,0
-32197,NAD83 / MTM zone 17,1438,projected,4400,,4269,17717,,,Large and medium scale topographic mapping and engineering survey.,,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,1997-11-13 00:00:00,,1,0
-32198,NAD83 / Quebec Lambert,1368,projected,4499,,4269,19944,,,Large and medium scale topographic mapping and engineering survey.,,Service de la Cartographie; Minist�re des Ressources Naturelles; Quebec,EPSG,1999-10-20 00:00:00,,1,0
-32201,WGS 72 / UTM zone 1N,1873,projected,4400,,4322,16001,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32202,WGS 72 / UTM zone 2N,1875,projected,4400,,4322,16002,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32203,WGS 72 / UTM zone 3N,1877,projected,4400,,4322,16003,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32204,WGS 72 / UTM zone 4N,1879,projected,4400,,4322,16004,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32205,WGS 72 / UTM zone 5N,1881,projected,4400,,4322,16005,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32206,WGS 72 / UTM zone 6N,1883,projected,4400,,4322,16006,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32207,WGS 72 / UTM zone 7N,1885,projected,4400,,4322,16007,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32208,WGS 72 / UTM zone 8N,1887,projected,4400,,4322,16008,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32209,WGS 72 / UTM zone 9N,1889,projected,4400,,4322,16009,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32210,WGS 72 / UTM zone 10N,1891,projected,4400,,4322,16010,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32211,WGS 72 / UTM zone 11N,1893,projected,4400,,4322,16011,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32212,WGS 72 / UTM zone 12N,1895,projected,4400,,4322,16012,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32213,WGS 72 / UTM zone 13N,1897,projected,4400,,4322,16013,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32214,WGS 72 / UTM zone 14N,1899,projected,4400,,4322,16014,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32215,WGS 72 / UTM zone 15N,1901,projected,4400,,4322,16015,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32216,WGS 72 / UTM zone 16N,1903,projected,4400,,4322,16016,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32217,WGS 72 / UTM zone 17N,1905,projected,4400,,4322,16017,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32218,WGS 72 / UTM zone 18N,1907,projected,4400,,4322,16018,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32219,WGS 72 / UTM zone 19N,1909,projected,4400,,4322,16019,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32220,WGS 72 / UTM zone 20N,1911,projected,4400,,4322,16020,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32221,WGS 72 / UTM zone 21N,1913,projected,4400,,4322,16021,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32222,WGS 72 / UTM zone 22N,1915,projected,4400,,4322,16022,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32223,WGS 72 / UTM zone 23N,1917,projected,4400,,4322,16023,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32224,WGS 72 / UTM zone 24N,1919,projected,4400,,4322,16024,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32225,WGS 72 / UTM zone 25N,1921,projected,4400,,4322,16025,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32226,WGS 72 / UTM zone 26N,1923,projected,4400,,4322,16026,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32227,WGS 72 / UTM zone 27N,1925,projected,4400,,4322,16027,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32228,WGS 72 / UTM zone 28N,1927,projected,4400,,4322,16028,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32229,WGS 72 / UTM zone 29N,1929,projected,4400,,4322,16029,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32230,WGS 72 / UTM zone 30N,1931,projected,4400,,4322,16030,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32231,WGS 72 / UTM zone 31N,1933,projected,4400,,4322,16031,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32232,WGS 72 / UTM zone 32N,1935,projected,4400,,4322,16032,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32233,WGS 72 / UTM zone 33N,1937,projected,4400,,4322,16033,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32234,WGS 72 / UTM zone 34N,1939,projected,4400,,4322,16034,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32235,WGS 72 / UTM zone 35N,1941,projected,4400,,4322,16035,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32236,WGS 72 / UTM zone 36N,1943,projected,4400,,4322,16036,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32237,WGS 72 / UTM zone 37N,1945,projected,4400,,4322,16037,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32238,WGS 72 / UTM zone 38N,1947,projected,4400,,4322,16038,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32239,WGS 72 / UTM zone 39N,1949,projected,4400,,4322,16039,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32240,WGS 72 / UTM zone 40N,1951,projected,4400,,4322,16040,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32241,WGS 72 / UTM zone 41N,1953,projected,4400,,4322,16041,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32242,WGS 72 / UTM zone 42N,1955,projected,4400,,4322,16042,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32243,WGS 72 / UTM zone 43N,1957,projected,4400,,4322,16043,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32244,WGS 72 / UTM zone 44N,1959,projected,4400,,4322,16044,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32245,WGS 72 / UTM zone 45N,1961,projected,4400,,4322,16045,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32246,WGS 72 / UTM zone 46N,1963,projected,4400,,4322,16046,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32247,WGS 72 / UTM zone 47N,1965,projected,4400,,4322,16047,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32248,WGS 72 / UTM zone 48N,1967,projected,4400,,4322,16048,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32249,WGS 72 / UTM zone 49N,1969,projected,4400,,4322,16049,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32250,WGS 72 / UTM zone 50N,1971,projected,4400,,4322,16050,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32251,WGS 72 / UTM zone 51N,1973,projected,4400,,4322,16051,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32252,WGS 72 / UTM zone 52N,1975,projected,4400,,4322,16052,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32253,WGS 72 / UTM zone 53N,1977,projected,4400,,4322,16053,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32254,WGS 72 / UTM zone 54N,1979,projected,4400,,4322,16054,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32255,WGS 72 / UTM zone 55N,1981,projected,4400,,4322,16055,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32256,WGS 72 / UTM zone 56N,1983,projected,4400,,4322,16056,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32257,WGS 72 / UTM zone 57N,1985,projected,4400,,4322,16057,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32258,WGS 72 / UTM zone 58N,1987,projected,4400,,4322,16058,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32259,WGS 72 / UTM zone 59N,1989,projected,4400,,4322,16059,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32260,WGS 72 / UTM zone 60N,1991,projected,4400,,4322,16060,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32301,WGS 72 / UTM zone 1S,1874,projected,4400,,4322,16101,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32302,WGS 72 / UTM zone 2S,1876,projected,4400,,4322,16102,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32303,WGS 72 / UTM zone 3S,1878,projected,4400,,4322,16103,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32304,WGS 72 / UTM zone 4S,1880,projected,4400,,4322,16104,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32305,WGS 72 / UTM zone 5S,1882,projected,4400,,4322,16105,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32306,WGS 72 / UTM zone 6S,1884,projected,4400,,4322,16106,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32307,WGS 72 / UTM zone 7S,1886,projected,4400,,4322,16107,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32308,WGS 72 / UTM zone 8S,1888,projected,4400,,4322,16108,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32309,WGS 72 / UTM zone 9S,1890,projected,4400,,4322,16109,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32310,WGS 72 / UTM zone 10S,1892,projected,4400,,4322,16110,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32311,WGS 72 / UTM zone 11S,1894,projected,4400,,4322,16111,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32312,WGS 72 / UTM zone 12S,1896,projected,4400,,4322,16112,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32313,WGS 72 / UTM zone 13S,1898,projected,4400,,4322,16113,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32314,WGS 72 / UTM zone 14S,1900,projected,4400,,4322,16114,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32315,WGS 72 / UTM zone 15S,1902,projected,4400,,4322,16115,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32316,WGS 72 / UTM zone 16S,1904,projected,4400,,4322,16116,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32317,WGS 72 / UTM zone 17S,1906,projected,4400,,4322,16117,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32318,WGS 72 / UTM zone 18S,1908,projected,4400,,4322,16118,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32319,WGS 72 / UTM zone 19S,1910,projected,4400,,4322,16119,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32320,WGS 72 / UTM zone 20S,1912,projected,4400,,4322,16120,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32321,WGS 72 / UTM zone 21S,1914,projected,4400,,4322,16121,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32322,WGS 72 / UTM zone 22S,1916,projected,4400,,4322,16122,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32323,WGS 72 / UTM zone 23S,1918,projected,4400,,4322,16123,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32324,WGS 72 / UTM zone 24S,1920,projected,4400,,4322,16124,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32325,WGS 72 / UTM zone 25S,1922,projected,4400,,4322,16125,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32326,WGS 72 / UTM zone 26S,1924,projected,4400,,4322,16126,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32327,WGS 72 / UTM zone 27S,1926,projected,4400,,4322,16127,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32328,WGS 72 / UTM zone 28S,1928,projected,4400,,4322,16128,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32329,WGS 72 / UTM zone 29S,1930,projected,4400,,4322,16129,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32330,WGS 72 / UTM zone 30S,1932,projected,4400,,4322,16130,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32331,WGS 72 / UTM zone 31S,1934,projected,4400,,4322,16131,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32332,WGS 72 / UTM zone 32S,1936,projected,4400,,4322,16132,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32333,WGS 72 / UTM zone 33S,1938,projected,4400,,4322,16133,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32334,WGS 72 / UTM zone 34S,1940,projected,4400,,4322,16134,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32335,WGS 72 / UTM zone 35S,1942,projected,4400,,4322,16135,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32336,WGS 72 / UTM zone 36S,1944,projected,4400,,4322,16136,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32337,WGS 72 / UTM zone 37S,1946,projected,4400,,4322,16137,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32338,WGS 72 / UTM zone 38S,1948,projected,4400,,4322,16138,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32339,WGS 72 / UTM zone 39S,1950,projected,4400,,4322,16139,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32340,WGS 72 / UTM zone 40S,1952,projected,4400,,4322,16140,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32341,WGS 72 / UTM zone 41S,1954,projected,4400,,4322,16141,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32342,WGS 72 / UTM zone 42S,1956,projected,4400,,4322,16142,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32343,WGS 72 / UTM zone 43S,1958,projected,4400,,4322,16143,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32344,WGS 72 / UTM zone 44S,1960,projected,4400,,4322,16144,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32345,WGS 72 / UTM zone 45S,1962,projected,4400,,4322,16145,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32346,WGS 72 / UTM zone 46S,1964,projected,4400,,4322,16146,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32347,WGS 72 / UTM zone 47S,1966,projected,4400,,4322,16147,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32348,WGS 72 / UTM zone 48S,1968,projected,4400,,4322,16148,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32349,WGS 72 / UTM zone 49S,1970,projected,4400,,4322,16149,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32350,WGS 72 / UTM zone 50S,1972,projected,4400,,4322,16150,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32351,WGS 72 / UTM zone 51S,1974,projected,4400,,4322,16151,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32352,WGS 72 / UTM zone 52S,1976,projected,4400,,4322,16152,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32353,WGS 72 / UTM zone 53S,1978,projected,4400,,4322,16153,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32354,WGS 72 / UTM zone 54S,1980,projected,4400,,4322,16154,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32355,WGS 72 / UTM zone 55S,1982,projected,4400,,4322,16155,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32356,WGS 72 / UTM zone 56S,1984,projected,4400,,4322,16156,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32357,WGS 72 / UTM zone 57S,1986,projected,4400,,4322,16157,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32358,WGS 72 / UTM zone 58S,1988,projected,4400,,4322,16158,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32359,WGS 72 / UTM zone 59S,1990,projected,4400,,4322,16159,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32360,WGS 72 / UTM zone 60S,1992,projected,4400,,4322,16160,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32401,WGS 72BE / UTM zone 1N,1873,projected,4400,,4324,16001,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32402,WGS 72BE / UTM zone 2N,1876,projected,4400,,4324,16002,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32403,WGS 72BE / UTM zone 3N,1877,projected,4400,,4324,16003,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32404,WGS 72BE / UTM zone 4N,1879,projected,4400,,4324,16004,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32405,WGS 72BE / UTM zone 5N,1881,projected,4400,,4324,16005,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32406,WGS 72BE / UTM zone 6N,1883,projected,4400,,4324,16006,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32407,WGS 72BE / UTM zone 7N,1885,projected,4400,,4324,16007,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32408,WGS 72BE / UTM zone 8N,1887,projected,4400,,4324,16008,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32409,WGS 72BE / UTM zone 9N,1889,projected,4400,,4324,16009,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32410,WGS 72BE / UTM zone 10N,1891,projected,4400,,4324,16010,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32411,WGS 72BE / UTM zone 11N,1893,projected,4400,,4324,16011,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32412,WGS 72BE / UTM zone 12N,1895,projected,4400,,4324,16012,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32413,WGS 72BE / UTM zone 13N,1897,projected,4400,,4324,16013,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32414,WGS 72BE / UTM zone 14N,1899,projected,4400,,4324,16014,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32415,WGS 72BE / UTM zone 15N,1901,projected,4400,,4324,16015,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32416,WGS 72BE / UTM zone 16N,1903,projected,4400,,4324,16016,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32417,WGS 72BE / UTM zone 17N,1905,projected,4400,,4324,16017,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32418,WGS 72BE / UTM zone 18N,1907,projected,4400,,4324,16018,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32419,WGS 72BE / UTM zone 19N,1909,projected,4400,,4324,16019,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32420,WGS 72BE / UTM zone 20N,1911,projected,4400,,4324,16020,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32421,WGS 72BE / UTM zone 21N,1913,projected,4400,,4324,16021,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32422,WGS 72BE / UTM zone 22N,1915,projected,4400,,4324,16022,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32423,WGS 72BE / UTM zone 23N,1917,projected,4400,,4324,16023,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32424,WGS 72BE / UTM zone 24N,1919,projected,4400,,4324,16024,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32425,WGS 72BE / UTM zone 25N,1921,projected,4400,,4324,16025,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32426,WGS 72BE / UTM zone 26N,1923,projected,4400,,4324,16026,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32427,WGS 72BE / UTM zone 27N,1925,projected,4400,,4324,16027,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32428,WGS 72BE / UTM zone 28N,1927,projected,4400,,4324,16028,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32429,WGS 72BE / UTM zone 29N,1929,projected,4400,,4324,16029,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32430,WGS 72BE / UTM zone 30N,1931,projected,4400,,4324,16030,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32431,WGS 72BE / UTM zone 31N,1933,projected,4400,,4324,16031,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32432,WGS 72BE / UTM zone 32N,1935,projected,4400,,4324,16032,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32433,WGS 72BE / UTM zone 33N,1937,projected,4400,,4324,16033,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32434,WGS 72BE / UTM zone 34N,1939,projected,4400,,4324,16034,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32435,WGS 72BE / UTM zone 35N,1941,projected,4400,,4324,16035,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32436,WGS 72BE / UTM zone 36N,1943,projected,4400,,4324,16036,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32437,WGS 72BE / UTM zone 37N,1945,projected,4400,,4324,16037,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32438,WGS 72BE / UTM zone 38N,1947,projected,4400,,4324,16038,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32439,WGS 72BE / UTM zone 39N,1949,projected,4400,,4324,16039,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32440,WGS 72BE / UTM zone 40N,1951,projected,4400,,4324,16040,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32441,WGS 72BE / UTM zone 41N,1953,projected,4400,,4324,16041,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32442,WGS 72BE / UTM zone 42N,1955,projected,4400,,4324,16042,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32443,WGS 72BE / UTM zone 43N,1957,projected,4400,,4324,16043,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32444,WGS 72BE / UTM zone 44N,1959,projected,4400,,4324,16044,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32445,WGS 72BE / UTM zone 45N,1961,projected,4400,,4324,16045,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32446,WGS 72BE / UTM zone 46N,1963,projected,4400,,4324,16046,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32447,WGS 72BE / UTM zone 47N,1965,projected,4400,,4324,16047,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32448,WGS 72BE / UTM zone 48N,1993,projected,4400,,4324,16048,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32449,WGS 72BE / UTM zone 49N,1994,projected,4400,,4324,16049,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32450,WGS 72BE / UTM zone 50N,1971,projected,4400,,4324,16050,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32451,WGS 72BE / UTM zone 51N,1973,projected,4400,,4324,16051,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32452,WGS 72BE / UTM zone 52N,1975,projected,4400,,4324,16052,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32453,WGS 72BE / UTM zone 53N,1977,projected,4400,,4324,16053,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32454,WGS 72BE / UTM zone 54N,1979,projected,4400,,4324,16054,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32455,WGS 72BE / UTM zone 55N,1981,projected,4400,,4324,16055,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32456,WGS 72BE / UTM zone 56N,1983,projected,4400,,4324,16056,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32457,WGS 72BE / UTM zone 57N,1985,projected,4400,,4324,16057,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32458,WGS 72BE / UTM zone 58N,1987,projected,4400,,4324,16058,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32459,WGS 72BE / UTM zone 59N,1989,projected,4400,,4324,16059,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32460,WGS 72BE / UTM zone 60N,1991,projected,4400,,4324,16060,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32501,WGS 72BE / UTM zone 1S,1874,projected,4400,,4324,16101,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32502,WGS 72BE / UTM zone 2S,1876,projected,4400,,4324,16102,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32503,WGS 72BE / UTM zone 3S,1878,projected,4400,,4324,16103,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32504,WGS 72BE / UTM zone 4S,1880,projected,4400,,4324,16104,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32505,WGS 72BE / UTM zone 5S,1882,projected,4400,,4324,16105,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32506,WGS 72BE / UTM zone 6S,1884,projected,4400,,4324,16106,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32507,WGS 72BE / UTM zone 7S,1886,projected,4400,,4324,16107,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32508,WGS 72BE / UTM zone 8S,1888,projected,4400,,4324,16108,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32509,WGS 72BE / UTM zone 9S,1890,projected,4400,,4324,16109,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32510,WGS 72BE / UTM zone 10S,1892,projected,4400,,4324,16110,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32511,WGS 72BE / UTM zone 11S,1894,projected,4400,,4324,16111,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32512,WGS 72BE / UTM zone 12S,1896,projected,4400,,4324,16112,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32513,WGS 72BE / UTM zone 13S,1898,projected,4400,,4324,16113,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32514,WGS 72BE / UTM zone 14S,1900,projected,4400,,4324,16114,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32515,WGS 72BE / UTM zone 15S,1902,projected,4400,,4324,16115,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32516,WGS 72BE / UTM zone 16S,1904,projected,4400,,4324,16116,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32517,WGS 72BE / UTM zone 17S,1906,projected,4400,,4324,16117,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32518,WGS 72BE / UTM zone 18S,1908,projected,4400,,4324,16118,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32519,WGS 72BE / UTM zone 19S,1910,projected,4400,,4324,16119,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32520,WGS 72BE / UTM zone 20S,1912,projected,4400,,4324,16120,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32521,WGS 72BE / UTM zone 21S,1914,projected,4400,,4324,16121,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32522,WGS 72BE / UTM zone 22S,1916,projected,4400,,4324,16122,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32523,WGS 72BE / UTM zone 23S,1918,projected,4400,,4324,16123,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32524,WGS 72BE / UTM zone 24S,1920,projected,4400,,4324,16124,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32525,WGS 72BE / UTM zone 25S,1922,projected,4400,,4324,16125,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32526,WGS 72BE / UTM zone 26S,1924,projected,4400,,4324,16126,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32527,WGS 72BE / UTM zone 27S,1926,projected,4400,,4324,16127,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32528,WGS 72BE / UTM zone 28S,1928,projected,4400,,4324,16128,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32529,WGS 72BE / UTM zone 29S,1930,projected,4400,,4324,16129,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32530,WGS 72BE / UTM zone 30S,1932,projected,4400,,4324,16130,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32531,WGS 72BE / UTM zone 31S,1934,projected,4400,,4324,16131,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32532,WGS 72BE / UTM zone 32S,1936,projected,4400,,4324,16132,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32533,WGS 72BE / UTM zone 33S,1938,projected,4400,,4324,16133,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32534,WGS 72BE / UTM zone 34S,1940,projected,4400,,4324,16134,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32535,WGS 72BE / UTM zone 35S,1942,projected,4400,,4324,16135,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32536,WGS 72BE / UTM zone 36S,1944,projected,4400,,4324,16136,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32537,WGS 72BE / UTM zone 37S,1946,projected,4400,,4324,16137,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32538,WGS 72BE / UTM zone 38S,1948,projected,4400,,4324,16138,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32539,WGS 72BE / UTM zone 39S,1950,projected,4400,,4324,16139,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32540,WGS 72BE / UTM zone 40S,1952,projected,4400,,4324,16140,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32541,WGS 72BE / UTM zone 41S,1954,projected,4400,,4324,16141,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32542,WGS 72BE / UTM zone 42S,1956,projected,4400,,4324,16142,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32543,WGS 72BE / UTM zone 43S,1958,projected,4400,,4324,16143,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32544,WGS 72BE / UTM zone 44S,1960,projected,4400,,4324,16144,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32545,WGS 72BE / UTM zone 45S,1962,projected,4400,,4324,16145,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32546,WGS 72BE / UTM zone 46S,1964,projected,4400,,4324,16146,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32547,WGS 72BE / UTM zone 47S,1966,projected,4400,,4324,16147,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32548,WGS 72BE / UTM zone 48S,1968,projected,4400,,4324,16148,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32549,WGS 72BE / UTM zone 49S,1995,projected,4400,,4324,16149,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32550,WGS 72BE / UTM zone 50S,1972,projected,4400,,4324,16150,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32551,WGS 72BE / UTM zone 51S,1974,projected,4400,,4324,16151,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32552,WGS 72BE / UTM zone 52S,1976,projected,4400,,4324,16152,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32553,WGS 72BE / UTM zone 53S,1978,projected,4400,,4324,16153,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32554,WGS 72BE / UTM zone 54S,1980,projected,4400,,4324,16154,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32555,WGS 72BE / UTM zone 55S,1982,projected,4400,,4324,16155,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32556,WGS 72BE / UTM zone 56S,1984,projected,4400,,4324,16156,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32557,WGS 72BE / UTM zone 57S,1986,projected,4400,,4324,16157,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32558,WGS 72BE / UTM zone 58S,1988,projected,4400,,4324,16158,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32559,WGS 72BE / UTM zone 59S,1990,projected,4400,,4324,16159,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32560,WGS 72BE / UTM zone 60S,1992,projected,4400,,4324,16160,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32600,WGS 84 / UTM grid system (northern hemisphere),1998,projected,4400,,4326,16000,,,For strict use within zone boundaries,Use WGS 84 / UTM zone xx N (codes 32601-32660) for use outwith zone boundary or when easting is not prefixed by zone number.,EPSG,EPSG,2001-06-05 00:00:00,,1,0
-32601,WGS 84 / UTM zone 1N,2000,projected,4400,,4326,16001,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32602,WGS 84 / UTM zone 2N,2002,projected,4400,,4326,16002,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32603,WGS 84 / UTM zone 3N,2004,projected,4400,,4326,16003,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32604,WGS 84 / UTM zone 4N,2006,projected,4400,,4326,16004,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32605,WGS 84 / UTM zone 5N,2008,projected,4400,,4326,16005,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32606,WGS 84 / UTM zone 6N,2010,projected,4400,,4326,16006,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32607,WGS 84 / UTM zone 7N,2012,projected,4400,,4326,16007,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32608,WGS 84 / UTM zone 8N,2014,projected,4400,,4326,16008,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32609,WGS 84 / UTM zone 9N,2016,projected,4400,,4326,16009,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32610,WGS 84 / UTM zone 10N,2018,projected,4400,,4326,16010,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32611,WGS 84 / UTM zone 11N,2020,projected,4400,,4326,16011,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32612,WGS 84 / UTM zone 12N,2022,projected,4400,,4326,16012,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32613,WGS 84 / UTM zone 13N,2024,projected,4400,,4326,16013,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32614,WGS 84 / UTM zone 14N,2026,projected,4400,,4326,16014,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32615,WGS 84 / UTM zone 15N,2028,projected,4400,,4326,16015,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32616,WGS 84 / UTM zone 16N,2030,projected,4400,,4326,16016,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32617,WGS 84 / UTM zone 17N,2032,projected,4400,,4326,16017,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32618,WGS 84 / UTM zone 18N,2034,projected,4400,,4326,16018,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32619,WGS 84 / UTM zone 19N,2036,projected,4400,,4326,16019,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32620,WGS 84 / UTM zone 20N,2038,projected,4400,,4326,16020,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32621,WGS 84 / UTM zone 21N,2040,projected,4400,,4326,16021,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32622,WGS 84 / UTM zone 22N,2042,projected,4400,,4326,16022,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32623,WGS 84 / UTM zone 23N,2044,projected,4400,,4326,16023,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32624,WGS 84 / UTM zone 24N,2046,projected,4400,,4326,16024,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32625,WGS 84 / UTM zone 25N,2048,projected,4400,,4326,16025,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32626,WGS 84 / UTM zone 26N,2050,projected,4400,,4326,16026,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32627,WGS 84 / UTM zone 27N,2052,projected,4400,,4326,16027,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32628,WGS 84 / UTM zone 28N,2054,projected,4400,,4326,16028,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32629,WGS 84 / UTM zone 29N,2056,projected,4400,,4326,16029,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32630,WGS 84 / UTM zone 30N,2058,projected,4400,,4326,16030,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32631,WGS 84 / UTM zone 31N,2060,projected,4400,,4326,16031,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32632,WGS 84 / UTM zone 32N,2062,projected,4400,,4326,16032,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32633,WGS 84 / UTM zone 33N,2064,projected,4400,,4326,16033,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32634,WGS 84 / UTM zone 34N,2066,projected,4400,,4326,16034,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32635,WGS 84 / UTM zone 35N,2068,projected,4400,,4326,16035,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32636,WGS 84 / UTM zone 36N,2070,projected,4400,,4326,16036,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32637,WGS 84 / UTM zone 37N,2072,projected,4400,,4326,16037,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32638,WGS 84 / UTM zone 38N,2074,projected,4400,,4326,16038,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32639,WGS 84 / UTM zone 39N,2076,projected,4400,,4326,16039,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32640,WGS 84 / UTM zone 40N,2078,projected,4400,,4326,16040,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32641,WGS 84 / UTM zone 41N,2080,projected,4400,,4326,16041,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32642,WGS 84 / UTM zone 42N,2082,projected,4400,,4326,16042,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32643,WGS 84 / UTM zone 43N,2084,projected,4400,,4326,16043,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32644,WGS 84 / UTM zone 44N,2086,projected,4400,,4326,16044,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32645,WGS 84 / UTM zone 45N,2088,projected,4400,,4326,16045,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32646,WGS 84 / UTM zone 46N,2090,projected,4400,,4326,16046,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2002-06-22 00:00:00,2002.151,1,0
-32647,WGS 84 / UTM zone 47N,2092,projected,4400,,4326,16047,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2002-06-22 00:00:00,2002.151,1,0
-32648,WGS 84 / UTM zone 48N,2094,projected,4400,,4326,16048,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2002-06-22 00:00:00,2002.151,1,0
-32649,WGS 84 / UTM zone 49N,2096,projected,4400,,4326,16049,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2002-06-22 00:00:00,2002.151,1,0
-32650,WGS 84 / UTM zone 50N,2098,projected,4400,,4326,16050,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2002-06-22 00:00:00,2002.151,1,0
-32651,WGS 84 / UTM zone 51N,2100,projected,4400,,4326,16051,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2002-06-22 00:00:00,2002.151,1,0
-32652,WGS 84 / UTM zone 52N,2102,projected,4400,,4326,16052,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2002-06-22 00:00:00,2002.151,1,0
-32653,WGS 84 / UTM zone 53N,2104,projected,4400,,4326,16053,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32654,WGS 84 / UTM zone 54N,2106,projected,4400,,4326,16054,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32655,WGS 84 / UTM zone 55N,2108,projected,4400,,4326,16055,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32656,WGS 84 / UTM zone 56N,2110,projected,4400,,4326,16056,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32657,WGS 84 / UTM zone 57N,2112,projected,4400,,4326,16057,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32658,WGS 84 / UTM zone 58N,2114,projected,4400,,4326,16058,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32659,WGS 84 / UTM zone 59N,2116,projected,4400,,4326,16059,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32660,WGS 84 / UTM zone 60N,2118,projected,4400,,4326,16060,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32661,WGS 84 / UPS North,1996,projected,4400,,4326,16061,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1996-09-12 00:00:00,,1,0
-32662,WGS 84 / Plate Carree,1262,projected,4499,,4326,19968,,,Graticule coordinates expressed in simple Cartesian form.,Origin is at intersection of equator and Greenwich meridian. Note: this is not the same as plotting unrectified graticule coordinates on a computer display using the so-called pseudo Plate Carr�e method: here the grid units are metres.,EPSG,EPSG,2001-11-06 00:00:00,,1,0
-32700,WGS 84 / UTM grid system (southern hemisphere),1999,projected,4400,,4326,16100,,,For strict use within zone boundaries,Use WGS 84 / UTM zone xx S (codes 32701-32760) for use outwith zone boundary or when easting is not prefixed by zone number.,EPSG,EPSG,2001-06-05 00:00:00,,1,0
-32701,WGS 84 / UTM zone 1S,2001,projected,4400,,4326,16101,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32702,WGS 84 / UTM zone 2S,2003,projected,4400,,4326,16102,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32703,WGS 84 / UTM zone 3S,2005,projected,4400,,4326,16103,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32704,WGS 84 / UTM zone 4S,2007,projected,4400,,4326,16104,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32705,WGS 84 / UTM zone 5S,2009,projected,4400,,4326,16105,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32706,WGS 84 / UTM zone 6S,2011,projected,4400,,4326,16106,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32707,WGS 84 / UTM zone 7S,2013,projected,4400,,4326,16107,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32708,WGS 84 / UTM zone 8S,2015,projected,4400,,4326,16108,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32709,WGS 84 / UTM zone 9S,2017,projected,4400,,4326,16109,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32710,WGS 84 / UTM zone 10S,2019,projected,4400,,4326,16110,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32711,WGS 84 / UTM zone 11S,2021,projected,4400,,4326,16111,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32712,WGS 84 / UTM zone 12S,2023,projected,4400,,4326,16112,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32713,WGS 84 / UTM zone 13S,2025,projected,4400,,4326,16113,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32714,WGS 84 / UTM zone 14S,2027,projected,4400,,4326,16114,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32715,WGS 84 / UTM zone 15S,2029,projected,4400,,4326,16115,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32716,WGS 84 / UTM zone 16S,2031,projected,4400,,4326,16116,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32717,WGS 84 / UTM zone 17S,2033,projected,4400,,4326,16117,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32718,WGS 84 / UTM zone 18S,2035,projected,4400,,4326,16118,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32719,WGS 84 / UTM zone 19S,2037,projected,4400,,4326,16119,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32720,WGS 84 / UTM zone 20S,2039,projected,4400,,4326,16120,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32721,WGS 84 / UTM zone 21S,2041,projected,4400,,4326,16121,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32722,WGS 84 / UTM zone 22S,2043,projected,4400,,4326,16122,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32723,WGS 84 / UTM zone 23S,2045,projected,4400,,4326,16123,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32724,WGS 84 / UTM zone 24S,2047,projected,4400,,4326,16124,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32725,WGS 84 / UTM zone 25S,2049,projected,4400,,4326,16125,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32726,WGS 84 / UTM zone 26S,2051,projected,4400,,4326,16126,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32727,WGS 84 / UTM zone 27S,2053,projected,4400,,4326,16127,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32728,WGS 84 / UTM zone 28S,2055,projected,4400,,4326,16128,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32729,WGS 84 / UTM zone 29S,2057,projected,4400,,4326,16129,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32730,WGS 84 / UTM zone 30S,2059,projected,4400,,4326,16130,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32731,WGS 84 / UTM zone 31S,2061,projected,4400,,4326,16131,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32732,WGS 84 / UTM zone 32S,2063,projected,4400,,4326,16132,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32733,WGS 84 / UTM zone 33S,2065,projected,4400,,4326,16133,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32734,WGS 84 / UTM zone 34S,2067,projected,4400,,4326,16134,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32735,WGS 84 / UTM zone 35S,2069,projected,4400,,4326,16135,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32736,WGS 84 / UTM zone 36S,2071,projected,4400,,4326,16136,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32737,WGS 84 / UTM zone 37S,2073,projected,4400,,4326,16137,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32738,WGS 84 / UTM zone 38S,2075,projected,4400,,4326,16138,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32739,WGS 84 / UTM zone 39S,2077,projected,4400,,4326,16139,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32740,WGS 84 / UTM zone 40S,2079,projected,4400,,4326,16140,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32741,WGS 84 / UTM zone 41S,2081,projected,4400,,4326,16141,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32742,WGS 84 / UTM zone 42S,2083,projected,4400,,4326,16142,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32743,WGS 84 / UTM zone 43S,2085,projected,4400,,4326,16143,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32744,WGS 84 / UTM zone 44S,2087,projected,4400,,4326,16144,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32745,WGS 84 / UTM zone 45S,2089,projected,4400,,4326,16145,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32746,WGS 84 / UTM zone 46S,2091,projected,4400,,4326,16146,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32747,WGS 84 / UTM zone 47S,2093,projected,4400,,4326,16147,,,Large and medium scale topographic mapping and engineering survey.Large and medium scale topographic mapping and engineering survey.,,,EPSG,2002-06-22 00:00:00,2002.151,1,0
-32748,WGS 84 / UTM zone 48S,2095,projected,4400,,4326,16148,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2002-06-22 00:00:00,2002.151,1,0
-32749,WGS 84 / UTM zone 49S,2097,projected,4400,,4326,16149,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2002-06-22 00:00:00,2002.151,1,0
-32750,WGS 84 / UTM zone 50S,2099,projected,4400,,4326,16150,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2002-06-22 00:00:00,2002.151,1,0
-32751,WGS 84 / UTM zone 51S,2101,projected,4400,,4326,16151,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2002-06-22 00:00:00,2002.151,1,0
-32752,WGS 84 / UTM zone 52S,2103,projected,4400,,4326,16152,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2002-06-22 00:00:00,2002.151,1,0
-32753,WGS 84 / UTM zone 53S,2105,projected,4400,,4326,16153,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2002-06-22 00:00:00,2002.151,1,0
-32754,WGS 84 / UTM zone 54S,2107,projected,4400,,4326,16154,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,2002-06-22 00:00:00,2002.151,1,0
-32755,WGS 84 / UTM zone 55S,2109,projected,4400,,4326,16155,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32756,WGS 84 / UTM zone 56S,2111,projected,4400,,4326,16156,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32757,WGS 84 / UTM zone 57S,2113,projected,4400,,4326,16157,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32758,WGS 84 / UTM zone 58S,2115,projected,4400,,4326,16158,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32759,WGS 84 / UTM zone 59S,2117,projected,4400,,4326,16159,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32760,WGS 84 / UTM zone 60S,2119,projected,4400,,4326,16160,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1995-06-02 00:00:00,,1,0
-32761,WGS 84 / UPS South,1997,projected,4400,,4326,16161,,,Large and medium scale topographic mapping and engineering survey.,,,EPSG,1996-09-12 00:00:00,,1,0
-32766,WGS 84 / TM 36 SE,1726,projected,4400,,4326,16636,,,Used for oil exploration by BP Mozambique for Offshore Zambezi block oil exploration.,,BP Mozambique.,EPSG,1998-11-11 00:00:00,,1,0
diff --git a/src/tiff/csv/coordinate_system.csv b/src/tiff/csv/coordinate_system.csv
deleted file mode 100644
index bd6c254..0000000
--- a/src/tiff/csv/coordinate_system.csv
+++ /dev/null
@@ -1,38 +0,0 @@
-"COORD_SYS_CODE","COORD_SYS_NAME","COORD_SYS_TYPE","DIMENSION","REMARKS","INFORMATION_SOURCE","DATA_SOURCE","REVISION_DATE","CHANGE_ID","DEPRECATED"
-4400,"Cartesian 2D CS.  Axes: easting, northing (E,N). Orientations: east, north.  UoM: m.",Cartesian,2,Used in projected and engineering coordinate reference systems.,EPSG,EPSG,2001-04-29 00:00:00,,0
-4401,"Cartesian 2D CS.  Axes: easting, northing (E,N). Orientations: east, north.  UoM: chBnB.",Cartesian,2,Used in projected and engineering coordinate reference systems.,EPSG,EPSG,2001-04-29 00:00:00,,0
-4402,"Cartesian 2D CS.  Axes: easting, northing (E,N). Orientations: east, north.  UoM: chSe.",Cartesian,2,Used in projected and engineering coordinate reference systems.,EPSG,EPSG,2001-04-29 00:00:00,,0
-4403,"Cartesian 2D CS.  Axes: easting, northing (E,N). Orientations: east, north.  UoM: ftCla.",Cartesian,2,Used in projected and engineering coordinate reference systems.,EPSG,EPSG,2001-04-29 00:00:00,,0
-4404,"Cartesian 2D CS.  Axes: easting, northing (E,N). Orientations: east, north.  UoM: ftGC.",Cartesian,2,Used in projected and engineering coordinate reference systems.,EPSG,EPSG,2001-04-29 00:00:00,,0
-4405,"Cartesian 2D CS.  Axes: easting, northing (E,N). Orientations: east, north.  UoM: ftSe.",Cartesian,2,Used in projected and engineering coordinate reference systems.,EPSG,EPSG,2001-04-29 00:00:00,,0
-4406,"Cartesian 2D CS.  Axes: easting, northing (E,N). Orientations: east, north.  UoM: km.",Cartesian,2,Used in projected and engineering coordinate reference systems.,EPSG,EPSG,2001-04-29 00:00:00,,0
-4407,"Cartesian 2D CS.  Axes: easting, northing (E,N). Orientations: east, north.  UoM: lkCla.",Cartesian,2,Used in projected and engineering coordinate reference systems.,EPSG,EPSG,2001-04-29 00:00:00,,0
-4408,"Cartesian 2D CS.  Axes: easting, northing (E,N). Orientations: east, north.  UoM: ydInd.",Cartesian,2,Used in projected and engineering coordinate reference systems.,EPSG,EPSG,2001-04-29 00:00:00,,0
-4409,"Cartesian 2D CS.  Axes: easting, northing (E,N). Orientations: east, north.  UoM: ydSe.",Cartesian,2,Used in projected and engineering coordinate reference systems.,EPSG,EPSG,2001-04-29 00:00:00,,0
-4495,"Cartesian 2D CS.  Axes: easting, northing (X,Y). Orientations: east, north.  UoM: ft.",Cartesian,2,Used in projected and engineering coordinate reference systems.,EPSG,EPSG,2001-11-06 00:00:00,,0
-4496,"Cartesian 2D CS.  Axes: easting, northing [E(X),N(Y)]. Orientations: east, north.  UoM: m.",Cartesian,2,Used in projected and engineering coordinate reference systems.,EPSG,EPSG,2001-04-29 00:00:00,,0
-4497,"Cartesian 2D CS.  Axes: easting, northing (X,Y). Orientations: east, north.  UoM: ftUS.",Cartesian,2,Used in projected and engineering coordinate reference systems.,EPSG,EPSG,2001-04-29 00:00:00,,0
-4498,"Cartesian 2D CS.  Axes: easting, northing (Y,X). Orientations: east, north.  UoM: m.",Cartesian,2,Used in projected and engineering coordinate reference systems.,EPSG,EPSG,2001-04-29 00:00:00,,0
-4499,"Cartesian 2D CS.  Axes: easting, northing (X,Y). Orientations: east, north.  UoM: m.",Cartesian,2,Used in projected and engineering coordinate reference systems.,EPSG,EPSG,2001-04-29 00:00:00,,0
-4500,"Cartesian 2D CS.  Axes: northing, easting (N,E). Orientations: north, east.  UoM: m.",Cartesian,2,Used in projected and engineering coordinate reference systems.,EPSG,EPSG,2001-04-29 00:00:00,,0
-4501,"Cartesian 2D CS.  Axes: northing, westing (N,E). Orientations: north, west.  UoM: m.",Cartesian,2,Used in Danish projected coordinate reference systems. Note that second axis has abbreviation E but is positive west.,EPSG,EPSG,2002-01-26 00:00:00,,0
-4530,"Cartesian 2D CS.  Axes: northing, easting (X,Y). Orientations: north, east.  UoM: m.",Cartesian,2,Used in projected and engineering coordinate reference systems.,EPSG,EPSG,2001-04-29 00:00:00,,0
-4531,"Cartesian 2D CS.  Axes: northing, easting (x,y). Orientations: north, east.  UoM: m.",Cartesian,2,Used in projected and engineering coordinate reference systems.,EPSG,EPSG,2001-04-29 00:00:00,,0
-4532,"Cartesian 2D CS.  Axes: northing, easting (Y,X). Orientations: north, east.  UoM: m.",Cartesian,2,Used in projected and engineering coordinate reference systems.,EPSG,EPSG,2001-04-29 00:00:00,,0
-6401,"Ellipsoidal 3D CS. Axes: latitude, longitude, ellipsoidal height. Orientations: east, north, up.  UoM: DMSH,metres.",ellipsoidal,3,Used in geographic 3D coordinate reference systems.,EPSG,EPSG,2001-01-19 00:00:00,,0
-6402,"Ellipsoidal 2D CS. Axes: latitude, longitude. Orientations: east, north.  UoM: DMSH.",ellipsoidal,2,Used in geographic 2D coordinate reference systems.,EPSG,EPSG,2001-01-19 00:00:00,,0
-6403,"Ellipsoidal 2D CS. Axes: latitude, longitude. Orientations: east, north.  UoM: grads.",ellipsoidal,2,Used in geographic 2D coordinate reference systems.,EPSG,EPSG,2001-01-19 00:00:00,,0
-6404,"Spherical 3D CS. Axes: latitude, longitude, radius. Orientations: north, east, up.  UoM: degrees, degrees, metres.",spherical,3,Used in geocentric 3D coordinate reference systems.,Open GIS Consortium,EPSG,2002-06-22 00:00:00,2002.30,0
-6497,Gravity-related CS. Axis: height (H). Orientation: up.  UoM: ftUS.,gravity-related,1,Used in vertical coordinate reference systems.,EPSG,EPSG,2001-01-19 00:00:00,,0
-6498,Gravity-related CS. Axis: depth (D). Orientation: down.  UoM: m.,gravity-related,1,Used in vertical coordinate reference systems.,EPSG,EPSG,2001-01-19 00:00:00,,0
-6499,Gravity-related CS. Axis: height (H). Orientation: up.  UoM: m.,gravity-related,1,Used in vertical coordinate reference systems.,EPSG,EPSG,2001-01-19 00:00:00,,0
-6500,"Earth centred, earth fixed, righthanded 3D coordinate system, consisting of 3 orthogonal axes with X and Y axes in the equatorial plane,  positive Z-axis parallel to mean earth rotation axis and pointing towards North Pole. UoM: m.",Cartesian,3,"Cartesian 3D CS, used in geocentric coordinate reference systems.",EPSG,EPSG,2001-01-19 00:00:00,,0
-6501,"Cartesian 2D CS.  Axes: southing, westing (X,Y). Orientations: south, west.  UoM: m.",Cartesian,2,Used in projected and engineering coordinate reference systems.,EPSG,EPSG,2001-04-29 00:00:00,,0
-6502,"Cartesian 2D CS.  Axes: westing, southing (Y,X). Orientations: west, south.  UoM: GLM.",Cartesian,2,Used in projected and engineering coordinate reference systems.,EPSG,EPSG,2001-04-29 00:00:00,,0
-6503,"Cartesian 2D CS.  Axes: westing, southing (Y,X). Orientations: west, south.  UoM: m.",Cartesian,2,Used in projected and engineering coordinate reference systems.,EPSG,EPSG,2001-04-29 00:00:00,,0
-6504,"Cartesian 2D CS.  Axes: plant N, Plant E (n,e). Orientations: northwest, northeast.  UoM: m.",Cartesian,2,Used in engineering coordinate reference systems.,EPSG,EPSG,2001-01-19 00:00:00,,0
-6505,"Cartesian 2D CS.  Axes: 1st local axis, 2nd local axis (n,e). Orientations: northwest, northeast.  UoM: m.",Cartesian,2,Used in engineering coordinate reference systems.,EPSG,EPSG,2001-01-19 00:00:00,,0
-6506,"Cartesian 2D CS.  Axes: 1st local axis, 2nd local axis (I,J). Orientations: ese/nne.  UoM: 165 x 330 ftUS.",Cartesian,2,Used in engineering coordinate reference systems for seismic bin grids.,EPSG,EPSG,2001-01-19 00:00:00,,0
-6507,"Cartesian 2D CS.  Axes: 1st local axis, 2nd local axis (X,Y). Orientations: north, west.  UoM: m.",Cartesian,2,Used in engineering coordinate reference systems.,EPSG,EPSG,2001-01-19 00:00:00,,0
-6508,"Cartesian 2D CS.  Axes: bin grid J, bin grid I (J,I). Orientations: nne/ese.  UoM: 12.5 x 25m.",Cartesian,2,Used in engineering coordinate reference systems for seismic bin grids.,EPSG,EPSG,2001-01-19 00:00:00,,0
-6509,"Cartesian 2D CS.  Axes: southing, westing (P,M). Orientations: south, west.  UoM: m.",Cartesian,2,Used in old projected coordinate reference systems in Portugal.,EPSG,EPSG,2002-07-13 00:00:00,,0
diff --git a/src/tiff/csv/datum.csv b/src/tiff/csv/datum.csv
deleted file mode 100644
index de0f951..0000000
--- a/src/tiff/csv/datum.csv
+++ /dev/null
@@ -1,332 +0,0 @@
-"DATUM_CODE","DATUM_NAME","DATUM_TYPE","ORIGIN_DESCRIPTION","REALIZATION_EPOCH","ELLIPSOID_CODE","PRIME_MERIDIAN_CODE","AREA_OF_USE_CODE","DATUM_SCOPE","REMARKS","INFORMATION_SOURCE","DATA_SOURCE","REVISION_DATE","CHANGE_ID","DEPRECATED"
-5100,Mean Sea Level,vertical,,,,,1262,Hydrography.,"msl has geographic and temporal components.  Users are advised to not use this generic vertical datum but to define specific instances of msl based on knowledge of these components; for instance ""msl at xxx during 19yy"".",,EPSG,1996-04-12 00:00:00,,0
-5101,Ordnance Datum Newlyn,vertical,,,,,1264,"Topographic mapping, geodesy.",,,EPSG,1996-10-18 00:00:00,,0
-5102,National Geodetic Vertical Datum 1929,vertical,26 tide gauges in the US and Canada.,1929,,,1323,"Topographic mapping, geodesy.",,,EPSG,1996-09-12 00:00:00,,0
-5103,North American Vertical Datum 1988,vertical,"Father's Point, Rimouski, Quebec.",1988,,,1325,"Topographic mapping, geodesy.",,,EPSG,1996-09-12 00:00:00,,0
-5104,Yellow Sea 1956,vertical,2 years tide readings at Qingdao.,1956,,,1067,"Topographic mapping, geodesy.",Superseded by Yellow Sea 1985 datum.,,EPSG,2002-06-22 00:00:00,2002.16,0
-5105,Baltic Sea,vertical,Average water level at Kronshtadt,,,,1284,"Topographic mapping, geodesy.",,,EPSG,1996-09-12 00:00:00,,0
-5106,Caspian Sea,vertical,Defined as -28.0m Baltic datum,,,,1291,Hydrography.,,,EPSG,1996-09-12 00:00:00,,0
-5107,Nivellement general de la France,vertical,Mean sea level at Marseille,,,,1326,"Topographic mapping, geodesy.",The CNIG states that NGF is a general term applying to all vertical network readjustments of France and recommends more specific terminology. See codes 5118-5120.,"Conseil National de l'Information Geographique groupe de travail ""Reseaux de Nivellement"" recommendations v5.1 April 1994.",EPSG,1996-09-12 00:00:00,,1
-5109,Normaal Amsterdams Peil,vertical,,,,,1172,"Topographic mapping, geodesy, hydrography.",,Nederlandse Commissie voor Geodesie publication 30; 1993,EPSG,1996-09-12 00:00:00,,0
-5110,Oostende,vertical,Mean low water during 1958,1958,,,1044,"Topographic mapping, geodesy.",,Nederlandse Commissie voor Geodesie publication 30; 1993,EPSG,1996-09-12 00:00:00,,0
-5111,Australian Height Datum,vertical,MSL 1966-68 at 30 gauges around coast.,1968,,,1281,"Topographic mapping, geodesy.",,http://www.auslig.gov.au/geodesy,EPSG,1996-09-12 00:00:00,,0
-5112,Australian Height Datum (Tasmania),vertical,MSL 1972 at Hobart and Burnie.,1972,,,1282,"Topographic mapping, geodesy.",,,EPSG,1996-09-12 00:00:00,,0
-5113,Sea Level,vertical,,,,,1262,Hydrography.,An unspecified local vertical datum not recommended for use.,,EPSG,1996-09-12 00:00:00,,0
-5114,Canadian Vertical Datum of 1928,vertical,,1928,,,1289,"Topographic mapping, geodesy.",,,EPSG,1996-12-12 00:00:00,,0
-5115,Piraeus Harbour 1986,vertical,MSL determined during 1986.,1986,,,1106,"Topographic mapping, geodesy.",,Geodesy Department; Public Pertoleum Corporation of Greece,EPSG,1997-06-16 00:00:00,,0
-5116,Helsinki 1960,vertical,MSL at Helsinki during 1960.,1960,,,1095,"Topographic mapping, geodesy.",,www.nls.fi/maa/papers/kkj.html,EPSG,1997-07-22 00:00:00,,0
-5117,Rikets hoghtsystem 1970,vertical,,1970,,,1225,"Topographic mapping, geodesy.",,National Land Survey of Sweden,EPSG,1997-11-13 00:00:00,,0
-5118,Nivellement general de la France - Lalle,vertical,Mean sea level at Marseille.,,,,1326,"Geodesy, topographic mapping, engineering survey.",,"Conseil National de l'Information Geographique groupe de travail ""Reseaux de Nivellement"" recommendations v5.1 April 1994.",EPSG,1997-11-13 00:00:00,2001.47,0
-5119,Nivellement general de la France - IGN69,vertical,Mean sea level at Marseille.,1969,,,1326,"Geodesy, topographic mapping, engineering survey.",,"Conseil National de l'Information Geographique groupe de travail ""Reseaux de Nivellement"" recommendations v5.1 April 1994.",EPSG,1997-11-13 00:00:00,2001.47,0
-5120,Nivellement general de la France - IGN78,vertical,,1978,,,1327,"Geodesy, topographic mapping, engineering survey.",,"Conseil National de l'Information Geographique groupe de travail ""Reseaux de Nivellement"" recommendations v5.1 April 1994.",EPSG,1997-11-13 00:00:00,2001.47,0
-5121,Maputo,vertical,Mean sea level at Maputo.,,,,1167,Topographic mapping.,,Direc��o Nacional de Geografia e Cadastral (DINAGECA).,EPSG,1998-04-16 00:00:00,,0
-5122,Japanese Standard Levelling Datum 1949,vertical,24.4140 metres above mean sea level Tokyo Bay.,1949,,,1129,"Topographic mapping, geodesy.",,Ministry of Construction; Japan.  http://vldb.gsi.go.jp/sokuchi/datum/tokyodatum.html,EPSG,2002-06-22 00:00:00,2002.08,0
-5123,PDO Height Datum 1993,vertical,,1993,,,1183,Oil industry mapping.,Misclosure between Muscat and Salalah less than .5 meters with differences from of up to 5 meters from old Fahud Datum.  The PHD93 adjustment was initially known as the Spine.  Supercedes Fahud Vertical Datum (Code 5124) from 1993.,Petroleum Development Oman,EPSG,1999-04-22 00:00:00,,0
-5124,Fahud Height Datum,vertical,,,,,1183,Oil industry mapping.,Superceded by PHD93 Datum (Code 5123) in 1993.  Based on reciprocal trigonometric heighting based on single MSL determination at Mina Al Fahal.,Petroleum Development Oman,EPSG,1999-04-22 00:00:00,,0
-5125,Ha Tien 1960,vertical,,1960,,,1302,"Topographic mapping, geodesy.",In Vietnam replaced by Hon Dau in 1992.,,EPSG,1999-10-20 00:00:00,,0
-5126,Hon Dau 1992,vertical,,1992,,,1252,"Topographic mapping, geodesy.",Supersedes Ha Tien in Vietnam.,,EPSG,1999-10-20 00:00:00,,0
-5127,Landesnivellement 1902,vertical,Origin at Repere Pierre du Niton (RPN) 373.6 metres above msl derived at Marseille.,1902,,,1286,"Topographic mapping, geodesy.",,Bundesamt f�r Landestopographie,EPSG,1999-10-20 00:00:00,,0
-5128,Landeshohennetz 1995,vertical,Origin at Repere Pierre du Niton (RPN) 373.6 metres above msl derived at Marseille.,1995,,,1286,"Geodesy, cadastre, topographic mapping, engineering survey.",,Bundesamt f�r Landestopographie,EPSG,1999-10-20 00:00:00,,0
-5129,European Vertical Reference Frame 2000,vertical,Geopotential number at Normaal Amsterdams Peil is zero.,2000,,,1299,Geodesy.,Realised by geopotential numbers and normal heights of the United European Levelling Network.,,EPSG,2000-10-19 00:00:00,,0
-5130,Malin Head,vertical,Mean sea level between January 1960 and December 1969.,1970,,,1305,Topographic mapping,,Ordnance Survey Ireland,EPSG,2001-11-06 00:00:00,,0
-5131,Belfast,vertical,"Mean sea level between 1951 and 1956 at Clarendon Dock, Belfast.",1957,,,2530,Large scale topographic mapping,,Ordnance Survey Northern Ireland,EPSG,2001-11-06 00:00:00,,0
-5132,Dansk Normal Nul,vertical,,,,,1080,Topographic mapping and engineering survey,,Kort & Matrikelstyrelsen,EPSG,2001-11-06 00:00:00,,0
-5133,AIOC 1995,vertical,Average level of Caspian Sea at the Oil Rocks tide gauge June-September 1995.,1995,,,2592,Oil industry mapping.,AIOC 1995 datum is 1.7m above Caspian datum and 26.3m below Baltic datum.,BP,EPSG,2002-02-12 00:00:00,,0
-5134,Black Sea,vertical,,,,,1102,Hydrographic surveying and since break-up of Former Soviet Union also topographic mapping.,Black Sea datum is 0.4m below Baltic datum.,BP,EPSG,2002-02-12 00:00:00,,0
-5135,Hong Kong Principal Datum,vertical,"1.23m below the mean of 19 years (1965-83) observations of tide levels at North Point, Victoria Harbour.",1980,,,1118,"Geodesy, engineering survey, cadastre.",,"Survey and Mapping Office, Lands Department. Http://www.info.gov.hk/landsd/mapping/tindex.htm",EPSG,2002-06-22 00:00:00,,0
-5136,Hong Kong Chart Datum,vertical,Approximates to Lowest Astronomic Tide level (LAT).,,,,1118,Hydrographic survey and charting.,Chart datum is 0.15 metres below Hong Kong Principal Datum (code 5135) and 1.38m below MSL at Quarry Bay.,"Survey and Mapping Office, Lands Department. Http://www.info.gov.hk/landsd/mapping/tindex.htm",EPSG,2002-06-22 00:00:00,,0
-5137,Yellow Sea 1985,vertical,20 years tide readings at Qingdao.,1985,,,1067,"Topographic mapping, geodesy.",Supersedes Yellow Sea 1956 datum.,Guangdong Province Land Resource Information Centre,EPSG,2002-06-22 00:00:00,,0
-6001,Not specified (based on Airy 1830 ellipsoid),geodetic,,,7001,8901,1263,Not a valid datum.,Included for coordinate reference systems where datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0
-6002,Not specified (based on Airy Modified 1849 ellipsoid),geodetic,,,7002,8901,1263,Not a valid datum.,Included for coordinate reference systems where datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0
-6003,Not specified (based on Australian National Spheroid),geodetic,,,7003,8901,1263,Not a valid datum.,Included for coordinate reference systems where datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0
-6004,Not specified (based on Bessel 1841 ellipsoid),geodetic,,,7004,8901,1263,Not a valid datum.,Included for coordinate reference systems where datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0
-6005,Not specified (based on Bessel Modified ellipsoid),geodetic,,,7005,8901,1263,Not a valid datum.,Included for coordinate reference systems where datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0
-6006,Not specified (based on Bessel Namibia ellipsoid),geodetic,,,7046,8901,1263,Not a valid datum.,Included for coordinate reference systems where datum is unknown.,EPSG,EPSG,2001-01-21 00:00:00,96.08  2000.42  2001.15,0
-6007,Not specified (based on Clarke 1858 ellipsoid),geodetic,,,7007,8901,1263,Not a valid datum.,Included for coordinate reference systems where datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0
-6008,Not specified (based on Clarke 1866 ellipsoid),geodetic,,,7008,8901,1263,Not a valid datum.,Included for coordinate reference systems where datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0
-6009,Not specified (based on Clarke 1866 Michigan ellipsoid),geodetic,,,7009,8901,1263,Not a valid datum.,Included for coordinate reference systems where datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0
-6010,Not specified (based on Clarke 1880 (Benoit) ellipsoid),geodetic,,,7010,8901,1263,Not a valid datum.,Included for coordinate reference systems where datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0
-6011,Not specified (based on Clarke 1880 (IGN) ellipsoid),geodetic,,,7011,8901,1263,Not a valid datum.,Included for coordinate reference systems where datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0
-6012,Not specified (based on Clarke 1880 (RGS) ellipsoid),geodetic,,,7012,8901,1263,Not a valid datum.,Included for coordinate reference systems where datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0
-6013,Not specified (based on Clarke 1880 (Arc) ellipsoid),geodetic,,,7013,8901,1263,Not a valid datum.,Included for coordinate reference systems where datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0
-6014,Not specified (based on Clarke 1880 (SGA 1922) ellipsoid),geodetic,,,7014,8901,1263,Not a valid datum.,Included for coordinate reference systems where datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0
-6015,Not specified (based on Everest 1830 (1937 Adjustment) ellipsoid),geodetic,,,7015,8901,1263,Not a valid datum.,Included for coordinate reference systems where datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0
-6016,Not specified (based on Everest 1830 (1967 Definition) ellipsoid),geodetic,,,7016,8901,1263,Not a valid datum.,Included for coordinate reference systems where datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0
-6018,Not specified (based on Everest 1830 Modified ellipsoid),geodetic,,,7018,8901,1263,Not a valid datum.,Included for coordinate reference systems where datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0
-6019,Not specified (based on GRS 1980 ellipsoid),geodetic,,,7019,8901,1263,Not a valid datum.,Included for coordinate reference systems where datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0
-6020,Not specified (based on Helmert 1906 ellipsoid),geodetic,,,7020,8901,1263,Not a valid datum.,Included for coordinate reference systems where datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0
-6021,Not specified (based on Indonesian National Spheroid),geodetic,,,7021,8901,1263,Not a valid datum.,Included for coordinate reference systems where datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0
-6022,Not specified (based on International 1924 ellipsoid),geodetic,,,7022,8901,1263,Not a valid datum.,Included for coordinate reference systems where datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0
-6024,Not specified (based on Krassowsky 1940 ellipsoid),geodetic,,,7024,8901,1263,Not a valid datum.,Included for coordinate reference systems where datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0
-6025,Not specified (based on NWL 9D ellipsoid),geodetic,,,7025,8901,1263,Not a valid datum.,Included for coordinate reference systems where datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0
-6027,Not specified (based on Plessis 1817 ellipsoid),geodetic,,,7027,8901,1263,Not a valid datum.,Included for coordinate reference systems where datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0
-6028,Not specified (based on Struve 1860 ellipsoid),geodetic,,,7028,8901,1263,Not a valid datum.,Included for coordinate reference systems where datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0
-6029,Not specified (based on War Office ellipsoid),geodetic,,,7029,8901,1263,Not a valid datum.,Included for coordinate reference systems where datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0
-6030,Not specified (based on WGS 84 ellipsoid),geodetic,,,7030,8901,1263,Not a valid datum.,Included for coordinate reference systems where datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0
-6031,Not specified (based on GEM 10C ellipsoid),geodetic,,,7031,8901,1263,Not a valid datum.,Included for coordinate reference systems where datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0
-6032,Not specified (based on OSU86F ellipsoid),geodetic,,,7032,8901,1263,Not a valid datum.,Included for coordinate reference systems where datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0
-6033,Not specified (based on OSU91A ellipsoid),geodetic,,,7033,8901,1263,Not a valid datum.,Included for coordinate reference systems where datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0
-6034,Not specified (based on Clarke 1880 ellipsoid),geodetic,,,7034,8901,1263,Not a valid datum.,Included for coordinate reference systems where datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,96.08  2000.42,0
-6035,Not specified (based on Authalic Sphere),geodetic,,,7035,8901,1263,Not a valid datum.,Included for coordinate reference systems where datum is unknown. Deprecated and superseded by 6047.,EPSG,EPSG,2001-06-05 00:00:00,96.08  2000.42,1
-6036,Not specified (based on GRS 1967 ellipsoid),geodetic,,,7036,8901,1263,Not a valid datum.,Included for coordinate reference systems where datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,2000.42,0
-6041,Not specified (based on Average Terrestrial System 1977 ellipsoid),geodetic,,,7041,8901,1263,Not a valid datum.,Included for coordinate reference systems where datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,2000.42,0
-6042,Not specified (based on Everest (1830 Definition) ellipsoid),geodetic,,,7042,8901,1263,Not a valid datum.,Included for coordinate reference systems where datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,2000.42,0
-6043,Not specified (based on WGS 72 ellipsoid),geodetic,,,7043,8901,1263,Not a valid datum.,Included for coordinate reference systems where datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,2000.42,0
-6044,Not specified (based on Everest 1830 (1962 Definition) ellipsoid),geodetic,,,7044,8901,1263,Not a valid datum.,Included for coordinate reference systems where datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,2000.42,0
-6045,Not specified (based on Everest 1830 (1975 Definition) ellipsoid),geodetic,,,7045,8901,1263,Not a valid datum.,Included for coordinate reference systems where datum is unknown.,EPSG,EPSG,2000-05-03 00:00:00,2000.42,0
-6047,Not specified (based on GRS 1980 Authalic Sphere),geodetic,,,7047,8901,1263,Not a valid datum.,Included for coordinate reference systems where datum is unknown.,EPSG,EPSG,2001-06-25 00:00:00,2001.19,0
-6120,Greek,geodetic,Fundamental point: Athens Observatory; latitude 37 deg 58 min 20.132 sec N; longitude 23 deg 42 min 58.815 sec E of Greenwich,,7004,8901,1106,Topographic mapping.,See geodetic datum alias 6404.  Used as basis of topographic mapping based on Hatt projection.,Topography Department; National Technical University of Athens,EPSG,1997-06-16 00:00:00,,0
-6121,Greek Geodetic Reference System 1987,geodetic,Fundamental point: Dionysos; latitude 38 deg 04 min 33.8 sec N; longitude 23 deg 55 min 51.0 sec E of Greenwich; geoid height 7.0 m.,1987,7019,8901,1106,Topographic mapping.,Superseded (old) Greek datum.  Oil industry work based on ED50.,L. Portokalakis; Public Petroleum Corporation of Greece,EPSG,1997-06-16 00:00:00,,0
-6122,Average Terrestrial System 1977,geodetic,,1977,7041,8901,1283,Topographic mapping.,In use from 1979.  To be phased out in late 1990's.,New Brunswick Geographic Information Corporation land and water information standards manual.,EPSG,1997-07-02 00:00:00,,0
-6123,Kartasto Koordinaati Jarjestelma 1966,geodetic,Adjustment with fundamental point SF31 based on ED50 transformed to best fit the older VVJ adjustment.,1966,7022,8901,1095,"Geodesy, cadastre, topographic mapping, engineering survey.",Adopted in 1970.,www.nls.fi/maa/papers/kkj.html,EPSG,1997-07-22 00:00:00,,0
-6124,Rikets koordinatsystem 1990,geodetic,,1982,7004,8901,1225,"Geodesy, cadastre, topographic mapping, engineering survey.",Supersedes RT38 adjustment (datum code 6308),National Land Survey of Sweden,EPSG,1997-11-13 00:00:00,,0
-6125,Samboja,geodetic,Original origin station P2 Exc now destroyed.  Extensions recomputed using Toran station T9 as origin.,,7004,8901,1328,Topographic mapping.,,Total Indonesia.,EPSG,1997-11-13 00:00:00,,1
-6126,Lithuania 1994 (ETRS89),geodetic,Densification from 4  ETRS89 points.,1994,7019,8901,1145,"Topographic mapping, geodesy.",Densification of ETRS89 during the 1992 Baltic campaign.,HNIT-Baltic GeoInfoServisas,EPSG,1998-03-12 00:00:00,,0
-6127,Tete,geodetic,Fundamental point: Tete.,,7008,8901,1167,Topographic mapping.,,Mozambique Direc��o Nacional de Geografia e Cadastral (DINAGECA).,EPSG,1998-04-16 00:00:00,,0
-6128,Madzansua,geodetic,Fundamental point: Madzansua.,,7008,8901,1315,Topographic mapping.,Superseded by transformation to Tete datum (datum code 6127).,Mozambique Direc��o Nacional de Geografia e Cadastral (DINAGECA).,EPSG,1998-04-16 00:00:00,,0
-6129,Observatario,geodetic,Fundamental point: Maputo observatory.,,7008,8901,1329,Topographic mapping.,Superseded by transformation to Tete datum (datum code 6127).,Mozambique Direc��o Nacional de Geografia e Cadastral (DINAGECA).,EPSG,1998-04-16 00:00:00,,0
-6130,Moznet (ITRF94),geodetic,ITRF 1994 epoch 20,,7030,8901,1167,Topographic mapping.,,Mozambique Direc��o Nacional de Geografia e Cadastral (DINAGECA).,EPSG,1998-04-16 00:00:00,,0
-6131,Indian 1960,geodetic,,,7015,8901,1302,Topographic mapping.,DMA adjustment of IndoChina part of the Indian 1954 network to better fit local geoid.  Also known as Indian (DMA Reduced).,,EPSG,1998-11-11 00:00:00,,0
-6132,Final Datum 1958,geodetic,Fundamental point: Maniyur.  Latitude: 31 deg 23 min 59.19 sec N; Longitude: 48 deg 32 min 31.38 sec E (of Greenwich).,,7012,8901,1300,Oil industry mapping.,Network included in Nahrwan 1967 adjustment.,IOEPC records,EPSG,1998-11-11 00:00:00,,0
-6133,Estonia 1992,geodetic,Densification from 4  ETRS89 points.,1992,7019,8901,1090,"Topographic mapping, geodesy.",Based on ETRS89 as established during the 1992 Baltic campaign. Superseded by Estonia 1997 adjustment (code 6180).,http://www.geo.ut.ee/~raivo/estcoord.html,EPSG,1998-12-14 00:00:00,,0
-6134,PDO Survey Datum 1993,geodetic,Adjustment best fitted to Fahud network.,1993,7012,8901,1183,Oil industry mapping.,Supersedes Fahud datum (code 6232). Maximum differences to Fahud adjustment are 20 metres.,Petroleum Development Oman,EPSG,1999-04-22 00:00:00,,0
-6135,Old Hawaiian,geodetic,Fundamental Point: Oahu West Base Astro.  Latitude: 21 deg 18 min 13.89 sec N; longitude 157 deg 50 min 55.79 sec W (of Greenwich),,7008,8901,1334,Topographic mapping.,Hawaiian Islands were never on NAD27 but rather on Old Hawaiian Datum.  NADCON conversion program provides transformation from Old Hawaiian Datum to NAD83 (original 1986 realization) but making the transformation appear to user as if from NAD27.,http://www.ngs.noaa.gov/ (NADCON readme file) and t [...]
-6136,St. Lawrence Island,geodetic,,,7008,8901,1332,Topographic mapping.,Many Alaskan islands were never on NAD27 but rather on independent datums.  NADCON conversion program provides transformation from St. Lawrence Island Datum to NAD83 (original 1986 realization) - making the transformation appear to user as if from NAD27.,http://www.ngs.noaa.gov/ (NADCON readme file),EPSG,1999-05-24 00:00:00,,0
-6137,St. Paul Island,geodetic,,,7008,8901,1333,Topographic mapping.,Many Alaskan islands were never on NAD27 but rather on independent datums.  NADCON conversion program provides transformation from St. Paul Island Datum to NAD83 (original 1986 realization) - making the transformation appear to user as if from NAD27.,http://www.ngs.noaa.gov/ (NADCON readme file),EPSG,1999-05-24 00:00:00,,0
-6138,St. George Island,geodetic,,,7008,8901,1331,Topographic mapping.,Many Alaskan islands were never on NAD27 but rather on independent datums.  NADCON conversion program provides transformation from St. George Island Datum to NAD83 (original 1986 realization) - making the transformation appear to user as if from NAD27.,http://www.ngs.noaa.gov/ (NADCON readme file),EPSG,1999-05-24 00:00:00,,0
-6139,Puerto Rico,geodetic,,,7008,8901,1335,Topographic mapping.,NADCON conversion program provides transformation from Puerto Rico Datum to NAD83 (original 1986 realization) but making the transformation appear to user as if from NAD27.,Ordnance Survey of Great Britain and http://www.ngs.noaa.gov/ (NADCON readme file).,EPSG,1999-05-24 00:00:00,,0
-6140,NAD83 Canadian Spatial Reference System,geodetic,,1998,7019,8901,1336,Geodesy.,Supersedes ATS77 from 1999 in New Brunswick.,Service New Brunswick Land and Information Standards Manual,EPSG,1999-10-20 00:00:00,,0
-6141,Israel,geodetic,Fundamental Point:  Latitude: 31 deg 44 min 03.817 sec N; Longitude: 35 deg 12 min 16.261 sec E (of Greenwich).,,7019,8901,2603,Topographic mapping.,,Survey of Israel.,EPSG,2002-06-22 00:00:00,2002.34,0
-6142,Locodjo 1965,geodetic,Fundamental Point: T5 Banco. Latitude: 5 deg 18 min 50.5 sec N; Longitude: 4 deg 02 min 05.1 sec W (of Greenwich).,1965,7012,8901,1075,Topographic mapping.,,IGN Paris.,EPSG,1999-10-20 00:00:00,,0
-6143,Abidjan 1987,geodetic,Fundamental Point: Abidjan I. Latitude: 5 deg 18 min 51.01 sec N; Longitude: 4 deg 02 min 06.04 sec W (of Greenwich).,1987,7012,8901,1075,Topographic mapping.,,IGN Paris.,EPSG,1999-10-20 00:00:00,,0
-6144,Kalianpur 1937,geodetic,Fundamental Point: Kalianpur. Latitude: 24 deg  07 min 11.260 sec N; Longitude: 77 deg 39 min 17.570 sec E (of Greenwich).,1937,7015,8901,1308,Topographic mapping.,Supersedes 1880 adjustment except for topographic mapping.  Superseded in Pakistan by 1962 metrication conversion and in India by 1975 metrication conversion.,"G. Bomford; ""The Re-adjustment of the Indian Triangulation""; Survey of India Professional Paper 28; 1939.",EPSG,1999-10-20 00:00:00,,0
-6145,Kalianpur 1962,geodetic,Fundamental Point: Kalianpur. Latitude: 24 deg  07 min 11.260 sec N; Longitude: 77 deg 39 min 17.570 sec E (of Greenwich).,1962,7044,8901,1184,Topographic mapping.,1937 adjustment rescaled by ratio metric conversions of Indian foot (1937) to Indian foot (1962).,,EPSG,1999-10-20 00:00:00,,0
-6146,Kalianpur 1975,geodetic,Fundamental Point: Kalianpur. Latitude: 24 deg  07 min 11.260 sec N; Longitude: 77 deg 39 min 17.570 sec E (of Greenwich).,1975,7045,8901,1121,Topographic mapping.,1937 adjustment rescaled by ratio metric conversions of Indian foot (1937) to Indian foot (1975).,,EPSG,1999-10-20 00:00:00,,0
-6147,Hanoi 1972,geodetic,,1972,7024,8901,1252,"Geodesy, cadastre, topographic mapping, engineering survey.",,PetroVietnam,EPSG,1999-10-20 00:00:00,,0
-6148,Hartebeesthoek94,geodetic,Coincident with ITRF91 (1994.0) at Hartebeesthoek astronomical observatory near Pretoria.,1994,7030,8901,1215,"Geodesy, cadastre, topographic mapping, engineering survey.",Supersedes Cape datum (code 6222).,Directorate of Surveys and Mapping; http://w3sli.wcape.gov.za/surveys/mapping/wgs84.htm,EPSG,2000-01-06 00:00:00,99.96,0
-6149,CH1903,geodetic,Fundamental Point: Old Bern observatory. Latitude: 46 deg 57 min  8.660 sec N; Longitude: 7 deg 26 min 22.500 sec E (of Greenwich).,1903,7004,8901,1286,Topographic mapping.,,Bundesamt f�r Landestopographie,EPSG,1999-10-20 00:00:00,,0
-6150,CH1903+,geodetic,Fundamental Point: Zimmerwald observatory.,,7004,8901,1286,"Geodesy, topographic mapping.",,Bundesamt f�r Landestopographie.  Aufbau der Landesvermessung der Schweiz 'LV95' Teil 3: Terrestrische Bezugssysteme und Bezugsrahmen. L+T 1999.,EPSG,2001-11-06 00:00:00,2001.52,0
-6151,Swiss Terrestrial Reference Frame 1995,geodetic,ETRF89 at 1993.0,1995,7019,8901,1286,"Geodesy, cadastre, topographic mapping, engineering survey.",,Bundesamt f�r Landestopographie.  Aufbau der Landesvermessung der Schweiz 'LV95' Teil 3: Terrestrische Bezugssysteme und Bezugsrahmen. L+T 1999.,EPSG,1999-10-20 00:00:00,,0
-6152,NAD83 (High Accuracy Regional Network),geodetic,,,7019,8901,1337,Geodesy.,,National Geodetic Survey,EPSG,1999-10-20 00:00:00,,0
-6153,Rassadiran,geodetic,Fundamental Point: Total1. Latitude: 27 deg 31 min 07.784 sec N; Longitude: 52 deg 36 min 12.741 sec E (of Greenwich).,,7022,8901,1338,Oil industry mapping.,,Total-Fina,EPSG,1999-11-20 00:00:00,,0
-6154,European Datum 1950(1977),geodetic,Extension of ED50 over Iran.,1977,7022,8901,1123,Topographic mapping.,Sometimes referred to as ED50-ED77.,National Cartographic Centre of Iran,EPSG,1999-11-20 00:00:00,,0
-6155,Dabola 1981,geodetic,,1981,7011,8901,1112,Topographic mapping.,,IGN Paris,EPSG,1999-12-09 00:00:00,,0
-6156,Jednotne Trigonometricke Site Katastralni,geodetic,"Modification of Austrian MGI datum, code 6312.",,7004,8901,1306,"Geodesy, cadastre, topographic mapping, engineering survey.",S-JTSK = System of the Unified Trigonometrical Cadastral Network.,Research Institute for Geodesy Topography and Cartography (VUGTK); Prague.,EPSG,2001-11-06 00:00:00,2001.26  2001.51,0
-6157,Mount Dillon,geodetic,Fundamental Point: Mount Dillon triangulation station. Latitude: 11 deg  15 min 07.843 sec N; Longitude: 60 deg 41 min 09.632 sec W (of Greenwich).,,7007,8901,1322,Topographic mapping.,,University of the West Indies Geodetic Services.,EPSG,2000-03-07 00:00:00,,0
-6158,Naparima 1955,geodetic,Fundamental Point: Naparima. Latitude: 10 deg 16 min 44.860 sec N; Longitude: 61 deg 27 min 34.620 sec W (of Greenwich).,1955,7022,8901,1339,Topographic mapping.,Naparima 1972 is an extension of the Naparima 1955 network of Trinidad to include Tobago.,Ordnance Survey International.,EPSG,2000-03-07 00:00:00,,0
-6159,European Libyan Datum 1979,geodetic,,1979,7022,8901,1143,Topographic mapping.,,Brown and Root,EPSG,2000-03-07 00:00:00,,0
-6160,Chos Malal 1914,geodetic,Chos Malal police station.,1914,7022,8901,1292,Oil industry mapping.,Also known as Quini-Huao.  Superseded by Campo Inchauspe (code 6221).,Various oil company records.,EPSG,2000-03-07 00:00:00,,0
-6161,Pampa del Castillo,geodetic,,,7022,8901,1265,Oil industry mapping.,Used in Comodoro Rivadavia area.  Superseded by Campo Inchauspe (code 6221).,Various oil company records.,EPSG,2000-03-07 00:00:00,,0
-6162,Korean Datum 1985,geodetic,Fundamental point: Suwon; latitude 37 deg 16 min 31.9034 sec N; longitude 127 deg 03 min 05.1451 sec E of Greenwich.,1985,7004,8901,1135,Topographic mapping.,,Clifford J. Mugnier; in Photogrammetric Engineering & Remote Sensing November 1999. http://www.asprs.org/resources.html,EPSG,2000-03-07 00:00:00,2001.28,0
-6163,Yemen National Geodetic Network 1996,geodetic,Sana'a IGN reference marker,1996,7030,8901,1257,Topographic mapping.,,IGN Paris,EPSG,2000-03-07 00:00:00,,0
-6164,South Yemen,geodetic,,,7024,8901,1340,Topographic mapping.,,IGN Paris,EPSG,2000-03-07 00:00:00,,0
-6165,Bissau,geodetic,,,7022,8901,1113,Topographic mapping.,,NIMA TR8350.2,EPSG,2000-03-07 00:00:00,,0
-6166,Korean Datum 1995,geodetic,,1995,7030,8901,1135,Topographic mapping.,,NIMA TR8350.2  ftp://164.214.2.65/pub/gg/tr8350.2/changes.pdf,EPSG,2000-05-08 00:00:00,,0
-6167,New Zealand Geodetic Datum 2000,geodetic,Based on ITRF96 epoch 2000.0,2000,7019,8901,1175,"Geodesy, cadastre, topographic mapping, engineering survey.",,Land Information New Zealand.,EPSG,2000-10-19 00:00:00,,0
-6168,Accra,geodetic,Fundamental Point: GCS Station 547. Latitude: 5 deg 23 min 43.3 sec N; Longitude: 0 deg 11 min 52.3 sec W (of Greenwich).,,7029,8901,1104,Topographic mapping.,Superseded in 1978 by Leigon datum (code 6250).,Ordnance Survey International,EPSG,2000-10-12 00:00:00,,0
-6169,American Samoa 1962,geodetic,,1962,7008,8901,1027,Topographic mapping.,,NIMA TR8350.2 revision of January 2000,EPSG,2000-10-19 00:00:00,,0
-6170,Sistema de Referencia Geocentrico para America del Sur,geodetic,ITRF94 epoch 1995.42.,1995,7019,8901,1342,Geodesy.,Realised by a frame of 58 stations observed in 1995 and adjusted in the ITRF94.,NIMA TR8350.2 revision of January 2000.,EPSG,2000-10-19 00:00:00,,0
-6171,Reseau Geodesique Francais 1993,geodetic,Coincident with ETRS89,1993,7019,8901,1096,Geodesy.,,TotalFinaElf,EPSG,2001-11-06 00:00:00,2001.51,0
-6172,Posiciones Geodesicas Argentinas,geodetic,,1994,7019,8901,1033,"Topographic mapping, geodesy.","Una red geod�sica de 127 puntos materializados
-en el terreno que definen el Sistema Geod�sico Nacional.  [A geodetic network of 127 points defining the National Geodetic System.] Superseded by POSGAR98 (code 6190).",http://www.igm.gov.ar/posgar.html,EPSG,2000-10-19 00:00:00,,1
-6173,IRENET95,geodetic,ETRS89 stations in Ireland,1995,7019,8901,1305,Geodesy.,Densification of ETRS89,Ordnance Survey of Ireland,EPSG,2000-10-19 00:00:00,,0
-6174,Sierra Leone Colony 1924,geodetic,Fundamental Point: Kortright. Latitude: 8 deg 28 min 44.4 sec N; Longitude: 13 deg 13 min 03.81 sec W (of Greenwich).,1924,7029,8901,1342,"Topographic mapping, engineering survey.",,Ordnance Survey International.,EPSG,2001-06-05 00:00:00,,0
-6175,Sierra Leone 1968,geodetic,Fundamental Point: SLX2 Astro. Latitude: 8 deg 27 min 17.567 sec N; Longitude: 12 deg 49 min 40.186 sec W (of Greenwich).,1968,7012,8901,1209,"Topographic mapping, engineering survey.",Extension and readjustment with additional observations of 1960 network.  Coordinates of 1960 stations change by less than 3 metres.,Ordnance Survey International.,EPSG,2001-06-05 00:00:00,,0
-6176,Australian Antarctic Datum 1998,geodetic,,1998,7019,8901,1278,Topographic mapping.,,Standards Australia,ISO 19127,2001-06-05 00:00:00,,0
-6178,Pulkovo 1942/83,geodetic,Fundamental Point: Pulkovo observatory. Latitude: 59 deg 46 min 18.550 sec N; Longitude: 30 deg 19 min 42.090 sec E (of Greenwich).,1983,7024,8901,1343,"Geodesy, cadastre, topographic mapping, engineering survey.",International adjustment of Uniforrm Astro-Geodetic Network of countries of central and eastern Europe.,Bundesamt f�r Kartographie und Geod�sie via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,0
-6179,Pulkovo 1942/58,geodetic,Fundamental Point: Pulkovo observatory. Latitude: 59 deg 46 min 18.550 sec N; Longitude: 30 deg 19 min 42.090 sec E (of Greenwich).,1958,7024,8901,1192,"Geodesy, cadastre, topographic mapping, engineering survey.",,Glowny Urzad Geodezji i Kartografii via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,0
-6180,Estonia 1997,geodetic,Densification of ETRS89 during EUREF-ESTONIA97 campaign through transformation from ITRF96 epoch 1997.56.,1997,7019,8901,1090,"Geodesy, cadastre, topographic mapping, engineering survey.",Supersedes Estonia 1992 adjustment (code 6133).,Estonian National Land Board via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,0
-6181,Luxembourg 1930,geodetic,Northern station of Habay-la-Neuve baseline in Belgium.,1930,7022,8901,1146,"Geodesy, cadastre, topographic mapping, engineering survey.",,Administration du Cadastre et de la Topographie via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,0
-6182,Azores Occidental Islands 1939,geodetic,Fundamental Point: Observatario Meteorologico Flores.,1939,7022,8901,1344,Topographic mapping.,,Instituto Geografico e Cadastral Lisbon via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,0
-6183,Azores Central Islands 1948,geodetic,Fundamental Point: Graciosa west base.,1948,7022,8901,1301,Topographic mapping.,,Instituto Geografico e Cadastral Lisbon via EuroGeographics; http://crs.ifag.de/,EPSG,2002-07-13 00:00:00,2002.25,0
-6184,Azores Oriental Islands 1940,geodetic,Fundamental Point: Forte de S�o Bras.,1940,7022,8901,1345,Topographic mapping.,,Instituto Geografico e Cadastral Lisbon via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,0
-6185,Madeira 1936,geodetic,Fundamental Point: Madeira SE Base.,1936,7022,8901,1314,Topographic mapping.,,Instituto Geografico e Cadastral Lisbon via EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,1
-6188,OSNI 1952,geodetic,Position fixed to the coordinates from the 19th century Principle Triangulation of station Divis. Scale and orientation controlled by position of Principle Triangulation stations Knocklayd and Trostan.,1952,7001,8901,2530,Geodesy and topographic mapping.,Superseded by 1975 Mapping Adjustment.,Ordnance Survey of Northern Ireland.,EPSG,2001-11-06 00:00:00,,0
-6189,Red Geodesica Venezolana,geodetic,Realised by a frame of 67 stations observed in 1995 as a densification of the SIRGAS campaign and adjusted in the ITRF94.,2000,7019,8901,1251,Geodesy.,,Servicio Autonomo de Geografia y Cartografia Nacional.,EPSG,2001-06-11 00:00:00,,0
-6190,Posiciones Geodesicas Argentinas 1998,geodetic,Densification of SIRGAS 1995; ITRF94 epoch 1995.42.,1998,7019,8901,1033,"Topographic mapping, geodesy.",Una red geod�sica de 127 puntos materializados en el terreno que definen el Sistema Geod�sico Nacional.  [A geodetic network of 127 points defining the National Geodetic System.] Supersedes the 1994 POSGAR adjustment (code 6172).,http://www.igm.gov.ar/posgar.html,EPSG,2001-11-06 00:00:00,,0
-6191,Albanian 1987,geodetic,,1987,7024,8901,1025,"Geodesy, cadastre, topographic mapping, engineering survey.",,EuroGeographics; http://crs.ifag.de/,EPSG,2001-11-06 00:00:00,,0
-6192,Douala 1948,geodetic,"South pillar of Doula base; 4deg 00min 40.64sec N, 9deg 42min 30.41sec E",1948,7022,8901,1060,Topographic mapping.,Superseded  by Manoca 1962 datum (code 6193).,TotalFinaElf,EPSG,2002-01-18 00:00:00,,0
-6193,Manoca 1962,geodetic,"Reservoir centre at the  Manoca tower (""tube Suel""), 3deg 51min 49.896sec N, 9deg 36min 49.347sec E.",1962,7011,8901,1060,Topographic mapping.,The intent of the Bukavu 1953 conference was to adopt the Clarke 1880 (RGN) ellipsoid (code 7012) but in practice this datum has used the IGN version.  Supersedes Douala 1948 (code 6192).,TotalFinaElf,EPSG,2002-01-18 00:00:00,,0
-6194,Qornoq 1927,geodetic,,1927,7022,8901,1107,Topographic mapping.,,"Kort & Matrikelstyrelsen, Copenhagen.",EPSG,2002-01-18 00:00:00,,0
-6195,Scoresbysund 1952,geodetic,,1952,7022,8901,2570,Topographic mapping.,,"Kort & Matrikelstyrelsen, Copenhagen.",EPSG,2002-01-18 00:00:00,,0
-6196,Ammassalik 1958,geodetic,,1958,7022,8901,2571,Topographic mapping.,,"Kort & Matrikelstyrelsen, Copenhagen.",EPSG,2002-01-18 00:00:00,,0
-6197,Garoua,geodetic,IGN astronomical station and benchmark no. 16 at Tongo; 8deg 55min 08.74sec N  13deg 30min 43.19sec E.,,7012,8901,2590,Topographic mapping.,,TotalFinaElf,EPSG,2002-02-12 00:00:00,,0
-6198,Kousseri,geodetic,IGN astronomical station Dabanga; 11deg 55min 05.9sec N  14deg 38min 40.8sec E.,,7012,8901,2591,Topographic mapping.,,TotalFinaElf,EPSG,2002-02-12 00:00:00,,0
-6199,Egypt 1930,geodetic,Fundamental Point: Station F1. Latitude: 30 deg 01 min 42.86 sec N; Longitude: 31 deg 16 min 37.05 sec E (of Greenwich).,1930,7022,8901,1086,Used for scientific purposes only.,"Note that Egypt 1930 uses the International 1924 ellipsoid, unlike the Egypt 1907 datum (code 6229) which uses the Helmert ellipsoid. Oil industry references to the Egypt 1930 datum name and the Helmert ellipsoid probably mean Egypt 1907 datum.",,EPSG,2002-02-12 00:00:00,,0
-6200,Pulkovo 1995,geodetic,Fundamental Point: Pulkovo observatory. Latitude: 59 deg 46 min 15.359 sec N; Longitude: 30 deg 19 min 28.318 sec E (of Greenwich).,1995,7024,8901,1198,Scientific adjustment.,,"""Main Terms of Reference for the State Geodetic Network""; Federal Geodetic Service of Russia; 1994",EPSG,1996-09-12 00:00:00,,0
-6201,Adindan,geodetic,Fundamental Point: Station 15; Adindan. Latitude: 22 deg 10 min  7.110 sec N; Longitude: 31 deg 29 min 21.608 sec E (of Greenwich).,,7012,8901,1271,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6202,Australian Geodetic Datum 1966,geodetic,Fundamental Point: Johnson Memorial. Latitude: 25 deg 56 min 54.551 sec S; Longitude: 133 deg 12 min 30.077 sec E (of Greenwich).,1966,7003,8901,1279,Topographic mapping.,,Australian Map Grid Technical Manual. National Mapping Council of Australia Technical Publication 7; 1972.,EPSG,1995-06-02 00:00:00,,0
-6203,Australian Geodetic Datum 1984,geodetic,,1984,7003,8901,1280,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6204,Ain el Abd 1970,geodetic,Fundamental Point: Ain El Abd.  Latitude: 28 deg  14 min 06.171 sec N; Longitude: 48 deg 16 min 20.906 sec E (of Greenwich).,1970,7022,8901,1272,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6205,Afgooye,geodetic,,,7024,8901,1214,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6206,Agadez,geodetic,,,7011,8901,1177,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6207,Lisbon 1937,geodetic,Fundamental Point: Castelo Sao Jorge; Lisbon. Latitude: 38 deg 42 min 43.631 sec N; Longitude: 9 deg 07 min 54.862 sec W (of Greenwich).,1937,7022,8901,1294,Topographic mapping.,Supersedes Lisbon 1890 adjustment (which used Bessel 1841 ellipsoid).,Instituto Geografico e Cadastral; Lisbon,EPSG,1995-06-02 00:00:00,2001.551,0
-6208,Aratu,geodetic,,,7022,8901,1274,Oil industry geodetic purposes.,,,EPSG,1995-06-02 00:00:00,,0
-6209,Arc 1950,geodetic,Fundamental Point: Buffelsfontein. Latitude: 33 deg 59 min 32.000 sec S; Longitude: 25 deg 30 min 44.622 sec E (of Greenwich).,1950,7013,8901,1276,"Topographic mapping, geodesy.",,,EPSG,1995-06-02 00:00:00,,0
-6210,Arc 1960,geodetic,Fundamental Point: Buffelsfontein. Latitude: 33 deg 59 min 32.000 sec S; Longitude: 25 deg 30 min 44.622 sec E (of Greenwich).,1960,7012,8901,1277,"Topographic mapping, geodesy.",,,EPSG,1995-06-02 00:00:00,,0
-6211,Batavia,geodetic,Fundamental Point: Longitude at Batavia Astro. Station. Latitude: 6 deg  7 min 39.520 sec S; Longitude: 106 deg 48 min 27.790 sec E (of Greenwich). Latitude and azimuth at Genuk.,,7004,8901,1285,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6212,Barbados 1938,geodetic,Fundamental point: HMS Challenger astro station M1; latitude 13 deg 04 min 32.53 sec N; longitude 59 deg 36 min 29.34 sec W (of Greenwich).,1938,7012,8901,1042,Topographic mapping.,,Ordnance Survey of Great Britain.,EPSG,1999-04-22 00:00:00,99.171,0
-6213,Beduaram,geodetic,,,7011,8901,1177,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6214,Beijing 1954,geodetic,,1954,7024,8901,1067,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6215,Reseau National Belge 1950,geodetic,Fundamental Point: Lommel (tower). Latitude: 51 deg 13 min 47.334 sec N; Longitude: 0 deg 56 min 44.773 sec E (of Brussels).,1950,7022,8901,1347,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6216,Bermuda 1957,geodetic,,1957,7008,8901,1047,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6218,Bogota 1975,geodetic,Fundamental Point: Bogota observatory. Latitude: 4 deg 35 min 56.570 sec N; Longitude: 74 deg  4 min 51.300 sec W (of Greenwich).,1975,7022,8901,1070,Topographic mapping.,Supersedes 1951 adjustment.,"Instituto Geografico Agustin Caduzzi (IGAC) special publication no. 1, 4th edition (1975) ""Geodesia: Resultados Definitvos de Parte de las Redes Geodesicas Establecidas en el Pais"".",EPSG,2000-10-19 00:00:00,2000.20,0
-6219,Bukit Rimpah,geodetic,2deg 00min 40.16sec S  105deg 51min 39.76sec E (of Greenwich).,,7004,8901,1287,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6220,Camacupa,geodetic,,,7012,8901,1288,Coastal hydrography.,,,EPSG,1995-06-02 00:00:00,,0
-6221,Campo Inchauspe,geodetic,Fundamental Point: Campo Inchauspe. Latitude: 35 deg 58 min 17.000 sec S; Longitude: 62 deg 10 min 12.000 sec W (of Greenwich).,,7022,8901,1033,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6222,Cape,geodetic,Fundamental Point: Buffelsfontein. Latitude: 33 deg 59 min 32.000 sec S; Longitude: 25 deg 30 min 44.622 sec E (of Greenwich).,,7013,8901,1290,"Geodesy, cadastre, topographic mapping, engineering survey.",,"Private Communication, Directorate of Surveys and Land Information, Cape Town.",EPSG,1996-10-18 00:00:00,96.25  99.69,0
-6223,Carthage,geodetic,,,7011,8901,1236,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6224,Chua,geodetic,Fundamental Point: Chua. Latitude: 19 deg 45 min 41.160 sec S; Longitude: 48 deg  6 min  7.560 sec W (of Greenwich).,,7022,8901,1053,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6225,Corrego Alegre,geodetic,Fundamental Point: Corrego Alegre. Latitude: 19 deg 50 min 15.140 sec S; Longitude: 48 deg 57 min 42.750 sec W (of Greenwich).,,7022,8901,1293,"Topographic mapping, geodesy.",,,EPSG,1995-06-02 00:00:00,,0
-6226,Cote d'Ivoire,geodetic,,,7011,8901,1075,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,2001.11,1
-6227,Deir ez Zor,geodetic,Fundamental Point: Trig. 254 Deir. Latitude: 35 deg 21 min 49.975 sec N; Longitude: 40 deg  5 min 46.770 sec E (of Greenwich).,,7011,8901,1623,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6228,Douala,geodetic,,,7011,8901,1060,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,1
-6229,Egypt 1907,geodetic,Fundamental Point: Station F1. Latitude: 30 deg 01 min 42.86 sec N; Longitude: 31 deg 16 min 33.60 sec E (of Greenwich).,1907,7020,8901,1086,"Geodesy, cadastre, topographic mapping, engineering survey.",,,EPSG,1995-06-02 00:00:00,,0
-6230,European Datum 1950,geodetic,Fundamental Point: Potsdam (Helmert Tower). Latitude: 52 deg 22 min 51.4456 sec N; Longitude: 13 deg  3 min 58.9283 sec E (of Greenwich).,1950,7022,8901,1296,"Topographic mapping, geodesy.",,,EPSG,1995-06-02 00:00:00,,0
-6231,European Datum 1987,geodetic,,1987,7022,8901,2420,Scientific network.,,,EPSG,1995-06-02 00:00:00,,0
-6232,Fahud,geodetic,Fundamental Point: Station NO68-024 Fahud. Latitude: 22 deg 17 min 31.182 sec N; Longitude: 56 deg 29 min 18.820 sec E (of Greenwich).,,7012,8901,1183,Oil industry mapping.,Superseded by PSD93 (code 6134).,Petroleum Development Oman.,EPSG,1995-06-02 00:00:00,,0
-6233,Gandajika 1970,geodetic,,1970,7022,8901,1152,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6234,Garoua,geodetic,,,7011,8901,1060,Topographic mapping.,The intent of the Bukavu 1953 conference was to adopt the Clarke 1880 (RGN) ellipsoid (code 7012) but in practice this datum has used the IGN version.,,EPSG,1995-06-02 00:00:00,,1
-6235,Guyane Francaise,geodetic,,,7022,8901,1097,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6236,Hu Tzu Shan,geodetic,,,7022,8901,1228,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6237,Hungarian Datum 1972,geodetic,"Fundamental Point: Szolohegy. Latitude: 47 deg 17 min 32,6156 sec N; Longitude 19 deg 36 min 09.9865 sec E; geoid height 6.56m.",1972,7036,8901,1119,Topographic mapping.,,http://lazarus.elte.hu/gb/geodez/geod3.htm,EPSG,1996-10-18 00:00:00,96.09,0
-6238,Indonesian Datum 1974,geodetic,"Fundamental Point: Padang. Latitude: 0 deg 56 min 38.414 sec S; Longitude: 100 deg 22 min  8.804 sec E (of Greenwich). Ellipsoidal height 3.190m, gravity-related height 14.0m above mean sea level.",1974,7021,8901,1122,Topographic mapping.,,Bakosurtanal 1979 paper by Jacob Rais.,EPSG,2002-06-22 00:00:00,2002.151,0
-6239,Indian 1954,geodetic,Fundamental Point: Kalianpur. Latitude: 24 deg  07 min 11.260 sec N; Longitude: 77 deg 39 min 17.570 sec E (of Greenwich).,1954,7015,8901,1304,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6240,Indian 1975,geodetic,Fundamental Point: Khau Sakaerang,1975,7015,8901,1231,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6241,Jamaica 1875,geodetic,Fundamental Point: Fort Charles Flagstaff. Latitude: 17 deg 55 min 55.800 sec N; Longitude: 76 deg 56 min 37.260 sec W (of Greenwich).,1875,7034,8901,1128,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6242,Jamaica 1969,geodetic,Fundamental Point: Fort Charles Flagstaff. Latitude: 17 deg 55 min 55.800 sec N; Longitude: 76 deg 56 min 37.260 sec W (of Greenwich).,1969,7008,8901,1128,"Geodesy, cadastre, topographic mapping, engineering survey.",,,EPSG,1995-06-02 00:00:00,,0
-6243,Kalianpur 1880,geodetic,Fundamental Point: Kalianpur. Latitude: 24 deg  07 min 11.260 sec N; Longitude: 77 deg 39 min 17.570 sec E (of Greenwich).,1880,7042,8901,1307,Topographic mapping.,Includes 1916 extrension into Burma (Myanmar).  Superseded by 1937 adjustment.,"G. Bomford; ""The Re-adjustment of the Indian Triangulation""; Survey of India Professional Paper 28; 1939.",EPSG,1999-10-20 00:00:00,97.23,0
-6244,Kandawala,geodetic,,,7015,8901,1218,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6245,Kertau,geodetic,Fundamental Point: Kertau. Latitude: 3 deg 27 min 50.710 sec N; Longitude: 102 deg 37 min 24.550 sec E (of Greenwich).,,7018,8901,1309,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6246,Kuwait Oil Company,geodetic,,,7012,8901,1136,Oil industry mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6247,La Canoa,geodetic,Fundamental Point: La Canoa. Latitude: 8 deg 34 min 17.170 sec N; Longitude: 63 deg 51 min 34.880 sec W (of Greenwich).,,7022,8901,1251,"Geodesy, topographic mapping, engineering survey.",Origin also adopted for PSAD56.,,EPSG,1995-06-02 00:00:00,,0
-6248,Provisional South American Datum 1956,geodetic,Fundamental Point: La Canoa. Latitude: 8 deg 34 min 17.170 sec N; Longitude: 63 deg 51 min 34.880 sec W (of Greenwich).,1956,7022,8901,1348,Topographic mapping.,Same origin as La Canoa datum.,,EPSG,1995-06-02 00:00:00,,0
-6249,Lake,geodetic,Fundamental Point: Maracaibo Cathedral. Latitude: 10 deg 38 min 34.678 sec N; Longitude: 71 deg 36 min 20.224 sec W (of Greenwich).,,7022,8901,1312,Oil industry mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6250,Leigon,geodetic,"Fundamental Point: GCS Station 121, Leigon. Latitude: 5 deg 38 min 52.27 sec N; Longitude: 0 deg 11 min 46.08 sec W (of Greenwich).",,7012,8901,1104,Topographic mapping.,Superseded Accra datum (code 6168) from 1978.  Coordinates at Leigon fundamental point defined as Accra datum values for that point.,Ordnance Survey International,EPSG,1995-06-02 00:00:00,,0
-6251,Liberia 1964,geodetic,,1964,7012,8901,1142,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6252,Lome,geodetic,,,7011,8901,1232,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6253,Luzon 1911,geodetic,Fundamental Point: Balacan. Latitude: 13 deg 33 min 41.000 sec N; Longitude: 121 deg 52 min  03.000 sec E (of Greenwich).,1911,7008,8901,1190,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6254,Hito XVIII 1963,geodetic,Chile-Argentina boundary survey.,1963,7022,8901,1303,Geodesy.,Used in Tierra del Fuego.,Various oil company records.,EPSG,1995-06-02 00:00:00,,0
-6255,Herat North,geodetic,,,7022,8901,1024,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6256,Mahe 1971,geodetic,Fundamental Point: Mahe,1971,7012,8901,1208,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6257,Makassar,geodetic,Fundamental Point: Moncongloe,,7004,8901,1316,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6258,European Terrestrial Reference System 1989,geodetic,,1989,7019,8901,1298,Geodesy.,"Coincides with WGS84 at the one metre level.
-The distinction in usage between ETRF89 and ETRS89 is confused: although in principle conceptually different in practice both are used for the realisation.",,EPSG,2000-10-19 00:00:00,97.11  97.55  99.111 2000.72,0
-6259,Malongo 1987,geodetic,Fundamental Point: Station Y at Malongo base camp. Latitude: 5 deg 23 min 34.327 sec S; Longitude: 12 deg 12 min  02.393 sec E (of Greenwich).,1987,7022,8901,1317,Oil industry mapping.,Offshore extension of Mhast datum (6264) using Transit translocation.,Chevron Petroleum Technology.,EPSG,1995-06-02 00:00:00,,0
-6260,Manoca,geodetic,,,7012,8901,1060,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,1
-6261,Merchich,geodetic,"Fundamental Point: Merchich. Latitude: 33� 26' 59.672"" N; Longitude: 7� 33' 27.295""  W (of Greenwich).",1922,7011,8901,1166,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6262,Massawa,geodetic,,,7004,8901,1089,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6263,Minna,geodetic,Fundamental Point: Minna base station L40. Latitude: 9 deg 38 min  09.000 sec N; Longitude: 6 deg 30 min 59.000 sec E (of Greenwich).,,7012,8901,1178,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6264,Mhast,geodetic,,,7022,8901,1318,Coastal hydrography.,,,EPSG,1995-06-02 00:00:00,,0
-6265,Monte Mario,geodetic,Fundamental Point: Monte Mario. Latitude: 41 deg 55 min 25.510 sec N; Longitude: 0 deg  00 min  00.000 sec E (of Rome).,,7022,8901,1127,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6266,M'poraloko,geodetic,,,7011,8901,1100,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6267,North American Datum 1927,geodetic,Fundamental Point: Meade's Ranch. Latitude: 39 deg 13 min 26.686 sec N; Longitude: 98 deg 32 min 30.506 sec W (of Greenwich).,1927,7008,8901,1349,Topographic mapping.,Superseded by North American Datum 1983 (NAD83),,EPSG,1995-06-02 00:00:00,,0
-6268,NAD Michigan,geodetic,Fundamental Point: Meade's Ranch. Latitude: 39 deg 13 min 26.686 sec N; Longitude: 98 deg 32 min 30.506 sec W (of Greenwich).,,7009,8901,1391,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6269,North American Datum 1983,geodetic,Origin at geocentre.,1986,7019,8901,1350,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6270,Nahrwan 1967,geodetic,Fundamental point: Nahrwan south base.  Latitude: 33 deg 19 min 10.87 sec N; Longitude: 44 deg 43 min 25.54 sec E (of Greenwich).,1967,7012,8901,1351,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6271,Naparima 1972,geodetic,Fundamental Point: Naparima. Latitude: 10 deg 16 min 44.860 sec N; Longitude: 61 deg 27 min 34.620 sec W (of Greenwich).,1972,7022,8901,1322,Topographic mapping.,Naparima 1972 is an extension of the Naparima 1955 network of Trinidad to include Tobago.,Ordnance Survey International.,EPSG,1995-06-02 00:00:00,,0
-6272,New Zealand Geodetic Datum 1949,geodetic,Fundamental Point: Papatahi. Latitude: 41 deg 19 min  8.900 sec S; Longitude: 175 deg  02 min 51.000 sec E (of Greenwich).,1949,7022,8901,1175,"Geodesy, cadastre, topographic mapping, engineering survey.",,,EPSG,2000-10-19 00:00:00,2000.702,0
-6273,NGO 1948,geodetic,,1948,7005,8901,1352,"Geodesy, cadastre, topographic mapping, engineering survey.",,,EPSG,1995-06-02 00:00:00,,0
-6274,Datum 73,geodetic,"Fundamental Point:  TF4, Melrica. Latitude: 39 deg 41 min 37.30 sec N; Longitude: 8 deg 07 min 53.31 sec W (of Greenwich).",1964,7022,8901,1294,Topographic mapping.,,Instituto Geografico e Cadastral; Lisbon,EPSG,1995-06-02 00:00:00,,0
-6275,Nouvelle Triangulation Francaise,geodetic,Fundamental Point: Pantheon. Latitude: 48 deg 50 min 46.52 sec N; Longitude: 2 deg 20 min 48.67 sec E (of Greenwich).,1898,7011,8901,1353,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6276,NSWC 9Z-2,geodetic,,,7025,8901,1262,Satellite navigation.,Transit precise ephemeris before 1991.,,EPSG,1995-06-02 00:00:00,,0
-6277,OSGB 1936,geodetic,Fundamental Point: Herstmonceux. Latitude: 50 deg 51 min 55.271 sec N; Longitude: 0 deg 20 min 45.882 sec E (of Greenwich).,1936,7001,8901,1264,Topographic mapping.Topographic mapping.Topographic mapping.Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6278,OSGB 1970 (SN),geodetic,Fundamental Point: Herstmonceux. Latitude: 50 deg 51 min 55.271 sec N; Longitude: 0 deg 20 min 45.882 sec E (of Greenwich).,1970,7001,8901,1354,Scientific network.,,,EPSG,1995-06-02 00:00:00,,0
-6279,OS (SN) 1980,geodetic,Fundamental Point: Herstmonceux. Latitude: 50 deg 51 min 55.271 sec N; Longitude: 0 deg 20 min 45.882 sec E (of Greenwich).,1980,7001,8901,1354,Scientific network.,,,EPSG,1995-06-02 00:00:00,,0
-6280,Padang 1884,geodetic,Fundamental Point: Padang,1884,7004,8901,1355,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6281,Palestine 1923,geodetic,Fundamental Point: Point 82'M  Jerusalem. Latitude: 31 deg 44 min  2.749 sec N; Longitude: 35 deg 12 min 43.490 sec E (of Greenwich).,1923,7010,8901,1356,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6282,Congo 1960 Pointe Noire,geodetic,Fundamental Point: Point Noire Astro. Latitude: 4 deg 47 min  0.100 sec S; Longitude: 11 deg 51 min  1.550 sec E (of Greenwich).,1960,7011,8901,1072,Topographic mapping.,,,EPSG,2002-01-18 00:00:00,2002.05,0
-6283,Geocentric Datum of Australia 1994,geodetic,,1994,7019,8901,1036,"Topographic mapping, geodesy.",Coincident with WGS84 to within 1 metre.,Australian Surveying and Land Information Group Internet WWW page.,EPSG,1995-06-02 00:00:00,,0
-6284,Pulkovo 1942,geodetic,Fundamental Point: Pulkovo observatory. Latitude: 59 deg 46 min 18.550 sec N; Longitude: 30 deg 19 min 42.090 sec E (of Greenwich).,1942,7024,8901,1357,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6285,Qatar 1974,geodetic,Fundamental Point: Station G3,1974,7022,8901,1346,Topographic mapping.,,,EPSG,2001-08-28 00:00:00,2001.27,0
-6286,Qatar 1948,geodetic,Fundamental Point: Sokey 0 M. Latitude: 25 deg 22 min 56.500 sec N; Longitude: 50 deg 45 min 41.000 sec E (of Greenwich).,1948,7020,8901,1346,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6287,Qornoq,geodetic,,1927,7022,8901,1107,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,1
-6288,Loma Quintana,geodetic,Fundamental Point: Loma Quintana,,7022,8901,1313,Topographic mapping.,Superseded by La Canoa (code 6247).,,EPSG,1995-06-02 00:00:00,,0
-6289,Amersfoort,geodetic,Fundamental Point: Amersfoort. Latitude: 52 deg  09 min 22.178 sec N; Longitude: 5 deg 23 min 15.478 sec E (of Greenwich).,,7004,8901,1275,"Geodesy, cadastre, topographic mapping, engineering survey.",,,EPSG,2000-10-19 00:00:00,2000.56,0
-6291,South American Datum 1969,geodetic,,1969,7036,8901,1358,Topographic mapping.,SAD69 uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.252.  Error introduced if not using the truncated precision is 0 to 31mm.,,EPSG,1996-10-18 00:00:00,96.09  97.252,0
-6292,Sapper Hill 1943,geodetic,,1943,7022,8901,1092,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6293,Schwarzeck,geodetic,,,7046,8901,1169,Topographic mapping.,,"Private Communication, Directorate of Surveys and Land Information, Cape Town.",EPSG,2001-01-21 00:00:00,2001.15,0
-6294,Segora,geodetic,,,7004,8901,1359,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,1
-6295,Serindung,geodetic,,,7004,8901,1360,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6296,Sudan,geodetic,,,7011,8901,1361,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6297,Tananarive 1925,geodetic,Fundamental Point: Tananarive observatory. Latitude: 18 deg 55 min  2.100 sec S; Longitude: 45 deg 12 min 52.800 sec E (of Greenwich).,2025,7022,8901,1149,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6298,Timbalai 1948,geodetic,Fundamental Point: Timbalai. Latitude: 5 deg 17 min  3.548 sec N; Longitude: 115 deg 10 min 56.409 sec E (of Greenwich).,1948,7016,8901,1362,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6299,TM65,geodetic,Adjusted to best mean fit 12 stations of the OSNI 1952 primary adjustment to within 0.5m.,1965,7002,8901,1305,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6300,TM75,geodetic,Adjusted to best mean fit 9 stations of the OSNI 1952 primary adjustment in Northern Ireland plus the 1965 values of 3 stations in the Republic of Ireland.,1975,7002,8901,1305,"Geodesy, topographic mapping and engineering survey.",,,EPSG,1995-06-02 00:00:00,,0
-6301,Tokyo,geodetic,Fundamental Point: Nikon-Keido-Genten. Latitude: 35 deg 39 min 17.5148 sec N; Longitude: 139 deg 44 min 40.5020 sec E (of Greenwich).,,7004,8901,1364,"Geodesy, cadastre, topographic mapping, engineering survey.",Superseded by Japanese Geodetic Datum 2000 (code 6611).,Geographic Survey Institute; Japan; Bulletin 40 (March 1994).  Also http://vldb.gsi.go.jp/sokuchi/datum/tokyodatum.html,EPSG,2002-06-22 00:00:00,98.46  2002.08,0
-6302,Trinidad 1903,geodetic,Harbour Master's Flagstaff; Port of Spain.,1903,7007,8901,1339,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6303,Trucial Coast 1948,geodetic,Fundamental Point: TC1. Latitude: 25 deg 23 min 50.190 sec N; Longitude: 55 deg 26 min 43.950 sec E (of Greenwich).,1948,7020,8901,1363,Oil industry mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6304,Voirol 1875,geodetic,Fundamental Point: Voirol. Latitude: 40.835864 grads N; Longitude: 0.788735 grads E of Paris.,1875,7011,8901,1365,Topographic mapping.,,IGN Paris,EPSG,1995-06-02 00:00:00,,0
-6306,Bern 1938,geodetic,Fundamental Point: Old Bern observatory. Latitude: 46 deg 57 min  7.890 sec N; Longitude: 7 deg 26 min 22.335 sec E (of Greenwich).,1938,7004,8901,1286,Topographic mapping.,This redetermination of the coordinates of fundamental point is used for scientific purposes and as the graticule overprinted on topographic maps constructed on the CH1903 / LV03 projected CS (code 21781).,"""Die Projektionen der schweizerischen Plan- und Kartenwerke""; J. Bolliger 1967",EPSG,1 [...]
-6307,Nord Sahara 1959,geodetic,,1959,7012,8901,1366,Topographic mapping.,Sometimes incorrectly referred to as Voirol Unifie 1960. Voirol Unifie 1960 is NOT a datum:  it is two projected coordinate systems based on  Nord Sahara 1959.  See coordinate system codes 30791 and 30792.,"""Le System Geodesique Nord-Sahara""; IGN Paris",EPSG,1999-10-20 00:00:00,99.62,0
-6308,Stockholm 1938,geodetic,Fundamental Point: Stockholm observatory,1938,7004,8901,1225,"Geodesy, cadastre, topographic mapping, engineering survey.",Superseded by RT90 adjustment (datum code 6124),,EPSG,1996-04-12 00:00:00,,0
-6309,Yacare,geodetic,,,7022,8901,1247,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6310,Yoff,geodetic,,,7011,8901,1207,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6311,Zanderij,geodetic,,,7022,8901,1222,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6312,Militar-Geographische Institut,geodetic,Fundamental Point: Hermannskogel. Latitude: 48 deg 16 min 15.29 sec N; Longitude: 16 deg 17 min 41.06 sec E (of Greenwich).,1901,7004,8901,1321,Topographic mapping.,Croatia is planning to define a new modern datum to supersede HR1901 (info from EuroGeographics; http://crs.ifag.de/).,Bundesamt fur Eich- und Vermessungswesen; Wien,EPSG,1995-06-02 00:00:00,,0
-6313,Reseau National Belge 1972,geodetic,Fundamental Point: Uccle observatory. Latitude: 50 deg 47 min 57.704 sec N; Longitude: 4 deg 21 min 24.983 sec E (of Greenwich).,1972,7022,8901,1347,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6314,Deutsches Hauptdreiecksnetz,geodetic,Fundamental Point: Rauenberg. Latitude: 52 deg 27 min 12.021 sec N; Longitude: 13 deg 22 min 04.928 sec E (of Greenwich).,,7004,8901,1295,"Geodesy, cadastre, topographic mapping, engineering survey.",Deprecated because name misspelt.,,EPSG,2001-11-06 00:00:00,2001.511,0
-6315,Conakry 1905,geodetic,Fundamental Point: Conakry. Latitude: 10.573766g N; Longitude: 17.833682g W (of Paris).,1905,7011,8901,1112,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6316,Dealul Piscului 1933,geodetic,Fundamental point: latitude 44 deg 24 min 33.9606 sec N; longitude 26 deg 06 min 44.8772 sec E (of Greenwich).,1933,7022,8901,1197,Topographic mapping.,Superseded by 1970 adjustment (datum code 6317),Institute for Geodesy Photogrametry and Land Management,EPSG,1996-04-12 00:00:00,,0
-6317,Dealul Piscului 1970,geodetic,Fundamental point: latitude 44 deg 24 min 23.7709 sec N; longitude 26deg 06 min 44.1265 sec E (of Greenwich).,1970,7024,8901,1197,Topographic mapping.,Supersedes 1933 adjustment (datum code 6316),Institute for Geodesy Photogrametry and Land Management,EPSG,1996-04-12 00:00:00,,0
-6318,National Geodetic Network,geodetic,,,7030,8901,1136,Geodesy.,,,EPSG,1996-04-12 00:00:00,,0
-6319,Kuwait Utility,geodetic,,,7019,8901,1310,"Cadastre, engineering survey.",,,EPSG,1996-04-12 00:00:00,,0
-6322,World Geodetic System 1972,geodetic,,1972,7043,8901,1262,Satellite navigation.,Used by GPS before 1987. For Transit satellite positioning see also WGS 72BE. Datum code 6323 reserved for southern hemisphere ProjCS's.,,EPSG,1999-04-22 00:00:00,99.03,0
-6324,WGS 72 Transit Broadcast Ephemeris,geodetic,,1972,7043,8901,1262,Satellite navigation.,Alleged datum for use with Transit broadcast ephemeris prior to 1989. Relationship to WGS 72 has changed over time.  Datum code 6325 reserved for southern hemisphere ProjCS's.,,EPSG,1999-04-22 00:00:00,99.03,0
-6326,World Geodetic System 1984,geodetic,Origin at geocentre.,1984,7030,8901,1262,Satellite navigation.,Datum code 6327 reserved for southern hemisphere ProjCS's,,EPSG,2002-06-22 00:00:00,2002.151,0
-6600,Anguilla 1957,geodetic,Fundamental point: station A4.,1957,7012,8901,1030,Topographic mapping.,,Ordnance Survey of Great Britain.,EPSG,1999-04-22 00:00:00,,0
-6601,Antigua 1943,geodetic,Fundamental point: station A14.,1943,7012,8901,1273,Topographic mapping.,,Ordnance Survey of Great Britain.,EPSG,1999-04-22 00:00:00,,0
-6602,Dominica 1945,geodetic,Fundamental point: station M12.,1945,7012,8901,1082,Topographic mapping.,,Ordnance Survey of Great Britain.,EPSG,1999-04-22 00:00:00,,0
-6603,Grenada 1953,geodetic,Fundamental point: station GS8.,1953,7012,8901,1551,Topographic mapping.,,Ordnance Survey of Great Britain.,EPSG,1999-04-22 00:00:00,,0
-6604,Montserrat 1958,geodetic,Fundamental point: station M36.,1958,7012,8901,1165,Topographic mapping.,,Ordnance Survey of Great Britain.,EPSG,1999-04-22 00:00:00,,0
-6605,St. Kitts 1955,geodetic,Fundamental point: station K12.,1955,7012,8901,1200,Topographic mapping.,,Ordnance Survey of Great Britain.,EPSG,1999-04-22 00:00:00,,0
-6606,St. Lucia 1955,geodetic,Fundamental point: station DCS3.,1955,7012,8901,1201,Topographic mapping.,,Ordnance Survey of Great Britain.,EPSG,1999-04-22 00:00:00,,0
-6607,St. Vincent 1945,geodetic,Fundamental point: station V1.,1945,7012,8901,1202,Topographic mapping.,,Ordnance Survey of Great Britain.,EPSG,1999-04-22 00:00:00,,0
-6608,North American Datum 1927 (1976),geodetic,Fundamental Point: Meade's Ranch. Latitude: 39 deg 13 min 26.686 sec N; Longitude: 98 deg 32 min 30.506 sec W (of Greenwich).,1976,7008,8901,1367,"Geodesy, cadastre, topographic mapping, engineering survey.",NAD27(76) used in Ontario for all maps at scale 1/20 000 and larger; elsewhere in Canada for selected purposes.,Geodetic Survey of Canada.,EPSG,1999-05-12 00:00:00,,0
-6609,North American Datum 1927 (CGQ77),geodetic,Fundamental Point: Meade's Ranch. Latitude: 39 deg 13 min 26.686 sec N; Longitude: 98 deg 32 min 30.506 sec W (of Greenwich).,1977,7008,8901,1368,"Geodesy, cadastre, topographic mapping, engineering survey.",NAD27 (CGQ77) used in Quebec for all maps at scale 1/20 000 and larger; generally for maps issued by the Quebec cartography office whose reference system is CGQ77.,Geodetic Service of Quebec.  Contact alain.bernard at mrn.gouv.qc.ca,EPSG,1 [...]
-6610,Xian 1980,geodetic,,1980,7049,8901,1067,"Geodesy, topographic and engineering survey.",,BP,EPSG,2002-02-12 00:00:00,,0
-6611,Hong Kong 1980,geodetic,"Trig ""Zero"", 38.4 feet south along the transit circle of the Kowloon Observatory. Latitude 22deg 18min 12.82sec North, longitude 114deg 10min 18.75sec East.",1980,7022,8901,1118,"Geodesy, topgraphic and engineering survey, cadastre.",Supersedes Hong Kong 1963 datum and 1973 metric adjustment.,"Survey and Mapping Office, Lands Department. http://www.info.gov.hk/landsd/mapping/tindex.htm",EPSG,2002-06-22 00:00:00,,0
-6612,Japanese Geodetic Datum 2000,geodetic,ITRF94,2000,7019,8901,1129,"Geodesy, topographic and engineering survey.",Instigated under amendment to the Japanese Surveying Law with effect from April 2002. Supersedes Tokyo datum (code 6301).,Japanese Survey Federation.,EPSG,2002-06-22 00:00:00,,0
-6613,Gunung Segara,geodetic,Station P5 (Gunung Segara) 0deg 32min 12.83sec S  117deg 08min 48.47sec E (of Greenwich).,,7004,8901,1360,Topographic mapping.,,TotalFinaElf.,EPSG,2002-06-22 00:00:00,,0
-6614,Qatar National Datum 1995,geodetic,Defined by transformation from WGS 84 - see coordinate operation code 1840.,1995,7022,8901,1346,Topographic mapping.,,Qatar Centre for Geographic Information.,EPSG,2002-06-28 00:00:00,,0
-6615,Porto Santo,geodetic,,1936,7022,8901,1314,Topographic mapping.,For Selvagens island see Selvagem Grande (code 6616).,Instituto Geografico e Cadastral Lisbon http://www.ipcc.pt,EPSG,2002-07-13 00:00:00,,0
-6616,Selvagem Grande,geodetic,,,7022,8901,2779,Topographic mapping.,,Instituto Geografico e Cadastral Lisbon http://www.ipcc.pt,EPSG,2002-07-13 00:00:00,,0
-6801,CH1903 (Bern),geodetic,Fundamental Point: Bern observatory. Latitude: 46 deg 57 min  8.660 sec N; Longitude: 0,1903,7004,8907,1286,Topographic mapping.,,Bundesamt f�r Landestopographie,EPSG,1999-10-20 00:00:00,,0
-6802,Bogota 1975 (Bogota),geodetic,Fundamental Point: Bogota observatory. Latitude: 4 deg 35 min 56.570 sec N; Longitude: 0,1975,7022,8904,1070,Topographic mapping.,,,EPSG,2000-10-19 00:00:00,2000.20,0
-6803,Lisbon 1937 (Lisbon),geodetic,Fundamental Point: Castelo Sao Jorge; Lisbon. Latitude: 38 deg 42 min 43.631 sec N; Longitude: 0,1937,7022,8902,1294,Topographic mapping.,Supersedes Lisbon 1890 adjustment (which used Bessel 1841 ellipsoid).,Instituto Geografico e Cadastral; Lisbon,EPSG,1995-06-02 00:00:00,2001.551,0
-6804,Makassar (Jakarta),geodetic,Fundamental Point: Moncongloe,,7004,8908,1316,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6805,Militar-Geographische Institut (Ferro),geodetic,Fundamental Point: Hermannskogel. Latitude: 48 deg 16 min 15.29 sec N; Longitude: 33 deg 57 min 41.06 sec E of Ferro.,1901,7004,8909,1321,Topographic mapping.,,Bundesamt fur Eich- und Vermessungswesen; Wien,EPSG,1995-06-02 00:00:00,,0
-6806,Monte Mario (Rome),geodetic,Fundamental Point: Monte Mario. Latitude: 41 deg 55 min 25.510 sec N; Longitude: 0 deg  00 min  00.000 sec E (of Rome).,,7022,8906,1127,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6807,Nouvelle Triangulation Francaise (Paris),geodetic,Fundamental Point: Pantheon,,7011,8903,1353,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6808,Padang 1884 (Jakarta),geodetic,Fundamental Point: Padang,1884,7004,8908,1355,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6809,Reseau National Belge 1950 (Brussels),geodetic,Fundamental Point: Lommel (tower). Latitude: 51 deg 13 min 47.334 sec N; Longitude: 0 deg 56 min 44.773 sec E (of Brussels).,1950,7022,8910,1347,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6810,Tananarive 1925 (Paris),geodetic,Fundamental Point: Tananarive observatory. Latitude: 18 deg 55 min  2.100 sec S; Longitude: 0,1925,7022,8903,1149,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6811,Voirol 1875 (Paris),geodetic,Fundamental Point: Voirol. Latitude: 40.835864 grads N; Longitude: 0.788735 grads E of Paris.,1875,7011,8903,1365,Topographic mapping.,,IGN Paris,EPSG,1995-06-02 00:00:00,,0
-6813,Batavia (Jakarta),geodetic,Fundamental Point: Longitude at Batavia Astro. Station. Latitude: 6 deg  7 min 39.520 sec S; Longitude: 106 deg 48 min 27.790 sec E (of Greenwich). Latitude and azimuth at Genuk.,,7004,8908,1285,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6814,Stockholm 1938 (Stockholm),geodetic,Fundamental Point: Stockholm observatory,1938,7004,8911,1225,"Geodesy, cadastre, topographic mapping, engineering survey.",Superseded by RT90 adjustment (datum code 6124),,EPSG,1996-04-12 00:00:00,,0
-6815,Greek (Athens),geodetic,Fundamental point: Athens Observatory; latitude 37 deg 58 min 20.132 sec N; longitude 0 deg E of Athens.,,7004,8912,1106,Topographic mapping.,See geodetic datum alias 6404.  Used as basis of topographic mapping based on Hatt projection.,Topography Department; National Technical University of Athens,EPSG,1997-06-16 00:00:00,,0
-6816,Carthage (Paris),geodetic,,,7011,8903,1236,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6817,NGO 1948 (Oslo),geodetic,,1948,7005,8913,1352,"Geodesy, cadastre, topographic mapping, engineering survey.",,,EPSG,1995-06-02 00:00:00,,0
-6818,S-JTSK (Ferro),geodetic,Modification of Austrian MGI (Ferro) datum.,1920,7004,8909,1306,"Geodesy, cadastre, topographic mapping, engineering survey.",,Research Institute for Geodesy Topography and Cartography (VUGTK); Prague.,EPSG,2001-08-28 00:00:00,2001.26,0
-6819,Nord Sahara 1959 (Paris),geodetic,,1959,7012,8903,1366,Topographic mapping.,Conformal transformation from adjustment in ED50 terms.,"""Le System Geodesique Nord-Sahara""; IGN Paris",EPSG,2000-06-23 00:00:00,,0
-6820,Gunung Segara (Jakarta),geodetic,Station P5 (Gunung Segara) 0deg 32min 12.83sec S  117deg 08min 48.47sec E of Greenwich (8deg 20min 20.68sec E of Jakarta).,,7004,8908,1360,Topographic mapping.,,,EPSG,2002-06-22 00:00:00,,0
-6901,Ancienne Triangulation Francaise (Paris),geodetic,,,7027,8903,1326,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6902,Nord de Guerre (Paris),geodetic,,,7027,8903,1369,Topographic mapping.,,,EPSG,1995-06-02 00:00:00,,0
-6903,Madrid 1870 (Madrid),geodetic,Fundamental point: Madrid observatory.,1870,7028,8905,1217,Topographic mapping.,,Institut de Geomatica; Barcelona,EPSG,1998-11-11 00:00:00,,0
-6904,Lisbon 1890 (Lisbon),geodetic,Fundamental Point: Castelo Sao Jorge; Lisbon. Latitude: 38 deg 42 min 43.631 sec N; Longitude: 0,1937,7004,8902,1294,Topographic mapping.,Superseded by Lisbon 1937 adjustment (which uses International 1924 ellipsoid).,Instituto Geografico e Cadastral; Lisbon. http://www.ipcc.pt,EPSG,2002-07-13 00:00:00,,0
-9300,Astra Minas,engineering,Origin at 45 deg 59 min 54.79 sec S; 67 deg 34 min 38.94 sec W.,,,,1265,Oil industry mapping.,,,EPSG,2000-03-07 00:00:00,,0
-9301,Barcelona,engineering,Centre of the gateway of San Cristobal chuch; Plaza Boyaca; Barcelona.,,,,1266,Oil industry mapping.,Coordinates variously given as 10deg 08min 06sec N  64deg 41min 17sec W and 10deg 08min 06sec N  64deg 41min 07.5sec W.  It is not clear whether there should be two local datums.,"Ministry of Mines standards manual, 1974.",EPSG,2000-03-07 00:00:00,,0
-9302,Maturin,engineering,Concrete post PR-1 in Plaza Bolivar; Maturin.  9deg 44min 55sec N  63deg 10min 40sec W.,,,,1320,Oil industry mapping.,,"Ministry of Mines standards manual, 1974.",EPSG,2000-06-10 00:00:00,,0
-9303,Maracaibo Cross,engineering,Cruz Canada Morillo in Maracaibo; 10deg 38min 32.328sec N  71deg 37min 12.12sec W  Loma Quintana datum.,,,,1319,Oil industry mapping.,,"Ministry of Mines standards manual, 1974.",EPSG,2000-06-10 00:00:00,,0
-9304,La Rosa,engineering,Monument in La Rosa; 10deg 22min 40.417sec N  71deg 26min 59.488sec W  Loma Quintana datum.,,,,1311,Oil industry mapping.,,"Ministry of Mines standards manual, 1974.",EPSG,2000-06-10 00:00:00,,0
-9305,Mene Grande,engineering,Monument in Santa Barbara; Mene Grande.  9deg 52min 25.488sec N  70deg 54min 35.310sec W.,,,,1270,Oil industry mapping.,,"Ministry of Mines standards manual, 1974.",EPSG,2000-06-10 00:00:00,,0
-9306,El Cubo,engineering,8deg 44min 17.258sec N  72deg 30min 09.01sec W.,,,,1269,Oil industry mapping.,,"Ministry of Mines standards manual, 1974.",EPSG,2000-06-10 00:00:00,,0
-9307,Dabajuro,engineering,Church tower at Dabajuro; 11deg 01min 19sec N  70deg 40min 40sec W.,,,,1268,Oil industry mapping.,,"Ministry of Mines standards manual, 1974.",EPSG,2000-06-10 00:00:00,,0
-9308,Tucupita,engineering,Centre of Plaza Bolivar; Tucupita; 9deg 03min 32sec N  62deg 03min 07.6sec W.,,,,1370,Oil industry mapping.,,"Ministry of Mines standards manual, 1974.",EPSG,2000-06-10 00:00:00,,0
-9309,El Mene,engineering,10deg 04min 49.1sec N  71deg 02min 10sec W.,,,,1270,Oil industry mapping.,,"Ministry of Mines standards manual, 1974.",EPSG,2000-06-10 00:00:00,,0
-9310,Santa Maria de Ipire,engineering,Concrete post PR-1 in Plaza Bolivar; Santa Maria de Ipire; 8deg 40min 06sec N  65deg 19min 09sec W.,,,,1371,Oil industry mapping.,,"Ministry of Mines standards manual, 1974.",EPSG,2000-06-10 00:00:00,,0
-9311,Barinas west base,engineering,Concrete pillar,,,,1267,Oil industry mapping.,,"Ministry of Mines standards manual, 1974.",EPSG,2000-06-10 00:00:00,,0
-9312,EPSG example  X,engineering,Bin grid I=J=1 at WGS 84 / UTM zone 31N 456781E 5836723N.,,,,1263,Example only.,"Bin grid orientation = 20 degrees grid.  Bin width I=25m, J=12.5m.  Bin increment I=1, J=1.  Scale factor at origin 0.99984.
-
-Example only!",UKOOA P6/98 documentation,EPSG,2000-06-23 00:00:00,,0
-9313,EPSG example Platform Y,engineering,Conductor slot A1,,,,1263,Example only.,Example only,EPSG,EPSG,2000-06-23 00:00:00,,0
diff --git a/src/tiff/csv/deprecation.csv b/src/tiff/csv/deprecation.csv
deleted file mode 100644
index 4910cce..0000000
--- a/src/tiff/csv/deprecation.csv
+++ /dev/null
@@ -1,276 +0,0 @@
-"DEPRECATION_ID","DEPRECATION_DATE","CHANGE_ID","OBJECT_TABLE_NAME","OBJECT_CODE","REPLACED_BY","DEPRECATION_REASON"
-2,2001-08-15 00:00:00,2001.223,Coordinate_Operation,8563,1670,Replaced concatenated tfm with zero step by single tfm.
-3,2001-08-15 00:00:00,2001.222,Coordinate_Operation,8457,1676,Replaced concatenated tfm with zero step by single tfm.
-4,2001-08-15 00:00:00,2001.222,Coordinate_Operation,8236,1675,Replaced concatenated tfm with zero step by single tfm.
-5,2001-08-15 00:00:00,2001.222,Coordinate_Operation,8183,1677,Replaced concatenated tfm with zero step by single tfm.
-6,2001-08-15 00:00:00,2001.222,Coordinate_Operation,8195,1680,Replaced concatenated tfm with zero step by single tfm.
-7,2001-08-15 00:00:00,2001.222,Coordinate_Operation,8199,1679,Replaced concatenated tfm with zero step by single tfm.
-8,2001-08-15 00:00:00,2001.222,Coordinate_Operation,8234,1673,Replaced concatenated tfm with zero step by single tfm.
-9,2001-08-15 00:00:00,2001.222,Coordinate_Operation,8567,1681,Replaced concatenated tfm with zero step by single tfm.
-10,2001-08-15 00:00:00,2001.222,Coordinate_Operation,8572,1672,Replaced concatenated tfm with zero step by single tfm.
-11,2001-08-15 00:00:00,2001.222,Coordinate_Operation,8573,1671,Replaced concatenated tfm with zero step by single tfm.
-12,2001-08-15 00:00:00,2001.222,Coordinate_Operation,8580,1678,Replaced concatenated tfm with zero step by single tfm.
-13,2001-08-15 00:00:00,2001.221,Coordinate_Operation,8396,1665,Replaced concatenated tfm with zero step by single tfm.
-14,2001-08-15 00:00:00,2001.221,Coordinate_Operation,8400,1666,Replaced concatenated tfm with zero step by single tfm.
-15,2001-08-15 00:00:00,2001.221,Coordinate_Operation,8576,1667,Replaced concatenated tfm with zero step by single tfm.
-16,2001-08-15 00:00:00,2001.221,Coordinate_Operation,8577,1668,Replaced concatenated tfm with zero step by single tfm.
-17,2001-08-15 00:00:00,2001.221,Coordinate_Operation,8194,1669,Replaced concatenated tfm with zero step by single tfm.
-18,2001-08-15 00:00:00,2001.221,Coordinate_Operation,8190,1665,Replaced concatenated tfms with zero step by single tfm with 1m accuracy.
-19,2001-08-15 00:00:00,2001.221,Coordinate_Operation,8192,1669,Replaced concatenated tfm with zero step by single tfm with 1m accuracy.
-20,2001-08-15 00:00:00,2001.221,Coordinate_Operation,8398,1667,Replaced concatenated tfm with zero step by single tfm with 1m accuracy.
-21,2001-08-15 00:00:00,2001.221,Coordinate_Operation,8408,1666,Replaced concatenated tfm with zero step by single tfm with 1m accuracy.
-22,2001-08-15 00:00:00,2001.221,Coordinate_Operation,8453,1667,Replaced concatenated tfm with zero step by single tfm with 1m accuracy.
-23,2001-08-15 00:00:00,2001.221,Coordinate_Operation,8454,1668,Replaced concatenated tfm with zero step by single tfm with 1m accuracy.
-24,2001-08-15 00:00:00,2001.221,Coordinate_Operation,8560,1669,Replaced concatenated tfm with zero step by single tfm with 1m accuracy.
-25,2001-08-15 00:00:00,2001.221,Coordinate_Operation,8578,1665,Replaced concatenated tfm with zero step by single tfms with 1m accuracy.
-26,2001-08-15 00:00:00,2001.221,Coordinate_Operation,8579,1669,Replaced concatenated tfm with zero step by single tfm with 1m accuracy.
-27,2001-10-04 00:00:00,2001.121,Coordinate_Operation,1510,1766,NMA has reduced precision with which it quotes parameter values for this tfm.
-28,2001-10-04 00:00:00,2001.45,Coordinate_Operation,14100,15302,Error in parameter values for easting and northing at grid origin.
-29,2001-10-04 00:00:00,2001.45,Coordinate_Operation,11631,15303,Error in parameter value for latitude of 2nd standard parallel.
-30,2001-08-28 00:00:00,2001.37,Coordinate_Operation,1508,1753,Incorrect unit assigned to scale difference parameter value.
-32,2001-06-05 00:00:00,2001.07,Ellipsoid,7035,7047,"Changed from general ""Sphere"" to specific ""GRS 1980 Authalic Sphere""."
-33,2001-06-25 00:00:00,2001.19,Ellipsoid,7047,7048,Incorrect radius (semi-major and semi-minor axes).
-34,2001-06-21 00:00:00,2001.07,Datum,6035,6047,"Name changed to reflect use of specific ""GRS 1980 Authalic Sphere"" rather than general ""Sphere""."
-35,1997-11-13 00:00:00,97.372,Datum,5107,5118,Replace this general name to specific.
-38,,2001.181,Datum,6314,6177,Correction to name spelling.
-39,2001-08-28 00:00:00,2001.32,Coordinate Reference System,2156,2195,ProjCRS 2156 invalid as linked to projection in wrong hemisphere and has wrong name.
-40,2001-08-28 00:00:00,2001.32,Coordinate_Operation,15300,15301,Longitude of natural origin has incorrect value (wrong hemisphere).
-41,2001-08-28 00:00:00,2001.3,Coordinate Reference System,2291,2292,Source geogCRS code is in error.
-42,2001-06-05 00:00:00,2001.07,Coordinate Reference System,4035,4047,"Changed from general ""Sphere"" to specific ""GRS 1980 Authalic Sphere""."
-43,2001-08-28 00:00:00,2001.47,Datum,6226,6142,Does not exist except as an alias of 6142 and 6143.
-44,2001-06-05 00:00:00,2001.11,Coordinate Reference System,4226,4142,Does not exist except as an alias of 4142 and 4143.
-45,2001-06-05 00:00:00,2001.181,Coordinate Reference System,31461,,ProjCRS zone not used.
-46,2001-06-05 00:00:00,2001.181,Coordinate Reference System,31462,31466,ProjCRS related to inappropriate coordinate system resulting in incorrect axes and name.
-47,2001-06-05 00:00:00,2001.181,Coordinate Reference System,31463,31467,ProjCRS related to inappropriate coordinate system resulting in incorrect axes and name.
-48,2001-06-05 00:00:00,2001.181,Coordinate Reference System,31464,31468,ProjCRS related to inappropriate coordinate system resulting in incorrect axes and name.
-49,2001-06-05 00:00:00,2001.181,Coordinate Reference System,31465,31469,ProjCRS related to inappropriate coordinate system resulting in incorrect axes and name.
-50,2001-06-05 00:00:00,2001.18,Coordinate Reference System,31265,31275,ProjCRS related to inappropriate projection (coordinate operation) and CS resulting in incorrect scale factor and axes order and abbreviation.
-51,2001-06-05 00:00:00,2001.18,Coordinate Reference System,31266,31276,ProjCRS related to inappropriate projection (coordinate operation) and CS resulting in incorrect scale factor and axes order and abbreviation.
-52,2001-08-15 00:00:00,2001.227,Coordinate_Operation,8564,1691,Replaced concatenated tfm with zero step by single tfm.
-53,2001-08-15 00:00:00,2001.227,Coordinate_Operation,8404,1692,Replaced concatenated tfm with zero step by single tfm.
-54,2001-08-15 00:00:00,2001.227,Coordinate_Operation,8565,1692,Replaced concatenated tfm with zero step by single tfm.
-55,2001-08-15 00:00:00,2001.227,Coordinate_Operation,8243,1693,Replaced concatenated tfm with zero step by single tfm.
-56,2001-08-15 00:00:00,2001.227,Coordinate_Operation,8245,1693,Replaced concatenated tfm with zero step by single tfm.
-57,2001-08-15 00:00:00,2001.227,Coordinate_Operation,8574,1694,Replaced concatenated tfm with zero step by single tfm.
-58,2001-08-15 00:00:00,2001.227,Coordinate_Operation,8575,1695,Replaced concatenated tfm with zero step by single tfm.
-59,2001-08-15 00:00:00,2001.227,Coordinate_Operation,8566,1696,Replaced concatenated tfm with zero step by single tfm.
-60,2001-08-15 00:00:00,2001.227,Coordinate_Operation,8421,1697,Replaced concatenated tfm with zero step by single tfm.
-61,2001-08-15 00:00:00,2001.227,Coordinate_Operation,8388,1698,Replaced concatenated tfm with zero step by single tfm.
-62,2001-08-15 00:00:00,2001.227,Coordinate_Operation,8390,1699,Replaced concatenated tfm with zero step by single tfm.
-63,2001-08-15 00:00:00,2001.227,Coordinate_Operation,8392,1700,Replaced concatenated tfm with zero step by single tfm.
-64,2001-08-15 00:00:00,2001.227,Coordinate_Operation,8422,1702,Replaced concatenated tfm with zero step by single tfm.
-65,2001-08-15 00:00:00,2001.226,Coordinate_Operation,8215,1683,Replaced concatenated tfm with zero step by single tfm.
-66,2001-08-15 00:00:00,2001.226,Coordinate_Operation,8217,1684,Replaced concatenated tfm with zero step by single tfm.
-67,2001-08-15 00:00:00,2001.226,Coordinate_Operation,8219,1685,Replaced concatenated tfm with zero step by single tfm.
-68,2001-08-15 00:00:00,2001.226,Coordinate_Operation,8221,1686,Replaced concatenated tfm with zero step by single tfm.
-69,2001-08-15 00:00:00,2001.226,Coordinate_Operation,8223,1687,Replaced concatenated tfm with zero step by single tfm.
-70,2001-08-15 00:00:00,2001.225,Coordinate_Operation,8530,1682,Replaced concatenated tfm with zero step by single tfm.
-71,2001-06-05 00:00:00,2001.18,Coordinate Reference System,31267,31277,ProjCRS related to inappropriate projection (coordinate operation) and CS resulting in incorrect scale factor and axes order and abbreviation.
-72,2001-06-05 00:00:00,2001.18,Coordinate Reference System,31268,31278,ProjCRS related to inappropriate projection (coordinate operation) and CS resulting in incorrect scale factor and axes order and abbreviation.
-73,2001-08-28 00:00:00,2001.31,Coordinate Reference System,31278,31279,ProjCRS related to incorrect projection.
-74,2001-06-05 00:00:00,2001.182,Coordinate Reference System,31291,31281,ProjCRS related to inappropriate coordinate system resulting in incorrect axes.
-75,2001-06-05 00:00:00,2001.182,Coordinate Reference System,31292,31282,ProjCRS related to inappropriate coordinate system resulting in incorrect axes.
-76,2001-06-05 00:00:00,2001.182,Coordinate Reference System,31293,31283,ProjCRS related to inappropriate coordinate system resulting in incorrect axes.
-77,2001-06-05 00:00:00,2001.182,Coordinate Reference System,31294,31284,ProjCRS related to inappropriate coordinate system resulting in incorrect axes.
-78,2001-06-05 00:00:00,2001.182,Coordinate Reference System,31295,31285,ProjCRS related to inappropriate coordinate system resulting in incorrect axes.
-79,2001-06-05 00:00:00,2001.182,Coordinate Reference System,31296,31286,ProjCRS related to inappropriate coordinate system resulting in incorrect axes.
-80,2001-06-05 00:00:00,2001.182,Coordinate Reference System,31297,31287,ProjCRS related to inappropriate coordinate system resulting in incorrect axes.
-81,2001-06-05 00:00:00,2001.183,Coordinate_Operation,1471,1618,Error in signs of all transformation parameter values and for scale factor also incorrect units.
-82,2001-08-15 00:00:00,2001.122,Coordinate_Operation,1310,1674,Change of source CRS.
-83,2001-08-28 00:00:00,2001.4,Coordinate_Operation,8497,,Invalid concatenation: area of use of steps 1 and 2 do not overlap.
-84,2001-10-04 00:00:00,2001.39,Coordinate_Operation,1258,1755,Correction to name.
-85,2001-10-04 00:00:00,2001.39,Coordinate_Operation,1259,1756,Correction to name.
-86,2001-10-04 00:00:00,2001.39,Coordinate_Operation,1261,1757,Correction to name.
-87,2001-10-04 00:00:00,2001.39,Coordinate_Operation,1263,1758,Correction to name.
-88,2001-10-04 00:00:00,2001.39,Coordinate_Operation,1268,1759,Correction to name.
-89,2001-10-04 00:00:00,2001.39,Coordinate_Operation,1269,1760,Correction to name.
-90,2001-10-04 00:00:00,2001.39,Coordinate_Operation,1270,1761,Correction to name.
-91,2001-10-04 00:00:00,2001.39,Coordinate_Operation,1466,1762,Correction to name.
-92,2001-10-04 00:00:00,2001.39,Coordinate_Operation,1467,1763,Correction to name.
-93,2001-10-04 00:00:00,2001.39,Coordinate_Operation,1468,1764,Correction to name.
-94,2001-10-04 00:00:00,2001.39,Coordinate_Operation,1519,1765,Correction to name.
-95,2001-08-28 00:00:00,2001.38,Coordinate_Operation,1534,1754,Incorrect unit assigned to scale difference parameter value.
-96,2001-08-28 00:00:00,2001.35,Coordinate_Operation,1602,1752,Incorrect source geogCRS code assigned.
-97,2001-08-28 00:00:00,2001.34,Coordinate_Operation,1571,1751,Incorrect source and target geogCRS codes assigned.
-98,2001-08-28 00:00:00,2001.23,Coordinate_Operation,1567,1701,Incorrect parameter value for z-axis rotation.
-99,2001-08-15 00:00:00,2001.228,Coordinate_Operation,8386,8582,Changed second step from zero to HARN.
-100,2001-08-15 00:00:00,2001.228,Coordinate_Operation,8402,8583,Changed second step from zero to HARN.
-101,2001-08-15 00:00:00,2001.227,Coordinate_Operation,8418,1688,Replaced concatenated tfm with zero step by single tfm.
-102,2001-08-15 00:00:00,2001.227,Coordinate_Operation,8419,1689,Replaced concatenated tfm with zero step by single tfm.
-103,2001-08-15 00:00:00,2001.227,Coordinate_Operation,8406,1690,Replaced concatenated tfm with zero step by single tfm.
-104,2001-08-15 00:00:00,2001.227,Coordinate_Operation,8394,1691,Replaced concatenated tfm with zero step by single tfm.
-105,2001-11-06 00:00:00,2001.48,Coordinate_Operation,19908,19972,Change name.
-106,2001-08-28 00:00:00,2001.48,Coordinate Reference System,29900,29902,Change name.
-107,2001-06-05 00:00:00,2001.181,Area,1628,,Invalid area - country does not extend into this longitude range..
-108,2001-08-15 00:00:00,2001.227,Coordinate_Operation,8420,1703,Replaced concatenated tfm with zero step by single tfm.
-109,2001-08-28 00:00:00,2001.32,Coordinate Reference System,2155,2194,Dependent upon deprecated coordinate operation 15300.
-112,2001-08-15 00:00:00,2001.221,Coordinate_Operation,8190,1666,Replaced concatenated tfms with zero step by single tfm with 1m accuracy.
-117,1997-11-13 00:00:00,97.372,Datum,5107,5120,Replace this general name to specific.
-135,2001-08-15 00:00:00,2001.221,Coordinate_Operation,8190,1667,Replaced concatenated tfms with zero step by single tfm with 1m accuracy.
-142,2001-08-15 00:00:00,2001.221,Coordinate_Operation,8578,1666,Replaced concatenated tfm with zero step by single tfms with 1m accuracy.
-160,2001-08-28 00:00:00,2001.47,Datum,6226,6143,Does not exist except as an alias of 6142 and 6143.
-161,2001-06-05 00:00:00,2001.11,Coordinate Reference System,4226,4143,Does not exist except as an alias of 4142 and 4143.
-229,2001-08-15 00:00:00,2001.221,Coordinate_Operation,8190,1668,Replaced concatenated tfms with zero step by single tfm with 1m accuracy.
-233,1997-11-13 00:00:00,97.372,Datum,5107,5119,Replace this general name to specific.
-237,2001-11-06 00:00:00,2001.53,Datum,6172,6190,Original name POSGAR is ambiguous given 1994 and 1998 adjustments.
-240,2001-11-06 00:00:00,2001.53,Coordinate Reference System,4172,4190,Original name POSGAR is ambiguous given 1994 and 1998 adjustments.
-242,2001-11-06 00:00:00,2001.53,Coordinate_Operation,1598,1773,Dependent upon deprecated source CRS 4172.
-244,2001-11-06 00:00:00,2001.54,Coordinate Reference System,27581,27571,Changed projCRS name.
-245,2001-11-06 00:00:00,2001.54,Coordinate Reference System,27582,27572,Changed projCRS name.
-246,2001-11-06 00:00:00,2001.54,Coordinate Reference System,27583,27573,Changed projCRS name.
-247,2001-11-06 00:00:00,2001.54,Coordinate Reference System,27584,27574,Changed projCRS name.
-248,2001-11-06 00:00:00,2001.54,Coordinate Reference System,27591,27561,Changed projCRS name.
-249,2001-11-06 00:00:00,2001.54,Coordinate Reference System,27592,27562,Changed projCRS name.
-250,2001-11-06 00:00:00,2001.54,Coordinate Reference System,27593,27563,Changed projCRS name.
-251,2001-11-06 00:00:00,2001.54,Coordinate Reference System,27594,27564,Changed projCRS name.
-260,2001-11-06 00:00:00,2001.54,Coordinate Reference System,7401,7411,Dependent projCRS name changed.
-261,2001-11-06 00:00:00,2001.54,Coordinate Reference System,7402,7412,Dependent projCRS name changed.
-262,2001-11-06 00:00:00,2001.54,Coordinate Reference System,7403,7413,Dependent projCRS name changed.
-266,2001-01-21 00:00:00,2001.15,Ellipsoid,7006,7046,Change of axis unit from International metre to German Legal Metre to reflect local usage.
-268,2001-11-06 00:00:00,2001.45,Coordinate Reference System,32036,2204,Dependent map projection 11631 in error.
-270,2001-11-06 00:00:00,2001.45,Coordinate Reference System,26979,2205,Dependent map projection 14100 in error.
-272,2002-01-18 00:00:00,2001.03,Coordinate_Operation,1656,,EPSG copy of ITRF transformation superseded by tfm code 1791.
-273,2002-01-18 00:00:00,2001.03,Coordinate_Operation,1658,,EPSG copy of ITRF transformation superseded by tfm code 1793.
-274,2002-01-18 00:00:00,2002.01,Datum,6228,6192,Incorrect ellipsoid attached.
-276,2002-01-18 00:00:00,2002.01,Datum,6260,6193,Incorrect ellipsoid attached.
-278,2002-01-18 00:00:00,2002.01,Coordinate Reference System,4228,4192,Dependent datum 6228 in error.
-280,2002-01-18 00:00:00,2002.01,Coordinate Reference System,4260,4193,Dependent datum 6260 in error.
-282,2002-01-18 00:00:00,2002.01,Coordinate Reference System,22832,2214,Dependent geogCRS 4228 deprecated due to datum error.
-285,2002-01-18 00:00:00,2001.17,Datum,6287,6194,Change of name.
-287,2002-01-18 00:00:00,2001.17,Coordinate Reference System,4287,4194,Change of name (adjustment date added).
-288,2002-01-18 00:00:00,2001.17,Coordinate_Operation,1211,1797,Dependent source CRS name changed.
-289,2002-02-12 00:00:00,2002.06,Coordinate_Operation,1559,1593,8-bit binary grid file format inconsistent with NTv2 16-bit format.
-290,2002-02-12 00:00:00,2002.01,Datum,6234,6197,Incorrect ellipsoid attached.
-291,2002-02-12 00:00:00,2002.21,Coordinate Reference System,32074,32064,Change name to include unit abbreviation per US State Plane CRSs.
-294,2002-02-12 00:00:00,2002.21,Coordinate Reference System,32075,32065,Change name to include unit abbreviation per US State Plane CRSs.
-295,2002-02-12 00:00:00,2002.21,Coordinate Reference System,32076,32066,Change name to include unit abbreviation per US State Plane CRSs.
-296,2002-02-12 00:00:00,2002.21,Coordinate Reference System,32077,32067,Change name to include unit abbreviation per US State Plane CRSs.
-297,2002-03-15 00:00:00,2002.29,Coordinate_Operation,1819,1754,Duplication of data already given in transformation 1754.
-298,2002-06-22 00:00:00,2002.16,Coordinate Reference System,5704,5736,Change of name following readjustment.
-299,2002-06-22 00:00:00,2002.16,Coordinate Reference System,21473,21453,Change of CRS name to indicate longitude of origin.
-300,2002-06-22 00:00:00,2002.16,Coordinate Reference System,21474,21454,Change of CRS name to indicate longitude of origin.
-301,2002-06-22 00:00:00,2002.16,Coordinate Reference System,21475,21455,Change of CRS name to indicate longitude of origin.
-302,2002-06-22 00:00:00,2002.16,Coordinate Reference System,21476,21456,Change of CRS name to indicate longitude of origin.
-303,2002-06-22 00:00:00,2002.16,Coordinate Reference System,21477,21457,Change of CRS name to indicate longitude of origin.
-304,2002-06-22 00:00:00,2002.16,Coordinate Reference System,21478,21458,Change of CRS name to indicate longitude of origin.
-305,2002-06-22 00:00:00,2002.16,Coordinate Reference System,21479,21459,Change of CRS name to indicate longitude of origin.
-306,2002-06-22 00:00:00,2002.16,Coordinate Reference System,21480,21460,Change of CRS name to indicate longitude of origin.
-307,2002-06-22 00:00:00,2002.16,Coordinate Reference System,21481,21461,Change of CRS name to indicate longitude of origin.
-308,2002-06-22 00:00:00,2002.16,Coordinate Reference System,21482,21462,Change of CRS name to indicate longitude of origin.
-309,2002-06-22 00:00:00,2002.16,Coordinate Reference System,21483,21463,Change of CRS name to indicate longitude of origin.
-311,2002-06-22 00:00:00,2002.36,Coordinate Reference System,2199,2462,Added hyphen to Gauss-Kruger in CRS name.
-312,2002-06-22 00:00:00,2002.36,Coordinate Reference System,2166,2397,Added hyphen to Gauss-Kruger in CRS name.
-313,2002-06-22 00:00:00,2002.36,Coordinate Reference System,2167,2398,Added hyphen to Gauss-Kruger in CRS name.
-314,2002-06-22 00:00:00,2002.36,Coordinate Reference System,2168,2399,Added hyphen to Gauss-Kruger in CRS name.
-315,2002-06-22 00:00:00,2002.36,Coordinate Reference System,2091,2395,Added hyphen to Gauss-Kruger in CRS name.
-316,2002-06-22 00:00:00,2002.36,Coordinate Reference System,2092,2396,Added hyphen to Gauss-Kruger in CRS name.
-317,2002-06-22 00:00:00,2002.36,Coordinate Reference System,20092,2491,Change of CRS name to indicate longitude of origin.
-318,2002-06-22 00:00:00,2002.36,Coordinate Reference System,20091,2490,Change of CRS name to indicate longitude of origin.
-319,2002-06-22 00:00:00,2002.36,Coordinate Reference System,20090,2489,Change of CRS name to indicate longitude of origin.
-320,2002-06-22 00:00:00,2002.36,Coordinate Reference System,20089,2488,Change of CRS name to indicate longitude of origin.
-321,2002-06-22 00:00:00,2002.36,Coordinate Reference System,20088,2487,Change of CRS name to indicate longitude of origin.
-322,2002-06-22 00:00:00,2002.36,Coordinate Reference System,20087,2486,Change of CRS name to indicate longitude of origin.
-323,2002-06-22 00:00:00,2002.36,Coordinate Reference System,20086,2485,Change of CRS name to indicate longitude of origin.
-324,2002-06-22 00:00:00,2002.36,Coordinate Reference System,20085,2484,Change of CRS name to indicate longitude of origin.
-325,2002-06-22 00:00:00,2002.36,Coordinate Reference System,20084,2483,Change of CRS name to indicate longitude of origin.
-326,2002-06-22 00:00:00,2002.36,Coordinate Reference System,20083,2482,Change of CRS name to indicate longitude of origin.
-327,2002-06-22 00:00:00,2002.36,Coordinate Reference System,20082,2481,Change of CRS name to indicate longitude of origin.
-328,2002-06-22 00:00:00,2002.36,Coordinate Reference System,20081,2480,Change of CRS name to indicate longitude of origin.
-329,2002-06-22 00:00:00,2002.36,Coordinate Reference System,20080,2479,Change of CRS name to indicate longitude of origin.
-330,2002-06-22 00:00:00,2002.36,Coordinate Reference System,20079,2478,Change of CRS name to indicate longitude of origin.
-331,2002-06-22 00:00:00,2002.36,Coordinate Reference System,20078,2477,Change of CRS name to indicate longitude of origin.
-332,2002-06-22 00:00:00,2002.36,Coordinate Reference System,20077,2476,Change of CRS name to indicate longitude of origin.
-333,2002-06-22 00:00:00,2002.36,Coordinate Reference System,20076,2475,Change of CRS name to indicate longitude of origin.
-334,2002-06-22 00:00:00,2002.36,Coordinate Reference System,20075,2474,Change of CRS name to indicate longitude of origin.
-335,2002-06-22 00:00:00,2002.36,Coordinate Reference System,20074,2473,Change of CRS name to indicate longitude of origin.
-336,2002-06-22 00:00:00,2002.36,Coordinate Reference System,20073,2472,Change of CRS name to indicate longitude of origin.
-337,2002-06-22 00:00:00,2002.36,Coordinate Reference System,20072,2471,Change of CRS name to indicate longitude of origin.
-338,2002-06-22 00:00:00,2002.36,Coordinate Reference System,20071,2470,Change of CRS name to indicate longitude of origin.
-339,2002-06-22 00:00:00,2002.36,Coordinate Reference System,20070,2469,Change of CRS name to indicate longitude of origin.
-340,2002-06-22 00:00:00,2002.36,Coordinate Reference System,20069,2468,Change of CRS name to indicate longitude of origin.
-341,2002-06-22 00:00:00,2002.36,Coordinate Reference System,20068,2467,Change of CRS name to indicate longitude of origin.
-342,2002-06-22 00:00:00,2002.36,Coordinate Reference System,20067,2466,Change of CRS name to indicate longitude of origin.
-343,2002-06-22 00:00:00,2002.36,Coordinate Reference System,20066,2465,Change of CRS name to indicate longitude of origin.
-344,2002-06-22 00:00:00,2002.36,Coordinate Reference System,20065,2464,Change of CRS name to indicate longitude of origin.
-345,2002-06-22 00:00:00,2002.36,Coordinate Reference System,20064,2463,Change of CRS name to indicate longitude of origin.
-346,2002-06-22 00:00:00,2002.36,Coordinate Reference System,28462,2492,Change of CRS name to indicate longitude of origin.
-347,2002-06-22 00:00:00,2002.36,Coordinate Reference System,28463,2493,Change of CRS name to indicate longitude of origin.
-348,2002-06-22 00:00:00,2002.36,Coordinate Reference System,28464,2494,Change of CRS name to indicate longitude of origin.
-349,2002-06-22 00:00:00,2002.36,Coordinate Reference System,28465,2495,Change of CRS name to indicate longitude of origin.
-350,2002-06-22 00:00:00,2002.36,Coordinate Reference System,28466,2496,Change of CRS name to indicate longitude of origin.
-351,2002-06-22 00:00:00,2002.36,Coordinate Reference System,28467,2497,Change of CRS name to indicate longitude of origin.
-352,2002-06-22 00:00:00,2002.36,Coordinate Reference System,28468,2498,Change of CRS name to indicate longitude of origin.
-353,2002-06-22 00:00:00,2002.36,Coordinate Reference System,28469,2499,Change of CRS name to indicate longitude of origin.
-354,2002-06-22 00:00:00,2002.36,Coordinate Reference System,28470,2500,Change of CRS name to indicate longitude of origin.
-355,2002-06-22 00:00:00,2002.36,Coordinate Reference System,28471,2501,Change of CRS name to indicate longitude of origin.
-356,2002-06-22 00:00:00,2002.36,Coordinate Reference System,28472,2502,Change of CRS name to indicate longitude of origin.
-357,2002-06-22 00:00:00,2002.36,Coordinate Reference System,28473,2503,Change of CRS name to indicate longitude of origin.
-358,2002-06-22 00:00:00,2002.36,Coordinate Reference System,28474,2504,Change of CRS name to indicate longitude of origin.
-359,2002-06-22 00:00:00,2002.36,Coordinate Reference System,28475,2505,Change of CRS name to indicate longitude of origin.
-360,2002-06-22 00:00:00,2002.36,Coordinate Reference System,28476,2506,Change of CRS name to indicate longitude of origin.
-361,2002-06-22 00:00:00,2002.36,Coordinate Reference System,28477,2507,Change of CRS name to indicate longitude of origin.
-362,2002-06-22 00:00:00,2002.36,Coordinate Reference System,28478,2508,Change of CRS name to indicate longitude of origin.
-363,2002-06-22 00:00:00,2002.36,Coordinate Reference System,28479,2509,Change of CRS name to indicate longitude of origin.
-364,2002-06-22 00:00:00,2002.36,Coordinate Reference System,28480,2510,Change of CRS name to indicate longitude of origin.
-365,2002-06-22 00:00:00,2002.36,Coordinate Reference System,28481,2511,Change of CRS name to indicate longitude of origin.
-366,2002-06-22 00:00:00,2002.36,Coordinate Reference System,28482,2512,Change of CRS name to indicate longitude of origin.
-367,2002-06-22 00:00:00,2002.36,Coordinate Reference System,28483,2513,Change of CRS name to indicate longitude of origin.
-368,2002-06-22 00:00:00,2002.36,Coordinate Reference System,28484,2514,Change of CRS name to indicate longitude of origin.
-369,2002-06-22 00:00:00,2002.36,Coordinate Reference System,28485,2515,Change of CRS name to indicate longitude of origin.
-370,2002-06-22 00:00:00,2002.36,Coordinate Reference System,28486,2516,Change of CRS name to indicate longitude of origin.
-371,2002-06-22 00:00:00,2002.36,Coordinate Reference System,28487,2517,Change of CRS name to indicate longitude of origin.
-372,2002-06-22 00:00:00,2002.36,Coordinate Reference System,28488,2518,Change of CRS name to indicate longitude of origin.
-373,2002-06-22 00:00:00,2002.36,Coordinate Reference System,28489,2519,Change of CRS name to indicate longitude of origin.
-374,2002-06-22 00:00:00,2002.36,Coordinate Reference System,28490,2520,Change of CRS name to indicate longitude of origin.
-375,2002-06-22 00:00:00,2002.36,Coordinate Reference System,28491,2521,Change of CRS name to indicate longitude of origin.
-376,2002-06-22 00:00:00,2002.36,Coordinate Reference System,28492,2522,Change of CRS name to indicate longitude of origin.
-377,2002-06-22 00:00:00,2002.32,Coordinate_Operation,1316,1796,Change of source CRS name.
-378,2002-06-22 00:00:00,2002.4,Coordinate_Operation,1335,1827,Incorrect unit for latitude offset.
-379,2002-06-22 00:00:00,2002.37,Coordinate_Operation,1273,1829,Incorrect sign of transformation parameter values for direction of transformation.
-380,2002-06-22 00:00:00,2002.37,Coordinate_Operation,1677,1830,Error in in sign of dX relative to source transformation 1273. Incorrect sign of transformation parameter values (other than dX) for direction of transformation.
-381,2002-06-22 00:00:00,2002.151,Datum,6294,6613,Change of spelling of name.
-382,2002-06-22 00:00:00,2002.151,Coordinate Reference System,4294,4613,Change of spelling of name.
-383,2002-06-22 00:00:00,2002.151,Coordinate_Operation,1286,1834,Change of spelling of name of source CRS.
-384,2002-06-22 00:00:00,2002.151,Datum,6125,6613,Not a self-standing datum but an extension of the Segara datum.
-385,2002-06-22 00:00:00,2002.151,Coordinate Reference System,4125,4613,Samboja is not a separate geogCRS but an extension of the Segara CRS.
-386,2002-06-22 00:00:00,2002.151,Coordinate_Operation,1282,1838,Change of name of source CRS
-387,2002-06-22 00:00:00,2002.151,Coordinate Reference System,2550,2933,Change name of source geogCRS.
-388,2002-07-13 00:00:00,2002.25,Datum,6185,6615,Information from Portugal suggests EuroGeographics information is incomplete.
-389,2002-07-13 00:00:00,2002.25,Datum,6185,6616,Information from Portugal suggests EuroGeographics information is incomplete.
-390,2002-07-13 00:00:00,2002.25,Coordinate Reference System,4185,4615,Information from Portugal suggests EuroGeographics information is incomplete.
-391,2002-07-13 00:00:00,2002.25,Coordinate Reference System,4185,4616,Information from Portugal suggests EuroGeographics information is incomplete.
-392,2002-07-13 00:00:00,2002.25,Coordinate Reference System,2191,2942,Information from Portugal suggests EuroGeographics information is incomplete.
-393,2002-07-13 00:00:00,2002.25,Coordinate Reference System,2191,2943,Information from Portugal suggests EuroGeographics information is incomplete.
-394,2002-07-13 00:00:00,2002.41,Coordinate_Operation,1473,1842,Change of Source CRS name
-395,2002-07-13 00:00:00,2002.41,Coordinate_Operation,1472,1841,Change in Target CRS name.
-396,2002-07-13 00:00:00,2002.41,Coordinate_Operation,1599,1846,Change in Target CRS name.
-397,2002-07-13 00:00:00,2002.41,Coordinate_Operation,1574,1844,Change in Target CRS name.
-398,2002-07-13 00:00:00,2002.41,Coordinate_Operation,1600,1847,Change in Target CRS name.
-399,2002-07-13 00:00:00,2002.41,Coordinate_Operation,8584,8635,Change in Target CRS name.
-400,2002-07-13 00:00:00,2002.41,Coordinate_Operation,1576,1845,Change in Target CRS name.
-401,2002-07-13 00:00:00,2002.41,Coordinate_Operation,1572,1843,Change in Target CRS name.
-402,2002-07-13 00:00:00,2002.41,Coordinate_Operation,1601,1848,Change in Target CRS name.
-403,2002-07-13 00:00:00,2002.41,Coordinate_Operation,1752,1849,Change in Target CRS name.
-404,2002-07-13 00:00:00,2002.41,Coordinate Reference System,4140,4617,Change of CRS name to accord with revised Geomatics Canada practice.
-405,2002-07-13 00:00:00,2002.41,Coordinate Reference System,2147,2952,Change of geogCRS name to accord with revised Geomatics Canada practice.
-406,2002-07-13 00:00:00,2002.41,Coordinate Reference System,2140,2945,Change of geogCRS name to accord with revised Geomatics Canada practice.
-407,2002-07-13 00:00:00,2002.41,Coordinate Reference System,2141,2946,Change of geogCRS name to accord with revised Geomatics Canada practice.
-408,2002-07-13 00:00:00,2002.41,Coordinate Reference System,2142,2947,Change of geogCRS name to accord with revised Geomatics Canada practice.
-409,2002-07-13 00:00:00,2002.41,Coordinate Reference System,2143,2948,Change of geogCRS name to accord with revised Geomatics Canada practice.
-410,2002-07-13 00:00:00,2002.41,Coordinate Reference System,2144,2949,Change of geogCRS name to accord with revised Geomatics Canada practice.
-411,2002-07-13 00:00:00,2002.41,Coordinate Reference System,2145,2950,Change of geogCRS name to accord with revised Geomatics Canada practice.
-412,2002-07-13 00:00:00,2002.41,Coordinate Reference System,2146,2951,Change of geogCRS name to accord with revised Geomatics Canada practice.
-413,2002-07-13 00:00:00,2002.41,Coordinate Reference System,2036,2953,Change of geogCRS name to accord with revised Geomatics Canada practice.
-414,2002-07-13 00:00:00,2002.41,Coordinate Reference System,2292,2954,Change of geogCRS name to accord with revised Geomatics Canada practice.
-415,2002-07-13 00:00:00,2002.41,Coordinate Reference System,2139,2944,Change of geogCRS name to accord with revised Geomatics Canada practice.
-416,2002-07-13 00:00:00,2002.41,Coordinate Reference System,2153,2955,Change of geogCRS name to accord with revised Geomatics Canada practice.
-417,2002-07-13 00:00:00,2002.41,Coordinate Reference System,2152,2956,Change of geogCRS name to accord with revised Geomatics Canada practice.
-418,2002-07-13 00:00:00,2002.41,Coordinate Reference System,2151,2957,Change of geogCRS name to accord with revised Geomatics Canada practice.
-419,2002-07-13 00:00:00,2002.41,Coordinate Reference System,2150,2958,Change of geogCRS name to accord with revised Geomatics Canada practice.
-420,2002-07-13 00:00:00,2002.41,Coordinate Reference System,2149,2959,Change of geogCRS name to accord with revised Geomatics Canada practice.
-421,2002-07-13 00:00:00,2002.41,Coordinate Reference System,2037,2960,Change of geogCRS name to accord with revised Geomatics Canada practice.
-422,2002-07-13 00:00:00,2002.41,Coordinate Reference System,2038,2961,Change of geogCRS name to accord with revised Geomatics Canada practice.
-423,2002-07-13 00:00:00,2002.41,Coordinate Reference System,2148,2962,Change of geogCRS name to accord with revised Geomatics Canada practice.
-424,2002-02-12 00:00:00,2002.01,Coordinate Reference System,4234,4197,Dependent datum 6228 deprecated due to ellipsoid error.
-425,2002-02-12 00:00:00,2002.01,Coordinate Reference System,23433,2312,Dependent geogCRS 4234 deprecated due to ellipsoid error.
-426,2002-07-13 00:00:00,2002.41,Area,1336,2784,Expansion of area of use.
diff --git a/src/tiff/csv/ellips_alias.c b/src/tiff/csv/ellips_alias.c
deleted file mode 100644
index 6cdda23..0000000
--- a/src/tiff/csv/ellips_alias.c
+++ /dev/null
@@ -1,10 +0,0 @@
-#include "defs.h"
-datafile_rows_t ellips_alias_row_1[] = {"ELLIPSOID_ALIAS_CODE","ELLIPSOID_ALIAS_NAME","ELLIPSOID_CODE","REVISION_DATE","INFORMATION_SOURCE","DATA_SOURCE","REMARKS","CHANGE_ID",NULL};
-datafile_rows_t ellips_alias_row_2[] = {"7023","International 1967","7036","1996-10-18 00:00:00","","EPSG","Adopted by IUGG 1967 Lucerne. Inverse flattening defined to 2 d.p.  More usually known as GRS 1967 to avoid confusion with the International 1924 figure.","96.09",NULL};
-datafile_rows_t ellips_alias_row_3[] = {"7026","NWL 10D","7043","1999-04-22 00:00:00","","EPSG","Used by Transit Broadcast Ephemeris before 1989. Also referred to as WGS72 spheroid.","99.03",NULL};
-datafile_rows_t ellips_alias_row_4[] = {"7037","Clarke Modified 1880","7012","1996-10-18 00:00:00","","EPSG","The Clarke 1880 (RGS) figure is one of several modifications to the original definition.  The name Clarke Modified is usually taken to be the RGS modification.","",NULL};
-datafile_rows_t ellips_alias_row_5[] = {"7038","International 1979","7019","1996-10-18 00:00:00","","EPSG","Adopted by IUGG 1979 Canberra as the Geodetic Reference Spheroid of 1980 (GRS 1980).","",NULL};
-datafile_rows_t ellips_alias_row_6[] = {"7039","Hayford 1909","7022","1996-10-18 00:00:00","\"Ellipsoidisch Parameter der Erdfigur (1800-1950)\" by Georg Strasser","EPSG","Described as a=6378388 m. and b=6356909 m. from which 1/f derived to be 296.95926...   The figure was adopted as the International ellipsoid in 1924 but with 1/f taken as 297 exactly from which b is derved as 6356911.946 m.","",NULL};
-datafile_rows_t ellips_alias_row_7[] = {"7040","WGS84","7030","1996-10-18 00:00:00","","EPSG","","",NULL};
-
-datafile_rows_t *ellips_alias_rows[] = {ellips_alias_row_1,ellips_alias_row_2,ellips_alias_row_3,ellips_alias_row_4,ellips_alias_row_5,ellips_alias_row_6,ellips_alias_row_7,NULL};
diff --git a/src/tiff/csv/ellips_alias.csv b/src/tiff/csv/ellips_alias.csv
deleted file mode 100644
index 22ae710..0000000
--- a/src/tiff/csv/ellips_alias.csv
+++ /dev/null
@@ -1,7 +0,0 @@
-"ELLIPSOID_ALIAS_CODE","ELLIPSOID_ALIAS_NAME","ELLIPSOID_CODE","REVISION_DATE","INFORMATION_SOURCE","DATA_SOURCE","REMARKS","CHANGE_ID"
-7023,International 1967,7036,1996-10-18 00:00:00,,EPSG,Adopted by IUGG 1967 Lucerne. Inverse flattening defined to 2 d.p.  More usually known as GRS 1967 to avoid confusion with the International 1924 figure.,96.09
-7026,NWL 10D,7043,1999-04-22 00:00:00,,EPSG,Used by Transit Broadcast Ephemeris before 1989. Also referred to as WGS72 spheroid.,99.03
-7037,Clarke Modified 1880,7012,1996-10-18 00:00:00,,EPSG,The Clarke 1880 (RGS) figure is one of several modifications to the original definition.  The name Clarke Modified is usually taken to be the RGS modification.,
-7038,International 1979,7019,1996-10-18 00:00:00,,EPSG,Adopted by IUGG 1979 Canberra as the Geodetic Reference Spheroid of 1980 (GRS 1980).,
-7039,Hayford 1909,7022,1996-10-18 00:00:00,"\"Ellipsoidisch Parameter der Erdfigur (1800-1950)\" by Georg Strasser",EPSG,Described as a=6378388 m. and b=6356909 m. from which 1/f derived to be 296.95926...   The figure was adopted as the International ellipsoid in 1924 but with 1/f taken as 297 exactly from which b is derved as 6356911.946 m.,
-7040,WGS84,7030,1996-10-18 00:00:00,,EPSG,,
diff --git a/src/tiff/csv/ellipsoid.c b/src/tiff/csv/ellipsoid.c
deleted file mode 100644
index 35c6e2e..0000000
--- a/src/tiff/csv/ellipsoid.c
+++ /dev/null
@@ -1,42 +0,0 @@
-#include "defs.h"
-datafile_rows_t ellipsoid_row_1[] = {"ELLIPSOID_CODE","ELLIPSOID_EPSG_NAME","ELLIPSOID_USER_NAME","SEMI_MAJOR_AXIS","UOM_LENGTH_CODE","INV_FLATTENING","SEMI_MINOR_AXIS","REVISION_DATE","INFORMATION_SOURCE","DATA_SOURCE","REMARKS","CHANGE_ID",NULL};
-datafile_rows_t ellipsoid_row_2[] = {"7001","Airy 1830","","6377563.396","9001","299.3249646","","1995-06-02 00:00:00","Ordnance Survey of Great Britain.","EPSG","Original definition is a=20923713 and b=20853810 feet of 1796.   For the 1936 retriangulation OSGB defines the relationship of feet of 1796 to the International metre through log(1.48401603) exactly [=0.3048007491...]. 1/f is given to 7 decimal places.","98.321  98.34",NULL};
-datafile_rows_t ellipsoid_row_3[] = {"7002","Airy Modified 1849","","6377340.189","9001","299.3249646","","1995-06-02 00:00:00","","EPSG","OSGB Airy 1830 figure rescaled by 1.000035 to best fit the primary triangulation of Ireland.","98.321",NULL};
-datafile_rows_t ellipsoid_row_4[] = {"7003","Australian National Spheroid","","6378160.0","9001","298.25","","1995-06-02 00:00:00","\"Australian Map Grid Technical Manual\"; National Mapping Council of Australia Special Publication #7; 1972","EPSG","Based on the GRS 1967 figure but with 1/f taken to 2 decimal places exactly.","",NULL};
-datafile_rows_t ellipsoid_row_5[] = {"7004","Bessel 1841","","6377397.155","9001","299.1528128","","1999-04-22 00:00:00","US Army Map Service Technical Manual; 1943.","EPSG","Original Bessel definition is a=3272077.14 and b=3261139.33 toise. This used a weighted mean of values from several authors but did not account for differences in the length of the various toise: the \"Bessel toise\" is therefore of uncertain length.","98.321  98.34",NULL};
-datafile_rows_t ellipsoid_row_6[] = {"7005","Bessel Modified","","6377492.018","9001","299.1528128","","1999-04-22 00:00:00","","EPSG","Used in Norway and also in Sweden with a 1mm increase in semi-major axis.","98.321",NULL};
-datafile_rows_t ellipsoid_row_7[] = {"7006","Bessel Namibia","","6377483.865","9001","299.1528128","","1999-04-22 00:00:00","","EPSG","a = 6377397.155 German legal metres. This is the same value as the Bessel 1841 figure (code 7004) but in different units.  Used in Namibia.","97.16",NULL};
-datafile_rows_t ellipsoid_row_8[] = {"7007","Clarke 1858","","20926348.0","9005","","20855233.0","1995-06-02 00:00:00","\"Ellipsoidisch Parameter der Erdfigur (1800-1950)\" by Georg Strasser.","EPSG","Clarke's 1858/II solution. Derived parameters: a = 6378293.645m using his 1865 ratio of 0.304797265 feet per metre; 1/f = 294.26068�  In historic usage in Australia 1/f taken to two decimal places (294.26 exactly); elsewhere a and b used to derive 1/f.","99.70",NULL};
-datafile_rows_t ellipsoid_row_9[] = {"7008","Clarke 1866","","6378206.4","9001","","6356583.8","1995-06-02 00:00:00","US Army Map Service Technical Manual No. 7; 1943.","EPSG","Original definition a=20926062 and b=20855121 (British) feet. Uses Clarke's 1865 inch-metre ratio of 39.370432 to obtain metres. (Metric value then converted to US survey feet for use in the United States using 39.37 exactly giving a=20925832.16 ft US).","98.34",NULL};
-datafile_rows_t ellipsoid_row_10[] = {"7009","Clarke 1866 Michigan","","20926631.531","9003","","20855688.674","1995-06-02 00:00:00","USGS Professional Paper #1395.","EPSG","Used for Michigan NAD27 State Plane zones.  Radius = ellipsoid radius + 800 feet; this approximates the average elevation of the state.   Derived parameter: 1/f = 294.97870","98.22",NULL};
-datafile_rows_t ellipsoid_row_11[] = {"7010","Clarke 1880 (Benoit)","","6378300.789","9001","","6356566.435","1995-06-02 00:00:00","","EPSG","Adopts Clarke's values for a and b.  Uses Benoit's 1895 ratio of 0.9143992 metres per yard to convert to metres.","",NULL};
-datafile_rows_t ellipsoid_row_12[] = {"7011","Clarke 1880 (IGN)","","6378249.2","9001","","6356515.0","1998-04-16 00:00:00","","EPSG","Adopts Clarke's values for a and b using his 1865 ratio of 39.370432 inches per metre to convert axes to metres.","98.12",NULL};
-datafile_rows_t ellipsoid_row_13[] = {"7012","Clarke 1880 (RGS)","","6378249.145","9001","293.465","","1995-06-02 00:00:00","Empire Survey Review #32; 1939.","EPSG","Adopts Clarke's values for a and 1/f.  Adopts his 1865 ratio of 39.370432 inches per metre to convert semi-major axis to metres. Also known as Clarke Modified 1880.","",NULL};
-datafile_rows_t ellipsoid_row_14[] = {"7013","Clarke 1880 (Arc)","","6378249.145","9001","293.4663077","","1999-04-22 00:00:00","","EPSG","Adopts Clarke's value for a with derived 1/f.  Uses his 1865 ratio of 39.370432 inch per metre to convert semi-major axis to metres.","",NULL};
-datafile_rows_t ellipsoid_row_15[] = {"7014","Clarke 1880 (SGA 1922)","","6378249.2","9001","293.46598","","1995-06-02 00:00:00","","EPSG","Used in Old French Triangulation (ATF).   Uses Clarke's 1865 inch-metre ratio of 39.370432 to convert axes to metres.","",NULL};
-datafile_rows_t ellipsoid_row_16[] = {"7015","Everest 1830 (1937 Adjustment)","","6377276.345","9001","300.8017","","1996-10-18 00:00:00","Survey of India professional paper #28; 1939","EPSG","Used for the 1937 readjustment of Indian triangulation.  Clarke's 1865 Indian-British foot ratio (0.99999566) and Benoit's 1898 British inch-metre ratio (39.370113) rounded as 0.30479841 exactly and applied to Everest's 1830 definition taken as a and 1/f","96.20",NULL};
-datafile_rows_t ellipsoid_row_17[] = {"7016","Everest 1830 (1967 Definition)","","6377298.556","9001","300.8017","","1995-06-02 00:00:00","","EPSG","Adopted 1967 for use in East Malaysia.  Applies Sears 1922 inch-metre ratio of 39.370147 to Everest 1830 original definition of a and 1/f but with a taken to be in British rather than Indian feet.","",NULL};
-datafile_rows_t ellipsoid_row_18[] = {"7018","Everest 1830 Modified","","6377304.063","9001","300.8017","","1995-06-02 00:00:00","","EPSG","Adopted 1967 for use in West Malaysia.  Applies Benoit 1898 inch-metre ratio of 39.370113 to Everest 1830 original definition of a and 1/f but with a taken to be in British rather than Indian feet.","",NULL};
-datafile_rows_t ellipsoid_row_19[] = {"7019","GRS 1980","","6378137.0","9001","298.257222101","","1998-11-11 00:00:00","\"Geodetic Reference System 1980\" by H. Moritz; Bulletin Geodesique","EPSG","Adopted by IUGG 1979 Canberra.  Inverse flattening is derived from geocentric gravitational constant GM = 3986005e8 m*m*m/s/s; dynamic form factor J2 = 108263e8 and Earth's angular velocity = 7292115e-11 rad/s.","98.11  98.32",NULL};
-datafile_rows_t ellipsoid_row_20[] = {"7020","Helmert 1906","","6378200.0","9001","298.3","","1995-06-02 00:00:00","\"Ellipsoidisch Parameter der Erdfigur (1800-1950)\" by Georg Strasser","EPSG","Helmert 1906/III solution.","",NULL};
-datafile_rows_t ellipsoid_row_21[] = {"7021","Indonesian National Spheroid","","6378160.0","9001","298.247","","1995-06-02 00:00:00","Rais paper.","EPSG","Based on the GRS 1967 figure but with 1/f taken to 3 decimal places exactly.","",NULL};
-datafile_rows_t ellipsoid_row_22[] = {"7022","International 1924","","6378388.0","9001","297.0","","1995-06-02 00:00:00","","EPSG","Adopted by IUGG 1924 in Madrid. Based on Hayford 1909/1910 figures.","",NULL};
-datafile_rows_t ellipsoid_row_23[] = {"7024","Krassowsky 1940","","6378245.0","9001","298.3","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t ellipsoid_row_24[] = {"7025","NWL 9D","","6378145.0","9001","298.25","","1995-06-02 00:00:00","","EPSG","Used by Transit Precise Ephemeris between October 1971 and January 1987.","",NULL};
-datafile_rows_t ellipsoid_row_25[] = {"7027","Plessis 1817","","6376523.0","9001","308.64","","1995-06-02 00:00:00","IGN Paris \"Constants d'Ellipsoides\" February 1972.","EPSG","Rescaling of Delambre 1810 figure (a=6376985 m) to make meridional arc from equator to pole equal to 10000000 metres exactly. (Ref: Strasser).","",NULL};
-datafile_rows_t ellipsoid_row_26[] = {"7028","Struve 1860","","6378298.3","9001","294.73","","1998-11-11 00:00:00","\"Geodesia y Cartografia Matematica\" by Fernando Martin Asin; ISBN 84-398-0248-X.","EPSG","Original definition of semi-major axis given as 3272539 toise.  In \"Ellipsoidisch Parameter der Erdfigur (1800-1950)\" , Strasser suggests a conversion factor of 1.94903631 which gives a=6378297.337 metres.","98.07  98.34",NULL};
-datafile_rows_t ellipsoid_row_27[] = {"7029","War Office","","6378300.583","9001","296.0","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t ellipsoid_row_28[] = {"7030","WGS 84","","6378137.0","9001","298.257223563","","1998-11-11 00:00:00","DMA Technical Manual 8350.2-B","EPSG","Inverse flattening derived from four defining parameters (semi-major axis; C20 = -484.16685*10e-6; earth's angular velocity w = 7292115e11 rad/sec; gravitational constant GM = 3986005e8 m*m*m/s/s).","98.32",NULL};
-datafile_rows_t ellipsoid_row_29[] = {"7031","GEM 10C","","6378137.0","9001","298.257223563","","1995-06-02 00:00:00","","EPSG","Used for  GEM 10C Gravity Potential Model.","98.32",NULL};
-datafile_rows_t ellipsoid_row_30[] = {"7032","OSU86F","","6378136.2","9001","298.257223563","","1995-06-02 00:00:00","","EPSG","Used for OSU86 gravity potential (geoidal) model.","98.32",NULL};
-datafile_rows_t ellipsoid_row_31[] = {"7033","OSU91A","","6378136.3","9001","298.257223563","","1995-06-02 00:00:00","","EPSG","Used for OSU91 gravity potential (geoidal) model.","98.32",NULL};
-datafile_rows_t ellipsoid_row_32[] = {"7034","Clarke 1880","","20926202.0","9005","293.465","20854895.0","1995-06-02 00:00:00","\"Ellipsoidisch Parameter der Erdfigur (1800-1950)\" by Georg Strasser.","EPSG","Clarke gave a and b and also 1/f=293.465 (to 3 decimal places).  1/f derived from a and b = 293.4663077�","",NULL};
-datafile_rows_t ellipsoid_row_33[] = {"7035","Sphere","","6371000.0","9001","","6371000.0","1995-06-02 00:00:00","","EPSG","Authalic sphere.  1/f is infinite.","",NULL};
-datafile_rows_t ellipsoid_row_34[] = {"7036","GRS 1967","","6378160.0","9001","298.247167427","","1998-11-11 00:00:00","\"Geodetic Reference System 1967\"; International Association of Geodesy special publication number 3; August 1971.","EPSG","Adopted by IUGG 1967 Lucerne.  Inverse flattening given is derived from geocentric gravitational constant (GM)= 398603e9 m*m*m/s/s; dynamic form factor (J2) = 0.0010827 and Earth's angular velocity w = 7.2921151467e-5 rad/s.","96.09  97.252  98.32 [...]
-datafile_rows_t ellipsoid_row_35[] = {"7041","Average Terrestrial System 1977","","6378135.0","9001","298.257","","1997-07-22 00:00:00","New Brunswick Geographic Information Corporation land and water information standards manual","EPSG","","98.321",NULL};
-datafile_rows_t ellipsoid_row_36[] = {"7042","Everest (1830 Definition)","","20922931.8","9080","300.8017","20853374.58","1999-10-20 00:00:00","\"Ellipsoidisch Parameter der Erdfigur (1800-1950)\" by Georg Strasser","EPSG","Everest gave a and b to 2 decimal places and also 1/f=300.8017 (to 4 decimal places).","97.23",NULL};
-datafile_rows_t ellipsoid_row_37[] = {"7043","WGS 72","","6378135.0","9001","298.26","","1999-04-22 00:00:00","","EPSG","","99.03",NULL};
-datafile_rows_t ellipsoid_row_38[] = {"7044","Everest 1830 (1962 Definition)","","6377301.243","9001","300.8017255","","1999-10-20 00:00:00","","EPSG","Used by Pakistan since metrication.  Clarke's 1865 Indian foot-British foot ratio (0.99999566) and his 1865 British inch-metre ratio (39.369971) rounded with slight error as 1 Ind ft = 0.3047995m exactly and applied to Everest's 1830 definition of a & b.","",NULL};
-datafile_rows_t ellipsoid_row_39[] = {"7045","Everest 1830 (1975 Definition)","","6377299.151","9001","300.8017255","","1999-10-20 00:00:00","","EPSG","Used by India since metrication.  Clarke's 1865 Indian foot-British foot ratio (0.99999566) and his 1865 British inch-metre ratio (39.369971) rounded as 1 Ind ft = 0.3047995m exactly applied to Everest's 1830 original definition taken as a and b.","",NULL};
-
-datafile_rows_t *ellipsoid_rows[] = {ellipsoid_row_1,ellipsoid_row_2,ellipsoid_row_3,ellipsoid_row_4,ellipsoid_row_5,ellipsoid_row_6,ellipsoid_row_7,ellipsoid_row_8,ellipsoid_row_9,ellipsoid_row_10,ellipsoid_row_11,ellipsoid_row_12,ellipsoid_row_13,ellipsoid_row_14,ellipsoid_row_15,ellipsoid_row_16,ellipsoid_row_17,ellipsoid_row_18,ellipsoid_row_19,ellipsoid_row_20,ellipsoid_row_21,ellipsoid_row_22,ellipsoid_row_23,ellipsoid_row_24,ellipsoid_row_25,ellipsoid_row_26,ellipsoid_row_27,ellip [...]
diff --git a/src/tiff/csv/ellipsoid.csv b/src/tiff/csv/ellipsoid.csv
deleted file mode 100644
index ca0cda9..0000000
--- a/src/tiff/csv/ellipsoid.csv
+++ /dev/null
@@ -1,39 +0,0 @@
-"ELLIPSOID_CODE","ELLIPSOID_EPSG_NAME","ELLIPSOID_USER_NAME","SEMI_MAJOR_AXIS","UOM_LENGTH_CODE","INV_FLATTENING","SEMI_MINOR_AXIS","REVISION_DATE","INFORMATION_SOURCE","DATA_SOURCE","REMARKS","CHANGE_ID"
-7001,Airy 1830,,6377563.396,9001,299.3249646,,1995-06-02 00:00:00,Ordnance Survey of Great Britain.,EPSG,Original definition is a=20923713 and b=20853810 feet of 1796.   For the 1936 retriangulation OSGB defines the relationship of feet of 1796 to the International metre through log(1.48401603) exactly [=0.3048007491...]. 1/f is given to 7 decimal places.,98.321  98.34
-7002,Airy Modified 1849,,6377340.189,9001,299.3249646,,1995-06-02 00:00:00,,EPSG,OSGB Airy 1830 figure rescaled by 1.000035 to best fit the primary triangulation of Ireland.,98.321
-7003,Australian National Spheroid,,6378160.0,9001,298.25,,1995-06-02 00:00:00,"\"Australian Map Grid Technical Manual\"; National Mapping Council of Australia Special Publication #7; 1972",EPSG,Based on the GRS 1967 figure but with 1/f taken to 2 decimal places exactly.,
-7004,Bessel 1841,,6377397.155,9001,299.1528128,,1999-04-22 00:00:00,US Army Map Service Technical Manual; 1943.,EPSG,"Original Bessel definition is a=3272077.14 and b=3261139.33 toise. This used a weighted mean of values from several authors but did not account for differences in the length of the various toise: the \"Bessel toise\" is therefore of uncertain length.",98.321  98.34
-7005,Bessel Modified,,6377492.018,9001,299.1528128,,1999-04-22 00:00:00,,EPSG,Used in Norway and also in Sweden with a 1mm increase in semi-major axis.,98.321
-7006,Bessel Namibia,,6377483.865,9001,299.1528128,,1999-04-22 00:00:00,,EPSG,a = 6377397.155 German legal metres. This is the same value as the Bessel 1841 figure (code 7004) but in different units.  Used in Namibia.,97.16
-7007,Clarke 1858,,20926348.0,9005,,20855233.0,1995-06-02 00:00:00,"\"Ellipsoidisch Parameter der Erdfigur (1800-1950)\" by Georg Strasser.",EPSG,Clarke's 1858/II solution. Derived parameters: a = 6378293.645m using his 1865 ratio of 0.304797265 feet per metre; 1/f = 294.26068�  In historic usage in Australia 1/f taken to two decimal places (294.26 exactly); elsewhere a and b used to derive 1/f.,99.70
-7008,Clarke 1866,,6378206.4,9001,,6356583.8,1995-06-02 00:00:00,US Army Map Service Technical Manual No. 7; 1943.,EPSG,Original definition a=20926062 and b=20855121 (British) feet. Uses Clarke's 1865 inch-metre ratio of 39.370432 to obtain metres. (Metric value then converted to US survey feet for use in the United States using 39.37 exactly giving a=20925832.16 ft US).,98.34
-7009,Clarke 1866 Michigan,,20926631.531,9003,,20855688.674,1995-06-02 00:00:00,USGS Professional Paper #1395.,EPSG,Used for Michigan NAD27 State Plane zones.  Radius = ellipsoid radius + 800 feet; this approximates the average elevation of the state.   Derived parameter: 1/f = 294.97870,98.22
-7010,Clarke 1880 (Benoit),,6378300.789,9001,,6356566.435,1995-06-02 00:00:00,,EPSG,Adopts Clarke's values for a and b.  Uses Benoit's 1895 ratio of 0.9143992 metres per yard to convert to metres.,
-7011,Clarke 1880 (IGN),,6378249.2,9001,,6356515.0,1998-04-16 00:00:00,,EPSG,Adopts Clarke's values for a and b using his 1865 ratio of 39.370432 inches per metre to convert axes to metres.,98.12
-7012,Clarke 1880 (RGS),,6378249.145,9001,293.465,,1995-06-02 00:00:00,Empire Survey Review #32; 1939.,EPSG,Adopts Clarke's values for a and 1/f.  Adopts his 1865 ratio of 39.370432 inches per metre to convert semi-major axis to metres. Also known as Clarke Modified 1880.,
-7013,Clarke 1880 (Arc),,6378249.145,9001,293.4663077,,1999-04-22 00:00:00,,EPSG,Adopts Clarke's value for a with derived 1/f.  Uses his 1865 ratio of 39.370432 inch per metre to convert semi-major axis to metres.,
-7014,Clarke 1880 (SGA 1922),,6378249.2,9001,293.46598,,1995-06-02 00:00:00,,EPSG,Used in Old French Triangulation (ATF).   Uses Clarke's 1865 inch-metre ratio of 39.370432 to convert axes to metres.,
-7015,Everest 1830 (1937 Adjustment),,6377276.345,9001,300.8017,,1996-10-18 00:00:00,Survey of India professional paper #28; 1939,EPSG,Used for the 1937 readjustment of Indian triangulation.  Clarke's 1865 Indian-British foot ratio (0.99999566) and Benoit's 1898 British inch-metre ratio (39.370113) rounded as 0.30479841 exactly and applied to Everest's 1830 definition taken as a and 1/f,96.20
-7016,Everest 1830 (1967 Definition),,6377298.556,9001,300.8017,,1995-06-02 00:00:00,,EPSG,Adopted 1967 for use in East Malaysia.  Applies Sears 1922 inch-metre ratio of 39.370147 to Everest 1830 original definition of a and 1/f but with a taken to be in British rather than Indian feet.,
-7018,Everest 1830 Modified,,6377304.063,9001,300.8017,,1995-06-02 00:00:00,,EPSG,Adopted 1967 for use in West Malaysia.  Applies Benoit 1898 inch-metre ratio of 39.370113 to Everest 1830 original definition of a and 1/f but with a taken to be in British rather than Indian feet.,
-7019,GRS 1980,,6378137.0,9001,298.257222101,,1998-11-11 00:00:00,"\"Geodetic Reference System 1980\" by H. Moritz; Bulletin Geodesique",EPSG,Adopted by IUGG 1979 Canberra.  Inverse flattening is derived from geocentric gravitational constant GM = 3986005e8 m*m*m/s/s; dynamic form factor J2 = 108263e8 and Earth's angular velocity = 7292115e-11 rad/s.,98.11  98.32
-7020,Helmert 1906,,6378200.0,9001,298.3,,1995-06-02 00:00:00,"\"Ellipsoidisch Parameter der Erdfigur (1800-1950)\" by Georg Strasser",EPSG,Helmert 1906/III solution.,
-7021,Indonesian National Spheroid,,6378160.0,9001,298.247,,1995-06-02 00:00:00,Rais paper.,EPSG,Based on the GRS 1967 figure but with 1/f taken to 3 decimal places exactly.,
-7022,International 1924,,6378388.0,9001,297.0,,1995-06-02 00:00:00,,EPSG,Adopted by IUGG 1924 in Madrid. Based on Hayford 1909/1910 figures.,
-7024,Krassowsky 1940,,6378245.0,9001,298.3,,1995-06-02 00:00:00,,EPSG,,
-7025,NWL 9D,,6378145.0,9001,298.25,,1995-06-02 00:00:00,,EPSG,Used by Transit Precise Ephemeris between October 1971 and January 1987.,
-7027,Plessis 1817,,6376523.0,9001,308.64,,1995-06-02 00:00:00,"IGN Paris \"Constants d'Ellipsoides\" February 1972.",EPSG,Rescaling of Delambre 1810 figure (a=6376985 m) to make meridional arc from equator to pole equal to 10000000 metres exactly. (Ref: Strasser).,
-7028,Struve 1860,,6378298.3,9001,294.73,,1998-11-11 00:00:00,"\"Geodesia y Cartografia Matematica\" by Fernando Martin Asin; ISBN 84-398-0248-X.",EPSG,"Original definition of semi-major axis given as 3272539 toise.  In \"Ellipsoidisch Parameter der Erdfigur (1800-1950)\" , Strasser suggests a conversion factor of 1.94903631 which gives a=6378297.337 metres.",98.07  98.34
-7029,War Office,,6378300.583,9001,296.0,,1995-06-02 00:00:00,,EPSG,,
-7030,WGS 84,,6378137.0,9001,298.257223563,,1998-11-11 00:00:00,DMA Technical Manual 8350.2-B,EPSG,Inverse flattening derived from four defining parameters (semi-major axis; C20 = -484.16685*10e-6; earth's angular velocity w = 7292115e11 rad/sec; gravitational constant GM = 3986005e8 m*m*m/s/s).,98.32
-7031,GEM 10C,,6378137.0,9001,298.257223563,,1995-06-02 00:00:00,,EPSG,Used for  GEM 10C Gravity Potential Model.,98.32
-7032,OSU86F,,6378136.2,9001,298.257223563,,1995-06-02 00:00:00,,EPSG,Used for OSU86 gravity potential (geoidal) model.,98.32
-7033,OSU91A,,6378136.3,9001,298.257223563,,1995-06-02 00:00:00,,EPSG,Used for OSU91 gravity potential (geoidal) model.,98.32
-7034,Clarke 1880,,20926202.0,9005,293.465,20854895.0,1995-06-02 00:00:00,"\"Ellipsoidisch Parameter der Erdfigur (1800-1950)\" by Georg Strasser.",EPSG,Clarke gave a and b and also 1/f=293.465 (to 3 decimal places).  1/f derived from a and b = 293.4663077�,
-7035,Sphere,,6371000.0,9001,,6371000.0,1995-06-02 00:00:00,,EPSG,Authalic sphere.  1/f is infinite.,
-7036,GRS 1967,,6378160.0,9001,298.247167427,,1998-11-11 00:00:00,"\"Geodetic Reference System 1967\"; International Association of Geodesy special publication number 3; August 1971.",EPSG,Adopted by IUGG 1967 Lucerne.  Inverse flattening given is derived from geocentric gravitational constant (GM)= 398603e9 m*m*m/s/s; dynamic form factor (J2) = 0.0010827 and Earth's angular velocity w = 7.2921151467e-5 rad/s.,96.09  97.252  98.32
-7041,Average Terrestrial System 1977,,6378135.0,9001,298.257,,1997-07-22 00:00:00,New Brunswick Geographic Information Corporation land and water information standards manual,EPSG,,98.321
-7042,Everest (1830 Definition),,20922931.8,9080,300.8017,20853374.58,1999-10-20 00:00:00,"\"Ellipsoidisch Parameter der Erdfigur (1800-1950)\" by Georg Strasser",EPSG,Everest gave a and b to 2 decimal places and also 1/f=300.8017 (to 4 decimal places).,97.23
-7043,WGS 72,,6378135.0,9001,298.26,,1999-04-22 00:00:00,,EPSG,,99.03
-7044,Everest 1830 (1962 Definition),,6377301.243,9001,300.8017255,,1999-10-20 00:00:00,,EPSG,Used by Pakistan since metrication.  Clarke's 1865 Indian foot-British foot ratio (0.99999566) and his 1865 British inch-metre ratio (39.369971) rounded with slight error as 1 Ind ft = 0.3047995m exactly and applied to Everest's 1830 definition of a & b.,
-7045,Everest 1830 (1975 Definition),,6377299.151,9001,300.8017255,,1999-10-20 00:00:00,,EPSG,Used by India since metrication.  Clarke's 1865 Indian foot-British foot ratio (0.99999566) and his 1865 British inch-metre ratio (39.369971) rounded as 1 Ind ft = 0.3047995m exactly applied to Everest's 1830 original definition taken as a and b.,
diff --git a/src/tiff/csv/gcs.csv b/src/tiff/csv/gcs.csv
deleted file mode 100644
index 5c92614..0000000
--- a/src/tiff/csv/gcs.csv
+++ /dev/null
@@ -1,278 +0,0 @@
-"COORD_REF_SYS_CODE","COORD_REF_SYS_NAME","DATUM_CODE","DATUM_NAME","GREENWICH_DATUM","UOM_CODE","ELLIPSOID_CODE","PRIME_MERIDIAN_CODE","COORD_OP_METHOD_CODE","DX","DY","DZ","RX","RY","RZ","DS"
-4001,Unknown datum based upon the Airy 1830 ellipsoid,6001,"Not specified (based on Airy 1830 ellipsoid)",6001,9108,7001,8901,,,,,,,,
-4002,Unknown datum based upon the Airy Modified 1849 ellipsoid,6002,"Not specified (based on Airy Modified 1849 ellipsoid)",6002,9108,7002,8901,,,,,,,,
-4003,Unknown datum based upon the Australian National Spheroid,6003,"Not specified (based on Australian National Spheroid)",6003,9108,7003,8901,,,,,,,,
-4004,Unknown datum based upon the Bessel 1841 ellipsoid,6004,"Not specified (based on Bessel 1841 ellipsoid)",6004,9108,7004,8901,,,,,,,,
-4005,Unknown datum based upon the Bessel Modified ellipsoid,6005,"Not specified (based on Bessel Modified ellipsoid)",6005,9108,7005,8901,,,,,,,,
-4006,Unknown datum based upon the Bessel Namibia ellipsoid,6006,"Not specified (based on Bessel Namibia ellipsoid)",6006,9108,7046,8901,,,,,,,,
-4007,Unknown datum based upon the Clarke 1858 ellipsoid,6007,"Not specified (based on Clarke 1858 ellipsoid)",6007,9108,7007,8901,,,,,,,,
-4008,Unknown datum based upon the Clarke 1866 ellipsoid,6008,"Not specified (based on Clarke 1866 ellipsoid)",6008,9108,7008,8901,,,,,,,,
-4009,Unknown datum based upon the Clarke 1866 Michigan ellipsoid,6009,"Not specified (based on Clarke 1866 Michigan ellipsoid)",6009,9108,7009,8901,,,,,,,,
-4010,"Unknown datum based upon the Clarke 1880 (Benoit) ellipsoid",6010,"Not specified (based on Clarke 1880 (Benoit) ellipsoid)",6010,9108,7010,8901,,,,,,,,
-4011,"Unknown datum based upon the Clarke 1880 (IGN) ellipsoid",6011,"Not specified (based on Clarke 1880 (IGN) ellipsoid)",6011,9108,7011,8901,,,,,,,,
-4012,"Unknown datum based upon the Clarke 1880 (RGS) ellipsoid",6012,"Not specified (based on Clarke 1880 (RGS) ellipsoid)",6012,9108,7012,8901,,,,,,,,
-4013,"Unknown datum based upon the Clarke 1880 (Arc) ellipsoid",6013,"Not specified (based on Clarke 1880 (Arc) ellipsoid)",6013,9108,7013,8901,,,,,,,,
-4014,"Unknown datum based upon the Clarke 1880 (SGA 1922) ellipsoid",6014,"Not specified (based on Clarke 1880 (SGA 1922) ellipsoid)",6014,9108,7014,8901,,,,,,,,
-4015,"Unknown datum based upon the Everest 1830 (1937 Adjustment) ellipsoid",6015,"Not specified (based on Everest 1830 (1937 Adjustment) ellipsoid)",6015,9108,7015,8901,,,,,,,,
-4016,"Unknown datum based upon the Everest 1830 (1967 Definition) ellipsoid",6016,"Not specified (based on Everest 1830 (1967 Definition) ellipsoid)",6016,9108,7016,8901,,,,,,,,
-4018,Unknown datum based upon the Everest 1830 Modified ellipsoid,6018,"Not specified (based on Everest 1830 Modified ellipsoid)",6018,9108,7018,8901,,,,,,,,
-4019,Unknown datum based upon the GRS 1980 ellipsoid,6019,"Not specified (based on GRS 1980 ellipsoid)",6019,9108,7019,8901,,,,,,,,
-4020,Unknown datum based upon the Helmert 1906 ellipsoid,6020,"Not specified (based on Helmert 1906 ellipsoid)",6020,9108,7020,8901,,,,,,,,
-4021,Unknown datum based upon the Indonesian National Spheroid,6021,"Not specified (based on Indonesian National Spheroid)",6021,9108,7021,8901,,,,,,,,
-4022,Unknown datum based upon the International 1924 ellipsoid,6022,"Not specified (based on International 1924 ellipsoid)",6022,9108,7022,8901,,,,,,,,
-4024,Unknown datum based upon the Krassowsky 1940 ellipsoid,6024,"Not specified (based on Krassowsky 1940 ellipsoid)",6024,9108,7024,8901,,,,,,,,
-4025,Unknown datum based upon the NWL 9D ellipsoid,6025,"Not specified (based on NWL 9D ellipsoid)",6025,9108,7025,8901,,,,,,,,
-4027,Unknown datum based upon the Plessis 1817 ellipsoid,6027,"Not specified (based on Plessis 1817 ellipsoid)",6027,9108,7027,8901,,,,,,,,
-4028,Unknown datum based upon the Struve 1860 ellipsoid,6028,"Not specified (based on Struve 1860 ellipsoid)",6028,9108,7028,8901,,,,,,,,
-4029,Unknown datum based upon the War Office ellipsoid,6029,"Not specified (based on War Office ellipsoid)",6029,9108,7029,8901,,,,,,,,
-4030,Unknown datum based upon the WGS 84 ellipsoid,6030,"Not specified (based on WGS 84 ellipsoid)",6030,9108,7030,8901,,,,,,,,
-4031,Unknown datum based upon the GEM 10C ellipsoid,6031,"Not specified (based on GEM 10C ellipsoid)",6031,9108,7031,8901,,,,,,,,
-4032,Unknown datum based upon the OSU86F ellipsoid,6032,"Not specified (based on OSU86F ellipsoid)",6032,9108,7032,8901,,,,,,,,
-4033,Unknown datum based upon the OSU91A ellipsoid,6033,"Not specified (based on OSU91A ellipsoid)",6033,9108,7033,8901,,,,,,,,
-4034,Unknown datum based upon the Clarke 1880 ellipsoid,6034,"Not specified (based on Clarke 1880 ellipsoid)",6034,9108,7034,8901,,,,,,,,
-4035,Unknown datum based upon the Authalic Sphere,6035,"Not specified (based on Authalic Sphere)",6035,9108,7035,8901,,,,,,,,
-4036,Unknown datum based upon the GRS 1967 ellipsoid,6036,"Not specified (based on GRS 1967 ellipsoid)",6036,9108,7036,8901,,,,,,,,
-4041,Unknown datum based upon the Average Terrestrial System 1977 ellipsoid,6041,"Not specified (based on Average Terrestrial System 1977 ellipsoid)",6041,9108,7041,8901,,,,,,,,
-4042,"Unknown datum based upon the Everest (1830 Definition) ellipsoid",6042,"Not specified (based on Everest (1830 Definition) ellipsoid)",6042,9108,7042,8901,,,,,,,,
-4043,Unknown datum based upon the WGS 72 ellipsoid,6043,"Not specified (based on WGS 72 ellipsoid)",6043,9108,7043,8901,,,,,,,,
-4044,"Unknown datum based upon the Everest 1830 (1962 Definition) ellipsoid",6044,"Not specified (based on Everest 1830 (1962 Definition) ellipsoid)",6044,9108,7044,8901,,,,,,,,
-4045,"Unknown datum based upon the Everest 1830 (1975 Definition) ellipsoid",6045,"Not specified (based on Everest 1830 (1975 Definition) ellipsoid)",6045,9108,7045,8901,,,,,,,,
-4047,Unspecified based upon the GRS 1980 Authalic Sphere,6047,"Not specified (based on GRS 1980 Authalic Sphere)",6047,9108,7047,8901,,,,,,,,
-4120,Greek,6120,Greek,6120,9108,7004,8901,,,,,,,,
-4121,GGRS87,6121,Greek Geodetic Reference System 1987,6121,9108,7019,8901,9603,-199.87,74.79,246.62,,,,
-4122,ATS77,6122,Average Terrestrial System 1977,6122,9108,7041,8901,,,,,,,,
-4123,KKJ,6123,Kartasto Koordinaati Jarjestelma 1966,6123,9108,7022,8901,9606,-90.7,-106.1,-119.2,4.09,0.218,-1.05,1.37
-4124,RT90,6124,Rikets koordinatsystem 1990,6124,9108,7004,8901,,,,,,,,
-4125,Samboja,6125,Samboja,6125,9108,7004,8901,9603,-404.78,685.68,45.47,,,,
-4126,"LKS94 (ETRS89)",6126,"Lithuania 1994 (ETRS89)",6126,9108,7019,8901,9603,0.0,0.0,0.0,,,,
-4127,Tete,6127,Tete,6127,9108,7008,8901,,,,,,,,
-4128,Madzansua,6128,Madzansua,6128,9108,7008,8901,,,,,,,,
-4129,Observatario,6129,Observatario,6129,9108,7008,8901,,,,,,,,
-4130,Moznet,6130,"Moznet (ITRF94)",6130,9108,7030,8901,9607,0.0,0.0,0.0,0.0,0.0,0.0,0.0
-4131,Indian 1960,6131,Indian 1960,6131,9108,7015,8901,,,,,,,,
-4132,FD58,6132,Final Datum 1958,6132,9108,7012,8901,,,,,,,,
-4133,EST92,6133,Estonia 1992,6133,9108,7019,8901,9607,0.055,-0.541,-0.185,-0.0183,0.0003,0.007,-0.014
-4134,PDO Survey Datum 1993,6134,PDO Survey Datum 1993,6134,9108,7012,8901,,,,,,,,
-4135,Old Hawaiian,6135,Old Hawaiian,6135,9108,7008,8901,,,,,,,,
-4136,St. Lawrence Island,6136,St. Lawrence Island,6136,9108,7008,8901,,,,,,,,
-4137,St. Paul Island,6137,St. Paul Island,6137,9108,7008,8901,,,,,,,,
-4138,St. George Island,6138,St. George Island,6138,9108,7008,8901,,,,,,,,
-4139,Puerto Rico,6139,Puerto Rico,6139,9108,7008,8901,,,,,,,,
-4140,"NAD83(CSRS98)",6140,NAD83 Canadian Spatial Reference System,6140,9108,7019,8901,9603,0.0,0.0,0.0,,,,
-4141,Israel,6141,Israel,6141,9108,7019,8901,,,,,,,,
-4142,Locodjo 1965,6142,Locodjo 1965,6142,9108,7012,8901,9603,-125.0,53.0,467.0,,,,
-4143,Abidjan 1987,6143,Abidjan 1987,6143,9108,7012,8901,9603,-124.76,53.0,466.79,,,,
-4144,Kalianpur 1937,6144,Kalianpur 1937,6144,9108,7015,8901,,,,,,,,
-4145,Kalianpur 1962,6145,Kalianpur 1962,6145,9108,7044,8901,9603,283.0,682.0,231.0,,,,
-4146,Kalianpur 1975,6146,Kalianpur 1975,6146,9108,7045,8901,9603,295.0,736.0,257.0,,,,
-4147,Hanoi 1972,6147,Hanoi 1972,6147,9108,7024,8901,9603,-17.51,-108.32,-62.39,,,,
-4148,Hartebeesthoek94,6148,Hartebeesthoek94,6148,9108,7030,8901,9603,0.0,0.0,0.0,,,,
-4149,CH1903,6149,CH1903,6149,9108,7004,8901,,,,,,,,
-4150,"CH1903+",6150,"CH1903+",6150,9108,7004,8901,9603,674.374,15.056,405.346,,,,
-4151,CHTRF95,6151,Swiss Terrestrial Reference Frame 1995,6151,9108,7019,8901,9603,0.0,0.0,0.0,,,,
-4152,"NAD83(HARN)",6152,"NAD83 (High Accuracy Regional Network)",6152,9108,7019,8901,9603,0.0,0.0,0.0,,,,
-4153,Rassadiran,6153,Rassadiran,6153,9108,7022,8901,9603,-133.63,-157.5,-158.62,,,,
-4154,"ED50(ED77)",6154,"European Datum 1950(1977)",6154,9108,7022,8901,,,,,,,,
-4155,Dabola 1981,6155,Dabola 1981,6155,9108,7011,8901,9603,-83.0,37.0,124.0,,,,
-4156,S-JTSK,6156,Jednotne Trigonometricke Site Katastralni,6156,9108,7004,8901,,,,,,,,
-4157,Mount Dillon,6157,Mount Dillon,6157,9108,7007,8901,,,,,,,,
-4158,Naparima 1955,6158,Naparima 1955,6158,9108,7022,8901,,,,,,,,
-4159,ELD79,6159,European Libyan Datum 1979,6159,9108,7022,8901,,,,,,,,
-4160,Chos Malal 1914,6160,Chos Malal 1914,6160,9108,7022,8901,,,,,,,,
-4161,Pampa del Castillo,6161,Pampa del Castillo,6161,9108,7022,8901,,,,,,,,
-4162,Korean 1985,6162,Korean Datum 1985,6162,9108,7004,8901,,,,,,,,
-4163,Yemen NGN96,6163,Yemen National Geodetic Network 1996,6163,9108,7030,8901,9603,0.0,0.0,0.0,,,,
-4164,South Yemen,6164,South Yemen,6164,9108,7024,8901,9603,-76.0,-138.0,67.0,,,,
-4165,Bissau,6165,Bissau,6165,9108,7022,8901,9603,-173.0,253.0,27.0,,,,
-4166,Korean 1995,6166,Korean Datum 1995,6166,9108,7030,8901,9603,0.0,0.0,0.0,,,,
-4167,NZGD2000,6167,New Zealand Geodetic Datum 2000,6167,9108,7019,8901,9603,0.0,0.0,0.0,,,,
-4168,Accra,6168,Accra,6168,9108,7029,8901,9603,-199.0,32.0,322.0,,,,
-4169,American Samoa 1962,6169,American Samoa 1962,6169,9108,7008,8901,9603,-115.0,118.0,426.0,,,,
-4170,SIRGAS,6170,Sistema de Referencia Geocentrico para America del Sur,6170,9108,7019,8901,9603,0.0,0.0,0.0,,,,
-4171,RGF93,6171,Reseau Geodesique Francais 1993,6171,9108,7019,8901,9603,0.0,0.0,0.0,,,,
-4172,POSGAR,6172,Posiciones Geodesicas Argentinas,6172,9108,7019,8901,9603,0.0,0.0,0.0,,,,
-4173,IRENET95,6173,IRENET95,6173,9108,7019,8901,9603,0.0,0.0,0.0,,,,
-4174,Sierra Leone 1924,6174,Sierra Leone Colony 1924,6174,9108,7029,8901,,,,,,,,
-4175,Sierra Leone 1968,6175,Sierra Leone 1968,6175,9108,7012,8901,9603,-88.0,4.0,101.0,,,,
-4176,Australian Antarctic,6176,Australian Antarctic Datum 1998,6176,9108,7019,8901,,,,,,,,
-4178,"Pulkovo 1942(83)",6178,"Pulkovo 1942/83",6178,9108,7024,8901,9607,24.0,-123.0,-94.0,-0.02,0.25,0.13,1.1
-4179,"Pulkovo 1942(58)",6179,"Pulkovo 1942/58",6179,9108,7024,8901,9606,33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84
-4180,EST97,6180,Estonia 1997,6180,9108,7019,8901,9603,0.0,0.0,0.0,,,,
-4181,Luxembourg 1930,6181,Luxembourg 1930,6181,9108,7022,8901,9606,-193.0,13.7,-39.3,-0.41,-2.933,2.688,0.43
-4182,Azores Occidental 1939,6182,Azores Occidental Islands 1939,6182,9108,7022,8901,,,,,,,,
-4183,Azores Central 1948,6183,Azores Central Islands 1948,6183,9108,7022,8901,,,,,,,,
-4184,Azores Oriental 1940,6184,Azores Oriental Islands 1940,6184,9108,7022,8901,,,,,,,,
-4185,Madeira 1936,6185,Madeira 1936,6185,9108,7022,8901,,,,,,,,
-4188,OSNI 1952,6188,OSNI 1952,6188,9108,7001,8901,,,,,,,,
-4189,REGVEN,6189,Red Geodesica Venezolana,6189,9108,7019,8901,9603,0.0,0.0,0.0,,,,
-4190,POSGAR 98,6190,Posiciones Geodesicas Argentinas 1998,6190,9108,7019,8901,9603,0.0,0.0,0.0,,,,
-4191,Albanian 1987,6191,Albanian 1987,6191,9108,7024,8901,,,,,,,,
-4192,Douala 1948,6192,Douala 1948,6192,9108,7022,8901,,,,,,,,
-4193,Manoca 1962,6193,Manoca 1962,6193,9108,7011,8901,9603,-70.9,-151.8,-41.4,,,,
-4194,Qornoq 1927,6194,Qornoq 1927,6194,9108,7022,8901,,,,,,,,
-4195,Scoresbysund 1952,6195,Scoresbysund 1952,6195,9108,7022,8901,9606,105.0,326.0,-102.5,0.0,0.0,0.814,-0.6
-4196,Ammassalik 1958,6196,Ammassalik 1958,6196,9108,7022,8901,9606,-45.0,417.0,-3.5,0.0,0.0,0.814,-0.6
-4197,Garoua,6197,Garoua,6197,9108,7012,8901,,,,,,,,
-4198,Kousseri,6198,Kousseri,6198,9108,7012,8901,,,,,,,,
-4199,Egypt 1930,6199,Egypt 1930,6199,9108,7022,8901,,,,,,,,
-4200,Pulkovo 1995,6200,Pulkovo 1995,6200,9108,7024,8901,,,,,,,,
-4201,Adindan,6201,Adindan,6201,9108,7012,8901,,,,,,,,
-4202,AGD66,6202,Australian Geodetic Datum 1966,6202,9108,7003,8901,,,,,,,,
-4203,AGD84,6203,Australian Geodetic Datum 1984,6203,9108,7003,8901,,,,,,,,
-4204,Ain el Abd,6204,Ain el Abd 1970,6204,9108,7022,8901,,,,,,,,
-4205,Afgooye,6205,Afgooye,6205,9108,7024,8901,9603,-43.0,-163.0,45.0,,,,
-4206,Agadez,6206,Agadez,6206,9108,7011,8901,,,,,,,,
-4207,Lisbon,6207,Lisbon 1937,6207,9108,7022,8901,,,,,,,,
-4208,Aratu,6208,Aratu,6208,9108,7022,8901,,,,,,,,
-4209,Arc 1950,6209,Arc 1950,6209,9108,7013,8901,,,,,,,,
-4210,Arc 1960,6210,Arc 1960,6210,9108,7012,8901,,,,,,,,
-4211,Batavia,6211,Batavia,6211,9108,7004,8901,,,,,,,,
-4212,Barbados 1938,6212,Barbados 1938,6212,9108,7012,8901,,,,,,,,
-4213,Beduaram,6213,Beduaram,6213,9108,7011,8901,,,,,,,,
-4214,Beijing 1954,6214,Beijing 1954,6214,9108,7024,8901,,,,,,,,
-4215,Belge 1950,6215,Reseau National Belge 1950,6215,9108,7022,8901,,,,,,,,
-4216,Bermuda 1957,6216,Bermuda 1957,6216,9108,7008,8901,9603,-73.0,213.0,296.0,,,,
-4218,Bogota 1975,6218,Bogota 1975,6218,9108,7022,8901,,,,,,,,
-4219,Bukit Rimpah,6219,Bukit Rimpah,6219,9108,7004,8901,9603,-384.0,664.0,-48.0,,,,
-4220,Camacupa,6220,Camacupa,6220,9108,7012,8901,,,,,,,,
-4221,Campo Inchauspe,6221,Campo Inchauspe,6221,9108,7022,8901,,,,,,,,
-4222,Cape,6222,Cape,6222,9108,7013,8901,,,,,,,,
-4223,Carthage,6223,Carthage,6223,9108,7011,8901,,,,,,,,
-4224,Chua,6224,Chua,6224,9108,7022,8901,9603,-134.0,229.0,-29.0,,,,
-4225,Corrego Alegre,6225,Corrego Alegre,6225,9108,7022,8901,9603,-206.0,172.0,-6.0,,,,
-4226,"Cote d'Ivoire",6226,"Cote d'Ivoire",6226,9108,7011,8901,,,,,,,,
-4227,Deir ez Zor,6227,Deir ez Zor,6227,9108,7011,8901,,,,,,,,
-4228,Douala,6228,Douala,6228,9108,7011,8901,,,,,,,,
-4229,Egypt 1907,6229,Egypt 1907,6229,9108,7020,8901,,,,,,,,
-4230,ED50,6230,European Datum 1950,6230,9108,7022,8901,,,,,,,,
-4231,ED87,6231,European Datum 1987,6231,9108,7022,8901,9606,-82.981,-99.719,-110.709,-0.5076,0.1503,0.3898,-0.3143
-4232,Fahud,6232,Fahud,6232,9108,7012,8901,,,,,,,,
-4233,Gandajika 1970,6233,Gandajika 1970,6233,9108,7022,8901,,,,,,,,
-4234,Garoua,6234,Garoua,6234,9108,7011,8901,,,,,,,,
-4235,Guyane Francaise,6235,Guyane Francaise,6235,9108,7022,8901,,,,,,,,
-4236,Hu Tzu Shan,6236,Hu Tzu Shan,6236,9108,7022,8901,9603,-637.0,-549.0,-203.0,,,,
-4237,HD72,6237,Hungarian Datum 1972,6237,9108,7036,8901,,,,,,,,
-4238,ID74,6238,Indonesian Datum 1974,6238,9108,7021,8901,,,,,,,,
-4239,Indian 1954,6239,Indian 1954,6239,9108,7015,8901,9603,217.0,823.0,299.0,,,,
-4240,Indian 1975,6240,Indian 1975,6240,9108,7015,8901,,,,,,,,
-4241,Jamaica 1875,6241,Jamaica 1875,6241,9108,7034,8901,,,,,,,,
-4242,JAD69,6242,Jamaica 1969,6242,9108,7008,8901,,,,,,,,
-4243,Kalianpur 1880,6243,Kalianpur 1880,6243,9108,7042,8901,,,,,,,,
-4244,Kandawala,6244,Kandawala,6244,9108,7015,8901,9603,-97.0,787.0,86.0,,,,
-4245,Kertau,6245,Kertau,6245,9108,7018,8901,9603,-11.0,851.0,5.0,,,,
-4246,KOC,6246,Kuwait Oil Company,6246,9108,7012,8901,,,,,,,,
-4247,La Canoa,6247,La Canoa,6247,9108,7022,8901,9603,-273.5,110.6,-357.9,,,,
-4248,PSAD56,6248,Provisional South American Datum 1956,6248,9108,7022,8901,,,,,,,,
-4249,Lake,6249,Lake,6249,9108,7022,8901,,,,,,,,
-4250,Leigon,6250,Leigon,6250,9108,7012,8901,9603,-130.0,29.0,364.0,,,,
-4251,Liberia 1964,6251,Liberia 1964,6251,9108,7012,8901,9603,-90.0,40.0,88.0,,,,
-4252,Lome,6252,Lome,6252,9108,7011,8901,,,,,,,,
-4253,Luzon 1911,6253,Luzon 1911,6253,9108,7008,8901,,,,,,,,
-4254,Hito XVIII 1963,6254,Hito XVIII 1963,6254,9108,7022,8901,9606,18.38,192.45,96.82,0.056,-0.142,-0.2,-0.0013
-4255,Herat North,6255,Herat North,6255,9108,7022,8901,9603,-333.0,-222.0,114.0,,,,
-4256,Mahe 1971,6256,Mahe 1971,6256,9108,7012,8901,9603,41.0,-220.0,-134.0,,,,
-4257,Makassar,6257,Makassar,6257,9108,7004,8901,9603,-587.8,519.75,145.76,,,,
-4258,ETRS89,6258,European Terrestrial Reference System 1989,6258,9108,7019,8901,,,,,,,,
-4259,Malongo 1987,6259,Malongo 1987,6259,9108,7022,8901,,,,,,,,
-4260,Manoca,6260,Manoca,6260,9108,7012,8901,9603,-70.9,-151.8,-41.4,,,,
-4261,Merchich,6261,Merchich,6261,9108,7011,8901,9603,31.0,146.0,47.0,,,,
-4262,Massawa,6262,Massawa,6262,9108,7004,8901,9603,639.0,405.0,60.0,,,,
-4263,Minna,6263,Minna,6263,9108,7012,8901,,,,,,,,
-4264,Mhast,6264,Mhast,6264,9108,7022,8901,9603,-252.95,-4.11,-96.38,,,,
-4265,Monte Mario,6265,Monte Mario,6265,9108,7022,8901,,,,,,,,
-4266,"M'poraloko",6266,"M'poraloko",6266,9108,7011,8901,,,,,,,,
-4267,NAD27,6267,North American Datum 1927,6267,9108,7008,8901,,,,,,,,
-4268,NAD27 Michigan,6268,NAD Michigan,6268,9108,7009,8901,,,,,,,,
-4269,NAD83,6269,North American Datum 1983,6269,9108,7019,8901,,,,,,,,
-4270,Nahrwan 1967,6270,Nahrwan 1967,6270,9108,7012,8901,,,,,,,,
-4271,Naparima 1972,6271,Naparima 1972,6271,9108,7022,8901,,,,,,,,
-4272,NZGD49,6272,New Zealand Geodetic Datum 1949,6272,9108,7022,8901,,,,,,,,
-4273,NGO 1948,6273,NGO 1948,6273,9108,7005,8901,9606,278.3,93.0,474.5,7.889,0.05,-6.61,6.21
-4274,Datum 73,6274,Datum 73,6274,9108,7022,8901,,,,,,,,
-4275,NTF,6275,Nouvelle Triangulation Francaise,6275,9108,7011,8901,9603,-168.0,-60.0,320.0,,,,
-4276,NSWC 9Z-2,6276,NSWC 9Z-2,6276,9108,7025,8901,,,,,,,,
-4277,OSGB 1936,6277,OSGB 1936,6277,9108,7001,8901,,,,,,,,
-4278,OSGB70,6278,"OSGB 1970 (SN)",6278,9108,7001,8901,,,,,,,,
-4279,"OS(SN)80",6279,"OS (SN) 1980",6279,9108,7001,8901,,,,,,,,
-4280,Padang,6280,Padang 1884,6280,9108,7004,8901,,,,,,,,
-4281,Palestine 1923,6281,Palestine 1923,6281,9108,7010,8901,,,,,,,,
-4282,Pointe Noire,6282,Congo 1960 Pointe Noire,6282,9108,7011,8901,,,,,,,,
-4283,GDA94,6283,Geocentric Datum of Australia 1994,6283,9108,7019,8901,9603,0.0,0.0,0.0,,,,
-4284,Pulkovo 1942,6284,Pulkovo 1942,6284,9108,7024,8901,,,,,,,,
-4285,Qatar 1974,6285,Qatar 1974,6285,9108,7022,8901,,,,,,,,
-4286,Qatar 1948,6286,Qatar 1948,6286,9108,7020,8901,,,,,,,,
-4287,Qornoq,6287,Qornoq,6287,9108,7022,8901,9603,164.0,138.0,-189.0,,,,
-4288,Loma Quintana,6288,Loma Quintana,6288,9108,7022,8901,,,,,,,,
-4289,Amersfoort,6289,Amersfoort,6289,9108,7004,8901,,,,,,,,
-4291,SAD69,6291,South American Datum 1969,6291,9108,7036,8901,,,,,,,,
-4292,Sapper Hill 1943,6292,Sapper Hill 1943,6292,9108,7022,8901,9603,-355.0,21.0,72.0,,,,
-4293,Schwarzeck,6293,Schwarzeck,6293,9108,7046,8901,,,,,,,,
-4294,Segora,6294,Segora,6294,9108,7004,8901,,,,,,,,
-4295,Serindung,6295,Serindung,6295,9108,7004,8901,,,,,,,,
-4296,Sudan,6296,Sudan,6296,9108,7011,8901,,,,,,,,
-4297,Tananarive,6297,Tananarive 1925,6297,9108,7022,8901,9603,-189.0,-242.0,-91.0,,,,
-4298,Timbalai 1948,6298,Timbalai 1948,6298,9108,7016,8901,,,,,,,,
-4299,TM65,6299,TM65,6299,9108,7002,8901,,,,,,,,
-4300,TM75,6300,TM75,6300,9108,7002,8901,,,,,,,,
-4301,Tokyo,6301,Tokyo,6301,9108,7004,8901,,,,,,,,
-4302,Trinidad 1903,6302,Trinidad 1903,6302,9108,7007,8901,9603,-61.702,284.488,472.052,,,,
-4303,"TC(1948)",6303,Trucial Coast 1948,6303,9108,7020,8901,,,,,,,,
-4304,Voirol 1875,6304,Voirol 1875,6304,9108,7011,8901,9603,-73.0,-247.0,227.0,,,,
-4306,Bern 1938,6306,Bern 1938,6306,9108,7004,8901,,,,,,,,
-4307,Nord Sahara 1959,6307,Nord Sahara 1959,6307,9108,7012,8901,,,,,,,,
-4308,RT38,6308,Stockholm 1938,6308,9108,7004,8901,,,,,,,,
-4309,Yacare,6309,Yacare,6309,9108,7022,8901,9603,-155.0,171.0,37.0,,,,
-4310,Yoff,6310,Yoff,6310,9108,7011,8901,,,,,,,,
-4311,Zanderij,6311,Zanderij,6311,9108,7022,8901,9603,-265.0,120.0,-358.0,,,,
-4312,MGI,6312,Militar-Geographische Institut,6312,9108,7004,8901,,,,,,,,
-4313,Belge 1972,6313,Reseau National Belge 1972,6313,9108,7022,8901,,,,,,,,
-4314,DHDN,6314,Deutsches Hauptdreiecksnetz,6314,9108,7004,8901,,,,,,,,
-4315,Conakry 1905,6315,Conakry 1905,6315,9108,7011,8901,9603,-23.0,259.0,-9.0,,,,
-4316,Dealul Piscului 1933,6316,Dealul Piscului 1933,6316,9108,7022,8901,9603,103.25,-100.4,-307.19,,,,
-4317,Dealul Piscului 1970,6317,Dealul Piscului 1970,6317,9108,7024,8901,,,,,,,,
-4318,NGN,6318,National Geodetic Network,6318,9108,7030,8901,,,,,,,,
-4319,KUDAMS,6319,Kuwait Utility,6319,9108,7019,8901,,,,,,,,
-4322,WGS 72,6322,World Geodetic System 1972,6322,9108,7043,8901,,,,,,,,
-4324,WGS 72BE,6324,WGS 72 Transit Broadcast Ephemeris,6324,9108,7043,8901,9606,0.0,0.0,1.9,0.0,0.0,0.814,-0.38
-4326,WGS 84,6326,World Geodetic System 1984,6326,9108,7030,8901,,,,,,,,
-4600,Anguilla 1957,6600,Anguilla 1957,6600,9108,7012,8901,,,,,,,,
-4601,Antigua 1943,6601,Antigua 1943,6601,9108,7012,8901,9603,-255.0,-15.0,71.0,,,,
-4602,Dominica 1945,6602,Dominica 1945,6602,9108,7012,8901,9603,725.0,685.0,536.0,,,,
-4603,Grenada 1953,6603,Grenada 1953,6603,9108,7012,8901,9603,72.0,213.7,93.0,,,,
-4604,Montserrat 1958,6604,Montserrat 1958,6604,9108,7012,8901,9603,174.0,359.0,365.0,,,,
-4605,St. Kitts 1955,6605,St. Kitts 1955,6605,9108,7012,8901,9603,9.0,183.0,236.0,,,,
-4606,St. Lucia 1955,6606,St. Lucia 1955,6606,9108,7012,8901,9603,-149.0,128.0,296.0,,,,
-4607,St. Vincent 1945,6607,St. Vincent 1945,6607,9108,7012,8901,,,,,,,,
-4608,"NAD27(76)",6608,"North American Datum 1927 (1976)",6608,9108,7008,8901,,,,,,,,
-4609,"NAD27(CGQ77)",6609,"North American Datum 1927 (CGQ77)",6609,9108,7008,8901,,,,,,,,
-4610,Xian 1980,6610,Xian 1980,6610,9108,7049,8901,,,,,,,,
-4611,Hong Kong 1980,6611,Hong Kong 1980,6611,9108,7022,8901,9606,-162.619,-276.959,-161.764,0.067753,-2.243649,-1.158827,-1.094246
-4612,JGD2000,6612,Japanese Geodetic Datum 2000,6612,9108,7019,8901,9603,0.0,0.0,0.0,,,,
-4613,Segara,6613,Gunung Segara,6613,9108,7004,8901,9603,-404.78,685.68,45.47,,,,
-4614,QND95,6614,Qatar National Datum 1995,6614,9108,7022,8901,9606,-119.4248,-303.65872,-11.00061,1.164298,0.174458,1.096259,3.657065
-4615,Porto Santo,6615,Porto Santo,6615,9108,7022,8901,,,,,,,,
-4616,Selvagem Grande,6616,Selvagem Grande,6616,9108,7022,8901,,,,,,,,
-4617,"NAD83(CSRS)",6140,NAD83 Canadian Spatial Reference System,6140,9108,7019,8901,9603,0.0,0.0,0.0,,,,
-4801,"Bern 1898 (Bern)",6801,"CH1903 (Bern)",6149,9108,7004,8907,,,,,,,,
-4802,"Bogota 1975 (Bogota)",6802,"Bogota 1975 (Bogota)",6218,9108,7022,8904,,,,,,,,
-4803,"Lisbon (Lisbon)",6803,"Lisbon 1937 (Lisbon)",6207,9108,7022,8902,,,,,,,,
-4804,"Makassar (Jakarta)",6804,"Makassar (Jakarta)",6257,9108,7004,8908,9603,-587.8,519.75,145.76,,,,
-4805,"MGI (Ferro)",6805,"Militar-Geographische Institut (Ferro)",6312,9108,7004,8909,,,,,,,,
-4806,"Monte Mario (Rome)",6806,"Monte Mario (Rome)",6265,9108,7022,8906,,,,,,,,
-4807,"NTF (Paris)",6807,"Nouvelle Triangulation Francaise (Paris)",6275,9105,7011,8903,9603,-168.0,-60.0,320.0,,,,
-4808,"Padang (Jakarta)",6808,"Padang 1884 (Jakarta)",6280,9108,7004,8908,,,,,,,,
-4809,"Belge 1950 (Brussels)",6809,"Reseau National Belge 1950 (Brussels)",6215,9108,7022,8910,,,,,,,,
-4810,"Tananarive (Paris)",6810,"Tananarive 1925 (Paris)",6297,9105,7022,8903,9603,-189.0,-242.0,-91.0,,,,
-4811,"Voirol 1875 (Paris)",6811,"Voirol 1875 (Paris)",6304,9105,7011,8903,9603,-73.0,-247.0,227.0,,,,
-4813,"Batavia (Jakarta)",6813,"Batavia (Jakarta)",6211,9108,7004,8908,,,,,,,,
-4814,"RT38 (Stockholm)",6814,"Stockholm 1938 (Stockholm)",6308,9108,7004,8911,,,,,,,,
-4815,"Greek (Athens)",6815,"Greek (Athens)",6120,9108,7004,8912,,,,,,,,
-4816,"Carthage (Paris)",6816,"Carthage (Paris)",6816,9105,7011,8903,,,,,,,,
-4817,"NGO 1948 (Oslo)",6817,"NGO 1948 (Oslo)",6273,9108,7005,8913,9606,278.3,93.0,474.5,7.889,0.05,-6.61,6.21
-4818,"S-JTSK (Ferro)",6818,"S-JTSK (Ferro)",6818,9108,7004,8909,,,,,,,,
-4819,"Nord Sahara 1959 (Paris)",6819,"Nord Sahara 1959 (Paris)",6819,9105,7012,8903,,,,,,,,
-4820,"Segara (Jakarta)",6820,"Gunung Segara (Jakarta)",6820,9108,7004,8908,,,,,,,,
-4901,"ATF (Paris)",6901,"Ancienne Triangulation Francaise (Paris)",6901,9105,7027,8903,,,,,,,,
-4902,"NDG (Paris)",6902,"Nord de Guerre (Paris)",6902,9105,7027,8903,,,,,,,,
-4903,"Madrid 1870 (Madrid)",6903,"Madrid 1870 (Madrid)",6903,9108,7028,8905,,,,,,,,
-4904,"Lisbon 1890 (Lisbon)",6904,"Lisbon 1890 (Lisbon)",6904,9108,7004,8902,,,,,,,,
diff --git a/src/tiff/csv/gdatum_alias.c b/src/tiff/csv/gdatum_alias.c
deleted file mode 100644
index 997aa7a..0000000
--- a/src/tiff/csv/gdatum_alias.c
+++ /dev/null
@@ -1,11 +0,0 @@
-#include "defs.h"
-datafile_rows_t gdatum_alias_row_1[] = {"GEOD_DATUM_ALIAS_CODE","GEOD_DATUM_ALIAS_NAME","GEOD_DATUM_CODE","REVISION_DATE","INFORMATION_SOURCE","DATA_SOURCE","REMARKS","CHANGE_ID",NULL};
-datafile_rows_t gdatum_alias_row_2[] = {"6400","ETRS89","6258","1999-04-22 00:00:00","","EPSG","Coincides with WGS84 at the one metre level.","99.111",NULL};
-datafile_rows_t gdatum_alias_row_3[] = {"6401","South Africa","6222","1996-10-18 00:00:00","Private Communication, Directorate of Surveys and Land Information, Cape Town.","EPSG","","",NULL};
-datafile_rows_t gdatum_alias_row_4[] = {"6402","Genuk","6211","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t gdatum_alias_row_5[] = {"6403","NAD83 (1986)","6269","1996-12-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t gdatum_alias_row_6[] = {"6404","Old Greek","6120","1997-06-16 00:00:00","Topographic Department; National Technical University of Greece.","EPSG","Adjective \"Old\" applied since introduction of GGRS87 (code 6121)","",NULL};
-datafile_rows_t gdatum_alias_row_7[] = {"6405","Rikets koordinatsystem 1938","6308","1997-11-13 00:00:00","National Land Survey of Sweden","EPSG","","",NULL};
-datafile_rows_t gdatum_alias_row_8[] = {"6406","Samboja P2 exc T9","6125","1997-11-13 00:00:00","Total Indonesia","EPSG","","",NULL};
-
-datafile_rows_t *gdatum_alias_rows[] = {gdatum_alias_row_1,gdatum_alias_row_2,gdatum_alias_row_3,gdatum_alias_row_4,gdatum_alias_row_5,gdatum_alias_row_6,gdatum_alias_row_7,gdatum_alias_row_8,NULL};
diff --git a/src/tiff/csv/gdatum_alias.csv b/src/tiff/csv/gdatum_alias.csv
deleted file mode 100644
index 5f79125..0000000
--- a/src/tiff/csv/gdatum_alias.csv
+++ /dev/null
@@ -1,8 +0,0 @@
-"GEOD_DATUM_ALIAS_CODE","GEOD_DATUM_ALIAS_NAME","GEOD_DATUM_CODE","REVISION_DATE","INFORMATION_SOURCE","DATA_SOURCE","REMARKS","CHANGE_ID"
-6400,ETRS89,6258,1999-04-22 00:00:00,,EPSG,Coincides with WGS84 at the one metre level.,99.111
-6401,South Africa,6222,1996-10-18 00:00:00,"Private Communication, Directorate of Surveys and Land Information, Cape Town.",EPSG,,
-6402,Genuk,6211,1996-10-18 00:00:00,,EPSG,,
-6403,NAD83 (1986),6269,1996-12-12 00:00:00,,EPSG,,
-6404,Old Greek,6120,1997-06-16 00:00:00,Topographic Department; National Technical University of Greece.,EPSG,"Adjective \"Old\" applied since introduction of GGRS87 (code 6121)",
-6405,Rikets koordinatsystem 1938,6308,1997-11-13 00:00:00,National Land Survey of Sweden,EPSG,,
-6406,Samboja P2 exc T9,6125,1997-11-13 00:00:00,Total Indonesia,EPSG,,
diff --git a/src/tiff/csv/geod_datum.c b/src/tiff/csv/geod_datum.c
deleted file mode 100644
index e4ea816..0000000
--- a/src/tiff/csv/geod_datum.c
+++ /dev/null
@@ -1,213 +0,0 @@
-#include "defs.h"
-datafile_rows_t geod_datum_row_1[] = {"GEOD_DATUM_CODE","GEOD_DAT_EPSG_NAME","GEOD_DAT_EPSG_ABBR","GEOD_DAT_USER_NAME","ORIGIN_DESCRIPTION","ELLIPSOID_CODE","REVISION_DATE","INFORMATION_SOURCE","DATA_SOURCE","REMARKS","CHANGE_ID",NULL};
-datafile_rows_t geod_datum_row_2[] = {"6001","Not specified (based on ellipsoid 7001)","","","","7001","1996-09-12 00:00:00","","EPSG","Not a valid datum.  Included for coordinate systems where datum is unknown.","96.08",NULL};
-datafile_rows_t geod_datum_row_3[] = {"6002","Not specified (based on ellipsoid 7002)","","","","7002","1996-09-12 00:00:00","","EPSG","Not a valid datum.  Included for coordinate systems where datum is unknown.","96.08",NULL};
-datafile_rows_t geod_datum_row_4[] = {"6003","Not specified (based on ellipsoid 7003)","","","","7003","1996-09-12 00:00:00","","EPSG","Not a valid datum.  Included for coordinate systems where datum is unknown.","96.08",NULL};
-datafile_rows_t geod_datum_row_5[] = {"6004","Not specified (based on ellipsoid 7004)","","","","7004","1996-09-12 00:00:00","","EPSG","Not a valid datum.  Included for coordinate systems where datum is unknown.","96.08",NULL};
-datafile_rows_t geod_datum_row_6[] = {"6005","Not specified (based on ellipsoid 7005)","","","","7005","1996-09-12 00:00:00","","EPSG","Not a valid datum.  Included for coordinate systems where datum is unknown.","96.08",NULL};
-datafile_rows_t geod_datum_row_7[] = {"6006","Not specified (based on ellipsoid 7006)","","","","7006","1996-09-12 00:00:00","","EPSG","Not a valid datum.  Included for coordinate systems where datum is unknown.","96.08",NULL};
-datafile_rows_t geod_datum_row_8[] = {"6007","Not specified (based on ellipsoid 7007)","","","","7007","1996-09-12 00:00:00","","EPSG","Not a valid datum.  Included for coordinate systems where datum is unknown.","96.08",NULL};
-datafile_rows_t geod_datum_row_9[] = {"6008","Not specified (based on ellipsoid 7008)","","","","7008","1996-09-12 00:00:00","","EPSG","Not a valid datum.  Included for coordinate systems where datum is unknown.","96.08",NULL};
-datafile_rows_t geod_datum_row_10[] = {"6009","Not specified (based on ellipsoid 7009)","","","","7009","1996-09-12 00:00:00","","EPSG","Not a valid datum.  Included for coordinate systems where datum is unknown.","96.08",NULL};
-datafile_rows_t geod_datum_row_11[] = {"6010","Not specified (based on ellipsoid 7010)","","","","7010","1996-09-12 00:00:00","","EPSG","Not a valid datum.  Included for coordinate systems where datum is unknown.","96.08",NULL};
-datafile_rows_t geod_datum_row_12[] = {"6011","Not specified (based on ellipsoid 7011)","","","","7011","1996-09-12 00:00:00","","EPSG","Not a valid datum.  Included for coordinate systems where datum is unknown.","96.08",NULL};
-datafile_rows_t geod_datum_row_13[] = {"6012","Not specified (based on ellipsoid 7012)","","","","7012","1996-09-12 00:00:00","","EPSG","Not a valid datum.  Included for coordinate systems where datum is unknown.","96.08",NULL};
-datafile_rows_t geod_datum_row_14[] = {"6013","Not specified (based on ellipsoid 7013)","","","","7013","1996-09-12 00:00:00","","EPSG","Not a valid datum.  Included for coordinate systems where datum is unknown.","96.08",NULL};
-datafile_rows_t geod_datum_row_15[] = {"6014","Not specified (based on ellipsoid 7014)","","","","7014","1996-09-12 00:00:00","","EPSG","Not a valid datum.  Included for coordinate systems where datum is unknown.","96.08",NULL};
-datafile_rows_t geod_datum_row_16[] = {"6015","Not specified (based on ellipsoid 7015)","","","","7015","1996-09-12 00:00:00","","EPSG","Not a valid datum.  Included for coordinate systems where datum is unknown.","96.08",NULL};
-datafile_rows_t geod_datum_row_17[] = {"6016","Not specified (based on ellipsoid 7016)","","","","7016","1996-09-12 00:00:00","","EPSG","Not a valid datum.  Included for coordinate systems where datum is unknown.","96.08",NULL};
-datafile_rows_t geod_datum_row_18[] = {"6017","Not specified (based on ellipsoid 7017)","","","","7044","1996-09-12 00:00:00","","EPSG","Not a valid datum.  Included for coordinate systems where datum is unknown.","96.08",NULL};
-datafile_rows_t geod_datum_row_19[] = {"6018","Not specified (based on ellipsoid 7018)","","","","7018","1996-09-12 00:00:00","","EPSG","Not a valid datum.  Included for coordinate systems where datum is unknown.","96.08",NULL};
-datafile_rows_t geod_datum_row_20[] = {"6019","Not specified (based on ellipsoid 7019)","","","","7019","1996-09-12 00:00:00","","EPSG","Not a valid datum.  Included for coordinate systems where datum is unknown.","96.08",NULL};
-datafile_rows_t geod_datum_row_21[] = {"6020","Not specified (based on ellipsoid 7020)","","","","7020","1996-09-12 00:00:00","","EPSG","Not a valid datum.  Included for coordinate systems where datum is unknown.","96.08",NULL};
-datafile_rows_t geod_datum_row_22[] = {"6021","Not specified (based on ellipsoid 7021)","","","","7021","1996-09-12 00:00:00","","EPSG","Not a valid datum.  Included for coordinate systems where datum is unknown.","96.08",NULL};
-datafile_rows_t geod_datum_row_23[] = {"6022","Not specified (based on ellipsoid 7022)","","","","7022","1996-09-12 00:00:00","","EPSG","Not a valid datum.  Included for coordinate systems where datum is unknown.","96.08",NULL};
-datafile_rows_t geod_datum_row_24[] = {"6024","Not specified (based on ellipsoid 7024)","","","","7024","1996-09-12 00:00:00","","EPSG","Not a valid datum.  Included for coordinate systems where datum is unknown.","96.08",NULL};
-datafile_rows_t geod_datum_row_25[] = {"6025","Not specified (based on ellipsoid 7025)","","","","7025","1996-09-12 00:00:00","","EPSG","Not a valid datum.  Included for coordinate systems where datum is unknown.","96.08",NULL};
-datafile_rows_t geod_datum_row_26[] = {"6027","Not specified (based on ellipsoid 7027)","","","","7027","1996-09-12 00:00:00","","EPSG","Not a valid datum.  Included for coordinate systems where datum is unknown.","96.08",NULL};
-datafile_rows_t geod_datum_row_27[] = {"6028","Not specified (based on ellipsoid 7028)","","","","7028","1996-09-12 00:00:00","","EPSG","Not a valid datum.  Included for coordinate systems where datum is unknown.","96.08",NULL};
-datafile_rows_t geod_datum_row_28[] = {"6029","Not specified (based on ellipsoid 7029)","","","","7029","1996-09-12 00:00:00","","EPSG","Not a valid datum.  Included for coordinate systems where datum is unknown.","96.08",NULL};
-datafile_rows_t geod_datum_row_29[] = {"6030","Not specified (based on ellipsoid 7030)","","","","7030","1996-09-12 00:00:00","","EPSG","Not a valid datum.  Included for coordinate systems where datum is unknown.","96.08",NULL};
-datafile_rows_t geod_datum_row_30[] = {"6031","Not specified (based on ellipsoid 7031)","","","","7031","1996-09-12 00:00:00","","EPSG","Not a valid datum.  Included for coordinate systems where datum is unknown.","96.08",NULL};
-datafile_rows_t geod_datum_row_31[] = {"6032","Not specified (based on ellipsoid 7032)","","","","7032","1996-09-12 00:00:00","","EPSG","Not a valid datum.  Included for coordinate systems where datum is unknown.","96.08",NULL};
-datafile_rows_t geod_datum_row_32[] = {"6033","Not specified (based on ellipsoid 7033)","","","","7033","1996-09-12 00:00:00","","EPSG","Not a valid datum.  Included for coordinate systems where datum is unknown.","96.08",NULL};
-datafile_rows_t geod_datum_row_33[] = {"6034","Not specified (based on ellipsoid 7034)","","","","7034","1996-09-12 00:00:00","","EPSG","Not a valid datum.  Included for coordinate systems where datum is unknown.","96.08",NULL};
-datafile_rows_t geod_datum_row_34[] = {"6035","Not specified (based on ellipsoid 7035)","","","","7035","1996-09-12 00:00:00","","EPSG","Not a valid datum.  Included for coordinate systems where datum is unknown.","96.08",NULL};
-datafile_rows_t geod_datum_row_35[] = {"6036","Not specified (based on ellipsoid 7036)","","","","7036","1996-09-12 00:00:00","","EPSG","Not a valid datum.  Included for coordinate systems where datum is unknown.","",NULL};
-datafile_rows_t geod_datum_row_36[] = {"6041","Not specified (based on ellipsoid 7041)","","","","7041","1999-10-20 00:00:00","","EPSG","Not a valid datum.  Included for coordinate systems where datum is unknown.","",NULL};
-datafile_rows_t geod_datum_row_37[] = {"6042","Not specified (based on ellipsoid 7042)","","","","7042","1999-10-20 00:00:00","","EPSG","Not a valid datum.  Included for coordinate systems where datum is unknown.","",NULL};
-datafile_rows_t geod_datum_row_38[] = {"6043","Not specified (based on ellipsoid 7043)","","","","7043","1999-10-20 00:00:00","","EPSG","Not a valid datum.  Included for coordinate systems where datum is unknown.","",NULL};
-datafile_rows_t geod_datum_row_39[] = {"6044","Not specified (based on ellipsoid 7044)","","","","7044","1999-10-20 00:00:00","","EPSG","Not a valid datum.  Included for coordinate systems where datum is unknown.","",NULL};
-datafile_rows_t geod_datum_row_40[] = {"6045","Not specified (based on ellipsoid 7045)","","","","7045","1999-10-20 00:00:00","","EPSG","Not a valid datum.  Included for coordinate systems where datum is unknown.","",NULL};
-datafile_rows_t geod_datum_row_41[] = {"6120","Greek","","","Fundamental point: Athens Observatory; latitude 37 deg 58 min 20.132 sec N; longitude 23 deg 42 min 58.815 sec E of Greenwich","7004","1997-06-16 00:00:00","Topography Department; National Technical University of Athens","EPSG","See geodetic datum alias 6404.  Used as basis of topographic mapping based on Hatt projection.","",NULL};
-datafile_rows_t geod_datum_row_42[] = {"6121","Greek Geodetic Reference System 1987","GGRS87","","Fundamental point: Dionysos; latitude 38 deg 04 min 33.8 sec N; longitude 23 deg 55 min 51.0 sec E of Greenwich; geoid height 7.0 m.","7019","1997-06-16 00:00:00","L. Portokalakis; Public Petroleum Corporation of Greece","EPSG","Superseded (old) Greek datum.  Oil industry work based on ED50.","",NULL};
-datafile_rows_t geod_datum_row_43[] = {"6122","Average Terrestrial System 1977","ATS77","","","7041","1997-07-02 00:00:00","New Brunswick Geographic Information Corporation land and water information standards manual.","EPSG","In use from 1979.  To be phased out in late 1990's.","",NULL};
-datafile_rows_t geod_datum_row_44[] = {"6123","Kartastokoordinaattijarjestelma","KKJ","","Adjustment with fundamental point based on ED50 transformed to best fit the older VVJ adjustment.","7022","1997-07-22 00:00:00","www.nls.fi/maa/papers/kkj.html","EPSG","Adopted in 1970.","",NULL};
-datafile_rows_t geod_datum_row_45[] = {"6124","Rikets koordinatsystem 1990","RT90","","","7004","1997-11-13 00:00:00","National Land Survey of Sweden","EPSG","Supersedes RT38 adjustment (datum code 6308)","",NULL};
-datafile_rows_t geod_datum_row_46[] = {"6125","Samboja","","","Original origin station P2 Exc now destroyed.  Extensions recomputed using Toran station T9 as origin.","7004","1997-11-13 00:00:00","Total Indonesia.","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_47[] = {"6126","Lithuania 1994 (ETRS89)","LKS94 (ETRS89)","","Densification from 4  ETRF89 points.","7019","1998-03-12 00:00:00","HNIT-Baltic GeoInfoServisas","EPSG","Densification of ETRS89 during the 1992 Baltic campaign.","",NULL};
-datafile_rows_t geod_datum_row_48[] = {"6127","Tete","","","Fundamental point: Tete.","7008","1998-04-16 00:00:00","Mozambique Direc��o Nacional de Geografia e Cadastral (DINAGECA).","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_49[] = {"6128","Madzansua","","","Fundamental point: Madzansua.","7008","1998-04-16 00:00:00","Mozambique Direc��o Nacional de Geografia e Cadastral (DINAGECA).","EPSG","Superseded by transformation to Tete datum (datum code 6127).","",NULL};
-datafile_rows_t geod_datum_row_50[] = {"6129","Observatario","","","Fundamental point: Maputo observatory.","7008","1998-04-16 00:00:00","Mozambique Direc��o Nacional de Geografia e Cadastral (DINAGECA).","EPSG","Superseded by transformation to Tete datum (datum code 6127).","",NULL};
-datafile_rows_t geod_datum_row_51[] = {"6130","Moznet (ITRF94)","Moznet","","ITRF 1994 epoch 20","7030","1998-04-16 00:00:00","Mozambique Direc��o Nacional de Geografia e Cadastral (DINAGECA).","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_52[] = {"6131","Indian 1960","","","","7015","1998-11-11 00:00:00","","EPSG","DMA adjustment of IndoChina part of the Indian 1954 network to better fit local geoid.  Also known as Indian (DMA Reduced).","",NULL};
-datafile_rows_t geod_datum_row_53[] = {"6132","Final Datum 1958","FD58","","Fundamental point: Maniyur.  Latitude: 31 deg 23 min 59.19 sec N; Longitude: 48 deg 32 min 31.38 sec E (of Greenwich).","7012","1998-11-11 00:00:00","IOEPC records","EPSG","Network included in Nahrwan 1967 adjustment.","",NULL};
-datafile_rows_t geod_datum_row_54[] = {"6133","Estonia 1992","EST92","","Densification from 4  ETRS89 points.","7019","1998-12-14 00:00:00","http://www.geo.ut.ee/~raivo/estcoord.html","EPSG","Based on ETRS89 as established during the 1992 Baltic campaign.","",NULL};
-datafile_rows_t geod_datum_row_55[] = {"6134","PDO Survey Datum 1993","PSD93","","Adjustment best fitted to Fahud network.","7012","1999-04-22 00:00:00","Petroleum Development Oman","EPSG","Supersedes Fahud datum (code 6232). Maximum differences to Fahud adjustment are 20 metres.","",NULL};
-datafile_rows_t geod_datum_row_56[] = {"6135","Old Hawaiian","","","Fundamental Point: Oahu West Base Astro.  Latitude: 21 deg 18 min 13.89 sec N; longitude 157 deg 50 min 55.79 sec W (of Greenwich)","7008","1999-05-24 00:00:00","http://www.ngs.noaa.gov/ (NADCON readme file) and the NIMA publication http://164.214.2.59/publications/guides/Datum_Pamphlet/datum.html","EPSG","Hawaiian Islands were never on NAD27 but rather on Old Hawaiian Datum.  NADCON conversion program provides transform [...]
-datafile_rows_t geod_datum_row_57[] = {"6136","St. Lawrence Island","","","","7008","1999-05-24 00:00:00","http://www.ngs.noaa.gov/ (NADCON readme file)","EPSG","Many Alaskan islands were never on NAD27 but rather on independent datums.  NADCON conversion program provides transformation from St. Lawrence Island Datum to NAD83 (original 1986 realization) - making the transformation appear to user as if from NAD27.","",NULL};
-datafile_rows_t geod_datum_row_58[] = {"6137","St. Paul Island","","","","7008","1999-05-24 00:00:00","http://www.ngs.noaa.gov/ (NADCON readme file)","EPSG","Many Alaskan islands were never on NAD27 but rather on independent datums.  NADCON conversion program provides transformation from St. Paul Island Datum to NAD83 (original 1986 realization) - making the transformation appear to user as if from NAD27.","",NULL};
-datafile_rows_t geod_datum_row_59[] = {"6138","St. George Island","","","","7008","1999-05-24 00:00:00","http://www.ngs.noaa.gov/ (NADCON readme file)","EPSG","Many Alaskan islands were never on NAD27 but rather on independent datums.  NADCON conversion program provides transformation from St. George Island Datum to NAD83 (original 1986 realization) - making the transformation appear to user as if from NAD27.","",NULL};
-datafile_rows_t geod_datum_row_60[] = {"6139","Puerto Rico","","","","7008","1999-05-24 00:00:00","Ordnance Survey of Great Britain and http://www.ngs.noaa.gov/ (NADCON readme file).","EPSG","NADCON conversion program provides transformation from Puerto Rico Datum to NAD83 (original 1986 realization) but making the transformation appear to user as if from NAD27.","",NULL};
-datafile_rows_t geod_datum_row_61[] = {"6140","NAD83 Canadian Spatial Reference System","NAD83(CSRS98)","","","7019","1999-10-20 00:00:00","Service New Brunswick Land and Information Standards Manual","EPSG","Supersedes ATS77 from 1999 in New Brunswick.","",NULL};
-datafile_rows_t geod_datum_row_62[] = {"6141","Israel","","","Fundamental Point:  Latitude: 31 deg 44 min 03.817 sec N; Longitude: 35 deg 12 min 16.261 sec E (of Greenwich).","7019","1999-10-20 00:00:00","Survey of Israel.","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_63[] = {"6142","Locodjo 1965","","","Fundamental Point: T5 Banco. Latitude: 5 deg 18 min 50.5 sec N; Longitude: 4 deg 02 min 05.1 sec W (of Greenwich).","7012","1999-10-20 00:00:00","IGN Paris.","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_64[] = {"6143","Abidjan 1987","","","Fundamental Point: Abidjan I. Latitude: 5 deg 18 min 51.01 sec N; Longitude: 4 deg 02 min 06.04 sec W (of Greenwich).","7012","1999-10-20 00:00:00","IGN Paris.","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_65[] = {"6144","Kalianpur 1937","","","Fundamental Point: Kalianpur. Latitude: 24 deg  07 min 11.260 sec N; Longitude: 77 deg 39 min 17.570 sec E (of Greenwich).","7015","1999-10-20 00:00:00","G. Bomford; \"The Re-adjustment of the Indian Triangulation\"; Survey of India Professional Paper 28; 1939.","EPSG","Supercedes 1880 adjustment except for topographic mapping.  Superseded in Pakistan by 1962 metrication conversion and in India by 1975 metrication conv [...]
-datafile_rows_t geod_datum_row_66[] = {"6145","Kalianpur 1962","","","Fundamental Point: Kalianpur. Latitude: 24 deg  07 min 11.260 sec N; Longitude: 77 deg 39 min 17.570 sec E (of Greenwich).","7044","1999-10-20 00:00:00","","EPSG","1937 adjustment rescaled by ratio metric conversions of Indian foot (1937) to Indian foot (1962).","",NULL};
-datafile_rows_t geod_datum_row_67[] = {"6146","Kalianpur 1975","","","Fundamental Point: Kalianpur. Latitude: 24 deg  07 min 11.260 sec N; Longitude: 77 deg 39 min 17.570 sec E (of Greenwich).","7045","1999-10-20 00:00:00","","EPSG","1937 adjustment rescaled by ratio metric conversions of Indian foot (1937) to Indian foot (1975).","",NULL};
-datafile_rows_t geod_datum_row_68[] = {"6147","Hanoi 1972","","","","7024","1999-10-20 00:00:00","PetroVietnam","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_69[] = {"6148","Hartbeesthoek94","","","Coincident with ITRF91 (1994.0) at Hartbeesthoek astronomical observatory near Pretoria.","7030","1999-10-22 00:00:00","Directorate of Surveys and Mapping; http://w3sli.wcape.gov.za/surveys/mapping/wgs84.htm","EPSG","Supersedes Cape datum (code 6222).","",NULL};
-datafile_rows_t geod_datum_row_70[] = {"6149","CH1903","","","Fundamental Point: Old Bern observatory. Latitude: 46 deg 57 min  8.660 sec N; Longitude: 7 deg 26 min 22.500 sec E (of Greenwich).","7004","1999-10-20 00:00:00","Bundesamt f�r Landestopographie","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_71[] = {"6150","CH1903+","","","Fundamental Point: Old Bern observatory. Latitude: 46 deg 57 min  8.660 sec N; Longitude: 7 deg 26 min 22.500 sec E (of Greenwich).","7004","1999-10-20 00:00:00","Bundesamt f�r Landestopographie.  Aufbau der Landesvermessung der Schweiz 'LV95' Teil 3: Terrestrische Bezugssysteme und Bezugsrahmen. L+T 1999.","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_72[] = {"6151","Swiss Terrestrial Reference Frame 1995","CHTRF95","","ETRF89 at 1993.0","7019","1999-10-20 00:00:00","Bundesamt f�r Landestopographie.  Aufbau der Landesvermessung der Schweiz 'LV95' Teil 3: Terrestrische Bezugssysteme und Bezugsrahmen. L+T 1999.","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_73[] = {"6152","NAD83 (High Accuracy Regional Network)","NAD83(HARN)","","","7019","1999-10-20 00:00:00","National Geodetic Survey","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_74[] = {"6153","Rassadiran","","","Fundamental point: Total 1","7022","1999-11-20 00:00:00","Total-Fina","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_75[] = {"6154","ED50(ED77)","","","Extension of ED50 over Iran","7022","1999-11-20 00:00:00","National Cartographic Centre of Iran","EPSG","Sometimes referred to as ED50-ED77","",NULL};
-datafile_rows_t geod_datum_row_76[] = {"6200","Pulkovo 1995","","","Fundamental Point: Pulkovo observatory. Latitude: 59 deg 46 min 15.359 sec N; Longitude: 30 deg 19 min 28.318 sec E (of Greenwich).","7024","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_77[] = {"6201","Adindan","","","Fundamental Point: Station 15; Adindan. Latitude: 22 deg 10 min  7.110 sec N; Longitude: 31 deg 29 min 21.608 sec E (of Greenwich).","7012","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_78[] = {"6202","Australian Geodetic Datum 1966","AGD66","","Fundamental Point: Johnson Memorial. Latitude: 25 deg 56 min 54.551 sec S; Longitude: 133 deg 12 min 30.077 sec E (of Greenwich).","7003","1995-06-02 00:00:00","Australian Map Grid Technical Manual. National Mapping Council of Australia Technical Publication 7; 1972.","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_79[] = {"6203","Australian Geodetic Datum 1984","AGD84","","","7003","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_80[] = {"6204","Ain el Abd 1970","Ain el Abd","","Fundamental Point: Ain El Abd.  Latitude: 28 deg  14 min 06.171 sec N; Longitude: 48 deg 16 min 20.906 sec E (of Greenwich).","7022","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_81[] = {"6205","Afgooye","","","","7024","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_82[] = {"6206","Agadez","","","","7011","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_83[] = {"6207","Lisbon","","","Fundamental Point: Castelo Sao Jorge; Lisbon. Latitude: 38 deg 42 min 43.631 sec N; Longitude: 9 deg 07 min 54.862 sec W (of Greenwich).","7022","1995-06-02 00:00:00","Instituto Geografico e Cadastral; Lisbon","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_84[] = {"6208","Aratu","","","","7022","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_85[] = {"6209","Arc 1950","","","Fundamental Point: Buffelsfontein. Latitude: 33 deg 59 min 32.000 sec S; Longitude: 25 deg 30 min 44.622 sec E (of Greenwich).","7013","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_86[] = {"6210","Arc 1960","","","Fundamental Point: Buffelsfontein. Latitude: 33 deg 59 min 32.000 sec S; Longitude: 25 deg 30 min 44.622 sec E (of Greenwich).","7012","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_87[] = {"6211","Batavia","","","Fundamental Point: Batavia Astro. Station. Latitude: 6 deg  7 min 39.520 sec S; Longitude: 106 deg 48 min 27.790 sec E (of Greenwich).","7004","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_88[] = {"6212","Barbados 1938","","","Fundamental point: HMS Challenger astro station M1; latitude 13 deg 04 min 32.53 sec N; longitude 59 deg 36 min 29.34 sec W (of Greenwich).","7012","1999-04-22 00:00:00","Ordnance Survey of Great Britain.","EPSG","","99.171",NULL};
-datafile_rows_t geod_datum_row_89[] = {"6213","Beduaram","","","","7011","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_90[] = {"6214","Beijing 1954","","","","7024","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_91[] = {"6215","Reseau National Belge 1950","Belge 1950","","Fundamental Point: Lommel (tower). Latitude: 51 deg 13 min 47.334 sec N; Longitude: 0 deg 56 min 44.773 sec E (of Brussels).","7022","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_92[] = {"6216","Bermuda 1957","","","","7008","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_93[] = {"6218","Bogota","","","Fundamental Point: Bogota observatory. Latitude: 4 deg 35 min 56.570 sec N; Longitude: 74 deg  4 min 51.300 sec W (of Greenwich).","7022","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_94[] = {"6219","Bukit Rimpah","","","","7004","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_95[] = {"6220","Camacupa","","","","7012","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_96[] = {"6221","Campo Inchauspe","","","Fundamental Point: Campo Inchauspe. Latitude: 35 deg 58 min 17.000 sec S; Longitude: 62 deg 10 min 12.000 sec W (of Greenwich).","7022","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_97[] = {"6222","Cape","","","Fundamental Point: Buffelsfontein. Latitude: 33 deg 59 min 32.000 sec S; Longitude: 25 deg 30 min 44.622 sec E (of Greenwich).","7013","1996-10-18 00:00:00","Private Communication, Directorate of Surveys and Land Information, Cape Town.","EPSG","","96.25  99.69",NULL};
-datafile_rows_t geod_datum_row_98[] = {"6223","Carthage","","","","7011","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_99[] = {"6224","Chua","","","Fundamental Point: Chua. Latitude: 19 deg 45 min 41.160 sec S; Longitude: 48 deg  6 min  7.560 sec W (of Greenwich).","7022","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_100[] = {"6225","Corrego Alegre","","","Fundamental Point: Corrego Alegre. Latitude: 19 deg 50 min 15.140 sec S; Longitude: 48 deg 57 min 42.750 sec W (of Greenwich).","7022","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_101[] = {"6226","Cote d'Ivoire","","","","7011","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_102[] = {"6227","Deir ez Zor","","","Fundamental Point: Trig. 254 Deir. Latitude: 35 deg 21 min 49.975 sec N; Longitude: 40 deg  5 min 46.770 sec E (of Greenwich).","7011","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_103[] = {"6228","Douala","","","","7011","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_104[] = {"6229","Egypt 1907","","","Fundamental Point: Station F1. Latitude: 30 deg  1 min 42.860 sec N; Longitude: 31 deg 16 min 33.600 sec E (of Greenwich).","7020","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_105[] = {"6230","European Datum 1950","ED50","","Fundamental Point: Potsdam (Helmert Tower). Latitude: 52 deg 22 min 51.450 sec N; Longitude: 13 deg  3 min 58.740 sec E (of Greenwich).","7022","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_106[] = {"6231","European Datum 1987","ED87","","","7022","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_107[] = {"6232","Fahud","","","Fundamental Point: Station NO68-024 Fahud. Latitude: 22 deg 17 min 31.182 sec N; Longitude: 56 deg 29 min 18.820 sec E (of Greenwich).","7012","1995-06-02 00:00:00","Petroleum Development Oman.","EPSG","Superseded by PSD93 (code 6134).","",NULL};
-datafile_rows_t geod_datum_row_108[] = {"6233","Gandajika 1970","","","","7022","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_109[] = {"6234","Garoua","","","","7011","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_110[] = {"6235","Guyane Francaise","","","","7022","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_111[] = {"6236","Hu Tzu Shan","","","","7022","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_112[] = {"6237","Hungarian Datum 1972","HD72","","Fundamental Point: Szolohegy. Latitude: 47 deg 17 min 32,6156 sec N; Longitude 19 deg 36 min 09.9865 sec E; geoid height 6.56m.","7036","1996-10-18 00:00:00","http://lazarus.elte.hu/gb/geodez/geod3.htm","EPSG","","96.09",NULL};
-datafile_rows_t geod_datum_row_113[] = {"6238","Indonesian Datum 1974","ID74","","Fundamental Point: Padang. Latitude: 0 deg 56 min 38.414 sec S; Longitude: 100 deg 22 min  8.804 sec E (of Greenwich).","7021","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_114[] = {"6239","Indian 1954","","","Fundamental Point: Kalianpur. Latitude: 24 deg  07 min 11.260 sec N; Longitude: 77 deg 39 min 17.570 sec E (of Greenwich).","7015","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_115[] = {"6240","Indian 1975","","","Fundamental Point: Khau Sakaerang","7015","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_116[] = {"6241","Jamaica 1875","","","Fundamental Point: Fort Charles Flagstaff. Latitude: 17 deg 55 min 55.800 sec N; Longitude: 76 deg 56 min 37.260 sec W (of Greenwich).","7034","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_117[] = {"6242","Jamaica 1969","JAD69","","Fundamental Point: Fort Charles Flagstaff. Latitude: 17 deg 55 min 55.800 sec N; Longitude: 76 deg 56 min 37.260 sec W (of Greenwich).","7008","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_118[] = {"6243","Kalianpur 1880","","","Fundamental Point: Kalianpur. Latitude: 24 deg  07 min 11.260 sec N; Longitude: 77 deg 39 min 17.570 sec E (of Greenwich).","7042","1999-10-20 00:00:00","G. Bomford; \"The Re-adjustment of the Indian Triangulation\"; Survey of India Professional Paper 28; 1939.","EPSG","Includes 1916 extrension into Burma (Myanmar).  Superseded by 1937 adjustment.","97.23",NULL};
-datafile_rows_t geod_datum_row_119[] = {"6244","Kandawala","","","","7015","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_120[] = {"6245","Kertau","","","Fundamental Point: Kertau. Latitude: 3 deg 27 min 50.710 sec N; Longitude: 102 deg 37 min 24.550 sec E (of Greenwich).","7018","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_121[] = {"6246","Kuwait Oil Company","KOC","","","7012","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_122[] = {"6247","La Canoa","","","Fundamental Point: La Canoa. Latitude: 8 deg 34 min 17.170 sec N; Longitude: 63 deg 51 min 34.880 sec W (of Greenwich).","7022","1995-06-02 00:00:00","","EPSG","Origin also adopted for PSAD56.","",NULL};
-datafile_rows_t geod_datum_row_123[] = {"6248","Provisional South American Datum 1956","PSAD56","","Fundamental Point: La Canoa. Latitude: 8 deg 34 min 17.170 sec N; Longitude: 63 deg 51 min 34.880 sec W (of Greenwich).","7022","1995-06-02 00:00:00","","EPSG","Same origin as La Canoa datum.","",NULL};
-datafile_rows_t geod_datum_row_124[] = {"6249","Lake","","","Fundamental Point: Maracaibo Cathedral. Latitude: 10 deg 38 min 34.678 sec N; Longitude: 71 deg 36 min 20.224 sec W (of Greenwich).","7022","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_125[] = {"6250","Leigon","","","Fundamental Point: GCS Station 121. Latitude: 5 deg 38 min 52.270 sec N; Longitude: 0 deg 11 min 46.080 sec W (of Greenwich).","7012","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_126[] = {"6251","Liberia 1964","","","","7012","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_127[] = {"6252","Lome","","","","7011","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_128[] = {"6253","Luzon 1911","","","Fundamental Point: Balacan. Latitude: 13 deg 33 min 41.000 sec N; Longitude: 121 deg 52 min  03.000 sec E (of Greenwich).","7008","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_129[] = {"6254","Hito XVIII 1963","","","","7022","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_130[] = {"6255","Herat North","","","","7022","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_131[] = {"6256","Mahe 1971","","","Fundamental Point: Mahe","7012","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_132[] = {"6257","Makassar","","","Fundamental Point: Moncongloe","7004","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_133[] = {"6258","European Terrestrial Reference Frame 89","ETRF89","","","7019","1999-04-22 00:00:00","","EPSG","Coincides with WGS84 at the one metre level.","97.11  97.55  99.111",NULL};
-datafile_rows_t geod_datum_row_134[] = {"6259","Malongo 1987","","","Fundamental Point: Station Y at Malongo base camp. Latitude: 5 deg 23 min 34.327 sec S; Longitude: 12 deg 12 min  02.393 sec E (of Greenwich).","7022","1995-06-02 00:00:00","Chevron Petroleum Technology.","EPSG","Offshore extension of Mhast datum (6264) using Transit translocation.","",NULL};
-datafile_rows_t geod_datum_row_135[] = {"6260","Manoca","","","","7012","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_136[] = {"6261","Merchich","","","","7011","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_137[] = {"6262","Massawa","","","","7004","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_138[] = {"6263","Minna","","","Fundamental Point: Minna base station L40. Latitude: 9 deg 38 min  09.000 sec N; Longitude: 6 deg 30 min 59.000 sec E (of Greenwich).","7012","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_139[] = {"6264","Mhast","","","","7022","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_140[] = {"6265","Monte Mario","","","Fundamental Point: Monte Mario. Latitude: 41 deg 55 min 25.510 sec N; Longitude: 0 deg  00 min  00.000 sec E (of Rome).","7022","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_141[] = {"6266","M'poraloko","","","","7011","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_142[] = {"6267","North American Datum 1927","NAD27","","Fundamental Point: Meade's Ranch. Latitude: 39 deg 13 min 26.686 sec N; Longitude: 98 deg 32 min 30.506 sec W (of Greenwich).","7008","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_143[] = {"6268","NAD Michigan","","","Fundamental Point: Meade's Ranch. Latitude: 39 deg 13 min 26.686 sec N; Longitude: 98 deg 32 min 30.506 sec W (of Greenwich).","7009","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_144[] = {"6269","North American Datum 1983","NAD83","","Origin at geocentre.","7019","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_145[] = {"6270","Nahrwan 1967","","","Fundamental point: Nahrwan south base.  Latitude: 33 deg 19 min 10.87 sec N; Longitude: 44 deg 43 min 25.54 sec E (of Greenwich).","7012","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_146[] = {"6271","Naparima 1972","","","Fundamental Point: Naparima. Latitude: 10 deg 16 min 44.860 sec N; Longitude: 61 deg 27 min 34.620 sec W (of Greenwich).","7022","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_147[] = {"6272","New Zealand Geodetic Datum 1949","GD49","","Fundamental Point: Papatahi. Latitude: 41 deg 19 min  8.900 sec S; Longitude: 175 deg  02 min 51.000 sec E (of Greenwich).","7022","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_148[] = {"6273","NGO 1948","","","","7005","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_149[] = {"6274","Datum 73","","","Fundamental Point:  Latitude: 39 deg 41 min 37.30 sec N; Longitude: 8 deg 07 min 53.31 sec W (of Greenwich).","7022","1995-06-02 00:00:00","Instituto Geografico e Cadastral; Lisbon","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_150[] = {"6275","Nouvelle Triangulation Francaise","NTF","","Fundamental Point: Pantheon","7011","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_151[] = {"6276","NSWC 9Z-2","","","","7025","1995-06-02 00:00:00","","EPSG","Transit precise ephemeris before 1991.","",NULL};
-datafile_rows_t geod_datum_row_152[] = {"6277","OSGB 1936","","","Fundamental Point: Herstmonceux. Latitude: 50 deg 51 min 55.271 sec N; Longitude: 0 deg 20 min 45.882 sec E (of Greenwich).","7001","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_153[] = {"6278","OSGB 1970 (SN)","OSGB70","","Fundamental Point: Herstmonceux. Latitude: 50 deg 51 min 55.271 sec N; Longitude: 0 deg 20 min 45.882 sec E (of Greenwich).","7001","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_154[] = {"6279","OS (SN) 1980","OS(SN)80","","Fundamental Point: Herstmonceux. Latitude: 50 deg 51 min 55.271 sec N; Longitude: 0 deg 20 min 45.882 sec E (of Greenwich).","7001","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_155[] = {"6280","Padang 1884","Padang","","Fundamental Point: Padang","7004","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_156[] = {"6281","Palestine 1923","","","Fundamental Point: Point 82'M  Jerusalem. Latitude: 31 deg 44 min  2.749 sec N; Longitude: 35 deg 12 min 43.490 sec E (of Greenwich).","7010","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_157[] = {"6282","Pointe Noire","","","Fundamental Point: Point Noire Astro. Latitude: 4 deg 47 min  0.100 sec S; Longitude: 11 deg 51 min  1.550 sec E (of Greenwich).","7011","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_158[] = {"6283","Geocentric Datum of Australia 1994","GDA94","","","7019","1995-06-02 00:00:00","Australian Surveying and Land Information Group Internet WWW page.","EPSG","Coincident with WGS84 to within 1 metre.","",NULL};
-datafile_rows_t geod_datum_row_159[] = {"6284","Pulkovo 1942","","","Fundamental Point: Pulkovo observatory. Latitude: 59 deg 46 min 18.550 sec N; Longitude: 30 deg 19 min 42.090 sec E (of Greenwich).","7024","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_160[] = {"6285","Qatar","","","Fundamental Point: Station G3","7022","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_161[] = {"6286","Qatar 1948","","","Fundamental Point: Sokey 0 M. Latitude: 25 deg 22 min 56.500 sec N; Longitude: 50 deg 45 min 41.000 sec E (of Greenwich).","7020","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_162[] = {"6287","Qornoq","","","","7022","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_163[] = {"6288","Loma Quintana","","","Fundamental Point: Loma Quintana","7022","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_164[] = {"6289","Amersfoort","","","Fundamental Point: Amersfoort. Latitude: 52 deg  09 min 22.178 sec N; Longitude: 5 deg 23 min 15.478 sec E (of Greenwich).","7004","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_165[] = {"6291","South American Datum 1969","SAD69","","","7036","1996-10-18 00:00:00","","EPSG","SAD69 uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.252.  Error introduced if not using the truncated precision is 0 to 31mm.","96.09  97.252",NULL};
-datafile_rows_t geod_datum_row_166[] = {"6292","Sapper Hill 1943","","","","7022","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_167[] = {"6293","Schwarzeck","","","","7006","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_168[] = {"6294","Segora","","","","7004","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_169[] = {"6295","Serindung","","","","7004","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_170[] = {"6296","Sudan","","","","7011","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_171[] = {"6297","Tananarive 1925","Tananarive","","Fundamental Point: Tananarive observatory. Latitude: 18 deg 55 min  2.100 sec S; Longitude: 45 deg 12 min 52.800 sec E (of Greenwich).","7022","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_172[] = {"6298","Timbalai 1948","","","Fundamental Point: Timbalai. Latitude: 5 deg 17 min  3.548 sec N; Longitude: 115 deg 10 min 56.409 sec E (of Greenwich).","7016","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_173[] = {"6299","TM65","","","","7002","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_174[] = {"6300","TM75","","","","7002","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_175[] = {"6301","Tokyo","","","Fundamental Point: Nikon-Keido-Genten. Latitude: 35 deg 39 min 17.5148 sec N; Longitude: 139 deg 44 min 40.5020 sec E (of Greenwich).","7004","1995-06-02 00:00:00","Geographic Survey Institute; Japan; Bulletin 40 (March 1994).  Also http://vldb.gsi-mc.go.jp/sokuchi/datum/tokyodatum.html","EPSG","","98.46",NULL};
-datafile_rows_t geod_datum_row_176[] = {"6302","Trinidad 1903","","","","7007","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_177[] = {"6303","Trucial Coast 1948","TC(1948)","","Fundamental Point: TC1. Latitude: 25 deg 23 min 50.190 sec N; Longitude: 55 deg 26 min 43.950 sec E (of Greenwich).","7020","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_178[] = {"6304","Voirol 1875","","","Fundamental Point: Voirol. Latitude: 40.835864 grads N; Longitude: 0.788735 grads E of Paris.","7011","1995-06-02 00:00:00","IGN Paris","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_179[] = {"6305","Voirol Unifie 1960","Voirol Unifie","","","7012","1999-10-20 00:00:00","\"Le System Geodesique Nord-Sahara\"; IGN Paris","EPSG","Conformal transformation from ED50. Used only with Lambert Algeria zones: in other cases use Nord Sahara 1959 geodetic datum.","99.62",NULL};
-datafile_rows_t geod_datum_row_180[] = {"6306","Bern 1938","","","Fundamental Point: Old Bern observatory. Latitude: 46 deg 57 min  7.890 sec N; Longitude: 7 deg 26 min 22.335 sec E (of Greenwich).","7004","1995-06-02 00:00:00","\"Die Projektionen der schweizerischen Plan- und Kartenwerke\"; J. Bolliger 1967","EPSG","This redetermination of the coordinates of fundamental point is used for scientific purposes and as the graticule overprinted on topographic maps constructed on the CH1903 / [...]
-datafile_rows_t geod_datum_row_181[] = {"6307","Nord Sahara 1959","","","","7012","1999-10-20 00:00:00","\"Le System Geodesique Nord-Sahara\"; IGN Paris","EPSG","Conformal transformation from ED50.","99.62",NULL};
-datafile_rows_t geod_datum_row_182[] = {"6308","Stockholm 1938","RT38","","Fundamental Point: Stockholm observatory","7004","1996-04-12 00:00:00","","EPSG","Superseded by RT90 adjustment (datum code 6124)","",NULL};
-datafile_rows_t geod_datum_row_183[] = {"6309","Yacare","","","","7022","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_184[] = {"6310","Yoff","","","","7011","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_185[] = {"6311","Zanderij","","","","7022","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_186[] = {"6312","Militar-Geographische Institut","MGI","","Fundamental Point: Hermannskogel. Latitude: 48 deg 16 min 15.29 sec N; Longitude: 16 deg 17 min 41.06 sec E (of Greenwich).","7004","1995-06-02 00:00:00","Bundesamt fur Eich- und Vermessungswesen; Wien","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_187[] = {"6313","Reseau National Belge 1972","Belge 1972","","Fundamental Point: Uccle observatory. Latitude: 50 deg 47 min 57.704 sec N; Longitude: 4 deg 21 min 24.983 sec E (of Greenwich).","7022","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_188[] = {"6314","Deutsche Hauptdreiecksnetz","DHDN","","Fundamental Point: Potsdam. Latitude: 52 deg 22 min 53.954 sec N; Longitude: 13 deg 04 min 01.153 sec E (of Greenwich).","7004","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_189[] = {"6315","Conakry 1905","","","Fundamental Point: Conakry. Latitude: 10.573766g N; Longitude: 17.833682g W (of Paris).","7011","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_190[] = {"6316","Dealul Piscului 1933","","","Fundamental point: latitude 44 deg 24 min 33.9606 sec N; longitude 26 deg 06 min 44.8772 sec E (of Greenwich).","7022","1996-04-12 00:00:00","Institute for Geodesy Photogrametry and Land Management","EPSG","Superseded by 1970 adjustment (datum code 6317)","",NULL};
-datafile_rows_t geod_datum_row_191[] = {"6317","Dealul Piscului 1970","","","Fundamental point: latitude 44 deg 24 min 23.7709 sec N; longitude 26deg 06 min 44.1265 sec E (of Greenwich).","7024","1996-04-12 00:00:00","Institute for Geodesy Photogrametry and Land Management","EPSG","Supersedes 1933 adjustment (datum code 6316)","",NULL};
-datafile_rows_t geod_datum_row_192[] = {"6318","National Geodetic Network","NGN","","","7030","1996-04-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_193[] = {"6319","Kuwait Utility","KUDAMS","","","7019","1996-04-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_194[] = {"6322","World Geodetic System 1972","WGS 72","","","7043","1999-04-22 00:00:00","","EPSG","Used by GPS before 1987. For Transit satellite positioning see also WGS 72BE.                                                                                                                  \
-Datum code 6323 reserved for southern hemisphere ProjCS's.","99.03",NULL};
-datafile_rows_t geod_datum_row_195[] = {"6324","WGS 72 Transit Broadcast Ephemeris","WGS 72BE","","","7043","1999-04-22 00:00:00","","EPSG","Alleged datum for use with Transit broadcast ephemeris prior to 1989. Relationship to WGS 72 has changed over time.  Datum code 6325 reserved for southern hemisphere ProjCS's.","99.03",NULL};
-datafile_rows_t geod_datum_row_196[] = {"6326","World Geodetic System 1984","WGS 84","","Origin at geocentre.","7030","1995-06-02 00:00:00","","EPSG","Datum code 6327 reserved for southern hemisphere ProjCS's","",NULL};
-datafile_rows_t geod_datum_row_197[] = {"6600","Anguilla 1957","","","Fundamental point: station A4.","7012","1999-04-22 00:00:00","Ordnance Survey of Great Britain.","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_198[] = {"6601","Antigua 1943","","","Fundamental point: station A14.","7012","1999-04-22 00:00:00","Ordnance Survey of Great Britain.","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_199[] = {"6602","Dominica 1945","","","Fundamental point: station M12.","7012","1999-04-22 00:00:00","Ordnance Survey of Great Britain.","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_200[] = {"6603","Grenada 1953","","","Fundamental point: station GS8.","7012","1999-04-22 00:00:00","Ordnance Survey of Great Britain.","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_201[] = {"6604","Montserrat 1958","","","Fundamental point: station M36.","7012","1999-04-22 00:00:00","Ordnance Survey of Great Britain.","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_202[] = {"6605","St. Kitts 1955","","","Fundamental point: station K12.","7012","1999-04-22 00:00:00","Ordnance Survey of Great Britain.","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_203[] = {"6606","St. Lucia 1955","","","Fundamental point: station DCS3.","7012","1999-04-22 00:00:00","Ordnance Survey of Great Britain.","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_204[] = {"6607","St. Vincent 1945","","","Fundamental point: station V1.","7012","1999-04-22 00:00:00","Ordnance Survey of Great Britain.","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_205[] = {"6608","North American Datum 1927 (1976)","NAD27(76)","","Fundamental Point: Meade's Ranch. Latitude: 39 deg 13 min 26.686 sec N; Longitude: 98 deg 32 min 30.506 sec W (of Greenwich).","7008","1999-05-12 00:00:00","Geodetic Survey of Canada.","EPSG","NAD27(76) used in Ontario for all maps at scale 1/20 000 and larger; elsewhere in Canada for selected purposes.","",NULL};
-datafile_rows_t geod_datum_row_206[] = {"6609","North American Datum 1927 (CGQ77)","CGQ77","","Fundamental Point: Meade's Ranch. Latitude: 39 deg 13 min 26.686 sec N; Longitude: 98 deg 32 min 30.506 sec W (of Greenwich).","7008","1999-05-12 00:00:00","Geodetic Service of Quebec.  Contact alain.bernard at mrn.gouv.qc.ca","EPSG","NAD27 (CGQ77) used in Quebec for all maps at scale 1/20 000 and larger; generally for maps issued by the Quebec cartography office whose reference system is CGQ77.", [...]
-datafile_rows_t geod_datum_row_207[] = {"6901","Ancienne Triangulation Francaise","ATF","","","7027","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_208[] = {"6902","Nord de Guerre","NDG","","","7027","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_datum_row_209[] = {"6903","Madrid 1870","","","Fundamental point: Madrid observatory.","7028","1998-11-11 00:00:00","Institut de Geomatica; Barcelona","EPSG","","",NULL};
-
-datafile_rows_t *geod_datum_rows[] = {geod_datum_row_1,geod_datum_row_2,geod_datum_row_3,geod_datum_row_4,geod_datum_row_5,geod_datum_row_6,geod_datum_row_7,geod_datum_row_8,geod_datum_row_9,geod_datum_row_10,geod_datum_row_11,geod_datum_row_12,geod_datum_row_13,geod_datum_row_14,geod_datum_row_15,geod_datum_row_16,geod_datum_row_17,geod_datum_row_18,geod_datum_row_19,geod_datum_row_20,geod_datum_row_21,geod_datum_row_22,geod_datum_row_23,geod_datum_row_24,geod_datum_row_25,geod_datum_ro [...]
diff --git a/src/tiff/csv/geod_datum.csv b/src/tiff/csv/geod_datum.csv
deleted file mode 100644
index 94a13d9..0000000
--- a/src/tiff/csv/geod_datum.csv
+++ /dev/null
@@ -1,210 +0,0 @@
-"GEOD_DATUM_CODE","GEOD_DAT_EPSG_NAME","GEOD_DAT_EPSG_ABBR","GEOD_DAT_USER_NAME","ORIGIN_DESCRIPTION","ELLIPSOID_CODE","REVISION_DATE","INFORMATION_SOURCE","DATA_SOURCE","REMARKS","CHANGE_ID"
-6001,Not specified (based on ellipsoid 7001),,,,7001,1996-09-12 00:00:00,,EPSG,Not a valid datum.  Included for coordinate systems where datum is unknown.,96.08
-6002,Not specified (based on ellipsoid 7002),,,,7002,1996-09-12 00:00:00,,EPSG,Not a valid datum.  Included for coordinate systems where datum is unknown.,96.08
-6003,Not specified (based on ellipsoid 7003),,,,7003,1996-09-12 00:00:00,,EPSG,Not a valid datum.  Included for coordinate systems where datum is unknown.,96.08
-6004,Not specified (based on ellipsoid 7004),,,,7004,1996-09-12 00:00:00,,EPSG,Not a valid datum.  Included for coordinate systems where datum is unknown.,96.08
-6005,Not specified (based on ellipsoid 7005),,,,7005,1996-09-12 00:00:00,,EPSG,Not a valid datum.  Included for coordinate systems where datum is unknown.,96.08
-6006,Not specified (based on ellipsoid 7006),,,,7006,1996-09-12 00:00:00,,EPSG,Not a valid datum.  Included for coordinate systems where datum is unknown.,96.08
-6007,Not specified (based on ellipsoid 7007),,,,7007,1996-09-12 00:00:00,,EPSG,Not a valid datum.  Included for coordinate systems where datum is unknown.,96.08
-6008,Not specified (based on ellipsoid 7008),,,,7008,1996-09-12 00:00:00,,EPSG,Not a valid datum.  Included for coordinate systems where datum is unknown.,96.08
-6009,Not specified (based on ellipsoid 7009),,,,7009,1996-09-12 00:00:00,,EPSG,Not a valid datum.  Included for coordinate systems where datum is unknown.,96.08
-6010,Not specified (based on ellipsoid 7010),,,,7010,1996-09-12 00:00:00,,EPSG,Not a valid datum.  Included for coordinate systems where datum is unknown.,96.08
-6011,Not specified (based on ellipsoid 7011),,,,7011,1996-09-12 00:00:00,,EPSG,Not a valid datum.  Included for coordinate systems where datum is unknown.,96.08
-6012,Not specified (based on ellipsoid 7012),,,,7012,1996-09-12 00:00:00,,EPSG,Not a valid datum.  Included for coordinate systems where datum is unknown.,96.08
-6013,Not specified (based on ellipsoid 7013),,,,7013,1996-09-12 00:00:00,,EPSG,Not a valid datum.  Included for coordinate systems where datum is unknown.,96.08
-6014,Not specified (based on ellipsoid 7014),,,,7014,1996-09-12 00:00:00,,EPSG,Not a valid datum.  Included for coordinate systems where datum is unknown.,96.08
-6015,Not specified (based on ellipsoid 7015),,,,7015,1996-09-12 00:00:00,,EPSG,Not a valid datum.  Included for coordinate systems where datum is unknown.,96.08
-6016,Not specified (based on ellipsoid 7016),,,,7016,1996-09-12 00:00:00,,EPSG,Not a valid datum.  Included for coordinate systems where datum is unknown.,96.08
-6017,Not specified (based on ellipsoid 7017),,,,7044,1996-09-12 00:00:00,,EPSG,Not a valid datum.  Included for coordinate systems where datum is unknown.,96.08
-6018,Not specified (based on ellipsoid 7018),,,,7018,1996-09-12 00:00:00,,EPSG,Not a valid datum.  Included for coordinate systems where datum is unknown.,96.08
-6019,Not specified (based on ellipsoid 7019),,,,7019,1996-09-12 00:00:00,,EPSG,Not a valid datum.  Included for coordinate systems where datum is unknown.,96.08
-6020,Not specified (based on ellipsoid 7020),,,,7020,1996-09-12 00:00:00,,EPSG,Not a valid datum.  Included for coordinate systems where datum is unknown.,96.08
-6021,Not specified (based on ellipsoid 7021),,,,7021,1996-09-12 00:00:00,,EPSG,Not a valid datum.  Included for coordinate systems where datum is unknown.,96.08
-6022,Not specified (based on ellipsoid 7022),,,,7022,1996-09-12 00:00:00,,EPSG,Not a valid datum.  Included for coordinate systems where datum is unknown.,96.08
-6024,Not specified (based on ellipsoid 7024),,,,7024,1996-09-12 00:00:00,,EPSG,Not a valid datum.  Included for coordinate systems where datum is unknown.,96.08
-6025,Not specified (based on ellipsoid 7025),,,,7025,1996-09-12 00:00:00,,EPSG,Not a valid datum.  Included for coordinate systems where datum is unknown.,96.08
-6027,Not specified (based on ellipsoid 7027),,,,7027,1996-09-12 00:00:00,,EPSG,Not a valid datum.  Included for coordinate systems where datum is unknown.,96.08
-6028,Not specified (based on ellipsoid 7028),,,,7028,1996-09-12 00:00:00,,EPSG,Not a valid datum.  Included for coordinate systems where datum is unknown.,96.08
-6029,Not specified (based on ellipsoid 7029),,,,7029,1996-09-12 00:00:00,,EPSG,Not a valid datum.  Included for coordinate systems where datum is unknown.,96.08
-6030,Not specified (based on ellipsoid 7030),,,,7030,1996-09-12 00:00:00,,EPSG,Not a valid datum.  Included for coordinate systems where datum is unknown.,96.08
-6031,Not specified (based on ellipsoid 7031),,,,7031,1996-09-12 00:00:00,,EPSG,Not a valid datum.  Included for coordinate systems where datum is unknown.,96.08
-6032,Not specified (based on ellipsoid 7032),,,,7032,1996-09-12 00:00:00,,EPSG,Not a valid datum.  Included for coordinate systems where datum is unknown.,96.08
-6033,Not specified (based on ellipsoid 7033),,,,7033,1996-09-12 00:00:00,,EPSG,Not a valid datum.  Included for coordinate systems where datum is unknown.,96.08
-6034,Not specified (based on ellipsoid 7034),,,,7034,1996-09-12 00:00:00,,EPSG,Not a valid datum.  Included for coordinate systems where datum is unknown.,96.08
-6035,Not specified (based on ellipsoid 7035),,,,7035,1996-09-12 00:00:00,,EPSG,Not a valid datum.  Included for coordinate systems where datum is unknown.,96.08
-6036,Not specified (based on ellipsoid 7036),,,,7036,1996-09-12 00:00:00,,EPSG,Not a valid datum.  Included for coordinate systems where datum is unknown.,
-6041,Not specified (based on ellipsoid 7041),,,,7041,1999-10-20 00:00:00,,EPSG,Not a valid datum.  Included for coordinate systems where datum is unknown.,
-6042,Not specified (based on ellipsoid 7042),,,,7042,1999-10-20 00:00:00,,EPSG,Not a valid datum.  Included for coordinate systems where datum is unknown.,
-6043,Not specified (based on ellipsoid 7043),,,,7043,1999-10-20 00:00:00,,EPSG,Not a valid datum.  Included for coordinate systems where datum is unknown.,
-6044,Not specified (based on ellipsoid 7044),,,,7044,1999-10-20 00:00:00,,EPSG,Not a valid datum.  Included for coordinate systems where datum is unknown.,
-6045,Not specified (based on ellipsoid 7045),,,,7045,1999-10-20 00:00:00,,EPSG,Not a valid datum.  Included for coordinate systems where datum is unknown.,
-6120,Greek,,,Fundamental point: Athens Observatory; latitude 37 deg 58 min 20.132 sec N; longitude 23 deg 42 min 58.815 sec E of Greenwich,7004,1997-06-16 00:00:00,Topography Department; National Technical University of Athens,EPSG,See geodetic datum alias 6404.  Used as basis of topographic mapping based on Hatt projection.,
-6121,Greek Geodetic Reference System 1987,GGRS87,,Fundamental point: Dionysos; latitude 38 deg 04 min 33.8 sec N; longitude 23 deg 55 min 51.0 sec E of Greenwich; geoid height 7.0 m.,7019,1997-06-16 00:00:00,L. Portokalakis; Public Petroleum Corporation of Greece,EPSG,Superseded (old) Greek datum.  Oil industry work based on ED50.,
-6122,Average Terrestrial System 1977,ATS77,,,7041,1997-07-02 00:00:00,New Brunswick Geographic Information Corporation land and water information standards manual.,EPSG,In use from 1979.  To be phased out in late 1990's.,
-6123,Kartastokoordinaattijarjestelma,KKJ,,Adjustment with fundamental point based on ED50 transformed to best fit the older VVJ adjustment.,7022,1997-07-22 00:00:00,www.nls.fi/maa/papers/kkj.html,EPSG,Adopted in 1970.,
-6124,Rikets koordinatsystem 1990,RT90,,,7004,1997-11-13 00:00:00,National Land Survey of Sweden,EPSG,Supersedes RT38 adjustment (datum code 6308),
-6125,Samboja,,,Original origin station P2 Exc now destroyed.  Extensions recomputed using Toran station T9 as origin.,7004,1997-11-13 00:00:00,Total Indonesia.,EPSG,,
-6126,Lithuania 1994 (ETRS89),LKS94 (ETRS89),,Densification from 4  ETRF89 points.,7019,1998-03-12 00:00:00,HNIT-Baltic GeoInfoServisas,EPSG,Densification of ETRS89 during the 1992 Baltic campaign.,
-6127,Tete,,,Fundamental point: Tete.,7008,1998-04-16 00:00:00,Mozambique Direc��o Nacional de Geografia e Cadastral (DINAGECA).,EPSG,,
-6128,Madzansua,,,Fundamental point: Madzansua.,7008,1998-04-16 00:00:00,Mozambique Direc��o Nacional de Geografia e Cadastral (DINAGECA).,EPSG,Superseded by transformation to Tete datum (datum code 6127).,
-6129,Observatario,,,Fundamental point: Maputo observatory.,7008,1998-04-16 00:00:00,Mozambique Direc��o Nacional de Geografia e Cadastral (DINAGECA).,EPSG,Superseded by transformation to Tete datum (datum code 6127).,
-6130,Moznet (ITRF94),Moznet,,ITRF 1994 epoch 20,7030,1998-04-16 00:00:00,Mozambique Direc��o Nacional de Geografia e Cadastral (DINAGECA).,EPSG,,
-6131,Indian 1960,,,,7015,1998-11-11 00:00:00,,EPSG,DMA adjustment of IndoChina part of the Indian 1954 network to better fit local geoid.  Also known as Indian (DMA Reduced).,
-6132,Final Datum 1958,FD58,,Fundamental point: Maniyur.  Latitude: 31 deg 23 min 59.19 sec N; Longitude: 48 deg 32 min 31.38 sec E (of Greenwich).,7012,1998-11-11 00:00:00,IOEPC records,EPSG,Network included in Nahrwan 1967 adjustment.,
-6133,Estonia 1992,EST92,,Densification from 4  ETRS89 points.,7019,1998-12-14 00:00:00,http://www.geo.ut.ee/~raivo/estcoord.html,EPSG,Based on ETRS89 as established during the 1992 Baltic campaign.,
-6134,PDO Survey Datum 1993,PSD93,,Adjustment best fitted to Fahud network.,7012,1999-04-22 00:00:00,Petroleum Development Oman,EPSG,Supersedes Fahud datum (code 6232). Maximum differences to Fahud adjustment are 20 metres.,
-6135,Old Hawaiian,,,Fundamental Point: Oahu West Base Astro.  Latitude: 21 deg 18 min 13.89 sec N; longitude 157 deg 50 min 55.79 sec W (of Greenwich),7008,1999-05-24 00:00:00,http://www.ngs.noaa.gov/ (NADCON readme file) and the NIMA publication http://164.214.2.59/publications/guides/Datum_Pamphlet/datum.html,EPSG,Hawaiian Islands were never on NAD27 but rather on Old Hawaiian Datum.  NADCON conversion program provides transformation from Old Hawaiian Datum to NAD83 (original 1986 real [...]
-6136,St. Lawrence Island,,,,7008,1999-05-24 00:00:00,http://www.ngs.noaa.gov/ (NADCON readme file),EPSG,Many Alaskan islands were never on NAD27 but rather on independent datums.  NADCON conversion program provides transformation from St. Lawrence Island Datum to NAD83 (original 1986 realization) - making the transformation appear to user as if from NAD27.,
-6137,St. Paul Island,,,,7008,1999-05-24 00:00:00,http://www.ngs.noaa.gov/ (NADCON readme file),EPSG,Many Alaskan islands were never on NAD27 but rather on independent datums.  NADCON conversion program provides transformation from St. Paul Island Datum to NAD83 (original 1986 realization) - making the transformation appear to user as if from NAD27.,
-6138,St. George Island,,,,7008,1999-05-24 00:00:00,http://www.ngs.noaa.gov/ (NADCON readme file),EPSG,Many Alaskan islands were never on NAD27 but rather on independent datums.  NADCON conversion program provides transformation from St. George Island Datum to NAD83 (original 1986 realization) - making the transformation appear to user as if from NAD27.,
-6139,Puerto Rico,,,,7008,1999-05-24 00:00:00,Ordnance Survey of Great Britain and http://www.ngs.noaa.gov/ (NADCON readme file).,EPSG,NADCON conversion program provides transformation from Puerto Rico Datum to NAD83 (original 1986 realization) but making the transformation appear to user as if from NAD27.,
-6140,NAD83 Canadian Spatial Reference System,NAD83(CSRS98),,,7019,1999-10-20 00:00:00,Service New Brunswick Land and Information Standards Manual,EPSG,Supersedes ATS77 from 1999 in New Brunswick.,
-6141,Israel,,,Fundamental Point:  Latitude: 31 deg 44 min 03.817 sec N; Longitude: 35 deg 12 min 16.261 sec E (of Greenwich).,7019,1999-10-20 00:00:00,Survey of Israel.,EPSG,,
-6142,Locodjo 1965,,,Fundamental Point: T5 Banco. Latitude: 5 deg 18 min 50.5 sec N; Longitude: 4 deg 02 min 05.1 sec W (of Greenwich).,7012,1999-10-20 00:00:00,IGN Paris.,EPSG,,
-6143,Abidjan 1987,,,Fundamental Point: Abidjan I. Latitude: 5 deg 18 min 51.01 sec N; Longitude: 4 deg 02 min 06.04 sec W (of Greenwich).,7012,1999-10-20 00:00:00,IGN Paris.,EPSG,,
-6144,Kalianpur 1937,,,Fundamental Point: Kalianpur. Latitude: 24 deg  07 min 11.260 sec N; Longitude: 77 deg 39 min 17.570 sec E (of Greenwich).,7015,1999-10-20 00:00:00,"G. Bomford; \"The Re-adjustment of the Indian Triangulation\"; Survey of India Professional Paper 28; 1939.",EPSG,Supercedes 1880 adjustment except for topographic mapping.  Superseded in Pakistan by 1962 metrication conversion and in India by 1975 metrication conversion.,
-6145,Kalianpur 1962,,,Fundamental Point: Kalianpur. Latitude: 24 deg  07 min 11.260 sec N; Longitude: 77 deg 39 min 17.570 sec E (of Greenwich).,7044,1999-10-20 00:00:00,,EPSG,1937 adjustment rescaled by ratio metric conversions of Indian foot (1937) to Indian foot (1962).,
-6146,Kalianpur 1975,,,Fundamental Point: Kalianpur. Latitude: 24 deg  07 min 11.260 sec N; Longitude: 77 deg 39 min 17.570 sec E (of Greenwich).,7045,1999-10-20 00:00:00,,EPSG,1937 adjustment rescaled by ratio metric conversions of Indian foot (1937) to Indian foot (1975).,
-6147,Hanoi 1972,,,,7024,1999-10-20 00:00:00,PetroVietnam,EPSG,,
-6148,Hartbeesthoek94,,,Coincident with ITRF91 (1994.0) at Hartbeesthoek astronomical observatory near Pretoria.,7030,1999-10-22 00:00:00,Directorate of Surveys and Mapping; http://w3sli.wcape.gov.za/surveys/mapping/wgs84.htm,EPSG,Supersedes Cape datum (code 6222).,
-6149,CH1903,,,Fundamental Point: Old Bern observatory. Latitude: 46 deg 57 min  8.660 sec N; Longitude: 7 deg 26 min 22.500 sec E (of Greenwich).,7004,1999-10-20 00:00:00,Bundesamt f�r Landestopographie,EPSG,,
-6150,CH1903+,,,Fundamental Point: Old Bern observatory. Latitude: 46 deg 57 min  8.660 sec N; Longitude: 7 deg 26 min 22.500 sec E (of Greenwich).,7004,1999-10-20 00:00:00,Bundesamt f�r Landestopographie.  Aufbau der Landesvermessung der Schweiz 'LV95' Teil 3: Terrestrische Bezugssysteme und Bezugsrahmen. L+T 1999.,EPSG,,
-6151,Swiss Terrestrial Reference Frame 1995,CHTRF95,,ETRF89 at 1993.0,7019,1999-10-20 00:00:00,Bundesamt f�r Landestopographie.  Aufbau der Landesvermessung der Schweiz 'LV95' Teil 3: Terrestrische Bezugssysteme und Bezugsrahmen. L+T 1999.,EPSG,,
-6152,NAD83 (High Accuracy Regional Network),NAD83(HARN),,,7019,1999-10-20 00:00:00,National Geodetic Survey,EPSG,,
-6153,Rassadiran,,,Fundamental point: Total 1,7022,1999-11-20 00:00:00,Total-Fina,EPSG,,
-6154,ED50(ED77),,,Extension of ED50 over Iran,7022,1999-11-20 00:00:00,National Cartographic Centre of Iran,EPSG,Sometimes referred to as ED50-ED77,
-6200,Pulkovo 1995,,,Fundamental Point: Pulkovo observatory. Latitude: 59 deg 46 min 15.359 sec N; Longitude: 30 deg 19 min 28.318 sec E (of Greenwich).,7024,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-6201,Adindan,,,Fundamental Point: Station 15; Adindan. Latitude: 22 deg 10 min  7.110 sec N; Longitude: 31 deg 29 min 21.608 sec E (of Greenwich).,7012,1995-06-02 00:00:00,,EPSG,,
-6202,Australian Geodetic Datum 1966,AGD66,,Fundamental Point: Johnson Memorial. Latitude: 25 deg 56 min 54.551 sec S; Longitude: 133 deg 12 min 30.077 sec E (of Greenwich).,7003,1995-06-02 00:00:00,Australian Map Grid Technical Manual. National Mapping Council of Australia Technical Publication 7; 1972.,EPSG,,
-6203,Australian Geodetic Datum 1984,AGD84,,,7003,1995-06-02 00:00:00,,EPSG,,
-6204,Ain el Abd 1970,Ain el Abd,,Fundamental Point: Ain El Abd.  Latitude: 28 deg  14 min 06.171 sec N; Longitude: 48 deg 16 min 20.906 sec E (of Greenwich).,7022,1995-06-02 00:00:00,,EPSG,,
-6205,Afgooye,,,,7024,1995-06-02 00:00:00,,EPSG,,
-6206,Agadez,,,,7011,1995-06-02 00:00:00,,EPSG,,
-6207,Lisbon,,,Fundamental Point: Castelo Sao Jorge; Lisbon. Latitude: 38 deg 42 min 43.631 sec N; Longitude: 9 deg 07 min 54.862 sec W (of Greenwich).,7022,1995-06-02 00:00:00,Instituto Geografico e Cadastral; Lisbon,EPSG,,
-6208,Aratu,,,,7022,1995-06-02 00:00:00,,EPSG,,
-6209,Arc 1950,,,Fundamental Point: Buffelsfontein. Latitude: 33 deg 59 min 32.000 sec S; Longitude: 25 deg 30 min 44.622 sec E (of Greenwich).,7013,1995-06-02 00:00:00,,EPSG,,
-6210,Arc 1960,,,Fundamental Point: Buffelsfontein. Latitude: 33 deg 59 min 32.000 sec S; Longitude: 25 deg 30 min 44.622 sec E (of Greenwich).,7012,1995-06-02 00:00:00,,EPSG,,
-6211,Batavia,,,Fundamental Point: Batavia Astro. Station. Latitude: 6 deg  7 min 39.520 sec S; Longitude: 106 deg 48 min 27.790 sec E (of Greenwich).,7004,1995-06-02 00:00:00,,EPSG,,
-6212,Barbados 1938,,,Fundamental point: HMS Challenger astro station M1; latitude 13 deg 04 min 32.53 sec N; longitude 59 deg 36 min 29.34 sec W (of Greenwich).,7012,1999-04-22 00:00:00,Ordnance Survey of Great Britain.,EPSG,,99.171
-6213,Beduaram,,,,7011,1995-06-02 00:00:00,,EPSG,,
-6214,Beijing 1954,,,,7024,1995-06-02 00:00:00,,EPSG,,
-6215,Reseau National Belge 1950,Belge 1950,,Fundamental Point: Lommel (tower). Latitude: 51 deg 13 min 47.334 sec N; Longitude: 0 deg 56 min 44.773 sec E (of Brussels).,7022,1995-06-02 00:00:00,,EPSG,,
-6216,Bermuda 1957,,,,7008,1995-06-02 00:00:00,,EPSG,,
-6218,Bogota,,,Fundamental Point: Bogota observatory. Latitude: 4 deg 35 min 56.570 sec N; Longitude: 74 deg  4 min 51.300 sec W (of Greenwich).,7022,1995-06-02 00:00:00,,EPSG,,
-6219,Bukit Rimpah,,,,7004,1995-06-02 00:00:00,,EPSG,,
-6220,Camacupa,,,,7012,1995-06-02 00:00:00,,EPSG,,
-6221,Campo Inchauspe,,,Fundamental Point: Campo Inchauspe. Latitude: 35 deg 58 min 17.000 sec S; Longitude: 62 deg 10 min 12.000 sec W (of Greenwich).,7022,1995-06-02 00:00:00,,EPSG,,
-6222,Cape,,,Fundamental Point: Buffelsfontein. Latitude: 33 deg 59 min 32.000 sec S; Longitude: 25 deg 30 min 44.622 sec E (of Greenwich).,7013,1996-10-18 00:00:00,"Private Communication, Directorate of Surveys and Land Information, Cape Town.",EPSG,,96.25  99.69
-6223,Carthage,,,,7011,1995-06-02 00:00:00,,EPSG,,
-6224,Chua,,,Fundamental Point: Chua. Latitude: 19 deg 45 min 41.160 sec S; Longitude: 48 deg  6 min  7.560 sec W (of Greenwich).,7022,1995-06-02 00:00:00,,EPSG,,
-6225,Corrego Alegre,,,Fundamental Point: Corrego Alegre. Latitude: 19 deg 50 min 15.140 sec S; Longitude: 48 deg 57 min 42.750 sec W (of Greenwich).,7022,1995-06-02 00:00:00,,EPSG,,
-6226,Cote d'Ivoire,,,,7011,1995-06-02 00:00:00,,EPSG,,
-6227,Deir ez Zor,,,Fundamental Point: Trig. 254 Deir. Latitude: 35 deg 21 min 49.975 sec N; Longitude: 40 deg  5 min 46.770 sec E (of Greenwich).,7011,1995-06-02 00:00:00,,EPSG,,
-6228,Douala,,,,7011,1995-06-02 00:00:00,,EPSG,,
-6229,Egypt 1907,,,Fundamental Point: Station F1. Latitude: 30 deg  1 min 42.860 sec N; Longitude: 31 deg 16 min 33.600 sec E (of Greenwich).,7020,1995-06-02 00:00:00,,EPSG,,
-6230,European Datum 1950,ED50,,Fundamental Point: Potsdam (Helmert Tower). Latitude: 52 deg 22 min 51.450 sec N; Longitude: 13 deg  3 min 58.740 sec E (of Greenwich).,7022,1995-06-02 00:00:00,,EPSG,,
-6231,European Datum 1987,ED87,,,7022,1995-06-02 00:00:00,,EPSG,,
-6232,Fahud,,,Fundamental Point: Station NO68-024 Fahud. Latitude: 22 deg 17 min 31.182 sec N; Longitude: 56 deg 29 min 18.820 sec E (of Greenwich).,7012,1995-06-02 00:00:00,Petroleum Development Oman.,EPSG,Superseded by PSD93 (code 6134).,
-6233,Gandajika 1970,,,,7022,1995-06-02 00:00:00,,EPSG,,
-6234,Garoua,,,,7011,1995-06-02 00:00:00,,EPSG,,
-6235,Guyane Francaise,,,,7022,1995-06-02 00:00:00,,EPSG,,
-6236,Hu Tzu Shan,,,,7022,1995-06-02 00:00:00,,EPSG,,
-6237,Hungarian Datum 1972,HD72,,"Fundamental Point: Szolohegy. Latitude: 47 deg 17 min 32,6156 sec N; Longitude 19 deg 36 min 09.9865 sec E; geoid height 6.56m.",7036,1996-10-18 00:00:00,http://lazarus.elte.hu/gb/geodez/geod3.htm,EPSG,,96.09
-6238,Indonesian Datum 1974,ID74,,Fundamental Point: Padang. Latitude: 0 deg 56 min 38.414 sec S; Longitude: 100 deg 22 min  8.804 sec E (of Greenwich).,7021,1995-06-02 00:00:00,,EPSG,,
-6239,Indian 1954,,,Fundamental Point: Kalianpur. Latitude: 24 deg  07 min 11.260 sec N; Longitude: 77 deg 39 min 17.570 sec E (of Greenwich).,7015,1995-06-02 00:00:00,,EPSG,,
-6240,Indian 1975,,,Fundamental Point: Khau Sakaerang,7015,1995-06-02 00:00:00,,EPSG,,
-6241,Jamaica 1875,,,Fundamental Point: Fort Charles Flagstaff. Latitude: 17 deg 55 min 55.800 sec N; Longitude: 76 deg 56 min 37.260 sec W (of Greenwich).,7034,1995-06-02 00:00:00,,EPSG,,
-6242,Jamaica 1969,JAD69,,Fundamental Point: Fort Charles Flagstaff. Latitude: 17 deg 55 min 55.800 sec N; Longitude: 76 deg 56 min 37.260 sec W (of Greenwich).,7008,1995-06-02 00:00:00,,EPSG,,
-6243,Kalianpur 1880,,,Fundamental Point: Kalianpur. Latitude: 24 deg  07 min 11.260 sec N; Longitude: 77 deg 39 min 17.570 sec E (of Greenwich).,7042,1999-10-20 00:00:00,"G. Bomford; \"The Re-adjustment of the Indian Triangulation\"; Survey of India Professional Paper 28; 1939.",EPSG,Includes 1916 extrension into Burma (Myanmar).  Superseded by 1937 adjustment.,97.23
-6244,Kandawala,,,,7015,1995-06-02 00:00:00,,EPSG,,
-6245,Kertau,,,Fundamental Point: Kertau. Latitude: 3 deg 27 min 50.710 sec N; Longitude: 102 deg 37 min 24.550 sec E (of Greenwich).,7018,1995-06-02 00:00:00,,EPSG,,
-6246,Kuwait Oil Company,KOC,,,7012,1995-06-02 00:00:00,,EPSG,,
-6247,La Canoa,,,Fundamental Point: La Canoa. Latitude: 8 deg 34 min 17.170 sec N; Longitude: 63 deg 51 min 34.880 sec W (of Greenwich).,7022,1995-06-02 00:00:00,,EPSG,Origin also adopted for PSAD56.,
-6248,Provisional South American Datum 1956,PSAD56,,Fundamental Point: La Canoa. Latitude: 8 deg 34 min 17.170 sec N; Longitude: 63 deg 51 min 34.880 sec W (of Greenwich).,7022,1995-06-02 00:00:00,,EPSG,Same origin as La Canoa datum.,
-6249,Lake,,,Fundamental Point: Maracaibo Cathedral. Latitude: 10 deg 38 min 34.678 sec N; Longitude: 71 deg 36 min 20.224 sec W (of Greenwich).,7022,1995-06-02 00:00:00,,EPSG,,
-6250,Leigon,,,Fundamental Point: GCS Station 121. Latitude: 5 deg 38 min 52.270 sec N; Longitude: 0 deg 11 min 46.080 sec W (of Greenwich).,7012,1995-06-02 00:00:00,,EPSG,,
-6251,Liberia 1964,,,,7012,1995-06-02 00:00:00,,EPSG,,
-6252,Lome,,,,7011,1995-06-02 00:00:00,,EPSG,,
-6253,Luzon 1911,,,Fundamental Point: Balacan. Latitude: 13 deg 33 min 41.000 sec N; Longitude: 121 deg 52 min  03.000 sec E (of Greenwich).,7008,1995-06-02 00:00:00,,EPSG,,
-6254,Hito XVIII 1963,,,,7022,1995-06-02 00:00:00,,EPSG,,
-6255,Herat North,,,,7022,1995-06-02 00:00:00,,EPSG,,
-6256,Mahe 1971,,,Fundamental Point: Mahe,7012,1995-06-02 00:00:00,,EPSG,,
-6257,Makassar,,,Fundamental Point: Moncongloe,7004,1995-06-02 00:00:00,,EPSG,,
-6258,European Terrestrial Reference Frame 89,ETRF89,,,7019,1999-04-22 00:00:00,,EPSG,Coincides with WGS84 at the one metre level.,97.11  97.55  99.111
-6259,Malongo 1987,,,Fundamental Point: Station Y at Malongo base camp. Latitude: 5 deg 23 min 34.327 sec S; Longitude: 12 deg 12 min  02.393 sec E (of Greenwich).,7022,1995-06-02 00:00:00,Chevron Petroleum Technology.,EPSG,Offshore extension of Mhast datum (6264) using Transit translocation.,
-6260,Manoca,,,,7012,1995-06-02 00:00:00,,EPSG,,
-6261,Merchich,,,,7011,1995-06-02 00:00:00,,EPSG,,
-6262,Massawa,,,,7004,1995-06-02 00:00:00,,EPSG,,
-6263,Minna,,,Fundamental Point: Minna base station L40. Latitude: 9 deg 38 min  09.000 sec N; Longitude: 6 deg 30 min 59.000 sec E (of Greenwich).,7012,1995-06-02 00:00:00,,EPSG,,
-6264,Mhast,,,,7022,1995-06-02 00:00:00,,EPSG,,
-6265,Monte Mario,,,Fundamental Point: Monte Mario. Latitude: 41 deg 55 min 25.510 sec N; Longitude: 0 deg  00 min  00.000 sec E (of Rome).,7022,1995-06-02 00:00:00,,EPSG,,
-6266,M'poraloko,,,,7011,1995-06-02 00:00:00,,EPSG,,
-6267,North American Datum 1927,NAD27,,Fundamental Point: Meade's Ranch. Latitude: 39 deg 13 min 26.686 sec N; Longitude: 98 deg 32 min 30.506 sec W (of Greenwich).,7008,1995-06-02 00:00:00,,EPSG,,
-6268,NAD Michigan,,,Fundamental Point: Meade's Ranch. Latitude: 39 deg 13 min 26.686 sec N; Longitude: 98 deg 32 min 30.506 sec W (of Greenwich).,7009,1995-06-02 00:00:00,,EPSG,,
-6269,North American Datum 1983,NAD83,,Origin at geocentre.,7019,1995-06-02 00:00:00,,EPSG,,
-6270,Nahrwan 1967,,,Fundamental point: Nahrwan south base.  Latitude: 33 deg 19 min 10.87 sec N; Longitude: 44 deg 43 min 25.54 sec E (of Greenwich).,7012,1995-06-02 00:00:00,,EPSG,,
-6271,Naparima 1972,,,Fundamental Point: Naparima. Latitude: 10 deg 16 min 44.860 sec N; Longitude: 61 deg 27 min 34.620 sec W (of Greenwich).,7022,1995-06-02 00:00:00,,EPSG,,
-6272,New Zealand Geodetic Datum 1949,GD49,,Fundamental Point: Papatahi. Latitude: 41 deg 19 min  8.900 sec S; Longitude: 175 deg  02 min 51.000 sec E (of Greenwich).,7022,1995-06-02 00:00:00,,EPSG,,
-6273,NGO 1948,,,,7005,1995-06-02 00:00:00,,EPSG,,
-6274,Datum 73,,,Fundamental Point:  Latitude: 39 deg 41 min 37.30 sec N; Longitude: 8 deg 07 min 53.31 sec W (of Greenwich).,7022,1995-06-02 00:00:00,Instituto Geografico e Cadastral; Lisbon,EPSG,,
-6275,Nouvelle Triangulation Francaise,NTF,,Fundamental Point: Pantheon,7011,1995-06-02 00:00:00,,EPSG,,
-6276,NSWC 9Z-2,,,,7025,1995-06-02 00:00:00,,EPSG,Transit precise ephemeris before 1991.,
-6277,OSGB 1936,,,Fundamental Point: Herstmonceux. Latitude: 50 deg 51 min 55.271 sec N; Longitude: 0 deg 20 min 45.882 sec E (of Greenwich).,7001,1995-06-02 00:00:00,,EPSG,,
-6278,OSGB 1970 (SN),OSGB70,,Fundamental Point: Herstmonceux. Latitude: 50 deg 51 min 55.271 sec N; Longitude: 0 deg 20 min 45.882 sec E (of Greenwich).,7001,1995-06-02 00:00:00,,EPSG,,
-6279,OS (SN) 1980,OS(SN)80,,Fundamental Point: Herstmonceux. Latitude: 50 deg 51 min 55.271 sec N; Longitude: 0 deg 20 min 45.882 sec E (of Greenwich).,7001,1995-06-02 00:00:00,,EPSG,,
-6280,Padang 1884,Padang,,Fundamental Point: Padang,7004,1995-06-02 00:00:00,,EPSG,,
-6281,Palestine 1923,,,Fundamental Point: Point 82'M  Jerusalem. Latitude: 31 deg 44 min  2.749 sec N; Longitude: 35 deg 12 min 43.490 sec E (of Greenwich).,7010,1995-06-02 00:00:00,,EPSG,,
-6282,Pointe Noire,,,Fundamental Point: Point Noire Astro. Latitude: 4 deg 47 min  0.100 sec S; Longitude: 11 deg 51 min  1.550 sec E (of Greenwich).,7011,1995-06-02 00:00:00,,EPSG,,
-6283,Geocentric Datum of Australia 1994,GDA94,,,7019,1995-06-02 00:00:00,Australian Surveying and Land Information Group Internet WWW page.,EPSG,Coincident with WGS84 to within 1 metre.,
-6284,Pulkovo 1942,,,Fundamental Point: Pulkovo observatory. Latitude: 59 deg 46 min 18.550 sec N; Longitude: 30 deg 19 min 42.090 sec E (of Greenwich).,7024,1995-06-02 00:00:00,,EPSG,,
-6285,Qatar,,,Fundamental Point: Station G3,7022,1995-06-02 00:00:00,,EPSG,,
-6286,Qatar 1948,,,Fundamental Point: Sokey 0 M. Latitude: 25 deg 22 min 56.500 sec N; Longitude: 50 deg 45 min 41.000 sec E (of Greenwich).,7020,1995-06-02 00:00:00,,EPSG,,
-6287,Qornoq,,,,7022,1995-06-02 00:00:00,,EPSG,,
-6288,Loma Quintana,,,Fundamental Point: Loma Quintana,7022,1995-06-02 00:00:00,,EPSG,,
-6289,Amersfoort,,,Fundamental Point: Amersfoort. Latitude: 52 deg  09 min 22.178 sec N; Longitude: 5 deg 23 min 15.478 sec E (of Greenwich).,7004,1995-06-02 00:00:00,,EPSG,,
-6291,South American Datum 1969,SAD69,,,7036,1996-10-18 00:00:00,,EPSG,SAD69 uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.252.  Error introduced if not using the truncated precision is 0 to 31mm.,96.09  97.252
-6292,Sapper Hill 1943,,,,7022,1995-06-02 00:00:00,,EPSG,,
-6293,Schwarzeck,,,,7006,1995-06-02 00:00:00,,EPSG,,
-6294,Segora,,,,7004,1995-06-02 00:00:00,,EPSG,,
-6295,Serindung,,,,7004,1995-06-02 00:00:00,,EPSG,,
-6296,Sudan,,,,7011,1995-06-02 00:00:00,,EPSG,,
-6297,Tananarive 1925,Tananarive,,Fundamental Point: Tananarive observatory. Latitude: 18 deg 55 min  2.100 sec S; Longitude: 45 deg 12 min 52.800 sec E (of Greenwich).,7022,1995-06-02 00:00:00,,EPSG,,
-6298,Timbalai 1948,,,Fundamental Point: Timbalai. Latitude: 5 deg 17 min  3.548 sec N; Longitude: 115 deg 10 min 56.409 sec E (of Greenwich).,7016,1995-06-02 00:00:00,,EPSG,,
-6299,TM65,,,,7002,1995-06-02 00:00:00,,EPSG,,
-6300,TM75,,,,7002,1995-06-02 00:00:00,,EPSG,,
-6301,Tokyo,,,Fundamental Point: Nikon-Keido-Genten. Latitude: 35 deg 39 min 17.5148 sec N; Longitude: 139 deg 44 min 40.5020 sec E (of Greenwich).,7004,1995-06-02 00:00:00,Geographic Survey Institute; Japan; Bulletin 40 (March 1994).  Also http://vldb.gsi-mc.go.jp/sokuchi/datum/tokyodatum.html,EPSG,,98.46
-6302,Trinidad 1903,,,,7007,1995-06-02 00:00:00,,EPSG,,
-6303,Trucial Coast 1948,TC(1948),,Fundamental Point: TC1. Latitude: 25 deg 23 min 50.190 sec N; Longitude: 55 deg 26 min 43.950 sec E (of Greenwich).,7020,1995-06-02 00:00:00,,EPSG,,
-6304,Voirol 1875,,,Fundamental Point: Voirol. Latitude: 40.835864 grads N; Longitude: 0.788735 grads E of Paris.,7011,1995-06-02 00:00:00,IGN Paris,EPSG,,
-6305,Voirol Unifie 1960,Voirol Unifie,,,7012,1999-10-20 00:00:00,"\"Le System Geodesique Nord-Sahara\"; IGN Paris",EPSG,Conformal transformation from ED50. Used only with Lambert Algeria zones: in other cases use Nord Sahara 1959 geodetic datum.,99.62
-6306,Bern 1938,,,Fundamental Point: Old Bern observatory. Latitude: 46 deg 57 min  7.890 sec N; Longitude: 7 deg 26 min 22.335 sec E (of Greenwich).,7004,1995-06-02 00:00:00,"\"Die Projektionen der schweizerischen Plan- und Kartenwerke\"; J. Bolliger 1967",EPSG,This redetermination of the coordinates of fundamental point is used for scientific purposes and as the graticule overprinted on topographic maps constructed on the CH1903 / LV03 projected CS (code 21781).,
-6307,Nord Sahara 1959,,,,7012,1999-10-20 00:00:00,"\"Le System Geodesique Nord-Sahara\"; IGN Paris",EPSG,Conformal transformation from ED50.,99.62
-6308,Stockholm 1938,RT38,,Fundamental Point: Stockholm observatory,7004,1996-04-12 00:00:00,,EPSG,Superseded by RT90 adjustment (datum code 6124),
-6309,Yacare,,,,7022,1995-06-02 00:00:00,,EPSG,,
-6310,Yoff,,,,7011,1995-06-02 00:00:00,,EPSG,,
-6311,Zanderij,,,,7022,1995-06-02 00:00:00,,EPSG,,
-6312,Militar-Geographische Institut,MGI,,Fundamental Point: Hermannskogel. Latitude: 48 deg 16 min 15.29 sec N; Longitude: 16 deg 17 min 41.06 sec E (of Greenwich).,7004,1995-06-02 00:00:00,Bundesamt fur Eich- und Vermessungswesen; Wien,EPSG,,
-6313,Reseau National Belge 1972,Belge 1972,,Fundamental Point: Uccle observatory. Latitude: 50 deg 47 min 57.704 sec N; Longitude: 4 deg 21 min 24.983 sec E (of Greenwich).,7022,1995-06-02 00:00:00,,EPSG,,
-6314,Deutsche Hauptdreiecksnetz,DHDN,,Fundamental Point: Potsdam. Latitude: 52 deg 22 min 53.954 sec N; Longitude: 13 deg 04 min 01.153 sec E (of Greenwich).,7004,1995-06-02 00:00:00,,EPSG,,
-6315,Conakry 1905,,,Fundamental Point: Conakry. Latitude: 10.573766g N; Longitude: 17.833682g W (of Paris).,7011,1995-06-02 00:00:00,,EPSG,,
-6316,Dealul Piscului 1933,,,Fundamental point: latitude 44 deg 24 min 33.9606 sec N; longitude 26 deg 06 min 44.8772 sec E (of Greenwich).,7022,1996-04-12 00:00:00,Institute for Geodesy Photogrametry and Land Management,EPSG,Superseded by 1970 adjustment (datum code 6317),
-6317,Dealul Piscului 1970,,,Fundamental point: latitude 44 deg 24 min 23.7709 sec N; longitude 26deg 06 min 44.1265 sec E (of Greenwich).,7024,1996-04-12 00:00:00,Institute for Geodesy Photogrametry and Land Management,EPSG,Supersedes 1933 adjustment (datum code 6316),
-6318,National Geodetic Network,NGN,,,7030,1996-04-12 00:00:00,,EPSG,,
-6319,Kuwait Utility,KUDAMS,,,7019,1996-04-12 00:00:00,,EPSG,,
-6322,World Geodetic System 1972,WGS 72,,,7043,1999-04-22 00:00:00,,EPSG,"Used by GPS before 1987. For Transit satellite positioning see also WGS 72BE.                                                                                                                  \
-Datum code 6323 reserved for southern hemisphere ProjCS's.",99.03
-6324,WGS 72 Transit Broadcast Ephemeris,WGS 72BE,,,7043,1999-04-22 00:00:00,,EPSG,Alleged datum for use with Transit broadcast ephemeris prior to 1989. Relationship to WGS 72 has changed over time.  Datum code 6325 reserved for southern hemisphere ProjCS's.,99.03
-6326,World Geodetic System 1984,WGS 84,,Origin at geocentre.,7030,1995-06-02 00:00:00,,EPSG,Datum code 6327 reserved for southern hemisphere ProjCS's,
-6600,Anguilla 1957,,,Fundamental point: station A4.,7012,1999-04-22 00:00:00,Ordnance Survey of Great Britain.,EPSG,,
-6601,Antigua 1943,,,Fundamental point: station A14.,7012,1999-04-22 00:00:00,Ordnance Survey of Great Britain.,EPSG,,
-6602,Dominica 1945,,,Fundamental point: station M12.,7012,1999-04-22 00:00:00,Ordnance Survey of Great Britain.,EPSG,,
-6603,Grenada 1953,,,Fundamental point: station GS8.,7012,1999-04-22 00:00:00,Ordnance Survey of Great Britain.,EPSG,,
-6604,Montserrat 1958,,,Fundamental point: station M36.,7012,1999-04-22 00:00:00,Ordnance Survey of Great Britain.,EPSG,,
-6605,St. Kitts 1955,,,Fundamental point: station K12.,7012,1999-04-22 00:00:00,Ordnance Survey of Great Britain.,EPSG,,
-6606,St. Lucia 1955,,,Fundamental point: station DCS3.,7012,1999-04-22 00:00:00,Ordnance Survey of Great Britain.,EPSG,,
-6607,St. Vincent 1945,,,Fundamental point: station V1.,7012,1999-04-22 00:00:00,Ordnance Survey of Great Britain.,EPSG,,
-6608,North American Datum 1927 (1976),NAD27(76),,Fundamental Point: Meade's Ranch. Latitude: 39 deg 13 min 26.686 sec N; Longitude: 98 deg 32 min 30.506 sec W (of Greenwich).,7008,1999-05-12 00:00:00,Geodetic Survey of Canada.,EPSG,NAD27(76) used in Ontario for all maps at scale 1/20 000 and larger; elsewhere in Canada for selected purposes.,
-6609,North American Datum 1927 (CGQ77),CGQ77,,Fundamental Point: Meade's Ranch. Latitude: 39 deg 13 min 26.686 sec N; Longitude: 98 deg 32 min 30.506 sec W (of Greenwich).,7008,1999-05-12 00:00:00,Geodetic Service of Quebec.  Contact alain.bernard at mrn.gouv.qc.ca,EPSG,NAD27 (CGQ77) used in Quebec for all maps at scale 1/20 000 and larger; generally for maps issued by the Quebec cartography office whose reference system is CGQ77.,
-6901,Ancienne Triangulation Francaise,ATF,,,7027,1995-06-02 00:00:00,,EPSG,,
-6902,Nord de Guerre,NDG,,,7027,1995-06-02 00:00:00,,EPSG,,
-6903,Madrid 1870,,,Fundamental point: Madrid observatory.,7028,1998-11-11 00:00:00,Institut de Geomatica; Barcelona,EPSG,,
diff --git a/src/tiff/csv/geod_trf.c b/src/tiff/csv/geod_trf.c
deleted file mode 100644
index 9e6808c..0000000
--- a/src/tiff/csv/geod_trf.c
+++ /dev/null
@@ -1,492 +0,0 @@
-#include "defs.h"
-datafile_rows_t geod_trf_row_1[] = {"GEOD_TRF_CODE","GEOD_TRF_EPSG_NAME","GEOD_TRF_USER_NAME","DESCRIPTION","SOURCE_HORIZCS_CODE","TARGET_HORIZCS_CODE","COORD_TRF_VARIANT","CONCAT_TRF_AREA_OF_USE","COORD_TRF_PATH_CODE","REVISION_DATE","INFORMATION_SOURCE","DATA_SOURCE","CONCAT_TRF_REMARKS","CHANGE_ID",NULL};
-datafile_rows_t geod_trf_row_2[] = {"8000","Adindan to WGS 84 (1)","","DMA-Eth Sud","4201","4326","1","","8400","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_3[] = {"8001","Adindan to WGS 84 (2)","","DMA-Bfa","4201","4326","2","","8401","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_4[] = {"8002","Adindan to WGS 84 (3)","","DMA-Cmr","4201","4326","3","","8402","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_5[] = {"8003","Adindan to WGS 84 (4)","","DMA-Eth","4201","4326","4","","8403","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_6[] = {"8004","Adindan to WGS 84 (5)","","DMA-Mli","4201","4326","5","","8404","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_7[] = {"8005","Adindan to WGS 84 (6)","","DMA-Sen","4201","4326","6","","8405","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_8[] = {"8006","Adindan to WGS 84 (7)","","DMA-Sud","4201","4326","7","","8406","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_9[] = {"8007","Afgooye to WGS 84 (1)","","DMA-Som","4205","4326","1","","8407","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_10[] = {"8008","AGD66 to WGS 84 (1)","","DMA-Aus","4202","4326","1","","8408","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_11[] = {"8009","AGD84 to WGS 84 (1)","","DMA-Aus","4203","4326","1","","8409","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_12[] = {"8010","Ain el Abd to WGS 84 (1)","","DMA-Bhr","4204","4326","1","","8410","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_13[] = {"8011","Ain el Abd to WGS 84 (2)","","DMA-Sau","4204","4326","2","","8411","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_14[] = {"8012","Amersfoort to WGS 84 (1)","","NCG-Nld","4289","4326","1","","8412","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_15[] = {"8013","Arc 1950 to WGS 84 (1)","","DMA-mean","4209","4326","1","","8413","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_16[] = {"8014","Arc 1950 to WGS 84 (2)","","DMA-Bwa","4209","4326","2","","8414","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_17[] = {"8015","Arc 1950 to WGS 84 (3)","","DMA-Bdi","4209","4326","3","","8415","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_18[] = {"8016","Arc 1950 to WGS 84 (4)","","DMA-Lso","4209","4326","4","","8416","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_19[] = {"8017","Arc 1950 to WGS 84 (5)","","DMA-Mwi","4209","4326","5","","8417","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_20[] = {"8018","Arc 1950 to WGS 84 (6)","","DMA-Swz","4209","4326","6","","8418","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_21[] = {"8019","Arc 1950 to WGS 84 (7)","","DMA-Cod","4209","4326","7","","8419","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_22[] = {"8020","Arc 1950 to WGS 84 (8)","","DMA-Zmb","4209","4326","8","","8420","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_23[] = {"8021","Arc 1950 to WGS 84 (9)","","DMA-Zwe","4209","4326","9","","8421","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_24[] = {"8022","Arc 1960 to WGS 84 (1)","","DMA-Ken Tza","4210","4326","1","","8422","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_25[] = {"8023","Batavia to WGS 84 (1)","","DMA-Idn Sumatra","4211","4326","1","","8423","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_26[] = {"8024","Bermuda 1957 to WGS 84 (1)","","DMA-Bmu","4216","4326","1","","8424","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_27[] = {"8025","Bogota to WGS 84 (1)","","DMA-Col","4218","4326","1","","8425","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_28[] = {"8026","Bukit Rimpah to WGS 84 (1)","","DMA-Idn Beli","4219","4326","1","","8426","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_29[] = {"8027","Campo Inchauspe to WGS 84 (1)","","DMA-Arg","4221","4326","1","","8427","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_30[] = {"8028","Cape to WGS 84 (1)","","DMA-Zaf","4222","4326","1","","8428","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_31[] = {"8029","Cape to WGS 84 (2)","","DSLI-Zaf","4222","4326","2","","8429","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_32[] = {"8030","Carthage to WGS 84 (1)","","DMA-Tun","4223","4326","1","","8430","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_33[] = {"8031","Chua to WGS 84 (1)","","DMA-Pry","4224","4326","1","","8431","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_34[] = {"8032","Corrego Alegre to WGS 84 (1)","","DMA-Bra","4225","4326","1","","8432","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_35[] = {"8033","ED50 to WGS 84 (1)","","DMA-mean","4230","4326","1","","8433","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_36[] = {"8034","ED50 to WGS 84 (2)","","DMA-cenEur","4230","4326","2","","8434","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_37[] = {"8035","ED50 to WGS 84 (3)","","DMA-midEast","4230","4326","3","","8435","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_38[] = {"8036","ED50 to WGS 84 (4)","","DMA-Cyp","4230","4326","4","","8436","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_39[] = {"8037","ED50 to WGS 84 (5)","","DMA-Egy","4230","4326","5","","8437","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_40[] = {"8038","ED50 to WGS 84 (6)","","DMA-Irl Gbr","4230","4326","6","","8438","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_41[] = {"8039","ED50 to WGS 84 (7)","","DMA-Fin Nor","4230","4326","7","","8439","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_42[] = {"8040","ED50 to WGS 84 (8)","","DMA-Grc","4230","4326","8","","8440","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_43[] = {"8041","ED50 to WGS 84 (9)","","DMA-Irn","4230","4326","9","","8441","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_44[] = {"8042","ED50 to WGS 84 (10)","","DMA-Ita Sard","4230","4326","10","","8442","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_45[] = {"8043","ED50 to WGS 84 (11)","","DMA-Ita Sic","4230","4326","11","","8443","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_46[] = {"8044","ED50 to WGS 84 (12)","","DMA-Mlt","4230","4326","12","","8444","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_47[] = {"8045","ED50 to WGS 84 (13)","","DMA-Prt Esp","4230","4326","13","","8445","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_48[] = {"8046","ED50 to WGS 84 (14)","","6Nat-NSea","4230","4326","14","Denmark - North Sea;  Germany - North Sea;  Netherlands - offshore;  Norway - North Sea south of 62 deg N; United Kingdom (UKCS) - North Sea south of 62 deg N.","8446","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_49[] = {"8047","ED50 to WGS 84 (15)","","NMA-Nor N65","4230","4326","15","Norway - offshore north of 65 deg N.","8447","1996-10-18 00:00:00","","EPSG","The concatenation of transformations 1147 and 1146 gives the following position vector tfm: dX=-84.491  dY=-100.559  dZ=-114.209 metres rX= -2.4006  rY=-0.5367  rZ=-2.3742 microradians  dS=+0.2947 ppm.","",NULL};
-datafile_rows_t geod_trf_row_50[] = {"8048","Egypt 1907 to WGS 84 (1)","","DMA-Egy","4229","4326","1","","8448","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_51[] = {"8049","ETRF89 to WGS 84 (1)","","EPSG-eur","4258","4326","1","","8449","1997-06-19 00:00:00","","EPSG","","97.24",NULL};
-datafile_rows_t geod_trf_row_52[] = {"8050","GDA94 to WGS 84 (1)","","EPSG-Aus","4283","4326","1","","8450","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_53[] = {"8051","GD49 to WGS 84 (1)","","DMA-Nzl","4272","4326","1","","8451","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_54[] = {"8052","Hu Tzu Shan to WGS 84 (1)","","DMA-Twn","4236","4326","1","","8452","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_55[] = {"8053","Indian 1954 to WGS 84 (1)","","DMA-Tha","4239","4326","1","","8453","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_56[] = {"8054","Indian 1975 to WGS 84 (1)","","DMA-Tha","4240","4326","1","","8454","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_57[] = {"8055","Kalianpur 1937 to WGS 84 (1)","","DMA-Bgd","4144","4326","1","","8455","1999-10-20 00:00:00","","EPSG","","97.235",NULL};
-datafile_rows_t geod_trf_row_58[] = {"8056","Kalianpur 1975 to WGS 84 (1)","","DMA-Ind Npl","4146","4326","1","","8456","1999-10-20 00:00:00","","EPSG","","97.235",NULL};
-datafile_rows_t geod_trf_row_59[] = {"8057","Kandawala to WGS 84 (1)","","DMA-Lka","4244","4326","1","","8457","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_60[] = {"8058","Kertau to WGS 84 (1)","","DMA-Mys Sgp","4245","4326","1","","8458","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_61[] = {"8059","Leigon to WGS 84 (1)","","DMA-Gha","4250","4326","1","","8459","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_62[] = {"8060","Liberia 1964 to WGS 84 (1)","","DMA-Lbr","4251","4326","1","","8460","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_63[] = {"8061","Luzon 1911 to WGS 84 (1)","","DMA-Phl N","4253","4326","1","","8461","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_64[] = {"8062","Luzon 1911 to WGS 84 (2)","","DMA-Phl Min","4253","4326","2","","8462","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_65[] = {"8063","M'poraloko to WGS 84 (1)","","DMA-Gab","4266","4326","1","","8463","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_66[] = {"8064","Mahe 1971 to WGS 84 (1)","","DMA-Syc","4256","4326","1","","8464","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_67[] = {"8065","Massawa to WGS 84 (1)","","DMA-Eth","4262","4326","1","","8465","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_68[] = {"8066","Merchich to WGS 84 (1)","","DMA-Mar","4261","4326","1","","8466","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_69[] = {"8067","Minna to WGS 84 (1)","","DMA-Cmr","4263","4326","1","","8467","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_70[] = {"8068","Minna to WGS 84 (2)","","DMA-Nga","4263","4326","2","","8468","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_71[] = {"8069","Monte Mario to WGS 84 (1)","","DMA-Ita Sar","4265","4326","1","","8469","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_72[] = {"8070","NAD27 to WGS 84 (1)","","DMA-Carib","4267","4326","1","","8470","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_73[] = {"8071","NAD27 to WGS 84 (2)","","DMA-Cen Am","4267","4326","2","","8471","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_74[] = {"8072","NAD27 to WGS 84 (3)","","DMA-Can","4267","4326","3","","8472","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_75[] = {"8073","NAD27 to WGS 84 (4)","","DMA-Conus","4267","4326","4","","8473","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_76[] = {"8074","NAD27 to WGS 84 (5)","","DMA-ConusE","4267","4326","5","","8474","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_77[] = {"8075","NAD27 to WGS 84 (6)","","DMA-ConusW","4267","4326","6","","8475","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_78[] = {"8076","NAD27 to WGS 84 (7)","","DMA-USA AK","4267","4326","7","","8476","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_79[] = {"8077","NAD27 to WGS 84 (8)","","DMA-Bha xSalv","4267","4326","8","","8477","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_80[] = {"8078","NAD27 to WGS 84 (9)","","DMA-Bha Salv","4267","4326","9","","8478","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_81[] = {"8079","NAD27 to WGS 84 (10)","","DMA-Can AB BC","4267","4326","10","","8479","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_82[] = {"8080","NAD27 to WGS 84 (11)","","DMA-Can MN ON","4267","4326","11","","8480","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_83[] = {"8081","NAD27 to WGS 84 (12)","","DMA-Can E","4267","4326","12","","8481","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_84[] = {"8082","NAD27 to WGS 84 (13)","","DMA-Can NWT","4267","4326","13","","8482","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_85[] = {"8083","NAD27 to WGS 84 (14)","","DMA-Can Yuk","4267","4326","14","","8483","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_86[] = {"8084","NAD27 to WGS 84 (15)","","DMA-Pan","4267","4326","15","","8484","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_87[] = {"8085","NAD27 to WGS 84 (16)","","DMA-Cuba","4267","4326","16","","8485","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_88[] = {"8086","NAD27 to WGS 84 (17)","","DMA-Grl","4267","4326","17","","8486","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_89[] = {"8087","NAD27 to WGS 84 (18)","","DMA-Mex","4267","4326","18","","8487","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_90[] = {"8088","NAD83 to WGS 84 (1)","","DMA-N Am","4269","4326","1","","8488","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_91[] = {"8089","Nahrwan 1967 to WGS 84 (1)","","DMA-Omn Mas","4270","4326","1","","8489","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_92[] = {"8090","Nahrwan 1967 to WGS 84 (2)","","DMA-Sau","4270","4326","2","","8490","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_93[] = {"8091","Nahrwan 1967 to WGS 84 (3)","","DMA-UAE","4270","4326","3","","8491","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_94[] = {"8092","Naparima 1972 to WGS 84 (1)","","DMA-Tto","4271","4326","1","","8492","1998-06-30 00:00:00","","EPSG","","98.102",NULL};
-datafile_rows_t geod_trf_row_95[] = {"8093","NTF to WGS 84 (1)","","IGN-Fra","4275","4326","1","","8493","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_96[] = {"8094","NTF (Paris) to WGS 84 (1)","","EPSG-Fra","4807","4326","1","France..","8494","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_97[] = {"8095","OSGB 1936 to WGS 84 (1)","","DMA-Gbr","4277","4326","1","","8495","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_98[] = {"8096","OSGB 1936 to WGS 84 (2)","","DMA-Gbr Eng","4277","4326","2","","8496","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_99[] = {"8097","OSGB 1936 to WGS 84 (3)","","DMA-Gbr E&W","4277","4326","3","","8497","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_100[] = {"8098","OSGB 1936 to WGS 84 (4)","","DMA-Gbr Sco","4277","4326","4","","8498","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_101[] = {"8099","OSGB 1936 to WGS 84 (5)","","DMA-Gbr Wal","4277","4326","5","","8499","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_102[] = {"8100","Pointe Noire to WGS 84 (1)","","DMA-Cog","4282","4326","1","","8500","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_103[] = {"8101","PSAD56 to WGS 84 (1)","","DMA-mean","4248","4326","1","","8501","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_104[] = {"8102","PSAD56 to WGS 84 (2)","","DMA-Bol","4248","4326","2","","8502","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_105[] = {"8103","PSAD56 to WGS 84 (3)","","DMA-Chl N","4248","4326","3","","8503","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_106[] = {"8104","PSAD56 to WGS 84 (4)","","DMA Chl S","4248","4326","4","","8504","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_107[] = {"8105","PSAD56 to WGS 84 (5)","","DMA-Col","4248","4326","5","","8505","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_108[] = {"8106","PSAD56 to WGS 84 (6)","","DMA-Ecu","4248","4326","6","","8506","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_109[] = {"8107","PSAD56 to WGS 84 (7)","","DMA-Guy","4248","4326","7","","8507","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_110[] = {"8108","PSAD56 to WGS 84 (8)","","DMA-Per","4248","4326","8","","8508","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_111[] = {"8109","PSAD56 to WGS 84 (9)","","DMA-Ven","4248","4326","9","","8509","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_112[] = {"8110","Qatar to WGS 84 (1)","","DMA-Qat","4285","4326","1","","8510","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_113[] = {"8111","Qornoq to WGS 84 (1)","","DMA-Grl S","4287","4326","1","","8511","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_114[] = {"8112","SAD69 to WGS 84 (1)","","DMA-mean","4291","4326","1","","8512","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_115[] = {"8113","SAD69 to WGS 84 (2)","","DMA-Arg","4291","4326","2","","8513","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_116[] = {"8114","SAD69 to WGS 84 (3)","","DMA-Bol","4291","4326","3","","8514","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_117[] = {"8115","SAD69 to WGS 84 (4)","","DMA-Bra","4291","4326","4","","8515","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_118[] = {"8116","SAD69 to WGS 84 (5)","","DMA-Chile","4291","4326","5","","8516","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_119[] = {"8117","SAD69 to WGS 84 (6)","","DMA-Col","4291","4326","6","","8517","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_120[] = {"8118","SAD69 to WGS 84 (7)","","DMA-Ecu","4291","4326","7","","8518","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_121[] = {"8119","SAD69 to WGS 84 (8)","","DMA-Ecu Gal","4291","4326","8","","8519","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_122[] = {"8120","SAD69 to WGS 84 (9)","","DMA-Guyana","4291","4326","9","","8520","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_123[] = {"8121","SAD69 to WGS 84 (10)","","DMA-Pgy","4291","4326","10","","8521","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_124[] = {"8122","SAD69 to WGS 84 (11)","","DMA-Peru","4291","4326","11","","8522","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_125[] = {"8123","SAD69 to WGS 84 (12)","","DMA-Tto","4291","4326","12","","8523","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_126[] = {"8124","SAD69 to WGS 84 (13)","","DMA-Ven","4291","4326","13","","8524","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_127[] = {"8125","Sapper Hill 1943 to WGS 84 (1)","","DMA-Flk E","4292","4326","1","","8525","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_128[] = {"8126","Schwarzeck to WGS 84 (1)","","DMA-Nam","4293","4326","1","","8526","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_129[] = {"8127","Tananarive to WGS 84 (1)","","DMA-Mdg","4297","4326","1","","8527","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_130[] = {"8128","Timbalai 1948 to WGS 84 (1)","","DMA-Borneo","4298","4326","1","","8528","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_131[] = {"8129","TM65 to WGS 84 (1)","","DMA-Ire","4299","4326","1","","8529","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_132[] = {"8130","Tokyo to WGS 84 (1)","","DMA-Jpn Kor","4301","4326","1","","8530","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_133[] = {"8131","Tokyo to WGS 84 (2)","","DMA-Jpn","4301","4326","2","","8531","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_134[] = {"8132","Tokyo to WGS 84 (3)","","DMA-Kor","4301","4326","3","","8532","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_135[] = {"8133","Tokyo to WGS 84 (4)","","DMA-Jpn Ok","4301","4326","4","","8533","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_136[] = {"8134","Yacare to WGS 84 (1)","","DMA-Ury","4309","4326","1","","8534","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_137[] = {"8135","Zanderij to WGS 84 (1)","","DMA-Sur","4311","4326","1","","8535","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_138[] = {"8136","ED50 to ED87 (1)","","6Nat-NSea","4230","4231","1","","8536","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_139[] = {"8137","ED87 to WGS 84 (1)","","6Nat-NSea","4231","4326","1","","8537","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_140[] = {"8138","ED50 to ED87 (2)","","NMA-Nor N65","4230","4231","2","","8538","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_141[] = {"8139","AGD84 to WGS 84 (2)","","Auslig-Aus old","4203","4326","2","","8539","1996-12-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_142[] = {"8140","WGS 72 to WGS 84 (1)","","DMA","4322","4326","1","","8540","1996-12-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_143[] = {"8141","WGS 72 to WGS 84 (2)","","","4322","4326","2","","8541","1996-12-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_144[] = {"8142","WGS 72BE to WGS 72 (1)","","","4324","4322","1","","8542","1996-12-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_145[] = {"8143","WGS 72BE to WGS 84 (1)","","","4324","4326","1","","8543","1996-12-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_146[] = {"8144","NAD27 to NAD83 (1)","","NGS-Conus","4267","4269","1","","8544","1996-12-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_147[] = {"8146","NAD27 to NAD83 (2)","","NGS-Usa AK","4267","4269","2","","8546","1996-12-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_148[] = {"8148","ED50 to WGS 84 (16)","","DMA-Tun","4230","4326","16","","8548","1997-06-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_149[] = {"8149","Herat North to WGS 84 (1)","","DMA-Afg","4255","4326","1","","8549","1997-06-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_150[] = {"8150","Kalianpur 1962 to WGS 84 (1)","","DMA-Pak","4145","4326","1","","8550","1999-10-20 00:00:00","","EPSG","","97.235",NULL};
-datafile_rows_t geod_trf_row_151[] = {"8151","ID74 to WGS 84 (1)","","DMA-Idn","4238","4326","1","","8551","1997-06-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_152[] = {"8152","NAD27 to WGS 84 (21)","","DMA-AK AluE","4267","4326","21","","8552","1997-04-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_153[] = {"8153","NAD27 to WGS 84 (22)","","DMA-AK AluW","4267","4326","22","","8553","1997-04-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_154[] = {"8154","NAD83 to WGS 84 (2)","","DMA-AK Alu","4269","4326","2","","8554","1997-04-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_155[] = {"8155","NAD83 to WGS 84 (3)","","DMA-USA Hi","4269","4326","3","","8555","1997-04-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_156[] = {"8156","Nord Sahara 1959 to WGS 84 (1)","","DMA-Alg","4307","4326","1","","8556","1997-04-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_157[] = {"8157","Pulkovo 1942 to WGS 84 (1)","","DMA-Rus","4284","4326","1","","8557","1997-04-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_158[] = {"8158","Voirol Unifie to WGS 84 (1)","","DMA-Alg N","4305","4326","1","","8558","1997-04-11 00:00:00","","EPSG","","98.15",NULL};
-datafile_rows_t geod_trf_row_159[] = {"8159","Fahud to WGS 84 (1)","","DMA-Omn","4232","4326","1","","8559","1997-04-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_160[] = {"8160","NTF (Paris) to NTF (1)","","IGN-Fra","4807","4275","1","","8560","1997-04-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_161[] = {"8161","Bern 1898 (Bern) to Bern 1898 (1)","","BfL-CH","4801","4217","1","","8561","1997-04-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_162[] = {"8162","Bogota (Bogota) to Bogota (1)","","IGAC-Col","4802","4218","1","","8562","1997-04-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_163[] = {"8163","Lisbon (Lisbon) to Lisbon (1)","","IGC-Prt","4803","4207","1","","8564","1997-04-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_164[] = {"8164","Makassar (Jakarta) to Makassar (1)","","EPSG-Idn Sulawesi","4804","4257","1","","8565","1997-04-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_165[] = {"8165","MGI (Ferro) to MGI (1)","","BEV-Aut balk","4805","4312","1","","8566","1997-04-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_166[] = {"8166","Monte Mario (Rome) to Monte Mario (1)","","EPSG-Ita","4806","4265","1","","8567","1997-04-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_167[] = {"8167","Padang (Jakarta) to Padang (1)","","EPSG-Idn Sumatra","4808","4280","1","","8569","1997-04-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_168[] = {"8168","Belge 1950 (Brussels) to Belge 1950 (1)","","IGN-Bel","4809","4215","1","","8570","1997-04-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_169[] = {"8169","Tananarive (Paris) to Tananarive (1)","","EPSG-Mdg","4810","4297","1","","8571","1997-04-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_170[] = {"8170","Voirol 1875 (Paris) to Voirol 1875 (1)","","IGN-Dza","4811","4304","1","","8573","1997-04-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_171[] = {"8171","Voirol Unifie (Paris) to Voirol Unifie(1","","IGN-Dza","4812","4305","1","","8574","1997-04-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_172[] = {"8172","Batavia (Jakarta) to Batavia (1)","","EPSG-Idn Java","4813","4211","1","","8576","1997-04-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_173[] = {"8173","RT38 (Stockholm) to RT38 (1)","","NLS-Swe","4814","4308","1","","8578","1997-04-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_174[] = {"8174","Bogota (Bogota) to WGS 84 (1)","","EPSG-Col","4802","4326","1","Colombia.","8563","1997-04-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_175[] = {"8175","Monte Mario (Rome) to WGS 84 (1)","","EPSG-Ita","4806","4326","1","Italy (Sardinia).","8568","1997-04-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_176[] = {"8176","Tananarive (Paris) to WGS 84 (1)","","EPSG-Mdg","4810","4326","1","Madagascar.","8572","1997-04-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_177[] = {"8177","Voirol Unifie (Paris) to WGS 84 (1)","","EPSG-Dza N","4812","4326","1","Algeria - north of 35g (31 deg 30 min) North","8575","1997-04-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_178[] = {"8178","Batavia (Jakarta) to WGS 84 (1)","","EPSG-Idn Sumatra","4813","4326","1","Indonesia (Sumatra).","8577","1997-04-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_179[] = {"8179","Greek (Athens) to Greek (1)","","NTU-Grc","4815","4120","1","","8579","1998-12-14 00:00:00","","EPSG","","98.52",NULL};
-datafile_rows_t geod_trf_row_180[] = {"8180","Schwarzeck to WGS 84 (2)","","SLI-Nam","4293","4326","2","","8580","1998-11-19 00:00:00","","EPSG","","98.46",NULL};
-datafile_rows_t geod_trf_row_181[] = {"8181","GGRS87 to WGS 84 (1)","","Hel-Grc","4121","4326","1","","8581","1997-06-16 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_182[] = {"8182","HD72 to ETRF89 (1)","","ELTE-Hun","4237","4258","1","","8582","1997-11-13 00:00:00","","EPSG","","97.47",NULL};
-datafile_rows_t geod_trf_row_183[] = {"8183","HD72 to WGS 84 (1)","","EPSG-Hun","4237","4326","1","Hungary.","8583","1997-07-22 00:00:00","","EPSG","For many purposes ETRF89 can be assumed to be coincident with WGS 84.","",NULL};
-datafile_rows_t geod_trf_row_184[] = {"8184","ED50 to WGS 84 (17)","","IGN-Fra","4230","4326","17","","8584","1997-11-13 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_185[] = {"8185","NTF to ED50 (1)","","IGN-Fra","4275","4230","1","","8585","1997-11-13 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_186[] = {"8186","NTF (Paris) to ED50 (1)","","EPSG-Fra","4807","4230","1","France","8586","1997-11-13 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_187[] = {"8187","NTF to WGS 72 (1)","","IGN-Fra","4275","4322","1","","8587","1997-11-13 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_188[] = {"8188","NTF (Paris) to WGS 72 (1)","","EPSG-Fra","4807","4322","1","France.","8588","1997-11-13 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_189[] = {"8189","AGD66 to GDA94 (1)","","Auslig-Aus 5m","4202","4283","1","","8589","1997-11-13 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_190[] = {"8190","AGD66 to WGS 84 (2)","","EPSG-Aus 5m","4202","4326","2","Australia..","8590","1998-12-16 00:00:00","","EPSG","For many purposes GDA94 can be assumed to be coincident with WGS 84.","98.50",NULL};
-datafile_rows_t geod_trf_row_191[] = {"8191","AGD84 to GDA94 (1)","","Auslig-Aus 5m","4203","4283","1","","8591","1997-11-13 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_192[] = {"8192","AGD84 to WGS 84 (3)","","EPSG-Aus 5m","4203","4326","3","Australia","8592","1998-12-16 00:00:00","","EPSG","For many purposes GDA94 can be assumed to be coincident with WGS 84.","98.50",NULL};
-datafile_rows_t geod_trf_row_193[] = {"8193","AGD84 to GDA94 (2)","","Auslig-Aus 1m","4203","4283","2","","8593","1997-11-13 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_194[] = {"8194","AGD84 to WGS 84 (4)","","EPSG-Aus 1m","4203","4326","4","Australia.","8594","1998-12-16 00:00:00","","EPSG","For many purposes GDA94 can be assumed to be coincident with WGS 84.","98.50",NULL};
-datafile_rows_t geod_trf_row_195[] = {"8195","RT90 to WGS 84 (1)","","EPSG-Swe","4124","4326","1","Sweden.","8595","1999-04-22 00:00:00","","EPSG","For many purposes ETRF89 can be assumed to be coincident with WGS 84.","99.11",NULL};
-datafile_rows_t geod_trf_row_196[] = {"8196","Samboja to WGS 84 (1)","","TOT-Idn Mah","4125","4326","1","","8596","1997-11-13 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_197[] = {"8197","Pulkovo 1942 to LKS94 (1)","","HNIT-Ltu","4284","4126","1","","8597","1998-03-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_198[] = {"8198","LKS94 to WGS 84 (1)","","HNIT-Ltu","4126","4326","1","","8598","1998-04-16 00:00:00","","EPSG","For many purposes LKS94 can be assumed to be coincident with WGS 84.","98.13",NULL};
-datafile_rows_t geod_trf_row_199[] = {"8199","Pulkovo 1942 to WGS 84 (2)","","EPSG-Ltu","4284","4326","2","Lithuania.","8609","1998-03-12 00:00:00","","EPSG","For many purposes LKS94 can be assumed to be coincident with WGS 84.","",NULL};
-datafile_rows_t geod_trf_row_200[] = {"8200","Pulkovo 1942 to WGS 84 (3)","","NIMA-Hun","4284","4326","3","","8602","1998-03-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_201[] = {"8201","Pulkovo 1942 to WGS 84 (4)","","NIMA-Pol","4284","4326","4","","8603","1998-03-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_202[] = {"8202","Pulkovo 1942 to WGS 84 (5)","","NIMA-Cze","4284","4326","5","","8604","1998-03-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_203[] = {"8203","Pulkovo 1942 to WGS 84 (6)","","NIMA-Lva","4284","4326","6","","8605","1998-03-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_204[] = {"8204","Pulkovo 1942 to WGS 84 (7)","","NIMA-Kaz","4284","4326","7","","8606","1998-03-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_205[] = {"8205","Pulkovo 1942 to WGS 84 (8)","","NIMA-Alb","4284","4326","8","","8607","1998-03-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_206[] = {"8206","Pulkovo 1942 to WGS 84 (9)","","NIMA-Rom","4284","4326","9","","8608","1998-03-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_207[] = {"8207","Arc 1960 to WGS 84 (2)","","NIMA-Ken","4210","4326","2","","8599","1998-03-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_208[] = {"8208","Arc 1960 to WGS 84 (3)","","NIMA-Tza","4210","4326","3","","8600","1998-03-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_209[] = {"8209","Segora to WGS 84 (1)","","NIMA-Idn Kal","4294","4326","1","","8601","1998-03-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_210[] = {"8210","Voirol 1875 to WGS 84 (1)","","NIMA-Dza N","4304","4326","1","","8610","1998-03-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_211[] = {"8211","Voirol 1875 (Paris) to WGS 84 (1)","","EPSG-Dza N","4811","4326","1","Algeria - north of 35g (31 deg 30 min) North.","8611","1998-03-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_212[] = {"8212","Naparima 1972 to WGS 84 (2)","","MEEI-Tto","4271","4326","2","","8612","1998-04-16 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_213[] = {"8213","Trinidad 1903 to WGS 84 (1)","","MEEI-Trin","4302","4326","1","","8613","1998-04-16 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_214[] = {"8214","Tete to Moznet (1)","","DNGC-Moz","4127","4130","1","","8614","1998-04-16 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_215[] = {"8215","Tete to WGS 84 (1)","","EPSG-Moz","4127","4326","1","Mozambique - average for whole country.","8615","1998-04-16 00:00:00","","EPSG","For many purposes Moznet can be assumed to be coincident with WGS 84.","",NULL};
-datafile_rows_t geod_trf_row_216[] = {"8216","Tete to Moznet (2)","","DNGC-Moz A","4127","4130","2","","8616","1998-04-16 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_217[] = {"8217","Tete to WGS 84 (2)","","EPSG-Moz A","4127","4326","2","Mozambique - Maputo province and southern part of Gaza province; i.e. south of approximately 24 deg S.","8617","1998-04-16 00:00:00","","EPSG","For many purposes Moznet can be assumed to be coincident with WGS 84.","",NULL};
-datafile_rows_t geod_trf_row_218[] = {"8218","Tete to Moznet (3)","","DNGC-Moz B","4127","4130","3","","8618","1998-04-16 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_219[] = {"8219","Tete to WGS 84 (3)","","EPSG-Moz B","4127","4326","3","Mozambique - provinces of Gaza; Inhambane and southern parts of Sofala and Manhica; i.e. between approximately 24 and 20 deg South.","8619","1998-04-16 00:00:00","","EPSG","For many purposes Moznet can be assumed to be coincident with WGS 84.","",NULL};
-datafile_rows_t geod_trf_row_220[] = {"8220","Tete to Moznet (4)","","DNGC-Moz C","4127","4130","4","","8620","1998-04-16 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_221[] = {"8221","Tete to WGS 84 (4)","","EPSG-Moz C","4127","4326","4","Mozambique - provinces of Sofala north of Beira corridor; Manhica; Tete and Zambezia; i.e. between approximately 20 and 16 deg South.","8621","1998-04-16 00:00:00","","EPSG","For many purposes Moznet can be assumed to be coincident with WGS 84.","",NULL};
-datafile_rows_t geod_trf_row_222[] = {"8222","Tete to Moznet (5)","","DNGC-Moz D","4127","4130","5","","8622","1998-04-16 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_223[] = {"8223","Tete to WGS 84 (5)","","EPSG-Moz D","4127","4326","5","Mozambique - provinces of Nampula; Niassa; Cabo Delgado; i.e. north of approximately 16 deg S.","8623","1998-04-16 00:00:00","","EPSG","For many purposes Moznet can be assumed to be coincident with WGS 84.","",NULL};
-datafile_rows_t geod_trf_row_224[] = {"8224","Moznet to WGS 84 (1)","","EPSG-Moz","4130","4326","1","","8624","1998-04-16 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_225[] = {"8225","Pulkovo 1942 to WGS 84 (10)","","KCS-Kaz Cas","4284","4326","10","","8625","1998-04-16 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_226[] = {"8226","Indian 1975 to WGS 84 (2)","","NIMA-Tha","4240","4326","2","","8626","1998-04-16 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_227[] = {"8227","Tokyo to WGS 84 (5)","","NIMA-Kor","4301","4326","5","","8627","1998-11-19 00:00:00","","EPSG","","98.46",NULL};
-datafile_rows_t geod_trf_row_228[] = {"8228","MGI to WGS 84 (1)","","NIMA-balk","4312","4326","1","","8628","1998-04-16 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_229[] = {"8229","Naparima 1972 to WGS 84 (3)","","NIMA-Tto","4271","4326","3","","8629","1998-04-16 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_230[] = {"8233","DHDN to ETRF89 (1)","","IfAG-Deu W","4314","4258","1","","8633","1998-06-30 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_231[] = {"8234","DHDN to WGS 84 (1)","","EPSG-Deu W","4314","4326","1","Germany - former west Germany.","8634","1998-06-30 00:00:00","EPSG","EPSG","For many purposes ETRF89 can be assumed to be coincident with WGS 84.","",NULL};
-datafile_rows_t geod_trf_row_232[] = {"8235","Pulkovo 1942 to ETRF89 (1)","","IfAG-Deu E","4284","4258","1","","8635","1998-06-30 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_233[] = {"8236","Pulkovo 1942 to WGS 84 (11)","","EPSG-Deu E","4284","4326","11","Germany - former east Germany - Brandenburg; Mecklenburg-Vorpommern; Sachsen-Anhalt.","8636","1998-06-30 00:00:00","","EPSG","For many purposes ETRF89 can be assumed to be coincident with WGS 84.","",NULL};
-datafile_rows_t geod_trf_row_234[] = {"8237","ED50 to WGS 84 (Common Offshore)","","UKOOA-CO","4230","4326","18","","8637","1998-06-30 00:00:00","","EPSG","","98.27",NULL};
-datafile_rows_t geod_trf_row_235[] = {"8238","Madrid 1870 (Madrid) to ED50 (1)","","IGB-Esp","4903","4230","1","","8638","1998-11-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_236[] = {"8239","Madrid 1870 (Madrid) to ED50 (2)","","IGB-Esp N","4903","4230","2","","8639","1998-11-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_237[] = {"8240","Madrid 1870 (Madrid) to ED50 (3)","","IGB-Esp S","4903","4230","3","","8640","1998-11-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_238[] = {"8241","Madrid 1870 (Madrid) to WGS 84 (1)","","EPSG-Esp","4903","4326","1","Spain.","8641","1998-11-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_239[] = {"8242","NAD27 to NAD83 (3)","","GC-Can NT1","4267","4269","3","","8642","1998-11-11 00:00:00","","EPSG","","98.57",NULL};
-datafile_rows_t geod_trf_row_240[] = {"8243","NAD27 to WGS 84 (25)","","EPSG-Can old","4267","4326","25","Canada","8643","1998-11-11 00:00:00","","EPSG","For many purposes NAD83 can be assumed to be coincident with WGS 84.","",NULL};
-datafile_rows_t geod_trf_row_241[] = {"8244","NAD27 to NAD83 (4)","","GC-Can","4267","4269","4","","8644","1998-11-11 00:00:00","","EPSG","","98.57",NULL};
-datafile_rows_t geod_trf_row_242[] = {"8245","NAD27 to WGS 84 (26)","","EPSG-Can","4267","4326","26","Canada.","8645","1998-11-11 00:00:00","","EPSG","For many purposes NAD83 can be assumed to be coincident with WGS 84.","",NULL};
-datafile_rows_t geod_trf_row_243[] = {"8246","OSGB 1936 to WGS 84 (Petroleum)","","UKOOA-Pet","4277","4326","6","","8646","1998-11-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_244[] = {"8247","OSGB 1936 to ED50 (UKOOA)","","UKOOA-UKCS","4277","4230","1","","8647","1998-11-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_245[] = {"8248","Manoca to WGS 84 (1)","","SCS-Cmr","4260","4326","1","","8648","1998-11-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_246[] = {"8249","Camacupa to WGS 72BE (1)","","GSI-Ago","4220","4324","1","","8649","1998-11-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_247[] = {"8250","Camacupa to WGS 84 (1)","","CON-Ago B5","4220","4326","1","","8650","1998-11-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_248[] = {"8251","Camacupa to WGS 84 (2)","","TEX-Ago B2","4220","4326","2","","8651","1998-11-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_249[] = {"8252","Camacupa to WGS 84 (3)","","SHL-Ago old","4220","4326","3","","8652","1998-11-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_250[] = {"8253","Camacupa to WGS 84 (4)","","GSI-Ago","4220","4326","4","","8653","1998-11-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_251[] = {"8254","Camacupa to WGS 84 (5)","","ELF-Ago B3 old","4220","4326","5","","8654","1998-11-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_252[] = {"8255","Camacupa to WGS 84 (6)","","ELF-Ago B7 old","4220","4326","6","","8655","1998-11-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_253[] = {"8256","Camacupa to WGS 84 (7)","","ELF-Ago B15","4220","4326","7","","8656","1998-11-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_254[] = {"8257","Camacupa to WGS 84 (8)","","ELF-Ago B2 old","4220","4326","8","","8657","1998-11-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_255[] = {"8258","Camacupa to WGS 84 (9)","","SHL-Ago B16","4220","4326","9","","8658","1998-11-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_256[] = {"8259","Camacupa to WGS 84 (10)","","ELF-Ago N","4220","4326","10","","8659","1998-11-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_257[] = {"8260","Malongo 1987 to Mhast (1)","","CHV-Ago Cab","4259","4264","1","","8660","1998-11-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_258[] = {"8261","Mhast to WGS 84 (1)","","CHV-Ago Cab","4264","4326","1","","8661","1998-11-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_259[] = {"8262","Malongo 1987 to WGS 84 (1)","","CHV-Ago Cab","4259","4326","1","","8662","1998-11-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_260[] = {"8263","MGI (Ferro) to WGS 84 (1)","","DMA-balk","4805","4326","1","MEAN FOR Boznia and Herzegovina; Croatia; Serbia; Slovenia.","8663","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_261[] = {"8264","EST92 to ETRF89 (1)","","UT-Est","4133","4258","1","","8664","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_262[] = {"8265","Pulkovo 1942 to EST92 (1)","","UT-Est","4284","4133","1","","8665","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_263[] = {"8266","EST92 to WGS 84 (1)","","UT-Est","4133","4326","1","","8666","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_264[] = {"8267","Pulkovo 1942 to WGS 84 (12)","","UT-Est","4284","4326","12","","8667","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_265[] = {"8268","Tokyo to WGS 84 (6)","","GSI-Jpn 452141","4301","4326","6","","8668","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_266[] = {"8269","Tokyo to WGS 84 (7)","","GSI-Jpn 452142","4301","4326","7","","8669","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_267[] = {"8270","Tokyo to WGS 84 (8)","","GSI-Jpn 444141","4301","4326","8","","8670","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_268[] = {"8271","Tokyo to WGS 84 (9)","","GSI-Jpn 444142","4301","4326","9","","8671","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_269[] = {"8272","Tokyo to WGS 84 (10)","","GSI-Jpn 440141","4301","4326","10","","8672","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_270[] = {"8273","Tokyo to WGS 84 (11)","","GSI-Jpn 440142","4301","4326","11","","8673","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_271[] = {"8274","Tokyo to WGS 84 (12)","","GSI-Jpn 440143","4301","4326","12","","8674","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_272[] = {"8275","Tokyo to WGS 84 (13)","","GSI-Jpn 440144","4301","4326","13","","8675","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_273[] = {"8276","Tokyo to WGS 84 (14)","","GSI-Jpn 432141","4301","4326","14","","8676","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_274[] = {"8277","Tokyo to WGS 84 (15)","","GSI-Jpn 432142","4301","4326","15","","8677","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_275[] = {"8278","Tokyo to WGS 84 (16)","","GSI-Jpn 432143","4301","4326","16","","8678","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_276[] = {"8279","Tokyo to WGS 84 (17)","","GSI-Jpn 432144","4301","4326","17","","8679","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_277[] = {"8280","Tokyo to WGS 84 (18)","","GSI-Jpn 432145","4301","4326","18","","8680","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_278[] = {"8281","Tokyo to WGS 84 (19)","","GSI-Jpn 424140","4301","4326","19","","8681","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_279[] = {"8282","Tokyo to WGS 84 (20)","","GSI-Jpn 424141","4301","4326","20","","8682","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_280[] = {"8283","Tokyo to WGS 84 (21)","","GSI-Jpn 424142","4301","4326","21","","8683","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_281[] = {"8284","Tokyo to WGS 84 (22)","","GSI-Jpn 424143","4301","4326","22","","8684","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_282[] = {"8285","Tokyo to WGS 84 (23)","","GSI-Jpn 424144","4301","4326","23","","8685","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_283[] = {"8286","Tokyo to WGS 84 (24)","","GSI-Jpn 424145","4301","4326","24","","8686","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_284[] = {"8287","Tokyo to WGS 84 (25)","","GSI-Jpn 420139","4301","4326","25","","8687","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_285[] = {"8288","Tokyo to WGS 84 (26)","","GSI-Jpn 420140","4301","4326","26","","8688","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_286[] = {"8289","Tokyo to WGS 84 (27)","","GSI-Jpn","4301","4326","27","","8689","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_287[] = {"8290","Tokyo to WGS 84 (28)","","GSI-Jpn","4301","4326","28","","8690","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_288[] = {"8291","Tokyo to WGS 84 (29)","","GSI-Jpn","4301","4326","29","","8691","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_289[] = {"8292","Tokyo to WGS 84 (30)","","GSI-Jpn","4301","4326","30","","8692","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_290[] = {"8293","Tokyo to WGS 84 (31)","","GSI-Jpn","4301","4326","31","","8693","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_291[] = {"8294","Tokyo to WGS 84 (32)","","GSI-Jpn","4301","4326","32","","8694","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_292[] = {"8295","Tokyo to WGS 84 (33)","","GSI-Jpn","4301","4326","33","","8695","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_293[] = {"8296","Tokyo to WGS 84 (34)","","GSI-Jpn","4301","4326","34","","8696","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_294[] = {"8297","Tokyo to WGS 84 (35)","","GSI-Jpn","4301","4326","35","","8697","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_295[] = {"8298","Tokyo to WGS 84 (36)","","GSI-Jpn","4301","4326","36","","8698","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_296[] = {"8299","Tokyo to WGS 84 (37)","","GSI-Jpn","4301","4326","37","","8699","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_297[] = {"8300","Tokyo to WGS 84 (38)","","GSI-Jpn","4301","4326","38","","8700","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_298[] = {"8301","Tokyo to WGS 84 (39)","","GSI-Jpn","4301","4326","39","","8701","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_299[] = {"8302","Tokyo to WGS 84 (40)","","GSI-Jpn","4301","4326","40","","8702","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_300[] = {"8303","Tokyo to WGS 84 (41)","","GSI-Jpn","4301","4326","41","","8703","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_301[] = {"8304","Tokyo to WGS 84 (42)","","GSI-Jpn","4301","4326","42","","8704","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_302[] = {"8305","Tokyo to WGS 84 (43)","","GSI-Jpn","4301","4326","43","","8705","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_303[] = {"8306","Tokyo to WGS 84 (44)","","GSI-Jpn","4301","4326","44","","8706","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_304[] = {"8307","Tokyo to WGS 84 (45)","","GSI-Jpn","4301","4326","45","","8707","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_305[] = {"8308","Tokyo to WGS 84 (46)","","GSI-Jpn","4301","4326","46","","8708","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_306[] = {"8309","Tokyo to WGS 84 (47)","","GSI-Jpn","4301","4326","47","","8709","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_307[] = {"8310","Tokyo to WGS 84 (48)","","GSI-Jpn","4301","4326","48","","8710","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_308[] = {"8311","Tokyo to WGS 84 (49)","","GSI-Jpn","4301","4326","49","","8711","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_309[] = {"8312","Tokyo to WGS 84 (50)","","GSI-Jpn","4301","4326","50","","8712","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_310[] = {"8313","Tokyo to WGS 84 (51)","","GSI-Jpn","4301","4326","51","","8713","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_311[] = {"8314","Tokyo to WGS 84 (52)","","GSI-Jpn","4301","4326","52","","8714","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_312[] = {"8315","Tokyo to WGS 84 (53)","","GSI-Jpn","4301","4326","53","","8715","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_313[] = {"8316","Tokyo to WGS 84 (54)","","GSI-Jpn","4301","4326","54","","8716","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_314[] = {"8317","Tokyo to WGS 84 (55)","","GSI-Jpn","4301","4326","55","","8717","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_315[] = {"8318","Tokyo to WGS 84 (56)","","GSI-Jpn","4301","4326","56","","8718","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_316[] = {"8319","Tokyo to WGS 84 (57)","","GSI-Jpn","4301","4326","57","","8719","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_317[] = {"8320","Tokyo to WGS 84 (58)","","GSI-Jpn","4301","4326","58","","8720","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_318[] = {"8321","Tokyo to WGS 84 (59)","","GSI-Jpn","4301","4326","59","","8721","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_319[] = {"8322","Tokyo to WGS 84 (60)","","GSI-Jpn","4301","4326","60","","8722","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_320[] = {"8323","Tokyo to WGS 84 (61)","","GSI-Jpn","4301","4326","61","","8723","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_321[] = {"8324","Tokyo to WGS 84 (62)","","GSI-Jpn","4301","4326","62","","8724","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_322[] = {"8325","Tokyo to WGS 84 (63)","","GSI-Jpn","4301","4326","63","","8725","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_323[] = {"8326","Tokyo to WGS 84 (64)","","GSI-Jpn","4301","4326","64","","8726","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_324[] = {"8327","Tokyo to WGS 84 (65)","","GSI-Jpn","4301","4326","65","","8727","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_325[] = {"8328","Tokyo to WGS 84 (66)","","GSI-Jpn","4301","4326","66","","8728","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_326[] = {"8329","Tokyo to WGS 84 (67)","","GSI-Jpn","4301","4326","67","","8729","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_327[] = {"8330","Tokyo to WGS 84 (68)","","GSI-Jpn","4301","4326","68","","8730","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_328[] = {"8331","Tokyo to WGS 84 (69)","","GSI-Jpn","4301","4326","69","","8731","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_329[] = {"8332","Tokyo to WGS 84 (70)","","GSI-Jpn","4301","4326","70","","8732","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_330[] = {"8333","Tokyo to WGS 84 (71)","","GSI-Jpn","4301","4326","71","","8733","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_331[] = {"8334","Tokyo to WGS 84 (72)","","GSI-Jpn","4301","4326","72","","8734","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_332[] = {"8335","Tokyo to WGS 84 (73)","","GSI-Jpn","4301","4326","73","","8735","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_333[] = {"8336","Tokyo to WGS 84 (74)","","GSI-Jpn","4301","4326","74","","8736","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_334[] = {"8337","Tokyo to WGS 84 (75)","","GSI-Jpn","4301","4326","75","","8737","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_335[] = {"8338","Tokyo to WGS 84 (76)","","GSI-Jpn","4301","4326","76","","8738","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_336[] = {"8339","Tokyo to WGS 84 (77)","","GSI-Jpn","4301","4326","77","","8739","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_337[] = {"8340","Tokyo to WGS 84 (78)","","GSI-Jpn","4301","4326","78","","8740","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_338[] = {"8341","Tokyo to WGS 84 (79)","","GSI-Jpn","4301","4326","79","","8741","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_339[] = {"8342","Tokyo to WGS 84 (80)","","GSI-Jpn","4301","4326","80","","8742","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_340[] = {"8343","Tokyo to WGS 84 (81)","","GSI-Jpn","4301","4326","81","","8743","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_341[] = {"8344","Tokyo to WGS 84 (82)","","GSI-Jpn","4301","4326","82","","8744","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_342[] = {"8345","Tokyo to WGS 84 (83)","","GSI-Jpn","4301","4326","83","","8745","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_343[] = {"8346","Tokyo to WGS 84 (84)","","GSI-Jpn","4301","4326","84","","8746","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_344[] = {"8347","Tokyo to WGS 84 (85)","","GSI-Jpn","4301","4326","85","","8747","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_345[] = {"8348","Tokyo to WGS 84 (86)","","GSI-Jpn","4301","4326","86","","8748","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_346[] = {"8349","Tokyo to WGS 84 (87)","","GSI-Jpn","4301","4326","87","","8749","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_347[] = {"8350","Tokyo to WGS 84 (88)","","GSI-Jpn","4301","4326","88","","8750","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_348[] = {"8351","Tokyo to WGS 84 (89)","","GSI-Jpn","4301","4326","89","","8751","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_349[] = {"8352","Tokyo to WGS 84 (90)","","GSI-Jpn","4301","4326","90","","8752","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_350[] = {"8353","Tokyo to WGS 84 (91)","","GSI-Jpn","4301","4326","91","","8753","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_351[] = {"8354","Tokyo to WGS 84 (92)","","GSI-Jpn","4301","4326","92","","8754","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_352[] = {"8355","Tokyo to WGS 84 (93)","","GSI-Jpn","4301","4326","93","","8755","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_353[] = {"8356","Tokyo to WGS 84 (94)","","GSI-Jpn","4301","4326","94","","8756","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_354[] = {"8357","Tokyo to WGS 84 (95)","","GSI-Jpn","4301","4326","95","","8757","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_355[] = {"8358","Tokyo to WGS 84 (96)","","GSI-Jpn","4301","4326","96","","8758","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_356[] = {"8359","Tokyo to WGS 84 (97)","","GSI-Jpn","4301","4326","97","","8759","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_357[] = {"8360","Tokyo to WGS 84 (98)","","GSI-Jpn","4301","4326","98","","8760","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_358[] = {"8361","Tokyo to WGS 84 (99)","","GSI-Jpn","4301","4326","99","","8761","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_359[] = {"8362","Tokyo to WGS 84 (100)","","GSI-Jpn 324132","4301","4326","100","","8762","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_360[] = {"8363","Tokyo to WGS 84 (101)","","GSI-Jpn 324133","4301","4326","101","","8763","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_361[] = {"8364","Tokyo to WGS 84 (102)","","GSI-Jpn 324134","4301","4326","102","","8764","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_362[] = {"8365","Tokyo to WGS 84 (103)","","GSI-Jpn 320130","4301","4326","103","","8765","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_363[] = {"8366","Tokyo to WGS 84 (104)","","GSI-Jpn 320131","4301","4326","104","","8766","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_364[] = {"8367","Tokyo to WGS 84 (105)","","GSI-Jpn 320132","4301","4326","105","","8767","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_365[] = {"8368","Tokyo to WGS 84 (106)","","GSI-Jpn 312130","4301","4326","106","","8768","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_366[] = {"8369","Tokyo to WGS 84 (107)","","GSI-Jpn 312131","4301","4326","107","","8769","1998-12-14 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_367[] = {"8370","Fahud to WGS 84 (2)","","PDO-Omn","4232","4326","2","","8770","1999-04-22 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_368[] = {"8371","PSD93 to WGS 84 (1)","","PDO-Omn","4134","4326","1","","8771","1999-04-22 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_369[] = {"8372","ED50 to WGS 84 (19)","","HEL-Grc","4230","4326","19","","8772","1999-04-22 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_370[] = {"8373","Antigua 1943 to WGS 84 (1)","","DOS-Atg Ant","4601","4326","1","","8773","1999-04-22 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_371[] = {"8374","Dominica 1945 to WGS 84 (1)","","DOS-Dma","4602","4326","1","","8774","1999-04-22 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_372[] = {"8375","Grenada 1953 to WGS 84 (1)","","DOS-Grd","4603","4326","1","","8775","1999-04-22 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_373[] = {"8376","Montserrat 1958 to WGS 84 (1)","","DOS-Msr","4604","4326","1","","8776","1999-04-22 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_374[] = {"8377","St. Kitts 1955 to WGS 84 (1)","","DOS-Kna","4605","4326","1","","8777","1999-04-22 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_375[] = {"8378","St. Lucia 1955 to WGS 84 (1)","","DOS-Lca","4606","4326","1","","8778","1999-04-22 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_376[] = {"8379","Anguilla 1957 to WGS 84 (1)","","DOS-Aia","4600","4326","1","","8779","1999-04-22 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_377[] = {"8380","RT90 to ETRF89 (1)","","NLS-Swe","4124","4258","1","","8780","1999-04-22 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_378[] = {"8384","ED50 to WGS 84 (20)","","NMA-Nor 6265W","4230","4326","20","","8784","1999-04-22 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_379[] = {"8385","Old Hawaiian to NAD83 (1)","","NGS-Usa Hi","4135","4269","1","","8785","1999-05-24 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_380[] = {"8386","Old Hawaiian to WGS 84 (1)","","EPSG-US Hi","4135","4326","1","United States - Hawaii","8786","1999-05-24 00:00:00","","EPSG","For many purposes NAD83 can be assumed to be coincident with WGS 84.","",NULL};
-datafile_rows_t geod_trf_row_381[] = {"8387","St. Lawrence Island to NAD83 (1)","","NGS-Usa AK StL","4136","4269","1","","8787","1999-05-24 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_382[] = {"8388","St. Lawrence Island to WGS 84 (1)","","EPSG-US StL","4136","4326","1","United States - Alaska - St. Lawrence Island.","8788","1999-05-24 00:00:00","","EPSG","For many purposes NAD83 can be assumed to be coincident with WGS 84.","",NULL};
-datafile_rows_t geod_trf_row_383[] = {"8389","St. Paul Island to NAD83 (1)","","NGS-Usa AK StP","4137","4269","1","","8789","1999-05-24 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_384[] = {"8390","St. Paul Island to WGS 84 (1)","","EPSG-US StP","4137","4326","1","United States - Alaska - St. Paul Island.","8790","1999-05-24 00:00:00","","EPSG","For many purposes NAD83 can be assumed to be coincident with WGS 84.","",NULL};
-datafile_rows_t geod_trf_row_385[] = {"8391","St. George Island to NAD83 (1)","","NGS-Usa AK StG","4138","4269","1","","8791","1999-05-24 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_386[] = {"8392","St. George Island to WGS 84 (1)","","EPSG-USA StG","4138","4326","1","United States - Alaska - St. George Island.","8792","1999-05-24 00:00:00","","EPSG","For many purposes NAD83 can be assumed to be coincident with WGS 84.","",NULL};
-datafile_rows_t geod_trf_row_387[] = {"8393","NAD27(CGQ77)  to NAD83 (1)","","SGQ-Can QC","4609","4269","1","","8793","1999-05-24 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_388[] = {"8394","NAD27(CGQ77) to WGS 84 (1)","","EPSG-Can Qc","4609","4326","1","Canada - Quebec","8794","1999-05-24 00:00:00","","EPSG","For many purposes NAD83 can be assumed to be coincident with WGS 84.","",NULL};
-datafile_rows_t geod_trf_row_389[] = {"8395","AGD66 to GDA94 (2)","","Auslig-ACT 1m","4202","4283","2","","8795","1999-05-24 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_390[] = {"8396","AGD66 to WGS 84 (3)","","EPSG-Aus ACT 1m","4202","4326","3","Australia - ACT.","8796","1999-05-24 00:00:00","","EPSG","For many purposes GDA94 can be assumed to be coincident with WGS 84.","",NULL};
-datafile_rows_t geod_trf_row_391[] = {"8397","AGD66 to GDA94 (3)","","Auslig-Tas 1m","4202","4283","3","","8797","1999-05-24 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_392[] = {"8398","AGD66 to WGS 84 (4)","","EPSG-Aus Tas 1m","4202","4326","4","Australia - Tasmania.","8798","1999-05-24 00:00:00","","EPSG","For many purposes GDA94 can be assumed to be coincident with WGS 84.","",NULL};
-datafile_rows_t geod_trf_row_393[] = {"8399","AGD66 to GDA94 (4)","","Auslig-NSW Vic","4202","4283","4","","8799","1999-05-24 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_394[] = {"8400","AGD66 to WGS 84 (5)","","EPSG-Aus NSW Vic 1m","4202","4326","5","Australia - New South Wales (NSW) and Victoria.","8800","1999-05-24 00:00:00","","EPSG","For many purposes GDA94 can be assumed to be coincident with WGS 84.","",NULL};
-datafile_rows_t geod_trf_row_395[] = {"8401","Puerto Rico to NAD83 (1)","","NGS-PRVI","4139","4269","1","","8801","1999-05-24 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_396[] = {"8402","Puerto Rico to WGS 84 (1)","","EPSG-PRVI","4139","4326","1","Puerto Rico; Virgin Islands (U.S.); Virgin Islands (British).","8802","1999-05-24 00:00:00","","EPSG","For many purposes NAD83 can be assumed to be coincident with WGS 84.","",NULL};
-datafile_rows_t geod_trf_row_397[] = {"8403","NAD27 to NAD83 (5)","","SGQ-Can QC","4267","4269","5","","8803","1999-05-24 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_398[] = {"8404","NAD27 to WGS 84 (27)","","EPSG-Can QC","4267","4326","27","Canada - Quebec","8804","1999-05-24 00:00:00","","EPSG","For many purposes NAD83 can be assumed to be coincident with WGS 84.","",NULL};
-datafile_rows_t geod_trf_row_399[] = {"8405","NAD27(76) to NAD83 (1)","","SGQ-Can Ont","4608","4269","1","","8805","1999-05-24 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_400[] = {"8406","NAD27(76) to WGS 84 (1)","","EPSG-Can On","4608","4326","1","Canada - Ontario","8806","1999-05-24 00:00:00","","EPSG","For many purposes NAD83 can be assumed to be coincident with WGS 84.","",NULL};
-datafile_rows_t geod_trf_row_401[] = {"8407","AGD66 to GDA94 (5)","","OSG-Aus Vic","4202","4283","5","","8807","1999-05-24 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_402[] = {"8408","AGD66 to WGS 84 (6)","","EPSG-Aus Vic 0.1m","4202","4326","6","Australia - Victoria","8808","1999-05-24 00:00:00","","EPSG","For many purposes GDA94 can be assumed to be coincident with WGS 84.","",NULL};
-datafile_rows_t geod_trf_row_403[] = {"8411","NGO 1948 (Oslo) to NGO 1948 (1)","","NGO-Nor","4817","4273","1","","8811","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_404[] = {"8412","NTF (Paris) to NTF (2)","","RGS","4807","4275","2","","8812","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_405[] = {"8413","Locodjo 1965 to WGS 84 (1)","","IGN-Civ","4142","4326","1","","8813","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_406[] = {"8414","Abidjan 1987 to WGS 84 (1)","","IGN-Civ","4143","4326","1","","8814","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_407[] = {"8415","MGI to WGS 84 (2)","","BEV-Aut","4312","4326","1","","8815","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_408[] = {"8416","ATS 77 to NAD83(CSRS98) (1)","","GIC-Can NB","4122","4140","1","","8816","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_409[] = {"8417","NAD83(CSRS98) to WGS 84 (1)","","EPSG-Can","4140","4326","1","","8817","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_410[] = {"8418","ATS 77 to WGS 84 (1)","","EPSG-Can NB","4122","4326","1","Canada - New Brunswick","8818","1999-10-20 00:00:00","EPSG","EPSG","For many purposes NAD83(CSRS) can be assumed to be coincident with WGS 84.","",NULL};
-datafile_rows_t geod_trf_row_411[] = {"8419","NAD83 to NAD83(HARN) (1)","","NGS-Usa AL","4269","4152","1","","8819","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_412[] = {"8420","NAD83 to NAD83(HARN) (2)","","NGS-Usa AZ","4269","4152","2","","8820","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_413[] = {"8421","NAD83 to NAD83(HARN) (3)","","NGS-Usa CA n","4269","4152","3","","8821","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_414[] = {"8422","NAD83 to NAD83(HARN) (4)","","NGS-Usa CA s","4269","4152","4","","8822","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_415[] = {"8423","NAD83 to NAD83(HARN) (5)","","NGS-Usa CO","4269","4152","5","","8823","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_416[] = {"8424","NAD83 to NAD83(HARN) (6)","","NGS-Usa GA","4269","4152","6","","8824","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_417[] = {"8425","NAD83 to NAD83(HARN) (7)","","NGS-Usa FL","4269","4152","7","","8825","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_418[] = {"8426","NAD83 to NAD83(HARN) (8)","","NGS-Usa ID MT e","4269","4152","8","","8826","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_419[] = {"8427","NAD83 to NAD83(HARN) (9)","","NGS-Usa ID MT w","4269","4152","9","","8827","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_420[] = {"8428","NAD83 to NAD83(HARN) (10)","","NGS-Usa KY","4269","4152","10","","8828","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_421[] = {"8429","NAD83 to NAD83(HARN) (11)","","NGS-Usa LA","4269","4152","11","","8829","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_422[] = {"8430","NAD83 to NAD83(HARN) (12)","","NGS-Usa DE MD","4269","4152","12","","8830","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_423[] = {"8431","NAD83 to NAD83(HARN) (13)","","NGS-Usa ME","4269","4152","13","","8831","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_424[] = {"8432","NAD83 to NAD83(HARN) (14)","","NGS-Usa MI","4269","4152","14","","8832","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_425[] = {"8433","NAD83 to NAD83(HARN) (15)","","NGS-Usa MS","4269","4152","15","","8833","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_426[] = {"8434","NAD83 to NAD83(HARN) (16)","","NGS-Usa NE","4269","4152","16","","8834","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_427[] = {"8435","NAD83 to NAD83(HARN) (17)","","NGS-US NewEng","4269","4152","17","","8835","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_428[] = {"8436","NAD83 to NAD83(HARN) (18)","","NGS-Usa NM","4269","4152","18","","8836","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_429[] = {"8437","NAD83 to NAD83(HARN) (19)","","NGS-Usa NY","4269","4152","19","","8837","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_430[] = {"8438","NAD83 to NAD83(HARN) (20)","","NGS-Usa ND","4269","4152","20","","8838","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_431[] = {"8439","NAD83 to NAD83(HARN) (21)","","NGS-Usa OK","4269","4152","21","","8839","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_432[] = {"8440","NAD83 to NAD83(HARN) (22)","","NGS-PRVI","4269","4152","22","","8840","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_433[] = {"8441","NAD83 to NAD83(HARN) (23)","","NGS-Usa SD","4269","4152","23","","8841","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_434[] = {"8442","NAD83 to NAD83(HARN) (24)","","NGS-Usa TN","4269","4152","24","","8842","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_435[] = {"8443","NAD83 to NAD83(HARN) (25)","","NGS-Usa TX e","4269","4152","25","","8843","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_436[] = {"8444","NAD83 to NAD83(HARN) (26)","","NGS-Usa TX w","4269","4152","26","","8844","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_437[] = {"8445","NAD83 to NAD83(HARN) (27)","","NGS-Usa VA","4269","4152","27","","8845","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_438[] = {"8446","NAD83 to NAD83(HARN) (28)","","NGS-Usa OR WA","4269","4152","28","","8846","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_439[] = {"8447","NAD83 to NAD83(HARN) (29)","","NGS-Usa WI","4269","4152","29","","8847","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_440[] = {"8448","NAD83 to NAD83(HARN) (30)","","NGS-Usa WY","4269","4152","30","","8848","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_441[] = {"8449","Cape to Hartbeesthoek94 (1)","","DSM-Zaf","4222","4148","1","","8849","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_442[] = {"8450","Hartbeesthoek94 to WGS 84 (1)","","EPSG-Zaf","4148","4326","1","","8850","1999-10-20 00:00:00","","EPSG","For many purposes Hartbeesthoek94 can be assumed to be coincident with WGS 84.","",NULL};
-datafile_rows_t geod_trf_row_443[] = {"8451","AGD66 to GDA94 (6)","","Auslig-Tas","4202","4283","6","","8851","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_444[] = {"8452","AGD66 to GDA94 (7)","","Auslig-NT","4202","4283","7","","8852","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_445[] = {"8453","AGD66 to WGS 84 (7)","","EPSG-Aus Tas 0.1m","4202","4326","7","Australia - Tasmania.","8853","1999-10-20 00:00:00","","EPSG","For many purposes GDA94 can be assumed to be coincident with WGS 84.","",NULL};
-datafile_rows_t geod_trf_row_446[] = {"8454","AGD66 to WGS 84 (8)","","EPSG-Aus NT 0.1m","4202","4326","8","Australia - Northern Territory.","8854","1999-10-20 00:00:00","","EPSG","For many purposes GDA94 can be assumed to be coincident with WGS 84.","",NULL};
-datafile_rows_t geod_trf_row_447[] = {"8455","CH1903 to WGS 84 (1)","","BfL-CH 1","4149","4326","1","","8855","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_448[] = {"8456","CH1903+ to CHTRF95 (1)","","BfL-CH","4150","4151","1","","8856","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_449[] = {"8457","CH1903+ to WGS 84 (1)","","EPSG-CH","4150","4326","1","Liechtenstein;  Switzerland.","8857","1999-10-20 00:00:00","EPSG","EPSG","For many purposes CHTRF95 can be assumed to be coincident with WGS 84.","",NULL};
-datafile_rows_t geod_trf_row_450[] = {"8458","CH1903 to WGS 84 (2)","","BfL-CH 2","4149","4326","2","","8858","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_451[] = {"8459","CHTRF95 to WGS 84 (1)","","EPSG-CH","4151","4326","1","","8859","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_452[] = {"8460","NAD27 to NAD83(HARN) (1)","","NGS-Usa AL","4267","4152","1","United States (USA) - Alabama.","8860","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_453[] = {"8461","NAD27 to NAD83(HARN) (2)","","NGS-Usa AZ","4267","4152","2","United States (USA) - Arizona.","8861","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_454[] = {"8462","NAD27 to NAD83(HARN) (3)","","NGS-Usa CA n","4267","4152","3","United States (USA) - California north of 38 deg N.","8862","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_455[] = {"8463","NAD27 to NAD83(HARN) (4)","","NGS-Usa CA s","4267","4152","4","United States (USA) - California south of 38 deg N.","8863","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_456[] = {"8464","NAD27 to NAD83(HARN) (5)","","NGS-Usa CO","4267","4152","5","United States (USA) - Colorado.","8864","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_457[] = {"8465","NAD27 to NAD83(HARN) (6)","","NGS-Usa GA","4267","4152","6","United States (USA) - Georgia.","8865","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_458[] = {"8466","NAD27 to NAD83(HARN) (7)","","NGS-Usa FL","4267","4152","7","United States (USA) - Florida.","8866","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_459[] = {"8467","NAD27 to NAD83(HARN) (8)","","NGS-Usa ID MT e","4267","4152","8","United States (USA) - Idaho and Montana - east of 113 deg W.","8867","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_460[] = {"8468","NAD27 to NAD83(HARN) (9)","","NGS-Usa ID MT w","4267","4152","9","United States (USA) - Idaho and Montana - west of 113 deg W.","8868","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_461[] = {"8469","NAD27 to NAD83(HARN) (10)","","NGS-Usa KY","4267","4152","10","United States (USA) - Kentucky.","8869","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_462[] = {"8470","NAD27 to NAD83(HARN) (11)","","NGS-Usa LA","4267","4152","11","United States (USA) - Louisiana.","8870","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_463[] = {"8471","NAD27 to NAD83(HARN) (12)","","NGS-Usa DE MD","4267","4152","12","United States (USA) - Delaware and Maryland.","8871","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_464[] = {"8472","NAD27 to NAD83(HARN) (13)","","NGS-Usa ME","4267","4152","13","United States (USA) - Maine.","8872","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_465[] = {"8473","NAD27 to NAD83(HARN) (14)","","NGS-Usa MI","4267","4152","14","United States (USA) - Michigan.","8873","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_466[] = {"8474","NAD27 to NAD83(HARN) (15)","","NGS-Usa MS","4267","4152","15","United States (USA) - Mississippi.","8874","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_467[] = {"8475","NAD27 to NAD83(HARN) (16)","","NGS-Usa NE","4267","4152","16","United States (USA) - Nebraska.","8875","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_468[] = {"8476","NAD27 to NAD83(HARN) (17)","","NGS-US NewEng","4267","4152","18","United States (USA) - Connecticut; Massachusetts; New Hampshire; Rhode Island; Vermont.","8876","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_469[] = {"8477","NAD27 to NAD83(HARN) (18)","","NGS-Usa NM","4267","4152","18","United States (USA) - New Mexico.","8877","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_470[] = {"8478","NAD27 to NAD83(HARN) (19)","","NGS-Usa NY","4267","4152","19","United States (USA) - New York.","8878","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_471[] = {"8479","NAD27 to NAD83(HARN) (20)","","NGS-Usa ND","4267","4152","20","United States (USA) - North Dakota.","8879","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_472[] = {"8480","NAD27 to NAD83(HARN) (21)","","NGS-Usa OK","4267","4152","21","United States (USA) - Oklahoma.","8880","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_473[] = {"8481","Puerto Rico to NAD83(HARN) (1)","","NGS-PRVI","4139","4152","1","United States (USA) - Puerto Rico and the Virgin Islands.","8881","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_474[] = {"8482","NAD27 to NAD83(HARN) (22)","","NGS-Usa SD","4267","4152","22","United States (USA) - South Dakota.","8882","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_475[] = {"8483","NAD27 to NAD83(HARN) (23)","","NGS-Usa TN","4267","4152","23","United States (USA) - Tennessee","8883","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_476[] = {"8484","NAD27 to NAD83(HARN) (24)","","NGS-Usa TX e","4267","4152","24","United States (USA) - Texas east of 100deg West.","8884","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_477[] = {"8485","NAD27 to NAD83(HARN) (25)","","NGS-Usa TX w","4267","4152","25","United States (USA) - Texas west of 100deg West.","8885","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_478[] = {"8486","NAD27 to NAD83(HARN) (26)","","NGS-Usa VA","4267","4152","26","United States (USA) - Virginia.","8886","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_479[] = {"8487","NAD27 to NAD83(HARN) (27)","","NGS-Usa OR WA","4267","4152","27","United States (USA) - Oregan; Washington.","8887","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_480[] = {"8488","NAD27 to NAD83(HARN) (28)","","NGS-Usa WI","4267","4152","28","United States (USA) - Wisconsin.","8888","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_481[] = {"8489","NAD27 to NAD83(HARN) (29)","","NGS-Usa WY","4267","4152","29","United States (USA) - Wyoming.","8889","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_482[] = {"8490","Rassadiran to WGS 84 (1)","","TOT-Taheri","4153","4326","1","Iran - Taheri refinery site.","8890","1999-10-20 00:00:00","Total-Fina","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_483[] = {"8491","FD58 to WGS 84 (1)","","TOT-Kangan","4132","4326","1","Iran - Kangan district","8891","1999-10-20 00:00:00","Total-Fina","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_484[] = {"8492","ED50(ED77) to WGS 84 (1)","","NCCI-Irn","4154","4326","1","Iran","8892","1999-10-20 00:00:00","National Cartographic Centre of Iran","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_485[] = {"8493","NAD83 to WGS 84 (4)","","NGS-Usa","4269","4326","4","United States (USA).","8893","1999-11-05 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_486[] = {"8494","NAD83 to WGS 84 (5)","","NGS-Usa","4269","4326","5","United States (USA).","8894","1999-11-05 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_487[] = {"8495","La Canoa to WGS 84 (1)","","LAG-Ven E","4247","4326","1","","8895","1999-11-05 00:00:00","","EPSG","","",NULL};
-datafile_rows_t geod_trf_row_488[] = {"8496","NAD27 to WGS 84 (28)","","NGS-Usa conus","4267","4326","28","United States (USA) - lower 48 states including EEZ.","8896","1999-10-20 00:00:00","","EPSG","For many purposes NAD83 can be assumed to be coincident with WGS 84.","",NULL};
-datafile_rows_t geod_trf_row_489[] = {"8497","NAD27 to WGS 84 (29)","","NGS-Usa AK","4267","4326","29","United States (USA) - Alaska including EEZ.","8897","1999-10-20 00:00:00","","EPSG","For many purposes NAD83 can be assumed to be coincident with WGS 84.","",NULL};
-
-datafile_rows_t *geod_trf_rows[] = {geod_trf_row_1,geod_trf_row_2,geod_trf_row_3,geod_trf_row_4,geod_trf_row_5,geod_trf_row_6,geod_trf_row_7,geod_trf_row_8,geod_trf_row_9,geod_trf_row_10,geod_trf_row_11,geod_trf_row_12,geod_trf_row_13,geod_trf_row_14,geod_trf_row_15,geod_trf_row_16,geod_trf_row_17,geod_trf_row_18,geod_trf_row_19,geod_trf_row_20,geod_trf_row_21,geod_trf_row_22,geod_trf_row_23,geod_trf_row_24,geod_trf_row_25,geod_trf_row_26,geod_trf_row_27,geod_trf_row_28,geod_trf_row_29,g [...]
diff --git a/src/tiff/csv/geod_trf.csv b/src/tiff/csv/geod_trf.csv
deleted file mode 100644
index 921ccc6..0000000
--- a/src/tiff/csv/geod_trf.csv
+++ /dev/null
@@ -1,489 +0,0 @@
-"GEOD_TRF_CODE","GEOD_TRF_EPSG_NAME","GEOD_TRF_USER_NAME","DESCRIPTION","SOURCE_HORIZCS_CODE","TARGET_HORIZCS_CODE","COORD_TRF_VARIANT","CONCAT_TRF_AREA_OF_USE","COORD_TRF_PATH_CODE","REVISION_DATE","INFORMATION_SOURCE","DATA_SOURCE","CONCAT_TRF_REMARKS","CHANGE_ID"
-8000,Adindan to WGS 84 (1),,DMA-Eth Sud,4201,4326,1,,8400,1996-10-18 00:00:00,,EPSG,,
-8001,Adindan to WGS 84 (2),,DMA-Bfa,4201,4326,2,,8401,1996-10-18 00:00:00,,EPSG,,
-8002,Adindan to WGS 84 (3),,DMA-Cmr,4201,4326,3,,8402,1996-10-18 00:00:00,,EPSG,,
-8003,Adindan to WGS 84 (4),,DMA-Eth,4201,4326,4,,8403,1996-10-18 00:00:00,,EPSG,,
-8004,Adindan to WGS 84 (5),,DMA-Mli,4201,4326,5,,8404,1996-10-18 00:00:00,,EPSG,,
-8005,Adindan to WGS 84 (6),,DMA-Sen,4201,4326,6,,8405,1996-10-18 00:00:00,,EPSG,,
-8006,Adindan to WGS 84 (7),,DMA-Sud,4201,4326,7,,8406,1996-10-18 00:00:00,,EPSG,,
-8007,Afgooye to WGS 84 (1),,DMA-Som,4205,4326,1,,8407,1996-10-18 00:00:00,,EPSG,,
-8008,AGD66 to WGS 84 (1),,DMA-Aus,4202,4326,1,,8408,1996-10-18 00:00:00,,EPSG,,
-8009,AGD84 to WGS 84 (1),,DMA-Aus,4203,4326,1,,8409,1996-10-18 00:00:00,,EPSG,,
-8010,Ain el Abd to WGS 84 (1),,DMA-Bhr,4204,4326,1,,8410,1996-10-18 00:00:00,,EPSG,,
-8011,Ain el Abd to WGS 84 (2),,DMA-Sau,4204,4326,2,,8411,1996-10-18 00:00:00,,EPSG,,
-8012,Amersfoort to WGS 84 (1),,NCG-Nld,4289,4326,1,,8412,1996-10-18 00:00:00,,EPSG,,
-8013,Arc 1950 to WGS 84 (1),,DMA-mean,4209,4326,1,,8413,1996-10-18 00:00:00,,EPSG,,
-8014,Arc 1950 to WGS 84 (2),,DMA-Bwa,4209,4326,2,,8414,1996-10-18 00:00:00,,EPSG,,
-8015,Arc 1950 to WGS 84 (3),,DMA-Bdi,4209,4326,3,,8415,1996-10-18 00:00:00,,EPSG,,
-8016,Arc 1950 to WGS 84 (4),,DMA-Lso,4209,4326,4,,8416,1996-10-18 00:00:00,,EPSG,,
-8017,Arc 1950 to WGS 84 (5),,DMA-Mwi,4209,4326,5,,8417,1996-10-18 00:00:00,,EPSG,,
-8018,Arc 1950 to WGS 84 (6),,DMA-Swz,4209,4326,6,,8418,1996-10-18 00:00:00,,EPSG,,
-8019,Arc 1950 to WGS 84 (7),,DMA-Cod,4209,4326,7,,8419,1996-10-18 00:00:00,,EPSG,,
-8020,Arc 1950 to WGS 84 (8),,DMA-Zmb,4209,4326,8,,8420,1996-10-18 00:00:00,,EPSG,,
-8021,Arc 1950 to WGS 84 (9),,DMA-Zwe,4209,4326,9,,8421,1996-10-18 00:00:00,,EPSG,,
-8022,Arc 1960 to WGS 84 (1),,DMA-Ken Tza,4210,4326,1,,8422,1996-10-18 00:00:00,,EPSG,,
-8023,Batavia to WGS 84 (1),,DMA-Idn Sumatra,4211,4326,1,,8423,1996-10-18 00:00:00,,EPSG,,
-8024,Bermuda 1957 to WGS 84 (1),,DMA-Bmu,4216,4326,1,,8424,1996-10-18 00:00:00,,EPSG,,
-8025,Bogota to WGS 84 (1),,DMA-Col,4218,4326,1,,8425,1996-10-18 00:00:00,,EPSG,,
-8026,Bukit Rimpah to WGS 84 (1),,DMA-Idn Beli,4219,4326,1,,8426,1996-10-18 00:00:00,,EPSG,,
-8027,Campo Inchauspe to WGS 84 (1),,DMA-Arg,4221,4326,1,,8427,1996-10-18 00:00:00,,EPSG,,
-8028,Cape to WGS 84 (1),,DMA-Zaf,4222,4326,1,,8428,1996-10-18 00:00:00,,EPSG,,
-8029,Cape to WGS 84 (2),,DSLI-Zaf,4222,4326,2,,8429,1996-10-18 00:00:00,,EPSG,,
-8030,Carthage to WGS 84 (1),,DMA-Tun,4223,4326,1,,8430,1996-10-18 00:00:00,,EPSG,,
-8031,Chua to WGS 84 (1),,DMA-Pry,4224,4326,1,,8431,1996-10-18 00:00:00,,EPSG,,
-8032,Corrego Alegre to WGS 84 (1),,DMA-Bra,4225,4326,1,,8432,1996-10-18 00:00:00,,EPSG,,
-8033,ED50 to WGS 84 (1),,DMA-mean,4230,4326,1,,8433,1996-10-18 00:00:00,,EPSG,,
-8034,ED50 to WGS 84 (2),,DMA-cenEur,4230,4326,2,,8434,1996-10-18 00:00:00,,EPSG,,
-8035,ED50 to WGS 84 (3),,DMA-midEast,4230,4326,3,,8435,1996-10-18 00:00:00,,EPSG,,
-8036,ED50 to WGS 84 (4),,DMA-Cyp,4230,4326,4,,8436,1996-10-18 00:00:00,,EPSG,,
-8037,ED50 to WGS 84 (5),,DMA-Egy,4230,4326,5,,8437,1996-10-18 00:00:00,,EPSG,,
-8038,ED50 to WGS 84 (6),,DMA-Irl Gbr,4230,4326,6,,8438,1996-10-18 00:00:00,,EPSG,,
-8039,ED50 to WGS 84 (7),,DMA-Fin Nor,4230,4326,7,,8439,1996-10-18 00:00:00,,EPSG,,
-8040,ED50 to WGS 84 (8),,DMA-Grc,4230,4326,8,,8440,1996-10-18 00:00:00,,EPSG,,
-8041,ED50 to WGS 84 (9),,DMA-Irn,4230,4326,9,,8441,1996-10-18 00:00:00,,EPSG,,
-8042,ED50 to WGS 84 (10),,DMA-Ita Sard,4230,4326,10,,8442,1996-10-18 00:00:00,,EPSG,,
-8043,ED50 to WGS 84 (11),,DMA-Ita Sic,4230,4326,11,,8443,1996-10-18 00:00:00,,EPSG,,
-8044,ED50 to WGS 84 (12),,DMA-Mlt,4230,4326,12,,8444,1996-10-18 00:00:00,,EPSG,,
-8045,ED50 to WGS 84 (13),,DMA-Prt Esp,4230,4326,13,,8445,1996-10-18 00:00:00,,EPSG,,
-8046,ED50 to WGS 84 (14),,6Nat-NSea,4230,4326,14,Denmark - North Sea;  Germany - North Sea;  Netherlands - offshore;  Norway - North Sea south of 62 deg N; United Kingdom (UKCS) - North Sea south of 62 deg N.,8446,1996-10-18 00:00:00,,EPSG,,
-8047,ED50 to WGS 84 (15),,NMA-Nor N65,4230,4326,15,Norway - offshore north of 65 deg N.,8447,1996-10-18 00:00:00,,EPSG,The concatenation of transformations 1147 and 1146 gives the following position vector tfm: dX=-84.491  dY=-100.559  dZ=-114.209 metres rX= -2.4006  rY=-0.5367  rZ=-2.3742 microradians  dS=+0.2947 ppm.,
-8048,Egypt 1907 to WGS 84 (1),,DMA-Egy,4229,4326,1,,8448,1996-10-18 00:00:00,,EPSG,,
-8049,ETRF89 to WGS 84 (1),,EPSG-eur,4258,4326,1,,8449,1997-06-19 00:00:00,,EPSG,,97.24
-8050,GDA94 to WGS 84 (1),,EPSG-Aus,4283,4326,1,,8450,1996-10-18 00:00:00,,EPSG,,
-8051,GD49 to WGS 84 (1),,DMA-Nzl,4272,4326,1,,8451,1996-10-18 00:00:00,,EPSG,,
-8052,Hu Tzu Shan to WGS 84 (1),,DMA-Twn,4236,4326,1,,8452,1996-10-18 00:00:00,,EPSG,,
-8053,Indian 1954 to WGS 84 (1),,DMA-Tha,4239,4326,1,,8453,1996-10-18 00:00:00,,EPSG,,
-8054,Indian 1975 to WGS 84 (1),,DMA-Tha,4240,4326,1,,8454,1996-10-18 00:00:00,,EPSG,,
-8055,Kalianpur 1937 to WGS 84 (1),,DMA-Bgd,4144,4326,1,,8455,1999-10-20 00:00:00,,EPSG,,97.235
-8056,Kalianpur 1975 to WGS 84 (1),,DMA-Ind Npl,4146,4326,1,,8456,1999-10-20 00:00:00,,EPSG,,97.235
-8057,Kandawala to WGS 84 (1),,DMA-Lka,4244,4326,1,,8457,1996-10-18 00:00:00,,EPSG,,
-8058,Kertau to WGS 84 (1),,DMA-Mys Sgp,4245,4326,1,,8458,1996-10-18 00:00:00,,EPSG,,
-8059,Leigon to WGS 84 (1),,DMA-Gha,4250,4326,1,,8459,1996-10-18 00:00:00,,EPSG,,
-8060,Liberia 1964 to WGS 84 (1),,DMA-Lbr,4251,4326,1,,8460,1996-10-18 00:00:00,,EPSG,,
-8061,Luzon 1911 to WGS 84 (1),,DMA-Phl N,4253,4326,1,,8461,1996-10-18 00:00:00,,EPSG,,
-8062,Luzon 1911 to WGS 84 (2),,DMA-Phl Min,4253,4326,2,,8462,1996-10-18 00:00:00,,EPSG,,
-8063,M'poraloko to WGS 84 (1),,DMA-Gab,4266,4326,1,,8463,1996-10-18 00:00:00,,EPSG,,
-8064,Mahe 1971 to WGS 84 (1),,DMA-Syc,4256,4326,1,,8464,1996-10-18 00:00:00,,EPSG,,
-8065,Massawa to WGS 84 (1),,DMA-Eth,4262,4326,1,,8465,1996-10-18 00:00:00,,EPSG,,
-8066,Merchich to WGS 84 (1),,DMA-Mar,4261,4326,1,,8466,1996-10-18 00:00:00,,EPSG,,
-8067,Minna to WGS 84 (1),,DMA-Cmr,4263,4326,1,,8467,1996-10-18 00:00:00,,EPSG,,
-8068,Minna to WGS 84 (2),,DMA-Nga,4263,4326,2,,8468,1996-10-18 00:00:00,,EPSG,,
-8069,Monte Mario to WGS 84 (1),,DMA-Ita Sar,4265,4326,1,,8469,1996-10-18 00:00:00,,EPSG,,
-8070,NAD27 to WGS 84 (1),,DMA-Carib,4267,4326,1,,8470,1996-10-18 00:00:00,,EPSG,,
-8071,NAD27 to WGS 84 (2),,DMA-Cen Am,4267,4326,2,,8471,1996-10-18 00:00:00,,EPSG,,
-8072,NAD27 to WGS 84 (3),,DMA-Can,4267,4326,3,,8472,1996-10-18 00:00:00,,EPSG,,
-8073,NAD27 to WGS 84 (4),,DMA-Conus,4267,4326,4,,8473,1996-10-18 00:00:00,,EPSG,,
-8074,NAD27 to WGS 84 (5),,DMA-ConusE,4267,4326,5,,8474,1996-10-18 00:00:00,,EPSG,,
-8075,NAD27 to WGS 84 (6),,DMA-ConusW,4267,4326,6,,8475,1996-10-18 00:00:00,,EPSG,,
-8076,NAD27 to WGS 84 (7),,DMA-USA AK,4267,4326,7,,8476,1996-10-18 00:00:00,,EPSG,,
-8077,NAD27 to WGS 84 (8),,DMA-Bha xSalv,4267,4326,8,,8477,1996-10-18 00:00:00,,EPSG,,
-8078,NAD27 to WGS 84 (9),,DMA-Bha Salv,4267,4326,9,,8478,1996-10-18 00:00:00,,EPSG,,
-8079,NAD27 to WGS 84 (10),,DMA-Can AB BC,4267,4326,10,,8479,1996-10-18 00:00:00,,EPSG,,
-8080,NAD27 to WGS 84 (11),,DMA-Can MN ON,4267,4326,11,,8480,1996-10-18 00:00:00,,EPSG,,
-8081,NAD27 to WGS 84 (12),,DMA-Can E,4267,4326,12,,8481,1996-10-18 00:00:00,,EPSG,,
-8082,NAD27 to WGS 84 (13),,DMA-Can NWT,4267,4326,13,,8482,1996-10-18 00:00:00,,EPSG,,
-8083,NAD27 to WGS 84 (14),,DMA-Can Yuk,4267,4326,14,,8483,1996-10-18 00:00:00,,EPSG,,
-8084,NAD27 to WGS 84 (15),,DMA-Pan,4267,4326,15,,8484,1996-10-18 00:00:00,,EPSG,,
-8085,NAD27 to WGS 84 (16),,DMA-Cuba,4267,4326,16,,8485,1996-10-18 00:00:00,,EPSG,,
-8086,NAD27 to WGS 84 (17),,DMA-Grl,4267,4326,17,,8486,1996-10-18 00:00:00,,EPSG,,
-8087,NAD27 to WGS 84 (18),,DMA-Mex,4267,4326,18,,8487,1996-10-18 00:00:00,,EPSG,,
-8088,NAD83 to WGS 84 (1),,DMA-N Am,4269,4326,1,,8488,1996-10-18 00:00:00,,EPSG,,
-8089,Nahrwan 1967 to WGS 84 (1),,DMA-Omn Mas,4270,4326,1,,8489,1996-10-18 00:00:00,,EPSG,,
-8090,Nahrwan 1967 to WGS 84 (2),,DMA-Sau,4270,4326,2,,8490,1996-10-18 00:00:00,,EPSG,,
-8091,Nahrwan 1967 to WGS 84 (3),,DMA-UAE,4270,4326,3,,8491,1996-10-18 00:00:00,,EPSG,,
-8092,Naparima 1972 to WGS 84 (1),,DMA-Tto,4271,4326,1,,8492,1998-06-30 00:00:00,,EPSG,,98.102
-8093,NTF to WGS 84 (1),,IGN-Fra,4275,4326,1,,8493,1996-10-18 00:00:00,,EPSG,,
-8094,NTF (Paris) to WGS 84 (1),,EPSG-Fra,4807,4326,1,France..,8494,1996-10-18 00:00:00,,EPSG,,
-8095,OSGB 1936 to WGS 84 (1),,DMA-Gbr,4277,4326,1,,8495,1996-10-18 00:00:00,,EPSG,,
-8096,OSGB 1936 to WGS 84 (2),,DMA-Gbr Eng,4277,4326,2,,8496,1996-10-18 00:00:00,,EPSG,,
-8097,OSGB 1936 to WGS 84 (3),,DMA-Gbr E&W,4277,4326,3,,8497,1996-10-18 00:00:00,,EPSG,,
-8098,OSGB 1936 to WGS 84 (4),,DMA-Gbr Sco,4277,4326,4,,8498,1996-10-18 00:00:00,,EPSG,,
-8099,OSGB 1936 to WGS 84 (5),,DMA-Gbr Wal,4277,4326,5,,8499,1996-10-18 00:00:00,,EPSG,,
-8100,Pointe Noire to WGS 84 (1),,DMA-Cog,4282,4326,1,,8500,1996-10-18 00:00:00,,EPSG,,
-8101,PSAD56 to WGS 84 (1),,DMA-mean,4248,4326,1,,8501,1996-10-18 00:00:00,,EPSG,,
-8102,PSAD56 to WGS 84 (2),,DMA-Bol,4248,4326,2,,8502,1996-10-18 00:00:00,,EPSG,,
-8103,PSAD56 to WGS 84 (3),,DMA-Chl N,4248,4326,3,,8503,1996-10-18 00:00:00,,EPSG,,
-8104,PSAD56 to WGS 84 (4),,DMA Chl S,4248,4326,4,,8504,1996-10-18 00:00:00,,EPSG,,
-8105,PSAD56 to WGS 84 (5),,DMA-Col,4248,4326,5,,8505,1996-10-18 00:00:00,,EPSG,,
-8106,PSAD56 to WGS 84 (6),,DMA-Ecu,4248,4326,6,,8506,1996-10-18 00:00:00,,EPSG,,
-8107,PSAD56 to WGS 84 (7),,DMA-Guy,4248,4326,7,,8507,1996-10-18 00:00:00,,EPSG,,
-8108,PSAD56 to WGS 84 (8),,DMA-Per,4248,4326,8,,8508,1996-10-18 00:00:00,,EPSG,,
-8109,PSAD56 to WGS 84 (9),,DMA-Ven,4248,4326,9,,8509,1996-10-18 00:00:00,,EPSG,,
-8110,Qatar to WGS 84 (1),,DMA-Qat,4285,4326,1,,8510,1996-10-18 00:00:00,,EPSG,,
-8111,Qornoq to WGS 84 (1),,DMA-Grl S,4287,4326,1,,8511,1996-10-18 00:00:00,,EPSG,,
-8112,SAD69 to WGS 84 (1),,DMA-mean,4291,4326,1,,8512,1996-10-18 00:00:00,,EPSG,,
-8113,SAD69 to WGS 84 (2),,DMA-Arg,4291,4326,2,,8513,1996-10-18 00:00:00,,EPSG,,
-8114,SAD69 to WGS 84 (3),,DMA-Bol,4291,4326,3,,8514,1996-10-18 00:00:00,,EPSG,,
-8115,SAD69 to WGS 84 (4),,DMA-Bra,4291,4326,4,,8515,1996-10-18 00:00:00,,EPSG,,
-8116,SAD69 to WGS 84 (5),,DMA-Chile,4291,4326,5,,8516,1996-10-18 00:00:00,,EPSG,,
-8117,SAD69 to WGS 84 (6),,DMA-Col,4291,4326,6,,8517,1996-10-18 00:00:00,,EPSG,,
-8118,SAD69 to WGS 84 (7),,DMA-Ecu,4291,4326,7,,8518,1996-10-18 00:00:00,,EPSG,,
-8119,SAD69 to WGS 84 (8),,DMA-Ecu Gal,4291,4326,8,,8519,1996-10-18 00:00:00,,EPSG,,
-8120,SAD69 to WGS 84 (9),,DMA-Guyana,4291,4326,9,,8520,1996-10-18 00:00:00,,EPSG,,
-8121,SAD69 to WGS 84 (10),,DMA-Pgy,4291,4326,10,,8521,1996-10-18 00:00:00,,EPSG,,
-8122,SAD69 to WGS 84 (11),,DMA-Peru,4291,4326,11,,8522,1996-10-18 00:00:00,,EPSG,,
-8123,SAD69 to WGS 84 (12),,DMA-Tto,4291,4326,12,,8523,1996-10-18 00:00:00,,EPSG,,
-8124,SAD69 to WGS 84 (13),,DMA-Ven,4291,4326,13,,8524,1996-10-18 00:00:00,,EPSG,,
-8125,Sapper Hill 1943 to WGS 84 (1),,DMA-Flk E,4292,4326,1,,8525,1996-10-18 00:00:00,,EPSG,,
-8126,Schwarzeck to WGS 84 (1),,DMA-Nam,4293,4326,1,,8526,1996-10-18 00:00:00,,EPSG,,
-8127,Tananarive to WGS 84 (1),,DMA-Mdg,4297,4326,1,,8527,1996-10-18 00:00:00,,EPSG,,
-8128,Timbalai 1948 to WGS 84 (1),,DMA-Borneo,4298,4326,1,,8528,1996-10-18 00:00:00,,EPSG,,
-8129,TM65 to WGS 84 (1),,DMA-Ire,4299,4326,1,,8529,1996-10-18 00:00:00,,EPSG,,
-8130,Tokyo to WGS 84 (1),,DMA-Jpn Kor,4301,4326,1,,8530,1996-10-18 00:00:00,,EPSG,,
-8131,Tokyo to WGS 84 (2),,DMA-Jpn,4301,4326,2,,8531,1996-10-18 00:00:00,,EPSG,,
-8132,Tokyo to WGS 84 (3),,DMA-Kor,4301,4326,3,,8532,1996-10-18 00:00:00,,EPSG,,
-8133,Tokyo to WGS 84 (4),,DMA-Jpn Ok,4301,4326,4,,8533,1996-10-18 00:00:00,,EPSG,,
-8134,Yacare to WGS 84 (1),,DMA-Ury,4309,4326,1,,8534,1996-10-18 00:00:00,,EPSG,,
-8135,Zanderij to WGS 84 (1),,DMA-Sur,4311,4326,1,,8535,1996-10-18 00:00:00,,EPSG,,
-8136,ED50 to ED87 (1),,6Nat-NSea,4230,4231,1,,8536,1996-10-18 00:00:00,,EPSG,,
-8137,ED87 to WGS 84 (1),,6Nat-NSea,4231,4326,1,,8537,1996-10-18 00:00:00,,EPSG,,
-8138,ED50 to ED87 (2),,NMA-Nor N65,4230,4231,2,,8538,1996-10-18 00:00:00,,EPSG,,
-8139,AGD84 to WGS 84 (2),,Auslig-Aus old,4203,4326,2,,8539,1996-12-12 00:00:00,,EPSG,,
-8140,WGS 72 to WGS 84 (1),,DMA,4322,4326,1,,8540,1996-12-12 00:00:00,,EPSG,,
-8141,WGS 72 to WGS 84 (2),,,4322,4326,2,,8541,1996-12-12 00:00:00,,EPSG,,
-8142,WGS 72BE to WGS 72 (1),,,4324,4322,1,,8542,1996-12-12 00:00:00,,EPSG,,
-8143,WGS 72BE to WGS 84 (1),,,4324,4326,1,,8543,1996-12-12 00:00:00,,EPSG,,
-8144,NAD27 to NAD83 (1),,NGS-Conus,4267,4269,1,,8544,1996-12-12 00:00:00,,EPSG,,
-8146,NAD27 to NAD83 (2),,NGS-Usa AK,4267,4269,2,,8546,1996-12-12 00:00:00,,EPSG,,
-8148,ED50 to WGS 84 (16),,DMA-Tun,4230,4326,16,,8548,1997-06-12 00:00:00,,EPSG,,
-8149,Herat North to WGS 84 (1),,DMA-Afg,4255,4326,1,,8549,1997-06-12 00:00:00,,EPSG,,
-8150,Kalianpur 1962 to WGS 84 (1),,DMA-Pak,4145,4326,1,,8550,1999-10-20 00:00:00,,EPSG,,97.235
-8151,ID74 to WGS 84 (1),,DMA-Idn,4238,4326,1,,8551,1997-06-12 00:00:00,,EPSG,,
-8152,NAD27 to WGS 84 (21),,DMA-AK AluE,4267,4326,21,,8552,1997-04-11 00:00:00,,EPSG,,
-8153,NAD27 to WGS 84 (22),,DMA-AK AluW,4267,4326,22,,8553,1997-04-11 00:00:00,,EPSG,,
-8154,NAD83 to WGS 84 (2),,DMA-AK Alu,4269,4326,2,,8554,1997-04-11 00:00:00,,EPSG,,
-8155,NAD83 to WGS 84 (3),,DMA-USA Hi,4269,4326,3,,8555,1997-04-11 00:00:00,,EPSG,,
-8156,Nord Sahara 1959 to WGS 84 (1),,DMA-Alg,4307,4326,1,,8556,1997-04-11 00:00:00,,EPSG,,
-8157,Pulkovo 1942 to WGS 84 (1),,DMA-Rus,4284,4326,1,,8557,1997-04-11 00:00:00,,EPSG,,
-8158,Voirol Unifie to WGS 84 (1),,DMA-Alg N,4305,4326,1,,8558,1997-04-11 00:00:00,,EPSG,,98.15
-8159,Fahud to WGS 84 (1),,DMA-Omn,4232,4326,1,,8559,1997-04-11 00:00:00,,EPSG,,
-8160,NTF (Paris) to NTF (1),,IGN-Fra,4807,4275,1,,8560,1997-04-11 00:00:00,,EPSG,,
-8161,Bern 1898 (Bern) to Bern 1898 (1),,BfL-CH,4801,4217,1,,8561,1997-04-11 00:00:00,,EPSG,,
-8162,Bogota (Bogota) to Bogota (1),,IGAC-Col,4802,4218,1,,8562,1997-04-11 00:00:00,,EPSG,,
-8163,Lisbon (Lisbon) to Lisbon (1),,IGC-Prt,4803,4207,1,,8564,1997-04-11 00:00:00,,EPSG,,
-8164,Makassar (Jakarta) to Makassar (1),,EPSG-Idn Sulawesi,4804,4257,1,,8565,1997-04-11 00:00:00,,EPSG,,
-8165,MGI (Ferro) to MGI (1),,BEV-Aut balk,4805,4312,1,,8566,1997-04-11 00:00:00,,EPSG,,
-8166,Monte Mario (Rome) to Monte Mario (1),,EPSG-Ita,4806,4265,1,,8567,1997-04-11 00:00:00,,EPSG,,
-8167,Padang (Jakarta) to Padang (1),,EPSG-Idn Sumatra,4808,4280,1,,8569,1997-04-11 00:00:00,,EPSG,,
-8168,Belge 1950 (Brussels) to Belge 1950 (1),,IGN-Bel,4809,4215,1,,8570,1997-04-11 00:00:00,,EPSG,,
-8169,Tananarive (Paris) to Tananarive (1),,EPSG-Mdg,4810,4297,1,,8571,1997-04-11 00:00:00,,EPSG,,
-8170,Voirol 1875 (Paris) to Voirol 1875 (1),,IGN-Dza,4811,4304,1,,8573,1997-04-11 00:00:00,,EPSG,,
-8171,Voirol Unifie (Paris) to Voirol Unifie(1,,IGN-Dza,4812,4305,1,,8574,1997-04-11 00:00:00,,EPSG,,
-8172,Batavia (Jakarta) to Batavia (1),,EPSG-Idn Java,4813,4211,1,,8576,1997-04-11 00:00:00,,EPSG,,
-8173,RT38 (Stockholm) to RT38 (1),,NLS-Swe,4814,4308,1,,8578,1997-04-11 00:00:00,,EPSG,,
-8174,Bogota (Bogota) to WGS 84 (1),,EPSG-Col,4802,4326,1,Colombia.,8563,1997-04-11 00:00:00,,EPSG,,
-8175,Monte Mario (Rome) to WGS 84 (1),,EPSG-Ita,4806,4326,1,Italy (Sardinia).,8568,1997-04-11 00:00:00,,EPSG,,
-8176,Tananarive (Paris) to WGS 84 (1),,EPSG-Mdg,4810,4326,1,Madagascar.,8572,1997-04-11 00:00:00,,EPSG,,
-8177,Voirol Unifie (Paris) to WGS 84 (1),,EPSG-Dza N,4812,4326,1,Algeria - north of 35g (31 deg 30 min) North,8575,1997-04-11 00:00:00,,EPSG,,
-8178,Batavia (Jakarta) to WGS 84 (1),,EPSG-Idn Sumatra,4813,4326,1,Indonesia (Sumatra).,8577,1997-04-11 00:00:00,,EPSG,,
-8179,Greek (Athens) to Greek (1),,NTU-Grc,4815,4120,1,,8579,1998-12-14 00:00:00,,EPSG,,98.52
-8180,Schwarzeck to WGS 84 (2),,SLI-Nam,4293,4326,2,,8580,1998-11-19 00:00:00,,EPSG,,98.46
-8181,GGRS87 to WGS 84 (1),,Hel-Grc,4121,4326,1,,8581,1997-06-16 00:00:00,,EPSG,,
-8182,HD72 to ETRF89 (1),,ELTE-Hun,4237,4258,1,,8582,1997-11-13 00:00:00,,EPSG,,97.47
-8183,HD72 to WGS 84 (1),,EPSG-Hun,4237,4326,1,Hungary.,8583,1997-07-22 00:00:00,,EPSG,For many purposes ETRF89 can be assumed to be coincident with WGS 84.,
-8184,ED50 to WGS 84 (17),,IGN-Fra,4230,4326,17,,8584,1997-11-13 00:00:00,,EPSG,,
-8185,NTF to ED50 (1),,IGN-Fra,4275,4230,1,,8585,1997-11-13 00:00:00,,EPSG,,
-8186,NTF (Paris) to ED50 (1),,EPSG-Fra,4807,4230,1,France,8586,1997-11-13 00:00:00,,EPSG,,
-8187,NTF to WGS 72 (1),,IGN-Fra,4275,4322,1,,8587,1997-11-13 00:00:00,,EPSG,,
-8188,NTF (Paris) to WGS 72 (1),,EPSG-Fra,4807,4322,1,France.,8588,1997-11-13 00:00:00,,EPSG,,
-8189,AGD66 to GDA94 (1),,Auslig-Aus 5m,4202,4283,1,,8589,1997-11-13 00:00:00,,EPSG,,
-8190,AGD66 to WGS 84 (2),,EPSG-Aus 5m,4202,4326,2,Australia..,8590,1998-12-16 00:00:00,,EPSG,For many purposes GDA94 can be assumed to be coincident with WGS 84.,98.50
-8191,AGD84 to GDA94 (1),,Auslig-Aus 5m,4203,4283,1,,8591,1997-11-13 00:00:00,,EPSG,,
-8192,AGD84 to WGS 84 (3),,EPSG-Aus 5m,4203,4326,3,Australia,8592,1998-12-16 00:00:00,,EPSG,For many purposes GDA94 can be assumed to be coincident with WGS 84.,98.50
-8193,AGD84 to GDA94 (2),,Auslig-Aus 1m,4203,4283,2,,8593,1997-11-13 00:00:00,,EPSG,,
-8194,AGD84 to WGS 84 (4),,EPSG-Aus 1m,4203,4326,4,Australia.,8594,1998-12-16 00:00:00,,EPSG,For many purposes GDA94 can be assumed to be coincident with WGS 84.,98.50
-8195,RT90 to WGS 84 (1),,EPSG-Swe,4124,4326,1,Sweden.,8595,1999-04-22 00:00:00,,EPSG,For many purposes ETRF89 can be assumed to be coincident with WGS 84.,99.11
-8196,Samboja to WGS 84 (1),,TOT-Idn Mah,4125,4326,1,,8596,1997-11-13 00:00:00,,EPSG,,
-8197,Pulkovo 1942 to LKS94 (1),,HNIT-Ltu,4284,4126,1,,8597,1998-03-12 00:00:00,,EPSG,,
-8198,LKS94 to WGS 84 (1),,HNIT-Ltu,4126,4326,1,,8598,1998-04-16 00:00:00,,EPSG,For many purposes LKS94 can be assumed to be coincident with WGS 84.,98.13
-8199,Pulkovo 1942 to WGS 84 (2),,EPSG-Ltu,4284,4326,2,Lithuania.,8609,1998-03-12 00:00:00,,EPSG,For many purposes LKS94 can be assumed to be coincident with WGS 84.,
-8200,Pulkovo 1942 to WGS 84 (3),,NIMA-Hun,4284,4326,3,,8602,1998-03-12 00:00:00,,EPSG,,
-8201,Pulkovo 1942 to WGS 84 (4),,NIMA-Pol,4284,4326,4,,8603,1998-03-12 00:00:00,,EPSG,,
-8202,Pulkovo 1942 to WGS 84 (5),,NIMA-Cze,4284,4326,5,,8604,1998-03-12 00:00:00,,EPSG,,
-8203,Pulkovo 1942 to WGS 84 (6),,NIMA-Lva,4284,4326,6,,8605,1998-03-12 00:00:00,,EPSG,,
-8204,Pulkovo 1942 to WGS 84 (7),,NIMA-Kaz,4284,4326,7,,8606,1998-03-12 00:00:00,,EPSG,,
-8205,Pulkovo 1942 to WGS 84 (8),,NIMA-Alb,4284,4326,8,,8607,1998-03-12 00:00:00,,EPSG,,
-8206,Pulkovo 1942 to WGS 84 (9),,NIMA-Rom,4284,4326,9,,8608,1998-03-12 00:00:00,,EPSG,,
-8207,Arc 1960 to WGS 84 (2),,NIMA-Ken,4210,4326,2,,8599,1998-03-12 00:00:00,,EPSG,,
-8208,Arc 1960 to WGS 84 (3),,NIMA-Tza,4210,4326,3,,8600,1998-03-12 00:00:00,,EPSG,,
-8209,Segora to WGS 84 (1),,NIMA-Idn Kal,4294,4326,1,,8601,1998-03-12 00:00:00,,EPSG,,
-8210,Voirol 1875 to WGS 84 (1),,NIMA-Dza N,4304,4326,1,,8610,1998-03-12 00:00:00,,EPSG,,
-8211,Voirol 1875 (Paris) to WGS 84 (1),,EPSG-Dza N,4811,4326,1,Algeria - north of 35g (31 deg 30 min) North.,8611,1998-03-12 00:00:00,,EPSG,,
-8212,Naparima 1972 to WGS 84 (2),,MEEI-Tto,4271,4326,2,,8612,1998-04-16 00:00:00,,EPSG,,
-8213,Trinidad 1903 to WGS 84 (1),,MEEI-Trin,4302,4326,1,,8613,1998-04-16 00:00:00,,EPSG,,
-8214,Tete to Moznet (1),,DNGC-Moz,4127,4130,1,,8614,1998-04-16 00:00:00,,EPSG,,
-8215,Tete to WGS 84 (1),,EPSG-Moz,4127,4326,1,Mozambique - average for whole country.,8615,1998-04-16 00:00:00,,EPSG,For many purposes Moznet can be assumed to be coincident with WGS 84.,
-8216,Tete to Moznet (2),,DNGC-Moz A,4127,4130,2,,8616,1998-04-16 00:00:00,,EPSG,,
-8217,Tete to WGS 84 (2),,EPSG-Moz A,4127,4326,2,Mozambique - Maputo province and southern part of Gaza province; i.e. south of approximately 24 deg S.,8617,1998-04-16 00:00:00,,EPSG,For many purposes Moznet can be assumed to be coincident with WGS 84.,
-8218,Tete to Moznet (3),,DNGC-Moz B,4127,4130,3,,8618,1998-04-16 00:00:00,,EPSG,,
-8219,Tete to WGS 84 (3),,EPSG-Moz B,4127,4326,3,Mozambique - provinces of Gaza; Inhambane and southern parts of Sofala and Manhica; i.e. between approximately 24 and 20 deg South.,8619,1998-04-16 00:00:00,,EPSG,For many purposes Moznet can be assumed to be coincident with WGS 84.,
-8220,Tete to Moznet (4),,DNGC-Moz C,4127,4130,4,,8620,1998-04-16 00:00:00,,EPSG,,
-8221,Tete to WGS 84 (4),,EPSG-Moz C,4127,4326,4,Mozambique - provinces of Sofala north of Beira corridor; Manhica; Tete and Zambezia; i.e. between approximately 20 and 16 deg South.,8621,1998-04-16 00:00:00,,EPSG,For many purposes Moznet can be assumed to be coincident with WGS 84.,
-8222,Tete to Moznet (5),,DNGC-Moz D,4127,4130,5,,8622,1998-04-16 00:00:00,,EPSG,,
-8223,Tete to WGS 84 (5),,EPSG-Moz D,4127,4326,5,Mozambique - provinces of Nampula; Niassa; Cabo Delgado; i.e. north of approximately 16 deg S.,8623,1998-04-16 00:00:00,,EPSG,For many purposes Moznet can be assumed to be coincident with WGS 84.,
-8224,Moznet to WGS 84 (1),,EPSG-Moz,4130,4326,1,,8624,1998-04-16 00:00:00,,EPSG,,
-8225,Pulkovo 1942 to WGS 84 (10),,KCS-Kaz Cas,4284,4326,10,,8625,1998-04-16 00:00:00,,EPSG,,
-8226,Indian 1975 to WGS 84 (2),,NIMA-Tha,4240,4326,2,,8626,1998-04-16 00:00:00,,EPSG,,
-8227,Tokyo to WGS 84 (5),,NIMA-Kor,4301,4326,5,,8627,1998-11-19 00:00:00,,EPSG,,98.46
-8228,MGI to WGS 84 (1),,NIMA-balk,4312,4326,1,,8628,1998-04-16 00:00:00,,EPSG,,
-8229,Naparima 1972 to WGS 84 (3),,NIMA-Tto,4271,4326,3,,8629,1998-04-16 00:00:00,,EPSG,,
-8233,DHDN to ETRF89 (1),,IfAG-Deu W,4314,4258,1,,8633,1998-06-30 00:00:00,,EPSG,,
-8234,DHDN to WGS 84 (1),,EPSG-Deu W,4314,4326,1,Germany - former west Germany.,8634,1998-06-30 00:00:00,EPSG,EPSG,For many purposes ETRF89 can be assumed to be coincident with WGS 84.,
-8235,Pulkovo 1942 to ETRF89 (1),,IfAG-Deu E,4284,4258,1,,8635,1998-06-30 00:00:00,,EPSG,,
-8236,Pulkovo 1942 to WGS 84 (11),,EPSG-Deu E,4284,4326,11,Germany - former east Germany - Brandenburg; Mecklenburg-Vorpommern; Sachsen-Anhalt.,8636,1998-06-30 00:00:00,,EPSG,For many purposes ETRF89 can be assumed to be coincident with WGS 84.,
-8237,ED50 to WGS 84 (Common Offshore),,UKOOA-CO,4230,4326,18,,8637,1998-06-30 00:00:00,,EPSG,,98.27
-8238,Madrid 1870 (Madrid) to ED50 (1),,IGB-Esp,4903,4230,1,,8638,1998-11-11 00:00:00,,EPSG,,
-8239,Madrid 1870 (Madrid) to ED50 (2),,IGB-Esp N,4903,4230,2,,8639,1998-11-11 00:00:00,,EPSG,,
-8240,Madrid 1870 (Madrid) to ED50 (3),,IGB-Esp S,4903,4230,3,,8640,1998-11-11 00:00:00,,EPSG,,
-8241,Madrid 1870 (Madrid) to WGS 84 (1),,EPSG-Esp,4903,4326,1,Spain.,8641,1998-11-11 00:00:00,,EPSG,,
-8242,NAD27 to NAD83 (3),,GC-Can NT1,4267,4269,3,,8642,1998-11-11 00:00:00,,EPSG,,98.57
-8243,NAD27 to WGS 84 (25),,EPSG-Can old,4267,4326,25,Canada,8643,1998-11-11 00:00:00,,EPSG,For many purposes NAD83 can be assumed to be coincident with WGS 84.,
-8244,NAD27 to NAD83 (4),,GC-Can,4267,4269,4,,8644,1998-11-11 00:00:00,,EPSG,,98.57
-8245,NAD27 to WGS 84 (26),,EPSG-Can,4267,4326,26,Canada.,8645,1998-11-11 00:00:00,,EPSG,For many purposes NAD83 can be assumed to be coincident with WGS 84.,
-8246,OSGB 1936 to WGS 84 (Petroleum),,UKOOA-Pet,4277,4326,6,,8646,1998-11-11 00:00:00,,EPSG,,
-8247,OSGB 1936 to ED50 (UKOOA),,UKOOA-UKCS,4277,4230,1,,8647,1998-11-11 00:00:00,,EPSG,,
-8248,Manoca to WGS 84 (1),,SCS-Cmr,4260,4326,1,,8648,1998-11-11 00:00:00,,EPSG,,
-8249,Camacupa to WGS 72BE (1),,GSI-Ago,4220,4324,1,,8649,1998-11-11 00:00:00,,EPSG,,
-8250,Camacupa to WGS 84 (1),,CON-Ago B5,4220,4326,1,,8650,1998-11-11 00:00:00,,EPSG,,
-8251,Camacupa to WGS 84 (2),,TEX-Ago B2,4220,4326,2,,8651,1998-11-11 00:00:00,,EPSG,,
-8252,Camacupa to WGS 84 (3),,SHL-Ago old,4220,4326,3,,8652,1998-11-11 00:00:00,,EPSG,,
-8253,Camacupa to WGS 84 (4),,GSI-Ago,4220,4326,4,,8653,1998-11-11 00:00:00,,EPSG,,
-8254,Camacupa to WGS 84 (5),,ELF-Ago B3 old,4220,4326,5,,8654,1998-11-11 00:00:00,,EPSG,,
-8255,Camacupa to WGS 84 (6),,ELF-Ago B7 old,4220,4326,6,,8655,1998-11-11 00:00:00,,EPSG,,
-8256,Camacupa to WGS 84 (7),,ELF-Ago B15,4220,4326,7,,8656,1998-11-11 00:00:00,,EPSG,,
-8257,Camacupa to WGS 84 (8),,ELF-Ago B2 old,4220,4326,8,,8657,1998-11-11 00:00:00,,EPSG,,
-8258,Camacupa to WGS 84 (9),,SHL-Ago B16,4220,4326,9,,8658,1998-11-11 00:00:00,,EPSG,,
-8259,Camacupa to WGS 84 (10),,ELF-Ago N,4220,4326,10,,8659,1998-11-11 00:00:00,,EPSG,,
-8260,Malongo 1987 to Mhast (1),,CHV-Ago Cab,4259,4264,1,,8660,1998-11-11 00:00:00,,EPSG,,
-8261,Mhast to WGS 84 (1),,CHV-Ago Cab,4264,4326,1,,8661,1998-11-11 00:00:00,,EPSG,,
-8262,Malongo 1987 to WGS 84 (1),,CHV-Ago Cab,4259,4326,1,,8662,1998-11-11 00:00:00,,EPSG,,
-8263,MGI (Ferro) to WGS 84 (1),,DMA-balk,4805,4326,1,MEAN FOR Boznia and Herzegovina; Croatia; Serbia; Slovenia.,8663,1998-12-14 00:00:00,,EPSG,,
-8264,EST92 to ETRF89 (1),,UT-Est,4133,4258,1,,8664,1998-12-14 00:00:00,,EPSG,,
-8265,Pulkovo 1942 to EST92 (1),,UT-Est,4284,4133,1,,8665,1998-12-14 00:00:00,,EPSG,,
-8266,EST92 to WGS 84 (1),,UT-Est,4133,4326,1,,8666,1998-12-14 00:00:00,,EPSG,,
-8267,Pulkovo 1942 to WGS 84 (12),,UT-Est,4284,4326,12,,8667,1998-12-14 00:00:00,,EPSG,,
-8268,Tokyo to WGS 84 (6),,GSI-Jpn 452141,4301,4326,6,,8668,1998-12-14 00:00:00,,EPSG,,
-8269,Tokyo to WGS 84 (7),,GSI-Jpn 452142,4301,4326,7,,8669,1998-12-14 00:00:00,,EPSG,,
-8270,Tokyo to WGS 84 (8),,GSI-Jpn 444141,4301,4326,8,,8670,1998-12-14 00:00:00,,EPSG,,
-8271,Tokyo to WGS 84 (9),,GSI-Jpn 444142,4301,4326,9,,8671,1998-12-14 00:00:00,,EPSG,,
-8272,Tokyo to WGS 84 (10),,GSI-Jpn 440141,4301,4326,10,,8672,1998-12-14 00:00:00,,EPSG,,
-8273,Tokyo to WGS 84 (11),,GSI-Jpn 440142,4301,4326,11,,8673,1998-12-14 00:00:00,,EPSG,,
-8274,Tokyo to WGS 84 (12),,GSI-Jpn 440143,4301,4326,12,,8674,1998-12-14 00:00:00,,EPSG,,
-8275,Tokyo to WGS 84 (13),,GSI-Jpn 440144,4301,4326,13,,8675,1998-12-14 00:00:00,,EPSG,,
-8276,Tokyo to WGS 84 (14),,GSI-Jpn 432141,4301,4326,14,,8676,1998-12-14 00:00:00,,EPSG,,
-8277,Tokyo to WGS 84 (15),,GSI-Jpn 432142,4301,4326,15,,8677,1998-12-14 00:00:00,,EPSG,,
-8278,Tokyo to WGS 84 (16),,GSI-Jpn 432143,4301,4326,16,,8678,1998-12-14 00:00:00,,EPSG,,
-8279,Tokyo to WGS 84 (17),,GSI-Jpn 432144,4301,4326,17,,8679,1998-12-14 00:00:00,,EPSG,,
-8280,Tokyo to WGS 84 (18),,GSI-Jpn 432145,4301,4326,18,,8680,1998-12-14 00:00:00,,EPSG,,
-8281,Tokyo to WGS 84 (19),,GSI-Jpn 424140,4301,4326,19,,8681,1998-12-14 00:00:00,,EPSG,,
-8282,Tokyo to WGS 84 (20),,GSI-Jpn 424141,4301,4326,20,,8682,1998-12-14 00:00:00,,EPSG,,
-8283,Tokyo to WGS 84 (21),,GSI-Jpn 424142,4301,4326,21,,8683,1998-12-14 00:00:00,,EPSG,,
-8284,Tokyo to WGS 84 (22),,GSI-Jpn 424143,4301,4326,22,,8684,1998-12-14 00:00:00,,EPSG,,
-8285,Tokyo to WGS 84 (23),,GSI-Jpn 424144,4301,4326,23,,8685,1998-12-14 00:00:00,,EPSG,,
-8286,Tokyo to WGS 84 (24),,GSI-Jpn 424145,4301,4326,24,,8686,1998-12-14 00:00:00,,EPSG,,
-8287,Tokyo to WGS 84 (25),,GSI-Jpn 420139,4301,4326,25,,8687,1998-12-14 00:00:00,,EPSG,,
-8288,Tokyo to WGS 84 (26),,GSI-Jpn 420140,4301,4326,26,,8688,1998-12-14 00:00:00,,EPSG,,
-8289,Tokyo to WGS 84 (27),,GSI-Jpn,4301,4326,27,,8689,1998-12-14 00:00:00,,EPSG,,
-8290,Tokyo to WGS 84 (28),,GSI-Jpn,4301,4326,28,,8690,1998-12-14 00:00:00,,EPSG,,
-8291,Tokyo to WGS 84 (29),,GSI-Jpn,4301,4326,29,,8691,1998-12-14 00:00:00,,EPSG,,
-8292,Tokyo to WGS 84 (30),,GSI-Jpn,4301,4326,30,,8692,1998-12-14 00:00:00,,EPSG,,
-8293,Tokyo to WGS 84 (31),,GSI-Jpn,4301,4326,31,,8693,1998-12-14 00:00:00,,EPSG,,
-8294,Tokyo to WGS 84 (32),,GSI-Jpn,4301,4326,32,,8694,1998-12-14 00:00:00,,EPSG,,
-8295,Tokyo to WGS 84 (33),,GSI-Jpn,4301,4326,33,,8695,1998-12-14 00:00:00,,EPSG,,
-8296,Tokyo to WGS 84 (34),,GSI-Jpn,4301,4326,34,,8696,1998-12-14 00:00:00,,EPSG,,
-8297,Tokyo to WGS 84 (35),,GSI-Jpn,4301,4326,35,,8697,1998-12-14 00:00:00,,EPSG,,
-8298,Tokyo to WGS 84 (36),,GSI-Jpn,4301,4326,36,,8698,1998-12-14 00:00:00,,EPSG,,
-8299,Tokyo to WGS 84 (37),,GSI-Jpn,4301,4326,37,,8699,1998-12-14 00:00:00,,EPSG,,
-8300,Tokyo to WGS 84 (38),,GSI-Jpn,4301,4326,38,,8700,1998-12-14 00:00:00,,EPSG,,
-8301,Tokyo to WGS 84 (39),,GSI-Jpn,4301,4326,39,,8701,1998-12-14 00:00:00,,EPSG,,
-8302,Tokyo to WGS 84 (40),,GSI-Jpn,4301,4326,40,,8702,1998-12-14 00:00:00,,EPSG,,
-8303,Tokyo to WGS 84 (41),,GSI-Jpn,4301,4326,41,,8703,1998-12-14 00:00:00,,EPSG,,
-8304,Tokyo to WGS 84 (42),,GSI-Jpn,4301,4326,42,,8704,1998-12-14 00:00:00,,EPSG,,
-8305,Tokyo to WGS 84 (43),,GSI-Jpn,4301,4326,43,,8705,1998-12-14 00:00:00,,EPSG,,
-8306,Tokyo to WGS 84 (44),,GSI-Jpn,4301,4326,44,,8706,1998-12-14 00:00:00,,EPSG,,
-8307,Tokyo to WGS 84 (45),,GSI-Jpn,4301,4326,45,,8707,1998-12-14 00:00:00,,EPSG,,
-8308,Tokyo to WGS 84 (46),,GSI-Jpn,4301,4326,46,,8708,1998-12-14 00:00:00,,EPSG,,
-8309,Tokyo to WGS 84 (47),,GSI-Jpn,4301,4326,47,,8709,1998-12-14 00:00:00,,EPSG,,
-8310,Tokyo to WGS 84 (48),,GSI-Jpn,4301,4326,48,,8710,1998-12-14 00:00:00,,EPSG,,
-8311,Tokyo to WGS 84 (49),,GSI-Jpn,4301,4326,49,,8711,1998-12-14 00:00:00,,EPSG,,
-8312,Tokyo to WGS 84 (50),,GSI-Jpn,4301,4326,50,,8712,1998-12-14 00:00:00,,EPSG,,
-8313,Tokyo to WGS 84 (51),,GSI-Jpn,4301,4326,51,,8713,1998-12-14 00:00:00,,EPSG,,
-8314,Tokyo to WGS 84 (52),,GSI-Jpn,4301,4326,52,,8714,1998-12-14 00:00:00,,EPSG,,
-8315,Tokyo to WGS 84 (53),,GSI-Jpn,4301,4326,53,,8715,1998-12-14 00:00:00,,EPSG,,
-8316,Tokyo to WGS 84 (54),,GSI-Jpn,4301,4326,54,,8716,1998-12-14 00:00:00,,EPSG,,
-8317,Tokyo to WGS 84 (55),,GSI-Jpn,4301,4326,55,,8717,1998-12-14 00:00:00,,EPSG,,
-8318,Tokyo to WGS 84 (56),,GSI-Jpn,4301,4326,56,,8718,1998-12-14 00:00:00,,EPSG,,
-8319,Tokyo to WGS 84 (57),,GSI-Jpn,4301,4326,57,,8719,1998-12-14 00:00:00,,EPSG,,
-8320,Tokyo to WGS 84 (58),,GSI-Jpn,4301,4326,58,,8720,1998-12-14 00:00:00,,EPSG,,
-8321,Tokyo to WGS 84 (59),,GSI-Jpn,4301,4326,59,,8721,1998-12-14 00:00:00,,EPSG,,
-8322,Tokyo to WGS 84 (60),,GSI-Jpn,4301,4326,60,,8722,1998-12-14 00:00:00,,EPSG,,
-8323,Tokyo to WGS 84 (61),,GSI-Jpn,4301,4326,61,,8723,1998-12-14 00:00:00,,EPSG,,
-8324,Tokyo to WGS 84 (62),,GSI-Jpn,4301,4326,62,,8724,1998-12-14 00:00:00,,EPSG,,
-8325,Tokyo to WGS 84 (63),,GSI-Jpn,4301,4326,63,,8725,1998-12-14 00:00:00,,EPSG,,
-8326,Tokyo to WGS 84 (64),,GSI-Jpn,4301,4326,64,,8726,1998-12-14 00:00:00,,EPSG,,
-8327,Tokyo to WGS 84 (65),,GSI-Jpn,4301,4326,65,,8727,1998-12-14 00:00:00,,EPSG,,
-8328,Tokyo to WGS 84 (66),,GSI-Jpn,4301,4326,66,,8728,1998-12-14 00:00:00,,EPSG,,
-8329,Tokyo to WGS 84 (67),,GSI-Jpn,4301,4326,67,,8729,1998-12-14 00:00:00,,EPSG,,
-8330,Tokyo to WGS 84 (68),,GSI-Jpn,4301,4326,68,,8730,1998-12-14 00:00:00,,EPSG,,
-8331,Tokyo to WGS 84 (69),,GSI-Jpn,4301,4326,69,,8731,1998-12-14 00:00:00,,EPSG,,
-8332,Tokyo to WGS 84 (70),,GSI-Jpn,4301,4326,70,,8732,1998-12-14 00:00:00,,EPSG,,
-8333,Tokyo to WGS 84 (71),,GSI-Jpn,4301,4326,71,,8733,1998-12-14 00:00:00,,EPSG,,
-8334,Tokyo to WGS 84 (72),,GSI-Jpn,4301,4326,72,,8734,1998-12-14 00:00:00,,EPSG,,
-8335,Tokyo to WGS 84 (73),,GSI-Jpn,4301,4326,73,,8735,1998-12-14 00:00:00,,EPSG,,
-8336,Tokyo to WGS 84 (74),,GSI-Jpn,4301,4326,74,,8736,1998-12-14 00:00:00,,EPSG,,
-8337,Tokyo to WGS 84 (75),,GSI-Jpn,4301,4326,75,,8737,1998-12-14 00:00:00,,EPSG,,
-8338,Tokyo to WGS 84 (76),,GSI-Jpn,4301,4326,76,,8738,1998-12-14 00:00:00,,EPSG,,
-8339,Tokyo to WGS 84 (77),,GSI-Jpn,4301,4326,77,,8739,1998-12-14 00:00:00,,EPSG,,
-8340,Tokyo to WGS 84 (78),,GSI-Jpn,4301,4326,78,,8740,1998-12-14 00:00:00,,EPSG,,
-8341,Tokyo to WGS 84 (79),,GSI-Jpn,4301,4326,79,,8741,1998-12-14 00:00:00,,EPSG,,
-8342,Tokyo to WGS 84 (80),,GSI-Jpn,4301,4326,80,,8742,1998-12-14 00:00:00,,EPSG,,
-8343,Tokyo to WGS 84 (81),,GSI-Jpn,4301,4326,81,,8743,1998-12-14 00:00:00,,EPSG,,
-8344,Tokyo to WGS 84 (82),,GSI-Jpn,4301,4326,82,,8744,1998-12-14 00:00:00,,EPSG,,
-8345,Tokyo to WGS 84 (83),,GSI-Jpn,4301,4326,83,,8745,1998-12-14 00:00:00,,EPSG,,
-8346,Tokyo to WGS 84 (84),,GSI-Jpn,4301,4326,84,,8746,1998-12-14 00:00:00,,EPSG,,
-8347,Tokyo to WGS 84 (85),,GSI-Jpn,4301,4326,85,,8747,1998-12-14 00:00:00,,EPSG,,
-8348,Tokyo to WGS 84 (86),,GSI-Jpn,4301,4326,86,,8748,1998-12-14 00:00:00,,EPSG,,
-8349,Tokyo to WGS 84 (87),,GSI-Jpn,4301,4326,87,,8749,1998-12-14 00:00:00,,EPSG,,
-8350,Tokyo to WGS 84 (88),,GSI-Jpn,4301,4326,88,,8750,1998-12-14 00:00:00,,EPSG,,
-8351,Tokyo to WGS 84 (89),,GSI-Jpn,4301,4326,89,,8751,1998-12-14 00:00:00,,EPSG,,
-8352,Tokyo to WGS 84 (90),,GSI-Jpn,4301,4326,90,,8752,1998-12-14 00:00:00,,EPSG,,
-8353,Tokyo to WGS 84 (91),,GSI-Jpn,4301,4326,91,,8753,1998-12-14 00:00:00,,EPSG,,
-8354,Tokyo to WGS 84 (92),,GSI-Jpn,4301,4326,92,,8754,1998-12-14 00:00:00,,EPSG,,
-8355,Tokyo to WGS 84 (93),,GSI-Jpn,4301,4326,93,,8755,1998-12-14 00:00:00,,EPSG,,
-8356,Tokyo to WGS 84 (94),,GSI-Jpn,4301,4326,94,,8756,1998-12-14 00:00:00,,EPSG,,
-8357,Tokyo to WGS 84 (95),,GSI-Jpn,4301,4326,95,,8757,1998-12-14 00:00:00,,EPSG,,
-8358,Tokyo to WGS 84 (96),,GSI-Jpn,4301,4326,96,,8758,1998-12-14 00:00:00,,EPSG,,
-8359,Tokyo to WGS 84 (97),,GSI-Jpn,4301,4326,97,,8759,1998-12-14 00:00:00,,EPSG,,
-8360,Tokyo to WGS 84 (98),,GSI-Jpn,4301,4326,98,,8760,1998-12-14 00:00:00,,EPSG,,
-8361,Tokyo to WGS 84 (99),,GSI-Jpn,4301,4326,99,,8761,1998-12-14 00:00:00,,EPSG,,
-8362,Tokyo to WGS 84 (100),,GSI-Jpn 324132,4301,4326,100,,8762,1998-12-14 00:00:00,,EPSG,,
-8363,Tokyo to WGS 84 (101),,GSI-Jpn 324133,4301,4326,101,,8763,1998-12-14 00:00:00,,EPSG,,
-8364,Tokyo to WGS 84 (102),,GSI-Jpn 324134,4301,4326,102,,8764,1998-12-14 00:00:00,,EPSG,,
-8365,Tokyo to WGS 84 (103),,GSI-Jpn 320130,4301,4326,103,,8765,1998-12-14 00:00:00,,EPSG,,
-8366,Tokyo to WGS 84 (104),,GSI-Jpn 320131,4301,4326,104,,8766,1998-12-14 00:00:00,,EPSG,,
-8367,Tokyo to WGS 84 (105),,GSI-Jpn 320132,4301,4326,105,,8767,1998-12-14 00:00:00,,EPSG,,
-8368,Tokyo to WGS 84 (106),,GSI-Jpn 312130,4301,4326,106,,8768,1998-12-14 00:00:00,,EPSG,,
-8369,Tokyo to WGS 84 (107),,GSI-Jpn 312131,4301,4326,107,,8769,1998-12-14 00:00:00,,EPSG,,
-8370,Fahud to WGS 84 (2),,PDO-Omn,4232,4326,2,,8770,1999-04-22 00:00:00,,EPSG,,
-8371,PSD93 to WGS 84 (1),,PDO-Omn,4134,4326,1,,8771,1999-04-22 00:00:00,,EPSG,,
-8372,ED50 to WGS 84 (19),,HEL-Grc,4230,4326,19,,8772,1999-04-22 00:00:00,,EPSG,,
-8373,Antigua 1943 to WGS 84 (1),,DOS-Atg Ant,4601,4326,1,,8773,1999-04-22 00:00:00,,EPSG,,
-8374,Dominica 1945 to WGS 84 (1),,DOS-Dma,4602,4326,1,,8774,1999-04-22 00:00:00,,EPSG,,
-8375,Grenada 1953 to WGS 84 (1),,DOS-Grd,4603,4326,1,,8775,1999-04-22 00:00:00,,EPSG,,
-8376,Montserrat 1958 to WGS 84 (1),,DOS-Msr,4604,4326,1,,8776,1999-04-22 00:00:00,,EPSG,,
-8377,St. Kitts 1955 to WGS 84 (1),,DOS-Kna,4605,4326,1,,8777,1999-04-22 00:00:00,,EPSG,,
-8378,St. Lucia 1955 to WGS 84 (1),,DOS-Lca,4606,4326,1,,8778,1999-04-22 00:00:00,,EPSG,,
-8379,Anguilla 1957 to WGS 84 (1),,DOS-Aia,4600,4326,1,,8779,1999-04-22 00:00:00,,EPSG,,
-8380,RT90 to ETRF89 (1),,NLS-Swe,4124,4258,1,,8780,1999-04-22 00:00:00,,EPSG,,
-8384,ED50 to WGS 84 (20),,NMA-Nor 6265W,4230,4326,20,,8784,1999-04-22 00:00:00,,EPSG,,
-8385,Old Hawaiian to NAD83 (1),,NGS-Usa Hi,4135,4269,1,,8785,1999-05-24 00:00:00,,EPSG,,
-8386,Old Hawaiian to WGS 84 (1),,EPSG-US Hi,4135,4326,1,United States - Hawaii,8786,1999-05-24 00:00:00,,EPSG,For many purposes NAD83 can be assumed to be coincident with WGS 84.,
-8387,St. Lawrence Island to NAD83 (1),,NGS-Usa AK StL,4136,4269,1,,8787,1999-05-24 00:00:00,,EPSG,,
-8388,St. Lawrence Island to WGS 84 (1),,EPSG-US StL,4136,4326,1,United States - Alaska - St. Lawrence Island.,8788,1999-05-24 00:00:00,,EPSG,For many purposes NAD83 can be assumed to be coincident with WGS 84.,
-8389,St. Paul Island to NAD83 (1),,NGS-Usa AK StP,4137,4269,1,,8789,1999-05-24 00:00:00,,EPSG,,
-8390,St. Paul Island to WGS 84 (1),,EPSG-US StP,4137,4326,1,United States - Alaska - St. Paul Island.,8790,1999-05-24 00:00:00,,EPSG,For many purposes NAD83 can be assumed to be coincident with WGS 84.,
-8391,St. George Island to NAD83 (1),,NGS-Usa AK StG,4138,4269,1,,8791,1999-05-24 00:00:00,,EPSG,,
-8392,St. George Island to WGS 84 (1),,EPSG-USA StG,4138,4326,1,United States - Alaska - St. George Island.,8792,1999-05-24 00:00:00,,EPSG,For many purposes NAD83 can be assumed to be coincident with WGS 84.,
-8393,NAD27(CGQ77)  to NAD83 (1),,SGQ-Can QC,4609,4269,1,,8793,1999-05-24 00:00:00,,EPSG,,
-8394,NAD27(CGQ77) to WGS 84 (1),,EPSG-Can Qc,4609,4326,1,Canada - Quebec,8794,1999-05-24 00:00:00,,EPSG,For many purposes NAD83 can be assumed to be coincident with WGS 84.,
-8395,AGD66 to GDA94 (2),,Auslig-ACT 1m,4202,4283,2,,8795,1999-05-24 00:00:00,,EPSG,,
-8396,AGD66 to WGS 84 (3),,EPSG-Aus ACT 1m,4202,4326,3,Australia - ACT.,8796,1999-05-24 00:00:00,,EPSG,For many purposes GDA94 can be assumed to be coincident with WGS 84.,
-8397,AGD66 to GDA94 (3),,Auslig-Tas 1m,4202,4283,3,,8797,1999-05-24 00:00:00,,EPSG,,
-8398,AGD66 to WGS 84 (4),,EPSG-Aus Tas 1m,4202,4326,4,Australia - Tasmania.,8798,1999-05-24 00:00:00,,EPSG,For many purposes GDA94 can be assumed to be coincident with WGS 84.,
-8399,AGD66 to GDA94 (4),,Auslig-NSW Vic,4202,4283,4,,8799,1999-05-24 00:00:00,,EPSG,,
-8400,AGD66 to WGS 84 (5),,EPSG-Aus NSW Vic 1m,4202,4326,5,Australia - New South Wales (NSW) and Victoria.,8800,1999-05-24 00:00:00,,EPSG,For many purposes GDA94 can be assumed to be coincident with WGS 84.,
-8401,Puerto Rico to NAD83 (1),,NGS-PRVI,4139,4269,1,,8801,1999-05-24 00:00:00,,EPSG,,
-8402,Puerto Rico to WGS 84 (1),,EPSG-PRVI,4139,4326,1,Puerto Rico; Virgin Islands (U.S.); Virgin Islands (British).,8802,1999-05-24 00:00:00,,EPSG,For many purposes NAD83 can be assumed to be coincident with WGS 84.,
-8403,NAD27 to NAD83 (5),,SGQ-Can QC,4267,4269,5,,8803,1999-05-24 00:00:00,,EPSG,,
-8404,NAD27 to WGS 84 (27),,EPSG-Can QC,4267,4326,27,Canada - Quebec,8804,1999-05-24 00:00:00,,EPSG,For many purposes NAD83 can be assumed to be coincident with WGS 84.,
-8405,NAD27(76) to NAD83 (1),,SGQ-Can Ont,4608,4269,1,,8805,1999-05-24 00:00:00,,EPSG,,
-8406,NAD27(76) to WGS 84 (1),,EPSG-Can On,4608,4326,1,Canada - Ontario,8806,1999-05-24 00:00:00,,EPSG,For many purposes NAD83 can be assumed to be coincident with WGS 84.,
-8407,AGD66 to GDA94 (5),,OSG-Aus Vic,4202,4283,5,,8807,1999-05-24 00:00:00,,EPSG,,
-8408,AGD66 to WGS 84 (6),,EPSG-Aus Vic 0.1m,4202,4326,6,Australia - Victoria,8808,1999-05-24 00:00:00,,EPSG,For many purposes GDA94 can be assumed to be coincident with WGS 84.,
-8411,NGO 1948 (Oslo) to NGO 1948 (1),,NGO-Nor,4817,4273,1,,8811,1999-10-20 00:00:00,,EPSG,,
-8412,NTF (Paris) to NTF (2),,RGS,4807,4275,2,,8812,1999-10-20 00:00:00,,EPSG,,
-8413,Locodjo 1965 to WGS 84 (1),,IGN-Civ,4142,4326,1,,8813,1999-10-20 00:00:00,,EPSG,,
-8414,Abidjan 1987 to WGS 84 (1),,IGN-Civ,4143,4326,1,,8814,1999-10-20 00:00:00,,EPSG,,
-8415,MGI to WGS 84 (2),,BEV-Aut,4312,4326,1,,8815,1999-10-20 00:00:00,,EPSG,,
-8416,ATS 77 to NAD83(CSRS98) (1),,GIC-Can NB,4122,4140,1,,8816,1999-10-20 00:00:00,,EPSG,,
-8417,NAD83(CSRS98) to WGS 84 (1),,EPSG-Can,4140,4326,1,,8817,1999-10-20 00:00:00,,EPSG,,
-8418,ATS 77 to WGS 84 (1),,EPSG-Can NB,4122,4326,1,Canada - New Brunswick,8818,1999-10-20 00:00:00,EPSG,EPSG,For many purposes NAD83(CSRS) can be assumed to be coincident with WGS 84.,
-8419,NAD83 to NAD83(HARN) (1),,NGS-Usa AL,4269,4152,1,,8819,1999-10-20 00:00:00,,EPSG,,
-8420,NAD83 to NAD83(HARN) (2),,NGS-Usa AZ,4269,4152,2,,8820,1999-10-20 00:00:00,,EPSG,,
-8421,NAD83 to NAD83(HARN) (3),,NGS-Usa CA n,4269,4152,3,,8821,1999-10-20 00:00:00,,EPSG,,
-8422,NAD83 to NAD83(HARN) (4),,NGS-Usa CA s,4269,4152,4,,8822,1999-10-20 00:00:00,,EPSG,,
-8423,NAD83 to NAD83(HARN) (5),,NGS-Usa CO,4269,4152,5,,8823,1999-10-20 00:00:00,,EPSG,,
-8424,NAD83 to NAD83(HARN) (6),,NGS-Usa GA,4269,4152,6,,8824,1999-10-20 00:00:00,,EPSG,,
-8425,NAD83 to NAD83(HARN) (7),,NGS-Usa FL,4269,4152,7,,8825,1999-10-20 00:00:00,,EPSG,,
-8426,NAD83 to NAD83(HARN) (8),,NGS-Usa ID MT e,4269,4152,8,,8826,1999-10-20 00:00:00,,EPSG,,
-8427,NAD83 to NAD83(HARN) (9),,NGS-Usa ID MT w,4269,4152,9,,8827,1999-10-20 00:00:00,,EPSG,,
-8428,NAD83 to NAD83(HARN) (10),,NGS-Usa KY,4269,4152,10,,8828,1999-10-20 00:00:00,,EPSG,,
-8429,NAD83 to NAD83(HARN) (11),,NGS-Usa LA,4269,4152,11,,8829,1999-10-20 00:00:00,,EPSG,,
-8430,NAD83 to NAD83(HARN) (12),,NGS-Usa DE MD,4269,4152,12,,8830,1999-10-20 00:00:00,,EPSG,,
-8431,NAD83 to NAD83(HARN) (13),,NGS-Usa ME,4269,4152,13,,8831,1999-10-20 00:00:00,,EPSG,,
-8432,NAD83 to NAD83(HARN) (14),,NGS-Usa MI,4269,4152,14,,8832,1999-10-20 00:00:00,,EPSG,,
-8433,NAD83 to NAD83(HARN) (15),,NGS-Usa MS,4269,4152,15,,8833,1999-10-20 00:00:00,,EPSG,,
-8434,NAD83 to NAD83(HARN) (16),,NGS-Usa NE,4269,4152,16,,8834,1999-10-20 00:00:00,,EPSG,,
-8435,NAD83 to NAD83(HARN) (17),,NGS-US NewEng,4269,4152,17,,8835,1999-10-20 00:00:00,,EPSG,,
-8436,NAD83 to NAD83(HARN) (18),,NGS-Usa NM,4269,4152,18,,8836,1999-10-20 00:00:00,,EPSG,,
-8437,NAD83 to NAD83(HARN) (19),,NGS-Usa NY,4269,4152,19,,8837,1999-10-20 00:00:00,,EPSG,,
-8438,NAD83 to NAD83(HARN) (20),,NGS-Usa ND,4269,4152,20,,8838,1999-10-20 00:00:00,,EPSG,,
-8439,NAD83 to NAD83(HARN) (21),,NGS-Usa OK,4269,4152,21,,8839,1999-10-20 00:00:00,,EPSG,,
-8440,NAD83 to NAD83(HARN) (22),,NGS-PRVI,4269,4152,22,,8840,1999-10-20 00:00:00,,EPSG,,
-8441,NAD83 to NAD83(HARN) (23),,NGS-Usa SD,4269,4152,23,,8841,1999-10-20 00:00:00,,EPSG,,
-8442,NAD83 to NAD83(HARN) (24),,NGS-Usa TN,4269,4152,24,,8842,1999-10-20 00:00:00,,EPSG,,
-8443,NAD83 to NAD83(HARN) (25),,NGS-Usa TX e,4269,4152,25,,8843,1999-10-20 00:00:00,,EPSG,,
-8444,NAD83 to NAD83(HARN) (26),,NGS-Usa TX w,4269,4152,26,,8844,1999-10-20 00:00:00,,EPSG,,
-8445,NAD83 to NAD83(HARN) (27),,NGS-Usa VA,4269,4152,27,,8845,1999-10-20 00:00:00,,EPSG,,
-8446,NAD83 to NAD83(HARN) (28),,NGS-Usa OR WA,4269,4152,28,,8846,1999-10-20 00:00:00,,EPSG,,
-8447,NAD83 to NAD83(HARN) (29),,NGS-Usa WI,4269,4152,29,,8847,1999-10-20 00:00:00,,EPSG,,
-8448,NAD83 to NAD83(HARN) (30),,NGS-Usa WY,4269,4152,30,,8848,1999-10-20 00:00:00,,EPSG,,
-8449,Cape to Hartbeesthoek94 (1),,DSM-Zaf,4222,4148,1,,8849,1999-10-20 00:00:00,,EPSG,,
-8450,Hartbeesthoek94 to WGS 84 (1),,EPSG-Zaf,4148,4326,1,,8850,1999-10-20 00:00:00,,EPSG,For many purposes Hartbeesthoek94 can be assumed to be coincident with WGS 84.,
-8451,AGD66 to GDA94 (6),,Auslig-Tas,4202,4283,6,,8851,1999-10-20 00:00:00,,EPSG,,
-8452,AGD66 to GDA94 (7),,Auslig-NT,4202,4283,7,,8852,1999-10-20 00:00:00,,EPSG,,
-8453,AGD66 to WGS 84 (7),,EPSG-Aus Tas 0.1m,4202,4326,7,Australia - Tasmania.,8853,1999-10-20 00:00:00,,EPSG,For many purposes GDA94 can be assumed to be coincident with WGS 84.,
-8454,AGD66 to WGS 84 (8),,EPSG-Aus NT 0.1m,4202,4326,8,Australia - Northern Territory.,8854,1999-10-20 00:00:00,,EPSG,For many purposes GDA94 can be assumed to be coincident with WGS 84.,
-8455,CH1903 to WGS 84 (1),,BfL-CH 1,4149,4326,1,,8855,1999-10-20 00:00:00,,EPSG,,
-8456,CH1903+ to CHTRF95 (1),,BfL-CH,4150,4151,1,,8856,1999-10-20 00:00:00,,EPSG,,
-8457,CH1903+ to WGS 84 (1),,EPSG-CH,4150,4326,1,Liechtenstein;  Switzerland.,8857,1999-10-20 00:00:00,EPSG,EPSG,For many purposes CHTRF95 can be assumed to be coincident with WGS 84.,
-8458,CH1903 to WGS 84 (2),,BfL-CH 2,4149,4326,2,,8858,1999-10-20 00:00:00,,EPSG,,
-8459,CHTRF95 to WGS 84 (1),,EPSG-CH,4151,4326,1,,8859,1999-10-20 00:00:00,,EPSG,,
-8460,NAD27 to NAD83(HARN) (1),,NGS-Usa AL,4267,4152,1,United States (USA) - Alabama.,8860,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,,
-8461,NAD27 to NAD83(HARN) (2),,NGS-Usa AZ,4267,4152,2,United States (USA) - Arizona.,8861,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,,
-8462,NAD27 to NAD83(HARN) (3),,NGS-Usa CA n,4267,4152,3,United States (USA) - California north of 38 deg N.,8862,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,,
-8463,NAD27 to NAD83(HARN) (4),,NGS-Usa CA s,4267,4152,4,United States (USA) - California south of 38 deg N.,8863,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,,
-8464,NAD27 to NAD83(HARN) (5),,NGS-Usa CO,4267,4152,5,United States (USA) - Colorado.,8864,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,,
-8465,NAD27 to NAD83(HARN) (6),,NGS-Usa GA,4267,4152,6,United States (USA) - Georgia.,8865,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,,
-8466,NAD27 to NAD83(HARN) (7),,NGS-Usa FL,4267,4152,7,United States (USA) - Florida.,8866,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,,
-8467,NAD27 to NAD83(HARN) (8),,NGS-Usa ID MT e,4267,4152,8,United States (USA) - Idaho and Montana - east of 113 deg W.,8867,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,,
-8468,NAD27 to NAD83(HARN) (9),,NGS-Usa ID MT w,4267,4152,9,United States (USA) - Idaho and Montana - west of 113 deg W.,8868,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,,
-8469,NAD27 to NAD83(HARN) (10),,NGS-Usa KY,4267,4152,10,United States (USA) - Kentucky.,8869,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,,
-8470,NAD27 to NAD83(HARN) (11),,NGS-Usa LA,4267,4152,11,United States (USA) - Louisiana.,8870,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,,
-8471,NAD27 to NAD83(HARN) (12),,NGS-Usa DE MD,4267,4152,12,United States (USA) - Delaware and Maryland.,8871,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,,
-8472,NAD27 to NAD83(HARN) (13),,NGS-Usa ME,4267,4152,13,United States (USA) - Maine.,8872,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,,
-8473,NAD27 to NAD83(HARN) (14),,NGS-Usa MI,4267,4152,14,United States (USA) - Michigan.,8873,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,,
-8474,NAD27 to NAD83(HARN) (15),,NGS-Usa MS,4267,4152,15,United States (USA) - Mississippi.,8874,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,,
-8475,NAD27 to NAD83(HARN) (16),,NGS-Usa NE,4267,4152,16,United States (USA) - Nebraska.,8875,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,,
-8476,NAD27 to NAD83(HARN) (17),,NGS-US NewEng,4267,4152,18,United States (USA) - Connecticut; Massachusetts; New Hampshire; Rhode Island; Vermont.,8876,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,,
-8477,NAD27 to NAD83(HARN) (18),,NGS-Usa NM,4267,4152,18,United States (USA) - New Mexico.,8877,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,,
-8478,NAD27 to NAD83(HARN) (19),,NGS-Usa NY,4267,4152,19,United States (USA) - New York.,8878,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,,
-8479,NAD27 to NAD83(HARN) (20),,NGS-Usa ND,4267,4152,20,United States (USA) - North Dakota.,8879,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,,
-8480,NAD27 to NAD83(HARN) (21),,NGS-Usa OK,4267,4152,21,United States (USA) - Oklahoma.,8880,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,,
-8481,Puerto Rico to NAD83(HARN) (1),,NGS-PRVI,4139,4152,1,United States (USA) - Puerto Rico and the Virgin Islands.,8881,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,,
-8482,NAD27 to NAD83(HARN) (22),,NGS-Usa SD,4267,4152,22,United States (USA) - South Dakota.,8882,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,,
-8483,NAD27 to NAD83(HARN) (23),,NGS-Usa TN,4267,4152,23,United States (USA) - Tennessee,8883,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,,
-8484,NAD27 to NAD83(HARN) (24),,NGS-Usa TX e,4267,4152,24,United States (USA) - Texas east of 100deg West.,8884,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,,
-8485,NAD27 to NAD83(HARN) (25),,NGS-Usa TX w,4267,4152,25,United States (USA) - Texas west of 100deg West.,8885,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,,
-8486,NAD27 to NAD83(HARN) (26),,NGS-Usa VA,4267,4152,26,United States (USA) - Virginia.,8886,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,,
-8487,NAD27 to NAD83(HARN) (27),,NGS-Usa OR WA,4267,4152,27,United States (USA) - Oregan; Washington.,8887,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,,
-8488,NAD27 to NAD83(HARN) (28),,NGS-Usa WI,4267,4152,28,United States (USA) - Wisconsin.,8888,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,,
-8489,NAD27 to NAD83(HARN) (29),,NGS-Usa WY,4267,4152,29,United States (USA) - Wyoming.,8889,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,,
-8490,Rassadiran to WGS 84 (1),,TOT-Taheri,4153,4326,1,Iran - Taheri refinery site.,8890,1999-10-20 00:00:00,Total-Fina,EPSG,,
-8491,FD58 to WGS 84 (1),,TOT-Kangan,4132,4326,1,Iran - Kangan district,8891,1999-10-20 00:00:00,Total-Fina,EPSG,,
-8492,ED50(ED77) to WGS 84 (1),,NCCI-Irn,4154,4326,1,Iran,8892,1999-10-20 00:00:00,National Cartographic Centre of Iran,EPSG,,
-8493,NAD83 to WGS 84 (4),,NGS-Usa,4269,4326,4,United States (USA).,8893,1999-11-05 00:00:00,,EPSG,,
-8494,NAD83 to WGS 84 (5),,NGS-Usa,4269,4326,5,United States (USA).,8894,1999-11-05 00:00:00,,EPSG,,
-8495,La Canoa to WGS 84 (1),,LAG-Ven E,4247,4326,1,,8895,1999-11-05 00:00:00,,EPSG,,
-8496,NAD27 to WGS 84 (28),,NGS-Usa conus,4267,4326,28,United States (USA) - lower 48 states including EEZ.,8896,1999-10-20 00:00:00,,EPSG,For many purposes NAD83 can be assumed to be coincident with WGS 84.,
-8497,NAD27 to WGS 84 (29),,NGS-Usa AK,4267,4326,29,United States (USA) - Alaska including EEZ.,8897,1999-10-20 00:00:00,,EPSG,For many purposes NAD83 can be assumed to be coincident with WGS 84.,
diff --git a/src/tiff/csv/horiz_cs.c b/src/tiff/csv/horiz_cs.c
deleted file mode 100644
index 4096f60..0000000
--- a/src/tiff/csv/horiz_cs.c
+++ /dev/null
@@ -1,1496 +0,0 @@
-#include "defs.h"
-datafile_rows_t horiz_cs_row_1[] = {"HORIZCS_CODE","HORIZCS_EPSG_NAME","HORIZCS_EPSG_ABBR","HORIZCS_USER_NAME","DESCRIPTION","AREA_OF_USE","COORD_SYS_TYPE","GEOD_DATUM_CODE","PRIME_MERIDIAN_CODE","ORIENT_POSITIVE_AXIS_1","ORIENT_POSITIVE_AXIS_2","COORD_SYS_AXIS_1_ABBR","COORD_SYS_AXIS_2_ABBR","UOM_LENGTH_CODE","UOM_ANGLE_CODE","SOURCE_GEOGCS_CODE","PROJECTION_TRF_CODE","REVISION_DATE","INFORMATION_SOURCE","DATA_SOURCE","REMARKS","CHANGE_ID",NULL};
-datafile_rows_t horiz_cs_row_2[] = {"200","Anguilla 1957 / British West Indies Grid","Anguilla 1957 / BWI Grid","","","Anguilla","projected 2D","","","East","North","E","N","9001","","4600","19942","1999-04-22 00:00:00","Ordnance Survey of Great Britain","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_3[] = {"201","Antigua 1943 / British West Indies Grid","Antigua 1943 / BWI Grid","","","Antigua and Barbuda - Antigua","projected 2D","","","East","North","E","N","9001","","4601","19942","1999-04-22 00:00:00","Ordnance Survey of Great Britain","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_4[] = {"202","Dominica 1945 / British West Indies Grid","Dominica 1945 / BWI Grid","","","Dominica","projected 2D","","","East","North","E","N","9001","","4602","19942","1999-04-22 00:00:00","Ordnance Survey of Great Britain","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_5[] = {"203","Grenada 1953 / British West Indies Grid","Grenada 1953 / BWI Grid","","","Grenada (including Grenada Grenadines)","projected 2D","","","East","North","E","N","9001","","4603","19942","1999-04-22 00:00:00","Ordnance Survey of Great Britain","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_6[] = {"204","Montserrat 58 / British West Indies Grid","Montserrat 58 / BWI Grid","","","Montserrat","projected 2D","","","East","North","E","N","9001","","4604","19942","1999-04-22 00:00:00","Ordnance Survey of Great Britain","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_7[] = {"205","St Kitts 1955 / British West Indies Grid","St Kitts 1955 / BWI Grid","","","Saint Kitts and Nevis","projected 2D","","","East","North","E","N","9001","","4605","19942","1999-04-22 00:00:00","Ordnance Survey of Great Britain","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_8[] = {"206","St Lucia 1955 / British West Indies Grid","St Lucia 1955 / BWI Grid","","","Saint Lucia","projected 2D","","","East","North","E","N","9001","","4606","19942","1999-04-22 00:00:00","Ordnance Survey of Great Britain","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_9[] = {"207","St Vincent 45 / British West Indies Grid","St Vincent 45 / BWI Grid","","","Saint Vincent and the Grenadines","projected 2D","","","East","North","E","N","9001","","4607","19942","1999-04-22 00:00:00","Ordnance Survey of Great Britain","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_10[] = {"208","NAD27(CGQ77) / SCoPQ zone 2","CGQ77 / SCoPQ zone 2","","","Canada - Quebec - east of 57 deg East.","projected 2D","","","East","North","X","Y","9001","","4609","17700","1999-07-24 00:00:00","Geodetic Service of Quebec; Quebec Ministry of Natural Resources.","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_11[] = {"209","NAD27(CGQ77) / SCoPQ zone 3","CGQ77 / SCoPQ zone 3","","","Canada - Quebec between 60 deg and 57 deg West.","projected 2D","","","East","North","X","Y","9001","","4609","17703","1999-07-24 00:00:00","Geodetic Service of Quebec; Quebec Ministry of Natural Resources.","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_12[] = {"210","NAD27(CGQ77) / SCoPQ zone 4","CGQ77 / SCoPQ zone 4","","","Canada - Quebec between 63 deg and 60 deg West.","projected 2D","","","East","North","X","Y","9001","","4609","17704","1999-07-24 00:00:00","Geodetic Service of Quebec; Quebec Ministry of Natural Resources.","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_13[] = {"211","NAD27(CGQ77) / SCoPQ zone 5","CGQ77 / SCoPQ zone 5","","","Canada - Quebec between 66 deg and 63 deg West.","projected 2D","","","East","North","X","Y","9001","","4609","17705","1999-07-24 00:00:00","Geodetic Service of Quebec; Quebec Ministry of Natural Resources.","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_14[] = {"212","NAD27(CGQ77) / SCoPQ zone 6","CGQ77 / SCoPQ zone 6","","","Canada - Quebec between 69 deg and  66 deg West.","projected 2D","","","East","North","X","Y","9001","","4609","17706","1999-07-24 00:00:00","Geodetic Service of Quebec; Quebec Ministry of Natural Resources.","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_15[] = {"213","NAD27(CGQ77) / SCoPQ zone 7","CGQ77 / SCoPQ zone 7","","","Canada - Quebec between 72 deg and 69 deg West.","projected 2D","","","East","North","X","Y","9001","","4609","17707","1999-07-24 00:00:00","Geodetic Service of Quebec; Quebec Ministry of Natural Resources.","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_16[] = {"214","NAD27(CGQ77) / SCoPQ zone 8","CGQ77 / SCoPQ zone 8","","","Canada - Quebec between 75 deg and 72 deg West.","projected 2D","","","East","North","X","Y","9001","","4609","17708","1999-07-24 00:00:00","Geodetic Service of Quebec; Quebec Ministry of Natural Resources.","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_17[] = {"215","NAD27(CGQ77) / SCoPQ zone 9","CGQ77 / SCoPQ zone 9","","","Canada - Quebec between 78 deg and 75 deg West.","projected 2D","","","East","North","X","Y","9001","","4609","17709","1999-07-24 00:00:00","Geodetic Service of Quebec; Quebec Ministry of Natural Resources.","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_18[] = {"216","NAD27(CGQ77) / SCoPQ zone 10","CGQ77 / SCoPQ zone 10","","","Canada - Quebec west of 78 deg West.","projected 2D","","","East","North","X","Y","9001","","4609","17710","1999-07-24 00:00:00","Geodetic Service of Quebec; Quebec Ministry of Natural Resources.","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_19[] = {"217","NAD27(76) / MTM zone 8","","","","Canada - Ontario - east of 75 deg West.","projected 2D","","","East","North","X","Y","9001","","4608","17708","1999-07-24 00:00:00","Surveys and Mapping Section; Ontario Ministry of Transportation.","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_20[] = {"218","NAD27(76) / MTM zone 9","","","","Canada - Ontario - between 78 deg and 75 deg West.","projected 2D","","","East","North","X","Y","9001","","4608","17709","1999-07-24 00:00:00","Surveys and Mapping Section; Ontario Ministry of Transportation.","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_21[] = {"219","NAD27(76) / MTM zone 10","","","","Canada - Ontario - between 79 deg 30 min and 78 deg W in area to north of 47 deg N; between 80 deg 15 min and 78 deg W in area between 46 deg and 47 deg N; between 81 deg and 78 deg W in area south of 46 deg N.","projected 2D","","","East","North","X","Y","9001","","4608","17710","1999-07-24 00:00:00","Surveys and Mapping Section; Ontario Ministry of Transportation.","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_22[] = {"220","NAD27(76) / MTM zone 11","","","","Canada - Ontario - south of 46 deg N and west of 81 deg West.","projected 2D","","","East","North","E","N","9001","","4608","17711","1999-07-24 00:00:00","Surveys and Mapping Section; Ontario Ministry of Transportation.","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_23[] = {"221","NAD27(76) / MTM zone 12","","","","Canada - Ontario - between 82 deg 30 min and 79 deg 30 min W in area to north of 47 deg N; between 82 deg 30 min and 80 deg 15 min W in area between 46 deg and 47 deg N; between 82 deg 30 min and 79 deg 30 min W in area north of 47 deg N.","projected 2D","","","East","North","E","N","9001","","4608","17712","1999-07-24 00:00:00","Surveys and Mapping Section; Ontario Ministry of Transportation.","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_24[] = {"222","NAD27(76) / MTM zone 13","","","","Canada - Ontario - between 85 deg 30 min and 82 deg 30 min West and north of 46 deg North.","projected 2D","","","East","North","E","N","9001","","4608","17713","1999-07-24 00:00:00","Surveys and Mapping Section; Ontario Ministry of Transportation.","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_25[] = {"223","NAD27(76) / MTM zone 14","","","","Canada - Ontario - between 88 deg 30 min and 85 deg 30 min West.","projected 2D","","","East","North","E","N","9001","","4608","17714","1999-07-24 00:00:00","Surveys and Mapping Section; Ontario Ministry of Transportation.","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_26[] = {"224","NAD27(76) / MTM zone 15","","","","Canada - Ontario - between 91 deg 30 min and 88 deg 30 min West.","projected 2D","","","East","North","E","N","9001","","4608","17715","1999-07-24 00:00:00","Surveys and Mapping Section; Ontario Ministry of Transportation.","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_27[] = {"225","NAD27(76) / MTM zone 16","","","","Canada - Ontario - between 94 deg 30 min and 91 deg 30 min West.","projected 2D","","","East","North","E","N","9001","","4608","17716","1999-07-24 00:00:00","Surveys and Mapping Section; Ontario Ministry of Transportation.","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_28[] = {"226","NAD27(76) / MTM zone 17","","","","Canada - Ontario - west of 94 deg 30 min West.","projected 2D","","","East","North","E","N","9001","","4608","17717","1999-07-24 00:00:00","Surveys and Mapping Section; Ontario Ministry of Transportation.","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_29[] = {"227","NAD27(76) / UTM zone 15N","","","","Canada - Ontario - 96deg West  to 90deg West.","projected 2D","","","East","North","E","N","9001","","4608","16015","1999-07-24 00:00:00","","EPSG","Supersedes NAD27 / UTM zone 15N (code 26715).","",NULL};
-datafile_rows_t horiz_cs_row_30[] = {"228","NAD27(76) / UTM zone 16N","","","","Canada - Ontario - 90deg West  to 84deg West.","projected 2D","","","East","North","E","N","9001","","4608","16016","1999-07-24 00:00:00","","EPSG","Supersedes NAD27 / UTM zone 16N (code 26716).","",NULL};
-datafile_rows_t horiz_cs_row_31[] = {"229","NAD27(76) / UTM zone 17N","","","","Canada - Ontario - 84deg West  to 78deg West.","projected 2D","","","East","North","E","N","9001","","4608","16017","1999-07-24 00:00:00","","EPSG","Supersedes NAD27 / UTM zone 17N (code 26717).","",NULL};
-datafile_rows_t horiz_cs_row_32[] = {"230","NAD27(76) / UTM zone 18N","","","","Canada - Ontario - east of 78 deg West.","projected 2D","","","East","North","E","N","9001","","4608","16018","1999-07-24 00:00:00","","EPSG","Supersedes NAD27 / UTM zone 18N (code 26718).","",NULL};
-datafile_rows_t horiz_cs_row_33[] = {"231","NAD27(CGQ77) / UTM zone 17N","CGQ77 / UTM zone 17N","","","Canada - Quebec - west of 78 deg West.","projected 2D","","","East","North","E","N","9001","","4609","16017","1999-07-24 00:00:00","","EPSG","Supersedes NAD27 / UTM zone 17N (code 26717).","",NULL};
-datafile_rows_t horiz_cs_row_34[] = {"232","NAD27(CGQ77) / UTM zone 18N","CGQ77 / UTM zone 18N","","","Canada - Quebec -78deg West  to 72deg West.","projected 2D","","","East","North","E","N","9001","","4609","16018","1999-07-24 00:00:00","","EPSG","Supersedes NAD27 / UTM zone 18N (code 26718).","",NULL};
-datafile_rows_t horiz_cs_row_35[] = {"233","NAD27(CGQ77) / UTM zone 19N","CGQ77 / UTM zone 19N","","","Canada - Quebec - 72deg West  to 66deg West.","projected 2D","","","East","North","E","N","9001","","4609","16019","1999-07-24 00:00:00","","EPSG","Supersedes NAD27 / UTM zone 19N (code 26719).","",NULL};
-datafile_rows_t horiz_cs_row_36[] = {"234","NAD27(CGQ77) / UTM zone 20N","CGQ77 / UTM zone 20N","","","Canada - Quebec - 66deg West  to 60deg West.","projected 2D","","","East","North","E","N","9001","","4609","16020","1999-07-24 00:00:00","","EPSG","Supersedes NAD27 / UTM zone 20N (code 26720).","",NULL};
-datafile_rows_t horiz_cs_row_37[] = {"235","NAD27(CGQ77) / UTM zone 21N","CGQ77 / UTM zone 21N","","","Canada - Quebec - east of 60deg West.","projected 2D","","","East","North","E","N","9001","","4609","16021","1999-07-24 00:00:00","","EPSG","Supersedes NAD27 / UTM zone 21N (code 26721).","",NULL};
-datafile_rows_t horiz_cs_row_38[] = {"236","NAD83(CSRS98) / New Brunswick Stereo","NAD83(98) / NB Stereo","","","Canada - New Brunswick","projected 2D","","","North","East","N","E","9001","","4140","19946","1999-10-20 00:00:00","Service New Brunswick Land and Information Standards Manual","EPSG","In use from 1999.","",NULL};
-datafile_rows_t horiz_cs_row_39[] = {"237","NAD83(CSRS98) / UTM zone 19N","NAD83(98) / UTM 19N","","","Canada - New Brunswick west of 66 deg West.","projected 2D","","","East","North","E","N","9001","","4140","16019","1999-10-20 00:00:00","Service New Brunswick Land and Information Standards Manual","EPSG","In use from 1999.","",NULL};
-datafile_rows_t horiz_cs_row_40[] = {"238","NAD83(CSRS98) / UTM zone 20N","NAD83(98) / UTM 20N","","","Canada - New Brunswick east of 66 deg West.","projected 2D","","","East","North","E","N","9001","","4140","16020","1999-10-20 00:00:00","Service New Brunswick Land and Information Standards Manual","EPSG","In use from 1999.","",NULL};
-datafile_rows_t horiz_cs_row_41[] = {"239","Israel / Israeli TM Grid","Israeli TM Grid","","","Israel.","projected 2D","","","East","North","E","N","9001","","4141","18204","1999-10-20 00:00:00","Survey of Israel.","EPSG","Supercedes Israeli CS Grid (EPSG code 28193).","",NULL};
-datafile_rows_t horiz_cs_row_42[] = {"240","Locodjo 1965 / UTM zone 30N","Locodjo 65 / UTM 30N","","","Cote D'Ivoire (Ivory Coast) east of 6 deg West.","projected 2D","","","East","North","E","N","9001","","4142","16030","1999-10-20 00:00:00","IGN Paris","EPSG","Superseded by Abidjan 87 / UTM 30N (EPSG code 241).","",NULL};
-datafile_rows_t horiz_cs_row_43[] = {"241","Abidjan 1987 / UTM zone 30N","Abidjan 87 / UTM 30N","","","Cote D'Ivoire (Ivory Coast) east of 6 deg West.","projected 2D","","","East","North","E","N","9001","","4143","16030","1999-10-20 00:00:00","IGN Paris","EPSG","Supersedes Locodjo 65 / UTM 30N (EPSG code 240).","",NULL};
-datafile_rows_t horiz_cs_row_44[] = {"242","Locodjo 1965 / UTM zone 29N","Locodjo 65 / UTM 29N","","","Cote D'Ivoire (Ivory Coast) west of 6 deg West.","projected 2D","","","East","North","E","N","9001","","4142","16029","1999-10-20 00:00:00","IGN Paris","EPSG","Superseded by Abidjan 87 / UTM 29N (EPSG code 243).","",NULL};
-datafile_rows_t horiz_cs_row_45[] = {"243","Abidjan 1987 / UTM zone 29N","Abidjan 87 / UTM 29N","","","Cote D'Ivoire (Ivory Coast) west of 6 deg West.","projected 2D","","","East","North","E","N","9001","","4143","16029","1999-10-20 00:00:00","IGN Paris","EPSG","Supersedes Locodjo 65 / UTM 29N (EPSG code 242).","",NULL};
-datafile_rows_t horiz_cs_row_46[] = {"244","Hanoi 1972 / Gauss-Kruger zone 18","Hanoi 72 / Gauss zone 18","","","Vietnam - west of 108 deg East.","projected 2D","","","North","East","X","Y","9001","","4147","16218","1999-10-20 00:00:00","","EPSG","Replaces use of Indian 1960 / UTM zone 48 after 1988.","",NULL};
-datafile_rows_t horiz_cs_row_47[] = {"245","Hanoi 1972 / Gauss-Kruger zone 19","Hanoi 72 / Gauss zone 19","","","Vietnam - east of 108 deg East.","projected 2D","","","North","East","X","Y","9001","","4147","16219","1999-10-20 00:00:00","","EPSG","Replaces use of Indian 1960 / UTM zone 48 after 1988.","",NULL};
-datafile_rows_t horiz_cs_row_48[] = {"246","Hartbeesthoek94 / Lo15","New S African CS zone 15","","","South Africa - Walvis Bay.","projected 2D","","","West","South","W","S","9001","","4148","17515","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_49[] = {"247","Hartbeesthoek94 / Lo17","New S African CS zone 17","","","South Africa - west of 18 deg East.","projected 2D","","","West","South","W","S","9001","","4148","17517","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_50[] = {"248","Hartbeesthoek94 / Lo19","New S African CS zone 19","","","South Africa - 18 to 20 deg East.","projected 2D","","","West","South","W","S","9001","","4148","17519","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_51[] = {"249","Hartbeesthoek94 / Lo21","New S African CS zone 21","","","South Africa - 20 to 22 deg East.","projected 2D","","","West","South","W","S","9001","","4148","17521","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_52[] = {"250","Hartbeesthoek94 / Lo23","New S African CS zone 23","","","South Africa - 22 to 24 deg East.","projected 2D","","","West","South","W","S","9001","","4148","17523","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_53[] = {"251","Hartbeesthoek94 / Lo25","New S African CS zone 25","","","Lestho  - west of 26 deg East; South Africa - 24 to 26 deg East.","projected 2D","","","West","South","W","S","9001","","4148","17525","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_54[] = {"252","Hartbeesthoek94 / Lo27","New S African CS zone 27","","","Lestho  - east of 26 deg East;  South Africa - 26 to 28 deg East.","projected 2D","","","West","South","W","S","9001","","4148","17527","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_55[] = {"253","Hartbeesthoek94 / Lo29","New S African CS zone 29","","","South Africa - 28 to 30 deg East.","projected 2D","","","West","South","W","S","9001","","4148","17529","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_56[] = {"254","Hartbeesthoek94 / Lo31","New S African CS zone 31","","","South Africa - 30 to 32 deg East;  Swaziland.","projected 2D","","","West","South","W","S","9001","","4148","17533","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_57[] = {"255","Hartbeesthoek94 / Lo33","New S African CS zone 33","","","South Africa - east of 32 deg East.","projected 2D","","","West","South","W","S","9001","","4148","17533","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_58[] = {"256","CH1903+ / LV95","LV95","","","Liechtenstein; Switzerland.","projected 2D","","","East","North","Y","X","9001","","4150","19950","1999-10-20 00:00:00","","EPSG","Supersedes CH1903/LV03 (code 21781).","",NULL};
-datafile_rows_t horiz_cs_row_59[] = {"257","Rassadiran / Nakhl e Taqi","","","","Iran - Taheri refinery site only.","projected 2D","","","East","North","E","N","9001","","4153","19951","1999-10-20 00:00:00","Total-Fina","EPSG","Used for terminal site only.","",NULL};
-datafile_rows_t horiz_cs_row_60[] = {"258","ED50(ED77) / UTM zone 38N","","","","Iran - west of 48deg East.","projected 2D","","","East","North","E","N","9001","","4154","16038","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_61[] = {"259","ED50(ED77) / UTM zone 39N","","","","Iran - 48deg to 54 deg East.","projected 2D","","","East","North","E","N","9001","","4154","16039","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_62[] = {"260","ED50(ED77) / UTM zone 40N","","","","Iran - 54deg to 60 deg East.","projected 2D","","","East","North","E","N","9001","","4154","16040","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_63[] = {"261","ED50(ED77) / UTM zone 41N","","","","Iran - east of 60deg East.","projected 2D","","","East","North","E","N","9001","","4154","16041","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_64[] = {"300","Madrid 1870 (Madrid) / Spain","","","","Spain","projected 2D","","","East","North","X","Y","9001","","4903","19921","1998-11-11 00:00:00","","EPSG","Superseded by ED50 / UTM after 1966.","",NULL};
-datafile_rows_t horiz_cs_row_65[] = {"2100","GGRS87 / Greek Grid","","","","Greece","projected 2D","","","East","North","E","N","9001","","4121","19930","1997-06-16 00:00:00","Geodesy Department; Public Petroleum Corporation of Greece.","EPSG","Oil industry uses ED50 / UTM zone 34N and ED50 / UTM zone 35N.","",NULL};
-datafile_rows_t horiz_cs_row_66[] = {"2200","ATS77 / New Brunswick Stereographic","ATS77 / NB Stereographic","","","Canada - New Brunswick","projected 2D","","","North","East","N","E","9001","","4122","19945","1999-10-20 00:00:00","New Brunswick Geographic Information Corporation land and water information standards manual.","EPSG","In use from 1979.  To be phased out in late 1990's.","99.61",NULL};
-datafile_rows_t horiz_cs_row_67[] = {"2219","ATS77 / UTM zone 19N","","","","Canada - New Brunswick - west of 66 deg W.","projected 2D","","","East","North","E","N","9001","","4122","16019","1997-07-22 00:00:00","New Brunswick Geographic Information Corporation land and water information standards manual.","EPSG","In use from 1979.  To be phased out in late 1990's.","",NULL};
-datafile_rows_t horiz_cs_row_68[] = {"2220","ATS77 / UTM zone 20N","","","","Canada - New Brunswick - east of 66 deg W.; Canada - Nova Scotia; Canada - Prince Edward Island.","projected 2D","","","East","North","E","N","9001","","4122","16020","1997-07-22 00:00:00","New Brunswick Geographic Information Corporation land and water information standards manual.","EPSG","In use from 1979.  To be phased out in late 1990's.","",NULL};
-datafile_rows_t horiz_cs_row_69[] = {"2290","ATS77 / Prince Edward Isl. Stereographic","ATS77 / PEI Stereo","","","Canada - Prince Edward Island","projected 2D","","","East","North","E(X)","N(Y)","9001","","4122","19933","1997-11-13 00:00:00","Geomatics Centre; Nova Scotia Ministry of Housing and Municipal Affairs.","EPSG","In use from 1979.  To be phased out in late 1990's.","",NULL};
-datafile_rows_t horiz_cs_row_70[] = {"2294","ATS77 / MTM Nova Scotia zone 4","ATS77 / MTM NS zone 4","","","Canada - Nova Scotia - east of 63 deg West.","projected 2D","","","East","North","E","N","9001","","4122","17794","1997-11-13 00:00:00","Geomatics Centre; Nova Scotia Ministry of Housing and Municipal Affairs.","EPSG","In use from 1979.  To be phased out in late 1990's.","",NULL};
-datafile_rows_t horiz_cs_row_71[] = {"2295","ATS77 / MTM Nova Scotia zone 5","ATS77 / MTM NS zone 5","","","Canada - Nova Scotia - west of 63 deg West.","projected 2D","","","East","North","E","N","9001","","4122","17795","1997-11-13 00:00:00","Geomatics Centre; Nova Scotia Ministry of Housing and Municipal Affairs.","EPSG","In use from 1979.  To be phased out in late 1990's.","",NULL};
-datafile_rows_t horiz_cs_row_72[] = {"2391","KKJ / Finland zone 1","","","","Finland - west of 22deg 30min E.","projected 2D","","","North","East","X","Y","9001","","4123","18191","1997-07-22 00:00:00","www.nls.fi/maa/papers/kkj.html","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_73[] = {"2392","KKJ / Finland zone 2","","","","Finland - 22deg 30 min to 25deg 30min E.","projected 2D","","","North","East","X","Y","9001","","4123","18192","1997-07-22 00:00:00","www.nls.fi/maa/papers/kkj.html","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_74[] = {"2393","KKJ / Finland Uniform Coordinate System","KKJ / Finland zone 3","","","Finland; Finland - 25 deg 30min E to 28deg 30min E.","projected 2D","","","North","East","X","Y","9001","","4123","18193","1997-07-22 00:00:00","www.nls.fi/maa/papers/kkj.html","EPSG","Known as Uniform Coordinate System when used over all country and also as Basic Coordinate System zone 3 at larger scales.","",NULL};
-datafile_rows_t horiz_cs_row_75[] = {"2394","KKJ / Finland zone 4","","","","Finland - east of 28deg 30 min E.","projected 2D","","","North","East","X","Y","9001","","4123","18194","1997-07-22 00:00:00","www.nls.fi/maa/papers/kkj.html","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_76[] = {"2400","RT90 2.5 gon W","","","","Sweden","projected 2D","","","North","East","X","Y","9001","","4124","19929","1997-11-13 00:00:00","National Land Survey of Sweden","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_77[] = {"2550","Samboja / UTM zone 50S","","","","Indonesia - east Kalimantan - Mahakam delta area.","projected 2D","","","East","North","E","N","9001","","4125","16150","1997-11-13 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_78[] = {"2600","Lietuvos Koordinoei Sistema 1994","LKS94","","","Lithuania","projected 2D","","","North","East","X","Y","9001","","4126","19934","1998-03-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_79[] = {"2736","Tete / UTM zone 36S","","","","Mozambique - west of 36 deg E.","projected 2D","","","East","North","E","N","9001","","4127","16136","1998-04-16 00:00:00","Direc��o Nacional de Geografia e Cadastral (DINAGECA).","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_80[] = {"2737","Tete / UTM zone 37S","","","","Mozambique - east of 36 deg E","projected 2D","","","East","North","E","N","9001","","4127","16137","1998-04-16 00:00:00","Direc��o Nacional de Geografia e Cadastral (DINAGECA).","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_81[] = {"3036","Moznet / UTM zone 36S","","","","Mozambique - west of 36 deg E.","projected 2D","","","East","North","E","N","9001","","4130","16136","1998-04-16 00:00:00","Direc��o Nacional de Geografia e Cadastral (DINAGECA).","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_82[] = {"3037","Moznet / UTM zone 37S","","","","Mozambique - east of 36 deg E","projected 2D","","","East","North","E","N","9001","","4130","16137","1998-04-16 00:00:00","Direc��o Nacional de Geografia e Cadastral (DINAGECA).","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_83[] = {"3148","Indian 1960 / UTM zone 48N","","","","Cambodia; Vietnam west of 108deg East.","projected 2D","","","East","North","E","N","9001","","4131","16048","1998-11-11 00:00:00","","EPSG","In Vietnam superseded by Hanoi 72 / Gauss zone 18 from 1988 onwards.","",NULL};
-datafile_rows_t horiz_cs_row_84[] = {"3149","Indian 1960 / UTM zone 49N","","","","Vietnam east of 108deg East.","projected 2D","","","East","North","E","N","9001","","4131","16049","1998-11-11 00:00:00","","EPSG","Superseded by Hanoi 72 / Gauss zone 18 from 1988 onwards.","",NULL};
-datafile_rows_t horiz_cs_row_85[] = {"3176","Indian 1960 / TM 106 NE","","","","Vietnam - offshore.","projected 2D","","","East","North","E","N","9001","","4131","16506","1998-11-11 00:00:00","Petrovietnam","EPSG","Used by Petrovietnam for offshore block 15.","",NULL};
-datafile_rows_t horiz_cs_row_86[] = {"3200","FD58 / Iraq zone","","","","Iran - Gulf coast and Arwaz areas.","projected 2D","","","East","North","E","N","9001","","4132","19906","1998-11-11 00:00:00","IOEPC records.","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_87[] = {"3300","Estonian Coordinate System of 1992","","","","Estonia.","projected 2D","","","North","East","X","Y","9001","","4133","19938","1998-12-14 00:00:00","http://www.geo.ut.ee/~raivo/estcoord.html","EPSG","Used for 1:20000 and larger scale mapping.","",NULL};
-datafile_rows_t horiz_cs_row_88[] = {"3439","PSD93 / UTM zone 39N","","","","Oman - west of 54 deg East.","projected 2D","","","East","North","E","N","9001","","4134","16039","1999-04-22 00:00:00","Petroleum Development Oman","EPSG","Supersedes Fahud / UTM zone 39N projCS (code 23239). Maximum differences to Fahud adjustment are 20 metres.","",NULL};
-datafile_rows_t horiz_cs_row_89[] = {"3440","PSD93 / UTM zone 40N","","","","Oman - east of 54 deg East.","projected 2D","","","East","North","E","N","9001","","4134","16040","1999-04-22 00:00:00","Petroleum Development Oman","EPSG","Supersedes Fahud / UTM zone 40N projCS (code 23240). Maximum differences to Fahud adjustment are 20 metres.","",NULL};
-datafile_rows_t horiz_cs_row_90[] = {"3561","Old Hawaiian / Hawaii zone 1","Old Hawaiian / SP zone 1","","","United States (USA) - Hawaii - island of Hawaii.","projected 2D","","","East","North","X","Y","9003","","4135","15101","1999-05-24 00:00:00","","EPSG","Sometimes erroneously referred to as NAD27 / Hawaii zone 1.","99.322",NULL};
-datafile_rows_t horiz_cs_row_91[] = {"3562","Old Hawaiian / Hawaii zone 2","Old Hawaiian / SP zone 2","","","United States (USA) - Hawaii - Maui; Kahoolawe; Lanai; Molokai.","projected 2D","","","East","North","X","Y","9003","","4135","15102","1999-05-24 00:00:00","","EPSG","Sometimes erroneously referred to as NAD27 / Hawaii zone 2.","99.322",NULL};
-datafile_rows_t horiz_cs_row_92[] = {"3563","Old Hawaiian / Hawaii zone 3","Old Hawaiian / SP zone 3","","","United States (USA) - Hawaii - Oahu.","projected 2D","","","East","North","X","Y","9003","","4135","15103","1999-05-24 00:00:00","","EPSG","Sometimes erroneously referred to as NAD27 / Hawaii zone 3.","99.322",NULL};
-datafile_rows_t horiz_cs_row_93[] = {"3564","Old Hawaiian / Hawaii zone 4","Old Hawaiian / SP zone 4","","","United States (USA) - Hawaii - Kauai.","projected 2D","","","East","North","X","Y","9003","","4135","15104","1999-05-24 00:00:00","","EPSG","Sometimes erroneously referred to as NAD27 / Hawaii zone 4.","99.322",NULL};
-datafile_rows_t horiz_cs_row_94[] = {"3565","Old Hawaiian / Hawaii zone 5","Old Hawaiian / SP zone 5","","","United States (USA) - Hawaii - Niihau.","projected 2D","","","East","North","X","Y","9003","","4135","15105","1999-05-24 00:00:00","","EPSG","Sometimes erroneously referred to as NAD27 / Hawaii zone 5.","99.322",NULL};
-datafile_rows_t horiz_cs_row_95[] = {"3920","Puerto Rico / UTM zone 20N","","","","British Virgin Islands (civilian).","projected 2D","","","East","North","E","N","9001","","4139","16020","1999-04-22 00:00:00","Ordnance Survey of Great Britain","EPSG","NAD27 / UTM zone 20 N (code 26720) used for military purposes.","",NULL};
-datafile_rows_t horiz_cs_row_96[] = {"3991","Puerto Rico State Plane CS of 1927","Puerto Rico SPCS 27","","","Puerto Rico.","projected 2D","","","East","North","X","Y","9003","","4139","15201","1999-05-24 00:00:00","","EPSG","Sometimes erroneously referred to as NAD27 / Puerto Rico State Plane CS.","99.323",NULL};
-datafile_rows_t horiz_cs_row_97[] = {"3992","Puerto Rico / St. Croix","","","","US Virgin Islands (U.S.).","projected 2D","","","East","North","X","Y","9003","","4139","15202","1999-05-24 00:00:00","","EPSG","Sometimes erroneously referred to as NAD27 / St. Croix State Plane CS.","99.323",NULL};
-datafile_rows_t horiz_cs_row_98[] = {"4001","Unknown datum based upon ellipsoid 7001","","","","","geographic 2D","6001","8901","North","East","Lat","Long","","9108","","","1996-09-12 00:00:00","","EPSG","Not recommended.  Use only in cases where geodetic datum unknown.","96.08",NULL};
-datafile_rows_t horiz_cs_row_99[] = {"4002","Unknown datum based upon ellipsoid 7002","","","","","geographic 2D","6002","8901","North","East","Lat","Long","","9108","","","1996-09-12 00:00:00","","EPSG","Not recommended.  Use only in cases where geodetic datum unknown.","96.08",NULL};
-datafile_rows_t horiz_cs_row_100[] = {"4003","Unknown datum based upon ellipsoid 7003","","","","","geographic 2D","6003","8901","North","East","Lat","Long","","9108","","","1996-09-12 00:00:00","","EPSG","Not recommended.  Use only in cases where geodetic datum unknown.","96.08",NULL};
-datafile_rows_t horiz_cs_row_101[] = {"4004","Unknown datum based upon ellipsoid 7004","","","","","geographic 2D","6004","8901","North","East","Lat","Long","","9108","","","1996-09-12 00:00:00","","EPSG","Not recommended.  Use only in cases where geodetic datum unknown.","96.08",NULL};
-datafile_rows_t horiz_cs_row_102[] = {"4005","Unknown datum based upon ellipsoid 7005","","","","","geographic 2D","6005","8901","North","East","Lat","Long","","9108","","","1996-09-12 00:00:00","","EPSG","Not recommended.  Use only in cases where geodetic datum unknown.","96.08",NULL};
-datafile_rows_t horiz_cs_row_103[] = {"4006","Unknown datum based upon ellipsoid 7006","","","","","geographic 2D","6006","8901","North","East","Lat","Long","","9108","","","1996-09-12 00:00:00","","EPSG","Not recommended.  Use only in cases where geodetic datum unknown.","96.08",NULL};
-datafile_rows_t horiz_cs_row_104[] = {"4007","Unknown datum based upon ellipsoid 7007","","","","","geographic 2D","6007","8901","North","East","Lat","Long","","9108","","","1996-09-12 00:00:00","","EPSG","Not recommended.  Use only in cases where geodetic datum unknown.","96.08",NULL};
-datafile_rows_t horiz_cs_row_105[] = {"4008","Unknown datum based upon ellipsoid 7008","","","","","geographic 2D","6008","8901","North","East","Lat","Long","","9108","","","1996-09-12 00:00:00","","EPSG","Not recommended.  Use only in cases where geodetic datum unknown.","96.08",NULL};
-datafile_rows_t horiz_cs_row_106[] = {"4009","Unknown datum based upon ellipsoid 7009","","","","","geographic 2D","6009","8901","North","East","Lat","Long","","9108","","","1996-09-12 00:00:00","","EPSG","Not recommended.  Use only in cases where geodetic datum unknown.","96.08",NULL};
-datafile_rows_t horiz_cs_row_107[] = {"4010","Unknown datum based upon ellipsoid 7010","","","","","geographic 2D","6010","8901","North","East","Lat","Long","","9108","","","1996-09-12 00:00:00","","EPSG","Not recommended.  Use only in cases where geodetic datum unknown.","96.08",NULL};
-datafile_rows_t horiz_cs_row_108[] = {"4011","Unknown datum based upon ellipsoid 7011","","","","","geographic 2D","6011","8901","North","East","Lat","Long","","9108","","","1996-09-12 00:00:00","","EPSG","Not recommended.  Use only in cases where geodetic datum unknown.","96.08",NULL};
-datafile_rows_t horiz_cs_row_109[] = {"4012","Unknown datum based upon ellipsoid 7012","","","","","geographic 2D","6012","8901","North","East","Lat","Long","","9108","","","1996-09-12 00:00:00","","EPSG","Not recommended.  Use only in cases where geodetic datum unknown.","96.08",NULL};
-datafile_rows_t horiz_cs_row_110[] = {"4013","Unknown datum based upon ellipsoid 7013","","","","","geographic 2D","6013","8901","North","East","Lat","Long","","9108","","","1996-09-12 00:00:00","","EPSG","Not recommended.  Use only in cases where geodetic datum unknown.","96.08",NULL};
-datafile_rows_t horiz_cs_row_111[] = {"4014","Unknown datum based upon ellipsoid 7014","","","","","geographic 2D","6014","8901","North","East","Lat","Long","","9108","","","1996-09-12 00:00:00","","EPSG","Not recommended.  Use only in cases where geodetic datum unknown.","96.08",NULL};
-datafile_rows_t horiz_cs_row_112[] = {"4015","Unknown datum based upon ellipsoid 7015","","","","","geographic 2D","6015","8901","North","East","Lat","Long","","9108","","","1996-09-12 00:00:00","","EPSG","Not recommended.  Use only in cases where geodetic datum unknown.","96.08",NULL};
-datafile_rows_t horiz_cs_row_113[] = {"4016","Unknown datum based upon ellipsoid 7016","","","","","geographic 2D","6016","8901","North","East","Lat","Long","","9108","","","1996-09-12 00:00:00","","EPSG","Not recommended.  Use only in cases where geodetic datum unknown.","96.08",NULL};
-datafile_rows_t horiz_cs_row_114[] = {"4017","Unknown datum based upon ellipsoid 7017","","","","","geographic 2D","6017","8901","North","East","Lat","Long","","9108","","","1996-09-12 00:00:00","","EPSG","Not recommended.  Use only in cases where geodetic datum unknown.","96.08",NULL};
-datafile_rows_t horiz_cs_row_115[] = {"4018","Unknown datum based upon ellipsoid 7018","","","","","geographic 2D","6018","8901","North","East","Lat","Long","","9108","","","1996-09-12 00:00:00","","EPSG","Not recommended.  Use only in cases where geodetic datum unknown.","96.08",NULL};
-datafile_rows_t horiz_cs_row_116[] = {"4019","Unknown datum based upon ellipsoid 7019","","","","","geographic 2D","6019","8901","North","East","Lat","Long","","9108","","","1996-09-12 00:00:00","","EPSG","Not recommended.  Use only in cases where geodetic datum unknown.","96.08",NULL};
-datafile_rows_t horiz_cs_row_117[] = {"4020","Unknown datum based upon ellipsoid 7020","","","","","geographic 2D","6020","8901","North","East","Lat","Long","","9108","","","1996-09-12 00:00:00","","EPSG","Not recommended.  Use only in cases where geodetic datum unknown.","96.08",NULL};
-datafile_rows_t horiz_cs_row_118[] = {"4021","Unknown datum based upon ellipsoid 7021","","","","","geographic 2D","6021","8901","North","East","Lat","Long","","9108","","","1996-09-12 00:00:00","","EPSG","Not recommended.  Use only in cases where geodetic datum unknown.","96.08",NULL};
-datafile_rows_t horiz_cs_row_119[] = {"4022","Unknown datum based upon ellipsoid 7022","","","","","geographic 2D","6022","8901","North","East","Lat","Long","","9108","","","1996-09-12 00:00:00","","EPSG","Not recommended.  Use only in cases where geodetic datum unknown.","96.08",NULL};
-datafile_rows_t horiz_cs_row_120[] = {"4024","Unknown datum based upon ellipsoid 7024","","","","","geographic 2D","6024","8901","North","East","Lat","Long","","9108","","","1996-09-12 00:00:00","","EPSG","Not recommended.  Use only in cases where geodetic datum unknown.","96.08",NULL};
-datafile_rows_t horiz_cs_row_121[] = {"4025","Unknown datum based upon ellipsoid 7025","","","","","geographic 2D","6025","8901","North","East","Lat","Long","","9108","","","1996-09-12 00:00:00","","EPSG","Not recommended.  Use only in cases where geodetic datum unknown.","96.08",NULL};
-datafile_rows_t horiz_cs_row_122[] = {"4027","Unknown datum based upon ellipsoid 7027","","","","","geographic 2D","6027","8901","North","East","Lat","Long","","9108","","","1996-09-12 00:00:00","","EPSG","Not recommended.  Use only in cases where geodetic datum unknown.","96.08",NULL};
-datafile_rows_t horiz_cs_row_123[] = {"4028","Unknown datum based upon ellipsoid 7028","","","","","geographic 2D","6028","8901","North","East","Lat","Long","","9108","","","1996-09-12 00:00:00","","EPSG","Not recommended.  Use only in cases where geodetic datum unknown.","96.08",NULL};
-datafile_rows_t horiz_cs_row_124[] = {"4029","Unknown datum based upon ellipsoid 7029","","","","","geographic 2D","6029","8901","North","East","Lat","Long","","9108","","","1996-09-12 00:00:00","","EPSG","Not recommended.  Use only in cases where geodetic datum unknown.","96.08",NULL};
-datafile_rows_t horiz_cs_row_125[] = {"4030","Unknown datum based upon ellipsoid 7030","","","","","geographic 2D","6030","8901","North","East","Lat","Long","","9108","","","1996-09-12 00:00:00","","EPSG","Not recommended.  Use only in cases where geodetic datum unknown.","96.08",NULL};
-datafile_rows_t horiz_cs_row_126[] = {"4031","Unknown datum based upon ellipsoid 7031","","","","","geographic 2D","6031","8901","North","East","Lat","Long","","9108","","","1996-09-12 00:00:00","","EPSG","Not recommended.  Use only in cases where geodetic datum unknown.","96.08",NULL};
-datafile_rows_t horiz_cs_row_127[] = {"4032","Unknown datum based upon ellipsoid 7032","","","","","geographic 2D","6032","8901","North","East","Lat","Long","","9108","","","1996-09-12 00:00:00","","EPSG","Not recommended.  Use only in cases where geodetic datum unknown.","96.08",NULL};
-datafile_rows_t horiz_cs_row_128[] = {"4033","Unknown datum based upon ellipsoid 7033","","","","","geographic 2D","6033","8901","North","East","Lat","Long","","9108","","","1996-09-12 00:00:00","","EPSG","Not recommended.  Use only in cases where geodetic datum unknown.","96.08",NULL};
-datafile_rows_t horiz_cs_row_129[] = {"4034","Unknown datum based upon ellipsoid 7034","","","","","geographic 2D","6034","8901","North","East","Lat","Long","","9108","","","1996-09-12 00:00:00","","EPSG","Not recommended.  Use only in cases where geodetic datum unknown.","96.08",NULL};
-datafile_rows_t horiz_cs_row_130[] = {"4035","Unknown datum based upon ellipsoid 7035","","","","","geographic 2D","6035","8901","North","East","Lat","Long","","9108","","","1996-09-12 00:00:00","","EPSG","Not recommended.  Use only in cases where geodetic datum unknown.","96.08",NULL};
-datafile_rows_t horiz_cs_row_131[] = {"4036","Unknown datum based upon ellipsoid 7036","","","","","geographic 2D","6036","8901","North","East","Lat","Long","","9108","","","1996-09-12 00:00:00","","EPSG","Not recommended.  Use only in cases where geodetic datum unknown.","",NULL};
-datafile_rows_t horiz_cs_row_132[] = {"4041","Unknown datum based upon ellipsoid 7041","","","","","geographic 2D","6041","8901","North","East","Lat","Long","","9108","","","1999-10-20 00:00:00","","EPSG","Not recommended.  Use only in cases where geodetic datum unknown.","",NULL};
-datafile_rows_t horiz_cs_row_133[] = {"4042","Unknown datum based upon ellipsoid 7042","","","","","geographic 2D","6042","8901","North","East","Lat","Long","","9108","","","1999-10-20 00:00:00","","EPSG","Not recommended.  Use only in cases where geodetic datum unknown.","",NULL};
-datafile_rows_t horiz_cs_row_134[] = {"4043","Unknown datum based upon ellipsoid 7043","","","","","geographic 2D","6043","8901","North","East","Lat","Long","","9108","","","1999-10-20 00:00:00","","EPSG","Not recommended.  Use only in cases where geodetic datum unknown.","",NULL};
-datafile_rows_t horiz_cs_row_135[] = {"4044","Unknown datum based upon ellipsoid 7044","","","","","geographic 2D","6044","8901","North","East","Lat","Long","","9108","","","1999-10-20 00:00:00","","EPSG","Not recommended.  Use only in cases where geodetic datum unknown.","",NULL};
-datafile_rows_t horiz_cs_row_136[] = {"4045","Unknown datum based upon ellipsoid 7045","","","","","geographic 2D","6045","8901","North","East","Lat","Long","","9108","","","1999-10-20 00:00:00","","EPSG","Not recommended.  Use only in cases where geodetic datum unknown.","",NULL};
-datafile_rows_t horiz_cs_row_137[] = {"4120","Greek","","","","Greece","geographic 2D","6120","8901","North","East","Lat","Long","","9108","","","1997-06-16 00:00:00","Topography Department; National Technical University of Greece.","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_138[] = {"4121","GGRS87","","","","Greece","geographic 2D","6121","8901","North","East","Lat","Long","","9108","","","1997-06-16 00:00:00","Geodesy Department; Public Petroleum Corporation of Greece.","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_139[] = {"4122","ATS77","","","","Canada - New Brunswick; Canada - Nova Scotia - onshore; Canada - Prince Edward Island.","geographic 2D","6122","8901","North","East","Lat","Long","","9108","","","1997-07-22 00:00:00","New Brunswick Geographic Information Corporation land and water information standards manual.","EPSG","In use from 1979.  To be phased out in late 1990's.","",NULL};
-datafile_rows_t horiz_cs_row_140[] = {"4123","KKJ","","","","Finland","geographic 2D","6123","8901","North","East","Lat","Long","","9108","","","1997-07-22 00:00:00","www.nls.fi/maa/papers/kkj.html","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_141[] = {"4124","RT90","","","","Sweden","geographic 2D","6124","8901","North","East","Lat","Long","","9108","","","1997-11-13 00:00:00","National Land Survey of Sweden","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_142[] = {"4125","Samboja","","","","Indonesia - east Kalimantan - Mahakam delta area.","geographic 2D","6125","8901","North","East","Lat","Long","","9108","","","1997-11-13 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_143[] = {"4126","LKS94 (ETRS89)","","","","Lithuania","geographic 2D","6126","8901","North","East","Lat","Long","","9108","","","1998-03-13 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_144[] = {"4127","Tete","","","","Mozambique","geographic 2D","6127","8901","North","East","Lat","Long","","9108","","","1998-04-16 00:00:00","Direc��o Nacional de Geografia e Cadastral (DINAGECA).","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_145[] = {"4128","Madzansua","","","","Mozambique - west","geographic 2D","6128","8901","North","East","Lat","Long","","9108","","","1998-04-16 00:00:00","Direc��o Nacional de Geografia e Cadastral (DINAGECA).","EPSG","Superseded by values transformed to Tete geogCS (code 4127).","",NULL};
-datafile_rows_t horiz_cs_row_146[] = {"4129","Observatario","","","","Mozambique - south","geographic 2D","6129","8901","North","East","Lat","Long","","9108","","","1998-04-16 00:00:00","Direc��o Nacional de Geografia e Cadastral (DINAGECA).","EPSG","Superseded by values transformed to Tete geogCS (code 4127).","",NULL};
-datafile_rows_t horiz_cs_row_147[] = {"4130","Moznet","","","","Mozambique","geographic 2D","6130","8901","North","East","Lat","Long","","9108","","","1998-04-16 00:00:00","Direc��o Nacional de Geografia e Cadastral (DINAGECA).","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_148[] = {"4131","Indian 1960","","","","Cambodia; Vietnam","geographic 2D","6131","8901","North","East","Lat","Long","","9108","","","1998-11-11 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_149[] = {"4132","FD58","","","","Iran - Gulf coast and Arwaz areas.","geographic 2D","6132","8901","North","East","Lat","Long","","9108","","","1998-11-11 00:00:00","IOEPC records.","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_150[] = {"4133","EST92","","","","Estonia","geographic 2D","6133","8901","North","East","Lat","Long","","9108","","","1998-12-14 00:00:00","http://www.geo.ut.ee/~raivo/estcoord.html","EPSG","Densification of ETRS89 as established during 1992 Baltic campaign.","",NULL};
-datafile_rows_t horiz_cs_row_151[] = {"4134","PDO Survey Datum 1993","PSD93","","","Oman","geographic 2D","6134","8901","North","East","Lat","Long","","9108","","","1999-04-22 00:00:00","Petroleum Development Oman","EPSG","Supersedes Fahud geogCS (code 4232). Maximum differences to Fahud adjustment are 20 metres.","",NULL};
-datafile_rows_t horiz_cs_row_152[] = {"4135","Old Hawaiian","","","","United States (USA) - Hawaii","geographic 2D","6135","8901","North","East","Lat","Long","","9108","","","1999-05-24 00:00:00","","EPSG","Note: this coordinate system includes longitudes which are POSITIVE EAST.","",NULL};
-datafile_rows_t horiz_cs_row_153[] = {"4136","St. Lawrence Island","","","","United States (USA) - Alaska - St. Lawrence Island","geographic 2D","6136","8901","North","East","Lat","Long","","9108","","","1999-05-24 00:00:00","","EPSG","Note: this coordinate system includes longitudes which are POSITIVE EAST.","",NULL};
-datafile_rows_t horiz_cs_row_154[] = {"4137","St. Paul Island","","","","United States (USA) - Alaska - St. Paul Island","geographic 2D","6137","8901","North","East","Lat","Long","","9108","","","1999-05-24 00:00:00","","EPSG","Note: this coordinate system includes longitudes which are POSITIVE EAST.","",NULL};
-datafile_rows_t horiz_cs_row_155[] = {"4138","St. George Island","","","","United States (USA) - Alaska - St. George Island","geographic 2D","6138","8901","North","East","Lat","Long","","9108","","","1999-05-24 00:00:00","","EPSG","Note: this coordinate system includes longitudes which are POSITIVE EAST.","",NULL};
-datafile_rows_t horiz_cs_row_156[] = {"4139","Puerto Rico","","","","Puerto Rico; Virgin Islands (British); Virgin Islands (U.S.).","geographic 2D","6139","8901","North","East","Lat","Long","","9108","","","1999-05-24 00:00:00","","EPSG","Used for civilian purposes.  NAD27 (code 4267) used for military purposes.  Note: this coordinate system includes longitudes which are POSITIVE EAST.","",NULL};
-datafile_rows_t horiz_cs_row_157[] = {"4140","NAD83(CSRS98)","","","","Canada - New Brunswick","geographic 2D","6140","8901","North","East","Lat","Long","","9108","","","1999-10-20 00:00:00","Service New Brunswick Land and Information Standards Manual","EPSG","Supersedes ATS77 from 1999 in New Brunswick.","",NULL};
-datafile_rows_t horiz_cs_row_158[] = {"4141","Israel","","","","Israel.","geographic 2D","6141","8901","North","East","Lat","Long","","9108","","","1999-10-20 00:00:00","Survey of Israel","EPSG","Supersedes Palestine 1923 in Israel.","",NULL};
-datafile_rows_t horiz_cs_row_159[] = {"4142","Locodjo 1965","","","","Cote D'Ivoire (Ivory Coast).","geographic 2D","6142","8901","North","East","Lat","Long","","9108","","","1999-10-20 00:00:00","IGN Paris","EPSG","Superseded by Abidjan 1987 (EPSG code 4143).","",NULL};
-datafile_rows_t horiz_cs_row_160[] = {"4143","Abidjan 1987","","","","Cote D'Ivoire (Ivory Coast).","geographic 2D","6143","8901","North","East","Lat","Long","","9108","","","1999-10-20 00:00:00","IGN Paris","EPSG","Supersedes Locodjo 1967 (EPSG code 4142).","",NULL};
-datafile_rows_t horiz_cs_row_161[] = {"4144","Kalianpur 1937","","","","Bangladesh; India; Pakistan","geographic 2D","6144","8901","North","East","Lat","Long","","9108","","","1999-10-20 00:00:00","G. Bomford; \"The Re-adjustment of the Indian Triangulation\"; Survey of India Professional Paper 28; 1939.","EPSG","Adopts 1937 metric conversion of 0.30479841 metres per Indian foot.","",NULL};
-datafile_rows_t horiz_cs_row_162[] = {"4145","Kalianpur 1962","","","","Pakistan","geographic 2D","6145","8901","North","East","Lat","Long","","9108","","","1999-10-20 00:00:00","","EPSG","Adopts 1962 metric conversion of 0.3047996 metres per Indian foot.","",NULL};
-datafile_rows_t horiz_cs_row_163[] = {"4146","Kalianpur 1975","","","","India","geographic 2D","6146","8901","North","East","Lat","Long","","9108","","","1999-10-20 00:00:00","","EPSG","Adopts 1975 metric conversion of 0.3047995 metres per Indian foot.","",NULL};
-datafile_rows_t horiz_cs_row_164[] = {"4147","Hanoi 1972","","","","Vietnam","geographic 2D","6147","8901","North","East","Lat","Long","","9108","","","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_165[] = {"4148","Hartbeesthoek94","","","","South Africa.","geographic 2D","6148","8901","North","East","Lat","Long","","9108","","","1999-10-22 00:00:00","","EPSG","Supercedes Cape (code 4222) from 1999.","",NULL};
-datafile_rows_t horiz_cs_row_166[] = {"4149","CH1903","","","","Liechtenstein; Switzerland","geographic 2D","6149","8901","North","East","Lat","Long","","9108","","","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_167[] = {"4150","CH1903+","","","","Liechtenstein; Switzerland","geographic 2D","6150","8901","North","East","Lat","Long","","9108","","","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_168[] = {"4151","CHTRF95","","","","Liechtenstein; Switzerland","geographic 2D","6151","8901","North","East","Lat","Long","","9108","","","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_169[] = {"4152","NAD83(HARN)","","","","United States (US)","geographic 2D","6152","8901","North","East","Lat","Long","","9108","","","1999-10-20 00:00:00","National Geodetic Survey","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_170[] = {"4153","Rassadiran","","","","Iran - Taheri refinery site only.","geographic 2D","6153","8901","North","East","Lat","Long","","9108","","","1999-10-20 00:00:00","","EPSG","Used only for onshore terminal site.","",NULL};
-datafile_rows_t horiz_cs_row_171[] = {"4154","ED50(ED77)","","","","Iran","geographic 2D","6154","8901","North","East","Lat","Long","","9108","","","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_172[] = {"4200","Pulkovo 1995","","","","Russia","geographic 2D","6200","8901","North","East","Lat","Long","","9108","","","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_173[] = {"4201","Adindan","","","","Ethiopia; Sudan","geographic 2D","6201","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_174[] = {"4202","AGD66","","","","Australia; Papua New Guinea","geographic 2D","6202","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_175[] = {"4203","AGD84","","","","Australia","geographic 2D","6203","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_176[] = {"4204","Ain el Abd","","","","Kuwait; Saudi Arabia","geographic 2D","6204","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_177[] = {"4205","Afgooye","","","","Somalia","geographic 2D","6205","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_178[] = {"4206","Agadez","","","","Niger","geographic 2D","6206","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_179[] = {"4207","Lisbon","","","","Portugal - onshore","geographic 2D","6207","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","Instituto Geografico e Cadastral; Lisbon","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_180[] = {"4208","Aratu","","","","Brazil - coastal areas south of 2 deg 55 min S.","geographic 2D","6208","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_181[] = {"4209","Arc 1950","","","","Botswana; Malawi; Zambia; Zimbabwe.","geographic 2D","6209","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_182[] = {"4210","Arc 1960","","","","Kenya; Tanzania; Uganda.","geographic 2D","6210","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_183[] = {"4211","Batavia","","","","Indonesia - Java","geographic 2D","6211","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_184[] = {"4212","Barbados 1938","","","","Barbados","geographic 2D","6212","8901","North","East","Lat","Long","","9108","","","1999-04-22 00:00:00","","EPSG","","99.171",NULL};
-datafile_rows_t horiz_cs_row_185[] = {"4213","Beduaram","","","","Niger","geographic 2D","6213","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_186[] = {"4214","Beijing 1954","","","","China","geographic 2D","6214","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_187[] = {"4215","Belge 1950","","","","Belgium - onshore","geographic 2D","6215","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_188[] = {"4216","Bermuda 1957","","","","Bermuda","geographic 2D","6216","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_189[] = {"4218","Bogota","","","","Colombia","geographic 2D","6218","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_190[] = {"4219","Bukit Rimpah","","","","Indonesia - Banga & Belitung Islands","geographic 2D","6219","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_191[] = {"4220","Camacupa","","","","Angola","geographic 2D","6220","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_192[] = {"4221","Campo Inchauspe","","","","Argentina","geographic 2D","6221","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_193[] = {"4222","Cape","","","","Botswana; South Africa.","geographic 2D","6222","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","Superceded by Hartbeesthoek94 from 1999.","",NULL};
-datafile_rows_t horiz_cs_row_194[] = {"4223","Carthage","","","","Tunisia","geographic 2D","6223","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_195[] = {"4224","Chua","","","","Brazil","geographic 2D","6224","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_196[] = {"4225","Corrego Alegre","","","","Brazil - NE coastal area between 45 deg W and 40 deg W.","geographic 2D","6225","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_197[] = {"4226","Cote d'Ivoire","","","","Cote d'Ivoire","geographic 2D","6226","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_198[] = {"4227","Deir ez Zor","","","","Syrian Arab Republic","geographic 2D","6227","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_199[] = {"4228","Douala","","","","Cameroon","geographic 2D","6228","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_200[] = {"4229","Egypt 1907","","","","Egypt","geographic 2D","6229","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_201[] = {"4230","ED50","","","","Europe - west - Spain; France offshore; United Kingdom UKCS offshore; Netherlands offshore; Germany offshore North Sea; Denmark; Norway; Turkey.","geographic 2D","6230","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_202[] = {"4231","ED87","","","","Europe - west.","geographic 2D","6231","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_203[] = {"4232","Fahud","","","","Oman","geographic 2D","6232","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","Since 1993 superseded by PSD93 geogCS (code 4134). Maximum differences to Fahud adjustment are 20 metres.","",NULL};
-datafile_rows_t horiz_cs_row_204[] = {"4233","Gandajika 1970","","","","Maldives","geographic 2D","6233","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_205[] = {"4234","Garoua","","","","Cameroon","geographic 2D","6234","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_206[] = {"4235","Guyane Francaise","","","","French Guyana","geographic 2D","6235","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_207[] = {"4236","Hu Tzu Shan","","","","Taiwan","geographic 2D","6236","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_208[] = {"4237","HD72","","","","Hungary","geographic 2D","6237","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_209[] = {"4238","ID74","","","","Indonesia","geographic 2D","6238","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_210[] = {"4239","Indian 1954","","","","Myanmar (Burma); Thailand","geographic 2D","6239","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_211[] = {"4240","Indian 1975","","","","Thailand","geographic 2D","6240","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_212[] = {"4241","Jamaica 1875","","","","Jamaica","geographic 2D","6241","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_213[] = {"4242","JAD69","","","","Jamaica","geographic 2D","6242","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_214[] = {"4243","Kalianpur 1880","","","","Bangladesh; India; Myanmar (Burma); Pakistan","geographic 2D","6243","8901","North","East","Lat","Long","","9108","","","1999-10-20 00:00:00","G. Bomford; \"The Re-adjustment of the Indian Triangulation\"; Survey of India Professional Paper 28; 1939.","EPSG","","97.23",NULL};
-datafile_rows_t horiz_cs_row_215[] = {"4244","Kandawala","","","","Sri Lanka","geographic 2D","6244","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_216[] = {"4245","Kertau","","","","Malaysia - West Malaysia; Singapore","geographic 2D","6245","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","Adopts metric conversion of 39.370113 inches per metre.","",NULL};
-datafile_rows_t horiz_cs_row_217[] = {"4246","KOC","","","","Kuwait","geographic 2D","6246","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_218[] = {"4247","La Canoa","","","","Venezuela","geographic 2D","6247","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","PSAD56 uses same origin.","",NULL};
-datafile_rows_t horiz_cs_row_219[] = {"4248","PSAD56","","","","Bolivia; Ecuador; Peru; [Venezuela]","geographic 2D","6248","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","Origin is same as La Canoa.  In Venezuela known as La Canoa.","",NULL};
-datafile_rows_t horiz_cs_row_220[] = {"4249","Lake","","","","Venezuela - Lake Maracaibo area","geographic 2D","6249","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_221[] = {"4250","Leigon","","","","Ghana","geographic 2D","6250","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_222[] = {"4251","Liberia 1964","","","","Liberia","geographic 2D","6251","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_223[] = {"4252","Lome","","","","Togo","geographic 2D","6252","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_224[] = {"4253","Luzon 1911","","","","Philippines","geographic 2D","6253","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_225[] = {"4254","Hito XVIII 1963","","","","Chile - Tierra del Fuego","geographic 2D","6254","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_226[] = {"4255","Herat North","","","","Afghanistan","geographic 2D","6255","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_227[] = {"4256","Mahe 1971","","","","Seychelles","geographic 2D","6256","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_228[] = {"4257","Makassar","","","","Indonesia - south west Sulawesi","geographic 2D","6257","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_229[] = {"4258","ETRF89","","","","Europe - Hungary; Norway; Sweden; United Kingdom (UKCS) offshore.","geographic 2D","6258","8901","North","East","Lat","Long","","9108","","","1999-04-22 00:00:00","Norwegian Geodetic Institute geodetic publication 1990:1","EPSG","","97.11  99.11",NULL};
-datafile_rows_t horiz_cs_row_230[] = {"4259","Malongo 1987","","","","Angola - Cabinda offshore","geographic 2D","6259","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","Chevron Petroleum Technology","EPSG","Offshore extension of Mhast GeogCS (4264) using Transit translocation from Station Y at Malongo base camp.","",NULL};
-datafile_rows_t horiz_cs_row_231[] = {"4260","Manoca","","","","Cameroon","geographic 2D","6260","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_232[] = {"4261","Merchich","","","","Morocco","geographic 2D","6261","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_233[] = {"4262","Massawa","","","","Eritrea","geographic 2D","6262","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_234[] = {"4263","Minna","","","","Nigeria","geographic 2D","6263","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_235[] = {"4264","Mhast","","","","Angola - Cabinda","geographic 2D","6264","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_236[] = {"4265","Monte Mario","","","","Italy","geographic 2D","6265","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_237[] = {"4266","M'poraloko","","","","Gabon","geographic 2D","6266","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_238[] = {"4267","NAD27","","","","North and central America - Canada; Mexico; United States (USA).","geographic 2D","6267","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","Note: this coordinate system includes longitudes which are POSITIVE EAST.  Superseded by NAD27(76) (code 4608) in Ontario and CGQ77 (code 4609) in Quebec.","99.04",NULL};
-datafile_rows_t horiz_cs_row_239[] = {"4268","NAD27 Michigan","NAD Michigan","","","United States (USA) - Michigan","geographic 2D","6268","8901","North","East","Lat","Long","","9108","","","1996-12-12 00:00:00","","EPSG","Ellipsoid taken to be 800ft above geoid. Note: this coordinate system includes longitudes which are POSITIVE EAST.","96.28",NULL};
-datafile_rows_t horiz_cs_row_240[] = {"4269","NAD83","","","","Canada: Greenland; Mexico; United States (USA)","geographic 2D","6269","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","Note: this coordinate system includes longitudes which are POSITIVE EAST.","",NULL};
-datafile_rows_t horiz_cs_row_241[] = {"4270","Nahrwan 1967","","","","Arabian Gulf; Kuwait; United Arab Emirates (UAE) - Abu Dhabi; Dubai; Sharjah; Ajman; Fujairah; Ras Al Kaimah; Umm Al Qaiwain.","geographic 2D","6270","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_242[] = {"4271","Naparima 1972","","","","Trinidad and Tobago","geographic 2D","6271","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_243[] = {"4272","GD49","","","","New Zealand","geographic 2D","6272","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_244[] = {"4273","NGO 1948","","","","Norway - onshore","geographic 2D","6273","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_245[] = {"4274","Datum 73","","","","Portugal - onshore","geographic 2D","6274","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","Instituto Geografico e Cadastral; Lisbon","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_246[] = {"4275","NTF","","","","France - onshore","geographic 2D","6275","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_247[] = {"4276","NSWC 9Z-2","","","","World","geographic 2D","6276","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_248[] = {"4277","OSGB 1936","","","","United Kingdom (UK) - Great Britain - England  Scotland  Wales - onshore; Isle of Man.","geographic 2D","6277","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_249[] = {"4278","OSGB70","","","","United Kingdom (UK) - Great Britain - England  Scotland  wales - onshore","geographic 2D","6278","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_250[] = {"4279","OS(SN)80","","","","Ireland - onshore; United Kingdom (UK) - England  Scotland  Wales  Northern Ireland - onshore E","geographic 2D","6279","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_251[] = {"4280","Padang","","","","Indonesia - Sumatra","geographic 2D","6280","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_252[] = {"4281","Palestine 1923","","","","Israel; Jordan; Lebanon","geographic 2D","6281","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_253[] = {"4282","Pointe Noire","","","","Congo","geographic 2D","6282","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_254[] = {"4283","GDA94","","","","Australia","geographic 2D","6283","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","Australian Surveying and Land Information Group Internet WWW page.","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_255[] = {"4284","Pulkovo 1942","","","","Armenia; Azerbaijan; Belarus; Estonia; Georgia; Kazakstan; Kirgistan; Latvia; Lithuania; Moldova; Russia; Tadzhikstan; Turkmenistan; Ukraine; Uzbekistan; Germany (former DDR); Czech Republic; Hungary; Poland; Romania; Latvia; Lithuania; Estonia; Albania","geographic 2D","6284","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_256[] = {"4285","Qatar","","","","Qatar - onshore","geographic 2D","6285","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_257[] = {"4286","Qatar 1948","","","","Qatar - onshore","geographic 2D","6286","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_258[] = {"4287","Qornoq","","","","Greenland","geographic 2D","6287","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_259[] = {"4288","Loma Quintana","","","","Venezuela - north","geographic 2D","6288","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_260[] = {"4289","Amersfoort","","","","Netherlands - onshore","geographic 2D","6289","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_261[] = {"4291","SAD69","","","","South America - Brazil","geographic 2D","6291","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.251.  Error introduced if not using the truncated precision is 0 to 31mm.","97.252",NULL};
-datafile_rows_t horiz_cs_row_262[] = {"4292","Sapper Hill 1943","","","","Falkland Islands","geographic 2D","6292","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_263[] = {"4293","Schwarzeck","","","","Namibia","geographic 2D","6293","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_264[] = {"4294","Segora","","","","Indonesia - southeast Kalimantan","geographic 2D","6294","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_265[] = {"4295","Serindung","","","","Indonesia - east Kalimantan","geographic 2D","6295","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_266[] = {"4296","Sudan","","","","Sudan - south","geographic 2D","6296","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_267[] = {"4297","Tananarive","","","","Madagascar","geographic 2D","6297","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_268[] = {"4298","Timbalai 1948","","","","Brunei; Malaysia - East Malaysia (Sabah; Sarawak).","geographic 2D","6298","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","Adopts metric conversion of 39.370147 inches per metre.","",NULL};
-datafile_rows_t horiz_cs_row_269[] = {"4299","TM65","","","","Ireland - onshore; United Kingdom (UK) - Northern Ireland (Ulster) onshore","geographic 2D","6299","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_270[] = {"4300","TM75","","","","Ireland - onshore; United Kingdom (UK) - Northern Ireland (Ulster) onshore","geographic 2D","6300","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_271[] = {"4301","Tokyo","","","","Japan; North Korea; South Korea","geographic 2D","6301","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_272[] = {"4302","Trinidad 1903","","","","Trinidad and Tobago - Trinidad","geographic 2D","6302","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_273[] = {"4303","TC(1948)","","","","United Arab Emirates (UAE) - Abu Dhabi; Dubai","geographic 2D","6303","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_274[] = {"4304","Voirol 1875","","","","Algeria - north of 32 deg N","geographic 2D","6304","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","IGN Paris","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_275[] = {"4305","Voirol Unifie","","","","Algeria - north of 32 deg N","geographic 2D","6305","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","\"Le System Geodesique Nord-Sahara\"; IGN Paris","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_276[] = {"4306","Bern 1938","","","","Liechtenstein; Switzerland","geographic 2D","6306","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","Used for the geographic coordinates overprinted on topographic maps constructed on the CH1903 / LV03 projected CS (code 21781).","",NULL};
-datafile_rows_t horiz_cs_row_277[] = {"4307","Nord Sahara 1959","","","","Algeria; Morocco; Tunisia","geographic 2D","6307","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","\"Le System Geodesique Nord-Sahara\"; IGN Paris","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_278[] = {"4308","RT38","","","","Sweden","geographic 2D","6308","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","97.09",NULL};
-datafile_rows_t horiz_cs_row_279[] = {"4309","Yacare","","","","Uruguay","geographic 2D","6309","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_280[] = {"4310","Yoff","","","","Senegal","geographic 2D","6310","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_281[] = {"4311","Zanderij","","","","Suriname","geographic 2D","6311","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_282[] = {"4312","MGI","","","","Austria; Yugoslavia","geographic 2D","6312","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","Bundesamt fur Eich- und Vermessungswesen; Wien","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_283[] = {"4313","Belge 1972","","","","Belgium - onshore","geographic 2D","6313","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_284[] = {"4314","DHDN","","","","Germany - onshore","geographic 2D","6314","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_285[] = {"4315","Conakry 1905","","","","Guinea","geographic 2D","6315","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_286[] = {"4316","Dealul Piscului 1933","","","","Romania","geographic 2D","6316","8901","North","East","Lat","Long","","9108","","","1996-04-12 00:00:00","","EPSG","Superseded by 1970 system (geogCS code 4317).","",NULL};
-datafile_rows_t horiz_cs_row_287[] = {"4317","Dealul Piscului 1970","","","","Romania","geographic 2D","6317","8901","North","East","Lat","Long","","9108","","","1996-04-12 00:00:00","","EPSG","Supersedes 1933 system (geogCS code 4316).","",NULL};
-datafile_rows_t horiz_cs_row_288[] = {"4318","NGN","","","","Kuwait","geographic 2D","6318","8901","North","East","Lat","Long","","9108","","","1996-04-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_289[] = {"4319","KUDAMS","","","","Kuwait - Kuwait City","geographic 2D","6319","8901","North","East","Lat","Long","","9108","","","1996-04-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_290[] = {"4322","WGS 72","","","","World","geographic 2D","6322","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","GeogCS code 4323 reserved for use with  ProjCS's.","",NULL};
-datafile_rows_t horiz_cs_row_291[] = {"4324","WGS 72BE","","","","World","geographic 2D","6324","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","GeogCS code 4325 reserved for use with  ProjCS's.","",NULL};
-datafile_rows_t horiz_cs_row_292[] = {"4326","WGS 84","","","","World","geographic 2D","6326","8901","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","GeogCS code 4327 reserved for use with  ProjCS's.","",NULL};
-datafile_rows_t horiz_cs_row_293[] = {"4600","Anguilla 1957","","","","Anguilla","geographic 2D","6600","8901","North","East","Lat","Long","","9108","","","1999-04-22 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_294[] = {"4601","Antigua 1943","","","","Antigua and Barbuda - Antigua","geographic 2D","6601","8901","North","East","Lat","Long","","9108","","","1999-04-22 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_295[] = {"4602","Dominica 1945","","","","Dominica","geographic 2D","6602","8901","North","East","Lat","Long","","9108","","","1999-04-22 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_296[] = {"4603","Grenada 1953","","","","Grenada (including Grenada Grenadines)","geographic 2D","6603","8901","North","East","Lat","Long","","9108","","","1999-04-22 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_297[] = {"4604","Montserrat 1958","","","","Montserrat","geographic 2D","6604","8901","North","East","Lat","Long","","9108","","","1999-04-22 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_298[] = {"4605","St. Kitts 1955","","","","Saint Kitts and Nevis","geographic 2D","6605","8901","North","East","Lat","Long","","9108","","","1999-04-22 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_299[] = {"4606","St. Lucia 1955","","","","Saint Lucia","geographic 2D","6606","8901","North","East","Lat","Long","","9108","","","1999-04-22 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_300[] = {"4607","St. Vincent 1945","","","","Saint Vincent and the Grenadines","geographic 2D","6607","8901","North","East","Lat","Long","","9108","","","1999-04-22 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_301[] = {"4608","NAD27(76)","","","","Canada - Ontario","geographic 2D","6608","8901","North","East","Lat","Long","","9108","","","1999-05-12 00:00:00","","EPSG","Note: this coordinate system includes longitudes which are POSITIVE EAST.","",NULL};
-datafile_rows_t horiz_cs_row_302[] = {"4609","NAD27(CGQ77)","CGQ77","","","Canada - Quebec","geographic 2D","6609","8901","North","East","Lat","Long","","9108","","","1999-05-12 00:00:00","","EPSG","Note: this coordinate system includes longitudes which are POSITIVE EAST.","",NULL};
-datafile_rows_t horiz_cs_row_303[] = {"4801","Bern 1898 (Bern)","","","","Liechtenstein; Switzerland","geographic 2D","6149","8907","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_304[] = {"4802","Bogota (Bogota)","","","","Colombia","geographic 2D","6218","8904","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_305[] = {"4803","Lisbon (Lisbon)","","","","Portugal - onshore","geographic 2D","6207","8902","North","East","Lat","Long","","9108","","","1997-04-11 00:00:00","Instituto Geografico e Cadastral; Lisbon","EPSG","","97.12",NULL};
-datafile_rows_t horiz_cs_row_306[] = {"4804","Makassar (Jakarta)","","","","Indonesia - south west Sulawesi","geographic 2D","6257","8908","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_307[] = {"4805","MGI (Ferro)","","","","Austria; Yugoslavia","geographic 2D","6312","8909","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","Bundesamt fur Eich- und Vermessungswesen; Wien","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_308[] = {"4806","Monte Mario (Rome)","","","","Italy","geographic 2D","6265","8906","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_309[] = {"4807","NTF (Paris)","","","","France - onshore","geographic 2D","6275","8903","North","East","Lat","Long","","9105","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_310[] = {"4808","Padang (Jakarta)","","","","Indonesia - Sumatra","geographic 2D","6280","8908","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_311[] = {"4809","Belge 1950 (Brussels)","","","","Belgium - onshore","geographic 2D","6215","8910","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_312[] = {"4810","Tananarive (Paris)","","","","Madagascar","geographic 2D","6297","8903","North","East","Lat","Long","","9105","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_313[] = {"4811","Voirol 1875 (Paris)","","","","Algeria - north of 32 deg N","geographic 2D","6304","8903","North","East","Lat","Long","","9105","","","1995-06-02 00:00:00","IGN Paris","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_314[] = {"4812","Voirol Unifie (Paris)","","","","Algeria - north of 32 deg N","geographic 2D","6305","8903","North","East","Lat","Long","","9105","","","1995-06-02 00:00:00","\"Le System Geodesique Nord-Sahara\"; IGN Paris","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_315[] = {"4813","Batavia (Jakarta)","","","","Indonesia - Java","geographic 2D","6211","8908","North","East","Lat","Long","","9108","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_316[] = {"4814","RT38 (Stockholm)","","","","Sweden","geographic 2D","6308","8911","North","East","Lat","Long","","9108","","","1996-04-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_317[] = {"4815","Greek (Athens)","","","","Greece","geographic 2D","6120","8912","North","East","Lat","Long","","9108","","","1997-06-16 00:00:00","Topography Department; National Technical University of Greece.","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_318[] = {"4816","Carthage (Paris)","","","","Tunisia","geographic 2D","6223","8903","North","East","Lat","Long","","9105","","","1998-11-11 00:00:00","","EPSG","Superseded by Greenwich-based Carthage geogCS.","",NULL};
-datafile_rows_t horiz_cs_row_319[] = {"4817","NGO 1948 (Oslo)","","","","Norway - onshore","geographic 2D","6273","8913","North","East","Lat","Long","","9108","","","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_320[] = {"4901","ATF (Paris)","","","","France","geographic 2D","6901","8903","North","East","Lat","Long","","9105","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_321[] = {"4902","NDG (Paris)","","","","France - Alsace","geographic 2D","6902","8903","North","East","Lat","Long","","9105","","","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_322[] = {"4903","Madrid 1870 (Madrid)","","","","Spain","geographic 2D","6903","8905","North","East","Lat","Long","","9108","","","1998-11-11 00:00:00","Institut de Geomatica; Barcelona.","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_323[] = {"20004","Pulkovo 1995 / Gauss-Kruger zone 4","1995 Coord. Sys. zone 4","","","Russia - west of 24 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16204","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_324[] = {"20005","Pulkovo 1995 / Gauss-Kruger zone 5","1995 Coord. Sys. zone 5","","","Russia - 24 deg to 30 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16205","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_325[] = {"20006","Pulkovo 1995 / Gauss-Kruger zone 6","1995 Coord. Sys. zone 6","","","Russia - 30 deg to 36 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16206","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_326[] = {"20007","Pulkovo 1995 / Gauss-Kruger zone 7","1995 Coord. Sys. zone 7","","","Russia - 36 deg to 42 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16207","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_327[] = {"20008","Pulkovo 1995 / Gauss-Kruger zone 8","1995 Coord. Sys. zone 8","","","Russia - 42 deg to 48 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16208","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_328[] = {"20009","Pulkovo 1995 / Gauss-Kruger zone 9","1995 Coord. Sys. zone 9","","","Russia - 48 deg to 54 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16209","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_329[] = {"20010","Pulkovo 1995 / Gauss-Kruger zone 10","1995 Coord. Sys. zone 10","","","Russia - 54 deg  to 60 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16210","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_330[] = {"20011","Pulkovo 1995 / Gauss-Kruger zone 11","1995 Coord. Sys. zone 11","","","Russia - 60 deg to 66 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16211","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_331[] = {"20012","Pulkovo 1995 / Gauss-Kruger zone 12","1995 Coord. Sys. zone 12","","","Russia - 66 deg to 72 deg East .","projected 2D","","","North","East","X","Y","9001","","4200","16212","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_332[] = {"20013","Pulkovo 1995 / Gauss-Kruger zone 13","1995 Coord. Sys. zone 13","","","Russia - 72 deg to 78 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16213","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_333[] = {"20014","Pulkovo 1995 / Gauss-Kruger zone 14","1995 Coord. Sys. zone 14","","","Russia - 78 deg to 84 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16214","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_334[] = {"20015","Pulkovo 1995 / Gauss-Kruger zone 15","1995 Coord. Sys. zone 15","","","Russia - 84 deg to 90 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16215","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_335[] = {"20016","Pulkovo 1995 / Gauss-Kruger zone 16","1995 Coord. Sys. zone 16","","","Russia - 90 deg to 96 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16216","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_336[] = {"20017","Pulkovo 1995 / Gauss-Kruger zone 17","1995 Coord. Sys. zone 17","","","Russia - 96 deg to 102deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16217","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_337[] = {"20018","Pulkovo 1995 / Gauss-Kruger zone 18","1995 Coord. Sys. zone 18","","","Russia - 102 deg to 108 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16218","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_338[] = {"20019","Pulkovo 1995 / Gauss-Kruger zone 19","1995 Coord. Sys. zone 19","","","Russia - 108 deg to 114 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16219","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_339[] = {"20020","Pulkovo 1995 / Gauss-Kruger zone 20","1995 Coord. Sys. zone 20","","","Russia - 114 deg to 120 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16220","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_340[] = {"20021","Pulkovo 1995 / Gauss-Kruger zone 21","1995 Coord. Sys. zone 21","","","Russia - 120 deg to 126 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16221","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_341[] = {"20022","Pulkovo 1995 / Gauss-Kruger zone 22","1995 Coord. Sys. zone 22","","","Russia - 126 deg to 132 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16222","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_342[] = {"20023","Pulkovo 1995 / Gauss-Kruger zone 23","1995 Coord. Sys. zone 23","","","Russia - 132 deg to 138 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16223","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_343[] = {"20024","Pulkovo 1995 / Gauss-Kruger zone 24","1995 Coord. Sys. zone 24","","","Russia - 138 deg to 144 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16224","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_344[] = {"20025","Pulkovo 1995 / Gauss-Kruger zone 25","1995 Coord. Sys. zone 25","","","Russia - 144 deg to 150 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16225","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_345[] = {"20026","Pulkovo 1995 / Gauss-Kruger zone 26","1995 Coord. Sys. zone 26","","","Russia - 150 deg to 156 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16226","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_346[] = {"20027","Pulkovo 1995 / Gauss-Kruger zone 27","1995 Coord. Sys. zone 27","","","Russia - 156 deg to 162 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16227","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_347[] = {"20028","Pulkovo 1995 / Gauss-Kruger zone 28","1995 Coord. Sys. zone 28","","","Russia - 162 deg to 168 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16228","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_348[] = {"20029","Pulkovo 1995 / Gauss-Kruger zone 29","1995 Coord. Sys. zone 29","","","Russia - 168 deg to 174 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16229","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_349[] = {"20030","Pulkovo 1995 / Gauss-Kruger zone 30","1995 Coord. Sys. zone 30","","","Russia - 174 deg East to 180 deg.","projected 2D","","","North","East","X","Y","9001","","4200","16230","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_350[] = {"20031","Pulkovo 1995 / Gauss-Kruger zone 31","1995 Coord. Sys. zone 31","","","Russia - 180 deg to 174 deg West.","projected 2D","","","North","East","X","Y","9001","","4200","16231","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_351[] = {"20032","Pulkovo 1995 / Gauss-Kruger zone 32","1995 Coord. Sys. zone 32","","","Russia - east of 174 deg West.","projected 2D","","","North","East","X","Y","9001","","4200","16232","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_352[] = {"20064","Pulkovo 1995 / Gauss-Kruger 4N","Pulkovo 1995 / Gauss 4N","","","Russia - west of 24 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16304","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_353[] = {"20065","Pulkovo 1995 / Gauss-Kruger 5N","Pulkovo 1995 / Gauss 5N","","","Russia - 24 deg to 30 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16305","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_354[] = {"20066","Pulkovo 1995 / Gauss-Kruger 6N","Pulkovo 1995 / Gauss 6N","","","Russia - 30 deg to 36 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16306","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_355[] = {"20067","Pulkovo 1995 / Gauss-Kruger 7N","Pulkovo 1995 / Gauss 7N","","","Russia - 36 deg to 42 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16307","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_356[] = {"20068","Pulkovo 1995 / Gauss-Kruger 8N","Pulkovo 1995 / Gauss 8N","","","Russia - 42 deg to 48 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16308","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_357[] = {"20069","Pulkovo 1995 / Gauss-Kruger 9N","Pulkovo 1995 / Gauss 9N","","","Russia - 48 deg to 54 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16309","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_358[] = {"20070","Pulkovo 1995 / Gauss-Kruger 10N","Pulkovo 1995 / Gauss 10N","","","Russia - 54 deg  to 60 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16310","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_359[] = {"20071","Pulkovo 1995 / Gauss-Kruger 11N","Pulkovo 1995 / Gauss 11N","","","Russia - 60 deg to 66 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16311","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_360[] = {"20072","Pulkovo 1995 / Gauss-Kruger 12N","Pulkovo 1995 / Gauss 12N","","","Russia - 66 deg to 72 deg East .","projected 2D","","","North","East","X","Y","9001","","4200","16312","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_361[] = {"20073","Pulkovo 1995 / Gauss-Kruger 13N","Pulkovo 1995 / Gauss 13N","","","Russia - 72 deg to 78 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16313","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_362[] = {"20074","Pulkovo 1995 / Gauss-Kruger 14N","Pulkovo 1995 / Gauss 14N","","","Russia - 78 deg to 84 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16314","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_363[] = {"20075","Pulkovo 1995 / Gauss-Kruger 15N","Pulkovo 1995 / Gauss 15N","","","Russia - 84 deg to 90 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16315","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_364[] = {"20076","Pulkovo 1995 / Gauss-Kruger 16N","Pulkovo 1995 / Gauss 16N","","","Russia - 90 deg to 96 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16316","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_365[] = {"20077","Pulkovo 1995 / Gauss-Kruger 17N","Pulkovo 1995 / Gauss 17N","","","Russia - 96 deg to 102deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16317","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_366[] = {"20078","Pulkovo 1995 / Gauss-Kruger 18N","Pulkovo 1995 / Gauss 18N","","","Russia - 102 deg to 108 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16318","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_367[] = {"20079","Pulkovo 1995 / Gauss-Kruger 19N","Pulkovo 1995 / Gauss 19N","","","Russia - 108 deg to 114 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16319","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_368[] = {"20080","Pulkovo 1995 / Gauss-Kruger 20N","Pulkovo 1995 / Gauss 20N","","","Russia - 114 deg to 120 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16320","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_369[] = {"20081","Pulkovo 1995 / Gauss-Kruger 21N","Pulkovo 1995 / Gauss 21N","","","Russia - 120 deg to 126 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16321","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_370[] = {"20082","Pulkovo 1995 / Gauss-Kruger 22N","Pulkovo 1995 / Gauss 22N","","","Russia - 126 deg to 132 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16322","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_371[] = {"20083","Pulkovo 1995 / Gauss-Kruger 23N","Pulkovo 1995 / Gauss 23N","","","Russia - 132 deg to 138 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16323","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_372[] = {"20084","Pulkovo 1995 / Gauss-Kruger 24N","Pulkovo 1995 / Gauss 24N","","","Russia - 138 deg to 144 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16324","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_373[] = {"20085","Pulkovo 1995 / Gauss-Kruger 25N","Pulkovo 1995 / Gauss 25N","","","Russia - 144 deg to 150 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16325","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_374[] = {"20086","Pulkovo 1995 / Gauss-Kruger 26N","Pulkovo 1995 / Gauss 26N","","","Russia - 150 deg to 156 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16326","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_375[] = {"20087","Pulkovo 1995 / Gauss-Kruger 27N","Pulkovo 1995 / Gauss 27N","","","Russia - 156 deg to 162 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16327","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_376[] = {"20088","Pulkovo 1995 / Gauss-Kruger 28N","Pulkovo 1995 / Gauss 28N","","","Russia - 162 deg to 168 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16328","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_377[] = {"20089","Pulkovo 1995 / Gauss-Kruger 29N","Pulkovo 1995 / Gauss 29N","","","Russia - 168 deg to 174 deg East.","projected 2D","","","North","East","X","Y","9001","","4200","16329","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_378[] = {"20090","Pulkovo 1995 / Gauss-Kruger 30N","Pulkovo 1995 / Gauss 30N","","","Russia - 174 deg East to 180 deg.","projected 2D","","","North","East","X","Y","9001","","4200","16330","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_379[] = {"20091","Pulkovo 1995 / Gauss-Kruger 31N","Pulkovo 1995 / Gauss 31N","","","Russia - 180 deg to 174 deg West.","projected 2D","","","North","East","X","Y","9001","","4200","16331","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_380[] = {"20092","Pulkovo 1995 / Gauss-Kruger 32N","Pulkovo 1995 / Gauss 32N","","","Russia - east of 174 deg West.","projected 2D","","","North","East","X","Y","9001","","4200","16332","1996-09-12 00:00:00","\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_381[] = {"20137","Adindan / UTM zone 37N","","","","Ethiopia - west of 42 degrees East.  Sudan - west of 42 degrees East.","projected 2D","","","East","North","E","N","9001","","4201","16037","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_382[] = {"20138","Adindan / UTM zone 38N","","","","Ethiopia - east of 42 degrees East.  Sudan - east of 42 degrees East.","projected 2D","","","East","North","E","N","9001","","4201","16038","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_383[] = {"20248","AGD66 / AMG zone 48","","","","Australia - 102deg East to 108deg East.","projected 2D","","","East","North","E","N","9001","","4202","17448","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_384[] = {"20249","AGD66 / AMG zone 49","","","","Australia - 108deg East to 114deg East.","projected 2D","","","East","North","E","N","9001","","4202","17449","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_385[] = {"20250","AGD66 / AMG zone 50","","","","Australia - 114deg East to 120deg East.","projected 2D","","","East","North","E","N","9001","","4202","17450","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_386[] = {"20251","AGD66 / AMG zone 51","","","","Australia - 120deg East to 126deg East.","projected 2D","","","East","North","E","N","9001","","4202","17451","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_387[] = {"20252","AGD66 / AMG zone 52","","","","Australia - 126deg East to 132deg East.","projected 2D","","","East","North","E","N","9001","","4202","17452","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_388[] = {"20253","AGD66 / AMG zone 53","","","","Australia - 132deg East to 138deg East.","projected 2D","","","East","North","E","N","9001","","4202","17453","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_389[] = {"20254","AGD66 / AMG zone 54","","","","Australia - 138deg East to 144deg East.  Papua New Guinea - west of 144deg East.","projected 2D","","","East","North","E","N","9001","","4202","17454","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_390[] = {"20255","AGD66 / AMG zone 55","","","","Australia - 144deg East to 150deg East.  Papua New Guinea - 144deg East to 150deg East.","projected 2D","","","East","North","E","N","9001","","4202","17455","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_391[] = {"20256","AGD66 / AMG zone 56","","","","Australia - 150deg East to 156deg East.","projected 2D","","","East","North","E","N","9001","","4202","17456","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_392[] = {"20257","AGD66 / AMG zone 57","","","","Australia - 156deg East to 162deg East.","projected 2D","","","East","North","E","N","9001","","4202","17457","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_393[] = {"20258","AGD66 / AMG zone 58","","","","Australia - 162deg East to 168deg East.","projected 2D","","","East","North","E","N","9001","","4202","17458","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_394[] = {"20348","AGD84 / AMG zone 48","","","","Australia - 102deg East to 108deg East.","projected 2D","","","East","North","E","N","9001","","4203","17448","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_395[] = {"20349","AGD84 / AMG zone 49","","","","Australia - 108deg East to 114deg East.","projected 2D","","","East","North","E","N","9001","","4203","17449","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_396[] = {"20350","AGD84 / AMG zone 50","","","","Australia - 114deg East to 120deg East.","projected 2D","","","East","North","E","N","9001","","4203","17450","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_397[] = {"20351","AGD84 / AMG zone 51","","","","Australia - 120deg East to 126deg East.","projected 2D","","","East","North","E","N","9001","","4203","17451","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_398[] = {"20352","AGD84 / AMG zone 52","","","","Australia - 126deg East to 132deg East.","projected 2D","","","East","North","E","N","9001","","4203","17452","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_399[] = {"20353","AGD84 / AMG zone 53","","","","Australia - 132deg East to 138deg East.","projected 2D","","","East","North","E","N","9001","","4203","17453","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_400[] = {"20354","AGD84 / AMG zone 54","","","","Australia - 138deg East to 144deg East.  Papua - New Guinea west of 144deg East.","projected 2D","","","East","North","E","N","9001","","4203","17454","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_401[] = {"20355","AGD84 / AMG zone 55","","","","Australia - 144deg East to 150deg East.  Papua New Guinea - 144deg East to 150deg East.","projected 2D","","","East","North","E","N","9001","","4203","17455","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_402[] = {"20356","AGD84 / AMG zone 56","","","","Australia - 150deg East to 156deg East.","projected 2D","","","East","North","E","N","9001","","4203","17456","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_403[] = {"20357","AGD84 / AMG zone 57","","","","Australia - 156deg East to 162deg East.","projected 2D","","","East","North","E","N","9001","","4203","17457","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_404[] = {"20358","AGD84 / AMG zone 58","","","","Australia - 162deg East to 168deg East.","projected 2D","","","East","North","E","N","9001","","4203","17458","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_405[] = {"20437","Ain el Abd / UTM zone 37N","Ain el Abd / UTM 37N","","","Saudi Arabia - west of 42 degrees East.","projected 2D","","","East","North","E","N","9001","","4204","16037","1997-11-13 00:00:00","","EPSG","","97.59",NULL};
-datafile_rows_t horiz_cs_row_406[] = {"20438","Ain el Abd / UTM zone 38N","Ain el Abd / UTM 38N","","","Kuwait.  Saudi Arabia - between 42 degrees and 48 degrees East.","projected 2D","","","East","North","E","N","9001","","4204","16038","1997-11-13 00:00:00","","EPSG","Known in Kuwait as \"KOC UTM\".","97.59",NULL};
-datafile_rows_t horiz_cs_row_407[] = {"20439","Ain el Abd / UTM zone 39N","Ain el Abd / UTM 39N","","","Saudi Arabia - east of 48 degrees East.","projected 2D","","","East","North","E","N","9001","","4204","16039","1997-11-13 00:00:00","","EPSG","","97.59",NULL};
-datafile_rows_t horiz_cs_row_408[] = {"20499","Ain el Abd / Bahrain Grid","","","","Bahrain.","projected 2D","","","East","North","E","N","9001","","4204","19900","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_409[] = {"20538","Afgooye / UTM zone 38N","","","","Somalia - west of 48 degrees East.","projected 2D","","","East","North","E","N","9001","","4205","16038","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_410[] = {"20539","Afgooye / UTM zone 39N","","","","Somalia - east of 48 degrees East.","projected 2D","","","East","North","E","N","9001","","4205","16039","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_411[] = {"20790","Lisbon (Lisbon)/Portuguese National Grid","Lisbon / Portuguese Grid","","","Portugal - onshore.","projected 2D","","","East","North","X","Y","9001","","4803","19936","1998-11-11 00:00:00","","EPSG","","98.42",NULL};
-datafile_rows_t horiz_cs_row_412[] = {"20822","Aratu / UTM zone 22S","","","","Brazil - coastal areas south of 2 deg 55 min South and west of 48 deg West.","projected 2D","","","East","North","E","N","9001","","4208","16122","1995-07-21 00:00:00","","EPSG","","95.191",NULL};
-datafile_rows_t horiz_cs_row_413[] = {"20823","Aratu / UTM zone 23S","","","","Brazil - coastal areas south of 2 deg 55 min South and between 48 and 42 deg West; offshore Santos basin.","projected 2D","","","East","North","E","N","9001","","4208","16123","1995-07-21 00:00:00","","EPSG","","95.191",NULL};
-datafile_rows_t horiz_cs_row_414[] = {"20824","Aratu / UTM zone 24S","","","","Brazil - coastal areas south of 2 deg 55 min South and east of 42 deg West; offshore Campos basin.","projected 2D","","","East","North","E","N","9001","","4208","16124","1995-07-21 00:00:00","","EPSG","","95.191",NULL};
-datafile_rows_t horiz_cs_row_415[] = {"20934","Arc 1950 / UTM zone 34S","","","","Botswana & Zambia - west of 24 deg East.","projected 2D","","","East","North","E","N","9001","","4209","16134","1997-11-13 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_416[] = {"20935","Arc 1950 / UTM zone 35S","","","","Botswana - east of 24 deg East; Zambia - 24 to 30 deg East; Zimbabwe west of 30 deg East .","projected 2D","","","East","North","E","N","9001","","4209","16135","1997-11-13 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_417[] = {"20936","Arc 1950 / UTM zone 36S","","","","Malawi; Zambia & Zimbabwe - east of 30 deg East.","projected 2D","","","East","North","E","N","9001","","4209","16136","1997-11-13 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_418[] = {"21035","Arc 1960 / UTM zone 35S","","","","Tanzania - west of 30 deg East; Uganda south of equator and west of 30 deg East.","projected 2D","","","East","North","E","N","9001","","4210","16135","1997-11-13 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_419[] = {"21036","Arc 1960 / UTM zone 36S","","","","Kenya - south of equator and west of 36 deg East; Tanzania - 30 to 36 deg East; Uganda south of equator and east of 30 deg East.","projected 2D","","","East","North","E","N","9001","","4210","16136","1997-11-13 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_420[] = {"21037","Arc 1960 / UTM zone 37S","","","","Kenya - south of equator and east of 36 deg East; Tanzania - east of 36 deg East.","projected 2D","","","East","North","E","N","9001","","4210","16137","1997-11-13 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_421[] = {"21095","Arc 1960 / UTM zone 35N","","","","Uganda north of equator and west of 30 deg East.","projected 2D","","","East","North","E","N","9001","","4210","16035","1997-11-13 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_422[] = {"21096","Arc 1960 / UTM zone 36N","","","","Kenya - north of equator and west of 36 deg East; Uganda north of equator and east of 30 deg East.","projected 2D","","","East","North","E","N","9001","","4210","16036","1997-11-13 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_423[] = {"21097","Arc 1960 / UTM zone 37N","","","","Kenya - north of equator and east of 36 deg East.","projected 2D","","","East","North","E","N","9001","","4210","16037","1997-11-13 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_424[] = {"21100","Batavia (Jakarta) / NEIEZ","Batavia / NEIEZ","","","Indonesia - Java.","projected 2D","","","East","North","X","Y","9001","","4813","19905","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_425[] = {"21148","Batavia / UTM zone 48S","","","","Indonesia - Java west of 108 deg East.","projected 2D","","","East","North","E","N","9001","","4211","16148","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_426[] = {"21149","Batavia / UTM zone 49S","","","","Indonesia - Java between 108 and 114 deg East.","projected 2D","","","East","North","E","N","9001","","4211","16149","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_427[] = {"21150","Batavia / UTM zone 50S","","","","Indonesia - Java east of 114 deg East.","projected 2D","","","East","North","E","N","9001","","4211","16150","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_428[] = {"21291","Barbados 1938 / British West Indies Grid","Barbados 1938 / BWI Grid","","","Barbados","projected 2D","","","East","North","E","N","9001","","4212","19942","1999-04-22 00:00:00","Ordnance Survey of Great Britain","EPSG","Superseded by Barbados National Grid (code 21292) from 1983.","",NULL};
-datafile_rows_t horiz_cs_row_429[] = {"21292","Barbados 1938 / Barbados National Grid","Barbados NationaI Grid","","","Barbados","projected 2D","","","East","North","E","N","9001","","4212","19943","1999-04-22 00:00:00","Ordnance Survey of Great Britain","EPSG","Supersedes Barbados 1938 / BWI Grid (code 21291) from 1983.","",NULL};
-datafile_rows_t horiz_cs_row_430[] = {"21413","Beijing 1954 / Gauss-Kruger zone 13","Beijing / Gauss zone 13","","","China - west of 78 deg East.","projected 2D","","","North","East","X","Y","9001","","4214","16213","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_431[] = {"21414","Beijing 1954 / Gauss-Kruger zone 14","Beijing / Gauss zone 14","","","China - 78 deg East  to 84 deg East.","projected 2D","","","North","East","X","Y","9001","","4214","16214","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_432[] = {"21415","Beijing 1954 / Gauss-Kruger zone 15","Beijing / Gauss zone 15","","","China - 84 deg East  to 90 deg East.","projected 2D","","","North","East","X","Y","9001","","4214","16215","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_433[] = {"21416","Beijing 1954 / Gauss-Kruger zone 16","Beijing / Gauss zone 16","","","China - 90 deg East  to 96 deg East.","projected 2D","","","North","East","X","Y","9001","","4214","16216","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_434[] = {"21417","Beijing 1954 / Gauss-Kruger zone 17","Beijing / Gauss zone 17","","","China - 96 deg East  to 102eg E","projected 2D","","","North","East","X","Y","9001","","4214","16217","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_435[] = {"21418","Beijing 1954 / Gauss-Kruger zone 18","Beijing / Gauss zone 18","","","China - 102 deg East  to 108 deg East.","projected 2D","","","North","East","X","Y","9001","","4214","16218","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_436[] = {"21419","Beijing 1954 / Gauss-Kruger zone 19","Beijing / Gauss zone 19","","","China - 108 deg East  to 114 deg East.","projected 2D","","","North","East","X","Y","9001","","4214","16219","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_437[] = {"21420","Beijing 1954 / Gauss-Kruger zone 20","Beijing / Gauss zone 20","","","China - 114 deg East  to 120 deg East.","projected 2D","","","North","East","X","Y","9001","","4214","16220","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_438[] = {"21421","Beijing 1954 / Gauss-Kruger zone 21","Beijing / Gauss zone 21","","","China - 120 deg East  to 126 deg East.","projected 2D","","","North","East","X","Y","9001","","4214","16221","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_439[] = {"21422","Beijing 1954 / Gauss-Kruger zone 22","Beijing / Gauss zone 22","","","China - 126 deg East  to 132 deg East.","projected 2D","","","North","East","X","Y","9001","","4214","16222","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_440[] = {"21423","Beijing 1954 / Gauss-Kruger zone 23","Beijing / Gauss zone 23","","","China - east of 132 deg East.","projected 2D","","","North","East","X","Y","9001","","4214","16223","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_441[] = {"21473","Beijing 1954 / Gauss-Kruger 13N","Beijing / Gauss 13N","","","China - west of 78 deg East.","projected 2D","","","North","East","X","Y","9001","","4214","16313","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_442[] = {"21474","Beijing 1954 / Gauss-Kruger 14N","Beijing / Gauss 14N","","","China - 78 deg East  to 84 deg East.","projected 2D","","","North","East","X","Y","9001","","4214","16314","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_443[] = {"21475","Beijing 1954 / Gauss-Kruger 15N","Beijing / Gauss 15N","","","China - 84 deg East  to 90 deg East.","projected 2D","","","North","East","X","Y","9001","","4214","16315","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_444[] = {"21476","Beijing 1954 / Gauss-Kruger 16N","Beijing / Gauss 16N","","","China - 90 deg East  to 96 deg East.","projected 2D","","","North","East","X","Y","9001","","4214","16316","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_445[] = {"21477","Beijing 1954 / Gauss-Kruger 17N","Beijing / Gauss 17N","","","China - 96 deg East  to 102eg E","projected 2D","","","North","East","X","Y","9001","","4214","16317","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_446[] = {"21478","Beijing 1954 / Gauss-Kruger 18N","Beijing / Gauss 18N","","","China - 102 deg East  to 108 deg East.","projected 2D","","","North","East","X","Y","9001","","4214","16318","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_447[] = {"21479","Beijing 1954 / Gauss-Kruger 19N","Beijing / Gauss 19N","","","China - 108 deg East  to 114 deg East.","projected 2D","","","North","East","X","Y","9001","","4214","16319","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_448[] = {"21480","Beijing 1954 / Gauss-Kruger 20N","Beijing / Gauss 20N","","","China - 114 deg East  to 120 deg East.","projected 2D","","","North","East","X","Y","9001","","4214","16320","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_449[] = {"21481","Beijing 1954 / Gauss-Kruger 21N","Beijing / Gauss 21N","","","China - 120 deg East  to 126 deg East.","projected 2D","","","North","East","X","Y","9001","","4214","16321","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_450[] = {"21482","Beijing 1954 / Gauss-Kruger 22N","Beijing / Gauss 22N","","","China - 126 deg East  to 132 deg East.","projected 2D","","","North","East","X","Y","9001","","4214","16322","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_451[] = {"21483","Beijing 1954 / Gauss-Kruger 23N","Beijing / Gauss 23N","","","China - east of 132 deg East.","projected 2D","","","North","East","X","Y","9001","","4214","16323","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_452[] = {"21500","Belge 1950 (Brussels) / Belge Lambert 50","Belge Lambert 50","","","Belgium - onshore.","projected 2D","","","East","North","X","Y","9001","","4809","19901","1997-04-11 00:00:00","","EPSG","Superseded by 31300 (Belge 1972 / Belge Lambert 72).","97.13",NULL};
-datafile_rows_t horiz_cs_row_453[] = {"21780","Bern 1898 (Bern) / LV03C","LV03C","","","Liechtenstein.  Switzerland.","projected 2D","","","East","North","Y","X","9001","","4801","19923","1997-06-30 00:00:00","","EPSG","Superseded by CH1903 / LV03 (code 21781).","97.27  97.62",NULL};
-datafile_rows_t horiz_cs_row_454[] = {"21781","CH1903 / LV03","LV03","","","Liechtenstein; Switzerland.","projected 2D","","","East","North","Y","X","9001","","4149","19922","1999-10-20 00:00:00","","EPSG","Supersedes LV03C (code 21780).  Superseded by CH1903+/LV95 (code 256).","",NULL};
-datafile_rows_t horiz_cs_row_455[] = {"21817","Bogota / UTM zone 17N","","","","Colombia - offshore west of 78 deg W of Greenwich.","projected 2D","","","East","North","E","N","9001","","4218","16017","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_456[] = {"21818","Bogota / UTM zone 18N","","","","Colombia - offshore east of 78 deg W of Greenwich.","projected 2D","","","East","North","E","N","9001","","4218","16018","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_457[] = {"21891","Bogota / Colombia West zone","Bogota / Colombia 3W","","","Colombia - west of 1 deg 30 min W of Bogota (75d 34m 51.30s W of Greenwich).","projected 2D","","","East","North","X","Y","9001","","4218","18051","1997-11-13 00:00:00","","EPSG","","97.11  97.57",NULL};
-datafile_rows_t horiz_cs_row_458[] = {"21892","Bogota / Colombia Bogota zone","Bogota / Colombia Bogota","","","Colombia - 1 deg 30 min W to 1 deg 30 min E of Bogota (75d 35m W to 72d 35m W of Greenwich).","projected 2D","","","East","North","X","Y","9001","","4218","18052","1997-11-13 00:00:00","","EPSG","","97.11  97.57",NULL};
-datafile_rows_t horiz_cs_row_459[] = {"21893","Bogota / Colombia East Central zone","Bogota / Colombia 3E","","","Colombia - 1 deg 30 min to 4 deg 30 min E of Bogota (72d 35m to 69d 34m W of Greenwich).","projected 2D","","","East","North","X","Y","9001","","4218","18053","1997-11-13 00:00:00","","EPSG","","97.11  97.57",NULL};
-datafile_rows_t horiz_cs_row_460[] = {"21894","Bogota / Colombia East","Bogota / Colombia 6E","","","Colombia - east of 4 deg 30 min E of Bogota (69d 34m 51.3s W of Greenwich).","projected 2D","","","East","North","X","Y","9001","","4218","18054","1997-11-13 00:00:00","","EPSG","","97.11  97.57",NULL};
-datafile_rows_t horiz_cs_row_461[] = {"22032","Camacupa / UTM zone 32S","","","","Angola - west of 12 deg East.","projected 2D","","","East","North","E","N","9001","","4220","16132","1997-11-13 00:00:00","","EPSG","","97.58",NULL};
-datafile_rows_t horiz_cs_row_462[] = {"22033","Camacupa / UTM zone 33S","","","","Angola - east of 12 deg East.","projected 2D","","","East","North","E","N","9001","","4220","16133","1997-11-13 00:00:00","","EPSG","","97.58",NULL};
-datafile_rows_t horiz_cs_row_463[] = {"22091","Camacupa / TM 11.30 SE","","","","Angola - offshore.","projected 2D","","","East","North","E","N","9001","","4220","16611","1998-11-11 00:00:00","Esso Angola","EPSG","Used by Esso Angola for offshore blocks 15 and 24.","",NULL};
-datafile_rows_t horiz_cs_row_464[] = {"22092","Camacupa / TM 12 SE","","","","Angola - offshore.","projected 2D","","","East","North","E","N","9001","","4220","16612","1998-11-11 00:00:00","Shell Angola","EPSG","Used by Shell Angola for offshore blocks 1 and 16.  Used by BP Amoco, Elf and Esso for offshore blocks 31-33.","",NULL};
-datafile_rows_t horiz_cs_row_465[] = {"22191","Campo Inchauspe / Argentina 1","C Inchauspe /Argentina 1","","","Argentina - west of 70 deg 30 min West.","projected 2D","","","North","East","X","Y","9001","","4221","18031","1999-11-15 00:00:00","","EPSG","","97.72",NULL};
-datafile_rows_t horiz_cs_row_466[] = {"22192","Campo Inchauspe / Argentina 2","C Inchauspe /Argentina 2","","","Argentina - between 70 deg 30 min and 67 deg 30 min West.","projected 2D","","","North","East","X","Y","9001","","4221","18032","1999-11-15 00:00:00","","EPSG","","97.72",NULL};
-datafile_rows_t horiz_cs_row_467[] = {"22193","Campo Inchauspe / Argentina 3","C Inchauspe /Argentina 3","","","Argentina - between 67 deg 30 min and 64 deg 30 min West.","projected 2D","","","North","East","X","Y","9001","","4221","18033","1999-11-15 00:00:00","","EPSG","","97.72",NULL};
-datafile_rows_t horiz_cs_row_468[] = {"22194","Campo Inchauspe / Argentina 4","C Inchauspe /Argentina 4","","","Argentina - between 64 deg 30 min and 61 deg 30 min West.","projected 2D","","","North","East","X","Y","9001","","4221","18034","1999-11-15 00:00:00","","EPSG","","97.72",NULL};
-datafile_rows_t horiz_cs_row_469[] = {"22195","Campo Inchauspe / Argentina 5","C Inchauspe /Argentina 5","","","Argentina - between 61 deg 30 min and 58 deg 30 min West.","projected 2D","","","North","East","X","Y","9001","","4221","18035","1999-11-15 00:00:00","","EPSG","","97.72",NULL};
-datafile_rows_t horiz_cs_row_470[] = {"22196","Campo Inchauspe / Argentina 6","C Inchauspe /Argentina 6","","","Argentina - between 58 deg 30 min and 55 deg 30 min West.","projected 2D","","","North","East","X","Y","9001","","4221","18036","1999-11-15 00:00:00","","EPSG","","97.72",NULL};
-datafile_rows_t horiz_cs_row_471[] = {"22197","Campo Inchauspe / Argentina 7","C Inchauspe /Argentina 7","","","Argentina - east of 55 deg 30 min West.","projected 2D","","","North","East","X","Y","9001","","4221","18037","1999-11-15 00:00:00","","EPSG","","97.72",NULL};
-datafile_rows_t horiz_cs_row_472[] = {"22234","Cape / UTM zone 34S","","","","Botswana - west of 21deg East.","projected 2D","","","East","North","E","N","9001","","4222","16134","1995-12-08 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_473[] = {"22235","Cape / UTM zone 35S","","","","Botswana - east of 27deg East.","projected 2D","","","East","North","E","N","9001","","4222","16135","1995-12-08 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_474[] = {"22236","Cape / UTM zone 36S","","","","Botswana - between 21 and 27deg East.","projected 2D","","","East","North","E","N","9001","","4222","16136","1995-12-08 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_475[] = {"22275","South African Coordinate System zone 15","South African CS zone 15","","","South Africa - Walvis Bay.","projected 2D","","","West","South","W","S","9001","","4222","17515","1996-04-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_476[] = {"22277","South African Coordinate System zone 17","South African CS zone 17","","","South Africa - west of 18 deg East.","projected 2D","","","West","South","W","S","9001","","4222","17517","1996-04-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_477[] = {"22279","South African Coordinate System zone 19","South African CS zone 19","","","South Africa - 18 to 20 deg East.","projected 2D","","","West","South","W","S","9001","","4222","17519","1996-04-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_478[] = {"22281","South African Coordinate System zone 21","South African CS zone 21","","","South Africa - 20 to 22 deg East.","projected 2D","","","West","South","W","S","9001","","4222","17521","1996-04-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_479[] = {"22283","South African Coordinate System zone 23","South African CS zone 23","","","South Africa - 22 to 24 deg East.","projected 2D","","","West","South","W","S","9001","","4222","17523","1996-04-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_480[] = {"22285","South African Coordinate System zone 25","South African CS zone 25","","","Lestho  - west of 26 deg East; South Africa - 24 to 26 deg East.","projected 2D","","","West","South","W","S","9001","","4222","17525","1996-04-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_481[] = {"22287","South African Coordinate System zone 27","South African CS zone 27","","","Lestho  - east of 26 deg East;  South Africa - 26 to 28 deg East.","projected 2D","","","West","South","W","S","9001","","4222","17527","1996-04-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_482[] = {"22289","South African Coordinate System zone 29","South African CS zone 29","","","South Africa - 28 to 30 deg East.","projected 2D","","","West","South","W","S","9001","","4222","17529","1996-04-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_483[] = {"22291","South African Coordinate System zone 31","South African CS zone 31","","","South Africa - 30 to 32 deg East;  Swaziland.","projected 2D","","","West","South","W","S","9001","","4222","17531","1996-04-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_484[] = {"22293","South African Coordinate System zone 33","South African CS zone 33","","","South Africa - east of 32 deg East.","projected 2D","","","West","South","W","S","9001","","4222","17533","1996-04-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_485[] = {"22300","Carthage (Paris) / Tunisia Mining Grid","Tunisia Mining Grid","","","Tunisia - onshore.","projected 2D","","","East","North","X","Y","9036","","4816","19937","1998-11-11 00:00:00","","EPSG","CAUTION: Carthage datum did not exist when the 1953 decree was issued and an inference is that grid should be applied to the Voirol 1875 geogCS.  Common practice assumes that the current Tunisian geodetic datum of Carthage applies.","",NULL};
-datafile_rows_t horiz_cs_row_486[] = {"22332","Carthage / UTM zone 32N","","","","Tunisia - offshore.","projected 2D","","","East","North","X","Y","9001","","4223","16032","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_487[] = {"22391","Carthage / Nord Tunisie","","","","Tunisia - north of 38.5 grads (34 deg 39 min) North.","projected 2D","","","East","North","X","Y","9001","","4223","18181","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_488[] = {"22392","Carthage / Sud Tunisie","","","","Tunisia - south of 38.5 grads (34 deg 39 min) North.","projected 2D","","","East","North","X","Y","9001","","4223","18182","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_489[] = {"22523","Corrego Alegre / UTM zone 23S","Corrego Alegre / UTM 23S","","","Brazil - NE coastal area between 45 deg W and 42 deg W.","projected 2D","","","East","North","E","N","9001","","4225","16123","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_490[] = {"22524","Corrego Alegre / UTM zone 24S","Corrego Alegre / UTM 24S","","","Brazil - NE coastal area between 42 deg W and 40 deg W.","projected 2D","","","East","North","E","N","9001","","4225","16124","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_491[] = {"22700","Deir ez Zor / Levant Zone","","","","Syrian Arab Republic west of 39 deg E.","projected 2D","","","East","North","X","Y","9001","","4227","19940","1999-04-22 00:00:00","","EPSG","Superseded by Deir ez Zor / Syria Lambert (EPSG code 22770) from 1973.","",NULL};
-datafile_rows_t horiz_cs_row_492[] = {"22770","Deir ez Zor / Syria Lambert","","","","Syrian Arab Republic","projected 2D","","","East","North","X","Y","9001","","4227","19948","1999-10-20 00:00:00","","EPSG","Supersedes Deir ez Zor / Levant zone (EPSG code 22700) from 1973.","",NULL};
-datafile_rows_t horiz_cs_row_493[] = {"22832","Douala / UTM zone 32N","","","","Cameroon.","projected 2D","","","East","North","E","N","9001","","4228","16032","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_494[] = {"22991","Egypt 1907 / Blue Belt","","","","Egypt  - Sinai peninsula.","projected 2D","","","East","North","E","N","9001","","4229","18071","1999-04-22 00:00:00","","EPSG","Also known as Egypt 1907 / Green Belt.    Oil industry usually uses Egypt 1907 / Red Belt rather than this projected CS.","",NULL};
-datafile_rows_t horiz_cs_row_495[] = {"22992","Egypt 1907 / Red Belt","","","","Egypt  - east of 29 deg East.","projected 2D","","","East","North","E","N","9001","","4229","18072","1995-06-02 00:00:00","","EPSG","See also Egypt 1907 / Blue Belt for non oil industry usage in Sinai peninsula.","",NULL};
-datafile_rows_t horiz_cs_row_496[] = {"22993","Egypt 1907 / Purple Belt","","","","Egypt -  west of 29 deg E; north of approx 28 deg 11 min North.","projected 2D","","","East","North","E","N","9001","","4229","18073","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_497[] = {"22994","Egypt 1907 / Extended Purple Belt","Egypt 1907 / Ext. Purple","","","Egypt  - west of 29 deg E; south of approx 28 deg 11 min North.","projected 2D","","","East","North","E","N","9001","","4229","18074","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_498[] = {"23028","ED50 / UTM zone 28N","","","","Europe - 18deg West to 12deg West - Ireland offshore; United Kingdom (UKCS) offshore.","projected 2D","","","East","North","E","N","9001","","4230","16028","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_499[] = {"23029","ED50 / UTM zone 29N","","","","Europe - 12deg West to 6deg West - Portugal; Spain; Ireland offshore; United Kingdom (UKCS) offshore.","projected 2D","","","East","North","E","N","9001","","4230","16029","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_500[] = {"23030","ED50 / UTM zone 30N","","","","Europe - 6deg West to 0deg - Spain; France offshore; Ireland offshore; United Kingdom - UKCS offshore - North Sea west of 0 deg East).","projected 2D","","","East","North","E","N","9001","","4230","16030","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_501[] = {"23031","ED50 / UTM zone 31N","","","","Europe - 0deg to 6deg East - Denmark (North Sea); Germany offshore; Netherlands offshore; Norway; United Kingdom (UKCS) offshore.","projected 2D","","","East","North","E","N","9001","","4230","16031","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_502[] = {"23032","ED50 / UTM zone 32N","","","","Europe - 6deg East  to 12deg East - Denmark; Germany offshore; Netherlands offshore; Norway.","projected 2D","","","East","North","E","N","9001","","4230","16032","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_503[] = {"23033","ED50 / UTM zone 33N","","","","Europe - 12deg East  to 18deg East - Denmark including Bornholm; Norway.","projected 2D","","","East","North","E","N","9001","","4230","16033","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_504[] = {"23034","ED50 / UTM zone 34N","","","","Europe - 18deg East  to 24deg East - Greece; Norway.","projected 2D","","","East","North","E","N","9001","","4230","16034","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_505[] = {"23035","ED50 / UTM zone 35N","","","","Europe - 24deg East  to 30deg East - Greece; Norway; Turkey.","projected 2D","","","East","North","E","N","9001","","4230","16035","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_506[] = {"23036","ED50 / UTM zone 36N","","","","Europe - 30deg East  to 36deg East - Turkey.","projected 2D","","","East","North","E","N","9001","","4230","16036","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_507[] = {"23037","ED50 / UTM zone 37N","","","","Europe - 36deg East  to 42deg East - Turkey.","projected 2D","","","East","North","E","N","9001","","4230","16037","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_508[] = {"23038","ED50 / UTM zone 38N","","","","Europe - 42deg East  to 48deg East - Turkey.","projected 2D","","","East","North","E","N","9001","","4230","16038","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_509[] = {"23090","ED50 / TM 0 N","","","","United Kingdom (UKCS) - offshore North Sea.","projected 2D","","","East","North","E","N","9001","","4230","16400","1998-11-11 00:00:00","Shell UK","EPSG","Used by Shell UK for North Sea","",NULL};
-datafile_rows_t horiz_cs_row_510[] = {"23095","ED50 / TM 5 NE","","","","Netherlands - offshore North Sea.","projected 2D","","","East","North","E","N","9001","","4230","16405","1998-11-11 00:00:00","NAM","EPSG","Used by NAM","",NULL};
-datafile_rows_t horiz_cs_row_511[] = {"23239","Fahud / UTM zone 39N","","","","Oman - west of 54 deg East.","projected 2D","","","East","North","E","N","9001","","4232","16039","1995-06-02 00:00:00","","EPSG","Since 1993 superseded by PSD93 / UTM zone 39N projCS (code 3439). Maximum differences to Fahud adjustment are 20 metres.","",NULL};
-datafile_rows_t horiz_cs_row_512[] = {"23240","Fahud / UTM zone 40N","","","","Oman - east of 54 deg East.","projected 2D","","","East","North","E","N","9001","","4232","16040","1995-06-02 00:00:00","","EPSG","Since 1993 superseded by PSD93 / UTM zone 40N projCS (code 3440). Maximum differences to Fahud adjustment are 20 metres.","",NULL};
-datafile_rows_t horiz_cs_row_513[] = {"23433","Garoua / UTM zone 33N","","","","Cameroon.","projected 2D","","","East","North","E","N","9001","","4234","16033","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_514[] = {"23700","HD72 / EOV","","","","Hungary","projected 2D","","","East","North","Y","X","9001","","4237","19931","1997-07-22 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_515[] = {"23846","ID74 / UTM zone 46N","","","","Indonesia - north of equator and west of 96 deg East.","projected 2D","","","East","North","E","N","9001","","4238","16046","1995-08-08 00:00:00","","EPSG","","95.193  95.20",NULL};
-datafile_rows_t horiz_cs_row_516[] = {"23847","ID74 / UTM zone 47N","","","","Indonesia - north of equator and between 96 deg and 102 deg East.","projected 2D","","","East","North","E","N","9001","","4238","16047","1995-07-21 00:00:00","","EPSG","","95.193",NULL};
-datafile_rows_t horiz_cs_row_517[] = {"23848","ID74 / UTM zone 48N","","","","Indonesia - north of equator and between 102 deg and 108 deg East.","projected 2D","","","East","North","E","N","9001","","4238","16048","1995-07-21 00:00:00","","EPSG","","95.193",NULL};
-datafile_rows_t horiz_cs_row_518[] = {"23849","ID74 / UTM zone 49N","","","","Indonesia - north of equator and between 108 deg and 114 deg East.","projected 2D","","","East","North","E","N","9001","","4238","16049","1995-07-21 00:00:00","","EPSG","","95.193",NULL};
-datafile_rows_t horiz_cs_row_519[] = {"23850","ID74 / UTM zone 50N","","","","Indonesia - north of equator and between 114 deg and 120 deg East.","projected 2D","","","East","North","E","N","9001","","4238","16050","1995-07-21 00:00:00","","EPSG","","95.193",NULL};
-datafile_rows_t horiz_cs_row_520[] = {"23851","ID74 / UTM zone 51N","","","","Indonesia - north of equator and between 120 deg and 126 deg East.","projected 2D","","","East","North","E","N","9001","","4238","16051","1995-07-21 00:00:00","","EPSG","","95.193",NULL};
-datafile_rows_t horiz_cs_row_521[] = {"23852","ID74 / UTM zone 52N","","","","Indonesia - north of equator and between 126 deg and 132 deg East.","projected 2D","","","East","North","E","N","9001","","4238","16052","1995-07-21 00:00:00","","EPSG","","95.193",NULL};
-datafile_rows_t horiz_cs_row_522[] = {"23853","ID74 / UTM zone 53N","","","","Indonesia - north of equator and east of 132 deg East.","projected 2D","","","East","North","E","N","9001","","4238","16053","1995-07-21 00:00:00","","EPSG","","95.193",NULL};
-datafile_rows_t horiz_cs_row_523[] = {"23886","ID74 / UTM zone 46S","","","","Indonesia - south of equator and west of 96 deg East.","projected 2D","","","East","North","E","N","9001","","4238","16146","1995-08-08 00:00:00","","EPSG","","95.193  95.20",NULL};
-datafile_rows_t horiz_cs_row_524[] = {"23887","ID74 / UTM zone 47S","","","","Indonesia - south of equator and between 96 deg and 102 deg East.","projected 2D","","","East","North","E","N","9001","","4238","16147","1995-07-21 00:00:00","","EPSG","","95.193",NULL};
-datafile_rows_t horiz_cs_row_525[] = {"23888","ID74 / UTM zone 48S","","","","Indonesia - south of equator and between 102 deg and 108 deg East.","projected 2D","","","East","North","E","N","9001","","4238","16148","1995-07-21 00:00:00","","EPSG","","95.193",NULL};
-datafile_rows_t horiz_cs_row_526[] = {"23889","ID74 / UTM zone 49S","","","","Indonesia - south of equator and between 108 deg and 114 deg East.","projected 2D","","","East","North","E","N","9001","","4238","16149","1995-07-21 00:00:00","","EPSG","","95.193",NULL};
-datafile_rows_t horiz_cs_row_527[] = {"23890","ID74 / UTM zone 50S","","","","Indonesia - south of equator and between 114 deg and 120 deg East.","projected 2D","","","East","North","E","N","9001","","4238","16150","1995-07-21 00:00:00","","EPSG","","95.193",NULL};
-datafile_rows_t horiz_cs_row_528[] = {"23891","ID74 / UTM zone 51S","","","","Indonesia - south of equator and between 120 deg and 126 deg East.","projected 2D","","","East","North","E","N","9001","","4238","16151","1995-07-21 00:00:00","","EPSG","","95.193",NULL};
-datafile_rows_t horiz_cs_row_529[] = {"23892","ID74 / UTM zone 52S","","","","Indonesia - south of equator and between 126 deg and 132 deg East.","projected 2D","","","East","North","E","N","9001","","4238","16152","1995-07-21 00:00:00","","EPSG","","95.193",NULL};
-datafile_rows_t horiz_cs_row_530[] = {"23893","ID74 / UTM zone 53S","","","","Indonesia - south of equator and between 132 deg and 138 deg East.","projected 2D","","","East","North","E","N","9001","","4238","16153","1995-07-21 00:00:00","","EPSG","","95.193",NULL};
-datafile_rows_t horiz_cs_row_531[] = {"23894","ID74 / UTM zone 54S","","","","Indonesia - south of equator and east of 138 deg East.","projected 2D","","","East","North","E","N","9001","","4238","16154","1995-07-21 00:00:00","","EPSG","","95.193",NULL};
-datafile_rows_t horiz_cs_row_532[] = {"23946","Indian 1954 / UTM zone 46N","Indian 1954 / UTM 46N","","","Myanmar (Burma) - west of 96 deg East.","projected 2D","","","East","North","E","N","9001","","4239","16046","1998-06-13 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_533[] = {"23947","Indian 1954 / UTM zone 47N","Indian 1954 / UTM 47N","","","Myanmar (Burma) - east of 96 deg East; Thailand - west of 102 deg East.","projected 2D","","","East","North","E","N","9001","","4239","16047","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_534[] = {"23948","Indian 1954 / UTM zone 48N","Indian 1954 / UTM 48N","","","Thailand - east of 102 deg East.","projected 2D","","","East","North","E","N","9001","","4239","16048","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_535[] = {"24047","Indian 1975 / UTM zone 47N","Indian 1975 / UTM 47N","","","Thailand - west of 102 deg East.","projected 2D","","","East","North","E","N","9001","","4240","16047","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_536[] = {"24048","Indian 1975 / UTM zone 48N","Indian 1975 / UTM 48N","","","Thailand - east of 102 deg East.","projected 2D","","","East","North","E","N","9001","","4240","16048","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_537[] = {"24100","Jamaica 1875 / Jamaica (Old Grid)","Jamaica 1875 / Old Grid","","","Jamaica.","projected 2D","","","East","North","E","N","9005","","4241","19909","1995-06-02 00:00:00","","EPSG","Superseded by 24200 (JAD69 / Jamaica National Grid).","",NULL};
-datafile_rows_t horiz_cs_row_538[] = {"24200","JAD69 / Jamaica National Grid","JAD69 / Jamaica Grid","","","Jamaica.","projected 2D","","","East","North","E","N","9001","","4242","19910","1995-06-02 00:00:00","","EPSG","Supersedes 24100 (JAD69 / Jamaica National Grid).","",NULL};
-datafile_rows_t horiz_cs_row_539[] = {"24305","Kalianpur 1937 / UTM zone 45N","Kalianpur 37 / UTM 45N","","","Bangladesh - west of 90deg East.","projected 2D","","","East","North","E","N","9001","","4144","16045","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_540[] = {"24306","Kalianpur 1937 / UTM zone 46N","Kalianpur 37 / UTM 46N","","","Bangladesh - east of 90deg East.","projected 2D","","","East","North","E","N","9001","","4144","16046","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_541[] = {"24311","Kalianpur 1962 / UTM zone 41N","Kalianpur 62 / UTM 41N","","","Pakistan - west of 66deg East.","projected 2D","","","East","North","E","N","9001","","4145","16041","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_542[] = {"24312","Kalianpur 1962 / UTM zone 42N","Kalianpur 62 / UTM 42N","","","Pakistan - between 66 and 72deg East.","projected 2D","","","East","North","E","N","9001","","4145","16042","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_543[] = {"24313","Kalianpur 1962 / UTM zone 43N","Kalianpur 62 / UTM 43N","","","Pakistan - east of 72deg East.","projected 2D","","","East","North","E","N","9001","","4145","16043","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_544[] = {"24342","Kalianpur 1975 / UTM zone 42N","Kalianpur 75 / UTM 42N","","","India - west of 72deg East.","projected 2D","","","East","North","E","N","9001","","4146","16042","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_545[] = {"24343","Kalianpur 1975 / UTM zone 43N","Kalianpur 75 / UTM 43N","","","India - between 72 and 78deg East.","projected 2D","","","East","North","E","N","9001","","4146","16043","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_546[] = {"24344","Kalianpur 1975 / UTM zone 44N","Kalianpur 75 / UTM 44N","","","India - between 78 and 84deg East.","projected 2D","","","East","North","E","N","9001","","4146","16044","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_547[] = {"24345","Kalianpur 1975 / UTM zone 45N","Kalianpur 75 / UTM 45N","","","India - between 84 and 90deg East.","projected 2D","","","East","North","E","N","9001","","4146","16045","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_548[] = {"24346","Kalianpur 1975 / UTM zone 46N","Kalianpur 75 / UTM 46N","","","India - between 90 and 96deg East.","projected 2D","","","East","North","E","N","9001","","4146","16046","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_549[] = {"24347","Kalianpur 1975 / UTM zone 47N","Kalianpur 75 / UTM 47N","","","India - east of 96deg East.","projected 2D","","","East","North","E","N","9001","","4146","16047","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_550[] = {"24370","Kalianpur 1880 / India zone 0","Kalianpur / India 0","","","Pakistan north of 35 deg 35 min North.","projected 2D","","","East","North","E","N","9084","","4243","18110","1999-10-20 00:00:00","","EPSG","","97.23",NULL};
-datafile_rows_t horiz_cs_row_551[] = {"24371","Kalianpur 1880 / India zone I","Kalianpur / India I","","","India north of 28 deg North; Pakistan 28 deg to 35 deg 35 min North.","projected 2D","","","East","North","E","N","9084","","4243","18111","1999-10-20 00:00:00","","EPSG","","97.23",NULL};
-datafile_rows_t horiz_cs_row_552[] = {"24372","Kalianpur 1880 / India zone IIa","Kalianpur / India IIa","","","India - between 21 deg and 28 deg North and  west of 82 deg East; Pakistan - south of 28 deg North.","projected 2D","","","East","North","E","N","9084","","4243","18112","1999-10-20 00:00:00","","EPSG","","97.23",NULL};
-datafile_rows_t horiz_cs_row_553[] = {"24373","Kalianpur 1880 / India zone III","Kalianpur / India III","","","India - between 15 deg and 21 deg North.","projected 2D","","","East","North","E","N","9084","","4243","18114","1999-10-20 00:00:00","","EPSG","","97.23",NULL};
-datafile_rows_t horiz_cs_row_554[] = {"24374","Kalianpur 1880 / India zone IV","Kalianpur / India IV","","","India - south of 15 deg North.","projected 2D","","","East","North","E","N","9084","","4243","18116","1999-10-20 00:00:00","","EPSG","","97.23",NULL};
-datafile_rows_t horiz_cs_row_555[] = {"24375","Kalianpur 1937 / India zone IIb","Kalianpur 37 / India IIb","","","Bangladesh.","projected 2D","","","East","North","E","N","9001","","4144","18238","1999-10-20 00:00:00","","EPSG","Used by Bangladesh since metrication.  Metric conversion applies A.R.Clarke's Indian foot-British foot ratio of 0.99999566 and Benoit's 1895 British inch-metre ratio of 39.370115 rounded as Ind ft = 0.30479841m exactly.","97.23",NULL};
-datafile_rows_t horiz_cs_row_556[] = {"24376","Kalianpur 1962 / India zone I","Kalianpur 62 / India I","","","Pakistan - north of 28deg North.","projected 2D","","","East","North","E","N","9001","","4145","18236","1999-10-20 00:00:00","","EPSG","Used by Pakistan since metrication.  Metric conversion applies A.R.Clarke's Indian foot-British foot ratio of 0.99999566 and J.S.Clark's 1865 British inch-metre ratio of 39.369971 rounded by G.Bomford with slight error as Ind ft = 0.3048996m exac [...]
-datafile_rows_t horiz_cs_row_557[] = {"24377","Kalianpur 1962 / India zone IIa","Kalianpur 62 / India IIa","","","Pakistan - south of 28deg North.","projected 2D","","","East","North","E","N","9001","","4145","18237","1999-10-20 00:00:00","","EPSG","Used by Pakistan since metrication.  Metric conversion applies A.R.Clarke's Indian foot-British foot ratio of 0.99999566 and J.S.Clark's 1865 British inch-metre ratio of 39.369971 rounded by G.Bomford with slight error as Ind ft = 0.3048996m  [...]
-datafile_rows_t horiz_cs_row_558[] = {"24378","Kalianpur 1975 / India zone I","Kalianpur 75 / India I","","","India - north of 28deg North and west of 82deg East.","projected 2D","","","East","North","E","N","9001","","4146","18231","1999-10-20 00:00:00","","EPSG","Used by India since metrication.  Metric conversion applies A.R.Clarke's Indian foot-British foot ratio of 0.99999566 and J.S.Clark's 1865 British inch-metre ratio of 39.369971 rounded as 1 Ind ft = 0.3048995m exactly.","97.23 [...]
-datafile_rows_t horiz_cs_row_559[] = {"24379","Kalianpur 1975 / India zone IIa","Kalianpur 75 / India IIa","","","India - between 28deg and 21deg North and west of 82deg East.","projected 2D","","","East","North","E","N","9001","","4146","18232","1999-10-20 00:00:00","","EPSG","Used by India since metrication.  Metric conversion applies A.R.Clarke's Indian foot-British foot ratio of 0.99999566 and J.S.Clark's 1865 British inch-metre ratio of 39.369971 rounded as 1 Ind ft = 0.3048995m exa [...]
-datafile_rows_t horiz_cs_row_560[] = {"24380","Kalianpur 1975 / India zone IIb","Kalianpur 75 / India IIb","","","India - north of 21deg North and east of 82deg East.","projected 2D","","","East","North","E","N","9001","","4146","18235","1999-10-20 00:00:00","","EPSG","Used by India since metrication.  Metric conversion applies A.R.Clarke's Indian foot-British foot ratio of 0.99999566 and J.S.Clark's 1865 British inch-metre ratio of 39.369971 rounded as 1 Ind ft = 0.3048995m exactly.","9 [...]
-datafile_rows_t horiz_cs_row_561[] = {"24381","Kalianpur 1975 / India zone III","Kalianpur 75 / India III","","","India - between 21deg and 15deg North.","projected 2D","","","East","North","E","N","9001","","4146","18233","1999-10-20 00:00:00","","EPSG","Used by India since metrication.  Metric conversion applies A.R.Clarke's Indian foot-British foot ratio of 0.99999566 and J.S.Clark's 1865 British inch-metre ratio of 39.369971 rounded as 1 Ind ft = 0.3048995m exactly.","97.23",NULL};
-datafile_rows_t horiz_cs_row_562[] = {"24382","Kalianpur 1880 / India zone IIb","Kalianpur / India IIb","","","Bangladesh; India - north of 22 deg North and east of 82 deg East; Myanmar (Burma) - north of 22 deg North.","projected 2D","","","East","North","E","N","9084","","4243","18113","1999-10-20 00:00:00","","EPSG","","97.23",NULL};
-datafile_rows_t horiz_cs_row_563[] = {"24383","Kalianpur 1975 / India zone IV","Kalianpur 75 / India IV","","","India - south of 21deg North.","projected 2D","","","East","North","E","N","9001","","4146","18234","1999-10-20 00:00:00","","EPSG","Used by India since metrication.  Metric conversion applies A.R.Clarke's Indian foot-British foot ratio of 0.99999566 and J.S.Clark's 1865 British inch-metre ratio of 39.369971 rounded as 1 Ind ft = 0.3048995m exactly.","97.23",NULL};
-datafile_rows_t horiz_cs_row_564[] = {"24500","Kertau / Singapore Grid","","","","Singapore.","projected 2D","","","East","North","E","N","9001","","4245","19920","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_565[] = {"24547","Kertau / UTM zone 47N","","","","Malaysia - West Malaysia west of 102 deg East.","projected 2D","","","East","North","E","N","9001","","4245","16047","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_566[] = {"24548","Kertau / UTM zone 48N","","","","Malaysia - West Malaysia east of 102 deg East.","projected 2D","","","East","North","E","N","9001","","4245","16048","1995-07-21 00:00:00","","EPSG","","95.192",NULL};
-datafile_rows_t horiz_cs_row_567[] = {"24571","Kertau / R.S.O. Malaya (ch)","","","","Malaysia - West Malaysia","projected 2D","","","East","North","E","N","9062","","4245","19935","1999-10-20 00:00:00","","EPSG","Adopts metric conversion of 39.370113 inches per metre.","97.231",NULL};
-datafile_rows_t horiz_cs_row_568[] = {"24600","KOC Lambert","","","","Kuwait.","projected 2D","","","East","North","E","N","9001","","4246","19906","1996-04-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_569[] = {"24718","La Canoa / UTM zone 18N","","","","Venezuela - west of 72 deg West.","projected 2D","","","East","North","E","N","9001","","4247","16018","1999-10-20 00:00:00","","EPSG","Sometimes referred to as PSAD56 / UTM zone 18N.","",NULL};
-datafile_rows_t horiz_cs_row_570[] = {"24719","La Canoa / UTM zone 19N","","","","Venezuela - between 72 and 66 deg West.","projected 2D","","","East","North","E","N","9001","","4247","16019","1999-10-20 00:00:00","","EPSG","Sometimes referred to as PSAD56 / UTM zone 19N.","",NULL};
-datafile_rows_t horiz_cs_row_571[] = {"24720","La Canoa / UTM zone 20N","","","","Venezuela - east of 66 deg West.","projected 2D","","","East","North","E","N","9001","","4247","16020","1995-06-02 00:00:00","","EPSG","Sometimes referred to as PSAD56 / UTM zone 20N.","",NULL};
-datafile_rows_t horiz_cs_row_572[] = {"24818","PSAD56 / UTM zone 18N","","","","South America (Ecuador;  [Venezuela]) 78deg West to 72deg West.","projected 2D","","","East","North","E","N","9001","","4248","16018","1995-06-02 00:00:00","","EPSG","In Venezuela also known as La Canoa / UTM zone 18N.","",NULL};
-datafile_rows_t horiz_cs_row_573[] = {"24819","PSAD56 / UTM zone 19N","","","","South America (Netherlands Antilles; [Venezuela]) 72deg West  to 66deg West.","projected 2D","","","East","North","E","N","9001","","4248","16019","1995-06-02 00:00:00","","EPSG","In Venezuela also known as La Canoa / UTM zone 19N.","",NULL};
-datafile_rows_t horiz_cs_row_574[] = {"24820","PSAD56 / UTM zone 20N","","","","South America (Guyana; [Venezuela]) 66deg West  to 60deg West.","projected 2D","","","East","North","E","N","9001","","4248","16020","1995-06-02 00:00:00","","EPSG","In Venezuela also known as La Canoa / UTM zone 20N.","",NULL};
-datafile_rows_t horiz_cs_row_575[] = {"24821","PSAD56 / UTM zone 21N","","","","South America (Guyana; Suriname) 60deg West  to 54deg West.","projected 2D","","","East","North","E","N","9001","","4248","16021","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_576[] = {"24877","PSAD56 / UTM zone 17S","","","","South America (Chile; Ecuador; Peru) 84deg West  to 78deg West.","projected 2D","","","East","North","E","N","9001","","4248","16117","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_577[] = {"24878","PSAD56 / UTM zone 18S","","","","South America (Chile; Ecuador; Peru) 78deg West  to 72deg West.","projected 2D","","","East","North","E","N","9001","","4248","16118","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_578[] = {"24879","PSAD56 / UTM zone 19S","","","","South America (Bolivia; Chile; Peru) 72deg West  to 66deg West.","projected 2D","","","East","North","E","N","9001","","4248","16119","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_579[] = {"24880","PSAD56 / UTM zone 20S","","","","South America (Bolivia) 66deg West  to 60deg West.","projected 2D","","","East","North","E","N","9001","","4248","16120","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_580[] = {"24882","PSAD56 / UTM zone 22S","","","","Brazil - offshore Amazon Cone","projected 2D","","","East","North","E","N","9001","","4248","16122","1999-04-22 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_581[] = {"24891","PSAD56 / Peru west zone","","","","Peru west of 79 deg West.","projected 2D","","","East","North","X","Y","9001","","4248","18161","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_582[] = {"24892","PSAD56 / Peru central zone","PSAD56 / Peru central","","","Peru 79 to 73 deg West.","projected 2D","","","East","North","X","Y","9001","","4248","18162","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_583[] = {"24893","PSAD56 / Peru east zone","","","","Peru east of 73 deg West.","projected 2D","","","East","North","X","Y","9001","","4248","18163","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_584[] = {"25000","Leigon / Ghana Metre Grid","Leigon / Ghana Grid","","","Ghana.","projected 2D","","","East","North","E","N","9001","","4250","19904","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_585[] = {"25231","Lome / UTM zone 31N","","","","Togo.","projected 2D","","","East","North","E","N","9001","","4252","16031","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_586[] = {"25391","Luzon 1911 / Philippines zone I","Luzon / Philippines I","","","Philippines - west of 118 deg East.","projected 2D","","","East","North","X","Y","9001","","4253","18171","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_587[] = {"25392","Luzon 1911 / Philippines zone II","Luzon / Philippines II","","","Philippines - Palawan; Calamian Islands.","projected 2D","","","East","North","X","Y","9001","","4253","18172","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_588[] = {"25393","Luzon 1911 / Philippines zone III","Luzon / Philippines III","","","Philippines - Luzon (except SE part;); Mindoro.","projected 2D","","","East","North","X","Y","9001","","4253","18173","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_589[] = {"25394","Luzon 1911 / Philippines zone IV","Luzon / Philippines IV","","","Philippines - SE Luzon; Tablas; Masbate; Panay; Cebu; Negros; west Mindanao.","projected 2D","","","East","North","X","Y","9001","","4253","18174","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_590[] = {"25395","Luzon 1911 / Philippines zone V","Luzon / Philippines V","","","Philippines - east Mindanao; Bohol; Samar.","projected 2D","","","East","North","X","Y","9001","","4253","18175","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_591[] = {"25700","Makassar (Jakarta) / NEIEZ","Makassar / NEIEZ","","","Indonesia - south west Sulawesi.","projected 2D","","","East","North","X","Y","9001","","4804","19905","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_592[] = {"25828","ETRF89 / UTM zone 28N","","","","Europe - 18deg West to 12deg West - United Kingdom (UKCS) offshore.","projected 2D","","","East","North","E","N","9001","","4258","16028","1999-04-22 00:00:00","","EPSG","","99.11",NULL};
-datafile_rows_t horiz_cs_row_593[] = {"25829","ETRF89 / UTM zone 29N","","","","Europe - 12deg West to 6deg West - United Kingdom (UKCS) offshore.","projected 2D","","","East","North","E","N","9001","","4258","16029","1999-04-22 00:00:00","","EPSG","","99.11",NULL};
-datafile_rows_t horiz_cs_row_594[] = {"25830","ETRF89 / UTM zone 30N","","","","Europe - 6deg West to 0deg.","projected 2D","","","East","North","E","N","9001","","4258","16030","1999-04-22 00:00:00","","EPSG","","99.11",NULL};
-datafile_rows_t horiz_cs_row_595[] = {"25831","ETRF89 / UTM zone 31N","","","","Europe - 0deg to 6deg East - Norway.","projected 2D","","","East","North","E","N","9001","","4258","16031","1999-04-22 00:00:00","","EPSG","","99.11",NULL};
-datafile_rows_t horiz_cs_row_596[] = {"25832","ETRF89 / UTM zone 32N","","","","Europe - 6deg East  to 12deg East - Norway.","projected 2D","","","East","North","E","N","9001","","4258","16032","1999-04-22 00:00:00","","EPSG","","99.11",NULL};
-datafile_rows_t horiz_cs_row_597[] = {"25833","ETRF89 / UTM zone 33N","","","","Europe - 12deg East  to 18deg East - Norway.","projected 2D","","","East","North","E","N","9001","","4258","16033","1999-04-22 00:00:00","","EPSG","","99.11",NULL};
-datafile_rows_t horiz_cs_row_598[] = {"25834","ETRF89 / UTM zone 34N","","","","Europe - 18deg East  to 24deg East - Norway.","projected 2D","","","East","North","E","N","9001","","4258","16034","1999-04-22 00:00:00","","EPSG","","99.11",NULL};
-datafile_rows_t horiz_cs_row_599[] = {"25835","ETRF89 / UTM zone 35N","","","","Europe - 24deg East  to 30deg East - Norway.","projected 2D","","","East","North","E","N","9001","","4258","16035","1999-04-22 00:00:00","","EPSG","","99.11",NULL};
-datafile_rows_t horiz_cs_row_600[] = {"25836","ETRF89 / UTM zone 36N","","","","Europe - 30deg East  to 36deg East.","projected 2D","","","East","North","E","N","9001","","4258","16036","1999-04-22 00:00:00","","EPSG","","99.11",NULL};
-datafile_rows_t horiz_cs_row_601[] = {"25837","ETRF89 / UTM zone 37N","","","","Europe - 36deg East  to 42deg East.","projected 2D","","","East","North","E","N","9001","","4258","16037","1999-04-22 00:00:00","","EPSG","","99.11",NULL};
-datafile_rows_t horiz_cs_row_602[] = {"25838","ETRF89 / UTM zone 38N","","","","Europe - 42deg East  to 48deg East.","projected 2D","","","East","North","E","N","9001","","4258","16038","1999-04-22 00:00:00","","EPSG","","99.11",NULL};
-datafile_rows_t horiz_cs_row_603[] = {"25884","ETRF89 / TM Baltic93","","","","Estonia;  Latvia;  Lithuania.","projected 2D","","","North","East","X","Y","9001","","4258","19939","1999-04-22 00:00:00","http://www.geo.ut.ee/~raivo/estcoord.html","EPSG","Used as a common coordinate system for the Baltic states and for medium and small scale mapping in Estonia since 1993.","99.11",NULL};
-datafile_rows_t horiz_cs_row_604[] = {"25932","Malongo 1987 / UTM zone 32S","Malongo 1987 / UTM 32S","","","Angola - Cabinda.","projected 2D","","","East","North","E","N","9001","","4259","16132","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_605[] = {"26191","Merchich / Nord Maroc","","","","Morocco north of 35 grads (31 deg 30 min) North.","projected 2D","","","East","North","X","Y","9001","","4261","18131","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_606[] = {"26192","Merchich / Sud Maroc","","","","Morocco 31grads to 35grads  (27 deg 54 min to 31 deg 30 min) North.","projected 2D","","","East","North","X","Y","9001","","4261","18132","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_607[] = {"26193","Merchich / Sahara","","","","Morocco south of 31grads  (27 deg 54 min) North.","projected 2D","","","East","North","X","Y","9001","","4261","18133","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_608[] = {"26237","Massawa / UTM zone 37N","","","","Eritrea.","projected 2D","","","East","North","E","N","9001","","4262","16037","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_609[] = {"26331","Minna / UTM zone 31N","","","","Nigeria - offshore beyond continental shelf west of 6 deg East.","projected 2D","","","East","North","E","N","9001","","4263","16031","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_610[] = {"26332","Minna / UTM zone 32N","","","","Nigeria - offshore beyond continental shelf.","projected 2D","","","East","North","E","N","9001","","4263","16032","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_611[] = {"26391","Minna / Nigeria West Belt","Minna / Nigeria West","","","Nigeria west of 6 deg 30 min East.","projected 2D","","","East","North","E","N","9001","","4263","18151","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_612[] = {"26392","Minna / Nigeria Mid Belt","","","","Nigeria between 6 deg 30 min and 10 deg 30 min East.","projected 2D","","","East","North","E","N","9001","","4263","18152","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_613[] = {"26393","Minna / Nigeria East Belt","Minna / Nigeria East","","","Nigeria east of 10 deg 30 min East.","projected 2D","","","East","North","E","N","9001","","4263","18153","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_614[] = {"26432","Mhast / UTM zone 32S","","","","Angola - Cabinda.","projected 2D","","","East","North","E","N","9001","","4264","16132","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_615[] = {"26591","Monte Mario (Rome) / Italy zone 1","Monte Mario / Italy 1","","","Italy west of 12 deg East.","projected 2D","","","East","North","X","Y","9001","","4806","18121","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_616[] = {"26592","Monte Mario (Rome) / Italy zone 2","Monte Mario / Italy 2","","","Italy east of 12 deg East.","projected 2D","","","East","North","X","Y","9001","","4806","18122","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_617[] = {"26632","M'poraloko / UTM zone 32N","M'poraloko / UTM 32N","","","Gabon - north of equator.","projected 2D","","","East","North","E","N","9001","","4266","16032","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_618[] = {"26692","M'poraloko / UTM zone 32S","M'poraloko / UTM 32S","","","Gabon - south of equator.","projected 2D","","","East","North","E","N","9001","","4266","16132","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_619[] = {"26703","NAD27 / UTM zone 3N","","","","North America - United States (USA) - Alaska - 168deg West  to 162deg West.","projected 2D","","","East","North","E","N","9001","","4267","16003","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_620[] = {"26704","NAD27 / UTM zone 4N","","","","North America - United States (USA) - Alaska - 162deg West  to 156deg West.","projected 2D","","","East","North","E","N","9001","","4267","16004","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_621[] = {"26705","NAD27 / UTM zone 5N","","","","North America - United States (USA) - Alaska - 156deg West  to 150deg West.","projected 2D","","","East","North","E","N","9001","","4267","16005","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_622[] = {"26706","NAD27 / UTM zone 6N","","","","North America - United States (USA) - Alaska - 150deg West  to 144deg West.","projected 2D","","","East","North","E","N","9001","","4267","16006","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_623[] = {"26707","NAD27 / UTM zone 7N","","","","North America - Canada; United States (USA) - Alaska - 144deg West  to 138deg West.","projected 2D","","","East","North","E","N","9001","","4267","16007","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_624[] = {"26708","NAD27 / UTM zone 8N","","","","North America - Canada; United States (USA) - 138deg West  to 132deg West.","projected 2D","","","East","North","E","N","9001","","4267","16008","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_625[] = {"26709","NAD27 / UTM zone 9N","","","","North America - Canada; United States (USA) - 132deg West  to 126deg West.","projected 2D","","","East","North","E","N","9001","","4267","16009","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_626[] = {"26710","NAD27 / UTM zone 10N","","","","North America - Canada; United States (USA) - 130deg West  to 120deg West.","projected 2D","","","East","North","E","N","9001","","4267","16010","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_627[] = {"26711","NAD27 / UTM zone 11N","","","","North America - Canada; Mexico; United States (USA) - 120deg West  to 114deg West.","projected 2D","","","East","North","E","N","9001","","4267","16011","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_628[] = {"26712","NAD27 / UTM zone 12N","","","","North America - Canada; Mexico; United States (USA) - 114deg West  to 108deg West.","projected 2D","","","East","North","E","N","9001","","4267","16012","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_629[] = {"26713","NAD27 / UTM zone 13N","","","","North America - Canada; Mexico; United States (USA) - 108deg West  to 102deg West.","projected 2D","","","East","North","E","N","9001","","4267","16013","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_630[] = {"26714","NAD27 / UTM zone 14N","","","","North America - Canada; Mexico; United States (USA) - 102deg West  to 96deg West.","projected 2D","","","East","North","E","N","9001","","4267","16014","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_631[] = {"26715","NAD27 / UTM zone 15N","","","","North America - Canada; Mexico; United States (USA) - 96deg West  to 90deg West.","projected 2D","","","East","North","E","N","9001","","4267","16015","1995-06-02 00:00:00","","EPSG","In Ontario superseded by NAD27(76) / UTM zone 15N (code 227).","",NULL};
-datafile_rows_t horiz_cs_row_632[] = {"26716","NAD27 / UTM zone 16N","","","","North America - Canada; Mexico; United States (USA) - 90deg West  to 84deg West.","projected 2D","","","East","North","E","N","9001","","4267","16016","1995-06-02 00:00:00","","EPSG","In Ontario superseded by NAD27(76) / UTM zone 16N (code 228).","",NULL};
-datafile_rows_t horiz_cs_row_633[] = {"26717","NAD27 / UTM zone 17N","","","","North America - Canada; Mexico; United States (USA) - 84deg West  to 78deg West.","projected 2D","","","East","North","E","N","9001","","4267","16017","1995-06-02 00:00:00","","EPSG","In Ontario superseded by NAD27(76) / UTM zone 17N (code 229).  In Quebec superseded by NAD27(CGQ77) / UTM zone 17N (code 231).","",NULL};
-datafile_rows_t horiz_cs_row_634[] = {"26718","NAD27 / UTM zone 18N","","","","North America - Canada; United States (USA) - 78deg West  to 72deg West.","projected 2D","","","East","North","E","N","9001","","4267","16018","1995-06-02 00:00:00","","EPSG","In Ontario superseded by NAD27(76) / UTM zone 18N (code 230).  In Quebec superseded by NAD27(CGQ77) / UTM zone 18N (code 232).","",NULL};
-datafile_rows_t horiz_cs_row_635[] = {"26719","NAD27 / UTM zone 19N","","","","North America - Canada; United States (USA) - 72deg West  to 66deg West.","projected 2D","","","East","North","E","N","9001","","4267","16019","1995-06-02 00:00:00","","EPSG","In Quebec superseded by NAD27(CGQ77) / UTM zone 19N (code 233).","",NULL};
-datafile_rows_t horiz_cs_row_636[] = {"26720","NAD27 / UTM zone 20N","","","","North America - Antigua and Barbuda - Barbuda.  British Virgin Islands (military).  Canada; United States (USA) offshore Atlantic - 66deg West  to 60deg West.","projected 2D","","","East","North","E","N","9001","","4267","16020","1995-06-02 00:00:00","","EPSG","In Quebec superseded by NAD27(CGQ77) / UTM zone 20N (code 234).","",NULL};
-datafile_rows_t horiz_cs_row_637[] = {"26721","NAD27 / UTM zone 21N","","","","North America - Canada - 60deg West  to 54deg West.","projected 2D","","","East","North","E","N","9001","","4267","16021","1995-06-02 00:00:00","","EPSG","In Quebec superseded by NAD27(CGQ77) / UTM zone 21N (code 235).","",NULL};
-datafile_rows_t horiz_cs_row_638[] = {"26722","NAD27 / UTM zone 22N","","","","North America - Canada - 54deg West  to 48deg West.","projected 2D","","","East","North","E","N","9001","","4267","16022","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_639[] = {"26729","NAD27 / Alabama East","","","","United States (USA) - Alabama - AL_E - counties east of approx 86d 37m West - Barbour; Bullock; Calhoun; Chambers; Cherokee; Clay; Cleburne; Coffee; Coosa; Covington; Crenshaw; Dale; De Kalb; Elmore; Etowah; Geneva; Henry; Houston; Jackson; Lee; Macon; Mad","projected 2D","","","East","North","X","Y","9003","","4267","10101","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_640[] = {"26730","NAD27 / Alabama West","","","","United States (USA) - Alabama - AL_W - counties west of approx 86d 37m West - Autauga; Baldwin; Bibb; Blount; Butler; Chilton; Choctaw; Clarke; Colbert; Conecuh; Cullman; Dallas; Escambia; Fayette; Franklin; Greene; Hale; Jefferson; Lamar; Lauderdale; Lawr","projected 2D","","","East","North","X","Y","9003","","4267","10102","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_641[] = {"26731","NAD27 / Alaska zone 1","","","","United States - Alaska - Panhandle.","projected 2D","","","East","North","X","Y","9003","","4267","15001","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_642[] = {"26732","NAD27 / Alaska zone 2","","","","United States - Alaska - 141deg to 144deg West.","projected 2D","","","East","North","X","Y","9003","","4267","15002","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_643[] = {"26733","NAD27 / Alaska zone 3","","","","United States - Alaska - 144deg to 148deg West.","projected 2D","","","East","North","X","Y","9003","","4267","15003","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_644[] = {"26734","NAD27 / Alaska zone 4","","","","United States - Alaska - 148deg to 152deg West.","projected 2D","","","East","North","X","Y","9003","","4267","15004","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_645[] = {"26735","NAD27 / Alaska zone 5","","","","United States - Alaska - 152deg to 156deg West.","projected 2D","","","East","North","X","Y","9003","","4267","15005","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_646[] = {"26736","NAD27 / Alaska zone 6","","","","United States - Alaska - 156deg to 160deg West.","projected 2D","","","East","North","X","Y","9003","","4267","15006","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_647[] = {"26737","NAD27 / Alaska zone 7","","","","United States - Alaska - 160deg to 164deg West.","projected 2D","","","East","North","X","Y","9003","","4267","15007","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_648[] = {"26738","NAD27 / Alaska zone 8","","","","United States - Alaska - 164deg to 168deg West; north of 54d 30m North.","projected 2D","","","East","North","X","Y","9003","","4267","15008","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_649[] = {"26739","NAD27 / Alaska zone 9","","","","United States - Alaska - West of 168deg West and north of 54d 30m North.","projected 2D","","","East","North","X","Y","9003","","4267","15009","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_650[] = {"26740","NAD27 / Alaska zone 10","","","","United States - Alaska - Aleutian Islands.","projected 2D","","","East","North","X","Y","9003","","4267","15010","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_651[] = {"26741","NAD27 / California zone I","NAD27 / California I","","","United States (USA) - California - CA_1 - counties north of approx 40 deg North - Del Norte; Humboldt; Lassen; Modoc; Plumas; Shasta; Siskiyou; Tehama; Trinity","projected 2D","","","East","North","X","Y","9003","","4267","10401","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_652[] = {"26742","NAD27 / California zone II","NAD27 / California II","","","United States (USA) - California - CA_2 - counties between approx 40 deg & 38d 15m North - Alpine; Amador; Butte; Colusa; El Dorado; Glenn; Lake; Mendocino; Napa; Nevada; Placer; Sacramento; Sierra; Solano; Sonoma; Sutter; Yolo; Yuba","projected 2D","","","East","North","X","Y","9003","","4267","10402","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_653[] = {"26743","NAD27 / California zone III","NAD27 / California III","","","United States (USA) - California - CA_3 - counties between approx 38d 15m & 37d North - Alameda; Calaveras; Contra Costa; Madera; Marin; Mariposa; Merced; Mono; San Francisco; San Joaquin; San Mateo; Santa Clara; Santa Cruz; Stanislaus; Tuolumne","projected 2D","","","East","North","X","Y","9003","","4267","10403","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_654[] = {"26744","NAD27 / California zone IV","NAD27 / California IV","","","United States (USA) - California - CA_4 - counties between approx 37d & 35d 30m North - Fresno; Inyo; Kings; Monterey; San Benito; Tulare","projected 2D","","","East","North","X","Y","9003","","4267","10404","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_655[] = {"26745","NAD27 / California zone V","NAD27 / California V","","","United States (USA) - California - CA_5 - counties between approx 35d 50m & 34d North - Kern; San Bernardino; San Luis Obispo; Santa Barbara; Ventura","projected 2D","","","East","North","X","Y","9003","","4267","10405","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_656[] = {"26746","NAD27 / California zone VI","NAD27 / California VI","","","United States (USA) - California - CA_6 - counties south of approx 38d 30m North - Imperial; Orange; Riverside; San Diego","projected 2D","","","East","North","X","Y","9003","","4267","10406","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_657[] = {"26747","NAD27 / California zone VII","NAD27 / California VII","","","United States - California - Los Angeles.","projected 2D","","","East","North","X","Y","9003","","4267","10407","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_658[] = {"26748","NAD27 / Arizona East","","","","United States (USA) - Arizona - AZ_E - counties east of approx 110d 45m West - Apache; Cochise; Gila; Graham; Greenlee; Navajo","projected 2D","","","East","North","X","Y","9003","","4267","10201","1995-08-22 00:00:00","","EPSG","","95.25",NULL};
-datafile_rows_t horiz_cs_row_659[] = {"26749","NAD27 / Arizona Central","","","","United States (USA) - Arizona - AZ_C - counties between approx 110d 45m and 113d 20m West - Coconino; Maricopa; Pima; Pinal; Santa Cruz; Yavapai","projected 2D","","","East","North","X","Y","9003","","4267","10202","1995-08-22 00:00:00","","EPSG","","95.25",NULL};
-datafile_rows_t horiz_cs_row_660[] = {"26750","NAD27 / Arizona West","","","","United States (USA) - Arizona - AZ_W - counties west of approx 113d 20m West - La Paz; Mohave; Yuma","projected 2D","","","East","North","X","Y","9003","","4267","10203","1995-08-22 00:00:00","","EPSG","","95.25",NULL};
-datafile_rows_t horiz_cs_row_661[] = {"26751","NAD27 / Arkansas North","","","","United States (USA) - Arkansas - AR_N - counties north of approx 34d 50m North - Baxter; Benton; Boone; Carroll; Clay; Cleburne; Conway; Craighead; Crawford; Crittenden; Cross; Faulkner; Franklin; Fulton; Greene; Independence; Izard; Jackson; Johnson; Lawr","projected 2D","","","East","North","X","Y","9003","","4267","10301","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_662[] = {"26752","NAD27 / Arkansas South","","","","United States (USA) - Arkansas - AR_S - counties south of approx 34d 50m North - Arkansas; Ashley; Bradley; Calhoun; Chicot; Clark; Cleveland; Columbia; Dallas; Desha; Drew; Garland; Grant; Hempstead; Hot Spring; Howard; Jefferson; Lafayette; Lee; Lincoln;","projected 2D","","","East","North","X","Y","9003","","4267","10302","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_663[] = {"26753","NAD27 / Colorado North","","","","United States (USA) - Colorado - CO_N - counties north of approx 39d 50m North - Adams; Boulder; Gilpin; Grand; Jackson; Larimer; Logan; Moffat; Morgan; Phillips; Rio Blanco; Routt; Sedgwick; Washington; Weld; Yuma","projected 2D","","","East","North","X","Y","9003","","4267","10501","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_664[] = {"26754","NAD27 / Colorado Central","","","","United States (USA) - Colorado - CO_C - counties between approx 39d 50m & 38d 30m North - Arapahoe; Chaffee; Cheyenne; Clear Creek; Delta; Denver; Douglas; Eagle; El Paso; Elbert; Fremont; Garfield; Gunnison; Jefferson; Kit Carson; Lake; Lincoln; Mesa; Par","projected 2D","","","East","North","X","Y","9003","","4267","10502","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_665[] = {"26755","NAD27 / Colorado South","","","","United States (USA) - Colorado - CO_S - counties south of approx 38d 30m North - Alamosa; Archuleta; Baca; Bent; Conejos; Costilla; Crowley; Custer; Dolores; Hinsdale; Huerfano; Kiowa; La Plata; Las Animas; Mineral; Montezuma; Montrose; Otero; Ouray; Prowe","projected 2D","","","East","North","X","Y","9003","","4267","10503","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_666[] = {"26756","NAD27 / Connecticut","","","","United States (USA) - Connecticut - CT - counties of Fairfield; Hartford; Litchfield; Middlesex; New Haven; New London; Tolland; Windham","projected 2D","","","East","North","X","Y","9003","","4267","10600","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_667[] = {"26757","NAD27 / Delaware","","","","United States (USA) - Delaware - DE - counties of Kent; New Castle; Sussex","projected 2D","","","East","North","X","Y","9003","","4267","10700","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_668[] = {"26758","NAD27 / Florida East","","","","United States (USA) - Florida - FL_E - counties of Brevard; Broward; Clay; Collier; Dade; Duval; Flagler; Glades; Hendry; Highlands; Indian River; Lake; Martin; Monroe; Nassau; Okeechobee; Orange; Osceola; Palm Beach; Putnam; Seminole; St. Johns; St. Lucie","projected 2D","","","East","North","X","Y","9003","","4267","10901","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_669[] = {"26759","NAD27 / Florida West","","","","United States (USA) - Florida - FL_W - counties of Charlotte; Citrus; De Soto; Hardee; Hernando; Hillsborough; Lee; Levy; Manatee; Marion; Pasco; Pinellas; Polk; Sarasota; Sumter","projected 2D","","","East","North","X","Y","9003","","4267","10902","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_670[] = {"26760","NAD27 / Florida North","","","","United States (USA) - Florida - FL_N - counties of Alachua; Baker; Bay; Bradford; Calhoun; Columbia; Dixie; Escambia; Escambia; Franklin; Gadsden; Gilchrist; Gulf; Hamilton; Holmes; Jackson; Jefferson; Lafayette; Leon; Liberty; Madison; Okaloosa; Santa Ros","projected 2D","","","East","North","X","Y","9003","","4267","10903","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_671[] = {"26766","NAD27 / Georgia East","","","","United States (USA) - Georgia - GA_E - counties of Appling; Atkinson; Bacon; Baldwin; Brantley; Bryan; Bulloch; Burke; Camden; Candler; Charlton; Chatham; Clinch; Coffee; Columbia; Dodge; Echols; Effingham; Elbert; Emanuel; Evans; Franklin; Glascock; Glynn","projected 2D","","","East","North","X","Y","9003","","4267","11001","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_672[] = {"26767","NAD27 / Georgia West","","","","United States (USA) - Georgia - GA_W - counties of Baker; Banks; Barrow; Bartow; Ben Hill; Berrien; Bibb; Bleckley; Brooks; Butts; Calhoun; Carroll; Catoosa; Chattahoochee; Chattooga; Cherokee; Clarke; Clay; Clayton; Cobb; Colquitt; Cook; Coweta; Crawford;","projected 2D","","","East","North","X","Y","9003","","4267","11002","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_673[] = {"26768","NAD27 / Idaho East","","","","United States (USA) - Idaho - ID_E - counties of Bannock; Bear Lake; Bingham; Bonneville; Caribou; Clark; Franklin; Fremont; Jefferson; Madison; Oneida; Power; Teton","projected 2D","","","East","North","X","Y","9003","","4267","11101","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_674[] = {"26769","NAD27 / Idaho Central","","","","United States (USA) - daho - ID_C - counties of Blaine; Butte; Camas; Cassia; Custer; Gooding; Jerome; Lemhi; Lincoln; Minidoka; Twin Falls","projected 2D","","","East","North","X","Y","9003","","4267","11102","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_675[] = {"26770","NAD27 / Idaho West","","","","United States (USA) - Idaho - ID_W - counties of Ada; Adams; Benewah; Boise; Bonner; Boundary; Canyon; Clearwater; Elmore; Gem; Idaho; Kootenai; Latah; Lewis; Nez Perce; Owyhee; Payette; Shoshone; Valley; Washington","projected 2D","","","East","North","X","Y","9003","","4267","11103","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_676[] = {"26771","NAD27 / Illinois East","","","","United States (USA) - Illinois - IL_E - counties of Boone; Champaign; Clark; Clay; Coles; Cook; Crawford; Cumberland; De Kalb; De Witt; Douglas; Du Page; Edgar; Edwards; Effingham; Fayette; Ford; Franklin; Gallatin; Grundy; Hamilton; Hardin; Iroquois; Jasp","projected 2D","","","East","North","X","Y","9003","","4267","11201","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_677[] = {"26772","NAD27 / Illinois West","","","","United States (USA) - Illinois - IL_W - counties of Adams; Alexander; Bond; Brown; Bureau; Calhoun; Carroll; Cass; Christian; Clinton; Fulton; Greene; Hancock; Henderson; Henry; Jackson; Jersey; Jo Daviess; Knox; Lee; Logan; Macoupin; Madison; Marshall; Ma","projected 2D","","","East","North","X","Y","9003","","4267","11202","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_678[] = {"26773","NAD27 / Indiana East","","","","United States (USA) - Indiana - IN_E - counties of Adams; Allen; Bartholomew; Blackford; Brown; Cass; Clark; De Kalb; Dearborn; Decatur; Delaware; Elkhart; Fayette; Floyd; Franklin; Fulton; Grant; Hamilton; Hancock; Harrison; Henry; Howard; Huntington; Jac","projected 2D","","","East","North","X","Y","9003","","4267","11301","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_679[] = {"26774","NAD27 / Indiana West","","","","United States (USA) - Indiana - IN_W - counties of Benton; Boone; Carroll; Clay; Clinton; Crawford; Daviess; Dubois; Fountain; Gibson; Greene; Hendricks; Jasper; Knox; La Porte; Lake; Lawrence; Martin; Monroe; Montgomery; Morgan; Newton; Orange; Owen; Park","projected 2D","","","East","North","X","Y","9003","","4267","11302","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_680[] = {"26775","NAD27 / Iowa North","","","","United States (USA) - Iowa - IA_N - counties of Allamakee; Benton; Black Hawk; Boone; Bremer; Buchanan; Buena Vista; Butler; Calhoun; Carroll; Cerro Gordo; Cherokee; Chickasaw; Clay; Clayton; Crawford; Delaware; Dickinson; Dubuque; Emmet; Fayette; Floyd; F","projected 2D","","","East","North","X","Y","9003","","4267","11401","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_681[] = {"26776","NAD27 / Iowa South","","","","United States (USA) - Iowa - IA_S - counties of Adair; Adams; Appanoose; Audubon; Cass; Cedar; Clarke; Clinton; Dallas; Davis; Decatur; Des Moines; Fremont; Guthrie; Harrison; Henry; Iowa; Jasper; Jefferson; Johnson; Keokuk; Lee; Louisa; Lucas; Madison; Ma","projected 2D","","","East","North","X","Y","9003","","4267","11402","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_682[] = {"26777","NAD27 / Kansas North","","","","United States (USA) - Kansas - KS_N - counties of Atchison; Brown; Cheyenne; Clay; Cloud; Decatur; Dickinson; Doniphan; Douglas; Ellis; Ellsworth; Geary; Gove; Graham; Jackson; Jefferson; Jewell; Johnson; Leavenworth; Lincoln; Logan; Marshall; Mitchell; Mo","projected 2D","","","East","North","X","Y","9003","","4267","11501","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_683[] = {"26778","NAD27 / Kansas South","","","","United States (USA) - Kansas - KS_S - counties of Allen; Anderson; Barber; Barton; Bourbon; Butler; Chase; Chautauqua; Cherokee; Clark; Coffey; Comanche; Cowley; Crawford; Edwards; Elk; Finney; Ford; Franklin; Grant; Gray; Greeley; Greenwood; Hamilton; Har","projected 2D","","","East","North","X","Y","9003","","4267","11502","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_684[] = {"26779","NAD27 / Kentucky North","","","","United States (USA) - Kentucky - KY_N - counties of Anderson; Bath; Boone; Bourbon; Boyd; Bracken; Bullitt; Campbell; Carroll; Carter; Clark; Elliott; Fayette; Fleming; Franklin; Gallatin; Grant; Greenup; Harrison; Henry; Jefferson; Jessamine; Kenton; Lawr","projected 2D","","","East","North","X","Y","9003","","4267","11601","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_685[] = {"26780","NAD27 / Kentucky South","","","","United States (USA) - Kentucky - KY_S - counties of Adair; Allen; Ballard; Barren; Bell; Boyle; Breathitt; Breckinridge; Butler; Caldwell; Calloway; Carlisle; Casey; Christian; Clay; Clinton; Crittenden; Cumberland; Daviess; Edmonson; Estill; Floyd; Fulton","projected 2D","","","East","North","X","Y","9003","","4267","11602","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_686[] = {"26781","NAD27 / Louisiana North","","","","United States (USA) - Louisiana - LA_N - counties of Avoyelles; Bienville; Bossier; Caddo; Caldwell; Catahoula; Claiborne; Concordia; De Soto; East Carroll; Franklin; Grant; Jackson; La Salle; Lincoln; Madison; Morehouse; Natchitoches; Ouachita; Rapides; R","projected 2D","","","East","North","X","Y","9003","","4267","11701","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_687[] = {"26782","NAD27 / Louisiana South","","","","United States (USA) - Louisiana - LA_S - counties of Acadia; Allen; Ascension; Assumption; Beauregard; Calcasieu; Cameron; East Baton Rouge; East Feliciana; Evangeline; Iberia; Iberville; Jefferson; Jefferson Davis; Lafayette; LaFourche; Livingston; Orlean","projected 2D","","","East","North","X","Y","9003","","4267","11702","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_688[] = {"26783","NAD27 / Maine East","","","","United States (USA) - Maine - ME_E - counties of Aroostook; Hancock; Knox; Penobscot; Piscataquis; Waldo; Washington","projected 2D","","","East","North","X","Y","9003","","4267","11801","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_689[] = {"26784","NAD27 / Maine West","","","","United States (USA) - Maine - ME_W - counties of Androscoggin; Cumberland; Franklin; Kennebec; Lincoln; Oxford; Sagadahoc; Somerset; York","projected 2D","","","East","North","X","Y","9003","","4267","11802","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_690[] = {"26785","NAD27 / Maryland","","","","United States (USA) - Maryland -MD - counties of Allegany; Anne Arundel; Baltimore; Calvert; Caroline; Carroll; Cecil; Charles; Dorchester; Frederick; Garrett; Harford; Howard; Kent; Montgomery; Prince Georges; Queen Annes; Somerset; St. Marys; Talbot; Was","projected 2D","","","East","North","X","Y","9003","","4267","11900","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_691[] = {"26786","NAD27 / Massachusetts Mainland","NAD27 / Massachusetts","","","United States (USA) - Massachusetts - MA_M - counties of Barnstable; Berkshire; Bristol; Essex; Franklin; Hampden; Hampshire; Middlesex; Norfolk; Plymouth; Suffolk; Worcester","projected 2D","","","East","North","X","Y","9003","","4267","12001","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_692[] = {"26787","NAD27 / Massachusetts Island","NAD27 / Massachusetts Is","","","United States (USA) - Massachusetts - MA_I - counties of Dukes; Nantucket","projected 2D","","","East","North","X","Y","9003","","4267","12002","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_693[] = {"26791","NAD27 / Minnesota North","","","","United States (USA) - Minnesota - MN_N - counties of Beltrami; Clearwater; Cook; Itasca; Kittson; Koochiching; Lake; Lake of the Woods; Mahnomen; Marshall; Norman; Pennington; Polk; Red Lake; Roseau; St. Louis","projected 2D","","","East","North","X","Y","9003","","4267","12201","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_694[] = {"26792","NAD27 / Minnesota Central","NAD27 / Minnesota Cent.","","","United States (USA) - Minnesota - MN_C - counties of Aitkin; Becker; Benton; Carlton; Cass; Chisago; Clay; Crow Wing; Douglas; Grant; Hubbard; Isanti; Kanabec; Mille Lacs; Morrison; Otter Tail; Pine; Pope; Stearns; Stevens; Todd; Traverse; Wadena; Wilkin","projected 2D","","","East","North","X","Y","9003","","4267","12202","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_695[] = {"26793","NAD27 / Minnesota South","","","","United States (USA) - Minnesota - MN_S - counties of Anoka; Big Stone; Blue Earth; Brown; Carver; Chippewa; Cottonwood; Dakota; Dodge; Faribault; Fillmore; Freeborn; Goodhue; Hennepin; Houston; Jackson; Kandiyohi; Lac Qui Parle; Le Sueur; Lincoln; Lyon; Ma","projected 2D","","","East","North","X","Y","9003","","4267","12203","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_696[] = {"26794","NAD27 / Mississippi East","","","","United States (USA) - Mississippi - MS_E - counties of Alcorn; Attala; Benton; Calhoun; Chickasaw; Choctaw; Clarke; Clay; Covington; Forrest; George; Greene; Hancock; Harrison; Itawamba; Jackson; Jasper; Jones; Kemper; Lafayette; Lamar; Lauderdale; Leake; ","projected 2D","","","East","North","X","Y","9003","","4267","12301","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_697[] = {"26795","NAD27 / Mississippi West","","","","United States (USA) - Mississippi - MS_W - counties of Adams; Amite; Bolivar; Carroll; Claiborne; Coahoma; Copiah; De Soto; Franklin; Grenada; Hinds; Holmes; Humphreys; Issaquena; Jefferson; Jefferson Davis; Lawrence; Leflore; Lincoln; Madison; Marion; Mon","projected 2D","","","East","North","X","Y","9003","","4267","12302","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_698[] = {"26796","NAD27 / Missouri East","","","","United States (USA) - Missouri - MO_E - counties of Bollinger; Butler; Cape Girardeau; Carter; Clark; Crawford; Dent; Dunklin; Franklin; Gasconade; Iron; Jefferson; Lewis; Lincoln; Madison; Marion; Mississippi; Montgomery; New Madrid; Oregon; Pemiscot; Per","projected 2D","","","East","North","X","Y","9003","","4267","12401","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_699[] = {"26797","NAD27 / Missouri Central","","","","United States (USA) - Missouri - MO_C - counties of Adair; Audrain; Benton; Boone; Callaway; Camden; Carroll; Chariton; Christian; Cole; Cooper; Dallas; Douglas; Greene; Grundy; Hickory; Howard; Howell; Knox; Laclede; Linn; Livingston; Macon; Maries; Merce","projected 2D","","","East","North","X","Y","9003","","4267","12402","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_700[] = {"26798","NAD27 / Missouri West","","","","United States (USA) - Missouri - MO_W - counties of Andrew; Atchison; Barry; Barton; Bates; Buchanan; Caldwell; Cass; Cedar; Clay; Clinton; Dade; Daviess; De Kalb; Gentry; Harrison; Henry; Holt; Jackson; Jasper; Johnson; Lafayette; Lawrence; McDonald; Newt","projected 2D","","","East","North","X","Y","9003","","4267","12403","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_701[] = {"26801","NAD Michigan / Michigan East","NAD27 / Michigan East","","","United States (USA) - Michigan - MI_E - counties of Alcona; Alpena; Arenac; Bay; Cheboygan; Clinton; Crawford; Genesee; Gladwin; Gratiot; Hillsdale; Huron; Ingham; Iosco; Jackson; Lapeer; Lenawee; Livingston; Macomb; Midland; Monroe; Montmorency; Oakland; ","projected 2D","","","East","North","X","Y","9003","","4268","12101","1998-11-11 00:00:00","","EPSG","Superseded by 26811 2681 [...]
-datafile_rows_t horiz_cs_row_702[] = {"26802","NAD Michigan / Michigan Old Central","NAD27 / Michigan Old Cen","","","United States (USA) - Michigan - MI_C - counties of Allegan; Antrim; Barry; Benzie; Berrien; Branch; Calhoun; Cass; Charlevoix; Clare; Eaton; Emmet; Grand Traverse; Ionia; Isabella; Kalamazoo; Kalkaska; Kent; Lake; Leelanau; Manistee; Mason; Mecosta; Missa","projected 2D","","","East","North","X","Y","9003","","4268","12102","1998-11-11 00:00:00","","EPSG","Superseded by  [...]
-datafile_rows_t horiz_cs_row_703[] = {"26803","NAD Michigan / Michigan West","NAD27 / Michigan West","","","United States (USA) - Michigan - MI_W - counties of Alger; Baraga; Chippewa; Delta; Dickinson; Gogebic; Houghton; Iron; Keweenaw; Luce; Mackinac; Marquette; Menominee; Ontonagon; Schoolcraft","projected 2D","","","East","North","X","Y","9003","","4268","12103","1998-11-11 00:00:00","","EPSG","Superseded by 26811 26812 and 26813.","95.25  97.19  98.22",NULL};
-datafile_rows_t horiz_cs_row_704[] = {"26811","NAD Michigan / Michigan North","NAD27 / Michigan North","","","United States (USA) - Michigan - MI_N - counties of Alger; Baraga; Chippewa; Delta; Dickinson; Gogebic; Houghton; Iron; Keweenaw; Luce; Mackinac; Marquette; Menominee; Ontonagon; Schoolcraft","projected 2D","","","East","North","X","Y","9003","","4268","12111","1998-11-11 00:00:00","","EPSG","Supersedes 26801 26802 and 26803.","96.28  98.22",NULL};
-datafile_rows_t horiz_cs_row_705[] = {"26812","NAD Michigan / Michigan Central","NAD27 / Michigan Central","","","United States (USA) - Michigan - MI_C - counties of Alcona; Alpena; Antrim; Arenac; Benzie; Charlevoix; Cheboygan; Clare; Crawford; Emmet; Gladwin; Grand Traverse; Iosco; Kalkaska; Lake; Leelanau; Manistee; Mason; Missaukee; Montmorency; Ogemaw; Osceola; O","projected 2D","","","East","North","X","Y","9003","","4268","12112","1998-11-11 00:00:00","","EPSG","Supersedes 26801 2 [...]
-datafile_rows_t horiz_cs_row_706[] = {"26813","NAD Michigan / Michigan South","NAD27 / Michigan South","","","United States (USA) - Michigan - MI_S - counties of Allegan; Barry; Bay; Berrien; Branch; Calhoun; Cass; Clinton; Eaton; Genesee; Gratiot; Hillsdale; Huron; Ingham; Ionia; Isabella; Jackson; Kalamazoo; Kent; Lapeer; Lenawee; Livingston; Macomb; Mecosta; Mi","projected 2D","","","East","North","X","Y","9003","","4268","12113","1998-11-11 00:00:00","","EPSG","Supersedes 26801 26802 [...]
-datafile_rows_t horiz_cs_row_707[] = {"26903","NAD83 / UTM zone 3N","","","","North America - United States (USA) - Alaska - 168deg West  to 162deg West.","projected 2D","","","East","North","E","N","9001","","4269","16003","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_708[] = {"26904","NAD83 / UTM zone 4N","","","","North America - United States (USA) - Alaska - 162deg West  to 156deg West.","projected 2D","","","East","North","E","N","9001","","4269","16004","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_709[] = {"26905","NAD83 / UTM zone 5N","","","","North America - United States (USA) - Alaska - 156deg West  to 150deg West.","projected 2D","","","East","North","E","N","9001","","4269","16005","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_710[] = {"26906","NAD83 / UTM zone 6N","","","","North America - United States (USA) - Alaska - 150deg West  to 144deg West.","projected 2D","","","East","North","E","N","9001","","4269","16006","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_711[] = {"26907","NAD83 / UTM zone 7N","","","","North America - Canada; United States (USA) - Alaska - 144deg West  to 138deg West.","projected 2D","","","East","North","E","N","9001","","4269","16007","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_712[] = {"26908","NAD83 / UTM zone 8N","","","","North America - Canada; United States (USA) - 138deg West  to 132deg West.","projected 2D","","","East","North","E","N","9001","","4269","16008","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_713[] = {"26909","NAD83 / UTM zone 9N","","","","North America - Canada; United States (USA) - 132deg West  to 126deg West.","projected 2D","","","East","North","E","N","9001","","4269","16009","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_714[] = {"26910","NAD83 / UTM zone 10N","","","","North America - Canada; United States (USA) - 130deg West  to 120deg West.","projected 2D","","","East","North","E","N","9001","","4269","16010","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_715[] = {"26911","NAD83 / UTM zone 11N","","","","North America - Canada; Mexico; United States (USA) - 120deg West  to 114deg West.","projected 2D","","","East","North","E","N","9001","","4269","16011","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_716[] = {"26912","NAD83 / UTM zone 12N","","","","North America - Canada; Mexico; United States (USA) - 114deg West  to 108deg West.","projected 2D","","","East","North","E","N","9001","","4269","16012","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_717[] = {"26913","NAD83 / UTM zone 13N","","","","North America - Canada; Mexico; United States (USA) - 108deg West  to 102deg West.","projected 2D","","","East","North","E","N","9001","","4269","16013","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_718[] = {"26914","NAD83 / UTM zone 14N","","","","North America - Canada; Mexico; United States (USA) - 102deg West  to 96deg West.","projected 2D","","","East","North","E","N","9001","","4269","16014","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_719[] = {"26915","NAD83 / UTM zone 15N","","","","North America - Canada; Mexico; United States (USA) - 96deg West  to 90deg West.","projected 2D","","","East","North","E","N","9001","","4269","16015","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_720[] = {"26916","NAD83 / UTM zone 16N","","","","North America - Canada; Mexico; United States (USA) - 90deg West  to 84deg West.","projected 2D","","","East","North","E","N","9001","","4269","16016","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_721[] = {"26917","NAD83 / UTM zone 17N","","","","North America - Canada; Mexico; United States (USA) - 84deg West  to 78deg West.","projected 2D","","","East","North","E","N","9001","","4269","16017","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_722[] = {"26918","NAD83 / UTM zone 18N","","","","North America - Canada; United States (USA) - 78deg West  to 72deg West.","projected 2D","","","East","North","E","N","9001","","4269","16018","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_723[] = {"26919","NAD83 / UTM zone 19N","","","","North America - Canada; United States (USA) - 72deg West  to 66deg West.","projected 2D","","","East","North","E","N","9001","","4269","16019","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_724[] = {"26920","NAD83 / UTM zone 20N","","","","North America - Canada; United States (USA) offshore Atlantic - 66deg West  to 60deg West.","projected 2D","","","East","North","E","N","9001","","4269","16020","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_725[] = {"26921","NAD83 / UTM zone 21N","","","","North America - Canada - 60deg West  to 54deg West.","projected 2D","","","East","North","E","N","9001","","4269","16021","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_726[] = {"26922","NAD83 / UTM zone 22N","","","","North America - Canada - Newfoundland - 54deg West  to 48deg West.","projected 2D","","","East","North","E","N","9001","","4269","16022","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_727[] = {"26923","NAD83 / UTM zone 23N","","","","North America - Canada offshore Atlantic - 48deg West  to 42deg West.","projected 2D","","","East","North","E","N","9001","","4269","16023","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_728[] = {"26929","NAD83 / Alabama East","","","","United States (USA) - Alabama - AL_E - counties east of approx 86d 37m West - Barbour; Bullock; Calhoun; Chambers; Cherokee; Clay; Cleburne; Coffee; Coosa; Covington; Crenshaw; Dale; De Kalb; Elmore; Etowah; Geneva; Henry; Houston; Jackson; Lee; Macon; Mad","projected 2D","","","East","North","X","Y","9001","","4269","10131","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_729[] = {"26930","NAD83 / Alabama West","","","","United States (USA) - Alabama - AL_W - counties west of approx 86d 37m West - Autauga; Baldwin; Bibb; Blount; Butler; Chilton; Choctaw; Clarke; Colbert; Conecuh; Cullman; Dallas; Escambia; Fayette; Franklin; Greene; Hale; Jefferson; Lamar; Lauderdale; Lawr","projected 2D","","","East","North","X","Y","9001","","4269","10132","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_730[] = {"26931","NAD83 / Alaska zone 1","","","","United States - Alaska - Panhandle.","projected 2D","","","East","North","X","Y","9001","","4269","15031","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_731[] = {"26932","NAD83 / Alaska zone 2","","","","United States - Alaska - 141deg to 144deg West.","projected 2D","","","East","North","X","Y","9001","","4269","15032","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_732[] = {"26933","NAD83 / Alaska zone 3","","","","United States - Alaska - 144deg to 148deg West.","projected 2D","","","East","North","X","Y","9001","","4269","15033","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_733[] = {"26934","NAD83 / Alaska zone 4","","","","United States - Alaska - 148deg to 152deg West.","projected 2D","","","East","North","X","Y","9001","","4269","15034","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_734[] = {"26935","NAD83 / Alaska zone 5","","","","United States - Alaska - 152deg to 156deg West.","projected 2D","","","East","North","X","Y","9001","","4269","15035","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_735[] = {"26936","NAD83 / Alaska zone 6","","","","United States - Alaska - 156deg to 160deg West.","projected 2D","","","East","North","X","Y","9001","","4269","15036","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_736[] = {"26937","NAD83 / Alaska zone 7","","","","United States - Alaska - 160deg to 164deg West.","projected 2D","","","East","North","X","Y","9001","","4269","15037","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_737[] = {"26938","NAD83 / Alaska zone 8","","","","United States - Alaska - 164deg to 168deg West north of 54d 30m North.","projected 2D","","","East","North","X","Y","9001","","4269","15038","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_738[] = {"26939","NAD83 / Alaska zone 9","","","","United States - Alaska - west of 168deg West and north of 54d 30m North.","projected 2D","","","East","North","X","Y","9001","","4269","15039","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_739[] = {"26940","NAD83 / Alaska zone 10","","","","United States - Alaska - Aleutian Islands.","projected 2D","","","East","North","X","Y","9001","","4269","15040","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_740[] = {"26941","NAD83 / California zone 1","NAD83 / California 1","","","United States (USA) - California - CA_1 - counties north of approx 40 deg North - Del Norte; Humboldt; Lassen; Modoc; Plumas; Shasta; Siskiyou; Tehama; Trinity","projected 2D","","","East","North","X","Y","9001","","4269","10431","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_741[] = {"26942","NAD83 / California zone 2","NAD83 / California 2","","","United States (USA) - California - CA_2 - counties between approx 40 deg & 38d 15m North - Alpine; Amador; Butte; Colusa; El Dorado; Glenn; Lake; Mendocino; Napa; Nevada; Placer; Sacramento; Sierra; Solano; Sonoma; Sutter; Yolo; Yuba","projected 2D","","","East","North","X","Y","9001","","4269","10432","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_742[] = {"26943","NAD83 / California zone 3","NAD83 / California 3","","","United States (USA) - California - CA_3 - counties between approx 38d 15m & 37d North - Alameda; Calaveras; Contra Costa; Madera; Marin; Mariposa; Merced; Mono; San Francisco; San Joaquin; San Mateo; Santa Clara; Santa Cruz; Stanislaus; Tuolumne","projected 2D","","","East","North","X","Y","9001","","4269","10433","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_743[] = {"26944","NAD83 / California zone 4","NAD83 / California 4","","","United States (USA) - California - CA_4 - counties between approx 37d & 35d 30m North - Fresno; Inyo; Kings; Monterey; San Benito; Tulare","projected 2D","","","East","North","X","Y","9001","","4269","10434","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_744[] = {"26945","NAD83 / California zone 5","NAD83 / California 5","","","United States (USA) - California - CA_5 - counties between approx 35d 50m & 34d North - Kern; Los Angeles; San Bernardino; San Luis Obispo; Santa Barbara; Ventura","projected 2D","","","East","North","X","Y","9001","","4269","10435","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_745[] = {"26946","NAD83 / California zone 6","NAD83 / California 6","","","United States (USA) - California - CA_6 - counties south of approx 38d 30m North - Imperial; Orange; Riverside; San Diego","projected 2D","","","East","North","X","Y","9001","","4269","10436","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_746[] = {"26948","NAD83 / Arizona  East","","","","United States (USA) - Arizona - AZ_E - counties east of approx 110d 45m West - Apache; Cochise; Gila; Graham; Greenlee; Navajo","projected 2D","","","East","North","X","Y","9001","","4269","10231","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_747[] = {"26949","NAD83 / Arizona Central","","","","United States (USA) - Arizona - AZ_C - counties between approx 110d 45m and 113d 20m West - Coconino; Maricopa; Pima; Pinal; Santa Cruz; Yavapai","projected 2D","","","East","North","X","Y","9001","","4269","10232","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_748[] = {"26950","NAD83 / Arizona West","","","","United States (USA) - Arizona - AZ_W - counties west of approx 113d 20m West - La Paz; Mohave; Yuma","projected 2D","","","East","North","X","Y","9001","","4269","10233","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_749[] = {"26951","NAD83 / Arkansas North","","","","United States (USA) - Arkansas - AR_N - counties north of approx 34d 50m North - Baxter; Benton; Boone; Carroll; Clay; Cleburne; Conway; Craighead; Crawford; Crittenden; Cross; Faulkner; Franklin; Fulton; Greene; Independence; Izard; Jackson; Johnson; Lawr","projected 2D","","","East","North","X","Y","9001","","4269","10331","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_750[] = {"26952","NAD83 / Arkansas South","","","","United States (USA) - Arkansas - AR_S - counties south of approx 34d 50m North - Arkansas; Ashley; Bradley; Calhoun; Chicot; Clark; Cleveland; Columbia; Dallas; Desha; Drew; Garland; Grant; Hempstead; Hot Spring; Howard; Jefferson; Lafayette; Lee; Lincoln;","projected 2D","","","East","North","X","Y","9001","","4269","10332","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_751[] = {"26953","NAD83 / Colorado North","","","","United States (USA) - Colorado - CO_N - counties north of approx 39d 50m North - Adams; Boulder; Gilpin; Grand; Jackson; Larimer; Logan; Moffat; Morgan; Phillips; Rio Blanco; Routt; Sedgwick; Washington; Weld; Yuma","projected 2D","","","East","North","X","Y","9001","","4269","10531","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_752[] = {"26954","NAD83 / Colorado Central","","","","United States (USA) - Colorado - CO_C - counties between approx 39d 50m & 38d 30m North - Arapahoe; Chaffee; Cheyenne; Clear Creek; Delta; Denver; Douglas; Eagle; El Paso; Elbert; Fremont; Garfield; Gunnison; Jefferson; Kit Carson; Lake; Lincoln; Mesa; Par","projected 2D","","","East","North","X","Y","9001","","4269","10532","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_753[] = {"26955","NAD83 / Colorado South","","","","United States (USA) - Colorado - CO_S - counties south of approx 38d 30m North - Alamosa; Archuleta; Baca; Bent; Conejos; Costilla; Crowley; Custer; Dolores; Hinsdale; Huerfano; Kiowa; La Plata; Las Animas; Mineral; Montezuma; Montrose; Otero; Ouray; Prowe","projected 2D","","","East","North","X","Y","9001","","4269","10533","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_754[] = {"26956","NAD83 / Connecticut","","","","United States (USA) - Connecticut - CT - counties of Fairfield; Hartford; Litchfield; Middlesex; New Haven; New London; Tolland; Windham","projected 2D","","","East","North","X","Y","9001","","4269","10630","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_755[] = {"26957","NAD83 / Delaware","","","","United States (USA) - Delaware - DE - counties of Kent; New Castle; Sussex","projected 2D","","","East","North","X","Y","9001","","4269","10730","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_756[] = {"26958","NAD83 / Florida  East","","","","United States (USA) - Florida - FL_E - counties of Brevard; Broward; Clay; Collier; Dade; Duval; Flagler; Glades; Hendry; Highlands; Indian River; Lake; Martin; Monroe; Nassau; Okeechobee; Orange; Osceola; Palm Beach; Putnam; Seminole; St. Johns; St. Lucie","projected 2D","","","East","North","X","Y","9001","","4269","10931","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_757[] = {"26959","NAD83 / Florida  West","","","","United States (USA) - Florida - FL_W - counties of Charlotte; Citrus; De Soto; Hardee; Hernando; Hillsborough; Lee; Levy; Manatee; Marion; Pasco; Pinellas; Polk; Sarasota; Sumter","projected 2D","","","East","North","X","Y","9001","","4269","10932","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_758[] = {"26960","NAD83 / Florida North","","","","United States (USA) - Florida - FL_N - counties of Alachua; Baker; Bay; Bradford; Calhoun; Columbia; Dixie; Escambia; Escambia; Franklin; Gadsden; Gilchrist; Gulf; Hamilton; Holmes; Jackson; Jefferson; Lafayette; Leon; Liberty; Madison; Okaloosa; Santa Ros","projected 2D","","","East","North","X","Y","9001","","4269","10933","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_759[] = {"26961","NAD83 / Hawaii  zone 1","","","","United States - Hawaii - island of Hawaii.","projected 2D","","","East","North","X","Y","9001","","4269","15131","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_760[] = {"26962","NAD83 / Hawaii  zone 2","","","","United States - Hawaii - Maui; Kahoolawe; Lanai; Molokai.","projected 2D","","","East","North","X","Y","9001","","4269","15132","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_761[] = {"26963","NAD83 / Hawaii  zone 3","","","","United States - Hawaii - Oahu.","projected 2D","","","East","North","X","Y","9001","","4269","15133","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_762[] = {"26964","NAD83 / Hawaii  zone 4","","","","United States - Hawaii - Kauai.","projected 2D","","","East","North","X","Y","9001","","4269","15134","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_763[] = {"26965","NAD83 / Hawaii  zone 5","","","","United States - Hawaii - Niihau.","projected 2D","","","East","North","X","Y","9001","","4269","15135","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_764[] = {"26966","NAD83 / Georgia  East","","","","United States (USA) - Georgia - GA_E - counties of Appling; Atkinson; Bacon; Baldwin; Brantley; Bryan; Bulloch; Burke; Camden; Candler; Charlton; Chatham; Clinch; Coffee; Columbia; Dodge; Echols; Effingham; Elbert; Emanuel; Evans; Franklin; Glascock; Glynn","projected 2D","","","East","North","X","Y","9001","","4269","11031","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_765[] = {"26967","NAD83 / Georgia West","","","","United States (USA) - Georgia - GA_W - counties of Baker; Banks; Barrow; Bartow; Ben Hill; Berrien; Bibb; Bleckley; Brooks; Butts; Calhoun; Carroll; Catoosa; Chattahoochee; Chattooga; Cherokee; Clarke; Clay; Clayton; Cobb; Colquitt; Cook; Coweta; Crawford;","projected 2D","","","East","North","X","Y","9001","","4269","11032","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_766[] = {"26968","NAD83 / Idaho  East","","","","United States (USA) - Idaho - ID_E - counties of Bannock; Bear Lake; Bingham; Bonneville; Caribou; Clark; Franklin; Fremont; Jefferson; Madison; Oneida; Power; Teton","projected 2D","","","East","North","X","Y","9001","","4269","11131","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_767[] = {"26969","NAD83 / Idaho  Central","","","","United States (USA) - Idaho - ID_C - counties of Blaine; Butte; Camas; Cassia; Custer; Gooding; Jerome; Lemhi; Lincoln; Minidoka; Twin Falls","projected 2D","","","East","North","X","Y","9001","","4269","11132","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_768[] = {"26970","NAD83 / Idaho  West","","","","United States (USA) - Idaho - ID_W - counties of Ada; Adams; Benewah; Boise; Bonner; Boundary; Canyon; Clearwater; Elmore; Gem; Idaho; Kootenai; Latah; Lewis; Nez Perce; Owyhee; Payette; Shoshone; Valley; Washington","projected 2D","","","East","North","X","Y","9001","","4269","11133","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_769[] = {"26971","NAD83 / Illinois  East","","","","United States (USA) - Illinois - IL_E - counties of Boone; Champaign; Clark; Clay; Coles; Cook; Crawford; Cumberland; De Kalb; De Witt; Douglas; Du Page; Edgar; Edwards; Effingham; Fayette; Ford; Franklin; Gallatin; Grundy; Hamilton; Hardin; Iroquois; Jasp","projected 2D","","","East","North","X","Y","9001","","4269","11231","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_770[] = {"26972","NAD83 / Illinois  West","","","","United States (USA) - Illinois - IL_W - counties of Adams; Alexander; Bond; Brown; Bureau; Calhoun; Carroll; Cass; Christian; Clinton; Fulton; Greene; Hancock; Henderson; Henry; Jackson; Jersey; Jo Daviess; Knox; Lee; Logan; Macoupin; Madison; Marshall; Ma","projected 2D","","","East","North","X","Y","9001","","4269","11232","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_771[] = {"26973","NAD83 / Indiana  East","","","","United States (USA) - Indiana - IN_E - counties of Adams; Allen; Bartholomew; Blackford; Brown; Cass; Clark; De Kalb; Dearborn; Decatur; Delaware; Elkhart; Fayette; Floyd; Franklin; Fulton; Grant; Hamilton; Hancock; Harrison; Henry; Howard; Huntington; Jac","projected 2D","","","East","North","X","Y","9001","","4269","11331","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_772[] = {"26974","NAD83 / Indiana  West","","","","United States (USA) - Indiana - IN_W - counties of Benton; Boone; Carroll; Clay; Clinton; Crawford; Daviess; Dubois; Fountain; Gibson; Greene; Hendricks; Jasper; Knox; La Porte; Lake; Lawrence; Martin; Monroe; Montgomery; Morgan; Newton; Orange; Owen; Park","projected 2D","","","East","North","X","Y","9001","","4269","11332","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_773[] = {"26975","NAD83 / Iowa North","","","","United States (USA) - Iowa - IA_N - counties of Allamakee; Benton; Black Hawk; Boone; Bremer; Buchanan; Buena Vista; Butler; Calhoun; Carroll; Cerro Gordo; Cherokee; Chickasaw; Clay; Clayton; Crawford; Delaware; Dickinson; Dubuque; Emmet; Fayette; Floyd; F","projected 2D","","","East","North","X","Y","9001","","4269","11431","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_774[] = {"26976","NAD83 / Iowa South","","","","United States (USA) - Iowa - IA_S - counties of Adair; Adams; Appanoose; Audubon; Cass; Cedar; Clarke; Clinton; Dallas; Davis; Decatur; Des Moines; Fremont; Guthrie; Harrison; Henry; Iowa; Jasper; Jefferson; Johnson; Keokuk; Lee; Louisa; Lucas; Madison; Ma","projected 2D","","","East","North","X","Y","9001","","4269","11432","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_775[] = {"26977","NAD83 / Kansas North","","","","United States (USA) - Kansas - KS_N - counties of Atchison; Brown; Cheyenne; Clay; Cloud; Decatur; Dickinson; Doniphan; Douglas; Ellis; Ellsworth; Geary; Gove; Graham; Jackson; Jefferson; Jewell; Johnson; Leavenworth; Lincoln; Logan; Marshall; Mitchell; Mo","projected 2D","","","East","North","X","Y","9001","","4269","11531","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_776[] = {"26978","NAD83 / Kansas South","","","","United States (USA) - Kansas - KS_S - counties of Allen; Anderson; Barber; Barton; Bourbon; Butler; Chase; Chautauqua; Cherokee; Clark; Coffey; Comanche; Cowley; Crawford; Edwards; Elk; Finney; Ford; Franklin; Grant; Gray; Greeley; Greenwood; Hamilton; Har","projected 2D","","","East","North","X","Y","9001","","4269","11532","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_777[] = {"26979","NAD83 / Kentucky North","","","","United States (USA) - Kentucky - KY_N - counties of Anderson; Bath; Boone; Bourbon; Boyd; Bracken; Bullitt; Campbell; Carroll; Carter; Clark; Elliott; Fayette; Fleming; Franklin; Gallatin; Grant; Greenup; Harrison; Henry; Jefferson; Jessamine; Kenton; Lawr","projected 2D","","","East","North","X","Y","9001","","4269","11631","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_778[] = {"26980","NAD83 / Kentucky South","","","","United States (USA) - Kentucky - KY_S - counties of Adair; Allen; Ballard; Barren; Bell; Boyle; Breathitt; Breckinridge; Butler; Caldwell; Calloway; Carlisle; Casey; Christian; Clay; Clinton; Crittenden; Cumberland; Daviess; Edmonson; Estill; Floyd; Fulton","projected 2D","","","East","North","X","Y","9001","","4269","11632","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_779[] = {"26981","NAD83 / Louisiana North","","","","United States (USA) - Louisiana - LA_N - counties of Avoyelles; Bienville; Bossier; Caddo; Caldwell; Catahoula; Claiborne; Concordia; De Soto; East Carroll; Franklin; Grant; Jackson; La Salle; Lincoln; Madison; Morehouse; Natchitoches; Ouachita; Rapides; R","projected 2D","","","East","North","X","Y","9001","","4269","11731","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_780[] = {"26982","NAD83 / Louisiana South","","","","United States (USA) - Louisiana - LA_S - counties of Acadia; Allen; Ascension; Assumption; Beauregard; Calcasieu; Cameron; East Baton Rouge; East Feliciana; Evangeline; Iberia; Iberville; Jefferson; Jefferson Davis; Lafayette; LaFourche; Livingston; Orlean","projected 2D","","","East","North","X","Y","9001","","4269","11732","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_781[] = {"26983","NAD83 / Maine  East","","","","United States (USA) - Maine - ME_E - counties of Aroostook; Hancock; Knox; Penobscot; Piscataquis; Waldo; Washington","projected 2D","","","East","North","X","Y","9001","","4269","11831","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_782[] = {"26984","NAD83 / Maine  West","","","","United States (USA) - Maine - ME_W - counties of Androscoggin; Cumberland; Franklin; Kennebec; Lincoln; Oxford; Sagadahoc; Somerset; York","projected 2D","","","East","North","X","Y","9001","","4269","11832","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_783[] = {"26985","NAD83 / Maryland","","","","United States (USA) - Maryland -MD - counties of Allegany; Anne Arundel; Baltimore; Calvert; Caroline; Carroll; Cecil; Charles; Dorchester; Frederick; Garrett; Harford; Howard; Kent; Montgomery; Prince Georges; Queen Annes; Somerset; St. Marys; Talbot; Was","projected 2D","","","East","North","X","Y","9001","","4269","11930","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_784[] = {"26986","NAD83 / Massachusetts Mainland","NAD83 / Massachusetts","","","United States (USA) - Massachusetts - MA_M - counties of Barnstable; Berkshire; Bristol; Essex; Franklin; Hampden; Hampshire; Middlesex; Norfolk; Plymouth; Suffolk; Worcester","projected 2D","","","East","North","X","Y","9001","","4269","12031","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_785[] = {"26987","NAD83 / Massachusetts Island","NAD83 / Massachusetts Is","","","United States (USA) - Massachusetts - MA_I - counties of Dukes; Nantucket","projected 2D","","","East","North","X","Y","9001","","4269","12032","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_786[] = {"26988","NAD83 / Michigan North","","","","United States (USA) - Michigan - MI_N - counties of Alger; Baraga; Chippewa; Delta; Dickinson; Gogebic; Houghton; Iron; Keweenaw; Luce; Mackinac; Marquette; Menominee; Ontonagon; Schoolcraft","projected 2D","","","East","North","X","Y","9001","","4269","12141","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_787[] = {"26989","NAD83 / Michigan Central","","","","United States (USA) - Michigan - MI_C - counties of Alcona; Alpena; Antrim; Arenac; Benzie; Charlevoix; Cheboygan; Clare; Crawford; Emmet; Gladwin; Grand Traverse; Iosco; Kalkaska; Lake; Leelanau; Manistee; Mason; Missaukee; Montmorency; Ogemaw; Osceola; O","projected 2D","","","East","North","X","Y","9001","","4269","12142","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_788[] = {"26990","NAD83 / Michigan South","","","","United States (USA) - Michigan - MI_S - counties of Allegan; Barry; Bay; Berrien; Branch; Calhoun; Cass; Clinton; Eaton; Genesee; Gratiot; Hillsdale; Huron; Ingham; Ionia; Isabella; Jackson; Kalamazoo; Kent; Lapeer; Lenawee; Livingston; Macomb; Mecosta; Mi","projected 2D","","","East","North","X","Y","9001","","4269","12143","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_789[] = {"26991","NAD83 / Minnesota North","","","","United States (USA) - Minnesota - MN_N - counties of Beltrami; Clearwater; Cook; Itasca; Kittson; Koochiching; Lake; Lake of the Woods; Mahnomen; Marshall; Norman; Pennington; Polk; Red Lake; Roseau; St. Louis","projected 2D","","","East","North","X","Y","9001","","4269","12231","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_790[] = {"26992","NAD83 / Minnesota Central","NAD83 / Minnesota Cent.","","","United States (USA) - Minnesota - MN_C - counties of Aitkin; Becker; Benton; Carlton; Cass; Chisago; Clay; Crow Wing; Douglas; Grant; Hubbard; Isanti; Kanabec; Mille Lacs; Morrison; Otter Tail; Pine; Pope; Stearns; Stevens; Todd; Traverse; Wadena; Wilkin","projected 2D","","","East","North","X","Y","9001","","4269","12232","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_791[] = {"26993","NAD83 / Minnesota South","","","","United States (USA) - Minnesota - MN_S - counties of Anoka; Big Stone; Blue Earth; Brown; Carver; Chippewa; Cottonwood; Dakota; Dodge; Faribault; Fillmore; Freeborn; Goodhue; Hennepin; Houston; Jackson; Kandiyohi; Lac Qui Parle; Le Sueur; Lincoln; Lyon; Ma","projected 2D","","","East","North","X","Y","9001","","4269","12233","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_792[] = {"26994","NAD83 / Mississippi East","","","","United States (USA) - Mississippi - MS_E - counties of Alcorn; Attala; Benton; Calhoun; Chickasaw; Choctaw; Clarke; Clay; Covington; Forrest; George; Greene; Hancock; Harrison; Itawamba; Jackson; Jasper; Jones; Kemper; Lafayette; Lamar; Lauderdale; Leake; ","projected 2D","","","East","North","X","Y","9001","","4269","12331","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_793[] = {"26995","NAD83 / Mississippi West","","","","United States (USA) - Mississippi - MS_W - counties of Adams; Amite; Bolivar; Carroll; Claiborne; Coahoma; Copiah; De Soto; Franklin; Grenada; Hinds; Holmes; Humphreys; Issaquena; Jefferson; Jefferson Davis; Lawrence; Leflore; Lincoln; Madison; Marion; Mon","projected 2D","","","East","North","X","Y","9001","","4269","12332","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_794[] = {"26996","NAD83 / Missouri  East","","","","United States (USA) - Missouri - MO_E - counties of Bollinger; Butler; Cape Girardeau; Carter; Clark; Crawford; Dent; Dunklin; Franklin; Gasconade; Iron; Jefferson; Lewis; Lincoln; Madison; Marion; Mississippi; Montgomery; New Madrid; Oregon; Pemiscot; Per","projected 2D","","","East","North","X","Y","9001","","4269","12431","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_795[] = {"26997","NAD83 / Missouri Central","","","","United States (USA) - Missouri - MO_C - counties of Adair; Audrain; Benton; Boone; Callaway; Camden; Carroll; Chariton; Christian; Cole; Cooper; Dallas; Douglas; Greene; Grundy; Hickory; Howard; Howell; Knox; Laclede; Linn; Livingston; Macon; Maries; Merce","projected 2D","","","East","North","X","Y","9001","","4269","12432","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_796[] = {"26998","NAD83 / Missouri  West","","","","United States (USA) - Missouri - MO_W - counties of Andrew; Atchison; Barry; Barton; Bates; Buchanan; Caldwell; Cass; Cedar; Clay; Clinton; Dade; Daviess; De Kalb; Gentry; Harrison; Henry; Holt; Jackson; Jasper; Johnson; Lafayette; Lawrence; McDonald; Newt","projected 2D","","","East","North","X","Y","9001","","4269","12433","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_797[] = {"27038","Nahrwan 1967 / UTM zone 38N","Nahrwan 1967 / UTM 38N","","","Kuwait west of 48 deg East.","projected 2D","","","East","North","E","N","9001","","4270","16038","1996-04-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_798[] = {"27039","Nahrwan 1967 / UTM zone 39N","Nahrwan 1967 / UTM 39N","","","Kuwait east of 48 deg East.  United Arab Emirates (UAE) - Abu Dhabi - west of 54 deg East.","projected 2D","","","East","North","E","N","9001","","4270","16039","1996-04-12 00:00:00","","EPSG","","96.12",NULL};
-datafile_rows_t horiz_cs_row_799[] = {"27040","Nahrwan 1967 / UTM zone 40N","Nahrwan 1967 / UTM 40N","","","United Arab Emirates (UAE) - Abu Dhabi east of 54 deg East; Dubai; Sharjah; Ajman; Fujairah; Ras Al Kaimah; Umm Al Qaiwain.","projected 2D","","","East","North","E","N","9001","","4270","16040","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_800[] = {"27120","Naparima 1972 / UTM zone 20N","Naparima / UTM 20N","","","Trinidad and Tobago.","projected 2D","","","East","North","E","N","9001","","4271","16020","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_801[] = {"27200","GD49 / New Zealand Map Grid","GD49 / NZ Map Grid","","","New Zealand.","projected 2D","","","East","North","E","N","9001","","4272","19917","1995-06-02 00:00:00","","EPSG","Supersedes 27291 (GD49 / North Island Grid) and 27292 (GD49 / South Island Grid).","",NULL};
-datafile_rows_t horiz_cs_row_802[] = {"27291","GD49 / North Island Grid","","","","New Zealand - North Island.","projected 2D","","","East","North","E","N","9040","","4272","18141","1999-10-20 00:00:00","","EPSG","Sears 1922 British foot-metre conversion factor applied to ellipsoid.  Superseded by 27200 (GD49 / New Zealand Map Grid).","97.231",NULL};
-datafile_rows_t horiz_cs_row_803[] = {"27292","GD49 / South Island Grid","","","","New Zealand - South Island.","projected 2D","","","East","North","E","N","9040","","4272","18142","1999-10-20 00:00:00","","EPSG","Sears 1922 British foot-metre conversion factor applied to ellipsoid.  Superseded by 27200 (GD49 / New Zealand Map Grid).","97.231",NULL};
-datafile_rows_t horiz_cs_row_804[] = {"27391","NGO 1948 (Oslo) / NGO zone I","NGO 1948 / I","","","Norway - west of 3deg 30min W of Oslo (7deg 13min 20.5sec E of Greenwich).","projected 2D","","","North","East","x","y","9001","","4817","18221","1999-10-20 00:00:00","","EPSG","Used for large (>1:50000) scale mapping and cadastral work.  To be phased out and replaced by ETRF89 / UTM zone 32N.","",NULL};
-datafile_rows_t horiz_cs_row_805[] = {"27392","NGO 1948 (Oslo) / NGO zone II","NGO 1948 / II","","","Norway - between 3deg 30min W and 1deg 10min W of Oslo (7deg 13min 20.5sec E  and 9deg 33min 20.5sec E of Greenwich).","projected 2D","","","North","East","x","y","9001","","4817","18222","1999-10-20 00:00:00","","EPSG","Used for large (>1:50000) scale mapping and cadastral work.  To be phased out and replaced by ETRF89 / UTM zone 32N.","",NULL};
-datafile_rows_t horiz_cs_row_806[] = {"27393","NGO 1948 (Oslo) / NGO zone III","NGO 1948 / III","","","Norway - between 1deg 10min W and 1deg 15min E of Oslo (9deg 33min 20.5sec E and 11deg 58min 20.5sec E of Greenwich).","projected 2D","","","North","East","x","y","9001","","4817","18223","1999-10-20 00:00:00","","EPSG","Used for large (>1:50000) scale mapping and cadastral work.  To be phased out and replaced by ETRF89 / UTM zone 32N.","",NULL};
-datafile_rows_t horiz_cs_row_807[] = {"27394","NGO 1948 (Oslo) / NGO zone IV","NGO 1948 / IV","","","Norway - between 1deg 15min E and 4deg 20min E of Oslo (11deg 58min 20.5sec E and 15deg 03min 20.5sec E of Greenwich).","projected 2D","","","North","East","x","y","9001","","4817","18224","1999-10-20 00:00:00","","EPSG","Used for large (>1:50000) scale mapping and cadastral work.  To be phased out and replaced by ETRF89 / UTM zone 32N and ETRF89 / UTM zone 33N.","",NULL};
-datafile_rows_t horiz_cs_row_808[] = {"27395","NGO 1948 (Oslo) / NGO zone V","NGO 1948 / V","","","Norway - between 4deg 20min E and 8deg 10min E of Oslo (15deg 03min 20.5sec E and 18deg 53min 20.5sec E of Greenwich).","projected 2D","","","North","East","x","y","9001","","4817","18225","1999-10-20 00:00:00","","EPSG","Used for large (>1:50000) scale mapping and cadastral work.  To be phased out and replaced by ETRF89 / UTM zone 33N and ETRF89 / UTM zone 34N.","",NULL};
-datafile_rows_t horiz_cs_row_809[] = {"27396","NGO 1948 (Oslo) / NGO zone VI","NGO 1948 / VI","","","Norway - between 8deg 10min E and 12deg 10min E of Oslo (18deg 53min 20.5sec E and 22deg 53min 20.5sec E of Greenwich).","projected 2D","","","North","East","x","y","9001","","4817","18226","1999-10-20 00:00:00","","EPSG","Used for large (>1:50000) scale mapping and cadastral work.  To be phased out and replaced by ETRF89 / UTM zone 34N.","",NULL};
-datafile_rows_t horiz_cs_row_810[] = {"27397","NGO 1948 (Oslo) / NGO zone VII","NGO 1948 / VII","","","Norway - between 12deg 10min E and 16deg 15min E of Oslo (22deg 53min 20.5sec E and 26deg 58min 20.5sec E of Greenwich).","projected 2D","","","North","East","x","y","9001","","4817","18227","1999-10-20 00:00:00","","EPSG","Used for large (>1:50000) scale mapping and cadastral work.  To be phased out and replaced by ETRF89 / UTM zone 34N and ETRF89 / UTM zone 35N.","",NULL};
-datafile_rows_t horiz_cs_row_811[] = {"27398","NGO 1948 (Oslo) / NGO zone VIII","NGO 1948 / VIII","","","Norway - east of 16deg 15min E of Oslo (26deg 58min 20.5sec E of Greenwich).","projected 2D","","","North","East","x","y","9001","","4817","18228","1999-10-20 00:00:00","","EPSG","Used for large (>1:50000) scale mapping and cadastral work.  To be phased out and replaced by ETRF89 / UTM zone 35N.","",NULL};
-datafile_rows_t horiz_cs_row_812[] = {"27429","Datum 73 / UTM zone 29N","","","","Portugal - onshore.","projected 2D","","","East","North","E","N","9001","","4274","16029","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_813[] = {"27500","ATF (Paris) / Nord de Guerre","ATF / Nord de Guerre","","","France - Alsace.","projected 2D","","","East","North","X","Y","9001","","4901","19903","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_814[] = {"27581","NTF (Paris) / France I","NTF / France I","","","France north of 53.5 grads (48 deg 09 min) North.","projected 2D","","","East","North","X","Y","9001","","4807","18081","1996-04-12 00:00:00","","EPSG","Introduced 1972. Supersedes NTF / Nord France (code 27591).","95.26",NULL};
-datafile_rows_t horiz_cs_row_815[] = {"27582","NTF (Paris) / France II","NTF / France II","","","France 50.5 to 53.5 grads (45 deg 27 min to 48 deg 09 min) North. Also used over all mainlanf France.","projected 2D","","","East","North","X","Y","9001","","4807","18082","1996-04-12 00:00:00","","EPSG","Introduced 1972. Supersedes NTF / Centre France (code 27592).","95.26",NULL};
-datafile_rows_t horiz_cs_row_816[] = {"27583","NTF (Paris) / France III","NTF / France III","","","France south of 50.5 grads (45 deg 27 min) North.","projected 2D","","","East","North","X","Y","9001","","4807","18083","1996-04-12 00:00:00","","EPSG","Introduced 1972. Supersedes NTF / Sud France (code 27593).","95.26",NULL};
-datafile_rows_t horiz_cs_row_817[] = {"27584","NTF (Paris) / France IV","NTF / France IV","","","France - Corsica","projected 2D","","","East","North","X","Y","9001","","4807","18084","1996-04-12 00:00:00","","EPSG","Introduced 1972. Supersedes NTF / Corse (code 27594).","",NULL};
-datafile_rows_t horiz_cs_row_818[] = {"27591","NTF (Paris) / Nord France","NTF / Nord France","","","France north of 53.5 grads (48 deg 09 min) North.","projected 2D","","","East","North","X","Y","9001","","4807","18091","1996-04-12 00:00:00","","EPSG","Superseded by NTF / France I (code 27581) from 1972.","95.26",NULL};
-datafile_rows_t horiz_cs_row_819[] = {"27592","NTF (Paris) / Centre France","NTF / Centre France","","","France 50.5 to 53.5 grads (45 deg 27 min to 48 deg 09 min) North.","projected 2D","","","East","North","X","Y","9001","","4807","18092","1996-04-12 00:00:00","","EPSG","Superseded by NTF / France II (code 27582) from 1972.","95.26",NULL};
-datafile_rows_t horiz_cs_row_820[] = {"27593","NTF (Paris) / Sud France","NTF / Sud France","","","France south of 50.5 grads (45 deg 27 min) North.","projected 2D","","","East","North","X","Y","9001","","4807","18093","1996-04-12 00:00:00","","EPSG","Superseded by NTF / France III (code 27583) from 1972.","95.26",NULL};
-datafile_rows_t horiz_cs_row_821[] = {"27594","NTF (Paris) / Corse","NTF / Corse","","","France - Corsica","projected 2D","","","East","North","X","Y","9001","","4807","18094","1996-04-12 00:00:00","","EPSG","Superseded by NTF / France IV (code 27584) from 1972.","",NULL};
-datafile_rows_t horiz_cs_row_822[] = {"27700","OSGB 1936 / British National Grid","British National Grid","","","United Kingdom (UK) - onshore England; Scotland; Wales; Isle of Man.","projected 2D","","","East","North","E","N","9001","","4277","19916","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_823[] = {"28191","Palestine 1923 / Palestine Grid","Palestine Grid","","","Israel; Jordan","projected 2D","","","East","North","E","N","9001","","4281","18201","1999-04-22 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_824[] = {"28192","Palestine 1923 / Palestine Belt","Palestine Belt","","","Israel; Jordan","projected 2D","","","East","North","E","N","9001","","4281","18202","1999-04-22 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_825[] = {"28193","Palestine 1923 / Israeli CS Grid","Israeli CS Grid","","","Israel.","projected 2D","","","East","North","E","N","9001","","4281","18203","1999-10-20 00:00:00","Survey of Israel.","EPSG","Superceded by Israeli TM Grid (EPSG code 239).","",NULL};
-datafile_rows_t horiz_cs_row_826[] = {"28232","Pointe Noire / UTM zone 32S","Point Noire / UTM 32S","","","Congo.","projected 2D","","","East","North","E","N","9001","","4282","16132","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_827[] = {"28348","GDA94 / MGA zone 48","","","","Australia - 102deg East  to 108deg East.","projected 2D","","","East","North","E","N","9001","","4283","17348","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_828[] = {"28349","GDA94 / MGA zone 49","","","","Australia - 108deg East  to 114deg East.","projected 2D","","","East","North","E","N","9001","","4283","17349","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_829[] = {"28350","GDA94 / MGA zone 50","","","","Australia - 114deg East  to 120deg East.","projected 2D","","","East","North","E","N","9001","","4283","17350","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_830[] = {"28351","GDA94 / MGA zone 51","","","","Australia - 120deg East  to 126deg East.","projected 2D","","","East","North","E","N","9001","","4283","17351","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_831[] = {"28352","GDA94 / MGA zone 52","","","","Australia - 126deg East  to 132deg East.","projected 2D","","","East","North","E","N","9001","","4283","17352","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_832[] = {"28353","GDA94 / MGA zone 53","","","","Australia - 132deg East  to 138deg East.","projected 2D","","","East","North","E","N","9001","","4283","17353","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_833[] = {"28354","GDA94 / MGA zone 54","","","","Australia - 138deg East  to 144deg East.","projected 2D","","","East","North","E","N","9001","","4283","17354","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_834[] = {"28355","GDA94 / MGA zone 55","","","","Australia - 144deg East  to 150deg East.","projected 2D","","","East","North","E","N","9001","","4283","17355","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_835[] = {"28356","GDA94 / MGA zone 56","","","","Australia - 150deg East  to 156deg East.","projected 2D","","","East","North","E","N","9001","","4283","17356","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_836[] = {"28357","GDA94 / MGA zone 57","","","","Australia - 156deg East  to 162deg East.","projected 2D","","","East","North","E","N","9001","","4283","17357","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_837[] = {"28358","GDA94 / MGA zone 58","","","","Australia - 162deg East  to 168deg East.","projected 2D","","","East","North","E","N","9001","","4283","17358","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_838[] = {"28402","Pulkovo 1942 / Gauss-Kruger zone 2","1942 Coord. Sys. zone 2","","","Czech Republic and Germany (former DDR) - west of 12 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16202","1998-06-30 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_839[] = {"28403","Pulkovo 1942 / Gauss-Kruger zone 3","1942 Coord. Sys. zone 3","","","Czech Republic and Germany ( former DDR) - east of 12 deg East; Poland and Slovakia - west of 18 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16203","1998-06-30 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_840[] = {"28404","Pulkovo 1942 / Gauss-Kruger zone 4","1942 Coord. Sys. zone 4","","","Estonia; Latvia; Lithuania; Russia; Ukraine; - west of 24 deg East; Poland - east of 24 deg East; Slovakia east of 18 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16204","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_841[] = {"28405","Pulkovo 1942 / Gauss-Kruger zone 5","1942 Coord. Sys. zone 5","","","Belarus - west of 30 deg East;  Estonia; Latvia & Lithuania - east of 24 deg East;  Moldova;  Russia &  Ukraine - 24 deg to 30 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16205","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_842[] = {"28406","Pulkovo 1942 / Gauss-Kruger zone 6","1942 Coord. Sys. zone 6","","","Belarus - east of 30 deg East;  Russia  &  Ukraine  - 30 deg to 36 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16206","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_843[] = {"28407","Pulkovo 1942 / Gauss-Kruger zone 7","1942 Coord. Sys. zone 7","","","Georgia - west of 36 deg East;  Russia  - 36 deg to 42 deg East;  Ukraine - east of 36 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16207","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_844[] = {"28408","Pulkovo 1942 / Gauss-Kruger zone 8","1942 Coord. Sys. zone 8","","","Armenia  Azerbaijan - west of 48 deg East;  Georgia - east of 42 deg East;  Russia - 42 deg to 48 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16208","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_845[] = {"28409","Pulkovo 1942 / Gauss-Kruger zone 9","1942 Coord. Sys. zone 9","","","Azerbaijan - east of 48 deg East;  Kazakstan - west of 54 deg East;  Russia - 48 deg to 54 deg East;  Turkmenistan - west of 54 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16209","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_846[] = {"28410","Pulkovo 1942 / Gauss-Kruger zone 10","1942 Coord. Sys. zone 10","","","Kazakstan;  Russia;  Turkmenistan  - 54 deg  to 60 deg East; Uzbekistan - west of 60 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16210","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_847[] = {"28411","Pulkovo 1942 / Gauss-Kruger zone 11","1942 Coord. Sys. zone 11","","","Kazakstan;  Russia;  Uzbekistan - 60 deg to 66 deg East;  Turkmenistan - east of 60 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16211","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_848[] = {"28412","Pulkovo 1942 / Gauss-Kruger zone 12","1942 Coord. Sys. zone 12","","","Kazakstan &  Russia - 66 deg to 72 deg East;  Kirgistan & Tadzhikstan - west of 72 deg East;  Uzbekistan - east of 66 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16212","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_849[] = {"28413","Pulkovo 1942 / Gauss-Kruger zone 13","1942 Coord. Sys. zone 13","","","Kazakstan;  Kirgizstan;  Russia - 72 deg to 78 deg East;  Tadzhikstan - east of 72 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16213","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_850[] = {"28414","Pulkovo 1942 / Gauss-Kruger zone 14","1942 Coord. Sys. zone 14","","","Kazakstan &  Russia - 78 deg to 84 deg East; Kirgizstan - east of 78 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16214","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_851[] = {"28415","Pulkovo 1942 / Gauss-Kruger zone 15","1942 Coord. Sys. zone 15","","","Kazakstan - east of 84 deg East;  Russia - 84 deg to 90 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16215","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_852[] = {"28416","Pulkovo 1942 / Gauss-Kruger zone 16","1942 Coord. Sys. zone 16","","","Russia - 90 deg to 96 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16216","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_853[] = {"28417","Pulkovo 1942 / Gauss-Kruger zone 17","1942 Coord. Sys. zone 17","","","Russia - 96 deg to 102deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16217","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_854[] = {"28418","Pulkovo 1942 / Gauss-Kruger zone 18","1942 Coord. Sys. zone 18","","","Russia - 102 deg to 108 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16218","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_855[] = {"28419","Pulkovo 1942 / Gauss-Kruger zone 19","1942 Coord. Sys. zone 19","","","Russia - 108 deg to 114 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16219","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_856[] = {"28420","Pulkovo 1942 / Gauss-Kruger zone 20","1942 Coord. Sys. zone 20","","","Russia - 114 deg to 120 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16220","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_857[] = {"28421","Pulkovo 1942 / Gauss-Kruger zone 21","1942 Coord. Sys. zone 21","","","Russia - 120 deg to 126 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16221","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_858[] = {"28422","Pulkovo 1942 / Gauss-Kruger zone 22","1942 Coord. Sys. zone 22","","","Russia - 126 deg to 132 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16222","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_859[] = {"28423","Pulkovo 1942 / Gauss-Kruger zone 23","1942 Coord. Sys. zone 23","","","Russia - 132 deg to 138 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16223","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_860[] = {"28424","Pulkovo 1942 / Gauss-Kruger zone 24","1942 Coord. Sys. zone 24","","","Russia - 138 deg to 144 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16224","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_861[] = {"28425","Pulkovo 1942 / Gauss-Kruger zone 25","1942 Coord. Sys. zone 25","","","Russia - 144 deg to 150 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16225","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_862[] = {"28426","Pulkovo 1942 / Gauss-Kruger zone 26","1942 Coord. Sys. zone 26","","","Russia - 150 deg to 156 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16226","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_863[] = {"28427","Pulkovo 1942 / Gauss-Kruger zone 27","1942 Coord. Sys. zone 27","","","Russia - 156 deg to 162 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16227","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_864[] = {"28428","Pulkovo 1942 / Gauss-Kruger zone 28","1942 Coord. Sys. zone 28","","","Russia - 162 deg to 168 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16228","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_865[] = {"28429","Pulkovo 1942 / Gauss-Kruger zone 29","1942 Coord. Sys. zone 29","","","Russia - 168 deg to 174 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16229","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_866[] = {"28430","Pulkovo 1942 / Gauss-Kruger zone 30","1942 Coord. Sys. zone 30","","","Russia - 174 deg East to 180 deg.","projected 2D","","","North","East","X","Y","9001","","4284","16230","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_867[] = {"28431","Pulkovo 1942 / Gauss-Kruger zone 31","1942 Coord. Sys. zone 31","","","Russia - 180 deg to 174 deg West.","projected 2D","","","North","East","X","Y","9001","","4284","16231","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_868[] = {"28432","Pulkovo 1942 / Gauss-Kruger zone 32","1942 Coord. Sys. zone 32","","","Russia - east of 174 deg West.","projected 2D","","","North","East","X","Y","9001","","4284","16232","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_869[] = {"28462","Pulkovo 1942 / Gauss-Kruger 2N","Pulkovo / Gauss 2N","","","Czech Republic and Germany (former DDR) - west of 12 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16302","1998-06-30 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_870[] = {"28463","Pulkovo 1942 / Gauss-Kruger 3N","Pulkovo / Gauss 3N","","","Czech Republic and Germany ( former DDR) - east of 12 deg East; Poland and Slovakia - west of 18 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16303","1998-06-30 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_871[] = {"28464","Pulkovo 1942 / Gauss-Kruger 4N","Pulkovo / Gauss 4N","","","Estonia; Latvia; Lithuania; Russia; Ukraine; - west of 24 deg East; Poland - east of 24 deg East; Slovakia east of 18 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16304","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_872[] = {"28465","Pulkovo 1942 / Gauss-Kruger 5N","Pulkovo / Gauss 5N","","","Belarus - west of 30 deg East;  Estonia; Latvia & Lithuania - east of 24 deg East;  Moldova;  Russia &  Ukraine - 24 deg to 30 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16305","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_873[] = {"28466","Pulkovo 1942 / Gauss-Kruger 6N","Pulkovo / Gauss 6N","","","Belarus - east of 30 deg East;  Russia  &  Ukraine  - 30 deg to 36 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16306","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_874[] = {"28467","Pulkovo 1942 / Gauss-Kruger 7N","Pulkovo / Gauss 7N","","","Georgia - west of 36 deg East;  Russia  - 36 deg to 42 deg East;  Ukraine - east of 36 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16307","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_875[] = {"28468","Pulkovo 1942 / Gauss-Kruger 8N","Pulkovo / Gauss 8N","","","Armenia - west of 48 deg East;  Azerbaijan - west of 48 deg East;  Georgia - east of 42 deg East;  Russia - 42 deg to 48 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16308","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_876[] = {"28469","Pulkovo 1942 / Gauss-Kruger 9N","Pulkovo / Gauss 9N","","","Azerbaijan - east of 48 deg East;  Kazakstan - west of 54 deg East;  Russia - 48 deg to 54 deg East;  Turkmenistan - west of 54 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16309","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_877[] = {"28470","Pulkovo 1942 / Gauss-Kruger 10N","Pulkovo / Gauss 10N","","","Kazakstan;  Russia;  Turkmenistan  - 54 deg  to 60 deg East;  Uzbekistan - west of 60 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16310","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_878[] = {"28471","Pulkovo 1942 / Gauss-Kruger 11N","Pulkovo / Gauss 11N","","","Kazakstan;  Russia;  Uzbekistan - 60 deg to 66 deg East;  Turkmenistan - east of 60 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16311","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_879[] = {"28472","Pulkovo 1942 / Gauss-Kruger 12N","Pulkovo / Gauss 12N","","","Kazakstan &  Russia - 66 deg to 72 deg East;  Kirgistan & Tadzhikstan - west of 72 deg East;  Uzbekistan - east of 66 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16312","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_880[] = {"28473","Pulkovo 1942 / Gauss-Kruger 13N","Pulkovo / Gauss 13N","","","Kazakstan;  Kirgizstan;  Russia - 72 deg to 78 deg East;  Tadzhikstan - east of 72 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16313","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_881[] = {"28474","Pulkovo 1942 / Gauss-Kruger 14N","Pulkovo / Gauss 14N","","","Kazakstan &  Russia - 78 deg to 84 deg East;  Kirgizstan - east of 78 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16314","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_882[] = {"28475","Pulkovo 1942 / Gauss-Kruger 15N","Pulkovo / Gauss 15N","","","Kazakstan - east of 84 deg East;  Russia - 84 deg to 90 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16315","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_883[] = {"28476","Pulkovo 1942 / Gauss-Kruger 16N","Pulkovo / Gauss 16N","","","Russia - 90 deg to 96 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16316","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_884[] = {"28477","Pulkovo 1942 / Gauss-Kruger 17N","Pulkovo / Gauss 17N","","","Russia - 96 deg to 102deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16317","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_885[] = {"28478","Pulkovo 1942 / Gauss-Kruger 18N","Pulkovo / Gauss 18N","","","Russia - 102 deg to 108 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16318","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_886[] = {"28479","Pulkovo 1942 / Gauss-Kruger 19N","Pulkovo / Gauss 19N","","","Russia - 108 deg to 114 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16319","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_887[] = {"28480","Pulkovo 1942 / Gauss-Kruger 20N","Pulkovo / Gauss 20N","","","Russia - 114 deg to 120 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16320","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_888[] = {"28481","Pulkovo 1942 / Gauss-Kruger 21N","Pulkovo / Gauss 21N","","","Russia - 120 deg to 126 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16321","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_889[] = {"28482","Pulkovo 1942 / Gauss-Kruger 22N","Pulkovo / Gauss 22N","","","Russia - 126 deg to 132 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16322","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_890[] = {"28483","Pulkovo 1942 / Gauss-Kruger 23N","Pulkovo / Gauss 23N","","","Russia - 132 deg to 138 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16323","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_891[] = {"28484","Pulkovo 1942 / Gauss-Kruger 24N","Pulkovo / Gauss 24N","","","Russia - 138 deg to 144 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16324","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_892[] = {"28485","Pulkovo 1942 / Gauss-Kruger 25N","Pulkovo / Gauss 25N","","","Russia - 144 deg to 150 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16325","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_893[] = {"28486","Pulkovo 1942 / Gauss-Kruger 26N","Pulkovo / Gauss 26N","","","Russia - 150 deg to 156 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16326","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_894[] = {"28487","Pulkovo 1942 / Gauss-Kruger 27N","Pulkovo / Gauss 27N","","","Russia - 156 deg to 162 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16327","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_895[] = {"28488","Pulkovo 1942 / Gauss-Kruger 28N","Pulkovo / Gauss 28N","","","Russia - 162 deg to 168 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16328","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_896[] = {"28489","Pulkovo 1942 / Gauss-Kruger 29N","Pulkovo / Gauss 29N","","","Russia - 168 deg to 174 deg East.","projected 2D","","","North","East","X","Y","9001","","4284","16329","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_897[] = {"28490","Pulkovo 1942 / Gauss-Kruger 30N","Pulkovo / Gauss 30N","","","Russia - 174 deg East to 180 deg.","projected 2D","","","North","East","X","Y","9001","","4284","16330","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_898[] = {"28491","Pulkovo 1942 / Gauss-Kruger 31N","Pulkovo / Gauss 31N","","","Russia - 180 deg to 174 deg West.","projected 2D","","","North","East","X","Y","9001","","4284","16331","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_899[] = {"28492","Pulkovo 1942 / Gauss-Kruger 32N","Pulkovo / Gauss 32N","","","Russia - east of 174 deg West.","projected 2D","","","North","East","X","Y","9001","","4284","16332","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_900[] = {"28600","Qatar / Qatar National Grid","Qatar National Grid","","","Qatar - onshore.","projected 2D","","","East","North","E","N","9001","","4286","19919","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_901[] = {"28991","RD / Netherlands Old","","","","Netherlands - onshore.","projected 2D","","","East","North","X","Y","9001","","4289","19913","1995-06-02 00:00:00","","EPSG","Superseded by 28992 (RD / Netherlands New).","",NULL};
-datafile_rows_t horiz_cs_row_902[] = {"28992","RD / Netherlands New","","","","Netherlands - onshore.","projected 2D","","","East","North","X","Y","9001","","4289","19914","1995-06-02 00:00:00","","EPSG","Supersedes 28991 (RD / Netherlands Old).","",NULL};
-datafile_rows_t horiz_cs_row_903[] = {"29100","SAD69 / Brazil Polyconic","","","","Brazil","projected 2D","","","East","North","X","Y","9001","","4291","19941","1999-04-22 00:00:00","PetroBras","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_904[] = {"29118","SAD69 / UTM zone 18N","","","","South America - 78deg West to 72deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4291","16018","1995-06-02 00:00:00","","EPSG","Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.251.  Error introduced if not using the truncated precision will not exceed 5 cm.","97.252",NULL};
-datafile_rows_t horiz_cs_row_905[] = {"29119","SAD69 / UTM zone 19N","","","","South America - 72deg West to 66deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4291","16019","1995-06-02 00:00:00","","EPSG","Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.252.  Error introduced if not using the truncated precision will not exceed 5 cm.","97.252",NULL};
-datafile_rows_t horiz_cs_row_906[] = {"29120","SAD69 / UTM zone 20N","","","","South America - 66deg West to 60deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4291","16020","1995-06-02 00:00:00","","EPSG","Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.252.  Error introduced if not using the truncated precision will not exceed 5 cm.","97.252",NULL};
-datafile_rows_t horiz_cs_row_907[] = {"29121","SAD69 / UTM zone 21N","","","","South America - 60deg West to 54deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4291","16021","1995-06-02 00:00:00","","EPSG","Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.252.  Error introduced if not using the truncated precision will not exceed 5 cm.","97.252",NULL};
-datafile_rows_t horiz_cs_row_908[] = {"29122","SAD69 / UTM zone 22N","","","","South America - 54deg West to 48deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4291","16022","1995-06-02 00:00:00","","EPSG","Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.252.  Error introduced if not using the truncated precision will not exceed 5 cm.","97.252",NULL};
-datafile_rows_t horiz_cs_row_909[] = {"29177","SAD69 / UTM zone 17S","","","","South America - 84deg West to 78deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4291","16117","1995-06-02 00:00:00","","EPSG","Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.252.  Error introduced if not using the truncated precision will not exceed 5 cm.","97.252",NULL};
-datafile_rows_t horiz_cs_row_910[] = {"29178","SAD69 / UTM zone 18S","","","","South America - Brazil - 78deg West to 72deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4291","16118","1995-06-02 00:00:00","","EPSG","Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.252.  Error introduced if not using the truncated precision will not exceed 5 cm.","97.252",NULL};
-datafile_rows_t horiz_cs_row_911[] = {"29179","SAD69 / UTM zone 19S","","","","South America - Brazil - 72deg West to 66deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4291","16119","1995-06-02 00:00:00","","EPSG","Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.252.  Error introduced if not using the truncated precision will not exceed 5 cm.","97.252",NULL};
-datafile_rows_t horiz_cs_row_912[] = {"29180","SAD69 / UTM zone 20S","","","","South America - Brazil - 66deg West to 60deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4291","16120","1995-06-02 00:00:00","","EPSG","Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.252.  Error introduced if not using the truncated precision will not exceed 5 cm.","97.252",NULL};
-datafile_rows_t horiz_cs_row_913[] = {"29181","SAD69 / UTM zone 21S","","","","South America - Brazil - 60deg West to 54deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4291","16121","1995-06-02 00:00:00","","EPSG","Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.252.  Error introduced if not using the truncated precision will not exceed 5 cm.","97.252",NULL};
-datafile_rows_t horiz_cs_row_914[] = {"29182","SAD69 / UTM zone 22S","","","","South America - Brazil - 54deg West to 48deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4291","16122","1995-06-02 00:00:00","","EPSG","Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.252.  Error introduced if not using the truncated precision will not exceed 5 cm.","97.252",NULL};
-datafile_rows_t horiz_cs_row_915[] = {"29183","SAD69 / UTM zone 23S","","","","South America - 48deg West to 42deg West.","projected 2D","","","East","North","E","N","9001","","4291","16123","1995-06-02 00:00:00","","EPSG","Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.252.  Error introduced if not using the truncated precision will not exceed 5 cm.","97.252",NULL};
-datafile_rows_t horiz_cs_row_916[] = {"29184","SAD69 / UTM zone 24S","","","","South America - Brazil - 42deg West to 36deg West.","projected 2D","","","East","North","E","N","9001","","4291","16124","1995-06-02 00:00:00","","EPSG","Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.252.  Error introduced if not using the truncated precision will not exceed 5 cm.","97.252",NULL};
-datafile_rows_t horiz_cs_row_917[] = {"29185","SAD69 / UTM zone 25S","","","","South America - 36deg West to 30deg West.","projected 2D","","","East","North","E","N","9001","","4291","16125","1995-06-02 00:00:00","","EPSG","Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.252.  Error introduced if not using the truncated precision will not exceed 5 cm.","97.252",NULL};
-datafile_rows_t horiz_cs_row_918[] = {"29220","Sapper Hill 1943 / UTM zone 20S","Sapper Hill / UTM 20S","","","Falkland Islands - west of 60 deg West.","projected 2D","","","East","North","E","N","9001","","4292","16120","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_919[] = {"29221","Sapper Hill 1943 / UTM zone 21S","Sapper Hill / UTM 21S","","","Falkland Islands - east of 60 deg West.","projected 2D","","","East","North","E","N","9001","","4292","16121","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_920[] = {"29333","Schwarzeck / UTM zone 33S","Schwarzeck / UTM 33S","","","Namibia - offshore.","projected 2D","","","East","North","E","N","9001","","4293","16133","1996-04-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_921[] = {"29371","South West African Coord. System zone 11","SW African CS zone 11","","","Namibia - west of 12 deg East.","projected 2D","","","West","South","W","S","9031","","4293","17611","1997-06-16 00:00:00","","EPSG","","97.16",NULL};
-datafile_rows_t horiz_cs_row_922[] = {"29373","South West African Coord. System zone 13","SW African CS zone 13","","","Namibia - 12 to 14 deg East.","projected 2D","","","West","South","W","S","9031","","4293","17613","1997-06-16 00:00:00","","EPSG","","97.16",NULL};
-datafile_rows_t horiz_cs_row_923[] = {"29375","South West African Coord. System zone 15","SW African CS zone 15","","","Namibia - 14 to 16 deg East.","projected 2D","","","West","South","W","S","9031","","4293","17615","1997-06-16 00:00:00","","EPSG","","97.16",NULL};
-datafile_rows_t horiz_cs_row_924[] = {"29377","South West African Coord. System zone 17","SW African CS zone 17","","","Namibia - 16 to 18 deg East.","projected 2D","","","West","South","W","S","9031","","4293","17617","1997-06-16 00:00:00","","EPSG","","97.16",NULL};
-datafile_rows_t horiz_cs_row_925[] = {"29379","South West African Coord. System zone 19","SW African CS zone 19","","","Namibia - 18 to 20 deg East.","projected 2D","","","West","South","W","S","9031","","4293","17619","1997-06-16 00:00:00","","EPSG","","97.16",NULL};
-datafile_rows_t horiz_cs_row_926[] = {"29381","South West African Coord. System zone 21","SW African CS zone 21","","","Namibia - 20 to 22 deg East.","projected 2D","","","West","South","W","S","9031","","4293","17621","1997-06-16 00:00:00","","EPSG","","97.16",NULL};
-datafile_rows_t horiz_cs_row_927[] = {"29383","South West African Coord. System zone 23","SW African CS zone 23","","","Namibia - 22 to 24 deg East.","projected 2D","","","West","South","W","S","9031","","4293","17623","1997-06-16 00:00:00","","EPSG","","97.16",NULL};
-datafile_rows_t horiz_cs_row_928[] = {"29385","South West African Coord. System zone 25","SW African CS zone 25","","","Namibia - east of 24 deg East.","projected 2D","","","West","South","W","S","9031","","4293","17625","1997-06-16 00:00:00","","EPSG","","97.16",NULL};
-datafile_rows_t horiz_cs_row_929[] = {"29635","Sudan / UTM zone 35N","","","","Sudan - south - west of 30 deg East.","projected 2D","","","East","North","E","N","9001","","4296","16035","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_930[] = {"29636","Sudan / UTM zone 36N","","","","Sudan - south - east of 30 deg East.","projected 2D","","","East","North","E","N","9001","","4296","16036","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_931[] = {"29700","Tananarive (Paris) / Laborde Grid","Tananarive  / Laborde","","","Madagascar.","projected 2D","","","East","North","X","Y","9001","","4810","19911","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_932[] = {"29738","Tananarive / UTM zone 38S","Tananarive / UTM 38S","","","Madagascar - offshore west of 48 deg East.","projected 2D","","","East","North","E","N","9001","","4297","16138","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_933[] = {"29739","Tananarive / UTM zone 39S","Tananarive / UTM 39S","","","Madagascar - offshore east of 48 deg East.","projected 2D","","","East","North","E","N","9001","","4297","16139","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_934[] = {"29849","Timbalai 1948 / UTM zone 49N","Timbalai 1948 / UTM 49N","","","Brunei - offshore; Malaysia - East Malaysia (Sarawak).","projected 2D","","","East","North","E","N","9001","","4298","16049","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_935[] = {"29850","Timbalai 1948 / UTM zone 50N","Timbalai 1948 / UTM 50N","","","Brunei - offshore; Malaysia - East Malaysia (Sabah).","projected 2D","","","East","North","E","N","9001","","4298","16050","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_936[] = {"29871","Timbalai 1948 / R.S.O. Borneo (ch)","Timbalai  / Borneo (ch)","","","Malaysia - East Malaysia (Sabah; Sarawak).","projected 2D","","","East","North","E","N","9042","","4298","19912","1999-10-20 00:00:00","","EPSG","Adopts metric conversion of 39.370147 inches per metre.","97.231",NULL};
-datafile_rows_t horiz_cs_row_937[] = {"29872","Timbalai 1948 / R.S.O. Borneo (ft)","Timbalai  / Borneo (ft)","","","Brunei; Malaysia - East Malaysia (Sabah; Sarawak).","projected 2D","","","East","North","E","N","9041","","4298","19912","1999-10-20 00:00:00","","EPSG","Original projection definition in chains.  1 chain = 66 feet=792 inches.  Adopts metric conversion of 39.370147 inches per metre.","97.231",NULL};
-datafile_rows_t horiz_cs_row_938[] = {"29873","Timbalai 1948 / R.S.O. Borneo (m)","Timbalai  / Borneo (m)","","","Brunei.","projected 2D","","","East","North","E","N","9001","","4298","19912","1997-07-22 00:00:00","","EPSG","Original projection definition in chains.  1 chain = 66 feet=792 inches.  Adopts metric conversion of 39.370147 inches per metre.","",NULL};
-datafile_rows_t horiz_cs_row_939[] = {"29900","TM65 / Irish National Grid","TM65 / Irish Nat Grid","","","Ireland - onshore; United Kingdom (UK) - Northern Ireland (Ulster) onshore","projected 2D","","","East","North","E","N","9001","","4299","19908","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_940[] = {"30161","Tokyo / Japan Plane Rectangular CS I","Tokyo / Japan zone I","","","Japan - Kyushu - Nagasaki-ken; islands of Kagoshima-ken between 27 and 32 deg N and between 128 deg 18 min and 130 deg E (between 128 deg 18 min and 30 deg 13 min E for Amami islands).","projected 2D","","","North","East","X","Y","9001","","4301","17801","1998-12-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_941[] = {"30162","Tokyo / Japan Plane Rectangular CS II","Tokyo / Japan zone II","","","Japan - Kyushu - Fukuoka-ken; Saga-ken; Kumamoto-ken; Oita-ken; Miyazaki-ken; Kagoshima-ken (except for area within Japan Plane Rectangular Coordinates System zone I).","projected 2D","","","North","East","X","Y","9001","","4301","17802","1998-12-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_942[] = {"30163","Tokyo / Japan Plane Rectangular CS III","Tokyo / Japan zone III","","","Japan - Kyushu - Fukuoka-ken; Saga-ken; Kumamoto-ken; Oita-ken; Miyazaki-ken; Kagoshima-ken (except for area within Japan Plane Rectangular Coordinates System zone I).","projected 2D","","","North","East","X","Y","9001","","4301","17803","1998-12-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_943[] = {"30164","Tokyo / Japan Plane Rectangular CS IV","Tokyo / Japan zone IV","","","Japan - Kyushu - Fukuoka-ken; Saga-ken; Kumamoto-ken; Oita-ken; Miyazaki-ken; Kagoshima-ken (except for area within Japan Plane Rectangular Coordinates System zone I).","projected 2D","","","North","East","X","Y","9001","","4301","17804","1998-12-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_944[] = {"30165","Tokyo / Japan Plane Rectangular CS V","Tokyo / Japan zone V","","","Japan - Kyushu - Fukuoka-ken; Saga-ken; Kumamoto-ken; Oita-ken; Miyazaki-ken; Kagoshima-ken (except for area within Japan Plane Rectangular Coordinates System zone I).","projected 2D","","","North","East","X","Y","9001","","4301","17805","1998-12-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_945[] = {"30166","Tokyo / Japan Plane Rectangular CS VI","Tokyo / Japan zone VI","","","Japan - Kyushu - Fukuoka-ken; Saga-ken; Kumamoto-ken; Oita-ken; Miyazaki-ken; Kagoshima-ken (except for area within Japan Plane Rectangular Coordinates System zone I).","projected 2D","","","North","East","X","Y","9001","","4301","17806","1998-12-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_946[] = {"30167","Tokyo / Japan Plane Rectangular CS VII","Tokyo / Japan zone VII","","","Japan - Kyushu - Fukuoka-ken; Saga-ken; Kumamoto-ken; Oita-ken; Miyazaki-ken; Kagoshima-ken (except for area within Japan Plane Rectangular Coordinates System zone I).","projected 2D","","","North","East","X","Y","9001","","4301","17807","1998-12-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_947[] = {"30168","Tokyo / Japan Plane Rectangular CS VIII","Tokyo / Japan zone VIII","","","Japan - Kyushu - Fukuoka-ken; Saga-ken; Kumamoto-ken; Oita-ken; Miyazaki-ken; Kagoshima-ken (except for area within Japan Plane Rectangular Coordinates System zone I).","projected 2D","","","North","East","X","Y","9001","","4301","17808","1998-12-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_948[] = {"30169","Tokyo / Japan Plane Rectangular CS IX","Tokyo / Japan zone IX","","","Japan - Kyushu - Fukuoka-ken; Saga-ken; Kumamoto-ken; Oita-ken; Miyazaki-ken; Kagoshima-ken (except for area within Japan Plane Rectangular Coordinates System zone I).","projected 2D","","","North","East","X","Y","9001","","4301","17809","1998-12-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_949[] = {"30170","Tokyo / Japan Plane Rectangular CS X","Tokyo / Japan zone X","","","Japan - Kyushu - Fukuoka-ken; Saga-ken; Kumamoto-ken; Oita-ken; Miyazaki-ken; Kagoshima-ken (except for area within Japan Plane Rectangular Coordinates System zone I).","projected 2D","","","North","East","X","Y","9001","","4301","17810","1998-12-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_950[] = {"30171","Tokyo / Japan Plane Rectangular CS XI","Tokyo / Japan zone XI","","","Japan - Hokkaido west of 141 deg 15 min E approx. - Otaru city; Hakodate city; Date city; Usu-gun and Abuta-gun of Iburi-shicyo; area of Hiyama-shicyo; area of Shiribeshi-shicyo; Oshima-shicyo.","projected 2D","","","North","East","X","Y","9001","","4301","17811","1998-12-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_951[] = {"30172","Tokyo / Japan Plane Rectangular CS XII","Tokyo / Japan zone XII","","","Japan - Hokkaido west of 141 deg 15 min E approx. - Otaru city; Hakodate city; Date city; Usu-gun and Abuta-gun of Iburi-shicyo; area of Hiyama-shicyo; area of Shiribeshi-shicyo; Oshima-shicyo.","projected 2D","","","North","East","X","Y","9001","","4301","17812","1998-12-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_952[] = {"30173","Tokyo / Japan Plane Rectangular CS XIII","Tokyo / Japan zone XIII","","","Japan - Hokkaido west of 141 deg 15 min E approx. - Otaru city; Hakodate city; Date city; Usu-gun and Abuta-gun of Iburi-shicyo; area of Hiyama-shicyo; area of Shiribeshi-shicyo; Oshima-shicyo.","projected 2D","","","North","East","X","Y","9001","","4301","17813","1998-12-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_953[] = {"30174","Tokyo / Japan Plane Rectangular CS XIV","Tokyo / Japan zone XIV","","","Japan - Tokyo-to south of 28 deg N & between 140 deg 30 min & 143 deg E.","projected 2D","","","North","East","X","Y","9001","","4301","17814","1998-12-12 00:00:00","","EPSG","Although legally defined as Tokyo datum the accuracy of the geodetic connection to mainland Japan is low.","",NULL};
-datafile_rows_t horiz_cs_row_954[] = {"30175","Tokyo / Japan Plane Rectangular CS XV","Tokyo / Japan zone XV","","","Japan - Okinawa-ken between 126 deg &130 deg E.","projected 2D","","","North","East","X","Y","9001","","4301","17815","1998-12-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_955[] = {"30176","Tokyo / Japan Plane Rectangular CS XVI","Tokyo / Japan zone XVI","","","Japan - Okinawa-ken west of 126 deg E.","projected 2D","","","North","East","X","Y","9001","","4301","17816","1998-12-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_956[] = {"30177","Tokyo / Japan Plane Rectangular CS XVII","Tokyo / Japan zone XVII","","","Japan - Okinawa-ken east of 130 deg E.","projected 2D","","","North","East","X","Y","9001","","4301","17817","1998-12-12 00:00:00","","EPSG","Although legally defined as Tokyo datum the accuracy of the geodetic connection to mainland Japan is low.","",NULL};
-datafile_rows_t horiz_cs_row_957[] = {"30178","Tokyo / Japan Plane Rectangular CS XVIII","Tokyo / Japan zone XVIII","","","Japan - Tokyo-to south of 28 N & west of 140 deg 30 min E.","projected 2D","","","North","East","X","Y","9001","","4301","17818","1998-12-12 00:00:00","","EPSG","Although legally defined as Tokyo datum the accuracy of the geodetic connection to mainland Japan is low.","",NULL};
-datafile_rows_t horiz_cs_row_958[] = {"30179","Tokyo / Japan Plane Rectangular CS XIX","Tokyo / Japan zone XIX","","","Japan - Tokyo-to south of 28 N & east of 143 deg E.","projected 2D","","","North","East","X","Y","9001","","4301","17819","1998-12-12 00:00:00","","EPSG","Although legally defined as Tokyo datum the accuracy of the geodetic connection to mainland Japan is low.","",NULL};
-datafile_rows_t horiz_cs_row_959[] = {"30200","Trinidad 1903 / Trinidad Grid","Trinidad 1903 / Trinidad","","","Trinidad and Tobago - Trinidad","projected 2D","","","East","North","E","N","9039","","4302","19925","1999-10-20 00:00:00","","EPSG","","97.231",NULL};
-datafile_rows_t horiz_cs_row_960[] = {"30339","TC(1948) / UTM zone 39N","","","","United Arab Emirates (UAE) - Abu Dhabi west of 54 deg East.","projected 2D","","","East","North","E","N","9001","","4303","16039","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_961[] = {"30340","TC(1948) / UTM zone 40N","","","","United Arab Emirates (UAE) - Abu Dhabi east of 54 deg East; Dubai.","projected 2D","","","East","North","E","N","9001","","4303","16040","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_962[] = {"30491","Voirol 1875 / Nord Algerie (ancienne)","Voirol /N Algerie ancien","","","Algeria - north of 38.5 grads (34 deg 39 min) North.","projected 2D","","","East","North","X","Y","9001","","4304","18011","1995-06-02 00:00:00","","EPSG","Superseded by 30591 (Voirol Unifie / Algeria Nord).","",NULL};
-datafile_rows_t horiz_cs_row_963[] = {"30492","Voirol 1875 / Sud Algerie (ancienne)","Voirol /S Algerie ancien","","","Algeria - 35 grads to 38.5 grads (31 deg 30 min to 34 deg 39 min) North.","projected 2D","","","East","North","X","Y","9001","","4304","18012","1995-06-02 00:00:00","","EPSG","Superseded by 30592 (Voirol Unifie / Algeria Sud).","",NULL};
-datafile_rows_t horiz_cs_row_964[] = {"30591","Voirol Unifie / Nord Algerie","Voirol Unifie /N Algerie","","","Algeria - north of 38.5 grads (34 deg 39 min) North.","projected 2D","","","East","North","X","Y","9001","","4305","18021","1995-06-02 00:00:00","","EPSG","Supersedes 30491 (Voirol 1875 / Nord Algeria ancienne).","",NULL};
-datafile_rows_t horiz_cs_row_965[] = {"30592","Voirol Unifie / Sud Algerie","Voirol Unifie /S Algerie","","","Algeria - 35 grads to 38.5 grads (31 deg 30 min to 34 deg 39 min) North.","projected 2D","","","East","North","X","Y","9001","","4305","18022","1995-06-02 00:00:00","","EPSG","Supersedes 30492 (Voirol 1875 / Sud Algeria ancienne).","",NULL};
-datafile_rows_t horiz_cs_row_966[] = {"30729","Nord Sahara 1959 / UTM zone 29N","Nord Sahara / UTM 29N","","","Algeria west of 6 deg West (of Greenwich).","projected 2D","","","East","North","E","N","9001","","4307","16029","1996-04-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_967[] = {"30730","Nord Sahara 1959 / UTM zone 30N","Nord Sahara / UTM 30N","","","Algeria 6 deg West to 0 deg East (of Greenwich).","projected 2D","","","East","North","E","N","9001","","4307","16030","1996-04-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_968[] = {"30731","Nord Sahara 1959 / UTM zone 31N","Nord Sahara / UTM 31N","","","Algeria 0 deg to 6 deg East (of Greenwich).","projected 2D","","","East","North","E","N","9001","","4307","16031","1996-04-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_969[] = {"30732","Nord Sahara 1959 / UTM zone 32N","Nord Sahara / UTM 32N","","","Algeria east of 6 deg East (of Greenwich).","projected 2D","","","East","North","E","N","9001","","4307","16032","1996-04-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_970[] = {"30800","RT38 2.5 gon W","","","","Sweden","projected 2D","","","North","East","X","Y","9001","","4308","19929","1997-11-13 00:00:00","National Land Survey of Sweden","EPSG","","97.14  97.39",NULL};
-datafile_rows_t horiz_cs_row_971[] = {"31028","Yoff / UTM zone 28N","","","","Senegal.","projected 2D","","","East","North","E","N","9001","","4310","16028","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_972[] = {"31121","Zanderij / UTM zone 21N","","","","Suriname.","projected 2D","","","East","North","E","N","9001","","4311","16021","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_973[] = {"31291","MGI (Ferro) / Austria West Zone","MGI / Austria West","","","Austria west of 11deg 50min East of Greenwich (29 deg 30 min East of Ferro).","projected 2D","","","East","North","X","Y","9001","","4805","18041","1995-06-02 00:00:00","","EPSG","Superceded by MGI / M34 (EPSG code 31296).","97.01",NULL};
-datafile_rows_t horiz_cs_row_974[] = {"31292","MGI (Ferro) / Austria Central Zone","MGI / Austria Central","","","Austria between 11deg 50min and 14deg 50min East of Greenwich (29 deg 30 min and 32 deg 30 min East of Ferro).","projected 2D","","","East","North","X","Y","9001","","4805","18042","1995-06-02 00:00:00","","EPSG","Superceded by MGI / M31 (EPSG code 31295).","97.01",NULL};
-datafile_rows_t horiz_cs_row_975[] = {"31293","MGI (Ferro) / Austria East Zone","MGI / Austria East","","","Austria east of 14deg 50min East of Greenwich (32 deg 30 min East of Ferro).","projected 2D","","","East","North","X","Y","9001","","4805","18043","1995-06-02 00:00:00","","EPSG","Superceded by MGI / M28 (EPSG code 31294).","97.01",NULL};
-datafile_rows_t horiz_cs_row_976[] = {"31294","MGI / M28","","","","Austria west of 11deg 50min East of Greenwich (29 deg 30 min East of Ferro).","projected 2D","","","East","North","X","Y","9001","","4312","18044","1999-10-20 00:00:00","","EPSG","Supercedes MGI (Ferro) / Austria East zone (EPSG code 31293).","",NULL};
-datafile_rows_t horiz_cs_row_977[] = {"31295","MGI / M31","","","","Austria between 11deg 50min and 14deg 50min East of Greenwich (29 deg 30 min and 32 deg 30 min East of Ferro).","projected 2D","","","East","North","X","Y","9001","","4312","18045","1999-10-20 00:00:00","","EPSG","Supercedes MGI (Ferro) / Austria Central zone (EPSG code 31292).","",NULL};
-datafile_rows_t horiz_cs_row_978[] = {"31296","MGI / M34","","","","Austria east of 14deg 50min East of Greenwich (32 deg 30 min East of Ferro).","projected 2D","","","East","North","X","Y","9001","","4312","18046","1999-10-20 00:00:00","","EPSG","Supercedes MGI (Ferro) / Austria West zone (EPSG code 31291).","",NULL};
-datafile_rows_t horiz_cs_row_979[] = {"31297","MGI / Austria Lambert","","","","Austria","projected 2D","","","East","North","X","Y","9001","","4312","19947","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_980[] = {"31300","Belge 1972 / Belge Lambert 72","Belge Lambert 72","","","Belgium - onshore.","projected 2D","","","East","North","X","Y","9001","","4313","19902","1995-06-02 00:00:00","","EPSG","Supersedes 21500 (Belge 1950 / Belge Lambert 50).","",NULL};
-datafile_rows_t horiz_cs_row_981[] = {"31491","DHDN / Germany zone 1","","","","Germany - onshore west of 4 deg 30 min East.","projected 2D","","","East","North","X","Y","9001","","4314","18101","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_982[] = {"31492","DHDN / Germany zone 2","","","","Germany - onshore between 4 deg 30 min and 7 deg 30 min East.","projected 2D","","","East","North","X","Y","9001","","4314","18102","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_983[] = {"31493","DHDN / Germany zone 3","","","","Germany - onshore between 7 deg 30 min and 10 deg 30 min East.","projected 2D","","","East","North","X","Y","9001","","4314","18103","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_984[] = {"31494","DHDN / Germany zone 4","","","","Germany - onshore between 10 deg 30 min and 13 deg 30 min East.","projected 2D","","","East","North","X","Y","9001","","4314","18104","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_985[] = {"31495","DHDN / Germany zone 5","","","","Germany - onshore between 13 deg 30 min and 16 deg 30 min East.","projected 2D","","","East","North","X","Y","9001","","4314","18105","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_986[] = {"31600","Dealul Piscului 1933/ Stereo 33","Stereo 33","","","Romania.","projected 2D","","","East","North","X","Y","9001","","4316","19927","1996-04-12 00:00:00","","EPSG","Superseded by Stereo 70 system (ProjCS code 31700).","",NULL};
-datafile_rows_t horiz_cs_row_987[] = {"31700","Dealul Piscului 1970/ Stereo 70","Stereo 70","","","Romania.","projected 2D","","","North","East","X","Y","9001","","4317","19926","1996-04-12 00:00:00","","EPSG","Supersedes Stereo 33 system.","",NULL};
-datafile_rows_t horiz_cs_row_988[] = {"31838","NGN / UTM zone 38N","","","","Kuwait west of 48deg East.","projected 2D","","","East","North","E","N","9001","","4318","16038","1996-04-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_989[] = {"31839","NGN / UTM zone 39N","","","","Kuwait east of 48deg East.","projected 2D","","","East","North","E","N","9001","","4318","16039","1996-04-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_990[] = {"31900","KUDAMS / KTM","","","","Kuwait - Kuwait City.","projected 2D","","","East","North","E","N","9001","","4319","19928","1996-04-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_991[] = {"32001","NAD27 / Montana North","","","","United States (USA) - Montana - MT_N - counties of Blaine; Chouteau; Daniels; Flathead; Glacier; Hill; Liberty; Lincoln; Phillips; Pondera; Roosevelt; Sheridan; Teton; Toole; Valley","projected 2D","","","East","North","X","Y","9003","","4267","12501","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_992[] = {"32002","NAD27 / Montana Central","","","","United States (USA) - Montana - MT_C - counties of Cascade; Dawson; Fergus; Garfield; Judith Basin; Lake; Lewis and Clark; McCone; Meagher; Mineral; Missoula; Petroleum; Powell; Prairie; Richland; Sanders; Wibaux","projected 2D","","","East","North","X","Y","9003","","4267","12502","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_993[] = {"32003","NAD27 / Montana South","","","","United States (USA) - Montana - MT_S - counties of Beaverhead; Big Horn; Broadwater; Carbon; Carter; Custer; Deer Lodge; Fallon; Gallatin; Golden Valley; Granite; Jefferson; Madison; Musselshell; Park; Powder River; Ravalli; Rosebud; Silver Bow; Stillwater","projected 2D","","","East","North","X","Y","9003","","4267","12503","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_994[] = {"32005","NAD27 / Nebraska North","","","","United States (USA) - Nebraska - NE_N - counties of Antelope; Blaine; Box Butte; Boyd; Brown; Burt; Cedar; Cherry; Cuming; Dakota; Dawes; Dixon; Garfield; Grant; Holt; Hooker; Keya Paha; Knox; Loup; Madison; Pierce; Rock; Sheridan; Sioux; Stanton; Thomas; ","projected 2D","","","East","North","X","Y","9003","","4267","12601","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_995[] = {"32006","NAD27 / Nebraska South","","","","United States (USA) - Nebraska - NE_S - counties of Adams; Arthur; Banner; Boone; Buffalo; Butler; Cass; Chase; Cheyenne; Clay; Colfax; Custer; Dawson; Deuel; Dodge; Douglas; Dundy; Fillmore; Franklin; Frontier; Furnas; Gage; Garden; Gosper; Greeley; Hall;","projected 2D","","","East","North","X","Y","9003","","4267","12602","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_996[] = {"32007","NAD27 / Nevada East","","","","United States (USA) - Nevada - NV_E - counties of Clark; Elko; Eureka; Lincoln; White Pine","projected 2D","","","East","North","X","Y","9003","","4267","12701","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_997[] = {"32008","NAD27 / Nevada Central","","","","United States (USA) - Nevada - NV_C - counties of Lander; Nye","projected 2D","","","East","North","X","Y","9003","","4267","12702","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_998[] = {"32009","NAD27 / Nevada West","","","","United States (USA) - Nevada - NV_W - counties of Churchill; Douglas; Esmeralda; Humboldt; Lyon; Mineral; Pershing; Storey; Washoe","projected 2D","","","East","North","X","Y","9003","","4267","12703","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_999[] = {"32010","NAD27 / New Hampshire","","","","United States (USA) - New Hampshire - NH - counties of Belknap; Carroll; Cheshire; Coos; Grafton; Hillsborough; Merrimack; Rockingham; Strafford; Sullivan","projected 2D","","","East","North","X","Y","9003","","4267","12800","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1000[] = {"32011","NAD27 / New Jersey","","","","United States (USA) - New Jersey - NJ - counties of Atlantic; Bergen; Burlington; Camden; Cape May; Cumberland; Essex; Gloucester; Hudson; Hunterdon; Mercer; Middlesex; Monmouth; Morris; Ocean; Passaic; Salem; Somerset; Sussex; Union; Warren","projected 2D","","","East","North","X","Y","9003","","4267","12900","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1001[] = {"32012","NAD27 / New Mexico East","","","","United States (USA) - New Mexico - NM_E - counties of Chaves; Colfax; Curry; De Baca; Eddy; Guadalupe; Harding; Lea; Mora; Quay; Roosevelt; San Miguel; Union","projected 2D","","","East","North","X","Y","9003","","4267","13001","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1002[] = {"32013","NAD27 / New Mexico Central","NAD27 / New Mexico Cent.","","","United States (USA) - New Mexico - NM_C - counties of Bernalillo; Dona Ana; Lincoln; Los Alamos; Otero; Rio Arriba; Sandoval; Santa Fe; Socorro; Taos; Torrance","projected 2D","","","East","North","X","Y","9003","","4267","13002","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1003[] = {"32014","NAD27 / New Mexico West","","","","United States (USA) - New Mexico - NM_W - counties of Catron; Cibola; Grant; Hidalgo; Luna; McKinley; San Juan; Sierra; Valencia","projected 2D","","","East","North","X","Y","9003","","4267","13003","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1004[] = {"32015","NAD27 / New York East","","","","United States (USA) - New York - NY_E - counties of Albany; Clinton; Columbia; Delaware; Dutchess; Essex; Franklin; Fulton; Greene; Hamilton; Herkimer; Montgomery; Orange; Otsego; Putnam; Rensselaer; Rockland; Saratoga; Schenectady; Schoharie; St. Lawrence","projected 2D","","","East","North","X","Y","9003","","4267","13101","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1005[] = {"32016","NAD27 / New York Central","","","","United States (USA) - New York - NY_C - counties of Broome; Cayuga; Chemung; Chenango; Cortland; Jefferson; Lewis; Madison; Oneida; Onondaga; Ontario; Oswego; Schuyler; Seneca; Steuben; Tioga; Tompkins; Wayne; Yates","projected 2D","","","East","North","X","Y","9003","","4267","13102","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1006[] = {"32017","NAD27 / New York West","","","","United States (USA) - New York - NY_W - counties of Allegany; Cattaraugus; Chautauqua; Erie; Genesee; Livingston; Monroe; Niagara; Orleans; Wyoming","projected 2D","","","East","North","X","Y","9003","","4267","13103","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1007[] = {"32018","NAD27 / New York Long Island","NAD27 / New York Long Is","","","United States (USA) - New York - NY_LI - counties of Bronx; Kings; Nassau; New York; Queens; Richmond; Suffolk","projected 2D","","","East","North","X","Y","9003","","4267","13104","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1008[] = {"32019","NAD27 / North Carolina","","","","United States (USA) - North Carolina - NC - counties of Alamance; Alexander; Alleghany; Anson; Ashe; Avery; Beaufort; Bertie; Bladen; Brunswick; Buncombe; Burke; Cabarrus; Caldwell; Camden; Carteret; Caswell; Catawba; Chatham; Cherokee; Chowan; Clay; Cleve","projected 2D","","","East","North","X","Y","9003","","4267","13200","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1009[] = {"32020","NAD27 / North Dakota North","NAD27 / North Dakota N","","","United States (USA) - North Dakota - ND_N - counties of Benson; Bottineau; Burke; Cavalier; Divide; Eddy; Foster; Grand Forks; Griggs; McHenry; McKenzie; McLean; Mountrial; Nelson; Pembina; Pierce; Ramsey; Renville; Rolette; Sheridan; Steele; Towner; Trail","projected 2D","","","East","North","X","Y","9003","","4267","13301","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1010[] = {"32021","NAD27 / North Dakota South","NAD27 / North Dakota S","","","United States (USA) - North Dakota - ND_S - counties of Adams; Barnes; Billings; Bowman; Burleigh; Cass; Dickey; Dunn; Emmons; Golden Valley; Grant; Hettinger; Kidder; La Moure; Logan; McIntosh; Mercer; Morton; Oliver; Ransom; Richland; Sargent; Sioux; Slo","projected 2D","","","East","North","X","Y","9003","","4267","13302","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1011[] = {"32022","NAD27 / Ohio North","","","","United States (USA) - Ohio - OH_N - counties of Allen;Ashland; Ashtabula; Auglaize; Carroll; Columbiana; Coshocton; Crawford; Cuyahoga; Defiance; Delaware; Erie; Fulton; Geauga; Hancock; Hardin; Harrison; Henry; Holmes; Huron; Jefferson; Knox; Lake; Logan;","projected 2D","","","East","North","X","Y","9003","","4267","13401","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1012[] = {"32023","NAD27 / Ohio South","","","","United States (USA) - Ohio - OH_S - counties of Adams; Athens; Belmont; Brown; Butler; Champaign; Clark; Clermont; Clinton; Darke; Fairfield; Fayette; Franklin; Gallia; Greene; Guernsey; Hamilton; Highland; Hocking; Jackson; Lawrence; Licking; Madison; Mei","projected 2D","","","East","North","X","Y","9003","","4267","13402","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1013[] = {"32024","NAD27 / Oklahoma North","","","","United States (USA) - Oklahoma - OK_N - counties of Adair; Alfalfa; Beaver; Blaine; Canadian; Cherokee; Cimarron; Craig; Creek; Custer; Delaware; Dewey; Ellis; Garfield; Grant; Harper; Kay; Kingfisher; Lincoln; Logan; Major; Mayes; Muskogee; Noble; Nowata;","projected 2D","","","East","North","X","Y","9003","","4267","13501","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1014[] = {"32025","NAD27 / Oklahoma South","","","","United States (USA) - Oklahoma - OK_S - counties of Atoka; Beckham; Bryan; Caddo; Carter; Choctaw; Cleveland; Coal; Comanche; Cotton; Garvin; Grady; Greer; Harmon; Haskell; Hughes; Jackson; Jefferson; Johnston; Kiowa; Latimer; Le Flore; Love; Marshall; McC","projected 2D","","","East","North","X","Y","9003","","4267","13502","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1015[] = {"32026","NAD27 / Oregon North","","","","United States (USA) - Oregon - OR_N - counties of Baker; Benton; Clackamas; Clatsop; Columbia; Gilliam; Grant; Hood River; Jefferson; Lincoln; Linn; Marion; Morrow; Multnomah; Polk; Sherman; Tillamook; Umatilla; Union; Wallowa; Wasco; Washington; Wheeler; ","projected 2D","","","East","North","X","Y","9003","","4267","13601","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1016[] = {"32027","NAD27 / Oregon South","","","","United States (USA) - Oregon - OR_S - counties of Coos; Crook; Curry; Deschutes; Douglas; Harney; Jackson; Josephine; Klamath; Lake; Lane; Malheur","projected 2D","","","East","North","X","Y","9003","","4267","13602","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1017[] = {"32028","NAD27 / Pennsylvania North","NAD27 / Pennsylvania N","","","United States (USA) - Pennsylvania - PA_N - counties of Bradford; Cameron; Carbon; Centre; Clarion; Clearfield; Clinton; Columbia; Crawford; Elk; Erie; Forest; Jefferson; Lackawanna; Luzerne; Lycoming; McKean; Mercer; Monroe; Montour; Northumberland; Pike;","projected 2D","","","East","North","X","Y","9003","","4267","13701","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1018[] = {"32029","NAD27 / Pennsylvania South","NAD27 / Pennsylvania S","","","United States (USA) - Pennsylvania - PA_S - counties of Adams; Allegheny; Armstrong; Beaver; Bedford; Berks; Blair; Bucks; Butler; Cambria; Chester; Cumberland; Dauphin; Delaware; Fayette; Franklin; Fulton; Greene; Huntingdon; Indiana; Juniata; Lancaster; ","projected 2D","","","East","North","X","Y","9003","","4267","13702","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1019[] = {"32030","NAD27 / Rhode Island","","","","United States (USA) - Rhode Island - RI - counties of Bristol; Kent; Newport; Providence; Washington","projected 2D","","","East","North","X","Y","9003","","4267","13800","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1020[] = {"32031","NAD27 / South Carolina North","NAD27 / South Carolina N","","","United States (USA) - South Carolina - SC_N - counties of Abbeville; Anderson; Calhoun; Cherokee; Chester; Chesterfield; Darlington; Dillon; Edgefield; Fairfield; Florence; Greenville; Greenwood; Horry; Kershaw; Lancaster; Laurens; Lee; Lexington; Marion; ","projected 2D","","","East","North","X","Y","9003","","4267","13901","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1021[] = {"32033","NAD27 / South Carolina South","NAD27 / South Carolina S","","","United States (USA) - South Carolina - SC_S - counties of Aiken; Allendale; Bamberg; Barnwell; Beaufort; Berkeley; Charleston; Clarendon; Colleton; Dorchester; Georgetown; Hampton; Jasper; Orangeburg; Williamsburg","projected 2D","","","East","North","X","Y","9003","","4267","13902","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1022[] = {"32034","NAD27 / South Dakota North","NAD27 / South Dakota N","","","United States (USA) - South Dakota - SD_N - counties of Beadle; Brookings; Brown; Butte; Campbell; Clark; Codington; Corson; Day; Deuel; Dewey; Edmunds; Faulk; Grant; Hamlin; Hand; Harding; Hyde; Kingsbury; Lawrence; Marshall; McPherson; Meade; Perkins; Po","projected 2D","","","East","North","X","Y","9003","","4267","14001","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1023[] = {"32035","NAD27 / South Dakota South","NAD27 / South Dakota S","","","United States (USA) - South Dakota - SD_S - counties of Aurora; Bennett; Bon Homme; Brule; Buffalo; Charles Mix; Clay; Custer; Davison; Douglas; Fall River; Gregory; Haakon; Hanson; Hughes; Hutchinson; Jackson; Jerauld; Jones; Lake; Lincoln; Lyman; McCook;","projected 2D","","","East","North","X","Y","9003","","4267","14002","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1024[] = {"32036","NAD27 / Tennessee","","","","United States (USA) - Tennessee - TN - counties of Anderson; Bedford; Benton; Bledsoe; Blount; Bradley; Campbell; Cannon; Carroll; Carter; Cheatham; Chester; Claiborne; Clay; Cocke; Coffee; Crockett; Cumberland; Davidson; De Kalb; Decatur; Dickson; Dyer; F","projected 2D","","","East","North","X","Y","9003","","4267","14100","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1025[] = {"32037","NAD27 / Texas North","","","","United States (USA) - Texas -TX_N - counties of: Armstrong; Briscoe; Carson; Castro; Childress; Collingsworth; Dallam; Deaf Smith; Donley; Gray; Hall; Hansford; Hartley; Hemphill; Hutchinson; Lipscomb; Moore; Ochiltree; Oldham; Parmer; Potter; Randall; Rob","projected 2D","","","East","North","X","Y","9003","","4267","14201","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1026[] = {"32038","NAD27 / Texas North Central","NAD27 / Texas North Cen.","","","United States (USA) - Texas -TX_NC - counties of: Andrews; Archer; Bailey; Baylor; Borden; Bowie; Callahan; Camp; Cass; Clay; Cochran; Collin; Cooke; Cottle; Crosby; Dallas; Dawson; Delta; Denton; Dickens; Eastland; Ellis; Erath; Fannin; Fisher; Floyd; Foa","projected 2D","","","East","North","X","Y","9003","","4267","14202","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1027[] = {"32039","NAD27 / Texas Central","","","","United States (USA) - Texas -TX_C - counties of Anderson; Angelina; Bastrop; Bell; Blanco; Bosque; Brazos; Brown; Burleson; Burnet; Cherokee; Coke; Coleman; Comanche; Concho; Coryell; Crane; Crockett; Culberson; Ector; El Paso; Falls; Freestone; Gillespie;","projected 2D","","","East","North","X","Y","9003","","4267","14203","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1028[] = {"32040","NAD27 / Texas South Central","NAD27 / Texas South Cen.","","","United States (USA) - Texas -TX_SC - counties of Aransas; Atascosa; Austin; Bandera; Bee; Bexar; Brazoria; Brewster; Caldwell; Calhoun; Chambers; Colorado; Comal; De Witt; Dimmit; Edwards; Fayette; Fort Bend; Frio; Galveston; Goliad; Gonzales; Guadalupe; H","projected 2D","","","East","North","X","Y","9003","","4267","14204","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1029[] = {"32041","NAD27 / Texas South","","","","United States (USA) - Texas -TX_S - counties of Brooks; Cameron; Duval; Hidalgo; Jim Hogg; Jim Wells; Kenedy; Kleberg; Nueces; San Patricio; Starr; Webb; Willacy; Zapata;  - Gulf of Mexico outer continental shelf (OCS) protraction areas: South Padre Island","projected 2D","","","East","North","X","Y","9003","","4267","14205","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1030[] = {"32042","NAD27 / Utah North","","","","United States (USA) - Utah - UT_N - counties of Box Elder; Cache; Daggett; Davis; Morgan; Rich; Summit; Weber","projected 2D","","","East","North","X","Y","9003","","4267","14301","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1031[] = {"32043","NAD27 / Utah Central","","","","United States (USA) - Utah - UT_C - counties of Carbon; Duchesne; Emery; Grand; Juab; Millard; Salt Lake; Sanpete; Sevier; Tooele; Uintah; Utah; Wasatch","projected 2D","","","East","North","X","Y","9003","","4267","14302","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1032[] = {"32044","NAD27 / Utah South","","","","United States (USA) - Utah - UT_S - counties of Beaver; Garfield; Iron; Kane; Piute; San Juan; Washington; Wayne","projected 2D","","","East","North","X","Y","9003","","4267","14303","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1033[] = {"32045","NAD27 / Vermont","","","","United States (USA) - Vermont - VT - counties of Addison; Bennington; Caledonia; Chittenden; Essex; Franklin; Grand Isle; Lamoille; Orange; Orleans; Rutland; Washington; Windham; Windsor","projected 2D","","","East","North","X","Y","9003","","4267","14400","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1034[] = {"32046","NAD27 / Virginia North","","","","United States (USA) - Virginia - VA_N - counties of Arlington; Augusta; Bath; Caroline; Clarke; Culpeper; Fairfax; Fauquier; Frederick; Greene; Highland; King George; Loudoun; Madison; Orange; Page; Prince William; Rappahannock; Rockingham; Shenandoah; Spo","projected 2D","","","East","North","X","Y","9003","","4267","14501","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1035[] = {"32047","NAD27 / Virginia South","","","","United States (USA) - Virginia - VA_S - counties of Accomack; Albemarle; Alleghany; Amelia; Amherst; Appomattox; Bedford; Bland; Botetourt; Bristol; Brunswick; Buchanan; Buckingham; Campbell; Carroll; Charles City; Charlotte; Chesapeake; Chesterfield; Colo","projected 2D","","","East","North","X","Y","9003","","4267","14502","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1036[] = {"32048","NAD27 / Washington North","","","","United States (USA) - Washington - WA_N - counties of Chelan; Clallam; Douglas; Ferry; Island; Jefferson; King; Kitsap; Lincoln; Okanogan; Pend Oreille; San Juan; Skagit; Snohomish; Spokane; Stevens; Whatcom","projected 2D","","","East","North","X","Y","9003","","4267","14601","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1037[] = {"32049","NAD27 / Washington South","","","","United States (USA) - Washington - WA_S - counties of Adams; Asotin; Benton; Clark; Columbia; Cowlitz; Franklin; Garfield; Grant; Grays Harbor; Kittitas; Klickitat; Lewis; Mason; Pacific; Pierce; Skamania; Thurston; Wahkiakum; Walla Walla; Whitman; Yakima","projected 2D","","","East","North","X","Y","9003","","4267","14602","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1038[] = {"32050","NAD27 / West Virginia North","NAD27 / West Virginia N","","","United States (USA) - West Virginia - WV_N - counties of Barbour; Berkeley; Brooke; Doddridge; Grant; Hampshire; Hancock; Hardy; Harrison; Jefferson; Marion; Marshall; Mineral; Monongalia; Morgan; Ohio; Pleasants; Preston; Ritchie; Taylor; Tucker; Tyler; W","projected 2D","","","East","North","X","Y","9003","","4267","14701","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1039[] = {"32051","NAD27 / West Virginia South","NAD27 / West Virginia S","","","United States (USA) - West Virginia - WV_S - counties of Boone; Braxton; Cabell; Calhoun; Clay; Fayette; Gilmer; Greenbrier; Jackson; Kanawha; Lewis; Lincoln; Logan; Mason; McDowell; Mercer; Mingo; Monroe; Nicholas; Pendleton; Pocahontas; Putnam; Raleigh; ","projected 2D","","","East","North","X","Y","9003","","4267","14702","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1040[] = {"32052","NAD27 / Wisconsin North","","","","United States (USA) - Wisconsin - WI_N - counties of Ashland; Bayfield; Burnett; Douglas; Florence; Forest; Iron; Oneida; Price; Sawyer; Vilas; Washburn","projected 2D","","","East","North","X","Y","9003","","4267","14801","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1041[] = {"32053","NAD27 / Wisconsin Central","NAD27 / Wisconsin Cen.","","","United States (USA) - Wisconsin - WI_C - counties of Barron; Brown; Buffalo; Chippewa; Clark; Door; Dunn; Eau Claire; Jackson; Kewaunee; Langlade; Lincoln; Marathon; Marinette; Menominee; Oconto; Outagamie; Pepin; Pierce; Polk; Portage; Rusk; Shawano; St. ","projected 2D","","","East","North","X","Y","9003","","4267","14802","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1042[] = {"32054","NAD27 / Wisconsin South","","","","United States (USA) - Wisconsin - WI_S - counties of Adams; Calumet; Columbia; Crawford; Dane; Dodge; Fond Du Lac; Grant; Green; Green Lake; Iowa; Jefferson; Juneau; Kenosha; La Crosse; Lafayette; Manitowoc; Marquette; Milwaukee; Monroe; Ozaukee; Racine; R","projected 2D","","","East","North","X","Y","9003","","4267","14803","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1043[] = {"32055","NAD27 / Wyoming East","","","","United States (USA) - Wyoming - WY_E - counties of Albany; Campbell; Converse; Crook; Goshen; Laramie; Niobrara; Platte; Weston","projected 2D","","","East","North","X","Y","9003","","4267","14901","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1044[] = {"32056","NAD27 / Wyoming East Central","NAD27 / Wyoming E. Cen.","","","United States (USA) - Wyoming - WY_EC - counties of Big Horn; Carbon; Johnson; Natrona; Sheridan; Washakie","projected 2D","","","East","North","X","Y","9003","","4267","14902","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1045[] = {"32057","NAD27 / Wyoming West Central","NAD27 / Wyoming W. Cen.","","","United States (USA) - Wyoming - WY_WC - counties of Fremont; Hot Springs; Park; Sweetwater","projected 2D","","","East","North","X","Y","9003","","4267","14903","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1046[] = {"32058","NAD27 / Wyoming West","","","","United States (USA) - Wyoming - WY_W - counties of Lincoln; Sublette; Teton; Uinta","projected 2D","","","East","North","X","Y","9003","","4267","14904","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1047[] = {"32061","NAD27 / Guatemala Norte","","","","Guatemala - north of 15 deg 50 min North.","projected 2D","","","East","North","X","Y","9001","","4267","18211","1999-08-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1048[] = {"32062","NAD27 / Guatemala Sud","","","","Guatemala - south of 15 deg 50 min North.","projected 2D","","","East","North","X","Y","9001","","4267","18212","1999-08-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1049[] = {"32074","NAD27 / BLM 14N (feet)","","","","United States - Gulf of Mexico - west of approximately 96 deg West - outer continental shelf (OCS) protraction areas Corpus Christi; Port Isabel.","projected 2D","","","East","North","X","Y","9003","","4267","15914","1996-04-12 00:00:00","","EPSG","","96.03",NULL};
-datafile_rows_t horiz_cs_row_1050[] = {"32075","NAD27 / BLM 15N (feet)","","","","United States - Gulf of Mexico - 96 deg to 90 deg West - outer continental shelf (OCS) protraction areas East Breaks (EB); Alaminos Canyon (AC); Garden Banks (GB); Keathley Canyon (KC); Ewing Bank (EW); Green Canyon (GC); Walker Ridge (WR).","projected 2D","","","East","North","X","Y","9003","","4267","15915","1996-04-12 00:00:00","","EPSG","","96.03",NULL};
-datafile_rows_t horiz_cs_row_1051[] = {"32076","NAD27 / BLM 16N (feet)","","","","United States - Gulf of Mexico - 90 deg to 84 deg West - outer continental shelf (OCS) protraction areas Mobile (MO); Viosca Knoll (VK); Mississippi Canyon (MC); Atwater Valley (AT); Lund; Pensacola; Destin Dome (DD); De Soto Canyon; Lloyd; Henderson; Apal","projected 2D","","","East","North","X","Y","9003","","4267","15916","1996-04-12 00:00:00","","EPSG","","95.27  96.03",NULL};
-datafile_rows_t horiz_cs_row_1052[] = {"32077","NAD27 / BLM 17N (feet)","","","","United States - Gulf of Mexico - east of 84 deg West - outer continental shelf (OCS) protraction areas Gainesville; Tarpon Springs; St. Petersburg; Charlotte Harbor; Pulley Ridge; Dry Tortugas; Miami; Key West.","projected 2D","","","East","North","X","Y","9003","","4267","15917","1996-04-12 00:00:00","","EPSG","","96.03",NULL};
-datafile_rows_t horiz_cs_row_1053[] = {"32081","NAD27 / MTM zone 1","","","","Canada - Newfoundland - east of 54 deg 30 min West.","projected 2D","","","East","North","E","N","9001","","4267","17701","1997-11-13 00:00:00","Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1054[] = {"32082","NAD27 / MTM zone 2","","","","Canada - Newfoundland and Labrador between 57 deg 30 min and 54 de 30 min West.","projected 2D","","","East","North","E","N","9001","","4267","17702","1997-11-13 00:00:00","Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1055[] = {"32083","NAD27 / MTM zone 3","","","","Canada - Newfoundland and Labrador between 60 deg and 57 deg 30 min West.","projected 2D","","","East","North","E","N","9001","","4267","17703","1997-11-13 00:00:00","Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1056[] = {"32084","NAD27 / MTM zone 4","","","","Canada - Newfoundland (Labrador) between 63 deg and 60 deg West.","projected 2D","","","East","North","E","N","9001","","4267","17704","1997-11-13 00:00:00","Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1057[] = {"32085","NAD27 / MTM zone 5","","","","Canada - Newfoundland (Labrador) between 66 deg and 63 deg West.","projected 2D","","","East","North","E","N","9001","","4267","17705","1997-11-13 00:00:00","Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1058[] = {"32086","NAD27 / MTM zone 6","","","","Canada - Newfoundland (Labrador) between 69 deg and  66 deg West.","projected 2D","","","East","North","E","N","9001","","4267","17706","1997-11-13 00:00:00","Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1059[] = {"32100","NAD83 / Montana","","","","United States (USA) - Montana - MT - counties of Beaverhead; Big Horn; Blaine; Broadwater; Carbon; Carter; Cascade; Chouteau; Custer; Daniels; Dawson; Deer Lodge; Fallon; Fergus; Flathead; Gallatin; Garfield; Glacier; Golden Valley; Granite; Hill; Jefferso","projected 2D","","","East","North","X","Y","9001","","4269","12530","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1060[] = {"32104","NAD83 / Nebraska","","","","United States (USA) - Nebraska - NE - counties of Adams; Antelope; Arthur; Banner; Blaine; Boone; Box Butte; Boyd; Brown; Buffalo; Burt; Butler; Cass; Cedar; Chase; Cherry; Cheyenne; Clay; Colfax; Cuming; Custer; Dakota; Dawes; Dawson; Deuel; Dixon; Dodge;","projected 2D","","","East","North","X","Y","9001","","4269","12630","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1061[] = {"32107","NAD83 / Nevada  East","","","","United States (USA) - Nevada - NV_E - counties of Clark; Elko; Eureka; Lincoln; White Pine","projected 2D","","","East","North","X","Y","9001","","4269","12731","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1062[] = {"32108","NAD83 / Nevada Central","","","","United States (USA) - Nevada - NV_C - counties of Lander; Nye","projected 2D","","","East","North","X","Y","9001","","4269","12732","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1063[] = {"32109","NAD83 / Nevada West","","","","United States (USA) - Nevada - NV_W - counties of Churchill; Douglas; Esmeralda; Humboldt; Lyon; Mineral; Pershing; Storey; Washoe","projected 2D","","","East","North","X","Y","9001","","4269","12733","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1064[] = {"32110","NAD83 / New Hampshire","","","","United States (USA) - New Hampshire - NH - counties of Belknap; Carroll; Cheshire; Coos; Grafton; Hillsborough; Merrimack; Rockingham; Strafford; Sullivan","projected 2D","","","East","North","X","Y","9001","","4269","12830","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1065[] = {"32111","NAD83 / New Jersey","","","","United States (USA) - New Jersey - NJ - counties of Atlantic; Bergen; Burlington; Camden; Cape May; Cumberland; Essex; Gloucester; Hudson; Hunterdon; Mercer; Middlesex; Monmouth; Morris; Ocean; Passaic; Salem; Somerset; Sussex; Union; Warren","projected 2D","","","East","North","X","Y","9001","","4269","12930","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1066[] = {"32112","NAD83 / New Mexico East","","","","United States (USA) - New Mexico - NM_E - counties of Chaves; Colfax; Curry; De Baca; Eddy; Guadalupe; Harding; Lea; Mora; Quay; Roosevelt; San Miguel; Union","projected 2D","","","East","North","X","Y","9001","","4269","13031","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1067[] = {"32113","NAD83 / New Mexico Central","NAD83 / New Mexico Cent.","","","United States (USA) - New Mexico - NM_C - counties of Bernalillo; Dona Ana; Lincoln; Los Alamos; Otero; Rio Arriba; Sandoval; Santa Fe; Socorro; Taos; Torrance; Valencia","projected 2D","","","East","North","X","Y","9001","","4269","13032","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1068[] = {"32114","NAD83 / New Mexico West","","","","United States (USA) - New Mexico - NM_W - counties of Catron; Cibola; Grant; Hidalgo; Luna; McKinley; San Juan; Sierra","projected 2D","","","East","North","X","Y","9001","","4269","13033","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1069[] = {"32115","NAD83 / New York  East","","","","United States (USA) - New York - NY_E - counties of Albany; Clinton; Columbia; Delaware; Dutchess; Essex; Franklin; Fulton; Greene; Hamilton; Herkimer; Montgomery; Orange; Otsego; Putnam; Rensselaer; Rockland; Saratoga; Schenectady; Schoharie; St. Lawrence","projected 2D","","","East","North","X","Y","9001","","4269","13131","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1070[] = {"32116","NAD83 / New York Central","","","","United States (USA) - New York - NY_C - counties of Broome; Cayuga; Chemung; Chenango; Cortland; Jefferson; Lewis; Madison; Oneida; Onondaga; Ontario; Oswego; Schuyler; Seneca; Steuben; Tioga; Tompkins; Wayne; Yates","projected 2D","","","East","North","X","Y","9001","","4269","13132","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1071[] = {"32117","NAD83 / New York  West","","","","United States (USA) - New York - NY_W - counties of Allegany; Cattaraugus; Chautauqua; Erie; Genesee; Livingston; Monroe; Niagara; Orleans; Wyoming","projected 2D","","","East","North","X","Y","9001","","4269","13133","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1072[] = {"32118","NAD83 / New York Long Island","NAD83 / New York Long Is","","","United States (USA) - New York - NY_LI - counties of Bronx; Kings; Nassau; New York; Queens; Richmond; Suffolk","projected 2D","","","East","North","X","Y","9001","","4269","13134","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1073[] = {"32119","NAD83 / North Carolina","","","","United States (USA) - North Carolina - NC - counties of Alamance; Alexander; Alleghany; Anson; Ashe; Avery; Beaufort; Bertie; Bladen; Brunswick; Buncombe; Burke; Cabarrus; Caldwell; Camden; Carteret; Caswell; Catawba; Chatham; Cherokee; Chowan; Clay; Cleve","projected 2D","","","East","North","X","Y","9001","","4269","13230","1998-11-11 00:00:00","","EPSG","","98.30",NULL};
-datafile_rows_t horiz_cs_row_1074[] = {"32120","NAD83 / North Dakota North","NAD83 / North Dakota N","","","United States (USA) - North Dakota - ND_N - counties of Benson; Bottineau; Burke; Cavalier; Divide; Eddy; Foster; Grand Forks; Griggs; McHenry; McKenzie; McLean; Mountrial; Nelson; Pembina; Pierce; Ramsey; Renville; Rolette; Sheridan; Steele; Towner; Trail","projected 2D","","","East","North","X","Y","9001","","4269","13331","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1075[] = {"32121","NAD83 / North Dakota South","NAD83 / North Dakota S","","","United States (USA) - North Dakota - ND_S - counties of Adams; Barnes; Billings; Bowman; Burleigh; Cass; Dickey; Dunn; Emmons; Golden Valley; Grant; Hettinger; Kidder; La Moure; Logan; McIntosh; Mercer; Morton; Oliver; Ransom; Richland; Sargent; Sioux; Slo","projected 2D","","","East","North","X","Y","9001","","4269","13332","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1076[] = {"32122","NAD83 / Ohio North","","","","United States (USA) - Ohio - OH_N - counties of Allen;Ashland; Ashtabula; Auglaize; Carroll; Columbiana; Coshocton; Crawford; Cuyahoga; Defiance; Delaware; Erie; Fulton; Geauga; Hancock; Hardin; Harrison; Henry; Holmes; Huron; Jefferson; Knox; Lake; Logan;","projected 2D","","","East","North","X","Y","9001","","4269","13431","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1077[] = {"32123","NAD83 / Ohio South","","","","United States (USA) - Ohio - OH_S - counties of Adams; Athens; Belmont; Brown; Butler; Champaign; Clark; Clermont; Clinton; Darke; Fairfield; Fayette; Franklin; Gallia; Greene; Guernsey; Hamilton; Highland; Hocking; Jackson; Lawrence; Licking; Madison; Mei","projected 2D","","","East","North","X","Y","9001","","4269","13432","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1078[] = {"32124","NAD83 / Oklahoma North","","","","United States (USA) - Oklahoma - OK_N - counties of Adair; Alfalfa; Beaver; Blaine; Canadian; Cherokee; Cimarron; Craig; Creek; Custer; Delaware; Dewey; Ellis; Garfield; Grant; Harper; Kay; Kingfisher; Lincoln; Logan; Major; Mayes; Muskogee; Noble; Nowata;","projected 2D","","","East","North","X","Y","9001","","4269","13531","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1079[] = {"32125","NAD83 / Oklahoma South","","","","United States (USA) - Oklahoma - OK_S - counties of Atoka; Beckham; Bryan; Caddo; Carter; Choctaw; Cleveland; Coal; Comanche; Cotton; Garvin; Grady; Greer; Harmon; Haskell; Hughes; Jackson; Jefferson; Johnston; Kiowa; Latimer; Le Flore; Love; Marshall; McC","projected 2D","","","East","North","X","Y","9001","","4269","13532","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1080[] = {"32126","NAD83 / Oregon North","","","","United States (USA) - Oregon - OR_N - counties of Baker; Benton; Clackamas; Clatsop; Columbia; Gilliam; Grant; Hood River; Jefferson; Lincoln; Linn; Marion; Morrow; Multnomah; Polk; Sherman; Tillamook; Umatilla; Union; Wallowa; Wasco; Washington; Wheeler; ","projected 2D","","","East","North","X","Y","9001","","4269","13631","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1081[] = {"32127","NAD83 / Oregon South","","","","United States (USA) - Oregon - OR_S - counties of Coos; Crook; Curry; Deschutes; Douglas; Harney; Jackson; Josephine; Klamath; Lake; Lane; Malheur","projected 2D","","","East","North","X","Y","9001","","4269","13632","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1082[] = {"32128","NAD83 / Pennsylvania North","NAD83 / Pennsylvania N","","","United States (USA) - Pennsylvania - PA_N - counties of Bradford; Cameron; Carbon; Centre; Clarion; Clearfield; Clinton; Columbia; Crawford; Elk; Erie; Forest; Jefferson; Lackawanna; Luzerne; Lycoming; McKean; Mercer; Monroe; Montour; Northumberland; Pike;","projected 2D","","","East","North","X","Y","9001","","4269","13731","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1083[] = {"32129","NAD83 / Pennsylvania South","NAD83 / Pennsylvania S","","","United States (USA) - Pennsylvania - PA_S - counties of Adams; Allegheny; Armstrong; Beaver; Bedford; Berks; Blair; Bucks; Butler; Cambria; Chester; Cumberland; Dauphin; Delaware; Fayette; Franklin; Fulton; Greene; Huntingdon; Indiana; Juniata; Lancaster; ","projected 2D","","","East","North","X","Y","9001","","4269","13732","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1084[] = {"32130","NAD83 / Rhode Island","","","","United States (USA) - Rhode Island - RI - counties of Bristol; Kent; Newport; Providence; Washington","projected 2D","","","East","North","X","Y","9001","","4269","13830","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1085[] = {"32133","NAD83 / South Carolina","","","","United States (USA) - South Carolina - SC - counties of Abbeville; Aiken; Allendale; Anderson; Bamberg; Barnwell; Beaufort; Berkeley; Calhoun; Charleston; Cherokee; Chester; Chesterfield; Clarendon; Colleton; Darlington; Dillon; Dorchester; Edgefield; Fair","projected 2D","","","East","North","X","Y","9001","","4269","13930","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1086[] = {"32134","NAD83 / South Dakota North","NAD83 / South Dakota N","","","United States (USA) - South Dakota - SD_N - counties of Beadle; Brookings; Brown; Butte; Campbell; Clark; Codington; Corson; Day; Deuel; Dewey; Edmunds; Faulk; Grant; Hamlin; Hand; Harding; Hyde; Kingsbury; Lawrence; Marshall; McPherson; Meade; Perkins; Po","projected 2D","","","East","North","X","Y","9001","","4269","14031","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1087[] = {"32135","NAD83 / South Dakota South","NAD83 / South Dakota S","","","United States (USA) - South Dakota - SD_S - counties of Aurora; Bennett; Bon Homme; Brule; Buffalo; Charles Mix; Clay; Custer; Davison; Douglas; Fall River; Gregory; Haakon; Hanson; Hughes; Hutchinson; Jackson; Jerauld; Jones; Lake; Lincoln; Lyman; McCook;","projected 2D","","","East","North","X","Y","9001","","4269","14032","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1088[] = {"32136","NAD83 / Tennessee","","","","United States (USA) - Tennessee - TN - counties of Anderson; Bedford; Benton; Bledsoe; Blount; Bradley; Campbell; Cannon; Carroll; Carter; Cheatham; Chester; Claiborne; Clay; Cocke; Coffee; Crockett; Cumberland; Davidson; De Kalb; Decatur; Dickson; Dyer; F","projected 2D","","","East","North","X","Y","9001","","4269","14130","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1089[] = {"32137","NAD83 / Texas North","","","","United States (USA) - Texas -TX_N - counties of: Armstrong; Briscoe; Carson; Castro; Childress; Collingsworth; Dallam; Deaf Smith; Donley; Gray; Hall; Hansford; Hartley; Hemphill; Hutchinson; Lipscomb; Moore; Ochiltree; Oldham; Parmer; Potter; Randall; Rob","projected 2D","","","East","North","X","Y","9001","","4269","14231","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1090[] = {"32138","NAD83 / Texas North Central","NAD83 / Texas North Cen.","","","United States (USA) - Texas -TX_NC - counties of: Andrews; Archer; Bailey; Baylor; Borden; Bowie; Callahan; Camp; Cass; Clay; Cochran; Collin; Cooke; Cottle; Crosby; Dallas; Dawson; Delta; Denton; Dickens; Eastland; Ellis; Erath; Fannin; Fisher; Floyd; Foa","projected 2D","","","East","North","X","Y","9001","","4269","14232","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1091[] = {"32139","NAD83 / Texas Central","","","","United States (USA) - Texas -TX_C - counties of Anderson; Angelina; Bastrop; Bell; Blanco; Bosque; Brazos; Brown; Burleson; Burnet; Cherokee; Coke; Coleman; Comanche; Concho; Coryell; Crane; Crockett; Culberson; Ector; El Paso; Falls; Freestone; Gillespie;","projected 2D","","","East","North","X","Y","9001","","4269","14233","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1092[] = {"32140","NAD83 / Texas South Central","NAD83 / Texas South Cen.","","","United States (USA) - Texas -TX_SC - counties of Aransas; Atascosa; Austin; Bandera; Bee; Bexar; Brazoria; Brewster; Caldwell; Calhoun; Chambers; Colorado; Comal; De Witt; Dimmit; Edwards; Fayette; Fort Bend; Frio; Galveston; Goliad; Gonzales; Guadalupe; H","projected 2D","","","East","North","X","Y","9001","","4269","14234","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1093[] = {"32141","NAD83 / Texas South","","","","United States (USA) - Texas -TX_S - counties of Brooks; Cameron; Duval; Hidalgo; Jim Hogg; Jim Wells; Kenedy; Kleberg; Nueces; San Patricio; Starr; Webb; Willacy; Zapata","projected 2D","","","East","North","X","Y","9001","","4269","14235","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1094[] = {"32142","NAD83 / Utah North","","","","United States (USA) - Utah - UT_N - counties of Box Elder; Cache; Daggett; Davis; Morgan; Rich; Summit; Weber","projected 2D","","","East","North","X","Y","9001","","4269","14331","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1095[] = {"32143","NAD83 / Utah Central","","","","United States (USA) - Utah - UT_C - counties of Carbon; Duchesne; Emery; Grand; Juab; Millard; Salt Lake; Sanpete; Sevier; Tooele; Uintah; Utah; Wasatch","projected 2D","","","East","North","X","Y","9001","","4269","14332","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1096[] = {"32144","NAD83 / Utah South","","","","United States (USA) - Utah - UT_S - counties of Beaver; Garfield; Iron; Kane; Piute; San Juan; Washington; Wayne","projected 2D","","","East","North","X","Y","9001","","4269","14333","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1097[] = {"32145","NAD83 / Vermont","","","","United States (USA) - Vermont - VT - counties of Addison; Bennington; Caledonia; Chittenden; Essex; Franklin; Grand Isle; Lamoille; Orange; Orleans; Rutland; Washington; Windham; Windsor","projected 2D","","","East","North","X","Y","9001","","4269","14430","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1098[] = {"32146","NAD83 / Virginia North","","","","United States (USA) - Virginia - VA_N - counties of Arlington; Augusta; Bath; Caroline; Clarke; Culpeper; Fairfax; Fauquier; Frederick; Greene; Highland; King George; Loudoun; Madison; Orange; Page; Prince William; Rappahannock; Rockingham; Shenandoah; Spo","projected 2D","","","East","North","X","Y","9001","","4269","14531","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1099[] = {"32147","NAD83 / Virginia South","","","","United States (USA) - Virginia - VA_S - counties of Accomack; Albemarle; Alleghany; Amelia; Amherst; Appomattox; Bedford; Bland; Botetourt; Bristol; Brunswick; Buchanan; Buckingham; Campbell; Carroll; Charles City; Charlotte; Chesapeake; Chesterfield; Colo","projected 2D","","","East","North","X","Y","9001","","4269","14532","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1100[] = {"32148","NAD83 / Washington North","","","","United States (USA) - Washington - WA_N - counties of Chelan; Clallam; Douglas; Ferry; Grant north of approx. 47d30m; Island; Jefferson; King; Kitsap; Lincoln; Okanogan; Pend Oreille; San Juan; Skagit; Snohomish; Spokane; Stevens; Whatcom","projected 2D","","","East","North","X","Y","9001","","4269","14631","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1101[] = {"32149","NAD83 / Washington South","","","","United States (USA) - Washington - WA_S - counties of Adams; Asotin; Benton; Clark; Columbia; Cowlitz; Franklin; Garfield; Grant south of approx. 47d30m; Grays Harbor; Kittitas; Klickitat; Lewis; Mason; Pacific; Pierce; Skamania; Thurston; Wahkiakum; Walla","projected 2D","","","East","North","X","Y","9001","","4269","14632","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1102[] = {"32150","NAD83 / West Virginia North","NAD83 / West Virginia N","","","United States (USA) - West Virginia - WV_N - counties of Barbour; Berkeley; Brooke; Doddridge; Grant; Hampshire; Hancock; Hardy; Harrison; Jefferson; Marion; Marshall; Mineral; Monongalia; Morgan; Ohio; Pleasants; Preston; Ritchie; Taylor; Tucker; Tyler; W","projected 2D","","","East","North","X","Y","9001","","4269","14731","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1103[] = {"32151","NAD83 / West Virginia South","NAD83 / West Virginia S","","","United States (USA) - West Virginia - WV_S - counties of Boone; Braxton; Cabell; Calhoun; Clay; Fayette; Gilmer; Greenbrier; Jackson; Kanawha; Lewis; Lincoln; Logan; Mason; McDowell; Mercer; Mingo; Monroe; Nicholas; Pendleton; Pocahontas; Putnam; Raleigh; ","projected 2D","","","East","North","X","Y","9001","","4269","14732","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1104[] = {"32152","NAD83 / Wisconsin North","","","","United States (USA) - Wisconsin - WI_N - counties of Ashland; Bayfield; Burnett; Douglas; Florence; Forest; Iron; Oneida; Price; Sawyer; Vilas; Washburn","projected 2D","","","East","North","X","Y","9001","","4269","14831","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1105[] = {"32153","NAD83 / Wisconsin Central","NAD83 / Wisconsin Cen.","","","United States (USA) - Wisconsin - WI_C - counties of Barron; Brown; Buffalo; Chippewa; Clark; Door; Dunn; Eau Claire; Jackson; Kewaunee; Langlade; Lincoln; Marathon; Marinette; Menominee; Oconto; Outagamie; Pepin; Pierce; Polk; Portage; Rusk; Shawano; St. ","projected 2D","","","East","North","X","Y","9001","","4269","14832","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1106[] = {"32154","NAD83 / Wisconsin South","","","","United States (USA) - Wisconsin - WI_S - counties of Adams; Calumet; Columbia; Crawford; Dane; Dodge; Fond Du Lac; Grant; Green; Green Lake; Iowa; Jefferson; Juneau; Kenosha; La Crosse; Lafayette; Manitowoc; Marquette; Milwaukee; Monroe; Ozaukee; Racine; R","projected 2D","","","East","North","X","Y","9001","","4269","14833","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1107[] = {"32155","NAD83 / Wyoming East","","","","United States (USA) - Wyoming - WY_E - counties of Albany; Campbell; Converse; Crook; Goshen; Laramie; Niobrara; Platte; Weston","projected 2D","","","East","North","X","Y","9001","","4269","14931","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1108[] = {"32156","NAD83 / Wyoming East Central","NAD83 / Wyoming E. Cen.","","","United States (USA) - Wyoming - WY_EC - counties of Big Horn; Carbon; Johnson; Natrona; Sheridan; Washakie","projected 2D","","","East","North","X","Y","9001","","4269","14932","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1109[] = {"32157","NAD83 / Wyoming West Central","NAD83 / Wyoming W. Cen.","","","United States (USA) - Wyoming - WY_WC - counties of Fremont; Hot Springs; Park; Sweetwater","projected 2D","","","East","North","X","Y","9001","","4269","14933","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1110[] = {"32158","NAD83 / Wyoming West","","","","United States (USA) - Wyoming - WY_W - counties of Lincoln; Sublette; Teton; Uinta","projected 2D","","","East","North","X","Y","9001","","4269","14934","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1111[] = {"32161","NAD83 / Puerto Rico & Virgin Is.","","","","Puerto Rico and U.S. Virgin Islands.","projected 2D","","","East","North","X","Y","9001","","4269","15230","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1112[] = {"32180","NAD83 / SCoPQ zone 2","","","","Canada - Quebec - east of 57 deg East.","projected 2D","","","East","North","X","Y","9001","","4269","17700","1997-11-13 00:00:00","Topographic Mapping Section; Quebec Ministry of Natural Resources.","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1113[] = {"32181","NAD83 / MTM zone 1","","","","Canada - Newfoundland - east of 54 deg 30 min West.","projected 2D","","","East","North","E(X)","N(Y)","9001","","4269","17701","1997-11-13 00:00:00","Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1114[] = {"32182","NAD83 / MTM zone 2","","","","Canada - Newfoundland and Labrador between 57 deg 30 min and 54 de 30 min West.","projected 2D","","","East","North","E(X)","N(Y)","9001","","4269","17702","1997-11-13 00:00:00","Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1115[] = {"32183","NAD83 / MTM zone 3","","","","Canada - Newfoundland and Labrador between 60 deg and 57 deg 30 min West; Canada - Quebec between 60 deg and 57 deg West.","projected 2D","","","East","North","E(X)","N(Y)","9001","","4269","17703","1997-11-13 00:00:00","Topographic Mapping Section; Quebec Ministry of Natural Resources. Also Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.","EPSG","Known in Quebec as \"NAD83 / [...]
-datafile_rows_t horiz_cs_row_1116[] = {"32184","NAD83 / MTM zone 4","","","","Canada - Quebec and Newfoundland (Labrador) between 63 deg and 60 deg West.","projected 2D","","","East","North","E(X)","N(Y)","9001","","4269","17704","1997-11-13 00:00:00","Topographic Mapping Section; Quebec Ministry of Natural Resources. Also Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.","EPSG","Known in Quebec as \"NAD83 / SCoPQ zone 4\" with axis 1 and 2 abbreviation [...]
-datafile_rows_t horiz_cs_row_1117[] = {"32185","NAD83 / MTM zone 5","","","","Canada - Quebec and Newfoundland (Labrador) between 66 deg and 63 deg West.","projected 2D","","","East","North","E(X)","N(Y)","9001","","4269","17705","1997-11-13 00:00:00","Topographic Mapping Section; Quebec Ministry of Natural Resources. Also Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.","EPSG","Known in Quebec as \"NAD83 / SCoPQ zone 5\" with axis 1 and 2 abbreviation [...]
-datafile_rows_t horiz_cs_row_1118[] = {"32186","NAD83 / MTM zone 6","","","","Canada - Quebec and Newfoundland (Labrador) between 69 deg and  66 deg West.","projected 2D","","","East","North","E(X)","N(Y)","9001","","4269","17706","1997-11-13 00:00:00","Topographic Mapping Section; Quebec Ministry of Natural Resources. Also Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.","EPSG","Known in Quebec as \"NAD83 / SCoPQ zone 6\" with axis 1 and 2 abbreviatio [...]
-datafile_rows_t horiz_cs_row_1119[] = {"32187","NAD83 / MTM zone 7","","","","Canada - Quebec between 72 deg and 69 deg West.","projected 2D","","","East","North","E(X)","N(Y)","9001","","4269","17707","1997-11-13 00:00:00","Topographic Mapping Section; Quebec Ministry of Natural Resources.","EPSG","Known in Quebec as \"NAD83 / SCoPQ zone 7\" with axis 1 and 2 abbreviations of \"X\" and \"Y\" respectively.","",NULL};
-datafile_rows_t horiz_cs_row_1120[] = {"32188","NAD83 / MTM zone 8","","","","Canada - Quebec between 75 deg and 72 deg West.; Canada - Ontario - east of 75 deg West.","projected 2D","","","East","North","E(X)","N(Y)","9001","","4269","17708","1997-11-13 00:00:00","Surveys and Mapping Section; Ontario Ministry of Transportation.","EPSG","Known in Quebec as \"NAD83 / SCoPQ zone 8\" with axis 1 and 2 abbreviations of \"X\" and \"Y\" respectively.","",NULL};
-datafile_rows_t horiz_cs_row_1121[] = {"32189","NAD83 / MTM zone 9","","","","Canada - Quebec and Ontario - between 78 deg and 75 deg West.","projected 2D","","","East","North","E(X)","N(Y)","9001","","4269","17709","1997-11-13 00:00:00","Surveys and Mapping Section; Ontario Ministry of Transportation.","EPSG","Known in Quebec as \"NAD83 / SCoPQ zone 9\" with axis 1 and 2 abbreviations of \"X\" and \"Y\" respectively.","",NULL};
-datafile_rows_t horiz_cs_row_1122[] = {"32190","NAD83 / MTM zone 10","","","","Canada - Quebec west of 78 deg West; Canada - Ontario - between 79 deg 30 min and 78 deg W in area to north of 47 deg N; between 80 deg 15 min and 78 deg W in area between 46 deg and 47 deg N; between 81 deg and 78 deg W in area south of 46 deg N.","projected 2D","","","East","North","E(X)","N(Y)","9001","","4269","17710","1997-11-13 00:00:00","Surveys and Mapping Section; Ontario Ministry of Transportation.", [...]
-datafile_rows_t horiz_cs_row_1123[] = {"32191","NAD83 / MTM zone 11","","","","Canada - Ontario - south of 46 deg N and west of 81 deg West.","projected 2D","","","East","North","E","N","9001","","4269","17711","1997-11-13 00:00:00","Surveys and Mapping Section; Ontario Ministry of Transportation.","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1124[] = {"32192","NAD83 / MTM zone 12","","","","Canada - Ontario - between 82 deg 30 min and 79 deg 30 min W in area to north of 47 deg N; between 82 deg 30 min and 80 deg 15 min W in area between 46 deg and 47 deg N; between 82 deg 30 min and 79 deg 30 min W in area north of 47 deg N.","projected 2D","","","East","North","E","N","9001","","4269","17712","1997-11-13 00:00:00","Surveys and Mapping Section; Ontario Ministry of Transportation.","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1125[] = {"32193","NAD83 / MTM zone 13","","","","Canada - Ontario - between 85 deg 30 min and 82 deg 30 min West and north of 46 deg North.","projected 2D","","","East","North","E","N","9001","","4269","17713","1997-11-13 00:00:00","Surveys and Mapping Section; Ontario Ministry of Transportation.","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1126[] = {"32194","NAD83 / MTM zone 14","","","","Canada - Ontario - between 88 deg 30 min and 85 deg 30 min West.","projected 2D","","","East","North","E","N","9001","","4269","17714","1997-11-13 00:00:00","Surveys and Mapping Section; Ontario Ministry of Transportation.","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1127[] = {"32195","NAD83 / MTM zone 15","","","","Canada - Ontario - between 91 deg 30 min and 88 deg 30 min West.","projected 2D","","","East","North","E","N","9001","","4269","17715","1997-11-13 00:00:00","Surveys and Mapping Section; Ontario Ministry of Transportation.","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1128[] = {"32196","NAD83 / MTM zone 16","","","","Canada - Ontario - between 94 deg 30 min and 91 deg 30 min West.","projected 2D","","","East","North","E","N","9001","","4269","17716","1997-11-13 00:00:00","Surveys and Mapping Section; Ontario Ministry of Transportation.","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1129[] = {"32197","NAD83 / MTM zone 17","","","","Canada - Ontario - west of 94 deg 30 min West.","projected 2D","","","East","North","E","N","9001","","4269","17717","1997-11-13 00:00:00","Surveys and Mapping Section; Ontario Ministry of Transportation.","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1130[] = {"32198","NAD83 / Quebec Lambert","","","","Canada - Quebec","projected 2D","","","East","North","X","Y","9001","","4269","19944","1999-10-20 00:00:00","Service de la Cartographie; Minist�re des Ressources Naturelles; Quebec","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1131[] = {"32201","WGS 72 / UTM zone 1N","","","","180deg to 174deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16001","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1132[] = {"32202","WGS 72 / UTM zone 2N","","","","174deg West to 168deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16002","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1133[] = {"32203","WGS 72 / UTM zone 3N","","","","168deg West to 162deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16003","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1134[] = {"32204","WGS 72 / UTM zone 4N","","","","162deg West to 156deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16004","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1135[] = {"32205","WGS 72 / UTM zone 5N","","","","156deg West to 150deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16005","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1136[] = {"32206","WGS 72 / UTM zone 6N","","","","150deg West to 144deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16006","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1137[] = {"32207","WGS 72 / UTM zone 7N","","","","144deg West to 138deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16007","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1138[] = {"32208","WGS 72 / UTM zone 8N","","","","138deg West to 132deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16008","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1139[] = {"32209","WGS 72 / UTM zone 9N","","","","132deg West to 126deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16009","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1140[] = {"32210","WGS 72 / UTM zone 10N","","","","130deg West to 120deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16010","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1141[] = {"32211","WGS 72 / UTM zone 11N","","","","120deg West to 114deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16011","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1142[] = {"32212","WGS 72 / UTM zone 12N","","","","114deg West to 108deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16012","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1143[] = {"32213","WGS 72 / UTM zone 13N","","","","108deg West to 102deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16013","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1144[] = {"32214","WGS 72 / UTM zone 14N","","","","102deg West to 96deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16014","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1145[] = {"32215","WGS 72 / UTM zone 15N","","","","96deg West to 90deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16015","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1146[] = {"32216","WGS 72 / UTM zone 16N","","","","90deg West to 84deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16016","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1147[] = {"32217","WGS 72 / UTM zone 17N","","","","84deg West to 78deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16017","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1148[] = {"32218","WGS 72 / UTM zone 18N","","","","78deg West to 72deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16018","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1149[] = {"32219","WGS 72 / UTM zone 19N","","","","72deg West to 66deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16019","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1150[] = {"32220","WGS 72 / UTM zone 20N","","","","66deg West to 60deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16020","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1151[] = {"32221","WGS 72 / UTM zone 21N","","","","60deg West to 54deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16021","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1152[] = {"32222","WGS 72 / UTM zone 22N","","","","54deg West to 48deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16022","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1153[] = {"32223","WGS 72 / UTM zone 23N","","","","48deg West to 42deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16023","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1154[] = {"32224","WGS 72 / UTM zone 24N","","","","42deg West to 36deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16024","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1155[] = {"32225","WGS 72 / UTM zone 25N","","","","36deg West to 30deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16025","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1156[] = {"32226","WGS 72 / UTM zone 26N","","","","30deg West to 24deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16026","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1157[] = {"32227","WGS 72 / UTM zone 27N","","","","24deg West to 18deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16027","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1158[] = {"32228","WGS 72 / UTM zone 28N","","","","18deg West to 12deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16028","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1159[] = {"32229","WGS 72 / UTM zone 29N","","","","12deg West to 6deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16029","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1160[] = {"32230","WGS 72 / UTM zone 30N","","","","6deg West to 0deg; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16030","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1161[] = {"32231","WGS 72 / UTM zone 31N","","","","0deg to 6deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16031","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1162[] = {"32232","WGS 72 / UTM zone 32N","","","","6deg East to 12deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16032","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1163[] = {"32233","WGS 72 / UTM zone 33N","","","","12deg East to 18deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16033","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1164[] = {"32234","WGS 72 / UTM zone 34N","","","","18deg East to 24deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16034","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1165[] = {"32235","WGS 72 / UTM zone 35N","","","","24deg East to 30deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16035","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1166[] = {"32236","WGS 72 / UTM zone 36N","","","","30deg East to 36deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16036","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1167[] = {"32237","WGS 72 / UTM zone 37N","","","","36deg East to 42deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16037","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1168[] = {"32238","WGS 72 / UTM zone 38N","","","","42deg East to 48deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16038","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1169[] = {"32239","WGS 72 / UTM zone 39N","","","","48deg East to 54deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16039","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1170[] = {"32240","WGS 72 / UTM zone 40N","","","","54deg East to 60deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16040","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1171[] = {"32241","WGS 72 / UTM zone 41N","","","","60deg East to 66deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16041","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1172[] = {"32242","WGS 72 / UTM zone 42N","","","","66deg East to 72deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16042","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1173[] = {"32243","WGS 72 / UTM zone 43N","","","","72deg East to 78deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16043","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1174[] = {"32244","WGS 72 / UTM zone 44N","","","","78deg East to 84deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16044","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1175[] = {"32245","WGS 72 / UTM zone 45N","","","","84deg East to 90deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16045","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1176[] = {"32246","WGS 72 / UTM zone 46N","","","","90deg East to 96deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16046","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1177[] = {"32247","WGS 72 / UTM zone 47N","","","","96deg East to 102eg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16047","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1178[] = {"32248","WGS 72 / UTM zone 48N","","","","102deg East to 108deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16048","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1179[] = {"32249","WGS 72 / UTM zone 49N","","","","108deg East to 114deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16049","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1180[] = {"32250","WGS 72 / UTM zone 50N","","","","114deg East to 120deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16050","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1181[] = {"32251","WGS 72 / UTM zone 51N","","","","120deg East to 126deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16051","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1182[] = {"32252","WGS 72 / UTM zone 52N","","","","126deg East to 132deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16052","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1183[] = {"32253","WGS 72 / UTM zone 53N","","","","132deg East to 138deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16053","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1184[] = {"32254","WGS 72 / UTM zone 54N","","","","138deg East to 144deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16054","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1185[] = {"32255","WGS 72 / UTM zone 55N","","","","144deg East to 150deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16055","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1186[] = {"32256","WGS 72 / UTM zone 56N","","","","150deg East to 156deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16056","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1187[] = {"32257","WGS 72 / UTM zone 57N","","","","156deg East to 162deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16057","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1188[] = {"32258","WGS 72 / UTM zone 58N","","","","162deg East to 168deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16058","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1189[] = {"32259","WGS 72 / UTM zone 59N","","","","168deg East to 174deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16059","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1190[] = {"32260","WGS 72 / UTM zone 60N","","","","174deg East to 180deg; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16060","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1191[] = {"32301","WGS 72 / UTM zone 1S","","","","180deg to 174deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16101","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1192[] = {"32302","WGS 72 / UTM zone 2S","","","","174deg West to 168deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16102","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1193[] = {"32303","WGS 72 / UTM zone 3S","","","","168deg West to 162deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16103","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1194[] = {"32304","WGS 72 / UTM zone 4S","","","","162deg West to 156deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16104","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1195[] = {"32305","WGS 72 / UTM zone 5S","","","","156deg West to 150deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16105","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1196[] = {"32306","WGS 72 / UTM zone 6S","","","","150deg West to 144deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16106","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1197[] = {"32307","WGS 72 / UTM zone 7S","","","","144deg West to 138deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16107","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1198[] = {"32308","WGS 72 / UTM zone 8S","","","","138deg West to 132deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16108","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1199[] = {"32309","WGS 72 / UTM zone 9S","","","","132deg West to 126deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16109","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1200[] = {"32310","WGS 72 / UTM zone 10S","","","","130deg West to 120deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16110","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1201[] = {"32311","WGS 72 / UTM zone 11S","","","","120deg West to 114deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16111","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1202[] = {"32312","WGS 72 / UTM zone 12S","","","","114deg West to 108deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16112","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1203[] = {"32313","WGS 72 / UTM zone 13S","","","","108deg West to 102deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16113","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1204[] = {"32314","WGS 72 / UTM zone 14S","","","","102deg West to 96deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16114","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1205[] = {"32315","WGS 72 / UTM zone 15S","","","","96deg West to 90deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16115","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1206[] = {"32316","WGS 72 / UTM zone 16S","","","","90deg West to 84deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16116","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1207[] = {"32317","WGS 72 / UTM zone 17S","","","","84deg West to 78deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16117","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1208[] = {"32318","WGS 72 / UTM zone 18S","","","","78deg West to 72deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16118","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1209[] = {"32319","WGS 72 / UTM zone 19S","","","","72deg West to 66deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16119","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1210[] = {"32320","WGS 72 / UTM zone 20S","","","","66deg West to 60deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16120","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1211[] = {"32321","WGS 72 / UTM zone 21S","","","","60deg West to 54deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16121","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1212[] = {"32322","WGS 72 / UTM zone 22S","","","","54deg West to 48deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16122","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1213[] = {"32323","WGS 72 / UTM zone 23S","","","","48deg West to 42deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16123","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1214[] = {"32324","WGS 72 / UTM zone 24S","","","","42deg West to 36deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16124","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1215[] = {"32325","WGS 72 / UTM zone 25S","","","","36deg West to 30deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16125","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1216[] = {"32326","WGS 72 / UTM zone 26S","","","","30deg West to 24deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16126","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1217[] = {"32327","WGS 72 / UTM zone 27S","","","","24deg West to 18deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16127","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1218[] = {"32328","WGS 72 / UTM zone 28S","","","","18deg West to 12deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16128","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1219[] = {"32329","WGS 72 / UTM zone 29S","","","","12deg West to 6deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16129","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1220[] = {"32330","WGS 72 / UTM zone 30S","","","","6deg West to 0deg; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16130","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1221[] = {"32331","WGS 72 / UTM zone 31S","","","","0deg to 6deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16131","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1222[] = {"32332","WGS 72 / UTM zone 32S","","","","6deg East to 12deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16132","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1223[] = {"32333","WGS 72 / UTM zone 33S","","","","12deg East to 18deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16133","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1224[] = {"32334","WGS 72 / UTM zone 34S","","","","18deg East to 24deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16134","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1225[] = {"32335","WGS 72 / UTM zone 35S","","","","24deg East to 30deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16135","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1226[] = {"32336","WGS 72 / UTM zone 36S","","","","30deg East to 36deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16136","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1227[] = {"32337","WGS 72 / UTM zone 37S","","","","36deg East to 42deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16137","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1228[] = {"32338","WGS 72 / UTM zone 38S","","","","42deg East to 48deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16138","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1229[] = {"32339","WGS 72 / UTM zone 39S","","","","48deg East to 54deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16139","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1230[] = {"32340","WGS 72 / UTM zone 40S","","","","54deg East to 60deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16140","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1231[] = {"32341","WGS 72 / UTM zone 41S","","","","60deg East to 66deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16141","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1232[] = {"32342","WGS 72 / UTM zone 42S","","","","66deg East to 72deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16142","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1233[] = {"32343","WGS 72 / UTM zone 43S","","","","72deg East to 78deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16143","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1234[] = {"32344","WGS 72 / UTM zone 44S","","","","78deg East to 84deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16144","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1235[] = {"32345","WGS 72 / UTM zone 45S","","","","84deg East to 90deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16145","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1236[] = {"32346","WGS 72 / UTM zone 46S","","","","90deg East to 96deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16146","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1237[] = {"32347","WGS 72 / UTM zone 47S","","","","96deg East to 102eg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16147","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1238[] = {"32348","WGS 72 / UTM zone 48S","","","","102deg East to 108deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16148","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1239[] = {"32349","WGS 72 / UTM zone 49S","","","","108deg East to 114deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16149","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1240[] = {"32350","WGS 72 / UTM zone 50S","","","","114deg East to 120deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16150","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1241[] = {"32351","WGS 72 / UTM zone 51S","","","","120deg East to 126deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16151","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1242[] = {"32352","WGS 72 / UTM zone 52S","","","","126deg East to 132deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16152","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1243[] = {"32353","WGS 72 / UTM zone 53S","","","","132deg East to 138deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16153","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1244[] = {"32354","WGS 72 / UTM zone 54S","","","","138deg East to 144deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16154","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1245[] = {"32355","WGS 72 / UTM zone 55S","","","","144deg East to 150deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16155","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1246[] = {"32356","WGS 72 / UTM zone 56S","","","","150deg East to 156deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16156","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1247[] = {"32357","WGS 72 / UTM zone 57S","","","","156deg East to 162deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16157","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1248[] = {"32358","WGS 72 / UTM zone 58S","","","","162deg East to 168deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16158","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1249[] = {"32359","WGS 72 / UTM zone 59S","","","","168deg East to 174deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16159","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1250[] = {"32360","WGS 72 / UTM zone 60S","","","","174deg East to 180deg; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4322","16160","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1251[] = {"32401","WGS 72BE / UTM zone 1N","","","","180deg to 174deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16001","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1252[] = {"32402","WGS 72BE / UTM zone 2N","","","","174deg West to 168deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16002","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1253[] = {"32403","WGS 72BE / UTM zone 3N","","","","168deg West to 162deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16003","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1254[] = {"32404","WGS 72BE / UTM zone 4N","","","","162deg West to 156deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16004","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1255[] = {"32405","WGS 72BE / UTM zone 5N","","","","156deg West to 150deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16005","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1256[] = {"32406","WGS 72BE / UTM zone 6N","","","","150deg West to 144deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16006","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1257[] = {"32407","WGS 72BE / UTM zone 7N","","","","144deg West to 138deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16007","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1258[] = {"32408","WGS 72BE / UTM zone 8N","","","","138deg West to 132deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16008","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1259[] = {"32409","WGS 72BE / UTM zone 9N","","","","132deg West to 126deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16009","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1260[] = {"32410","WGS 72BE / UTM zone 10N","","","","130deg West to 120deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16010","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1261[] = {"32411","WGS 72BE / UTM zone 11N","","","","120deg West to 114deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16011","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1262[] = {"32412","WGS 72BE / UTM zone 12N","","","","114deg West to 108deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16012","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1263[] = {"32413","WGS 72BE / UTM zone 13N","","","","108deg West to 102deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16013","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1264[] = {"32414","WGS 72BE / UTM zone 14N","","","","102deg West to 96deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16014","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1265[] = {"32415","WGS 72BE / UTM zone 15N","","","","96deg West to 90deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16015","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1266[] = {"32416","WGS 72BE / UTM zone 16N","","","","90deg West to 84deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16016","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1267[] = {"32417","WGS 72BE / UTM zone 17N","","","","84deg West to 78deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16017","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1268[] = {"32418","WGS 72BE / UTM zone 18N","","","","78deg West to 72deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16018","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1269[] = {"32419","WGS 72BE / UTM zone 19N","","","","72deg West to 66deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16019","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1270[] = {"32420","WGS 72BE / UTM zone 20N","","","","66deg West to 60deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16020","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1271[] = {"32421","WGS 72BE / UTM zone 21N","","","","60deg West to 54deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16021","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1272[] = {"32422","WGS 72BE / UTM zone 22N","","","","54deg West to 48deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16022","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1273[] = {"32423","WGS 72BE / UTM zone 23N","","","","48deg West to 42deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16023","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1274[] = {"32424","WGS 72BE / UTM zone 24N","","","","42deg West to 36deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16024","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1275[] = {"32425","WGS 72BE / UTM zone 25N","","","","36deg West to 30deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16025","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1276[] = {"32426","WGS 72BE / UTM zone 26N","","","","30deg West to 24deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16026","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1277[] = {"32427","WGS 72BE / UTM zone 27N","","","","24deg West to 18deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16027","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1278[] = {"32428","WGS 72BE / UTM zone 28N","","","","18deg West to 12deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16028","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1279[] = {"32429","WGS 72BE / UTM zone 29N","","","","12deg West to 6deg West; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16029","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1280[] = {"32430","WGS 72BE / UTM zone 30N","","","","6deg West to 0deg; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16030","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1281[] = {"32431","WGS 72BE / UTM zone 31N","","","","0deg to 6deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16031","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1282[] = {"32432","WGS 72BE / UTM zone 32N","","","","6deg East to 12deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16032","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1283[] = {"32433","WGS 72BE / UTM zone 33N","","","","12deg East to 18deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16033","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1284[] = {"32434","WGS 72BE / UTM zone 34N","","","","18deg East to 24deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16034","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1285[] = {"32435","WGS 72BE / UTM zone 35N","","","","24deg East to 30deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16035","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1286[] = {"32436","WGS 72BE / UTM zone 36N","","","","30deg East to 36deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16036","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1287[] = {"32437","WGS 72BE / UTM zone 37N","","","","36deg East to 42deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16037","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1288[] = {"32438","WGS 72BE / UTM zone 38N","","","","42deg East to 48deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16038","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1289[] = {"32439","WGS 72BE / UTM zone 39N","","","","48deg East to 54deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16039","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1290[] = {"32440","WGS 72BE / UTM zone 40N","","","","54deg East to 60deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16040","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1291[] = {"32441","WGS 72BE / UTM zone 41N","","","","60deg East to 66deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16041","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1292[] = {"32442","WGS 72BE / UTM zone 42N","","","","66deg East to 72deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16042","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1293[] = {"32443","WGS 72BE / UTM zone 43N","","","","72deg East to 78deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16043","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1294[] = {"32444","WGS 72BE / UTM zone 44N","","","","78deg East to 84deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16044","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1295[] = {"32445","WGS 72BE / UTM zone 45N","","","","84deg East to 90deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16045","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1296[] = {"32446","WGS 72BE / UTM zone 46N","","","","90deg East to 96deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16046","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1297[] = {"32447","WGS 72BE / UTM zone 47N","","","","96deg East to 102eg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16047","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1298[] = {"32448","WGS 72BE / UTM zone 48N","","","","102deg East to 108deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16048","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1299[] = {"32449","WGS 72BE / UTM zone 49N","","","","108deg East to 114deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16049","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1300[] = {"32450","WGS 72BE / UTM zone 50N","","","","114deg East to 120deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16050","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1301[] = {"32451","WGS 72BE / UTM zone 51N","","","","120deg East to 126deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16051","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1302[] = {"32452","WGS 72BE / UTM zone 52N","","","","126deg East to 132deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16052","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1303[] = {"32453","WGS 72BE / UTM zone 53N","","","","132deg East to 138deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16053","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1304[] = {"32454","WGS 72BE / UTM zone 54N","","","","138deg East to 144deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16054","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1305[] = {"32455","WGS 72BE / UTM zone 55N","","","","144deg East to 150deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16055","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1306[] = {"32456","WGS 72BE / UTM zone 56N","","","","150deg East to 156deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16056","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1307[] = {"32457","WGS 72BE / UTM zone 57N","","","","156deg East to 162deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16057","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1308[] = {"32458","WGS 72BE / UTM zone 58N","","","","162deg East to 168deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16058","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1309[] = {"32459","WGS 72BE / UTM zone 59N","","","","168deg East to 174deg East; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16059","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1310[] = {"32460","WGS 72BE / UTM zone 60N","","","","174deg East to 180deg; northern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16060","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1311[] = {"32501","WGS 72BE / UTM zone 1S","","","","180deg to 174deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16101","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1312[] = {"32502","WGS 72BE / UTM zone 2S","","","","174deg West to 168deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16102","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1313[] = {"32503","WGS 72BE / UTM zone 3S","","","","168deg West to 162deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16103","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1314[] = {"32504","WGS 72BE / UTM zone 4S","","","","162deg West to 156deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16104","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1315[] = {"32505","WGS 72BE / UTM zone 5S","","","","156deg West to 150deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16105","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1316[] = {"32506","WGS 72BE / UTM zone 6S","","","","150deg West to 144deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16106","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1317[] = {"32507","WGS 72BE / UTM zone 7S","","","","144deg West to 138deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16107","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1318[] = {"32508","WGS 72BE / UTM zone 8S","","","","138deg West to 132deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16108","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1319[] = {"32509","WGS 72BE / UTM zone 9S","","","","132deg West to 126deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16109","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1320[] = {"32510","WGS 72BE / UTM zone 10S","","","","130deg West to 120deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16110","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1321[] = {"32511","WGS 72BE / UTM zone 11S","","","","120deg West to 114deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16111","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1322[] = {"32512","WGS 72BE / UTM zone 12S","","","","114deg West to 108deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16112","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1323[] = {"32513","WGS 72BE / UTM zone 13S","","","","108deg West to 102deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16113","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1324[] = {"32514","WGS 72BE / UTM zone 14S","","","","102deg West to 96deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16114","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1325[] = {"32515","WGS 72BE / UTM zone 15S","","","","96deg West to 90deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16115","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1326[] = {"32516","WGS 72BE / UTM zone 16S","","","","90deg West to 84deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16116","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1327[] = {"32517","WGS 72BE / UTM zone 17S","","","","84deg West to 78deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16117","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1328[] = {"32518","WGS 72BE / UTM zone 18S","","","","78deg West to 72deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16118","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1329[] = {"32519","WGS 72BE / UTM zone 19S","","","","72deg West to 66deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16119","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1330[] = {"32520","WGS 72BE / UTM zone 20S","","","","66deg West to 60deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16120","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1331[] = {"32521","WGS 72BE / UTM zone 21S","","","","60deg West to 54deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16121","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1332[] = {"32522","WGS 72BE / UTM zone 22S","","","","54deg West to 48deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16122","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1333[] = {"32523","WGS 72BE / UTM zone 23S","","","","48deg West to 42deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16123","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1334[] = {"32524","WGS 72BE / UTM zone 24S","","","","42deg West to 36deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16124","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1335[] = {"32525","WGS 72BE / UTM zone 25S","","","","36deg West to 30deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16125","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1336[] = {"32526","WGS 72BE / UTM zone 26S","","","","30deg West to 24deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16126","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1337[] = {"32527","WGS 72BE / UTM zone 27S","","","","24deg West to 18deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16127","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1338[] = {"32528","WGS 72BE / UTM zone 28S","","","","18deg West to 12deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16128","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1339[] = {"32529","WGS 72BE / UTM zone 29S","","","","12deg West to 6deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16129","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1340[] = {"32530","WGS 72BE / UTM zone 30S","","","","6deg West to 0deg; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16130","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1341[] = {"32531","WGS 72BE / UTM zone 31S","","","","0deg to 6deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16131","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1342[] = {"32532","WGS 72BE / UTM zone 32S","","","","6deg East to 12deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16132","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1343[] = {"32533","WGS 72BE / UTM zone 33S","","","","12deg East to 18deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16133","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1344[] = {"32534","WGS 72BE / UTM zone 34S","","","","18deg East to 24deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16134","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1345[] = {"32535","WGS 72BE / UTM zone 35S","","","","24deg East to 30deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16135","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1346[] = {"32536","WGS 72BE / UTM zone 36S","","","","30deg East to 36deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16136","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1347[] = {"32537","WGS 72BE / UTM zone 37S","","","","36deg East to 42deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16137","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1348[] = {"32538","WGS 72BE / UTM zone 38S","","","","42deg East to 48deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16138","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1349[] = {"32539","WGS 72BE / UTM zone 39S","","","","48deg East to 54deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16139","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1350[] = {"32540","WGS 72BE / UTM zone 40S","","","","54deg East to 60deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16140","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1351[] = {"32541","WGS 72BE / UTM zone 41S","","","","60deg East to 66deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16141","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1352[] = {"32542","WGS 72BE / UTM zone 42S","","","","66deg East to 72deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16142","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1353[] = {"32543","WGS 72BE / UTM zone 43S","","","","72deg East to 78deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16143","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1354[] = {"32544","WGS 72BE / UTM zone 44S","","","","78deg East to 84deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16144","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1355[] = {"32545","WGS 72BE / UTM zone 45S","","","","84deg East to 90deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16145","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1356[] = {"32546","WGS 72BE / UTM zone 46S","","","","90deg East to 96deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16146","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1357[] = {"32547","WGS 72BE / UTM zone 47S","","","","96deg East to 102eg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16147","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1358[] = {"32548","WGS 72BE / UTM zone 48S","","","","102deg East to 108deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16148","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1359[] = {"32549","WGS 72BE / UTM zone 49S","","","","108deg East to 114deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16149","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1360[] = {"32550","WGS 72BE / UTM zone 50S","","","","114deg East to 120deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16150","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1361[] = {"32551","WGS 72BE / UTM zone 51S","","","","120deg East to 126deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16151","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1362[] = {"32552","WGS 72BE / UTM zone 52S","","","","126deg East to 132deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16152","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1363[] = {"32553","WGS 72BE / UTM zone 53S","","","","132deg East to 138deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16153","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1364[] = {"32554","WGS 72BE / UTM zone 54S","","","","138deg East to 144deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16154","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1365[] = {"32555","WGS 72BE / UTM zone 55S","","","","144deg East to 150deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16155","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1366[] = {"32556","WGS 72BE / UTM zone 56S","","","","150deg East to 156deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16156","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1367[] = {"32557","WGS 72BE / UTM zone 57S","","","","156deg East to 162deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16157","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1368[] = {"32558","WGS 72BE / UTM zone 58S","","","","162deg East to 168deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16158","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1369[] = {"32559","WGS 72BE / UTM zone 59S","","","","168deg East to 174deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16159","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1370[] = {"32560","WGS 72BE / UTM zone 60S","","","","174deg East to 180deg; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4324","16160","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1371[] = {"32601","WGS 84 / UTM zone 1N","","","","180deg to 174deg West; northern hemisphere; Russia.","projected 2D","","","East","North","E","N","9001","","4326","16001","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1372[] = {"32602","WGS 84 / UTM zone 2N","","","","174deg West to 168deg West; northern hemisphere. Russia; United States (USA) - Alaska (AK).","projected 2D","","","East","North","E","N","9001","","4326","16002","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1373[] = {"32603","WGS 84 / UTM zone 3N","","","","168deg West to 162deg West; northern hemisphere. United States (USA) - Alaska (AK).","projected 2D","","","East","North","E","N","9001","","4326","16003","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1374[] = {"32604","WGS 84 / UTM zone 4N","","","","162deg West to 156deg West; northern hemisphere. United States (USA) - Alaska (AK).","projected 2D","","","East","North","E","N","9001","","4326","16004","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1375[] = {"32605","WGS 84 / UTM zone 5N","","","","156deg West to 150deg West; northern hemisphere. United States (USA) - Alaska (AK).","projected 2D","","","East","North","E","N","9001","","4326","16005","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1376[] = {"32606","WGS 84 / UTM zone 6N","","","","150deg West to 144deg West; northern hemisphere. United States (USA) - Alaska (AK).","projected 2D","","","East","North","E","N","9001","","4326","16006","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1377[] = {"32607","WGS 84 / UTM zone 7N","","","","144deg West to 138deg West; northern hemisphere. Canada - British Columbia (BC); Yukon. United States (USA) - Alaska (AK).","projected 2D","","","East","North","E","N","9001","","4326","16007","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1378[] = {"32608","WGS 84 / UTM zone 8N","","","","138deg West to 132deg West; northern hemisphere. Canada - British Columbia (BC); North West Territiories; Yukon. United States (USA) - Alaska (AK).","projected 2D","","","East","North","E","N","9001","","4326","16008","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1379[] = {"32609","WGS 84 / UTM zone 9N","","","","132deg West to 126deg West; northern hemisphere. Canada - British Columbia (BC); North West Territories; Yukon. United States (USA) - Alaska (AK).","projected 2D","","","East","North","E","N","9001","","4326","16009","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1380[] = {"32610","WGS 84 / UTM zone 10N","","","","130deg West to 120deg West; northern hemisphere. Canada - British Columbia (BC); North West Territories; Nunavut; Yukon. United States (USA) - Alaska (AK).","projected 2D","","","East","North","E","N","9001","","4326","16010","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1381[] = {"32611","WGS 84 / UTM zone 11N","","","","120deg West to 114deg West; northern hemisphere. Canada - Alberta; British Columbia (BC); North West Territories; Nunavut. Mexico. United States (USA).","projected 2D","","","East","North","E","N","9001","","4326","16011","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1382[] = {"32612","WGS 84 / UTM zone 12N","","","","114deg West to 108deg West; northern hemisphere. Canada - Alberta; North West Territories; Nunavut; Saskatchewan.  Mexico.  United States (USA).","projected 2D","","","East","North","E","N","9001","","4326","16012","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1383[] = {"32613","WGS 84 / UTM zone 13N","","","","108deg West to 102deg West; northern hemisphere. Canada - North West Territories; Nunavut; Saskatchewan.  Mexico.  United States (USA).","projected 2D","","","East","North","E","N","9001","","4326","16013","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1384[] = {"32614","WGS 84 / UTM zone 14N","","","","102deg West to 96deg West; northern hemisphere. Canada - Manitoba; Nunavut; Saskatchewan.  Mexico.  United States (USA).","projected 2D","","","East","North","E","N","9001","","4326","16014","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1385[] = {"32615","WGS 84 / UTM zone 15N","","","","96deg West to 90deg West; northern hemisphere. Canada - Manitoba; Nunavut; Ontario.  Guatemala.  Mexico.  United States (USA) - Gulf of Mexico (GoM).","projected 2D","","","East","North","E","N","9001","","4326","16015","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1386[] = {"32616","WGS 84 / UTM zone 16N","","","","90deg West to 84deg West; northern hemisphere. Belize. Canada - Manitoba; Nunavut; Ontario.  Costa Rica. Cuba. El Salvador. Guatemala. Honduras. Mexico. Nicaragua. Puerto Rico. United States (USA).","projected 2D","","","East","North","E","N","9001","","4326","16016","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1387[] = {"32617","WGS 84 / UTM zone 17N","","","","84deg West to 78deg West; northern hemisphere. Bahamas. Ecuador - north of equator. Canada - Nunavut; Ontario; Quebec.  Cayman Islands.  Colombia. Costa Rica. Jamaica. Nicaragua. Panama. Puerto Rico. United States (USA).","projected 2D","","","East","North","E","N","9001","","4326","16017","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1388[] = {"32618","WGS 84 / UTM zone 18N","","","","78deg West to 72deg West; northern hemisphere. Bahamas. Canada - Nunavut; Ontario; Quebec. Colombia. Cuba. Ecuador. Greenland. Haiti. Jamica. Panama. Turks and Caicos Islands. United States (USA). Venezuela.","projected 2D","","","East","North","E","N","9001","","4326","16018","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1389[] = {"32619","WGS 84 / UTM zone 19N","","","","72deg West to 66deg West; northern hemisphere. Aruba. Bahamas. Brazil. Canada - New Brunswick (NB); Newfoundland; Nunavut; Nova Scotia (NS); Quebec. Colombia. Dominican Republic. Greenland. Netherlands Antilles. Puerto Rico. Turks and Caicos Islands. Unite","projected 2D","","","East","North","E","N","9001","","4326","16019","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1390[] = {"32620","WGS 84 / UTM zone 20N","","","","66deg West to 60deg West; northern hemisphere. Anguilla. Antigua & Barbuda. Bermuda. Brazil. Canada - New Brunswick (NB); Newfoundland; North west Territories; Nova Scotia (NS); Prince Edward Island; Quebec. Dominica. Greenland. Grenada. Guadeloupe. Guyana","projected 2D","","","East","North","E","N","9001","","4326","16020","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1391[] = {"32621","WGS 84 / UTM zone 21N","","","","60deg West to 54deg West; northern hemisphere. Barbados. Brazil. Canada - Newfoundland; Quebec. French Guiana. Greenland. Guyana. St. Pierre and Miquelon. Suriname.","projected 2D","","","East","North","E","N","9001","","4326","16021","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1392[] = {"32622","WGS 84 / UTM zone 22N","","","","54deg West to 48deg West; northern hemisphere. Brazil. Canada - Newfoundland. French Guiana. Greenland.","projected 2D","","","East","North","E","N","9001","","4326","16022","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1393[] = {"32623","WGS 84 / UTM zone 23N","","","","48deg West to 42deg West; northern hemisphere. Greenland.","projected 2D","","","East","North","E","N","9001","","4326","16023","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1394[] = {"32624","WGS 84 / UTM zone 24N","","","","42deg West to 36deg West; northern hemisphere. Greenland.","projected 2D","","","East","North","E","N","9001","","4326","16024","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1395[] = {"32625","WGS 84 / UTM zone 25N","","","","36deg West to 30deg West; northern hemisphere. Greenland.","projected 2D","","","East","North","E","N","9001","","4326","16025","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1396[] = {"32626","WGS 84 / UTM zone 26N","","","","30deg West to 24deg West; northern hemisphere. Greenland. Iceland.","projected 2D","","","East","North","E","N","9001","","4326","16026","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1397[] = {"32627","WGS 84 / UTM zone 27N","","","","24deg West to 18deg West; northern hemisphere. Greenland. Iceland.","projected 2D","","","East","North","E","N","9001","","4326","16027","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1398[] = {"32628","WGS 84 / UTM zone 28N","","","","18deg West to 12deg West; northern hemisphere. Gambia. Greenland. Guinea. Guinea-Bissau. Iceland. Ireland - offshore Porcupine Basin. Mauritania. Morocco. Senegal. Sierra Leone. Western Sahara.","projected 2D","","","East","North","E","N","9001","","4326","16028","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1399[] = {"32629","WGS 84 / UTM zone 29N","","","","12deg West to 6deg West; northern hemisphere. Algeria. Cote D'Ivoire (Ivory Coast). Faroe Islands. Guinea. Ireland. Mali. Mauritania. Morocco. Portugal. Sierra Leone. Spain. United Kingdom (UK). Western Sahara.","projected 2D","","","East","North","E","N","9001","","4326","16029","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1400[] = {"32630","WGS 84 / UTM zone 30N","","","","6deg West to 0deg; northern hemisphere. Algeria. Burkino Faso. Cote' Ivoire (Ivory Coast). Faroe Islands - offshore. France. Ghana. Gibraltar. Ireland - offshore Irish Sea. Mali. Mauritania. Morocco. Spain. United Kingdom (UK).","projected 2D","","","East","North","E","N","9001","","4326","16030","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1401[] = {"32631","WGS 84 / UTM zone 31N","","","","0deg to 6deg East; northern hemisphere. Algeria. Andorra. Benin. Bukino Faso. Denmark - North Sea. France. Germany - North Sea. Ghana. Luxembourg. Mali. Netherlands. Niger. Nigeria. Norway. Spain. Togo. United Kingdom (UK) - North Sea.","projected 2D","","","East","North","E","N","9001","","4326","16031","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1402[] = {"32632","WGS 84 / UTM zone 32N","","","","6deg East to 12deg East; northern hemisphere. Algeria. Austria. Cameroon. Denmark. Equatorial Guinea. France. Gabon. Germany. Italy. Libya. Liechtenstein. Monaco. Netherlands. Niger. Nigeria. Norway. Sao Tome and Principe. Svalbard and Jan Mayen Islands. S","projected 2D","","","East","North","E","N","9001","","4326","16032","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1403[] = {"32633","WGS 84 / UTM zone 33N","","","","12deg East to 18deg East; northern hemisphere. Austria. Bosnia and Herzegowina. Cmeroon. Central African Republic. Chad. Congo. Croatia. Czech Republic. Democratic Republic of the Congo (Zaire). Gabon. Germany. Hungary. Italy. Libya. Malta. Niger. Nigeria.","projected 2D","","","East","North","E","N","9001","","4326","16033","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1404[] = {"32634","WGS 84 / UTM zone 34N","","","","18deg East to 24deg East; northern hemisphere. Albania. Belarus. Bosnia and Herzegowina. Bulgaria. Central African Republic. Chad. Croatia. Democratic Republic of the Congo (Zaire). Estonia. Finland. FYR Macedonia. Greece. Hungary. Italy. Latvia. Libya. Li","projected 2D","","","East","North","E","N","9001","","4326","16034","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1405[] = {"32635","WGS 84 / UTM zone 35N","","","","24deg East to 30deg East; northern hemisphere. Belarus. Bulgaria. Central African Republic. Democratic Republic of the Congo (Zaire). Egypt. Estonia. Finland. Greece. Latvia. Lesotho. Libya. Lithuania. Moldova. Norway. Romania. Russia. Sudan. Svalbard. Tur","projected 2D","","","East","North","E","N","9001","","4326","16035","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1406[] = {"32636","WGS 84 / UTM zone 36N","","","","30deg East to 36deg East; northern hemisphere. Belarus. Cyprus. Egypt. Ethiopia. Finland. Israel. Jordan. Kenya. Lebanon. Norway. Russia. Saudi Arabia. Sudan. Syria. Turkey. Uganda. Ukraine.","projected 2D","","","East","North","E","N","9001","","4326","16036","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1407[] = {"32637","WGS 84 / UTM zone 37N","","","","36deg East to 42deg East; northern hemisphere. Djibouti. Egypt. Eritrea. Ethiopia. Georgia. Iraq. Jordan. Kenya. Lebanon. Russia. Saudi Arabia. Somalia. Sudan. Syria. Turkey. Ukraine.","projected 2D","","","East","North","E","N","9001","","4326","16037","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1408[] = {"32638","WGS 84 / UTM zone 38N","","","","42deg East to 48deg East; northern hemisphere. Armenia. Azerbaijan. Djibouti. Eritrea. Ethiopia. Georgia. Iran. Iraq. Kazakhstan. Kuwait. Russia. Saudi Arabia. Somalia. Turkey. Yemen.","projected 2D","","","East","North","E","N","9001","","4326","16038","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1409[] = {"32639","WGS 84 / UTM zone 39N","","","","48deg East to 54deg East; northern hemisphere. Azerbaijan. Bahrain. Iran. Kazakhstan. Kuwait. Oman. Qatar. Russia. Saudi Arabia. Somalia. Turkmenistan. United Arab Emirates. Yemen.","projected 2D","","","East","North","E","N","9001","","4326","16039","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1410[] = {"32640","WGS 84 / UTM zone 40N","","","","54deg East to 60deg East; northern hemisphere. Iran. Kazakhstan. Oman. Russia. Saudi Arabia. Turkmenistan. United Arab Emirates. Uzbekistan.","projected 2D","","","East","North","E","N","9001","","4326","16040","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1411[] = {"32641","WGS 84 / UTM zone 41N","","","","60deg East to 66deg East; northern hemisphere. Afghanistan. Iran. Kazakhstan. Pakistan. Russia. Turkmenistan.  Uzbekistan.","projected 2D","","","East","North","E","N","9001","","4326","16041","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1412[] = {"32642","WGS 84 / UTM zone 42N","","","","66deg East to 72deg East; northern hemisphere. Afghanistan. India. Kazakhstan. Kyrgyzstan. Pakistan. Russia. Tajikistan. Uzbekistan.","projected 2D","","","East","North","E","N","9001","","4326","16042","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1413[] = {"32643","WGS 84 / UTM zone 43N","","","","72deg East to 78deg East; northern hemisphere. China. India. Kazakhstan. Kyrgyzstan. Maldives. Pakistan. Russia. Tajikistan.","projected 2D","","","East","North","E","N","9001","","4326","16043","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1414[] = {"32644","WGS 84 / UTM zone 44N","","","","78deg East to 84deg East; northern hemisphere. China. India. Kazakhstan. Kyrgyzstan. Nepal. Russia. Sri Lanka.","projected 2D","","","East","North","E","N","9001","","4326","16044","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1415[] = {"32645","WGS 84 / UTM zone 45N","","","","84deg East to 90deg East; northern hemisphere. Bangladesh. Bhutan. China. India. Kazakhstan. Mongolia. Nepal. Russia.","projected 2D","","","East","North","E","N","9001","","4326","16045","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1416[] = {"32646","WGS 84 / UTM zone 46N","","","","90deg East to 96deg East; northern hemisphere. Bangladesh. Bhutan. China. Indonesia. Mongolia. Myanmar (Burma). Russia.","projected 2D","","","East","North","E","N","9001","","4326","16046","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1417[] = {"32647","WGS 84 / UTM zone 47N","","","","96deg East to 102eg East; northern hemisphere. China. Indonesia. Laos. Malaysia - West Malaysia. Mongolia. Myanmar (Burma). Russia. Thailand.","projected 2D","","","East","North","E","N","9001","","4326","16047","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1418[] = {"32648","WGS 84 / UTM zone 48N","","","","102deg East to 108deg East; northern hemisphere. Cambodia. China. Indonesia. Laos. Malaysia - West Malaysia. Mongolia. Russia. Singapore. Thailand. Vietnam.","projected 2D","","","East","North","E","N","9001","","4326","16048","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1419[] = {"32649","WGS 84 / UTM zone 49N","","","","108deg East to 114deg East; northern hemisphere. China. Hong Kong. Indonesia. Macau. Malaysia - East Malaysia - Sarawak. Mongolia. Russia. Vietnam.","projected 2D","","","East","North","E","N","9001","","4326","16049","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1420[] = {"32650","WGS 84 / UTM zone 50N","","","","114deg East to 120deg East; northern hemisphere. Brunei. China. Indonesia. Malaysia - East Malaysia - Sarawak. Mongolia. Philippines. Russia. Taiwan.","projected 2D","","","East","North","E","N","9001","","4326","16050","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1421[] = {"32651","WGS 84 / UTM zone 51N","","","","120deg East to 126deg East; northern hemisphere. China. Indonesia. Japan. North Korea. Philippines. Russia.  South Korea. Taiwan.","projected 2D","","","East","North","E","N","9001","","4326","16051","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1422[] = {"32652","WGS 84 / UTM zone 52N","","","","126deg East to 132deg East; northern hemisphere. China. Indonesia. Japan. North Korea. Russia. South Korea.","projected 2D","","","East","North","E","N","9001","","4326","16052","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1423[] = {"32653","WGS 84 / UTM zone 53N","","","","132deg East to 138deg East; northern hemisphere. China. Japan. Russia.","projected 2D","","","East","North","E","N","9001","","4326","16053","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1424[] = {"32654","WGS 84 / UTM zone 54N","","","","138deg East to 144deg East; northern hemisphere. Japan. Russia.","projected 2D","","","East","North","E","N","9001","","4326","16054","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1425[] = {"32655","WGS 84 / UTM zone 55N","","","","144deg East to 150deg East; northern hemisphere. Japan. Russia.","projected 2D","","","East","North","E","N","9001","","4326","16055","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1426[] = {"32656","WGS 84 / UTM zone 56N","","","","150deg East to 156deg East; northern hemisphere. Russia.","projected 2D","","","East","North","E","N","9001","","4326","16056","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1427[] = {"32657","WGS 84 / UTM zone 57N","","","","156deg East to 162deg East; northern hemisphere. Russia.","projected 2D","","","East","North","E","N","9001","","4326","16057","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1428[] = {"32658","WGS 84 / UTM zone 58N","","","","162deg East to 168deg East; northern hemisphere. Russia.","projected 2D","","","East","North","E","N","9001","","4326","16058","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1429[] = {"32659","WGS 84 / UTM zone 59N","","","","168deg East to 174deg East; northern hemisphere. Russia.","projected 2D","","","East","North","E","N","9001","","4326","16059","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1430[] = {"32660","WGS 84 / UTM zone 60N","","","","174deg East to 180deg; northern hemisphere. Russia.","projected 2D","","","East","North","E","N","9001","","4326","16060","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1431[] = {"32661","WGS 84 / UPS North","","","","Polar areas north of 84 deg N.","projected 2D","","","East","North","E","N","9001","","4326","16061","1996-09-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1432[] = {"32701","WGS 84 / UTM zone 1S","","","","180deg to 174deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4326","16101","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1433[] = {"32702","WGS 84 / UTM zone 2S","","","","174deg West to 168deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4326","16102","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1434[] = {"32703","WGS 84 / UTM zone 3S","","","","168deg West to 162deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4326","16103","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1435[] = {"32704","WGS 84 / UTM zone 4S","","","","162deg West to 156deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4326","16104","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1436[] = {"32705","WGS 84 / UTM zone 5S","","","","156deg West to 150deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4326","16105","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1437[] = {"32706","WGS 84 / UTM zone 6S","","","","150deg West to 144deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4326","16106","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1438[] = {"32707","WGS 84 / UTM zone 7S","","","","144deg West to 138deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4326","16107","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1439[] = {"32708","WGS 84 / UTM zone 8S","","","","138deg West to 132deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4326","16108","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1440[] = {"32709","WGS 84 / UTM zone 9S","","","","132deg West to 126deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4326","16109","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1441[] = {"32710","WGS 84 / UTM zone 10S","","","","130deg West to 120deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4326","16110","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1442[] = {"32711","WGS 84 / UTM zone 11S","","","","120deg West to 114deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4326","16111","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1443[] = {"32712","WGS 84 / UTM zone 12S","","","","114deg West to 108deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4326","16112","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1444[] = {"32713","WGS 84 / UTM zone 13S","","","","108deg West to 102deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4326","16113","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1445[] = {"32714","WGS 84 / UTM zone 14S","","","","102deg West to 96deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4326","16114","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1446[] = {"32715","WGS 84 / UTM zone 15S","","","","96deg West to 90deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4326","16115","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1447[] = {"32716","WGS 84 / UTM zone 16S","","","","90deg West to 84deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4326","16116","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1448[] = {"32717","WGS 84 / UTM zone 17S","","","","84deg West to 78deg West; southern hemisphere. Ecuador. Peru.","projected 2D","","","East","North","E","N","9001","","4326","16117","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1449[] = {"32718","WGS 84 / UTM zone 18S","","","","78deg West to 72deg West; southern hemisphere. Argentina. Brazil. Chile. Colombia. Ecuador. Peru.","projected 2D","","","East","North","E","N","9001","","4326","16118","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1450[] = {"32719","WGS 84 / UTM zone 19S","","","","72deg West to 66deg West; southern hemisphere. Argentina. Bolivia. Brazil. Chile. Colombia. Peru.","projected 2D","","","East","North","E","N","9001","","4326","16119","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1451[] = {"32720","WGS 84 / UTM zone 20S","","","","66deg West to 60deg West; southern hemisphere. Argentina. Bolivia. Brazil. Falkland Islands (Malvinas). Paraguay.","projected 2D","","","East","North","E","N","9001","","4326","16120","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1452[] = {"32721","WGS 84 / UTM zone 21S","","","","60deg West to 54deg West; southern hemisphere. Argentina. Bolivia. Brazil. Falkland Islands (Malvinas). Paraguay. Uruguay.","projected 2D","","","East","North","E","N","9001","","4326","16121","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1453[] = {"32722","WGS 84 / UTM zone 22S","","","","54deg West to 48deg West; southern hemisphere. Brazil.  Uruguay.","projected 2D","","","East","North","E","N","9001","","4326","16122","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1454[] = {"32723","WGS 84 / UTM zone 23S","","","","48deg West to 42deg West; southern hemisphere. Brazil.","projected 2D","","","East","North","E","N","9001","","4326","16123","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1455[] = {"32724","WGS 84 / UTM zone 24S","","","","42deg West to 36deg West; southern hemisphere. Brazil. South Georgia and the South Sandwich Islands.","projected 2D","","","East","North","E","N","9001","","4326","16124","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1456[] = {"32725","WGS 84 / UTM zone 25S","","","","36deg West to 30deg West; southern hemisphere. Brazil.","projected 2D","","","East","North","E","N","9001","","4326","16125","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1457[] = {"32726","WGS 84 / UTM zone 26S","","","","30deg West to 24deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4326","16126","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1458[] = {"32727","WGS 84 / UTM zone 27S","","","","24deg West to 18deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4326","16127","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1459[] = {"32728","WGS 84 / UTM zone 28S","","","","18deg West to 12deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4326","16128","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1460[] = {"32729","WGS 84 / UTM zone 29S","","","","12deg West to 6deg West; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4326","16129","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1461[] = {"32730","WGS 84 / UTM zone 30S","","","","6deg West to 0deg; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4326","16130","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1462[] = {"32731","WGS 84 / UTM zone 31S","","","","0deg to 6deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4326","16131","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1463[] = {"32732","WGS 84 / UTM zone 32S","","","","6deg East to 12deg East; southern hemisphere. Angola. Congo. Gabon. Namibia.","projected 2D","","","East","North","E","N","9001","","4326","16132","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1464[] = {"32733","WGS 84 / UTM zone 33S","","","","12deg East to 18deg East; southern hemisphere. Angola. Congo. Democratic Republic of the Congo (Zaire). Gabon. Namibia. South Africa.","projected 2D","","","East","North","E","N","9001","","4326","16133","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1465[] = {"32734","WGS 84 / UTM zone 34S","","","","18deg East to 24deg East; southern hemisphere. Angola. Botswana. Democratic Republic of the Congo (Zaire). Namibia. South Africa. Zambia.","projected 2D","","","East","North","E","N","9001","","4326","16134","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1466[] = {"32735","WGS 84 / UTM zone 35S","","","","24deg East to 30deg East; southern hemisphere. Botswana. Burundi. Democratic Republic of the Congo (Zaire). Rwanda. South Africa. Tanzania. Uganda. Zambia. Zimbabwe.","projected 2D","","","East","North","E","N","9001","","4326","16135","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1467[] = {"32736","WGS 84 / UTM zone 36S","","","","30deg East to 36deg East; southern hemisphere. Burundi. Kenya. Malawi. Mozambique. Rwanda. South Africa. Swaziland. Tanzania. Uganda. Zambia. Zimbabwe.","projected 2D","","","East","North","E","N","9001","","4326","16136","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1468[] = {"32737","WGS 84 / UTM zone 37S","","","","36deg East to 42deg East; southern hemisphere. Kenya. Mozambique. Tanzania.","projected 2D","","","East","North","E","N","9001","","4326","16137","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1469[] = {"32738","WGS 84 / UTM zone 38S","","","","42deg East to 48deg East; southern hemisphere. Madagascar.","projected 2D","","","East","North","E","N","9001","","4326","16138","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1470[] = {"32739","WGS 84 / UTM zone 39S","","","","48deg East to 54deg East; southern hemisphere. Madagascar.","projected 2D","","","East","North","E","N","9001","","4326","16139","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1471[] = {"32740","WGS 84 / UTM zone 40S","","","","54deg East to 60deg East; southern hemisphere. Seychelles.","projected 2D","","","East","North","E","N","9001","","4326","16140","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1472[] = {"32741","WGS 84 / UTM zone 41S","","","","60deg East to 66deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4326","16141","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1473[] = {"32742","WGS 84 / UTM zone 42S","","","","66deg East to 72deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4326","16142","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1474[] = {"32743","WGS 84 / UTM zone 43S","","","","72deg East to 78deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4326","16143","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1475[] = {"32744","WGS 84 / UTM zone 44S","","","","78deg East to 84deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4326","16144","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1476[] = {"32745","WGS 84 / UTM zone 45S","","","","84deg East to 90deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4326","16145","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1477[] = {"32746","WGS 84 / UTM zone 46S","","","","90deg East to 96deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4326","16146","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1478[] = {"32747","WGS 84 / UTM zone 47S","","","","96deg East to 102eg East; southern hemisphere. Indonesia.","projected 2D","","","East","North","E","N","9001","","4326","16147","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1479[] = {"32748","WGS 84 / UTM zone 48S","","","","102deg East to 108deg East; southern hemisphere. Indonesia.","projected 2D","","","East","North","E","N","9001","","4326","16148","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1480[] = {"32749","WGS 84 / UTM zone 49S","","","","108deg East to 114deg East; southern hemisphere. Australia. Indonesia.","projected 2D","","","East","North","E","N","9001","","4326","16149","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1481[] = {"32750","WGS 84 / UTM zone 50S","","","","114deg East to 120deg East; southern hemisphere. Australia. Indonesia.","projected 2D","","","East","North","E","N","9001","","4326","16150","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1482[] = {"32751","WGS 84 / UTM zone 51S","","","","120deg East to 126deg East; southern hemisphere. Australia. East Timor. Indonesia.","projected 2D","","","East","North","E","N","9001","","4326","16151","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1483[] = {"32752","WGS 84 / UTM zone 52S","","","","126deg East to 132deg East; southern hemisphere. Australia. East Timor. Indonesia.","projected 2D","","","East","North","E","N","9001","","4326","16152","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1484[] = {"32753","WGS 84 / UTM zone 53S","","","","132deg East to 138deg East; southern hemisphere. Australia.  Indonesia.","projected 2D","","","East","North","E","N","9001","","4326","16153","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1485[] = {"32754","WGS 84 / UTM zone 54S","","","","138deg East to 144deg East; southern hemisphere. Australia. Indonesia. Papua New Guinea.","projected 2D","","","East","North","E","N","9001","","4326","16154","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1486[] = {"32755","WGS 84 / UTM zone 55S","","","","144deg East to 150deg East; southern hemisphere. Australia. Papua New Guinea.","projected 2D","","","East","North","E","N","9001","","4326","16155","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1487[] = {"32756","WGS 84 / UTM zone 56S","","","","150deg East to 156deg East; southern hemisphere. Australia. Papua New Guinea.","projected 2D","","","East","North","E","N","9001","","4326","16156","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1488[] = {"32757","WGS 84 / UTM zone 57S","","","","156deg East to 162deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4326","16157","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1489[] = {"32758","WGS 84 / UTM zone 58S","","","","162deg East to 168deg East; southern hemisphere.","projected 2D","","","East","North","E","N","9001","","4326","16158","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1490[] = {"32759","WGS 84 / UTM zone 59S","","","","168deg East to 174deg East; southern hemisphere. New Zealand.","projected 2D","","","East","North","E","N","9001","","4326","16159","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1491[] = {"32760","WGS 84 / UTM zone 60S","","","","174deg East to 180deg; southern hemisphere. New Zealand.","projected 2D","","","East","North","E","N","9001","","4326","16160","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1492[] = {"32761","WGS 84 / UPS South","","","","Polar areas south of 80 deg S.","projected 2D","","","East","North","E","N","9001","","4326","16161","1996-09-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t horiz_cs_row_1493[] = {"32766","WGS 84 / TM 36 SE","","","","Mozambique - offshore.","projected 2D","","","East","North","E","N","9001","","4326","16636","1998-11-11 00:00:00","BP Mozambique","EPSG","Used by BP Mozambique for Offshore Zambezi block.","",NULL};
-
-datafile_rows_t *horiz_cs_rows[] = {horiz_cs_row_1,horiz_cs_row_2,horiz_cs_row_3,horiz_cs_row_4,horiz_cs_row_5,horiz_cs_row_6,horiz_cs_row_7,horiz_cs_row_8,horiz_cs_row_9,horiz_cs_row_10,horiz_cs_row_11,horiz_cs_row_12,horiz_cs_row_13,horiz_cs_row_14,horiz_cs_row_15,horiz_cs_row_16,horiz_cs_row_17,horiz_cs_row_18,horiz_cs_row_19,horiz_cs_row_20,horiz_cs_row_21,horiz_cs_row_22,horiz_cs_row_23,horiz_cs_row_24,horiz_cs_row_25,horiz_cs_row_26,horiz_cs_row_27,horiz_cs_row_28,horiz_cs_row_29,h [...]
diff --git a/src/tiff/csv/horiz_cs.csv b/src/tiff/csv/horiz_cs.csv
deleted file mode 100644
index b0f757a..0000000
--- a/src/tiff/csv/horiz_cs.csv
+++ /dev/null
@@ -1,1493 +0,0 @@
-"HORIZCS_CODE","HORIZCS_EPSG_NAME","HORIZCS_EPSG_ABBR","HORIZCS_USER_NAME","DESCRIPTION","AREA_OF_USE","COORD_SYS_TYPE","GEOD_DATUM_CODE","PRIME_MERIDIAN_CODE","ORIENT_POSITIVE_AXIS_1","ORIENT_POSITIVE_AXIS_2","COORD_SYS_AXIS_1_ABBR","COORD_SYS_AXIS_2_ABBR","UOM_LENGTH_CODE","UOM_ANGLE_CODE","SOURCE_GEOGCS_CODE","PROJECTION_TRF_CODE","REVISION_DATE","INFORMATION_SOURCE","DATA_SOURCE","REMARKS","CHANGE_ID"
-200,Anguilla 1957 / British West Indies Grid,Anguilla 1957 / BWI Grid,,,Anguilla,projected 2D,,,East,North,E,N,9001,,4600,19942,1999-04-22 00:00:00,Ordnance Survey of Great Britain,EPSG,,
-201,Antigua 1943 / British West Indies Grid,Antigua 1943 / BWI Grid,,,Antigua and Barbuda - Antigua,projected 2D,,,East,North,E,N,9001,,4601,19942,1999-04-22 00:00:00,Ordnance Survey of Great Britain,EPSG,,
-202,Dominica 1945 / British West Indies Grid,Dominica 1945 / BWI Grid,,,Dominica,projected 2D,,,East,North,E,N,9001,,4602,19942,1999-04-22 00:00:00,Ordnance Survey of Great Britain,EPSG,,
-203,Grenada 1953 / British West Indies Grid,Grenada 1953 / BWI Grid,,,Grenada (including Grenada Grenadines),projected 2D,,,East,North,E,N,9001,,4603,19942,1999-04-22 00:00:00,Ordnance Survey of Great Britain,EPSG,,
-204,Montserrat 58 / British West Indies Grid,Montserrat 58 / BWI Grid,,,Montserrat,projected 2D,,,East,North,E,N,9001,,4604,19942,1999-04-22 00:00:00,Ordnance Survey of Great Britain,EPSG,,
-205,St Kitts 1955 / British West Indies Grid,St Kitts 1955 / BWI Grid,,,Saint Kitts and Nevis,projected 2D,,,East,North,E,N,9001,,4605,19942,1999-04-22 00:00:00,Ordnance Survey of Great Britain,EPSG,,
-206,St Lucia 1955 / British West Indies Grid,St Lucia 1955 / BWI Grid,,,Saint Lucia,projected 2D,,,East,North,E,N,9001,,4606,19942,1999-04-22 00:00:00,Ordnance Survey of Great Britain,EPSG,,
-207,St Vincent 45 / British West Indies Grid,St Vincent 45 / BWI Grid,,,Saint Vincent and the Grenadines,projected 2D,,,East,North,E,N,9001,,4607,19942,1999-04-22 00:00:00,Ordnance Survey of Great Britain,EPSG,,
-208,NAD27(CGQ77) / SCoPQ zone 2,CGQ77 / SCoPQ zone 2,,,Canada - Quebec - east of 57 deg East.,projected 2D,,,East,North,X,Y,9001,,4609,17700,1999-07-24 00:00:00,Geodetic Service of Quebec; Quebec Ministry of Natural Resources.,EPSG,,
-209,NAD27(CGQ77) / SCoPQ zone 3,CGQ77 / SCoPQ zone 3,,,Canada - Quebec between 60 deg and 57 deg West.,projected 2D,,,East,North,X,Y,9001,,4609,17703,1999-07-24 00:00:00,Geodetic Service of Quebec; Quebec Ministry of Natural Resources.,EPSG,,
-210,NAD27(CGQ77) / SCoPQ zone 4,CGQ77 / SCoPQ zone 4,,,Canada - Quebec between 63 deg and 60 deg West.,projected 2D,,,East,North,X,Y,9001,,4609,17704,1999-07-24 00:00:00,Geodetic Service of Quebec; Quebec Ministry of Natural Resources.,EPSG,,
-211,NAD27(CGQ77) / SCoPQ zone 5,CGQ77 / SCoPQ zone 5,,,Canada - Quebec between 66 deg and 63 deg West.,projected 2D,,,East,North,X,Y,9001,,4609,17705,1999-07-24 00:00:00,Geodetic Service of Quebec; Quebec Ministry of Natural Resources.,EPSG,,
-212,NAD27(CGQ77) / SCoPQ zone 6,CGQ77 / SCoPQ zone 6,,,Canada - Quebec between 69 deg and  66 deg West.,projected 2D,,,East,North,X,Y,9001,,4609,17706,1999-07-24 00:00:00,Geodetic Service of Quebec; Quebec Ministry of Natural Resources.,EPSG,,
-213,NAD27(CGQ77) / SCoPQ zone 7,CGQ77 / SCoPQ zone 7,,,Canada - Quebec between 72 deg and 69 deg West.,projected 2D,,,East,North,X,Y,9001,,4609,17707,1999-07-24 00:00:00,Geodetic Service of Quebec; Quebec Ministry of Natural Resources.,EPSG,,
-214,NAD27(CGQ77) / SCoPQ zone 8,CGQ77 / SCoPQ zone 8,,,Canada - Quebec between 75 deg and 72 deg West.,projected 2D,,,East,North,X,Y,9001,,4609,17708,1999-07-24 00:00:00,Geodetic Service of Quebec; Quebec Ministry of Natural Resources.,EPSG,,
-215,NAD27(CGQ77) / SCoPQ zone 9,CGQ77 / SCoPQ zone 9,,,Canada - Quebec between 78 deg and 75 deg West.,projected 2D,,,East,North,X,Y,9001,,4609,17709,1999-07-24 00:00:00,Geodetic Service of Quebec; Quebec Ministry of Natural Resources.,EPSG,,
-216,NAD27(CGQ77) / SCoPQ zone 10,CGQ77 / SCoPQ zone 10,,,Canada - Quebec west of 78 deg West.,projected 2D,,,East,North,X,Y,9001,,4609,17710,1999-07-24 00:00:00,Geodetic Service of Quebec; Quebec Ministry of Natural Resources.,EPSG,,
-217,NAD27(76) / MTM zone 8,,,,Canada - Ontario - east of 75 deg West.,projected 2D,,,East,North,X,Y,9001,,4608,17708,1999-07-24 00:00:00,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,,
-218,NAD27(76) / MTM zone 9,,,,Canada - Ontario - between 78 deg and 75 deg West.,projected 2D,,,East,North,X,Y,9001,,4608,17709,1999-07-24 00:00:00,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,,
-219,NAD27(76) / MTM zone 10,,,,Canada - Ontario - between 79 deg 30 min and 78 deg W in area to north of 47 deg N; between 80 deg 15 min and 78 deg W in area between 46 deg and 47 deg N; between 81 deg and 78 deg W in area south of 46 deg N.,projected 2D,,,East,North,X,Y,9001,,4608,17710,1999-07-24 00:00:00,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,,
-220,NAD27(76) / MTM zone 11,,,,Canada - Ontario - south of 46 deg N and west of 81 deg West.,projected 2D,,,East,North,E,N,9001,,4608,17711,1999-07-24 00:00:00,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,,
-221,NAD27(76) / MTM zone 12,,,,Canada - Ontario - between 82 deg 30 min and 79 deg 30 min W in area to north of 47 deg N; between 82 deg 30 min and 80 deg 15 min W in area between 46 deg and 47 deg N; between 82 deg 30 min and 79 deg 30 min W in area north of 47 deg N.,projected 2D,,,East,North,E,N,9001,,4608,17712,1999-07-24 00:00:00,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,,
-222,NAD27(76) / MTM zone 13,,,,Canada - Ontario - between 85 deg 30 min and 82 deg 30 min West and north of 46 deg North.,projected 2D,,,East,North,E,N,9001,,4608,17713,1999-07-24 00:00:00,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,,
-223,NAD27(76) / MTM zone 14,,,,Canada - Ontario - between 88 deg 30 min and 85 deg 30 min West.,projected 2D,,,East,North,E,N,9001,,4608,17714,1999-07-24 00:00:00,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,,
-224,NAD27(76) / MTM zone 15,,,,Canada - Ontario - between 91 deg 30 min and 88 deg 30 min West.,projected 2D,,,East,North,E,N,9001,,4608,17715,1999-07-24 00:00:00,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,,
-225,NAD27(76) / MTM zone 16,,,,Canada - Ontario - between 94 deg 30 min and 91 deg 30 min West.,projected 2D,,,East,North,E,N,9001,,4608,17716,1999-07-24 00:00:00,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,,
-226,NAD27(76) / MTM zone 17,,,,Canada - Ontario - west of 94 deg 30 min West.,projected 2D,,,East,North,E,N,9001,,4608,17717,1999-07-24 00:00:00,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,,
-227,NAD27(76) / UTM zone 15N,,,,Canada - Ontario - 96deg West  to 90deg West.,projected 2D,,,East,North,E,N,9001,,4608,16015,1999-07-24 00:00:00,,EPSG,Supersedes NAD27 / UTM zone 15N (code 26715).,
-228,NAD27(76) / UTM zone 16N,,,,Canada - Ontario - 90deg West  to 84deg West.,projected 2D,,,East,North,E,N,9001,,4608,16016,1999-07-24 00:00:00,,EPSG,Supersedes NAD27 / UTM zone 16N (code 26716).,
-229,NAD27(76) / UTM zone 17N,,,,Canada - Ontario - 84deg West  to 78deg West.,projected 2D,,,East,North,E,N,9001,,4608,16017,1999-07-24 00:00:00,,EPSG,Supersedes NAD27 / UTM zone 17N (code 26717).,
-230,NAD27(76) / UTM zone 18N,,,,Canada - Ontario - east of 78 deg West.,projected 2D,,,East,North,E,N,9001,,4608,16018,1999-07-24 00:00:00,,EPSG,Supersedes NAD27 / UTM zone 18N (code 26718).,
-231,NAD27(CGQ77) / UTM zone 17N,CGQ77 / UTM zone 17N,,,Canada - Quebec - west of 78 deg West.,projected 2D,,,East,North,E,N,9001,,4609,16017,1999-07-24 00:00:00,,EPSG,Supersedes NAD27 / UTM zone 17N (code 26717).,
-232,NAD27(CGQ77) / UTM zone 18N,CGQ77 / UTM zone 18N,,,Canada - Quebec -78deg West  to 72deg West.,projected 2D,,,East,North,E,N,9001,,4609,16018,1999-07-24 00:00:00,,EPSG,Supersedes NAD27 / UTM zone 18N (code 26718).,
-233,NAD27(CGQ77) / UTM zone 19N,CGQ77 / UTM zone 19N,,,Canada - Quebec - 72deg West  to 66deg West.,projected 2D,,,East,North,E,N,9001,,4609,16019,1999-07-24 00:00:00,,EPSG,Supersedes NAD27 / UTM zone 19N (code 26719).,
-234,NAD27(CGQ77) / UTM zone 20N,CGQ77 / UTM zone 20N,,,Canada - Quebec - 66deg West  to 60deg West.,projected 2D,,,East,North,E,N,9001,,4609,16020,1999-07-24 00:00:00,,EPSG,Supersedes NAD27 / UTM zone 20N (code 26720).,
-235,NAD27(CGQ77) / UTM zone 21N,CGQ77 / UTM zone 21N,,,Canada - Quebec - east of 60deg West.,projected 2D,,,East,North,E,N,9001,,4609,16021,1999-07-24 00:00:00,,EPSG,Supersedes NAD27 / UTM zone 21N (code 26721).,
-236,NAD83(CSRS98) / New Brunswick Stereo,NAD83(98) / NB Stereo,,,Canada - New Brunswick,projected 2D,,,North,East,N,E,9001,,4140,19946,1999-10-20 00:00:00,Service New Brunswick Land and Information Standards Manual,EPSG,In use from 1999.,
-237,NAD83(CSRS98) / UTM zone 19N,NAD83(98) / UTM 19N,,,Canada - New Brunswick west of 66 deg West.,projected 2D,,,East,North,E,N,9001,,4140,16019,1999-10-20 00:00:00,Service New Brunswick Land and Information Standards Manual,EPSG,In use from 1999.,
-238,NAD83(CSRS98) / UTM zone 20N,NAD83(98) / UTM 20N,,,Canada - New Brunswick east of 66 deg West.,projected 2D,,,East,North,E,N,9001,,4140,16020,1999-10-20 00:00:00,Service New Brunswick Land and Information Standards Manual,EPSG,In use from 1999.,
-239,Israel / Israeli TM Grid,Israeli TM Grid,,,Israel.,projected 2D,,,East,North,E,N,9001,,4141,18204,1999-10-20 00:00:00,Survey of Israel.,EPSG,Supercedes Israeli CS Grid (EPSG code 28193).,
-240,Locodjo 1965 / UTM zone 30N,Locodjo 65 / UTM 30N,,,Cote D'Ivoire (Ivory Coast) east of 6 deg West.,projected 2D,,,East,North,E,N,9001,,4142,16030,1999-10-20 00:00:00,IGN Paris,EPSG,Superseded by Abidjan 87 / UTM 30N (EPSG code 241).,
-241,Abidjan 1987 / UTM zone 30N,Abidjan 87 / UTM 30N,,,Cote D'Ivoire (Ivory Coast) east of 6 deg West.,projected 2D,,,East,North,E,N,9001,,4143,16030,1999-10-20 00:00:00,IGN Paris,EPSG,Supersedes Locodjo 65 / UTM 30N (EPSG code 240).,
-242,Locodjo 1965 / UTM zone 29N,Locodjo 65 / UTM 29N,,,Cote D'Ivoire (Ivory Coast) west of 6 deg West.,projected 2D,,,East,North,E,N,9001,,4142,16029,1999-10-20 00:00:00,IGN Paris,EPSG,Superseded by Abidjan 87 / UTM 29N (EPSG code 243).,
-243,Abidjan 1987 / UTM zone 29N,Abidjan 87 / UTM 29N,,,Cote D'Ivoire (Ivory Coast) west of 6 deg West.,projected 2D,,,East,North,E,N,9001,,4143,16029,1999-10-20 00:00:00,IGN Paris,EPSG,Supersedes Locodjo 65 / UTM 29N (EPSG code 242).,
-244,Hanoi 1972 / Gauss-Kruger zone 18,Hanoi 72 / Gauss zone 18,,,Vietnam - west of 108 deg East.,projected 2D,,,North,East,X,Y,9001,,4147,16218,1999-10-20 00:00:00,,EPSG,Replaces use of Indian 1960 / UTM zone 48 after 1988.,
-245,Hanoi 1972 / Gauss-Kruger zone 19,Hanoi 72 / Gauss zone 19,,,Vietnam - east of 108 deg East.,projected 2D,,,North,East,X,Y,9001,,4147,16219,1999-10-20 00:00:00,,EPSG,Replaces use of Indian 1960 / UTM zone 48 after 1988.,
-246,Hartbeesthoek94 / Lo15,New S African CS zone 15,,,South Africa - Walvis Bay.,projected 2D,,,West,South,W,S,9001,,4148,17515,1999-10-20 00:00:00,,EPSG,,
-247,Hartbeesthoek94 / Lo17,New S African CS zone 17,,,South Africa - west of 18 deg East.,projected 2D,,,West,South,W,S,9001,,4148,17517,1999-10-20 00:00:00,,EPSG,,
-248,Hartbeesthoek94 / Lo19,New S African CS zone 19,,,South Africa - 18 to 20 deg East.,projected 2D,,,West,South,W,S,9001,,4148,17519,1999-10-20 00:00:00,,EPSG,,
-249,Hartbeesthoek94 / Lo21,New S African CS zone 21,,,South Africa - 20 to 22 deg East.,projected 2D,,,West,South,W,S,9001,,4148,17521,1999-10-20 00:00:00,,EPSG,,
-250,Hartbeesthoek94 / Lo23,New S African CS zone 23,,,South Africa - 22 to 24 deg East.,projected 2D,,,West,South,W,S,9001,,4148,17523,1999-10-20 00:00:00,,EPSG,,
-251,Hartbeesthoek94 / Lo25,New S African CS zone 25,,,Lestho  - west of 26 deg East; South Africa - 24 to 26 deg East.,projected 2D,,,West,South,W,S,9001,,4148,17525,1999-10-20 00:00:00,,EPSG,,
-252,Hartbeesthoek94 / Lo27,New S African CS zone 27,,,Lestho  - east of 26 deg East;  South Africa - 26 to 28 deg East.,projected 2D,,,West,South,W,S,9001,,4148,17527,1999-10-20 00:00:00,,EPSG,,
-253,Hartbeesthoek94 / Lo29,New S African CS zone 29,,,South Africa - 28 to 30 deg East.,projected 2D,,,West,South,W,S,9001,,4148,17529,1999-10-20 00:00:00,,EPSG,,
-254,Hartbeesthoek94 / Lo31,New S African CS zone 31,,,South Africa - 30 to 32 deg East;  Swaziland.,projected 2D,,,West,South,W,S,9001,,4148,17533,1999-10-20 00:00:00,,EPSG,,
-255,Hartbeesthoek94 / Lo33,New S African CS zone 33,,,South Africa - east of 32 deg East.,projected 2D,,,West,South,W,S,9001,,4148,17533,1999-10-20 00:00:00,,EPSG,,
-256,CH1903+ / LV95,LV95,,,Liechtenstein; Switzerland.,projected 2D,,,East,North,Y,X,9001,,4150,19950,1999-10-20 00:00:00,,EPSG,Supersedes CH1903/LV03 (code 21781).,
-257,Rassadiran / Nakhl e Taqi,,,,Iran - Taheri refinery site only.,projected 2D,,,East,North,E,N,9001,,4153,19951,1999-10-20 00:00:00,Total-Fina,EPSG,Used for terminal site only.,
-258,ED50(ED77) / UTM zone 38N,,,,Iran - west of 48deg East.,projected 2D,,,East,North,E,N,9001,,4154,16038,1999-10-20 00:00:00,,EPSG,,
-259,ED50(ED77) / UTM zone 39N,,,,Iran - 48deg to 54 deg East.,projected 2D,,,East,North,E,N,9001,,4154,16039,1999-10-20 00:00:00,,EPSG,,
-260,ED50(ED77) / UTM zone 40N,,,,Iran - 54deg to 60 deg East.,projected 2D,,,East,North,E,N,9001,,4154,16040,1999-10-20 00:00:00,,EPSG,,
-261,ED50(ED77) / UTM zone 41N,,,,Iran - east of 60deg East.,projected 2D,,,East,North,E,N,9001,,4154,16041,1999-10-20 00:00:00,,EPSG,,
-300,Madrid 1870 (Madrid) / Spain,,,,Spain,projected 2D,,,East,North,X,Y,9001,,4903,19921,1998-11-11 00:00:00,,EPSG,Superseded by ED50 / UTM after 1966.,
-2100,GGRS87 / Greek Grid,,,,Greece,projected 2D,,,East,North,E,N,9001,,4121,19930,1997-06-16 00:00:00,Geodesy Department; Public Petroleum Corporation of Greece.,EPSG,Oil industry uses ED50 / UTM zone 34N and ED50 / UTM zone 35N.,
-2200,ATS77 / New Brunswick Stereographic,ATS77 / NB Stereographic,,,Canada - New Brunswick,projected 2D,,,North,East,N,E,9001,,4122,19945,1999-10-20 00:00:00,New Brunswick Geographic Information Corporation land and water information standards manual.,EPSG,In use from 1979.  To be phased out in late 1990's.,99.61
-2219,ATS77 / UTM zone 19N,,,,Canada - New Brunswick - west of 66 deg W.,projected 2D,,,East,North,E,N,9001,,4122,16019,1997-07-22 00:00:00,New Brunswick Geographic Information Corporation land and water information standards manual.,EPSG,In use from 1979.  To be phased out in late 1990's.,
-2220,ATS77 / UTM zone 20N,,,,Canada - New Brunswick - east of 66 deg W.; Canada - Nova Scotia; Canada - Prince Edward Island.,projected 2D,,,East,North,E,N,9001,,4122,16020,1997-07-22 00:00:00,New Brunswick Geographic Information Corporation land and water information standards manual.,EPSG,In use from 1979.  To be phased out in late 1990's.,
-2290,ATS77 / Prince Edward Isl. Stereographic,ATS77 / PEI Stereo,,,Canada - Prince Edward Island,projected 2D,,,East,North,E(X),N(Y),9001,,4122,19933,1997-11-13 00:00:00,Geomatics Centre; Nova Scotia Ministry of Housing and Municipal Affairs.,EPSG,In use from 1979.  To be phased out in late 1990's.,
-2294,ATS77 / MTM Nova Scotia zone 4,ATS77 / MTM NS zone 4,,,Canada - Nova Scotia - east of 63 deg West.,projected 2D,,,East,North,E,N,9001,,4122,17794,1997-11-13 00:00:00,Geomatics Centre; Nova Scotia Ministry of Housing and Municipal Affairs.,EPSG,In use from 1979.  To be phased out in late 1990's.,
-2295,ATS77 / MTM Nova Scotia zone 5,ATS77 / MTM NS zone 5,,,Canada - Nova Scotia - west of 63 deg West.,projected 2D,,,East,North,E,N,9001,,4122,17795,1997-11-13 00:00:00,Geomatics Centre; Nova Scotia Ministry of Housing and Municipal Affairs.,EPSG,In use from 1979.  To be phased out in late 1990's.,
-2391,KKJ / Finland zone 1,,,,Finland - west of 22deg 30min E.,projected 2D,,,North,East,X,Y,9001,,4123,18191,1997-07-22 00:00:00,www.nls.fi/maa/papers/kkj.html,EPSG,,
-2392,KKJ / Finland zone 2,,,,Finland - 22deg 30 min to 25deg 30min E.,projected 2D,,,North,East,X,Y,9001,,4123,18192,1997-07-22 00:00:00,www.nls.fi/maa/papers/kkj.html,EPSG,,
-2393,KKJ / Finland Uniform Coordinate System,KKJ / Finland zone 3,,,Finland; Finland - 25 deg 30min E to 28deg 30min E.,projected 2D,,,North,East,X,Y,9001,,4123,18193,1997-07-22 00:00:00,www.nls.fi/maa/papers/kkj.html,EPSG,Known as Uniform Coordinate System when used over all country and also as Basic Coordinate System zone 3 at larger scales.,
-2394,KKJ / Finland zone 4,,,,Finland - east of 28deg 30 min E.,projected 2D,,,North,East,X,Y,9001,,4123,18194,1997-07-22 00:00:00,www.nls.fi/maa/papers/kkj.html,EPSG,,
-2400,RT90 2.5 gon W,,,,Sweden,projected 2D,,,North,East,X,Y,9001,,4124,19929,1997-11-13 00:00:00,National Land Survey of Sweden,EPSG,,
-2550,Samboja / UTM zone 50S,,,,Indonesia - east Kalimantan - Mahakam delta area.,projected 2D,,,East,North,E,N,9001,,4125,16150,1997-11-13 00:00:00,,EPSG,,
-2600,Lietuvos Koordinoei Sistema 1994,LKS94,,,Lithuania,projected 2D,,,North,East,X,Y,9001,,4126,19934,1998-03-12 00:00:00,,EPSG,,
-2736,Tete / UTM zone 36S,,,,Mozambique - west of 36 deg E.,projected 2D,,,East,North,E,N,9001,,4127,16136,1998-04-16 00:00:00,Direc��o Nacional de Geografia e Cadastral (DINAGECA).,EPSG,,
-2737,Tete / UTM zone 37S,,,,Mozambique - east of 36 deg E,projected 2D,,,East,North,E,N,9001,,4127,16137,1998-04-16 00:00:00,Direc��o Nacional de Geografia e Cadastral (DINAGECA).,EPSG,,
-3036,Moznet / UTM zone 36S,,,,Mozambique - west of 36 deg E.,projected 2D,,,East,North,E,N,9001,,4130,16136,1998-04-16 00:00:00,Direc��o Nacional de Geografia e Cadastral (DINAGECA).,EPSG,,
-3037,Moznet / UTM zone 37S,,,,Mozambique - east of 36 deg E,projected 2D,,,East,North,E,N,9001,,4130,16137,1998-04-16 00:00:00,Direc��o Nacional de Geografia e Cadastral (DINAGECA).,EPSG,,
-3148,Indian 1960 / UTM zone 48N,,,,Cambodia; Vietnam west of 108deg East.,projected 2D,,,East,North,E,N,9001,,4131,16048,1998-11-11 00:00:00,,EPSG,In Vietnam superseded by Hanoi 72 / Gauss zone 18 from 1988 onwards.,
-3149,Indian 1960 / UTM zone 49N,,,,Vietnam east of 108deg East.,projected 2D,,,East,North,E,N,9001,,4131,16049,1998-11-11 00:00:00,,EPSG,Superseded by Hanoi 72 / Gauss zone 18 from 1988 onwards.,
-3176,Indian 1960 / TM 106 NE,,,,Vietnam - offshore.,projected 2D,,,East,North,E,N,9001,,4131,16506,1998-11-11 00:00:00,Petrovietnam,EPSG,Used by Petrovietnam for offshore block 15.,
-3200,FD58 / Iraq zone,,,,Iran - Gulf coast and Arwaz areas.,projected 2D,,,East,North,E,N,9001,,4132,19906,1998-11-11 00:00:00,IOEPC records.,EPSG,,
-3300,Estonian Coordinate System of 1992,,,,Estonia.,projected 2D,,,North,East,X,Y,9001,,4133,19938,1998-12-14 00:00:00,http://www.geo.ut.ee/~raivo/estcoord.html,EPSG,Used for 1:20000 and larger scale mapping.,
-3439,PSD93 / UTM zone 39N,,,,Oman - west of 54 deg East.,projected 2D,,,East,North,E,N,9001,,4134,16039,1999-04-22 00:00:00,Petroleum Development Oman,EPSG,Supersedes Fahud / UTM zone 39N projCS (code 23239). Maximum differences to Fahud adjustment are 20 metres.,
-3440,PSD93 / UTM zone 40N,,,,Oman - east of 54 deg East.,projected 2D,,,East,North,E,N,9001,,4134,16040,1999-04-22 00:00:00,Petroleum Development Oman,EPSG,Supersedes Fahud / UTM zone 40N projCS (code 23240). Maximum differences to Fahud adjustment are 20 metres.,
-3561,Old Hawaiian / Hawaii zone 1,Old Hawaiian / SP zone 1,,,United States (USA) - Hawaii - island of Hawaii.,projected 2D,,,East,North,X,Y,9003,,4135,15101,1999-05-24 00:00:00,,EPSG,Sometimes erroneously referred to as NAD27 / Hawaii zone 1.,99.322
-3562,Old Hawaiian / Hawaii zone 2,Old Hawaiian / SP zone 2,,,United States (USA) - Hawaii - Maui; Kahoolawe; Lanai; Molokai.,projected 2D,,,East,North,X,Y,9003,,4135,15102,1999-05-24 00:00:00,,EPSG,Sometimes erroneously referred to as NAD27 / Hawaii zone 2.,99.322
-3563,Old Hawaiian / Hawaii zone 3,Old Hawaiian / SP zone 3,,,United States (USA) - Hawaii - Oahu.,projected 2D,,,East,North,X,Y,9003,,4135,15103,1999-05-24 00:00:00,,EPSG,Sometimes erroneously referred to as NAD27 / Hawaii zone 3.,99.322
-3564,Old Hawaiian / Hawaii zone 4,Old Hawaiian / SP zone 4,,,United States (USA) - Hawaii - Kauai.,projected 2D,,,East,North,X,Y,9003,,4135,15104,1999-05-24 00:00:00,,EPSG,Sometimes erroneously referred to as NAD27 / Hawaii zone 4.,99.322
-3565,Old Hawaiian / Hawaii zone 5,Old Hawaiian / SP zone 5,,,United States (USA) - Hawaii - Niihau.,projected 2D,,,East,North,X,Y,9003,,4135,15105,1999-05-24 00:00:00,,EPSG,Sometimes erroneously referred to as NAD27 / Hawaii zone 5.,99.322
-3920,Puerto Rico / UTM zone 20N,,,,British Virgin Islands (civilian).,projected 2D,,,East,North,E,N,9001,,4139,16020,1999-04-22 00:00:00,Ordnance Survey of Great Britain,EPSG,NAD27 / UTM zone 20 N (code 26720) used for military purposes.,
-3991,Puerto Rico State Plane CS of 1927,Puerto Rico SPCS 27,,,Puerto Rico.,projected 2D,,,East,North,X,Y,9003,,4139,15201,1999-05-24 00:00:00,,EPSG,Sometimes erroneously referred to as NAD27 / Puerto Rico State Plane CS.,99.323
-3992,Puerto Rico / St. Croix,,,,US Virgin Islands (U.S.).,projected 2D,,,East,North,X,Y,9003,,4139,15202,1999-05-24 00:00:00,,EPSG,Sometimes erroneously referred to as NAD27 / St. Croix State Plane CS.,99.323
-4001,Unknown datum based upon ellipsoid 7001,,,,,geographic 2D,6001,8901,North,East,Lat,Long,,9108,,,1996-09-12 00:00:00,,EPSG,Not recommended.  Use only in cases where geodetic datum unknown.,96.08
-4002,Unknown datum based upon ellipsoid 7002,,,,,geographic 2D,6002,8901,North,East,Lat,Long,,9108,,,1996-09-12 00:00:00,,EPSG,Not recommended.  Use only in cases where geodetic datum unknown.,96.08
-4003,Unknown datum based upon ellipsoid 7003,,,,,geographic 2D,6003,8901,North,East,Lat,Long,,9108,,,1996-09-12 00:00:00,,EPSG,Not recommended.  Use only in cases where geodetic datum unknown.,96.08
-4004,Unknown datum based upon ellipsoid 7004,,,,,geographic 2D,6004,8901,North,East,Lat,Long,,9108,,,1996-09-12 00:00:00,,EPSG,Not recommended.  Use only in cases where geodetic datum unknown.,96.08
-4005,Unknown datum based upon ellipsoid 7005,,,,,geographic 2D,6005,8901,North,East,Lat,Long,,9108,,,1996-09-12 00:00:00,,EPSG,Not recommended.  Use only in cases where geodetic datum unknown.,96.08
-4006,Unknown datum based upon ellipsoid 7006,,,,,geographic 2D,6006,8901,North,East,Lat,Long,,9108,,,1996-09-12 00:00:00,,EPSG,Not recommended.  Use only in cases where geodetic datum unknown.,96.08
-4007,Unknown datum based upon ellipsoid 7007,,,,,geographic 2D,6007,8901,North,East,Lat,Long,,9108,,,1996-09-12 00:00:00,,EPSG,Not recommended.  Use only in cases where geodetic datum unknown.,96.08
-4008,Unknown datum based upon ellipsoid 7008,,,,,geographic 2D,6008,8901,North,East,Lat,Long,,9108,,,1996-09-12 00:00:00,,EPSG,Not recommended.  Use only in cases where geodetic datum unknown.,96.08
-4009,Unknown datum based upon ellipsoid 7009,,,,,geographic 2D,6009,8901,North,East,Lat,Long,,9108,,,1996-09-12 00:00:00,,EPSG,Not recommended.  Use only in cases where geodetic datum unknown.,96.08
-4010,Unknown datum based upon ellipsoid 7010,,,,,geographic 2D,6010,8901,North,East,Lat,Long,,9108,,,1996-09-12 00:00:00,,EPSG,Not recommended.  Use only in cases where geodetic datum unknown.,96.08
-4011,Unknown datum based upon ellipsoid 7011,,,,,geographic 2D,6011,8901,North,East,Lat,Long,,9108,,,1996-09-12 00:00:00,,EPSG,Not recommended.  Use only in cases where geodetic datum unknown.,96.08
-4012,Unknown datum based upon ellipsoid 7012,,,,,geographic 2D,6012,8901,North,East,Lat,Long,,9108,,,1996-09-12 00:00:00,,EPSG,Not recommended.  Use only in cases where geodetic datum unknown.,96.08
-4013,Unknown datum based upon ellipsoid 7013,,,,,geographic 2D,6013,8901,North,East,Lat,Long,,9108,,,1996-09-12 00:00:00,,EPSG,Not recommended.  Use only in cases where geodetic datum unknown.,96.08
-4014,Unknown datum based upon ellipsoid 7014,,,,,geographic 2D,6014,8901,North,East,Lat,Long,,9108,,,1996-09-12 00:00:00,,EPSG,Not recommended.  Use only in cases where geodetic datum unknown.,96.08
-4015,Unknown datum based upon ellipsoid 7015,,,,,geographic 2D,6015,8901,North,East,Lat,Long,,9108,,,1996-09-12 00:00:00,,EPSG,Not recommended.  Use only in cases where geodetic datum unknown.,96.08
-4016,Unknown datum based upon ellipsoid 7016,,,,,geographic 2D,6016,8901,North,East,Lat,Long,,9108,,,1996-09-12 00:00:00,,EPSG,Not recommended.  Use only in cases where geodetic datum unknown.,96.08
-4017,Unknown datum based upon ellipsoid 7017,,,,,geographic 2D,6017,8901,North,East,Lat,Long,,9108,,,1996-09-12 00:00:00,,EPSG,Not recommended.  Use only in cases where geodetic datum unknown.,96.08
-4018,Unknown datum based upon ellipsoid 7018,,,,,geographic 2D,6018,8901,North,East,Lat,Long,,9108,,,1996-09-12 00:00:00,,EPSG,Not recommended.  Use only in cases where geodetic datum unknown.,96.08
-4019,Unknown datum based upon ellipsoid 7019,,,,,geographic 2D,6019,8901,North,East,Lat,Long,,9108,,,1996-09-12 00:00:00,,EPSG,Not recommended.  Use only in cases where geodetic datum unknown.,96.08
-4020,Unknown datum based upon ellipsoid 7020,,,,,geographic 2D,6020,8901,North,East,Lat,Long,,9108,,,1996-09-12 00:00:00,,EPSG,Not recommended.  Use only in cases where geodetic datum unknown.,96.08
-4021,Unknown datum based upon ellipsoid 7021,,,,,geographic 2D,6021,8901,North,East,Lat,Long,,9108,,,1996-09-12 00:00:00,,EPSG,Not recommended.  Use only in cases where geodetic datum unknown.,96.08
-4022,Unknown datum based upon ellipsoid 7022,,,,,geographic 2D,6022,8901,North,East,Lat,Long,,9108,,,1996-09-12 00:00:00,,EPSG,Not recommended.  Use only in cases where geodetic datum unknown.,96.08
-4024,Unknown datum based upon ellipsoid 7024,,,,,geographic 2D,6024,8901,North,East,Lat,Long,,9108,,,1996-09-12 00:00:00,,EPSG,Not recommended.  Use only in cases where geodetic datum unknown.,96.08
-4025,Unknown datum based upon ellipsoid 7025,,,,,geographic 2D,6025,8901,North,East,Lat,Long,,9108,,,1996-09-12 00:00:00,,EPSG,Not recommended.  Use only in cases where geodetic datum unknown.,96.08
-4027,Unknown datum based upon ellipsoid 7027,,,,,geographic 2D,6027,8901,North,East,Lat,Long,,9108,,,1996-09-12 00:00:00,,EPSG,Not recommended.  Use only in cases where geodetic datum unknown.,96.08
-4028,Unknown datum based upon ellipsoid 7028,,,,,geographic 2D,6028,8901,North,East,Lat,Long,,9108,,,1996-09-12 00:00:00,,EPSG,Not recommended.  Use only in cases where geodetic datum unknown.,96.08
-4029,Unknown datum based upon ellipsoid 7029,,,,,geographic 2D,6029,8901,North,East,Lat,Long,,9108,,,1996-09-12 00:00:00,,EPSG,Not recommended.  Use only in cases where geodetic datum unknown.,96.08
-4030,Unknown datum based upon ellipsoid 7030,,,,,geographic 2D,6030,8901,North,East,Lat,Long,,9108,,,1996-09-12 00:00:00,,EPSG,Not recommended.  Use only in cases where geodetic datum unknown.,96.08
-4031,Unknown datum based upon ellipsoid 7031,,,,,geographic 2D,6031,8901,North,East,Lat,Long,,9108,,,1996-09-12 00:00:00,,EPSG,Not recommended.  Use only in cases where geodetic datum unknown.,96.08
-4032,Unknown datum based upon ellipsoid 7032,,,,,geographic 2D,6032,8901,North,East,Lat,Long,,9108,,,1996-09-12 00:00:00,,EPSG,Not recommended.  Use only in cases where geodetic datum unknown.,96.08
-4033,Unknown datum based upon ellipsoid 7033,,,,,geographic 2D,6033,8901,North,East,Lat,Long,,9108,,,1996-09-12 00:00:00,,EPSG,Not recommended.  Use only in cases where geodetic datum unknown.,96.08
-4034,Unknown datum based upon ellipsoid 7034,,,,,geographic 2D,6034,8901,North,East,Lat,Long,,9108,,,1996-09-12 00:00:00,,EPSG,Not recommended.  Use only in cases where geodetic datum unknown.,96.08
-4035,Unknown datum based upon ellipsoid 7035,,,,,geographic 2D,6035,8901,North,East,Lat,Long,,9108,,,1996-09-12 00:00:00,,EPSG,Not recommended.  Use only in cases where geodetic datum unknown.,96.08
-4036,Unknown datum based upon ellipsoid 7036,,,,,geographic 2D,6036,8901,North,East,Lat,Long,,9108,,,1996-09-12 00:00:00,,EPSG,Not recommended.  Use only in cases where geodetic datum unknown.,
-4041,Unknown datum based upon ellipsoid 7041,,,,,geographic 2D,6041,8901,North,East,Lat,Long,,9108,,,1999-10-20 00:00:00,,EPSG,Not recommended.  Use only in cases where geodetic datum unknown.,
-4042,Unknown datum based upon ellipsoid 7042,,,,,geographic 2D,6042,8901,North,East,Lat,Long,,9108,,,1999-10-20 00:00:00,,EPSG,Not recommended.  Use only in cases where geodetic datum unknown.,
-4043,Unknown datum based upon ellipsoid 7043,,,,,geographic 2D,6043,8901,North,East,Lat,Long,,9108,,,1999-10-20 00:00:00,,EPSG,Not recommended.  Use only in cases where geodetic datum unknown.,
-4044,Unknown datum based upon ellipsoid 7044,,,,,geographic 2D,6044,8901,North,East,Lat,Long,,9108,,,1999-10-20 00:00:00,,EPSG,Not recommended.  Use only in cases where geodetic datum unknown.,
-4045,Unknown datum based upon ellipsoid 7045,,,,,geographic 2D,6045,8901,North,East,Lat,Long,,9108,,,1999-10-20 00:00:00,,EPSG,Not recommended.  Use only in cases where geodetic datum unknown.,
-4120,Greek,,,,Greece,geographic 2D,6120,8901,North,East,Lat,Long,,9108,,,1997-06-16 00:00:00,Topography Department; National Technical University of Greece.,EPSG,,
-4121,GGRS87,,,,Greece,geographic 2D,6121,8901,North,East,Lat,Long,,9108,,,1997-06-16 00:00:00,Geodesy Department; Public Petroleum Corporation of Greece.,EPSG,,
-4122,ATS77,,,,Canada - New Brunswick; Canada - Nova Scotia - onshore; Canada - Prince Edward Island.,geographic 2D,6122,8901,North,East,Lat,Long,,9108,,,1997-07-22 00:00:00,New Brunswick Geographic Information Corporation land and water information standards manual.,EPSG,In use from 1979.  To be phased out in late 1990's.,
-4123,KKJ,,,,Finland,geographic 2D,6123,8901,North,East,Lat,Long,,9108,,,1997-07-22 00:00:00,www.nls.fi/maa/papers/kkj.html,EPSG,,
-4124,RT90,,,,Sweden,geographic 2D,6124,8901,North,East,Lat,Long,,9108,,,1997-11-13 00:00:00,National Land Survey of Sweden,EPSG,,
-4125,Samboja,,,,Indonesia - east Kalimantan - Mahakam delta area.,geographic 2D,6125,8901,North,East,Lat,Long,,9108,,,1997-11-13 00:00:00,,EPSG,,
-4126,LKS94 (ETRS89),,,,Lithuania,geographic 2D,6126,8901,North,East,Lat,Long,,9108,,,1998-03-13 00:00:00,,EPSG,,
-4127,Tete,,,,Mozambique,geographic 2D,6127,8901,North,East,Lat,Long,,9108,,,1998-04-16 00:00:00,Direc��o Nacional de Geografia e Cadastral (DINAGECA).,EPSG,,
-4128,Madzansua,,,,Mozambique - west,geographic 2D,6128,8901,North,East,Lat,Long,,9108,,,1998-04-16 00:00:00,Direc��o Nacional de Geografia e Cadastral (DINAGECA).,EPSG,Superseded by values transformed to Tete geogCS (code 4127).,
-4129,Observatario,,,,Mozambique - south,geographic 2D,6129,8901,North,East,Lat,Long,,9108,,,1998-04-16 00:00:00,Direc��o Nacional de Geografia e Cadastral (DINAGECA).,EPSG,Superseded by values transformed to Tete geogCS (code 4127).,
-4130,Moznet,,,,Mozambique,geographic 2D,6130,8901,North,East,Lat,Long,,9108,,,1998-04-16 00:00:00,Direc��o Nacional de Geografia e Cadastral (DINAGECA).,EPSG,,
-4131,Indian 1960,,,,Cambodia; Vietnam,geographic 2D,6131,8901,North,East,Lat,Long,,9108,,,1998-11-11 00:00:00,,EPSG,,
-4132,FD58,,,,Iran - Gulf coast and Arwaz areas.,geographic 2D,6132,8901,North,East,Lat,Long,,9108,,,1998-11-11 00:00:00,IOEPC records.,EPSG,,
-4133,EST92,,,,Estonia,geographic 2D,6133,8901,North,East,Lat,Long,,9108,,,1998-12-14 00:00:00,http://www.geo.ut.ee/~raivo/estcoord.html,EPSG,Densification of ETRS89 as established during 1992 Baltic campaign.,
-4134,PDO Survey Datum 1993,PSD93,,,Oman,geographic 2D,6134,8901,North,East,Lat,Long,,9108,,,1999-04-22 00:00:00,Petroleum Development Oman,EPSG,Supersedes Fahud geogCS (code 4232). Maximum differences to Fahud adjustment are 20 metres.,
-4135,Old Hawaiian,,,,United States (USA) - Hawaii,geographic 2D,6135,8901,North,East,Lat,Long,,9108,,,1999-05-24 00:00:00,,EPSG,Note: this coordinate system includes longitudes which are POSITIVE EAST.,
-4136,St. Lawrence Island,,,,United States (USA) - Alaska - St. Lawrence Island,geographic 2D,6136,8901,North,East,Lat,Long,,9108,,,1999-05-24 00:00:00,,EPSG,Note: this coordinate system includes longitudes which are POSITIVE EAST.,
-4137,St. Paul Island,,,,United States (USA) - Alaska - St. Paul Island,geographic 2D,6137,8901,North,East,Lat,Long,,9108,,,1999-05-24 00:00:00,,EPSG,Note: this coordinate system includes longitudes which are POSITIVE EAST.,
-4138,St. George Island,,,,United States (USA) - Alaska - St. George Island,geographic 2D,6138,8901,North,East,Lat,Long,,9108,,,1999-05-24 00:00:00,,EPSG,Note: this coordinate system includes longitudes which are POSITIVE EAST.,
-4139,Puerto Rico,,,,Puerto Rico; Virgin Islands (British); Virgin Islands (U.S.).,geographic 2D,6139,8901,North,East,Lat,Long,,9108,,,1999-05-24 00:00:00,,EPSG,Used for civilian purposes.  NAD27 (code 4267) used for military purposes.  Note: this coordinate system includes longitudes which are POSITIVE EAST.,
-4140,NAD83(CSRS98),,,,Canada - New Brunswick,geographic 2D,6140,8901,North,East,Lat,Long,,9108,,,1999-10-20 00:00:00,Service New Brunswick Land and Information Standards Manual,EPSG,Supersedes ATS77 from 1999 in New Brunswick.,
-4141,Israel,,,,Israel.,geographic 2D,6141,8901,North,East,Lat,Long,,9108,,,1999-10-20 00:00:00,Survey of Israel,EPSG,Supersedes Palestine 1923 in Israel.,
-4142,Locodjo 1965,,,,Cote D'Ivoire (Ivory Coast).,geographic 2D,6142,8901,North,East,Lat,Long,,9108,,,1999-10-20 00:00:00,IGN Paris,EPSG,Superseded by Abidjan 1987 (EPSG code 4143).,
-4143,Abidjan 1987,,,,Cote D'Ivoire (Ivory Coast).,geographic 2D,6143,8901,North,East,Lat,Long,,9108,,,1999-10-20 00:00:00,IGN Paris,EPSG,Supersedes Locodjo 1967 (EPSG code 4142).,
-4144,Kalianpur 1937,,,,Bangladesh; India; Pakistan,geographic 2D,6144,8901,North,East,Lat,Long,,9108,,,1999-10-20 00:00:00,"G. Bomford; \"The Re-adjustment of the Indian Triangulation\"; Survey of India Professional Paper 28; 1939.",EPSG,Adopts 1937 metric conversion of 0.30479841 metres per Indian foot.,
-4145,Kalianpur 1962,,,,Pakistan,geographic 2D,6145,8901,North,East,Lat,Long,,9108,,,1999-10-20 00:00:00,,EPSG,Adopts 1962 metric conversion of 0.3047996 metres per Indian foot.,
-4146,Kalianpur 1975,,,,India,geographic 2D,6146,8901,North,East,Lat,Long,,9108,,,1999-10-20 00:00:00,,EPSG,Adopts 1975 metric conversion of 0.3047995 metres per Indian foot.,
-4147,Hanoi 1972,,,,Vietnam,geographic 2D,6147,8901,North,East,Lat,Long,,9108,,,1999-10-20 00:00:00,,EPSG,,
-4148,Hartbeesthoek94,,,,South Africa.,geographic 2D,6148,8901,North,East,Lat,Long,,9108,,,1999-10-22 00:00:00,,EPSG,Supercedes Cape (code 4222) from 1999.,
-4149,CH1903,,,,Liechtenstein; Switzerland,geographic 2D,6149,8901,North,East,Lat,Long,,9108,,,1999-10-20 00:00:00,,EPSG,,
-4150,CH1903+,,,,Liechtenstein; Switzerland,geographic 2D,6150,8901,North,East,Lat,Long,,9108,,,1999-10-20 00:00:00,,EPSG,,
-4151,CHTRF95,,,,Liechtenstein; Switzerland,geographic 2D,6151,8901,North,East,Lat,Long,,9108,,,1999-10-20 00:00:00,,EPSG,,
-4152,NAD83(HARN),,,,United States (US),geographic 2D,6152,8901,North,East,Lat,Long,,9108,,,1999-10-20 00:00:00,National Geodetic Survey,EPSG,,
-4153,Rassadiran,,,,Iran - Taheri refinery site only.,geographic 2D,6153,8901,North,East,Lat,Long,,9108,,,1999-10-20 00:00:00,,EPSG,Used only for onshore terminal site.,
-4154,ED50(ED77),,,,Iran,geographic 2D,6154,8901,North,East,Lat,Long,,9108,,,1999-10-20 00:00:00,,EPSG,,
-4200,Pulkovo 1995,,,,Russia,geographic 2D,6200,8901,North,East,Lat,Long,,9108,,,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-4201,Adindan,,,,Ethiopia; Sudan,geographic 2D,6201,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4202,AGD66,,,,Australia; Papua New Guinea,geographic 2D,6202,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4203,AGD84,,,,Australia,geographic 2D,6203,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4204,Ain el Abd,,,,Kuwait; Saudi Arabia,geographic 2D,6204,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4205,Afgooye,,,,Somalia,geographic 2D,6205,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4206,Agadez,,,,Niger,geographic 2D,6206,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4207,Lisbon,,,,Portugal - onshore,geographic 2D,6207,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,Instituto Geografico e Cadastral; Lisbon,EPSG,,
-4208,Aratu,,,,Brazil - coastal areas south of 2 deg 55 min S.,geographic 2D,6208,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4209,Arc 1950,,,,Botswana; Malawi; Zambia; Zimbabwe.,geographic 2D,6209,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4210,Arc 1960,,,,Kenya; Tanzania; Uganda.,geographic 2D,6210,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4211,Batavia,,,,Indonesia - Java,geographic 2D,6211,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4212,Barbados 1938,,,,Barbados,geographic 2D,6212,8901,North,East,Lat,Long,,9108,,,1999-04-22 00:00:00,,EPSG,,99.171
-4213,Beduaram,,,,Niger,geographic 2D,6213,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4214,Beijing 1954,,,,China,geographic 2D,6214,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4215,Belge 1950,,,,Belgium - onshore,geographic 2D,6215,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4216,Bermuda 1957,,,,Bermuda,geographic 2D,6216,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4218,Bogota,,,,Colombia,geographic 2D,6218,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4219,Bukit Rimpah,,,,Indonesia - Banga & Belitung Islands,geographic 2D,6219,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4220,Camacupa,,,,Angola,geographic 2D,6220,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4221,Campo Inchauspe,,,,Argentina,geographic 2D,6221,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4222,Cape,,,,Botswana; South Africa.,geographic 2D,6222,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,Superceded by Hartbeesthoek94 from 1999.,
-4223,Carthage,,,,Tunisia,geographic 2D,6223,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4224,Chua,,,,Brazil,geographic 2D,6224,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4225,Corrego Alegre,,,,Brazil - NE coastal area between 45 deg W and 40 deg W.,geographic 2D,6225,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4226,Cote d'Ivoire,,,,Cote d'Ivoire,geographic 2D,6226,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4227,Deir ez Zor,,,,Syrian Arab Republic,geographic 2D,6227,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4228,Douala,,,,Cameroon,geographic 2D,6228,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4229,Egypt 1907,,,,Egypt,geographic 2D,6229,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4230,ED50,,,,Europe - west - Spain; France offshore; United Kingdom UKCS offshore; Netherlands offshore; Germany offshore North Sea; Denmark; Norway; Turkey.,geographic 2D,6230,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4231,ED87,,,,Europe - west.,geographic 2D,6231,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4232,Fahud,,,,Oman,geographic 2D,6232,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,Since 1993 superseded by PSD93 geogCS (code 4134). Maximum differences to Fahud adjustment are 20 metres.,
-4233,Gandajika 1970,,,,Maldives,geographic 2D,6233,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4234,Garoua,,,,Cameroon,geographic 2D,6234,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4235,Guyane Francaise,,,,French Guyana,geographic 2D,6235,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4236,Hu Tzu Shan,,,,Taiwan,geographic 2D,6236,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4237,HD72,,,,Hungary,geographic 2D,6237,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4238,ID74,,,,Indonesia,geographic 2D,6238,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4239,Indian 1954,,,,Myanmar (Burma); Thailand,geographic 2D,6239,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4240,Indian 1975,,,,Thailand,geographic 2D,6240,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4241,Jamaica 1875,,,,Jamaica,geographic 2D,6241,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4242,JAD69,,,,Jamaica,geographic 2D,6242,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4243,Kalianpur 1880,,,,Bangladesh; India; Myanmar (Burma); Pakistan,geographic 2D,6243,8901,North,East,Lat,Long,,9108,,,1999-10-20 00:00:00,"G. Bomford; \"The Re-adjustment of the Indian Triangulation\"; Survey of India Professional Paper 28; 1939.",EPSG,,97.23
-4244,Kandawala,,,,Sri Lanka,geographic 2D,6244,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4245,Kertau,,,,Malaysia - West Malaysia; Singapore,geographic 2D,6245,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,Adopts metric conversion of 39.370113 inches per metre.,
-4246,KOC,,,,Kuwait,geographic 2D,6246,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4247,La Canoa,,,,Venezuela,geographic 2D,6247,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,PSAD56 uses same origin.,
-4248,PSAD56,,,,Bolivia; Ecuador; Peru; [Venezuela],geographic 2D,6248,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,Origin is same as La Canoa.  In Venezuela known as La Canoa.,
-4249,Lake,,,,Venezuela - Lake Maracaibo area,geographic 2D,6249,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4250,Leigon,,,,Ghana,geographic 2D,6250,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4251,Liberia 1964,,,,Liberia,geographic 2D,6251,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4252,Lome,,,,Togo,geographic 2D,6252,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4253,Luzon 1911,,,,Philippines,geographic 2D,6253,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4254,Hito XVIII 1963,,,,Chile - Tierra del Fuego,geographic 2D,6254,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4255,Herat North,,,,Afghanistan,geographic 2D,6255,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4256,Mahe 1971,,,,Seychelles,geographic 2D,6256,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4257,Makassar,,,,Indonesia - south west Sulawesi,geographic 2D,6257,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4258,ETRF89,,,,Europe - Hungary; Norway; Sweden; United Kingdom (UKCS) offshore.,geographic 2D,6258,8901,North,East,Lat,Long,,9108,,,1999-04-22 00:00:00,Norwegian Geodetic Institute geodetic publication 1990:1,EPSG,,97.11  99.11
-4259,Malongo 1987,,,,Angola - Cabinda offshore,geographic 2D,6259,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,Chevron Petroleum Technology,EPSG,Offshore extension of Mhast GeogCS (4264) using Transit translocation from Station Y at Malongo base camp.,
-4260,Manoca,,,,Cameroon,geographic 2D,6260,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4261,Merchich,,,,Morocco,geographic 2D,6261,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4262,Massawa,,,,Eritrea,geographic 2D,6262,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4263,Minna,,,,Nigeria,geographic 2D,6263,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4264,Mhast,,,,Angola - Cabinda,geographic 2D,6264,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4265,Monte Mario,,,,Italy,geographic 2D,6265,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4266,M'poraloko,,,,Gabon,geographic 2D,6266,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4267,NAD27,,,,North and central America - Canada; Mexico; United States (USA).,geographic 2D,6267,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,Note: this coordinate system includes longitudes which are POSITIVE EAST.  Superseded by NAD27(76) (code 4608) in Ontario and CGQ77 (code 4609) in Quebec.,99.04
-4268,NAD27 Michigan,NAD Michigan,,,United States (USA) - Michigan,geographic 2D,6268,8901,North,East,Lat,Long,,9108,,,1996-12-12 00:00:00,,EPSG,Ellipsoid taken to be 800ft above geoid. Note: this coordinate system includes longitudes which are POSITIVE EAST.,96.28
-4269,NAD83,,,,Canada: Greenland; Mexico; United States (USA),geographic 2D,6269,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,Note: this coordinate system includes longitudes which are POSITIVE EAST.,
-4270,Nahrwan 1967,,,,Arabian Gulf; Kuwait; United Arab Emirates (UAE) - Abu Dhabi; Dubai; Sharjah; Ajman; Fujairah; Ras Al Kaimah; Umm Al Qaiwain.,geographic 2D,6270,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4271,Naparima 1972,,,,Trinidad and Tobago,geographic 2D,6271,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4272,GD49,,,,New Zealand,geographic 2D,6272,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4273,NGO 1948,,,,Norway - onshore,geographic 2D,6273,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4274,Datum 73,,,,Portugal - onshore,geographic 2D,6274,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,Instituto Geografico e Cadastral; Lisbon,EPSG,,
-4275,NTF,,,,France - onshore,geographic 2D,6275,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4276,NSWC 9Z-2,,,,World,geographic 2D,6276,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4277,OSGB 1936,,,,United Kingdom (UK) - Great Britain - England  Scotland  Wales - onshore; Isle of Man.,geographic 2D,6277,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4278,OSGB70,,,,United Kingdom (UK) - Great Britain - England  Scotland  wales - onshore,geographic 2D,6278,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4279,OS(SN)80,,,,Ireland - onshore; United Kingdom (UK) - England  Scotland  Wales  Northern Ireland - onshore E,geographic 2D,6279,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4280,Padang,,,,Indonesia - Sumatra,geographic 2D,6280,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4281,Palestine 1923,,,,Israel; Jordan; Lebanon,geographic 2D,6281,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4282,Pointe Noire,,,,Congo,geographic 2D,6282,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4283,GDA94,,,,Australia,geographic 2D,6283,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,Australian Surveying and Land Information Group Internet WWW page.,EPSG,,
-4284,Pulkovo 1942,,,,Armenia; Azerbaijan; Belarus; Estonia; Georgia; Kazakstan; Kirgistan; Latvia; Lithuania; Moldova; Russia; Tadzhikstan; Turkmenistan; Ukraine; Uzbekistan; Germany (former DDR); Czech Republic; Hungary; Poland; Romania; Latvia; Lithuania; Estonia; Albania,geographic 2D,6284,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4285,Qatar,,,,Qatar - onshore,geographic 2D,6285,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4286,Qatar 1948,,,,Qatar - onshore,geographic 2D,6286,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4287,Qornoq,,,,Greenland,geographic 2D,6287,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4288,Loma Quintana,,,,Venezuela - north,geographic 2D,6288,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4289,Amersfoort,,,,Netherlands - onshore,geographic 2D,6289,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4291,SAD69,,,,South America - Brazil,geographic 2D,6291,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.251.  Error introduced if not using the truncated precision is 0 to 31mm.,97.252
-4292,Sapper Hill 1943,,,,Falkland Islands,geographic 2D,6292,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4293,Schwarzeck,,,,Namibia,geographic 2D,6293,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4294,Segora,,,,Indonesia - southeast Kalimantan,geographic 2D,6294,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4295,Serindung,,,,Indonesia - east Kalimantan,geographic 2D,6295,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4296,Sudan,,,,Sudan - south,geographic 2D,6296,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4297,Tananarive,,,,Madagascar,geographic 2D,6297,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4298,Timbalai 1948,,,,Brunei; Malaysia - East Malaysia (Sabah; Sarawak).,geographic 2D,6298,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,Adopts metric conversion of 39.370147 inches per metre.,
-4299,TM65,,,,Ireland - onshore; United Kingdom (UK) - Northern Ireland (Ulster) onshore,geographic 2D,6299,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4300,TM75,,,,Ireland - onshore; United Kingdom (UK) - Northern Ireland (Ulster) onshore,geographic 2D,6300,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4301,Tokyo,,,,Japan; North Korea; South Korea,geographic 2D,6301,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4302,Trinidad 1903,,,,Trinidad and Tobago - Trinidad,geographic 2D,6302,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4303,TC(1948),,,,United Arab Emirates (UAE) - Abu Dhabi; Dubai,geographic 2D,6303,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4304,Voirol 1875,,,,Algeria - north of 32 deg N,geographic 2D,6304,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,IGN Paris,EPSG,,
-4305,Voirol Unifie,,,,Algeria - north of 32 deg N,geographic 2D,6305,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,"\"Le System Geodesique Nord-Sahara\"; IGN Paris",EPSG,,
-4306,Bern 1938,,,,Liechtenstein; Switzerland,geographic 2D,6306,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,Used for the geographic coordinates overprinted on topographic maps constructed on the CH1903 / LV03 projected CS (code 21781).,
-4307,Nord Sahara 1959,,,,Algeria; Morocco; Tunisia,geographic 2D,6307,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,"\"Le System Geodesique Nord-Sahara\"; IGN Paris",EPSG,,
-4308,RT38,,,,Sweden,geographic 2D,6308,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,97.09
-4309,Yacare,,,,Uruguay,geographic 2D,6309,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4310,Yoff,,,,Senegal,geographic 2D,6310,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4311,Zanderij,,,,Suriname,geographic 2D,6311,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4312,MGI,,,,Austria; Yugoslavia,geographic 2D,6312,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,Bundesamt fur Eich- und Vermessungswesen; Wien,EPSG,,
-4313,Belge 1972,,,,Belgium - onshore,geographic 2D,6313,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4314,DHDN,,,,Germany - onshore,geographic 2D,6314,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4315,Conakry 1905,,,,Guinea,geographic 2D,6315,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4316,Dealul Piscului 1933,,,,Romania,geographic 2D,6316,8901,North,East,Lat,Long,,9108,,,1996-04-12 00:00:00,,EPSG,Superseded by 1970 system (geogCS code 4317).,
-4317,Dealul Piscului 1970,,,,Romania,geographic 2D,6317,8901,North,East,Lat,Long,,9108,,,1996-04-12 00:00:00,,EPSG,Supersedes 1933 system (geogCS code 4316).,
-4318,NGN,,,,Kuwait,geographic 2D,6318,8901,North,East,Lat,Long,,9108,,,1996-04-12 00:00:00,,EPSG,,
-4319,KUDAMS,,,,Kuwait - Kuwait City,geographic 2D,6319,8901,North,East,Lat,Long,,9108,,,1996-04-12 00:00:00,,EPSG,,
-4322,WGS 72,,,,World,geographic 2D,6322,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,GeogCS code 4323 reserved for use with  ProjCS's.,
-4324,WGS 72BE,,,,World,geographic 2D,6324,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,GeogCS code 4325 reserved for use with  ProjCS's.,
-4326,WGS 84,,,,World,geographic 2D,6326,8901,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,GeogCS code 4327 reserved for use with  ProjCS's.,
-4600,Anguilla 1957,,,,Anguilla,geographic 2D,6600,8901,North,East,Lat,Long,,9108,,,1999-04-22 00:00:00,,EPSG,,
-4601,Antigua 1943,,,,Antigua and Barbuda - Antigua,geographic 2D,6601,8901,North,East,Lat,Long,,9108,,,1999-04-22 00:00:00,,EPSG,,
-4602,Dominica 1945,,,,Dominica,geographic 2D,6602,8901,North,East,Lat,Long,,9108,,,1999-04-22 00:00:00,,EPSG,,
-4603,Grenada 1953,,,,Grenada (including Grenada Grenadines),geographic 2D,6603,8901,North,East,Lat,Long,,9108,,,1999-04-22 00:00:00,,EPSG,,
-4604,Montserrat 1958,,,,Montserrat,geographic 2D,6604,8901,North,East,Lat,Long,,9108,,,1999-04-22 00:00:00,,EPSG,,
-4605,St. Kitts 1955,,,,Saint Kitts and Nevis,geographic 2D,6605,8901,North,East,Lat,Long,,9108,,,1999-04-22 00:00:00,,EPSG,,
-4606,St. Lucia 1955,,,,Saint Lucia,geographic 2D,6606,8901,North,East,Lat,Long,,9108,,,1999-04-22 00:00:00,,EPSG,,
-4607,St. Vincent 1945,,,,Saint Vincent and the Grenadines,geographic 2D,6607,8901,North,East,Lat,Long,,9108,,,1999-04-22 00:00:00,,EPSG,,
-4608,NAD27(76),,,,Canada - Ontario,geographic 2D,6608,8901,North,East,Lat,Long,,9108,,,1999-05-12 00:00:00,,EPSG,Note: this coordinate system includes longitudes which are POSITIVE EAST.,
-4609,NAD27(CGQ77),CGQ77,,,Canada - Quebec,geographic 2D,6609,8901,North,East,Lat,Long,,9108,,,1999-05-12 00:00:00,,EPSG,Note: this coordinate system includes longitudes which are POSITIVE EAST.,
-4801,Bern 1898 (Bern),,,,Liechtenstein; Switzerland,geographic 2D,6149,8907,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4802,Bogota (Bogota),,,,Colombia,geographic 2D,6218,8904,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4803,Lisbon (Lisbon),,,,Portugal - onshore,geographic 2D,6207,8902,North,East,Lat,Long,,9108,,,1997-04-11 00:00:00,Instituto Geografico e Cadastral; Lisbon,EPSG,,97.12
-4804,Makassar (Jakarta),,,,Indonesia - south west Sulawesi,geographic 2D,6257,8908,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4805,MGI (Ferro),,,,Austria; Yugoslavia,geographic 2D,6312,8909,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,Bundesamt fur Eich- und Vermessungswesen; Wien,EPSG,,
-4806,Monte Mario (Rome),,,,Italy,geographic 2D,6265,8906,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4807,NTF (Paris),,,,France - onshore,geographic 2D,6275,8903,North,East,Lat,Long,,9105,,,1995-06-02 00:00:00,,EPSG,,
-4808,Padang (Jakarta),,,,Indonesia - Sumatra,geographic 2D,6280,8908,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4809,Belge 1950 (Brussels),,,,Belgium - onshore,geographic 2D,6215,8910,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4810,Tananarive (Paris),,,,Madagascar,geographic 2D,6297,8903,North,East,Lat,Long,,9105,,,1995-06-02 00:00:00,,EPSG,,
-4811,Voirol 1875 (Paris),,,,Algeria - north of 32 deg N,geographic 2D,6304,8903,North,East,Lat,Long,,9105,,,1995-06-02 00:00:00,IGN Paris,EPSG,,
-4812,Voirol Unifie (Paris),,,,Algeria - north of 32 deg N,geographic 2D,6305,8903,North,East,Lat,Long,,9105,,,1995-06-02 00:00:00,"\"Le System Geodesique Nord-Sahara\"; IGN Paris",EPSG,,
-4813,Batavia (Jakarta),,,,Indonesia - Java,geographic 2D,6211,8908,North,East,Lat,Long,,9108,,,1995-06-02 00:00:00,,EPSG,,
-4814,RT38 (Stockholm),,,,Sweden,geographic 2D,6308,8911,North,East,Lat,Long,,9108,,,1996-04-12 00:00:00,,EPSG,,
-4815,Greek (Athens),,,,Greece,geographic 2D,6120,8912,North,East,Lat,Long,,9108,,,1997-06-16 00:00:00,Topography Department; National Technical University of Greece.,EPSG,,
-4816,Carthage (Paris),,,,Tunisia,geographic 2D,6223,8903,North,East,Lat,Long,,9105,,,1998-11-11 00:00:00,,EPSG,Superseded by Greenwich-based Carthage geogCS.,
-4817,NGO 1948 (Oslo),,,,Norway - onshore,geographic 2D,6273,8913,North,East,Lat,Long,,9108,,,1999-10-20 00:00:00,,EPSG,,
-4901,ATF (Paris),,,,France,geographic 2D,6901,8903,North,East,Lat,Long,,9105,,,1995-06-02 00:00:00,,EPSG,,
-4902,NDG (Paris),,,,France - Alsace,geographic 2D,6902,8903,North,East,Lat,Long,,9105,,,1995-06-02 00:00:00,,EPSG,,
-4903,Madrid 1870 (Madrid),,,,Spain,geographic 2D,6903,8905,North,East,Lat,Long,,9108,,,1998-11-11 00:00:00,Institut de Geomatica; Barcelona.,EPSG,,
-20004,Pulkovo 1995 / Gauss-Kruger zone 4,1995 Coord. Sys. zone 4,,,Russia - west of 24 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16204,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20005,Pulkovo 1995 / Gauss-Kruger zone 5,1995 Coord. Sys. zone 5,,,Russia - 24 deg to 30 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16205,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20006,Pulkovo 1995 / Gauss-Kruger zone 6,1995 Coord. Sys. zone 6,,,Russia - 30 deg to 36 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16206,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20007,Pulkovo 1995 / Gauss-Kruger zone 7,1995 Coord. Sys. zone 7,,,Russia - 36 deg to 42 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16207,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20008,Pulkovo 1995 / Gauss-Kruger zone 8,1995 Coord. Sys. zone 8,,,Russia - 42 deg to 48 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16208,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20009,Pulkovo 1995 / Gauss-Kruger zone 9,1995 Coord. Sys. zone 9,,,Russia - 48 deg to 54 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16209,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20010,Pulkovo 1995 / Gauss-Kruger zone 10,1995 Coord. Sys. zone 10,,,Russia - 54 deg  to 60 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16210,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20011,Pulkovo 1995 / Gauss-Kruger zone 11,1995 Coord. Sys. zone 11,,,Russia - 60 deg to 66 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16211,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20012,Pulkovo 1995 / Gauss-Kruger zone 12,1995 Coord. Sys. zone 12,,,Russia - 66 deg to 72 deg East .,projected 2D,,,North,East,X,Y,9001,,4200,16212,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20013,Pulkovo 1995 / Gauss-Kruger zone 13,1995 Coord. Sys. zone 13,,,Russia - 72 deg to 78 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16213,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20014,Pulkovo 1995 / Gauss-Kruger zone 14,1995 Coord. Sys. zone 14,,,Russia - 78 deg to 84 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16214,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20015,Pulkovo 1995 / Gauss-Kruger zone 15,1995 Coord. Sys. zone 15,,,Russia - 84 deg to 90 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16215,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20016,Pulkovo 1995 / Gauss-Kruger zone 16,1995 Coord. Sys. zone 16,,,Russia - 90 deg to 96 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16216,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20017,Pulkovo 1995 / Gauss-Kruger zone 17,1995 Coord. Sys. zone 17,,,Russia - 96 deg to 102deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16217,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20018,Pulkovo 1995 / Gauss-Kruger zone 18,1995 Coord. Sys. zone 18,,,Russia - 102 deg to 108 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16218,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20019,Pulkovo 1995 / Gauss-Kruger zone 19,1995 Coord. Sys. zone 19,,,Russia - 108 deg to 114 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16219,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20020,Pulkovo 1995 / Gauss-Kruger zone 20,1995 Coord. Sys. zone 20,,,Russia - 114 deg to 120 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16220,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20021,Pulkovo 1995 / Gauss-Kruger zone 21,1995 Coord. Sys. zone 21,,,Russia - 120 deg to 126 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16221,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20022,Pulkovo 1995 / Gauss-Kruger zone 22,1995 Coord. Sys. zone 22,,,Russia - 126 deg to 132 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16222,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20023,Pulkovo 1995 / Gauss-Kruger zone 23,1995 Coord. Sys. zone 23,,,Russia - 132 deg to 138 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16223,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20024,Pulkovo 1995 / Gauss-Kruger zone 24,1995 Coord. Sys. zone 24,,,Russia - 138 deg to 144 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16224,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20025,Pulkovo 1995 / Gauss-Kruger zone 25,1995 Coord. Sys. zone 25,,,Russia - 144 deg to 150 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16225,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20026,Pulkovo 1995 / Gauss-Kruger zone 26,1995 Coord. Sys. zone 26,,,Russia - 150 deg to 156 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16226,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20027,Pulkovo 1995 / Gauss-Kruger zone 27,1995 Coord. Sys. zone 27,,,Russia - 156 deg to 162 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16227,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20028,Pulkovo 1995 / Gauss-Kruger zone 28,1995 Coord. Sys. zone 28,,,Russia - 162 deg to 168 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16228,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20029,Pulkovo 1995 / Gauss-Kruger zone 29,1995 Coord. Sys. zone 29,,,Russia - 168 deg to 174 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16229,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20030,Pulkovo 1995 / Gauss-Kruger zone 30,1995 Coord. Sys. zone 30,,,Russia - 174 deg East to 180 deg.,projected 2D,,,North,East,X,Y,9001,,4200,16230,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20031,Pulkovo 1995 / Gauss-Kruger zone 31,1995 Coord. Sys. zone 31,,,Russia - 180 deg to 174 deg West.,projected 2D,,,North,East,X,Y,9001,,4200,16231,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20032,Pulkovo 1995 / Gauss-Kruger zone 32,1995 Coord. Sys. zone 32,,,Russia - east of 174 deg West.,projected 2D,,,North,East,X,Y,9001,,4200,16232,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20064,Pulkovo 1995 / Gauss-Kruger 4N,Pulkovo 1995 / Gauss 4N,,,Russia - west of 24 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16304,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20065,Pulkovo 1995 / Gauss-Kruger 5N,Pulkovo 1995 / Gauss 5N,,,Russia - 24 deg to 30 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16305,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20066,Pulkovo 1995 / Gauss-Kruger 6N,Pulkovo 1995 / Gauss 6N,,,Russia - 30 deg to 36 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16306,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20067,Pulkovo 1995 / Gauss-Kruger 7N,Pulkovo 1995 / Gauss 7N,,,Russia - 36 deg to 42 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16307,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20068,Pulkovo 1995 / Gauss-Kruger 8N,Pulkovo 1995 / Gauss 8N,,,Russia - 42 deg to 48 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16308,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20069,Pulkovo 1995 / Gauss-Kruger 9N,Pulkovo 1995 / Gauss 9N,,,Russia - 48 deg to 54 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16309,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20070,Pulkovo 1995 / Gauss-Kruger 10N,Pulkovo 1995 / Gauss 10N,,,Russia - 54 deg  to 60 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16310,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20071,Pulkovo 1995 / Gauss-Kruger 11N,Pulkovo 1995 / Gauss 11N,,,Russia - 60 deg to 66 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16311,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20072,Pulkovo 1995 / Gauss-Kruger 12N,Pulkovo 1995 / Gauss 12N,,,Russia - 66 deg to 72 deg East .,projected 2D,,,North,East,X,Y,9001,,4200,16312,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20073,Pulkovo 1995 / Gauss-Kruger 13N,Pulkovo 1995 / Gauss 13N,,,Russia - 72 deg to 78 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16313,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20074,Pulkovo 1995 / Gauss-Kruger 14N,Pulkovo 1995 / Gauss 14N,,,Russia - 78 deg to 84 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16314,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20075,Pulkovo 1995 / Gauss-Kruger 15N,Pulkovo 1995 / Gauss 15N,,,Russia - 84 deg to 90 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16315,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20076,Pulkovo 1995 / Gauss-Kruger 16N,Pulkovo 1995 / Gauss 16N,,,Russia - 90 deg to 96 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16316,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20077,Pulkovo 1995 / Gauss-Kruger 17N,Pulkovo 1995 / Gauss 17N,,,Russia - 96 deg to 102deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16317,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20078,Pulkovo 1995 / Gauss-Kruger 18N,Pulkovo 1995 / Gauss 18N,,,Russia - 102 deg to 108 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16318,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20079,Pulkovo 1995 / Gauss-Kruger 19N,Pulkovo 1995 / Gauss 19N,,,Russia - 108 deg to 114 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16319,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20080,Pulkovo 1995 / Gauss-Kruger 20N,Pulkovo 1995 / Gauss 20N,,,Russia - 114 deg to 120 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16320,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20081,Pulkovo 1995 / Gauss-Kruger 21N,Pulkovo 1995 / Gauss 21N,,,Russia - 120 deg to 126 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16321,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20082,Pulkovo 1995 / Gauss-Kruger 22N,Pulkovo 1995 / Gauss 22N,,,Russia - 126 deg to 132 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16322,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20083,Pulkovo 1995 / Gauss-Kruger 23N,Pulkovo 1995 / Gauss 23N,,,Russia - 132 deg to 138 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16323,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20084,Pulkovo 1995 / Gauss-Kruger 24N,Pulkovo 1995 / Gauss 24N,,,Russia - 138 deg to 144 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16324,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20085,Pulkovo 1995 / Gauss-Kruger 25N,Pulkovo 1995 / Gauss 25N,,,Russia - 144 deg to 150 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16325,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20086,Pulkovo 1995 / Gauss-Kruger 26N,Pulkovo 1995 / Gauss 26N,,,Russia - 150 deg to 156 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16326,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20087,Pulkovo 1995 / Gauss-Kruger 27N,Pulkovo 1995 / Gauss 27N,,,Russia - 156 deg to 162 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16327,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20088,Pulkovo 1995 / Gauss-Kruger 28N,Pulkovo 1995 / Gauss 28N,,,Russia - 162 deg to 168 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16328,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20089,Pulkovo 1995 / Gauss-Kruger 29N,Pulkovo 1995 / Gauss 29N,,,Russia - 168 deg to 174 deg East.,projected 2D,,,North,East,X,Y,9001,,4200,16329,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20090,Pulkovo 1995 / Gauss-Kruger 30N,Pulkovo 1995 / Gauss 30N,,,Russia - 174 deg East to 180 deg.,projected 2D,,,North,East,X,Y,9001,,4200,16330,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20091,Pulkovo 1995 / Gauss-Kruger 31N,Pulkovo 1995 / Gauss 31N,,,Russia - 180 deg to 174 deg West.,projected 2D,,,North,East,X,Y,9001,,4200,16331,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20092,Pulkovo 1995 / Gauss-Kruger 32N,Pulkovo 1995 / Gauss 32N,,,Russia - east of 174 deg West.,projected 2D,,,North,East,X,Y,9001,,4200,16332,1996-09-12 00:00:00,"\"Main Terms of Reference for the State Geodetic Network\"; Federal Geodetic Service of Russia; 1994",EPSG,,
-20137,Adindan / UTM zone 37N,,,,Ethiopia - west of 42 degrees East.  Sudan - west of 42 degrees East.,projected 2D,,,East,North,E,N,9001,,4201,16037,1995-06-02 00:00:00,,EPSG,,
-20138,Adindan / UTM zone 38N,,,,Ethiopia - east of 42 degrees East.  Sudan - east of 42 degrees East.,projected 2D,,,East,North,E,N,9001,,4201,16038,1995-06-02 00:00:00,,EPSG,,
-20248,AGD66 / AMG zone 48,,,,Australia - 102deg East to 108deg East.,projected 2D,,,East,North,E,N,9001,,4202,17448,1995-06-02 00:00:00,,EPSG,,
-20249,AGD66 / AMG zone 49,,,,Australia - 108deg East to 114deg East.,projected 2D,,,East,North,E,N,9001,,4202,17449,1995-06-02 00:00:00,,EPSG,,
-20250,AGD66 / AMG zone 50,,,,Australia - 114deg East to 120deg East.,projected 2D,,,East,North,E,N,9001,,4202,17450,1995-06-02 00:00:00,,EPSG,,
-20251,AGD66 / AMG zone 51,,,,Australia - 120deg East to 126deg East.,projected 2D,,,East,North,E,N,9001,,4202,17451,1995-06-02 00:00:00,,EPSG,,
-20252,AGD66 / AMG zone 52,,,,Australia - 126deg East to 132deg East.,projected 2D,,,East,North,E,N,9001,,4202,17452,1995-06-02 00:00:00,,EPSG,,
-20253,AGD66 / AMG zone 53,,,,Australia - 132deg East to 138deg East.,projected 2D,,,East,North,E,N,9001,,4202,17453,1995-06-02 00:00:00,,EPSG,,
-20254,AGD66 / AMG zone 54,,,,Australia - 138deg East to 144deg East.  Papua New Guinea - west of 144deg East.,projected 2D,,,East,North,E,N,9001,,4202,17454,1995-06-02 00:00:00,,EPSG,,
-20255,AGD66 / AMG zone 55,,,,Australia - 144deg East to 150deg East.  Papua New Guinea - 144deg East to 150deg East.,projected 2D,,,East,North,E,N,9001,,4202,17455,1995-06-02 00:00:00,,EPSG,,
-20256,AGD66 / AMG zone 56,,,,Australia - 150deg East to 156deg East.,projected 2D,,,East,North,E,N,9001,,4202,17456,1995-06-02 00:00:00,,EPSG,,
-20257,AGD66 / AMG zone 57,,,,Australia - 156deg East to 162deg East.,projected 2D,,,East,North,E,N,9001,,4202,17457,1995-06-02 00:00:00,,EPSG,,
-20258,AGD66 / AMG zone 58,,,,Australia - 162deg East to 168deg East.,projected 2D,,,East,North,E,N,9001,,4202,17458,1995-06-02 00:00:00,,EPSG,,
-20348,AGD84 / AMG zone 48,,,,Australia - 102deg East to 108deg East.,projected 2D,,,East,North,E,N,9001,,4203,17448,1995-06-02 00:00:00,,EPSG,,
-20349,AGD84 / AMG zone 49,,,,Australia - 108deg East to 114deg East.,projected 2D,,,East,North,E,N,9001,,4203,17449,1995-06-02 00:00:00,,EPSG,,
-20350,AGD84 / AMG zone 50,,,,Australia - 114deg East to 120deg East.,projected 2D,,,East,North,E,N,9001,,4203,17450,1995-06-02 00:00:00,,EPSG,,
-20351,AGD84 / AMG zone 51,,,,Australia - 120deg East to 126deg East.,projected 2D,,,East,North,E,N,9001,,4203,17451,1995-06-02 00:00:00,,EPSG,,
-20352,AGD84 / AMG zone 52,,,,Australia - 126deg East to 132deg East.,projected 2D,,,East,North,E,N,9001,,4203,17452,1995-06-02 00:00:00,,EPSG,,
-20353,AGD84 / AMG zone 53,,,,Australia - 132deg East to 138deg East.,projected 2D,,,East,North,E,N,9001,,4203,17453,1995-06-02 00:00:00,,EPSG,,
-20354,AGD84 / AMG zone 54,,,,Australia - 138deg East to 144deg East.  Papua - New Guinea west of 144deg East.,projected 2D,,,East,North,E,N,9001,,4203,17454,1995-06-02 00:00:00,,EPSG,,
-20355,AGD84 / AMG zone 55,,,,Australia - 144deg East to 150deg East.  Papua New Guinea - 144deg East to 150deg East.,projected 2D,,,East,North,E,N,9001,,4203,17455,1995-06-02 00:00:00,,EPSG,,
-20356,AGD84 / AMG zone 56,,,,Australia - 150deg East to 156deg East.,projected 2D,,,East,North,E,N,9001,,4203,17456,1995-06-02 00:00:00,,EPSG,,
-20357,AGD84 / AMG zone 57,,,,Australia - 156deg East to 162deg East.,projected 2D,,,East,North,E,N,9001,,4203,17457,1995-06-02 00:00:00,,EPSG,,
-20358,AGD84 / AMG zone 58,,,,Australia - 162deg East to 168deg East.,projected 2D,,,East,North,E,N,9001,,4203,17458,1995-06-02 00:00:00,,EPSG,,
-20437,Ain el Abd / UTM zone 37N,Ain el Abd / UTM 37N,,,Saudi Arabia - west of 42 degrees East.,projected 2D,,,East,North,E,N,9001,,4204,16037,1997-11-13 00:00:00,,EPSG,,97.59
-20438,Ain el Abd / UTM zone 38N,Ain el Abd / UTM 38N,,,Kuwait.  Saudi Arabia - between 42 degrees and 48 degrees East.,projected 2D,,,East,North,E,N,9001,,4204,16038,1997-11-13 00:00:00,,EPSG,"Known in Kuwait as \"KOC UTM\".",97.59
-20439,Ain el Abd / UTM zone 39N,Ain el Abd / UTM 39N,,,Saudi Arabia - east of 48 degrees East.,projected 2D,,,East,North,E,N,9001,,4204,16039,1997-11-13 00:00:00,,EPSG,,97.59
-20499,Ain el Abd / Bahrain Grid,,,,Bahrain.,projected 2D,,,East,North,E,N,9001,,4204,19900,1995-06-02 00:00:00,,EPSG,,
-20538,Afgooye / UTM zone 38N,,,,Somalia - west of 48 degrees East.,projected 2D,,,East,North,E,N,9001,,4205,16038,1995-06-02 00:00:00,,EPSG,,
-20539,Afgooye / UTM zone 39N,,,,Somalia - east of 48 degrees East.,projected 2D,,,East,North,E,N,9001,,4205,16039,1995-06-02 00:00:00,,EPSG,,
-20790,Lisbon (Lisbon)/Portuguese National Grid,Lisbon / Portuguese Grid,,,Portugal - onshore.,projected 2D,,,East,North,X,Y,9001,,4803,19936,1998-11-11 00:00:00,,EPSG,,98.42
-20822,Aratu / UTM zone 22S,,,,Brazil - coastal areas south of 2 deg 55 min South and west of 48 deg West.,projected 2D,,,East,North,E,N,9001,,4208,16122,1995-07-21 00:00:00,,EPSG,,95.191
-20823,Aratu / UTM zone 23S,,,,Brazil - coastal areas south of 2 deg 55 min South and between 48 and 42 deg West; offshore Santos basin.,projected 2D,,,East,North,E,N,9001,,4208,16123,1995-07-21 00:00:00,,EPSG,,95.191
-20824,Aratu / UTM zone 24S,,,,Brazil - coastal areas south of 2 deg 55 min South and east of 42 deg West; offshore Campos basin.,projected 2D,,,East,North,E,N,9001,,4208,16124,1995-07-21 00:00:00,,EPSG,,95.191
-20934,Arc 1950 / UTM zone 34S,,,,Botswana & Zambia - west of 24 deg East.,projected 2D,,,East,North,E,N,9001,,4209,16134,1997-11-13 00:00:00,,EPSG,,
-20935,Arc 1950 / UTM zone 35S,,,,Botswana - east of 24 deg East; Zambia - 24 to 30 deg East; Zimbabwe west of 30 deg East .,projected 2D,,,East,North,E,N,9001,,4209,16135,1997-11-13 00:00:00,,EPSG,,
-20936,Arc 1950 / UTM zone 36S,,,,Malawi; Zambia & Zimbabwe - east of 30 deg East.,projected 2D,,,East,North,E,N,9001,,4209,16136,1997-11-13 00:00:00,,EPSG,,
-21035,Arc 1960 / UTM zone 35S,,,,Tanzania - west of 30 deg East; Uganda south of equator and west of 30 deg East.,projected 2D,,,East,North,E,N,9001,,4210,16135,1997-11-13 00:00:00,,EPSG,,
-21036,Arc 1960 / UTM zone 36S,,,,Kenya - south of equator and west of 36 deg East; Tanzania - 30 to 36 deg East; Uganda south of equator and east of 30 deg East.,projected 2D,,,East,North,E,N,9001,,4210,16136,1997-11-13 00:00:00,,EPSG,,
-21037,Arc 1960 / UTM zone 37S,,,,Kenya - south of equator and east of 36 deg East; Tanzania - east of 36 deg East.,projected 2D,,,East,North,E,N,9001,,4210,16137,1997-11-13 00:00:00,,EPSG,,
-21095,Arc 1960 / UTM zone 35N,,,,Uganda north of equator and west of 30 deg East.,projected 2D,,,East,North,E,N,9001,,4210,16035,1997-11-13 00:00:00,,EPSG,,
-21096,Arc 1960 / UTM zone 36N,,,,Kenya - north of equator and west of 36 deg East; Uganda north of equator and east of 30 deg East.,projected 2D,,,East,North,E,N,9001,,4210,16036,1997-11-13 00:00:00,,EPSG,,
-21097,Arc 1960 / UTM zone 37N,,,,Kenya - north of equator and east of 36 deg East.,projected 2D,,,East,North,E,N,9001,,4210,16037,1997-11-13 00:00:00,,EPSG,,
-21100,Batavia (Jakarta) / NEIEZ,Batavia / NEIEZ,,,Indonesia - Java.,projected 2D,,,East,North,X,Y,9001,,4813,19905,1995-06-02 00:00:00,,EPSG,,
-21148,Batavia / UTM zone 48S,,,,Indonesia - Java west of 108 deg East.,projected 2D,,,East,North,E,N,9001,,4211,16148,1995-06-02 00:00:00,,EPSG,,
-21149,Batavia / UTM zone 49S,,,,Indonesia - Java between 108 and 114 deg East.,projected 2D,,,East,North,E,N,9001,,4211,16149,1995-06-02 00:00:00,,EPSG,,
-21150,Batavia / UTM zone 50S,,,,Indonesia - Java east of 114 deg East.,projected 2D,,,East,North,E,N,9001,,4211,16150,1995-06-02 00:00:00,,EPSG,,
-21291,Barbados 1938 / British West Indies Grid,Barbados 1938 / BWI Grid,,,Barbados,projected 2D,,,East,North,E,N,9001,,4212,19942,1999-04-22 00:00:00,Ordnance Survey of Great Britain,EPSG,Superseded by Barbados National Grid (code 21292) from 1983.,
-21292,Barbados 1938 / Barbados National Grid,Barbados NationaI Grid,,,Barbados,projected 2D,,,East,North,E,N,9001,,4212,19943,1999-04-22 00:00:00,Ordnance Survey of Great Britain,EPSG,Supersedes Barbados 1938 / BWI Grid (code 21291) from 1983.,
-21413,Beijing 1954 / Gauss-Kruger zone 13,Beijing / Gauss zone 13,,,China - west of 78 deg East.,projected 2D,,,North,East,X,Y,9001,,4214,16213,1995-06-02 00:00:00,,EPSG,,
-21414,Beijing 1954 / Gauss-Kruger zone 14,Beijing / Gauss zone 14,,,China - 78 deg East  to 84 deg East.,projected 2D,,,North,East,X,Y,9001,,4214,16214,1995-06-02 00:00:00,,EPSG,,
-21415,Beijing 1954 / Gauss-Kruger zone 15,Beijing / Gauss zone 15,,,China - 84 deg East  to 90 deg East.,projected 2D,,,North,East,X,Y,9001,,4214,16215,1995-06-02 00:00:00,,EPSG,,
-21416,Beijing 1954 / Gauss-Kruger zone 16,Beijing / Gauss zone 16,,,China - 90 deg East  to 96 deg East.,projected 2D,,,North,East,X,Y,9001,,4214,16216,1995-06-02 00:00:00,,EPSG,,
-21417,Beijing 1954 / Gauss-Kruger zone 17,Beijing / Gauss zone 17,,,China - 96 deg East  to 102eg E,projected 2D,,,North,East,X,Y,9001,,4214,16217,1995-06-02 00:00:00,,EPSG,,
-21418,Beijing 1954 / Gauss-Kruger zone 18,Beijing / Gauss zone 18,,,China - 102 deg East  to 108 deg East.,projected 2D,,,North,East,X,Y,9001,,4214,16218,1995-06-02 00:00:00,,EPSG,,
-21419,Beijing 1954 / Gauss-Kruger zone 19,Beijing / Gauss zone 19,,,China - 108 deg East  to 114 deg East.,projected 2D,,,North,East,X,Y,9001,,4214,16219,1995-06-02 00:00:00,,EPSG,,
-21420,Beijing 1954 / Gauss-Kruger zone 20,Beijing / Gauss zone 20,,,China - 114 deg East  to 120 deg East.,projected 2D,,,North,East,X,Y,9001,,4214,16220,1995-06-02 00:00:00,,EPSG,,
-21421,Beijing 1954 / Gauss-Kruger zone 21,Beijing / Gauss zone 21,,,China - 120 deg East  to 126 deg East.,projected 2D,,,North,East,X,Y,9001,,4214,16221,1995-06-02 00:00:00,,EPSG,,
-21422,Beijing 1954 / Gauss-Kruger zone 22,Beijing / Gauss zone 22,,,China - 126 deg East  to 132 deg East.,projected 2D,,,North,East,X,Y,9001,,4214,16222,1995-06-02 00:00:00,,EPSG,,
-21423,Beijing 1954 / Gauss-Kruger zone 23,Beijing / Gauss zone 23,,,China - east of 132 deg East.,projected 2D,,,North,East,X,Y,9001,,4214,16223,1995-06-02 00:00:00,,EPSG,,
-21473,Beijing 1954 / Gauss-Kruger 13N,Beijing / Gauss 13N,,,China - west of 78 deg East.,projected 2D,,,North,East,X,Y,9001,,4214,16313,1995-06-02 00:00:00,,EPSG,,
-21474,Beijing 1954 / Gauss-Kruger 14N,Beijing / Gauss 14N,,,China - 78 deg East  to 84 deg East.,projected 2D,,,North,East,X,Y,9001,,4214,16314,1995-06-02 00:00:00,,EPSG,,
-21475,Beijing 1954 / Gauss-Kruger 15N,Beijing / Gauss 15N,,,China - 84 deg East  to 90 deg East.,projected 2D,,,North,East,X,Y,9001,,4214,16315,1995-06-02 00:00:00,,EPSG,,
-21476,Beijing 1954 / Gauss-Kruger 16N,Beijing / Gauss 16N,,,China - 90 deg East  to 96 deg East.,projected 2D,,,North,East,X,Y,9001,,4214,16316,1995-06-02 00:00:00,,EPSG,,
-21477,Beijing 1954 / Gauss-Kruger 17N,Beijing / Gauss 17N,,,China - 96 deg East  to 102eg E,projected 2D,,,North,East,X,Y,9001,,4214,16317,1995-06-02 00:00:00,,EPSG,,
-21478,Beijing 1954 / Gauss-Kruger 18N,Beijing / Gauss 18N,,,China - 102 deg East  to 108 deg East.,projected 2D,,,North,East,X,Y,9001,,4214,16318,1995-06-02 00:00:00,,EPSG,,
-21479,Beijing 1954 / Gauss-Kruger 19N,Beijing / Gauss 19N,,,China - 108 deg East  to 114 deg East.,projected 2D,,,North,East,X,Y,9001,,4214,16319,1995-06-02 00:00:00,,EPSG,,
-21480,Beijing 1954 / Gauss-Kruger 20N,Beijing / Gauss 20N,,,China - 114 deg East  to 120 deg East.,projected 2D,,,North,East,X,Y,9001,,4214,16320,1995-06-02 00:00:00,,EPSG,,
-21481,Beijing 1954 / Gauss-Kruger 21N,Beijing / Gauss 21N,,,China - 120 deg East  to 126 deg East.,projected 2D,,,North,East,X,Y,9001,,4214,16321,1995-06-02 00:00:00,,EPSG,,
-21482,Beijing 1954 / Gauss-Kruger 22N,Beijing / Gauss 22N,,,China - 126 deg East  to 132 deg East.,projected 2D,,,North,East,X,Y,9001,,4214,16322,1995-06-02 00:00:00,,EPSG,,
-21483,Beijing 1954 / Gauss-Kruger 23N,Beijing / Gauss 23N,,,China - east of 132 deg East.,projected 2D,,,North,East,X,Y,9001,,4214,16323,1995-06-02 00:00:00,,EPSG,,
-21500,Belge 1950 (Brussels) / Belge Lambert 50,Belge Lambert 50,,,Belgium - onshore.,projected 2D,,,East,North,X,Y,9001,,4809,19901,1997-04-11 00:00:00,,EPSG,Superseded by 31300 (Belge 1972 / Belge Lambert 72).,97.13
-21780,Bern 1898 (Bern) / LV03C,LV03C,,,Liechtenstein.  Switzerland.,projected 2D,,,East,North,Y,X,9001,,4801,19923,1997-06-30 00:00:00,,EPSG,Superseded by CH1903 / LV03 (code 21781).,97.27  97.62
-21781,CH1903 / LV03,LV03,,,Liechtenstein; Switzerland.,projected 2D,,,East,North,Y,X,9001,,4149,19922,1999-10-20 00:00:00,,EPSG,Supersedes LV03C (code 21780).  Superseded by CH1903+/LV95 (code 256).,
-21817,Bogota / UTM zone 17N,,,,Colombia - offshore west of 78 deg W of Greenwich.,projected 2D,,,East,North,E,N,9001,,4218,16017,1995-06-02 00:00:00,,EPSG,,
-21818,Bogota / UTM zone 18N,,,,Colombia - offshore east of 78 deg W of Greenwich.,projected 2D,,,East,North,E,N,9001,,4218,16018,1995-06-02 00:00:00,,EPSG,,
-21891,Bogota / Colombia West zone,Bogota / Colombia 3W,,,Colombia - west of 1 deg 30 min W of Bogota (75d 34m 51.30s W of Greenwich).,projected 2D,,,East,North,X,Y,9001,,4218,18051,1997-11-13 00:00:00,,EPSG,,97.11  97.57
-21892,Bogota / Colombia Bogota zone,Bogota / Colombia Bogota,,,Colombia - 1 deg 30 min W to 1 deg 30 min E of Bogota (75d 35m W to 72d 35m W of Greenwich).,projected 2D,,,East,North,X,Y,9001,,4218,18052,1997-11-13 00:00:00,,EPSG,,97.11  97.57
-21893,Bogota / Colombia East Central zone,Bogota / Colombia 3E,,,Colombia - 1 deg 30 min to 4 deg 30 min E of Bogota (72d 35m to 69d 34m W of Greenwich).,projected 2D,,,East,North,X,Y,9001,,4218,18053,1997-11-13 00:00:00,,EPSG,,97.11  97.57
-21894,Bogota / Colombia East,Bogota / Colombia 6E,,,Colombia - east of 4 deg 30 min E of Bogota (69d 34m 51.3s W of Greenwich).,projected 2D,,,East,North,X,Y,9001,,4218,18054,1997-11-13 00:00:00,,EPSG,,97.11  97.57
-22032,Camacupa / UTM zone 32S,,,,Angola - west of 12 deg East.,projected 2D,,,East,North,E,N,9001,,4220,16132,1997-11-13 00:00:00,,EPSG,,97.58
-22033,Camacupa / UTM zone 33S,,,,Angola - east of 12 deg East.,projected 2D,,,East,North,E,N,9001,,4220,16133,1997-11-13 00:00:00,,EPSG,,97.58
-22091,Camacupa / TM 11.30 SE,,,,Angola - offshore.,projected 2D,,,East,North,E,N,9001,,4220,16611,1998-11-11 00:00:00,Esso Angola,EPSG,Used by Esso Angola for offshore blocks 15 and 24.,
-22092,Camacupa / TM 12 SE,,,,Angola - offshore.,projected 2D,,,East,North,E,N,9001,,4220,16612,1998-11-11 00:00:00,Shell Angola,EPSG,"Used by Shell Angola for offshore blocks 1 and 16.  Used by BP Amoco, Elf and Esso for offshore blocks 31-33.",
-22191,Campo Inchauspe / Argentina 1,C Inchauspe /Argentina 1,,,Argentina - west of 70 deg 30 min West.,projected 2D,,,North,East,X,Y,9001,,4221,18031,1999-11-15 00:00:00,,EPSG,,97.72
-22192,Campo Inchauspe / Argentina 2,C Inchauspe /Argentina 2,,,Argentina - between 70 deg 30 min and 67 deg 30 min West.,projected 2D,,,North,East,X,Y,9001,,4221,18032,1999-11-15 00:00:00,,EPSG,,97.72
-22193,Campo Inchauspe / Argentina 3,C Inchauspe /Argentina 3,,,Argentina - between 67 deg 30 min and 64 deg 30 min West.,projected 2D,,,North,East,X,Y,9001,,4221,18033,1999-11-15 00:00:00,,EPSG,,97.72
-22194,Campo Inchauspe / Argentina 4,C Inchauspe /Argentina 4,,,Argentina - between 64 deg 30 min and 61 deg 30 min West.,projected 2D,,,North,East,X,Y,9001,,4221,18034,1999-11-15 00:00:00,,EPSG,,97.72
-22195,Campo Inchauspe / Argentina 5,C Inchauspe /Argentina 5,,,Argentina - between 61 deg 30 min and 58 deg 30 min West.,projected 2D,,,North,East,X,Y,9001,,4221,18035,1999-11-15 00:00:00,,EPSG,,97.72
-22196,Campo Inchauspe / Argentina 6,C Inchauspe /Argentina 6,,,Argentina - between 58 deg 30 min and 55 deg 30 min West.,projected 2D,,,North,East,X,Y,9001,,4221,18036,1999-11-15 00:00:00,,EPSG,,97.72
-22197,Campo Inchauspe / Argentina 7,C Inchauspe /Argentina 7,,,Argentina - east of 55 deg 30 min West.,projected 2D,,,North,East,X,Y,9001,,4221,18037,1999-11-15 00:00:00,,EPSG,,97.72
-22234,Cape / UTM zone 34S,,,,Botswana - west of 21deg East.,projected 2D,,,East,North,E,N,9001,,4222,16134,1995-12-08 00:00:00,,EPSG,,
-22235,Cape / UTM zone 35S,,,,Botswana - east of 27deg East.,projected 2D,,,East,North,E,N,9001,,4222,16135,1995-12-08 00:00:00,,EPSG,,
-22236,Cape / UTM zone 36S,,,,Botswana - between 21 and 27deg East.,projected 2D,,,East,North,E,N,9001,,4222,16136,1995-12-08 00:00:00,,EPSG,,
-22275,South African Coordinate System zone 15,South African CS zone 15,,,South Africa - Walvis Bay.,projected 2D,,,West,South,W,S,9001,,4222,17515,1996-04-12 00:00:00,,EPSG,,
-22277,South African Coordinate System zone 17,South African CS zone 17,,,South Africa - west of 18 deg East.,projected 2D,,,West,South,W,S,9001,,4222,17517,1996-04-12 00:00:00,,EPSG,,
-22279,South African Coordinate System zone 19,South African CS zone 19,,,South Africa - 18 to 20 deg East.,projected 2D,,,West,South,W,S,9001,,4222,17519,1996-04-12 00:00:00,,EPSG,,
-22281,South African Coordinate System zone 21,South African CS zone 21,,,South Africa - 20 to 22 deg East.,projected 2D,,,West,South,W,S,9001,,4222,17521,1996-04-12 00:00:00,,EPSG,,
-22283,South African Coordinate System zone 23,South African CS zone 23,,,South Africa - 22 to 24 deg East.,projected 2D,,,West,South,W,S,9001,,4222,17523,1996-04-12 00:00:00,,EPSG,,
-22285,South African Coordinate System zone 25,South African CS zone 25,,,Lestho  - west of 26 deg East; South Africa - 24 to 26 deg East.,projected 2D,,,West,South,W,S,9001,,4222,17525,1996-04-12 00:00:00,,EPSG,,
-22287,South African Coordinate System zone 27,South African CS zone 27,,,Lestho  - east of 26 deg East;  South Africa - 26 to 28 deg East.,projected 2D,,,West,South,W,S,9001,,4222,17527,1996-04-12 00:00:00,,EPSG,,
-22289,South African Coordinate System zone 29,South African CS zone 29,,,South Africa - 28 to 30 deg East.,projected 2D,,,West,South,W,S,9001,,4222,17529,1996-04-12 00:00:00,,EPSG,,
-22291,South African Coordinate System zone 31,South African CS zone 31,,,South Africa - 30 to 32 deg East;  Swaziland.,projected 2D,,,West,South,W,S,9001,,4222,17531,1996-04-12 00:00:00,,EPSG,,
-22293,South African Coordinate System zone 33,South African CS zone 33,,,South Africa - east of 32 deg East.,projected 2D,,,West,South,W,S,9001,,4222,17533,1996-04-12 00:00:00,,EPSG,,
-22300,Carthage (Paris) / Tunisia Mining Grid,Tunisia Mining Grid,,,Tunisia - onshore.,projected 2D,,,East,North,X,Y,9036,,4816,19937,1998-11-11 00:00:00,,EPSG,CAUTION: Carthage datum did not exist when the 1953 decree was issued and an inference is that grid should be applied to the Voirol 1875 geogCS.  Common practice assumes that the current Tunisian geodetic datum of Carthage applies.,
-22332,Carthage / UTM zone 32N,,,,Tunisia - offshore.,projected 2D,,,East,North,X,Y,9001,,4223,16032,1995-06-02 00:00:00,,EPSG,,
-22391,Carthage / Nord Tunisie,,,,Tunisia - north of 38.5 grads (34 deg 39 min) North.,projected 2D,,,East,North,X,Y,9001,,4223,18181,1995-06-02 00:00:00,,EPSG,,
-22392,Carthage / Sud Tunisie,,,,Tunisia - south of 38.5 grads (34 deg 39 min) North.,projected 2D,,,East,North,X,Y,9001,,4223,18182,1995-06-02 00:00:00,,EPSG,,
-22523,Corrego Alegre / UTM zone 23S,Corrego Alegre / UTM 23S,,,Brazil - NE coastal area between 45 deg W and 42 deg W.,projected 2D,,,East,North,E,N,9001,,4225,16123,1995-06-02 00:00:00,,EPSG,,
-22524,Corrego Alegre / UTM zone 24S,Corrego Alegre / UTM 24S,,,Brazil - NE coastal area between 42 deg W and 40 deg W.,projected 2D,,,East,North,E,N,9001,,4225,16124,1995-06-02 00:00:00,,EPSG,,
-22700,Deir ez Zor / Levant Zone,,,,Syrian Arab Republic west of 39 deg E.,projected 2D,,,East,North,X,Y,9001,,4227,19940,1999-04-22 00:00:00,,EPSG,Superseded by Deir ez Zor / Syria Lambert (EPSG code 22770) from 1973.,
-22770,Deir ez Zor / Syria Lambert,,,,Syrian Arab Republic,projected 2D,,,East,North,X,Y,9001,,4227,19948,1999-10-20 00:00:00,,EPSG,Supersedes Deir ez Zor / Levant zone (EPSG code 22700) from 1973.,
-22832,Douala / UTM zone 32N,,,,Cameroon.,projected 2D,,,East,North,E,N,9001,,4228,16032,1995-06-02 00:00:00,,EPSG,,
-22991,Egypt 1907 / Blue Belt,,,,Egypt  - Sinai peninsula.,projected 2D,,,East,North,E,N,9001,,4229,18071,1999-04-22 00:00:00,,EPSG,Also known as Egypt 1907 / Green Belt.    Oil industry usually uses Egypt 1907 / Red Belt rather than this projected CS.,
-22992,Egypt 1907 / Red Belt,,,,Egypt  - east of 29 deg East.,projected 2D,,,East,North,E,N,9001,,4229,18072,1995-06-02 00:00:00,,EPSG,See also Egypt 1907 / Blue Belt for non oil industry usage in Sinai peninsula.,
-22993,Egypt 1907 / Purple Belt,,,,Egypt -  west of 29 deg E; north of approx 28 deg 11 min North.,projected 2D,,,East,North,E,N,9001,,4229,18073,1995-06-02 00:00:00,,EPSG,,
-22994,Egypt 1907 / Extended Purple Belt,Egypt 1907 / Ext. Purple,,,Egypt  - west of 29 deg E; south of approx 28 deg 11 min North.,projected 2D,,,East,North,E,N,9001,,4229,18074,1995-06-02 00:00:00,,EPSG,,
-23028,ED50 / UTM zone 28N,,,,Europe - 18deg West to 12deg West - Ireland offshore; United Kingdom (UKCS) offshore.,projected 2D,,,East,North,E,N,9001,,4230,16028,1995-06-02 00:00:00,,EPSG,,
-23029,ED50 / UTM zone 29N,,,,Europe - 12deg West to 6deg West - Portugal; Spain; Ireland offshore; United Kingdom (UKCS) offshore.,projected 2D,,,East,North,E,N,9001,,4230,16029,1995-06-02 00:00:00,,EPSG,,
-23030,ED50 / UTM zone 30N,,,,Europe - 6deg West to 0deg - Spain; France offshore; Ireland offshore; United Kingdom - UKCS offshore - North Sea west of 0 deg East).,projected 2D,,,East,North,E,N,9001,,4230,16030,1995-06-02 00:00:00,,EPSG,,
-23031,ED50 / UTM zone 31N,,,,Europe - 0deg to 6deg East - Denmark (North Sea); Germany offshore; Netherlands offshore; Norway; United Kingdom (UKCS) offshore.,projected 2D,,,East,North,E,N,9001,,4230,16031,1995-06-02 00:00:00,,EPSG,,
-23032,ED50 / UTM zone 32N,,,,Europe - 6deg East  to 12deg East - Denmark; Germany offshore; Netherlands offshore; Norway.,projected 2D,,,East,North,E,N,9001,,4230,16032,1995-06-02 00:00:00,,EPSG,,
-23033,ED50 / UTM zone 33N,,,,Europe - 12deg East  to 18deg East - Denmark including Bornholm; Norway.,projected 2D,,,East,North,E,N,9001,,4230,16033,1995-06-02 00:00:00,,EPSG,,
-23034,ED50 / UTM zone 34N,,,,Europe - 18deg East  to 24deg East - Greece; Norway.,projected 2D,,,East,North,E,N,9001,,4230,16034,1995-06-02 00:00:00,,EPSG,,
-23035,ED50 / UTM zone 35N,,,,Europe - 24deg East  to 30deg East - Greece; Norway; Turkey.,projected 2D,,,East,North,E,N,9001,,4230,16035,1995-06-02 00:00:00,,EPSG,,
-23036,ED50 / UTM zone 36N,,,,Europe - 30deg East  to 36deg East - Turkey.,projected 2D,,,East,North,E,N,9001,,4230,16036,1995-06-02 00:00:00,,EPSG,,
-23037,ED50 / UTM zone 37N,,,,Europe - 36deg East  to 42deg East - Turkey.,projected 2D,,,East,North,E,N,9001,,4230,16037,1995-06-02 00:00:00,,EPSG,,
-23038,ED50 / UTM zone 38N,,,,Europe - 42deg East  to 48deg East - Turkey.,projected 2D,,,East,North,E,N,9001,,4230,16038,1995-06-02 00:00:00,,EPSG,,
-23090,ED50 / TM 0 N,,,,United Kingdom (UKCS) - offshore North Sea.,projected 2D,,,East,North,E,N,9001,,4230,16400,1998-11-11 00:00:00,Shell UK,EPSG,Used by Shell UK for North Sea,
-23095,ED50 / TM 5 NE,,,,Netherlands - offshore North Sea.,projected 2D,,,East,North,E,N,9001,,4230,16405,1998-11-11 00:00:00,NAM,EPSG,Used by NAM,
-23239,Fahud / UTM zone 39N,,,,Oman - west of 54 deg East.,projected 2D,,,East,North,E,N,9001,,4232,16039,1995-06-02 00:00:00,,EPSG,Since 1993 superseded by PSD93 / UTM zone 39N projCS (code 3439). Maximum differences to Fahud adjustment are 20 metres.,
-23240,Fahud / UTM zone 40N,,,,Oman - east of 54 deg East.,projected 2D,,,East,North,E,N,9001,,4232,16040,1995-06-02 00:00:00,,EPSG,Since 1993 superseded by PSD93 / UTM zone 40N projCS (code 3440). Maximum differences to Fahud adjustment are 20 metres.,
-23433,Garoua / UTM zone 33N,,,,Cameroon.,projected 2D,,,East,North,E,N,9001,,4234,16033,1995-06-02 00:00:00,,EPSG,,
-23700,HD72 / EOV,,,,Hungary,projected 2D,,,East,North,Y,X,9001,,4237,19931,1997-07-22 00:00:00,,EPSG,,
-23846,ID74 / UTM zone 46N,,,,Indonesia - north of equator and west of 96 deg East.,projected 2D,,,East,North,E,N,9001,,4238,16046,1995-08-08 00:00:00,,EPSG,,95.193  95.20
-23847,ID74 / UTM zone 47N,,,,Indonesia - north of equator and between 96 deg and 102 deg East.,projected 2D,,,East,North,E,N,9001,,4238,16047,1995-07-21 00:00:00,,EPSG,,95.193
-23848,ID74 / UTM zone 48N,,,,Indonesia - north of equator and between 102 deg and 108 deg East.,projected 2D,,,East,North,E,N,9001,,4238,16048,1995-07-21 00:00:00,,EPSG,,95.193
-23849,ID74 / UTM zone 49N,,,,Indonesia - north of equator and between 108 deg and 114 deg East.,projected 2D,,,East,North,E,N,9001,,4238,16049,1995-07-21 00:00:00,,EPSG,,95.193
-23850,ID74 / UTM zone 50N,,,,Indonesia - north of equator and between 114 deg and 120 deg East.,projected 2D,,,East,North,E,N,9001,,4238,16050,1995-07-21 00:00:00,,EPSG,,95.193
-23851,ID74 / UTM zone 51N,,,,Indonesia - north of equator and between 120 deg and 126 deg East.,projected 2D,,,East,North,E,N,9001,,4238,16051,1995-07-21 00:00:00,,EPSG,,95.193
-23852,ID74 / UTM zone 52N,,,,Indonesia - north of equator and between 126 deg and 132 deg East.,projected 2D,,,East,North,E,N,9001,,4238,16052,1995-07-21 00:00:00,,EPSG,,95.193
-23853,ID74 / UTM zone 53N,,,,Indonesia - north of equator and east of 132 deg East.,projected 2D,,,East,North,E,N,9001,,4238,16053,1995-07-21 00:00:00,,EPSG,,95.193
-23886,ID74 / UTM zone 46S,,,,Indonesia - south of equator and west of 96 deg East.,projected 2D,,,East,North,E,N,9001,,4238,16146,1995-08-08 00:00:00,,EPSG,,95.193  95.20
-23887,ID74 / UTM zone 47S,,,,Indonesia - south of equator and between 96 deg and 102 deg East.,projected 2D,,,East,North,E,N,9001,,4238,16147,1995-07-21 00:00:00,,EPSG,,95.193
-23888,ID74 / UTM zone 48S,,,,Indonesia - south of equator and between 102 deg and 108 deg East.,projected 2D,,,East,North,E,N,9001,,4238,16148,1995-07-21 00:00:00,,EPSG,,95.193
-23889,ID74 / UTM zone 49S,,,,Indonesia - south of equator and between 108 deg and 114 deg East.,projected 2D,,,East,North,E,N,9001,,4238,16149,1995-07-21 00:00:00,,EPSG,,95.193
-23890,ID74 / UTM zone 50S,,,,Indonesia - south of equator and between 114 deg and 120 deg East.,projected 2D,,,East,North,E,N,9001,,4238,16150,1995-07-21 00:00:00,,EPSG,,95.193
-23891,ID74 / UTM zone 51S,,,,Indonesia - south of equator and between 120 deg and 126 deg East.,projected 2D,,,East,North,E,N,9001,,4238,16151,1995-07-21 00:00:00,,EPSG,,95.193
-23892,ID74 / UTM zone 52S,,,,Indonesia - south of equator and between 126 deg and 132 deg East.,projected 2D,,,East,North,E,N,9001,,4238,16152,1995-07-21 00:00:00,,EPSG,,95.193
-23893,ID74 / UTM zone 53S,,,,Indonesia - south of equator and between 132 deg and 138 deg East.,projected 2D,,,East,North,E,N,9001,,4238,16153,1995-07-21 00:00:00,,EPSG,,95.193
-23894,ID74 / UTM zone 54S,,,,Indonesia - south of equator and east of 138 deg East.,projected 2D,,,East,North,E,N,9001,,4238,16154,1995-07-21 00:00:00,,EPSG,,95.193
-23946,Indian 1954 / UTM zone 46N,Indian 1954 / UTM 46N,,,Myanmar (Burma) - west of 96 deg East.,projected 2D,,,East,North,E,N,9001,,4239,16046,1998-06-13 00:00:00,,EPSG,,
-23947,Indian 1954 / UTM zone 47N,Indian 1954 / UTM 47N,,,Myanmar (Burma) - east of 96 deg East; Thailand - west of 102 deg East.,projected 2D,,,East,North,E,N,9001,,4239,16047,1995-06-02 00:00:00,,EPSG,,
-23948,Indian 1954 / UTM zone 48N,Indian 1954 / UTM 48N,,,Thailand - east of 102 deg East.,projected 2D,,,East,North,E,N,9001,,4239,16048,1995-06-02 00:00:00,,EPSG,,
-24047,Indian 1975 / UTM zone 47N,Indian 1975 / UTM 47N,,,Thailand - west of 102 deg East.,projected 2D,,,East,North,E,N,9001,,4240,16047,1995-06-02 00:00:00,,EPSG,,
-24048,Indian 1975 / UTM zone 48N,Indian 1975 / UTM 48N,,,Thailand - east of 102 deg East.,projected 2D,,,East,North,E,N,9001,,4240,16048,1995-06-02 00:00:00,,EPSG,,
-24100,Jamaica 1875 / Jamaica (Old Grid),Jamaica 1875 / Old Grid,,,Jamaica.,projected 2D,,,East,North,E,N,9005,,4241,19909,1995-06-02 00:00:00,,EPSG,Superseded by 24200 (JAD69 / Jamaica National Grid).,
-24200,JAD69 / Jamaica National Grid,JAD69 / Jamaica Grid,,,Jamaica.,projected 2D,,,East,North,E,N,9001,,4242,19910,1995-06-02 00:00:00,,EPSG,Supersedes 24100 (JAD69 / Jamaica National Grid).,
-24305,Kalianpur 1937 / UTM zone 45N,Kalianpur 37 / UTM 45N,,,Bangladesh - west of 90deg East.,projected 2D,,,East,North,E,N,9001,,4144,16045,1999-10-20 00:00:00,,EPSG,,
-24306,Kalianpur 1937 / UTM zone 46N,Kalianpur 37 / UTM 46N,,,Bangladesh - east of 90deg East.,projected 2D,,,East,North,E,N,9001,,4144,16046,1999-10-20 00:00:00,,EPSG,,
-24311,Kalianpur 1962 / UTM zone 41N,Kalianpur 62 / UTM 41N,,,Pakistan - west of 66deg East.,projected 2D,,,East,North,E,N,9001,,4145,16041,1999-10-20 00:00:00,,EPSG,,
-24312,Kalianpur 1962 / UTM zone 42N,Kalianpur 62 / UTM 42N,,,Pakistan - between 66 and 72deg East.,projected 2D,,,East,North,E,N,9001,,4145,16042,1999-10-20 00:00:00,,EPSG,,
-24313,Kalianpur 1962 / UTM zone 43N,Kalianpur 62 / UTM 43N,,,Pakistan - east of 72deg East.,projected 2D,,,East,North,E,N,9001,,4145,16043,1999-10-20 00:00:00,,EPSG,,
-24342,Kalianpur 1975 / UTM zone 42N,Kalianpur 75 / UTM 42N,,,India - west of 72deg East.,projected 2D,,,East,North,E,N,9001,,4146,16042,1999-10-20 00:00:00,,EPSG,,
-24343,Kalianpur 1975 / UTM zone 43N,Kalianpur 75 / UTM 43N,,,India - between 72 and 78deg East.,projected 2D,,,East,North,E,N,9001,,4146,16043,1999-10-20 00:00:00,,EPSG,,
-24344,Kalianpur 1975 / UTM zone 44N,Kalianpur 75 / UTM 44N,,,India - between 78 and 84deg East.,projected 2D,,,East,North,E,N,9001,,4146,16044,1999-10-20 00:00:00,,EPSG,,
-24345,Kalianpur 1975 / UTM zone 45N,Kalianpur 75 / UTM 45N,,,India - between 84 and 90deg East.,projected 2D,,,East,North,E,N,9001,,4146,16045,1999-10-20 00:00:00,,EPSG,,
-24346,Kalianpur 1975 / UTM zone 46N,Kalianpur 75 / UTM 46N,,,India - between 90 and 96deg East.,projected 2D,,,East,North,E,N,9001,,4146,16046,1999-10-20 00:00:00,,EPSG,,
-24347,Kalianpur 1975 / UTM zone 47N,Kalianpur 75 / UTM 47N,,,India - east of 96deg East.,projected 2D,,,East,North,E,N,9001,,4146,16047,1999-10-20 00:00:00,,EPSG,,
-24370,Kalianpur 1880 / India zone 0,Kalianpur / India 0,,,Pakistan north of 35 deg 35 min North.,projected 2D,,,East,North,E,N,9084,,4243,18110,1999-10-20 00:00:00,,EPSG,,97.23
-24371,Kalianpur 1880 / India zone I,Kalianpur / India I,,,India north of 28 deg North; Pakistan 28 deg to 35 deg 35 min North.,projected 2D,,,East,North,E,N,9084,,4243,18111,1999-10-20 00:00:00,,EPSG,,97.23
-24372,Kalianpur 1880 / India zone IIa,Kalianpur / India IIa,,,India - between 21 deg and 28 deg North and  west of 82 deg East; Pakistan - south of 28 deg North.,projected 2D,,,East,North,E,N,9084,,4243,18112,1999-10-20 00:00:00,,EPSG,,97.23
-24373,Kalianpur 1880 / India zone III,Kalianpur / India III,,,India - between 15 deg and 21 deg North.,projected 2D,,,East,North,E,N,9084,,4243,18114,1999-10-20 00:00:00,,EPSG,,97.23
-24374,Kalianpur 1880 / India zone IV,Kalianpur / India IV,,,India - south of 15 deg North.,projected 2D,,,East,North,E,N,9084,,4243,18116,1999-10-20 00:00:00,,EPSG,,97.23
-24375,Kalianpur 1937 / India zone IIb,Kalianpur 37 / India IIb,,,Bangladesh.,projected 2D,,,East,North,E,N,9001,,4144,18238,1999-10-20 00:00:00,,EPSG,Used by Bangladesh since metrication.  Metric conversion applies A.R.Clarke's Indian foot-British foot ratio of 0.99999566 and Benoit's 1895 British inch-metre ratio of 39.370115 rounded as Ind ft = 0.30479841m exactly.,97.23
-24376,Kalianpur 1962 / India zone I,Kalianpur 62 / India I,,,Pakistan - north of 28deg North.,projected 2D,,,East,North,E,N,9001,,4145,18236,1999-10-20 00:00:00,,EPSG,Used by Pakistan since metrication.  Metric conversion applies A.R.Clarke's Indian foot-British foot ratio of 0.99999566 and J.S.Clark's 1865 British inch-metre ratio of 39.369971 rounded by G.Bomford with slight error as Ind ft = 0.3048996m exactly.,97.23
-24377,Kalianpur 1962 / India zone IIa,Kalianpur 62 / India IIa,,,Pakistan - south of 28deg North.,projected 2D,,,East,North,E,N,9001,,4145,18237,1999-10-20 00:00:00,,EPSG,Used by Pakistan since metrication.  Metric conversion applies A.R.Clarke's Indian foot-British foot ratio of 0.99999566 and J.S.Clark's 1865 British inch-metre ratio of 39.369971 rounded by G.Bomford with slight error as Ind ft = 0.3048996m exactly.,97.23
-24378,Kalianpur 1975 / India zone I,Kalianpur 75 / India I,,,India - north of 28deg North and west of 82deg East.,projected 2D,,,East,North,E,N,9001,,4146,18231,1999-10-20 00:00:00,,EPSG,Used by India since metrication.  Metric conversion applies A.R.Clarke's Indian foot-British foot ratio of 0.99999566 and J.S.Clark's 1865 British inch-metre ratio of 39.369971 rounded as 1 Ind ft = 0.3048995m exactly.,97.23
-24379,Kalianpur 1975 / India zone IIa,Kalianpur 75 / India IIa,,,India - between 28deg and 21deg North and west of 82deg East.,projected 2D,,,East,North,E,N,9001,,4146,18232,1999-10-20 00:00:00,,EPSG,Used by India since metrication.  Metric conversion applies A.R.Clarke's Indian foot-British foot ratio of 0.99999566 and J.S.Clark's 1865 British inch-metre ratio of 39.369971 rounded as 1 Ind ft = 0.3048995m exactly.,97.23
-24380,Kalianpur 1975 / India zone IIb,Kalianpur 75 / India IIb,,,India - north of 21deg North and east of 82deg East.,projected 2D,,,East,North,E,N,9001,,4146,18235,1999-10-20 00:00:00,,EPSG,Used by India since metrication.  Metric conversion applies A.R.Clarke's Indian foot-British foot ratio of 0.99999566 and J.S.Clark's 1865 British inch-metre ratio of 39.369971 rounded as 1 Ind ft = 0.3048995m exactly.,97.23
-24381,Kalianpur 1975 / India zone III,Kalianpur 75 / India III,,,India - between 21deg and 15deg North.,projected 2D,,,East,North,E,N,9001,,4146,18233,1999-10-20 00:00:00,,EPSG,Used by India since metrication.  Metric conversion applies A.R.Clarke's Indian foot-British foot ratio of 0.99999566 and J.S.Clark's 1865 British inch-metre ratio of 39.369971 rounded as 1 Ind ft = 0.3048995m exactly.,97.23
-24382,Kalianpur 1880 / India zone IIb,Kalianpur / India IIb,,,Bangladesh; India - north of 22 deg North and east of 82 deg East; Myanmar (Burma) - north of 22 deg North.,projected 2D,,,East,North,E,N,9084,,4243,18113,1999-10-20 00:00:00,,EPSG,,97.23
-24383,Kalianpur 1975 / India zone IV,Kalianpur 75 / India IV,,,India - south of 21deg North.,projected 2D,,,East,North,E,N,9001,,4146,18234,1999-10-20 00:00:00,,EPSG,Used by India since metrication.  Metric conversion applies A.R.Clarke's Indian foot-British foot ratio of 0.99999566 and J.S.Clark's 1865 British inch-metre ratio of 39.369971 rounded as 1 Ind ft = 0.3048995m exactly.,97.23
-24500,Kertau / Singapore Grid,,,,Singapore.,projected 2D,,,East,North,E,N,9001,,4245,19920,1995-06-02 00:00:00,,EPSG,,
-24547,Kertau / UTM zone 47N,,,,Malaysia - West Malaysia west of 102 deg East.,projected 2D,,,East,North,E,N,9001,,4245,16047,1995-06-02 00:00:00,,EPSG,,
-24548,Kertau / UTM zone 48N,,,,Malaysia - West Malaysia east of 102 deg East.,projected 2D,,,East,North,E,N,9001,,4245,16048,1995-07-21 00:00:00,,EPSG,,95.192
-24571,Kertau / R.S.O. Malaya (ch),,,,Malaysia - West Malaysia,projected 2D,,,East,North,E,N,9062,,4245,19935,1999-10-20 00:00:00,,EPSG,Adopts metric conversion of 39.370113 inches per metre.,97.231
-24600,KOC Lambert,,,,Kuwait.,projected 2D,,,East,North,E,N,9001,,4246,19906,1996-04-12 00:00:00,,EPSG,,
-24718,La Canoa / UTM zone 18N,,,,Venezuela - west of 72 deg West.,projected 2D,,,East,North,E,N,9001,,4247,16018,1999-10-20 00:00:00,,EPSG,Sometimes referred to as PSAD56 / UTM zone 18N.,
-24719,La Canoa / UTM zone 19N,,,,Venezuela - between 72 and 66 deg West.,projected 2D,,,East,North,E,N,9001,,4247,16019,1999-10-20 00:00:00,,EPSG,Sometimes referred to as PSAD56 / UTM zone 19N.,
-24720,La Canoa / UTM zone 20N,,,,Venezuela - east of 66 deg West.,projected 2D,,,East,North,E,N,9001,,4247,16020,1995-06-02 00:00:00,,EPSG,Sometimes referred to as PSAD56 / UTM zone 20N.,
-24818,PSAD56 / UTM zone 18N,,,,South America (Ecuador;  [Venezuela]) 78deg West to 72deg West.,projected 2D,,,East,North,E,N,9001,,4248,16018,1995-06-02 00:00:00,,EPSG,In Venezuela also known as La Canoa / UTM zone 18N.,
-24819,PSAD56 / UTM zone 19N,,,,South America (Netherlands Antilles; [Venezuela]) 72deg West  to 66deg West.,projected 2D,,,East,North,E,N,9001,,4248,16019,1995-06-02 00:00:00,,EPSG,In Venezuela also known as La Canoa / UTM zone 19N.,
-24820,PSAD56 / UTM zone 20N,,,,South America (Guyana; [Venezuela]) 66deg West  to 60deg West.,projected 2D,,,East,North,E,N,9001,,4248,16020,1995-06-02 00:00:00,,EPSG,In Venezuela also known as La Canoa / UTM zone 20N.,
-24821,PSAD56 / UTM zone 21N,,,,South America (Guyana; Suriname) 60deg West  to 54deg West.,projected 2D,,,East,North,E,N,9001,,4248,16021,1995-06-02 00:00:00,,EPSG,,
-24877,PSAD56 / UTM zone 17S,,,,South America (Chile; Ecuador; Peru) 84deg West  to 78deg West.,projected 2D,,,East,North,E,N,9001,,4248,16117,1995-06-02 00:00:00,,EPSG,,
-24878,PSAD56 / UTM zone 18S,,,,South America (Chile; Ecuador; Peru) 78deg West  to 72deg West.,projected 2D,,,East,North,E,N,9001,,4248,16118,1995-06-02 00:00:00,,EPSG,,
-24879,PSAD56 / UTM zone 19S,,,,South America (Bolivia; Chile; Peru) 72deg West  to 66deg West.,projected 2D,,,East,North,E,N,9001,,4248,16119,1995-06-02 00:00:00,,EPSG,,
-24880,PSAD56 / UTM zone 20S,,,,South America (Bolivia) 66deg West  to 60deg West.,projected 2D,,,East,North,E,N,9001,,4248,16120,1995-06-02 00:00:00,,EPSG,,
-24882,PSAD56 / UTM zone 22S,,,,Brazil - offshore Amazon Cone,projected 2D,,,East,North,E,N,9001,,4248,16122,1999-04-22 00:00:00,,EPSG,,
-24891,PSAD56 / Peru west zone,,,,Peru west of 79 deg West.,projected 2D,,,East,North,X,Y,9001,,4248,18161,1995-06-02 00:00:00,,EPSG,,
-24892,PSAD56 / Peru central zone,PSAD56 / Peru central,,,Peru 79 to 73 deg West.,projected 2D,,,East,North,X,Y,9001,,4248,18162,1995-06-02 00:00:00,,EPSG,,
-24893,PSAD56 / Peru east zone,,,,Peru east of 73 deg West.,projected 2D,,,East,North,X,Y,9001,,4248,18163,1995-06-02 00:00:00,,EPSG,,
-25000,Leigon / Ghana Metre Grid,Leigon / Ghana Grid,,,Ghana.,projected 2D,,,East,North,E,N,9001,,4250,19904,1995-06-02 00:00:00,,EPSG,,
-25231,Lome / UTM zone 31N,,,,Togo.,projected 2D,,,East,North,E,N,9001,,4252,16031,1995-06-02 00:00:00,,EPSG,,
-25391,Luzon 1911 / Philippines zone I,Luzon / Philippines I,,,Philippines - west of 118 deg East.,projected 2D,,,East,North,X,Y,9001,,4253,18171,1995-06-02 00:00:00,,EPSG,,
-25392,Luzon 1911 / Philippines zone II,Luzon / Philippines II,,,Philippines - Palawan; Calamian Islands.,projected 2D,,,East,North,X,Y,9001,,4253,18172,1995-06-02 00:00:00,,EPSG,,
-25393,Luzon 1911 / Philippines zone III,Luzon / Philippines III,,,Philippines - Luzon (except SE part;); Mindoro.,projected 2D,,,East,North,X,Y,9001,,4253,18173,1995-06-02 00:00:00,,EPSG,,
-25394,Luzon 1911 / Philippines zone IV,Luzon / Philippines IV,,,Philippines - SE Luzon; Tablas; Masbate; Panay; Cebu; Negros; west Mindanao.,projected 2D,,,East,North,X,Y,9001,,4253,18174,1995-06-02 00:00:00,,EPSG,,
-25395,Luzon 1911 / Philippines zone V,Luzon / Philippines V,,,Philippines - east Mindanao; Bohol; Samar.,projected 2D,,,East,North,X,Y,9001,,4253,18175,1995-06-02 00:00:00,,EPSG,,
-25700,Makassar (Jakarta) / NEIEZ,Makassar / NEIEZ,,,Indonesia - south west Sulawesi.,projected 2D,,,East,North,X,Y,9001,,4804,19905,1995-06-02 00:00:00,,EPSG,,
-25828,ETRF89 / UTM zone 28N,,,,Europe - 18deg West to 12deg West - United Kingdom (UKCS) offshore.,projected 2D,,,East,North,E,N,9001,,4258,16028,1999-04-22 00:00:00,,EPSG,,99.11
-25829,ETRF89 / UTM zone 29N,,,,Europe - 12deg West to 6deg West - United Kingdom (UKCS) offshore.,projected 2D,,,East,North,E,N,9001,,4258,16029,1999-04-22 00:00:00,,EPSG,,99.11
-25830,ETRF89 / UTM zone 30N,,,,Europe - 6deg West to 0deg.,projected 2D,,,East,North,E,N,9001,,4258,16030,1999-04-22 00:00:00,,EPSG,,99.11
-25831,ETRF89 / UTM zone 31N,,,,Europe - 0deg to 6deg East - Norway.,projected 2D,,,East,North,E,N,9001,,4258,16031,1999-04-22 00:00:00,,EPSG,,99.11
-25832,ETRF89 / UTM zone 32N,,,,Europe - 6deg East  to 12deg East - Norway.,projected 2D,,,East,North,E,N,9001,,4258,16032,1999-04-22 00:00:00,,EPSG,,99.11
-25833,ETRF89 / UTM zone 33N,,,,Europe - 12deg East  to 18deg East - Norway.,projected 2D,,,East,North,E,N,9001,,4258,16033,1999-04-22 00:00:00,,EPSG,,99.11
-25834,ETRF89 / UTM zone 34N,,,,Europe - 18deg East  to 24deg East - Norway.,projected 2D,,,East,North,E,N,9001,,4258,16034,1999-04-22 00:00:00,,EPSG,,99.11
-25835,ETRF89 / UTM zone 35N,,,,Europe - 24deg East  to 30deg East - Norway.,projected 2D,,,East,North,E,N,9001,,4258,16035,1999-04-22 00:00:00,,EPSG,,99.11
-25836,ETRF89 / UTM zone 36N,,,,Europe - 30deg East  to 36deg East.,projected 2D,,,East,North,E,N,9001,,4258,16036,1999-04-22 00:00:00,,EPSG,,99.11
-25837,ETRF89 / UTM zone 37N,,,,Europe - 36deg East  to 42deg East.,projected 2D,,,East,North,E,N,9001,,4258,16037,1999-04-22 00:00:00,,EPSG,,99.11
-25838,ETRF89 / UTM zone 38N,,,,Europe - 42deg East  to 48deg East.,projected 2D,,,East,North,E,N,9001,,4258,16038,1999-04-22 00:00:00,,EPSG,,99.11
-25884,ETRF89 / TM Baltic93,,,,Estonia;  Latvia;  Lithuania.,projected 2D,,,North,East,X,Y,9001,,4258,19939,1999-04-22 00:00:00,http://www.geo.ut.ee/~raivo/estcoord.html,EPSG,Used as a common coordinate system for the Baltic states and for medium and small scale mapping in Estonia since 1993.,99.11
-25932,Malongo 1987 / UTM zone 32S,Malongo 1987 / UTM 32S,,,Angola - Cabinda.,projected 2D,,,East,North,E,N,9001,,4259,16132,1995-06-02 00:00:00,,EPSG,,
-26191,Merchich / Nord Maroc,,,,Morocco north of 35 grads (31 deg 30 min) North.,projected 2D,,,East,North,X,Y,9001,,4261,18131,1995-06-02 00:00:00,,EPSG,,
-26192,Merchich / Sud Maroc,,,,Morocco 31grads to 35grads  (27 deg 54 min to 31 deg 30 min) North.,projected 2D,,,East,North,X,Y,9001,,4261,18132,1995-06-02 00:00:00,,EPSG,,
-26193,Merchich / Sahara,,,,Morocco south of 31grads  (27 deg 54 min) North.,projected 2D,,,East,North,X,Y,9001,,4261,18133,1995-06-02 00:00:00,,EPSG,,
-26237,Massawa / UTM zone 37N,,,,Eritrea.,projected 2D,,,East,North,E,N,9001,,4262,16037,1995-06-02 00:00:00,,EPSG,,
-26331,Minna / UTM zone 31N,,,,Nigeria - offshore beyond continental shelf west of 6 deg East.,projected 2D,,,East,North,E,N,9001,,4263,16031,1995-06-02 00:00:00,,EPSG,,
-26332,Minna / UTM zone 32N,,,,Nigeria - offshore beyond continental shelf.,projected 2D,,,East,North,E,N,9001,,4263,16032,1995-06-02 00:00:00,,EPSG,,
-26391,Minna / Nigeria West Belt,Minna / Nigeria West,,,Nigeria west of 6 deg 30 min East.,projected 2D,,,East,North,E,N,9001,,4263,18151,1995-06-02 00:00:00,,EPSG,,
-26392,Minna / Nigeria Mid Belt,,,,Nigeria between 6 deg 30 min and 10 deg 30 min East.,projected 2D,,,East,North,E,N,9001,,4263,18152,1995-06-02 00:00:00,,EPSG,,
-26393,Minna / Nigeria East Belt,Minna / Nigeria East,,,Nigeria east of 10 deg 30 min East.,projected 2D,,,East,North,E,N,9001,,4263,18153,1995-06-02 00:00:00,,EPSG,,
-26432,Mhast / UTM zone 32S,,,,Angola - Cabinda.,projected 2D,,,East,North,E,N,9001,,4264,16132,1995-06-02 00:00:00,,EPSG,,
-26591,Monte Mario (Rome) / Italy zone 1,Monte Mario / Italy 1,,,Italy west of 12 deg East.,projected 2D,,,East,North,X,Y,9001,,4806,18121,1995-06-02 00:00:00,,EPSG,,
-26592,Monte Mario (Rome) / Italy zone 2,Monte Mario / Italy 2,,,Italy east of 12 deg East.,projected 2D,,,East,North,X,Y,9001,,4806,18122,1995-06-02 00:00:00,,EPSG,,
-26632,M'poraloko / UTM zone 32N,M'poraloko / UTM 32N,,,Gabon - north of equator.,projected 2D,,,East,North,E,N,9001,,4266,16032,1995-06-02 00:00:00,,EPSG,,
-26692,M'poraloko / UTM zone 32S,M'poraloko / UTM 32S,,,Gabon - south of equator.,projected 2D,,,East,North,E,N,9001,,4266,16132,1995-06-02 00:00:00,,EPSG,,
-26703,NAD27 / UTM zone 3N,,,,North America - United States (USA) - Alaska - 168deg West  to 162deg West.,projected 2D,,,East,North,E,N,9001,,4267,16003,1995-06-02 00:00:00,,EPSG,,
-26704,NAD27 / UTM zone 4N,,,,North America - United States (USA) - Alaska - 162deg West  to 156deg West.,projected 2D,,,East,North,E,N,9001,,4267,16004,1995-06-02 00:00:00,,EPSG,,
-26705,NAD27 / UTM zone 5N,,,,North America - United States (USA) - Alaska - 156deg West  to 150deg West.,projected 2D,,,East,North,E,N,9001,,4267,16005,1995-06-02 00:00:00,,EPSG,,
-26706,NAD27 / UTM zone 6N,,,,North America - United States (USA) - Alaska - 150deg West  to 144deg West.,projected 2D,,,East,North,E,N,9001,,4267,16006,1995-06-02 00:00:00,,EPSG,,
-26707,NAD27 / UTM zone 7N,,,,North America - Canada; United States (USA) - Alaska - 144deg West  to 138deg West.,projected 2D,,,East,North,E,N,9001,,4267,16007,1995-06-02 00:00:00,,EPSG,,
-26708,NAD27 / UTM zone 8N,,,,North America - Canada; United States (USA) - 138deg West  to 132deg West.,projected 2D,,,East,North,E,N,9001,,4267,16008,1995-06-02 00:00:00,,EPSG,,
-26709,NAD27 / UTM zone 9N,,,,North America - Canada; United States (USA) - 132deg West  to 126deg West.,projected 2D,,,East,North,E,N,9001,,4267,16009,1995-06-02 00:00:00,,EPSG,,
-26710,NAD27 / UTM zone 10N,,,,North America - Canada; United States (USA) - 130deg West  to 120deg West.,projected 2D,,,East,North,E,N,9001,,4267,16010,1995-06-02 00:00:00,,EPSG,,
-26711,NAD27 / UTM zone 11N,,,,North America - Canada; Mexico; United States (USA) - 120deg West  to 114deg West.,projected 2D,,,East,North,E,N,9001,,4267,16011,1995-06-02 00:00:00,,EPSG,,
-26712,NAD27 / UTM zone 12N,,,,North America - Canada; Mexico; United States (USA) - 114deg West  to 108deg West.,projected 2D,,,East,North,E,N,9001,,4267,16012,1995-06-02 00:00:00,,EPSG,,
-26713,NAD27 / UTM zone 13N,,,,North America - Canada; Mexico; United States (USA) - 108deg West  to 102deg West.,projected 2D,,,East,North,E,N,9001,,4267,16013,1995-06-02 00:00:00,,EPSG,,
-26714,NAD27 / UTM zone 14N,,,,North America - Canada; Mexico; United States (USA) - 102deg West  to 96deg West.,projected 2D,,,East,North,E,N,9001,,4267,16014,1995-06-02 00:00:00,,EPSG,,
-26715,NAD27 / UTM zone 15N,,,,North America - Canada; Mexico; United States (USA) - 96deg West  to 90deg West.,projected 2D,,,East,North,E,N,9001,,4267,16015,1995-06-02 00:00:00,,EPSG,In Ontario superseded by NAD27(76) / UTM zone 15N (code 227).,
-26716,NAD27 / UTM zone 16N,,,,North America - Canada; Mexico; United States (USA) - 90deg West  to 84deg West.,projected 2D,,,East,North,E,N,9001,,4267,16016,1995-06-02 00:00:00,,EPSG,In Ontario superseded by NAD27(76) / UTM zone 16N (code 228).,
-26717,NAD27 / UTM zone 17N,,,,North America - Canada; Mexico; United States (USA) - 84deg West  to 78deg West.,projected 2D,,,East,North,E,N,9001,,4267,16017,1995-06-02 00:00:00,,EPSG,In Ontario superseded by NAD27(76) / UTM zone 17N (code 229).  In Quebec superseded by NAD27(CGQ77) / UTM zone 17N (code 231).,
-26718,NAD27 / UTM zone 18N,,,,North America - Canada; United States (USA) - 78deg West  to 72deg West.,projected 2D,,,East,North,E,N,9001,,4267,16018,1995-06-02 00:00:00,,EPSG,In Ontario superseded by NAD27(76) / UTM zone 18N (code 230).  In Quebec superseded by NAD27(CGQ77) / UTM zone 18N (code 232).,
-26719,NAD27 / UTM zone 19N,,,,North America - Canada; United States (USA) - 72deg West  to 66deg West.,projected 2D,,,East,North,E,N,9001,,4267,16019,1995-06-02 00:00:00,,EPSG,In Quebec superseded by NAD27(CGQ77) / UTM zone 19N (code 233).,
-26720,NAD27 / UTM zone 20N,,,,North America - Antigua and Barbuda - Barbuda.  British Virgin Islands (military).  Canada; United States (USA) offshore Atlantic - 66deg West  to 60deg West.,projected 2D,,,East,North,E,N,9001,,4267,16020,1995-06-02 00:00:00,,EPSG,In Quebec superseded by NAD27(CGQ77) / UTM zone 20N (code 234).,
-26721,NAD27 / UTM zone 21N,,,,North America - Canada - 60deg West  to 54deg West.,projected 2D,,,East,North,E,N,9001,,4267,16021,1995-06-02 00:00:00,,EPSG,In Quebec superseded by NAD27(CGQ77) / UTM zone 21N (code 235).,
-26722,NAD27 / UTM zone 22N,,,,North America - Canada - 54deg West  to 48deg West.,projected 2D,,,East,North,E,N,9001,,4267,16022,1995-06-02 00:00:00,,EPSG,,
-26729,NAD27 / Alabama East,,,,United States (USA) - Alabama - AL_E - counties east of approx 86d 37m West - Barbour; Bullock; Calhoun; Chambers; Cherokee; Clay; Cleburne; Coffee; Coosa; Covington; Crenshaw; Dale; De Kalb; Elmore; Etowah; Geneva; Henry; Houston; Jackson; Lee; Macon; Madison; Marshall; Montgomery; Pike; Randolph; Russell; St.Clair; Talladega; Tallapoosa,projected 2D,,,East,North,X,Y,9003,,4267,10101,1995-06-02 00:00:00,,EPSG,,
-26730,NAD27 / Alabama West,,,,United States (USA) - Alabama - AL_W - counties west of approx 86d 37m West - Autauga; Baldwin; Bibb; Blount; Butler; Chilton; Choctaw; Clarke; Colbert; Conecuh; Cullman; Dallas; Escambia; Fayette; Franklin; Greene; Hale; Jefferson; Lamar; Lauderdale; Lawrence; Limestone; Lowndes; Marengo; Marion; Mobile; Monroe; Morgan; Perry; Pickens; Shelby; Sumter; Tuscaloosa; Walker; Washington; Wilcox; Winston,projected 2D,,,East,North,X,Y,9003,,4267,10102,1995-06-02 0 [...]
-26731,NAD27 / Alaska zone 1,,,,United States - Alaska - Panhandle.,projected 2D,,,East,North,X,Y,9003,,4267,15001,1995-06-02 00:00:00,,EPSG,,
-26732,NAD27 / Alaska zone 2,,,,United States - Alaska - 141deg to 144deg West.,projected 2D,,,East,North,X,Y,9003,,4267,15002,1995-06-02 00:00:00,,EPSG,,
-26733,NAD27 / Alaska zone 3,,,,United States - Alaska - 144deg to 148deg West.,projected 2D,,,East,North,X,Y,9003,,4267,15003,1995-06-02 00:00:00,,EPSG,,
-26734,NAD27 / Alaska zone 4,,,,United States - Alaska - 148deg to 152deg West.,projected 2D,,,East,North,X,Y,9003,,4267,15004,1995-06-02 00:00:00,,EPSG,,
-26735,NAD27 / Alaska zone 5,,,,United States - Alaska - 152deg to 156deg West.,projected 2D,,,East,North,X,Y,9003,,4267,15005,1995-06-02 00:00:00,,EPSG,,
-26736,NAD27 / Alaska zone 6,,,,United States - Alaska - 156deg to 160deg West.,projected 2D,,,East,North,X,Y,9003,,4267,15006,1995-06-02 00:00:00,,EPSG,,
-26737,NAD27 / Alaska zone 7,,,,United States - Alaska - 160deg to 164deg West.,projected 2D,,,East,North,X,Y,9003,,4267,15007,1995-06-02 00:00:00,,EPSG,,
-26738,NAD27 / Alaska zone 8,,,,United States - Alaska - 164deg to 168deg West; north of 54d 30m North.,projected 2D,,,East,North,X,Y,9003,,4267,15008,1995-06-02 00:00:00,,EPSG,,
-26739,NAD27 / Alaska zone 9,,,,United States - Alaska - West of 168deg West and north of 54d 30m North.,projected 2D,,,East,North,X,Y,9003,,4267,15009,1995-06-02 00:00:00,,EPSG,,
-26740,NAD27 / Alaska zone 10,,,,United States - Alaska - Aleutian Islands.,projected 2D,,,East,North,X,Y,9003,,4267,15010,1995-06-02 00:00:00,,EPSG,,
-26741,NAD27 / California zone I,NAD27 / California I,,,United States (USA) - California - CA_1 - counties north of approx 40 deg North - Del Norte; Humboldt; Lassen; Modoc; Plumas; Shasta; Siskiyou; Tehama; Trinity,projected 2D,,,East,North,X,Y,9003,,4267,10401,1995-06-02 00:00:00,,EPSG,,
-26742,NAD27 / California zone II,NAD27 / California II,,,United States (USA) - California - CA_2 - counties between approx 40 deg & 38d 15m North - Alpine; Amador; Butte; Colusa; El Dorado; Glenn; Lake; Mendocino; Napa; Nevada; Placer; Sacramento; Sierra; Solano; Sonoma; Sutter; Yolo; Yuba,projected 2D,,,East,North,X,Y,9003,,4267,10402,1995-06-02 00:00:00,,EPSG,,
-26743,NAD27 / California zone III,NAD27 / California III,,,United States (USA) - California - CA_3 - counties between approx 38d 15m & 37d North - Alameda; Calaveras; Contra Costa; Madera; Marin; Mariposa; Merced; Mono; San Francisco; San Joaquin; San Mateo; Santa Clara; Santa Cruz; Stanislaus; Tuolumne,projected 2D,,,East,North,X,Y,9003,,4267,10403,1995-06-02 00:00:00,,EPSG,,
-26744,NAD27 / California zone IV,NAD27 / California IV,,,United States (USA) - California - CA_4 - counties between approx 37d & 35d 30m North - Fresno; Inyo; Kings; Monterey; San Benito; Tulare,projected 2D,,,East,North,X,Y,9003,,4267,10404,1995-06-02 00:00:00,,EPSG,,
-26745,NAD27 / California zone V,NAD27 / California V,,,United States (USA) - California - CA_5 - counties between approx 35d 50m & 34d North - Kern; San Bernardino; San Luis Obispo; Santa Barbara; Ventura,projected 2D,,,East,North,X,Y,9003,,4267,10405,1995-06-02 00:00:00,,EPSG,,
-26746,NAD27 / California zone VI,NAD27 / California VI,,,United States (USA) - California - CA_6 - counties south of approx 38d 30m North - Imperial; Orange; Riverside; San Diego,projected 2D,,,East,North,X,Y,9003,,4267,10406,1995-06-02 00:00:00,,EPSG,,
-26747,NAD27 / California zone VII,NAD27 / California VII,,,United States - California - Los Angeles.,projected 2D,,,East,North,X,Y,9003,,4267,10407,1995-06-02 00:00:00,,EPSG,,
-26748,NAD27 / Arizona East,,,,United States (USA) - Arizona - AZ_E - counties east of approx 110d 45m West - Apache; Cochise; Gila; Graham; Greenlee; Navajo,projected 2D,,,East,North,X,Y,9003,,4267,10201,1995-08-22 00:00:00,,EPSG,,95.25
-26749,NAD27 / Arizona Central,,,,United States (USA) - Arizona - AZ_C - counties between approx 110d 45m and 113d 20m West - Coconino; Maricopa; Pima; Pinal; Santa Cruz; Yavapai,projected 2D,,,East,North,X,Y,9003,,4267,10202,1995-08-22 00:00:00,,EPSG,,95.25
-26750,NAD27 / Arizona West,,,,United States (USA) - Arizona - AZ_W - counties west of approx 113d 20m West - La Paz; Mohave; Yuma,projected 2D,,,East,North,X,Y,9003,,4267,10203,1995-08-22 00:00:00,,EPSG,,95.25
-26751,NAD27 / Arkansas North,,,,United States (USA) - Arkansas - AR_N - counties north of approx 34d 50m North - Baxter; Benton; Boone; Carroll; Clay; Cleburne; Conway; Craighead; Crawford; Crittenden; Cross; Faulkner; Franklin; Fulton; Greene; Independence; Izard; Jackson; Johnson; Lawrence; Logan; Madison; Marion; Mississippi; Newton; Perry; Poinsett; Pope; Randolph; Scott; Searcy; Sebastian; Sharp; St. Francis; Stone; Van Buren; Washington; White; Woodruff; Yell,projected 2D,,,East,No [...]
-26752,NAD27 / Arkansas South,,,,United States (USA) - Arkansas - AR_S - counties south of approx 34d 50m North - Arkansas; Ashley; Bradley; Calhoun; Chicot; Clark; Cleveland; Columbia; Dallas; Desha; Drew; Garland; Grant; Hempstead; Hot Spring; Howard; Jefferson; Lafayette; Lee; Lincoln; Little River; Lonoke; Miller; Monroe; Montgomery; Nevada; Ouachita; Phillips; Pike; Polk; Prairie; Pulaski; Saline; Sevier; Union,projected 2D,,,East,North,X,Y,9003,,4267,10302,1995-06-02 00:00:00,,EPSG,,
-26753,NAD27 / Colorado North,,,,United States (USA) - Colorado - CO_N - counties north of approx 39d 50m North - Adams; Boulder; Gilpin; Grand; Jackson; Larimer; Logan; Moffat; Morgan; Phillips; Rio Blanco; Routt; Sedgwick; Washington; Weld; Yuma,projected 2D,,,East,North,X,Y,9003,,4267,10501,1995-06-02 00:00:00,,EPSG,,
-26754,NAD27 / Colorado Central,,,,United States (USA) - Colorado - CO_C - counties between approx 39d 50m & 38d 30m North - Arapahoe; Chaffee; Cheyenne; Clear Creek; Delta; Denver; Douglas; Eagle; El Paso; Elbert; Fremont; Garfield; Gunnison; Jefferson; Kit Carson; Lake; Lincoln; Mesa; Park; Pitkin; Summit; Teller,projected 2D,,,East,North,X,Y,9003,,4267,10502,1995-06-02 00:00:00,,EPSG,,
-26755,NAD27 / Colorado South,,,,United States (USA) - Colorado - CO_S - counties south of approx 38d 30m North - Alamosa; Archuleta; Baca; Bent; Conejos; Costilla; Crowley; Custer; Dolores; Hinsdale; Huerfano; Kiowa; La Plata; Las Animas; Mineral; Montezuma; Montrose; Otero; Ouray; Prowers; Pueblo; Rio Grande; Saguache; San Juan; San Miguel,projected 2D,,,East,North,X,Y,9003,,4267,10503,1995-06-02 00:00:00,,EPSG,,
-26756,NAD27 / Connecticut,,,,United States (USA) - Connecticut - CT - counties of Fairfield; Hartford; Litchfield; Middlesex; New Haven; New London; Tolland; Windham,projected 2D,,,East,North,X,Y,9003,,4267,10600,1995-06-02 00:00:00,,EPSG,,
-26757,NAD27 / Delaware,,,,United States (USA) - Delaware - DE - counties of Kent; New Castle; Sussex,projected 2D,,,East,North,X,Y,9003,,4267,10700,1995-06-02 00:00:00,,EPSG,,
-26758,NAD27 / Florida East,,,,United States (USA) - Florida - FL_E - counties of Brevard; Broward; Clay; Collier; Dade; Duval; Flagler; Glades; Hendry; Highlands; Indian River; Lake; Martin; Monroe; Nassau; Okeechobee; Orange; Osceola; Palm Beach; Putnam; Seminole; St. Johns; St. Lucie; Volusia,projected 2D,,,East,North,X,Y,9003,,4267,10901,1995-06-02 00:00:00,,EPSG,,
-26759,NAD27 / Florida West,,,,United States (USA) - Florida - FL_W - counties of Charlotte; Citrus; De Soto; Hardee; Hernando; Hillsborough; Lee; Levy; Manatee; Marion; Pasco; Pinellas; Polk; Sarasota; Sumter,projected 2D,,,East,North,X,Y,9003,,4267,10902,1995-06-02 00:00:00,,EPSG,,
-26760,NAD27 / Florida North,,,,United States (USA) - Florida - FL_N - counties of Alachua; Baker; Bay; Bradford; Calhoun; Columbia; Dixie; Escambia; Escambia; Franklin; Gadsden; Gilchrist; Gulf; Hamilton; Holmes; Jackson; Jefferson; Lafayette; Leon; Liberty; Madison; Okaloosa; Santa Rosa; Suwannee; Taylor; Union; Wakulla; Walton; Washington,projected 2D,,,East,North,X,Y,9003,,4267,10903,1995-06-02 00:00:00,,EPSG,,
-26766,NAD27 / Georgia East,,,,United States (USA) - Georgia - GA_E - counties of Appling; Atkinson; Bacon; Baldwin; Brantley; Bryan; Bulloch; Burke; Camden; Candler; Charlton; Chatham; Clinch; Coffee; Columbia; Dodge; Echols; Effingham; Elbert; Emanuel; Evans; Franklin; Glascock; Glynn; Greene; Hancock; Hart; Jeff Davis; Jefferson; Jenkins; Johnson; Lanier; Laurens; Liberty; Lincoln; Long; Madison; McDuffie; McIntosh; Montgomery; Oglethorpe; Pierce; Richmond; Screven; Stephens; Taliaferr [...]
-26767,NAD27 / Georgia West,,,,United States (USA) - Georgia - GA_W - counties of Baker; Banks; Barrow; Bartow; Ben Hill; Berrien; Bibb; Bleckley; Brooks; Butts; Calhoun; Carroll; Catoosa; Chattahoochee; Chattooga; Cherokee; Clarke; Clay; Clayton; Cobb; Colquitt; Cook; Coweta; Crawford; Crisp; Dade; Dawson; De Kalb; Decatur; Dooly; Dougherty; Douglas; Early; Fannin; Fayette; Floyd; Forsyth; Fulton; Gilmer; Gordon; Grady; Gwinnett; Habersham; Hall; Haralson; Harris; Heard; Henry; Houston;  [...]
-26768,NAD27 / Idaho East,,,,United States (USA) - Idaho - ID_E - counties of Bannock; Bear Lake; Bingham; Bonneville; Caribou; Clark; Franklin; Fremont; Jefferson; Madison; Oneida; Power; Teton,projected 2D,,,East,North,X,Y,9003,,4267,11101,1995-06-02 00:00:00,,EPSG,,
-26769,NAD27 / Idaho Central,,,,United States (USA) - daho - ID_C - counties of Blaine; Butte; Camas; Cassia; Custer; Gooding; Jerome; Lemhi; Lincoln; Minidoka; Twin Falls,projected 2D,,,East,North,X,Y,9003,,4267,11102,1995-06-02 00:00:00,,EPSG,,
-26770,NAD27 / Idaho West,,,,United States (USA) - Idaho - ID_W - counties of Ada; Adams; Benewah; Boise; Bonner; Boundary; Canyon; Clearwater; Elmore; Gem; Idaho; Kootenai; Latah; Lewis; Nez Perce; Owyhee; Payette; Shoshone; Valley; Washington,projected 2D,,,East,North,X,Y,9003,,4267,11103,1995-06-02 00:00:00,,EPSG,,
-26771,NAD27 / Illinois East,,,,United States (USA) - Illinois - IL_E - counties of Boone; Champaign; Clark; Clay; Coles; Cook; Crawford; Cumberland; De Kalb; De Witt; Douglas; Du Page; Edgar; Edwards; Effingham; Fayette; Ford; Franklin; Gallatin; Grundy; Hamilton; Hardin; Iroquois; Jasper; Jefferson; Johnson; Kane; Kankakee; Kendall; La Salle; Lake; Lawrence; Livingston; Macon; Marion; Massac; McHenry; McLean; Moultrie; Piatt; Pope; Richland; Saline; Shelby; Vermilion; Wabash; Wayne; Whi [...]
-26772,NAD27 / Illinois West,,,,United States (USA) - Illinois - IL_W - counties of Adams; Alexander; Bond; Brown; Bureau; Calhoun; Carroll; Cass; Christian; Clinton; Fulton; Greene; Hancock; Henderson; Henry; Jackson; Jersey; Jo Daviess; Knox; Lee; Logan; Macoupin; Madison; Marshall; Mason; McDonough; Menard; Mercer; Monroe; Montgomery; Morgan; Ogle; Peoria; Perry; Pike; Pulaski; Putnam; Randolph; Rock Island; Sangamon; Schuyler; Scott; St. Clair; Stark; Stephenson; Tazewell; Union; Warr [...]
-26773,NAD27 / Indiana East,,,,United States (USA) - Indiana - IN_E - counties of Adams; Allen; Bartholomew; Blackford; Brown; Cass; Clark; De Kalb; Dearborn; Decatur; Delaware; Elkhart; Fayette; Floyd; Franklin; Fulton; Grant; Hamilton; Hancock; Harrison; Henry; Howard; Huntington; Jackson; Jay; Jefferson; Jennings; Johnson; Kosciusko; Lagrange; Madison; Marion; Marshall; Miami; Noble; Ohio; Randolph; Ripley; Rush; Scott; Shelby; St. Joseph; Steuben; Switzerland; Tipton; Union; Wabash; W [...]
-26774,NAD27 / Indiana West,,,,United States (USA) - Indiana - IN_W - counties of Benton; Boone; Carroll; Clay; Clinton; Crawford; Daviess; Dubois; Fountain; Gibson; Greene; Hendricks; Jasper; Knox; La Porte; Lake; Lawrence; Martin; Monroe; Montgomery; Morgan; Newton; Orange; Owen; Parke; Perry; Pike; Porter; Posey; Pulaski; Putnam; Spencer; Starke; Sullivan; Tippecanoe; Vanderburgh; Vermillion; Vigo; Warren; Warrick; White,projected 2D,,,East,North,X,Y,9003,,4267,11302,1995-06-02 00:00:0 [...]
-26775,NAD27 / Iowa North,,,,United States (USA) - Iowa - IA_N - counties of Allamakee; Benton; Black Hawk; Boone; Bremer; Buchanan; Buena Vista; Butler; Calhoun; Carroll; Cerro Gordo; Cherokee; Chickasaw; Clay; Clayton; Crawford; Delaware; Dickinson; Dubuque; Emmet; Fayette; Floyd; Franklin; Greene; Grundy; Hamilton; Hancock; Hardin; Howard; Humboldt; Ida; Jackson; Jones; Kossuth; Linn; Lyon; Marshall; Mitchell; Monona; O'Brien; Osceola; Palo Alto; Plymouth; Pocahontas; Sac; Sioux; Story [...]
-26776,NAD27 / Iowa South,,,,United States (USA) - Iowa - IA_S - counties of Adair; Adams; Appanoose; Audubon; Cass; Cedar; Clarke; Clinton; Dallas; Davis; Decatur; Des Moines; Fremont; Guthrie; Harrison; Henry; Iowa; Jasper; Jefferson; Johnson; Keokuk; Lee; Louisa; Lucas; Madison; Mahaska; Marion; Mills; Monroe; Montgomery; Muscatine; Page; Polk; Pottawattamie; Poweshiek; Ringgold; Scott; Shelby; Taylor; Union; Van Buren; Wapello; Warren; Washington; Wayne,projected 2D,,,East,North,X,Y,9 [...]
-26777,NAD27 / Kansas North,,,,United States (USA) - Kansas - KS_N - counties of Atchison; Brown; Cheyenne; Clay; Cloud; Decatur; Dickinson; Doniphan; Douglas; Ellis; Ellsworth; Geary; Gove; Graham; Jackson; Jefferson; Jewell; Johnson; Leavenworth; Lincoln; Logan; Marshall; Mitchell; Morris; Nemaha; Norton; Osborne; Ottawa; Phillips; Pottawatomie; Rawlins; Republic; Riley; Rooks; Russell; Saline; Shawnee; Sheridan; Sherman; Smith; Thomas; Trego; Wabaunsee; Wallace; Washington; Wyandotte,p [...]
-26778,NAD27 / Kansas South,,,,United States (USA) - Kansas - KS_S - counties of Allen; Anderson; Barber; Barton; Bourbon; Butler; Chase; Chautauqua; Cherokee; Clark; Coffey; Comanche; Cowley; Crawford; Edwards; Elk; Finney; Ford; Franklin; Grant; Gray; Greeley; Greenwood; Hamilton; Harper; Harvey; Haskell; Hodgeman; Kearny; Kingman; Kiowa; Labette; Lane; Linn; Lyon; Marion; McPherson; Meade; Miami; Montgomery; Morton; Neosho; Ness; Osage; Pawnee; Pratt; Reno; Rice; Rush; Scott; Sedgwick; [...]
-26779,NAD27 / Kentucky North,,,,United States (USA) - Kentucky - KY_N - counties of Anderson; Bath; Boone; Bourbon; Boyd; Bracken; Bullitt; Campbell; Carroll; Carter; Clark; Elliott; Fayette; Fleming; Franklin; Gallatin; Grant; Greenup; Harrison; Henry; Jefferson; Jessamine; Kenton; Lawrence; Lewis; Mason; Menifee; Montgomery; Morgan; Nicholas; Oldham; Owen; Pendleton; Robertson; Rowan; Scott; Shelby; Spencer; Trimble; Woodford,projected 2D,,,East,North,X,Y,9003,,4267,11601,1995-06-02 00 [...]
-26780,NAD27 / Kentucky South,,,,United States (USA) - Kentucky - KY_S - counties of Adair; Allen; Ballard; Barren; Bell; Boyle; Breathitt; Breckinridge; Butler; Caldwell; Calloway; Carlisle; Casey; Christian; Clay; Clinton; Crittenden; Cumberland; Daviess; Edmonson; Estill; Floyd; Fulton; Garrard; Graves; Grayson; Green; Hancock; Hardin; Harlan; Hart; Henderson; Hickman; Hopkins; Jackson; Johnson; Knott; Knox; Larue; Laurel; Lee; Leslie; Letcher; Lincoln; Livingston; Logan; Lyon; Madison [...]
-26781,NAD27 / Louisiana North,,,,United States (USA) - Louisiana - LA_N - counties of Avoyelles; Bienville; Bossier; Caddo; Caldwell; Catahoula; Claiborne; Concordia; De Soto; East Carroll; Franklin; Grant; Jackson; La Salle; Lincoln; Madison; Morehouse; Natchitoches; Ouachita; Rapides; Red River; Richland; Sabine; Tensas; Union; Vernon; Webster; West Carroll; Winn,projected 2D,,,East,North,X,Y,9003,,4267,11701,1995-06-02 00:00:00,,EPSG,,
-26782,NAD27 / Louisiana South,,,,United States (USA) - Louisiana - LA_S - counties of Acadia; Allen; Ascension; Assumption; Beauregard; Calcasieu; Cameron; East Baton Rouge; East Feliciana; Evangeline; Iberia; Iberville; Jefferson; Jefferson Davis; Lafayette; LaFourche; Livingston; Orleans; Plaquemines; Pointe Coupee; St. Bernard; St. Charles; St. Helena; St. James; St. John the Baptist; St. Landry; St. Martin; St. Mary; St. Tammany; Tangipahoa; Terrebonne; Vermilion; Washington; West Ba [...]
-26783,NAD27 / Maine East,,,,United States (USA) - Maine - ME_E - counties of Aroostook; Hancock; Knox; Penobscot; Piscataquis; Waldo; Washington,projected 2D,,,East,North,X,Y,9003,,4267,11801,1995-06-02 00:00:00,,EPSG,,
-26784,NAD27 / Maine West,,,,United States (USA) - Maine - ME_W - counties of Androscoggin; Cumberland; Franklin; Kennebec; Lincoln; Oxford; Sagadahoc; Somerset; York,projected 2D,,,East,North,X,Y,9003,,4267,11802,1995-06-02 00:00:00,,EPSG,,
-26785,NAD27 / Maryland,,,,United States (USA) - Maryland -MD - counties of Allegany; Anne Arundel; Baltimore; Calvert; Caroline; Carroll; Cecil; Charles; Dorchester; Frederick; Garrett; Harford; Howard; Kent; Montgomery; Prince Georges; Queen Annes; Somerset; St. Marys; Talbot; Washington; Wicomico; Worcester,projected 2D,,,East,North,X,Y,9003,,4267,11900,1995-06-02 00:00:00,,EPSG,,
-26786,NAD27 / Massachusetts Mainland,NAD27 / Massachusetts,,,United States (USA) - Massachusetts - MA_M - counties of Barnstable; Berkshire; Bristol; Essex; Franklin; Hampden; Hampshire; Middlesex; Norfolk; Plymouth; Suffolk; Worcester,projected 2D,,,East,North,X,Y,9003,,4267,12001,1995-06-02 00:00:00,,EPSG,,
-26787,NAD27 / Massachusetts Island,NAD27 / Massachusetts Is,,,United States (USA) - Massachusetts - MA_I - counties of Dukes; Nantucket,projected 2D,,,East,North,X,Y,9003,,4267,12002,1995-06-02 00:00:00,,EPSG,,
-26791,NAD27 / Minnesota North,,,,United States (USA) - Minnesota - MN_N - counties of Beltrami; Clearwater; Cook; Itasca; Kittson; Koochiching; Lake; Lake of the Woods; Mahnomen; Marshall; Norman; Pennington; Polk; Red Lake; Roseau; St. Louis,projected 2D,,,East,North,X,Y,9003,,4267,12201,1995-06-02 00:00:00,,EPSG,,
-26792,NAD27 / Minnesota Central,NAD27 / Minnesota Cent.,,,United States (USA) - Minnesota - MN_C - counties of Aitkin; Becker; Benton; Carlton; Cass; Chisago; Clay; Crow Wing; Douglas; Grant; Hubbard; Isanti; Kanabec; Mille Lacs; Morrison; Otter Tail; Pine; Pope; Stearns; Stevens; Todd; Traverse; Wadena; Wilkin,projected 2D,,,East,North,X,Y,9003,,4267,12202,1995-06-02 00:00:00,,EPSG,,
-26793,NAD27 / Minnesota South,,,,United States (USA) - Minnesota - MN_S - counties of Anoka; Big Stone; Blue Earth; Brown; Carver; Chippewa; Cottonwood; Dakota; Dodge; Faribault; Fillmore; Freeborn; Goodhue; Hennepin; Houston; Jackson; Kandiyohi; Lac Qui Parle; Le Sueur; Lincoln; Lyon; Martin; McLeod; Meeker; Mower; Murray; Nicollet; Nobles; Olmsted; Pipestone; Ramsey; Redwood; Renville; Rice; Rock; Scott; Sherburne; Sibley; Steele; Swift; Wabasha; Waseca; Washington; Watonwan; Winona; W [...]
-26794,NAD27 / Mississippi East,,,,United States (USA) - Mississippi - MS_E - counties of Alcorn; Attala; Benton; Calhoun; Chickasaw; Choctaw; Clarke; Clay; Covington; Forrest; George; Greene; Hancock; Harrison; Itawamba; Jackson; Jasper; Jones; Kemper; Lafayette; Lamar; Lauderdale; Leake; Lee; Lowndes; Marshall; Monroe; Neshoba; Newton; Noxubee; Oktibbeha; Pearl River; Perry; Pontotoc; Prentiss; Scott; Smith; Stone; Tippah; Tishomingo; Union; Wayne; Webster; Winston,projected 2D,,,East,N [...]
-26795,NAD27 / Mississippi West,,,,United States (USA) - Mississippi - MS_W - counties of Adams; Amite; Bolivar; Carroll; Claiborne; Coahoma; Copiah; De Soto; Franklin; Grenada; Hinds; Holmes; Humphreys; Issaquena; Jefferson; Jefferson Davis; Lawrence; Leflore; Lincoln; Madison; Marion; Montgomery; Panola; Pike; Quitman; Rankin; Sharkey; Simpson; Sunflower; Tallahatchie; Tate; Tunica; Walthall; Warren; Washington; Wilkinson; Yalobusha; Yazoo,projected 2D,,,East,North,X,Y,9003,,4267,12302, [...]
-26796,NAD27 / Missouri East,,,,United States (USA) - Missouri - MO_E - counties of Bollinger; Butler; Cape Girardeau; Carter; Clark; Crawford; Dent; Dunklin; Franklin; Gasconade; Iron; Jefferson; Lewis; Lincoln; Madison; Marion; Mississippi; Montgomery; New Madrid; Oregon; Pemiscot; Perry; Pike; Ralls; Reynolds; Ripley; Scott; Shannon; St. Charles; St. Francois; St. Louis; Ste. Genevieve; Stoddard; Warren; Washington; Wayne,projected 2D,,,East,North,X,Y,9003,,4267,12401,1995-06-02 00:00: [...]
-26797,NAD27 / Missouri Central,,,,United States (USA) - Missouri - MO_C - counties of Adair; Audrain; Benton; Boone; Callaway; Camden; Carroll; Chariton; Christian; Cole; Cooper; Dallas; Douglas; Greene; Grundy; Hickory; Howard; Howell; Knox; Laclede; Linn; Livingston; Macon; Maries; Mercer; Miller; Moniteau; Monroe; Morgan; Osage; Ozark; Pettis; Phelps; Polk; Pulaski; Putnam; Randolph; Saline; Schuyler; Scotland; Shelby; Stone; Sullivan; Taney; Texas; Webster; Wright,projected 2D,,,East [...]
-26798,NAD27 / Missouri West,,,,United States (USA) - Missouri - MO_W - counties of Andrew; Atchison; Barry; Barton; Bates; Buchanan; Caldwell; Cass; Cedar; Clay; Clinton; Dade; Daviess; De Kalb; Gentry; Harrison; Henry; Holt; Jackson; Jasper; Johnson; Lafayette; Lawrence; McDonald; Newton; Nodaway; Platte; Ray; St. Clair; Vernon; Worth,projected 2D,,,East,North,X,Y,9003,,4267,12403,1995-06-02 00:00:00,,EPSG,,
-26801,NAD Michigan / Michigan East,NAD27 / Michigan East,,,United States (USA) - Michigan - MI_E - counties of Alcona; Alpena; Arenac; Bay; Cheboygan; Clinton; Crawford; Genesee; Gladwin; Gratiot; Hillsdale; Huron; Ingham; Iosco; Jackson; Lapeer; Lenawee; Livingston; Macomb; Midland; Monroe; Montmorency; Oakland; Ogemaw; Oscoda; Otsego; Presque Isle; Roscommon; Saginaw; Sanilac; Shiawassee; St. Clair; Tuscola; Washtenaw; Wayne,projected 2D,,,East,North,X,Y,9003,,4268,12101,1998-11-11 00: [...]
-26802,NAD Michigan / Michigan Old Central,NAD27 / Michigan Old Cen,,,United States (USA) - Michigan - MI_C - counties of Allegan; Antrim; Barry; Benzie; Berrien; Branch; Calhoun; Cass; Charlevoix; Clare; Eaton; Emmet; Grand Traverse; Ionia; Isabella; Kalamazoo; Kalkaska; Kent; Lake; Leelanau; Manistee; Mason; Mecosta; Missaukee; Montcalm; Muskegon; Newaygo; Oceana; Osceola; Ottawa; St. Joseph; Van Buren; Wexford,projected 2D,,,East,North,X,Y,9003,,4268,12102,1998-11-11 00:00:00,,EPSG,Sup [...]
-26803,NAD Michigan / Michigan West,NAD27 / Michigan West,,,United States (USA) - Michigan - MI_W - counties of Alger; Baraga; Chippewa; Delta; Dickinson; Gogebic; Houghton; Iron; Keweenaw; Luce; Mackinac; Marquette; Menominee; Ontonagon; Schoolcraft,projected 2D,,,East,North,X,Y,9003,,4268,12103,1998-11-11 00:00:00,,EPSG,Superseded by 26811 26812 and 26813.,95.25  97.19  98.22
-26811,NAD Michigan / Michigan North,NAD27 / Michigan North,,,United States (USA) - Michigan - MI_N - counties of Alger; Baraga; Chippewa; Delta; Dickinson; Gogebic; Houghton; Iron; Keweenaw; Luce; Mackinac; Marquette; Menominee; Ontonagon; Schoolcraft,projected 2D,,,East,North,X,Y,9003,,4268,12111,1998-11-11 00:00:00,,EPSG,Supersedes 26801 26802 and 26803.,96.28  98.22
-26812,NAD Michigan / Michigan Central,NAD27 / Michigan Central,,,United States (USA) - Michigan - MI_C - counties of Alcona; Alpena; Antrim; Arenac; Benzie; Charlevoix; Cheboygan; Clare; Crawford; Emmet; Gladwin; Grand Traverse; Iosco; Kalkaska; Lake; Leelanau; Manistee; Mason; Missaukee; Montmorency; Ogemaw; Osceola; Oscoda; Otsego; Presque Isle; Roscommon; Wexford,projected 2D,,,East,North,X,Y,9003,,4268,12112,1998-11-11 00:00:00,,EPSG,Supersedes 26801 26802 and 26803.,96.28  97.19  98.22
-26813,NAD Michigan / Michigan South,NAD27 / Michigan South,,,United States (USA) - Michigan - MI_S - counties of Allegan; Barry; Bay; Berrien; Branch; Calhoun; Cass; Clinton; Eaton; Genesee; Gratiot; Hillsdale; Huron; Ingham; Ionia; Isabella; Jackson; Kalamazoo; Kent; Lapeer; Lenawee; Livingston; Macomb; Mecosta; Midland; Monroe; Montcalm; Muskegon; Newaygo; Oakland; Oceana; Ottawa; Saginaw; Sanilac; Shiawassee; St. Clair; St. Joseph; Tuscola; Van Buren; Washtenaw; Wayne,projected 2D,,,E [...]
-26903,NAD83 / UTM zone 3N,,,,North America - United States (USA) - Alaska - 168deg West  to 162deg West.,projected 2D,,,East,North,E,N,9001,,4269,16003,1995-06-02 00:00:00,,EPSG,,
-26904,NAD83 / UTM zone 4N,,,,North America - United States (USA) - Alaska - 162deg West  to 156deg West.,projected 2D,,,East,North,E,N,9001,,4269,16004,1995-06-02 00:00:00,,EPSG,,
-26905,NAD83 / UTM zone 5N,,,,North America - United States (USA) - Alaska - 156deg West  to 150deg West.,projected 2D,,,East,North,E,N,9001,,4269,16005,1995-06-02 00:00:00,,EPSG,,
-26906,NAD83 / UTM zone 6N,,,,North America - United States (USA) - Alaska - 150deg West  to 144deg West.,projected 2D,,,East,North,E,N,9001,,4269,16006,1995-06-02 00:00:00,,EPSG,,
-26907,NAD83 / UTM zone 7N,,,,North America - Canada; United States (USA) - Alaska - 144deg West  to 138deg West.,projected 2D,,,East,North,E,N,9001,,4269,16007,1995-06-02 00:00:00,,EPSG,,
-26908,NAD83 / UTM zone 8N,,,,North America - Canada; United States (USA) - 138deg West  to 132deg West.,projected 2D,,,East,North,E,N,9001,,4269,16008,1995-06-02 00:00:00,,EPSG,,
-26909,NAD83 / UTM zone 9N,,,,North America - Canada; United States (USA) - 132deg West  to 126deg West.,projected 2D,,,East,North,E,N,9001,,4269,16009,1995-06-02 00:00:00,,EPSG,,
-26910,NAD83 / UTM zone 10N,,,,North America - Canada; United States (USA) - 130deg West  to 120deg West.,projected 2D,,,East,North,E,N,9001,,4269,16010,1995-06-02 00:00:00,,EPSG,,
-26911,NAD83 / UTM zone 11N,,,,North America - Canada; Mexico; United States (USA) - 120deg West  to 114deg West.,projected 2D,,,East,North,E,N,9001,,4269,16011,1995-06-02 00:00:00,,EPSG,,
-26912,NAD83 / UTM zone 12N,,,,North America - Canada; Mexico; United States (USA) - 114deg West  to 108deg West.,projected 2D,,,East,North,E,N,9001,,4269,16012,1995-06-02 00:00:00,,EPSG,,
-26913,NAD83 / UTM zone 13N,,,,North America - Canada; Mexico; United States (USA) - 108deg West  to 102deg West.,projected 2D,,,East,North,E,N,9001,,4269,16013,1995-06-02 00:00:00,,EPSG,,
-26914,NAD83 / UTM zone 14N,,,,North America - Canada; Mexico; United States (USA) - 102deg West  to 96deg West.,projected 2D,,,East,North,E,N,9001,,4269,16014,1995-06-02 00:00:00,,EPSG,,
-26915,NAD83 / UTM zone 15N,,,,North America - Canada; Mexico; United States (USA) - 96deg West  to 90deg West.,projected 2D,,,East,North,E,N,9001,,4269,16015,1995-06-02 00:00:00,,EPSG,,
-26916,NAD83 / UTM zone 16N,,,,North America - Canada; Mexico; United States (USA) - 90deg West  to 84deg West.,projected 2D,,,East,North,E,N,9001,,4269,16016,1995-06-02 00:00:00,,EPSG,,
-26917,NAD83 / UTM zone 17N,,,,North America - Canada; Mexico; United States (USA) - 84deg West  to 78deg West.,projected 2D,,,East,North,E,N,9001,,4269,16017,1995-06-02 00:00:00,,EPSG,,
-26918,NAD83 / UTM zone 18N,,,,North America - Canada; United States (USA) - 78deg West  to 72deg West.,projected 2D,,,East,North,E,N,9001,,4269,16018,1995-06-02 00:00:00,,EPSG,,
-26919,NAD83 / UTM zone 19N,,,,North America - Canada; United States (USA) - 72deg West  to 66deg West.,projected 2D,,,East,North,E,N,9001,,4269,16019,1995-06-02 00:00:00,,EPSG,,
-26920,NAD83 / UTM zone 20N,,,,North America - Canada; United States (USA) offshore Atlantic - 66deg West  to 60deg West.,projected 2D,,,East,North,E,N,9001,,4269,16020,1995-06-02 00:00:00,,EPSG,,
-26921,NAD83 / UTM zone 21N,,,,North America - Canada - 60deg West  to 54deg West.,projected 2D,,,East,North,E,N,9001,,4269,16021,1995-06-02 00:00:00,,EPSG,,
-26922,NAD83 / UTM zone 22N,,,,North America - Canada - Newfoundland - 54deg West  to 48deg West.,projected 2D,,,East,North,E,N,9001,,4269,16022,1995-06-02 00:00:00,,EPSG,,
-26923,NAD83 / UTM zone 23N,,,,North America - Canada offshore Atlantic - 48deg West  to 42deg West.,projected 2D,,,East,North,E,N,9001,,4269,16023,1995-06-02 00:00:00,,EPSG,,
-26929,NAD83 / Alabama East,,,,United States (USA) - Alabama - AL_E - counties east of approx 86d 37m West - Barbour; Bullock; Calhoun; Chambers; Cherokee; Clay; Cleburne; Coffee; Coosa; Covington; Crenshaw; Dale; De Kalb; Elmore; Etowah; Geneva; Henry; Houston; Jackson; Lee; Macon; Madison; Marshall; Montgomery; Pike; Randolph; Russell; St.Clair; Talladega; Tallapoosa,projected 2D,,,East,North,X,Y,9001,,4269,10131,1995-06-02 00:00:00,,EPSG,,
-26930,NAD83 / Alabama West,,,,United States (USA) - Alabama - AL_W - counties west of approx 86d 37m West - Autauga; Baldwin; Bibb; Blount; Butler; Chilton; Choctaw; Clarke; Colbert; Conecuh; Cullman; Dallas; Escambia; Fayette; Franklin; Greene; Hale; Jefferson; Lamar; Lauderdale; Lawrence; Limestone; Lowndes; Marengo; Marion; Mobile; Monroe; Morgan; Perry; Pickens; Shelby; Sumter; Tuscaloosa; Walker; Washington; Wilcox; Winston,projected 2D,,,East,North,X,Y,9001,,4269,10132,1995-06-02 0 [...]
-26931,NAD83 / Alaska zone 1,,,,United States - Alaska - Panhandle.,projected 2D,,,East,North,X,Y,9001,,4269,15031,1995-06-02 00:00:00,,EPSG,,
-26932,NAD83 / Alaska zone 2,,,,United States - Alaska - 141deg to 144deg West.,projected 2D,,,East,North,X,Y,9001,,4269,15032,1995-06-02 00:00:00,,EPSG,,
-26933,NAD83 / Alaska zone 3,,,,United States - Alaska - 144deg to 148deg West.,projected 2D,,,East,North,X,Y,9001,,4269,15033,1995-06-02 00:00:00,,EPSG,,
-26934,NAD83 / Alaska zone 4,,,,United States - Alaska - 148deg to 152deg West.,projected 2D,,,East,North,X,Y,9001,,4269,15034,1995-06-02 00:00:00,,EPSG,,
-26935,NAD83 / Alaska zone 5,,,,United States - Alaska - 152deg to 156deg West.,projected 2D,,,East,North,X,Y,9001,,4269,15035,1995-06-02 00:00:00,,EPSG,,
-26936,NAD83 / Alaska zone 6,,,,United States - Alaska - 156deg to 160deg West.,projected 2D,,,East,North,X,Y,9001,,4269,15036,1995-06-02 00:00:00,,EPSG,,
-26937,NAD83 / Alaska zone 7,,,,United States - Alaska - 160deg to 164deg West.,projected 2D,,,East,North,X,Y,9001,,4269,15037,1995-06-02 00:00:00,,EPSG,,
-26938,NAD83 / Alaska zone 8,,,,United States - Alaska - 164deg to 168deg West north of 54d 30m North.,projected 2D,,,East,North,X,Y,9001,,4269,15038,1995-06-02 00:00:00,,EPSG,,
-26939,NAD83 / Alaska zone 9,,,,United States - Alaska - west of 168deg West and north of 54d 30m North.,projected 2D,,,East,North,X,Y,9001,,4269,15039,1995-06-02 00:00:00,,EPSG,,
-26940,NAD83 / Alaska zone 10,,,,United States - Alaska - Aleutian Islands.,projected 2D,,,East,North,X,Y,9001,,4269,15040,1995-06-02 00:00:00,,EPSG,,
-26941,NAD83 / California zone 1,NAD83 / California 1,,,United States (USA) - California - CA_1 - counties north of approx 40 deg North - Del Norte; Humboldt; Lassen; Modoc; Plumas; Shasta; Siskiyou; Tehama; Trinity,projected 2D,,,East,North,X,Y,9001,,4269,10431,1995-06-02 00:00:00,,EPSG,,
-26942,NAD83 / California zone 2,NAD83 / California 2,,,United States (USA) - California - CA_2 - counties between approx 40 deg & 38d 15m North - Alpine; Amador; Butte; Colusa; El Dorado; Glenn; Lake; Mendocino; Napa; Nevada; Placer; Sacramento; Sierra; Solano; Sonoma; Sutter; Yolo; Yuba,projected 2D,,,East,North,X,Y,9001,,4269,10432,1995-06-02 00:00:00,,EPSG,,
-26943,NAD83 / California zone 3,NAD83 / California 3,,,United States (USA) - California - CA_3 - counties between approx 38d 15m & 37d North - Alameda; Calaveras; Contra Costa; Madera; Marin; Mariposa; Merced; Mono; San Francisco; San Joaquin; San Mateo; Santa Clara; Santa Cruz; Stanislaus; Tuolumne,projected 2D,,,East,North,X,Y,9001,,4269,10433,1995-06-02 00:00:00,,EPSG,,
-26944,NAD83 / California zone 4,NAD83 / California 4,,,United States (USA) - California - CA_4 - counties between approx 37d & 35d 30m North - Fresno; Inyo; Kings; Monterey; San Benito; Tulare,projected 2D,,,East,North,X,Y,9001,,4269,10434,1995-06-02 00:00:00,,EPSG,,
-26945,NAD83 / California zone 5,NAD83 / California 5,,,United States (USA) - California - CA_5 - counties between approx 35d 50m & 34d North - Kern; Los Angeles; San Bernardino; San Luis Obispo; Santa Barbara; Ventura,projected 2D,,,East,North,X,Y,9001,,4269,10435,1995-06-02 00:00:00,,EPSG,,
-26946,NAD83 / California zone 6,NAD83 / California 6,,,United States (USA) - California - CA_6 - counties south of approx 38d 30m North - Imperial; Orange; Riverside; San Diego,projected 2D,,,East,North,X,Y,9001,,4269,10436,1995-06-02 00:00:00,,EPSG,,
-26948,NAD83 / Arizona  East,,,,United States (USA) - Arizona - AZ_E - counties east of approx 110d 45m West - Apache; Cochise; Gila; Graham; Greenlee; Navajo,projected 2D,,,East,North,X,Y,9001,,4269,10231,1995-06-02 00:00:00,,EPSG,,
-26949,NAD83 / Arizona Central,,,,United States (USA) - Arizona - AZ_C - counties between approx 110d 45m and 113d 20m West - Coconino; Maricopa; Pima; Pinal; Santa Cruz; Yavapai,projected 2D,,,East,North,X,Y,9001,,4269,10232,1995-06-02 00:00:00,,EPSG,,
-26950,NAD83 / Arizona West,,,,United States (USA) - Arizona - AZ_W - counties west of approx 113d 20m West - La Paz; Mohave; Yuma,projected 2D,,,East,North,X,Y,9001,,4269,10233,1995-06-02 00:00:00,,EPSG,,
-26951,NAD83 / Arkansas North,,,,United States (USA) - Arkansas - AR_N - counties north of approx 34d 50m North - Baxter; Benton; Boone; Carroll; Clay; Cleburne; Conway; Craighead; Crawford; Crittenden; Cross; Faulkner; Franklin; Fulton; Greene; Independence; Izard; Jackson; Johnson; Lawrence; Logan; Madison; Marion; Mississippi; Newton; Perry; Poinsett; Pope; Randolph; Scott; Searcy; Sebastian; Sharp; St. Francis; Stone; Van Buren; Washington; White; Woodruff; Yell,projected 2D,,,East,No [...]
-26952,NAD83 / Arkansas South,,,,United States (USA) - Arkansas - AR_S - counties south of approx 34d 50m North - Arkansas; Ashley; Bradley; Calhoun; Chicot; Clark; Cleveland; Columbia; Dallas; Desha; Drew; Garland; Grant; Hempstead; Hot Spring; Howard; Jefferson; Lafayette; Lee; Lincoln; Little River; Lonoke; Miller; Monroe; Montgomery; Nevada; Ouachita; Phillips; Pike; Polk; Prairie; Pulaski; Saline; Sevier; Union,projected 2D,,,East,North,X,Y,9001,,4269,10332,1995-06-02 00:00:00,,EPSG,,
-26953,NAD83 / Colorado North,,,,United States (USA) - Colorado - CO_N - counties north of approx 39d 50m North - Adams; Boulder; Gilpin; Grand; Jackson; Larimer; Logan; Moffat; Morgan; Phillips; Rio Blanco; Routt; Sedgwick; Washington; Weld; Yuma,projected 2D,,,East,North,X,Y,9001,,4269,10531,1995-06-02 00:00:00,,EPSG,,
-26954,NAD83 / Colorado Central,,,,United States (USA) - Colorado - CO_C - counties between approx 39d 50m & 38d 30m North - Arapahoe; Chaffee; Cheyenne; Clear Creek; Delta; Denver; Douglas; Eagle; El Paso; Elbert; Fremont; Garfield; Gunnison; Jefferson; Kit Carson; Lake; Lincoln; Mesa; Park; Pitkin; Summit; Teller,projected 2D,,,East,North,X,Y,9001,,4269,10532,1995-06-02 00:00:00,,EPSG,,
-26955,NAD83 / Colorado South,,,,United States (USA) - Colorado - CO_S - counties south of approx 38d 30m North - Alamosa; Archuleta; Baca; Bent; Conejos; Costilla; Crowley; Custer; Dolores; Hinsdale; Huerfano; Kiowa; La Plata; Las Animas; Mineral; Montezuma; Montrose; Otero; Ouray; Prowers; Pueblo; Rio Grande; Saguache; San Juan; San Miguel,projected 2D,,,East,North,X,Y,9001,,4269,10533,1995-06-02 00:00:00,,EPSG,,
-26956,NAD83 / Connecticut,,,,United States (USA) - Connecticut - CT - counties of Fairfield; Hartford; Litchfield; Middlesex; New Haven; New London; Tolland; Windham,projected 2D,,,East,North,X,Y,9001,,4269,10630,1995-06-02 00:00:00,,EPSG,,
-26957,NAD83 / Delaware,,,,United States (USA) - Delaware - DE - counties of Kent; New Castle; Sussex,projected 2D,,,East,North,X,Y,9001,,4269,10730,1995-06-02 00:00:00,,EPSG,,
-26958,NAD83 / Florida  East,,,,United States (USA) - Florida - FL_E - counties of Brevard; Broward; Clay; Collier; Dade; Duval; Flagler; Glades; Hendry; Highlands; Indian River; Lake; Martin; Monroe; Nassau; Okeechobee; Orange; Osceola; Palm Beach; Putnam; Seminole; St. Johns; St. Lucie; Volusia,projected 2D,,,East,North,X,Y,9001,,4269,10931,1995-06-02 00:00:00,,EPSG,,
-26959,NAD83 / Florida  West,,,,United States (USA) - Florida - FL_W - counties of Charlotte; Citrus; De Soto; Hardee; Hernando; Hillsborough; Lee; Levy; Manatee; Marion; Pasco; Pinellas; Polk; Sarasota; Sumter,projected 2D,,,East,North,X,Y,9001,,4269,10932,1995-06-02 00:00:00,,EPSG,,
-26960,NAD83 / Florida North,,,,United States (USA) - Florida - FL_N - counties of Alachua; Baker; Bay; Bradford; Calhoun; Columbia; Dixie; Escambia; Escambia; Franklin; Gadsden; Gilchrist; Gulf; Hamilton; Holmes; Jackson; Jefferson; Lafayette; Leon; Liberty; Madison; Okaloosa; Santa Rosa; Suwannee; Taylor; Union; Wakulla; Walton; Washington,projected 2D,,,East,North,X,Y,9001,,4269,10933,1995-06-02 00:00:00,,EPSG,,
-26961,NAD83 / Hawaii  zone 1,,,,United States - Hawaii - island of Hawaii.,projected 2D,,,East,North,X,Y,9001,,4269,15131,1995-06-02 00:00:00,,EPSG,,
-26962,NAD83 / Hawaii  zone 2,,,,United States - Hawaii - Maui; Kahoolawe; Lanai; Molokai.,projected 2D,,,East,North,X,Y,9001,,4269,15132,1995-06-02 00:00:00,,EPSG,,
-26963,NAD83 / Hawaii  zone 3,,,,United States - Hawaii - Oahu.,projected 2D,,,East,North,X,Y,9001,,4269,15133,1995-06-02 00:00:00,,EPSG,,
-26964,NAD83 / Hawaii  zone 4,,,,United States - Hawaii - Kauai.,projected 2D,,,East,North,X,Y,9001,,4269,15134,1995-06-02 00:00:00,,EPSG,,
-26965,NAD83 / Hawaii  zone 5,,,,United States - Hawaii - Niihau.,projected 2D,,,East,North,X,Y,9001,,4269,15135,1995-06-02 00:00:00,,EPSG,,
-26966,NAD83 / Georgia  East,,,,United States (USA) - Georgia - GA_E - counties of Appling; Atkinson; Bacon; Baldwin; Brantley; Bryan; Bulloch; Burke; Camden; Candler; Charlton; Chatham; Clinch; Coffee; Columbia; Dodge; Echols; Effingham; Elbert; Emanuel; Evans; Franklin; Glascock; Glynn; Greene; Hancock; Hart; Jeff Davis; Jefferson; Jenkins; Johnson; Lanier; Laurens; Liberty; Lincoln; Long; Madison; McDuffie; McIntosh; Montgomery; Oglethorpe; Pierce; Richmond; Screven; Stephens; Taliafer [...]
-26967,NAD83 / Georgia West,,,,United States (USA) - Georgia - GA_W - counties of Baker; Banks; Barrow; Bartow; Ben Hill; Berrien; Bibb; Bleckley; Brooks; Butts; Calhoun; Carroll; Catoosa; Chattahoochee; Chattooga; Cherokee; Clarke; Clay; Clayton; Cobb; Colquitt; Cook; Coweta; Crawford; Crisp; Dade; Dawson; De Kalb; Decatur; Dooly; Dougherty; Douglas; Early; Fannin; Fayette; Floyd; Forsyth; Fulton; Gilmer; Gordon; Grady; Gwinnett; Habersham; Hall; Haralson; Harris; Heard; Henry; Houston;  [...]
-26968,NAD83 / Idaho  East,,,,United States (USA) - Idaho - ID_E - counties of Bannock; Bear Lake; Bingham; Bonneville; Caribou; Clark; Franklin; Fremont; Jefferson; Madison; Oneida; Power; Teton,projected 2D,,,East,North,X,Y,9001,,4269,11131,1995-06-02 00:00:00,,EPSG,,
-26969,NAD83 / Idaho  Central,,,,United States (USA) - Idaho - ID_C - counties of Blaine; Butte; Camas; Cassia; Custer; Gooding; Jerome; Lemhi; Lincoln; Minidoka; Twin Falls,projected 2D,,,East,North,X,Y,9001,,4269,11132,1995-06-02 00:00:00,,EPSG,,
-26970,NAD83 / Idaho  West,,,,United States (USA) - Idaho - ID_W - counties of Ada; Adams; Benewah; Boise; Bonner; Boundary; Canyon; Clearwater; Elmore; Gem; Idaho; Kootenai; Latah; Lewis; Nez Perce; Owyhee; Payette; Shoshone; Valley; Washington,projected 2D,,,East,North,X,Y,9001,,4269,11133,1995-06-02 00:00:00,,EPSG,,
-26971,NAD83 / Illinois  East,,,,United States (USA) - Illinois - IL_E - counties of Boone; Champaign; Clark; Clay; Coles; Cook; Crawford; Cumberland; De Kalb; De Witt; Douglas; Du Page; Edgar; Edwards; Effingham; Fayette; Ford; Franklin; Gallatin; Grundy; Hamilton; Hardin; Iroquois; Jasper; Jefferson; Johnson; Kane; Kankakee; Kendall; La Salle; Lake; Lawrence; Livingston; Macon; Marion; Massac; McHenry; McLean; Moultrie; Piatt; Pope; Richland; Saline; Shelby; Vermilion; Wabash; Wayne; Wh [...]
-26972,NAD83 / Illinois  West,,,,United States (USA) - Illinois - IL_W - counties of Adams; Alexander; Bond; Brown; Bureau; Calhoun; Carroll; Cass; Christian; Clinton; Fulton; Greene; Hancock; Henderson; Henry; Jackson; Jersey; Jo Daviess; Knox; Lee; Logan; Macoupin; Madison; Marshall; Mason; McDonough; Menard; Mercer; Monroe; Montgomery; Morgan; Ogle; Peoria; Perry; Pike; Pulaski; Putnam; Randolph; Rock Island; Sangamon; Schuyler; Scott; St. Clair; Stark; Stephenson; Tazewell; Union; War [...]
-26973,NAD83 / Indiana  East,,,,United States (USA) - Indiana - IN_E - counties of Adams; Allen; Bartholomew; Blackford; Brown; Cass; Clark; De Kalb; Dearborn; Decatur; Delaware; Elkhart; Fayette; Floyd; Franklin; Fulton; Grant; Hamilton; Hancock; Harrison; Henry; Howard; Huntington; Jackson; Jay; Jefferson; Jennings; Johnson; Kosciusko; Lagrange; Madison; Marion; Marshall; Miami; Noble; Ohio; Randolph; Ripley; Rush; Scott; Shelby; St. Joseph; Steuben; Switzerland; Tipton; Union; Wabash;  [...]
-26974,NAD83 / Indiana  West,,,,United States (USA) - Indiana - IN_W - counties of Benton; Boone; Carroll; Clay; Clinton; Crawford; Daviess; Dubois; Fountain; Gibson; Greene; Hendricks; Jasper; Knox; La Porte; Lake; Lawrence; Martin; Monroe; Montgomery; Morgan; Newton; Orange; Owen; Parke; Perry; Pike; Porter; Posey; Pulaski; Putnam; Spencer; Starke; Sullivan; Tippecanoe; Vanderburgh; Vermillion; Vigo; Warren; Warrick; White,projected 2D,,,East,North,X,Y,9001,,4269,11332,1995-06-02 00:00: [...]
-26975,NAD83 / Iowa North,,,,United States (USA) - Iowa - IA_N - counties of Allamakee; Benton; Black Hawk; Boone; Bremer; Buchanan; Buena Vista; Butler; Calhoun; Carroll; Cerro Gordo; Cherokee; Chickasaw; Clay; Clayton; Crawford; Delaware; Dickinson; Dubuque; Emmet; Fayette; Floyd; Franklin; Greene; Grundy; Hamilton; Hancock; Hardin; Howard; Humboldt; Ida; Jackson; Jones; Kossuth; Linn; Lyon; Marshall; Mitchell; Monona; O'Brien; Osceola; Palo Alto; Plymouth; Pocahontas; Sac; Sioux; Story [...]
-26976,NAD83 / Iowa South,,,,United States (USA) - Iowa - IA_S - counties of Adair; Adams; Appanoose; Audubon; Cass; Cedar; Clarke; Clinton; Dallas; Davis; Decatur; Des Moines; Fremont; Guthrie; Harrison; Henry; Iowa; Jasper; Jefferson; Johnson; Keokuk; Lee; Louisa; Lucas; Madison; Mahaska; Marion; Mills; Monroe; Montgomery; Muscatine; Page; Polk; Pottawattamie; Poweshiek; Ringgold; Scott; Shelby; Taylor; Union; Van Buren; Wapello; Warren; Washington; Wayne,projected 2D,,,East,North,X,Y,9 [...]
-26977,NAD83 / Kansas North,,,,United States (USA) - Kansas - KS_N - counties of Atchison; Brown; Cheyenne; Clay; Cloud; Decatur; Dickinson; Doniphan; Douglas; Ellis; Ellsworth; Geary; Gove; Graham; Jackson; Jefferson; Jewell; Johnson; Leavenworth; Lincoln; Logan; Marshall; Mitchell; Morris; Nemaha; Norton; Osborne; Ottawa; Phillips; Pottawatomie; Rawlins; Republic; Riley; Rooks; Russell; Saline; Shawnee; Sheridan; Sherman; Smith; Thomas; Trego; Wabaunsee; Wallace; Washington; Wyandotte,p [...]
-26978,NAD83 / Kansas South,,,,United States (USA) - Kansas - KS_S - counties of Allen; Anderson; Barber; Barton; Bourbon; Butler; Chase; Chautauqua; Cherokee; Clark; Coffey; Comanche; Cowley; Crawford; Edwards; Elk; Finney; Ford; Franklin; Grant; Gray; Greeley; Greenwood; Hamilton; Harper; Harvey; Haskell; Hodgeman; Kearny; Kingman; Kiowa; Labette; Lane; Linn; Lyon; Marion; McPherson; Meade; Miami; Montgomery; Morton; Neosho; Ness; Osage; Pawnee; Pratt; Reno; Rice; Rush; Scott; Sedgwick; [...]
-26979,NAD83 / Kentucky North,,,,United States (USA) - Kentucky - KY_N - counties of Anderson; Bath; Boone; Bourbon; Boyd; Bracken; Bullitt; Campbell; Carroll; Carter; Clark; Elliott; Fayette; Fleming; Franklin; Gallatin; Grant; Greenup; Harrison; Henry; Jefferson; Jessamine; Kenton; Lawrence; Lewis; Mason; Menifee; Montgomery; Morgan; Nicholas; Oldham; Owen; Pendleton; Robertson; Rowan; Scott; Shelby; Spencer; Trimble; Woodford,projected 2D,,,East,North,X,Y,9001,,4269,11631,1995-06-02 00 [...]
-26980,NAD83 / Kentucky South,,,,United States (USA) - Kentucky - KY_S - counties of Adair; Allen; Ballard; Barren; Bell; Boyle; Breathitt; Breckinridge; Butler; Caldwell; Calloway; Carlisle; Casey; Christian; Clay; Clinton; Crittenden; Cumberland; Daviess; Edmonson; Estill; Floyd; Fulton; Garrard; Graves; Grayson; Green; Hancock; Hardin; Harlan; Hart; Henderson; Hickman; Hopkins; Jackson; Johnson; Knott; Knox; Larue; Laurel; Lee; Leslie; Letcher; Lincoln; Livingston; Logan; Lyon; Madison [...]
-26981,NAD83 / Louisiana North,,,,United States (USA) - Louisiana - LA_N - counties of Avoyelles; Bienville; Bossier; Caddo; Caldwell; Catahoula; Claiborne; Concordia; De Soto; East Carroll; Franklin; Grant; Jackson; La Salle; Lincoln; Madison; Morehouse; Natchitoches; Ouachita; Rapides; Red River; Richland; Sabine; Tensas; Union; Vernon; Webster; West Carroll; Winn,projected 2D,,,East,North,X,Y,9001,,4269,11731,1995-06-02 00:00:00,,EPSG,,
-26982,NAD83 / Louisiana South,,,,United States (USA) - Louisiana - LA_S - counties of Acadia; Allen; Ascension; Assumption; Beauregard; Calcasieu; Cameron; East Baton Rouge; East Feliciana; Evangeline; Iberia; Iberville; Jefferson; Jefferson Davis; Lafayette; LaFourche; Livingston; Orleans; Plaquemines; Pointe Coupee; St. Bernard; St. Charles; St. Helena; St. James; St. John the Baptist; St. Landry; St. Martin; St. Mary; St. Tammany; Tangipahoa; Terrebonne; Vermilion; Washington; West Ba [...]
-26983,NAD83 / Maine  East,,,,United States (USA) - Maine - ME_E - counties of Aroostook; Hancock; Knox; Penobscot; Piscataquis; Waldo; Washington,projected 2D,,,East,North,X,Y,9001,,4269,11831,1995-06-02 00:00:00,,EPSG,,
-26984,NAD83 / Maine  West,,,,United States (USA) - Maine - ME_W - counties of Androscoggin; Cumberland; Franklin; Kennebec; Lincoln; Oxford; Sagadahoc; Somerset; York,projected 2D,,,East,North,X,Y,9001,,4269,11832,1995-06-02 00:00:00,,EPSG,,
-26985,NAD83 / Maryland,,,,United States (USA) - Maryland -MD - counties of Allegany; Anne Arundel; Baltimore; Calvert; Caroline; Carroll; Cecil; Charles; Dorchester; Frederick; Garrett; Harford; Howard; Kent; Montgomery; Prince Georges; Queen Annes; Somerset; St. Marys; Talbot; Washington; Wicomico; Worcester,projected 2D,,,East,North,X,Y,9001,,4269,11930,1995-06-02 00:00:00,,EPSG,,
-26986,NAD83 / Massachusetts Mainland,NAD83 / Massachusetts,,,United States (USA) - Massachusetts - MA_M - counties of Barnstable; Berkshire; Bristol; Essex; Franklin; Hampden; Hampshire; Middlesex; Norfolk; Plymouth; Suffolk; Worcester,projected 2D,,,East,North,X,Y,9001,,4269,12031,1995-06-02 00:00:00,,EPSG,,
-26987,NAD83 / Massachusetts Island,NAD83 / Massachusetts Is,,,United States (USA) - Massachusetts - MA_I - counties of Dukes; Nantucket,projected 2D,,,East,North,X,Y,9001,,4269,12032,1995-06-02 00:00:00,,EPSG,,
-26988,NAD83 / Michigan North,,,,United States (USA) - Michigan - MI_N - counties of Alger; Baraga; Chippewa; Delta; Dickinson; Gogebic; Houghton; Iron; Keweenaw; Luce; Mackinac; Marquette; Menominee; Ontonagon; Schoolcraft,projected 2D,,,East,North,X,Y,9001,,4269,12141,1995-06-02 00:00:00,,EPSG,,
-26989,NAD83 / Michigan Central,,,,United States (USA) - Michigan - MI_C - counties of Alcona; Alpena; Antrim; Arenac; Benzie; Charlevoix; Cheboygan; Clare; Crawford; Emmet; Gladwin; Grand Traverse; Iosco; Kalkaska; Lake; Leelanau; Manistee; Mason; Missaukee; Montmorency; Ogemaw; Osceola; Oscoda; Otsego; Presque Isle; Roscommon; Wexford,projected 2D,,,East,North,X,Y,9001,,4269,12142,1995-06-02 00:00:00,,EPSG,,
-26990,NAD83 / Michigan South,,,,United States (USA) - Michigan - MI_S - counties of Allegan; Barry; Bay; Berrien; Branch; Calhoun; Cass; Clinton; Eaton; Genesee; Gratiot; Hillsdale; Huron; Ingham; Ionia; Isabella; Jackson; Kalamazoo; Kent; Lapeer; Lenawee; Livingston; Macomb; Mecosta; Midland; Monroe; Montcalm; Muskegon; Newaygo; Oakland; Oceana; Ottawa; Saginaw; Sanilac; Shiawassee; St. Clair; St. Joseph; Tuscola; Van Buren; Washtenaw; Wayne,projected 2D,,,East,North,X,Y,9001,,4269,1214 [...]
-26991,NAD83 / Minnesota North,,,,United States (USA) - Minnesota - MN_N - counties of Beltrami; Clearwater; Cook; Itasca; Kittson; Koochiching; Lake; Lake of the Woods; Mahnomen; Marshall; Norman; Pennington; Polk; Red Lake; Roseau; St. Louis,projected 2D,,,East,North,X,Y,9001,,4269,12231,1995-06-02 00:00:00,,EPSG,,
-26992,NAD83 / Minnesota Central,NAD83 / Minnesota Cent.,,,United States (USA) - Minnesota - MN_C - counties of Aitkin; Becker; Benton; Carlton; Cass; Chisago; Clay; Crow Wing; Douglas; Grant; Hubbard; Isanti; Kanabec; Mille Lacs; Morrison; Otter Tail; Pine; Pope; Stearns; Stevens; Todd; Traverse; Wadena; Wilkin,projected 2D,,,East,North,X,Y,9001,,4269,12232,1995-06-02 00:00:00,,EPSG,,
-26993,NAD83 / Minnesota South,,,,United States (USA) - Minnesota - MN_S - counties of Anoka; Big Stone; Blue Earth; Brown; Carver; Chippewa; Cottonwood; Dakota; Dodge; Faribault; Fillmore; Freeborn; Goodhue; Hennepin; Houston; Jackson; Kandiyohi; Lac Qui Parle; Le Sueur; Lincoln; Lyon; Martin; McLeod; Meeker; Mower; Murray; Nicollet; Nobles; Olmsted; Pipestone; Ramsey; Redwood; Renville; Rice; Rock; Scott; Sherburne; Sibley; Steele; Swift; Wabasha; Waseca; Washington; Watonwan; Winona; W [...]
-26994,NAD83 / Mississippi East,,,,United States (USA) - Mississippi - MS_E - counties of Alcorn; Attala; Benton; Calhoun; Chickasaw; Choctaw; Clarke; Clay; Covington; Forrest; George; Greene; Hancock; Harrison; Itawamba; Jackson; Jasper; Jones; Kemper; Lafayette; Lamar; Lauderdale; Leake; Lee; Lowndes; Marshall; Monroe; Neshoba; Newton; Noxubee; Oktibbeha; Pearl River; Perry; Pontotoc; Prentiss; Scott; Smith; Stone; Tippah; Tishomingo; Union; Wayne; Webster; Winston,projected 2D,,,East,N [...]
-26995,NAD83 / Mississippi West,,,,United States (USA) - Mississippi - MS_W - counties of Adams; Amite; Bolivar; Carroll; Claiborne; Coahoma; Copiah; De Soto; Franklin; Grenada; Hinds; Holmes; Humphreys; Issaquena; Jefferson; Jefferson Davis; Lawrence; Leflore; Lincoln; Madison; Marion; Montgomery; Panola; Pike; Quitman; Rankin; Sharkey; Simpson; Sunflower; Tallahatchie; Tate; Tunica; Walthall; Warren; Washington; Wilkinson; Yalobusha; Yazoo,projected 2D,,,East,North,X,Y,9001,,4269,12332, [...]
-26996,NAD83 / Missouri  East,,,,United States (USA) - Missouri - MO_E - counties of Bollinger; Butler; Cape Girardeau; Carter; Clark; Crawford; Dent; Dunklin; Franklin; Gasconade; Iron; Jefferson; Lewis; Lincoln; Madison; Marion; Mississippi; Montgomery; New Madrid; Oregon; Pemiscot; Perry; Pike; Ralls; Reynolds; Ripley; Scott; Shannon; St. Charles; St. Francois; St. Louis; Ste. Genevieve; Stoddard; Warren; Washington; Wayne,projected 2D,,,East,North,X,Y,9001,,4269,12431,1995-06-02 00:00 [...]
-26997,NAD83 / Missouri Central,,,,United States (USA) - Missouri - MO_C - counties of Adair; Audrain; Benton; Boone; Callaway; Camden; Carroll; Chariton; Christian; Cole; Cooper; Dallas; Douglas; Greene; Grundy; Hickory; Howard; Howell; Knox; Laclede; Linn; Livingston; Macon; Maries; Mercer; Miller; Moniteau; Monroe; Morgan; Osage; Ozark; Pettis; Phelps; Polk; Pulaski; Putnam; Randolph; Saline; Schuyler; Scotland; Shelby; Stone; Sullivan; Taney; Texas; Webster; Wright,projected 2D,,,East [...]
-26998,NAD83 / Missouri  West,,,,United States (USA) - Missouri - MO_W - counties of Andrew; Atchison; Barry; Barton; Bates; Buchanan; Caldwell; Cass; Cedar; Clay; Clinton; Dade; Daviess; De Kalb; Gentry; Harrison; Henry; Holt; Jackson; Jasper; Johnson; Lafayette; Lawrence; McDonald; Newton; Nodaway; Platte; Ray; St. Clair; Vernon; Worth,projected 2D,,,East,North,X,Y,9001,,4269,12433,1995-06-02 00:00:00,,EPSG,,
-27038,Nahrwan 1967 / UTM zone 38N,Nahrwan 1967 / UTM 38N,,,Kuwait west of 48 deg East.,projected 2D,,,East,North,E,N,9001,,4270,16038,1996-04-12 00:00:00,,EPSG,,
-27039,Nahrwan 1967 / UTM zone 39N,Nahrwan 1967 / UTM 39N,,,Kuwait east of 48 deg East.  United Arab Emirates (UAE) - Abu Dhabi - west of 54 deg East.,projected 2D,,,East,North,E,N,9001,,4270,16039,1996-04-12 00:00:00,,EPSG,,96.12
-27040,Nahrwan 1967 / UTM zone 40N,Nahrwan 1967 / UTM 40N,,,United Arab Emirates (UAE) - Abu Dhabi east of 54 deg East; Dubai; Sharjah; Ajman; Fujairah; Ras Al Kaimah; Umm Al Qaiwain.,projected 2D,,,East,North,E,N,9001,,4270,16040,1995-06-02 00:00:00,,EPSG,,
-27120,Naparima 1972 / UTM zone 20N,Naparima / UTM 20N,,,Trinidad and Tobago.,projected 2D,,,East,North,E,N,9001,,4271,16020,1995-06-02 00:00:00,,EPSG,,
-27200,GD49 / New Zealand Map Grid,GD49 / NZ Map Grid,,,New Zealand.,projected 2D,,,East,North,E,N,9001,,4272,19917,1995-06-02 00:00:00,,EPSG,Supersedes 27291 (GD49 / North Island Grid) and 27292 (GD49 / South Island Grid).,
-27291,GD49 / North Island Grid,,,,New Zealand - North Island.,projected 2D,,,East,North,E,N,9040,,4272,18141,1999-10-20 00:00:00,,EPSG,Sears 1922 British foot-metre conversion factor applied to ellipsoid.  Superseded by 27200 (GD49 / New Zealand Map Grid).,97.231
-27292,GD49 / South Island Grid,,,,New Zealand - South Island.,projected 2D,,,East,North,E,N,9040,,4272,18142,1999-10-20 00:00:00,,EPSG,Sears 1922 British foot-metre conversion factor applied to ellipsoid.  Superseded by 27200 (GD49 / New Zealand Map Grid).,97.231
-27391,NGO 1948 (Oslo) / NGO zone I,NGO 1948 / I,,,Norway - west of 3deg 30min W of Oslo (7deg 13min 20.5sec E of Greenwich).,projected 2D,,,North,East,x,y,9001,,4817,18221,1999-10-20 00:00:00,,EPSG,Used for large (>1:50000) scale mapping and cadastral work.  To be phased out and replaced by ETRF89 / UTM zone 32N.,
-27392,NGO 1948 (Oslo) / NGO zone II,NGO 1948 / II,,,Norway - between 3deg 30min W and 1deg 10min W of Oslo (7deg 13min 20.5sec E  and 9deg 33min 20.5sec E of Greenwich).,projected 2D,,,North,East,x,y,9001,,4817,18222,1999-10-20 00:00:00,,EPSG,Used for large (>1:50000) scale mapping and cadastral work.  To be phased out and replaced by ETRF89 / UTM zone 32N.,
-27393,NGO 1948 (Oslo) / NGO zone III,NGO 1948 / III,,,Norway - between 1deg 10min W and 1deg 15min E of Oslo (9deg 33min 20.5sec E and 11deg 58min 20.5sec E of Greenwich).,projected 2D,,,North,East,x,y,9001,,4817,18223,1999-10-20 00:00:00,,EPSG,Used for large (>1:50000) scale mapping and cadastral work.  To be phased out and replaced by ETRF89 / UTM zone 32N.,
-27394,NGO 1948 (Oslo) / NGO zone IV,NGO 1948 / IV,,,Norway - between 1deg 15min E and 4deg 20min E of Oslo (11deg 58min 20.5sec E and 15deg 03min 20.5sec E of Greenwich).,projected 2D,,,North,East,x,y,9001,,4817,18224,1999-10-20 00:00:00,,EPSG,Used for large (>1:50000) scale mapping and cadastral work.  To be phased out and replaced by ETRF89 / UTM zone 32N and ETRF89 / UTM zone 33N.,
-27395,NGO 1948 (Oslo) / NGO zone V,NGO 1948 / V,,,Norway - between 4deg 20min E and 8deg 10min E of Oslo (15deg 03min 20.5sec E and 18deg 53min 20.5sec E of Greenwich).,projected 2D,,,North,East,x,y,9001,,4817,18225,1999-10-20 00:00:00,,EPSG,Used for large (>1:50000) scale mapping and cadastral work.  To be phased out and replaced by ETRF89 / UTM zone 33N and ETRF89 / UTM zone 34N.,
-27396,NGO 1948 (Oslo) / NGO zone VI,NGO 1948 / VI,,,Norway - between 8deg 10min E and 12deg 10min E of Oslo (18deg 53min 20.5sec E and 22deg 53min 20.5sec E of Greenwich).,projected 2D,,,North,East,x,y,9001,,4817,18226,1999-10-20 00:00:00,,EPSG,Used for large (>1:50000) scale mapping and cadastral work.  To be phased out and replaced by ETRF89 / UTM zone 34N.,
-27397,NGO 1948 (Oslo) / NGO zone VII,NGO 1948 / VII,,,Norway - between 12deg 10min E and 16deg 15min E of Oslo (22deg 53min 20.5sec E and 26deg 58min 20.5sec E of Greenwich).,projected 2D,,,North,East,x,y,9001,,4817,18227,1999-10-20 00:00:00,,EPSG,Used for large (>1:50000) scale mapping and cadastral work.  To be phased out and replaced by ETRF89 / UTM zone 34N and ETRF89 / UTM zone 35N.,
-27398,NGO 1948 (Oslo) / NGO zone VIII,NGO 1948 / VIII,,,Norway - east of 16deg 15min E of Oslo (26deg 58min 20.5sec E of Greenwich).,projected 2D,,,North,East,x,y,9001,,4817,18228,1999-10-20 00:00:00,,EPSG,Used for large (>1:50000) scale mapping and cadastral work.  To be phased out and replaced by ETRF89 / UTM zone 35N.,
-27429,Datum 73 / UTM zone 29N,,,,Portugal - onshore.,projected 2D,,,East,North,E,N,9001,,4274,16029,1995-06-02 00:00:00,,EPSG,,
-27500,ATF (Paris) / Nord de Guerre,ATF / Nord de Guerre,,,France - Alsace.,projected 2D,,,East,North,X,Y,9001,,4901,19903,1995-06-02 00:00:00,,EPSG,,
-27581,NTF (Paris) / France I,NTF / France I,,,France north of 53.5 grads (48 deg 09 min) North.,projected 2D,,,East,North,X,Y,9001,,4807,18081,1996-04-12 00:00:00,,EPSG,Introduced 1972. Supersedes NTF / Nord France (code 27591).,95.26
-27582,NTF (Paris) / France II,NTF / France II,,,France 50.5 to 53.5 grads (45 deg 27 min to 48 deg 09 min) North. Also used over all mainlanf France.,projected 2D,,,East,North,X,Y,9001,,4807,18082,1996-04-12 00:00:00,,EPSG,Introduced 1972. Supersedes NTF / Centre France (code 27592).,95.26
-27583,NTF (Paris) / France III,NTF / France III,,,France south of 50.5 grads (45 deg 27 min) North.,projected 2D,,,East,North,X,Y,9001,,4807,18083,1996-04-12 00:00:00,,EPSG,Introduced 1972. Supersedes NTF / Sud France (code 27593).,95.26
-27584,NTF (Paris) / France IV,NTF / France IV,,,France - Corsica,projected 2D,,,East,North,X,Y,9001,,4807,18084,1996-04-12 00:00:00,,EPSG,Introduced 1972. Supersedes NTF / Corse (code 27594).,
-27591,NTF (Paris) / Nord France,NTF / Nord France,,,France north of 53.5 grads (48 deg 09 min) North.,projected 2D,,,East,North,X,Y,9001,,4807,18091,1996-04-12 00:00:00,,EPSG,Superseded by NTF / France I (code 27581) from 1972.,95.26
-27592,NTF (Paris) / Centre France,NTF / Centre France,,,France 50.5 to 53.5 grads (45 deg 27 min to 48 deg 09 min) North.,projected 2D,,,East,North,X,Y,9001,,4807,18092,1996-04-12 00:00:00,,EPSG,Superseded by NTF / France II (code 27582) from 1972.,95.26
-27593,NTF (Paris) / Sud France,NTF / Sud France,,,France south of 50.5 grads (45 deg 27 min) North.,projected 2D,,,East,North,X,Y,9001,,4807,18093,1996-04-12 00:00:00,,EPSG,Superseded by NTF / France III (code 27583) from 1972.,95.26
-27594,NTF (Paris) / Corse,NTF / Corse,,,France - Corsica,projected 2D,,,East,North,X,Y,9001,,4807,18094,1996-04-12 00:00:00,,EPSG,Superseded by NTF / France IV (code 27584) from 1972.,
-27700,OSGB 1936 / British National Grid,British National Grid,,,United Kingdom (UK) - onshore England; Scotland; Wales; Isle of Man.,projected 2D,,,East,North,E,N,9001,,4277,19916,1995-06-02 00:00:00,,EPSG,,
-28191,Palestine 1923 / Palestine Grid,Palestine Grid,,,Israel; Jordan,projected 2D,,,East,North,E,N,9001,,4281,18201,1999-04-22 00:00:00,,EPSG,,
-28192,Palestine 1923 / Palestine Belt,Palestine Belt,,,Israel; Jordan,projected 2D,,,East,North,E,N,9001,,4281,18202,1999-04-22 00:00:00,,EPSG,,
-28193,Palestine 1923 / Israeli CS Grid,Israeli CS Grid,,,Israel.,projected 2D,,,East,North,E,N,9001,,4281,18203,1999-10-20 00:00:00,Survey of Israel.,EPSG,Superceded by Israeli TM Grid (EPSG code 239).,
-28232,Pointe Noire / UTM zone 32S,Point Noire / UTM 32S,,,Congo.,projected 2D,,,East,North,E,N,9001,,4282,16132,1995-06-02 00:00:00,,EPSG,,
-28348,GDA94 / MGA zone 48,,,,Australia - 102deg East  to 108deg East.,projected 2D,,,East,North,E,N,9001,,4283,17348,1995-06-02 00:00:00,,EPSG,,
-28349,GDA94 / MGA zone 49,,,,Australia - 108deg East  to 114deg East.,projected 2D,,,East,North,E,N,9001,,4283,17349,1995-06-02 00:00:00,,EPSG,,
-28350,GDA94 / MGA zone 50,,,,Australia - 114deg East  to 120deg East.,projected 2D,,,East,North,E,N,9001,,4283,17350,1995-06-02 00:00:00,,EPSG,,
-28351,GDA94 / MGA zone 51,,,,Australia - 120deg East  to 126deg East.,projected 2D,,,East,North,E,N,9001,,4283,17351,1995-06-02 00:00:00,,EPSG,,
-28352,GDA94 / MGA zone 52,,,,Australia - 126deg East  to 132deg East.,projected 2D,,,East,North,E,N,9001,,4283,17352,1995-06-02 00:00:00,,EPSG,,
-28353,GDA94 / MGA zone 53,,,,Australia - 132deg East  to 138deg East.,projected 2D,,,East,North,E,N,9001,,4283,17353,1995-06-02 00:00:00,,EPSG,,
-28354,GDA94 / MGA zone 54,,,,Australia - 138deg East  to 144deg East.,projected 2D,,,East,North,E,N,9001,,4283,17354,1995-06-02 00:00:00,,EPSG,,
-28355,GDA94 / MGA zone 55,,,,Australia - 144deg East  to 150deg East.,projected 2D,,,East,North,E,N,9001,,4283,17355,1995-06-02 00:00:00,,EPSG,,
-28356,GDA94 / MGA zone 56,,,,Australia - 150deg East  to 156deg East.,projected 2D,,,East,North,E,N,9001,,4283,17356,1995-06-02 00:00:00,,EPSG,,
-28357,GDA94 / MGA zone 57,,,,Australia - 156deg East  to 162deg East.,projected 2D,,,East,North,E,N,9001,,4283,17357,1995-06-02 00:00:00,,EPSG,,
-28358,GDA94 / MGA zone 58,,,,Australia - 162deg East  to 168deg East.,projected 2D,,,East,North,E,N,9001,,4283,17358,1995-06-02 00:00:00,,EPSG,,
-28402,Pulkovo 1942 / Gauss-Kruger zone 2,1942 Coord. Sys. zone 2,,,Czech Republic and Germany (former DDR) - west of 12 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16202,1998-06-30 00:00:00,,EPSG,,
-28403,Pulkovo 1942 / Gauss-Kruger zone 3,1942 Coord. Sys. zone 3,,,Czech Republic and Germany ( former DDR) - east of 12 deg East; Poland and Slovakia - west of 18 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16203,1998-06-30 00:00:00,,EPSG,,
-28404,Pulkovo 1942 / Gauss-Kruger zone 4,1942 Coord. Sys. zone 4,,,Estonia; Latvia; Lithuania; Russia; Ukraine; - west of 24 deg East; Poland - east of 24 deg East; Slovakia east of 18 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16204,1995-06-02 00:00:00,,EPSG,,
-28405,Pulkovo 1942 / Gauss-Kruger zone 5,1942 Coord. Sys. zone 5,,,Belarus - west of 30 deg East;  Estonia; Latvia & Lithuania - east of 24 deg East;  Moldova;  Russia &  Ukraine - 24 deg to 30 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16205,1995-06-02 00:00:00,,EPSG,,
-28406,Pulkovo 1942 / Gauss-Kruger zone 6,1942 Coord. Sys. zone 6,,,Belarus - east of 30 deg East;  Russia  &  Ukraine  - 30 deg to 36 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16206,1995-06-02 00:00:00,,EPSG,,
-28407,Pulkovo 1942 / Gauss-Kruger zone 7,1942 Coord. Sys. zone 7,,,Georgia - west of 36 deg East;  Russia  - 36 deg to 42 deg East;  Ukraine - east of 36 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16207,1995-06-02 00:00:00,,EPSG,,
-28408,Pulkovo 1942 / Gauss-Kruger zone 8,1942 Coord. Sys. zone 8,,,Armenia  Azerbaijan - west of 48 deg East;  Georgia - east of 42 deg East;  Russia - 42 deg to 48 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16208,1995-06-02 00:00:00,,EPSG,,
-28409,Pulkovo 1942 / Gauss-Kruger zone 9,1942 Coord. Sys. zone 9,,,Azerbaijan - east of 48 deg East;  Kazakstan - west of 54 deg East;  Russia - 48 deg to 54 deg East;  Turkmenistan - west of 54 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16209,1995-06-02 00:00:00,,EPSG,,
-28410,Pulkovo 1942 / Gauss-Kruger zone 10,1942 Coord. Sys. zone 10,,,Kazakstan;  Russia;  Turkmenistan  - 54 deg  to 60 deg East; Uzbekistan - west of 60 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16210,1995-06-02 00:00:00,,EPSG,,
-28411,Pulkovo 1942 / Gauss-Kruger zone 11,1942 Coord. Sys. zone 11,,,Kazakstan;  Russia;  Uzbekistan - 60 deg to 66 deg East;  Turkmenistan - east of 60 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16211,1995-06-02 00:00:00,,EPSG,,
-28412,Pulkovo 1942 / Gauss-Kruger zone 12,1942 Coord. Sys. zone 12,,,Kazakstan &  Russia - 66 deg to 72 deg East;  Kirgistan & Tadzhikstan - west of 72 deg East;  Uzbekistan - east of 66 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16212,1995-06-02 00:00:00,,EPSG,,
-28413,Pulkovo 1942 / Gauss-Kruger zone 13,1942 Coord. Sys. zone 13,,,Kazakstan;  Kirgizstan;  Russia - 72 deg to 78 deg East;  Tadzhikstan - east of 72 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16213,1995-06-02 00:00:00,,EPSG,,
-28414,Pulkovo 1942 / Gauss-Kruger zone 14,1942 Coord. Sys. zone 14,,,Kazakstan &  Russia - 78 deg to 84 deg East; Kirgizstan - east of 78 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16214,1995-06-02 00:00:00,,EPSG,,
-28415,Pulkovo 1942 / Gauss-Kruger zone 15,1942 Coord. Sys. zone 15,,,Kazakstan - east of 84 deg East;  Russia - 84 deg to 90 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16215,1995-06-02 00:00:00,,EPSG,,
-28416,Pulkovo 1942 / Gauss-Kruger zone 16,1942 Coord. Sys. zone 16,,,Russia - 90 deg to 96 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16216,1995-06-02 00:00:00,,EPSG,,
-28417,Pulkovo 1942 / Gauss-Kruger zone 17,1942 Coord. Sys. zone 17,,,Russia - 96 deg to 102deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16217,1995-06-02 00:00:00,,EPSG,,
-28418,Pulkovo 1942 / Gauss-Kruger zone 18,1942 Coord. Sys. zone 18,,,Russia - 102 deg to 108 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16218,1995-06-02 00:00:00,,EPSG,,
-28419,Pulkovo 1942 / Gauss-Kruger zone 19,1942 Coord. Sys. zone 19,,,Russia - 108 deg to 114 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16219,1995-06-02 00:00:00,,EPSG,,
-28420,Pulkovo 1942 / Gauss-Kruger zone 20,1942 Coord. Sys. zone 20,,,Russia - 114 deg to 120 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16220,1995-06-02 00:00:00,,EPSG,,
-28421,Pulkovo 1942 / Gauss-Kruger zone 21,1942 Coord. Sys. zone 21,,,Russia - 120 deg to 126 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16221,1995-06-02 00:00:00,,EPSG,,
-28422,Pulkovo 1942 / Gauss-Kruger zone 22,1942 Coord. Sys. zone 22,,,Russia - 126 deg to 132 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16222,1995-06-02 00:00:00,,EPSG,,
-28423,Pulkovo 1942 / Gauss-Kruger zone 23,1942 Coord. Sys. zone 23,,,Russia - 132 deg to 138 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16223,1995-06-02 00:00:00,,EPSG,,
-28424,Pulkovo 1942 / Gauss-Kruger zone 24,1942 Coord. Sys. zone 24,,,Russia - 138 deg to 144 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16224,1995-06-02 00:00:00,,EPSG,,
-28425,Pulkovo 1942 / Gauss-Kruger zone 25,1942 Coord. Sys. zone 25,,,Russia - 144 deg to 150 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16225,1995-06-02 00:00:00,,EPSG,,
-28426,Pulkovo 1942 / Gauss-Kruger zone 26,1942 Coord. Sys. zone 26,,,Russia - 150 deg to 156 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16226,1995-06-02 00:00:00,,EPSG,,
-28427,Pulkovo 1942 / Gauss-Kruger zone 27,1942 Coord. Sys. zone 27,,,Russia - 156 deg to 162 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16227,1995-06-02 00:00:00,,EPSG,,
-28428,Pulkovo 1942 / Gauss-Kruger zone 28,1942 Coord. Sys. zone 28,,,Russia - 162 deg to 168 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16228,1995-06-02 00:00:00,,EPSG,,
-28429,Pulkovo 1942 / Gauss-Kruger zone 29,1942 Coord. Sys. zone 29,,,Russia - 168 deg to 174 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16229,1995-06-02 00:00:00,,EPSG,,
-28430,Pulkovo 1942 / Gauss-Kruger zone 30,1942 Coord. Sys. zone 30,,,Russia - 174 deg East to 180 deg.,projected 2D,,,North,East,X,Y,9001,,4284,16230,1995-06-02 00:00:00,,EPSG,,
-28431,Pulkovo 1942 / Gauss-Kruger zone 31,1942 Coord. Sys. zone 31,,,Russia - 180 deg to 174 deg West.,projected 2D,,,North,East,X,Y,9001,,4284,16231,1995-06-02 00:00:00,,EPSG,,
-28432,Pulkovo 1942 / Gauss-Kruger zone 32,1942 Coord. Sys. zone 32,,,Russia - east of 174 deg West.,projected 2D,,,North,East,X,Y,9001,,4284,16232,1995-06-02 00:00:00,,EPSG,,
-28462,Pulkovo 1942 / Gauss-Kruger 2N,Pulkovo / Gauss 2N,,,Czech Republic and Germany (former DDR) - west of 12 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16302,1998-06-30 00:00:00,,EPSG,,
-28463,Pulkovo 1942 / Gauss-Kruger 3N,Pulkovo / Gauss 3N,,,Czech Republic and Germany ( former DDR) - east of 12 deg East; Poland and Slovakia - west of 18 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16303,1998-06-30 00:00:00,,EPSG,,
-28464,Pulkovo 1942 / Gauss-Kruger 4N,Pulkovo / Gauss 4N,,,Estonia; Latvia; Lithuania; Russia; Ukraine; - west of 24 deg East; Poland - east of 24 deg East; Slovakia east of 18 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16304,1995-06-02 00:00:00,,EPSG,,
-28465,Pulkovo 1942 / Gauss-Kruger 5N,Pulkovo / Gauss 5N,,,Belarus - west of 30 deg East;  Estonia; Latvia & Lithuania - east of 24 deg East;  Moldova;  Russia &  Ukraine - 24 deg to 30 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16305,1995-06-02 00:00:00,,EPSG,,
-28466,Pulkovo 1942 / Gauss-Kruger 6N,Pulkovo / Gauss 6N,,,Belarus - east of 30 deg East;  Russia  &  Ukraine  - 30 deg to 36 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16306,1995-06-02 00:00:00,,EPSG,,
-28467,Pulkovo 1942 / Gauss-Kruger 7N,Pulkovo / Gauss 7N,,,Georgia - west of 36 deg East;  Russia  - 36 deg to 42 deg East;  Ukraine - east of 36 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16307,1995-06-02 00:00:00,,EPSG,,
-28468,Pulkovo 1942 / Gauss-Kruger 8N,Pulkovo / Gauss 8N,,,Armenia - west of 48 deg East;  Azerbaijan - west of 48 deg East;  Georgia - east of 42 deg East;  Russia - 42 deg to 48 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16308,1995-06-02 00:00:00,,EPSG,,
-28469,Pulkovo 1942 / Gauss-Kruger 9N,Pulkovo / Gauss 9N,,,Azerbaijan - east of 48 deg East;  Kazakstan - west of 54 deg East;  Russia - 48 deg to 54 deg East;  Turkmenistan - west of 54 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16309,1995-06-02 00:00:00,,EPSG,,
-28470,Pulkovo 1942 / Gauss-Kruger 10N,Pulkovo / Gauss 10N,,,Kazakstan;  Russia;  Turkmenistan  - 54 deg  to 60 deg East;  Uzbekistan - west of 60 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16310,1995-06-02 00:00:00,,EPSG,,
-28471,Pulkovo 1942 / Gauss-Kruger 11N,Pulkovo / Gauss 11N,,,Kazakstan;  Russia;  Uzbekistan - 60 deg to 66 deg East;  Turkmenistan - east of 60 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16311,1995-06-02 00:00:00,,EPSG,,
-28472,Pulkovo 1942 / Gauss-Kruger 12N,Pulkovo / Gauss 12N,,,Kazakstan &  Russia - 66 deg to 72 deg East;  Kirgistan & Tadzhikstan - west of 72 deg East;  Uzbekistan - east of 66 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16312,1995-06-02 00:00:00,,EPSG,,
-28473,Pulkovo 1942 / Gauss-Kruger 13N,Pulkovo / Gauss 13N,,,Kazakstan;  Kirgizstan;  Russia - 72 deg to 78 deg East;  Tadzhikstan - east of 72 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16313,1995-06-02 00:00:00,,EPSG,,
-28474,Pulkovo 1942 / Gauss-Kruger 14N,Pulkovo / Gauss 14N,,,Kazakstan &  Russia - 78 deg to 84 deg East;  Kirgizstan - east of 78 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16314,1995-06-02 00:00:00,,EPSG,,
-28475,Pulkovo 1942 / Gauss-Kruger 15N,Pulkovo / Gauss 15N,,,Kazakstan - east of 84 deg East;  Russia - 84 deg to 90 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16315,1995-06-02 00:00:00,,EPSG,,
-28476,Pulkovo 1942 / Gauss-Kruger 16N,Pulkovo / Gauss 16N,,,Russia - 90 deg to 96 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16316,1995-06-02 00:00:00,,EPSG,,
-28477,Pulkovo 1942 / Gauss-Kruger 17N,Pulkovo / Gauss 17N,,,Russia - 96 deg to 102deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16317,1995-06-02 00:00:00,,EPSG,,
-28478,Pulkovo 1942 / Gauss-Kruger 18N,Pulkovo / Gauss 18N,,,Russia - 102 deg to 108 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16318,1995-06-02 00:00:00,,EPSG,,
-28479,Pulkovo 1942 / Gauss-Kruger 19N,Pulkovo / Gauss 19N,,,Russia - 108 deg to 114 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16319,1995-06-02 00:00:00,,EPSG,,
-28480,Pulkovo 1942 / Gauss-Kruger 20N,Pulkovo / Gauss 20N,,,Russia - 114 deg to 120 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16320,1995-06-02 00:00:00,,EPSG,,
-28481,Pulkovo 1942 / Gauss-Kruger 21N,Pulkovo / Gauss 21N,,,Russia - 120 deg to 126 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16321,1995-06-02 00:00:00,,EPSG,,
-28482,Pulkovo 1942 / Gauss-Kruger 22N,Pulkovo / Gauss 22N,,,Russia - 126 deg to 132 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16322,1995-06-02 00:00:00,,EPSG,,
-28483,Pulkovo 1942 / Gauss-Kruger 23N,Pulkovo / Gauss 23N,,,Russia - 132 deg to 138 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16323,1995-06-02 00:00:00,,EPSG,,
-28484,Pulkovo 1942 / Gauss-Kruger 24N,Pulkovo / Gauss 24N,,,Russia - 138 deg to 144 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16324,1995-06-02 00:00:00,,EPSG,,
-28485,Pulkovo 1942 / Gauss-Kruger 25N,Pulkovo / Gauss 25N,,,Russia - 144 deg to 150 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16325,1995-06-02 00:00:00,,EPSG,,
-28486,Pulkovo 1942 / Gauss-Kruger 26N,Pulkovo / Gauss 26N,,,Russia - 150 deg to 156 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16326,1995-06-02 00:00:00,,EPSG,,
-28487,Pulkovo 1942 / Gauss-Kruger 27N,Pulkovo / Gauss 27N,,,Russia - 156 deg to 162 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16327,1995-06-02 00:00:00,,EPSG,,
-28488,Pulkovo 1942 / Gauss-Kruger 28N,Pulkovo / Gauss 28N,,,Russia - 162 deg to 168 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16328,1995-06-02 00:00:00,,EPSG,,
-28489,Pulkovo 1942 / Gauss-Kruger 29N,Pulkovo / Gauss 29N,,,Russia - 168 deg to 174 deg East.,projected 2D,,,North,East,X,Y,9001,,4284,16329,1995-06-02 00:00:00,,EPSG,,
-28490,Pulkovo 1942 / Gauss-Kruger 30N,Pulkovo / Gauss 30N,,,Russia - 174 deg East to 180 deg.,projected 2D,,,North,East,X,Y,9001,,4284,16330,1995-06-02 00:00:00,,EPSG,,
-28491,Pulkovo 1942 / Gauss-Kruger 31N,Pulkovo / Gauss 31N,,,Russia - 180 deg to 174 deg West.,projected 2D,,,North,East,X,Y,9001,,4284,16331,1995-06-02 00:00:00,,EPSG,,
-28492,Pulkovo 1942 / Gauss-Kruger 32N,Pulkovo / Gauss 32N,,,Russia - east of 174 deg West.,projected 2D,,,North,East,X,Y,9001,,4284,16332,1995-06-02 00:00:00,,EPSG,,
-28600,Qatar / Qatar National Grid,Qatar National Grid,,,Qatar - onshore.,projected 2D,,,East,North,E,N,9001,,4286,19919,1995-06-02 00:00:00,,EPSG,,
-28991,RD / Netherlands Old,,,,Netherlands - onshore.,projected 2D,,,East,North,X,Y,9001,,4289,19913,1995-06-02 00:00:00,,EPSG,Superseded by 28992 (RD / Netherlands New).,
-28992,RD / Netherlands New,,,,Netherlands - onshore.,projected 2D,,,East,North,X,Y,9001,,4289,19914,1995-06-02 00:00:00,,EPSG,Supersedes 28991 (RD / Netherlands Old).,
-29100,SAD69 / Brazil Polyconic,,,,Brazil,projected 2D,,,East,North,X,Y,9001,,4291,19941,1999-04-22 00:00:00,PetroBras,EPSG,,
-29118,SAD69 / UTM zone 18N,,,,South America - 78deg West to 72deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4291,16018,1995-06-02 00:00:00,,EPSG,Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.251.  Error introduced if not using the truncated precision will not exceed 5 cm.,97.252
-29119,SAD69 / UTM zone 19N,,,,South America - 72deg West to 66deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4291,16019,1995-06-02 00:00:00,,EPSG,Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.252.  Error introduced if not using the truncated precision will not exceed 5 cm.,97.252
-29120,SAD69 / UTM zone 20N,,,,South America - 66deg West to 60deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4291,16020,1995-06-02 00:00:00,,EPSG,Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.252.  Error introduced if not using the truncated precision will not exceed 5 cm.,97.252
-29121,SAD69 / UTM zone 21N,,,,South America - 60deg West to 54deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4291,16021,1995-06-02 00:00:00,,EPSG,Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.252.  Error introduced if not using the truncated precision will not exceed 5 cm.,97.252
-29122,SAD69 / UTM zone 22N,,,,South America - 54deg West to 48deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4291,16022,1995-06-02 00:00:00,,EPSG,Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.252.  Error introduced if not using the truncated precision will not exceed 5 cm.,97.252
-29177,SAD69 / UTM zone 17S,,,,South America - 84deg West to 78deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4291,16117,1995-06-02 00:00:00,,EPSG,Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.252.  Error introduced if not using the truncated precision will not exceed 5 cm.,97.252
-29178,SAD69 / UTM zone 18S,,,,South America - Brazil - 78deg West to 72deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4291,16118,1995-06-02 00:00:00,,EPSG,Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.252.  Error introduced if not using the truncated precision will not exceed 5 cm.,97.252
-29179,SAD69 / UTM zone 19S,,,,South America - Brazil - 72deg West to 66deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4291,16119,1995-06-02 00:00:00,,EPSG,Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.252.  Error introduced if not using the truncated precision will not exceed 5 cm.,97.252
-29180,SAD69 / UTM zone 20S,,,,South America - Brazil - 66deg West to 60deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4291,16120,1995-06-02 00:00:00,,EPSG,Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.252.  Error introduced if not using the truncated precision will not exceed 5 cm.,97.252
-29181,SAD69 / UTM zone 21S,,,,South America - Brazil - 60deg West to 54deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4291,16121,1995-06-02 00:00:00,,EPSG,Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.252.  Error introduced if not using the truncated precision will not exceed 5 cm.,97.252
-29182,SAD69 / UTM zone 22S,,,,South America - Brazil - 54deg West to 48deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4291,16122,1995-06-02 00:00:00,,EPSG,Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.252.  Error introduced if not using the truncated precision will not exceed 5 cm.,97.252
-29183,SAD69 / UTM zone 23S,,,,South America - 48deg West to 42deg West.,projected 2D,,,East,North,E,N,9001,,4291,16123,1995-06-02 00:00:00,,EPSG,Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.252.  Error introduced if not using the truncated precision will not exceed 5 cm.,97.252
-29184,SAD69 / UTM zone 24S,,,,South America - Brazil - 42deg West to 36deg West.,projected 2D,,,East,North,E,N,9001,,4291,16124,1995-06-02 00:00:00,,EPSG,Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.252.  Error introduced if not using the truncated precision will not exceed 5 cm.,97.252
-29185,SAD69 / UTM zone 25S,,,,South America - 36deg West to 30deg West.,projected 2D,,,East,North,E,N,9001,,4291,16125,1995-06-02 00:00:00,,EPSG,Uses GRS67 ellipsoid with 1/f to exactly 2 decimal places.  Precision of ellipsoid entry increased from 2 to 5 dp with change id 97.252.  Error introduced if not using the truncated precision will not exceed 5 cm.,97.252
-29220,Sapper Hill 1943 / UTM zone 20S,Sapper Hill / UTM 20S,,,Falkland Islands - west of 60 deg West.,projected 2D,,,East,North,E,N,9001,,4292,16120,1995-06-02 00:00:00,,EPSG,,
-29221,Sapper Hill 1943 / UTM zone 21S,Sapper Hill / UTM 21S,,,Falkland Islands - east of 60 deg West.,projected 2D,,,East,North,E,N,9001,,4292,16121,1995-06-02 00:00:00,,EPSG,,
-29333,Schwarzeck / UTM zone 33S,Schwarzeck / UTM 33S,,,Namibia - offshore.,projected 2D,,,East,North,E,N,9001,,4293,16133,1996-04-12 00:00:00,,EPSG,,
-29371,South West African Coord. System zone 11,SW African CS zone 11,,,Namibia - west of 12 deg East.,projected 2D,,,West,South,W,S,9031,,4293,17611,1997-06-16 00:00:00,,EPSG,,97.16
-29373,South West African Coord. System zone 13,SW African CS zone 13,,,Namibia - 12 to 14 deg East.,projected 2D,,,West,South,W,S,9031,,4293,17613,1997-06-16 00:00:00,,EPSG,,97.16
-29375,South West African Coord. System zone 15,SW African CS zone 15,,,Namibia - 14 to 16 deg East.,projected 2D,,,West,South,W,S,9031,,4293,17615,1997-06-16 00:00:00,,EPSG,,97.16
-29377,South West African Coord. System zone 17,SW African CS zone 17,,,Namibia - 16 to 18 deg East.,projected 2D,,,West,South,W,S,9031,,4293,17617,1997-06-16 00:00:00,,EPSG,,97.16
-29379,South West African Coord. System zone 19,SW African CS zone 19,,,Namibia - 18 to 20 deg East.,projected 2D,,,West,South,W,S,9031,,4293,17619,1997-06-16 00:00:00,,EPSG,,97.16
-29381,South West African Coord. System zone 21,SW African CS zone 21,,,Namibia - 20 to 22 deg East.,projected 2D,,,West,South,W,S,9031,,4293,17621,1997-06-16 00:00:00,,EPSG,,97.16
-29383,South West African Coord. System zone 23,SW African CS zone 23,,,Namibia - 22 to 24 deg East.,projected 2D,,,West,South,W,S,9031,,4293,17623,1997-06-16 00:00:00,,EPSG,,97.16
-29385,South West African Coord. System zone 25,SW African CS zone 25,,,Namibia - east of 24 deg East.,projected 2D,,,West,South,W,S,9031,,4293,17625,1997-06-16 00:00:00,,EPSG,,97.16
-29635,Sudan / UTM zone 35N,,,,Sudan - south - west of 30 deg East.,projected 2D,,,East,North,E,N,9001,,4296,16035,1995-06-02 00:00:00,,EPSG,,
-29636,Sudan / UTM zone 36N,,,,Sudan - south - east of 30 deg East.,projected 2D,,,East,North,E,N,9001,,4296,16036,1995-06-02 00:00:00,,EPSG,,
-29700,Tananarive (Paris) / Laborde Grid,Tananarive  / Laborde,,,Madagascar.,projected 2D,,,East,North,X,Y,9001,,4810,19911,1995-06-02 00:00:00,,EPSG,,
-29738,Tananarive / UTM zone 38S,Tananarive / UTM 38S,,,Madagascar - offshore west of 48 deg East.,projected 2D,,,East,North,E,N,9001,,4297,16138,1995-06-02 00:00:00,,EPSG,,
-29739,Tananarive / UTM zone 39S,Tananarive / UTM 39S,,,Madagascar - offshore east of 48 deg East.,projected 2D,,,East,North,E,N,9001,,4297,16139,1995-06-02 00:00:00,,EPSG,,
-29849,Timbalai 1948 / UTM zone 49N,Timbalai 1948 / UTM 49N,,,Brunei - offshore; Malaysia - East Malaysia (Sarawak).,projected 2D,,,East,North,E,N,9001,,4298,16049,1995-06-02 00:00:00,,EPSG,,
-29850,Timbalai 1948 / UTM zone 50N,Timbalai 1948 / UTM 50N,,,Brunei - offshore; Malaysia - East Malaysia (Sabah).,projected 2D,,,East,North,E,N,9001,,4298,16050,1995-06-02 00:00:00,,EPSG,,
-29871,Timbalai 1948 / R.S.O. Borneo (ch),Timbalai  / Borneo (ch),,,Malaysia - East Malaysia (Sabah; Sarawak).,projected 2D,,,East,North,E,N,9042,,4298,19912,1999-10-20 00:00:00,,EPSG,Adopts metric conversion of 39.370147 inches per metre.,97.231
-29872,Timbalai 1948 / R.S.O. Borneo (ft),Timbalai  / Borneo (ft),,,Brunei; Malaysia - East Malaysia (Sabah; Sarawak).,projected 2D,,,East,North,E,N,9041,,4298,19912,1999-10-20 00:00:00,,EPSG,Original projection definition in chains.  1 chain = 66 feet=792 inches.  Adopts metric conversion of 39.370147 inches per metre.,97.231
-29873,Timbalai 1948 / R.S.O. Borneo (m),Timbalai  / Borneo (m),,,Brunei.,projected 2D,,,East,North,E,N,9001,,4298,19912,1997-07-22 00:00:00,,EPSG,Original projection definition in chains.  1 chain = 66 feet=792 inches.  Adopts metric conversion of 39.370147 inches per metre.,
-29900,TM65 / Irish National Grid,TM65 / Irish Nat Grid,,,Ireland - onshore; United Kingdom (UK) - Northern Ireland (Ulster) onshore,projected 2D,,,East,North,E,N,9001,,4299,19908,1995-06-02 00:00:00,,EPSG,,
-30161,Tokyo / Japan Plane Rectangular CS I,Tokyo / Japan zone I,,,Japan - Kyushu - Nagasaki-ken; islands of Kagoshima-ken between 27 and 32 deg N and between 128 deg 18 min and 130 deg E (between 128 deg 18 min and 30 deg 13 min E for Amami islands).,projected 2D,,,North,East,X,Y,9001,,4301,17801,1998-12-12 00:00:00,,EPSG,,
-30162,Tokyo / Japan Plane Rectangular CS II,Tokyo / Japan zone II,,,Japan - Kyushu - Fukuoka-ken; Saga-ken; Kumamoto-ken; Oita-ken; Miyazaki-ken; Kagoshima-ken (except for area within Japan Plane Rectangular Coordinates System zone I).,projected 2D,,,North,East,X,Y,9001,,4301,17802,1998-12-12 00:00:00,,EPSG,,
-30163,Tokyo / Japan Plane Rectangular CS III,Tokyo / Japan zone III,,,Japan - Kyushu - Fukuoka-ken; Saga-ken; Kumamoto-ken; Oita-ken; Miyazaki-ken; Kagoshima-ken (except for area within Japan Plane Rectangular Coordinates System zone I).,projected 2D,,,North,East,X,Y,9001,,4301,17803,1998-12-12 00:00:00,,EPSG,,
-30164,Tokyo / Japan Plane Rectangular CS IV,Tokyo / Japan zone IV,,,Japan - Kyushu - Fukuoka-ken; Saga-ken; Kumamoto-ken; Oita-ken; Miyazaki-ken; Kagoshima-ken (except for area within Japan Plane Rectangular Coordinates System zone I).,projected 2D,,,North,East,X,Y,9001,,4301,17804,1998-12-12 00:00:00,,EPSG,,
-30165,Tokyo / Japan Plane Rectangular CS V,Tokyo / Japan zone V,,,Japan - Kyushu - Fukuoka-ken; Saga-ken; Kumamoto-ken; Oita-ken; Miyazaki-ken; Kagoshima-ken (except for area within Japan Plane Rectangular Coordinates System zone I).,projected 2D,,,North,East,X,Y,9001,,4301,17805,1998-12-12 00:00:00,,EPSG,,
-30166,Tokyo / Japan Plane Rectangular CS VI,Tokyo / Japan zone VI,,,Japan - Kyushu - Fukuoka-ken; Saga-ken; Kumamoto-ken; Oita-ken; Miyazaki-ken; Kagoshima-ken (except for area within Japan Plane Rectangular Coordinates System zone I).,projected 2D,,,North,East,X,Y,9001,,4301,17806,1998-12-12 00:00:00,,EPSG,,
-30167,Tokyo / Japan Plane Rectangular CS VII,Tokyo / Japan zone VII,,,Japan - Kyushu - Fukuoka-ken; Saga-ken; Kumamoto-ken; Oita-ken; Miyazaki-ken; Kagoshima-ken (except for area within Japan Plane Rectangular Coordinates System zone I).,projected 2D,,,North,East,X,Y,9001,,4301,17807,1998-12-12 00:00:00,,EPSG,,
-30168,Tokyo / Japan Plane Rectangular CS VIII,Tokyo / Japan zone VIII,,,Japan - Kyushu - Fukuoka-ken; Saga-ken; Kumamoto-ken; Oita-ken; Miyazaki-ken; Kagoshima-ken (except for area within Japan Plane Rectangular Coordinates System zone I).,projected 2D,,,North,East,X,Y,9001,,4301,17808,1998-12-12 00:00:00,,EPSG,,
-30169,Tokyo / Japan Plane Rectangular CS IX,Tokyo / Japan zone IX,,,Japan - Kyushu - Fukuoka-ken; Saga-ken; Kumamoto-ken; Oita-ken; Miyazaki-ken; Kagoshima-ken (except for area within Japan Plane Rectangular Coordinates System zone I).,projected 2D,,,North,East,X,Y,9001,,4301,17809,1998-12-12 00:00:00,,EPSG,,
-30170,Tokyo / Japan Plane Rectangular CS X,Tokyo / Japan zone X,,,Japan - Kyushu - Fukuoka-ken; Saga-ken; Kumamoto-ken; Oita-ken; Miyazaki-ken; Kagoshima-ken (except for area within Japan Plane Rectangular Coordinates System zone I).,projected 2D,,,North,East,X,Y,9001,,4301,17810,1998-12-12 00:00:00,,EPSG,,
-30171,Tokyo / Japan Plane Rectangular CS XI,Tokyo / Japan zone XI,,,Japan - Hokkaido west of 141 deg 15 min E approx. - Otaru city; Hakodate city; Date city; Usu-gun and Abuta-gun of Iburi-shicyo; area of Hiyama-shicyo; area of Shiribeshi-shicyo; Oshima-shicyo.,projected 2D,,,North,East,X,Y,9001,,4301,17811,1998-12-12 00:00:00,,EPSG,,
-30172,Tokyo / Japan Plane Rectangular CS XII,Tokyo / Japan zone XII,,,Japan - Hokkaido west of 141 deg 15 min E approx. - Otaru city; Hakodate city; Date city; Usu-gun and Abuta-gun of Iburi-shicyo; area of Hiyama-shicyo; area of Shiribeshi-shicyo; Oshima-shicyo.,projected 2D,,,North,East,X,Y,9001,,4301,17812,1998-12-12 00:00:00,,EPSG,,
-30173,Tokyo / Japan Plane Rectangular CS XIII,Tokyo / Japan zone XIII,,,Japan - Hokkaido west of 141 deg 15 min E approx. - Otaru city; Hakodate city; Date city; Usu-gun and Abuta-gun of Iburi-shicyo; area of Hiyama-shicyo; area of Shiribeshi-shicyo; Oshima-shicyo.,projected 2D,,,North,East,X,Y,9001,,4301,17813,1998-12-12 00:00:00,,EPSG,,
-30174,Tokyo / Japan Plane Rectangular CS XIV,Tokyo / Japan zone XIV,,,Japan - Tokyo-to south of 28 deg N & between 140 deg 30 min & 143 deg E.,projected 2D,,,North,East,X,Y,9001,,4301,17814,1998-12-12 00:00:00,,EPSG,Although legally defined as Tokyo datum the accuracy of the geodetic connection to mainland Japan is low.,
-30175,Tokyo / Japan Plane Rectangular CS XV,Tokyo / Japan zone XV,,,Japan - Okinawa-ken between 126 deg &130 deg E.,projected 2D,,,North,East,X,Y,9001,,4301,17815,1998-12-12 00:00:00,,EPSG,,
-30176,Tokyo / Japan Plane Rectangular CS XVI,Tokyo / Japan zone XVI,,,Japan - Okinawa-ken west of 126 deg E.,projected 2D,,,North,East,X,Y,9001,,4301,17816,1998-12-12 00:00:00,,EPSG,,
-30177,Tokyo / Japan Plane Rectangular CS XVII,Tokyo / Japan zone XVII,,,Japan - Okinawa-ken east of 130 deg E.,projected 2D,,,North,East,X,Y,9001,,4301,17817,1998-12-12 00:00:00,,EPSG,Although legally defined as Tokyo datum the accuracy of the geodetic connection to mainland Japan is low.,
-30178,Tokyo / Japan Plane Rectangular CS XVIII,Tokyo / Japan zone XVIII,,,Japan - Tokyo-to south of 28 N & west of 140 deg 30 min E.,projected 2D,,,North,East,X,Y,9001,,4301,17818,1998-12-12 00:00:00,,EPSG,Although legally defined as Tokyo datum the accuracy of the geodetic connection to mainland Japan is low.,
-30179,Tokyo / Japan Plane Rectangular CS XIX,Tokyo / Japan zone XIX,,,Japan - Tokyo-to south of 28 N & east of 143 deg E.,projected 2D,,,North,East,X,Y,9001,,4301,17819,1998-12-12 00:00:00,,EPSG,Although legally defined as Tokyo datum the accuracy of the geodetic connection to mainland Japan is low.,
-30200,Trinidad 1903 / Trinidad Grid,Trinidad 1903 / Trinidad,,,Trinidad and Tobago - Trinidad,projected 2D,,,East,North,E,N,9039,,4302,19925,1999-10-20 00:00:00,,EPSG,,97.231
-30339,TC(1948) / UTM zone 39N,,,,United Arab Emirates (UAE) - Abu Dhabi west of 54 deg East.,projected 2D,,,East,North,E,N,9001,,4303,16039,1995-06-02 00:00:00,,EPSG,,
-30340,TC(1948) / UTM zone 40N,,,,United Arab Emirates (UAE) - Abu Dhabi east of 54 deg East; Dubai.,projected 2D,,,East,North,E,N,9001,,4303,16040,1995-06-02 00:00:00,,EPSG,,
-30491,Voirol 1875 / Nord Algerie (ancienne),Voirol /N Algerie ancien,,,Algeria - north of 38.5 grads (34 deg 39 min) North.,projected 2D,,,East,North,X,Y,9001,,4304,18011,1995-06-02 00:00:00,,EPSG,Superseded by 30591 (Voirol Unifie / Algeria Nord).,
-30492,Voirol 1875 / Sud Algerie (ancienne),Voirol /S Algerie ancien,,,Algeria - 35 grads to 38.5 grads (31 deg 30 min to 34 deg 39 min) North.,projected 2D,,,East,North,X,Y,9001,,4304,18012,1995-06-02 00:00:00,,EPSG,Superseded by 30592 (Voirol Unifie / Algeria Sud).,
-30591,Voirol Unifie / Nord Algerie,Voirol Unifie /N Algerie,,,Algeria - north of 38.5 grads (34 deg 39 min) North.,projected 2D,,,East,North,X,Y,9001,,4305,18021,1995-06-02 00:00:00,,EPSG,Supersedes 30491 (Voirol 1875 / Nord Algeria ancienne).,
-30592,Voirol Unifie / Sud Algerie,Voirol Unifie /S Algerie,,,Algeria - 35 grads to 38.5 grads (31 deg 30 min to 34 deg 39 min) North.,projected 2D,,,East,North,X,Y,9001,,4305,18022,1995-06-02 00:00:00,,EPSG,Supersedes 30492 (Voirol 1875 / Sud Algeria ancienne).,
-30729,Nord Sahara 1959 / UTM zone 29N,Nord Sahara / UTM 29N,,,Algeria west of 6 deg West (of Greenwich).,projected 2D,,,East,North,E,N,9001,,4307,16029,1996-04-12 00:00:00,,EPSG,,
-30730,Nord Sahara 1959 / UTM zone 30N,Nord Sahara / UTM 30N,,,Algeria 6 deg West to 0 deg East (of Greenwich).,projected 2D,,,East,North,E,N,9001,,4307,16030,1996-04-12 00:00:00,,EPSG,,
-30731,Nord Sahara 1959 / UTM zone 31N,Nord Sahara / UTM 31N,,,Algeria 0 deg to 6 deg East (of Greenwich).,projected 2D,,,East,North,E,N,9001,,4307,16031,1996-04-12 00:00:00,,EPSG,,
-30732,Nord Sahara 1959 / UTM zone 32N,Nord Sahara / UTM 32N,,,Algeria east of 6 deg East (of Greenwich).,projected 2D,,,East,North,E,N,9001,,4307,16032,1996-04-12 00:00:00,,EPSG,,
-30800,RT38 2.5 gon W,,,,Sweden,projected 2D,,,North,East,X,Y,9001,,4308,19929,1997-11-13 00:00:00,National Land Survey of Sweden,EPSG,,97.14  97.39
-31028,Yoff / UTM zone 28N,,,,Senegal.,projected 2D,,,East,North,E,N,9001,,4310,16028,1995-06-02 00:00:00,,EPSG,,
-31121,Zanderij / UTM zone 21N,,,,Suriname.,projected 2D,,,East,North,E,N,9001,,4311,16021,1995-06-02 00:00:00,,EPSG,,
-31291,MGI (Ferro) / Austria West Zone,MGI / Austria West,,,Austria west of 11deg 50min East of Greenwich (29 deg 30 min East of Ferro).,projected 2D,,,East,North,X,Y,9001,,4805,18041,1995-06-02 00:00:00,,EPSG,Superceded by MGI / M34 (EPSG code 31296).,97.01
-31292,MGI (Ferro) / Austria Central Zone,MGI / Austria Central,,,Austria between 11deg 50min and 14deg 50min East of Greenwich (29 deg 30 min and 32 deg 30 min East of Ferro).,projected 2D,,,East,North,X,Y,9001,,4805,18042,1995-06-02 00:00:00,,EPSG,Superceded by MGI / M31 (EPSG code 31295).,97.01
-31293,MGI (Ferro) / Austria East Zone,MGI / Austria East,,,Austria east of 14deg 50min East of Greenwich (32 deg 30 min East of Ferro).,projected 2D,,,East,North,X,Y,9001,,4805,18043,1995-06-02 00:00:00,,EPSG,Superceded by MGI / M28 (EPSG code 31294).,97.01
-31294,MGI / M28,,,,Austria west of 11deg 50min East of Greenwich (29 deg 30 min East of Ferro).,projected 2D,,,East,North,X,Y,9001,,4312,18044,1999-10-20 00:00:00,,EPSG,Supercedes MGI (Ferro) / Austria East zone (EPSG code 31293).,
-31295,MGI / M31,,,,Austria between 11deg 50min and 14deg 50min East of Greenwich (29 deg 30 min and 32 deg 30 min East of Ferro).,projected 2D,,,East,North,X,Y,9001,,4312,18045,1999-10-20 00:00:00,,EPSG,Supercedes MGI (Ferro) / Austria Central zone (EPSG code 31292).,
-31296,MGI / M34,,,,Austria east of 14deg 50min East of Greenwich (32 deg 30 min East of Ferro).,projected 2D,,,East,North,X,Y,9001,,4312,18046,1999-10-20 00:00:00,,EPSG,Supercedes MGI (Ferro) / Austria West zone (EPSG code 31291).,
-31297,MGI / Austria Lambert,,,,Austria,projected 2D,,,East,North,X,Y,9001,,4312,19947,1999-10-20 00:00:00,,EPSG,,
-31300,Belge 1972 / Belge Lambert 72,Belge Lambert 72,,,Belgium - onshore.,projected 2D,,,East,North,X,Y,9001,,4313,19902,1995-06-02 00:00:00,,EPSG,Supersedes 21500 (Belge 1950 / Belge Lambert 50).,
-31491,DHDN / Germany zone 1,,,,Germany - onshore west of 4 deg 30 min East.,projected 2D,,,East,North,X,Y,9001,,4314,18101,1995-06-02 00:00:00,,EPSG,,
-31492,DHDN / Germany zone 2,,,,Germany - onshore between 4 deg 30 min and 7 deg 30 min East.,projected 2D,,,East,North,X,Y,9001,,4314,18102,1995-06-02 00:00:00,,EPSG,,
-31493,DHDN / Germany zone 3,,,,Germany - onshore between 7 deg 30 min and 10 deg 30 min East.,projected 2D,,,East,North,X,Y,9001,,4314,18103,1995-06-02 00:00:00,,EPSG,,
-31494,DHDN / Germany zone 4,,,,Germany - onshore between 10 deg 30 min and 13 deg 30 min East.,projected 2D,,,East,North,X,Y,9001,,4314,18104,1995-06-02 00:00:00,,EPSG,,
-31495,DHDN / Germany zone 5,,,,Germany - onshore between 13 deg 30 min and 16 deg 30 min East.,projected 2D,,,East,North,X,Y,9001,,4314,18105,1995-06-02 00:00:00,,EPSG,,
-31600,Dealul Piscului 1933/ Stereo 33,Stereo 33,,,Romania.,projected 2D,,,East,North,X,Y,9001,,4316,19927,1996-04-12 00:00:00,,EPSG,Superseded by Stereo 70 system (ProjCS code 31700).,
-31700,Dealul Piscului 1970/ Stereo 70,Stereo 70,,,Romania.,projected 2D,,,North,East,X,Y,9001,,4317,19926,1996-04-12 00:00:00,,EPSG,Supersedes Stereo 33 system.,
-31838,NGN / UTM zone 38N,,,,Kuwait west of 48deg East.,projected 2D,,,East,North,E,N,9001,,4318,16038,1996-04-12 00:00:00,,EPSG,,
-31839,NGN / UTM zone 39N,,,,Kuwait east of 48deg East.,projected 2D,,,East,North,E,N,9001,,4318,16039,1996-04-12 00:00:00,,EPSG,,
-31900,KUDAMS / KTM,,,,Kuwait - Kuwait City.,projected 2D,,,East,North,E,N,9001,,4319,19928,1996-04-12 00:00:00,,EPSG,,
-32001,NAD27 / Montana North,,,,United States (USA) - Montana - MT_N - counties of Blaine; Chouteau; Daniels; Flathead; Glacier; Hill; Liberty; Lincoln; Phillips; Pondera; Roosevelt; Sheridan; Teton; Toole; Valley,projected 2D,,,East,North,X,Y,9003,,4267,12501,1995-06-02 00:00:00,,EPSG,,
-32002,NAD27 / Montana Central,,,,United States (USA) - Montana - MT_C - counties of Cascade; Dawson; Fergus; Garfield; Judith Basin; Lake; Lewis and Clark; McCone; Meagher; Mineral; Missoula; Petroleum; Powell; Prairie; Richland; Sanders; Wibaux,projected 2D,,,East,North,X,Y,9003,,4267,12502,1995-06-02 00:00:00,,EPSG,,
-32003,NAD27 / Montana South,,,,United States (USA) - Montana - MT_S - counties of Beaverhead; Big Horn; Broadwater; Carbon; Carter; Custer; Deer Lodge; Fallon; Gallatin; Golden Valley; Granite; Jefferson; Madison; Musselshell; Park; Powder River; Ravalli; Rosebud; Silver Bow; Stillwater; Sweet Grass; Treasure; Wheatland; Yellowstone,projected 2D,,,East,North,X,Y,9003,,4267,12503,1995-06-02 00:00:00,,EPSG,,
-32005,NAD27 / Nebraska North,,,,United States (USA) - Nebraska - NE_N - counties of Antelope; Blaine; Box Butte; Boyd; Brown; Burt; Cedar; Cherry; Cuming; Dakota; Dawes; Dixon; Garfield; Grant; Holt; Hooker; Keya Paha; Knox; Loup; Madison; Pierce; Rock; Sheridan; Sioux; Stanton; Thomas; Thurston; Wayne; Wheeler,projected 2D,,,East,North,X,Y,9003,,4267,12601,1995-06-02 00:00:00,,EPSG,,
-32006,NAD27 / Nebraska South,,,,United States (USA) - Nebraska - NE_S - counties of Adams; Arthur; Banner; Boone; Buffalo; Butler; Cass; Chase; Cheyenne; Clay; Colfax; Custer; Dawson; Deuel; Dodge; Douglas; Dundy; Fillmore; Franklin; Frontier; Furnas; Gage; Garden; Gosper; Greeley; Hall; Hamilton; Harlan; Hayes; Hitchcock; Howard; Jefferson; Johnson; Kearney; Keith; Kimball; Lancaster; Lincoln; Logan; McPherson; Merrick; Morrill; Nance; Nemaha; Nuckolls; Otoe; Pawnee; Perkins; Phelps; Pl [...]
-32007,NAD27 / Nevada East,,,,United States (USA) - Nevada - NV_E - counties of Clark; Elko; Eureka; Lincoln; White Pine,projected 2D,,,East,North,X,Y,9003,,4267,12701,1995-06-02 00:00:00,,EPSG,,
-32008,NAD27 / Nevada Central,,,,United States (USA) - Nevada - NV_C - counties of Lander; Nye,projected 2D,,,East,North,X,Y,9003,,4267,12702,1995-06-02 00:00:00,,EPSG,,
-32009,NAD27 / Nevada West,,,,United States (USA) - Nevada - NV_W - counties of Churchill; Douglas; Esmeralda; Humboldt; Lyon; Mineral; Pershing; Storey; Washoe,projected 2D,,,East,North,X,Y,9003,,4267,12703,1995-06-02 00:00:00,,EPSG,,
-32010,NAD27 / New Hampshire,,,,United States (USA) - New Hampshire - NH - counties of Belknap; Carroll; Cheshire; Coos; Grafton; Hillsborough; Merrimack; Rockingham; Strafford; Sullivan,projected 2D,,,East,North,X,Y,9003,,4267,12800,1995-06-02 00:00:00,,EPSG,,
-32011,NAD27 / New Jersey,,,,United States (USA) - New Jersey - NJ - counties of Atlantic; Bergen; Burlington; Camden; Cape May; Cumberland; Essex; Gloucester; Hudson; Hunterdon; Mercer; Middlesex; Monmouth; Morris; Ocean; Passaic; Salem; Somerset; Sussex; Union; Warren,projected 2D,,,East,North,X,Y,9003,,4267,12900,1995-06-02 00:00:00,,EPSG,,
-32012,NAD27 / New Mexico East,,,,United States (USA) - New Mexico - NM_E - counties of Chaves; Colfax; Curry; De Baca; Eddy; Guadalupe; Harding; Lea; Mora; Quay; Roosevelt; San Miguel; Union,projected 2D,,,East,North,X,Y,9003,,4267,13001,1995-06-02 00:00:00,,EPSG,,
-32013,NAD27 / New Mexico Central,NAD27 / New Mexico Cent.,,,United States (USA) - New Mexico - NM_C - counties of Bernalillo; Dona Ana; Lincoln; Los Alamos; Otero; Rio Arriba; Sandoval; Santa Fe; Socorro; Taos; Torrance,projected 2D,,,East,North,X,Y,9003,,4267,13002,1995-06-02 00:00:00,,EPSG,,
-32014,NAD27 / New Mexico West,,,,United States (USA) - New Mexico - NM_W - counties of Catron; Cibola; Grant; Hidalgo; Luna; McKinley; San Juan; Sierra; Valencia,projected 2D,,,East,North,X,Y,9003,,4267,13003,1995-06-02 00:00:00,,EPSG,,
-32015,NAD27 / New York East,,,,United States (USA) - New York - NY_E - counties of Albany; Clinton; Columbia; Delaware; Dutchess; Essex; Franklin; Fulton; Greene; Hamilton; Herkimer; Montgomery; Orange; Otsego; Putnam; Rensselaer; Rockland; Saratoga; Schenectady; Schoharie; St. Lawrence; Sullivan; Ulster; Warren; Washington; Westchester,projected 2D,,,East,North,X,Y,9003,,4267,13101,1995-06-02 00:00:00,,EPSG,,
-32016,NAD27 / New York Central,,,,United States (USA) - New York - NY_C - counties of Broome; Cayuga; Chemung; Chenango; Cortland; Jefferson; Lewis; Madison; Oneida; Onondaga; Ontario; Oswego; Schuyler; Seneca; Steuben; Tioga; Tompkins; Wayne; Yates,projected 2D,,,East,North,X,Y,9003,,4267,13102,1995-06-02 00:00:00,,EPSG,,
-32017,NAD27 / New York West,,,,United States (USA) - New York - NY_W - counties of Allegany; Cattaraugus; Chautauqua; Erie; Genesee; Livingston; Monroe; Niagara; Orleans; Wyoming,projected 2D,,,East,North,X,Y,9003,,4267,13103,1995-06-02 00:00:00,,EPSG,,
-32018,NAD27 / New York Long Island,NAD27 / New York Long Is,,,United States (USA) - New York - NY_LI - counties of Bronx; Kings; Nassau; New York; Queens; Richmond; Suffolk,projected 2D,,,East,North,X,Y,9003,,4267,13104,1995-06-02 00:00:00,,EPSG,,
-32019,NAD27 / North Carolina,,,,United States (USA) - North Carolina - NC - counties of Alamance; Alexander; Alleghany; Anson; Ashe; Avery; Beaufort; Bertie; Bladen; Brunswick; Buncombe; Burke; Cabarrus; Caldwell; Camden; Carteret; Caswell; Catawba; Chatham; Cherokee; Chowan; Clay; Cleveland; Columbus; Craven; Cumberland; Currituck; Dare; Davidson; Davie; Duplin; Durham; Edgecombe; Forsyth; Franklin; Gaston; Gates; Graham; Granville; Greene; Guilford; Halifax; Harnett; Haywood; Henderson [...]
-32020,NAD27 / North Dakota North,NAD27 / North Dakota N,,,United States (USA) - North Dakota - ND_N - counties of Benson; Bottineau; Burke; Cavalier; Divide; Eddy; Foster; Grand Forks; Griggs; McHenry; McKenzie; McLean; Mountrial; Nelson; Pembina; Pierce; Ramsey; Renville; Rolette; Sheridan; Steele; Towner; Traill; Walsh; Ward; Wells; Williams,projected 2D,,,East,North,X,Y,9003,,4267,13301,1995-06-02 00:00:00,,EPSG,,
-32021,NAD27 / North Dakota South,NAD27 / North Dakota S,,,United States (USA) - North Dakota - ND_S - counties of Adams; Barnes; Billings; Bowman; Burleigh; Cass; Dickey; Dunn; Emmons; Golden Valley; Grant; Hettinger; Kidder; La Moure; Logan; McIntosh; Mercer; Morton; Oliver; Ransom; Richland; Sargent; Sioux; Slope; Stark; Stutsman,projected 2D,,,East,North,X,Y,9003,,4267,13302,1995-06-02 00:00:00,,EPSG,,
-32022,NAD27 / Ohio North,,,,United States (USA) - Ohio - OH_N - counties of Allen;Ashland; Ashtabula; Auglaize; Carroll; Columbiana; Coshocton; Crawford; Cuyahoga; Defiance; Delaware; Erie; Fulton; Geauga; Hancock; Hardin; Harrison; Henry; Holmes; Huron; Jefferson; Knox; Lake; Logan; Lorain; Lucas; Mahoning; Marion; Medina; Mercer; Morrow; Ottawa; Paulding; Portage; Putnam; Richland; Sandusky; Seneca; Shelby; Stark; Summit; Trumbull; Tuscarawas; Union; Van Wert; Wayne; Williams; Wood; Wy [...]
-32023,NAD27 / Ohio South,,,,United States (USA) - Ohio - OH_S - counties of Adams; Athens; Belmont; Brown; Butler; Champaign; Clark; Clermont; Clinton; Darke; Fairfield; Fayette; Franklin; Gallia; Greene; Guernsey; Hamilton; Highland; Hocking; Jackson; Lawrence; Licking; Madison; Meigs; Miami; Monroe; Montgomery; Morgan; Muskingum; Noble; Perry; Pickaway; Pike; Preble; Ross; Scioto; Vinton; Warren; Washington,projected 2D,,,East,North,X,Y,9003,,4267,13402,1995-06-02 00:00:00,,EPSG,,
-32024,NAD27 / Oklahoma North,,,,United States (USA) - Oklahoma - OK_N - counties of Adair; Alfalfa; Beaver; Blaine; Canadian; Cherokee; Cimarron; Craig; Creek; Custer; Delaware; Dewey; Ellis; Garfield; Grant; Harper; Kay; Kingfisher; Lincoln; Logan; Major; Mayes; Muskogee; Noble; Nowata; Okfuskee; Oklahoma; Okmulgee; Osage; Ottawa; Pawnee; Payne; Roger Mills; Rogers; Sequoyah; Texas; Tulsa; Wagoner; Washington; Woods; Woodward,projected 2D,,,East,North,X,Y,9003,,4267,13501,1995-06-02 00: [...]
-32025,NAD27 / Oklahoma South,,,,United States (USA) - Oklahoma - OK_S - counties of Atoka; Beckham; Bryan; Caddo; Carter; Choctaw; Cleveland; Coal; Comanche; Cotton; Garvin; Grady; Greer; Harmon; Haskell; Hughes; Jackson; Jefferson; Johnston; Kiowa; Latimer; Le Flore; Love; Marshall; McClain; McCurtain; McIntosh; Murray; Pittsburg; Pontotoc; Pottawatomie; Pushmataha; Seminole; Stephens; Tillman; Washita,projected 2D,,,East,North,X,Y,9003,,4267,13502,1995-06-02 00:00:00,,EPSG,,
-32026,NAD27 / Oregon North,,,,United States (USA) - Oregon - OR_N - counties of Baker; Benton; Clackamas; Clatsop; Columbia; Gilliam; Grant; Hood River; Jefferson; Lincoln; Linn; Marion; Morrow; Multnomah; Polk; Sherman; Tillamook; Umatilla; Union; Wallowa; Wasco; Washington; Wheeler; Yamhill,projected 2D,,,East,North,X,Y,9003,,4267,13601,1995-06-02 00:00:00,,EPSG,,
-32027,NAD27 / Oregon South,,,,United States (USA) - Oregon - OR_S - counties of Coos; Crook; Curry; Deschutes; Douglas; Harney; Jackson; Josephine; Klamath; Lake; Lane; Malheur,projected 2D,,,East,North,X,Y,9003,,4267,13602,1995-06-02 00:00:00,,EPSG,,
-32028,NAD27 / Pennsylvania North,NAD27 / Pennsylvania N,,,United States (USA) - Pennsylvania - PA_N - counties of Bradford; Cameron; Carbon; Centre; Clarion; Clearfield; Clinton; Columbia; Crawford; Elk; Erie; Forest; Jefferson; Lackawanna; Luzerne; Lycoming; McKean; Mercer; Monroe; Montour; Northumberland; Pike; Potter; Sullivan; Susquehanna; Tioga; Union; Venango; Warren; Wayne; Wyoming,projected 2D,,,East,North,X,Y,9003,,4267,13701,1995-06-02 00:00:00,,EPSG,,
-32029,NAD27 / Pennsylvania South,NAD27 / Pennsylvania S,,,United States (USA) - Pennsylvania - PA_S - counties of Adams; Allegheny; Armstrong; Beaver; Bedford; Berks; Blair; Bucks; Butler; Cambria; Chester; Cumberland; Dauphin; Delaware; Fayette; Franklin; Fulton; Greene; Huntingdon; Indiana; Juniata; Lancaster; Lawrence; Lebanon; Lehigh; Mifflin; Montgomery; Northampton; Perry; Philadelphia; Schuylkill; Snyder; Somerset; Washington; Westmoreland; York,projected 2D,,,East,North,X,Y,9003, [...]
-32030,NAD27 / Rhode Island,,,,United States (USA) - Rhode Island - RI - counties of Bristol; Kent; Newport; Providence; Washington,projected 2D,,,East,North,X,Y,9003,,4267,13800,1995-06-02 00:00:00,,EPSG,,
-32031,NAD27 / South Carolina North,NAD27 / South Carolina N,,,United States (USA) - South Carolina - SC_N - counties of Abbeville; Anderson; Calhoun; Cherokee; Chester; Chesterfield; Darlington; Dillon; Edgefield; Fairfield; Florence; Greenville; Greenwood; Horry; Kershaw; Lancaster; Laurens; Lee; Lexington; Marion; Marlboro; McCormick; Newberry; Oconee; Pickens; Richland; Saluda; Spartanburg; Sumter; Union; York,projected 2D,,,East,North,X,Y,9003,,4267,13901,1995-06-02 00:00:00,,EPSG,,
-32033,NAD27 / South Carolina South,NAD27 / South Carolina S,,,United States (USA) - South Carolina - SC_S - counties of Aiken; Allendale; Bamberg; Barnwell; Beaufort; Berkeley; Charleston; Clarendon; Colleton; Dorchester; Georgetown; Hampton; Jasper; Orangeburg; Williamsburg,projected 2D,,,East,North,X,Y,9003,,4267,13902,1995-06-02 00:00:00,,EPSG,,
-32034,NAD27 / South Dakota North,NAD27 / South Dakota N,,,United States (USA) - South Dakota - SD_N - counties of Beadle; Brookings; Brown; Butte; Campbell; Clark; Codington; Corson; Day; Deuel; Dewey; Edmunds; Faulk; Grant; Hamlin; Hand; Harding; Hyde; Kingsbury; Lawrence; Marshall; McPherson; Meade; Perkins; Potter; Roberts; Spink; Sully; Walworth; Ziebach,projected 2D,,,East,North,X,Y,9003,,4267,14001,1995-06-02 00:00:00,,EPSG,,
-32035,NAD27 / South Dakota South,NAD27 / South Dakota S,,,United States (USA) - South Dakota - SD_S - counties of Aurora; Bennett; Bon Homme; Brule; Buffalo; Charles Mix; Clay; Custer; Davison; Douglas; Fall River; Gregory; Haakon; Hanson; Hughes; Hutchinson; Jackson; Jerauld; Jones; Lake; Lincoln; Lyman; McCook; Mellette; Miner; Minnehaha; Moody; Pennington; Sanborn; Shannon; Stanley; Todd; Tripp; Turner; Union; Yankton,projected 2D,,,East,North,X,Y,9003,,4267,14002,1995-06-02 00:00:00,,EPSG,,
-32036,NAD27 / Tennessee,,,,United States (USA) - Tennessee - TN - counties of Anderson; Bedford; Benton; Bledsoe; Blount; Bradley; Campbell; Cannon; Carroll; Carter; Cheatham; Chester; Claiborne; Clay; Cocke; Coffee; Crockett; Cumberland; Davidson; De Kalb; Decatur; Dickson; Dyer; Fayette; Fentress; Franklin; Gibson; Giles; Grainger; Greene; Grundy; Hamblen; Hamilton; Hancock; Hardeman; Hardin; Hawkins; Haywood; Henderson; Henry; Hickman; Houston; Humphreys; Jackson; Jefferson; Johnson;  [...]
-32037,NAD27 / Texas North,,,,United States (USA) - Texas -TX_N - counties of: Armstrong; Briscoe; Carson; Castro; Childress; Collingsworth; Dallam; Deaf Smith; Donley; Gray; Hall; Hansford; Hartley; Hemphill; Hutchinson; Lipscomb; Moore; Ochiltree; Oldham; Parmer; Potter; Randall; Roberts; Sherman; Swisher; Wheeler,projected 2D,,,East,North,X,Y,9003,,4267,14201,1995-06-02 00:00:00,,EPSG,,
-32038,NAD27 / Texas North Central,NAD27 / Texas North Cen.,,,United States (USA) - Texas -TX_NC - counties of: Andrews; Archer; Bailey; Baylor; Borden; Bowie; Callahan; Camp; Cass; Clay; Cochran; Collin; Cooke; Cottle; Crosby; Dallas; Dawson; Delta; Denton; Dickens; Eastland; Ellis; Erath; Fannin; Fisher; Floyd; Foard; Franklin; Gaines; Garza; Grayson,projected 2D,,,East,North,X,Y,9003,,4267,14202,1995-06-02 00:00:00,,EPSG,,
-32039,NAD27 / Texas Central,,,,United States (USA) - Texas -TX_C - counties of Anderson; Angelina; Bastrop; Bell; Blanco; Bosque; Brazos; Brown; Burleson; Burnet; Cherokee; Coke; Coleman; Comanche; Concho; Coryell; Crane; Crockett; Culberson; Ector; El Paso; Falls; Freestone; Gillespie; Glasscock; Grimes; Hamilton; Hardin; Houston; Hudspeth; Irion; Jasper; Jeff Davis; Kimble; Lampasas; Lee; Leon; Liberty; Limestone; Llano; Loving; Madison; Mason; McCulloch; McLennan; Menard; Midland; Mil [...]
-32040,NAD27 / Texas South Central,NAD27 / Texas South Cen.,,,United States (USA) - Texas -TX_SC - counties of Aransas; Atascosa; Austin; Bandera; Bee; Bexar; Brazoria; Brewster; Caldwell; Calhoun; Chambers; Colorado; Comal; De Witt; Dimmit; Edwards; Fayette; Fort Bend; Frio; Galveston; Goliad; Gonzales; Guadalupe; Harris; Hays; Jackson; Jefferson; Karnes; Kendall; Kerr; Kinney; La Salle; Lavaca; Live Oak; Matagorda; Maverick; McMullen; Medina; Presidio; Real; Refugio; Terrell; Uvalde; Va [...]
-32041,NAD27 / Texas South,,,,United States (USA) - Texas -TX_S - counties of Brooks; Cameron; Duval; Hidalgo; Jim Hogg; Jim Wells; Kenedy; Kleberg; Nueces; San Patricio; Starr; Webb; Willacy; Zapata;  - Gulf of Mexico outer continental shelf (OCS) protraction areas: South Padre Island; North Padre Island; Mustang Island.,projected 2D,,,East,North,X,Y,9003,,4267,14205,1995-06-02 00:00:00,,EPSG,,
-32042,NAD27 / Utah North,,,,United States (USA) - Utah - UT_N - counties of Box Elder; Cache; Daggett; Davis; Morgan; Rich; Summit; Weber,projected 2D,,,East,North,X,Y,9003,,4267,14301,1995-06-02 00:00:00,,EPSG,,
-32043,NAD27 / Utah Central,,,,United States (USA) - Utah - UT_C - counties of Carbon; Duchesne; Emery; Grand; Juab; Millard; Salt Lake; Sanpete; Sevier; Tooele; Uintah; Utah; Wasatch,projected 2D,,,East,North,X,Y,9003,,4267,14302,1995-06-02 00:00:00,,EPSG,,
-32044,NAD27 / Utah South,,,,United States (USA) - Utah - UT_S - counties of Beaver; Garfield; Iron; Kane; Piute; San Juan; Washington; Wayne,projected 2D,,,East,North,X,Y,9003,,4267,14303,1995-06-02 00:00:00,,EPSG,,
-32045,NAD27 / Vermont,,,,United States (USA) - Vermont - VT - counties of Addison; Bennington; Caledonia; Chittenden; Essex; Franklin; Grand Isle; Lamoille; Orange; Orleans; Rutland; Washington; Windham; Windsor,projected 2D,,,East,North,X,Y,9003,,4267,14400,1995-06-02 00:00:00,,EPSG,,
-32046,NAD27 / Virginia North,,,,United States (USA) - Virginia - VA_N - counties of Arlington; Augusta; Bath; Caroline; Clarke; Culpeper; Fairfax; Fauquier; Frederick; Greene; Highland; King George; Loudoun; Madison; Orange; Page; Prince William; Rappahannock; Rockingham; Shenandoah; Spotsylvania; Stafford; Warren; Westmoreland,projected 2D,,,East,North,X,Y,9003,,4267,14501,1995-06-02 00:00:00,,EPSG,,
-32047,NAD27 / Virginia South,,,,United States (USA) - Virginia - VA_S - counties of Accomack; Albemarle; Alleghany; Amelia; Amherst; Appomattox; Bedford; Bland; Botetourt; Bristol; Brunswick; Buchanan; Buckingham; Campbell; Carroll; Charles City; Charlotte; Chesapeake; Chesterfield; Colonial Heights; Craig; Cumberland; Dickenson; Dinwiddie; Essex; Floyd; Fluvanna; Franklin; Giles; Gloucester; Goochland; Grayson; Greensville; Halifax; Hampton; Hanover; Henrico; Henry; Isle of Wight; James [...]
-32048,NAD27 / Washington North,,,,United States (USA) - Washington - WA_N - counties of Chelan; Clallam; Douglas; Ferry; Island; Jefferson; King; Kitsap; Lincoln; Okanogan; Pend Oreille; San Juan; Skagit; Snohomish; Spokane; Stevens; Whatcom,projected 2D,,,East,North,X,Y,9003,,4267,14601,1995-06-02 00:00:00,,EPSG,,
-32049,NAD27 / Washington South,,,,United States (USA) - Washington - WA_S - counties of Adams; Asotin; Benton; Clark; Columbia; Cowlitz; Franklin; Garfield; Grant; Grays Harbor; Kittitas; Klickitat; Lewis; Mason; Pacific; Pierce; Skamania; Thurston; Wahkiakum; Walla Walla; Whitman; Yakima,projected 2D,,,East,North,X,Y,9003,,4267,14602,1995-06-02 00:00:00,,EPSG,,
-32050,NAD27 / West Virginia North,NAD27 / West Virginia N,,,United States (USA) - West Virginia - WV_N - counties of Barbour; Berkeley; Brooke; Doddridge; Grant; Hampshire; Hancock; Hardy; Harrison; Jefferson; Marion; Marshall; Mineral; Monongalia; Morgan; Ohio; Pleasants; Preston; Ritchie; Taylor; Tucker; Tyler; Wetzel; Wirt; Wood,projected 2D,,,East,North,X,Y,9003,,4267,14701,1995-06-02 00:00:00,,EPSG,,
-32051,NAD27 / West Virginia South,NAD27 / West Virginia S,,,United States (USA) - West Virginia - WV_S - counties of Boone; Braxton; Cabell; Calhoun; Clay; Fayette; Gilmer; Greenbrier; Jackson; Kanawha; Lewis; Lincoln; Logan; Mason; McDowell; Mercer; Mingo; Monroe; Nicholas; Pendleton; Pocahontas; Putnam; Raleigh; Randolph; Roane; Summers; Upshur; Wayne; Webster; Wyoming,projected 2D,,,East,North,X,Y,9003,,4267,14702,1995-06-02 00:00:00,,EPSG,,
-32052,NAD27 / Wisconsin North,,,,United States (USA) - Wisconsin - WI_N - counties of Ashland; Bayfield; Burnett; Douglas; Florence; Forest; Iron; Oneida; Price; Sawyer; Vilas; Washburn,projected 2D,,,East,North,X,Y,9003,,4267,14801,1995-06-02 00:00:00,,EPSG,,
-32053,NAD27 / Wisconsin Central,NAD27 / Wisconsin Cen.,,,United States (USA) - Wisconsin - WI_C - counties of Barron; Brown; Buffalo; Chippewa; Clark; Door; Dunn; Eau Claire; Jackson; Kewaunee; Langlade; Lincoln; Marathon; Marinette; Menominee; Oconto; Outagamie; Pepin; Pierce; Polk; Portage; Rusk; Shawano; St. Croix; Taylor; Trempealeau; Waupaca; Wood,projected 2D,,,East,North,X,Y,9003,,4267,14802,1995-06-02 00:00:00,,EPSG,,
-32054,NAD27 / Wisconsin South,,,,United States (USA) - Wisconsin - WI_S - counties of Adams; Calumet; Columbia; Crawford; Dane; Dodge; Fond Du Lac; Grant; Green; Green Lake; Iowa; Jefferson; Juneau; Kenosha; La Crosse; Lafayette; Manitowoc; Marquette; Milwaukee; Monroe; Ozaukee; Racine; Richland; Rock; Sauk; Sheboygan; Vernon; Walworth; Washington; Waukesha; Waushara; Winnebago,projected 2D,,,East,North,X,Y,9003,,4267,14803,1995-06-02 00:00:00,,EPSG,,
-32055,NAD27 / Wyoming East,,,,United States (USA) - Wyoming - WY_E - counties of Albany; Campbell; Converse; Crook; Goshen; Laramie; Niobrara; Platte; Weston,projected 2D,,,East,North,X,Y,9003,,4267,14901,1995-06-02 00:00:00,,EPSG,,
-32056,NAD27 / Wyoming East Central,NAD27 / Wyoming E. Cen.,,,United States (USA) - Wyoming - WY_EC - counties of Big Horn; Carbon; Johnson; Natrona; Sheridan; Washakie,projected 2D,,,East,North,X,Y,9003,,4267,14902,1995-06-02 00:00:00,,EPSG,,
-32057,NAD27 / Wyoming West Central,NAD27 / Wyoming W. Cen.,,,United States (USA) - Wyoming - WY_WC - counties of Fremont; Hot Springs; Park; Sweetwater,projected 2D,,,East,North,X,Y,9003,,4267,14903,1995-06-02 00:00:00,,EPSG,,
-32058,NAD27 / Wyoming West,,,,United States (USA) - Wyoming - WY_W - counties of Lincoln; Sublette; Teton; Uinta,projected 2D,,,East,North,X,Y,9003,,4267,14904,1995-06-02 00:00:00,,EPSG,,
-32061,NAD27 / Guatemala Norte,,,,Guatemala - north of 15 deg 50 min North.,projected 2D,,,East,North,X,Y,9001,,4267,18211,1999-08-18 00:00:00,,EPSG,,
-32062,NAD27 / Guatemala Sud,,,,Guatemala - south of 15 deg 50 min North.,projected 2D,,,East,North,X,Y,9001,,4267,18212,1999-08-18 00:00:00,,EPSG,,
-32074,NAD27 / BLM 14N (feet),,,,United States - Gulf of Mexico - west of approximately 96 deg West - outer continental shelf (OCS) protraction areas Corpus Christi; Port Isabel.,projected 2D,,,East,North,X,Y,9003,,4267,15914,1996-04-12 00:00:00,,EPSG,,96.03
-32075,NAD27 / BLM 15N (feet),,,,United States - Gulf of Mexico - 96 deg to 90 deg West - outer continental shelf (OCS) protraction areas East Breaks (EB); Alaminos Canyon (AC); Garden Banks (GB); Keathley Canyon (KC); Ewing Bank (EW); Green Canyon (GC); Walker Ridge (WR).,projected 2D,,,East,North,X,Y,9003,,4267,15915,1996-04-12 00:00:00,,EPSG,,96.03
-32076,NAD27 / BLM 16N (feet),,,,United States - Gulf of Mexico - 90 deg to 84 deg West - outer continental shelf (OCS) protraction areas Mobile (MO); Viosca Knoll (VK); Mississippi Canyon (MC); Atwater Valley (AT); Lund; Pensacola; Destin Dome (DD); De Soto Canyon; Lloyd; Henderson; Apalachicola; Florida Middle Ground; The Elbow; Vernon Basin; Howell Hook.,projected 2D,,,East,North,X,Y,9003,,4267,15916,1996-04-12 00:00:00,,EPSG,,95.27  96.03
-32077,NAD27 / BLM 17N (feet),,,,United States - Gulf of Mexico - east of 84 deg West - outer continental shelf (OCS) protraction areas Gainesville; Tarpon Springs; St. Petersburg; Charlotte Harbor; Pulley Ridge; Dry Tortugas; Miami; Key West.,projected 2D,,,East,North,X,Y,9003,,4267,15917,1996-04-12 00:00:00,,EPSG,,96.03
-32081,NAD27 / MTM zone 1,,,,Canada - Newfoundland - east of 54 deg 30 min West.,projected 2D,,,East,North,E,N,9001,,4267,17701,1997-11-13 00:00:00,Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.,EPSG,,
-32082,NAD27 / MTM zone 2,,,,Canada - Newfoundland and Labrador between 57 deg 30 min and 54 de 30 min West.,projected 2D,,,East,North,E,N,9001,,4267,17702,1997-11-13 00:00:00,Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.,EPSG,,
-32083,NAD27 / MTM zone 3,,,,Canada - Newfoundland and Labrador between 60 deg and 57 deg 30 min West.,projected 2D,,,East,North,E,N,9001,,4267,17703,1997-11-13 00:00:00,Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.,EPSG,,
-32084,NAD27 / MTM zone 4,,,,Canada - Newfoundland (Labrador) between 63 deg and 60 deg West.,projected 2D,,,East,North,E,N,9001,,4267,17704,1997-11-13 00:00:00,Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.,EPSG,,
-32085,NAD27 / MTM zone 5,,,,Canada - Newfoundland (Labrador) between 66 deg and 63 deg West.,projected 2D,,,East,North,E,N,9001,,4267,17705,1997-11-13 00:00:00,Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.,EPSG,,
-32086,NAD27 / MTM zone 6,,,,Canada - Newfoundland (Labrador) between 69 deg and  66 deg West.,projected 2D,,,East,North,E,N,9001,,4267,17706,1997-11-13 00:00:00,Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.,EPSG,,
-32100,NAD83 / Montana,,,,United States (USA) - Montana - MT - counties of Beaverhead; Big Horn; Blaine; Broadwater; Carbon; Carter; Cascade; Chouteau; Custer; Daniels; Dawson; Deer Lodge; Fallon; Fergus; Flathead; Gallatin; Garfield; Glacier; Golden Valley; Granite; Hill; Jefferson; Judith Basin; Lake; Lewis and Clark; Liberty; Lincoln; Madison; McCone; Meagher; Mineral; Missoula; Musselshell; Park; Petroleum; Phillips; Pondera; Powder River; Powell; Prairie; Ravalli; Richland; Roosevelt [...]
-32104,NAD83 / Nebraska,,,,United States (USA) - Nebraska - NE - counties of Adams; Antelope; Arthur; Banner; Blaine; Boone; Box Butte; Boyd; Brown; Buffalo; Burt; Butler; Cass; Cedar; Chase; Cherry; Cheyenne; Clay; Colfax; Cuming; Custer; Dakota; Dawes; Dawson; Deuel; Dixon; Dodge; Douglas; Dundy; Fillmore; Franklin; Frontier; Furnas; Gage; Garden; Garfield; Gosper; Grant; Greeley; Hall; Hamilton; Harlan; Hayes; Hitchcock; Holt; Hooker; Howard; Jefferson; Johnson; Kearney; Keith; Keya Pa [...]
-32107,NAD83 / Nevada  East,,,,United States (USA) - Nevada - NV_E - counties of Clark; Elko; Eureka; Lincoln; White Pine,projected 2D,,,East,North,X,Y,9001,,4269,12731,1995-06-02 00:00:00,,EPSG,,
-32108,NAD83 / Nevada Central,,,,United States (USA) - Nevada - NV_C - counties of Lander; Nye,projected 2D,,,East,North,X,Y,9001,,4269,12732,1995-06-02 00:00:00,,EPSG,,
-32109,NAD83 / Nevada West,,,,United States (USA) - Nevada - NV_W - counties of Churchill; Douglas; Esmeralda; Humboldt; Lyon; Mineral; Pershing; Storey; Washoe,projected 2D,,,East,North,X,Y,9001,,4269,12733,1995-06-02 00:00:00,,EPSG,,
-32110,NAD83 / New Hampshire,,,,United States (USA) - New Hampshire - NH - counties of Belknap; Carroll; Cheshire; Coos; Grafton; Hillsborough; Merrimack; Rockingham; Strafford; Sullivan,projected 2D,,,East,North,X,Y,9001,,4269,12830,1995-06-02 00:00:00,,EPSG,,
-32111,NAD83 / New Jersey,,,,United States (USA) - New Jersey - NJ - counties of Atlantic; Bergen; Burlington; Camden; Cape May; Cumberland; Essex; Gloucester; Hudson; Hunterdon; Mercer; Middlesex; Monmouth; Morris; Ocean; Passaic; Salem; Somerset; Sussex; Union; Warren,projected 2D,,,East,North,X,Y,9001,,4269,12930,1995-06-02 00:00:00,,EPSG,,
-32112,NAD83 / New Mexico East,,,,United States (USA) - New Mexico - NM_E - counties of Chaves; Colfax; Curry; De Baca; Eddy; Guadalupe; Harding; Lea; Mora; Quay; Roosevelt; San Miguel; Union,projected 2D,,,East,North,X,Y,9001,,4269,13031,1995-06-02 00:00:00,,EPSG,,
-32113,NAD83 / New Mexico Central,NAD83 / New Mexico Cent.,,,United States (USA) - New Mexico - NM_C - counties of Bernalillo; Dona Ana; Lincoln; Los Alamos; Otero; Rio Arriba; Sandoval; Santa Fe; Socorro; Taos; Torrance; Valencia,projected 2D,,,East,North,X,Y,9001,,4269,13032,1995-06-02 00:00:00,,EPSG,,
-32114,NAD83 / New Mexico West,,,,United States (USA) - New Mexico - NM_W - counties of Catron; Cibola; Grant; Hidalgo; Luna; McKinley; San Juan; Sierra,projected 2D,,,East,North,X,Y,9001,,4269,13033,1995-06-02 00:00:00,,EPSG,,
-32115,NAD83 / New York  East,,,,United States (USA) - New York - NY_E - counties of Albany; Clinton; Columbia; Delaware; Dutchess; Essex; Franklin; Fulton; Greene; Hamilton; Herkimer; Montgomery; Orange; Otsego; Putnam; Rensselaer; Rockland; Saratoga; Schenectady; Schoharie; St. Lawrence; Sullivan; Ulster; Warren; Washington; Westchester,projected 2D,,,East,North,X,Y,9001,,4269,13131,1995-06-02 00:00:00,,EPSG,,
-32116,NAD83 / New York Central,,,,United States (USA) - New York - NY_C - counties of Broome; Cayuga; Chemung; Chenango; Cortland; Jefferson; Lewis; Madison; Oneida; Onondaga; Ontario; Oswego; Schuyler; Seneca; Steuben; Tioga; Tompkins; Wayne; Yates,projected 2D,,,East,North,X,Y,9001,,4269,13132,1995-06-02 00:00:00,,EPSG,,
-32117,NAD83 / New York  West,,,,United States (USA) - New York - NY_W - counties of Allegany; Cattaraugus; Chautauqua; Erie; Genesee; Livingston; Monroe; Niagara; Orleans; Wyoming,projected 2D,,,East,North,X,Y,9001,,4269,13133,1995-06-02 00:00:00,,EPSG,,
-32118,NAD83 / New York Long Island,NAD83 / New York Long Is,,,United States (USA) - New York - NY_LI - counties of Bronx; Kings; Nassau; New York; Queens; Richmond; Suffolk,projected 2D,,,East,North,X,Y,9001,,4269,13134,1995-06-02 00:00:00,,EPSG,,
-32119,NAD83 / North Carolina,,,,United States (USA) - North Carolina - NC - counties of Alamance; Alexander; Alleghany; Anson; Ashe; Avery; Beaufort; Bertie; Bladen; Brunswick; Buncombe; Burke; Cabarrus; Caldwell; Camden; Carteret; Caswell; Catawba; Chatham; Cherokee; Chowan; Clay; Cleveland; Columbus; Craven; Cumberland; Currituck; Dare; Davidson; Davie; Duplin; Durham; Edgecombe; Forsyth; Franklin; Gaston; Gates; Graham; Granville; Greene; Guilford; Halifax; Harnett; Haywood; Henderson [...]
-32120,NAD83 / North Dakota North,NAD83 / North Dakota N,,,United States (USA) - North Dakota - ND_N - counties of Benson; Bottineau; Burke; Cavalier; Divide; Eddy; Foster; Grand Forks; Griggs; McHenry; McKenzie; McLean; Mountrial; Nelson; Pembina; Pierce; Ramsey; Renville; Rolette; Sheridan; Steele; Towner; Traill; Walsh; Ward; Wells; Williams,projected 2D,,,East,North,X,Y,9001,,4269,13331,1995-06-02 00:00:00,,EPSG,,
-32121,NAD83 / North Dakota South,NAD83 / North Dakota S,,,United States (USA) - North Dakota - ND_S - counties of Adams; Barnes; Billings; Bowman; Burleigh; Cass; Dickey; Dunn; Emmons; Golden Valley; Grant; Hettinger; Kidder; La Moure; Logan; McIntosh; Mercer; Morton; Oliver; Ransom; Richland; Sargent; Sioux; Slope; Stark; Stutsman,projected 2D,,,East,North,X,Y,9001,,4269,13332,1995-06-02 00:00:00,,EPSG,,
-32122,NAD83 / Ohio North,,,,United States (USA) - Ohio - OH_N - counties of Allen;Ashland; Ashtabula; Auglaize; Carroll; Columbiana; Coshocton; Crawford; Cuyahoga; Defiance; Delaware; Erie; Fulton; Geauga; Hancock; Hardin; Harrison; Henry; Holmes; Huron; Jefferson; Knox; Lake; Logan; Lorain; Lucas; Mahoning; Marion; Medina; Mercer; Morrow; Ottawa; Paulding; Portage; Putnam; Richland; Sandusky; Seneca; Shelby; Stark; Summit; Trumbull; Tuscarawas; Union; Van Wert; Wayne; Williams; Wood; Wy [...]
-32123,NAD83 / Ohio South,,,,United States (USA) - Ohio - OH_S - counties of Adams; Athens; Belmont; Brown; Butler; Champaign; Clark; Clermont; Clinton; Darke; Fairfield; Fayette; Franklin; Gallia; Greene; Guernsey; Hamilton; Highland; Hocking; Jackson; Lawrence; Licking; Madison; Meigs; Miami; Monroe; Montgomery; Morgan; Muskingum; Noble; Perry; Pickaway; Pike; Preble; Ross; Scioto; Vinton; Warren; Washington,projected 2D,,,East,North,X,Y,9001,,4269,13432,1995-06-02 00:00:00,,EPSG,,
-32124,NAD83 / Oklahoma North,,,,United States (USA) - Oklahoma - OK_N - counties of Adair; Alfalfa; Beaver; Blaine; Canadian; Cherokee; Cimarron; Craig; Creek; Custer; Delaware; Dewey; Ellis; Garfield; Grant; Harper; Kay; Kingfisher; Lincoln; Logan; Major; Mayes; Muskogee; Noble; Nowata; Okfuskee; Oklahoma; Okmulgee; Osage; Ottawa; Pawnee; Payne; Roger Mills; Rogers; Sequoyah; Texas; Tulsa; Wagoner; Washington; Woods; Woodward,projected 2D,,,East,North,X,Y,9001,,4269,13531,1995-06-02 00: [...]
-32125,NAD83 / Oklahoma South,,,,United States (USA) - Oklahoma - OK_S - counties of Atoka; Beckham; Bryan; Caddo; Carter; Choctaw; Cleveland; Coal; Comanche; Cotton; Garvin; Grady; Greer; Harmon; Haskell; Hughes; Jackson; Jefferson; Johnston; Kiowa; Latimer; Le Flore; Love; Marshall; McClain; McCurtain; McIntosh; Murray; Pittsburg; Pontotoc; Pottawatomie; Pushmataha; Seminole; Stephens; Tillman; Washita,projected 2D,,,East,North,X,Y,9001,,4269,13532,1995-06-02 00:00:00,,EPSG,,
-32126,NAD83 / Oregon North,,,,United States (USA) - Oregon - OR_N - counties of Baker; Benton; Clackamas; Clatsop; Columbia; Gilliam; Grant; Hood River; Jefferson; Lincoln; Linn; Marion; Morrow; Multnomah; Polk; Sherman; Tillamook; Umatilla; Union; Wallowa; Wasco; Washington; Wheeler; Yamhill,projected 2D,,,East,North,X,Y,9001,,4269,13631,1995-06-02 00:00:00,,EPSG,,
-32127,NAD83 / Oregon South,,,,United States (USA) - Oregon - OR_S - counties of Coos; Crook; Curry; Deschutes; Douglas; Harney; Jackson; Josephine; Klamath; Lake; Lane; Malheur,projected 2D,,,East,North,X,Y,9001,,4269,13632,1995-06-02 00:00:00,,EPSG,,
-32128,NAD83 / Pennsylvania North,NAD83 / Pennsylvania N,,,United States (USA) - Pennsylvania - PA_N - counties of Bradford; Cameron; Carbon; Centre; Clarion; Clearfield; Clinton; Columbia; Crawford; Elk; Erie; Forest; Jefferson; Lackawanna; Luzerne; Lycoming; McKean; Mercer; Monroe; Montour; Northumberland; Pike; Potter; Sullivan; Susquehanna; Tioga; Union; Venango; Warren; Wayne; Wyoming,projected 2D,,,East,North,X,Y,9001,,4269,13731,1995-06-02 00:00:00,,EPSG,,
-32129,NAD83 / Pennsylvania South,NAD83 / Pennsylvania S,,,United States (USA) - Pennsylvania - PA_S - counties of Adams; Allegheny; Armstrong; Beaver; Bedford; Berks; Blair; Bucks; Butler; Cambria; Chester; Cumberland; Dauphin; Delaware; Fayette; Franklin; Fulton; Greene; Huntingdon; Indiana; Juniata; Lancaster; Lawrence; Lebanon; Lehigh; Mifflin; Montgomery; Northampton; Perry; Philadelphia; Schuylkill; Snyder; Somerset; Washington; Westmoreland; York,projected 2D,,,East,North,X,Y,9001, [...]
-32130,NAD83 / Rhode Island,,,,United States (USA) - Rhode Island - RI - counties of Bristol; Kent; Newport; Providence; Washington,projected 2D,,,East,North,X,Y,9001,,4269,13830,1995-06-02 00:00:00,,EPSG,,
-32133,NAD83 / South Carolina,,,,United States (USA) - South Carolina - SC - counties of Abbeville; Aiken; Allendale; Anderson; Bamberg; Barnwell; Beaufort; Berkeley; Calhoun; Charleston; Cherokee; Chester; Chesterfield; Clarendon; Colleton; Darlington; Dillon; Dorchester; Edgefield; Fairfield; Florence; Georgetown; Greenville; Greenwood; Hampton; Horry; Jasper; Kershaw; Lancaster; Laurens; Lee; Lexington; Marion; Marlboro; McCormick; Newberry; Oconee; Orangeburg; Pickens; Richland; Salud [...]
-32134,NAD83 / South Dakota North,NAD83 / South Dakota N,,,United States (USA) - South Dakota - SD_N - counties of Beadle; Brookings; Brown; Butte; Campbell; Clark; Codington; Corson; Day; Deuel; Dewey; Edmunds; Faulk; Grant; Hamlin; Hand; Harding; Hyde; Kingsbury; Lawrence; Marshall; McPherson; Meade; Perkins; Potter; Roberts; Spink; Sully; Walworth; Ziebach,projected 2D,,,East,North,X,Y,9001,,4269,14031,1995-06-02 00:00:00,,EPSG,,
-32135,NAD83 / South Dakota South,NAD83 / South Dakota S,,,United States (USA) - South Dakota - SD_S - counties of Aurora; Bennett; Bon Homme; Brule; Buffalo; Charles Mix; Clay; Custer; Davison; Douglas; Fall River; Gregory; Haakon; Hanson; Hughes; Hutchinson; Jackson; Jerauld; Jones; Lake; Lincoln; Lyman; McCook; Mellette; Miner; Minnehaha; Moody; Pennington; Sanborn; Shannon; Stanley; Todd; Tripp; Turner; Union; Yankton,projected 2D,,,East,North,X,Y,9001,,4269,14032,1995-06-02 00:00:00,,EPSG,,
-32136,NAD83 / Tennessee,,,,United States (USA) - Tennessee - TN - counties of Anderson; Bedford; Benton; Bledsoe; Blount; Bradley; Campbell; Cannon; Carroll; Carter; Cheatham; Chester; Claiborne; Clay; Cocke; Coffee; Crockett; Cumberland; Davidson; De Kalb; Decatur; Dickson; Dyer; Fayette; Fentress; Franklin; Gibson; Giles; Grainger; Greene; Grundy; Hamblen; Hamilton; Hancock; Hardeman; Hardin; Hawkins; Haywood; Henderson; Henry; Hickman; Houston; Humphreys; Jackson; Jefferson; Johnson;  [...]
-32137,NAD83 / Texas North,,,,United States (USA) - Texas -TX_N - counties of: Armstrong; Briscoe; Carson; Castro; Childress; Collingsworth; Dallam; Deaf Smith; Donley; Gray; Hall; Hansford; Hartley; Hemphill; Hutchinson; Lipscomb; Moore; Ochiltree; Oldham; Parmer; Potter; Randall; Roberts; Sherman; Swisher; Wheeler,projected 2D,,,East,North,X,Y,9001,,4269,14231,1995-06-02 00:00:00,,EPSG,,
-32138,NAD83 / Texas North Central,NAD83 / Texas North Cen.,,,United States (USA) - Texas -TX_NC - counties of: Andrews; Archer; Bailey; Baylor; Borden; Bowie; Callahan; Camp; Cass; Clay; Cochran; Collin; Cooke; Cottle; Crosby; Dallas; Dawson; Delta; Denton; Dickens; Eastland; Ellis; Erath; Fannin; Fisher; Floyd; Foard; Franklin; Gaines; Garza; Grayson,projected 2D,,,East,North,X,Y,9001,,4269,14232,1995-06-02 00:00:00,,EPSG,,
-32139,NAD83 / Texas Central,,,,United States (USA) - Texas -TX_C - counties of Anderson; Angelina; Bastrop; Bell; Blanco; Bosque; Brazos; Brown; Burleson; Burnet; Cherokee; Coke; Coleman; Comanche; Concho; Coryell; Crane; Crockett; Culberson; Ector; El Paso; Falls; Freestone; Gillespie; Glasscock; Grimes; Hamilton; Hardin; Houston; Hudspeth; Irion; Jasper; Jeff Davis; Kimble; Lampasas; Lee; Leon; Liberty; Limestone; Llano; Loving; Madison; Mason; McCulloch; McLennan; Menard; Midland; Mil [...]
-32140,NAD83 / Texas South Central,NAD83 / Texas South Cen.,,,United States (USA) - Texas -TX_SC - counties of Aransas; Atascosa; Austin; Bandera; Bee; Bexar; Brazoria; Brewster; Caldwell; Calhoun; Chambers; Colorado; Comal; De Witt; Dimmit; Edwards; Fayette; Fort Bend; Frio; Galveston; Goliad; Gonzales; Guadalupe; Harris; Hays; Jackson; Jefferson; Karnes; Kendall; Kerr; Kinney; La Salle; Lavaca; Live Oak; Matagorda; Maverick; McMullen; Medina; Presidio; Real; Refugio; Terrell; Uvalde; Va [...]
-32141,NAD83 / Texas South,,,,United States (USA) - Texas -TX_S - counties of Brooks; Cameron; Duval; Hidalgo; Jim Hogg; Jim Wells; Kenedy; Kleberg; Nueces; San Patricio; Starr; Webb; Willacy; Zapata,projected 2D,,,East,North,X,Y,9001,,4269,14235,1995-06-02 00:00:00,,EPSG,,
-32142,NAD83 / Utah North,,,,United States (USA) - Utah - UT_N - counties of Box Elder; Cache; Daggett; Davis; Morgan; Rich; Summit; Weber,projected 2D,,,East,North,X,Y,9001,,4269,14331,1995-06-02 00:00:00,,EPSG,,
-32143,NAD83 / Utah Central,,,,United States (USA) - Utah - UT_C - counties of Carbon; Duchesne; Emery; Grand; Juab; Millard; Salt Lake; Sanpete; Sevier; Tooele; Uintah; Utah; Wasatch,projected 2D,,,East,North,X,Y,9001,,4269,14332,1995-06-02 00:00:00,,EPSG,,
-32144,NAD83 / Utah South,,,,United States (USA) - Utah - UT_S - counties of Beaver; Garfield; Iron; Kane; Piute; San Juan; Washington; Wayne,projected 2D,,,East,North,X,Y,9001,,4269,14333,1995-06-02 00:00:00,,EPSG,,
-32145,NAD83 / Vermont,,,,United States (USA) - Vermont - VT - counties of Addison; Bennington; Caledonia; Chittenden; Essex; Franklin; Grand Isle; Lamoille; Orange; Orleans; Rutland; Washington; Windham; Windsor,projected 2D,,,East,North,X,Y,9001,,4269,14430,1995-06-02 00:00:00,,EPSG,,
-32146,NAD83 / Virginia North,,,,United States (USA) - Virginia - VA_N - counties of Arlington; Augusta; Bath; Caroline; Clarke; Culpeper; Fairfax; Fauquier; Frederick; Greene; Highland; King George; Loudoun; Madison; Orange; Page; Prince William; Rappahannock; Rockingham; Shenandoah; Spotsylvania; Stafford; Warren; Westmoreland,projected 2D,,,East,North,X,Y,9001,,4269,14531,1995-06-02 00:00:00,,EPSG,,
-32147,NAD83 / Virginia South,,,,United States (USA) - Virginia - VA_S - counties of Accomack; Albemarle; Alleghany; Amelia; Amherst; Appomattox; Bedford; Bland; Botetourt; Bristol; Brunswick; Buchanan; Buckingham; Campbell; Carroll; Charles City; Charlotte; Chesapeake; Chesterfield; Colonial Heights; Craig; Cumberland; Dickenson; Dinwiddie; Essex; Floyd; Fluvanna; Franklin; Giles; Gloucester; Goochland; Grayson; Greensville; Halifax; Hampton; Hanover; Henrico; Henry; Isle of Wight; James [...]
-32148,NAD83 / Washington North,,,,United States (USA) - Washington - WA_N - counties of Chelan; Clallam; Douglas; Ferry; Grant north of approx. 47d30m; Island; Jefferson; King; Kitsap; Lincoln; Okanogan; Pend Oreille; San Juan; Skagit; Snohomish; Spokane; Stevens; Whatcom,projected 2D,,,East,North,X,Y,9001,,4269,14631,1995-06-02 00:00:00,,EPSG,,
-32149,NAD83 / Washington South,,,,United States (USA) - Washington - WA_S - counties of Adams; Asotin; Benton; Clark; Columbia; Cowlitz; Franklin; Garfield; Grant south of approx. 47d30m; Grays Harbor; Kittitas; Klickitat; Lewis; Mason; Pacific; Pierce; Skamania; Thurston; Wahkiakum; Walla Walla; Whitman; Yakima,projected 2D,,,East,North,X,Y,9001,,4269,14632,1995-06-02 00:00:00,,EPSG,,
-32150,NAD83 / West Virginia North,NAD83 / West Virginia N,,,United States (USA) - West Virginia - WV_N - counties of Barbour; Berkeley; Brooke; Doddridge; Grant; Hampshire; Hancock; Hardy; Harrison; Jefferson; Marion; Marshall; Mineral; Monongalia; Morgan; Ohio; Pleasants; Preston; Ritchie; Taylor; Tucker; Tyler; Wetzel; Wirt; Wood,projected 2D,,,East,North,X,Y,9001,,4269,14731,1995-06-02 00:00:00,,EPSG,,
-32151,NAD83 / West Virginia South,NAD83 / West Virginia S,,,United States (USA) - West Virginia - WV_S - counties of Boone; Braxton; Cabell; Calhoun; Clay; Fayette; Gilmer; Greenbrier; Jackson; Kanawha; Lewis; Lincoln; Logan; Mason; McDowell; Mercer; Mingo; Monroe; Nicholas; Pendleton; Pocahontas; Putnam; Raleigh; Randolph; Roane; Summers; Upshur; Wayne; Webster; Wyoming,projected 2D,,,East,North,X,Y,9001,,4269,14732,1995-06-02 00:00:00,,EPSG,,
-32152,NAD83 / Wisconsin North,,,,United States (USA) - Wisconsin - WI_N - counties of Ashland; Bayfield; Burnett; Douglas; Florence; Forest; Iron; Oneida; Price; Sawyer; Vilas; Washburn,projected 2D,,,East,North,X,Y,9001,,4269,14831,1995-06-02 00:00:00,,EPSG,,
-32153,NAD83 / Wisconsin Central,NAD83 / Wisconsin Cen.,,,United States (USA) - Wisconsin - WI_C - counties of Barron; Brown; Buffalo; Chippewa; Clark; Door; Dunn; Eau Claire; Jackson; Kewaunee; Langlade; Lincoln; Marathon; Marinette; Menominee; Oconto; Outagamie; Pepin; Pierce; Polk; Portage; Rusk; Shawano; St. Croix; Taylor; Trempealeau; Waupaca; Wood,projected 2D,,,East,North,X,Y,9001,,4269,14832,1995-06-02 00:00:00,,EPSG,,
-32154,NAD83 / Wisconsin South,,,,United States (USA) - Wisconsin - WI_S - counties of Adams; Calumet; Columbia; Crawford; Dane; Dodge; Fond Du Lac; Grant; Green; Green Lake; Iowa; Jefferson; Juneau; Kenosha; La Crosse; Lafayette; Manitowoc; Marquette; Milwaukee; Monroe; Ozaukee; Racine; Richland; Rock; Sauk; Sheboygan; Vernon; Walworth; Washington; Waukesha; Waushara; Winnebago,projected 2D,,,East,North,X,Y,9001,,4269,14833,1995-06-02 00:00:00,,EPSG,,
-32155,NAD83 / Wyoming East,,,,United States (USA) - Wyoming - WY_E - counties of Albany; Campbell; Converse; Crook; Goshen; Laramie; Niobrara; Platte; Weston,projected 2D,,,East,North,X,Y,9001,,4269,14931,1995-06-02 00:00:00,,EPSG,,
-32156,NAD83 / Wyoming East Central,NAD83 / Wyoming E. Cen.,,,United States (USA) - Wyoming - WY_EC - counties of Big Horn; Carbon; Johnson; Natrona; Sheridan; Washakie,projected 2D,,,East,North,X,Y,9001,,4269,14932,1995-06-02 00:00:00,,EPSG,,
-32157,NAD83 / Wyoming West Central,NAD83 / Wyoming W. Cen.,,,United States (USA) - Wyoming - WY_WC - counties of Fremont; Hot Springs; Park; Sweetwater,projected 2D,,,East,North,X,Y,9001,,4269,14933,1995-06-02 00:00:00,,EPSG,,
-32158,NAD83 / Wyoming West,,,,United States (USA) - Wyoming - WY_W - counties of Lincoln; Sublette; Teton; Uinta,projected 2D,,,East,North,X,Y,9001,,4269,14934,1995-06-02 00:00:00,,EPSG,,
-32161,NAD83 / Puerto Rico & Virgin Is.,,,,Puerto Rico and U.S. Virgin Islands.,projected 2D,,,East,North,X,Y,9001,,4269,15230,1995-06-02 00:00:00,,EPSG,,
-32180,NAD83 / SCoPQ zone 2,,,,Canada - Quebec - east of 57 deg East.,projected 2D,,,East,North,X,Y,9001,,4269,17700,1997-11-13 00:00:00,Topographic Mapping Section; Quebec Ministry of Natural Resources.,EPSG,,
-32181,NAD83 / MTM zone 1,,,,Canada - Newfoundland - east of 54 deg 30 min West.,projected 2D,,,East,North,E(X),N(Y),9001,,4269,17701,1997-11-13 00:00:00,Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.,EPSG,,
-32182,NAD83 / MTM zone 2,,,,Canada - Newfoundland and Labrador between 57 deg 30 min and 54 de 30 min West.,projected 2D,,,East,North,E(X),N(Y),9001,,4269,17702,1997-11-13 00:00:00,Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.,EPSG,,
-32183,NAD83 / MTM zone 3,,,,Canada - Newfoundland and Labrador between 60 deg and 57 deg 30 min West; Canada - Quebec between 60 deg and 57 deg West.,projected 2D,,,East,North,E(X),N(Y),9001,,4269,17703,1997-11-13 00:00:00,Topographic Mapping Section; Quebec Ministry of Natural Resources. Also Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.,EPSG,"Known in Quebec as \"NAD83 / SCoPQ zone 3\" with axis 1 and 2 abbreviations of \"X\" and \"Y\" respectively.",
-32184,NAD83 / MTM zone 4,,,,Canada - Quebec and Newfoundland (Labrador) between 63 deg and 60 deg West.,projected 2D,,,East,North,E(X),N(Y),9001,,4269,17704,1997-11-13 00:00:00,Topographic Mapping Section; Quebec Ministry of Natural Resources. Also Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.,EPSG,"Known in Quebec as \"NAD83 / SCoPQ zone 4\" with axis 1 and 2 abbreviations of \"X\" and \"Y\" respectively.",
-32185,NAD83 / MTM zone 5,,,,Canada - Quebec and Newfoundland (Labrador) between 66 deg and 63 deg West.,projected 2D,,,East,North,E(X),N(Y),9001,,4269,17705,1997-11-13 00:00:00,Topographic Mapping Section; Quebec Ministry of Natural Resources. Also Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.,EPSG,"Known in Quebec as \"NAD83 / SCoPQ zone 5\" with axis 1 and 2 abbreviations of \"X\" and \"Y\" respectively.",
-32186,NAD83 / MTM zone 6,,,,Canada - Quebec and Newfoundland (Labrador) between 69 deg and  66 deg West.,projected 2D,,,East,North,E(X),N(Y),9001,,4269,17706,1997-11-13 00:00:00,Topographic Mapping Section; Quebec Ministry of Natural Resources. Also Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.,EPSG,"Known in Quebec as \"NAD83 / SCoPQ zone 6\" with axis 1 and 2 abbreviations of \"X\" and \"Y\" respectively.",
-32187,NAD83 / MTM zone 7,,,,Canada - Quebec between 72 deg and 69 deg West.,projected 2D,,,East,North,E(X),N(Y),9001,,4269,17707,1997-11-13 00:00:00,Topographic Mapping Section; Quebec Ministry of Natural Resources.,EPSG,"Known in Quebec as \"NAD83 / SCoPQ zone 7\" with axis 1 and 2 abbreviations of \"X\" and \"Y\" respectively.",
-32188,NAD83 / MTM zone 8,,,,Canada - Quebec between 75 deg and 72 deg West.; Canada - Ontario - east of 75 deg West.,projected 2D,,,East,North,E(X),N(Y),9001,,4269,17708,1997-11-13 00:00:00,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,"Known in Quebec as \"NAD83 / SCoPQ zone 8\" with axis 1 and 2 abbreviations of \"X\" and \"Y\" respectively.",
-32189,NAD83 / MTM zone 9,,,,Canada - Quebec and Ontario - between 78 deg and 75 deg West.,projected 2D,,,East,North,E(X),N(Y),9001,,4269,17709,1997-11-13 00:00:00,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,"Known in Quebec as \"NAD83 / SCoPQ zone 9\" with axis 1 and 2 abbreviations of \"X\" and \"Y\" respectively.",
-32190,NAD83 / MTM zone 10,,,,Canada - Quebec west of 78 deg West; Canada - Ontario - between 79 deg 30 min and 78 deg W in area to north of 47 deg N; between 80 deg 15 min and 78 deg W in area between 46 deg and 47 deg N; between 81 deg and 78 deg W in area south of 46 deg N.,projected 2D,,,East,North,E(X),N(Y),9001,,4269,17710,1997-11-13 00:00:00,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,"Known in Quebec as \"NAD83 / SCoPQ zone 10\" with axis 1 and 2 abbrevia [...]
-32191,NAD83 / MTM zone 11,,,,Canada - Ontario - south of 46 deg N and west of 81 deg West.,projected 2D,,,East,North,E,N,9001,,4269,17711,1997-11-13 00:00:00,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,,
-32192,NAD83 / MTM zone 12,,,,Canada - Ontario - between 82 deg 30 min and 79 deg 30 min W in area to north of 47 deg N; between 82 deg 30 min and 80 deg 15 min W in area between 46 deg and 47 deg N; between 82 deg 30 min and 79 deg 30 min W in area north of 47 deg N.,projected 2D,,,East,North,E,N,9001,,4269,17712,1997-11-13 00:00:00,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,,
-32193,NAD83 / MTM zone 13,,,,Canada - Ontario - between 85 deg 30 min and 82 deg 30 min West and north of 46 deg North.,projected 2D,,,East,North,E,N,9001,,4269,17713,1997-11-13 00:00:00,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,,
-32194,NAD83 / MTM zone 14,,,,Canada - Ontario - between 88 deg 30 min and 85 deg 30 min West.,projected 2D,,,East,North,E,N,9001,,4269,17714,1997-11-13 00:00:00,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,,
-32195,NAD83 / MTM zone 15,,,,Canada - Ontario - between 91 deg 30 min and 88 deg 30 min West.,projected 2D,,,East,North,E,N,9001,,4269,17715,1997-11-13 00:00:00,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,,
-32196,NAD83 / MTM zone 16,,,,Canada - Ontario - between 94 deg 30 min and 91 deg 30 min West.,projected 2D,,,East,North,E,N,9001,,4269,17716,1997-11-13 00:00:00,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,,
-32197,NAD83 / MTM zone 17,,,,Canada - Ontario - west of 94 deg 30 min West.,projected 2D,,,East,North,E,N,9001,,4269,17717,1997-11-13 00:00:00,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,,
-32198,NAD83 / Quebec Lambert,,,,Canada - Quebec,projected 2D,,,East,North,X,Y,9001,,4269,19944,1999-10-20 00:00:00,Service de la Cartographie; Minist�re des Ressources Naturelles; Quebec,EPSG,,
-32201,WGS 72 / UTM zone 1N,,,,180deg to 174deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16001,1995-06-02 00:00:00,,EPSG,,
-32202,WGS 72 / UTM zone 2N,,,,174deg West to 168deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16002,1995-06-02 00:00:00,,EPSG,,
-32203,WGS 72 / UTM zone 3N,,,,168deg West to 162deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16003,1995-06-02 00:00:00,,EPSG,,
-32204,WGS 72 / UTM zone 4N,,,,162deg West to 156deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16004,1995-06-02 00:00:00,,EPSG,,
-32205,WGS 72 / UTM zone 5N,,,,156deg West to 150deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16005,1995-06-02 00:00:00,,EPSG,,
-32206,WGS 72 / UTM zone 6N,,,,150deg West to 144deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16006,1995-06-02 00:00:00,,EPSG,,
-32207,WGS 72 / UTM zone 7N,,,,144deg West to 138deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16007,1995-06-02 00:00:00,,EPSG,,
-32208,WGS 72 / UTM zone 8N,,,,138deg West to 132deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16008,1995-06-02 00:00:00,,EPSG,,
-32209,WGS 72 / UTM zone 9N,,,,132deg West to 126deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16009,1995-06-02 00:00:00,,EPSG,,
-32210,WGS 72 / UTM zone 10N,,,,130deg West to 120deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16010,1995-06-02 00:00:00,,EPSG,,
-32211,WGS 72 / UTM zone 11N,,,,120deg West to 114deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16011,1995-06-02 00:00:00,,EPSG,,
-32212,WGS 72 / UTM zone 12N,,,,114deg West to 108deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16012,1995-06-02 00:00:00,,EPSG,,
-32213,WGS 72 / UTM zone 13N,,,,108deg West to 102deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16013,1995-06-02 00:00:00,,EPSG,,
-32214,WGS 72 / UTM zone 14N,,,,102deg West to 96deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16014,1995-06-02 00:00:00,,EPSG,,
-32215,WGS 72 / UTM zone 15N,,,,96deg West to 90deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16015,1995-06-02 00:00:00,,EPSG,,
-32216,WGS 72 / UTM zone 16N,,,,90deg West to 84deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16016,1995-06-02 00:00:00,,EPSG,,
-32217,WGS 72 / UTM zone 17N,,,,84deg West to 78deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16017,1995-06-02 00:00:00,,EPSG,,
-32218,WGS 72 / UTM zone 18N,,,,78deg West to 72deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16018,1995-06-02 00:00:00,,EPSG,,
-32219,WGS 72 / UTM zone 19N,,,,72deg West to 66deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16019,1995-06-02 00:00:00,,EPSG,,
-32220,WGS 72 / UTM zone 20N,,,,66deg West to 60deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16020,1995-06-02 00:00:00,,EPSG,,
-32221,WGS 72 / UTM zone 21N,,,,60deg West to 54deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16021,1995-06-02 00:00:00,,EPSG,,
-32222,WGS 72 / UTM zone 22N,,,,54deg West to 48deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16022,1995-06-02 00:00:00,,EPSG,,
-32223,WGS 72 / UTM zone 23N,,,,48deg West to 42deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16023,1995-06-02 00:00:00,,EPSG,,
-32224,WGS 72 / UTM zone 24N,,,,42deg West to 36deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16024,1995-06-02 00:00:00,,EPSG,,
-32225,WGS 72 / UTM zone 25N,,,,36deg West to 30deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16025,1995-06-02 00:00:00,,EPSG,,
-32226,WGS 72 / UTM zone 26N,,,,30deg West to 24deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16026,1995-06-02 00:00:00,,EPSG,,
-32227,WGS 72 / UTM zone 27N,,,,24deg West to 18deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16027,1995-06-02 00:00:00,,EPSG,,
-32228,WGS 72 / UTM zone 28N,,,,18deg West to 12deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16028,1995-06-02 00:00:00,,EPSG,,
-32229,WGS 72 / UTM zone 29N,,,,12deg West to 6deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16029,1995-06-02 00:00:00,,EPSG,,
-32230,WGS 72 / UTM zone 30N,,,,6deg West to 0deg; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16030,1995-06-02 00:00:00,,EPSG,,
-32231,WGS 72 / UTM zone 31N,,,,0deg to 6deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16031,1995-06-02 00:00:00,,EPSG,,
-32232,WGS 72 / UTM zone 32N,,,,6deg East to 12deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16032,1995-06-02 00:00:00,,EPSG,,
-32233,WGS 72 / UTM zone 33N,,,,12deg East to 18deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16033,1995-06-02 00:00:00,,EPSG,,
-32234,WGS 72 / UTM zone 34N,,,,18deg East to 24deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16034,1995-06-02 00:00:00,,EPSG,,
-32235,WGS 72 / UTM zone 35N,,,,24deg East to 30deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16035,1995-06-02 00:00:00,,EPSG,,
-32236,WGS 72 / UTM zone 36N,,,,30deg East to 36deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16036,1995-06-02 00:00:00,,EPSG,,
-32237,WGS 72 / UTM zone 37N,,,,36deg East to 42deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16037,1995-06-02 00:00:00,,EPSG,,
-32238,WGS 72 / UTM zone 38N,,,,42deg East to 48deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16038,1995-06-02 00:00:00,,EPSG,,
-32239,WGS 72 / UTM zone 39N,,,,48deg East to 54deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16039,1995-06-02 00:00:00,,EPSG,,
-32240,WGS 72 / UTM zone 40N,,,,54deg East to 60deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16040,1995-06-02 00:00:00,,EPSG,,
-32241,WGS 72 / UTM zone 41N,,,,60deg East to 66deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16041,1995-06-02 00:00:00,,EPSG,,
-32242,WGS 72 / UTM zone 42N,,,,66deg East to 72deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16042,1995-06-02 00:00:00,,EPSG,,
-32243,WGS 72 / UTM zone 43N,,,,72deg East to 78deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16043,1995-06-02 00:00:00,,EPSG,,
-32244,WGS 72 / UTM zone 44N,,,,78deg East to 84deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16044,1995-06-02 00:00:00,,EPSG,,
-32245,WGS 72 / UTM zone 45N,,,,84deg East to 90deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16045,1995-06-02 00:00:00,,EPSG,,
-32246,WGS 72 / UTM zone 46N,,,,90deg East to 96deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16046,1995-06-02 00:00:00,,EPSG,,
-32247,WGS 72 / UTM zone 47N,,,,96deg East to 102eg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16047,1995-06-02 00:00:00,,EPSG,,
-32248,WGS 72 / UTM zone 48N,,,,102deg East to 108deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16048,1995-06-02 00:00:00,,EPSG,,
-32249,WGS 72 / UTM zone 49N,,,,108deg East to 114deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16049,1995-06-02 00:00:00,,EPSG,,
-32250,WGS 72 / UTM zone 50N,,,,114deg East to 120deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16050,1995-06-02 00:00:00,,EPSG,,
-32251,WGS 72 / UTM zone 51N,,,,120deg East to 126deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16051,1995-06-02 00:00:00,,EPSG,,
-32252,WGS 72 / UTM zone 52N,,,,126deg East to 132deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16052,1995-06-02 00:00:00,,EPSG,,
-32253,WGS 72 / UTM zone 53N,,,,132deg East to 138deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16053,1995-06-02 00:00:00,,EPSG,,
-32254,WGS 72 / UTM zone 54N,,,,138deg East to 144deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16054,1995-06-02 00:00:00,,EPSG,,
-32255,WGS 72 / UTM zone 55N,,,,144deg East to 150deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16055,1995-06-02 00:00:00,,EPSG,,
-32256,WGS 72 / UTM zone 56N,,,,150deg East to 156deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16056,1995-06-02 00:00:00,,EPSG,,
-32257,WGS 72 / UTM zone 57N,,,,156deg East to 162deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16057,1995-06-02 00:00:00,,EPSG,,
-32258,WGS 72 / UTM zone 58N,,,,162deg East to 168deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16058,1995-06-02 00:00:00,,EPSG,,
-32259,WGS 72 / UTM zone 59N,,,,168deg East to 174deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16059,1995-06-02 00:00:00,,EPSG,,
-32260,WGS 72 / UTM zone 60N,,,,174deg East to 180deg; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16060,1995-06-02 00:00:00,,EPSG,,
-32301,WGS 72 / UTM zone 1S,,,,180deg to 174deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16101,1995-06-02 00:00:00,,EPSG,,
-32302,WGS 72 / UTM zone 2S,,,,174deg West to 168deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16102,1995-06-02 00:00:00,,EPSG,,
-32303,WGS 72 / UTM zone 3S,,,,168deg West to 162deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16103,1995-06-02 00:00:00,,EPSG,,
-32304,WGS 72 / UTM zone 4S,,,,162deg West to 156deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16104,1995-06-02 00:00:00,,EPSG,,
-32305,WGS 72 / UTM zone 5S,,,,156deg West to 150deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16105,1995-06-02 00:00:00,,EPSG,,
-32306,WGS 72 / UTM zone 6S,,,,150deg West to 144deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16106,1995-06-02 00:00:00,,EPSG,,
-32307,WGS 72 / UTM zone 7S,,,,144deg West to 138deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16107,1995-06-02 00:00:00,,EPSG,,
-32308,WGS 72 / UTM zone 8S,,,,138deg West to 132deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16108,1995-06-02 00:00:00,,EPSG,,
-32309,WGS 72 / UTM zone 9S,,,,132deg West to 126deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16109,1995-06-02 00:00:00,,EPSG,,
-32310,WGS 72 / UTM zone 10S,,,,130deg West to 120deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16110,1995-06-02 00:00:00,,EPSG,,
-32311,WGS 72 / UTM zone 11S,,,,120deg West to 114deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16111,1995-06-02 00:00:00,,EPSG,,
-32312,WGS 72 / UTM zone 12S,,,,114deg West to 108deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16112,1995-06-02 00:00:00,,EPSG,,
-32313,WGS 72 / UTM zone 13S,,,,108deg West to 102deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16113,1995-06-02 00:00:00,,EPSG,,
-32314,WGS 72 / UTM zone 14S,,,,102deg West to 96deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16114,1995-06-02 00:00:00,,EPSG,,
-32315,WGS 72 / UTM zone 15S,,,,96deg West to 90deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16115,1995-06-02 00:00:00,,EPSG,,
-32316,WGS 72 / UTM zone 16S,,,,90deg West to 84deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16116,1995-06-02 00:00:00,,EPSG,,
-32317,WGS 72 / UTM zone 17S,,,,84deg West to 78deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16117,1995-06-02 00:00:00,,EPSG,,
-32318,WGS 72 / UTM zone 18S,,,,78deg West to 72deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16118,1995-06-02 00:00:00,,EPSG,,
-32319,WGS 72 / UTM zone 19S,,,,72deg West to 66deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16119,1995-06-02 00:00:00,,EPSG,,
-32320,WGS 72 / UTM zone 20S,,,,66deg West to 60deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16120,1995-06-02 00:00:00,,EPSG,,
-32321,WGS 72 / UTM zone 21S,,,,60deg West to 54deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16121,1995-06-02 00:00:00,,EPSG,,
-32322,WGS 72 / UTM zone 22S,,,,54deg West to 48deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16122,1995-06-02 00:00:00,,EPSG,,
-32323,WGS 72 / UTM zone 23S,,,,48deg West to 42deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16123,1995-06-02 00:00:00,,EPSG,,
-32324,WGS 72 / UTM zone 24S,,,,42deg West to 36deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16124,1995-06-02 00:00:00,,EPSG,,
-32325,WGS 72 / UTM zone 25S,,,,36deg West to 30deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16125,1995-06-02 00:00:00,,EPSG,,
-32326,WGS 72 / UTM zone 26S,,,,30deg West to 24deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16126,1995-06-02 00:00:00,,EPSG,,
-32327,WGS 72 / UTM zone 27S,,,,24deg West to 18deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16127,1995-06-02 00:00:00,,EPSG,,
-32328,WGS 72 / UTM zone 28S,,,,18deg West to 12deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16128,1995-06-02 00:00:00,,EPSG,,
-32329,WGS 72 / UTM zone 29S,,,,12deg West to 6deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16129,1995-06-02 00:00:00,,EPSG,,
-32330,WGS 72 / UTM zone 30S,,,,6deg West to 0deg; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16130,1995-06-02 00:00:00,,EPSG,,
-32331,WGS 72 / UTM zone 31S,,,,0deg to 6deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16131,1995-06-02 00:00:00,,EPSG,,
-32332,WGS 72 / UTM zone 32S,,,,6deg East to 12deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16132,1995-06-02 00:00:00,,EPSG,,
-32333,WGS 72 / UTM zone 33S,,,,12deg East to 18deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16133,1995-06-02 00:00:00,,EPSG,,
-32334,WGS 72 / UTM zone 34S,,,,18deg East to 24deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16134,1995-06-02 00:00:00,,EPSG,,
-32335,WGS 72 / UTM zone 35S,,,,24deg East to 30deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16135,1995-06-02 00:00:00,,EPSG,,
-32336,WGS 72 / UTM zone 36S,,,,30deg East to 36deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16136,1995-06-02 00:00:00,,EPSG,,
-32337,WGS 72 / UTM zone 37S,,,,36deg East to 42deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16137,1995-06-02 00:00:00,,EPSG,,
-32338,WGS 72 / UTM zone 38S,,,,42deg East to 48deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16138,1995-06-02 00:00:00,,EPSG,,
-32339,WGS 72 / UTM zone 39S,,,,48deg East to 54deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16139,1995-06-02 00:00:00,,EPSG,,
-32340,WGS 72 / UTM zone 40S,,,,54deg East to 60deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16140,1995-06-02 00:00:00,,EPSG,,
-32341,WGS 72 / UTM zone 41S,,,,60deg East to 66deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16141,1995-06-02 00:00:00,,EPSG,,
-32342,WGS 72 / UTM zone 42S,,,,66deg East to 72deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16142,1995-06-02 00:00:00,,EPSG,,
-32343,WGS 72 / UTM zone 43S,,,,72deg East to 78deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16143,1995-06-02 00:00:00,,EPSG,,
-32344,WGS 72 / UTM zone 44S,,,,78deg East to 84deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16144,1995-06-02 00:00:00,,EPSG,,
-32345,WGS 72 / UTM zone 45S,,,,84deg East to 90deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16145,1995-06-02 00:00:00,,EPSG,,
-32346,WGS 72 / UTM zone 46S,,,,90deg East to 96deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16146,1995-06-02 00:00:00,,EPSG,,
-32347,WGS 72 / UTM zone 47S,,,,96deg East to 102eg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16147,1995-06-02 00:00:00,,EPSG,,
-32348,WGS 72 / UTM zone 48S,,,,102deg East to 108deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16148,1995-06-02 00:00:00,,EPSG,,
-32349,WGS 72 / UTM zone 49S,,,,108deg East to 114deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16149,1995-06-02 00:00:00,,EPSG,,
-32350,WGS 72 / UTM zone 50S,,,,114deg East to 120deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16150,1995-06-02 00:00:00,,EPSG,,
-32351,WGS 72 / UTM zone 51S,,,,120deg East to 126deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16151,1995-06-02 00:00:00,,EPSG,,
-32352,WGS 72 / UTM zone 52S,,,,126deg East to 132deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16152,1995-06-02 00:00:00,,EPSG,,
-32353,WGS 72 / UTM zone 53S,,,,132deg East to 138deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16153,1995-06-02 00:00:00,,EPSG,,
-32354,WGS 72 / UTM zone 54S,,,,138deg East to 144deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16154,1995-06-02 00:00:00,,EPSG,,
-32355,WGS 72 / UTM zone 55S,,,,144deg East to 150deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16155,1995-06-02 00:00:00,,EPSG,,
-32356,WGS 72 / UTM zone 56S,,,,150deg East to 156deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16156,1995-06-02 00:00:00,,EPSG,,
-32357,WGS 72 / UTM zone 57S,,,,156deg East to 162deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16157,1995-06-02 00:00:00,,EPSG,,
-32358,WGS 72 / UTM zone 58S,,,,162deg East to 168deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16158,1995-06-02 00:00:00,,EPSG,,
-32359,WGS 72 / UTM zone 59S,,,,168deg East to 174deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16159,1995-06-02 00:00:00,,EPSG,,
-32360,WGS 72 / UTM zone 60S,,,,174deg East to 180deg; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4322,16160,1995-06-02 00:00:00,,EPSG,,
-32401,WGS 72BE / UTM zone 1N,,,,180deg to 174deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16001,1995-06-02 00:00:00,,EPSG,,
-32402,WGS 72BE / UTM zone 2N,,,,174deg West to 168deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16002,1995-06-02 00:00:00,,EPSG,,
-32403,WGS 72BE / UTM zone 3N,,,,168deg West to 162deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16003,1995-06-02 00:00:00,,EPSG,,
-32404,WGS 72BE / UTM zone 4N,,,,162deg West to 156deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16004,1995-06-02 00:00:00,,EPSG,,
-32405,WGS 72BE / UTM zone 5N,,,,156deg West to 150deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16005,1995-06-02 00:00:00,,EPSG,,
-32406,WGS 72BE / UTM zone 6N,,,,150deg West to 144deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16006,1995-06-02 00:00:00,,EPSG,,
-32407,WGS 72BE / UTM zone 7N,,,,144deg West to 138deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16007,1995-06-02 00:00:00,,EPSG,,
-32408,WGS 72BE / UTM zone 8N,,,,138deg West to 132deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16008,1995-06-02 00:00:00,,EPSG,,
-32409,WGS 72BE / UTM zone 9N,,,,132deg West to 126deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16009,1995-06-02 00:00:00,,EPSG,,
-32410,WGS 72BE / UTM zone 10N,,,,130deg West to 120deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16010,1995-06-02 00:00:00,,EPSG,,
-32411,WGS 72BE / UTM zone 11N,,,,120deg West to 114deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16011,1995-06-02 00:00:00,,EPSG,,
-32412,WGS 72BE / UTM zone 12N,,,,114deg West to 108deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16012,1995-06-02 00:00:00,,EPSG,,
-32413,WGS 72BE / UTM zone 13N,,,,108deg West to 102deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16013,1995-06-02 00:00:00,,EPSG,,
-32414,WGS 72BE / UTM zone 14N,,,,102deg West to 96deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16014,1995-06-02 00:00:00,,EPSG,,
-32415,WGS 72BE / UTM zone 15N,,,,96deg West to 90deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16015,1995-06-02 00:00:00,,EPSG,,
-32416,WGS 72BE / UTM zone 16N,,,,90deg West to 84deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16016,1995-06-02 00:00:00,,EPSG,,
-32417,WGS 72BE / UTM zone 17N,,,,84deg West to 78deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16017,1995-06-02 00:00:00,,EPSG,,
-32418,WGS 72BE / UTM zone 18N,,,,78deg West to 72deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16018,1995-06-02 00:00:00,,EPSG,,
-32419,WGS 72BE / UTM zone 19N,,,,72deg West to 66deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16019,1995-06-02 00:00:00,,EPSG,,
-32420,WGS 72BE / UTM zone 20N,,,,66deg West to 60deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16020,1995-06-02 00:00:00,,EPSG,,
-32421,WGS 72BE / UTM zone 21N,,,,60deg West to 54deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16021,1995-06-02 00:00:00,,EPSG,,
-32422,WGS 72BE / UTM zone 22N,,,,54deg West to 48deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16022,1995-06-02 00:00:00,,EPSG,,
-32423,WGS 72BE / UTM zone 23N,,,,48deg West to 42deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16023,1995-06-02 00:00:00,,EPSG,,
-32424,WGS 72BE / UTM zone 24N,,,,42deg West to 36deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16024,1995-06-02 00:00:00,,EPSG,,
-32425,WGS 72BE / UTM zone 25N,,,,36deg West to 30deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16025,1995-06-02 00:00:00,,EPSG,,
-32426,WGS 72BE / UTM zone 26N,,,,30deg West to 24deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16026,1995-06-02 00:00:00,,EPSG,,
-32427,WGS 72BE / UTM zone 27N,,,,24deg West to 18deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16027,1995-06-02 00:00:00,,EPSG,,
-32428,WGS 72BE / UTM zone 28N,,,,18deg West to 12deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16028,1995-06-02 00:00:00,,EPSG,,
-32429,WGS 72BE / UTM zone 29N,,,,12deg West to 6deg West; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16029,1995-06-02 00:00:00,,EPSG,,
-32430,WGS 72BE / UTM zone 30N,,,,6deg West to 0deg; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16030,1995-06-02 00:00:00,,EPSG,,
-32431,WGS 72BE / UTM zone 31N,,,,0deg to 6deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16031,1995-06-02 00:00:00,,EPSG,,
-32432,WGS 72BE / UTM zone 32N,,,,6deg East to 12deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16032,1995-06-02 00:00:00,,EPSG,,
-32433,WGS 72BE / UTM zone 33N,,,,12deg East to 18deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16033,1995-06-02 00:00:00,,EPSG,,
-32434,WGS 72BE / UTM zone 34N,,,,18deg East to 24deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16034,1995-06-02 00:00:00,,EPSG,,
-32435,WGS 72BE / UTM zone 35N,,,,24deg East to 30deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16035,1995-06-02 00:00:00,,EPSG,,
-32436,WGS 72BE / UTM zone 36N,,,,30deg East to 36deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16036,1995-06-02 00:00:00,,EPSG,,
-32437,WGS 72BE / UTM zone 37N,,,,36deg East to 42deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16037,1995-06-02 00:00:00,,EPSG,,
-32438,WGS 72BE / UTM zone 38N,,,,42deg East to 48deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16038,1995-06-02 00:00:00,,EPSG,,
-32439,WGS 72BE / UTM zone 39N,,,,48deg East to 54deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16039,1995-06-02 00:00:00,,EPSG,,
-32440,WGS 72BE / UTM zone 40N,,,,54deg East to 60deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16040,1995-06-02 00:00:00,,EPSG,,
-32441,WGS 72BE / UTM zone 41N,,,,60deg East to 66deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16041,1995-06-02 00:00:00,,EPSG,,
-32442,WGS 72BE / UTM zone 42N,,,,66deg East to 72deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16042,1995-06-02 00:00:00,,EPSG,,
-32443,WGS 72BE / UTM zone 43N,,,,72deg East to 78deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16043,1995-06-02 00:00:00,,EPSG,,
-32444,WGS 72BE / UTM zone 44N,,,,78deg East to 84deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16044,1995-06-02 00:00:00,,EPSG,,
-32445,WGS 72BE / UTM zone 45N,,,,84deg East to 90deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16045,1995-06-02 00:00:00,,EPSG,,
-32446,WGS 72BE / UTM zone 46N,,,,90deg East to 96deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16046,1995-06-02 00:00:00,,EPSG,,
-32447,WGS 72BE / UTM zone 47N,,,,96deg East to 102eg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16047,1995-06-02 00:00:00,,EPSG,,
-32448,WGS 72BE / UTM zone 48N,,,,102deg East to 108deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16048,1995-06-02 00:00:00,,EPSG,,
-32449,WGS 72BE / UTM zone 49N,,,,108deg East to 114deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16049,1995-06-02 00:00:00,,EPSG,,
-32450,WGS 72BE / UTM zone 50N,,,,114deg East to 120deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16050,1995-06-02 00:00:00,,EPSG,,
-32451,WGS 72BE / UTM zone 51N,,,,120deg East to 126deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16051,1995-06-02 00:00:00,,EPSG,,
-32452,WGS 72BE / UTM zone 52N,,,,126deg East to 132deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16052,1995-06-02 00:00:00,,EPSG,,
-32453,WGS 72BE / UTM zone 53N,,,,132deg East to 138deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16053,1995-06-02 00:00:00,,EPSG,,
-32454,WGS 72BE / UTM zone 54N,,,,138deg East to 144deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16054,1995-06-02 00:00:00,,EPSG,,
-32455,WGS 72BE / UTM zone 55N,,,,144deg East to 150deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16055,1995-06-02 00:00:00,,EPSG,,
-32456,WGS 72BE / UTM zone 56N,,,,150deg East to 156deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16056,1995-06-02 00:00:00,,EPSG,,
-32457,WGS 72BE / UTM zone 57N,,,,156deg East to 162deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16057,1995-06-02 00:00:00,,EPSG,,
-32458,WGS 72BE / UTM zone 58N,,,,162deg East to 168deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16058,1995-06-02 00:00:00,,EPSG,,
-32459,WGS 72BE / UTM zone 59N,,,,168deg East to 174deg East; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16059,1995-06-02 00:00:00,,EPSG,,
-32460,WGS 72BE / UTM zone 60N,,,,174deg East to 180deg; northern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16060,1995-06-02 00:00:00,,EPSG,,
-32501,WGS 72BE / UTM zone 1S,,,,180deg to 174deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16101,1995-06-02 00:00:00,,EPSG,,
-32502,WGS 72BE / UTM zone 2S,,,,174deg West to 168deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16102,1995-06-02 00:00:00,,EPSG,,
-32503,WGS 72BE / UTM zone 3S,,,,168deg West to 162deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16103,1995-06-02 00:00:00,,EPSG,,
-32504,WGS 72BE / UTM zone 4S,,,,162deg West to 156deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16104,1995-06-02 00:00:00,,EPSG,,
-32505,WGS 72BE / UTM zone 5S,,,,156deg West to 150deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16105,1995-06-02 00:00:00,,EPSG,,
-32506,WGS 72BE / UTM zone 6S,,,,150deg West to 144deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16106,1995-06-02 00:00:00,,EPSG,,
-32507,WGS 72BE / UTM zone 7S,,,,144deg West to 138deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16107,1995-06-02 00:00:00,,EPSG,,
-32508,WGS 72BE / UTM zone 8S,,,,138deg West to 132deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16108,1995-06-02 00:00:00,,EPSG,,
-32509,WGS 72BE / UTM zone 9S,,,,132deg West to 126deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16109,1995-06-02 00:00:00,,EPSG,,
-32510,WGS 72BE / UTM zone 10S,,,,130deg West to 120deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16110,1995-06-02 00:00:00,,EPSG,,
-32511,WGS 72BE / UTM zone 11S,,,,120deg West to 114deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16111,1995-06-02 00:00:00,,EPSG,,
-32512,WGS 72BE / UTM zone 12S,,,,114deg West to 108deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16112,1995-06-02 00:00:00,,EPSG,,
-32513,WGS 72BE / UTM zone 13S,,,,108deg West to 102deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16113,1995-06-02 00:00:00,,EPSG,,
-32514,WGS 72BE / UTM zone 14S,,,,102deg West to 96deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16114,1995-06-02 00:00:00,,EPSG,,
-32515,WGS 72BE / UTM zone 15S,,,,96deg West to 90deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16115,1995-06-02 00:00:00,,EPSG,,
-32516,WGS 72BE / UTM zone 16S,,,,90deg West to 84deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16116,1995-06-02 00:00:00,,EPSG,,
-32517,WGS 72BE / UTM zone 17S,,,,84deg West to 78deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16117,1995-06-02 00:00:00,,EPSG,,
-32518,WGS 72BE / UTM zone 18S,,,,78deg West to 72deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16118,1995-06-02 00:00:00,,EPSG,,
-32519,WGS 72BE / UTM zone 19S,,,,72deg West to 66deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16119,1995-06-02 00:00:00,,EPSG,,
-32520,WGS 72BE / UTM zone 20S,,,,66deg West to 60deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16120,1995-06-02 00:00:00,,EPSG,,
-32521,WGS 72BE / UTM zone 21S,,,,60deg West to 54deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16121,1995-06-02 00:00:00,,EPSG,,
-32522,WGS 72BE / UTM zone 22S,,,,54deg West to 48deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16122,1995-06-02 00:00:00,,EPSG,,
-32523,WGS 72BE / UTM zone 23S,,,,48deg West to 42deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16123,1995-06-02 00:00:00,,EPSG,,
-32524,WGS 72BE / UTM zone 24S,,,,42deg West to 36deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16124,1995-06-02 00:00:00,,EPSG,,
-32525,WGS 72BE / UTM zone 25S,,,,36deg West to 30deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16125,1995-06-02 00:00:00,,EPSG,,
-32526,WGS 72BE / UTM zone 26S,,,,30deg West to 24deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16126,1995-06-02 00:00:00,,EPSG,,
-32527,WGS 72BE / UTM zone 27S,,,,24deg West to 18deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16127,1995-06-02 00:00:00,,EPSG,,
-32528,WGS 72BE / UTM zone 28S,,,,18deg West to 12deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16128,1995-06-02 00:00:00,,EPSG,,
-32529,WGS 72BE / UTM zone 29S,,,,12deg West to 6deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16129,1995-06-02 00:00:00,,EPSG,,
-32530,WGS 72BE / UTM zone 30S,,,,6deg West to 0deg; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16130,1995-06-02 00:00:00,,EPSG,,
-32531,WGS 72BE / UTM zone 31S,,,,0deg to 6deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16131,1995-06-02 00:00:00,,EPSG,,
-32532,WGS 72BE / UTM zone 32S,,,,6deg East to 12deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16132,1995-06-02 00:00:00,,EPSG,,
-32533,WGS 72BE / UTM zone 33S,,,,12deg East to 18deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16133,1995-06-02 00:00:00,,EPSG,,
-32534,WGS 72BE / UTM zone 34S,,,,18deg East to 24deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16134,1995-06-02 00:00:00,,EPSG,,
-32535,WGS 72BE / UTM zone 35S,,,,24deg East to 30deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16135,1995-06-02 00:00:00,,EPSG,,
-32536,WGS 72BE / UTM zone 36S,,,,30deg East to 36deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16136,1995-06-02 00:00:00,,EPSG,,
-32537,WGS 72BE / UTM zone 37S,,,,36deg East to 42deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16137,1995-06-02 00:00:00,,EPSG,,
-32538,WGS 72BE / UTM zone 38S,,,,42deg East to 48deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16138,1995-06-02 00:00:00,,EPSG,,
-32539,WGS 72BE / UTM zone 39S,,,,48deg East to 54deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16139,1995-06-02 00:00:00,,EPSG,,
-32540,WGS 72BE / UTM zone 40S,,,,54deg East to 60deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16140,1995-06-02 00:00:00,,EPSG,,
-32541,WGS 72BE / UTM zone 41S,,,,60deg East to 66deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16141,1995-06-02 00:00:00,,EPSG,,
-32542,WGS 72BE / UTM zone 42S,,,,66deg East to 72deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16142,1995-06-02 00:00:00,,EPSG,,
-32543,WGS 72BE / UTM zone 43S,,,,72deg East to 78deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16143,1995-06-02 00:00:00,,EPSG,,
-32544,WGS 72BE / UTM zone 44S,,,,78deg East to 84deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16144,1995-06-02 00:00:00,,EPSG,,
-32545,WGS 72BE / UTM zone 45S,,,,84deg East to 90deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16145,1995-06-02 00:00:00,,EPSG,,
-32546,WGS 72BE / UTM zone 46S,,,,90deg East to 96deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16146,1995-06-02 00:00:00,,EPSG,,
-32547,WGS 72BE / UTM zone 47S,,,,96deg East to 102eg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16147,1995-06-02 00:00:00,,EPSG,,
-32548,WGS 72BE / UTM zone 48S,,,,102deg East to 108deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16148,1995-06-02 00:00:00,,EPSG,,
-32549,WGS 72BE / UTM zone 49S,,,,108deg East to 114deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16149,1995-06-02 00:00:00,,EPSG,,
-32550,WGS 72BE / UTM zone 50S,,,,114deg East to 120deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16150,1995-06-02 00:00:00,,EPSG,,
-32551,WGS 72BE / UTM zone 51S,,,,120deg East to 126deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16151,1995-06-02 00:00:00,,EPSG,,
-32552,WGS 72BE / UTM zone 52S,,,,126deg East to 132deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16152,1995-06-02 00:00:00,,EPSG,,
-32553,WGS 72BE / UTM zone 53S,,,,132deg East to 138deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16153,1995-06-02 00:00:00,,EPSG,,
-32554,WGS 72BE / UTM zone 54S,,,,138deg East to 144deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16154,1995-06-02 00:00:00,,EPSG,,
-32555,WGS 72BE / UTM zone 55S,,,,144deg East to 150deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16155,1995-06-02 00:00:00,,EPSG,,
-32556,WGS 72BE / UTM zone 56S,,,,150deg East to 156deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16156,1995-06-02 00:00:00,,EPSG,,
-32557,WGS 72BE / UTM zone 57S,,,,156deg East to 162deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16157,1995-06-02 00:00:00,,EPSG,,
-32558,WGS 72BE / UTM zone 58S,,,,162deg East to 168deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16158,1995-06-02 00:00:00,,EPSG,,
-32559,WGS 72BE / UTM zone 59S,,,,168deg East to 174deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16159,1995-06-02 00:00:00,,EPSG,,
-32560,WGS 72BE / UTM zone 60S,,,,174deg East to 180deg; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4324,16160,1995-06-02 00:00:00,,EPSG,,
-32601,WGS 84 / UTM zone 1N,,,,180deg to 174deg West; northern hemisphere; Russia.,projected 2D,,,East,North,E,N,9001,,4326,16001,1995-06-02 00:00:00,,EPSG,,
-32602,WGS 84 / UTM zone 2N,,,,174deg West to 168deg West; northern hemisphere. Russia; United States (USA) - Alaska (AK).,projected 2D,,,East,North,E,N,9001,,4326,16002,1995-06-02 00:00:00,,EPSG,,
-32603,WGS 84 / UTM zone 3N,,,,168deg West to 162deg West; northern hemisphere. United States (USA) - Alaska (AK).,projected 2D,,,East,North,E,N,9001,,4326,16003,1995-06-02 00:00:00,,EPSG,,
-32604,WGS 84 / UTM zone 4N,,,,162deg West to 156deg West; northern hemisphere. United States (USA) - Alaska (AK).,projected 2D,,,East,North,E,N,9001,,4326,16004,1995-06-02 00:00:00,,EPSG,,
-32605,WGS 84 / UTM zone 5N,,,,156deg West to 150deg West; northern hemisphere. United States (USA) - Alaska (AK).,projected 2D,,,East,North,E,N,9001,,4326,16005,1995-06-02 00:00:00,,EPSG,,
-32606,WGS 84 / UTM zone 6N,,,,150deg West to 144deg West; northern hemisphere. United States (USA) - Alaska (AK).,projected 2D,,,East,North,E,N,9001,,4326,16006,1995-06-02 00:00:00,,EPSG,,
-32607,WGS 84 / UTM zone 7N,,,,144deg West to 138deg West; northern hemisphere. Canada - British Columbia (BC); Yukon. United States (USA) - Alaska (AK).,projected 2D,,,East,North,E,N,9001,,4326,16007,1995-06-02 00:00:00,,EPSG,,
-32608,WGS 84 / UTM zone 8N,,,,138deg West to 132deg West; northern hemisphere. Canada - British Columbia (BC); North West Territiories; Yukon. United States (USA) - Alaska (AK).,projected 2D,,,East,North,E,N,9001,,4326,16008,1995-06-02 00:00:00,,EPSG,,
-32609,WGS 84 / UTM zone 9N,,,,132deg West to 126deg West; northern hemisphere. Canada - British Columbia (BC); North West Territories; Yukon. United States (USA) - Alaska (AK).,projected 2D,,,East,North,E,N,9001,,4326,16009,1995-06-02 00:00:00,,EPSG,,
-32610,WGS 84 / UTM zone 10N,,,,130deg West to 120deg West; northern hemisphere. Canada - British Columbia (BC); North West Territories; Nunavut; Yukon. United States (USA) - Alaska (AK).,projected 2D,,,East,North,E,N,9001,,4326,16010,1995-06-02 00:00:00,,EPSG,,
-32611,WGS 84 / UTM zone 11N,,,,120deg West to 114deg West; northern hemisphere. Canada - Alberta; British Columbia (BC); North West Territories; Nunavut. Mexico. United States (USA).,projected 2D,,,East,North,E,N,9001,,4326,16011,1995-06-02 00:00:00,,EPSG,,
-32612,WGS 84 / UTM zone 12N,,,,114deg West to 108deg West; northern hemisphere. Canada - Alberta; North West Territories; Nunavut; Saskatchewan.  Mexico.  United States (USA).,projected 2D,,,East,North,E,N,9001,,4326,16012,1995-06-02 00:00:00,,EPSG,,
-32613,WGS 84 / UTM zone 13N,,,,108deg West to 102deg West; northern hemisphere. Canada - North West Territories; Nunavut; Saskatchewan.  Mexico.  United States (USA).,projected 2D,,,East,North,E,N,9001,,4326,16013,1995-06-02 00:00:00,,EPSG,,
-32614,WGS 84 / UTM zone 14N,,,,102deg West to 96deg West; northern hemisphere. Canada - Manitoba; Nunavut; Saskatchewan.  Mexico.  United States (USA).,projected 2D,,,East,North,E,N,9001,,4326,16014,1995-06-02 00:00:00,,EPSG,,
-32615,WGS 84 / UTM zone 15N,,,,96deg West to 90deg West; northern hemisphere. Canada - Manitoba; Nunavut; Ontario.  Guatemala.  Mexico.  United States (USA) - Gulf of Mexico (GoM).,projected 2D,,,East,North,E,N,9001,,4326,16015,1995-06-02 00:00:00,,EPSG,,
-32616,WGS 84 / UTM zone 16N,,,,90deg West to 84deg West; northern hemisphere. Belize. Canada - Manitoba; Nunavut; Ontario.  Costa Rica. Cuba. El Salvador. Guatemala. Honduras. Mexico. Nicaragua. Puerto Rico. United States (USA).,projected 2D,,,East,North,E,N,9001,,4326,16016,1995-06-02 00:00:00,,EPSG,,
-32617,WGS 84 / UTM zone 17N,,,,84deg West to 78deg West; northern hemisphere. Bahamas. Ecuador - north of equator. Canada - Nunavut; Ontario; Quebec.  Cayman Islands.  Colombia. Costa Rica. Jamaica. Nicaragua. Panama. Puerto Rico. United States (USA).,projected 2D,,,East,North,E,N,9001,,4326,16017,1995-06-02 00:00:00,,EPSG,,
-32618,WGS 84 / UTM zone 18N,,,,78deg West to 72deg West; northern hemisphere. Bahamas. Canada - Nunavut; Ontario; Quebec. Colombia. Cuba. Ecuador. Greenland. Haiti. Jamica. Panama. Turks and Caicos Islands. United States (USA). Venezuela.,projected 2D,,,East,North,E,N,9001,,4326,16018,1995-06-02 00:00:00,,EPSG,,
-32619,WGS 84 / UTM zone 19N,,,,72deg West to 66deg West; northern hemisphere. Aruba. Bahamas. Brazil. Canada - New Brunswick (NB); Newfoundland; Nunavut; Nova Scotia (NS); Quebec. Colombia. Dominican Republic. Greenland. Netherlands Antilles. Puerto Rico. Turks and Caicos Islands. United States. Venezuela.,projected 2D,,,East,North,E,N,9001,,4326,16019,1995-06-02 00:00:00,,EPSG,,
-32620,WGS 84 / UTM zone 20N,,,,66deg West to 60deg West; northern hemisphere. Anguilla. Antigua & Barbuda. Bermuda. Brazil. Canada - New Brunswick (NB); Newfoundland; North west Territories; Nova Scotia (NS); Prince Edward Island; Quebec. Dominica. Greenland. Grenada. Guadeloupe. Guyana. Martinique. Montserrat. Saint Kitts and Nevis. Saint Lucia. Saint Vncent and the Grenadines. Trinidad and Tobago. Venezuela. Virgin islands.,projected 2D,,,East,North,E,N,9001,,4326,16020,1995-06-02 00:0 [...]
-32621,WGS 84 / UTM zone 21N,,,,60deg West to 54deg West; northern hemisphere. Barbados. Brazil. Canada - Newfoundland; Quebec. French Guiana. Greenland. Guyana. St. Pierre and Miquelon. Suriname.,projected 2D,,,East,North,E,N,9001,,4326,16021,1995-06-02 00:00:00,,EPSG,,
-32622,WGS 84 / UTM zone 22N,,,,54deg West to 48deg West; northern hemisphere. Brazil. Canada - Newfoundland. French Guiana. Greenland.,projected 2D,,,East,North,E,N,9001,,4326,16022,1995-06-02 00:00:00,,EPSG,,
-32623,WGS 84 / UTM zone 23N,,,,48deg West to 42deg West; northern hemisphere. Greenland.,projected 2D,,,East,North,E,N,9001,,4326,16023,1995-06-02 00:00:00,,EPSG,,
-32624,WGS 84 / UTM zone 24N,,,,42deg West to 36deg West; northern hemisphere. Greenland.,projected 2D,,,East,North,E,N,9001,,4326,16024,1995-06-02 00:00:00,,EPSG,,
-32625,WGS 84 / UTM zone 25N,,,,36deg West to 30deg West; northern hemisphere. Greenland.,projected 2D,,,East,North,E,N,9001,,4326,16025,1995-06-02 00:00:00,,EPSG,,
-32626,WGS 84 / UTM zone 26N,,,,30deg West to 24deg West; northern hemisphere. Greenland. Iceland.,projected 2D,,,East,North,E,N,9001,,4326,16026,1995-06-02 00:00:00,,EPSG,,
-32627,WGS 84 / UTM zone 27N,,,,24deg West to 18deg West; northern hemisphere. Greenland. Iceland.,projected 2D,,,East,North,E,N,9001,,4326,16027,1995-06-02 00:00:00,,EPSG,,
-32628,WGS 84 / UTM zone 28N,,,,18deg West to 12deg West; northern hemisphere. Gambia. Greenland. Guinea. Guinea-Bissau. Iceland. Ireland - offshore Porcupine Basin. Mauritania. Morocco. Senegal. Sierra Leone. Western Sahara.,projected 2D,,,East,North,E,N,9001,,4326,16028,1995-06-02 00:00:00,,EPSG,,
-32629,WGS 84 / UTM zone 29N,,,,12deg West to 6deg West; northern hemisphere. Algeria. Cote D'Ivoire (Ivory Coast). Faroe Islands. Guinea. Ireland. Mali. Mauritania. Morocco. Portugal. Sierra Leone. Spain. United Kingdom (UK). Western Sahara.,projected 2D,,,East,North,E,N,9001,,4326,16029,1995-06-02 00:00:00,,EPSG,,
-32630,WGS 84 / UTM zone 30N,,,,6deg West to 0deg; northern hemisphere. Algeria. Burkino Faso. Cote' Ivoire (Ivory Coast). Faroe Islands - offshore. France. Ghana. Gibraltar. Ireland - offshore Irish Sea. Mali. Mauritania. Morocco. Spain. United Kingdom (UK).,projected 2D,,,East,North,E,N,9001,,4326,16030,1995-06-02 00:00:00,,EPSG,,
-32631,WGS 84 / UTM zone 31N,,,,0deg to 6deg East; northern hemisphere. Algeria. Andorra. Benin. Bukino Faso. Denmark - North Sea. France. Germany - North Sea. Ghana. Luxembourg. Mali. Netherlands. Niger. Nigeria. Norway. Spain. Togo. United Kingdom (UK) - North Sea.,projected 2D,,,East,North,E,N,9001,,4326,16031,1995-06-02 00:00:00,,EPSG,,
-32632,WGS 84 / UTM zone 32N,,,,6deg East to 12deg East; northern hemisphere. Algeria. Austria. Cameroon. Denmark. Equatorial Guinea. France. Gabon. Germany. Italy. Libya. Liechtenstein. Monaco. Netherlands. Niger. Nigeria. Norway. Sao Tome and Principe. Svalbard and Jan Mayen Islands. Sweden. Switzerland. Tunisia. Vatican City State.,projected 2D,,,East,North,E,N,9001,,4326,16032,1995-06-02 00:00:00,,EPSG,,
-32633,WGS 84 / UTM zone 33N,,,,12deg East to 18deg East; northern hemisphere. Austria. Bosnia and Herzegowina. Cmeroon. Central African Republic. Chad. Congo. Croatia. Czech Republic. Democratic Republic of the Congo (Zaire). Gabon. Germany. Hungary. Italy. Libya. Malta. Niger. Nigeria. Norway. Poland. San Marino. Slovakia. Slovenia. Svalbard and Jan Mayen Islands. Sweden.,projected 2D,,,East,North,E,N,9001,,4326,16033,1995-06-02 00:00:00,,EPSG,,
-32634,WGS 84 / UTM zone 34N,,,,18deg East to 24deg East; northern hemisphere. Albania. Belarus. Bosnia and Herzegowina. Bulgaria. Central African Republic. Chad. Croatia. Democratic Republic of the Congo (Zaire). Estonia. Finland. FYR Macedonia. Greece. Hungary. Italy. Latvia. Libya. Lithuania. Norway. Poland. Romania. Russia. Slovakia. Sudan. Svalbard. Sweden. Ukraine. Yugoslavia.,projected 2D,,,East,North,E,N,9001,,4326,16034,1995-06-02 00:00:00,,EPSG,,
-32635,WGS 84 / UTM zone 35N,,,,24deg East to 30deg East; northern hemisphere. Belarus. Bulgaria. Central African Republic. Democratic Republic of the Congo (Zaire). Egypt. Estonia. Finland. Greece. Latvia. Lesotho. Libya. Lithuania. Moldova. Norway. Romania. Russia. Sudan. Svalbard. Turkey. Uganda. Ukraine.,projected 2D,,,East,North,E,N,9001,,4326,16035,1995-06-02 00:00:00,,EPSG,,
-32636,WGS 84 / UTM zone 36N,,,,30deg East to 36deg East; northern hemisphere. Belarus. Cyprus. Egypt. Ethiopia. Finland. Israel. Jordan. Kenya. Lebanon. Norway. Russia. Saudi Arabia. Sudan. Syria. Turkey. Uganda. Ukraine.,projected 2D,,,East,North,E,N,9001,,4326,16036,1995-06-02 00:00:00,,EPSG,,
-32637,WGS 84 / UTM zone 37N,,,,36deg East to 42deg East; northern hemisphere. Djibouti. Egypt. Eritrea. Ethiopia. Georgia. Iraq. Jordan. Kenya. Lebanon. Russia. Saudi Arabia. Somalia. Sudan. Syria. Turkey. Ukraine.,projected 2D,,,East,North,E,N,9001,,4326,16037,1995-06-02 00:00:00,,EPSG,,
-32638,WGS 84 / UTM zone 38N,,,,42deg East to 48deg East; northern hemisphere. Armenia. Azerbaijan. Djibouti. Eritrea. Ethiopia. Georgia. Iran. Iraq. Kazakhstan. Kuwait. Russia. Saudi Arabia. Somalia. Turkey. Yemen.,projected 2D,,,East,North,E,N,9001,,4326,16038,1995-06-02 00:00:00,,EPSG,,
-32639,WGS 84 / UTM zone 39N,,,,48deg East to 54deg East; northern hemisphere. Azerbaijan. Bahrain. Iran. Kazakhstan. Kuwait. Oman. Qatar. Russia. Saudi Arabia. Somalia. Turkmenistan. United Arab Emirates. Yemen.,projected 2D,,,East,North,E,N,9001,,4326,16039,1995-06-02 00:00:00,,EPSG,,
-32640,WGS 84 / UTM zone 40N,,,,54deg East to 60deg East; northern hemisphere. Iran. Kazakhstan. Oman. Russia. Saudi Arabia. Turkmenistan. United Arab Emirates. Uzbekistan.,projected 2D,,,East,North,E,N,9001,,4326,16040,1995-06-02 00:00:00,,EPSG,,
-32641,WGS 84 / UTM zone 41N,,,,60deg East to 66deg East; northern hemisphere. Afghanistan. Iran. Kazakhstan. Pakistan. Russia. Turkmenistan.  Uzbekistan.,projected 2D,,,East,North,E,N,9001,,4326,16041,1995-06-02 00:00:00,,EPSG,,
-32642,WGS 84 / UTM zone 42N,,,,66deg East to 72deg East; northern hemisphere. Afghanistan. India. Kazakhstan. Kyrgyzstan. Pakistan. Russia. Tajikistan. Uzbekistan.,projected 2D,,,East,North,E,N,9001,,4326,16042,1995-06-02 00:00:00,,EPSG,,
-32643,WGS 84 / UTM zone 43N,,,,72deg East to 78deg East; northern hemisphere. China. India. Kazakhstan. Kyrgyzstan. Maldives. Pakistan. Russia. Tajikistan.,projected 2D,,,East,North,E,N,9001,,4326,16043,1995-06-02 00:00:00,,EPSG,,
-32644,WGS 84 / UTM zone 44N,,,,78deg East to 84deg East; northern hemisphere. China. India. Kazakhstan. Kyrgyzstan. Nepal. Russia. Sri Lanka.,projected 2D,,,East,North,E,N,9001,,4326,16044,1995-06-02 00:00:00,,EPSG,,
-32645,WGS 84 / UTM zone 45N,,,,84deg East to 90deg East; northern hemisphere. Bangladesh. Bhutan. China. India. Kazakhstan. Mongolia. Nepal. Russia.,projected 2D,,,East,North,E,N,9001,,4326,16045,1995-06-02 00:00:00,,EPSG,,
-32646,WGS 84 / UTM zone 46N,,,,90deg East to 96deg East; northern hemisphere. Bangladesh. Bhutan. China. Indonesia. Mongolia. Myanmar (Burma). Russia.,projected 2D,,,East,North,E,N,9001,,4326,16046,1995-06-02 00:00:00,,EPSG,,
-32647,WGS 84 / UTM zone 47N,,,,96deg East to 102eg East; northern hemisphere. China. Indonesia. Laos. Malaysia - West Malaysia. Mongolia. Myanmar (Burma). Russia. Thailand.,projected 2D,,,East,North,E,N,9001,,4326,16047,1995-06-02 00:00:00,,EPSG,,
-32648,WGS 84 / UTM zone 48N,,,,102deg East to 108deg East; northern hemisphere. Cambodia. China. Indonesia. Laos. Malaysia - West Malaysia. Mongolia. Russia. Singapore. Thailand. Vietnam.,projected 2D,,,East,North,E,N,9001,,4326,16048,1995-06-02 00:00:00,,EPSG,,
-32649,WGS 84 / UTM zone 49N,,,,108deg East to 114deg East; northern hemisphere. China. Hong Kong. Indonesia. Macau. Malaysia - East Malaysia - Sarawak. Mongolia. Russia. Vietnam.,projected 2D,,,East,North,E,N,9001,,4326,16049,1995-06-02 00:00:00,,EPSG,,
-32650,WGS 84 / UTM zone 50N,,,,114deg East to 120deg East; northern hemisphere. Brunei. China. Indonesia. Malaysia - East Malaysia - Sarawak. Mongolia. Philippines. Russia. Taiwan.,projected 2D,,,East,North,E,N,9001,,4326,16050,1995-06-02 00:00:00,,EPSG,,
-32651,WGS 84 / UTM zone 51N,,,,120deg East to 126deg East; northern hemisphere. China. Indonesia. Japan. North Korea. Philippines. Russia.  South Korea. Taiwan.,projected 2D,,,East,North,E,N,9001,,4326,16051,1995-06-02 00:00:00,,EPSG,,
-32652,WGS 84 / UTM zone 52N,,,,126deg East to 132deg East; northern hemisphere. China. Indonesia. Japan. North Korea. Russia. South Korea.,projected 2D,,,East,North,E,N,9001,,4326,16052,1995-06-02 00:00:00,,EPSG,,
-32653,WGS 84 / UTM zone 53N,,,,132deg East to 138deg East; northern hemisphere. China. Japan. Russia.,projected 2D,,,East,North,E,N,9001,,4326,16053,1995-06-02 00:00:00,,EPSG,,
-32654,WGS 84 / UTM zone 54N,,,,138deg East to 144deg East; northern hemisphere. Japan. Russia.,projected 2D,,,East,North,E,N,9001,,4326,16054,1995-06-02 00:00:00,,EPSG,,
-32655,WGS 84 / UTM zone 55N,,,,144deg East to 150deg East; northern hemisphere. Japan. Russia.,projected 2D,,,East,North,E,N,9001,,4326,16055,1995-06-02 00:00:00,,EPSG,,
-32656,WGS 84 / UTM zone 56N,,,,150deg East to 156deg East; northern hemisphere. Russia.,projected 2D,,,East,North,E,N,9001,,4326,16056,1995-06-02 00:00:00,,EPSG,,
-32657,WGS 84 / UTM zone 57N,,,,156deg East to 162deg East; northern hemisphere. Russia.,projected 2D,,,East,North,E,N,9001,,4326,16057,1995-06-02 00:00:00,,EPSG,,
-32658,WGS 84 / UTM zone 58N,,,,162deg East to 168deg East; northern hemisphere. Russia.,projected 2D,,,East,North,E,N,9001,,4326,16058,1995-06-02 00:00:00,,EPSG,,
-32659,WGS 84 / UTM zone 59N,,,,168deg East to 174deg East; northern hemisphere. Russia.,projected 2D,,,East,North,E,N,9001,,4326,16059,1995-06-02 00:00:00,,EPSG,,
-32660,WGS 84 / UTM zone 60N,,,,174deg East to 180deg; northern hemisphere. Russia.,projected 2D,,,East,North,E,N,9001,,4326,16060,1995-06-02 00:00:00,,EPSG,,
-32661,WGS 84 / UPS North,,,,Polar areas north of 84 deg N.,projected 2D,,,East,North,E,N,9001,,4326,16061,1996-09-12 00:00:00,,EPSG,,
-32701,WGS 84 / UTM zone 1S,,,,180deg to 174deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4326,16101,1995-06-02 00:00:00,,EPSG,,
-32702,WGS 84 / UTM zone 2S,,,,174deg West to 168deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4326,16102,1995-06-02 00:00:00,,EPSG,,
-32703,WGS 84 / UTM zone 3S,,,,168deg West to 162deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4326,16103,1995-06-02 00:00:00,,EPSG,,
-32704,WGS 84 / UTM zone 4S,,,,162deg West to 156deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4326,16104,1995-06-02 00:00:00,,EPSG,,
-32705,WGS 84 / UTM zone 5S,,,,156deg West to 150deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4326,16105,1995-06-02 00:00:00,,EPSG,,
-32706,WGS 84 / UTM zone 6S,,,,150deg West to 144deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4326,16106,1995-06-02 00:00:00,,EPSG,,
-32707,WGS 84 / UTM zone 7S,,,,144deg West to 138deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4326,16107,1995-06-02 00:00:00,,EPSG,,
-32708,WGS 84 / UTM zone 8S,,,,138deg West to 132deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4326,16108,1995-06-02 00:00:00,,EPSG,,
-32709,WGS 84 / UTM zone 9S,,,,132deg West to 126deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4326,16109,1995-06-02 00:00:00,,EPSG,,
-32710,WGS 84 / UTM zone 10S,,,,130deg West to 120deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4326,16110,1995-06-02 00:00:00,,EPSG,,
-32711,WGS 84 / UTM zone 11S,,,,120deg West to 114deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4326,16111,1995-06-02 00:00:00,,EPSG,,
-32712,WGS 84 / UTM zone 12S,,,,114deg West to 108deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4326,16112,1995-06-02 00:00:00,,EPSG,,
-32713,WGS 84 / UTM zone 13S,,,,108deg West to 102deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4326,16113,1995-06-02 00:00:00,,EPSG,,
-32714,WGS 84 / UTM zone 14S,,,,102deg West to 96deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4326,16114,1995-06-02 00:00:00,,EPSG,,
-32715,WGS 84 / UTM zone 15S,,,,96deg West to 90deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4326,16115,1995-06-02 00:00:00,,EPSG,,
-32716,WGS 84 / UTM zone 16S,,,,90deg West to 84deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4326,16116,1995-06-02 00:00:00,,EPSG,,
-32717,WGS 84 / UTM zone 17S,,,,84deg West to 78deg West; southern hemisphere. Ecuador. Peru.,projected 2D,,,East,North,E,N,9001,,4326,16117,1995-06-02 00:00:00,,EPSG,,
-32718,WGS 84 / UTM zone 18S,,,,78deg West to 72deg West; southern hemisphere. Argentina. Brazil. Chile. Colombia. Ecuador. Peru.,projected 2D,,,East,North,E,N,9001,,4326,16118,1995-06-02 00:00:00,,EPSG,,
-32719,WGS 84 / UTM zone 19S,,,,72deg West to 66deg West; southern hemisphere. Argentina. Bolivia. Brazil. Chile. Colombia. Peru.,projected 2D,,,East,North,E,N,9001,,4326,16119,1995-06-02 00:00:00,,EPSG,,
-32720,WGS 84 / UTM zone 20S,,,,66deg West to 60deg West; southern hemisphere. Argentina. Bolivia. Brazil. Falkland Islands (Malvinas). Paraguay.,projected 2D,,,East,North,E,N,9001,,4326,16120,1995-06-02 00:00:00,,EPSG,,
-32721,WGS 84 / UTM zone 21S,,,,60deg West to 54deg West; southern hemisphere. Argentina. Bolivia. Brazil. Falkland Islands (Malvinas). Paraguay. Uruguay.,projected 2D,,,East,North,E,N,9001,,4326,16121,1995-06-02 00:00:00,,EPSG,,
-32722,WGS 84 / UTM zone 22S,,,,54deg West to 48deg West; southern hemisphere. Brazil.  Uruguay.,projected 2D,,,East,North,E,N,9001,,4326,16122,1995-06-02 00:00:00,,EPSG,,
-32723,WGS 84 / UTM zone 23S,,,,48deg West to 42deg West; southern hemisphere. Brazil.,projected 2D,,,East,North,E,N,9001,,4326,16123,1995-06-02 00:00:00,,EPSG,,
-32724,WGS 84 / UTM zone 24S,,,,42deg West to 36deg West; southern hemisphere. Brazil. South Georgia and the South Sandwich Islands.,projected 2D,,,East,North,E,N,9001,,4326,16124,1995-06-02 00:00:00,,EPSG,,
-32725,WGS 84 / UTM zone 25S,,,,36deg West to 30deg West; southern hemisphere. Brazil.,projected 2D,,,East,North,E,N,9001,,4326,16125,1995-06-02 00:00:00,,EPSG,,
-32726,WGS 84 / UTM zone 26S,,,,30deg West to 24deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4326,16126,1995-06-02 00:00:00,,EPSG,,
-32727,WGS 84 / UTM zone 27S,,,,24deg West to 18deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4326,16127,1995-06-02 00:00:00,,EPSG,,
-32728,WGS 84 / UTM zone 28S,,,,18deg West to 12deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4326,16128,1995-06-02 00:00:00,,EPSG,,
-32729,WGS 84 / UTM zone 29S,,,,12deg West to 6deg West; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4326,16129,1995-06-02 00:00:00,,EPSG,,
-32730,WGS 84 / UTM zone 30S,,,,6deg West to 0deg; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4326,16130,1995-06-02 00:00:00,,EPSG,,
-32731,WGS 84 / UTM zone 31S,,,,0deg to 6deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4326,16131,1995-06-02 00:00:00,,EPSG,,
-32732,WGS 84 / UTM zone 32S,,,,6deg East to 12deg East; southern hemisphere. Angola. Congo. Gabon. Namibia.,projected 2D,,,East,North,E,N,9001,,4326,16132,1995-06-02 00:00:00,,EPSG,,
-32733,WGS 84 / UTM zone 33S,,,,12deg East to 18deg East; southern hemisphere. Angola. Congo. Democratic Republic of the Congo (Zaire). Gabon. Namibia. South Africa.,projected 2D,,,East,North,E,N,9001,,4326,16133,1995-06-02 00:00:00,,EPSG,,
-32734,WGS 84 / UTM zone 34S,,,,18deg East to 24deg East; southern hemisphere. Angola. Botswana. Democratic Republic of the Congo (Zaire). Namibia. South Africa. Zambia.,projected 2D,,,East,North,E,N,9001,,4326,16134,1995-06-02 00:00:00,,EPSG,,
-32735,WGS 84 / UTM zone 35S,,,,24deg East to 30deg East; southern hemisphere. Botswana. Burundi. Democratic Republic of the Congo (Zaire). Rwanda. South Africa. Tanzania. Uganda. Zambia. Zimbabwe.,projected 2D,,,East,North,E,N,9001,,4326,16135,1995-06-02 00:00:00,,EPSG,,
-32736,WGS 84 / UTM zone 36S,,,,30deg East to 36deg East; southern hemisphere. Burundi. Kenya. Malawi. Mozambique. Rwanda. South Africa. Swaziland. Tanzania. Uganda. Zambia. Zimbabwe.,projected 2D,,,East,North,E,N,9001,,4326,16136,1995-06-02 00:00:00,,EPSG,,
-32737,WGS 84 / UTM zone 37S,,,,36deg East to 42deg East; southern hemisphere. Kenya. Mozambique. Tanzania.,projected 2D,,,East,North,E,N,9001,,4326,16137,1995-06-02 00:00:00,,EPSG,,
-32738,WGS 84 / UTM zone 38S,,,,42deg East to 48deg East; southern hemisphere. Madagascar.,projected 2D,,,East,North,E,N,9001,,4326,16138,1995-06-02 00:00:00,,EPSG,,
-32739,WGS 84 / UTM zone 39S,,,,48deg East to 54deg East; southern hemisphere. Madagascar.,projected 2D,,,East,North,E,N,9001,,4326,16139,1995-06-02 00:00:00,,EPSG,,
-32740,WGS 84 / UTM zone 40S,,,,54deg East to 60deg East; southern hemisphere. Seychelles.,projected 2D,,,East,North,E,N,9001,,4326,16140,1995-06-02 00:00:00,,EPSG,,
-32741,WGS 84 / UTM zone 41S,,,,60deg East to 66deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4326,16141,1995-06-02 00:00:00,,EPSG,,
-32742,WGS 84 / UTM zone 42S,,,,66deg East to 72deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4326,16142,1995-06-02 00:00:00,,EPSG,,
-32743,WGS 84 / UTM zone 43S,,,,72deg East to 78deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4326,16143,1995-06-02 00:00:00,,EPSG,,
-32744,WGS 84 / UTM zone 44S,,,,78deg East to 84deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4326,16144,1995-06-02 00:00:00,,EPSG,,
-32745,WGS 84 / UTM zone 45S,,,,84deg East to 90deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4326,16145,1995-06-02 00:00:00,,EPSG,,
-32746,WGS 84 / UTM zone 46S,,,,90deg East to 96deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4326,16146,1995-06-02 00:00:00,,EPSG,,
-32747,WGS 84 / UTM zone 47S,,,,96deg East to 102eg East; southern hemisphere. Indonesia.,projected 2D,,,East,North,E,N,9001,,4326,16147,1995-06-02 00:00:00,,EPSG,,
-32748,WGS 84 / UTM zone 48S,,,,102deg East to 108deg East; southern hemisphere. Indonesia.,projected 2D,,,East,North,E,N,9001,,4326,16148,1995-06-02 00:00:00,,EPSG,,
-32749,WGS 84 / UTM zone 49S,,,,108deg East to 114deg East; southern hemisphere. Australia. Indonesia.,projected 2D,,,East,North,E,N,9001,,4326,16149,1995-06-02 00:00:00,,EPSG,,
-32750,WGS 84 / UTM zone 50S,,,,114deg East to 120deg East; southern hemisphere. Australia. Indonesia.,projected 2D,,,East,North,E,N,9001,,4326,16150,1995-06-02 00:00:00,,EPSG,,
-32751,WGS 84 / UTM zone 51S,,,,120deg East to 126deg East; southern hemisphere. Australia. East Timor. Indonesia.,projected 2D,,,East,North,E,N,9001,,4326,16151,1995-06-02 00:00:00,,EPSG,,
-32752,WGS 84 / UTM zone 52S,,,,126deg East to 132deg East; southern hemisphere. Australia. East Timor. Indonesia.,projected 2D,,,East,North,E,N,9001,,4326,16152,1995-06-02 00:00:00,,EPSG,,
-32753,WGS 84 / UTM zone 53S,,,,132deg East to 138deg East; southern hemisphere. Australia.  Indonesia.,projected 2D,,,East,North,E,N,9001,,4326,16153,1995-06-02 00:00:00,,EPSG,,
-32754,WGS 84 / UTM zone 54S,,,,138deg East to 144deg East; southern hemisphere. Australia. Indonesia. Papua New Guinea.,projected 2D,,,East,North,E,N,9001,,4326,16154,1995-06-02 00:00:00,,EPSG,,
-32755,WGS 84 / UTM zone 55S,,,,144deg East to 150deg East; southern hemisphere. Australia. Papua New Guinea.,projected 2D,,,East,North,E,N,9001,,4326,16155,1995-06-02 00:00:00,,EPSG,,
-32756,WGS 84 / UTM zone 56S,,,,150deg East to 156deg East; southern hemisphere. Australia. Papua New Guinea.,projected 2D,,,East,North,E,N,9001,,4326,16156,1995-06-02 00:00:00,,EPSG,,
-32757,WGS 84 / UTM zone 57S,,,,156deg East to 162deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4326,16157,1995-06-02 00:00:00,,EPSG,,
-32758,WGS 84 / UTM zone 58S,,,,162deg East to 168deg East; southern hemisphere.,projected 2D,,,East,North,E,N,9001,,4326,16158,1995-06-02 00:00:00,,EPSG,,
-32759,WGS 84 / UTM zone 59S,,,,168deg East to 174deg East; southern hemisphere. New Zealand.,projected 2D,,,East,North,E,N,9001,,4326,16159,1995-06-02 00:00:00,,EPSG,,
-32760,WGS 84 / UTM zone 60S,,,,174deg East to 180deg; southern hemisphere. New Zealand.,projected 2D,,,East,North,E,N,9001,,4326,16160,1995-06-02 00:00:00,,EPSG,,
-32761,WGS 84 / UPS South,,,,Polar areas south of 80 deg S.,projected 2D,,,East,North,E,N,9001,,4326,16161,1996-09-12 00:00:00,,EPSG,,
-32766,WGS 84 / TM 36 SE,,,,Mozambique - offshore.,projected 2D,,,East,North,E,N,9001,,4326,16636,1998-11-11 00:00:00,BP Mozambique,EPSG,Used by BP Mozambique for Offshore Zambezi block.,
diff --git a/src/tiff/csv/naming_system.csv b/src/tiff/csv/naming_system.csv
deleted file mode 100644
index 4867050..0000000
--- a/src/tiff/csv/naming_system.csv
+++ /dev/null
@@ -1,13 +0,0 @@
-"NAMING_SYSTEM_CODE","NAMING_SYSTEM_NAME","REMARKS","INFORMATION_SOURCE","DATA_SOURCE","REVISION_DATE","CHANGE_ID","DEPRECATED"
-7300,EPSG alternative spelling,An alternative spelling of the EPSG name; assigned by EPSG.,EPSG,EPSG,2000-05-07 00:00:00,,0
-7301,EPSG alias,An alternative name assigned by EPSG.,EPSG,EPSG,2000-05-07 00:00:00,,0
-7302,EPSG abbreviation,An abbreviation assigned by EPSG.,EPSG,EPSG,2000-05-07 00:00:00,,0
-7303,User name,An alternative name assigned by user; not populated by EPSG.,(User to insert),EPSG,2000-05-07 00:00:00,,0
-7304,User alias,A secondary alternative name assigned by user; not populated by EPSG.,(User to insert),EPSG,2000-05-07 00:00:00,,0
-7305,User abbreviation,An abbreviation assigned by user; not populated by EPSG.,(User to insert),EPSG,2000-05-07 00:00:00,,0
-7306,POSC acronym,An abbreviation assigned by the Petrotechnical Open Software Corporation (POSC).,POSC,EPSG,2000-05-07 00:00:00,,0
-7307,EuroGeographics Identifier,A unique identifier used in the compilation of European national mapping agency data by EuroGeographics.,EuroGeographics; http://crs.ifag.de/,EPSG,2001-06-05 00:00:00,,0
-7308,Croatia alternative identifier,,EPSG,EPSG,2001-06-05 00:00:00,,0
-7309,Slovenia alternative identifier,,EPSG,EPSG,2001-06-05 00:00:00,,0
-7310,Germany alternative identifier,An alternative name used by the BfK.,EPSG,EPSG,2001-06-05 00:00:00,,0
-7311,Indonesian alternative identifier,An alternative name used by Bakosurtanal.,EPSG,EPSG,2002-06-22 00:00:00,,0
diff --git a/src/tiff/csv/p_meridian.c b/src/tiff/csv/p_meridian.c
deleted file mode 100644
index f39beb2..0000000
--- a/src/tiff/csv/p_meridian.c
+++ /dev/null
@@ -1,17 +0,0 @@
-#include "defs.h"
-datafile_rows_t p_meridian_row_1[] = {"PRIME_MERIDIAN_CODE","PRIME_MERID_EPSG_NAME","PRIME_MERID_USER_NAME","GREENWICH_LONGITUDE","UOM_ANGLE_CODE","REVISION_DATE","INFORMATION_SOURCE","DATA_SOURCE","REMARKS","CHANGE_ID",NULL};
-datafile_rows_t p_meridian_row_2[] = {"8901","Greenwich","","0.0","9110","1995-06-02 00:00:00","","EPSG","","96.29",NULL};
-datafile_rows_t p_meridian_row_3[] = {"8902","Lisbon","","-9.0754862","9110","1995-06-02 00:00:00","Instituto Geografico e Cadastral; Lisbon","EPSG","","96.29",NULL};
-datafile_rows_t p_meridian_row_4[] = {"8903","Paris","","2.5969213","9105","1995-06-02 00:00:00","Institut Geographique National (IGN); Paris","EPSG","Value adopted by IGN (Paris) in 1936. Equivalent to 2 deg 20min 14.025sec. Preferred by EPSG to earlier value of 2deg 20min 13.95sec (2.596898 grads) used by RGS London.","",NULL};
-datafile_rows_t p_meridian_row_5[] = {"8904","Bogota","","-74.04513","9110","1995-06-02 00:00:00","Instituto Geografico \"Augustin Cadazzi\" (IGAC); Bogota","EPSG","","96.29",NULL};
-datafile_rows_t p_meridian_row_6[] = {"8905","Madrid","","-3.411658","9110","1995-06-02 00:00:00","","EPSG","","96.29",NULL};
-datafile_rows_t p_meridian_row_7[] = {"8906","Rome","","12.27084","9110","1995-06-02 00:00:00","","EPSG","","96.29",NULL};
-datafile_rows_t p_meridian_row_8[] = {"8907","Bern","","7.26225","9110","1995-06-02 00:00:00","Bundesamt f�r Landestopographie","EPSG","1895 value.  Newer value of 7 deg 26 min 22.335 sec E determined in 1938.","96.29",NULL};
-datafile_rows_t p_meridian_row_9[] = {"8908","Jakarta","","106.482779","9110","1995-06-02 00:00:00","","EPSG","","96.29",NULL};
-datafile_rows_t p_meridian_row_10[] = {"8909","Ferro","","-17.4","9110","1995-06-02 00:00:00","","EPSG","Used in Austria and former Czechoslovakia.","96.29",NULL};
-datafile_rows_t p_meridian_row_11[] = {"8910","Brussels","","4.220471","9110","1995-06-02 00:00:00","","EPSG","","96.29",NULL};
-datafile_rows_t p_meridian_row_12[] = {"8911","Stockholm","","18.03298","9110","1995-06-02 00:00:00","","EPSG","","96.29",NULL};
-datafile_rows_t p_meridian_row_13[] = {"8912","Athens","","23.4258815","9110","1997-06-16 00:00:00","Topography Department; National Technical University of Athens.","EPSG","Used in Greece for older mapping based on Hatt projection.","",NULL};
-datafile_rows_t p_meridian_row_14[] = {"8913","Oslo","","10.43225","9110","1999-10-20 00:00:00","Statens kartverk - Geodesi dividsion","EPSG","Formerly known as Kristiana and Christiana.","",NULL};
-
-datafile_rows_t *p_meridian_rows[] = {p_meridian_row_1,p_meridian_row_2,p_meridian_row_3,p_meridian_row_4,p_meridian_row_5,p_meridian_row_6,p_meridian_row_7,p_meridian_row_8,p_meridian_row_9,p_meridian_row_10,p_meridian_row_11,p_meridian_row_12,p_meridian_row_13,p_meridian_row_14,NULL};
diff --git a/src/tiff/csv/p_meridian.csv b/src/tiff/csv/p_meridian.csv
deleted file mode 100644
index 9e289fe..0000000
--- a/src/tiff/csv/p_meridian.csv
+++ /dev/null
@@ -1,14 +0,0 @@
-"PRIME_MERIDIAN_CODE","PRIME_MERID_EPSG_NAME","PRIME_MERID_USER_NAME","GREENWICH_LONGITUDE","UOM_ANGLE_CODE","REVISION_DATE","INFORMATION_SOURCE","DATA_SOURCE","REMARKS","CHANGE_ID"
-8901,Greenwich,,0.0,9110,1995-06-02 00:00:00,,EPSG,,96.29
-8902,Lisbon,,-9.0754862,9110,1995-06-02 00:00:00,Instituto Geografico e Cadastral; Lisbon,EPSG,,96.29
-8903,Paris,,2.5969213,9105,1995-06-02 00:00:00,Institut Geographique National (IGN); Paris,EPSG,Value adopted by IGN (Paris) in 1936. Equivalent to 2 deg 20min 14.025sec. Preferred by EPSG to earlier value of 2deg 20min 13.95sec (2.596898 grads) used by RGS London.,
-8904,Bogota,,-74.04513,9110,1995-06-02 00:00:00,"Instituto Geografico \"Augustin Cadazzi\" (IGAC); Bogota",EPSG,,96.29
-8905,Madrid,,-3.411658,9110,1995-06-02 00:00:00,,EPSG,,96.29
-8906,Rome,,12.27084,9110,1995-06-02 00:00:00,,EPSG,,96.29
-8907,Bern,,7.26225,9110,1995-06-02 00:00:00,Bundesamt f�r Landestopographie,EPSG,1895 value.  Newer value of 7 deg 26 min 22.335 sec E determined in 1938.,96.29
-8908,Jakarta,,106.482779,9110,1995-06-02 00:00:00,,EPSG,,96.29
-8909,Ferro,,-17.4,9110,1995-06-02 00:00:00,,EPSG,Used in Austria and former Czechoslovakia.,96.29
-8910,Brussels,,4.220471,9110,1995-06-02 00:00:00,,EPSG,,96.29
-8911,Stockholm,,18.03298,9110,1995-06-02 00:00:00,,EPSG,,96.29
-8912,Athens,,23.4258815,9110,1997-06-16 00:00:00,Topography Department; National Technical University of Athens.,EPSG,Used in Greece for older mapping based on Hatt projection.,
-8913,Oslo,,10.43225,9110,1999-10-20 00:00:00,Statens kartverk - Geodesi dividsion,EPSG,Formerly known as Kristiana and Christiana.,
diff --git a/src/tiff/csv/pcs.csv b/src/tiff/csv/pcs.csv
deleted file mode 100644
index f7c38a4..0000000
--- a/src/tiff/csv/pcs.csv
+++ /dev/null
@@ -1,2251 +0,0 @@
-"COORD_REF_SYS_CODE","COORD_REF_SYS_NAME","UOM_CODE","SOURCE_GEOGCRS_CODE","COORD_OP_CODE","COORD_OP_METHOD_CODE","PARAMETER_CODE_1","PARAMETER_VALUE_1","PARAMETER_UOM_1","PARAMETER_CODE_2","PARAMETER_VALUE_2","PARAMETER_UOM_2","PARAMETER_CODE_3","PARAMETER_VALUE_3","PARAMETER_UOM_3","PARAMETER_CODE_4","PARAMETER_VALUE_4","PARAMETER_UOM_4","PARAMETER_CODE_5","PARAMETER_VALUE_5","PARAMETER_UOM_5","PARAMETER_CODE_6","PARAMETER_VALUE_6","PARAMETER_UOM_6","PARAMETER_CODE_7","PARAMETER_VALUE_ [...]
-2000,"Anguilla 1957 / British West Indies Grid",9001,4600,19942,9807,8801,0.0,9102,8802,-62.0,9102,8805,0.9995,9201,8806,400000.0,9001,8807,0.0,9001,,,,,,
-2001,"Antigua 1943 / British West Indies Grid",9001,4601,19942,9807,8801,0.0,9102,8802,-62.0,9102,8805,0.9995,9201,8806,400000.0,9001,8807,0.0,9001,,,,,,
-2002,"Dominica 1945 / British West Indies Grid",9001,4602,19942,9807,8801,0.0,9102,8802,-62.0,9102,8805,0.9995,9201,8806,400000.0,9001,8807,0.0,9001,,,,,,
-2003,"Grenada 1953 / British West Indies Grid",9001,4603,19942,9807,8801,0.0,9102,8802,-62.0,9102,8805,0.9995,9201,8806,400000.0,9001,8807,0.0,9001,,,,,,
-2004,"Montserrat 58 / British West Indies Grid",9001,4604,19942,9807,8801,0.0,9102,8802,-62.0,9102,8805,0.9995,9201,8806,400000.0,9001,8807,0.0,9001,,,,,,
-2005,"St Kitts 1955 / British West Indies Grid",9001,4605,19942,9807,8801,0.0,9102,8802,-62.0,9102,8805,0.9995,9201,8806,400000.0,9001,8807,0.0,9001,,,,,,
-2006,"St Lucia 1955 / British West Indies Grid",9001,4606,19942,9807,8801,0.0,9102,8802,-62.0,9102,8805,0.9995,9201,8806,400000.0,9001,8807,0.0,9001,,,,,,
-2007,"St Vincent 45 / British West Indies Grid",9001,4607,19942,9807,8801,0.0,9102,8802,-62.0,9102,8805,0.9995,9201,8806,400000.0,9001,8807,0.0,9001,,,,,,
-2008,"NAD27(CGQ77) / SCoPQ zone 2",9001,4609,17700,9807,8801,0.0,9110,8802,-55.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-2009,"NAD27(CGQ77) / SCoPQ zone 3",9001,4609,17703,9807,8801,0.0,9110,8802,-58.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-2010,"NAD27(CGQ77) / SCoPQ zone 4",9001,4609,17704,9807,8801,0.0,9110,8802,-61.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-2011,"NAD27(CGQ77) / SCoPQ zone 5",9001,4609,17705,9807,8801,0.0,9110,8802,-64.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-2012,"NAD27(CGQ77) / SCoPQ zone 6",9001,4609,17706,9807,8801,0.0,9110,8802,-67.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-2013,"NAD27(CGQ77) / SCoPQ zone 7",9001,4609,17707,9807,8801,0.0,9110,8802,-70.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-2014,"NAD27(CGQ77) / SCoPQ zone 8",9001,4609,17708,9807,8801,0.0,9110,8802,-73.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-2015,"NAD27(CGQ77) / SCoPQ zone 9",9001,4609,17709,9807,8801,0.0,9110,8802,-76.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-2016,"NAD27(CGQ77) / SCoPQ zone 10",9001,4609,17710,9807,8801,0.0,9110,8802,-79.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-2017,"NAD27(76) / MTM zone 8",9001,4608,17708,9807,8801,0.0,9110,8802,-73.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-2018,"NAD27(76) / MTM zone 9",9001,4608,17709,9807,8801,0.0,9110,8802,-76.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-2019,"NAD27(76) / MTM zone 10",9001,4608,17710,9807,8801,0.0,9110,8802,-79.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-2020,"NAD27(76) / MTM zone 11",9001,4608,17711,9807,8801,0.0,9110,8802,-82.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-2021,"NAD27(76) / MTM zone 12",9001,4608,17712,9807,8801,0.0,9102,8802,-81.0,9102,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-2022,"NAD27(76) / MTM zone 13",9001,4608,17713,9807,8801,0.0,9102,8802,-84.0,9102,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-2023,"NAD27(76) / MTM zone 14",9001,4608,17714,9807,8801,0.0,9102,8802,-87.0,9102,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-2024,"NAD27(76) / MTM zone 15",9001,4608,17715,9807,8801,0.0,9102,8802,-90.0,9102,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-2025,"NAD27(76) / MTM zone 16",9001,4608,17716,9807,8801,0.0,9102,8802,-93.0,9102,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-2026,"NAD27(76) / MTM zone 17",9001,4608,17717,9807,8801,0.0,9102,8802,-96.0,9102,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-2027,"NAD27(76) / UTM zone 15N",9001,4608,16015,9807,8801,0.0,9102,8802,-93.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2028,"NAD27(76) / UTM zone 16N",9001,4608,16016,9807,8801,0.0,9102,8802,-87.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2029,"NAD27(76) / UTM zone 17N",9001,4608,16017,9807,8801,0.0,9102,8802,-81.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2030,"NAD27(76) / UTM zone 18N",9001,4608,16018,9807,8801,0.0,9102,8802,-75.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2031,"NAD27(CGQ77) / UTM zone 17N",9001,4609,16017,9807,8801,0.0,9102,8802,-81.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2032,"NAD27(CGQ77) / UTM zone 18N",9001,4609,16018,9807,8801,0.0,9102,8802,-75.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2033,"NAD27(CGQ77) / UTM zone 19N",9001,4609,16019,9807,8801,0.0,9102,8802,-69.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2034,"NAD27(CGQ77) / UTM zone 20N",9001,4609,16020,9807,8801,0.0,9102,8802,-63.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2035,"NAD27(CGQ77) / UTM zone 21N",9001,4609,16021,9807,8801,0.0,9102,8802,-57.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2036,"NAD83(CSRS98) / New Brunswick Stereo",9001,4140,19946,9809,8801,46.3,9110,8802,-66.3,9110,8805,0.999912,9201,8806,2500000.0,9001,8807,7500000.0,9001,,,,,,
-2037,"NAD83(CSRS98) / UTM zone 19N",9001,4140,16019,9807,8801,0.0,9102,8802,-69.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2038,"NAD83(CSRS98) / UTM zone 20N",9001,4140,16020,9807,8801,0.0,9102,8802,-63.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2039,"Israel / Israeli TM Grid",9001,4141,18204,9807,8801,31.4403817,9110,8802,35.1216261,9110,8805,1.0000067,9201,8806,219529.584,9001,8807,626907.39,9001,,,,,,
-2040,"Locodjo 1965 / UTM zone 30N",9001,4142,16030,9807,8801,0.0,9102,8802,-3.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2041,"Abidjan 1987 / UTM zone 30N",9001,4143,16030,9807,8801,0.0,9102,8802,-3.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2042,"Locodjo 1965 / UTM zone 29N",9001,4142,16029,9807,8801,0.0,9102,8802,-9.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2043,"Abidjan 1987 / UTM zone 29N",9001,4143,16029,9807,8801,0.0,9102,8802,-9.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2044,"Hanoi 1972 / Gauss-Kruger zone 18",9001,4147,16218,9807,8801,0.0,9102,8802,105.0,9102,8805,1.0,9201,8806,18500000.0,9001,8807,0.0,9001,,,,,,
-2045,"Hanoi 1972 / Gauss-Kruger zone 19",9001,4147,16219,9807,8801,0.0,9102,8802,111.0,9102,8805,1.0,9201,8806,19500000.0,9001,8807,0.0,9001,,,,,,
-2046,"Hartebeesthoek94 / Lo15",9001,4148,17515,9808,8801,0.0,9102,8802,15.0,9102,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2047,"Hartebeesthoek94 / Lo17",9001,4148,17517,9808,8801,0.0,9102,8802,17.0,9102,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2048,"Hartebeesthoek94 / Lo19",9001,4148,17519,9808,8801,0.0,9102,8802,19.0,9102,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2049,"Hartebeesthoek94 / Lo21",9001,4148,17521,9808,8801,0.0,9102,8802,21.0,9102,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2050,"Hartebeesthoek94 / Lo23",9001,4148,17523,9808,8801,0.0,9102,8802,23.0,9102,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2051,"Hartebeesthoek94 / Lo25",9001,4148,17525,9808,8801,0.0,9102,8802,25.0,9102,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2052,"Hartebeesthoek94 / Lo27",9001,4148,17527,9808,8801,0.0,9102,8802,27.0,9102,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2053,"Hartebeesthoek94 / Lo29",9001,4148,17529,9808,8801,0.0,9102,8802,29.0,9102,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2054,"Hartebeesthoek94 / Lo31",9001,4148,17531,9808,8801,0.0,9102,8802,31.0,9102,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2055,"Hartebeesthoek94 / Lo33",9001,4148,17533,9808,8801,0.0,9102,8802,33.0,9102,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2056,"CH1903+ / LV95",9001,4150,19950,9815,8811,46.570866,9110,8812,7.26225,9110,8813,90.0,9110,8814,90.0,9110,8815,1.0,9201,8816,2600000.0,9001,8817,1200000.0,9001
-2057,"Rassadiran / Nakhl e Taqi",9001,4153,19951,9815,8811,27.31077837,9110,8812,52.3612741,9110,8813,0.34179803,9110,8814,0.34179803,9110,8815,0.999895934,9201,8816,658377.437,9001,8817,3044969.194,9001
-2058,"ED50(ED77) / UTM zone 38N",9001,4154,16038,9807,8801,0.0,9102,8802,45.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2059,"ED50(ED77) / UTM zone 39N",9001,4154,16039,9807,8801,0.0,9102,8802,51.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2060,"ED50(ED77) / UTM zone 40N",9001,4154,16040,9807,8801,0.0,9102,8802,57.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2061,"ED50(ED77) / UTM zone 41N",9001,4154,16041,9807,8801,0.0,9102,8802,63.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2062,"Madrid 1870 (Madrid) / Spain",9001,4903,19921,9801,8801,40.0,9102,8802,0.0,9102,8805,0.9988085293,9201,8806,600000.0,9001,8807,600000.0,9001,,,,,,
-2063,"Dabola 1981 / UTM zone 28N",9001,4315,16028,9807,8801,0.0,9102,8802,-15.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2064,"Dabola 1981 / UTM zone 29N",9001,4315,16029,9807,8801,0.0,9102,8802,-9.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2065,"S-JTSK (Ferro) / Krovak",9001,4818,19952,9819,8811,49.3,9110,8812,42.3,9110,8813,30.1717303,9110,8816,0.0,9001,8817,0.0,9001,8818,78.3,9110,8819,0.9999,9201
-2066,"Mount Dillon / Tobago Grid",9039,4157,19924,9806,8801,11.1507843,9110,8802,-60.4109632,9110,8806,187500.0,9039,8807,180000.0,9039,,,,,,,,,
-2067,"Naparima 1955 / UTM zone 20N",9001,4158,16020,9807,8801,0.0,9102,8802,-63.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2068,"ELD79 / Libya zone 5",9001,4159,18240,9807,8801,0.0,9102,8802,9.0,9102,8805,0.9999,9201,8806,200000.0,9001,8807,0.0,9001,,,,,,
-2069,"ELD79 / Libya zone 6",9001,4159,18241,9807,8801,0.0,9102,8802,11.0,9102,8805,0.9999,9201,8806,200000.0,9001,8807,0.0,9001,,,,,,
-2070,"ELD79 / Libya zone 7",9001,4159,18242,9807,8801,0.0,9102,8802,13.0,9102,8805,0.9999,9201,8806,200000.0,9001,8807,0.0,9001,,,,,,
-2071,"ELD79 / Libya zone 8",9001,4159,18243,9807,8801,0.0,9102,8802,15.0,9102,8805,0.9999,9201,8806,200000.0,9001,8807,0.0,9001,,,,,,
-2072,"ELD79 / Libya zone 9",9001,4159,18244,9807,8801,0.0,9102,8802,17.0,9102,8805,0.9999,9201,8806,200000.0,9001,8807,0.0,9001,,,,,,
-2073,"ELD79 / Libya zone 10",9001,4159,18245,9807,8801,0.0,9102,8802,19.0,9102,8805,0.9999,9201,8806,200000.0,9001,8807,0.0,9001,,,,,,
-2074,"ELD79 / Libya zone 11",9001,4159,18246,9807,8801,0.0,9102,8802,21.0,9102,8805,0.9999,9201,8806,200000.0,9001,8807,0.0,9001,,,,,,
-2075,"ELD79 / Libya zone 12",9001,4159,18247,9807,8801,0.0,9102,8802,23.0,9102,8805,0.9999,9201,8806,200000.0,9001,8807,0.0,9001,,,,,,
-2076,"ELD79 / Libya zone 13",9001,4159,18248,9807,8801,0.0,9102,8802,25.0,9102,8805,0.9999,9201,8806,200000.0,9001,8807,0.0,9001,,,,,,
-2077,"ELD79 / UTM zone 32N",9001,4159,16032,9807,8801,0.0,9102,8802,9.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2078,"ELD79 / UTM zone 33N",9001,4159,16033,9807,8801,0.0,9102,8802,15.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2079,"ELD79 / UTM zone 34N",9001,4159,16034,9807,8801,0.0,9102,8802,21.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2080,"ELD79 / UTM zone 35N",9001,4159,16035,9807,8801,0.0,9102,8802,27.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2081,"Chos Malal 1914 / Argentina zone 2",9001,4160,18032,9807,8801,-90.0,9102,8802,-69.0,9102,8805,1.0,9201,8806,2500000.0,9001,8807,0.0,9001,,,,,,
-2082,"Pampa del Castillo / Argentina zone 2",9001,4161,18032,9807,8801,-90.0,9102,8802,-69.0,9102,8805,1.0,9201,8806,2500000.0,9001,8807,0.0,9001,,,,,,
-2083,"Hito XVIII 1963 / Argentina zone 2",9001,4254,18032,9807,8801,-90.0,9102,8802,-69.0,9102,8805,1.0,9201,8806,2500000.0,9001,8807,0.0,9001,,,,,,
-2084,"Hito XVIII 1963 / UTM zone 19S",9001,4254,16119,9807,8801,0.0,9102,8802,-69.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-2085,"NAD27 / Cuba Norte",9001,4267,18061,9801,8801,22.21,9110,8802,-81.0,9110,8805,0.99993602,9201,8806,500000.0,9001,8807,280296.016,9001,,,,,,
-2086,"NAD27 / Cuba Sur",9001,4267,18062,9801,8801,20.43,9110,8802,-76.5,9110,8805,0.99994848,9201,8806,500000.0,9001,8807,229126.939,9001,,,,,,
-2087,"ELD79 / TM 12 NE",9001,4159,16412,9807,8801,0.0,9102,8802,12.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2088,"Carthage / TM 11 NE",9001,4223,16411,9807,8801,0.0,9102,8802,11.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2089,"Yemen NGN96 / UTM zone 38N",9001,4163,16038,9807,8801,0.0,9102,8802,45.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2090,"Yemen NGN96 / UTM zone 39N",9001,4163,16039,9807,8801,0.0,9102,8802,51.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2091,"South Yemen / Gauss Kruger zone 8",9001,4164,16208,9807,8801,0.0,9102,8802,45.0,9102,8805,1.0,9201,8806,8500000.0,9001,8807,0.0,9001,,,,,,
-2092,"South Yemen / Gauss Kruger zone 9",9001,4164,16209,9807,8801,0.0,9102,8802,51.0,9102,8805,1.0,9201,8806,9500000.0,9001,8807,0.0,9001,,,,,,
-2093,"Hanoi 1972 / GK 106 NE",9001,4147,16586,9807,8801,0.0,9102,8802,106.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2094,"WGS 72BE / TM 106 NE",9001,4324,16506,9807,8801,0.0,9102,8802,106.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2095,"Bissau / UTM zone 28N",9001,4165,16028,9807,8801,0.0,9102,8802,-15.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2096,"Korean 1985 / Korea East Belt",9001,4162,18251,9807,8801,38.0,9102,8802,129.0,9102,8805,1.0,9201,8806,200000.0,9001,8807,500000.0,9001,,,,,,
-2097,"Korean 1985 / Korea Central Belt",9001,4162,18252,9807,8801,38.0,9102,8802,127.0,9102,8805,1.0,9201,8806,200000.0,9001,8807,500000.0,9001,,,,,,
-2098,"Korean 1985 / Korea West Belt",9001,4162,18253,9807,8801,38.0,9102,8802,125.0,9102,8805,1.0,9201,8806,200000.0,9001,8807,500000.0,9001,,,,,,
-2099,"Qatar 1948 / Qatar Grid",9001,4286,19953,9806,8801,25.22565,9110,8802,50.4541,9110,8806,100000.0,9001,8807,100000.0,9001,,,,,,,,,
-2100,"GGRS87 / Greek Grid",9001,4121,19930,9807,8801,0.0,9102,8802,24.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2101,"Lake / Maracaibo Grid M1",9001,4249,18260,9801,8801,10.1,9110,8802,-71.3620224,9110,8805,1.0,9201,8806,0.0,9001,8807,-52684.972,9001,,,,,,
-2102,"Lake / Maracaibo Grid",9001,4249,18261,9801,8801,10.1,9110,8802,-71.3620224,9110,8805,1.0,9201,8806,200000.0,9001,8807,147315.028,9001,,,,,,
-2103,"Lake / Maracaibo Grid M3",9001,4249,18262,9801,8801,10.1,9110,8802,-71.3620224,9110,8805,1.0,9201,8806,500000.0,9001,8807,447315.028,9001,,,,,,
-2104,"Lake / Maracaibo La Rosa Grid",9001,4249,18263,9801,8801,10.1,9110,8802,-71.3620224,9110,8805,1.0,9201,8806,-17044.0,9001,8807,-23139.97,9001,,,,,,
-2105,"NZGD2000 / Mount Eden Circuit 2000",9001,4167,17931,9807,8801,-36.5247,9110,8802,174.4551,9110,8805,0.9999,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-2106,"NZGD2000 / Bay of Plenty Circuit 2000",9001,4167,17932,9807,8801,-37.454,9110,8802,176.2758,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-2107,"NZGD2000 / Poverty Bay Circuit 2000",9001,4167,17933,9807,8801,-38.3728,9110,8802,177.5308,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-2108,"NZGD2000 / Hawkes Bay Circuit 2000",9001,4167,17934,9807,8801,-39.3903,9110,8802,176.4025,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-2109,"NZGD2000 / Taranaki Circuit 2000",9001,4167,17935,9807,8801,-39.0808,9110,8802,174.134,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-2110,"NZGD2000 / Tuhirangi Circuit 2000",9001,4167,17936,9807,8801,-39.3044,9110,8802,175.3824,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-2111,"NZGD2000 / Wanganui Circuit 2000",9001,4167,17937,9807,8801,-40.1431,9110,8802,175.2917,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-2112,"NZGD2000 / Wairarapa Circuit 2000",9001,4167,17938,9807,8801,-40.5531,9110,8802,175.385,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-2113,"NZGD2000 / Wellington Circuit 2000",9001,4167,17939,9807,8801,-41.1804,9110,8802,174.4635,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-2114,"NZGD2000 / Collingwood Circuit 2000",9001,4167,17940,9807,8801,-40.4253,9110,8802,172.4019,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-2115,"NZGD2000 / Nelson Circuit 2000",9001,4167,17941,9807,8801,-41.1628,9110,8802,173.1757,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-2116,"NZGD2000 / Karamea Circuit 2000",9001,4167,17942,9807,8801,-41.1723,9110,8802,172.0632,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-2117,"NZGD2000 / Buller Circuit 2000",9001,4167,17943,9807,8801,-41.4838,9110,8802,171.3452,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-2118,"NZGD2000 / Grey Circuit 2000",9001,4167,17944,9807,8801,-42.2001,9110,8802,171.3259,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-2119,"NZGD2000 / Amuri Circuit 2000",9001,4167,17945,9807,8801,-42.412,9110,8802,173.0036,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-2120,"NZGD2000 / Marlborough Circuit 2000",9001,4167,17946,9807,8801,-41.324,9110,8802,173.4807,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-2121,"NZGD2000 / Hokitika Circuit 2000",9001,4167,17947,9807,8801,-42.531,9110,8802,170.5847,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-2122,"NZGD2000 / Okarito Circuit 2000",9001,4167,17948,9807,8801,-43.0636,9110,8802,170.1539,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-2123,"NZGD2000 / Jacksons Bay Circuit 2000",9001,4167,17949,9807,8801,-43.584,9110,8802,168.3622,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-2124,"NZGD2000 / Mount Pleasant Circuit 2000",9001,4167,17950,9807,8801,-43.3526,9110,8802,172.4337,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-2125,"NZGD2000 / Gawler Circuit 2000",9001,4167,17951,9807,8801,-43.4455,9110,8802,171.2138,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-2126,"NZGD2000 / Timaru Circuit 2000",9001,4167,17952,9807,8801,-44.2407,9110,8802,171.0326,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-2127,"NZGD2000 / Lindis Peak Circuit 2000",9001,4167,17953,9807,8801,-44.4406,9110,8802,169.2803,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-2128,"NZGD2000 / Mount Nicholas Circuit 2000",9001,4167,17954,9807,8801,-45.0758,9110,8802,168.2355,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-2129,"NZGD2000 / Mount York Circuit 2000",9001,4167,17955,9807,8801,-45.3349,9110,8802,167.4419,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-2130,"NZGD2000 / Observation Point Circuit 2000",9001,4167,17956,9807,8801,-45.4858,9110,8802,170.3742,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-2131,"NZGD2000 / North Taieri Circuit 2000",9001,4167,17957,9807,8801,-45.5141,9110,8802,170.1657,9110,8805,0.99996,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-2132,"NZGD2000 / Bluff Circuit 2000",9001,4167,17958,9807,8801,-46.36,9110,8802,168.2034,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-2133,"NZGD2000 / UTM zone 58S",9001,4167,16158,9807,8801,0.0,9102,8802,165.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-2134,"NZGD2000 / UTM zone 59S",9001,4167,16159,9807,8801,0.0,9102,8802,171.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-2135,"NZGD2000 / UTM zone 60S",9001,4167,16160,9807,8801,0.0,9102,8802,177.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-2136,"Accra / Ghana National Grid",9094,4168,19959,9807,8801,4.4,9110,8802,-1.0,9110,8805,0.99975,9201,8806,900000.0,9094,8807,0.0,9094,,,,,,
-2137,"Accra / TM 1 NW",9001,4168,17001,9807,8801,0.0,9102,8802,-1.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2138,"NAD27(CGQ77) / Quebec Lambert",9001,4609,19944,9802,8821,44.0,9110,8822,-68.3,9110,8823,60.0,9110,8824,46.0,9110,8826,0.0,9001,8827,0.0,9001,,,
-2139,"NAD83(CSRS98) / SCoPQ zone 2",9001,4140,17700,9807,8801,0.0,9110,8802,-55.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-2140,"NAD83(CSRS98) / MTM zone 3",9001,4140,17703,9807,8801,0.0,9110,8802,-58.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-2141,"NAD83(CSRS98) / MTM zone 4",9001,4140,17704,9807,8801,0.0,9110,8802,-61.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-2142,"NAD83(CSRS98) / MTM zone 5",9001,4140,17705,9807,8801,0.0,9110,8802,-64.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-2143,"NAD83(CSRS98) / MTM zone 6",9001,4140,17706,9807,8801,0.0,9110,8802,-67.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-2144,"NAD83(CSRS98) / MTM zone 7",9001,4140,17707,9807,8801,0.0,9110,8802,-70.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-2145,"NAD83(CSRS98) / MTM zone 8",9001,4140,17708,9807,8801,0.0,9110,8802,-73.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-2146,"NAD83(CSRS98) / MTM zone 9",9001,4140,17709,9807,8801,0.0,9110,8802,-76.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-2147,"NAD83(CSRS98) / MTM zone 10",9001,4140,17710,9807,8801,0.0,9110,8802,-79.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-2148,"NAD83(CSRS98) / UTM zone 21N",9001,4140,16021,9807,8801,0.0,9102,8802,-57.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2149,"NAD83(CSRS98) / UTM zone 18N",9001,4140,16018,9807,8801,0.0,9102,8802,-75.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2150,"NAD83(CSRS98) / UTM zone 17N",9001,4140,16017,9807,8801,0.0,9102,8802,-81.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2151,"NAD83(CSRS98) / UTM zone 13N",9001,4140,16013,9807,8801,0.0,9102,8802,-105.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2152,"NAD83(CSRS98) / UTM zone 12N",9001,4140,16012,9807,8801,0.0,9102,8802,-111.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2153,"NAD83(CSRS98) / UTM zone 11N",9001,4140,16011,9807,8801,0.0,9102,8802,-117.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2154,"RGF93 / Lambert-93",9001,4171,18085,9802,8821,46.3,9110,8822,3.0,9110,8823,49.0,9110,8824,44.0,9110,8826,700000.0,9001,8827,6600000.0,9001,,,
-2155,"American Samoa 1962 / American Samoa Lambert",9003,4169,15300,9801,8801,-14.16,9110,8802,170.0,9110,8805,1.0,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-2156,"NAD83(HARN) / UTM zone 59S",9001,4152,16159,9807,8801,0.0,9102,8802,171.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-2157,"IRENET95 / Irish Transverse Mercator",9001,4173,19962,9807,8801,53.3,9110,8802,-8.0,9110,8805,0.99982,9201,8806,600000.0,9001,8807,750000.0,9001,,,,,,
-2158,"IRENET95 / UTM zone 29N",9001,4173,16029,9807,8801,0.0,9102,8802,-9.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2159,"Sierra Leone 1924 / New Colony Grid",9094,4174,19963,9807,8801,6.4,9110,8802,-12.0,9110,8805,1.0,9201,8806,500000.0,9094,8807,0.0,9094,,,,,,
-2160,"Sierra Leone 1924 / New War Office Grid",9094,4174,19964,9807,8801,6.4,9110,8802,-12.0,9110,8805,1.0,9201,8806,800000.0,9094,8807,600000.0,9094,,,,,,
-2161,"Sierra Leone 1968 / UTM zone 28N",9001,4175,16028,9807,8801,0.0,9102,8802,-15.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2162,"Sierra Leone 1968 / UTM zone 29N",9001,4175,16029,9807,8801,0.0,9102,8802,-9.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2163,US National Atlas Equal Area,9001,4047,19965,9821,8806,0.0,9001,8807,0.0,9001,8828,45.0,9102,8829,-100.0,9102,,,,,,,,,
-2164,"Locodjo 1965 / TM 5 NW",9001,4142,17005,9807,8801,0.0,9102,8802,-5.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2165,"Abidjan 1987 / TM 5 NW",9001,4143,17005,9807,8801,0.0,9102,8802,-5.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2166,"Pulkovo 1942(83) / Gauss Kruger zone 3",9001,4178,16263,9807,8801,0.0,9102,8802,9.0,9102,8805,1.0,9201,8806,3500000.0,9001,8807,0.0,9001,,,,,,
-2167,"Pulkovo 1942(83) / Gauss Kruger zone 4",9001,4178,16264,9807,8801,0.0,9102,8802,12.0,9102,8805,1.0,9201,8806,4500000.0,9001,8807,0.0,9001,,,,,,
-2168,"Pulkovo 1942(83) / Gauss Kruger zone 5",9001,4178,16265,9807,8801,0.0,9102,8802,15.0,9102,8805,1.0,9201,8806,5500000.0,9001,8807,0.0,9001,,,,,,
-2169,"Luxembourg 1930 / Gauss",9001,4181,19966,9807,8801,49.5,9110,8802,6.1,9110,8805,1.0,9201,8806,80000.0,9001,8807,100000.0,9001,,,,,,
-2170,"MGI / Slovenia Grid",9001,4312,19967,9807,8801,0.0,9110,8802,15.0,9110,8805,0.9999,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2171,"Pulkovo 1942(58) / Poland zone I",9001,4179,18281,9809,8801,50.373,9110,8802,21.05,9110,8805,0.9998,9201,8806,4637000.0,9001,8807,5647000.0,9001,,,,,,
-2172,"Pulkovo 1942(58) / Poland zone II",9001,4179,18282,9809,8801,53.0007,9110,8802,21.301,9110,8805,0.9998,9201,8806,4603000.0,9001,8807,5806000.0,9001,,,,,,
-2173,"Pulkovo 1942(58) / Poland zone III",9001,4179,18283,9809,8801,53.35,9110,8802,17.003,9110,8805,0.9998,9201,8806,3501000.0,9001,8807,5999000.0,9001,,,,,,
-2174,"Pulkovo 1942(58) / Poland zone IV",9001,4179,18284,9809,8801,51.4015,9110,8802,16.402,9110,8805,0.9998,9201,8806,3703000.0,9001,8807,5627000.0,9001,,,,,,
-2175,"Pulkovo 1942(58) / Poland zone V",9001,4179,18285,9807,8801,0.0,9110,8802,18.573,9110,8805,0.999983,9201,8806,237000.0,9001,8807,-4700000.0,9001,,,,,,
-2176,"ETRS89 / Poland CS2000 zone 5",9001,4258,18305,9807,8801,0.0,9102,8802,15.0,9102,8805,0.999923,9201,8806,5500000.0,9001,8807,0.0,9001,,,,,,
-2177,"ETRS89 / Poland CS2000 zone 6",9001,4258,18306,9807,8801,0.0,9102,8802,18.0,9102,8805,0.999923,9201,8806,6500000.0,9001,8807,0.0,9001,,,,,,
-2178,"ETRS89 / Poland CS2000 zone 7",9001,4258,18307,9807,8801,0.0,9102,8802,21.0,9102,8805,0.999923,9201,8806,7500000.0,9001,8807,0.0,9001,,,,,,
-2179,"ETRS89 / Poland CS2000 zone 8",9001,4258,18308,9807,8801,0.0,9102,8802,24.0,9102,8805,0.999923,9201,8806,8500000.0,9001,8807,0.0,9001,,,,,,
-2180,"ETRS89 / Poland CS92",9001,4258,18300,9807,8801,0.0,9102,8802,19.0,9102,8805,0.9993,9201,8806,500000.0,9001,8807,-5300000.0,9001,,,,,,
-2188,"Azores Occidental 1939 / UTM zone 25N",9001,4182,16025,9807,8801,0.0,9102,8802,-33.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2189,"Azores Central 1948 / UTM zone 26N",9001,4183,16026,9807,8801,0.0,9102,8802,-27.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2190,"Azores Oriental 1940 / UTM zone 26N",9001,4184,16026,9807,8801,0.0,9102,8802,-27.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2191,"Madeira 1936 / UTM zone 28N",9001,4185,16028,9807,8801,0.0,9102,8802,-15.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2192,"ED50 / France EuroLambert",9001,4230,18086,9801,8801,46.48,9110,8802,2.2014025,9110,8805,0.99987742,9201,8806,600000.0,9001,8807,2200000.0,9001,,,,,,
-2193,"NZGD2000 / New Zealand Transverse Mercator",9001,4167,19971,9807,8801,0.0,9102,8802,173.0,9102,8805,0.9996,9201,8806,1600000.0,9001,8807,10000000.0,9001,,,,,,
-2194,"American Samoa 1962 / American Samoa Lambert",9003,4169,15301,9801,8801,-14.16,9110,8802,-170.0,9110,8805,1.0,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-2195,"NAD83(HARN) / UTM zone 2S",9001,4152,16102,9807,8801,0.0,9102,8802,-171.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-2196,"ETRS89 / Kp2000 Jutland",9001,4258,18401,9807,8801,0.0,9110,8802,9.3,9110,8805,0.99995,9201,8806,200000.0,9001,8807,0.0,9001,,,,,,
-2197,"ETRS89 / Kp2000 Zealand",9001,4258,18402,9807,8801,0.0,9102,8802,12.0,9102,8805,0.99995,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2198,"ETRS89 / Kp2000 Bornholm",9001,4258,18403,9807,8801,0.0,9102,8802,15.0,9102,8805,1.0,9201,8806,900000.0,9001,8807,0.0,9001,,,,,,
-2199,"Albanian 1987 / Gauss Kruger zone 4",9001,4191,16204,9807,8801,0.0,9102,8802,21.0,9102,8805,1.0,9201,8806,4500000.0,9001,8807,0.0,9001,,,,,,
-2200,"ATS77 / New Brunswick Stereographic (ATS77)",9001,4122,19945,9809,8801,46.3,9110,8802,-66.3,9110,8805,0.999912,9201,8806,300000.0,9001,8807,800000.0,9001,,,,,,
-2201,"REGVEN / UTM zone 18N",9001,4189,16018,9807,8801,0.0,9102,8802,-75.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2202,"REGVEN / UTM zone 19N",9001,4189,16019,9807,8801,0.0,9102,8802,-69.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2203,"REGVEN / UTM zone 20N",9001,4189,16020,9807,8801,0.0,9102,8802,-63.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2204,"NAD27 / Tennessee",9003,4267,15302,9802,8821,34.4,9110,8822,-86.0,9110,8823,35.15,9110,8824,36.25,9110,8826,2000000.0,9003,8827,100000.0,9003,,,
-2205,"NAD83 / Kentucky North",9001,4269,15303,9802,8821,37.3,9110,8822,-84.15,9110,8823,37.58,9110,8824,38.58,9110,8826,500000.0,9001,8827,0.0,9001,,,
-2206,"ED50 / 3-degree Gauss-Kruger zone 9",9001,4230,16269,9807,8801,0.0,9102,8802,27.0,9102,8805,1.0,9201,8806,9500000.0,9001,8807,0.0,9001,,,,,,
-2207,"ED50 / 3-degree Gauss-Kruger zone 10",9001,4230,16270,9807,8801,0.0,9102,8802,30.0,9102,8805,1.0,9201,8806,10500000.0,9001,8807,0.0,9001,,,,,,
-2208,"ED50 / 3-degree Gauss-Kruger zone 11",9001,4230,16271,9807,8801,0.0,9102,8802,33.0,9102,8805,1.0,9201,8806,11500000.0,9001,8807,0.0,9001,,,,,,
-2209,"ED50 / 3-degree Gauss-Kruger zone 12",9001,4230,16272,9807,8801,0.0,9102,8802,36.0,9102,8805,1.0,9201,8806,12500000.0,9001,8807,0.0,9001,,,,,,
-2210,"ED50 / 3-degree Gauss-Kruger zone 13",9001,4230,16273,9807,8801,0.0,9102,8802,39.0,9102,8805,1.0,9201,8806,13500000.0,9001,8807,0.0,9001,,,,,,
-2211,"ED50 / 3-degree Gauss-Kruger zone 14",9001,4230,16274,9807,8801,0.0,9102,8802,42.0,9102,8805,1.0,9201,8806,14500000.0,9001,8807,0.0,9001,,,,,,
-2212,"ED50 / 3-degree Gauss-Kruger zone 15",9001,4230,16275,9807,8801,0.0,9102,8802,45.0,9102,8805,1.0,9201,8806,15500000.0,9001,8807,0.0,9001,,,,,,
-2213,"ETRS89 / TM 30 NE",9001,4258,16430,9807,8801,0.0,9102,8802,30.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2214,"Douala 1948 / AOF west",9001,4192,18415,9807,8801,0.0,9110,8802,10.3,9110,8805,0.999,9201,8806,1000000.0,9001,8807,1000000.0,9001,,,,,,
-2215,"Manoca 1962 / UTM zone 32N",9001,4193,16032,9807,8801,0.0,9102,8802,9.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2216,"Qornoq 1927 / UTM zone 22N",9001,4194,16022,9807,8801,0.0,9102,8802,-51.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2217,"Qornoq 1927 / UTM zone 23N",9001,4194,16023,9807,8801,0.0,9102,8802,-45.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2218,"Scoresbysund 1952 / Greenland zone 5 east",9001,4195,18425,9826,8801,70.3,9110,8802,-24.0,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2219,"ATS77 / UTM zone 19N",9001,4122,16019,9807,8801,0.0,9102,8802,-69.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2220,"ATS77 / UTM zone 20N",9001,4122,16020,9807,8801,0.0,9102,8802,-63.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2221,"Scoresbysund 1952 / Greenland zone 6 east",9001,4195,18426,9826,8801,67.3,9110,8802,-32.0,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2222,"NAD83 / Arizona East (ft)",9002,4269,15304,9807,8801,31.0,9110,8802,-110.1,9110,8805,0.9999,9201,8806,700000.0,9002,8807,0.0,9002,,,,,,
-2223,"NAD83 / Arizona Central (ft)",9002,4269,15305,9807,8801,31.0,9110,8802,-111.55,9110,8805,0.9999,9201,8806,700000.0,9002,8807,0.0,9002,,,,,,
-2224,"NAD83 / Arizona West (ft)",9002,4269,15306,9807,8801,31.0,9110,8802,-113.45,9110,8805,0.999933333,9201,8806,700000.0,9002,8807,0.0,9002,,,,,,
-2225,"NAD83 / California zone 1 (ftUS)",9003,4269,15307,9802,8821,39.2,9110,8822,-122.0,9110,8823,41.4,9110,8824,40.0,9110,8826,6561666.667,9003,8827,1640416.667,9003,,,
-2226,"NAD83 / California zone 2 (ftUS)",9003,4269,15308,9802,8821,37.4,9110,8822,-122.0,9110,8823,39.5,9110,8824,38.2,9110,8826,6561666.667,9003,8827,1640416.667,9003,,,
-2227,"NAD83 / California zone 3 (ftUS)",9003,4269,15309,9802,8821,36.3,9110,8822,-120.3,9110,8823,38.26,9110,8824,37.04,9110,8826,6561666.667,9003,8827,1640416.667,9003,,,
-2228,"NAD83 / California zone 4 (ftUS)",9003,4269,15310,9802,8821,35.2,9110,8822,-119.0,9110,8823,37.15,9110,8824,36.0,9110,8826,6561666.667,9003,8827,1640416.667,9003,,,
-2229,"NAD83 / California zone 5 (ftUS)",9003,4269,15311,9802,8821,33.3,9110,8822,-118.0,9110,8823,35.28,9110,8824,34.02,9110,8826,6561666.667,9003,8827,1640416.667,9003,,,
-2230,"NAD83 / California zone 6 (ftUS)",9003,4269,15312,9802,8821,32.1,9110,8822,-116.15,9110,8823,33.53,9110,8824,32.47,9110,8826,6561666.667,9003,8827,1640416.667,9003,,,
-2231,"NAD83 / Colorado North (ftUS)",9003,4269,15313,9802,8821,39.2,9110,8822,-105.3,9110,8823,40.47,9110,8824,39.43,9110,8826,3000000.0,9003,8827,1000000.0,9003,,,
-2232,"NAD83 / Colorado Central (ftUS)",9003,4269,15314,9802,8821,37.5,9110,8822,-105.3,9110,8823,39.45,9110,8824,38.27,9110,8826,3000000.0,9003,8827,1000000.0,9003,,,
-2233,"NAD83 / Colorado South (ftUS)",9003,4269,15315,9802,8821,36.4,9110,8822,-105.3,9110,8823,38.26,9110,8824,37.14,9110,8826,3000000.0,9003,8827,1000000.0,9003,,,
-2234,"NAD83 / Connecticut (ftUS)",9003,4269,15316,9802,8821,40.5,9110,8822,-72.45,9110,8823,41.52,9110,8824,41.12,9110,8826,1000000.0,9003,8827,500000.0,9003,,,
-2235,"NAD83 / Delaware (ftUS)",9003,4269,15317,9807,8801,38.0,9110,8802,-75.25,9110,8805,0.999995,9201,8806,656166.667,9003,8807,0.0,9003,,,,,,
-2236,"NAD83 / Florida East (ftUS)",9003,4269,15318,9807,8801,24.2,9110,8802,-81.0,9110,8805,0.999941177,9201,8806,656166.667,9003,8807,0.0,9003,,,,,,
-2237,"NAD83 / Florida West (ftUS)",9003,4269,15319,9807,8801,24.2,9110,8802,-82.0,9110,8805,0.999941177,9201,8806,656166.667,9003,8807,0.0,9003,,,,,,
-2238,"NAD83 / Florida North (ftUS)",9003,4269,15320,9802,8821,29.0,9110,8822,-84.3,9110,8823,30.45,9110,8824,29.35,9110,8826,1968500.0,9003,8827,0.0,9003,,,
-2239,"NAD83 / Georgia East (ftUS)",9003,4269,15321,9807,8801,30.0,9110,8802,-82.1,9110,8805,0.9999,9201,8806,656166.667,9003,8807,0.0,9003,,,,,,
-2240,"NAD83 / Georgia West (ftUS)",9003,4269,15322,9807,8801,30.0,9110,8802,-84.1,9110,8805,0.9999,9201,8806,2296583.333,9003,8807,0.0,9003,,,,,,
-2241,"NAD83 / Idaho East (ftUS)",9003,4269,15323,9807,8801,41.4,9110,8802,-112.1,9110,8805,0.999947368,9201,8806,656166.667,9003,8807,0.0,9003,,,,,,
-2242,"NAD83 / Idaho Central (ftUS)",9003,4269,15324,9807,8801,41.4,9110,8802,-114.0,9110,8805,0.999947368,9201,8806,1640416.667,9003,8807,0.0,9003,,,,,,
-2243,"NAD83 / Idaho West (ftUS)",9003,4269,15325,9807,8801,41.4,9110,8802,-115.45,9110,8805,0.999933333,9201,8806,2624666.667,9003,8807,0.0,9003,,,,,,
-2244,"NAD83 / Indiana East (ftUS)",9003,4269,15326,9807,8801,37.3,9110,8802,-85.4,9110,8805,0.999966667,9201,8806,328083.333,9003,8807,818125.0,9003,,,,,,
-2245,"NAD83 / Indiana West (ftUS)",9003,4269,15327,9807,8801,37.3,9110,8802,-87.05,9110,8805,0.999966667,9201,8806,2952750.0,9003,8807,818125.0,9003,,,,,,
-2246,"NAD83 / Kentucky North (ftUS)",9003,4269,15328,9802,8821,37.3,9110,8822,-84.15,9110,8823,37.58,9110,8824,38.58,9110,8826,1640416.667,9003,8827,0.0,9003,,,
-2247,"NAD83 / Kentucky South (ftUS)",9003,4269,15329,9802,8821,36.2,9110,8822,-85.45,9110,8823,37.56,9110,8824,36.44,9110,8826,1640416.667,9003,8827,1640416.667,9003,,,
-2248,"NAD83 / Maryland (ftUS)",9003,4269,15330,9802,8821,37.4,9110,8822,-77.0,9110,8823,39.27,9110,8824,38.18,9110,8826,1312333.333,9003,8827,0.0,9003,,,
-2249,"NAD83 / Massachusetts Mainland (ftUS)",9003,4269,15331,9802,8821,41.0,9110,8822,-71.3,9110,8823,42.41,9110,8824,41.43,9110,8826,656166.667,9003,8827,2460625.0,9003,,,
-2250,"NAD83 / Massachusetts Island (ftUS)",9003,4269,15332,9802,8821,41.0,9110,8822,-70.3,9110,8823,41.29,9110,8824,41.17,9110,8826,1640416.667,9003,8827,0.0,9003,,,
-2251,"NAD83 / Michigan North (ft)",9002,4269,15333,9802,8821,44.47,9110,8822,-87.0,9110,8823,47.05,9110,8824,45.29,9110,8826,26246719.16,9002,8827,0.0,9002,,,
-2252,"NAD83 / Michigan Central (ft)",9002,4269,15334,9802,8821,43.19,9110,8822,-84.22,9110,8823,45.42,9110,8824,44.11,9110,8826,19685039.37,9002,8827,0.0,9002,,,
-2253,"NAD83 / Michigan South (ft)",9002,4269,15335,9802,8821,41.3,9110,8822,-84.22,9110,8823,43.4,9110,8824,42.06,9110,8826,13123359.58,9002,8827,0.0,9002,,,
-2254,"NAD83 / Mississippi East (ftUS)",9003,4269,15336,9807,8801,29.3,9110,8802,-88.5,9110,8805,0.99995,9201,8806,984250.0,9003,8807,0.0,9003,,,,,,
-2255,"NAD83 / Mississippi West (ftUS)",9003,4269,15337,9807,8801,29.3,9110,8802,-90.2,9110,8805,0.99995,9201,8806,2296583.333,9003,8807,0.0,9003,,,,,,
-2256,"NAD83 / Montana (ft)",9002,4269,15338,9802,8821,44.15,9110,8822,-109.3,9110,8823,49.0,9110,8824,45.0,9110,8826,1968503.937,9002,8827,0.0,9002,,,
-2257,"NAD83 / New Mexico East (ftUS)",9003,4269,15339,9807,8801,31.0,9110,8802,-104.2,9110,8805,0.999909091,9201,8806,541337.5,9003,8807,0.0,9003,,,,,,
-2258,"NAD83 / New Mexico Central (ftUS)",9003,4269,15340,9807,8801,31.0,9110,8802,-106.15,9110,8805,0.9999,9201,8806,1640416.667,9003,8807,0.0,9003,,,,,,
-2259,"NAD83 / New Mexico West (ftUS)",9003,4269,15341,9807,8801,31.0,9110,8802,-107.5,9110,8805,0.999916667,9201,8806,2723091.667,9003,8807,0.0,9003,,,,,,
-2260,"NAD83 / New York East (ftUS)",9003,4269,15342,9807,8801,38.5,9110,8802,-74.3,9110,8805,0.9999,9201,8806,492125.0,9003,8807,0.0,9003,,,,,,
-2261,"NAD83 / New York Central (ftUS)",9003,4269,15343,9807,8801,40.0,9110,8802,-76.35,9110,8805,0.9999375,9201,8806,820208.333,9003,8807,0.0,9003,,,,,,
-2262,"NAD83 / New York West (ftUS)",9003,4269,15344,9807,8801,40.0,9110,8802,-78.35,9110,8805,0.9999375,9201,8806,1148291.667,9003,8807,0.0,9003,,,,,,
-2263,"NAD83 / New York Long Island (ftUS)",9003,4269,15345,9802,8821,40.1,9110,8822,-74.0,9110,8823,41.02,9110,8824,40.4,9110,8826,984250.0,9003,8827,0.0,9003,,,
-2264,"NAD83 / North Carolina (ftUS)",9003,4269,15346,9802,8821,33.45,9110,8822,-79.0,9110,8823,36.1,9110,8824,34.2,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-2265,"NAD83 / North Dakota North (ft)",9002,4269,15347,9802,8821,47.0,9110,8822,-100.3,9110,8823,48.44,9110,8824,47.26,9110,8826,1968503.937,9002,8827,0.0,9002,,,
-2266,"NAD83 / North Dakota South (ft)",9002,4269,15348,9802,8821,45.4,9110,8822,-100.3,9110,8823,47.29,9110,8824,46.11,9110,8826,1968503.937,9002,8827,0.0,9002,,,
-2267,"NAD83 / Oklahoma North (ftUS)",9003,4269,15349,9802,8821,35.0,9110,8822,-98.0,9110,8823,36.46,9110,8824,35.34,9110,8826,1968500.0,9003,8827,0.0,9003,,,
-2268,"NAD83 / Oklahoma South (ftUS)",9003,4269,15350,9802,8821,33.2,9110,8822,-98.0,9110,8823,35.14,9110,8824,33.56,9110,8826,1968500.0,9003,8827,0.0,9003,,,
-2269,"NAD83 / Oregon North (ft)",9002,4269,15351,9802,8821,43.4,9110,8822,-120.3,9110,8823,46.0,9110,8824,44.2,9110,8826,8202099.738,9002,8827,0.0,9002,,,
-2270,"NAD83 / Oregon South (ft)",9002,4269,15352,9802,8821,41.4,9110,8822,-120.3,9110,8823,44.0,9110,8824,42.2,9110,8826,4921259.843,9002,8827,0.0,9002,,,
-2271,"NAD83 / Pennsylvania North (ftUS)",9003,4269,15353,9802,8821,40.1,9110,8822,-77.45,9110,8823,41.57,9110,8824,40.53,9110,8826,1968500.0,9003,8827,0.0,9003,,,
-2272,"NAD83 / Pennsylvania South (ftUS)",9003,4269,15354,9802,8821,39.2,9110,8822,-77.45,9110,8823,40.58,9110,8824,39.56,9110,8826,1968500.0,9003,8827,0.0,9003,,,
-2273,"NAD83 / South Carolina (ft)",9002,4269,15355,9802,8821,31.5,9110,8822,-81.0,9110,8823,34.5,9110,8824,32.3,9110,8826,2000000.0,9002,8827,0.0,9002,,,
-2274,"NAD83 / Tennessee (ftUS)",9003,4269,15356,9802,8821,34.2,9110,8822,-86.0,9110,8823,36.25,9110,8824,35.15,9110,8826,1968500.0,9003,8827,0.0,9003,,,
-2275,"NAD83 / Texas North (ftUS)",9003,4269,15357,9802,8821,34.0,9110,8822,-101.3,9110,8823,36.11,9110,8824,34.39,9110,8826,656166.667,9003,8827,3280833.333,9003,,,
-2276,"NAD83 / Texas North Central (ftUS)",9003,4269,15358,9802,8821,31.4,9110,8822,-98.3,9110,8823,33.58,9110,8824,32.08,9110,8826,1968500.0,9003,8827,6561666.667,9003,,,
-2277,"NAD83 / Texas Central (ftUS)",9003,4269,15359,9802,8821,29.4,9110,8822,-100.2,9110,8823,31.53,9110,8824,30.07,9110,8826,2296583.333,9003,8827,9842500.0,9003,,,
-2278,"NAD83 / Texas South Central (ftUS)",9003,4269,15360,9802,8821,27.5,9110,8822,-99.0,9110,8823,30.17,9110,8824,28.23,9110,8826,1968500.0,9003,8827,13123333.333,9003,,,
-2279,"NAD83 / Texas South (ftUS)",9003,4269,15361,9802,8821,25.4,9110,8822,-98.3,9110,8823,27.5,9110,8824,26.1,9110,8826,984250.0,9003,8827,16404166.667,9003,,,
-2280,"NAD83 / Utah North (ft)",9002,4269,15362,9802,8821,40.2,9110,8822,-111.3,9110,8823,41.47,9110,8824,40.43,9110,8826,1640419.948,9002,8827,3280839.895,9002,,,
-2281,"NAD83 / Utah Central (ft)",9002,4269,15363,9802,8821,38.2,9110,8822,-111.3,9110,8823,40.39,9110,8824,39.01,9110,8826,1640419.948,9002,8827,6561679.79,9002,,,
-2282,"NAD83 / Utah South (ft)",9002,4269,15364,9802,8821,36.4,9110,8822,-111.3,9110,8823,38.21,9110,8824,37.13,9110,8826,1640419.948,9002,8827,9842519.685,9002,,,
-2283,"NAD83 / Virginia North (ftUS)",9003,4269,15365,9802,8821,37.4,9110,8822,-78.3,9110,8823,39.12,9110,8824,38.02,9110,8826,11482916.667,9003,8827,6561666.667,9003,,,
-2284,"NAD83 / Virginia South (ftUS)",9003,4269,15366,9802,8821,36.2,9110,8822,-78.3,9110,8823,37.58,9110,8824,36.46,9110,8826,11482916.667,9003,8827,3280833.333,9003,,,
-2285,"NAD83 / Washington North (ftUS)",9003,4269,15367,9802,8821,47.0,9110,8822,-120.5,9110,8823,48.44,9110,8824,47.3,9110,8826,1640416.667,9003,8827,0.0,9003,,,
-2286,"NAD83 / Washington South (ftUS)",9003,4269,15368,9802,8821,45.2,9110,8822,-120.3,9110,8823,47.2,9110,8824,45.5,9110,8826,1640416.667,9003,8827,0.0,9003,,,
-2287,"NAD83 / Wisconsin North (ftUS)",9003,4269,15369,9802,8821,45.1,9110,8822,-90.0,9110,8823,46.46,9110,8824,45.34,9110,8826,1968500.0,9003,8827,0.0,9003,,,
-2288,"NAD83 / Wisconsin Central (ftUS)",9003,4269,15370,9802,8821,43.5,9110,8822,-90.0,9110,8823,45.3,9110,8824,44.15,9110,8826,1968500.0,9003,8827,0.0,9003,,,
-2289,"NAD83 / Wisconsin South (ftUS)",9003,4269,15371,9802,8821,42.0,9110,8822,-90.0,9110,8823,44.04,9110,8824,42.44,9110,8826,1968500.0,9003,8827,0.0,9003,,,
-2290,"ATS77 / Prince Edward Isl. Stereographic (ATS77)",9001,4122,19933,9809,8801,47.15,9110,8802,-63.0,9110,8805,0.999912,9201,8806,700000.0,9001,8807,400000.0,9001,,,,,,
-2291,"NAD83(CSRS98) / Prince Edward Isl. Stereographic (NAD83)",9001,4122,19960,9809,8801,47.15,9110,8802,-63.0,9110,8805,0.999912,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-2292,"NAD83(CSRS98) / Prince Edward Isl. Stereographic (NAD83)",9001,4140,19960,9809,8801,47.15,9110,8802,-63.0,9110,8805,0.999912,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-2294,"ATS77 / MTM Nova Scotia zone 4",9001,4122,17794,9807,8801,0.0,9110,8802,-61.3,9110,8805,0.9999,9201,8806,4500000.0,9001,8807,0.0,9001,,,,,,
-2295,"ATS77 / MTM Nova Scotia zone 5",9001,4122,17795,9807,8801,0.0,9110,8802,-64.3,9110,8805,0.9999,9201,8806,5500000.0,9001,8807,0.0,9001,,,,,,
-2296,"Ammassalik 1958 / Greenland zone 7 east",9001,4196,18427,9826,8801,64.3,9110,8802,-40.0,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2297,"Qornoq 1927 / Greenland zone 1 east",9001,4194,18421,9826,8801,82.3,9110,8802,-40.0,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2298,"Qornoq 1927 / Greenland zone 2 east",9001,4194,18422,9826,8801,79.3,9110,8802,-24.0,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2299,"Qornoq 1927 / Greenland zone 2 west",9001,4194,18432,9826,8801,79.3,9110,8802,-64.0,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2300,"Qornoq 1927 / Greenland zone 3 east",9001,4194,18423,9826,8801,76.3,9110,8802,-20.0,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2301,"Qornoq 1927 / Greenland zone 3 west",9001,4194,18433,9826,8801,76.3,9110,8802,-64.0,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2302,"Qornoq 1927 / Greenland zone 4 east",9001,4194,18424,9826,8801,73.3,9110,8802,-24.0,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2303,"Qornoq 1927 / Greenland zone 4 west",9001,4194,18434,9826,8801,73.3,9110,8802,-52.0,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2304,"Qornoq 1927 / Greenland zone 5 west",9001,4194,18435,9826,8801,70.3,9110,8802,-52.0,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2305,"Qornoq 1927 / Greenland zone 6 west",9001,4194,18436,9826,8801,67.3,9110,8802,-52.0,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2306,"Qornoq 1927 / Greenland zone 7 west",9001,4194,18437,9826,8801,64.3,9110,8802,-52.0,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2307,"Qornoq 1927 / Greenland zone 8 east",9001,4194,18428,9826,8801,61.3,9110,8802,-48.0,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2308,"Batavia / TM 109 SE",9001,4211,16709,9807,8801,0.0,9102,8802,109.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-2309,"WGS 84 / TM 116 SE",9001,4326,16716,9807,8801,0.0,9102,8802,116.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-2310,"WGS 84 / TM 132 SE",9001,4326,16732,9807,8801,0.0,9102,8802,132.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-2311,"WGS 84 / TM 6 NE",9001,4326,16406,9807,8801,0.0,9102,8802,6.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2312,"Garoua / UTM zone 33N",9001,4197,16033,9807,8801,0.0,9102,8802,15.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2313,"Kousseri / UTM zone 33N",9001,4198,16033,9807,8801,0.0,9102,8802,15.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2314,"Trinidad 1903 / Trinidad Grid (ftCla)",9005,4302,19975,9806,8801,10.263,9110,8802,-61.2,9110,8806,283800.0,9005,8807,214500.0,9005,,,,,,,,,
-2315,"Campo Inchauspe / UTM zone 19S",9001,4221,16119,9807,8801,0.0,9102,8802,-69.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-2316,"Campo Inchauspe / UTM zone 20S",9001,4221,16120,9807,8801,0.0,9102,8802,-63.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-2317,"PSAD56 / ICN Regional",9001,4248,19976,9802,8821,6.0,9102,8822,-66.0,9102,8823,9.0,9102,8824,3.0,9102,8826,1000000.0,9001,8827,1000000.0,9001,,,
-2318,"Ain el Abd / Aramco Lambert",9001,4204,19977,9802,8821,25.0522236,9110,8822,48.0,9102,8823,17.0,9102,8824,33.0,9102,8826,0.0,9001,8827,0.0,9001,,,
-2319,"ED50 / TM27",9001,4230,16369,9807,8801,0.0,9102,8802,27.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2320,"ED50 / TM30",9001,4230,16370,9807,8801,0.0,9102,8802,30.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2321,"ED50 / TM33",9001,4230,16371,9807,8801,0.0,9102,8802,33.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2322,"ED50 / TM36",9001,4230,16372,9807,8801,0.0,9102,8802,36.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2323,"ED50 / TM39",9001,4230,16373,9807,8801,0.0,9102,8802,39.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2324,"ED50 / TM42",9001,4230,16374,9807,8801,0.0,9102,8802,42.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2325,"ED50 / TM45",9001,4230,16375,9807,8801,0.0,9102,8802,45.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2326,Hong Kong 1980 Grid System,9001,4611,19978,9807,8801,22.184368,9110,8802,114.10428,9110,8805,1.0,9201,8806,836694.05,9001,8807,819069.8,9001,,,,,,
-2327,"Xian 1980 / Gauss-Kruger zone 13",9001,4610,16213,9807,8801,0.0,9102,8802,75.0,9102,8805,1.0,9201,8806,13500000.0,9001,8807,0.0,9001,,,,,,
-2328,"Xian 1980 / Gauss-Kruger zone 14",9001,4610,16214,9807,8801,0.0,9102,8802,81.0,9102,8805,1.0,9201,8806,14500000.0,9001,8807,0.0,9001,,,,,,
-2329,"Xian 1980 / Gauss-Kruger zone 15",9001,4610,16215,9807,8801,0.0,9102,8802,87.0,9102,8805,1.0,9201,8806,15500000.0,9001,8807,0.0,9001,,,,,,
-2330,"Xian 1980 / Gauss-Kruger zone 16",9001,4610,16216,9807,8801,0.0,9102,8802,93.0,9102,8805,1.0,9201,8806,16500000.0,9001,8807,0.0,9001,,,,,,
-2331,"Xian 1980 / Gauss-Kruger zone 17",9001,4610,16217,9807,8801,0.0,9102,8802,99.0,9102,8805,1.0,9201,8806,17500000.0,9001,8807,0.0,9001,,,,,,
-2332,"Xian 1980 / Gauss-Kruger zone 18",9001,4610,16218,9807,8801,0.0,9102,8802,105.0,9102,8805,1.0,9201,8806,18500000.0,9001,8807,0.0,9001,,,,,,
-2333,"Xian 1980 / Gauss-Kruger zone 19",9001,4610,16219,9807,8801,0.0,9102,8802,111.0,9102,8805,1.0,9201,8806,19500000.0,9001,8807,0.0,9001,,,,,,
-2334,"Xian 1980 / Gauss-Kruger zone 20",9001,4610,16220,9807,8801,0.0,9102,8802,117.0,9102,8805,1.0,9201,8806,20500000.0,9001,8807,0.0,9001,,,,,,
-2335,"Xian 1980 / Gauss-Kruger zone 21",9001,4610,16221,9807,8801,0.0,9102,8802,123.0,9102,8805,1.0,9201,8806,21500000.0,9001,8807,0.0,9001,,,,,,
-2336,"Xian 1980 / Gauss-Kruger zone 22",9001,4610,16222,9807,8801,0.0,9102,8802,129.0,9102,8805,1.0,9201,8806,22500000.0,9001,8807,0.0,9001,,,,,,
-2337,"Xian 1980 / Gauss-Kruger zone 23",9001,4610,16223,9807,8801,0.0,9102,8802,135.0,9102,8805,1.0,9201,8806,23500000.0,9001,8807,0.0,9001,,,,,,
-2338,"Xian 1980 / Gauss-Kruger CM 75E",9001,4610,16313,9807,8801,0.0,9102,8802,75.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2339,"Xian 1980 / Gauss-Kruger CM 81E",9001,4610,16314,9807,8801,0.0,9102,8802,81.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2340,"Xian 1980 / Gauss-Kruger CM 87E",9001,4610,16315,9807,8801,0.0,9102,8802,87.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2341,"Xian 1980 / Gauss-Kruger CM 93E",9001,4610,16316,9807,8801,0.0,9102,8802,93.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2342,"Xian 1980 / Gauss-Kruger CM 99E",9001,4610,16317,9807,8801,0.0,9102,8802,99.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2343,"Xian 1980 / Gauss-Kruger CM 105E",9001,4610,16318,9807,8801,0.0,9102,8802,105.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2344,"Xian 1980 / Gauss-Kruger CM 111E",9001,4610,16319,9807,8801,0.0,9102,8802,111.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2345,"Xian 1980 / Gauss-Kruger CM 117E",9001,4610,16320,9807,8801,0.0,9102,8802,117.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2346,"Xian 1980 / Gauss-Kruger CM 123E",9001,4610,16321,9807,8801,0.0,9102,8802,123.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2347,"Xian 1980 / Gauss-Kruger CM 129E",9001,4610,16322,9807,8801,0.0,9102,8802,129.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2348,"Xian 1980 / Gauss-Kruger CM 135E",9001,4610,16323,9807,8801,0.0,9102,8802,135.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2349,"Xian 1980 / 3-degree Gauss-Kruger zone 25",9001,4610,16285,9807,8801,0.0,9102,8802,75.0,9102,8805,1.0,9201,8806,25500000.0,9001,8807,0.0,9001,,,,,,
-2350,"Xian 1980 / 3-degree Gauss-Kruger zone 26",9001,4610,16286,9807,8801,0.0,9102,8802,78.0,9102,8805,1.0,9201,8806,26500000.0,9001,8807,0.0,9001,,,,,,
-2351,"Xian 1980 / 3-degree Gauss-Kruger zone 27",9001,4610,16287,9807,8801,0.0,9102,8802,81.0,9102,8805,1.0,9201,8806,27500000.0,9001,8807,0.0,9001,,,,,,
-2352,"Xian 1980 / 3-degree Gauss-Kruger zone 28",9001,4610,16288,9807,8801,0.0,9102,8802,84.0,9102,8805,1.0,9201,8806,28500000.0,9001,8807,0.0,9001,,,,,,
-2353,"Xian 1980 / 3-degree Gauss-Kruger zone 29",9001,4610,16289,9807,8801,0.0,9102,8802,87.0,9102,8805,1.0,9201,8806,29500000.0,9001,8807,0.0,9001,,,,,,
-2354,"Xian 1980 / 3-degree Gauss-Kruger zone 30",9001,4610,16290,9807,8801,0.0,9102,8802,90.0,9102,8805,1.0,9201,8806,30500000.0,9001,8807,0.0,9001,,,,,,
-2355,"Xian 1980 / 3-degree Gauss-Kruger zone 31",9001,4610,16291,9807,8801,0.0,9102,8802,93.0,9102,8805,1.0,9201,8806,31500000.0,9001,8807,0.0,9001,,,,,,
-2356,"Xian 1980 / 3-degree Gauss-Kruger zone 32",9001,4610,16292,9807,8801,0.0,9102,8802,96.0,9102,8805,1.0,9201,8806,32500000.0,9001,8807,0.0,9001,,,,,,
-2357,"Xian 1980 / 3-degree Gauss-Kruger zone 33",9001,4610,16293,9807,8801,0.0,9102,8802,99.0,9102,8805,1.0,9201,8806,33500000.0,9001,8807,0.0,9001,,,,,,
-2358,"Xian 1980 / 3-degree Gauss-Kruger zone 34",9001,4610,16294,9807,8801,0.0,9102,8802,102.0,9102,8805,1.0,9201,8806,34500000.0,9001,8807,0.0,9001,,,,,,
-2359,"Xian 1980 / 3-degree Gauss-Kruger zone 35",9001,4610,16295,9807,8801,0.0,9102,8802,105.0,9102,8805,1.0,9201,8806,35500000.0,9001,8807,0.0,9001,,,,,,
-2360,"Xian 1980 / 3-degree Gauss-Kruger zone 36",9001,4610,16296,9807,8801,0.0,9102,8802,108.0,9102,8805,1.0,9201,8806,36500000.0,9001,8807,0.0,9001,,,,,,
-2361,"Xian 1980 / 3-degree Gauss-Kruger zone 37",9001,4610,16297,9807,8801,0.0,9102,8802,111.0,9102,8805,1.0,9201,8806,37500000.0,9001,8807,0.0,9001,,,,,,
-2362,"Xian 1980 / 3-degree Gauss-Kruger zone 38",9001,4610,16298,9807,8801,0.0,9102,8802,114.0,9102,8805,1.0,9201,8806,38500000.0,9001,8807,0.0,9001,,,,,,
-2363,"Xian 1980 / 3-degree Gauss-Kruger zone 39",9001,4610,16299,9807,8801,0.0,9102,8802,117.0,9102,8805,1.0,9201,8806,39500000.0,9001,8807,0.0,9001,,,,,,
-2364,"Xian 1980 / 3-degree Gauss-Kruger zone 40",9001,4610,16070,9807,8801,0.0,9102,8802,120.0,9102,8805,1.0,9201,8806,40500000.0,9001,8807,0.0,9001,,,,,,
-2365,"Xian 1980 / 3-degree Gauss-Kruger zone 41",9001,4610,16071,9807,8801,0.0,9102,8802,123.0,9102,8805,1.0,9201,8806,41500000.0,9001,8807,0.0,9001,,,,,,
-2366,"Xian 1980 / 3-degree Gauss-Kruger zone 42",9001,4610,16072,9807,8801,0.0,9102,8802,126.0,9102,8805,1.0,9201,8806,42500000.0,9001,8807,0.0,9001,,,,,,
-2367,"Xian 1980 / 3-degree Gauss-Kruger zone 43",9001,4610,16073,9807,8801,0.0,9102,8802,129.0,9102,8805,1.0,9201,8806,43500000.0,9001,8807,0.0,9001,,,,,,
-2368,"Xian 1980 / 3-degree Gauss-Kruger zone 44",9001,4610,16074,9807,8801,0.0,9102,8802,132.0,9102,8805,1.0,9201,8806,44500000.0,9001,8807,0.0,9001,,,,,,
-2369,"Xian 1980 / 3-degree Gauss-Kruger zone 45",9001,4610,16075,9807,8801,0.0,9102,8802,135.0,9102,8805,1.0,9201,8806,45500000.0,9001,8807,0.0,9001,,,,,,
-2370,"Xian 1980 / 3-degree Gauss-Kruger CM 75E",9001,4610,16385,9807,8801,0.0,9102,8802,75.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2371,"Xian 1980 / 3-degree Gauss-Kruger CM 78E",9001,4610,16386,9807,8801,0.0,9102,8802,78.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2372,"Xian 1980 / 3-degree Gauss-Kruger CM 81E",9001,4610,16387,9807,8801,0.0,9102,8802,81.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2373,"Xian 1980 / 3-degree Gauss-Kruger CM 84E",9001,4610,16388,9807,8801,0.0,9102,8802,84.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2374,"Xian 1980 / 3-degree Gauss-Kruger CM 87E",9001,4610,16389,9807,8801,0.0,9102,8802,87.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2375,"Xian 1980 / 3-degree Gauss-Kruger CM 90E",9001,4610,16390,9807,8801,0.0,9102,8802,90.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2376,"Xian 1980 / 3-degree Gauss-Kruger CM 93E",9001,4610,16391,9807,8801,0.0,9102,8802,93.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2377,"Xian 1980 / 3-degree Gauss-Kruger CM 96E",9001,4610,16392,9807,8801,0.0,9102,8802,96.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2378,"Xian 1980 / 3-degree Gauss-Kruger CM 99E",9001,4610,16393,9807,8801,0.0,9102,8802,99.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2379,"Xian 1980 / 3-degree Gauss-Kruger CM 102E",9001,4610,16394,9807,8801,0.0,9102,8802,102.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2380,"Xian 1980 / 3-degree Gauss-Kruger CM 105E",9001,4610,16395,9807,8801,0.0,9102,8802,105.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2381,"Xian 1980 / 3-degree Gauss-Kruger CM 108E",9001,4610,16396,9807,8801,0.0,9102,8802,108.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2382,"Xian 1980 / 3-degree Gauss-Kruger CM 111E",9001,4610,16397,9807,8801,0.0,9102,8802,111.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2383,"Xian 1980 / 3-degree Gauss-Kruger CM 114E",9001,4610,16398,9807,8801,0.0,9102,8802,114.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2384,"Xian 1980 / 3-degree Gauss-Kruger CM 117E",9001,4610,16399,9807,8801,0.0,9102,8802,117.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2385,"Xian 1980 / 3-degree Gauss-Kruger CM 120E",9001,4610,16170,9807,8801,0.0,9102,8802,120.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2386,"Xian 1980 / 3-degree Gauss-Kruger CM 123E",9001,4610,16171,9807,8801,0.0,9102,8802,123.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2387,"Xian 1980 / 3-degree Gauss-Kruger CM 126E",9001,4610,16172,9807,8801,0.0,9102,8802,126.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2388,"Xian 1980 / 3-degree Gauss-Kruger CM 129E",9001,4610,16173,9807,8801,0.0,9102,8802,129.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2389,"Xian 1980 / 3-degree Gauss-Kruger CM 132E",9001,4610,16174,9807,8801,0.0,9102,8802,132.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2390,"Xian 1980 / 3-degree Gauss-Kruger CM 135E",9001,4610,16175,9807,8801,0.0,9102,8802,135.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2391,"KKJ / Finland zone 1",9001,4123,18191,9807,8801,0.0,9102,8802,21.0,9102,8805,1.0,9201,8806,1500000.0,9001,8807,0.0,9001,,,,,,
-2392,"KKJ / Finland zone 2",9001,4123,18192,9807,8801,0.0,9102,8802,24.0,9102,8805,1.0,9201,8806,2500000.0,9001,8807,0.0,9001,,,,,,
-2393,"KKJ / Finland Uniform Coordinate System",9001,4123,18193,9807,8801,0.0,9102,8802,27.0,9102,8805,1.0,9201,8806,3500000.0,9001,8807,0.0,9001,,,,,,
-2394,"KKJ / Finland zone 4",9001,4123,18194,9807,8801,0.0,9102,8802,30.0,9102,8805,1.0,9201,8806,4500000.0,9001,8807,0.0,9001,,,,,,
-2395,"South Yemen / Gauss-Kruger zone 8",9001,4164,16208,9807,8801,0.0,9102,8802,45.0,9102,8805,1.0,9201,8806,8500000.0,9001,8807,0.0,9001,,,,,,
-2396,"South Yemen / Gauss-Kruger zone 9",9001,4164,16209,9807,8801,0.0,9102,8802,51.0,9102,8805,1.0,9201,8806,9500000.0,9001,8807,0.0,9001,,,,,,
-2397,"Pulkovo 1942(83) / Gauss-Kruger zone 3",9001,4178,16263,9807,8801,0.0,9102,8802,9.0,9102,8805,1.0,9201,8806,3500000.0,9001,8807,0.0,9001,,,,,,
-2398,"Pulkovo 1942(83) / Gauss-Kruger zone 4",9001,4178,16264,9807,8801,0.0,9102,8802,12.0,9102,8805,1.0,9201,8806,4500000.0,9001,8807,0.0,9001,,,,,,
-2399,"Pulkovo 1942(83) / Gauss-Kruger zone 5",9001,4178,16265,9807,8801,0.0,9102,8802,15.0,9102,8805,1.0,9201,8806,5500000.0,9001,8807,0.0,9001,,,,,,
-2400,RT90 2.5 gon W,9001,4124,19929,9807,8801,0.0,9110,8802,15.48298,9110,8805,1.0,9201,8806,1500000.0,9001,8807,0.0,9001,,,,,,
-2401,"Beijing 1954 / 3-degree Gauss-Kruger zone 25",9001,4214,16285,9807,8801,0.0,9102,8802,75.0,9102,8805,1.0,9201,8806,25500000.0,9001,8807,0.0,9001,,,,,,
-2402,"Beijing 1954 / 3-degree Gauss-Kruger zone 26",9001,4214,16286,9807,8801,0.0,9102,8802,78.0,9102,8805,1.0,9201,8806,26500000.0,9001,8807,0.0,9001,,,,,,
-2403,"Beijing 1954 / 3-degree Gauss-Kruger zone 27",9001,4214,16287,9807,8801,0.0,9102,8802,81.0,9102,8805,1.0,9201,8806,27500000.0,9001,8807,0.0,9001,,,,,,
-2404,"Beijing 1954 / 3-degree Gauss-Kruger zone 28",9001,4214,16288,9807,8801,0.0,9102,8802,84.0,9102,8805,1.0,9201,8806,28500000.0,9001,8807,0.0,9001,,,,,,
-2405,"Beijing 1954 / 3-degree Gauss-Kruger zone 29",9001,4214,16289,9807,8801,0.0,9102,8802,87.0,9102,8805,1.0,9201,8806,29500000.0,9001,8807,0.0,9001,,,,,,
-2406,"Beijing 1954 / 3-degree Gauss-Kruger zone 30",9001,4214,16290,9807,8801,0.0,9102,8802,90.0,9102,8805,1.0,9201,8806,30500000.0,9001,8807,0.0,9001,,,,,,
-2407,"Beijing 1954 / 3-degree Gauss-Kruger zone 31",9001,4214,16291,9807,8801,0.0,9102,8802,93.0,9102,8805,1.0,9201,8806,31500000.0,9001,8807,0.0,9001,,,,,,
-2408,"Beijing 1954 / 3-degree Gauss-Kruger zone 32",9001,4214,16292,9807,8801,0.0,9102,8802,96.0,9102,8805,1.0,9201,8806,32500000.0,9001,8807,0.0,9001,,,,,,
-2409,"Beijing 1954 / 3-degree Gauss-Kruger zone 33",9001,4214,16293,9807,8801,0.0,9102,8802,99.0,9102,8805,1.0,9201,8806,33500000.0,9001,8807,0.0,9001,,,,,,
-2410,"Beijing 1954 / 3-degree Gauss-Kruger zone 34",9001,4214,16294,9807,8801,0.0,9102,8802,102.0,9102,8805,1.0,9201,8806,34500000.0,9001,8807,0.0,9001,,,,,,
-2411,"Beijing 1954 / 3-degree Gauss-Kruger zone 35",9001,4214,16295,9807,8801,0.0,9102,8802,105.0,9102,8805,1.0,9201,8806,35500000.0,9001,8807,0.0,9001,,,,,,
-2412,"Beijing 1954 / 3-degree Gauss-Kruger zone 36",9001,4214,16296,9807,8801,0.0,9102,8802,108.0,9102,8805,1.0,9201,8806,36500000.0,9001,8807,0.0,9001,,,,,,
-2413,"Beijing 1954 / 3-degree Gauss-Kruger zone 37",9001,4214,16297,9807,8801,0.0,9102,8802,111.0,9102,8805,1.0,9201,8806,37500000.0,9001,8807,0.0,9001,,,,,,
-2414,"Beijing 1954 / 3-degree Gauss-Kruger zone 38",9001,4214,16298,9807,8801,0.0,9102,8802,114.0,9102,8805,1.0,9201,8806,38500000.0,9001,8807,0.0,9001,,,,,,
-2415,"Beijing 1954 / 3-degree Gauss-Kruger zone 39",9001,4214,16299,9807,8801,0.0,9102,8802,117.0,9102,8805,1.0,9201,8806,39500000.0,9001,8807,0.0,9001,,,,,,
-2416,"Beijing 1954 / 3-degree Gauss-Kruger zone 40",9001,4214,16070,9807,8801,0.0,9102,8802,120.0,9102,8805,1.0,9201,8806,40500000.0,9001,8807,0.0,9001,,,,,,
-2417,"Beijing 1954 / 3-degree Gauss-Kruger zone 41",9001,4214,16071,9807,8801,0.0,9102,8802,123.0,9102,8805,1.0,9201,8806,41500000.0,9001,8807,0.0,9001,,,,,,
-2418,"Beijing 1954 / 3-degree Gauss-Kruger zone 42",9001,4214,16072,9807,8801,0.0,9102,8802,126.0,9102,8805,1.0,9201,8806,42500000.0,9001,8807,0.0,9001,,,,,,
-2419,"Beijing 1954 / 3-degree Gauss-Kruger zone 43",9001,4214,16073,9807,8801,0.0,9102,8802,129.0,9102,8805,1.0,9201,8806,43500000.0,9001,8807,0.0,9001,,,,,,
-2420,"Beijing 1954 / 3-degree Gauss-Kruger zone 44",9001,4214,16074,9807,8801,0.0,9102,8802,132.0,9102,8805,1.0,9201,8806,44500000.0,9001,8807,0.0,9001,,,,,,
-2421,"Beijing 1954 / 3-degree Gauss-Kruger zone 45",9001,4214,16075,9807,8801,0.0,9102,8802,135.0,9102,8805,1.0,9201,8806,45500000.0,9001,8807,0.0,9001,,,,,,
-2422,"Beijing 1954 / 3-degree Gauss-Kruger CM 75E",9001,4214,16385,9807,8801,0.0,9102,8802,75.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2423,"Beijing 1954 / 3-degree Gauss-Kruger CM 78E",9001,4214,16386,9807,8801,0.0,9102,8802,78.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2424,"Beijing 1954 / 3-degree Gauss-Kruger CM 81E",9001,4214,16387,9807,8801,0.0,9102,8802,81.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2425,"Beijing 1954 / 3-degree Gauss-Kruger CM 84E",9001,4214,16388,9807,8801,0.0,9102,8802,84.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2426,"Beijing 1954 / 3-degree Gauss-Kruger CM 87E",9001,4214,16389,9807,8801,0.0,9102,8802,87.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2427,"Beijing 1954 / 3-degree Gauss-Kruger CM 90E",9001,4214,16390,9807,8801,0.0,9102,8802,90.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2428,"Beijing 1954 / 3-degree Gauss-Kruger CM 93E",9001,4214,16391,9807,8801,0.0,9102,8802,93.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2429,"Beijing 1954 / 3-degree Gauss-Kruger CM 96E",9001,4214,16392,9807,8801,0.0,9102,8802,96.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2430,"Beijing 1954 / 3-degree Gauss-Kruger CM 99E",9001,4214,16393,9807,8801,0.0,9102,8802,99.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2431,"Beijing 1954 / 3-degree Gauss-Kruger CM 102E",9001,4214,16394,9807,8801,0.0,9102,8802,102.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2432,"Beijing 1954 / 3-degree Gauss-Kruger CM 105E",9001,4214,16395,9807,8801,0.0,9102,8802,105.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2433,"Beijing 1954 / 3-degree Gauss-Kruger CM 108E",9001,4214,16396,9807,8801,0.0,9102,8802,108.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2434,"Beijing 1954 / 3-degree Gauss-Kruger CM 111E",9001,4214,16397,9807,8801,0.0,9102,8802,111.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2435,"Beijing 1954 / 3-degree Gauss-Kruger CM 114E",9001,4214,16398,9807,8801,0.0,9102,8802,114.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2436,"Beijing 1954 / 3-degree Gauss-Kruger CM 117E",9001,4214,16399,9807,8801,0.0,9102,8802,117.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2437,"Beijing 1954 / 3-degree Gauss-Kruger CM 120E",9001,4214,16170,9807,8801,0.0,9102,8802,120.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2438,"Beijing 1954 / 3-degree Gauss-Kruger CM 123E",9001,4214,16171,9807,8801,0.0,9102,8802,123.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2439,"Beijing 1954 / 3-degree Gauss-Kruger CM 126E",9001,4214,16172,9807,8801,0.0,9102,8802,126.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2440,"Beijing 1954 / 3-degree Gauss-Kruger CM 129E",9001,4214,16173,9807,8801,0.0,9102,8802,129.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2441,"Beijing 1954 / 3-degree Gauss-Kruger CM 132E",9001,4214,16174,9807,8801,0.0,9102,8802,132.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2442,"Beijing 1954 / 3-degree Gauss-Kruger CM 135E",9001,4214,16175,9807,8801,0.0,9102,8802,135.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2443,"JGD2000 / Japan Plane Rectangular CS I",9001,4612,17801,9807,8801,33.0,9110,8802,129.3,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2444,"JGD2000 / Japan Plane Rectangular CS II",9001,4612,17802,9807,8801,33.0,9110,8802,131.0,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2445,"JGD2000 / Japan Plane Rectangular CS III",9001,4612,17803,9807,8801,36.0,9110,8802,132.1,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2446,"JGD2000 / Japan Plane Rectangular CS IV",9001,4612,17804,9807,8801,33.0,9110,8802,133.3,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2447,"JGD2000 / Japan Plane Rectangular CS V",9001,4612,17805,9807,8801,36.0,9110,8802,134.2,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2448,"JGD2000 / Japan Plane Rectangular CS VI",9001,4612,17806,9807,8801,36.0,9110,8802,136.0,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2449,"JGD2000 / Japan Plane Rectangular CS VII",9001,4612,17807,9807,8801,36.0,9110,8802,137.1,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2450,"JGD2000 / Japan Plane Rectangular CS VIII",9001,4612,17808,9807,8801,36.0,9110,8802,138.3,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2451,"JGD2000 / Japan Plane Rectangular CS IX",9001,4612,17809,9807,8801,36.0,9110,8802,139.5,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2452,"JGD2000 / Japan Plane Rectangular CS X",9001,4612,17810,9807,8801,40.0,9110,8802,140.5,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2453,"JGD2000 / Japan Plane Rectangular CS XI",9001,4612,17811,9807,8801,44.0,9110,8802,140.15,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2454,"JGD2000 / Japan Plane Rectangular CS XII",9001,4612,17812,9807,8801,44.0,9110,8802,142.15,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2455,"JGD2000 / Japan Plane Rectangular CS XIII",9001,4612,17813,9807,8801,44.0,9110,8802,144.15,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2456,"JGD2000 / Japan Plane Rectangular CS XIV",9001,4612,17814,9807,8801,26.0,9110,8802,142.0,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2457,"JGD2000 / Japan Plane Rectangular CS XV",9001,4612,17815,9807,8801,26.0,9110,8802,127.3,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2458,"JGD2000 / Japan Plane Rectangular CS XVI",9001,4612,17816,9807,8801,26.0,9110,8802,124.0,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2459,"JGD2000 / Japan Plane Rectangular CS XVII",9001,4612,17817,9807,8801,26.0,9110,8802,131.0,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2460,"JGD2000 / Japan Plane Rectangular CS XVIII",9001,4612,17818,9807,8801,20.0,9110,8802,136.0,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2461,"JGD2000 / Japan Plane Rectangular CS XIX",9001,4612,17819,9807,8801,26.0,9110,8802,154.0,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-2462,"Albanian 1987 / Gauss-Kruger zone 4",9001,4191,16204,9807,8801,0.0,9102,8802,21.0,9102,8805,1.0,9201,8806,4500000.0,9001,8807,0.0,9001,,,,,,
-2463,"Pulkovo 1995 / Gauss-Kruger CM 21E",9001,4200,16304,9807,8801,0.0,9102,8802,21.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2464,"Pulkovo 1995 / Gauss-Kruger CM 27E",9001,4200,16305,9807,8801,0.0,9102,8802,27.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2465,"Pulkovo 1995 / Gauss-Kruger CM 33E",9001,4200,16306,9807,8801,0.0,9102,8802,33.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2466,"Pulkovo 1995 / Gauss-Kruger CM 39E",9001,4200,16307,9807,8801,0.0,9102,8802,39.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2467,"Pulkovo 1995 / Gauss-Kruger CM 45E",9001,4200,16308,9807,8801,0.0,9102,8802,45.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2468,"Pulkovo 1995 / Gauss-Kruger CM 51E",9001,4200,16309,9807,8801,0.0,9102,8802,51.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2469,"Pulkovo 1995 / Gauss-Kruger CM 57E",9001,4200,16310,9807,8801,0.0,9102,8802,57.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2470,"Pulkovo 1995 / Gauss-Kruger CM 63E",9001,4200,16311,9807,8801,0.0,9102,8802,63.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2471,"Pulkovo 1995 / Gauss-Kruger CM 69E",9001,4200,16312,9807,8801,0.0,9102,8802,69.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2472,"Pulkovo 1995 / Gauss-Kruger CM 75E",9001,4200,16313,9807,8801,0.0,9102,8802,75.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2473,"Pulkovo 1995 / Gauss-Kruger CM 81E",9001,4200,16314,9807,8801,0.0,9102,8802,81.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2474,"Pulkovo 1995 / Gauss-Kruger CM 87E",9001,4200,16315,9807,8801,0.0,9102,8802,87.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2475,"Pulkovo 1995 / Gauss-Kruger CM 93E",9001,4200,16316,9807,8801,0.0,9102,8802,93.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2476,"Pulkovo 1995 / Gauss-Kruger CM 99E",9001,4200,16317,9807,8801,0.0,9102,8802,99.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2477,"Pulkovo 1995 / Gauss-Kruger CM 105E",9001,4200,16318,9807,8801,0.0,9102,8802,105.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2478,"Pulkovo 1995 / Gauss-Kruger CM 111E",9001,4200,16319,9807,8801,0.0,9102,8802,111.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2479,"Pulkovo 1995 / Gauss-Kruger CM 117E",9001,4200,16320,9807,8801,0.0,9102,8802,117.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2480,"Pulkovo 1995 / Gauss-Kruger CM 123E",9001,4200,16321,9807,8801,0.0,9102,8802,123.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2481,"Pulkovo 1995 / Gauss-Kruger CM 129E",9001,4200,16322,9807,8801,0.0,9102,8802,129.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2482,"Pulkovo 1995 / Gauss-Kruger CM 135E",9001,4200,16323,9807,8801,0.0,9102,8802,135.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2483,"Pulkovo 1995 / Gauss-Kruger CM 141E",9001,4200,16324,9807,8801,0.0,9102,8802,141.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2484,"Pulkovo 1995 / Gauss-Kruger CM 147E",9001,4200,16325,9807,8801,0.0,9102,8802,147.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2485,"Pulkovo 1995 / Gauss-Kruger CM 153E",9001,4200,16326,9807,8801,0.0,9102,8802,153.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2486,"Pulkovo 1995 / Gauss-Kruger CM 159E",9001,4200,16327,9807,8801,0.0,9102,8802,159.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2487,"Pulkovo 1995 / Gauss-Kruger CM 165E",9001,4200,16328,9807,8801,0.0,9102,8802,165.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2488,"Pulkovo 1995 / Gauss-Kruger CM 171E",9001,4200,16329,9807,8801,0.0,9102,8802,171.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2489,"Pulkovo 1995 / Gauss-Kruger CM 177E",9001,4200,16330,9807,8801,0.0,9102,8802,177.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2490,"Pulkovo 1995 / Gauss-Kruger CM 177W",9001,4200,16331,9807,8801,0.0,9102,8802,-177.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2491,"Pulkovo 1995 / Gauss-Kruger CM 171W",9001,4200,16332,9807,8801,0.0,9102,8802,-171.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2492,"Pulkovo 1942 / Gauss-Kruger CM 9E",9001,4284,16302,9807,8801,0.0,9102,8802,9.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2493,"Pulkovo 1942 / Gauss-Kruger CM 15E",9001,4284,16303,9807,8801,0.0,9102,8802,15.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2494,"Pulkovo 1942 / Gauss-Kruger CM 21E",9001,4284,16304,9807,8801,0.0,9102,8802,21.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2495,"Pulkovo 1942 / Gauss-Kruger CM 27E",9001,4284,16305,9807,8801,0.0,9102,8802,27.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2496,"Pulkovo 1942 / Gauss-Kruger CM 33E",9001,4284,16306,9807,8801,0.0,9102,8802,33.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2497,"Pulkovo 1942 / Gauss-Kruger CM 39E",9001,4284,16307,9807,8801,0.0,9102,8802,39.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2498,"Pulkovo 1942 / Gauss-Kruger CM 45E",9001,4284,16308,9807,8801,0.0,9102,8802,45.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2499,"Pulkovo 1942 / Gauss-Kruger CM 51E",9001,4284,16309,9807,8801,0.0,9102,8802,51.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2500,"Pulkovo 1942 / Gauss-Kruger CM 57E",9001,4284,16310,9807,8801,0.0,9102,8802,57.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2501,"Pulkovo 1942 / Gauss-Kruger CM 63E",9001,4284,16311,9807,8801,0.0,9102,8802,63.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2502,"Pulkovo 1942 / Gauss-Kruger CM 69E",9001,4284,16312,9807,8801,0.0,9102,8802,69.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2503,"Pulkovo 1942 / Gauss-Kruger CM 75E",9001,4284,16313,9807,8801,0.0,9102,8802,75.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2504,"Pulkovo 1942 / Gauss-Kruger CM 81E",9001,4284,16314,9807,8801,0.0,9102,8802,81.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2505,"Pulkovo 1942 / Gauss-Kruger CM 87E",9001,4284,16315,9807,8801,0.0,9102,8802,87.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2506,"Pulkovo 1942 / Gauss-Kruger CM 93E",9001,4284,16316,9807,8801,0.0,9102,8802,93.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2507,"Pulkovo 1942 / Gauss-Kruger CM 99E",9001,4284,16317,9807,8801,0.0,9102,8802,99.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2508,"Pulkovo 1942 / Gauss-Kruger CM 105E",9001,4284,16318,9807,8801,0.0,9102,8802,105.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2509,"Pulkovo 1942 / Gauss-Kruger CM 111E",9001,4284,16319,9807,8801,0.0,9102,8802,111.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2510,"Pulkovo 1942 / Gauss-Kruger CM 117E",9001,4284,16320,9807,8801,0.0,9102,8802,117.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2511,"Pulkovo 1942 / Gauss-Kruger CM 123E",9001,4284,16321,9807,8801,0.0,9102,8802,123.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2512,"Pulkovo 1942 / Gauss-Kruger CM 129E",9001,4284,16322,9807,8801,0.0,9102,8802,129.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2513,"Pulkovo 1942 / Gauss-Kruger CM 135E",9001,4284,16323,9807,8801,0.0,9102,8802,135.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2514,"Pulkovo 1942 / Gauss-Kruger CM 141E",9001,4284,16324,9807,8801,0.0,9102,8802,141.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2515,"Pulkovo 1942 / Gauss-Kruger CM 147E",9001,4284,16325,9807,8801,0.0,9102,8802,147.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2516,"Pulkovo 1942 / Gauss-Kruger CM 153E",9001,4284,16326,9807,8801,0.0,9102,8802,153.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2517,"Pulkovo 1942 / Gauss-Kruger CM 159E",9001,4284,16327,9807,8801,0.0,9102,8802,159.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2518,"Pulkovo 1942 / Gauss-Kruger CM 165E",9001,4284,16328,9807,8801,0.0,9102,8802,165.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2519,"Pulkovo 1942 / Gauss-Kruger CM 171E",9001,4284,16329,9807,8801,0.0,9102,8802,171.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2520,"Pulkovo 1942 / Gauss-Kruger CM 177E",9001,4284,16330,9807,8801,0.0,9102,8802,177.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2521,"Pulkovo 1942 / Gauss-Kruger CM 177W",9001,4284,16331,9807,8801,0.0,9102,8802,-177.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2522,"Pulkovo 1942 / Gauss-Kruger CM 171W",9001,4284,16332,9807,8801,0.0,9102,8802,-171.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2523,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 7",9001,4284,16267,9807,8801,0.0,9102,8802,21.0,9102,8805,1.0,9201,8806,7500000.0,9001,8807,0.0,9001,,,,,,
-2524,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 8",9001,4284,16268,9807,8801,0.0,9102,8802,24.0,9102,8805,1.0,9201,8806,8500000.0,9001,8807,0.0,9001,,,,,,
-2525,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 9",9001,4284,16269,9807,8801,0.0,9102,8802,27.0,9102,8805,1.0,9201,8806,9500000.0,9001,8807,0.0,9001,,,,,,
-2526,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 10",9001,4284,16270,9807,8801,0.0,9102,8802,30.0,9102,8805,1.0,9201,8806,10500000.0,9001,8807,0.0,9001,,,,,,
-2527,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 11",9001,4284,16271,9807,8801,0.0,9102,8802,33.0,9102,8805,1.0,9201,8806,11500000.0,9001,8807,0.0,9001,,,,,,
-2528,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 12",9001,4284,16272,9807,8801,0.0,9102,8802,36.0,9102,8805,1.0,9201,8806,12500000.0,9001,8807,0.0,9001,,,,,,
-2529,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 13",9001,4284,16273,9807,8801,0.0,9102,8802,39.0,9102,8805,1.0,9201,8806,13500000.0,9001,8807,0.0,9001,,,,,,
-2530,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 14",9001,4284,16274,9807,8801,0.0,9102,8802,42.0,9102,8805,1.0,9201,8806,14500000.0,9001,8807,0.0,9001,,,,,,
-2531,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 15",9001,4284,16275,9807,8801,0.0,9102,8802,45.0,9102,8805,1.0,9201,8806,15500000.0,9001,8807,0.0,9001,,,,,,
-2532,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 16",9001,4284,16276,9807,8801,0.0,9102,8802,48.0,9102,8805,1.0,9201,8806,16500000.0,9001,8807,0.0,9001,,,,,,
-2533,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 17",9001,4284,16277,9807,8801,0.0,9102,8802,51.0,9102,8805,1.0,9201,8806,17500000.0,9001,8807,0.0,9001,,,,,,
-2534,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 18",9001,4284,16278,9807,8801,0.0,9102,8802,54.0,9102,8805,1.0,9201,8806,18500000.0,9001,8807,0.0,9001,,,,,,
-2535,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 19",9001,4284,16279,9807,8801,0.0,9102,8802,57.0,9102,8805,1.0,9201,8806,19500000.0,9001,8807,0.0,9001,,,,,,
-2536,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 20",9001,4284,16280,9807,8801,0.0,9102,8802,60.0,9102,8805,1.0,9201,8806,20500000.0,9001,8807,0.0,9001,,,,,,
-2537,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 21",9001,4284,16281,9807,8801,0.0,9102,8802,63.0,9102,8805,1.0,9201,8806,21500000.0,9001,8807,0.0,9001,,,,,,
-2538,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 22",9001,4284,16282,9807,8801,0.0,9102,8802,66.0,9102,8805,1.0,9201,8806,22500000.0,9001,8807,0.0,9001,,,,,,
-2539,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 23",9001,4284,16283,9807,8801,0.0,9102,8802,69.0,9102,8805,1.0,9201,8806,23500000.0,9001,8807,0.0,9001,,,,,,
-2540,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 24",9001,4284,16284,9807,8801,0.0,9102,8802,72.0,9102,8805,1.0,9201,8806,24500000.0,9001,8807,0.0,9001,,,,,,
-2541,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 25",9001,4284,16285,9807,8801,0.0,9102,8802,75.0,9102,8805,1.0,9201,8806,25500000.0,9001,8807,0.0,9001,,,,,,
-2542,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 26",9001,4284,16286,9807,8801,0.0,9102,8802,78.0,9102,8805,1.0,9201,8806,26500000.0,9001,8807,0.0,9001,,,,,,
-2543,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 27",9001,4284,16287,9807,8801,0.0,9102,8802,81.0,9102,8805,1.0,9201,8806,27500000.0,9001,8807,0.0,9001,,,,,,
-2544,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 28",9001,4284,16288,9807,8801,0.0,9102,8802,84.0,9102,8805,1.0,9201,8806,28500000.0,9001,8807,0.0,9001,,,,,,
-2545,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 29",9001,4284,16289,9807,8801,0.0,9102,8802,87.0,9102,8805,1.0,9201,8806,29500000.0,9001,8807,0.0,9001,,,,,,
-2546,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 30",9001,4284,16290,9807,8801,0.0,9102,8802,90.0,9102,8805,1.0,9201,8806,30500000.0,9001,8807,0.0,9001,,,,,,
-2547,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 31",9001,4284,16291,9807,8801,0.0,9102,8802,93.0,9102,8805,1.0,9201,8806,31500000.0,9001,8807,0.0,9001,,,,,,
-2548,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 32",9001,4284,16292,9807,8801,0.0,9102,8802,96.0,9102,8805,1.0,9201,8806,32500000.0,9001,8807,0.0,9001,,,,,,
-2549,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 33",9001,4284,16293,9807,8801,0.0,9102,8802,99.0,9102,8805,1.0,9201,8806,33500000.0,9001,8807,0.0,9001,,,,,,
-2550,"Samboja / UTM zone 50S",9001,4125,16150,9807,8801,0.0,9102,8802,117.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-2551,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 34",9001,4284,16294,9807,8801,0.0,9102,8802,102.0,9102,8805,1.0,9201,8806,34500000.0,9001,8807,0.0,9001,,,,,,
-2552,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 35",9001,4284,16295,9807,8801,0.0,9102,8802,105.0,9102,8805,1.0,9201,8806,35500000.0,9001,8807,0.0,9001,,,,,,
-2553,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 36",9001,4284,16296,9807,8801,0.0,9102,8802,108.0,9102,8805,1.0,9201,8806,36500000.0,9001,8807,0.0,9001,,,,,,
-2554,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 37",9001,4284,16297,9807,8801,0.0,9102,8802,111.0,9102,8805,1.0,9201,8806,37500000.0,9001,8807,0.0,9001,,,,,,
-2555,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 38",9001,4284,16298,9807,8801,0.0,9102,8802,114.0,9102,8805,1.0,9201,8806,38500000.0,9001,8807,0.0,9001,,,,,,
-2556,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 39",9001,4284,16299,9807,8801,0.0,9102,8802,117.0,9102,8805,1.0,9201,8806,39500000.0,9001,8807,0.0,9001,,,,,,
-2557,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 40",9001,4284,16070,9807,8801,0.0,9102,8802,120.0,9102,8805,1.0,9201,8806,40500000.0,9001,8807,0.0,9001,,,,,,
-2558,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 41",9001,4284,16071,9807,8801,0.0,9102,8802,123.0,9102,8805,1.0,9201,8806,41500000.0,9001,8807,0.0,9001,,,,,,
-2559,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 42",9001,4284,16072,9807,8801,0.0,9102,8802,126.0,9102,8805,1.0,9201,8806,42500000.0,9001,8807,0.0,9001,,,,,,
-2560,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 43",9001,4284,16073,9807,8801,0.0,9102,8802,129.0,9102,8805,1.0,9201,8806,43500000.0,9001,8807,0.0,9001,,,,,,
-2561,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 44",9001,4284,16074,9807,8801,0.0,9102,8802,132.0,9102,8805,1.0,9201,8806,44500000.0,9001,8807,0.0,9001,,,,,,
-2562,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 45",9001,4284,16075,9807,8801,0.0,9102,8802,135.0,9102,8805,1.0,9201,8806,45500000.0,9001,8807,0.0,9001,,,,,,
-2563,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 46",9001,4284,16076,9807,8801,0.0,9102,8802,138.0,9102,8805,1.0,9201,8806,46500000.0,9001,8807,0.0,9001,,,,,,
-2564,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 47",9001,4284,16077,9807,8801,0.0,9102,8802,141.0,9102,8805,1.0,9201,8806,47500000.0,9001,8807,0.0,9001,,,,,,
-2565,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 48",9001,4284,16078,9807,8801,0.0,9102,8802,144.0,9102,8805,1.0,9201,8806,48500000.0,9001,8807,0.0,9001,,,,,,
-2566,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 49",9001,4284,16079,9807,8801,0.0,9102,8802,147.0,9102,8805,1.0,9201,8806,49500000.0,9001,8807,0.0,9001,,,,,,
-2567,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 50",9001,4284,16080,9807,8801,0.0,9102,8802,150.0,9102,8805,1.0,9201,8806,50500000.0,9001,8807,0.0,9001,,,,,,
-2568,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 51",9001,4284,16081,9807,8801,0.0,9102,8802,153.0,9102,8805,1.0,9201,8806,51500000.0,9001,8807,0.0,9001,,,,,,
-2569,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 52",9001,4284,16082,9807,8801,0.0,9102,8802,156.0,9102,8805,1.0,9201,8806,52500000.0,9001,8807,0.0,9001,,,,,,
-2570,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 53",9001,4284,16083,9807,8801,0.0,9102,8802,159.0,9102,8805,1.0,9201,8806,53500000.0,9001,8807,0.0,9001,,,,,,
-2571,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 54",9001,4284,16084,9807,8801,0.0,9102,8802,162.0,9102,8805,1.0,9201,8806,54500000.0,9001,8807,0.0,9001,,,,,,
-2572,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 55",9001,4284,16085,9807,8801,0.0,9102,8802,165.0,9102,8805,1.0,9201,8806,55500000.0,9001,8807,0.0,9001,,,,,,
-2573,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 56",9001,4284,16086,9807,8801,0.0,9102,8802,168.0,9102,8805,1.0,9201,8806,56500000.0,9001,8807,0.0,9001,,,,,,
-2574,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 57",9001,4284,16087,9807,8801,0.0,9102,8802,171.0,9102,8805,1.0,9201,8806,57500000.0,9001,8807,0.0,9001,,,,,,
-2575,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 58",9001,4284,16088,9807,8801,0.0,9102,8802,174.0,9102,8805,1.0,9201,8806,58500000.0,9001,8807,0.0,9001,,,,,,
-2576,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 59",9001,4284,16089,9807,8801,0.0,9102,8802,177.0,9102,8805,1.0,9201,8806,59500000.0,9001,8807,0.0,9001,,,,,,
-2577,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 60",9001,4284,16090,9807,8801,0.0,9102,8802,180.0,9102,8805,1.0,9201,8806,60000000.0,9001,8807,0.0,9001,,,,,,
-2578,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 61",9001,4284,16091,9807,8801,0.0,9102,8802,-177.0,9102,8805,1.0,9201,8806,61500000.0,9001,8807,0.0,9001,,,,,,
-2579,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 62",9001,4284,16092,9807,8801,0.0,9102,8802,-174.0,9102,8805,1.0,9201,8806,62500000.0,9001,8807,0.0,9001,,,,,,
-2580,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 63",9001,4284,16093,9807,8801,0.0,9102,8802,-171.0,9102,8805,1.0,9201,8806,63500000.0,9001,8807,0.0,9001,,,,,,
-2581,"Pulkovo 1942 / 3-degree Gauss-Kruger zone 64",9001,4284,16094,9807,8801,0.0,9102,8802,-168.0,9102,8805,1.0,9201,8806,64500000.0,9001,8807,0.0,9001,,,,,,
-2582,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 21E",9001,4284,16367,9807,8801,0.0,9102,8802,21.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2583,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 24E",9001,4284,16368,9807,8801,0.0,9102,8802,24.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2584,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 27E",9001,4284,16369,9807,8801,0.0,9102,8802,27.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2585,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 30E",9001,4284,16370,9807,8801,0.0,9102,8802,30.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2586,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 33E",9001,4284,16371,9807,8801,0.0,9102,8802,33.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2587,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 36E",9001,4284,16372,9807,8801,0.0,9102,8802,36.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2588,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 39E",9001,4284,16373,9807,8801,0.0,9102,8802,39.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2589,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 42E",9001,4284,16374,9807,8801,0.0,9102,8802,42.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2590,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 45E",9001,4284,16375,9807,8801,0.0,9102,8802,45.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2591,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 48E",9001,4284,16376,9807,8801,0.0,9102,8802,48.0,9102,8805,1.0,9001,8806,500000.0,9001,8807,0.0,9201,,,,,,
-2592,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 51E",9001,4284,16377,9807,8801,0.0,9102,8802,51.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2593,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 54E",9001,4284,16378,9807,8801,0.0,9102,8802,54.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2594,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 57E",9001,4284,16379,9807,8801,0.0,9102,8802,57.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2595,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 60E",9001,4284,16380,9807,8801,0.0,9102,8802,60.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2596,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 63E",9001,4284,16381,9807,8801,0.0,9102,8802,63.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2597,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 66E",9001,4284,16382,9807,8801,0.0,9102,8802,66.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2598,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 69E",9001,4284,16383,9807,8801,0.0,9102,8802,69.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2599,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 72E",9001,4284,16384,9807,8801,0.0,9102,8802,72.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2600,Lietuvos Koordinoei Sistema 1994,9001,4126,19934,9807,8801,0.0,9102,8802,24.0,9102,8805,0.9998,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2601,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 75E",9001,4284,16385,9807,8801,0.0,9102,8802,75.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2602,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 78E",9001,4284,16386,9807,8801,0.0,9102,8802,78.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2603,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 81E",9001,4284,16387,9807,8801,0.0,9102,8802,81.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2604,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 84E",9001,4284,16388,9807,8801,0.0,9102,8802,84.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2605,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 87E",9001,4284,16389,9807,8801,0.0,9102,8802,87.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2606,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 90E",9001,4284,16390,9807,8801,0.0,9102,8802,90.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2607,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 93E",9001,4284,16391,9807,8801,0.0,9102,8802,93.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2608,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 96E",9001,4284,16392,9807,8801,0.0,9102,8802,96.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2609,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 99E",9001,4284,16393,9807,8801,0.0,9102,8802,99.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2610,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 102E",9001,4284,16394,9807,8801,0.0,9102,8802,102.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2611,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 105E",9001,4284,16395,9807,8801,0.0,9102,8802,105.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2612,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 108E",9001,4284,16396,9807,8801,0.0,9102,8802,108.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2613,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 111E",9001,4284,16397,9807,8801,0.0,9102,8802,111.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2614,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 114E",9001,4284,16398,9807,8801,0.0,9102,8802,114.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2615,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 117E",9001,4284,16399,9807,8801,0.0,9102,8802,117.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2616,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 120E",9001,4284,16170,9807,8801,0.0,9102,8802,120.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2617,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 123E",9001,4284,16171,9807,8801,0.0,9102,8802,123.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2618,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 126E",9001,4284,16172,9807,8801,0.0,9102,8802,126.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2619,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 129E",9001,4284,16173,9807,8801,0.0,9102,8802,129.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2620,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 132E",9001,4284,16174,9807,8801,0.0,9102,8802,132.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2621,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 135E",9001,4284,16175,9807,8801,0.0,9102,8802,135.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2622,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 138E",9001,4284,16176,9807,8801,0.0,9102,8802,138.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2623,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 141E",9001,4284,16177,9807,8801,0.0,9102,8802,141.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2624,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 144E",9001,4284,16178,9807,8801,0.0,9102,8802,144.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2625,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 147E",9001,4284,16179,9807,8801,0.0,9102,8802,147.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2626,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 150E",9001,4284,16180,9807,8801,0.0,9102,8802,150.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2627,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 153E",9001,4284,16181,9807,8801,0.0,9102,8802,153.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2628,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 156E",9001,4284,16182,9807,8801,0.0,9102,8802,156.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2629,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 159E",9001,4284,16183,9807,8801,0.0,9102,8802,159.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2630,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 162E",9001,4284,16184,9807,8801,0.0,9102,8802,162.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2631,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 165E",9001,4284,16185,9807,8801,0.0,9102,8802,165.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2632,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 168E",9001,4284,16186,9807,8801,0.0,9102,8802,168.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2633,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 171E",9001,4284,16187,9807,8801,0.0,9102,8802,171.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2634,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 174E",9001,4284,16188,9807,8801,0.0,9102,8802,174.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2635,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 177E",9001,4284,16189,9807,8801,0.0,9102,8802,177.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2636,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 180E",9001,4284,16190,9807,8801,0.0,9102,8802,180.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2637,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 177W",9001,4284,16191,9807,8801,0.0,9102,8802,-177.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2638,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 174W",9001,4284,16192,9807,8801,0.0,9102,8802,-174.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2639,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 171W",9001,4284,16193,9807,8801,0.0,9102,8802,-171.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2640,"Pulkovo 1942 / 3-degree Gauss-Kruger CM 168W",9001,4284,16194,9807,8801,0.0,9102,8802,-168.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2641,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 7",9001,4284,16267,9807,8801,0.0,9102,8802,21.0,9102,8805,1.0,9201,8806,7500000.0,9001,8807,0.0,9001,,,,,,
-2642,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 8",9001,4284,16268,9807,8801,0.0,9102,8802,24.0,9102,8805,1.0,9201,8806,8500000.0,9001,8807,0.0,9001,,,,,,
-2643,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 9",9001,4284,16269,9807,8801,0.0,9102,8802,27.0,9102,8805,1.0,9201,8806,9500000.0,9001,8807,0.0,9001,,,,,,
-2644,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 10",9001,4284,16270,9807,8801,0.0,9102,8802,30.0,9102,8805,1.0,9201,8806,10500000.0,9001,8807,0.0,9001,,,,,,
-2645,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 11",9001,4284,16271,9807,8801,0.0,9102,8802,33.0,9102,8805,1.0,9201,8806,11500000.0,9001,8807,0.0,9001,,,,,,
-2646,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 12",9001,4284,16272,9807,8801,0.0,9102,8802,36.0,9102,8805,1.0,9201,8806,12500000.0,9001,8807,0.0,9001,,,,,,
-2647,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 13",9001,4284,16273,9807,8801,0.0,9102,8802,39.0,9102,8805,1.0,9201,8806,13500000.0,9001,8807,0.0,9001,,,,,,
-2648,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 14",9001,4284,16274,9807,8801,0.0,9102,8802,42.0,9102,8805,1.0,9201,8806,14500000.0,9001,8807,0.0,9001,,,,,,
-2649,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 15",9001,4284,16275,9807,8801,0.0,9102,8802,45.0,9102,8805,1.0,9201,8806,15500000.0,9001,8807,0.0,9001,,,,,,
-2650,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 16",9001,4284,16276,9807,8801,0.0,9102,8802,48.0,9102,8805,1.0,9201,8806,16500000.0,9001,8807,0.0,9001,,,,,,
-2651,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 17",9001,4284,16277,9807,8801,0.0,9102,8802,51.0,9102,8805,1.0,9201,8806,17500000.0,9001,8807,0.0,9001,,,,,,
-2652,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 18",9001,4284,16278,9807,8801,0.0,9102,8802,54.0,9102,8805,1.0,9201,8806,18500000.0,9001,8807,0.0,9001,,,,,,
-2653,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 19",9001,4284,16279,9807,8801,0.0,9102,8802,57.0,9102,8805,1.0,9201,8806,19500000.0,9001,8807,0.0,9001,,,,,,
-2654,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 20",9001,4284,16280,9807,8801,0.0,9102,8802,60.0,9102,8805,1.0,9201,8806,20500000.0,9001,8807,0.0,9001,,,,,,
-2655,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 21",9001,4284,16281,9807,8801,0.0,9102,8802,63.0,9102,8805,1.0,9201,8806,21500000.0,9001,8807,0.0,9001,,,,,,
-2656,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 22",9001,4284,16282,9807,8801,0.0,9102,8802,66.0,9102,8805,1.0,9201,8806,22500000.0,9001,8807,0.0,9001,,,,,,
-2657,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 23",9001,4284,16283,9807,8801,0.0,9102,8802,69.0,9102,8805,1.0,9201,8806,23500000.0,9001,8807,0.0,9001,,,,,,
-2658,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 24",9001,4284,16284,9807,8801,0.0,9102,8802,72.0,9102,8805,1.0,9201,8806,24500000.0,9001,8807,0.0,9001,,,,,,
-2659,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 25",9001,4284,16285,9807,8801,0.0,9102,8802,75.0,9102,8805,1.0,9201,8806,25500000.0,9001,8807,0.0,9001,,,,,,
-2660,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 26",9001,4284,16286,9807,8801,0.0,9102,8802,78.0,9102,8805,1.0,9201,8806,26500000.0,9001,8807,0.0,9001,,,,,,
-2661,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 27",9001,4284,16287,9807,8801,0.0,9102,8802,81.0,9102,8805,1.0,9201,8806,27500000.0,9001,8807,0.0,9001,,,,,,
-2662,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 28",9001,4284,16288,9807,8801,0.0,9102,8802,84.0,9102,8805,1.0,9201,8806,28500000.0,9001,8807,0.0,9001,,,,,,
-2663,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 29",9001,4284,16289,9807,8801,0.0,9102,8802,87.0,9102,8805,1.0,9201,8806,29500000.0,9001,8807,0.0,9001,,,,,,
-2664,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 30",9001,4284,16290,9807,8801,0.0,9102,8802,90.0,9102,8805,1.0,9201,8806,30500000.0,9001,8807,0.0,9001,,,,,,
-2665,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 31",9001,4284,16291,9807,8801,0.0,9102,8802,93.0,9102,8805,1.0,9201,8806,31500000.0,9001,8807,0.0,9001,,,,,,
-2666,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 32",9001,4284,16292,9807,8801,0.0,9102,8802,96.0,9102,8805,1.0,9201,8806,32500000.0,9001,8807,0.0,9001,,,,,,
-2667,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 33",9001,4284,16293,9807,8801,0.0,9102,8802,99.0,9102,8805,1.0,9201,8806,33500000.0,9001,8807,0.0,9001,,,,,,
-2668,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 34",9001,4284,16294,9807,8801,0.0,9102,8802,102.0,9102,8805,1.0,9201,8806,34500000.0,9001,8807,0.0,9001,,,,,,
-2669,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 35",9001,4284,16295,9807,8801,0.0,9102,8802,105.0,9102,8805,1.0,9201,8806,35500000.0,9001,8807,0.0,9001,,,,,,
-2670,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 36",9001,4284,16296,9807,8801,0.0,9102,8802,108.0,9102,8805,1.0,9201,8806,36500000.0,9001,8807,0.0,9001,,,,,,
-2671,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 37",9001,4284,16297,9807,8801,0.0,9102,8802,111.0,9102,8805,1.0,9201,8806,37500000.0,9001,8807,0.0,9001,,,,,,
-2672,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 38",9001,4284,16298,9807,8801,0.0,9102,8802,114.0,9102,8805,1.0,9201,8806,38500000.0,9001,8807,0.0,9001,,,,,,
-2673,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 39",9001,4284,16299,9807,8801,0.0,9102,8802,117.0,9102,8805,1.0,9201,8806,39500000.0,9001,8807,0.0,9001,,,,,,
-2674,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 40",9001,4284,16070,9807,8801,0.0,9102,8802,120.0,9102,8805,1.0,9201,8806,40500000.0,9001,8807,0.0,9001,,,,,,
-2675,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 41",9001,4284,16071,9807,8801,0.0,9102,8802,123.0,9102,8805,1.0,9201,8806,41500000.0,9001,8807,0.0,9001,,,,,,
-2676,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 42",9001,4284,16072,9807,8801,0.0,9102,8802,126.0,9102,8805,1.0,9201,8806,42500000.0,9001,8807,0.0,9001,,,,,,
-2677,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 43",9001,4284,16073,9807,8801,0.0,9102,8802,129.0,9102,8805,1.0,9201,8806,43500000.0,9001,8807,0.0,9001,,,,,,
-2678,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 44",9001,4284,16074,9807,8801,0.0,9102,8802,132.0,9102,8805,1.0,9201,8806,44500000.0,9001,8807,0.0,9001,,,,,,
-2679,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 45",9001,4284,16075,9807,8801,0.0,9102,8802,135.0,9102,8805,1.0,9201,8806,45500000.0,9001,8807,0.0,9001,,,,,,
-2680,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 46",9001,4284,16076,9807,8801,0.0,9102,8802,138.0,9102,8805,1.0,9201,8806,46500000.0,9001,8807,0.0,9001,,,,,,
-2681,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 47",9001,4284,16077,9807,8801,0.0,9102,8802,141.0,9102,8805,1.0,9201,8806,47500000.0,9001,8807,0.0,9001,,,,,,
-2682,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 48",9001,4284,16078,9807,8801,0.0,9102,8802,144.0,9102,8805,1.0,9201,8806,48500000.0,9001,8807,0.0,9001,,,,,,
-2683,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 49",9001,4284,16079,9807,8801,0.0,9102,8802,147.0,9102,8805,1.0,9201,8806,49500000.0,9001,8807,0.0,9001,,,,,,
-2684,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 50",9001,4284,16080,9807,8801,0.0,9102,8802,150.0,9102,8805,1.0,9201,8806,50500000.0,9001,8807,0.0,9001,,,,,,
-2685,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 51",9001,4284,16081,9807,8801,0.0,9102,8802,153.0,9102,8805,1.0,9201,8806,51500000.0,9001,8807,0.0,9001,,,,,,
-2686,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 52",9001,4284,16082,9807,8801,0.0,9102,8802,156.0,9102,8805,1.0,9201,8806,52500000.0,9001,8807,0.0,9001,,,,,,
-2687,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 53",9001,4284,16083,9807,8801,0.0,9102,8802,159.0,9102,8805,1.0,9201,8806,53500000.0,9001,8807,0.0,9001,,,,,,
-2688,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 54",9001,4284,16084,9807,8801,0.0,9102,8802,162.0,9102,8805,1.0,9201,8806,54500000.0,9001,8807,0.0,9001,,,,,,
-2689,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 55",9001,4284,16085,9807,8801,0.0,9102,8802,165.0,9102,8805,1.0,9201,8806,55500000.0,9001,8807,0.0,9001,,,,,,
-2690,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 56",9001,4284,16086,9807,8801,0.0,9102,8802,168.0,9102,8805,1.0,9201,8806,56500000.0,9001,8807,0.0,9001,,,,,,
-2691,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 57",9001,4284,16087,9807,8801,0.0,9102,8802,171.0,9102,8805,1.0,9201,8806,57500000.0,9001,8807,0.0,9001,,,,,,
-2692,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 58",9001,4284,16088,9807,8801,0.0,9102,8802,174.0,9102,8805,1.0,9201,8806,58500000.0,9001,8807,0.0,9001,,,,,,
-2693,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 59",9001,4284,16089,9807,8801,0.0,9102,8802,177.0,9102,8805,1.0,9201,8806,59500000.0,9001,8807,0.0,9001,,,,,,
-2694,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 60",9001,4284,16090,9807,8801,0.0,9102,8802,180.0,9102,8805,1.0,9201,8806,60000000.0,9001,8807,0.0,9001,,,,,,
-2695,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 61",9001,4284,16091,9807,8801,0.0,9102,8802,-177.0,9102,8805,1.0,9201,8806,61500000.0,9001,8807,0.0,9001,,,,,,
-2696,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 62",9001,4284,16092,9807,8801,0.0,9102,8802,-174.0,9102,8805,1.0,9201,8806,62500000.0,9001,8807,0.0,9001,,,,,,
-2697,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 63",9001,4284,16093,9807,8801,0.0,9102,8802,-171.0,9102,8805,1.0,9201,8806,63500000.0,9001,8807,0.0,9001,,,,,,
-2698,"Pulkovo 1995 / 3-degree Gauss-Kruger zone 64",9001,4284,16094,9807,8801,0.0,9102,8802,-168.0,9102,8805,1.0,9201,8806,64500000.0,9001,8807,0.0,9001,,,,,,
-2699,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 21E",9001,4284,16367,9807,8801,0.0,9102,8802,21.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2700,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 24E",9001,4284,16368,9807,8801,0.0,9102,8802,24.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2701,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 27E",9001,4284,16369,9807,8801,0.0,9102,8802,27.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2702,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 30E",9001,4284,16370,9807,8801,0.0,9102,8802,30.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2703,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 33E",9001,4284,16371,9807,8801,0.0,9102,8802,33.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2704,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 36E",9001,4284,16372,9807,8801,0.0,9102,8802,36.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2705,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 39E",9001,4284,16373,9807,8801,0.0,9102,8802,39.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2706,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 42E",9001,4284,16374,9807,8801,0.0,9102,8802,42.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2707,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 45E",9001,4284,16375,9807,8801,0.0,9102,8802,45.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2708,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 48E",9001,4284,16376,9807,8801,0.0,9102,8802,48.0,9102,8805,1.0,9001,8806,500000.0,9001,8807,0.0,9201,,,,,,
-2709,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 51E",9001,4284,16377,9807,8801,0.0,9102,8802,51.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2710,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 54E",9001,4284,16378,9807,8801,0.0,9102,8802,54.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2711,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 57E",9001,4284,16379,9807,8801,0.0,9102,8802,57.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2712,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 60E",9001,4284,16380,9807,8801,0.0,9102,8802,60.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2713,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 63E",9001,4284,16381,9807,8801,0.0,9102,8802,63.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2714,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 66E",9001,4284,16382,9807,8801,0.0,9102,8802,66.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2715,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 69E",9001,4284,16383,9807,8801,0.0,9102,8802,69.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2716,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 72E",9001,4284,16384,9807,8801,0.0,9102,8802,72.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2717,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 75E",9001,4284,16385,9807,8801,0.0,9102,8802,75.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2718,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 78E",9001,4284,16386,9807,8801,0.0,9102,8802,78.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2719,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 81E",9001,4284,16387,9807,8801,0.0,9102,8802,81.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2720,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 84E",9001,4284,16388,9807,8801,0.0,9102,8802,84.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2721,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 87E",9001,4284,16389,9807,8801,0.0,9102,8802,87.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2722,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 90E",9001,4284,16390,9807,8801,0.0,9102,8802,90.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2723,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 93E",9001,4284,16391,9807,8801,0.0,9102,8802,93.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2724,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 96E",9001,4284,16392,9807,8801,0.0,9102,8802,96.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2725,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 99E",9001,4284,16393,9807,8801,0.0,9102,8802,99.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2726,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 102E",9001,4284,16394,9807,8801,0.0,9102,8802,102.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2727,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 105E",9001,4284,16395,9807,8801,0.0,9102,8802,105.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2728,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 108E",9001,4284,16396,9807,8801,0.0,9102,8802,108.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2729,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 111E",9001,4284,16397,9807,8801,0.0,9102,8802,111.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2730,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 114E",9001,4284,16398,9807,8801,0.0,9102,8802,114.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2731,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 117E",9001,4284,16399,9807,8801,0.0,9102,8802,117.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2732,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 120E",9001,4284,16170,9807,8801,0.0,9102,8802,120.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2733,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 123E",9001,4284,16171,9807,8801,0.0,9102,8802,123.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2734,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 126E",9001,4284,16172,9807,8801,0.0,9102,8802,126.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2735,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 129E",9001,4284,16173,9807,8801,0.0,9102,8802,129.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2736,"Tete / UTM zone 36S",9001,4127,16136,9807,8801,0.0,9102,8802,33.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-2737,"Tete / UTM zone 37S",9001,4127,16137,9807,8801,0.0,9102,8802,39.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-2738,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 132E",9001,4284,16174,9807,8801,0.0,9102,8802,132.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2739,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 135E",9001,4284,16175,9807,8801,0.0,9102,8802,135.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2740,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 138E",9001,4284,16176,9807,8801,0.0,9102,8802,138.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2741,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 141E",9001,4284,16177,9807,8801,0.0,9102,8802,141.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2742,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 144E",9001,4284,16178,9807,8801,0.0,9102,8802,144.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2743,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 147E",9001,4284,16179,9807,8801,0.0,9102,8802,147.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2744,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 150E",9001,4284,16180,9807,8801,0.0,9102,8802,150.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2745,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 153E",9001,4284,16181,9807,8801,0.0,9102,8802,153.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2746,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 156E",9001,4284,16182,9807,8801,0.0,9102,8802,156.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2747,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 159E",9001,4284,16183,9807,8801,0.0,9102,8802,159.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2748,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 162E",9001,4284,16184,9807,8801,0.0,9102,8802,162.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2749,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 165E",9001,4284,16185,9807,8801,0.0,9102,8802,165.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2750,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 168E",9001,4284,16186,9807,8801,0.0,9102,8802,168.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2751,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 171E",9001,4284,16187,9807,8801,0.0,9102,8802,171.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2752,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 174E",9001,4284,16188,9807,8801,0.0,9102,8802,174.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2753,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 177E",9001,4284,16189,9807,8801,0.0,9102,8802,177.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2754,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 180E",9001,4284,16190,9807,8801,0.0,9102,8802,180.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2755,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 177W",9001,4284,16191,9807,8801,0.0,9102,8802,-177.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2756,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 174W",9001,4284,16192,9807,8801,0.0,9102,8802,-174.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2757,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 171W",9001,4284,16193,9807,8801,0.0,9102,8802,-171.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2758,"Pulkovo 1995 / 3-degree Gauss-Kruger CM 168W",9001,4284,16194,9807,8801,0.0,9102,8802,-168.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2759,"NAD83(HARN) / Alabama East",9001,4152,10131,9807,8801,30.3,9110,8802,-85.5,9110,8805,0.99996,9201,8806,200000.0,9001,8807,0.0,9001,,,,,,
-2760,"NAD83(HARN) / Alabama West",9001,4152,10132,9807,8801,30.0,9110,8802,-87.3,9110,8805,0.999933333,9201,8806,600000.0,9001,8807,0.0,9001,,,,,,
-2761,"NAD83(HARN) / Arizona East",9001,4152,10231,9807,8801,31.0,9110,8802,-110.1,9110,8805,0.9999,9201,8806,213360.0,9001,8807,0.0,9001,,,,,,
-2762,"NAD83(HARN) / Arizona Central",9001,4152,10232,9807,8801,31.0,9110,8802,-111.55,9110,8805,0.9999,9201,8806,213360.0,9001,8807,0.0,9001,,,,,,
-2763,"NAD83(HARN) / Arizona West",9001,4152,10233,9807,8801,31.0,9110,8802,-113.45,9110,8805,0.999933333,9201,8806,213360.0,9001,8807,0.0,9001,,,,,,
-2764,"NAD83(HARN) / Arkansas North",9001,4152,10331,9802,8821,34.2,9110,8822,-92.0,9110,8823,36.14,9110,8824,34.56,9110,8826,400000.0,9001,8827,0.0,9001,,,
-2765,"NAD83(HARN) / Arkansas South",9001,4152,10332,9802,8821,32.4,9110,8822,-92.0,9110,8823,34.46,9110,8824,33.18,9110,8826,400000.0,9001,8827,400000.0,9001,,,
-2766,"NAD83(HARN) / California zone 1",9001,4152,10431,9802,8821,39.2,9110,8822,-122.0,9110,8823,41.4,9110,8824,40.0,9110,8826,2000000.0,9001,8827,500000.0,9001,,,
-2767,"NAD83(HARN) / California zone 2",9001,4152,10432,9802,8821,37.4,9110,8822,-122.0,9110,8823,39.5,9110,8824,38.2,9110,8826,2000000.0,9001,8827,500000.0,9001,,,
-2768,"NAD83(HARN) / California zone 3",9001,4152,10433,9802,8821,36.3,9110,8822,-120.3,9110,8823,38.26,9110,8824,37.04,9110,8826,2000000.0,9001,8827,500000.0,9001,,,
-2769,"NAD83(HARN) / California zone 4",9001,4152,10434,9802,8821,35.2,9110,8822,-119.0,9110,8823,37.15,9110,8824,36.0,9110,8826,2000000.0,9001,8827,500000.0,9001,,,
-2770,"NAD83(HARN) / California zone 5",9001,4152,10435,9802,8821,33.3,9110,8822,-118.0,9110,8823,35.28,9110,8824,34.02,9110,8826,2000000.0,9001,8827,500000.0,9001,,,
-2771,"NAD83(HARN) / California zone 6",9001,4152,10436,9802,8821,32.1,9110,8822,-116.15,9110,8823,33.53,9110,8824,32.47,9110,8826,2000000.0,9001,8827,500000.0,9001,,,
-2772,"NAD83(HARN) / Colorado North",9001,4152,10531,9802,8821,39.2,9110,8822,-105.3,9110,8823,40.47,9110,8824,39.43,9110,8826,914401.8289,9001,8827,304800.6096,9001,,,
-2773,"NAD83(HARN) / Colorado Central",9001,4152,10532,9802,8821,37.5,9110,8822,-105.3,9110,8823,39.45,9110,8824,38.27,9110,8826,914401.8289,9001,8827,304800.6096,9001,,,
-2774,"NAD83(HARN) / Colorado South",9001,4152,10533,9802,8821,36.4,9110,8822,-105.3,9110,8823,38.26,9110,8824,37.14,9110,8826,914401.8289,9001,8827,304800.6096,9001,,,
-2775,"NAD83(HARN) / Connecticut",9001,4152,10630,9802,8821,40.5,9110,8822,-72.45,9110,8823,41.52,9110,8824,41.12,9110,8826,304800.6096,9001,8827,152400.3048,9001,,,
-2776,"NAD83(HARN) / Delaware",9001,4152,10730,9807,8801,38.0,9110,8802,-75.25,9110,8805,0.999995,9201,8806,200000.0,9001,8807,0.0,9001,,,,,,
-2777,"NAD83(HARN) / Florida East",9001,4152,10931,9807,8801,24.2,9110,8802,-81.0,9110,8805,0.999941177,9201,8806,200000.0,9001,8807,0.0,9001,,,,,,
-2778,"NAD83(HARN) / Florida West",9001,4152,10932,9807,8801,24.2,9110,8802,-82.0,9110,8805,0.999941177,9201,8806,200000.0,9001,8807,0.0,9001,,,,,,
-2779,"NAD83(HARN) / Florida North",9001,4152,10933,9802,8821,29.0,9110,8822,-84.3,9110,8823,30.45,9110,8824,29.35,9110,8826,600000.0,9001,8827,0.0,9001,,,
-2780,"NAD83(HARN) / Georgia East",9001,4152,11031,9807,8801,30.0,9110,8802,-82.1,9110,8805,0.9999,9201,8806,200000.0,9001,8807,0.0,9001,,,,,,
-2781,"NAD83(HARN) / Georgia West",9001,4152,11032,9807,8801,30.0,9110,8802,-84.1,9110,8805,0.9999,9201,8806,700000.0,9001,8807,0.0,9001,,,,,,
-2782,"NAD83(HARN) / Hawaii zone 1",9001,4152,15131,9807,8801,18.5,9110,8802,-155.3,9110,8805,0.999966667,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2783,"NAD83(HARN) / Hawaii zone 2",9001,4152,15132,9807,8801,20.2,9110,8802,-156.4,9110,8805,0.999966667,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2784,"NAD83(HARN) / Hawaii zone 3",9001,4152,15133,9807,8801,21.1,9110,8802,-158.0,9110,8805,0.99999,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2785,"NAD83(HARN) / Hawaii zone 4",9001,4152,15134,9807,8801,21.5,9110,8802,-159.3,9110,8805,0.99999,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2786,"NAD83(HARN) / Hawaii zone 5",9001,4152,15135,9807,8801,21.4,9110,8802,-160.1,9110,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2787,"NAD83(HARN) / Idaho East",9001,4152,11131,9807,8801,41.4,9110,8802,-112.1,9110,8805,0.999947368,9201,8806,200000.0,9001,8807,0.0,9001,,,,,,
-2788,"NAD83(HARN) / Idaho Central",9001,4152,11132,9807,8801,41.4,9110,8802,-114.0,9110,8805,0.999947368,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2789,"NAD83(HARN) / Idaho West",9001,4152,11133,9807,8801,41.4,9110,8802,-115.45,9110,8805,0.999933333,9201,8806,800000.0,9001,8807,0.0,9001,,,,,,
-2790,"NAD83(HARN) / Illinois East",9001,4152,11231,9807,8801,36.4,9110,8802,-88.2,9110,8805,0.999975,9201,8806,300000.0,9001,8807,0.0,9001,,,,,,
-2791,"NAD83(HARN) / Illinois West",9001,4152,11232,9807,8801,36.4,9110,8802,-90.1,9110,8805,0.999941177,9201,8806,700000.0,9001,8807,0.0,9001,,,,,,
-2792,"NAD83(HARN) / Indiana East",9001,4152,11331,9807,8801,37.3,9110,8802,-85.4,9110,8805,0.999966667,9201,8806,100000.0,9001,8807,250000.0,9001,,,,,,
-2793,"NAD83(HARN) / Indiana West",9001,4152,11332,9807,8801,37.3,9110,8802,-87.05,9110,8805,0.999966667,9201,8806,900000.0,9001,8807,250000.0,9001,,,,,,
-2794,"NAD83(HARN) / Iowa North",9001,4152,11431,9802,8821,41.3,9110,8822,-93.3,9110,8823,43.16,9110,8824,42.04,9110,8826,1500000.0,9001,8827,1000000.0,9001,,,
-2795,"NAD83(HARN) / Iowa South",9001,4152,11432,9802,8821,40.0,9110,8822,-93.3,9110,8823,41.47,9110,8824,40.37,9110,8826,500000.0,9001,8827,0.0,9001,,,
-2796,"NAD83(HARN) / Kansas North",9001,4152,11531,9802,8821,38.2,9110,8822,-98.0,9110,8823,39.47,9110,8824,38.43,9110,8826,400000.0,9001,8827,0.0,9001,,,
-2797,"NAD83(HARN) / Kansas South",9001,4152,11532,9802,8821,36.4,9110,8822,-98.3,9110,8823,38.34,9110,8824,37.16,9110,8826,400000.0,9001,8827,400000.0,9001,,,
-2798,"NAD83(HARN) / Kentucky North",9001,4152,15303,9802,8821,37.3,9110,8822,-84.15,9110,8823,37.58,9110,8824,38.58,9110,8826,500000.0,9001,8827,0.0,9001,,,
-2799,"NAD83(HARN) / Kentucky South",9001,4152,11632,9802,8821,36.2,9110,8822,-85.45,9110,8823,37.56,9110,8824,36.44,9110,8826,500000.0,9001,8827,500000.0,9001,,,
-2800,"NAD83(HARN) / Louisiana North",9001,4152,11731,9802,8821,30.3,9110,8822,-92.3,9110,8823,32.4,9110,8824,31.1,9110,8826,1000000.0,9001,8827,0.0,9001,,,
-2801,"NAD83(HARN) / Louisiana South",9001,4152,11732,9802,8821,28.3,9110,8822,-91.2,9110,8823,30.42,9110,8824,29.18,9110,8826,1000000.0,9001,8827,0.0,9001,,,
-2802,"NAD83(HARN) / Maine East",9001,4152,11831,9807,8801,43.4,9110,8802,-68.3,9110,8805,0.9999,9201,8806,300000.0,9001,8807,0.0,9001,,,,,,
-2803,"NAD83(HARN) / Maine West",9001,4152,11832,9807,8801,42.5,9110,8802,-70.1,9110,8805,0.999966667,9201,8806,900000.0,9001,8807,0.0,9001,,,,,,
-2804,"NAD83(HARN) / Maryland",9001,4152,11930,9802,8821,37.4,9110,8822,-77.0,9110,8823,39.27,9110,8824,38.18,9110,8826,400000.0,9001,8827,0.0,9001,,,
-2805,"NAD83(HARN) / Massachusetts Mainland",9001,4152,12031,9802,8821,41.0,9110,8822,-71.3,9110,8823,42.41,9110,8824,41.43,9110,8826,200000.0,9001,8827,750000.0,9001,,,
-2806,"NAD83(HARN) / Massachusetts Island",9001,4152,12032,9802,8821,41.0,9110,8822,-70.3,9110,8823,41.29,9110,8824,41.17,9110,8826,500000.0,9001,8827,0.0,9001,,,
-2807,"NAD83(HARN) / Michigan North",9001,4152,12141,9802,8821,44.47,9110,8822,-87.0,9110,8823,47.05,9110,8824,45.29,9110,8826,8000000.0,9001,8827,0.0,9001,,,
-2808,"NAD83(HARN) / Michigan Central",9001,4152,12142,9802,8821,43.19,9110,8822,-84.22,9110,8823,45.42,9110,8824,44.11,9110,8826,6000000.0,9001,8827,0.0,9001,,,
-2809,"NAD83(HARN) / Michigan South",9001,4152,12143,9802,8821,41.3,9110,8822,-84.22,9110,8823,43.4,9110,8824,42.06,9110,8826,4000000.0,9001,8827,0.0,9001,,,
-2810,"NAD83(HARN) / Minnesota North",9001,4152,12231,9802,8821,46.3,9110,8822,-93.06,9110,8823,48.38,9110,8824,47.02,9110,8826,800000.0,9001,8827,100000.0,9001,,,
-2811,"NAD83(HARN) / Minnesota Central",9001,4152,12232,9802,8821,45.0,9110,8822,-94.15,9110,8823,47.03,9110,8824,45.37,9110,8826,800000.0,9001,8827,100000.0,9001,,,
-2812,"NAD83(HARN) / Minnesota South",9001,4152,12233,9802,8821,43.0,9110,8822,-94.0,9110,8823,45.13,9110,8824,43.47,9110,8826,800000.0,9001,8827,100000.0,9001,,,
-2813,"NAD83(HARN) / Mississippi East",9001,4152,12331,9807,8801,29.3,9110,8802,-88.5,9110,8805,0.99995,9201,8806,300000.0,9001,8807,0.0,9001,,,,,,
-2814,"NAD83(HARN) / Mississippi West",9001,4152,12332,9807,8801,29.3,9110,8802,-90.2,9110,8805,0.99995,9201,8806,700000.0,9001,8807,0.0,9001,,,,,,
-2815,"NAD83(HARN) / Missouri East",9001,4152,12431,9807,8801,35.5,9110,8802,-90.3,9110,8805,0.999933333,9201,8806,250000.0,9001,8807,0.0,9001,,,,,,
-2816,"NAD83(HARN) / Missouri Central",9001,4152,12432,9807,8801,35.5,9110,8802,-92.3,9110,8805,0.999933333,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2817,"NAD83(HARN) / Missouri West",9001,4152,12433,9807,8801,36.1,9110,8802,-94.3,9110,8805,0.999941177,9201,8806,850000.0,9001,8807,0.0,9001,,,,,,
-2818,"NAD83(HARN) / Montana",9001,4152,12530,9802,8821,44.15,9110,8822,-109.3,9110,8823,49.0,9110,8824,45.0,9110,8826,600000.0,9001,8827,0.0,9001,,,
-2819,"NAD83(HARN) / Nebraska",9001,4152,12630,9802,8821,39.5,9110,8822,-100.0,9110,8823,43.0,9110,8824,40.0,9110,8826,500000.0,9001,8827,0.0,9001,,,
-2820,"NAD83(HARN) / Nevada East",9001,4152,12731,9807,8801,34.45,9110,8802,-115.35,9110,8805,0.9999,9201,8806,200000.0,9001,8807,8000000.0,9001,,,,,,
-2821,"NAD83(HARN) / Nevada Central",9001,4152,12732,9807,8801,34.45,9110,8802,-116.4,9110,8805,0.9999,9201,8806,500000.0,9001,8807,6000000.0,9001,,,,,,
-2822,"NAD83(HARN) / Nevada West",9001,4152,12733,9807,8801,34.45,9110,8802,-118.35,9110,8805,0.9999,9201,8806,800000.0,9001,8807,4000000.0,9001,,,,,,
-2823,"NAD83(HARN) / New Hampshire",9001,4152,12830,9807,8801,42.3,9110,8802,-71.4,9110,8805,0.999966667,9201,8806,300000.0,9001,8807,0.0,9001,,,,,,
-2824,"NAD83(HARN) / New Jersey",9001,4152,12930,9807,8801,38.5,9110,8802,-74.3,9110,8805,0.9999,9201,8806,150000.0,9001,8807,0.0,9001,,,,,,
-2825,"NAD83(HARN) / New Mexico East",9001,4152,13031,9807,8801,31.0,9110,8802,-104.2,9110,8805,0.999909091,9201,8806,165000.0,9001,8807,0.0,9001,,,,,,
-2826,"NAD83(HARN) / New Mexico Central",9001,4152,13032,9807,8801,31.0,9110,8802,-106.15,9110,8805,0.9999,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2827,"NAD83(HARN) / New Mexico West",9001,4152,13033,9807,8801,31.0,9110,8802,-107.5,9110,8805,0.999916667,9201,8806,830000.0,9001,8807,0.0,9001,,,,,,
-2828,"NAD83(HARN) / New York East",9001,4152,13131,9807,8801,38.5,9110,8802,-74.3,9110,8805,0.9999,9201,8806,150000.0,9001,8807,0.0,9001,,,,,,
-2829,"NAD83(HARN) / New York Central",9001,4152,13132,9807,8801,40.0,9110,8802,-76.35,9110,8805,0.9999375,9201,8806,250000.0,9001,8807,0.0,9001,,,,,,
-2830,"NAD83(HARN) / New York West",9001,4152,13133,9807,8801,40.0,9110,8802,-78.35,9110,8805,0.9999375,9201,8806,350000.0,9001,8807,0.0,9001,,,,,,
-2831,"NAD83(HARN) / New York Long Island",9001,4152,13134,9802,8821,40.1,9110,8822,-74.0,9110,8823,41.02,9110,8824,40.4,9110,8826,300000.0,9001,8827,0.0,9001,,,
-2832,"NAD83(HARN) / North Dakota North",9001,4152,13331,9802,8821,47.0,9110,8822,-100.3,9110,8823,48.44,9110,8824,47.26,9110,8826,600000.0,9001,8827,0.0,9001,,,
-2833,"NAD83(HARN) / North Dakota South",9001,4152,13332,9802,8821,45.4,9110,8822,-100.3,9110,8823,47.29,9110,8824,46.11,9110,8826,600000.0,9001,8827,0.0,9001,,,
-2834,"NAD83(HARN) / Ohio North",9001,4152,13431,9802,8821,39.4,9110,8822,-82.3,9110,8823,41.42,9110,8824,40.26,9110,8826,600000.0,9001,8827,0.0,9001,,,
-2835,"NAD83(HARN) / Ohio South",9001,4152,13432,9802,8821,38.0,9110,8822,-82.3,9110,8823,40.02,9110,8824,38.44,9110,8826,600000.0,9001,8827,0.0,9001,,,
-2836,"NAD83(HARN) / Oklahoma North",9001,4152,13531,9802,8821,35.0,9110,8822,-98.0,9110,8823,36.46,9110,8824,35.34,9110,8826,600000.0,9001,8827,0.0,9001,,,
-2837,"NAD83(HARN) / Oklahoma South",9001,4152,13532,9802,8821,33.2,9110,8822,-98.0,9110,8823,35.14,9110,8824,33.56,9110,8826,600000.0,9001,8827,0.0,9001,,,
-2838,"NAD83(HARN) / Oregon North",9001,4152,13631,9802,8821,43.4,9110,8822,-120.3,9110,8823,46.0,9110,8824,44.2,9110,8826,2500000.0,9001,8827,0.0,9001,,,
-2839,"NAD83(HARN) / Oregon South",9001,4152,13632,9802,8821,41.4,9110,8822,-120.3,9110,8823,44.0,9110,8824,42.2,9110,8826,1500000.0,9001,8827,0.0,9001,,,
-2840,"NAD83(HARN) / Rhode Island",9001,4152,13830,9807,8801,41.05,9110,8802,-71.3,9110,8805,0.99999375,9201,8806,100000.0,9001,8807,0.0,9001,,,,,,
-2841,"NAD83(HARN) / South Dakota North",9001,4152,14031,9802,8821,43.5,9110,8822,-100.0,9110,8823,45.41,9110,8824,44.25,9110,8826,600000.0,9001,8827,0.0,9001,,,
-2842,"NAD83(HARN) / South Dakota South",9001,4152,14032,9802,8821,42.2,9110,8822,-100.2,9110,8823,44.24,9110,8824,42.5,9110,8826,600000.0,9001,8827,0.0,9001,,,
-2843,"NAD83(HARN) / Tennessee",9001,4152,14130,9802,8821,34.2,9110,8822,-86.0,9110,8823,36.25,9110,8824,35.15,9110,8826,600000.0,9001,8827,0.0,9001,,,
-2844,"NAD83(HARN) / Texas North",9001,4152,14231,9802,8821,34.0,9110,8822,-101.3,9110,8823,36.11,9110,8824,34.39,9110,8826,200000.0,9001,8827,1000000.0,9001,,,
-2845,"NAD83(HARN) / Texas North Central",9001,4152,14232,9802,8821,31.4,9110,8822,-98.3,9110,8823,33.58,9110,8824,32.08,9110,8826,600000.0,9001,8827,2000000.0,9001,,,
-2846,"NAD83(HARN) / Texas Central",9001,4152,14233,9802,8821,29.4,9110,8822,-100.2,9110,8823,31.53,9110,8824,30.07,9110,8826,700000.0,9001,8827,3000000.0,9001,,,
-2847,"NAD83(HARN) / Texas South Central",9001,4152,14234,9802,8821,27.5,9110,8822,-99.0,9110,8823,30.17,9110,8824,28.23,9110,8826,600000.0,9001,8827,4000000.0,9001,,,
-2848,"NAD83(HARN) / Texas South",9001,4152,14235,9802,8821,25.4,9110,8822,-98.3,9110,8823,27.5,9110,8824,26.1,9110,8826,300000.0,9001,8827,5000000.0,9001,,,
-2849,"NAD83(HARN) / Utah North",9001,4152,14331,9802,8821,40.2,9110,8822,-111.3,9110,8823,41.47,9110,8824,40.43,9110,8826,500000.0,9001,8827,1000000.0,9001,,,
-2850,"NAD83(HARN) / Utah Central",9001,4152,14332,9802,8821,38.2,9110,8822,-111.3,9110,8823,40.39,9110,8824,39.01,9110,8826,500000.0,9001,8827,2000000.0,9001,,,
-2851,"NAD83(HARN) / Utah South",9001,4152,14333,9802,8821,36.4,9110,8822,-111.3,9110,8823,38.21,9110,8824,37.13,9110,8826,500000.0,9001,8827,3000000.0,9001,,,
-2852,"NAD83(HARN) / Vermont",9001,4152,14430,9807,8801,42.3,9110,8802,-72.3,9110,8805,0.999964286,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2853,"NAD83(HARN) / Virginia North",9001,4152,14531,9802,8821,37.4,9110,8822,-78.3,9110,8823,39.12,9110,8824,38.02,9110,8826,3500000.0,9001,8827,2000000.0,9001,,,
-2854,"NAD83(HARN) / Virginia South",9001,4152,14532,9802,8821,36.2,9110,8822,-78.3,9110,8823,37.58,9110,8824,36.46,9110,8826,3500000.0,9001,8827,1000000.0,9001,,,
-2855,"NAD83(HARN) / Washington North",9001,4152,14631,9802,8821,47.0,9110,8822,-120.5,9110,8823,48.44,9110,8824,47.3,9110,8826,500000.0,9001,8827,0.0,9001,,,
-2856,"NAD83(HARN) / Washington South",9001,4152,14632,9802,8821,45.2,9110,8822,-120.3,9110,8823,47.2,9110,8824,45.5,9110,8826,500000.0,9001,8827,0.0,9001,,,
-2857,"NAD83(HARN) / West Virginia North",9001,4152,14731,9802,8821,38.3,9110,8822,-79.3,9110,8823,40.15,9110,8824,39.0,9110,8826,600000.0,9001,8827,0.0,9001,,,
-2858,"NAD83(HARN) / West Virginia South",9001,4152,14732,9802,8821,37.0,9110,8822,-81.0,9110,8823,38.53,9110,8824,37.29,9110,8826,600000.0,9001,8827,0.0,9001,,,
-2859,"NAD83(HARN) / Wisconsin North",9001,4152,14831,9802,8821,45.1,9110,8822,-90.0,9110,8823,46.46,9110,8824,45.34,9110,8826,600000.0,9001,8827,0.0,9001,,,
-2860,"NAD83(HARN) / Wisconsin Central",9001,4152,14832,9802,8821,43.5,9110,8822,-90.0,9110,8823,45.3,9110,8824,44.15,9110,8826,600000.0,9001,8827,0.0,9001,,,
-2861,"NAD83(HARN) / Wisconsin South",9001,4152,14833,9802,8821,42.0,9110,8822,-90.0,9110,8823,44.04,9110,8824,42.44,9110,8826,600000.0,9001,8827,0.0,9001,,,
-2862,"NAD83(HARN) / Wyoming East",9001,4152,14931,9807,8801,40.3,9110,8802,-105.1,9110,8805,0.9999375,9201,8806,200000.0,9001,8807,0.0,9001,,,,,,
-2863,"NAD83(HARN) / Wyoming East Central",9001,4152,14932,9807,8801,40.3,9110,8802,-107.2,9110,8805,0.9999375,9201,8806,400000.0,9001,8807,100000.0,9001,,,,,,
-2864,"NAD83(HARN) / Wyoming West Central",9001,4152,14933,9807,8801,40.3,9110,8802,-108.45,9110,8805,0.9999375,9201,8806,600000.0,9001,8807,0.0,9001,,,,,,
-2865,"NAD83(HARN) / Wyoming West",9001,4152,14934,9807,8801,40.3,9110,8802,-110.05,9110,8805,0.9999375,9201,8806,800000.0,9001,8807,100000.0,9001,,,,,,
-2866,"NAD83(HARN) / Puerto Rico & Virgin Is.",9001,4152,15230,9802,8821,17.5,9110,8822,-66.26,9110,8823,18.26,9110,8824,18.02,9110,8826,200000.0,9001,8827,200000.0,9001,,,
-2867,"NAD83(HARN) / Arizona East (ft)",9002,4152,15304,9807,8801,31.0,9110,8802,-110.1,9110,8805,0.9999,9201,8806,700000.0,9002,8807,0.0,9002,,,,,,
-2868,"NAD83(HARN) / Arizona Central (ft)",9002,4152,15305,9807,8801,31.0,9110,8802,-111.55,9110,8805,0.9999,9201,8806,700000.0,9002,8807,0.0,9002,,,,,,
-2869,"NAD83(HARN) / Arizona West (ft)",9002,4152,15306,9807,8801,31.0,9110,8802,-113.45,9110,8805,0.999933333,9201,8806,700000.0,9002,8807,0.0,9002,,,,,,
-2870,"NAD83(HARN) / California zone 1 (ftUS)",9003,4152,15307,9802,8821,39.2,9110,8822,-122.0,9110,8823,41.4,9110,8824,40.0,9110,8826,6561666.667,9003,8827,1640416.667,9003,,,
-2871,"NAD83(HARN) / California zone 2 (ftUS)",9003,4152,15308,9802,8821,37.4,9110,8822,-122.0,9110,8823,39.5,9110,8824,38.2,9110,8826,6561666.667,9003,8827,1640416.667,9003,,,
-2872,"NAD83(HARN) / California zone 3 (ftUS)",9003,4152,15309,9802,8821,36.3,9110,8822,-120.3,9110,8823,38.26,9110,8824,37.04,9110,8826,6561666.667,9003,8827,1640416.667,9003,,,
-2873,"NAD83(HARN) / California zone 4 (ftUS)",9003,4152,15310,9802,8821,35.2,9110,8822,-119.0,9110,8823,37.15,9110,8824,36.0,9110,8826,6561666.667,9003,8827,1640416.667,9003,,,
-2874,"NAD83(HARN) / California zone 5 (ftUS)",9003,4152,15311,9802,8821,33.3,9110,8822,-118.0,9110,8823,35.28,9110,8824,34.02,9110,8826,6561666.667,9003,8827,1640416.667,9003,,,
-2875,"NAD83(HARN) / California zone 6 (ftUS)",9003,4152,15312,9802,8821,32.1,9110,8822,-116.15,9110,8823,33.53,9110,8824,32.47,9110,8826,6561666.667,9003,8827,1640416.667,9003,,,
-2876,"NAD83(HARN) / Colorado North (ftUS)",9003,4152,15313,9802,8821,39.2,9110,8822,-105.3,9110,8823,40.47,9110,8824,39.43,9110,8826,3000000.0,9003,8827,1000000.0,9003,,,
-2877,"NAD83(HARN) / Colorado Central (ftUS)",9003,4152,15314,9802,8821,37.5,9110,8822,-105.3,9110,8823,39.45,9110,8824,38.27,9110,8826,3000000.0,9003,8827,1000000.0,9003,,,
-2878,"NAD83(HARN) / Colorado South (ftUS)",9003,4152,15315,9802,8821,36.4,9110,8822,-105.3,9110,8823,38.26,9110,8824,37.14,9110,8826,3000000.0,9003,8827,1000000.0,9003,,,
-2879,"NAD83(HARN) / Connecticut (ftUS)",9003,4152,15316,9802,8821,40.5,9110,8822,-72.45,9110,8823,41.52,9110,8824,41.12,9110,8826,1000000.0,9003,8827,500000.0,9003,,,
-2880,"NAD83(HARN) / Delaware (ftUS)",9003,4152,15317,9807,8801,38.0,9110,8802,-75.25,9110,8805,0.999995,9201,8806,656166.667,9003,8807,0.0,9003,,,,,,
-2881,"NAD83(HARN) / Florida East (ftUS)",9003,4152,15318,9807,8801,24.2,9110,8802,-81.0,9110,8805,0.999941177,9201,8806,656166.667,9003,8807,0.0,9003,,,,,,
-2882,"NAD83(HARN) / Florida West (ftUS)",9003,4152,15319,9807,8801,24.2,9110,8802,-82.0,9110,8805,0.999941177,9201,8806,656166.667,9003,8807,0.0,9003,,,,,,
-2883,"NAD83(HARN) / Florida North (ftUS)",9003,4152,15320,9802,8821,29.0,9110,8822,-84.3,9110,8823,30.45,9110,8824,29.35,9110,8826,1968500.0,9003,8827,0.0,9003,,,
-2884,"NAD83(HARN) / Georgia East (ftUS)",9003,4152,15321,9807,8801,30.0,9110,8802,-82.1,9110,8805,0.9999,9201,8806,656166.667,9003,8807,0.0,9003,,,,,,
-2885,"NAD83(HARN) / Georgia West (ftUS)",9003,4152,15322,9807,8801,30.0,9110,8802,-84.1,9110,8805,0.9999,9201,8806,2296583.333,9003,8807,0.0,9003,,,,,,
-2886,"NAD83(HARN) / Idaho East (ftUS)",9003,4152,15323,9807,8801,41.4,9110,8802,-112.1,9110,8805,0.999947368,9201,8806,656166.667,9003,8807,0.0,9003,,,,,,
-2887,"NAD83(HARN) / Idaho Central (ftUS)",9003,4152,15324,9807,8801,41.4,9110,8802,-114.0,9110,8805,0.999947368,9201,8806,1640416.667,9003,8807,0.0,9003,,,,,,
-2888,"NAD83(HARN) / Idaho West (ftUS)",9003,4152,15325,9807,8801,41.4,9110,8802,-115.45,9110,8805,0.999933333,9201,8806,2624666.667,9003,8807,0.0,9003,,,,,,
-2889,"NAD83(HARN) / Indiana East (ftUS)",9003,4152,15326,9807,8801,37.3,9110,8802,-85.4,9110,8805,0.999966667,9201,8806,328083.333,9003,8807,818125.0,9003,,,,,,
-2890,"NAD83(HARN) / Indiana West (ftUS)",9003,4152,15327,9807,8801,37.3,9110,8802,-87.05,9110,8805,0.999966667,9201,8806,2952750.0,9003,8807,818125.0,9003,,,,,,
-2891,"NAD83(HARN) / Kentucky North (ftUS)",9003,4152,15328,9802,8821,37.3,9110,8822,-84.15,9110,8823,37.58,9110,8824,38.58,9110,8826,1640416.667,9003,8827,0.0,9003,,,
-2892,"NAD83(HARN) / Kentucky South (ftUS)",9003,4152,15329,9802,8821,36.2,9110,8822,-85.45,9110,8823,37.56,9110,8824,36.44,9110,8826,1640416.667,9003,8827,1640416.667,9003,,,
-2893,"NAD83(HARN) / Maryland (ftUS)",9003,4152,15330,9802,8821,37.4,9110,8822,-77.0,9110,8823,39.27,9110,8824,38.18,9110,8826,1312333.333,9003,8827,0.0,9003,,,
-2894,"NAD83(HARN) / Massachusetts Mainland (ftUS)",9003,4152,15331,9802,8821,41.0,9110,8822,-71.3,9110,8823,42.41,9110,8824,41.43,9110,8826,656166.667,9003,8827,2460625.0,9003,,,
-2895,"NAD83(HARN) / Massachusetts Island (ftUS)",9003,4152,15332,9802,8821,41.0,9110,8822,-70.3,9110,8823,41.29,9110,8824,41.17,9110,8826,1640416.667,9003,8827,0.0,9003,,,
-2896,"NAD83(HARN) / Michigan North (ft)",9002,4152,15333,9802,8821,44.47,9110,8822,-87.0,9110,8823,47.05,9110,8824,45.29,9110,8826,26246719.16,9002,8827,0.0,9002,,,
-2897,"NAD83(HARN) / Michigan Central (ft)",9002,4152,15334,9802,8821,43.19,9110,8822,-84.22,9110,8823,45.42,9110,8824,44.11,9110,8826,19685039.37,9002,8827,0.0,9002,,,
-2898,"NAD83(HARN) / Michigan South (ft)",9002,4152,15335,9802,8821,41.3,9110,8822,-84.22,9110,8823,43.4,9110,8824,42.06,9110,8826,13123359.58,9002,8827,0.0,9002,,,
-2899,"NAD83(HARN) / Mississippi East (ftUS)",9003,4152,15336,9807,8801,29.3,9110,8802,-88.5,9110,8805,0.99995,9201,8806,984250.0,9003,8807,0.0,9003,,,,,,
-2900,"NAD83(HARN) / Mississippi West (ftUS)",9003,4152,15337,9807,8801,29.3,9110,8802,-90.2,9110,8805,0.99995,9201,8806,2296583.333,9003,8807,0.0,9003,,,,,,
-2901,"NAD83(HARN) / Montana (ft)",9002,4152,15338,9802,8821,44.15,9110,8822,-109.3,9110,8823,49.0,9110,8824,45.0,9110,8826,1968503.937,9002,8827,0.0,9002,,,
-2902,"NAD83(HARN) / New Mexico East (ftUS)",9003,4152,15339,9807,8801,31.0,9110,8802,-104.2,9110,8805,0.999909091,9201,8806,541337.5,9003,8807,0.0,9003,,,,,,
-2903,"NAD83(HARN) / New Mexico Central (ftUS)",9003,4152,15340,9807,8801,31.0,9110,8802,-106.15,9110,8805,0.9999,9201,8806,1640416.667,9003,8807,0.0,9003,,,,,,
-2904,"NAD83(HARN) / New Mexico West (ftUS)",9003,4152,15341,9807,8801,31.0,9110,8802,-107.5,9110,8805,0.999916667,9201,8806,2723091.667,9003,8807,0.0,9003,,,,,,
-2905,"NAD83(HARN) / New York East (ftUS)",9003,4152,15342,9807,8801,38.5,9110,8802,-74.3,9110,8805,0.9999,9201,8806,492125.0,9003,8807,0.0,9003,,,,,,
-2906,"NAD83(HARN) / New York Central (ftUS)",9003,4152,15343,9807,8801,40.0,9110,8802,-76.35,9110,8805,0.9999375,9201,8806,820208.333,9003,8807,0.0,9003,,,,,,
-2907,"NAD83(HARN) / New York West (ftUS)",9003,4152,15344,9807,8801,40.0,9110,8802,-78.35,9110,8805,0.9999375,9201,8806,1148291.667,9003,8807,0.0,9003,,,,,,
-2908,"NAD83(HARN) / New York Long Island (ftUS)",9003,4152,15345,9802,8821,40.1,9110,8822,-74.0,9110,8823,41.02,9110,8824,40.4,9110,8826,984250.0,9003,8827,0.0,9003,,,
-2909,"NAD83(HARN) / North Dakota North (ft)",9002,4152,15347,9802,8821,47.0,9110,8822,-100.3,9110,8823,48.44,9110,8824,47.26,9110,8826,1968503.937,9002,8827,0.0,9002,,,
-2910,"NAD83(HARN) / North Dakota South (ft)",9002,4152,15348,9802,8821,45.4,9110,8822,-100.3,9110,8823,47.29,9110,8824,46.11,9110,8826,1968503.937,9002,8827,0.0,9002,,,
-2911,"NAD83(HARN) / Oklahoma North (ftUS)",9003,4152,15349,9802,8821,35.0,9110,8822,-98.0,9110,8823,36.46,9110,8824,35.34,9110,8826,1968500.0,9003,8827,0.0,9003,,,
-2912,"NAD83(HARN) / Oklahoma South (ftUS)",9003,4152,15350,9802,8821,33.2,9110,8822,-98.0,9110,8823,35.14,9110,8824,33.56,9110,8826,1968500.0,9003,8827,0.0,9003,,,
-2913,"NAD83(HARN) / Oregon North (ft)",9002,4152,15351,9802,8821,43.4,9110,8822,-120.3,9110,8823,46.0,9110,8824,44.2,9110,8826,8202099.738,9002,8827,0.0,9002,,,
-2914,"NAD83(HARN) / Oregon South (ft)",9002,4152,15352,9802,8821,41.4,9110,8822,-120.3,9110,8823,44.0,9110,8824,42.2,9110,8826,4921259.843,9002,8827,0.0,9002,,,
-2915,"NAD83(HARN) / Tennessee (ftUS)",9003,4152,15356,9802,8821,34.2,9110,8822,-86.0,9110,8823,36.25,9110,8824,35.15,9110,8826,1968500.0,9003,8827,0.0,9003,,,
-2916,"NAD83(HARN) / Texas North (ftUS)",9003,4152,15357,9802,8821,34.0,9110,8822,-101.3,9110,8823,36.11,9110,8824,34.39,9110,8826,656166.667,9003,8827,3280833.333,9003,,,
-2917,"NAD83(HARN) / Texas North Central (ftUS)",9003,4152,15358,9802,8821,31.4,9110,8822,-98.3,9110,8823,33.58,9110,8824,32.08,9110,8826,1968500.0,9003,8827,6561666.667,9003,,,
-2918,"NAD83(HARN) / Texas Central (ftUS)",9003,4152,15359,9802,8821,29.4,9110,8822,-100.2,9110,8823,31.53,9110,8824,30.07,9110,8826,2296583.333,9003,8827,9842500.0,9003,,,
-2919,"NAD83(HARN) / Texas South Central (ftUS)",9003,4152,15360,9802,8821,27.5,9110,8822,-99.0,9110,8823,30.17,9110,8824,28.23,9110,8826,1968500.0,9003,8827,13123333.333,9003,,,
-2920,"NAD83(HARN) / Texas South (ftUS)",9003,4152,15361,9802,8821,25.4,9110,8822,-98.3,9110,8823,27.5,9110,8824,26.1,9110,8826,984250.0,9003,8827,16404166.667,9003,,,
-2921,"NAD83(HARN) / Utah North (ft)",9002,4152,15362,9802,8821,40.2,9110,8822,-111.3,9110,8823,41.47,9110,8824,40.43,9110,8826,1640419.948,9002,8827,3280839.895,9002,,,
-2922,"NAD83(HARN) / Utah Central (ft)",9002,4152,15363,9802,8821,38.2,9110,8822,-111.3,9110,8823,40.39,9110,8824,39.01,9110,8826,1640419.948,9002,8827,6561679.79,9002,,,
-2923,"NAD83(HARN) / Utah South (ft)",9002,4152,15364,9802,8821,36.4,9110,8822,-111.3,9110,8823,38.21,9110,8824,37.13,9110,8826,1640419.948,9002,8827,9842519.685,9002,,,
-2924,"NAD83(HARN) / Virginia North (ftUS)",9003,4152,15365,9802,8821,37.4,9110,8822,-78.3,9110,8823,39.12,9110,8824,38.02,9110,8826,11482916.667,9003,8827,6561666.667,9003,,,
-2925,"NAD83(HARN) / Virginia South (ftUS)",9003,4152,15366,9802,8821,36.2,9110,8822,-78.3,9110,8823,37.58,9110,8824,36.46,9110,8826,11482916.667,9003,8827,3280833.333,9003,,,
-2926,"NAD83(HARN) / Washington North (ftUS)",9003,4152,15367,9802,8821,47.0,9110,8822,-120.5,9110,8823,48.44,9110,8824,47.3,9110,8826,1640416.667,9003,8827,0.0,9003,,,
-2927,"NAD83(HARN) / Washington South (ftUS)",9003,4152,15368,9802,8821,45.2,9110,8822,-120.3,9110,8823,47.2,9110,8824,45.5,9110,8826,1640416.667,9003,8827,0.0,9003,,,
-2928,"NAD83(HARN) / Wisconsin North (ftUS)",9003,4152,15369,9802,8821,45.1,9110,8822,-90.0,9110,8823,46.46,9110,8824,45.34,9110,8826,1968500.0,9003,8827,0.0,9003,,,
-2929,"NAD83(HARN) / Wisconsin Central (ftUS)",9003,4152,15370,9802,8821,43.5,9110,8822,-90.0,9110,8823,45.3,9110,8824,44.15,9110,8826,1968500.0,9003,8827,0.0,9003,,,
-2930,"NAD83(HARN) / Wisconsin South (ftUS)",9003,4152,15371,9802,8821,42.0,9110,8822,-90.0,9110,8823,44.04,9110,8824,42.44,9110,8826,1968500.0,9003,8827,0.0,9003,,,
-2931,"Beduaram / TM 13 NE",9003,4213,16413,9807,8801,0.0,9102,8802,13.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2932,"QND95 / Qatar National Grid",9001,4614,19919,9807,8801,24.27,9110,8802,51.13,9110,8805,0.99999,9201,8806,200000.0,9001,8807,300000.0,9001,,,,,,
-2933,"Segara / UTM zone 50S",9001,4613,16150,9807,8801,0.0,9102,8802,117.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-2934,"Segara (Jakarta) / NEIEZ",9001,4820,19905,9804,8801,0.0,9102,8802,110.0,9102,8805,0.997,9201,8806,3900000.0,9001,8807,900000.0,9001,,,,,,
-2935,"Pulkovo 1942 / CS63 zone A1",9001,4284,18441,9807,8801,0.07,9110,8802,41.32,9110,8805,1.0,9003,8806,1300000.0,9001,8807,0.0,9001,,,,,,
-2936,"Pulkovo 1942 / CS63 zone A2",9001,4284,18442,9807,8801,0.07,9110,8802,44.32,9110,8805,1.0,9003,8806,2300000.0,9001,8807,0.0,9001,,,,,,
-2937,"Pulkovo 1942 / CS63 zone A3",9001,4284,18443,9807,8801,0.07,9110,8802,47.32,9110,8805,1.0,9201,8806,3300000.0,9001,8807,0.0,9001,,,,,,
-2938,"Pulkovo 1942 / CS63 zone A4",9001,4284,18444,9807,8801,0.07,9110,8802,50.32,9110,8805,1.0,9201,8806,4300000.0,9001,8807,0.0,9001,,,,,,
-2939,"Pulkovo 1942 / CS63 zone K2",9001,4284,18446,9807,8801,0.08,9110,8802,50.46,9110,8805,1.0,9201,8806,2300000.0,9001,8807,0.0,9001,,,,,,
-2940,"Pulkovo 1942 / CS63 zone K3",9001,4284,18447,9807,8801,0.08,9110,8802,53.46,9110,8805,1.0,9201,8806,3300000.0,9001,8807,0.0,9001,,,,,,
-2941,"Pulkovo 1942 / CS63 zone K4",9001,4284,18448,9807,8801,0.08,9110,8802,56.46,9110,8805,1.0,9201,8806,4300000.0,9001,8807,0.0,9001,,,,,,
-2942,"Porto Santo / UTM zone 28N",9001,4615,16028,9807,8801,0.0,9102,8802,-15.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2943,"Selvagem Grande / UTM zone 28N",9001,4616,16028,9807,8801,0.0,9102,8802,-15.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2944,"NAD83(CSRS) / SCoPQ zone 2",9001,4617,17700,9807,8801,0.0,9110,8802,-55.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-2945,"NAD83(CSRS) / MTM zone 3",9001,4617,17703,9807,8801,0.0,9110,8802,-58.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-2946,"NAD83(CSRS) / MTM zone 4",9001,4617,17704,9807,8801,0.0,9110,8802,-61.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-2947,"NAD83(CSRS) / MTM zone 5",9001,4617,17705,9807,8801,0.0,9110,8802,-64.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-2948,"NAD83(CSRS) / MTM zone 6",9001,4617,17706,9807,8801,0.0,9110,8802,-67.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-2949,"NAD83(CSRS) / MTM zone 7",9001,4617,17707,9807,8801,0.0,9110,8802,-70.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-2950,"NAD83(CSRS) / MTM zone 8",9001,4617,17708,9807,8801,0.0,9110,8802,-73.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-2951,"NAD83(CSRS) / MTM zone 9",9001,4617,17709,9807,8801,0.0,9110,8802,-76.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-2952,"NAD83(CSRS) / MTM zone 10",9001,4617,17710,9807,8801,0.0,9110,8802,-79.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-2953,"NAD83(CSRS) / New Brunswick Stereo",9001,4617,19946,9809,8801,46.3,9110,8802,-66.3,9110,8805,0.999912,9201,8806,2500000.0,9001,8807,7500000.0,9001,,,,,,
-2954,"NAD83(CSRS) / Prince Edward Isl. Stereographic (NAD83)",9001,4617,19960,9809,8801,47.15,9110,8802,-63.0,9110,8805,0.999912,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-2955,"NAD83(CSRS) / UTM zone 11N",9001,4617,16011,9807,8801,0.0,9102,8802,-117.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2956,"NAD83(CSRS) / UTM zone 12N",9001,4617,16012,9807,8801,0.0,9102,8802,-111.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2957,"NAD83(CSRS) / UTM zone 13N",9001,4617,16013,9807,8801,0.0,9102,8802,-105.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2958,"NAD83(CSRS) / UTM zone 17N",9001,4617,16017,9807,8801,0.0,9102,8802,-81.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2959,"NAD83(CSRS) / UTM zone 18N",9001,4617,16018,9807,8801,0.0,9102,8802,-75.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2960,"NAD83(CSRS) / UTM zone 19N",9001,4617,16019,9807,8801,0.0,9102,8802,-69.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2961,"NAD83(CSRS) / UTM zone 20N",9001,4617,16020,9807,8801,0.0,9102,8802,-63.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2962,"NAD83(CSRS) / UTM zone 21N",9001,4617,16021,9807,8801,0.0,9102,8802,-57.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-2963,"Lisbon 1890 (Lisbon) / Portugal Bonne",9001,4904,19979,9828,8801,39.4,9110,8802,1.0,9110,8806,0.0,9001,8807,0.0,9001,,,,,,,,,
-3036,"Moznet / UTM zone 36S",9001,4130,16136,9807,8801,0.0,9102,8802,33.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-3037,"Moznet / UTM zone 37S",9001,4130,16137,9807,8801,0.0,9102,8802,39.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-3148,"Indian 1960 / UTM zone 48N",9001,4131,16048,9807,8801,0.0,9102,8802,105.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-3149,"Indian 1960 / UTM zone 49N",9001,4131,16049,9807,8801,0.0,9102,8802,111.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-3176,"Indian 1960 / TM 106 NE",9001,4131,16506,9807,8801,0.0,9102,8802,106.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-3200,"FD58 / Iraq zone",9001,4132,19906,9801,8801,32.3,9110,8802,45.0,9110,8805,0.9987864078,9201,8806,1500000.0,9001,8807,1166200.0,9001,,,,,,
-3300,Estonian Coordinate System of 1992,9001,4133,19938,9802,8821,57.310319415,9110,8822,24.0,9110,8823,59.2,9110,8824,58.0,9110,8826,500000.0,9001,8827,6375000.0,9001,,,
-3301,Estonian Coordinate System of 1997,9001,4180,19938,9802,8821,57.310319415,9110,8822,24.0,9110,8823,59.2,9110,8824,58.0,9110,8826,500000.0,9001,8827,6375000.0,9001,,,
-3439,"PSD93 / UTM zone 39N",9001,4134,16039,9807,8801,0.0,9102,8802,51.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-3440,"PSD93 / UTM zone 40N",9001,4134,16040,9807,8801,0.0,9102,8802,57.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-3561,"Old Hawaiian / Hawaii zone 1",9003,4135,15101,9807,8801,18.5,9110,8802,-155.3,9110,8805,0.999966667,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-3562,"Old Hawaiian / Hawaii zone 2",9003,4135,15102,9807,8801,20.2,9110,8802,-156.4,9110,8805,0.999966667,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-3563,"Old Hawaiian / Hawaii zone 3",9003,4135,15103,9807,8801,21.1,9110,8802,-158.0,9110,8805,0.99999,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-3564,"Old Hawaiian / Hawaii zone 4",9003,4135,15104,9807,8801,21.5,9110,8802,-159.3,9110,8805,0.99999,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-3565,"Old Hawaiian / Hawaii zone 5",9003,4135,15105,9807,8801,21.4,9110,8802,-160.1,9110,8805,1.0,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-3920,"Puerto Rico / UTM zone 20N",9001,4139,16020,9807,8801,0.0,9102,8802,-63.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-3991,Puerto Rico State Plane CS of 1927,9003,4139,15201,9802,8821,17.5,9110,8822,-66.26,9110,8823,18.26,9110,8824,18.02,9110,8826,500000.0,9003,8827,0.0,9003,,,
-3992,"Puerto Rico / St. Croix",9003,4139,15202,9802,8821,17.5,9110,8822,-66.26,9110,8823,18.26,9110,8824,18.02,9110,8826,500000.0,9003,8827,100000.0,9003,,,
-20004,"Pulkovo 1995 / Gauss-Kruger zone 4",9001,4200,16204,9807,8801,0.0,9102,8802,21.0,9102,8805,1.0,9201,8806,4500000.0,9001,8807,0.0,9001,,,,,,
-20005,"Pulkovo 1995 / Gauss-Kruger zone 5",9001,4200,16205,9807,8801,0.0,9102,8802,27.0,9102,8805,1.0,9201,8806,5500000.0,9001,8807,0.0,9001,,,,,,
-20006,"Pulkovo 1995 / Gauss-Kruger zone 6",9001,4200,16206,9807,8801,0.0,9102,8802,33.0,9102,8805,1.0,9201,8806,6500000.0,9001,8807,0.0,9001,,,,,,
-20007,"Pulkovo 1995 / Gauss-Kruger zone 7",9001,4200,16207,9807,8801,0.0,9102,8802,39.0,9102,8805,1.0,9201,8806,7500000.0,9001,8807,0.0,9001,,,,,,
-20008,"Pulkovo 1995 / Gauss-Kruger zone 8",9001,4200,16208,9807,8801,0.0,9102,8802,45.0,9102,8805,1.0,9201,8806,8500000.0,9001,8807,0.0,9001,,,,,,
-20009,"Pulkovo 1995 / Gauss-Kruger zone 9",9001,4200,16209,9807,8801,0.0,9102,8802,51.0,9102,8805,1.0,9201,8806,9500000.0,9001,8807,0.0,9001,,,,,,
-20010,"Pulkovo 1995 / Gauss-Kruger zone 10",9001,4200,16210,9807,8801,0.0,9102,8802,57.0,9102,8805,1.0,9201,8806,10500000.0,9001,8807,0.0,9001,,,,,,
-20011,"Pulkovo 1995 / Gauss-Kruger zone 11",9001,4200,16211,9807,8801,0.0,9102,8802,63.0,9102,8805,1.0,9201,8806,11500000.0,9001,8807,0.0,9001,,,,,,
-20012,"Pulkovo 1995 / Gauss-Kruger zone 12",9001,4200,16212,9807,8801,0.0,9102,8802,69.0,9102,8805,1.0,9201,8806,12500000.0,9001,8807,0.0,9001,,,,,,
-20013,"Pulkovo 1995 / Gauss-Kruger zone 13",9001,4200,16213,9807,8801,0.0,9102,8802,75.0,9102,8805,1.0,9201,8806,13500000.0,9001,8807,0.0,9001,,,,,,
-20014,"Pulkovo 1995 / Gauss-Kruger zone 14",9001,4200,16214,9807,8801,0.0,9102,8802,81.0,9102,8805,1.0,9201,8806,14500000.0,9001,8807,0.0,9001,,,,,,
-20015,"Pulkovo 1995 / Gauss-Kruger zone 15",9001,4200,16215,9807,8801,0.0,9102,8802,87.0,9102,8805,1.0,9201,8806,15500000.0,9001,8807,0.0,9001,,,,,,
-20016,"Pulkovo 1995 / Gauss-Kruger zone 16",9001,4200,16216,9807,8801,0.0,9102,8802,93.0,9102,8805,1.0,9201,8806,16500000.0,9001,8807,0.0,9001,,,,,,
-20017,"Pulkovo 1995 / Gauss-Kruger zone 17",9001,4200,16217,9807,8801,0.0,9102,8802,99.0,9102,8805,1.0,9201,8806,17500000.0,9001,8807,0.0,9001,,,,,,
-20018,"Pulkovo 1995 / Gauss-Kruger zone 18",9001,4200,16218,9807,8801,0.0,9102,8802,105.0,9102,8805,1.0,9201,8806,18500000.0,9001,8807,0.0,9001,,,,,,
-20019,"Pulkovo 1995 / Gauss-Kruger zone 19",9001,4200,16219,9807,8801,0.0,9102,8802,111.0,9102,8805,1.0,9201,8806,19500000.0,9001,8807,0.0,9001,,,,,,
-20020,"Pulkovo 1995 / Gauss-Kruger zone 20",9001,4200,16220,9807,8801,0.0,9102,8802,117.0,9102,8805,1.0,9201,8806,20500000.0,9001,8807,0.0,9001,,,,,,
-20021,"Pulkovo 1995 / Gauss-Kruger zone 21",9001,4200,16221,9807,8801,0.0,9102,8802,123.0,9102,8805,1.0,9201,8806,21500000.0,9001,8807,0.0,9001,,,,,,
-20022,"Pulkovo 1995 / Gauss-Kruger zone 22",9001,4200,16222,9807,8801,0.0,9102,8802,129.0,9102,8805,1.0,9201,8806,22500000.0,9001,8807,0.0,9001,,,,,,
-20023,"Pulkovo 1995 / Gauss-Kruger zone 23",9001,4200,16223,9807,8801,0.0,9102,8802,135.0,9102,8805,1.0,9201,8806,23500000.0,9001,8807,0.0,9001,,,,,,
-20024,"Pulkovo 1995 / Gauss-Kruger zone 24",9001,4200,16224,9807,8801,0.0,9102,8802,141.0,9102,8805,1.0,9201,8806,24500000.0,9001,8807,0.0,9001,,,,,,
-20025,"Pulkovo 1995 / Gauss-Kruger zone 25",9001,4200,16225,9807,8801,0.0,9102,8802,147.0,9102,8805,1.0,9201,8806,25500000.0,9001,8807,0.0,9001,,,,,,
-20026,"Pulkovo 1995 / Gauss-Kruger zone 26",9001,4200,16226,9807,8801,0.0,9102,8802,153.0,9102,8805,1.0,9201,8806,26500000.0,9001,8807,0.0,9001,,,,,,
-20027,"Pulkovo 1995 / Gauss-Kruger zone 27",9001,4200,16227,9807,8801,0.0,9102,8802,159.0,9102,8805,1.0,9201,8806,27500000.0,9001,8807,0.0,9001,,,,,,
-20028,"Pulkovo 1995 / Gauss-Kruger zone 28",9001,4200,16228,9807,8801,0.0,9102,8802,165.0,9102,8805,1.0,9201,8806,28500000.0,9001,8807,0.0,9001,,,,,,
-20029,"Pulkovo 1995 / Gauss-Kruger zone 29",9001,4200,16229,9807,8801,0.0,9102,8802,171.0,9102,8805,1.0,9201,8806,29500000.0,9001,8807,0.0,9001,,,,,,
-20030,"Pulkovo 1995 / Gauss-Kruger zone 30",9001,4200,16230,9807,8801,0.0,9102,8802,177.0,9102,8805,1.0,9201,8806,30500000.0,9001,8807,0.0,9001,,,,,,
-20031,"Pulkovo 1995 / Gauss-Kruger zone 31",9001,4200,16231,9807,8801,0.0,9102,8802,-177.0,9102,8805,1.0,9201,8806,31500000.0,9001,8807,0.0,9001,,,,,,
-20032,"Pulkovo 1995 / Gauss-Kruger zone 32",9001,4200,16232,9807,8801,0.0,9102,8802,-171.0,9102,8805,1.0,9201,8806,32500000.0,9001,8807,0.0,9001,,,,,,
-20064,"Pulkovo 1995 / Gauss-Kruger 4N",9001,4200,16304,9807,8801,0.0,9102,8802,21.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-20065,"Pulkovo 1995 / Gauss-Kruger 5N",9001,4200,16305,9807,8801,0.0,9102,8802,27.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-20066,"Pulkovo 1995 / Gauss-Kruger 6N",9001,4200,16306,9807,8801,0.0,9102,8802,33.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-20067,"Pulkovo 1995 / Gauss-Kruger 7N",9001,4200,16307,9807,8801,0.0,9102,8802,39.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-20068,"Pulkovo 1995 / Gauss-Kruger 8N",9001,4200,16308,9807,8801,0.0,9102,8802,45.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-20069,"Pulkovo 1995 / Gauss-Kruger 9N",9001,4200,16309,9807,8801,0.0,9102,8802,51.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-20070,"Pulkovo 1995 / Gauss-Kruger 10N",9001,4200,16310,9807,8801,0.0,9102,8802,57.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-20071,"Pulkovo 1995 / Gauss-Kruger 11N",9001,4200,16311,9807,8801,0.0,9102,8802,63.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-20072,"Pulkovo 1995 / Gauss-Kruger 12N",9001,4200,16312,9807,8801,0.0,9102,8802,69.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-20073,"Pulkovo 1995 / Gauss-Kruger 13N",9001,4200,16313,9807,8801,0.0,9102,8802,75.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-20074,"Pulkovo 1995 / Gauss-Kruger 14N",9001,4200,16314,9807,8801,0.0,9102,8802,81.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-20075,"Pulkovo 1995 / Gauss-Kruger 15N",9001,4200,16315,9807,8801,0.0,9102,8802,87.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-20076,"Pulkovo 1995 / Gauss-Kruger 16N",9001,4200,16316,9807,8801,0.0,9102,8802,93.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-20077,"Pulkovo 1995 / Gauss-Kruger 17N",9001,4200,16317,9807,8801,0.0,9102,8802,99.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-20078,"Pulkovo 1995 / Gauss-Kruger 18N",9001,4200,16318,9807,8801,0.0,9102,8802,105.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-20079,"Pulkovo 1995 / Gauss-Kruger 19N",9001,4200,16319,9807,8801,0.0,9102,8802,111.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-20080,"Pulkovo 1995 / Gauss-Kruger 20N",9001,4200,16320,9807,8801,0.0,9102,8802,117.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-20081,"Pulkovo 1995 / Gauss-Kruger 21N",9001,4200,16321,9807,8801,0.0,9102,8802,123.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-20082,"Pulkovo 1995 / Gauss-Kruger 22N",9001,4200,16322,9807,8801,0.0,9102,8802,129.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-20083,"Pulkovo 1995 / Gauss-Kruger 23N",9001,4200,16323,9807,8801,0.0,9102,8802,135.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-20084,"Pulkovo 1995 / Gauss-Kruger 24N",9001,4200,16324,9807,8801,0.0,9102,8802,141.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-20085,"Pulkovo 1995 / Gauss-Kruger 25N",9001,4200,16325,9807,8801,0.0,9102,8802,147.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-20086,"Pulkovo 1995 / Gauss-Kruger 26N",9001,4200,16326,9807,8801,0.0,9102,8802,153.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-20087,"Pulkovo 1995 / Gauss-Kruger 27N",9001,4200,16327,9807,8801,0.0,9102,8802,159.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-20088,"Pulkovo 1995 / Gauss-Kruger 28N",9001,4200,16328,9807,8801,0.0,9102,8802,165.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-20089,"Pulkovo 1995 / Gauss-Kruger 29N",9001,4200,16329,9807,8801,0.0,9102,8802,171.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-20090,"Pulkovo 1995 / Gauss-Kruger 30N",9001,4200,16330,9807,8801,0.0,9102,8802,177.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-20091,"Pulkovo 1995 / Gauss-Kruger 31N",9001,4200,16331,9807,8801,0.0,9102,8802,-177.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-20092,"Pulkovo 1995 / Gauss-Kruger 32N",9001,4200,16332,9807,8801,0.0,9102,8802,-171.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-20137,"Adindan / UTM zone 37N",9001,4201,16037,9807,8801,0.0,9102,8802,39.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-20138,"Adindan / UTM zone 38N",9001,4201,16038,9807,8801,0.0,9102,8802,45.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-20248,"AGD66 / AMG zone 48",9001,4202,17448,9807,8801,0.0,9102,8802,105.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-20249,"AGD66 / AMG zone 49",9001,4202,17449,9807,8801,0.0,9102,8802,111.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-20250,"AGD66 / AMG zone 50",9001,4202,17450,9807,8801,0.0,9102,8802,117.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-20251,"AGD66 / AMG zone 51",9001,4202,17451,9807,8801,0.0,9102,8802,123.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-20252,"AGD66 / AMG zone 52",9001,4202,17452,9807,8801,0.0,9102,8802,129.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-20253,"AGD66 / AMG zone 53",9001,4202,17453,9807,8801,0.0,9102,8802,135.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-20254,"AGD66 / AMG zone 54",9001,4202,17454,9807,8801,0.0,9102,8802,141.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-20255,"AGD66 / AMG zone 55",9001,4202,17455,9807,8801,0.0,9102,8802,147.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-20256,"AGD66 / AMG zone 56",9001,4202,17456,9807,8801,0.0,9102,8802,153.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-20257,"AGD66 / AMG zone 57",9001,4202,17457,9807,8801,0.0,9102,8802,159.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-20258,"AGD66 / AMG zone 58",9001,4202,17458,9807,8801,0.0,9102,8802,165.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-20348,"AGD84 / AMG zone 48",9001,4203,17448,9807,8801,0.0,9102,8802,105.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-20349,"AGD84 / AMG zone 49",9001,4203,17449,9807,8801,0.0,9102,8802,111.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-20350,"AGD84 / AMG zone 50",9001,4203,17450,9807,8801,0.0,9102,8802,117.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-20351,"AGD84 / AMG zone 51",9001,4203,17451,9807,8801,0.0,9102,8802,123.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-20352,"AGD84 / AMG zone 52",9001,4203,17452,9807,8801,0.0,9102,8802,129.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-20353,"AGD84 / AMG zone 53",9001,4203,17453,9807,8801,0.0,9102,8802,135.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-20354,"AGD84 / AMG zone 54",9001,4203,17454,9807,8801,0.0,9102,8802,141.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-20355,"AGD84 / AMG zone 55",9001,4203,17455,9807,8801,0.0,9102,8802,147.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-20356,"AGD84 / AMG zone 56",9001,4203,17456,9807,8801,0.0,9102,8802,153.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-20357,"AGD84 / AMG zone 57",9001,4203,17457,9807,8801,0.0,9102,8802,159.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-20358,"AGD84 / AMG zone 58",9001,4203,17458,9807,8801,0.0,9102,8802,165.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-20437,"Ain el Abd / UTM zone 37N",9001,4204,16037,9807,8801,0.0,9102,8802,39.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-20438,"Ain el Abd / UTM zone 38N",9001,4204,16038,9807,8801,0.0,9102,8802,45.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-20439,"Ain el Abd / UTM zone 39N",9001,4204,16039,9807,8801,0.0,9102,8802,51.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-20499,"Ain el Abd / Bahrain Grid",9001,4204,19900,9807,8801,0.0,9102,8802,51.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-20538,"Afgooye / UTM zone 38N",9001,4205,16038,9807,8801,0.0,9102,8802,45.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-20539,"Afgooye / UTM zone 39N",9001,4205,16039,9807,8801,0.0,9102,8802,51.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-20790,"Lisbon (Lisbon)/Portuguese National Grid",9001,4803,19936,9807,8801,39.4,9110,8802,1.0,9110,8805,1.0,9201,8806,200000.0,9001,8807,300000.0,9001,,,,,,
-20791,"Lisbon (Lisbon)/Portuguese Grid",9001,4803,19969,9807,8801,39.4,9110,8802,1.0,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-20822,"Aratu / UTM zone 22S",9001,4208,16122,9807,8801,0.0,9102,8802,-51.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-20823,"Aratu / UTM zone 23S",9001,4208,16123,9807,8801,0.0,9102,8802,-45.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-20824,"Aratu / UTM zone 24S",9001,4208,16124,9807,8801,0.0,9102,8802,-39.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-20934,"Arc 1950 / UTM zone 34S",9001,4209,16134,9807,8801,0.0,9102,8802,21.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-20935,"Arc 1950 / UTM zone 35S",9001,4209,16135,9807,8801,0.0,9102,8802,27.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-20936,"Arc 1950 / UTM zone 36S",9001,4209,16136,9807,8801,0.0,9102,8802,33.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-21035,"Arc 1960 / UTM zone 35S",9001,4210,16135,9807,8801,0.0,9102,8802,27.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-21036,"Arc 1960 / UTM zone 36S",9001,4210,16136,9807,8801,0.0,9102,8802,33.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-21037,"Arc 1960 / UTM zone 37S",9001,4210,16137,9807,8801,0.0,9102,8802,39.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-21095,"Arc 1960 / UTM zone 35N",9001,4210,16035,9807,8801,0.0,9102,8802,27.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-21096,"Arc 1960 / UTM zone 36N",9001,4210,16036,9807,8801,0.0,9102,8802,33.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-21097,"Arc 1960 / UTM zone 37N",9001,4210,16037,9807,8801,0.0,9102,8802,39.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-21100,"Batavia (Jakarta) / NEIEZ",9001,4813,19905,9804,8801,0.0,9102,8802,110.0,9102,8805,0.997,9201,8806,3900000.0,9001,8807,900000.0,9001,,,,,,
-21148,"Batavia / UTM zone 48S",9001,4211,16148,9807,8801,0.0,9102,8802,105.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-21149,"Batavia / UTM zone 49S",9001,4211,16149,9807,8801,0.0,9102,8802,111.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-21150,"Batavia / UTM zone 50S",9001,4211,16150,9807,8801,0.0,9102,8802,117.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-21291,"Barbados 1938 / British West Indies Grid",9001,4212,19942,9807,8801,0.0,9102,8802,-62.0,9102,8805,0.9995,9201,8806,400000.0,9001,8807,0.0,9001,,,,,,
-21292,"Barbados 1938 / Barbados National Grid",9001,4212,19943,9807,8801,13.1035,9110,8802,-59.3335,9110,8805,0.9999986,9201,8806,30000.0,9001,8807,75000.0,9001,,,,,,
-21413,"Beijing 1954 / Gauss-Kruger zone 13",9001,4214,16213,9807,8801,0.0,9102,8802,75.0,9102,8805,1.0,9201,8806,13500000.0,9001,8807,0.0,9001,,,,,,
-21414,"Beijing 1954 / Gauss-Kruger zone 14",9001,4214,16214,9807,8801,0.0,9102,8802,81.0,9102,8805,1.0,9201,8806,14500000.0,9001,8807,0.0,9001,,,,,,
-21415,"Beijing 1954 / Gauss-Kruger zone 15",9001,4214,16215,9807,8801,0.0,9102,8802,87.0,9102,8805,1.0,9201,8806,15500000.0,9001,8807,0.0,9001,,,,,,
-21416,"Beijing 1954 / Gauss-Kruger zone 16",9001,4214,16216,9807,8801,0.0,9102,8802,93.0,9102,8805,1.0,9201,8806,16500000.0,9001,8807,0.0,9001,,,,,,
-21417,"Beijing 1954 / Gauss-Kruger zone 17",9001,4214,16217,9807,8801,0.0,9102,8802,99.0,9102,8805,1.0,9201,8806,17500000.0,9001,8807,0.0,9001,,,,,,
-21418,"Beijing 1954 / Gauss-Kruger zone 18",9001,4214,16218,9807,8801,0.0,9102,8802,105.0,9102,8805,1.0,9201,8806,18500000.0,9001,8807,0.0,9001,,,,,,
-21419,"Beijing 1954 / Gauss-Kruger zone 19",9001,4214,16219,9807,8801,0.0,9102,8802,111.0,9102,8805,1.0,9201,8806,19500000.0,9001,8807,0.0,9001,,,,,,
-21420,"Beijing 1954 / Gauss-Kruger zone 20",9001,4214,16220,9807,8801,0.0,9102,8802,117.0,9102,8805,1.0,9201,8806,20500000.0,9001,8807,0.0,9001,,,,,,
-21421,"Beijing 1954 / Gauss-Kruger zone 21",9001,4214,16221,9807,8801,0.0,9102,8802,123.0,9102,8805,1.0,9201,8806,21500000.0,9001,8807,0.0,9001,,,,,,
-21422,"Beijing 1954 / Gauss-Kruger zone 22",9001,4214,16222,9807,8801,0.0,9102,8802,129.0,9102,8805,1.0,9201,8806,22500000.0,9001,8807,0.0,9001,,,,,,
-21423,"Beijing 1954 / Gauss-Kruger zone 23",9001,4214,16223,9807,8801,0.0,9102,8802,135.0,9102,8805,1.0,9201,8806,23500000.0,9001,8807,0.0,9001,,,,,,
-21453,"Beijing 1954 / Gauss-Kruger CM 75E",9001,4214,16313,9807,8801,0.0,9102,8802,75.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-21454,"Beijing 1954 / Gauss-Kruger CM 81E",9001,4214,16314,9807,8801,0.0,9102,8802,81.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-21455,"Beijing 1954 / Gauss-Kruger CM 87E",9001,4214,16315,9807,8801,0.0,9102,8802,87.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-21456,"Beijing 1954 / Gauss-Kruger CM 93E",9001,4214,16316,9807,8801,0.0,9102,8802,93.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-21457,"Beijing 1954 / Gauss-Kruger CM 99E",9001,4214,16317,9807,8801,0.0,9102,8802,99.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-21458,"Beijing 1954 / Gauss-Kruger CM 105E",9001,4214,16318,9807,8801,0.0,9102,8802,105.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-21459,"Beijing 1954 / Gauss-Kruger CM 111E",9001,4214,16319,9807,8801,0.0,9102,8802,111.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-21460,"Beijing 1954 / Gauss-Kruger CM 117E",9001,4214,16320,9807,8801,0.0,9102,8802,117.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-21461,"Beijing 1954 / Gauss-Kruger CM 123E",9001,4214,16321,9807,8801,0.0,9102,8802,123.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-21462,"Beijing 1954 / Gauss-Kruger CM 129E",9001,4214,16322,9807,8801,0.0,9102,8802,129.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-21463,"Beijing 1954 / Gauss-Kruger CM 135E",9001,4214,16323,9807,8801,0.0,9102,8802,135.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-21473,"Beijing 1954 / Gauss-Kruger 13N",9001,4214,16313,9807,8801,0.0,9102,8802,75.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-21474,"Beijing 1954 / Gauss-Kruger 14N",9001,4214,16314,9807,8801,0.0,9102,8802,81.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-21475,"Beijing 1954 / Gauss-Kruger 15N",9001,4214,16315,9807,8801,0.0,9102,8802,87.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-21476,"Beijing 1954 / Gauss-Kruger 16N",9001,4214,16316,9807,8801,0.0,9102,8802,93.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-21477,"Beijing 1954 / Gauss-Kruger 17N",9001,4214,16317,9807,8801,0.0,9102,8802,99.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-21478,"Beijing 1954 / Gauss-Kruger 18N",9001,4214,16318,9807,8801,0.0,9102,8802,105.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-21479,"Beijing 1954 / Gauss-Kruger 19N",9001,4214,16319,9807,8801,0.0,9102,8802,111.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-21480,"Beijing 1954 / Gauss-Kruger 20N",9001,4214,16320,9807,8801,0.0,9102,8802,117.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-21481,"Beijing 1954 / Gauss-Kruger 21N",9001,4214,16321,9807,8801,0.0,9102,8802,123.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-21482,"Beijing 1954 / Gauss-Kruger 22N",9001,4214,16322,9807,8801,0.0,9102,8802,129.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-21483,"Beijing 1954 / Gauss-Kruger 23N",9001,4214,16323,9807,8801,0.0,9102,8802,135.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-21500,"Belge 1950 (Brussels) / Belge Lambert 50",9001,4809,19901,9802,8821,90.0,9110,8822,0.0,9110,8823,49.5,9110,8824,51.1,9110,8826,150000.0,9001,8827,5400000.0,9001,,,
-21780,"Bern 1898 (Bern) / LV03C",9001,4801,19923,9815,8811,46.570866,9110,8812,0.0,9110,8813,90.0,9110,8814,90.0,9110,8815,1.0,9201,8816,0.0,9001,8817,0.0,9001
-21781,"CH1903 / LV03",9001,4149,19922,9815,8811,46.570866,9110,8812,7.26225,9110,8813,90.0,9110,8814,90.0,9110,8815,1.0,9201,8816,600000.0,9001,8817,200000.0,9001
-21817,"Bogota 1975 / UTM zone 17N",9001,4218,16017,9807,8801,0.0,9102,8802,-81.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-21818,"Bogota 1975 / UTM zone 18N",9001,4218,16018,9807,8801,0.0,9102,8802,-75.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-21891,"Bogota 1975 / Colombia West zone",9001,4218,18051,9807,8801,4.355657,9110,8802,-77.04513,9110,8805,1.0,9201,8806,1000000.0,9001,8807,1000000.0,9001,,,,,,
-21892,"Bogota 1975 / Colombia Bogota zone",9001,4218,18052,9807,8801,4.355657,9110,8802,-74.04513,9110,8805,1.0,9201,8806,1000000.0,9001,8807,1000000.0,9001,,,,,,
-21893,"Bogota 1975 / Colombia East Central zone",9001,4218,18053,9807,8801,4.355657,9110,8802,-71.04513,9110,8805,1.0,9201,8806,1000000.0,9001,8807,1000000.0,9001,,,,,,
-21894,"Bogota 1975 / Colombia East",9001,4218,18054,9807,8801,4.355657,9110,8802,-68.04513,9110,8805,1.0,9201,8806,1000000.0,9001,8807,1000000.0,9001,,,,,,
-22032,"Camacupa / UTM zone 32S",9001,4220,16132,9807,8801,0.0,9102,8802,9.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-22033,"Camacupa / UTM zone 33S",9001,4220,16133,9807,8801,0.0,9102,8802,15.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-22091,"Camacupa / TM 11.30 SE",9001,4220,16611,9807,8801,0.0,9110,8802,11.3,9110,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-22092,"Camacupa / TM 12 SE",9001,4220,16612,9807,8801,0.0,9102,8802,12.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-22191,"Campo Inchauspe / Argentina 1",9001,4221,18031,9807,8801,-90.0,9102,8802,-72.0,9102,8805,1.0,9201,8806,1500000.0,9001,8807,0.0,9001,,,,,,
-22192,"Campo Inchauspe / Argentina 2",9001,4221,18032,9807,8801,-90.0,9102,8802,-69.0,9102,8805,1.0,9201,8806,2500000.0,9001,8807,0.0,9001,,,,,,
-22193,"Campo Inchauspe / Argentina 3",9001,4221,18033,9807,8801,-90.0,9102,8802,-66.0,9102,8805,1.0,9201,8806,3500000.0,9001,8807,0.0,9001,,,,,,
-22194,"Campo Inchauspe / Argentina 4",9001,4221,18034,9807,8801,-90.0,9102,8802,-63.0,9102,8805,1.0,9201,8806,4500000.0,9001,8807,0.0,9001,,,,,,
-22195,"Campo Inchauspe / Argentina 5",9001,4221,18035,9807,8801,-90.0,9102,8802,-60.0,9102,8805,1.0,9201,8806,5500000.0,9001,8807,0.0,9001,,,,,,
-22196,"Campo Inchauspe / Argentina 6",9001,4221,18036,9807,8801,-90.0,9102,8802,-57.0,9102,8805,1.0,9201,8806,6500000.0,9001,8807,0.0,9001,,,,,,
-22197,"Campo Inchauspe / Argentina 7",9001,4221,18037,9807,8801,-90.0,9102,8802,-54.0,9102,8805,1.0,9201,8806,7500000.0,9001,8807,0.0,9001,,,,,,
-22234,"Cape / UTM zone 34S",9001,4222,16134,9807,8801,0.0,9102,8802,21.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-22235,"Cape / UTM zone 35S",9001,4222,16135,9807,8801,0.0,9102,8802,27.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-22236,"Cape / UTM zone 36S",9001,4222,16136,9807,8801,0.0,9102,8802,33.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-22275,South African Coordinate System zone 15,9001,4222,17515,9808,8801,0.0,9102,8802,15.0,9102,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-22277,South African Coordinate System zone 17,9001,4222,17517,9808,8801,0.0,9102,8802,17.0,9102,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-22279,South African Coordinate System zone 19,9001,4222,17519,9808,8801,0.0,9102,8802,19.0,9102,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-22281,South African Coordinate System zone 21,9001,4222,17521,9808,8801,0.0,9102,8802,21.0,9102,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-22283,South African Coordinate System zone 23,9001,4222,17523,9808,8801,0.0,9102,8802,23.0,9102,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-22285,South African Coordinate System zone 25,9001,4222,17525,9808,8801,0.0,9102,8802,25.0,9102,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-22287,South African Coordinate System zone 27,9001,4222,17527,9808,8801,0.0,9102,8802,27.0,9102,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-22289,South African Coordinate System zone 29,9001,4222,17529,9808,8801,0.0,9102,8802,29.0,9102,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-22291,South African Coordinate System zone 31,9001,4222,17531,9808,8801,0.0,9102,8802,31.0,9102,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-22293,South African Coordinate System zone 33,9001,4222,17533,9808,8801,0.0,9102,8802,33.0,9102,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-22300,"Carthage (Paris) / Tunisia Mining Grid",9036,4816,19937,9816,8821,38.81973,9105,8822,7.83445,9105,8826,270.0,9036,8827,582.0,9036,,,,,,,,,
-22332,"Carthage / UTM zone 32N",9001,4223,16032,9807,8801,0.0,9102,8802,9.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-22391,"Carthage / Nord Tunisie",9001,4223,18181,9801,8801,40.0,9105,8802,11.0,9105,8805,0.999625544,9201,8806,500000.0,9001,8807,300000.0,9001,,,,,,
-22392,"Carthage / Sud Tunisie",9001,4223,18182,9801,8801,37.0,9105,8802,11.0,9105,8805,0.999625769,9201,8806,500000.0,9001,8807,300000.0,9001,,,,,,
-22523,"Corrego Alegre / UTM zone 23S",9001,4225,16123,9807,8801,0.0,9102,8802,-45.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-22524,"Corrego Alegre / UTM zone 24S",9001,4225,16124,9807,8801,0.0,9102,8802,-39.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-22700,"Deir ez Zor / Levant Zone",9001,4227,19940,9817,8801,34.39,9110,8802,37.21,9110,8805,0.9996256,9201,8806,300000.0,9001,8807,300000.0,9001,,,,,,
-22770,"Deir ez Zor / Syria Lambert",9001,4227,19948,9801,8801,34.39,9110,8802,37.21,9110,8805,0.9996256,9201,8806,300000.0,9001,8807,300000.0,9001,,,,,,
-22780,"Deir ez Zor / Levant Stereographic",9001,4227,19949,9809,8801,38.0,9105,8802,43.5,9105,8805,0.9995341,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-22832,"Douala / UTM zone 32N",9001,4228,16032,9807,8801,0.0,9102,8802,9.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-22991,"Egypt 1907 / Blue Belt",9001,4229,18071,9807,8801,30.0,9102,8802,35.0,9102,8805,1.0,9201,8806,300000.0,9001,8807,1100000.0,9001,,,,,,
-22992,"Egypt 1907 / Red Belt",9001,4229,18072,9807,8801,30.0,9102,8802,31.0,9102,8805,1.0,9201,8806,615000.0,9001,8807,810000.0,9001,,,,,,
-22993,"Egypt 1907 / Purple Belt",9001,4229,18073,9807,8801,30.0,9102,8802,27.0,9102,8805,1.0,9201,8806,700000.0,9001,8807,200000.0,9001,,,,,,
-22994,"Egypt 1907 / Extended Purple Belt",9001,4229,18074,9807,8801,30.0,9102,8802,27.0,9102,8805,1.0,9201,8806,700000.0,9001,8807,1200000.0,9001,,,,,,
-23028,"ED50 / UTM zone 28N",9001,4230,16028,9807,8801,0.0,9102,8802,-15.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-23029,"ED50 / UTM zone 29N",9001,4230,16029,9807,8801,0.0,9102,8802,-9.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-23030,"ED50 / UTM zone 30N",9001,4230,16030,9807,8801,0.0,9102,8802,-3.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-23031,"ED50 / UTM zone 31N",9001,4230,16031,9807,8801,0.0,9102,8802,3.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-23032,"ED50 / UTM zone 32N",9001,4230,16032,9807,8801,0.0,9102,8802,9.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-23033,"ED50 / UTM zone 33N",9001,4230,16033,9807,8801,0.0,9102,8802,15.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-23034,"ED50 / UTM zone 34N",9001,4230,16034,9807,8801,0.0,9102,8802,21.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-23035,"ED50 / UTM zone 35N",9001,4230,16035,9807,8801,0.0,9102,8802,27.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-23036,"ED50 / UTM zone 36N",9001,4230,16036,9807,8801,0.0,9102,8802,33.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-23037,"ED50 / UTM zone 37N",9001,4230,16037,9807,8801,0.0,9102,8802,39.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-23038,"ED50 / UTM zone 38N",9001,4230,16038,9807,8801,0.0,9102,8802,45.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-23090,"ED50 / TM 0 N",9001,4230,16400,9807,8801,0.0,9102,8802,0.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-23095,"ED50 / TM 5 NE",9001,4230,16405,9807,8801,0.0,9102,8802,5.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-23239,"Fahud / UTM zone 39N",9001,4232,16039,9807,8801,0.0,9102,8802,51.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-23240,"Fahud / UTM zone 40N",9001,4232,16040,9807,8801,0.0,9102,8802,57.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-23433,"Garoua / UTM zone 33N",9001,4234,16033,9807,8801,0.0,9102,8802,15.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-23700,"HD72 / EOV",9001,4237,19931,9815,8811,47.08398174,9110,8812,19.02548584,9110,8813,90.0,9110,8814,90.0,9110,8815,0.99993,9201,8816,650000.0,9001,8817,200000.0,9001
-23846,"ID74 / UTM zone 46N",9001,4238,16046,9807,8801,0.0,9102,8802,93.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-23847,"ID74 / UTM zone 47N",9001,4238,16047,9807,8801,0.0,9102,8802,99.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-23848,"ID74 / UTM zone 48N",9001,4238,16048,9807,8801,0.0,9102,8802,105.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-23849,"ID74 / UTM zone 49N",9001,4238,16049,9807,8801,0.0,9102,8802,111.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-23850,"ID74 / UTM zone 50N",9001,4238,16050,9807,8801,0.0,9102,8802,117.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-23851,"ID74 / UTM zone 51N",9001,4238,16051,9807,8801,0.0,9102,8802,123.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-23852,"ID74 / UTM zone 52N",9001,4238,16052,9807,8801,0.0,9102,8802,129.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-23853,"ID74 / UTM zone 53N",9001,4238,16053,9807,8801,0.0,9102,8802,135.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-23886,"ID74 / UTM zone 46S",9001,4238,16146,9807,8801,0.0,9102,8802,93.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-23887,"ID74 / UTM zone 47S",9001,4238,16147,9807,8801,0.0,9102,8802,99.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-23888,"ID74 / UTM zone 48S",9001,4238,16148,9807,8801,0.0,9102,8802,105.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-23889,"ID74 / UTM zone 49S",9001,4238,16149,9807,8801,0.0,9102,8802,111.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-23890,"ID74 / UTM zone 50S",9001,4238,16150,9807,8801,0.0,9102,8802,117.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-23891,"ID74 / UTM zone 51S",9001,4238,16151,9807,8801,0.0,9102,8802,123.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-23892,"ID74 / UTM zone 52S",9001,4238,16152,9807,8801,0.0,9102,8802,129.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-23893,"ID74 / UTM zone 53S",9001,4238,16153,9807,8801,0.0,9102,8802,135.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-23894,"ID74 / UTM zone 54S",9001,4238,16154,9807,8801,0.0,9102,8802,141.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-23946,"Indian 1954 / UTM zone 46N",9001,4239,16046,9807,8801,0.0,9102,8802,93.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-23947,"Indian 1954 / UTM zone 47N",9001,4239,16047,9807,8801,0.0,9102,8802,99.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-23948,"Indian 1954 / UTM zone 48N",9001,4239,16048,9807,8801,0.0,9102,8802,105.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-24047,"Indian 1975 / UTM zone 47N",9001,4240,16047,9807,8801,0.0,9102,8802,99.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-24048,"Indian 1975 / UTM zone 48N",9001,4240,16048,9807,8801,0.0,9102,8802,105.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-24100,"Jamaica 1875 / Jamaica (Old Grid)",9005,4241,19909,9801,8801,18.0,9102,8802,-77.0,9102,8805,1.0,9201,8806,550000.0,9005,8807,400000.0,9005,,,,,,
-24200,"JAD69 / Jamaica National Grid",9001,4242,19910,9801,8801,18.0,9102,8802,-77.0,9102,8805,1.0,9201,8806,250000.0,9001,8807,150000.0,9001,,,,,,
-24305,"Kalianpur 1937 / UTM zone 45N",9001,4144,16045,9807,8801,0.0,9102,8802,87.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-24306,"Kalianpur 1937 / UTM zone 46N",9001,4144,16046,9807,8801,0.0,9102,8802,93.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-24311,"Kalianpur 1962 / UTM zone 41N",9001,4145,16041,9807,8801,0.0,9102,8802,63.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-24312,"Kalianpur 1962 / UTM zone 42N",9001,4145,16042,9807,8801,0.0,9102,8802,69.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-24313,"Kalianpur 1962 / UTM zone 43N",9001,4145,16043,9807,8801,0.0,9102,8802,75.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-24342,"Kalianpur 1975 / UTM zone 42N",9001,4146,16042,9807,8801,0.0,9102,8802,69.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-24343,"Kalianpur 1975 / UTM zone 43N",9001,4146,16043,9807,8801,0.0,9102,8802,75.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-24344,"Kalianpur 1975 / UTM zone 44N",9001,4146,16044,9807,8801,0.0,9102,8802,81.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-24345,"Kalianpur 1975 / UTM zone 45N",9001,4146,16045,9807,8801,0.0,9102,8802,87.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-24346,"Kalianpur 1975 / UTM zone 46N",9001,4146,16046,9807,8801,0.0,9102,8802,93.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-24347,"Kalianpur 1975 / UTM zone 47N",9001,4146,16047,9807,8801,0.0,9102,8802,99.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-24370,"Kalianpur 1880 / India zone 0",9084,4243,18110,9801,8801,39.3,9110,8802,68.0,9110,8805,0.99846154,9201,8806,2355500.0,9084,8807,2590000.0,9084,,,,,,
-24371,"Kalianpur 1880 / India zone I",9084,4243,18111,9801,8801,32.3,9110,8802,68.0,9110,8805,0.99878641,9201,8806,3000000.0,9084,8807,1000000.0,9084,,,,,,
-24372,"Kalianpur 1880 / India zone IIa",9084,4243,18112,9801,8801,26.0,9102,8802,74.0,9102,8805,0.99878641,9201,8806,3000000.0,9084,8807,1000000.0,9084,,,,,,
-24373,"Kalianpur 1880 / India zone III",9084,4243,18114,9801,8801,19.0,9102,8802,80.0,9102,8805,0.99878641,9201,8806,3000000.0,9084,8807,1000000.0,9084,,,,,,
-24374,"Kalianpur 1880 / India zone IV",9084,4243,18116,9801,8801,12.0,9102,8802,80.0,9102,8805,0.99878641,9201,8806,3000000.0,9084,8807,1000000.0,9084,,,,,,
-24375,"Kalianpur 1937 / India zone IIb",9001,4144,18238,9801,8801,26.0,9102,8802,90.0,9102,8805,0.99878641,9201,8806,2743185.69,9001,8807,914395.23,9001,,,,,,
-24376,"Kalianpur 1962 / India zone I",9001,4145,18236,9801,8801,32.3,9110,8802,68.0,9110,8805,0.99878641,9201,8806,2743196.4,9001,8807,914398.8,9001,,,,,,
-24377,"Kalianpur 1962 / India zone IIa",9001,4145,18237,9801,8801,26.0,9102,8802,74.0,9102,8805,0.99878641,9201,8806,2743196.4,9001,8807,914398.8,9001,,,,,,
-24378,"Kalianpur 1975 / India zone I",9001,4146,18231,9801,8801,32.3,9110,8802,68.0,9110,8805,0.99878641,9201,8806,2743195.5,9001,8807,914398.5,9001,,,,,,
-24379,"Kalianpur 1975 / India zone IIa",9001,4146,18232,9801,8801,26.0,9102,8802,74.0,9102,8805,0.99878641,9201,8806,2743195.5,9001,8807,914398.5,9001,,,,,,
-24380,"Kalianpur 1975 / India zone IIb",9001,4146,18235,9801,8801,26.0,9102,8802,90.0,9102,8805,0.99878641,9201,8806,2743195.5,9001,8807,914398.5,9001,,,,,,
-24381,"Kalianpur 1975 / India zone III",9001,4146,18233,9801,8801,19.0,9102,8802,80.0,9102,8805,0.99878641,9201,8806,2743195.5,9001,8807,914398.5,9001,,,,,,
-24382,"Kalianpur 1880 / India zone IIb",9084,4243,18113,9801,8801,26.0,9102,8802,90.0,9102,8805,0.99878641,9201,8806,3000000.0,9084,8807,1000000.0,9084,,,,,,
-24383,"Kalianpur 1975 / India zone IV",9001,4146,18234,9801,8801,12.0,9102,8802,80.0,9102,8805,0.99878641,9201,8806,2743195.5,9001,8807,914398.5,9001,,,,,,
-24500,"Kertau / Singapore Grid",9001,4245,19920,9806,8801,1.1715528,9110,8802,103.5110808,9110,8806,30000.0,9001,8807,30000.0,9001,,,,,,,,,
-24547,"Kertau / UTM zone 47N",9001,4245,16047,9807,8801,0.0,9102,8802,99.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-24548,"Kertau / UTM zone 48N",9001,4245,16048,9807,8801,0.0,9102,8802,105.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-24571,"Kertau / R.S.O. Malaya (ch)",9062,4245,19935,9812,8806,40000.0,9062,8807,0.0,9062,8811,4.0,9110,8812,102.15,9110,8813,323.01328458,9110,8814,323.07483685,9110,8815,0.99984,9201
-24600,KOC Lambert,9001,4246,19906,9801,8801,32.3,9110,8802,45.0,9110,8805,0.9987864078,9201,8806,1500000.0,9001,8807,1166200.0,9001,,,,,,
-24718,"La Canoa / UTM zone 18N",9001,4247,16018,9807,8801,0.0,9102,8802,-75.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-24719,"La Canoa / UTM zone 19N",9001,4247,16019,9807,8801,0.0,9102,8802,-69.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-24720,"La Canoa / UTM zone 20N",9001,4247,16020,9807,8801,0.0,9102,8802,-63.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-24818,"PSAD56 / UTM zone 18N",9001,4248,16018,9807,8801,0.0,9102,8802,-75.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-24819,"PSAD56 / UTM zone 19N",9001,4248,16019,9807,8801,0.0,9102,8802,-69.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-24820,"PSAD56 / UTM zone 20N",9001,4248,16020,9807,8801,0.0,9102,8802,-63.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-24821,"PSAD56 / UTM zone 21N",9001,4248,16021,9807,8801,0.0,9102,8802,-57.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-24877,"PSAD56 / UTM zone 17S",9001,4248,16117,9807,8801,0.0,9102,8802,-81.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-24878,"PSAD56 / UTM zone 18S",9001,4248,16118,9807,8801,0.0,9102,8802,-75.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-24879,"PSAD56 / UTM zone 19S",9001,4248,16119,9807,8801,0.0,9102,8802,-69.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-24880,"PSAD56 / UTM zone 20S",9001,4248,16120,9807,8801,0.0,9102,8802,-63.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-24882,"PSAD56 / UTM zone 22S",9001,4248,16122,9807,8801,0.0,9102,8802,-51.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-24891,"PSAD56 / Peru west zone",9001,4248,18161,9807,8801,-6.0,9110,8802,-80.3,9110,8805,0.99983008,9201,8806,222000.0,9001,8807,1426834.743,9001,,,,,,
-24892,"PSAD56 / Peru central zone",9001,4248,18162,9807,8801,-9.3,9110,8802,-76.0,9110,8805,0.99932994,9201,8806,720000.0,9001,8807,1039979.159,9001,,,,,,
-24893,"PSAD56 / Peru east zone",9001,4248,18163,9807,8801,-9.3,9110,8802,-70.3,9110,8805,0.99952992,9201,8806,1324000.0,9001,8807,1040084.558,9001,,,,,,
-25000,"Leigon / Ghana Metre Grid",9001,4250,19904,9807,8801,4.4,9110,8802,-1.0,9110,8805,0.99975,9201,8806,274319.51,9001,8807,0.0,9001,,,,,,
-25231,"Lome / UTM zone 31N",9001,4252,16031,9807,8801,0.0,9102,8802,3.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-25391,"Luzon 1911 / Philippines zone I",9001,4253,18171,9807,8801,0.0,9102,8802,117.0,9102,8805,0.99995,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-25392,"Luzon 1911 / Philippines zone II",9001,4253,18172,9807,8801,0.0,9102,8802,119.0,9102,8805,0.99995,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-25393,"Luzon 1911 / Philippines zone III",9001,4253,18173,9807,8801,0.0,9102,8802,121.0,9102,8805,0.99995,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-25394,"Luzon 1911 / Philippines zone IV",9001,4253,18174,9807,8801,0.0,9102,8802,123.0,9102,8805,0.99995,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-25395,"Luzon 1911 / Philippines zone V",9001,4253,18175,9807,8801,0.0,9102,8802,125.0,9102,8805,0.99995,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-25700,"Makassar (Jakarta) / NEIEZ",9001,4804,19905,9804,8801,0.0,9102,8802,110.0,9102,8805,0.997,9201,8806,3900000.0,9001,8807,900000.0,9001,,,,,,
-25828,"ETRS89 / UTM zone 28N",9001,4258,16028,9807,8801,0.0,9102,8802,-15.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-25829,"ETRS89 / UTM zone 29N",9001,4258,16029,9807,8801,0.0,9102,8802,-9.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-25830,"ETRS89 / UTM zone 30N",9001,4258,16030,9807,8801,0.0,9102,8802,-3.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-25831,"ETRS89 / UTM zone 31N",9001,4258,16031,9807,8801,0.0,9102,8802,3.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-25832,"ETRS89 / UTM zone 32N",9001,4258,16032,9807,8801,0.0,9102,8802,9.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-25833,"ETRS89 / UTM zone 33N",9001,4258,16033,9807,8801,0.0,9102,8802,15.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-25834,"ETRS89 / UTM zone 34N",9001,4258,16034,9807,8801,0.0,9102,8802,21.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-25835,"ETRS89 / UTM zone 35N",9001,4258,16035,9807,8801,0.0,9102,8802,27.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-25836,"ETRS89 / UTM zone 36N",9001,4258,16036,9807,8801,0.0,9102,8802,33.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-25837,"ETRS89 / UTM zone 37N",9001,4258,16037,9807,8801,0.0,9102,8802,39.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-25838,"ETRS89 / UTM zone 38N",9001,4258,16038,9807,8801,0.0,9102,8802,45.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-25884,"ETRS89 / TM Baltic93",9001,4258,19939,9807,8801,0.0,9102,8802,24.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-25932,"Malongo 1987 / UTM zone 32S",9001,4259,16132,9807,8801,0.0,9102,8802,9.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-26191,"Merchich / Nord Maroc",9001,4261,18131,9801,8801,37.0,9105,8802,-6.0,9105,8805,0.999625769,9201,8806,500000.0,9001,8807,300000.0,9001,,,,,,
-26192,"Merchich / Sud Maroc",9001,4261,18132,9801,8801,33.0,9105,8802,-6.0,9105,8805,0.999615596,9201,8806,500000.0,9001,8807,300000.0,9001,,,,,,
-26193,"Merchich / Sahara",9001,4261,18133,9801,8801,29.0,9105,8802,-6.0,9105,8805,0.9996,9201,8806,1200000.0,9001,8807,400000.0,9001,,,,,,
-26237,"Massawa / UTM zone 37N",9001,4262,16037,9807,8801,0.0,9102,8802,39.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26331,"Minna / UTM zone 31N",9001,4263,16031,9807,8801,0.0,9102,8802,3.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26332,"Minna / UTM zone 32N",9001,4263,16032,9807,8801,0.0,9102,8802,9.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26391,"Minna / Nigeria West Belt",9001,4263,18151,9807,8801,4.0,9110,8802,4.3,9110,8805,0.99975,9201,8806,230738.26,9001,8807,0.0,9001,,,,,,
-26392,"Minna / Nigeria Mid Belt",9001,4263,18152,9807,8801,4.0,9110,8802,8.3,9110,8805,0.99975,9201,8806,670553.98,9001,8807,0.0,9001,,,,,,
-26393,"Minna / Nigeria East Belt",9001,4263,18153,9807,8801,4.0,9110,8802,12.3,9110,8805,0.99975,9201,8806,1110369.7,9001,8807,0.0,9001,,,,,,
-26432,"Mhast / UTM zone 32S",9001,4264,16132,9807,8801,0.0,9102,8802,9.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-26591,"Monte Mario (Rome) / Italy zone 1",9001,4806,18121,9807,8801,0.0,9102,8802,9.0,9102,8805,0.9996,9201,8806,1500000.0,9001,8807,0.0,9001,,,,,,
-26592,"Monte Mario (Rome) / Italy zone 2",9001,4806,18122,9807,8801,0.0,9102,8802,15.0,9102,8805,0.9996,9201,8806,2520000.0,9001,8807,0.0,9001,,,,,,
-26632,"M'poraloko / UTM zone 32N",9001,4266,16032,9807,8801,0.0,9102,8802,9.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26692,"M'poraloko / UTM zone 32S",9001,4266,16132,9807,8801,0.0,9102,8802,9.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-26703,"NAD27 / UTM zone 3N",9001,4267,16003,9807,8801,0.0,9102,8802,-165.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26704,"NAD27 / UTM zone 4N",9001,4267,16004,9807,8801,0.0,9102,8802,-159.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26705,"NAD27 / UTM zone 5N",9001,4267,16005,9807,8801,0.0,9102,8802,-153.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26706,"NAD27 / UTM zone 6N",9001,4267,16006,9807,8801,0.0,9102,8802,-147.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26707,"NAD27 / UTM zone 7N",9001,4267,16007,9807,8801,0.0,9102,8802,-141.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26708,"NAD27 / UTM zone 8N",9001,4267,16008,9807,8801,0.0,9102,8802,-135.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26709,"NAD27 / UTM zone 9N",9001,4267,16009,9807,8801,0.0,9102,8802,-129.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26710,"NAD27 / UTM zone 10N",9001,4267,16010,9807,8801,0.0,9102,8802,-123.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26711,"NAD27 / UTM zone 11N",9001,4267,16011,9807,8801,0.0,9102,8802,-117.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26712,"NAD27 / UTM zone 12N",9001,4267,16012,9807,8801,0.0,9102,8802,-111.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26713,"NAD27 / UTM zone 13N",9001,4267,16013,9807,8801,0.0,9102,8802,-105.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26714,"NAD27 / UTM zone 14N",9001,4267,16014,9807,8801,0.0,9102,8802,-99.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26715,"NAD27 / UTM zone 15N",9001,4267,16015,9807,8801,0.0,9102,8802,-93.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26716,"NAD27 / UTM zone 16N",9001,4267,16016,9807,8801,0.0,9102,8802,-87.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26717,"NAD27 / UTM zone 17N",9001,4267,16017,9807,8801,0.0,9102,8802,-81.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26718,"NAD27 / UTM zone 18N",9001,4267,16018,9807,8801,0.0,9102,8802,-75.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26719,"NAD27 / UTM zone 19N",9001,4267,16019,9807,8801,0.0,9102,8802,-69.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26720,"NAD27 / UTM zone 20N",9001,4267,16020,9807,8801,0.0,9102,8802,-63.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26721,"NAD27 / UTM zone 21N",9001,4267,16021,9807,8801,0.0,9102,8802,-57.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26722,"NAD27 / UTM zone 22N",9001,4267,16022,9807,8801,0.0,9102,8802,-51.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26729,"NAD27 / Alabama East",9003,4267,10101,9807,8801,30.3,9110,8802,-85.5,9110,8805,0.99996,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-26730,"NAD27 / Alabama West",9003,4267,10102,9807,8801,30.0,9110,8802,-87.3,9110,8805,0.999933333,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-26731,"NAD27 / Alaska zone 1",9003,4267,15001,9812,8806,16404166.67,9003,8807,-16404166.67,9003,8811,57.0,9110,8812,-133.4,9110,8813,323.07483685,9110,8814,323.07483685,9110,8815,0.9999,9201
-26732,"NAD27 / Alaska zone 2",9003,4267,15002,9807,8801,54.0,9102,8802,-142.0,9102,8805,0.9999,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-26733,"NAD27 / Alaska zone 3",9003,4267,15003,9807,8801,54.0,9102,8802,-146.0,9102,8805,0.9999,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-26734,"NAD27 / Alaska zone 4",9003,4267,15004,9807,8801,54.0,9102,8802,-150.0,9102,8805,0.9999,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-26735,"NAD27 / Alaska zone 5",9003,4267,15005,9807,8801,54.0,9102,8802,-154.0,9102,8805,0.9999,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-26736,"NAD27 / Alaska zone 6",9003,4267,15006,9807,8801,54.0,9102,8802,-158.0,9102,8805,0.9999,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-26737,"NAD27 / Alaska zone 7",9003,4267,15007,9807,8801,54.0,9102,8802,-162.0,9102,8805,0.9999,9201,8806,700000.0,9003,8807,0.0,9003,,,,,,
-26738,"NAD27 / Alaska zone 8",9003,4267,15008,9807,8801,54.0,9102,8802,-166.0,9102,8805,0.9999,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-26739,"NAD27 / Alaska zone 9",9003,4267,15009,9807,8801,54.0,9102,8802,-170.0,9102,8805,0.9999,9201,8806,600000.0,9003,8807,0.0,9003,,,,,,
-26740,"NAD27 / Alaska zone 10",9003,4267,15010,9802,8821,51.0,9110,8822,-176.0,9110,8823,53.5,9110,8824,51.5,9110,8826,3000000.0,9003,8827,0.0,9003,,,
-26741,"NAD27 / California zone I",9003,4267,10401,9802,8821,39.2,9110,8822,-122.0,9110,8823,41.4,9110,8824,40.0,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-26742,"NAD27 / California zone II",9003,4267,10402,9802,8821,37.4,9110,8822,-122.0,9110,8823,39.5,9110,8824,38.2,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-26743,"NAD27 / California zone III",9003,4267,10403,9802,8821,36.3,9110,8822,-120.3,9110,8823,38.26,9110,8824,37.04,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-26744,"NAD27 / California zone IV",9003,4267,10404,9802,8821,35.2,9110,8822,-119.0,9110,8823,37.15,9110,8824,36.0,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-26745,"NAD27 / California zone V",9003,4267,10405,9802,8821,33.3,9110,8822,-118.0,9110,8823,35.28,9110,8824,34.02,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-26746,"NAD27 / California zone VI",9003,4267,10406,9802,8821,32.1,9110,8822,-116.15,9110,8823,33.53,9110,8824,32.47,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-26747,"NAD27 / California zone VII",9003,4267,10407,9802,8821,34.08,9110,8822,-118.2,9110,8823,34.25,9110,8824,33.52,9110,8826,4186692.58,9003,8827,416926.74,9003,,,
-26748,"NAD27 / Arizona East",9003,4267,10201,9807,8801,31.0,9110,8802,-110.1,9110,8805,0.9999,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-26749,"NAD27 / Arizona Central",9003,4267,10202,9807,8801,31.0,9110,8802,-111.55,9110,8805,0.9999,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-26750,"NAD27 / Arizona West",9003,4267,10203,9807,8801,31.0,9110,8802,-113.45,9110,8805,0.999933333,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-26751,"NAD27 / Arkansas North",9003,4267,10301,9802,8821,34.2,9110,8822,-92.0,9110,8823,36.14,9110,8824,34.56,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-26752,"NAD27 / Arkansas South",9003,4267,10302,9802,8821,32.4,9110,8822,-92.0,9110,8823,34.46,9110,8824,33.18,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-26753,"NAD27 / Colorado North",9003,4267,10501,9802,8821,39.2,9110,8822,-105.3,9110,8823,39.43,9110,8824,40.47,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-26754,"NAD27 / Colorado Central",9003,4267,10502,9802,8821,37.5,9110,8822,-105.3,9110,8823,39.45,9110,8824,38.27,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-26755,"NAD27 / Colorado South",9003,4267,10503,9802,8821,36.4,9110,8822,-105.3,9110,8823,38.26,9110,8824,37.14,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-26756,"NAD27 / Connecticut",9003,4267,10600,9802,8821,40.5,9110,8822,-72.45,9110,8823,41.52,9110,8824,41.12,9110,8826,600000.0,9003,8827,0.0,9003,,,
-26757,"NAD27 / Delaware",9003,4267,10700,9807,8801,38.0,9110,8802,-75.25,9110,8805,0.999995,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-26758,"NAD27 / Florida East",9003,4267,10901,9807,8801,24.2,9110,8802,-81.0,9110,8805,0.999941177,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-26759,"NAD27 / Florida West",9003,4267,10902,9807,8801,24.2,9110,8802,-82.0,9110,8805,0.999941177,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-26760,"NAD27 / Florida North",9003,4267,10903,9802,8821,29.0,9110,8822,-84.3,9110,8823,30.45,9110,8824,29.35,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-26766,"NAD27 / Georgia East",9003,4267,11001,9807,8801,30.0,9110,8802,-82.1,9110,8805,0.9999,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-26767,"NAD27 / Georgia West",9003,4267,11002,9807,8801,30.0,9110,8802,-84.1,9110,8805,0.9999,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-26768,"NAD27 / Idaho East",9003,4267,11101,9807,8801,41.4,9110,8802,-112.1,9110,8805,0.999947368,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-26769,"NAD27 / Idaho Central",9003,4267,11102,9807,8801,41.4,9110,8802,-114.0,9110,8805,0.999947368,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-26770,"NAD27 / Idaho West",9003,4267,11103,9807,8801,41.4,9110,8802,-115.45,9110,8805,0.999933333,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-26771,"NAD27 / Illinois East",9003,4267,11201,9807,8801,36.4,9110,8802,-88.2,9110,8805,0.999975,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-26772,"NAD27 / Illinois West",9003,4267,11202,9807,8801,36.4,9110,8802,-90.1,9110,8805,0.999941177,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-26773,"NAD27 / Indiana East",9003,4267,11301,9807,8801,37.3,9110,8802,-85.4,9110,8805,0.999966667,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-26774,"NAD27 / Indiana West",9003,4267,11302,9807,8801,37.3,9110,8802,-87.05,9110,8805,0.999966667,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-26775,"NAD27 / Iowa North",9003,4267,11401,9802,8821,41.3,9110,8822,-93.3,9110,8823,43.16,9110,8824,42.04,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-26776,"NAD27 / Iowa South",9003,4267,11402,9802,8821,40.0,9110,8822,-93.3,9110,8823,41.47,9110,8824,40.37,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-26777,"NAD27 / Kansas North",9003,4267,11501,9802,8821,38.2,9110,8822,-98.0,9110,8823,39.47,9110,8824,38.43,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-26778,"NAD27 / Kansas South",9003,4267,11502,9802,8821,36.4,9110,8822,-98.3,9110,8823,38.34,9110,8824,37.16,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-26779,"NAD27 / Kentucky North",9003,4267,11601,9802,8821,37.3,9110,8822,-84.15,9110,8823,37.58,9110,8824,38.58,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-26780,"NAD27 / Kentucky South",9003,4267,11602,9802,8821,36.2,9110,8822,-85.45,9110,8823,36.44,9110,8824,37.56,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-26781,"NAD27 / Louisiana North",9003,4267,11701,9802,8821,30.4,9110,8822,-92.3,9110,8823,31.1,9110,8824,32.4,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-26782,"NAD27 / Louisiana South",9003,4267,11702,9802,8821,28.4,9110,8822,-91.2,9110,8823,29.18,9110,8824,30.42,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-26783,"NAD27 / Maine East",9003,4267,11801,9807,8801,43.5,9110,8802,-68.3,9110,8805,0.9999,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-26784,"NAD27 / Maine West",9003,4267,11802,9807,8801,42.5,9110,8802,-70.1,9110,8805,0.999966667,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-26785,"NAD27 / Maryland",9003,4267,11900,9802,8821,37.5,9110,8822,-77.0,9110,8823,38.18,9110,8824,39.27,9110,8826,800000.0,9003,8827,0.0,9003,,,
-26786,"NAD27 / Massachusetts Mainland",9003,4267,12001,9802,8821,41.0,9110,8822,-71.3,9110,8823,41.43,9110,8824,42.41,9110,8826,600000.0,9003,8827,0.0,9003,,,
-26787,"NAD27 / Massachusetts Island",9003,4267,12002,9802,8821,41.0,9110,8822,-70.3,9110,8823,41.17,9110,8824,41.29,9110,8826,200000.0,9003,8827,0.0,9003,,,
-26791,"NAD27 / Minnesota North",9003,4267,12201,9802,8821,46.3,9110,8822,-93.06,9110,8823,47.02,9110,8824,48.38,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-26792,"NAD27 / Minnesota Central",9003,4267,12202,9802,8821,45.0,9110,8822,-94.15,9110,8823,45.37,9110,8824,47.03,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-26793,"NAD27 / Minnesota South",9003,4267,12203,9802,8821,43.0,9110,8822,-94.0,9110,8823,43.47,9110,8824,45.13,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-26794,"NAD27 / Mississippi East",9003,4267,12301,9807,8801,29.4,9110,8802,-88.5,9110,8805,0.99996,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-26795,"NAD27 / Mississippi West",9003,4267,12302,9807,8801,30.3,9110,8802,-90.2,9110,8805,0.999941177,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-26796,"NAD27 / Missouri East",9003,4267,12401,9807,8801,35.5,9110,8802,-90.3,9110,8805,0.999933333,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-26797,"NAD27 / Missouri Central",9003,4267,12402,9807,8801,35.5,9110,8802,-92.3,9110,8805,0.999933333,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-26798,"NAD27 / Missouri West",9003,4267,12403,9807,8801,36.1,9110,8802,-94.3,9110,8805,0.999941177,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-26801,"NAD Michigan / Michigan East",9003,4268,12101,9807,8801,41.3,9110,8802,-83.4,9110,8805,0.999942857,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-26802,"NAD Michigan / Michigan Old Central",9003,4268,12102,9807,8801,41.3,9110,8802,-85.45,9110,8805,0.999909091,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-26803,"NAD Michigan / Michigan West",9003,4268,12103,9807,8801,41.3,9110,8802,-88.45,9110,8805,0.999909091,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-26811,"NAD Michigan / Michigan North",9003,4268,12111,9802,8821,44.47,9110,8822,-87.0,9110,8823,45.29,9110,8824,47.05,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-26812,"NAD Michigan / Michigan Central",9003,4268,12112,9802,8821,43.19,9110,8822,-84.2,9110,8823,44.11,9110,8824,45.42,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-26813,"NAD Michigan / Michigan South",9003,4268,12113,9802,8821,41.3,9110,8822,-84.2,9110,8823,42.06,9110,8824,43.4,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-26903,"NAD83 / UTM zone 3N",9001,4269,16003,9807,8801,0.0,9102,8802,-165.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26904,"NAD83 / UTM zone 4N",9001,4269,16004,9807,8801,0.0,9102,8802,-159.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26905,"NAD83 / UTM zone 5N",9001,4269,16005,9807,8801,0.0,9102,8802,-153.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26906,"NAD83 / UTM zone 6N",9001,4269,16006,9807,8801,0.0,9102,8802,-147.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26907,"NAD83 / UTM zone 7N",9001,4269,16007,9807,8801,0.0,9102,8802,-141.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26908,"NAD83 / UTM zone 8N",9001,4269,16008,9807,8801,0.0,9102,8802,-135.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26909,"NAD83 / UTM zone 9N",9001,4269,16009,9807,8801,0.0,9102,8802,-129.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26910,"NAD83 / UTM zone 10N",9001,4269,16010,9807,8801,0.0,9102,8802,-123.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26911,"NAD83 / UTM zone 11N",9001,4269,16011,9807,8801,0.0,9102,8802,-117.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26912,"NAD83 / UTM zone 12N",9001,4269,16012,9807,8801,0.0,9102,8802,-111.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26913,"NAD83 / UTM zone 13N",9001,4269,16013,9807,8801,0.0,9102,8802,-105.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26914,"NAD83 / UTM zone 14N",9001,4269,16014,9807,8801,0.0,9102,8802,-99.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26915,"NAD83 / UTM zone 15N",9001,4269,16015,9807,8801,0.0,9102,8802,-93.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26916,"NAD83 / UTM zone 16N",9001,4269,16016,9807,8801,0.0,9102,8802,-87.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26917,"NAD83 / UTM zone 17N",9001,4269,16017,9807,8801,0.0,9102,8802,-81.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26918,"NAD83 / UTM zone 18N",9001,4269,16018,9807,8801,0.0,9102,8802,-75.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26919,"NAD83 / UTM zone 19N",9001,4269,16019,9807,8801,0.0,9102,8802,-69.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26920,"NAD83 / UTM zone 20N",9001,4269,16020,9807,8801,0.0,9102,8802,-63.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26921,"NAD83 / UTM zone 21N",9001,4269,16021,9807,8801,0.0,9102,8802,-57.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26922,"NAD83 / UTM zone 22N",9001,4269,16022,9807,8801,0.0,9102,8802,-51.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26923,"NAD83 / UTM zone 23N",9001,4269,16023,9807,8801,0.0,9102,8802,-45.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26929,"NAD83 / Alabama East",9001,4269,10131,9807,8801,30.3,9110,8802,-85.5,9110,8805,0.99996,9201,8806,200000.0,9001,8807,0.0,9001,,,,,,
-26930,"NAD83 / Alabama West",9001,4269,10132,9807,8801,30.0,9110,8802,-87.3,9110,8805,0.999933333,9201,8806,600000.0,9001,8807,0.0,9001,,,,,,
-26931,"NAD83 / Alaska zone 1",9001,4269,15031,9812,8806,5000000.0,9001,8807,-5000000.0,9001,8811,57.0,9110,8812,-133.4,9110,8813,323.07483685,9110,8814,323.07483685,9110,8815,0.9999,9201
-26932,"NAD83 / Alaska zone 2",9001,4269,15032,9807,8801,54.0,9102,8802,-142.0,9102,8805,0.9999,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26933,"NAD83 / Alaska zone 3",9001,4269,15033,9807,8801,54.0,9102,8802,-146.0,9102,8805,0.9999,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26934,"NAD83 / Alaska zone 4",9001,4269,15034,9807,8801,54.0,9102,8802,-150.0,9102,8805,0.9999,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26935,"NAD83 / Alaska zone 5",9001,4269,15035,9807,8801,54.0,9102,8802,-154.0,9102,8805,0.9999,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26936,"NAD83 / Alaska zone 6",9001,4269,15036,9807,8801,54.0,9102,8802,-158.0,9102,8805,0.9999,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26937,"NAD83 / Alaska zone 7",9001,4269,15037,9807,8801,54.0,9102,8802,-162.0,9102,8805,0.9999,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26938,"NAD83 / Alaska zone 8",9001,4269,15038,9807,8801,54.0,9102,8802,-166.0,9102,8805,0.9999,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26939,"NAD83 / Alaska zone 9",9001,4269,15039,9807,8801,54.0,9102,8802,-170.0,9102,8805,0.9999,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26940,"NAD83 / Alaska zone 10",9001,4269,15040,9802,8821,51.0,9110,8822,-176.0,9110,8823,53.5,9110,8824,51.5,9110,8826,1000000.0,9001,8827,0.0,9001,,,
-26941,"NAD83 / California zone 1",9001,4269,10431,9802,8821,39.2,9110,8822,-122.0,9110,8823,41.4,9110,8824,40.0,9110,8826,2000000.0,9001,8827,500000.0,9001,,,
-26942,"NAD83 / California zone 2",9001,4269,10432,9802,8821,37.4,9110,8822,-122.0,9110,8823,39.5,9110,8824,38.2,9110,8826,2000000.0,9001,8827,500000.0,9001,,,
-26943,"NAD83 / California zone 3",9001,4269,10433,9802,8821,36.3,9110,8822,-120.3,9110,8823,38.26,9110,8824,37.04,9110,8826,2000000.0,9001,8827,500000.0,9001,,,
-26944,"NAD83 / California zone 4",9001,4269,10434,9802,8821,35.2,9110,8822,-119.0,9110,8823,37.15,9110,8824,36.0,9110,8826,2000000.0,9001,8827,500000.0,9001,,,
-26945,"NAD83 / California zone 5",9001,4269,10435,9802,8821,33.3,9110,8822,-118.0,9110,8823,35.28,9110,8824,34.02,9110,8826,2000000.0,9001,8827,500000.0,9001,,,
-26946,"NAD83 / California zone 6",9001,4269,10436,9802,8821,32.1,9110,8822,-116.15,9110,8823,33.53,9110,8824,32.47,9110,8826,2000000.0,9001,8827,500000.0,9001,,,
-26948,"NAD83 / Arizona East",9001,4269,10231,9807,8801,31.0,9110,8802,-110.1,9110,8805,0.9999,9201,8806,213360.0,9001,8807,0.0,9001,,,,,,
-26949,"NAD83 / Arizona Central",9001,4269,10232,9807,8801,31.0,9110,8802,-111.55,9110,8805,0.9999,9201,8806,213360.0,9001,8807,0.0,9001,,,,,,
-26950,"NAD83 / Arizona West",9001,4269,10233,9807,8801,31.0,9110,8802,-113.45,9110,8805,0.999933333,9201,8806,213360.0,9001,8807,0.0,9001,,,,,,
-26951,"NAD83 / Arkansas North",9001,4269,10331,9802,8821,34.2,9110,8822,-92.0,9110,8823,36.14,9110,8824,34.56,9110,8826,400000.0,9001,8827,0.0,9001,,,
-26952,"NAD83 / Arkansas South",9001,4269,10332,9802,8821,32.4,9110,8822,-92.0,9110,8823,34.46,9110,8824,33.18,9110,8826,400000.0,9001,8827,400000.0,9001,,,
-26953,"NAD83 / Colorado North",9001,4269,10531,9802,8821,39.2,9110,8822,-105.3,9110,8823,40.47,9110,8824,39.43,9110,8826,914401.8289,9001,8827,304800.6096,9001,,,
-26954,"NAD83 / Colorado Central",9001,4269,10532,9802,8821,37.5,9110,8822,-105.3,9110,8823,39.45,9110,8824,38.27,9110,8826,914401.8289,9001,8827,304800.6096,9001,,,
-26955,"NAD83 / Colorado South",9001,4269,10533,9802,8821,36.4,9110,8822,-105.3,9110,8823,38.26,9110,8824,37.14,9110,8826,914401.8289,9001,8827,304800.6096,9001,,,
-26956,"NAD83 / Connecticut",9001,4269,10630,9802,8821,40.5,9110,8822,-72.45,9110,8823,41.52,9110,8824,41.12,9110,8826,304800.6096,9001,8827,152400.3048,9001,,,
-26957,"NAD83 / Delaware",9001,4269,10730,9807,8801,38.0,9110,8802,-75.25,9110,8805,0.999995,9201,8806,200000.0,9001,8807,0.0,9001,,,,,,
-26958,"NAD83 / Florida East",9001,4269,10931,9807,8801,24.2,9110,8802,-81.0,9110,8805,0.999941177,9201,8806,200000.0,9001,8807,0.0,9001,,,,,,
-26959,"NAD83 / Florida West",9001,4269,10932,9807,8801,24.2,9110,8802,-82.0,9110,8805,0.999941177,9201,8806,200000.0,9001,8807,0.0,9001,,,,,,
-26960,"NAD83 / Florida North",9001,4269,10933,9802,8821,29.0,9110,8822,-84.3,9110,8823,30.45,9110,8824,29.35,9110,8826,600000.0,9001,8827,0.0,9001,,,
-26961,"NAD83 / Hawaii zone 1",9001,4269,15131,9807,8801,18.5,9110,8802,-155.3,9110,8805,0.999966667,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26962,"NAD83 / Hawaii zone 2",9001,4269,15132,9807,8801,20.2,9110,8802,-156.4,9110,8805,0.999966667,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26963,"NAD83 / Hawaii zone 3",9001,4269,15133,9807,8801,21.1,9110,8802,-158.0,9110,8805,0.99999,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26964,"NAD83 / Hawaii zone 4",9001,4269,15134,9807,8801,21.5,9110,8802,-159.3,9110,8805,0.99999,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26965,"NAD83 / Hawaii zone 5",9001,4269,15135,9807,8801,21.4,9110,8802,-160.1,9110,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26966,"NAD83 / Georgia East",9001,4269,11031,9807,8801,30.0,9110,8802,-82.1,9110,8805,0.9999,9201,8806,200000.0,9001,8807,0.0,9001,,,,,,
-26967,"NAD83 / Georgia West",9001,4269,11032,9807,8801,30.0,9110,8802,-84.1,9110,8805,0.9999,9201,8806,700000.0,9001,8807,0.0,9001,,,,,,
-26968,"NAD83 / Idaho East",9001,4269,11131,9807,8801,41.4,9110,8802,-112.1,9110,8805,0.999947368,9201,8806,200000.0,9001,8807,0.0,9001,,,,,,
-26969,"NAD83 / Idaho Central",9001,4269,11132,9807,8801,41.4,9110,8802,-114.0,9110,8805,0.999947368,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26970,"NAD83 / Idaho West",9001,4269,11133,9807,8801,41.4,9110,8802,-115.45,9110,8805,0.999933333,9201,8806,800000.0,9001,8807,0.0,9001,,,,,,
-26971,"NAD83 / Illinois East",9001,4269,11231,9807,8801,36.4,9110,8802,-88.2,9110,8805,0.999975,9201,8806,300000.0,9001,8807,0.0,9001,,,,,,
-26972,"NAD83 / Illinois West",9001,4269,11232,9807,8801,36.4,9110,8802,-90.1,9110,8805,0.999941177,9201,8806,700000.0,9001,8807,0.0,9001,,,,,,
-26973,"NAD83 / Indiana East",9001,4269,11331,9807,8801,37.3,9110,8802,-85.4,9110,8805,0.999966667,9201,8806,100000.0,9001,8807,250000.0,9001,,,,,,
-26974,"NAD83 / Indiana West",9001,4269,11332,9807,8801,37.3,9110,8802,-87.05,9110,8805,0.999966667,9201,8806,900000.0,9001,8807,250000.0,9001,,,,,,
-26975,"NAD83 / Iowa North",9001,4269,11431,9802,8821,41.3,9110,8822,-93.3,9110,8823,43.16,9110,8824,42.04,9110,8826,1500000.0,9001,8827,1000000.0,9001,,,
-26976,"NAD83 / Iowa South",9001,4269,11432,9802,8821,40.0,9110,8822,-93.3,9110,8823,41.47,9110,8824,40.37,9110,8826,500000.0,9001,8827,0.0,9001,,,
-26977,"NAD83 / Kansas North",9001,4269,11531,9802,8821,38.2,9110,8822,-98.0,9110,8823,39.47,9110,8824,38.43,9110,8826,400000.0,9001,8827,0.0,9001,,,
-26978,"NAD83 / Kansas South",9001,4269,11532,9802,8821,36.4,9110,8822,-98.3,9110,8823,38.34,9110,8824,37.16,9110,8826,400000.0,9001,8827,400000.0,9001,,,
-26979,"NAD83 / Kentucky North",9001,4269,11631,9802,8821,37.3,9110,8822,-84.15,9110,8823,37.58,9110,8824,37.58,9110,8826,500000.0,9001,8827,0.0,9001,,,
-26980,"NAD83 / Kentucky South",9001,4269,11632,9802,8821,36.2,9110,8822,-85.45,9110,8823,37.56,9110,8824,36.44,9110,8826,500000.0,9001,8827,500000.0,9001,,,
-26981,"NAD83 / Louisiana North",9001,4269,11731,9802,8821,30.3,9110,8822,-92.3,9110,8823,32.4,9110,8824,31.1,9110,8826,1000000.0,9001,8827,0.0,9001,,,
-26982,"NAD83 / Louisiana South",9001,4269,11732,9802,8821,28.3,9110,8822,-91.2,9110,8823,30.42,9110,8824,29.18,9110,8826,1000000.0,9001,8827,0.0,9001,,,
-26983,"NAD83 / Maine East",9001,4269,11831,9807,8801,43.4,9110,8802,-68.3,9110,8805,0.9999,9201,8806,300000.0,9001,8807,0.0,9001,,,,,,
-26984,"NAD83 / Maine West",9001,4269,11832,9807,8801,42.5,9110,8802,-70.1,9110,8805,0.999966667,9201,8806,900000.0,9001,8807,0.0,9001,,,,,,
-26985,"NAD83 / Maryland",9001,4269,11930,9802,8821,37.4,9110,8822,-77.0,9110,8823,39.27,9110,8824,38.18,9110,8826,400000.0,9001,8827,0.0,9001,,,
-26986,"NAD83 / Massachusetts Mainland",9001,4269,12031,9802,8821,41.0,9110,8822,-71.3,9110,8823,42.41,9110,8824,41.43,9110,8826,200000.0,9001,8827,750000.0,9001,,,
-26987,"NAD83 / Massachusetts Island",9001,4269,12032,9802,8821,41.0,9110,8822,-70.3,9110,8823,41.29,9110,8824,41.17,9110,8826,500000.0,9001,8827,0.0,9001,,,
-26988,"NAD83 / Michigan North",9001,4269,12141,9802,8821,44.47,9110,8822,-87.0,9110,8823,47.05,9110,8824,45.29,9110,8826,8000000.0,9001,8827,0.0,9001,,,
-26989,"NAD83 / Michigan Central",9001,4269,12142,9802,8821,43.19,9110,8822,-84.22,9110,8823,45.42,9110,8824,44.11,9110,8826,6000000.0,9001,8827,0.0,9001,,,
-26990,"NAD83 / Michigan South",9001,4269,12143,9802,8821,41.3,9110,8822,-84.22,9110,8823,43.4,9110,8824,42.06,9110,8826,4000000.0,9001,8827,0.0,9001,,,
-26991,"NAD83 / Minnesota North",9001,4269,12231,9802,8821,46.3,9110,8822,-93.06,9110,8823,48.38,9110,8824,47.02,9110,8826,800000.0,9001,8827,100000.0,9001,,,
-26992,"NAD83 / Minnesota Central",9001,4269,12232,9802,8821,45.0,9110,8822,-94.15,9110,8823,47.03,9110,8824,45.37,9110,8826,800000.0,9001,8827,100000.0,9001,,,
-26993,"NAD83 / Minnesota South",9001,4269,12233,9802,8821,43.0,9110,8822,-94.0,9110,8823,45.13,9110,8824,43.47,9110,8826,800000.0,9001,8827,100000.0,9001,,,
-26994,"NAD83 / Mississippi East",9001,4269,12331,9807,8801,29.3,9110,8802,-88.5,9110,8805,0.99995,9201,8806,300000.0,9001,8807,0.0,9001,,,,,,
-26995,"NAD83 / Mississippi West",9001,4269,12332,9807,8801,29.3,9110,8802,-90.2,9110,8805,0.99995,9201,8806,700000.0,9001,8807,0.0,9001,,,,,,
-26996,"NAD83 / Missouri East",9001,4269,12431,9807,8801,35.5,9110,8802,-90.3,9110,8805,0.999933333,9201,8806,250000.0,9001,8807,0.0,9001,,,,,,
-26997,"NAD83 / Missouri Central",9001,4269,12432,9807,8801,35.5,9110,8802,-92.3,9110,8805,0.999933333,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-26998,"NAD83 / Missouri West",9001,4269,12433,9807,8801,36.1,9110,8802,-94.3,9110,8805,0.999941177,9201,8806,850000.0,9001,8807,0.0,9001,,,,,,
-27038,"Nahrwan 1967 / UTM zone 38N",9001,4270,16038,9807,8801,0.0,9102,8802,45.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-27039,"Nahrwan 1967 / UTM zone 39N",9001,4270,16039,9807,8801,0.0,9102,8802,51.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-27040,"Nahrwan 1967 / UTM zone 40N",9001,4270,16040,9807,8801,0.0,9102,8802,57.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-27120,"Naparima 1972 / UTM zone 20N",9001,4271,16020,9807,8801,0.0,9102,8802,-63.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-27200,"NZGD49 / New Zealand Map Grid",9001,4272,19917,9811,8801,-41.0,9102,8802,173.0,9102,8806,2510000.0,9001,8807,6023150.0,9001,,,,,,,,,
-27205,"NZGD49 / Mount Eden Circuit",9001,4272,17901,9807,8801,-36.5247515,9110,8802,174.45516217,9110,8805,0.9999,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-27206,"NZGD49 / Bay of Plenty Circuit",9001,4272,17902,9807,8801,-37.45404993,9110,8802,176.27583101,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-27207,"NZGD49 / Poverty Bay Circuit",9001,4272,17903,9807,8801,-38.372893,9110,8802,177.53082906,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-27208,"NZGD49 / Hawkes Bay Circuit",9001,4272,17904,9807,8801,-39.39033455,9110,8802,176.40252499,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-27209,"NZGD49 / Taranaki Circuit",9001,4272,17905,9807,8801,-39.08087299,9110,8802,174.13408423,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-27210,"NZGD49 / Tuhirangi Circuit",9001,4272,17906,9807,8801,-39.30448934,9110,8802,175.38241325,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-27211,"NZGD49 / Wanganui Circuit",9001,4272,17907,9807,8801,-40.14310097,9110,8802,175.29171586,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-27212,"NZGD49 / Wairarapa Circuit",9001,4272,17908,9807,8801,-40.55319175,9110,8802,175.38504588,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-27213,"NZGD49 / Wellington Circuit",9001,4272,17909,9807,8801,-41.18047507,9110,8802,174.46358432,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-27214,"NZGD49 / Collingwood Circuit",9001,4272,17910,9807,8801,-40.42531326,9110,8802,172.40193674,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-27215,"NZGD49 / Nelson Circuit",9001,4272,17911,9807,8801,-41.1628361,9110,8802,173.17575405,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-27216,"NZGD49 / Karamea Circuit",9001,4272,17912,9807,8801,-41.17236815,9110,8802,172.06325015,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-27217,"NZGD49 / Buller Circuit",9001,4272,17913,9807,8801,-41.48388903,9110,8802,171.34525362,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-27218,"NZGD49 / Grey Circuit",9001,4272,17914,9807,8801,-42.20012994,9110,8802,171.32591767,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-27219,"NZGD49 / Amuri Circuit",9001,4272,17915,9807,8801,-42.41208197,9110,8802,173.00364802,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-27220,"NZGD49 / Marlborough Circuit",9001,4272,17916,9807,8801,-41.3240152,9110,8802,173.48074668,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-27221,"NZGD49 / Hokitika Circuit",9001,4272,17917,9807,8801,-42.53107605,9110,8802,170.58479766,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-27222,"NZGD49 / Okarito Circuit",9001,4272,17918,9807,8801,-43.06364613,9110,8802,170.1539333,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-27223,"NZGD49 / Jacksons Bay Circuit",9001,4272,17919,9807,8801,-43.58400904,9110,8802,168.36225612,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-27224,"NZGD49 / Mount Pleasant Circuit",9001,4272,17920,9807,8801,-43.35262953,9110,8802,172.43378969,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-27225,"NZGD49 / Gawler Circuit",9001,4272,17921,9807,8801,-43.44553616,9110,8802,171.21386945,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-27226,"NZGD49 / Timaru Circuit",9001,4272,17922,9807,8801,-44.24079933,9110,8802,171.0326103,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-27227,"NZGD49 / Lindis Peak Circuit",9001,4272,17923,9807,8801,-44.44069647,9110,8802,169.28039183,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-27228,"NZGD49 / Mount Nicholas Circuit",9001,4272,17924,9807,8801,-45.07584493,9110,8802,168.23551083,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-27229,"NZGD49 / Mount York Circuit",9001,4272,17925,9807,8801,-45.33494142,9110,8802,167.44199024,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-27230,"NZGD49 / Observation Point Circuit",9001,4272,17926,9807,8801,-45.48583078,9110,8802,170.37429426,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-27231,"NZGD49 / North Taieri Circuit",9001,4272,17927,9807,8801,-45.51414481,9110,8802,170.16573208,9110,8805,0.99996,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-27232,"NZGD49 / Bluff Circuit",9001,4272,17928,9807,8801,-46.36000346,9110,8802,168.20343392,9110,8805,1.0,9201,8806,300002.66,9001,8807,699999.58,9001,,,,,,
-27258,"NZGD49 / UTM zone 58S",9001,4272,16158,9807,8801,0.0,9102,8802,165.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-27259,"NZGD49 / UTM zone 59S",9001,4272,16159,9807,8801,0.0,9102,8802,171.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-27260,"NZGD49 / UTM zone 60S",9001,4272,16160,9807,8801,0.0,9102,8802,177.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-27291,"NZGD49 / North Island Grid",9040,4272,18141,9807,8801,-39.0,9110,8802,175.3,9110,8805,1.0,9201,8806,300000.0,9040,8807,400000.0,9040,,,,,,
-27292,"NZGD49 / South Island Grid",9040,4272,18142,9807,8801,-44.0,9110,8802,171.3,9110,8805,1.0,9201,8806,500000.0,9040,8807,500000.0,9040,,,,,,
-27391,"NGO 1948 (Oslo) / NGO zone I",9001,4817,18221,9807,8801,58.0,9110,8802,-4.4,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-27392,"NGO 1948 (Oslo) / NGO zone II",9001,4817,18222,9807,8801,58.0,9110,8802,-2.2,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-27393,"NGO 1948 (Oslo) / NGO zone III",9001,4817,18223,9807,8801,58.0,9110,8802,0.0,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-27394,"NGO 1948 (Oslo) / NGO zone IV",9001,4817,18224,9807,8801,58.0,9110,8802,2.3,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-27395,"NGO 1948 (Oslo) / NGO zone V",9001,4817,18225,9807,8801,58.0,9110,8802,6.1,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-27396,"NGO 1948 (Oslo) / NGO zone VI",9001,4817,18226,9807,8801,58.0,9110,8802,10.1,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-27397,"NGO 1948 (Oslo) / NGO zone VII",9001,4817,18227,9807,8801,58.0,9110,8802,14.1,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-27398,"NGO 1948 (Oslo) / NGO zone VIII",9001,4817,18228,9807,8801,58.0,9110,8802,18.2,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-27429,"Datum 73 / UTM zone 29N",9001,4274,16029,9807,8801,0.0,9102,8802,-9.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-27492,"Datum 73 / Modified Portuguese Grid",9001,4274,19974,9807,8801,39.4,9110,8802,-8.0754862,9110,8805,1.0,9201,8806,180.598,9001,8807,-86.99,9001,,,,,,
-27500,"ATF (Paris) / Nord de Guerre",9001,4901,19903,9801,8801,55.0,9105,8802,6.0,9105,8805,0.99950908,9201,8806,500000.0,9001,8807,300000.0,9001,,,,,,
-27561,"NTF (Paris) / Lambert Nord France",9001,4807,18091,9801,8801,55.0,9105,8802,0.0,9105,8805,0.999877341,9201,8806,600000.0,9001,8807,200000.0,9001,,,,,,
-27562,"NTF (Paris) / Lambert Centre France",9001,4807,18092,9801,8801,52.0,9105,8802,0.0,9105,8805,0.99987742,9201,8806,600000.0,9001,8807,200000.0,9001,,,,,,
-27563,"NTF (Paris) / Lambert Sud France",9001,4807,18093,9801,8801,49.0,9105,8802,0.0,9105,8805,0.999877499,9201,8806,600000.0,9001,8807,200000.0,9001,,,,,,
-27564,"NTF (Paris) / Lambert Corse",9001,4807,18094,9801,8801,46.85,9105,8802,0.0,9105,8805,0.99994471,9201,8806,234.358,9001,8807,185861.369,9001,,,,,,
-27571,"NTF (Paris) / Lambert zone I",9001,4807,18081,9801,8801,55.0,9105,8802,0.0,9105,8805,0.999877341,9201,8806,600000.0,9001,8807,1200000.0,9001,,,,,,
-27572,"NTF (Paris) / Lambert zone II",9001,4807,18082,9801,8801,52.0,9105,8802,0.0,9105,8805,0.99987742,9201,8806,600000.0,9001,8807,2200000.0,9001,,,,,,
-27573,"NTF (Paris) / Lambert zone III",9001,4807,18083,9801,8801,49.0,9105,8802,0.0,9105,8805,0.999877499,9201,8806,600000.0,9001,8807,3200000.0,9001,,,,,,
-27574,"NTF (Paris) / Lambert zone IV",9001,4807,18084,9801,8801,46.85,9105,8802,0.0,9105,8805,0.99994471,9201,8806,234.358,9001,8807,4185861.369,9001,,,,,,
-27581,"NTF (Paris) / France I",9001,4807,18081,9801,8801,55.0,9105,8802,0.0,9105,8805,0.999877341,9201,8806,600000.0,9001,8807,1200000.0,9001,,,,,,
-27582,"NTF (Paris) / France II",9001,4807,18082,9801,8801,52.0,9105,8802,0.0,9105,8805,0.99987742,9201,8806,600000.0,9001,8807,2200000.0,9001,,,,,,
-27583,"NTF (Paris) / France III",9001,4807,18083,9801,8801,49.0,9105,8802,0.0,9105,8805,0.999877499,9201,8806,600000.0,9001,8807,3200000.0,9001,,,,,,
-27584,"NTF (Paris) / France IV",9001,4807,18084,9801,8801,46.85,9105,8802,0.0,9105,8805,0.99994471,9201,8806,234.358,9001,8807,4185861.369,9001,,,,,,
-27591,"NTF (Paris) / Nord France",9001,4807,18091,9801,8801,55.0,9105,8802,0.0,9105,8805,0.999877341,9201,8806,600000.0,9001,8807,200000.0,9001,,,,,,
-27592,"NTF (Paris) / Centre France",9001,4807,18092,9801,8801,52.0,9105,8802,0.0,9105,8805,0.99987742,9201,8806,600000.0,9001,8807,200000.0,9001,,,,,,
-27593,"NTF (Paris) / Sud France",9001,4807,18093,9801,8801,49.0,9105,8802,0.0,9105,8805,0.999877499,9201,8806,600000.0,9001,8807,200000.0,9001,,,,,,
-27594,"NTF (Paris) / Corse",9001,4807,18094,9801,8801,46.85,9105,8802,0.0,9105,8805,0.99994471,9201,8806,234.358,9001,8807,185861.369,9001,,,,,,
-27700,"OSGB 1936 / British National Grid",9001,4277,19916,9807,8801,49.0,9102,8802,-2.0,9102,8805,0.999601272,9201,8806,400000.0,9001,8807,-100000.0,9001,,,,,,
-28191,"Palestine 1923 / Palestine Grid",9001,4281,18201,9806,8801,31.4402749,9110,8802,35.124349,9110,8806,170251.555,9001,8807,126867.909,9001,,,,,,,,,
-28192,"Palestine 1923 / Palestine Belt",9001,4281,18202,9807,8801,31.4402749,9110,8802,35.124349,9110,8805,1.0,9201,8806,170251.555,9001,8807,1126867.909,9001,,,,,,
-28193,"Palestine 1923 / Israeli CS Grid",9001,4281,18203,9806,8801,31.4402749,9110,8802,35.124349,9110,8806,170251.555,9001,8807,1126867.909,9001,,,,,,,,,
-28232,"Pointe Noire / UTM zone 32S",9001,4282,16132,9807,8801,0.0,9102,8802,9.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-28348,"GDA94 / MGA zone 48",9001,4283,17348,9807,8801,0.0,9102,8802,105.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-28349,"GDA94 / MGA zone 49",9001,4283,17349,9807,8801,0.0,9102,8802,111.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-28350,"GDA94 / MGA zone 50",9001,4283,17350,9807,8801,0.0,9102,8802,117.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-28351,"GDA94 / MGA zone 51",9001,4283,17351,9807,8801,0.0,9102,8802,123.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-28352,"GDA94 / MGA zone 52",9001,4283,17352,9807,8801,0.0,9102,8802,129.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-28353,"GDA94 / MGA zone 53",9001,4283,17353,9807,8801,0.0,9102,8802,135.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-28354,"GDA94 / MGA zone 54",9001,4283,17354,9807,8801,0.0,9102,8802,141.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-28355,"GDA94 / MGA zone 55",9001,4283,17355,9807,8801,0.0,9102,8802,147.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-28356,"GDA94 / MGA zone 56",9001,4283,17356,9807,8801,0.0,9102,8802,153.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-28357,"GDA94 / MGA zone 57",9001,4283,17357,9807,8801,0.0,9102,8802,159.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-28358,"GDA94 / MGA zone 58",9001,4283,17358,9807,8801,0.0,9102,8802,165.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-28402,"Pulkovo 1942 / Gauss-Kruger zone 2",9001,4284,16202,9807,8801,0.0,9102,8802,9.0,9102,8805,1.0,9201,8806,2500000.0,9001,8807,0.0,9001,,,,,,
-28403,"Pulkovo 1942 / Gauss-Kruger zone 3",9001,4284,16203,9807,8801,0.0,9102,8802,15.0,9102,8805,1.0,9201,8806,3500000.0,9001,8807,0.0,9001,,,,,,
-28404,"Pulkovo 1942 / Gauss-Kruger zone 4",9001,4284,16204,9807,8801,0.0,9102,8802,21.0,9102,8805,1.0,9201,8806,4500000.0,9001,8807,0.0,9001,,,,,,
-28405,"Pulkovo 1942 / Gauss-Kruger zone 5",9001,4284,16205,9807,8801,0.0,9102,8802,27.0,9102,8805,1.0,9201,8806,5500000.0,9001,8807,0.0,9001,,,,,,
-28406,"Pulkovo 1942 / Gauss-Kruger zone 6",9001,4284,16206,9807,8801,0.0,9102,8802,33.0,9102,8805,1.0,9201,8806,6500000.0,9001,8807,0.0,9001,,,,,,
-28407,"Pulkovo 1942 / Gauss-Kruger zone 7",9001,4284,16207,9807,8801,0.0,9102,8802,39.0,9102,8805,1.0,9201,8806,7500000.0,9001,8807,0.0,9001,,,,,,
-28408,"Pulkovo 1942 / Gauss-Kruger zone 8",9001,4284,16208,9807,8801,0.0,9102,8802,45.0,9102,8805,1.0,9201,8806,8500000.0,9001,8807,0.0,9001,,,,,,
-28409,"Pulkovo 1942 / Gauss-Kruger zone 9",9001,4284,16209,9807,8801,0.0,9102,8802,51.0,9102,8805,1.0,9201,8806,9500000.0,9001,8807,0.0,9001,,,,,,
-28410,"Pulkovo 1942 / Gauss-Kruger zone 10",9001,4284,16210,9807,8801,0.0,9102,8802,57.0,9102,8805,1.0,9201,8806,10500000.0,9001,8807,0.0,9001,,,,,,
-28411,"Pulkovo 1942 / Gauss-Kruger zone 11",9001,4284,16211,9807,8801,0.0,9102,8802,63.0,9102,8805,1.0,9201,8806,11500000.0,9001,8807,0.0,9001,,,,,,
-28412,"Pulkovo 1942 / Gauss-Kruger zone 12",9001,4284,16212,9807,8801,0.0,9102,8802,69.0,9102,8805,1.0,9201,8806,12500000.0,9001,8807,0.0,9001,,,,,,
-28413,"Pulkovo 1942 / Gauss-Kruger zone 13",9001,4284,16213,9807,8801,0.0,9102,8802,75.0,9102,8805,1.0,9201,8806,13500000.0,9001,8807,0.0,9001,,,,,,
-28414,"Pulkovo 1942 / Gauss-Kruger zone 14",9001,4284,16214,9807,8801,0.0,9102,8802,81.0,9102,8805,1.0,9201,8806,14500000.0,9001,8807,0.0,9001,,,,,,
-28415,"Pulkovo 1942 / Gauss-Kruger zone 15",9001,4284,16215,9807,8801,0.0,9102,8802,87.0,9102,8805,1.0,9201,8806,15500000.0,9001,8807,0.0,9001,,,,,,
-28416,"Pulkovo 1942 / Gauss-Kruger zone 16",9001,4284,16216,9807,8801,0.0,9102,8802,93.0,9102,8805,1.0,9201,8806,16500000.0,9001,8807,0.0,9001,,,,,,
-28417,"Pulkovo 1942 / Gauss-Kruger zone 17",9001,4284,16217,9807,8801,0.0,9102,8802,99.0,9102,8805,1.0,9201,8806,17500000.0,9001,8807,0.0,9001,,,,,,
-28418,"Pulkovo 1942 / Gauss-Kruger zone 18",9001,4284,16218,9807,8801,0.0,9102,8802,105.0,9102,8805,1.0,9201,8806,18500000.0,9001,8807,0.0,9001,,,,,,
-28419,"Pulkovo 1942 / Gauss-Kruger zone 19",9001,4284,16219,9807,8801,0.0,9102,8802,111.0,9102,8805,1.0,9201,8806,19500000.0,9001,8807,0.0,9001,,,,,,
-28420,"Pulkovo 1942 / Gauss-Kruger zone 20",9001,4284,16220,9807,8801,0.0,9102,8802,117.0,9102,8805,1.0,9201,8806,20500000.0,9001,8807,0.0,9001,,,,,,
-28421,"Pulkovo 1942 / Gauss-Kruger zone 21",9001,4284,16221,9807,8801,0.0,9102,8802,123.0,9102,8805,1.0,9201,8806,21500000.0,9001,8807,0.0,9001,,,,,,
-28422,"Pulkovo 1942 / Gauss-Kruger zone 22",9001,4284,16222,9807,8801,0.0,9102,8802,129.0,9102,8805,1.0,9201,8806,22500000.0,9001,8807,0.0,9001,,,,,,
-28423,"Pulkovo 1942 / Gauss-Kruger zone 23",9001,4284,16223,9807,8801,0.0,9102,8802,135.0,9102,8805,1.0,9201,8806,23500000.0,9001,8807,0.0,9001,,,,,,
-28424,"Pulkovo 1942 / Gauss-Kruger zone 24",9001,4284,16224,9807,8801,0.0,9102,8802,141.0,9102,8805,1.0,9201,8806,24500000.0,9001,8807,0.0,9001,,,,,,
-28425,"Pulkovo 1942 / Gauss-Kruger zone 25",9001,4284,16225,9807,8801,0.0,9102,8802,147.0,9102,8805,1.0,9201,8806,25500000.0,9001,8807,0.0,9001,,,,,,
-28426,"Pulkovo 1942 / Gauss-Kruger zone 26",9001,4284,16226,9807,8801,0.0,9102,8802,153.0,9102,8805,1.0,9201,8806,26500000.0,9001,8807,0.0,9001,,,,,,
-28427,"Pulkovo 1942 / Gauss-Kruger zone 27",9001,4284,16227,9807,8801,0.0,9102,8802,159.0,9102,8805,1.0,9201,8806,27500000.0,9001,8807,0.0,9001,,,,,,
-28428,"Pulkovo 1942 / Gauss-Kruger zone 28",9001,4284,16228,9807,8801,0.0,9102,8802,165.0,9102,8805,1.0,9201,8806,28500000.0,9001,8807,0.0,9001,,,,,,
-28429,"Pulkovo 1942 / Gauss-Kruger zone 29",9001,4284,16229,9807,8801,0.0,9102,8802,171.0,9102,8805,1.0,9201,8806,29500000.0,9001,8807,0.0,9001,,,,,,
-28430,"Pulkovo 1942 / Gauss-Kruger zone 30",9001,4284,16230,9807,8801,0.0,9102,8802,177.0,9102,8805,1.0,9201,8806,30500000.0,9001,8807,0.0,9001,,,,,,
-28431,"Pulkovo 1942 / Gauss-Kruger zone 31",9001,4284,16231,9807,8801,0.0,9102,8802,-177.0,9102,8805,1.0,9201,8806,31500000.0,9001,8807,0.0,9001,,,,,,
-28432,"Pulkovo 1942 / Gauss-Kruger zone 32",9001,4284,16232,9807,8801,0.0,9102,8802,-171.0,9102,8805,1.0,9201,8806,32500000.0,9001,8807,0.0,9001,,,,,,
-28462,"Pulkovo 1942 / Gauss-Kruger 2N",9001,4284,16302,9807,8801,0.0,9102,8802,9.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-28463,"Pulkovo 1942 / Gauss-Kruger 3N",9001,4284,16303,9807,8801,0.0,9102,8802,15.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-28464,"Pulkovo 1942 / Gauss-Kruger 4N",9001,4284,16304,9807,8801,0.0,9102,8802,21.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-28465,"Pulkovo 1942 / Gauss-Kruger 5N",9001,4284,16305,9807,8801,0.0,9102,8802,27.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-28466,"Pulkovo 1942 / Gauss-Kruger 6N",9001,4284,16306,9807,8801,0.0,9102,8802,33.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-28467,"Pulkovo 1942 / Gauss-Kruger 7N",9001,4284,16307,9807,8801,0.0,9102,8802,39.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-28468,"Pulkovo 1942 / Gauss-Kruger 8N",9001,4284,16308,9807,8801,0.0,9102,8802,45.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-28469,"Pulkovo 1942 / Gauss-Kruger 9N",9001,4284,16309,9807,8801,0.0,9102,8802,51.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-28470,"Pulkovo 1942 / Gauss-Kruger 10N",9001,4284,16310,9807,8801,0.0,9102,8802,57.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-28471,"Pulkovo 1942 / Gauss-Kruger 11N",9001,4284,16311,9807,8801,0.0,9102,8802,63.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-28472,"Pulkovo 1942 / Gauss-Kruger 12N",9001,4284,16312,9807,8801,0.0,9102,8802,69.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-28473,"Pulkovo 1942 / Gauss-Kruger 13N",9001,4284,16313,9807,8801,0.0,9102,8802,75.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-28474,"Pulkovo 1942 / Gauss-Kruger 14N",9001,4284,16314,9807,8801,0.0,9102,8802,81.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-28475,"Pulkovo 1942 / Gauss-Kruger 15N",9001,4284,16315,9807,8801,0.0,9102,8802,87.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-28476,"Pulkovo 1942 / Gauss-Kruger 16N",9001,4284,16316,9807,8801,0.0,9102,8802,93.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-28477,"Pulkovo 1942 / Gauss-Kruger 17N",9001,4284,16317,9807,8801,0.0,9102,8802,99.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-28478,"Pulkovo 1942 / Gauss-Kruger 18N",9001,4284,16318,9807,8801,0.0,9102,8802,105.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-28479,"Pulkovo 1942 / Gauss-Kruger 19N",9001,4284,16319,9807,8801,0.0,9102,8802,111.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-28480,"Pulkovo 1942 / Gauss-Kruger 20N",9001,4284,16320,9807,8801,0.0,9102,8802,117.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-28481,"Pulkovo 1942 / Gauss-Kruger 21N",9001,4284,16321,9807,8801,0.0,9102,8802,123.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-28482,"Pulkovo 1942 / Gauss-Kruger 22N",9001,4284,16322,9807,8801,0.0,9102,8802,129.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-28483,"Pulkovo 1942 / Gauss-Kruger 23N",9001,4284,16323,9807,8801,0.0,9102,8802,135.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-28484,"Pulkovo 1942 / Gauss-Kruger 24N",9001,4284,16324,9807,8801,0.0,9102,8802,141.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-28485,"Pulkovo 1942 / Gauss-Kruger 25N",9001,4284,16325,9807,8801,0.0,9102,8802,147.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-28486,"Pulkovo 1942 / Gauss-Kruger 26N",9001,4284,16326,9807,8801,0.0,9102,8802,153.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-28487,"Pulkovo 1942 / Gauss-Kruger 27N",9001,4284,16327,9807,8801,0.0,9102,8802,159.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-28488,"Pulkovo 1942 / Gauss-Kruger 28N",9001,4284,16328,9807,8801,0.0,9102,8802,165.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-28489,"Pulkovo 1942 / Gauss-Kruger 29N",9001,4284,16329,9807,8801,0.0,9102,8802,171.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-28490,"Pulkovo 1942 / Gauss-Kruger 30N",9001,4284,16330,9807,8801,0.0,9102,8802,177.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-28491,"Pulkovo 1942 / Gauss-Kruger 31N",9001,4284,16331,9807,8801,0.0,9102,8802,-177.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-28492,"Pulkovo 1942 / Gauss-Kruger 32N",9001,4284,16332,9807,8801,0.0,9102,8802,-171.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-28600,"Qatar 1974 / Qatar National Grid",9001,4285,19919,9807,8801,24.27,9110,8802,51.13,9110,8805,0.99999,9201,8806,200000.0,9001,8807,300000.0,9001,,,,,,
-28991,"Amersfoort / RD Old",9001,4289,19913,9809,8801,52.0922178,9110,8802,5.23155,9110,8805,0.9999079,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-28992,"Amersfoort / RD New",9001,4289,19914,9809,8801,52.0922178,9110,8802,5.23155,9110,8805,0.9999079,9201,8806,155000.0,9001,8807,463000.0,9001,,,,,,
-29100,"SAD69 / Brazil Polyconic",9001,4291,19941,9818,8801,0.0,9102,8802,-54.0,9102,8806,5000000.0,9001,8807,10000000.0,9001,,,,,,,,,
-29118,"SAD69 / UTM zone 18N",9001,4291,16018,9807,8801,0.0,9102,8802,-75.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-29119,"SAD69 / UTM zone 19N",9001,4291,16019,9807,8801,0.0,9102,8802,-69.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-29120,"SAD69 / UTM zone 20N",9001,4291,16020,9807,8801,0.0,9102,8802,-63.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-29121,"SAD69 / UTM zone 21N",9001,4291,16021,9807,8801,0.0,9102,8802,-57.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-29122,"SAD69 / UTM zone 22N",9001,4291,16022,9807,8801,0.0,9102,8802,-51.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-29177,"SAD69 / UTM zone 17S",9001,4291,16117,9807,8801,0.0,9102,8802,-81.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-29178,"SAD69 / UTM zone 18S",9001,4291,16118,9807,8801,0.0,9102,8802,-75.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-29179,"SAD69 / UTM zone 19S",9001,4291,16119,9807,8801,0.0,9102,8802,-69.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-29180,"SAD69 / UTM zone 20S",9001,4291,16120,9807,8801,0.0,9102,8802,-63.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-29181,"SAD69 / UTM zone 21S",9001,4291,16121,9807,8801,0.0,9102,8802,-57.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-29182,"SAD69 / UTM zone 22S",9001,4291,16122,9807,8801,0.0,9102,8802,-51.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-29183,"SAD69 / UTM zone 23S",9001,4291,16123,9807,8801,0.0,9102,8802,-45.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-29184,"SAD69 / UTM zone 24S",9001,4291,16124,9807,8801,0.0,9102,8802,-39.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-29185,"SAD69 / UTM zone 25S",9001,4291,16125,9807,8801,0.0,9102,8802,-33.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-29220,"Sapper Hill 1943 / UTM zone 20S",9001,4292,16120,9807,8801,0.0,9102,8802,-63.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-29221,"Sapper Hill 1943 / UTM zone 21S",9001,4292,16121,9807,8801,0.0,9102,8802,-57.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-29333,"Schwarzeck / UTM zone 33S",9001,4293,16133,9807,8801,0.0,9102,8802,15.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-29371,South West African Coord. System zone 11,9031,4293,17611,9808,8801,-22.0,9102,8802,11.0,9102,8805,1.0,9201,8806,0.0,9031,8807,0.0,9031,,,,,,
-29373,South West African Coord. System zone 13,9031,4293,17613,9808,8801,-22.0,9102,8802,13.0,9102,8805,1.0,9201,8806,0.0,9031,8807,0.0,9031,,,,,,
-29375,South West African Coord. System zone 15,9031,4293,17615,9808,8801,-22.0,9102,8802,15.0,9102,8805,1.0,9201,8806,0.0,9031,8807,0.0,9031,,,,,,
-29377,South West African Coord. System zone 17,9031,4293,17617,9808,8801,-22.0,9102,8802,17.0,9102,8805,1.0,9201,8806,0.0,9031,8807,0.0,9031,,,,,,
-29379,South West African Coord. System zone 19,9031,4293,17619,9808,8801,-22.0,9102,8802,19.0,9102,8805,1.0,9201,8806,0.0,9031,8807,0.0,9031,,,,,,
-29381,South West African Coord. System zone 21,9031,4293,17621,9808,8801,-22.0,9102,8802,21.0,9102,8805,1.0,9201,8806,0.0,9031,8807,0.0,9031,,,,,,
-29383,South West African Coord. System zone 23,9031,4293,17623,9808,8801,-22.0,9102,8802,23.0,9102,8805,1.0,9201,8806,0.0,9031,8807,0.0,9031,,,,,,
-29385,South West African Coord. System zone 25,9031,4293,17625,9808,8801,-22.0,9102,8802,25.0,9102,8805,1.0,9201,8806,0.0,9031,8807,0.0,9031,,,,,,
-29635,"Sudan / UTM zone 35N",9001,4296,16035,9807,8801,0.0,9102,8802,27.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-29636,"Sudan / UTM zone 36N",9001,4296,16036,9807,8801,0.0,9102,8802,33.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-29700,"Tananarive (Paris) / Laborde Grid",9001,4810,19911,9815,8811,-21.0,9105,8812,49.0,9105,8813,21.0,9105,8814,21.0,9105,8815,0.9995,9201,8816,400000.0,9001,8817,800000.0,9001
-29738,"Tananarive / UTM zone 38S",9001,4297,16138,9807,8801,0.0,9102,8802,45.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-29739,"Tananarive / UTM zone 39S",9001,4297,16139,9807,8801,0.0,9102,8802,51.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-29849,"Timbalai 1948 / UTM zone 49N",9001,4298,16049,9807,8801,0.0,9102,8802,111.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-29850,"Timbalai 1948 / UTM zone 50N",9001,4298,16050,9807,8801,0.0,9102,8802,117.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-29871,"Timbalai 1948 / R.S.O. Borneo (ch)",9042,4298,19956,9815,8811,4.0,9110,8812,115.0,9110,8813,53.18569537,9110,8814,53.07483685,9110,8815,0.99984,9201,8816,29352.4763,9042,8817,22014.3572,9042
-29872,"Timbalai 1948 / R.S.O. Borneo (ft)",9041,4298,19957,9815,8811,4.0,9110,8812,115.0,9110,8813,53.18569537,9110,8814,53.07483685,9110,8815,0.99984,9201,8816,1937263.44,9041,8817,1452947.58,9041
-29873,"Timbalai 1948 / R.S.O. Borneo (m)",9001,4298,19958,9815,8811,4.0,9110,8812,115.0,9110,8813,53.18569537,9110,8814,53.07483685,9110,8815,0.99984,9201,8816,590476.87,9001,8817,442857.65,9001
-29900,"TM65 / Irish National Grid",9001,4299,19908,9807,8801,53.3,9110,8802,-8.0,9110,8805,1.000035,9201,8806,200000.0,9001,8807,250000.0,9001,,,,,,
-29901,"OSNI 1952 / Irish National Grid",9001,4188,19973,9807,8801,53.3,9110,8802,-8.0,9110,8805,1.0,9201,8806,200000.0,9001,8807,250000.0,9001,,,,,,
-29902,"TM65 / Irish Grid",9001,4299,19972,9807,8801,53.3,9110,8802,-8.0,9110,8805,1.000035,9201,8806,200000.0,9001,8807,250000.0,9001,,,,,,
-29903,"TM75 / Irish Grid",9001,4300,19972,9807,8801,53.3,9110,8802,-8.0,9110,8805,1.000035,9201,8806,200000.0,9001,8807,250000.0,9001,,,,,,
-30161,"Tokyo / Japan Plane Rectangular CS I",9001,4301,17801,9807,8801,33.0,9110,8802,129.3,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-30162,"Tokyo / Japan Plane Rectangular CS II",9001,4301,17802,9807,8801,33.0,9110,8802,131.0,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-30163,"Tokyo / Japan Plane Rectangular CS III",9001,4301,17803,9807,8801,36.0,9110,8802,132.1,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-30164,"Tokyo / Japan Plane Rectangular CS IV",9001,4301,17804,9807,8801,33.0,9110,8802,133.3,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-30165,"Tokyo / Japan Plane Rectangular CS V",9001,4301,17805,9807,8801,36.0,9110,8802,134.2,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-30166,"Tokyo / Japan Plane Rectangular CS VI",9001,4301,17806,9807,8801,36.0,9110,8802,136.0,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-30167,"Tokyo / Japan Plane Rectangular CS VII",9001,4301,17807,9807,8801,36.0,9110,8802,137.1,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-30168,"Tokyo / Japan Plane Rectangular CS VIII",9001,4301,17808,9807,8801,36.0,9110,8802,138.3,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-30169,"Tokyo / Japan Plane Rectangular CS IX",9001,4301,17809,9807,8801,36.0,9110,8802,139.5,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-30170,"Tokyo / Japan Plane Rectangular CS X",9001,4301,17810,9807,8801,40.0,9110,8802,140.5,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-30171,"Tokyo / Japan Plane Rectangular CS XI",9001,4301,17811,9807,8801,44.0,9110,8802,140.15,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-30172,"Tokyo / Japan Plane Rectangular CS XII",9001,4301,17812,9807,8801,44.0,9110,8802,142.15,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-30173,"Tokyo / Japan Plane Rectangular CS XIII",9001,4301,17813,9807,8801,44.0,9110,8802,144.15,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-30174,"Tokyo / Japan Plane Rectangular CS XIV",9001,4301,17814,9807,8801,26.0,9110,8802,142.0,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-30175,"Tokyo / Japan Plane Rectangular CS XV",9001,4301,17815,9807,8801,26.0,9110,8802,127.3,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-30176,"Tokyo / Japan Plane Rectangular CS XVI",9001,4301,17816,9807,8801,26.0,9110,8802,124.0,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-30177,"Tokyo / Japan Plane Rectangular CS XVII",9001,4301,17817,9807,8801,26.0,9110,8802,131.0,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-30178,"Tokyo / Japan Plane Rectangular CS XVIII",9001,4301,17818,9807,8801,20.0,9110,8802,136.0,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-30179,"Tokyo / Japan Plane Rectangular CS XIX",9001,4301,17819,9807,8801,26.0,9110,8802,154.0,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-30200,"Trinidad 1903 / Trinidad Grid",9039,4302,19925,9806,8801,10.263,9110,8802,-61.2,9110,8806,430000.0,9039,8807,325000.0,9039,,,,,,,,,
-30339,"TC(1948) / UTM zone 39N",9001,4303,16039,9807,8801,0.0,9102,8802,51.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-30340,"TC(1948) / UTM zone 40N",9001,4303,16040,9807,8801,0.0,9102,8802,57.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-30491,"Voirol 1875 / Nord Algerie (ancienne)",9001,4304,18011,9801,8801,40.0,9105,8802,3.0,9105,8805,0.999625544,9201,8806,500000.0,9001,8807,300000.0,9001,,,,,,
-30492,"Voirol 1875 / Sud Algerie (ancienne)",9001,4304,18012,9801,8801,37.0,9105,8802,3.0,9105,8805,0.999625769,9201,8806,500000.0,9001,8807,300000.0,9001,,,,,,
-30729,"Nord Sahara 1959 / UTM zone 29N",9001,4307,16029,9807,8801,0.0,9102,8802,-9.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-30730,"Nord Sahara 1959 / UTM zone 30N",9001,4307,16030,9807,8801,0.0,9102,8802,-3.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-30731,"Nord Sahara 1959 / UTM zone 31N",9001,4307,16031,9807,8801,0.0,9102,8802,3.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-30732,"Nord Sahara 1959 / UTM zone 32N",9001,4307,16032,9807,8801,0.0,9102,8802,9.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-30791,"Nord Sahara 1959 / Voirol Unifie Nord",9001,4307,18021,9801,8801,40.0,9105,8802,3.0,9105,8805,0.999625544,9201,8806,500135.0,9001,8807,300090.0,9001,,,,,,
-30792,"Nord Sahara 1959 / Voirol Unifie Sud",9001,4307,18022,9801,8801,37.0,9105,8802,3.0,9105,8805,0.999625769,9201,8806,500135.0,9001,8807,300090.0,9001,,,,,,
-30800,RT38 2.5 gon W,9001,4308,19929,9807,8801,0.0,9110,8802,15.48298,9110,8805,1.0,9201,8806,1500000.0,9001,8807,0.0,9001,,,,,,
-31028,"Yoff / UTM zone 28N",9001,4310,16028,9807,8801,0.0,9102,8802,-15.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-31121,"Zanderij / UTM zone 21N",9001,4311,16021,9807,8801,0.0,9102,8802,-57.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-31154,"Zanderij / TM 54 NW",9001,4311,17054,9807,8801,0.0,9102,8802,-54.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-31170,"Zanderij / Suriname Old TM",9001,4311,19954,9807,8801,0.0,9110,8802,-55.41,9110,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-31171,"Zanderij / Suriname TM",9001,4311,19955,9807,8801,0.0,9110,8802,-55.41,9110,8805,0.9999,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-31265,"MGI / 3-degree Gauss zone 5",9001,4312,16265,9807,8801,0.0,9102,8802,15.0,9102,8805,1.0,9201,8806,5500000.0,9001,8807,0.0,9001,,,,,,
-31266,"MGI / 3-degree Gauss zone 6",9001,4312,16266,9807,8801,0.0,9102,8802,18.0,9102,8805,1.0,9201,8806,6500000.0,9001,8807,0.0,9001,,,,,,
-31267,"MGI / 3-degree Gauss zone 7",9001,4312,16267,9807,8801,0.0,9102,8802,21.0,9102,8805,1.0,9201,8806,7500000.0,9001,8807,0.0,9001,,,,,,
-31268,"MGI / 3-degree Gauss zone 8",9001,4312,16268,9807,8801,0.0,9102,8802,24.0,9102,8805,1.0,9201,8806,8500000.0,9001,8807,0.0,9001,,,,,,
-31275,"MGI / Balkans zone 5",9001,4312,18275,9807,8801,0.0,9102,8802,15.0,9102,8805,0.9999,9201,8806,5500000.0,9001,8807,0.0,9001,,,,,,
-31276,"MGI / Balkans zone 6",9001,4312,18276,9807,8801,0.0,9102,8802,18.0,9102,8805,0.9999,9201,8806,6500000.0,9001,8807,0.0,9001,,,,,,
-31277,"MGI / Balkans zone 7",9001,4312,18277,9807,8801,0.0,9102,8802,21.0,9102,8805,0.9999,9201,8806,7500000.0,9001,8807,0.0,9001,,,,,,
-31278,"MGI / Balkans zone 8",9001,4312,18277,9807,8801,0.0,9102,8802,21.0,9102,8805,0.9999,9201,8806,7500000.0,9001,8807,0.0,9001,,,,,,
-31279,"MGI / Balkans zone 8",9001,4312,18278,9807,8801,0.0,9102,8802,24.0,9102,8805,0.9999,9201,8806,8500000.0,9001,8807,0.0,9001,,,,,,
-31281,"MGI (Ferro) / Austria West Zone",9001,4805,18041,9807,8801,0.0,9102,8802,28.0,9102,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-31282,"MGI (Ferro) / Austria Central Zone",9001,4805,18042,9807,8801,0.0,9102,8802,31.0,9102,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-31283,"MGI (Ferro) / Austria East Zone",9001,4805,18043,9807,8801,0.0,9102,8802,34.0,9102,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-31284,"MGI / M28",9001,4312,18044,9807,8801,0.0,9110,8802,10.2,9110,8805,1.0,9201,8806,150000.0,9001,8807,0.0,9001,,,,,,
-31285,"MGI / M31",9001,4312,18045,9807,8801,0.0,9110,8802,13.2,9110,8805,1.0,9201,8806,450000.0,9001,8807,0.0,9001,,,,,,
-31286,"MGI / M34",9001,4312,18046,9807,8801,0.0,9110,8802,16.2,9110,8805,1.0,9201,8806,750000.0,9001,8807,0.0,9001,,,,,,
-31287,"MGI / Austria Lambert",9001,4312,19947,9802,8821,47.3,9110,8822,13.2,9110,8823,49.0,9110,8824,46.0,9110,8826,400000.0,9001,8827,400000.0,9001,,,
-31291,"MGI (Ferro) / Austria West Zone",9001,4805,18041,9807,8801,0.0,9102,8802,28.0,9102,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-31292,"MGI (Ferro) / Austria Central Zone",9001,4805,18042,9807,8801,0.0,9102,8802,31.0,9102,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-31293,"MGI (Ferro) / Austria East Zone",9001,4805,18043,9807,8801,0.0,9102,8802,34.0,9102,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-31294,"MGI / M28",9001,4312,18044,9807,8801,0.0,9110,8802,10.2,9110,8805,1.0,9201,8806,150000.0,9001,8807,0.0,9001,,,,,,
-31295,"MGI / M31",9001,4312,18045,9807,8801,0.0,9110,8802,13.2,9110,8805,1.0,9201,8806,450000.0,9001,8807,0.0,9001,,,,,,
-31296,"MGI / M34",9001,4312,18046,9807,8801,0.0,9110,8802,16.2,9110,8805,1.0,9201,8806,750000.0,9001,8807,0.0,9001,,,,,,
-31297,"MGI / Austria Lambert",9001,4312,19947,9802,8821,47.3,9110,8822,13.2,9110,8823,49.0,9110,8824,46.0,9110,8826,400000.0,9001,8827,400000.0,9001,,,
-31300,"Belge 1972 / Belge Lambert 72",9001,4313,19902,9803,8821,90.0,9110,8822,4.2124983,9110,8823,49.5,9110,8824,51.1,9110,8826,150000.01256,9001,8827,5400088.4378,9001,,,
-31370,"Belge 1972 / Belgian Lambert 72",9001,4313,19961,9802,8821,90.0,9110,8822,4.2202952,9110,8823,51.100000204,9110,8824,49.500000204,9110,8826,150000.013,9001,8827,5400088.438,9001,,,
-31461,"DHDN / 3-degree Gauss zone 1",9001,4314,16261,9807,8801,0.0,9102,8802,3.0,9102,8805,1.0,9201,8806,1500000.0,9001,8807,0.0,9001,,,,,,
-31462,"DHDN / 3-degree Gauss zone 2",9001,4314,16262,9807,8801,0.0,9102,8802,6.0,9102,8805,1.0,9201,8806,2500000.0,9001,8807,0.0,9001,,,,,,
-31463,"DHDN / 3-degree Gauss zone 3",9001,4314,16263,9807,8801,0.0,9102,8802,9.0,9102,8805,1.0,9201,8806,3500000.0,9001,8807,0.0,9001,,,,,,
-31464,"DHDN / 3-degree Gauss zone 4",9001,4314,16264,9807,8801,0.0,9102,8802,12.0,9102,8805,1.0,9201,8806,4500000.0,9001,8807,0.0,9001,,,,,,
-31465,"DHDN / 3-degree Gauss zone 5",9001,4314,16265,9807,8801,0.0,9102,8802,15.0,9102,8805,1.0,9201,8806,5500000.0,9001,8807,0.0,9001,,,,,,
-31466,"DHDN / Gauss-Kruger zone 2",9001,4314,16262,9807,8801,0.0,9102,8802,6.0,9102,8805,1.0,9201,8806,2500000.0,9001,8807,0.0,9001,,,,,,
-31467,"DHDN / Gauss-Kruger zone 3",9001,4314,16263,9807,8801,0.0,9102,8802,9.0,9102,8805,1.0,9201,8806,3500000.0,9001,8807,0.0,9001,,,,,,
-31468,"DHDN / Gauss-Kruger zone 4",9001,4314,16264,9807,8801,0.0,9102,8802,12.0,9102,8805,1.0,9201,8806,4500000.0,9001,8807,0.0,9001,,,,,,
-31469,"DHDN / Gauss-Kruger zone 5",9001,4314,16265,9807,8801,0.0,9102,8802,15.0,9102,8805,1.0,9201,8806,5500000.0,9001,8807,0.0,9001,,,,,,
-31528,"Conakry 1905 / UTM zone 28N",9001,4315,16028,9807,8801,0.0,9102,8802,-15.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-31529,"Conakry 1905 / UTM zone 29N",9001,4315,16029,9807,8801,0.0,9102,8802,-9.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-31600,"Dealul Piscului 1933/ Stereo 33",9001,4316,19927,9809,8801,45.54,9110,8802,25.23328772,9110,8805,0.9996667,9201,8806,500000.0,9001,8807,500000.0,9001,,,,,,
-31700,"Dealul Piscului 1970/ Stereo 70",9001,4317,19926,9809,8801,46.0,9102,8802,25.0,9102,8805,0.99975,9201,8806,500000.0,9001,8807,500000.0,9001,,,,,,
-31838,"NGN / UTM zone 38N",9001,4318,16038,9807,8801,0.0,9102,8802,45.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-31839,"NGN / UTM zone 39N",9001,4318,16039,9807,8801,0.0,9102,8802,51.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-31900,"KUDAMS / KTM",9001,4319,19928,9807,8801,0.0,9102,8802,48.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-31986,"SIRGAS / UTM zone 17N",9001,4170,16017,9807,8801,0.0,9102,8802,-81.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-31987,"SIRGAS / UTM zone 18N",9001,4170,16018,9807,8801,0.0,9102,8802,-75.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-31988,"SIRGAS / UTM zone 19N",9001,4170,16019,9807,8801,0.0,9102,8802,-69.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-31989,"SIRGAS / UTM zone 20N",9001,4170,16020,9807,8801,0.0,9102,8802,-63.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-31990,"SIRGAS / UTM zone 21N",9001,4170,16021,9807,8801,0.0,9102,8802,-57.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-31991,"SIRGAS / UTM zone 22N",9001,4170,16022,9807,8801,0.0,9102,8802,-51.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-31992,"SIRGAS / UTM zone 17S",9001,4170,16117,9807,8801,0.0,9102,8802,-81.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-31993,"SIRGAS / UTM zone 18S",9001,4170,16118,9807,8801,0.0,9102,8802,-75.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-31994,"SIRGAS / UTM zone 19S",9001,4170,16119,9807,8801,0.0,9102,8802,-69.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-31995,"SIRGAS / UTM zone 20S",9001,4170,16120,9807,8801,0.0,9102,8802,-63.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-31996,"SIRGAS / UTM zone 21S",9001,4170,16121,9807,8801,0.0,9102,8802,-57.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-31997,"SIRGAS / UTM zone 22S",9001,4170,16122,9807,8801,0.0,9102,8802,-51.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-31998,"SIRGAS / UTM zone 23S",9001,4170,16123,9807,8801,0.0,9102,8802,-45.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-31999,"SIRGAS / UTM zone 24S",9001,4170,16124,9807,8801,0.0,9102,8802,-39.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32000,"SIRGAS / UTM zone 25S",9001,4170,16125,9807,8801,0.0,9102,8802,-33.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32001,"NAD27 / Montana North",9003,4267,12501,9802,8821,47.0,9110,8822,-109.3,9110,8823,48.43,9110,8824,47.51,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-32002,"NAD27 / Montana Central",9003,4267,12502,9802,8821,45.5,9110,8822,-109.3,9110,8823,47.53,9110,8824,46.27,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-32003,"NAD27 / Montana South",9003,4267,12503,9802,8821,44.0,9110,8822,-109.3,9110,8823,46.24,9110,8824,44.52,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-32005,"NAD27 / Nebraska North",9003,4267,12601,9802,8821,41.2,9110,8822,-100.0,9110,8823,41.51,9110,8824,42.49,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-32006,"NAD27 / Nebraska South",9003,4267,12602,9802,8821,39.4,9110,8822,-99.3,9110,8823,40.17,9110,8824,41.43,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-32007,"NAD27 / Nevada East",9003,4267,12701,9807,8801,34.45,9110,8802,-115.35,9110,8805,0.9999,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-32008,"NAD27 / Nevada Central",9003,4267,12702,9807,8801,34.45,9110,8802,-116.4,9110,8805,0.9999,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-32009,"NAD27 / Nevada West",9003,4267,12703,9807,8801,34.45,9110,8802,-118.35,9110,8805,0.9999,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-32010,"NAD27 / New Hampshire",9003,4267,12800,9807,8801,42.3,9110,8802,-71.4,9110,8805,0.999966667,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-32011,"NAD27 / New Jersey",9003,4267,12900,9807,8801,38.5,9110,8802,-74.4,9110,8805,0.999975,9201,8806,2000000.0,9003,8807,0.0,9003,,,,,,
-32012,"NAD27 / New Mexico East",9003,4267,13001,9807,8801,31.0,9110,8802,-104.2,9110,8805,0.999909091,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-32013,"NAD27 / New Mexico Central",9003,4267,13002,9807,8801,31.0,9110,8802,-106.15,9110,8805,0.9999,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-32014,"NAD27 / New Mexico West",9003,4267,13003,9807,8801,31.0,9110,8802,-107.5,9110,8805,0.999916667,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-32015,"NAD27 / New York East",9003,4267,13101,9807,8801,40.0,9110,8802,-74.2,9110,8805,0.999966667,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-32016,"NAD27 / New York Central",9003,4267,13102,9807,8801,40.0,9110,8802,-76.35,9110,8805,0.9999375,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-32017,"NAD27 / New York West",9003,4267,13103,9807,8801,40.0,9110,8802,-78.35,9110,8805,0.9999375,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-32018,"NAD27 / New York Long Island",9003,4267,13104,9802,8821,40.3,9110,8822,-74.0,9110,8823,41.02,9110,8824,40.4,9110,8826,1000000.0,9003,8827,0.0,9003,,,
-32019,"NAD27 / North Carolina",9003,4267,13200,9802,8821,33.45,9110,8822,-79.0,9110,8823,34.2,9110,8824,36.1,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-32020,"NAD27 / North Dakota North",9003,4267,13301,9802,8821,47.0,9110,8822,-100.3,9110,8823,47.26,9110,8824,48.44,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-32021,"NAD27 / North Dakota South",9003,4267,13302,9802,8821,45.4,9110,8822,-100.3,9110,8823,46.11,9110,8824,47.29,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-32022,"NAD27 / Ohio North",9003,4267,13401,9802,8821,39.4,9110,8822,-82.3,9110,8823,40.26,9110,8824,41.42,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-32023,"NAD27 / Ohio South",9003,4267,13402,9802,8821,38.0,9110,8822,-82.3,9110,8823,38.44,9110,8824,40.02,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-32024,"NAD27 / Oklahoma North",9003,4267,13501,9802,8821,35.0,9110,8822,-98.0,9110,8823,35.34,9110,8824,36.46,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-32025,"NAD27 / Oklahoma South",9003,4267,13502,9802,8821,33.2,9110,8822,-98.0,9110,8823,33.56,9110,8824,35.14,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-32026,"NAD27 / Oregon North",9003,4267,13601,9802,8821,43.4,9110,8822,-120.3,9110,8823,44.2,9110,8824,46.0,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-32027,"NAD27 / Oregon South",9003,4267,13602,9802,8821,41.4,9110,8822,-120.3,9110,8823,42.2,9110,8824,44.0,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-32028,"NAD27 / Pennsylvania North",9003,4267,13701,9802,8821,40.1,9110,8822,-77.45,9110,8823,40.53,9110,8824,41.57,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-32029,"NAD27 / Pennsylvania South",9003,4267,13702,9802,8821,39.2,9110,8822,-77.45,9110,8823,39.56,9110,8824,40.48,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-32030,"NAD27 / Rhode Island",9003,4267,13800,9807,8801,41.05,9110,8802,-71.3,9110,8805,0.9999938,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-32031,"NAD27 / South Carolina North",9003,4267,13901,9802,8821,33.0,9110,8822,-81.0,9110,8823,33.46,9110,8824,34.58,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-32033,"NAD27 / South Carolina South",9003,4267,13902,9802,8821,31.5,9110,8822,-81.0,9110,8823,32.2,9110,8824,33.4,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-32034,"NAD27 / South Dakota North",9003,4267,14001,9802,8821,43.5,9110,8822,-100.0,9110,8823,44.25,9110,8824,45.41,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-32035,"NAD27 / South Dakota South",9003,4267,14002,9802,8821,42.2,9110,8822,-100.2,9110,8823,42.5,9110,8824,44.24,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-32036,"NAD27 / Tennessee",9003,4267,14100,9802,8821,34.4,9110,8822,-86.0,9110,8823,35.15,9110,8824,36.25,9110,8826,100000.0,9003,8827,0.0,9003,,,
-32037,"NAD27 / Texas North",9003,4267,14201,9802,8821,34.0,9110,8822,-101.3,9110,8823,34.39,9110,8824,36.11,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-32038,"NAD27 / Texas North Central",9003,4267,14202,9802,8821,31.4,9110,8822,-97.3,9110,8823,32.08,9110,8824,33.58,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-32039,"NAD27 / Texas Central",9003,4267,14203,9802,8821,29.4,9110,8822,-100.2,9110,8823,30.07,9110,8824,31.53,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-32040,"NAD27 / Texas South Central",9003,4267,14204,9802,8821,27.5,9110,8822,-99.0,9110,8823,28.23,9110,8824,30.17,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-32041,"NAD27 / Texas South",9003,4267,14205,9802,8821,25.4,9110,8822,-98.3,9110,8823,26.1,9110,8824,27.5,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-32042,"NAD27 / Utah North",9003,4267,14301,9802,8821,40.2,9110,8822,-111.3,9110,8823,40.43,9110,8824,41.47,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-32043,"NAD27 / Utah Central",9003,4267,14302,9802,8821,38.2,9110,8822,-111.3,9110,8823,39.01,9110,8824,40.39,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-32044,"NAD27 / Utah South",9003,4267,14303,9802,8821,36.4,9110,8822,-111.3,9110,8823,37.13,9110,8824,38.21,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-32045,"NAD27 / Vermont",9003,4267,14400,9807,8801,42.3,9110,8802,-72.3,9110,8805,0.999964286,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-32046,"NAD27 / Virginia North",9003,4267,14501,9802,8821,37.4,9110,8822,-78.3,9110,8823,38.02,9110,8824,39.12,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-32047,"NAD27 / Virginia South",9003,4267,14502,9802,8821,36.2,9110,8822,-78.3,9110,8823,36.46,9110,8824,37.58,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-32048,"NAD27 / Washington North",9003,4267,14601,9802,8821,47.0,9110,8822,-120.5,9110,8823,47.3,9110,8824,48.44,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-32049,"NAD27 / Washington South",9003,4267,14602,9802,8821,45.2,9110,8822,-120.3,9110,8823,45.5,9110,8824,47.2,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-32050,"NAD27 / West Virginia North",9003,4267,14701,9802,8821,38.3,9110,8822,-79.3,9110,8823,39.0,9110,8824,40.15,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-32051,"NAD27 / West Virginia South",9003,4267,14702,9802,8821,37.0,9110,8822,-81.0,9110,8823,37.29,9110,8824,38.53,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-32052,"NAD27 / Wisconsin North",9003,4267,14801,9802,8821,45.1,9110,8822,-90.0,9110,8823,45.34,9110,8824,46.46,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-32053,"NAD27 / Wisconsin Central",9003,4267,14802,9802,8821,43.5,9110,8822,-90.0,9110,8823,44.15,9110,8824,45.3,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-32054,"NAD27 / Wisconsin South",9003,4267,14803,9802,8821,42.0,9110,8822,-90.0,9110,8823,42.44,9110,8824,44.04,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-32055,"NAD27 / Wyoming East",9003,4267,14901,9807,8801,40.4,9110,8802,-105.1,9110,8805,0.999941177,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-32056,"NAD27 / Wyoming East Central",9003,4267,14902,9807,8801,40.4,9110,8802,-107.2,9110,8805,0.999941177,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-32057,"NAD27 / Wyoming West Central",9003,4267,14903,9807,8801,40.4,9110,8802,-108.45,9110,8805,0.999941177,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-32058,"NAD27 / Wyoming West",9003,4267,14904,9807,8801,40.4,9110,8802,-110.05,9110,8805,0.999941177,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-32061,"NAD27 / Guatemala Norte",9001,4267,18211,9801,8801,16.49,9110,8802,-90.2,9110,8805,0.99992226,9201,8806,500000.0,9001,8807,292209.579,9001,,,,,,
-32062,"NAD27 / Guatemala Sur",9001,4267,18212,9801,8801,14.54,9110,8802,-90.2,9110,8805,0.99989906,9201,8806,500000.0,9001,8807,325992.681,9001,,,,,,
-32064,"NAD27 / BLM 14N (ftUS)",9003,4267,15914,9807,8801,0.0,9102,8802,-99.0,9102,8805,0.9996,9201,8806,1640416.67,9003,8807,0.0,9003,,,,,,
-32065,"NAD27 / BLM 15N (ftUS)",9003,4267,15915,9807,8801,0.0,9102,8802,-93.0,9102,8805,0.9996,9201,8806,1640416.67,9003,8807,0.0,9003,,,,,,
-32066,"NAD27 / BLM 16N (ftUS)",9003,4267,15916,9807,8801,0.0,9102,8802,-87.0,9102,8805,0.9996,9201,8806,1640416.67,9003,8807,0.0,9003,,,,,,
-32067,"NAD27 / BLM 17N (ftUS)",9003,4267,15917,9807,8801,0.0,9102,8802,-81.0,9102,8805,0.9996,9201,8806,1640416.67,9003,8807,0.0,9003,,,,,,
-32074,"NAD27 / BLM 14N (feet)",9003,4267,15914,9807,8801,0.0,9102,8802,-99.0,9102,8805,0.9996,9201,8806,1640416.67,9003,8807,0.0,9003,,,,,,
-32075,"NAD27 / BLM 15N (feet)",9003,4267,15915,9807,8801,0.0,9102,8802,-93.0,9102,8805,0.9996,9201,8806,1640416.67,9003,8807,0.0,9003,,,,,,
-32076,"NAD27 / BLM 16N (feet)",9003,4267,15916,9807,8801,0.0,9102,8802,-87.0,9102,8805,0.9996,9201,8806,1640416.67,9003,8807,0.0,9003,,,,,,
-32077,"NAD27 / BLM 17N (feet)",9003,4267,15917,9807,8801,0.0,9102,8802,-81.0,9102,8805,0.9996,9201,8806,1640416.67,9003,8807,0.0,9003,,,,,,
-32081,"NAD27 / MTM zone 1",9001,4267,17701,9807,8801,0.0,9102,8802,-53.0,9102,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-32082,"NAD27 / MTM zone 2",9001,4267,17702,9807,8801,0.0,9102,8802,-56.0,9102,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-32083,"NAD27 / MTM zone 3",9001,4267,17703,9807,8801,0.0,9110,8802,-58.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-32084,"NAD27 / MTM zone 4",9001,4267,17704,9807,8801,0.0,9110,8802,-61.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-32085,"NAD27 / MTM zone 5",9001,4267,17705,9807,8801,0.0,9110,8802,-64.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-32086,"NAD27 / MTM zone 6",9001,4267,17706,9807,8801,0.0,9110,8802,-67.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-32098,"NAD27 / Quebec Lambert",9001,4267,19944,9802,8821,44.0,9110,8822,-68.3,9110,8823,60.0,9110,8824,46.0,9110,8826,0.0,9001,8827,0.0,9001,,,
-32100,"NAD83 / Montana",9001,4269,12530,9802,8821,44.15,9110,8822,-109.3,9110,8823,49.0,9110,8824,45.0,9110,8826,600000.0,9001,8827,0.0,9001,,,
-32104,"NAD83 / Nebraska",9001,4269,12630,9802,8821,39.5,9110,8822,-100.0,9110,8823,43.0,9110,8824,40.0,9110,8826,500000.0,9001,8827,0.0,9001,,,
-32107,"NAD83 / Nevada East",9001,4269,12731,9807,8801,34.45,9110,8802,-115.35,9110,8805,0.9999,9201,8806,200000.0,9001,8807,8000000.0,9001,,,,,,
-32108,"NAD83 / Nevada Central",9001,4269,12732,9807,8801,34.45,9110,8802,-116.4,9110,8805,0.9999,9201,8806,500000.0,9001,8807,6000000.0,9001,,,,,,
-32109,"NAD83 / Nevada West",9001,4269,12733,9807,8801,34.45,9110,8802,-118.35,9110,8805,0.9999,9201,8806,800000.0,9001,8807,4000000.0,9001,,,,,,
-32110,"NAD83 / New Hampshire",9001,4269,12830,9807,8801,42.3,9110,8802,-71.4,9110,8805,0.999966667,9201,8806,300000.0,9001,8807,0.0,9001,,,,,,
-32111,"NAD83 / New Jersey",9001,4269,12930,9807,8801,38.5,9110,8802,-74.3,9110,8805,0.9999,9201,8806,150000.0,9001,8807,0.0,9001,,,,,,
-32112,"NAD83 / New Mexico East",9001,4269,13031,9807,8801,31.0,9110,8802,-104.2,9110,8805,0.999909091,9201,8806,165000.0,9001,8807,0.0,9001,,,,,,
-32113,"NAD83 / New Mexico Central",9001,4269,13032,9807,8801,31.0,9110,8802,-106.15,9110,8805,0.9999,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32114,"NAD83 / New Mexico West",9001,4269,13033,9807,8801,31.0,9110,8802,-107.5,9110,8805,0.999916667,9201,8806,830000.0,9001,8807,0.0,9001,,,,,,
-32115,"NAD83 / New York East",9001,4269,13131,9807,8801,38.5,9110,8802,-74.3,9110,8805,0.9999,9201,8806,150000.0,9001,8807,0.0,9001,,,,,,
-32116,"NAD83 / New York Central",9001,4269,13132,9807,8801,40.0,9110,8802,-76.35,9110,8805,0.9999375,9201,8806,250000.0,9001,8807,0.0,9001,,,,,,
-32117,"NAD83 / New York West",9001,4269,13133,9807,8801,40.0,9110,8802,-78.35,9110,8805,0.9999375,9201,8806,350000.0,9001,8807,0.0,9001,,,,,,
-32118,"NAD83 / New York Long Island",9001,4269,13134,9802,8821,40.1,9110,8822,-74.0,9110,8823,41.02,9110,8824,40.4,9110,8826,300000.0,9001,8827,0.0,9001,,,
-32119,"NAD83 / North Carolina",9001,4269,13230,9802,8821,33.45,9110,8822,-79.0,9110,8823,36.1,9110,8824,34.2,9110,8826,609601.22,9001,8827,0.0,9001,,,
-32120,"NAD83 / North Dakota North",9001,4269,13331,9802,8821,47.0,9110,8822,-100.3,9110,8823,48.44,9110,8824,47.26,9110,8826,600000.0,9001,8827,0.0,9001,,,
-32121,"NAD83 / North Dakota South",9001,4269,13332,9802,8821,45.4,9110,8822,-100.3,9110,8823,47.29,9110,8824,46.11,9110,8826,600000.0,9001,8827,0.0,9001,,,
-32122,"NAD83 / Ohio North",9001,4269,13431,9802,8821,39.4,9110,8822,-82.3,9110,8823,41.42,9110,8824,40.26,9110,8826,600000.0,9001,8827,0.0,9001,,,
-32123,"NAD83 / Ohio South",9001,4269,13432,9802,8821,38.0,9110,8822,-82.3,9110,8823,40.02,9110,8824,38.44,9110,8826,600000.0,9001,8827,0.0,9001,,,
-32124,"NAD83 / Oklahoma North",9001,4269,13531,9802,8821,35.0,9110,8822,-98.0,9110,8823,36.46,9110,8824,35.34,9110,8826,600000.0,9001,8827,0.0,9001,,,
-32125,"NAD83 / Oklahoma South",9001,4269,13532,9802,8821,33.2,9110,8822,-98.0,9110,8823,35.14,9110,8824,33.56,9110,8826,600000.0,9001,8827,0.0,9001,,,
-32126,"NAD83 / Oregon North",9001,4269,13631,9802,8821,43.4,9110,8822,-120.3,9110,8823,46.0,9110,8824,44.2,9110,8826,2500000.0,9001,8827,0.0,9001,,,
-32127,"NAD83 / Oregon South",9001,4269,13632,9802,8821,41.4,9110,8822,-120.3,9110,8823,44.0,9110,8824,42.2,9110,8826,1500000.0,9001,8827,0.0,9001,,,
-32128,"NAD83 / Pennsylvania North",9001,4269,13731,9802,8821,40.1,9110,8822,-77.45,9110,8823,41.57,9110,8824,40.53,9110,8826,600000.0,9001,8827,0.0,9001,,,
-32129,"NAD83 / Pennsylvania South",9001,4269,13732,9802,8821,39.2,9110,8822,-77.45,9110,8823,40.58,9110,8824,39.56,9110,8826,600000.0,9001,8827,0.0,9001,,,
-32130,"NAD83 / Rhode Island",9001,4269,13830,9807,8801,41.05,9110,8802,-71.3,9110,8805,0.99999375,9201,8806,100000.0,9001,8807,0.0,9001,,,,,,
-32133,"NAD83 / South Carolina",9001,4269,13930,9802,8821,31.5,9110,8822,-81.0,9110,8823,34.5,9110,8824,32.3,9110,8826,609600.0,9001,8827,0.0,9001,,,
-32134,"NAD83 / South Dakota North",9001,4269,14031,9802,8821,43.5,9110,8822,-100.0,9110,8823,45.41,9110,8824,44.25,9110,8826,600000.0,9001,8827,0.0,9001,,,
-32135,"NAD83 / South Dakota South",9001,4269,14032,9802,8821,42.2,9110,8822,-100.2,9110,8823,44.24,9110,8824,42.5,9110,8826,600000.0,9001,8827,0.0,9001,,,
-32136,"NAD83 / Tennessee",9001,4269,14130,9802,8821,34.2,9110,8822,-86.0,9110,8823,36.25,9110,8824,35.15,9110,8826,600000.0,9001,8827,0.0,9001,,,
-32137,"NAD83 / Texas North",9001,4269,14231,9802,8821,34.0,9110,8822,-101.3,9110,8823,36.11,9110,8824,34.39,9110,8826,200000.0,9001,8827,1000000.0,9001,,,
-32138,"NAD83 / Texas North Central",9001,4269,14232,9802,8821,31.4,9110,8822,-98.3,9110,8823,33.58,9110,8824,32.08,9110,8826,600000.0,9001,8827,2000000.0,9001,,,
-32139,"NAD83 / Texas Central",9001,4269,14233,9802,8821,29.4,9110,8822,-100.2,9110,8823,31.53,9110,8824,30.07,9110,8826,700000.0,9001,8827,3000000.0,9001,,,
-32140,"NAD83 / Texas South Central",9001,4269,14234,9802,8821,27.5,9110,8822,-99.0,9110,8823,30.17,9110,8824,28.23,9110,8826,600000.0,9001,8827,4000000.0,9001,,,
-32141,"NAD83 / Texas South",9001,4269,14235,9802,8821,25.4,9110,8822,-98.3,9110,8823,27.5,9110,8824,26.1,9110,8826,300000.0,9001,8827,5000000.0,9001,,,
-32142,"NAD83 / Utah North",9001,4269,14331,9802,8821,40.2,9110,8822,-111.3,9110,8823,41.47,9110,8824,40.43,9110,8826,500000.0,9001,8827,1000000.0,9001,,,
-32143,"NAD83 / Utah Central",9001,4269,14332,9802,8821,38.2,9110,8822,-111.3,9110,8823,40.39,9110,8824,39.01,9110,8826,500000.0,9001,8827,2000000.0,9001,,,
-32144,"NAD83 / Utah South",9001,4269,14333,9802,8821,36.4,9110,8822,-111.3,9110,8823,38.21,9110,8824,37.13,9110,8826,500000.0,9001,8827,3000000.0,9001,,,
-32145,"NAD83 / Vermont",9001,4269,14430,9807,8801,42.3,9110,8802,-72.3,9110,8805,0.999964286,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32146,"NAD83 / Virginia North",9001,4269,14531,9802,8821,37.4,9110,8822,-78.3,9110,8823,39.12,9110,8824,38.02,9110,8826,3500000.0,9001,8827,2000000.0,9001,,,
-32147,"NAD83 / Virginia South",9001,4269,14532,9802,8821,36.2,9110,8822,-78.3,9110,8823,37.58,9110,8824,36.46,9110,8826,3500000.0,9001,8827,1000000.0,9001,,,
-32148,"NAD83 / Washington North",9001,4269,14631,9802,8821,47.0,9110,8822,-120.5,9110,8823,48.44,9110,8824,47.3,9110,8826,500000.0,9001,8827,0.0,9001,,,
-32149,"NAD83 / Washington South",9001,4269,14632,9802,8821,45.2,9110,8822,-120.3,9110,8823,47.2,9110,8824,45.5,9110,8826,500000.0,9001,8827,0.0,9001,,,
-32150,"NAD83 / West Virginia North",9001,4269,14731,9802,8821,38.3,9110,8822,-79.3,9110,8823,40.15,9110,8824,39.0,9110,8826,600000.0,9001,8827,0.0,9001,,,
-32151,"NAD83 / West Virginia South",9001,4269,14732,9802,8821,37.0,9110,8822,-81.0,9110,8823,38.53,9110,8824,37.29,9110,8826,600000.0,9001,8827,0.0,9001,,,
-32152,"NAD83 / Wisconsin North",9001,4269,14831,9802,8821,45.1,9110,8822,-90.0,9110,8823,46.46,9110,8824,45.34,9110,8826,600000.0,9001,8827,0.0,9001,,,
-32153,"NAD83 / Wisconsin Central",9001,4269,14832,9802,8821,43.5,9110,8822,-90.0,9110,8823,45.3,9110,8824,44.15,9110,8826,600000.0,9001,8827,0.0,9001,,,
-32154,"NAD83 / Wisconsin South",9001,4269,14833,9802,8821,42.0,9110,8822,-90.0,9110,8823,44.04,9110,8824,42.44,9110,8826,600000.0,9001,8827,0.0,9001,,,
-32155,"NAD83 / Wyoming East",9001,4269,14931,9807,8801,40.3,9110,8802,-105.1,9110,8805,0.9999375,9201,8806,200000.0,9001,8807,0.0,9001,,,,,,
-32156,"NAD83 / Wyoming East Central",9001,4269,14932,9807,8801,40.3,9110,8802,-107.2,9110,8805,0.9999375,9201,8806,400000.0,9001,8807,100000.0,9001,,,,,,
-32157,"NAD83 / Wyoming West Central",9001,4269,14933,9807,8801,40.3,9110,8802,-108.45,9110,8805,0.9999375,9201,8806,600000.0,9001,8807,0.0,9001,,,,,,
-32158,"NAD83 / Wyoming West",9001,4269,14934,9807,8801,40.3,9110,8802,-110.05,9110,8805,0.9999375,9201,8806,800000.0,9001,8807,100000.0,9001,,,,,,
-32161,"NAD83 / Puerto Rico & Virgin Is.",9001,4269,15230,9802,8821,17.5,9110,8822,-66.26,9110,8823,18.26,9110,8824,18.02,9110,8826,200000.0,9001,8827,200000.0,9001,,,
-32180,"NAD83 / SCoPQ zone 2",9001,4269,17700,9807,8801,0.0,9110,8802,-55.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-32181,"NAD83 / MTM zone 1",9001,4269,17701,9807,8801,0.0,9102,8802,-53.0,9102,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-32182,"NAD83 / MTM zone 2",9001,4269,17702,9807,8801,0.0,9102,8802,-56.0,9102,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-32183,"NAD83 / MTM zone 3",9001,4269,17703,9807,8801,0.0,9110,8802,-58.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-32184,"NAD83 / MTM zone 4",9001,4269,17704,9807,8801,0.0,9110,8802,-61.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-32185,"NAD83 / MTM zone 5",9001,4269,17705,9807,8801,0.0,9110,8802,-64.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-32186,"NAD83 / MTM zone 6",9001,4269,17706,9807,8801,0.0,9110,8802,-67.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-32187,"NAD83 / MTM zone 7",9001,4269,17707,9807,8801,0.0,9110,8802,-70.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-32188,"NAD83 / MTM zone 8",9001,4269,17708,9807,8801,0.0,9110,8802,-73.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-32189,"NAD83 / MTM zone 9",9001,4269,17709,9807,8801,0.0,9110,8802,-76.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-32190,"NAD83 / MTM zone 10",9001,4269,17710,9807,8801,0.0,9110,8802,-79.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-32191,"NAD83 / MTM zone 11",9001,4269,17711,9807,8801,0.0,9110,8802,-82.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-32192,"NAD83 / MTM zone 12",9001,4269,17712,9807,8801,0.0,9102,8802,-81.0,9102,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-32193,"NAD83 / MTM zone 13",9001,4269,17713,9807,8801,0.0,9102,8802,-84.0,9102,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-32194,"NAD83 / MTM zone 14",9001,4269,17714,9807,8801,0.0,9102,8802,-87.0,9102,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-32195,"NAD83 / MTM zone 15",9001,4269,17715,9807,8801,0.0,9102,8802,-90.0,9102,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-32196,"NAD83 / MTM zone 16",9001,4269,17716,9807,8801,0.0,9102,8802,-93.0,9102,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-32197,"NAD83 / MTM zone 17",9001,4269,17717,9807,8801,0.0,9102,8802,-96.0,9102,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-32198,"NAD83 / Quebec Lambert",9001,4269,19944,9802,8821,44.0,9110,8822,-68.3,9110,8823,60.0,9110,8824,46.0,9110,8826,0.0,9001,8827,0.0,9001,,,
-32201,"WGS 72 / UTM zone 1N",9001,4322,16001,9807,8801,0.0,9102,8802,-177.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32202,"WGS 72 / UTM zone 2N",9001,4322,16002,9807,8801,0.0,9102,8802,-171.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32203,"WGS 72 / UTM zone 3N",9001,4322,16003,9807,8801,0.0,9102,8802,-165.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32204,"WGS 72 / UTM zone 4N",9001,4322,16004,9807,8801,0.0,9102,8802,-159.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32205,"WGS 72 / UTM zone 5N",9001,4322,16005,9807,8801,0.0,9102,8802,-153.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32206,"WGS 72 / UTM zone 6N",9001,4322,16006,9807,8801,0.0,9102,8802,-147.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32207,"WGS 72 / UTM zone 7N",9001,4322,16007,9807,8801,0.0,9102,8802,-141.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32208,"WGS 72 / UTM zone 8N",9001,4322,16008,9807,8801,0.0,9102,8802,-135.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32209,"WGS 72 / UTM zone 9N",9001,4322,16009,9807,8801,0.0,9102,8802,-129.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32210,"WGS 72 / UTM zone 10N",9001,4322,16010,9807,8801,0.0,9102,8802,-123.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32211,"WGS 72 / UTM zone 11N",9001,4322,16011,9807,8801,0.0,9102,8802,-117.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32212,"WGS 72 / UTM zone 12N",9001,4322,16012,9807,8801,0.0,9102,8802,-111.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32213,"WGS 72 / UTM zone 13N",9001,4322,16013,9807,8801,0.0,9102,8802,-105.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32214,"WGS 72 / UTM zone 14N",9001,4322,16014,9807,8801,0.0,9102,8802,-99.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32215,"WGS 72 / UTM zone 15N",9001,4322,16015,9807,8801,0.0,9102,8802,-93.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32216,"WGS 72 / UTM zone 16N",9001,4322,16016,9807,8801,0.0,9102,8802,-87.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32217,"WGS 72 / UTM zone 17N",9001,4322,16017,9807,8801,0.0,9102,8802,-81.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32218,"WGS 72 / UTM zone 18N",9001,4322,16018,9807,8801,0.0,9102,8802,-75.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32219,"WGS 72 / UTM zone 19N",9001,4322,16019,9807,8801,0.0,9102,8802,-69.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32220,"WGS 72 / UTM zone 20N",9001,4322,16020,9807,8801,0.0,9102,8802,-63.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32221,"WGS 72 / UTM zone 21N",9001,4322,16021,9807,8801,0.0,9102,8802,-57.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32222,"WGS 72 / UTM zone 22N",9001,4322,16022,9807,8801,0.0,9102,8802,-51.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32223,"WGS 72 / UTM zone 23N",9001,4322,16023,9807,8801,0.0,9102,8802,-45.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32224,"WGS 72 / UTM zone 24N",9001,4322,16024,9807,8801,0.0,9102,8802,-39.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32225,"WGS 72 / UTM zone 25N",9001,4322,16025,9807,8801,0.0,9102,8802,-33.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32226,"WGS 72 / UTM zone 26N",9001,4322,16026,9807,8801,0.0,9102,8802,-27.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32227,"WGS 72 / UTM zone 27N",9001,4322,16027,9807,8801,0.0,9102,8802,-21.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32228,"WGS 72 / UTM zone 28N",9001,4322,16028,9807,8801,0.0,9102,8802,-15.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32229,"WGS 72 / UTM zone 29N",9001,4322,16029,9807,8801,0.0,9102,8802,-9.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32230,"WGS 72 / UTM zone 30N",9001,4322,16030,9807,8801,0.0,9102,8802,-3.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32231,"WGS 72 / UTM zone 31N",9001,4322,16031,9807,8801,0.0,9102,8802,3.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32232,"WGS 72 / UTM zone 32N",9001,4322,16032,9807,8801,0.0,9102,8802,9.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32233,"WGS 72 / UTM zone 33N",9001,4322,16033,9807,8801,0.0,9102,8802,15.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32234,"WGS 72 / UTM zone 34N",9001,4322,16034,9807,8801,0.0,9102,8802,21.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32235,"WGS 72 / UTM zone 35N",9001,4322,16035,9807,8801,0.0,9102,8802,27.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32236,"WGS 72 / UTM zone 36N",9001,4322,16036,9807,8801,0.0,9102,8802,33.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32237,"WGS 72 / UTM zone 37N",9001,4322,16037,9807,8801,0.0,9102,8802,39.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32238,"WGS 72 / UTM zone 38N",9001,4322,16038,9807,8801,0.0,9102,8802,45.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32239,"WGS 72 / UTM zone 39N",9001,4322,16039,9807,8801,0.0,9102,8802,51.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32240,"WGS 72 / UTM zone 40N",9001,4322,16040,9807,8801,0.0,9102,8802,57.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32241,"WGS 72 / UTM zone 41N",9001,4322,16041,9807,8801,0.0,9102,8802,63.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32242,"WGS 72 / UTM zone 42N",9001,4322,16042,9807,8801,0.0,9102,8802,69.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32243,"WGS 72 / UTM zone 43N",9001,4322,16043,9807,8801,0.0,9102,8802,75.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32244,"WGS 72 / UTM zone 44N",9001,4322,16044,9807,8801,0.0,9102,8802,81.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32245,"WGS 72 / UTM zone 45N",9001,4322,16045,9807,8801,0.0,9102,8802,87.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32246,"WGS 72 / UTM zone 46N",9001,4322,16046,9807,8801,0.0,9102,8802,93.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32247,"WGS 72 / UTM zone 47N",9001,4322,16047,9807,8801,0.0,9102,8802,99.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32248,"WGS 72 / UTM zone 48N",9001,4322,16048,9807,8801,0.0,9102,8802,105.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32249,"WGS 72 / UTM zone 49N",9001,4322,16049,9807,8801,0.0,9102,8802,111.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32250,"WGS 72 / UTM zone 50N",9001,4322,16050,9807,8801,0.0,9102,8802,117.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32251,"WGS 72 / UTM zone 51N",9001,4322,16051,9807,8801,0.0,9102,8802,123.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32252,"WGS 72 / UTM zone 52N",9001,4322,16052,9807,8801,0.0,9102,8802,129.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32253,"WGS 72 / UTM zone 53N",9001,4322,16053,9807,8801,0.0,9102,8802,135.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32254,"WGS 72 / UTM zone 54N",9001,4322,16054,9807,8801,0.0,9102,8802,141.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32255,"WGS 72 / UTM zone 55N",9001,4322,16055,9807,8801,0.0,9102,8802,147.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32256,"WGS 72 / UTM zone 56N",9001,4322,16056,9807,8801,0.0,9102,8802,153.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32257,"WGS 72 / UTM zone 57N",9001,4322,16057,9807,8801,0.0,9102,8802,159.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32258,"WGS 72 / UTM zone 58N",9001,4322,16058,9807,8801,0.0,9102,8802,165.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32259,"WGS 72 / UTM zone 59N",9001,4322,16059,9807,8801,0.0,9102,8802,171.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32260,"WGS 72 / UTM zone 60N",9001,4322,16060,9807,8801,0.0,9102,8802,177.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32301,"WGS 72 / UTM zone 1S",9001,4322,16101,9807,8801,0.0,9102,8802,-177.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32302,"WGS 72 / UTM zone 2S",9001,4322,16102,9807,8801,0.0,9102,8802,-171.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32303,"WGS 72 / UTM zone 3S",9001,4322,16103,9807,8801,0.0,9102,8802,-165.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32304,"WGS 72 / UTM zone 4S",9001,4322,16104,9807,8801,0.0,9102,8802,-159.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32305,"WGS 72 / UTM zone 5S",9001,4322,16105,9807,8801,0.0,9102,8802,-153.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32306,"WGS 72 / UTM zone 6S",9001,4322,16106,9807,8801,0.0,9102,8802,-147.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32307,"WGS 72 / UTM zone 7S",9001,4322,16107,9807,8801,0.0,9102,8802,-141.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32308,"WGS 72 / UTM zone 8S",9001,4322,16108,9807,8801,0.0,9102,8802,-135.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32309,"WGS 72 / UTM zone 9S",9001,4322,16109,9807,8801,0.0,9102,8802,-129.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32310,"WGS 72 / UTM zone 10S",9001,4322,16110,9807,8801,0.0,9102,8802,-123.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32311,"WGS 72 / UTM zone 11S",9001,4322,16111,9807,8801,0.0,9102,8802,-117.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32312,"WGS 72 / UTM zone 12S",9001,4322,16112,9807,8801,0.0,9102,8802,-111.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32313,"WGS 72 / UTM zone 13S",9001,4322,16113,9807,8801,0.0,9102,8802,-105.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32314,"WGS 72 / UTM zone 14S",9001,4322,16114,9807,8801,0.0,9102,8802,-99.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32315,"WGS 72 / UTM zone 15S",9001,4322,16115,9807,8801,0.0,9102,8802,-93.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32316,"WGS 72 / UTM zone 16S",9001,4322,16116,9807,8801,0.0,9102,8802,-87.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32317,"WGS 72 / UTM zone 17S",9001,4322,16117,9807,8801,0.0,9102,8802,-81.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32318,"WGS 72 / UTM zone 18S",9001,4322,16118,9807,8801,0.0,9102,8802,-75.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32319,"WGS 72 / UTM zone 19S",9001,4322,16119,9807,8801,0.0,9102,8802,-69.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32320,"WGS 72 / UTM zone 20S",9001,4322,16120,9807,8801,0.0,9102,8802,-63.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32321,"WGS 72 / UTM zone 21S",9001,4322,16121,9807,8801,0.0,9102,8802,-57.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32322,"WGS 72 / UTM zone 22S",9001,4322,16122,9807,8801,0.0,9102,8802,-51.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32323,"WGS 72 / UTM zone 23S",9001,4322,16123,9807,8801,0.0,9102,8802,-45.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32324,"WGS 72 / UTM zone 24S",9001,4322,16124,9807,8801,0.0,9102,8802,-39.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32325,"WGS 72 / UTM zone 25S",9001,4322,16125,9807,8801,0.0,9102,8802,-33.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32326,"WGS 72 / UTM zone 26S",9001,4322,16126,9807,8801,0.0,9102,8802,-27.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32327,"WGS 72 / UTM zone 27S",9001,4322,16127,9807,8801,0.0,9102,8802,-21.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32328,"WGS 72 / UTM zone 28S",9001,4322,16128,9807,8801,0.0,9102,8802,-15.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32329,"WGS 72 / UTM zone 29S",9001,4322,16129,9807,8801,0.0,9102,8802,-9.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32330,"WGS 72 / UTM zone 30S",9001,4322,16130,9807,8801,0.0,9102,8802,-3.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32331,"WGS 72 / UTM zone 31S",9001,4322,16131,9807,8801,0.0,9102,8802,3.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32332,"WGS 72 / UTM zone 32S",9001,4322,16132,9807,8801,0.0,9102,8802,9.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32333,"WGS 72 / UTM zone 33S",9001,4322,16133,9807,8801,0.0,9102,8802,15.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32334,"WGS 72 / UTM zone 34S",9001,4322,16134,9807,8801,0.0,9102,8802,21.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32335,"WGS 72 / UTM zone 35S",9001,4322,16135,9807,8801,0.0,9102,8802,27.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32336,"WGS 72 / UTM zone 36S",9001,4322,16136,9807,8801,0.0,9102,8802,33.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32337,"WGS 72 / UTM zone 37S",9001,4322,16137,9807,8801,0.0,9102,8802,39.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32338,"WGS 72 / UTM zone 38S",9001,4322,16138,9807,8801,0.0,9102,8802,45.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32339,"WGS 72 / UTM zone 39S",9001,4322,16139,9807,8801,0.0,9102,8802,51.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32340,"WGS 72 / UTM zone 40S",9001,4322,16140,9807,8801,0.0,9102,8802,57.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32341,"WGS 72 / UTM zone 41S",9001,4322,16141,9807,8801,0.0,9102,8802,63.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32342,"WGS 72 / UTM zone 42S",9001,4322,16142,9807,8801,0.0,9102,8802,69.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32343,"WGS 72 / UTM zone 43S",9001,4322,16143,9807,8801,0.0,9102,8802,75.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32344,"WGS 72 / UTM zone 44S",9001,4322,16144,9807,8801,0.0,9102,8802,81.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32345,"WGS 72 / UTM zone 45S",9001,4322,16145,9807,8801,0.0,9102,8802,87.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32346,"WGS 72 / UTM zone 46S",9001,4322,16146,9807,8801,0.0,9102,8802,93.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32347,"WGS 72 / UTM zone 47S",9001,4322,16147,9807,8801,0.0,9102,8802,99.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32348,"WGS 72 / UTM zone 48S",9001,4322,16148,9807,8801,0.0,9102,8802,105.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32349,"WGS 72 / UTM zone 49S",9001,4322,16149,9807,8801,0.0,9102,8802,111.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32350,"WGS 72 / UTM zone 50S",9001,4322,16150,9807,8801,0.0,9102,8802,117.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32351,"WGS 72 / UTM zone 51S",9001,4322,16151,9807,8801,0.0,9102,8802,123.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32352,"WGS 72 / UTM zone 52S",9001,4322,16152,9807,8801,0.0,9102,8802,129.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32353,"WGS 72 / UTM zone 53S",9001,4322,16153,9807,8801,0.0,9102,8802,135.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32354,"WGS 72 / UTM zone 54S",9001,4322,16154,9807,8801,0.0,9102,8802,141.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32355,"WGS 72 / UTM zone 55S",9001,4322,16155,9807,8801,0.0,9102,8802,147.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32356,"WGS 72 / UTM zone 56S",9001,4322,16156,9807,8801,0.0,9102,8802,153.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32357,"WGS 72 / UTM zone 57S",9001,4322,16157,9807,8801,0.0,9102,8802,159.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32358,"WGS 72 / UTM zone 58S",9001,4322,16158,9807,8801,0.0,9102,8802,165.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32359,"WGS 72 / UTM zone 59S",9001,4322,16159,9807,8801,0.0,9102,8802,171.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32360,"WGS 72 / UTM zone 60S",9001,4322,16160,9807,8801,0.0,9102,8802,177.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32401,"WGS 72BE / UTM zone 1N",9001,4324,16001,9807,8801,0.0,9102,8802,-177.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32402,"WGS 72BE / UTM zone 2N",9001,4324,16002,9807,8801,0.0,9102,8802,-171.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32403,"WGS 72BE / UTM zone 3N",9001,4324,16003,9807,8801,0.0,9102,8802,-165.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32404,"WGS 72BE / UTM zone 4N",9001,4324,16004,9807,8801,0.0,9102,8802,-159.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32405,"WGS 72BE / UTM zone 5N",9001,4324,16005,9807,8801,0.0,9102,8802,-153.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32406,"WGS 72BE / UTM zone 6N",9001,4324,16006,9807,8801,0.0,9102,8802,-147.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32407,"WGS 72BE / UTM zone 7N",9001,4324,16007,9807,8801,0.0,9102,8802,-141.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32408,"WGS 72BE / UTM zone 8N",9001,4324,16008,9807,8801,0.0,9102,8802,-135.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32409,"WGS 72BE / UTM zone 9N",9001,4324,16009,9807,8801,0.0,9102,8802,-129.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32410,"WGS 72BE / UTM zone 10N",9001,4324,16010,9807,8801,0.0,9102,8802,-123.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32411,"WGS 72BE / UTM zone 11N",9001,4324,16011,9807,8801,0.0,9102,8802,-117.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32412,"WGS 72BE / UTM zone 12N",9001,4324,16012,9807,8801,0.0,9102,8802,-111.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32413,"WGS 72BE / UTM zone 13N",9001,4324,16013,9807,8801,0.0,9102,8802,-105.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32414,"WGS 72BE / UTM zone 14N",9001,4324,16014,9807,8801,0.0,9102,8802,-99.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32415,"WGS 72BE / UTM zone 15N",9001,4324,16015,9807,8801,0.0,9102,8802,-93.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32416,"WGS 72BE / UTM zone 16N",9001,4324,16016,9807,8801,0.0,9102,8802,-87.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32417,"WGS 72BE / UTM zone 17N",9001,4324,16017,9807,8801,0.0,9102,8802,-81.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32418,"WGS 72BE / UTM zone 18N",9001,4324,16018,9807,8801,0.0,9102,8802,-75.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32419,"WGS 72BE / UTM zone 19N",9001,4324,16019,9807,8801,0.0,9102,8802,-69.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32420,"WGS 72BE / UTM zone 20N",9001,4324,16020,9807,8801,0.0,9102,8802,-63.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32421,"WGS 72BE / UTM zone 21N",9001,4324,16021,9807,8801,0.0,9102,8802,-57.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32422,"WGS 72BE / UTM zone 22N",9001,4324,16022,9807,8801,0.0,9102,8802,-51.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32423,"WGS 72BE / UTM zone 23N",9001,4324,16023,9807,8801,0.0,9102,8802,-45.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32424,"WGS 72BE / UTM zone 24N",9001,4324,16024,9807,8801,0.0,9102,8802,-39.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32425,"WGS 72BE / UTM zone 25N",9001,4324,16025,9807,8801,0.0,9102,8802,-33.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32426,"WGS 72BE / UTM zone 26N",9001,4324,16026,9807,8801,0.0,9102,8802,-27.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32427,"WGS 72BE / UTM zone 27N",9001,4324,16027,9807,8801,0.0,9102,8802,-21.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32428,"WGS 72BE / UTM zone 28N",9001,4324,16028,9807,8801,0.0,9102,8802,-15.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32429,"WGS 72BE / UTM zone 29N",9001,4324,16029,9807,8801,0.0,9102,8802,-9.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32430,"WGS 72BE / UTM zone 30N",9001,4324,16030,9807,8801,0.0,9102,8802,-3.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32431,"WGS 72BE / UTM zone 31N",9001,4324,16031,9807,8801,0.0,9102,8802,3.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32432,"WGS 72BE / UTM zone 32N",9001,4324,16032,9807,8801,0.0,9102,8802,9.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32433,"WGS 72BE / UTM zone 33N",9001,4324,16033,9807,8801,0.0,9102,8802,15.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32434,"WGS 72BE / UTM zone 34N",9001,4324,16034,9807,8801,0.0,9102,8802,21.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32435,"WGS 72BE / UTM zone 35N",9001,4324,16035,9807,8801,0.0,9102,8802,27.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32436,"WGS 72BE / UTM zone 36N",9001,4324,16036,9807,8801,0.0,9102,8802,33.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32437,"WGS 72BE / UTM zone 37N",9001,4324,16037,9807,8801,0.0,9102,8802,39.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32438,"WGS 72BE / UTM zone 38N",9001,4324,16038,9807,8801,0.0,9102,8802,45.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32439,"WGS 72BE / UTM zone 39N",9001,4324,16039,9807,8801,0.0,9102,8802,51.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32440,"WGS 72BE / UTM zone 40N",9001,4324,16040,9807,8801,0.0,9102,8802,57.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32441,"WGS 72BE / UTM zone 41N",9001,4324,16041,9807,8801,0.0,9102,8802,63.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32442,"WGS 72BE / UTM zone 42N",9001,4324,16042,9807,8801,0.0,9102,8802,69.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32443,"WGS 72BE / UTM zone 43N",9001,4324,16043,9807,8801,0.0,9102,8802,75.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32444,"WGS 72BE / UTM zone 44N",9001,4324,16044,9807,8801,0.0,9102,8802,81.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32445,"WGS 72BE / UTM zone 45N",9001,4324,16045,9807,8801,0.0,9102,8802,87.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32446,"WGS 72BE / UTM zone 46N",9001,4324,16046,9807,8801,0.0,9102,8802,93.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32447,"WGS 72BE / UTM zone 47N",9001,4324,16047,9807,8801,0.0,9102,8802,99.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32448,"WGS 72BE / UTM zone 48N",9001,4324,16048,9807,8801,0.0,9102,8802,105.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32449,"WGS 72BE / UTM zone 49N",9001,4324,16049,9807,8801,0.0,9102,8802,111.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32450,"WGS 72BE / UTM zone 50N",9001,4324,16050,9807,8801,0.0,9102,8802,117.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32451,"WGS 72BE / UTM zone 51N",9001,4324,16051,9807,8801,0.0,9102,8802,123.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32452,"WGS 72BE / UTM zone 52N",9001,4324,16052,9807,8801,0.0,9102,8802,129.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32453,"WGS 72BE / UTM zone 53N",9001,4324,16053,9807,8801,0.0,9102,8802,135.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32454,"WGS 72BE / UTM zone 54N",9001,4324,16054,9807,8801,0.0,9102,8802,141.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32455,"WGS 72BE / UTM zone 55N",9001,4324,16055,9807,8801,0.0,9102,8802,147.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32456,"WGS 72BE / UTM zone 56N",9001,4324,16056,9807,8801,0.0,9102,8802,153.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32457,"WGS 72BE / UTM zone 57N",9001,4324,16057,9807,8801,0.0,9102,8802,159.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32458,"WGS 72BE / UTM zone 58N",9001,4324,16058,9807,8801,0.0,9102,8802,165.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32459,"WGS 72BE / UTM zone 59N",9001,4324,16059,9807,8801,0.0,9102,8802,171.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32460,"WGS 72BE / UTM zone 60N",9001,4324,16060,9807,8801,0.0,9102,8802,177.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32501,"WGS 72BE / UTM zone 1S",9001,4324,16101,9807,8801,0.0,9102,8802,-177.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32502,"WGS 72BE / UTM zone 2S",9001,4324,16102,9807,8801,0.0,9102,8802,-171.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32503,"WGS 72BE / UTM zone 3S",9001,4324,16103,9807,8801,0.0,9102,8802,-165.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32504,"WGS 72BE / UTM zone 4S",9001,4324,16104,9807,8801,0.0,9102,8802,-159.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32505,"WGS 72BE / UTM zone 5S",9001,4324,16105,9807,8801,0.0,9102,8802,-153.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32506,"WGS 72BE / UTM zone 6S",9001,4324,16106,9807,8801,0.0,9102,8802,-147.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32507,"WGS 72BE / UTM zone 7S",9001,4324,16107,9807,8801,0.0,9102,8802,-141.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32508,"WGS 72BE / UTM zone 8S",9001,4324,16108,9807,8801,0.0,9102,8802,-135.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32509,"WGS 72BE / UTM zone 9S",9001,4324,16109,9807,8801,0.0,9102,8802,-129.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32510,"WGS 72BE / UTM zone 10S",9001,4324,16110,9807,8801,0.0,9102,8802,-123.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32511,"WGS 72BE / UTM zone 11S",9001,4324,16111,9807,8801,0.0,9102,8802,-117.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32512,"WGS 72BE / UTM zone 12S",9001,4324,16112,9807,8801,0.0,9102,8802,-111.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32513,"WGS 72BE / UTM zone 13S",9001,4324,16113,9807,8801,0.0,9102,8802,-105.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32514,"WGS 72BE / UTM zone 14S",9001,4324,16114,9807,8801,0.0,9102,8802,-99.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32515,"WGS 72BE / UTM zone 15S",9001,4324,16115,9807,8801,0.0,9102,8802,-93.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32516,"WGS 72BE / UTM zone 16S",9001,4324,16116,9807,8801,0.0,9102,8802,-87.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32517,"WGS 72BE / UTM zone 17S",9001,4324,16117,9807,8801,0.0,9102,8802,-81.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32518,"WGS 72BE / UTM zone 18S",9001,4324,16118,9807,8801,0.0,9102,8802,-75.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32519,"WGS 72BE / UTM zone 19S",9001,4324,16119,9807,8801,0.0,9102,8802,-69.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32520,"WGS 72BE / UTM zone 20S",9001,4324,16120,9807,8801,0.0,9102,8802,-63.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32521,"WGS 72BE / UTM zone 21S",9001,4324,16121,9807,8801,0.0,9102,8802,-57.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32522,"WGS 72BE / UTM zone 22S",9001,4324,16122,9807,8801,0.0,9102,8802,-51.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32523,"WGS 72BE / UTM zone 23S",9001,4324,16123,9807,8801,0.0,9102,8802,-45.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32524,"WGS 72BE / UTM zone 24S",9001,4324,16124,9807,8801,0.0,9102,8802,-39.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32525,"WGS 72BE / UTM zone 25S",9001,4324,16125,9807,8801,0.0,9102,8802,-33.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32526,"WGS 72BE / UTM zone 26S",9001,4324,16126,9807,8801,0.0,9102,8802,-27.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32527,"WGS 72BE / UTM zone 27S",9001,4324,16127,9807,8801,0.0,9102,8802,-21.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32528,"WGS 72BE / UTM zone 28S",9001,4324,16128,9807,8801,0.0,9102,8802,-15.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32529,"WGS 72BE / UTM zone 29S",9001,4324,16129,9807,8801,0.0,9102,8802,-9.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32530,"WGS 72BE / UTM zone 30S",9001,4324,16130,9807,8801,0.0,9102,8802,-3.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32531,"WGS 72BE / UTM zone 31S",9001,4324,16131,9807,8801,0.0,9102,8802,3.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32532,"WGS 72BE / UTM zone 32S",9001,4324,16132,9807,8801,0.0,9102,8802,9.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32533,"WGS 72BE / UTM zone 33S",9001,4324,16133,9807,8801,0.0,9102,8802,15.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32534,"WGS 72BE / UTM zone 34S",9001,4324,16134,9807,8801,0.0,9102,8802,21.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32535,"WGS 72BE / UTM zone 35S",9001,4324,16135,9807,8801,0.0,9102,8802,27.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32536,"WGS 72BE / UTM zone 36S",9001,4324,16136,9807,8801,0.0,9102,8802,33.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32537,"WGS 72BE / UTM zone 37S",9001,4324,16137,9807,8801,0.0,9102,8802,39.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32538,"WGS 72BE / UTM zone 38S",9001,4324,16138,9807,8801,0.0,9102,8802,45.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32539,"WGS 72BE / UTM zone 39S",9001,4324,16139,9807,8801,0.0,9102,8802,51.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32540,"WGS 72BE / UTM zone 40S",9001,4324,16140,9807,8801,0.0,9102,8802,57.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32541,"WGS 72BE / UTM zone 41S",9001,4324,16141,9807,8801,0.0,9102,8802,63.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32542,"WGS 72BE / UTM zone 42S",9001,4324,16142,9807,8801,0.0,9102,8802,69.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32543,"WGS 72BE / UTM zone 43S",9001,4324,16143,9807,8801,0.0,9102,8802,75.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32544,"WGS 72BE / UTM zone 44S",9001,4324,16144,9807,8801,0.0,9102,8802,81.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32545,"WGS 72BE / UTM zone 45S",9001,4324,16145,9807,8801,0.0,9102,8802,87.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32546,"WGS 72BE / UTM zone 46S",9001,4324,16146,9807,8801,0.0,9102,8802,93.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32547,"WGS 72BE / UTM zone 47S",9001,4324,16147,9807,8801,0.0,9102,8802,99.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32548,"WGS 72BE / UTM zone 48S",9001,4324,16148,9807,8801,0.0,9102,8802,105.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32549,"WGS 72BE / UTM zone 49S",9001,4324,16149,9807,8801,0.0,9102,8802,111.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32550,"WGS 72BE / UTM zone 50S",9001,4324,16150,9807,8801,0.0,9102,8802,117.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32551,"WGS 72BE / UTM zone 51S",9001,4324,16151,9807,8801,0.0,9102,8802,123.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32552,"WGS 72BE / UTM zone 52S",9001,4324,16152,9807,8801,0.0,9102,8802,129.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32553,"WGS 72BE / UTM zone 53S",9001,4324,16153,9807,8801,0.0,9102,8802,135.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32554,"WGS 72BE / UTM zone 54S",9001,4324,16154,9807,8801,0.0,9102,8802,141.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32555,"WGS 72BE / UTM zone 55S",9001,4324,16155,9807,8801,0.0,9102,8802,147.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32556,"WGS 72BE / UTM zone 56S",9001,4324,16156,9807,8801,0.0,9102,8802,153.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32557,"WGS 72BE / UTM zone 57S",9001,4324,16157,9807,8801,0.0,9102,8802,159.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32558,"WGS 72BE / UTM zone 58S",9001,4324,16158,9807,8801,0.0,9102,8802,165.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32559,"WGS 72BE / UTM zone 59S",9001,4324,16159,9807,8801,0.0,9102,8802,171.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32560,"WGS 72BE / UTM zone 60S",9001,4324,16160,9807,8801,0.0,9102,8802,177.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32600,"WGS 84 / UTM grid system (northern hemisphere)",9001,4326,16000,9824,8801,0.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,8830,-180.0,9102,8831,6.0,9102,,,
-32601,"WGS 84 / UTM zone 1N",9001,4326,16001,9807,8801,0.0,9102,8802,-177.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32602,"WGS 84 / UTM zone 2N",9001,4326,16002,9807,8801,0.0,9102,8802,-171.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32603,"WGS 84 / UTM zone 3N",9001,4326,16003,9807,8801,0.0,9102,8802,-165.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32604,"WGS 84 / UTM zone 4N",9001,4326,16004,9807,8801,0.0,9102,8802,-159.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32605,"WGS 84 / UTM zone 5N",9001,4326,16005,9807,8801,0.0,9102,8802,-153.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32606,"WGS 84 / UTM zone 6N",9001,4326,16006,9807,8801,0.0,9102,8802,-147.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32607,"WGS 84 / UTM zone 7N",9001,4326,16007,9807,8801,0.0,9102,8802,-141.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32608,"WGS 84 / UTM zone 8N",9001,4326,16008,9807,8801,0.0,9102,8802,-135.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32609,"WGS 84 / UTM zone 9N",9001,4326,16009,9807,8801,0.0,9102,8802,-129.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32610,"WGS 84 / UTM zone 10N",9001,4326,16010,9807,8801,0.0,9102,8802,-123.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32611,"WGS 84 / UTM zone 11N",9001,4326,16011,9807,8801,0.0,9102,8802,-117.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32612,"WGS 84 / UTM zone 12N",9001,4326,16012,9807,8801,0.0,9102,8802,-111.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32613,"WGS 84 / UTM zone 13N",9001,4326,16013,9807,8801,0.0,9102,8802,-105.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32614,"WGS 84 / UTM zone 14N",9001,4326,16014,9807,8801,0.0,9102,8802,-99.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32615,"WGS 84 / UTM zone 15N",9001,4326,16015,9807,8801,0.0,9102,8802,-93.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32616,"WGS 84 / UTM zone 16N",9001,4326,16016,9807,8801,0.0,9102,8802,-87.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32617,"WGS 84 / UTM zone 17N",9001,4326,16017,9807,8801,0.0,9102,8802,-81.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32618,"WGS 84 / UTM zone 18N",9001,4326,16018,9807,8801,0.0,9102,8802,-75.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32619,"WGS 84 / UTM zone 19N",9001,4326,16019,9807,8801,0.0,9102,8802,-69.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32620,"WGS 84 / UTM zone 20N",9001,4326,16020,9807,8801,0.0,9102,8802,-63.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32621,"WGS 84 / UTM zone 21N",9001,4326,16021,9807,8801,0.0,9102,8802,-57.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32622,"WGS 84 / UTM zone 22N",9001,4326,16022,9807,8801,0.0,9102,8802,-51.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32623,"WGS 84 / UTM zone 23N",9001,4326,16023,9807,8801,0.0,9102,8802,-45.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32624,"WGS 84 / UTM zone 24N",9001,4326,16024,9807,8801,0.0,9102,8802,-39.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32625,"WGS 84 / UTM zone 25N",9001,4326,16025,9807,8801,0.0,9102,8802,-33.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32626,"WGS 84 / UTM zone 26N",9001,4326,16026,9807,8801,0.0,9102,8802,-27.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32627,"WGS 84 / UTM zone 27N",9001,4326,16027,9807,8801,0.0,9102,8802,-21.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32628,"WGS 84 / UTM zone 28N",9001,4326,16028,9807,8801,0.0,9102,8802,-15.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32629,"WGS 84 / UTM zone 29N",9001,4326,16029,9807,8801,0.0,9102,8802,-9.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32630,"WGS 84 / UTM zone 30N",9001,4326,16030,9807,8801,0.0,9102,8802,-3.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32631,"WGS 84 / UTM zone 31N",9001,4326,16031,9807,8801,0.0,9102,8802,3.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32632,"WGS 84 / UTM zone 32N",9001,4326,16032,9807,8801,0.0,9102,8802,9.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32633,"WGS 84 / UTM zone 33N",9001,4326,16033,9807,8801,0.0,9102,8802,15.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32634,"WGS 84 / UTM zone 34N",9001,4326,16034,9807,8801,0.0,9102,8802,21.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32635,"WGS 84 / UTM zone 35N",9001,4326,16035,9807,8801,0.0,9102,8802,27.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32636,"WGS 84 / UTM zone 36N",9001,4326,16036,9807,8801,0.0,9102,8802,33.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32637,"WGS 84 / UTM zone 37N",9001,4326,16037,9807,8801,0.0,9102,8802,39.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32638,"WGS 84 / UTM zone 38N",9001,4326,16038,9807,8801,0.0,9102,8802,45.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32639,"WGS 84 / UTM zone 39N",9001,4326,16039,9807,8801,0.0,9102,8802,51.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32640,"WGS 84 / UTM zone 40N",9001,4326,16040,9807,8801,0.0,9102,8802,57.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32641,"WGS 84 / UTM zone 41N",9001,4326,16041,9807,8801,0.0,9102,8802,63.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32642,"WGS 84 / UTM zone 42N",9001,4326,16042,9807,8801,0.0,9102,8802,69.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32643,"WGS 84 / UTM zone 43N",9001,4326,16043,9807,8801,0.0,9102,8802,75.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32644,"WGS 84 / UTM zone 44N",9001,4326,16044,9807,8801,0.0,9102,8802,81.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32645,"WGS 84 / UTM zone 45N",9001,4326,16045,9807,8801,0.0,9102,8802,87.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32646,"WGS 84 / UTM zone 46N",9001,4326,16046,9807,8801,0.0,9102,8802,93.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32647,"WGS 84 / UTM zone 47N",9001,4326,16047,9807,8801,0.0,9102,8802,99.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32648,"WGS 84 / UTM zone 48N",9001,4326,16048,9807,8801,0.0,9102,8802,105.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32649,"WGS 84 / UTM zone 49N",9001,4326,16049,9807,8801,0.0,9102,8802,111.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32650,"WGS 84 / UTM zone 50N",9001,4326,16050,9807,8801,0.0,9102,8802,117.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32651,"WGS 84 / UTM zone 51N",9001,4326,16051,9807,8801,0.0,9102,8802,123.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32652,"WGS 84 / UTM zone 52N",9001,4326,16052,9807,8801,0.0,9102,8802,129.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32653,"WGS 84 / UTM zone 53N",9001,4326,16053,9807,8801,0.0,9102,8802,135.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32654,"WGS 84 / UTM zone 54N",9001,4326,16054,9807,8801,0.0,9102,8802,141.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32655,"WGS 84 / UTM zone 55N",9001,4326,16055,9807,8801,0.0,9102,8802,147.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32656,"WGS 84 / UTM zone 56N",9001,4326,16056,9807,8801,0.0,9102,8802,153.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32657,"WGS 84 / UTM zone 57N",9001,4326,16057,9807,8801,0.0,9102,8802,159.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32658,"WGS 84 / UTM zone 58N",9001,4326,16058,9807,8801,0.0,9102,8802,165.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32659,"WGS 84 / UTM zone 59N",9001,4326,16059,9807,8801,0.0,9102,8802,171.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32660,"WGS 84 / UTM zone 60N",9001,4326,16060,9807,8801,0.0,9102,8802,177.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-32661,"WGS 84 / UPS North",9001,4326,16061,9810,8801,90.0,9102,8802,0.0,9102,8805,0.994,9201,8806,2000000.0,9001,8807,2000000.0,9001,,,,,,
-32662,"WGS 84 / Plate Carree",9001,4326,19968,9823,8801,0.0,9102,8802,0.0,9102,,,,,,,,,,,,,,,
-32700,"WGS 84 / UTM grid system (southern hemisphere)",9001,4326,16100,9824,8801,0.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,8830,-180.0,9102,8831,6.0,9102,,,
-32701,"WGS 84 / UTM zone 1S",9001,4326,16101,9807,8801,0.0,9102,8802,-177.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32702,"WGS 84 / UTM zone 2S",9001,4326,16102,9807,8801,0.0,9102,8802,-171.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32703,"WGS 84 / UTM zone 3S",9001,4326,16103,9807,8801,0.0,9102,8802,-165.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32704,"WGS 84 / UTM zone 4S",9001,4326,16104,9807,8801,0.0,9102,8802,-159.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32705,"WGS 84 / UTM zone 5S",9001,4326,16105,9807,8801,0.0,9102,8802,-153.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32706,"WGS 84 / UTM zone 6S",9001,4326,16106,9807,8801,0.0,9102,8802,-147.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32707,"WGS 84 / UTM zone 7S",9001,4326,16107,9807,8801,0.0,9102,8802,-141.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32708,"WGS 84 / UTM zone 8S",9001,4326,16108,9807,8801,0.0,9102,8802,-135.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32709,"WGS 84 / UTM zone 9S",9001,4326,16109,9807,8801,0.0,9102,8802,-129.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32710,"WGS 84 / UTM zone 10S",9001,4326,16110,9807,8801,0.0,9102,8802,-123.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32711,"WGS 84 / UTM zone 11S",9001,4326,16111,9807,8801,0.0,9102,8802,-117.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32712,"WGS 84 / UTM zone 12S",9001,4326,16112,9807,8801,0.0,9102,8802,-111.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32713,"WGS 84 / UTM zone 13S",9001,4326,16113,9807,8801,0.0,9102,8802,-105.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32714,"WGS 84 / UTM zone 14S",9001,4326,16114,9807,8801,0.0,9102,8802,-99.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32715,"WGS 84 / UTM zone 15S",9001,4326,16115,9807,8801,0.0,9102,8802,-93.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32716,"WGS 84 / UTM zone 16S",9001,4326,16116,9807,8801,0.0,9102,8802,-87.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32717,"WGS 84 / UTM zone 17S",9001,4326,16117,9807,8801,0.0,9102,8802,-81.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32718,"WGS 84 / UTM zone 18S",9001,4326,16118,9807,8801,0.0,9102,8802,-75.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32719,"WGS 84 / UTM zone 19S",9001,4326,16119,9807,8801,0.0,9102,8802,-69.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32720,"WGS 84 / UTM zone 20S",9001,4326,16120,9807,8801,0.0,9102,8802,-63.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32721,"WGS 84 / UTM zone 21S",9001,4326,16121,9807,8801,0.0,9102,8802,-57.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32722,"WGS 84 / UTM zone 22S",9001,4326,16122,9807,8801,0.0,9102,8802,-51.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32723,"WGS 84 / UTM zone 23S",9001,4326,16123,9807,8801,0.0,9102,8802,-45.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32724,"WGS 84 / UTM zone 24S",9001,4326,16124,9807,8801,0.0,9102,8802,-39.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32725,"WGS 84 / UTM zone 25S",9001,4326,16125,9807,8801,0.0,9102,8802,-33.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32726,"WGS 84 / UTM zone 26S",9001,4326,16126,9807,8801,0.0,9102,8802,-27.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32727,"WGS 84 / UTM zone 27S",9001,4326,16127,9807,8801,0.0,9102,8802,-21.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32728,"WGS 84 / UTM zone 28S",9001,4326,16128,9807,8801,0.0,9102,8802,-15.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32729,"WGS 84 / UTM zone 29S",9001,4326,16129,9807,8801,0.0,9102,8802,-9.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32730,"WGS 84 / UTM zone 30S",9001,4326,16130,9807,8801,0.0,9102,8802,-3.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32731,"WGS 84 / UTM zone 31S",9001,4326,16131,9807,8801,0.0,9102,8802,3.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32732,"WGS 84 / UTM zone 32S",9001,4326,16132,9807,8801,0.0,9102,8802,9.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32733,"WGS 84 / UTM zone 33S",9001,4326,16133,9807,8801,0.0,9102,8802,15.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32734,"WGS 84 / UTM zone 34S",9001,4326,16134,9807,8801,0.0,9102,8802,21.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32735,"WGS 84 / UTM zone 35S",9001,4326,16135,9807,8801,0.0,9102,8802,27.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32736,"WGS 84 / UTM zone 36S",9001,4326,16136,9807,8801,0.0,9102,8802,33.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32737,"WGS 84 / UTM zone 37S",9001,4326,16137,9807,8801,0.0,9102,8802,39.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32738,"WGS 84 / UTM zone 38S",9001,4326,16138,9807,8801,0.0,9102,8802,45.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32739,"WGS 84 / UTM zone 39S",9001,4326,16139,9807,8801,0.0,9102,8802,51.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32740,"WGS 84 / UTM zone 40S",9001,4326,16140,9807,8801,0.0,9102,8802,57.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32741,"WGS 84 / UTM zone 41S",9001,4326,16141,9807,8801,0.0,9102,8802,63.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32742,"WGS 84 / UTM zone 42S",9001,4326,16142,9807,8801,0.0,9102,8802,69.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32743,"WGS 84 / UTM zone 43S",9001,4326,16143,9807,8801,0.0,9102,8802,75.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32744,"WGS 84 / UTM zone 44S",9001,4326,16144,9807,8801,0.0,9102,8802,81.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32745,"WGS 84 / UTM zone 45S",9001,4326,16145,9807,8801,0.0,9102,8802,87.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32746,"WGS 84 / UTM zone 46S",9001,4326,16146,9807,8801,0.0,9102,8802,93.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32747,"WGS 84 / UTM zone 47S",9001,4326,16147,9807,8801,0.0,9102,8802,99.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32748,"WGS 84 / UTM zone 48S",9001,4326,16148,9807,8801,0.0,9102,8802,105.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32749,"WGS 84 / UTM zone 49S",9001,4326,16149,9807,8801,0.0,9102,8802,111.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32750,"WGS 84 / UTM zone 50S",9001,4326,16150,9807,8801,0.0,9102,8802,117.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32751,"WGS 84 / UTM zone 51S",9001,4326,16151,9807,8801,0.0,9102,8802,123.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32752,"WGS 84 / UTM zone 52S",9001,4326,16152,9807,8801,0.0,9102,8802,129.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32753,"WGS 84 / UTM zone 53S",9001,4326,16153,9807,8801,0.0,9102,8802,135.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32754,"WGS 84 / UTM zone 54S",9001,4326,16154,9807,8801,0.0,9102,8802,141.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32755,"WGS 84 / UTM zone 55S",9001,4326,16155,9807,8801,0.0,9102,8802,147.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32756,"WGS 84 / UTM zone 56S",9001,4326,16156,9807,8801,0.0,9102,8802,153.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32757,"WGS 84 / UTM zone 57S",9001,4326,16157,9807,8801,0.0,9102,8802,159.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32758,"WGS 84 / UTM zone 58S",9001,4326,16158,9807,8801,0.0,9102,8802,165.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32759,"WGS 84 / UTM zone 59S",9001,4326,16159,9807,8801,0.0,9102,8802,171.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32760,"WGS 84 / UTM zone 60S",9001,4326,16160,9807,8801,0.0,9102,8802,177.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-32761,"WGS 84 / UPS South",9001,4326,16161,9810,8801,-90.0,9102,8802,0.0,9102,8805,0.994,9201,8806,2000000.0,9001,8807,2000000.0,9001,,,,,,
-32766,"WGS 84 / TM 36 SE",9001,4326,16636,9807,8801,0.0,9102,8802,36.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
diff --git a/src/tiff/csv/prime_meridian.csv b/src/tiff/csv/prime_meridian.csv
deleted file mode 100644
index 3991922..0000000
--- a/src/tiff/csv/prime_meridian.csv
+++ /dev/null
@@ -1,14 +0,0 @@
-"PRIME_MERIDIAN_CODE","PRIME_MERIDIAN_NAME","GREENWICH_LONGITUDE","UOM_CODE","REMARKS","INFORMATION_SOURCE","DATA_SOURCE","REVISION_DATE","CHANGE_ID","DEPRECATED"
-8901,Greenwich,0.0,9110,,,EPSG,1995-06-02 00:00:00,96.29,0
-8902,Lisbon,-9.0754862,9110,,Instituto Geografico e Cadastral; Lisbon,EPSG,1995-06-02 00:00:00,96.29,0
-8903,Paris,2.5969213,9105,Value adopted by IGN (Paris) in 1936. Equivalent to 2 deg 20min 14.025sec. Preferred by EPSG to earlier value of 2deg 20min 13.95sec (2.596898 grads) used by RGS London.,Institut Geographique National (IGN); Paris,EPSG,1995-06-02 00:00:00,,0
-8904,Bogota,-74.04513,9110,,"Instituto Geografico ""Augustin Cadazzi"" (IGAC); Bogota",EPSG,1995-06-02 00:00:00,96.29,0
-8905,Madrid,-3.411658,9110,,,EPSG,1995-06-02 00:00:00,96.29,0
-8906,Rome,12.27084,9110,,,EPSG,1995-06-02 00:00:00,96.29,0
-8907,Bern,7.26225,9110,1895 value.  Newer value of 7 deg 26 min 22.335 sec E determined in 1938.,Bundesamt f�r Landestopographie,EPSG,1995-06-02 00:00:00,96.29,0
-8908,Jakarta,106.482779,9110,,,EPSG,1995-06-02 00:00:00,96.29,0
-8909,Ferro,-17.4,9110,Used in Austria and former Czechoslovakia.,,EPSG,1995-06-02 00:00:00,96.29,0
-8910,Brussels,4.220471,9110,,,EPSG,1995-06-02 00:00:00,96.29,0
-8911,Stockholm,18.03298,9110,,,EPSG,1995-06-02 00:00:00,96.29,0
-8912,Athens,23.4258815,9110,Used in Greece for older mapping based on Hatt projection.,Topography Department; National Technical University of Athens.,EPSG,1997-06-16 00:00:00,,0
-8913,Oslo,10.43225,9110,Formerly known as Kristiania or Christiania.,Statens Kartverk - Geodesidivisjonen,EPSG,1999-10-20 00:00:00,,0
diff --git a/src/tiff/csv/projop_wparm.csv b/src/tiff/csv/projop_wparm.csv
deleted file mode 100644
index 092d7b6..0000000
--- a/src/tiff/csv/projop_wparm.csv
+++ /dev/null
@@ -1,1083 +0,0 @@
-"COORD_OP_CODE","COORD_OP_NAME","COORD_OP_METHOD_CODE","PARAMETER_CODE_1","PARAMETER_VALUE_1","PARAMETER_UOM_1","PARAMETER_CODE_2","PARAMETER_VALUE_2","PARAMETER_UOM_2","PARAMETER_CODE_3","PARAMETER_VALUE_3","PARAMETER_UOM_3","PARAMETER_CODE_4","PARAMETER_VALUE_4","PARAMETER_UOM_4","PARAMETER_CODE_5","PARAMETER_VALUE_5","PARAMETER_UOM_5","PARAMETER_CODE_6","PARAMETER_VALUE_6","PARAMETER_UOM_6","PARAMETER_CODE_7","PARAMETER_VALUE_7","PARAMETER_UOM_7"
-10101,Alabama CS27 East zone,9807,8801,30.3,9110,8802,-85.5,9110,8805,0.99996,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-10102,Alabama CS27 West zone,9807,8801,30.0,9110,8802,-87.3,9110,8805,0.999933333,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-10131,"SPCS83 Alabama East zone (meters)",9807,8801,30.3,9110,8802,-85.5,9110,8805,0.99996,9201,8806,200000.0,9001,8807,0.0,9001,,,,,,
-10132,"SPCS83 Alabama West zone (meters)",9807,8801,30.0,9110,8802,-87.3,9110,8805,0.999933333,9201,8806,600000.0,9001,8807,0.0,9001,,,,,,
-10201,Arizona Coordinate System East zone,9807,8801,31.0,9110,8802,-110.1,9110,8805,0.9999,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-10202,Arizona Coordinate System Central zone,9807,8801,31.0,9110,8802,-111.55,9110,8805,0.9999,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-10203,Arizona Coordinate System West zone,9807,8801,31.0,9110,8802,-113.45,9110,8805,0.999933333,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-10231,"SPCS83 Arizona East zone (meters)",9807,8801,31.0,9110,8802,-110.1,9110,8805,0.9999,9201,8806,213360.0,9001,8807,0.0,9001,,,,,,
-10232,"SPCS83 Arizona Central zone (meters)",9807,8801,31.0,9110,8802,-111.55,9110,8805,0.9999,9201,8806,213360.0,9001,8807,0.0,9001,,,,,,
-10233,"SPCS83 Arizona West zone (meters)",9807,8801,31.0,9110,8802,-113.45,9110,8805,0.999933333,9201,8806,213360.0,9001,8807,0.0,9001,,,,,,
-10301,Arkansas CS27 North,9802,8821,34.2,9110,8822,-92.0,9110,8823,36.14,9110,8824,34.56,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-10302,Arkansas CS27 South,9802,8821,32.4,9110,8822,-92.0,9110,8823,34.46,9110,8824,33.18,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-10331,"SPCS83 Arkansas North zone (meters)",9802,8821,34.2,9110,8822,-92.0,9110,8823,36.14,9110,8824,34.56,9110,8826,400000.0,9001,8827,0.0,9001,,,
-10332,"SPCS83 Arkansas South zone (meters)",9802,8821,32.4,9110,8822,-92.0,9110,8823,34.46,9110,8824,33.18,9110,8826,400000.0,9001,8827,400000.0,9001,,,
-10401,California CS27 zone I,9802,8821,39.2,9110,8822,-122.0,9110,8823,41.4,9110,8824,40.0,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-10402,California CS27 zone II,9802,8821,37.4,9110,8822,-122.0,9110,8823,39.5,9110,8824,38.2,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-10403,California CS27 zone III,9802,8821,36.3,9110,8822,-120.3,9110,8823,38.26,9110,8824,37.04,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-10404,California CS27 zone IV,9802,8821,35.2,9110,8822,-119.0,9110,8823,37.15,9110,8824,36.0,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-10405,California CS27 zone V,9802,8821,33.3,9110,8822,-118.0,9110,8823,35.28,9110,8824,34.02,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-10406,California CS27 zone VI,9802,8821,32.1,9110,8822,-116.15,9110,8823,33.53,9110,8824,32.47,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-10407,California CS27 zone VII,9802,8821,34.08,9110,8822,-118.2,9110,8823,34.25,9110,8824,33.52,9110,8826,4186692.58,9003,8827,416926.74,9003,,,
-10431,"SPCS83 California zone 1 (meters)",9802,8821,39.2,9110,8822,-122.0,9110,8823,41.4,9110,8824,40.0,9110,8826,2000000.0,9001,8827,500000.0,9001,,,
-10432,"SPCS83 California zone 2 (meters)",9802,8821,37.4,9110,8822,-122.0,9110,8823,39.5,9110,8824,38.2,9110,8826,2000000.0,9001,8827,500000.0,9001,,,
-10433,"SPCS83 California zone 3 (meters)",9802,8821,36.3,9110,8822,-120.3,9110,8823,38.26,9110,8824,37.04,9110,8826,2000000.0,9001,8827,500000.0,9001,,,
-10434,"SPCS83 California zone 4 (meters)",9802,8821,35.2,9110,8822,-119.0,9110,8823,37.15,9110,8824,36.0,9110,8826,2000000.0,9001,8827,500000.0,9001,,,
-10435,"SPCS83 California zone 5 (meters)",9802,8821,33.3,9110,8822,-118.0,9110,8823,35.28,9110,8824,34.02,9110,8826,2000000.0,9001,8827,500000.0,9001,,,
-10436,"SPCS83 California zone 6 (meters)",9802,8821,32.1,9110,8822,-116.15,9110,8823,33.53,9110,8824,32.47,9110,8826,2000000.0,9001,8827,500000.0,9001,,,
-10501,Colorado CS27 North zone,9802,8821,39.2,9110,8822,-105.3,9110,8823,39.43,9110,8824,40.47,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-10502,Colorado CS27 Central zone,9802,8821,37.5,9110,8822,-105.3,9110,8823,39.45,9110,8824,38.27,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-10503,Colorado CS27 South zone,9802,8821,36.4,9110,8822,-105.3,9110,8823,38.26,9110,8824,37.14,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-10531,"SPCS83 Colorado North zone (meters)",9802,8821,39.2,9110,8822,-105.3,9110,8823,40.47,9110,8824,39.43,9110,8826,914401.8289,9001,8827,304800.6096,9001,,,
-10532,"SPCS83 Colorado Central zone (meters)",9802,8821,37.5,9110,8822,-105.3,9110,8823,39.45,9110,8824,38.27,9110,8826,914401.8289,9001,8827,304800.6096,9001,,,
-10533,"SPCS83 Colorado South zone (meters)",9802,8821,36.4,9110,8822,-105.3,9110,8823,38.26,9110,8824,37.14,9110,8826,914401.8289,9001,8827,304800.6096,9001,,,
-10600,Connecticut CS27,9802,8821,40.5,9110,8822,-72.45,9110,8823,41.52,9110,8824,41.12,9110,8826,600000.0,9003,8827,0.0,9003,,,
-10630,"SPCS83 Connecticut zone (meters)",9802,8821,40.5,9110,8822,-72.45,9110,8823,41.52,9110,8824,41.12,9110,8826,304800.6096,9001,8827,152400.3048,9001,,,
-10700,Delaware CS27,9807,8801,38.0,9110,8802,-75.25,9110,8805,0.999995,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-10730,"SPCS83 Delaware zone (meters)",9807,8801,38.0,9110,8802,-75.25,9110,8805,0.999995,9201,8806,200000.0,9001,8807,0.0,9001,,,,,,
-10901,Florida CS27 East zone,9807,8801,24.2,9110,8802,-81.0,9110,8805,0.999941177,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-10902,Florida CS27 West zone,9807,8801,24.2,9110,8802,-82.0,9110,8805,0.999941177,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-10903,Florida CS27 North zone,9802,8821,29.0,9110,8822,-84.3,9110,8823,30.45,9110,8824,29.35,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-10931,"SPCS83 Florida East zone (meters)",9807,8801,24.2,9110,8802,-81.0,9110,8805,0.999941177,9201,8806,200000.0,9001,8807,0.0,9001,,,,,,
-10932,"SPCS83 Florida West zone (meters)",9807,8801,24.2,9110,8802,-82.0,9110,8805,0.999941177,9201,8806,200000.0,9001,8807,0.0,9001,,,,,,
-10933,"SPCS83 Florida North zone (meters)",9802,8821,29.0,9110,8822,-84.3,9110,8823,30.45,9110,8824,29.35,9110,8826,600000.0,9001,8827,0.0,9001,,,
-11001,Georgia CS27 East zone,9807,8801,30.0,9110,8802,-82.1,9110,8805,0.9999,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-11002,Georgia CS27 West zone,9807,8801,30.0,9110,8802,-84.1,9110,8805,0.9999,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-11031,"SPCS83 Georgia East zone (meters)",9807,8801,30.0,9110,8802,-82.1,9110,8805,0.9999,9201,8806,200000.0,9001,8807,0.0,9001,,,,,,
-11032,"SPCS83 Georgia West zone (meters)",9807,8801,30.0,9110,8802,-84.1,9110,8805,0.9999,9201,8806,700000.0,9001,8807,0.0,9001,,,,,,
-11101,Idaho CS27 East zone,9807,8801,41.4,9110,8802,-112.1,9110,8805,0.999947368,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-11102,Idaho CS27 Central zone,9807,8801,41.4,9110,8802,-114.0,9110,8805,0.999947368,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-11103,Idaho CS27 West zone,9807,8801,41.4,9110,8802,-115.45,9110,8805,0.999933333,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-11131,"SPCS83 Idaho East zone (meters)",9807,8801,41.4,9110,8802,-112.1,9110,8805,0.999947368,9201,8806,200000.0,9001,8807,0.0,9001,,,,,,
-11132,"SPCS83 Idaho Central zone (meters)",9807,8801,41.4,9110,8802,-114.0,9110,8805,0.999947368,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-11133,"SPCS83 Idaho West zone (meters)",9807,8801,41.4,9110,8802,-115.45,9110,8805,0.999933333,9201,8806,800000.0,9001,8807,0.0,9001,,,,,,
-11201,Illinois CS27 East zone,9807,8801,36.4,9110,8802,-88.2,9110,8805,0.999975,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-11202,Illinois CS27 West zone,9807,8801,36.4,9110,8802,-90.1,9110,8805,0.999941177,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-11231,"SPCS83 Illinois East zone (meters)",9807,8801,36.4,9110,8802,-88.2,9110,8805,0.999975,9201,8806,300000.0,9001,8807,0.0,9001,,,,,,
-11232,"SPCS83 Illinois West zone (meters)",9807,8801,36.4,9110,8802,-90.1,9110,8805,0.999941177,9201,8806,700000.0,9001,8807,0.0,9001,,,,,,
-11301,Indiana CS27 East zone,9807,8801,37.3,9110,8802,-85.4,9110,8805,0.999966667,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-11302,Indiana CS27 West zone,9807,8801,37.3,9110,8802,-87.05,9110,8805,0.999966667,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-11331,"SPCS83 Indiana East zone (meters)",9807,8801,37.3,9110,8802,-85.4,9110,8805,0.999966667,9201,8806,100000.0,9001,8807,250000.0,9001,,,,,,
-11332,"SPCS83 Indiana West zone (meters)",9807,8801,37.3,9110,8802,-87.05,9110,8805,0.999966667,9201,8806,900000.0,9001,8807,250000.0,9001,,,,,,
-11401,Iowa CS27 North zone,9802,8821,41.3,9110,8822,-93.3,9110,8823,43.16,9110,8824,42.04,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-11402,Iowa CS27 South zone,9802,8821,40.0,9110,8822,-93.3,9110,8823,41.47,9110,8824,40.37,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-11431,"SPCS83 Iowa North zone (meters)",9802,8821,41.3,9110,8822,-93.3,9110,8823,43.16,9110,8824,42.04,9110,8826,1500000.0,9001,8827,1000000.0,9001,,,
-11432,"SPCS83 Iowa South zone (meters)",9802,8821,40.0,9110,8822,-93.3,9110,8823,41.47,9110,8824,40.37,9110,8826,500000.0,9001,8827,0.0,9001,,,
-11501,Kansas CS27 North zone,9802,8821,38.2,9110,8822,-98.0,9110,8823,39.47,9110,8824,38.43,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-11502,Kansas CS27 South zone,9802,8821,36.4,9110,8822,-98.3,9110,8823,38.34,9110,8824,37.16,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-11531,"SPCS83 Kansas North zone (meters)",9802,8821,38.2,9110,8822,-98.0,9110,8823,39.47,9110,8824,38.43,9110,8826,400000.0,9001,8827,0.0,9001,,,
-11532,"SPCS83 Kansas South zone (meters)",9802,8821,36.4,9110,8822,-98.3,9110,8823,38.34,9110,8824,37.16,9110,8826,400000.0,9001,8827,400000.0,9001,,,
-11601,Kentucky CS27 North zone,9802,8821,37.3,9110,8822,-84.15,9110,8823,37.58,9110,8824,38.58,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-11602,Kentucky CS27 South zone,9802,8821,36.2,9110,8822,-85.45,9110,8823,36.44,9110,8824,37.56,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-11631,Kentucky CS83 North zone,9802,8821,37.3,9110,8822,-84.15,9110,8823,37.58,9110,8824,37.58,9110,8826,500000.0,9001,8827,0.0,9001,,,
-11632,"SPCS83 Kentucky South zone (meters)",9802,8821,36.2,9110,8822,-85.45,9110,8823,37.56,9110,8824,36.44,9110,8826,500000.0,9001,8827,500000.0,9001,,,
-11701,Louisiana CS27 North zone,9802,8821,30.4,9110,8822,-92.3,9110,8823,31.1,9110,8824,32.4,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-11702,Louisiana CS27 South zone,9802,8821,28.4,9110,8822,-91.2,9110,8823,29.18,9110,8824,30.42,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-11731,"SPCS83 Louisiana North zone (meters)",9802,8821,30.3,9110,8822,-92.3,9110,8823,32.4,9110,8824,31.1,9110,8826,1000000.0,9001,8827,0.0,9001,,,
-11732,"SPCS83 Louisiana South zone (meters)",9802,8821,28.3,9110,8822,-91.2,9110,8823,30.42,9110,8824,29.18,9110,8826,1000000.0,9001,8827,0.0,9001,,,
-11801,Maine CS27 East zone,9807,8801,43.5,9110,8802,-68.3,9110,8805,0.9999,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-11802,Maine CS27 West zone,9807,8801,42.5,9110,8802,-70.1,9110,8805,0.999966667,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-11831,"SPCS83 Maine East zone (meters)",9807,8801,43.4,9110,8802,-68.3,9110,8805,0.9999,9201,8806,300000.0,9001,8807,0.0,9001,,,,,,
-11832,"SPCS83 Maine West zone (meters)",9807,8801,42.5,9110,8802,-70.1,9110,8805,0.999966667,9201,8806,900000.0,9001,8807,0.0,9001,,,,,,
-11900,Maryland CS27,9802,8821,37.5,9110,8822,-77.0,9110,8823,38.18,9110,8824,39.27,9110,8826,800000.0,9003,8827,0.0,9003,,,
-11930,"SPCS83 Maryland zone (meters)",9802,8821,37.4,9110,8822,-77.0,9110,8823,39.27,9110,8824,38.18,9110,8826,400000.0,9001,8827,0.0,9001,,,
-12001,Massachusetts CS27 Mainland zone,9802,8821,41.0,9110,8822,-71.3,9110,8823,41.43,9110,8824,42.41,9110,8826,600000.0,9003,8827,0.0,9003,,,
-12002,Massachusetts CS27 Island zone,9802,8821,41.0,9110,8822,-70.3,9110,8823,41.17,9110,8824,41.29,9110,8826,200000.0,9003,8827,0.0,9003,,,
-12031,"SPCS83 Massachusetts Mainland zone (meters)",9802,8821,41.0,9110,8822,-71.3,9110,8823,42.41,9110,8824,41.43,9110,8826,200000.0,9001,8827,750000.0,9001,,,
-12032,"SPCS83 Massachusetts Island zone (meters)",9802,8821,41.0,9110,8822,-70.3,9110,8823,41.29,9110,8824,41.17,9110,8826,500000.0,9001,8827,0.0,9001,,,
-12101,Michigan State Plane East zone,9807,8801,41.3,9110,8802,-83.4,9110,8805,0.999942857,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-12102,Michigan State Plane Old Central zone,9807,8801,41.3,9110,8802,-85.45,9110,8805,0.999909091,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-12103,Michigan State Plane West zone,9807,8801,41.3,9110,8802,-88.45,9110,8805,0.999909091,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-12111,Michigan CS27 North zone,9802,8821,44.47,9110,8822,-87.0,9110,8823,45.29,9110,8824,47.05,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-12112,Michigan CS27 Central zone,9802,8821,43.19,9110,8822,-84.2,9110,8823,44.11,9110,8824,45.42,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-12113,Michigan CS27 South zone,9802,8821,41.3,9110,8822,-84.2,9110,8823,42.06,9110,8824,43.4,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-12141,"SPCS83 Michigan North zone (meters)",9802,8821,44.47,9110,8822,-87.0,9110,8823,47.05,9110,8824,45.29,9110,8826,8000000.0,9001,8827,0.0,9001,,,
-12142,"SPCS83 Michigan Central zone (meters)",9802,8821,43.19,9110,8822,-84.22,9110,8823,45.42,9110,8824,44.11,9110,8826,6000000.0,9001,8827,0.0,9001,,,
-12143,"SPCS83 Michigan South zone (meters)",9802,8821,41.3,9110,8822,-84.22,9110,8823,43.4,9110,8824,42.06,9110,8826,4000000.0,9001,8827,0.0,9001,,,
-12201,Minnesota CS27 North zone,9802,8821,46.3,9110,8822,-93.06,9110,8823,47.02,9110,8824,48.38,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-12202,Minnesota CS27 Central zone,9802,8821,45.0,9110,8822,-94.15,9110,8823,45.37,9110,8824,47.03,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-12203,Minnesota CS27 South zone,9802,8821,43.0,9110,8822,-94.0,9110,8823,43.47,9110,8824,45.13,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-12231,"SPCS83 Minnesota North zone (meters)",9802,8821,46.3,9110,8822,-93.06,9110,8823,48.38,9110,8824,47.02,9110,8826,800000.0,9001,8827,100000.0,9001,,,
-12232,"SPCS83 Minnesota Central zone (meters)",9802,8821,45.0,9110,8822,-94.15,9110,8823,47.03,9110,8824,45.37,9110,8826,800000.0,9001,8827,100000.0,9001,,,
-12233,"SPCS83 Minnesota South zone (meters)",9802,8821,43.0,9110,8822,-94.0,9110,8823,45.13,9110,8824,43.47,9110,8826,800000.0,9001,8827,100000.0,9001,,,
-12301,Mississippi CS27 East zone,9807,8801,29.4,9110,8802,-88.5,9110,8805,0.99996,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-12302,Mississippi CS27 West zone,9807,8801,30.3,9110,8802,-90.2,9110,8805,0.999941177,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-12331,"SPCS83 Mississippi East zone (meters)",9807,8801,29.3,9110,8802,-88.5,9110,8805,0.99995,9201,8806,300000.0,9001,8807,0.0,9001,,,,,,
-12332,"SPCS83 Mississippi West zone (meters)",9807,8801,29.3,9110,8802,-90.2,9110,8805,0.99995,9201,8806,700000.0,9001,8807,0.0,9001,,,,,,
-12401,Missouri CS27 East zone,9807,8801,35.5,9110,8802,-90.3,9110,8805,0.999933333,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-12402,Missouri CS27 Central zone,9807,8801,35.5,9110,8802,-92.3,9110,8805,0.999933333,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-12403,Missouri CS27 West zone,9807,8801,36.1,9110,8802,-94.3,9110,8805,0.999941177,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-12431,"SPCS83 Missouri East zone (meters)",9807,8801,35.5,9110,8802,-90.3,9110,8805,0.999933333,9201,8806,250000.0,9001,8807,0.0,9001,,,,,,
-12432,"SPCS83 Missouri Central zone (meters)",9807,8801,35.5,9110,8802,-92.3,9110,8805,0.999933333,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-12433,"SPCS83 Missouri West zone (meters)",9807,8801,36.1,9110,8802,-94.3,9110,8805,0.999941177,9201,8806,850000.0,9001,8807,0.0,9001,,,,,,
-12501,Montana CS27 North zone,9802,8821,47.0,9110,8822,-109.3,9110,8823,48.43,9110,8824,47.51,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-12502,Montana CS27 Central zone,9802,8821,45.5,9110,8822,-109.3,9110,8823,47.53,9110,8824,46.27,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-12503,Montana CS27 South zone,9802,8821,44.0,9110,8822,-109.3,9110,8823,46.24,9110,8824,44.52,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-12530,"SPCS83 Montana zone (meters)",9802,8821,44.15,9110,8822,-109.3,9110,8823,49.0,9110,8824,45.0,9110,8826,600000.0,9001,8827,0.0,9001,,,
-12601,Nebraska CS27 North zone,9802,8821,41.2,9110,8822,-100.0,9110,8823,41.51,9110,8824,42.49,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-12602,Nebraska CS27 South zone,9802,8821,39.4,9110,8822,-99.3,9110,8823,40.17,9110,8824,41.43,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-12630,"SPCS83 Nebraska zone (meters)",9802,8821,39.5,9110,8822,-100.0,9110,8823,43.0,9110,8824,40.0,9110,8826,500000.0,9001,8827,0.0,9001,,,
-12701,Nevada CS27 East zone,9807,8801,34.45,9110,8802,-115.35,9110,8805,0.9999,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-12702,Nevada CS27 Central zone,9807,8801,34.45,9110,8802,-116.4,9110,8805,0.9999,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-12703,Nevada CS27 West zone,9807,8801,34.45,9110,8802,-118.35,9110,8805,0.9999,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-12731,"SPCS83 Nevada East zone (meters)",9807,8801,34.45,9110,8802,-115.35,9110,8805,0.9999,9201,8806,200000.0,9001,8807,8000000.0,9001,,,,,,
-12732,"SPCS83 Nevada Central zone (meters)",9807,8801,34.45,9110,8802,-116.4,9110,8805,0.9999,9201,8806,500000.0,9001,8807,6000000.0,9001,,,,,,
-12733,"SPCS83 Nevada West zone (meters)",9807,8801,34.45,9110,8802,-118.35,9110,8805,0.9999,9201,8806,800000.0,9001,8807,4000000.0,9001,,,,,,
-12800,New Hampshire CS27,9807,8801,42.3,9110,8802,-71.4,9110,8805,0.999966667,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-12830,"SPCS83 New Hampshire zone (meters)",9807,8801,42.3,9110,8802,-71.4,9110,8805,0.999966667,9201,8806,300000.0,9001,8807,0.0,9001,,,,,,
-12900,New Jersey CS27,9807,8801,38.5,9110,8802,-74.4,9110,8805,0.999975,9201,8806,2000000.0,9003,8807,0.0,9003,,,,,,
-12930,"SPCS83 New Jersey zone (meters)",9807,8801,38.5,9110,8802,-74.3,9110,8805,0.9999,9201,8806,150000.0,9001,8807,0.0,9001,,,,,,
-13001,New Mexico CS27 East zone,9807,8801,31.0,9110,8802,-104.2,9110,8805,0.999909091,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-13002,New Mexico CS27 Central zone,9807,8801,31.0,9110,8802,-106.15,9110,8805,0.9999,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-13003,New Mexico CS27 West zone,9807,8801,31.0,9110,8802,-107.5,9110,8805,0.999916667,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-13031,"SPCS83 New Mexico East zone (meters)",9807,8801,31.0,9110,8802,-104.2,9110,8805,0.999909091,9201,8806,165000.0,9001,8807,0.0,9001,,,,,,
-13032,"SPCS83 New Mexico Central zone (meters)",9807,8801,31.0,9110,8802,-106.15,9110,8805,0.9999,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-13033,"SPCS83 New Mexico West zone (meters)",9807,8801,31.0,9110,8802,-107.5,9110,8805,0.999916667,9201,8806,830000.0,9001,8807,0.0,9001,,,,,,
-13101,New York CS27 East zone,9807,8801,40.0,9110,8802,-74.2,9110,8805,0.999966667,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-13102,New York CS27 Central zone,9807,8801,40.0,9110,8802,-76.35,9110,8805,0.9999375,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-13103,New York CS27 West zone,9807,8801,40.0,9110,8802,-78.35,9110,8805,0.9999375,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-13104,New York CS27 Long Island zone,9802,8821,40.3,9110,8822,-74.0,9110,8823,41.02,9110,8824,40.4,9110,8826,1000000.0,9003,8827,0.0,9003,,,
-13131,"SPCS83 New York East zone (meters)",9807,8801,38.5,9110,8802,-74.3,9110,8805,0.9999,9201,8806,150000.0,9001,8807,0.0,9001,,,,,,
-13132,"SPCS83 New York Central zone (meters)",9807,8801,40.0,9110,8802,-76.35,9110,8805,0.9999375,9201,8806,250000.0,9001,8807,0.0,9001,,,,,,
-13133,"SPCS83 New York West zone (meters)",9807,8801,40.0,9110,8802,-78.35,9110,8805,0.9999375,9201,8806,350000.0,9001,8807,0.0,9001,,,,,,
-13134,"SPCS83 New York Long Island zone (meters)",9802,8821,40.1,9110,8822,-74.0,9110,8823,41.02,9110,8824,40.4,9110,8826,300000.0,9001,8827,0.0,9001,,,
-13200,North Carolina CS27,9802,8821,33.45,9110,8822,-79.0,9110,8823,34.2,9110,8824,36.1,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-13230,"SPCS83 North Carolina zone (meters)",9802,8821,33.45,9110,8822,-79.0,9110,8823,36.1,9110,8824,34.2,9110,8826,609601.22,9001,8827,0.0,9001,,,
-13301,North Dakota CS27 North zone,9802,8821,47.0,9110,8822,-100.3,9110,8823,47.26,9110,8824,48.44,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-13302,North Dakota CS27 South zone,9802,8821,45.4,9110,8822,-100.3,9110,8823,46.11,9110,8824,47.29,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-13331,"SPCS83 North Dakota North zone (meters)",9802,8821,47.0,9110,8822,-100.3,9110,8823,48.44,9110,8824,47.26,9110,8826,600000.0,9001,8827,0.0,9001,,,
-13332,"SPCS83 North Dakota South zone (meters)",9802,8821,45.4,9110,8822,-100.3,9110,8823,47.29,9110,8824,46.11,9110,8826,600000.0,9001,8827,0.0,9001,,,
-13401,Ohio CS27 North zone,9802,8821,39.4,9110,8822,-82.3,9110,8823,40.26,9110,8824,41.42,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-13402,Ohio CS27 South zone,9802,8821,38.0,9110,8822,-82.3,9110,8823,38.44,9110,8824,40.02,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-13431,"SPCS83 Ohio North zone (meters)",9802,8821,39.4,9110,8822,-82.3,9110,8823,41.42,9110,8824,40.26,9110,8826,600000.0,9001,8827,0.0,9001,,,
-13432,"SPCS83 Ohio South zone (meters)",9802,8821,38.0,9110,8822,-82.3,9110,8823,40.02,9110,8824,38.44,9110,8826,600000.0,9001,8827,0.0,9001,,,
-13501,Oklahoma CS27 North zone,9802,8821,35.0,9110,8822,-98.0,9110,8823,35.34,9110,8824,36.46,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-13502,Oklahoma CS27 South zone,9802,8821,33.2,9110,8822,-98.0,9110,8823,33.56,9110,8824,35.14,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-13531,"SPCS83 Oklahoma North zone (meters)",9802,8821,35.0,9110,8822,-98.0,9110,8823,36.46,9110,8824,35.34,9110,8826,600000.0,9001,8827,0.0,9001,,,
-13532,"SPCS83 Oklahoma South zone (meters)",9802,8821,33.2,9110,8822,-98.0,9110,8823,35.14,9110,8824,33.56,9110,8826,600000.0,9001,8827,0.0,9001,,,
-13601,Oregon CS27 North zone,9802,8821,43.4,9110,8822,-120.3,9110,8823,44.2,9110,8824,46.0,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-13602,Oregon CS27 South zone,9802,8821,41.4,9110,8822,-120.3,9110,8823,42.2,9110,8824,44.0,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-13631,"SPCS83 Oregon North zone (meters)",9802,8821,43.4,9110,8822,-120.3,9110,8823,46.0,9110,8824,44.2,9110,8826,2500000.0,9001,8827,0.0,9001,,,
-13632,"SPCS83 Oregon South zone (meters)",9802,8821,41.4,9110,8822,-120.3,9110,8823,44.0,9110,8824,42.2,9110,8826,1500000.0,9001,8827,0.0,9001,,,
-13701,Pennsylvania CS27 North zone,9802,8821,40.1,9110,8822,-77.45,9110,8823,40.53,9110,8824,41.57,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-13702,Pennsylvania CS27 South zone,9802,8821,39.2,9110,8822,-77.45,9110,8823,39.56,9110,8824,40.48,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-13731,"SPCS83 Pennsylvania North zone (meters)",9802,8821,40.1,9110,8822,-77.45,9110,8823,41.57,9110,8824,40.53,9110,8826,600000.0,9001,8827,0.0,9001,,,
-13732,"SPCS83 Pennsylvania South zone (meters)",9802,8821,39.2,9110,8822,-77.45,9110,8823,40.58,9110,8824,39.56,9110,8826,600000.0,9001,8827,0.0,9001,,,
-13800,Rhode Island CS27,9807,8801,41.05,9110,8802,-71.3,9110,8805,0.9999938,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-13830,"SPCS83 Rhode Island zone (meters)",9807,8801,41.05,9110,8802,-71.3,9110,8805,0.99999375,9201,8806,100000.0,9001,8807,0.0,9001,,,,,,
-13901,South Carolina CS27 North zone,9802,8821,33.0,9110,8822,-81.0,9110,8823,33.46,9110,8824,34.58,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-13902,South Carolina CS27 South zone,9802,8821,31.5,9110,8822,-81.0,9110,8823,32.2,9110,8824,33.4,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-13930,"SPCS83 South Carolina zone (meters)",9802,8821,31.5,9110,8822,-81.0,9110,8823,34.5,9110,8824,32.3,9110,8826,609600.0,9001,8827,0.0,9001,,,
-14001,South Dakota CS27 North zone,9802,8821,43.5,9110,8822,-100.0,9110,8823,44.25,9110,8824,45.41,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-14002,South Dakota CS27 South zone,9802,8821,42.2,9110,8822,-100.2,9110,8823,42.5,9110,8824,44.24,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-14031,"SPCS83 South Dakota North zone (meters)",9802,8821,43.5,9110,8822,-100.0,9110,8823,45.41,9110,8824,44.25,9110,8826,600000.0,9001,8827,0.0,9001,,,
-14032,"SPCS83 South Dakota South zone (meters)",9802,8821,42.2,9110,8822,-100.2,9110,8823,44.24,9110,8824,42.5,9110,8826,600000.0,9001,8827,0.0,9001,,,
-14100,Tennessee CS27,9802,8821,34.4,9110,8822,-86.0,9110,8823,35.15,9110,8824,36.25,9110,8826,100000.0,9003,8827,0.0,9003,,,
-14130,"SPCS83 Tennessee zone (meters)",9802,8821,34.2,9110,8822,-86.0,9110,8823,36.25,9110,8824,35.15,9110,8826,600000.0,9001,8827,0.0,9001,,,
-14201,Texas CS27 North zone,9802,8821,34.0,9110,8822,-101.3,9110,8823,34.39,9110,8824,36.11,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-14202,Texas CS27 North Central zone,9802,8821,31.4,9110,8822,-97.3,9110,8823,32.08,9110,8824,33.58,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-14203,Texas CS27 Central zone,9802,8821,29.4,9110,8822,-100.2,9110,8823,30.07,9110,8824,31.53,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-14204,Texas CS27 South Central zone,9802,8821,27.5,9110,8822,-99.0,9110,8823,28.23,9110,8824,30.17,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-14205,Texas CS27 South zone,9802,8821,25.4,9110,8822,-98.3,9110,8823,26.1,9110,8824,27.5,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-14231,"SPCS83 Texas North zone (meters)",9802,8821,34.0,9110,8822,-101.3,9110,8823,36.11,9110,8824,34.39,9110,8826,200000.0,9001,8827,1000000.0,9001,,,
-14232,"SPCS83 Texas North Central zone (meters)",9802,8821,31.4,9110,8822,-98.3,9110,8823,33.58,9110,8824,32.08,9110,8826,600000.0,9001,8827,2000000.0,9001,,,
-14233,"SPCS83 Texas Central zone (meters)",9802,8821,29.4,9110,8822,-100.2,9110,8823,31.53,9110,8824,30.07,9110,8826,700000.0,9001,8827,3000000.0,9001,,,
-14234,"SPCS83 Texas South Central zone (meters)",9802,8821,27.5,9110,8822,-99.0,9110,8823,30.17,9110,8824,28.23,9110,8826,600000.0,9001,8827,4000000.0,9001,,,
-14235,"SPCS83 Texas South zone (meters)",9802,8821,25.4,9110,8822,-98.3,9110,8823,27.5,9110,8824,26.1,9110,8826,300000.0,9001,8827,5000000.0,9001,,,
-14301,Utah CS27 North zone,9802,8821,40.2,9110,8822,-111.3,9110,8823,40.43,9110,8824,41.47,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-14302,Utah CS27 Central zone,9802,8821,38.2,9110,8822,-111.3,9110,8823,39.01,9110,8824,40.39,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-14303,Utah CS27 South zone,9802,8821,36.4,9110,8822,-111.3,9110,8823,37.13,9110,8824,38.21,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-14331,"SPCS83 Utah North zone (meters)",9802,8821,40.2,9110,8822,-111.3,9110,8823,41.47,9110,8824,40.43,9110,8826,500000.0,9001,8827,1000000.0,9001,,,
-14332,"SPCS83 Utah Central zone (meters)",9802,8821,38.2,9110,8822,-111.3,9110,8823,40.39,9110,8824,39.01,9110,8826,500000.0,9001,8827,2000000.0,9001,,,
-14333,"SPCS83 Utah South zone (meters)",9802,8821,36.4,9110,8822,-111.3,9110,8823,38.21,9110,8824,37.13,9110,8826,500000.0,9001,8827,3000000.0,9001,,,
-14400,Vermont CS27,9807,8801,42.3,9110,8802,-72.3,9110,8805,0.999964286,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-14430,"SPCS83 Vermont zone (meters)",9807,8801,42.3,9110,8802,-72.3,9110,8805,0.999964286,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-14501,Virginia CS27 North zone,9802,8821,37.4,9110,8822,-78.3,9110,8823,38.02,9110,8824,39.12,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-14502,Virginia CS27 South zone,9802,8821,36.2,9110,8822,-78.3,9110,8823,36.46,9110,8824,37.58,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-14531,"SPCS83 Virginia North zone (meters)",9802,8821,37.4,9110,8822,-78.3,9110,8823,39.12,9110,8824,38.02,9110,8826,3500000.0,9001,8827,2000000.0,9001,,,
-14532,"SPCS83 Virginia South zone (meters)",9802,8821,36.2,9110,8822,-78.3,9110,8823,37.58,9110,8824,36.46,9110,8826,3500000.0,9001,8827,1000000.0,9001,,,
-14601,Washington CS27 North zone,9802,8821,47.0,9110,8822,-120.5,9110,8823,47.3,9110,8824,48.44,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-14602,Washington CS27 South zone,9802,8821,45.2,9110,8822,-120.3,9110,8823,45.5,9110,8824,47.2,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-14631,"SPCS83 Washington North zone (meters)",9802,8821,47.0,9110,8822,-120.5,9110,8823,48.44,9110,8824,47.3,9110,8826,500000.0,9001,8827,0.0,9001,,,
-14632,"SPCS83 Washington South zone (meters)",9802,8821,45.2,9110,8822,-120.3,9110,8823,47.2,9110,8824,45.5,9110,8826,500000.0,9001,8827,0.0,9001,,,
-14701,West Virginia CS27 North zone,9802,8821,38.3,9110,8822,-79.3,9110,8823,39.0,9110,8824,40.15,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-14702,West Virginia CS27 South zone,9802,8821,37.0,9110,8822,-81.0,9110,8823,37.29,9110,8824,38.53,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-14731,"SPCS83 West Virginia North zone (meters)",9802,8821,38.3,9110,8822,-79.3,9110,8823,40.15,9110,8824,39.0,9110,8826,600000.0,9001,8827,0.0,9001,,,
-14732,"SPCS83 West Virginia South zone (meters)",9802,8821,37.0,9110,8822,-81.0,9110,8823,38.53,9110,8824,37.29,9110,8826,600000.0,9001,8827,0.0,9001,,,
-14801,Wisconsin CS27 North zone,9802,8821,45.1,9110,8822,-90.0,9110,8823,45.34,9110,8824,46.46,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-14802,Wisconsin CS27 Central zone,9802,8821,43.5,9110,8822,-90.0,9110,8823,44.15,9110,8824,45.3,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-14803,Wisconsin CS27 South zone,9802,8821,42.0,9110,8822,-90.0,9110,8823,42.44,9110,8824,44.04,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-14831,"SPCS83 Wisconsin North zone (meters)",9802,8821,45.1,9110,8822,-90.0,9110,8823,46.46,9110,8824,45.34,9110,8826,600000.0,9001,8827,0.0,9001,,,
-14832,"SPCS83 Wisconsin Central zone (meters)",9802,8821,43.5,9110,8822,-90.0,9110,8823,45.3,9110,8824,44.15,9110,8826,600000.0,9001,8827,0.0,9001,,,
-14833,"SPCS83 Wisconsin South zone (meters)",9802,8821,42.0,9110,8822,-90.0,9110,8823,44.04,9110,8824,42.44,9110,8826,600000.0,9001,8827,0.0,9001,,,
-14901,Wyoming CS27 East zone,9807,8801,40.4,9110,8802,-105.1,9110,8805,0.999941177,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-14902,Wyoming CS27 East Central zone,9807,8801,40.4,9110,8802,-107.2,9110,8805,0.999941177,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-14903,Wyoming CS27 West Central zone,9807,8801,40.4,9110,8802,-108.45,9110,8805,0.999941177,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-14904,Wyoming CS27 West zone,9807,8801,40.4,9110,8802,-110.05,9110,8805,0.999941177,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-14931,"SPCS83 Wyoming East zone (meters)",9807,8801,40.3,9110,8802,-105.1,9110,8805,0.9999375,9201,8806,200000.0,9001,8807,0.0,9001,,,,,,
-14932,"SPCS83 Wyoming East Central zone (meters)",9807,8801,40.3,9110,8802,-107.2,9110,8805,0.9999375,9201,8806,400000.0,9001,8807,100000.0,9001,,,,,,
-14933,"SPCS83 Wyoming West Central zone (meters)",9807,8801,40.3,9110,8802,-108.45,9110,8805,0.9999375,9201,8806,600000.0,9001,8807,0.0,9001,,,,,,
-14934,"SPCS83 Wyoming West zone (meters)",9807,8801,40.3,9110,8802,-110.05,9110,8805,0.9999375,9201,8806,800000.0,9001,8807,100000.0,9001,,,,,,
-15001,Alaska CS27 zone 1,9812,8806,16404166.67,9003,8807,-16404166.67,9003,8811,57.0,9110,8812,-133.4,9110,8813,323.07483685,9110,8814,323.07483685,9110,8815,0.9999,9201
-15002,Alaska CS27 zone 2,9807,8801,54.0,9102,8802,-142.0,9102,8805,0.9999,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-15003,Alaska CS27 zone 3,9807,8801,54.0,9102,8802,-146.0,9102,8805,0.9999,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-15004,Alaska CS27 zone 4,9807,8801,54.0,9102,8802,-150.0,9102,8805,0.9999,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-15005,Alaska CS27 zone 5,9807,8801,54.0,9102,8802,-154.0,9102,8805,0.9999,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-15006,Alaska CS27 zone 6,9807,8801,54.0,9102,8802,-158.0,9102,8805,0.9999,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-15007,Alaska CS27 zone 7,9807,8801,54.0,9102,8802,-162.0,9102,8805,0.9999,9201,8806,700000.0,9003,8807,0.0,9003,,,,,,
-15008,Alaska CS27 zone 8,9807,8801,54.0,9102,8802,-166.0,9102,8805,0.9999,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-15009,Alaska CS27 zone 9,9807,8801,54.0,9102,8802,-170.0,9102,8805,0.9999,9201,8806,600000.0,9003,8807,0.0,9003,,,,,,
-15010,Alaska CS27 zone 10,9802,8821,51.0,9110,8822,-176.0,9110,8823,53.5,9110,8824,51.5,9110,8826,3000000.0,9003,8827,0.0,9003,,,
-15031,"SPCS83 Alaska zone 1 (meters)",9812,8806,5000000.0,9001,8807,-5000000.0,9001,8811,57.0,9110,8812,-133.4,9110,8813,323.07483685,9110,8814,323.07483685,9110,8815,0.9999,9201
-15032,"SPCS83 Alaska zone 2 (meters)",9807,8801,54.0,9102,8802,-142.0,9102,8805,0.9999,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-15033,"SPCS83 Alaska zone 3 (meters)",9807,8801,54.0,9102,8802,-146.0,9102,8805,0.9999,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-15034,"SPCS83 Alaska zone 4 (meters)",9807,8801,54.0,9102,8802,-150.0,9102,8805,0.9999,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-15035,"SPCS83 Alaska zone 5 (meters)",9807,8801,54.0,9102,8802,-154.0,9102,8805,0.9999,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-15036,"SPCS83 Alaska zone 6 (meters)",9807,8801,54.0,9102,8802,-158.0,9102,8805,0.9999,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-15037,"SPCS83 Alaska zone 7 (meters)",9807,8801,54.0,9102,8802,-162.0,9102,8805,0.9999,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-15038,"SPCS83 Alaska zone 8 (meters)",9807,8801,54.0,9102,8802,-166.0,9102,8805,0.9999,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-15039,"SPCS83 Alaska zone 9 (meters)",9807,8801,54.0,9102,8802,-170.0,9102,8805,0.9999,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-15040,"SPCS83 Alaska zone 10 (meters)",9802,8821,51.0,9110,8822,-176.0,9110,8823,53.5,9110,8824,51.5,9110,8826,1000000.0,9001,8827,0.0,9001,,,
-15101,Hawaii CS27 zone 1,9807,8801,18.5,9110,8802,-155.3,9110,8805,0.999966667,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-15102,Hawaii CS27 zone 2,9807,8801,20.2,9110,8802,-156.4,9110,8805,0.999966667,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-15103,Hawaii CS27 zone 3,9807,8801,21.1,9110,8802,-158.0,9110,8805,0.99999,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-15104,Hawaii CS27 zone 4,9807,8801,21.5,9110,8802,-159.3,9110,8805,0.99999,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-15105,Hawaii CS27 zone 5,9807,8801,21.4,9110,8802,-160.1,9110,8805,1.0,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-15131,"SPCS83 Hawaii zone 1 (meters)",9807,8801,18.5,9110,8802,-155.3,9110,8805,0.999966667,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-15132,"SPCS83 Hawaii zone 2 (meters)",9807,8801,20.2,9110,8802,-156.4,9110,8805,0.999966667,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-15133,"SPCS83 Hawaii zone 3 (meters)",9807,8801,21.1,9110,8802,-158.0,9110,8805,0.99999,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-15134,"SPCS83 Hawaii zone 4 (meters)",9807,8801,21.5,9110,8802,-159.3,9110,8805,0.99999,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-15135,"SPCS83 Hawaii zone 5 (meters)",9807,8801,21.4,9110,8802,-160.1,9110,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-15201,Puerto Rico CS27,9802,8821,17.5,9110,8822,-66.26,9110,8823,18.26,9110,8824,18.02,9110,8826,500000.0,9003,8827,0.0,9003,,,
-15202,St. Croix CS27,9802,8821,17.5,9110,8822,-66.26,9110,8823,18.26,9110,8824,18.02,9110,8826,500000.0,9003,8827,100000.0,9003,,,
-15230,"SPCS83 Puerto Rico & Virgin Islands zone (meters)",9802,8821,17.5,9110,8822,-66.26,9110,8823,18.26,9110,8824,18.02,9110,8826,200000.0,9001,8827,200000.0,9001,,,
-15300,American Samoa Lambert,9801,8801,-14.16,9110,8802,170.0,9110,8805,1.0,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-15301,American Samoa Lambert,9801,8801,-14.16,9110,8802,-170.0,9110,8805,1.0,9201,8806,500000.0,9003,8807,0.0,9003,,,,,,
-15302,Tennessee CS27,9802,8821,34.4,9110,8822,-86.0,9110,8823,35.15,9110,8824,36.25,9110,8826,2000000.0,9003,8827,100000.0,9003,,,
-15303,"SPCS83 Kentucky North zone (meters)",9802,8821,37.3,9110,8822,-84.15,9110,8823,37.58,9110,8824,38.58,9110,8826,500000.0,9001,8827,0.0,9001,,,
-15304,"SPCS83 Arizona East zone (International feet)",9807,8801,31.0,9110,8802,-110.1,9110,8805,0.9999,9201,8806,700000.0,9002,8807,0.0,9002,,,,,,
-15305,"SPCS83 Arizona Central zone (International feet)",9807,8801,31.0,9110,8802,-111.55,9110,8805,0.9999,9201,8806,700000.0,9002,8807,0.0,9002,,,,,,
-15306,"SPCS83 Arizona West zone (International feet)",9807,8801,31.0,9110,8802,-113.45,9110,8805,0.999933333,9201,8806,700000.0,9002,8807,0.0,9002,,,,,,
-15307,"SPCS83 California zone 1 (US Survey feet)",9802,8821,39.2,9110,8822,-122.0,9110,8823,41.4,9110,8824,40.0,9110,8826,6561666.667,9003,8827,1640416.667,9003,,,
-15308,"SPCS83 California zone 2 (US Survey feet)",9802,8821,37.4,9110,8822,-122.0,9110,8823,39.5,9110,8824,38.2,9110,8826,6561666.667,9003,8827,1640416.667,9003,,,
-15309,"SPCS83 California zone 3 (US Survey feet)",9802,8821,36.3,9110,8822,-120.3,9110,8823,38.26,9110,8824,37.04,9110,8826,6561666.667,9003,8827,1640416.667,9003,,,
-15310,"SPCS83 California zone 4 (US Survey feet)",9802,8821,35.2,9110,8822,-119.0,9110,8823,37.15,9110,8824,36.0,9110,8826,6561666.667,9003,8827,1640416.667,9003,,,
-15311,"SPCS83 California zone 5 (US Survey feet)",9802,8821,33.3,9110,8822,-118.0,9110,8823,35.28,9110,8824,34.02,9110,8826,6561666.667,9003,8827,1640416.667,9003,,,
-15312,"SPCS83 California zone 6 (US Survey feet)",9802,8821,32.1,9110,8822,-116.15,9110,8823,33.53,9110,8824,32.47,9110,8826,6561666.667,9003,8827,1640416.667,9003,,,
-15313,"SPCS83 Colorado North zone (US Survey feet)",9802,8821,39.2,9110,8822,-105.3,9110,8823,40.47,9110,8824,39.43,9110,8826,3000000.0,9003,8827,1000000.0,9003,,,
-15314,"SPCS83 Colorado Central zone (US Survey feet)",9802,8821,37.5,9110,8822,-105.3,9110,8823,39.45,9110,8824,38.27,9110,8826,3000000.0,9003,8827,1000000.0,9003,,,
-15315,"SPCS83 Colorado South zone (US Survey feet)",9802,8821,36.4,9110,8822,-105.3,9110,8823,38.26,9110,8824,37.14,9110,8826,3000000.0,9003,8827,1000000.0,9003,,,
-15316,"SPCS83 Connecticut zone (US Survey feet)",9802,8821,40.5,9110,8822,-72.45,9110,8823,41.52,9110,8824,41.12,9110,8826,1000000.0,9003,8827,500000.0,9003,,,
-15317,"SPCS83 Delaware zone (US Survey feet)",9807,8801,38.0,9110,8802,-75.25,9110,8805,0.999995,9201,8806,656166.667,9003,8807,0.0,9003,,,,,,
-15318,"SPCS83 Florida East zone (US Survey feet)",9807,8801,24.2,9110,8802,-81.0,9110,8805,0.999941177,9201,8806,656166.667,9003,8807,0.0,9003,,,,,,
-15319,"SPCS83 Florida West zone (US Survey feet)",9807,8801,24.2,9110,8802,-82.0,9110,8805,0.999941177,9201,8806,656166.667,9003,8807,0.0,9003,,,,,,
-15320,"SPCS83 Florida North zone (US Survey feet)",9802,8821,29.0,9110,8822,-84.3,9110,8823,30.45,9110,8824,29.35,9110,8826,1968500.0,9003,8827,0.0,9003,,,
-15321,"SPCS83 Georgia East zone (US Survey feet)",9807,8801,30.0,9110,8802,-82.1,9110,8805,0.9999,9201,8806,656166.667,9003,8807,0.0,9003,,,,,,
-15322,"SPCS83 Georgia West zone (US Survey feet)",9807,8801,30.0,9110,8802,-84.1,9110,8805,0.9999,9201,8806,2296583.333,9003,8807,0.0,9003,,,,,,
-15323,"SPCS83 Idaho East zone (US Survey feet)",9807,8801,41.4,9110,8802,-112.1,9110,8805,0.999947368,9201,8806,656166.667,9003,8807,0.0,9003,,,,,,
-15324,"SPCS83 Idaho Central zone (US Survey feet)",9807,8801,41.4,9110,8802,-114.0,9110,8805,0.999947368,9201,8806,1640416.667,9003,8807,0.0,9003,,,,,,
-15325,"SPCS83 Idaho West zone (US Survey feet)",9807,8801,41.4,9110,8802,-115.45,9110,8805,0.999933333,9201,8806,2624666.667,9003,8807,0.0,9003,,,,,,
-15326,"SPCS83 Indiana East zone (US Survey feet)",9807,8801,37.3,9110,8802,-85.4,9110,8805,0.999966667,9201,8806,328083.333,9003,8807,818125.0,9003,,,,,,
-15327,"SPCS83 Indiana West zone (US Survey feet)",9807,8801,37.3,9110,8802,-87.05,9110,8805,0.999966667,9201,8806,2952750.0,9003,8807,818125.0,9003,,,,,,
-15328,"SPCS83 Kentucky North zone (US Survey feet)",9802,8821,37.3,9110,8822,-84.15,9110,8823,37.58,9110,8824,38.58,9110,8826,1640416.667,9003,8827,0.0,9003,,,
-15329,"SPCS83 Kentucky South zone (US Survey feet)",9802,8821,36.2,9110,8822,-85.45,9110,8823,37.56,9110,8824,36.44,9110,8826,1640416.667,9003,8827,1640416.667,9003,,,
-15330,"SPCS83 Maryland zone (US Survey feet)",9802,8821,37.4,9110,8822,-77.0,9110,8823,39.27,9110,8824,38.18,9110,8826,1312333.333,9003,8827,0.0,9003,,,
-15331,"SPCS83 Massachusetts Mainland zone (US Survey feet)",9802,8821,41.0,9110,8822,-71.3,9110,8823,42.41,9110,8824,41.43,9110,8826,656166.667,9003,8827,2460625.0,9003,,,
-15332,"SPCS83 Massachusetts Island zone (US Survey feet)",9802,8821,41.0,9110,8822,-70.3,9110,8823,41.29,9110,8824,41.17,9110,8826,1640416.667,9003,8827,0.0,9003,,,
-15333,"SPCS83 Michigan North zone (International feet)",9802,8821,44.47,9110,8822,-87.0,9110,8823,47.05,9110,8824,45.29,9110,8826,26246719.16,9002,8827,0.0,9002,,,
-15334,"SPCS83 Michigan Central zone (International feet)",9802,8821,43.19,9110,8822,-84.22,9110,8823,45.42,9110,8824,44.11,9110,8826,19685039.37,9002,8827,0.0,9002,,,
-15335,"SPCS83 Michigan South zone (International feet)",9802,8821,41.3,9110,8822,-84.22,9110,8823,43.4,9110,8824,42.06,9110,8826,13123359.58,9002,8827,0.0,9002,,,
-15336,"SPCS83 Mississippi East zone (US Survey feet)",9807,8801,29.3,9110,8802,-88.5,9110,8805,0.99995,9201,8806,984250.0,9003,8807,0.0,9003,,,,,,
-15337,"SPCS83 Mississippi West zone (US Survey feet)",9807,8801,29.3,9110,8802,-90.2,9110,8805,0.99995,9201,8806,2296583.333,9003,8807,0.0,9003,,,,,,
-15338,"SPCS83 Montana zone (International feet)",9802,8821,44.15,9110,8822,-109.3,9110,8823,49.0,9110,8824,45.0,9110,8826,1968503.937,9002,8827,0.0,9002,,,
-15339,"SPCS83 New Mexico East zone (US Survey feet)",9807,8801,31.0,9110,8802,-104.2,9110,8805,0.999909091,9201,8806,541337.5,9003,8807,0.0,9003,,,,,,
-15340,"SPCS83 New Mexico Central zone (US Survey feet)",9807,8801,31.0,9110,8802,-106.15,9110,8805,0.9999,9201,8806,1640416.667,9003,8807,0.0,9003,,,,,,
-15341,"SPCS83 New Mexico West zone (US Survey feet)",9807,8801,31.0,9110,8802,-107.5,9110,8805,0.999916667,9201,8806,2723091.667,9003,8807,0.0,9003,,,,,,
-15342,"SPCS83 New York East zone (US Survey feet)",9807,8801,38.5,9110,8802,-74.3,9110,8805,0.9999,9201,8806,492125.0,9003,8807,0.0,9003,,,,,,
-15343,"SPCS83 New York Central zone (US Survey feet)",9807,8801,40.0,9110,8802,-76.35,9110,8805,0.9999375,9201,8806,820208.333,9003,8807,0.0,9003,,,,,,
-15344,"SPCS83 New York West zone (US Survey feet)",9807,8801,40.0,9110,8802,-78.35,9110,8805,0.9999375,9201,8806,1148291.667,9003,8807,0.0,9003,,,,,,
-15345,"SPCS83 New York Long Island zone (US Survey feet)",9802,8821,40.1,9110,8822,-74.0,9110,8823,41.02,9110,8824,40.4,9110,8826,984250.0,9003,8827,0.0,9003,,,
-15346,"SPCS83 North Carolina zone (US Survey feet)",9802,8821,33.45,9110,8822,-79.0,9110,8823,36.1,9110,8824,34.2,9110,8826,2000000.0,9003,8827,0.0,9003,,,
-15347,"SPCS83 North Dakota North zone (International feet)",9802,8821,47.0,9110,8822,-100.3,9110,8823,48.44,9110,8824,47.26,9110,8826,1968503.937,9002,8827,0.0,9002,,,
-15348,"SPCS83 North Dakota South zone (International feet)",9802,8821,45.4,9110,8822,-100.3,9110,8823,47.29,9110,8824,46.11,9110,8826,1968503.937,9002,8827,0.0,9002,,,
-15349,"SPCS83 Oklahoma North zone (US Survey feet)",9802,8821,35.0,9110,8822,-98.0,9110,8823,36.46,9110,8824,35.34,9110,8826,1968500.0,9003,8827,0.0,9003,,,
-15350,"SPCS83 Oklahoma South zone (US Survey feet)",9802,8821,33.2,9110,8822,-98.0,9110,8823,35.14,9110,8824,33.56,9110,8826,1968500.0,9003,8827,0.0,9003,,,
-15351,"SPCS83 Oregon North zone (International feet)",9802,8821,43.4,9110,8822,-120.3,9110,8823,46.0,9110,8824,44.2,9110,8826,8202099.738,9002,8827,0.0,9002,,,
-15352,"SPCS83 Oregon South zone (International feet)",9802,8821,41.4,9110,8822,-120.3,9110,8823,44.0,9110,8824,42.2,9110,8826,4921259.843,9002,8827,0.0,9002,,,
-15353,"SPCS83 Pennsylvania North zone (US Survey feet)",9802,8821,40.1,9110,8822,-77.45,9110,8823,41.57,9110,8824,40.53,9110,8826,1968500.0,9003,8827,0.0,9003,,,
-15354,"SPCS83 Pennsylvania South zone (US Survey feet)",9802,8821,39.2,9110,8822,-77.45,9110,8823,40.58,9110,8824,39.56,9110,8826,1968500.0,9003,8827,0.0,9003,,,
-15355,"SPCS83 South Carolina zone (International feet)",9802,8821,31.5,9110,8822,-81.0,9110,8823,34.5,9110,8824,32.3,9110,8826,2000000.0,9002,8827,0.0,9002,,,
-15356,"SPCS83 Tennessee zone (US Survey feet)",9802,8821,34.2,9110,8822,-86.0,9110,8823,36.25,9110,8824,35.15,9110,8826,1968500.0,9003,8827,0.0,9003,,,
-15357,"SPCS83 Texas North zone (US Survey feet)",9802,8821,34.0,9110,8822,-101.3,9110,8823,36.11,9110,8824,34.39,9110,8826,656166.667,9003,8827,3280833.333,9003,,,
-15358,"SPCS83 Texas North Central zone (US Survey feet)",9802,8821,31.4,9110,8822,-98.3,9110,8823,33.58,9110,8824,32.08,9110,8826,1968500.0,9003,8827,6561666.667,9003,,,
-15359,"SPCS83 Texas Central zone (US Survey feet)",9802,8821,29.4,9110,8822,-100.2,9110,8823,31.53,9110,8824,30.07,9110,8826,2296583.333,9003,8827,9842500.0,9003,,,
-15360,"SPCS83 Texas South Central zone (US Survey feet)",9802,8821,27.5,9110,8822,-99.0,9110,8823,30.17,9110,8824,28.23,9110,8826,1968500.0,9003,8827,13123333.333,9003,,,
-15361,"SPCS83 Texas South zone (US Survey feet)",9802,8821,25.4,9110,8822,-98.3,9110,8823,27.5,9110,8824,26.1,9110,8826,984250.0,9003,8827,16404166.667,9003,,,
-15362,"SPCS83 Utah North zone (International feet)",9802,8821,40.2,9110,8822,-111.3,9110,8823,41.47,9110,8824,40.43,9110,8826,1640419.948,9002,8827,3280839.895,9002,,,
-15363,"SPCS83 Utah Central zone (International feet)",9802,8821,38.2,9110,8822,-111.3,9110,8823,40.39,9110,8824,39.01,9110,8826,1640419.948,9002,8827,6561679.79,9002,,,
-15364,"SPCS83 Utah South zone (International feet)",9802,8821,36.4,9110,8822,-111.3,9110,8823,38.21,9110,8824,37.13,9110,8826,1640419.948,9002,8827,9842519.685,9002,,,
-15365,"SPCS83 Virginia North zone (US Survey feet)",9802,8821,37.4,9110,8822,-78.3,9110,8823,39.12,9110,8824,38.02,9110,8826,11482916.667,9003,8827,6561666.667,9003,,,
-15366,"SPCS83 Virginia South zone (US Survey feet)",9802,8821,36.2,9110,8822,-78.3,9110,8823,37.58,9110,8824,36.46,9110,8826,11482916.667,9003,8827,3280833.333,9003,,,
-15367,"SPCS83 Washington North zone (US Survey feet)",9802,8821,47.0,9110,8822,-120.5,9110,8823,48.44,9110,8824,47.3,9110,8826,1640416.667,9003,8827,0.0,9003,,,
-15368,"SPCS83 Washington South zone (US Survey feet)",9802,8821,45.2,9110,8822,-120.3,9110,8823,47.2,9110,8824,45.5,9110,8826,1640416.667,9003,8827,0.0,9003,,,
-15369,"SPCS83 Wisconsin North zone (US Survey feet)",9802,8821,45.1,9110,8822,-90.0,9110,8823,46.46,9110,8824,45.34,9110,8826,1968500.0,9003,8827,0.0,9003,,,
-15370,"SPCS83 Wisconsin Central zone (US Survey feet)",9802,8821,43.5,9110,8822,-90.0,9110,8823,45.3,9110,8824,44.15,9110,8826,1968500.0,9003,8827,0.0,9003,,,
-15371,"SPCS83 Wisconsin South zone (US Survey feet)",9802,8821,42.0,9110,8822,-90.0,9110,8823,44.04,9110,8824,42.44,9110,8826,1968500.0,9003,8827,0.0,9003,,,
-15914,"BLM zone 14N (US survey feet)",9807,8801,0.0,9102,8802,-99.0,9102,8805,0.9996,9201,8806,1640416.67,9003,8807,0.0,9003,,,,,,
-15915,"BLM zone 15N (US survey feet)",9807,8801,0.0,9102,8802,-93.0,9102,8805,0.9996,9201,8806,1640416.67,9003,8807,0.0,9003,,,,,,
-15916,"BLM zone 16N (US survey feet)",9807,8801,0.0,9102,8802,-87.0,9102,8805,0.9996,9201,8806,1640416.67,9003,8807,0.0,9003,,,,,,
-15917,"BLM zone 17N (US survey feet)",9807,8801,0.0,9102,8802,-81.0,9102,8805,0.9996,9201,8806,1640416.67,9003,8807,0.0,9003,,,,,,
-16000,"UTM grid system (northern hemisphere)",9824,8801,0.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,8830,-180.0,9102,8831,6.0,9102,,,
-16001,UTM zone 1N,9807,8801,0.0,9102,8802,-177.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16002,UTM zone 2N,9807,8801,0.0,9102,8802,-171.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16003,UTM zone 3N,9807,8801,0.0,9102,8802,-165.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16004,UTM zone 4N,9807,8801,0.0,9102,8802,-159.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16005,UTM zone 5N,9807,8801,0.0,9102,8802,-153.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16006,UTM zone 6N,9807,8801,0.0,9102,8802,-147.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16007,UTM zone 7N,9807,8801,0.0,9102,8802,-141.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16008,UTM zone 8N,9807,8801,0.0,9102,8802,-135.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16009,UTM zone 9N,9807,8801,0.0,9102,8802,-129.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16010,UTM zone 10N,9807,8801,0.0,9102,8802,-123.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16011,UTM zone 11N,9807,8801,0.0,9102,8802,-117.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16012,UTM zone 12N,9807,8801,0.0,9102,8802,-111.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16013,UTM zone 13N,9807,8801,0.0,9102,8802,-105.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16014,UTM zone 14N,9807,8801,0.0,9102,8802,-99.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16015,UTM zone 15N,9807,8801,0.0,9102,8802,-93.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16016,UTM zone 16N,9807,8801,0.0,9102,8802,-87.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16017,UTM zone 17N,9807,8801,0.0,9102,8802,-81.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16018,UTM zone 18N,9807,8801,0.0,9102,8802,-75.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16019,UTM zone 19N,9807,8801,0.0,9102,8802,-69.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16020,UTM zone 20N,9807,8801,0.0,9102,8802,-63.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16021,UTM zone 21N,9807,8801,0.0,9102,8802,-57.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16022,UTM zone 22N,9807,8801,0.0,9102,8802,-51.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16023,UTM zone 23N,9807,8801,0.0,9102,8802,-45.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16024,UTM zone 24N,9807,8801,0.0,9102,8802,-39.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16025,UTM zone 25N,9807,8801,0.0,9102,8802,-33.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16026,UTM zone 26N,9807,8801,0.0,9102,8802,-27.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16027,UTM zone 27N,9807,8801,0.0,9102,8802,-21.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16028,UTM zone 28N,9807,8801,0.0,9102,8802,-15.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16029,UTM zone 29N,9807,8801,0.0,9102,8802,-9.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16030,UTM zone 30N,9807,8801,0.0,9102,8802,-3.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16031,UTM zone 31N,9807,8801,0.0,9102,8802,3.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16032,UTM zone 32N,9807,8801,0.0,9102,8802,9.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16033,UTM zone 33N,9807,8801,0.0,9102,8802,15.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16034,UTM zone 34N,9807,8801,0.0,9102,8802,21.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16035,UTM zone 35N,9807,8801,0.0,9102,8802,27.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16036,UTM zone 36N,9807,8801,0.0,9102,8802,33.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16037,UTM zone 37N,9807,8801,0.0,9102,8802,39.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16038,UTM zone 38N,9807,8801,0.0,9102,8802,45.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16039,UTM zone 39N,9807,8801,0.0,9102,8802,51.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16040,UTM zone 40N,9807,8801,0.0,9102,8802,57.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16041,UTM zone 41N,9807,8801,0.0,9102,8802,63.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16042,UTM zone 42N,9807,8801,0.0,9102,8802,69.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16043,UTM zone 43N,9807,8801,0.0,9102,8802,75.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16044,UTM zone 44N,9807,8801,0.0,9102,8802,81.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16045,UTM zone 45N,9807,8801,0.0,9102,8802,87.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16046,UTM zone 46N,9807,8801,0.0,9102,8802,93.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16047,UTM zone 47N,9807,8801,0.0,9102,8802,99.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16048,UTM zone 48N,9807,8801,0.0,9102,8802,105.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16049,UTM zone 49N,9807,8801,0.0,9102,8802,111.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16050,UTM zone 50N,9807,8801,0.0,9102,8802,117.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16051,UTM zone 51N,9807,8801,0.0,9102,8802,123.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16052,UTM zone 52N,9807,8801,0.0,9102,8802,129.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16053,UTM zone 53N,9807,8801,0.0,9102,8802,135.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16054,UTM zone 54N,9807,8801,0.0,9102,8802,141.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16055,UTM zone 55N,9807,8801,0.0,9102,8802,147.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16056,UTM zone 56N,9807,8801,0.0,9102,8802,153.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16057,UTM zone 57N,9807,8801,0.0,9102,8802,159.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16058,UTM zone 58N,9807,8801,0.0,9102,8802,165.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16059,UTM zone 59N,9807,8801,0.0,9102,8802,171.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16060,UTM zone 60N,9807,8801,0.0,9102,8802,177.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16061,Universal Polar Stereographic North,9810,8801,90.0,9102,8802,0.0,9102,8805,0.994,9201,8806,2000000.0,9001,8807,2000000.0,9001,,,,,,
-16070,3-degree Gauss-Kruger zone 40,9807,8801,0.0,9102,8802,120.0,9102,8805,1.0,9201,8806,40500000.0,9001,8807,0.0,9001,,,,,,
-16071,3-degree Gauss-Kruger zone 41,9807,8801,0.0,9102,8802,123.0,9102,8805,1.0,9201,8806,41500000.0,9001,8807,0.0,9001,,,,,,
-16072,3-degree Gauss-Kruger zone 42,9807,8801,0.0,9102,8802,126.0,9102,8805,1.0,9201,8806,42500000.0,9001,8807,0.0,9001,,,,,,
-16073,3-degree Gauss-Kruger zone 43,9807,8801,0.0,9102,8802,129.0,9102,8805,1.0,9201,8806,43500000.0,9001,8807,0.0,9001,,,,,,
-16074,3-degree Gauss-Kruger zone 44,9807,8801,0.0,9102,8802,132.0,9102,8805,1.0,9201,8806,44500000.0,9001,8807,0.0,9001,,,,,,
-16075,3-degree Gauss-Kruger zone 45,9807,8801,0.0,9102,8802,135.0,9102,8805,1.0,9201,8806,45500000.0,9001,8807,0.0,9001,,,,,,
-16076,3-degree Gauss-Kruger zone 46,9807,8801,0.0,9102,8802,138.0,9102,8805,1.0,9201,8806,46500000.0,9001,8807,0.0,9001,,,,,,
-16077,3-degree Gauss-Kruger zone 47,9807,8801,0.0,9102,8802,141.0,9102,8805,1.0,9201,8806,47500000.0,9001,8807,0.0,9001,,,,,,
-16078,3-degree Gauss-Kruger zone 48,9807,8801,0.0,9102,8802,144.0,9102,8805,1.0,9201,8806,48500000.0,9001,8807,0.0,9001,,,,,,
-16079,3-degree Gauss-Kruger zone 49,9807,8801,0.0,9102,8802,147.0,9102,8805,1.0,9201,8806,49500000.0,9001,8807,0.0,9001,,,,,,
-16080,3-degree Gauss-Kruger zone 50,9807,8801,0.0,9102,8802,150.0,9102,8805,1.0,9201,8806,50500000.0,9001,8807,0.0,9001,,,,,,
-16081,3-degree Gauss-Kruger zone 51,9807,8801,0.0,9102,8802,153.0,9102,8805,1.0,9201,8806,51500000.0,9001,8807,0.0,9001,,,,,,
-16082,3-degree Gauss-Kruger zone 52,9807,8801,0.0,9102,8802,156.0,9102,8805,1.0,9201,8806,52500000.0,9001,8807,0.0,9001,,,,,,
-16083,3-degree Gauss-Kruger zone 53,9807,8801,0.0,9102,8802,159.0,9102,8805,1.0,9201,8806,53500000.0,9001,8807,0.0,9001,,,,,,
-16084,3-degree Gauss-Kruger zone 54,9807,8801,0.0,9102,8802,162.0,9102,8805,1.0,9201,8806,54500000.0,9001,8807,0.0,9001,,,,,,
-16085,3-degree Gauss-Kruger zone 55,9807,8801,0.0,9102,8802,165.0,9102,8805,1.0,9201,8806,55500000.0,9001,8807,0.0,9001,,,,,,
-16086,3-degree Gauss-Kruger zone 56,9807,8801,0.0,9102,8802,168.0,9102,8805,1.0,9201,8806,56500000.0,9001,8807,0.0,9001,,,,,,
-16087,3-degree Gauss-Kruger zone 57,9807,8801,0.0,9102,8802,171.0,9102,8805,1.0,9201,8806,57500000.0,9001,8807,0.0,9001,,,,,,
-16088,3-degree Gauss-Kruger zone 58,9807,8801,0.0,9102,8802,174.0,9102,8805,1.0,9201,8806,58500000.0,9001,8807,0.0,9001,,,,,,
-16089,3-degree Gauss-Kruger zone 59,9807,8801,0.0,9102,8802,177.0,9102,8805,1.0,9201,8806,59500000.0,9001,8807,0.0,9001,,,,,,
-16090,3-degree Gauss-Kruger zone 60,9807,8801,0.0,9102,8802,180.0,9102,8805,1.0,9201,8806,60000000.0,9001,8807,0.0,9001,,,,,,
-16091,3-degree Gauss-Kruger zone 61,9807,8801,0.0,9102,8802,-177.0,9102,8805,1.0,9201,8806,61500000.0,9001,8807,0.0,9001,,,,,,
-16092,3-degree Gauss-Kruger zone 62,9807,8801,0.0,9102,8802,-174.0,9102,8805,1.0,9201,8806,62500000.0,9001,8807,0.0,9001,,,,,,
-16093,3-degree Gauss-Kruger zone 63,9807,8801,0.0,9102,8802,-171.0,9102,8805,1.0,9201,8806,63500000.0,9001,8807,0.0,9001,,,,,,
-16094,3-degree Gauss-Kruger zone 64,9807,8801,0.0,9102,8802,-168.0,9102,8805,1.0,9201,8806,64500000.0,9001,8807,0.0,9001,,,,,,
-16100,"UTM grid system (southern hemisphere)",9824,8801,0.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,8830,-180.0,9102,8831,6.0,9102,,,
-16101,UTM zone 1S,9807,8801,0.0,9102,8802,-177.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16102,UTM zone 2S,9807,8801,0.0,9102,8802,-171.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16103,UTM zone 3S,9807,8801,0.0,9102,8802,-165.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16104,UTM zone 4S,9807,8801,0.0,9102,8802,-159.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16105,UTM zone 5S,9807,8801,0.0,9102,8802,-153.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16106,UTM zone 6S,9807,8801,0.0,9102,8802,-147.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16107,UTM zone 7S,9807,8801,0.0,9102,8802,-141.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16108,UTM zone 8S,9807,8801,0.0,9102,8802,-135.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16109,UTM zone 9S,9807,8801,0.0,9102,8802,-129.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16110,UTM zone 10S,9807,8801,0.0,9102,8802,-123.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16111,UTM zone 11S,9807,8801,0.0,9102,8802,-117.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16112,UTM zone 12S,9807,8801,0.0,9102,8802,-111.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16113,UTM zone 13S,9807,8801,0.0,9102,8802,-105.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16114,UTM zone 14S,9807,8801,0.0,9102,8802,-99.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16115,UTM zone 15S,9807,8801,0.0,9102,8802,-93.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16116,UTM zone 16S,9807,8801,0.0,9102,8802,-87.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16117,UTM zone 17S,9807,8801,0.0,9102,8802,-81.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16118,UTM zone 18S,9807,8801,0.0,9102,8802,-75.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16119,UTM zone 19S,9807,8801,0.0,9102,8802,-69.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16120,UTM zone 20S,9807,8801,0.0,9102,8802,-63.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16121,UTM zone 21S,9807,8801,0.0,9102,8802,-57.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16122,UTM zone 22S,9807,8801,0.0,9102,8802,-51.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16123,UTM zone 23S,9807,8801,0.0,9102,8802,-45.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16124,UTM zone 24S,9807,8801,0.0,9102,8802,-39.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16125,UTM zone 25S,9807,8801,0.0,9102,8802,-33.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16126,UTM zone 26S,9807,8801,0.0,9102,8802,-27.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16127,UTM zone 27S,9807,8801,0.0,9102,8802,-21.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16128,UTM zone 28S,9807,8801,0.0,9102,8802,-15.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16129,UTM zone 29S,9807,8801,0.0,9102,8802,-9.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16130,UTM zone 30S,9807,8801,0.0,9102,8802,-3.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16131,UTM zone 31S,9807,8801,0.0,9102,8802,3.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16132,UTM zone 32S,9807,8801,0.0,9102,8802,9.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16133,UTM zone 33S,9807,8801,0.0,9102,8802,15.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16134,UTM zone 34S,9807,8801,0.0,9102,8802,21.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16135,UTM zone 35S,9807,8801,0.0,9102,8802,27.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16136,UTM zone 36S,9807,8801,0.0,9102,8802,33.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16137,UTM zone 37S,9807,8801,0.0,9102,8802,39.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16138,UTM zone 38S,9807,8801,0.0,9102,8802,45.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16139,UTM zone 39S,9807,8801,0.0,9102,8802,51.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16140,UTM zone 40S,9807,8801,0.0,9102,8802,57.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16141,UTM zone 41S,9807,8801,0.0,9102,8802,63.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16142,UTM zone 42S,9807,8801,0.0,9102,8802,69.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16143,UTM zone 43S,9807,8801,0.0,9102,8802,75.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16144,UTM zone 44S,9807,8801,0.0,9102,8802,81.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16145,UTM zone 45S,9807,8801,0.0,9102,8802,87.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16146,UTM zone 46S,9807,8801,0.0,9102,8802,93.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16147,UTM zone 47S,9807,8801,0.0,9102,8802,99.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16148,UTM zone 48S,9807,8801,0.0,9102,8802,105.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16149,UTM zone 49S,9807,8801,0.0,9102,8802,111.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16150,UTM zone 50S,9807,8801,0.0,9102,8802,117.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16151,UTM zone 51S,9807,8801,0.0,9102,8802,123.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16152,UTM zone 52S,9807,8801,0.0,9102,8802,129.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16153,UTM zone 53S,9807,8801,0.0,9102,8802,135.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16154,UTM zone 54S,9807,8801,0.0,9102,8802,141.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16155,UTM zone 55S,9807,8801,0.0,9102,8802,147.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16156,UTM zone 56S,9807,8801,0.0,9102,8802,153.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16157,UTM zone 57S,9807,8801,0.0,9102,8802,159.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16158,UTM zone 58S,9807,8801,0.0,9102,8802,165.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16159,UTM zone 59S,9807,8801,0.0,9102,8802,171.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16160,UTM zone 60S,9807,8801,0.0,9102,8802,177.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16161,Universal Polar Stereographic South,9810,8801,-90.0,9102,8802,0.0,9102,8805,0.994,9201,8806,2000000.0,9001,8807,2000000.0,9001,,,,,,
-16170,3-degree Gauss-Kruger CM 120E,9807,8801,0.0,9102,8802,120.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16171,3-degree Gauss-Kruger CM 123E,9807,8801,0.0,9102,8802,123.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16172,3-degree Gauss-Kruger CM 126E,9807,8801,0.0,9102,8802,126.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16173,3-degree Gauss-Kruger CM 129E,9807,8801,0.0,9102,8802,129.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16174,3-degree Gauss-Kruger CM 132E,9807,8801,0.0,9102,8802,132.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16175,3-degree Gauss-Kruger CM 135E,9807,8801,0.0,9102,8802,135.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16176,3-degree Gauss-Kruger CM 138E,9807,8801,0.0,9102,8802,138.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16177,3-degree Gauss-Kruger CM 141E,9807,8801,0.0,9102,8802,141.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16178,3-degree Gauss-Kruger CM 144E,9807,8801,0.0,9102,8802,144.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16179,3-degree Gauss-Kruger CM 147E,9807,8801,0.0,9102,8802,147.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16180,3-degree Gauss-Kruger CM 150E,9807,8801,0.0,9102,8802,150.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16181,3-degree Gauss-Kruger CM 153E,9807,8801,0.0,9102,8802,153.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16182,3-degree Gauss-Kruger CM 156E,9807,8801,0.0,9102,8802,156.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16183,3-degree Gauss-Kruger CM 159E,9807,8801,0.0,9102,8802,159.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16184,3-degree Gauss-Kruger CM 162E,9807,8801,0.0,9102,8802,162.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16185,3-degree Gauss-Kruger CM 165E,9807,8801,0.0,9102,8802,165.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16186,3-degree Gauss-Kruger CM 168E,9807,8801,0.0,9102,8802,168.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16187,3-degree Gauss-Kruger CM 171E,9807,8801,0.0,9102,8802,171.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16188,3-degree Gauss-Kruger CM 174E,9807,8801,0.0,9102,8802,174.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16189,3-degree Gauss-Kruger CM 177E,9807,8801,0.0,9102,8802,177.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16190,3-degree Gauss-Kruger CM 180,9807,8801,0.0,9102,8802,180.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16191,3-degree Gauss-Kruger CM 177W,9807,8801,0.0,9102,8802,-177.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16192,3-degree Gauss-Kruger CM 174W,9807,8801,0.0,9102,8802,-174.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16193,3-degree Gauss-Kruger CM 171W,9807,8801,0.0,9102,8802,-171.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16194,3-degree Gauss-Kruger CM 168W,9807,8801,0.0,9102,8802,-168.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16201,6-degree Gauss-Kruger zone 1,9807,8801,0.0,9102,8802,3.0,9102,8805,1.0,9201,8806,1500000.0,9001,8807,0.0,9001,,,,,,
-16202,6-degree Gauss-Kruger zone 2,9807,8801,0.0,9102,8802,9.0,9102,8805,1.0,9201,8806,2500000.0,9001,8807,0.0,9001,,,,,,
-16203,6-degree Gauss-Kruger zone 3,9807,8801,0.0,9102,8802,15.0,9102,8805,1.0,9201,8806,3500000.0,9001,8807,0.0,9001,,,,,,
-16204,6-degree Gauss-Kruger zone 4,9807,8801,0.0,9102,8802,21.0,9102,8805,1.0,9201,8806,4500000.0,9001,8807,0.0,9001,,,,,,
-16205,6-degree Gauss-Kruger zone 5,9807,8801,0.0,9102,8802,27.0,9102,8805,1.0,9201,8806,5500000.0,9001,8807,0.0,9001,,,,,,
-16206,6-degree Gauss-Kruger zone 6,9807,8801,0.0,9102,8802,33.0,9102,8805,1.0,9201,8806,6500000.0,9001,8807,0.0,9001,,,,,,
-16207,6-degree Gauss-Kruger zone 7,9807,8801,0.0,9102,8802,39.0,9102,8805,1.0,9201,8806,7500000.0,9001,8807,0.0,9001,,,,,,
-16208,6-degree Gauss-Kruger zone 8,9807,8801,0.0,9102,8802,45.0,9102,8805,1.0,9201,8806,8500000.0,9001,8807,0.0,9001,,,,,,
-16209,6-degree Gauss-Kruger zone 9,9807,8801,0.0,9102,8802,51.0,9102,8805,1.0,9201,8806,9500000.0,9001,8807,0.0,9001,,,,,,
-16210,6-degree Gauss-Kruger zone 10,9807,8801,0.0,9102,8802,57.0,9102,8805,1.0,9201,8806,10500000.0,9001,8807,0.0,9001,,,,,,
-16211,6-degree Gauss-Kruger zone 11,9807,8801,0.0,9102,8802,63.0,9102,8805,1.0,9201,8806,11500000.0,9001,8807,0.0,9001,,,,,,
-16212,6-degree Gauss-Kruger zone 12,9807,8801,0.0,9102,8802,69.0,9102,8805,1.0,9201,8806,12500000.0,9001,8807,0.0,9001,,,,,,
-16213,6-degree Gauss-Kruger zone 13,9807,8801,0.0,9102,8802,75.0,9102,8805,1.0,9201,8806,13500000.0,9001,8807,0.0,9001,,,,,,
-16214,6-degree Gauss-Kruger zone 14,9807,8801,0.0,9102,8802,81.0,9102,8805,1.0,9201,8806,14500000.0,9001,8807,0.0,9001,,,,,,
-16215,6-degree Gauss-Kruger zone 15,9807,8801,0.0,9102,8802,87.0,9102,8805,1.0,9201,8806,15500000.0,9001,8807,0.0,9001,,,,,,
-16216,6-degree Gauss-Kruger zone 16,9807,8801,0.0,9102,8802,93.0,9102,8805,1.0,9201,8806,16500000.0,9001,8807,0.0,9001,,,,,,
-16217,6-degree Gauss-Kruger zone 17,9807,8801,0.0,9102,8802,99.0,9102,8805,1.0,9201,8806,17500000.0,9001,8807,0.0,9001,,,,,,
-16218,6-degree Gauss-Kruger zone 18,9807,8801,0.0,9102,8802,105.0,9102,8805,1.0,9201,8806,18500000.0,9001,8807,0.0,9001,,,,,,
-16219,6-degree Gauss-Kruger zone 19,9807,8801,0.0,9102,8802,111.0,9102,8805,1.0,9201,8806,19500000.0,9001,8807,0.0,9001,,,,,,
-16220,6-degree Gauss-Kruger zone 20,9807,8801,0.0,9102,8802,117.0,9102,8805,1.0,9201,8806,20500000.0,9001,8807,0.0,9001,,,,,,
-16221,6-degree Gauss-Kruger zone 21,9807,8801,0.0,9102,8802,123.0,9102,8805,1.0,9201,8806,21500000.0,9001,8807,0.0,9001,,,,,,
-16222,6-degree Gauss-Kruger zone 22,9807,8801,0.0,9102,8802,129.0,9102,8805,1.0,9201,8806,22500000.0,9001,8807,0.0,9001,,,,,,
-16223,6-degree Gauss-Kruger zone 23,9807,8801,0.0,9102,8802,135.0,9102,8805,1.0,9201,8806,23500000.0,9001,8807,0.0,9001,,,,,,
-16224,6-degree Gauss-Kruger zone 24,9807,8801,0.0,9102,8802,141.0,9102,8805,1.0,9201,8806,24500000.0,9001,8807,0.0,9001,,,,,,
-16225,6-degree Gauss-Kruger zone 25,9807,8801,0.0,9102,8802,147.0,9102,8805,1.0,9201,8806,25500000.0,9001,8807,0.0,9001,,,,,,
-16226,6-degree Gauss-Kruger zone 26,9807,8801,0.0,9102,8802,153.0,9102,8805,1.0,9201,8806,26500000.0,9001,8807,0.0,9001,,,,,,
-16227,6-degree Gauss-Kruger zone 27,9807,8801,0.0,9102,8802,159.0,9102,8805,1.0,9201,8806,27500000.0,9001,8807,0.0,9001,,,,,,
-16228,6-degree Gauss-Kruger zone 28,9807,8801,0.0,9102,8802,165.0,9102,8805,1.0,9201,8806,28500000.0,9001,8807,0.0,9001,,,,,,
-16229,6-degree Gauss-Kruger zone 29,9807,8801,0.0,9102,8802,171.0,9102,8805,1.0,9201,8806,29500000.0,9001,8807,0.0,9001,,,,,,
-16230,6-degree Gauss-Kruger zone 30,9807,8801,0.0,9102,8802,177.0,9102,8805,1.0,9201,8806,30500000.0,9001,8807,0.0,9001,,,,,,
-16231,6-degree Gauss-Kruger zone 31,9807,8801,0.0,9102,8802,-177.0,9102,8805,1.0,9201,8806,31500000.0,9001,8807,0.0,9001,,,,,,
-16232,6-degree Gauss-Kruger zone 32,9807,8801,0.0,9102,8802,-171.0,9102,8805,1.0,9201,8806,32500000.0,9001,8807,0.0,9001,,,,,,
-16233,6-degree Gauss-Kruger zone 33,9807,8801,0.0,9102,8802,-165.0,9102,8805,1.0,9201,8806,33500000.0,9001,8807,0.0,9001,,,,,,
-16234,6-degree Gauss-Kruger zone 34,9807,8801,0.0,9102,8802,-159.0,9102,8805,1.0,9201,8806,34500000.0,9001,8807,0.0,9001,,,,,,
-16235,6-degree Gauss-Kruger zone 35,9807,8801,0.0,9102,8802,-153.0,9102,8805,1.0,9201,8806,35500000.0,9001,8807,0.0,9001,,,,,,
-16236,6-degree Gauss-Kruger zone 36,9807,8801,0.0,9102,8802,-147.0,9102,8805,1.0,9201,8806,36500000.0,9001,8807,0.0,9001,,,,,,
-16237,6-degree Gauss-Kruger zone 37,9807,8801,0.0,9102,8802,-141.0,9102,8805,1.0,9201,8806,37500000.0,9001,8807,0.0,9001,,,,,,
-16238,6-degree Gauss-Kruger zone 38,9807,8801,0.0,9102,8802,-135.0,9102,8805,1.0,9201,8806,38500000.0,9001,8807,0.0,9001,,,,,,
-16239,6-degree Gauss-Kruger zone 39,9807,8801,0.0,9102,8802,-129.0,9102,8805,1.0,9201,8806,39500000.0,9001,8807,0.0,9001,,,,,,
-16240,6-degree Gauss-Kruger zone 40,9807,8801,0.0,9102,8802,-123.0,9102,8805,1.0,9201,8806,40500000.0,9001,8807,0.0,9001,,,,,,
-16241,6-degree Gauss-Kruger zone 41,9807,8801,0.0,9102,8802,-117.0,9102,8805,1.0,9201,8806,41500000.0,9001,8807,0.0,9001,,,,,,
-16242,6-degree Gauss-Kruger zone 42,9807,8801,0.0,9102,8802,-111.0,9102,8805,1.0,9201,8806,42500000.0,9001,8807,0.0,9001,,,,,,
-16243,6-degree Gauss-Kruger zone 43,9807,8801,0.0,9102,8802,-105.0,9102,8805,1.0,9201,8806,43500000.0,9001,8807,0.0,9001,,,,,,
-16244,6-degree Gauss-Kruger zone 44,9807,8801,0.0,9102,8802,-99.0,9102,8805,1.0,9201,8806,44500000.0,9001,8807,0.0,9001,,,,,,
-16245,6-degree Gauss-Kruger zone 45,9807,8801,0.0,9102,8802,-93.0,9102,8805,1.0,9201,8806,45500000.0,9001,8807,0.0,9001,,,,,,
-16246,6-degree Gauss-Kruger zone 46,9807,8801,0.0,9102,8802,-87.0,9102,8805,1.0,9201,8806,46500000.0,9001,8807,0.0,9001,,,,,,
-16247,6-degree Gauss-Kruger zone 47,9807,8801,0.0,9102,8802,-81.0,9102,8805,1.0,9201,8806,47500000.0,9001,8807,0.0,9001,,,,,,
-16248,6-degree Gauss-Kruger zone 48,9807,8801,0.0,9102,8802,-75.0,9102,8805,1.0,9201,8806,48500000.0,9001,8807,0.0,9001,,,,,,
-16249,6-degree Gauss-Kruger zone 49,9807,8801,0.0,9102,8802,-69.0,9102,8805,1.0,9201,8806,49500000.0,9001,8807,0.0,9001,,,,,,
-16250,6-degree Gauss-Kruger zone 50,9807,8801,0.0,9102,8802,-63.0,9102,8805,1.0,9201,8806,50500000.0,9001,8807,0.0,9001,,,,,,
-16251,6-degree Gauss-Kruger zone 51,9807,8801,0.0,9102,8802,-57.0,9102,8805,1.0,9201,8806,51500000.0,9001,8807,0.0,9001,,,,,,
-16252,6-degree Gauss-Kruger zone 52,9807,8801,0.0,9102,8802,-51.0,9102,8805,1.0,9201,8806,52500000.0,9001,8807,0.0,9001,,,,,,
-16253,6-degree Gauss-Kruger zone 53,9807,8801,0.0,9102,8802,-45.0,9102,8805,1.0,9201,8806,53500000.0,9001,8807,0.0,9001,,,,,,
-16254,6-degree Gauss-Kruger zone 54,9807,8801,0.0,9102,8802,-39.0,9102,8805,1.0,9201,8806,54500000.0,9001,8807,0.0,9001,,,,,,
-16255,6-degree Gauss-Kruger zone 55,9807,8801,0.0,9102,8802,-33.0,9102,8805,1.0,9201,8806,55500000.0,9001,8807,0.0,9001,,,,,,
-16256,6-degree Gauss-Kruger zone 56,9807,8801,0.0,9102,8802,-27.0,9102,8805,1.0,9201,8806,56500000.0,9001,8807,0.0,9001,,,,,,
-16257,6-degree Gauss-Kruger zone 57,9807,8801,0.0,9102,8802,-21.0,9102,8805,1.0,9201,8806,57500000.0,9001,8807,0.0,9001,,,,,,
-16258,6-degree Gauss-Kruger zone 58,9807,8801,0.0,9102,8802,-15.0,9102,8805,1.0,9201,8806,58500000.0,9001,8807,0.0,9001,,,,,,
-16259,6-degree Gauss-Kruger zone 59,9807,8801,0.0,9102,8802,-9.0,9102,8805,1.0,9201,8806,59500000.0,9001,8807,0.0,9001,,,,,,
-16260,6-degree Gauss-Kruger zone 60,9807,8801,0.0,9102,8802,-3.0,9102,8805,1.0,9201,8806,60500000.0,9001,8807,0.0,9001,,,,,,
-16261,3-degree Gauss-Kruger zone 1,9807,8801,0.0,9102,8802,3.0,9102,8805,1.0,9201,8806,1500000.0,9001,8807,0.0,9001,,,,,,
-16262,3-degree Gauss-Kruger zone 2,9807,8801,0.0,9102,8802,6.0,9102,8805,1.0,9201,8806,2500000.0,9001,8807,0.0,9001,,,,,,
-16263,3-degree Gauss-Kruger zone 3,9807,8801,0.0,9102,8802,9.0,9102,8805,1.0,9201,8806,3500000.0,9001,8807,0.0,9001,,,,,,
-16264,3-degree Gauss-Kruger zone 4,9807,8801,0.0,9102,8802,12.0,9102,8805,1.0,9201,8806,4500000.0,9001,8807,0.0,9001,,,,,,
-16265,3-degree Gauss-Kruger zone 5,9807,8801,0.0,9102,8802,15.0,9102,8805,1.0,9201,8806,5500000.0,9001,8807,0.0,9001,,,,,,
-16266,3-degree Gauss-Kruger zone 6,9807,8801,0.0,9102,8802,18.0,9102,8805,1.0,9201,8806,6500000.0,9001,8807,0.0,9001,,,,,,
-16267,3-degree Gauss-Kruger zone 7,9807,8801,0.0,9102,8802,21.0,9102,8805,1.0,9201,8806,7500000.0,9001,8807,0.0,9001,,,,,,
-16268,3-degree Gauss-Kruger zone 8,9807,8801,0.0,9102,8802,24.0,9102,8805,1.0,9201,8806,8500000.0,9001,8807,0.0,9001,,,,,,
-16269,3-degree Gauss-Kruger zone 9,9807,8801,0.0,9102,8802,27.0,9102,8805,1.0,9201,8806,9500000.0,9001,8807,0.0,9001,,,,,,
-16270,3-degree Gauss-Kruger zone 10,9807,8801,0.0,9102,8802,30.0,9102,8805,1.0,9201,8806,10500000.0,9001,8807,0.0,9001,,,,,,
-16271,3-degree Gauss-Kruger zone 11,9807,8801,0.0,9102,8802,33.0,9102,8805,1.0,9201,8806,11500000.0,9001,8807,0.0,9001,,,,,,
-16272,3-degree Gauss-Kruger zone 12,9807,8801,0.0,9102,8802,36.0,9102,8805,1.0,9201,8806,12500000.0,9001,8807,0.0,9001,,,,,,
-16273,3-degree Gauss-Kruger zone 13,9807,8801,0.0,9102,8802,39.0,9102,8805,1.0,9201,8806,13500000.0,9001,8807,0.0,9001,,,,,,
-16274,3-degree Gauss-Kruger zone 14,9807,8801,0.0,9102,8802,42.0,9102,8805,1.0,9201,8806,14500000.0,9001,8807,0.0,9001,,,,,,
-16275,3-degree Gauss-Kruger zone 15,9807,8801,0.0,9102,8802,45.0,9102,8805,1.0,9201,8806,15500000.0,9001,8807,0.0,9001,,,,,,
-16276,3-degree Gauss-Kruger zone 16,9807,8801,0.0,9102,8802,48.0,9102,8805,1.0,9201,8806,16500000.0,9001,8807,0.0,9001,,,,,,
-16277,3-degree Gauss-Kruger zone 17,9807,8801,0.0,9102,8802,51.0,9102,8805,1.0,9201,8806,17500000.0,9001,8807,0.0,9001,,,,,,
-16278,3-degree Gauss-Kruger zone 18,9807,8801,0.0,9102,8802,54.0,9102,8805,1.0,9201,8806,18500000.0,9001,8807,0.0,9001,,,,,,
-16279,3-degree Gauss-Kruger zone 19,9807,8801,0.0,9102,8802,57.0,9102,8805,1.0,9201,8806,19500000.0,9001,8807,0.0,9001,,,,,,
-16280,3-degree Gauss-Kruger zone 20,9807,8801,0.0,9102,8802,60.0,9102,8805,1.0,9201,8806,20500000.0,9001,8807,0.0,9001,,,,,,
-16281,3-degree Gauss-Kruger zone 21,9807,8801,0.0,9102,8802,63.0,9102,8805,1.0,9201,8806,21500000.0,9001,8807,0.0,9001,,,,,,
-16282,3-degree Gauss-Kruger zone 22,9807,8801,0.0,9102,8802,66.0,9102,8805,1.0,9201,8806,22500000.0,9001,8807,0.0,9001,,,,,,
-16283,3-degree Gauss-Kruger zone 23,9807,8801,0.0,9102,8802,69.0,9102,8805,1.0,9201,8806,23500000.0,9001,8807,0.0,9001,,,,,,
-16284,3-degree Gauss-Kruger zone 24,9807,8801,0.0,9102,8802,72.0,9102,8805,1.0,9201,8806,24500000.0,9001,8807,0.0,9001,,,,,,
-16285,3-degree Gauss-Kruger zone 25,9807,8801,0.0,9102,8802,75.0,9102,8805,1.0,9201,8806,25500000.0,9001,8807,0.0,9001,,,,,,
-16286,3-degree Gauss-Kruger zone 26,9807,8801,0.0,9102,8802,78.0,9102,8805,1.0,9201,8806,26500000.0,9001,8807,0.0,9001,,,,,,
-16287,3-degree Gauss-Kruger zone 27,9807,8801,0.0,9102,8802,81.0,9102,8805,1.0,9201,8806,27500000.0,9001,8807,0.0,9001,,,,,,
-16288,3-degree Gauss-Kruger zone 28,9807,8801,0.0,9102,8802,84.0,9102,8805,1.0,9201,8806,28500000.0,9001,8807,0.0,9001,,,,,,
-16289,3-degree Gauss-Kruger zone 29,9807,8801,0.0,9102,8802,87.0,9102,8805,1.0,9201,8806,29500000.0,9001,8807,0.0,9001,,,,,,
-16290,3-degree Gauss-Kruger zone 30,9807,8801,0.0,9102,8802,90.0,9102,8805,1.0,9201,8806,30500000.0,9001,8807,0.0,9001,,,,,,
-16291,3-degree Gauss-Kruger zone 31,9807,8801,0.0,9102,8802,93.0,9102,8805,1.0,9201,8806,31500000.0,9001,8807,0.0,9001,,,,,,
-16292,3-degree Gauss-Kruger zone 32,9807,8801,0.0,9102,8802,96.0,9102,8805,1.0,9201,8806,32500000.0,9001,8807,0.0,9001,,,,,,
-16293,3-degree Gauss-Kruger zone 33,9807,8801,0.0,9102,8802,99.0,9102,8805,1.0,9201,8806,33500000.0,9001,8807,0.0,9001,,,,,,
-16294,3-degree Gauss-Kruger zone 34,9807,8801,0.0,9102,8802,102.0,9102,8805,1.0,9201,8806,34500000.0,9001,8807,0.0,9001,,,,,,
-16295,3-degree Gauss-Kruger zone 35,9807,8801,0.0,9102,8802,105.0,9102,8805,1.0,9201,8806,35500000.0,9001,8807,0.0,9001,,,,,,
-16296,3-degree Gauss-Kruger zone 36,9807,8801,0.0,9102,8802,108.0,9102,8805,1.0,9201,8806,36500000.0,9001,8807,0.0,9001,,,,,,
-16297,3-degree Gauss-Kruger zone 37,9807,8801,0.0,9102,8802,111.0,9102,8805,1.0,9201,8806,37500000.0,9001,8807,0.0,9001,,,,,,
-16298,3-degree Gauss-Kruger zone 38,9807,8801,0.0,9102,8802,114.0,9102,8805,1.0,9201,8806,38500000.0,9001,8807,0.0,9001,,,,,,
-16299,3-degree Gauss-Kruger zone 39,9807,8801,0.0,9102,8802,117.0,9102,8805,1.0,9201,8806,39500000.0,9001,8807,0.0,9001,,,,,,
-16301,6-degree Gauss-Kruger CM 3E,9807,8801,0.0,9102,8802,3.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16302,6-degree Gauss-Kruger CM 9E,9807,8801,0.0,9102,8802,9.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16303,6-degree Gauss-Kruger CM 15E,9807,8801,0.0,9102,8802,15.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16304,6-degree Gauss-Kruger CM 21E,9807,8801,0.0,9102,8802,21.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16305,6-degree Gauss-Kruger CM 27E,9807,8801,0.0,9102,8802,27.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16306,6-degree Gauss-Kruger CM 33E,9807,8801,0.0,9102,8802,33.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16307,6-degree Gauss-Kruger CM 39E,9807,8801,0.0,9102,8802,39.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16308,6-degree Gauss-Kruger CM 45E,9807,8801,0.0,9102,8802,45.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16309,6-degree Gauss-Kruger CM 51E,9807,8801,0.0,9102,8802,51.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16310,6-degree Gauss-Kruger CM 57E,9807,8801,0.0,9102,8802,57.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16311,6-degree Gauss-Kruger CM 63E,9807,8801,0.0,9102,8802,63.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16312,6-degree Gauss-Kruger CM 69E,9807,8801,0.0,9102,8802,69.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16313,6-degree Gauss-Kruger CM 75E,9807,8801,0.0,9102,8802,75.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16314,6-degree Gauss-Kruger CM 81E,9807,8801,0.0,9102,8802,81.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16315,6-degree Gauss-Kruger CM 87E,9807,8801,0.0,9102,8802,87.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16316,6-degree Gauss-Kruger CM 93E,9807,8801,0.0,9102,8802,93.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16317,6-degree Gauss-Kruger CM 99E,9807,8801,0.0,9102,8802,99.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16318,6-degree Gauss-Kruger CM 105E,9807,8801,0.0,9102,8802,105.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16319,6-degree Gauss-Kruger CM 111E,9807,8801,0.0,9102,8802,111.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16320,6-degree Gauss-Kruger CM 117E,9807,8801,0.0,9102,8802,117.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16321,6-degree Gauss-Kruger CM 123E,9807,8801,0.0,9102,8802,123.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16322,6-degree Gauss-Kruger CM 129E,9807,8801,0.0,9102,8802,129.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16323,6-degree Gauss-Kruger CM 135E,9807,8801,0.0,9102,8802,135.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16324,6-degree Gauss-Kruger CM 141E,9807,8801,0.0,9102,8802,141.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16325,6-degree Gauss-Kruger CM 147E,9807,8801,0.0,9102,8802,147.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16326,6-degree Gauss-Kruger CM 153E,9807,8801,0.0,9102,8802,153.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16327,6-degree Gauss-Kruger CM 159E,9807,8801,0.0,9102,8802,159.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16328,6-degree Gauss-Kruger CM 165E,9807,8801,0.0,9102,8802,165.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16329,6-degree Gauss-Kruger CM 171E,9807,8801,0.0,9102,8802,171.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16330,6-degree Gauss-Kruger CM 177E,9807,8801,0.0,9102,8802,177.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16331,6-degree Gauss-Kruger CM 177W,9807,8801,0.0,9102,8802,-177.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16332,6-degree Gauss-Kruger CM 171W,9807,8801,0.0,9102,8802,-171.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16333,6-degree Gauss-Kruger CM 165W,9807,8801,0.0,9102,8802,-165.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16334,6-degree Gauss-Kruger CM 159W,9807,8801,0.0,9102,8802,-159.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16335,6-degree Gauss-Kruger CM 153W,9807,8801,0.0,9102,8802,-153.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16336,6-degree Gauss-Kruger CM 147W,9807,8801,0.0,9102,8802,-147.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16337,6-degree Gauss-Kruger CM 141W,9807,8801,0.0,9102,8802,-141.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16338,6-degree Gauss-Kruger CM 135W,9807,8801,0.0,9102,8802,-135.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16339,6-degree Gauss-Kruger CM 129W,9807,8801,0.0,9102,8802,-129.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16340,6-degree Gauss-Kruger CM 123W,9807,8801,0.0,9102,8802,-123.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16341,6-degree Gauss-Kruger CM 117W,9807,8801,0.0,9102,8802,-117.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16342,6-degree Gauss-Kruger CM 111W,9807,8801,0.0,9102,8802,-111.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16343,6-degree Gauss-Kruger CM 105W,9807,8801,0.0,9102,8802,-105.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16344,6-degree Gauss-Kruger CM 99W,9807,8801,0.0,9102,8802,-99.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16345,6-degree Gauss-Kruger CM 93W,9807,8801,0.0,9102,8802,-93.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16346,6-degree Gauss-Kruger CM 87W,9807,8801,0.0,9102,8802,-87.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16347,6-degree Gauss-Kruger CM 81W,9807,8801,0.0,9102,8802,-81.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16348,6-degree Gauss-Kruger CM 75W,9807,8801,0.0,9102,8802,-75.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16349,6-degree Gauss-Kruger CM 69W,9807,8801,0.0,9102,8802,-69.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16350,6-degree Gauss-Kruger CM 63W,9807,8801,0.0,9102,8802,-63.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16351,6-degree Gauss-Kruger CM 57W,9807,8801,0.0,9102,8802,-57.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16352,6-degree Gauss-Kruger CM 51W,9807,8801,0.0,9102,8802,-51.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16353,6-degree Gauss-Kruger CM 45W,9807,8801,0.0,9102,8802,-45.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16354,6-degree Gauss-Kruger CM 39W,9807,8801,0.0,9102,8802,-39.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16355,6-degree Gauss-Kruger CM 33W,9807,8801,0.0,9102,8802,-33.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16356,6-degree Gauss-Kruger CM 27W,9807,8801,0.0,9102,8802,-27.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16357,6-degree Gauss-Kruger CM 21W,9807,8801,0.0,9102,8802,-21.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16358,6-degree Gauss-Kruger CM 15W,9807,8801,0.0,9102,8802,-15.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16359,6-degree Gauss-Kruger CM 9W,9807,8801,0.0,9102,8802,-9.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16360,6-degree Gauss-Kruger CM 3W,9807,8801,0.0,9102,8802,-3.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16361,3-degree Gauss-Kruger CM 3E,9807,8801,0.0,9102,8802,3.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16362,3-degree Gauss-Kruger CM 6E,9807,8801,0.0,9102,8802,6.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16363,3-degree Gauss-Kruger CM 9E,9807,8801,0.0,9102,8802,9.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16364,3-degree Gauss-Kruger CM 12E,9807,8801,0.0,9102,8802,12.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16365,3-degree Gauss-Kruger CM 15E,9807,8801,0.0,9102,8802,15.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16366,3-degree Gauss-Kruger CM 18E,9807,8801,0.0,9102,8802,18.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16367,3-degree Gauss-Kruger CM 21E,9807,8801,0.0,9102,8802,21.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16368,3-degree Gauss-Kruger CM 24E,9807,8801,0.0,9102,8802,24.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16369,3-degree Gauss-Kruger CM 27E,9807,8801,0.0,9102,8802,27.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16370,3-degree Gauss-Kruger CM 30E,9807,8801,0.0,9102,8802,30.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16371,3-degree Gauss-Kruger CM 33E,9807,8801,0.0,9102,8802,33.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16372,3-degree Gauss-Kruger CM 36E,9807,8801,0.0,9102,8802,36.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16373,3-degree Gauss-Kruger CM 39E,9807,8801,0.0,9102,8802,39.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16374,3-degree Gauss-Kruger CM 42E,9807,8801,0.0,9102,8802,42.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16375,3-degree Gauss-Kruger CM 45E,9807,8801,0.0,9102,8802,45.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16376,3-degree Gauss-Kruger CM 48E,9807,8801,0.0,9102,8802,48.0,9102,8805,1.0,9001,8806,500000.0,9001,8807,0.0,9201,,,,,,
-16377,3-degree Gauss-Kruger CM 51E,9807,8801,0.0,9102,8802,51.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16378,3-degree Gauss-Kruger CM 54E,9807,8801,0.0,9102,8802,54.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16379,3-degree Gauss-Kruger CM 57E,9807,8801,0.0,9102,8802,57.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16380,3-degree Gauss-Kruger CM 60E,9807,8801,0.0,9102,8802,60.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16381,3-degree Gauss-Kruger CM 63E,9807,8801,0.0,9102,8802,63.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16382,3-degree Gauss-Kruger CM 66E,9807,8801,0.0,9102,8802,66.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16383,3-degree Gauss-Kruger CM 69E,9807,8801,0.0,9102,8802,69.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16384,3-degree Gauss-Kruger CM 72E,9807,8801,0.0,9102,8802,72.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16385,3-degree Gauss-Kruger CM 75E,9807,8801,0.0,9102,8802,75.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16386,3-degree Gauss-Kruger CM 78E,9807,8801,0.0,9102,8802,78.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16387,3-degree Gauss-Kruger CM 81E,9807,8801,0.0,9102,8802,81.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16388,3-degree Gauss-Kruger CM 84E,9807,8801,0.0,9102,8802,84.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16389,3-degree Gauss-Kruger CM 87E,9807,8801,0.0,9102,8802,87.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16390,3-degree Gauss-Kruger CM 90E,9807,8801,0.0,9102,8802,90.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16391,3-degree Gauss-Kruger CM 93E,9807,8801,0.0,9102,8802,93.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16392,3-degree Gauss-Kruger CM 96E,9807,8801,0.0,9102,8802,96.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16393,3-degree Gauss-Kruger CM 99E,9807,8801,0.0,9102,8802,99.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16394,3-degree Gauss-Kruger CM 102E,9807,8801,0.0,9102,8802,102.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16395,3-degree Gauss-Kruger CM 105E,9807,8801,0.0,9102,8802,105.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16396,3-degree Gauss-Kruger CM 108E,9807,8801,0.0,9102,8802,108.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16397,3-degree Gauss-Kruger CM 111E,9807,8801,0.0,9102,8802,111.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16398,3-degree Gauss-Kruger CM 114E,9807,8801,0.0,9102,8802,114.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16399,3-degree Gauss-Kruger CM 117E,9807,8801,0.0,9102,8802,117.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16400,TM 0 N,9807,8801,0.0,9102,8802,0.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16405,TM 5 NE,9807,8801,0.0,9102,8802,5.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16406,TM 6 NE,9807,8801,0.0,9102,8802,6.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16411,TM 11 NE,9807,8801,0.0,9102,8802,11.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16412,TM 12 NE,9807,8801,0.0,9102,8802,12.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16413,TM 13 NE,9807,8801,0.0,9102,8802,13.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16430,TM 30 NE,9807,8801,0.0,9102,8802,30.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16506,TM 106 NE,9807,8801,0.0,9102,8802,106.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16586,GK 106 NE,9807,8801,0.0,9102,8802,106.0,9102,8805,1.0,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-16611,TM 11.30 SE,9807,8801,0.0,9110,8802,11.3,9110,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16612,TM 12 SE,9807,8801,0.0,9102,8802,12.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16636,TM 36 SE,9807,8801,0.0,9102,8802,36.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16709,TM 109 SE,9807,8801,0.0,9102,8802,109.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16716,TM 116 SE,9807,8801,0.0,9102,8802,116.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-16732,TM 132 SE,9807,8801,0.0,9102,8802,132.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-17001,TM 1 NW,9807,8801,0.0,9102,8802,-1.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-17005,TM 5 NW,9807,8801,0.0,9102,8802,-5.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-17054,TM 54 NW,9807,8801,0.0,9102,8802,-54.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-17348,Map Grid of Australia zone 48,9807,8801,0.0,9102,8802,105.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-17349,Map Grid of Australia zone 49,9807,8801,0.0,9102,8802,111.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-17350,Map Grid of Australia zone 50,9807,8801,0.0,9102,8802,117.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-17351,Map Grid of Australia zone 51,9807,8801,0.0,9102,8802,123.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-17352,Map Grid of Australia zone 52,9807,8801,0.0,9102,8802,129.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-17353,Map Grid of Australia zone 53,9807,8801,0.0,9102,8802,135.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-17354,Map Grid of Australia zone 54,9807,8801,0.0,9102,8802,141.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-17355,Map Grid of Australia zone 55,9807,8801,0.0,9102,8802,147.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-17356,Map Grid of Australia zone 56,9807,8801,0.0,9102,8802,153.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-17357,Map Grid of Australia zone 57,9807,8801,0.0,9102,8802,159.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-17358,Map Grid of Australia zone 58,9807,8801,0.0,9102,8802,165.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-17448,Australian Map Grid zone 48,9807,8801,0.0,9102,8802,105.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-17449,Australian Map Grid zone 49,9807,8801,0.0,9102,8802,111.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-17450,Australian Map Grid zone 50,9807,8801,0.0,9102,8802,117.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-17451,Australian Map Grid zone 51,9807,8801,0.0,9102,8802,123.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-17452,Australian Map Grid zone 52,9807,8801,0.0,9102,8802,129.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-17453,Australian Map Grid zone 53,9807,8801,0.0,9102,8802,135.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-17454,Australian Map Grid zone 54,9807,8801,0.0,9102,8802,141.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-17455,Australian Map Grid zone 55,9807,8801,0.0,9102,8802,147.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-17456,Australian Map Grid zone 56,9807,8801,0.0,9102,8802,153.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-17457,Australian Map Grid zone 57,9807,8801,0.0,9102,8802,159.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-17458,Australian Map Grid zone 58,9807,8801,0.0,9102,8802,165.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,10000000.0,9001,,,,,,
-17515,South African Survey Grid zone 15,9808,8801,0.0,9102,8802,15.0,9102,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-17517,South African Survey Grid zone 17,9808,8801,0.0,9102,8802,17.0,9102,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-17519,South African Survey Grid zone 19,9808,8801,0.0,9102,8802,19.0,9102,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-17521,South African Survey Grid zone 21,9808,8801,0.0,9102,8802,21.0,9102,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-17523,South African Survey Grid zone 23,9808,8801,0.0,9102,8802,23.0,9102,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-17525,South African Survey Grid zone 25,9808,8801,0.0,9102,8802,25.0,9102,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-17527,South African Survey Grid zone 27,9808,8801,0.0,9102,8802,27.0,9102,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-17529,South African Survey Grid zone 29,9808,8801,0.0,9102,8802,29.0,9102,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-17531,South African Survey Grid zone 31,9808,8801,0.0,9102,8802,31.0,9102,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-17533,South African Survey Grid zone 33,9808,8801,0.0,9102,8802,33.0,9102,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-17611,South West African Survey Grid zone 11,9808,8801,-22.0,9102,8802,11.0,9102,8805,1.0,9201,8806,0.0,9031,8807,0.0,9031,,,,,,
-17613,South West African Survey Grid zone 13,9808,8801,-22.0,9102,8802,13.0,9102,8805,1.0,9201,8806,0.0,9031,8807,0.0,9031,,,,,,
-17615,South West African Survey Grid zone 15,9808,8801,-22.0,9102,8802,15.0,9102,8805,1.0,9201,8806,0.0,9031,8807,0.0,9031,,,,,,
-17617,South West African Survey Grid zone 17,9808,8801,-22.0,9102,8802,17.0,9102,8805,1.0,9201,8806,0.0,9031,8807,0.0,9031,,,,,,
-17619,South West African Survey Grid zone 19,9808,8801,-22.0,9102,8802,19.0,9102,8805,1.0,9201,8806,0.0,9031,8807,0.0,9031,,,,,,
-17621,South West African Survey Grid zone 21,9808,8801,-22.0,9102,8802,21.0,9102,8805,1.0,9201,8806,0.0,9031,8807,0.0,9031,,,,,,
-17623,South West African Survey Grid zone 23,9808,8801,-22.0,9102,8802,23.0,9102,8805,1.0,9201,8806,0.0,9031,8807,0.0,9031,,,,,,
-17625,South West African Survey Grid zone 25,9808,8801,-22.0,9102,8802,25.0,9102,8805,1.0,9201,8806,0.0,9031,8807,0.0,9031,,,,,,
-17700,MTM Quebec zone 2,9807,8801,0.0,9110,8802,-55.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-17701,MTM zone 1,9807,8801,0.0,9102,8802,-53.0,9102,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-17702,MTM Newfoundland zone 2,9807,8801,0.0,9102,8802,-56.0,9102,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-17703,MTM zone 3,9807,8801,0.0,9110,8802,-58.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-17704,MTM zone 4,9807,8801,0.0,9110,8802,-61.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-17705,MTM zone 5,9807,8801,0.0,9110,8802,-64.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-17706,MTM zone 6,9807,8801,0.0,9110,8802,-67.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-17707,MTM zone 7,9807,8801,0.0,9110,8802,-70.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-17708,MTM zone 8,9807,8801,0.0,9110,8802,-73.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-17709,MTM zone 9,9807,8801,0.0,9110,8802,-76.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-17710,MTM zone 10,9807,8801,0.0,9110,8802,-79.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-17711,MTM zone 11,9807,8801,0.0,9110,8802,-82.3,9110,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-17712,MTM zone 12,9807,8801,0.0,9102,8802,-81.0,9102,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-17713,MTM zone 13,9807,8801,0.0,9102,8802,-84.0,9102,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-17714,MTM zone 14,9807,8801,0.0,9102,8802,-87.0,9102,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-17715,MTM zone 15,9807,8801,0.0,9102,8802,-90.0,9102,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-17716,MTM zone 16,9807,8801,0.0,9102,8802,-93.0,9102,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-17717,MTM zone 17,9807,8801,0.0,9102,8802,-96.0,9102,8805,0.9999,9201,8806,304800.0,9001,8807,0.0,9001,,,,,,
-17794,MTM Nova Scotia zone 4,9807,8801,0.0,9110,8802,-61.3,9110,8805,0.9999,9201,8806,4500000.0,9001,8807,0.0,9001,,,,,,
-17795,MTM Nova Scotia zone 5,9807,8801,0.0,9110,8802,-64.3,9110,8805,0.9999,9201,8806,5500000.0,9001,8807,0.0,9001,,,,,,
-17801,Japan Plane Rectangular CS zone I,9807,8801,33.0,9110,8802,129.3,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-17802,Japan Plane Rectangular CS zone II,9807,8801,33.0,9110,8802,131.0,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-17803,Japan Plane Rectangular CS zone III,9807,8801,36.0,9110,8802,132.1,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-17804,Japan Plane Rectangular CS zone IV,9807,8801,33.0,9110,8802,133.3,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-17805,Japan Plane Rectangular CS zone V,9807,8801,36.0,9110,8802,134.2,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-17806,Japan Plane Rectangular CS zone VI,9807,8801,36.0,9110,8802,136.0,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-17807,Japan Plane Rectangular CS zone VII,9807,8801,36.0,9110,8802,137.1,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-17808,Japan Plane Rectangular CS zone VIII,9807,8801,36.0,9110,8802,138.3,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-17809,Japan Plane Rectangular CS zone IX,9807,8801,36.0,9110,8802,139.5,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-17810,Japan Plane Rectangular CS zone X,9807,8801,40.0,9110,8802,140.5,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-17811,Japan Plane Rectangular CS zone XI,9807,8801,44.0,9110,8802,140.15,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-17812,Japan Plane Rectangular CS zone XII,9807,8801,44.0,9110,8802,142.15,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-17813,Japan Plane Rectangular CS zone XIII,9807,8801,44.0,9110,8802,144.15,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-17814,Japan Plane Rectangular CS zone XIV,9807,8801,26.0,9110,8802,142.0,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-17815,Japan Plane Rectangular CS zone XV,9807,8801,26.0,9110,8802,127.3,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-17816,Japan Plane Rectangular CS zone XVI,9807,8801,26.0,9110,8802,124.0,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-17817,Japan Plane Rectangular CS zone XVII,9807,8801,26.0,9110,8802,131.0,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-17818,Japan Plane Rectangular CS zone XVIII,9807,8801,20.0,9110,8802,136.0,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-17819,Japan Plane Rectangular CS zone XIX,9807,8801,26.0,9110,8802,154.0,9110,8805,0.9999,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-17901,Mount Eden Circuit,9807,8801,-36.5247515,9110,8802,174.45516217,9110,8805,0.9999,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-17902,Bay of Plenty Circuit,9807,8801,-37.45404993,9110,8802,176.27583101,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-17903,Poverty Bay Circuit,9807,8801,-38.372893,9110,8802,177.53082906,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-17904,Hawkes Bay Circuit,9807,8801,-39.39033455,9110,8802,176.40252499,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-17905,Taranaki Circuit,9807,8801,-39.08087299,9110,8802,174.13408423,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-17906,Tuhirangi Circuit,9807,8801,-39.30448934,9110,8802,175.38241325,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-17907,Wanganui Circuit,9807,8801,-40.14310097,9110,8802,175.29171586,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-17908,Wairarapa Circuit,9807,8801,-40.55319175,9110,8802,175.38504588,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-17909,Wellington Circuit,9807,8801,-41.18047507,9110,8802,174.46358432,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-17910,Collingwood Circuit,9807,8801,-40.42531326,9110,8802,172.40193674,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-17911,Nelson Circuit,9807,8801,-41.1628361,9110,8802,173.17575405,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-17912,Karamea Circuit,9807,8801,-41.17236815,9110,8802,172.06325015,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-17913,Buller Circuit,9807,8801,-41.48388903,9110,8802,171.34525362,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-17914,Grey Circuit,9807,8801,-42.20012994,9110,8802,171.32591767,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-17915,Amuri Circuit,9807,8801,-42.41208197,9110,8802,173.00364802,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-17916,Marlborough Circuit,9807,8801,-41.3240152,9110,8802,173.48074668,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-17917,Hokitika Circuit,9807,8801,-42.53107605,9110,8802,170.58479766,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-17918,Okarito Circuit,9807,8801,-43.06364613,9110,8802,170.1539333,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-17919,Jacksons Bay Circuit,9807,8801,-43.58400904,9110,8802,168.36225612,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-17920,Mount Pleasant Circuit,9807,8801,-43.35262953,9110,8802,172.43378969,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-17921,Gawler Circuit,9807,8801,-43.44553616,9110,8802,171.21386945,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-17922,Timaru Circuit,9807,8801,-44.24079933,9110,8802,171.0326103,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-17923,Lindis Peak Circuit,9807,8801,-44.44069647,9110,8802,169.28039183,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-17924,Mount Nicholas Circuit,9807,8801,-45.07584493,9110,8802,168.23551083,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-17925,Mount York Circuit,9807,8801,-45.33494142,9110,8802,167.44199024,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-17926,Observation Point Circuit,9807,8801,-45.48583078,9110,8802,170.37429426,9110,8805,1.0,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-17927,North Taieri Circuit,9807,8801,-45.51414481,9110,8802,170.16573208,9110,8805,0.99996,9201,8806,300000.0,9001,8807,700000.0,9001,,,,,,
-17928,Bluff Circuit,9807,8801,-46.36000346,9110,8802,168.20343392,9110,8805,1.0,9201,8806,300002.66,9001,8807,699999.58,9001,,,,,,
-17931,Mount Eden Circuit 2000,9807,8801,-36.5247,9110,8802,174.4551,9110,8805,0.9999,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-17932,Bay of Plenty Circuit 2000,9807,8801,-37.454,9110,8802,176.2758,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-17933,Poverty Bay Circuit 2000,9807,8801,-38.3728,9110,8802,177.5308,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-17934,Hawkes Bay Circuit 2000,9807,8801,-39.3903,9110,8802,176.4025,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-17935,Taranaki Circuit 2000,9807,8801,-39.0808,9110,8802,174.134,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-17936,Tuhirangi Circuit 2000,9807,8801,-39.3044,9110,8802,175.3824,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-17937,Wanganui Circuit 2000,9807,8801,-40.1431,9110,8802,175.2917,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-17938,Wairarapa Circuit 2000,9807,8801,-40.5531,9110,8802,175.385,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-17939,Wellington Circuit 2000,9807,8801,-41.1804,9110,8802,174.4635,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-17940,Collingwood Circuit 2000,9807,8801,-40.4253,9110,8802,172.4019,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-17941,Nelson Circuit 2000,9807,8801,-41.1628,9110,8802,173.1757,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-17942,Karamea Circuit 2000,9807,8801,-41.1723,9110,8802,172.0632,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-17943,Buller Circuit 2000,9807,8801,-41.4838,9110,8802,171.3452,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-17944,Grey Circuit 2000,9807,8801,-42.2001,9110,8802,171.3259,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-17945,Amuri Circuit 2000,9807,8801,-42.412,9110,8802,173.0036,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-17946,Marlborough Circuit 2000,9807,8801,-41.324,9110,8802,173.4807,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-17947,Hokitika Circuit 2000,9807,8801,-42.531,9110,8802,170.5847,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-17948,Okarito Circuit 2000,9807,8801,-43.0636,9110,8802,170.1539,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-17949,Jacksons Bay Circuit 2000,9807,8801,-43.584,9110,8802,168.3622,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-17950,Mount Pleasant Circuit 2000,9807,8801,-43.3526,9110,8802,172.4337,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-17951,Gawler Circuit 2000,9807,8801,-43.4455,9110,8802,171.2138,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-17952,Timaru Circuit 2000,9807,8801,-44.2407,9110,8802,171.0326,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-17953,Lindis Peak Circuit 2000,9807,8801,-44.4406,9110,8802,169.2803,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-17954,Mount Nicholas Circuit 2000,9807,8801,-45.0758,9110,8802,168.2355,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-17955,Mount York Circuit 2000,9807,8801,-45.3349,9110,8802,167.4419,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-17956,Observation Point Circuit 2000,9807,8801,-45.4858,9110,8802,170.3742,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-17957,North Taieri Circuit 2000,9807,8801,-45.5141,9110,8802,170.1657,9110,8805,0.99996,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-17958,Bluff Circuit 2000,9807,8801,-46.36,9110,8802,168.2034,9110,8805,1.0,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-18011,"Nord Algerie (ancienne)",9801,8801,40.0,9105,8802,3.0,9105,8805,0.999625544,9201,8806,500000.0,9001,8807,300000.0,9001,,,,,,
-18012,"Sud Algerie (ancienne)",9801,8801,37.0,9105,8802,3.0,9105,8805,0.999625769,9201,8806,500000.0,9001,8807,300000.0,9001,,,,,,
-18021,Nord Algerie,9801,8801,40.0,9105,8802,3.0,9105,8805,0.999625544,9201,8806,500135.0,9001,8807,300090.0,9001,,,,,,
-18022,Sud Algerie,9801,8801,37.0,9105,8802,3.0,9105,8805,0.999625769,9201,8806,500135.0,9001,8807,300090.0,9001,,,,,,
-18031,Argentina zone 1,9807,8801,-90.0,9102,8802,-72.0,9102,8805,1.0,9201,8806,1500000.0,9001,8807,0.0,9001,,,,,,
-18032,Argentina zone 2,9807,8801,-90.0,9102,8802,-69.0,9102,8805,1.0,9201,8806,2500000.0,9001,8807,0.0,9001,,,,,,
-18033,Argentina zone 3,9807,8801,-90.0,9102,8802,-66.0,9102,8805,1.0,9201,8806,3500000.0,9001,8807,0.0,9001,,,,,,
-18034,Argentina zone 4,9807,8801,-90.0,9102,8802,-63.0,9102,8805,1.0,9201,8806,4500000.0,9001,8807,0.0,9001,,,,,,
-18035,Argentina zone 5,9807,8801,-90.0,9102,8802,-60.0,9102,8805,1.0,9201,8806,5500000.0,9001,8807,0.0,9001,,,,,,
-18036,Argentina zone 6,9807,8801,-90.0,9102,8802,-57.0,9102,8805,1.0,9201,8806,6500000.0,9001,8807,0.0,9001,,,,,,
-18037,Argentina zone 7,9807,8801,-90.0,9102,8802,-54.0,9102,8805,1.0,9201,8806,7500000.0,9001,8807,0.0,9001,,,,,,
-18041,Austria West Zone,9807,8801,0.0,9102,8802,28.0,9102,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-18042,Austria Central Zone,9807,8801,0.0,9102,8802,31.0,9102,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-18043,Austria East Zone,9807,8801,0.0,9102,8802,34.0,9102,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-18044,Austria M28,9807,8801,0.0,9110,8802,10.2,9110,8805,1.0,9201,8806,150000.0,9001,8807,0.0,9001,,,,,,
-18045,Austria M31,9807,8801,0.0,9110,8802,13.2,9110,8805,1.0,9201,8806,450000.0,9001,8807,0.0,9001,,,,,,
-18046,Austria M34,9807,8801,0.0,9110,8802,16.2,9110,8805,1.0,9201,8806,750000.0,9001,8807,0.0,9001,,,,,,
-18051,Colombia West zone,9807,8801,4.355657,9110,8802,-77.04513,9110,8805,1.0,9201,8806,1000000.0,9001,8807,1000000.0,9001,,,,,,
-18052,Colombia Bogota zone,9807,8801,4.355657,9110,8802,-74.04513,9110,8805,1.0,9201,8806,1000000.0,9001,8807,1000000.0,9001,,,,,,
-18053,Colombia East Central zone,9807,8801,4.355657,9110,8802,-71.04513,9110,8805,1.0,9201,8806,1000000.0,9001,8807,1000000.0,9001,,,,,,
-18054,Colombia East zone,9807,8801,4.355657,9110,8802,-68.04513,9110,8805,1.0,9201,8806,1000000.0,9001,8807,1000000.0,9001,,,,,,
-18061,Cuba Norte,9801,8801,22.21,9110,8802,-81.0,9110,8805,0.99993602,9201,8806,500000.0,9001,8807,280296.016,9001,,,,,,
-18062,Cuba Sur,9801,8801,20.43,9110,8802,-76.5,9110,8805,0.99994848,9201,8806,500000.0,9001,8807,229126.939,9001,,,,,,
-18071,Egypt Blue Belt,9807,8801,30.0,9102,8802,35.0,9102,8805,1.0,9201,8806,300000.0,9001,8807,1100000.0,9001,,,,,,
-18072,Egypt Red Belt,9807,8801,30.0,9102,8802,31.0,9102,8805,1.0,9201,8806,615000.0,9001,8807,810000.0,9001,,,,,,
-18073,Egypt Purple Belt,9807,8801,30.0,9102,8802,27.0,9102,8805,1.0,9201,8806,700000.0,9001,8807,200000.0,9001,,,,,,
-18074,Egypt Extended Purple Belt,9807,8801,30.0,9102,8802,27.0,9102,8805,1.0,9201,8806,700000.0,9001,8807,1200000.0,9001,,,,,,
-18081,Lambert zone I,9801,8801,55.0,9105,8802,0.0,9105,8805,0.999877341,9201,8806,600000.0,9001,8807,1200000.0,9001,,,,,,
-18082,Lambert zone II,9801,8801,52.0,9105,8802,0.0,9105,8805,0.99987742,9201,8806,600000.0,9001,8807,2200000.0,9001,,,,,,
-18083,Lambert zone III,9801,8801,49.0,9105,8802,0.0,9105,8805,0.999877499,9201,8806,600000.0,9001,8807,3200000.0,9001,,,,,,
-18084,Lambert zone IV,9801,8801,46.85,9105,8802,0.0,9105,8805,0.99994471,9201,8806,234.358,9001,8807,4185861.369,9001,,,,,,
-18085,Lambert-93,9802,8821,46.3,9110,8822,3.0,9110,8823,49.0,9110,8824,44.0,9110,8826,700000.0,9001,8827,6600000.0,9001,,,
-18086,France EuroLambert,9801,8801,46.48,9110,8802,2.2014025,9110,8805,0.99987742,9201,8806,600000.0,9001,8807,2200000.0,9001,,,,,,
-18091,Lambert Nord France,9801,8801,55.0,9105,8802,0.0,9105,8805,0.999877341,9201,8806,600000.0,9001,8807,200000.0,9001,,,,,,
-18092,Lambert Centre France,9801,8801,52.0,9105,8802,0.0,9105,8805,0.99987742,9201,8806,600000.0,9001,8807,200000.0,9001,,,,,,
-18093,Lambert Sud France,9801,8801,49.0,9105,8802,0.0,9105,8805,0.999877499,9201,8806,600000.0,9001,8807,200000.0,9001,,,,,,
-18094,Lambert Corse,9801,8801,46.85,9105,8802,0.0,9105,8805,0.99994471,9201,8806,234.358,9001,8807,185861.369,9001,,,,,,
-18110,India zone 0,9801,8801,39.3,9110,8802,68.0,9110,8805,0.99846154,9201,8806,2355500.0,9084,8807,2590000.0,9084,,,,,,
-18111,India zone I,9801,8801,32.3,9110,8802,68.0,9110,8805,0.99878641,9201,8806,3000000.0,9084,8807,1000000.0,9084,,,,,,
-18112,India zone IIa,9801,8801,26.0,9102,8802,74.0,9102,8805,0.99878641,9201,8806,3000000.0,9084,8807,1000000.0,9084,,,,,,
-18113,India zone IIb,9801,8801,26.0,9102,8802,90.0,9102,8805,0.99878641,9201,8806,3000000.0,9084,8807,1000000.0,9084,,,,,,
-18114,India zone IIIa,9801,8801,19.0,9102,8802,80.0,9102,8805,0.99878641,9201,8806,3000000.0,9084,8807,1000000.0,9084,,,,,,
-18115,India zone IIIb,9801,8801,19.0,9102,8802,100.0,9102,8805,0.99878641,9201,8806,3000000.0,9084,8807,1000000.0,9084,,,,,,
-18116,India zone IVa,9801,8801,12.0,9102,8802,80.0,9102,8805,0.99878641,9201,8806,3000000.0,9084,8807,1000000.0,9084,,,,,,
-18117,India zone IVb,9801,8801,12.0,9102,8802,100.0,9102,8805,0.99878641,9201,8806,3000000.0,9084,8807,1000000.0,9084,,,,,,
-18121,Italy zone 1,9807,8801,0.0,9102,8802,9.0,9102,8805,0.9996,9201,8806,1500000.0,9001,8807,0.0,9001,,,,,,
-18122,Italy zone 2,9807,8801,0.0,9102,8802,15.0,9102,8805,0.9996,9201,8806,2520000.0,9001,8807,0.0,9001,,,,,,
-18131,Nord Maroc,9801,8801,37.0,9105,8802,-6.0,9105,8805,0.999625769,9201,8806,500000.0,9001,8807,300000.0,9001,,,,,,
-18132,Sud Maroc,9801,8801,33.0,9105,8802,-6.0,9105,8805,0.999615596,9201,8806,500000.0,9001,8807,300000.0,9001,,,,,,
-18133,Sahara,9801,8801,29.0,9105,8802,-6.0,9105,8805,0.9996,9201,8806,1200000.0,9001,8807,400000.0,9001,,,,,,
-18141,New Zealand North Island National Grid,9807,8801,-39.0,9110,8802,175.3,9110,8805,1.0,9201,8806,300000.0,9040,8807,400000.0,9040,,,,,,
-18142,New Zealand South Island National Grid,9807,8801,-44.0,9110,8802,171.3,9110,8805,1.0,9201,8806,500000.0,9040,8807,500000.0,9040,,,,,,
-18151,Nigeria West Belt,9807,8801,4.0,9110,8802,4.3,9110,8805,0.99975,9201,8806,230738.26,9001,8807,0.0,9001,,,,,,
-18152,Nigeria Mid Belt,9807,8801,4.0,9110,8802,8.3,9110,8805,0.99975,9201,8806,670553.98,9001,8807,0.0,9001,,,,,,
-18153,Nigeria East Belt,9807,8801,4.0,9110,8802,12.3,9110,8805,0.99975,9201,8806,1110369.7,9001,8807,0.0,9001,,,,,,
-18161,Peru west zone,9807,8801,-6.0,9110,8802,-80.3,9110,8805,0.99983008,9201,8806,222000.0,9001,8807,1426834.743,9001,,,,,,
-18162,Peru central zone,9807,8801,-9.3,9110,8802,-76.0,9110,8805,0.99932994,9201,8806,720000.0,9001,8807,1039979.159,9001,,,,,,
-18163,Peru east zone,9807,8801,-9.3,9110,8802,-70.3,9110,8805,0.99952992,9201,8806,1324000.0,9001,8807,1040084.558,9001,,,,,,
-18171,Philippines zone I,9807,8801,0.0,9102,8802,117.0,9102,8805,0.99995,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-18172,Philippines zone II,9807,8801,0.0,9102,8802,119.0,9102,8805,0.99995,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-18173,Philippines zone III,9807,8801,0.0,9102,8802,121.0,9102,8805,0.99995,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-18174,Philippines zone IV,9807,8801,0.0,9102,8802,123.0,9102,8805,0.99995,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-18175,Philippines zone V,9807,8801,0.0,9102,8802,125.0,9102,8805,0.99995,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-18181,Nord Tunisie,9801,8801,40.0,9105,8802,11.0,9105,8805,0.999625544,9201,8806,500000.0,9001,8807,300000.0,9001,,,,,,
-18182,Sud Tunisie,9801,8801,37.0,9105,8802,11.0,9105,8805,0.999625769,9201,8806,500000.0,9001,8807,300000.0,9001,,,,,,
-18191,Finland zone 1,9807,8801,0.0,9102,8802,21.0,9102,8805,1.0,9201,8806,1500000.0,9001,8807,0.0,9001,,,,,,
-18192,Finland zone 2,9807,8801,0.0,9102,8802,24.0,9102,8805,1.0,9201,8806,2500000.0,9001,8807,0.0,9001,,,,,,
-18193,Finland Uniform Coordinate System,9807,8801,0.0,9102,8802,27.0,9102,8805,1.0,9201,8806,3500000.0,9001,8807,0.0,9001,,,,,,
-18194,Finland zone 4,9807,8801,0.0,9102,8802,30.0,9102,8805,1.0,9201,8806,4500000.0,9001,8807,0.0,9001,,,,,,
-18201,Palestine Grid,9806,8801,31.4402749,9110,8802,35.124349,9110,8806,170251.555,9001,8807,126867.909,9001,,,,,,,,,
-18202,Palestine Belt,9807,8801,31.4402749,9110,8802,35.124349,9110,8805,1.0,9201,8806,170251.555,9001,8807,1126867.909,9001,,,,,,
-18203,Israeli CS,9806,8801,31.4402749,9110,8802,35.124349,9110,8806,170251.555,9001,8807,1126867.909,9001,,,,,,,,,
-18204,Israeli TM,9807,8801,31.4403817,9110,8802,35.1216261,9110,8805,1.0000067,9201,8806,219529.584,9001,8807,626907.39,9001,,,,,,
-18211,Guatemala Norte,9801,8801,16.49,9110,8802,-90.2,9110,8805,0.99992226,9201,8806,500000.0,9001,8807,292209.579,9001,,,,,,
-18212,Guatemala Sur,9801,8801,14.54,9110,8802,-90.2,9110,8805,0.99989906,9201,8806,500000.0,9001,8807,325992.681,9001,,,,,,
-18221,NGO zone I,9807,8801,58.0,9110,8802,-4.4,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-18222,NGO zone II,9807,8801,58.0,9110,8802,-2.2,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-18223,NGO zone III,9807,8801,58.0,9110,8802,0.0,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-18224,NGO zone IV,9807,8801,58.0,9110,8802,2.3,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-18225,NGO zone V,9807,8801,58.0,9110,8802,6.1,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-18226,NGO zone VI,9807,8801,58.0,9110,8802,10.1,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-18227,NGO zone VII,9807,8801,58.0,9110,8802,14.1,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-18228,NGO zone VIII,9807,8801,58.0,9110,8802,18.2,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-18231,"India zone I (1975 metres)",9801,8801,32.3,9110,8802,68.0,9110,8805,0.99878641,9201,8806,2743195.5,9001,8807,914398.5,9001,,,,,,
-18232,"India zone IIa (1975 metres)",9801,8801,26.0,9102,8802,74.0,9102,8805,0.99878641,9201,8806,2743195.5,9001,8807,914398.5,9001,,,,,,
-18233,"India zone IIIa (1975 metres)",9801,8801,19.0,9102,8802,80.0,9102,8805,0.99878641,9201,8806,2743195.5,9001,8807,914398.5,9001,,,,,,
-18234,"India zone IVa (1975 metres)",9801,8801,12.0,9102,8802,80.0,9102,8805,0.99878641,9201,8806,2743195.5,9001,8807,914398.5,9001,,,,,,
-18235,"India zone IIb (1975 metres)",9801,8801,26.0,9102,8802,90.0,9102,8805,0.99878641,9201,8806,2743195.5,9001,8807,914398.5,9001,,,,,,
-18236,"India zone I (1962 metres)",9801,8801,32.3,9110,8802,68.0,9110,8805,0.99878641,9201,8806,2743196.4,9001,8807,914398.8,9001,,,,,,
-18237,"India zone IIa (1962 metres)",9801,8801,26.0,9102,8802,74.0,9102,8805,0.99878641,9201,8806,2743196.4,9001,8807,914398.8,9001,,,,,,
-18238,"India zone IIb (1937 metres)",9801,8801,26.0,9102,8802,90.0,9102,8805,0.99878641,9201,8806,2743185.69,9001,8807,914395.23,9001,,,,,,
-18240,Libya zone 5,9807,8801,0.0,9102,8802,9.0,9102,8805,0.9999,9201,8806,200000.0,9001,8807,0.0,9001,,,,,,
-18241,Libya zone 6,9807,8801,0.0,9102,8802,11.0,9102,8805,0.9999,9201,8806,200000.0,9001,8807,0.0,9001,,,,,,
-18242,Libya zone 7,9807,8801,0.0,9102,8802,13.0,9102,8805,0.9999,9201,8806,200000.0,9001,8807,0.0,9001,,,,,,
-18243,Libya zone 8,9807,8801,0.0,9102,8802,15.0,9102,8805,0.9999,9201,8806,200000.0,9001,8807,0.0,9001,,,,,,
-18244,Libya zone 9,9807,8801,0.0,9102,8802,17.0,9102,8805,0.9999,9201,8806,200000.0,9001,8807,0.0,9001,,,,,,
-18245,Libya zone 10,9807,8801,0.0,9102,8802,19.0,9102,8805,0.9999,9201,8806,200000.0,9001,8807,0.0,9001,,,,,,
-18246,Libya zone 11,9807,8801,0.0,9102,8802,21.0,9102,8805,0.9999,9201,8806,200000.0,9001,8807,0.0,9001,,,,,,
-18247,Libya zone 12,9807,8801,0.0,9102,8802,23.0,9102,8805,0.9999,9201,8806,200000.0,9001,8807,0.0,9001,,,,,,
-18248,Libya zone 13,9807,8801,0.0,9102,8802,25.0,9102,8805,0.9999,9201,8806,200000.0,9001,8807,0.0,9001,,,,,,
-18251,Korea East Belt,9807,8801,38.0,9102,8802,129.0,9102,8805,1.0,9201,8806,200000.0,9001,8807,500000.0,9001,,,,,,
-18252,Korea Central Belt,9807,8801,38.0,9102,8802,127.0,9102,8805,1.0,9201,8806,200000.0,9001,8807,500000.0,9001,,,,,,
-18253,Korea West Belt,9807,8801,38.0,9102,8802,125.0,9102,8805,1.0,9201,8806,200000.0,9001,8807,500000.0,9001,,,,,,
-18260,"Maracaibo Grid (M1)",9801,8801,10.1,9110,8802,-71.3620224,9110,8805,1.0,9201,8806,0.0,9001,8807,-52684.972,9001,,,,,,
-18261,Maracaibo Grid,9801,8801,10.1,9110,8802,-71.3620224,9110,8805,1.0,9201,8806,200000.0,9001,8807,147315.028,9001,,,,,,
-18262,"Maracaibo Grid (M3)",9801,8801,10.1,9110,8802,-71.3620224,9110,8805,1.0,9201,8806,500000.0,9001,8807,447315.028,9001,,,,,,
-18263,Maracaibo La Rosa Grid,9801,8801,10.1,9110,8802,-71.3620224,9110,8805,1.0,9201,8806,-17044.0,9001,8807,-23139.97,9001,,,,,,
-18275,Balkans zone 5,9807,8801,0.0,9102,8802,15.0,9102,8805,0.9999,9201,8806,5500000.0,9001,8807,0.0,9001,,,,,,
-18276,Balkans zone 6,9807,8801,0.0,9102,8802,18.0,9102,8805,0.9999,9201,8806,6500000.0,9001,8807,0.0,9001,,,,,,
-18277,Balkans zone 7,9807,8801,0.0,9102,8802,21.0,9102,8805,0.9999,9201,8806,7500000.0,9001,8807,0.0,9001,,,,,,
-18278,Balkans zone 8,9807,8801,0.0,9102,8802,24.0,9102,8805,0.9999,9201,8806,8500000.0,9001,8807,0.0,9001,,,,,,
-18281,Poland zone I,9809,8801,50.373,9110,8802,21.05,9110,8805,0.9998,9201,8806,4637000.0,9001,8807,5647000.0,9001,,,,,,
-18282,Poland zone II,9809,8801,53.0007,9110,8802,21.301,9110,8805,0.9998,9201,8806,4603000.0,9001,8807,5806000.0,9001,,,,,,
-18283,Poland zone III,9809,8801,53.35,9110,8802,17.003,9110,8805,0.9998,9201,8806,3501000.0,9001,8807,5999000.0,9001,,,,,,
-18284,Poland zone IV,9809,8801,51.4015,9110,8802,16.402,9110,8805,0.9998,9201,8806,3703000.0,9001,8807,5627000.0,9001,,,,,,
-18285,Poland zone V,9807,8801,0.0,9110,8802,18.573,9110,8805,0.999983,9201,8806,237000.0,9001,8807,-4700000.0,9001,,,,,,
-18300,Poland CS92,9807,8801,0.0,9102,8802,19.0,9102,8805,0.9993,9201,8806,500000.0,9001,8807,-5300000.0,9001,,,,,,
-18305,Poland CS2000 zone 5,9807,8801,0.0,9102,8802,15.0,9102,8805,0.999923,9201,8806,5500000.0,9001,8807,0.0,9001,,,,,,
-18306,Poland CS2000 zone 6,9807,8801,0.0,9102,8802,18.0,9102,8805,0.999923,9201,8806,6500000.0,9001,8807,0.0,9001,,,,,,
-18307,Poland CS2000 zone 7,9807,8801,0.0,9102,8802,21.0,9102,8805,0.999923,9201,8806,7500000.0,9001,8807,0.0,9001,,,,,,
-18308,Poland CS2000 zone 8,9807,8801,0.0,9102,8802,24.0,9102,8805,0.999923,9201,8806,8500000.0,9001,8807,0.0,9001,,,,,,
-18401,Kp2000 Jylland og Fyn,9807,8801,0.0,9110,8802,9.3,9110,8805,0.99995,9201,8806,200000.0,9001,8807,0.0,9001,,,,,,
-18402,Kp2000 Sjaelland,9807,8801,0.0,9102,8802,12.0,9102,8805,0.99995,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-18403,Kp2000 Bornholm,9807,8801,0.0,9102,8802,15.0,9102,8805,1.0,9201,8806,900000.0,9001,8807,0.0,9001,,,,,,
-18411,French West Africa Senegal zone,9807,8801,0.0,9110,8802,-13.3,9110,8805,0.999,9201,8806,1000000.0,9001,8807,1000000.0,9001,,,,,,
-18412,French West Africa Ivory Coast zone,9807,8801,0.0,9110,8802,-6.3,9110,8805,0.999,9201,8806,1000000.0,9001,8807,1000000.0,9001,,,,,,
-18413,French West Africa Dahomey zone,9807,8801,0.0,9110,8802,0.3,9110,8805,0.999,9201,8806,1000000.0,9001,8807,1000000.0,9001,,,,,,
-18414,French West Africa Niger zone,9807,8801,0.0,9110,8802,7.3,9110,8805,0.999,9201,8806,1000000.0,9001,8807,1000000.0,9001,,,,,,
-18415,French Equatorial Africa west zone,9807,8801,0.0,9110,8802,10.3,9110,8805,0.999,9201,8806,1000000.0,9001,8807,1000000.0,9001,,,,,,
-18416,French Equatorial Africa central zone,9807,8801,0.0,9110,8802,17.4,9110,8805,0.999,9201,8806,1000000.0,9001,8807,1000000.0,9001,,,,,,
-18417,French Equatorial Africa east zone,9807,8801,0.0,9110,8802,24.3,9110,8805,0.999,9201,8806,1000000.0,9001,8807,1000000.0,9001,,,,,,
-18421,Greenland zone 1 east,9826,8801,82.3,9110,8802,-40.0,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-18422,Greenland zone 2 east,9826,8801,79.3,9110,8802,-24.0,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-18423,Greenland zone 3 east,9826,8801,76.3,9110,8802,-20.0,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-18424,Greenland zone 4 east,9826,8801,73.3,9110,8802,-24.0,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-18425,Greenland zone 5 east,9826,8801,70.3,9110,8802,-24.0,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-18426,Greenland zone 6 east,9826,8801,67.3,9110,8802,-32.0,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-18427,Greenland zone 7 east,9826,8801,64.3,9110,8802,-40.0,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-18428,Greenland zone 8 east,9826,8801,61.3,9110,8802,-48.0,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-18432,Greenland zone 2 west,9826,8801,79.3,9110,8802,-64.0,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-18433,Greenland zone 3 west,9826,8801,76.3,9110,8802,-64.0,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-18434,Greenland zone 4 west,9826,8801,73.3,9110,8802,-52.0,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-18435,Greenland zone 5 west,9826,8801,70.3,9110,8802,-52.0,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-18436,Greenland zone 6 west,9826,8801,67.3,9110,8802,-52.0,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-18437,Greenland zone 7 west,9826,8801,64.3,9110,8802,-52.0,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-18441,CS63 zone A1,9807,8801,0.07,9110,8802,41.32,9110,8805,1.0,9003,8806,1300000.0,9001,8807,0.0,9001,,,,,,
-18442,CS63 zone A2,9807,8801,0.07,9110,8802,44.32,9110,8805,1.0,9003,8806,2300000.0,9001,8807,0.0,9001,,,,,,
-18443,CS63 zone A3,9807,8801,0.07,9110,8802,47.32,9110,8805,1.0,9201,8806,3300000.0,9001,8807,0.0,9001,,,,,,
-18444,CS63 zone A4,9807,8801,0.07,9110,8802,50.32,9110,8805,1.0,9201,8806,4300000.0,9001,8807,0.0,9001,,,,,,
-18446,CS63 zone K2,9807,8801,0.08,9110,8802,50.46,9110,8805,1.0,9201,8806,2300000.0,9001,8807,0.0,9001,,,,,,
-18447,CS63 zone K3,9807,8801,0.08,9110,8802,53.46,9110,8805,1.0,9201,8806,3300000.0,9001,8807,0.0,9001,,,,,,
-18448,CS63 zone K4,9807,8801,0.08,9110,8802,56.46,9110,8805,1.0,9201,8806,4300000.0,9001,8807,0.0,9001,,,,,,
-19900,Bahrain State Grid,9807,8801,0.0,9102,8802,51.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-19901,Belge Lambert 50,9802,8821,90.0,9110,8822,0.0,9110,8823,49.5,9110,8824,51.1,9110,8826,150000.0,9001,8827,5400000.0,9001,,,
-19902,Belge Lambert 72,9803,8821,90.0,9110,8822,4.2124983,9110,8823,49.5,9110,8824,51.1,9110,8826,150000.01256,9001,8827,5400088.4378,9001,,,
-19903,Nord de Guerre,9801,8801,55.0,9105,8802,6.0,9105,8805,0.99950908,9201,8806,500000.0,9001,8807,300000.0,9001,,,,,,
-19904,Ghana Metre Grid,9807,8801,4.4,9110,8802,-1.0,9110,8805,0.99975,9201,8806,274319.51,9001,8807,0.0,9001,,,,,,
-19905,Netherlands East Indies Equatorial Zone,9804,8801,0.0,9102,8802,110.0,9102,8805,0.997,9201,8806,3900000.0,9001,8807,900000.0,9001,,,,,,
-19906,Iraq zone,9801,8801,32.3,9110,8802,45.0,9110,8805,0.9987864078,9201,8806,1500000.0,9001,8807,1166200.0,9001,,,,,,
-19907,Iraq National Grid,9807,8801,29.0134566,9110,8802,46.3,9110,8805,0.9994,9201,8806,800000.0,9001,8807,0.0,9001,,,,,,
-19908,Irish National Grid,9807,8801,53.3,9110,8802,-8.0,9110,8805,1.000035,9201,8806,200000.0,9001,8807,250000.0,9001,,,,,,
-19909,"Jamaica (Old Grid)",9801,8801,18.0,9102,8802,-77.0,9102,8805,1.0,9201,8806,550000.0,9005,8807,400000.0,9005,,,,,,
-19910,Jamaica National Grid,9801,8801,18.0,9102,8802,-77.0,9102,8805,1.0,9201,8806,250000.0,9001,8807,150000.0,9001,,,,,,
-19911,Laborde Grid,9815,8811,-21.0,9105,8812,49.0,9105,8813,21.0,9105,8814,21.0,9105,8815,0.9995,9201,8816,400000.0,9001,8817,800000.0,9001
-19913,RD Old,9809,8801,52.0922178,9110,8802,5.23155,9110,8805,0.9999079,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-19914,RD New,9809,8801,52.0922178,9110,8802,5.23155,9110,8805,0.9999079,9201,8806,155000.0,9001,8807,463000.0,9001,,,,,,
-19915,Aden Zone,9801,8801,15.0,9102,8802,45.0,9102,8805,0.999365678,9201,8806,1500000.0,9001,8807,1000000.0,9001,,,,,,
-19916,British National Grid,9807,8801,49.0,9102,8802,-2.0,9102,8805,0.999601272,9201,8806,400000.0,9001,8807,-100000.0,9001,,,,,,
-19917,New Zealand Map Grid,9811,8801,-41.0,9102,8802,173.0,9102,8806,2510000.0,9001,8807,6023150.0,9001,,,,,,,,,
-19919,Qatar National Grid,9807,8801,24.27,9110,8802,51.13,9110,8805,0.99999,9201,8806,200000.0,9001,8807,300000.0,9001,,,,,,
-19920,Singapore Grid,9806,8801,1.1715528,9110,8802,103.5110808,9110,8806,30000.0,9001,8807,30000.0,9001,,,,,,,,,
-19921,Spain,9801,8801,40.0,9102,8802,0.0,9102,8805,0.9988085293,9201,8806,600000.0,9001,8807,600000.0,9001,,,,,,
-19922,Swiss New Grid,9815,8811,46.570866,9110,8812,7.26225,9110,8813,90.0,9110,8814,90.0,9110,8815,1.0,9201,8816,600000.0,9001,8817,200000.0,9001
-19923,Swiss Old Grid,9815,8811,46.570866,9110,8812,0.0,9110,8813,90.0,9110,8814,90.0,9110,8815,1.0,9201,8816,0.0,9001,8817,0.0,9001
-19924,Tobago Grid,9806,8801,11.1507843,9110,8802,-60.4109632,9110,8806,187500.0,9039,8807,180000.0,9039,,,,,,,,,
-19925,Trinidad Grid,9806,8801,10.263,9110,8802,-61.2,9110,8806,430000.0,9039,8807,325000.0,9039,,,,,,,,,
-19926,Stereo 70,9809,8801,46.0,9102,8802,25.0,9102,8805,0.99975,9201,8806,500000.0,9001,8807,500000.0,9001,,,,,,
-19927,Stereo 33,9809,8801,45.54,9110,8802,25.23328772,9110,8805,0.9996667,9201,8806,500000.0,9001,8807,500000.0,9001,,,,,,
-19928,Kuwait TM,9807,8801,0.0,9102,8802,48.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-19929,Swedish National Projection,9807,8801,0.0,9110,8802,15.48298,9110,8805,1.0,9201,8806,1500000.0,9001,8807,0.0,9001,,,,,,
-19930,Greek Grid,9807,8801,0.0,9102,8802,24.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-19931,Egyseges Orszagos Vetuleti,9815,8811,47.08398174,9110,8812,19.02548584,9110,8813,90.0,9110,8814,90.0,9110,8815,0.99993,9201,8816,650000.0,9001,8817,200000.0,9001
-19933,"Prince Edward Island Stereographic (ATS77)",9809,8801,47.15,9110,8802,-63.0,9110,8805,0.999912,9201,8806,700000.0,9001,8807,400000.0,9001,,,,,,
-19934,Lithuania 1994,9807,8801,0.0,9102,8802,24.0,9102,8805,0.9998,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-19935,Rectified Skew Orthomorphic Malaya Grid,9812,8806,40000.0,9062,8807,0.0,9062,8811,4.0,9110,8812,102.15,9110,8813,323.01328458,9110,8814,323.07483685,9110,8815,0.99984,9201
-19936,Portuguese National Grid,9807,8801,39.4,9110,8802,1.0,9110,8805,1.0,9201,8806,200000.0,9001,8807,300000.0,9001,,,,,,
-19937,Tunisia Mining Grid,9816,8821,38.81973,9105,8822,7.83445,9105,8826,270.0,9036,8827,582.0,9036,,,,,,,,,
-19938,Estonian National Grid,9802,8821,57.310319415,9110,8822,24.0,9110,8823,59.2,9110,8824,58.0,9110,8826,500000.0,9001,8827,6375000.0,9001,,,
-19939,TM Baltic 93,9807,8801,0.0,9102,8802,24.0,9102,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-19940,Levant Zone,9817,8801,34.39,9110,8802,37.21,9110,8805,0.9996256,9201,8806,300000.0,9001,8807,300000.0,9001,,,,,,
-19941,Brazil Polyconic,9818,8801,0.0,9102,8802,-54.0,9102,8806,5000000.0,9001,8807,10000000.0,9001,,,,,,,,,
-19942,British West Indies Grid,9807,8801,0.0,9102,8802,-62.0,9102,8805,0.9995,9201,8806,400000.0,9001,8807,0.0,9001,,,,,,
-19943,Barbados National Grid,9807,8801,13.1035,9110,8802,-59.3335,9110,8805,0.9999986,9201,8806,30000.0,9001,8807,75000.0,9001,,,,,,
-19944,Quebec Lambert Projection,9802,8821,44.0,9110,8822,-68.3,9110,8823,60.0,9110,8824,46.0,9110,8826,0.0,9001,8827,0.0,9001,,,
-19945,"New Brunswick Stereographic (ATS77)",9809,8801,46.3,9110,8802,-66.3,9110,8805,0.999912,9201,8806,300000.0,9001,8807,800000.0,9001,,,,,,
-19946,"New Brunswick Stereographic (NAD83)",9809,8801,46.3,9110,8802,-66.3,9110,8805,0.999912,9201,8806,2500000.0,9001,8807,7500000.0,9001,,,,,,
-19947,Austria Lambert,9802,8821,47.3,9110,8822,13.2,9110,8823,49.0,9110,8824,46.0,9110,8826,400000.0,9001,8827,400000.0,9001,,,
-19948,Syria Lambert,9801,8801,34.39,9110,8802,37.21,9110,8805,0.9996256,9201,8806,300000.0,9001,8807,300000.0,9001,,,,,,
-19949,Levant Stereographic,9809,8801,38.0,9105,8802,43.5,9105,8805,0.9995341,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-19950,Landesvermessung 1995,9815,8811,46.570866,9110,8812,7.26225,9110,8813,90.0,9110,8814,90.0,9110,8815,1.0,9201,8816,2600000.0,9001,8817,1200000.0,9001
-19951,Nakhl e Taqi Oblique Mercator,9815,8811,27.31077837,9110,8812,52.3612741,9110,8813,0.34179803,9110,8814,0.34179803,9110,8815,0.999895934,9201,8816,658377.437,9001,8817,3044969.194,9001
-19952,Krovak,9819,8811,49.3,9110,8812,42.3,9110,8813,30.1717303,9110,8816,0.0,9001,8817,0.0,9001,8818,78.3,9110,8819,0.9999,9201
-19953,Qatar Grid,9806,8801,25.22565,9110,8802,50.4541,9110,8806,100000.0,9001,8807,100000.0,9001,,,,,,,,,
-19954,Suriname Old TM,9807,8801,0.0,9110,8802,-55.41,9110,8805,0.9996,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-19955,Suriname TM,9807,8801,0.0,9110,8802,-55.41,9110,8805,0.9999,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-19956,"Rectified Skew Orthomorphic Borneo Grid (chains)",9815,8811,4.0,9110,8812,115.0,9110,8813,53.18569537,9110,8814,53.07483685,9110,8815,0.99984,9201,8816,29352.4763,9042,8817,22014.3572,9042
-19957,"Rectified Skew Orthomorphic Borneo Grid (feet)",9815,8811,4.0,9110,8812,115.0,9110,8813,53.18569537,9110,8814,53.07483685,9110,8815,0.99984,9201,8816,1937263.44,9041,8817,1452947.58,9041
-19958,"Rectified Skew Orthomorphic Borneo Grid (metres)",9815,8811,4.0,9110,8812,115.0,9110,8813,53.18569537,9110,8814,53.07483685,9110,8815,0.99984,9201,8816,590476.87,9001,8817,442857.65,9001
-19959,Ghana National Grid,9807,8801,4.4,9110,8802,-1.0,9110,8805,0.99975,9201,8806,900000.0,9094,8807,0.0,9094,,,,,,
-19960,"Prince Edward Isl. Stereographic (NAD83)",9809,8801,47.15,9110,8802,-63.0,9110,8805,0.999912,9201,8806,400000.0,9001,8807,800000.0,9001,,,,,,
-19961,Belgian Lambert 72,9802,8821,90.0,9110,8822,4.2202952,9110,8823,51.100000204,9110,8824,49.500000204,9110,8826,150000.013,9001,8827,5400088.438,9001,,,
-19962,Irish Transverse Mercator,9807,8801,53.3,9110,8802,-8.0,9110,8805,0.99982,9201,8806,600000.0,9001,8807,750000.0,9001,,,,,,
-19963,Sierra Leone New Colony Grid,9807,8801,6.4,9110,8802,-12.0,9110,8805,1.0,9201,8806,500000.0,9094,8807,0.0,9094,,,,,,
-19964,New War Office Sierra Leone Grid,9807,8801,6.4,9110,8802,-12.0,9110,8805,1.0,9201,8806,800000.0,9094,8807,600000.0,9094,,,,,,
-19965,US National Atlas Equal Area,9821,8806,0.0,9001,8807,0.0,9001,8828,45.0,9102,8829,-100.0,9102,,,,,,,,,
-19966,Luxembourg Gauss,9807,8801,49.5,9110,8802,6.1,9110,8805,1.0,9201,8806,80000.0,9001,8807,100000.0,9001,,,,,,
-19967,Slovenia Grid,9807,8801,0.0,9110,8802,15.0,9110,8805,0.9999,9201,8806,500000.0,9001,8807,0.0,9001,,,,,,
-19968,Plate Carree,9823,8801,0.0,9102,8802,0.0,9102,,,,,,,,,,,,,,,
-19969,Portuguese Grid,9807,8801,39.4,9110,8802,1.0,9110,8805,1.0,9201,8806,0.0,9001,8807,0.0,9001,,,,,,
-19971,New Zealand Transverse Mercator,9807,8801,0.0,9102,8802,173.0,9102,8805,0.9996,9201,8806,1600000.0,9001,8807,10000000.0,9001,,,,,,
-19972,Irish Grid,9807,8801,53.3,9110,8802,-8.0,9110,8805,1.000035,9201,8806,200000.0,9001,8807,250000.0,9001,,,,,,
-19973,Irish National Grid,9807,8801,53.3,9110,8802,-8.0,9110,8805,1.0,9201,8806,200000.0,9001,8807,250000.0,9001,,,,,,
-19974,Modified Portuguese Grid,9807,8801,39.4,9110,8802,-8.0754862,9110,8805,1.0,9201,8806,180.598,9001,8807,-86.99,9001,,,,,,
-19975,"Trinidad Grid (Clarke's feet)",9806,8801,10.263,9110,8802,-61.2,9110,8806,283800.0,9005,8807,214500.0,9005,,,,,,,,,
-19976,ICN Regional,9802,8821,6.0,9102,8822,-66.0,9102,8823,9.0,9102,8824,3.0,9102,8826,1000000.0,9001,8827,1000000.0,9001,,,
-19977,Aramco Lambert,9802,8821,25.0522236,9110,8822,48.0,9102,8823,17.0,9102,8824,33.0,9102,8826,0.0,9001,8827,0.0,9001,,,
-19978,Hong Kong 1980 Grid,9807,8801,22.184368,9110,8802,114.10428,9110,8805,1.0,9201,8806,836694.05,9001,8807,819069.8,9001,,,,,,
-19979,Portugal Bonne,9828,8801,39.4,9110,8802,1.0,9110,8806,0.0,9001,8807,0.0,9001,,,,,,,,,
diff --git a/src/tiff/csv/stateplane.csv b/src/tiff/csv/stateplane.csv
deleted file mode 100644
index 506af15..0000000
--- a/src/tiff/csv/stateplane.csv
+++ /dev/null
@@ -1,258 +0,0 @@
-"ID","STATE","ZONE","PROJ_METHOD","DATUM","USGS_CODE","EPSG_PCS_CODE"
-101,ALABAMA,EAST,1,NAD83,101,26929
-102,ALABAMA,WEST,1,NAD83,102,26930
-201,ARIZONA,EAST,1,NAD83,201,26948
-202,ARIZONA,CENTRAL,1,NAD83,202,26949
-203,ARIZONA,WEST,1,NAD83,203,26950
-301,ARKANSAS,NORTH,2,NAD83,301,26951
-302,ARKANSAS,SOUTH,2,NAD83,302,26952
-401,CALIFORNIA,I,2,NAD83,401,26941
-402,CALIFORNIA,II,2,NAD83,402,26942
-403,CALIFORNIA,III,2,NAD83,403,26943
-404,CALIFORNIA,IV,2,NAD83,404,26944
-405,CALIFORNIA,V,2,NAD83,405,26945
-406,CALIFORNIA,VI,2,NAD83,406,26946
-501,COLORADO,NORTH,2,NAD83,501,26953
-502,COLORADO,CENTRAL,2,NAD83,502,26954
-503,COLORADO,SOUTH,2,NAD83,503,26955
-600,CONNECTICUT,,2,NAD83,600,26956
-700,DELAWARE,,1,NAD83,700,26957
-901,FLORIDA,EAST,1,NAD83,901,26958
-902,FLORIDA,WEST,1,NAD83,902,26959
-903,FLORIDA,NORTH,2,NAD83,903,26960
-1001,GEORGIA,EAST,1,NAD83,1001,26966
-1002,GEORGIA,WEST,1,NAD83,1002,26967
-1101,IDAHO,EAST,1,NAD83,1101,26968
-1102,IDAHO,CENTRAL,1,NAD83,1102,26969
-1103,IDAHO,WEST,1,NAD83,1103,26970
-1201,ILLINOIS,EAST,1,NAD83,1201,26971
-1202,ILLINOIS,WEST,1,NAD83,1202,26972
-1301,INDIANA,EAST,1,NAD83,1301,26973
-1302,INDIANA,WEST,1,NAD83,1302,26974
-1401,IOWA,NORTH,2,NAD83,1401,26975
-1402,IOWA,SOUTH,2,NAD83,1402,26976
-1501,KANSAS,NORTH,2,NAD83,1501,26977
-1502,KANSAS,SOUTH,2,NAD83,1502,26978
-1601,KENTUCKY,NORTH,2,NAD83,1601,2205
-1602,KENTUCKY,SOUTH,2,NAD83,1602,26980
-1701,LOUISIANA,NORTH,2,NAD83,1701,26981
-1702,LOUISIANA,SOUTH,2,NAD83,1702,26982
-1703,LOUISIANA,OFFSHORE,2,NAD83,1703,
-1801,MAINE,EAST,1,NAD83,1801,26983
-1802,MAINE,WEST,1,NAD83,1802,26984
-1900,MARYLAND,,2,NAD83,1900,26985
-2001,MASSACHUSETTS,MAINLAND,2,NAD83,2001,26986
-2002,MASSACHUSETTS,ISLAND,2,NAD83,2002,26987
-2111,MICHIGAN,NORTH,2,NAD83,2111,26988
-2112,MICHIGAN,CENTRAL,2,NAD83,2112,26989
-2113,MICHIGAN,SOUTH,2,NAD83,2113,26990
-2201,MINNESOTA,NORTH,2,NAD83,2201,26991
-2202,MINNESOTA,CENTRAL,2,NAD83,2202,26992
-2203,MINNESOTA,SOUTH,2,NAD83,2203,26993
-2301,MISSISSIPPI,EAST,1,NAD83,2301,26994
-2302,MISSISSIPPI,WEST,1,NAD83,2302,26995
-2401,MISSOURI,EAST,1,NAD83,2401,26996
-2402,MISSOURI,CENTRAL,1,NAD83,2402,26997
-2403,MISSOURI,WEST,1,NAD83,2403,26998
-2500,MONTANA,,2,NAD83,2500,32100
-2600,NEBRASKA,,2,NAD83,2600,32104
-2701,NEVADA,EAST,1,NAD83,2701,32107
-2702,NEVADA,CENTRAL,1,NAD83,2702,32108
-2703,NEVADA,WEST,1,NAD83,2703,32109
-2800,"NEW HAMPSHIRE",,1,NAD83,2800,32110
-2900,"NEW JERSEY",,1,NAD83,2900,32111
-3001,"NEW MEXICO",EAST,1,NAD83,3001,32112
-3002,"NEW MEXICO",CENTRAL,1,NAD83,3002,32113
-3003,"NEW MEXICO",WEST,1,NAD83,3003,32114
-3101,"NEW YORK",EAST,1,NAD83,3101,32115
-3102,"NEW YORK",CENTRAL,1,NAD83,3102,32116
-3103,"NEW YORK",WEST,1,NAD83,3103,32117
-3104,"NEW YORK","LONG ISLAND",2,NAD83,3104,32118
-3200,"NORTH CAROLINA",,2,NAD83,3200,32119
-3301,"NORTH DAKOTA",NORTH,2,NAD83,3301,32120
-3302,"NORTH DAKOTA",SOUTH,2,NAD83,3302,32121
-3401,OHIO,NORTH,2,NAD83,3401,32122
-3402,OHIO,SOUTH,2,NAD83,3402,32123
-3501,OKLAHOMA,NORTH,2,NAD83,3501,32124
-3502,OKLAHOMA,SOUTH,2,NAD83,3502,32125
-3601,OREGON,NORTH,2,NAD83,3601,32126
-3602,OREGON,SOUTH,2,NAD83,3602,32127
-3701,PENNSYLVANIA,NORTH,2,NAD83,3701,32128
-3702,PENNSYLVANIA,SOUTH,2,NAD83,3702,32129
-3800,"RHODE ISLAND",,1,NAD83,3800,32130
-3900,"SOUTH CAROLINA",,2,NAD83,3900,32133
-4001,"SOUTH DAKOTA",NORTH,2,NAD83,4001,32134
-4002,"SOUTH DAKOTA",SOUTH,2,NAD83,4002,32135
-4100,TENNESSEE,,2,NAD83,4100,32136
-4201,TEXAS,NORTH,2,NAD83,4201,32137
-4202,TEXAS,"NORTH CENTRAL",2,NAD83,4202,32138
-4203,TEXAS,CENTRAL,2,NAD83,4203,32139
-4204,TEXAS,"SOUTH CENTRAL",2,NAD83,4204,32140
-4205,TEXAS,SOUTH,2,NAD83,4205,32141
-4301,UTAH,NORTH,2,NAD83,4301,32142
-4302,UTAH,CENTRAL,2,NAD83,4302,32143
-4303,UTAH,SOUTH,2,NAD83,4303,32144
-4400,VERMONT,,1,NAD83,4400,32145
-4501,VIRGINIA,NORTH,2,NAD83,4501,32146
-4502,VIRGINIA,SOUTH,2,NAD83,4502,32147
-4601,WASHINGTON,NORTH,2,NAD83,4601,32148
-4602,WASHINGTON,SOUTH,2,NAD83,4602,32149
-4701,"WEST VIRGINIA",NORTH,2,NAD83,4701,32150
-4702,"WEST VIRGINIA",SOUTH,2,NAD83,4702,32151
-4801,WISCONSIN,NORTH,2,NAD83,4801,32152
-4802,WISCONSIN,CENTRAL,2,NAD83,4802,32153
-4803,WISCONSIN,SOUTH,2,NAD83,4803,32154
-4901,WYOMING,EAST,1,NAD83,4901,32155
-4902,WYOMING,"EAST CENTRAL",1,NAD83,4902,32156
-4903,WYOMING,"WEST CENTRAL",1,NAD83,4903,32157
-4904,WYOMING,WEST,1,NAD83,4904,32158
-5001,ALASKA,"ZONE NO. 1",4,NAD83,5001,26931
-5002,ALASKA,"ZONE NO. 2",1,NAD83,5002,26932
-5003,ALASKA,"ZONE NO. 3",1,NAD83,5003,26933
-5004,ALASKA,"ZONE NO. 4",1,NAD83,5004,26934
-5005,ALASKA,"ZONE NO. 5",1,NAD83,5005,26935
-5006,ALASKA,"ZONE NO. 6",1,NAD83,5006,26936
-5007,ALASKA,"ZONE NO. 7",1,NAD83,5007,26937
-5008,ALASKA,"ZONE NO. 8",1,NAD83,5008,26938
-5009,ALASKA,"ZONE NO. 9",1,NAD83,5009,26939
-5010,ALASKA,"ZONE NO. 10",2,NAD83,5010,26940
-5101,HAWAII,1,1,NAD83,5101,26961
-5102,HAWAII,2,1,NAD83,5102,26962
-5103,HAWAII,3,1,NAD83,5103,26963
-5104,HAWAII,4,1,NAD83,5104,26964
-5105,HAWAII,5,1,NAD83,5105,26965
-5200,"PUERTO RICO AND","VIRGIN ISLANDS",2,NAD83,5200,32161
-10101,ALABAMA,EAST,1,NAD27,101,26729
-10102,ALABAMA,WEST,1,NAD27,102,26730
-10201,ARIZONA,EAST,1,NAD27,201,26748
-10202,ARIZONA,CENTRAL,1,NAD27,202,26749
-10203,ARIZONA,WEST,1,NAD27,203,26750
-10301,ARKANSAS,NORTH,2,NAD27,301,26751
-10302,ARKANSAS,SOUTH,2,NAD27,302,26752
-10401,CALIFORNIA,I,2,NAD27,401,26741
-10402,CALIFORNIA,II,2,NAD27,402,26742
-10403,CALIFORNIA,III,2,NAD27,403,26743
-10404,CALIFORNIA,IV,2,NAD27,404,26744
-10405,CALIFORNIA,V,2,NAD27,405,26745
-10406,CALIFORNIA,VI,2,NAD27,406,26746
-10407,CALIFORNIA,VII,2,NAD27,407,26747
-10501,COLORADO,NORTH,2,NAD27,501,26753
-10502,COLORADO,CENTRAL,2,NAD27,502,26754
-10503,COLORADO,SOUTH,2,NAD27,503,26755
-10600,CONNECTICUT,,2,NAD27,600,26756
-10700,DELAWARE,,1,NAD27,700,26757
-10901,FLORIDA,EAST,1,NAD27,901,26758
-10902,FLORIDA,WEST,1,NAD27,902,26759
-10903,FLORIDA,NORTH,2,NAD27,903,26760
-11001,GEORGIA,EAST,1,NAD27,1001,26766
-11002,GEORGIA,WEST,1,NAD27,1002,26767
-11101,IDAHO,EAST,1,NAD27,1101,26768
-11102,IDAHO,CENTRAL,1,NAD27,1102,26769
-11103,IDAHO,WEST,1,NAD27,1103,26770
-11201,ILLINOIS,EAST,1,NAD27,1201,26771
-11202,ILLINOIS,WEST,1,NAD27,1202,26772
-11301,INDIANA,EAST,1,NAD27,1301,26773
-11302,INDIANA,WEST,1,NAD27,1302,26774
-11401,IOWA,NORTH,2,NAD27,1401,26775
-11402,IOWA,SOUTH,2,NAD27,1402,26776
-11501,KANSAS,NORTH,2,NAD27,1501,26777
-11502,KANSAS,SOUTH,2,NAD27,1502,26778
-11601,KENTUCKY,NORTH,2,NAD27,1601,26779
-11602,KENTUCKY,SOUTH,2,NAD27,1602,26780
-11701,LOUISIANA,NORTH,2,NAD27,1701,26781
-11702,LOUISIANA,SOUTH,2,NAD27,1702,26782
-11703,LOUISIANA,OFFSHORE,2,NAD27,1703,
-11801,MAINE,EAST,1,NAD27,1801,26783
-11802,MAINE,WEST,1,NAD27,1802,26784
-11900,MARYLAND,,2,NAD27,1900,26785
-12001,MASSACHUSETTS,MAINLAND,2,NAD27,2001,26786
-12002,MASSACHUSETTS,ISLAND,2,NAD27,2002,26787
-12101,MICHIGAN,EAST,1,NAD27,2101,26801
-12102,MICHIGAN,"CENTRAL/M",1,NAD27,2102,26802
-12103,MICHIGAN,WEST,1,NAD27,2103,26803
-12111,MICHIGAN,NORTH,2,NAD27,2111,26811
-12112,MICHIGAN,"CENTRAL/L",2,NAD27,2112,26812
-12113,MICHIGAN,SOUTH,2,NAD27,2113,26813
-12201,MINNESOTA,NORTH,2,NAD27,2201,26791
-12202,MINNESOTA,CENTRAL,2,NAD27,2202,26792
-12203,MINNESOTA,SOUTH,2,NAD27,2203,26793
-12301,MISSISSIPPI,EAST,1,NAD27,2301,26794
-12302,MISSISSIPPI,WEST,1,NAD27,2302,26795
-12401,MISSOURI,EAST,1,NAD27,2401,26796
-12402,MISSOURI,CENTRAL,1,NAD27,2402,26797
-12403,MISSOURI,WEST,1,NAD27,2403,26798
-12501,MONTANA,NORTH,2,NAD27,2501,32001
-12502,MONTANA,CENTRAL,2,NAD27,2502,32002
-12503,MONTANA,SOUTH,2,NAD27,2503,32003
-12601,NEBRASKA,NORTH,2,NAD27,2601,32005
-12602,NEBRASKA,SOUTH,2,NAD27,2602,32006
-12701,NEVADA,EAST,1,NAD27,2701,32007
-12702,NEVADA,CENTRAL,1,NAD27,2702,32008
-12703,NEVADA,WEST,1,NAD27,2703,32009
-12800,"NEW HAMPSHIRE",,1,NAD27,2800,32010
-12900,"NEW JERSEY",,1,NAD27,2900,32011
-13001,"NEW MEXICO",EAST,1,NAD27,3001,32012
-13002,"NEW MEXICO",CENTRAL,1,NAD27,3002,32013
-13003,"NEW MEXICO",WEST,1,NAD27,3003,32014
-13101,"NEW YORK",EAST,1,NAD27,3101,32015
-13102,"NEW YORK",CENTRAL,1,NAD27,3102,32016
-13103,"NEW YORK",WEST,1,NAD27,3103,32017
-13104,"NEW YORK","LONG ISLAND",2,NAD27,3104,32018
-13200,"NORTH CAROLINA",,2,NAD27,3200,32019
-13301,"NORTH DAKOTA",NORTH,2,NAD27,3301,32020
-13302,"NORTH DAKOTA",SOUTH,2,NAD27,3302,32021
-13401,OHIO,NORTH,2,NAD27,3401,32022
-13402,OHIO,SOUTH,2,NAD27,3402,32023
-13501,OKLAHOMA,NORTH,2,NAD27,3501,32024
-13502,OKLAHOMA,SOUTH,2,NAD27,3502,32025
-13601,OREGON,NORTH,2,NAD27,3601,32026
-13602,OREGON,SOUTH,2,NAD27,3602,32027
-13701,PENNSYLVANIA,NORTH,2,NAD27,3701,32028
-13702,PENNSYLVANIA,SOUTH,2,NAD27,3702,32029
-13800,"RHODE ISLAND",,1,NAD27,3800,32030
-13901,"SOUTH CAROLINA",NORTH,2,NAD27,3901,32031
-13902,"SOUTH CAROLINA",SOUTH,2,NAD27,3902,32033
-14001,"SOUTH DAKOTA",NORTH,2,NAD27,4001,32034
-14002,"SOUTH DAKOTA",SOUTH,2,NAD27,4002,32035
-14100,TENNESSEE,,2,NAD27,4100,2204
-14201,TEXAS,NORTH,2,NAD27,4201,32037
-14202,TEXAS,"NORTH CENTRAL",2,NAD27,4202,32038
-14203,TEXAS,CENTRAL,2,NAD27,4203,32039
-14204,TEXAS,"SOUTH CENTRAL",2,NAD27,4204,32040
-14205,TEXAS,SOUTH,2,NAD27,4205,32041
-14301,UTAH,NORTH,2,NAD27,4301,32042
-14302,UTAH,CENTRAL,2,NAD27,4302,32043
-14303,UTAH,SOUTH,2,NAD27,4303,32044
-14400,VERMONT,,1,NAD27,4400,32045
-14501,VIRGINIA,NORTH,2,NAD27,4501,32046
-14502,VIRGINIA,SOUTH,2,NAD27,4502,32047
-14601,WASHINGTON,NORTH,2,NAD27,4601,32048
-14602,WASHINGTON,SOUTH,2,NAD27,4602,32049
-14701,"WEST VIRGINIA",NORTH,2,NAD27,4701,32050
-14702,"WEST VIRGINIA",SOUTH,2,NAD27,4702,32051
-14801,WISCONSIN,NORTH,2,NAD27,4801,32052
-14802,WISCONSIN,CENTRAL,2,NAD27,4802,32053
-14803,WISCONSIN,SOUTH,2,NAD27,4803,32054
-14901,WYOMING,EAST,1,NAD27,4901,32055
-14902,WYOMING,"EAST CENTRAL",1,NAD27,4902,32056
-14903,WYOMING,"WEST CENTRAL",1,NAD27,4903,32057
-14904,WYOMING,WEST,1,NAD27,4904,32058
-15001,ALASKA,"ZONE NO. 1",4,NAD27,5001,26731
-15002,ALASKA,"ZONE NO. 2",1,NAD27,5002,26732
-15003,ALASKA,"ZONE NO. 3",1,NAD27,5003,26733
-15004,ALASKA,"ZONE NO. 4",1,NAD27,5004,26734
-15005,ALASKA,"ZONE NO. 5",1,NAD27,5005,26735
-15006,ALASKA,"ZONE NO. 6",1,NAD27,5006,26736
-15007,ALASKA,"ZONE NO. 7",1,NAD27,5007,26737
-15008,ALASKA,"ZONE NO. 8",1,NAD27,5008,26738
-15009,ALASKA,"ZONE NO. 9",1,NAD27,5009,26739
-15010,ALASKA,"ZONE NO. 10",2,NAD27,5010,26740
-15101,HAWAII,1,1,NAD27,5101,3561
-15102,HAWAII,2,1,NAD27,5102,3562
-15103,HAWAII,3,1,NAD27,5103,3563
-15104,HAWAII,4,1,NAD27,5104,3564
-15105,HAWAII,5,1,NAD27,5105,3565
-15201,"PUERTO RICO AND VIRGIN ISLANDS",,2,NAD27,5201,3991
-15202,"VIRGIN ISLANDS","ST. CROIX",2,NAD27,5202,3992
-15300,"AMERICAN SAMOA",,2,NAD27,5300,2155
-15400,"GUAM ISLAND",,3,NAD27,5400,
diff --git a/src/tiff/csv/trf_method.c b/src/tiff/csv/trf_method.c
deleted file mode 100644
index dc7ecb6..0000000
--- a/src/tiff/csv/trf_method.c
+++ /dev/null
@@ -1,205 +0,0 @@
-#include "defs.h"
-datafile_rows_t trf_method_row_1[] = {"COORD_TRF_METHOD_CODE","CTRF_METHOD_EPSG_NAME","CTRF_METHOD_USER_NAME","DESCRIPTION","PARAM_1_NAME","PARAM_2_NAME","PARAM_3_NAME","PARAM_4_NAME","PARAM_5_NAME","PARAM_6_NAME","PARAM_7_NAME","PARAM_8_NAME","PARAM_9_NAME","PARAM_10_NAME","PARAM_11_NAME","PARAM_12_NAME","PARAM_13_NAME","PARAM_14_NAME","PARAM_15_NAME","PARAM_16_NAME","PARAM_17_NAME","PARAM_18_NAME","PARAM_19_NAME","PARAM_20_NAME","PARAM_21_NAME","PARAM_22_NAME","PARAM_23_NAME","PARAM_24 [...]
-datafile_rows_t trf_method_row_2[] = {"9601","Longitude rotation","","This transformation allows calculation of coordinates in the target system by adding the parameter value to the coordinate values of the point in the source system.","Longitude rotation","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Lon2 = Lon1 + longitude_rotation.","","1999-11-12 00:00:00","","EPSG","","99.79",NULL};
-datafile_rows_t trf_method_row_3[] = {"9602","Geodetic/geocentric conversions","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Latitude, P, and Longitude, L, in terms of Geographic Coordinate System (GCS) A may \
-be expressed in terms of a geocentric (earth centred) cartesian coordinate system X, Y, Z \
-with the Z axis corresponding with the Polar axis positive northwards, the X a","Consider a North Sea point with coordinates derived by GPS satellite in the WGS84 geographical coordinate system with coordinates of:\
-\
-           latitude    53 deg 48 min 33.82 sec N, \
-           longitude 02 deg 07 min 46.38 sec E, \
-    and ellipsoid","1996-09-18 00:00:00","\"Transformation from spatial to geographical coordinates\"; B. R. Bowring; Survey Review number 181; July 1976.","EPSG","","97.29",NULL};
-datafile_rows_t trf_method_row_4[] = {"9603","Geocentric translations","","","X-axis translation","Y-axis translation","Z-axis translation","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","If  we may assume that the minor axes of the ellipsoids are parallel, then shifts dX, dY, dZ \
-in the sense from datum A to datum B may then be applied as\
-\
-   XB = XA + dX \
-   YB = YA + dY\
-   ZB = ZA + dZ","Given a three parameter datum shift from WGS84 to ED50 for this North Sea area is given as \
-dX = +84.87m, dY = +96.49m, dZ = +116.95m. \
-\
-The WGS84 geographical coordinates convert to the following GS84 geocentric values using \
-the above formulas for X,","1996-09-18 00:00:00","POSC Epicentre 2.2.1","EPSG","","",NULL};
-datafile_rows_t trf_method_row_5[] = {"9604","Molodenski","","","X-axis translation","Y-axis translation","Z-axis translation","Semi-major axis length difference","Flattening difference","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","1996-09-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t trf_method_row_6[] = {"9605","Abridged Molodenski","","","X-axis translation","Y-axis translation","Z-axis translation","Semi-major axis length difference","Flattening difference","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","As an alternative to the computation of the new latitude, longitude and height above ellipsoid in discrete steps through geocentric coordinates, the changes in these coordinates may be derived direct [...]
-datafile_rows_t trf_method_row_7[] = {"9606","Position Vector 7-param. transformation","","","X-axis translation","Y-axis translation","Z-axis translation","X-axis rotation","Y-axis rotation","Z-axis rotation","Scale difference","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Transformation of coordinates from one geographic coordinate system into another (also known as a \"datum transformation\") is usually carried out as an implicit concatenat [...]
-[geographical to geocentric >> geocentric to geocentric","Input point: \
-Coordinate system: WGS72 (geographic 3D)\
-  Latitude =   55 deg 00 min 00 sec \
-  Longitude =  4 deg 00 min 00 sec \
-  Ellipsoidal height =  0 m\
-This transforms to cartesian geocentric coords:\
-    X = 3 657 660.66 (m)  \
-    Y =    255 768","1996-09-18 00:00:00","","EPSG","","98.16",NULL};
-datafile_rows_t trf_method_row_8[] = {"9607","Coordinate Frame rotation","","","X-axis translation","Y-axis translation","Z-axis translation","X-axis rotation","Y-axis rotation","Z-axis rotation","Scale difference","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","<<<<<This text is continued from the description of the Position Vector Transformation formula>>>>>\
-\
-Although being common practice in particularly the European E&P industry Position Vector Transformation sign convention is not universally accepted.  A v","The same example as for the Position Vector Transformation can be calculated, however the following transformation parameters have to be applied to achieve the same input and output in terms of coordinate values:\
-\
-Transformation parameters Coordinate Fra","1996-09-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t trf_method_row_9[] = {"9608","Similarity transform","","","A1","A2 * m","A3 * n","B1","B2 * m","B3 * n","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","1996-09-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t trf_method_row_10[] = {"9609","2-dimensional Affine transformation","","","A1","A2 * m","A3 * n","B1","B2 * m","B3 * n","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","1996-09-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t trf_method_row_11[] = {"9610","2nd-order Polynomial function","","","Ordinate 1 of source evaluation point","Ordinate 2 of source evaluation point","Ordinate 1 of target evaluation point","Ordinate 2 of target evaluation point","A1","A2 * m","A3 * n","A4 * mm","A5 * mn","A6 * nn","B1","B2 * m","B3 * n","B4 * mm","B5 * mn","B6 * nn","","","","","","","","","","","","","","","","","","","","","","","","1996-09-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t trf_method_row_12[] = {"9611","3rd-order Polynomial function","","","Ordinate 1 of source evaluation point","Ordinate 2 of source evaluation point","Ordinate 1 of target evaluation point","Ordinate 2 of target evaluation point","A1","A2 * m","A3 * n","A4 * mm","A5 * mn","A6 * nn","A7 * mmm","A8 * mmn","A9 * mnn","A10 * nnn","B1","B2 * m","B3 * n","B4 * mm","B5 * mn","B6 * nn","B7 * mmm","B8 * mmn","B9 * mnn","B10 * nnn","","","","","","","","","","","","","","","","1996-0 [...]
-datafile_rows_t trf_method_row_13[] = {"9612","4th-order Polynomial function","","","Ordinate 1 of source evaluation point","Ordinate 2 of source evaluation point","Ordinate 1 of target evaluation point","Ordinate 2 of target evaluation point","A1","A2 * m","A3 * n","A4 * mm","A5 * mn","A6 * nn","A7 * mmm","A8 * mmn","A9 * mnn","A10 * nnn","A11 * mmmm","A12 * mmmn","A13 * mmnn","A14 * mnnn","A15 * nnnn","B1","B2 * m","B3 * n","B4 * mm","B5 * mn","B6 * nn","B7 * mmm","B8 * mmn","B9 * mnn" [...]
-datafile_rows_t trf_method_row_14[] = {"9613","NADCON","","Geodetic transformation operating on geographic coordinate differences by bi-linear interpolation.  Used specifically for some NAD27<->NAD83 transformations in USA.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Latitude difference gridded binary file","Longitude difference gridded binary file","","","","1996-09-18 00:00:00","US Coast and geodetic Survey - http://www.ngs.no [...]
-datafile_rows_t trf_method_row_15[] = {"9614","NTv1","","Geodetic transformation operating on geographic coordinate differences by bi-linear interpolation.  Used specifically for some NAD27<->NAD83 transformations in Canada.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Latitude and longitude difference file","","","","","1997-11-13 00:00:00","Geomatics Canada - Geodetic Survey Division.","EPSG","Superceded in 1997 by NTv2 (transf [...]
-datafile_rows_t trf_method_row_16[] = {"9615","NTv2","","Geodetic transformation operating on geographic coordinate differences by bi-linear interpolation.","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Latitude and longitude difference file","","","","","1997-11-13 00:00:00","http://www.geod.nrcan.gc.ca/products/html-public/GSDapps/English/NTv2_Fact_Sheet.html","EPSG","Supercedes  NTv1 (transformation method code 9614).  Input exp [...]
-datafile_rows_t trf_method_row_17[] = {"9616","Vertical Offset","","This transformation allows calculation of ordinate in the target system by adding the parameter value to the ordinate value of the point in the source system.","Vertical offset","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","V2 = [(V1 * U1) + (O12 * Uoff)] * (m / U2) where V2 = value in second vertical coordinate system; V1 = value in first system; O12 is the  [...]
-datafile_rows_t trf_method_row_18[] = {"9617","Madrid to ED50","","","","","","","A","B","C","D","E","F","G","H","J","","","","","","","","","","","","","","","","","","","","","","","","","The original geographic coordinate system for the Spanish mainland was based on Madrid 1870 datum, Struve 1860 ellipsoid, with longitudes related to the Madrid meridian.  Three polynomial expressions have been empirically derived by El Servicio Geogr�fico ","Input point coordinate system: Madrid 1870  [...]
-   Latitude    =  42 deg 38 min 52.77 sec N = 42.647992 degrees\
-   Longitude  =    3 deg 39 min 34.57 sec E of Madrid	\
-                         = +3.659603 degrees from the Madrid merid","1999-11-15 00:00:00","Institut de Geomatica; Barcelona","EPSG","","99.284  99.82",NULL};
-datafile_rows_t trf_method_row_19[] = {"9618","Geographical and Height Offsets","","This transformation allows calculation of coordinates in the target system by adding the parameter value to the coordinate values of the point in the source system.","Latitude offset","Longitude offset","Gravity-related to ellipsoid height","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Lat2 = Lat1 + latitude_offset;  Lon2 = Lon1 + longitude_offset;  [...]
-datafile_rows_t trf_method_row_20[] = {"9619","Geographical Offsets","","This transformation allows calculation of coordinates in the target system by adding the parameter value to the coordinate values of the point in the source system.","Latitude offset","Longitude offset","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Lat2 = Lat1 + latitude_offset;  Lon2 = Lon1 + longitude_offset.","","1999-11-12 00:00:00","","EPSG","","99.79",NULL};
-datafile_rows_t trf_method_row_21[] = {"9620","Norway Offshore Interpolation","","","","","","","","Geod. tfm. code for northern boundary","Geod. tfm. code for southern boundary","","","","","","","","","","","","","","","","","","","","","","","","","","","","Geod. tfm. name for northern boundary","Geod. tfm. name for southern boundary","","","","1999-04-22 00:00:00","Norwegian Mapping Authority note of 13-Feb-1991 \"Om Transformasjon mellom Geodetiske Datum i Norge\".","EPSG","","",NULL};
-datafile_rows_t trf_method_row_22[] = {"9801","Lambert Conic Conformal (1SP)","","","Latitude of natural origin","Longitude of natural origin","","","Scale factor at natural origin","False easting","False northing","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","To derive the projected Easting and Northing coordinates of a point with geographical coordinates (lat,lon) the formulas for the one standard parallel case are:\
-\
-E = FE + r sin(theta)\
-N = FN + r0 - r cos(theta)\
-where\
-n = sin lat0\
-r = a F t^n k0     f","For Projected Coordinate System JAD69 / Jamaica National Grid\
-\
-Parameters:\
-Ellipsoid:  Clarke 1866, a = 6378206.400 m., 1/f = 294.97870\
-                                   then  e = 0.08227185 and e^2 = 0.00676866\
-\
-Latitude Natural Origin         18 d","1996-09-18 00:00:00","EPSG Guidance note #7; \"Geographic and Projected Coordinate System Transformations\"; section 1.4.1","EPSG","","",NULL};
-datafile_rows_t trf_method_row_23[] = {"9802","Lambert Conic Conformal (2SP)","","","Latitude of false origin","Longitude of false origin","Latitude of 1st standard parallel","Latitude of 2nd standard parallel","","Easting at false origin","Northing at false origin","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","To derive the projected Easting and Northing coordinates of a point with geographical coordinates (lat,lon) the formulas for the one s [...]
-\
-E = EF + r sin(theta)\
-N = NF + rF - r cos(theta)\
-where\
-m = cos(lat)/(1 - e^2 sin^2(lat))^","For Projected Coordinate System NAD27 / Texas South Central\
-\
-Parameters:\
-Ellipsoid  Clarke 1866, a = 6378206.400 metres = 20925832.16 US survey feet\
-                                   1/f = 294.97870\
-then e = 0.08227185 and e^2 = 0.00676866\
-\
-First S","1999-04-22 00:00:00","EPSG Guidance note #7; \"Geographic and Projected Coordinate System Transformations\"; section 1.4.1","EPSG","","99.281",NULL};
-datafile_rows_t trf_method_row_24[] = {"9803","Lambert Conic Conformal (2SP Belgium)","","","Latitude of false origin","Longitude of false origin","Latitude of 1st standard parallel","Latitude of 2nd standard parallel","","Easting at false origin","Northing at false origin","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Since 1972 a modified form of the two standard parallel case has been used in Belgium.  For the Lambert Conic Conformal (2 SP  [...]
-Easting, E = EF + r sin (theta - alpha)","For Projected Coordinate System Belge l972 / Belge Lambert 72\
-\
-Parameters:\
-Ellipsoid  International 1924,  a = 6378388 metres\
-                                              1/f = 297\
-then e = 0.08199189 and e^2 = 0.006722670\
-\
-First Standard Parallel ","1999-04-22 00:00:00","EPSG Guidance note #7; \"Geographic and Projected Coordinate System Transformations\"; section 1.4.1","EPSG","","99.281",NULL};
-datafile_rows_t trf_method_row_25[] = {"9804","Mercator (1SP)","","","Latitude of natural origin","Longitude of natural origin","","","Scale factor at natural origin","False easting","False northing","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","The formulas to derive projected Easting and Northing coordinates are:\
-\
-E = FE + a*k0(lon - lon0)              \
-N = FN + a*k0* ln{tan(pi/4 + lat/2)[(1 - esin(lat))(1 + esin(lat))]^e/2} where symbols are as listed above and logarithms are natural.\
-\
-The","For Projected Coordinate System Makassar / NEIEZ\
-\
-Parameters:\
-Ellipsoid   Bessel 1841  a = 6377397.155 m   1/f = 299.15281\
-then e = 0.08169683\
-\
-Latitude Natural Origin         00o00'00\"N  = 0.0000000 rad\
-Longitude Natural Origin    110o00'00\"E  = 1.","1996-09-18 00:00:00","EPSG Guidance note #7; \"Geographic and Projected Coordinate System Transformations\"; section 1.4.2","EPSG","","",NULL};
-datafile_rows_t trf_method_row_26[] = {"9805","Mercator (2SP)","","","Latitude of 1st standard parallel","Longitude of natural origin","","","","False easting","False northing","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","The formulas to derive projected Easting and Northing coordinates are:\
-\
-For the two standard parallel case, k0 is first calculated from\
-\
-k0 = cos(latSP1)/(1 - e^2*sin^2(latSP1))^0.5 \
- \
-where latSP1 is the absolute value of the first standard parallel","For Projected Coordinate System Pulkovo 1942 / Mercator Caspian Sea\
-\
-Parameters:\
-Ellipsoid  Krassowski 1940   a = 6378245.00m   1/f = 298.300\
-then e = 0.08181333 and e^2 = 0.00669342\
-\
-Latitude first SP                             42o00'00\"N = 0.73303","1996-09-18 00:00:00","EPSG Guidance note #7; \"Geographic and Projected Coordinate System Transformations\"; section 1.4.2","EPSG","","",NULL};
-datafile_rows_t trf_method_row_27[] = {"9806","Cassini-Soldner","","","Latitude of natural origin","Longitude of natural origin","","","","False easting","False northing","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","The formulas to derive projected Easting and Northing coordinates are:\
-\
-Easting E = FE + nu[A - TA^3/6 -(8 - T + 8C)TA^5/120]\
-\
-Northing N = FN + M - M0 + nu*tan(lat)*[A^2/2 + (5 - T + 6C)A^4/24]\
-\
-where A = (lon - lon0)cos(lat)\
-T = tan^2(lat)\
-C = e2","For Projected Coordinate System Trinidad 1903 / Trinidad Grid \
-Parameters:\
-Ellipsoid   Clarke 1858     a = 20926348 ft    = 31706587.88 links\
-                                        b = 20855233 ft\
-\
-then 1/f = 294.97870 and e^2 = 0.00676866\
-\
-Latitud","1996-09-18 00:00:00","EPSG Guidance note #7; \"Geographic and Projected Coordinate System Transformations\"; section 1.4.3","EPSG","","",NULL};
-datafile_rows_t trf_method_row_28[] = {"9807","Transverse Mercator","","","Latitude of natural origin","Longitude of natural origin","","","Scale factor at natural origin","False easting","False northing","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","The formulas to derive the projected Easting and Northing coordinates are in the form of a series as follows:\
-\
-Easting, E =  FE + k0*nu[A + (1 - T + C)A^3/6 + (5 - 18T + T^2 + 72C - 58e'sq)A^5/120]	\
-\
-Northing, N =  FN + k0{M - M0 + nu*tan(lat)[A^2/2 + ","For Projected Coordinate System OSGB 1936 / British National Grid\
-\
-Parameters:\
-Ellipsoid  Airy 1830  a = 6377563.396 m  1/f = 299.32496\
-then e'^2 = 0.00671534 and e^2 = 0.00667054\
-\
-Latitude Natural Origin         49o00'00\"N   = 0.85521133 rad\
-Longit","1996-09-18 00:00:00","EPSG Guidance note #7; \"Geographic and Projected Coordinate System Transformations\"; section 1.4.4","EPSG","","",NULL};
-datafile_rows_t trf_method_row_29[] = {"9808","Transverse Mercator (South Orientated)","","","Latitude of natural origin","Longitude of natural origin","","","Scale factor at natural origin","False easting","False northing","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","For the mapping of southern Africa a south oriented Transverse Mercator projection is used. Here the coordinate axes are called Westings and Southings and increment to the West  [...]
-datafile_rows_t trf_method_row_30[] = {"9809","Oblique Stereographic","","","Latitude of natural origin","Longitude of natural origin","","","Scale factor at natural origin","False easting","False northing","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","The coordinate transformation from geographical to projected coordinates is executed via the distance and azimuth of the point from the centre point or origin. For a sphere the formulas are rela [...]
-\
-Parameters:\
-Ellipsoid   Bessel 1841    a = 6377397.155 m    1/f = 299.15281\
-then e = 0.08169683\
-\
-Latitude Natural Origin      52o09'22.178\"N  = 0.910296727 rad\
-Longitude Natural Origin     5o23'1","1999-11-15 00:00:00","EPSG Guidance note #7; \"Geographic and Projected Coordinate System Transformations\"; section 1.4.6","EPSG","","99.811",NULL};
-datafile_rows_t trf_method_row_31[] = {"9810","Polar Stereographic","","","Latitude of natural origin","Longitude of natural origin","","","Scale factor at natural origin","False easting","False northing","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","For the forward transformation from latitude and longitude,\
-\
-E = FE + rho sin(lon - lon0)\
-N = FN - rho cos(lon - lon0)\
-where\
-rho = 2 a ko t /{[((1+e)^(1+e)) ((1-e)^(1-e))]^0.5}\
-t = tan (pi/4 - lat/2) / [(1-esin(lat) ) / (1 + e sin(lat))]^(e/2)\
-\
-For","","1996-09-18 00:00:00","US Geological Survey Professional Paper 1395; \"Map Projections - A Working Manual\";  J. Snyder","EPSG","","",NULL};
-datafile_rows_t trf_method_row_32[] = {"9811","New Zealand Map Grid","","","Latitude of natural origin","Longitude of natural origin","","","","False easting","False northing","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","1996-09-18 00:00:00","New Zealand Department of Lands technical circular 1973/32","EPSG","","",NULL};
-datafile_rows_t trf_method_row_33[] = {"9812","Hotine Oblique Mercator","","","Latitude of projection centre","Longitude of projection centre","Azimuth of initial line","Angle from Rectified to Skew Grid","Scale factor on initial line","False easting","False northing","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","The following constants for the projection may be calculated :\
-\
-B = (1 + esq * cos^4(latc) / (1 - esq ))^0.5\
-A = a * B * kc *(1 - esq )^0.5 / ( 1 - esq * sin^2(latc))\
-t0 = tan(pi/4 - latc/2) / ((1 - e*sin(latc)) / (1 + e*sin(latc)))^(e/2)\
-D = B (1 - e","For Projected Coordinate System  Timbalai 1948 / R.S.O. Borneo (m)\
-\
-Parameters:\
-	Ellipsoid:  Everest 1830 (1967 Definition)\
-				a = 6377298.556 metres 	1/f = 300.8017\
-				then	e = 0.081472981	e2 = 0.006637847\
-					\
-	Latitude Projection Centre	fc  	4","1999-11-15 00:00:00","EPSG Guidance note #7; \"Geographic and Projected Coordinate System Transformations\"; section 1.4.5","EPSG","","97.62  99.811",NULL};
-datafile_rows_t trf_method_row_34[] = {"9813","Laborde Oblique Mercator","","","Latitude of projection centre","Longitude of projection centre","Azimuth of initial line","","Scale factor on initial line","False easting","False northing","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","1996-09-18 00:00:00","\"La nouvelle projection du Service Geographique de Madagascar\"; J. Laborde; 1928","EPSG","Can be accomodated by Oblique Mercator metho [...]
-datafile_rows_t trf_method_row_35[] = {"9814","Swiss Oblique Cylindrical","","","Latitude of projection centre","Longitude of projection centre","","","","Easting at projection centre","Northing at projection centre","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","1996-09-18 00:00:00","\"Die projecktionen der Schweizerischen Plan und Kartenwerke\"; J Bollinger; 1967","EPSG","Can be accomodated by Oblique Mercator method (code 9815).","97.6 [...]
-datafile_rows_t trf_method_row_36[] = {"9815","Oblique Mercator","","","Latitude of projection centre","Longitude of projection centre","Azimuth of initial line","Angle from Rectified to Skew Grid","Scale factor on initial line","Easting at projection centre","Northing at projection centre","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","The following constants for the projection may be calculated :\
-\
-B = (1 + esq * cos^4(latc) / (1 - esq ))^0.5\
-A = a * B * kc *(1 - esq )^0.5 / ( 1 - esq * sin^2(latc))\
-t0 = tan(pi/4 - latc/2) / ((1 - e*sin(latc)) / (1 + e*sin(latc)))^(e/2)\
-D = B (1 - e","","1999-11-15 00:00:00","EPSG Guidance note #7; \"Geographic and Projected Coordinate System Transformations\"; section 1.4.5","EPSG","","99.811",NULL};
-datafile_rows_t trf_method_row_37[] = {"9816","Tunisia Mining Grid","","","Latitude of origin","Longitude of origin","","","","False easting","False northing","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","This grid is used as the basis for mineral leasing in Tunsia.  Lease areas are approximately 2 x 2 km or 400 hectares.  The corners of these blocks are defined through a six figure grid reference where the first three digits are an easting in [...]
-Latitude = 36.5964 + [(598 - 360) * A].  As N > 360, A = 0.010015.\
-Latitude = 38.97997 grads = 35.08197 degrees.\
-\
-Longitude  = 7.83445 + [(E - 270) * 0.012185, where E = 302.\
-Longitude  = 8.22437 grads east of Paris = 9.73916","1999-11-15 00:00:00","EPSG Guidance note #7; \"Geographic and Projected Coordinate System Transformations\"; section 1.4.8","EPSG","","99.811",NULL};
-datafile_rows_t trf_method_row_38[] = {"9817","Lambert Conic Near-Conformal","","","Latitude of natural origin","Longitude of natural origin","","","Scale factor at natural origin","False easting","False northing","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","To compute the Lambert Conic Near-Conformal the following formulae are used;\
-\
-E = FE + r sin(theta)\
-N = FN + M + r sin(theta) tan(theta/2) using the natural origin rather than the false origin.\
-\
-Compute constants for the ellipse:\
-\
-n = (a-b)/(a+b)  ","For Projected Coordinate System: Deir ez Zor / Levant Zone\
-\
-Parameters:\
-Ellipsoid  Clarke 1880 (IGN)  a = 6378249.2 m  1/f = 293.46602\
-then b = 6356515.000    n = 0.001706682563\
-\
-Latitude Natural Origin  = 34o 39'00\" N = 0.604756586 rad\
-Longitude Na","1999-11-15 00:00:00","EPSG Guidance note #7; \"Geographic and Projected Coordinate System Transformations\"; section 1.4.1.1","EPSG","","99.811",NULL};
-datafile_rows_t trf_method_row_39[] = {"9818","American Polyconic","","","Latitude of natural origin","Longitude of natural origin","","","","False easting","False northing","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","1999-10-20 00:00:00","US Geological Survey Professional Paper 1395; \"Map Projections - A Working Manual\";  J. Snyder","EPSG","","99.55",NULL};
-
-datafile_rows_t *trf_method_rows[] = {trf_method_row_1,trf_method_row_2,trf_method_row_3,trf_method_row_4,trf_method_row_5,trf_method_row_6,trf_method_row_7,trf_method_row_8,trf_method_row_9,trf_method_row_10,trf_method_row_11,trf_method_row_12,trf_method_row_13,trf_method_row_14,trf_method_row_15,trf_method_row_16,trf_method_row_17,trf_method_row_18,trf_method_row_19,trf_method_row_20,trf_method_row_21,trf_method_row_22,trf_method_row_23,trf_method_row_24,trf_method_row_25,trf_method_ro [...]
diff --git a/src/tiff/csv/trf_method.csv b/src/tiff/csv/trf_method.csv
deleted file mode 100644
index 7caa6af..0000000
--- a/src/tiff/csv/trf_method.csv
+++ /dev/null
@@ -1,984 +0,0 @@
-"COORD_TRF_METHOD_CODE","CTRF_METHOD_EPSG_NAME","CTRF_METHOD_USER_NAME","DESCRIPTION","PARAM_1_NAME","PARAM_2_NAME","PARAM_3_NAME","PARAM_4_NAME","PARAM_5_NAME","PARAM_6_NAME","PARAM_7_NAME","PARAM_8_NAME","PARAM_9_NAME","PARAM_10_NAME","PARAM_11_NAME","PARAM_12_NAME","PARAM_13_NAME","PARAM_14_NAME","PARAM_15_NAME","PARAM_16_NAME","PARAM_17_NAME","PARAM_18_NAME","PARAM_19_NAME","PARAM_20_NAME","PARAM_21_NAME","PARAM_22_NAME","PARAM_23_NAME","PARAM_24_NAME","PARAM_25_NAME","PARAM_26_NAME" [...]
-9601,Longitude rotation,,This transformation allows calculation of coordinates in the target system by adding the parameter value to the coordinate values of the point in the source system.,Longitude rotation,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,Lon2 = Lon1 + longitude_rotation.,,1999-11-12 00:00:00,,EPSG,,99.79
-9602,Geodetic/geocentric conversions,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"Latitude, P, and Longitude, L, in terms of Geographic Coordinate System (GCS) A may \
-be expressed in terms of a geocentric (earth centred) cartesian coordinate system X, Y, Z \
-with the Z axis corresponding with the Polar axis positive northwards, the X axis through \
-the intersection of the Greenwich meridian and equator, and the Y axis through the \
-intersection of the equator with longitude 90 degrees E. If the GCS's prime meridian is not \
-Greewich, longitudes must first be converted to their Greenwich equivalent. If the earth's \
-spheroidal semi major axis is a, semi minor axis  b, and inverse flattening 1/f,  then\
-\
-   XA=   (nu + hA) cos P cos L\
-   YA=   (nu + hA) cos P sin L\
-   ZA=  ((1 - e^2) nu + hA) sin P\
-\
-where nu is the prime vertical radius of curvature at latitude P and is equal to \
-   nu = a /(1 - e^2*sin^2(P))^0.5,\
-   P and L are respectively the latitude and longitude (related to Greenwich) of the \
-point \
-   h is height above the ellipsoid, (topographic height plus geoidal height), and\
-   e is the eccentricity of the ellipsoid where e^2 = (a^2 -b^2)/a^2 = 2f -f^2\
-                                                                                                                                                   Cartesian coordinates in geocentric coordinate system  B may be used \
-to derive geographical coordinates in terms of geographic coordinate system B by:\
-   P   =  arctan (ZB + e^2* nu*sin P) / (XB^2 + YB^2)^0.5 by iteration\
-   L   = arctan YB/XB\
-   hB  =  XB sec L sec P  - nu\
-\
-where LB is relative to Greenwich. If the geographic system has a non Greenwich prime \
-meridian, the Greenwich value of the local prime meridian should be applied to longitude.\
-\
-(Note that h is the height above the ellipsoid. This is the height value which is \
-delivered by Transit and GPS satellite observations but is not the topographic \
-height value which is normally used for national mapping and levelling operations. \
-The topographic height is usually the height above mean sea level or an alternative \
-level reference for the country. If one starts with a topographic height,  it will be \
-necessary to convert it to an ellipsoid height before using the above transformation \
-formulas. h = N + H, where N is the geoid height above the ellipsoid at the point \
-and is sometimes negative, and H is the height of the point above the geoid. The \
-height above the geoid is often taken to be that above mean sea level, perhaps with \
-a constant correction applied. Geoid heights of points above the nationally used \
-ellipsoid may not be readily available. For the WGS84 ellipsoid the value of N, \
-representing the height of the geoid relative to the ellipsoid, can vary between \
-values of -100m in the Sri Lanka area to +60m in the North Atlantic.)","Consider a North Sea point with coordinates derived by GPS satellite in the WGS84 geographical coordinate system with coordinates of:\
-\
-           latitude    53 deg 48 min 33.82 sec N, \
-           longitude 02 deg 07 min 46.38 sec E, \
-    and ellipsoidal height 73.0m, \
-\
-whose coordinates are required in terms of the ED50 geographical coordinate system which takes the International 1924 ellipsoid. The three parameter datum shift from WGS84 to ED50 for this North Sea area is given as dX = +84.87m, dY = +96.49m, dZ = +116.95m. \
-\
-The WGS84 geographical coordinates convert to the following geocentric values using the above formulas for X, Y, Z:\
-\
-   XA = 3771 793.97m\
-   YA =   140 253.34m\
-   ZA = 5124 304.35m\
-\
-Applying the quoted datum shifts to these, we obtain new geocentric values now related to ED50:\
-\
-   XB = 3771 878.84m\
-   YB =   140 349.83m\
-   ZB = 5124 421.30m\
-\
-These convert to ED50 values on the International 1924 ellipsoid as:\
-           latitude    53 deg 48 min 36.565 sec N, \
-           longitude 02 deg 07 min 51.477 sec E, \
-    and ellipsoidal height 28.02 m, \
-\
-Note that the derived height is referred to the International 1924 ellipsoidal surface and will need a further correction for the height of the geoid at this point in order to relate it to Mean Sea Level.",1996-09-18 00:00:00,"\"Transformation from spatial to geographical coordinates\"; B. R. Bowring; Survey Review number 181; July 1976.",EPSG,,97.29
-9603,Geocentric translations,,,X-axis translation,Y-axis translation,Z-axis translation,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"If  we may assume that the minor axes of the ellipsoids are parallel, then shifts dX, dY, dZ \
-in the sense from datum A to datum B may then be applied as\
-\
-   XB = XA + dX \
-   YB = YA + dY\
-   ZB = ZA + dZ","Given a three parameter datum shift from WGS84 to ED50 for this North Sea area is given as \
-dX = +84.87m, dY = +96.49m, dZ = +116.95m. \
-\
-The WGS84 geographical coordinates convert to the following GS84 geocentric values using \
-the above formulas for X, Y, Z:\
-\
-   XA = 3771 793.97m\
-   YA =   140 253.34m\
-   ZA = 5124 304.35m\
-\
-Applying the given datum shifts to these, we obtain new geocentric values now related \
-to ED50:\
-\
-   XB = 3771 878.84m\
-   YB =   140 349.83m\
-   ZB = 5124 421.30m",1996-09-18 00:00:00,POSC Epicentre 2.2.1,EPSG,,
-9604,Molodenski,,,X-axis translation,Y-axis translation,Z-axis translation,Semi-major axis length difference,Flattening difference,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1996-09-18 00:00:00,,EPSG,,
-9605,Abridged Molodenski,,,X-axis translation,Y-axis translation,Z-axis translation,Semi-major axis length difference,Flattening difference,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"As an alternative to the computation of the new latitude, longitude and height above ellipsoid in discrete steps through geocentric coordinates, the changes in these coordinates may be derived directly by formulas derived by Molodenski. Abridged versions of these formulas, which are quite satisfactory for three parame [...]
-\
-Dlat \" = [(-dX*sin(lat)*cos(lon)) - (dY*sin(lat)*sin(lon)) + (dZ*cos(lat)) + (((a*Df) + (f*Da))*sin(2*lat))] / (rho * sin(1\"))\
-\
-Dlon \" = (-dX*sin(lon) + dY*cos(lon)) / ((nu*cos(lat)) * sin(1\"))\
-\
-Dh = (dX*cos(lat)*cos(lon)) + (dY*cos(lat)*sin(lon)) + (dZ*sin(lat)) + ((a*Df + f*Da)*(sin(lat)^2)) - Da\
-\
-where the dX, dY and dZ terms are as before, and rho and nu are the meridian and prime vertical radii of curvature at the given latitude (lat) on the first ellipsoid (see section 1.4), Da is the difference in the semi-major axes (a1 - a2) of the first and second ellipsoids and Df  is the difference in the flattening of the two ellipsoids.\
-\
-The formulas for Dlat and Dlon indicate changes in latitude and longitude in arc-seconds.",,1999-04-22 00:00:00,,EPSG,,99.01
-9606,Position Vector 7-param. transformation,,,X-axis translation,Y-axis translation,Z-axis translation,X-axis rotation,Y-axis rotation,Z-axis rotation,Scale difference,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"Transformation of coordinates from one geographic coordinate system into another (also known as a \"datum transformation\") is usually carried out as an implicit concatenation of three transformations:\
-[geographical to geocentric >> geocentric to geocentric >> geocentric to geographic]\
-\
-The middle part of the concatenated transformation, from geocentric to geocentric, is usually described as a simplified 7-parameter Helmert transformation, expressed in matrix form with 7 parameters, in what is known as the \"Bursa-Wolf\" formula:\
-\
-   (X�)             (  1       -Rz    +Ry)      (X)     (dX)\
-   (Y�)  =  M * ( +Rz     1      -Rx)  *  (Y)  + (dY)\
-   (Z�)              ( -Ry   +Rx       1 )      (Z)      (dZ)\
-\
-The parameters are commonly referred to defining the datum transformation \"from Datum 'A' to Datum 'B'\", whereby (X, Y, Z) are the geocentric coordinates of the point on Datum �A� and (X�, Y�, Z�) are the geocentric coordinates of the point on Datum �B�.  However, that does not define the parameters uniquely; neither is the definition of the parameters implied in the formula, as is often believed.  However, the following definition, which is consistent witth the \"Position Vector Trans [...]
-\
-(dX, dY, dZ)   :Translation vector, to be added to the point's position vector in coordinate system 'A' in order to transform from system 'A' to system 'B'; also: the coordinates of the origin of system 'A' in the 'B' frame.\
-\
-(Rx, Ry, Rz)   :Rotations to be applied to the point's vector.  The sign convention is such that a positive rotation about an axis is defined as a clockwise rotation of the position vector when viewed from the origin of the Cartesian coordinate system in the positive direction of that axis. E.g. a positive rotation about the Z-axis only from system 'A' to system 'B' will result in a larger longitude value for the point in system 'B'.\
-\
-M                  :	The scale correction to be made to the position vector in coordinate system 'A' in order to obtain the correct scale of coordinate system 'B'. M = (1+S*10 6), whereby S is the scale correction expressed in parts per million.  \
-\
-<<<<<This text continues in the description of the Coordinate Frame Rotation formula>>>>>","Input point: \
-Coordinate system: WGS72 (geographic 3D)\
-  Latitude =   55 deg 00 min 00 sec \
-  Longitude =  4 deg 00 min 00 sec \
-  Ellipsoidal height =  0 m\
-This transforms to cartesian geocentric coords:\
-    X = 3 657 660.66 (m)  \
-    Y =    255 768.55 (m)\
-    Z = 5 201 382.11 (m)\
-\
-Transformation parameters WGS72 to WGS84:\
-   dX (m) = 0.000 \
-   dY (m) = 0.000 \
-   dZ (m) = +4.5\
-   RX (\") = 0.000 \
-   RY (\") = 0.000\
-   RZ (\") = +0.554\
-   Scale (ppm) = +0.219\
-\
-Application of the 7 parameter Position Vector Transformation results in WGS 84 coordinates of:\
-   X = 3 657 660.78 (m)\
-   Y =    255 778.43 (m)\
-   Z = 5 201 387.75 (m)\
-This converts into:\
-   Latitude =   55 deg 00 min 00.090 sec\
-   Longitude =  4 deg 00 min 00.554 sec\
-   Ellipsoidal height =  +3.22 m",1996-09-18 00:00:00,,EPSG,,98.16
-9607,Coordinate Frame rotation,,,X-axis translation,Y-axis translation,Z-axis translation,X-axis rotation,Y-axis rotation,Z-axis rotation,Scale difference,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"<<<<<This text is continued from the description of the Position Vector Transformation formula>>>>>\
-\
-Although being common practice in particularly the European E&P industry Position Vector Transformation sign convention is not universally accepted.  A variation on this formula is also used, particularly in the USA E&P industry.  That formula is based on the same definition of translation and scale parameters, but a different definition of the rotation parameters.  The associated convention is known as the \"Coordinate Frame Rotation\" convention. \
-The formula is:\
-\
-   (X�)             (  1      +Rz      -Ry)    (X)      (dX)\
-   (Y�)  =  M * ( -Rz      1      +Rx) * (Y)  +  (dY)\
-   (Z�)              ( +Ry   -Rx        1 )    (Z)       (dZ)\
-\
-and the parameters are defined as:\
-\
-(dX, dY, dZ)   : Translation vector, to be added to the point's position vector in coordinate system 'A' in order to transform from system 'A' to system 'B'; also: the coordinates of the origin of system 'A' in the 'B' frame.\
-\
-(Rx, Ry, Rz)   : Rotations to be applied to the coordinate frame.  The sign convention is such that a positive rotation of the frame about an axis is defined as a clockwise rotation of the coordinate frame when viewed from the origin of the Cartesian coordinate system in the positive direction of that axis, that is a positive rotation about the Z-axis only from system 'A' to system 'B' will result in a smaller longitude value for the point in system 'B'.\
-\
-M                  : The scale factor to be applied to the position vector in coordinate system 'A' in order to obtain the correct scale of coordinate system 'B'. M = (1+S*10 6), whereby S is the scale correction expressed in parts per million.\
-\
-In the absence of rotations the two formulas are identical; the difference is solely in the rotations. The name of the second method reflects this.\
-\
-Note that the same rotation that is defined as positive in the first method is consequently negative in the second and vice versa.  It is therefore crucial that the convention underlying the definition of the rotation parameters is clearly understood and is communicated when exchanging datum transformation parameters, so that the parameters may be associated with the correct coordinate transformation method (algorithm).","The same example as for the Position Vector Transformation can be  [...]
-\
-Transformation parameters Coordinate Frame Rotation convention:\
-dX (m) = 0.000 \
-dY (m) = 0.000 \
-dZ (m) = +4.5 \
-RX (\") = 0.000\
-RY (\") = 0.000\
-RZ (\") = -0.554\
-Scale (ppm) = +0.219\
-\
-Please note that only the rotation has changed sign as compared to the Position Vector Transformation.",1996-09-18 00:00:00,,EPSG,,
-9608,Similarity transform,,,A1,A2 * m,A3 * n,B1,B2 * m,B3 * n,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1996-09-18 00:00:00,,EPSG,,
-9609,2-dimensional Affine transformation,,,A1,A2 * m,A3 * n,B1,B2 * m,B3 * n,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1996-09-18 00:00:00,,EPSG,,
-9610,2nd-order Polynomial function,,,Ordinate 1 of source evaluation point,Ordinate 2 of source evaluation point,Ordinate 1 of target evaluation point,Ordinate 2 of target evaluation point,A1,A2 * m,A3 * n,A4 * mm,A5 * mn,A6 * nn,B1,B2 * m,B3 * n,B4 * mm,B5 * mn,B6 * nn,,,,,,,,,,,,,,,,,,,,,,,,1996-09-18 00:00:00,,EPSG,,
-9611,3rd-order Polynomial function,,,Ordinate 1 of source evaluation point,Ordinate 2 of source evaluation point,Ordinate 1 of target evaluation point,Ordinate 2 of target evaluation point,A1,A2 * m,A3 * n,A4 * mm,A5 * mn,A6 * nn,A7 * mmm,A8 * mmn,A9 * mnn,A10 * nnn,B1,B2 * m,B3 * n,B4 * mm,B5 * mn,B6 * nn,B7 * mmm,B8 * mmn,B9 * mnn,B10 * nnn,,,,,,,,,,,,,,,,1996-09-18 00:00:00,,EPSG,,
-9612,4th-order Polynomial function,,,Ordinate 1 of source evaluation point,Ordinate 2 of source evaluation point,Ordinate 1 of target evaluation point,Ordinate 2 of target evaluation point,A1,A2 * m,A3 * n,A4 * mm,A5 * mn,A6 * nn,A7 * mmm,A8 * mmn,A9 * mnn,A10 * nnn,A11 * mmmm,A12 * mmmn,A13 * mmnn,A14 * mnnn,A15 * nnnn,B1,B2 * m,B3 * n,B4 * mm,B5 * mn,B6 * nn,B7 * mmm,B8 * mmn,B9 * mnn,B10 * nnn,B11 * mmmm,B12 * mmmn,B13 * mmnn,B14 * mnnn,B15 * nnnn,,,,"For TRF_POLYNOMIAL 1000, m=Latitu [...]
-9613,NADCON,,Geodetic transformation operating on geographic coordinate differences by bi-linear interpolation.  Used specifically for some NAD27<->NAD83 transformations in USA.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,Latitude difference gridded binary file,Longitude difference gridded binary file,,,,1996-09-18 00:00:00,US Coast and geodetic Survey - http://www.ngs.noaa.gov,EPSG,Input expects longitudes to be positive west.,
-9614,NTv1,,Geodetic transformation operating on geographic coordinate differences by bi-linear interpolation.  Used specifically for some NAD27<->NAD83 transformations in Canada.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,Latitude and longitude difference file,,,,,1997-11-13 00:00:00,Geomatics Canada - Geodetic Survey Division.,EPSG,Superceded in 1997 by NTv2 (transformation method code 9615).   Input expects longitudes to be positive west.,
-9615,NTv2,,Geodetic transformation operating on geographic coordinate differences by bi-linear interpolation.,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,Latitude and longitude difference file,,,,,1997-11-13 00:00:00,http://www.geod.nrcan.gc.ca/products/html-public/GSDapps/English/NTv2_Fact_Sheet.html,EPSG,Supercedes  NTv1 (transformation method code 9614).  Input expects longitudes to be positive west.,
-9616,Vertical Offset,,This transformation allows calculation of ordinate in the target system by adding the parameter value to the ordinate value of the point in the source system.,Vertical offset,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,V2 = [(V1 * U1) + (O12 * Uoff)] * (m / U2) where V2 = value in second vertical coordinate system; V1 = value in first system; O12 is the value of the the origin of system 2 in system 1; m is unit direction multiplier (m=1 if both systems are height or both ar [...]
-9617,Madrid to ED50,,,,,,,A,B,C,D,E,F,G,H,J,,,,,,,,,,,,,,,,,,,,,,,,,"The original geographic coordinate system for the Spanish mainland was based on Madrid 1870 datum, Struve 1860 ellipsoid, with longitudes related to the Madrid meridian.  Three polynomial expressions have been empirically derived by El Servicio Geogr�fico del Ej�rcito to convert geographical coordinates based on this system to equivalent values based on the European Datum of 1950 (ED50).  The polynomial coefficients der [...]
-\
-The polynomial expressions transformations are:\
-\
-      dLat seconds = A + (B*lon) + (C*lat) + (D*h)\
-      dLon seconds =  (E+F) + (G*lon) + (H*lat) + (J*h)\
-\
-where latitude lat and longitude lon are in decimal degrees referred to the Madrid 1870 (Madrid) geographic coordinate system and h in metres.  E is the longitude (in seconds) of the Madrid meridian measured from the Greenwich meridian; it is the value to be applied to a longitude relative to the Madrid meridian to transform it to a longitude relative to the Greenwich meridan.\
-\
-The results of these expressions are applied through the formulae:\
-Lat(ED50) = Lat(M1870(M))  + dLat\
-and Lon(ED50) = Lon(M1870(M))  + dLon.","Input point coordinate system: Madrid 1870 (Madrid) (geographic 3D)\
-   Latitude    =  42 deg 38 min 52.77 sec N = 42.647992 degrees\
-   Longitude  =    3 deg 39 min 34.57 sec E of Madrid	\
-                         = +3.659603 degrees from the Madrid meridian.\
-   Height =  0 m\
-\
-For the north zone transformation:\
-A = 11.3287790\
-B = -0.0385200\
-C = -0.1674000\
-D = 0.0000379\
-E = -13276.58\
-F = 2.5079425\
-G = -0.0086400\
-H = 0.835200\
-J = -0.0000038\
-\
-dLat = +4.05 seconds\
-\
-Then ED50 latitude = 42 deg 38 min 52.77 sec N + 4.05sec\
-= 42 deg 38 min 56.82 sec N\
-\
-\
-dLon = -13270.54 seconds  = -3 deg 41 min 10.54 sec\
-\
-Then ED50 longitude = 3 deg 39 min 34.57 sec E - 3 deg 41 min 10.54 sec\
-= 0 deg 01 min 35.97 sec W of Greenwich.",1999-11-15 00:00:00,Institut de Geomatica; Barcelona,EPSG,,99.284  99.82
-9618,Geographical and Height Offsets,,This transformation allows calculation of coordinates in the target system by adding the parameter value to the coordinate values of the point in the source system.,Latitude offset,Longitude offset,Gravity-related to ellipsoid height,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,Lat2 = Lat1 + latitude_offset;  Lon2 = Lon1 + longitude_offset; EllipsoidHeight2 = GravityHeight1 + gravity-related_to_ellipsoid_height.,,1999-11-12 00:00:00,,EPSG,,99.79
-9619,Geographical Offsets,,This transformation allows calculation of coordinates in the target system by adding the parameter value to the coordinate values of the point in the source system.,Latitude offset,Longitude offset,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,Lat2 = Lat1 + latitude_offset;  Lon2 = Lon1 + longitude_offset.,,1999-11-12 00:00:00,,EPSG,,99.79
-9620,Norway Offshore Interpolation,,,,,,,,Geod. tfm. code for northern boundary,Geod. tfm. code for southern boundary,,,,,,,,,,,,,,,,,,,,,,,,,,,,Geod. tfm. name for northern boundary,Geod. tfm. name for southern boundary,,,,1999-04-22 00:00:00,"Norwegian Mapping Authority note of 13-Feb-1991 \"Om Transformasjon mellom Geodetiske Datum i Norge\".",EPSG,,
-9801,Lambert Conic Conformal (1SP),,,Latitude of natural origin,Longitude of natural origin,,,Scale factor at natural origin,False easting,False northing,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"To derive the projected Easting and Northing coordinates of a point with geographical coordinates (lat,lon) the formulas for the one standard parallel case are:\
-\
-E = FE + r sin(theta)\
-N = FN + r0 - r cos(theta)\
-where\
-n = sin lat0\
-r = a F t^n k0     for r0, and r\
-m = cos(lat)/(1 - e^2 sin^2(lat))^0.5     for m0, lat0, and m2, lat2 where lat1 and lat2 are the latitudes of the standard parallels.\
-t  = tan(pi/4 - lat/2)/[(1 - e sin(lat))/(1 + e sin(lat))]^(e/2)   for t0 and t using lat0 and lat respectively.\
-F = m0/(n  t1^n)\
-theta = n(lon - lon0)\
-\
-The reverse formulas to derive the latitude and longitude of a point from its Easting and Northing values are:\
-\
-lat = pi/2 - 2arctan{t'[(1 - esin(lat))/(1 + esin(lat))]^(e/2)}\
-lon = theta'/n +lon0\
-where\
-theta' = arctan[(E - FE)/{r0 -(N - FN)}]\
-r' = +/-[(E - FE)^2 + {r0 - (N - FN)}^2]^0.5\
-t' = (r'/a k0 F)^(1/n)\
-and n, F, and rF are derived as for the forward calculation.","For Projected Coordinate System JAD69 / Jamaica National Grid\
-\
-Parameters:\
-Ellipsoid:  Clarke 1866, a = 6378206.400 m., 1/f = 294.97870\
-                                   then  e = 0.08227185 and e^2 = 0.00676866\
-\
-Latitude Natural Origin         18 deg 00 min 00 sec N  =  0.31415927 rad\
-Longitude Natural Origin     77 deg 00 min 00 sec W = -1.34390352 rad\
-Scale factor at origin            1.000000\
-False Eastings  FE               250000.00 m\
-False Northings FN              150000.00 m\
-\
-Forward calculation for: \
-Latitude:     17 deg 55 min 55.80 sec N  =  0.31297535 rad\
-Longitude:  76 deg 56 min 37.26 sec W = -1.34292061 rad\
-first gives\
-m0    =  0.95136402        t0 =  0.72806411\
-F       =  3.39591092        n  =  0.30901699\
-r        =  19643955.26     r0  =  19636447.86\
-theta =  0.00030374        t   =  0.728965259\
-\
-Then Easting E   =     255966.58 m\
-         Northing N =      142493.51 m\
-\
-Reverse calculation for the same easting and northing first gives\
-\
-theta' =  0.000303736\
-t'        =  0.728965259\
-m0     =  0.95136402\
-r'        =  19643955.26\
-\
-Then Latitude     = 17 deg 55 min 55.800 sec N\
-         Longitude  = 76 deg 56 min 37.260 sec W",1996-09-18 00:00:00,"EPSG Guidance note #7; \"Geographic and Projected Coordinate System Transformations\"; section 1.4.1",EPSG,,
-9802,Lambert Conic Conformal (2SP),,,Latitude of false origin,Longitude of false origin,Latitude of 1st standard parallel,Latitude of 2nd standard parallel,,Easting at false origin,Northing at false origin,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"To derive the projected Easting and Northing coordinates of a point with geographical coordinates (lat,lon) the formulas for the one standard parallel case are:\
-\
-E = EF + r sin(theta)\
-N = NF + rF - r cos(theta)\
-where\
-m = cos(lat)/(1 - e^2 sin^2(lat))^0.5     for m1, lat1, and m2, lat2 where lat1 and lat2 are the latitudes of the standard parallels.\
-t  = tan(pi/4 - lat/2)/[(1 - e sin(lat))/(1 + e sin(lat))]^(e/2)   for t1, t2, tF and t using lat1, lat2, latF and lat respectively.\
-n = (loge(m1) - loge(m2))/(loge(t1) - loge(t2))\
-F = m1/(n  t1^n)\
-r =  a F t^n         for rF and r, where rF is the radius of the parallel of latitude of the false origin.\
-theta = n(lon - lon0)\
-\
-The reverse formulas to derive the latitude and longitude of a point from its Easting and Northing values are:\
-\
-lat = pi/2 - 2arctan{t'[(1 - esin(lat))/(1 + esin(lat))]^(e/2)}\
-lon = theta'/n +lon0\
-where\
-r' = +/-[(E - EF)^2 + {rF - (N - NF)}^2]^0.5 , taking the sign of n\
-t' = (r'/aF)^(1/n)\
-theta' = arctan [(E- EF)/(rF - (N- NF))]\
-and n, F, and rF are derived as for the forward calculation.","For Projected Coordinate System NAD27 / Texas South Central\
-\
-Parameters:\
-Ellipsoid  Clarke 1866, a = 6378206.400 metres = 20925832.16 US survey feet\
-                                   1/f = 294.97870\
-then e = 0.08227185 and e^2 = 0.00676866\
-\
-First Standard Parallel          28o23'00\"N  =   0.49538262 rad\
-Second Standard Parallel    30o17'00\"N  =   0.52854388 rad\
-Latitude False Origin            27o50'00\"N  =   0.48578331 rad\
-Longitude False Origin         99o00'00\"W = -1.72787596 rad\
-Easting at false origin           2000000.00  US survey feet\
-Northing at false origin          0.00  US survey feet\
-\
-Forward calculation for: \
-Latitude       28o30'00.00\"N  =  0.49741884 rad\
-Longitude    96o00'00.00\"W = -1.67551608 rad\
-\
-first gives :\
-m1    = 0.88046050      m2 = 0.86428642\
-t        = 0.59686306      tF  = 0.60475101\
-t1      = 0.59823957      t2 = 0.57602212\
-n       = 0.48991263       F = 2.31154807\
-r        = 37565039.86    rF = 37807441.20\
-theta = 0.02565177\
-\
-Then Easting E =      2963503.91 US survey feet\
-         Northing N =      254759.80 US survey feet\
-\
-Reverse calculation for same easting and northing first gives:\
-theta' = 0.025651765     r' = 37565039.86\
-t'        = 0.59686306\
-\
-Then Latitude     	= 28o30'00.000\"N\
-         Longitude   = 96o00'00.000\"W",1999-04-22 00:00:00,"EPSG Guidance note #7; \"Geographic and Projected Coordinate System Transformations\"; section 1.4.1",EPSG,,99.281
-9803,Lambert Conic Conformal (2SP Belgium),,,Latitude of false origin,Longitude of false origin,Latitude of 1st standard parallel,Latitude of 2nd standard parallel,,Easting at false origin,Northing at false origin,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"Since 1972 a modified form of the two standard parallel case has been used in Belgium.  For the Lambert Conic Conformal (2 SP Belgium), the formulas for the standard two standard parallel case are used except for: \
-Easting, E = EF + r sin (theta - alpha)\
-Northing, N = NF + rF - r cos (theta - alpha)\
-and for the reverse formulas\
-lon = ((theta' + alpha)/n) +lon0\
-where alpha = 29.2985 seconds.","For Projected Coordinate System Belge l972 / Belge Lambert 72\
-\
-Parameters:\
-Ellipsoid  International 1924,  a = 6378388 metres\
-                                              1/f = 297\
-then e = 0.08199189 and e^2 = 0.006722670\
-\
-First Standard Parallel        49o50'00\"N       =   0.86975574 rad\
-Second Standard Parallel  51o10'00\"N       =   0.89302680 rad\
-Latitude False Origin          90o00'00\"N       =   1.57079633 rad\
-Longitude False Origin         4o21'24.983\"E = 0.07604294 rad\
-Easting at false origin EF        150000.01  metres\
-Northing at false origin NF    5400088.44  metres\
-\
-Forward calculation for: \
-Latitude        50o40'46.461\"N  =  0.88452540 rad\
-Longitude       5o48'26.533\"E   = 0.10135773 rad\
-\
-first gives :\
-m1     = 0.64628304         m2 = 0.62834001\
-t        = 0.59686306          tF  = 0.00000000\
-t1      = 0.36750382           t2 = 0.35433583\
-n       = 0.77164219            F = 1.81329763\
-r        = 37565039.86         rF = 0.00\
-alpha =	0.00014204     theta = 0.01953396\
-\
-Then Easting E  =      251763.20 metres\
-         Northing N =      153034.13 metres\
-\
-Reverse calculation for same easting and northing first gives:\
-theta' = 0.01939192      r' = 548041.03\
-t' = 0.35913403\
-Then Latitude   =    50o40'46.461\"N\
-         Longitude =     5o48'26.533\"E",1999-04-22 00:00:00,"EPSG Guidance note #7; \"Geographic and Projected Coordinate System Transformations\"; section 1.4.1",EPSG,,99.281
-9804,Mercator (1SP),,,Latitude of natural origin,Longitude of natural origin,,,Scale factor at natural origin,False easting,False northing,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"The formulas to derive projected Easting and Northing coordinates are:\
-\
-E = FE + a*k0(lon - lon0)              \
-N = FN + a*k0* ln{tan(pi/4 + lat/2)[(1 - esin(lat))(1 + esin(lat))]^e/2} where symbols are as listed above and logarithms are natural.\
-\
-The reverse formulas to derive latitude and longitude from E and N values are:\
-\
-lat = chi + (esq/2 + 5e^4/24 + e^6/12 + 13e^8/360) sin(2chi) \
-+ (7e^4/48 + 29e^6/240 + 811e^8/11520) sin(4chi)\
-+ (7e^6/120 +  81e^8/1120) sin(6chi)  + (4279e^8/161280) sin(8chi)\
-\
-where chi = pi/2 - 2 arctan t\
-t = B^((FN-N)/a*k0) \
-B = base of the natural logarithm, 2.7182818...\
-and  for the 2 SP Case, k0 is calculated as for the forward transformation above.\
-lon  =  ((E - FE)/a*k0)  + lon0","For Projected Coordinate System Makassar / NEIEZ\
-\
-Parameters:\
-Ellipsoid   Bessel 1841  a = 6377397.155 m   1/f = 299.15281\
-then e = 0.08169683\
-\
-Latitude Natural Origin         00o00'00\"N  = 0.0000000 rad\
-Longitude Natural Origin    110o00'00\"E  = 1.91986218 rad\
-Scale factor ko                  0.997\
-False Eastings FE              3900000.00 m\
-False Northings FN              900000.00 m\
-\
-Forward calculation for: \
-Latitude            3o00'00.00\"S   = -0.05235988 rad\
-Longitude     120o00'00.00\"E   =  2.09439510 rad\
-gives\
-Easting  E   =      5009726.58 m\
-Northing N  =        569150.82 m\
-\
-Reverse calculation for same easting and northing first gives :\
-t    = 1.0534121\
-chi = -0.0520110\
-\
-Then Latitude     =   3o00'00.000\"S\
-         Longitude  = 120o00'00.000\"E",1996-09-18 00:00:00,"EPSG Guidance note #7; \"Geographic and Projected Coordinate System Transformations\"; section 1.4.2",EPSG,,
-9805,Mercator (2SP),,,Latitude of 1st standard parallel,Longitude of natural origin,,,,False easting,False northing,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"The formulas to derive projected Easting and Northing coordinates are:\
-\
-For the two standard parallel case, k0 is first calculated from\
-\
-k0 = cos(latSP1)/(1 - e^2*sin^2(latSP1))^0.5 \
- \
-where latSP1 is the absolute value of the first standard parallel (i.e. positive).  \
-\
-Then, for both one and two standard parallel cases, \
-\
-E = FE + a*k0(lon - lon0)              \
-N = FN + a*k0* ln{tan(pi/4 + lat/2)[(1 - esin(lat))(1 + esin(lat))]^e/2} where symbols are as listed above and logarithms are natural.\
-\
-The reverse formulas to derive latitude and longitude from E and N values are:\
-\
-lat = chi + (esq/2 + 5e^4/24 + e^6/12 + 13e^8/360) sin(2chi) \
-+ (7e^4/48 + 29e^6/240 + 811e^8/11520) sin(4chi)\
-+ (7e^6/120 +  81e^8/1120) sin(6chi)  + (4279e^8/161280) sin(8chi)\
-\
-where chi = pi/2 - 2 arctan t\
-t = B^((FN-N)/a*k0) \
-B = base of the natural logarithm, 2.7182818...\
-and  for the 2 SP Case, k0 is calculated as for the forward transformation above.\
-lon  =  ((E - FE)/a*k0)  + lon0","For Projected Coordinate System Pulkovo 1942 / Mercator Caspian Sea\
-\
-Parameters:\
-Ellipsoid  Krassowski 1940   a = 6378245.00m   1/f = 298.300\
-then e = 0.08181333 and e^2 = 0.00669342\
-\
-Latitude first SP                             42o00'00\"N = 0.73303829 rad\
-Longitude Natural Origin                51o00'00\"E = 0.89011792 rad\
-False Eastings FE                          0.00 m\
-False Northings (at equator) FN     0.00 m\
-  \
-then natural origin at latitude of 0oN has scale factor k0=  0.74426089\
-\
-Forward calculation for: \
-Latitude        53o00'00.00\"N = 0.9250245 rad\
-Longitude     53o00'00.00\"E  = 0.9250245 rad\
-\
-gives Easting E   =     165704.29 m \
-          Northing N =   5171848.07 m\
-\
-Reverse calculation for same easting and northing first gives :\
-t = 0.33639129    chi = 0.92179596\
-\
-Then Latitude     =  53o00'00.000\"N\
-          Longitude  =  53o00'00.000\"E",1996-09-18 00:00:00,"EPSG Guidance note #7; \"Geographic and Projected Coordinate System Transformations\"; section 1.4.2",EPSG,,
-9806,Cassini-Soldner,,,Latitude of natural origin,Longitude of natural origin,,,,False easting,False northing,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"The formulas to derive projected Easting and Northing coordinates are:\
-\
-Easting E = FE + nu[A - TA^3/6 -(8 - T + 8C)TA^5/120]\
-\
-Northing N = FN + M - M0 + nu*tan(lat)*[A^2/2 + (5 - T + 6C)A^4/24]\
-\
-where A = (lon - lon0)cos(lat)\
-T = tan^2(lat)\
-C = e2 cos2*/(1 - e2)        nu = a /(1 - esq*sin^2(lat))^0.5 \
-and M, the distance along the meridian from equator to latitude lat, is given by\
-M = a[1 - e^2/4 - 3e^4/64 - 5e^6/256 -....)*lat - (3e^2/8 + 3e^4/32 + 45e^6/1024 +....)sin(2*lat) + (15e^4/256 + 45e^6/1024 +.....)sin(4*lat) - (35e^6/3072 + ....)sin(6*lat) + .....]\
-with lat in radians.\
-\
-M0 is the value of M calculated for the latitude of the chosen origin. This may not necessarily be chosen as the equator.\
-\
-To compute latitude and longitude from Easting and Northing the reverse formulas are:\
-lat = lat1 - (nu1tan(lat1)/rho1)[D2/2 - (1 + 3*T1)D^4/24]\
-lon =  lon0 + [D - T1*D^3/3 + (1 + 3*T1)T1*D^5/15]/cos(lat1)\
-\
-where lat1 is the latitude of the point on the central meridian which has the same Northing as the point whose coordinates are sought, and is found from:\
-lat1 = mu1 + (3*e1/2 - 27*e1^3/32 +.....)sin(2*mu1) + (21*e1^2/16 - 55*e1^4/32 + ....)sin(4*mu1)+ (151*e1^3/96 +.....)sin(6*mu1) + (1097*e1^4/512 - ....)sin(8*mu1) + ......\
-where\
-e1 = [1- (1 - esq)^0.5]/[1 + (1 - esq)^0.5]\
-mu1 = M1/[a(1 - esq/4 - 3e^4/64 - 5e^6/256 - ....)]\
-M1 = M0 + (N - FN)\
-T1 = tan^2(lat1)\
-D = (E - FE)/nu1","For Projected Coordinate System Trinidad 1903 / Trinidad Grid \
-Parameters:\
-Ellipsoid   Clarke 1858     a = 20926348 ft    = 31706587.88 links\
-                                        b = 20855233 ft\
-\
-then 1/f = 294.97870 and e^2 = 0.00676866\
-\
-Latitude Natural Origin       10o26'30\"N  =  0.182241463 rad\
-Longitude Natural Origin    61o20'00\"W = -1.07046861 rad\
-False Eastings FE              430000.00 links\
-False Northings FN            325000.00 links\
-\
-Forward calculation for: \
-Latitude       10o00'00.00\" N = 0.17453293 rad\
-Longitude    62o00'00.00\"W = -1.08210414 rad\
-\
-A = -0.01145876      C = 0.00662550\
-T = 0.03109120      M = 5496860.24    nu = 31709831.92     M0 = 5739691.12\
-\
-Then Easting E    =  66644.94 links\
-          Northing N =  82536.22 links\
-\
-Reverse calculation for same easting and northing first gives :\
-e1    =   0.00170207       D  =     -0.01145875\
-T1   = 0.03109544         M1 =      5497227.34\
-nu1  = 31709832.34       mu1 =    0.17367306\
-phi1 = 0.17454458         rho1 =    31501122.40\
-\
-\
-Then Latitude     = 10o00'00.000\"N\
-         Longitude  =  62o00'00.000\"W",1996-09-18 00:00:00,"EPSG Guidance note #7; \"Geographic and Projected Coordinate System Transformations\"; section 1.4.3",EPSG,,
-9807,Transverse Mercator,,,Latitude of natural origin,Longitude of natural origin,,,Scale factor at natural origin,False easting,False northing,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"The formulas to derive the projected Easting and Northing coordinates are in the form of a series as follows:\
-\
-Easting, E =  FE + k0*nu[A + (1 - T + C)A^3/6 + (5 - 18T + T^2 + 72C - 58e'sq)A^5/120]	\
-\
-Northing, N =  FN + k0{M - M0 + nu*tan(lat)[A^2/2 + (5 - T + 9C + 4C^2)A^4/24 + (61 - 58T + T^2 + 600C - 330e'sq)A^6/720]} \
-where T = tan^2(lat)                nu = a /(1 - esq*sin^2(lat))^0.5\
-C = esq*cos^2(lat)/(1 - esq)\
-A = (lon - lon0)cos(lat), with lon and lon0 in radians.\
-M = a[(1 - esq/4 - 3e^4/64 - 5e^6/256 -....)lat - (3esq/8 + 3e^4/32 + 45e^6/1024+....)sin(2*lat) + (15e^4/256 + 45e^6/1024 +.....)sin(4*lat) - (35e^6/3072 + ....)sin(6*lat) + .....]\
-with lat in radians and M0 for lat0, the latitude of the origin, derived in the same way.\
-\
-The reverse formulas to convert Easting and Northing projected coordinates to latitude and longitude are:\
-\
-lat = lat1 - (nu1*tan(lat1)/rho1)[D^2/2 - (5 + 3*T1 + 10*C1 - 4*C1^2 - 9*e'^2)D^4/24 + (61 + 90*T1 + 298*C1 + 45*T1^2 - 252*e'^2 - 3*C1^2)D^6/720]\
-lon = lon0 + [D - (1 + 2*T1 + C1)D^3/6 + (5 - 2*C1 + 28*T1 - 3*C1^2 + 8*e'^2 + 24*T1^2)D^5/120] / cos(lat1)\
-where lat1 may be found as for the Cassini projection from:\
-\
-lat1 = mu1 + ((3*e1)/2 - 27*e1^3/32 +.....)sin(2*lat1) + (21*e1^2/16 -55*e1^4/32 + ....)sin(4*lat1)+ (151*e1^3/96 +.....)sin(6*lat1) + (1097*e1^4/512 - ....)sin(8*lat1) + ......\
-and where  nu1 = a /(1 - esq*sin^2(lat1))^0.5                                     rho1 = a(1 - esq)/(1 - esq*sin^2(lat1))^1.5\
-e1 = [1- (1 - esq)^0.5]/[1 + (1 - esq)^0.5]\
-mu1 = M1/[a(1 - esq/4 - 3e^4/64 - 5e^6/256 - ....)]\
-M1 = M0 + (N - FN)/k0\
-T1 = tan^2(lat1)\
-C1 = e'^2*cos^2(lat1)\
-D = (E - FE)/(nu1*k0), with nu1 = nu for lat1\
-\
-For areas south of the equator the value of latitude lat will be negative and the formulas above, to compute the E and N,  will automatically result in the correct values. Note that the false northings of the origin, if the equator, will need to be large to avoid negative northings and for the UTM projection is in fact 10,000,000m. Alternatively, as in the case of Argentina's Transverse Mercator (Gauss-Kruger) zones, the origin is at the south pole with a northings of zero. However each  [...]
-different zones having the same eastings, every point in the country, irrespective of its projection zone, will have a unique set of projected system coordinates. Strict application of the above formulas, with south latitudes negative, will result in the derivation of the correct Eastings and Northings. \
-\
-Similarly, in applying the reverse formulas to determine a latitude south of the equator, a negative sign for lat results from a negative lat1 which in turn results from a negative M1.","For Projected Coordinate System OSGB 1936 / British National Grid\
-\
-Parameters:\
-Ellipsoid  Airy 1830  a = 6377563.396 m  1/f = 299.32496\
-then e'^2 = 0.00671534 and e^2 = 0.00667054\
-\
-Latitude Natural Origin         49o00'00\"N   = 0.85521133 rad\
-Longitude Natural Origin        2o00'00\"W  = -0.03490659 rad\
-Scale factor ko                     0.9996013                                                                                              False Eastings FE                 400000.00 m\
-False Northings FN              -100000.00 m\
-\
-Forward calculation for: \
-Latitude       50o30'00.00\"N  = 0.88139127 rad\
-Longitude    00o30'00.00\"E  = 0.00872665 rad\
-A  = 0.02775415       C = 0.00271699\
-T =  1.47160434       M = 5596050.46\
-M0 = 5429228.60     nu  = 6390266.03\
-\
-Then Easting E =        577274.99 m\
-          Northing N =       69740.50 m\
-\
-Reverse calculations for same easting and northing first gives :\
-e1 =    0.00167322      mu1 = 0.87939562\
-M1 = 5599036.80        nu1 = 6390275.88\
-phi1  = 0.88185987      D = 0.02775243\
-rho1 =6372980.21       C1 =  0.00271391\
-T1 = 1.47441726\
-\
-Then Latitude       = 50o30'00.000\"N\
-         Longitude    = 00o30'00.000\"E",1996-09-18 00:00:00,"EPSG Guidance note #7; \"Geographic and Projected Coordinate System Transformations\"; section 1.4.4",EPSG,,
-9808,Transverse Mercator (South Orientated),,,Latitude of natural origin,Longitude of natural origin,,,Scale factor at natural origin,False easting,False northing,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"For the mapping of southern Africa a south oriented Transverse Mercator projection is used. Here the coordinate axes are called Westings and Southings and increment to the West and South from the origin respectively.  The Transverse Mercator formulas need to \
-be modified to cope with this arrangement with\
-\
-Westing, W = k0 nu[A + (1 - T + C)A^3/6 + (5 - 18*T + T^2 + 72*C - 58*e'^2)A^5/120] - FE\
-\
-Southing, S = k0{M - M0 + nu*tan(lat)*[A^2/2 + (5 - T + 9*C + 4*C^2)A^4/24 + (61 - 58*T + T^2 + 600*C - 330*e'^2)A^6/720]}- FN\
-\
-In these formulas the terms FE and FN have been retained for consistency of the terminology.  For the reverse formulas, those for the standard Transverse Mercator above apply, with the exception that:\
-\
-M1 = M0 + (S + FN)/k0\
-and D = (W + FE)/(nu1*k0), with nu1 = nu for lat1",,1996-09-18 00:00:00,"EPSG Guidance note #7; \"Geographic and Projected Coordinate System Transformations\"; section 1.4.4",EPSG,,
-9809,Oblique Stereographic,,,Latitude of natural origin,Longitude of natural origin,,,Scale factor at natural origin,False easting,False northing,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"The coordinate transformation from geographical to projected coordinates is executed via the distance and azimuth of the point from the centre point or origin. For a sphere the formulas are relatively simple. For the ellipsoid the parameters defining the conformal sphere at the tangent point as origin are first de [...]
-\
-Oblique and Equatorial Stereographic Formula\
-\
-Given the geodetic origin of the projection at the tangent point (lat0, lon0), the parameters defining the conformal sphere are:\
-\
-R= sqrt( rho0 * nu0)\
-n=  sqrt{1+[(e2*cos^4(lat0))/(1-e2)}\
-c=  [(n+sin(lat0)) (1-sin(chi0))]/[(n-sin(lat0)) (1+sin(chi0))]\
-\
-where:	sin(chi0) = (w1-1)/(w1+1)\
-w1 = (S1.(S2)^e)^n\
-S1 = (1+sin(lat0))/(1-sin(lat0))\
-S2 = (1-e sin(lat0))/(1+e sin(lat0))\
-\
-The conformal latitude and longitude (chi0,lambda0) of the origin are then computed from :\
-\
-chi0 = asin[(w2-1)/(w2+1)]\
-\
-where S1 and S2 are as above and  w2 = c (S1(S2)^e)^n\
- \
-lambda0  = lon0\
-\
-For any point with geodetic coordinates (lat, lon) the equivalent conformal latitude and longitude (chi, lambda) are computed from \
-lambda = n(lon-lambda0) + lambda0\
-chi = asin[(w-1)/(w+1)]\
-\
-where w = c (Ss (Sb)^e)^n\
-Sa = (1+sin(lat))/(1-sin(lat))\
-Sb = (1-e.sin(lat))/(1+e.sin(lat))\
- \
-Then B = [1+sin(chi) sin(chi0) + cos(chi) cos(chi0) cos(lambda-lambda0)]\
-\
-N = FN + 2 R k0 [sin(chi) cos(chi0) - cos(chi) sin(chi0) cos(lambda-lambda0)] / B\
-\
-E = FE + 2 R k0 cos(chi) sin(lambda-lambda0) / B\
-\
-\
-The reverse formulae to compute the geodetic coordinates from the grid coordinates involves computing the conformal values, then the isometric latitude and finally the geodetic values.\
-\
-The parameters of the conformal sphere and conformal latitude and longitude at the origin are computed as above. Then for any point with Stereographic grid coordinates (E,N) :\
-\
-chi = chi0 + 2 atan[{(N-FN)-(E-FE) tan (j/2)} / (2 R k0)]\
-\
-lambda = j + 2 i + lambda0\
-\
-where g = 2 R k0 tan(pi/4 - chi0/2)\
-h = 4 R k0 tan(chi0) + g\
-i = atan[(E-FE) / {h+(N-FN)}]\
-j = atan[(E-FE) / (g-(N-FN)] - i\
-\
-Geodetic longitude lon = (lambda-lambda0 ) / n +  lambda0\
-\
-Isometric latitude psi = 0.5 ln [(1+ sin(chi)) / { c (1-  sin(chi))}] / n\
-\
-First approximation lat1 = 2 atan(e^psi)  - pi/2  where e=base of natural logarithms.\
-\
-psii = isometric latitude at lati\
-\
-where psii= ln[{tan(lati/2 + pi/4}  {(1-e sin(lati))/(1+e sin(lati))}^(e/2)]\
- \
-Then iterate lat(i+1) = lati - ( psii - psi ) cos(lati) (1 -e^2 sin^2(lati)) / (1 - e^2)\
-\
-until the change in lat is sufficiently small.\
-\
-\
-For Oblique Stereographic projections centred on points in the southern hemisphere,  the signs of E, N, lon0, lon,  must be reversed to be used in the equations and lat will be negative anyway as a southerly latitude.\
-\
-An alternative approach is given by Snyder, where, instead of defining a single conformal sphere at the origin point, the conformal latitude at each point on the ellipsoid is computed. The conformal longitude is then always equivalent to the geodetic longitude. This approach is a valid alternative to the above, but gives slightly different results away from the origin point.  It is therefore considered to be a different projection method.","For Projected Coordinate System RD / Netherlands New\
-\
-Parameters:\
-Ellipsoid   Bessel 1841    a = 6377397.155 m    1/f = 299.15281\
-then e = 0.08169683\
-\
-Latitude Natural Origin      52o09'22.178\"N  = 0.910296727 rad\
-Longitude Natural Origin     5o23'15.500\"E  =  0.094032038 rad\
-Scale factor k0                 0.9999079\
-False Eastings FE             155000.00 m\
-False Northings FN           463000.00 m\
-\
-Forward calculation for: \
-\
-Latitude    53oN = 0.925024504 rad\
-Longitude   6oE = 0.104719755 rad\
-\
-first gives the conformal sphere constants:\
-\
-rho0 = 6374588.71    nu0 = 6390710.613\
-R = 6382644.571    n = 1.000475857    c  = 1.007576465\
-\
-where S1 = 8.509582274  S2 = 0.878790173  w1 = 8.428769183\
-sin chi0 = 0.787883237\
-\
-w   = 8.492629457   chi0 = 0.909684757      D0 = d0 \
-\
-for the point  chi  = 0.924394997    D = 0.104724841\
-\
-hence B = 1.999870665    N = 557057.739    E = 196105.283\
-\
-reverse calculation for the same Easting and Northing first gives:\
-\
-g = 4379954.188    h = 37197327.96   i = 0.001102255   j = 0.008488122\
-\
-then  D = 0.10472467  Longitude = 0.104719584 rad =  6 deg E\
-\
-chi  = 0.924394767    psi = 1.089495123\
-phi1 = 0.921804948       psi1 = 1.084170164\
-phi2 = 0.925031162       psi2 = 1.089506925\
-phi3 = 0.925024504       psi3 = 1.089495505\
-phi4 = 0.925024504\
-\
-Then Latitude      = 53o00'00.000\"N\
-          Longitude   =   6o00'00.000\"E",1999-11-15 00:00:00,"EPSG Guidance note #7; \"Geographic and Projected Coordinate System Transformations\"; section 1.4.6",EPSG,,99.811
-9810,Polar Stereographic,,,Latitude of natural origin,Longitude of natural origin,,,Scale factor at natural origin,False easting,False northing,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"For the forward transformation from latitude and longitude,\
-\
-E = FE + rho sin(lon - lon0)\
-N = FN - rho cos(lon - lon0)\
-where\
-rho = 2 a ko t /{[((1+e)^(1+e)) ((1-e)^(1-e))]^0.5}\
-t = tan (pi/4 - lat/2) / [(1-esin(lat) ) / (1 + e sin(lat))]^(e/2)\
-\
-For the reverse transformation,\
-\
-lat = chi+ (e^2/2 + 5e^4/24 + e^6/12 + 13e^8/360) sin(2 chi) \
-+ (7e^4/48 + 29e^6/240 + 811e^8/11520) sin(4 chi)\
-+ (7e^6/120 +  81e^8/1120) sin(6 chi)  + (4279e^8/161280) sin(8 chi)\
-\
-lon = lon0+ arctan [(E-FE) / (FN-N)]\
-\
-where chi  = pi/2 - 2 arctan t\
-t   =  rho [((1+e)^(1+e)) ((1-e)^(1-e))]^0.5} / 2 a ko\
-rho = [(E-FE)^2  + (N - FN)^2]^0.5",,1996-09-18 00:00:00,"US Geological Survey Professional Paper 1395; \"Map Projections - A Working Manual\";  J. Snyder",EPSG,,
-9811,New Zealand Map Grid,,,Latitude of natural origin,Longitude of natural origin,,,,False easting,False northing,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1996-09-18 00:00:00,New Zealand Department of Lands technical circular 1973/32,EPSG,,
-9812,Hotine Oblique Mercator,,,Latitude of projection centre,Longitude of projection centre,Azimuth of initial line,Angle from Rectified to Skew Grid,Scale factor on initial line,False easting,False northing,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"The following constants for the projection may be calculated :\
-\
-B = (1 + esq * cos^4(latc) / (1 - esq ))^0.5\
-A = a * B * kc *(1 - esq )^0.5 / ( 1 - esq * sin^2(latc))\
-t0 = tan(pi/4 - latc/2) / ((1 - e*sin(latc)) / (1 + e*sin(latc)))^(e/2)\
-D = B (1 - esq)^0.5  / (cos(latc) * ( 1 - esq*sin^2(latc))^0.5)\
-if D < 1 to avoid problems with computation of F make D^2  = 1 \
-F = D + (D^2 - 1)^0.5  * SIGN(latc)\
-H = F* t0*B\
-G = (F - 1/F) / 2\
-gamma0 = asin(sin(alphac) / D)\
-lon0 = lonc - (asin(G*tan(gamma0))) / B\
-\
-Then compute the (uc , vc) co-ordinates for the centre point (fc , lc).\
-vc =0\
-In general: uc = (A / B) atan((Dsq - 1)^0.5 / cos (alphac) ) * SIGN(latc)\
-\
-but for the special cases where alphac = 90 degrees (e.g. Hungary, Switzerland) then \
-uc = A*(lonc - lon0)  \
-\
- \
-Forward case: To compute (E,N) from a given (lat,lon) :\
-\
-t = tan(pi/4 - lat/2) / ((1 - e sin (lat)) / (1 + e sin (lat)))^(e/2)\
-Q = H / t^B\
-S = (Q - 1 / Q) / 2\
-T = (Q + 1 / Q) / 2\
-V = sin(B (lon - lon0))\
-U = (- V cos(gamma0) + S sin(gamma0)) / T\
-v = A ln((1 - U) / (1 + U)) / 2 B\
-u = A atan((S cos(gamma0) + V sin(gamma0)) / cos(B (lon - lon0 ))) / B\
-\
-\
-The rectified skew co-ordinates are then derived from:\
-\
-E = v cos(gammac) + u sin(gammac) + FE\
-N = u cos(gammac) - v sin(gammac) + FN\
-\
-Reverse case: Compute (lat,lon)  from a given (E,N)  :\
-\
-v� = (E - FE) cos(gammac) - (N - FN) sin(gammac)\
-u� = (N - FN) cos(gammac) + (E - FE) sin(gammac)\
-\
-Q� = e- (B v �/ A)  where e is the base of natural logarithms.\
-S' = (Q� - 1 / Q�) / 2\
-T� = (Q� + 1 / Q�) / 2\
-V� = sin (B u� / A)\
-U� = (V� cos(gammac) + S� sin(gammac)) / T�\
-t� = (H / ((1 + U�) / (1 - U�))^0.5)^(1 / B)\
-\
-chi = pi / 2 - 2 atan(t�)\
-\
-lat = chi + sin(2chi).( e^2 / 2 + 5*e^4 / 24 + e^6 / 12 + 13*e^8 / 360) +  sin(4*chi).( 7*e^4 /48 + 29*e^6 / 240 + 811*e8 / 11520) +  sin(6chi).( 7*e^6 / 120 + 81*e8 / 1120) +  sin(8chi).(4279 e^8 / 161280)\
-\
-lon=  lon0  - atan ((S� cos(gammac) - V� sin(gammac)) / cos(B*u� / A)) / B","For Projected Coordinate System  Timbalai 1948 / R.S.O. Borneo (m)\
-\
-Parameters:\
-	Ellipsoid:  Everest 1830 (1967 Definition)\
-				a = 6377298.556 metres 	1/f = 300.8017\
-				then	e = 0.081472981	e2 = 0.006637847\
-					\
-	Latitude Projection Centre	fc  	4o00'00\"N		=	0.069813170 rad\
-	Longitude Projection Centre	lc  	115o00'00\"E	=	2.007128640 rad\
-	Azimuth of central line	ac	53o18'56.9537\"	=	0.930536611 rad\
-	Rectified to skew	gc	53o07'48.3685\"	=	0.927295218 rad\
-	Scale factor	ko	 0.99984\
-	False Eastings	FE	 0.00 m\
-	False Northings	FN	 0.00 m\
-\
-Forward calculation for: \
-	Latitude		f	4o39'20.783\"N		=	0.081258569 rad\
-	Longitude		l	114o28'10.539\"E	=	1.997871312 rad\
-		\
-B = 	1.003303209		F =	1.07212156\
-A =	6376278.686		H = 	1.00000299\
-		to = 	0.932946976		g0 = 	0.92729522\
-		D = 	1.002425787		l0 = 	1.91437347\
-		D2 =	1.004857458\
-	\
-		uc =	738096.09		vc =	0.00\
-		t =	0.922369529		Q =	1.084456854\
-		S =	0.081168129		T = 	1.003288725\
-		V =	0.83675700		U =	0.014680803\
-		v =	-93307.40		u =	734236.558\
-						u-uc =	-3859.536\
-\
-	Then	Easting		E =  	531404.81 m\
-		Northing	N =      515187.85 m\
-\
-Reverse calculations for same easting and northing first gives :\
-		v� =   	-93307.40		u� =	734236.558\
-		u�+uc = 1472332.652		Q� =	1.014790165\
-		S�  =	0.014682385		T� =	1.000107780	\
-		V� =	0.115274794		U� = 	0.080902065\
-		t� = 	0.922369529		c =	0.080721539		\
-				\
-Then	Latitude    	 f  =	4o39'20.783\"N		\
-	Longitude	l   =	114o28'10.539\"E",1999-11-15 00:00:00,"EPSG Guidance note #7; \"Geographic and Projected Coordinate System Transformations\"; section 1.4.5",EPSG,,97.62  99.811
-9813,Laborde Oblique Mercator,,,Latitude of projection centre,Longitude of projection centre,Azimuth of initial line,,Scale factor on initial line,False easting,False northing,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1996-09-18 00:00:00,"\"La nouvelle projection du Service Geographique de Madagascar\"; J. Laborde; 1928",EPSG,Can be accomodated by Oblique Mercator method (code 9815).,97.613
-9814,Swiss Oblique Cylindrical,,,Latitude of projection centre,Longitude of projection centre,,,,Easting at projection centre,Northing at projection centre,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1996-09-18 00:00:00,"\"Die projecktionen der Schweizerischen Plan und Kartenwerke\"; J Bollinger; 1967",EPSG,Can be accomodated by Oblique Mercator method (code 9815).,97.612
-9815,Oblique Mercator,,,Latitude of projection centre,Longitude of projection centre,Azimuth of initial line,Angle from Rectified to Skew Grid,Scale factor on initial line,Easting at projection centre,Northing at projection centre,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"The following constants for the projection may be calculated :\
-\
-B = (1 + esq * cos^4(latc) / (1 - esq ))^0.5\
-A = a * B * kc *(1 - esq )^0.5 / ( 1 - esq * sin^2(latc))\
-t0 = tan(pi/4 - latc/2) / ((1 - e*sin(latc)) / (1 + e*sin(latc)))^(e/2)\
-D = B (1 - esq)^0.5  / (cos(latc) * ( 1 - esq*sin^2(latc))^0.5)\
-if D < 1 to avoid problems with computation of F make D^2  = 1 \
-F = D + (D^2 - 1)^0.5  * SIGN(latc)\
-H = F* t0*B\
-G = (F - 1/F) / 2\
-gamma0 = asin(sin(alphac) / D)\
-lon0 = lonc - (asin(G*tan(gamma0))) / B\
-\
-Then compute the (uc , vc) co-ordinates for the centre point (fc , lc).\
-vc =0\
-In general: uc = (A / B) atan((Dsq - 1)^0.5 / cos (alphac) ) * SIGN(latc)\
-\
-but for the special cases where alphac = 90 degrees (e.g. Hungary, Switzerland) then \
-uc = A*(lonc - lon0)  \
-\
- \
-Forward case: To compute (E,N) from a given (lat,lon) :\
-\
-t = tan(pi/4 - lat/2) / ((1 - e sin (lat)) / (1 + e sin (lat)))^(e/2)\
-Q = H / t^B\
-S = (Q - 1 / Q) / 2\
-T = (Q + 1 / Q) / 2\
-V = sin(B (lon - lon0))\
-U = (- V cos(gamma0) + S sin(gamma0)) / T\
-v = A ln((1 - U) / (1 + U)) / 2 B\
-u = (A atan((S cos(gamma0) + V sin(gamma0)) / cos(B (lon - lon0 ))) / B) + (uc . SIGN (lon - lonC))\
-\
-\
-The rectified skew co-ordinates are then derived from:\
-\
-E = v cos(gammac) + u sin(gammac) + Ec\
-N = u cos(gammac) - v sin(gammac) + Nc\
-\
-Reverse case: Compute (lat,lon)  from a given (E,N)  :\
-\
-v� = (E - Ec) cos(gammac) - (N - Nc) sin(gammac)\
-u� = (N - Nc) cos(gammac) + (E - Ec) sin(gammac) + uc\
-\
-Q� = e- (B v �/ A)  where e is the base of natural logarithms.\
-S' = (Q� - 1 / Q�) / 2\
-T� = (Q� + 1 / Q�) / 2\
-V� = sin (B u� / A)\
-U� = (V� cos(gammac) + S� sin(gammac)) / T�\
-t� = (H / ((1 + U�) / (1 - U�))^0.5)^(1 / B)\
-\
-chi = pi / 2 - 2 atan(t�)\
-\
-lat = chi + sin(2chi).( e^2 / 2 + 5*e^4 / 24 + e^6 / 12 + 13*e^8 / 360) +  sin(4*chi).( 7*e^4 /48 + 29*e^6 / 240 + 811*e8 / 11520) +  sin(6chi).( 7*e^6 / 120 + 81*e8 / 1120) +  sin(8chi).(4279 e^8 / 161280)\
-\
-lon=  lon0  - atan ((S� cos(gammac) - V� sin(gammac)) / cos(B*u� / A)) / B",,1999-11-15 00:00:00,"EPSG Guidance note #7; \"Geographic and Projected Coordinate System Transformations\"; section 1.4.5",EPSG,,99.811
-9816,Tunisia Mining Grid,,,Latitude of origin,Longitude of origin,,,,False easting,False northing,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"This grid is used as the basis for mineral leasing in Tunsia.  Lease areas are approximately 2 x 2 km or 400 hectares.  The corners of these blocks are defined through a six figure grid reference where the first three digits are an easting in kilometres and the last three digits are a northing.  The latitudes and longitudes for block corners at 2 km intervals a [...]
-a)  the minimum easting is 94 km, on which the longitude is 5.68989 grads east of Paris.\
-b)  the maximum easting is 490 km, on which the longitude is 10.51515 grads east of Paris.\
-c)  each 2 km grid easting interval equals 0.02437 grads.\
-d)  the minimum northing is 40 km, on which the latitude is 33.39 grads.\
-e)  the maximum northing is 860 km, on which the latitude is 41.6039 grads.\
-f)  between 40 km N and 360 km N, each 2 km grid northing interval equals 0.02004 grads.\
-g)  between 360 km N and 860 km N, each 2 km grid northing interval equals 0.02003 grads.\
-\
-Formulae are:\
-\
-Grads from Paris\
-\
-Lat (grads) = 36.5964 + [(N - 360) * A] \
-where N is in kilometres and A = 0.010015 if N > 360, else A = 0.01002.\
-\
-LonParis (grads) = 7.83445 + [(E - 270) * 0.012185], where E is in kilometres.\
-\
-The reverse formulae are:\
-\
-E (km) = 270 + [(LonParis - 7.83445) / 0.012185] where LonParis is in grads.\
-\
-N (km) = 360 + [(Lat - 36.5964) / B] \
-where Lat is in grads and B = 0.010015  if  lat>36.5964, else B = 0.01002.\
-\
-Degrees from Greenwich.\
-\
-Modern practice in Tunisia is to quote latitude and longitude in degrees with longitudes referenced to the Greenwich meridian.  The formulae required in addition to the above are:\
-\
-Lat (degrees) =  (Latg * 0.9) where Latg is in grads.\
-LonGreenwich (degrees) = [(LonParis + 2.5969213) * 0.9] where LonParis is in grads.\
-\
-\
-Lat (grads) =  (Latd / 0.9) where Latd is in decimal degrees.\
-LonParis (grads) = [(LonGreenwich / 0.9) - 2.5969213)] where LonGreenwich is in decimal degrees.","For grid location 302598,\
-Latitude = 36.5964 + [(598 - 360) * A].  As N > 360, A = 0.010015.\
-Latitude = 38.97997 grads = 35.08197 degrees.\
-\
-Longitude  = 7.83445 + [(E - 270) * 0.012185, where E = 302.\
-Longitude  = 8.22437 grads east of Paris = 9.73916 degrees east of Greenwich.",1999-11-15 00:00:00,"EPSG Guidance note #7; \"Geographic and Projected Coordinate System Transformations\"; section 1.4.8",EPSG,,99.811
-9817,Lambert Conic Near-Conformal,,,Latitude of natural origin,Longitude of natural origin,,,Scale factor at natural origin,False easting,False northing,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"To compute the Lambert Conic Near-Conformal the following formulae are used;\
-\
-E = FE + r sin(theta)\
-N = FN + M + r sin(theta) tan(theta/2) using the natural origin rather than the false origin.\
-\
-Compute constants for the ellipse:\
-\
-n = (a-b)/(a+b)  \
-A� = a [ 1- n + 5 (n^2 - n^3 ) / 4 + 81 ( n^4 - n^5 ) / 64]*pi /180 \
-B� = 3 a [ n - n^2 + 7 ( n^3 - n^4 ) / 8 + 55 n^5 / 64] / 2\
-C� = 15 a [ n^2 -n^3 + 3 ( n^4 - n^5 ) / 4 ] / 16\
-D� = 35 a [ n^3 - n^4 + 11 n^5 / 16 ] / 48\
-E� = 315 a [ n^4 - n^5 ] / 512\
-\
-Then compute the meridional arc from the equator to the parallel.\
-s0 = A� lat0 - B� sin(2 lat0) + C� sin(4 lat0) - D� sin(6 lat0) + E� sin(8 lat0) where lat0 in the first term is in degrees\
-s0 = A� lat - B� sin(2 lat) + C� sin(4 lat) - D� sin(6 lat) + E� sin(8 lat) where lat0 in the first term is in degrees\
-m = s - s0\
-A = 1 / (6 rho0 nu0) \
-M = ko ( m + A m^3.  This is the term that is truncated to the third order.\
-Ms = M per second of arc = M / ((lat - lat0) * 3600)\
-\
-theta = (lon - lon0) sin(lat0)\
-ro = ko nu0 / tan(lat0)\
-r = ro - M\
-\
-The reverse formulas for lat and lon  from E and N with r0 and Ms as above:\
-\
-lat  = M�/ (Ms * 3600) + lat0   where lat0 and lat are in degrees\
-lon  =  lon0 + theta� / sin(lat0)  where lont0 and lon are in radians\
-\
-where\
-E� = E - FE              N� = N - FN\
-theta� = arctan [E� / (r0 - N�)]\
-r� = E� / sin(theta�) \
-M� = r0 - r'","For Projected Coordinate System: Deir ez Zor / Levant Zone\
-\
-Parameters:\
-Ellipsoid  Clarke 1880 (IGN)  a = 6378249.2 m  1/f = 293.46602\
-then b = 6356515.000    n = 0.001706682563\
-\
-Latitude Natural Origin  = 34o 39'00\" N = 0.604756586 rad\
-Longitude Natural Origin = 37o 21'00\" E=  0.651880476 rad\
-Scale factor at origin ko = 0.99962560\
-False Eastings FE  = 300000.00 m\
-False Northings FN  = 300000.00 m\
-\
-Forward calculation for: \
-Latitude of 37d 31' 17.625\" N = 0.654874806 rad\
-Longitude of 34d 08' 11.291\" E = 0.595793792 rad\
-first gives\
-A = 4.1067494 * 10e-15      A�=111131.8633\
-B�= 16300.64407     C�= 17.38751     D�= 0.02308      E�= 0.000033\
-so = 3835482.233    s  = 4154101.458     m = 318619.225\
-M = 318632.72         Ms = 30.82262319\
-q = -0.03188875       ro = 9235264.405     r = 8916631.685\
-\
-Then Easting E =   15707.96 m (c.f. E =   15708.00 using full formulae)\
-         Northing N =      623165.96 m (c.f. N = 623167.20 using full formulae)\
-\
-Reverse calculation for the same easting and northing first gives\
-\
-q' = -0.03188875\
-r�  =  8916631.685\
-M�= 318632.72 \
-\
-Latitude =      0.654874806 rad = 37d 31' 17.625\" N\
-Longitude = 0.595793792 rad =  34d 08' 11.291\" E",1999-11-15 00:00:00,"EPSG Guidance note #7; \"Geographic and Projected Coordinate System Transformations\"; section 1.4.1.1",EPSG,,99.811
-9818,American Polyconic,,,Latitude of natural origin,Longitude of natural origin,,,,False easting,False northing,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,1999-10-20 00:00:00,"US Geological Survey Professional Paper 1395; \"Map Projections - A Working Manual\";  J. Snyder",EPSG,,99.55
diff --git a/src/tiff/csv/trf_nonpolynomial.c b/src/tiff/csv/trf_nonpolynomial.c
deleted file mode 100644
index 718a6b0..0000000
--- a/src/tiff/csv/trf_nonpolynomial.c
+++ /dev/null
@@ -1,1082 +0,0 @@
-#include "defs.h"
-datafile_rows_t trf_nonpolynomial_row_1[] = {"COORD_TRF_CODE","COORD_TRF_EPSG_NAME","COORD_TRF_EPSG_ABBR","COORD_TRF_USER_NAME","DESCRIPTION","AREA_OF_USE","COORD_TRF_METHOD_CODE","PARAMETER_1","PARAMETER_2","PARAMETER_3","PARAMETER_4","PARAMETER_5","PARAMETER_6","PARAMETER_7","UOM_LENGTH_CODE","UOM_ANGLE_CODE","PRIME_MERIDIAN_CODE","UOM_SCALE_CODE","PARAMETER_35","PARAMETER_36","PARAMETER_37","REVISION_DATE","INFORMATION_SOURCE","DATA_SOURCE","REMARKS","CHANGE_ID",NULL};
-datafile_rows_t trf_nonpolynomial_row_2[] = {"1100","Adindan to WGS 84 (1)","","","","MEAN FOR Ethiopia; Sudan.","9603","-166.0","-15.0","204.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_3[] = {"1101","Adindan to WGS 84 (2)","","","","Burkina Faso.","9603","-118.0","-14.0","218.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_4[] = {"1102","Adindan to WGS 84 (3)","","","","Cameroon.","9603","-134.0","-2.0","210.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_5[] = {"1103","Adindan to WGS 84 (4)","","","","Ethiopia.","9603","-165.0","-11.0","206.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_6[] = {"1104","Adindan to WGS 84 (5)","","","","Mali.","9603","-123.0","-20.0","220.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_7[] = {"1105","Adindan to WGS 84 (6)","","","","Senegal.","9603","-128.0","-18.0","224.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_8[] = {"1106","Adindan to WGS 84 (7)","","","","Sudan.","9603","-161.0","-14.0","205.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_9[] = {"1107","Afgooye to WGS 84 (1)","","","","Somalia.","9603","-43.0","-163.0","45.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_10[] = {"1108","AGD66 to WGS 84 (1)","","","","Australia.","9603","-133.0","-48.0","148.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_11[] = {"1109","AGD84 to WGS 84 (1)","","","","Australia.","9603","-134.0","-48.0","149.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_12[] = {"1110","Ain el Abd to WGS 84 (1)","","","","Bahrain.","9603","-150.0","-250.0","-1.0","","","","","9001","","","","","","","1997-04-11 00:00:00","U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.","EPSG","","97.06",NULL};
-datafile_rows_t trf_nonpolynomial_row_13[] = {"1111","Ain el Abd to WGS 84 (2)","","","","Saudi Arabia.","9603","-143.0","-236.0","7.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_14[] = {"1112","Amersfoort to WGS 84 (1)","","","","Netherlands.","9606","593.16","26.15","478.54","-6.3239","-0.5008","-5.5487","4.0775","9001","9109","","9202","","","","1997-04-11 00:00:00","Nederlandse Commissie voor Geodesie publication 30; 1993.","EPSG","","97.07",NULL};
-datafile_rows_t trf_nonpolynomial_row_15[] = {"1113","Arc 1950 to WGS 84 (1)","","","","MEAN FOR Botswana; Lesotho; Malawi; Swaziland; Zaire; Zambia; Zimbabwe.","9603","-143.0","-90.0","-294.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_16[] = {"1114","Arc 1950 to WGS 84 (2)","","","","Botswana.","9603","-138.0","-105.0","-289.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_17[] = {"1115","Arc 1950 to WGS 84 (3)","","","","Burundi.","9603","-153.0","-5.0","-292.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_18[] = {"1116","Arc 1950 to WGS 84 (4)","","","","Lesotho.","9603","-125.0","-108.0","-295.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_19[] = {"1117","Arc 1950 to WGS 84 (5)","","","","Malawi.","9603","-161.0","-73.0","-317.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_20[] = {"1118","Arc 1950 to WGS 84 (6)","","","","Swaziland.","9603","-134.0","-105.0","-295.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_21[] = {"1119","Arc 1950 to WGS 84 (7)","","","","Zaire.","9603","-169.0","-19.0","-278.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_22[] = {"1120","Arc 1950 to WGS 84 (8)","","","","Zambia.","9603","-147.0","-74.0","-283.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_23[] = {"1121","Arc 1950 to WGS 84 (9)","","","","Zimbabwe.","9603","-142.0","-96.0","-293.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_24[] = {"1122","Arc 1960 to WGS 84 (1)","","","","MEAN FOR Kenya; Tanzania.","9603","-160.0","-6.0","-302.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_25[] = {"1123","Batavia to WGS 84 (1)","","","","Indonesia (Sumatra).","9603","-377.0","681.0","-50.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_26[] = {"1124","Bermuda 1957 to WGS 84 (1)","","","","Bermuda.","9603","-73.0","213.0","296.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_27[] = {"1125","Bogota to WGS 84 (1)","","","","Colombia.","9603","307.0","304.0","-318.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_28[] = {"1126","Bukit Rimpah to WGS 84 (1)","","","","Indonesia (Bangka & Belitung Islands).","9603","-384.0","664.0","-48.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_29[] = {"1127","Campo Inchauspe to WGS 84 (1)","","","","Argentina.","9603","-148.0","136.0","90.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_30[] = {"1128","Cape to WGS 84 (1)","","","","South Africa.","9603","-136.0","-108.0","-292.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_31[] = {"1129","Cape to WGS 84 (2)","","","","South Africa.","9603","-134.73","-110.92","-292.66","","","","","9001","","","","","","","1996-10-18 00:00:00","Private Communication, Directorate of Surveys and Land Information, Cape Town.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_32[] = {"1130","Carthage to WGS 84 (1)","","","","Tunisia.","9603","-263.0","6.0","431.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_33[] = {"1131","Chua to WGS 84 (1)","","","","Paraguay.","9603","-134.0","229.0","-29.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_34[] = {"1132","Corrego Alegre to WGS 84 (1)","","","","Brazil.","9603","-206.0","172.0","-6.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_35[] = {"1133","ED50 to WGS 84 (1)","","","","MEAN FOR Austria; Belgium; Denmark; Finland;  France; Germany (west); Gibraltar; Greece;  Italy; Luxembourg; Netherlands; Norway;  Portugal; Spain; Sweden; Switzerland.","9603","-87.0","-98.0","-121.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","97.02",NULL};
-datafile_rows_t trf_nonpolynomial_row_36[] = {"1134","ED50 to WGS 84 (2)","","","","MEAN FOR Austria; Denmark; France; Germany (west); Netherlands; Switzerland.","9603","-87.0","-96.0","-120.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_37[] = {"1135","ED50 to WGS 84 (3)","","","","MEAN FOR Iraq; Israel; Jordan; Lebanon;  Kuwait; Saudi Arabia; Syria.","9603","-103.0","-106.0","-141.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_38[] = {"1136","ED50 to WGS 84 (4)","","","","Cyprus.","9603","-104.0","-101.0","-140.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_39[] = {"1137","ED50 to WGS 84 (5)","","","","Egypt.","9603","-130.0","-117.0","-151.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_40[] = {"1138","ED50 to WGS 84 (6)","","","","Ireland; United Kingdom (UK).","9603","-86.0","-96.0","-120.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_41[] = {"1139","ED50 to WGS 84 (7)","","","","Finland; Norway.","9603","-87.0","-95.0","-120.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_42[] = {"1140","ED50 to WGS 84 (8)","","","","Greece.","9603","-84.0","-95.0","-130.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_43[] = {"1141","ED50 to WGS 84 (9)","","","","Iran.","9603","-117.0","-132.0","-164.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_44[] = {"1142","ED50 to WGS 84 (10)","","","","Italy (Sardinia).","9603","-97.0","-103.0","-120.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_45[] = {"1143","ED50 to WGS 84 (11)","","","","Italy (Sicily).","9603","-97.0","-88.0","-135.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_46[] = {"1144","ED50 to WGS 84 (12)","","","","Malta.","9603","-107.0","-88.0","-149.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_47[] = {"1145","ED50 to WGS 84 (13)","","","","Portugal; Spain.","9603","-84.0","-107.0","-120.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_48[] = {"1146","ED87 to WGS 84 (1)","","","","Denmark - North Sea;  Germany - North Sea;  Netherlands - offshore;  Norway; United Kingdom (UKCS) - North Sea south of 62 deg N.","9606","-82.981","-99.719","-110.709","-0.5076","0.1503","0.3898","-0.3143","9001","9109","","9202","","","","1997-04-11 00:00:00","Norwegian Mapping Authority publication 1990:1 and note of 13-Feb-1991 \"Om Transformasjon mellom Geodetiske Datum i Norge\"","EPSG","","97.03  9 [...]
-datafile_rows_t trf_nonpolynomial_row_49[] = {"1147","ED50 to ED87 (2)","","","","Norway - offshore north of 65 deg N.","9606","-1.51","-0.84","-3.5","-1.893","-0.687","-2.764","0.609","9001","9109","","9202","","","","1997-04-11 00:00:00","Norwegian Mapping Authority note of 13-Feb-1991 \"Om Transformasjon mellom Geodetiske Datum i Norge\"","EPSG","","97.04",NULL};
-datafile_rows_t trf_nonpolynomial_row_50[] = {"1148","Egypt 1907 to WGS 84 (1)","","","","Egypt.","9603","-130.0","110.0","-13.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_51[] = {"1149","ETRF89 to WGS 84 (1)","","","","Europe.","9603","0.0","0.0","0.0","","","","","9001","","","","","","","1997-06-16 00:00:00","EPSG","EPSG","ETRF89 is a realisation of WGS84 coincident to within 1.5 metres.  This transformation has an accuracy equal to the coincidence figure.","97.24",NULL};
-datafile_rows_t trf_nonpolynomial_row_52[] = {"1150","GDA94 to WGS 84 (1)","","","","Australia.","9603","0.0","0.0","0.0","","","","","9001","","","","","","","1996-10-18 00:00:00","EPSG","EPSG","GDA94 is a realisation of WGS84 coincident to within 1.5 metres.  This transformation has an accuracy equal to the coincidence figure.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_53[] = {"1151","GD49 to WGS 84 (1)","","","","New Zealand.","9603","84.0","-22.0","209.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_54[] = {"1152","Hu Tzu Shan to WGS 84 (1)","","","","Taiwan.","9603","-637.0","-549.0","-203.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_55[] = {"1153","Indian 1954 to WGS 84 (1)","","","","Thailand.","9603","217.0","823.0","299.0","","","","","9001","","","","","","","1997-04-11 00:00:00","U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.","EPSG","","97.06",NULL};
-datafile_rows_t trf_nonpolynomial_row_56[] = {"1154","Indian 1975 to WGS 84 (1)","","","","Thailand.","9603","209.0","818.0","290.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 second edition September 1991","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_57[] = {"1155","Kalianpur 1937 to WGS 84 (1)","","","","Bangladesh.","9603","282.0","726.0","254.0","","","","","9001","","","","","","","1999-10-20 00:00:00","U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.","EPSG","","97.235",NULL};
-datafile_rows_t trf_nonpolynomial_row_58[] = {"1156","Kalianpur 1975 to WGS 84 (1)","","","","India; Nepal.","9603","295.0","736.0","257.0","","","","","9001","","","","","","","1999-10-20 00:00:00","U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.","EPSG","Care!  DMA ellipsoid is inconsistent with EPSG ellipsoid - transformation parameter values may not be appropriate.","97.235",NULL};
-datafile_rows_t trf_nonpolynomial_row_59[] = {"1157","Kandawala to WGS 84 (1)","","","","Sri Lanka.","9603","-97.0","787.0","86.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_60[] = {"1158","Kertau to WGS 84 (1)","","","","Malaysia - West Malaysia; Singapore.","9603","-11.0","851.0","5.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_61[] = {"1159","Leigon to WGS 84 (1)","","","","Ghana.","9603","-130.0","29.0","364.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_62[] = {"1160","Liberia 1964 to WGS 84 (1)","","","","Liberia.","9603","-90.0","40.0","88.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_63[] = {"1161","Luzon 1911 to WGS 84 (1)","","","","Philippines (excluding Mindanao).","9603","-133.0","-77.0","-51.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_64[] = {"1162","Luzon 1911 to WGS 84 (2)","","","","Philippines (Mindanao).","9603","-133.0","-79.0","-72.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_65[] = {"1163","M'poraloko to WGS 84 (1)","","","","Gabon.","9603","-74.0","-130.0","42.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_66[] = {"1164","Mahe 1971 to WGS 84 (1)","","","","Seychelles - Mahe Island.","9603","41.0","-220.0","-134.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_67[] = {"1165","Massawa to WGS 84 (1)","","","","Ethiopia (Eritrea).","9603","639.0","405.0","60.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_68[] = {"1166","Merchich to WGS 84 (1)","","","","Morocco.","9603","31.0","146.0","47.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_69[] = {"1167","Minna to WGS 84 (1)","","","","Cameroon.","9603","-81.0","-84.0","115.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_70[] = {"1168","Minna to WGS 84 (2)","","","","Nigeria.","9603","-92.0","-93.0","122.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_71[] = {"1169","Monte Mario to WGS 84 (1)","","","","Italy (Sardinia).","9603","-225.0","-65.0","9.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_72[] = {"1170","NAD27 to WGS 84 (1)","","","","MEAN FOR Antigua; Barbados; Barbuda;  Caicos Islands; Cuba; Dominican Republic;  Grand Cayman; Jamaica; Turks Islands.","9603","-3.0","142.0","183.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_73[] = {"1171","NAD27 to WGS 84 (2)","","","","MEAN FOR Belize; Costa Rica; El Salvador;  Guatemala; Honduras; Nicaragua.","9603","0.0","125.0","194.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_74[] = {"1172","NAD27 to WGS 84 (3)","","","","MEAN FOR Canada.","9603","-10.0","158.0","187.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_75[] = {"1173","NAD27 to WGS 84 (4)","","","","MEAN FOR United States (USA) (CONUS).","9603","-8.0","160.0","176.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_76[] = {"1174","NAD27 to WGS 84 (5)","","","","MEAN FOR United States (USA) (CONUS East of Mississippi River  including Louisiana; Missouri; Minnesota).","9603","-9.0","161.0","179.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_77[] = {"1175","NAD27 to WGS 84 (6)","","","","MEAN FOR United States (USA) (CONUS West of Mississippi River).","9603","-8.0","159.0","175.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_78[] = {"1176","NAD27 to WGS 84 (7)","","","","United States (USA) - Alaska (Excluding Aleutian Islands).","9603","-5.0","135.0","172.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_79[] = {"1177","NAD27 to WGS 84 (8)","","","","Bahamas (Except San Salvador Island).","9603","-4.0","154.0","178.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_80[] = {"1178","NAD27 to WGS 84 (9)","","","","Bahamas (San Salvador Island).","9603","1.0","140.0","165.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_81[] = {"1179","NAD27 to WGS 84 (10)","","","","Canada (Alberta; British Columbia).","9603","-7.0","162.0","188.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_82[] = {"1180","NAD27 to WGS 84 (11)","","","","Canada (Manitoba; Ontario).","9603","-9.0","157.0","184.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_83[] = {"1181","NAD27 to WGS 84 (12)","","","","Canada (New Brunswick; Newfoundland; Nova Scotia; Quebec).","9603","-22.0","160.0","190.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_84[] = {"1182","NAD27 to WGS 84 (13)","","","","Canada (Northwest Territories; Nunavut; Saskatchewan).","9603","4.0","159.0","188.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_85[] = {"1183","NAD27 to WGS 84 (14)","","","","Canada (Yukon).","9603","-7.0","139.0","181.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_86[] = {"1184","NAD27 to WGS 84 (15)","","","","Panama - Canal Zone.","9603","0.0","125.0","201.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_87[] = {"1185","NAD27 to WGS 84 (16)","","","","Cuba.","9603","-9.0","152.0","178.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_88[] = {"1186","NAD27 to WGS 84 (17)","","","","Greenland (Hayes Peninsula).","9603","11.0","114.0","195.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_89[] = {"1187","NAD27 to WGS 84 (18)","","","","Mexico.","9603","-12.0","130.0","190.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_90[] = {"1188","NAD83 to WGS 84 (1)","","","","Canada; Central America; Mexico; United States (USA) (Alaska (excluding Aleutian Islands); CONUS).","9603","0.0","0.0","0.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.","EPSG","NAD83 is a realisation of WGS84 coincident to within 1.5 metres.  This transformation has an accuracy equal to the coincidence figure.","97.06",NULL};
-datafile_rows_t trf_nonpolynomial_row_91[] = {"1189","Nahrwan 1967 to WGS 84 (1)","","","","Oman (Masirah Island).","9603","-247.0","-148.0","369.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_92[] = {"1190","Nahrwan 1967 to WGS 84 (2)","","","","Saudi Arabia.","9603","-243.0","-192.0","477.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_93[] = {"1191","Nahrwan 1967 to WGS 84 (3)","","","","United Arab Emirates (UAE).","9603","-249.0","-156.0","381.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_94[] = {"1192","Naparima 1972 to WGS 84 (1)","","","","Trinidad and Tobago.","9603","-10.0","375.0","165.0","","","","","9001","","","","","","","1998-06-30 00:00:00","U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.","EPSG","CAUTION: EPSG believes that these parameter values include a blunder and that if NIMA transformation parameters are to be used the 1987 version (EPSG code 1307) be used.","98.102",NULL};
-datafile_rows_t trf_nonpolynomial_row_95[] = {"1193","NTF to WGS 84 (1)","","","","France.","9603","-168.0","-60.0","320.0","","","","","9001","","","","","","","1996-10-18 00:00:00","IGN technical report RT/G 14; January 1988.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_96[] = {"1195","OSGB 1936 to WGS 84 (1)","","","","MEAN FOR United Kingdom (UK) - Great Britain (England; Scotland; Wales); Isle of Man.","9603","375.0","-111.0","431.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_97[] = {"1196","OSGB 1936 to WGS 84 (2)","","","","United Kingdom (UK) - England.","9603","371.0","-112.0","434.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_98[] = {"1197","OSGB 1936 to WGS 84 (3)","","","","United Kingdom (UK) - England; Wales; Isle of Man.","9603","371.0","-111.0","434.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_99[] = {"1198","OSGB 1936 to WGS 84 (4)","","","","United Kingdom (UK) - Scotland (including Shetland Islands).","9603","384.0","-111.0","425.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_100[] = {"1199","OSGB 1936 to WGS 84 (5)","","","","United Kingdom (UK) - Wales.","9603","370.0","-108.0","434.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_101[] = {"1200","Pointe Noire to WGS 84 (1)","","","","Congo.","9603","-148.0","51.0","-291.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_102[] = {"1201","PSAD56 to WGS 84 (1)","","","","MEAN FOR Bolivia; Chile; Colombia;  Ecuador; Guyana; Peru; Venezuela.","9603","-288.0","175.0","-376.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_103[] = {"1202","PSAD56 to WGS 84 (2)","","","","Bolivia.","9603","-270.0","188.0","-388.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_104[] = {"1203","PSAD56 to WGS 84 (3)","","","","Chile (Northern; near 19 deg S).","9603","-270.0","183.0","-390.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_105[] = {"1204","PSAD56 to WGS 84 (4)","","","","Chile (Southern; near 43 deg S).","9603","-305.0","243.0","-442.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_106[] = {"1205","PSAD56 to WGS 84 (5)","","","","Colombia.","9603","-282.0","169.0","-371.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_107[] = {"1206","PSAD56 to WGS 84 (6)","","","","Ecuador.","9603","-278.0","171.0","-367.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_108[] = {"1207","PSAD56 to WGS 84 (7)","","","","Guyana.","9603","-298.0","159.0","-369.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_109[] = {"1208","PSAD56 to WGS 84 (8)","","","","Peru.","9603","-279.0","175.0","-379.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_110[] = {"1209","PSAD56 to WGS 84 (9)","","","","Venezuela.","9603","-295.0","173.0","-371.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_111[] = {"1210","Qatar to WGS 84 (1)","","","","Qatar.","9603","-128.0","-283.0","22.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_112[] = {"1211","Qornoq to WGS 84 (1)","","","","Greenland (South).","9603","164.0","138.0","-189.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_113[] = {"1212","SAD69 to WGS 84 (1)","","","","MEAN FOR Argentina; Bolivia; Brazil; Chile;  Colombia; Ecuador; Guyana; Paraguay;  Peru; Trinidad & Tobago; Venezuela.","9603","-57.0","1.0","-41.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_114[] = {"1213","SAD69 to WGS 84 (2)","","","","Argentina.","9603","-62.0","-1.0","-37.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_115[] = {"1214","SAD69 to WGS 84 (3)","","","","Bolivia.","9603","-61.0","2.0","-48.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_116[] = {"1215","SAD69 to WGS 84 (4)","","","","Brazil.","9603","-60.0","-2.0","-41.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_117[] = {"1216","SAD69 to WGS 84 (5)","","","","Chile.","9603","-75.0","-1.0","-44.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_118[] = {"1217","SAD69 to WGS 84 (6)","","","","Colombia.","9603","-44.0","6.0","-36.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_119[] = {"1218","SAD69 to WGS 84 (7)","","","","Ecuador.","9603","-48.0","3.0","-44.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_120[] = {"1219","SAD69 to WGS 84 (8)","","","","Ecuador (Baltra; Galapagos).","9603","-47.0","26.0","-42.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_121[] = {"1220","SAD69 to WGS 84 (9)","","","","Guyana.","9603","-53.0","3.0","-47.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_122[] = {"1221","SAD69 to WGS 84 (10)","","","","Paraguay.","9603","-61.0","2.0","-33.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_123[] = {"1222","SAD69 to WGS 84 (11)","","","","Peru.","9603","-58.0","0.0","-44.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_124[] = {"1223","SAD69 to WGS 84 (12)","","","","Trinidad and Tobago.","9603","-45.0","12.0","-33.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_125[] = {"1224","SAD69 to WGS 84 (13)","","","","Venezuela.","9603","-45.0","8.0","-33.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_126[] = {"1225","Sapper Hill 1943 to WGS 84 (1)","","","","Falkland Islands - East Falkland Island.","9603","-355.0","21.0","72.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_127[] = {"1226","Schwarzeck to WGS 84 (1)","","","","Namibia.","9603","616.0","97.0","-251.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_128[] = {"1227","Tananarive to WGS 84 (1)","","","","Madagascar.","9603","-189.0","-242.0","-91.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_129[] = {"1228","Timbalai 1948 to WGS 84 (1)","","","","Brunei; Malaysia (Sabah; Sarawak).","9603","-679.0","669.0","-48.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_130[] = {"1229","TM65 to WGS 84 (1)","","","","Ireland.","9603","506.0","-122.0","611.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_131[] = {"1230","Tokyo to WGS 84 (1)","","","","MEAN FOR Japan; South Korea; Okinawa.","9603","-148.0","507.0","685.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.","EPSG","","97.06",NULL};
-datafile_rows_t trf_nonpolynomial_row_132[] = {"1231","Tokyo to WGS 84 (2)","","","","Japan.","9603","-148.0","507.0","685.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_133[] = {"1232","Tokyo to WGS 84 (3)","","","","South Korea.","9603","-146.0","507.0","687.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.","EPSG","","97.06",NULL};
-datafile_rows_t trf_nonpolynomial_row_134[] = {"1233","Tokyo to WGS 84 (4)","","","","Japan (Okinawa).","9603","-158.0","507.0","676.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_135[] = {"1234","Yacare to WGS 84 (1)","","","","Uruguay.","9603","-155.0","171.0","37.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_136[] = {"1235","Zanderij to WGS 84 (1)","","","","Suriname.","9603","-265.0","120.0","-358.0","","","","","9001","","","","","","","1996-10-18 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_137[] = {"1236","AGD84 to WGS 84 (2)","","","","Australia.","9607","-116.0","-50.47","141.69","-0.23","-0.39","-0.344","0.0983","9001","9104","","9202","","","","1997-11-13 00:00:00","Australian Surveying and Land Information Group - www.auslig.gov.au/geodesy","EPSG","Superseded by AGD84 to GDA94 (2) (code 1280).","",NULL};
-datafile_rows_t trf_nonpolynomial_row_138[] = {"1237","WGS 72 to WGS 84 (1)","","","","World.","9606","0.0","0.0","4.5","0.0","0.0","0.554","0.2263","9001","9104","","9202","","","","1996-12-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_139[] = {"1238","WGS 72 to WGS 84 (2)","","","","World.","9606","0.0","0.0","4.5","0.0","0.0","0.554","0.219","9001","9104","","9202","","","","1996-12-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_140[] = {"1239","WGS 72BE to WGS 72 (1)","","","","World.","9606","0.0","0.0","-2.6","0.0","0.0","0.26","-0.6063","9001","9104","","9202","","","","1996-12-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_141[] = {"1240","WGS 72BE to WGS 84 (1)","","","","World.","9606","0.0","0.0","1.9","0.0","0.0","0.814","-0.38","9001","9104","","9202","","","","1996-12-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_142[] = {"1241","NAD27 to NAD83 (1)","","","","United States (USA) - lower 48 states including EEZ.","9613","","","","","","","","","9104","","","conus.las","conus.los","","1999-04-22 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov","EPSG","Uses NADCON method which expects longitudes positive west; EPSG GeogCS NAD27 (code 4267) and NAD83 (code 4269) have longitudes positive east.","98.201  98.53",NULL};
-datafile_rows_t trf_nonpolynomial_row_143[] = {"1243","NAD27 to NAD83 (2)","","","","United States (USA) - Alaska including EEZ.","9613","","","","","","","","","9104","","","alaska.las","alaska.los","","1999-04-22 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov","EPSG","Uses NADCON method which expects longitudes positive west; EPSG GeogCS NAD27 (code 4267) and NAD83 (code 4269) have longitudes positive east.","98.201  98.53",NULL};
-datafile_rows_t trf_nonpolynomial_row_144[] = {"1245","ED50 to WGS 84 (16)","","","","Tunisia.","9603","-112.0","-77.0","-145.0","","","","","9001","","","","","","","1998-04-16 00:00:00","U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.","EPSG","","98.11",NULL};
-datafile_rows_t trf_nonpolynomial_row_145[] = {"1246","Herat North to WGS 84 (1)","","","","Afghanistan.","9603","-333.0","-222.0","114.0","","","","","9001","","","","","","","1997-04-11 00:00:00","U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_146[] = {"1247","Kalianpur 1962 to WGS 84 (1)","","","","Pakistan.","9603","283.0","682.0","231.0","","","","","9001","","","","","","","1999-10-20 00:00:00","U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.","EPSG","Care!  DMA ellipsoid is inconsistent with EPSG ellipsoid - transformation parameter values may not be appropriate.","97.235",NULL};
-datafile_rows_t trf_nonpolynomial_row_147[] = {"1248","ID74 to WGS 84 (1)","","","","Indonesia.","9603","-24.0","-15.0","5.0","","","","","9001","","","","","","","1997-04-11 00:00:00","U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_148[] = {"1249","NAD27 to WGS 84 (21)","","","","United States (USA) - Alaska - Aleutian Islands east of 180 deg.","9603","-2.0","152.0","149.0","","","","","9001","","","","","","","1997-04-11 00:00:00","U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_149[] = {"1250","NAD27 to WGS 84 (22)","","","","United States (USA) - Alaska - Aleutian Islands west of 180 deg.","9603","2.0","204.0","105.0","","","","","9001","","","","","","","1997-04-11 00:00:00","U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_150[] = {"1251","NAD83 to WGS 84 (2)","","","","United States (USA) - Alaska - Aleutian Islands.","9603","-2.0","0.0","4.0","","","","","9001","","","","","","","1997-04-11 00:00:00","U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_151[] = {"1252","NAD83 to WGS 84 (3)","","","","United States (USA) - Hawaii.","9603","1.0","1.0","-1.0","","","","","9001","","","","","","","1997-04-11 00:00:00","U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_152[] = {"1253","Nord Sahara 1959 to WGS 84 (1)","","","","Algeria.","9603","-186.0","-93.0","310.0","","","","","9001","","","","","","","1997-04-11 00:00:00","U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_153[] = {"1254","Pulkovo 1942 to WGS 84 (1)","","","","Russia.","9603","28.0","-130.0","-95.0","","","","","9001","","","","","","","1997-04-11 00:00:00","U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_154[] = {"1255","Voirol Unifie to WGS 84 (1)","","","","Algeria - north of 35g (31 deg 30 min) North.","9603","-123.0","-206.0","219.0","","","","","9001","","","","","","","1998-06-30 00:00:00","U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.","EPSG","CAUTION:   EPSG believes that the data used in the derivation of these parameters contains a blunder.  We recommend using transformation 1253 [North Sahara 1959 to WGS84 (1)] as Voirol 1 [...]
-datafile_rows_t trf_nonpolynomial_row_155[] = {"1256","Fahud to WGS 84 (1)","","","","Oman.","9603","-346.0","-1.0","224.0","","","","","9001","","","","","","","1997-04-11 00:00:00","U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_156[] = {"1257","Bern 1898 (Bern) to Bern 1898","","","","Liechtenstein;  Switzerland.","9601","7.26225","","","","","","","","9110","","","","","","1999-11-12 00:00:00","EPSG","EPSG","Change of prime meridian.","99.79",NULL};
-datafile_rows_t trf_nonpolynomial_row_157[] = {"1258","Bogota (Bogota) to Bogota","","","","Colombia.","9601","-74.04513","","","","","","","","9110","","","","","","1999-11-12 00:00:00","EPSG","EPSG","Change of prime meridian.","99.79",NULL};
-datafile_rows_t trf_nonpolynomial_row_158[] = {"1259","Lisbon (Lisbon) to Lisbon","","","","Portugal - onshore.","9601","-9.0754862","","","","","","","","9110","","","","","","1999-11-12 00:00:00","EPSG","EPSG","Change of prime meridian.","99.79",NULL};
-datafile_rows_t trf_nonpolynomial_row_159[] = {"1260","Makassar (Jakarta) to Makassar","","","","Indonesia - south west Sulawesi.","9601","106.482779","","","","","","","","9110","","","","","","1999-11-12 00:00:00","EPSG","EPSG","Change of prime meridian.","99.79",NULL};
-datafile_rows_t trf_nonpolynomial_row_160[] = {"1261","MGI (Ferro) to MGI","","","","Austria.","9601","-17.4","","","","","","","","9110","","","","","","1999-11-12 00:00:00","EPSG","EPSG","Change of prime meridian.","99.79",NULL};
-datafile_rows_t trf_nonpolynomial_row_161[] = {"1262","Monte Mario (Rome) to Monte Mario","","","","Italy.","9601","12.27084","","","","","","","","9110","","","","","","1999-11-12 00:00:00","EPSG","EPSG","Change of prime meridian.","98.37  99.79",NULL};
-datafile_rows_t trf_nonpolynomial_row_162[] = {"1263","Padang (Jakarta) to Padang","","","","Indonesia - Sumatra.","9601","106.482779","","","","","","","","9110","","","","","","1999-11-12 00:00:00","EPSG","EPSG","Change of prime meridian.","99.79",NULL};
-datafile_rows_t trf_nonpolynomial_row_163[] = {"1264","Belge 1950 (Brussels) to Belge 1950","","","","Belgium - onshore.","9601","4.220471","","","","","","","","9110","","","","","","1999-11-12 00:00:00","EPSG","EPSG","Change of prime meridian.","99.79",NULL};
-datafile_rows_t trf_nonpolynomial_row_164[] = {"1265","Tananarive (Paris) to Tananarive","","","","Madagascar.","9601","2.5969213","","","","","","","","9105","","","","","","1999-11-12 00:00:00","EPSG","EPSG","Change of prime meridian.","99.79",NULL};
-datafile_rows_t trf_nonpolynomial_row_165[] = {"1266","Voirol 1875 (Paris) to Voirol 1875","","","","Algeria - north of 32 deg N.","9601","2.5969213","","","","","","","","9105","","","","","","1999-11-12 00:00:00","EPSG","EPSG","Change of prime meridian.","99.79",NULL};
-datafile_rows_t trf_nonpolynomial_row_166[] = {"1267","Voirol Unifie (Paris) to Voirol Unifie","","","","Algeria - north of 32 deg N.","9601","2.5969213","","","","","","","","9105","","","","","","1999-11-12 00:00:00","EPSG","EPSG","Change of prime meridian.","99.79",NULL};
-datafile_rows_t trf_nonpolynomial_row_167[] = {"1268","Batavia (Jakarta) to Batavia","","","","Indonesia - Java.","9601","106.482779","","","","","","","","9110","","","","","","1999-11-12 00:00:00","EPSG","EPSG","Change of prime meridian.","99.79",NULL};
-datafile_rows_t trf_nonpolynomial_row_168[] = {"1269","RT38 (Stockholm) to RT38","","","","Sweden.","9601","18.03298","","","","","","","","9110","","","","","","1999-11-12 00:00:00","EPSG","EPSG","Change of prime meridian.","99.79",NULL};
-datafile_rows_t trf_nonpolynomial_row_169[] = {"1270","Greek (Athens) to Greek","","","","Greece - onshore.","9601","23.4258815","","","","","","","","9110","","","","","","1999-11-12 00:00:00","Topography Department; National Technical University of Athens.","EPSG","Change of prime meridian.","99.79",NULL};
-datafile_rows_t trf_nonpolynomial_row_170[] = {"1271","Schwarzeck to WGS 84 (2)","","","","Namibia.","9603","615.64","102.08","-255.81","","","","","9001","","","","","","","1997-11-13 00:00:00","Chief Directorate Surveys and Land Information; Mowbray; South Africa.","EPSG","Beware !   Schwarzeck CS uses German legal metres.  Example:  Schwarzeck Lat 19d 35m 46.952s S Long 20d 41m 50.649s E; X=5623409.40 Y=2124618.00 Z=-2125847.62 GLM; X=5623485.86 Y=2124646.89 Z=-2125876.53 m; WGS84 X=5 [...]
-datafile_rows_t trf_nonpolynomial_row_171[] = {"1272","GGRS87 to WGS 84 (1)","","","","Greece.","9603","-199.87","74.79","246.62","","","","","9001","","","","","","","1997-06-16 00:00:00","Geodesy Department; Public Petroleum Corporation of Greece.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_172[] = {"1273","HD72 to ETRF89 (1)","","","","Hungary.","9607","-56.0","75.77","15.31","-0.37","-0.2","-0.21","-1.01","9001","9104","","9202","","","","1997-11-13 00:00:00","http://lazarus.elte.hu/gb/geodez/geod5.htm","EPSG","","97.47",NULL};
-datafile_rows_t trf_nonpolynomial_row_173[] = {"1274","Pulkovo 1942 to LKS94(ETRS89) (1)","CS42 to LKS94 (1)","","","Lithuania.","9607","-40.595","-18.55","-69.339","-2.508","-1.832","2.611","-4.299","9001","9104","","9202","","","","1998-03-12 00:00:00","HNIT-BALTIC GeoInfoServisas.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_174[] = {"1275","ED50 to WGS 84 (17)","","","","France.","9603","-84.0","-97.0","-117.0","","","","","9001","","","","","","","1998-04-16 00:00:00","IGN technical report 14 (January 1988).","EPSG","","98.11",NULL};
-datafile_rows_t trf_nonpolynomial_row_175[] = {"1276","NTF to ED50 (1)","","","","France.","9603","-84.0","37.0","437.0","","","","","9001","","","","","","","1997-11-13 00:00:00","IGN technical report 7 (October 1981).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_176[] = {"1277","NTF to WGS 72 (1)","","","","France.","9603","-168.0","-72.0","314.0","","","","","9001","","","","","","","1997-11-13 00:00:00","IGN technical report 7 (October 1981).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_177[] = {"1278","AGD66 to GDA94 (1)","","","","Australia.","9603","-127.8","-52.3","152.9","","","","","9001","","","","","","","1997-11-13 00:00:00","http://www.anzlic.org.au/icsm/gdatm/molodens.htm","EPSG","5m accuracy.  Parameter values are given to greater precision but no better accuracy at http://www.dehaa.sa.gov.au/res_inform/sicom/where/geobas14.html","",NULL};
-datafile_rows_t trf_nonpolynomial_row_178[] = {"1279","AGD84 to GDA94 (1)","","","","Australia.","9603","-128.5","-53.0","153.4","","","","","9001","","","","","","","1997-11-13 00:00:00","http://www.anzlic.org.au/icsm/gdatm/molodens.htm","EPSG","5m accuracy.  Parameter values are given to greater precision but no better accuracy at http://www.dehaa.sa.gov.au/res_inform/sicom/where/geobas14.html","",NULL};
-datafile_rows_t trf_nonpolynomial_row_179[] = {"1280","AGD84 to GDA94 (2)","","","","Australia.","9607","-117.763","-51.51","139.061","-0.292","-0.443","-0.277","-0.191","9001","9104","","9202","","","","1997-11-13 00:00:00","http://www.anzlic.org.au/icsm/gdatm/simil.htm","EPSG","1m accuracy.  Supersedes AGD84 to WGS 84 (2) (code 1236).","",NULL};
-datafile_rows_t trf_nonpolynomial_row_180[] = {"1282","Samboja to WGS 84 (1)","","","","Indonesia - east Kalimantan - Mahakam delta area.","9603","-404.78","-685.68","-45.47","","","","","9001","","","","","","","1997-11-13 00:00:00","Total Indonesia.","EPSG","Datum shift derived through ITRF93.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_181[] = {"1283","LKS94(ETRS89) to WGS 84 (1)","LKS94 to WGS 84 (1)","","","Lithuania.","9603","0.0","0.0","0.0","","","","","9001","","","","","","","1998-03-12 00:00:00","HNIT-BALTIC GeoInfoServisas.","EPSG","LKS94 is a realisation of WGS84 coincident to within 1.5 metres.  This transformation has an accuracy equal to the coincidence figure.","98.13",NULL};
-datafile_rows_t trf_nonpolynomial_row_182[] = {"1284","Arc 1960 to WGS 84 (2)","","","","Kenya.","9603","-157.0","-2.0","-299.0","","","","","9001","","","","","","","1998-03-12 00:00:00","U.S. National Imagery and Mapping Agency  TR8350.2 revision of October 1997; http://164.214.2.59/geospatial/products/GandG/tr83502b/toc.html","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_183[] = {"1285","Arc 1960 to WGS 84 (3)","","","","Tanzania.","9603","-175.0","-23.0","-303.0","","","","","9001","","","","","","","1998-03-12 00:00:00","U.S. National Imagery and Mapping Agency  TR8350.2 revision of October 1997; http://164.214.2.59/geospatial/products/GandG/tr83502b/toc.html","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_184[] = {"1286","Segora to WGS 84 (1)","","","","Indonesia - Kalimantan.","9603","-403.0","684.0","41.0","","","","","9001","","","","","","","1998-03-12 00:00:00","U.S. National Imagery and Mapping Agency  TR8350.2 revision of October 1997; http://164.214.2.59/geospatial/products/GandG/tr83502b/toc.html","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_185[] = {"1287","Pulkovo 1942 to WGS 84 (3)","","","","Hungary.","9603","28.0","-121.0","-77.0","","","","","9001","","","","","","","1998-04-16 00:00:00","U.S. National Imagery and Mapping Agency  TR8350.2 revision of October 1997; http://164.214.2.59/geospatial/products/GandG/tr83502b/toc.html","EPSG","","98.11",NULL};
-datafile_rows_t trf_nonpolynomial_row_186[] = {"1288","Pulkovo 1942 to WGS 84 (4)","","","","Poland.","9603","23.0","-124.0","-82.0","","","","","9001","","","","","","","1998-04-16 00:00:00","U.S. National Imagery and Mapping Agency  TR8350.2 revision of October 1997; http://164.214.2.59/geospatial/products/GandG/tr83502b/toc.html","EPSG","","98.11",NULL};
-datafile_rows_t trf_nonpolynomial_row_187[] = {"1289","Pulkovo 1942 to WGS 84 (5)","","","","Czech Republic.","9603","26.0","-121.0","-78.0","","","","","9001","","","","","","","1998-04-16 00:00:00","U.S. National Imagery and Mapping Agency  TR8350.2 revision of October 1997; http://164.214.2.59/geospatial/products/GandG/tr83502b/toc.html","EPSG","","98.11",NULL};
-datafile_rows_t trf_nonpolynomial_row_188[] = {"1290","Pulkovo 1942 to WGS 84 (6)","","","","Latvia.","9603","24.0","-124.0","-82.0","","","","","9001","","","","","","","1998-04-16 00:00:00","U.S. National Imagery and Mapping Agency  TR8350.2 revision of October 1997; http://164.214.2.59/geospatial/products/GandG/tr83502b/toc.html","EPSG","","98.11",NULL};
-datafile_rows_t trf_nonpolynomial_row_189[] = {"1291","Pulkovo 1942 to WGS 84 (7)","","","","Kazakstan.","9603","15.0","-130.0","-84.0","","","","","9001","","","","","","","1998-04-16 00:00:00","U.S. National Imagery and Mapping Agency  TR8350.2 revision of October 1997; http://164.214.2.59/geospatial/products/GandG/tr83502b/toc.html","EPSG","","98.11",NULL};
-datafile_rows_t trf_nonpolynomial_row_190[] = {"1292","Pulkovo 1942 to WGS 84 (8)","","","","Albania.","9603","24.0","-130.0","-92.0","","","","","9001","","","","","","","1998-04-16 00:00:00","U.S. National Imagery and Mapping Agency  TR8350.2 revision of October 1997; http://164.214.2.59/geospatial/products/GandG/tr83502b/toc.html","EPSG","","98.11",NULL};
-datafile_rows_t trf_nonpolynomial_row_191[] = {"1293","Pulkovo 1942 to WGS 84 (9)","","","","Romania.","9603","28.0","-121.0","-77.0","","","","","9001","","","","","","","1998-04-16 00:00:00","U.S. National Imagery and Mapping Agency  TR8350.2 revision of October 1997; http://164.214.2.59/geospatial/products/GandG/tr83502b/toc.html","EPSG","","98.11",NULL};
-datafile_rows_t trf_nonpolynomial_row_192[] = {"1294","Voirol 1875 to WGS 84 (1)","","","","Algeria - north of 35g (31 deg 30 min) North.","9603","-73.0","-247.0","227.0","","","","","9001","","","","","","","1998-03-12 00:00:00","U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_193[] = {"1295","Naparima 1972 to WGS 84 (2)","","","","Trinidad and Tobago.","9603","-0.465","372.095","171.736","","","","","9001","","","","","","","1998-11-11 00:00:00","Trinidad Ministry of Energy and Energy Industries.","EPSG","","98/38",NULL};
-datafile_rows_t trf_nonpolynomial_row_194[] = {"1296","Trinidad 1903 to WGS 84 (1)","","","","Trinidad.","9603","-61.702","284.488","472.052","","","","","9001","","","","","","","1998-11-11 00:00:00","Trinidad Ministry of Energy and Energy Industries.","EPSG","","98/38",NULL};
-datafile_rows_t trf_nonpolynomial_row_195[] = {"1297","Tete to Moznet (1)","","","","Mozambique.","9607","-115.064","-87.39","-101.716","0.058","-4.001","2.062","9.366","9001","9104","","9202","","","","1998-04-16 00:00:00","Direc��o Nacional de Geografia e Cadastral (DINAGECA).","EPSG","Mean of 32 stations. Residuals as high as 30 metres. To reduce the size of the residuals; four regional parameter sets (codes 1298-1301) were developed.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_196[] = {"1298","Tete to Moznet (2)","","","","Mozambique - Maputo province and southern part of Gaza province; i.e. south of approximately 24 deg S.","9607","-82.875","-57.097","-156.768","2.158","-1.524","0.982","-0.359","9001","9104","","9202","","","","1998-04-16 00:00:00","Direc��o Nacional de Geografia e Cadastral (DINAGECA).","EPSG","Mean of 9 stations; residuals are generally under 1 metre.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_197[] = {"1299","Tete to Moznet (3)","","","","Mozambique - provinces of Gaza; Inhambane and southern parts of Sofala and Manhica; i.e. between approximately 24 and 20 deg South.","9607","-138.527","-91.999","-114.591","0.14","-3.363","2.217","11.748","9001","9104","","9202","","","","1998-04-16 00:00:00","Direc��o Nacional de Geografia e Cadastral (DINAGECA).","EPSG","Mean of 6 stations; residuals are generally under 4 metres.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_198[] = {"1300","Tete to Moznet (4)","","","","Mozambique - provinces of Sofala north of Beira corridor; Manhica; Tete and Zambezia; i.e. between approximately 20 and 16 deg South.","9607","-73.472","-51.66","-112.482","-0.953","-4.6","2.368","0.586","9001","9104","","9202","","","","1998-04-16 00:00:00","Direc��o Nacional de Geografia e Cadastral (DINAGECA).","EPSG","Mean of 11 stations; residuals are generally under 3 metres.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_199[] = {"1301","Tete to Moznet (5)","","","","Mozambique - provinces of Nampula; Niassa; Cabo Delgado; i.e. north of approximately 16 deg S.","9607","219.315","168.975","-166.145","-0.198","-5.926","2.356","-57.104","9001","9104","","9202","","","","1998-04-16 00:00:00","Direc��o Nacional de Geografia e Cadastral (DINAGECA).","EPSG","Mean of 7 stations; residuals are 5-10 metres.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_200[] = {"1302","Moznet to WGS 84 (1)","","","","Mozambique.","9607","0.0","0.0","0.0","0.0","0.0","0.0","0.0","9001","9104","","9202","","","","1998-04-16 00:00:00","EPSG","EPSG","For many purposes Moznet can be considered to be coincident with WGS 84. Accuracy better than 1 metre.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_201[] = {"1303","Pulkovo 1942 to WGS 84 (10)","","","","Kazakstan - Caspian.","9606","43.661","-103.342","-124.117","1.659","-0.824","0.653","0.59","9001","9104","","9202","","","","1998-04-16 00:00:00","KazakCaspiShelf consortium.","EPSG","Mean of 13 stations along entire Kazak coastline; residuals under 2 m.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_202[] = {"1304","Indian 1975 to WGS 84 (2)","","","","Thailand.","9603","210.0","814.0","289.0","","","","","9001","","","","","","","1998-04-16 00:00:00","U.S. National Imagery and Mapping Agency  TR8350.2 revision of October 1997; http://164.214.2.59/geospatial/products/GandG/tr83502b/toc.html","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_203[] = {"1305","Tokyo to WGS 84 (5)","","","","South Korea.","9603","-147.0","506.0","687.0","","","","","9001","","","","","","","1998-04-16 00:00:00","U.S. National Imagery and Mapping Agency  TR8350.2 revision of October 1997; http://164.214.2.59/geospatial/products/GandG/tr83502b/toc.html","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_204[] = {"1306","MGI to WGS 84 (1)","","","","MEAN FOR Boznia and Herzegovina; Croatia; Serbia; Slovenia.","9603","682.0","-203.0","480.0","","","","","9001","","","","","","","1998-04-16 00:00:00","U.S. National Imagery and Mapping Agency  TR8350.2 revision of October 1997; http://164.214.2.59/geospatial/products/GandG/tr83502b/toc.html","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_205[] = {"1307","Naparima 1972 to WGS 84 (3)","","","","Trinidad & Tobago.","9603","-2.0","374.0","172.0","","","","","9001","","","","","","","1998-04-16 00:00:00","U.S. Defense Mapping Agency  TR8350.2 December 1987.","EPSG","See remarks for code 1192.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_206[] = {"1308","NAD83 to WGS 84 (4)","","","","United States (USA)","9607","-0.9738","1.9453","0.5486","-0.00000013357","-0.00000004872","-0.00000005507","0.0","9001","9101","","9202","","","","1999-04-22 00:00:00"," http://www.ngs.noaa.gov/CORS/Derivation.html","EPSG","Strictly between NAD83 and ITRF94(1996.0).  Superseded by NAD83 to WGS 84 (5) (code 1515).","99.12  99.38",NULL};
-datafile_rows_t trf_nonpolynomial_row_207[] = {"1309","DHDN to ETRF89 (1)","","","","Germany - former west Germany.","9607","582.0","105.0","414.0","-1.04","-0.35","3.08","8.3","9001","9104","","9202","","","","1998-06-30 00:00:00","Institute for Cartography and Geodesy; Leipzig.","EPSG","Mean of 69 stations; residuals under 5 m.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_208[] = {"1310","Pulkovo 1942 to ETRF89 (1)","","","","Germany - former east Germany - Brandenburg; Mecklenburg-Vorpommern; Sachsen-Anhalt.","9607","24.0","-123.0","-94.0","-0.02","0.25","0.13","1.1","9001","9104","","9202","","","","1998-06-30 00:00:00","Institute for Cartography and Geodesy; Leipzig.","EPSG","Mean of 20 stations; residuals under 2 m.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_209[] = {"1311","ED50 to WGS 84 (Common Offshore)","ED50 to WGS 84 (18)","","","United Kingdom - UKCS offshore east of 6 deg west.","9606","-89.5","-93.8","-123.1","0.0","0.0","-0.156","1.2","9001","9104","","9202","","","","1998-06-30 00:00:00","The Hydrographic Journal; vol 52 page 50.","EPSG","Recommended transformation for UKCS petroleum purposes.  Based on ED50 to WGS72 (precise ephemeris) 6-nations agreement of 1981 to which precise to broadcas [...]
-datafile_rows_t trf_nonpolynomial_row_210[] = {"1312","NAD27 to NAD83 (3)","","","","Canada.","9614","","","","","","","","","9104","","","NTv1_0.gsb","","","1999-04-22 00:00:00","Geomatics Canada - Geodetic Survey Division.","EPSG","Uses NTv1 method.  Superseded in 1997 by NTv2 (non-poly transformation code 1313) except in Quebec.   Input expects longitudes to be positive west; EPSG GeogCS NAD27 (code 4267) and NAD83 (code 4269) have longitudes positive east.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_211[] = {"1313","NAD27 to NAD83 (4)","","","","Canada.","9615","","","","","","","","","9104","","","NTv2_0.gsb","","","1999-04-22 00:00:00","http://www.geod.nrcan.gc.ca/products/html-public/GSDapps/English/NTv2_Fact_Sheet.html","EPSG","Uses NTv2 data files.  Supersedes  NTv1 (non-poly transformation code 1312) except in Quebec.  Input expects longitudes to be positive west; EPSG GeogCS NAD27 (code 4267) and (code 4269) have longitudes positive east. [...]
-datafile_rows_t trf_nonpolynomial_row_212[] = {"1314","OSGB 1936 to WGS 84 (Petroleum)","","","","United Kingdom (UKCS) - Great Britain (GB) - England; Scotland; Wales; - North Sea.","9606","446.448","-125.157","542.06","0.15","0.247","0.842","-20.489","9001","9104","","9202","","","","1998-11-11 00:00:00","UK Offshore Operators Association.","EPSG","Accuracy better than 4m and generally better than 2m.  For a more accurate transformation contact the Ordnance Survey of Great Britain.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_213[] = {"1315","OSGB 1936 to ED50 (UKOOA)","","","","United Kingdom (UKCS) - Great Britain (GB) - England; Scotland; Wales; - North Sea.","9606","535.948","-31.357","665.16","0.15","0.247","0.998","-21.689","9001","9104","","9202","","","","1998-11-11 00:00:00","UK Offshore Operators Association.","EPSG","This transformation is concatenated from OSGB36 to WGS 84 (Petroleum) (code 1314) minus ED50 to WGS 84 (Common Offshore) (code 1311).","",NULL};
-datafile_rows_t trf_nonpolynomial_row_214[] = {"1316","Manoca to WGS 84 (1)","","","","Cameroon.","9603","-70.9","-151.8","-41.4","","","","","9001","","","","","","","1998-11-11 00:00:00","Stolt Comex Seaway and Geoid for Elf.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_215[] = {"1317","Camacupa to WGS 72BE (1)","","","","Angola - offshore.","9603","-37.2","-370.6","-228.5","","","","","9001","","","","","","","1998-11-11 00:00:00","EPSG","EPSG","Derived by Geophysical Services Inc. in 1979 from mean of Transit results at 7 stations.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_216[] = {"1318","Camacupa to WGS 84 (1)","","","","Angola - offshore block 5.","9603","-42.01","-332.21","-229.75","","","","","9001","","","","","","","1998-11-11 00:00:00","EPSG","EPSG","Used by Conoco.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_217[] = {"1319","Camacupa to WGS 84 (2)","","","","Angola - offshore block 2.","9603","-40.0","-354.0","-224.0","","","","","9001","","","","","","","1998-11-11 00:00:00","EPSG","EPSG","Used by Texaco.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_218[] = {"1320","Camacupa to WGS 84 (3)","","","","Angola - offshore blocks 1 and 16.","9606","-37.2","-370.6","-224.0","0.0","0.0","0.554","0.219","9001","9104","8901","9202","","","","1998-12-14 00:00:00","EPSG","EPSG","Used by Shell prior to 1994.  Superseded by Camacupa to WGS 84 (9).","98.56",NULL};
-datafile_rows_t trf_nonpolynomial_row_219[] = {"1321","Camacupa to WGS 84 (4)","","","","Angola - offshore blocks 7 and 8.  Also used rounded to integer metre for GSI/HGS/Western Geophysical speculative seismic data.","9603","-42.5","-342.5","-228.1","","","","","9001","","","","","","","1998-11-11 00:00:00","EPSG","EPSG","Derived as mean of 123 Transit passes at station Cabo Ledo NE base in January 1989.  Used by Total for block 8. Used by Elf for block 7 up to December 1992 then supers [...]
-datafile_rows_t trf_nonpolynomial_row_220[] = {"1322","Camacupa to WGS 84 (5)","","","","Angola - offshore block 3.","9603","-55.5","-348.0","-229.2","","","","","9001","","","","","","","1998-11-11 00:00:00","EPSG","EPSG","Derived at station Djeno during coordination of platform PAL F2 in February 1992. Used by Elf for block 3 up to December 1992 then superseded by Camacupa to WGS 84 (7).","",NULL};
-datafile_rows_t trf_nonpolynomial_row_221[] = {"1323","Camacupa to WGS 84 (6)","","","","Angola - offshore block 7.","9603","-43.0","-337.0","-233.0","","","","","9001","","","","","","","1998-11-11 00:00:00","EPSG","EPSG","Derived at Luanda observatory December 1992.  Used by Elf for 1993 block 7 shallow water survey.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_222[] = {"1324","Camacupa to WGS 84 (7)","","","","Angola - offshore blocks 3  7  15 and 17.","9603","-48.0","-345.0","-231.0","","","","","9001","","","","","","","1998-11-11 00:00:00","EPSG","EPSG","Derived at platform PAL F2 in December 1992.  Used by Elf for blocks 3, 7 and 17 between December 1992 and 1994 then superseded by Camacupa to WGS 84 (10).  Used by Exxon for block 15 since 1993.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_223[] = {"1325","Camacupa to WGS 84 (8)","","","","Angola - offshore block 2.","9603","-48.6","-345.1","-230.8","","","","","9001","","","","","","","1998-11-11 00:00:00","EPSG","EPSG","Derived at platform PAL F2 in December 1992. Used by Total for block 2 between December 1992 and 1994 then superseded by Camacupa to WGS 84 (10).","",NULL};
-datafile_rows_t trf_nonpolynomial_row_224[] = {"1326","Camacupa to WGS 84 (9)","","","","Angola - offshore blocks 1 16 and 18.","9606","-41.057","-374.564","-226.287","0.0","0.0","0.554","0.219","9001","9104","8901","9202","","","","1998-12-14 00:00:00","EPSG","EPSG","Used by Shell since 1994.  Supersedes Camacupa to WGS 84 (3).","98.56",NULL};
-datafile_rows_t trf_nonpolynomial_row_225[] = {"1327","Camacupa to WGS 84 (10)","","","","Angola - offshore blocks 2  3 17 and 31-33.","9603","-50.9","-347.6","-231.0","","","","","9001","","","","","","","1998-11-11 00:00:00","EPSG","EPSG","Derived at platform PAL F2 in 1994 by Topnav using Doris.  Used by Elf in blocks 3 and 17 since 1994.  Used by Total in block 2 since 1994. Adopted by BP-Amoco Elf and Exxon for blocks 31-33.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_226[] = {"1328","Malongo 1987 to Mhast (1)","","","","Angola - Cabinda offshore.","9603","0.0","0.0","0.0","","","","","9001","","","","","","","1998-11-11 00:00:00","EPSG","EPSG","Malongo 1987 is an offshore extension of Mhast adopted by Chevron in 1987.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_227[] = {"1329","Mhast to WGS 84 (1)","","","","Angola - Cabinda offshore.","9603","-252.95","-4.11","-96.38","","","","","9001","","","","","","","1998-11-11 00:00:00","EPSG","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_228[] = {"1330","Malongo 1987 to WGS 84 (1)","","","","Angola - Cabinda offshore.","9603","-252.95","-4.11","-96.38","","","","","9001","","","","","","","1998-11-11 00:00:00","EPSG","EPSG","Used by Chevron.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_229[] = {"1331","EST92 to ETRF89 (1)","","","","Estonia","9607","0.0","0.0","0.0","0.0","0.0","0.0","0.0","9001","9104","","9202","","","","1998-12-14 00:00:00","http://www.geo.ut.ee/~raivo/estcoord.html","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_230[] = {"1332","Pulkovo 1942 to EST92 (1)","","","","Estonia.","9607","21.53219","-97.00027","-60.74046","-0.99548","-0.58147","-0.2418","-4.5981","9001","9104","","9202","","","","1998-12-14 00:00:00","http://www.geo.ut.ee/~raivo/estcoord.html","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_231[] = {"1333","EST92 to WGS84 (1)","","","","Estonia.","9607","0.055","-0.541","-0.185","-0.0183","0.0003","0.007","-0.014","9001","9104","","9202","","","","1998-12-14 00:00:00","http://www.geo.ut.ee/~raivo/estcoord.html","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_232[] = {"1334","Pulkovo 1942 to WGS84 (12)","","","","Estonia.","9607","21.58719","-97.54127","-60.92546","-1.01378","-0.58117","-0.2348","-4.6121","9001","9104","","9202","","","","1998-12-14 00:00:00","http://www.geo.ut.ee/~raivo/estcoord.html","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_233[] = {"1335","Tokyo to WGS 84 (6)","","","","Japan - 45d 20m to 46d N; 141d to 142d E.","9618","7.92","-13.88","26.1","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_234[] = {"1336","Tokyo to WGS 84 (7)","","","","Japan - 45d 20m to 46d N; 142d to 143d E.","9618","7.94","-13.97","26.9","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_235[] = {"1337","Tokyo to WGS 84 (8)","","","","Japan - 44deg 40min to 45deg 20min N; 141deg to 142deg E.","9618","8.1","-13.81","27.2","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_236[] = {"1338","Tokyo to WGS 84 (9)","","","","Japan - 44deg 40min to 45deg 20min N; 142deg to 143deg E.","9618","8.15","-13.95","28.4","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_237[] = {"1339","Tokyo to WGS 84 (10)","","","","Japan - 44deg to 44deg 40min N; 141deg to 142deg E.","9618","8.37","-13.65","29.0","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_238[] = {"1340","Tokyo to WGS 84 (11)","","","","Japan - 44deg to 44deg 40min N; 142deg to 143deg E.","9618","8.44","-13.87","30.9","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_239[] = {"1341","Tokyo to WGS 84 (12)","","","","Japan - 44deg to 44deg 40min N; 143deg to 144deg E.","9618","8.61","-14.08","30.7","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_240[] = {"1342","Tokyo to WGS 84 (13)","","","","Japan - 44deg to 44deg 40min N; 144deg to 145deg E.","9618","8.73","-14.3","30.9","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_241[] = {"1343","Tokyo to WGS 84 (14)","","","","Japan - 43deg 20min to 44deg N; 141deg to 142deg E.","9618","8.63","-13.49","30.9","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_242[] = {"1344","Tokyo to WGS 84 (15)","","","","Japan - 43deg 20min to 44deg N; 142deg to 143deg E.","9618","8.71","-13.73","31.6","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_243[] = {"1345","Tokyo to WGS 84 (16)","","","","Japan - 43deg 20min to 44deg N; 143deg to 144deg E.","9618","8.84","-14.03","31.2","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_244[] = {"1346","Tokyo to WGS 84 (17)","","","","Japan - 43deg 20min to 44deg N; 144deg to 145deg E.","9618","8.98","-14.33","32.5","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_245[] = {"1347","Tokyo to WGS 84 (18)","","","","Japan - 43deg 20min to 44deg N; 145deg to 146deg E.","9618","9.1","-14.56","32.6","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_246[] = {"1348","Tokyo to WGS 84 (19)","","","","Japan - 42deg 40min to 43deg 20min N; 140deg to 141deg E.","9618","8.79","-13.0","33.3","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_247[] = {"1349","Tokyo to WGS 84 (20)","","","","Japan - 42deg 40min to 43deg 20min N; 141deg to 142deg E.","9618","8.84","-13.31","31.4","","","","","9001","9104","","","","","","1999-11-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","99.77",NULL};
-datafile_rows_t trf_nonpolynomial_row_248[] = {"1350","Tokyo to WGS 84 (21)","","","","Japan - 42deg 40min to 43deg 20min N; 142deg to 143deg E.","9618","8.98","-13.59","30.9","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_249[] = {"1351","Tokyo to WGS 84 (22)","","","","Japan - 42deg 40min to 43deg 20min N; 143deg to 144deg E.","9618","9.1","-13.91","29.3","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_250[] = {"1352","Tokyo to WGS 84 (23)","","","","Japan - 42deg 40min to 43deg 20min N; 144deg to 145deg E.","9618","9.17","-14.27","31.3","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_251[] = {"1353","Tokyo to WGS 84 (24)","","","","Japan - 42deg 40min to 43deg 20min N; 145deg to 146deg E.","9618","9.23","-14.52","31.4","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_252[] = {"1354","Tokyo to WGS 84 (25)","","","","Japan - 42deg to 42deg 40min N; 139deg to 140deg E.","9618","8.9","-12.68","34.4","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_253[] = {"1355","Tokyo to WGS 84 (26)","","","","Japan - 42deg to 42deg 40min N; 140deg to 141deg E.","9618","8.99","-12.8","34.2","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_254[] = {"1356","Tokyo to WGS 84 (27)","","","","Japan - 42deg to 42deg 40min N; 141deg to 142deg E.","9618","9.0","-13.07","31.7","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_255[] = {"1357","Tokyo to WGS 84 (28)","","","","Japan - 42deg to 42deg 40min N; 142deg to 143deg E.","9618","9.21","-13.51","27.5","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_256[] = {"1358","Tokyo to WGS 84 (29)","","","","Japan - 42deg to 42deg 40min N; 143deg to 144deg E.","9618","9.33","-13.66","23.8","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_257[] = {"1359","Tokyo to WGS 84 (30)","","","","Japan - 41deg 20min to 42deg N; 140deg to 141deg E.","9618","9.25","-12.72","34.2","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_258[] = {"1360","Tokyo to WGS 84 (31)","","","","Japan - 41deg 20min to 42deg N; 141deg to 142deg E.","9618","9.39","-12.91","31.8","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_259[] = {"1361","Tokyo to WGS 84 (32)","","","","Japan - 40deg 40min to 41deg 20min N; 140deg to 141deg E.","9618","9.55","-12.63","35.6","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_260[] = {"1362","Tokyo to WGS 84 (33)","","","","Japan - 40deg 40min to 41deg 20min N; 141deg to 142deg E.","9618","9.62","-12.82","34.7","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_261[] = {"1363","Tokyo to WGS 84 (34)","","","","Japan - 40deg to 40deg 40min N; 139deg to 140deg E.","9618","9.81","-12.29","36.6","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_262[] = {"1364","Tokyo to WGS 84 (35)","","","","Japan - 40deg to 40deg 40min N; 140deg to 141deg E.","9618","9.81","-12.45","37.5","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_263[] = {"1365","Tokyo to WGS 84 (36)","","","","Japan - 40deg to 40deg 40min N; 141deg to 142deg E.","9618","9.92","-12.79","38.3","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_264[] = {"1366","Tokyo to WGS 84 (37)","","","","Japan - 39deg 20min to 40deg N; 139deg to 140deg E.","9618","9.91","-12.21","36.6","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_265[] = {"1367","Tokyo to WGS 84 (38)","","","","Japan - 39deg 20min to 40deg N; 140deg to 141deg E.","9618","10.08","-12.35","39.0","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_266[] = {"1368","Tokyo to WGS 84 (39)","","","","Japan - 39deg 20min to 40deg N; 141deg to 142deg E.","9618","10.19","-12.74","40.3","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_267[] = {"1369","Tokyo to WGS 84 (40)","","","","Japan - 38deg 40min to 39deg 20min N; 139deg to 140deg E.","9618","10.29","-12.13","38.5","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_268[] = {"1370","Tokyo to WGS 84 (41)","","","","Japan - 38deg 40min to 39deg 20min N; 140deg to 141deg E.","9618","10.33","-12.27","40.1","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_269[] = {"1371","Tokyo to WGS 84 (42)","","","","Japan - 38deg 40min to 39deg 20min N; 141deg to 142deg E.","9618","10.45","-12.61","41.7","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_270[] = {"1372","Tokyo to WGS 84 (43)","","","","Japan - 38deg to 38deg 40min N; 139deg to 140deg E.","9618","10.54","-11.96","39.1","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_271[] = {"1373","Tokyo to WGS 84 (44)","","","","Japan - 38deg to 38deg 40min N; 140deg to 141deg E.","9618","10.65","-12.27","41.7","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_272[] = {"1374","Tokyo to WGS 84 (45)","","","","Japan - 38deg to 38deg 40min N; 141deg to 142deg E.","9618","10.67","-12.5","41.1","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_273[] = {"1375","Tokyo to WGS 84 (46)","","","","Japan - 37deg 20min to 38deg N; 136deg to 137deg E.","9618","10.67","-10.86","38.5","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_274[] = {"1376","Tokyo to WGS 84 (47)","","","","Japan - 37deg 20min to 38deg N; 137deg to 138deg E.","9618","10.68","-10.97","36.0","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_275[] = {"1377","Tokyo to WGS 84 (48)","","","","Japan - 37deg 20min to 38deg N; 138deg to 139deg E.","9618","10.8","-11.53","39.7","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_276[] = {"1378","Tokyo to WGS 84 (49)","","","","Japan - 37deg 20min to 38deg N; 139deg to 140deg E.","9618","10.8","-11.73","40.9","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_277[] = {"1379","Tokyo to WGS 84 (50)","","","","Japan - 37deg 20min to 38deg N; 140deg to 141deg E.","9618","10.92","-12.16","42.3","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_278[] = {"1380","Tokyo to WGS 84 (51)","","","","Japan - 37deg 20min to 38deg N; 141deg to 142deg E.","9618","11.0","-12.25","41.2","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_279[] = {"1381","Tokyo to WGS 84 (52)","","","","Japan - 36deg 40min to 37deg 20min N; 136deg to 137deg E.","9618","10.83","-10.77","36.2","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_280[] = {"1382","Tokyo to WGS 84 (53)","","","","Japan - 36deg 40min to 37deg 20min N; 137deg to 138deg E.","9618","10.95","-11.0","38.7","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_281[] = {"1383","Tokyo to WGS 84 (54)","","","","Japan - 36deg 40min to 37deg 20min N; 138deg to 139deg E.","9618","10.97","-11.34","40.8","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_282[] = {"1384","Tokyo to WGS 84 (55)","","","","Japan - 36deg 40min to 37deg 20min N; 139deg to 140deg E.","9618","11.04","-11.69","43.3","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_283[] = {"1385","Tokyo to WGS 84 (56)","","","","Japan - 36deg 40min to 37deg 20min N; 140deg to 141deg E.","9618","11.17","-12.05","42.6","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_284[] = {"1386","Tokyo to WGS 84 (57)","","","","Japan - 36deg to 37deg 40min N; 136deg to 137deg E.","9618","11.11","-10.59","37.3","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_285[] = {"1387","Tokyo to WGS 84 (58)","","","","Japan - 36deg to 37deg 40min N; 137deg to 138deg E.","9618","11.16","-10.97","40.3","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_286[] = {"1388","Tokyo to WGS 84 (59)","","","","Japan - 36deg to 37deg 40min N; 138deg to 139deg E.","9618","11.29","-11.23","42.4","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_287[] = {"1389","Tokyo to WGS 84 (60)","","","","Japan - 36deg to 37deg 40min N; 139deg to 140deg E.","9618","11.36","-11.59","42.5","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_288[] = {"1390","Tokyo to WGS 84 (61)","","","","Japan - 36deg to 37deg 40min N; 140deg to 141deg E.","9618","11.44","-11.88","40.3","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_289[] = {"1391","Tokyo to WGS 84 (62)","","","","Japan - 35deg 20min to 36deg N; 132deg to 133deg E.","9618","11.27","-9.31","30.9","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_290[] = {"1392","Tokyo to WGS 84 (63)","","","","Japan - 35deg 20min to 36deg N; 133deg to 134deg E.","9618","11.33","-9.52","33.8","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_291[] = {"1393","Tokyo to WGS 84 (64)","","","","Japan - 35deg 20min to 36deg N; 134deg to 135deg E.","9618","11.38","-9.86","34.9","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_292[] = {"1394","Tokyo to WGS 84 (65)","","","","Japan - 35deg 20min to 36deg N; 135deg to 136deg E.","9618","11.41","-10.14","35.7","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_293[] = {"1395","Tokyo to WGS 84 (66)","","","","Japan - 35deg 20min to 36deg N; 136deg to 137deg E.","9618","11.39","-10.52","37.5","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_294[] = {"1396","Tokyo to WGS 84 (67)","","","","Japan - 35deg 20min to 36deg N; 137deg to 138deg E.","9618","11.49","-10.83","39.3","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_295[] = {"1397","Tokyo to WGS 84 (68)","","","","Japan - 35deg 20min to 36deg N; 138deg to 139deg E.","9618","11.58","-11.21","41.7","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_296[] = {"1398","Tokyo to WGS 84 (69)","","","","Japan - 35deg 20min to 36deg N; 139deg to 140deg E.","9618","11.65","-11.53","38.5","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_297[] = {"1399","Tokyo to WGS 84 (70)","","","","Japan - 35deg 20min to 36deg N; 140deg to 141deg E.","9618","11.72","-11.8","34.5","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_298[] = {"1400","Tokyo to WGS 84 (71)","","","","Japan - 34deg 40min to 35deg 20min N; 132deg to 133deg E.","9618","11.44","-9.21","32.7","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_299[] = {"1401","Tokyo to WGS 84 (72)","","","","Japan - 34deg 40min to 35deg 20min N; 133deg to 134deg E.","9618","11.47","-9.52","35.2","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_300[] = {"1402","Tokyo to WGS 84 (73)","","","","Japan - 34deg 40min to 35deg 20min N; 134deg to 135deg E.","9618","11.55","-9.8","35.4","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_301[] = {"1403","Tokyo to WGS 84 (74)","","","","Japan - 34deg 40min to 35deg 20min N; 135deg to 136deg E.","9618","11.61","-10.12","35.9","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_302[] = {"1404","Tokyo to WGS 84 (75)","","","","Japan - 34deg 40min to 35deg 20min N; 136deg to 137deg E.","9618","11.66","-10.47","37.0","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_303[] = {"1405","Tokyo to WGS 84 (76)","","","","Japan - 34deg 40min to 35deg 20min N; 137deg to 138deg E.","9618","11.78","-10.79","39.8","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_304[] = {"1406","Tokyo to WGS 84 (77)","","","","Japan - 34deg 40min to 35deg 20min N; 138deg to 139deg E.","9618","11.85","-11.13","39.9","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_305[] = {"1407","Tokyo to WGS 84 (78)","","","","Japan - 34deg 40min to 35deg 20min N; 139deg to 140deg E.","9618","11.9","-11.47","36.9","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_306[] = {"1408","Tokyo to WGS 84 (79)","","","","Japan - 34deg 40min to 35deg 20min N; 140deg to 141deg E.","9618","11.91","-11.69","33.7","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_307[] = {"1409","Tokyo to WGS 84 (80)","","","","Japan - 34deg to 34deg 40min N; 130deg to 131deg E.","9618","11.65","-8.59","29.7","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_308[] = {"1410","Tokyo to WGS 84 (81)","","","","Japan - 34deg to 34deg 40min N; 131deg to 132deg E.","9618","11.68","-8.8","30.5","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_309[] = {"1411","Tokyo to WGS 84 (82)","","","","Japan - 34deg to 34deg 40min N; 132deg to 133deg E.","9618","11.73","-9.04","30.9","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_310[] = {"1412","Tokyo to WGS 84 (83)","","","","Japan - 34deg to 34deg 40min N; 133deg to 134deg E.","9618","11.72","-9.48","35.1","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_311[] = {"1413","Tokyo to WGS 84 (84)","","","","Japan - 34deg to 34deg 40min N; 134deg to 135deg E.","9618","11.81","9.74","35.8","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_312[] = {"1414","Tokyo to WGS 84 (85)","","","","Japan - 34deg to 34deg 40min N; 135deg to 136deg E.","9618","11.88","-10.1","37.1","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_313[] = {"1415","Tokyo to WGS 84 (86)","","","","Japan - 34deg to 34deg 40min N; 136deg to 137deg E.","9618","11.91","-10.35","37.9","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_314[] = {"1416","Tokyo to WGS 84 (87)","","","","Japan - 34deg to 34deg 40min N; 137deg to 138deg E.","9618","11.9","-10.7","39.3","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_315[] = {"1417","Tokyo to WGS 84 (88)","","","","Japan - 34deg to 34deg 40min N; 138deg to 139deg E.","9618","12.02","-11.09","38.2","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_316[] = {"1418","Tokyo to WGS 84 (89)","","","","Japan - 33deg 20min to 34deg N; 129deg to 130deg E.","9618","11.87","-8.23","29.7","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_317[] = {"1419","Tokyo to WGS 84 (90)","","","","Japan - 33deg 20min to 34deg N; 130deg to 131deg E.","9618","11.84","-8.44","30.6","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_318[] = {"1420","Tokyo to WGS 84 (91)","","","","Japan - 33deg 20min to 34deg N; 131deg to 132deg E.","9618","11.94","-8.71","30.2","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_319[] = {"1421","Tokyo to WGS 84 (92)","","","","Japan - 33deg 20min to 34deg N; 132deg to 133deg E.","9618","11.99","-9.02","30.9","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_320[] = {"1422","Tokyo to WGS 84 (93)","","","","Japan - 33deg 20min to 34deg N; 133deg to 134deg E.","9618","12.05","-9.36","35.0","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_321[] = {"1423","Tokyo to WGS 84 (94)","","","","Japan - 33deg 20min to 34deg N; 134deg to 135deg E.","9618","12.1","-9.64","35.5","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_322[] = {"1424","Tokyo to WGS 84 (95)","","","","Japan - 33deg 20min to 34deg N; 135deg to 136deg E.","9618","12.1","-10.08","37.3","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_323[] = {"1425","Tokyo to WGS 84 (96)","","","","Japan - 33deg 20min to 34deg N; 136deg to 137deg E.","9618","12.07","-10.25","37.3","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_324[] = {"1426","Tokyo to WGS 84 (97)","","","","Japan - 32deg 40min to 33deg 20min N; 129deg to 130deg E.","9618","12.0","-8.15","32.1","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_325[] = {"1427","Tokyo to WGS 84 (98)","","","","Japan - 32deg 40min to 33deg 20min N; 130deg to 131deg E.","9618","12.06","-8.38","31.0","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_326[] = {"1428","Tokyo to WGS 84 (99)","","","","Japan - 32deg 40min to 33deg 20min N; 131deg to 132deg E.","9618","12.17","-8.69","30.3","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_327[] = {"1429","Tokyo to WGS 84 (100)","","","","Japan - 32deg 40min to 33deg 20min N; 132deg to 133deg E.","9618","12.23","-8.99","31.7","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_328[] = {"1430","Tokyo to WGS 84 (101)","","","","Japan - 32deg 40min to 33deg 20min N; 133deg to 134deg E.","9618","12.21","-9.21","34.3","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_329[] = {"1431","Tokyo to WGS 84 (102)","","","","Japan - 32deg 40min to 33deg 20min N; 134deg to 135deg E.","9618","12.28","-9.6","33.3","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_330[] = {"1432","Tokyo to WGS 84 (103)","","","","Japan - 32deg to 32deg 40min N; 130deg to 131deg E.","9618","12.28","-8.25","31.0","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_331[] = {"1433","Tokyo to WGS 84 (104)","","","","Japan - 32deg to 32deg 40min N; 131deg to 132deg E.","9618","12.37","-8.55","29.1","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_332[] = {"1434","Tokyo to WGS 84 (105)","","","","Japan - 31deg 20min to 32deg N; 130deg to 131deg E.","9618","12.53","-8.21","31.0","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_333[] = {"1435","Tokyo to WGS 84 (106)","","","","Japan - 31deg 20min to 32deg N; 131deg to 132deg E.","9618","12.57","-8.4","28.4","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_334[] = {"1436","Tokyo to WGS 84 (107)","","","","Japan - 30deg 40min to 31deg 20min N; 130deg to 131deg E.","9618","12.71","-8.17","29.9","","","","","9001","9104","","","","","","1998-12-12 00:00:00","http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_335[] = {"1437","RT90 to ETRF89 (1)","","","","Sweden","9607","419.3836","99.3335","591.3451","-0.850389","-1.817277","7.862238","-0.99496","9001","9104","","9202","","","","1999-04-22 00:00:00","National Land Survey of Sweden.","EPSG","This transformation is actually between ETRF89 and RR92.  RR92 is a geographic 3D coordinate system where the horizontal component is RT90.","99.11",NULL};
-datafile_rows_t trf_nonpolynomial_row_336[] = {"1438","Fahud to WGS 84 (2)","","","","Oman.","9606","-333.102","-11.02","230.69","0.0","0.0","0.554","0.219","9001","9104","","9202","","","","1999-04-22 00:00:00","Petroleum Development Oman","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_337[] = {"1439","PSD93 to WGS 84 (1)","","","","Oman.","9606","-180.624","-225.516","173.919","-0.81","-1.898","8.336","16.71006","9001","9104","","9202","","","","1999-04-22 00:00:00","Petroleum Development Oman","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_338[] = {"1440","ED50 to WGS 84 (19)","","","","Greece.","9603","-86.0","-92.2","-127.5","","","","","9001","","","","","","","1999-04-22 00:00:00","Geodesy Department; Hellenic Petroleum s.a.","EPSG","Used in oil industry.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_339[] = {"1441","Antigua 1943 to WGS 84 (1)","","","","Antigua.","9603","-255.0","-15.0","71.0","","","","","9001","","","","","","","1999-04-22 00:00:00","Ordnance Survey of Great Britain","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_340[] = {"1442","Dominica 1945 to WGS 84 (1)","","","","Dominica.","9603","725.0","685.0","536.0","","","","","9001","","","","","","","1999-04-22 00:00:00","Ordnance Survey of Great Britain","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_341[] = {"1443","Grenada 1953 to WGS 84 (1)","","","","Grenada.","9603","72.0","213.7","93.0","","","","","9001","","","","","","","1999-04-22 00:00:00","Ordnance Survey of Great Britain","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_342[] = {"1444","Montserrat 1958 to WGS 84 (1)","","","","Montserrat.","9603","174.0","359.0","365.0","","","","","9001","","","","","","","1999-04-22 00:00:00","Ordnance Survey of Great Britain","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_343[] = {"1445","St. Kitts 1955 to WGS 84 (1)","","","","Saint Kitts and Nevis.","9603","9.0","183.0","236.0","","","","","9001","","","","","","","1999-04-22 00:00:00","Ordnance Survey of Great Britain","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_344[] = {"1446","St. Lucia 1955 to WGS 84 (1)","","","","Saint Lucia.","9603","-149.0","128.0","296.0","","","","","9001","","","","","","","1999-04-22 00:00:00","Ordnance Survey of Great Britain","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_345[] = {"1447","Anguilla 1957 to WGS 84 (1)","","","","Anguilla.","9619","-18.0","4.4","","","","","","","9104","","","","","","1999-04-22 00:00:00","Ordnance Survey of Great Britain","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_346[] = {"1450","ED50 to WGS 84 (20)","","","","Norway - offshore between 62 and 65 deg North and west of 5 deg East.","9620","","","","","","8047.0","8046.0","","9102","","","ED50 to WGS 84 (15)","ED50 to WGS 84 (14)","","1999-04-22 00:00:00","Norwegian Mapping Authority note of 13-Feb-1991 \"Om Transformasjon mellom Geodetiske Datum i Norge\"","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_347[] = {"1451","NAD27(CGQ77) to NAD83 (1)","","","","Canada - Quebec","9614","","","","","","","","","9104","","","PQV4.DAC","","","1999-05-15 00:00:00","Geodetic Service of Quebec.  Contact alain.bernard at mrn.gouv.qc.ca","EPSG","Uses NT method which expects longitudes positive west; EPSG GeogCSs CGQ77 (code 4609) and NAD83 (code 4269) have longitudes positive east.  Supersedes NAD27 to NAD83 (5) (code xxxx).","",NULL};
-datafile_rows_t trf_nonpolynomial_row_348[] = {"1454","Old Hawaiian to NAD83 (1)","","","","United States (USA) - Hawaii including EEZ.","9613","","","","","","","","","9104","","","hawaii.las","hawaii.los","","1999-05-15 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov","EPSG","Uses NADCON method which expects longitudes positive west; EPSG GeogCSs Old Hawaiian (code 4135) and NAD83 (code 4269) have longitudes positive east.  NADCON data converts from Old Hawaiian Datum to but ma [...]
-datafile_rows_t trf_nonpolynomial_row_349[] = {"1455","St. Lawrence Island to NAD83 (1)","","","","United States (USA) - Alaska - St. Lawrence Island.","9613","","","","","","","","","9104","","","stlrnc.las","stlrnc.los","","1999-05-15 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov","EPSG","Uses NADCON method which expects longitudes positive west; EPSG GeogCSs St. Lawrence (code 4136) and NAD83 (code 4269) have longitudes positive east. NADCON data converts from St. Lawrence D [...]
-datafile_rows_t trf_nonpolynomial_row_350[] = {"1456","St. Paul Island to NAD83 (1)","","","","United States (USA) - Alaska - St. Paul Island.","9613","","","","","","","","","9104","","","stpaul.las","stpaul.los","","1999-05-15 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov","EPSG","Uses NADCON method which expects longitudes positive west; EPSG GeogCSs St. Paul (code 4137) and NAD83 (code 4269) have longitudes positive east. NADCON data converts from St. Paul Datum to but make [...]
-datafile_rows_t trf_nonpolynomial_row_351[] = {"1457","St. George Island to NAD83 (1)","","","","United States (USA) - Alaska - St. George Island.","9613","","","","","","","","","9104","","","stgeorge.las","stgeorge.los","","1999-05-15 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov","EPSG","Uses NADCON method which expects longitudes positive west; EPSG GeogCSs St. George (code 4138) and NAD83 (code 4269) have longitudes positive east. NADCON data converts from St. George Datum [...]
-datafile_rows_t trf_nonpolynomial_row_352[] = {"1458","AGD66 to GDA94 (2)","","","","Australia - ACT.","9607","-129.193","-41.212","130.73","-0.246","-0.374","-0.329","-2.955","9001","9104","","9202","","","","1999-05-25 00:00:00","http://www.anzlic.org.au/icsm/gdatm/regional.htm","EPSG","1m accuracy.  Recommended for mid-accuracy use in A.C.T.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_353[] = {"1459","AGD66 to GDA94 (3)","","","","Australia - Tasmania.","9607","-120.695","-62.73","165.46","-0.109","0.141","0.116","2.733","9001","9104","","9202","","","","1999-05-25 00:00:00","http://www.anzlic.org.au/icsm/gdatm/regional.htm","EPSG","1m accuracy.  Recommended for mid-accuracy use in Tasmania.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_354[] = {"1460","AGD66 to GDA94 (4)","","","","Australia - New South Wales (NSW) and Victoria.","9607","-119.353","-48.301","139.484","-0.415","-0.26","-0.437","-0.613","9001","9104","","9202","","","","1999-05-25 00:00:00","http://www.anzlic.org.au/icsm/gdatm/regional.htm","EPSG","1m accuracy.  Recommended for mid-accuracy use in NSW and Victoria.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_355[] = {"1461","Puerto Rico to NAD83 (1)","","","","Puerto Rico; Virgin Islands (U.S.); Virgin Islands (British).","9613","","","","","","","","","9104","","","prvi.las","prvi.los","","1999-05-24 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov","EPSG","Uses NADCON method which expects longitudes positive west; EPSG GeogCSs Puerto Rico (code 4139) and NAD83 (code 4269) have longitudes positive east. NADCON data converts from Puerto Rico Datum [...]
-datafile_rows_t trf_nonpolynomial_row_356[] = {"1462","NAD27 to NAD83 (5)","","","","Canada - Quebec","9614","","","","","","","","","9104","","","GS2783v1.QUE","","","1999-05-24 00:00:00","Geodetic Service of Quebec.  Contact alain.bernard at mrn.gouv.qc.ca","EPSG","Uses NT method which expects longitudes positive west; EPSG GeogCSs NAD27 (code 4267) and NAD83 (code 4269) have longitudes positive east.  Superseded by NAD27(CGQ77) to NAD83 (1) (code 1451).","",NULL};
-datafile_rows_t trf_nonpolynomial_row_357[] = {"1463","NAD27(76) to NAD83 (1)","","","","Canada - Ontario","9615","","","","","","","","","9104","","","May76v20.gsb","","","1999-05-24 00:00:00","Geodetic Survey of Canada   http://www.geod.emr.ca/html-public/GSDapps/English/NTv2_Fact_Sheet.html","EPSG","Uses NT method which expects longitudes positive west; EPSG GeogCSs NAD27(76) (code 4608) and NAD83 (code 4269) have longitudes positive east.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_358[] = {"1464","AGD66 to GDA94 (5)","","","","Australia - Victoria.","9615","","","","","","","","","9104","","","vic_0799.gsb","","","1999-10-20 00:00:00","http://www.osg.vic.gov.au/tools.htm","EPSG","0.1m accuracy.  Input expects longitudes to be positive west; EPSG GeogCS AGD66 (code 4202) and GDA94 (code 4283) both have longitudes positive east.","99.67",NULL};
-datafile_rows_t trf_nonpolynomial_row_359[] = {"1466","NGO 1948 (Oslo) to NGO1948","","","","Norway - onshore.","9601","10.43225","","","","","","","","9110","","","","","","1999-11-12 00:00:00","J. Danielsen; \"Transformasjoner ved Norges Geografiske Oppm�ling\"; Kart Og Plan nr 1; 1982.","EPSG","Change of prime meridian.","99.79",NULL};
-datafile_rows_t trf_nonpolynomial_row_360[] = {"1467","NTF (Paris) to NTF (1)","","","","France - onshore.","9601","2.5969213","","","","","","","","9105","","","","","","1999-11-12 00:00:00","IGN Paris.","EPSG","Change of prime meridian.","99.63  99.79",NULL};
-datafile_rows_t trf_nonpolynomial_row_361[] = {"1468","NTF (Paris) to NTF (2)","","","","France - onshore.","9601","2.201395","","","","","","","","9110","","","","","","1999-11-12 00:00:00","Royal Geographic Society; London","EPSG","Change of prime meridian.  EPSG prefers value from IGN Paris (code 1467).","99.63  99.79",NULL};
-datafile_rows_t trf_nonpolynomial_row_362[] = {"1469","Locodjo 1965 to WGS 84 (1)","","","","Cote D'Ivoire (Ivory Coast)","9603","-125.0","53.0","467.0","","","","","9001","","","","","","","1999-10-20 00:00:00","IGN Paris","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_363[] = {"1470","Abidjan 1987 to WGS 84 (1)","","","","Cote D'Ivoire (Ivory Coast)","9603","-124.76","53.0","466.79","","","","","9001","","","","","","","1999-10-20 00:00:00","IGN Paris","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_364[] = {"1471","MGI to WGS 84 (2)","","","","Austria","9606","-577.326","-90.129","-463.919","-15.8537","-4.55","-16.3489","-2.4232","9001","9113","","9202","","","","1999-10-20 00:00:00","Bundesamt f�r Eich- und Vermessungswesen","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_365[] = {"1472","ATS77 to NAD83(CSRS98) (1)","","","","Canada - New Brunswick","9615","","","","","","","","","9104","","","NT7783v2.gsb","","","1999-10-20 00:00:00","New Brunswick Geographic Information Corporation land and water information standards manual.","EPSG","Introduced in 1999.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_366[] = {"1473","NAD83(CSRS98) to WGS 84 (1)","","","","Canada - New Brunswick","9603","0.0","0.0","0.0","","","","","9001","","","","","","","1999-10-20 00:00:00","EPSG","EPSG","For many purposes NAD83 can be considered to be coincident with WGS 84.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_367[] = {"1474","NAD83 to NAD83(HARN) (1)","","","","United States (USA) - Alabama.","9613","","","","","","","","","9104","","","alhpgn.las","alhpgn.los","","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_368[] = {"1475","NAD83 to NAD83(HARN) (2)","","","","United States (USA) - Arizona.","9613","","","","","","","","","9104","","","azhpgn.las","azhpgn.los","","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_369[] = {"1476","NAD83 to NAD83(HARN) (3)","","","","United States (USA) - California north of 38 deg N.","9613","","","","","","","","","9104","","","cnhpgn.las","cnhpgn.los","","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_370[] = {"1477","NAD83 to NAD83(HARN) (4)","","","","United States (USA) - California south of 38 deg N.","9613","","","","","","","","","9104","","","cshpgn.las","cshpgn.los","","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_371[] = {"1478","NAD83 to NAD83(HARN) (5)","","","","United States (USA) - Colorado.","9613","","","","","","","","","9104","","","cohpgn.las","cohpgn.los","","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_372[] = {"1479","NAD83 to NAD83(HARN) (6)","","","","United States (USA) - Georgia.","9613","","","","","","","","","9104","","","gahpgn.las","gahpgn.los","","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_373[] = {"1480","NAD83 to NAD83(HARN) (7)","","","","United States (USA) - Florida.","9613","","","","","","","","","9104","","","flhpgn.las","flhpgn.los","","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_374[] = {"1481","NAD83 to NAD83(HARN) (8)","","","","United States (USA) - Idaho and Montana - east of 113 deg W.","9613","","","","","","","","","9104","","","emhpgn.las","emhpgn.los","","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_375[] = {"1482","NAD83 to NAD83(HARN) (9)","","","","United States (USA) - Idaho and Montana - west of 113 deg W.","9613","","","","","","","","","9104","","","wmhpgn.las","wmhpgn.los","","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_376[] = {"1483","NAD83 to NAD83(HARN) (10)","","","","United States (USA) - Kentucky.","9613","","","","","","","","","9104","","","kyhpgn.las","kyhpgn.los","","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_377[] = {"1484","NAD83 to NAD83(HARN) (11)","","","","United States (USA) - Louisiana.","9613","","","","","","","","","9104","","","lahpgn.las","lahpgn.los","","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_378[] = {"1485","NAD83 to NAD83(HARN) (12)","","","","United States (USA) - Delaware and Maryland.","9613","","","","","","","","","9104","","","mdhpgn.las","mdhpgn.los","","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_379[] = {"1486","NAD83 to NAD83(HARN) (13)","","","","United States (USA) - Maine.","9613","","","","","","","","","9104","","","mehpgn.las","mehpgn.los","","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_380[] = {"1487","NAD83 to NAD83(HARN) (14)","","","","United States (USA) - Michigan.","9613","","","","","","","","","9104","","","mihpgn.las","mihpgn.los","","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_381[] = {"1488","NAD83 to NAD83(HARN) (15)","","","","United States (USA) - Mississippi.","9613","","","","","","","","","9104","","","mshpgn.las","mshpgn.los","","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_382[] = {"1489","NAD83 to NAD83(HARN) (16)","","","","United States (USA) - Nebraska.","9613","","","","","","","","","9104","","","nbhpgn.las","nbhpgn.los","","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_383[] = {"1490","NAD83 to NAD83(HARN) (17)","","","","United States (USA) - Connecticut; Massachusetts; New Hampshire; Rhode Island; Vermont.","9613","","","","","","","","","9104","","","nehpgn.las","nehpgn.los","","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positiv [...]
-datafile_rows_t trf_nonpolynomial_row_384[] = {"1491","NAD83 to NAD83(HARN) (18)","","","","United States (USA) - New Mexico.","9613","","","","","","","","","9104","","","nmhpgn.las","nmhpgn.los","","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_385[] = {"1492","NAD83 to NAD83(HARN) (19)","","","","United States (USA) - New York.","9613","","","","","","","","","9104","","","nyhpgn.las","nyhpgn.los","","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_386[] = {"1493","NAD83 to NAD83(HARN) (20)","","","","United States (USA) - North Dakota.","9613","","","","","","","","","9104","","","ndhpgn.las","ndhpgn.los","","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_387[] = {"1494","NAD83 to NAD83(HARN) (21)","","","","United States (USA) - Oklahoma.","9613","","","","","","","","","9104","","","okhpgn.las","okhpgn.los","","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_388[] = {"1495","NAD83 to NAD83(HARN) (22)","","","","United States (USA) - Puerto Rico and the Virgin Islands.","9613","","","","","","","","","9104","","","pvhpgn.las","pvhpgn.los","","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_389[] = {"1496","NAD83 to NAD83(HARN) (23)","","","","United States (USA) - South Dakota.","9613","","","","","","","","","9104","","","sdhpgn.las","sdhpgn.los","","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_390[] = {"1497","NAD83 to NAD83(HARN) (24)","","","","United States (USA) - Tennessee","9613","","","","","","","","","9104","","","tnhpgn.las","tnhpgn.los","","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_391[] = {"1498","NAD83 to NAD83(HARN) (25)","","","","United States (USA) - Texas east of 100deg West.","9613","","","","","","","","","9104","","","ethpgn.las","ethpgn.los","","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_392[] = {"1499","NAD83 to NAD83(HARN) (26)","","","","United States (USA) - Texas west of 100deg West.","9613","","","","","","","","","9104","","","wthpgn.las","wthpgn.los","","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_393[] = {"1500","NAD83 to NAD83(HARN) (27)","","","","United States (USA) - Virginia.","9613","","","","","","","","","9104","","","vahpgn.las","vahpgn.los","","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_394[] = {"1501","NAD83 to NAD83(HARN) (28)","","","","United States (USA) - Oregan; Washington.","9613","","","","","","","","","9104","","","wohpgn.las","wohpgn.los","","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_395[] = {"1502","NAD83 to NAD83(HARN) (29)","","","","United States (USA) - Wisconsin.","9613","","","","","","","","","9104","","","wihpgn.las","wihpgn.los","","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_396[] = {"1503","NAD83 to NAD83(HARN) (30)","","","","United States (USA) - Wyoming.","9613","","","","","","","","","9104","","","wyhpgn.las","wyhpgn.los","","1999-10-20 00:00:00","US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file","EPSG","Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_397[] = {"1504","Cape to Hartbeesthoek94 (1)","","","","South Africa.","9603","-134.73","-110.92","-292.66","","","","","9001","","","","","","","1999-10-20 00:00:00","Directorate of Surveys and Mapping; http://w3sli.wcape.gov.za/surveys/mapping/wgs84.htm","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_398[] = {"1505","Hartbeesthoek94 to WGS 84 (1)","","","","South Africa.","9603","0.0","0.0","0.0","","","","","9001","","","","","","","1999-10-20 00:00:00","EPSG","EPSG","For many purposes Hartbeesthoek94 datum can be considered to be coincident with WGS 84.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_399[] = {"1506","AGD66 to GDA94 (6)","","","","Australia - Tasmania.","9615","","","","","","","","","9104","","","tas_1098.gsb","","","1999-10-20 00:00:00","http://www.delm.tas.gov.au/osg/Geodetic_transform.htm","EPSG","0.1m accuracy.  Input expects longitudes to be positive west; EPSG GeogCS AGD66 (code 4202) and GDA94 (code 4283) both have longitudes positive east.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_400[] = {"1507","AGD66 to GDA94 (7)","","","","Australia - Northern Territory.","9615","","","","","","","","","9104","","","nt_0599.gsb","","","1999-10-20 00:00:00","http://www.anzlic.org.au/icsm/gdatm/chapter7.htm#high","EPSG","0.1m accuracy.  Input expects longitudes to be positive west; EPSG GeogCS AGD66 (code 4202) and GDA94 (code 4283) both have longitudes positive east.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_401[] = {"1508","CH1903 to WGS 84 (1)","","","","Liechtenstein;  Switzerland.","9607","660.077","13.551","369.344","2.484","1.783","2.939","5.66","9001","9113","","9202","","","","1999-10-20 00:00:00","Bundesamt f�r Landestopographie.  Aufbau der Landesvermessung der Schweiz 'LV95' Teil 3: Terrestrische Bezugssysteme und Bezugsrahmen. L+T 1999.","EPSG","Implemented in Bundesamt f�r Landestopographie programme GRANIT.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_402[] = {"1509","CH1903+ to CHTRF95 (1)","","","","Liechtenstein;  Switzerland.","9603","674.374","15.056","405.346","","","","","9001","","","","","","","1999-10-20 00:00:00","Bundesamt f�r Landestopographie.  Aufbau der Landesvermessung der Schweiz 'LV95' Teil 3: Terrestrische Bezugssysteme und Bezugsrahmen. L+T 1999.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_403[] = {"1510","CH1903 to WGS 84 (2)","","","","Liechtenstein;  Switzerland.","9603","674.374","15.056","405.346","","","","","9001","","","","","","","1999-10-20 00:00:00","Bundesamt f�r Landestopographie.  Aufbau der Landesvermessung der Schweiz 'LV95' Teil 3: Terrestrische Bezugssysteme und Bezugsrahmen. L+T 1999.","EPSG","These parameters are strictly between CH1903+ and CHTRF95 but are used from CH1903 as an approximation which is within the ac [...]
-datafile_rows_t trf_nonpolynomial_row_404[] = {"1511","CHTRF95 to WGS 84 (1)","","","","Liechtenstein;  Switzerland.","9603","0.0","0.0","0.0","","","","","9001","","","","","","","1999-10-20 00:00:00","EPSG","EPSG","For many purposes CHTRF95 can be considered to be coincident with WGS 84.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_405[] = {"1512","Rassadiran to WGS 84 (1)","","","","Iran - Taheri refinery site only.","9603","-133.63","-157.5","-158.62","","","","","9001","","","","","","","1999-10-20 00:00:00","Total-Fina","EPSG","Used only for terminal site.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_406[] = {"1513","FD58 to WGS 84 (1)","","","","Iran - Kangan district.","9603","-241.54","-163.64","396.06","","","","","9001","","","","","","","1999-10-20 00:00:00","Total-Fina","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_407[] = {"1514","ED50(ED77) to WGS 84 (1)","","","","Iran","9606","-110.33","-97.73","-119.85","0.3423","1.1634","0.2715","0.063","9001","9104","","9202","","","","1999-10-20 00:00:00","National Cartographic Centre of Iran","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_408[] = {"1515","NAD83 to WGS 84 (5)","","","","United States (USA)","9607","-0.991","1.9072","0.5129","-0.000000125033","-0.000000046785","-0.000000056529","0.0","9001","9101","","9202","","","","1999-11-05 00:00:00"," http://www.ngs.noaa.gov/CORS/Derivation.html","EPSG","Strictly between NAD83 and ITRF96(1997.0).  Supersedes NAD83 to WGS 84 (4) (code 1308).","",NULL};
-datafile_rows_t trf_nonpolynomial_row_409[] = {"1516","La Canoa to WGS 84 (1)","","","","Venezuela east - Delta Amacuro; Anzoategui; Bolivar; Monagas; Sucre states.","9603","-273.5","110.6","-357.9","","","","","9001","","","","","","","1999-11-05 00:00:00","Lagoven; Gonzalez Losano y Rodriguez; \"Determination de los Parametros de Transformacion para el Oriente del Pais\"; VII Venezuelan Geophysical Congress; September 1994.","EPSG","Also used for PSAD56 to WGS 84 transformations.  Para [...]
-datafile_rows_t trf_nonpolynomial_row_410[] = {"10101","Alabama CS27 East zone","Alabama East","","","United States (USA) - Alabama - Counties east of 86d 37m West.","9807","30.3","-85.5","","","0.99996","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_411[] = {"10102","Alabama CS27 West zone","Alabama West","","","United States (USA) - Alabama - Counties east of 86d 37m West.","9807","30.0","-87.3","","","0.999933333","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_412[] = {"10131","Alabama CS83 East zone","Alabama East","","","United States (USA) - Alabama - Counties east of 86d 37m West.","9807","30.3","-85.5","","","0.99996","200000.0","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_413[] = {"10132","Alabama CS83 West zone","Alabama West","","","United States (USA) - Alabama - Counties east of 86d 37m West.","9807","30.0","-87.3","","","0.999933333","600000.0","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_414[] = {"10201","Arizona Coordinate System  east zone","Arizona East","","","United States (USA) - Arizona - Apache; Cochise; Gila; Graham; Greenlee and Navajo counties; i.e. east of about 110d 45m West.","9807","31.0","-110.1","","","0.9999","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_415[] = {"10202","Arizona Coordinate System Central zone","Arizona Central","","","United States (USA) - Arizona - Coconino; Maricopa; Pima; Pinal; Santa Cruz and Yavapai counties; i.e between about 110d 45m & 113d 20m west","9807","31.0","-111.55","","","0.9999","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_416[] = {"10203","Arizona Coordinate System  west zone","Arizona West","","","United States (USA) - Arizona - La Paz; Mohave and Yuma counties; i.e west of about 113d 20m","9807","31.0","-113.45","","","0.999933333","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_417[] = {"10231","Arizona CS83  east zone","Arizona  East","","","United States (USA) - Arizona - counties east of 110d 45m West","9807","31.0","-110.1","","","0.9999","213360.0","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","State law defines origin in International feet. FE = 700000ft.","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_418[] = {"10232","Arizona CS83 Central zone","Arizona Central","","","United States (USA) - Arizona - Coconino; Maricopa; Pima; Pinal; Santa Cruz and Yavapai counties; i.e between about 110d 45m & 113d 20m west","9807","31.0","-111.55","","","0.9999","213360.0","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","State law defines origin in International feet. FE = 700000ft.","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_419[] = {"10233","Arizona CS83  west zone","Arizona West","","","United States (USA) - Arizona - La Paz; Mohave and Yuma counties; i.e west of about 113d 20m","9807","31.0","-113.45","","","0.999933333","213360.0","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","State law defines origin in International feet. FE = 700000ft.","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_420[] = {"10301","Arkansas CS27 North","Arkansas North","","","United States (USA) - Arkansas - counties north of 34d 50m North.","9802","34.2","-92.0","36.14","34.56","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_421[] = {"10302","Arkansas CS27 South","Arkansas South","","","United States (USA) - Arkansas - counties south of 34d 50m North.","9802","32.4","-92.0","34.46","33.18","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_422[] = {"10331","Arkansas CS83 North zone","Arkansas North","","","United States (USA) - Arkansas - counties north of 34d 50m North.","9802","34.2","-92.0","36.14","34.56","","400000.0","0.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_423[] = {"10332","Arkansas CS83 South zone","Arkansas South","","","United States (USA) - Arkansas - counties south of 34d 50m North.","9802","32.4","-92.0","34.46","33.18","","400000.0","400000.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_424[] = {"10401","California CS27 zone I","California zone I","","","United States (USA) - California - counties north of 40deg North.","9802","39.2","-122.0","41.4","40.0","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_425[] = {"10402","California CS27 zone II","California zone II","","","United States (USA) - California - counties between 40d & 38d 15m North.","9802","37.4","-122.0","39.5","38.2","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_426[] = {"10403","California CS27 zone III","California zone III","","","United States (USA) - California - counties between 38d 15m & 37d North.","9802","36.3","-120.3","38.26","37.04","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_427[] = {"10404","California CS27 zone IV","California zone IV","","","United States (USA) - California - counties between 37d & 35d 30m North.","9802","35.2","-119.0","37.15","36.0","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_428[] = {"10405","California CS27 zone V","California zone V","","","United States (USA) - California - counties between 35d 50m & 34d North.","9802","33.3","-118.0","35.28","34.02","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_429[] = {"10406","California CS27 zone VI","California zone VI","","","United States (USA) - California - counties south of 34deg North.","9802","32.1","-116.15","33.53","32.47","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_430[] = {"10407","California CS27 zone VII","California zone VII","","","United States (USA) - California - Los Angeles.","9802","34.08","-118.2","34.25","33.52","","4186692.58","416926.74","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_431[] = {"10431","California CS83 zone 1","California zone 1","","","United States (USA) - California - counties north of 40deg North.","9802","39.2","-122.0","41.4","40.0","","2000000.0","500000.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_432[] = {"10432","California CS83 zone 2","California zone 2","","","United States (USA) - California - counties between 40d & 38d 15m North.","9802","37.4","-122.0","39.5","38.2","","2000000.0","500000.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_433[] = {"10433","California CS83 zone 3","California zone 3","","","United States (USA) - California - counties between 38d 15m & 37d North.","9802","36.3","-120.3","38.26","37.04","","2000000.0","500000.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_434[] = {"10434","California CS83 zone 4","California zone 4","","","United States (USA) - California - counties between 37d & 35d 30m North.","9802","35.2","-119.0","37.15","36.0","","2000000.0","500000.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_435[] = {"10435","California CS83 zone 5","California zone 5","","","United States (USA) - California - counties between 35d 50m & 34d North.","9802","33.3","-118.0","35.28","34.02","","2000000.0","500000.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_436[] = {"10436","California CS83 zone 6","California zone 6","","","United States (USA) - California - counties south of 34deg North.","9802","32.1","-116.15","33.53","32.47","","2000000.0","500000.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_437[] = {"10501","Colorado CS27 North zone","Colorado North","","","United States (USA) - Colorado - counties north of 39d 50m North.","9802","39.2","-105.3","39.43","40.47","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_438[] = {"10502","Colorado CS27 Central zone","Colorado Central","","","United States (USA) - Colorado - counties between 39d 50m & 38d 30m North.","9802","37.5","-105.3","39.45","38.27","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_439[] = {"10503","Colorado CS27 South zone","Colorado South","","","United States (USA) - Colorado - counties south of 38d 30m North.","9802","36.4","-105.3","38.26","37.14","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_440[] = {"10531","Colorado CS83 North zone","Colorado North","","","United States (USA) - Colorado - counties north of 39d 50m North.","9802","39.2","-105.3","40.47","39.43","","914401.8289","304800.6096","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_441[] = {"10532","Colorado CS83 Central zone","Colorado Central","","","United States (USA) - Colorado - counties between 39d 50m & 38d 30m North.","9802","37.5","-105.3","39.45","38.27","","914401.8289","304800.6096","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_442[] = {"10533","Colorado CS83 South zone","Colorado South","","","United States (USA) - Colorado - counties south of 38d 30m North.","9802","36.4","-105.3","38.26","37.14","","914401.8289","304800.6096","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_443[] = {"10600","Connecticut CS27","Connecticut","","","United States (USA) - Connecticut.","9802","40.5","-72.45","41.52","41.12","","600000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_444[] = {"10630","Connecticut CS83","Connecticut","","","United States (USA) - Connecticut.","9802","40.5","-72.45","41.52","41.12","","304800.6096","152400.3048","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_445[] = {"10700","Delaware CS27","Delaware","","","United States (USA) - Delaware.","9807","38.0","-75.25","","","0.999995","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_446[] = {"10730","Delaware CS83","Delaware","","","United States (USA) - Delaware.","9807","38.0","-75.25","","","0.999995","200000.0","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_447[] = {"10901","Florida CS27 East zone","Florida East","","","United States (USA) - Florida - counties east of 81d 45m West.","9807","24.2","-81.0","","","0.999941177","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_448[] = {"10902","Florida CS27 West zone","Florida West","","","United States (USA) - Florida - counties west of 81d 45m West & south of 29d 30m North.","9807","24.2","-82.0","","","0.999941177","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_449[] = {"10903","Florida CS27 North zone","Florida North","","","United States (USA) - Florida - north of 29d 30m North & west of 82d West.","9802","29.0","-84.3","30.45","29.35","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_450[] = {"10931","Florida CS83 East zone","Florida  East","","","United States (USA) - Florida - counties east of 81d 45m West.","9807","24.2","-81.0","","","0.999941177","200000.0","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_451[] = {"10932","Florida CS83 West zone","Florida  West","","","United States (USA) - Florida - counties west of 81d 45m West & south of 29d 30m North.","9807","24.2","-82.0","","","0.999941177","200000.0","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_452[] = {"10933","Florida CS83 North zone","Florida North","","","United States (USA) - Florida - north of 29d 30m North & west of 82d West.","9802","29.0","-84.3","30.45","29.35","","600000.0","0.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_453[] = {"11001","Georgia CS27 East zone","Georgia East","","","United States (USA) - Georgia - counties east of 83d 15m West.","9807","30.0","-82.1","","","0.9999","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_454[] = {"11002","Georgia CS27 West zone","Georgia West","","","United States (USA) - Georgia - counties west of 83d 15m West.","9807","30.0","-84.1","","","0.9999","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_455[] = {"11031","Georgia CS83 East zone","Georgia  East","","","United States (USA) - Georgia - counties east of 83d 15m West.","9807","30.0","-82.1","","","0.9999","200000.0","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_456[] = {"11032","Georgia CS83 West zone","Georgia West","","","United States (USA) - Georgia - counties west of 83d 15m West.","9807","30.0","-84.1","","","0.9999","700000.0","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_457[] = {"11101","Idaho CS27 East zone","Idaho East","","","United States (USA) - Idaho - counties east of 113d West.","9807","41.4","-112.1","","","0.999947368","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_458[] = {"11102","Idaho CS27 Central zone","Idaho Central","","","United States (USA) - Idaho - counties between 113d & 115d West.","9807","41.4","-114.0","","","0.999947368","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_459[] = {"11103","Idaho CS27 West zone","Idaho West","","","United States (USA) - Idaho - counties west of 115d West.","9807","41.4","-115.45","","","0.999933333","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_460[] = {"11131","Idaho CS83 East zone","Idaho  East","","","United States (USA) - Idaho - counties east of 113d West.","9807","41.4","-112.1","","","0.999947368","200000.0","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_461[] = {"11132","Idaho CS83 Central zone","Idaho  Central","","","United States (USA) - Idaho - counties between 113d & 115d West.","9807","41.4","-114.0","","","0.999947368","500000.0","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_462[] = {"11133","Idaho CS83 West zone","Idaho  West","","","United States (USA) - Idaho - counties west of 115d West.","9807","41.4","-115.45","","","0.999933333","800000.0","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_463[] = {"11201","Illinois CS27 East zone","Illinois East","","","United States (USA) - Illinois - counties east of 89d 05m West.","9807","36.4","-88.2","","","0.999975","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_464[] = {"11202","Illinois CS27 West zone","Illinois West","","","United States (USA) - Illinois - counties west of 89d 05m West.","9807","36.4","-90.1","","","0.999941177","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_465[] = {"11231","Illinois CS83 East zone","Illinois  East","","","United States (USA) - Illinois - counties east of 89d 05m West.","9807","36.4","-88.2","","","0.999975","300000.0","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_466[] = {"11232","Illinois CS83 West zone","Illinois  West","","","United States (USA) - Illinois - counties west of 89d 05m West.","9807","36.4","-90.1","","","0.999941177","700000.0","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_467[] = {"11301","Indiana CS27 East zone","Indiana East","","","United States (USA) - Indiana - counties east of 86d 25m West.","9807","37.3","-85.4","","","0.999966667","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_468[] = {"11302","Indiana CS27 West zone","Indiana West","","","United States (USA) - Indiana - counties west of 86d 25m West.","9807","37.3","-87.05","","","0.999966667","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_469[] = {"11331","Indiana CS83 East zone","Indiana  East","","","United States (USA) - Indiana - counties east of 86d 25m West.","9807","37.3","-85.4","","","0.999966667","100000.0","250000.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_470[] = {"11332","Indiana CS83 West zone","Indiana  West","","","United States (USA) - Indiana - counties west of 86d 25m West.","9807","37.3","-87.05","","","0.999966667","900000.0","250000.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_471[] = {"11401","Iowa CS27 North zone","Iowa North","","","United States (USA) - Iowa - counties north of 42deg North.","9802","41.3","-93.3","43.16","42.04","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_472[] = {"11402","Iowa CS27 South zone","Iowa South","","","United States (USA) - Iowa - counties south of 42deg North.","9802","40.0","-93.3","41.47","40.37","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_473[] = {"11431","Iowa CS83 North zone","Iowa North","","","United States (USA) - Iowa - counties north of 42deg North.","9802","41.3","-93.3","43.16","42.04","","1500000.0","1000000.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_474[] = {"11432","Iowa CS83 South zone","Iowa South","","","United States (USA) - Iowa - counties south of 42deg North.","9802","40.0","-93.3","41.47","40.37","","500000.0","0.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_475[] = {"11501","Kansas CS27 North zone","Kansas North","","","United States (USA) - Kansas - counties north of 38d 45m North.","9802","38.2","-98.0","39.47","38.43","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_476[] = {"11502","Kansas CS27 South zone","Kansas South","","","United States (USA) - Kansas - counties south of 38d 45m North.","9802","36.4","-98.3","38.34","37.16","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_477[] = {"11531","Kansas CS83 North zone","Kansas North","","","United States (USA) - Kansas - counties north of 38d 45m North.","9802","38.2","-98.0","39.47","38.43","","400000.0","0.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_478[] = {"11532","Kansas CS83 South zone","Kansas South","","","United States (USA) - Kansas - counties south of 38d 45m North.","9802","36.4","-98.3","38.34","37.16","","400000.0","400000.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_479[] = {"11601","Kentucky CS27 North zone","Kentucky North","","","United States (USA) - Kentucky - counties north of 37d 55m North.","9802","37.3","-84.15","37.58","38.58","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_480[] = {"11602","Kentucky CS27 South zone","Kentucky South","","","United States (USA) - Kentucky - counties south of 37d 55m North.","9802","36.2","-85.45","36.44","37.56","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_481[] = {"11631","Kentucky CS83 North zone","Kentucky North","","","United States (USA) - Kentucky - counties north of 37d 55m North.","9802","37.3","-84.15","37.58","37.58","","500000.0","0.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_482[] = {"11632","Kentucky CS83 South zone","Kentucky South","","","United States (USA) - Kentucky - counties south of 37d 55m North.","9802","36.2","-85.45","37.56","36.44","","500000.0","500000.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_483[] = {"11701","Louisiana CS27 North zone","Louisiana North","","","United States (USA) - Louisiana - counties north of 30d 55m North.","9802","30.4","-92.3","31.1","32.4","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_484[] = {"11702","Louisiana CS27 South zone","Louisiana South","","","United States (USA) - Louisiana - counties south of 30d 55m North. Also Gulf of Mexico LA shelf.","9802","28.4","-91.2","29.18","30.42","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_485[] = {"11731","Louisiana CS83 North zone","Louisiana North","","","United States (USA) - Louisiana - counties north of 30d 55m North.","9802","30.3","-92.3","32.4","31.1","","1000000.0","0.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_486[] = {"11732","Louisiana CS83 South zone","Louisiana South","","","United States (USA) - Louisiana - counties south of 30d 55m North.","9802","28.3","-91.2","30.42","29.18","","1000000.0","0.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_487[] = {"11801","Maine CS27 East zone","Maine East","","","United States (USA) - Maine - counties east of 69d 30m West.","9807","43.5","-68.3","","","0.9999","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_488[] = {"11802","Maine CS27 West zone","Maine West","","","United States (USA) - Maine - counties west of 69d 30m West.","9807","42.5","-70.1","","","0.999966667","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_489[] = {"11831","Maine CS83 East zone","Maine  East","","","United States (USA) - Maine - counties east of 69d 30m West.","9807","43.4","-68.3","","","0.9999","300000.0","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_490[] = {"11832","Maine CS83 West zone","Maine  West","","","United States (USA) - Maine - counties west of 69d 30m West.","9807","42.5","-70.1","","","0.999966667","900000.0","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_491[] = {"11900","Maryland CS27","Maryland","","","United States (USA) - Maryland.","9802","37.5","-77.0","38.18","39.27","","800000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_492[] = {"11930","Maryland CS83","Maryland","","","United States (USA) - Maryland.","9802","37.4","-77.0","39.27","38.18","","400000.0","0.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_493[] = {"12001","Massachusetts CS27 Mainland zone","Massachusetts Mainland","","","United States (USA) - Massachusetts onshore.","9802","41.0","-71.3","41.43","42.41","","600000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_494[] = {"12002","Massachusetts CS27 Island zone","Massachusetts Island","","","United States (USA) - Massachusetts islands.","9802","41.0","-70.3","41.17","41.29","","200000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_495[] = {"12031","Massachusetts CS83 Mainland zone","Massachusetts Mainland","","","United States (USA) - Massachusetts onshore.","9802","41.0","-71.3","42.41","41.43","","200000.0","750000.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_496[] = {"12032","Massachusetts CS83 Island zone","Massachusetts Island","","","United States (USA) - Massachusetts islands.","9802","41.0","-70.3","41.29","41.17","","500000.0","0.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_497[] = {"12101","Michigan State Plane East zone","Michigan East","","","United States (USA) - Michigan.","9807","41.3","-83.4","","","0.999942857","500000.0","0.0","9003","9110","8901","","","","","1998-11-11 00:00:00","USGS Professional Paper #1395","EPSG","Obsolete. Superseded by north central and south zones.","95.30  96.29  98.22",NULL};
-datafile_rows_t trf_nonpolynomial_row_498[] = {"12102","Michigan State Plane Old Central zone","Michigan Old Central","","","United States (USA) - Michigan.","9807","41.3","-85.45","","","0.999909091","500000.0","0.0","9003","9110","8901","","","","","1998-11-11 00:00:00","USGS Professional Paper #1395","EPSG","Obsolete. Superseded by north central and south zones.","95.30  96.29  98.22",NULL};
-datafile_rows_t trf_nonpolynomial_row_499[] = {"12103","Michigan State Plane West zone","Michigan West","","","United States (USA) - Michigan.","9807","41.3","-88.45","","","0.999909091","500000.0","0.0","9003","9110","8901","","","","","1998-11-11 00:00:00","USGS Professional Paper #1395","EPSG","Obsolete. Superseded by north central and south zones.","95.30  96.29  98.22",NULL};
-datafile_rows_t trf_nonpolynomial_row_500[] = {"12111","Michigan CS27 North zone","Michigan North","","","United States (USA) - Michigan - counties north of 45d 45m North.","9802","44.47","-87.0","45.29","47.05","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.28  96.29  98.22  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_501[] = {"12112","Michigan CS27 Central zone","Michigan Central","","","United States (USA) - Michigan - counties between 45d 45m & 43d 55m North.","9802","43.19","-84.2","44.11","45.42","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.28  96.29  98.22  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_502[] = {"12113","Michigan CS27 South zone","Michigan South","","","United States (USA) - Michigan - counties south of 43d 55m North.","9802","41.3","-84.2","42.06","43.4","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.28  96.29  98.22  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_503[] = {"12141","Michigan CS83 North zone","Michigan North","","","United States (USA) - Michigan - counties north of 45d 45m North.","9802","44.47","-87.0","47.05","45.29","","8000000.0","0.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_504[] = {"12142","Michigan CS83 Central zone","Michigan Central","","","United States (USA) - Michigan - counties between 45d 45m & 43d 55m North.","9802","43.19","-84.22","45.42","44.11","","6000000.0","0.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_505[] = {"12143","Michigan CS83 South zone","Michigan South","","","United States (USA) - Michigan - counties south of 43d 55m North.","9802","41.3","-84.22","43.4","42.06","","4000000.0","0.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_506[] = {"12201","Minnesota CS27 North zone","Minnesota North","","","United States (USA) - Minnesota - counties north of 47d 10m North.","9802","46.3","-93.06","47.02","48.38","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_507[] = {"12202","Minnesota CS27 Central zone","Minnesota Central","","","United States (USA) - Minnesota - counties between 47d 10m & 45d 30m North.","9802","45.0","-94.15","45.37","47.03","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_508[] = {"12203","Minnesota CS27 South zone","Minnesota South","","","United States (USA) - Minnesota - counties south of 45d 30m North.","9802","43.0","-94.0","43.47","45.13","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_509[] = {"12231","Minnesota CS83 North zone","Minnesota North","","","United States (USA) - Minnesota - counties north of 47d 10m North.","9802","46.3","-93.06","48.38","47.02","","800000.0","100000.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_510[] = {"12232","Minnesota CS83 Central zone","Minnesota Central","","","United States (USA) - Minnesota - counties between 47d 10m & 45d 30m North.","9802","45.0","-94.15","47.03","45.37","","800000.0","100000.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_511[] = {"12233","Minnesota CS83 South zone","Minnesota South","","","United States (USA) - Minnesota - counties south of 45d 30m North.","9802","43.0","-94.0","45.13","43.47","","800000.0","100000.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_512[] = {"12301","Mississippi CS27 East zone","Mississippi East","","","United States (USA) - Mississippi - counties east of 89d 40m West.","9807","29.4","-88.5","","","0.99996","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_513[] = {"12302","Mississippi CS27 West zone","Mississippi West","","","United States (USA) - Mississippi - counties west of 89d 40m West.","9807","30.3","-90.2","","","0.999941177","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_514[] = {"12331","Mississippi CS83 East zone","Mississippi East","","","United States (USA) - Mississippi - counties east of 89d 40m West.","9807","29.3","-88.5","","","0.99995","300000.0","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_515[] = {"12332","Mississippi CS83 West zone","Mississippi West","","","United States (USA) - Mississippi - counties west of 89d 40m West.","9807","29.3","-90.2","","","0.99995","700000.0","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_516[] = {"12401","Missouri CS27 East zone","Missouri East","","","United States (USA) - Missouri - counties east of 91d 45m West.","9807","35.5","-90.3","","","0.999933333","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.18  95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_517[] = {"12402","Missouri CS27 Central zone","Missouri Central","","","United States (USA) - Missouri - counties between 91d 45m & 93d 35m West.","9807","35.5","-92.3","","","0.999933333","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_518[] = {"12403","Missouri CS27 West zone","Missouri West","","","United States (USA) - Missouri - counties west of 93d 35m West.","9807","36.1","-94.3","","","0.999941177","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_519[] = {"12431","Missouri CS83 East zone","Missouri  East","","","United States (USA) - Missouri - counties east of 91d 45m West..","9807","35.5","-90.3","","","0.999933333","250000.0","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_520[] = {"12432","Missouri CS83 Central zone","Missouri Central","","","United States (USA) - Missouri - counties between 91d 45m & 93d 35m West","9807","35.5","-92.3","","","0.999933333","500000.0","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_521[] = {"12433","Missouri CS83 West zone","Missouri  West","","","United States (USA) - Missouri - counties west of 93d 35m West.","9807","36.1","-94.3","","","0.999941177","850000.0","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_522[] = {"12501","Montana CS27 North zone","Montana North","","","United States (USA) - Montana - counties north of 47d 50m North.","9802","47.0","-109.3","48.43","47.51","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_523[] = {"12502","Montana CS27 Central zone","Montana Central","","","United States (USA) - Montana - counties between 47d 50m & 46d 40m North.","9802","45.5","-109.3","47.53","46.27","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_524[] = {"12503","Montana CS27 South zone","Montana South","","","United States (USA) - Montana - counties south of 46d 40m North.","9802","44.0","-109.3","46.24","44.52","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_525[] = {"12530","Montana CS83","Montana","","","United States (USA) - Montana.","9802","44.15","-109.3","49.0","45.0","","600000.0","0.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_526[] = {"12601","Nebraska CS27 North zone","Nebraska North","","","United States - Nebraska -Antelope; Blaine; Box Butte; Boyd; Brown; Burt; Cedar; Cherry; Cuming; Dakota; Dawes; Dixon; Garfield; Grant; Holt; Hooker; Keya Paha; Knox; Loup; Madison; Pierce; Rock; Sheridan; Sioux; Stanton; Thomas; Thurston; Wayne; Wheeler","9802","41.2","-100.0","41.51","42.49","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professio [...]
-datafile_rows_t trf_nonpolynomial_row_527[] = {"12602","Nebraska CS27 South zone","Nebraska South","","","United States (USA) - Nebraska - counties south of and including Scotts Bluff; Morrill; Garden; Arthur; McPherson; Logan; Custer; Valley; Greeley; Boome, Platte; Colfax; Dodge; Washington.","9802","39.4","-99.3","40.17","41.43","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_528[] = {"12630","Nebraska CS83","Nebraska","","","United States (USA) - Nebraska.","9802","39.5","-100.0","43.0","40.0","","500000.0","0.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_529[] = {"12701","Nevada CS27 East zone","Nevada East","","","United States (USA) - Nevada - counties east of 116d  West & Eureka county.","9807","34.45","-115.35","","","0.9999","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_530[] = {"12702","Nevada CS27 Central zone","Nevada Central","","","United States (USA) - Nevada - Lander & Nye counties.","9807","34.45","-116.4","","","0.9999","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_531[] = {"12703","Nevada CS27 West zone","Nevada West","","","United States (USA) - Nevada - counties west of 117d 15m West.","9807","34.45","-118.35","","","0.9999","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_532[] = {"12731","Nevada CS83 East zone","Nevada  East","","","United States (USA) - Nevada - counties east of 116d  West & Eureka county.","9807","34.45","-115.35","","","0.9999","200000.0","8000000.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_533[] = {"12732","Nevada CS83 Central zone","Nevada Central","","","United States (USA) - Nevada - Lander & Nye counties.","9807","34.45","-116.4","","","0.9999","500000.0","6000000.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_534[] = {"12733","Nevada CS83 West zone","Nevada West","","","United States (USA) - Nevada - counties west of 117d 15m West.","9807","34.45","-118.35","","","0.9999","800000.0","4000000.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_535[] = {"12800","New Hampshire CS27","New Hampshire","","","United States (USA) - New Hampshire.","9807","42.3","-71.4","","","0.999966667","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_536[] = {"12830","New Hampshire CS83","New Hampshire","","","United States (USA) - New Hampshire.","9807","42.3","-71.4","","","0.999966667","300000.0","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_537[] = {"12900","New Jersey CS27","New Jersey","","","United States (USA) - New Jersey.","9807","38.5","-74.4","","","0.999975","2000000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_538[] = {"12930","New Jersey CS83","New Jersey","","","United States (USA) - New Jersey.","9807","38.5","-74.3","","","0.9999","150000.0","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_539[] = {"13001","New Mexico CS27 East zone","New Mexico East","","","United States (USA) - New Mexico - counties east of 105d West.","9807","31.0","-104.2","","","0.999909091","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_540[] = {"13002","New Mexico CS27 Central zone","New Mexico Central","","","United States (USA) - New Mexico - counties between 105d & 107d 15m West.","9807","31.0","-106.15","","","0.9999","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_541[] = {"13003","New Mexico CS27 West zone","New Mexico West","","","United States (USA) - New Mexico - counties west of 107d 15m West.","9807","31.0","-107.5","","","0.999916667","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_542[] = {"13031","New Mexico CS83 East zone","New Mexico East","","","United States (USA) - New Mexico - counties east of 105d West.","9807","31.0","-104.2","","","0.999909091","165000.0","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_543[] = {"13032","New Mexico CS83 Central zone","New Mexico Central","","","United States (USA) - New Mexico - counties between 105d & 107d 15m West.","9807","31.0","-106.15","","","0.9999","500000.0","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_544[] = {"13033","New Mexico CS83 West zone","New Mexico West","","","United States (USA) - New Mexico - counties west of 107d 15m West.","9807","31.0","-107.5","","","0.999916667","830000.0","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_545[] = {"13101","New York CS27 East zone","New York East","","","United States (USA) - New York - counties east of 75d 15m West excluding Long Island.","9807","40.0","-74.2","","","0.999966667","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.18  95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_546[] = {"13102","New York CS27 Central zone","New York Central","","","United States (USA) - New York - counties between 75d 15m & 77d 30m West.","9807","40.0","-76.35","","","0.9999375","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_547[] = {"13103","New York CS27 West zone","New York West","","","United States (USA) - New York - counties west of 77d 30m West.","9807","40.0","-78.35","","","0.9999375","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_548[] = {"13104","New York CS27 Long Island zone","New York Long Island","","","United States (USA) - New York - Long Island.","9802","40.3","-74.0","41.02","40.4","","1000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_549[] = {"13131","New York CS83 East zone","New York  East","","","United States (USA) - New York - counties east of 75d 15m West excluding Long Island.","9807","38.5","-74.3","","","0.9999","150000.0","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_550[] = {"13132","New York CS83 Central zone","New York Central","","","United States (USA) - New York - counties between 75d 15m & 77d 30m West.","9807","40.0","-76.35","","","0.9999375","250000.0","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_551[] = {"13133","New York CS83 West zone","New York  West","","","United States (USA) - New York - counties west of 77d 30m West.","9807","40.0","-78.35","","","0.9999375","350000.0","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_552[] = {"13134","New York CS83 Long Island zone","New York Long Island","","","United States (USA) - New York - Long Island.","9802","40.1","-74.0","41.02","40.4","","300000.0","0.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_553[] = {"13200","North Carolina CS27","North Carolina","","","United States (USA) - North Carolina.","9802","33.45","-79.0","34.2","36.1","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_554[] = {"13230","North Carolina CS83","North Carolina","","","United States (USA) - North Carolina.","9802","33.45","-79.0","36.1","34.2","","609601.22","0.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_555[] = {"13301","North Dakota CS27 North zone","North Dakota North","","","United States (USA) - North Dakota - counties north of 47d 25m North.","9802","47.0","-100.3","47.26","48.44","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_556[] = {"13302","North Dakota CS27 South zone","North Dakota South","","","United States (USA) - North Dakota - counties south of 47d 25m North.","9802","45.4","-100.3","46.11","47.29","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_557[] = {"13331","North Dakota CS83 North zone","North Dakota North","","","United States (USA) - North Dakota - counties north of 47d 25m North.","9802","47.0","-100.3","48.44","47.26","","600000.0","0.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_558[] = {"13332","North Dakota CS83 South zone","North Dakota South","","","United States (USA) - North Dakota - counties south of 47d 25m North.","9802","45.4","-100.3","47.29","46.11","","600000.0","0.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_559[] = {"13401","Ohio CS27 North zone","Ohio North","","","United States (USA) - Ohio - counties north of 40d 15m North.","9802","39.4","-82.3","40.26","41.42","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_560[] = {"13402","Ohio CS27 South zone","Ohio South","","","United States (USA) - Ohio - counties south of 40d 15m North.","9802","38.0","-82.3","38.44","40.02","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_561[] = {"13431","Ohio CS83 North zone","Ohio North","","","United States (USA) - Ohio - counties north of 40d 15m North.","9802","39.4","-82.3","41.42","40.26","","600000.0","0.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_562[] = {"13432","Ohio CS83 South zone","Ohio South","","","United States (USA) - Ohio - counties south of 40d 15m North.","9802","38.0","-82.3","40.02","38.44","","600000.0","0.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_563[] = {"13501","Oklahoma CS27 North zone","Oklahoma North","","","United States (USA) - Oklahoma - counties north of 35d 20m North.","9802","35.0","-98.0","35.34","36.46","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_564[] = {"13502","Oklahoma CS27 South zone","Oklahoma South","","","United States (USA) - Oklahoma - counties south of 35d 20m North.","9802","33.2","-98.0","33.56","35.14","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_565[] = {"13531","Oklahoma CS83 North zone","Oklahoma North","","","United States (USA) - Oklahoma - counties north of 35d 20m North.","9802","35.0","-98.0","36.46","35.34","","600000.0","0.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_566[] = {"13532","Oklahoma CS83 South zone","Oklahoma South","","","United States (USA) - Oklahoma - counties south of 35d 20m North.","9802","33.2","-98.0","35.14","33.56","","600000.0","0.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_567[] = {"13601","Oregon CS27 North zone","Oregon North","","","United States (USA) - Oregon - counties north of 44d 15m North.","9802","43.4","-120.3","44.2","46.0","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_568[] = {"13602","Oregon CS27 South zone","Oregon South","","","United States (USA) - Oregon - counties south of 44d 15m North.","9802","41.4","-120.3","42.2","44.0","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_569[] = {"13631","Oregon CS83 North zone","Oregon North","","","United States (USA) - Oregon - counties north of 44d 15m North.","9802","43.4","-120.3","46.0","44.2","","2500000.0","0.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_570[] = {"13632","Oregon CS83 South zone","Oregon South","","","United States (USA) - Oregon - counties south of 44d 15m North.","9802","41.4","-120.3","44.0","42.2","","1500000.0","0.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_571[] = {"13701","Pennsylvania CS27 North zone","Pennsylvania North","","","United States (USA) - Pennsylvania - counties north of 40d 50m North.","9802","40.1","-77.45","40.53","41.57","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_572[] = {"13702","Pennsylvania CS27 South zone","Pennsylvania South","","","United States (USA) - Pennsylvania - counties south of 40d 50m North.","9802","39.2","-77.45","39.56","40.48","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_573[] = {"13731","Pennsylvania CS83 North zone","Pennsylvania North","","","United States (USA) - Pennsylvania - counties north of 40d 50m North.","9802","40.1","-77.45","41.57","40.53","","600000.0","0.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_574[] = {"13732","Pennsylvania CS83 South zone","Pennsylvania South","","","United States (USA) - Pennsylvania - counties south of 40d 50m North.","9802","39.2","-77.45","40.58","39.56","","600000.0","0.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_575[] = {"13800","Rhode Island CS27","Rhode Island","","","United States (USA) - Rhode Island.","9807","41.05","-71.3","","","0.9999938","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_576[] = {"13830","Rhode Island CS83","Rhode Island","","","United States (USA) - Rhode Island.","9807","41.05","-71.3","","","0.99999375","100000.0","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_577[] = {"13901","South Carolina CS27 North zone","South Carolina North","","","United States (USA) - South Carolina counties north of and including Edgefield; Saluda; Lexington; Calhoun; Sumter; Florence; Marion & Horry.","9802","33.0","-81.0","33.46","34.58","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_578[] = {"13902","South Carolina CS27 South zone","South Carolina South","","","United States (USA) - South Carolina - Aiken; Allendale; Bamberg; Barnwell; Beaufort; Berkeley; Charleston; Clarendon; Colleton; Dorchester; Georgetown; Hampton; Jasper; Orangeburg & Williamsburg counties.","9802","31.5","-81.0","32.2","33.4","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29 [...]
-datafile_rows_t trf_nonpolynomial_row_579[] = {"13930","South Carolina CS83","South Carolina","","","United States (USA) - South Carolina.","9802","31.5","-81.0","34.5","32.3","","609600.0","0.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_580[] = {"14001","South Dakota CS27 North zone","South Dakota North","","","United States (USA) - South Dakota - counties north of 44d 20m North.","9802","43.5","-100.0","44.25","45.41","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_581[] = {"14002","South Dakota CS27 South zone","South Dakota South","","","United States (USA) - South Dakota - counties south of 44d 20m North.","9802","42.2","-100.2","42.5","44.24","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_582[] = {"14031","South Dakota CS83 North zone","South Dakota North","","","United States (USA) - South Dakota - counties north of 44d 20m North.","9802","43.5","-100.0","45.41","44.25","","600000.0","0.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_583[] = {"14032","South Dakota CS83 South zone","South Dakota South","","","United States (USA) - South Dakota - counties south of 44d 20m North.","9802","42.2","-100.2","44.24","42.5","","600000.0","0.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_584[] = {"14100","Tennessee CS27","Tennessee","","","United States (USA) - Tennessee.","9802","34.4","-86.0","35.15","36.25","","100000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_585[] = {"14130","Tennessee CS83","Tennessee","","","United States (USA) - Tennessee.","9802","34.2","-86.0","36.25","35.15","","600000.0","0.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_586[] = {"14201","Texas CS27 North zone","Texas North","","","United States (USA) - Texas - counties north of 34d 20m North.","9802","34.0","-101.3","34.39","36.11","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_587[] = {"14202","Texas CS27 North Central zone","Texas North Central","","","United States (USA) - Texas - counties between 34d 20m & 32deg North.","9802","31.4","-97.3","32.08","33.58","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_588[] = {"14203","Texas CS27 Central zone","Texas Central","","","United States (USA) - Texas - counties between 32deg & 30d 10m North.","9802","29.4","-100.2","30.07","31.53","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_589[] = {"14204","Texas CS27 South Central zone","Texas South Central","","","United States (USA) - Texas - counties between 30d 10m & 28d 05m North.","9802","27.5","-99.0","28.23","30.17","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_590[] = {"14205","Texas CS27 South zone","Texas South","","","United States (USA) - Texas - counties south of 28d 05m North.","9802","25.4","-98.3","26.1","27.5","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_591[] = {"14231","Texas CS83 North zone","Texas North","","","United States (USA) - Texas - counties north of 34d 20m North.","9802","34.0","-101.3","36.11","34.39","","200000.0","1000000.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_592[] = {"14232","Texas CS83 North Central zone","Texas North Central","","","United States (USA) - Texas - counties between 34d 20m & 32deg North.","9802","31.4","-98.3","33.58","32.08","","600000.0","2000000.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_593[] = {"14233","Texas CS83 Central zone","Texas Central","","","United States (USA) - Texas - counties between 32deg & 30d 10m North.","9802","29.4","-100.2","31.53","30.07","","700000.0","3000000.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_594[] = {"14234","Texas CS83 South Central zone","Texas South Central","","","United States (USA) - Texas - counties between 30d 10m & 28d 05m North.","9802","27.5","-99.0","30.17","28.23","","600000.0","4000000.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_595[] = {"14235","Texas CS83 South zone","Texas South","","","United States (USA) - Texas - counties south of 28d 05m North.","9802","25.4","-98.3","27.5","26.1","","300000.0","5000000.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_596[] = {"14301","Utah CS27 North zone","Utah North","","","United States (USA) - Utah - counties north of 40d 50m North.","9802","40.2","-111.3","40.43","41.47","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_597[] = {"14302","Utah CS27 Central zone","Utah Central","","","United States (USA) - Utah - counties between 40d 50m & 38d 30m North.","9802","38.2","-111.3","39.01","40.39","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_598[] = {"14303","Utah CS27 South zone","Utah South","","","United States (USA) - Utah - counties south of 38d 30m North.","9802","36.4","-111.3","37.13","38.21","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_599[] = {"14331","Utah CS83 North zone","Utah North","","","United States (USA) - Utah - counties north of 40d 50m North.","9802","40.2","-111.3","41.47","40.43","","500000.0","1000000.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_600[] = {"14332","Utah CS83 Central zone","Utah Central","","","United States (USA) - Utah - counties between 40d 50m & 38d 30m North.","9802","38.2","-111.3","40.39","39.01","","500000.0","2000000.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_601[] = {"14333","Utah CS83 South zone","Utah South","","","United States (USA) - Utah - counties south of 38d 30m North.","9802","36.4","-111.3","38.21","37.13","","500000.0","3000000.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_602[] = {"14400","Vermont CS27","Vermont","","","United States (USA) - Vermont.","9807","42.3","-72.3","","","0.999964286","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_603[] = {"14430","Vermont CS83","Vermont","","","United States (USA) - Vermont.","9807","42.3","-72.3","","","0.999964286","500000.0","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_604[] = {"14501","Virginia CS27 North zone","Virginia North","","","United States (USA) - Virginia - counties north of 38d 05m North.","9802","37.4","-78.3","38.02","39.12","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_605[] = {"14502","Virginia CS27 South zone","Virginia South","","","United States (USA) - Virginia - counties south of 38d 05m North.","9802","36.2","-78.3","36.46","37.58","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_606[] = {"14531","Virginia CS83 North zone","Virginia North","","","United States (USA) - Virginia - counties north of 38d 05m North.","9802","37.4","-78.3","39.12","38.02","","3500000.0","2000000.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_607[] = {"14532","Virginia CS83 South zone","Virginia South","","","United States (USA) - Virginia - counties south of 38d 05m North.","9802","36.2","-78.3","37.58","36.46","","3500000.0","1000000.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_608[] = {"14601","Washington CS27 North zone","Washington North","","","United States (USA) - Washington - counties north of 47d 30m North.","9802","47.0","-120.5","47.3","48.44","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_609[] = {"14602","Washington CS27 South zone","Washington South","","","United States (USA) - Washington - counties south of 47d 30m North.","9802","45.2","-120.3","45.5","47.2","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_610[] = {"14631","Washington CS83 North zone","Washington North","","","United States (USA) - Washington - counties north of 47d 30m North.","9802","47.0","-120.5","48.44","47.3","","500000.0","0.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_611[] = {"14632","Washington CS83 South zone","Washington South","","","United States (USA) - Washington - counties south of 47d 30m North.","9802","45.2","-120.3","47.2","45.5","","500000.0","0.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_612[] = {"14701","West Virginia CS27 North zone","West Virginia North","","","United States (USA) - West Virginia - counties north of 39deg North.","9802","38.3","-79.3","39.0","40.15","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_613[] = {"14702","West Virginia CS27 South zone","West Virginia South","","","United States (USA) - West Virginia - counties south of 39deg North.","9802","37.0","-81.0","37.29","38.53","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_614[] = {"14731","West Virginia CS83 North zone","West Virginia North","","","United States (USA) - West Virginia - counties north of 39deg North.","9802","38.3","-79.3","40.15","39.0","","600000.0","0.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_615[] = {"14732","West Virginia CS83 South zone","West Virginia South","","","United States (USA) - West Virginia - counties south of 39deg North.","9802","37.0","-81.0","38.53","37.29","","600000.0","0.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_616[] = {"14801","Wisconsin CS27 North zone","Wisconsin North","","","United States (USA) - Wisconsin - counties north of 45d 35m North.","9802","45.1","-90.0","45.34","46.46","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_617[] = {"14802","Wisconsin CS27 Central zone","Wisconsin Central","","","United States (USA) - Wisconsin - counties between 45d 35m & 44d 15m North.","9802","43.5","-90.0","44.15","45.3","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_618[] = {"14803","Wisconsin CS27 South zone","Wisconsin South","","","United States (USA) - Wisconsin - counties south of 44d 15m North.","9802","42.0","-90.0","42.44","44.04","","2000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_619[] = {"14831","Wisconsin CS83 North zone","Wisconsin North","","","United States (USA) - Wisconsin - counties north of 45d 35m North.","9802","45.1","-90.0","46.46","45.34","","600000.0","0.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_620[] = {"14832","Wisconsin CS83 Central zone","Wisconsin Central","","","United States (USA) - Wisconsin - counties between 45d 35m & 44d 15m North.","9802","43.5","-90.0","45.3","44.15","","600000.0","0.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_621[] = {"14833","Wisconsin CS83 South zone","Wisconsin South","","","United States (USA) - Wisconsin - counties south of 44d 15m North.","9802","42.0","-90.0","44.04","42.44","","600000.0","0.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_622[] = {"14901","Wyoming CS27 East zone","Wyoming East","","","United States (USA) - Wyoming - counties east of 106d West.","9807","40.4","-105.1","","","0.999941177","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_623[] = {"14902","Wyoming CS27 East Central zone","Wyoming East Central","","","United States (USA) - Wyoming - counties between 106d & 108d 10m West.","9807","40.4","-107.2","","","0.999941177","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_624[] = {"14903","Wyoming CS27 West Central zone","Wyoming West Central","","","United States (USA) - Wyoming - counties between 108d 10m & 109d 40m West.","9807","40.4","-108.45","","","0.999941177","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_625[] = {"14904","Wyoming CS27 West zone","Wyoming West","","","United States (USA) - Wyoming - counties west of 109d 40m West.","9807","40.4","-110.05","","","0.999941177","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_626[] = {"14931","Wyoming CS83 East zone","Wyoming East","","","United States (USA) - Wyoming - counties east of 106d West.","9807","40.3","-105.1","","","0.9999375","200000.0","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_627[] = {"14932","Wyoming CS83 East Central zone","Wyoming East Central","","","United States (USA) - Wyoming - counties between 106d & 108d 10m West.","9807","40.3","-107.2","","","0.9999375","400000.0","100000.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_628[] = {"14933","Wyoming CS83 West Central zone","Wyoming West Central","","","United States (USA) - Wyoming - counties between 108d 10m & 109d 40m West.","9807","40.3","-108.45","","","0.9999375","600000.0","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_629[] = {"14934","Wyoming CS83 West zone","Wyoming West","","","United States (USA) - Wyoming - counties west of 109d 40m West.","9807","40.3","-110.05","","","0.9999375","800000.0","100000.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_630[] = {"15001","Alaska CS27 zone 1","Alaska zone 1","","","United States (USA) - Alaska - east of 141 deg West; i.e. Panhandle.","9812","57.0","-133.4","323.07483685","323.07483685","0.9999","16404166.67","-16404166.67","9003","9110","8901","","","","","1997-04-11 00:00:00","USGS Professional Paper #1395","EPSG","","96.29  97.08",NULL};
-datafile_rows_t trf_nonpolynomial_row_631[] = {"15002","Alaska CS27 zone 2","Alaska zone 2","","","United States (USA) - Alaska - 141deg to 144deg West.","9807","54.0","-142.0","","","0.9999","500000.0","0.0","9003","9102","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_632[] = {"15003","Alaska CS27 zone 3","Alaska zone 3","","","United States (USA) - Alaska - 144deg to 148deg West excluding Kenai Peninsula; Perry Is. and Esther Is.","9807","54.0","-146.0","","","0.9999","500000.0","0.0","9003","9102","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_633[] = {"15004","Alaska CS27 zone 4","Alaska zone 4","","","United States (USA) - Alaska - 148deg to 152deg West.","9807","54.0","-150.0","","","0.9999","500000.0","0.0","9003","9102","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_634[] = {"15005","Alaska CS27 zone 5","Alaska zone 5","","","United States (USA) - Alaska - 152deg to 156deg West.","9807","54.0","-154.0","","","0.9999","500000.0","0.0","9003","9102","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_635[] = {"15006","Alaska CS27 zone 6","Alaska zone 6","","","United States (USA) - Alaska - 156deg to 160deg West.","9807","54.0","-158.0","","","0.9999","500000.0","0.0","9003","9102","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_636[] = {"15007","Alaska CS27 zone 7","Alaska zone 7","","","United States (USA) - Alaska - 160deg to 164deg West.","9807","54.0","-162.0","","","0.9999","700000.0","0.0","9003","9102","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_637[] = {"15008","Alaska CS27 zone 8","Alaska zone 8","","","United States (USA) - Alaska - 164deg to 168deg West north of 54d 30m North.","9807","54.0","-166.0","","","0.9999","500000.0","0.0","9003","9102","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_638[] = {"15009","Alaska CS27 zone 9","Alaska zone 9","","","United States (USA) - Alaska - west of 168deg West and north of 54d 30m North.","9807","54.0","-170.0","","","0.9999","600000.0","0.0","9003","9102","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_639[] = {"15010","Alaska CS27 zone 10","Alaska zone 10","","","United States (USA) - Alaska - Aleutian Islands.","9802","51.0","-176.0","53.5","51.5","","3000000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_640[] = {"15031","Alaska CS83 zone 1","Alaska zone 1","","","United States (USA) - Alaska - east of 141 deg West; i.e. Panhandle.","9812","57.0","-133.4","323.07483685","323.07483685","0.9999","5000000.0","-5000000.0","9001","9110","8901","","","","","1996-09-12 00:00:00","NOAA manual NOS NGS 5","EPSG","","96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_641[] = {"15032","Alaska CS83 zone 2","Alaska zone 2","","","United States (USA) - Alaska - 141deg to 144deg West.","9807","54.0","-142.0","","","0.9999","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_642[] = {"15033","Alaska CS83 zone 3","Alaska zone 3","","","United States (USA) - Alaska - 144deg to 148deg West excluding Kenai Peninsula; Perry Is. and Esther Is.","9807","54.0","-146.0","","","0.9999","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_643[] = {"15034","Alaska CS83 zone 4","Alaska zone 4","","","United States (USA) - Alaska - 148deg to 152deg West.","9807","54.0","-150.0","","","0.9999","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_644[] = {"15035","Alaska CS83 zone 5","Alaska zone 5","","","United States (USA) - Alaska - 152deg to 156deg West.","9807","54.0","-154.0","","","0.9999","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_645[] = {"15036","Alaska CS83 zone 6","Alaska zone 6","","","United States (USA) - Alaska - 156deg to 160deg West.","9807","54.0","-158.0","","","0.9999","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_646[] = {"15037","Alaska CS83 zone 7","Alaska zone 7","","","United States (USA) - Alaska - 160deg to 164deg West.","9807","54.0","-162.0","","","0.9999","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_647[] = {"15038","Alaska CS83 zone 8","Alaska zone 8","","","United States (USA) - Alaska - 164deg to 168deg West north of 54d 30m North.","9807","54.0","-166.0","","","0.9999","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_648[] = {"15039","Alaska CS83 zone 9","Alaska zone 9","","","United States (USA) - Alaska - west of 168deg West and north of 54d 30m North.","9807","54.0","-170.0","","","0.9999","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_649[] = {"15040","Alaska CS83 zone 10","Alaska zone 10","","","United States (USA) - Alaska - Aleutian Islands.","9802","51.0","-176.0","53.5","51.5","","1000000.0","0.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_650[] = {"15101","Hawaii CS27 zone 1","Hawaii zone 1","","","United States (USA) - Hawaii - island of Hawaii.","9807","18.5","-155.3","","","0.999966667","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_651[] = {"15102","Hawaii CS27 zone 2","Hawaii zone 2","","","United States (USA) - Hawaii - Maui; Kahoolawe; Lanai; Molokai.","9807","20.2","-156.4","","","0.999966667","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_652[] = {"15103","Hawaii CS27 zone 3","Hawaii zone 3","","","United States (USA) - Hawaii - Oahu.","9807","21.1","-158.0","","","0.99999","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_653[] = {"15104","Hawaii CS27 zone 4","Hawaii zone 4","","","United States (USA) - Hawaii - Kauai.","9807","21.5","-159.3","","","0.99999","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_654[] = {"15105","Hawaii CS27 zone 5","Hawaii zone 5","","","United States (USA) - Hawaii - Niihau.","9807","21.4","-160.1","","","1.0","500000.0","0.0","9003","9110","8901","","","","","1995-12-02 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_655[] = {"15131","Hawaii CS83 zone 1","Hawaii  zone 1","","","United States (USA) - Hawaii - island of Hawaii.","9807","18.5","-155.3","","","0.999966667","500000.0","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_656[] = {"15132","Hawaii CS83 zone 2","Hawaii  zone 2","","","United States (USA) - Hawaii - Maui; Kahoolawe; Lanai; Molokai.","9807","20.2","-156.4","","","0.999966667","500000.0","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_657[] = {"15133","Hawaii CS83 zone 3","Hawaii  zone 3","","","United States (USA) - Hawaii - Oahu.","9807","21.1","-158.0","","","0.99999","500000.0","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_658[] = {"15134","Hawaii CS83 zone 4","Hawaii  zone 4","","","United States (USA) - Hawaii - Kauai.","9807","21.5","-159.3","","","0.99999","500000.0","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_659[] = {"15135","Hawaii CS83 zone 5","Hawaii  zone 5","","","United States (USA) - Hawaii - Niihau.","9807","21.4","-160.1","","","1.0","500000.0","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_660[] = {"15201","Puerto Rico CS27","Puerto Rico","","","Puerto Rico.","9802","17.5","-66.26","18.26","18.02","","500000.0","0.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_661[] = {"15202","St. Croix CS27","St. Croix","","","Virgin Islands of US - St. Croix.","9802","17.5","-66.26","18.26","18.02","","500000.0","100000.0","9003","9110","8901","","","","","1999-04-22 00:00:00","USGS Professional Paper #1395","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_662[] = {"15230","Puerto Rico & Virgin Islands CS83","Puerto Rico & Virgin Is.","","","Puerto Rico & Virgin Islands of US","9802","17.5","-66.26","18.26","18.02","","200000.0","200000.0","9001","9110","8901","","","","","1999-04-22 00:00:00","NOAA manual NOS NGS 5","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_663[] = {"15914","BLM zone 14N in feet","BLM 14N (feet)","","","United States (USA) - Gulf of Mexico - west of 96 deg West approximately.","9807","0.0","-99.0","","","0.9996","1640416.67","0.0","9003","9102","8901","","","","","1995-12-02 00:00:00","Minerals Management Service offshore protraction diagrams.","EPSG","Sometimes locally referred to as \"UTM zone 14\".","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_664[] = {"15915","BLM zone 15N in feet","BLM 15N (feet)","","","United States (USA) - Gulf of Mexico - 96 deg to 90 deg West approximately.","9807","0.0","-93.0","","","0.9996","1640416.67","0.0","9003","9102","8901","","","","","1995-12-02 00:00:00","Minerals Management Service offshore protraction diagrams.","EPSG","Sometimes locally referred to as \"UTM zone 15\".","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_665[] = {"15916","BLM zone 16N in feet","BLM 16N (feet)","","","United States (USA) - Gulf of Mexico - 90 deg to 84 deg West approximately.","9807","0.0","-87.0","","","0.9996","1640416.67","0.0","9003","9102","8901","","","","","1995-12-02 00:00:00","Minerals Management Service offshore protraction diagrams.","EPSG","Sometimes locally referred to as \"UTM zone 16\".","95.27  95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_666[] = {"15917","BLM zone 17N in feet","BLM 17N (feet)","","","United States (USA) - Gulf of Mexico - east of 84 deg West approximately.","9807","0.0","-81.0","","","0.9996","1640416.67","0.0","9003","9102","8901","","","","","1995-12-02 00:00:00","Minerals Management Service offshore protraction diagrams.","EPSG","Sometimes locally referred to as \"UTM zone 17\".","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_667[] = {"16001","UTM zone 1N","","","","180deg to 174deg West; northern hemisphere.","9807","0.0","-177.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_668[] = {"16002","UTM zone 2N","","","","174deg West to 168deg West; northern hemisphere.","9807","0.0","-171.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_669[] = {"16003","UTM zone 3N","","","","168deg West to 162deg West; northern hemisphere.","9807","0.0","-165.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_670[] = {"16004","UTM zone 4N","","","","162deg West to 156deg West; northern hemisphere.","9807","0.0","-159.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_671[] = {"16005","UTM zone 5N","","","","156deg West to 150deg West; northern hemisphere.","9807","0.0","-153.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_672[] = {"16006","UTM zone 6N","","","","150deg West to 144deg West; northern hemisphere.","9807","0.0","-147.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_673[] = {"16007","UTM zone 7N","","","","144deg West to 138deg West; northern hemisphere.","9807","0.0","-141.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_674[] = {"16008","UTM zone 8N","","","","138deg West to 132deg West; northern hemisphere.","9807","0.0","-135.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_675[] = {"16009","UTM zone 9N","","","","132deg West to 126deg West; northern hemisphere.","9807","0.0","-129.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_676[] = {"16010","UTM zone 10N","","","","130deg West to 120deg West; northern hemisphere.","9807","0.0","-123.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_677[] = {"16011","UTM zone 11N","","","","120deg West to 114deg West; northern hemisphere.","9807","0.0","-117.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_678[] = {"16012","UTM zone 12N","","","","114deg West to 108deg West; northern hemisphere.","9807","0.0","-111.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_679[] = {"16013","UTM zone 13N","","","","108deg West to 102deg West; northern hemisphere.","9807","0.0","-105.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_680[] = {"16014","UTM zone 14N","","","","102deg West to 96deg West; northern hemisphere.","9807","0.0","-99.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_681[] = {"16015","UTM zone 15N","","","","96deg West to 90deg West; northern hemisphere.","9807","0.0","-93.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_682[] = {"16016","UTM zone 16N","","","","90deg West to 84deg West; northern hemisphere.","9807","0.0","-87.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_683[] = {"16017","UTM zone 17N","","","","84deg West to 78deg West; northern hemisphere.","9807","0.0","-81.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_684[] = {"16018","UTM zone 18N","","","","78deg West to 72deg West; northern hemisphere.","9807","0.0","-75.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_685[] = {"16019","UTM zone 19N","","","","72deg West to 66deg West; northern hemisphere.","9807","0.0","-69.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_686[] = {"16020","UTM zone 20N","","","","66deg West to 60deg West; northern hemisphere.","9807","0.0","-63.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_687[] = {"16021","UTM zone 21N","","","","60deg West to 54deg West; northern hemisphere.","9807","0.0","-57.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_688[] = {"16022","UTM zone 22N","","","","54deg West to 48deg West; northern hemisphere.","9807","0.0","-51.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_689[] = {"16023","UTM zone 23N","","","","48deg West to 42deg West; northern hemisphere.","9807","0.0","-45.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_690[] = {"16024","UTM zone 24N","","","","42deg West to 36deg West; northern hemisphere.","9807","0.0","-39.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_691[] = {"16025","UTM zone 25N","","","","36deg West to 30deg West; northern hemisphere.","9807","0.0","-33.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_692[] = {"16026","UTM zone 26N","","","","30deg West to 24deg West; northern hemisphere.","9807","0.0","-27.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_693[] = {"16027","UTM zone 27N","","","","24deg West to 18deg West; northern hemisphere.","9807","0.0","-21.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_694[] = {"16028","UTM zone 28N","","","","18deg West to 12deg West; northern hemisphere.","9807","0.0","-15.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_695[] = {"16029","UTM zone 29N","","","","12deg West to 6deg West; northern hemisphere.","9807","0.0","-9.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_696[] = {"16030","UTM zone 30N","","","","6deg West to 0deg; northern hemisphere.","9807","0.0","-3.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_697[] = {"16031","UTM zone 31N","","","","0deg to 6deg East; northern hemisphere.","9807","0.0","3.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_698[] = {"16032","UTM zone 32N","","","","6deg East to 12deg East; northern hemisphere.","9807","0.0","9.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_699[] = {"16033","UTM zone 33N","","","","12deg East to 18deg East; northern hemisphere.","9807","0.0","15.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_700[] = {"16034","UTM zone 34N","","","","18deg East to 24deg East; northern hemisphere.","9807","0.0","21.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_701[] = {"16035","UTM zone 35N","","","","24deg East to 30deg East; northern hemisphere.","9807","0.0","27.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_702[] = {"16036","UTM zone 36N","","","","30deg East to 36deg East; northern hemisphere.","9807","0.0","33.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_703[] = {"16037","UTM zone 37N","","","","36deg East to 42deg East; northern hemisphere.","9807","0.0","39.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_704[] = {"16038","UTM zone 38N","","","","42deg East to 48deg East; northern hemisphere.","9807","0.0","45.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_705[] = {"16039","UTM zone 39N","","","","48deg East to 54deg East; northern hemisphere.","9807","0.0","51.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_706[] = {"16040","UTM zone 40N","","","","54deg East to 60deg East; northern hemisphere.","9807","0.0","57.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_707[] = {"16041","UTM zone 41N","","","","60deg East to 66deg East; northern hemisphere.","9807","0.0","63.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_708[] = {"16042","UTM zone 42N","","","","66deg East to 72deg East; northern hemisphere.","9807","0.0","69.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_709[] = {"16043","UTM zone 43N","","","","72deg East to 78deg East; northern hemisphere.","9807","0.0","75.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_710[] = {"16044","UTM zone 44N","","","","78deg East to 84deg East; northern hemisphere.","9807","0.0","81.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_711[] = {"16045","UTM zone 45N","","","","84deg East to 90deg East; northern hemisphere.","9807","0.0","87.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_712[] = {"16046","UTM zone 46N","","","","90deg East to 96deg East; northern hemisphere.","9807","0.0","93.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_713[] = {"16047","UTM zone 47N","","","","96deg East to 102eg East; northern hemisphere.","9807","0.0","99.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_714[] = {"16048","UTM zone 48N","","","","102deg East to 108deg East; northern hemisphere.","9807","0.0","105.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_715[] = {"16049","UTM zone 49N","","","","108deg East to 114deg East; northern hemisphere.","9807","0.0","111.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_716[] = {"16050","UTM zone 50N","","","","114deg East to 120deg East; northern hemisphere.","9807","0.0","117.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_717[] = {"16051","UTM zone 51N","","","","120deg East to 126deg East; northern hemisphere.","9807","0.0","123.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_718[] = {"16052","UTM zone 52N","","","","126deg East to 132deg East; northern hemisphere.","9807","0.0","129.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_719[] = {"16053","UTM zone 53N","","","","132deg East to 138deg East; northern hemisphere.","9807","0.0","135.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_720[] = {"16054","UTM zone 54N","","","","138deg East to 144deg East; northern hemisphere.","9807","0.0","141.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_721[] = {"16055","UTM zone 55N","","","","144deg East to 150deg East; northern hemisphere.","9807","0.0","147.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_722[] = {"16056","UTM zone 56N","","","","150deg East to 156deg East; northern hemisphere.","9807","0.0","153.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_723[] = {"16057","UTM zone 57N","","","","156deg East to 162deg East; northern hemisphere.","9807","0.0","159.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_724[] = {"16058","UTM zone 58N","","","","162deg East to 168deg East; northern hemisphere.","9807","0.0","165.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_725[] = {"16059","UTM zone 59N","","","","168deg East to 174deg East; northern hemisphere.","9807","0.0","171.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_726[] = {"16060","UTM zone 60N","","","","174deg East to 180deg; northern hemisphere.","9807","0.0","177.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_727[] = {"16061","Universal Polar Stereographic North","UPS North","","","Northern hemisphere polar area.","9810","90.0","0.0","","","0.994","2000000.0","2000000.0","9001","9102","8901","","","","","1997-06-16 00:00:00","","EPSG","","97.18",NULL};
-datafile_rows_t trf_nonpolynomial_row_728[] = {"16101","UTM zone 1S","","","","180deg to 174deg West; southern hemisphere.","9807","0.0","-177.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_729[] = {"16102","UTM zone 2S","","","","174deg West to 168deg West; southern hemisphere.","9807","0.0","-171.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_730[] = {"16103","UTM zone 3S","","","","168deg West to 162deg West; southern hemisphere.","9807","0.0","-165.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_731[] = {"16104","UTM zone 4S","","","","162deg West to 156deg West; southern hemisphere.","9807","0.0","-159.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_732[] = {"16105","UTM zone 5S","","","","156deg West to 150deg West; southern hemisphere.","9807","0.0","-153.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_733[] = {"16106","UTM zone 6S","","","","150deg West to 144deg West; southern hemisphere.","9807","0.0","-147.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_734[] = {"16107","UTM zone 7S","","","","144deg West to 138deg West; southern hemisphere.","9807","0.0","-141.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_735[] = {"16108","UTM zone 8S","","","","138deg West to 132deg West; southern hemisphere.","9807","0.0","-135.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_736[] = {"16109","UTM zone 9S","","","","132deg West to 126deg West; southern hemisphere.","9807","0.0","-129.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_737[] = {"16110","UTM zone 10S","","","","130deg West to 120deg West; southern hemisphere.","9807","0.0","-123.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_738[] = {"16111","UTM zone 11S","","","","120deg West to 114deg West; southern hemisphere.","9807","0.0","-117.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_739[] = {"16112","UTM zone 12S","","","","114deg West to 108deg West; southern hemisphere.","9807","0.0","-111.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_740[] = {"16113","UTM zone 13S","","","","108deg West to 102deg West; southern hemisphere.","9807","0.0","-105.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_741[] = {"16114","UTM zone 14S","","","","102deg West to 96deg West; southern hemisphere.","9807","0.0","-99.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_742[] = {"16115","UTM zone 15S","","","","96deg West to 90deg West; southern hemisphere.","9807","0.0","-93.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_743[] = {"16116","UTM zone 16S","","","","90deg West to 84deg West; southern hemisphere.","9807","0.0","-87.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_744[] = {"16117","UTM zone 17S","","","","84deg West to 78deg West; southern hemisphere.","9807","0.0","-81.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_745[] = {"16118","UTM zone 18S","","","","78deg West to 72deg West; southern hemisphere.","9807","0.0","-75.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_746[] = {"16119","UTM zone 19S","","","","72deg West to 66deg West; southern hemisphere.","9807","0.0","-69.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_747[] = {"16120","UTM zone 20S","","","","66deg West to 60deg West; southern hemisphere.","9807","0.0","-63.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_748[] = {"16121","UTM zone 21S","","","","60deg West to 54deg West; southern hemisphere.","9807","0.0","-57.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_749[] = {"16122","UTM zone 22S","","","","54deg West to 48deg West; southern hemisphere.","9807","0.0","-51.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_750[] = {"16123","UTM zone 23S","","","","48deg West to 42deg West; southern hemisphere.","9807","0.0","-45.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_751[] = {"16124","UTM zone 24S","","","","42deg West to 36deg West; southern hemisphere.","9807","0.0","-39.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_752[] = {"16125","UTM zone 25S","","","","36deg West to 30deg West; southern hemisphere.","9807","0.0","-33.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_753[] = {"16126","UTM zone 26S","","","","30deg West to 24deg West; southern hemisphere.","9807","0.0","-27.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_754[] = {"16127","UTM zone 27S","","","","24deg West to 18deg West; southern hemisphere.","9807","0.0","-21.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_755[] = {"16128","UTM zone 28S","","","","18deg West to 12deg West; southern hemisphere.","9807","0.0","-15.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_756[] = {"16129","UTM zone 29S","","","","12deg West to 6deg West; southern hemisphere.","9807","0.0","-9.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_757[] = {"16130","UTM zone 30S","","","","6deg West to 0deg; southern hemisphere.","9807","0.0","-3.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_758[] = {"16131","UTM zone 31S","","","","0deg to 6deg East; southern hemisphere.","9807","0.0","3.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_759[] = {"16132","UTM zone 32S","","","","6deg East to 12deg East; southern hemisphere.","9807","0.0","9.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_760[] = {"16133","UTM zone 33S","","","","12deg East to 18deg East; southern hemisphere.","9807","0.0","15.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_761[] = {"16134","UTM zone 34S","","","","18deg East to 24deg East; southern hemisphere.","9807","0.0","21.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_762[] = {"16135","UTM zone 35S","","","","24deg East to 30deg East; southern hemisphere.","9807","0.0","27.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_763[] = {"16136","UTM zone 36S","","","","30deg East to 36deg East; southern hemisphere.","9807","0.0","33.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_764[] = {"16137","UTM zone 37S","","","","36deg East to 42deg East; southern hemisphere.","9807","0.0","39.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_765[] = {"16138","UTM zone 38S","","","","42deg East to 48deg East; southern hemisphere.","9807","0.0","45.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_766[] = {"16139","UTM zone 39S","","","","48deg East to 54deg East; southern hemisphere.","9807","0.0","51.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_767[] = {"16140","UTM zone 40S","","","","54deg East to 60deg East; southern hemisphere.","9807","0.0","57.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_768[] = {"16141","UTM zone 41S","","","","60deg East to 66deg East; southern hemisphere.","9807","0.0","63.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_769[] = {"16142","UTM zone 42S","","","","66deg East to 72deg East; southern hemisphere.","9807","0.0","69.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_770[] = {"16143","UTM zone 43S","","","","72deg East to 78deg East; southern hemisphere.","9807","0.0","75.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_771[] = {"16144","UTM zone 44S","","","","78deg East to 84deg East; southern hemisphere.","9807","0.0","81.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_772[] = {"16145","UTM zone 45S","","","","84deg East to 90deg East; southern hemisphere.","9807","0.0","87.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_773[] = {"16146","UTM zone 46S","","","","90deg East to 96deg East; southern hemisphere.","9807","0.0","93.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_774[] = {"16147","UTM zone 47S","","","","96deg East to 102eg East; southern hemisphere.","9807","0.0","99.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_775[] = {"16148","UTM zone 48S","","","","102deg East to 108deg East; southern hemisphere.","9807","0.0","105.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_776[] = {"16149","UTM zone 49S","","","","108deg East to 114deg East; southern hemisphere.","9807","0.0","111.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_777[] = {"16150","UTM zone 50S","","","","114deg East to 120deg East; southern hemisphere.","9807","0.0","117.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_778[] = {"16151","UTM zone 51S","","","","120deg East to 126deg East; southern hemisphere.","9807","0.0","123.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_779[] = {"16152","UTM zone 52S","","","","126deg East to 132deg East; southern hemisphere.","9807","0.0","129.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_780[] = {"16153","UTM zone 53S","","","","132deg East to 138deg East; southern hemisphere.","9807","0.0","135.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_781[] = {"16154","UTM zone 54S","","","","138deg East to 144deg East; southern hemisphere.","9807","0.0","141.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_782[] = {"16155","UTM zone 55S","","","","144deg East to 150deg East; southern hemisphere.","9807","0.0","147.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_783[] = {"16156","UTM zone 56S","","","","150deg East to 156deg East; southern hemisphere.","9807","0.0","153.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_784[] = {"16157","UTM zone 57S","","","","156deg East to 162deg East; southern hemisphere.","9807","0.0","159.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_785[] = {"16158","UTM zone 58S","","","","162deg East to 168deg East; southern hemisphere.","9807","0.0","165.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_786[] = {"16159","UTM zone 59S","","","","168deg East to 174deg East; southern hemisphere.","9807","0.0","171.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_787[] = {"16160","UTM zone 60S","","","","174deg East to 180deg; southern hemisphere.","9807","0.0","177.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_788[] = {"16161","Universal Polar Stereographic South","UPS South","","","Southern hemisphere polar area.","9810","-90.0","0.0","","","0.994","2000000.0","2000000.0","9001","9102","8901","","","","","1997-06-16 00:00:00","","EPSG","","97.18",NULL};
-datafile_rows_t trf_nonpolynomial_row_789[] = {"16202","Gauss-Kruger zone 2","","","","6deg East to 12deg East; northern hemisphere.","9807","0.0","9.0","","","1.0","2500000.0","0.0","9001","9102","8901","","","","","1998-06-30 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_790[] = {"16203","Gauss-Kruger zone 3","","","","12deg East to 18deg East; northern hemisphere.","9807","0.0","15.0","","","1.0","3500000.0","0.0","9001","9102","8901","","","","","1998-06-30 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_791[] = {"16204","Gauss-Kruger zone 4","","","","18deg East to 24deg East; northern hemisphere.","9807","0.0","21.0","","","1.0","4500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_792[] = {"16205","Gauss-Kruger zone 5","","","","24deg East to 30deg East; northern hemisphere.","9807","0.0","27.0","","","1.0","5500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_793[] = {"16206","Gauss-Kruger zone 6","","","","30deg East to 36deg East; northern hemisphere.","9807","0.0","33.0","","","1.0","6500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_794[] = {"16207","Gauss-Kruger zone 7","","","","36deg East to 42deg East; northern hemisphere.","9807","0.0","39.0","","","1.0","7500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_795[] = {"16208","Gauss-Kruger zone 8","","","","42deg East to 48deg East; northern hemisphere.","9807","0.0","45.0","","","1.0","8500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_796[] = {"16209","Gauss-Kruger zone 9","","","","48deg East to 54deg East; northern hemisphere.","9807","0.0","51.0","","","1.0","9500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_797[] = {"16210","Gauss-Kruger zone 10","","","","54deg East to 60deg East; northern hemisphere.","9807","0.0","57.0","","","1.0","10500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_798[] = {"16211","Gauss-Kruger zone 11","","","","60deg East to 66deg East; northern hemisphere.","9807","0.0","63.0","","","1.0","11500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_799[] = {"16212","Gauss-Kruger zone 12","","","","66deg East to 72deg East; northern hemisphere.","9807","0.0","69.0","","","1.0","12500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_800[] = {"16213","Gauss-Kruger zone 13","","","","72deg East to 78deg East; northern hemisphere.","9807","0.0","75.0","","","1.0","13500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_801[] = {"16214","Gauss-Kruger zone 14","","","","78deg East to 84deg East; northern hemisphere.","9807","0.0","81.0","","","1.0","14500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_802[] = {"16215","Gauss-Kruger zone 15","","","","84deg East to 90deg East; northern hemisphere.","9807","0.0","87.0","","","1.0","15500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_803[] = {"16216","Gauss-Kruger zone 16","","","","90deg East to 96deg East; northern hemisphere.","9807","0.0","93.0","","","1.0","16500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_804[] = {"16217","Gauss-Kruger zone 17","","","","96deg East to 102eg East; northern hemisphere.","9807","0.0","99.0","","","1.0","17500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_805[] = {"16218","Gauss-Kruger zone 18","","","","102deg East to 108deg East; northern hemisphere.","9807","0.0","105.0","","","1.0","18500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_806[] = {"16219","Gauss-Kruger zone 19","","","","108deg East to 114deg East; northern hemisphere.","9807","0.0","111.0","","","1.0","19500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_807[] = {"16220","Gauss-Kruger zone 20","","","","114deg East to 120deg East; northern hemisphere.","9807","0.0","117.0","","","1.0","20500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_808[] = {"16221","Gauss-Kruger zone 21","","","","120deg East to 126deg East; northern hemisphere.","9807","0.0","123.0","","","1.0","21500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_809[] = {"16222","Gauss-Kruger zone 22","","","","126deg East to 132deg East; northern hemisphere.","9807","0.0","129.0","","","1.0","22500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_810[] = {"16223","Gauss-Kruger zone 23","","","","132deg East to 138deg East; northern hemisphere.","9807","0.0","135.0","","","1.0","23500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_811[] = {"16224","Gauss-Kruger zone 24","","","","138deg East to 144deg East; northern hemisphere.","9807","0.0","141.0","","","1.0","24500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_812[] = {"16225","Gauss-Kruger zone 25","","","","144deg East to 150deg East; northern hemisphere.","9807","0.0","147.0","","","1.0","25500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_813[] = {"16226","Gauss-Kruger zone 26","","","","150deg East to 156deg East; northern hemisphere.","9807","0.0","153.0","","","1.0","26500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_814[] = {"16227","Gauss-Kruger zone 27","","","","156deg East to 162deg East; northern hemisphere.","9807","0.0","159.0","","","1.0","27500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_815[] = {"16228","Gauss-Kruger zone 28","","","","162deg East to 168deg East; northern hemisphere.","9807","0.0","165.0","","","1.0","28500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_816[] = {"16229","Gauss-Kruger zone 29","","","","168deg East to 174deg East; northern hemisphere.","9807","0.0","171.0","","","1.0","29500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_817[] = {"16230","Gauss-Kruger zone 30","","","","174deg East to 180deg; northern hemisphere.","9807","0.0","177.0","","","1.0","30500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_818[] = {"16231","Gauss-Kruger zone 31","","","","180deg to 174deg West; northern hemisphere.","9807","0.0","-177.0","","","1.0","31500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_819[] = {"16232","Gauss-Kruger zone 32","","","","174deg West to 168deg West; northern hemisphere.","9807","0.0","-171.0","","","1.0","32500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_820[] = {"16302","Gauss-Kruger 2N","","","","6deg East to 12deg East; northern hemisphere.","9807","0.0","9.0","","","1.0","500000.0","0.0","9001","9102","8901","","","","","1998-06-30 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_821[] = {"16303","Gauss-Kruger 3N","","","","12deg East to 18deg East; northern hemisphere.","9807","0.0","15.0","","","1.0","500000.0","0.0","9001","9102","8901","","","","","1998-06-30 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_822[] = {"16304","Gauss-Kruger 4N","","","","18deg East to 24deg East; northern hemisphere.","9807","0.0","21.0","","","1.0","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_823[] = {"16305","Gauss-Kruger 5N","","","","24deg East to 30deg East; northern hemisphere.","9807","0.0","27.0","","","1.0","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_824[] = {"16306","Gauss-Kruger 6N","","","","30deg East to 36deg East; northern hemisphere.","9807","0.0","33.0","","","1.0","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_825[] = {"16307","Gauss-Kruger 7N","","","","36deg East to 42deg East; northern hemisphere.","9807","0.0","39.0","","","1.0","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_826[] = {"16308","Gauss-Kruger 8N","","","","42deg East to 48deg East; northern hemisphere.","9807","0.0","45.0","","","1.0","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_827[] = {"16309","Gauss-Kruger 9N","","","","48deg East to 54deg East; northern hemisphere.","9807","0.0","51.0","","","1.0","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_828[] = {"16310","Gauss-Kruger 10N","","","","54deg East to 60deg East; northern hemisphere.","9807","0.0","57.0","","","1.0","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_829[] = {"16311","Gauss-Kruger 11N","","","","60deg East to 66deg East; northern hemisphere.","9807","0.0","63.0","","","1.0","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_830[] = {"16312","Gauss-Kruger 12N","","","","66deg East to 72deg East; northern hemisphere.","9807","0.0","69.0","","","1.0","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_831[] = {"16313","Gauss-Kruger 13N","","","","72deg East to 78deg East; northern hemisphere.","9807","0.0","75.0","","","1.0","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_832[] = {"16314","Gauss-Kruger 14N","","","","78deg East to 84deg East; northern hemisphere.","9807","0.0","81.0","","","1.0","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_833[] = {"16315","Gauss-Kruger 15N","","","","84deg East to 90deg East; northern hemisphere.","9807","0.0","87.0","","","1.0","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_834[] = {"16316","Gauss-Kruger 16N","","","","90deg East to 96deg East; northern hemisphere.","9807","0.0","93.0","","","1.0","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_835[] = {"16317","Gauss-Kruger 17N","","","","96deg East to 102eg East; northern hemisphere.","9807","0.0","99.0","","","1.0","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_836[] = {"16318","Gauss-Kruger 18N","","","","102deg East to 108deg East; northern hemisphere.","9807","0.0","105.0","","","1.0","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_837[] = {"16319","Gauss-Kruger 19N","","","","108deg East to 114deg East; northern hemisphere.","9807","0.0","111.0","","","1.0","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_838[] = {"16320","Gauss-Kruger 20N","","","","114deg East to 120deg East; northern hemisphere.","9807","0.0","117.0","","","1.0","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_839[] = {"16321","Gauss-Kruger 21N","","","","120deg East to 126deg East; northern hemisphere.","9807","0.0","123.0","","","1.0","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_840[] = {"16322","Gauss-Kruger 22N","","","","126deg East to 132deg East; northern hemisphere.","9807","0.0","129.0","","","1.0","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_841[] = {"16323","Gauss-Kruger 23N","","","","132deg East to 138deg East; northern hemisphere.","9807","0.0","135.0","","","1.0","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_842[] = {"16324","Gauss-Kruger 24N","","","","138deg East to 144deg East; northern hemisphere.","9807","0.0","141.0","","","1.0","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_843[] = {"16325","Gauss-Kruger 25N","","","","144deg East to 150deg East; northern hemisphere.","9807","0.0","147.0","","","1.0","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_844[] = {"16326","Gauss-Kruger 26N","","","","150deg East to 156deg East; northern hemisphere.","9807","0.0","153.0","","","1.0","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_845[] = {"16327","Gauss-Kruger 27N","","","","156deg East to 162deg East; northern hemisphere.","9807","0.0","159.0","","","1.0","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_846[] = {"16328","Gauss-Kruger 28N","","","","162deg East to 168deg East; northern hemisphere.","9807","0.0","165.0","","","1.0","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_847[] = {"16329","Gauss-Kruger 29N","","","","168deg East to 174deg East; northern hemisphere.","9807","0.0","171.0","","","1.0","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_848[] = {"16330","Gauss-Kruger 30N","","","","174deg East to 180deg; northern hemisphere.","9807","0.0","177.0","","","1.0","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_849[] = {"16331","Gauss-Kruger 31N","","","","180deg to 174deg West; northern hemisphere.","9807","0.0","-177.0","","","1.0","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_850[] = {"16332","Gauss-Kruger 32N","","","","174deg West to 168deg West; northern hemisphere.","9807","0.0","-171.0","","","1.0","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_851[] = {"16400","TM 0 N","","","","United Kingdom (UKCS) - offshore North Sea.","9807","0.0","0.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1998-11-11 00:00:00","Shell UK","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_852[] = {"16405","TM 5 NE","","","","Netherlands - offshore.","9807","0.0","5.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1998-11-11 00:00:00","NAM","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_853[] = {"16506","TM 106 NE","","","","Vietnam - offshore.","9807","0.0","106.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1998-11-11 00:00:00","PetroVietnam","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_854[] = {"16611","TM 11.30 SE","","","","Angola - offshore.","9807","0.0","11.3","","","0.9996","500000.0","10000000.0","9001","9110","8901","","","","","1998-11-11 00:00:00","Esso Angola","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_855[] = {"16612","TM 12 SE","","","","Angola - offshore.","9807","0.0","12.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1998-11-11 00:00:00","Shell Angola","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_856[] = {"16636","TM 36 SE","","","","Mozambique - offshore.","9807","0.0","36.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1998-11-11 00:00:00","BP Mozambique","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_857[] = {"17348","Map Grid of Australia zone 48","MGA zone 48","","","Australia 102deg East  to 108deg East.","9807","0.0","105.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","Australian Surveying and Land Information Group Internet WWW page.","EPSG","Grid convergence uses opposite sign convention to UTM","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_858[] = {"17349","Map Grid of Australia zone 49","MGA zone 49","","","Australia 108deg East  to 114deg East.","9807","0.0","111.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","Australian Surveying and Land Information Group Internet WWW page.","EPSG","Grid convergence uses opposite sign convention to UTM","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_859[] = {"17350","Map Grid of Australia zone 50","MGA zone 50","","","Australia 114deg East  to 120deg East.","9807","0.0","117.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","Australian Surveying and Land Information Group Internet WWW page.","EPSG","Grid convergence uses opposite sign convention to UTM","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_860[] = {"17351","Map Grid of Australia zone 51","MGA zone 51","","","Australia 120deg East  to 126deg East.","9807","0.0","123.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","Australian Surveying and Land Information Group Internet WWW page.","EPSG","Grid convergence uses opposite sign convention to UTM","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_861[] = {"17352","Map Grid of Australia zone 52","MGA zone 52","","","Australia 126deg East  to 132deg East.","9807","0.0","129.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","Australian Surveying and Land Information Group Internet WWW page.","EPSG","Grid convergence uses opposite sign convention to UTM","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_862[] = {"17353","Map Grid of Australia zone 53","MGA zone 53","","","Australia 132deg East  to 138deg East.","9807","0.0","135.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","Australian Surveying and Land Information Group Internet WWW page.","EPSG","Grid convergence uses opposite sign convention to UTM","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_863[] = {"17354","Map Grid of Australia zone 54","MGA zone 54","","","Australia 138deg East  to 144deg East.","9807","0.0","141.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","Australian Surveying and Land Information Group Internet WWW page.","EPSG","Grid convergence uses opposite sign convention to UTM","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_864[] = {"17355","Map Grid of Australia zone 55","MGA zone 55","","","Australia 144deg East  to 150deg East.","9807","0.0","147.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","Australian Surveying and Land Information Group Internet WWW page.","EPSG","Grid convergence uses opposite sign convention to UTM","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_865[] = {"17356","Map Grid of Australia zone 56","MGA zone 56","","","Australia 150deg East  to 156deg East.","9807","0.0","153.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","Australian Surveying and Land Information Group Internet WWW page.","EPSG","Grid convergence uses opposite sign convention to UTM","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_866[] = {"17357","Map Grid of Australia zone 57","MGA zone 57","","","Australia 156deg East  to 162deg East.","9807","0.0","159.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","Australian Surveying and Land Information Group Internet WWW page.","EPSG","Grid convergence uses opposite sign convention to UTM","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_867[] = {"17358","Map Grid of Australia zone 58","MGA zone 58","","","Australia 162deg East  to 168deg East.","9807","0.0","165.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","Australian Surveying and Land Information Group Internet WWW page.","EPSG","Grid convergence uses opposite sign convention to UTM","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_868[] = {"17448","Australian Map Grid zone 48","AMG zone 48","","","Australia 102deg East  to 108deg East.","9807","0.0","105.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","The Australian Map Grid Technical Manual; National Mapping Council of Australia; 1972","EPSG","Grid convergence uses opposite sign convention to UTM","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_869[] = {"17449","Australian Map Grid zone 49","AMG zone 49","","","Australia 108deg East  to 114deg East.","9807","0.0","111.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","The Australian Map Grid Technical Manual; National Mapping Council of Australia; 1972","EPSG","Grid convergence uses opposite sign convention to UTM","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_870[] = {"17450","Australian Map Grid zone 50","AMG zone 50","","","Australia 114deg East  to 120deg East.","9807","0.0","117.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","The Australian Map Grid Technical Manual; National Mapping Council of Australia; 1972","EPSG","Grid convergence uses opposite sign convention to UTM","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_871[] = {"17451","Australian Map Grid zone 51","AMG zone 51","","","Australia 120deg East  to 126deg East.","9807","0.0","123.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","The Australian Map Grid Technical Manual; National Mapping Council of Australia; 1972","EPSG","Grid convergence uses opposite sign convention to UTM","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_872[] = {"17452","Australian Map Grid zone 52","AMG zone 52","","","Australia 126deg East  to 132deg East.","9807","0.0","129.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","The Australian Map Grid Technical Manual; National Mapping Council of Australia; 1972","EPSG","Grid convergence uses opposite sign convention to UTM","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_873[] = {"17453","Australian Map Grid zone 53","AMG zone 53","","","Australia 132deg East  to 138deg East.","9807","0.0","135.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","The Australian Map Grid Technical Manual; National Mapping Council of Australia; 1972","EPSG","Grid convergence uses opposite sign convention to UTM","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_874[] = {"17454","Australian Map Grid zone 54","AMG zone 54","","","Australia 138deg East  to 144deg East.  Papua New Guinea west of 144 deg East.","9807","0.0","141.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","The Australian Map Grid Technical Manual; National Mapping Council of Australia; 1972","EPSG","Grid convergence uses opposite sign convention to UTM","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_875[] = {"17455","Australian Map Grid zone 55","AMG zone 55","","","Australia 144deg East  to 150deg East.  Papua New Guinea 144deg East  to 150deg East.","9807","0.0","147.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","The Australian Map Grid Technical Manual; National Mapping Council of Australia; 1972","EPSG","Grid convergence uses opposite sign convention to UTM","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_876[] = {"17456","Australian Map Grid zone 56","AMG zone 56","","","Australia 150deg East  to 156deg East.","9807","0.0","153.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","The Australian Map Grid Technical Manual; National Mapping Council of Australia; 1972","EPSG","Grid convergence uses opposite sign convention to UTM","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_877[] = {"17457","Australian Map Grid zone 57","AMG zone 57","","","Australia 156deg East  to 162deg East.","9807","0.0","159.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","The Australian Map Grid Technical Manual; National Mapping Council of Australia; 1972","EPSG","Grid convergence uses opposite sign convention to UTM","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_878[] = {"17458","Australian Map Grid zone 58","AMG zone 58","","","Australia 162deg East  to 168deg East.","9807","0.0","165.0","","","0.9996","500000.0","10000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","The Australian Map Grid Technical Manual; National Mapping Council of Australia; 1972","EPSG","Grid convergence uses opposite sign convention to UTM","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_879[] = {"17515","South African Survey Grid zone 15","S. African Grid zone 15","","","South Africa - Walvis Bay.","9808","0.0","15.0","","","1.0","0.0","0.0","9001","9102","8901","","","","","1996-04-12 00:00:00","","EPSG","Transformation method sometimes described as \"Gauss conform\".","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_880[] = {"17517","South African Survey Grid zone 17","S. African Grid zone 17","","","South Africa - west of 18 deg East.","9808","0.0","17.0","","","1.0","0.0","0.0","9001","9102","8901","","","","","1996-04-12 00:00:00","","EPSG","Transformation method sometimes described as \"Gauss conform\".","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_881[] = {"17519","South African Survey Grid zone 19","S. African Grid zone 19","","","South Africa - 18 to 20 deg East.","9808","0.0","19.0","","","1.0","0.0","0.0","9001","9102","8901","","","","","1996-04-12 00:00:00","","EPSG","Transformation method sometimes described as \"Gauss conform\".","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_882[] = {"17521","South African Survey Grid zone 21","S. African Grid zone 21","","","South Africa - 20 to 22 deg East.","9808","0.0","21.0","","","1.0","0.0","0.0","9001","9102","8901","","","","","1996-04-12 00:00:00","","EPSG","Transformation method sometimes described as \"Gauss conform\".","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_883[] = {"17523","South African Survey Grid zone 23","S. African Grid zone 23","","","South Africa - 22 to 24 deg East.","9808","0.0","23.0","","","1.0","0.0","0.0","9001","9102","8901","","","","","1996-04-12 00:00:00","","EPSG","Transformation method sometimes described as \"Gauss conform\".","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_884[] = {"17525","South African Survey Grid zone 25","S. African Grid zone 25","","","Lestho  - west of 26 deg East; South Africa - 24 to 26 deg East.","9808","0.0","25.0","","","1.0","0.0","0.0","9001","9102","8901","","","","","1996-04-12 00:00:00","","EPSG","Transformation method sometimes described as \"Gauss conform\".","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_885[] = {"17527","South African Survey Grid zone 27","S. African Grid zone 27","","","Lestho  - east of 26 deg East;  South Africa - 26 to 28 deg East.","9808","0.0","27.0","","","1.0","0.0","0.0","9001","9102","8901","","","","","1996-04-12 00:00:00","","EPSG","Transformation method sometimes described as \"Gauss conform\".","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_886[] = {"17529","South African Survey Grid zone 29","S. African Grid zone 29","","","South Africa - 28 to 30 deg East.","9808","0.0","29.0","","","1.0","0.0","0.0","9001","9102","8901","","","","","1996-04-12 00:00:00","","EPSG","Transformation method sometimes described as \"Gauss conform\".","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_887[] = {"17531","South African Survey Grid zone 31","S. African Grid zone 31","","","South Africa - 30 to 32 deg East;  Swaziland.","9808","0.0","31.0","","","1.0","0.0","0.0","9001","9102","8901","","","","","1996-04-12 00:00:00","","EPSG","Transformation method sometimes described as \"Gauss conform\".","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_888[] = {"17533","South African Survey Grid zone 33","S. African Grid zone 33","","","South Africa - east of 32 deg East.","9808","0.0","33.0","","","1.0","0.0","0.0","9001","9102","8901","","","","","1996-04-12 00:00:00","","EPSG","Transformation method sometimes described as \"Gauss conform\".","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_889[] = {"17611","South West African Survey Grid zone 11","SW African Grid zone 11","","","Namibia - west of 12 deg East.","9808","-22.0","11.0","","","1.0","0.0","0.0","9031","9102","8901","","","","","1997-06-16 00:00:00","Chief Directorate Surveys and Land Information; Mowbray; South Africa.","EPSG","Transformation method sometimes described as \"Gauss conform\".","95.30  96.29  97.16",NULL};
-datafile_rows_t trf_nonpolynomial_row_890[] = {"17613","South West African Survey Grid zone 13","SW African Grid zone 13","","","Namibia - 12 to 14 deg East.","9808","-22.0","13.0","","","1.0","0.0","0.0","9031","9102","8901","","","","","1997-06-16 00:00:00","Chief Directorate Surveys and Land Information; Mowbray; South Africa.","EPSG","Transformation method sometimes described as \"Gauss conform\".","95.30  96.29  97.16",NULL};
-datafile_rows_t trf_nonpolynomial_row_891[] = {"17615","South West African Survey Grid zone 15","SW African Grid zone 15","","","Namibia - 14 to 16 deg East.","9808","-22.0","15.0","","","1.0","0.0","0.0","9031","9102","8901","","","","","1997-06-16 00:00:00","Chief Directorate Surveys and Land Information; Mowbray; South Africa.","EPSG","Transformation method sometimes described as \"Gauss conform\".","95.30  96.29  97.16",NULL};
-datafile_rows_t trf_nonpolynomial_row_892[] = {"17617","South West African Survey Grid zone 17","SW African Grid zone 17","","","Namibia - 16 to 18 deg East.","9808","-22.0","17.0","","","1.0","0.0","0.0","9031","9102","8901","","","","","1997-06-16 00:00:00","Chief Directorate Surveys and Land Information; Mowbray; South Africa.","EPSG","Transformation method sometimes described as \"Gauss conform\".","95.30  96.29  97.16",NULL};
-datafile_rows_t trf_nonpolynomial_row_893[] = {"17619","South West African Survey Grid zone 19","SW African Grid zone 19","","","Namibia - 18 to 20 deg East.","9808","-22.0","19.0","","","1.0","0.0","0.0","9031","9102","8901","","","","","1997-06-16 00:00:00","Chief Directorate Surveys and Land Information; Mowbray; South Africa.","EPSG","Transformation method sometimes described as \"Gauss conform\".","95.30  96.29  97.16",NULL};
-datafile_rows_t trf_nonpolynomial_row_894[] = {"17621","South West African Survey Grid zone 21","SW African Grid zone 21","","","Namibia - 20 to 22 deg East.","9808","-22.0","21.0","","","1.0","0.0","0.0","9031","9102","8901","","","","","1997-06-16 00:00:00","Chief Directorate Surveys and Land Information; Mowbray; South Africa.","EPSG","Transformation method sometimes described as \"Gauss conform\".","95.30  96.29  97.16",NULL};
-datafile_rows_t trf_nonpolynomial_row_895[] = {"17623","South West African Survey Grid zone 23","SW African Grid zone 23","","","Namibia - 22 to 24 deg East.","9808","-22.0","23.0","","","1.0","0.0","0.0","9031","9102","8901","","","","","1997-06-16 00:00:00","Chief Directorate Surveys and Land Information; Mowbray; South Africa.","EPSG","Transformation method sometimes described as \"Gauss conform\".","95.30  96.29  97.16",NULL};
-datafile_rows_t trf_nonpolynomial_row_896[] = {"17625","South West African Survey Grid zone 25","SW African Grid zone 25","","","Namibia - east of 24 deg East.","9808","-22.0","25.0","","","1.0","0.0","0.0","9031","9102","8901","","","","","1997-06-16 00:00:00","Chief Directorate Surveys and Land Information; Mowbray; South Africa.","EPSG","Transformation method sometimes described as \"Gauss conform\".","95.30  96.29  97.16",NULL};
-datafile_rows_t trf_nonpolynomial_row_897[] = {"17700","MTM Quebec zone 2","","","","Canada - Quebec - east of 57 deg East.","9807","0.0","-55.3","","","0.9999","304800.0","0.0","9001","9110","8901","","","","","1997-11-13 00:00:00","Topographic Mapping Section; Quebec Ministry of Natural Resources.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_898[] = {"17701","MTM zone 1","","","","Canada - Newfoundland - east of 54 deg 30 min West.","9807","0.0","-53.0","","","0.9999","304800.0","0.0","9001","9102","8901","","","","","1997-11-13 00:00:00","Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_899[] = {"17702","MTM Newfoundland zone 2","MTM zone 2","","","Canada - Newfoundland and Labrador between 57 deg 30 min and 54 de 30 min West.","9807","0.0","-56.0","","","0.9999","304800.0","0.0","9001","9102","8901","","","","","1997-11-13 00:00:00","Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_900[] = {"17703","MTM zone 3","","","","Canada - Newfoundland and Labrador between 60 deg and 57 deg 30 min West; Canada - Quebec between 60 deg and 57 deg West.","9807","0.0","-58.3","","","0.9999","304800.0","0.0","9001","9110","8901","","","","","1997-11-13 00:00:00","Topographic Mapping Section; Quebec Ministry of Natural Resources. Also Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_901[] = {"17704","MTM zone 4","","","","Canada - Quebec and Newfoundland (Labrador) between 63 deg and 60 deg West.","9807","0.0","-61.3","","","0.9999","304800.0","0.0","9001","9110","8901","","","","","1997-11-13 00:00:00","Topographic Mapping Section; Quebec Ministry of Natural Resources. Also Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_902[] = {"17705","MTM zone 5","","","","Canada - Quebec and Newfoundland (Labrador) between 66 deg and 63 deg West.","9807","0.0","-64.3","","","0.9999","304800.0","0.0","9001","9110","8901","","","","","1997-11-13 00:00:00","Topographic Mapping Section; Quebec Ministry of Natural Resources. Also Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_903[] = {"17706","MTM zone 6","","","","Canada - Quebec and Newfoundland (Labrador) between 69 deg and  66 deg West.","9807","0.0","-67.3","","","0.9999","304800.0","0.0","9001","9110","8901","","","","","1997-11-13 00:00:00","Topographic Mapping Section; Quebec Ministry of Natural Resources. Also Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_904[] = {"17707","MTM zone 7","","","","Canada - Quebec between 72 deg and 69 deg West.","9807","0.0","-70.3","","","0.9999","304800.0","0.0","9001","9110","8901","","","","","1997-11-13 00:00:00","Topographic Mapping Section; Quebec Ministry of Natural Resources.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_905[] = {"17708","MTM zone 8","","","","Canada - Quebec between 75 deg and 72 deg West.; Canada - Ontario - east of 75 deg West.","9807","0.0","-73.3","","","0.9999","304800.0","0.0","9001","9110","8901","","","","","1997-11-13 00:00:00","Surveys and Mapping Section; Ontario Ministry of Transportation.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_906[] = {"17709","MTM zone 9","","","","Canada - Quebec and Ontario - between 78 deg and 75 deg West.","9807","0.0","-76.3","","","0.9999","304800.0","0.0","9001","9110","8901","","","","","1997-11-13 00:00:00","Surveys and Mapping Section; Ontario Ministry of Transportation.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_907[] = {"17710","MTM zone 10","","","","Canada - Quebec west of 78 deg West; Canada - Ontario - between 79 deg 30 min and 78 deg W in area to north of 47 deg N; between 80 deg 15 min and 78 deg W in area between 46 deg and 47 deg N; between 81 deg and 78 deg W in area south of 46 deg N.","9807","0.0","-79.3","","","0.9999","304800.0","0.0","9001","9110","8901","","","","","1997-11-13 00:00:00","Surveys and Mapping Section; Ontario Ministry of Transp [...]
-datafile_rows_t trf_nonpolynomial_row_908[] = {"17711","MTM zone 11","","","","Canada - Ontario - south of 46 deg N and west of 81 deg West.","9807","0.0","-82.3","","","0.9999","304800.0","0.0","9001","9110","8901","","","","","1997-11-13 00:00:00","Surveys and Mapping Section; Ontario Ministry of Transportation.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_909[] = {"17712","MTM zone 12","","","","Canada - Ontario - between 82 deg 30 min and 79 deg 30 min W in area to north of 47 deg N; between 82 deg 30 min and 80 deg 15 min W in area between 46 deg and 47 deg N; between 82 deg 30 min and 79 deg 30 min W in area north of 47 deg N.","9807","0.0","-81.0","","","0.9999","304800.0","0.0","9001","9102","8901","","","","","1997-11-13 00:00:00","Surveys and Mapping Section; Ontario Ministry of Transportation. [...]
-datafile_rows_t trf_nonpolynomial_row_910[] = {"17713","MTM zone 13","","","","Canada - Ontario - between 85 deg 30 min and 82 deg 30 min West and north of 46 deg North.","9807","0.0","-84.0","","","0.9999","304800.0","0.0","9001","9102","8901","","","","","1997-11-13 00:00:00","Surveys and Mapping Section; Ontario Ministry of Transportation.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_911[] = {"17714","MTM zone 14","","","","Canada - Ontario - between 88 deg 30 min and 85 deg 30 min West.","9807","0.0","-87.0","","","0.9999","304800.0","0.0","9001","9102","8901","","","","","1997-11-13 00:00:00","Surveys and Mapping Section; Ontario Ministry of Transportation.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_912[] = {"17715","MTM zone 15","","","","Canada - Ontario - between 91 deg 30 min and 88 deg 30 min West.","9807","0.0","-90.0","","","0.9999","304800.0","0.0","9001","9102","8901","","","","","1997-11-13 00:00:00","Surveys and Mapping Section; Ontario Ministry of Transportation.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_913[] = {"17716","MTM zone 16","","","","Canada - Ontario - between 94 deg 30 min and 91 deg 30 min West.","9807","0.0","-93.0","","","0.9999","304800.0","0.0","9001","9102","8901","","","","","1997-11-13 00:00:00","Surveys and Mapping Section; Ontario Ministry of Transportation.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_914[] = {"17717","MTM zone 17","","","","Canada - Ontario - west of 94 deg 30 min West.","9807","0.0","-96.0","","","0.9999","304800.0","0.0","9001","9102","8901","","","","","1997-11-13 00:00:00","Surveys and Mapping Section; Ontario Ministry of Transportation.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_915[] = {"17794","MTM Nova Scotia zone 4","","","","Canada - Nova Scotia - east of 63 deg West.","9807","0.0","-61.3","","","0.9999","4500000.0","0.0","9001","9110","8901","","","","","1999-05-24 00:00:00","Geomatics Centre; Nova Scotia Ministry of Housing and Municipal Affairs.","EPSG","","99.042",NULL};
-datafile_rows_t trf_nonpolynomial_row_916[] = {"17795","MTM Nova Scotia zone 5","","","","Canada - Nova Scotia - west of 63 deg West.","9807","0.0","-64.3","","","0.9999","5500000.0","0.0","9001","9110","8901","","","","","1999-05-24 00:00:00","Geomatics Centre; Nova Scotia Ministry of Housing and Municipal Affairs.","EPSG","","99.042",NULL};
-datafile_rows_t trf_nonpolynomial_row_917[] = {"17801","Japan Plane Rectangular CS zone I","Japan zone I","","","Japan - Kyushu - Nagasaki-ken; islands of Kagoshima-ken between 27 and 32 deg N and between 128 deg 18 min and 130 deg E (between 128 deg 18 min and 30 deg 13 min E for Amami islands).","9807","33.0","129.3","","","0.9999","0.0","0.0","9001","9110","8901","","","","","1998-12-12 00:00:00","Ministry of Construction; Japan.  http://vldb.gsi-mc.go.jp/sokuchi/datum/image/heichoku2 [...]
-datafile_rows_t trf_nonpolynomial_row_918[] = {"17802","Japan Plane Rectangular CS zone II","Japan zone II","","","Japan - Kyushu - Fukuoka-ken; Saga-ken; Kumamoto-ken; Oita-ken; Miyazaki-ken; Kagoshima-ken (except for area within Japan Plane Rectangular Coordinates System zone I).","9807","33.0","131.0","","","0.9999","0.0","0.0","9001","9110","8901","","","","","1998-12-12 00:00:00","Ministry of Construction; Japan.  http://vldb.gsi-mc.go.jp/sokuchi/datum/image/heichoku2.gif","EPSG","O [...]
-datafile_rows_t trf_nonpolynomial_row_919[] = {"17803","Japan Plane Rectangular CS zone III","Japan zone III","","","Japan - Kyushu - Fukuoka-ken; Saga-ken; Kumamoto-ken; Oita-ken; Miyazaki-ken; Kagoshima-ken (except for area within Japan Plane Rectangular Coordinates System zone I).","9807","36.0","132.1","","","0.9999","0.0","0.0","9001","9110","8901","","","","","1998-12-12 00:00:00","Ministry of Construction; Japan.  http://vldb.gsi-mc.go.jp/sokuchi/datum/image/heichoku2.gif","EPSG", [...]
-datafile_rows_t trf_nonpolynomial_row_920[] = {"17804","Japan Plane Rectangular CS zone IV","Japan zone IV","","","Japan - Kyushu - Fukuoka-ken; Saga-ken; Kumamoto-ken; Oita-ken; Miyazaki-ken; Kagoshima-ken (except for area within Japan Plane Rectangular Coordinates System zone I).","9807","33.0","133.3","","","0.9999","0.0","0.0","9001","9110","8901","","","","","1998-12-12 00:00:00","Ministry of Construction; Japan.  http://vldb.gsi-mc.go.jp/sokuchi/datum/image/heichoku2.gif","EPSG","O [...]
-datafile_rows_t trf_nonpolynomial_row_921[] = {"17805","Japan Plane Rectangular CS zone V","Japan zone V","","","Japan - Kyushu - Fukuoka-ken; Saga-ken; Kumamoto-ken; Oita-ken; Miyazaki-ken; Kagoshima-ken (except for area within Japan Plane Rectangular Coordinates System zone I).","9807","36.0","134.2","","","0.9999","0.0","0.0","9001","9110","8901","","","","","1998-12-12 00:00:00","Ministry of Construction; Japan.  http://vldb.gsi-mc.go.jp/sokuchi/datum/image/heichoku2.gif","EPSG","Ori [...]
-datafile_rows_t trf_nonpolynomial_row_922[] = {"17806","Japan Plane Rectangular CS zone VI","Japan zone VI","","","Japan - Kyushu - Fukuoka-ken; Saga-ken; Kumamoto-ken; Oita-ken; Miyazaki-ken; Kagoshima-ken (except for area within Japan Plane Rectangular Coordinates System zone I).","9807","36.0","136.0","","","0.9999","0.0","0.0","9001","9110","8901","","","","","1998-12-12 00:00:00","Ministry of Construction; Japan.  http://vldb.gsi-mc.go.jp/sokuchi/datum/image/heichoku2.gif","EPSG","O [...]
-datafile_rows_t trf_nonpolynomial_row_923[] = {"17807","Japan Plane Rectangular CS zone VII","Japan zone VII","","","Japan - Kyushu - Fukuoka-ken; Saga-ken; Kumamoto-ken; Oita-ken; Miyazaki-ken; Kagoshima-ken (except for area within Japan Plane Rectangular Coordinates System zone I).","9807","36.0","137.1","","","0.9999","0.0","0.0","9001","9110","8901","","","","","1998-12-12 00:00:00","Ministry of Construction; Japan.  http://vldb.gsi-mc.go.jp/sokuchi/datum/image/heichoku2.gif","EPSG", [...]
-datafile_rows_t trf_nonpolynomial_row_924[] = {"17808","Japan Plane Rectangular CS zone VIII","Japan zone VIII","","","Japan - Kyushu - Fukuoka-ken; Saga-ken; Kumamoto-ken; Oita-ken; Miyazaki-ken; Kagoshima-ken (except for area within Japan Plane Rectangular Coordinates System zone I).","9807","36.0","138.3","","","0.9999","0.0","0.0","9001","9110","8901","","","","","1998-12-12 00:00:00","Ministry of Construction; Japan.  http://vldb.gsi-mc.go.jp/sokuchi/datum/image/heichoku2.gif","EPSG [...]
-datafile_rows_t trf_nonpolynomial_row_925[] = {"17809","Japan Plane Rectangular CS zone IX","Japan zone IX","","","Japan - Kyushu - Fukuoka-ken; Saga-ken; Kumamoto-ken; Oita-ken; Miyazaki-ken; Kagoshima-ken (except for area within Japan Plane Rectangular Coordinates System zone I).","9807","36.0","139.5","","","0.9999","0.0","0.0","9001","9110","8901","","","","","1998-12-12 00:00:00","Ministry of Construction; Japan.  http://vldb.gsi-mc.go.jp/sokuchi/datum/image/heichoku2.gif","EPSG","O [...]
-datafile_rows_t trf_nonpolynomial_row_926[] = {"17810","Japan Plane Rectangular CS zone X","Japan zone X","","","Japan - Kyushu - Fukuoka-ken; Saga-ken; Kumamoto-ken; Oita-ken; Miyazaki-ken; Kagoshima-ken (except for area within Japan Plane Rectangular Coordinates System zone I).","9807","40.0","140.5","","","0.9999","0.0","0.0","9001","9110","8901","","","","","1998-12-12 00:00:00","Ministry of Construction; Japan.  http://vldb.gsi-mc.go.jp/sokuchi/datum/image/heichoku2.gif","EPSG","Ori [...]
-datafile_rows_t trf_nonpolynomial_row_927[] = {"17811","Japan Plane Rectangular CS zone XI","Japan zone XI","","","Japan - Hokkaido west of 141 deg 15 min E approx. - Otaru city; Hakodate city; Date city; Usu-gun and Abuta-gun of Iburi-shicyo; area of Hiyama-shicyo; area of Shiribeshi-shicyo; Oshima-shicyo.","9807","44.0","140.15","","","0.9999","0.0","0.0","9001","9110","8901","","","","","1998-12-12 00:00:00","Ministry of Construction; Japan.  http://vldb.gsi-mc.go.jp/sokuchi/datum/ima [...]
-datafile_rows_t trf_nonpolynomial_row_928[] = {"17812","Japan Plane Rectangular CS zone XII","Japan zone XII","","","Japan - Hokkaido west of 141 deg 15 min E approx. - Otaru city; Hakodate city; Date city; Usu-gun and Abuta-gun of Iburi-shicyo; area of Hiyama-shicyo; area of Shiribeshi-shicyo; Oshima-shicyo.","9807","44.0","142.15","","","0.9999","0.0","0.0","9001","9110","8901","","","","","1998-12-12 00:00:00","Ministry of Construction; Japan.  http://vldb.gsi-mc.go.jp/sokuchi/datum/i [...]
-datafile_rows_t trf_nonpolynomial_row_929[] = {"17813","Japan Plane Rectangular CS zone XIII","Japan zone XIII","","","Japan - Hokkaido west of 141 deg 15 min E approx. - Otaru city; Hakodate city; Date city; Usu-gun and Abuta-gun of Iburi-shicyo; area of Hiyama-shicyo; area of Shiribeshi-shicyo; Oshima-shicyo.","9807","44.0","144.15","","","0.9999","0.0","0.0","9001","9110","8901","","","","","1998-12-12 00:00:00","Ministry of Construction; Japan.  http://vldb.gsi-mc.go.jp/sokuchi/datum [...]
-datafile_rows_t trf_nonpolynomial_row_930[] = {"17814","Japan Plane Rectangular CS zone XIV","Japan zone XIV","","","Japan - Tokyo-to south of 28 deg N & between 140 deg 30 min & 143 deg E.","9807","26.0","142.0","","","0.9999","0.0","0.0","9001","9110","8901","","","","","1998-12-12 00:00:00","Ministry of Construction; Japan.  http://vldb.gsi-mc.go.jp/sokuchi/datum/image/heichoku2.gif","EPSG","Original transformation by Gauss-Kruger formula.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_931[] = {"17815","Japan Plane Rectangular CS zone XV","Japan zone XV","","","Japan - Okinawa-ken between 126 deg &130 deg E.","9807","26.0","127.3","","","0.9999","0.0","0.0","9001","9110","8901","","","","","1998-12-12 00:00:00","Ministry of Construction; Japan.  http://vldb.gsi-mc.go.jp/sokuchi/datum/image/heichoku2.gif","EPSG","Original transformation by Gauss-Kruger formula.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_932[] = {"17816","Japan Plane Rectangular CS zone XVI","Japan zone XVI","","","Japan - Okinawa-ken west of 126 deg E.","9807","26.0","124.0","","","0.9999","0.0","0.0","9001","9110","8901","","","","","1998-12-12 00:00:00","Ministry of Construction; Japan.  http://vldb.gsi-mc.go.jp/sokuchi/datum/image/heichoku2.gif","EPSG","Original transformation by Gauss-Kruger formula.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_933[] = {"17817","Japan Plane Rectangular CS zone XVII","Japan zone XVII","","","Japan - Okinawa-ken east of 130 deg E.","9807","26.0","131.0","","","0.9999","0.0","0.0","9001","9110","8901","","","","","1998-12-12 00:00:00","Ministry of Construction; Japan.  http://vldb.gsi-mc.go.jp/sokuchi/datum/image/heichoku2.gif","EPSG","Original transformation by Gauss-Kruger formula.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_934[] = {"17818","Japan Plane Rectangular CS zone XVIII","Japan zone XVIII","","","Japan - Tokyo-to south of 28 N & west of 140 deg 30 min E.","9807","20.0","136.0","","","0.9999","0.0","0.0","9001","9110","8901","","","","","1998-12-12 00:00:00","Ministry of Construction; Japan.  http://vldb.gsi-mc.go.jp/sokuchi/datum/image/heichoku2.gif","EPSG","Original transformation by Gauss-Kruger formula.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_935[] = {"17819","Japan Plane Rectangular CS zone XIX","Japan zone XIX","","","Japan - Tokyo-to south of 28 N & east of 143 deg E.","9807","26.0","154.0","","","0.9999","0.0","0.0","9001","9110","8901","","","","","1998-12-12 00:00:00","Ministry of Construction; Japan.  http://vldb.gsi-mc.go.jp/sokuchi/datum/image/heichoku2.gif","EPSG","Original transformation by Gauss-Kruger formula.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_936[] = {"18011","Nord Algerie (ancienne)","","","","Algeria north of 38.5g (34 deg 39 min) North.","9801","40.0","3.0","","","0.999625544","500000.0","300000.0","9001","9105","8901","","","","","1996-09-12 00:00:00","","EPSG","Used with Voirol 1875 datum - now superseded.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_937[] = {"18012","Sud Algerie (ancienne)","","","","Algeria 35g to 38.5g (31 deg 30 min to 34 deg 39 min) North.","9801","37.0","3.0","","","0.999625769","500000.0","300000.0","9001","9105","8901","","","","","1996-09-12 00:00:00","","EPSG","Used with Voirol 1875 datum - now superseded.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_938[] = {"18021","Nord Algerie","","","","Algeria north of 38.5g (34 deg 39 min) North.","9801","40.0","3.0","","","0.999625544","500135.0","300090.0","9001","9105","8901","","","","","1996-09-12 00:00:00","","EPSG","Use with Voirol Unifie 1960 datum.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_939[] = {"18022","Sud Algerie","","","","Algeria 35g to 38.5g (31 deg 30 min to 34 deg 39 min) North.","9801","37.0","3.0","","","0.999625769","500135.0","300090.0","9001","9105","8901","","","","","1996-09-12 00:00:00","","EPSG","Use with Voirol Unifie 1960 datum.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_940[] = {"18031","Argentina zone 1","Argentina 1","","","Argentina west of 70 deg 30 min West.","9807","-90.0","-72.0","","","1.0","1500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula","95.30",NULL};
-datafile_rows_t trf_nonpolynomial_row_941[] = {"18032","Argentina zone 2","Argentina 2","","","Argentina between 70 deg 30 min and 67 deg 30 min West.","9807","-90.0","-69.0","","","1.0","2500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula","95.30",NULL};
-datafile_rows_t trf_nonpolynomial_row_942[] = {"18033","Argentina zone 3","Argentina 3","","","Argentina between 67 deg 30 min and 64 deg 30 min West.","9807","-90.0","-66.0","","","1.0","3500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula","95.30",NULL};
-datafile_rows_t trf_nonpolynomial_row_943[] = {"18034","Argentina zone 4","Argentina 4","","","Argentina between 64 deg 30 min and 61 deg 30 min West.","9807","-90.0","-63.0","","","1.0","4500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula","95.30",NULL};
-datafile_rows_t trf_nonpolynomial_row_944[] = {"18035","Argentina zone 5","Argentina 5","","","Argentina between 61 deg 30 min and 58 deg 30 min West.","9807","-90.0","-60.0","","","1.0","5500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula","95.30",NULL};
-datafile_rows_t trf_nonpolynomial_row_945[] = {"18036","Argentina zone 6","Argentina 6","","","Argentina between 58 deg 30 min and 55 deg 30 min West.","9807","-90.0","-57.0","","","1.0","6500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula","95.30",NULL};
-datafile_rows_t trf_nonpolynomial_row_946[] = {"18037","Argentina zone 7","Argentina 7","","","Argentina east of 55 deg 30 min West.","9807","-90.0","-54.0","","","1.0","7500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula","95.30",NULL};
-datafile_rows_t trf_nonpolynomial_row_947[] = {"18041","Austria West Zone","","","","Austria west of 11deg 50min East of Greenwich (29deg 30min E of Ferro).","9807","0.0","28.0","","","1.0","0.0","0.0","9001","9102","8909","","","","","1997-04-11 00:00:00","","EPSG","Superseded by M28 (EPSG code 18044).","95.30  96.29  97.01  98.48",NULL};
-datafile_rows_t trf_nonpolynomial_row_948[] = {"18042","Austria Central Zone","","","","Austria between 11deg 50min and 14deg 50min East of Greenwich (29deg 30min and 32deg 30min East of Ferro).","9807","0.0","31.0","","","1.0","0.0","0.0","9001","9102","8909","","","","","1997-04-11 00:00:00","","EPSG","Superseded by M31 (EPSG code 18045).","95.30  96.29  97.01  98.48",NULL};
-datafile_rows_t trf_nonpolynomial_row_949[] = {"18043","Austria East Zone","","","","Austria east of 14deg 50min East of Greenwich (32deg 30min East of Ferro).","9807","0.0","34.0","","","1.0","0.0","0.0","9001","9102","8909","","","","","1997-04-11 00:00:00","","EPSG","Superseded by M34 (EPSG code 18046).","95.30  96.29  97.01  98.48",NULL};
-datafile_rows_t trf_nonpolynomial_row_950[] = {"18044","Austria M28","M28","","","Austria west of 11deg 50min East of Greenwich (29deg 30min E of Ferro).","9807","0.0","10.2","","","1.0","150000.0","0.0","9001","9110","8901","","","","","1999-10-20 00:00:00","Bundesamt f�r Eich- und Vermessungswesen","EPSG","Supersedes Austria West zone (EPSG code 18041).","",NULL};
-datafile_rows_t trf_nonpolynomial_row_951[] = {"18045","Austria M31","M31","","","Austria between 11deg 50min and 14deg 50min East of Greenwich (29deg 30min and 32deg 30min East of Ferro).","9807","0.0","13.2","","","1.0","450000.0","0.0","9001","9110","8901","","","","","1999-10-20 00:00:00","Bundesamt f�r Eich- und Vermessungswesen","EPSG","Supersedes Austria Central zone (EPSG code 18042).","",NULL};
-datafile_rows_t trf_nonpolynomial_row_952[] = {"18046","Austria M34","M34","","","Austria east of 14deg 50min East of Greenwich (32deg 30min East of Ferro).","9807","0.0","16.2","","","1.0","750000.0","0.0","9001","9110","8901","","","","","1999-10-20 00:00:00","Bundesamt f�r Eich- und Vermessungswesen","EPSG","Supersedes Austria East zone (EPSG code 18043).","",NULL};
-datafile_rows_t trf_nonpolynomial_row_953[] = {"18051","Colombia West zone","Colombia 3W","","","Colombia west of 1 deg 30 min W of Bogota (75d 34m 51.30s W of Greenwich).","9807","4.355657","-77.04513","","","1.0","1000000.0","1000000.0","9001","9110","8901","","","","","1997-04-11 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.  Zone name sometimes referred to as \"6 west\".","95.30  96.29  97.11",NULL};
-datafile_rows_t trf_nonpolynomial_row_954[] = {"18052","Colombia Bogota zone","Colombia Bogota","","","Colombia 1 deg 30 min W to 1 deg 30 min E of Bogota (75d 35m W to 72d 35m W of Greenwich).","9807","4.355657","-74.04513","","","1.0","1000000.0","1000000.0","9001","9110","8901","","","","","1997-04-11 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula","95.30  96.29  97.11",NULL};
-datafile_rows_t trf_nonpolynomial_row_955[] = {"18053","Colombia East Central zone","Colombia 3E","","","Colombia 1 deg 30 min to 4 deg 30 min E of Bogota (72d 35m to 69d 34m W of Greenwich).","9807","4.355657","-71.04513","","","1.0","1000000.0","1000000.0","9001","9110","8901","","","","","1997-04-11 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.  Zone name sometimes referred to as \"3 east\".","95.30  96.29  97.11",NULL};
-datafile_rows_t trf_nonpolynomial_row_956[] = {"18054","Colombia East zone","Colombia 6E","","","Colombia east of 4 deg 30 min E of Bogota (69d 34m 51.3s W of Greenwich).","9807","4.355657","-68.04513","","","1.0","1000000.0","1000000.0","9001","9110","8901","","","","","1997-04-11 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.  Zone name sometimes referred to as \"6 east\".","95.30  96.29  97.11",NULL};
-datafile_rows_t trf_nonpolynomial_row_957[] = {"18061","Cuba Norte","","","","Cuba","9801","22.21","-81.0","","","0.99993602","500000.0","280296.016","9001","9110","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_958[] = {"18062","Cuba Sur","","","","Cuba","9801","20.43","-76.5","","","0.99994848","500000.0","229126.939","9001","9110","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_959[] = {"18071","Egypt Blue Belt","Blue Belt","","","Egypt  - Sinai peninsula.","9807","30.0","35.0","","","1.0","300000.0","1100000.0","9001","9102","8901","","","","","1999-04-22 00:00:00","","EPSG","Also known as Green Belt.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_960[] = {"18072","Egypt Red Belt","Red Belt","","","Egypt  east of 29 deg East.","9807","30.0","31.0","","","1.0","615000.0","810000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.30",NULL};
-datafile_rows_t trf_nonpolynomial_row_961[] = {"18073","Egypt Purple Belt","Purple Belt","","","Egypt  west of 29 deg East; north of approx 28 deg 11 min North.","9807","30.0","27.0","","","1.0","700000.0","200000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.30",NULL};
-datafile_rows_t trf_nonpolynomial_row_962[] = {"18074","Egypt Extended Purple Belt","Extended Purple Belt","","","Egypt  west of 29 deg East; south of approx 28 deg 11 min North.","9807","30.0","27.0","","","1.0","700000.0","1200000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.30",NULL};
-datafile_rows_t trf_nonpolynomial_row_963[] = {"18081","France I","","","","France north of 53.5 grads (48 deg 09 min) North.","9801","55.0","0.0","","","0.999877341","600000.0","1200000.0","9001","9105","8903","","","","","1996-09-12 00:00:00","IGN Paris.","EPSG","Introduced 1972. See 18091.","95.26",NULL};
-datafile_rows_t trf_nonpolynomial_row_964[] = {"18082","France II","","","","France 50.5 to 53.5 grads (45 deg 27 min to 48 deg 09 min) North.","9801","52.0","0.0","","","0.99987742","600000.0","2200000.0","9001","9105","8903","","","","","1996-09-12 00:00:00","IGN Paris.","EPSG","Introduced 1972. See 18092.","95.26",NULL};
-datafile_rows_t trf_nonpolynomial_row_965[] = {"18083","France III","","","","France south of 50.5 grads (45 deg 27 min) North.","9801","49.0","0.0","","","0.999877499","600000.0","3200000.0","9001","9105","8903","","","","","1996-09-12 00:00:00","IGN Paris.","EPSG","Introduced 1972. See 18093.","95.26",NULL};
-datafile_rows_t trf_nonpolynomial_row_966[] = {"18084","France IV","","","","France - Corsica.","9801","46.85","0.0","","","0.99994471","234.358","4185861.369","9001","9105","8903","","","","","1996-09-12 00:00:00","IGN Paris.","EPSG","Introduced 1972. See 18094.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_967[] = {"18091","Nord France","","","","France north of 53.5 grads (48 deg 09 min) North.","9801","55.0","0.0","","","0.999877341","600000.0","200000.0","9001","9105","8903","","","","","1996-09-12 00:00:00","IGN Paris.","EPSG","Superseded by 18081 from 1972.","95.26",NULL};
-datafile_rows_t trf_nonpolynomial_row_968[] = {"18092","Centre France","","","","France 50.5 to 53.5 grads (45 deg 27 min to 48 deg 09 min) North.","9801","52.0","0.0","","","0.99987742","600000.0","200000.0","9001","9105","8903","","","","","1996-09-12 00:00:00","IGN Paris.","EPSG","Superseded by 18082 from 1972.","95.26",NULL};
-datafile_rows_t trf_nonpolynomial_row_969[] = {"18093","Sud France","","","","France south of 50.5 grads (45 deg 27 min) North.","9801","49.0","0.0","","","0.999877499","600000.0","200000.0","9001","9105","8903","","","","","1996-09-12 00:00:00","IGN Paris.","EPSG","Superseded by 18083 from 1972.","95.26",NULL};
-datafile_rows_t trf_nonpolynomial_row_970[] = {"18094","Corse","","","","France - Corsica.","9801","46.85","0.0","","","0.99994471","234.358","185861.369","9001","9105","8903","","","","","1996-09-12 00:00:00","IGN Paris.","EPSG","Superseded by 18084 from 1972.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_971[] = {"18101","Germany zone 1","","","","Germany - onshore west of 4 deg 30 min East.","9807","0.0","3.0","","","1.0","1500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula","95.30",NULL};
-datafile_rows_t trf_nonpolynomial_row_972[] = {"18102","Germany zone 2","","","","Germany - onshore between 4 deg 30 min and 7 deg 30 min East.","9807","0.0","6.0","","","1.0","2500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula","95.30",NULL};
-datafile_rows_t trf_nonpolynomial_row_973[] = {"18103","Germany zone 3","","","","Germany - onshore between 7 deg 30 min and 10 deg 30 min East.","9807","0.0","9.0","","","1.0","3500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula","95.30",NULL};
-datafile_rows_t trf_nonpolynomial_row_974[] = {"18104","Germany zone 4","","","","Germany - onshore between 10 deg 30 min and 13 deg 30 min East.","9807","0.0","12.0","","","1.0","4500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula","95.30",NULL};
-datafile_rows_t trf_nonpolynomial_row_975[] = {"18105","Germany zone 5","","","","Germany - onshore between 13 deg 30 min and 16 deg 30 min East.","9807","0.0","15.0","","","1.0","5500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula","95.30",NULL};
-datafile_rows_t trf_nonpolynomial_row_976[] = {"18110","India zone 0","","","","Pakistan north of 35 deg 35 min North.","9801","39.3","68.0","","","0.99846154","2355500.0","2590000.0","9084","9110","8901","","","","","1999-10-20 00:00:00","US Army Map Service projection tables; 1943.","EPSG","BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.","95.30  96.01  96.02  96.29  97.23",NULL};
-datafile_rows_t trf_nonpolynomial_row_977[] = {"18111","India zone I","","","","India north of 28 deg North. Pakistan 28 deg to 35 deg 35 min North.","9801","32.3","68.0","","","0.99878641","3000000.0","1000000.0","9084","9110","8901","","","","","1999-10-20 00:00:00","US Army Map Service projection tables; 1943.","EPSG","BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.","95.30  96.02  [...]
-datafile_rows_t trf_nonpolynomial_row_978[] = {"18112","India zone IIa","","","","India - between 21 deg and 28 deg North and  west of 82 deg East; Pakistan - south of 28 deg North.","9801","26.0","74.0","","","0.99878641","3000000.0","1000000.0","9084","9102","8901","","","","","1999-10-20 00:00:00","US Army Map Service projection tables; 1943.","EPSG","BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion [...]
-datafile_rows_t trf_nonpolynomial_row_979[] = {"18113","India zone IIb","India zone II b","","","Bangladesh; India - north of 21 deg North and east of 82 deg East; Myanmar (Burma) - north of 21 deg North.","9801","26.0","90.0","","","0.99878641","3000000.0","1000000.0","9084","9102","8901","","","","","1999-10-20 00:00:00","US Army Map Service projection tables; 1943.","EPSG","BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas  [...]
-datafile_rows_t trf_nonpolynomial_row_980[] = {"18114","India zone IIIa","India zone IIIa","","","India - between 15 deg and 21 deg North.","9801","19.0","80.0","","","0.99878641","3000000.0","1000000.0","9084","9102","8901","","","","","1999-10-20 00:00:00","US Army Map Service projection tables; 1943.","EPSG","BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.","95.28  96.02  97.23",NULL};
-datafile_rows_t trf_nonpolynomial_row_981[] = {"18115","India zone IIIb","","","","Myanmar (Burma) - between 15 deg and 21 deg North.","9801","19.0","100.0","","","0.99878641","3000000.0","1000000.0","9084","9102","8901","","","","","1999-10-20 00:00:00","US Army Map Service projection tables; 1943.","EPSG","BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.","95.28  96.02  97.23",NULL};
-datafile_rows_t trf_nonpolynomial_row_982[] = {"18116","India zone IVa","India zone Iva","","","India - south of 15 deg North.","9801","12.0","80.0","","","0.99878641","3000000.0","1000000.0","9084","9102","8901","","","","","1999-10-20 00:00:00","US Army Map Service projection tables; 1943.","EPSG","BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.","95.28  96.02  97.23",NULL};
-datafile_rows_t trf_nonpolynomial_row_983[] = {"18117","India zone IVb","","","","Myanmar - south of 15 deg North.","9801","12.0","100.0","","","0.99878641","3000000.0","1000000.0","9084","9102","8901","","","","","1999-10-20 00:00:00","US Army Map Service projection tables; 1943.","EPSG","BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.","95.28  96.02  97.23",NULL};
-datafile_rows_t trf_nonpolynomial_row_984[] = {"18121","Italy zone 1","","","","Italy west of 12 deg East (of Greenwich).","9807","0.0","9.0","","","0.9996","1500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Boaga formula","",NULL};
-datafile_rows_t trf_nonpolynomial_row_985[] = {"18122","Italy zone 2","","","","Italy east of 12 deg East (of Greenwich).","9807","0.0","15.0","","","0.9996","2520000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Original transformation by Gauss-Boaga formula","",NULL};
-datafile_rows_t trf_nonpolynomial_row_986[] = {"18131","Nord Maroc","","","","Morocco north of 35 grads (31 deg 30 min) North.","9801","37.0","-6.0","","","0.999625769","500000.0","300000.0","9001","9105","8901","","","","","1996-09-12 00:00:00","IGN Paris.","EPSG","A projection with the same parameter values used the Lambert Conic Near-Conformal method (EPSG code 9817) prior to 1953.","99.203",NULL};
-datafile_rows_t trf_nonpolynomial_row_987[] = {"18132","Sud Maroc","","","","Morocco 31gr to 35gr  (27 deg 54 min to 31 deg 30 min) North.","9801","33.0","-6.0","","","0.999615596","500000.0","300000.0","9001","9105","8901","","","","","1996-09-12 00:00:00","","EPSG","A projection with the same parameter values used the Lambert Conic Near-Conformal method (EPSG code 9817) prior to 1953.","99.203",NULL};
-datafile_rows_t trf_nonpolynomial_row_988[] = {"18133","Sahara","","","","Morocco south of 31gr  (27 deg 54 min) North.","9801","29.0","-6.0","","","0.9996","1200000.0","400000.0","9001","9105","8901","","","","","1996-09-12 00:00:00","IGN Paris","EPSG","Created in 1977 to cover Sahara Marocain (ex Spanish Sahara)","",NULL};
-datafile_rows_t trf_nonpolynomial_row_989[] = {"18141","New Zealand North Island National Grid","North Island Grid","","","New Zealand - North Island.","9807","-39.0","175.3","","","1.0","300000.0","400000.0","9040","9110","8901","","","","","1999-10-20 00:00:00","","EPSG","Superseded by New Zealand Map Grid.","95.30  96.29  97.231",NULL};
-datafile_rows_t trf_nonpolynomial_row_990[] = {"18142","New Zealand South Island National Grid","South Island Grid","","","New Zealand - South Island.","9807","-44.0","171.3","","","1.0","500000.0","500000.0","9040","9110","8901","","","","","1999-10-20 00:00:00","","EPSG","Superseded by New Zealand Map Grid.","95.30  96.29  97.231",NULL};
-datafile_rows_t trf_nonpolynomial_row_991[] = {"18151","Nigeria West Belt","","","","Nigeria west of 6 deg 30 min East.","9807","4.0","4.3","","","0.99975","230738.26","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_992[] = {"18152","Nigeria Mid Belt","","","","Nigeria between 6 deg 30 min and 10 deg 30 min East.","9807","4.0","8.3","","","0.99975","670553.98","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_993[] = {"18153","Nigeria East Belt","","","","Nigeria east of 10 deg 30 min East.","9807","4.0","12.3","","","0.99975","1110369.7","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_994[] = {"18161","Peru west zone","","","","Peru west of 79 deg West.","9807","-6.0","-80.3","","","0.99983008","222000.0","1426834.743","9001","9110","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_995[] = {"18162","Peru central zone","","","","Peru 79 to 73 deg West.","9807","-9.3","-76.0","","","0.99932994","720000.0","1039979.159","9001","9110","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_996[] = {"18163","Peru east zone","","","","Peru east of 73 deg West.","9807","-9.3","-70.3","","","0.99952992","1324000.0","1040084.558","9001","9110","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_997[] = {"18171","Philippines zone  I","","","","Philippines - west of 118 deg East.","9807","0.0","117.0","","","0.99995","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.30",NULL};
-datafile_rows_t trf_nonpolynomial_row_998[] = {"18172","Philippines zone  II","","","","Philippines - Palawan; Calamian Islands.","9807","0.0","119.0","","","0.99995","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.30",NULL};
-datafile_rows_t trf_nonpolynomial_row_999[] = {"18173","Philippines zone  III","","","","Philippines - Luzon (except SE part); Mindoro.","9807","0.0","121.0","","","0.99995","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.30",NULL};
-datafile_rows_t trf_nonpolynomial_row_1000[] = {"18174","Philippines zone  IV","","","","Philippines - SE Luzon; Tablas; Masbate; Panay; Cebu; Negros; W. Mindanao.","9807","0.0","123.0","","","0.99995","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.30",NULL};
-datafile_rows_t trf_nonpolynomial_row_1001[] = {"18175","Philippines zone  V","","","","Philippines - E. Mindanao; Bohol; Samar.","9807","0.0","125.0","","","0.99995","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.30",NULL};
-datafile_rows_t trf_nonpolynomial_row_1002[] = {"18181","Nord Tunisie","","","","Tunisia north of 38.5 grads (34 deg 39 min) North.","9801","40.0","11.0","","","0.999625544","500000.0","300000.0","9001","9105","8901","","","","","1996-09-12 00:00:00","","EPSG","","95.30",NULL};
-datafile_rows_t trf_nonpolynomial_row_1003[] = {"18182","Sud Tunisie","","","","Tunisia south of 38.5 grads (34 deg 39 min) North.","9801","37.0","11.0","","","0.999625769","500000.0","300000.0","9001","9105","8901","","","","","1996-09-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1004[] = {"18191","Finland zone 1","","","","Finland - west of 22deg 30min E.","9807","0.0","21.0","","","1.0","1500000.0","0.0","9001","9102","8901","","","","","1997-07-22 00:00:00","www.nls.fi/maa/papers/kkj.html","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1005[] = {"18192","Finland zone 2","","","","Finland - 22deg 30 min to 25deg 30min E.","9807","0.0","24.0","","","1.0","2500000.0","0.0","9001","9102","8901","","","","","1997-07-22 00:00:00","www.nls.fi/maa/papers/kkj.html","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1006[] = {"18193","Finland Uniform Coordinate System","Finland zone 3","","","Finland; Finland - 25 deg 30min E to 28deg 30min E.","9807","0.0","27.0","","","1.0","3500000.0","0.0","9001","9102","8901","","","","","1997-07-22 00:00:00","www.nls.fi/maa/papers/kkj.html","EPSG","Used by Uniform Coordinate System over all country and also by zone 3 of Basic Coordinate System at larger scales.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1007[] = {"18194","Finland zone 4","","","","Finland - east of 28deg 30 min E.","9807","0.0","30.0","","","1.0","4500000.0","0.0","9001","9102","8901","","","","","1997-07-22 00:00:00","www.nls.fi/maa/papers/kkj.html","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1008[] = {"18201","Palestine Grid","","","","Israel;  Jordan","9806","31.4402749","35.124349","","","","170251.555","126867.909","9001","9110","8901","","","","","1999-04-22 00:00:00","","EPSG","Also encountered as a Transverse Mercator projection with scale factor of 1.  The difference in conversion caused by the change of formula does not exceed 2m within Israel.  Within the State of Israel superseded by the Israeli CS Grid (EPSG code 18203).","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1009[] = {"18202","Palestine Belt","","","","Israel;  Jordan","9807","31.4402749","35.124349","","","1.0","170251.555","1126867.909","9001","9110","8901","","","","","1999-04-22 00:00:00","","EPSG","Originally constructed as the Palestine Grid - EPSG code 18201. Adopted by the US Army Map Service as \"Palestine Belt\" with change of projection method and false northing (FN). Sometimes seen with unchanged FN of 126867.909.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1010[] = {"18203","Israeli CS","ICS","","","Israel","9806","31.4402749","35.124349","","","","170251.555","1126867.909","9001","9110","8901","","","","","1999-10-20 00:00:00","Survey of Israel   ftp://ftp.rd.soi.gov.il/doc","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1011[] = {"18204","Israeli TM","ITM","","","Israel","9807","31.4403817","35.1216261","","","1.0000067","219529.584","626907.39","9001","9110","8901","","","","","1999-10-20 00:00:00","Survey of Israel   ftp://ftp.rd.soi.gov.il/doc","EPSG","Designed to approximate Israeli CS grid in north-central Israel.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1012[] = {"18211","Guatemala Norte","","","","Guatemala north of 15 deg 50 min North.","9801","16.49","-90.2","","","0.99992226","500000.0","292209.579","9001","9110","8901","","","","","1999-08-16 00:00:00","","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1013[] = {"18212","Guatemala Sud","","","","Guatemala south of 15 deg 50 min North.","9801","14.54","-90.2","","","0.99989906","500000.0","325992.681","9001","9110","8901","","","","","1999-08-16 00:00:00","","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1014[] = {"18221","NGO zone I","","","","Norway - west of 3deg 30min W of Oslo (7deg 13min 22.5sec E of Greenwich).","9807","58.0","-4.4","","","1.0","0.0","0.0","9001","9110","8913","","","","","1999-10-20 00:00:00","J. Danielsen; \"Transformasjoner ved Norges Geografiske Oppm�ling\"; Kart Og Plan nr 1; 1982.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1015[] = {"18222","NGO zone II","","","","Norway - between 3deg 30min W and 1deg 10min W of Oslo (7deg 13min 22.5sec E  and 9deg 33min 22.5sec E of Greenwich).","9807","58.0","-2.2","","","1.0","0.0","0.0","9001","9110","8913","","","","","1999-10-20 00:00:00","J. Danielsen; \"Transformasjoner ved Norges Geografiske Oppm�ling\"; Kart Og Plan nr 1; 1982.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1016[] = {"18223","NGO zone III","","","","Norway - between 1deg 10min W and 1deg 15min E of Oslo (9deg 33min 22.5sec E and 11deg 58min 22.5sec E of Greenwich).","9807","58.0","0.0","","","1.0","0.0","0.0","9001","9110","8913","","","","","1999-10-20 00:00:00","J. Danielsen; \"Transformasjoner ved Norges Geografiske Oppm�ling\"; Kart Og Plan nr 1; 1982.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1017[] = {"18224","NGO zone IV","","","","Norway - between 1deg 15min E and 4deg 20min E of Oslo (11deg 58min 22.5sec E and 15deg 03min 22.5sec E of Greenwich).","9807","58.0","2.3","","","1.0","0.0","0.0","9001","9110","8913","","","","","1999-10-20 00:00:00","J. Danielsen; \"Transformasjoner ved Norges Geografiske Oppm�ling\"; Kart Og Plan nr 1; 1982.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1018[] = {"18225","NGO zone V","","","","Norway - between 4deg 20min E and 8deg 10min E of Oslo (15deg 03min 22.5sec E and 18deg 53min 22.5sec E of Greenwich).","9807","58.0","6.1","","","1.0","0.0","0.0","9001","9110","8913","","","","","1999-10-20 00:00:00","J. Danielsen; \"Transformasjoner ved Norges Geografiske Oppm�ling\"; Kart Og Plan nr 1; 1982.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1019[] = {"18226","NGO zone VI","","","","Norway - between 8deg 10min E and 12deg 10min E of Oslo (18deg 53min 22.5sec E and 22deg 53min 22.5sec E of Greenwich).","9807","58.0","10.1","","","1.0","0.0","0.0","9001","9110","8913","","","","","1999-10-20 00:00:00","J. Danielsen; \"Transformasjoner ved Norges Geografiske Oppm�ling\"; Kart Og Plan nr 1; 1982.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1020[] = {"18227","NGO zone VII","","","","Norway - between 12deg 10min E and 16deg 15min E of Oslo (22deg 53min 22.5sec E and 26deg 58min 22.5sec E of Greenwich).","9807","58.0","14.1","","","1.0","0.0","0.0","9001","9110","8913","","","","","1999-10-20 00:00:00","J. Danielsen; \"Transformasjoner ved Norges Geografiske Oppm�ling\"; Kart Og Plan nr 1; 1982.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1021[] = {"18228","NGO zone VIII","","","","Norway - east of 16deg 15min E of Oslo (26deg 58min 22.5sec E of Greenwich).","9807","58.0","18.2","","","1.0","0.0","0.0","9001","9110","8913","","","","","1999-10-20 00:00:00","J. Danielsen; \"Transformasjoner ved Norges Geografiske Oppm�ling\"; Kart Og Plan nr 1; 1982.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1022[] = {"18231","India zone I (1975 metres)","India zone I","","","India north of 28 deg North.","9801","32.3","68.0","","","0.99878641","2743185.69","914395.23","9001","9110","8901","","","","","1999-10-20 00:00:00","","EPSG","BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1023[] = {"18232","India zone IIa (1975 metres)","India zone II a","","","India - between 21 deg and 28 deg North and  west of 82 deg East.","9801","26.0","74.0","","","0.99878641","2743185.69","914395.23","9001","9102","8901","","","","","1999-10-20 00:00:00","","EPSG","BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1024[] = {"18233","India zone IIIa (1975 metres)","India zone IIIa","","","India - between 15 deg and 21 deg North.","9801","19.0","80.0","","","0.99878641","2743185.69","914395.23","9001","9102","8901","","","","","1999-10-20 00:00:00","","EPSG","BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1025[] = {"18234","India zone IVa (1975 metres)","India zone IV a","","","India - south of 15 deg North.","9801","12.0","80.0","","","0.99878641","2743185.69","914395.23","9001","9102","8901","","","","","1999-10-20 00:00:00","","EPSG","BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1026[] = {"18235","India zone IIb (1975 metres)","India zone II b","","","India - north of 21 deg North and east of 82 deg East.","9801","26.0","90.0","","","0.99878641","2743185.69","914395.23","9001","9102","8901","","","","","1999-10-20 00:00:00","","EPSG","BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1027[] = {"18236","India zone I (1962 metres)","India zone I","","","Pakistan - north of 28 deg North.","9801","32.3","68.0","","","0.99878641","2743196.4","914398.8","9001","9110","8901","","","","","1999-10-20 00:00:00","","EPSG","BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1028[] = {"18237","India zone IIa (1962 metres)","India zone II a","","","Pakistan - south of 28 deg North.","9801","26.0","74.0","","","0.99878641","2743196.4","914398.8","9001","9102","8901","","","","","1999-10-20 00:00:00","","EPSG","BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1029[] = {"18238","India zone IIb (1937 metres)","India zone II b","","","Bangladesh.","9801","26.0","90.0","","","0.99878641","2743195.5","914398.5","9001","9102","8901","","","","","1999-10-20 00:00:00","US Army Map Service projection tables; 1943.","EPSG","BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1030[] = {"19900","Bahrain State Grid","Bahrain Grid","","","Bahrain.","9807","0.0","51.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.30",NULL};
-datafile_rows_t trf_nonpolynomial_row_1031[] = {"19901","Belge Lambert 50","","","","Belgium - onshore.","9802","90.0","0.0","49.5","51.1","","150000.0","5400000.0","9001","9110","8910","","","","","1999-04-22 00:00:00","\"Systemes de reference et formules de transformation en usage en Belgique\"; IGN Brussels","EPSG","","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_1032[] = {"19902","Belge Lambert 72","","","","Belgium - onshore.","9803","90.0","4.2124983","49.5","51.1","","150000.01256","5400088.4378","9001","9110","8901","","","","","1999-04-22 00:00:00","\"Systemes de reference et formules de transformation en usage en Belgique\"; IGN Brussels","EPSG","Rotation from Belge Lambert 50 to Belge Lambert 72 is +29.2985sec.","95.30  96.29  99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_1033[] = {"19903","Nord de Guerre","","","","France - Alsace.","9801","55.0","6.0","","","0.99950908","500000.0","300000.0","9001","9105","8903","","","","","1996-09-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1034[] = {"19904","Ghana Metre Grid","","","","Ghana.","9807","4.4","-1.0","","","0.99975","274319.51","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_1035[] = {"19905","Netherlands East Indies Equatorial Zone","NEIEZ","","","Indonesia.","9804","0.0","110.0","","","0.997","3900000.0","900000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","US Army Map Service projection tables; 1943.","EPSG","","95.30",NULL};
-datafile_rows_t trf_nonpolynomial_row_1036[] = {"19906","Iraq zone","","","","Iran -south of 36 deg North; Iraq;  Kuwait.","9801","32.3","45.0","","","0.99878640776699","1500000.0","1166200.0","9001","9110","8901","","","","","1996-04-12 00:00:00","US Army Map Service projection tables; 1943.","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_1037[] = {"19907","Iraq National Grid","","","","Iraq.","9807","29.0134566","46.3","","","0.9994","800000.0","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_1038[] = {"19908","Irish National Grid","","","","Ireland - onshore.  United Kingdom (UK) - Northern Ireland onshore.","9807","53.3","-8.0","","","1.000035","200000.0","250000.0","9001","9110","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_1039[] = {"19909","Jamaica (Old Grid)","","","","Jamaica.","9801","18.0","-77.0","","","1.0","550000.0","400000.0","9005","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Superseded by Jamaica (New Grid).","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_1040[] = {"19910","Jamaica National Grid","","","","Jamaica.","9801","18.0","-77.0","","","1.0","250000.0","150000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","Supersedes Jamaica (Old Grid).","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_1041[] = {"19911","Laborde Grid","","","","Madagascar.","9815","-21.0","49.0","21.0","21.0","0.9995","400000.0","800000.0","9001","9105","8903","","","","","1997-11-13 00:00:00","","EPSG","Can also use transformation method 9813.","97.613",NULL};
-datafile_rows_t trf_nonpolynomial_row_1042[] = {"19912","Rectified Skew Orthomorphic Borneo Grid","R.S.O. Borneo","","","Brunei;  Malaysia - East Malaysia (Sabah; Sarawak).","9812","4.0","115.0","53.18569537","53.07483685","0.99984","0.0","0.0","9042","9110","8901","","","","","1999-10-20 00:00:00","","EPSG","","95.30  96.29  97.231",NULL};
-datafile_rows_t trf_nonpolynomial_row_1043[] = {"19913","RD Old","","","","Netherlands - onshore.","9809","52.0922178","5.23155","","","0.9999079","0.0","0.0","9001","9110","8901","","","","","1995-12-02 00:00:00","Nederlandse Commissie voor Geodesie publication 30.","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_1044[] = {"19914","RD New","","","","Netherlands - onshore.","9809","52.0922178","5.23155","","","0.9999079","155000.0","463000.0","9001","9110","8901","","","","","1995-12-02 00:00:00","Nederlandse Commissie voor Geodesie publication 30.","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_1045[] = {"19915","Aden Zone","","","","Yemen.","9801","15.0","45.0","","","0.999365678","1500000.0","1000000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","US Army Map Service projection tables; 1943.","EPSG","","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_1046[] = {"19916","British National Grid","","","","United Kingdom (UK) - onshore England; Scotland; Wales; Isle of Man.","9807","49.0","-2.0","","","0.999601272","400000.0","-100000.0","9001","9102","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.30",NULL};
-datafile_rows_t trf_nonpolynomial_row_1047[] = {"19917","New Zealand Map Grid","","","","New Zealand.","9811","-41.0","173.0","","","","2510000.0","6023150.0","9001","9102","8901","","","","","1995-12-02 00:00:00","Dept. of Lands and Surveys Technical Circular 1973/32; 23 Nov 1973.","EPSG","Supersedes North and South Island National Grids.","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_1048[] = {"19919","Qatar National Grid","","","","Qatar.","9807","24.27","51.13","","","0.99999","200000.0","300000.0","9001","9110","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_1049[] = {"19920","Singapore Grid","","","","Singapore.","9806","1.1715528","103.5110808","","","","30000.0","30000.0","9001","9110","8901","","","","","1995-12-02 00:00:00","","EPSG","","95.30  96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_1050[] = {"19921","Spain","","","","Spain.","9801","40.0","0.0","","","0.9988085293","600000.0","600000.0","9001","9102","8905","","","","","1995-12-02 00:00:00","","EPSG","Superseded by UTM","95.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_1051[] = {"19922","Swiss New Grid","LV03","","","Liechtenstein;  Switzerland.","9815","46.570866","7.26225","90.0","90.0","1.0","600000.0","200000.0","9001","9110","8901","","","","","1997-11-13 00:00:00","\"Die Projektionen der schweizerischen Plan- und Kartenwerke\"; J. Bolliger 1967","EPSG","","95.30  96.29  97.27  97.612  97.62",NULL};
-datafile_rows_t trf_nonpolynomial_row_1052[] = {"19923","Swiss Old Grid","LV03C","","","Liechtenstein;  Switzerland.","9815","46.570866","0.0","90.0","90.0","1.0","0.0","0.0","9001","9110","8907","","","","","1997-11-13 00:00:00","\"Die Projektionen der schweizerischen Plan- und Kartenwerke\"; J. Bolliger 1967","EPSG","Superseded by LV03 (19922).","95.30  96.29  97.612  97.62",NULL};
-datafile_rows_t trf_nonpolynomial_row_1053[] = {"19924","Tobago Grid","","","","Trinidad and Tobago - Tobago.","9806","11.1507843","-60.4109632","","","","187500.0","180000.0","9039","9110","8901","","","","","1999-10-20 00:00:00","","EPSG","","95.30  96.29  97.231",NULL};
-datafile_rows_t trf_nonpolynomial_row_1054[] = {"19925","Trinidad Grid","","","","Trinidad and Tobago - Trinidad.","9806","10.263","-61.2","","","","430000.0","325000.0","9039","9110","8901","","","","","1999-10-20 00:00:00","","EPSG","","95.30  96.29  97.231",NULL};
-datafile_rows_t trf_nonpolynomial_row_1055[] = {"19926","Stereo 70","","","","Romania.","9809","46.0","25.0","","","0.99975","500000.0","500000.0","9001","9102","8901","","","","","1996-04-12 00:00:00","","EPSG","Supersedes Stereo 33 (code 19927).","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1056[] = {"19927","Stereo 33","","","","Romania.","9809","45.54","25.23328772","","","0.9996667","500000.0","500000.0","9001","9110","8901","","","","","1996-04-12 00:00:00","","EPSG","Superseded by Stereo 70 (code 19926)","96.29",NULL};
-datafile_rows_t trf_nonpolynomial_row_1057[] = {"19928","Kuwait TM","KTM","","","Kuwait - Kuwait City.","9807","0.0","48.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1996-04-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1058[] = {"19929","Swedish National Projection","2.5 gon West","","","Sweden.","9807","0.0","15.48298","","","1.0","1500000.0","0.0","9001","9110","8901","","","","","1997-11-13 00:00:00","Lantmateriet of Sweden; private communication.","EPSG","Used since 1938 superseding 6 old zones.  Longitude of natural origin is 2.5 gon west of Stockholm prime meridian; transformation is also known as \"2.5 gon West of old Stockholm observatory\".","96.29  97.39",NULL};
-datafile_rows_t trf_nonpolynomial_row_1059[] = {"19930","Greek Grid","","","","Greece","9807","0.0","24.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1997-06-16 00:00:00","Geodesy Department; Public Petroleum Corporation of Greece.","EPSG","Created for use with GGRS87.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1060[] = {"19931","Egyseges Orszagos Vetuleti","EOV","","","Hungary","9815","47.08398174","19.02548584","90.0","90.0","0.99993","650000.0","200000.0","9001","9110","8901","","","","","1997-07-22 00:00:00","http://lazarus.elte.hu/gb/geodez/geod2.htm","EPSG","EOV = Uniform National Projection","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1061[] = {"19933","Prince Edward Island Stereographic","PEI Stereographic","","","Canada - Prince Edward Island","9809","47.15","-63.0","","","0.999912","700000.0","400000.0","9001","9110","8901","","","","","1997-11-13 00:00:00","Geomatics Centre; Nova Scotia Ministry of Housing and Municipal Affairs.","EPSG","In use from 1979.  To be phased out in late 1990's.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1062[] = {"19934","Lithuania 1994","","","","Lithuania","9807","0.0","24.0","","","0.9998","500000.0","0.0","9001","9102","8901","","","","","1998-03-12 00:00:00","HNIT-BALTIC GeoInfoServisas","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1063[] = {"19935","Rectified Skew Orthomorphic Malaya Grid","R.S.O. Malaya","","","Malaysia - West Malaysia","9812","4.0","102.15","323.01328458","323.07483685","0.99984","40000.0","0.0","9062","9110","8901","","","","","1999-10-20 00:00:00","UK Directorate of Overseas Surveys paper","EPSG","","97.231",NULL};
-datafile_rows_t trf_nonpolynomial_row_1064[] = {"19936","Portuguese National Grid","","","","Portugal onshore.","9807","39.4","1.0","","","1.0","200000.0","300000.0","9001","9110","8902","","","","","1998-11-11 00:00:00","","EPSG","Original transformation by Gauss-Kruger formula.","95.30  96.29  98.42",NULL};
-datafile_rows_t trf_nonpolynomial_row_1065[] = {"19937","Tunisia Mining Grid","","","","Tunisia - onshore","9816","38.81973","7.83445","","","","270.0","582.0","9036","9105","8903","","","","","1999-11-15 00:00:00","Mining decree of 1st January 1953","EPSG","Origin: Djebel Kebar","99.81",NULL};
-datafile_rows_t trf_nonpolynomial_row_1066[] = {"19938","Estonian National Grid","","","","Estonia","9802","57.310319415","24.0","59.2","58.0","","500000.0","6375000.0","9001","9110","8901","","","","","1999-04-22 00:00:00","http://www.geo.ut.ee/~raivo/estcoord.html","EPSG","Coordinates at the projection origin match those of TM Baltic 93.","99.28",NULL};
-datafile_rows_t trf_nonpolynomial_row_1067[] = {"19939","TM Baltic 93","","","","Estonia; Latvia; Lithuania.","9807","0.0","24.0","","","0.9996","500000.0","0.0","9001","9102","8901","","","","","1998-12-14 00:00:00","http://www.geo.ut.ee/~raivo/estcoord.html","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1068[] = {"19940","Levant Zone","","","","Syrian Arab Republic west of 39 deg E.","9817","34.39","37.21","","","0.9996256","300000.0","300000.0","9001","9110","8901","","","","","1999-04-22 00:00:00","US Army Map Service projection tables; 1943.","EPSG","Superseded by projection using full Lambert formula from 1973. (EPSG code 19948).","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1069[] = {"19941","Brazil Polyconic","","","","Brazil","9818","0.0","-54.0","","","","5000000.0","10000000.0","9001","9102","8901","","","","","1999-10-20 00:00:00","PetroBras","EPSG","","99.55",NULL};
-datafile_rows_t trf_nonpolynomial_row_1070[] = {"19942","British West Indies Grid","","","","Windward Islands - Dominica  Grenada  Saint Lucia  Saint Vincent;  Leeward Islands - Anguilla   Antigua (excluding Barbuda)  Montserrat   Saint Kitts and Nevis; Barbados.","9807","0.0","-62.0","","","0.9995","400000.0","0.0","9001","9102","8901","","","","","1999-04-22 00:00:00","UK Royal Engineers projection tables P10/25, 1943.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1071[] = {"19943","Barbados National Grid","","","","Barbados","9807","13.1035","-59.3335","","","0.9999986","30000.0","75000.0","9001","9110","8901","","","","","1999-04-22 00:00:00","Ordnance Survey of Great Britain","EPSG","Superseded British West Indies Grid (19942) after 1983.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1072[] = {"19944","Quebec Lambert Projection","","","","Canada - Quebec","9802","44.0","-68.3","60.0","46.0","","0.0","0.0","9001","9110","8901","","","","","1999-10-22 00:00:00","Service de la Cartographie; Minist�re des Ressources Naturelles; Quebec","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1073[] = {"19945","New Brunswick Stereographic (ATS77)","NB Stereographic ATS77","","","Canada - New Brunswick - onshore","9809","46.3","-66.3","","","0.999912","300000.0","800000.0","9001","9110","8901","","","","","1999-10-20 00:00:00","New Brunswick Geographic Information Corporation land and water information standards manual.","EPSG","In use from 1979.  To be phased out in late 1990's.","99.61",NULL};
-datafile_rows_t trf_nonpolynomial_row_1074[] = {"19946","New Brunswick Stereographic (NAD83)","NB Stereographic NAD83","","","Canada - New Brunswick - onshore","9809","46.3","-66.3","","","0.999912","2500000.0","7500000.0","9001","9110","8901","","","","","1999-10-20 00:00:00","New Brunswick Geographic Information Corporation land and water information standards manual.","EPSG","In use from 1999.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1075[] = {"19947","Austria Lambert","","","","Austria","9802","13.2","47.3","49.0","46.0","","400000.0","400000.0","9001","9110","8901","","","","","1999-10-20 00:00:00","Bundesamt f�r Eich- und Vermessungswesen","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1076[] = {"19948","Syria Lambert","","","","Syrian Arab Republic","9801","34.39","37.21","","","0.9996256","300000.0","300000.0","9001","9110","8901","","","","","1999-10-20 00:00:00","IGN Paris","EPSG","Superseded Levant zone (same parameters but using truncated near-conformal method) from 1973.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1077[] = {"19949","Levant Stereographic","","","","Lebanon","9809","38.0","43.5","","","0.9995341","0.0","0.0","9001","9105","8901","","","","","1999-10-20 00:00:00","IGN Paris","EPSG","Used prior to World War II for cadastral and large scale topographic mapping.","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1078[] = {"19950","Landesvermessung 1995","LV95","","","Liechtenstein;  Switzerland.","9815","46.570866","7.26225","90.0","90.0","1.0","2600000.0","1200000.0","9001","9110","8901","","","","","1999-10-20 00:00:00","Bundesamt f�r Landestopographie.  Aufbau der Landesvermessung der Schweiz 'LV95' Teil 3: Terrestrische Bezugssysteme und Bezugsrahmen. L+T 1999.","EPSG","","",NULL};
-datafile_rows_t trf_nonpolynomial_row_1079[] = {"19951","Nakhl e Taqi Oblique Mercator","Nakhl e Taqi","","","Iran - Taheri refinery site only.","9815","27.31077837","52.3612741","0.34179803","0.34179803","0.999895934","658377.437","3044969.194","9001","9110","8901","","","","","1999-10-20 00:00:00","Total-Fina","EPSG","Used only for terminal site.","",NULL};
-
-datafile_rows_t *trf_nonpolynomial_rows[] = {trf_nonpolynomial_row_1,trf_nonpolynomial_row_2,trf_nonpolynomial_row_3,trf_nonpolynomial_row_4,trf_nonpolynomial_row_5,trf_nonpolynomial_row_6,trf_nonpolynomial_row_7,trf_nonpolynomial_row_8,trf_nonpolynomial_row_9,trf_nonpolynomial_row_10,trf_nonpolynomial_row_11,trf_nonpolynomial_row_12,trf_nonpolynomial_row_13,trf_nonpolynomial_row_14,trf_nonpolynomial_row_15,trf_nonpolynomial_row_16,trf_nonpolynomial_row_17,trf_nonpolynomial_row_18,trf_no [...]
diff --git a/src/tiff/csv/trf_nonpolynomial.csv b/src/tiff/csv/trf_nonpolynomial.csv
deleted file mode 100644
index 17ad8e6..0000000
--- a/src/tiff/csv/trf_nonpolynomial.csv
+++ /dev/null
@@ -1,1079 +0,0 @@
-"COORD_TRF_CODE","COORD_TRF_EPSG_NAME","COORD_TRF_EPSG_ABBR","COORD_TRF_USER_NAME","DESCRIPTION","AREA_OF_USE","COORD_TRF_METHOD_CODE","PARAMETER_1","PARAMETER_2","PARAMETER_3","PARAMETER_4","PARAMETER_5","PARAMETER_6","PARAMETER_7","UOM_LENGTH_CODE","UOM_ANGLE_CODE","PRIME_MERIDIAN_CODE","UOM_SCALE_CODE","PARAMETER_35","PARAMETER_36","PARAMETER_37","REVISION_DATE","INFORMATION_SOURCE","DATA_SOURCE","REMARKS","CHANGE_ID"
-1100,Adindan to WGS 84 (1),,,,MEAN FOR Ethiopia; Sudan.,9603,-166.0,-15.0,204.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1101,Adindan to WGS 84 (2),,,,Burkina Faso.,9603,-118.0,-14.0,218.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1102,Adindan to WGS 84 (3),,,,Cameroon.,9603,-134.0,-2.0,210.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1103,Adindan to WGS 84 (4),,,,Ethiopia.,9603,-165.0,-11.0,206.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1104,Adindan to WGS 84 (5),,,,Mali.,9603,-123.0,-20.0,220.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1105,Adindan to WGS 84 (6),,,,Senegal.,9603,-128.0,-18.0,224.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1106,Adindan to WGS 84 (7),,,,Sudan.,9603,-161.0,-14.0,205.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1107,Afgooye to WGS 84 (1),,,,Somalia.,9603,-43.0,-163.0,45.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1108,AGD66 to WGS 84 (1),,,,Australia.,9603,-133.0,-48.0,148.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1109,AGD84 to WGS 84 (1),,,,Australia.,9603,-134.0,-48.0,149.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1110,Ain el Abd to WGS 84 (1),,,,Bahrain.,9603,-150.0,-250.0,-1.0,,,,,9001,,,,,,,1997-04-11 00:00:00,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,,97.06
-1111,Ain el Abd to WGS 84 (2),,,,Saudi Arabia.,9603,-143.0,-236.0,7.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,,
-1112,Amersfoort to WGS 84 (1),,,,Netherlands.,9606,593.16,26.15,478.54,-6.3239,-0.5008,-5.5487,4.0775,9001,9109,,9202,,,,1997-04-11 00:00:00,Nederlandse Commissie voor Geodesie publication 30; 1993.,EPSG,,97.07
-1113,Arc 1950 to WGS 84 (1),,,,MEAN FOR Botswana; Lesotho; Malawi; Swaziland; Zaire; Zambia; Zimbabwe.,9603,-143.0,-90.0,-294.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1114,Arc 1950 to WGS 84 (2),,,,Botswana.,9603,-138.0,-105.0,-289.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1115,Arc 1950 to WGS 84 (3),,,,Burundi.,9603,-153.0,-5.0,-292.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1116,Arc 1950 to WGS 84 (4),,,,Lesotho.,9603,-125.0,-108.0,-295.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1117,Arc 1950 to WGS 84 (5),,,,Malawi.,9603,-161.0,-73.0,-317.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1118,Arc 1950 to WGS 84 (6),,,,Swaziland.,9603,-134.0,-105.0,-295.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1119,Arc 1950 to WGS 84 (7),,,,Zaire.,9603,-169.0,-19.0,-278.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1120,Arc 1950 to WGS 84 (8),,,,Zambia.,9603,-147.0,-74.0,-283.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1121,Arc 1950 to WGS 84 (9),,,,Zimbabwe.,9603,-142.0,-96.0,-293.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1122,Arc 1960 to WGS 84 (1),,,,MEAN FOR Kenya; Tanzania.,9603,-160.0,-6.0,-302.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,,
-1123,Batavia to WGS 84 (1),,,,Indonesia (Sumatra).,9603,-377.0,681.0,-50.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1124,Bermuda 1957 to WGS 84 (1),,,,Bermuda.,9603,-73.0,213.0,296.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1125,Bogota to WGS 84 (1),,,,Colombia.,9603,307.0,304.0,-318.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1126,Bukit Rimpah to WGS 84 (1),,,,Indonesia (Bangka & Belitung Islands).,9603,-384.0,664.0,-48.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1127,Campo Inchauspe to WGS 84 (1),,,,Argentina.,9603,-148.0,136.0,90.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1128,Cape to WGS 84 (1),,,,South Africa.,9603,-136.0,-108.0,-292.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1129,Cape to WGS 84 (2),,,,South Africa.,9603,-134.73,-110.92,-292.66,,,,,9001,,,,,,,1996-10-18 00:00:00,"Private Communication, Directorate of Surveys and Land Information, Cape Town.",EPSG,,
-1130,Carthage to WGS 84 (1),,,,Tunisia.,9603,-263.0,6.0,431.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1131,Chua to WGS 84 (1),,,,Paraguay.,9603,-134.0,229.0,-29.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1132,Corrego Alegre to WGS 84 (1),,,,Brazil.,9603,-206.0,172.0,-6.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1133,ED50 to WGS 84 (1),,,,MEAN FOR Austria; Belgium; Denmark; Finland;  France; Germany (west); Gibraltar; Greece;  Italy; Luxembourg; Netherlands; Norway;  Portugal; Spain; Sweden; Switzerland.,9603,-87.0,-98.0,-121.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,97.02
-1134,ED50 to WGS 84 (2),,,,MEAN FOR Austria; Denmark; France; Germany (west); Netherlands; Switzerland.,9603,-87.0,-96.0,-120.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1135,ED50 to WGS 84 (3),,,,MEAN FOR Iraq; Israel; Jordan; Lebanon;  Kuwait; Saudi Arabia; Syria.,9603,-103.0,-106.0,-141.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,,
-1136,ED50 to WGS 84 (4),,,,Cyprus.,9603,-104.0,-101.0,-140.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1137,ED50 to WGS 84 (5),,,,Egypt.,9603,-130.0,-117.0,-151.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1138,ED50 to WGS 84 (6),,,,Ireland; United Kingdom (UK).,9603,-86.0,-96.0,-120.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1139,ED50 to WGS 84 (7),,,,Finland; Norway.,9603,-87.0,-95.0,-120.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1140,ED50 to WGS 84 (8),,,,Greece.,9603,-84.0,-95.0,-130.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1141,ED50 to WGS 84 (9),,,,Iran.,9603,-117.0,-132.0,-164.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1142,ED50 to WGS 84 (10),,,,Italy (Sardinia).,9603,-97.0,-103.0,-120.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1143,ED50 to WGS 84 (11),,,,Italy (Sicily).,9603,-97.0,-88.0,-135.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1144,ED50 to WGS 84 (12),,,,Malta.,9603,-107.0,-88.0,-149.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,,
-1145,ED50 to WGS 84 (13),,,,Portugal; Spain.,9603,-84.0,-107.0,-120.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,,
-1146,ED87 to WGS 84 (1),,,,Denmark - North Sea;  Germany - North Sea;  Netherlands - offshore;  Norway; United Kingdom (UKCS) - North Sea south of 62 deg N.,9606,-82.981,-99.719,-110.709,-0.5076,0.1503,0.3898,-0.3143,9001,9109,,9202,,,,1997-04-11 00:00:00,"Norwegian Mapping Authority publication 1990:1 and note of 13-Feb-1991 \"Om Transformasjon mellom Geodetiske Datum i Norge\"",EPSG,,97.03  97.04
-1147,ED50 to ED87 (2),,,,Norway - offshore north of 65 deg N.,9606,-1.51,-0.84,-3.5,-1.893,-0.687,-2.764,0.609,9001,9109,,9202,,,,1997-04-11 00:00:00,"Norwegian Mapping Authority note of 13-Feb-1991 \"Om Transformasjon mellom Geodetiske Datum i Norge\"",EPSG,,97.04
-1148,Egypt 1907 to WGS 84 (1),,,,Egypt.,9603,-130.0,110.0,-13.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1149,ETRF89 to WGS 84 (1),,,,Europe.,9603,0.0,0.0,0.0,,,,,9001,,,,,,,1997-06-16 00:00:00,EPSG,EPSG,ETRF89 is a realisation of WGS84 coincident to within 1.5 metres.  This transformation has an accuracy equal to the coincidence figure.,97.24
-1150,GDA94 to WGS 84 (1),,,,Australia.,9603,0.0,0.0,0.0,,,,,9001,,,,,,,1996-10-18 00:00:00,EPSG,EPSG,GDA94 is a realisation of WGS84 coincident to within 1.5 metres.  This transformation has an accuracy equal to the coincidence figure.,
-1151,GD49 to WGS 84 (1),,,,New Zealand.,9603,84.0,-22.0,209.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1152,Hu Tzu Shan to WGS 84 (1),,,,Taiwan.,9603,-637.0,-549.0,-203.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,,
-1153,Indian 1954 to WGS 84 (1),,,,Thailand.,9603,217.0,823.0,299.0,,,,,9001,,,,,,,1997-04-11 00:00:00,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,,97.06
-1154,Indian 1975 to WGS 84 (1),,,,Thailand.,9603,209.0,818.0,290.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 second edition September 1991,EPSG,,
-1155,Kalianpur 1937 to WGS 84 (1),,,,Bangladesh.,9603,282.0,726.0,254.0,,,,,9001,,,,,,,1999-10-20 00:00:00,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,,97.235
-1156,Kalianpur 1975 to WGS 84 (1),,,,India; Nepal.,9603,295.0,736.0,257.0,,,,,9001,,,,,,,1999-10-20 00:00:00,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,Care!  DMA ellipsoid is inconsistent with EPSG ellipsoid - transformation parameter values may not be appropriate.,97.235
-1157,Kandawala to WGS 84 (1),,,,Sri Lanka.,9603,-97.0,787.0,86.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1158,Kertau to WGS 84 (1),,,,Malaysia - West Malaysia; Singapore.,9603,-11.0,851.0,5.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1159,Leigon to WGS 84 (1),,,,Ghana.,9603,-130.0,29.0,364.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,,
-1160,Liberia 1964 to WGS 84 (1),,,,Liberia.,9603,-90.0,40.0,88.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1161,Luzon 1911 to WGS 84 (1),,,,Philippines (excluding Mindanao).,9603,-133.0,-77.0,-51.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1162,Luzon 1911 to WGS 84 (2),,,,Philippines (Mindanao).,9603,-133.0,-79.0,-72.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1163,M'poraloko to WGS 84 (1),,,,Gabon.,9603,-74.0,-130.0,42.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,,
-1164,Mahe 1971 to WGS 84 (1),,,,Seychelles - Mahe Island.,9603,41.0,-220.0,-134.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1165,Massawa to WGS 84 (1),,,,Ethiopia (Eritrea).,9603,639.0,405.0,60.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1166,Merchich to WGS 84 (1),,,,Morocco.,9603,31.0,146.0,47.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1167,Minna to WGS 84 (1),,,,Cameroon.,9603,-81.0,-84.0,115.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,,
-1168,Minna to WGS 84 (2),,,,Nigeria.,9603,-92.0,-93.0,122.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1169,Monte Mario to WGS 84 (1),,,,Italy (Sardinia).,9603,-225.0,-65.0,9.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1170,NAD27 to WGS 84 (1),,,,MEAN FOR Antigua; Barbados; Barbuda;  Caicos Islands; Cuba; Dominican Republic;  Grand Cayman; Jamaica; Turks Islands.,9603,-3.0,142.0,183.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1171,NAD27 to WGS 84 (2),,,,MEAN FOR Belize; Costa Rica; El Salvador;  Guatemala; Honduras; Nicaragua.,9603,0.0,125.0,194.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1172,NAD27 to WGS 84 (3),,,,MEAN FOR Canada.,9603,-10.0,158.0,187.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1173,NAD27 to WGS 84 (4),,,,MEAN FOR United States (USA) (CONUS).,9603,-8.0,160.0,176.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1174,NAD27 to WGS 84 (5),,,,MEAN FOR United States (USA) (CONUS East of Mississippi River  including Louisiana; Missouri; Minnesota).,9603,-9.0,161.0,179.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1175,NAD27 to WGS 84 (6),,,,MEAN FOR United States (USA) (CONUS West of Mississippi River).,9603,-8.0,159.0,175.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1176,NAD27 to WGS 84 (7),,,,United States (USA) - Alaska (Excluding Aleutian Islands).,9603,-5.0,135.0,172.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1177,NAD27 to WGS 84 (8),,,,Bahamas (Except San Salvador Island).,9603,-4.0,154.0,178.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1178,NAD27 to WGS 84 (9),,,,Bahamas (San Salvador Island).,9603,1.0,140.0,165.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1179,NAD27 to WGS 84 (10),,,,Canada (Alberta; British Columbia).,9603,-7.0,162.0,188.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1180,NAD27 to WGS 84 (11),,,,Canada (Manitoba; Ontario).,9603,-9.0,157.0,184.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1181,NAD27 to WGS 84 (12),,,,Canada (New Brunswick; Newfoundland; Nova Scotia; Quebec).,9603,-22.0,160.0,190.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1182,NAD27 to WGS 84 (13),,,,Canada (Northwest Territories; Nunavut; Saskatchewan).,9603,4.0,159.0,188.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1183,NAD27 to WGS 84 (14),,,,Canada (Yukon).,9603,-7.0,139.0,181.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1184,NAD27 to WGS 84 (15),,,,Panama - Canal Zone.,9603,0.0,125.0,201.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1185,NAD27 to WGS 84 (16),,,,Cuba.,9603,-9.0,152.0,178.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1186,NAD27 to WGS 84 (17),,,,Greenland (Hayes Peninsula).,9603,11.0,114.0,195.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1187,NAD27 to WGS 84 (18),,,,Mexico.,9603,-12.0,130.0,190.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1188,NAD83 to WGS 84 (1),,,,Canada; Central America; Mexico; United States (USA) (Alaska (excluding Aleutian Islands); CONUS).,9603,0.0,0.0,0.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,NAD83 is a realisation of WGS84 coincident to within 1.5 metres.  This transformation has an accuracy equal to the coincidence figure.,97.06
-1189,Nahrwan 1967 to WGS 84 (1),,,,Oman (Masirah Island).,9603,-247.0,-148.0,369.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1190,Nahrwan 1967 to WGS 84 (2),,,,Saudi Arabia.,9603,-243.0,-192.0,477.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,,
-1191,Nahrwan 1967 to WGS 84 (3),,,,United Arab Emirates (UAE).,9603,-249.0,-156.0,381.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1192,Naparima 1972 to WGS 84 (1),,,,Trinidad and Tobago.,9603,-10.0,375.0,165.0,,,,,9001,,,,,,,1998-06-30 00:00:00,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,CAUTION: EPSG believes that these parameter values include a blunder and that if NIMA transformation parameters are to be used the 1987 version (EPSG code 1307) be used.,98.102
-1193,NTF to WGS 84 (1),,,,France.,9603,-168.0,-60.0,320.0,,,,,9001,,,,,,,1996-10-18 00:00:00,IGN technical report RT/G 14; January 1988.,EPSG,,
-1195,OSGB 1936 to WGS 84 (1),,,,MEAN FOR United Kingdom (UK) - Great Britain (England; Scotland; Wales); Isle of Man.,9603,375.0,-111.0,431.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1196,OSGB 1936 to WGS 84 (2),,,,United Kingdom (UK) - England.,9603,371.0,-112.0,434.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1197,OSGB 1936 to WGS 84 (3),,,,United Kingdom (UK) - England; Wales; Isle of Man.,9603,371.0,-111.0,434.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1198,OSGB 1936 to WGS 84 (4),,,,United Kingdom (UK) - Scotland (including Shetland Islands).,9603,384.0,-111.0,425.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1199,OSGB 1936 to WGS 84 (5),,,,United Kingdom (UK) - Wales.,9603,370.0,-108.0,434.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1200,Pointe Noire to WGS 84 (1),,,,Congo.,9603,-148.0,51.0,-291.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,,
-1201,PSAD56 to WGS 84 (1),,,,MEAN FOR Bolivia; Chile; Colombia;  Ecuador; Guyana; Peru; Venezuela.,9603,-288.0,175.0,-376.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1202,PSAD56 to WGS 84 (2),,,,Bolivia.,9603,-270.0,188.0,-388.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1203,PSAD56 to WGS 84 (3),,,,Chile (Northern; near 19 deg S).,9603,-270.0,183.0,-390.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1204,PSAD56 to WGS 84 (4),,,,Chile (Southern; near 43 deg S).,9603,-305.0,243.0,-442.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1205,PSAD56 to WGS 84 (5),,,,Colombia.,9603,-282.0,169.0,-371.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1206,PSAD56 to WGS 84 (6),,,,Ecuador.,9603,-278.0,171.0,-367.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1207,PSAD56 to WGS 84 (7),,,,Guyana.,9603,-298.0,159.0,-369.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1208,PSAD56 to WGS 84 (8),,,,Peru.,9603,-279.0,175.0,-379.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1209,PSAD56 to WGS 84 (9),,,,Venezuela.,9603,-295.0,173.0,-371.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1210,Qatar to WGS 84 (1),,,,Qatar.,9603,-128.0,-283.0,22.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1211,Qornoq to WGS 84 (1),,,,Greenland (South).,9603,164.0,138.0,-189.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1212,SAD69 to WGS 84 (1),,,,MEAN FOR Argentina; Bolivia; Brazil; Chile;  Colombia; Ecuador; Guyana; Paraguay;  Peru; Trinidad & Tobago; Venezuela.,9603,-57.0,1.0,-41.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1213,SAD69 to WGS 84 (2),,,,Argentina.,9603,-62.0,-1.0,-37.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1214,SAD69 to WGS 84 (3),,,,Bolivia.,9603,-61.0,2.0,-48.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1215,SAD69 to WGS 84 (4),,,,Brazil.,9603,-60.0,-2.0,-41.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1216,SAD69 to WGS 84 (5),,,,Chile.,9603,-75.0,-1.0,-44.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1217,SAD69 to WGS 84 (6),,,,Colombia.,9603,-44.0,6.0,-36.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1218,SAD69 to WGS 84 (7),,,,Ecuador.,9603,-48.0,3.0,-44.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1219,SAD69 to WGS 84 (8),,,,Ecuador (Baltra; Galapagos).,9603,-47.0,26.0,-42.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1220,SAD69 to WGS 84 (9),,,,Guyana.,9603,-53.0,3.0,-47.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1221,SAD69 to WGS 84 (10),,,,Paraguay.,9603,-61.0,2.0,-33.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1222,SAD69 to WGS 84 (11),,,,Peru.,9603,-58.0,0.0,-44.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1223,SAD69 to WGS 84 (12),,,,Trinidad and Tobago.,9603,-45.0,12.0,-33.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1224,SAD69 to WGS 84 (13),,,,Venezuela.,9603,-45.0,8.0,-33.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1225,Sapper Hill 1943 to WGS 84 (1),,,,Falkland Islands - East Falkland Island.,9603,-355.0,21.0,72.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,,
-1226,Schwarzeck to WGS 84 (1),,,,Namibia.,9603,616.0,97.0,-251.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1227,Tananarive to WGS 84 (1),,,,Madagascar.,9603,-189.0,-242.0,-91.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1228,Timbalai 1948 to WGS 84 (1),,,,Brunei; Malaysia (Sabah; Sarawak).,9603,-679.0,669.0,-48.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1229,TM65 to WGS 84 (1),,,,Ireland.,9603,506.0,-122.0,611.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1230,Tokyo to WGS 84 (1),,,,MEAN FOR Japan; South Korea; Okinawa.,9603,-148.0,507.0,685.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,,97.06
-1231,Tokyo to WGS 84 (2),,,,Japan.,9603,-148.0,507.0,685.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,,
-1232,Tokyo to WGS 84 (3),,,,South Korea.,9603,-146.0,507.0,687.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,,97.06
-1233,Tokyo to WGS 84 (4),,,,Japan (Okinawa).,9603,-158.0,507.0,676.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,,
-1234,Yacare to WGS 84 (1),,,,Uruguay.,9603,-155.0,171.0,37.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1235,Zanderij to WGS 84 (1),,,,Suriname.,9603,-265.0,120.0,-358.0,,,,,9001,,,,,,,1996-10-18 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,,
-1236,AGD84 to WGS 84 (2),,,,Australia.,9607,-116.0,-50.47,141.69,-0.23,-0.39,-0.344,0.0983,9001,9104,,9202,,,,1997-11-13 00:00:00,Australian Surveying and Land Information Group - www.auslig.gov.au/geodesy,EPSG,Superseded by AGD84 to GDA94 (2) (code 1280).,
-1237,WGS 72 to WGS 84 (1),,,,World.,9606,0.0,0.0,4.5,0.0,0.0,0.554,0.2263,9001,9104,,9202,,,,1996-12-12 00:00:00,,EPSG,,
-1238,WGS 72 to WGS 84 (2),,,,World.,9606,0.0,0.0,4.5,0.0,0.0,0.554,0.219,9001,9104,,9202,,,,1996-12-12 00:00:00,,EPSG,,
-1239,WGS 72BE to WGS 72 (1),,,,World.,9606,0.0,0.0,-2.6,0.0,0.0,0.26,-0.6063,9001,9104,,9202,,,,1996-12-12 00:00:00,,EPSG,,
-1240,WGS 72BE to WGS 84 (1),,,,World.,9606,0.0,0.0,1.9,0.0,0.0,0.814,-0.38,9001,9104,,9202,,,,1996-12-12 00:00:00,,EPSG,,
-1241,NAD27 to NAD83 (1),,,,United States (USA) - lower 48 states including EEZ.,9613,,,,,,,,,9104,,,conus.las,conus.los,,1999-04-22 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov,EPSG,Uses NADCON method which expects longitudes positive west; EPSG GeogCS NAD27 (code 4267) and NAD83 (code 4269) have longitudes positive east.,98.201  98.53
-1243,NAD27 to NAD83 (2),,,,United States (USA) - Alaska including EEZ.,9613,,,,,,,,,9104,,,alaska.las,alaska.los,,1999-04-22 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov,EPSG,Uses NADCON method which expects longitudes positive west; EPSG GeogCS NAD27 (code 4267) and NAD83 (code 4269) have longitudes positive east.,98.201  98.53
-1245,ED50 to WGS 84 (16),,,,Tunisia.,9603,-112.0,-77.0,-145.0,,,,,9001,,,,,,,1998-04-16 00:00:00,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,,98.11
-1246,Herat North to WGS 84 (1),,,,Afghanistan.,9603,-333.0,-222.0,114.0,,,,,9001,,,,,,,1997-04-11 00:00:00,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,,
-1247,Kalianpur 1962 to WGS 84 (1),,,,Pakistan.,9603,283.0,682.0,231.0,,,,,9001,,,,,,,1999-10-20 00:00:00,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,Care!  DMA ellipsoid is inconsistent with EPSG ellipsoid - transformation parameter values may not be appropriate.,97.235
-1248,ID74 to WGS 84 (1),,,,Indonesia.,9603,-24.0,-15.0,5.0,,,,,9001,,,,,,,1997-04-11 00:00:00,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,,
-1249,NAD27 to WGS 84 (21),,,,United States (USA) - Alaska - Aleutian Islands east of 180 deg.,9603,-2.0,152.0,149.0,,,,,9001,,,,,,,1997-04-11 00:00:00,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,,
-1250,NAD27 to WGS 84 (22),,,,United States (USA) - Alaska - Aleutian Islands west of 180 deg.,9603,2.0,204.0,105.0,,,,,9001,,,,,,,1997-04-11 00:00:00,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,,
-1251,NAD83 to WGS 84 (2),,,,United States (USA) - Alaska - Aleutian Islands.,9603,-2.0,0.0,4.0,,,,,9001,,,,,,,1997-04-11 00:00:00,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,,
-1252,NAD83 to WGS 84 (3),,,,United States (USA) - Hawaii.,9603,1.0,1.0,-1.0,,,,,9001,,,,,,,1997-04-11 00:00:00,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,,
-1253,Nord Sahara 1959 to WGS 84 (1),,,,Algeria.,9603,-186.0,-93.0,310.0,,,,,9001,,,,,,,1997-04-11 00:00:00,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,,
-1254,Pulkovo 1942 to WGS 84 (1),,,,Russia.,9603,28.0,-130.0,-95.0,,,,,9001,,,,,,,1997-04-11 00:00:00,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,,
-1255,Voirol Unifie to WGS 84 (1),,,,Algeria - north of 35g (31 deg 30 min) North.,9603,-123.0,-206.0,219.0,,,,,9001,,,,,,,1998-06-30 00:00:00,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,CAUTION:   EPSG believes that the data used in the derivation of these parameters contains a blunder.  We recommend using transformation 1253 [North Sahara 1959 to WGS84 (1)] as Voirol 1960 geographical coordinates are the same as Nord Sahara 1959 geogs.,98.15
-1256,Fahud to WGS 84 (1),,,,Oman.,9603,-346.0,-1.0,224.0,,,,,9001,,,,,,,1997-04-11 00:00:00,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,,
-1257,Bern 1898 (Bern) to Bern 1898,,,,Liechtenstein;  Switzerland.,9601,7.26225,,,,,,,,9110,,,,,,1999-11-12 00:00:00,EPSG,EPSG,Change of prime meridian.,99.79
-1258,Bogota (Bogota) to Bogota,,,,Colombia.,9601,-74.04513,,,,,,,,9110,,,,,,1999-11-12 00:00:00,EPSG,EPSG,Change of prime meridian.,99.79
-1259,Lisbon (Lisbon) to Lisbon,,,,Portugal - onshore.,9601,-9.0754862,,,,,,,,9110,,,,,,1999-11-12 00:00:00,EPSG,EPSG,Change of prime meridian.,99.79
-1260,Makassar (Jakarta) to Makassar,,,,Indonesia - south west Sulawesi.,9601,106.482779,,,,,,,,9110,,,,,,1999-11-12 00:00:00,EPSG,EPSG,Change of prime meridian.,99.79
-1261,MGI (Ferro) to MGI,,,,Austria.,9601,-17.4,,,,,,,,9110,,,,,,1999-11-12 00:00:00,EPSG,EPSG,Change of prime meridian.,99.79
-1262,Monte Mario (Rome) to Monte Mario,,,,Italy.,9601,12.27084,,,,,,,,9110,,,,,,1999-11-12 00:00:00,EPSG,EPSG,Change of prime meridian.,98.37  99.79
-1263,Padang (Jakarta) to Padang,,,,Indonesia - Sumatra.,9601,106.482779,,,,,,,,9110,,,,,,1999-11-12 00:00:00,EPSG,EPSG,Change of prime meridian.,99.79
-1264,Belge 1950 (Brussels) to Belge 1950,,,,Belgium - onshore.,9601,4.220471,,,,,,,,9110,,,,,,1999-11-12 00:00:00,EPSG,EPSG,Change of prime meridian.,99.79
-1265,Tananarive (Paris) to Tananarive,,,,Madagascar.,9601,2.5969213,,,,,,,,9105,,,,,,1999-11-12 00:00:00,EPSG,EPSG,Change of prime meridian.,99.79
-1266,Voirol 1875 (Paris) to Voirol 1875,,,,Algeria - north of 32 deg N.,9601,2.5969213,,,,,,,,9105,,,,,,1999-11-12 00:00:00,EPSG,EPSG,Change of prime meridian.,99.79
-1267,Voirol Unifie (Paris) to Voirol Unifie,,,,Algeria - north of 32 deg N.,9601,2.5969213,,,,,,,,9105,,,,,,1999-11-12 00:00:00,EPSG,EPSG,Change of prime meridian.,99.79
-1268,Batavia (Jakarta) to Batavia,,,,Indonesia - Java.,9601,106.482779,,,,,,,,9110,,,,,,1999-11-12 00:00:00,EPSG,EPSG,Change of prime meridian.,99.79
-1269,RT38 (Stockholm) to RT38,,,,Sweden.,9601,18.03298,,,,,,,,9110,,,,,,1999-11-12 00:00:00,EPSG,EPSG,Change of prime meridian.,99.79
-1270,Greek (Athens) to Greek,,,,Greece - onshore.,9601,23.4258815,,,,,,,,9110,,,,,,1999-11-12 00:00:00,Topography Department; National Technical University of Athens.,EPSG,Change of prime meridian.,99.79
-1271,Schwarzeck to WGS 84 (2),,,,Namibia.,9603,615.64,102.08,-255.81,,,,,9001,,,,,,,1997-11-13 00:00:00,Chief Directorate Surveys and Land Information; Mowbray; South Africa.,EPSG,Beware !   Schwarzeck CS uses German legal metres.  Example:  Schwarzeck Lat 19d 35m 46.952s S Long 20d 41m 50.649s E; X=5623409.40 Y=2124618.00 Z=-2125847.62 GLM; X=5623485.86 Y=2124646.89 Z=-2125876.53 m; WGS84 X=5624101.50 Y=2124748.97 Z=2126132.34 m.,97.48
-1272,GGRS87 to WGS 84 (1),,,,Greece.,9603,-199.87,74.79,246.62,,,,,9001,,,,,,,1997-06-16 00:00:00,Geodesy Department; Public Petroleum Corporation of Greece.,EPSG,,
-1273,HD72 to ETRF89 (1),,,,Hungary.,9607,-56.0,75.77,15.31,-0.37,-0.2,-0.21,-1.01,9001,9104,,9202,,,,1997-11-13 00:00:00,http://lazarus.elte.hu/gb/geodez/geod5.htm,EPSG,,97.47
-1274,Pulkovo 1942 to LKS94(ETRS89) (1),CS42 to LKS94 (1),,,Lithuania.,9607,-40.595,-18.55,-69.339,-2.508,-1.832,2.611,-4.299,9001,9104,,9202,,,,1998-03-12 00:00:00,HNIT-BALTIC GeoInfoServisas.,EPSG,,
-1275,ED50 to WGS 84 (17),,,,France.,9603,-84.0,-97.0,-117.0,,,,,9001,,,,,,,1998-04-16 00:00:00,IGN technical report 14 (January 1988).,EPSG,,98.11
-1276,NTF to ED50 (1),,,,France.,9603,-84.0,37.0,437.0,,,,,9001,,,,,,,1997-11-13 00:00:00,IGN technical report 7 (October 1981).,EPSG,,
-1277,NTF to WGS 72 (1),,,,France.,9603,-168.0,-72.0,314.0,,,,,9001,,,,,,,1997-11-13 00:00:00,IGN technical report 7 (October 1981).,EPSG,,
-1278,AGD66 to GDA94 (1),,,,Australia.,9603,-127.8,-52.3,152.9,,,,,9001,,,,,,,1997-11-13 00:00:00,http://www.anzlic.org.au/icsm/gdatm/molodens.htm,EPSG,5m accuracy.  Parameter values are given to greater precision but no better accuracy at http://www.dehaa.sa.gov.au/res_inform/sicom/where/geobas14.html,
-1279,AGD84 to GDA94 (1),,,,Australia.,9603,-128.5,-53.0,153.4,,,,,9001,,,,,,,1997-11-13 00:00:00,http://www.anzlic.org.au/icsm/gdatm/molodens.htm,EPSG,5m accuracy.  Parameter values are given to greater precision but no better accuracy at http://www.dehaa.sa.gov.au/res_inform/sicom/where/geobas14.html,
-1280,AGD84 to GDA94 (2),,,,Australia.,9607,-117.763,-51.51,139.061,-0.292,-0.443,-0.277,-0.191,9001,9104,,9202,,,,1997-11-13 00:00:00,http://www.anzlic.org.au/icsm/gdatm/simil.htm,EPSG,1m accuracy.  Supersedes AGD84 to WGS 84 (2) (code 1236).,
-1282,Samboja to WGS 84 (1),,,,Indonesia - east Kalimantan - Mahakam delta area.,9603,-404.78,-685.68,-45.47,,,,,9001,,,,,,,1997-11-13 00:00:00,Total Indonesia.,EPSG,Datum shift derived through ITRF93.,
-1283,LKS94(ETRS89) to WGS 84 (1),LKS94 to WGS 84 (1),,,Lithuania.,9603,0.0,0.0,0.0,,,,,9001,,,,,,,1998-03-12 00:00:00,HNIT-BALTIC GeoInfoServisas.,EPSG,LKS94 is a realisation of WGS84 coincident to within 1.5 metres.  This transformation has an accuracy equal to the coincidence figure.,98.13
-1284,Arc 1960 to WGS 84 (2),,,,Kenya.,9603,-157.0,-2.0,-299.0,,,,,9001,,,,,,,1998-03-12 00:00:00,U.S. National Imagery and Mapping Agency  TR8350.2 revision of October 1997; http://164.214.2.59/geospatial/products/GandG/tr83502b/toc.html,EPSG,,
-1285,Arc 1960 to WGS 84 (3),,,,Tanzania.,9603,-175.0,-23.0,-303.0,,,,,9001,,,,,,,1998-03-12 00:00:00,U.S. National Imagery and Mapping Agency  TR8350.2 revision of October 1997; http://164.214.2.59/geospatial/products/GandG/tr83502b/toc.html,EPSG,,
-1286,Segora to WGS 84 (1),,,,Indonesia - Kalimantan.,9603,-403.0,684.0,41.0,,,,,9001,,,,,,,1998-03-12 00:00:00,U.S. National Imagery and Mapping Agency  TR8350.2 revision of October 1997; http://164.214.2.59/geospatial/products/GandG/tr83502b/toc.html,EPSG,,
-1287,Pulkovo 1942 to WGS 84 (3),,,,Hungary.,9603,28.0,-121.0,-77.0,,,,,9001,,,,,,,1998-04-16 00:00:00,U.S. National Imagery and Mapping Agency  TR8350.2 revision of October 1997; http://164.214.2.59/geospatial/products/GandG/tr83502b/toc.html,EPSG,,98.11
-1288,Pulkovo 1942 to WGS 84 (4),,,,Poland.,9603,23.0,-124.0,-82.0,,,,,9001,,,,,,,1998-04-16 00:00:00,U.S. National Imagery and Mapping Agency  TR8350.2 revision of October 1997; http://164.214.2.59/geospatial/products/GandG/tr83502b/toc.html,EPSG,,98.11
-1289,Pulkovo 1942 to WGS 84 (5),,,,Czech Republic.,9603,26.0,-121.0,-78.0,,,,,9001,,,,,,,1998-04-16 00:00:00,U.S. National Imagery and Mapping Agency  TR8350.2 revision of October 1997; http://164.214.2.59/geospatial/products/GandG/tr83502b/toc.html,EPSG,,98.11
-1290,Pulkovo 1942 to WGS 84 (6),,,,Latvia.,9603,24.0,-124.0,-82.0,,,,,9001,,,,,,,1998-04-16 00:00:00,U.S. National Imagery and Mapping Agency  TR8350.2 revision of October 1997; http://164.214.2.59/geospatial/products/GandG/tr83502b/toc.html,EPSG,,98.11
-1291,Pulkovo 1942 to WGS 84 (7),,,,Kazakstan.,9603,15.0,-130.0,-84.0,,,,,9001,,,,,,,1998-04-16 00:00:00,U.S. National Imagery and Mapping Agency  TR8350.2 revision of October 1997; http://164.214.2.59/geospatial/products/GandG/tr83502b/toc.html,EPSG,,98.11
-1292,Pulkovo 1942 to WGS 84 (8),,,,Albania.,9603,24.0,-130.0,-92.0,,,,,9001,,,,,,,1998-04-16 00:00:00,U.S. National Imagery and Mapping Agency  TR8350.2 revision of October 1997; http://164.214.2.59/geospatial/products/GandG/tr83502b/toc.html,EPSG,,98.11
-1293,Pulkovo 1942 to WGS 84 (9),,,,Romania.,9603,28.0,-121.0,-77.0,,,,,9001,,,,,,,1998-04-16 00:00:00,U.S. National Imagery and Mapping Agency  TR8350.2 revision of October 1997; http://164.214.2.59/geospatial/products/GandG/tr83502b/toc.html,EPSG,,98.11
-1294,Voirol 1875 to WGS 84 (1),,,,Algeria - north of 35g (31 deg 30 min) North.,9603,-73.0,-247.0,227.0,,,,,9001,,,,,,,1998-03-12 00:00:00,U.S. Defense Mapping Agency  TR8350.2 revision of August 1993.,EPSG,,
-1295,Naparima 1972 to WGS 84 (2),,,,Trinidad and Tobago.,9603,-0.465,372.095,171.736,,,,,9001,,,,,,,1998-11-11 00:00:00,Trinidad Ministry of Energy and Energy Industries.,EPSG,,98/38
-1296,Trinidad 1903 to WGS 84 (1),,,,Trinidad.,9603,-61.702,284.488,472.052,,,,,9001,,,,,,,1998-11-11 00:00:00,Trinidad Ministry of Energy and Energy Industries.,EPSG,,98/38
-1297,Tete to Moznet (1),,,,Mozambique.,9607,-115.064,-87.39,-101.716,0.058,-4.001,2.062,9.366,9001,9104,,9202,,,,1998-04-16 00:00:00,Direc��o Nacional de Geografia e Cadastral (DINAGECA).,EPSG,Mean of 32 stations. Residuals as high as 30 metres. To reduce the size of the residuals; four regional parameter sets (codes 1298-1301) were developed.,
-1298,Tete to Moznet (2),,,,Mozambique - Maputo province and southern part of Gaza province; i.e. south of approximately 24 deg S.,9607,-82.875,-57.097,-156.768,2.158,-1.524,0.982,-0.359,9001,9104,,9202,,,,1998-04-16 00:00:00,Direc��o Nacional de Geografia e Cadastral (DINAGECA).,EPSG,Mean of 9 stations; residuals are generally under 1 metre.,
-1299,Tete to Moznet (3),,,,Mozambique - provinces of Gaza; Inhambane and southern parts of Sofala and Manhica; i.e. between approximately 24 and 20 deg South.,9607,-138.527,-91.999,-114.591,0.14,-3.363,2.217,11.748,9001,9104,,9202,,,,1998-04-16 00:00:00,Direc��o Nacional de Geografia e Cadastral (DINAGECA).,EPSG,Mean of 6 stations; residuals are generally under 4 metres.,
-1300,Tete to Moznet (4),,,,Mozambique - provinces of Sofala north of Beira corridor; Manhica; Tete and Zambezia; i.e. between approximately 20 and 16 deg South.,9607,-73.472,-51.66,-112.482,-0.953,-4.6,2.368,0.586,9001,9104,,9202,,,,1998-04-16 00:00:00,Direc��o Nacional de Geografia e Cadastral (DINAGECA).,EPSG,Mean of 11 stations; residuals are generally under 3 metres.,
-1301,Tete to Moznet (5),,,,Mozambique - provinces of Nampula; Niassa; Cabo Delgado; i.e. north of approximately 16 deg S.,9607,219.315,168.975,-166.145,-0.198,-5.926,2.356,-57.104,9001,9104,,9202,,,,1998-04-16 00:00:00,Direc��o Nacional de Geografia e Cadastral (DINAGECA).,EPSG,Mean of 7 stations; residuals are 5-10 metres.,
-1302,Moznet to WGS 84 (1),,,,Mozambique.,9607,0.0,0.0,0.0,0.0,0.0,0.0,0.0,9001,9104,,9202,,,,1998-04-16 00:00:00,EPSG,EPSG,For many purposes Moznet can be considered to be coincident with WGS 84. Accuracy better than 1 metre.,
-1303,Pulkovo 1942 to WGS 84 (10),,,,Kazakstan - Caspian.,9606,43.661,-103.342,-124.117,1.659,-0.824,0.653,0.59,9001,9104,,9202,,,,1998-04-16 00:00:00,KazakCaspiShelf consortium.,EPSG,Mean of 13 stations along entire Kazak coastline; residuals under 2 m.,
-1304,Indian 1975 to WGS 84 (2),,,,Thailand.,9603,210.0,814.0,289.0,,,,,9001,,,,,,,1998-04-16 00:00:00,U.S. National Imagery and Mapping Agency  TR8350.2 revision of October 1997; http://164.214.2.59/geospatial/products/GandG/tr83502b/toc.html,EPSG,,
-1305,Tokyo to WGS 84 (5),,,,South Korea.,9603,-147.0,506.0,687.0,,,,,9001,,,,,,,1998-04-16 00:00:00,U.S. National Imagery and Mapping Agency  TR8350.2 revision of October 1997; http://164.214.2.59/geospatial/products/GandG/tr83502b/toc.html,EPSG,,
-1306,MGI to WGS 84 (1),,,,MEAN FOR Boznia and Herzegovina; Croatia; Serbia; Slovenia.,9603,682.0,-203.0,480.0,,,,,9001,,,,,,,1998-04-16 00:00:00,U.S. National Imagery and Mapping Agency  TR8350.2 revision of October 1997; http://164.214.2.59/geospatial/products/GandG/tr83502b/toc.html,EPSG,,
-1307,Naparima 1972 to WGS 84 (3),,,,Trinidad & Tobago.,9603,-2.0,374.0,172.0,,,,,9001,,,,,,,1998-04-16 00:00:00,U.S. Defense Mapping Agency  TR8350.2 December 1987.,EPSG,See remarks for code 1192.,
-1308,NAD83 to WGS 84 (4),,,,United States (USA),9607,-0.9738,1.9453,0.5486,-0.00000013357,-0.00000004872,-0.00000005507,0.0,9001,9101,,9202,,,,1999-04-22 00:00:00, http://www.ngs.noaa.gov/CORS/Derivation.html,EPSG,Strictly between NAD83 and ITRF94(1996.0).  Superseded by NAD83 to WGS 84 (5) (code 1515).,99.12  99.38
-1309,DHDN to ETRF89 (1),,,,Germany - former west Germany.,9607,582.0,105.0,414.0,-1.04,-0.35,3.08,8.3,9001,9104,,9202,,,,1998-06-30 00:00:00,Institute for Cartography and Geodesy; Leipzig.,EPSG,Mean of 69 stations; residuals under 5 m.,
-1310,Pulkovo 1942 to ETRF89 (1),,,,Germany - former east Germany - Brandenburg; Mecklenburg-Vorpommern; Sachsen-Anhalt.,9607,24.0,-123.0,-94.0,-0.02,0.25,0.13,1.1,9001,9104,,9202,,,,1998-06-30 00:00:00,Institute for Cartography and Geodesy; Leipzig.,EPSG,Mean of 20 stations; residuals under 2 m.,
-1311,ED50 to WGS 84 (Common Offshore),ED50 to WGS 84 (18),,,United Kingdom - UKCS offshore east of 6 deg west.,9606,-89.5,-93.8,-123.1,0.0,0.0,-0.156,1.2,9001,9104,,9202,,,,1998-06-30 00:00:00,The Hydrographic Journal; vol 52 page 50.,EPSG,Recommended transformation for UKCS petroleum purposes.  Based on ED50 to WGS72 (precise ephemeris) 6-nations agreement of 1981 to which precise to broadcast and broadcast to WGS 84 transformations have been concatenated.,98.27
-1312,NAD27 to NAD83 (3),,,,Canada.,9614,,,,,,,,,9104,,,NTv1_0.gsb,,,1999-04-22 00:00:00,Geomatics Canada - Geodetic Survey Division.,EPSG,Uses NTv1 method.  Superseded in 1997 by NTv2 (non-poly transformation code 1313) except in Quebec.   Input expects longitudes to be positive west; EPSG GeogCS NAD27 (code 4267) and NAD83 (code 4269) have longitudes positive east.,
-1313,NAD27 to NAD83 (4),,,,Canada.,9615,,,,,,,,,9104,,,NTv2_0.gsb,,,1999-04-22 00:00:00,http://www.geod.nrcan.gc.ca/products/html-public/GSDapps/English/NTv2_Fact_Sheet.html,EPSG,Uses NTv2 data files.  Supersedes  NTv1 (non-poly transformation code 1312) except in Quebec.  Input expects longitudes to be positive west; EPSG GeogCS NAD27 (code 4267) and (code 4269) have longitudes positive east.,
-1314,OSGB 1936 to WGS 84 (Petroleum),,,,United Kingdom (UKCS) - Great Britain (GB) - England; Scotland; Wales; - North Sea.,9606,446.448,-125.157,542.06,0.15,0.247,0.842,-20.489,9001,9104,,9202,,,,1998-11-11 00:00:00,UK Offshore Operators Association.,EPSG,Accuracy better than 4m and generally better than 2m.  For a more accurate transformation contact the Ordnance Survey of Great Britain.,
-1315,OSGB 1936 to ED50 (UKOOA),,,,United Kingdom (UKCS) - Great Britain (GB) - England; Scotland; Wales; - North Sea.,9606,535.948,-31.357,665.16,0.15,0.247,0.998,-21.689,9001,9104,,9202,,,,1998-11-11 00:00:00,UK Offshore Operators Association.,EPSG,This transformation is concatenated from OSGB36 to WGS 84 (Petroleum) (code 1314) minus ED50 to WGS 84 (Common Offshore) (code 1311).,
-1316,Manoca to WGS 84 (1),,,,Cameroon.,9603,-70.9,-151.8,-41.4,,,,,9001,,,,,,,1998-11-11 00:00:00,Stolt Comex Seaway and Geoid for Elf.,EPSG,,
-1317,Camacupa to WGS 72BE (1),,,,Angola - offshore.,9603,-37.2,-370.6,-228.5,,,,,9001,,,,,,,1998-11-11 00:00:00,EPSG,EPSG,Derived by Geophysical Services Inc. in 1979 from mean of Transit results at 7 stations.,
-1318,Camacupa to WGS 84 (1),,,,Angola - offshore block 5.,9603,-42.01,-332.21,-229.75,,,,,9001,,,,,,,1998-11-11 00:00:00,EPSG,EPSG,Used by Conoco.,
-1319,Camacupa to WGS 84 (2),,,,Angola - offshore block 2.,9603,-40.0,-354.0,-224.0,,,,,9001,,,,,,,1998-11-11 00:00:00,EPSG,EPSG,Used by Texaco.,
-1320,Camacupa to WGS 84 (3),,,,Angola - offshore blocks 1 and 16.,9606,-37.2,-370.6,-224.0,0.0,0.0,0.554,0.219,9001,9104,8901,9202,,,,1998-12-14 00:00:00,EPSG,EPSG,Used by Shell prior to 1994.  Superseded by Camacupa to WGS 84 (9).,98.56
-1321,Camacupa to WGS 84 (4),,,,Angola - offshore blocks 7 and 8.  Also used rounded to integer metre for GSI/HGS/Western Geophysical speculative seismic data.,9603,-42.5,-342.5,-228.1,,,,,9001,,,,,,,1998-11-11 00:00:00,EPSG,EPSG,Derived as mean of 123 Transit passes at station Cabo Ledo NE base in January 1989.  Used by Total for block 8. Used by Elf for block 7 up to December 1992 then superseded by Camacupa to WGS 84 (7).,
-1322,Camacupa to WGS 84 (5),,,,Angola - offshore block 3.,9603,-55.5,-348.0,-229.2,,,,,9001,,,,,,,1998-11-11 00:00:00,EPSG,EPSG,Derived at station Djeno during coordination of platform PAL F2 in February 1992. Used by Elf for block 3 up to December 1992 then superseded by Camacupa to WGS 84 (7).,
-1323,Camacupa to WGS 84 (6),,,,Angola - offshore block 7.,9603,-43.0,-337.0,-233.0,,,,,9001,,,,,,,1998-11-11 00:00:00,EPSG,EPSG,Derived at Luanda observatory December 1992.  Used by Elf for 1993 block 7 shallow water survey.,
-1324,Camacupa to WGS 84 (7),,,,Angola - offshore blocks 3  7  15 and 17.,9603,-48.0,-345.0,-231.0,,,,,9001,,,,,,,1998-11-11 00:00:00,EPSG,EPSG,"Derived at platform PAL F2 in December 1992.  Used by Elf for blocks 3, 7 and 17 between December 1992 and 1994 then superseded by Camacupa to WGS 84 (10).  Used by Exxon for block 15 since 1993.",
-1325,Camacupa to WGS 84 (8),,,,Angola - offshore block 2.,9603,-48.6,-345.1,-230.8,,,,,9001,,,,,,,1998-11-11 00:00:00,EPSG,EPSG,Derived at platform PAL F2 in December 1992. Used by Total for block 2 between December 1992 and 1994 then superseded by Camacupa to WGS 84 (10).,
-1326,Camacupa to WGS 84 (9),,,,Angola - offshore blocks 1 16 and 18.,9606,-41.057,-374.564,-226.287,0.0,0.0,0.554,0.219,9001,9104,8901,9202,,,,1998-12-14 00:00:00,EPSG,EPSG,Used by Shell since 1994.  Supersedes Camacupa to WGS 84 (3).,98.56
-1327,Camacupa to WGS 84 (10),,,,Angola - offshore blocks 2  3 17 and 31-33.,9603,-50.9,-347.6,-231.0,,,,,9001,,,,,,,1998-11-11 00:00:00,EPSG,EPSG,Derived at platform PAL F2 in 1994 by Topnav using Doris.  Used by Elf in blocks 3 and 17 since 1994.  Used by Total in block 2 since 1994. Adopted by BP-Amoco Elf and Exxon for blocks 31-33.,
-1328,Malongo 1987 to Mhast (1),,,,Angola - Cabinda offshore.,9603,0.0,0.0,0.0,,,,,9001,,,,,,,1998-11-11 00:00:00,EPSG,EPSG,Malongo 1987 is an offshore extension of Mhast adopted by Chevron in 1987.,
-1329,Mhast to WGS 84 (1),,,,Angola - Cabinda offshore.,9603,-252.95,-4.11,-96.38,,,,,9001,,,,,,,1998-11-11 00:00:00,EPSG,EPSG,,
-1330,Malongo 1987 to WGS 84 (1),,,,Angola - Cabinda offshore.,9603,-252.95,-4.11,-96.38,,,,,9001,,,,,,,1998-11-11 00:00:00,EPSG,EPSG,Used by Chevron.,
-1331,EST92 to ETRF89 (1),,,,Estonia,9607,0.0,0.0,0.0,0.0,0.0,0.0,0.0,9001,9104,,9202,,,,1998-12-14 00:00:00,http://www.geo.ut.ee/~raivo/estcoord.html,EPSG,,
-1332,Pulkovo 1942 to EST92 (1),,,,Estonia.,9607,21.53219,-97.00027,-60.74046,-0.99548,-0.58147,-0.2418,-4.5981,9001,9104,,9202,,,,1998-12-14 00:00:00,http://www.geo.ut.ee/~raivo/estcoord.html,EPSG,,
-1333,EST92 to WGS84 (1),,,,Estonia.,9607,0.055,-0.541,-0.185,-0.0183,0.0003,0.007,-0.014,9001,9104,,9202,,,,1998-12-14 00:00:00,http://www.geo.ut.ee/~raivo/estcoord.html,EPSG,,
-1334,Pulkovo 1942 to WGS84 (12),,,,Estonia.,9607,21.58719,-97.54127,-60.92546,-1.01378,-0.58117,-0.2348,-4.6121,9001,9104,,9202,,,,1998-12-14 00:00:00,http://www.geo.ut.ee/~raivo/estcoord.html,EPSG,,
-1335,Tokyo to WGS 84 (6),,,,Japan - 45d 20m to 46d N; 141d to 142d E.,9618,7.92,-13.88,26.1,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1336,Tokyo to WGS 84 (7),,,,Japan - 45d 20m to 46d N; 142d to 143d E.,9618,7.94,-13.97,26.9,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1337,Tokyo to WGS 84 (8),,,,Japan - 44deg 40min to 45deg 20min N; 141deg to 142deg E.,9618,8.1,-13.81,27.2,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1338,Tokyo to WGS 84 (9),,,,Japan - 44deg 40min to 45deg 20min N; 142deg to 143deg E.,9618,8.15,-13.95,28.4,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1339,Tokyo to WGS 84 (10),,,,Japan - 44deg to 44deg 40min N; 141deg to 142deg E.,9618,8.37,-13.65,29.0,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1340,Tokyo to WGS 84 (11),,,,Japan - 44deg to 44deg 40min N; 142deg to 143deg E.,9618,8.44,-13.87,30.9,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1341,Tokyo to WGS 84 (12),,,,Japan - 44deg to 44deg 40min N; 143deg to 144deg E.,9618,8.61,-14.08,30.7,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1342,Tokyo to WGS 84 (13),,,,Japan - 44deg to 44deg 40min N; 144deg to 145deg E.,9618,8.73,-14.3,30.9,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1343,Tokyo to WGS 84 (14),,,,Japan - 43deg 20min to 44deg N; 141deg to 142deg E.,9618,8.63,-13.49,30.9,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1344,Tokyo to WGS 84 (15),,,,Japan - 43deg 20min to 44deg N; 142deg to 143deg E.,9618,8.71,-13.73,31.6,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1345,Tokyo to WGS 84 (16),,,,Japan - 43deg 20min to 44deg N; 143deg to 144deg E.,9618,8.84,-14.03,31.2,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1346,Tokyo to WGS 84 (17),,,,Japan - 43deg 20min to 44deg N; 144deg to 145deg E.,9618,8.98,-14.33,32.5,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1347,Tokyo to WGS 84 (18),,,,Japan - 43deg 20min to 44deg N; 145deg to 146deg E.,9618,9.1,-14.56,32.6,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1348,Tokyo to WGS 84 (19),,,,Japan - 42deg 40min to 43deg 20min N; 140deg to 141deg E.,9618,8.79,-13.0,33.3,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1349,Tokyo to WGS 84 (20),,,,Japan - 42deg 40min to 43deg 20min N; 141deg to 142deg E.,9618,8.84,-13.31,31.4,,,,,9001,9104,,,,,,1999-11-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,99.77
-1350,Tokyo to WGS 84 (21),,,,Japan - 42deg 40min to 43deg 20min N; 142deg to 143deg E.,9618,8.98,-13.59,30.9,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1351,Tokyo to WGS 84 (22),,,,Japan - 42deg 40min to 43deg 20min N; 143deg to 144deg E.,9618,9.1,-13.91,29.3,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1352,Tokyo to WGS 84 (23),,,,Japan - 42deg 40min to 43deg 20min N; 144deg to 145deg E.,9618,9.17,-14.27,31.3,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1353,Tokyo to WGS 84 (24),,,,Japan - 42deg 40min to 43deg 20min N; 145deg to 146deg E.,9618,9.23,-14.52,31.4,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1354,Tokyo to WGS 84 (25),,,,Japan - 42deg to 42deg 40min N; 139deg to 140deg E.,9618,8.9,-12.68,34.4,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1355,Tokyo to WGS 84 (26),,,,Japan - 42deg to 42deg 40min N; 140deg to 141deg E.,9618,8.99,-12.8,34.2,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1356,Tokyo to WGS 84 (27),,,,Japan - 42deg to 42deg 40min N; 141deg to 142deg E.,9618,9.0,-13.07,31.7,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1357,Tokyo to WGS 84 (28),,,,Japan - 42deg to 42deg 40min N; 142deg to 143deg E.,9618,9.21,-13.51,27.5,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1358,Tokyo to WGS 84 (29),,,,Japan - 42deg to 42deg 40min N; 143deg to 144deg E.,9618,9.33,-13.66,23.8,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1359,Tokyo to WGS 84 (30),,,,Japan - 41deg 20min to 42deg N; 140deg to 141deg E.,9618,9.25,-12.72,34.2,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1360,Tokyo to WGS 84 (31),,,,Japan - 41deg 20min to 42deg N; 141deg to 142deg E.,9618,9.39,-12.91,31.8,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1361,Tokyo to WGS 84 (32),,,,Japan - 40deg 40min to 41deg 20min N; 140deg to 141deg E.,9618,9.55,-12.63,35.6,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1362,Tokyo to WGS 84 (33),,,,Japan - 40deg 40min to 41deg 20min N; 141deg to 142deg E.,9618,9.62,-12.82,34.7,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1363,Tokyo to WGS 84 (34),,,,Japan - 40deg to 40deg 40min N; 139deg to 140deg E.,9618,9.81,-12.29,36.6,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1364,Tokyo to WGS 84 (35),,,,Japan - 40deg to 40deg 40min N; 140deg to 141deg E.,9618,9.81,-12.45,37.5,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1365,Tokyo to WGS 84 (36),,,,Japan - 40deg to 40deg 40min N; 141deg to 142deg E.,9618,9.92,-12.79,38.3,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1366,Tokyo to WGS 84 (37),,,,Japan - 39deg 20min to 40deg N; 139deg to 140deg E.,9618,9.91,-12.21,36.6,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1367,Tokyo to WGS 84 (38),,,,Japan - 39deg 20min to 40deg N; 140deg to 141deg E.,9618,10.08,-12.35,39.0,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1368,Tokyo to WGS 84 (39),,,,Japan - 39deg 20min to 40deg N; 141deg to 142deg E.,9618,10.19,-12.74,40.3,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1369,Tokyo to WGS 84 (40),,,,Japan - 38deg 40min to 39deg 20min N; 139deg to 140deg E.,9618,10.29,-12.13,38.5,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1370,Tokyo to WGS 84 (41),,,,Japan - 38deg 40min to 39deg 20min N; 140deg to 141deg E.,9618,10.33,-12.27,40.1,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1371,Tokyo to WGS 84 (42),,,,Japan - 38deg 40min to 39deg 20min N; 141deg to 142deg E.,9618,10.45,-12.61,41.7,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1372,Tokyo to WGS 84 (43),,,,Japan - 38deg to 38deg 40min N; 139deg to 140deg E.,9618,10.54,-11.96,39.1,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1373,Tokyo to WGS 84 (44),,,,Japan - 38deg to 38deg 40min N; 140deg to 141deg E.,9618,10.65,-12.27,41.7,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1374,Tokyo to WGS 84 (45),,,,Japan - 38deg to 38deg 40min N; 141deg to 142deg E.,9618,10.67,-12.5,41.1,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1375,Tokyo to WGS 84 (46),,,,Japan - 37deg 20min to 38deg N; 136deg to 137deg E.,9618,10.67,-10.86,38.5,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1376,Tokyo to WGS 84 (47),,,,Japan - 37deg 20min to 38deg N; 137deg to 138deg E.,9618,10.68,-10.97,36.0,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1377,Tokyo to WGS 84 (48),,,,Japan - 37deg 20min to 38deg N; 138deg to 139deg E.,9618,10.8,-11.53,39.7,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1378,Tokyo to WGS 84 (49),,,,Japan - 37deg 20min to 38deg N; 139deg to 140deg E.,9618,10.8,-11.73,40.9,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1379,Tokyo to WGS 84 (50),,,,Japan - 37deg 20min to 38deg N; 140deg to 141deg E.,9618,10.92,-12.16,42.3,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1380,Tokyo to WGS 84 (51),,,,Japan - 37deg 20min to 38deg N; 141deg to 142deg E.,9618,11.0,-12.25,41.2,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1381,Tokyo to WGS 84 (52),,,,Japan - 36deg 40min to 37deg 20min N; 136deg to 137deg E.,9618,10.83,-10.77,36.2,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1382,Tokyo to WGS 84 (53),,,,Japan - 36deg 40min to 37deg 20min N; 137deg to 138deg E.,9618,10.95,-11.0,38.7,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1383,Tokyo to WGS 84 (54),,,,Japan - 36deg 40min to 37deg 20min N; 138deg to 139deg E.,9618,10.97,-11.34,40.8,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1384,Tokyo to WGS 84 (55),,,,Japan - 36deg 40min to 37deg 20min N; 139deg to 140deg E.,9618,11.04,-11.69,43.3,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1385,Tokyo to WGS 84 (56),,,,Japan - 36deg 40min to 37deg 20min N; 140deg to 141deg E.,9618,11.17,-12.05,42.6,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1386,Tokyo to WGS 84 (57),,,,Japan - 36deg to 37deg 40min N; 136deg to 137deg E.,9618,11.11,-10.59,37.3,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1387,Tokyo to WGS 84 (58),,,,Japan - 36deg to 37deg 40min N; 137deg to 138deg E.,9618,11.16,-10.97,40.3,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1388,Tokyo to WGS 84 (59),,,,Japan - 36deg to 37deg 40min N; 138deg to 139deg E.,9618,11.29,-11.23,42.4,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1389,Tokyo to WGS 84 (60),,,,Japan - 36deg to 37deg 40min N; 139deg to 140deg E.,9618,11.36,-11.59,42.5,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1390,Tokyo to WGS 84 (61),,,,Japan - 36deg to 37deg 40min N; 140deg to 141deg E.,9618,11.44,-11.88,40.3,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1391,Tokyo to WGS 84 (62),,,,Japan - 35deg 20min to 36deg N; 132deg to 133deg E.,9618,11.27,-9.31,30.9,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1392,Tokyo to WGS 84 (63),,,,Japan - 35deg 20min to 36deg N; 133deg to 134deg E.,9618,11.33,-9.52,33.8,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1393,Tokyo to WGS 84 (64),,,,Japan - 35deg 20min to 36deg N; 134deg to 135deg E.,9618,11.38,-9.86,34.9,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1394,Tokyo to WGS 84 (65),,,,Japan - 35deg 20min to 36deg N; 135deg to 136deg E.,9618,11.41,-10.14,35.7,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1395,Tokyo to WGS 84 (66),,,,Japan - 35deg 20min to 36deg N; 136deg to 137deg E.,9618,11.39,-10.52,37.5,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1396,Tokyo to WGS 84 (67),,,,Japan - 35deg 20min to 36deg N; 137deg to 138deg E.,9618,11.49,-10.83,39.3,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1397,Tokyo to WGS 84 (68),,,,Japan - 35deg 20min to 36deg N; 138deg to 139deg E.,9618,11.58,-11.21,41.7,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1398,Tokyo to WGS 84 (69),,,,Japan - 35deg 20min to 36deg N; 139deg to 140deg E.,9618,11.65,-11.53,38.5,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1399,Tokyo to WGS 84 (70),,,,Japan - 35deg 20min to 36deg N; 140deg to 141deg E.,9618,11.72,-11.8,34.5,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1400,Tokyo to WGS 84 (71),,,,Japan - 34deg 40min to 35deg 20min N; 132deg to 133deg E.,9618,11.44,-9.21,32.7,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1401,Tokyo to WGS 84 (72),,,,Japan - 34deg 40min to 35deg 20min N; 133deg to 134deg E.,9618,11.47,-9.52,35.2,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1402,Tokyo to WGS 84 (73),,,,Japan - 34deg 40min to 35deg 20min N; 134deg to 135deg E.,9618,11.55,-9.8,35.4,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1403,Tokyo to WGS 84 (74),,,,Japan - 34deg 40min to 35deg 20min N; 135deg to 136deg E.,9618,11.61,-10.12,35.9,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1404,Tokyo to WGS 84 (75),,,,Japan - 34deg 40min to 35deg 20min N; 136deg to 137deg E.,9618,11.66,-10.47,37.0,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1405,Tokyo to WGS 84 (76),,,,Japan - 34deg 40min to 35deg 20min N; 137deg to 138deg E.,9618,11.78,-10.79,39.8,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1406,Tokyo to WGS 84 (77),,,,Japan - 34deg 40min to 35deg 20min N; 138deg to 139deg E.,9618,11.85,-11.13,39.9,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1407,Tokyo to WGS 84 (78),,,,Japan - 34deg 40min to 35deg 20min N; 139deg to 140deg E.,9618,11.9,-11.47,36.9,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1408,Tokyo to WGS 84 (79),,,,Japan - 34deg 40min to 35deg 20min N; 140deg to 141deg E.,9618,11.91,-11.69,33.7,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1409,Tokyo to WGS 84 (80),,,,Japan - 34deg to 34deg 40min N; 130deg to 131deg E.,9618,11.65,-8.59,29.7,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1410,Tokyo to WGS 84 (81),,,,Japan - 34deg to 34deg 40min N; 131deg to 132deg E.,9618,11.68,-8.8,30.5,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1411,Tokyo to WGS 84 (82),,,,Japan - 34deg to 34deg 40min N; 132deg to 133deg E.,9618,11.73,-9.04,30.9,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1412,Tokyo to WGS 84 (83),,,,Japan - 34deg to 34deg 40min N; 133deg to 134deg E.,9618,11.72,-9.48,35.1,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1413,Tokyo to WGS 84 (84),,,,Japan - 34deg to 34deg 40min N; 134deg to 135deg E.,9618,11.81,9.74,35.8,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1414,Tokyo to WGS 84 (85),,,,Japan - 34deg to 34deg 40min N; 135deg to 136deg E.,9618,11.88,-10.1,37.1,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1415,Tokyo to WGS 84 (86),,,,Japan - 34deg to 34deg 40min N; 136deg to 137deg E.,9618,11.91,-10.35,37.9,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1416,Tokyo to WGS 84 (87),,,,Japan - 34deg to 34deg 40min N; 137deg to 138deg E.,9618,11.9,-10.7,39.3,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1417,Tokyo to WGS 84 (88),,,,Japan - 34deg to 34deg 40min N; 138deg to 139deg E.,9618,12.02,-11.09,38.2,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1418,Tokyo to WGS 84 (89),,,,Japan - 33deg 20min to 34deg N; 129deg to 130deg E.,9618,11.87,-8.23,29.7,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1419,Tokyo to WGS 84 (90),,,,Japan - 33deg 20min to 34deg N; 130deg to 131deg E.,9618,11.84,-8.44,30.6,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1420,Tokyo to WGS 84 (91),,,,Japan - 33deg 20min to 34deg N; 131deg to 132deg E.,9618,11.94,-8.71,30.2,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1421,Tokyo to WGS 84 (92),,,,Japan - 33deg 20min to 34deg N; 132deg to 133deg E.,9618,11.99,-9.02,30.9,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1422,Tokyo to WGS 84 (93),,,,Japan - 33deg 20min to 34deg N; 133deg to 134deg E.,9618,12.05,-9.36,35.0,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1423,Tokyo to WGS 84 (94),,,,Japan - 33deg 20min to 34deg N; 134deg to 135deg E.,9618,12.1,-9.64,35.5,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1424,Tokyo to WGS 84 (95),,,,Japan - 33deg 20min to 34deg N; 135deg to 136deg E.,9618,12.1,-10.08,37.3,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1425,Tokyo to WGS 84 (96),,,,Japan - 33deg 20min to 34deg N; 136deg to 137deg E.,9618,12.07,-10.25,37.3,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1426,Tokyo to WGS 84 (97),,,,Japan - 32deg 40min to 33deg 20min N; 129deg to 130deg E.,9618,12.0,-8.15,32.1,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1427,Tokyo to WGS 84 (98),,,,Japan - 32deg 40min to 33deg 20min N; 130deg to 131deg E.,9618,12.06,-8.38,31.0,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1428,Tokyo to WGS 84 (99),,,,Japan - 32deg 40min to 33deg 20min N; 131deg to 132deg E.,9618,12.17,-8.69,30.3,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1429,Tokyo to WGS 84 (100),,,,Japan - 32deg 40min to 33deg 20min N; 132deg to 133deg E.,9618,12.23,-8.99,31.7,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1430,Tokyo to WGS 84 (101),,,,Japan - 32deg 40min to 33deg 20min N; 133deg to 134deg E.,9618,12.21,-9.21,34.3,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1431,Tokyo to WGS 84 (102),,,,Japan - 32deg 40min to 33deg 20min N; 134deg to 135deg E.,9618,12.28,-9.6,33.3,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1432,Tokyo to WGS 84 (103),,,,Japan - 32deg to 32deg 40min N; 130deg to 131deg E.,9618,12.28,-8.25,31.0,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1433,Tokyo to WGS 84 (104),,,,Japan - 32deg to 32deg 40min N; 131deg to 132deg E.,9618,12.37,-8.55,29.1,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1434,Tokyo to WGS 84 (105),,,,Japan - 31deg 20min to 32deg N; 130deg to 131deg E.,9618,12.53,-8.21,31.0,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1435,Tokyo to WGS 84 (106),,,,Japan - 31deg 20min to 32deg N; 131deg to 132deg E.,9618,12.57,-8.4,28.4,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1436,Tokyo to WGS 84 (107),,,,Japan - 30deg 40min to 31deg 20min N; 130deg to 131deg E.,9618,12.71,-8.17,29.9,,,,,9001,9104,,,,,,1998-12-12 00:00:00,http://vldb.gsi-mc.go.jp/sokuchi/coordinates/localtrans.html   (Geographical Survey Institute).,EPSG,,
-1437,RT90 to ETRF89 (1),,,,Sweden,9607,419.3836,99.3335,591.3451,-0.850389,-1.817277,7.862238,-0.99496,9001,9104,,9202,,,,1999-04-22 00:00:00,National Land Survey of Sweden.,EPSG,This transformation is actually between ETRF89 and RR92.  RR92 is a geographic 3D coordinate system where the horizontal component is RT90.,99.11
-1438,Fahud to WGS 84 (2),,,,Oman.,9606,-333.102,-11.02,230.69,0.0,0.0,0.554,0.219,9001,9104,,9202,,,,1999-04-22 00:00:00,Petroleum Development Oman,EPSG,,
-1439,PSD93 to WGS 84 (1),,,,Oman.,9606,-180.624,-225.516,173.919,-0.81,-1.898,8.336,16.71006,9001,9104,,9202,,,,1999-04-22 00:00:00,Petroleum Development Oman,EPSG,,
-1440,ED50 to WGS 84 (19),,,,Greece.,9603,-86.0,-92.2,-127.5,,,,,9001,,,,,,,1999-04-22 00:00:00,Geodesy Department; Hellenic Petroleum s.a.,EPSG,Used in oil industry.,
-1441,Antigua 1943 to WGS 84 (1),,,,Antigua.,9603,-255.0,-15.0,71.0,,,,,9001,,,,,,,1999-04-22 00:00:00,Ordnance Survey of Great Britain,EPSG,,
-1442,Dominica 1945 to WGS 84 (1),,,,Dominica.,9603,725.0,685.0,536.0,,,,,9001,,,,,,,1999-04-22 00:00:00,Ordnance Survey of Great Britain,EPSG,,
-1443,Grenada 1953 to WGS 84 (1),,,,Grenada.,9603,72.0,213.7,93.0,,,,,9001,,,,,,,1999-04-22 00:00:00,Ordnance Survey of Great Britain,EPSG,,
-1444,Montserrat 1958 to WGS 84 (1),,,,Montserrat.,9603,174.0,359.0,365.0,,,,,9001,,,,,,,1999-04-22 00:00:00,Ordnance Survey of Great Britain,EPSG,,
-1445,St. Kitts 1955 to WGS 84 (1),,,,Saint Kitts and Nevis.,9603,9.0,183.0,236.0,,,,,9001,,,,,,,1999-04-22 00:00:00,Ordnance Survey of Great Britain,EPSG,,
-1446,St. Lucia 1955 to WGS 84 (1),,,,Saint Lucia.,9603,-149.0,128.0,296.0,,,,,9001,,,,,,,1999-04-22 00:00:00,Ordnance Survey of Great Britain,EPSG,,
-1447,Anguilla 1957 to WGS 84 (1),,,,Anguilla.,9619,-18.0,4.4,,,,,,,9104,,,,,,1999-04-22 00:00:00,Ordnance Survey of Great Britain,EPSG,,
-1450,ED50 to WGS 84 (20),,,,Norway - offshore between 62 and 65 deg North and west of 5 deg East.,9620,,,,,,8047.0,8046.0,,9102,,,ED50 to WGS 84 (15),ED50 to WGS 84 (14),,1999-04-22 00:00:00,"Norwegian Mapping Authority note of 13-Feb-1991 \"Om Transformasjon mellom Geodetiske Datum i Norge\"",EPSG,,
-1451,NAD27(CGQ77) to NAD83 (1),,,,Canada - Quebec,9614,,,,,,,,,9104,,,PQV4.DAC,,,1999-05-15 00:00:00,Geodetic Service of Quebec.  Contact alain.bernard at mrn.gouv.qc.ca,EPSG,Uses NT method which expects longitudes positive west; EPSG GeogCSs CGQ77 (code 4609) and NAD83 (code 4269) have longitudes positive east.  Supersedes NAD27 to NAD83 (5) (code xxxx).,
-1454,Old Hawaiian to NAD83 (1),,,,United States (USA) - Hawaii including EEZ.,9613,,,,,,,,,9104,,,hawaii.las,hawaii.los,,1999-05-15 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov,EPSG,Uses NADCON method which expects longitudes positive west; EPSG GeogCSs Old Hawaiian (code 4135) and NAD83 (code 4269) have longitudes positive east.  NADCON data converts from Old Hawaiian Datum to but makes the transformation appear to be from NAD27.,
-1455,St. Lawrence Island to NAD83 (1),,,,United States (USA) - Alaska - St. Lawrence Island.,9613,,,,,,,,,9104,,,stlrnc.las,stlrnc.los,,1999-05-15 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov,EPSG,Uses NADCON method which expects longitudes positive west; EPSG GeogCSs St. Lawrence (code 4136) and NAD83 (code 4269) have longitudes positive east. NADCON data converts from St. Lawrence Datum to but makes the transformation appear to be from NAD27.,
-1456,St. Paul Island to NAD83 (1),,,,United States (USA) - Alaska - St. Paul Island.,9613,,,,,,,,,9104,,,stpaul.las,stpaul.los,,1999-05-15 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov,EPSG,Uses NADCON method which expects longitudes positive west; EPSG GeogCSs St. Paul (code 4137) and NAD83 (code 4269) have longitudes positive east. NADCON data converts from St. Paul Datum to but makes the transformation appear to be from NAD27.,
-1457,St. George Island to NAD83 (1),,,,United States (USA) - Alaska - St. George Island.,9613,,,,,,,,,9104,,,stgeorge.las,stgeorge.los,,1999-05-15 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov,EPSG,Uses NADCON method which expects longitudes positive west; EPSG GeogCSs St. George (code 4138) and NAD83 (code 4269) have longitudes positive east. NADCON data converts from St. George Datum to but makes the transformation appear to be from NAD27.,
-1458,AGD66 to GDA94 (2),,,,Australia - ACT.,9607,-129.193,-41.212,130.73,-0.246,-0.374,-0.329,-2.955,9001,9104,,9202,,,,1999-05-25 00:00:00,http://www.anzlic.org.au/icsm/gdatm/regional.htm,EPSG,1m accuracy.  Recommended for mid-accuracy use in A.C.T.,
-1459,AGD66 to GDA94 (3),,,,Australia - Tasmania.,9607,-120.695,-62.73,165.46,-0.109,0.141,0.116,2.733,9001,9104,,9202,,,,1999-05-25 00:00:00,http://www.anzlic.org.au/icsm/gdatm/regional.htm,EPSG,1m accuracy.  Recommended for mid-accuracy use in Tasmania.,
-1460,AGD66 to GDA94 (4),,,,Australia - New South Wales (NSW) and Victoria.,9607,-119.353,-48.301,139.484,-0.415,-0.26,-0.437,-0.613,9001,9104,,9202,,,,1999-05-25 00:00:00,http://www.anzlic.org.au/icsm/gdatm/regional.htm,EPSG,1m accuracy.  Recommended for mid-accuracy use in NSW and Victoria.,
-1461,Puerto Rico to NAD83 (1),,,,Puerto Rico; Virgin Islands (U.S.); Virgin Islands (British).,9613,,,,,,,,,9104,,,prvi.las,prvi.los,,1999-05-24 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov,EPSG,Uses NADCON method which expects longitudes positive west; EPSG GeogCSs Puerto Rico (code 4139) and NAD83 (code 4269) have longitudes positive east. NADCON data converts from Puerto Rico Datum to but makes the transformation appear to be from NAD27.,
-1462,NAD27 to NAD83 (5),,,,Canada - Quebec,9614,,,,,,,,,9104,,,GS2783v1.QUE,,,1999-05-24 00:00:00,Geodetic Service of Quebec.  Contact alain.bernard at mrn.gouv.qc.ca,EPSG,Uses NT method which expects longitudes positive west; EPSG GeogCSs NAD27 (code 4267) and NAD83 (code 4269) have longitudes positive east.  Superseded by NAD27(CGQ77) to NAD83 (1) (code 1451).,
-1463,NAD27(76) to NAD83 (1),,,,Canada - Ontario,9615,,,,,,,,,9104,,,May76v20.gsb,,,1999-05-24 00:00:00,Geodetic Survey of Canada   http://www.geod.emr.ca/html-public/GSDapps/English/NTv2_Fact_Sheet.html,EPSG,Uses NT method which expects longitudes positive west; EPSG GeogCSs NAD27(76) (code 4608) and NAD83 (code 4269) have longitudes positive east.,
-1464,AGD66 to GDA94 (5),,,,Australia - Victoria.,9615,,,,,,,,,9104,,,vic_0799.gsb,,,1999-10-20 00:00:00,http://www.osg.vic.gov.au/tools.htm,EPSG,0.1m accuracy.  Input expects longitudes to be positive west; EPSG GeogCS AGD66 (code 4202) and GDA94 (code 4283) both have longitudes positive east.,99.67
-1466,NGO 1948 (Oslo) to NGO1948,,,,Norway - onshore.,9601,10.43225,,,,,,,,9110,,,,,,1999-11-12 00:00:00,"J. Danielsen; \"Transformasjoner ved Norges Geografiske Oppm�ling\"; Kart Og Plan nr 1; 1982.",EPSG,Change of prime meridian.,99.79
-1467,NTF (Paris) to NTF (1),,,,France - onshore.,9601,2.5969213,,,,,,,,9105,,,,,,1999-11-12 00:00:00,IGN Paris.,EPSG,Change of prime meridian.,99.63  99.79
-1468,NTF (Paris) to NTF (2),,,,France - onshore.,9601,2.201395,,,,,,,,9110,,,,,,1999-11-12 00:00:00,Royal Geographic Society; London,EPSG,Change of prime meridian.  EPSG prefers value from IGN Paris (code 1467).,99.63  99.79
-1469,Locodjo 1965 to WGS 84 (1),,,,Cote D'Ivoire (Ivory Coast),9603,-125.0,53.0,467.0,,,,,9001,,,,,,,1999-10-20 00:00:00,IGN Paris,EPSG,,
-1470,Abidjan 1987 to WGS 84 (1),,,,Cote D'Ivoire (Ivory Coast),9603,-124.76,53.0,466.79,,,,,9001,,,,,,,1999-10-20 00:00:00,IGN Paris,EPSG,,
-1471,MGI to WGS 84 (2),,,,Austria,9606,-577.326,-90.129,-463.919,-15.8537,-4.55,-16.3489,-2.4232,9001,9113,,9202,,,,1999-10-20 00:00:00,Bundesamt f�r Eich- und Vermessungswesen,EPSG,,
-1472,ATS77 to NAD83(CSRS98) (1),,,,Canada - New Brunswick,9615,,,,,,,,,9104,,,NT7783v2.gsb,,,1999-10-20 00:00:00,New Brunswick Geographic Information Corporation land and water information standards manual.,EPSG,Introduced in 1999.,
-1473,NAD83(CSRS98) to WGS 84 (1),,,,Canada - New Brunswick,9603,0.0,0.0,0.0,,,,,9001,,,,,,,1999-10-20 00:00:00,EPSG,EPSG,For many purposes NAD83 can be considered to be coincident with WGS 84.,
-1474,NAD83 to NAD83(HARN) (1),,,,United States (USA) - Alabama.,9613,,,,,,,,,9104,,,alhpgn.las,alhpgn.los,,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.,
-1475,NAD83 to NAD83(HARN) (2),,,,United States (USA) - Arizona.,9613,,,,,,,,,9104,,,azhpgn.las,azhpgn.los,,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.,
-1476,NAD83 to NAD83(HARN) (3),,,,United States (USA) - California north of 38 deg N.,9613,,,,,,,,,9104,,,cnhpgn.las,cnhpgn.los,,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.,
-1477,NAD83 to NAD83(HARN) (4),,,,United States (USA) - California south of 38 deg N.,9613,,,,,,,,,9104,,,cshpgn.las,cshpgn.los,,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.,
-1478,NAD83 to NAD83(HARN) (5),,,,United States (USA) - Colorado.,9613,,,,,,,,,9104,,,cohpgn.las,cohpgn.los,,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.,
-1479,NAD83 to NAD83(HARN) (6),,,,United States (USA) - Georgia.,9613,,,,,,,,,9104,,,gahpgn.las,gahpgn.los,,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.,
-1480,NAD83 to NAD83(HARN) (7),,,,United States (USA) - Florida.,9613,,,,,,,,,9104,,,flhpgn.las,flhpgn.los,,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.,
-1481,NAD83 to NAD83(HARN) (8),,,,United States (USA) - Idaho and Montana - east of 113 deg W.,9613,,,,,,,,,9104,,,emhpgn.las,emhpgn.los,,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.,
-1482,NAD83 to NAD83(HARN) (9),,,,United States (USA) - Idaho and Montana - west of 113 deg W.,9613,,,,,,,,,9104,,,wmhpgn.las,wmhpgn.los,,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.,
-1483,NAD83 to NAD83(HARN) (10),,,,United States (USA) - Kentucky.,9613,,,,,,,,,9104,,,kyhpgn.las,kyhpgn.los,,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.,
-1484,NAD83 to NAD83(HARN) (11),,,,United States (USA) - Louisiana.,9613,,,,,,,,,9104,,,lahpgn.las,lahpgn.los,,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.,
-1485,NAD83 to NAD83(HARN) (12),,,,United States (USA) - Delaware and Maryland.,9613,,,,,,,,,9104,,,mdhpgn.las,mdhpgn.los,,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.,
-1486,NAD83 to NAD83(HARN) (13),,,,United States (USA) - Maine.,9613,,,,,,,,,9104,,,mehpgn.las,mehpgn.los,,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.,
-1487,NAD83 to NAD83(HARN) (14),,,,United States (USA) - Michigan.,9613,,,,,,,,,9104,,,mihpgn.las,mihpgn.los,,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.,
-1488,NAD83 to NAD83(HARN) (15),,,,United States (USA) - Mississippi.,9613,,,,,,,,,9104,,,mshpgn.las,mshpgn.los,,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.,
-1489,NAD83 to NAD83(HARN) (16),,,,United States (USA) - Nebraska.,9613,,,,,,,,,9104,,,nbhpgn.las,nbhpgn.los,,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.,
-1490,NAD83 to NAD83(HARN) (17),,,,United States (USA) - Connecticut; Massachusetts; New Hampshire; Rhode Island; Vermont.,9613,,,,,,,,,9104,,,nehpgn.las,nehpgn.los,,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.,
-1491,NAD83 to NAD83(HARN) (18),,,,United States (USA) - New Mexico.,9613,,,,,,,,,9104,,,nmhpgn.las,nmhpgn.los,,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.,
-1492,NAD83 to NAD83(HARN) (19),,,,United States (USA) - New York.,9613,,,,,,,,,9104,,,nyhpgn.las,nyhpgn.los,,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.,
-1493,NAD83 to NAD83(HARN) (20),,,,United States (USA) - North Dakota.,9613,,,,,,,,,9104,,,ndhpgn.las,ndhpgn.los,,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.,
-1494,NAD83 to NAD83(HARN) (21),,,,United States (USA) - Oklahoma.,9613,,,,,,,,,9104,,,okhpgn.las,okhpgn.los,,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.,
-1495,NAD83 to NAD83(HARN) (22),,,,United States (USA) - Puerto Rico and the Virgin Islands.,9613,,,,,,,,,9104,,,pvhpgn.las,pvhpgn.los,,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.,
-1496,NAD83 to NAD83(HARN) (23),,,,United States (USA) - South Dakota.,9613,,,,,,,,,9104,,,sdhpgn.las,sdhpgn.los,,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.,
-1497,NAD83 to NAD83(HARN) (24),,,,United States (USA) - Tennessee,9613,,,,,,,,,9104,,,tnhpgn.las,tnhpgn.los,,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.,
-1498,NAD83 to NAD83(HARN) (25),,,,United States (USA) - Texas east of 100deg West.,9613,,,,,,,,,9104,,,ethpgn.las,ethpgn.los,,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.,
-1499,NAD83 to NAD83(HARN) (26),,,,United States (USA) - Texas west of 100deg West.,9613,,,,,,,,,9104,,,wthpgn.las,wthpgn.los,,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.,
-1500,NAD83 to NAD83(HARN) (27),,,,United States (USA) - Virginia.,9613,,,,,,,,,9104,,,vahpgn.las,vahpgn.los,,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.,
-1501,NAD83 to NAD83(HARN) (28),,,,United States (USA) - Oregan; Washington.,9613,,,,,,,,,9104,,,wohpgn.las,wohpgn.los,,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.,
-1502,NAD83 to NAD83(HARN) (29),,,,United States (USA) - Wisconsin.,9613,,,,,,,,,9104,,,wihpgn.las,wihpgn.los,,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.,
-1503,NAD83 to NAD83(HARN) (30),,,,United States (USA) - Wyoming.,9613,,,,,,,,,9104,,,wyhpgn.las,wyhpgn.los,,1999-10-20 00:00:00,US Coast & Geodetic Survey  www.ngs.noaa.gov  NADCON readme file,EPSG,Uses NADCON method which expects longitudes positive west; EPSG GeogCSs NAD83 (code 4269) and NAD83(HARN) (code 4140) have longitudes positive east.,
-1504,Cape to Hartbeesthoek94 (1),,,,South Africa.,9603,-134.73,-110.92,-292.66,,,,,9001,,,,,,,1999-10-20 00:00:00,Directorate of Surveys and Mapping; http://w3sli.wcape.gov.za/surveys/mapping/wgs84.htm,EPSG,,
-1505,Hartbeesthoek94 to WGS 84 (1),,,,South Africa.,9603,0.0,0.0,0.0,,,,,9001,,,,,,,1999-10-20 00:00:00,EPSG,EPSG,For many purposes Hartbeesthoek94 datum can be considered to be coincident with WGS 84.,
-1506,AGD66 to GDA94 (6),,,,Australia - Tasmania.,9615,,,,,,,,,9104,,,tas_1098.gsb,,,1999-10-20 00:00:00,http://www.delm.tas.gov.au/osg/Geodetic_transform.htm,EPSG,0.1m accuracy.  Input expects longitudes to be positive west; EPSG GeogCS AGD66 (code 4202) and GDA94 (code 4283) both have longitudes positive east.,
-1507,AGD66 to GDA94 (7),,,,Australia - Northern Territory.,9615,,,,,,,,,9104,,,nt_0599.gsb,,,1999-10-20 00:00:00,http://www.anzlic.org.au/icsm/gdatm/chapter7.htm#high,EPSG,0.1m accuracy.  Input expects longitudes to be positive west; EPSG GeogCS AGD66 (code 4202) and GDA94 (code 4283) both have longitudes positive east.,
-1508,CH1903 to WGS 84 (1),,,,Liechtenstein;  Switzerland.,9607,660.077,13.551,369.344,2.484,1.783,2.939,5.66,9001,9113,,9202,,,,1999-10-20 00:00:00,Bundesamt f�r Landestopographie.  Aufbau der Landesvermessung der Schweiz 'LV95' Teil 3: Terrestrische Bezugssysteme und Bezugsrahmen. L+T 1999.,EPSG,Implemented in Bundesamt f�r Landestopographie programme GRANIT.,
-1509,CH1903+ to CHTRF95 (1),,,,Liechtenstein;  Switzerland.,9603,674.374,15.056,405.346,,,,,9001,,,,,,,1999-10-20 00:00:00,Bundesamt f�r Landestopographie.  Aufbau der Landesvermessung der Schweiz 'LV95' Teil 3: Terrestrische Bezugssysteme und Bezugsrahmen. L+T 1999.,EPSG,,
-1510,CH1903 to WGS 84 (2),,,,Liechtenstein;  Switzerland.,9603,674.374,15.056,405.346,,,,,9001,,,,,,,1999-10-20 00:00:00,Bundesamt f�r Landestopographie.  Aufbau der Landesvermessung der Schweiz 'LV95' Teil 3: Terrestrische Bezugssysteme und Bezugsrahmen. L+T 1999.,EPSG,These parameters are strictly between CH1903+ and CHTRF95 but are used from CH1903 as an approximation which is within the accuracy of the distortions within the CH1903 network.,
-1511,CHTRF95 to WGS 84 (1),,,,Liechtenstein;  Switzerland.,9603,0.0,0.0,0.0,,,,,9001,,,,,,,1999-10-20 00:00:00,EPSG,EPSG,For many purposes CHTRF95 can be considered to be coincident with WGS 84.,
-1512,Rassadiran to WGS 84 (1),,,,Iran - Taheri refinery site only.,9603,-133.63,-157.5,-158.62,,,,,9001,,,,,,,1999-10-20 00:00:00,Total-Fina,EPSG,Used only for terminal site.,
-1513,FD58 to WGS 84 (1),,,,Iran - Kangan district.,9603,-241.54,-163.64,396.06,,,,,9001,,,,,,,1999-10-20 00:00:00,Total-Fina,EPSG,,
-1514,ED50(ED77) to WGS 84 (1),,,,Iran,9606,-110.33,-97.73,-119.85,0.3423,1.1634,0.2715,0.063,9001,9104,,9202,,,,1999-10-20 00:00:00,National Cartographic Centre of Iran,EPSG,,
-1515,NAD83 to WGS 84 (5),,,,United States (USA),9607,-0.991,1.9072,0.5129,-0.000000125033,-0.000000046785,-0.000000056529,0.0,9001,9101,,9202,,,,1999-11-05 00:00:00, http://www.ngs.noaa.gov/CORS/Derivation.html,EPSG,Strictly between NAD83 and ITRF96(1997.0).  Supersedes NAD83 to WGS 84 (4) (code 1308).,
-1516,La Canoa to WGS 84 (1),,,,Venezuela east - Delta Amacuro; Anzoategui; Bolivar; Monagas; Sucre states.,9603,-273.5,110.6,-357.9,,,,,9001,,,,,,,1999-11-05 00:00:00,"Lagoven; Gonzalez Losano y Rodriguez; \"Determination de los Parametros de Transformacion para el Oriente del Pais\"; VII Venezuelan Geophysical Congress; September 1994.",EPSG,Also used for PSAD56 to WGS 84 transformations.  Parameter values estimated accuracy: � 2.0m;  � 2.7m;  � 1.3m respectively.,
-10101,Alabama CS27 East zone,Alabama East,,,United States (USA) - Alabama - Counties east of 86d 37m West.,9807,30.3,-85.5,,,0.99996,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-10102,Alabama CS27 West zone,Alabama West,,,United States (USA) - Alabama - Counties east of 86d 37m West.,9807,30.0,-87.3,,,0.999933333,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-10131,Alabama CS83 East zone,Alabama East,,,United States (USA) - Alabama - Counties east of 86d 37m West.,9807,30.3,-85.5,,,0.99996,200000.0,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-10132,Alabama CS83 West zone,Alabama West,,,United States (USA) - Alabama - Counties east of 86d 37m West.,9807,30.0,-87.3,,,0.999933333,600000.0,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-10201,Arizona Coordinate System  east zone,Arizona East,,,United States (USA) - Arizona - Apache; Cochise; Gila; Graham; Greenlee and Navajo counties; i.e. east of about 110d 45m West.,9807,31.0,-110.1,,,0.9999,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-10202,Arizona Coordinate System Central zone,Arizona Central,,,United States (USA) - Arizona - Coconino; Maricopa; Pima; Pinal; Santa Cruz and Yavapai counties; i.e between about 110d 45m & 113d 20m west,9807,31.0,-111.55,,,0.9999,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-10203,Arizona Coordinate System  west zone,Arizona West,,,United States (USA) - Arizona - La Paz; Mohave and Yuma counties; i.e west of about 113d 20m,9807,31.0,-113.45,,,0.999933333,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-10231,Arizona CS83  east zone,Arizona  East,,,United States (USA) - Arizona - counties east of 110d 45m West,9807,31.0,-110.1,,,0.9999,213360.0,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,State law defines origin in International feet. FE = 700000ft.,95.30  96.29
-10232,Arizona CS83 Central zone,Arizona Central,,,United States (USA) - Arizona - Coconino; Maricopa; Pima; Pinal; Santa Cruz and Yavapai counties; i.e between about 110d 45m & 113d 20m west,9807,31.0,-111.55,,,0.9999,213360.0,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,State law defines origin in International feet. FE = 700000ft.,95.30  96.29
-10233,Arizona CS83  west zone,Arizona West,,,United States (USA) - Arizona - La Paz; Mohave and Yuma counties; i.e west of about 113d 20m,9807,31.0,-113.45,,,0.999933333,213360.0,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,State law defines origin in International feet. FE = 700000ft.,95.30  96.29
-10301,Arkansas CS27 North,Arkansas North,,,United States (USA) - Arkansas - counties north of 34d 50m North.,9802,34.2,-92.0,36.14,34.56,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-10302,Arkansas CS27 South,Arkansas South,,,United States (USA) - Arkansas - counties south of 34d 50m North.,9802,32.4,-92.0,34.46,33.18,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-10331,Arkansas CS83 North zone,Arkansas North,,,United States (USA) - Arkansas - counties north of 34d 50m North.,9802,34.2,-92.0,36.14,34.56,,400000.0,0.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-10332,Arkansas CS83 South zone,Arkansas South,,,United States (USA) - Arkansas - counties south of 34d 50m North.,9802,32.4,-92.0,34.46,33.18,,400000.0,400000.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-10401,California CS27 zone I,California zone I,,,United States (USA) - California - counties north of 40deg North.,9802,39.2,-122.0,41.4,40.0,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-10402,California CS27 zone II,California zone II,,,United States (USA) - California - counties between 40d & 38d 15m North.,9802,37.4,-122.0,39.5,38.2,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-10403,California CS27 zone III,California zone III,,,United States (USA) - California - counties between 38d 15m & 37d North.,9802,36.3,-120.3,38.26,37.04,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-10404,California CS27 zone IV,California zone IV,,,United States (USA) - California - counties between 37d & 35d 30m North.,9802,35.2,-119.0,37.15,36.0,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-10405,California CS27 zone V,California zone V,,,United States (USA) - California - counties between 35d 50m & 34d North.,9802,33.3,-118.0,35.28,34.02,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-10406,California CS27 zone VI,California zone VI,,,United States (USA) - California - counties south of 34deg North.,9802,32.1,-116.15,33.53,32.47,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-10407,California CS27 zone VII,California zone VII,,,United States (USA) - California - Los Angeles.,9802,34.08,-118.2,34.25,33.52,,4186692.58,416926.74,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-10431,California CS83 zone 1,California zone 1,,,United States (USA) - California - counties north of 40deg North.,9802,39.2,-122.0,41.4,40.0,,2000000.0,500000.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-10432,California CS83 zone 2,California zone 2,,,United States (USA) - California - counties between 40d & 38d 15m North.,9802,37.4,-122.0,39.5,38.2,,2000000.0,500000.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-10433,California CS83 zone 3,California zone 3,,,United States (USA) - California - counties between 38d 15m & 37d North.,9802,36.3,-120.3,38.26,37.04,,2000000.0,500000.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-10434,California CS83 zone 4,California zone 4,,,United States (USA) - California - counties between 37d & 35d 30m North.,9802,35.2,-119.0,37.15,36.0,,2000000.0,500000.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-10435,California CS83 zone 5,California zone 5,,,United States (USA) - California - counties between 35d 50m & 34d North.,9802,33.3,-118.0,35.28,34.02,,2000000.0,500000.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-10436,California CS83 zone 6,California zone 6,,,United States (USA) - California - counties south of 34deg North.,9802,32.1,-116.15,33.53,32.47,,2000000.0,500000.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-10501,Colorado CS27 North zone,Colorado North,,,United States (USA) - Colorado - counties north of 39d 50m North.,9802,39.2,-105.3,39.43,40.47,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-10502,Colorado CS27 Central zone,Colorado Central,,,United States (USA) - Colorado - counties between 39d 50m & 38d 30m North.,9802,37.5,-105.3,39.45,38.27,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-10503,Colorado CS27 South zone,Colorado South,,,United States (USA) - Colorado - counties south of 38d 30m North.,9802,36.4,-105.3,38.26,37.14,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-10531,Colorado CS83 North zone,Colorado North,,,United States (USA) - Colorado - counties north of 39d 50m North.,9802,39.2,-105.3,40.47,39.43,,914401.8289,304800.6096,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-10532,Colorado CS83 Central zone,Colorado Central,,,United States (USA) - Colorado - counties between 39d 50m & 38d 30m North.,9802,37.5,-105.3,39.45,38.27,,914401.8289,304800.6096,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-10533,Colorado CS83 South zone,Colorado South,,,United States (USA) - Colorado - counties south of 38d 30m North.,9802,36.4,-105.3,38.26,37.14,,914401.8289,304800.6096,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-10600,Connecticut CS27,Connecticut,,,United States (USA) - Connecticut.,9802,40.5,-72.45,41.52,41.12,,600000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-10630,Connecticut CS83,Connecticut,,,United States (USA) - Connecticut.,9802,40.5,-72.45,41.52,41.12,,304800.6096,152400.3048,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-10700,Delaware CS27,Delaware,,,United States (USA) - Delaware.,9807,38.0,-75.25,,,0.999995,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-10730,Delaware CS83,Delaware,,,United States (USA) - Delaware.,9807,38.0,-75.25,,,0.999995,200000.0,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-10901,Florida CS27 East zone,Florida East,,,United States (USA) - Florida - counties east of 81d 45m West.,9807,24.2,-81.0,,,0.999941177,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-10902,Florida CS27 West zone,Florida West,,,United States (USA) - Florida - counties west of 81d 45m West & south of 29d 30m North.,9807,24.2,-82.0,,,0.999941177,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-10903,Florida CS27 North zone,Florida North,,,United States (USA) - Florida - north of 29d 30m North & west of 82d West.,9802,29.0,-84.3,30.45,29.35,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-10931,Florida CS83 East zone,Florida  East,,,United States (USA) - Florida - counties east of 81d 45m West.,9807,24.2,-81.0,,,0.999941177,200000.0,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-10932,Florida CS83 West zone,Florida  West,,,United States (USA) - Florida - counties west of 81d 45m West & south of 29d 30m North.,9807,24.2,-82.0,,,0.999941177,200000.0,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-10933,Florida CS83 North zone,Florida North,,,United States (USA) - Florida - north of 29d 30m North & west of 82d West.,9802,29.0,-84.3,30.45,29.35,,600000.0,0.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-11001,Georgia CS27 East zone,Georgia East,,,United States (USA) - Georgia - counties east of 83d 15m West.,9807,30.0,-82.1,,,0.9999,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-11002,Georgia CS27 West zone,Georgia West,,,United States (USA) - Georgia - counties west of 83d 15m West.,9807,30.0,-84.1,,,0.9999,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-11031,Georgia CS83 East zone,Georgia  East,,,United States (USA) - Georgia - counties east of 83d 15m West.,9807,30.0,-82.1,,,0.9999,200000.0,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-11032,Georgia CS83 West zone,Georgia West,,,United States (USA) - Georgia - counties west of 83d 15m West.,9807,30.0,-84.1,,,0.9999,700000.0,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-11101,Idaho CS27 East zone,Idaho East,,,United States (USA) - Idaho - counties east of 113d West.,9807,41.4,-112.1,,,0.999947368,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-11102,Idaho CS27 Central zone,Idaho Central,,,United States (USA) - Idaho - counties between 113d & 115d West.,9807,41.4,-114.0,,,0.999947368,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-11103,Idaho CS27 West zone,Idaho West,,,United States (USA) - Idaho - counties west of 115d West.,9807,41.4,-115.45,,,0.999933333,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-11131,Idaho CS83 East zone,Idaho  East,,,United States (USA) - Idaho - counties east of 113d West.,9807,41.4,-112.1,,,0.999947368,200000.0,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-11132,Idaho CS83 Central zone,Idaho  Central,,,United States (USA) - Idaho - counties between 113d & 115d West.,9807,41.4,-114.0,,,0.999947368,500000.0,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-11133,Idaho CS83 West zone,Idaho  West,,,United States (USA) - Idaho - counties west of 115d West.,9807,41.4,-115.45,,,0.999933333,800000.0,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-11201,Illinois CS27 East zone,Illinois East,,,United States (USA) - Illinois - counties east of 89d 05m West.,9807,36.4,-88.2,,,0.999975,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-11202,Illinois CS27 West zone,Illinois West,,,United States (USA) - Illinois - counties west of 89d 05m West.,9807,36.4,-90.1,,,0.999941177,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-11231,Illinois CS83 East zone,Illinois  East,,,United States (USA) - Illinois - counties east of 89d 05m West.,9807,36.4,-88.2,,,0.999975,300000.0,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-11232,Illinois CS83 West zone,Illinois  West,,,United States (USA) - Illinois - counties west of 89d 05m West.,9807,36.4,-90.1,,,0.999941177,700000.0,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-11301,Indiana CS27 East zone,Indiana East,,,United States (USA) - Indiana - counties east of 86d 25m West.,9807,37.3,-85.4,,,0.999966667,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-11302,Indiana CS27 West zone,Indiana West,,,United States (USA) - Indiana - counties west of 86d 25m West.,9807,37.3,-87.05,,,0.999966667,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-11331,Indiana CS83 East zone,Indiana  East,,,United States (USA) - Indiana - counties east of 86d 25m West.,9807,37.3,-85.4,,,0.999966667,100000.0,250000.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-11332,Indiana CS83 West zone,Indiana  West,,,United States (USA) - Indiana - counties west of 86d 25m West.,9807,37.3,-87.05,,,0.999966667,900000.0,250000.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-11401,Iowa CS27 North zone,Iowa North,,,United States (USA) - Iowa - counties north of 42deg North.,9802,41.3,-93.3,43.16,42.04,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-11402,Iowa CS27 South zone,Iowa South,,,United States (USA) - Iowa - counties south of 42deg North.,9802,40.0,-93.3,41.47,40.37,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-11431,Iowa CS83 North zone,Iowa North,,,United States (USA) - Iowa - counties north of 42deg North.,9802,41.3,-93.3,43.16,42.04,,1500000.0,1000000.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-11432,Iowa CS83 South zone,Iowa South,,,United States (USA) - Iowa - counties south of 42deg North.,9802,40.0,-93.3,41.47,40.37,,500000.0,0.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-11501,Kansas CS27 North zone,Kansas North,,,United States (USA) - Kansas - counties north of 38d 45m North.,9802,38.2,-98.0,39.47,38.43,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-11502,Kansas CS27 South zone,Kansas South,,,United States (USA) - Kansas - counties south of 38d 45m North.,9802,36.4,-98.3,38.34,37.16,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-11531,Kansas CS83 North zone,Kansas North,,,United States (USA) - Kansas - counties north of 38d 45m North.,9802,38.2,-98.0,39.47,38.43,,400000.0,0.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-11532,Kansas CS83 South zone,Kansas South,,,United States (USA) - Kansas - counties south of 38d 45m North.,9802,36.4,-98.3,38.34,37.16,,400000.0,400000.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-11601,Kentucky CS27 North zone,Kentucky North,,,United States (USA) - Kentucky - counties north of 37d 55m North.,9802,37.3,-84.15,37.58,38.58,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-11602,Kentucky CS27 South zone,Kentucky South,,,United States (USA) - Kentucky - counties south of 37d 55m North.,9802,36.2,-85.45,36.44,37.56,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-11631,Kentucky CS83 North zone,Kentucky North,,,United States (USA) - Kentucky - counties north of 37d 55m North.,9802,37.3,-84.15,37.58,37.58,,500000.0,0.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-11632,Kentucky CS83 South zone,Kentucky South,,,United States (USA) - Kentucky - counties south of 37d 55m North.,9802,36.2,-85.45,37.56,36.44,,500000.0,500000.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-11701,Louisiana CS27 North zone,Louisiana North,,,United States (USA) - Louisiana - counties north of 30d 55m North.,9802,30.4,-92.3,31.1,32.4,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-11702,Louisiana CS27 South zone,Louisiana South,,,United States (USA) - Louisiana - counties south of 30d 55m North. Also Gulf of Mexico LA shelf.,9802,28.4,-91.2,29.18,30.42,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-11731,Louisiana CS83 North zone,Louisiana North,,,United States (USA) - Louisiana - counties north of 30d 55m North.,9802,30.3,-92.3,32.4,31.1,,1000000.0,0.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-11732,Louisiana CS83 South zone,Louisiana South,,,United States (USA) - Louisiana - counties south of 30d 55m North.,9802,28.3,-91.2,30.42,29.18,,1000000.0,0.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-11801,Maine CS27 East zone,Maine East,,,United States (USA) - Maine - counties east of 69d 30m West.,9807,43.5,-68.3,,,0.9999,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-11802,Maine CS27 West zone,Maine West,,,United States (USA) - Maine - counties west of 69d 30m West.,9807,42.5,-70.1,,,0.999966667,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-11831,Maine CS83 East zone,Maine  East,,,United States (USA) - Maine - counties east of 69d 30m West.,9807,43.4,-68.3,,,0.9999,300000.0,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-11832,Maine CS83 West zone,Maine  West,,,United States (USA) - Maine - counties west of 69d 30m West.,9807,42.5,-70.1,,,0.999966667,900000.0,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-11900,Maryland CS27,Maryland,,,United States (USA) - Maryland.,9802,37.5,-77.0,38.18,39.27,,800000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-11930,Maryland CS83,Maryland,,,United States (USA) - Maryland.,9802,37.4,-77.0,39.27,38.18,,400000.0,0.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-12001,Massachusetts CS27 Mainland zone,Massachusetts Mainland,,,United States (USA) - Massachusetts onshore.,9802,41.0,-71.3,41.43,42.41,,600000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-12002,Massachusetts CS27 Island zone,Massachusetts Island,,,United States (USA) - Massachusetts islands.,9802,41.0,-70.3,41.17,41.29,,200000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-12031,Massachusetts CS83 Mainland zone,Massachusetts Mainland,,,United States (USA) - Massachusetts onshore.,9802,41.0,-71.3,42.41,41.43,,200000.0,750000.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-12032,Massachusetts CS83 Island zone,Massachusetts Island,,,United States (USA) - Massachusetts islands.,9802,41.0,-70.3,41.29,41.17,,500000.0,0.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-12101,Michigan State Plane East zone,Michigan East,,,United States (USA) - Michigan.,9807,41.3,-83.4,,,0.999942857,500000.0,0.0,9003,9110,8901,,,,,1998-11-11 00:00:00,USGS Professional Paper #1395,EPSG,Obsolete. Superseded by north central and south zones.,95.30  96.29  98.22
-12102,Michigan State Plane Old Central zone,Michigan Old Central,,,United States (USA) - Michigan.,9807,41.3,-85.45,,,0.999909091,500000.0,0.0,9003,9110,8901,,,,,1998-11-11 00:00:00,USGS Professional Paper #1395,EPSG,Obsolete. Superseded by north central and south zones.,95.30  96.29  98.22
-12103,Michigan State Plane West zone,Michigan West,,,United States (USA) - Michigan.,9807,41.3,-88.45,,,0.999909091,500000.0,0.0,9003,9110,8901,,,,,1998-11-11 00:00:00,USGS Professional Paper #1395,EPSG,Obsolete. Superseded by north central and south zones.,95.30  96.29  98.22
-12111,Michigan CS27 North zone,Michigan North,,,United States (USA) - Michigan - counties north of 45d 45m North.,9802,44.47,-87.0,45.29,47.05,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.28  96.29  98.22  99.28
-12112,Michigan CS27 Central zone,Michigan Central,,,United States (USA) - Michigan - counties between 45d 45m & 43d 55m North.,9802,43.19,-84.2,44.11,45.42,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.28  96.29  98.22  99.28
-12113,Michigan CS27 South zone,Michigan South,,,United States (USA) - Michigan - counties south of 43d 55m North.,9802,41.3,-84.2,42.06,43.4,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.28  96.29  98.22  99.28
-12141,Michigan CS83 North zone,Michigan North,,,United States (USA) - Michigan - counties north of 45d 45m North.,9802,44.47,-87.0,47.05,45.29,,8000000.0,0.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-12142,Michigan CS83 Central zone,Michigan Central,,,United States (USA) - Michigan - counties between 45d 45m & 43d 55m North.,9802,43.19,-84.22,45.42,44.11,,6000000.0,0.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-12143,Michigan CS83 South zone,Michigan South,,,United States (USA) - Michigan - counties south of 43d 55m North.,9802,41.3,-84.22,43.4,42.06,,4000000.0,0.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-12201,Minnesota CS27 North zone,Minnesota North,,,United States (USA) - Minnesota - counties north of 47d 10m North.,9802,46.3,-93.06,47.02,48.38,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-12202,Minnesota CS27 Central zone,Minnesota Central,,,United States (USA) - Minnesota - counties between 47d 10m & 45d 30m North.,9802,45.0,-94.15,45.37,47.03,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-12203,Minnesota CS27 South zone,Minnesota South,,,United States (USA) - Minnesota - counties south of 45d 30m North.,9802,43.0,-94.0,43.47,45.13,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-12231,Minnesota CS83 North zone,Minnesota North,,,United States (USA) - Minnesota - counties north of 47d 10m North.,9802,46.3,-93.06,48.38,47.02,,800000.0,100000.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-12232,Minnesota CS83 Central zone,Minnesota Central,,,United States (USA) - Minnesota - counties between 47d 10m & 45d 30m North.,9802,45.0,-94.15,47.03,45.37,,800000.0,100000.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-12233,Minnesota CS83 South zone,Minnesota South,,,United States (USA) - Minnesota - counties south of 45d 30m North.,9802,43.0,-94.0,45.13,43.47,,800000.0,100000.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-12301,Mississippi CS27 East zone,Mississippi East,,,United States (USA) - Mississippi - counties east of 89d 40m West.,9807,29.4,-88.5,,,0.99996,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-12302,Mississippi CS27 West zone,Mississippi West,,,United States (USA) - Mississippi - counties west of 89d 40m West.,9807,30.3,-90.2,,,0.999941177,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-12331,Mississippi CS83 East zone,Mississippi East,,,United States (USA) - Mississippi - counties east of 89d 40m West.,9807,29.3,-88.5,,,0.99995,300000.0,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-12332,Mississippi CS83 West zone,Mississippi West,,,United States (USA) - Mississippi - counties west of 89d 40m West.,9807,29.3,-90.2,,,0.99995,700000.0,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-12401,Missouri CS27 East zone,Missouri East,,,United States (USA) - Missouri - counties east of 91d 45m West.,9807,35.5,-90.3,,,0.999933333,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.18  95.30  96.29
-12402,Missouri CS27 Central zone,Missouri Central,,,United States (USA) - Missouri - counties between 91d 45m & 93d 35m West.,9807,35.5,-92.3,,,0.999933333,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-12403,Missouri CS27 West zone,Missouri West,,,United States (USA) - Missouri - counties west of 93d 35m West.,9807,36.1,-94.3,,,0.999941177,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-12431,Missouri CS83 East zone,Missouri  East,,,United States (USA) - Missouri - counties east of 91d 45m West..,9807,35.5,-90.3,,,0.999933333,250000.0,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-12432,Missouri CS83 Central zone,Missouri Central,,,United States (USA) - Missouri - counties between 91d 45m & 93d 35m West,9807,35.5,-92.3,,,0.999933333,500000.0,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-12433,Missouri CS83 West zone,Missouri  West,,,United States (USA) - Missouri - counties west of 93d 35m West.,9807,36.1,-94.3,,,0.999941177,850000.0,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-12501,Montana CS27 North zone,Montana North,,,United States (USA) - Montana - counties north of 47d 50m North.,9802,47.0,-109.3,48.43,47.51,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-12502,Montana CS27 Central zone,Montana Central,,,United States (USA) - Montana - counties between 47d 50m & 46d 40m North.,9802,45.5,-109.3,47.53,46.27,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-12503,Montana CS27 South zone,Montana South,,,United States (USA) - Montana - counties south of 46d 40m North.,9802,44.0,-109.3,46.24,44.52,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-12530,Montana CS83,Montana,,,United States (USA) - Montana.,9802,44.15,-109.3,49.0,45.0,,600000.0,0.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-12601,Nebraska CS27 North zone,Nebraska North,,,United States - Nebraska -Antelope; Blaine; Box Butte; Boyd; Brown; Burt; Cedar; Cherry; Cuming; Dakota; Dawes; Dixon; Garfield; Grant; Holt; Hooker; Keya Paha; Knox; Loup; Madison; Pierce; Rock; Sheridan; Sioux; Stanton; Thomas; Thurston; Wayne; Wheeler,9802,41.2,-100.0,41.51,42.49,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-12602,Nebraska CS27 South zone,Nebraska South,,,"United States (USA) - Nebraska - counties south of and including Scotts Bluff; Morrill; Garden; Arthur; McPherson; Logan; Custer; Valley; Greeley; Boome, Platte; Colfax; Dodge; Washington.",9802,39.4,-99.3,40.17,41.43,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-12630,Nebraska CS83,Nebraska,,,United States (USA) - Nebraska.,9802,39.5,-100.0,43.0,40.0,,500000.0,0.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-12701,Nevada CS27 East zone,Nevada East,,,United States (USA) - Nevada - counties east of 116d  West & Eureka county.,9807,34.45,-115.35,,,0.9999,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-12702,Nevada CS27 Central zone,Nevada Central,,,United States (USA) - Nevada - Lander & Nye counties.,9807,34.45,-116.4,,,0.9999,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-12703,Nevada CS27 West zone,Nevada West,,,United States (USA) - Nevada - counties west of 117d 15m West.,9807,34.45,-118.35,,,0.9999,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-12731,Nevada CS83 East zone,Nevada  East,,,United States (USA) - Nevada - counties east of 116d  West & Eureka county.,9807,34.45,-115.35,,,0.9999,200000.0,8000000.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-12732,Nevada CS83 Central zone,Nevada Central,,,United States (USA) - Nevada - Lander & Nye counties.,9807,34.45,-116.4,,,0.9999,500000.0,6000000.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-12733,Nevada CS83 West zone,Nevada West,,,United States (USA) - Nevada - counties west of 117d 15m West.,9807,34.45,-118.35,,,0.9999,800000.0,4000000.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-12800,New Hampshire CS27,New Hampshire,,,United States (USA) - New Hampshire.,9807,42.3,-71.4,,,0.999966667,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-12830,New Hampshire CS83,New Hampshire,,,United States (USA) - New Hampshire.,9807,42.3,-71.4,,,0.999966667,300000.0,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-12900,New Jersey CS27,New Jersey,,,United States (USA) - New Jersey.,9807,38.5,-74.4,,,0.999975,2000000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-12930,New Jersey CS83,New Jersey,,,United States (USA) - New Jersey.,9807,38.5,-74.3,,,0.9999,150000.0,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-13001,New Mexico CS27 East zone,New Mexico East,,,United States (USA) - New Mexico - counties east of 105d West.,9807,31.0,-104.2,,,0.999909091,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-13002,New Mexico CS27 Central zone,New Mexico Central,,,United States (USA) - New Mexico - counties between 105d & 107d 15m West.,9807,31.0,-106.15,,,0.9999,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-13003,New Mexico CS27 West zone,New Mexico West,,,United States (USA) - New Mexico - counties west of 107d 15m West.,9807,31.0,-107.5,,,0.999916667,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-13031,New Mexico CS83 East zone,New Mexico East,,,United States (USA) - New Mexico - counties east of 105d West.,9807,31.0,-104.2,,,0.999909091,165000.0,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-13032,New Mexico CS83 Central zone,New Mexico Central,,,United States (USA) - New Mexico - counties between 105d & 107d 15m West.,9807,31.0,-106.15,,,0.9999,500000.0,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-13033,New Mexico CS83 West zone,New Mexico West,,,United States (USA) - New Mexico - counties west of 107d 15m West.,9807,31.0,-107.5,,,0.999916667,830000.0,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-13101,New York CS27 East zone,New York East,,,United States (USA) - New York - counties east of 75d 15m West excluding Long Island.,9807,40.0,-74.2,,,0.999966667,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.18  95.30  96.29
-13102,New York CS27 Central zone,New York Central,,,United States (USA) - New York - counties between 75d 15m & 77d 30m West.,9807,40.0,-76.35,,,0.9999375,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-13103,New York CS27 West zone,New York West,,,United States (USA) - New York - counties west of 77d 30m West.,9807,40.0,-78.35,,,0.9999375,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-13104,New York CS27 Long Island zone,New York Long Island,,,United States (USA) - New York - Long Island.,9802,40.3,-74.0,41.02,40.4,,1000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-13131,New York CS83 East zone,New York  East,,,United States (USA) - New York - counties east of 75d 15m West excluding Long Island.,9807,38.5,-74.3,,,0.9999,150000.0,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-13132,New York CS83 Central zone,New York Central,,,United States (USA) - New York - counties between 75d 15m & 77d 30m West.,9807,40.0,-76.35,,,0.9999375,250000.0,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-13133,New York CS83 West zone,New York  West,,,United States (USA) - New York - counties west of 77d 30m West.,9807,40.0,-78.35,,,0.9999375,350000.0,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-13134,New York CS83 Long Island zone,New York Long Island,,,United States (USA) - New York - Long Island.,9802,40.1,-74.0,41.02,40.4,,300000.0,0.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-13200,North Carolina CS27,North Carolina,,,United States (USA) - North Carolina.,9802,33.45,-79.0,34.2,36.1,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-13230,North Carolina CS83,North Carolina,,,United States (USA) - North Carolina.,9802,33.45,-79.0,36.1,34.2,,609601.22,0.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-13301,North Dakota CS27 North zone,North Dakota North,,,United States (USA) - North Dakota - counties north of 47d 25m North.,9802,47.0,-100.3,47.26,48.44,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-13302,North Dakota CS27 South zone,North Dakota South,,,United States (USA) - North Dakota - counties south of 47d 25m North.,9802,45.4,-100.3,46.11,47.29,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-13331,North Dakota CS83 North zone,North Dakota North,,,United States (USA) - North Dakota - counties north of 47d 25m North.,9802,47.0,-100.3,48.44,47.26,,600000.0,0.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-13332,North Dakota CS83 South zone,North Dakota South,,,United States (USA) - North Dakota - counties south of 47d 25m North.,9802,45.4,-100.3,47.29,46.11,,600000.0,0.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-13401,Ohio CS27 North zone,Ohio North,,,United States (USA) - Ohio - counties north of 40d 15m North.,9802,39.4,-82.3,40.26,41.42,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-13402,Ohio CS27 South zone,Ohio South,,,United States (USA) - Ohio - counties south of 40d 15m North.,9802,38.0,-82.3,38.44,40.02,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-13431,Ohio CS83 North zone,Ohio North,,,United States (USA) - Ohio - counties north of 40d 15m North.,9802,39.4,-82.3,41.42,40.26,,600000.0,0.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-13432,Ohio CS83 South zone,Ohio South,,,United States (USA) - Ohio - counties south of 40d 15m North.,9802,38.0,-82.3,40.02,38.44,,600000.0,0.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-13501,Oklahoma CS27 North zone,Oklahoma North,,,United States (USA) - Oklahoma - counties north of 35d 20m North.,9802,35.0,-98.0,35.34,36.46,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-13502,Oklahoma CS27 South zone,Oklahoma South,,,United States (USA) - Oklahoma - counties south of 35d 20m North.,9802,33.2,-98.0,33.56,35.14,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-13531,Oklahoma CS83 North zone,Oklahoma North,,,United States (USA) - Oklahoma - counties north of 35d 20m North.,9802,35.0,-98.0,36.46,35.34,,600000.0,0.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-13532,Oklahoma CS83 South zone,Oklahoma South,,,United States (USA) - Oklahoma - counties south of 35d 20m North.,9802,33.2,-98.0,35.14,33.56,,600000.0,0.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-13601,Oregon CS27 North zone,Oregon North,,,United States (USA) - Oregon - counties north of 44d 15m North.,9802,43.4,-120.3,44.2,46.0,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-13602,Oregon CS27 South zone,Oregon South,,,United States (USA) - Oregon - counties south of 44d 15m North.,9802,41.4,-120.3,42.2,44.0,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-13631,Oregon CS83 North zone,Oregon North,,,United States (USA) - Oregon - counties north of 44d 15m North.,9802,43.4,-120.3,46.0,44.2,,2500000.0,0.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-13632,Oregon CS83 South zone,Oregon South,,,United States (USA) - Oregon - counties south of 44d 15m North.,9802,41.4,-120.3,44.0,42.2,,1500000.0,0.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-13701,Pennsylvania CS27 North zone,Pennsylvania North,,,United States (USA) - Pennsylvania - counties north of 40d 50m North.,9802,40.1,-77.45,40.53,41.57,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-13702,Pennsylvania CS27 South zone,Pennsylvania South,,,United States (USA) - Pennsylvania - counties south of 40d 50m North.,9802,39.2,-77.45,39.56,40.48,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-13731,Pennsylvania CS83 North zone,Pennsylvania North,,,United States (USA) - Pennsylvania - counties north of 40d 50m North.,9802,40.1,-77.45,41.57,40.53,,600000.0,0.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-13732,Pennsylvania CS83 South zone,Pennsylvania South,,,United States (USA) - Pennsylvania - counties south of 40d 50m North.,9802,39.2,-77.45,40.58,39.56,,600000.0,0.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-13800,Rhode Island CS27,Rhode Island,,,United States (USA) - Rhode Island.,9807,41.05,-71.3,,,0.9999938,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-13830,Rhode Island CS83,Rhode Island,,,United States (USA) - Rhode Island.,9807,41.05,-71.3,,,0.99999375,100000.0,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-13901,South Carolina CS27 North zone,South Carolina North,,,United States (USA) - South Carolina counties north of and including Edgefield; Saluda; Lexington; Calhoun; Sumter; Florence; Marion & Horry.,9802,33.0,-81.0,33.46,34.58,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-13902,South Carolina CS27 South zone,South Carolina South,,,United States (USA) - South Carolina - Aiken; Allendale; Bamberg; Barnwell; Beaufort; Berkeley; Charleston; Clarendon; Colleton; Dorchester; Georgetown; Hampton; Jasper; Orangeburg & Williamsburg counties.,9802,31.5,-81.0,32.2,33.4,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-13930,South Carolina CS83,South Carolina,,,United States (USA) - South Carolina.,9802,31.5,-81.0,34.5,32.3,,609600.0,0.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-14001,South Dakota CS27 North zone,South Dakota North,,,United States (USA) - South Dakota - counties north of 44d 20m North.,9802,43.5,-100.0,44.25,45.41,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-14002,South Dakota CS27 South zone,South Dakota South,,,United States (USA) - South Dakota - counties south of 44d 20m North.,9802,42.2,-100.2,42.5,44.24,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-14031,South Dakota CS83 North zone,South Dakota North,,,United States (USA) - South Dakota - counties north of 44d 20m North.,9802,43.5,-100.0,45.41,44.25,,600000.0,0.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-14032,South Dakota CS83 South zone,South Dakota South,,,United States (USA) - South Dakota - counties south of 44d 20m North.,9802,42.2,-100.2,44.24,42.5,,600000.0,0.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-14100,Tennessee CS27,Tennessee,,,United States (USA) - Tennessee.,9802,34.4,-86.0,35.15,36.25,,100000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-14130,Tennessee CS83,Tennessee,,,United States (USA) - Tennessee.,9802,34.2,-86.0,36.25,35.15,,600000.0,0.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-14201,Texas CS27 North zone,Texas North,,,United States (USA) - Texas - counties north of 34d 20m North.,9802,34.0,-101.3,34.39,36.11,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-14202,Texas CS27 North Central zone,Texas North Central,,,United States (USA) - Texas - counties between 34d 20m & 32deg North.,9802,31.4,-97.3,32.08,33.58,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-14203,Texas CS27 Central zone,Texas Central,,,United States (USA) - Texas - counties between 32deg & 30d 10m North.,9802,29.4,-100.2,30.07,31.53,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-14204,Texas CS27 South Central zone,Texas South Central,,,United States (USA) - Texas - counties between 30d 10m & 28d 05m North.,9802,27.5,-99.0,28.23,30.17,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-14205,Texas CS27 South zone,Texas South,,,United States (USA) - Texas - counties south of 28d 05m North.,9802,25.4,-98.3,26.1,27.5,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-14231,Texas CS83 North zone,Texas North,,,United States (USA) - Texas - counties north of 34d 20m North.,9802,34.0,-101.3,36.11,34.39,,200000.0,1000000.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-14232,Texas CS83 North Central zone,Texas North Central,,,United States (USA) - Texas - counties between 34d 20m & 32deg North.,9802,31.4,-98.3,33.58,32.08,,600000.0,2000000.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-14233,Texas CS83 Central zone,Texas Central,,,United States (USA) - Texas - counties between 32deg & 30d 10m North.,9802,29.4,-100.2,31.53,30.07,,700000.0,3000000.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-14234,Texas CS83 South Central zone,Texas South Central,,,United States (USA) - Texas - counties between 30d 10m & 28d 05m North.,9802,27.5,-99.0,30.17,28.23,,600000.0,4000000.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-14235,Texas CS83 South zone,Texas South,,,United States (USA) - Texas - counties south of 28d 05m North.,9802,25.4,-98.3,27.5,26.1,,300000.0,5000000.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-14301,Utah CS27 North zone,Utah North,,,United States (USA) - Utah - counties north of 40d 50m North.,9802,40.2,-111.3,40.43,41.47,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-14302,Utah CS27 Central zone,Utah Central,,,United States (USA) - Utah - counties between 40d 50m & 38d 30m North.,9802,38.2,-111.3,39.01,40.39,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-14303,Utah CS27 South zone,Utah South,,,United States (USA) - Utah - counties south of 38d 30m North.,9802,36.4,-111.3,37.13,38.21,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-14331,Utah CS83 North zone,Utah North,,,United States (USA) - Utah - counties north of 40d 50m North.,9802,40.2,-111.3,41.47,40.43,,500000.0,1000000.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-14332,Utah CS83 Central zone,Utah Central,,,United States (USA) - Utah - counties between 40d 50m & 38d 30m North.,9802,38.2,-111.3,40.39,39.01,,500000.0,2000000.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-14333,Utah CS83 South zone,Utah South,,,United States (USA) - Utah - counties south of 38d 30m North.,9802,36.4,-111.3,38.21,37.13,,500000.0,3000000.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-14400,Vermont CS27,Vermont,,,United States (USA) - Vermont.,9807,42.3,-72.3,,,0.999964286,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-14430,Vermont CS83,Vermont,,,United States (USA) - Vermont.,9807,42.3,-72.3,,,0.999964286,500000.0,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-14501,Virginia CS27 North zone,Virginia North,,,United States (USA) - Virginia - counties north of 38d 05m North.,9802,37.4,-78.3,38.02,39.12,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-14502,Virginia CS27 South zone,Virginia South,,,United States (USA) - Virginia - counties south of 38d 05m North.,9802,36.2,-78.3,36.46,37.58,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-14531,Virginia CS83 North zone,Virginia North,,,United States (USA) - Virginia - counties north of 38d 05m North.,9802,37.4,-78.3,39.12,38.02,,3500000.0,2000000.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-14532,Virginia CS83 South zone,Virginia South,,,United States (USA) - Virginia - counties south of 38d 05m North.,9802,36.2,-78.3,37.58,36.46,,3500000.0,1000000.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-14601,Washington CS27 North zone,Washington North,,,United States (USA) - Washington - counties north of 47d 30m North.,9802,47.0,-120.5,47.3,48.44,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-14602,Washington CS27 South zone,Washington South,,,United States (USA) - Washington - counties south of 47d 30m North.,9802,45.2,-120.3,45.5,47.2,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-14631,Washington CS83 North zone,Washington North,,,United States (USA) - Washington - counties north of 47d 30m North.,9802,47.0,-120.5,48.44,47.3,,500000.0,0.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-14632,Washington CS83 South zone,Washington South,,,United States (USA) - Washington - counties south of 47d 30m North.,9802,45.2,-120.3,47.2,45.5,,500000.0,0.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-14701,West Virginia CS27 North zone,West Virginia North,,,United States (USA) - West Virginia - counties north of 39deg North.,9802,38.3,-79.3,39.0,40.15,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-14702,West Virginia CS27 South zone,West Virginia South,,,United States (USA) - West Virginia - counties south of 39deg North.,9802,37.0,-81.0,37.29,38.53,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-14731,West Virginia CS83 North zone,West Virginia North,,,United States (USA) - West Virginia - counties north of 39deg North.,9802,38.3,-79.3,40.15,39.0,,600000.0,0.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-14732,West Virginia CS83 South zone,West Virginia South,,,United States (USA) - West Virginia - counties south of 39deg North.,9802,37.0,-81.0,38.53,37.29,,600000.0,0.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-14801,Wisconsin CS27 North zone,Wisconsin North,,,United States (USA) - Wisconsin - counties north of 45d 35m North.,9802,45.1,-90.0,45.34,46.46,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-14802,Wisconsin CS27 Central zone,Wisconsin Central,,,United States (USA) - Wisconsin - counties between 45d 35m & 44d 15m North.,9802,43.5,-90.0,44.15,45.3,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-14803,Wisconsin CS27 South zone,Wisconsin South,,,United States (USA) - Wisconsin - counties south of 44d 15m North.,9802,42.0,-90.0,42.44,44.04,,2000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-14831,Wisconsin CS83 North zone,Wisconsin North,,,United States (USA) - Wisconsin - counties north of 45d 35m North.,9802,45.1,-90.0,46.46,45.34,,600000.0,0.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-14832,Wisconsin CS83 Central zone,Wisconsin Central,,,United States (USA) - Wisconsin - counties between 45d 35m & 44d 15m North.,9802,43.5,-90.0,45.3,44.15,,600000.0,0.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-14833,Wisconsin CS83 South zone,Wisconsin South,,,United States (USA) - Wisconsin - counties south of 44d 15m North.,9802,42.0,-90.0,44.04,42.44,,600000.0,0.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-14901,Wyoming CS27 East zone,Wyoming East,,,United States (USA) - Wyoming - counties east of 106d West.,9807,40.4,-105.1,,,0.999941177,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-14902,Wyoming CS27 East Central zone,Wyoming East Central,,,United States (USA) - Wyoming - counties between 106d & 108d 10m West.,9807,40.4,-107.2,,,0.999941177,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-14903,Wyoming CS27 West Central zone,Wyoming West Central,,,United States (USA) - Wyoming - counties between 108d 10m & 109d 40m West.,9807,40.4,-108.45,,,0.999941177,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-14904,Wyoming CS27 West zone,Wyoming West,,,United States (USA) - Wyoming - counties west of 109d 40m West.,9807,40.4,-110.05,,,0.999941177,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-14931,Wyoming CS83 East zone,Wyoming East,,,United States (USA) - Wyoming - counties east of 106d West.,9807,40.3,-105.1,,,0.9999375,200000.0,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-14932,Wyoming CS83 East Central zone,Wyoming East Central,,,United States (USA) - Wyoming - counties between 106d & 108d 10m West.,9807,40.3,-107.2,,,0.9999375,400000.0,100000.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-14933,Wyoming CS83 West Central zone,Wyoming West Central,,,United States (USA) - Wyoming - counties between 108d 10m & 109d 40m West.,9807,40.3,-108.45,,,0.9999375,600000.0,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-14934,Wyoming CS83 West zone,Wyoming West,,,United States (USA) - Wyoming - counties west of 109d 40m West.,9807,40.3,-110.05,,,0.9999375,800000.0,100000.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-15001,Alaska CS27 zone 1,Alaska zone 1,,,United States (USA) - Alaska - east of 141 deg West; i.e. Panhandle.,9812,57.0,-133.4,323.07483685,323.07483685,0.9999,16404166.67,-16404166.67,9003,9110,8901,,,,,1997-04-11 00:00:00,USGS Professional Paper #1395,EPSG,,96.29  97.08
-15002,Alaska CS27 zone 2,Alaska zone 2,,,United States (USA) - Alaska - 141deg to 144deg West.,9807,54.0,-142.0,,,0.9999,500000.0,0.0,9003,9102,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-15003,Alaska CS27 zone 3,Alaska zone 3,,,United States (USA) - Alaska - 144deg to 148deg West excluding Kenai Peninsula; Perry Is. and Esther Is.,9807,54.0,-146.0,,,0.9999,500000.0,0.0,9003,9102,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-15004,Alaska CS27 zone 4,Alaska zone 4,,,United States (USA) - Alaska - 148deg to 152deg West.,9807,54.0,-150.0,,,0.9999,500000.0,0.0,9003,9102,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-15005,Alaska CS27 zone 5,Alaska zone 5,,,United States (USA) - Alaska - 152deg to 156deg West.,9807,54.0,-154.0,,,0.9999,500000.0,0.0,9003,9102,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-15006,Alaska CS27 zone 6,Alaska zone 6,,,United States (USA) - Alaska - 156deg to 160deg West.,9807,54.0,-158.0,,,0.9999,500000.0,0.0,9003,9102,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-15007,Alaska CS27 zone 7,Alaska zone 7,,,United States (USA) - Alaska - 160deg to 164deg West.,9807,54.0,-162.0,,,0.9999,700000.0,0.0,9003,9102,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-15008,Alaska CS27 zone 8,Alaska zone 8,,,United States (USA) - Alaska - 164deg to 168deg West north of 54d 30m North.,9807,54.0,-166.0,,,0.9999,500000.0,0.0,9003,9102,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-15009,Alaska CS27 zone 9,Alaska zone 9,,,United States (USA) - Alaska - west of 168deg West and north of 54d 30m North.,9807,54.0,-170.0,,,0.9999,600000.0,0.0,9003,9102,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-15010,Alaska CS27 zone 10,Alaska zone 10,,,United States (USA) - Alaska - Aleutian Islands.,9802,51.0,-176.0,53.5,51.5,,3000000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-15031,Alaska CS83 zone 1,Alaska zone 1,,,United States (USA) - Alaska - east of 141 deg West; i.e. Panhandle.,9812,57.0,-133.4,323.07483685,323.07483685,0.9999,5000000.0,-5000000.0,9001,9110,8901,,,,,1996-09-12 00:00:00,NOAA manual NOS NGS 5,EPSG,,96.29
-15032,Alaska CS83 zone 2,Alaska zone 2,,,United States (USA) - Alaska - 141deg to 144deg West.,9807,54.0,-142.0,,,0.9999,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-15033,Alaska CS83 zone 3,Alaska zone 3,,,United States (USA) - Alaska - 144deg to 148deg West excluding Kenai Peninsula; Perry Is. and Esther Is.,9807,54.0,-146.0,,,0.9999,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-15034,Alaska CS83 zone 4,Alaska zone 4,,,United States (USA) - Alaska - 148deg to 152deg West.,9807,54.0,-150.0,,,0.9999,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-15035,Alaska CS83 zone 5,Alaska zone 5,,,United States (USA) - Alaska - 152deg to 156deg West.,9807,54.0,-154.0,,,0.9999,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-15036,Alaska CS83 zone 6,Alaska zone 6,,,United States (USA) - Alaska - 156deg to 160deg West.,9807,54.0,-158.0,,,0.9999,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-15037,Alaska CS83 zone 7,Alaska zone 7,,,United States (USA) - Alaska - 160deg to 164deg West.,9807,54.0,-162.0,,,0.9999,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-15038,Alaska CS83 zone 8,Alaska zone 8,,,United States (USA) - Alaska - 164deg to 168deg West north of 54d 30m North.,9807,54.0,-166.0,,,0.9999,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-15039,Alaska CS83 zone 9,Alaska zone 9,,,United States (USA) - Alaska - west of 168deg West and north of 54d 30m North.,9807,54.0,-170.0,,,0.9999,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-15040,Alaska CS83 zone 10,Alaska zone 10,,,United States (USA) - Alaska - Aleutian Islands.,9802,51.0,-176.0,53.5,51.5,,1000000.0,0.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-15101,Hawaii CS27 zone 1,Hawaii zone 1,,,United States (USA) - Hawaii - island of Hawaii.,9807,18.5,-155.3,,,0.999966667,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-15102,Hawaii CS27 zone 2,Hawaii zone 2,,,United States (USA) - Hawaii - Maui; Kahoolawe; Lanai; Molokai.,9807,20.2,-156.4,,,0.999966667,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-15103,Hawaii CS27 zone 3,Hawaii zone 3,,,United States (USA) - Hawaii - Oahu.,9807,21.1,-158.0,,,0.99999,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-15104,Hawaii CS27 zone 4,Hawaii zone 4,,,United States (USA) - Hawaii - Kauai.,9807,21.5,-159.3,,,0.99999,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-15105,Hawaii CS27 zone 5,Hawaii zone 5,,,United States (USA) - Hawaii - Niihau.,9807,21.4,-160.1,,,1.0,500000.0,0.0,9003,9110,8901,,,,,1995-12-02 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29
-15131,Hawaii CS83 zone 1,Hawaii  zone 1,,,United States (USA) - Hawaii - island of Hawaii.,9807,18.5,-155.3,,,0.999966667,500000.0,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-15132,Hawaii CS83 zone 2,Hawaii  zone 2,,,United States (USA) - Hawaii - Maui; Kahoolawe; Lanai; Molokai.,9807,20.2,-156.4,,,0.999966667,500000.0,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-15133,Hawaii CS83 zone 3,Hawaii  zone 3,,,United States (USA) - Hawaii - Oahu.,9807,21.1,-158.0,,,0.99999,500000.0,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-15134,Hawaii CS83 zone 4,Hawaii  zone 4,,,United States (USA) - Hawaii - Kauai.,9807,21.5,-159.3,,,0.99999,500000.0,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-15135,Hawaii CS83 zone 5,Hawaii  zone 5,,,United States (USA) - Hawaii - Niihau.,9807,21.4,-160.1,,,1.0,500000.0,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29
-15201,Puerto Rico CS27,Puerto Rico,,,Puerto Rico.,9802,17.5,-66.26,18.26,18.02,,500000.0,0.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-15202,St. Croix CS27,St. Croix,,,Virgin Islands of US - St. Croix.,9802,17.5,-66.26,18.26,18.02,,500000.0,100000.0,9003,9110,8901,,,,,1999-04-22 00:00:00,USGS Professional Paper #1395,EPSG,,95.30  96.29  99.28
-15230,Puerto Rico & Virgin Islands CS83,Puerto Rico & Virgin Is.,,,Puerto Rico & Virgin Islands of US,9802,17.5,-66.26,18.26,18.02,,200000.0,200000.0,9001,9110,8901,,,,,1999-04-22 00:00:00,NOAA manual NOS NGS 5,EPSG,,95.30  96.29  99.28
-15914,BLM zone 14N in feet,BLM 14N (feet),,,United States (USA) - Gulf of Mexico - west of 96 deg West approximately.,9807,0.0,-99.0,,,0.9996,1640416.67,0.0,9003,9102,8901,,,,,1995-12-02 00:00:00,Minerals Management Service offshore protraction diagrams.,EPSG,"Sometimes locally referred to as \"UTM zone 14\".",95.30  96.29
-15915,BLM zone 15N in feet,BLM 15N (feet),,,United States (USA) - Gulf of Mexico - 96 deg to 90 deg West approximately.,9807,0.0,-93.0,,,0.9996,1640416.67,0.0,9003,9102,8901,,,,,1995-12-02 00:00:00,Minerals Management Service offshore protraction diagrams.,EPSG,"Sometimes locally referred to as \"UTM zone 15\".",95.30  96.29
-15916,BLM zone 16N in feet,BLM 16N (feet),,,United States (USA) - Gulf of Mexico - 90 deg to 84 deg West approximately.,9807,0.0,-87.0,,,0.9996,1640416.67,0.0,9003,9102,8901,,,,,1995-12-02 00:00:00,Minerals Management Service offshore protraction diagrams.,EPSG,"Sometimes locally referred to as \"UTM zone 16\".",95.27  95.30  96.29
-15917,BLM zone 17N in feet,BLM 17N (feet),,,United States (USA) - Gulf of Mexico - east of 84 deg West approximately.,9807,0.0,-81.0,,,0.9996,1640416.67,0.0,9003,9102,8901,,,,,1995-12-02 00:00:00,Minerals Management Service offshore protraction diagrams.,EPSG,"Sometimes locally referred to as \"UTM zone 17\".",95.30  96.29
-16001,UTM zone 1N,,,,180deg to 174deg West; northern hemisphere.,9807,0.0,-177.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16002,UTM zone 2N,,,,174deg West to 168deg West; northern hemisphere.,9807,0.0,-171.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16003,UTM zone 3N,,,,168deg West to 162deg West; northern hemisphere.,9807,0.0,-165.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16004,UTM zone 4N,,,,162deg West to 156deg West; northern hemisphere.,9807,0.0,-159.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16005,UTM zone 5N,,,,156deg West to 150deg West; northern hemisphere.,9807,0.0,-153.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16006,UTM zone 6N,,,,150deg West to 144deg West; northern hemisphere.,9807,0.0,-147.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16007,UTM zone 7N,,,,144deg West to 138deg West; northern hemisphere.,9807,0.0,-141.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16008,UTM zone 8N,,,,138deg West to 132deg West; northern hemisphere.,9807,0.0,-135.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16009,UTM zone 9N,,,,132deg West to 126deg West; northern hemisphere.,9807,0.0,-129.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16010,UTM zone 10N,,,,130deg West to 120deg West; northern hemisphere.,9807,0.0,-123.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16011,UTM zone 11N,,,,120deg West to 114deg West; northern hemisphere.,9807,0.0,-117.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16012,UTM zone 12N,,,,114deg West to 108deg West; northern hemisphere.,9807,0.0,-111.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16013,UTM zone 13N,,,,108deg West to 102deg West; northern hemisphere.,9807,0.0,-105.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16014,UTM zone 14N,,,,102deg West to 96deg West; northern hemisphere.,9807,0.0,-99.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16015,UTM zone 15N,,,,96deg West to 90deg West; northern hemisphere.,9807,0.0,-93.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16016,UTM zone 16N,,,,90deg West to 84deg West; northern hemisphere.,9807,0.0,-87.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16017,UTM zone 17N,,,,84deg West to 78deg West; northern hemisphere.,9807,0.0,-81.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16018,UTM zone 18N,,,,78deg West to 72deg West; northern hemisphere.,9807,0.0,-75.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16019,UTM zone 19N,,,,72deg West to 66deg West; northern hemisphere.,9807,0.0,-69.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16020,UTM zone 20N,,,,66deg West to 60deg West; northern hemisphere.,9807,0.0,-63.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16021,UTM zone 21N,,,,60deg West to 54deg West; northern hemisphere.,9807,0.0,-57.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16022,UTM zone 22N,,,,54deg West to 48deg West; northern hemisphere.,9807,0.0,-51.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16023,UTM zone 23N,,,,48deg West to 42deg West; northern hemisphere.,9807,0.0,-45.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16024,UTM zone 24N,,,,42deg West to 36deg West; northern hemisphere.,9807,0.0,-39.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16025,UTM zone 25N,,,,36deg West to 30deg West; northern hemisphere.,9807,0.0,-33.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16026,UTM zone 26N,,,,30deg West to 24deg West; northern hemisphere.,9807,0.0,-27.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16027,UTM zone 27N,,,,24deg West to 18deg West; northern hemisphere.,9807,0.0,-21.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16028,UTM zone 28N,,,,18deg West to 12deg West; northern hemisphere.,9807,0.0,-15.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16029,UTM zone 29N,,,,12deg West to 6deg West; northern hemisphere.,9807,0.0,-9.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16030,UTM zone 30N,,,,6deg West to 0deg; northern hemisphere.,9807,0.0,-3.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16031,UTM zone 31N,,,,0deg to 6deg East; northern hemisphere.,9807,0.0,3.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16032,UTM zone 32N,,,,6deg East to 12deg East; northern hemisphere.,9807,0.0,9.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16033,UTM zone 33N,,,,12deg East to 18deg East; northern hemisphere.,9807,0.0,15.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16034,UTM zone 34N,,,,18deg East to 24deg East; northern hemisphere.,9807,0.0,21.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16035,UTM zone 35N,,,,24deg East to 30deg East; northern hemisphere.,9807,0.0,27.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16036,UTM zone 36N,,,,30deg East to 36deg East; northern hemisphere.,9807,0.0,33.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16037,UTM zone 37N,,,,36deg East to 42deg East; northern hemisphere.,9807,0.0,39.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16038,UTM zone 38N,,,,42deg East to 48deg East; northern hemisphere.,9807,0.0,45.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16039,UTM zone 39N,,,,48deg East to 54deg East; northern hemisphere.,9807,0.0,51.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16040,UTM zone 40N,,,,54deg East to 60deg East; northern hemisphere.,9807,0.0,57.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16041,UTM zone 41N,,,,60deg East to 66deg East; northern hemisphere.,9807,0.0,63.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16042,UTM zone 42N,,,,66deg East to 72deg East; northern hemisphere.,9807,0.0,69.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16043,UTM zone 43N,,,,72deg East to 78deg East; northern hemisphere.,9807,0.0,75.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16044,UTM zone 44N,,,,78deg East to 84deg East; northern hemisphere.,9807,0.0,81.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16045,UTM zone 45N,,,,84deg East to 90deg East; northern hemisphere.,9807,0.0,87.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16046,UTM zone 46N,,,,90deg East to 96deg East; northern hemisphere.,9807,0.0,93.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16047,UTM zone 47N,,,,96deg East to 102eg East; northern hemisphere.,9807,0.0,99.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16048,UTM zone 48N,,,,102deg East to 108deg East; northern hemisphere.,9807,0.0,105.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16049,UTM zone 49N,,,,108deg East to 114deg East; northern hemisphere.,9807,0.0,111.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16050,UTM zone 50N,,,,114deg East to 120deg East; northern hemisphere.,9807,0.0,117.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16051,UTM zone 51N,,,,120deg East to 126deg East; northern hemisphere.,9807,0.0,123.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16052,UTM zone 52N,,,,126deg East to 132deg East; northern hemisphere.,9807,0.0,129.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16053,UTM zone 53N,,,,132deg East to 138deg East; northern hemisphere.,9807,0.0,135.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16054,UTM zone 54N,,,,138deg East to 144deg East; northern hemisphere.,9807,0.0,141.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16055,UTM zone 55N,,,,144deg East to 150deg East; northern hemisphere.,9807,0.0,147.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16056,UTM zone 56N,,,,150deg East to 156deg East; northern hemisphere.,9807,0.0,153.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16057,UTM zone 57N,,,,156deg East to 162deg East; northern hemisphere.,9807,0.0,159.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16058,UTM zone 58N,,,,162deg East to 168deg East; northern hemisphere.,9807,0.0,165.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16059,UTM zone 59N,,,,168deg East to 174deg East; northern hemisphere.,9807,0.0,171.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16060,UTM zone 60N,,,,174deg East to 180deg; northern hemisphere.,9807,0.0,177.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16061,Universal Polar Stereographic North,UPS North,,,Northern hemisphere polar area.,9810,90.0,0.0,,,0.994,2000000.0,2000000.0,9001,9102,8901,,,,,1997-06-16 00:00:00,,EPSG,,97.18
-16101,UTM zone 1S,,,,180deg to 174deg West; southern hemisphere.,9807,0.0,-177.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16102,UTM zone 2S,,,,174deg West to 168deg West; southern hemisphere.,9807,0.0,-171.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16103,UTM zone 3S,,,,168deg West to 162deg West; southern hemisphere.,9807,0.0,-165.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16104,UTM zone 4S,,,,162deg West to 156deg West; southern hemisphere.,9807,0.0,-159.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16105,UTM zone 5S,,,,156deg West to 150deg West; southern hemisphere.,9807,0.0,-153.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16106,UTM zone 6S,,,,150deg West to 144deg West; southern hemisphere.,9807,0.0,-147.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16107,UTM zone 7S,,,,144deg West to 138deg West; southern hemisphere.,9807,0.0,-141.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16108,UTM zone 8S,,,,138deg West to 132deg West; southern hemisphere.,9807,0.0,-135.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16109,UTM zone 9S,,,,132deg West to 126deg West; southern hemisphere.,9807,0.0,-129.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16110,UTM zone 10S,,,,130deg West to 120deg West; southern hemisphere.,9807,0.0,-123.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16111,UTM zone 11S,,,,120deg West to 114deg West; southern hemisphere.,9807,0.0,-117.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16112,UTM zone 12S,,,,114deg West to 108deg West; southern hemisphere.,9807,0.0,-111.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16113,UTM zone 13S,,,,108deg West to 102deg West; southern hemisphere.,9807,0.0,-105.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16114,UTM zone 14S,,,,102deg West to 96deg West; southern hemisphere.,9807,0.0,-99.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16115,UTM zone 15S,,,,96deg West to 90deg West; southern hemisphere.,9807,0.0,-93.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16116,UTM zone 16S,,,,90deg West to 84deg West; southern hemisphere.,9807,0.0,-87.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16117,UTM zone 17S,,,,84deg West to 78deg West; southern hemisphere.,9807,0.0,-81.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16118,UTM zone 18S,,,,78deg West to 72deg West; southern hemisphere.,9807,0.0,-75.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16119,UTM zone 19S,,,,72deg West to 66deg West; southern hemisphere.,9807,0.0,-69.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16120,UTM zone 20S,,,,66deg West to 60deg West; southern hemisphere.,9807,0.0,-63.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16121,UTM zone 21S,,,,60deg West to 54deg West; southern hemisphere.,9807,0.0,-57.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16122,UTM zone 22S,,,,54deg West to 48deg West; southern hemisphere.,9807,0.0,-51.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16123,UTM zone 23S,,,,48deg West to 42deg West; southern hemisphere.,9807,0.0,-45.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16124,UTM zone 24S,,,,42deg West to 36deg West; southern hemisphere.,9807,0.0,-39.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16125,UTM zone 25S,,,,36deg West to 30deg West; southern hemisphere.,9807,0.0,-33.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16126,UTM zone 26S,,,,30deg West to 24deg West; southern hemisphere.,9807,0.0,-27.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16127,UTM zone 27S,,,,24deg West to 18deg West; southern hemisphere.,9807,0.0,-21.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16128,UTM zone 28S,,,,18deg West to 12deg West; southern hemisphere.,9807,0.0,-15.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16129,UTM zone 29S,,,,12deg West to 6deg West; southern hemisphere.,9807,0.0,-9.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16130,UTM zone 30S,,,,6deg West to 0deg; southern hemisphere.,9807,0.0,-3.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16131,UTM zone 31S,,,,0deg to 6deg East; southern hemisphere.,9807,0.0,3.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16132,UTM zone 32S,,,,6deg East to 12deg East; southern hemisphere.,9807,0.0,9.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16133,UTM zone 33S,,,,12deg East to 18deg East; southern hemisphere.,9807,0.0,15.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16134,UTM zone 34S,,,,18deg East to 24deg East; southern hemisphere.,9807,0.0,21.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16135,UTM zone 35S,,,,24deg East to 30deg East; southern hemisphere.,9807,0.0,27.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16136,UTM zone 36S,,,,30deg East to 36deg East; southern hemisphere.,9807,0.0,33.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16137,UTM zone 37S,,,,36deg East to 42deg East; southern hemisphere.,9807,0.0,39.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16138,UTM zone 38S,,,,42deg East to 48deg East; southern hemisphere.,9807,0.0,45.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16139,UTM zone 39S,,,,48deg East to 54deg East; southern hemisphere.,9807,0.0,51.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16140,UTM zone 40S,,,,54deg East to 60deg East; southern hemisphere.,9807,0.0,57.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16141,UTM zone 41S,,,,60deg East to 66deg East; southern hemisphere.,9807,0.0,63.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16142,UTM zone 42S,,,,66deg East to 72deg East; southern hemisphere.,9807,0.0,69.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16143,UTM zone 43S,,,,72deg East to 78deg East; southern hemisphere.,9807,0.0,75.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16144,UTM zone 44S,,,,78deg East to 84deg East; southern hemisphere.,9807,0.0,81.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16145,UTM zone 45S,,,,84deg East to 90deg East; southern hemisphere.,9807,0.0,87.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16146,UTM zone 46S,,,,90deg East to 96deg East; southern hemisphere.,9807,0.0,93.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16147,UTM zone 47S,,,,96deg East to 102eg East; southern hemisphere.,9807,0.0,99.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16148,UTM zone 48S,,,,102deg East to 108deg East; southern hemisphere.,9807,0.0,105.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16149,UTM zone 49S,,,,108deg East to 114deg East; southern hemisphere.,9807,0.0,111.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16150,UTM zone 50S,,,,114deg East to 120deg East; southern hemisphere.,9807,0.0,117.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16151,UTM zone 51S,,,,120deg East to 126deg East; southern hemisphere.,9807,0.0,123.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16152,UTM zone 52S,,,,126deg East to 132deg East; southern hemisphere.,9807,0.0,129.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16153,UTM zone 53S,,,,132deg East to 138deg East; southern hemisphere.,9807,0.0,135.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16154,UTM zone 54S,,,,138deg East to 144deg East; southern hemisphere.,9807,0.0,141.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16155,UTM zone 55S,,,,144deg East to 150deg East; southern hemisphere.,9807,0.0,147.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16156,UTM zone 56S,,,,150deg East to 156deg East; southern hemisphere.,9807,0.0,153.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16157,UTM zone 57S,,,,156deg East to 162deg East; southern hemisphere.,9807,0.0,159.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16158,UTM zone 58S,,,,162deg East to 168deg East; southern hemisphere.,9807,0.0,165.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16159,UTM zone 59S,,,,168deg East to 174deg East; southern hemisphere.,9807,0.0,171.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16160,UTM zone 60S,,,,174deg East to 180deg; southern hemisphere.,9807,0.0,177.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.28
-16161,Universal Polar Stereographic South,UPS South,,,Southern hemisphere polar area.,9810,-90.0,0.0,,,0.994,2000000.0,2000000.0,9001,9102,8901,,,,,1997-06-16 00:00:00,,EPSG,,97.18
-16202,Gauss-Kruger zone 2,,,,6deg East to 12deg East; northern hemisphere.,9807,0.0,9.0,,,1.0,2500000.0,0.0,9001,9102,8901,,,,,1998-06-30 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,
-16203,Gauss-Kruger zone 3,,,,12deg East to 18deg East; northern hemisphere.,9807,0.0,15.0,,,1.0,3500000.0,0.0,9001,9102,8901,,,,,1998-06-30 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,
-16204,Gauss-Kruger zone 4,,,,18deg East to 24deg East; northern hemisphere.,9807,0.0,21.0,,,1.0,4500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16205,Gauss-Kruger zone 5,,,,24deg East to 30deg East; northern hemisphere.,9807,0.0,27.0,,,1.0,5500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16206,Gauss-Kruger zone 6,,,,30deg East to 36deg East; northern hemisphere.,9807,0.0,33.0,,,1.0,6500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16207,Gauss-Kruger zone 7,,,,36deg East to 42deg East; northern hemisphere.,9807,0.0,39.0,,,1.0,7500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16208,Gauss-Kruger zone 8,,,,42deg East to 48deg East; northern hemisphere.,9807,0.0,45.0,,,1.0,8500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16209,Gauss-Kruger zone 9,,,,48deg East to 54deg East; northern hemisphere.,9807,0.0,51.0,,,1.0,9500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16210,Gauss-Kruger zone 10,,,,54deg East to 60deg East; northern hemisphere.,9807,0.0,57.0,,,1.0,10500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16211,Gauss-Kruger zone 11,,,,60deg East to 66deg East; northern hemisphere.,9807,0.0,63.0,,,1.0,11500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16212,Gauss-Kruger zone 12,,,,66deg East to 72deg East; northern hemisphere.,9807,0.0,69.0,,,1.0,12500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16213,Gauss-Kruger zone 13,,,,72deg East to 78deg East; northern hemisphere.,9807,0.0,75.0,,,1.0,13500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16214,Gauss-Kruger zone 14,,,,78deg East to 84deg East; northern hemisphere.,9807,0.0,81.0,,,1.0,14500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16215,Gauss-Kruger zone 15,,,,84deg East to 90deg East; northern hemisphere.,9807,0.0,87.0,,,1.0,15500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16216,Gauss-Kruger zone 16,,,,90deg East to 96deg East; northern hemisphere.,9807,0.0,93.0,,,1.0,16500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16217,Gauss-Kruger zone 17,,,,96deg East to 102eg East; northern hemisphere.,9807,0.0,99.0,,,1.0,17500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16218,Gauss-Kruger zone 18,,,,102deg East to 108deg East; northern hemisphere.,9807,0.0,105.0,,,1.0,18500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16219,Gauss-Kruger zone 19,,,,108deg East to 114deg East; northern hemisphere.,9807,0.0,111.0,,,1.0,19500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16220,Gauss-Kruger zone 20,,,,114deg East to 120deg East; northern hemisphere.,9807,0.0,117.0,,,1.0,20500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16221,Gauss-Kruger zone 21,,,,120deg East to 126deg East; northern hemisphere.,9807,0.0,123.0,,,1.0,21500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16222,Gauss-Kruger zone 22,,,,126deg East to 132deg East; northern hemisphere.,9807,0.0,129.0,,,1.0,22500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16223,Gauss-Kruger zone 23,,,,132deg East to 138deg East; northern hemisphere.,9807,0.0,135.0,,,1.0,23500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16224,Gauss-Kruger zone 24,,,,138deg East to 144deg East; northern hemisphere.,9807,0.0,141.0,,,1.0,24500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16225,Gauss-Kruger zone 25,,,,144deg East to 150deg East; northern hemisphere.,9807,0.0,147.0,,,1.0,25500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16226,Gauss-Kruger zone 26,,,,150deg East to 156deg East; northern hemisphere.,9807,0.0,153.0,,,1.0,26500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16227,Gauss-Kruger zone 27,,,,156deg East to 162deg East; northern hemisphere.,9807,0.0,159.0,,,1.0,27500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16228,Gauss-Kruger zone 28,,,,162deg East to 168deg East; northern hemisphere.,9807,0.0,165.0,,,1.0,28500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16229,Gauss-Kruger zone 29,,,,168deg East to 174deg East; northern hemisphere.,9807,0.0,171.0,,,1.0,29500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16230,Gauss-Kruger zone 30,,,,174deg East to 180deg; northern hemisphere.,9807,0.0,177.0,,,1.0,30500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16231,Gauss-Kruger zone 31,,,,180deg to 174deg West; northern hemisphere.,9807,0.0,-177.0,,,1.0,31500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16232,Gauss-Kruger zone 32,,,,174deg West to 168deg West; northern hemisphere.,9807,0.0,-171.0,,,1.0,32500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16302,Gauss-Kruger 2N,,,,6deg East to 12deg East; northern hemisphere.,9807,0.0,9.0,,,1.0,500000.0,0.0,9001,9102,8901,,,,,1998-06-30 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,
-16303,Gauss-Kruger 3N,,,,12deg East to 18deg East; northern hemisphere.,9807,0.0,15.0,,,1.0,500000.0,0.0,9001,9102,8901,,,,,1998-06-30 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,
-16304,Gauss-Kruger 4N,,,,18deg East to 24deg East; northern hemisphere.,9807,0.0,21.0,,,1.0,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16305,Gauss-Kruger 5N,,,,24deg East to 30deg East; northern hemisphere.,9807,0.0,27.0,,,1.0,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16306,Gauss-Kruger 6N,,,,30deg East to 36deg East; northern hemisphere.,9807,0.0,33.0,,,1.0,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16307,Gauss-Kruger 7N,,,,36deg East to 42deg East; northern hemisphere.,9807,0.0,39.0,,,1.0,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16308,Gauss-Kruger 8N,,,,42deg East to 48deg East; northern hemisphere.,9807,0.0,45.0,,,1.0,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16309,Gauss-Kruger 9N,,,,48deg East to 54deg East; northern hemisphere.,9807,0.0,51.0,,,1.0,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16310,Gauss-Kruger 10N,,,,54deg East to 60deg East; northern hemisphere.,9807,0.0,57.0,,,1.0,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16311,Gauss-Kruger 11N,,,,60deg East to 66deg East; northern hemisphere.,9807,0.0,63.0,,,1.0,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16312,Gauss-Kruger 12N,,,,66deg East to 72deg East; northern hemisphere.,9807,0.0,69.0,,,1.0,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16313,Gauss-Kruger 13N,,,,72deg East to 78deg East; northern hemisphere.,9807,0.0,75.0,,,1.0,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16314,Gauss-Kruger 14N,,,,78deg East to 84deg East; northern hemisphere.,9807,0.0,81.0,,,1.0,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16315,Gauss-Kruger 15N,,,,84deg East to 90deg East; northern hemisphere.,9807,0.0,87.0,,,1.0,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16316,Gauss-Kruger 16N,,,,90deg East to 96deg East; northern hemisphere.,9807,0.0,93.0,,,1.0,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16317,Gauss-Kruger 17N,,,,96deg East to 102eg East; northern hemisphere.,9807,0.0,99.0,,,1.0,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16318,Gauss-Kruger 18N,,,,102deg East to 108deg East; northern hemisphere.,9807,0.0,105.0,,,1.0,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16319,Gauss-Kruger 19N,,,,108deg East to 114deg East; northern hemisphere.,9807,0.0,111.0,,,1.0,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16320,Gauss-Kruger 20N,,,,114deg East to 120deg East; northern hemisphere.,9807,0.0,117.0,,,1.0,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16321,Gauss-Kruger 21N,,,,120deg East to 126deg East; northern hemisphere.,9807,0.0,123.0,,,1.0,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16322,Gauss-Kruger 22N,,,,126deg East to 132deg East; northern hemisphere.,9807,0.0,129.0,,,1.0,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16323,Gauss-Kruger 23N,,,,132deg East to 138deg East; northern hemisphere.,9807,0.0,135.0,,,1.0,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16324,Gauss-Kruger 24N,,,,138deg East to 144deg East; northern hemisphere.,9807,0.0,141.0,,,1.0,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16325,Gauss-Kruger 25N,,,,144deg East to 150deg East; northern hemisphere.,9807,0.0,147.0,,,1.0,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16326,Gauss-Kruger 26N,,,,150deg East to 156deg East; northern hemisphere.,9807,0.0,153.0,,,1.0,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16327,Gauss-Kruger 27N,,,,156deg East to 162deg East; northern hemisphere.,9807,0.0,159.0,,,1.0,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16328,Gauss-Kruger 28N,,,,162deg East to 168deg East; northern hemisphere.,9807,0.0,165.0,,,1.0,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16329,Gauss-Kruger 29N,,,,168deg East to 174deg East; northern hemisphere.,9807,0.0,171.0,,,1.0,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16330,Gauss-Kruger 30N,,,,174deg East to 180deg; northern hemisphere.,9807,0.0,177.0,,,1.0,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16331,Gauss-Kruger 31N,,,,180deg to 174deg West; northern hemisphere.,9807,0.0,-177.0,,,1.0,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16332,Gauss-Kruger 32N,,,,174deg West to 168deg West; northern hemisphere.,9807,0.0,-171.0,,,1.0,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.28
-16400,TM 0 N,,,,United Kingdom (UKCS) - offshore North Sea.,9807,0.0,0.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1998-11-11 00:00:00,Shell UK,EPSG,,
-16405,TM 5 NE,,,,Netherlands - offshore.,9807,0.0,5.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1998-11-11 00:00:00,NAM,EPSG,,
-16506,TM 106 NE,,,,Vietnam - offshore.,9807,0.0,106.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1998-11-11 00:00:00,PetroVietnam,EPSG,,
-16611,TM 11.30 SE,,,,Angola - offshore.,9807,0.0,11.3,,,0.9996,500000.0,10000000.0,9001,9110,8901,,,,,1998-11-11 00:00:00,Esso Angola,EPSG,,
-16612,TM 12 SE,,,,Angola - offshore.,9807,0.0,12.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1998-11-11 00:00:00,Shell Angola,EPSG,,
-16636,TM 36 SE,,,,Mozambique - offshore.,9807,0.0,36.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1998-11-11 00:00:00,BP Mozambique,EPSG,,
-17348,Map Grid of Australia zone 48,MGA zone 48,,,Australia 102deg East  to 108deg East.,9807,0.0,105.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,Australian Surveying and Land Information Group Internet WWW page.,EPSG,Grid convergence uses opposite sign convention to UTM,95.30  96.29
-17349,Map Grid of Australia zone 49,MGA zone 49,,,Australia 108deg East  to 114deg East.,9807,0.0,111.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,Australian Surveying and Land Information Group Internet WWW page.,EPSG,Grid convergence uses opposite sign convention to UTM,95.30  96.29
-17350,Map Grid of Australia zone 50,MGA zone 50,,,Australia 114deg East  to 120deg East.,9807,0.0,117.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,Australian Surveying and Land Information Group Internet WWW page.,EPSG,Grid convergence uses opposite sign convention to UTM,95.30  96.29
-17351,Map Grid of Australia zone 51,MGA zone 51,,,Australia 120deg East  to 126deg East.,9807,0.0,123.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,Australian Surveying and Land Information Group Internet WWW page.,EPSG,Grid convergence uses opposite sign convention to UTM,95.30  96.29
-17352,Map Grid of Australia zone 52,MGA zone 52,,,Australia 126deg East  to 132deg East.,9807,0.0,129.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,Australian Surveying and Land Information Group Internet WWW page.,EPSG,Grid convergence uses opposite sign convention to UTM,95.30  96.29
-17353,Map Grid of Australia zone 53,MGA zone 53,,,Australia 132deg East  to 138deg East.,9807,0.0,135.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,Australian Surveying and Land Information Group Internet WWW page.,EPSG,Grid convergence uses opposite sign convention to UTM,95.30  96.29
-17354,Map Grid of Australia zone 54,MGA zone 54,,,Australia 138deg East  to 144deg East.,9807,0.0,141.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,Australian Surveying and Land Information Group Internet WWW page.,EPSG,Grid convergence uses opposite sign convention to UTM,95.30  96.29
-17355,Map Grid of Australia zone 55,MGA zone 55,,,Australia 144deg East  to 150deg East.,9807,0.0,147.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,Australian Surveying and Land Information Group Internet WWW page.,EPSG,Grid convergence uses opposite sign convention to UTM,95.30  96.29
-17356,Map Grid of Australia zone 56,MGA zone 56,,,Australia 150deg East  to 156deg East.,9807,0.0,153.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,Australian Surveying and Land Information Group Internet WWW page.,EPSG,Grid convergence uses opposite sign convention to UTM,95.30  96.29
-17357,Map Grid of Australia zone 57,MGA zone 57,,,Australia 156deg East  to 162deg East.,9807,0.0,159.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,Australian Surveying and Land Information Group Internet WWW page.,EPSG,Grid convergence uses opposite sign convention to UTM,95.30  96.29
-17358,Map Grid of Australia zone 58,MGA zone 58,,,Australia 162deg East  to 168deg East.,9807,0.0,165.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,Australian Surveying and Land Information Group Internet WWW page.,EPSG,Grid convergence uses opposite sign convention to UTM,95.30  96.29
-17448,Australian Map Grid zone 48,AMG zone 48,,,Australia 102deg East  to 108deg East.,9807,0.0,105.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,The Australian Map Grid Technical Manual; National Mapping Council of Australia; 1972,EPSG,Grid convergence uses opposite sign convention to UTM,95.30  96.29
-17449,Australian Map Grid zone 49,AMG zone 49,,,Australia 108deg East  to 114deg East.,9807,0.0,111.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,The Australian Map Grid Technical Manual; National Mapping Council of Australia; 1972,EPSG,Grid convergence uses opposite sign convention to UTM,95.30  96.29
-17450,Australian Map Grid zone 50,AMG zone 50,,,Australia 114deg East  to 120deg East.,9807,0.0,117.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,The Australian Map Grid Technical Manual; National Mapping Council of Australia; 1972,EPSG,Grid convergence uses opposite sign convention to UTM,95.30  96.29
-17451,Australian Map Grid zone 51,AMG zone 51,,,Australia 120deg East  to 126deg East.,9807,0.0,123.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,The Australian Map Grid Technical Manual; National Mapping Council of Australia; 1972,EPSG,Grid convergence uses opposite sign convention to UTM,95.30  96.29
-17452,Australian Map Grid zone 52,AMG zone 52,,,Australia 126deg East  to 132deg East.,9807,0.0,129.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,The Australian Map Grid Technical Manual; National Mapping Council of Australia; 1972,EPSG,Grid convergence uses opposite sign convention to UTM,95.30  96.29
-17453,Australian Map Grid zone 53,AMG zone 53,,,Australia 132deg East  to 138deg East.,9807,0.0,135.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,The Australian Map Grid Technical Manual; National Mapping Council of Australia; 1972,EPSG,Grid convergence uses opposite sign convention to UTM,95.30  96.29
-17454,Australian Map Grid zone 54,AMG zone 54,,,Australia 138deg East  to 144deg East.  Papua New Guinea west of 144 deg East.,9807,0.0,141.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,The Australian Map Grid Technical Manual; National Mapping Council of Australia; 1972,EPSG,Grid convergence uses opposite sign convention to UTM,95.30  96.29
-17455,Australian Map Grid zone 55,AMG zone 55,,,Australia 144deg East  to 150deg East.  Papua New Guinea 144deg East  to 150deg East.,9807,0.0,147.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,The Australian Map Grid Technical Manual; National Mapping Council of Australia; 1972,EPSG,Grid convergence uses opposite sign convention to UTM,95.30  96.29
-17456,Australian Map Grid zone 56,AMG zone 56,,,Australia 150deg East  to 156deg East.,9807,0.0,153.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,The Australian Map Grid Technical Manual; National Mapping Council of Australia; 1972,EPSG,Grid convergence uses opposite sign convention to UTM,95.30  96.29
-17457,Australian Map Grid zone 57,AMG zone 57,,,Australia 156deg East  to 162deg East.,9807,0.0,159.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,The Australian Map Grid Technical Manual; National Mapping Council of Australia; 1972,EPSG,Grid convergence uses opposite sign convention to UTM,95.30  96.29
-17458,Australian Map Grid zone 58,AMG zone 58,,,Australia 162deg East  to 168deg East.,9807,0.0,165.0,,,0.9996,500000.0,10000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,The Australian Map Grid Technical Manual; National Mapping Council of Australia; 1972,EPSG,Grid convergence uses opposite sign convention to UTM,95.30  96.29
-17515,South African Survey Grid zone 15,S. African Grid zone 15,,,South Africa - Walvis Bay.,9808,0.0,15.0,,,1.0,0.0,0.0,9001,9102,8901,,,,,1996-04-12 00:00:00,,EPSG,"Transformation method sometimes described as \"Gauss conform\".",95.30  96.29
-17517,South African Survey Grid zone 17,S. African Grid zone 17,,,South Africa - west of 18 deg East.,9808,0.0,17.0,,,1.0,0.0,0.0,9001,9102,8901,,,,,1996-04-12 00:00:00,,EPSG,"Transformation method sometimes described as \"Gauss conform\".",95.30  96.29
-17519,South African Survey Grid zone 19,S. African Grid zone 19,,,South Africa - 18 to 20 deg East.,9808,0.0,19.0,,,1.0,0.0,0.0,9001,9102,8901,,,,,1996-04-12 00:00:00,,EPSG,"Transformation method sometimes described as \"Gauss conform\".",95.30  96.29
-17521,South African Survey Grid zone 21,S. African Grid zone 21,,,South Africa - 20 to 22 deg East.,9808,0.0,21.0,,,1.0,0.0,0.0,9001,9102,8901,,,,,1996-04-12 00:00:00,,EPSG,"Transformation method sometimes described as \"Gauss conform\".",95.30  96.29
-17523,South African Survey Grid zone 23,S. African Grid zone 23,,,South Africa - 22 to 24 deg East.,9808,0.0,23.0,,,1.0,0.0,0.0,9001,9102,8901,,,,,1996-04-12 00:00:00,,EPSG,"Transformation method sometimes described as \"Gauss conform\".",95.30  96.29
-17525,South African Survey Grid zone 25,S. African Grid zone 25,,,Lestho  - west of 26 deg East; South Africa - 24 to 26 deg East.,9808,0.0,25.0,,,1.0,0.0,0.0,9001,9102,8901,,,,,1996-04-12 00:00:00,,EPSG,"Transformation method sometimes described as \"Gauss conform\".",95.30  96.29
-17527,South African Survey Grid zone 27,S. African Grid zone 27,,,Lestho  - east of 26 deg East;  South Africa - 26 to 28 deg East.,9808,0.0,27.0,,,1.0,0.0,0.0,9001,9102,8901,,,,,1996-04-12 00:00:00,,EPSG,"Transformation method sometimes described as \"Gauss conform\".",95.30  96.29
-17529,South African Survey Grid zone 29,S. African Grid zone 29,,,South Africa - 28 to 30 deg East.,9808,0.0,29.0,,,1.0,0.0,0.0,9001,9102,8901,,,,,1996-04-12 00:00:00,,EPSG,"Transformation method sometimes described as \"Gauss conform\".",95.30  96.29
-17531,South African Survey Grid zone 31,S. African Grid zone 31,,,South Africa - 30 to 32 deg East;  Swaziland.,9808,0.0,31.0,,,1.0,0.0,0.0,9001,9102,8901,,,,,1996-04-12 00:00:00,,EPSG,"Transformation method sometimes described as \"Gauss conform\".",95.30  96.29
-17533,South African Survey Grid zone 33,S. African Grid zone 33,,,South Africa - east of 32 deg East.,9808,0.0,33.0,,,1.0,0.0,0.0,9001,9102,8901,,,,,1996-04-12 00:00:00,,EPSG,"Transformation method sometimes described as \"Gauss conform\".",95.30  96.29
-17611,South West African Survey Grid zone 11,SW African Grid zone 11,,,Namibia - west of 12 deg East.,9808,-22.0,11.0,,,1.0,0.0,0.0,9031,9102,8901,,,,,1997-06-16 00:00:00,Chief Directorate Surveys and Land Information; Mowbray; South Africa.,EPSG,"Transformation method sometimes described as \"Gauss conform\".",95.30  96.29  97.16
-17613,South West African Survey Grid zone 13,SW African Grid zone 13,,,Namibia - 12 to 14 deg East.,9808,-22.0,13.0,,,1.0,0.0,0.0,9031,9102,8901,,,,,1997-06-16 00:00:00,Chief Directorate Surveys and Land Information; Mowbray; South Africa.,EPSG,"Transformation method sometimes described as \"Gauss conform\".",95.30  96.29  97.16
-17615,South West African Survey Grid zone 15,SW African Grid zone 15,,,Namibia - 14 to 16 deg East.,9808,-22.0,15.0,,,1.0,0.0,0.0,9031,9102,8901,,,,,1997-06-16 00:00:00,Chief Directorate Surveys and Land Information; Mowbray; South Africa.,EPSG,"Transformation method sometimes described as \"Gauss conform\".",95.30  96.29  97.16
-17617,South West African Survey Grid zone 17,SW African Grid zone 17,,,Namibia - 16 to 18 deg East.,9808,-22.0,17.0,,,1.0,0.0,0.0,9031,9102,8901,,,,,1997-06-16 00:00:00,Chief Directorate Surveys and Land Information; Mowbray; South Africa.,EPSG,"Transformation method sometimes described as \"Gauss conform\".",95.30  96.29  97.16
-17619,South West African Survey Grid zone 19,SW African Grid zone 19,,,Namibia - 18 to 20 deg East.,9808,-22.0,19.0,,,1.0,0.0,0.0,9031,9102,8901,,,,,1997-06-16 00:00:00,Chief Directorate Surveys and Land Information; Mowbray; South Africa.,EPSG,"Transformation method sometimes described as \"Gauss conform\".",95.30  96.29  97.16
-17621,South West African Survey Grid zone 21,SW African Grid zone 21,,,Namibia - 20 to 22 deg East.,9808,-22.0,21.0,,,1.0,0.0,0.0,9031,9102,8901,,,,,1997-06-16 00:00:00,Chief Directorate Surveys and Land Information; Mowbray; South Africa.,EPSG,"Transformation method sometimes described as \"Gauss conform\".",95.30  96.29  97.16
-17623,South West African Survey Grid zone 23,SW African Grid zone 23,,,Namibia - 22 to 24 deg East.,9808,-22.0,23.0,,,1.0,0.0,0.0,9031,9102,8901,,,,,1997-06-16 00:00:00,Chief Directorate Surveys and Land Information; Mowbray; South Africa.,EPSG,"Transformation method sometimes described as \"Gauss conform\".",95.30  96.29  97.16
-17625,South West African Survey Grid zone 25,SW African Grid zone 25,,,Namibia - east of 24 deg East.,9808,-22.0,25.0,,,1.0,0.0,0.0,9031,9102,8901,,,,,1997-06-16 00:00:00,Chief Directorate Surveys and Land Information; Mowbray; South Africa.,EPSG,"Transformation method sometimes described as \"Gauss conform\".",95.30  96.29  97.16
-17700,MTM Quebec zone 2,,,,Canada - Quebec - east of 57 deg East.,9807,0.0,-55.3,,,0.9999,304800.0,0.0,9001,9110,8901,,,,,1997-11-13 00:00:00,Topographic Mapping Section; Quebec Ministry of Natural Resources.,EPSG,,
-17701,MTM zone 1,,,,Canada - Newfoundland - east of 54 deg 30 min West.,9807,0.0,-53.0,,,0.9999,304800.0,0.0,9001,9102,8901,,,,,1997-11-13 00:00:00,Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.,EPSG,,
-17702,MTM Newfoundland zone 2,MTM zone 2,,,Canada - Newfoundland and Labrador between 57 deg 30 min and 54 de 30 min West.,9807,0.0,-56.0,,,0.9999,304800.0,0.0,9001,9102,8901,,,,,1997-11-13 00:00:00,Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.,EPSG,,
-17703,MTM zone 3,,,,Canada - Newfoundland and Labrador between 60 deg and 57 deg 30 min West; Canada - Quebec between 60 deg and 57 deg West.,9807,0.0,-58.3,,,0.9999,304800.0,0.0,9001,9110,8901,,,,,1997-11-13 00:00:00,Topographic Mapping Section; Quebec Ministry of Natural Resources. Also Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.,EPSG,,
-17704,MTM zone 4,,,,Canada - Quebec and Newfoundland (Labrador) between 63 deg and 60 deg West.,9807,0.0,-61.3,,,0.9999,304800.0,0.0,9001,9110,8901,,,,,1997-11-13 00:00:00,Topographic Mapping Section; Quebec Ministry of Natural Resources. Also Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.,EPSG,,
-17705,MTM zone 5,,,,Canada - Quebec and Newfoundland (Labrador) between 66 deg and 63 deg West.,9807,0.0,-64.3,,,0.9999,304800.0,0.0,9001,9110,8901,,,,,1997-11-13 00:00:00,Topographic Mapping Section; Quebec Ministry of Natural Resources. Also Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.,EPSG,,
-17706,MTM zone 6,,,,Canada - Quebec and Newfoundland (Labrador) between 69 deg and  66 deg West.,9807,0.0,-67.3,,,0.9999,304800.0,0.0,9001,9110,8901,,,,,1997-11-13 00:00:00,Topographic Mapping Section; Quebec Ministry of Natural Resources. Also Geodetic Surveys Section; Newfoundland Department of Government Services and Lands.,EPSG,,
-17707,MTM zone 7,,,,Canada - Quebec between 72 deg and 69 deg West.,9807,0.0,-70.3,,,0.9999,304800.0,0.0,9001,9110,8901,,,,,1997-11-13 00:00:00,Topographic Mapping Section; Quebec Ministry of Natural Resources.,EPSG,,
-17708,MTM zone 8,,,,Canada - Quebec between 75 deg and 72 deg West.; Canada - Ontario - east of 75 deg West.,9807,0.0,-73.3,,,0.9999,304800.0,0.0,9001,9110,8901,,,,,1997-11-13 00:00:00,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,,
-17709,MTM zone 9,,,,Canada - Quebec and Ontario - between 78 deg and 75 deg West.,9807,0.0,-76.3,,,0.9999,304800.0,0.0,9001,9110,8901,,,,,1997-11-13 00:00:00,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,,
-17710,MTM zone 10,,,,Canada - Quebec west of 78 deg West; Canada - Ontario - between 79 deg 30 min and 78 deg W in area to north of 47 deg N; between 80 deg 15 min and 78 deg W in area between 46 deg and 47 deg N; between 81 deg and 78 deg W in area south of 46 deg N.,9807,0.0,-79.3,,,0.9999,304800.0,0.0,9001,9110,8901,,,,,1997-11-13 00:00:00,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,,
-17711,MTM zone 11,,,,Canada - Ontario - south of 46 deg N and west of 81 deg West.,9807,0.0,-82.3,,,0.9999,304800.0,0.0,9001,9110,8901,,,,,1997-11-13 00:00:00,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,,
-17712,MTM zone 12,,,,Canada - Ontario - between 82 deg 30 min and 79 deg 30 min W in area to north of 47 deg N; between 82 deg 30 min and 80 deg 15 min W in area between 46 deg and 47 deg N; between 82 deg 30 min and 79 deg 30 min W in area north of 47 deg N.,9807,0.0,-81.0,,,0.9999,304800.0,0.0,9001,9102,8901,,,,,1997-11-13 00:00:00,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,,
-17713,MTM zone 13,,,,Canada - Ontario - between 85 deg 30 min and 82 deg 30 min West and north of 46 deg North.,9807,0.0,-84.0,,,0.9999,304800.0,0.0,9001,9102,8901,,,,,1997-11-13 00:00:00,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,,
-17714,MTM zone 14,,,,Canada - Ontario - between 88 deg 30 min and 85 deg 30 min West.,9807,0.0,-87.0,,,0.9999,304800.0,0.0,9001,9102,8901,,,,,1997-11-13 00:00:00,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,,
-17715,MTM zone 15,,,,Canada - Ontario - between 91 deg 30 min and 88 deg 30 min West.,9807,0.0,-90.0,,,0.9999,304800.0,0.0,9001,9102,8901,,,,,1997-11-13 00:00:00,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,,
-17716,MTM zone 16,,,,Canada - Ontario - between 94 deg 30 min and 91 deg 30 min West.,9807,0.0,-93.0,,,0.9999,304800.0,0.0,9001,9102,8901,,,,,1997-11-13 00:00:00,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,,
-17717,MTM zone 17,,,,Canada - Ontario - west of 94 deg 30 min West.,9807,0.0,-96.0,,,0.9999,304800.0,0.0,9001,9102,8901,,,,,1997-11-13 00:00:00,Surveys and Mapping Section; Ontario Ministry of Transportation.,EPSG,,
-17794,MTM Nova Scotia zone 4,,,,Canada - Nova Scotia - east of 63 deg West.,9807,0.0,-61.3,,,0.9999,4500000.0,0.0,9001,9110,8901,,,,,1999-05-24 00:00:00,Geomatics Centre; Nova Scotia Ministry of Housing and Municipal Affairs.,EPSG,,99.042
-17795,MTM Nova Scotia zone 5,,,,Canada - Nova Scotia - west of 63 deg West.,9807,0.0,-64.3,,,0.9999,5500000.0,0.0,9001,9110,8901,,,,,1999-05-24 00:00:00,Geomatics Centre; Nova Scotia Ministry of Housing and Municipal Affairs.,EPSG,,99.042
-17801,Japan Plane Rectangular CS zone I,Japan zone I,,,Japan - Kyushu - Nagasaki-ken; islands of Kagoshima-ken between 27 and 32 deg N and between 128 deg 18 min and 130 deg E (between 128 deg 18 min and 30 deg 13 min E for Amami islands).,9807,33.0,129.3,,,0.9999,0.0,0.0,9001,9110,8901,,,,,1998-12-12 00:00:00,Ministry of Construction; Japan.  http://vldb.gsi-mc.go.jp/sokuchi/datum/image/heichoku2.gif,EPSG,Original transformation by Gauss-Kruger formula.,
-17802,Japan Plane Rectangular CS zone II,Japan zone II,,,Japan - Kyushu - Fukuoka-ken; Saga-ken; Kumamoto-ken; Oita-ken; Miyazaki-ken; Kagoshima-ken (except for area within Japan Plane Rectangular Coordinates System zone I).,9807,33.0,131.0,,,0.9999,0.0,0.0,9001,9110,8901,,,,,1998-12-12 00:00:00,Ministry of Construction; Japan.  http://vldb.gsi-mc.go.jp/sokuchi/datum/image/heichoku2.gif,EPSG,Original transformation by Gauss-Kruger formula.,
-17803,Japan Plane Rectangular CS zone III,Japan zone III,,,Japan - Kyushu - Fukuoka-ken; Saga-ken; Kumamoto-ken; Oita-ken; Miyazaki-ken; Kagoshima-ken (except for area within Japan Plane Rectangular Coordinates System zone I).,9807,36.0,132.1,,,0.9999,0.0,0.0,9001,9110,8901,,,,,1998-12-12 00:00:00,Ministry of Construction; Japan.  http://vldb.gsi-mc.go.jp/sokuchi/datum/image/heichoku2.gif,EPSG,Original transformation by Gauss-Kruger formula.,
-17804,Japan Plane Rectangular CS zone IV,Japan zone IV,,,Japan - Kyushu - Fukuoka-ken; Saga-ken; Kumamoto-ken; Oita-ken; Miyazaki-ken; Kagoshima-ken (except for area within Japan Plane Rectangular Coordinates System zone I).,9807,33.0,133.3,,,0.9999,0.0,0.0,9001,9110,8901,,,,,1998-12-12 00:00:00,Ministry of Construction; Japan.  http://vldb.gsi-mc.go.jp/sokuchi/datum/image/heichoku2.gif,EPSG,Original transformation by Gauss-Kruger formula.,
-17805,Japan Plane Rectangular CS zone V,Japan zone V,,,Japan - Kyushu - Fukuoka-ken; Saga-ken; Kumamoto-ken; Oita-ken; Miyazaki-ken; Kagoshima-ken (except for area within Japan Plane Rectangular Coordinates System zone I).,9807,36.0,134.2,,,0.9999,0.0,0.0,9001,9110,8901,,,,,1998-12-12 00:00:00,Ministry of Construction; Japan.  http://vldb.gsi-mc.go.jp/sokuchi/datum/image/heichoku2.gif,EPSG,Original transformation by Gauss-Kruger formula.,
-17806,Japan Plane Rectangular CS zone VI,Japan zone VI,,,Japan - Kyushu - Fukuoka-ken; Saga-ken; Kumamoto-ken; Oita-ken; Miyazaki-ken; Kagoshima-ken (except for area within Japan Plane Rectangular Coordinates System zone I).,9807,36.0,136.0,,,0.9999,0.0,0.0,9001,9110,8901,,,,,1998-12-12 00:00:00,Ministry of Construction; Japan.  http://vldb.gsi-mc.go.jp/sokuchi/datum/image/heichoku2.gif,EPSG,Original transformation by Gauss-Kruger formula.,
-17807,Japan Plane Rectangular CS zone VII,Japan zone VII,,,Japan - Kyushu - Fukuoka-ken; Saga-ken; Kumamoto-ken; Oita-ken; Miyazaki-ken; Kagoshima-ken (except for area within Japan Plane Rectangular Coordinates System zone I).,9807,36.0,137.1,,,0.9999,0.0,0.0,9001,9110,8901,,,,,1998-12-12 00:00:00,Ministry of Construction; Japan.  http://vldb.gsi-mc.go.jp/sokuchi/datum/image/heichoku2.gif,EPSG,Original transformation by Gauss-Kruger formula.,
-17808,Japan Plane Rectangular CS zone VIII,Japan zone VIII,,,Japan - Kyushu - Fukuoka-ken; Saga-ken; Kumamoto-ken; Oita-ken; Miyazaki-ken; Kagoshima-ken (except for area within Japan Plane Rectangular Coordinates System zone I).,9807,36.0,138.3,,,0.9999,0.0,0.0,9001,9110,8901,,,,,1998-12-12 00:00:00,Ministry of Construction; Japan.  http://vldb.gsi-mc.go.jp/sokuchi/datum/image/heichoku2.gif,EPSG,Original transformation by Gauss-Kruger formula.,
-17809,Japan Plane Rectangular CS zone IX,Japan zone IX,,,Japan - Kyushu - Fukuoka-ken; Saga-ken; Kumamoto-ken; Oita-ken; Miyazaki-ken; Kagoshima-ken (except for area within Japan Plane Rectangular Coordinates System zone I).,9807,36.0,139.5,,,0.9999,0.0,0.0,9001,9110,8901,,,,,1998-12-12 00:00:00,Ministry of Construction; Japan.  http://vldb.gsi-mc.go.jp/sokuchi/datum/image/heichoku2.gif,EPSG,Original transformation by Gauss-Kruger formula.,
-17810,Japan Plane Rectangular CS zone X,Japan zone X,,,Japan - Kyushu - Fukuoka-ken; Saga-ken; Kumamoto-ken; Oita-ken; Miyazaki-ken; Kagoshima-ken (except for area within Japan Plane Rectangular Coordinates System zone I).,9807,40.0,140.5,,,0.9999,0.0,0.0,9001,9110,8901,,,,,1998-12-12 00:00:00,Ministry of Construction; Japan.  http://vldb.gsi-mc.go.jp/sokuchi/datum/image/heichoku2.gif,EPSG,Original transformation by Gauss-Kruger formula.,
-17811,Japan Plane Rectangular CS zone XI,Japan zone XI,,,Japan - Hokkaido west of 141 deg 15 min E approx. - Otaru city; Hakodate city; Date city; Usu-gun and Abuta-gun of Iburi-shicyo; area of Hiyama-shicyo; area of Shiribeshi-shicyo; Oshima-shicyo.,9807,44.0,140.15,,,0.9999,0.0,0.0,9001,9110,8901,,,,,1998-12-12 00:00:00,Ministry of Construction; Japan.  http://vldb.gsi-mc.go.jp/sokuchi/datum/image/heichoku2.gif,EPSG,Original transformation by Gauss-Kruger formula.,
-17812,Japan Plane Rectangular CS zone XII,Japan zone XII,,,Japan - Hokkaido west of 141 deg 15 min E approx. - Otaru city; Hakodate city; Date city; Usu-gun and Abuta-gun of Iburi-shicyo; area of Hiyama-shicyo; area of Shiribeshi-shicyo; Oshima-shicyo.,9807,44.0,142.15,,,0.9999,0.0,0.0,9001,9110,8901,,,,,1998-12-12 00:00:00,Ministry of Construction; Japan.  http://vldb.gsi-mc.go.jp/sokuchi/datum/image/heichoku2.gif,EPSG,Original transformation by Gauss-Kruger formula.,
-17813,Japan Plane Rectangular CS zone XIII,Japan zone XIII,,,Japan - Hokkaido west of 141 deg 15 min E approx. - Otaru city; Hakodate city; Date city; Usu-gun and Abuta-gun of Iburi-shicyo; area of Hiyama-shicyo; area of Shiribeshi-shicyo; Oshima-shicyo.,9807,44.0,144.15,,,0.9999,0.0,0.0,9001,9110,8901,,,,,1998-12-12 00:00:00,Ministry of Construction; Japan.  http://vldb.gsi-mc.go.jp/sokuchi/datum/image/heichoku2.gif,EPSG,Original transformation by Gauss-Kruger formula.,
-17814,Japan Plane Rectangular CS zone XIV,Japan zone XIV,,,Japan - Tokyo-to south of 28 deg N & between 140 deg 30 min & 143 deg E.,9807,26.0,142.0,,,0.9999,0.0,0.0,9001,9110,8901,,,,,1998-12-12 00:00:00,Ministry of Construction; Japan.  http://vldb.gsi-mc.go.jp/sokuchi/datum/image/heichoku2.gif,EPSG,Original transformation by Gauss-Kruger formula.,
-17815,Japan Plane Rectangular CS zone XV,Japan zone XV,,,Japan - Okinawa-ken between 126 deg &130 deg E.,9807,26.0,127.3,,,0.9999,0.0,0.0,9001,9110,8901,,,,,1998-12-12 00:00:00,Ministry of Construction; Japan.  http://vldb.gsi-mc.go.jp/sokuchi/datum/image/heichoku2.gif,EPSG,Original transformation by Gauss-Kruger formula.,
-17816,Japan Plane Rectangular CS zone XVI,Japan zone XVI,,,Japan - Okinawa-ken west of 126 deg E.,9807,26.0,124.0,,,0.9999,0.0,0.0,9001,9110,8901,,,,,1998-12-12 00:00:00,Ministry of Construction; Japan.  http://vldb.gsi-mc.go.jp/sokuchi/datum/image/heichoku2.gif,EPSG,Original transformation by Gauss-Kruger formula.,
-17817,Japan Plane Rectangular CS zone XVII,Japan zone XVII,,,Japan - Okinawa-ken east of 130 deg E.,9807,26.0,131.0,,,0.9999,0.0,0.0,9001,9110,8901,,,,,1998-12-12 00:00:00,Ministry of Construction; Japan.  http://vldb.gsi-mc.go.jp/sokuchi/datum/image/heichoku2.gif,EPSG,Original transformation by Gauss-Kruger formula.,
-17818,Japan Plane Rectangular CS zone XVIII,Japan zone XVIII,,,Japan - Tokyo-to south of 28 N & west of 140 deg 30 min E.,9807,20.0,136.0,,,0.9999,0.0,0.0,9001,9110,8901,,,,,1998-12-12 00:00:00,Ministry of Construction; Japan.  http://vldb.gsi-mc.go.jp/sokuchi/datum/image/heichoku2.gif,EPSG,Original transformation by Gauss-Kruger formula.,
-17819,Japan Plane Rectangular CS zone XIX,Japan zone XIX,,,Japan - Tokyo-to south of 28 N & east of 143 deg E.,9807,26.0,154.0,,,0.9999,0.0,0.0,9001,9110,8901,,,,,1998-12-12 00:00:00,Ministry of Construction; Japan.  http://vldb.gsi-mc.go.jp/sokuchi/datum/image/heichoku2.gif,EPSG,Original transformation by Gauss-Kruger formula.,
-18011,Nord Algerie (ancienne),,,,Algeria north of 38.5g (34 deg 39 min) North.,9801,40.0,3.0,,,0.999625544,500000.0,300000.0,9001,9105,8901,,,,,1996-09-12 00:00:00,,EPSG,Used with Voirol 1875 datum - now superseded.,
-18012,Sud Algerie (ancienne),,,,Algeria 35g to 38.5g (31 deg 30 min to 34 deg 39 min) North.,9801,37.0,3.0,,,0.999625769,500000.0,300000.0,9001,9105,8901,,,,,1996-09-12 00:00:00,,EPSG,Used with Voirol 1875 datum - now superseded.,
-18021,Nord Algerie,,,,Algeria north of 38.5g (34 deg 39 min) North.,9801,40.0,3.0,,,0.999625544,500135.0,300090.0,9001,9105,8901,,,,,1996-09-12 00:00:00,,EPSG,Use with Voirol Unifie 1960 datum.,
-18022,Sud Algerie,,,,Algeria 35g to 38.5g (31 deg 30 min to 34 deg 39 min) North.,9801,37.0,3.0,,,0.999625769,500135.0,300090.0,9001,9105,8901,,,,,1996-09-12 00:00:00,,EPSG,Use with Voirol Unifie 1960 datum.,
-18031,Argentina zone 1,Argentina 1,,,Argentina west of 70 deg 30 min West.,9807,-90.0,-72.0,,,1.0,1500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula,95.30
-18032,Argentina zone 2,Argentina 2,,,Argentina between 70 deg 30 min and 67 deg 30 min West.,9807,-90.0,-69.0,,,1.0,2500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula,95.30
-18033,Argentina zone 3,Argentina 3,,,Argentina between 67 deg 30 min and 64 deg 30 min West.,9807,-90.0,-66.0,,,1.0,3500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula,95.30
-18034,Argentina zone 4,Argentina 4,,,Argentina between 64 deg 30 min and 61 deg 30 min West.,9807,-90.0,-63.0,,,1.0,4500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula,95.30
-18035,Argentina zone 5,Argentina 5,,,Argentina between 61 deg 30 min and 58 deg 30 min West.,9807,-90.0,-60.0,,,1.0,5500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula,95.30
-18036,Argentina zone 6,Argentina 6,,,Argentina between 58 deg 30 min and 55 deg 30 min West.,9807,-90.0,-57.0,,,1.0,6500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula,95.30
-18037,Argentina zone 7,Argentina 7,,,Argentina east of 55 deg 30 min West.,9807,-90.0,-54.0,,,1.0,7500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula,95.30
-18041,Austria West Zone,,,,Austria west of 11deg 50min East of Greenwich (29deg 30min E of Ferro).,9807,0.0,28.0,,,1.0,0.0,0.0,9001,9102,8909,,,,,1997-04-11 00:00:00,,EPSG,Superseded by M28 (EPSG code 18044).,95.30  96.29  97.01  98.48
-18042,Austria Central Zone,,,,Austria between 11deg 50min and 14deg 50min East of Greenwich (29deg 30min and 32deg 30min East of Ferro).,9807,0.0,31.0,,,1.0,0.0,0.0,9001,9102,8909,,,,,1997-04-11 00:00:00,,EPSG,Superseded by M31 (EPSG code 18045).,95.30  96.29  97.01  98.48
-18043,Austria East Zone,,,,Austria east of 14deg 50min East of Greenwich (32deg 30min East of Ferro).,9807,0.0,34.0,,,1.0,0.0,0.0,9001,9102,8909,,,,,1997-04-11 00:00:00,,EPSG,Superseded by M34 (EPSG code 18046).,95.30  96.29  97.01  98.48
-18044,Austria M28,M28,,,Austria west of 11deg 50min East of Greenwich (29deg 30min E of Ferro).,9807,0.0,10.2,,,1.0,150000.0,0.0,9001,9110,8901,,,,,1999-10-20 00:00:00,Bundesamt f�r Eich- und Vermessungswesen,EPSG,Supersedes Austria West zone (EPSG code 18041).,
-18045,Austria M31,M31,,,Austria between 11deg 50min and 14deg 50min East of Greenwich (29deg 30min and 32deg 30min East of Ferro).,9807,0.0,13.2,,,1.0,450000.0,0.0,9001,9110,8901,,,,,1999-10-20 00:00:00,Bundesamt f�r Eich- und Vermessungswesen,EPSG,Supersedes Austria Central zone (EPSG code 18042).,
-18046,Austria M34,M34,,,Austria east of 14deg 50min East of Greenwich (32deg 30min East of Ferro).,9807,0.0,16.2,,,1.0,750000.0,0.0,9001,9110,8901,,,,,1999-10-20 00:00:00,Bundesamt f�r Eich- und Vermessungswesen,EPSG,Supersedes Austria East zone (EPSG code 18043).,
-18051,Colombia West zone,Colombia 3W,,,Colombia west of 1 deg 30 min W of Bogota (75d 34m 51.30s W of Greenwich).,9807,4.355657,-77.04513,,,1.0,1000000.0,1000000.0,9001,9110,8901,,,,,1997-04-11 00:00:00,,EPSG,"Original transformation by Gauss-Kruger formula.  Zone name sometimes referred to as \"6 west\".",95.30  96.29  97.11
-18052,Colombia Bogota zone,Colombia Bogota,,,Colombia 1 deg 30 min W to 1 deg 30 min E of Bogota (75d 35m W to 72d 35m W of Greenwich).,9807,4.355657,-74.04513,,,1.0,1000000.0,1000000.0,9001,9110,8901,,,,,1997-04-11 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula,95.30  96.29  97.11
-18053,Colombia East Central zone,Colombia 3E,,,Colombia 1 deg 30 min to 4 deg 30 min E of Bogota (72d 35m to 69d 34m W of Greenwich).,9807,4.355657,-71.04513,,,1.0,1000000.0,1000000.0,9001,9110,8901,,,,,1997-04-11 00:00:00,,EPSG,"Original transformation by Gauss-Kruger formula.  Zone name sometimes referred to as \"3 east\".",95.30  96.29  97.11
-18054,Colombia East zone,Colombia 6E,,,Colombia east of 4 deg 30 min E of Bogota (69d 34m 51.3s W of Greenwich).,9807,4.355657,-68.04513,,,1.0,1000000.0,1000000.0,9001,9110,8901,,,,,1997-04-11 00:00:00,,EPSG,"Original transformation by Gauss-Kruger formula.  Zone name sometimes referred to as \"6 east\".",95.30  96.29  97.11
-18061,Cuba Norte,,,,Cuba,9801,22.21,-81.0,,,0.99993602,500000.0,280296.016,9001,9110,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.30  96.29
-18062,Cuba Sur,,,,Cuba,9801,20.43,-76.5,,,0.99994848,500000.0,229126.939,9001,9110,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.30  96.29
-18071,Egypt Blue Belt,Blue Belt,,,Egypt  - Sinai peninsula.,9807,30.0,35.0,,,1.0,300000.0,1100000.0,9001,9102,8901,,,,,1999-04-22 00:00:00,,EPSG,Also known as Green Belt.,
-18072,Egypt Red Belt,Red Belt,,,Egypt  east of 29 deg East.,9807,30.0,31.0,,,1.0,615000.0,810000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.30
-18073,Egypt Purple Belt,Purple Belt,,,Egypt  west of 29 deg East; north of approx 28 deg 11 min North.,9807,30.0,27.0,,,1.0,700000.0,200000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.30
-18074,Egypt Extended Purple Belt,Extended Purple Belt,,,Egypt  west of 29 deg East; south of approx 28 deg 11 min North.,9807,30.0,27.0,,,1.0,700000.0,1200000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.30
-18081,France I,,,,France north of 53.5 grads (48 deg 09 min) North.,9801,55.0,0.0,,,0.999877341,600000.0,1200000.0,9001,9105,8903,,,,,1996-09-12 00:00:00,IGN Paris.,EPSG,Introduced 1972. See 18091.,95.26
-18082,France II,,,,France 50.5 to 53.5 grads (45 deg 27 min to 48 deg 09 min) North.,9801,52.0,0.0,,,0.99987742,600000.0,2200000.0,9001,9105,8903,,,,,1996-09-12 00:00:00,IGN Paris.,EPSG,Introduced 1972. See 18092.,95.26
-18083,France III,,,,France south of 50.5 grads (45 deg 27 min) North.,9801,49.0,0.0,,,0.999877499,600000.0,3200000.0,9001,9105,8903,,,,,1996-09-12 00:00:00,IGN Paris.,EPSG,Introduced 1972. See 18093.,95.26
-18084,France IV,,,,France - Corsica.,9801,46.85,0.0,,,0.99994471,234.358,4185861.369,9001,9105,8903,,,,,1996-09-12 00:00:00,IGN Paris.,EPSG,Introduced 1972. See 18094.,
-18091,Nord France,,,,France north of 53.5 grads (48 deg 09 min) North.,9801,55.0,0.0,,,0.999877341,600000.0,200000.0,9001,9105,8903,,,,,1996-09-12 00:00:00,IGN Paris.,EPSG,Superseded by 18081 from 1972.,95.26
-18092,Centre France,,,,France 50.5 to 53.5 grads (45 deg 27 min to 48 deg 09 min) North.,9801,52.0,0.0,,,0.99987742,600000.0,200000.0,9001,9105,8903,,,,,1996-09-12 00:00:00,IGN Paris.,EPSG,Superseded by 18082 from 1972.,95.26
-18093,Sud France,,,,France south of 50.5 grads (45 deg 27 min) North.,9801,49.0,0.0,,,0.999877499,600000.0,200000.0,9001,9105,8903,,,,,1996-09-12 00:00:00,IGN Paris.,EPSG,Superseded by 18083 from 1972.,95.26
-18094,Corse,,,,France - Corsica.,9801,46.85,0.0,,,0.99994471,234.358,185861.369,9001,9105,8903,,,,,1996-09-12 00:00:00,IGN Paris.,EPSG,Superseded by 18084 from 1972.,
-18101,Germany zone 1,,,,Germany - onshore west of 4 deg 30 min East.,9807,0.0,3.0,,,1.0,1500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula,95.30
-18102,Germany zone 2,,,,Germany - onshore between 4 deg 30 min and 7 deg 30 min East.,9807,0.0,6.0,,,1.0,2500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula,95.30
-18103,Germany zone 3,,,,Germany - onshore between 7 deg 30 min and 10 deg 30 min East.,9807,0.0,9.0,,,1.0,3500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula,95.30
-18104,Germany zone 4,,,,Germany - onshore between 10 deg 30 min and 13 deg 30 min East.,9807,0.0,12.0,,,1.0,4500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula,95.30
-18105,Germany zone 5,,,,Germany - onshore between 13 deg 30 min and 16 deg 30 min East.,9807,0.0,15.0,,,1.0,5500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula,95.30
-18110,India zone 0,,,,Pakistan north of 35 deg 35 min North.,9801,39.3,68.0,,,0.99846154,2355500.0,2590000.0,9084,9110,8901,,,,,1999-10-20 00:00:00,US Army Map Service projection tables; 1943.,EPSG,BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.,95.30  96.01  96.02  96.29  97.23
-18111,India zone I,,,,India north of 28 deg North. Pakistan 28 deg to 35 deg 35 min North.,9801,32.3,68.0,,,0.99878641,3000000.0,1000000.0,9084,9110,8901,,,,,1999-10-20 00:00:00,US Army Map Service projection tables; 1943.,EPSG,BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.,95.30  96.02  96.29  97.23
-18112,India zone IIa,,,,India - between 21 deg and 28 deg North and  west of 82 deg East; Pakistan - south of 28 deg North.,9801,26.0,74.0,,,0.99878641,3000000.0,1000000.0,9084,9102,8901,,,,,1999-10-20 00:00:00,US Army Map Service projection tables; 1943.,EPSG,BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.,95.28  96.02  97.23
-18113,India zone IIb,India zone II b,,,Bangladesh; India - north of 21 deg North and east of 82 deg East; Myanmar (Burma) - north of 21 deg North.,9801,26.0,90.0,,,0.99878641,3000000.0,1000000.0,9084,9102,8901,,,,,1999-10-20 00:00:00,US Army Map Service projection tables; 1943.,EPSG,BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.,95.28  96.02  97.23
-18114,India zone IIIa,India zone IIIa,,,India - between 15 deg and 21 deg North.,9801,19.0,80.0,,,0.99878641,3000000.0,1000000.0,9084,9102,8901,,,,,1999-10-20 00:00:00,US Army Map Service projection tables; 1943.,EPSG,BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.,95.28  96.02  97.23
-18115,India zone IIIb,,,,Myanmar (Burma) - between 15 deg and 21 deg North.,9801,19.0,100.0,,,0.99878641,3000000.0,1000000.0,9084,9102,8901,,,,,1999-10-20 00:00:00,US Army Map Service projection tables; 1943.,EPSG,BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.,95.28  96.02  97.23
-18116,India zone IVa,India zone Iva,,,India - south of 15 deg North.,9801,12.0,80.0,,,0.99878641,3000000.0,1000000.0,9084,9102,8901,,,,,1999-10-20 00:00:00,US Army Map Service projection tables; 1943.,EPSG,BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.,95.28  96.02  97.23
-18117,India zone IVb,,,,Myanmar - south of 15 deg North.,9801,12.0,100.0,,,0.99878641,3000000.0,1000000.0,9084,9102,8901,,,,,1999-10-20 00:00:00,US Army Map Service projection tables; 1943.,EPSG,BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.,95.28  96.02  97.23
-18121,Italy zone 1,,,,Italy west of 12 deg East (of Greenwich).,9807,0.0,9.0,,,0.9996,1500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Boaga formula,
-18122,Italy zone 2,,,,Italy east of 12 deg East (of Greenwich).,9807,0.0,15.0,,,0.9996,2520000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Original transformation by Gauss-Boaga formula,
-18131,Nord Maroc,,,,Morocco north of 35 grads (31 deg 30 min) North.,9801,37.0,-6.0,,,0.999625769,500000.0,300000.0,9001,9105,8901,,,,,1996-09-12 00:00:00,IGN Paris.,EPSG,A projection with the same parameter values used the Lambert Conic Near-Conformal method (EPSG code 9817) prior to 1953.,99.203
-18132,Sud Maroc,,,,Morocco 31gr to 35gr  (27 deg 54 min to 31 deg 30 min) North.,9801,33.0,-6.0,,,0.999615596,500000.0,300000.0,9001,9105,8901,,,,,1996-09-12 00:00:00,,EPSG,A projection with the same parameter values used the Lambert Conic Near-Conformal method (EPSG code 9817) prior to 1953.,99.203
-18133,Sahara,,,,Morocco south of 31gr  (27 deg 54 min) North.,9801,29.0,-6.0,,,0.9996,1200000.0,400000.0,9001,9105,8901,,,,,1996-09-12 00:00:00,IGN Paris,EPSG,Created in 1977 to cover Sahara Marocain (ex Spanish Sahara),
-18141,New Zealand North Island National Grid,North Island Grid,,,New Zealand - North Island.,9807,-39.0,175.3,,,1.0,300000.0,400000.0,9040,9110,8901,,,,,1999-10-20 00:00:00,,EPSG,Superseded by New Zealand Map Grid.,95.30  96.29  97.231
-18142,New Zealand South Island National Grid,South Island Grid,,,New Zealand - South Island.,9807,-44.0,171.3,,,1.0,500000.0,500000.0,9040,9110,8901,,,,,1999-10-20 00:00:00,,EPSG,Superseded by New Zealand Map Grid.,95.30  96.29  97.231
-18151,Nigeria West Belt,,,,Nigeria west of 6 deg 30 min East.,9807,4.0,4.3,,,0.99975,230738.26,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.30  96.29
-18152,Nigeria Mid Belt,,,,Nigeria between 6 deg 30 min and 10 deg 30 min East.,9807,4.0,8.3,,,0.99975,670553.98,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.30  96.29
-18153,Nigeria East Belt,,,,Nigeria east of 10 deg 30 min East.,9807,4.0,12.3,,,0.99975,1110369.7,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.30  96.29
-18161,Peru west zone,,,,Peru west of 79 deg West.,9807,-6.0,-80.3,,,0.99983008,222000.0,1426834.743,9001,9110,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.30  96.29
-18162,Peru central zone,,,,Peru 79 to 73 deg West.,9807,-9.3,-76.0,,,0.99932994,720000.0,1039979.159,9001,9110,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.30  96.29
-18163,Peru east zone,,,,Peru east of 73 deg West.,9807,-9.3,-70.3,,,0.99952992,1324000.0,1040084.558,9001,9110,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.30  96.29
-18171,Philippines zone  I,,,,Philippines - west of 118 deg East.,9807,0.0,117.0,,,0.99995,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.30
-18172,Philippines zone  II,,,,Philippines - Palawan; Calamian Islands.,9807,0.0,119.0,,,0.99995,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.30
-18173,Philippines zone  III,,,,Philippines - Luzon (except SE part); Mindoro.,9807,0.0,121.0,,,0.99995,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.30
-18174,Philippines zone  IV,,,,Philippines - SE Luzon; Tablas; Masbate; Panay; Cebu; Negros; W. Mindanao.,9807,0.0,123.0,,,0.99995,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.30
-18175,Philippines zone  V,,,,Philippines - E. Mindanao; Bohol; Samar.,9807,0.0,125.0,,,0.99995,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.30
-18181,Nord Tunisie,,,,Tunisia north of 38.5 grads (34 deg 39 min) North.,9801,40.0,11.0,,,0.999625544,500000.0,300000.0,9001,9105,8901,,,,,1996-09-12 00:00:00,,EPSG,,95.30
-18182,Sud Tunisie,,,,Tunisia south of 38.5 grads (34 deg 39 min) North.,9801,37.0,11.0,,,0.999625769,500000.0,300000.0,9001,9105,8901,,,,,1996-09-12 00:00:00,,EPSG,,
-18191,Finland zone 1,,,,Finland - west of 22deg 30min E.,9807,0.0,21.0,,,1.0,1500000.0,0.0,9001,9102,8901,,,,,1997-07-22 00:00:00,www.nls.fi/maa/papers/kkj.html,EPSG,,
-18192,Finland zone 2,,,,Finland - 22deg 30 min to 25deg 30min E.,9807,0.0,24.0,,,1.0,2500000.0,0.0,9001,9102,8901,,,,,1997-07-22 00:00:00,www.nls.fi/maa/papers/kkj.html,EPSG,,
-18193,Finland Uniform Coordinate System,Finland zone 3,,,Finland; Finland - 25 deg 30min E to 28deg 30min E.,9807,0.0,27.0,,,1.0,3500000.0,0.0,9001,9102,8901,,,,,1997-07-22 00:00:00,www.nls.fi/maa/papers/kkj.html,EPSG,Used by Uniform Coordinate System over all country and also by zone 3 of Basic Coordinate System at larger scales.,
-18194,Finland zone 4,,,,Finland - east of 28deg 30 min E.,9807,0.0,30.0,,,1.0,4500000.0,0.0,9001,9102,8901,,,,,1997-07-22 00:00:00,www.nls.fi/maa/papers/kkj.html,EPSG,,
-18201,Palestine Grid,,,,Israel;  Jordan,9806,31.4402749,35.124349,,,,170251.555,126867.909,9001,9110,8901,,,,,1999-04-22 00:00:00,,EPSG,Also encountered as a Transverse Mercator projection with scale factor of 1.  The difference in conversion caused by the change of formula does not exceed 2m within Israel.  Within the State of Israel superseded by the Israeli CS Grid (EPSG code 18203).,
-18202,Palestine Belt,,,,Israel;  Jordan,9807,31.4402749,35.124349,,,1.0,170251.555,1126867.909,9001,9110,8901,,,,,1999-04-22 00:00:00,,EPSG,"Originally constructed as the Palestine Grid - EPSG code 18201. Adopted by the US Army Map Service as \"Palestine Belt\" with change of projection method and false northing (FN). Sometimes seen with unchanged FN of 126867.909.",
-18203,Israeli CS,ICS,,,Israel,9806,31.4402749,35.124349,,,,170251.555,1126867.909,9001,9110,8901,,,,,1999-10-20 00:00:00,Survey of Israel   ftp://ftp.rd.soi.gov.il/doc,EPSG,,
-18204,Israeli TM,ITM,,,Israel,9807,31.4403817,35.1216261,,,1.0000067,219529.584,626907.39,9001,9110,8901,,,,,1999-10-20 00:00:00,Survey of Israel   ftp://ftp.rd.soi.gov.il/doc,EPSG,Designed to approximate Israeli CS grid in north-central Israel.,
-18211,Guatemala Norte,,,,Guatemala north of 15 deg 50 min North.,9801,16.49,-90.2,,,0.99992226,500000.0,292209.579,9001,9110,8901,,,,,1999-08-16 00:00:00,,EPSG,,
-18212,Guatemala Sud,,,,Guatemala south of 15 deg 50 min North.,9801,14.54,-90.2,,,0.99989906,500000.0,325992.681,9001,9110,8901,,,,,1999-08-16 00:00:00,,EPSG,,
-18221,NGO zone I,,,,Norway - west of 3deg 30min W of Oslo (7deg 13min 22.5sec E of Greenwich).,9807,58.0,-4.4,,,1.0,0.0,0.0,9001,9110,8913,,,,,1999-10-20 00:00:00,"J. Danielsen; \"Transformasjoner ved Norges Geografiske Oppm�ling\"; Kart Og Plan nr 1; 1982.",EPSG,,
-18222,NGO zone II,,,,Norway - between 3deg 30min W and 1deg 10min W of Oslo (7deg 13min 22.5sec E  and 9deg 33min 22.5sec E of Greenwich).,9807,58.0,-2.2,,,1.0,0.0,0.0,9001,9110,8913,,,,,1999-10-20 00:00:00,"J. Danielsen; \"Transformasjoner ved Norges Geografiske Oppm�ling\"; Kart Og Plan nr 1; 1982.",EPSG,,
-18223,NGO zone III,,,,Norway - between 1deg 10min W and 1deg 15min E of Oslo (9deg 33min 22.5sec E and 11deg 58min 22.5sec E of Greenwich).,9807,58.0,0.0,,,1.0,0.0,0.0,9001,9110,8913,,,,,1999-10-20 00:00:00,"J. Danielsen; \"Transformasjoner ved Norges Geografiske Oppm�ling\"; Kart Og Plan nr 1; 1982.",EPSG,,
-18224,NGO zone IV,,,,Norway - between 1deg 15min E and 4deg 20min E of Oslo (11deg 58min 22.5sec E and 15deg 03min 22.5sec E of Greenwich).,9807,58.0,2.3,,,1.0,0.0,0.0,9001,9110,8913,,,,,1999-10-20 00:00:00,"J. Danielsen; \"Transformasjoner ved Norges Geografiske Oppm�ling\"; Kart Og Plan nr 1; 1982.",EPSG,,
-18225,NGO zone V,,,,Norway - between 4deg 20min E and 8deg 10min E of Oslo (15deg 03min 22.5sec E and 18deg 53min 22.5sec E of Greenwich).,9807,58.0,6.1,,,1.0,0.0,0.0,9001,9110,8913,,,,,1999-10-20 00:00:00,"J. Danielsen; \"Transformasjoner ved Norges Geografiske Oppm�ling\"; Kart Og Plan nr 1; 1982.",EPSG,,
-18226,NGO zone VI,,,,Norway - between 8deg 10min E and 12deg 10min E of Oslo (18deg 53min 22.5sec E and 22deg 53min 22.5sec E of Greenwich).,9807,58.0,10.1,,,1.0,0.0,0.0,9001,9110,8913,,,,,1999-10-20 00:00:00,"J. Danielsen; \"Transformasjoner ved Norges Geografiske Oppm�ling\"; Kart Og Plan nr 1; 1982.",EPSG,,
-18227,NGO zone VII,,,,Norway - between 12deg 10min E and 16deg 15min E of Oslo (22deg 53min 22.5sec E and 26deg 58min 22.5sec E of Greenwich).,9807,58.0,14.1,,,1.0,0.0,0.0,9001,9110,8913,,,,,1999-10-20 00:00:00,"J. Danielsen; \"Transformasjoner ved Norges Geografiske Oppm�ling\"; Kart Og Plan nr 1; 1982.",EPSG,,
-18228,NGO zone VIII,,,,Norway - east of 16deg 15min E of Oslo (26deg 58min 22.5sec E of Greenwich).,9807,58.0,18.2,,,1.0,0.0,0.0,9001,9110,8913,,,,,1999-10-20 00:00:00,"J. Danielsen; \"Transformasjoner ved Norges Geografiske Oppm�ling\"; Kart Og Plan nr 1; 1982.",EPSG,,
-18231,India zone I (1975 metres),India zone I,,,India north of 28 deg North.,9801,32.3,68.0,,,0.99878641,2743185.69,914395.23,9001,9110,8901,,,,,1999-10-20 00:00:00,,EPSG,BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.,
-18232,India zone IIa (1975 metres),India zone II a,,,India - between 21 deg and 28 deg North and  west of 82 deg East.,9801,26.0,74.0,,,0.99878641,2743185.69,914395.23,9001,9102,8901,,,,,1999-10-20 00:00:00,,EPSG,BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.,
-18233,India zone IIIa (1975 metres),India zone IIIa,,,India - between 15 deg and 21 deg North.,9801,19.0,80.0,,,0.99878641,2743185.69,914395.23,9001,9102,8901,,,,,1999-10-20 00:00:00,,EPSG,BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.,
-18234,India zone IVa (1975 metres),India zone IV a,,,India - south of 15 deg North.,9801,12.0,80.0,,,0.99878641,2743185.69,914395.23,9001,9102,8901,,,,,1999-10-20 00:00:00,,EPSG,BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.,
-18235,India zone IIb (1975 metres),India zone II b,,,India - north of 21 deg North and east of 82 deg East.,9801,26.0,90.0,,,0.99878641,2743185.69,914395.23,9001,9102,8901,,,,,1999-10-20 00:00:00,,EPSG,BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.,
-18236,India zone I (1962 metres),India zone I,,,Pakistan - north of 28 deg North.,9801,32.3,68.0,,,0.99878641,2743196.4,914398.8,9001,9110,8901,,,,,1999-10-20 00:00:00,,EPSG,BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.,
-18237,India zone IIa (1962 metres),India zone II a,,,Pakistan - south of 28 deg North.,9801,26.0,74.0,,,0.99878641,2743196.4,914398.8,9001,9102,8901,,,,,1999-10-20 00:00:00,,EPSG,BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.,
-18238,India zone IIb (1937 metres),India zone II b,,,Bangladesh.,9801,26.0,90.0,,,0.99878641,2743195.5,914398.5,9001,9102,8901,,,,,1999-10-20 00:00:00,US Army Map Service projection tables; 1943.,EPSG,BEWARE !  Different yard to metre conversion values have been used in different parts of south Asia. Some areas have changed conversion value with time.,
-19900,Bahrain State Grid,Bahrain Grid,,,Bahrain.,9807,0.0,51.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.30
-19901,Belge Lambert 50,,,,Belgium - onshore.,9802,90.0,0.0,49.5,51.1,,150000.0,5400000.0,9001,9110,8910,,,,,1999-04-22 00:00:00,"\"Systemes de reference et formules de transformation en usage en Belgique\"; IGN Brussels",EPSG,,95.30  96.29  99.28
-19902,Belge Lambert 72,,,,Belgium - onshore.,9803,90.0,4.2124983,49.5,51.1,,150000.01256,5400088.4378,9001,9110,8901,,,,,1999-04-22 00:00:00,"\"Systemes de reference et formules de transformation en usage en Belgique\"; IGN Brussels",EPSG,Rotation from Belge Lambert 50 to Belge Lambert 72 is +29.2985sec.,95.30  96.29  99.28
-19903,Nord de Guerre,,,,France - Alsace.,9801,55.0,6.0,,,0.99950908,500000.0,300000.0,9001,9105,8903,,,,,1996-09-12 00:00:00,,EPSG,,
-19904,Ghana Metre Grid,,,,Ghana.,9807,4.4,-1.0,,,0.99975,274319.51,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.30  96.29
-19905,Netherlands East Indies Equatorial Zone,NEIEZ,,,Indonesia.,9804,0.0,110.0,,,0.997,3900000.0,900000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,US Army Map Service projection tables; 1943.,EPSG,,95.30
-19906,Iraq zone,,,,Iran -south of 36 deg North; Iraq;  Kuwait.,9801,32.3,45.0,,,0.99878640776699,1500000.0,1166200.0,9001,9110,8901,,,,,1996-04-12 00:00:00,US Army Map Service projection tables; 1943.,EPSG,,95.30  96.29
-19907,Iraq National Grid,,,,Iraq.,9807,29.0134566,46.3,,,0.9994,800000.0,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.30  96.29
-19908,Irish National Grid,,,,Ireland - onshore.  United Kingdom (UK) - Northern Ireland onshore.,9807,53.3,-8.0,,,1.000035,200000.0,250000.0,9001,9110,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.30  96.29
-19909,Jamaica (Old Grid),,,,Jamaica.,9801,18.0,-77.0,,,1.0,550000.0,400000.0,9005,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Superseded by Jamaica (New Grid).,95.28
-19910,Jamaica National Grid,,,,Jamaica.,9801,18.0,-77.0,,,1.0,250000.0,150000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,Supersedes Jamaica (Old Grid).,95.28
-19911,Laborde Grid,,,,Madagascar.,9815,-21.0,49.0,21.0,21.0,0.9995,400000.0,800000.0,9001,9105,8903,,,,,1997-11-13 00:00:00,,EPSG,Can also use transformation method 9813.,97.613
-19912,Rectified Skew Orthomorphic Borneo Grid,R.S.O. Borneo,,,Brunei;  Malaysia - East Malaysia (Sabah; Sarawak).,9812,4.0,115.0,53.18569537,53.07483685,0.99984,0.0,0.0,9042,9110,8901,,,,,1999-10-20 00:00:00,,EPSG,,95.30  96.29  97.231
-19913,RD Old,,,,Netherlands - onshore.,9809,52.0922178,5.23155,,,0.9999079,0.0,0.0,9001,9110,8901,,,,,1995-12-02 00:00:00,Nederlandse Commissie voor Geodesie publication 30.,EPSG,,95.30  96.29
-19914,RD New,,,,Netherlands - onshore.,9809,52.0922178,5.23155,,,0.9999079,155000.0,463000.0,9001,9110,8901,,,,,1995-12-02 00:00:00,Nederlandse Commissie voor Geodesie publication 30.,EPSG,,95.30  96.29
-19915,Aden Zone,,,,Yemen.,9801,15.0,45.0,,,0.999365678,1500000.0,1000000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,US Army Map Service projection tables; 1943.,EPSG,,95.28
-19916,British National Grid,,,,United Kingdom (UK) - onshore England; Scotland; Wales; Isle of Man.,9807,49.0,-2.0,,,0.999601272,400000.0,-100000.0,9001,9102,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.30
-19917,New Zealand Map Grid,,,,New Zealand.,9811,-41.0,173.0,,,,2510000.0,6023150.0,9001,9102,8901,,,,,1995-12-02 00:00:00,Dept. of Lands and Surveys Technical Circular 1973/32; 23 Nov 1973.,EPSG,Supersedes North and South Island National Grids.,95.28
-19919,Qatar National Grid,,,,Qatar.,9807,24.27,51.13,,,0.99999,200000.0,300000.0,9001,9110,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.30  96.29
-19920,Singapore Grid,,,,Singapore.,9806,1.1715528,103.5110808,,,,30000.0,30000.0,9001,9110,8901,,,,,1995-12-02 00:00:00,,EPSG,,95.30  96.29
-19921,Spain,,,,Spain.,9801,40.0,0.0,,,0.9988085293,600000.0,600000.0,9001,9102,8905,,,,,1995-12-02 00:00:00,,EPSG,Superseded by UTM,95.28
-19922,Swiss New Grid,LV03,,,Liechtenstein;  Switzerland.,9815,46.570866,7.26225,90.0,90.0,1.0,600000.0,200000.0,9001,9110,8901,,,,,1997-11-13 00:00:00,"\"Die Projektionen der schweizerischen Plan- und Kartenwerke\"; J. Bolliger 1967",EPSG,,95.30  96.29  97.27  97.612  97.62
-19923,Swiss Old Grid,LV03C,,,Liechtenstein;  Switzerland.,9815,46.570866,0.0,90.0,90.0,1.0,0.0,0.0,9001,9110,8907,,,,,1997-11-13 00:00:00,"\"Die Projektionen der schweizerischen Plan- und Kartenwerke\"; J. Bolliger 1967",EPSG,Superseded by LV03 (19922).,95.30  96.29  97.612  97.62
-19924,Tobago Grid,,,,Trinidad and Tobago - Tobago.,9806,11.1507843,-60.4109632,,,,187500.0,180000.0,9039,9110,8901,,,,,1999-10-20 00:00:00,,EPSG,,95.30  96.29  97.231
-19925,Trinidad Grid,,,,Trinidad and Tobago - Trinidad.,9806,10.263,-61.2,,,,430000.0,325000.0,9039,9110,8901,,,,,1999-10-20 00:00:00,,EPSG,,95.30  96.29  97.231
-19926,Stereo 70,,,,Romania.,9809,46.0,25.0,,,0.99975,500000.0,500000.0,9001,9102,8901,,,,,1996-04-12 00:00:00,,EPSG,Supersedes Stereo 33 (code 19927).,
-19927,Stereo 33,,,,Romania.,9809,45.54,25.23328772,,,0.9996667,500000.0,500000.0,9001,9110,8901,,,,,1996-04-12 00:00:00,,EPSG,Superseded by Stereo 70 (code 19926),96.29
-19928,Kuwait TM,KTM,,,Kuwait - Kuwait City.,9807,0.0,48.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1996-04-12 00:00:00,,EPSG,,
-19929,Swedish National Projection,2.5 gon West,,,Sweden.,9807,0.0,15.48298,,,1.0,1500000.0,0.0,9001,9110,8901,,,,,1997-11-13 00:00:00,Lantmateriet of Sweden; private communication.,EPSG,"Used since 1938 superseding 6 old zones.  Longitude of natural origin is 2.5 gon west of Stockholm prime meridian; transformation is also known as \"2.5 gon West of old Stockholm observatory\".",96.29  97.39
-19930,Greek Grid,,,,Greece,9807,0.0,24.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1997-06-16 00:00:00,Geodesy Department; Public Petroleum Corporation of Greece.,EPSG,Created for use with GGRS87.,
-19931,Egyseges Orszagos Vetuleti,EOV,,,Hungary,9815,47.08398174,19.02548584,90.0,90.0,0.99993,650000.0,200000.0,9001,9110,8901,,,,,1997-07-22 00:00:00,http://lazarus.elte.hu/gb/geodez/geod2.htm,EPSG,EOV = Uniform National Projection,
-19933,Prince Edward Island Stereographic,PEI Stereographic,,,Canada - Prince Edward Island,9809,47.15,-63.0,,,0.999912,700000.0,400000.0,9001,9110,8901,,,,,1997-11-13 00:00:00,Geomatics Centre; Nova Scotia Ministry of Housing and Municipal Affairs.,EPSG,In use from 1979.  To be phased out in late 1990's.,
-19934,Lithuania 1994,,,,Lithuania,9807,0.0,24.0,,,0.9998,500000.0,0.0,9001,9102,8901,,,,,1998-03-12 00:00:00,HNIT-BALTIC GeoInfoServisas,EPSG,,
-19935,Rectified Skew Orthomorphic Malaya Grid,R.S.O. Malaya,,,Malaysia - West Malaysia,9812,4.0,102.15,323.01328458,323.07483685,0.99984,40000.0,0.0,9062,9110,8901,,,,,1999-10-20 00:00:00,UK Directorate of Overseas Surveys paper,EPSG,,97.231
-19936,Portuguese National Grid,,,,Portugal onshore.,9807,39.4,1.0,,,1.0,200000.0,300000.0,9001,9110,8902,,,,,1998-11-11 00:00:00,,EPSG,Original transformation by Gauss-Kruger formula.,95.30  96.29  98.42
-19937,Tunisia Mining Grid,,,,Tunisia - onshore,9816,38.81973,7.83445,,,,270.0,582.0,9036,9105,8903,,,,,1999-11-15 00:00:00,Mining decree of 1st January 1953,EPSG,Origin: Djebel Kebar,99.81
-19938,Estonian National Grid,,,,Estonia,9802,57.310319415,24.0,59.2,58.0,,500000.0,6375000.0,9001,9110,8901,,,,,1999-04-22 00:00:00,http://www.geo.ut.ee/~raivo/estcoord.html,EPSG,Coordinates at the projection origin match those of TM Baltic 93.,99.28
-19939,TM Baltic 93,,,,Estonia; Latvia; Lithuania.,9807,0.0,24.0,,,0.9996,500000.0,0.0,9001,9102,8901,,,,,1998-12-14 00:00:00,http://www.geo.ut.ee/~raivo/estcoord.html,EPSG,,
-19940,Levant Zone,,,,Syrian Arab Republic west of 39 deg E.,9817,34.39,37.21,,,0.9996256,300000.0,300000.0,9001,9110,8901,,,,,1999-04-22 00:00:00,US Army Map Service projection tables; 1943.,EPSG,Superseded by projection using full Lambert formula from 1973. (EPSG code 19948).,
-19941,Brazil Polyconic,,,,Brazil,9818,0.0,-54.0,,,,5000000.0,10000000.0,9001,9102,8901,,,,,1999-10-20 00:00:00,PetroBras,EPSG,,99.55
-19942,British West Indies Grid,,,,Windward Islands - Dominica  Grenada  Saint Lucia  Saint Vincent;  Leeward Islands - Anguilla   Antigua (excluding Barbuda)  Montserrat   Saint Kitts and Nevis; Barbados.,9807,0.0,-62.0,,,0.9995,400000.0,0.0,9001,9102,8901,,,,,1999-04-22 00:00:00,"UK Royal Engineers projection tables P10/25, 1943.",EPSG,,
-19943,Barbados National Grid,,,,Barbados,9807,13.1035,-59.3335,,,0.9999986,30000.0,75000.0,9001,9110,8901,,,,,1999-04-22 00:00:00,Ordnance Survey of Great Britain,EPSG,Superseded British West Indies Grid (19942) after 1983.,
-19944,Quebec Lambert Projection,,,,Canada - Quebec,9802,44.0,-68.3,60.0,46.0,,0.0,0.0,9001,9110,8901,,,,,1999-10-22 00:00:00,Service de la Cartographie; Minist�re des Ressources Naturelles; Quebec,EPSG,,
-19945,New Brunswick Stereographic (ATS77),NB Stereographic ATS77,,,Canada - New Brunswick - onshore,9809,46.3,-66.3,,,0.999912,300000.0,800000.0,9001,9110,8901,,,,,1999-10-20 00:00:00,New Brunswick Geographic Information Corporation land and water information standards manual.,EPSG,In use from 1979.  To be phased out in late 1990's.,99.61
-19946,New Brunswick Stereographic (NAD83),NB Stereographic NAD83,,,Canada - New Brunswick - onshore,9809,46.3,-66.3,,,0.999912,2500000.0,7500000.0,9001,9110,8901,,,,,1999-10-20 00:00:00,New Brunswick Geographic Information Corporation land and water information standards manual.,EPSG,In use from 1999.,
-19947,Austria Lambert,,,,Austria,9802,13.2,47.3,49.0,46.0,,400000.0,400000.0,9001,9110,8901,,,,,1999-10-20 00:00:00,Bundesamt f�r Eich- und Vermessungswesen,EPSG,,
-19948,Syria Lambert,,,,Syrian Arab Republic,9801,34.39,37.21,,,0.9996256,300000.0,300000.0,9001,9110,8901,,,,,1999-10-20 00:00:00,IGN Paris,EPSG,Superseded Levant zone (same parameters but using truncated near-conformal method) from 1973.,
-19949,Levant Stereographic,,,,Lebanon,9809,38.0,43.5,,,0.9995341,0.0,0.0,9001,9105,8901,,,,,1999-10-20 00:00:00,IGN Paris,EPSG,Used prior to World War II for cadastral and large scale topographic mapping.,
-19950,Landesvermessung 1995,LV95,,,Liechtenstein;  Switzerland.,9815,46.570866,7.26225,90.0,90.0,1.0,2600000.0,1200000.0,9001,9110,8901,,,,,1999-10-20 00:00:00,Bundesamt f�r Landestopographie.  Aufbau der Landesvermessung der Schweiz 'LV95' Teil 3: Terrestrische Bezugssysteme und Bezugsrahmen. L+T 1999.,EPSG,,
-19951,Nakhl e Taqi Oblique Mercator,Nakhl e Taqi,,,Iran - Taheri refinery site only.,9815,27.31077837,52.3612741,0.34179803,0.34179803,0.999895934,658377.437,3044969.194,9001,9110,8901,,,,,1999-10-20 00:00:00,Total-Fina,EPSG,Used only for terminal site.,
diff --git a/src/tiff/csv/trf_path.c b/src/tiff/csv/trf_path.c
deleted file mode 100644
index 0c38f03..0000000
--- a/src/tiff/csv/trf_path.c
+++ /dev/null
@@ -1,568 +0,0 @@
-#include "defs.h"
-datafile_rows_t trf_path_row_1[] = {"TRF_PATH_CODE","TRF_STEP_CODE","SOURCE_HORIZCS_CODE","TARGET_HORIZCS_CODE","POLYN_TRF_CODE","NONPOLYN_TRF_CODE","CHANGE_ID",NULL};
-datafile_rows_t trf_path_row_2[] = {"8400","1","4201","4326","","1100","",NULL};
-datafile_rows_t trf_path_row_3[] = {"8401","1","4201","4326","","1101","",NULL};
-datafile_rows_t trf_path_row_4[] = {"8402","1","4201","4326","","1102","",NULL};
-datafile_rows_t trf_path_row_5[] = {"8403","1","4201","4326","","1103","",NULL};
-datafile_rows_t trf_path_row_6[] = {"8404","1","4201","4326","","1104","",NULL};
-datafile_rows_t trf_path_row_7[] = {"8405","1","4201","4326","","1105","",NULL};
-datafile_rows_t trf_path_row_8[] = {"8406","1","4201","4326","","1106","",NULL};
-datafile_rows_t trf_path_row_9[] = {"8407","1","4205","4326","","1107","",NULL};
-datafile_rows_t trf_path_row_10[] = {"8408","1","4202","4326","","1108","",NULL};
-datafile_rows_t trf_path_row_11[] = {"8409","1","4203","4326","","1109","",NULL};
-datafile_rows_t trf_path_row_12[] = {"8410","1","4204","4326","","1110","",NULL};
-datafile_rows_t trf_path_row_13[] = {"8411","1","4204","4326","","1111","",NULL};
-datafile_rows_t trf_path_row_14[] = {"8412","1","4289","4326","","1112","",NULL};
-datafile_rows_t trf_path_row_15[] = {"8413","1","4209","4326","","1113","",NULL};
-datafile_rows_t trf_path_row_16[] = {"8414","1","4209","4326","","1114","",NULL};
-datafile_rows_t trf_path_row_17[] = {"8415","1","4209","4326","","1115","",NULL};
-datafile_rows_t trf_path_row_18[] = {"8416","1","4209","4326","","1116","",NULL};
-datafile_rows_t trf_path_row_19[] = {"8417","1","4209","4326","","1117","",NULL};
-datafile_rows_t trf_path_row_20[] = {"8418","1","4209","4326","","1118","",NULL};
-datafile_rows_t trf_path_row_21[] = {"8419","1","4209","4326","","1119","",NULL};
-datafile_rows_t trf_path_row_22[] = {"8420","1","4209","4326","","1120","",NULL};
-datafile_rows_t trf_path_row_23[] = {"8421","1","4209","4326","","1121","",NULL};
-datafile_rows_t trf_path_row_24[] = {"8422","1","4210","4326","","1122","",NULL};
-datafile_rows_t trf_path_row_25[] = {"8423","1","4211","4326","","1123","",NULL};
-datafile_rows_t trf_path_row_26[] = {"8424","1","4216","4326","","1124","",NULL};
-datafile_rows_t trf_path_row_27[] = {"8425","1","4218","4326","","1125","",NULL};
-datafile_rows_t trf_path_row_28[] = {"8426","1","4219","4326","","1126","",NULL};
-datafile_rows_t trf_path_row_29[] = {"8427","1","4221","4326","","1127","",NULL};
-datafile_rows_t trf_path_row_30[] = {"8428","1","4222","4326","","1128","",NULL};
-datafile_rows_t trf_path_row_31[] = {"8429","1","4222","4326","","1129","",NULL};
-datafile_rows_t trf_path_row_32[] = {"8430","1","4223","4326","","1130","",NULL};
-datafile_rows_t trf_path_row_33[] = {"8431","1","4224","4326","","1131","",NULL};
-datafile_rows_t trf_path_row_34[] = {"8432","1","4225","4326","","1132","",NULL};
-datafile_rows_t trf_path_row_35[] = {"8433","1","4230","4326","","1133","",NULL};
-datafile_rows_t trf_path_row_36[] = {"8434","1","4230","4326","","1134","",NULL};
-datafile_rows_t trf_path_row_37[] = {"8435","1","4230","4326","","1135","",NULL};
-datafile_rows_t trf_path_row_38[] = {"8436","1","4230","4326","","1136","",NULL};
-datafile_rows_t trf_path_row_39[] = {"8437","1","4230","4326","","1137","",NULL};
-datafile_rows_t trf_path_row_40[] = {"8438","1","4230","4326","","1138","",NULL};
-datafile_rows_t trf_path_row_41[] = {"8439","1","4230","4326","","1139","",NULL};
-datafile_rows_t trf_path_row_42[] = {"8440","1","4230","4326","","1140","",NULL};
-datafile_rows_t trf_path_row_43[] = {"8441","1","4230","4326","","1141","",NULL};
-datafile_rows_t trf_path_row_44[] = {"8442","1","4230","4326","","1142","",NULL};
-datafile_rows_t trf_path_row_45[] = {"8443","1","4230","4326","","1143","",NULL};
-datafile_rows_t trf_path_row_46[] = {"8444","1","4230","4326","","1144","",NULL};
-datafile_rows_t trf_path_row_47[] = {"8445","1","4230","4326","","1145","",NULL};
-datafile_rows_t trf_path_row_48[] = {"8446","1","4230","4231","1000","","",NULL};
-datafile_rows_t trf_path_row_49[] = {"8446","2","4231","4326","","1146","",NULL};
-datafile_rows_t trf_path_row_50[] = {"8447","1","4230","4231","","1147","",NULL};
-datafile_rows_t trf_path_row_51[] = {"8447","2","4231","4326","","1146","",NULL};
-datafile_rows_t trf_path_row_52[] = {"8448","1","4229","4326","","1148","",NULL};
-datafile_rows_t trf_path_row_53[] = {"8449","1","4258","4326","","1149","",NULL};
-datafile_rows_t trf_path_row_54[] = {"8450","1","4283","4326","","1150","",NULL};
-datafile_rows_t trf_path_row_55[] = {"8451","1","4272","4326","","1151","",NULL};
-datafile_rows_t trf_path_row_56[] = {"8452","1","4236","4326","","1152","",NULL};
-datafile_rows_t trf_path_row_57[] = {"8453","1","4239","4326","","1153","",NULL};
-datafile_rows_t trf_path_row_58[] = {"8454","1","4240","4326","","1154","",NULL};
-datafile_rows_t trf_path_row_59[] = {"8455","1","4144","4326","","1155","97.235",NULL};
-datafile_rows_t trf_path_row_60[] = {"8456","1","4146","4326","","1156","97.235",NULL};
-datafile_rows_t trf_path_row_61[] = {"8457","1","4244","4326","","1157","",NULL};
-datafile_rows_t trf_path_row_62[] = {"8458","1","4245","4326","","1158","",NULL};
-datafile_rows_t trf_path_row_63[] = {"8459","1","4250","4326","","1159","",NULL};
-datafile_rows_t trf_path_row_64[] = {"8460","1","4251","4326","","1160","",NULL};
-datafile_rows_t trf_path_row_65[] = {"8461","1","4253","4326","","1161","",NULL};
-datafile_rows_t trf_path_row_66[] = {"8462","1","4253","4326","","1162","",NULL};
-datafile_rows_t trf_path_row_67[] = {"8463","1","4266","4326","","1163","",NULL};
-datafile_rows_t trf_path_row_68[] = {"8464","1","4256","4326","","1164","",NULL};
-datafile_rows_t trf_path_row_69[] = {"8465","1","4262","4326","","1165","",NULL};
-datafile_rows_t trf_path_row_70[] = {"8466","1","4261","4326","","1166","",NULL};
-datafile_rows_t trf_path_row_71[] = {"8467","1","4263","4326","","1167","",NULL};
-datafile_rows_t trf_path_row_72[] = {"8468","1","4263","4326","","1168","",NULL};
-datafile_rows_t trf_path_row_73[] = {"8469","1","4265","4326","","1169","",NULL};
-datafile_rows_t trf_path_row_74[] = {"8470","1","4267","4326","","1170","",NULL};
-datafile_rows_t trf_path_row_75[] = {"8471","1","4267","4326","","1171","",NULL};
-datafile_rows_t trf_path_row_76[] = {"8472","1","4267","4326","","1172","",NULL};
-datafile_rows_t trf_path_row_77[] = {"8473","1","4267","4326","","1173","",NULL};
-datafile_rows_t trf_path_row_78[] = {"8474","1","4267","4326","","1174","",NULL};
-datafile_rows_t trf_path_row_79[] = {"8475","1","4267","4326","","1175","",NULL};
-datafile_rows_t trf_path_row_80[] = {"8476","1","4267","4326","","1176","",NULL};
-datafile_rows_t trf_path_row_81[] = {"8477","1","4267","4326","","1177","",NULL};
-datafile_rows_t trf_path_row_82[] = {"8478","1","4267","4326","","1178","",NULL};
-datafile_rows_t trf_path_row_83[] = {"8479","1","4267","4326","","1179","",NULL};
-datafile_rows_t trf_path_row_84[] = {"8480","1","4267","4326","","1180","",NULL};
-datafile_rows_t trf_path_row_85[] = {"8481","1","4267","4326","","1181","",NULL};
-datafile_rows_t trf_path_row_86[] = {"8482","1","4267","4326","","1182","",NULL};
-datafile_rows_t trf_path_row_87[] = {"8483","1","4267","4326","","1183","",NULL};
-datafile_rows_t trf_path_row_88[] = {"8484","1","4267","4326","","1184","",NULL};
-datafile_rows_t trf_path_row_89[] = {"8485","1","4267","4326","","1185","",NULL};
-datafile_rows_t trf_path_row_90[] = {"8486","1","4267","4326","","1186","",NULL};
-datafile_rows_t trf_path_row_91[] = {"8487","1","4267","4326","","1187","",NULL};
-datafile_rows_t trf_path_row_92[] = {"8488","1","4269","4326","","1188","",NULL};
-datafile_rows_t trf_path_row_93[] = {"8489","1","4270","4326","","1189","",NULL};
-datafile_rows_t trf_path_row_94[] = {"8490","1","4270","4326","","1190","",NULL};
-datafile_rows_t trf_path_row_95[] = {"8491","1","4270","4326","","1191","",NULL};
-datafile_rows_t trf_path_row_96[] = {"8492","1","4271","4326","","1192","",NULL};
-datafile_rows_t trf_path_row_97[] = {"8493","1","4275","4326","","1193","",NULL};
-datafile_rows_t trf_path_row_98[] = {"8494","1","4807","4275","","1467","97.05",NULL};
-datafile_rows_t trf_path_row_99[] = {"8494","2","4275","4326","","1193","",NULL};
-datafile_rows_t trf_path_row_100[] = {"8495","1","4277","4326","","1195","",NULL};
-datafile_rows_t trf_path_row_101[] = {"8496","1","4277","4326","","1196","",NULL};
-datafile_rows_t trf_path_row_102[] = {"8497","1","4277","4326","","1197","",NULL};
-datafile_rows_t trf_path_row_103[] = {"8498","1","4277","4326","","1198","",NULL};
-datafile_rows_t trf_path_row_104[] = {"8499","1","4277","4326","","1199","",NULL};
-datafile_rows_t trf_path_row_105[] = {"8500","1","4282","4326","","1200","",NULL};
-datafile_rows_t trf_path_row_106[] = {"8501","1","4248","4326","","1201","",NULL};
-datafile_rows_t trf_path_row_107[] = {"8502","1","4248","4326","","1202","",NULL};
-datafile_rows_t trf_path_row_108[] = {"8503","1","4248","4326","","1203","",NULL};
-datafile_rows_t trf_path_row_109[] = {"8504","1","4248","4326","","1204","",NULL};
-datafile_rows_t trf_path_row_110[] = {"8505","1","4248","4326","","1205","",NULL};
-datafile_rows_t trf_path_row_111[] = {"8506","1","4248","4326","","1206","",NULL};
-datafile_rows_t trf_path_row_112[] = {"8507","1","4248","4326","","1207","",NULL};
-datafile_rows_t trf_path_row_113[] = {"8508","1","4248","4326","","1208","",NULL};
-datafile_rows_t trf_path_row_114[] = {"8509","1","4248","4326","","1209","",NULL};
-datafile_rows_t trf_path_row_115[] = {"8510","1","4285","4326","","1210","",NULL};
-datafile_rows_t trf_path_row_116[] = {"8511","1","4287","4326","","1211","",NULL};
-datafile_rows_t trf_path_row_117[] = {"8512","1","4291","4326","","1212","",NULL};
-datafile_rows_t trf_path_row_118[] = {"8513","1","4291","4326","","1213","",NULL};
-datafile_rows_t trf_path_row_119[] = {"8514","1","4291","4326","","1214","",NULL};
-datafile_rows_t trf_path_row_120[] = {"8515","1","4291","4326","","1215","",NULL};
-datafile_rows_t trf_path_row_121[] = {"8516","1","4291","4326","","1216","",NULL};
-datafile_rows_t trf_path_row_122[] = {"8517","1","4291","4326","","1217","",NULL};
-datafile_rows_t trf_path_row_123[] = {"8518","1","4291","4326","","1218","",NULL};
-datafile_rows_t trf_path_row_124[] = {"8519","1","4291","4326","","1219","",NULL};
-datafile_rows_t trf_path_row_125[] = {"8520","1","4291","4326","","1220","",NULL};
-datafile_rows_t trf_path_row_126[] = {"8521","1","4291","4326","","1221","",NULL};
-datafile_rows_t trf_path_row_127[] = {"8522","1","4291","4326","","1222","",NULL};
-datafile_rows_t trf_path_row_128[] = {"8523","1","4291","4326","","1223","",NULL};
-datafile_rows_t trf_path_row_129[] = {"8524","1","4291","4326","","1224","",NULL};
-datafile_rows_t trf_path_row_130[] = {"8525","1","4292","4326","","1225","",NULL};
-datafile_rows_t trf_path_row_131[] = {"8526","1","4293","4326","","1226","",NULL};
-datafile_rows_t trf_path_row_132[] = {"8527","1","4297","4326","","1227","",NULL};
-datafile_rows_t trf_path_row_133[] = {"8528","1","4298","4326","","1228","",NULL};
-datafile_rows_t trf_path_row_134[] = {"8529","1","4299","4326","","1229","",NULL};
-datafile_rows_t trf_path_row_135[] = {"8530","1","4301","4326","","1230","",NULL};
-datafile_rows_t trf_path_row_136[] = {"8531","1","4301","4326","","1231","",NULL};
-datafile_rows_t trf_path_row_137[] = {"8532","1","4301","4326","","1232","",NULL};
-datafile_rows_t trf_path_row_138[] = {"8533","1","4301","4326","","1233","",NULL};
-datafile_rows_t trf_path_row_139[] = {"8534","1","4309","4326","","1234","",NULL};
-datafile_rows_t trf_path_row_140[] = {"8535","1","4311","4326","","1235","",NULL};
-datafile_rows_t trf_path_row_141[] = {"8536","1","4230","4231","1000","","",NULL};
-datafile_rows_t trf_path_row_142[] = {"8537","1","4231","4326","","1146","",NULL};
-datafile_rows_t trf_path_row_143[] = {"8538","1","4230","4231","","1147","",NULL};
-datafile_rows_t trf_path_row_144[] = {"8539","1","4203","4326","","1236","",NULL};
-datafile_rows_t trf_path_row_145[] = {"8540","1","4322","4326","","1237","",NULL};
-datafile_rows_t trf_path_row_146[] = {"8541","1","4322","4326","","1238","",NULL};
-datafile_rows_t trf_path_row_147[] = {"8542","1","4324","4322","","1239","",NULL};
-datafile_rows_t trf_path_row_148[] = {"8543","1","4324","4326","","1240","",NULL};
-datafile_rows_t trf_path_row_149[] = {"8544","1","4267","4269","","1241","",NULL};
-datafile_rows_t trf_path_row_150[] = {"8546","1","4267","4269","","1243","",NULL};
-datafile_rows_t trf_path_row_151[] = {"8548","1","4230","4326","","1245","",NULL};
-datafile_rows_t trf_path_row_152[] = {"8549","1","4255","4326","","1246","",NULL};
-datafile_rows_t trf_path_row_153[] = {"8550","1","4145","4326","","1247","97.235",NULL};
-datafile_rows_t trf_path_row_154[] = {"8551","1","4238","4326","","1248","",NULL};
-datafile_rows_t trf_path_row_155[] = {"8552","1","4267","4326","","1249","",NULL};
-datafile_rows_t trf_path_row_156[] = {"8553","1","4267","4326","","1250","",NULL};
-datafile_rows_t trf_path_row_157[] = {"8554","1","4269","4326","","1251","",NULL};
-datafile_rows_t trf_path_row_158[] = {"8555","1","4269","4326","","1252","",NULL};
-datafile_rows_t trf_path_row_159[] = {"8556","1","4307","4326","","1253","",NULL};
-datafile_rows_t trf_path_row_160[] = {"8557","1","4284","4326","","1254","",NULL};
-datafile_rows_t trf_path_row_161[] = {"8558","1","4305","4326","","1255","",NULL};
-datafile_rows_t trf_path_row_162[] = {"8559","1","4232","4326","","1256","",NULL};
-datafile_rows_t trf_path_row_163[] = {"8560","1","4807","4275","","1467","99.63",NULL};
-datafile_rows_t trf_path_row_164[] = {"8561","1","4801","4217","","1257","",NULL};
-datafile_rows_t trf_path_row_165[] = {"8562","1","4802","4218","","1258","",NULL};
-datafile_rows_t trf_path_row_166[] = {"8563","1","4802","4218","","1258","",NULL};
-datafile_rows_t trf_path_row_167[] = {"8563","2","4218","4326","","1125","",NULL};
-datafile_rows_t trf_path_row_168[] = {"8564","1","4803","4207","","1259","",NULL};
-datafile_rows_t trf_path_row_169[] = {"8565","1","4804","4257","","1260","",NULL};
-datafile_rows_t trf_path_row_170[] = {"8566","1","4805","4312","","1261","",NULL};
-datafile_rows_t trf_path_row_171[] = {"8567","1","4806","4265","","1262","",NULL};
-datafile_rows_t trf_path_row_172[] = {"8568","1","4806","4265","","1262","",NULL};
-datafile_rows_t trf_path_row_173[] = {"8568","2","4265","4326","","1169","",NULL};
-datafile_rows_t trf_path_row_174[] = {"8569","1","4808","4280","","1263","",NULL};
-datafile_rows_t trf_path_row_175[] = {"8570","1","4809","4215","","1264","",NULL};
-datafile_rows_t trf_path_row_176[] = {"8571","1","4810","4297","","1265","",NULL};
-datafile_rows_t trf_path_row_177[] = {"8572","1","4810","4297","","1265","",NULL};
-datafile_rows_t trf_path_row_178[] = {"8572","2","4297","4326","","1227","",NULL};
-datafile_rows_t trf_path_row_179[] = {"8573","1","4811","4304","","1266","",NULL};
-datafile_rows_t trf_path_row_180[] = {"8574","1","4812","4305","","1267","",NULL};
-datafile_rows_t trf_path_row_181[] = {"8575","1","4812","4305","","1267","",NULL};
-datafile_rows_t trf_path_row_182[] = {"8575","2","4305","4326","","1255","",NULL};
-datafile_rows_t trf_path_row_183[] = {"8576","1","4813","4211","","1268","",NULL};
-datafile_rows_t trf_path_row_184[] = {"8577","1","4813","4211","","1268","",NULL};
-datafile_rows_t trf_path_row_185[] = {"8577","2","4211","4326","","1123","",NULL};
-datafile_rows_t trf_path_row_186[] = {"8578","1","4814","4308","","1269","98.51",NULL};
-datafile_rows_t trf_path_row_187[] = {"8579","1","4815","4120","","1270","",NULL};
-datafile_rows_t trf_path_row_188[] = {"8580","1","4293","4326","","1271","",NULL};
-datafile_rows_t trf_path_row_189[] = {"8581","1","4121","4326","","1272","",NULL};
-datafile_rows_t trf_path_row_190[] = {"8582","1","4237","4258","","1273","",NULL};
-datafile_rows_t trf_path_row_191[] = {"8583","1","4237","4258","","1273","",NULL};
-datafile_rows_t trf_path_row_192[] = {"8583","2","4258","4326","","1149","",NULL};
-datafile_rows_t trf_path_row_193[] = {"8584","1","4230","4326","","1275","",NULL};
-datafile_rows_t trf_path_row_194[] = {"8585","1","4275","4230","","1276","",NULL};
-datafile_rows_t trf_path_row_195[] = {"8586","1","4807","4275","","1467","",NULL};
-datafile_rows_t trf_path_row_196[] = {"8586","2","4275","4230","","1276","",NULL};
-datafile_rows_t trf_path_row_197[] = {"8587","1","4275","4322","","1277","",NULL};
-datafile_rows_t trf_path_row_198[] = {"8588","1","4807","4275","","1467","",NULL};
-datafile_rows_t trf_path_row_199[] = {"8588","2","4275","4322","","1277","",NULL};
-datafile_rows_t trf_path_row_200[] = {"8589","1","4202","4283","","1278","",NULL};
-datafile_rows_t trf_path_row_201[] = {"8590","1","4202","4283","","1278","",NULL};
-datafile_rows_t trf_path_row_202[] = {"8590","2","4283","4326","","1150","98.50",NULL};
-datafile_rows_t trf_path_row_203[] = {"8591","1","4203","4283","","1279","",NULL};
-datafile_rows_t trf_path_row_204[] = {"8592","1","4203","4283","","1279","",NULL};
-datafile_rows_t trf_path_row_205[] = {"8592","2","4283","4326","","1150","98.50",NULL};
-datafile_rows_t trf_path_row_206[] = {"8593","1","4203","4283","","1280","",NULL};
-datafile_rows_t trf_path_row_207[] = {"8594","1","4203","4283","","1280","",NULL};
-datafile_rows_t trf_path_row_208[] = {"8594","2","4283","4326","","1150","98.50",NULL};
-datafile_rows_t trf_path_row_209[] = {"8595","1","4124","4258","","1437","99.11",NULL};
-datafile_rows_t trf_path_row_210[] = {"8595","2","4258","4326","","1149","99.11",NULL};
-datafile_rows_t trf_path_row_211[] = {"8596","1","4125","4326","","1282","",NULL};
-datafile_rows_t trf_path_row_212[] = {"8597","1","4284","4126","","1274","",NULL};
-datafile_rows_t trf_path_row_213[] = {"8598","1","4126","4326","","1283","",NULL};
-datafile_rows_t trf_path_row_214[] = {"8599","1","4210","4326","","1284","",NULL};
-datafile_rows_t trf_path_row_215[] = {"8600","1","4210","4326","","1285","",NULL};
-datafile_rows_t trf_path_row_216[] = {"8601","1","4294","4326","","1286","",NULL};
-datafile_rows_t trf_path_row_217[] = {"8602","1","4284","4326","","1287","",NULL};
-datafile_rows_t trf_path_row_218[] = {"8603","1","4284","4326","","1288","",NULL};
-datafile_rows_t trf_path_row_219[] = {"8604","1","4284","4326","","1289","",NULL};
-datafile_rows_t trf_path_row_220[] = {"8605","1","4284","4326","","1290","",NULL};
-datafile_rows_t trf_path_row_221[] = {"8606","1","4284","4326","","1291","",NULL};
-datafile_rows_t trf_path_row_222[] = {"8607","1","4284","4326","","1292","",NULL};
-datafile_rows_t trf_path_row_223[] = {"8608","1","4284","4326","","1293","",NULL};
-datafile_rows_t trf_path_row_224[] = {"8609","1","4284","4126","","1274","",NULL};
-datafile_rows_t trf_path_row_225[] = {"8609","2","4126","4326","","1283","",NULL};
-datafile_rows_t trf_path_row_226[] = {"8610","1","4304","4326","","1294","",NULL};
-datafile_rows_t trf_path_row_227[] = {"8611","1","4811","4304","","1266","",NULL};
-datafile_rows_t trf_path_row_228[] = {"8611","2","4304","4326","","1294","",NULL};
-datafile_rows_t trf_path_row_229[] = {"8612","1","4271","4326","","1295","",NULL};
-datafile_rows_t trf_path_row_230[] = {"8613","1","4302","4326","","1296","",NULL};
-datafile_rows_t trf_path_row_231[] = {"8614","1","4127","4130","","1297","",NULL};
-datafile_rows_t trf_path_row_232[] = {"8615","1","4127","4130","","1297","",NULL};
-datafile_rows_t trf_path_row_233[] = {"8615","2","4130","4326","","1302","",NULL};
-datafile_rows_t trf_path_row_234[] = {"8616","1","4127","4130","","1298","",NULL};
-datafile_rows_t trf_path_row_235[] = {"8617","1","4127","4130","","1298","",NULL};
-datafile_rows_t trf_path_row_236[] = {"8617","2","4130","4326","","1302","",NULL};
-datafile_rows_t trf_path_row_237[] = {"8618","1","4127","4130","","1299","",NULL};
-datafile_rows_t trf_path_row_238[] = {"8619","1","4127","4130","","1299","",NULL};
-datafile_rows_t trf_path_row_239[] = {"8619","2","4130","4326","","1302","",NULL};
-datafile_rows_t trf_path_row_240[] = {"8620","1","4127","4130","","1300","",NULL};
-datafile_rows_t trf_path_row_241[] = {"8621","1","4127","4130","","1300","",NULL};
-datafile_rows_t trf_path_row_242[] = {"8621","2","4130","4326","","1302","",NULL};
-datafile_rows_t trf_path_row_243[] = {"8622","1","4127","4130","","1301","",NULL};
-datafile_rows_t trf_path_row_244[] = {"8623","1","4127","4130","","1301","",NULL};
-datafile_rows_t trf_path_row_245[] = {"8623","2","4130","4326","","1302","",NULL};
-datafile_rows_t trf_path_row_246[] = {"8624","1","4130","4326","","1302","",NULL};
-datafile_rows_t trf_path_row_247[] = {"8625","1","4284","4326","","1303","",NULL};
-datafile_rows_t trf_path_row_248[] = {"8626","1","4240","4326","","1304","",NULL};
-datafile_rows_t trf_path_row_249[] = {"8627","1","4301","4326","","1305","",NULL};
-datafile_rows_t trf_path_row_250[] = {"8628","1","4312","4326","","1306","",NULL};
-datafile_rows_t trf_path_row_251[] = {"8629","1","4271","4326","","1307","",NULL};
-datafile_rows_t trf_path_row_252[] = {"8633","1","4314","4258","","1309","",NULL};
-datafile_rows_t trf_path_row_253[] = {"8634","1","4314","4258","","1309","",NULL};
-datafile_rows_t trf_path_row_254[] = {"8634","2","4258","4326","","1149","",NULL};
-datafile_rows_t trf_path_row_255[] = {"8635","1","4284","4258","","1310","",NULL};
-datafile_rows_t trf_path_row_256[] = {"8636","1","4284","4258","","1310","",NULL};
-datafile_rows_t trf_path_row_257[] = {"8636","2","4258","4326","","1149","",NULL};
-datafile_rows_t trf_path_row_258[] = {"8637","1","4230","4326","","1311","",NULL};
-datafile_rows_t trf_path_row_259[] = {"8638","1","4903","4230","1001","","",NULL};
-datafile_rows_t trf_path_row_260[] = {"8639","1","4903","4230","1002","","",NULL};
-datafile_rows_t trf_path_row_261[] = {"8640","1","4903","4230","1003","","",NULL};
-datafile_rows_t trf_path_row_262[] = {"8641","1","4903","4230","1001","","",NULL};
-datafile_rows_t trf_path_row_263[] = {"8641","2","4230","4326","","1145","",NULL};
-datafile_rows_t trf_path_row_264[] = {"8642","1","4267","4269","","1312","",NULL};
-datafile_rows_t trf_path_row_265[] = {"8643","1","4267","4269","","1312","",NULL};
-datafile_rows_t trf_path_row_266[] = {"8643","2","4269","4326","","1188","",NULL};
-datafile_rows_t trf_path_row_267[] = {"8644","1","4267","4269","","1313","",NULL};
-datafile_rows_t trf_path_row_268[] = {"8645","1","4267","4269","","1313","",NULL};
-datafile_rows_t trf_path_row_269[] = {"8645","2","4269","4326","","1188","",NULL};
-datafile_rows_t trf_path_row_270[] = {"8646","1","4277","4326","","1314","",NULL};
-datafile_rows_t trf_path_row_271[] = {"8647","1","4277","4230","","1315","",NULL};
-datafile_rows_t trf_path_row_272[] = {"8648","1","4260","4326","","1316","",NULL};
-datafile_rows_t trf_path_row_273[] = {"8649","1","4220","4324","","1317","",NULL};
-datafile_rows_t trf_path_row_274[] = {"8650","1","4220","4326","","1318","",NULL};
-datafile_rows_t trf_path_row_275[] = {"8651","1","4220","4326","","1319","",NULL};
-datafile_rows_t trf_path_row_276[] = {"8652","1","4220","4326","","1320","",NULL};
-datafile_rows_t trf_path_row_277[] = {"8653","1","4220","4326","","1321","",NULL};
-datafile_rows_t trf_path_row_278[] = {"8654","1","4220","4326","","1322","",NULL};
-datafile_rows_t trf_path_row_279[] = {"8655","1","4220","4326","","1323","",NULL};
-datafile_rows_t trf_path_row_280[] = {"8656","1","4220","4326","","1324","",NULL};
-datafile_rows_t trf_path_row_281[] = {"8657","1","4220","4326","","1325","",NULL};
-datafile_rows_t trf_path_row_282[] = {"8658","1","4220","4326","","1326","",NULL};
-datafile_rows_t trf_path_row_283[] = {"8659","1","4220","4326","","1327","",NULL};
-datafile_rows_t trf_path_row_284[] = {"8660","1","4259","4264","","1328","",NULL};
-datafile_rows_t trf_path_row_285[] = {"8661","1","4264","4326","","1329","",NULL};
-datafile_rows_t trf_path_row_286[] = {"8662","1","4259","4326","","1330","",NULL};
-datafile_rows_t trf_path_row_287[] = {"8663","1","4805","4312","","1261","",NULL};
-datafile_rows_t trf_path_row_288[] = {"8663","2","4312","4326","","1306","",NULL};
-datafile_rows_t trf_path_row_289[] = {"8664","1","4133","4258","","1331","",NULL};
-datafile_rows_t trf_path_row_290[] = {"8665","1","4284","4133","","1332","",NULL};
-datafile_rows_t trf_path_row_291[] = {"8666","1","4133","4326","","1333","",NULL};
-datafile_rows_t trf_path_row_292[] = {"8667","1","4284","4326","","1334","",NULL};
-datafile_rows_t trf_path_row_293[] = {"8668","1","4301","4326","","1335","",NULL};
-datafile_rows_t trf_path_row_294[] = {"8669","1","4301","4326","","1336","",NULL};
-datafile_rows_t trf_path_row_295[] = {"8670","1","4301","4326","","1337","",NULL};
-datafile_rows_t trf_path_row_296[] = {"8671","1","4301","4326","","1338","",NULL};
-datafile_rows_t trf_path_row_297[] = {"8672","1","4301","4326","","1339","",NULL};
-datafile_rows_t trf_path_row_298[] = {"8673","1","4301","4326","","1340","",NULL};
-datafile_rows_t trf_path_row_299[] = {"8674","1","4301","4326","","1341","",NULL};
-datafile_rows_t trf_path_row_300[] = {"8675","1","4301","4326","","1342","",NULL};
-datafile_rows_t trf_path_row_301[] = {"8676","1","4301","4326","","1343","",NULL};
-datafile_rows_t trf_path_row_302[] = {"8677","1","4301","4326","","1344","",NULL};
-datafile_rows_t trf_path_row_303[] = {"8678","1","4301","4326","","1345","",NULL};
-datafile_rows_t trf_path_row_304[] = {"8679","1","4301","4326","","1346","",NULL};
-datafile_rows_t trf_path_row_305[] = {"8680","1","4301","4326","","1347","",NULL};
-datafile_rows_t trf_path_row_306[] = {"8681","1","4301","4326","","1348","",NULL};
-datafile_rows_t trf_path_row_307[] = {"8682","1","4301","4326","","1349","",NULL};
-datafile_rows_t trf_path_row_308[] = {"8683","1","4301","4326","","1350","",NULL};
-datafile_rows_t trf_path_row_309[] = {"8684","1","4301","4326","","1351","",NULL};
-datafile_rows_t trf_path_row_310[] = {"8685","1","4301","4326","","1352","",NULL};
-datafile_rows_t trf_path_row_311[] = {"8686","1","4301","4326","","1353","",NULL};
-datafile_rows_t trf_path_row_312[] = {"8687","1","4301","4326","","1354","",NULL};
-datafile_rows_t trf_path_row_313[] = {"8688","1","4301","4326","","1355","",NULL};
-datafile_rows_t trf_path_row_314[] = {"8689","1","4301","4326","","1356","",NULL};
-datafile_rows_t trf_path_row_315[] = {"8690","1","4301","4326","","1357","",NULL};
-datafile_rows_t trf_path_row_316[] = {"8691","1","4301","4326","","1358","",NULL};
-datafile_rows_t trf_path_row_317[] = {"8692","1","4301","4326","","1359","",NULL};
-datafile_rows_t trf_path_row_318[] = {"8693","1","4301","4326","","1360","",NULL};
-datafile_rows_t trf_path_row_319[] = {"8694","1","4301","4326","","1361","",NULL};
-datafile_rows_t trf_path_row_320[] = {"8695","1","4301","4326","","1362","",NULL};
-datafile_rows_t trf_path_row_321[] = {"8696","1","4301","4326","","1363","",NULL};
-datafile_rows_t trf_path_row_322[] = {"8697","1","4301","4326","","1364","",NULL};
-datafile_rows_t trf_path_row_323[] = {"8698","1","4301","4326","","1365","",NULL};
-datafile_rows_t trf_path_row_324[] = {"8699","1","4301","4326","","1366","",NULL};
-datafile_rows_t trf_path_row_325[] = {"8700","1","4301","4326","","1367","",NULL};
-datafile_rows_t trf_path_row_326[] = {"8701","1","4301","4326","","1368","",NULL};
-datafile_rows_t trf_path_row_327[] = {"8702","1","4301","4326","","1369","",NULL};
-datafile_rows_t trf_path_row_328[] = {"8703","1","4301","4326","","1370","",NULL};
-datafile_rows_t trf_path_row_329[] = {"8704","1","4301","4326","","1371","",NULL};
-datafile_rows_t trf_path_row_330[] = {"8705","1","4301","4326","","1372","",NULL};
-datafile_rows_t trf_path_row_331[] = {"8706","1","4301","4326","","1373","",NULL};
-datafile_rows_t trf_path_row_332[] = {"8707","1","4301","4326","","1374","",NULL};
-datafile_rows_t trf_path_row_333[] = {"8708","1","4301","4326","","1375","",NULL};
-datafile_rows_t trf_path_row_334[] = {"8709","1","4301","4326","","1376","",NULL};
-datafile_rows_t trf_path_row_335[] = {"8710","1","4301","4326","","1377","",NULL};
-datafile_rows_t trf_path_row_336[] = {"8711","1","4301","4326","","1378","",NULL};
-datafile_rows_t trf_path_row_337[] = {"8712","1","4301","4326","","1379","",NULL};
-datafile_rows_t trf_path_row_338[] = {"8713","1","4301","4326","","1380","",NULL};
-datafile_rows_t trf_path_row_339[] = {"8714","1","4301","4326","","1381","",NULL};
-datafile_rows_t trf_path_row_340[] = {"8715","1","4301","4326","","1382","",NULL};
-datafile_rows_t trf_path_row_341[] = {"8716","1","4301","4326","","1383","",NULL};
-datafile_rows_t trf_path_row_342[] = {"8717","1","4301","4326","","1384","",NULL};
-datafile_rows_t trf_path_row_343[] = {"8718","1","4301","4326","","1385","",NULL};
-datafile_rows_t trf_path_row_344[] = {"8719","1","4301","4326","","1386","",NULL};
-datafile_rows_t trf_path_row_345[] = {"8720","1","4301","4326","","1387","",NULL};
-datafile_rows_t trf_path_row_346[] = {"8721","1","4301","4326","","1388","",NULL};
-datafile_rows_t trf_path_row_347[] = {"8722","1","4301","4326","","1389","",NULL};
-datafile_rows_t trf_path_row_348[] = {"8723","1","4301","4326","","1390","",NULL};
-datafile_rows_t trf_path_row_349[] = {"8724","1","4301","4326","","1391","",NULL};
-datafile_rows_t trf_path_row_350[] = {"8725","1","4301","4326","","1392","",NULL};
-datafile_rows_t trf_path_row_351[] = {"8726","1","4301","4326","","1393","",NULL};
-datafile_rows_t trf_path_row_352[] = {"8727","1","4301","4326","","1394","",NULL};
-datafile_rows_t trf_path_row_353[] = {"8728","1","4301","4326","","1395","",NULL};
-datafile_rows_t trf_path_row_354[] = {"8729","1","4301","4326","","1396","",NULL};
-datafile_rows_t trf_path_row_355[] = {"8730","1","4301","4326","","1397","",NULL};
-datafile_rows_t trf_path_row_356[] = {"8731","1","4301","4326","","1398","",NULL};
-datafile_rows_t trf_path_row_357[] = {"8732","1","4301","4326","","1399","",NULL};
-datafile_rows_t trf_path_row_358[] = {"8733","1","4301","4326","","1400","",NULL};
-datafile_rows_t trf_path_row_359[] = {"8734","1","4301","4326","","1401","",NULL};
-datafile_rows_t trf_path_row_360[] = {"8735","1","4301","4326","","1402","",NULL};
-datafile_rows_t trf_path_row_361[] = {"8736","1","4301","4326","","1403","",NULL};
-datafile_rows_t trf_path_row_362[] = {"8737","1","4301","4326","","1404","",NULL};
-datafile_rows_t trf_path_row_363[] = {"8738","1","4301","4326","","1405","",NULL};
-datafile_rows_t trf_path_row_364[] = {"8739","1","4301","4326","","1406","",NULL};
-datafile_rows_t trf_path_row_365[] = {"8740","1","4301","4326","","1407","",NULL};
-datafile_rows_t trf_path_row_366[] = {"8741","1","4301","4326","","1408","",NULL};
-datafile_rows_t trf_path_row_367[] = {"8742","1","4301","4326","","1409","",NULL};
-datafile_rows_t trf_path_row_368[] = {"8743","1","4301","4326","","1410","",NULL};
-datafile_rows_t trf_path_row_369[] = {"8744","1","4301","4326","","1411","",NULL};
-datafile_rows_t trf_path_row_370[] = {"8745","1","4301","4326","","1412","",NULL};
-datafile_rows_t trf_path_row_371[] = {"8746","1","4301","4326","","1413","",NULL};
-datafile_rows_t trf_path_row_372[] = {"8747","1","4301","4326","","1414","",NULL};
-datafile_rows_t trf_path_row_373[] = {"8748","1","4301","4326","","1415","",NULL};
-datafile_rows_t trf_path_row_374[] = {"8749","1","4301","4326","","1416","",NULL};
-datafile_rows_t trf_path_row_375[] = {"8750","1","4301","4326","","1417","",NULL};
-datafile_rows_t trf_path_row_376[] = {"8751","1","4301","4326","","1418","",NULL};
-datafile_rows_t trf_path_row_377[] = {"8752","1","4301","4326","","1419","",NULL};
-datafile_rows_t trf_path_row_378[] = {"8753","1","4301","4326","","1420","",NULL};
-datafile_rows_t trf_path_row_379[] = {"8754","1","4301","4326","","1421","",NULL};
-datafile_rows_t trf_path_row_380[] = {"8755","1","4301","4326","","1422","",NULL};
-datafile_rows_t trf_path_row_381[] = {"8756","1","4301","4326","","1423","",NULL};
-datafile_rows_t trf_path_row_382[] = {"8757","1","4301","4326","","1424","",NULL};
-datafile_rows_t trf_path_row_383[] = {"8758","1","4301","4326","","1425","",NULL};
-datafile_rows_t trf_path_row_384[] = {"8759","1","4301","4326","","1426","",NULL};
-datafile_rows_t trf_path_row_385[] = {"8760","1","4301","4326","","1427","",NULL};
-datafile_rows_t trf_path_row_386[] = {"8761","1","4301","4326","","1428","",NULL};
-datafile_rows_t trf_path_row_387[] = {"8762","1","4301","4326","","1429","",NULL};
-datafile_rows_t trf_path_row_388[] = {"8763","1","4301","4326","","1430","",NULL};
-datafile_rows_t trf_path_row_389[] = {"8764","1","4301","4326","","1431","",NULL};
-datafile_rows_t trf_path_row_390[] = {"8765","1","4301","4326","","1432","",NULL};
-datafile_rows_t trf_path_row_391[] = {"8766","1","4301","4326","","1433","",NULL};
-datafile_rows_t trf_path_row_392[] = {"8767","1","4301","4326","","1434","",NULL};
-datafile_rows_t trf_path_row_393[] = {"8768","1","4301","4326","","1435","",NULL};
-datafile_rows_t trf_path_row_394[] = {"8769","1","4301","4326","","1436","",NULL};
-datafile_rows_t trf_path_row_395[] = {"8770","1","4232","4326","","1438","",NULL};
-datafile_rows_t trf_path_row_396[] = {"8771","1","4134","4326","","1439","",NULL};
-datafile_rows_t trf_path_row_397[] = {"8772","1","4230","4326","","1440","",NULL};
-datafile_rows_t trf_path_row_398[] = {"8773","1","4601","4326","","1441","",NULL};
-datafile_rows_t trf_path_row_399[] = {"8774","1","4602","4326","","1442","",NULL};
-datafile_rows_t trf_path_row_400[] = {"8775","1","4603","4326","","1443","",NULL};
-datafile_rows_t trf_path_row_401[] = {"8776","1","4604","4326","","1444","",NULL};
-datafile_rows_t trf_path_row_402[] = {"8777","1","4605","4326","","1445","",NULL};
-datafile_rows_t trf_path_row_403[] = {"8778","1","4606","4326","","1446","",NULL};
-datafile_rows_t trf_path_row_404[] = {"8779","1","4600","4326","","1447","",NULL};
-datafile_rows_t trf_path_row_405[] = {"8780","1","4124","4258","","1437","",NULL};
-datafile_rows_t trf_path_row_406[] = {"8784","1","4230","4326","","1450","",NULL};
-datafile_rows_t trf_path_row_407[] = {"8785","1","4135","4269","","1454","",NULL};
-datafile_rows_t trf_path_row_408[] = {"8786","1","4135","4269","","1454","",NULL};
-datafile_rows_t trf_path_row_409[] = {"8786","2","4269","4326","","1188","",NULL};
-datafile_rows_t trf_path_row_410[] = {"8787","1","4136","4269","","1455","",NULL};
-datafile_rows_t trf_path_row_411[] = {"8788","1","4136","4269","","1455","",NULL};
-datafile_rows_t trf_path_row_412[] = {"8788","2","4269","4326","","1188","",NULL};
-datafile_rows_t trf_path_row_413[] = {"8789","1","4137","4269","","1456","",NULL};
-datafile_rows_t trf_path_row_414[] = {"8790","1","4137","4269","","1456","",NULL};
-datafile_rows_t trf_path_row_415[] = {"8790","2","4269","4326","","1188","",NULL};
-datafile_rows_t trf_path_row_416[] = {"8791","1","4138","4269","","1457","",NULL};
-datafile_rows_t trf_path_row_417[] = {"8792","1","4138","4269","","1457","",NULL};
-datafile_rows_t trf_path_row_418[] = {"8792","2","4269","4326","","1188","",NULL};
-datafile_rows_t trf_path_row_419[] = {"8793","1","4609","4269","","1451","",NULL};
-datafile_rows_t trf_path_row_420[] = {"8794","1","4609","4269","","1451","",NULL};
-datafile_rows_t trf_path_row_421[] = {"8794","2","4269","4326","","1188","",NULL};
-datafile_rows_t trf_path_row_422[] = {"8795","1","4202","4283","","1458","",NULL};
-datafile_rows_t trf_path_row_423[] = {"8796","1","4202","4283","","1458","",NULL};
-datafile_rows_t trf_path_row_424[] = {"8796","2","4283","4326","","1150","",NULL};
-datafile_rows_t trf_path_row_425[] = {"8797","1","4202","4283","","1459","",NULL};
-datafile_rows_t trf_path_row_426[] = {"8798","1","4202","4283","","1459","",NULL};
-datafile_rows_t trf_path_row_427[] = {"8798","2","4283","4326","","1150","",NULL};
-datafile_rows_t trf_path_row_428[] = {"8799","1","4202","4283","","1460","",NULL};
-datafile_rows_t trf_path_row_429[] = {"8800","1","4202","4283","","1460","",NULL};
-datafile_rows_t trf_path_row_430[] = {"8800","2","4283","4326","","1150","",NULL};
-datafile_rows_t trf_path_row_431[] = {"8801","1","4139","4269","","1461","",NULL};
-datafile_rows_t trf_path_row_432[] = {"8802","1","4139","4269","","1461","",NULL};
-datafile_rows_t trf_path_row_433[] = {"8802","2","4269","4326","","1188","",NULL};
-datafile_rows_t trf_path_row_434[] = {"8803","1","4267","4269","","1462","",NULL};
-datafile_rows_t trf_path_row_435[] = {"8804","1","4267","4269","","1462","",NULL};
-datafile_rows_t trf_path_row_436[] = {"8804","2","4269","4326","","1188","",NULL};
-datafile_rows_t trf_path_row_437[] = {"8805","1","4608","4269","","1463","",NULL};
-datafile_rows_t trf_path_row_438[] = {"8806","1","4608","4269","","1463","",NULL};
-datafile_rows_t trf_path_row_439[] = {"8806","2","4269","4326","","1188","",NULL};
-datafile_rows_t trf_path_row_440[] = {"8807","1","4202","4283","","1464","",NULL};
-datafile_rows_t trf_path_row_441[] = {"8808","1","4202","4283","","1464","",NULL};
-datafile_rows_t trf_path_row_442[] = {"8808","2","4283","4326","","1150","",NULL};
-datafile_rows_t trf_path_row_443[] = {"8811","1","4817","4273","","1466","",NULL};
-datafile_rows_t trf_path_row_444[] = {"8812","1","4807","4275","","1468","",NULL};
-datafile_rows_t trf_path_row_445[] = {"8813","1","4142","4326","","1469","",NULL};
-datafile_rows_t trf_path_row_446[] = {"8814","1","4143","4326","","1470","",NULL};
-datafile_rows_t trf_path_row_447[] = {"8815","1","4312","4326","","1471","",NULL};
-datafile_rows_t trf_path_row_448[] = {"8816","1","4122","4140","","1472","",NULL};
-datafile_rows_t trf_path_row_449[] = {"8817","1","4140","4326","","1473","",NULL};
-datafile_rows_t trf_path_row_450[] = {"8818","1","4122","4140","","1472","",NULL};
-datafile_rows_t trf_path_row_451[] = {"8818","2","4140","4326","","1473","",NULL};
-datafile_rows_t trf_path_row_452[] = {"8819","1","4269","4152","","1474","",NULL};
-datafile_rows_t trf_path_row_453[] = {"8820","1","4269","4152","","1475","",NULL};
-datafile_rows_t trf_path_row_454[] = {"8821","1","4269","4152","","1476","",NULL};
-datafile_rows_t trf_path_row_455[] = {"8822","1","4269","4152","","1477","",NULL};
-datafile_rows_t trf_path_row_456[] = {"8823","1","4269","4152","","1478","",NULL};
-datafile_rows_t trf_path_row_457[] = {"8824","1","4269","4152","","1479","",NULL};
-datafile_rows_t trf_path_row_458[] = {"8825","1","4269","4152","","1480","",NULL};
-datafile_rows_t trf_path_row_459[] = {"8826","1","4269","4152","","1481","",NULL};
-datafile_rows_t trf_path_row_460[] = {"8827","1","4269","4152","","1482","",NULL};
-datafile_rows_t trf_path_row_461[] = {"8828","1","4269","4152","","1483","",NULL};
-datafile_rows_t trf_path_row_462[] = {"8829","1","4269","4152","","1484","",NULL};
-datafile_rows_t trf_path_row_463[] = {"8830","1","4269","4152","","1485","",NULL};
-datafile_rows_t trf_path_row_464[] = {"8831","1","4269","4152","","1486","",NULL};
-datafile_rows_t trf_path_row_465[] = {"8832","1","4269","4152","","1487","",NULL};
-datafile_rows_t trf_path_row_466[] = {"8833","1","4269","4152","","1488","",NULL};
-datafile_rows_t trf_path_row_467[] = {"8834","1","4269","4152","","1489","",NULL};
-datafile_rows_t trf_path_row_468[] = {"8835","1","4269","4152","","1490","",NULL};
-datafile_rows_t trf_path_row_469[] = {"8836","1","4269","4152","","1491","",NULL};
-datafile_rows_t trf_path_row_470[] = {"8837","1","4269","4152","","1492","",NULL};
-datafile_rows_t trf_path_row_471[] = {"8838","1","4269","4152","","1493","",NULL};
-datafile_rows_t trf_path_row_472[] = {"8839","1","4269","4152","","1494","",NULL};
-datafile_rows_t trf_path_row_473[] = {"8840","1","4269","4152","","1495","",NULL};
-datafile_rows_t trf_path_row_474[] = {"8841","1","4269","4152","","1496","",NULL};
-datafile_rows_t trf_path_row_475[] = {"8842","1","4269","4152","","1497","",NULL};
-datafile_rows_t trf_path_row_476[] = {"8843","1","4269","4152","","1498","",NULL};
-datafile_rows_t trf_path_row_477[] = {"8844","1","4269","4152","","1499","",NULL};
-datafile_rows_t trf_path_row_478[] = {"8845","1","4269","4152","","1500","",NULL};
-datafile_rows_t trf_path_row_479[] = {"8846","1","4269","4152","","1501","",NULL};
-datafile_rows_t trf_path_row_480[] = {"8847","1","4269","4152","","1502","",NULL};
-datafile_rows_t trf_path_row_481[] = {"8848","1","4269","4152","","1503","",NULL};
-datafile_rows_t trf_path_row_482[] = {"8849","1","4222","4148","","1504","",NULL};
-datafile_rows_t trf_path_row_483[] = {"8850","1","4148","4326","","1505","",NULL};
-datafile_rows_t trf_path_row_484[] = {"8851","1","4202","4283","","1506","",NULL};
-datafile_rows_t trf_path_row_485[] = {"8852","1","4202","4283","","1507","",NULL};
-datafile_rows_t trf_path_row_486[] = {"8853","1","4202","4283","","1506","",NULL};
-datafile_rows_t trf_path_row_487[] = {"8853","2","4283","4326","","1150","",NULL};
-datafile_rows_t trf_path_row_488[] = {"8854","1","4202","4283","","1507","",NULL};
-datafile_rows_t trf_path_row_489[] = {"8854","2","4283","4326","","1150","",NULL};
-datafile_rows_t trf_path_row_490[] = {"8855","1","4149","4326","","1508","",NULL};
-datafile_rows_t trf_path_row_491[] = {"8856","1","4150","4151","","1509","",NULL};
-datafile_rows_t trf_path_row_492[] = {"8857","1","4150","4151","","1509","",NULL};
-datafile_rows_t trf_path_row_493[] = {"8857","2","4151","4326","","1511","",NULL};
-datafile_rows_t trf_path_row_494[] = {"8858","1","4149","4326","","1510","",NULL};
-datafile_rows_t trf_path_row_495[] = {"8859","1","4151","4326","","1511","",NULL};
-datafile_rows_t trf_path_row_496[] = {"8860","1","4267","4269","","1241","",NULL};
-datafile_rows_t trf_path_row_497[] = {"8860","2","4269","4152","","1474","",NULL};
-datafile_rows_t trf_path_row_498[] = {"8861","1","4267","4269","","1241","",NULL};
-datafile_rows_t trf_path_row_499[] = {"8861","2","4269","4152","","1475","",NULL};
-datafile_rows_t trf_path_row_500[] = {"8862","1","4267","4269","","1241","",NULL};
-datafile_rows_t trf_path_row_501[] = {"8862","2","4269","4152","","1476","",NULL};
-datafile_rows_t trf_path_row_502[] = {"8863","1","4267","4269","","1241","",NULL};
-datafile_rows_t trf_path_row_503[] = {"8863","2","4269","4152","","1477","",NULL};
-datafile_rows_t trf_path_row_504[] = {"8864","1","4267","4269","","1241","",NULL};
-datafile_rows_t trf_path_row_505[] = {"8864","2","4269","4152","","1478","",NULL};
-datafile_rows_t trf_path_row_506[] = {"8865","1","4267","4269","","1241","",NULL};
-datafile_rows_t trf_path_row_507[] = {"8865","2","4269","4152","","1479","",NULL};
-datafile_rows_t trf_path_row_508[] = {"8866","1","4267","4269","","1241","",NULL};
-datafile_rows_t trf_path_row_509[] = {"8866","2","4269","4152","","1480","",NULL};
-datafile_rows_t trf_path_row_510[] = {"8867","1","4267","4269","","1241","",NULL};
-datafile_rows_t trf_path_row_511[] = {"8867","2","4269","4152","","1481","",NULL};
-datafile_rows_t trf_path_row_512[] = {"8868","1","4267","4269","","1241","",NULL};
-datafile_rows_t trf_path_row_513[] = {"8868","2","4269","4152","","1482","",NULL};
-datafile_rows_t trf_path_row_514[] = {"8869","1","4267","4269","","1241","",NULL};
-datafile_rows_t trf_path_row_515[] = {"8869","2","4269","4152","","1483","",NULL};
-datafile_rows_t trf_path_row_516[] = {"8870","1","4267","4269","","1241","",NULL};
-datafile_rows_t trf_path_row_517[] = {"8870","2","4269","4152","","1484","",NULL};
-datafile_rows_t trf_path_row_518[] = {"8871","1","4267","4269","","1241","",NULL};
-datafile_rows_t trf_path_row_519[] = {"8871","2","4269","4152","","1485","",NULL};
-datafile_rows_t trf_path_row_520[] = {"8872","1","4267","4269","","1241","",NULL};
-datafile_rows_t trf_path_row_521[] = {"8872","2","4269","4152","","1486","",NULL};
-datafile_rows_t trf_path_row_522[] = {"8873","1","4267","4269","","1241","",NULL};
-datafile_rows_t trf_path_row_523[] = {"8873","2","4269","4152","","1487","",NULL};
-datafile_rows_t trf_path_row_524[] = {"8874","1","4267","4269","","1241","",NULL};
-datafile_rows_t trf_path_row_525[] = {"8874","2","4269","4152","","1488","",NULL};
-datafile_rows_t trf_path_row_526[] = {"8875","1","4267","4269","","1241","",NULL};
-datafile_rows_t trf_path_row_527[] = {"8875","2","4269","4152","","1489","",NULL};
-datafile_rows_t trf_path_row_528[] = {"8876","1","4267","4269","","1241","",NULL};
-datafile_rows_t trf_path_row_529[] = {"8876","2","4269","4152","","1490","",NULL};
-datafile_rows_t trf_path_row_530[] = {"8877","1","4267","4269","","1241","",NULL};
-datafile_rows_t trf_path_row_531[] = {"8877","2","4269","4152","","1491","",NULL};
-datafile_rows_t trf_path_row_532[] = {"8878","1","4267","4269","","1241","",NULL};
-datafile_rows_t trf_path_row_533[] = {"8878","2","4269","4152","","1492","",NULL};
-datafile_rows_t trf_path_row_534[] = {"8879","1","4267","4269","","1241","",NULL};
-datafile_rows_t trf_path_row_535[] = {"8879","2","4269","4152","","1493","",NULL};
-datafile_rows_t trf_path_row_536[] = {"8880","1","4267","4269","","1241","",NULL};
-datafile_rows_t trf_path_row_537[] = {"8880","2","4269","4152","","1494","",NULL};
-datafile_rows_t trf_path_row_538[] = {"8881","1","4139","4269","","1461","",NULL};
-datafile_rows_t trf_path_row_539[] = {"8881","2","4269","4152","","1495","",NULL};
-datafile_rows_t trf_path_row_540[] = {"8882","1","4267","4269","","1241","",NULL};
-datafile_rows_t trf_path_row_541[] = {"8882","2","4269","4152","","1496","",NULL};
-datafile_rows_t trf_path_row_542[] = {"8883","1","4267","4269","","1241","",NULL};
-datafile_rows_t trf_path_row_543[] = {"8883","2","4269","4152","","1497","",NULL};
-datafile_rows_t trf_path_row_544[] = {"8884","1","4267","4269","","1241","",NULL};
-datafile_rows_t trf_path_row_545[] = {"8884","2","4269","4152","","1498","",NULL};
-datafile_rows_t trf_path_row_546[] = {"8885","1","4267","4269","","1241","",NULL};
-datafile_rows_t trf_path_row_547[] = {"8885","2","4269","4152","","1499","",NULL};
-datafile_rows_t trf_path_row_548[] = {"8886","1","4267","4269","","1241","",NULL};
-datafile_rows_t trf_path_row_549[] = {"8886","2","4269","4152","","1500","",NULL};
-datafile_rows_t trf_path_row_550[] = {"8887","1","4267","4269","","1241","",NULL};
-datafile_rows_t trf_path_row_551[] = {"8887","2","4269","4152","","1501","",NULL};
-datafile_rows_t trf_path_row_552[] = {"8888","1","4267","4269","","1241","",NULL};
-datafile_rows_t trf_path_row_553[] = {"8888","2","4269","4152","","1502","",NULL};
-datafile_rows_t trf_path_row_554[] = {"8889","1","4267","4269","","1241","",NULL};
-datafile_rows_t trf_path_row_555[] = {"8889","2","4269","4152","","1503","",NULL};
-datafile_rows_t trf_path_row_556[] = {"8890","1","4153","4326","","1512","",NULL};
-datafile_rows_t trf_path_row_557[] = {"8891","1","4132","4326","","1513","",NULL};
-datafile_rows_t trf_path_row_558[] = {"8892","1","4154","4326","","1514","",NULL};
-datafile_rows_t trf_path_row_559[] = {"8893","1","4269","4326","","1308","",NULL};
-datafile_rows_t trf_path_row_560[] = {"8894","1","4269","4326","","1515","",NULL};
-datafile_rows_t trf_path_row_561[] = {"8895","1","4247","4326","","1516","",NULL};
-datafile_rows_t trf_path_row_562[] = {"8896","1","4267","4269","","1241","",NULL};
-datafile_rows_t trf_path_row_563[] = {"8896","2","4269","4326","","1515","",NULL};
-datafile_rows_t trf_path_row_564[] = {"8897","1","4267","4269","","1243","",NULL};
-datafile_rows_t trf_path_row_565[] = {"8897","2","4269","4326","","1515","",NULL};
-
-datafile_rows_t *trf_path_rows[] = {trf_path_row_1,trf_path_row_2,trf_path_row_3,trf_path_row_4,trf_path_row_5,trf_path_row_6,trf_path_row_7,trf_path_row_8,trf_path_row_9,trf_path_row_10,trf_path_row_11,trf_path_row_12,trf_path_row_13,trf_path_row_14,trf_path_row_15,trf_path_row_16,trf_path_row_17,trf_path_row_18,trf_path_row_19,trf_path_row_20,trf_path_row_21,trf_path_row_22,trf_path_row_23,trf_path_row_24,trf_path_row_25,trf_path_row_26,trf_path_row_27,trf_path_row_28,trf_path_row_29,t [...]
diff --git a/src/tiff/csv/trf_path.csv b/src/tiff/csv/trf_path.csv
deleted file mode 100644
index edf31a1..0000000
--- a/src/tiff/csv/trf_path.csv
+++ /dev/null
@@ -1,565 +0,0 @@
-"TRF_PATH_CODE","TRF_STEP_CODE","SOURCE_HORIZCS_CODE","TARGET_HORIZCS_CODE","POLYN_TRF_CODE","NONPOLYN_TRF_CODE","CHANGE_ID"
-8400,1,4201,4326,,1100,
-8401,1,4201,4326,,1101,
-8402,1,4201,4326,,1102,
-8403,1,4201,4326,,1103,
-8404,1,4201,4326,,1104,
-8405,1,4201,4326,,1105,
-8406,1,4201,4326,,1106,
-8407,1,4205,4326,,1107,
-8408,1,4202,4326,,1108,
-8409,1,4203,4326,,1109,
-8410,1,4204,4326,,1110,
-8411,1,4204,4326,,1111,
-8412,1,4289,4326,,1112,
-8413,1,4209,4326,,1113,
-8414,1,4209,4326,,1114,
-8415,1,4209,4326,,1115,
-8416,1,4209,4326,,1116,
-8417,1,4209,4326,,1117,
-8418,1,4209,4326,,1118,
-8419,1,4209,4326,,1119,
-8420,1,4209,4326,,1120,
-8421,1,4209,4326,,1121,
-8422,1,4210,4326,,1122,
-8423,1,4211,4326,,1123,
-8424,1,4216,4326,,1124,
-8425,1,4218,4326,,1125,
-8426,1,4219,4326,,1126,
-8427,1,4221,4326,,1127,
-8428,1,4222,4326,,1128,
-8429,1,4222,4326,,1129,
-8430,1,4223,4326,,1130,
-8431,1,4224,4326,,1131,
-8432,1,4225,4326,,1132,
-8433,1,4230,4326,,1133,
-8434,1,4230,4326,,1134,
-8435,1,4230,4326,,1135,
-8436,1,4230,4326,,1136,
-8437,1,4230,4326,,1137,
-8438,1,4230,4326,,1138,
-8439,1,4230,4326,,1139,
-8440,1,4230,4326,,1140,
-8441,1,4230,4326,,1141,
-8442,1,4230,4326,,1142,
-8443,1,4230,4326,,1143,
-8444,1,4230,4326,,1144,
-8445,1,4230,4326,,1145,
-8446,1,4230,4231,1000,,
-8446,2,4231,4326,,1146,
-8447,1,4230,4231,,1147,
-8447,2,4231,4326,,1146,
-8448,1,4229,4326,,1148,
-8449,1,4258,4326,,1149,
-8450,1,4283,4326,,1150,
-8451,1,4272,4326,,1151,
-8452,1,4236,4326,,1152,
-8453,1,4239,4326,,1153,
-8454,1,4240,4326,,1154,
-8455,1,4144,4326,,1155,97.235
-8456,1,4146,4326,,1156,97.235
-8457,1,4244,4326,,1157,
-8458,1,4245,4326,,1158,
-8459,1,4250,4326,,1159,
-8460,1,4251,4326,,1160,
-8461,1,4253,4326,,1161,
-8462,1,4253,4326,,1162,
-8463,1,4266,4326,,1163,
-8464,1,4256,4326,,1164,
-8465,1,4262,4326,,1165,
-8466,1,4261,4326,,1166,
-8467,1,4263,4326,,1167,
-8468,1,4263,4326,,1168,
-8469,1,4265,4326,,1169,
-8470,1,4267,4326,,1170,
-8471,1,4267,4326,,1171,
-8472,1,4267,4326,,1172,
-8473,1,4267,4326,,1173,
-8474,1,4267,4326,,1174,
-8475,1,4267,4326,,1175,
-8476,1,4267,4326,,1176,
-8477,1,4267,4326,,1177,
-8478,1,4267,4326,,1178,
-8479,1,4267,4326,,1179,
-8480,1,4267,4326,,1180,
-8481,1,4267,4326,,1181,
-8482,1,4267,4326,,1182,
-8483,1,4267,4326,,1183,
-8484,1,4267,4326,,1184,
-8485,1,4267,4326,,1185,
-8486,1,4267,4326,,1186,
-8487,1,4267,4326,,1187,
-8488,1,4269,4326,,1188,
-8489,1,4270,4326,,1189,
-8490,1,4270,4326,,1190,
-8491,1,4270,4326,,1191,
-8492,1,4271,4326,,1192,
-8493,1,4275,4326,,1193,
-8494,1,4807,4275,,1467,97.05
-8494,2,4275,4326,,1193,
-8495,1,4277,4326,,1195,
-8496,1,4277,4326,,1196,
-8497,1,4277,4326,,1197,
-8498,1,4277,4326,,1198,
-8499,1,4277,4326,,1199,
-8500,1,4282,4326,,1200,
-8501,1,4248,4326,,1201,
-8502,1,4248,4326,,1202,
-8503,1,4248,4326,,1203,
-8504,1,4248,4326,,1204,
-8505,1,4248,4326,,1205,
-8506,1,4248,4326,,1206,
-8507,1,4248,4326,,1207,
-8508,1,4248,4326,,1208,
-8509,1,4248,4326,,1209,
-8510,1,4285,4326,,1210,
-8511,1,4287,4326,,1211,
-8512,1,4291,4326,,1212,
-8513,1,4291,4326,,1213,
-8514,1,4291,4326,,1214,
-8515,1,4291,4326,,1215,
-8516,1,4291,4326,,1216,
-8517,1,4291,4326,,1217,
-8518,1,4291,4326,,1218,
-8519,1,4291,4326,,1219,
-8520,1,4291,4326,,1220,
-8521,1,4291,4326,,1221,
-8522,1,4291,4326,,1222,
-8523,1,4291,4326,,1223,
-8524,1,4291,4326,,1224,
-8525,1,4292,4326,,1225,
-8526,1,4293,4326,,1226,
-8527,1,4297,4326,,1227,
-8528,1,4298,4326,,1228,
-8529,1,4299,4326,,1229,
-8530,1,4301,4326,,1230,
-8531,1,4301,4326,,1231,
-8532,1,4301,4326,,1232,
-8533,1,4301,4326,,1233,
-8534,1,4309,4326,,1234,
-8535,1,4311,4326,,1235,
-8536,1,4230,4231,1000,,
-8537,1,4231,4326,,1146,
-8538,1,4230,4231,,1147,
-8539,1,4203,4326,,1236,
-8540,1,4322,4326,,1237,
-8541,1,4322,4326,,1238,
-8542,1,4324,4322,,1239,
-8543,1,4324,4326,,1240,
-8544,1,4267,4269,,1241,
-8546,1,4267,4269,,1243,
-8548,1,4230,4326,,1245,
-8549,1,4255,4326,,1246,
-8550,1,4145,4326,,1247,97.235
-8551,1,4238,4326,,1248,
-8552,1,4267,4326,,1249,
-8553,1,4267,4326,,1250,
-8554,1,4269,4326,,1251,
-8555,1,4269,4326,,1252,
-8556,1,4307,4326,,1253,
-8557,1,4284,4326,,1254,
-8558,1,4305,4326,,1255,
-8559,1,4232,4326,,1256,
-8560,1,4807,4275,,1467,99.63
-8561,1,4801,4217,,1257,
-8562,1,4802,4218,,1258,
-8563,1,4802,4218,,1258,
-8563,2,4218,4326,,1125,
-8564,1,4803,4207,,1259,
-8565,1,4804,4257,,1260,
-8566,1,4805,4312,,1261,
-8567,1,4806,4265,,1262,
-8568,1,4806,4265,,1262,
-8568,2,4265,4326,,1169,
-8569,1,4808,4280,,1263,
-8570,1,4809,4215,,1264,
-8571,1,4810,4297,,1265,
-8572,1,4810,4297,,1265,
-8572,2,4297,4326,,1227,
-8573,1,4811,4304,,1266,
-8574,1,4812,4305,,1267,
-8575,1,4812,4305,,1267,
-8575,2,4305,4326,,1255,
-8576,1,4813,4211,,1268,
-8577,1,4813,4211,,1268,
-8577,2,4211,4326,,1123,
-8578,1,4814,4308,,1269,98.51
-8579,1,4815,4120,,1270,
-8580,1,4293,4326,,1271,
-8581,1,4121,4326,,1272,
-8582,1,4237,4258,,1273,
-8583,1,4237,4258,,1273,
-8583,2,4258,4326,,1149,
-8584,1,4230,4326,,1275,
-8585,1,4275,4230,,1276,
-8586,1,4807,4275,,1467,
-8586,2,4275,4230,,1276,
-8587,1,4275,4322,,1277,
-8588,1,4807,4275,,1467,
-8588,2,4275,4322,,1277,
-8589,1,4202,4283,,1278,
-8590,1,4202,4283,,1278,
-8590,2,4283,4326,,1150,98.50
-8591,1,4203,4283,,1279,
-8592,1,4203,4283,,1279,
-8592,2,4283,4326,,1150,98.50
-8593,1,4203,4283,,1280,
-8594,1,4203,4283,,1280,
-8594,2,4283,4326,,1150,98.50
-8595,1,4124,4258,,1437,99.11
-8595,2,4258,4326,,1149,99.11
-8596,1,4125,4326,,1282,
-8597,1,4284,4126,,1274,
-8598,1,4126,4326,,1283,
-8599,1,4210,4326,,1284,
-8600,1,4210,4326,,1285,
-8601,1,4294,4326,,1286,
-8602,1,4284,4326,,1287,
-8603,1,4284,4326,,1288,
-8604,1,4284,4326,,1289,
-8605,1,4284,4326,,1290,
-8606,1,4284,4326,,1291,
-8607,1,4284,4326,,1292,
-8608,1,4284,4326,,1293,
-8609,1,4284,4126,,1274,
-8609,2,4126,4326,,1283,
-8610,1,4304,4326,,1294,
-8611,1,4811,4304,,1266,
-8611,2,4304,4326,,1294,
-8612,1,4271,4326,,1295,
-8613,1,4302,4326,,1296,
-8614,1,4127,4130,,1297,
-8615,1,4127,4130,,1297,
-8615,2,4130,4326,,1302,
-8616,1,4127,4130,,1298,
-8617,1,4127,4130,,1298,
-8617,2,4130,4326,,1302,
-8618,1,4127,4130,,1299,
-8619,1,4127,4130,,1299,
-8619,2,4130,4326,,1302,
-8620,1,4127,4130,,1300,
-8621,1,4127,4130,,1300,
-8621,2,4130,4326,,1302,
-8622,1,4127,4130,,1301,
-8623,1,4127,4130,,1301,
-8623,2,4130,4326,,1302,
-8624,1,4130,4326,,1302,
-8625,1,4284,4326,,1303,
-8626,1,4240,4326,,1304,
-8627,1,4301,4326,,1305,
-8628,1,4312,4326,,1306,
-8629,1,4271,4326,,1307,
-8633,1,4314,4258,,1309,
-8634,1,4314,4258,,1309,
-8634,2,4258,4326,,1149,
-8635,1,4284,4258,,1310,
-8636,1,4284,4258,,1310,
-8636,2,4258,4326,,1149,
-8637,1,4230,4326,,1311,
-8638,1,4903,4230,1001,,
-8639,1,4903,4230,1002,,
-8640,1,4903,4230,1003,,
-8641,1,4903,4230,1001,,
-8641,2,4230,4326,,1145,
-8642,1,4267,4269,,1312,
-8643,1,4267,4269,,1312,
-8643,2,4269,4326,,1188,
-8644,1,4267,4269,,1313,
-8645,1,4267,4269,,1313,
-8645,2,4269,4326,,1188,
-8646,1,4277,4326,,1314,
-8647,1,4277,4230,,1315,
-8648,1,4260,4326,,1316,
-8649,1,4220,4324,,1317,
-8650,1,4220,4326,,1318,
-8651,1,4220,4326,,1319,
-8652,1,4220,4326,,1320,
-8653,1,4220,4326,,1321,
-8654,1,4220,4326,,1322,
-8655,1,4220,4326,,1323,
-8656,1,4220,4326,,1324,
-8657,1,4220,4326,,1325,
-8658,1,4220,4326,,1326,
-8659,1,4220,4326,,1327,
-8660,1,4259,4264,,1328,
-8661,1,4264,4326,,1329,
-8662,1,4259,4326,,1330,
-8663,1,4805,4312,,1261,
-8663,2,4312,4326,,1306,
-8664,1,4133,4258,,1331,
-8665,1,4284,4133,,1332,
-8666,1,4133,4326,,1333,
-8667,1,4284,4326,,1334,
-8668,1,4301,4326,,1335,
-8669,1,4301,4326,,1336,
-8670,1,4301,4326,,1337,
-8671,1,4301,4326,,1338,
-8672,1,4301,4326,,1339,
-8673,1,4301,4326,,1340,
-8674,1,4301,4326,,1341,
-8675,1,4301,4326,,1342,
-8676,1,4301,4326,,1343,
-8677,1,4301,4326,,1344,
-8678,1,4301,4326,,1345,
-8679,1,4301,4326,,1346,
-8680,1,4301,4326,,1347,
-8681,1,4301,4326,,1348,
-8682,1,4301,4326,,1349,
-8683,1,4301,4326,,1350,
-8684,1,4301,4326,,1351,
-8685,1,4301,4326,,1352,
-8686,1,4301,4326,,1353,
-8687,1,4301,4326,,1354,
-8688,1,4301,4326,,1355,
-8689,1,4301,4326,,1356,
-8690,1,4301,4326,,1357,
-8691,1,4301,4326,,1358,
-8692,1,4301,4326,,1359,
-8693,1,4301,4326,,1360,
-8694,1,4301,4326,,1361,
-8695,1,4301,4326,,1362,
-8696,1,4301,4326,,1363,
-8697,1,4301,4326,,1364,
-8698,1,4301,4326,,1365,
-8699,1,4301,4326,,1366,
-8700,1,4301,4326,,1367,
-8701,1,4301,4326,,1368,
-8702,1,4301,4326,,1369,
-8703,1,4301,4326,,1370,
-8704,1,4301,4326,,1371,
-8705,1,4301,4326,,1372,
-8706,1,4301,4326,,1373,
-8707,1,4301,4326,,1374,
-8708,1,4301,4326,,1375,
-8709,1,4301,4326,,1376,
-8710,1,4301,4326,,1377,
-8711,1,4301,4326,,1378,
-8712,1,4301,4326,,1379,
-8713,1,4301,4326,,1380,
-8714,1,4301,4326,,1381,
-8715,1,4301,4326,,1382,
-8716,1,4301,4326,,1383,
-8717,1,4301,4326,,1384,
-8718,1,4301,4326,,1385,
-8719,1,4301,4326,,1386,
-8720,1,4301,4326,,1387,
-8721,1,4301,4326,,1388,
-8722,1,4301,4326,,1389,
-8723,1,4301,4326,,1390,
-8724,1,4301,4326,,1391,
-8725,1,4301,4326,,1392,
-8726,1,4301,4326,,1393,
-8727,1,4301,4326,,1394,
-8728,1,4301,4326,,1395,
-8729,1,4301,4326,,1396,
-8730,1,4301,4326,,1397,
-8731,1,4301,4326,,1398,
-8732,1,4301,4326,,1399,
-8733,1,4301,4326,,1400,
-8734,1,4301,4326,,1401,
-8735,1,4301,4326,,1402,
-8736,1,4301,4326,,1403,
-8737,1,4301,4326,,1404,
-8738,1,4301,4326,,1405,
-8739,1,4301,4326,,1406,
-8740,1,4301,4326,,1407,
-8741,1,4301,4326,,1408,
-8742,1,4301,4326,,1409,
-8743,1,4301,4326,,1410,
-8744,1,4301,4326,,1411,
-8745,1,4301,4326,,1412,
-8746,1,4301,4326,,1413,
-8747,1,4301,4326,,1414,
-8748,1,4301,4326,,1415,
-8749,1,4301,4326,,1416,
-8750,1,4301,4326,,1417,
-8751,1,4301,4326,,1418,
-8752,1,4301,4326,,1419,
-8753,1,4301,4326,,1420,
-8754,1,4301,4326,,1421,
-8755,1,4301,4326,,1422,
-8756,1,4301,4326,,1423,
-8757,1,4301,4326,,1424,
-8758,1,4301,4326,,1425,
-8759,1,4301,4326,,1426,
-8760,1,4301,4326,,1427,
-8761,1,4301,4326,,1428,
-8762,1,4301,4326,,1429,
-8763,1,4301,4326,,1430,
-8764,1,4301,4326,,1431,
-8765,1,4301,4326,,1432,
-8766,1,4301,4326,,1433,
-8767,1,4301,4326,,1434,
-8768,1,4301,4326,,1435,
-8769,1,4301,4326,,1436,
-8770,1,4232,4326,,1438,
-8771,1,4134,4326,,1439,
-8772,1,4230,4326,,1440,
-8773,1,4601,4326,,1441,
-8774,1,4602,4326,,1442,
-8775,1,4603,4326,,1443,
-8776,1,4604,4326,,1444,
-8777,1,4605,4326,,1445,
-8778,1,4606,4326,,1446,
-8779,1,4600,4326,,1447,
-8780,1,4124,4258,,1437,
-8784,1,4230,4326,,1450,
-8785,1,4135,4269,,1454,
-8786,1,4135,4269,,1454,
-8786,2,4269,4326,,1188,
-8787,1,4136,4269,,1455,
-8788,1,4136,4269,,1455,
-8788,2,4269,4326,,1188,
-8789,1,4137,4269,,1456,
-8790,1,4137,4269,,1456,
-8790,2,4269,4326,,1188,
-8791,1,4138,4269,,1457,
-8792,1,4138,4269,,1457,
-8792,2,4269,4326,,1188,
-8793,1,4609,4269,,1451,
-8794,1,4609,4269,,1451,
-8794,2,4269,4326,,1188,
-8795,1,4202,4283,,1458,
-8796,1,4202,4283,,1458,
-8796,2,4283,4326,,1150,
-8797,1,4202,4283,,1459,
-8798,1,4202,4283,,1459,
-8798,2,4283,4326,,1150,
-8799,1,4202,4283,,1460,
-8800,1,4202,4283,,1460,
-8800,2,4283,4326,,1150,
-8801,1,4139,4269,,1461,
-8802,1,4139,4269,,1461,
-8802,2,4269,4326,,1188,
-8803,1,4267,4269,,1462,
-8804,1,4267,4269,,1462,
-8804,2,4269,4326,,1188,
-8805,1,4608,4269,,1463,
-8806,1,4608,4269,,1463,
-8806,2,4269,4326,,1188,
-8807,1,4202,4283,,1464,
-8808,1,4202,4283,,1464,
-8808,2,4283,4326,,1150,
-8811,1,4817,4273,,1466,
-8812,1,4807,4275,,1468,
-8813,1,4142,4326,,1469,
-8814,1,4143,4326,,1470,
-8815,1,4312,4326,,1471,
-8816,1,4122,4140,,1472,
-8817,1,4140,4326,,1473,
-8818,1,4122,4140,,1472,
-8818,2,4140,4326,,1473,
-8819,1,4269,4152,,1474,
-8820,1,4269,4152,,1475,
-8821,1,4269,4152,,1476,
-8822,1,4269,4152,,1477,
-8823,1,4269,4152,,1478,
-8824,1,4269,4152,,1479,
-8825,1,4269,4152,,1480,
-8826,1,4269,4152,,1481,
-8827,1,4269,4152,,1482,
-8828,1,4269,4152,,1483,
-8829,1,4269,4152,,1484,
-8830,1,4269,4152,,1485,
-8831,1,4269,4152,,1486,
-8832,1,4269,4152,,1487,
-8833,1,4269,4152,,1488,
-8834,1,4269,4152,,1489,
-8835,1,4269,4152,,1490,
-8836,1,4269,4152,,1491,
-8837,1,4269,4152,,1492,
-8838,1,4269,4152,,1493,
-8839,1,4269,4152,,1494,
-8840,1,4269,4152,,1495,
-8841,1,4269,4152,,1496,
-8842,1,4269,4152,,1497,
-8843,1,4269,4152,,1498,
-8844,1,4269,4152,,1499,
-8845,1,4269,4152,,1500,
-8846,1,4269,4152,,1501,
-8847,1,4269,4152,,1502,
-8848,1,4269,4152,,1503,
-8849,1,4222,4148,,1504,
-8850,1,4148,4326,,1505,
-8851,1,4202,4283,,1506,
-8852,1,4202,4283,,1507,
-8853,1,4202,4283,,1506,
-8853,2,4283,4326,,1150,
-8854,1,4202,4283,,1507,
-8854,2,4283,4326,,1150,
-8855,1,4149,4326,,1508,
-8856,1,4150,4151,,1509,
-8857,1,4150,4151,,1509,
-8857,2,4151,4326,,1511,
-8858,1,4149,4326,,1510,
-8859,1,4151,4326,,1511,
-8860,1,4267,4269,,1241,
-8860,2,4269,4152,,1474,
-8861,1,4267,4269,,1241,
-8861,2,4269,4152,,1475,
-8862,1,4267,4269,,1241,
-8862,2,4269,4152,,1476,
-8863,1,4267,4269,,1241,
-8863,2,4269,4152,,1477,
-8864,1,4267,4269,,1241,
-8864,2,4269,4152,,1478,
-8865,1,4267,4269,,1241,
-8865,2,4269,4152,,1479,
-8866,1,4267,4269,,1241,
-8866,2,4269,4152,,1480,
-8867,1,4267,4269,,1241,
-8867,2,4269,4152,,1481,
-8868,1,4267,4269,,1241,
-8868,2,4269,4152,,1482,
-8869,1,4267,4269,,1241,
-8869,2,4269,4152,,1483,
-8870,1,4267,4269,,1241,
-8870,2,4269,4152,,1484,
-8871,1,4267,4269,,1241,
-8871,2,4269,4152,,1485,
-8872,1,4267,4269,,1241,
-8872,2,4269,4152,,1486,
-8873,1,4267,4269,,1241,
-8873,2,4269,4152,,1487,
-8874,1,4267,4269,,1241,
-8874,2,4269,4152,,1488,
-8875,1,4267,4269,,1241,
-8875,2,4269,4152,,1489,
-8876,1,4267,4269,,1241,
-8876,2,4269,4152,,1490,
-8877,1,4267,4269,,1241,
-8877,2,4269,4152,,1491,
-8878,1,4267,4269,,1241,
-8878,2,4269,4152,,1492,
-8879,1,4267,4269,,1241,
-8879,2,4269,4152,,1493,
-8880,1,4267,4269,,1241,
-8880,2,4269,4152,,1494,
-8881,1,4139,4269,,1461,
-8881,2,4269,4152,,1495,
-8882,1,4267,4269,,1241,
-8882,2,4269,4152,,1496,
-8883,1,4267,4269,,1241,
-8883,2,4269,4152,,1497,
-8884,1,4267,4269,,1241,
-8884,2,4269,4152,,1498,
-8885,1,4267,4269,,1241,
-8885,2,4269,4152,,1499,
-8886,1,4267,4269,,1241,
-8886,2,4269,4152,,1500,
-8887,1,4267,4269,,1241,
-8887,2,4269,4152,,1501,
-8888,1,4267,4269,,1241,
-8888,2,4269,4152,,1502,
-8889,1,4267,4269,,1241,
-8889,2,4269,4152,,1503,
-8890,1,4153,4326,,1512,
-8891,1,4132,4326,,1513,
-8892,1,4154,4326,,1514,
-8893,1,4269,4326,,1308,
-8894,1,4269,4326,,1515,
-8895,1,4247,4326,,1516,
-8896,1,4267,4269,,1241,
-8896,2,4269,4326,,1515,
-8897,1,4267,4269,,1243,
-8897,2,4269,4326,,1515,
diff --git a/src/tiff/csv/unit_of_measure.csv b/src/tiff/csv/unit_of_measure.csv
deleted file mode 100644
index 805d97c..0000000
--- a/src/tiff/csv/unit_of_measure.csv
+++ /dev/null
@@ -1,64 +0,0 @@
-"UOM_CODE","UNIT_OF_MEAS_NAME","UNIT_OF_MEAS_TYPE","TARGET_UOM_CODE","FACTOR_B","FACTOR_C","REMARKS","INFORMATION_SOURCE","DATA_SOURCE","REVISION_DATE","CHANGE_ID","DEPRECATED"
-9001,metre,length,9001,1.0,1.0,Also known as International metre.,ISO 1000.,EPSG,1995-06-02 00:00:00,,0
-9002,foot,length,9001,0.3048,1.0,,ISO; 1958,EPSG,1995-06-02 00:00:00,,0
-9003,US survey foot,length,9001,12.0,39.37,Used in USA.,EPSG,EPSG,2000-05-07 00:00:00,99.99,0
-9005,Clarke's foot,length,9001,0.304797265,1.0,"Assumes Clarke's 1865 ratio of 1 British foot = 0.304797265 French legal metres applies to the international metre.   Used in older Australian, southern African & British West Indian mapping.",Australian Land Information Group  www.auslig.gov.au/geodesy/histry.htm,EPSG,2001-01-21 00:00:00,97.234 99.99  2000.05,0
-9014,fathom,length,9001,1.8288,1.0,= 6 feet.,,EPSG,1995-06-02 00:00:00,,0
-9030,nautical mile,length,9001,1852.0,1.0,,,EPSG,1996-10-18 00:00:00,96.24,0
-9031,German legal metre,length,9001,1.0000135965,1.0,Used in Namibia.,Chief Directorate Surveys and Land Information; Mowbray; South Africa,EPSG,1997-06-16 00:00:00,,0
-9033,US survey chain,length,9001,792.0,39.37,Used in USA primarily for public lands cadastral work.,Bureau of Land Management technical bulletin 6 (1973) and Standard Field Tables 8th edition (1956).,EPSG,2000-05-07 00:00:00,99.99,0
-9034,US survey link,length,9001,7.92,39.37,Used in USA primarily for public lands cadastral work.,Bureau of Land Management technical bulletin 6 (1973) and Standard Field Tables 8th edition (1956).,EPSG,2000-05-07 00:00:00,99.99,0
-9035,US survey mile,length,9001,63360.0,39.37,Used in USA primarily for public lands cadastral work.,Bureau of Land Management technical bulletin 6 (1973) and Standard Field Tables 8th edition (1956).,EPSG,2000-05-07 00:00:00,99.99,0
-9036,kilometre,length,9001,1000.0,1.0,,ISO 1000.,EPSG,1998-11-11 00:00:00,,0
-9037,Clarke's yard,length,9001,0.914391795,1.0,"=3 Clarke's feet.  Assumes Clarke's 1865 ratio of 1 British foot = 0.304797265 French legal metres applies to the international metre.   Used in older Australian, southern African & British West Indian mapping.",Australian Land Information Group  www.auslig.gov.au/geodesy/histry.htm,EPSG,2000-05-07 00:00:00,97.233  99.99,0
-9038,Clarke's chain,length,9001,20.11661949,1.0,"=22 Clarke's yards.  Assumes Clarke's 1865 ratio of 1 British foot = 0.304797265 French legal metres applies to the international metre.   Used in older Australian, southern African & British West Indian mapping.",Australian Land Information Group  www.auslig.gov.au/geodesy/histry.htm,EPSG,2000-05-07 00:00:00,97.233  99.99,0
-9039,Clarke's link,length,9001,0.2011661949,1.0,"=1/100 Clarke's chain. Assumes Clarke's 1865 ratio of 1 British foot = 0.304797265 French legal metres applies to the international metre.   Used in older Australian, southern African & British West Indian mapping.",Australian Land Information Group  www.auslig.gov.au/geodesy/histry.htm,EPSG,2000-05-07 00:00:00,97.233  99.99,0
-9040,British yard (Sears 1922),length,9001,36.0,39.370147,Uses Sear's 1922 British yard-metre ratio as given by Bomford as 39.370147 inches per metre.  Used in East Malaysian and older New Zealand mapping.,"G. Bomford ""Geodesy"" 2nd edition 1962; after J.S.Clark ""Remeasurement of the Old Length Standards""; Empire Survey Review no. 90; 1953.",EPSG,2000-05-07 00:00:00,97.233  99.99,0
-9041,British foot (Sears 1922),length,9001,12.0,39.370147,Uses Sear's 1922 British yard-metre ratio as given by Bomford as 39.370147 inches per metre.  Used in East Malaysian and older New Zealand mapping.,"G. Bomford ""Geodesy"" 2nd edition 1962; after J.S.Clark ""Remeasurement of the Old Length Standards""; Empire Survey Review no. 90; 1953.",EPSG,2000-05-07 00:00:00,97.233  99.99,0
-9042,British chain (Sears 1922),length,9001,792.0,39.370147,Uses Sear's 1922 British yard-metre ratio as given by Bomford as 39.370147 inches per metre.  Used in East Malaysian and older New Zealand mapping.,"G. Bomford ""Geodesy"" 2nd edition 1962; after J.S.Clark ""Remeasurement of the Old Length Standards""; Empire Survey Review no. 90; 1953.",EPSG,2000-05-07 00:00:00,97.233  99.99,0
-9043,British link (Sears 1922),length,9001,7.92,39.370147,Uses Sear's 1922 British yard-metre ratio as given by Bomford as 39.370147 inches per metre.  Used in East Malaysian and older New Zealand mapping.,"G. Bomford ""Geodesy"" 2nd edition 1962; after J.S.Clark ""Remeasurement of the Old Length Standards""; Empire Survey Review no. 90; 1953.",EPSG,2000-05-07 00:00:00,97.233  99.99,0
-9050,British yard (Benoit 1895 A),length,9001,0.9143992,1.0,Uses Benoit's 1895 British yard-metre ratio as given by Clark as 0.9144992 metres per yard.  Used for deriving metric size of ellipsoid in Palestine.,"J.S.Clark; ""Remeasurement of the Old Length Standards""; Empire Survey Review no. 90; 1953.",EPSG,2000-05-07 00:00:00,97.233  99.99,0
-9051,British foot (Benoit 1895 A),length,9001,0.9143992,3.0,Uses Benoit's 1895 British yard-metre ratio as given by Clark as 0.9144992 metres per yard.  Used for deriving metric size of ellipsoid in Palestine.,"J.S.Clark; ""Remeasurement of the Old Length Standards""; Empire Survey Review no. 90; 1953.",EPSG,2000-05-07 00:00:00,97.233  99.99,0
-9052,British chain (Benoit 1895 A),length,9001,20.1167824,1.0,Uses Benoit's 1895 British yard-metre ratio as given by Clark as 0.9144992 metres per yard.  Used for deriving metric size of ellipsoid in Palestine.,"J.S.Clark; ""Remeasurement of the Old Length Standards""; Empire Survey Review no. 90; 1953.",EPSG,2000-05-07 00:00:00,97.233  99.99,0
-9053,British link (Benoit 1895 A),length,9001,0.201167824,1.0,Uses Benoit's 1895 British yard-metre ratio as given by Clark as 0.9144992 metres per yard.  Used for deriving metric size of ellipsoid in Palestine.,"J.S.Clark; ""Remeasurement of the Old Length Standards""; Empire Survey Review no. 90; 1953.",EPSG,2000-05-07 00:00:00,97.233  99.99,0
-9060,British yard (Benoit 1895 B),length,9001,36.0,39.370113,"G. Bomford ""Geodesy"" 2nd edition 1962; after J.S.Clark ""Remeasurement of the Old Length Standards""; Empire Survey Review no. 90; 1953.","G. Bomford ""Geodesy"" 2nd edition 1962; after J.S.Clark ""Remeasurement of the Old Length Standards""; Empire Survey Review no. 90; 1953.",EPSG,2000-05-07 00:00:00,97.233  99.99,0
-9061,British foot (Benoit 1895 B),length,9001,12.0,39.370113,Uses Benoit's 1895 British yard-metre ratio as given by Bomford as 39.370113 inches per metre.  Used in West Malaysian mapping.,"G. Bomford ""Geodesy"" 2nd edition 1962; after J.S.Clark ""Remeasurement of the Old Length Standards""; Empire Survey Review no. 90; 1953.",EPSG,2000-05-07 00:00:00,97.233  99.99,0
-9062,British chain (Benoit 1895 B),length,9001,792.0,39.370113,Uses Benoit's 1895 British yard-metre ratio as given by Bomford as 39.370113 inches per metre.  Used in West Malaysian mapping.,"G. Bomford ""Geodesy"" 2nd edition 1962; after J.S.Clark ""Remeasurement of the Old Length Standards""; Empire Survey Review no. 90; 1953.",EPSG,2000-05-07 00:00:00,97.233  99.99,0
-9063,British link (Benoit 1895 B),length,9001,7.92,39.370113,Uses Benoit's 1895 British yard-metre ratio as given by Bomford as 39.370113 inches per metre.  Used in West Malaysian mapping.,"G. Bomford; ""Geodesy""; 3rd edition 1975",EPSG,2000-05-07 00:00:00,97.233  99.99,0
-9070,British foot (1865),length,9001,0.9144025,3.0,Uses Clark's estimate of 1853-1865 British foot-metre ratio of 0.9144025 metres per yard.  Used in 1962 and 1975 estimates of Indian foot.,"J.S.Clark; ""Remeasurement of the Old Length Standards""; Empire Survey Review no. 90; 1953.",EPSG,2000-05-07 00:00:00,97.233  99.99,0
-9080,Indian foot,length,9001,12.0,39.370142,Indian Foot = 0.99999566 British feet (A.R.Clarke 1865).  British yard (= 3 British feet) taken to be J.S.Clark's 1865 value of 0.9144025 metres.,"G. Bomford; ""The Re-adjustment of the Indian Triangulation""; Survey of India Professional Paper 28; 1939.",EPSG,2000-05-07 00:00:00,97.231  99.99,0
-9081,Indian foot (1937),length,9001,0.30479841,1.0,Indian Foot = 0.99999566 British feet (A.R.Clarke 1865).  British foot taken to be 1895 Benoit value of 12/39.370113m.  Rounded to 8 decimal places as 0.30479841. Used from Bangladesh to Vietnam.  Previously used in India and Pakistan but superseded.,"G. Bomford; ""The Re-adjustment of the Indian Triangulation""; Survey of India Professional Paper 28; 1939.",EPSG,2000-05-07 00:00:00,97.231  99.99,0
-9082,Indian foot (1962),length,9001,0.3047996,1.0,Indian Foot = 0.99999566 British feet (A.R.Clarke 1865).  British yard (3 feet) taken to be J.S. Clark's 1865 value of 0.9144025m. Rounded to 8 significant figures with a small error as 1 Ind ft=0.3048996m.  Used in Pakistan since metrication.,"G. Bomford; ""Geodesy""; 2nd edition 1962",EPSG,2000-05-07 00:00:00,97.231  99.99,0
-9083,Indian foot (1975),length,9001,0.3047995,1.0,Indian Foot = 0.99999566 British feet (A.R.Clarke 1865).  British yard (3 feet) taken to be J.S. Clark's 1865 value of 0.9144025m. Rounded to 8 significant figures as 1 Ind ft=0.3048995m.  Used in India since metrication.,"G. Bomford; ""Geodesy""; 3rd edition 1975",EPSG,2000-05-07 00:00:00,97.231  99.99,0
-9084,Indian yard,length,9001,36.0,39.370142,Indian Foot = 0.99999566 British feet (A.R.Clarke 1865).  British yard (= 3 British feet) taken to be J.S.Clark's 1865 value of 0.9144025 metres.,"G. Bomford; ""The Re-adjustment of the Indian Triangulation""; Survey of India Professional Paper 28; 1939.",EPSG,2000-05-07 00:00:00,97.231  99.99,0
-9085,Indian yard (1937),length,9001,0.91439523,1.0,Indian Foot = 0.99999566 British feet (A.R.Clarke 1865).  British foot taken to be 1895 Benoit value of 12/39.370113m.  Rounded to 8 decimal places as 0.30479841. Used from Bangladesh to Vietnam.  Previously used in India and Pakistan but superseded.,"G. Bomford; ""The Re-adjustment of the Indian Triangulation""; Survey of India Professional Paper 28; 1939.",EPSG,2000-05-07 00:00:00,97.231  99.99,0
-9086,Indian yard (1962),length,9001,0.9143988,1.0,Indian Foot = 0.99999566 British feet (A.R.Clarke 1865).  British yard (3 feet) taken to be J.S. Clark's 1865 value of 0.9144025m. Rounded to 8 significant figures with a small error as 1 Ind ft=0.3048996m.  Used in Pakistan since metrication.,"G. Bomford; ""Geodesy""; 2nd edition 1962",EPSG,2000-05-07 00:00:00,97.231  99.99,0
-9087,Indian yard (1975),length,9001,0.9143985,1.0,Indian Foot = 0.99999566 British feet (A.R.Clarke 1865).  British yard (3 feet) taken to be J.S. Clark's 1865 value of 0.9144025m. Rounded to 8 significant figures as 1 Ind ft=0.3048995m.  Used in India since metrication.,"G. Bomford; ""Geodesy""; 3rd edition 1975",EPSG,2000-05-07 00:00:00,97.231  99.99,0
-9093,Statute mile,length,9001,1609.344,1.0,=5280 feet,EPSG,EPSG,2000-03-07 00:00:00,,0
-9094,Gold Coast foot,length,9001,6378300.0,20926201.0,"Used in Ghana and some adjacent parts of British west Africa prior to metrication, except for the metrication of projection defining parameters when British foot (Sears 1922) used.",Ordnance Survey International,EPSG,2001-01-21 00:00:00,2000.86,0
-9101,radian,angle,9101,1.0,1.0,SI standard unit.,ISO 1000.,EPSG,1995-06-02 00:00:00,,0
-9102,degree,angle,9101,3.14159265358979,180.0,=pi/180,,EPSG,1996-10-18 00:00:00,96.22,0
-9103,arc-minute,angle,9101,3.14159265358979,10800.0,1/60th degree.  =(pi/180) / 60,,EPSG,1996-10-18 00:00:00,96.22,0
-9104,arc-second,angle,9101,3.14159265358979,648000.0,1/60th arc-minute.  =(pi/180) / 3600,,EPSG,1996-10-18 00:00:00,96.22,0
-9105,grad,angle,9101,3.14159265358979,200.0,"=pi/200.  In France also abbreviated as ""gr"".",,EPSG,1996-10-18 00:00:00,96.22  99.05,0
-9106,gon,angle,9101,3.14159265358979,200.0,=pi/200,,EPSG,1996-10-18 00:00:00,96.22,0
-9107,degree minute second,angle,9101,,,"Format: sign - degrees (integer) - symbol - arc-minutes (integer) - symbol - arc-seconds (real, any precision). Different symbol sets are in use as separators for example � ' "". Convert to degrees using formula. Not recommended for data storage.",EPSG,EPSG,2002-07-13 00:00:00,96.19 2002.07,0
-9108,degree minute second hemisphere,angle,9101,,,Format: degrees (integer) - symbol - arc-minutes (integer) - symbol - arc-seconds (real) - symbol - hemisphere (single character N S E or W). Different symbol sets are in use as separators. Convert to deg using formula. Not recommended for data storage.,EPSG,EPSG,2002-07-13 00:00:00,96.19 2002.07,0
-9109,microradian,angle,9101,1.0,1000000.0,rad * 10E-6,ISO 1000.,EPSG,1996-10-18 00:00:00,99.05,0
-9110,sexagesimal DMS,angle,9101,,,Format: sign - degrees - decimal point - minutes (two digits) - integer seconds (two digits) - fraction of seconds (any precision). Must include leading zero in minutes and seconds and exclude decimal point for seconds. Convert to degrees using formula.,EPSG,EPSG,2002-07-13 00:00:00,2002.27,0
-9111,sexagesimal DM,angle,9101,,,Format: sign - degrees - decimal point - integer minutes (two digits) - fraction of minutes (any precision).  Must include leading zero in integer minutes.  Must exclude decimal point for minutes.  Convert to degrees using formula.  Not recommended.,EPSG,EPSG,2002-06-22 00:00:00,2002.07,0
-9112,centesimal minute,angle,9101,3.14159265358979,20000.0,1/100 of a grad and gon.  =(pi/200) / 100,http://www.geodesy.matav.hu/xgonmil.htm,EPSG,1999-10-20 00:00:00,98.48  99.51,0
-9113,centesimal second,angle,9101,3.14159265358979,2000000.0,"1/100 of a centesimal minute or 1/10,000th of a grad and gon.  =(pi/200) / 10000",http://www.geodesy.matav.hu/xgonmil.htm,EPSG,1999-10-20 00:00:00,99.51,0
-9114,mil_6400,angle,9101,3.14159265358979,3200.0,Angle subtended by 1/6400 part of a circle.  Approximates to 1/1000th radian.  Note that other approximations (notably 1/6300 circle and 1/6000 circle) also exist.,http://www.geodesy.matav.hu/xgonmil.htm,EPSG,1999-10-20 00:00:00,99.51,0
-9115,degree minute,angle,9101,,,"Format: sign - degrees (integer) - symbol - arc-minutes (real, any precision) - symbol. Different symbol sets are in use as separators for example � '. Convert to degrees using formula. Not recommended for data storage.",EPSG,EPSG,2002-07-13 00:00:00,,0
-9201,unity,scale,9201,1.0,1.0,,,EPSG,1996-09-12 00:00:00,,0
-9202,parts per million,scale,9201,1.0,1000000.0,,,EPSG,1996-09-12 00:00:00,,0
-9203,coefficient,scale,9201,,,Used when parameters are coefficients.  They inherently take the units which depend upon the term to which the coefficient applies.,EPSG,EPSG,2000-03-07 00:00:00,,0
-9204,Bin width 330 US survey feet,length,9001,3960.0,39.37,,EPSG,EPSG,2000-10-19 00:00:00,2000.59,0
-9205,Bin width 165 US survey feet,length,9001,1980.0,39.37,,EPSG,EPSG,2000-10-19 00:00:00,2000.59,0
-9206,Bin width 82.5 US survey feet,length,9001,990.0,39.37,,EPSG,EPSG,2000-10-19 00:00:00,2000.59,0
-9207,Bin width 37.5 metres,length,9001,37.5,1.0,,EPSG,EPSG,2000-10-19 00:00:00,2000.59,0
-9208,Bin width 25 metres,length,9001,25.0,1.0,,EPSG,EPSG,2000-10-19 00:00:00,2000.59,0
-9209,Bin width 12.5 metres,length,9001,12.5,1.0,,EPSG,EPSG,2000-10-19 00:00:00,2000.59,0
-9210,Bin width 6.25 metres,length,9001,6.25,1.0,,EPSG,EPSG,2000-10-19 00:00:00,2000.59,0
-9211,Bin width 3.125 metres,length,9001,3.125,1.0,,EPSG,EPSG,2000-10-19 00:00:00,2000.59,0
diff --git a/src/tiff/csv/uom_an_alias.c b/src/tiff/csv/uom_an_alias.c
deleted file mode 100644
index 59a31f8..0000000
--- a/src/tiff/csv/uom_an_alias.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#include "defs.h"
-datafile_rows_t uom_an_alias_row_1[] = {"UOM_A_ALIAS_CODE","UOM_A_ALIAS_NAME","UOM_ANGLE_CODE","REVISION_DATE","INFORMATION_SOURCE","DATA_SOURCE","REMARKS","CHANGE_ID",NULL};
-datafile_rows_t uom_an_alias_row_2[] = {"9115","mil","9114","1999-04-22 00:00:00","http://www.geodesy.matav.hu/xgonmil.htm","EPSG","Alias also applies to other variations of a mil, especially mil_6300 and mil_6000.","",NULL};
-
-datafile_rows_t *uom_an_alias_rows[] = {uom_an_alias_row_1,uom_an_alias_row_2,NULL};
diff --git a/src/tiff/csv/uom_an_alias.csv b/src/tiff/csv/uom_an_alias.csv
deleted file mode 100644
index ee4178d..0000000
--- a/src/tiff/csv/uom_an_alias.csv
+++ /dev/null
@@ -1,2 +0,0 @@
-"UOM_A_ALIAS_CODE","UOM_A_ALIAS_NAME","UOM_ANGLE_CODE","REVISION_DATE","INFORMATION_SOURCE","DATA_SOURCE","REMARKS","CHANGE_ID"
-9115,mil,9114,1999-04-22 00:00:00,http://www.geodesy.matav.hu/xgonmil.htm,EPSG,"Alias also applies to other variations of a mil, especially mil_6300 and mil_6000.",
diff --git a/src/tiff/csv/uom_angle.c b/src/tiff/csv/uom_angle.c
deleted file mode 100644
index b671957..0000000
--- a/src/tiff/csv/uom_angle.c
+++ /dev/null
@@ -1,18 +0,0 @@
-#include "defs.h"
-datafile_rows_t uom_angle_row_1[] = {"UOM_ANGLE_CODE","UNIT_OF_MEAS_EPSG_NAME","UNIT_OF_MEAS_USER_NAME","ABBREVIATION","DESCRIPTION","TARGET_UOM_ANGLE_CODE","FACTOR_B","FACTOR_C","REVISION_DATE","INFORMATION_SOURCE","DATA_SOURCE","REMARKS","CHANGE_ID",NULL};
-datafile_rows_t uom_angle_row_2[] = {"9101","radian","","rad","","9101","1.0","1.0","1995-06-02 00:00:00","ISO 1000.","EPSG","SI standard unit.","",NULL};
-datafile_rows_t uom_angle_row_3[] = {"9102","degree","","deg","","9101","3.14159265358979","180.0","1996-10-18 00:00:00","","EPSG","=pi/180","96.22",NULL};
-datafile_rows_t uom_angle_row_4[] = {"9103","arc-minute","","min","","9101","3.14159265358979","10800.0","1996-10-18 00:00:00","","EPSG","1/60th degree.  =(pi/180) / 60","96.22",NULL};
-datafile_rows_t uom_angle_row_5[] = {"9104","arc-second","","sec","","9101","3.14159265358979","648000.0","1996-10-18 00:00:00","","EPSG","1/60th arc-minute.  =(pi/180) / 3600","96.22",NULL};
-datafile_rows_t uom_angle_row_6[] = {"9105","grad","","g","","9101","3.14159265358979","200.0","1996-10-18 00:00:00","","EPSG","=pi/200.  In France also abbreviated as \"gr\".","96.22  99.05",NULL};
-datafile_rows_t uom_angle_row_7[] = {"9106","gon","","","","9101","3.14159265358979","200.0","1996-10-18 00:00:00","","EPSG","=pi/200","96.22",NULL};
-datafile_rows_t uom_angle_row_8[] = {"9107","DMS","","","degree minute second","9101","","","1996-10-18 00:00:00","","EPSG","Format: degrees (integer) - space - arc-minutes (integer) - space - arc-seconds (real).  Convert to degees using formula.","96.19",NULL};
-datafile_rows_t uom_angle_row_9[] = {"9108","DMSH","","","degree minute second hemisphere","9101","","","1996-10-18 00:00:00","","EPSG","Format: degrees (integer) - space - arc-minutes (integer) - space - arc-seconds (real) - hemisphere (single character N S E or W).  Convert to degrees using formula.","96.19",NULL};
-datafile_rows_t uom_angle_row_10[] = {"9109","microradian","","�rad","rad * 10E-6","9101","1.0","1000000.0","1996-10-18 00:00:00","ISO 1000.","EPSG","","99.05",NULL};
-datafile_rows_t uom_angle_row_11[] = {"9110","DDD.MMSSsss","","","sexagesimal degrees","9101","","","1996-10-18 00:00:00","","EPSG","Format: degrees - decimal point - minutes (two digits) - integer seconds (two digits) - fraction of seconds (any precision).  Must include leading zero in minutes and seconds.  Must exclude decimal point for seconds.  Convert to degrees using formula.","",NULL};
-datafile_rows_t uom_angle_row_12[] = {"9111","DDD.MMm","","","degrees and decimal minutes","9101","","","1999-04-22 00:00:00","","EPSG","Format: degrees - decimal point - integer minutes (two digits) - fraction of minutes.  Must include leading zero in integer minutes.  Must exclude decimal point for minutes.  Any precision of minutes are allowed.  Convert to degrees using formula.","",NULL};
-datafile_rows_t uom_angle_row_13[] = {"9112","centesimal minute","","c","","9101","3.14159265358979","20000.0","1999-10-20 00:00:00","http://www.geodesy.matav.hu/xgonmil.htm","EPSG","1/100 of a grad and gon.  =(pi/200) / 100","98.48  99.51",NULL};
-datafile_rows_t uom_angle_row_14[] = {"9113","centesimal second","","cc","","9101","3.14159265358979","2000000.0","1999-10-20 00:00:00","http://www.geodesy.matav.hu/xgonmil.htm","EPSG","1/100 of a centesimal minute or 1/10,000th of a grad and gon.  =(pi/200) / 10000","99.51",NULL};
-datafile_rows_t uom_angle_row_15[] = {"9114","mil_6400","","mil","Angle subtended by 1/6400 part of a circle","9101","3.14159265358979","3200.0","1999-10-20 00:00:00","http://www.geodesy.matav.hu/xgonmil.htm","EPSG","Angle subtended by 1/6400 part of a circle.  Approximates to 1/1000th radian.  Note that other approximations (notably 1/6300 circle and 1/6000 circle) also exist.","99.51",NULL};
-
-datafile_rows_t *uom_angle_rows[] = {uom_angle_row_1,uom_angle_row_2,uom_angle_row_3,uom_angle_row_4,uom_angle_row_5,uom_angle_row_6,uom_angle_row_7,uom_angle_row_8,uom_angle_row_9,uom_angle_row_10,uom_angle_row_11,uom_angle_row_12,uom_angle_row_13,uom_angle_row_14,uom_angle_row_15,NULL};
diff --git a/src/tiff/csv/uom_angle.csv b/src/tiff/csv/uom_angle.csv
deleted file mode 100644
index 5fa6a4a..0000000
--- a/src/tiff/csv/uom_angle.csv
+++ /dev/null
@@ -1,15 +0,0 @@
-"UOM_ANGLE_CODE","UNIT_OF_MEAS_EPSG_NAME","UNIT_OF_MEAS_USER_NAME","ABBREVIATION","DESCRIPTION","TARGET_UOM_ANGLE_CODE","FACTOR_B","FACTOR_C","REVISION_DATE","INFORMATION_SOURCE","DATA_SOURCE","REMARKS","CHANGE_ID"
-9101,radian,,rad,,9101,1.0,1.0,1995-06-02 00:00:00,ISO 1000.,EPSG,SI standard unit.,
-9102,degree,,deg,,9101,3.14159265358979,180.0,1996-10-18 00:00:00,,EPSG,=pi/180,96.22
-9103,arc-minute,,min,,9101,3.14159265358979,10800.0,1996-10-18 00:00:00,,EPSG,1/60th degree.  =(pi/180) / 60,96.22
-9104,arc-second,,sec,,9101,3.14159265358979,648000.0,1996-10-18 00:00:00,,EPSG,1/60th arc-minute.  =(pi/180) / 3600,96.22
-9105,grad,,g,,9101,3.14159265358979,200.0,1996-10-18 00:00:00,,EPSG,"=pi/200.  In France also abbreviated as \"gr\".",96.22  99.05
-9106,gon,,,,9101,3.14159265358979,200.0,1996-10-18 00:00:00,,EPSG,=pi/200,96.22
-9107,DMS,,,degree minute second,9101,,,1996-10-18 00:00:00,,EPSG,Format: degrees (integer) - space - arc-minutes (integer) - space - arc-seconds (real).  Convert to degees using formula.,96.19
-9108,DMSH,,,degree minute second hemisphere,9101,,,1996-10-18 00:00:00,,EPSG,Format: degrees (integer) - space - arc-minutes (integer) - space - arc-seconds (real) - hemisphere (single character N S E or W).  Convert to degrees using formula.,96.19
-9109,microradian,,�rad,rad * 10E-6,9101,1.0,1000000.0,1996-10-18 00:00:00,ISO 1000.,EPSG,,99.05
-9110,DDD.MMSSsss,,,sexagesimal degrees,9101,,,1996-10-18 00:00:00,,EPSG,Format: degrees - decimal point - minutes (two digits) - integer seconds (two digits) - fraction of seconds (any precision).  Must include leading zero in minutes and seconds.  Must exclude decimal point for seconds.  Convert to degrees using formula.,
-9111,DDD.MMm,,,degrees and decimal minutes,9101,,,1999-04-22 00:00:00,,EPSG,Format: degrees - decimal point - integer minutes (two digits) - fraction of minutes.  Must include leading zero in integer minutes.  Must exclude decimal point for minutes.  Any precision of minutes are allowed.  Convert to degrees using formula.,
-9112,centesimal minute,,c,,9101,3.14159265358979,20000.0,1999-10-20 00:00:00,http://www.geodesy.matav.hu/xgonmil.htm,EPSG,1/100 of a grad and gon.  =(pi/200) / 100,98.48  99.51
-9113,centesimal second,,cc,,9101,3.14159265358979,2000000.0,1999-10-20 00:00:00,http://www.geodesy.matav.hu/xgonmil.htm,EPSG,"1/100 of a centesimal minute or 1/10,000th of a grad and gon.  =(pi/200) / 10000",99.51
-9114,mil_6400,,mil,Angle subtended by 1/6400 part of a circle,9101,3.14159265358979,3200.0,1999-10-20 00:00:00,http://www.geodesy.matav.hu/xgonmil.htm,EPSG,Angle subtended by 1/6400 part of a circle.  Approximates to 1/1000th radian.  Note that other approximations (notably 1/6300 circle and 1/6000 circle) also exist.,99.51
diff --git a/src/tiff/csv/uom_le_alias.c b/src/tiff/csv/uom_le_alias.c
deleted file mode 100644
index 3f7404b..0000000
--- a/src/tiff/csv/uom_le_alias.c
+++ /dev/null
@@ -1,27 +0,0 @@
-#include "defs.h"
-datafile_rows_t uom_le_alias_row_1[] = {"UOM_L_ALIAS_CODE","UOM_L_ALIAS_NAME","UOM_LENGTH_CODE","REVISION_DATE","INFORMATION_SOURCE","DATA_SOURCE","REMARKS","CHANGE_ID",NULL};
-datafile_rows_t uom_le_alias_row_2[] = {"9015","International nautical mile","9030","1996-10-18 00:00:00","","EPSG","","9624",NULL};
-datafile_rows_t uom_le_alias_row_3[] = {"9016","meter","9001","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t uom_le_alias_row_4[] = {"9018","International foot","9002","1995-06-02 00:00:00","ISO 1958.","EPSG","","",NULL};
-datafile_rows_t uom_le_alias_row_5[] = {"9019","American foot","9003","1995-06-02 00:00:00","","EPSG","Used in USA.","",NULL};
-datafile_rows_t uom_le_alias_row_6[] = {"9020","Cape foot","9005","1995-06-02 00:00:00","","EPSG","Assumes Clarke's 1865 ratio of 1 French legal metre = 39.370432 imperial inches applies to the international metre.   Used in southern African & Jamaica mapping.","",NULL};
-datafile_rows_t uom_le_alias_row_7[] = {"9022","Indian geodetic foot","9080","1995-06-02 00:00:00","","EPSG","Indian Foot = 0.9999566 British feet (A.R.Clarke). British yard (=3 feet) taken to be J.S.Clarke 1865 value of 0.9144025 metres.","97.23",NULL};
-datafile_rows_t uom_le_alias_row_8[] = {"9023","link (Clarke's ratio)","9039","1999-10-20 00:00:00","","EPSG","Assumes Clarke's 1865 ratio of 1 French legal metre = 39.370432 imperial inches applies to the international metre.  Used in Trinidad and Tobago mapping.","97.231",NULL};
-datafile_rows_t uom_le_alias_row_9[] = {"9024","link","9063","1999-10-20 00:00:00","","EPSG","Used in West Malaysian mapping.","97.231",NULL};
-datafile_rows_t uom_le_alias_row_10[] = {"9025","link","9043","1999-10-20 00:00:00","","EPSG","Used in East Malaysian mapping.","97.231",NULL};
-datafile_rows_t uom_le_alias_row_11[] = {"9026","chain","9062","1999-10-20 00:00:00","","EPSG","Used in West Malaysian mapping.","97.231",NULL};
-datafile_rows_t uom_le_alias_row_12[] = {"9027","chain","9042","1999-10-20 00:00:00","","EPSG","Used in East Malaysian mapping.","97.231",NULL};
-datafile_rows_t uom_le_alias_row_13[] = {"9028","yard","9040","1999-10-20 00:00:00","","EPSG","Used in older New Zealand mapping.","97.231",NULL};
-datafile_rows_t uom_le_alias_row_14[] = {"9029","yard","9085","1999-10-20 00:00:00","","EPSG","= 3 Indian feet.","97.23",NULL};
-datafile_rows_t uom_le_alias_row_15[] = {"9044","foot","9041","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t uom_le_alias_row_16[] = {"9054","chain","9052","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t uom_le_alias_row_17[] = {"9055","foot","9051","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t uom_le_alias_row_18[] = {"9056","link","9053","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t uom_le_alias_row_19[] = {"9057","yard","9050","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t uom_le_alias_row_20[] = {"9064","foot","9061","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t uom_le_alias_row_21[] = {"9065","yard","9060","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t uom_le_alias_row_22[] = {"9071","foot","9070","1999-10-20 00:00:00","","EPSG","","",NULL};
-datafile_rows_t uom_le_alias_row_23[] = {"9088","Indian geodetic foot","9081","1999-10-20 00:00:00","","EPSG","Indian Foot = 0.9999566 British feet (A.R.Clarke). British yard (=3 feet) taken to be Benoit's 1885 value of 0.9144992 metres.","",NULL};
-datafile_rows_t uom_le_alias_row_24[] = {"9090","yard","9084","1999-10-20 00:00:00","","EPSG","= 3 Indian feet.","97.23",NULL};
-
-datafile_rows_t *uom_le_alias_rows[] = {uom_le_alias_row_1,uom_le_alias_row_2,uom_le_alias_row_3,uom_le_alias_row_4,uom_le_alias_row_5,uom_le_alias_row_6,uom_le_alias_row_7,uom_le_alias_row_8,uom_le_alias_row_9,uom_le_alias_row_10,uom_le_alias_row_11,uom_le_alias_row_12,uom_le_alias_row_13,uom_le_alias_row_14,uom_le_alias_row_15,uom_le_alias_row_16,uom_le_alias_row_17,uom_le_alias_row_18,uom_le_alias_row_19,uom_le_alias_row_20,uom_le_alias_row_21,uom_le_alias_row_22,uom_le_alias_row_23,u [...]
diff --git a/src/tiff/csv/uom_le_alias.csv b/src/tiff/csv/uom_le_alias.csv
deleted file mode 100644
index 7bb11ea..0000000
--- a/src/tiff/csv/uom_le_alias.csv
+++ /dev/null
@@ -1,24 +0,0 @@
-"UOM_L_ALIAS_CODE","UOM_L_ALIAS_NAME","UOM_LENGTH_CODE","REVISION_DATE","INFORMATION_SOURCE","DATA_SOURCE","REMARKS","CHANGE_ID"
-9015,International nautical mile,9030,1996-10-18 00:00:00,,EPSG,,9624
-9016,meter,9001,1995-06-02 00:00:00,,EPSG,,
-9018,International foot,9002,1995-06-02 00:00:00,ISO 1958.,EPSG,,
-9019,American foot,9003,1995-06-02 00:00:00,,EPSG,Used in USA.,
-9020,Cape foot,9005,1995-06-02 00:00:00,,EPSG,Assumes Clarke's 1865 ratio of 1 French legal metre = 39.370432 imperial inches applies to the international metre.   Used in southern African & Jamaica mapping.,
-9022,Indian geodetic foot,9080,1995-06-02 00:00:00,,EPSG,Indian Foot = 0.9999566 British feet (A.R.Clarke). British yard (=3 feet) taken to be J.S.Clarke 1865 value of 0.9144025 metres.,97.23
-9023,link (Clarke's ratio),9039,1999-10-20 00:00:00,,EPSG,Assumes Clarke's 1865 ratio of 1 French legal metre = 39.370432 imperial inches applies to the international metre.  Used in Trinidad and Tobago mapping.,97.231
-9024,link,9063,1999-10-20 00:00:00,,EPSG,Used in West Malaysian mapping.,97.231
-9025,link,9043,1999-10-20 00:00:00,,EPSG,Used in East Malaysian mapping.,97.231
-9026,chain,9062,1999-10-20 00:00:00,,EPSG,Used in West Malaysian mapping.,97.231
-9027,chain,9042,1999-10-20 00:00:00,,EPSG,Used in East Malaysian mapping.,97.231
-9028,yard,9040,1999-10-20 00:00:00,,EPSG,Used in older New Zealand mapping.,97.231
-9029,yard,9085,1999-10-20 00:00:00,,EPSG,= 3 Indian feet.,97.23
-9044,foot,9041,1999-10-20 00:00:00,,EPSG,,
-9054,chain,9052,1999-10-20 00:00:00,,EPSG,,
-9055,foot,9051,1999-10-20 00:00:00,,EPSG,,
-9056,link,9053,1999-10-20 00:00:00,,EPSG,,
-9057,yard,9050,1999-10-20 00:00:00,,EPSG,,
-9064,foot,9061,1999-10-20 00:00:00,,EPSG,,
-9065,yard,9060,1999-10-20 00:00:00,,EPSG,,
-9071,foot,9070,1999-10-20 00:00:00,,EPSG,,
-9088,Indian geodetic foot,9081,1999-10-20 00:00:00,,EPSG,Indian Foot = 0.9999566 British feet (A.R.Clarke). British yard (=3 feet) taken to be Benoit's 1885 value of 0.9144992 metres.,
-9090,yard,9084,1999-10-20 00:00:00,,EPSG,= 3 Indian feet.,97.23
diff --git a/src/tiff/csv/uom_length.c b/src/tiff/csv/uom_length.c
deleted file mode 100644
index 9f13b1e..0000000
--- a/src/tiff/csv/uom_length.c
+++ /dev/null
@@ -1,39 +0,0 @@
-#include "defs.h"
-datafile_rows_t uom_length_row_1[] = {"UOM_LENGTH_CODE","UNIT_OF_MEAS_EPSG_NAME","UNIT_OF_MEAS_USER_NAME","ABBREVIATION","DESCRIPTION","TARGET_UOM_LENGTH_CODE","FACTOR_B","FACTOR_C","REVISION_DATE","INFORMATION_SOURCE","DATA_SOURCE","REMARKS","CHANGE_ID",NULL};
-datafile_rows_t uom_length_row_2[] = {"9001","metre","","m","","9001","1.0","1.0","1995-06-02 00:00:00","ISO 1000.","EPSG","Also known as International metre.","",NULL};
-datafile_rows_t uom_length_row_3[] = {"9002","foot","","ft","","9001","0.3048","1.0","1995-06-02 00:00:00","ISO; 1958","EPSG","","",NULL};
-datafile_rows_t uom_length_row_4[] = {"9003","US survey foot","","ft US","","9001","12.0","39.37","1995-06-02 00:00:00","","EPSG","Used in USA.","",NULL};
-datafile_rows_t uom_length_row_5[] = {"9005","Clarke's foot","","ft (Cla)","","9001","0.304797265","1.0","1999-10-20 00:00:00","Australian Land Information Group  www.auslig.gov/au/geodesy/histry.htm","EPSG","Assumes Clarke's 1865 ratio of 1 British foot = 0.304797265 French legal metres applies to the international metre.   Used in older Australian, southern African & British West Indian mapping.","97.234",NULL};
-datafile_rows_t uom_length_row_6[] = {"9014","fathom","","f","","9001","1.8288","1.0","1999-10-20 00:00:00","","EPSG","= 6 feet.","",NULL};
-datafile_rows_t uom_length_row_7[] = {"9030","nautical mile","","NM","","9001","1852.0","1.0","1996-10-18 00:00:00","","EPSG","","96.24",NULL};
-datafile_rows_t uom_length_row_8[] = {"9031","German legal metre","","GLM","","9001","1.0000135965","1.0","1997-06-16 00:00:00","Chief Directorate Surveys and Land Information; Mowbray; South Africa","EPSG","Used in Namibia.","",NULL};
-datafile_rows_t uom_length_row_9[] = {"9033","US survey chain","","ch US","","9001","792.0","39.37","1998-03-12 00:00:00","Bureau of Land Management technical bulletin 6 (1973) and Standard Field Tables 8th edition (1956).","EPSG","Used in USA primarily for public lands cadastral work.","",NULL};
-datafile_rows_t uom_length_row_10[] = {"9034","US survey link","","lk US","","9001","7.92","39.37","1998-03-12 00:00:00","Bureau of Land Management technical bulletin 6 (1973) and Standard Field Tables 8th edition (1956).","EPSG","Used in USA primarily for public lands cadastral work.","",NULL};
-datafile_rows_t uom_length_row_11[] = {"9035","US survey mile","","mile US","","9001","63360.0","39.37","1998-03-12 00:00:00","Bureau of Land Management technical bulletin 6 (1973) and Standard Field Tables 8th edition (1956).","EPSG","Used in USA primarily for public lands cadastral work.","",NULL};
-datafile_rows_t uom_length_row_12[] = {"9036","kilometre","","km","","9001","1000.0","1.0","1998-11-11 00:00:00","ISO 1000.","EPSG","","",NULL};
-datafile_rows_t uom_length_row_13[] = {"9037","Clarke's yard","","yd (Cla)","","9001","0.914391795","1.0","1999-10-20 00:00:00","Australian Land Information Group  www.auslig.gov/au/geodesy/histry.htm","EPSG","=3 Clarke's feet.  Assumes Clarke's 1865 ratio of 1 British foot = 0.304797265 French legal metres applies to the international metre.   Used in older Australian, southern African & British West Indian mapping.","97.233",NULL};
-datafile_rows_t uom_length_row_14[] = {"9038","Clarke's chain","","ch (Cla)","","9001","20.11661949","1.0","1999-10-20 00:00:00","Australian Land Information Group  www.auslig.gov/au/geodesy/histry.htm","EPSG","=22 Clarke's yards.  Assumes Clarke's 1865 ratio of 1 British foot = 0.304797265 French legal metres applies to the international metre.   Used in older Australian, southern African & British West Indian mapping.","97.233",NULL};
-datafile_rows_t uom_length_row_15[] = {"9039","Clarke's link","","lk (Cla)","","9001","0.2011661949","1.0","1999-10-20 00:00:00","Australian Land Information Group  www.auslig.gov/au/geodesy/histry.htm","EPSG","=1/100 Clarke's chain. Assumes Clarke's 1865 ratio of 1 British foot = 0.304797265 French legal metres applies to the international metre.   Used in older Australian, southern African & British West Indian mapping.","97.233",NULL};
-datafile_rows_t uom_length_row_16[] = {"9040","British yard (Sears 1922)","","yd (Sears)","","9001","36.0","39.370147","1999-10-20 00:00:00","G. Bomford \"Geodesy\" 2nd edition 1962; after J.S.Clark \"Remeasurement of the Old Length Standards\"; Empire Survey Review no. 90; 1953.","EPSG","Uses Sear's 1922 British yard-metre ratio as given by Bomford as 39.370147 inches per metre.  Used in East Malaysian and older New Zealand mapping.","97.233",NULL};
-datafile_rows_t uom_length_row_17[] = {"9041","British foot (Sears 1922)","","ft (Sears)","","9001","12.0","39.370147","1999-10-20 00:00:00","G. Bomford \"Geodesy\" 2nd edition 1962; after J.S.Clark \"Remeasurement of the Old Length Standards\"; Empire Survey Review no. 90; 1953.","EPSG","Uses Sear's 1922 British yard-metre ratio as given by Bomford as 39.370147 inches per metre.  Used in East Malaysian and older New Zealand mapping.","97.233",NULL};
-datafile_rows_t uom_length_row_18[] = {"9042","British chain (Sears 1922)","","ch (Sears)","","9001","792.0","39.370147","1999-10-20 00:00:00","\"Geodesy\"; G. Bomford.","EPSG","Uses Sear's 1922 British yard-metre ratio as given by Bomford as 39.370147 inches per metre.  Used in East Malaysian and older New Zealand mapping.","97.233",NULL};
-datafile_rows_t uom_length_row_19[] = {"9043","British link (Sears 1922)","","lk (Sears)","","9001","7.92","39.370147","1999-10-20 00:00:00","G. Bomford \"Geodesy\" 2nd edition 1962; after J.S.Clark \"Remeasurement of the Old Length Standards\"; Empire Survey Review no. 90; 1953.","EPSG","Uses Sear's 1922 British yard-metre ratio as given by Bomford as 39.370147 inches per metre.  Used in East Malaysian and older New Zealand mapping.","97.233",NULL};
-datafile_rows_t uom_length_row_20[] = {"9050","British yard (Benoit 1895 A)","","yd (Ben A)","","9001","0.9143992","1.0","1999-10-20 00:00:00","J.S.Clark; \"Remeasurement of the Old Length Standards\"; Empire Survey Review no. 90; 1953.","EPSG","Uses Benoit's 1895 British yard-metre ratio as given by Clark as 0.9144992 metres per yard.  Used for deriving metric size of ellipsoid in Palestine.","97.233",NULL};
-datafile_rows_t uom_length_row_21[] = {"9051","British foot (Benoit 1895 A)","","ft (Ben A)","","9001","0.9143992","3.0","1999-10-20 00:00:00","J.S.Clark; \"Remeasurement of the Old Length Standards\"; Empire Survey Review no. 90; 1953.","EPSG","Uses Benoit's 1895 British yard-metre ratio as given by Clark as 0.9144992 metres per yard.  Used for deriving metric size of ellipsoid in Palestine.","97.233",NULL};
-datafile_rows_t uom_length_row_22[] = {"9052","British chain (Benoit 1895 A)","","ch (Ben A)","","9001","20.1167824","1.0","1999-10-20 00:00:00","J.S.Clark; \"Remeasurement of the Old Length Standards\"; Empire Survey Review no. 90; 1953.","EPSG","Uses Benoit's 1895 British yard-metre ratio as given by Clark as 0.9144992 metres per yard.  Used for deriving metric size of ellipsoid in Palestine.","97.233",NULL};
-datafile_rows_t uom_length_row_23[] = {"9053","British link (Benoit 1895 A)","","lk (Ben A)","","9001","0.201167824","1.0","1999-10-20 00:00:00","J.S.Clark; \"Remeasurement of the Old Length Standards\"; Empire Survey Review no. 90; 1953.","EPSG","Uses Benoit's 1895 British yard-metre ratio as given by Clark as 0.9144992 metres per yard.  Used for deriving metric size of ellipsoid in Palestine.","97.233",NULL};
-datafile_rows_t uom_length_row_24[] = {"9060","British yard (Benoit 1895 B)","","yd (Ben B)","","9001","36.0","39.370113","1999-10-20 00:00:00","G. Bomford \"Geodesy\" 2nd edition 1962; after J.S.Clark \"Remeasurement of the Old Length Standards\"; Empire Survey Review no. 90; 1953.","EPSG","Uses Benoit's 1895 British yard-metre ratio as given by Bomford as 39.370113 inches per metre.  Used in West Malaysian mapping.","97.233",NULL};
-datafile_rows_t uom_length_row_25[] = {"9061","British foot (Benoit 1895 B)","","ft (Ben B)","","9001","12.0","39.370113","1999-10-20 00:00:00","G. Bomford \"Geodesy\" 2nd edition 1962; after J.S.Clark \"Remeasurement of the Old Length Standards\"; Empire Survey Review no. 90; 1953.","EPSG","Uses Benoit's 1895 British yard-metre ratio as given by Bomford as 39.370113 inches per metre.  Used in West Malaysian mapping.","97.233",NULL};
-datafile_rows_t uom_length_row_26[] = {"9062","British chain (Benoit 1895 B)","","ch (Ben B)","","9001","792.0","39.370113","1999-10-20 00:00:00","G. Bomford \"Geodesy\" 2nd edition 1962; after J.S.Clark \"Remeasurement of the Old Length Standards\"; Empire Survey Review no. 90; 1953.","EPSG","Uses Benoit's 1895 British yard-metre ratio as given by Bomford as 39.370113 inches per metre.  Used in West Malaysian mapping.","97.233",NULL};
-datafile_rows_t uom_length_row_27[] = {"9063","British link (Benoit 1895 B)","","lk (Ben B)","","9001","7.92","39.370113","1999-10-20 00:00:00","\"Geodesy\"; G. Bomford.","EPSG","Uses Benoit's 1895 British yard-metre ratio as given by Bomford as 39.370113 inches per metre.  Used in West Malaysian mapping.","97.233",NULL};
-datafile_rows_t uom_length_row_28[] = {"9070","British foot (1865)","","ft (1865)","","9001","0.9144025","3.0","1999-10-20 00:00:00","J.S.Clark; \"Remeasurement of the Old Length Standards\"; Empire Survey Review no. 90; 1953.","EPSG","Uses Clark's estimate of 1853-1865 British foot-metre ratio of 0.9144025 metres per yard.  Used in 1962 and 1975 estimates of Indian foot.","97.233",NULL};
-datafile_rows_t uom_length_row_29[] = {"9080","Indian foot","","Ind ft (Cla)","","9001","12.0","39.370142","1999-10-20 00:00:00","G. Bomford; \"The Re-adjustment of the Indian Triangulation\"; Survey of India Professional Paper 28; 1939.","EPSG","Indian Foot = 0.99999566 British feet (A.R.Clarke 1865).  British yard (= 3 British feet) taken to be J.S.Clark's 1865 value of 0.9144025 metres.","97.231",NULL};
-datafile_rows_t uom_length_row_30[] = {"9081","Indian foot (1937)","","Ind ft (37)","","9001","0.30479841","1.0","1999-10-20 00:00:00","G. Bomford; \"The Re-adjustment of the Indian Triangulation\"; Survey of India Professional Paper 28; 1939.","EPSG","Indian Foot = 0.99999566 British feet (A.R.Clarke 1865).  British foot taken to be 1895 Benoit value of 12/39.370113m.  Rounded to 8 decimal places as 0.30479841. Used from Bangladesh to Vietnam.  Previously used in India and Pakistan but  [...]
-datafile_rows_t uom_length_row_31[] = {"9082","Indian foot (1962)","","Ind ft (62)","","9001","0.3047996","1.0","1999-10-20 00:00:00","G. Bomford; \"Geodesy\"; 2nd edition 1962","EPSG","Indian Foot = 0.99999566 British feet (A.R.Clarke 1865).  British yard (3 feet) taken to be J.S. Clark's 1865 value of 0.9144025m. Rounded to 8 significant figures with a small error as 1 Ind ft=0.3048996m.  Used in Pakistan since metrication.","97.231",NULL};
-datafile_rows_t uom_length_row_32[] = {"9083","Indian foot (1975)","","Ind ft (75)","","9001","0.3047995","1.0","1999-10-20 00:00:00","G. Bomford; \"Geodesy\"; 3rd edition 1975","EPSG","Indian Foot = 0.99999566 British feet (A.R.Clarke 1865).  British yard (3 feet) taken to be J.S. Clark's 1865 value of 0.9144025m. Rounded to 8 significant figures as 1 Ind ft=0.3048995m.  Used in India since metrication.","97.231",NULL};
-datafile_rows_t uom_length_row_33[] = {"9084","Indian yard","","Ind yd (Cla)","","9001","36.0","39.370142","1999-10-20 00:00:00","G. Bomford; \"The Re-adjustment of the Indian Triangulation\"; Survey of India Professional Paper 28; 1939.","EPSG","Indian Foot = 0.99999566 British feet (A.R.Clarke 1865).  British yard (= 3 British feet) taken to be J.S.Clark's 1865 value of 0.9144025 metres.","97.231",NULL};
-datafile_rows_t uom_length_row_34[] = {"9085","Indian yard (1937)","","Ind yd (37)","","9001","0.91439523","1.0","1999-10-20 00:00:00","G. Bomford; \"The Re-adjustment of the Indian Triangulation\"; Survey of India Professional Paper 28; 1939.","EPSG","Indian Foot = 0.99999566 British feet (A.R.Clarke 1865).  British foot taken to be 1895 Benoit value of 12/39.370113m.  Rounded to 8 decimal places as 0.30479841. Used from Bangladesh to Vietnam.  Previously used in India and Pakistan but  [...]
-datafile_rows_t uom_length_row_35[] = {"9086","Indian yard (1962)","","Ind yd (62)","","9001","0.9143988","1.0","1999-10-20 00:00:00","G. Bomford; \"Geodesy\"; 2nd edition 1962","EPSG","Indian Foot = 0.99999566 British feet (A.R.Clarke 1865).  British yard (3 feet) taken to be J.S. Clark's 1865 value of 0.9144025m. Rounded to 8 significant figures with a small error as 1 Ind ft=0.3048996m.  Used in Pakistan since metrication.","97.231",NULL};
-datafile_rows_t uom_length_row_36[] = {"9087","Indian yard (1975)","","Ind yd (75)","","9001","0.9143985","1.0","1999-10-20 00:00:00","G. Bomford; \"Geodesy\"; 3rd edition 1975","EPSG","Indian Foot = 0.99999566 British feet (A.R.Clarke 1865).  British yard (3 feet) taken to be J.S. Clark's 1865 value of 0.9144025m. Rounded to 8 significant figures as 1 Ind ft=0.3048995m.  Used in India since metrication.","97.231",NULL};
-
-datafile_rows_t *uom_length_rows[] = {uom_length_row_1,uom_length_row_2,uom_length_row_3,uom_length_row_4,uom_length_row_5,uom_length_row_6,uom_length_row_7,uom_length_row_8,uom_length_row_9,uom_length_row_10,uom_length_row_11,uom_length_row_12,uom_length_row_13,uom_length_row_14,uom_length_row_15,uom_length_row_16,uom_length_row_17,uom_length_row_18,uom_length_row_19,uom_length_row_20,uom_length_row_21,uom_length_row_22,uom_length_row_23,uom_length_row_24,uom_length_row_25,uom_length_ro [...]
diff --git a/src/tiff/csv/uom_length.csv b/src/tiff/csv/uom_length.csv
deleted file mode 100644
index c8c77dd..0000000
--- a/src/tiff/csv/uom_length.csv
+++ /dev/null
@@ -1,36 +0,0 @@
-"UOM_LENGTH_CODE","UNIT_OF_MEAS_EPSG_NAME","UNIT_OF_MEAS_USER_NAME","ABBREVIATION","DESCRIPTION","TARGET_UOM_LENGTH_CODE","FACTOR_B","FACTOR_C","REVISION_DATE","INFORMATION_SOURCE","DATA_SOURCE","REMARKS","CHANGE_ID"
-9001,metre,,m,,9001,1.0,1.0,1995-06-02 00:00:00,ISO 1000.,EPSG,Also known as International metre.,
-9002,foot,,ft,,9001,0.3048,1.0,1995-06-02 00:00:00,ISO; 1958,EPSG,,
-9003,US survey foot,,ft US,,9001,12.0,39.37,1995-06-02 00:00:00,,EPSG,Used in USA.,
-9005,Clarke's foot,,ft (Cla),,9001,0.304797265,1.0,1999-10-20 00:00:00,Australian Land Information Group  www.auslig.gov/au/geodesy/histry.htm,EPSG,"Assumes Clarke's 1865 ratio of 1 British foot = 0.304797265 French legal metres applies to the international metre.   Used in older Australian, southern African & British West Indian mapping.",97.234
-9014,fathom,,f,,9001,1.8288,1.0,1999-10-20 00:00:00,,EPSG,= 6 feet.,
-9030,nautical mile,,NM,,9001,1852.0,1.0,1996-10-18 00:00:00,,EPSG,,96.24
-9031,German legal metre,,GLM,,9001,1.0000135965,1.0,1997-06-16 00:00:00,Chief Directorate Surveys and Land Information; Mowbray; South Africa,EPSG,Used in Namibia.,
-9033,US survey chain,,ch US,,9001,792.0,39.37,1998-03-12 00:00:00,Bureau of Land Management technical bulletin 6 (1973) and Standard Field Tables 8th edition (1956).,EPSG,Used in USA primarily for public lands cadastral work.,
-9034,US survey link,,lk US,,9001,7.92,39.37,1998-03-12 00:00:00,Bureau of Land Management technical bulletin 6 (1973) and Standard Field Tables 8th edition (1956).,EPSG,Used in USA primarily for public lands cadastral work.,
-9035,US survey mile,,mile US,,9001,63360.0,39.37,1998-03-12 00:00:00,Bureau of Land Management technical bulletin 6 (1973) and Standard Field Tables 8th edition (1956).,EPSG,Used in USA primarily for public lands cadastral work.,
-9036,kilometre,,km,,9001,1000.0,1.0,1998-11-11 00:00:00,ISO 1000.,EPSG,,
-9037,Clarke's yard,,yd (Cla),,9001,0.914391795,1.0,1999-10-20 00:00:00,Australian Land Information Group  www.auslig.gov/au/geodesy/histry.htm,EPSG,"=3 Clarke's feet.  Assumes Clarke's 1865 ratio of 1 British foot = 0.304797265 French legal metres applies to the international metre.   Used in older Australian, southern African & British West Indian mapping.",97.233
-9038,Clarke's chain,,ch (Cla),,9001,20.11661949,1.0,1999-10-20 00:00:00,Australian Land Information Group  www.auslig.gov/au/geodesy/histry.htm,EPSG,"=22 Clarke's yards.  Assumes Clarke's 1865 ratio of 1 British foot = 0.304797265 French legal metres applies to the international metre.   Used in older Australian, southern African & British West Indian mapping.",97.233
-9039,Clarke's link,,lk (Cla),,9001,0.2011661949,1.0,1999-10-20 00:00:00,Australian Land Information Group  www.auslig.gov/au/geodesy/histry.htm,EPSG,"=1/100 Clarke's chain. Assumes Clarke's 1865 ratio of 1 British foot = 0.304797265 French legal metres applies to the international metre.   Used in older Australian, southern African & British West Indian mapping.",97.233
-9040,British yard (Sears 1922),,yd (Sears),,9001,36.0,39.370147,1999-10-20 00:00:00,"G. Bomford \"Geodesy\" 2nd edition 1962; after J.S.Clark \"Remeasurement of the Old Length Standards\"; Empire Survey Review no. 90; 1953.",EPSG,Uses Sear's 1922 British yard-metre ratio as given by Bomford as 39.370147 inches per metre.  Used in East Malaysian and older New Zealand mapping.,97.233
-9041,British foot (Sears 1922),,ft (Sears),,9001,12.0,39.370147,1999-10-20 00:00:00,"G. Bomford \"Geodesy\" 2nd edition 1962; after J.S.Clark \"Remeasurement of the Old Length Standards\"; Empire Survey Review no. 90; 1953.",EPSG,Uses Sear's 1922 British yard-metre ratio as given by Bomford as 39.370147 inches per metre.  Used in East Malaysian and older New Zealand mapping.,97.233
-9042,British chain (Sears 1922),,ch (Sears),,9001,792.0,39.370147,1999-10-20 00:00:00,"\"Geodesy\"; G. Bomford.",EPSG,Uses Sear's 1922 British yard-metre ratio as given by Bomford as 39.370147 inches per metre.  Used in East Malaysian and older New Zealand mapping.,97.233
-9043,British link (Sears 1922),,lk (Sears),,9001,7.92,39.370147,1999-10-20 00:00:00,"G. Bomford \"Geodesy\" 2nd edition 1962; after J.S.Clark \"Remeasurement of the Old Length Standards\"; Empire Survey Review no. 90; 1953.",EPSG,Uses Sear's 1922 British yard-metre ratio as given by Bomford as 39.370147 inches per metre.  Used in East Malaysian and older New Zealand mapping.,97.233
-9050,British yard (Benoit 1895 A),,yd (Ben A),,9001,0.9143992,1.0,1999-10-20 00:00:00,"J.S.Clark; \"Remeasurement of the Old Length Standards\"; Empire Survey Review no. 90; 1953.",EPSG,Uses Benoit's 1895 British yard-metre ratio as given by Clark as 0.9144992 metres per yard.  Used for deriving metric size of ellipsoid in Palestine.,97.233
-9051,British foot (Benoit 1895 A),,ft (Ben A),,9001,0.9143992,3.0,1999-10-20 00:00:00,"J.S.Clark; \"Remeasurement of the Old Length Standards\"; Empire Survey Review no. 90; 1953.",EPSG,Uses Benoit's 1895 British yard-metre ratio as given by Clark as 0.9144992 metres per yard.  Used for deriving metric size of ellipsoid in Palestine.,97.233
-9052,British chain (Benoit 1895 A),,ch (Ben A),,9001,20.1167824,1.0,1999-10-20 00:00:00,"J.S.Clark; \"Remeasurement of the Old Length Standards\"; Empire Survey Review no. 90; 1953.",EPSG,Uses Benoit's 1895 British yard-metre ratio as given by Clark as 0.9144992 metres per yard.  Used for deriving metric size of ellipsoid in Palestine.,97.233
-9053,British link (Benoit 1895 A),,lk (Ben A),,9001,0.201167824,1.0,1999-10-20 00:00:00,"J.S.Clark; \"Remeasurement of the Old Length Standards\"; Empire Survey Review no. 90; 1953.",EPSG,Uses Benoit's 1895 British yard-metre ratio as given by Clark as 0.9144992 metres per yard.  Used for deriving metric size of ellipsoid in Palestine.,97.233
-9060,British yard (Benoit 1895 B),,yd (Ben B),,9001,36.0,39.370113,1999-10-20 00:00:00,"G. Bomford \"Geodesy\" 2nd edition 1962; after J.S.Clark \"Remeasurement of the Old Length Standards\"; Empire Survey Review no. 90; 1953.",EPSG,Uses Benoit's 1895 British yard-metre ratio as given by Bomford as 39.370113 inches per metre.  Used in West Malaysian mapping.,97.233
-9061,British foot (Benoit 1895 B),,ft (Ben B),,9001,12.0,39.370113,1999-10-20 00:00:00,"G. Bomford \"Geodesy\" 2nd edition 1962; after J.S.Clark \"Remeasurement of the Old Length Standards\"; Empire Survey Review no. 90; 1953.",EPSG,Uses Benoit's 1895 British yard-metre ratio as given by Bomford as 39.370113 inches per metre.  Used in West Malaysian mapping.,97.233
-9062,British chain (Benoit 1895 B),,ch (Ben B),,9001,792.0,39.370113,1999-10-20 00:00:00,"G. Bomford \"Geodesy\" 2nd edition 1962; after J.S.Clark \"Remeasurement of the Old Length Standards\"; Empire Survey Review no. 90; 1953.",EPSG,Uses Benoit's 1895 British yard-metre ratio as given by Bomford as 39.370113 inches per metre.  Used in West Malaysian mapping.,97.233
-9063,British link (Benoit 1895 B),,lk (Ben B),,9001,7.92,39.370113,1999-10-20 00:00:00,"\"Geodesy\"; G. Bomford.",EPSG,Uses Benoit's 1895 British yard-metre ratio as given by Bomford as 39.370113 inches per metre.  Used in West Malaysian mapping.,97.233
-9070,British foot (1865),,ft (1865),,9001,0.9144025,3.0,1999-10-20 00:00:00,"J.S.Clark; \"Remeasurement of the Old Length Standards\"; Empire Survey Review no. 90; 1953.",EPSG,Uses Clark's estimate of 1853-1865 British foot-metre ratio of 0.9144025 metres per yard.  Used in 1962 and 1975 estimates of Indian foot.,97.233
-9080,Indian foot,,Ind ft (Cla),,9001,12.0,39.370142,1999-10-20 00:00:00,"G. Bomford; \"The Re-adjustment of the Indian Triangulation\"; Survey of India Professional Paper 28; 1939.",EPSG,Indian Foot = 0.99999566 British feet (A.R.Clarke 1865).  British yard (= 3 British feet) taken to be J.S.Clark's 1865 value of 0.9144025 metres.,97.231
-9081,Indian foot (1937),,Ind ft (37),,9001,0.30479841,1.0,1999-10-20 00:00:00,"G. Bomford; \"The Re-adjustment of the Indian Triangulation\"; Survey of India Professional Paper 28; 1939.",EPSG,Indian Foot = 0.99999566 British feet (A.R.Clarke 1865).  British foot taken to be 1895 Benoit value of 12/39.370113m.  Rounded to 8 decimal places as 0.30479841. Used from Bangladesh to Vietnam.  Previously used in India and Pakistan but superseded.,97.231
-9082,Indian foot (1962),,Ind ft (62),,9001,0.3047996,1.0,1999-10-20 00:00:00,"G. Bomford; \"Geodesy\"; 2nd edition 1962",EPSG,Indian Foot = 0.99999566 British feet (A.R.Clarke 1865).  British yard (3 feet) taken to be J.S. Clark's 1865 value of 0.9144025m. Rounded to 8 significant figures with a small error as 1 Ind ft=0.3048996m.  Used in Pakistan since metrication.,97.231
-9083,Indian foot (1975),,Ind ft (75),,9001,0.3047995,1.0,1999-10-20 00:00:00,"G. Bomford; \"Geodesy\"; 3rd edition 1975",EPSG,Indian Foot = 0.99999566 British feet (A.R.Clarke 1865).  British yard (3 feet) taken to be J.S. Clark's 1865 value of 0.9144025m. Rounded to 8 significant figures as 1 Ind ft=0.3048995m.  Used in India since metrication.,97.231
-9084,Indian yard,,Ind yd (Cla),,9001,36.0,39.370142,1999-10-20 00:00:00,"G. Bomford; \"The Re-adjustment of the Indian Triangulation\"; Survey of India Professional Paper 28; 1939.",EPSG,Indian Foot = 0.99999566 British feet (A.R.Clarke 1865).  British yard (= 3 British feet) taken to be J.S.Clark's 1865 value of 0.9144025 metres.,97.231
-9085,Indian yard (1937),,Ind yd (37),,9001,0.91439523,1.0,1999-10-20 00:00:00,"G. Bomford; \"The Re-adjustment of the Indian Triangulation\"; Survey of India Professional Paper 28; 1939.",EPSG,Indian Foot = 0.99999566 British feet (A.R.Clarke 1865).  British foot taken to be 1895 Benoit value of 12/39.370113m.  Rounded to 8 decimal places as 0.30479841. Used from Bangladesh to Vietnam.  Previously used in India and Pakistan but superseded.,97.231
-9086,Indian yard (1962),,Ind yd (62),,9001,0.9143988,1.0,1999-10-20 00:00:00,"G. Bomford; \"Geodesy\"; 2nd edition 1962",EPSG,Indian Foot = 0.99999566 British feet (A.R.Clarke 1865).  British yard (3 feet) taken to be J.S. Clark's 1865 value of 0.9144025m. Rounded to 8 significant figures with a small error as 1 Ind ft=0.3048996m.  Used in Pakistan since metrication.,97.231
-9087,Indian yard (1975),,Ind yd (75),,9001,0.9143985,1.0,1999-10-20 00:00:00,"G. Bomford; \"Geodesy\"; 3rd edition 1975",EPSG,Indian Foot = 0.99999566 British feet (A.R.Clarke 1865).  British yard (3 feet) taken to be J.S. Clark's 1865 value of 0.9144025m. Rounded to 8 significant figures as 1 Ind ft=0.3048995m.  Used in India since metrication.,97.231
diff --git a/src/tiff/csv/uom_sc_alias.c b/src/tiff/csv/uom_sc_alias.c
deleted file mode 100644
index e978f3f..0000000
--- a/src/tiff/csv/uom_sc_alias.c
+++ /dev/null
@@ -1,4 +0,0 @@
-#include "defs.h"
-datafile_rows_t uom_sc_alias_row_1[] = {"UOM_S_ALIAS_CODE","UOM_S_ALIAS_NAME","UOM_SCALE_CODE","REVISION_DATE","INFORMATION_SOURCE","DATA_SOURCE","REMARKS","CHANGE_ID",NULL};
-
-datafile_rows_t *uom_sc_alias_rows[] = {uom_sc_alias_row_1,NULL};
diff --git a/src/tiff/csv/uom_sc_alias.csv b/src/tiff/csv/uom_sc_alias.csv
deleted file mode 100644
index e896d13..0000000
--- a/src/tiff/csv/uom_sc_alias.csv
+++ /dev/null
@@ -1 +0,0 @@
-"UOM_S_ALIAS_CODE","UOM_S_ALIAS_NAME","UOM_SCALE_CODE","REVISION_DATE","INFORMATION_SOURCE","DATA_SOURCE","REMARKS","CHANGE_ID"
diff --git a/src/tiff/csv/uom_scale.c b/src/tiff/csv/uom_scale.c
deleted file mode 100644
index 57883dc..0000000
--- a/src/tiff/csv/uom_scale.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include "defs.h"
-datafile_rows_t uom_scale_row_1[] = {"UOM_SCALE_CODE","UNIT_OF_MEAS_EPSG_NAME","UNIT_OF_MEAS_USER_NAME","ABBREVIATION","DESCRIPTION","TARGET_UOM_SCALE_CODE","FACTOR_B","FACTOR_C","REVISION_DATE","INFORMATION_SOURCE","DATA_SOURCE","REMARKS","CHANGE_ID",NULL};
-datafile_rows_t uom_scale_row_2[] = {"9201","unity","","","","9201","1.0","1.0","1996-09-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t uom_scale_row_3[] = {"9202","parts per million","","ppm","","9201","1.0","1000000.0","1996-09-12 00:00:00","","EPSG","","",NULL};
-
-datafile_rows_t *uom_scale_rows[] = {uom_scale_row_1,uom_scale_row_2,uom_scale_row_3,NULL};
diff --git a/src/tiff/csv/uom_scale.csv b/src/tiff/csv/uom_scale.csv
deleted file mode 100644
index e7bf8e1..0000000
--- a/src/tiff/csv/uom_scale.csv
+++ /dev/null
@@ -1,3 +0,0 @@
-"UOM_SCALE_CODE","UNIT_OF_MEAS_EPSG_NAME","UNIT_OF_MEAS_USER_NAME","ABBREVIATION","DESCRIPTION","TARGET_UOM_SCALE_CODE","FACTOR_B","FACTOR_C","REVISION_DATE","INFORMATION_SOURCE","DATA_SOURCE","REMARKS","CHANGE_ID"
-9201,unity,,,,9201,1.0,1.0,1996-09-12 00:00:00,,EPSG,,
-9202,parts per million,,ppm,,9201,1.0,1000000.0,1996-09-12 00:00:00,,EPSG,,
diff --git a/src/tiff/csv/version_history.csv b/src/tiff/csv/version_history.csv
deleted file mode 100644
index efc06cd..0000000
--- a/src/tiff/csv/version_history.csv
+++ /dev/null
@@ -1,23 +0,0 @@
-"VERSION_DATE","VERSION_NUMBER","VERSION_REMARKS","SUPERCEDED_BY","SUPERCEDES"
-1999-11-19 00:00:00,4.4,Version 4.4 release.,5.0,4.3
-1999-07-26 00:00:00,4.3,Version 4.3 release.,4.4,4.2
-1998-11-25 00:00:00,4.2,Version 4.2 release.,4.3,4.1
-1998-09-29 00:00:00,4.1,Version 4.1 release.,4.2,4.0
-1998-03-24 00:00:00,4.0,Version 4.0 release.  Access v7.,4.1,3.2
-1997-08-28 00:00:00,3.2,Version 3.2 release.,4.0,3.1
-1997-04-11 00:00:00,3.1,Version 3.1 release.,3.2,3.0
-1996-12-12 00:00:00,3.0,Version 3.0 release.  Access v2.,3.1,2.1
-1996-06-02 00:00:00,2.1,Version 2.1 release.  Excel v4.,3.0,
-2000-06-29 00:00:00,4.5,Version 4.5 release.,5.1,4.4
-2000-06-29 00:00:00,5.0,Version 5.0 release.  Access97,5.01,4.4
-2000-12-31 00:00:00,5.1,Version 5.1 release.,5.2,5.01
-2001-06-11 00:00:00,5.2,Version 5.2 release.,5.21,5.1
-2001-09-03 00:00:00,6.02,v6.02 release to EPSG wg and ISO 1927 project team.,6.1,
-1994-06-01 00:00:00,1.0,Version 1.0 release.  Excel v2.,,
-2000-07-09 00:00:00,5.01,Version 5.01 release.,5.1,5.0
-2001-06-26 00:00:00,5.21,Version 5.21 release.,6.1,5.2
-2002-02-21 00:00:00,5.3,Version 5.3 release. Same data as v6.1.,6.1,5.21
-2002-02-25 00:00:00,6.1,Version 6.1 release. ISO 19111 compliant data model and terminology.,6.2,5.21  6.02
-2002-07-31 00:00:00,6.2,Version 6.2 release.,6.2.1,5.3  6.1
-2002-09-05 00:00:00,6.2.1,v6.2 data; purged redundant Visual Basic code behind forms.,6.2.2,6.2
-2002-09-16 00:00:00,6.2.2,v6.2 data; purged further redundant Visual Basic code behind forms.,,6.2.1
diff --git a/src/tiff/csv/vert_cs.c b/src/tiff/csv/vert_cs.c
deleted file mode 100644
index b323089..0000000
--- a/src/tiff/csv/vert_cs.c
+++ /dev/null
@@ -1,31 +0,0 @@
-#include "defs.h"
-datafile_rows_t vert_cs_row_1[] = {"VERTCS_CODE","VERTCS_EPSG_NAME","VERTCS_EPSG_ABBR","VERTCS_USER_NAME","DESCRIPTION","AREA_OF_USE","VERTCS_TYPE","VERTICAL_DATUM_CODE","VERTCS_AXIS_NAME","VERTCS_AXIS_ABBREV","VERTCS_AXIS_UOM_CODE","REVISION_DATE","INFORMATION_SOURCE","DATA_SOURCE","REMARKS","CHANGE_ID",NULL};
-datafile_rows_t vert_cs_row_2[] = {"5701","Newlyn","ODN","","","United Kingdom (UK) - Great Britain.","height system","5101","height","","9001","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t vert_cs_row_3[] = {"5702","National Geodetic Vertical Datum of 1929","NGVD29","","","United States (USA).","height system","5102","height","","9003","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t vert_cs_row_4[] = {"5703","North American Vertical Datum of 1988","NAVD88","","","Canada;  United States (USA).","height system","5103","height","","9001","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t vert_cs_row_5[] = {"5704","Yellow Sea","","","","China.","height system","5104","height","","9001","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t vert_cs_row_6[] = {"5705","Baltic","","","","Armenia;  Azerbaijan;  Belorus;  Estonia;  Georgia;  Kazakstan;  Kirgizstan;  Latvia;  Lithuania;  Moldavia;  Russia;  Tadzhikistan;  Turkmenistan;  Ukraine;  Uzbekistan.","height system","5105","height","","9001","1996-09-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t vert_cs_row_7[] = {"5706","Caspian","","","","Azerbaijan - offshore; Kazakhstan - offshore;  Russia - Caspian Sea;  Turkmenistan - offshore.","depth system","5106","depth","","9001","1996-09-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t vert_cs_row_8[] = {"5709","Noormal Amsterdams Piel","NAP","","","Netherlands.","height system","5109","height","","9001","1996-09-12 00:00:00","Nederlandse Commissie voor Geodesie publication 30; 1993","EPSG","","",NULL};
-datafile_rows_t vert_cs_row_9[] = {"5710","Oostende","","","","Belgium.","height system","5110","height","","9001","1996-09-12 00:00:00","Nederlandse Commissie voor Geodesie publication 30; 1993","EPSG","","",NULL};
-datafile_rows_t vert_cs_row_10[] = {"5711","Australian Height Datum","AHD","","","Australia (New South Wales; Northern Territories; Queensland; South Australia; Western Australia; Victoria).","height system","5111","height","","9001","1996-09-12 00:00:00","http://www.auslig.gov.au/geodesy","EPSG","","",NULL};
-datafile_rows_t vert_cs_row_11[] = {"5712","Australian Height Datum (Tasmania)","AHD (Tasmania)","","","Australia - Tasmania.","height system","5112","height","","9001","1996-09-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t vert_cs_row_12[] = {"5713","Canadian Vertical Datum of 1928","CVD28","","","Canada.","height system","5114","height","","9001","1996-12-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t vert_cs_row_13[] = {"5714","mean sea level height","msl height","","","","height system","5100","height","","9001","1996-04-12 00:00:00","","EPSG","Approximates geoid.  Not specific to any location or epoch.","",NULL};
-datafile_rows_t vert_cs_row_14[] = {"5715","mean sea level depth","msl depth","","","","depth system","5100","depth","","9001","1996-10-18 00:00:00","","EPSG","Approximates geoid.  Not specific to any location or epoch.","",NULL};
-datafile_rows_t vert_cs_row_15[] = {"5716","Piraeus","","","","Greece.","height system","5115","height","","9001","1997-06-16 00:00:00","Geodesy Department; Public Petroleum Corporation of Greece.","EPSG","","",NULL};
-datafile_rows_t vert_cs_row_16[] = {"5717","N60","","","","Finland.","height system","5116","height","","9001","1997-07-22 00:00:00","www.nls.fi/maa/papers/kkj.html","EPSG","In use since 1968.","",NULL};
-datafile_rows_t vert_cs_row_17[] = {"5718","RH70","","","","Sweden","height system","5117","height","","9001","1997-11-13 00:00:00","National and Survey of Sweden","EPSG","","",NULL};
-datafile_rows_t vert_cs_row_18[] = {"5719","NGF Lallemand","","","","France - mainland.","height system","5118","height","","9001","1997-11-13 00:00:00","Conseil National de l'Information Geographique groupe de travail \"Reseaux de Nivellement\" recommendations v5.1 April 1994","EPSG","Generally but not entirely superceded by NGF IGN69 (code 5720).","",NULL};
-datafile_rows_t vert_cs_row_19[] = {"5720","NGF IGN69","","","","France - mainland.","height system","5119","height","","9001","1997-11-13 00:00:00","Conseil National de l'Information Geographique groupe de travail \"Reseaux de Nivellement\" recommendations v5.1 April 1994","EPSG","","",NULL};
-datafile_rows_t vert_cs_row_20[] = {"5721","NGF IGN78","","","","France - Corsica.","height system","5120","height","","9001","1997-11-13 00:00:00","Conseil National de l'Information Geographique groupe de travail \"Reseaux de Nivellement\" recommendations v5.1 April 1994","EPSG","","",NULL};
-datafile_rows_t vert_cs_row_21[] = {"5722","Maputo","","","","Mozambique.","height system","5121","height","","9001","1998-04-16 00:00:00","Direc��o Nacional de Geografia e Cadastral (DINAGECA).","EPSG","","",NULL};
-datafile_rows_t vert_cs_row_22[] = {"5723","Japanese Standard Levelling Datum","Japan Levelling Datum","","","Japan","height system","5122","height","","9001","1999-04-22 00:00:00","Ministry of Construction; Japan.  http://vldb.gsi-mc.go.jp/sokuchi/datum/image/heichoku2.gif","EPSG","","",NULL};
-datafile_rows_t vert_cs_row_23[] = {"5724","PDO Height Datum 1993","PHD93","","","Oman","height system","5123","height","","9001","1999-04-22 00:00:00","Petroleum Development Oman","EPSG","Supersedes Fahud vertical datum (code 5725) from 1993.","",NULL};
-datafile_rows_t vert_cs_row_24[] = {"5725","Fahud Height Datum 1993","","","","Oman","height system","5124","height","","9001","1999-04-22 00:00:00","Petroleum Development Oman","EPSG","Superseded by PHD93 (code 5724)  from 1993.","",NULL};
-datafile_rows_t vert_cs_row_25[] = {"5726","Ha Tien 1960","","","","Cambodia; Vietnam","height system","5125","height","","9001","1999-10-20 00:00:00","","EPSG","In Vietnam superseded by Hon Dau from 1992.","",NULL};
-datafile_rows_t vert_cs_row_26[] = {"5727","Hon Dau 1992","","","","Vietnam","height system","5126","height","","9001","1999-10-20 00:00:00","","EPSG","In Vietnam supersedes Ha Tien from 1992.","",NULL};
-datafile_rows_t vert_cs_row_27[] = {"5728","Landesnivellement 1902","LN02","","","Liechtenstein;  Switzerland.","height system","5127","height","","9001","1999-10-20 00:00:00","Bundesamt f�r Landestopographie","EPSG","To be superseded by LHN95 (code 5729).","",NULL};
-datafile_rows_t vert_cs_row_28[] = {"5729","Landeshohennetz 1995","LHN95","","","Liechtenstein;  Switzerland.","height system","5128","height","","9001","1999-10-20 00:00:00","Bundesamt f�r Landestopographie","EPSG","To supersede LN02 (code 5728).","",NULL};
-
-datafile_rows_t *vert_cs_rows[] = {vert_cs_row_1,vert_cs_row_2,vert_cs_row_3,vert_cs_row_4,vert_cs_row_5,vert_cs_row_6,vert_cs_row_7,vert_cs_row_8,vert_cs_row_9,vert_cs_row_10,vert_cs_row_11,vert_cs_row_12,vert_cs_row_13,vert_cs_row_14,vert_cs_row_15,vert_cs_row_16,vert_cs_row_17,vert_cs_row_18,vert_cs_row_19,vert_cs_row_20,vert_cs_row_21,vert_cs_row_22,vert_cs_row_23,vert_cs_row_24,vert_cs_row_25,vert_cs_row_26,vert_cs_row_27,vert_cs_row_28,NULL};
diff --git a/src/tiff/csv/vert_cs.csv b/src/tiff/csv/vert_cs.csv
deleted file mode 100644
index edc345f..0000000
--- a/src/tiff/csv/vert_cs.csv
+++ /dev/null
@@ -1,28 +0,0 @@
-"VERTCS_CODE","VERTCS_EPSG_NAME","VERTCS_EPSG_ABBR","VERTCS_USER_NAME","DESCRIPTION","AREA_OF_USE","VERTCS_TYPE","VERTICAL_DATUM_CODE","VERTCS_AXIS_NAME","VERTCS_AXIS_ABBREV","VERTCS_AXIS_UOM_CODE","REVISION_DATE","INFORMATION_SOURCE","DATA_SOURCE","REMARKS","CHANGE_ID"
-5701,Newlyn,ODN,,,United Kingdom (UK) - Great Britain.,height system,5101,height,,9001,1995-06-02 00:00:00,,EPSG,,
-5702,National Geodetic Vertical Datum of 1929,NGVD29,,,United States (USA).,height system,5102,height,,9003,1996-10-18 00:00:00,,EPSG,,
-5703,North American Vertical Datum of 1988,NAVD88,,,Canada;  United States (USA).,height system,5103,height,,9001,1996-10-18 00:00:00,,EPSG,,
-5704,Yellow Sea,,,,China.,height system,5104,height,,9001,1995-06-02 00:00:00,,EPSG,,
-5705,Baltic,,,,Armenia;  Azerbaijan;  Belorus;  Estonia;  Georgia;  Kazakstan;  Kirgizstan;  Latvia;  Lithuania;  Moldavia;  Russia;  Tadzhikistan;  Turkmenistan;  Ukraine;  Uzbekistan.,height system,5105,height,,9001,1996-09-12 00:00:00,,EPSG,,
-5706,Caspian,,,,Azerbaijan - offshore; Kazakhstan - offshore;  Russia - Caspian Sea;  Turkmenistan - offshore.,depth system,5106,depth,,9001,1996-09-12 00:00:00,,EPSG,,
-5709,Noormal Amsterdams Piel,NAP,,,Netherlands.,height system,5109,height,,9001,1996-09-12 00:00:00,Nederlandse Commissie voor Geodesie publication 30; 1993,EPSG,,
-5710,Oostende,,,,Belgium.,height system,5110,height,,9001,1996-09-12 00:00:00,Nederlandse Commissie voor Geodesie publication 30; 1993,EPSG,,
-5711,Australian Height Datum,AHD,,,Australia (New South Wales; Northern Territories; Queensland; South Australia; Western Australia; Victoria).,height system,5111,height,,9001,1996-09-12 00:00:00,http://www.auslig.gov.au/geodesy,EPSG,,
-5712,Australian Height Datum (Tasmania),AHD (Tasmania),,,Australia - Tasmania.,height system,5112,height,,9001,1996-09-12 00:00:00,,EPSG,,
-5713,Canadian Vertical Datum of 1928,CVD28,,,Canada.,height system,5114,height,,9001,1996-12-12 00:00:00,,EPSG,,
-5714,mean sea level height,msl height,,,,height system,5100,height,,9001,1996-04-12 00:00:00,,EPSG,Approximates geoid.  Not specific to any location or epoch.,
-5715,mean sea level depth,msl depth,,,,depth system,5100,depth,,9001,1996-10-18 00:00:00,,EPSG,Approximates geoid.  Not specific to any location or epoch.,
-5716,Piraeus,,,,Greece.,height system,5115,height,,9001,1997-06-16 00:00:00,Geodesy Department; Public Petroleum Corporation of Greece.,EPSG,,
-5717,N60,,,,Finland.,height system,5116,height,,9001,1997-07-22 00:00:00,www.nls.fi/maa/papers/kkj.html,EPSG,In use since 1968.,
-5718,RH70,,,,Sweden,height system,5117,height,,9001,1997-11-13 00:00:00,National and Survey of Sweden,EPSG,,
-5719,NGF Lallemand,,,,France - mainland.,height system,5118,height,,9001,1997-11-13 00:00:00,"Conseil National de l'Information Geographique groupe de travail \"Reseaux de Nivellement\" recommendations v5.1 April 1994",EPSG,Generally but not entirely superceded by NGF IGN69 (code 5720).,
-5720,NGF IGN69,,,,France - mainland.,height system,5119,height,,9001,1997-11-13 00:00:00,"Conseil National de l'Information Geographique groupe de travail \"Reseaux de Nivellement\" recommendations v5.1 April 1994",EPSG,,
-5721,NGF IGN78,,,,France - Corsica.,height system,5120,height,,9001,1997-11-13 00:00:00,"Conseil National de l'Information Geographique groupe de travail \"Reseaux de Nivellement\" recommendations v5.1 April 1994",EPSG,,
-5722,Maputo,,,,Mozambique.,height system,5121,height,,9001,1998-04-16 00:00:00,Direc��o Nacional de Geografia e Cadastral (DINAGECA).,EPSG,,
-5723,Japanese Standard Levelling Datum,Japan Levelling Datum,,,Japan,height system,5122,height,,9001,1999-04-22 00:00:00,Ministry of Construction; Japan.  http://vldb.gsi-mc.go.jp/sokuchi/datum/image/heichoku2.gif,EPSG,,
-5724,PDO Height Datum 1993,PHD93,,,Oman,height system,5123,height,,9001,1999-04-22 00:00:00,Petroleum Development Oman,EPSG,Supersedes Fahud vertical datum (code 5725) from 1993.,
-5725,Fahud Height Datum 1993,,,,Oman,height system,5124,height,,9001,1999-04-22 00:00:00,Petroleum Development Oman,EPSG,Superseded by PHD93 (code 5724)  from 1993.,
-5726,Ha Tien 1960,,,,Cambodia; Vietnam,height system,5125,height,,9001,1999-10-20 00:00:00,,EPSG,In Vietnam superseded by Hon Dau from 1992.,
-5727,Hon Dau 1992,,,,Vietnam,height system,5126,height,,9001,1999-10-20 00:00:00,,EPSG,In Vietnam supersedes Ha Tien from 1992.,
-5728,Landesnivellement 1902,LN02,,,Liechtenstein;  Switzerland.,height system,5127,height,,9001,1999-10-20 00:00:00,Bundesamt f�r Landestopographie,EPSG,To be superseded by LHN95 (code 5729).,
-5729,Landeshohennetz 1995,LHN95,,,Liechtenstein;  Switzerland.,height system,5128,height,,9001,1999-10-20 00:00:00,Bundesamt f�r Landestopographie,EPSG,To supersede LN02 (code 5728).,
diff --git a/src/tiff/csv/vert_datum.c b/src/tiff/csv/vert_datum.c
deleted file mode 100644
index 29f3761..0000000
--- a/src/tiff/csv/vert_datum.c
+++ /dev/null
@@ -1,32 +0,0 @@
-#include "defs.h"
-datafile_rows_t vert_datum_row_1[] = {"VERTICAL_DATUM_CODE","VERT_DAT_EPSG_NAME","VERT_DAT_EPSG_ABBREV","VERT_DAT_USER_NAME","DESCRIPTION","VERT_DAT_TYPE","REVISION_DATE","INFORMATION_SOURCE","DATA_SOURCE","REMARKS","CHANGE_ID",NULL};
-datafile_rows_t vert_datum_row_2[] = {"5100","Mean Sea Level","msl","","","geoidal","1996-04-12 00:00:00","","EPSG","msl has geographic and temporal components.  Users are advised to not use this generic vertical datum but to define specific instances of msl based on knowledge of these components; for instance \"msl at xxx during 19yy\".","",NULL};
-datafile_rows_t vert_datum_row_3[] = {"5101","Ordnance Datum Newlyn","ODN","","","geoidal","1996-10-18 00:00:00","","EPSG","","",NULL};
-datafile_rows_t vert_datum_row_4[] = {"5102","National Geodetic Vertical Datum 1929","NGVD29","","","geoidal","1996-09-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t vert_datum_row_5[] = {"5103","North American Vertical Datum 1988","NAVD88","","","geoidal","1996-09-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t vert_datum_row_6[] = {"5104","Yellow Sea 1956","Yellow Sea","","","geoidal","1995-06-02 00:00:00","","EPSG","","",NULL};
-datafile_rows_t vert_datum_row_7[] = {"5105","Baltic Sea","Baltic","","","geoidal","1996-09-12 00:00:00","","EPSG","Average water level at Kronshtadt","",NULL};
-datafile_rows_t vert_datum_row_8[] = {"5106","Caspian Sea","Caspian","","","geoidal","1996-09-12 00:00:00","","EPSG","Defined as -28.0m Baltic datum","",NULL};
-datafile_rows_t vert_datum_row_9[] = {"5107","Nivellement general de la France","NGF","","","geoidal","1996-04-12 00:00:00","","EPSG","Mean sea level at Marseille","",NULL};
-datafile_rows_t vert_datum_row_10[] = {"5109","Normaal Amsterdams Peil","NAP","","","geoidal","1996-09-12 00:00:00","Nederlandse Commissie voor Geodesie publication 30; 1993","EPSG","","",NULL};
-datafile_rows_t vert_datum_row_11[] = {"5110","Oostende","","","","geoidal","1996-09-12 00:00:00","Nederlandse Commissie voor Geodesie publication 30; 1993","EPSG","Mean low water during 1958","",NULL};
-datafile_rows_t vert_datum_row_12[] = {"5111","Australian Height Datum","AHD","","","geoidal","1996-09-12 00:00:00","http://www.auslig.gov.au/geodesy","EPSG","MSL 1966-68 at 30 gauges around coast.","",NULL};
-datafile_rows_t vert_datum_row_13[] = {"5112","Australian Height Datum (Tasmania)","AHD (Tasmania)","","","geoidal","1996-09-12 00:00:00","","EPSG","MSL 1972 at Hobart and Burnie.","",NULL};
-datafile_rows_t vert_datum_row_14[] = {"5113","Sea Level","","","","geoidal","1996-09-12 00:00:00","","EPSG","An unspecified local vertical datum not recommended for use.","",NULL};
-datafile_rows_t vert_datum_row_15[] = {"5114","Canadian Vertical Datum of 1928","CVD28","","","geoidal","1996-12-12 00:00:00","","EPSG","","",NULL};
-datafile_rows_t vert_datum_row_16[] = {"5115","Piraeus Harbour 1986","Piraeus86","","","geoidal","1997-06-16 00:00:00","Geodesy Department; Public Pertoleum Corporation of Greece","EPSG","MSL determined during 1986.","",NULL};
-datafile_rows_t vert_datum_row_17[] = {"5116","Helsinki 1960","N60","","","geoidal","1997-07-22 00:00:00","www.nls.fi/maa/papers/kkj.html","EPSG","MSL at Helsinki during 1960.","",NULL};
-datafile_rows_t vert_datum_row_18[] = {"5117","Rikets hoghtsystem 1970","RH70","","","geoidal","1997-11-13 00:00:00","National Land Survey of Sweden","EPSG","","",NULL};
-datafile_rows_t vert_datum_row_19[] = {"5118","Nivellement general de la France - Lalle","NGF - Lallemand","","","geoidal","1997-11-13 00:00:00","Conseil National de l'Information Geographique groupe de travail \"Reseaux de Nivellement\" recommendations v5.1 April 1994","EPSG","Mean sea level at Marseille.","",NULL};
-datafile_rows_t vert_datum_row_20[] = {"5119","Nivellement general de la France - IGN69","NGF - IGN69","","","geoidal","1997-11-13 00:00:00","Conseil National de l'Information Geographique groupe de travail \"Reseaux de Nivellement\" recommendations v5.1 April 1994","EPSG","Mean sea level at Marseille.","",NULL};
-datafile_rows_t vert_datum_row_21[] = {"5120","Nivellement general de la France - IGN78","NGF - IGN78","","","geoidal","1997-11-13 00:00:00","Conseil National de l'Information Geographique groupe de travail \"Reseaux de Nivellement\" recommendations v5.1 April 1994","EPSG","","",NULL};
-datafile_rows_t vert_datum_row_22[] = {"5121","Maputo","","","","geoidal","1998-04-16 00:00:00","Direc��o Nacional de Geografia e Cadastral (DINAGECA).","EPSG","Mean sea level at Maputo.","",NULL};
-datafile_rows_t vert_datum_row_23[] = {"5122","Japanese Standard Levelling Datum 1949","JapanVD","","","geoidal","1999-04-22 00:00:00","Ministry of Construction; Japan.  http://vldb.gsi-mc.go.jp/sokuchi/datum/tokyodatum.html","EPSG","24.4140 metres above mean sea level Tokyo Bay.","",NULL};
-datafile_rows_t vert_datum_row_24[] = {"5123","PDO Height Datum 1993","PHD93","","","geoidal","1999-04-22 00:00:00","Petroleum Development Oman","EPSG","Misclosure between Muscat and Salalah less than .5 meters with differences from of up to 5 meters from old Fahud Datum.  The PHD93 adjustment was initially known as the Spine.  Supercedes Fahud Vertical Datum (Code 5124) from 1993.","",NULL};
-datafile_rows_t vert_datum_row_25[] = {"5124","Fahud Height Datum","","","","geoidal","1999-04-22 00:00:00","Petroleum Development Oman","EPSG","Superceded by PHD93 Datum (Code 5123) in 1993.  Based on reciprocal trigonometric heighting based on single MSL determination at Mina Al Fahal.","",NULL};
-datafile_rows_t vert_datum_row_26[] = {"5125","Ha Tien 1960","","","","geoidal","1999-10-20 00:00:00","","EPSG","In Vietnam replaced by Hon Dau in 1992.","",NULL};
-datafile_rows_t vert_datum_row_27[] = {"5126","Hon Dau 1992","","","","geoidal","1999-10-20 00:00:00","","EPSG","Supersedes Ha Tien in Vietnam.","",NULL};
-datafile_rows_t vert_datum_row_28[] = {"5127","Landesnivellement 1902","LN02","","","geoidal","1999-10-20 00:00:00","Bundesamt f�r Landestopographie","EPSG","Origin at Repere Pierre du Niton (RPN) 373.6 metres above msl derived at Marseille.","",NULL};
-datafile_rows_t vert_datum_row_29[] = {"5128","Landeshohennetz 1995","LHN95","","","geoidal","1999-10-20 00:00:00","Bundesamt f�r Landestopographie","EPSG","Origin at Repere Pierre du Niton (RPN) 373.6 metres above msl derived at Marseille.","",NULL};
-
-datafile_rows_t *vert_datum_rows[] = {vert_datum_row_1,vert_datum_row_2,vert_datum_row_3,vert_datum_row_4,vert_datum_row_5,vert_datum_row_6,vert_datum_row_7,vert_datum_row_8,vert_datum_row_9,vert_datum_row_10,vert_datum_row_11,vert_datum_row_12,vert_datum_row_13,vert_datum_row_14,vert_datum_row_15,vert_datum_row_16,vert_datum_row_17,vert_datum_row_18,vert_datum_row_19,vert_datum_row_20,vert_datum_row_21,vert_datum_row_22,vert_datum_row_23,vert_datum_row_24,vert_datum_row_25,vert_datum_ro [...]
diff --git a/src/tiff/csv/vert_datum.csv b/src/tiff/csv/vert_datum.csv
deleted file mode 100644
index 5cec1f9..0000000
--- a/src/tiff/csv/vert_datum.csv
+++ /dev/null
@@ -1,29 +0,0 @@
-"VERTICAL_DATUM_CODE","VERT_DAT_EPSG_NAME","VERT_DAT_EPSG_ABBREV","VERT_DAT_USER_NAME","DESCRIPTION","VERT_DAT_TYPE","REVISION_DATE","INFORMATION_SOURCE","DATA_SOURCE","REMARKS","CHANGE_ID"
-5100,Mean Sea Level,msl,,,geoidal,1996-04-12 00:00:00,,EPSG,"msl has geographic and temporal components.  Users are advised to not use this generic vertical datum but to define specific instances of msl based on knowledge of these components; for instance \"msl at xxx during 19yy\".",
-5101,Ordnance Datum Newlyn,ODN,,,geoidal,1996-10-18 00:00:00,,EPSG,,
-5102,National Geodetic Vertical Datum 1929,NGVD29,,,geoidal,1996-09-12 00:00:00,,EPSG,,
-5103,North American Vertical Datum 1988,NAVD88,,,geoidal,1996-09-12 00:00:00,,EPSG,,
-5104,Yellow Sea 1956,Yellow Sea,,,geoidal,1995-06-02 00:00:00,,EPSG,,
-5105,Baltic Sea,Baltic,,,geoidal,1996-09-12 00:00:00,,EPSG,Average water level at Kronshtadt,
-5106,Caspian Sea,Caspian,,,geoidal,1996-09-12 00:00:00,,EPSG,Defined as -28.0m Baltic datum,
-5107,Nivellement general de la France,NGF,,,geoidal,1996-04-12 00:00:00,,EPSG,Mean sea level at Marseille,
-5109,Normaal Amsterdams Peil,NAP,,,geoidal,1996-09-12 00:00:00,Nederlandse Commissie voor Geodesie publication 30; 1993,EPSG,,
-5110,Oostende,,,,geoidal,1996-09-12 00:00:00,Nederlandse Commissie voor Geodesie publication 30; 1993,EPSG,Mean low water during 1958,
-5111,Australian Height Datum,AHD,,,geoidal,1996-09-12 00:00:00,http://www.auslig.gov.au/geodesy,EPSG,MSL 1966-68 at 30 gauges around coast.,
-5112,Australian Height Datum (Tasmania),AHD (Tasmania),,,geoidal,1996-09-12 00:00:00,,EPSG,MSL 1972 at Hobart and Burnie.,
-5113,Sea Level,,,,geoidal,1996-09-12 00:00:00,,EPSG,An unspecified local vertical datum not recommended for use.,
-5114,Canadian Vertical Datum of 1928,CVD28,,,geoidal,1996-12-12 00:00:00,,EPSG,,
-5115,Piraeus Harbour 1986,Piraeus86,,,geoidal,1997-06-16 00:00:00,Geodesy Department; Public Pertoleum Corporation of Greece,EPSG,MSL determined during 1986.,
-5116,Helsinki 1960,N60,,,geoidal,1997-07-22 00:00:00,www.nls.fi/maa/papers/kkj.html,EPSG,MSL at Helsinki during 1960.,
-5117,Rikets hoghtsystem 1970,RH70,,,geoidal,1997-11-13 00:00:00,National Land Survey of Sweden,EPSG,,
-5118,Nivellement general de la France - Lalle,NGF - Lallemand,,,geoidal,1997-11-13 00:00:00,"Conseil National de l'Information Geographique groupe de travail \"Reseaux de Nivellement\" recommendations v5.1 April 1994",EPSG,Mean sea level at Marseille.,
-5119,Nivellement general de la France - IGN69,NGF - IGN69,,,geoidal,1997-11-13 00:00:00,"Conseil National de l'Information Geographique groupe de travail \"Reseaux de Nivellement\" recommendations v5.1 April 1994",EPSG,Mean sea level at Marseille.,
-5120,Nivellement general de la France - IGN78,NGF - IGN78,,,geoidal,1997-11-13 00:00:00,"Conseil National de l'Information Geographique groupe de travail \"Reseaux de Nivellement\" recommendations v5.1 April 1994",EPSG,,
-5121,Maputo,,,,geoidal,1998-04-16 00:00:00,Direc��o Nacional de Geografia e Cadastral (DINAGECA).,EPSG,Mean sea level at Maputo.,
-5122,Japanese Standard Levelling Datum 1949,JapanVD,,,geoidal,1999-04-22 00:00:00,Ministry of Construction; Japan.  http://vldb.gsi-mc.go.jp/sokuchi/datum/tokyodatum.html,EPSG,24.4140 metres above mean sea level Tokyo Bay.,
-5123,PDO Height Datum 1993,PHD93,,,geoidal,1999-04-22 00:00:00,Petroleum Development Oman,EPSG,Misclosure between Muscat and Salalah less than .5 meters with differences from of up to 5 meters from old Fahud Datum.  The PHD93 adjustment was initially known as the Spine.  Supercedes Fahud Vertical Datum (Code 5124) from 1993.,
-5124,Fahud Height Datum,,,,geoidal,1999-04-22 00:00:00,Petroleum Development Oman,EPSG,Superceded by PHD93 Datum (Code 5123) in 1993.  Based on reciprocal trigonometric heighting based on single MSL determination at Mina Al Fahal.,
-5125,Ha Tien 1960,,,,geoidal,1999-10-20 00:00:00,,EPSG,In Vietnam replaced by Hon Dau in 1992.,
-5126,Hon Dau 1992,,,,geoidal,1999-10-20 00:00:00,,EPSG,Supersedes Ha Tien in Vietnam.,
-5127,Landesnivellement 1902,LN02,,,geoidal,1999-10-20 00:00:00,Bundesamt f�r Landestopographie,EPSG,Origin at Repere Pierre du Niton (RPN) 373.6 metres above msl derived at Marseille.,
-5128,Landeshohennetz 1995,LHN95,,,geoidal,1999-10-20 00:00:00,Bundesamt f�r Landestopographie,EPSG,Origin at Repere Pierre du Niton (RPN) 373.6 metres above msl derived at Marseille.,
diff --git a/src/tiff/csv/vert_offset.c b/src/tiff/csv/vert_offset.c
deleted file mode 100644
index 57f097f..0000000
--- a/src/tiff/csv/vert_offset.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#include "defs.h"
-datafile_rows_t vert_offset_row_1[] = {"OFFSET_CODE","INITIAL_VERTCS_CODE","TERMINAL_VERTCS_CODE","COORD_TRF_METHOD_CODE","OFFSET_VALUE","OFFSET_UOM_CODE","AREA_OF_USE","DESCRIPTION","REVISION_DATE","INFORMATION_SOURCE","DATA_SOURCE","REMARKS","CHANGE_ID",NULL};
-datafile_rows_t vert_offset_row_2[] = {"5400","5705","5706","9616","28.0","9001","Azerbaijan; Kazakstan; Russia; Turkmenistan - Caspian Sea","","1999-11-12 00:00:00","","EPSG","","97.61  99.79",NULL};
-
-datafile_rows_t *vert_offset_rows[] = {vert_offset_row_1,vert_offset_row_2,NULL};
diff --git a/src/tiff/csv/vert_offset.csv b/src/tiff/csv/vert_offset.csv
deleted file mode 100644
index a6a11e6..0000000
--- a/src/tiff/csv/vert_offset.csv
+++ /dev/null
@@ -1,2 +0,0 @@
-"OFFSET_CODE","INITIAL_VERTCS_CODE","TERMINAL_VERTCS_CODE","COORD_TRF_METHOD_CODE","OFFSET_VALUE","OFFSET_UOM_CODE","AREA_OF_USE","DESCRIPTION","REVISION_DATE","INFORMATION_SOURCE","DATA_SOURCE","REMARKS","CHANGE_ID"
-5400,5705,5706,9616,28.0,9001,Azerbaijan; Kazakstan; Russia; Turkmenistan - Caspian Sea,,1999-11-12 00:00:00,,EPSG,,97.61  99.79
diff --git a/src/tiff/epsg_datum.inc b/src/tiff/epsg_datum.inc
deleted file mode 100644
index 198e78f..0000000
--- a/src/tiff/epsg_datum.inc
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- *  EPSG/POSC Datum database -- GeoTIFF Rev. 0.2
- */
- 
-/* C database for Geotiff include files.   */
-/* the macro ValuePair() must be defined   */
-/* by the enclosing include file           */
-
-#ifdef INCLUDE_OLD_CODES
-#include old_datum.inc
-#endif /* OLD Codes */
-
-/* New datums */
-ValuePair(Datum_Dealul_Piscului_1970,6317)
-
-/* Datums for which only the ellipsoid is known */
-ValuePair(DatumE_Airy1830,	6001)
-ValuePair(DatumE_AiryModified1849,	6002)
-ValuePair(DatumE_AustralianNationalSpheroid,	6003)
-ValuePair(DatumE_Bessel1841,	6004)
-ValuePair(DatumE_BesselModified,	6005)
-ValuePair(DatumE_BesselNamibia,	6006)
-ValuePair(DatumE_Clarke1858,	6007)
-ValuePair(DatumE_Clarke1866,	6008)
-ValuePair(DatumE_Clarke1866Michigan,	6009)
-ValuePair(DatumE_Clarke1880_Benoit,	6010)
-ValuePair(DatumE_Clarke1880_IGN,	6011)
-ValuePair(DatumE_Clarke1880_RGS,	6012)
-ValuePair(DatumE_Clarke1880_Arc,	6013)
-ValuePair(DatumE_Clarke1880_SGA1922,	6014)
-ValuePair(DatumE_Everest1830_1937Adjustment,	6015)
-ValuePair(DatumE_Everest1830_1967Definition,	6016)
-ValuePair(DatumE_Everest1830_1975Definition,	6017)
-ValuePair(DatumE_Everest1830Modified,	6018)
-ValuePair(DatumE_GRS1980,	6019)
-ValuePair(DatumE_Helmert1906,	6020)
-ValuePair(DatumE_IndonesianNationalSpheroid,	6021)
-ValuePair(DatumE_International1924,	6022)
-ValuePair(DatumE_International1967,	6023)
-ValuePair(DatumE_Krassowsky1960,	6024)
-ValuePair(DatumE_NWL9D,	6025)
-ValuePair(DatumE_NWL10D,	6026)
-ValuePair(DatumE_Plessis1817,	6027)
-ValuePair(DatumE_Struve1860,	6028)
-ValuePair(DatumE_WarOffice,	6029)
-ValuePair(DatumE_WGS84,	6030)
-ValuePair(DatumE_GEM10C,	6031)
-ValuePair(DatumE_OSU86F,	6032)
-ValuePair(DatumE_OSU91A,	6033)
-ValuePair(DatumE_Clarke1880,	6034)
-ValuePair(DatumE_Sphere,	6035)
-
-/* standard datums */
-ValuePair(Datum_Adindan,	6201)
-ValuePair(Datum_Australian_Geodetic_Datum_1966,	6202)
-ValuePair(Datum_Australian_Geodetic_Datum_1984,	6203)
-ValuePair(Datum_Ain_el_Abd_1970,	6204)
-ValuePair(Datum_Afgooye,	6205)
-ValuePair(Datum_Agadez,	6206)
-ValuePair(Datum_Lisbon,	6207)
-ValuePair(Datum_Aratu,	6208)
-ValuePair(Datum_Arc_1950,	6209)
-ValuePair(Datum_Arc_1960,	6210)
-ValuePair(Datum_Batavia,	6211)
-ValuePair(Datum_Barbados,	6212)
-ValuePair(Datum_Beduaram,	6213)
-ValuePair(Datum_Beijing_1954,	6214)
-ValuePair(Datum_Reseau_National_Belge_1950,	6215)
-ValuePair(Datum_Bermuda_1957,	6216)
-ValuePair(Datum_Bern_1898,	6217)
-ValuePair(Datum_Bogota,	6218)
-ValuePair(Datum_Bukit_Rimpah,	6219)
-ValuePair(Datum_Camacupa,	6220)
-ValuePair(Datum_Campo_Inchauspe,	6221)
-ValuePair(Datum_Cape,	6222)
-ValuePair(Datum_Carthage,	6223)
-ValuePair(Datum_Chua,	6224)
-ValuePair(Datum_Corrego_Alegre,	6225)
-ValuePair(Datum_Cote_d_Ivoire,	6226)
-ValuePair(Datum_Deir_ez_Zor,	6227)
-ValuePair(Datum_Douala,	6228)
-ValuePair(Datum_Egypt_1907,	6229)
-ValuePair(Datum_European_Datum_1950,	6230)
-ValuePair(Datum_European_Datum_1987,	6231)
-ValuePair(Datum_Fahud,	6232)
-ValuePair(Datum_Gandajika_1970,	6233)
-ValuePair(Datum_Garoua,	6234)
-ValuePair(Datum_Guyane_Francaise,	6235)
-ValuePair(Datum_Hu_Tzu_Shan,	6236)
-ValuePair(Datum_Hungarian_Datum_1972,	6237)
-ValuePair(Datum_Indonesian_Datum_1974,	6238)
-ValuePair(Datum_Indian_1954,	6239)
-ValuePair(Datum_Indian_1975,	6240)
-ValuePair(Datum_Jamaica_1875,	6241)
-ValuePair(Datum_Jamaica_1969,	6242)
-ValuePair(Datum_Kalianpur,	6243)
-ValuePair(Datum_Kandawala,	6244)
-ValuePair(Datum_Kertau,	6245)
-ValuePair(Datum_Kuwait_Oil_Company,	6246)
-ValuePair(Datum_La_Canoa,	6247)
-ValuePair(Datum_Provisional_S_American_Datum_1956,	6248)
-ValuePair(Datum_Lake,	6249)
-ValuePair(Datum_Leigon,	6250)
-ValuePair(Datum_Liberia_1964,	6251)
-ValuePair(Datum_Lome,	6252)
-ValuePair(Datum_Luzon_1911,	6253)
-ValuePair(Datum_Hito_XVIII_1963,	6254)
-ValuePair(Datum_Herat_North,	6255)
-ValuePair(Datum_Mahe_1971,	6256)
-ValuePair(Datum_Makassar,	6257)
-ValuePair(Datum_European_Reference_System_1989,	6258)
-ValuePair(Datum_Malongo_1987,	6259)
-ValuePair(Datum_Manoca,	6260)
-ValuePair(Datum_Merchich,	6261)
-ValuePair(Datum_Massawa,	6262)
-ValuePair(Datum_Minna,	6263)
-ValuePair(Datum_Mhast,	6264)
-ValuePair(Datum_Monte_Mario,	6265)
-ValuePair(Datum_M_poraloko,	6266)
-ValuePair(Datum_North_American_Datum_1927,	6267)
-ValuePair(Datum_NAD_Michigan,	6268)
-ValuePair(Datum_North_American_Datum_1983,	6269)
-ValuePair(Datum_Nahrwan_1967,	6270)
-ValuePair(Datum_Naparima_1972,	6271)
-ValuePair(Datum_New_Zealand_Geodetic_Datum_1949,	6272)
-ValuePair(Datum_NGO_1948,	6273)
-ValuePair(Datum_Datum_73,	6274)
-ValuePair(Datum_Nouvelle_Triangulation_Francaise,	6275)
-ValuePair(Datum_NSWC_9Z_2,	6276)
-ValuePair(Datum_OSGB_1936,	6277)
-ValuePair(Datum_OSGB_1970_SN,	6278)
-ValuePair(Datum_OS_SN_1980,	6279)
-ValuePair(Datum_Padang_1884,	6280)
-ValuePair(Datum_Palestine_1923,	6281)
-ValuePair(Datum_Pointe_Noire,	6282)
-ValuePair(Datum_Geocentric_Datum_of_Australia_1994,	6283)
-ValuePair(Datum_Pulkovo_1942,	6284)
-ValuePair(Datum_Qatar,	6285)
-ValuePair(Datum_Qatar_1948,	6286)
-ValuePair(Datum_Qornoq,	6287)
-ValuePair(Datum_Loma_Quintana,	6288)
-ValuePair(Datum_Amersfoort,	6289)
-ValuePair(Datum_RT38,	6290)
-ValuePair(Datum_South_American_Datum_1969,	6291)
-ValuePair(Datum_Sapper_Hill_1943,	6292)
-ValuePair(Datum_Schwarzeck,	6293)
-ValuePair(Datum_Segora,	6294)
-ValuePair(Datum_Serindung,	6295)
-ValuePair(Datum_Sudan,	6296)
-ValuePair(Datum_Tananarive_1925,	6297)
-ValuePair(Datum_Timbalai_1948,	6298)
-ValuePair(Datum_TM65,	6299)
-ValuePair(Datum_TM75,	6300)
-ValuePair(Datum_Tokyo,	6301)
-ValuePair(Datum_Trinidad_1903,	6302)
-ValuePair(Datum_Trucial_Coast_1948,	6303)
-ValuePair(Datum_Voirol_1875,	6304)
-ValuePair(Datum_Voirol_Unifie_1960,	6305)
-ValuePair(Datum_Bern_1938,	6306)
-ValuePair(Datum_Nord_Sahara_1959,	6307)
-ValuePair(Datum_Stockholm_1938,	6308)
-ValuePair(Datum_Yacare,	6309)
-ValuePair(Datum_Yoff,	6310)
-ValuePair(Datum_Zanderij,	6311)
-ValuePair(Datum_Militar_Geographische_Institut,	6312)
-ValuePair(Datum_Reseau_National_Belge_1972,	6313)
-ValuePair(Datum_Deutsche_Hauptdreiecksnetz,	6314)
-ValuePair(Datum_Conakry_1905,	6315)
-ValuePair(Datum_WGS72,	6322)
-ValuePair(Datum_WGS72_Transit_Broadcast_Ephemeris,	6324)
-ValuePair(Datum_WGS84,	6326)
-ValuePair(Datum_Ancienne_Triangulation_Francaise,	6901)
-ValuePair(Datum_Nord_de_Guerre,	6902)
-/* end of list */
diff --git a/src/tiff/epsg_ellipse.inc b/src/tiff/epsg_ellipse.inc
deleted file mode 100644
index 95c1432..0000000
--- a/src/tiff/epsg_ellipse.inc
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- *  GeoTIFF Rev. 0.2  Ellipsoids
- */
-
-/* C database for Geotiff include files.   */
-/* the macro ValuePair() must be defined   */
-/* by the enclosing include file           */
-
-#ifdef INCLUDE_OLD_CODES
-#include old_ellipse.inc
-#endif /* OLD Codes */
-
-ValuePair(Ellipse_Airy_1830,	7001)
-ValuePair(Ellipse_Airy_Modified_1849,	7002)
-ValuePair(Ellipse_Australian_National_Spheroid,	7003)
-ValuePair(Ellipse_Bessel_1841,	7004)
-ValuePair(Ellipse_Bessel_Modified,	7005)
-ValuePair(Ellipse_Bessel_Namibia,	7006)
-ValuePair(Ellipse_Clarke_1858,	7007)
-ValuePair(Ellipse_Clarke_1866,	7008)
-ValuePair(Ellipse_Clarke_1866_Michigan,	7009)
-ValuePair(Ellipse_Clarke_1880_Benoit,	7010)
-ValuePair(Ellipse_Clarke_1880_IGN,	7011)
-ValuePair(Ellipse_Clarke_1880_RGS,	7012)
-ValuePair(Ellipse_Clarke_1880_Arc,	7013)
-ValuePair(Ellipse_Clarke_1880_SGA_1922,	7014)
-ValuePair(Ellipse_Everest_1830_1937_Adjustment,	7015)
-ValuePair(Ellipse_Everest_1830_1967_Definition,	7016)
-ValuePair(Ellipse_Everest_1830_1975_Definition,	7017)
-ValuePair(Ellipse_Everest_1830_Modified,	7018)
-ValuePair(Ellipse_GRS_1980,	7019)
-ValuePair(Ellipse_Helmert_1906,	7020)
-ValuePair(Ellipse_Indonesian_National_Spheroid,	7021)
-ValuePair(Ellipse_International_1924,	7022)
-ValuePair(Ellipse_International_1967,	7023)
-ValuePair(Ellipse_Krassowsky_1940,	7024)
-ValuePair(Ellipse_NWL_9D,	7025)
-ValuePair(Ellipse_NWL_10D,	7026)
-ValuePair(Ellipse_Plessis_1817,	7027)
-ValuePair(Ellipse_Struve_1860,	7028)
-ValuePair(Ellipse_War_Office,	7029)
-ValuePair(Ellipse_WGS_84,	7030)
-ValuePair(Ellipse_GEM_10C,	7031)
-ValuePair(Ellipse_OSU86F,	7032)
-ValuePair(Ellipse_OSU91A,	7033)
-ValuePair(Ellipse_Clarke_1880,	7034)
-ValuePair(Ellipse_Sphere,	7035)
-/* end of list */
diff --git a/src/tiff/epsg_gcs.inc b/src/tiff/epsg_gcs.inc
deleted file mode 100644
index 4917964..0000000
--- a/src/tiff/epsg_gcs.inc
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- *  EPSG/POSC GCS Codes -- GeoTIFF Rev. 0.2
- */
-
-/* C database for Geotiff include files.   */
-/* the macro ValuePair() must be defined   */
-/* by the enclosing include file           */
-
-#ifdef INCLUDE_OLD_CODES
-#include old_gcs.inc
-#endif /* OLD Codes */
-
-/* Unspecified GCS based on ellipsoid */
-ValuePair(GCSE_Airy1830,	4001)
-ValuePair(GCSE_AiryModified1849,	4002)
-ValuePair(GCSE_AustralianNationalSpheroid,	4003)
-ValuePair(GCSE_Bessel1841,	4004)
-ValuePair(GCSE_BesselModified,	4005)
-ValuePair(GCSE_BesselNamibia,	4006)
-ValuePair(GCSE_Clarke1858,	4007)
-ValuePair(GCSE_Clarke1866,	4008)
-ValuePair(GCSE_Clarke1866Michigan,	4009)
-ValuePair(GCSE_Clarke1880_Benoit,	4010)
-ValuePair(GCSE_Clarke1880_IGN,	4011)
-ValuePair(GCSE_Clarke1880_RGS,	4012)
-ValuePair(GCSE_Clarke1880_Arc,	4013)
-ValuePair(GCSE_Clarke1880_SGA1922,	4014)
-ValuePair(GCSE_Everest1830_1937Adjustment,	4015)
-ValuePair(GCSE_Everest1830_1967Definition,	4016)
-ValuePair(GCSE_Everest1830_1975Definition,	4017)
-ValuePair(GCSE_Everest1830Modified,	4018)
-ValuePair(GCSE_GRS1980,	4019)
-ValuePair(GCSE_Helmert1906,	4020)
-ValuePair(GCSE_IndonesianNationalSpheroid,	4021)
-ValuePair(GCSE_International1924,	4022)
-ValuePair(GCSE_International1967,	4023)
-ValuePair(GCSE_Krassowsky1940,	4024)
-ValuePair(GCSE_NWL9D,	4025)
-ValuePair(GCSE_NWL10D,	4026)
-ValuePair(GCSE_Plessis1817,	4027)
-ValuePair(GCSE_Struve1860,	4028)
-ValuePair(GCSE_WarOffice,	4029)
-ValuePair(GCSE_WGS84,	4030)
-ValuePair(GCSE_GEM10C,	4031)
-ValuePair(GCSE_OSU86F,	4032)
-ValuePair(GCSE_OSU91A,	4033)
-ValuePair(GCSE_Clarke1880,	4034)
-ValuePair(GCSE_Sphere,	4035)
-
-/* New GCS */
-ValuePair(GCS_Greek,4120)
-ValuePair(GCS_GGRS87,4121)
-ValuePair(GCS_KKJ,4123)
-ValuePair(GCS_RT90,4124)
-ValuePair(GCS_EST92,4133)
-ValuePair(GCS_Dealul_Piscului_1970,4317)
-ValuePair(GCS_Greek_Athens,4815)
-
-/* Standard GCS */
-ValuePair(GCS_Adindan,	4201)
-ValuePair(GCS_AGD66,	4202)
-ValuePair(GCS_AGD84,	4203)
-ValuePair(GCS_Ain_el_Abd,	4204)
-ValuePair(GCS_Afgooye,	4205)
-ValuePair(GCS_Agadez,	4206)
-ValuePair(GCS_Lisbon,	4207)
-ValuePair(GCS_Aratu,	4208)
-ValuePair(GCS_Arc_1950,	4209)
-ValuePair(GCS_Arc_1960,	4210)
-ValuePair(GCS_Batavia,	4211)
-ValuePair(GCS_Barbados,	4212)
-ValuePair(GCS_Beduaram,	4213)
-ValuePair(GCS_Beijing_1954,	4214)
-ValuePair(GCS_Belge_1950,	4215)
-ValuePair(GCS_Bermuda_1957,	4216)
-ValuePair(GCS_Bern_1898,	4217)
-ValuePair(GCS_Bogota,	4218)
-ValuePair(GCS_Bukit_Rimpah,	4219)
-ValuePair(GCS_Camacupa,	4220)
-ValuePair(GCS_Campo_Inchauspe,	4221)
-ValuePair(GCS_Cape,	4222)
-ValuePair(GCS_Carthage,	4223)
-ValuePair(GCS_Chua,	4224)
-ValuePair(GCS_Corrego_Alegre,	4225)
-ValuePair(GCS_Cote_d_Ivoire,	4226)
-ValuePair(GCS_Deir_ez_Zor,	4227)
-ValuePair(GCS_Douala,	4228)
-ValuePair(GCS_Egypt_1907,	4229)
-ValuePair(GCS_ED50,	4230)
-ValuePair(GCS_ED87,	4231)
-ValuePair(GCS_Fahud,	4232)
-ValuePair(GCS_Gandajika_1970,	4233)
-ValuePair(GCS_Garoua,	4234)
-ValuePair(GCS_Guyane_Francaise,	4235)
-ValuePair(GCS_Hu_Tzu_Shan,	4236)
-ValuePair(GCS_HD72,	4237)
-ValuePair(GCS_ID74,	4238)
-ValuePair(GCS_Indian_1954,	4239)
-ValuePair(GCS_Indian_1975,	4240)
-ValuePair(GCS_Jamaica_1875,	4241)
-ValuePair(GCS_JAD69,	4242)
-ValuePair(GCS_Kalianpur,	4243)
-ValuePair(GCS_Kandawala,	4244)
-ValuePair(GCS_Kertau,	4245)
-ValuePair(GCS_KOC,	4246)
-ValuePair(GCS_La_Canoa,	4247)
-ValuePair(GCS_PSAD56,	4248)
-ValuePair(GCS_Lake,	4249)
-ValuePair(GCS_Leigon,	4250)
-ValuePair(GCS_Liberia_1964,	4251)
-ValuePair(GCS_Lome,	4252)
-ValuePair(GCS_Luzon_1911,	4253)
-ValuePair(GCS_Hito_XVIII_1963,	4254)
-ValuePair(GCS_Herat_North,	4255)
-ValuePair(GCS_Mahe_1971,	4256)
-ValuePair(GCS_Makassar,	4257)
-ValuePair(GCS_EUREF89,	4258)
-ValuePair(GCS_Malongo_1987,	4259)
-ValuePair(GCS_Manoca,	4260)
-ValuePair(GCS_Merchich,	4261)
-ValuePair(GCS_Massawa,	4262)
-ValuePair(GCS_Minna,	4263)
-ValuePair(GCS_Mhast,	4264)
-ValuePair(GCS_Monte_Mario,	4265)
-ValuePair(GCS_M_poraloko,	4266)
-ValuePair(GCS_NAD27,	4267)
-ValuePair(GCS_NAD_Michigan,	4268)
-ValuePair(GCS_NAD83,	4269)
-ValuePair(GCS_Nahrwan_1967,	4270)
-ValuePair(GCS_Naparima_1972,	4271)
-ValuePair(GCS_GD49,	4272)
-ValuePair(GCS_NGO_1948,	4273)
-ValuePair(GCS_Datum_73,	4274)
-ValuePair(GCS_NTF,	4275)
-ValuePair(GCS_NSWC_9Z_2,	4276)
-ValuePair(GCS_OSGB_1936,	4277)
-ValuePair(GCS_OSGB70,	4278)
-ValuePair(GCS_OS_SN80,	4279)
-ValuePair(GCS_Padang,	4280)
-ValuePair(GCS_Palestine_1923,	4281)
-ValuePair(GCS_Pointe_Noire,	4282)
-ValuePair(GCS_GDA94,	4283)
-ValuePair(GCS_Pulkovo_1942,	4284)
-ValuePair(GCS_Qatar,	4285)
-ValuePair(GCS_Qatar_1948,	4286)
-ValuePair(GCS_Qornoq,	4287)
-ValuePair(GCS_Loma_Quintana,	4288)
-ValuePair(GCS_Amersfoort,	4289)
-ValuePair(GCS_RT38,	4290)
-ValuePair(GCS_SAD69,	4291)
-ValuePair(GCS_Sapper_Hill_1943,	4292)
-ValuePair(GCS_Schwarzeck,	4293)
-ValuePair(GCS_Segora,	4294)
-ValuePair(GCS_Serindung,	4295)
-ValuePair(GCS_Sudan,	4296)
-ValuePair(GCS_Tananarive,	4297)
-ValuePair(GCS_Timbalai_1948,	4298)
-ValuePair(GCS_TM65,	4299)
-ValuePair(GCS_TM75,	4300)
-ValuePair(GCS_Tokyo,	4301)
-ValuePair(GCS_Trinidad_1903,	4302)
-ValuePair(GCS_TC_1948,	4303)
-ValuePair(GCS_Voirol_1875,	4304)
-ValuePair(GCS_Voirol_Unifie,	4305)
-ValuePair(GCS_Bern_1938,	4306)
-ValuePair(GCS_Nord_Sahara_1959,	4307)
-ValuePair(GCS_Stockholm_1938,	4308)
-ValuePair(GCS_Yacare,	4309)
-ValuePair(GCS_Yoff,	4310)
-ValuePair(GCS_Zanderij,	4311)
-ValuePair(GCS_MGI,	4312)
-ValuePair(GCS_Belge_1972,	4313)
-ValuePair(GCS_DHDN,	4314)
-ValuePair(GCS_Conakry_1905,	4315)
-ValuePair(GCS_WGS_72,	4322)
-ValuePair(GCS_WGS_72BE,	4324)
-ValuePair(GCS_WGS_84,	4326)
-ValuePair(GCS_Bern_1898_Bern,	4801)
-ValuePair(GCS_Bogota_Bogota,	4802)
-ValuePair(GCS_Lisbon_Lisbon,	4803)
-ValuePair(GCS_Makassar_Jakarta,	4804)
-ValuePair(GCS_MGI_Ferro,	4805)
-ValuePair(GCS_Monte_Mario_Rome,	4806)
-ValuePair(GCS_NTF_Paris,	4807)
-ValuePair(GCS_Padang_Jakarta,	4808)
-ValuePair(GCS_Belge_1950_Brussels,	4809)
-ValuePair(GCS_Tananarive_Paris,	4810)
-ValuePair(GCS_Voirol_1875_Paris,	4811)
-ValuePair(GCS_Voirol_Unifie_Paris,	4812)
-ValuePair(GCS_Batavia_Jakarta,	4813)
-ValuePair(GCS_ATF_Paris,	4901)
-ValuePair(GCS_NDG_Paris,	4902)
-/* End of list */
diff --git a/src/tiff/epsg_pcs.inc b/src/tiff/epsg_pcs.inc
deleted file mode 100644
index d54153a..0000000
--- a/src/tiff/epsg_pcs.inc
+++ /dev/null
@@ -1,1003 +0,0 @@
-/*
- *  EPSG PCS Codes - GeoTIFF Rev 0.2
- */
-
-/* C database for Geotiff include files.   */
-/* the macro ValuePair() must be defined   */
-/* by the enclosing include file           */
-
-#ifdef INCLUDE_OLD_CODES
-#include old_pcs.inc
-#endif /* OLD Codes */
-
-/* New PCS */
-ValuePair(PCS_GGRS87_Greek_Grid,2100)
-ValuePair(PCS_KKJ_Finland_zone_1,2391)
-ValuePair(PCS_KKJ_Finland_zone_2,2392)
-ValuePair(PCS_KKJ_Finland_zone_3,2393)
-ValuePair(PCS_KKJ_Finland_zone_4,2394)
-ValuePair(PCS_RT90_2_5_gon_W,2400)
-ValuePair(PCS_Lietuvos_Koordinoei_Sistema_1994,2600)
-ValuePair(PCS_Estonian_Coordinate_System_of_1992,3300)
-ValuePair(PCS_HD72_EOV,23700)
-ValuePair(PCS_Dealul_Piscului_1970_Stereo_70,31700)
-
-ValuePair(PCS_Adindan_UTM_zone_37N,	20137)
-ValuePair(PCS_Adindan_UTM_zone_38N,	20138)
-ValuePair(PCS_AGD66_AMG_zone_48,	20248)
-ValuePair(PCS_AGD66_AMG_zone_49,	20249)
-ValuePair(PCS_AGD66_AMG_zone_50,	20250)
-ValuePair(PCS_AGD66_AMG_zone_51,	20251)
-ValuePair(PCS_AGD66_AMG_zone_52,	20252)
-ValuePair(PCS_AGD66_AMG_zone_53,	20253)
-ValuePair(PCS_AGD66_AMG_zone_54,	20254)
-ValuePair(PCS_AGD66_AMG_zone_55,	20255)
-ValuePair(PCS_AGD66_AMG_zone_56,	20256)
-ValuePair(PCS_AGD66_AMG_zone_57,	20257)
-ValuePair(PCS_AGD66_AMG_zone_58,	20258)
-ValuePair(PCS_AGD84_AMG_zone_48,	20348)
-ValuePair(PCS_AGD84_AMG_zone_49,	20349)
-ValuePair(PCS_AGD84_AMG_zone_50,	20350)
-ValuePair(PCS_AGD84_AMG_zone_51,	20351)
-ValuePair(PCS_AGD84_AMG_zone_52,	20352)
-ValuePair(PCS_AGD84_AMG_zone_53,	20353)
-ValuePair(PCS_AGD84_AMG_zone_54,	20354)
-ValuePair(PCS_AGD84_AMG_zone_55,	20355)
-ValuePair(PCS_AGD84_AMG_zone_56,	20356)
-ValuePair(PCS_AGD84_AMG_zone_57,	20357)
-ValuePair(PCS_AGD84_AMG_zone_58,	20358)
-ValuePair(PCS_Ain_el_Abd_UTM_zone_37N,	20437)
-ValuePair(PCS_Ain_el_Abd_UTM_zone_38N,	20438)
-ValuePair(PCS_Ain_el_Abd_UTM_zone_39N,	20439)
-ValuePair(PCS_Ain_el_Abd_Bahrain_Grid,	20499)
-ValuePair(PCS_Afgooye_UTM_zone_38N,	20538)
-ValuePair(PCS_Afgooye_UTM_zone_39N,	20539)
-ValuePair(PCS_Lisbon_Portugese_Grid,	20700)
-ValuePair(PCS_Aratu_UTM_zone_22S,	20822)
-ValuePair(PCS_Aratu_UTM_zone_23S,	20823)
-ValuePair(PCS_Aratu_UTM_zone_24S,	20824)
-ValuePair(PCS_Arc_1950_Lo13,	20973)
-ValuePair(PCS_Arc_1950_Lo15,	20975)
-ValuePair(PCS_Arc_1950_Lo17,	20977)
-ValuePair(PCS_Arc_1950_Lo19,	20979)
-ValuePair(PCS_Arc_1950_Lo21,	20981)
-ValuePair(PCS_Arc_1950_Lo23,	20983)
-ValuePair(PCS_Arc_1950_Lo25,	20985)
-ValuePair(PCS_Arc_1950_Lo27,	20987)
-ValuePair(PCS_Arc_1950_Lo29,	20989)
-ValuePair(PCS_Arc_1950_Lo31,	20991)
-ValuePair(PCS_Arc_1950_Lo33,	20993)
-ValuePair(PCS_Arc_1950_Lo35,	20995)
-ValuePair(PCS_Batavia_NEIEZ,	21100)
-ValuePair(PCS_Batavia_UTM_zone_48S,	21148)
-ValuePair(PCS_Batavia_UTM_zone_49S,	21149)
-ValuePair(PCS_Batavia_UTM_zone_50S,	21150)
-ValuePair(PCS_Beijing_Gauss_zone_13,	21413)
-ValuePair(PCS_Beijing_Gauss_zone_14,	21414)
-ValuePair(PCS_Beijing_Gauss_zone_15,	21415)
-ValuePair(PCS_Beijing_Gauss_zone_16,	21416)
-ValuePair(PCS_Beijing_Gauss_zone_17,	21417)
-ValuePair(PCS_Beijing_Gauss_zone_18,	21418)
-ValuePair(PCS_Beijing_Gauss_zone_19,	21419)
-ValuePair(PCS_Beijing_Gauss_zone_20,	21420)
-ValuePair(PCS_Beijing_Gauss_zone_21,	21421)
-ValuePair(PCS_Beijing_Gauss_zone_22,	21422)
-ValuePair(PCS_Beijing_Gauss_zone_23,	21423)
-ValuePair(PCS_Beijing_Gauss_13N,	21473)
-ValuePair(PCS_Beijing_Gauss_14N,	21474)
-ValuePair(PCS_Beijing_Gauss_15N,	21475)
-ValuePair(PCS_Beijing_Gauss_16N,	21476)
-ValuePair(PCS_Beijing_Gauss_17N,	21477)
-ValuePair(PCS_Beijing_Gauss_18N,	21478)
-ValuePair(PCS_Beijing_Gauss_19N,	21479)
-ValuePair(PCS_Beijing_Gauss_20N,	21480)
-ValuePair(PCS_Beijing_Gauss_21N,	21481)
-ValuePair(PCS_Beijing_Gauss_22N,	21482)
-ValuePair(PCS_Beijing_Gauss_23N,	21483)
-ValuePair(PCS_Belge_Lambert_50,	21500)
-ValuePair(PCS_Bern_1898_Swiss_Old,	21790)
-ValuePair(PCS_Bogota_UTM_zone_17N,	21817)
-ValuePair(PCS_Bogota_UTM_zone_18N,	21818)
-ValuePair(PCS_Bogota_Colombia_3W,	21891)
-ValuePair(PCS_Bogota_Colombia_Bogota,	21892)
-ValuePair(PCS_Bogota_Colombia_3E,	21893)
-ValuePair(PCS_Bogota_Colombia_6E,	21894)
-ValuePair(PCS_Camacupa_UTM_32S,	22032)
-ValuePair(PCS_Camacupa_UTM_33S,	22033)
-ValuePair(PCS_C_Inchauspe_Argentina_1,	22191)
-ValuePair(PCS_C_Inchauspe_Argentina_2,	22192)
-ValuePair(PCS_C_Inchauspe_Argentina_3,	22193)
-ValuePair(PCS_C_Inchauspe_Argentina_4,	22194)
-ValuePair(PCS_C_Inchauspe_Argentina_5,	22195)
-ValuePair(PCS_C_Inchauspe_Argentina_6,	22196)
-ValuePair(PCS_C_Inchauspe_Argentina_7,	22197)
-ValuePair(PCS_Carthage_UTM_zone_32N,	22332)
-ValuePair(PCS_Carthage_Nord_Tunisie,	22391)
-ValuePair(PCS_Carthage_Sud_Tunisie,	22392)
-ValuePair(PCS_Corrego_Alegre_UTM_23S,	22523)
-ValuePair(PCS_Corrego_Alegre_UTM_24S,	22524)
-ValuePair(PCS_Douala_UTM_zone_32N,	22832)
-ValuePair(PCS_Egypt_1907_Red_Belt,	22992)
-ValuePair(PCS_Egypt_1907_Purple_Belt,	22993)
-ValuePair(PCS_Egypt_1907_Ext_Purple,	22994)
-ValuePair(PCS_ED50_UTM_zone_28N,	23028)
-ValuePair(PCS_ED50_UTM_zone_29N,	23029)
-ValuePair(PCS_ED50_UTM_zone_30N,	23030)
-ValuePair(PCS_ED50_UTM_zone_31N,	23031)
-ValuePair(PCS_ED50_UTM_zone_32N,	23032)
-ValuePair(PCS_ED50_UTM_zone_33N,	23033)
-ValuePair(PCS_ED50_UTM_zone_34N,	23034)
-ValuePair(PCS_ED50_UTM_zone_35N,	23035)
-ValuePair(PCS_ED50_UTM_zone_36N,	23036)
-ValuePair(PCS_ED50_UTM_zone_37N,	23037)
-ValuePair(PCS_ED50_UTM_zone_38N,	23038)
-ValuePair(PCS_Fahud_UTM_zone_39N,	23239)
-ValuePair(PCS_Fahud_UTM_zone_40N,	23240)
-ValuePair(PCS_Garoua_UTM_zone_33N,	23433)
-ValuePair(PCS_ID74_UTM_zone_46N,	23846)
-ValuePair(PCS_ID74_UTM_zone_47N,	23847)
-ValuePair(PCS_ID74_UTM_zone_48N,	23848)
-ValuePair(PCS_ID74_UTM_zone_49N,	23849)
-ValuePair(PCS_ID74_UTM_zone_50N,	23850)
-ValuePair(PCS_ID74_UTM_zone_51N,	23851)
-ValuePair(PCS_ID74_UTM_zone_52N,	23852)
-ValuePair(PCS_ID74_UTM_zone_53N,	23853)
-ValuePair(PCS_ID74_UTM_zone_46S,	23886)
-ValuePair(PCS_ID74_UTM_zone_47S,	23887)
-ValuePair(PCS_ID74_UTM_zone_48S,	23888)
-ValuePair(PCS_ID74_UTM_zone_49S,	23889)
-ValuePair(PCS_ID74_UTM_zone_50S,	23890)
-ValuePair(PCS_ID74_UTM_zone_51S,	23891)
-ValuePair(PCS_ID74_UTM_zone_52S,	23892)
-ValuePair(PCS_ID74_UTM_zone_53S,	23893)
-ValuePair(PCS_ID74_UTM_zone_54S,	23894)
-ValuePair(PCS_Indian_1954_UTM_47N,	23947)
-ValuePair(PCS_Indian_1954_UTM_48N,	23948)
-ValuePair(PCS_Indian_1975_UTM_47N,	24047)
-ValuePair(PCS_Indian_1975_UTM_48N,	24048)
-ValuePair(PCS_Jamaica_1875_Old_Grid,	24100)
-ValuePair(PCS_JAD69_Jamaica_Grid,	24200)
-ValuePair(PCS_Kalianpur_India_0,	24370)
-ValuePair(PCS_Kalianpur_India_I,	24371)
-ValuePair(PCS_Kalianpur_India_IIa,	24372)
-ValuePair(PCS_Kalianpur_India_IIIa,	24373)
-ValuePair(PCS_Kalianpur_India_IVa,	24374)
-ValuePair(PCS_Kalianpur_India_IIb,	24382)
-ValuePair(PCS_Kalianpur_India_IIIb,	24383)
-ValuePair(PCS_Kalianpur_India_IVb,	24384)
-ValuePair(PCS_Kertau_Singapore_Grid,	24500)
-ValuePair(PCS_Kertau_UTM_zone_47N,	24547)
-ValuePair(PCS_Kertau_UTM_zone_48N,	24548)
-ValuePair(PCS_La_Canoa_UTM_zone_20N,	24720)
-ValuePair(PCS_La_Canoa_UTM_zone_21N,	24721)
-ValuePair(PCS_PSAD56_UTM_zone_18N,	24818)
-ValuePair(PCS_PSAD56_UTM_zone_19N,	24819)
-ValuePair(PCS_PSAD56_UTM_zone_20N,	24820)
-ValuePair(PCS_PSAD56_UTM_zone_21N,	24821)
-ValuePair(PCS_PSAD56_UTM_zone_17S,	24877)
-ValuePair(PCS_PSAD56_UTM_zone_18S,	24878)
-ValuePair(PCS_PSAD56_UTM_zone_19S,	24879)
-ValuePair(PCS_PSAD56_UTM_zone_20S,	24880)
-ValuePair(PCS_PSAD56_Peru_west_zone,	24891)
-ValuePair(PCS_PSAD56_Peru_central,	24892)
-ValuePair(PCS_PSAD56_Peru_east_zone,	24893)
-ValuePair(PCS_Leigon_Ghana_Grid,	25000)
-ValuePair(PCS_Lome_UTM_zone_31N,	25231)
-ValuePair(PCS_Luzon_Philippines_I,	25391)
-ValuePair(PCS_Luzon_Philippines_II,	25392)
-ValuePair(PCS_Luzon_Philippines_III,	25393)
-ValuePair(PCS_Luzon_Philippines_IV,	25394)
-ValuePair(PCS_Luzon_Philippines_V,	25395)
-ValuePair(PCS_Makassar_NEIEZ,	25700)
-ValuePair(PCS_Malongo_1987_UTM_32S,	25932)
-ValuePair(PCS_Merchich_Nord_Maroc,	26191)
-ValuePair(PCS_Merchich_Sud_Maroc,	26192)
-ValuePair(PCS_Merchich_Sahara,	26193)
-ValuePair(PCS_Massawa_UTM_zone_37N,	26237)
-ValuePair(PCS_Minna_UTM_zone_31N,	26331)
-ValuePair(PCS_Minna_UTM_zone_32N,	26332)
-ValuePair(PCS_Minna_Nigeria_West,	26391)
-ValuePair(PCS_Minna_Nigeria_Mid_Belt,	26392)
-ValuePair(PCS_Minna_Nigeria_East,	26393)
-ValuePair(PCS_Mhast_UTM_zone_32S,	26432)
-ValuePair(PCS_Monte_Mario_Italy_1,	26591)
-ValuePair(PCS_Monte_Mario_Italy_2,	26592)
-ValuePair(PCS_M_poraloko_UTM_32N,	26632)
-ValuePair(PCS_M_poraloko_UTM_32S,	26692)
-ValuePair(PCS_NAD27_UTM_zone_3N,	26703)
-ValuePair(PCS_NAD27_UTM_zone_4N,	26704)
-ValuePair(PCS_NAD27_UTM_zone_5N,	26705)
-ValuePair(PCS_NAD27_UTM_zone_6N,	26706)
-ValuePair(PCS_NAD27_UTM_zone_7N,	26707)
-ValuePair(PCS_NAD27_UTM_zone_8N,	26708)
-ValuePair(PCS_NAD27_UTM_zone_9N,	26709)
-ValuePair(PCS_NAD27_UTM_zone_10N,	26710)
-ValuePair(PCS_NAD27_UTM_zone_11N,	26711)
-ValuePair(PCS_NAD27_UTM_zone_12N,	26712)
-ValuePair(PCS_NAD27_UTM_zone_13N,	26713)
-ValuePair(PCS_NAD27_UTM_zone_14N,	26714)
-ValuePair(PCS_NAD27_UTM_zone_15N,	26715)
-ValuePair(PCS_NAD27_UTM_zone_16N,	26716)
-ValuePair(PCS_NAD27_UTM_zone_17N,	26717)
-ValuePair(PCS_NAD27_UTM_zone_18N,	26718)
-ValuePair(PCS_NAD27_UTM_zone_19N,	26719)
-ValuePair(PCS_NAD27_UTM_zone_20N,	26720)
-ValuePair(PCS_NAD27_UTM_zone_21N,	26721)
-ValuePair(PCS_NAD27_UTM_zone_22N,	26722)
-ValuePair(PCS_NAD27_Alabama_East,	26729)
-ValuePair(PCS_NAD27_Alabama_West,	26730)
-ValuePair(PCS_NAD27_Alaska_zone_1,	26731)
-ValuePair(PCS_NAD27_Alaska_zone_2,	26732)
-ValuePair(PCS_NAD27_Alaska_zone_3,	26733)
-ValuePair(PCS_NAD27_Alaska_zone_4,	26734)
-ValuePair(PCS_NAD27_Alaska_zone_5,	26735)
-ValuePair(PCS_NAD27_Alaska_zone_6,	26736)
-ValuePair(PCS_NAD27_Alaska_zone_7,	26737)
-ValuePair(PCS_NAD27_Alaska_zone_8,	26738)
-ValuePair(PCS_NAD27_Alaska_zone_9,	26739)
-ValuePair(PCS_NAD27_Alaska_zone_10,	26740)
-ValuePair(PCS_NAD27_California_I,	26741)
-ValuePair(PCS_NAD27_California_II,	26742)
-ValuePair(PCS_NAD27_California_III,	26743)
-ValuePair(PCS_NAD27_California_IV,	26744)
-ValuePair(PCS_NAD27_California_V,	26745)
-ValuePair(PCS_NAD27_California_VI,	26746)
-ValuePair(PCS_NAD27_California_VII,	26747)
-ValuePair(PCS_NAD27_Arizona_East,	26748)
-ValuePair(PCS_NAD27_Arizona_Central,	26749)
-ValuePair(PCS_NAD27_Arizona_West,	26750)
-ValuePair(PCS_NAD27_Arkansas_North,	26751)
-ValuePair(PCS_NAD27_Arkansas_South,	26752)
-ValuePair(PCS_NAD27_Colorado_North,	26753)
-ValuePair(PCS_NAD27_Colorado_Central,	26754)
-ValuePair(PCS_NAD27_Colorado_South,	26755)
-ValuePair(PCS_NAD27_Connecticut,	26756)
-ValuePair(PCS_NAD27_Delaware,	26757)
-ValuePair(PCS_NAD27_Florida_East,	26758)
-ValuePair(PCS_NAD27_Florida_West,	26759)
-ValuePair(PCS_NAD27_Florida_North,	26760)
-ValuePair(PCS_NAD27_Hawaii_zone_1,	26761)
-ValuePair(PCS_NAD27_Hawaii_zone_2,	26762)
-ValuePair(PCS_NAD27_Hawaii_zone_3,	26763)
-ValuePair(PCS_NAD27_Hawaii_zone_4,	26764)
-ValuePair(PCS_NAD27_Hawaii_zone_5,	26765)
-ValuePair(PCS_NAD27_Georgia_East,	26766)
-ValuePair(PCS_NAD27_Georgia_West,	26767)
-ValuePair(PCS_NAD27_Idaho_East,	26768)
-ValuePair(PCS_NAD27_Idaho_Central,	26769)
-ValuePair(PCS_NAD27_Idaho_West,	26770)
-ValuePair(PCS_NAD27_Illinois_East,	26771)
-ValuePair(PCS_NAD27_Illinois_West,	26772)
-ValuePair(PCS_NAD27_Indiana_East,	26773)
-ValuePair(PCS_NAD27_BLM_14N_feet,	26774)
-ValuePair(PCS_NAD27_Indiana_West,	26774)
-ValuePair(PCS_NAD27_BLM_15N_feet,	26775)
-ValuePair(PCS_NAD27_Iowa_North,	26775)
-ValuePair(PCS_NAD27_BLM_16N_feet,	26776)
-ValuePair(PCS_NAD27_Iowa_South,	26776)
-ValuePair(PCS_NAD27_BLM_17N_feet,	26777)
-ValuePair(PCS_NAD27_Kansas_North,	26777)
-ValuePair(PCS_NAD27_Kansas_South,	26778)
-ValuePair(PCS_NAD27_Kentucky_North,	26779)
-ValuePair(PCS_NAD27_Kentucky_South,	26780)
-ValuePair(PCS_NAD27_Louisiana_North,	26781)
-ValuePair(PCS_NAD27_Louisiana_South,	26782)
-ValuePair(PCS_NAD27_Maine_East,	26783)
-ValuePair(PCS_NAD27_Maine_West,	26784)
-ValuePair(PCS_NAD27_Maryland,	26785)
-ValuePair(PCS_NAD27_Massachusetts,	26786)
-ValuePair(PCS_NAD27_Massachusetts_Is,	26787)
-ValuePair(PCS_NAD27_Michigan_North,	26788)
-ValuePair(PCS_NAD27_Michigan_Central,	26789)
-ValuePair(PCS_NAD27_Michigan_South,	26790)
-ValuePair(PCS_NAD27_Minnesota_North,	26791)
-ValuePair(PCS_NAD27_Minnesota_Cent,	26792)
-ValuePair(PCS_NAD27_Minnesota_South,	26793)
-ValuePair(PCS_NAD27_Mississippi_East,	26794)
-ValuePair(PCS_NAD27_Mississippi_West,	26795)
-ValuePair(PCS_NAD27_Missouri_East,	26796)
-ValuePair(PCS_NAD27_Missouri_Central,	26797)
-ValuePair(PCS_NAD27_Missouri_West,	26798)
-ValuePair(PCS_NAD_Michigan_Michigan_East,	26801)
-ValuePair(PCS_NAD_Michigan_Michigan_Old_Central,	26802)
-ValuePair(PCS_NAD_Michigan_Michigan_West,	26803)
-ValuePair(PCS_NAD83_UTM_zone_3N,	26903)
-ValuePair(PCS_NAD83_UTM_zone_4N,	26904)
-ValuePair(PCS_NAD83_UTM_zone_5N,	26905)
-ValuePair(PCS_NAD83_UTM_zone_6N,	26906)
-ValuePair(PCS_NAD83_UTM_zone_7N,	26907)
-ValuePair(PCS_NAD83_UTM_zone_8N,	26908)
-ValuePair(PCS_NAD83_UTM_zone_9N,	26909)
-ValuePair(PCS_NAD83_UTM_zone_10N,	26910)
-ValuePair(PCS_NAD83_UTM_zone_11N,	26911)
-ValuePair(PCS_NAD83_UTM_zone_12N,	26912)
-ValuePair(PCS_NAD83_UTM_zone_13N,	26913)
-ValuePair(PCS_NAD83_UTM_zone_14N,	26914)
-ValuePair(PCS_NAD83_UTM_zone_15N,	26915)
-ValuePair(PCS_NAD83_UTM_zone_16N,	26916)
-ValuePair(PCS_NAD83_UTM_zone_17N,	26917)
-ValuePair(PCS_NAD83_UTM_zone_18N,	26918)
-ValuePair(PCS_NAD83_UTM_zone_19N,	26919)
-ValuePair(PCS_NAD83_UTM_zone_20N,	26920)
-ValuePair(PCS_NAD83_UTM_zone_21N,	26921)
-ValuePair(PCS_NAD83_UTM_zone_22N,	26922)
-ValuePair(PCS_NAD83_UTM_zone_23N,	26923)
-ValuePair(PCS_NAD83_Alabama_East,	26929)
-ValuePair(PCS_NAD83_Alabama_West,	26930)
-ValuePair(PCS_NAD83_Alaska_zone_1,	26931)
-ValuePair(PCS_NAD83_Alaska_zone_2,	26932)
-ValuePair(PCS_NAD83_Alaska_zone_3,	26933)
-ValuePair(PCS_NAD83_Alaska_zone_4,	26934)
-ValuePair(PCS_NAD83_Alaska_zone_5,	26935)
-ValuePair(PCS_NAD83_Alaska_zone_6,	26936)
-ValuePair(PCS_NAD83_Alaska_zone_7,	26937)
-ValuePair(PCS_NAD83_Alaska_zone_8,	26938)
-ValuePair(PCS_NAD83_Alaska_zone_9,	26939)
-ValuePair(PCS_NAD83_Alaska_zone_10,	26940)
-ValuePair(PCS_NAD83_California_1,	26941)
-ValuePair(PCS_NAD83_California_2,	26942)
-ValuePair(PCS_NAD83_California_3,	26943)
-ValuePair(PCS_NAD83_California_4,	26944)
-ValuePair(PCS_NAD83_California_5,	26945)
-ValuePair(PCS_NAD83_California_6,	26946)
-ValuePair(PCS_NAD83_Arizona_East,	26948)
-ValuePair(PCS_NAD83_Arizona_Central,	26949)
-ValuePair(PCS_NAD83_Arizona_West,	26950)
-ValuePair(PCS_NAD83_Arkansas_North,	26951)
-ValuePair(PCS_NAD83_Arkansas_South,	26952)
-ValuePair(PCS_NAD83_Colorado_North,	26953)
-ValuePair(PCS_NAD83_Colorado_Central,	26954)
-ValuePair(PCS_NAD83_Colorado_South,	26955)
-ValuePair(PCS_NAD83_Connecticut,	26956)
-ValuePair(PCS_NAD83_Delaware,	26957)
-ValuePair(PCS_NAD83_Florida_East,	26958)
-ValuePair(PCS_NAD83_Florida_West,	26959)
-ValuePair(PCS_NAD83_Florida_North,	26960)
-ValuePair(PCS_NAD83_Hawaii_zone_1,	26961)
-ValuePair(PCS_NAD83_Hawaii_zone_2,	26962)
-ValuePair(PCS_NAD83_Hawaii_zone_3,	26963)
-ValuePair(PCS_NAD83_Hawaii_zone_4,	26964)
-ValuePair(PCS_NAD83_Hawaii_zone_5,	26965)
-ValuePair(PCS_NAD83_Georgia_East,	26966)
-ValuePair(PCS_NAD83_Georgia_West,	26967)
-ValuePair(PCS_NAD83_Idaho_East,	26968)
-ValuePair(PCS_NAD83_Idaho_Central,	26969)
-ValuePair(PCS_NAD83_Idaho_West,	26970)
-ValuePair(PCS_NAD83_Illinois_East,	26971)
-ValuePair(PCS_NAD83_Illinois_West,	26972)
-ValuePair(PCS_NAD83_Indiana_East,	26973)
-ValuePair(PCS_NAD83_Indiana_West,	26974)
-ValuePair(PCS_NAD83_Iowa_North,	26975)
-ValuePair(PCS_NAD83_Iowa_South,	26976)
-ValuePair(PCS_NAD83_Kansas_North,	26977)
-ValuePair(PCS_NAD83_Kansas_South,	26978)
-ValuePair(PCS_NAD83_Kentucky_North,	2205)
-ValuePair(PCS_NAD83_Kentucky_South,	26980)
-ValuePair(PCS_NAD83_Louisiana_North,	26981)
-ValuePair(PCS_NAD83_Louisiana_South,	26982)
-ValuePair(PCS_NAD83_Maine_East,	26983)
-ValuePair(PCS_NAD83_Maine_West,	26984)
-ValuePair(PCS_NAD83_Maryland,	26985)
-ValuePair(PCS_NAD83_Massachusetts,	26986)
-ValuePair(PCS_NAD83_Massachusetts_Is,	26987)
-ValuePair(PCS_NAD83_Michigan_North,	26988)
-ValuePair(PCS_NAD83_Michigan_Central,	26989)
-ValuePair(PCS_NAD83_Michigan_South,	26990)
-ValuePair(PCS_NAD83_Minnesota_North,	26991)
-ValuePair(PCS_NAD83_Minnesota_Cent,	26992)
-ValuePair(PCS_NAD83_Minnesota_South,	26993)
-ValuePair(PCS_NAD83_Mississippi_East,	26994)
-ValuePair(PCS_NAD83_Mississippi_West,	26995)
-ValuePair(PCS_NAD83_Missouri_East,	26996)
-ValuePair(PCS_NAD83_Missouri_Central,	26997)
-ValuePair(PCS_NAD83_Missouri_West,	26998)
-ValuePair(PCS_Nahrwan_1967_UTM_38N,	27038)
-ValuePair(PCS_Nahrwan_1967_UTM_39N,	27039)
-ValuePair(PCS_Nahrwan_1967_UTM_40N,	27040)
-ValuePair(PCS_Naparima_UTM_20N,	27120)
-ValuePair(PCS_GD49_NZ_Map_Grid,	27200)
-ValuePair(PCS_GD49_North_Island_Grid,	27291)
-ValuePair(PCS_GD49_South_Island_Grid,	27292)
-ValuePair(PCS_Datum_73_UTM_zone_29N,	27429)
-ValuePair(PCS_ATF_Nord_de_Guerre,	27500)
-ValuePair(PCS_NTF_France_I,	27581)
-ValuePair(PCS_NTF_France_II,	27582)
-ValuePair(PCS_NTF_France_III,	27583)
-ValuePair(PCS_NTF_Nord_France,	27591)
-ValuePair(PCS_NTF_Centre_France,	27592)
-ValuePair(PCS_NTF_Sud_France,	27593)
-ValuePair(PCS_British_National_Grid,	27700)
-ValuePair(PCS_Point_Noire_UTM_32S,	28232)
-ValuePair(PCS_GDA94_MGA_zone_48,	28348)
-ValuePair(PCS_GDA94_MGA_zone_49,	28349)
-ValuePair(PCS_GDA94_MGA_zone_50,	28350)
-ValuePair(PCS_GDA94_MGA_zone_51,	28351)
-ValuePair(PCS_GDA94_MGA_zone_52,	28352)
-ValuePair(PCS_GDA94_MGA_zone_53,	28353)
-ValuePair(PCS_GDA94_MGA_zone_54,	28354)
-ValuePair(PCS_GDA94_MGA_zone_55,	28355)
-ValuePair(PCS_GDA94_MGA_zone_56,	28356)
-ValuePair(PCS_GDA94_MGA_zone_57,	28357)
-ValuePair(PCS_GDA94_MGA_zone_58,	28358)
-ValuePair(PCS_Pulkovo_Gauss_zone_4,	28404)
-ValuePair(PCS_Pulkovo_Gauss_zone_5,	28405)
-ValuePair(PCS_Pulkovo_Gauss_zone_6,	28406)
-ValuePair(PCS_Pulkovo_Gauss_zone_7,	28407)
-ValuePair(PCS_Pulkovo_Gauss_zone_8,	28408)
-ValuePair(PCS_Pulkovo_Gauss_zone_9,	28409)
-ValuePair(PCS_Pulkovo_Gauss_zone_10,	28410)
-ValuePair(PCS_Pulkovo_Gauss_zone_11,	28411)
-ValuePair(PCS_Pulkovo_Gauss_zone_12,	28412)
-ValuePair(PCS_Pulkovo_Gauss_zone_13,	28413)
-ValuePair(PCS_Pulkovo_Gauss_zone_14,	28414)
-ValuePair(PCS_Pulkovo_Gauss_zone_15,	28415)
-ValuePair(PCS_Pulkovo_Gauss_zone_16,	28416)
-ValuePair(PCS_Pulkovo_Gauss_zone_17,	28417)
-ValuePair(PCS_Pulkovo_Gauss_zone_18,	28418)
-ValuePair(PCS_Pulkovo_Gauss_zone_19,	28419)
-ValuePair(PCS_Pulkovo_Gauss_zone_20,	28420)
-ValuePair(PCS_Pulkovo_Gauss_zone_21,	28421)
-ValuePair(PCS_Pulkovo_Gauss_zone_22,	28422)
-ValuePair(PCS_Pulkovo_Gauss_zone_23,	28423)
-ValuePair(PCS_Pulkovo_Gauss_zone_24,	28424)
-ValuePair(PCS_Pulkovo_Gauss_zone_25,	28425)
-ValuePair(PCS_Pulkovo_Gauss_zone_26,	28426)
-ValuePair(PCS_Pulkovo_Gauss_zone_27,	28427)
-ValuePair(PCS_Pulkovo_Gauss_zone_28,	28428)
-ValuePair(PCS_Pulkovo_Gauss_zone_29,	28429)
-ValuePair(PCS_Pulkovo_Gauss_zone_30,	28430)
-ValuePair(PCS_Pulkovo_Gauss_zone_31,	28431)
-ValuePair(PCS_Pulkovo_Gauss_zone_32,	28432)
-ValuePair(PCS_Pulkovo_Gauss_4N,	28464)
-ValuePair(PCS_Pulkovo_Gauss_5N,	28465)
-ValuePair(PCS_Pulkovo_Gauss_6N,	28466)
-ValuePair(PCS_Pulkovo_Gauss_7N,	28467)
-ValuePair(PCS_Pulkovo_Gauss_8N,	28468)
-ValuePair(PCS_Pulkovo_Gauss_9N,	28469)
-ValuePair(PCS_Pulkovo_Gauss_10N,	28470)
-ValuePair(PCS_Pulkovo_Gauss_11N,	28471)
-ValuePair(PCS_Pulkovo_Gauss_12N,	28472)
-ValuePair(PCS_Pulkovo_Gauss_13N,	28473)
-ValuePair(PCS_Pulkovo_Gauss_14N,	28474)
-ValuePair(PCS_Pulkovo_Gauss_15N,	28475)
-ValuePair(PCS_Pulkovo_Gauss_16N,	28476)
-ValuePair(PCS_Pulkovo_Gauss_17N,	28477)
-ValuePair(PCS_Pulkovo_Gauss_18N,	28478)
-ValuePair(PCS_Pulkovo_Gauss_19N,	28479)
-ValuePair(PCS_Pulkovo_Gauss_20N,	28480)
-ValuePair(PCS_Pulkovo_Gauss_21N,	28481)
-ValuePair(PCS_Pulkovo_Gauss_22N,	28482)
-ValuePair(PCS_Pulkovo_Gauss_23N,	28483)
-ValuePair(PCS_Pulkovo_Gauss_24N,	28484)
-ValuePair(PCS_Pulkovo_Gauss_25N,	28485)
-ValuePair(PCS_Pulkovo_Gauss_26N,	28486)
-ValuePair(PCS_Pulkovo_Gauss_27N,	28487)
-ValuePair(PCS_Pulkovo_Gauss_28N,	28488)
-ValuePair(PCS_Pulkovo_Gauss_29N,	28489)
-ValuePair(PCS_Pulkovo_Gauss_30N,	28490)
-ValuePair(PCS_Pulkovo_Gauss_31N,	28491)
-ValuePair(PCS_Pulkovo_Gauss_32N,	28492)
-ValuePair(PCS_Qatar_National_Grid,	28600)
-ValuePair(PCS_RD_Netherlands_Old,	28991)
-ValuePair(PCS_RD_Netherlands_New,	28992)
-ValuePair(PCS_SAD69_UTM_zone_18N,	29118)
-ValuePair(PCS_SAD69_UTM_zone_19N,	29119)
-ValuePair(PCS_SAD69_UTM_zone_20N,	29120)
-ValuePair(PCS_SAD69_UTM_zone_21N,	29121)
-ValuePair(PCS_SAD69_UTM_zone_22N,	29122)
-ValuePair(PCS_SAD69_UTM_zone_17S,	29177)
-ValuePair(PCS_SAD69_UTM_zone_18S,	29178)
-ValuePair(PCS_SAD69_UTM_zone_19S,	29179)
-ValuePair(PCS_SAD69_UTM_zone_20S,	29180)
-ValuePair(PCS_SAD69_UTM_zone_21S,	29181)
-ValuePair(PCS_SAD69_UTM_zone_22S,	29182)
-ValuePair(PCS_SAD69_UTM_zone_23S,	29183)
-ValuePair(PCS_SAD69_UTM_zone_24S,	29184)
-ValuePair(PCS_SAD69_UTM_zone_25S,	29185)
-ValuePair(PCS_Sapper_Hill_UTM_20S,	29220)
-ValuePair(PCS_Sapper_Hill_UTM_21S,	29221)
-ValuePair(PCS_Schwarzeck_UTM_33S,	29333)
-ValuePair(PCS_Sudan_UTM_zone_35N,	29635)
-ValuePair(PCS_Sudan_UTM_zone_36N,	29636)
-ValuePair(PCS_Tananarive_Laborde,	29700)
-ValuePair(PCS_Tananarive_UTM_38S,	29738)
-ValuePair(PCS_Tananarive_UTM_39S,	29739)
-ValuePair(PCS_Timbalai_1948_Borneo,	29800)
-ValuePair(PCS_Timbalai_1948_UTM_49N,	29849)
-ValuePair(PCS_Timbalai_1948_UTM_50N,	29850)
-ValuePair(PCS_TM65_Irish_Nat_Grid,	29900)
-ValuePair(PCS_Trinidad_1903_Trinidad,	30200)
-ValuePair(PCS_TC_1948_UTM_zone_39N,	30339)
-ValuePair(PCS_TC_1948_UTM_zone_40N,	30340)
-ValuePair(PCS_Voirol_N_Algerie_ancien,	30491)
-ValuePair(PCS_Voirol_S_Algerie_ancien,	30492)
-ValuePair(PCS_Voirol_Unifie_N_Algerie,	30591)
-ValuePair(PCS_Voirol_Unifie_S_Algerie,	30592)
-ValuePair(PCS_Bern_1938_Swiss_New,	30600)
-ValuePair(PCS_Nord_Sahara_UTM_29N,	30729)
-ValuePair(PCS_Nord_Sahara_UTM_30N,	30730)
-ValuePair(PCS_Nord_Sahara_UTM_31N,	30731)
-ValuePair(PCS_Nord_Sahara_UTM_32N,	30732)
-ValuePair(PCS_Yoff_UTM_zone_28N,	31028)
-ValuePair(PCS_Zanderij_UTM_zone_21N,	31121)
-ValuePair(PCS_MGI_Austria_West,	31291)
-ValuePair(PCS_MGI_Austria_Central,	31292)
-ValuePair(PCS_MGI_Austria_East,	31293)
-ValuePair(PCS_Belge_Lambert_72,	31300)
-ValuePair(PCS_DHDN_Germany_zone_1,	31491)
-ValuePair(PCS_DHDN_Germany_zone_2,	31492)
-ValuePair(PCS_DHDN_Germany_zone_3,	31493)
-ValuePair(PCS_DHDN_Germany_zone_4,	31494)
-ValuePair(PCS_DHDN_Germany_zone_5,	31495)
-ValuePair(PCS_NAD27_Montana_North,	32001)
-ValuePair(PCS_NAD27_Montana_Central,	32002)
-ValuePair(PCS_NAD27_Montana_South,	32003)
-ValuePair(PCS_NAD27_Nebraska_North,	32005)
-ValuePair(PCS_NAD27_Nebraska_South,	32006)
-ValuePair(PCS_NAD27_Nevada_East,	32007)
-ValuePair(PCS_NAD27_Nevada_Central,	32008)
-ValuePair(PCS_NAD27_Nevada_West,	32009)
-ValuePair(PCS_NAD27_New_Hampshire,	32010)
-ValuePair(PCS_NAD27_New_Jersey,	32011)
-ValuePair(PCS_NAD27_New_Mexico_East,	32012)
-ValuePair(PCS_NAD27_New_Mexico_Cent,	32013)
-ValuePair(PCS_NAD27_New_Mexico_West,	32014)
-ValuePair(PCS_NAD27_New_York_East,	32015)
-ValuePair(PCS_NAD27_New_York_Central,	32016)
-ValuePair(PCS_NAD27_New_York_West,	32017)
-ValuePair(PCS_NAD27_New_York_Long_Is,	32018)
-ValuePair(PCS_NAD27_North_Carolina,	32019)
-ValuePair(PCS_NAD27_North_Dakota_N,	32020)
-ValuePair(PCS_NAD27_North_Dakota_S,	32021)
-ValuePair(PCS_NAD27_Ohio_North,	32022)
-ValuePair(PCS_NAD27_Ohio_South,	32023)
-ValuePair(PCS_NAD27_Oklahoma_North,	32024)
-ValuePair(PCS_NAD27_Oklahoma_South,	32025)
-ValuePair(PCS_NAD27_Oregon_North,	32026)
-ValuePair(PCS_NAD27_Oregon_South,	32027)
-ValuePair(PCS_NAD27_Pennsylvania_N,	32028)
-ValuePair(PCS_NAD27_Pennsylvania_S,	32029)
-ValuePair(PCS_NAD27_Rhode_Island,	32030)
-ValuePair(PCS_NAD27_South_Carolina_N,	32031)
-ValuePair(PCS_NAD27_South_Carolina_S,	32033)
-ValuePair(PCS_NAD27_South_Dakota_N,	32034)
-ValuePair(PCS_NAD27_South_Dakota_S,	32035)
-ValuePair(PCS_NAD27_Tennessee,		2204)
-ValuePair(PCS_NAD27_Texas_North,	32037)
-ValuePair(PCS_NAD27_Texas_North_Cen,	32038)
-ValuePair(PCS_NAD27_Texas_Central,	32039)
-ValuePair(PCS_NAD27_Texas_South_Cen,	32040)
-ValuePair(PCS_NAD27_Texas_South,	32041)
-ValuePair(PCS_NAD27_Utah_North,	32042)
-ValuePair(PCS_NAD27_Utah_Central,	32043)
-ValuePair(PCS_NAD27_Utah_South,	32044)
-ValuePair(PCS_NAD27_Vermont,	32045)
-ValuePair(PCS_NAD27_Virginia_North,	32046)
-ValuePair(PCS_NAD27_Virginia_South,	32047)
-ValuePair(PCS_NAD27_Washington_North,	32048)
-ValuePair(PCS_NAD27_Washington_South,	32049)
-ValuePair(PCS_NAD27_West_Virginia_N,	32050)
-ValuePair(PCS_NAD27_West_Virginia_S,	32051)
-ValuePair(PCS_NAD27_Wisconsin_North,	32052)
-ValuePair(PCS_NAD27_Wisconsin_Cen,	32053)
-ValuePair(PCS_NAD27_Wisconsin_South,	32054)
-ValuePair(PCS_NAD27_Wyoming_East,	32055)
-ValuePair(PCS_NAD27_Wyoming_E_Cen,	32056)
-ValuePair(PCS_NAD27_Wyoming_W_Cen,	32057)
-ValuePair(PCS_NAD27_Wyoming_West,	32058)
-ValuePair(PCS_NAD27_Puerto_Rico,	32059)
-ValuePair(PCS_NAD27_St_Croix,	32060)
-ValuePair(PCS_NAD83_Montana,	32100)
-ValuePair(PCS_NAD83_Nebraska,	32104)
-ValuePair(PCS_NAD83_Nevada_East,	32107)
-ValuePair(PCS_NAD83_Nevada_Central,	32108)
-ValuePair(PCS_NAD83_Nevada_West,	32109)
-ValuePair(PCS_NAD83_New_Hampshire,	32110)
-ValuePair(PCS_NAD83_New_Jersey,	32111)
-ValuePair(PCS_NAD83_New_Mexico_East,	32112)
-ValuePair(PCS_NAD83_New_Mexico_Cent,	32113)
-ValuePair(PCS_NAD83_New_Mexico_West,	32114)
-ValuePair(PCS_NAD83_New_York_East,	32115)
-ValuePair(PCS_NAD83_New_York_Central,	32116)
-ValuePair(PCS_NAD83_New_York_West,	32117)
-ValuePair(PCS_NAD83_New_York_Long_Is,	32118)
-ValuePair(PCS_NAD83_North_Carolina,	32119)
-ValuePair(PCS_NAD83_North_Dakota_N,	32120)
-ValuePair(PCS_NAD83_North_Dakota_S,	32121)
-ValuePair(PCS_NAD83_Ohio_North,	32122)
-ValuePair(PCS_NAD83_Ohio_South,	32123)
-ValuePair(PCS_NAD83_Oklahoma_North,	32124)
-ValuePair(PCS_NAD83_Oklahoma_South,	32125)
-ValuePair(PCS_NAD83_Oregon_North,	32126)
-ValuePair(PCS_NAD83_Oregon_South,	32127)
-ValuePair(PCS_NAD83_Pennsylvania_N,	32128)
-ValuePair(PCS_NAD83_Pennsylvania_S,	32129)
-ValuePair(PCS_NAD83_Rhode_Island,	32130)
-ValuePair(PCS_NAD83_South_Carolina,	32133)
-ValuePair(PCS_NAD83_South_Dakota_N,	32134)
-ValuePair(PCS_NAD83_South_Dakota_S,	32135)
-ValuePair(PCS_NAD83_Tennessee,	32136)
-ValuePair(PCS_NAD83_Texas_North,	32137)
-ValuePair(PCS_NAD83_Texas_North_Cen,	32138)
-ValuePair(PCS_NAD83_Texas_Central,	32139)
-ValuePair(PCS_NAD83_Texas_South_Cen,	32140)
-ValuePair(PCS_NAD83_Texas_South,	32141)
-ValuePair(PCS_NAD83_Utah_North,	32142)
-ValuePair(PCS_NAD83_Utah_Central,	32143)
-ValuePair(PCS_NAD83_Utah_South,	32144)
-ValuePair(PCS_NAD83_Vermont,	32145)
-ValuePair(PCS_NAD83_Virginia_North,	32146)
-ValuePair(PCS_NAD83_Virginia_South,	32147)
-ValuePair(PCS_NAD83_Washington_North,	32148)
-ValuePair(PCS_NAD83_Washington_South,	32149)
-ValuePair(PCS_NAD83_West_Virginia_N,	32150)
-ValuePair(PCS_NAD83_West_Virginia_S,	32151)
-ValuePair(PCS_NAD83_Wisconsin_North,	32152)
-ValuePair(PCS_NAD83_Wisconsin_Cen,	32153)
-ValuePair(PCS_NAD83_Wisconsin_South,	32154)
-ValuePair(PCS_NAD83_Wyoming_East,	32155)
-ValuePair(PCS_NAD83_Wyoming_E_Cen,	32156)
-ValuePair(PCS_NAD83_Wyoming_W_Cen,	32157)
-ValuePair(PCS_NAD83_Wyoming_West,	32158)
-ValuePair(PCS_NAD83_Puerto_Rico_Virgin_Is,	32161)
-ValuePair(PCS_WGS72_UTM_zone_1N,	32201)
-ValuePair(PCS_WGS72_UTM_zone_2N,	32202)
-ValuePair(PCS_WGS72_UTM_zone_3N,	32203)
-ValuePair(PCS_WGS72_UTM_zone_4N,	32204)
-ValuePair(PCS_WGS72_UTM_zone_5N,	32205)
-ValuePair(PCS_WGS72_UTM_zone_6N,	32206)
-ValuePair(PCS_WGS72_UTM_zone_7N,	32207)
-ValuePair(PCS_WGS72_UTM_zone_8N,	32208)
-ValuePair(PCS_WGS72_UTM_zone_9N,	32209)
-ValuePair(PCS_WGS72_UTM_zone_10N,	32210)
-ValuePair(PCS_WGS72_UTM_zone_11N,	32211)
-ValuePair(PCS_WGS72_UTM_zone_12N,	32212)
-ValuePair(PCS_WGS72_UTM_zone_13N,	32213)
-ValuePair(PCS_WGS72_UTM_zone_14N,	32214)
-ValuePair(PCS_WGS72_UTM_zone_15N,	32215)
-ValuePair(PCS_WGS72_UTM_zone_16N,	32216)
-ValuePair(PCS_WGS72_UTM_zone_17N,	32217)
-ValuePair(PCS_WGS72_UTM_zone_18N,	32218)
-ValuePair(PCS_WGS72_UTM_zone_19N,	32219)
-ValuePair(PCS_WGS72_UTM_zone_20N,	32220)
-ValuePair(PCS_WGS72_UTM_zone_21N,	32221)
-ValuePair(PCS_WGS72_UTM_zone_22N,	32222)
-ValuePair(PCS_WGS72_UTM_zone_23N,	32223)
-ValuePair(PCS_WGS72_UTM_zone_24N,	32224)
-ValuePair(PCS_WGS72_UTM_zone_25N,	32225)
-ValuePair(PCS_WGS72_UTM_zone_26N,	32226)
-ValuePair(PCS_WGS72_UTM_zone_27N,	32227)
-ValuePair(PCS_WGS72_UTM_zone_28N,	32228)
-ValuePair(PCS_WGS72_UTM_zone_29N,	32229)
-ValuePair(PCS_WGS72_UTM_zone_30N,	32230)
-ValuePair(PCS_WGS72_UTM_zone_31N,	32231)
-ValuePair(PCS_WGS72_UTM_zone_32N,	32232)
-ValuePair(PCS_WGS72_UTM_zone_33N,	32233)
-ValuePair(PCS_WGS72_UTM_zone_34N,	32234)
-ValuePair(PCS_WGS72_UTM_zone_35N,	32235)
-ValuePair(PCS_WGS72_UTM_zone_36N,	32236)
-ValuePair(PCS_WGS72_UTM_zone_37N,	32237)
-ValuePair(PCS_WGS72_UTM_zone_38N,	32238)
-ValuePair(PCS_WGS72_UTM_zone_39N,	32239)
-ValuePair(PCS_WGS72_UTM_zone_40N,	32240)
-ValuePair(PCS_WGS72_UTM_zone_41N,	32241)
-ValuePair(PCS_WGS72_UTM_zone_42N,	32242)
-ValuePair(PCS_WGS72_UTM_zone_43N,	32243)
-ValuePair(PCS_WGS72_UTM_zone_44N,	32244)
-ValuePair(PCS_WGS72_UTM_zone_45N,	32245)
-ValuePair(PCS_WGS72_UTM_zone_46N,	32246)
-ValuePair(PCS_WGS72_UTM_zone_47N,	32247)
-ValuePair(PCS_WGS72_UTM_zone_48N,	32248)
-ValuePair(PCS_WGS72_UTM_zone_49N,	32249)
-ValuePair(PCS_WGS72_UTM_zone_50N,	32250)
-ValuePair(PCS_WGS72_UTM_zone_51N,	32251)
-ValuePair(PCS_WGS72_UTM_zone_52N,	32252)
-ValuePair(PCS_WGS72_UTM_zone_53N,	32253)
-ValuePair(PCS_WGS72_UTM_zone_54N,	32254)
-ValuePair(PCS_WGS72_UTM_zone_55N,	32255)
-ValuePair(PCS_WGS72_UTM_zone_56N,	32256)
-ValuePair(PCS_WGS72_UTM_zone_57N,	32257)
-ValuePair(PCS_WGS72_UTM_zone_58N,	32258)
-ValuePair(PCS_WGS72_UTM_zone_59N,	32259)
-ValuePair(PCS_WGS72_UTM_zone_60N,	32260)
-ValuePair(PCS_WGS72_UTM_zone_1S,	32301)
-ValuePair(PCS_WGS72_UTM_zone_2S,	32302)
-ValuePair(PCS_WGS72_UTM_zone_3S,	32303)
-ValuePair(PCS_WGS72_UTM_zone_4S,	32304)
-ValuePair(PCS_WGS72_UTM_zone_5S,	32305)
-ValuePair(PCS_WGS72_UTM_zone_6S,	32306)
-ValuePair(PCS_WGS72_UTM_zone_7S,	32307)
-ValuePair(PCS_WGS72_UTM_zone_8S,	32308)
-ValuePair(PCS_WGS72_UTM_zone_9S,	32309)
-ValuePair(PCS_WGS72_UTM_zone_10S,	32310)
-ValuePair(PCS_WGS72_UTM_zone_11S,	32311)
-ValuePair(PCS_WGS72_UTM_zone_12S,	32312)
-ValuePair(PCS_WGS72_UTM_zone_13S,	32313)
-ValuePair(PCS_WGS72_UTM_zone_14S,	32314)
-ValuePair(PCS_WGS72_UTM_zone_15S,	32315)
-ValuePair(PCS_WGS72_UTM_zone_16S,	32316)
-ValuePair(PCS_WGS72_UTM_zone_17S,	32317)
-ValuePair(PCS_WGS72_UTM_zone_18S,	32318)
-ValuePair(PCS_WGS72_UTM_zone_19S,	32319)
-ValuePair(PCS_WGS72_UTM_zone_20S,	32320)
-ValuePair(PCS_WGS72_UTM_zone_21S,	32321)
-ValuePair(PCS_WGS72_UTM_zone_22S,	32322)
-ValuePair(PCS_WGS72_UTM_zone_23S,	32323)
-ValuePair(PCS_WGS72_UTM_zone_24S,	32324)
-ValuePair(PCS_WGS72_UTM_zone_25S,	32325)
-ValuePair(PCS_WGS72_UTM_zone_26S,	32326)
-ValuePair(PCS_WGS72_UTM_zone_27S,	32327)
-ValuePair(PCS_WGS72_UTM_zone_28S,	32328)
-ValuePair(PCS_WGS72_UTM_zone_29S,	32329)
-ValuePair(PCS_WGS72_UTM_zone_30S,	32330)
-ValuePair(PCS_WGS72_UTM_zone_31S,	32331)
-ValuePair(PCS_WGS72_UTM_zone_32S,	32332)
-ValuePair(PCS_WGS72_UTM_zone_33S,	32333)
-ValuePair(PCS_WGS72_UTM_zone_34S,	32334)
-ValuePair(PCS_WGS72_UTM_zone_35S,	32335)
-ValuePair(PCS_WGS72_UTM_zone_36S,	32336)
-ValuePair(PCS_WGS72_UTM_zone_37S,	32337)
-ValuePair(PCS_WGS72_UTM_zone_38S,	32338)
-ValuePair(PCS_WGS72_UTM_zone_39S,	32339)
-ValuePair(PCS_WGS72_UTM_zone_40S,	32340)
-ValuePair(PCS_WGS72_UTM_zone_41S,	32341)
-ValuePair(PCS_WGS72_UTM_zone_42S,	32342)
-ValuePair(PCS_WGS72_UTM_zone_43S,	32343)
-ValuePair(PCS_WGS72_UTM_zone_44S,	32344)
-ValuePair(PCS_WGS72_UTM_zone_45S,	32345)
-ValuePair(PCS_WGS72_UTM_zone_46S,	32346)
-ValuePair(PCS_WGS72_UTM_zone_47S,	32347)
-ValuePair(PCS_WGS72_UTM_zone_48S,	32348)
-ValuePair(PCS_WGS72_UTM_zone_49S,	32349)
-ValuePair(PCS_WGS72_UTM_zone_50S,	32350)
-ValuePair(PCS_WGS72_UTM_zone_51S,	32351)
-ValuePair(PCS_WGS72_UTM_zone_52S,	32352)
-ValuePair(PCS_WGS72_UTM_zone_53S,	32353)
-ValuePair(PCS_WGS72_UTM_zone_54S,	32354)
-ValuePair(PCS_WGS72_UTM_zone_55S,	32355)
-ValuePair(PCS_WGS72_UTM_zone_56S,	32356)
-ValuePair(PCS_WGS72_UTM_zone_57S,	32357)
-ValuePair(PCS_WGS72_UTM_zone_58S,	32358)
-ValuePair(PCS_WGS72_UTM_zone_59S,	32359)
-ValuePair(PCS_WGS72_UTM_zone_60S,	32360)
-ValuePair(PCS_WGS72BE_UTM_zone_1N,	32401)
-ValuePair(PCS_WGS72BE_UTM_zone_2N,	32402)
-ValuePair(PCS_WGS72BE_UTM_zone_3N,	32403)
-ValuePair(PCS_WGS72BE_UTM_zone_4N,	32404)
-ValuePair(PCS_WGS72BE_UTM_zone_5N,	32405)
-ValuePair(PCS_WGS72BE_UTM_zone_6N,	32406)
-ValuePair(PCS_WGS72BE_UTM_zone_7N,	32407)
-ValuePair(PCS_WGS72BE_UTM_zone_8N,	32408)
-ValuePair(PCS_WGS72BE_UTM_zone_9N,	32409)
-ValuePair(PCS_WGS72BE_UTM_zone_10N,	32410)
-ValuePair(PCS_WGS72BE_UTM_zone_11N,	32411)
-ValuePair(PCS_WGS72BE_UTM_zone_12N,	32412)
-ValuePair(PCS_WGS72BE_UTM_zone_13N,	32413)
-ValuePair(PCS_WGS72BE_UTM_zone_14N,	32414)
-ValuePair(PCS_WGS72BE_UTM_zone_15N,	32415)
-ValuePair(PCS_WGS72BE_UTM_zone_16N,	32416)
-ValuePair(PCS_WGS72BE_UTM_zone_17N,	32417)
-ValuePair(PCS_WGS72BE_UTM_zone_18N,	32418)
-ValuePair(PCS_WGS72BE_UTM_zone_19N,	32419)
-ValuePair(PCS_WGS72BE_UTM_zone_20N,	32420)
-ValuePair(PCS_WGS72BE_UTM_zone_21N,	32421)
-ValuePair(PCS_WGS72BE_UTM_zone_22N,	32422)
-ValuePair(PCS_WGS72BE_UTM_zone_23N,	32423)
-ValuePair(PCS_WGS72BE_UTM_zone_24N,	32424)
-ValuePair(PCS_WGS72BE_UTM_zone_25N,	32425)
-ValuePair(PCS_WGS72BE_UTM_zone_26N,	32426)
-ValuePair(PCS_WGS72BE_UTM_zone_27N,	32427)
-ValuePair(PCS_WGS72BE_UTM_zone_28N,	32428)
-ValuePair(PCS_WGS72BE_UTM_zone_29N,	32429)
-ValuePair(PCS_WGS72BE_UTM_zone_30N,	32430)
-ValuePair(PCS_WGS72BE_UTM_zone_31N,	32431)
-ValuePair(PCS_WGS72BE_UTM_zone_32N,	32432)
-ValuePair(PCS_WGS72BE_UTM_zone_33N,	32433)
-ValuePair(PCS_WGS72BE_UTM_zone_34N,	32434)
-ValuePair(PCS_WGS72BE_UTM_zone_35N,	32435)
-ValuePair(PCS_WGS72BE_UTM_zone_36N,	32436)
-ValuePair(PCS_WGS72BE_UTM_zone_37N,	32437)
-ValuePair(PCS_WGS72BE_UTM_zone_38N,	32438)
-ValuePair(PCS_WGS72BE_UTM_zone_39N,	32439)
-ValuePair(PCS_WGS72BE_UTM_zone_40N,	32440)
-ValuePair(PCS_WGS72BE_UTM_zone_41N,	32441)
-ValuePair(PCS_WGS72BE_UTM_zone_42N,	32442)
-ValuePair(PCS_WGS72BE_UTM_zone_43N,	32443)
-ValuePair(PCS_WGS72BE_UTM_zone_44N,	32444)
-ValuePair(PCS_WGS72BE_UTM_zone_45N,	32445)
-ValuePair(PCS_WGS72BE_UTM_zone_46N,	32446)
-ValuePair(PCS_WGS72BE_UTM_zone_47N,	32447)
-ValuePair(PCS_WGS72BE_UTM_zone_48N,	32448)
-ValuePair(PCS_WGS72BE_UTM_zone_49N,	32449)
-ValuePair(PCS_WGS72BE_UTM_zone_50N,	32450)
-ValuePair(PCS_WGS72BE_UTM_zone_51N,	32451)
-ValuePair(PCS_WGS72BE_UTM_zone_52N,	32452)
-ValuePair(PCS_WGS72BE_UTM_zone_53N,	32453)
-ValuePair(PCS_WGS72BE_UTM_zone_54N,	32454)
-ValuePair(PCS_WGS72BE_UTM_zone_55N,	32455)
-ValuePair(PCS_WGS72BE_UTM_zone_56N,	32456)
-ValuePair(PCS_WGS72BE_UTM_zone_57N,	32457)
-ValuePair(PCS_WGS72BE_UTM_zone_58N,	32458)
-ValuePair(PCS_WGS72BE_UTM_zone_59N,	32459)
-ValuePair(PCS_WGS72BE_UTM_zone_60N,	32460)
-ValuePair(PCS_WGS72BE_UTM_zone_1S,	32501)
-ValuePair(PCS_WGS72BE_UTM_zone_2S,	32502)
-ValuePair(PCS_WGS72BE_UTM_zone_3S,	32503)
-ValuePair(PCS_WGS72BE_UTM_zone_4S,	32504)
-ValuePair(PCS_WGS72BE_UTM_zone_5S,	32505)
-ValuePair(PCS_WGS72BE_UTM_zone_6S,	32506)
-ValuePair(PCS_WGS72BE_UTM_zone_7S,	32507)
-ValuePair(PCS_WGS72BE_UTM_zone_8S,	32508)
-ValuePair(PCS_WGS72BE_UTM_zone_9S,	32509)
-ValuePair(PCS_WGS72BE_UTM_zone_10S,	32510)
-ValuePair(PCS_WGS72BE_UTM_zone_11S,	32511)
-ValuePair(PCS_WGS72BE_UTM_zone_12S,	32512)
-ValuePair(PCS_WGS72BE_UTM_zone_13S,	32513)
-ValuePair(PCS_WGS72BE_UTM_zone_14S,	32514)
-ValuePair(PCS_WGS72BE_UTM_zone_15S,	32515)
-ValuePair(PCS_WGS72BE_UTM_zone_16S,	32516)
-ValuePair(PCS_WGS72BE_UTM_zone_17S,	32517)
-ValuePair(PCS_WGS72BE_UTM_zone_18S,	32518)
-ValuePair(PCS_WGS72BE_UTM_zone_19S,	32519)
-ValuePair(PCS_WGS72BE_UTM_zone_20S,	32520)
-ValuePair(PCS_WGS72BE_UTM_zone_21S,	32521)
-ValuePair(PCS_WGS72BE_UTM_zone_22S,	32522)
-ValuePair(PCS_WGS72BE_UTM_zone_23S,	32523)
-ValuePair(PCS_WGS72BE_UTM_zone_24S,	32524)
-ValuePair(PCS_WGS72BE_UTM_zone_25S,	32525)
-ValuePair(PCS_WGS72BE_UTM_zone_26S,	32526)
-ValuePair(PCS_WGS72BE_UTM_zone_27S,	32527)
-ValuePair(PCS_WGS72BE_UTM_zone_28S,	32528)
-ValuePair(PCS_WGS72BE_UTM_zone_29S,	32529)
-ValuePair(PCS_WGS72BE_UTM_zone_30S,	32530)
-ValuePair(PCS_WGS72BE_UTM_zone_31S,	32531)
-ValuePair(PCS_WGS72BE_UTM_zone_32S,	32532)
-ValuePair(PCS_WGS72BE_UTM_zone_33S,	32533)
-ValuePair(PCS_WGS72BE_UTM_zone_34S,	32534)
-ValuePair(PCS_WGS72BE_UTM_zone_35S,	32535)
-ValuePair(PCS_WGS72BE_UTM_zone_36S,	32536)
-ValuePair(PCS_WGS72BE_UTM_zone_37S,	32537)
-ValuePair(PCS_WGS72BE_UTM_zone_38S,	32538)
-ValuePair(PCS_WGS72BE_UTM_zone_39S,	32539)
-ValuePair(PCS_WGS72BE_UTM_zone_40S,	32540)
-ValuePair(PCS_WGS72BE_UTM_zone_41S,	32541)
-ValuePair(PCS_WGS72BE_UTM_zone_42S,	32542)
-ValuePair(PCS_WGS72BE_UTM_zone_43S,	32543)
-ValuePair(PCS_WGS72BE_UTM_zone_44S,	32544)
-ValuePair(PCS_WGS72BE_UTM_zone_45S,	32545)
-ValuePair(PCS_WGS72BE_UTM_zone_46S,	32546)
-ValuePair(PCS_WGS72BE_UTM_zone_47S,	32547)
-ValuePair(PCS_WGS72BE_UTM_zone_48S,	32548)
-ValuePair(PCS_WGS72BE_UTM_zone_49S,	32549)
-ValuePair(PCS_WGS72BE_UTM_zone_50S,	32550)
-ValuePair(PCS_WGS72BE_UTM_zone_51S,	32551)
-ValuePair(PCS_WGS72BE_UTM_zone_52S,	32552)
-ValuePair(PCS_WGS72BE_UTM_zone_53S,	32553)
-ValuePair(PCS_WGS72BE_UTM_zone_54S,	32554)
-ValuePair(PCS_WGS72BE_UTM_zone_55S,	32555)
-ValuePair(PCS_WGS72BE_UTM_zone_56S,	32556)
-ValuePair(PCS_WGS72BE_UTM_zone_57S,	32557)
-ValuePair(PCS_WGS72BE_UTM_zone_58S,	32558)
-ValuePair(PCS_WGS72BE_UTM_zone_59S,	32559)
-ValuePair(PCS_WGS72BE_UTM_zone_60S,	32560)
-ValuePair(PCS_WGS84_UTM_zone_1N,	32601)
-ValuePair(PCS_WGS84_UTM_zone_2N,	32602)
-ValuePair(PCS_WGS84_UTM_zone_3N,	32603)
-ValuePair(PCS_WGS84_UTM_zone_4N,	32604)
-ValuePair(PCS_WGS84_UTM_zone_5N,	32605)
-ValuePair(PCS_WGS84_UTM_zone_6N,	32606)
-ValuePair(PCS_WGS84_UTM_zone_7N,	32607)
-ValuePair(PCS_WGS84_UTM_zone_8N,	32608)
-ValuePair(PCS_WGS84_UTM_zone_9N,	32609)
-ValuePair(PCS_WGS84_UTM_zone_10N,	32610)
-ValuePair(PCS_WGS84_UTM_zone_11N,	32611)
-ValuePair(PCS_WGS84_UTM_zone_12N,	32612)
-ValuePair(PCS_WGS84_UTM_zone_13N,	32613)
-ValuePair(PCS_WGS84_UTM_zone_14N,	32614)
-ValuePair(PCS_WGS84_UTM_zone_15N,	32615)
-ValuePair(PCS_WGS84_UTM_zone_16N,	32616)
-ValuePair(PCS_WGS84_UTM_zone_17N,	32617)
-ValuePair(PCS_WGS84_UTM_zone_18N,	32618)
-ValuePair(PCS_WGS84_UTM_zone_19N,	32619)
-ValuePair(PCS_WGS84_UTM_zone_20N,	32620)
-ValuePair(PCS_WGS84_UTM_zone_21N,	32621)
-ValuePair(PCS_WGS84_UTM_zone_22N,	32622)
-ValuePair(PCS_WGS84_UTM_zone_23N,	32623)
-ValuePair(PCS_WGS84_UTM_zone_24N,	32624)
-ValuePair(PCS_WGS84_UTM_zone_25N,	32625)
-ValuePair(PCS_WGS84_UTM_zone_26N,	32626)
-ValuePair(PCS_WGS84_UTM_zone_27N,	32627)
-ValuePair(PCS_WGS84_UTM_zone_28N,	32628)
-ValuePair(PCS_WGS84_UTM_zone_29N,	32629)
-ValuePair(PCS_WGS84_UTM_zone_30N,	32630)
-ValuePair(PCS_WGS84_UTM_zone_31N,	32631)
-ValuePair(PCS_WGS84_UTM_zone_32N,	32632)
-ValuePair(PCS_WGS84_UTM_zone_33N,	32633)
-ValuePair(PCS_WGS84_UTM_zone_34N,	32634)
-ValuePair(PCS_WGS84_UTM_zone_35N,	32635)
-ValuePair(PCS_WGS84_UTM_zone_36N,	32636)
-ValuePair(PCS_WGS84_UTM_zone_37N,	32637)
-ValuePair(PCS_WGS84_UTM_zone_38N,	32638)
-ValuePair(PCS_WGS84_UTM_zone_39N,	32639)
-ValuePair(PCS_WGS84_UTM_zone_40N,	32640)
-ValuePair(PCS_WGS84_UTM_zone_41N,	32641)
-ValuePair(PCS_WGS84_UTM_zone_42N,	32642)
-ValuePair(PCS_WGS84_UTM_zone_43N,	32643)
-ValuePair(PCS_WGS84_UTM_zone_44N,	32644)
-ValuePair(PCS_WGS84_UTM_zone_45N,	32645)
-ValuePair(PCS_WGS84_UTM_zone_46N,	32646)
-ValuePair(PCS_WGS84_UTM_zone_47N,	32647)
-ValuePair(PCS_WGS84_UTM_zone_48N,	32648)
-ValuePair(PCS_WGS84_UTM_zone_49N,	32649)
-ValuePair(PCS_WGS84_UTM_zone_50N,	32650)
-ValuePair(PCS_WGS84_UTM_zone_51N,	32651)
-ValuePair(PCS_WGS84_UTM_zone_52N,	32652)
-ValuePair(PCS_WGS84_UTM_zone_53N,	32653)
-ValuePair(PCS_WGS84_UTM_zone_54N,	32654)
-ValuePair(PCS_WGS84_UTM_zone_55N,	32655)
-ValuePair(PCS_WGS84_UTM_zone_56N,	32656)
-ValuePair(PCS_WGS84_UTM_zone_57N,	32657)
-ValuePair(PCS_WGS84_UTM_zone_58N,	32658)
-ValuePair(PCS_WGS84_UTM_zone_59N,	32659)
-ValuePair(PCS_WGS84_UTM_zone_60N,	32660)
-ValuePair(PCS_WGS84_UTM_zone_1S,	32701)
-ValuePair(PCS_WGS84_UTM_zone_2S,	32702)
-ValuePair(PCS_WGS84_UTM_zone_3S,	32703)
-ValuePair(PCS_WGS84_UTM_zone_4S,	32704)
-ValuePair(PCS_WGS84_UTM_zone_5S,	32705)
-ValuePair(PCS_WGS84_UTM_zone_6S,	32706)
-ValuePair(PCS_WGS84_UTM_zone_7S,	32707)
-ValuePair(PCS_WGS84_UTM_zone_8S,	32708)
-ValuePair(PCS_WGS84_UTM_zone_9S,	32709)
-ValuePair(PCS_WGS84_UTM_zone_10S,	32710)
-ValuePair(PCS_WGS84_UTM_zone_11S,	32711)
-ValuePair(PCS_WGS84_UTM_zone_12S,	32712)
-ValuePair(PCS_WGS84_UTM_zone_13S,	32713)
-ValuePair(PCS_WGS84_UTM_zone_14S,	32714)
-ValuePair(PCS_WGS84_UTM_zone_15S,	32715)
-ValuePair(PCS_WGS84_UTM_zone_16S,	32716)
-ValuePair(PCS_WGS84_UTM_zone_17S,	32717)
-ValuePair(PCS_WGS84_UTM_zone_18S,	32718)
-ValuePair(PCS_WGS84_UTM_zone_19S,	32719)
-ValuePair(PCS_WGS84_UTM_zone_20S,	32720)
-ValuePair(PCS_WGS84_UTM_zone_21S,	32721)
-ValuePair(PCS_WGS84_UTM_zone_22S,	32722)
-ValuePair(PCS_WGS84_UTM_zone_23S,	32723)
-ValuePair(PCS_WGS84_UTM_zone_24S,	32724)
-ValuePair(PCS_WGS84_UTM_zone_25S,	32725)
-ValuePair(PCS_WGS84_UTM_zone_26S,	32726)
-ValuePair(PCS_WGS84_UTM_zone_27S,	32727)
-ValuePair(PCS_WGS84_UTM_zone_28S,	32728)
-ValuePair(PCS_WGS84_UTM_zone_29S,	32729)
-ValuePair(PCS_WGS84_UTM_zone_30S,	32730)
-ValuePair(PCS_WGS84_UTM_zone_31S,	32731)
-ValuePair(PCS_WGS84_UTM_zone_32S,	32732)
-ValuePair(PCS_WGS84_UTM_zone_33S,	32733)
-ValuePair(PCS_WGS84_UTM_zone_34S,	32734)
-ValuePair(PCS_WGS84_UTM_zone_35S,	32735)
-ValuePair(PCS_WGS84_UTM_zone_36S,	32736)
-ValuePair(PCS_WGS84_UTM_zone_37S,	32737)
-ValuePair(PCS_WGS84_UTM_zone_38S,	32738)
-ValuePair(PCS_WGS84_UTM_zone_39S,	32739)
-ValuePair(PCS_WGS84_UTM_zone_40S,	32740)
-ValuePair(PCS_WGS84_UTM_zone_41S,	32741)
-ValuePair(PCS_WGS84_UTM_zone_42S,	32742)
-ValuePair(PCS_WGS84_UTM_zone_43S,	32743)
-ValuePair(PCS_WGS84_UTM_zone_44S,	32744)
-ValuePair(PCS_WGS84_UTM_zone_45S,	32745)
-ValuePair(PCS_WGS84_UTM_zone_46S,	32746)
-ValuePair(PCS_WGS84_UTM_zone_47S,	32747)
-ValuePair(PCS_WGS84_UTM_zone_48S,	32748)
-ValuePair(PCS_WGS84_UTM_zone_49S,	32749)
-ValuePair(PCS_WGS84_UTM_zone_50S,	32750)
-ValuePair(PCS_WGS84_UTM_zone_51S,	32751)
-ValuePair(PCS_WGS84_UTM_zone_52S,	32752)
-ValuePair(PCS_WGS84_UTM_zone_53S,	32753)
-ValuePair(PCS_WGS84_UTM_zone_54S,	32754)
-ValuePair(PCS_WGS84_UTM_zone_55S,	32755)
-ValuePair(PCS_WGS84_UTM_zone_56S,	32756)
-ValuePair(PCS_WGS84_UTM_zone_57S,	32757)
-ValuePair(PCS_WGS84_UTM_zone_58S,	32758)
-ValuePair(PCS_WGS84_UTM_zone_59S,	32759)
-ValuePair(PCS_WGS84_UTM_zone_60S,	32760)
-/* end of list */
diff --git a/src/tiff/epsg_pm.inc b/src/tiff/epsg_pm.inc
deleted file mode 100644
index 1e41598..0000000
--- a/src/tiff/epsg_pm.inc
+++ /dev/null
@@ -1,22 +0,0 @@
-/* EPSG/GeoTIFF Rev 0.2 Prime Meridian Database */
-
-/* C database for Geotiff include files.   */
-/* the macro ValuePair() must be defined   */
-/* by the enclosing include file           */
-
-#ifdef INCLUDE_OLD_CODES
-#include old_pm.inc
-#endif /* OLD Codes */
-
-ValuePair(PM_Greenwich,	8901)
-ValuePair(PM_Lisbon,	8902)
-ValuePair(PM_Paris,	8903)
-ValuePair(PM_Bogota,	8904)
-ValuePair(PM_Madrid,	8905)
-ValuePair(PM_Rome,	8906)
-ValuePair(PM_Bern,	8907)
-ValuePair(PM_Jakarta,	8908)
-ValuePair(PM_Ferro,	8909)
-ValuePair(PM_Brussels,	8910)
-ValuePair(PM_Stockholm,	8911)
-/* end of list */
diff --git a/src/tiff/epsg_proj.inc b/src/tiff/epsg_proj.inc
deleted file mode 100644
index d6c8791..0000000
--- a/src/tiff/epsg_proj.inc
+++ /dev/null
@@ -1,443 +0,0 @@
-/*
- *  EPSG/POSC Projection Codes - GeoTIFF Rev 0.2
- */
-
-/* C database for Geotiff include files.   */
-/* the macro ValuePair() must be defined   */
-/* by the enclosing include file           */
-
-#ifdef INCLUDE_OLD_CODES
-#include old_proj.inc
-#endif /* OLD Codes */
-
-/* New codes */
-
-ValuePair(Proj_Stereo_70,19926)
-
-/* old codes */
-
-ValuePair(Proj_Alabama_CS27_East,	10101)
-ValuePair(Proj_Alabama_CS27_West,	10102)
-ValuePair(Proj_Alabama_CS83_East,	10131)
-ValuePair(Proj_Alabama_CS83_West,	10132)
-ValuePair(Proj_Arizona_Coordinate_System_east,	10201)
-ValuePair(Proj_Arizona_Coordinate_System_Central,	10202)
-ValuePair(Proj_Arizona_Coordinate_System_west,	10203)
-ValuePair(Proj_Arizona_CS83_east,	10231)
-ValuePair(Proj_Arizona_CS83_Central,	10232)
-ValuePair(Proj_Arizona_CS83_west,	10233)
-ValuePair(Proj_Arkansas_CS27_North,	10301)
-ValuePair(Proj_Arkansas_CS27_South,	10302)
-ValuePair(Proj_Arkansas_CS83_North,	10331)
-ValuePair(Proj_Arkansas_CS83_South,	10332)
-ValuePair(Proj_California_CS27_I,	10401)
-ValuePair(Proj_California_CS27_II,	10402)
-ValuePair(Proj_California_CS27_III,	10403)
-ValuePair(Proj_California_CS27_IV,	10404)
-ValuePair(Proj_California_CS27_V,	10405)
-ValuePair(Proj_California_CS27_VI,	10406)
-ValuePair(Proj_California_CS27_VII,	10407)
-ValuePair(Proj_California_CS83_1,	10431)
-ValuePair(Proj_California_CS83_2,	10432)
-ValuePair(Proj_California_CS83_3,	10433)
-ValuePair(Proj_California_CS83_4,	10434)
-ValuePair(Proj_California_CS83_5,	10435)
-ValuePair(Proj_California_CS83_6,	10436)
-ValuePair(Proj_Colorado_CS27_North,	10501)
-ValuePair(Proj_Colorado_CS27_Central,	10502)
-ValuePair(Proj_Colorado_CS27_South,	10503)
-ValuePair(Proj_Colorado_CS83_North,	10531)
-ValuePair(Proj_Colorado_CS83_Central,	10532)
-ValuePair(Proj_Colorado_CS83_South,	10533)
-ValuePair(Proj_Connecticut_CS27,	10600)
-ValuePair(Proj_Connecticut_CS83,	10630)
-ValuePair(Proj_Delaware_CS27,	10700)
-ValuePair(Proj_Delaware_CS83,	10730)
-ValuePair(Proj_Florida_CS27_East,	10901)
-ValuePair(Proj_Florida_CS27_West,	10902)
-ValuePair(Proj_Florida_CS27_North,	10903)
-ValuePair(Proj_Florida_CS83_East,	10931)
-ValuePair(Proj_Florida_CS83_West,	10932)
-ValuePair(Proj_Florida_CS83_North,	10933)
-ValuePair(Proj_Georgia_CS27_East,	11001)
-ValuePair(Proj_Georgia_CS27_West,	11002)
-ValuePair(Proj_Georgia_CS83_East,	11031)
-ValuePair(Proj_Georgia_CS83_West,	11032)
-ValuePair(Proj_Idaho_CS27_East,	11101)
-ValuePair(Proj_Idaho_CS27_Central,	11102)
-ValuePair(Proj_Idaho_CS27_West,	11103)
-ValuePair(Proj_Idaho_CS83_East,	11131)
-ValuePair(Proj_Idaho_CS83_Central,	11132)
-ValuePair(Proj_Idaho_CS83_West,	11133)
-ValuePair(Proj_Illinois_CS27_East,	11201)
-ValuePair(Proj_Illinois_CS27_West,	11202)
-ValuePair(Proj_Illinois_CS83_East,	11231)
-ValuePair(Proj_Illinois_CS83_West,	11232)
-ValuePair(Proj_Indiana_CS27_East,	11301)
-ValuePair(Proj_Indiana_CS27_West,	11302)
-ValuePair(Proj_Indiana_CS83_East,	11331)
-ValuePair(Proj_Indiana_CS83_West,	11332)
-ValuePair(Proj_Iowa_CS27_North,	11401)
-ValuePair(Proj_Iowa_CS27_South,	11402)
-ValuePair(Proj_Iowa_CS83_North,	11431)
-ValuePair(Proj_Iowa_CS83_South,	11432)
-ValuePair(Proj_Kansas_CS27_North,	11501)
-ValuePair(Proj_Kansas_CS27_South,	11502)
-ValuePair(Proj_Kansas_CS83_North,	11531)
-ValuePair(Proj_Kansas_CS83_South,	11532)
-ValuePair(Proj_Kentucky_CS27_North,	11601)
-ValuePair(Proj_Kentucky_CS27_South,	11602)
-ValuePair(Proj_Kentucky_CS83_North,	15303)
-ValuePair(Proj_Kentucky_CS83_South,	11632)
-ValuePair(Proj_Louisiana_CS27_North,	11701)
-ValuePair(Proj_Louisiana_CS27_South,	11702)
-ValuePair(Proj_Louisiana_CS83_North,	11731)
-ValuePair(Proj_Louisiana_CS83_South,	11732)
-ValuePair(Proj_Maine_CS27_East,	11801)
-ValuePair(Proj_Maine_CS27_West,	11802)
-ValuePair(Proj_Maine_CS83_East,	11831)
-ValuePair(Proj_Maine_CS83_West,	11832)
-ValuePair(Proj_Maryland_CS27,	11900)
-ValuePair(Proj_Maryland_CS83,	11930)
-ValuePair(Proj_Massachusetts_CS27_Mainland,	12001)
-ValuePair(Proj_Massachusetts_CS27_Island,	12002)
-ValuePair(Proj_Massachusetts_CS83_Mainland,	12031)
-ValuePair(Proj_Massachusetts_CS83_Island,	12032)
-ValuePair(Proj_Michigan_State_Plane_East,	12101)
-ValuePair(Proj_Michigan_State_Plane_Old_Central,	12102)
-ValuePair(Proj_Michigan_State_Plane_West,	12103)
-ValuePair(Proj_Michigan_CS27_North,	12111)
-ValuePair(Proj_Michigan_CS27_Central,	12112)
-ValuePair(Proj_Michigan_CS27_South,	12113)
-ValuePair(Proj_Michigan_CS83_North,	12141)
-ValuePair(Proj_Michigan_CS83_Central,	12142)
-ValuePair(Proj_Michigan_CS83_South,	12143)
-ValuePair(Proj_Minnesota_CS27_North,	12201)
-ValuePair(Proj_Minnesota_CS27_Central,	12202)
-ValuePair(Proj_Minnesota_CS27_South,	12203)
-ValuePair(Proj_Minnesota_CS83_North,	12231)
-ValuePair(Proj_Minnesota_CS83_Central,	12232)
-ValuePair(Proj_Minnesota_CS83_South,	12233)
-ValuePair(Proj_Mississippi_CS27_East,	12301)
-ValuePair(Proj_Mississippi_CS27_West,	12302)
-ValuePair(Proj_Mississippi_CS83_East,	12331)
-ValuePair(Proj_Mississippi_CS83_West,	12332)
-ValuePair(Proj_Missouri_CS27_East,	12401)
-ValuePair(Proj_Missouri_CS27_Central,	12402)
-ValuePair(Proj_Missouri_CS27_West,	12403)
-ValuePair(Proj_Missouri_CS83_East,	12431)
-ValuePair(Proj_Missouri_CS83_Central,	12432)
-ValuePair(Proj_Missouri_CS83_West,	12433)
-ValuePair(Proj_Montana_CS27_North,	12501)
-ValuePair(Proj_Montana_CS27_Central,	12502)
-ValuePair(Proj_Montana_CS27_South,	12503)
-ValuePair(Proj_Montana_CS83,	12530)
-ValuePair(Proj_Nebraska_CS27_North,	12601)
-ValuePair(Proj_Nebraska_CS27_South,	12602)
-ValuePair(Proj_Nebraska_CS83,	12630)
-ValuePair(Proj_Nevada_CS27_East,	12701)
-ValuePair(Proj_Nevada_CS27_Central,	12702)
-ValuePair(Proj_Nevada_CS27_West,	12703)
-ValuePair(Proj_Nevada_CS83_East,	12731)
-ValuePair(Proj_Nevada_CS83_Central,	12732)
-ValuePair(Proj_Nevada_CS83_West,	12733)
-ValuePair(Proj_New_Hampshire_CS27,	12800)
-ValuePair(Proj_New_Hampshire_CS83,	12830)
-ValuePair(Proj_New_Jersey_CS27,	12900)
-ValuePair(Proj_New_Jersey_CS83,	12930)
-ValuePair(Proj_New_Mexico_CS27_East,	13001)
-ValuePair(Proj_New_Mexico_CS27_Central,	13002)
-ValuePair(Proj_New_Mexico_CS27_West,	13003)
-ValuePair(Proj_New_Mexico_CS83_East,	13031)
-ValuePair(Proj_New_Mexico_CS83_Central,	13032)
-ValuePair(Proj_New_Mexico_CS83_West,	13033)
-ValuePair(Proj_New_York_CS27_East,	13101)
-ValuePair(Proj_New_York_CS27_Central,	13102)
-ValuePair(Proj_New_York_CS27_West,	13103)
-ValuePair(Proj_New_York_CS27_Long_Island,	13104)
-ValuePair(Proj_New_York_CS83_East,	13131)
-ValuePair(Proj_New_York_CS83_Central,	13132)
-ValuePair(Proj_New_York_CS83_West,	13133)
-ValuePair(Proj_New_York_CS83_Long_Island,	13134)
-ValuePair(Proj_North_Carolina_CS27,	13200)
-ValuePair(Proj_North_Carolina_CS83,	13230)
-ValuePair(Proj_North_Dakota_CS27_North,	13301)
-ValuePair(Proj_North_Dakota_CS27_South,	13302)
-ValuePair(Proj_North_Dakota_CS83_North,	13331)
-ValuePair(Proj_North_Dakota_CS83_South,	13332)
-ValuePair(Proj_Ohio_CS27_North,	13401)
-ValuePair(Proj_Ohio_CS27_South,	13402)
-ValuePair(Proj_Ohio_CS83_North,	13431)
-ValuePair(Proj_Ohio_CS83_South,	13432)
-ValuePair(Proj_Oklahoma_CS27_North,	13501)
-ValuePair(Proj_Oklahoma_CS27_South,	13502)
-ValuePair(Proj_Oklahoma_CS83_North,	13531)
-ValuePair(Proj_Oklahoma_CS83_South,	13532)
-ValuePair(Proj_Oregon_CS27_North,	13601)
-ValuePair(Proj_Oregon_CS27_South,	13602)
-ValuePair(Proj_Oregon_CS83_North,	13631)
-ValuePair(Proj_Oregon_CS83_South,	13632)
-ValuePair(Proj_Pennsylvania_CS27_North,	13701)
-ValuePair(Proj_Pennsylvania_CS27_South,	13702)
-ValuePair(Proj_Pennsylvania_CS83_North,	13731)
-ValuePair(Proj_Pennsylvania_CS83_South,	13732)
-ValuePair(Proj_Rhode_Island_CS27,	13800)
-ValuePair(Proj_Rhode_Island_CS83,	13830)
-ValuePair(Proj_South_Carolina_CS27_North,	13901)
-ValuePair(Proj_South_Carolina_CS27_South,	13902)
-ValuePair(Proj_South_Carolina_CS83,	13930)
-ValuePair(Proj_South_Dakota_CS27_North,	14001)
-ValuePair(Proj_South_Dakota_CS27_South,	14002)
-ValuePair(Proj_South_Dakota_CS83_North,	14031)
-ValuePair(Proj_South_Dakota_CS83_South,	14032)
-ValuePair(Proj_Tennessee_CS27,	15302)
-ValuePair(Proj_Tennessee_CS83,	14130)
-ValuePair(Proj_Texas_CS27_North,	14201)
-ValuePair(Proj_Texas_CS27_North_Central,	14202)
-ValuePair(Proj_Texas_CS27_Central,	14203)
-ValuePair(Proj_Texas_CS27_South_Central,	14204)
-ValuePair(Proj_Texas_CS27_South,	14205)
-ValuePair(Proj_Texas_CS83_North,	14231)
-ValuePair(Proj_Texas_CS83_North_Central,	14232)
-ValuePair(Proj_Texas_CS83_Central,	14233)
-ValuePair(Proj_Texas_CS83_South_Central,	14234)
-ValuePair(Proj_Texas_CS83_South,	14235)
-ValuePair(Proj_Utah_CS27_North,	14301)
-ValuePair(Proj_Utah_CS27_Central,	14302)
-ValuePair(Proj_Utah_CS27_South,	14303)
-ValuePair(Proj_Utah_CS83_North,	14331)
-ValuePair(Proj_Utah_CS83_Central,	14332)
-ValuePair(Proj_Utah_CS83_South,	14333)
-ValuePair(Proj_Vermont_CS27,	14400)
-ValuePair(Proj_Vermont_CS83,	14430)
-ValuePair(Proj_Virginia_CS27_North,	14501)
-ValuePair(Proj_Virginia_CS27_South,	14502)
-ValuePair(Proj_Virginia_CS83_North,	14531)
-ValuePair(Proj_Virginia_CS83_South,	14532)
-ValuePair(Proj_Washington_CS27_North,	14601)
-ValuePair(Proj_Washington_CS27_South,	14602)
-ValuePair(Proj_Washington_CS83_North,	14631)
-ValuePair(Proj_Washington_CS83_South,	14632)
-ValuePair(Proj_West_Virginia_CS27_North,	14701)
-ValuePair(Proj_West_Virginia_CS27_South,	14702)
-ValuePair(Proj_West_Virginia_CS83_North,	14731)
-ValuePair(Proj_West_Virginia_CS83_South,	14732)
-ValuePair(Proj_Wisconsin_CS27_North,	14801)
-ValuePair(Proj_Wisconsin_CS27_Central,	14802)
-ValuePair(Proj_Wisconsin_CS27_South,	14803)
-ValuePair(Proj_Wisconsin_CS83_North,	14831)
-ValuePair(Proj_Wisconsin_CS83_Central,	14832)
-ValuePair(Proj_Wisconsin_CS83_South,	14833)
-ValuePair(Proj_Wyoming_CS27_East,	14901)
-ValuePair(Proj_Wyoming_CS27_East_Central,	14902)
-ValuePair(Proj_Wyoming_CS27_West_Central,	14903)
-ValuePair(Proj_Wyoming_CS27_West,	14904)
-ValuePair(Proj_Wyoming_CS83_East,	14931)
-ValuePair(Proj_Wyoming_CS83_East_Central,	14932)
-ValuePair(Proj_Wyoming_CS83_West_Central,	14933)
-ValuePair(Proj_Wyoming_CS83_West,	14934)
-ValuePair(Proj_Alaska_CS27_1,	15001)
-ValuePair(Proj_Alaska_CS27_2,	15002)
-ValuePair(Proj_Alaska_CS27_3,	15003)
-ValuePair(Proj_Alaska_CS27_4,	15004)
-ValuePair(Proj_Alaska_CS27_5,	15005)
-ValuePair(Proj_Alaska_CS27_6,	15006)
-ValuePair(Proj_Alaska_CS27_7,	15007)
-ValuePair(Proj_Alaska_CS27_8,	15008)
-ValuePair(Proj_Alaska_CS27_9,	15009)
-ValuePair(Proj_Alaska_CS27_10,	15010)
-ValuePair(Proj_Alaska_CS83_1,	15031)
-ValuePair(Proj_Alaska_CS83_2,	15032)
-ValuePair(Proj_Alaska_CS83_3,	15033)
-ValuePair(Proj_Alaska_CS83_4,	15034)
-ValuePair(Proj_Alaska_CS83_5,	15035)
-ValuePair(Proj_Alaska_CS83_6,	15036)
-ValuePair(Proj_Alaska_CS83_7,	15037)
-ValuePair(Proj_Alaska_CS83_8,	15038)
-ValuePair(Proj_Alaska_CS83_9,	15039)
-ValuePair(Proj_Alaska_CS83_10,	15040)
-ValuePair(Proj_Hawaii_CS27_1,	15101)
-ValuePair(Proj_Hawaii_CS27_2,	15102)
-ValuePair(Proj_Hawaii_CS27_3,	15103)
-ValuePair(Proj_Hawaii_CS27_4,	15104)
-ValuePair(Proj_Hawaii_CS27_5,	15105)
-ValuePair(Proj_Hawaii_CS83_1,	15131)
-ValuePair(Proj_Hawaii_CS83_2,	15132)
-ValuePair(Proj_Hawaii_CS83_3,	15133)
-ValuePair(Proj_Hawaii_CS83_4,	15134)
-ValuePair(Proj_Hawaii_CS83_5,	15135)
-ValuePair(Proj_Puerto_Rico_CS27,	15201)
-ValuePair(Proj_St_Croix,	15202)
-ValuePair(Proj_Puerto_Rico_Virgin_Is,	15230)
-ValuePair(Proj_BLM_14N_feet,	15914)
-ValuePair(Proj_BLM_15N_feet,	15915)
-ValuePair(Proj_BLM_16N_feet,	15916)
-ValuePair(Proj_BLM_17N_feet,	15917)
-ValuePair(Proj_UTM_zone_1N,  16001)
-ValuePair(Proj_UTM_zone_2N,  16002)
-ValuePair(Proj_UTM_zone_3N,  16003)
-ValuePair(Proj_UTM_zone_4N,  16004)
-ValuePair(Proj_UTM_zone_5N,  16005)
-ValuePair(Proj_UTM_zone_6N,  16006)
-ValuePair(Proj_UTM_zone_7N,  16007)
-ValuePair(Proj_UTM_zone_8N,  16008)
-ValuePair(Proj_UTM_zone_9N,  16009)
-ValuePair(Proj_UTM_zone_10N, 16010)
-ValuePair(Proj_UTM_zone_11N, 16011)
-ValuePair(Proj_UTM_zone_12N, 16012)
-ValuePair(Proj_UTM_zone_13N, 16013)
-ValuePair(Proj_UTM_zone_14N, 16014)
-ValuePair(Proj_UTM_zone_15N, 16015)
-ValuePair(Proj_UTM_zone_16N, 16016)
-ValuePair(Proj_UTM_zone_17N, 16017)
-ValuePair(Proj_UTM_zone_18N, 16018)
-ValuePair(Proj_UTM_zone_19N, 16019)
-ValuePair(Proj_UTM_zone_20N, 16020)
-ValuePair(Proj_UTM_zone_21N, 16021)
-ValuePair(Proj_UTM_zone_22N, 16022)
-ValuePair(Proj_UTM_zone_23N, 16023)
-ValuePair(Proj_UTM_zone_24N, 16024)
-ValuePair(Proj_UTM_zone_25N, 16025)
-ValuePair(Proj_UTM_zone_26N, 16026)
-ValuePair(Proj_UTM_zone_27N, 16027)
-ValuePair(Proj_UTM_zone_28N, 16028)
-ValuePair(Proj_UTM_zone_29N, 16029)
-ValuePair(Proj_UTM_zone_30N, 16030)
-ValuePair(Proj_UTM_zone_31N, 16031)
-ValuePair(Proj_UTM_zone_32N, 16032)
-ValuePair(Proj_UTM_zone_33N, 16033)
-ValuePair(Proj_UTM_zone_34N, 16034)
-ValuePair(Proj_UTM_zone_35N, 16035)
-ValuePair(Proj_UTM_zone_36N, 16036)
-ValuePair(Proj_UTM_zone_37N, 16037)
-ValuePair(Proj_UTM_zone_38N, 16038)
-ValuePair(Proj_UTM_zone_39N, 16039)
-ValuePair(Proj_UTM_zone_40N, 16040)
-ValuePair(Proj_UTM_zone_41N, 16041)
-ValuePair(Proj_UTM_zone_42N, 16042)
-ValuePair(Proj_UTM_zone_43N, 16043)
-ValuePair(Proj_UTM_zone_44N, 16044)
-ValuePair(Proj_UTM_zone_45N, 16045)
-ValuePair(Proj_UTM_zone_46N, 16046)
-ValuePair(Proj_UTM_zone_47N, 16047)
-ValuePair(Proj_UTM_zone_48N, 16048)
-ValuePair(Proj_UTM_zone_49N, 16049)
-ValuePair(Proj_UTM_zone_50N, 16050)
-ValuePair(Proj_UTM_zone_51N, 16051)
-ValuePair(Proj_UTM_zone_52N, 16052)
-ValuePair(Proj_UTM_zone_53N, 16053)
-ValuePair(Proj_UTM_zone_54N, 16054)
-ValuePair(Proj_UTM_zone_55N, 16055)
-ValuePair(Proj_UTM_zone_56N, 16056)
-ValuePair(Proj_UTM_zone_57N, 16057)
-ValuePair(Proj_UTM_zone_58N, 16058)
-ValuePair(Proj_UTM_zone_59N, 16059)
-ValuePair(Proj_UTM_zone_60N, 16060)
-ValuePair(Proj_UTM_zone_1S,  16101)
-ValuePair(Proj_UTM_zone_2S,  16102)
-ValuePair(Proj_UTM_zone_3S,  16103)
-ValuePair(Proj_UTM_zone_4S,  16104)
-ValuePair(Proj_UTM_zone_5S,  16105)
-ValuePair(Proj_UTM_zone_6S,  16106)
-ValuePair(Proj_UTM_zone_7S,  16107)
-ValuePair(Proj_UTM_zone_8S,  16108)
-ValuePair(Proj_UTM_zone_9S,  16109)
-ValuePair(Proj_UTM_zone_10S, 16110)
-ValuePair(Proj_UTM_zone_11S, 16111)
-ValuePair(Proj_UTM_zone_12S, 16112)
-ValuePair(Proj_UTM_zone_13S, 16113)
-ValuePair(Proj_UTM_zone_14S, 16114)
-ValuePair(Proj_UTM_zone_15S, 16115)
-ValuePair(Proj_UTM_zone_16S, 16116)
-ValuePair(Proj_UTM_zone_17S, 16117)
-ValuePair(Proj_UTM_zone_18S, 16118)
-ValuePair(Proj_UTM_zone_19S, 16119)
-ValuePair(Proj_UTM_zone_20S, 16120)
-ValuePair(Proj_UTM_zone_21S, 16121)
-ValuePair(Proj_UTM_zone_22S, 16122)
-ValuePair(Proj_UTM_zone_23S, 16123)
-ValuePair(Proj_UTM_zone_24S, 16124)
-ValuePair(Proj_UTM_zone_25S, 16125)
-ValuePair(Proj_UTM_zone_26S, 16126)
-ValuePair(Proj_UTM_zone_27S, 16127)
-ValuePair(Proj_UTM_zone_28S, 16128)
-ValuePair(Proj_UTM_zone_29S, 16129)
-ValuePair(Proj_UTM_zone_30S, 16130)
-ValuePair(Proj_UTM_zone_31S, 16131)
-ValuePair(Proj_UTM_zone_32S, 16132)
-ValuePair(Proj_UTM_zone_33S, 16133)
-ValuePair(Proj_UTM_zone_34S, 16134)
-ValuePair(Proj_UTM_zone_35S, 16135)
-ValuePair(Proj_UTM_zone_36S, 16136)
-ValuePair(Proj_UTM_zone_37S, 16137)
-ValuePair(Proj_UTM_zone_38S, 16138)
-ValuePair(Proj_UTM_zone_39S, 16139)
-ValuePair(Proj_UTM_zone_40S, 16140)
-ValuePair(Proj_UTM_zone_41S, 16141)
-ValuePair(Proj_UTM_zone_42S, 16142)
-ValuePair(Proj_UTM_zone_43S, 16143)
-ValuePair(Proj_UTM_zone_44S, 16144)
-ValuePair(Proj_UTM_zone_45S, 16145)
-ValuePair(Proj_UTM_zone_46S, 16146)
-ValuePair(Proj_UTM_zone_47S, 16147)
-ValuePair(Proj_UTM_zone_48S, 16148)
-ValuePair(Proj_UTM_zone_49S, 16149)
-ValuePair(Proj_UTM_zone_50S, 16150)
-ValuePair(Proj_UTM_zone_51S, 16151)
-ValuePair(Proj_UTM_zone_52S, 16152)
-ValuePair(Proj_UTM_zone_53S, 16153)
-ValuePair(Proj_UTM_zone_54S, 16154)
-ValuePair(Proj_UTM_zone_55S, 16155)
-ValuePair(Proj_UTM_zone_56S, 16156)
-ValuePair(Proj_UTM_zone_57S, 16157)
-ValuePair(Proj_UTM_zone_58S, 16158)
-ValuePair(Proj_UTM_zone_59S, 16159)
-ValuePair(Proj_UTM_zone_60S, 16160)
-ValuePair(Proj_Gauss_Kruger_zone_0, 16200)
-ValuePair(Proj_Gauss_Kruger_zone_1, 16201)
-ValuePair(Proj_Gauss_Kruger_zone_2, 16202)
-ValuePair(Proj_Gauss_Kruger_zone_3, 16203)
-ValuePair(Proj_Gauss_Kruger_zone_4, 16204)
-ValuePair(Proj_Gauss_Kruger_zone_5, 16205)
-ValuePair(Proj_Map_Grid_of_Australia_48,	17348)
-ValuePair(Proj_Map_Grid_of_Australia_49,	17349)
-ValuePair(Proj_Map_Grid_of_Australia_50,	17350)
-ValuePair(Proj_Map_Grid_of_Australia_51,	17351)
-ValuePair(Proj_Map_Grid_of_Australia_52,	17352)
-ValuePair(Proj_Map_Grid_of_Australia_53,	17353)
-ValuePair(Proj_Map_Grid_of_Australia_54,	17354)
-ValuePair(Proj_Map_Grid_of_Australia_55,	17355)
-ValuePair(Proj_Map_Grid_of_Australia_56,	17356)
-ValuePair(Proj_Map_Grid_of_Australia_57,	17357)
-ValuePair(Proj_Map_Grid_of_Australia_58,	17358)
-ValuePair(Proj_Australian_Map_Grid_48,	17448)
-ValuePair(Proj_Australian_Map_Grid_49,	17449)
-ValuePair(Proj_Australian_Map_Grid_50,	17450)
-ValuePair(Proj_Australian_Map_Grid_51,	17451)
-ValuePair(Proj_Australian_Map_Grid_52,	17452)
-ValuePair(Proj_Australian_Map_Grid_53,	17453)
-ValuePair(Proj_Australian_Map_Grid_54,	17454)
-ValuePair(Proj_Australian_Map_Grid_55,	17455)
-ValuePair(Proj_Australian_Map_Grid_56,	17456)
-ValuePair(Proj_Australian_Map_Grid_57,	17457)
-ValuePair(Proj_Australian_Map_Grid_58,	17458)
-ValuePair(Proj_Argentina_1,	18031)
-ValuePair(Proj_Argentina_2,	18032)
-ValuePair(Proj_Argentina_3,	18033)
-ValuePair(Proj_Argentina_4,	18034)
-ValuePair(Proj_Argentina_5,	18035)
-ValuePair(Proj_Argentina_6,	18036)
-ValuePair(Proj_Argentina_7,	18037)
-ValuePair(Proj_Colombia_3W,	18051)
-ValuePair(Proj_Colombia_Bogota,	18052)
-ValuePair(Proj_Colombia_3E,	18053)
-ValuePair(Proj_Colombia_6E,	18054)
-ValuePair(Proj_Egypt_Red_Belt,	18072)
-ValuePair(Proj_Egypt_Purple_Belt,	18073)
-ValuePair(Proj_Extended_Purple_Belt,	18074)
-ValuePair(Proj_New_Zealand_North_Island_Nat_Grid,	18141)
-ValuePair(Proj_New_Zealand_South_Island_Nat_Grid,	18142)
-ValuePair(Proj_Bahrain_Grid,	19900)
-ValuePair(Proj_Netherlands_E_Indies_Equatorial,	19905)
-ValuePair(Proj_RSO_Borneo,	19912)
-/* end of list */
diff --git a/src/tiff/epsg_units.inc b/src/tiff/epsg_units.inc
deleted file mode 100644
index fe1b5db..0000000
--- a/src/tiff/epsg_units.inc
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Rev. 0.2 EPSG/POSC Units Database.
- */
- 
-#ifdef INCLUDE_OLD_CODES
-#include geo_units.inc
-#endif /* OLD Codes */
-
-ValuePair(Linear_Meter,	9001)
-ValuePair(Linear_Foot,	9002)
-ValuePair(Linear_Foot_US_Survey,	9003)
-ValuePair(Linear_Foot_Modified_American,	9004)
-ValuePair(Linear_Foot_Clarke,	9005)
-ValuePair(Linear_Foot_Indian,	9006)
-ValuePair(Linear_Link,	9007)
-ValuePair(Linear_Link_Benoit,	9008)
-ValuePair(Linear_Link_Sears,	9009)
-ValuePair(Linear_Chain_Benoit,	9010)
-ValuePair(Linear_Chain_Sears,	9011)
-ValuePair(Linear_Yard_Sears,	9012)
-ValuePair(Linear_Yard_Indian,	9013)
-ValuePair(Linear_Fathom,	9014)
-ValuePair(Linear_Mile_International_Nautical,	9015)
-/*
- *  Angular Units
- */
-ValuePair(Angular_Radian,	9101)
-ValuePair(Angular_Degree,	9102)
-ValuePair(Angular_Arc_Minute,	9103)
-ValuePair(Angular_Arc_Second,	9104)
-ValuePair(Angular_Grad,	9105)
-ValuePair(Angular_Gon,	9106)
-ValuePair(Angular_DMS,	9107)
-ValuePair(Angular_DMS_Hemisphere,	9108)
-/* end of list */
diff --git a/src/tiff/epsg_vertcs.inc b/src/tiff/epsg_vertcs.inc
deleted file mode 100644
index d6b6791..0000000
--- a/src/tiff/epsg_vertcs.inc
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- *  EPSG/POSC Ellipsoid-referenced Vertical CS
- *   Note: these should correspond exactly with the Ellipsoid database.
- */
-ValuePair(VertCS_Airy_1830_ellipsoid,	5001)
-ValuePair(VertCS_Airy_Modified_1849_ellipsoid,	5002)
-ValuePair(VertCS_ANS_ellipsoid,	5003)
-ValuePair(VertCS_Bessel_1841_ellipsoid,	5004)
-ValuePair(VertCS_Bessel_Modified_ellipsoid,	5005)
-ValuePair(VertCS_Bessel_Namibia_ellipsoid,	5006)
-ValuePair(VertCS_Clarke_1858_ellipsoid,	5007)
-ValuePair(VertCS_Clarke_1866_ellipsoid,	5008)
-ValuePair(VertCS_Clarke_1880_Benoit_ellipsoid,	5010)
-ValuePair(VertCS_Clarke_1880_IGN_ellipsoid,	5011)
-ValuePair(VertCS_Clarke_1880_RGS_ellipsoid,	5012)
-ValuePair(VertCS_Clarke_1880_Arc_ellipsoid,	5013)
-ValuePair(VertCS_Clarke_1880_SGA_1922_ellipsoid,	5014)
-ValuePair(VertCS_Everest_1830_1937_Adjustment_ellipsoid,	5015)
-ValuePair(VertCS_Everest_1830_1967_Definition_ellipsoid,	5016)
-ValuePair(VertCS_Everest_1830_1975_Definition_ellipsoid,	5017)
-ValuePair(VertCS_Everest_1830_Modified_ellipsoid,	5018)
-ValuePair(VertCS_GRS_1980_ellipsoid,	5019)
-ValuePair(VertCS_Helmert_1906_ellipsoid,	5020)
-ValuePair(VertCS_INS_ellipsoid,	5021)
-ValuePair(VertCS_International_1924_ellipsoid,	5022)
-ValuePair(VertCS_International_1967_ellipsoid,	5023)
-ValuePair(VertCS_Krassowsky_1940_ellipsoid,	5024)
-ValuePair(VertCS_NWL_9D_ellipsoid,	5025)
-ValuePair(VertCS_NWL_10D_ellipsoid,	5026)
-ValuePair(VertCS_Plessis_1817_ellipsoid,	5027)
-ValuePair(VertCS_Struve_1860_ellipsoid,	5028)
-ValuePair(VertCS_War_Office_ellipsoid,	5029)
-ValuePair(VertCS_WGS_84_ellipsoid,	5030)
-ValuePair(VertCS_GEM_10C_ellipsoid,	5031)
-ValuePair(VertCS_OSU86F_ellipsoid,	5032)
-ValuePair(VertCS_OSU91A_ellipsoid,	5033)
-/*
- *  Other established Vertical CS
- */
-ValuePair(VertCS_Newlyn,	5101)
-ValuePair(VertCS_North_American_Vertical_Datum_1929,	5102)
-ValuePair(VertCS_North_American_Vertical_Datum_1988,	5103)
-ValuePair(VertCS_Yellow_Sea_1956,	5104)
-ValuePair(VertCS_Baltic_Sea,	5105)
-ValuePair(VertCS_Caspian_Sea,	5106)
-/* end of list */
diff --git a/src/tiff/fax3sm.c b/src/tiff/fax3sm.c
deleted file mode 100644
index 564c9aa..0000000
--- a/src/tiff/fax3sm.c
+++ /dev/null
@@ -1,1046 +0,0 @@
-/* WARNING, this file was automatically generated by the
-    mkg3states program */
-#include "tiff.h"
-#include "tif_fax3.h"
- const  TIFFFaxTabEnt TIFFFaxMainTable[128] = {
-12,7,0,3,1,0,5,3,1,3,1,0,2,3,0,3,1,0,4,3,1,3,1,0,1,4,0,3,1,0,5,3,1,3,1,0,
-2,3,0,3,1,0,4,3,1,3,1,0,5,6,2,3,1,0,5,3,1,3,1,0,2,3,0,3,1,0,4,3,1,3,1,0,
-1,4,0,3,1,0,5,3,1,3,1,0,2,3,0,3,1,0,4,3,1,3,1,0,5,7,3,3,1,0,5,3,1,3,1,0,
-2,3,0,3,1,0,4,3,1,3,1,0,1,4,0,3,1,0,5,3,1,3,1,0,2,3,0,3,1,0,4,3,1,3,1,0,
-4,6,2,3,1,0,5,3,1,3,1,0,2,3,0,3,1,0,4,3,1,3,1,0,1,4,0,3,1,0,5,3,1,3,1,0,
-2,3,0,3,1,0,4,3,1,3,1,0,6,7,0,3,1,0,5,3,1,3,1,0,2,3,0,3,1,0,4,3,1,3,1,0,
-1,4,0,3,1,0,5,3,1,3,1,0,2,3,0,3,1,0,4,3,1,3,1,0,5,6,2,3,1,0,5,3,1,3,1,0,
-2,3,0,3,1,0,4,3,1,3,1,0,1,4,0,3,1,0,5,3,1,3,1,0,2,3,0,3,1,0,4,3,1,3,1,0,
-4,7,3,3,1,0,5,3,1,3,1,0,2,3,0,3,1,0,4,3,1,3,1,0,1,4,0,3,1,0,5,3,1,3,1,0,
-2,3,0,3,1,0,4,3,1,3,1,0,4,6,2,3,1,0,5,3,1,3,1,0,2,3,0,3,1,0,4,3,1,3,1,0,
-1,4,0,3,1,0,5,3,1,3,1,0,2,3,0,3,1,0,4,3,1,3,1,0
-};
-const TIFFFaxTabEnt TIFFFaxWhiteTable[4096] = {
-12,11,0,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,
-7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,7,8,39,7,6,16,9,8,576,7,4,6,
-7,7,19,7,5,8,7,8,55,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,45,7,4,3,7,5,11,7,4,5,
-7,8,53,7,5,9,9,8,448,7,4,6,7,8,35,9,5,128,7,8,51,7,6,15,7,8,63,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,9,9,1472,7,4,5,7,8,43,7,6,17,9,9,1216,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,29,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,8,33,9,5,128,7,8,49,7,6,14,7,8,61,7,4,4,7,4,2,7,4,7,7,8,47,7,4,3,7,8,59,7,4,5,
-7,8,41,7,6,16,9,9,960,7,4,6,7,8,31,7,5,8,7,8,57,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,9,704,7,4,6,7,8,37,9,5,128,7,7,25,7,6,15,
-9,8,320,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,11,11,1792,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,
-7,7,23,7,4,3,7,7,27,7,4,5,7,8,40,7,6,16,9,9,832,7,4,6,7,7,19,7,5,8,7,8,56,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,46,7,4,3,7,5,11,7,4,5,7,8,54,7,5,9,9,8,512,7,4,6,
-7,8,36,9,5,128,7,8,52,7,6,15,7,8,0,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1600,7,4,5,
-7,8,44,7,6,17,9,9,1344,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,30,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,8,34,9,5,128,7,8,50,7,6,14,
-7,8,62,7,4,4,7,4,2,7,4,7,7,8,48,7,4,3,7,8,60,7,4,5,7,8,42,7,6,16,9,9,1088,7,4,6,
-7,8,32,7,5,8,7,8,58,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,
-7,7,26,7,5,9,9,8,640,7,4,6,7,8,38,9,5,128,7,7,25,7,6,15,9,8,384,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,0,0,0,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,
-7,8,39,7,6,16,9,8,576,7,4,6,7,7,19,7,5,8,7,8,55,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,45,7,4,3,7,5,11,7,4,5,7,8,53,7,5,9,9,8,448,7,4,6,7,8,35,9,5,128,7,8,51,7,6,15,
-7,8,63,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1536,7,4,5,7,8,43,7,6,17,9,9,1280,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,29,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,8,33,9,5,128,7,8,49,7,6,14,7,8,61,7,4,4,7,4,2,7,4,7,
-7,8,47,7,4,3,7,8,59,7,4,5,7,8,41,7,6,16,9,9,1024,7,4,6,7,8,31,7,5,8,7,8,57,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,9,768,7,4,6,
-7,8,37,9,5,128,7,7,25,7,6,15,9,8,320,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,
-7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-11,11,1856,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,
-7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,7,8,40,7,6,16,9,9,896,7,4,6,
-7,7,19,7,5,8,7,8,56,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,46,7,4,3,7,5,11,7,4,5,
-7,8,54,7,5,9,9,8,512,7,4,6,7,8,36,9,5,128,7,8,52,7,6,15,7,8,0,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,9,9,1728,7,4,5,7,8,44,7,6,17,9,9,1408,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,30,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,8,34,9,5,128,7,8,50,7,6,14,7,8,62,7,4,4,7,4,2,7,4,7,7,8,48,7,4,3,7,8,60,7,4,5,
-7,8,42,7,6,16,9,9,1152,7,4,6,7,8,32,7,5,8,7,8,58,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,8,640,7,4,6,7,8,38,9,5,128,7,7,25,7,6,15,
-9,8,384,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,0,0,0,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,
-7,7,23,7,4,3,7,7,27,7,4,5,7,8,39,7,6,16,9,8,576,7,4,6,7,7,19,7,5,8,7,8,55,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,45,7,4,3,7,5,11,7,4,5,7,8,53,7,5,9,9,8,448,7,4,6,
-7,8,35,9,5,128,7,8,51,7,6,15,7,8,63,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1472,7,4,5,
-7,8,43,7,6,17,9,9,1216,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,29,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,8,33,9,5,128,7,8,49,7,6,14,
-7,8,61,7,4,4,7,4,2,7,4,7,7,8,47,7,4,3,7,8,59,7,4,5,7,8,41,7,6,16,9,9,960,7,4,6,
-7,8,31,7,5,8,7,8,57,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,
-7,7,26,7,5,9,9,9,704,7,4,6,7,8,37,9,5,128,7,7,25,7,6,15,9,8,320,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,11,12,2112,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,
-7,8,40,7,6,16,9,9,832,7,4,6,7,7,19,7,5,8,7,8,56,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,46,7,4,3,7,5,11,7,4,5,7,8,54,7,5,9,9,8,512,7,4,6,7,8,36,9,5,128,7,8,52,7,6,15,
-7,8,0,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1600,7,4,5,7,8,44,7,6,17,9,9,1344,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,30,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,8,34,9,5,128,7,8,50,7,6,14,7,8,62,7,4,4,7,4,2,7,4,7,
-7,8,48,7,4,3,7,8,60,7,4,5,7,8,42,7,6,16,9,9,1088,7,4,6,7,8,32,7,5,8,7,8,58,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,8,640,7,4,6,
-7,8,38,9,5,128,7,7,25,7,6,15,9,8,384,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,
-7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-0,0,0,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,
-7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,7,8,39,7,6,16,9,8,576,7,4,6,
-7,7,19,7,5,8,7,8,55,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,45,7,4,3,7,5,11,7,4,5,
-7,8,53,7,5,9,9,8,448,7,4,6,7,8,35,9,5,128,7,8,51,7,6,15,7,8,63,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,9,9,1536,7,4,5,7,8,43,7,6,17,9,9,1280,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,29,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,8,33,9,5,128,7,8,49,7,6,14,7,8,61,7,4,4,7,4,2,7,4,7,7,8,47,7,4,3,7,8,59,7,4,5,
-7,8,41,7,6,16,9,9,1024,7,4,6,7,8,31,7,5,8,7,8,57,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,9,768,7,4,6,7,8,37,9,5,128,7,7,25,7,6,15,
-9,8,320,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,11,12,2368,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,
-7,7,23,7,4,3,7,7,27,7,4,5,7,8,40,7,6,16,9,9,896,7,4,6,7,7,19,7,5,8,7,8,56,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,46,7,4,3,7,5,11,7,4,5,7,8,54,7,5,9,9,8,512,7,4,6,
-7,8,36,9,5,128,7,8,52,7,6,15,7,8,0,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1728,7,4,5,
-7,8,44,7,6,17,9,9,1408,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,30,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,8,34,9,5,128,7,8,50,7,6,14,
-7,8,62,7,4,4,7,4,2,7,4,7,7,8,48,7,4,3,7,8,60,7,4,5,7,8,42,7,6,16,9,9,1152,7,4,6,
-7,8,32,7,5,8,7,8,58,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,
-7,7,26,7,5,9,9,8,640,7,4,6,7,8,38,9,5,128,7,7,25,7,6,15,9,8,384,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,0,0,0,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,
-7,8,39,7,6,16,9,8,576,7,4,6,7,7,19,7,5,8,7,8,55,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,45,7,4,3,7,5,11,7,4,5,7,8,53,7,5,9,9,8,448,7,4,6,7,8,35,9,5,128,7,8,51,7,6,15,
-7,8,63,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1472,7,4,5,7,8,43,7,6,17,9,9,1216,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,29,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,8,33,9,5,128,7,8,49,7,6,14,7,8,61,7,4,4,7,4,2,7,4,7,
-7,8,47,7,4,3,7,8,59,7,4,5,7,8,41,7,6,16,9,9,960,7,4,6,7,8,31,7,5,8,7,8,57,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,9,704,7,4,6,
-7,8,37,9,5,128,7,7,25,7,6,15,9,8,320,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,
-7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-11,12,1984,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,
-7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,7,8,40,7,6,16,9,9,832,7,4,6,
-7,7,19,7,5,8,7,8,56,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,46,7,4,3,7,5,11,7,4,5,
-7,8,54,7,5,9,9,8,512,7,4,6,7,8,36,9,5,128,7,8,52,7,6,15,7,8,0,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,9,9,1600,7,4,5,7,8,44,7,6,17,9,9,1344,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,30,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,8,34,9,5,128,7,8,50,7,6,14,7,8,62,7,4,4,7,4,2,7,4,7,7,8,48,7,4,3,7,8,60,7,4,5,
-7,8,42,7,6,16,9,9,1088,7,4,6,7,8,32,7,5,8,7,8,58,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,8,640,7,4,6,7,8,38,9,5,128,7,7,25,7,6,15,
-9,8,384,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,0,0,0,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,
-7,7,23,7,4,3,7,7,27,7,4,5,7,8,39,7,6,16,9,8,576,7,4,6,7,7,19,7,5,8,7,8,55,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,45,7,4,3,7,5,11,7,4,5,7,8,53,7,5,9,9,8,448,7,4,6,
-7,8,35,9,5,128,7,8,51,7,6,15,7,8,63,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1536,7,4,5,
-7,8,43,7,6,17,9,9,1280,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,29,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,8,33,9,5,128,7,8,49,7,6,14,
-7,8,61,7,4,4,7,4,2,7,4,7,7,8,47,7,4,3,7,8,59,7,4,5,7,8,41,7,6,16,9,9,1024,7,4,6,
-7,8,31,7,5,8,7,8,57,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,
-7,7,26,7,5,9,9,9,768,7,4,6,7,8,37,9,5,128,7,7,25,7,6,15,9,8,320,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,11,11,1920,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,
-7,8,40,7,6,16,9,9,896,7,4,6,7,7,19,7,5,8,7,8,56,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,46,7,4,3,7,5,11,7,4,5,7,8,54,7,5,9,9,8,512,7,4,6,7,8,36,9,5,128,7,8,52,7,6,15,
-7,8,0,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1728,7,4,5,7,8,44,7,6,17,9,9,1408,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,30,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,8,34,9,5,128,7,8,50,7,6,14,7,8,62,7,4,4,7,4,2,7,4,7,
-7,8,48,7,4,3,7,8,60,7,4,5,7,8,42,7,6,16,9,9,1152,7,4,6,7,8,32,7,5,8,7,8,58,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,8,640,7,4,6,
-7,8,38,9,5,128,7,7,25,7,6,15,9,8,384,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,
-7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-0,0,0,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,
-7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,7,8,39,7,6,16,9,8,576,7,4,6,
-7,7,19,7,5,8,7,8,55,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,45,7,4,3,7,5,11,7,4,5,
-7,8,53,7,5,9,9,8,448,7,4,6,7,8,35,9,5,128,7,8,51,7,6,15,7,8,63,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,9,9,1472,7,4,5,7,8,43,7,6,17,9,9,1216,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,29,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,8,33,9,5,128,7,8,49,7,6,14,7,8,61,7,4,4,7,4,2,7,4,7,7,8,47,7,4,3,7,8,59,7,4,5,
-7,8,41,7,6,16,9,9,960,7,4,6,7,8,31,7,5,8,7,8,57,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,9,704,7,4,6,7,8,37,9,5,128,7,7,25,7,6,15,
-9,8,320,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,11,12,2240,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,
-7,7,23,7,4,3,7,7,27,7,4,5,7,8,40,7,6,16,9,9,832,7,4,6,7,7,19,7,5,8,7,8,56,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,46,7,4,3,7,5,11,7,4,5,7,8,54,7,5,9,9,8,512,7,4,6,
-7,8,36,9,5,128,7,8,52,7,6,15,7,8,0,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1600,7,4,5,
-7,8,44,7,6,17,9,9,1344,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,30,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,8,34,9,5,128,7,8,50,7,6,14,
-7,8,62,7,4,4,7,4,2,7,4,7,7,8,48,7,4,3,7,8,60,7,4,5,7,8,42,7,6,16,9,9,1088,7,4,6,
-7,8,32,7,5,8,7,8,58,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,
-7,7,26,7,5,9,9,8,640,7,4,6,7,8,38,9,5,128,7,7,25,7,6,15,9,8,384,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,0,0,0,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,
-7,8,39,7,6,16,9,8,576,7,4,6,7,7,19,7,5,8,7,8,55,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,45,7,4,3,7,5,11,7,4,5,7,8,53,7,5,9,9,8,448,7,4,6,7,8,35,9,5,128,7,8,51,7,6,15,
-7,8,63,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1536,7,4,5,7,8,43,7,6,17,9,9,1280,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,29,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,8,33,9,5,128,7,8,49,7,6,14,7,8,61,7,4,4,7,4,2,7,4,7,
-7,8,47,7,4,3,7,8,59,7,4,5,7,8,41,7,6,16,9,9,1024,7,4,6,7,8,31,7,5,8,7,8,57,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,9,768,7,4,6,
-7,8,37,9,5,128,7,7,25,7,6,15,9,8,320,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,
-7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-11,12,2496,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,
-7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,7,8,40,7,6,16,9,9,896,7,4,6,
-7,7,19,7,5,8,7,8,56,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,46,7,4,3,7,5,11,7,4,5,
-7,8,54,7,5,9,9,8,512,7,4,6,7,8,36,9,5,128,7,8,52,7,6,15,7,8,0,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,9,9,1728,7,4,5,7,8,44,7,6,17,9,9,1408,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,30,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,8,34,9,5,128,7,8,50,7,6,14,7,8,62,7,4,4,7,4,2,7,4,7,7,8,48,7,4,3,7,8,60,7,4,5,
-7,8,42,7,6,16,9,9,1152,7,4,6,7,8,32,7,5,8,7,8,58,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,8,640,7,4,6,7,8,38,9,5,128,7,7,25,7,6,15,
-9,8,384,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,12,11,0,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,
-7,7,23,7,4,3,7,7,27,7,4,5,7,8,39,7,6,16,9,8,576,7,4,6,7,7,19,7,5,8,7,8,55,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,45,7,4,3,7,5,11,7,4,5,7,8,53,7,5,9,9,8,448,7,4,6,
-7,8,35,9,5,128,7,8,51,7,6,15,7,8,63,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1472,7,4,5,
-7,8,43,7,6,17,9,9,1216,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,29,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,8,33,9,5,128,7,8,49,7,6,14,
-7,8,61,7,4,4,7,4,2,7,4,7,7,8,47,7,4,3,7,8,59,7,4,5,7,8,41,7,6,16,9,9,960,7,4,6,
-7,8,31,7,5,8,7,8,57,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,
-7,7,26,7,5,9,9,9,704,7,4,6,7,8,37,9,5,128,7,7,25,7,6,15,9,8,320,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,11,11,1792,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,
-7,8,40,7,6,16,9,9,832,7,4,6,7,7,19,7,5,8,7,8,56,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,46,7,4,3,7,5,11,7,4,5,7,8,54,7,5,9,9,8,512,7,4,6,7,8,36,9,5,128,7,8,52,7,6,15,
-7,8,0,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1600,7,4,5,7,8,44,7,6,17,9,9,1344,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,30,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,8,34,9,5,128,7,8,50,7,6,14,7,8,62,7,4,4,7,4,2,7,4,7,
-7,8,48,7,4,3,7,8,60,7,4,5,7,8,42,7,6,16,9,9,1088,7,4,6,7,8,32,7,5,8,7,8,58,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,8,640,7,4,6,
-7,8,38,9,5,128,7,7,25,7,6,15,9,8,384,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,
-7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-0,0,0,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,
-7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,7,8,39,7,6,16,9,8,576,7,4,6,
-7,7,19,7,5,8,7,8,55,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,45,7,4,3,7,5,11,7,4,5,
-7,8,53,7,5,9,9,8,448,7,4,6,7,8,35,9,5,128,7,8,51,7,6,15,7,8,63,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,9,9,1536,7,4,5,7,8,43,7,6,17,9,9,1280,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,29,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,8,33,9,5,128,7,8,49,7,6,14,7,8,61,7,4,4,7,4,2,7,4,7,7,8,47,7,4,3,7,8,59,7,4,5,
-7,8,41,7,6,16,9,9,1024,7,4,6,7,8,31,7,5,8,7,8,57,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,9,768,7,4,6,7,8,37,9,5,128,7,7,25,7,6,15,
-9,8,320,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,11,11,1856,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,
-7,7,23,7,4,3,7,7,27,7,4,5,7,8,40,7,6,16,9,9,896,7,4,6,7,7,19,7,5,8,7,8,56,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,46,7,4,3,7,5,11,7,4,5,7,8,54,7,5,9,9,8,512,7,4,6,
-7,8,36,9,5,128,7,8,52,7,6,15,7,8,0,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1728,7,4,5,
-7,8,44,7,6,17,9,9,1408,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,30,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,8,34,9,5,128,7,8,50,7,6,14,
-7,8,62,7,4,4,7,4,2,7,4,7,7,8,48,7,4,3,7,8,60,7,4,5,7,8,42,7,6,16,9,9,1152,7,4,6,
-7,8,32,7,5,8,7,8,58,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,
-7,7,26,7,5,9,9,8,640,7,4,6,7,8,38,9,5,128,7,7,25,7,6,15,9,8,384,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,0,0,0,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,
-7,8,39,7,6,16,9,8,576,7,4,6,7,7,19,7,5,8,7,8,55,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,45,7,4,3,7,5,11,7,4,5,7,8,53,7,5,9,9,8,448,7,4,6,7,8,35,9,5,128,7,8,51,7,6,15,
-7,8,63,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1472,7,4,5,7,8,43,7,6,17,9,9,1216,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,29,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,8,33,9,5,128,7,8,49,7,6,14,7,8,61,7,4,4,7,4,2,7,4,7,
-7,8,47,7,4,3,7,8,59,7,4,5,7,8,41,7,6,16,9,9,960,7,4,6,7,8,31,7,5,8,7,8,57,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,9,704,7,4,6,
-7,8,37,9,5,128,7,7,25,7,6,15,9,8,320,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,
-7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-11,12,2176,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,
-7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,7,8,40,7,6,16,9,9,832,7,4,6,
-7,7,19,7,5,8,7,8,56,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,46,7,4,3,7,5,11,7,4,5,
-7,8,54,7,5,9,9,8,512,7,4,6,7,8,36,9,5,128,7,8,52,7,6,15,7,8,0,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,9,9,1600,7,4,5,7,8,44,7,6,17,9,9,1344,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,30,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,8,34,9,5,128,7,8,50,7,6,14,7,8,62,7,4,4,7,4,2,7,4,7,7,8,48,7,4,3,7,8,60,7,4,5,
-7,8,42,7,6,16,9,9,1088,7,4,6,7,8,32,7,5,8,7,8,58,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,8,640,7,4,6,7,8,38,9,5,128,7,7,25,7,6,15,
-9,8,384,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,0,0,0,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,
-7,7,23,7,4,3,7,7,27,7,4,5,7,8,39,7,6,16,9,8,576,7,4,6,7,7,19,7,5,8,7,8,55,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,45,7,4,3,7,5,11,7,4,5,7,8,53,7,5,9,9,8,448,7,4,6,
-7,8,35,9,5,128,7,8,51,7,6,15,7,8,63,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1536,7,4,5,
-7,8,43,7,6,17,9,9,1280,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,29,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,8,33,9,5,128,7,8,49,7,6,14,
-7,8,61,7,4,4,7,4,2,7,4,7,7,8,47,7,4,3,7,8,59,7,4,5,7,8,41,7,6,16,9,9,1024,7,4,6,
-7,8,31,7,5,8,7,8,57,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,
-7,7,26,7,5,9,9,9,768,7,4,6,7,8,37,9,5,128,7,7,25,7,6,15,9,8,320,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,11,12,2432,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,
-7,8,40,7,6,16,9,9,896,7,4,6,7,7,19,7,5,8,7,8,56,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,46,7,4,3,7,5,11,7,4,5,7,8,54,7,5,9,9,8,512,7,4,6,7,8,36,9,5,128,7,8,52,7,6,15,
-7,8,0,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1728,7,4,5,7,8,44,7,6,17,9,9,1408,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,30,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,8,34,9,5,128,7,8,50,7,6,14,7,8,62,7,4,4,7,4,2,7,4,7,
-7,8,48,7,4,3,7,8,60,7,4,5,7,8,42,7,6,16,9,9,1152,7,4,6,7,8,32,7,5,8,7,8,58,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,8,640,7,4,6,
-7,8,38,9,5,128,7,7,25,7,6,15,9,8,384,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,
-7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-0,0,0,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,
-7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,7,8,39,7,6,16,9,8,576,7,4,6,
-7,7,19,7,5,8,7,8,55,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,45,7,4,3,7,5,11,7,4,5,
-7,8,53,7,5,9,9,8,448,7,4,6,7,8,35,9,5,128,7,8,51,7,6,15,7,8,63,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,9,9,1472,7,4,5,7,8,43,7,6,17,9,9,1216,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,29,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,8,33,9,5,128,7,8,49,7,6,14,7,8,61,7,4,4,7,4,2,7,4,7,7,8,47,7,4,3,7,8,59,7,4,5,
-7,8,41,7,6,16,9,9,960,7,4,6,7,8,31,7,5,8,7,8,57,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,9,704,7,4,6,7,8,37,9,5,128,7,7,25,7,6,15,
-9,8,320,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,11,12,2048,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,
-7,7,23,7,4,3,7,7,27,7,4,5,7,8,40,7,6,16,9,9,832,7,4,6,7,7,19,7,5,8,7,8,56,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,46,7,4,3,7,5,11,7,4,5,7,8,54,7,5,9,9,8,512,7,4,6,
-7,8,36,9,5,128,7,8,52,7,6,15,7,8,0,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1600,7,4,5,
-7,8,44,7,6,17,9,9,1344,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,30,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,8,34,9,5,128,7,8,50,7,6,14,
-7,8,62,7,4,4,7,4,2,7,4,7,7,8,48,7,4,3,7,8,60,7,4,5,7,8,42,7,6,16,9,9,1088,7,4,6,
-7,8,32,7,5,8,7,8,58,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,
-7,7,26,7,5,9,9,8,640,7,4,6,7,8,38,9,5,128,7,7,25,7,6,15,9,8,384,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,0,0,0,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,
-7,8,39,7,6,16,9,8,576,7,4,6,7,7,19,7,5,8,7,8,55,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,45,7,4,3,7,5,11,7,4,5,7,8,53,7,5,9,9,8,448,7,4,6,7,8,35,9,5,128,7,8,51,7,6,15,
-7,8,63,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1536,7,4,5,7,8,43,7,6,17,9,9,1280,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,29,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,8,33,9,5,128,7,8,49,7,6,14,7,8,61,7,4,4,7,4,2,7,4,7,
-7,8,47,7,4,3,7,8,59,7,4,5,7,8,41,7,6,16,9,9,1024,7,4,6,7,8,31,7,5,8,7,8,57,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,9,768,7,4,6,
-7,8,37,9,5,128,7,7,25,7,6,15,9,8,320,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,
-7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-11,11,1920,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,
-7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,7,8,40,7,6,16,9,9,896,7,4,6,
-7,7,19,7,5,8,7,8,56,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,46,7,4,3,7,5,11,7,4,5,
-7,8,54,7,5,9,9,8,512,7,4,6,7,8,36,9,5,128,7,8,52,7,6,15,7,8,0,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,9,9,1728,7,4,5,7,8,44,7,6,17,9,9,1408,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,30,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,8,34,9,5,128,7,8,50,7,6,14,7,8,62,7,4,4,7,4,2,7,4,7,7,8,48,7,4,3,7,8,60,7,4,5,
-7,8,42,7,6,16,9,9,1152,7,4,6,7,8,32,7,5,8,7,8,58,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,8,640,7,4,6,7,8,38,9,5,128,7,7,25,7,6,15,
-9,8,384,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,0,0,0,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,
-7,7,23,7,4,3,7,7,27,7,4,5,7,8,39,7,6,16,9,8,576,7,4,6,7,7,19,7,5,8,7,8,55,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,45,7,4,3,7,5,11,7,4,5,7,8,53,7,5,9,9,8,448,7,4,6,
-7,8,35,9,5,128,7,8,51,7,6,15,7,8,63,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1472,7,4,5,
-7,8,43,7,6,17,9,9,1216,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,29,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,8,33,9,5,128,7,8,49,7,6,14,
-7,8,61,7,4,4,7,4,2,7,4,7,7,8,47,7,4,3,7,8,59,7,4,5,7,8,41,7,6,16,9,9,960,7,4,6,
-7,8,31,7,5,8,7,8,57,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,
-7,7,26,7,5,9,9,9,704,7,4,6,7,8,37,9,5,128,7,7,25,7,6,15,9,8,320,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,11,12,2304,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,
-7,8,40,7,6,16,9,9,832,7,4,6,7,7,19,7,5,8,7,8,56,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,46,7,4,3,7,5,11,7,4,5,7,8,54,7,5,9,9,8,512,7,4,6,7,8,36,9,5,128,7,8,52,7,6,15,
-7,8,0,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1600,7,4,5,7,8,44,7,6,17,9,9,1344,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,30,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,8,34,9,5,128,7,8,50,7,6,14,7,8,62,7,4,4,7,4,2,7,4,7,
-7,8,48,7,4,3,7,8,60,7,4,5,7,8,42,7,6,16,9,9,1088,7,4,6,7,8,32,7,5,8,7,8,58,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,8,640,7,4,6,
-7,8,38,9,5,128,7,7,25,7,6,15,9,8,384,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,
-7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-0,0,0,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,
-7,7,28,7,4,4,7,4,2,7,4,7,7,7,23,7,4,3,7,7,27,7,4,5,7,8,39,7,6,16,9,8,576,7,4,6,
-7,7,19,7,5,8,7,8,55,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,8,45,7,4,3,7,5,11,7,4,5,
-7,8,53,7,5,9,9,8,448,7,4,6,7,8,35,9,5,128,7,8,51,7,6,15,7,8,63,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,9,9,1536,7,4,5,7,8,43,7,6,17,9,9,1280,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,29,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,
-7,8,33,9,5,128,7,8,49,7,6,14,7,8,61,7,4,4,7,4,2,7,4,7,7,8,47,7,4,3,7,8,59,7,4,5,
-7,8,41,7,6,16,9,9,1024,7,4,6,7,8,31,7,5,8,7,8,57,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,7,22,7,4,3,7,5,11,7,4,5,7,7,26,7,5,9,9,9,768,7,4,6,7,8,37,9,5,128,7,7,25,7,6,15,
-9,8,320,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,
-7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,11,12,2560,7,4,3,7,5,11,7,4,5,
-7,6,12,7,5,9,9,6,1664,7,4,6,7,7,20,9,5,128,7,7,24,7,6,14,7,7,28,7,4,4,7,4,2,7,4,7,
-7,7,23,7,4,3,7,7,27,7,4,5,7,8,40,7,6,16,9,9,896,7,4,6,7,7,19,7,5,8,7,8,56,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7,7,8,46,7,4,3,7,5,11,7,4,5,7,8,54,7,5,9,9,8,512,7,4,6,
-7,8,36,9,5,128,7,8,52,7,6,15,7,8,0,7,4,4,7,4,2,7,4,7,7,6,13,7,4,3,9,9,1728,7,4,5,
-7,8,44,7,6,17,9,9,1408,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,
-7,8,30,7,4,3,7,5,11,7,4,5,7,6,12,7,5,9,9,6,1664,7,4,6,7,8,34,9,5,128,7,8,50,7,6,14,
-7,8,62,7,4,4,7,4,2,7,4,7,7,8,48,7,4,3,7,8,60,7,4,5,7,8,42,7,6,16,9,9,1152,7,4,6,
-7,8,32,7,5,8,7,8,58,9,5,64,7,5,10,7,4,4,7,4,2,7,4,7,7,7,22,7,4,3,7,5,11,7,4,5,
-7,7,26,7,5,9,9,8,640,7,4,6,7,8,38,9,5,128,7,7,25,7,6,15,9,8,384,7,4,4,7,4,2,7,4,7,
-7,6,13,7,4,3,7,7,18,7,4,5,7,7,21,7,6,17,9,7,256,7,4,6,7,6,1,7,5,8,9,6,192,9,5,64,
-7,5,10,7,4,4,7,4,2,7,4,7
-};
-const  TIFFFaxTabEnt TIFFFaxBlackTable[8192] = {
-12,11,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,9,15,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,10,18,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,10,17,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,11,11,1792,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,11,23,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,11,20,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,11,25,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,12,128,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,56,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,30,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-11,11,1856,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,57,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,11,21,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,54,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,9,15,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,52,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,48,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,11,12,2112,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,44,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,36,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,10,12,384,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,28,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,60,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,40,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,11,12,2368,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,10,16,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,10,0,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-10,10,64,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,9,15,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,10,18,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,10,17,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-11,12,1984,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,50,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,34,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,13,1664,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,26,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-10,13,1408,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,32,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,11,11,1920,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,61,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,42,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,10,13,1024,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,9,15,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,13,768,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,62,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,11,12,2240,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,46,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,38,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-10,13,512,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,11,19,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,11,24,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,11,22,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-11,12,2496,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,10,16,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,10,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,10,64,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,12,11,0,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,9,15,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,10,18,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,10,17,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,11,11,1792,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,11,23,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,11,20,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,11,25,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-10,12,192,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,13,1280,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,31,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,11,11,1856,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,58,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,11,21,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-10,13,896,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,9,15,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,10,13,640,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,49,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-11,12,2176,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,45,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,37,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,12,448,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,29,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-10,13,1536,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,41,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,11,12,2432,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,10,16,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,10,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,10,10,64,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,9,15,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,10,18,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,10,17,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,11,12,2048,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,51,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,35,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-10,12,320,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,27,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,59,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,33,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-11,11,1920,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,10,12,256,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,43,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,13,1152,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,9,15,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,55,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,63,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,11,12,2304,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,47,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,39,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,53,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,11,19,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,11,24,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,11,22,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,11,12,2560,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,10,16,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,10,0,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-10,10,64,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,12,11,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,9,15,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,10,18,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,10,17,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-11,11,1792,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,11,23,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,11,20,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,11,25,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,10,12,128,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,56,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,30,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,11,11,1856,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,57,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,11,21,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,54,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,9,15,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,52,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,48,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,11,12,2112,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,44,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,36,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-10,12,384,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,28,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,60,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,40,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-11,12,2368,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,10,16,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,10,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,10,64,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,9,15,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,10,18,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,10,17,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,11,12,1984,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,50,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,34,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,10,13,1728,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,26,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,13,1472,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,32,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,11,11,1920,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,61,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,42,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-10,13,1088,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,9,15,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,10,13,832,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,62,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-11,12,2240,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,46,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,38,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,13,576,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,11,19,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,11,24,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,11,22,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,11,12,2496,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,10,16,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,10,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,10,10,64,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-12,11,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,9,15,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,10,18,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,10,17,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,11,11,1792,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,11,23,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,11,20,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,11,25,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,12,192,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,10,13,1344,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,31,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-11,11,1856,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,58,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,11,21,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,13,960,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,9,15,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-10,13,704,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,49,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,11,12,2176,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,45,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,37,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,10,12,448,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,29,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,13,1600,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,41,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,11,12,2432,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,10,16,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,10,0,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-10,10,64,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,9,15,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,10,18,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,10,17,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-11,12,2048,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,51,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,35,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,12,320,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,27,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,59,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,33,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,11,11,1920,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-10,12,256,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,43,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,10,13,1216,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,13,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,9,15,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,55,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,63,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,11,12,2304,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,12,47,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,12,39,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,12,53,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,8,14,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,0,0,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,13,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,11,19,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,11,24,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,7,11,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,11,22,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-11,12,2560,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,9,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,10,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,10,16,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,10,0,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,10,10,64,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,6,9,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,8,7,11,8,2,3,8,3,1,8,2,2,
-8,4,6,8,2,3,8,3,4,8,2,2,8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2,
-8,8,14,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,8,6,8,8,2,3,8,3,1,8,2,2,
-8,4,5,8,2,3,8,3,4,8,2,2,8,7,12,8,2,3,8,3,1,8,2,2,8,4,6,8,2,3,8,3,4,8,2,2,
-8,5,7,8,2,3,8,3,1,8,2,2,8,4,5,8,2,3,8,3,4,8,2,2
-};
diff --git a/src/tiff/geo_config.h b/src/tiff/geo_config.h
deleted file mode 100644
index 9875b77..0000000
--- a/src/tiff/geo_config.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* geo_config.h.  Generated automatically by configure.  */
-#ifndef GEO_CONFIG_H
-#define GEO_CONFIG_H
-
-/* Define if you have the ANSI C header files.  */
-#define STDC_HEADERS 1
-
-/* Define if you have the <stdlib.h> header file.  */
-#define HAVE_STDLIB_H 1
-
-/* Define if you have the <string.h> header file.  */
-#define HAVE_STRING_H 1
-
-/* Define if you have the <strings.h> header file.  */
-#define HAVE_STRINGS_H 1
-
-/* #undef HAVE_LIBPROJ */
-/* #undef HAVE_PROJECTS_H */
-
-#endif /* ndef GEO_CONFIG_H */
diff --git a/src/tiff/geo_ctrans.inc b/src/tiff/geo_ctrans.inc
deleted file mode 100644
index 030fe58..0000000
--- a/src/tiff/geo_ctrans.inc
+++ /dev/null
@@ -1,55 +0,0 @@
-/* GeoTIFF Coordinate Transformations Database */
-
-/* C database for Geotiff include files.   */
-/* the macro ValuePair() must be defined   */
-/* by the enclosing include file           */
-
-/*
- *  Revised 12 Jul 1995   NDR -- changed South Oriented to a code 
- *  Revised 28 Sep 1995   NDR -- Added Rev. 1.0 aliases. 
- */
-
-ValuePair(CT_TransverseMercator,	1)
-ValuePair(CT_TransvMercator_Modified_Alaska, 2)
-ValuePair(CT_ObliqueMercator,	3)
-ValuePair(CT_ObliqueMercator_Laborde,	4)
-ValuePair(CT_ObliqueMercator_Rosenmund,	5)
-ValuePair(CT_ObliqueMercator_Spherical,	6)   /* not advisable */
-ValuePair(CT_Mercator,	7)
-ValuePair(CT_LambertConfConic_2SP,	8)
-ValuePair(CT_LambertConfConic,CT_LambertConfConic_2SP)         /* Alias */
-ValuePair(CT_LambertConfConic_1SP,	9)
-ValuePair(CT_LambertConfConic_Helmert,CT_LambertConfConic_1SP) /* alias */
-ValuePair(CT_LambertAzimEqualArea,	10)
-ValuePair(CT_AlbersEqualArea,	11)
-ValuePair(CT_AzimuthalEquidistant,	12)
-ValuePair(CT_EquidistantConic,	13)
-ValuePair(CT_Stereographic,	14)
-ValuePair(CT_PolarStereographic,	15)
-ValuePair(CT_ObliqueStereographic,	16)   /* not advisable */
-ValuePair(CT_Equirectangular,	17)
-ValuePair(CT_CassiniSoldner,	18)
-ValuePair(CT_Gnomonic,	19)
-ValuePair(CT_MillerCylindrical,	20)
-ValuePair(CT_Orthographic,	21)
-ValuePair(CT_Polyconic,	22)
-ValuePair(CT_Robinson,	23)
-ValuePair(CT_Sinusoidal,	24)
-ValuePair(CT_VanDerGrinten,	25)
-ValuePair(CT_NewZealandMapGrid,	26)
-/* Added for 1.0 */
-ValuePair(CT_TransvMercator_SouthOrientated, 27)
-
-
-/* Aliases */
-
-ValuePair(CT_SouthOrientedGaussConformal,CT_TransvMercator_SouthOrientated)
-ValuePair(CT_AlaskaConformal,	CT_TransvMercator_Modified_Alaska)
-ValuePair(CT_TransvEquidistCylindrical,	CT_CassiniSoldner)
-ValuePair(CT_ObliqueMercator_Hotine,	CT_ObliqueMercator)
-ValuePair(CT_SwissObliqueCylindrical,	CT_ObliqueMercator_Rosenmund)
-ValuePair(CT_GaussBoaga,	CT_TransverseMercator)
-ValuePair(CT_GaussKruger,	CT_TransverseMercator)
-ValuePair(CT_TransvMercator_SouthOriented, CT_TransvMercator_SouthOrientated)
-
-
diff --git a/src/tiff/geo_extra.c b/src/tiff/geo_extra.c
deleted file mode 100644
index 9338436..0000000
--- a/src/tiff/geo_extra.c
+++ /dev/null
@@ -1,750 +0,0 @@
-/******************************************************************************
- * $Id: geo_extra.c,v 1.2 2004/03/19 11:51:23 lubia Exp $
- *
- * Project:  libgeotiff
- * Purpose:  Code to normalize a few common PCS values without use of CSV
- *           files.
- * Author:   Frank Warmerdam, warmerda at home.com
- *
- ******************************************************************************
- * Copyright (c) 1999, Frank Warmerdam
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- ******************************************************************************
- *
- * $Log: geo_extra.c,v $
- * Revision 1.2  2004/03/19 11:51:23  lubia
- * Atualizada as bibliotecas Tif e GeoTif
- *
- * Revision 1.4  2002/12/01 23:44:34  warmerda
- * Fixed typo in last fix.
- *
- * Revision 1.3  2002/12/01 23:42:06  warmerda
- * added overrides for two deprecated stateplane zones
- *
- * Revision 1.2  1999/05/04 03:09:33  warmerda
- * avoid warnings
- *
- * Revision 1.1  1999/04/28 20:01:29  warmerda
- * new
- *
- */
-
-/*
-#include "geotiff.h"
-#include "geo_tiffp.h"
-#include "geo_keyp.h"
-*/
-
-#include "geo_normalize.h"
-#include "geovalues.h"
-
-static int StatePlaneTable[] = 
-{
-    PCS_NAD83_Alabama_East,		Proj_Alabama_CS83_East,
-    PCS_NAD83_Alabama_West,		Proj_Alabama_CS83_West,
-
-    PCS_NAD83_Alaska_zone_1,		Proj_Alaska_CS83_1,
-    PCS_NAD83_Alaska_zone_2,		Proj_Alaska_CS83_2,
-    PCS_NAD83_Alaska_zone_3,		Proj_Alaska_CS83_3,
-    PCS_NAD83_Alaska_zone_4,		Proj_Alaska_CS83_4,
-    PCS_NAD83_Alaska_zone_5,		Proj_Alaska_CS83_5,
-    PCS_NAD83_Alaska_zone_6,		Proj_Alaska_CS83_6,
-    PCS_NAD83_Alaska_zone_7,		Proj_Alaska_CS83_7,
-    PCS_NAD83_Alaska_zone_8,		Proj_Alaska_CS83_8,
-    PCS_NAD83_Alaska_zone_9,		Proj_Alaska_CS83_9,
-    PCS_NAD83_Alaska_zone_10,		Proj_Alaska_CS83_10,
-
-    PCS_NAD83_California_1,		Proj_California_CS83_1,
-    PCS_NAD83_California_2,		Proj_California_CS83_2,
-    PCS_NAD83_California_3,		Proj_California_CS83_3,
-    PCS_NAD83_California_4,		Proj_California_CS83_4,
-    PCS_NAD83_California_5,		Proj_California_CS83_5,
-    PCS_NAD83_California_6,		Proj_California_CS83_6,
-
-    PCS_NAD83_Arizona_East,		Proj_Arizona_CS83_east,
-    PCS_NAD83_Arizona_Central,		Proj_Arizona_CS83_Central,
-    PCS_NAD83_Arizona_West,		Proj_Arizona_CS83_west,
-
-    PCS_NAD83_Arkansas_North,		Proj_Arkansas_CS83_North,
-    PCS_NAD83_Arkansas_South,		Proj_Arkansas_CS83_South,
-
-    PCS_NAD83_Colorado_North,		Proj_Colorado_CS83_North,
-    PCS_NAD83_Colorado_Central,		Proj_Colorado_CS83_Central,
-    PCS_NAD83_Colorado_South,		Proj_Colorado_CS83_South,
-
-    PCS_NAD83_Connecticut,		Proj_Connecticut_CS83,
-
-    PCS_NAD83_Delaware,			Proj_Delaware_CS83,
-
-    PCS_NAD83_Florida_East,		Proj_Florida_CS83_East,
-    PCS_NAD83_Florida_North,		Proj_Florida_CS83_North,
-    PCS_NAD83_Florida_West,		Proj_Florida_CS83_West,
-
-    PCS_NAD83_Hawaii_zone_1,		Proj_Hawaii_CS83_1,
-    PCS_NAD83_Hawaii_zone_2,		Proj_Hawaii_CS83_2,
-    PCS_NAD83_Hawaii_zone_3,		Proj_Hawaii_CS83_3,
-    PCS_NAD83_Hawaii_zone_4,		Proj_Hawaii_CS83_4,
-    PCS_NAD83_Hawaii_zone_5,		Proj_Hawaii_CS83_5,
-
-    PCS_NAD83_Georgia_East,		Proj_Georgia_CS83_East,
-    PCS_NAD83_Georgia_West,		Proj_Georgia_CS83_West,
-
-    PCS_NAD83_Idaho_East,		Proj_Idaho_CS83_East,
-    PCS_NAD83_Idaho_Central,		Proj_Idaho_CS83_Central,
-    PCS_NAD83_Idaho_West,		Proj_Idaho_CS83_West,
-
-    PCS_NAD83_Illinois_East,		Proj_Illinois_CS83_East,
-    PCS_NAD83_Illinois_West,		Proj_Illinois_CS83_West,
-
-    PCS_NAD83_Indiana_East,		Proj_Indiana_CS83_East,
-    PCS_NAD83_Indiana_West,		Proj_Indiana_CS83_West,
-
-    PCS_NAD83_Iowa_North,      		Proj_Iowa_CS83_North,
-    PCS_NAD83_Iowa_South,      		Proj_Iowa_CS83_South,
-
-    PCS_NAD83_Kansas_North,		Proj_Kansas_CS83_North,
-    PCS_NAD83_Kansas_South,		Proj_Kansas_CS83_South,
-
-    PCS_NAD83_Kentucky_North,		Proj_Kentucky_CS83_North,
-    PCS_NAD83_Kentucky_South,		Proj_Kentucky_CS83_South,
-
-    PCS_NAD83_Louisiana_North,		Proj_Louisiana_CS83_North,
-    PCS_NAD83_Louisiana_South,		Proj_Louisiana_CS83_South,
-
-    PCS_NAD83_Maine_East,		Proj_Maine_CS83_East,
-    PCS_NAD83_Maine_West,		Proj_Maine_CS83_West,
-
-    PCS_NAD83_Maryland,			Proj_Maryland_CS83,
-
-    PCS_NAD83_Massachusetts,		Proj_Massachusetts_CS83_Mainland,
-    PCS_NAD83_Massachusetts_Is,		Proj_Massachusetts_CS83_Island,
-
-    PCS_NAD83_Michigan_North,		Proj_Michigan_CS83_North,
-    PCS_NAD83_Michigan_Central,		Proj_Michigan_CS83_Central,
-    PCS_NAD83_Michigan_South,		Proj_Michigan_CS83_South,
-
-    PCS_NAD83_Minnesota_North,		Proj_Minnesota_CS83_North,
-    PCS_NAD83_Minnesota_Cent,		Proj_Minnesota_CS83_Central,
-    PCS_NAD83_Minnesota_South,		Proj_Minnesota_CS83_South,
-
-    PCS_NAD83_Mississippi_East,		Proj_Mississippi_CS83_East,
-    PCS_NAD83_Mississippi_West,		Proj_Mississippi_CS83_West,
-
-    PCS_NAD83_Missouri_East,		Proj_Missouri_CS83_East,
-    PCS_NAD83_Missouri_Central,		Proj_Missouri_CS83_Central,
-    PCS_NAD83_Missouri_West,		Proj_Missouri_CS83_West,
-
-    PCS_NAD83_Montana,			Proj_Montana_CS83,
-
-    PCS_NAD83_Nebraska,			Proj_Nebraska_CS83,
-
-    PCS_NAD83_Nevada_East,		Proj_Nevada_CS83_East,
-    PCS_NAD83_Nevada_Central,		Proj_Nevada_CS83_Central,
-    PCS_NAD83_Nevada_West,		Proj_Nevada_CS83_West,
-
-    PCS_NAD83_New_Hampshire,		Proj_New_Hampshire_CS83,
-
-    PCS_NAD83_New_Jersey,		Proj_New_Jersey_CS83,
-
-    PCS_NAD83_New_Mexico_East,		Proj_New_Mexico_CS83_East,
-    PCS_NAD83_New_Mexico_Cent,		Proj_New_Mexico_CS83_Central,
-    PCS_NAD83_New_Mexico_West,		Proj_New_Mexico_CS83_West,
-
-    PCS_NAD83_New_York_East,		Proj_New_York_CS83_East,
-    PCS_NAD83_New_York_Central,		Proj_New_York_CS83_Central,
-    PCS_NAD83_New_York_West,		Proj_New_York_CS83_West,
-    PCS_NAD83_New_York_Long_Is,		Proj_New_York_CS83_Long_Island,
-
-    PCS_NAD83_North_Carolina,	       	Proj_North_Carolina_CS83,
-
-    PCS_NAD83_North_Dakota_N,		Proj_North_Dakota_CS83_North,
-    PCS_NAD83_North_Dakota_S,		Proj_North_Dakota_CS83_South,
-
-    PCS_NAD83_Ohio_North,		Proj_Ohio_CS83_North,
-    PCS_NAD83_Ohio_South,		Proj_Ohio_CS83_South,
-
-    PCS_NAD83_Oklahoma_North,		Proj_Oklahoma_CS83_North,
-    PCS_NAD83_Oklahoma_South,		Proj_Oklahoma_CS83_South,
-
-    PCS_NAD83_Oregon_North,		Proj_Oregon_CS83_North,
-    PCS_NAD83_Oregon_South,		Proj_Oregon_CS83_South,
-
-    PCS_NAD83_Pennsylvania_N,		Proj_Pennsylvania_CS83_North,
-    PCS_NAD83_Pennsylvania_S,		Proj_Pennsylvania_CS83_South,
-
-    PCS_NAD83_Rhode_Island,		Proj_Rhode_Island_CS83,
-
-    PCS_NAD83_South_Carolina,		Proj_South_Carolina_CS83,
-
-    PCS_NAD83_South_Dakota_N,		Proj_South_Dakota_CS83_North,
-    PCS_NAD83_South_Dakota_S,		Proj_South_Dakota_CS83_South,
-
-    PCS_NAD83_Tennessee,		Proj_Tennessee_CS83,
-
-    PCS_NAD83_Texas_North,		Proj_Texas_CS83_North,
-    PCS_NAD83_Texas_North_Cen,		Proj_Texas_CS83_North_Central,
-    PCS_NAD83_Texas_Central,		Proj_Texas_CS83_Central,
-    PCS_NAD83_Texas_South_Cen,		Proj_Texas_CS83_South_Central,
-    PCS_NAD83_Texas_South,		Proj_Texas_CS83_South,
-
-    PCS_NAD83_Utah_North,		Proj_Utah_CS83_North,
-    PCS_NAD83_Utah_Central,		Proj_Utah_CS83_Central,
-    PCS_NAD83_Utah_South,		Proj_Utah_CS83_South,
-
-    PCS_NAD83_Vermont,			Proj_Vermont_CS83,
-
-    PCS_NAD83_Virginia_North,		Proj_Virginia_CS83_North,
-    PCS_NAD83_Virginia_South,		Proj_Virginia_CS83_South,
-
-    PCS_NAD83_Washington_North,		Proj_Washington_CS83_North,
-    PCS_NAD83_Washington_South,		Proj_Washington_CS83_South,
-
-    PCS_NAD83_West_Virginia_N,		Proj_West_Virginia_CS83_North,
-    PCS_NAD83_West_Virginia_S,		Proj_West_Virginia_CS83_South,
-
-    PCS_NAD83_Wisconsin_North,		Proj_Wisconsin_CS83_North,
-    PCS_NAD83_Wisconsin_Cen,		Proj_Wisconsin_CS83_Central,
-    PCS_NAD83_Wisconsin_South,		Proj_Wisconsin_CS83_South,
-
-    PCS_NAD83_Wyoming_East,		Proj_Wyoming_CS83_East,
-    PCS_NAD83_Wyoming_E_Cen,		Proj_Wyoming_CS83_East_Central,
-    PCS_NAD83_Wyoming_W_Cen,		Proj_Wyoming_CS83_West_Central,
-    PCS_NAD83_Wyoming_West,		Proj_Wyoming_CS83_West,
-    
-    PCS_NAD83_Puerto_Rico_Virgin_Is,	Proj_Puerto_Rico_Virgin_Is,
-
-    PCS_NAD27_Alabama_East,		Proj_Alabama_CS27_East,
-    PCS_NAD27_Alabama_West,		Proj_Alabama_CS27_West,
-
-    PCS_NAD27_Alaska_zone_1,		Proj_Alaska_CS27_1,
-    PCS_NAD27_Alaska_zone_2,		Proj_Alaska_CS27_2,
-    PCS_NAD27_Alaska_zone_3,		Proj_Alaska_CS27_3,
-    PCS_NAD27_Alaska_zone_4,		Proj_Alaska_CS27_4,
-    PCS_NAD27_Alaska_zone_5,		Proj_Alaska_CS27_5,
-    PCS_NAD27_Alaska_zone_6,		Proj_Alaska_CS27_6,
-    PCS_NAD27_Alaska_zone_7,		Proj_Alaska_CS27_7,
-    PCS_NAD27_Alaska_zone_8,		Proj_Alaska_CS27_8,
-    PCS_NAD27_Alaska_zone_9,		Proj_Alaska_CS27_9,
-    PCS_NAD27_Alaska_zone_10,		Proj_Alaska_CS27_10,
-
-    PCS_NAD27_California_I,		Proj_California_CS27_I,
-    PCS_NAD27_California_II,		Proj_California_CS27_II,
-    PCS_NAD27_California_III,		Proj_California_CS27_III,
-    PCS_NAD27_California_IV,		Proj_California_CS27_IV,
-    PCS_NAD27_California_V,		Proj_California_CS27_V,
-    PCS_NAD27_California_VI,		Proj_California_CS27_VI,
-    PCS_NAD27_California_VII,		Proj_California_CS27_VII,
-
-    PCS_NAD27_Arizona_East,		Proj_Arizona_Coordinate_System_east,
-    PCS_NAD27_Arizona_Central,		Proj_Arizona_Coordinate_System_Central,
-    PCS_NAD27_Arizona_West,		Proj_Arizona_Coordinate_System_west,
-
-    PCS_NAD27_Arkansas_North,		Proj_Arkansas_CS27_North,
-    PCS_NAD27_Arkansas_South,		Proj_Arkansas_CS27_South,
-
-    PCS_NAD27_Colorado_North,		Proj_Colorado_CS27_North,
-    PCS_NAD27_Colorado_Central,		Proj_Colorado_CS27_Central,
-    PCS_NAD27_Colorado_South,		Proj_Colorado_CS27_South,
-
-    PCS_NAD27_Connecticut,		Proj_Connecticut_CS27,
-
-    PCS_NAD27_Delaware,			Proj_Delaware_CS27,
-
-    PCS_NAD27_Florida_East,		Proj_Florida_CS27_East,
-    PCS_NAD27_Florida_North,		Proj_Florida_CS27_North,
-    PCS_NAD27_Florida_West,		Proj_Florida_CS27_West,
-
-    PCS_NAD27_Hawaii_zone_1,		Proj_Hawaii_CS27_1,
-    PCS_NAD27_Hawaii_zone_2,		Proj_Hawaii_CS27_2,
-    PCS_NAD27_Hawaii_zone_3,		Proj_Hawaii_CS27_3,
-    PCS_NAD27_Hawaii_zone_4,		Proj_Hawaii_CS27_4,
-    PCS_NAD27_Hawaii_zone_5,		Proj_Hawaii_CS27_5,
-
-    PCS_NAD27_Georgia_East,		Proj_Georgia_CS27_East,
-    PCS_NAD27_Georgia_West,		Proj_Georgia_CS27_West,
-
-    PCS_NAD27_Idaho_East,		Proj_Idaho_CS27_East,
-    PCS_NAD27_Idaho_Central,		Proj_Idaho_CS27_Central,
-    PCS_NAD27_Idaho_West,		Proj_Idaho_CS27_West,
-
-    PCS_NAD27_Illinois_East,		Proj_Illinois_CS27_East,
-    PCS_NAD27_Illinois_West,		Proj_Illinois_CS27_West,
-
-    PCS_NAD27_Indiana_East,		Proj_Indiana_CS27_East,
-    PCS_NAD27_Indiana_West,		Proj_Indiana_CS27_West,
-
-    PCS_NAD27_Iowa_North,      		Proj_Iowa_CS27_North,
-    PCS_NAD27_Iowa_South,      		Proj_Iowa_CS27_South,
-
-    PCS_NAD27_Kansas_North,		Proj_Kansas_CS27_North,
-    PCS_NAD27_Kansas_South,		Proj_Kansas_CS27_South,
-
-    PCS_NAD27_Kentucky_North,		Proj_Kentucky_CS27_North,
-    PCS_NAD27_Kentucky_South,		Proj_Kentucky_CS27_South,
-
-    PCS_NAD27_Louisiana_North,		Proj_Louisiana_CS27_North,
-    PCS_NAD27_Louisiana_South,		Proj_Louisiana_CS27_South,
-
-    PCS_NAD27_Maine_East,		Proj_Maine_CS27_East,
-    PCS_NAD27_Maine_West,		Proj_Maine_CS27_West,
-
-    PCS_NAD27_Maryland,			Proj_Maryland_CS27,
-
-    PCS_NAD27_Massachusetts,		Proj_Massachusetts_CS27_Mainland,
-    PCS_NAD27_Massachusetts_Is,		Proj_Massachusetts_CS27_Island,
-
-    PCS_NAD27_Michigan_North,		Proj_Michigan_CS27_North,
-    PCS_NAD27_Michigan_Central,		Proj_Michigan_CS27_Central,
-    PCS_NAD27_Michigan_South,		Proj_Michigan_CS27_South,
-
-    PCS_NAD27_Minnesota_North,		Proj_Minnesota_CS27_North,
-    PCS_NAD27_Minnesota_Cent,		Proj_Minnesota_CS27_Central,
-    PCS_NAD27_Minnesota_South,		Proj_Minnesota_CS27_South,
-
-    PCS_NAD27_Mississippi_East,		Proj_Mississippi_CS27_East,
-    PCS_NAD27_Mississippi_West,		Proj_Mississippi_CS27_West,
-
-    PCS_NAD27_Missouri_East,		Proj_Missouri_CS27_East,
-    PCS_NAD27_Missouri_Central,		Proj_Missouri_CS27_Central,
-    PCS_NAD27_Missouri_West,		Proj_Missouri_CS27_West,
-
-    PCS_NAD27_Montana_North,		Proj_Montana_CS27_North,
-    PCS_NAD27_Montana_Central,		Proj_Montana_CS27_Central,
-    PCS_NAD27_Montana_South,		Proj_Montana_CS27_South,
-
-    PCS_NAD27_Nebraska_North,		Proj_Nebraska_CS27_North,
-    PCS_NAD27_Nebraska_South,		Proj_Nebraska_CS27_South,
-
-    PCS_NAD27_Nevada_East,		Proj_Nevada_CS27_East,
-    PCS_NAD27_Nevada_Central,		Proj_Nevada_CS27_Central,
-    PCS_NAD27_Nevada_West,		Proj_Nevada_CS27_West,
-
-    PCS_NAD27_New_Hampshire,		Proj_New_Hampshire_CS27,
-
-    PCS_NAD27_New_Jersey,		Proj_New_Jersey_CS27,
-
-    PCS_NAD27_New_Mexico_East,		Proj_New_Mexico_CS27_East,
-    PCS_NAD27_New_Mexico_Cent,		Proj_New_Mexico_CS27_Central,
-    PCS_NAD27_New_Mexico_West,		Proj_New_Mexico_CS27_West,
-
-    PCS_NAD27_New_York_East,		Proj_New_York_CS27_East,
-    PCS_NAD27_New_York_Central,		Proj_New_York_CS27_Central,
-    PCS_NAD27_New_York_West,		Proj_New_York_CS27_West,
-    PCS_NAD27_New_York_Long_Is,		Proj_New_York_CS27_Long_Island,
-
-    PCS_NAD27_North_Carolina,	       	Proj_North_Carolina_CS27,
-
-    PCS_NAD27_North_Dakota_N,		Proj_North_Dakota_CS27_North,
-    PCS_NAD27_North_Dakota_S,		Proj_North_Dakota_CS27_South,
-
-    PCS_NAD27_Ohio_North,		Proj_Ohio_CS27_North,
-    PCS_NAD27_Ohio_South,		Proj_Ohio_CS27_South,
-
-    PCS_NAD27_Oklahoma_North,		Proj_Oklahoma_CS27_North,
-    PCS_NAD27_Oklahoma_South,		Proj_Oklahoma_CS27_South,
-
-    PCS_NAD27_Oregon_North,		Proj_Oregon_CS27_North,
-    PCS_NAD27_Oregon_South,		Proj_Oregon_CS27_South,
-
-    PCS_NAD27_Pennsylvania_N,		Proj_Pennsylvania_CS27_North,
-    PCS_NAD27_Pennsylvania_S,		Proj_Pennsylvania_CS27_South,
-
-    PCS_NAD27_Rhode_Island,		Proj_Rhode_Island_CS27,
-
-    PCS_NAD27_South_Carolina_N,		Proj_South_Carolina_CS27_North,
-    PCS_NAD27_South_Carolina_S,		Proj_South_Carolina_CS27_South,
-
-    PCS_NAD27_South_Dakota_N,		Proj_South_Dakota_CS27_North,
-    PCS_NAD27_South_Dakota_S,		Proj_South_Dakota_CS27_South,
-
-    PCS_NAD27_Tennessee,		Proj_Tennessee_CS27,
-
-    PCS_NAD27_Texas_North,		Proj_Texas_CS27_North,
-    PCS_NAD27_Texas_North_Cen,		Proj_Texas_CS27_North_Central,
-    PCS_NAD27_Texas_Central,		Proj_Texas_CS27_Central,
-    PCS_NAD27_Texas_South_Cen,		Proj_Texas_CS27_South_Central,
-    PCS_NAD27_Texas_South,		Proj_Texas_CS27_South,
-
-    PCS_NAD27_Utah_North,		Proj_Utah_CS27_North,
-    PCS_NAD27_Utah_Central,		Proj_Utah_CS27_Central,
-    PCS_NAD27_Utah_South,		Proj_Utah_CS27_South,
-
-    PCS_NAD27_Vermont,			Proj_Vermont_CS27,
-
-    PCS_NAD27_Virginia_North,		Proj_Virginia_CS27_North,
-    PCS_NAD27_Virginia_South,		Proj_Virginia_CS27_South,
-
-    PCS_NAD27_Washington_North,		Proj_Washington_CS27_North,
-    PCS_NAD27_Washington_South,		Proj_Washington_CS27_South,
-
-    PCS_NAD27_West_Virginia_N,		Proj_West_Virginia_CS27_North,
-    PCS_NAD27_West_Virginia_S,		Proj_West_Virginia_CS27_South,
-
-    PCS_NAD27_Wisconsin_North,		Proj_Wisconsin_CS27_North,
-    PCS_NAD27_Wisconsin_Cen,		Proj_Wisconsin_CS27_Central,
-    PCS_NAD27_Wisconsin_South,		Proj_Wisconsin_CS27_South,
-
-    PCS_NAD27_Wyoming_East,		Proj_Wyoming_CS27_East,
-    PCS_NAD27_Wyoming_E_Cen,		Proj_Wyoming_CS27_East_Central,
-    PCS_NAD27_Wyoming_W_Cen,		Proj_Wyoming_CS27_West_Central,
-    PCS_NAD27_Wyoming_West,		Proj_Wyoming_CS27_West,
-    
-    PCS_NAD27_Puerto_Rico,		Proj_Puerto_Rico_CS27,
-
-    KvUserDefined
-};
-
-/************************************************************************/
-/*                          GTIFMapSysToPCS()                           */
-/*                                                                      */
-/*      Given a Datum, MapSys and zone value generate the best PCS      */
-/*      code possible.                                                  */
-/************************************************************************/
-
-int	GTIFMapSysToPCS( int MapSys, int Datum, int nZone )
-
-{
-    int		PCSCode = KvUserDefined;
-
-    if( MapSys == MapSys_UTM_North )
-    {
-	if( Datum == GCS_NAD27 )
-	    PCSCode = PCS_NAD27_UTM_zone_3N + nZone - 3;
-	else if( Datum == GCS_NAD83 )
-	    PCSCode = PCS_NAD83_UTM_zone_3N + nZone - 3;
-	else if( Datum == GCS_WGS_72 )
-	    PCSCode = PCS_WGS72_UTM_zone_1N + nZone - 1;
-	else if( Datum == GCS_WGS_72BE )
-	    PCSCode = PCS_WGS72BE_UTM_zone_1N + nZone - 1;
-	else if( Datum == GCS_WGS_84 )
-	    PCSCode = PCS_WGS84_UTM_zone_1N + nZone - 1;
-    }
-    else if( MapSys == MapSys_UTM_South )
-    {
-	if( Datum == GCS_WGS_72 )
-	    PCSCode = PCS_WGS72_UTM_zone_1S + nZone - 1;
-	else if( Datum == GCS_WGS_72BE )
-	    PCSCode = PCS_WGS72BE_UTM_zone_1S + nZone - 1;
-	else if( Datum == GCS_WGS_84 )
-	    PCSCode = PCS_WGS84_UTM_zone_1S + nZone - 1;
-    }
-    else if( MapSys == MapSys_State_Plane_27 )
-    {
-	int		i;
-
-        PCSCode = 10000 + nZone;
-	for( i = 0; StatePlaneTable[i] != KvUserDefined; i += 2 )
-	{
-	    if( StatePlaneTable[i+1] == PCSCode )
-	        PCSCode = StatePlaneTable[i];
-	}
-
-        /* Old EPSG code was in error for Tennesse CS27, override */
-        if( nZone == 4100 )
-            PCSCode = 2204;
-    }
-    else if( MapSys == MapSys_State_Plane_83 )
-    {
-	int		i;
-
-        PCSCode = 10000 + nZone + 30;
-
-	for( i = 0; StatePlaneTable[i] != KvUserDefined; i += 2 )
-	{
-	    if( StatePlaneTable[i+1] == PCSCode )
-	        PCSCode = StatePlaneTable[i];
-	}
-
-        /* Old EPSG code was in error for Kentucky North CS83, override */
-        if( nZone == 1601 )
-            PCSCode = 2205;
-    }
-
-    return( PCSCode );
-}
-
-/************************************************************************/
-/*                          GTIFMapSysToProj()                          */
-/*                                                                      */
-/*      Given a MapSys and zone value generate the best Proj_           */
-/*      code possible.                                                  */
-/************************************************************************/
-
-int	GTIFMapSysToProj( int MapSys, int nZone )
-
-{
-    int		ProjCode = KvUserDefined;
-
-    if( MapSys == MapSys_UTM_North )
-    {
-        ProjCode = Proj_UTM_zone_1N + nZone - 1;
-    }
-    else if( MapSys == MapSys_UTM_South )
-    {
-        ProjCode = Proj_UTM_zone_1S + nZone - 1;
-    }
-    else if( MapSys == MapSys_State_Plane_27 )
-    {
-        ProjCode = 10000 + nZone;
-
-        /* Tennesse override */
-        if( nZone == 4100 )
-            ProjCode = 15302;
-    }
-    else if( MapSys == MapSys_State_Plane_83 )
-    {
-        ProjCode = 10000 + nZone + 30;
-
-        /* Kentucky North override */
-        if( nZone == 1601 )
-            ProjCode = 15303;
-    }
-
-    return( ProjCode );
-}
-
-/************************************************************************/
-/*                          GTIFPCSToMapSys()                           */
-/************************************************************************/
-
-/**
- * Translate a PCS_ code into a UTM or State Plane map system, a datum,
- * and a zone if possible.
- *
- * @param PCSCode The projection code (PCS_*) as would be stored in the
- * ProjectedCSTypeGeoKey of a GeoTIFF file.
- *
- * @param pDatum Pointer to an integer into which the datum code (GCS_*)
- * is put if the function succeeds.
- *
- * @param pZone Pointer to an integer into which the zone will be placed
- * if the function is successful.
- *
- * @return Returns either MapSys_UTM_North, MapSys_UTM_South,
- * MapSys_State_Plane_83, MapSys_State_Plane_27 or KvUserDefined.
- * KvUserDefined indicates that the
- * function failed to recognise the projection as UTM or State Plane.
- *
- * The zone value is only set if the return code is other than KvUserDefined.
- * For utm map system the returned zone will be between 1 and 60.  For
- * State Plane, the USGS state plane zone number is returned.  For instance,
- * Alabama East is zone 101.
- *
- * The datum (really this is the GCS) is set to a GCS_ value such as GCS_NAD27.
- *
- * This function is useful to recognise (most) UTM and State Plane coordinate
- * systems, even if CSV files aren't available to translate them automatically.
- * It is used as a fallback mechanism by GTIFGetDefn() for normalization when
- * CSV files aren't found. 
- */
-
-int GTIFPCSToMapSys( int PCSCode, int * pDatum, int * pZone )
-
-{
-    int		Datum = KvUserDefined, Proj = KvUserDefined;
-    int		nZone = KvUserDefined, i;
-
-/* -------------------------------------------------------------------- */
-/*      UTM with various datums.  Note there are lots of PCS UTM        */
-/*      codes not done yet which use strange datums.                    */
-/* -------------------------------------------------------------------- */
-    if( PCSCode >= PCS_NAD27_UTM_zone_3N && PCSCode <= PCS_NAD27_UTM_zone_22N )
-    {
-	Datum = GCS_NAD27;
-	Proj = MapSys_UTM_North;
-	nZone = PCSCode - PCS_NAD27_UTM_zone_3N + 3;
-    }
-    else if( PCSCode >= PCS_NAD83_UTM_zone_3N 
-	     && PCSCode <= PCS_NAD83_UTM_zone_23N )
-    {
-	Datum = GCS_NAD83;
-	Proj = MapSys_UTM_North;
-	nZone = PCSCode - PCS_NAD83_UTM_zone_3N + 3;
-    }
-
-    else if( PCSCode >= PCS_WGS72_UTM_zone_1N
-	     && PCSCode <= PCS_WGS72_UTM_zone_60N )
-    {
-	Datum = GCS_WGS_72;
-	Proj = MapSys_UTM_North;
-	nZone = PCSCode - PCS_WGS72_UTM_zone_1N + 1;
-    }
-    else if( PCSCode >= PCS_WGS72_UTM_zone_1S
-	     && PCSCode <= PCS_WGS72_UTM_zone_60S )
-    {
-	Datum = GCS_WGS_72;
-	Proj = MapSys_UTM_South;
-	nZone = PCSCode - PCS_WGS72_UTM_zone_1S + 1;
-    }
-
-    else if( PCSCode >= PCS_WGS72BE_UTM_zone_1N
-	     && PCSCode <= PCS_WGS72BE_UTM_zone_60N )
-    {
-	Datum = GCS_WGS_72BE;
-	Proj = MapSys_UTM_North;
-	nZone = PCSCode - PCS_WGS72BE_UTM_zone_1N + 1;
-    }
-    else if( PCSCode >= PCS_WGS72BE_UTM_zone_1S
-	     && PCSCode <= PCS_WGS72BE_UTM_zone_60S )
-    {
-	Datum = GCS_WGS_72BE;
-	Proj = MapSys_UTM_South;
-	nZone = PCSCode - PCS_WGS72BE_UTM_zone_1S + 1;
-    }
-
-    else if( PCSCode >= PCS_WGS84_UTM_zone_1N
-	     && PCSCode <= PCS_WGS84_UTM_zone_60N )
-    {
-	Datum = GCS_WGS_84;
-	Proj = MapSys_UTM_North;
-	nZone = PCSCode - PCS_WGS84_UTM_zone_1N + 1;
-    }
-    else if( PCSCode >= PCS_WGS84_UTM_zone_1S
-	     && PCSCode <= PCS_WGS84_UTM_zone_60S )
-    {
-	Datum = GCS_WGS_84;
-	Proj = MapSys_UTM_South;
-	nZone = PCSCode - PCS_WGS84_UTM_zone_1S + 1;
-    }
-    else if( PCSCode >= PCS_SAD69_UTM_zone_18N 
-	     && PCSCode <= PCS_SAD69_UTM_zone_22N )
-    {
-	Datum = KvUserDefined;
-	Proj = MapSys_UTM_North;
-	nZone = PCSCode - PCS_SAD69_UTM_zone_18N + 18;
-    }
-    else if( PCSCode >= PCS_SAD69_UTM_zone_17S
-	     && PCSCode <= PCS_SAD69_UTM_zone_25S )
-    {
-	Datum = KvUserDefined;
-	Proj = MapSys_UTM_South;
-	nZone = PCSCode - PCS_SAD69_UTM_zone_17S + 17;
-    }
-
-/* -------------------------------------------------------------------- */
-/*      State Plane zones, first we translate any PCS_ codes to		*/
-/*	a Proj_ code that we can get a handle on.			*/
-/* -------------------------------------------------------------------- */
-    for( i = 0; StatePlaneTable[i] != KvUserDefined; i += 2 )
-    {
-	if( StatePlaneTable[i] == PCSCode )
-	    PCSCode = StatePlaneTable[i+1];
-    }
-
-    if( PCSCode <= 15900 && PCSCode >= 10000 )
-    {
-	if( (PCSCode % 100) >= 30 )
-        {
-            Proj = MapSys_State_Plane_83;
-	    Datum = GCS_NAD83;
-        }
-	else
-        {
-            Proj = MapSys_State_Plane_27;
-	    Datum = GCS_NAD27;
-        }
-	
-	nZone = PCSCode - 10000;
-	if( Datum == GCS_NAD83 )
-	    nZone -= 30;
-    }
-
-    if( pDatum != NULL )
-        *pDatum = Datum;
-
-    if( pZone != NULL )
-        *pZone = nZone;
-
-    return( Proj );
-}
-
-/************************************************************************/
-/*                          GTIFProjToMapSys()                          */
-/************************************************************************/
-
-/**
- * Translate a Proj_ code into a UTM or State Plane map system, and a zone
- * if possible.
- *
- * @param ProjCode The projection code (Proj_*) as would be stored in the
- * ProjectionGeoKey of a GeoTIFF file.
- * @param pZone Pointer to an integer into which the zone will be placed
- * if the function is successful.
- *
- * @return Returns either MapSys_UTM_North, MapSys_UTM_South,
- * MapSys_State_Plane_27, MapSys_State_Plane_83 or KvUserDefined.
- * KvUserDefined indicates that the
- * function failed to recognise the projection as UTM or State Plane.
- *
- * The zone value is only set if the return code is other than KvUserDefined.
- * For utm map system the returned zone will be between 1 and 60.  For
- * State Plane, the USGS state plane zone number is returned.  For instance,
- * Alabama East is zone 101.
- *
- * This function is useful to recognise UTM and State Plane coordinate
- * systems, and to extract zone numbers so the projections can be
- * represented as UTM rather than as the underlying projection method such
- * Transverse Mercator for instance.
- */
-
-int GTIFProjToMapSys( int ProjCode, int * pZone )
-
-{
-    int		nZone = KvUserDefined;
-    int		MapSys = KvUserDefined;
-
-/* -------------------------------------------------------------------- */
-/*      Handle UTM.                                                     */
-/* -------------------------------------------------------------------- */
-    if( ProjCode >= Proj_UTM_zone_1N && ProjCode <= Proj_UTM_zone_60N )
-    {
-	MapSys = MapSys_UTM_North;
-	nZone = ProjCode - Proj_UTM_zone_1N + 1;
-    }
-    else if( ProjCode >= Proj_UTM_zone_1S && ProjCode <= Proj_UTM_zone_60S )
-    {
-	MapSys = MapSys_UTM_South;
-	nZone = ProjCode - Proj_UTM_zone_1S + 1;
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Handle State Plane.  I think there are some anomolies in        */
-/*      here, so this is a bit risky.                                   */
-/* -------------------------------------------------------------------- */
-    else if( ProjCode >= 10101 && ProjCode <= 15299 )
-    {
-        if( ProjCode % 100 >= 30 )
-        {
-            MapSys = MapSys_State_Plane_83;
-            nZone = ProjCode - 10000 - 30;
-        }
-        else
-        {
-            MapSys = MapSys_State_Plane_27;
-            nZone = ProjCode - 10000;
-        }
-    }
-    
-    if( pZone != NULL )
-        *pZone = nZone;
-
-    return( MapSys );
-}
-
diff --git a/src/tiff/geo_free.c b/src/tiff/geo_free.c
deleted file mode 100644
index a43fcad..0000000
--- a/src/tiff/geo_free.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/**********************************************************************
- *
- *  geo_free.c  -- Public routines for GEOTIFF GeoKey access.
- *
- *    Written By: Niles D. Ritter.
- *
- *  copyright (c) 1995   Niles D. Ritter
- *
- *  Permission granted to use this software, so long as this copyright
- *  notice accompanies any products derived therefrom.
- *
- **********************************************************************/
-
-#include "geotiff.h"   /* public interface        */
-#include "geo_tiffp.h" /* external TIFF interface */
-#include "geo_keyp.h"  /* private interface       */
-
-
-/**********************************************************************
- *
- *                        Public Routines
- *
- **********************************************************************/
-
-/**
-  
-This function deallocates an existing GeoTIFF access handle previously
-created with GTIFNew().  If the handle was
-used to write GeoTIFF keys to the TIFF file, the 
-GTIFWriteKeys() function should be used
-to flush results to the file before calling GTIFFree().  GTIFFree()
-should be called before XTIFFClose() is
-called on the corresponding TIFF file handle.<p>
-
-*/
-
-void GTIFFree(GTIF* gtif)
-{
-    int     i;
-	
-    if (!gtif) return;
-	
-    /* Free parameter arrays */
-    if (gtif->gt_double) _GTIFFree (gtif->gt_double);
-    if (gtif->gt_short) _GTIFFree (gtif->gt_short);
-	
-    /* Free GeoKey arrays */
-    if (gtif->gt_keys)
-    {
-        for (i = 0; i < MAX_KEYS; i++)
-        {
-            if (gtif->gt_keys[i].gk_type == TYPE_ASCII)
-            {
-                _GTIFFree (gtif->gt_keys[i].gk_data);
-            }
-        }
-        _GTIFFree (gtif->gt_keys);
-    }
-    if (gtif->gt_keyindex) _GTIFFree (gtif->gt_keyindex);
-	
-    _GTIFFree (gtif);
-}
diff --git a/src/tiff/geo_get.c b/src/tiff/geo_get.c
deleted file mode 100644
index f027bd3..0000000
--- a/src/tiff/geo_get.c
+++ /dev/null
@@ -1,176 +0,0 @@
-/**********************************************************************
- *
- *  geo_get.c  -- Public routines for GEOTIFF GeoKey access.
- *
- *    Written By: Niles D. Ritter.
- *
- *  copyright (c) 1995   Niles D. Ritter
- *
- *  Permission granted to use this software, so long as this copyright
- *  notice accompanies any products derived therefrom.
- *
- *  Revision History;
- *
- *    20 June, 1995      Niles D. Ritter         New
- *    3 July,  1995      Greg Martin             Fix strings and index
- *    6 July,  1995      Niles D. Ritter         Unfix indexing.
- *
- **********************************************************************/
-
-#include "geotiff.h"   /* public interface        */
-#include "geo_tiffp.h" /* external TIFF interface */
-#include "geo_keyp.h"  /* private interface       */
-
-/* return the Header info of this geotiff file */
-
-void GTIFDirectoryInfo(GTIF *gtif, int version[3], int *keycount)
-{
-        if (version)
-        {
-                version[0]  = gtif->gt_version;
-                version[1]  = gtif->gt_rev_major;
-                version[2]  = gtif->gt_rev_minor;
-        }
-        if (keycount) *keycount = gtif->gt_num_keys;
-}
-
-
-int GTIFKeyInfo(GTIF *gtif, geokey_t key, int *size, tagtype_t* type)
-{
-        int index = gtif->gt_keyindex[ key ];
-        GeoKey *keyptr;
-
-        if (!index) return 0;
-
-        keyptr = gtif->gt_keys + index;
-        if (size) *size = (int) keyptr->gk_size;
-        if (type) *type = keyptr->gk_type;
-
-        return keyptr->gk_count;
-}
-
-/** 
-
-This function reads the value of a single GeoKey from a GeoTIFF file.
-
- at param gtif The geotiff information handle from GTIFNew().
-
- at param thekey The geokey_t name (such as ProjectedCSTypeGeoKey).
-This must come from the list of legal geokey_t values
-(an enumeration) listed below.
-
- at param val The <b>val</b> argument is a pointer to the
-variable into which the value should be read.  The type of the variable
-varies depending on the geokey_t given.  While there is no ready mapping
-of geokey_t values onto types, in general code values are of type <i>short</i>,
-citations are strings, and everything else is of type <i>double</i>.  Note
-that pointer's to <i>int</i> should never be passed to GTIFKeyGet() for
-integer values as they will be shorts, and the int's may not be properly
-initialized (and will be grossly wrong on MSB systems).
-
- at param index Indicates how far into the list of values
-for this geokey to offset. Should normally be zero.
-
- at param count Indicates how many values
-to read.  At this time all keys except for strings have only one value,
-so <b>index</b> should be zero, and <b>count</b> should be one.
-
- at return The GTIFKeyGet() function returns the number of values read.  Normally
-this would be one if successful or zero if the key doesn't exist for this
-file.
-
-From geokeys.inc we see the following geokey_t values are possible:<p>
-
-<pre>
--- 6.2.1 GeoTIFF Configuration Keys --
-
-ValuePair(  GTModelTypeGeoKey,	1024) -- Section 6.3.1.1 Codes       --
-ValuePair(  GTRasterTypeGeoKey,	1025) -- Section 6.3.1.2 Codes       --
-ValuePair(  GTCitationGeoKey,	1026) -- documentation --
-
--- 6.2.2 Geographic CS Parameter Keys --
-
-ValuePair(  GeographicTypeGeoKey,	2048) -- Section 6.3.2.1 Codes     --
-ValuePair(  GeogCitationGeoKey,	2049) -- documentation             --
-ValuePair(  GeogGeodeticDatumGeoKey,	2050) -- Section 6.3.2.2 Codes     --
-ValuePair(  GeogPrimeMeridianGeoKey,	2051) -- Section 6.3.2.4 codes     --
-ValuePair(  GeogLinearUnitsGeoKey,	2052) -- Section 6.3.1.3 Codes     --
-ValuePair(  GeogLinearUnitSizeGeoKey,	2053) -- meters                    --
-ValuePair(  GeogAngularUnitsGeoKey,	2054) -- Section 6.3.1.4 Codes     --
-ValuePair(  GeogAngularUnitSizeGeoKey,	2055) -- radians                   --
-ValuePair(  GeogEllipsoidGeoKey,	2056) -- Section 6.3.2.3 Codes     --
-ValuePair(  GeogSemiMajorAxisGeoKey,	2057) -- GeogLinearUnits           --
-ValuePair(  GeogSemiMinorAxisGeoKey,	2058) -- GeogLinearUnits           --
-ValuePair(  GeogInvFlatteningGeoKey,	2059) -- ratio                     --
-ValuePair(  GeogAzimuthUnitsGeoKey,	2060) -- Section 6.3.1.4 Codes     --
-ValuePair(  GeogPrimeMeridianLongGeoKey,	2061) -- GeoAngularUnit            --
-
--- 6.2.3 Projected CS Parameter Keys --
---    Several keys have been renamed,--
---    and the deprecated names aliased for backward compatibility --
-
-ValuePair(  ProjectedCSTypeGeoKey,	3072)     -- Section 6.3.3.1 codes   --
-ValuePair(  PCSCitationGeoKey,	3073)     -- documentation           --
-ValuePair(  ProjectionGeoKey,	3074)     -- Section 6.3.3.2 codes   --
-ValuePair(  ProjCoordTransGeoKey,	3075)     -- Section 6.3.3.3 codes   --
-ValuePair(  ProjLinearUnitsGeoKey,	3076)     -- Section 6.3.1.3 codes   --
-ValuePair(  ProjLinearUnitSizeGeoKey,	3077)     -- meters                  --
-ValuePair(  ProjStdParallel1GeoKey,	3078)     -- GeogAngularUnit --
-ValuePair(  ProjStdParallelGeoKey,ProjStdParallel1GeoKey) -- ** alias **   --
-ValuePair(  ProjStdParallel2GeoKey,	3079)     -- GeogAngularUnit --
-ValuePair(  ProjNatOriginLongGeoKey,	3080)     -- GeogAngularUnit --
-ValuePair(  ProjOriginLongGeoKey,ProjNatOriginLongGeoKey) -- ** alias **     --
-ValuePair(  ProjNatOriginLatGeoKey,	3081)     -- GeogAngularUnit --
-ValuePair(  ProjOriginLatGeoKey,ProjNatOriginLatGeoKey)   -- ** alias **     --
-ValuePair(  ProjFalseEastingGeoKey,	3082)     -- ProjLinearUnits --
-ValuePair(  ProjFalseNorthingGeoKey,	3083)     -- ProjLinearUnits --
-ValuePair(  ProjFalseOriginLongGeoKey,	3084)     -- GeogAngularUnit --
-ValuePair(  ProjFalseOriginLatGeoKey,	3085)     -- GeogAngularUnit --
-ValuePair(  ProjFalseOriginEastingGeoKey,	3086)     -- ProjLinearUnits --
-ValuePair(  ProjFalseOriginNorthingGeoKey,	3087)     -- ProjLinearUnits --
-ValuePair(  ProjCenterLongGeoKey,	3088)     -- GeogAngularUnit --
-ValuePair(  ProjCenterLatGeoKey,	3089)     -- GeogAngularUnit --
-ValuePair(  ProjCenterEastingGeoKey,	3090)     -- ProjLinearUnits --
-ValuePair(  ProjCenterNorthingGeoKey,	3091)     -- ProjLinearUnits --
-ValuePair(  ProjScaleAtNatOriginGeoKey,	3092)     -- ratio   --
-ValuePair(  ProjScaleAtOriginGeoKey,ProjScaleAtNatOriginGeoKey)  -- ** alias **   --
-ValuePair(  ProjScaleAtCenterGeoKey,	3093)     -- ratio   --
-ValuePair(  ProjAzimuthAngleGeoKey,	3094)     -- GeogAzimuthUnit --
-ValuePair(  ProjStraightVertPoleLongGeoKey,	3095)     -- GeogAngularUnit --
-
- 6.2.4 Vertical CS Keys 
-   
-ValuePair(  VerticalCSTypeGeoKey,	4096)  -- Section 6.3.4.1 codes   --
-ValuePair(  VerticalCitationGeoKey,	4097)  -- documentation --
-ValuePair(  VerticalDatumGeoKey,	4098)  -- Section 6.3.4.2 codes   --
-ValuePair(  VerticalUnitsGeoKey,	4099)  -- Section 6.3.1 (.x) codes   --
-</pre>
-*/
-
-int GTIFKeyGet(GTIF *gtif, geokey_t thekey, void *val, int index, int count)
-{
-        int kindex = gtif->gt_keyindex[ thekey ];
-        GeoKey *key;
-        gsize_t size;
-        char *data;
-        tagtype_t type;
-
-        if (!kindex) return 0;
-
-        key = gtif->gt_keys+kindex;
-        if (!count) count = key->gk_count - index;
-        if (count <=0) return 0;
-        if (count > key->gk_count) count = key->gk_count;
-        size = key->gk_size;
-        type = key->gk_type;
-
-        if (count==1 && type==TYPE_SHORT) data = (char *)&key->gk_data;
-        else data = key->gk_data;
-
-        _GTIFmemcpy( val, data + index*size, count*size );
-
-        if (type==TYPE_ASCII)
-           ((char *)val)[count-1] = '\0'; /* replace last char with NULL */
-
-        return count;
-}
diff --git a/src/tiff/geo_keyp.h b/src/tiff/geo_keyp.h
deleted file mode 100644
index 140bf40..0000000
--- a/src/tiff/geo_keyp.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/**********************************************************************
- *
- *  geo_keyp.h - private interface for GeoTIFF geokey tag parsing
- *
- *     Written by: Niles D. Ritter
- *
- **********************************************************************/
-
-#ifndef __geo_keyp_h_
-#define __geo_keyp_h_
-
-#include <stdlib.h> /* for size_t */
-
-/*
- * This structure contains the internal program
- * representation of the key entry.
- */
-struct GeoKey {
-	int       gk_key;    /* GeoKey ID        */
-	size_t    gk_size;   /* data byte size   */
-	tagtype_t gk_type;   /* TIFF data type   */
-	long      gk_count;  /* number of values */
-	char*     gk_data;   /* pointer to data, or value */
-};
-typedef struct GeoKey GeoKey;
-
-/*
- *  This structure represents the file-organization of
- *  the key entry. Note that it assumes that short entries
- *  are aligned along 2-byte boundaries.
- */
-struct KeyEntry {
-	pinfo_t ent_key;        /* GeoKey ID            */
-	pinfo_t ent_location;   /* TIFF Tag ID or 0     */
-	pinfo_t ent_count;      /* GeoKey value count   */
-	pinfo_t ent_val_offset; /* value or tag offset  */
-};
-typedef struct KeyEntry KeyEntry;
-
-/*
- * This is the header of the CoordSystemInfoTag. The 'Version'
- *  will only change if the CoorSystemInfoTag structure changes;
- *  The Major Revision will be incremented whenever a new set of
- *  Keys is added or changed, while the Minor revision will be
- *  incremented when only the set of Key-values is increased.
- */
-struct KeyHeader{
-	pinfo_t hdr_version;      /* GeoTIFF Version          */
-	pinfo_t hdr_rev_major;    /* GeoKey Major Revision #  */
-	pinfo_t hdr_rev_minor;    /* GeoKey Minor Revision #  */
-	pinfo_t hdr_num_keys;     /* Number of GeoKeys        */
-};
-typedef struct KeyHeader KeyHeader;
-
-/*
- * This structure holds temporary data while reading or writing
- *  the tags.
- */
-struct TempKeyData {
-    char   *tk_asciiParams;
-    int     tk_asciiParamsLength;
-    int     tk_asciiParamsOffset;
-};
-typedef struct TempKeyData TempKeyData;
-
-
-struct gtiff {
-   tiff_t*    gt_tif;      /* TIFF file descriptor  */
-   TIFFMethod gt_methods;  /* TIFF i/o methods      */
-   int        gt_flags;    /* file flags            */
-   
-   pinfo_t    gt_version;  /* GeoTIFF Version       */
-   pinfo_t    gt_rev_major;/* GeoKey Key Revision   */
-   pinfo_t    gt_rev_minor;/* GeoKey Code Revision  */
-   
-   int        gt_num_keys; /* number of keys        */
-   GeoKey*    gt_keys;     /* array of keys         */
-   int*       gt_keyindex; /* index of a key, if set*/
-   int        gt_keymin;   /* smallest key set      */
-   int        gt_keymax;   /* largest key set       */
-   
-   pinfo_t*   gt_short;    /* array of SHORT vals   */
-   double*    gt_double;   /* array of DOUBLE vals  */
-   int        gt_nshorts;  /* number of SHORT vals  */
-   int        gt_ndoubles; /* number of DOUBLE vals */
-};  
-
-typedef enum {
-	FLAG_FILE_OPEN=1,
-	FLAG_FILE_MODIFIED=2
-} gtiff_flags;
-
-#define MAX_KEYINDEX 65535   /* largest possible key    */
-#define MAX_KEYS 100         /* maximum keys in a file  */
-#define MAX_VALUES 1000      /* maximum values in a tag */
-
-#endif /* __geo_keyp_h_ */
-
diff --git a/src/tiff/geo_names.c b/src/tiff/geo_names.c
deleted file mode 100644
index de58ca2..0000000
--- a/src/tiff/geo_names.c
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- * geo_names.c
- *
- *  This encapsulates all of the value-naming mechanism of 
- *  libgeotiff. 
- *
- *  Written By: Niles Ritter
- */
-
-#include "geotiffio.h"
-#include "geonames.h"
-#include "geo_tiffp.h" /* for tag names */
-
-static KeyInfo _formatInfo[] =  {
-   {TYPE_BYTE,    "Byte"},
-   {TYPE_SHORT,   "Short"},
-   {TYPE_LONG,    "Long"},
-   {TYPE_RATIONAL,"Rational"},
-   {TYPE_ASCII,   "Ascii"},
-   {TYPE_FLOAT,   "Float"},
-   {TYPE_DOUBLE,  "Double"},
-   {TYPE_SBYTE,   "SignedByte"},
-   {TYPE_SSHORT,  "SignedShort"},
-   {TYPE_SLONG,  "SignedLong"},
-   {TYPE_UNKNOWN, "Unknown"},
-    END_LIST
-};
-
-static KeyInfo _tagInfo[] =  {
-    {GTIFF_PIXELSCALE,  "ModelPixelScaleTag"},
-    {GTIFF_TRANSMATRIX, "ModelTransformationTag"},
-    {GTIFF_TIEPOINTS,   "ModelTiepointTag"},
-     /* This alias maps the Intergraph symbol to the current tag */
-    {GTIFF_TRANSMATRIX, "IntergraphMatrixTag"},
-    END_LIST
-};
-
-static char *FindName(KeyInfo *info,int key)
-{
-   static char errmsg[80];
-   
-   while (info->ki_key>=0 && info->ki_key != key) info++;
-
-   if (info->ki_key<0)
-   {
-	   sprintf(errmsg,"Unknown-%d", key );
-	   return errmsg;
-   }
-   return info->ki_name;
-}
-
-char *GTIFKeyName(geokey_t key)
-{
-   return FindName( &_keyInfo[0],key);
-}
-
-char *GTIFTypeName(tagtype_t type)
-{
-   return FindName( &_formatInfo[0],type);
-}
-
-char *GTIFTagName(int tag)
-{
-   return FindName( &_tagInfo[0],tag);
-}
-
-char *GTIFValueName(geokey_t key, int value)
-{
-   KeyInfo *info;
-   
-   switch (key)
-   {
-	/* All codes using linear/angular/whatever units */
-	case GeogLinearUnitsGeoKey: 
-	case ProjLinearUnitsGeoKey: 
-	case GeogAngularUnitsGeoKey: 
-	case GeogAzimuthUnitsGeoKey: 
-		                      info=_geounitsValue; break;
-
-   	/* put other key-dependent lists here */
-	case GTModelTypeGeoKey:       info=_modeltypeValue; break;
-	case GTRasterTypeGeoKey:      info=_rastertypeValue; break;
-	case GeographicTypeGeoKey:    info=_geographicValue; break;
-	case GeogGeodeticDatumGeoKey: info=_geodeticdatumValue; break;
-	case GeogEllipsoidGeoKey:     info=_ellipsoidValue; break;
-	case GeogPrimeMeridianGeoKey: info=_primemeridianValue; break;
-	case ProjectedCSTypeGeoKey:   info=_pcstypeValue; break;
-	case ProjectionGeoKey:        info=_projectionValue; break;
-	case ProjCoordTransGeoKey:    info=_coordtransValue; break;
-	case VerticalCSTypeGeoKey:    info=_vertcstypeValue; break;
-	case VerticalDatumGeoKey:     info=_vdatumValue; break;
-
-	/* And if all else fails... */
-   	default:                      info = _csdefaultValue;break;
-   }
-   
-   return FindName( info,value);
-}
-
-/* 
- * Inverse Utilities (name->code) 
- */
-
-
-static int FindCode(KeyInfo *info,char *key)
-{
-   while (info->ki_key>=0 && strcmp(info->ki_name,key) ) info++;
-
-   if (info->ki_key<0)
-   {
-	/* not a registered key; might be generic code */
-	if (!strncmp(key,"Unknown-",8))
-	{
-		int code=-1;
-		sscanf(key,"Unknown-%d",&code);
-		return code;
-	}
-	else return -1;
-   }
-   return info->ki_key;
-}
-
-int GTIFKeyCode(char *key)
-{
-   return FindCode( &_keyInfo[0],key);
-}
-
-int GTIFTypeCode(char *type)
-{
-   return FindCode( &_formatInfo[0],type);
-}
-
-int GTIFTagCode(char *tag)
-{
-   return FindCode( &_tagInfo[0],tag);
-}
-
-
-/*
- *  The key must be determined with GTIFKeyCode() before
- *  the name can be encoded.
- */
-int GTIFValueCode(geokey_t key, char *name)
-{
-   KeyInfo *info;
-   
-   switch (key)
-   {
-	/* All codes using linear/angular/whatever units */
-	case GeogLinearUnitsGeoKey: 
-	case ProjLinearUnitsGeoKey: 
-	case GeogAngularUnitsGeoKey: 
-	case GeogAzimuthUnitsGeoKey: 
-		                      info=_geounitsValue; break;
-
-   	/* put other key-dependent lists here */
-	case GTModelTypeGeoKey:       info=_modeltypeValue; break;
-	case GTRasterTypeGeoKey:      info=_rastertypeValue; break;
-	case GeographicTypeGeoKey:    info=_geographicValue; break;
-	case GeogGeodeticDatumGeoKey: info=_geodeticdatumValue; break;
-	case GeogEllipsoidGeoKey:     info=_ellipsoidValue; break;
-	case GeogPrimeMeridianGeoKey: info=_primemeridianValue; break;
-	case ProjectedCSTypeGeoKey:   info=_pcstypeValue; break;
-	case ProjectionGeoKey:        info=_projectionValue; break;
-	case ProjCoordTransGeoKey:    info=_coordtransValue; break;
-	case VerticalCSTypeGeoKey:    info=_vertcstypeValue; break;
-	case VerticalDatumGeoKey:     info=_vdatumValue; break;
-
-	/* And if all else fails... */
-   	default:                      info = _csdefaultValue;break;
-   }
-   
-   return FindCode( info,name);
-}
-
diff --git a/src/tiff/geo_new.c b/src/tiff/geo_new.c
deleted file mode 100644
index 4fe58ab..0000000
--- a/src/tiff/geo_new.c
+++ /dev/null
@@ -1,224 +0,0 @@
-/**********************************************************************
- *
- *  geo_new.c  -- Public routines for GEOTIFF GeoKey access.
- *
- *    Written By: Niles D. Ritter.
- *
- *  copyright (c) 1995   Niles D. Ritter
- *
- *  Permission granted to use this software, so long as this copyright
- *  notice accompanies any products derived therefrom.
- *
- *    20 June, 1995      Niles D. Ritter         New
- *    7 July,  1995      Greg Martin             Fix index
- *
- * $Log: geo_new.c,v $
- * Revision 1.2  2004/03/19 11:51:23  lubia
- * Atualizada as bibliotecas Tif e GeoTif
- *
- * Revision 1.9  2003/06/19 20:04:11  warmerda
- * fix memory underwrite if ascii parameter string is zero length
- *
- * Revision 1.8  2003/06/05 14:20:45  warmerda
- * cosmetic formatting changes
- *
- **********************************************************************/
-
-#include "geotiffio.h"   /* public interface        */
-#include "geo_tiffp.h" /* external TIFF interface */
-#include "geo_keyp.h"  /* private interface       */
-
-/* private local routines */
-static int ReadKey(GTIF* gt, TempKeyData* tempData,
-                   KeyEntry* entptr, GeoKey* keyptr);
-
-
-/**********************************************************************
- *
- *                        Public Routines
- *
- **********************************************************************/
-
-
-/**
- * Given an open TIFF file, look for GTIF keys and 
- *  values and return GTIF structure.
-
-This function creates a GeoTIFF information interpretation handle
-(GTIF *) based on a passed in TIFF handle originally from 
-XTIFFOpen().  Even though the argument 
-(<b>tif</b>) is shown as type <tt>void *</tt>, it is really normally
-of type <tt>TIFF *</tt>.<p>
-
-The returned GTIF handle can be used to read or write GeoTIFF tags 
-using the various GTIF functions.  The handle should be destroyed using
-GTIFFree() before the file is closed with TIFFClose().<p>
-
-If the file accessed has no GeoTIFF keys, an valid (but empty) GTIF is
-still returned.  GTIFNew() is used both for existing files being read, and
-for new TIFF files that will have GeoTIFF tags written to them.<p>
-
- */
- 
-GTIF* GTIFNew(void *tif)
-{
-    GTIF* gt=(GTIF*)0;
-    int count,bufcount,index;
-    GeoKey *keyptr;
-    pinfo_t *data;
-    KeyEntry *entptr;
-    KeyHeader *header;
-    TempKeyData tempData;
-	
-    gt = (GTIF*)_GTIFcalloc( sizeof(GTIF));
-    if (!gt) goto failure;	
-	
-    /* install TIFF file and I/O methods */
-    gt->gt_tif = (tiff_t *)tif;
-    _GTIFSetDefaultTIFF(&gt->gt_methods);
-
-    tempData.tk_asciiParams = 0;
-    tempData.tk_asciiParamsLength = 0;
-    tempData.tk_asciiParamsOffset = 0;
-	
-    /* since this is an array, GTIF will allocate the memory */
-    if (!(gt->gt_methods.get)(tif, GTIFF_GEOKEYDIRECTORY, &gt->gt_nshorts, &data ))
-    {
-        /* No ProjectionInfo, create a blank one */
-        data=(pinfo_t*)_GTIFcalloc((4+MAX_VALUES)*sizeof(pinfo_t));
-        if (!data) goto failure;	
-        header = (KeyHeader *)data;
-        header->hdr_version = GvCurrentVersion;
-        header->hdr_rev_major = GvCurrentRevision;
-        header->hdr_rev_minor = GvCurrentMinorRev;
-        gt->gt_nshorts=sizeof(KeyHeader)/sizeof(pinfo_t);
-    }
-    gt->gt_short = data;
-    header = (KeyHeader *)data;
-	
-    if (header->hdr_version > GvCurrentVersion) goto failure;
-    if (header->hdr_rev_major > GvCurrentRevision)
-    {
-        /* issue warning */
-    }
-	
-    /* If we got here, then the geokey can be parsed */
-    count = header->hdr_num_keys;
-    gt->gt_num_keys = count;
-    gt->gt_version  = header->hdr_version;
-    gt->gt_rev_major  = header->hdr_rev_major;
-    gt->gt_rev_minor  = header->hdr_rev_minor;
-
-    bufcount = count+MAX_KEYS; /* allow for expansion */
-
-    /* Get the PARAMS Tags, if any */
-    if (!(gt->gt_methods.get)(tif, GTIFF_DOUBLEPARAMS,
-                              &gt->gt_ndoubles, &gt->gt_double ))
-    {
-        gt->gt_double=(double*)_GTIFcalloc(MAX_VALUES*sizeof(double));
-        if (!gt->gt_double) goto failure;	
-    }
-    if (!(gt->gt_methods.get)(tif, GTIFF_ASCIIPARAMS,
-                              &tempData.tk_asciiParamsLength,
-                              &tempData.tk_asciiParams ))
-    {
-        tempData.tk_asciiParams         = 0;
-        tempData.tk_asciiParamsLength   = 0;
-    }
-    else
-    {
-        /* last NULL doesn't count; "|" used for delimiter */
-        --tempData.tk_asciiParamsLength;
-    }
-
-    /* allocate space for GeoKey array and its index */
-    gt->gt_keys = (GeoKey *)_GTIFcalloc( sizeof(GeoKey)*bufcount);
-    if (!gt->gt_keys) goto failure;
-    gt->gt_keyindex = (int *)_GTIFcalloc( sizeof(int)*(MAX_KEYINDEX+1));
-    if (!gt->gt_keyindex) goto failure;
-	
-    /*  Loop to get all GeoKeys */
-    entptr = ((KeyEntry *)data) + 1;
-    keyptr = gt->gt_keys;
-    gt->gt_keymin = MAX_KEYINDEX;
-    gt->gt_keymax = 0;
-    for (index=1; index<=count; index++,entptr++)
-    {
-        if (!ReadKey(gt, &tempData, entptr, ++keyptr))
-            goto failure;
-			
-        /* Set up the index (start at 1, since 0=unset) */
-        gt->gt_keyindex[entptr->ent_key] = index;		
-    }
-
-    if( tempData.tk_asciiParams != NULL )
-        _GTIFFree( tempData.tk_asciiParams );
-	
-    return gt;
-	
-  failure:
-    /* Notify of error */
-    GTIFFree (gt);
-    return (GTIF *)0;
-}
-
-/**********************************************************************
- *
- *                        Private Routines
- *
- **********************************************************************/
-
-/*
- * Given KeyEntry, read in the GeoKey value location and set up
- *  the Key structure, returning 0 if failure.
- */
-
-static int ReadKey(GTIF* gt, TempKeyData* tempData,
-                   KeyEntry* entptr, GeoKey* keyptr)
-{
-    int offset,count;
-	
-    keyptr->gk_key = entptr->ent_key;
-    keyptr->gk_count = entptr->ent_count;
-    count = entptr->ent_count;
-    offset = entptr->ent_val_offset;
-    if (gt->gt_keymin > keyptr->gk_key)  gt->gt_keymin=keyptr->gk_key;
-    if (gt->gt_keymax < keyptr->gk_key)  gt->gt_keymax=keyptr->gk_key;
-	
-    if (entptr->ent_location)
-        keyptr->gk_type = (gt->gt_methods.type)(gt->gt_tif,entptr->ent_location);
-    else
-        keyptr->gk_type = (gt->gt_methods.type)(gt->gt_tif,GTIFF_GEOKEYDIRECTORY);
-	  
-    switch (entptr->ent_location)
-    {
-        case GTIFF_LOCAL:
-            /* store value into data value */
-            *(pinfo_t *)(&keyptr->gk_data) = entptr->ent_val_offset;
-            break;
-        case GTIFF_GEOKEYDIRECTORY:
-            keyptr->gk_data = (char *)(gt->gt_short+offset);
-            if (gt->gt_nshorts < offset+count)
-                gt->gt_nshorts = offset+count;
-            break;
-        case GTIFF_DOUBLEPARAMS:
-            keyptr->gk_data = (char *)(gt->gt_double+offset);
-            if (gt->gt_ndoubles < offset+count)
-                gt->gt_ndoubles = offset+count;
-            break;
-        case GTIFF_ASCIIPARAMS:
-            if (offset + count > tempData->tk_asciiParamsLength)
-                return (0);
-
-            keyptr->gk_data = (char *) _GTIFcalloc (MAX(1,count));
-            _GTIFmemcpy (keyptr->gk_data,
-                         tempData->tk_asciiParams + offset, count);
-            keyptr->gk_data[MAX(0,count-1)] = '\0';
-            break;
-        default:
-            return 0; /* failure */
-    }
-    keyptr->gk_size = _gtiff_size[keyptr->gk_type];
-	
-    return 1; /* success */
-}
diff --git a/src/tiff/geo_normalize.c b/src/tiff/geo_normalize.c
deleted file mode 100644
index 1c6645c..0000000
--- a/src/tiff/geo_normalize.c
+++ /dev/null
@@ -1,2330 +0,0 @@
-/******************************************************************************
- * $Id: geo_normalize.c,v 1.3 2004/03/19 11:51:23 lubia Exp $
- *
- * Project:  libgeotiff
- * Purpose:  Code to normalize PCS and other composite codes in a GeoTIFF file.
- * Author:   Frank Warmerdam, warmerda at home.com
- *
- ******************************************************************************
- * Copyright (c) 1999, Frank Warmerdam
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- ******************************************************************************
- *
- * $Log: geo_normalize.c,v $
- * Revision 1.3  2004/03/19 11:51:23  lubia
- * Atualizada as bibliotecas Tif e GeoTif
- *
- * Revision 1.36  2003/01/28 18:31:58  warmerda
- * Default dfInDegrees in GTIFAngleToDD().
- *
- * Revision 1.35  2003/01/15 04:39:16  warmerda
- * Added GTIFDeaccessCSV
- *
- * Revision 1.34  2003/01/15 03:37:40  warmerda
- * added GTIFFreeMemory()
- *
- * Revision 1.33  2002/12/05 19:21:01  warmerda
- * fixed dfInDegrees to actually be in degrees, not radians!
- *
- * Revision 1.32  2002/11/30 16:01:11  warmerda
- * fixed some problems in GTIFGetUOMAngleInfo
- *
- * Revision 1.31  2002/11/30 15:44:35  warmerda
- * fixed GetCTParms EPSG code mappings
- *
- * Revision 1.30  2002/11/28 22:27:42  warmerda
- * preliminary upgrade to EPSG 6.2.2 tables
- *
- * Revision 1.29  2002/06/19 03:51:15  warmerda
- * migrated cpl_csv.h into cpl_serv.h
- *
- * Revision 1.28  2002/01/03 21:28:25  warmerda
- * call CSVDeaccess(NULL) at end of GTIFPrintDefn()
- *
- * Revision 1.27  2001/04/17 13:41:10  warmerda
- * fix memory leaks in GTIFPrintDefn()
- *
- * Revision 1.26  2001/04/17 13:23:07  warmerda
- * added support for reading custom ellipsoid definitions
- *
- * Revision 1.25  2001/03/05 04:55:26  warmerda
- * CVSDeaccess at end of GTIFGetDefn to avoid file leak
- *
- * Revision 1.24  2001/03/05 03:26:29  warmerda
- * fixed memory leaks in GTIFPrintDefn()
- *
- * Revision 1.23  2001/02/23 13:49:48  warmerda
- * Fixed GTIFPrintDefn() to use fprintf( fp ), instead of printf().
- *
- * Revision 1.22  2000/10/13 14:30:57  warmerda
- * fixed LCC parm order when parameters read directly from geotiff file
- *
- * Revision 1.21  2000/09/15 19:30:14  warmerda
- * report units of linear proj parms
- *
- * Revision 1.20  2000/09/15 18:21:07  warmerda
- * Fixed order of parameters for LCC 2SP.  When parameters
- * were read from EPSG CSV files the standard parallels and origin
- * were mixed up.  This affects alot of state plane zones!
- *
- * Revision 1.19  2000/06/09 14:05:43  warmerda
- * added default knowledge of NAD27/NAD83/WGS72/WGS84
- *
- * Revision 1.18  1999/12/10 21:28:12  warmerda
- * fixed Stereographic to look for ProjCenterLat/Long
- *
- * Revision 1.17  1999/12/10 20:06:58  warmerda
- * fixed up scale geokey used for a couple of projections
- *
- * Revision 1.16  1999/12/10 19:50:21  warmerda
- * Added EquidistantConic support, fixed return of StdParallel2GeoKey for
- * LCC2, and Albers.
- *
- * Revision 1.15  1999/12/10 19:39:26  warmerda
- * Fixed bug setting the false northing for files with
- * ProjCenterNorthingGeoKey set in GTIFGetDefn().
- *
- * Revision 1.14  1999/09/17 14:58:37  warmerda
- * Added ProjRectifiedGridAngleGeoKey(3096) and support for it's
- * use with Oblique Mercator in geo_normalize.c.
- *
- * Revision 1.13  1999/09/17 00:55:26  warmerda
- * added GTIFGetUOMAngleInfo(), and UOMAngle in GTIFDefn
- *
- * Revision 1.12  1999/09/15 18:51:31  warmerda
- * Map 9808 to TM South Oriented, not TM Modified Alaska.
- *
- * Revision 1.11  1999/09/15 16:44:06  warmerda
- * Change meter to metre to match EPSG database in GTIFGetUOMLengthInfo()
- * shortcut.
- *
- * Revision 1.10  1999/09/15 16:35:15  warmerda
- * Fixed the fractions of second handling properly in GTIFAngleStringToDD().
- *
- * Revision 1.9  1999/09/15 14:24:17  warmerda
- * Fixed serious bug in geo_normalize.c with translation of
- * DD.MMSSsss values.  Return value was seriously off if any
- * fraction of a second was included in the string.
- *
- * Revision 1.8  1999/07/13 03:12:52  warmerda
- * Make scale a parameter of CT_Stereographic.
- *
- * Revision 1.7  1999/05/04 03:13:22  warmerda
- * fixed a serious bug in parsing DMSmmss.sss values, and a bug in forming DMS strings
- *
- * Revision 1.6  1999/05/03 17:50:31  warmerda
- * avoid warnings on IRIX
- *
- * Revision 1.5  1999/04/28 20:04:51  warmerda
- * Added doxygen style documentation.
- * Use GTIFPCSToMapSys() and related functions to partially normalize
- * projections when we don't have the CSV files.
- *
- * Revision 1.4  1999/03/18 21:34:59  geotiff
- * added GTIFDecToDMS
- *
- * Revision 1.3  1999/03/17 19:53:15  geotiff
- * sys includes moved to cpl_serv.h
- *
- * Revision 1.2  1999/03/10 18:24:06  geotiff
- * corrected to use int'
- *
- * Revision 1.1  1999/03/09 15:57:04  geotiff
- * New
- *
- * Revision 1.4  1999/03/03 02:29:38  warmerda
- * Define PI if not already defined.
- *
- * Revision 1.3  1999/03/02 21:10:57  warmerda
- * added lots of projections
- *
- * Revision 1.2  1999/02/24 16:24:15  warmerda
- * Continuing to evolve
- *
- * Revision 1.1  1999/02/22 18:51:08  warmerda
- * New
- *
- */
- 
-#include "cpl_serv.h"
-#include "geo_tiffp.h"
-#include "geovalues.h"
-#include "geo_normalize.h"
-
-#ifndef KvUserDefined
-#  define KvUserDefined 32767
-#endif
-
-#ifndef PI
-#  define PI 3.14159265358979323846
-#endif
-
-/* EPSG Codes for projection parameters.  Unfortunately, these bear no
-   relationship to the GeoTIFF codes even though the names are so similar. */
-
-#define EPSGNatOriginLat         8801
-#define EPSGNatOriginLong        8802
-#define EPSGNatOriginScaleFactor 8805
-#define EPSGFalseEasting         8806
-#define EPSGFalseNorthing        8807
-#define EPSGProjCenterLat        8811
-#define EPSGProjCenterLong       8812
-#define EPSGAzimuth              8813
-#define EPSGAngleRectifiedToSkewedGrid 8814
-#define EPSGInitialLineScaleFactor 8815
-#define EPSGProjCenterEasting    8816
-#define EPSGProjCenterNorthing   8817
-#define EPSGPseudoStdParallelLat 8818
-#define EPSGPseudoStdParallelScaleFactor 8819
-#define EPSGFalseOriginLat       8821
-#define EPSGFalseOriginLong      8822
-#define EPSGStdParallel1Lat      8823
-#define EPSGStdParallel2Lat      8824
-#define EPSGFalseOriginEasting   8826
-#define EPSGFalseOriginNorthing  8827
-#define EPSGSphericalOriginLat   8828
-#define EPSGSphericalOriginLong  8829
-#define EPSGInitialLongitude     8830
-#define EPSGZoneWidth            8831
-
-/************************************************************************/
-/*                           GTIFGetPCSInfo()                           */
-/************************************************************************/
-
-int GTIFGetPCSInfo( int nPCSCode, char **ppszEPSGName, 
-                    short *pnProjOp, short *pnUOMLengthCode, 
-                    short *pnGeogCS )
-
-{
-    char	**papszRecord;
-    char	szSearchKey[24];
-    const char	*pszFilename = CSVFilename( "pcs.csv" );
-    
-/* -------------------------------------------------------------------- */
-/*      Search the units database for this unit.  If we don't find      */
-/*      it return failure.                                              */
-/* -------------------------------------------------------------------- */
-    sprintf( szSearchKey, "%d", nPCSCode );
-    papszRecord = CSVScanFileByName( pszFilename, "COORD_REF_SYS_CODE",
-                                     szSearchKey, CC_Integer );
-
-    if( papszRecord == NULL )
-        return FALSE;
-
-/* -------------------------------------------------------------------- */
-/*      Get the name, if requested.                                     */
-/* -------------------------------------------------------------------- */
-    if( ppszEPSGName != NULL )
-    {
-        *ppszEPSGName =
-            CPLStrdup( CSLGetField( papszRecord,
-                                    CSVGetFileFieldId(pszFilename,
-                                                      "COORD_REF_SYS_NAME") ));
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Get the UOM Length code, if requested.                          */
-/* -------------------------------------------------------------------- */
-    if( pnUOMLengthCode != NULL )
-    {
-        const char	*pszValue;
-
-        pszValue =
-            CSLGetField( papszRecord,
-                         CSVGetFileFieldId(pszFilename,"UOM_CODE"));
-        if( atoi(pszValue) > 0 )
-            *pnUOMLengthCode = atoi(pszValue);
-        else
-            *pnUOMLengthCode = KvUserDefined;
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Get the UOM Length code, if requested.                          */
-/* -------------------------------------------------------------------- */
-    if( pnProjOp != NULL )
-    {
-        const char	*pszValue;
-
-        pszValue =
-            CSLGetField( papszRecord,
-                         CSVGetFileFieldId(pszFilename,"COORD_OP_CODE"));
-        if( atoi(pszValue) > 0 )
-            *pnProjOp = atoi(pszValue);
-        else
-            *pnUOMLengthCode = KvUserDefined;
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Get the GeogCS (Datum with PM) code, if requested.		*/
-/* -------------------------------------------------------------------- */
-    if( pnGeogCS != NULL )
-    {
-        const char	*pszValue;
-
-        pszValue =
-            CSLGetField( papszRecord,
-                         CSVGetFileFieldId(pszFilename,"SOURCE_GEOGCRS_CODE"));
-        if( atoi(pszValue) > 0 )
-            *pnGeogCS = atoi(pszValue);
-        else
-            *pnGeogCS = KvUserDefined;
-    }
-
-    return TRUE;
-}
-
-/************************************************************************/
-/*                           GTIFAngleToDD()                            */
-/*                                                                      */
-/*      Convert a numeric angle to decimal degress.                     */
-/************************************************************************/
-
-double GTIFAngleToDD( double dfAngle, int nUOMAngle )
-
-{
-    if( nUOMAngle == 9110 )		/* DDD.MMSSsss */
-    {
-        char	szAngleString[32];
-
-        sprintf( szAngleString, "%12.7f", dfAngle );
-        dfAngle = GTIFAngleStringToDD( szAngleString, nUOMAngle );
-    }
-    else
-    {
-        double		dfInDegrees = 1.0;
-        
-        GTIFGetUOMAngleInfo( nUOMAngle, NULL, &dfInDegrees );
-        dfAngle = dfAngle * dfInDegrees;
-    }
-
-    return( dfAngle );
-}
-
-/************************************************************************/
-/*                        GTIFAngleStringToDD()                         */
-/*                                                                      */
-/*      Convert an angle in the specified units to decimal degrees.     */
-/************************************************************************/
-
-double GTIFAngleStringToDD( const char * pszAngle, int nUOMAngle )
-
-{
-    double	dfAngle;
-    
-    if( nUOMAngle == 9110 )		/* DDD.MMSSsss */
-    {
-        char	*pszDecimal;
-        
-        dfAngle = ABS(atoi(pszAngle));
-        pszDecimal = strchr(pszAngle,'.');
-        if( pszDecimal != NULL && strlen(pszDecimal) > 1 )
-        {
-            char	szMinutes[3];
-            char	szSeconds[64];
-
-            szMinutes[0] = pszDecimal[1];
-            if( pszDecimal[2] >= '0' && pszDecimal[2] <= '9' )
-                szMinutes[1] = pszDecimal[2];
-            else
-                szMinutes[1] = '0';
-            
-            szMinutes[2] = '\0';
-            dfAngle += atoi(szMinutes) / 60.0;
-
-            if( strlen(pszDecimal) > 3 )
-            {
-                szSeconds[0] = pszDecimal[3];
-                if( pszDecimal[4] >= '0' && pszDecimal[4] <= '9' )
-                {
-                    szSeconds[1] = pszDecimal[4];
-                    szSeconds[2] = '.';
-                    strcpy( szSeconds+3, pszDecimal + 5 );
-                }
-                else
-                {
-                    szSeconds[1] = '0';
-                    szSeconds[2] = '\0';
-                }
-                dfAngle += atof(szSeconds) / 3600.0;
-            }
-        }
-
-        if( pszAngle[0] == '-' )
-            dfAngle *= -1;
-    }
-    else if( nUOMAngle == 9105 || nUOMAngle == 9106 )	/* grad */
-    {
-        dfAngle = 180 * (atof(pszAngle ) / 200);
-    }
-    else if( nUOMAngle == 9101 )			/* radians */
-    {
-        dfAngle = 180 * (atof(pszAngle ) / PI);
-    }
-    else if( nUOMAngle == 9103 )			/* arc-minute */
-    {
-        dfAngle = atof(pszAngle) / 60;
-    }
-    else if( nUOMAngle == 9104 )			/* arc-second */
-    {
-        dfAngle = atof(pszAngle) / 3600;
-    }
-    else /* decimal degrees ... some cases missing but seeminly never used */
-    {
-        CPLAssert( nUOMAngle == 9102 || nUOMAngle == KvUserDefined
-                   || nUOMAngle == 0 );
-        
-        dfAngle = atof(pszAngle );
-    }
-
-    return( dfAngle );
-}
-
-/************************************************************************/
-/*                           GTIFGetGCSInfo()                           */
-/*                                                                      */
-/*      Fetch the datum, and prime meridian related to a particular     */
-/*      GCS.                                                            */
-/************************************************************************/
-
-int GTIFGetGCSInfo( int nGCSCode, char ** ppszName,
-                    short * pnDatum, short * pnPM, short *pnUOMAngle )
-
-{
-    char	szSearchKey[24];
-    int		nDatum, nPM, nUOMAngle;
-
-/* -------------------------------------------------------------------- */
-/*      Search the database for the corresponding datum code.           */
-/* -------------------------------------------------------------------- */
-    sprintf( szSearchKey, "%d", nGCSCode );
-
-    nDatum = atoi(CSVGetField( CSVFilename("gcs.csv" ),
-                               "COORD_REF_SYS_CODE", szSearchKey, CC_Integer,
-                               "DATUM_CODE" ) );
-
-/* -------------------------------------------------------------------- */
-/*      Handle some "well known" GCS codes directly if the table        */
-/*      wasn't found.                                                   */
-/* -------------------------------------------------------------------- */
-    if( nDatum < 1 )
-    {
-        const char * pszName = NULL;
-        nPM = PM_Greenwich;
-        nUOMAngle = Angular_DMS_Hemisphere; 
-        if( nGCSCode == GCS_NAD27 )
-        {
-            nDatum = Datum_North_American_Datum_1927;
-            pszName = "NAD27";
-        }
-        else if( nGCSCode == GCS_NAD83 )
-        {
-            nDatum = Datum_North_American_Datum_1983;
-            pszName = "NAD83";
-        }
-        else if( nGCSCode == GCS_WGS_84 )
-        {
-            nDatum = Datum_WGS84;
-            pszName = "WGS 84";
-        }
-        else if( nGCSCode == GCS_WGS_72 )
-        {
-            nDatum = Datum_WGS72;
-            pszName = "WGS 82";
-        }
-        else
-            return FALSE;
-
-        if( ppszName != NULL )
-            *ppszName = CPLStrdup( pszName );
-        if( pnDatum != NULL )
-            *pnDatum = nDatum;
-        if( pnPM != NULL )
-            *pnPM = nPM;
-        if( pnUOMAngle != NULL )
-            *pnUOMAngle = nUOMAngle;
-
-        return TRUE;
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Get the PM.                                                     */
-/* -------------------------------------------------------------------- */
-    if( pnDatum != NULL )
-        *pnDatum = nDatum;
-    
-    nPM = atoi(CSVGetField( CSVFilename("gcs.csv" ),
-                            "COORD_REF_SYS_CODE", szSearchKey, CC_Integer,
-                            "PRIME_MERIDIAN_CODE" ) );
-
-    if( nPM < 1 )
-        return FALSE;
-
-    if( pnPM != NULL )
-        *pnPM = nPM;
-
-/* -------------------------------------------------------------------- */
-/*      Get the angular units.                                          */
-/* -------------------------------------------------------------------- */
-    nUOMAngle = atoi(CSVGetField( CSVFilename("gcs.csv" ),
-                                  "COORD_REF_SYS_CODE",szSearchKey, CC_Integer,
-                                  "UOM_CODE" ) );
-
-    if( nUOMAngle < 1 )
-        return FALSE;
-
-    if( pnUOMAngle != NULL )
-        *pnUOMAngle = nUOMAngle;
-
-/* -------------------------------------------------------------------- */
-/*      Get the name, if requested.                                     */
-/* -------------------------------------------------------------------- */
-    if( ppszName != NULL )
-        *ppszName =
-            CPLStrdup(CSVGetField( CSVFilename("gcs.csv" ),
-                                   "COORD_REF_SYS_CODE",szSearchKey,CC_Integer,
-                                   "COORD_REF_SYS_NAME" ));
-    
-    return( TRUE );
-}
-
-/************************************************************************/
-/*                        GTIFGetEllipsoidInfo()                        */
-/*                                                                      */
-/*      Fetch info about an ellipsoid.  Axes are always returned in     */
-/*      meters.  SemiMajor computed based on inverse flattening         */
-/*      where that is provided.                                         */
-/************************************************************************/
-
-int GTIFGetEllipsoidInfo( int nEllipseCode, char ** ppszName,
-                          double * pdfSemiMajor, double * pdfSemiMinor )
-
-{
-    char	szSearchKey[24];
-    double	dfSemiMajor, dfToMeters = 1.0;
-    int		nUOMLength;
-    
-/* -------------------------------------------------------------------- */
-/*      Get the semi major axis.                                        */
-/* -------------------------------------------------------------------- */
-    sprintf( szSearchKey, "%d", nEllipseCode );
-
-    dfSemiMajor =
-        atof(CSVGetField( CSVFilename("ellipsoid.csv" ),
-                          "ELLIPSOID_CODE", szSearchKey, CC_Integer,
-                          "SEMI_MAJOR_AXIS" ) );
-
-/* -------------------------------------------------------------------- */
-/*      Try some well known ellipsoids.                                 */
-/* -------------------------------------------------------------------- */
-    if( dfSemiMajor == 0.0 )
-    {
-        double     dfInvFlattening, dfSemiMinor;
-        const char *pszName = NULL;
-        
-        if( nEllipseCode == Ellipse_Clarke_1866 )
-        {
-            pszName = "Clarke 1866";
-            dfSemiMajor = 6378206.4;
-            dfSemiMinor = 6356583.8;
-            dfInvFlattening = 0.0;
-        }
-        else if( nEllipseCode == Ellipse_GRS_1980 )
-        {
-            pszName = "GRS 1980";
-            dfSemiMajor = 6378137.0;
-            dfSemiMinor = 0.0;
-            dfInvFlattening = 298.257222101;
-        }
-        else if( nEllipseCode == Ellipse_WGS_84 )
-        {
-            pszName = "WGS 84";
-            dfSemiMajor = 6378137.0;
-            dfSemiMinor = 0.0;
-            dfInvFlattening = 298.257223563;
-        }
-        else if( nEllipseCode == 7043 )
-        {
-            pszName = "WGS 72";
-            dfSemiMajor = 6378135.0;
-            dfSemiMinor = 0.0;
-            dfInvFlattening = 298.26;
-        }
-        else
-            return FALSE;
-
-        if( dfSemiMinor == 0.0 )
-            dfSemiMinor = dfSemiMajor * (1 - 1.0/dfInvFlattening);
-
-        if( pdfSemiMinor != NULL )
-            *pdfSemiMinor = dfSemiMinor;
-        if( pdfSemiMajor != NULL )
-            *pdfSemiMajor = dfSemiMajor;
-        if( ppszName != NULL )
-            *ppszName = CPLStrdup( pszName );
-
-        return TRUE;
-    }
-
-/* -------------------------------------------------------------------- */
-/*	Get the translation factor into meters.				*/
-/* -------------------------------------------------------------------- */
-    nUOMLength = atoi(CSVGetField( CSVFilename("ellipsoid.csv" ),
-                                   "ELLIPSOID_CODE", szSearchKey, CC_Integer,
-                                   "UOM_CODE" ));
-    GTIFGetUOMLengthInfo( nUOMLength, NULL, &dfToMeters );
-
-    dfSemiMajor *= dfToMeters;
-    
-    if( pdfSemiMajor != NULL )
-        *pdfSemiMajor = dfSemiMajor;
-    
-/* -------------------------------------------------------------------- */
-/*      Get the semi-minor if requested.  If the Semi-minor axis        */
-/*      isn't available, compute it based on the inverse flattening.    */
-/* -------------------------------------------------------------------- */
-    if( pdfSemiMinor != NULL )
-    {
-        *pdfSemiMinor =
-            atof(CSVGetField( CSVFilename("ellipsoid.csv" ),
-                              "ELLIPSOID_CODE", szSearchKey, CC_Integer,
-                              "SEMI_MINOR_AXIS" )) * dfToMeters;
-
-        if( *pdfSemiMinor == 0.0 )
-        {
-            double	dfInvFlattening;
-            
-            dfInvFlattening = 
-                atof(CSVGetField( CSVFilename("ellipsoid.csv" ),
-                                  "ELLIPSOID_CODE", szSearchKey, CC_Integer,
-                                  "INV_FLATTENING" ));
-            *pdfSemiMinor = dfSemiMajor * (1 - 1.0/dfInvFlattening);
-        }
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Get the name, if requested.                                     */
-/* -------------------------------------------------------------------- */
-    if( ppszName != NULL )
-        *ppszName =
-            CPLStrdup(CSVGetField( CSVFilename("ellipsoid.csv" ),
-                                   "ELLIPSOID_CODE", szSearchKey, CC_Integer,
-                                   "ELLIPSOID_NAME" ));
-    
-    return( TRUE );
-}
-
-/************************************************************************/
-/*                           GTIFGetPMInfo()                            */
-/*                                                                      */
-/*      Get the offset between a given prime meridian and Greenwich     */
-/*      in degrees.                                                     */
-/************************************************************************/
-
-int GTIFGetPMInfo( int nPMCode, char ** ppszName, double *pdfOffset )
-
-{
-    char	szSearchKey[24];
-    int		nUOMAngle;
-    const char *pszFilename = CSVFilename("prime_meridian.csv");
-
-/* -------------------------------------------------------------------- */
-/*      Use a special short cut for Greenwich, since it is so common.   */
-/* -------------------------------------------------------------------- */
-    if( nPMCode == PM_Greenwich )
-    {
-        if( pdfOffset != NULL )
-            *pdfOffset = 0.0;
-        if( ppszName != NULL )
-            *ppszName = CPLStrdup( "Greenwich" );
-        return TRUE;
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Search the database for the corresponding datum code.           */
-/* -------------------------------------------------------------------- */
-    sprintf( szSearchKey, "%d", nPMCode );
-
-    nUOMAngle =
-        atoi(CSVGetField( pszFilename, 
-                          "PRIME_MERIDIAN_CODE", szSearchKey, CC_Integer,
-                          "UOM_CODE" ) );
-    if( nUOMAngle < 1 )
-        return FALSE;
-
-/* -------------------------------------------------------------------- */
-/*      Get the PM offset.                                              */
-/* -------------------------------------------------------------------- */
-    if( pdfOffset != NULL )
-    {
-        *pdfOffset =
-            GTIFAngleStringToDD(
-                CSVGetField( pszFilename, 
-                             "PRIME_MERIDIAN_CODE", szSearchKey, CC_Integer,
-                             "GREENWICH_LONGITUDE" ),
-                nUOMAngle );
-    }
-    
-/* -------------------------------------------------------------------- */
-/*      Get the name, if requested.                                     */
-/* -------------------------------------------------------------------- */
-    if( ppszName != NULL )
-        *ppszName =
-            CPLStrdup(
-                CSVGetField( pszFilename, 
-                             "PRIME_MERIDIAN_CODE", szSearchKey, CC_Integer,
-                             "PRIME_MERIDIAN_NAME" ));
-    
-    return( TRUE );
-}
-
-/************************************************************************/
-/*                          GTIFGetDatumInfo()                          */
-/*                                                                      */
-/*      Fetch the ellipsoid, and name for a datum.                      */
-/************************************************************************/
-
-int GTIFGetDatumInfo( int nDatumCode, char ** ppszName, short * pnEllipsoid )
-
-{
-    char	szSearchKey[24];
-    int		nEllipsoid;
-    const char *pszFilename = CSVFilename( "datum.csv" );
-
-/* -------------------------------------------------------------------- */
-/*      Search the database for the corresponding datum code.           */
-/* -------------------------------------------------------------------- */
-    sprintf( szSearchKey, "%d", nDatumCode );
-
-    nEllipsoid = atoi(CSVGetField( pszFilename,
-                                   "DATUM_CODE", szSearchKey, CC_Integer,
-                                   "ELLIPSOID_CODE" ) );
-
-    if( pnEllipsoid != NULL )
-        *pnEllipsoid = nEllipsoid;
-    
-/* -------------------------------------------------------------------- */
-/*      Handle a few built-in datums.                                   */
-/* -------------------------------------------------------------------- */
-    if( nEllipsoid < 1 )
-    {
-        const char *pszName = NULL;
-        
-        if( nDatumCode == Datum_North_American_Datum_1927 )
-        {
-            nEllipsoid = Ellipse_Clarke_1866;
-            pszName = "North American Datum 1927";
-        }
-        else if( nDatumCode == Datum_North_American_Datum_1983 )
-        {
-            nEllipsoid = Ellipse_GRS_1980;
-            pszName = "North American Datum 1983";
-        }
-        else if( nDatumCode == Datum_WGS84 )
-        {
-            nEllipsoid = Ellipse_WGS_84;
-            pszName = "World Geodetic System 1984";
-        }
-        else if( nDatumCode == Datum_WGS72 )
-        {
-            nEllipsoid = 7043; /* WGS7 */
-            pszName = "World Geodetic System 1972";
-        }
-        else
-            return FALSE;
-
-        if( pnEllipsoid != NULL )
-            *pnEllipsoid = nEllipsoid;
-
-        if( ppszName != NULL )
-            *ppszName = CPLStrdup( pszName );
-
-        return TRUE;
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Get the name, if requested.                                     */
-/* -------------------------------------------------------------------- */
-    if( ppszName != NULL )
-        *ppszName =
-            CPLStrdup(CSVGetField( pszFilename,
-                                   "DATUM_CODE", szSearchKey, CC_Integer,
-                                   "DATUM_NAME" ));
-    
-    return( TRUE );
-}
-
-
-/************************************************************************/
-/*                        GTIFGetUOMLengthInfo()                        */
-/*                                                                      */
-/*      Note: This function should eventually also know how to          */
-/*      lookup length aliases in the UOM_LE_ALIAS table.                */
-/************************************************************************/
-
-int GTIFGetUOMLengthInfo( int nUOMLengthCode,
-                          char **ppszUOMName,
-                          double * pdfInMeters )
-
-{
-    char	**papszUnitsRecord;
-    char	szSearchKey[24];
-    int		iNameField;
-    const char *pszFilename;
-
-/* -------------------------------------------------------------------- */
-/*      We short cut meter to save work in the most common case.        */
-/* -------------------------------------------------------------------- */
-    if( nUOMLengthCode == 9001 )
-    {
-        if( ppszUOMName != NULL )
-            *ppszUOMName = CPLStrdup( "metre" );
-        if( pdfInMeters != NULL )
-            *pdfInMeters = 1.0;
-
-        return TRUE;
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Search the units database for this unit.  If we don't find      */
-/*      it return failure.                                              */
-/* -------------------------------------------------------------------- */
-    pszFilename = CSVFilename( "unit_of_measure.csv" );
-
-    sprintf( szSearchKey, "%d", nUOMLengthCode );
-    papszUnitsRecord =
-        CSVScanFileByName( pszFilename,
-                           "UOM_CODE", szSearchKey, CC_Integer );
-
-    if( papszUnitsRecord == NULL )
-        return FALSE;
-
-/* -------------------------------------------------------------------- */
-/*      Get the name, if requested.                                     */
-/* -------------------------------------------------------------------- */
-    if( ppszUOMName != NULL )
-    {
-        iNameField = CSVGetFileFieldId( pszFilename,
-                                        "UNIT_OF_MEAS_NAME" );
-        *ppszUOMName = CPLStrdup( CSLGetField(papszUnitsRecord, iNameField) );
-    }
-    
-/* -------------------------------------------------------------------- */
-/*      Get the A and B factor fields, and create the multiplicative    */
-/*      factor.                                                         */
-/* -------------------------------------------------------------------- */
-    if( pdfInMeters != NULL )
-    {
-        int	iBFactorField, iCFactorField;
-        
-        iBFactorField = CSVGetFileFieldId( pszFilename, "FACTOR_B" );
-        iCFactorField = CSVGetFileFieldId( pszFilename, "FACTOR_C" );
-
-        if( atof(CSLGetField(papszUnitsRecord, iCFactorField)) > 0.0 )
-            *pdfInMeters = atof(CSLGetField(papszUnitsRecord, iBFactorField))
-                / atof(CSLGetField(papszUnitsRecord, iCFactorField));
-        else
-            *pdfInMeters = 0.0;
-    }
-    
-    return( TRUE );
-}
-
-/************************************************************************/
-/*                        GTIFGetUOMAngleInfo()                         */
-/************************************************************************/
-
-int GTIFGetUOMAngleInfo( int nUOMAngleCode,
-                         char **ppszUOMName,
-                         double * pdfInDegrees )
-
-{
-    const char	*pszUOMName = NULL;
-    double	dfInDegrees = 1.0;
-    const char *pszFilename = CSVFilename( "unit_of_measure.csv" );
-    char	szSearchKey[24];
-
-    sprintf( szSearchKey, "%d", nUOMAngleCode );
-    pszUOMName = CSVGetField( pszFilename,
-                              "UOM_CODE", szSearchKey, CC_Integer,
-                              "UNIT_OF_MEAS_NAME" );
-
-/* -------------------------------------------------------------------- */
-/*      If the file is found, read from there.  Note that FactorC is    */
-/*      an empty field for any of the DMS style formats, and in this    */
-/*      case we really want to return the default InDegrees value       */
-/*      (1.0) from above.                                               */
-/* -------------------------------------------------------------------- */
-    if( pszUOMName != NULL )
-    {
-        double dfFactorB, dfFactorC, dfInRadians;
-        
-        dfFactorB = 
-            atof(CSVGetField( pszFilename,
-                              "UOM_CODE", szSearchKey, CC_Integer,
-                              "FACTOR_B" ));
-        
-        dfFactorC = 
-            atof(CSVGetField( pszFilename,
-                              "UOM_CODE", szSearchKey, CC_Integer,
-                              "FACTOR_C" ));
-
-        if( dfFactorC != 0.0 )
-        {
-            dfInRadians = (dfFactorB / dfFactorC);
-            dfInDegrees = dfInRadians * 180.0 / PI;
-        }
-                          
-
-        /* We do a special override of some of the DMS formats name */
-        if( nUOMAngleCode == 9102 || nUOMAngleCode == 9107
-            || nUOMAngleCode == 9108 || nUOMAngleCode == 9110 )
-        {
-            dfInDegrees = 1.0;
-            pszUOMName = "degree";
-        }
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Otherwise handle a few well known units directly.               */
-/* -------------------------------------------------------------------- */
-    else
-    {
-        switch( nUOMAngleCode )
-        {
-          case 9101:
-            pszUOMName = "radian";
-            dfInDegrees = 180.0 / PI;
-            break;
-        
-          case 9102:
-          case 9107:
-          case 9108:
-          case 9110:
-            pszUOMName = "degree";
-            dfInDegrees = 1.0;
-            break;
-
-          case 9103:
-            pszUOMName = "arc-minute";
-            dfInDegrees = 1 / 60.0;
-            break;
-
-          case 9104:
-            pszUOMName = "arc-second";
-            dfInDegrees = 1 / 3600.0;
-            break;
-        
-          case 9105:
-            pszUOMName = "grad";
-            dfInDegrees = 180.0 / 200.0;
-            break;
-
-          case 9106:
-            pszUOMName = "gon";
-            dfInDegrees = 180.0 / 200.0;
-            break;
-        
-          case 9109:
-            pszUOMName = "microradian";
-            dfInDegrees = 180.0 / (PI * 1000000.0);
-            break;
-
-          default:
-            return FALSE;
-        }
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Return to caller.                                               */
-/* -------------------------------------------------------------------- */
-    if( ppszUOMName != NULL )
-    {
-        if( pszUOMName != NULL )
-            *ppszUOMName = CPLStrdup( pszUOMName );
-        else
-            *ppszUOMName = NULL;
-    }
-
-    if( pdfInDegrees != NULL )
-        *pdfInDegrees = dfInDegrees;
-
-    return( TRUE );
-}
-
-/************************************************************************/
-/*                    EPSGProjMethodToCTProjMethod()                    */
-/*                                                                      */
-/*      Convert between the EPSG enumeration for projection methods,    */
-/*      and the GeoTIFF CT codes.                                       */
-/************************************************************************/
-
-static int EPSGProjMethodToCTProjMethod( int nEPSG )
-
-{
-    /* see trf_method.csv for list of EPSG codes */
-    
-    switch( nEPSG )
-    {
-      case 9801:
-        return( CT_LambertConfConic_1SP );
-
-      case 9802:
-        return( CT_LambertConfConic_2SP );
-
-      case 9803:
-        return( CT_LambertConfConic_2SP ); /* Belgian variant not supported */
-
-      case 9804:
-        return( CT_Mercator );  /* 1SP and 2SP not differentiated */
-
-      case 9805:
-        return( CT_Mercator );  /* 1SP and 2SP not differentiated */
-
-      case 9806:
-        return( CT_CassiniSoldner );
-
-      case 9807:
-        return( CT_TransverseMercator );
-
-      case 9808:
-        return( CT_TransvMercator_SouthOriented );
-
-      case 9809:
-        return( CT_ObliqueStereographic );
-
-      case 9810:
-        return( CT_PolarStereographic );
-
-      case 9811:
-        return( CT_NewZealandMapGrid );
-
-      case 9812:
-        return( CT_ObliqueMercator ); /* is hotine actually different? */
-
-      case 9813:
-        return( CT_ObliqueMercator_Laborde );
-
-      case 9814:
-        return( CT_ObliqueMercator_Rosenmund ); /* swiss  */
-
-      case 9815:
-        return( CT_ObliqueMercator );
-
-      case 9816: /* tunesia mining grid has no counterpart */
-        return( KvUserDefined );
-    }
-
-    return( KvUserDefined );
-}
-
-/************************************************************************/
-/*                            SetGTParmIds()                            */
-/*                                                                      */
-/*      This is hardcoded logic to set the GeoTIFF parmaeter            */
-/*      identifiers for all the EPSG supported projections.  As the     */
-/*      trf_method.csv table grows with new projections, this code      */
-/*      will need to be updated.                                        */
-/************************************************************************/
-
-static int SetGTParmIds( int nCTProjection, 
-                         int *panProjParmId, 
-                         int *panEPSGCodes )
-
-{
-    int anWorkingDummy[7];
-
-    if( panEPSGCodes == NULL )
-        panEPSGCodes = anWorkingDummy;
-    if( panProjParmId == NULL )
-        panProjParmId = anWorkingDummy;
-
-    memset( panEPSGCodes, 0, sizeof(int) * 7 );
-
-    /* psDefn->nParms = 7; */
-    
-    switch( nCTProjection )
-    {
-      case CT_CassiniSoldner:
-      case CT_NewZealandMapGrid:
-        panProjParmId[0] = ProjNatOriginLatGeoKey;
-        panProjParmId[1] = ProjNatOriginLongGeoKey;
-        panProjParmId[5] = ProjFalseEastingGeoKey;
-        panProjParmId[6] = ProjFalseNorthingGeoKey;
-
-        panEPSGCodes[0] = EPSGNatOriginLat;
-        panEPSGCodes[1] = EPSGNatOriginLong;
-        panEPSGCodes[5] = EPSGFalseEasting;
-        panEPSGCodes[6] = EPSGFalseNorthing;
-        return TRUE;
-
-      case CT_ObliqueMercator:
-        panProjParmId[0] = ProjCenterLatGeoKey;
-        panProjParmId[1] = ProjCenterLongGeoKey;
-        panProjParmId[2] = ProjAzimuthAngleGeoKey;
-        panProjParmId[3] = ProjRectifiedGridAngleGeoKey;
-        panProjParmId[4] = ProjScaleAtCenterGeoKey;
-        panProjParmId[5] = ProjFalseEastingGeoKey;
-        panProjParmId[6] = ProjFalseNorthingGeoKey;
-
-        panEPSGCodes[0] = EPSGProjCenterLat;
-        panEPSGCodes[1] = EPSGProjCenterLong;
-        panEPSGCodes[2] = EPSGAzimuth;
-        panEPSGCodes[3] = EPSGAngleRectifiedToSkewedGrid;
-        panEPSGCodes[4] = EPSGInitialLineScaleFactor;
-        panEPSGCodes[5] = EPSGProjCenterEasting;
-        panEPSGCodes[6] = EPSGProjCenterNorthing;
-        return TRUE;
-
-      case CT_ObliqueMercator_Laborde:
-        panProjParmId[0] = ProjCenterLatGeoKey;
-        panProjParmId[1] = ProjCenterLongGeoKey;
-        panProjParmId[2] = ProjAzimuthAngleGeoKey;
-        panProjParmId[4] = ProjScaleAtCenterGeoKey;
-        panProjParmId[5] = ProjFalseEastingGeoKey;
-        panProjParmId[6] = ProjFalseNorthingGeoKey;
-
-        panEPSGCodes[0] = EPSGProjCenterLat;
-        panEPSGCodes[1] = EPSGProjCenterLong;
-        panEPSGCodes[2] = EPSGAzimuth;
-        panEPSGCodes[4] = EPSGInitialLineScaleFactor;
-        panEPSGCodes[5] = EPSGProjCenterEasting;
-        panEPSGCodes[6] = EPSGProjCenterNorthing;
-        return TRUE;
-        
-      case CT_LambertConfConic_1SP:
-      case CT_Mercator:
-      case CT_ObliqueStereographic:
-      case CT_PolarStereographic:
-      case CT_TransverseMercator:
-      case CT_TransvMercator_SouthOriented:
-        panProjParmId[0] = ProjNatOriginLatGeoKey;
-        panProjParmId[1] = ProjNatOriginLongGeoKey;
-        panProjParmId[4] = ProjScaleAtNatOriginGeoKey;
-        panProjParmId[5] = ProjFalseEastingGeoKey;
-        panProjParmId[6] = ProjFalseNorthingGeoKey;
-
-        panEPSGCodes[0] = EPSGNatOriginLat;
-        panEPSGCodes[1] = EPSGNatOriginLong;
-        panEPSGCodes[4] = EPSGNatOriginScaleFactor;
-        panEPSGCodes[5] = EPSGFalseEasting;
-        panEPSGCodes[6] = EPSGFalseNorthing;
-        return TRUE;
-
-      case CT_LambertConfConic_2SP:
-        panProjParmId[0] = ProjFalseOriginLatGeoKey;
-        panProjParmId[1] = ProjFalseOriginLongGeoKey;
-        panProjParmId[2] = ProjStdParallel1GeoKey;
-        panProjParmId[3] = ProjStdParallel2GeoKey;
-        panProjParmId[5] = ProjFalseEastingGeoKey;
-        panProjParmId[6] = ProjFalseNorthingGeoKey;
-
-        panEPSGCodes[0] = EPSGFalseOriginLat;
-        panEPSGCodes[1] = EPSGFalseOriginLong;
-        panEPSGCodes[2] = EPSGStdParallel1Lat;
-        panEPSGCodes[3] = EPSGStdParallel2Lat;
-        panEPSGCodes[5] = EPSGFalseOriginEasting;
-        panEPSGCodes[6] = EPSGFalseOriginNorthing;
-        return TRUE;
-
-      case CT_SwissObliqueCylindrical:
-        panProjParmId[0] = ProjCenterLatGeoKey;
-        panProjParmId[1] = ProjCenterLongGeoKey;
-        panProjParmId[5] = ProjFalseEastingGeoKey;
-        panProjParmId[6] = ProjFalseNorthingGeoKey;
-
-        /* EPSG codes? */
-        return TRUE;
-
-      default:
-        return( FALSE );
-    }
-}
-
-/************************************************************************/
-/*                         GTIFGetProjTRFInfo()                         */
-/*                                                                      */
-/*      Transform a PROJECTION_TRF_CODE into a projection method,       */
-/*      and a set of parameters.  The parameters identify will          */
-/*      depend on the returned method, but they will all have been      */
-/*      normalized into degrees and meters.                             */
-/************************************************************************/
-
-int GTIFGetProjTRFInfo( /* COORD_OP_CODE from coordinate_operation.csv */
-                        int nProjTRFCode, 
-                        char **ppszProjTRFName,
-                        short * pnProjMethod,
-                        double * padfProjParms )
-
-{
-    int		nProjMethod, i, anEPSGCodes[7];
-    double	adfProjParms[7];
-    char	szTRFCode[16];
-    int         nCTProjMethod;
-    char       *pszFilename = CPLStrdup(CSVFilename("projop_wparm.csv"));
-
-/* -------------------------------------------------------------------- */
-/*      Get the proj method.  If this fails to return a meaningful      */
-/*      number, then the whole function fails.                          */
-/* -------------------------------------------------------------------- */
-    sprintf( szTRFCode, "%d", nProjTRFCode );
-    nProjMethod =
-        atoi( CSVGetField( pszFilename,
-                           "COORD_OP_CODE", szTRFCode, CC_Integer,
-                           "COORD_OP_METHOD_CODE" ) );
-    if( nProjMethod == 0 )
-    {
-        CPLFree( pszFilename );
-        return FALSE;
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Initialize a definition of what EPSG codes need to be loaded    */
-/*      into what fields in adfProjParms.                               */
-/* -------------------------------------------------------------------- */
-    nCTProjMethod = EPSGProjMethodToCTProjMethod( nProjMethod );
-    SetGTParmIds( nCTProjMethod, NULL, anEPSGCodes );
-
-/* -------------------------------------------------------------------- */
-/*      Get the parameters for this projection.  For the time being     */
-/*      I am assuming the first four parameters are angles, the         */
-/*      fifth is unitless (normally scale), and the remainder are       */
-/*      linear measures.  This works fine for the existing              */
-/*      projections, but is a pretty fragile approach.                  */
-/* -------------------------------------------------------------------- */
-
-    for( i = 0; i < 7; i++ )
-    {
-        char    szParamUOMID[32], szParamValueID[32], szParamCodeID[32];
-        const char *pszValue;
-        int     nUOM;
-        int     nEPSGCode = anEPSGCodes[i];
-        int     iEPSG;
-
-        /* Establish default */
-        if( nEPSGCode == EPSGAngleRectifiedToSkewedGrid )
-            adfProjParms[i] = 90.0;
-        else if( nEPSGCode == EPSGNatOriginScaleFactor
-                 || nEPSGCode == EPSGInitialLineScaleFactor
-                 || nEPSGCode == EPSGPseudoStdParallelScaleFactor )
-            adfProjParms[i] = 1.0;
-        else
-            adfProjParms[i] = 0.0;
-
-        /* If there is no parameter, skip */
-        if( nEPSGCode == 0 )
-            continue;
-
-        /* Find the matching parameter */
-        for( iEPSG = 0; iEPSG < 7; iEPSG++ )
-        {
-            sprintf( szParamCodeID, "PARAMETER_CODE_%d", iEPSG+1 );
-
-            if( atoi(CSVGetField( pszFilename,
-                                  "COORD_OP_CODE", szTRFCode, CC_Integer, 
-                                  szParamCodeID )) == nEPSGCode )
-                break;
-        }
-
-        /* not found, accept the default */
-        if( iEPSG == 7 )
-            continue;
-
-        /* Get the value, and UOM */
-        sprintf( szParamUOMID, "PARAMETER_UOM_%d", iEPSG+1 );
-        sprintf( szParamValueID, "PARAMETER_VALUE_%d", iEPSG+1 );
-
-        nUOM = atoi(CSVGetField( pszFilename,
-                                 "COORD_OP_CODE", szTRFCode, CC_Integer, 
-                                 szParamUOMID ));
-        pszValue = CSVGetField( pszFilename,
-                                "COORD_OP_CODE", szTRFCode, CC_Integer, 
-                                szParamValueID );
-
-        /* Transform according to the UOM */
-        if( nUOM >= 9100 && nUOM < 9200 )
-            adfProjParms[i] = GTIFAngleStringToDD( pszValue, nUOM );
-        else if( nUOM > 9000 && nUOM < 9100 )
-        {
-            double dfInMeters;
-
-            if( !GTIFGetUOMLengthInfo( nUOM, NULL, &dfInMeters ) )
-                dfInMeters = 1.0;
-            adfProjParms[i] = atof(pszValue) * dfInMeters;
-        }
-        else
-            adfProjParms[i] = atof(pszValue);
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Get the name, if requested.                                     */
-/* -------------------------------------------------------------------- */
-    if( ppszProjTRFName != NULL )
-    {
-        *ppszProjTRFName =
-            CPLStrdup(CSVGetField( pszFilename,
-                                   "COORD_OP_CODE", szTRFCode, CC_Integer,
-                                   "COORD_OP_NAME" ));
-    }
-    
-/* -------------------------------------------------------------------- */
-/*      Transfer requested data into passed variables.                  */
-/* -------------------------------------------------------------------- */
-    if( pnProjMethod != NULL )
-        *pnProjMethod = nProjMethod;
-
-    if( padfProjParms != NULL )
-    {
-        for( i = 0; i < 7; i++ )
-            padfProjParms[i] = adfProjParms[i];
-    }
-
-    CPLFree( pszFilename );
-
-    return TRUE;
-}
-
-/************************************************************************/
-/*                         GTIFFetchProjParms()                         */
-/*                                                                      */
-/*      Fetch the projection parameters for a particular projection     */
-/*      from a GeoTIFF file, and fill the GTIFDefn structure out        */
-/*      with them.                                                      */
-/************************************************************************/
-
-static void GTIFFetchProjParms( GTIF * psGTIF, GTIFDefn * psDefn )
-
-{
-    double	dfNatOriginLong, dfNatOriginLat, dfRectGridAngle;
-    double	dfFalseEasting, dfFalseNorthing, dfNatOriginScale;
-    double	dfStdParallel1, dfStdParallel2, dfAzimuth;
-
-/* -------------------------------------------------------------------- */
-/*      Get the false easting, and northing if available.               */
-/* -------------------------------------------------------------------- */
-    if( !GTIFKeyGet(psGTIF, ProjFalseEastingGeoKey, &dfFalseEasting, 0, 1)
-        && !GTIFKeyGet(psGTIF, ProjCenterEastingGeoKey,
-                       &dfFalseEasting, 0, 1) )
-        dfFalseEasting = 0.0;
-        
-    if( !GTIFKeyGet(psGTIF, ProjFalseNorthingGeoKey, &dfFalseNorthing,0,1)
-        && !GTIFKeyGet(psGTIF, ProjCenterNorthingGeoKey,
-                       &dfFalseNorthing, 0, 1) )
-        dfFalseNorthing = 0.0;
-        
-    switch( psDefn->CTProjection )
-    {
-/* -------------------------------------------------------------------- */
-      case CT_Stereographic:
-/* -------------------------------------------------------------------- */
-        if( GTIFKeyGet(psGTIF, ProjNatOriginLongGeoKey, 
-                       &dfNatOriginLong, 0, 1 ) == 0
-            && GTIFKeyGet(psGTIF, ProjFalseOriginLongGeoKey, 
-                          &dfNatOriginLong, 0, 1 ) == 0
-            && GTIFKeyGet(psGTIF, ProjCenterLongGeoKey, 
-                          &dfNatOriginLong, 0, 1 ) == 0 )
-            dfNatOriginLong = 0.0;
-
-        if( GTIFKeyGet(psGTIF, ProjNatOriginLatGeoKey, 
-                       &dfNatOriginLat, 0, 1 ) == 0
-            && GTIFKeyGet(psGTIF, ProjFalseOriginLatGeoKey, 
-                          &dfNatOriginLat, 0, 1 ) == 0
-            && GTIFKeyGet(psGTIF, ProjCenterLatGeoKey, 
-                          &dfNatOriginLat, 0, 1 ) == 0 )
-            dfNatOriginLat = 0.0;
-
-        if( GTIFKeyGet(psGTIF, ProjScaleAtNatOriginGeoKey,
-                       &dfNatOriginScale, 0, 1 ) == 0 )
-            dfNatOriginScale = 1.0;
-            
-        /* notdef: should transform to decimal degrees at this point */
-
-        psDefn->ProjParm[0] = dfNatOriginLat;
-        psDefn->ProjParmId[0] = ProjCenterLatGeoKey;
-        psDefn->ProjParm[1] = dfNatOriginLong;
-        psDefn->ProjParmId[1] = ProjCenterLongGeoKey;
-        psDefn->ProjParm[4] = dfNatOriginScale;
-        psDefn->ProjParmId[4] = ProjScaleAtNatOriginGeoKey;
-        psDefn->ProjParm[5] = dfFalseEasting;
-        psDefn->ProjParmId[5] = ProjFalseEastingGeoKey;
-        psDefn->ProjParm[6] = dfFalseNorthing;
-        psDefn->ProjParmId[6] = ProjFalseNorthingGeoKey;
-
-        psDefn->nParms = 7;
-        break;
-
-/* -------------------------------------------------------------------- */
-      case CT_LambertConfConic_1SP:
-      case CT_Mercator:
-      case CT_ObliqueStereographic:
-      case CT_TransverseMercator:
-      case CT_TransvMercator_SouthOriented:
-/* -------------------------------------------------------------------- */
-        if( GTIFKeyGet(psGTIF, ProjNatOriginLongGeoKey, 
-                       &dfNatOriginLong, 0, 1 ) == 0
-            && GTIFKeyGet(psGTIF, ProjFalseOriginLongGeoKey, 
-                          &dfNatOriginLong, 0, 1 ) == 0
-            && GTIFKeyGet(psGTIF, ProjCenterLongGeoKey, 
-                          &dfNatOriginLong, 0, 1 ) == 0 )
-            dfNatOriginLong = 0.0;
-
-        if( GTIFKeyGet(psGTIF, ProjNatOriginLatGeoKey, 
-                       &dfNatOriginLat, 0, 1 ) == 0
-            && GTIFKeyGet(psGTIF, ProjFalseOriginLatGeoKey, 
-                          &dfNatOriginLat, 0, 1 ) == 0
-            && GTIFKeyGet(psGTIF, ProjCenterLatGeoKey, 
-                          &dfNatOriginLat, 0, 1 ) == 0 )
-            dfNatOriginLat = 0.0;
-
-        if( GTIFKeyGet(psGTIF, ProjScaleAtNatOriginGeoKey,
-                       &dfNatOriginScale, 0, 1 ) == 0 )
-            dfNatOriginScale = 1.0;
-            
-        /* notdef: should transform to decimal degrees at this point */
-
-        psDefn->ProjParm[0] = dfNatOriginLat;
-        psDefn->ProjParmId[0] = ProjNatOriginLatGeoKey;
-        psDefn->ProjParm[1] = dfNatOriginLong;
-        psDefn->ProjParmId[1] = ProjNatOriginLongGeoKey;
-        psDefn->ProjParm[4] = dfNatOriginScale;
-        psDefn->ProjParmId[4] = ProjScaleAtNatOriginGeoKey;
-        psDefn->ProjParm[5] = dfFalseEasting;
-        psDefn->ProjParmId[5] = ProjFalseEastingGeoKey;
-        psDefn->ProjParm[6] = dfFalseNorthing;
-        psDefn->ProjParmId[6] = ProjFalseNorthingGeoKey;
-
-        psDefn->nParms = 7;
-        break;
-
-/* -------------------------------------------------------------------- */
-      case CT_ObliqueMercator: /* hotine */
-/* -------------------------------------------------------------------- */
-        if( GTIFKeyGet(psGTIF, ProjNatOriginLongGeoKey, 
-                       &dfNatOriginLong, 0, 1 ) == 0
-            && GTIFKeyGet(psGTIF, ProjFalseOriginLongGeoKey, 
-                          &dfNatOriginLong, 0, 1 ) == 0
-            && GTIFKeyGet(psGTIF, ProjCenterLongGeoKey, 
-                          &dfNatOriginLong, 0, 1 ) == 0 )
-            dfNatOriginLong = 0.0;
-
-        if( GTIFKeyGet(psGTIF, ProjNatOriginLatGeoKey, 
-                       &dfNatOriginLat, 0, 1 ) == 0
-            && GTIFKeyGet(psGTIF, ProjFalseOriginLatGeoKey, 
-                          &dfNatOriginLat, 0, 1 ) == 0
-            && GTIFKeyGet(psGTIF, ProjCenterLatGeoKey, 
-                          &dfNatOriginLat, 0, 1 ) == 0 )
-            dfNatOriginLat = 0.0;
-
-        if( GTIFKeyGet(psGTIF, ProjAzimuthAngleGeoKey, 
-                       &dfAzimuth, 0, 1 ) == 0 )
-            dfAzimuth = 0.0;
-
-        if( GTIFKeyGet(psGTIF, ProjRectifiedGridAngleGeoKey,
-                       &dfRectGridAngle, 0, 1 ) == 0 )
-            dfRectGridAngle = 90.0;
-
-        if( GTIFKeyGet(psGTIF, ProjScaleAtNatOriginGeoKey,
-                       &dfNatOriginScale, 0, 1 ) == 0
-            && GTIFKeyGet(psGTIF, ProjScaleAtCenterGeoKey,
-                          &dfNatOriginScale, 0, 1 ) == 0 )
-            dfNatOriginScale = 1.0;
-            
-        /* notdef: should transform to decimal degrees at this point */
-
-        psDefn->ProjParm[0] = dfNatOriginLat;
-        psDefn->ProjParmId[0] = ProjCenterLatGeoKey;
-        psDefn->ProjParm[1] = dfNatOriginLong;
-        psDefn->ProjParmId[1] = ProjCenterLongGeoKey;
-        psDefn->ProjParm[2] = dfAzimuth;
-        psDefn->ProjParmId[2] = ProjAzimuthAngleGeoKey;
-        psDefn->ProjParm[3] = dfRectGridAngle;
-        psDefn->ProjParmId[3] = ProjRectifiedGridAngleGeoKey;
-        psDefn->ProjParm[4] = dfNatOriginScale;
-        psDefn->ProjParmId[4] = ProjScaleAtCenterGeoKey;
-        psDefn->ProjParm[5] = dfFalseEasting;
-        psDefn->ProjParmId[5] = ProjFalseEastingGeoKey;
-        psDefn->ProjParm[6] = dfFalseNorthing;
-        psDefn->ProjParmId[6] = ProjFalseNorthingGeoKey;
-
-        psDefn->nParms = 7;
-        break;
-
-/* -------------------------------------------------------------------- */
-      case CT_CassiniSoldner:
-      case CT_Polyconic:
-/* -------------------------------------------------------------------- */
-        if( GTIFKeyGet(psGTIF, ProjNatOriginLongGeoKey, 
-                       &dfNatOriginLong, 0, 1 ) == 0
-            && GTIFKeyGet(psGTIF, ProjFalseOriginLongGeoKey, 
-                          &dfNatOriginLong, 0, 1 ) == 0
-            && GTIFKeyGet(psGTIF, ProjCenterLongGeoKey, 
-                          &dfNatOriginLong, 0, 1 ) == 0 )
-            dfNatOriginLong = 0.0;
-
-        if( GTIFKeyGet(psGTIF, ProjNatOriginLatGeoKey, 
-                       &dfNatOriginLat, 0, 1 ) == 0
-            && GTIFKeyGet(psGTIF, ProjFalseOriginLatGeoKey, 
-                          &dfNatOriginLat, 0, 1 ) == 0
-            && GTIFKeyGet(psGTIF, ProjCenterLatGeoKey, 
-                          &dfNatOriginLat, 0, 1 ) == 0 )
-            dfNatOriginLat = 0.0;
-
-        if( GTIFKeyGet(psGTIF, ProjScaleAtNatOriginGeoKey,
-                       &dfNatOriginScale, 0, 1 ) == 0
-            && GTIFKeyGet(psGTIF, ProjScaleAtCenterGeoKey,
-                          &dfNatOriginScale, 0, 1 ) == 0 )
-            dfNatOriginScale = 1.0;
-            
-        /* notdef: should transform to decimal degrees at this point */
-
-        psDefn->ProjParm[0] = dfNatOriginLat;
-        psDefn->ProjParmId[0] = ProjNatOriginLatGeoKey;
-        psDefn->ProjParm[1] = dfNatOriginLong;
-        psDefn->ProjParmId[1] = ProjNatOriginLongGeoKey;
-        psDefn->ProjParm[4] = dfNatOriginScale;
-        psDefn->ProjParmId[4] = ProjScaleAtNatOriginGeoKey;
-        psDefn->ProjParm[5] = dfFalseEasting;
-        psDefn->ProjParmId[5] = ProjFalseEastingGeoKey;
-        psDefn->ProjParm[6] = dfFalseNorthing;
-        psDefn->ProjParmId[6] = ProjFalseNorthingGeoKey;
-
-        psDefn->nParms = 7;
-        break;
-
-/* -------------------------------------------------------------------- */
-      case CT_AzimuthalEquidistant:
-      case CT_MillerCylindrical:
-      case CT_Equirectangular:
-      case CT_Gnomonic:
-      case CT_LambertAzimEqualArea:
-      case CT_Orthographic:
-/* -------------------------------------------------------------------- */
-        if( GTIFKeyGet(psGTIF, ProjNatOriginLongGeoKey, 
-                       &dfNatOriginLong, 0, 1 ) == 0
-            && GTIFKeyGet(psGTIF, ProjFalseOriginLongGeoKey, 
-                          &dfNatOriginLong, 0, 1 ) == 0
-            && GTIFKeyGet(psGTIF, ProjCenterLongGeoKey, 
-                          &dfNatOriginLong, 0, 1 ) == 0 )
-            dfNatOriginLong = 0.0;
-
-        if( GTIFKeyGet(psGTIF, ProjNatOriginLatGeoKey, 
-                       &dfNatOriginLat, 0, 1 ) == 0
-            && GTIFKeyGet(psGTIF, ProjFalseOriginLatGeoKey, 
-                          &dfNatOriginLat, 0, 1 ) == 0
-            && GTIFKeyGet(psGTIF, ProjCenterLatGeoKey, 
-                          &dfNatOriginLat, 0, 1 ) == 0 )
-            dfNatOriginLat = 0.0;
-
-        /* notdef: should transform to decimal degrees at this point */
-
-        psDefn->ProjParm[0] = dfNatOriginLat;
-        psDefn->ProjParmId[0] = ProjCenterLatGeoKey;
-        psDefn->ProjParm[1] = dfNatOriginLong;
-        psDefn->ProjParmId[1] = ProjCenterLongGeoKey;
-        psDefn->ProjParm[5] = dfFalseEasting;
-        psDefn->ProjParmId[5] = ProjFalseEastingGeoKey;
-        psDefn->ProjParm[6] = dfFalseNorthing;
-        psDefn->ProjParmId[6] = ProjFalseNorthingGeoKey;
-
-        psDefn->nParms = 7;
-        break;
-
-/* -------------------------------------------------------------------- */
-      case CT_Robinson:
-      case CT_Sinusoidal:
-      case CT_VanDerGrinten:
-/* -------------------------------------------------------------------- */
-        if( GTIFKeyGet(psGTIF, ProjNatOriginLongGeoKey, 
-                       &dfNatOriginLong, 0, 1 ) == 0
-            && GTIFKeyGet(psGTIF, ProjFalseOriginLongGeoKey, 
-                          &dfNatOriginLong, 0, 1 ) == 0
-            && GTIFKeyGet(psGTIF, ProjCenterLongGeoKey, 
-                          &dfNatOriginLong, 0, 1 ) == 0 )
-            dfNatOriginLong = 0.0;
-
-        /* notdef: should transform to decimal degrees at this point */
-
-        psDefn->ProjParm[1] = dfNatOriginLong;
-        psDefn->ProjParmId[1] = ProjCenterLongGeoKey;
-        psDefn->ProjParm[5] = dfFalseEasting;
-        psDefn->ProjParmId[5] = ProjFalseEastingGeoKey;
-        psDefn->ProjParm[6] = dfFalseNorthing;
-        psDefn->ProjParmId[6] = ProjFalseNorthingGeoKey;
-
-        psDefn->nParms = 7;
-        break;
-
-/* -------------------------------------------------------------------- */
-      case CT_PolarStereographic:
-/* -------------------------------------------------------------------- */
-        if( GTIFKeyGet(psGTIF, ProjStraightVertPoleLongGeoKey, 
-                       &dfNatOriginLong, 0, 1 ) == 0
-            && GTIFKeyGet(psGTIF, ProjNatOriginLongGeoKey, 
-                          &dfNatOriginLong, 0, 1 ) == 0
-            && GTIFKeyGet(psGTIF, ProjFalseOriginLongGeoKey, 
-                          &dfNatOriginLong, 0, 1 ) == 0
-            && GTIFKeyGet(psGTIF, ProjCenterLongGeoKey, 
-                          &dfNatOriginLong, 0, 1 ) == 0 )
-            dfNatOriginLong = 0.0;
-
-        if( GTIFKeyGet(psGTIF, ProjNatOriginLatGeoKey, 
-                       &dfNatOriginLat, 0, 1 ) == 0
-            && GTIFKeyGet(psGTIF, ProjFalseOriginLatGeoKey, 
-                          &dfNatOriginLat, 0, 1 ) == 0
-            && GTIFKeyGet(psGTIF, ProjCenterLatGeoKey, 
-                          &dfNatOriginLat, 0, 1 ) == 0 )
-            dfNatOriginLat = 0.0;
-
-        if( GTIFKeyGet(psGTIF, ProjScaleAtNatOriginGeoKey,
-                       &dfNatOriginScale, 0, 1 ) == 0
-            && GTIFKeyGet(psGTIF, ProjScaleAtCenterGeoKey,
-                          &dfNatOriginScale, 0, 1 ) == 0 )
-            dfNatOriginScale = 1.0;
-            
-        /* notdef: should transform to decimal degrees at this point */
-
-        psDefn->ProjParm[0] = dfNatOriginLat;
-        psDefn->ProjParmId[0] = ProjNatOriginLatGeoKey;;
-        psDefn->ProjParm[1] = dfNatOriginLong;
-        psDefn->ProjParmId[1] = ProjStraightVertPoleLongGeoKey;
-        psDefn->ProjParm[4] = dfNatOriginScale;
-        psDefn->ProjParmId[4] = ProjScaleAtNatOriginGeoKey;
-        psDefn->ProjParm[5] = dfFalseEasting;
-        psDefn->ProjParmId[5] = ProjFalseEastingGeoKey;
-        psDefn->ProjParm[6] = dfFalseNorthing;
-        psDefn->ProjParmId[6] = ProjFalseNorthingGeoKey;
-
-        psDefn->nParms = 7;
-        break;
-
-/* -------------------------------------------------------------------- */
-      case CT_LambertConfConic_2SP:
-/* -------------------------------------------------------------------- */
-        if( GTIFKeyGet(psGTIF, ProjStdParallel1GeoKey, 
-                       &dfStdParallel1, 0, 1 ) == 0 )
-            dfStdParallel1 = 0.0;
-
-        if( GTIFKeyGet(psGTIF, ProjStdParallel2GeoKey, 
-                       &dfStdParallel2, 0, 1 ) == 0 )
-            dfStdParallel1 = 0.0;
-
-        if( GTIFKeyGet(psGTIF, ProjNatOriginLongGeoKey, 
-                       &dfNatOriginLong, 0, 1 ) == 0
-            && GTIFKeyGet(psGTIF, ProjFalseOriginLongGeoKey, 
-                          &dfNatOriginLong, 0, 1 ) == 0
-            && GTIFKeyGet(psGTIF, ProjCenterLongGeoKey, 
-                          &dfNatOriginLong, 0, 1 ) == 0 )
-            dfNatOriginLong = 0.0;
-
-        if( GTIFKeyGet(psGTIF, ProjNatOriginLatGeoKey, 
-                       &dfNatOriginLat, 0, 1 ) == 0
-            && GTIFKeyGet(psGTIF, ProjFalseOriginLatGeoKey, 
-                          &dfNatOriginLat, 0, 1 ) == 0
-            && GTIFKeyGet(psGTIF, ProjCenterLatGeoKey, 
-                          &dfNatOriginLat, 0, 1 ) == 0 )
-            dfNatOriginLat = 0.0;
-
-        /* notdef: should transform to decimal degrees at this point */
-
-        psDefn->ProjParm[0] = dfNatOriginLat;
-        psDefn->ProjParmId[0] = ProjFalseOriginLatGeoKey;
-        psDefn->ProjParm[1] = dfNatOriginLong;
-        psDefn->ProjParmId[1] = ProjFalseOriginLongGeoKey;
-        psDefn->ProjParm[2] = dfStdParallel1;
-        psDefn->ProjParmId[2] = ProjStdParallel1GeoKey;
-        psDefn->ProjParm[3] = dfStdParallel2;
-        psDefn->ProjParmId[3] = ProjStdParallel2GeoKey;
-        psDefn->ProjParm[5] = dfFalseEasting;
-        psDefn->ProjParmId[5] = ProjFalseEastingGeoKey;
-        psDefn->ProjParm[6] = dfFalseNorthing;
-        psDefn->ProjParmId[6] = ProjFalseNorthingGeoKey;
-
-        psDefn->nParms = 7;
-        break;
-
-/* -------------------------------------------------------------------- */
-      case CT_AlbersEqualArea:
-      case CT_EquidistantConic:
-/* -------------------------------------------------------------------- */
-        if( GTIFKeyGet(psGTIF, ProjStdParallel1GeoKey, 
-                       &dfStdParallel1, 0, 1 ) == 0 )
-            dfStdParallel1 = 0.0;
-
-        if( GTIFKeyGet(psGTIF, ProjStdParallel2GeoKey, 
-                       &dfStdParallel2, 0, 1 ) == 0 )
-            dfStdParallel1 = 0.0;
-
-        if( GTIFKeyGet(psGTIF, ProjNatOriginLongGeoKey, 
-                       &dfNatOriginLong, 0, 1 ) == 0
-            && GTIFKeyGet(psGTIF, ProjFalseOriginLongGeoKey, 
-                          &dfNatOriginLong, 0, 1 ) == 0
-            && GTIFKeyGet(psGTIF, ProjCenterLongGeoKey, 
-                          &dfNatOriginLong, 0, 1 ) == 0 )
-            dfNatOriginLong = 0.0;
-
-        if( GTIFKeyGet(psGTIF, ProjNatOriginLatGeoKey, 
-                       &dfNatOriginLat, 0, 1 ) == 0
-            && GTIFKeyGet(psGTIF, ProjFalseOriginLatGeoKey, 
-                          &dfNatOriginLat, 0, 1 ) == 0
-            && GTIFKeyGet(psGTIF, ProjCenterLatGeoKey, 
-                          &dfNatOriginLat, 0, 1 ) == 0 )
-            dfNatOriginLat = 0.0;
-
-        /* notdef: should transform to decimal degrees at this point */
-
-        psDefn->ProjParm[0] = dfStdParallel1;
-        psDefn->ProjParmId[0] = ProjStdParallel1GeoKey;
-        psDefn->ProjParm[1] = dfStdParallel2;
-        psDefn->ProjParmId[1] = ProjStdParallel2GeoKey;
-        psDefn->ProjParm[2] = dfNatOriginLat;
-        psDefn->ProjParmId[2] = ProjNatOriginLatGeoKey;
-        psDefn->ProjParm[3] = dfNatOriginLong;
-        psDefn->ProjParmId[3] = ProjNatOriginLongGeoKey;
-        psDefn->ProjParm[5] = dfFalseEasting;
-        psDefn->ProjParmId[5] = ProjFalseEastingGeoKey;
-        psDefn->ProjParm[6] = dfFalseNorthing;
-        psDefn->ProjParmId[6] = ProjFalseNorthingGeoKey;
-
-        psDefn->nParms = 7;
-        break;
-    }
-}
-
-/************************************************************************/
-/*                            GTIFGetDefn()                             */
-/************************************************************************/
-
-/**
- at param psGTIF GeoTIFF information handle as returned by GTIFNew.
- at param psDefn Pointer to an existing GTIFDefn structure.  This structure
-does not need to have been pre-initialized at all.
-
- at return TRUE if the function has been successful, otherwise FALSE.
-
-This function reads the coordinate system definition from a GeoTIFF file,
-and <i>normalizes</i> it into a set of component information using 
-definitions from CSV (Comma Seperated Value ASCII) files derived from 
-EPSG tables.  This function is intended to simplify correct support for
-reading files with defined PCS (Projected Coordinate System) codes that
-wouldn't otherwise be directly known by application software by reducing
-it to the underlying projection method, parameters, datum, ellipsoid, 
-prime meridian and units.<p>
-
-The application should pass a pointer to an existing uninitialized 
-GTIFDefn structure, and GTIFGetDefn() will fill it in.  The fuction 
-currently always returns TRUE but in the future will return FALSE if 
-CSV files are not found.  In any event, all geokeys actually found in the
-file will be copied into the GTIFDefn.  However, if the CSV files aren't
-found codes implied by other codes will not be set properly.<p>
-
-GTIFGetDefn() will not generally work if the EPSG derived CSV files cannot
-be found.  By default a modest attempt will be made to find them, but 
-in general it is necessary for the calling application to override the
-logic to find them.  This can be done by calling the 
-SetCSVFilenameHook() function to
-override the search method based on application knowledge of where they are
-found.<p>
-
-The normalization methodology operates by fetching tags from the GeoTIFF
-file, and then setting all other tags implied by them in the structure.  The
-implied relationships are worked out by reading definitions from the 
-various EPSG derived CSV tables.<p>
-
-For instance, if a PCS (ProjectedCSTypeGeoKey) is found in the GeoTIFF file
-this code is used to lookup a record in the <tt>horiz_cs.csv</tt> CSV
-file.  For example given the PCS 26746 we can find the name
-(NAD27 / California zone VI), the GCS 4257 (NAD27), and the ProjectionCode
-10406 (California CS27 zone VI).  The GCS, and ProjectionCode can in turn
-be looked up in other tables until all the details of units, ellipsoid, 
-prime meridian, datum, projection (LambertConfConic_2SP) and projection
-parameters are established.  A full listgeo dump of a file 
-for this result might look like the following, all based on a single PCS
-value:<p>
-
-<pre>
-% listgeo -norm ~/data/geotiff/pci_eg/spaf27.tif
-Geotiff_Information:
-   Version: 1
-   Key_Revision: 1.0
-   Tagged_Information:
-      ModelTiepointTag (2,3):
-         0                0                0                
-         1577139.71       634349.176       0                
-      ModelPixelScaleTag (1,3):
-         195.509321       198.32184        0                
-      End_Of_Tags.
-   Keyed_Information:
-      GTModelTypeGeoKey (Short,1): ModelTypeProjected
-      GTRasterTypeGeoKey (Short,1): RasterPixelIsArea
-      ProjectedCSTypeGeoKey (Short,1): PCS_NAD27_California_VI
-      End_Of_Keys.
-   End_Of_Geotiff.
-
-PCS = 26746 (NAD27 / California zone VI)
-Projection = 10406 (California CS27 zone VI)
-Projection Method: CT_LambertConfConic_2SP
-   ProjStdParallel1GeoKey: 33.883333
-   ProjStdParallel2GeoKey: 32.766667
-   ProjFalseOriginLatGeoKey: 32.166667
-   ProjFalseOriginLongGeoKey: -116.233333
-   ProjFalseEastingGeoKey: 609601.219202
-   ProjFalseNorthingGeoKey: 0.000000
-GCS: 4267/NAD27
-Datum: 6267/North American Datum 1927
-Ellipsoid: 7008/Clarke 1866 (6378206.40,6356583.80)
-Prime Meridian: 8901/Greenwich (0.000000)
-Projection Linear Units: 9003/US survey foot (0.304801m)
-</pre>
-
-Note that GTIFGetDefn() does not inspect or return the tiepoints and scale.
-This must be handled seperately as it normally would.  It is intended to
-simplify capture and normalization of the coordinate system definition.  
-Note that GTIFGetDefn() also does the following things:
-
-<ol>
-<li> Convert all angular values to decimal degrees.
-<li> Convert all linear values to meters. 
-<li> Return the linear units and conversion to meters for the tiepoints and
-scale (though the tiepoints and scale remain in their native units). 
-<li> When reading projection parameters a variety of differences between
-different GeoTIFF generators are handled, and a normalized set of parameters
-for each projection are always returned.
-</ol>
-
-Code fields in the GTIFDefn are filled with KvUserDefined if there is not
-value to assign.  The parameter lists for each of the underlying projection
-transform methods can be found at the
-<a href="http://www.remotesensing.org/geotiff/proj_list">Projections</a>
-page.  Note that nParms will be set based on the maximum parameter used.
-Some of the parameters may not be used in which case the
-GTIFDefn::ProjParmId[] will
-be zero.  This is done to retain correspondence to the EPSG parameter
-numbering scheme.<p>
-
-The 
-<a href="http://www.remotesensing.org/cgi-bin/cvsweb.cgi/~checkout~/osrs/geotiff/libgeotiff/geotiff_proj4.c">geotiff_proj4.c</a> module distributed with libgeotiff can 
-be used as an example of code that converts a GTIFDefn into another projection
-system.<p>
-
- at see GTIFKeySet(), SetCSVFilenameHook()
-
-*/
-
-int GTIFGetDefn( GTIF * psGTIF, GTIFDefn * psDefn )
-
-{
-    int		i;
-    short	nGeogUOMLinear;
-    double	dfInvFlattening;
-    
-/* -------------------------------------------------------------------- */
-/*      Initially we default all the information we can.                */
-/* -------------------------------------------------------------------- */
-    psDefn->Model = KvUserDefined;
-    psDefn->PCS = KvUserDefined;
-    psDefn->GCS = KvUserDefined;
-    psDefn->UOMLength = KvUserDefined;
-    psDefn->UOMLengthInMeters = 1.0;
-    psDefn->UOMAngle = KvUserDefined;
-    psDefn->UOMAngleInDegrees = 1.0;
-    psDefn->Datum = KvUserDefined;
-    psDefn->Ellipsoid = KvUserDefined;
-    psDefn->SemiMajor = 0.0;
-    psDefn->SemiMinor = 0.0;
-    psDefn->PM = KvUserDefined;
-    psDefn->PMLongToGreenwich = 0.0;
-
-    psDefn->ProjCode = KvUserDefined;
-    psDefn->Projection = KvUserDefined;
-    psDefn->CTProjection = KvUserDefined;
-
-    psDefn->nParms = 0;
-    for( i = 0; i < MAX_GTIF_PROJPARMS; i++ )
-    {
-        psDefn->ProjParm[i] = 0.0;
-        psDefn->ProjParmId[i] = 0;
-    }
-
-    psDefn->MapSys = KvUserDefined;
-    psDefn->Zone = 0;
-
-/* -------------------------------------------------------------------- */
-/*	Try to get the overall model type.				*/
-/* -------------------------------------------------------------------- */
-    GTIFKeyGet(psGTIF,GTModelTypeGeoKey,&(psDefn->Model),0,1);
-
-/* -------------------------------------------------------------------- */
-/*	Extract the Geog units.  					*/
-/* -------------------------------------------------------------------- */
-    nGeogUOMLinear = 9001; /* Linear_Meter */
-    GTIFKeyGet(psGTIF, GeogLinearUnitsGeoKey, &nGeogUOMLinear, 0, 1 );
-
-/* -------------------------------------------------------------------- */
-/*      Try to get a PCS.                                               */
-/* -------------------------------------------------------------------- */
-    if( GTIFKeyGet(psGTIF,ProjectedCSTypeGeoKey, &(psDefn->PCS),0,1) == 1
-        && psDefn->PCS != KvUserDefined )
-    {
-        /*
-         * Translate this into useful information.
-         */
-        GTIFGetPCSInfo( psDefn->PCS, NULL, &(psDefn->ProjCode),
-                        &(psDefn->UOMLength), &(psDefn->GCS) );
-    }
-
-/* -------------------------------------------------------------------- */
-/*       If we have the PCS code, but didn't find it in the CSV files   */
-/*      (likely because we can't find them) we will try some ``jiffy    */
-/*      rules'' for UTM and state plane.                                */
-/* -------------------------------------------------------------------- */
-    if( psDefn->PCS != KvUserDefined && psDefn->ProjCode == KvUserDefined )
-    {
-        int	nMapSys, nZone;
-        int	nGCS = psDefn->GCS;
-
-        nMapSys = GTIFPCSToMapSys( psDefn->PCS, &nGCS, &nZone );
-        if( nMapSys != KvUserDefined )
-        {
-            psDefn->ProjCode = GTIFMapSysToProj( nMapSys, nZone );
-            psDefn->GCS = nGCS;
-        }
-    }
-
-/* -------------------------------------------------------------------- */
-/*      If the Proj_ code is specified directly, use that.              */
-/* -------------------------------------------------------------------- */
-    if( psDefn->ProjCode == KvUserDefined )
-        GTIFKeyGet(psGTIF, ProjectionGeoKey, &(psDefn->ProjCode), 0, 1 );
-    
-    if( psDefn->ProjCode != KvUserDefined )
-    {
-        /*
-         * We have an underlying projection transformation value.  Look
-         * this up.  For a PCS of ``WGS 84 / UTM 11'' the transformation
-         * would be Transverse Mercator, with a particular set of options.
-         * The nProjTRFCode itself would correspond to the name
-         * ``UTM zone 11N'', and doesn't include datum info.
-         */
-        GTIFGetProjTRFInfo( psDefn->ProjCode, NULL, &(psDefn->Projection),
-                            psDefn->ProjParm );
-        
-        /*
-         * Set the GeoTIFF identity of the parameters.
-         */
-        psDefn->CTProjection =
-            EPSGProjMethodToCTProjMethod( psDefn->Projection );
-
-        SetGTParmIds( psDefn->CTProjection, psDefn->ProjParmId, NULL);
-        psDefn->nParms = 7;
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Try to get a GCS.  If found, it will override any implied by    */
-/*      the PCS.                                                        */
-/* -------------------------------------------------------------------- */
-    GTIFKeyGet(psGTIF, GeographicTypeGeoKey, &(psDefn->GCS), 0, 1 );
-
-/* -------------------------------------------------------------------- */
-/*      Derive the datum, and prime meridian from the GCS.              */
-/* -------------------------------------------------------------------- */
-    if( psDefn->GCS != KvUserDefined )
-    {
-        GTIFGetGCSInfo( psDefn->GCS, NULL, &(psDefn->Datum), &(psDefn->PM),
-                        &(psDefn->UOMAngle) );
-    }
-    
-/* -------------------------------------------------------------------- */
-/*      Handle the GCS angular units.  GeogAngularUnitsGeoKey           */
-/*      overrides the GCS or PCS setting.                               */
-/* -------------------------------------------------------------------- */
-    GTIFKeyGet(psGTIF, GeogAngularUnitsGeoKey, &(psDefn->UOMAngle), 0, 1 );
-    if( psDefn->UOMAngle != KvUserDefined )
-    {
-        GTIFGetUOMAngleInfo( psDefn->UOMAngle, NULL,
-                             &(psDefn->UOMAngleInDegrees) );
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Check for a datum setting, and then use the datum to derive     */
-/*      an ellipsoid.                                                   */
-/* -------------------------------------------------------------------- */
-    GTIFKeyGet(psGTIF, GeogGeodeticDatumGeoKey, &(psDefn->Datum), 0, 1 );
-
-    if( psDefn->Datum != KvUserDefined )
-    {
-        GTIFGetDatumInfo( psDefn->Datum, NULL, &(psDefn->Ellipsoid) );
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Check for an explicit ellipsoid.  Use the ellipsoid to          */
-/*      derive the ellipsoid characteristics, if possible.              */
-/* -------------------------------------------------------------------- */
-    GTIFKeyGet(psGTIF, GeogEllipsoidGeoKey, &(psDefn->Ellipsoid), 0, 1 );
-
-    if( psDefn->Ellipsoid != KvUserDefined )
-    {
-        GTIFGetEllipsoidInfo( psDefn->Ellipsoid, NULL,
-                              &(psDefn->SemiMajor), &(psDefn->SemiMinor) );
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Check for overridden ellipsoid parameters.  It would be nice    */
-/*      to warn if they conflict with provided information, but for     */
-/*      now we just override.                                           */
-/* -------------------------------------------------------------------- */
-    GTIFKeyGet(psGTIF, GeogSemiMajorAxisGeoKey, &(psDefn->SemiMajor), 0, 1 );
-    GTIFKeyGet(psGTIF, GeogSemiMinorAxisGeoKey, &(psDefn->SemiMinor), 0, 1 );
-    
-    if( GTIFKeyGet(psGTIF, GeogInvFlatteningGeoKey, &dfInvFlattening, 
-                   0, 1 ) == 1 )
-    {
-        if( dfInvFlattening != 0.0 )
-            psDefn->SemiMinor = 
-                psDefn->SemiMajor * (1 - 1.0/dfInvFlattening);
-    }
-    
-/* -------------------------------------------------------------------- */
-/*      Get the prime meridian info.                                    */
-/* -------------------------------------------------------------------- */
-    GTIFKeyGet(psGTIF, GeogPrimeMeridianGeoKey, &(psDefn->PM), 0, 1 );
-
-    if( psDefn->PM != KvUserDefined )
-    {
-        GTIFGetPMInfo( psDefn->PM, NULL, &(psDefn->PMLongToGreenwich) );
-    }
-    else
-    {
-        GTIFKeyGet(psGTIF, GeogPrimeMeridianLongGeoKey,
-                   &(psDefn->PMLongToGreenwich), 0, 1 );
-
-        psDefn->PMLongToGreenwich =
-            GTIFAngleToDD( psDefn->PMLongToGreenwich,
-                           psDefn->UOMAngle );
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Have the projection units of measure been overridden?  We       */
-/*      should likely be doing something about angular units too,       */
-/*      but these are very rarely not decimal degrees for actual        */
-/*      file coordinates.                                               */
-/* -------------------------------------------------------------------- */
-    GTIFKeyGet(psGTIF,ProjLinearUnitsGeoKey,&(psDefn->UOMLength),0,1);
-
-    if( psDefn->UOMLength != KvUserDefined )
-    {
-        GTIFGetUOMLengthInfo( psDefn->UOMLength, NULL,
-                              &(psDefn->UOMLengthInMeters) );
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Handle a variety of user defined transform types.               */
-/* -------------------------------------------------------------------- */
-    if( GTIFKeyGet(psGTIF,ProjCoordTransGeoKey,
-                   &(psDefn->CTProjection),0,1) == 1)
-    {
-        GTIFFetchProjParms( psGTIF, psDefn );
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Try to set the zoned map system information.                    */
-/* -------------------------------------------------------------------- */
-    psDefn->MapSys = GTIFProjToMapSys( psDefn->ProjCode, &(psDefn->Zone) );
-
-/* -------------------------------------------------------------------- */
-/*      If this is UTM, and we were unable to extract the projection    */
-/*      parameters from the CSV file, just set them directly now,       */
-/*      since it's pretty easy, and a common case.                      */
-/* -------------------------------------------------------------------- */
-    if( (psDefn->MapSys == MapSys_UTM_North
-         || psDefn->MapSys == MapSys_UTM_South)
-        && psDefn->CTProjection == KvUserDefined )
-    {
-        psDefn->CTProjection = CT_TransverseMercator;
-        psDefn->nParms = 7;
-        psDefn->ProjParmId[0] = ProjNatOriginLatGeoKey;
-        psDefn->ProjParm[0] = 0.0;
-            
-        psDefn->ProjParmId[1] = ProjNatOriginLongGeoKey;
-        psDefn->ProjParm[1] = psDefn->Zone*6 - 183.0;
-        
-        psDefn->ProjParmId[4] = ProjScaleAtNatOriginGeoKey;
-        psDefn->ProjParm[4] = 0.9996;
-        
-        psDefn->ProjParmId[5] = ProjFalseEastingGeoKey;
-        psDefn->ProjParm[5] = 500000.0;
-        
-        psDefn->ProjParmId[6] = ProjFalseNorthingGeoKey;
-
-        if( psDefn->MapSys == MapSys_UTM_North )
-            psDefn->ProjParm[6] = 0.0;
-        else
-            psDefn->ProjParm[6] = 10000000.0;
-    }
-
-/* -------------------------------------------------------------------- */
-/*      For now we forceable deaccess all CSV files to reduce the       */
-/*      chance of "leakage".  Really, this should be application        */
-/*      controlled.                                                     */
-/* -------------------------------------------------------------------- */
-    CSVDeaccess( NULL );
-
-    return TRUE;
-}
-
-/************************************************************************/
-/*                            GTIFDecToDMS()                            */
-/*                                                                      */
-/*      Convenient function to translate decimal degrees to DMS         */
-/*      format for reporting to a user.                                 */
-/************************************************************************/
-
-const char *GTIFDecToDMS( double dfAngle, const char * pszAxis,
-                          int nPrecision )
-
-{
-    int		nDegrees, nMinutes;
-    double	dfSeconds;
-    char	szFormat[30];
-    static char szBuffer[50];
-    const char	*pszHemisphere = NULL;
-    double	dfRound;
-    int		i;
-
-    dfRound = 0.5/60;
-    for( i = 0; i < nPrecision; i++ )
-        dfRound = dfRound * 0.1;
-
-    nDegrees = (int) ABS(dfAngle);
-    nMinutes = (int) ((ABS(dfAngle) - nDegrees) * 60 + dfRound);
-    dfSeconds = ABS((ABS(dfAngle) * 3600 - nDegrees*3600 - nMinutes*60));
-
-    if( EQUAL(pszAxis,"Long") && dfAngle < 0.0 )
-        pszHemisphere = "W";
-    else if( EQUAL(pszAxis,"Long") )
-        pszHemisphere = "E";
-    else if( dfAngle < 0.0 )
-        pszHemisphere = "S";
-    else
-        pszHemisphere = "N";
-
-    sprintf( szFormat, "%%3dd%%2d\'%%%d.%df\"%s",
-             nPrecision+3, nPrecision, pszHemisphere );
-    sprintf( szBuffer, szFormat, nDegrees, nMinutes, dfSeconds );
-
-    return( szBuffer );
-}
-
-/************************************************************************/
-/*                           GTIFPrintDefn()                            */
-/*                                                                      */
-/*      Report the contents of a GTIFDefn structure ... mostly for      */
-/*      debugging.                                                      */
-/************************************************************************/
-
-void GTIFPrintDefn( GTIFDefn * psDefn, FILE * fp )
-
-{
-/* -------------------------------------------------------------------- */
-/*      Get the PCS name if possible.                                   */
-/* -------------------------------------------------------------------- */
-    if( psDefn->PCS != KvUserDefined )
-    {
-        char	*pszPCSName = NULL;
-    
-        GTIFGetPCSInfo( psDefn->PCS, &pszPCSName, NULL, NULL, NULL );
-        if( pszPCSName == NULL )
-            pszPCSName = CPLStrdup("name unknown");
-        
-        fprintf( fp, "PCS = %d (%s)\n", psDefn->PCS, pszPCSName );
-        CPLFree( pszPCSName );
-    }
-
-/* -------------------------------------------------------------------- */
-/*	Dump the projection code if possible.				*/
-/* -------------------------------------------------------------------- */
-    if( psDefn->ProjCode != KvUserDefined )
-    {
-        char	*pszTRFName = NULL;
-
-        GTIFGetProjTRFInfo( psDefn->ProjCode, &pszTRFName, NULL, NULL );
-        if( pszTRFName == NULL )
-            pszTRFName = CPLStrdup("");
-                
-        fprintf( fp, "Projection = %d (%s)\n",
-                 psDefn->ProjCode, pszTRFName );
-
-        CPLFree( pszTRFName );
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Try to dump the projection method name, and parameters if possible.*/
-/* -------------------------------------------------------------------- */
-    if( psDefn->CTProjection != KvUserDefined )
-    {
-        char	*pszName = GTIFValueName(ProjCoordTransGeoKey,
-                                         psDefn->CTProjection);
-        int     i;
-
-        if( pszName == NULL )
-            pszName = "(unknown)";
-            
-        fprintf( fp, "Projection Method: %s\n", pszName );
-
-        for( i = 0; i < psDefn->nParms; i++ )
-        {
-            if( psDefn->ProjParmId[i] == 0 )
-                continue;
-
-            pszName = GTIFKeyName((geokey_t) psDefn->ProjParmId[i]);
-            if( pszName == NULL )
-                pszName = "(unknown)";
-
-            if( i < 4 )
-            {
-                char	*pszAxisName;
-                
-                if( strstr(pszName,"Long") != NULL )
-                    pszAxisName = "Long";
-                else if( strstr(pszName,"Lat") != NULL )
-                    pszAxisName = "Lat";
-                else
-                    pszAxisName = "?";
-                
-                fprintf( fp, "   %s: %f (%s)\n",
-                         pszName, psDefn->ProjParm[i],
-                         GTIFDecToDMS( psDefn->ProjParm[i], pszAxisName, 2 ) );
-            }
-            else if( i == 4 )
-                fprintf( fp, "   %s: %f\n", pszName, psDefn->ProjParm[i] );
-            else
-                fprintf( fp, "   %s: %f m\n", pszName, psDefn->ProjParm[i] );
-        }
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Report the GCS name, and number.                                */
-/* -------------------------------------------------------------------- */
-    if( psDefn->GCS != KvUserDefined )
-    {
-        char	*pszName = NULL;
-
-        GTIFGetGCSInfo( psDefn->GCS, &pszName, NULL, NULL, NULL );
-        if( pszName == NULL )
-            pszName = CPLStrdup("(unknown)");
-        
-        fprintf( fp, "GCS: %d/%s\n", psDefn->GCS, pszName );
-        CPLFree( pszName );
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Report the datum name.                                          */
-/* -------------------------------------------------------------------- */
-    if( psDefn->Datum != KvUserDefined )
-    {
-        char	*pszName = NULL;
-
-        GTIFGetDatumInfo( psDefn->Datum, &pszName, NULL );
-        if( pszName == NULL )
-            pszName = CPLStrdup("(unknown)");
-        
-        fprintf( fp, "Datum: %d/%s\n", psDefn->Datum, pszName );
-        CPLFree( pszName );
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Report the ellipsoid.                                           */
-/* -------------------------------------------------------------------- */
-    if( psDefn->Ellipsoid != KvUserDefined )
-    {
-        char	*pszName = NULL;
-
-        GTIFGetEllipsoidInfo( psDefn->Ellipsoid, &pszName, NULL, NULL );
-        if( pszName == NULL )
-            pszName = CPLStrdup("(unknown)");
-        
-        fprintf( fp, "Ellipsoid: %d/%s (%.2f,%.2f)\n",
-                 psDefn->Ellipsoid, pszName,
-                 psDefn->SemiMajor, psDefn->SemiMinor );
-        CPLFree( pszName );
-    }
-    
-/* -------------------------------------------------------------------- */
-/*      Report the prime meridian.                                      */
-/* -------------------------------------------------------------------- */
-    if( psDefn->PM != KvUserDefined )
-    {
-        char	*pszName = NULL;
-
-        GTIFGetPMInfo( psDefn->PM, &pszName, NULL );
-
-        if( pszName == NULL )
-            pszName = CPLStrdup("(unknown)");
-        
-        fprintf( fp, "Prime Meridian: %d/%s (%f/%s)\n",
-                 psDefn->PM, pszName,
-                 psDefn->PMLongToGreenwich,
-                 GTIFDecToDMS( psDefn->PMLongToGreenwich, "Long", 2 ) );
-        CPLFree( pszName );
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Report the projection units of measure (currently just          */
-/*      linear).                                                        */
-/* -------------------------------------------------------------------- */
-    if( psDefn->UOMLength != KvUserDefined )
-    {
-        char	*pszName = NULL;
-
-        GTIFGetUOMLengthInfo( psDefn->UOMLength, &pszName, NULL );
-        if( pszName == NULL )
-            pszName = CPLStrdup( "(unknown)" );
-        
-        fprintf( fp, "Projection Linear Units: %d/%s (%fm)\n",
-                 psDefn->UOMLength, pszName, psDefn->UOMLengthInMeters );
-        CPLFree( pszName );
-    }
-
-    CSVDeaccess( NULL );
-}
-
-/************************************************************************/
-/*                           GTIFFreeMemory()                           */
-/*                                                                      */
-/*      Externally visible function to free memory allocated within     */
-/*      geo_normalize.c.                                                */
-/************************************************************************/
-
-void GTIFFreeMemory( char * pMemory )
-
-{
-    if( pMemory != NULL )
-        VSIFree( pMemory );
-}
-
-/************************************************************************/
-/*                          GTIFDeaccessCSV()                           */
-/*                                                                      */
-/*      Free all cached CSV info.                                       */
-/************************************************************************/
-
-void GTIFDeaccessCSV()
-
-{
-    CSVDeaccess( NULL );
-}
diff --git a/src/tiff/geo_normalize.h b/src/tiff/geo_normalize.h
deleted file mode 100644
index 3cd551f..0000000
--- a/src/tiff/geo_normalize.h
+++ /dev/null
@@ -1,233 +0,0 @@
-/******************************************************************************
- * $Id: geo_normalize.h,v 1.3 2004/03/19 11:51:24 lubia Exp $
- *
- * Project:  libgeotiff
- * Purpose:  Include file related to geo_normalize.c containing Code to
- *           normalize PCS and other composite codes in a GeoTIFF file.
- * Author:   Frank Warmerdam, warmerda at home.com
- *
- ******************************************************************************
- * Copyright (c) 1999, Frank Warmerdam
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- ******************************************************************************
- *
- * $Log: geo_normalize.h,v $
- * Revision 1.3  2004/03/19 11:51:24  lubia
- * Atualizada as bibliotecas Tif e GeoTif
- *
- * Revision 1.10  2003/01/15 04:39:16  warmerda
- * Added GTIFDeaccessCSV
- *
- * Revision 1.9  2003/01/15 03:37:40  warmerda
- * added GTIFFreeMemory()
- *
- * Revision 1.8  2002/11/28 22:27:42  warmerda
- * preliminary upgrade to EPSG 6.2.2 tables
- *
- * Revision 1.7  1999/09/17 00:55:26  warmerda
- * added GTIFGetUOMAngleInfo(), and UOMAngle in GTIFDefn
- *
- * Revision 1.6  1999/05/04 03:13:42  warmerda
- * Added prototype
- *
- * Revision 1.5  1999/04/29 23:02:55  warmerda
- * added docs, and MapSys related stuff
- *
- * Revision 1.4  1999/03/18 21:35:19  geotiff
- * Added PROJ.4 related stuff
- *
- * Revision 1.3  1999/03/17 20:44:04  geotiff
- * added CPL_DLL related support
- *
- * Revision 1.2  1999/03/10 18:24:06  geotiff
- * corrected to use int'
- *
- */
-
-#ifndef GEO_NORMALIZE_H_INCLUDED
-#define GEO_NORMALIZE_H_INCLUDED
-
-#include <stdio.h>
-#include "geotiff.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * \file geo_normalize.h
- *
- * Include file for extended projection definition normalization api.
- */
-    
-#define MAX_GTIF_PROJPARMS 	10
-
-/**
- * Holds a definition of a coordinate system in normalized form.
- */
-
-typedef struct {
-    /** From GTModelTypeGeoKey tag.  Can have the values ModelTypeGeographic
-        or ModelTypeProjected. */
-    short	Model;
-
-    /** From ProjectedCSTypeGeoKey tag.  For example PCS_NAD27_UTM_zone_3N.*/
-    short	PCS;
-
-    /** From GeographicTypeGeoKey tag.  For example GCS_WGS_84 or
-        GCS_Voirol_1875_Paris.  Includes datum and prime meridian value. */
-    short	GCS;	      
-
-    /** From ProjLinearUnitsGeoKey.  For example Linear_Meter. */
-    short	UOMLength;
-
-    /** One UOMLength = UOMLengthInMeters meters. */
-    double	UOMLengthInMeters;
-
-    /** The angular units of the GCS. */
-    short       UOMAngle;
-
-    /** One UOMAngle = UOMLengthInDegrees degrees. */
-    double      UOMAngleInDegrees;
-    
-    /** Datum from GeogGeodeticDatumGeoKey tag. For example Datum_WGS84 */
-    short	Datum;
-
-    /** Prime meridian from GeogPrimeMeridianGeoKey.  For example PM_Greenwich
-        or PM_Paris. */
-    short	PM;
-
-    /** Decimal degrees of longitude between this prime meridian and
-        Greenwich.  Prime meridians to the west of Greenwich are negative. */
-    double	PMLongToGreenwich;
-
-    /** Ellipsoid identifier from GeogELlipsoidGeoKey.  For example
-        Ellipse_Clarke_1866. */
-    short	Ellipsoid;
-
-    /** The length of the semi major ellipse axis in meters. */
-    double	SemiMajor;
-
-    /** The length of the semi minor ellipse axis in meters. */
-    double	SemiMinor;
-
-    /** Projection id from ProjectionGeoKey.  For example Proj_UTM_11S. */
-    short	ProjCode;
-
-    /** EPSG identifier for underlying projection method.  From the EPSG
-        TRF_METHOD table.  */
-    short	Projection;
-
-    /** GeoTIFF identifier for underlying projection method.  While some of
-      these values have corresponding vlaues in EPSG (Projection field),
-      others do not.  For example CT_TransverseMercator. */
-    short	CTProjection;   
-
-    /** Number of projection parameters in ProjParm and ProjParmId. */
-    int		nParms;
-
-    /** Projection parameter value.  The identify of this parameter
-        is established from the corresponding entry in ProjParmId.  The
-        value will be measured in meters, or decimal degrees if it is a
-        linear or angular measure. */
-    double	ProjParm[MAX_GTIF_PROJPARMS];
-
-    /** Projection parameter identifier.  For example ProjFalseEastingGeoKey.
-        The value will be 0 for unused table entries. */
-    int		ProjParmId[MAX_GTIF_PROJPARMS]; /* geokey identifier,
-                                                   eg. ProjFalseEastingGeoKey*/
-
-    /** Special zone map system code (MapSys_UTM_South, MapSys_UTM_North,
-        MapSys_State_Plane or KvUserDefined if none apply. */
-    int		MapSys;
-
-    /** UTM, or State Plane Zone number, zero if not known. */
-    int		Zone;
-
-} GTIFDefn;
-
-int CPL_DLL GTIFGetPCSInfo( int nPCSCode, char **ppszEPSGName,
-                            short *pnProjOp, 
-                            short *pnUOMLengthCode, short *pnGeogCS );
-int CPL_DLL GTIFGetProjTRFInfo( int nProjTRFCode,
-                                char ** ppszProjTRFName,
-                                short * pnProjMethod,
-                                double * padfProjParms );
-int CPL_DLL GTIFGetGCSInfo( int nGCSCode, char **ppszName,
-                            short *pnDatum, short *pnPM, short *pnUOMAngle );
-int CPL_DLL GTIFGetDatumInfo( int nDatumCode, char **ppszName,
-                              short * pnEllipsoid );
-int CPL_DLL GTIFGetEllipsoidInfo( int nEllipsoid, char ** ppszName,
-                                  double * pdfSemiMajor,
-                                  double * pdfSemiMinor );
-int CPL_DLL GTIFGetPMInfo( int nPM, char **ppszName,
-                           double * pdfLongToGreenwich );
-
-double CPL_DLL GTIFAngleStringToDD( const char *pszAngle, int nUOMAngle );
-int CPL_DLL GTIFGetUOMLengthInfo( int nUOMLengthCode,
-                                  char **ppszUOMName,
-                                  double * pdfInMeters );
-int CPL_DLL GTIFGetUOMAngleInfo( int nUOMAngleCode,
-                                 char **ppszUOMName,
-                                 double * pdfInDegrees );
-
-/* this should be used to free strings returned by GTIFGet... funcs */
-void CPL_DLL GTIFFreeMemory( char * );
-void CPL_DLL GTIFDeaccessCSV();
-
-int CPL_DLL GTIFGetDefn( GTIF *psGTIF, GTIFDefn * psDefn );
-void CPL_DLL GTIFPrintDefn( GTIFDefn *, FILE * );
-void CPL_DLL GTIFFreeDefn( GTIF * );
-
-void CPL_DLL SetCSVFilenameHook( const char *(*CSVFileOverride)(const char *) );
-
-const char CPL_DLL *GTIFDecToDMS( double, const char *, int );
-
-/*
- * These are useful for recognising UTM and State Plane, with or without
- * CSV files being found.
- */
-
-#define MapSys_UTM_North	-9001
-#define MapSys_UTM_South	-9002
-#define MapSys_State_Plane_27	-9003
-#define MapSys_State_Plane_83	-9004
-
-int CPL_DLL   GTIFMapSysToPCS( int MapSys, int Datum, int nZone );
-int CPL_DLL   GTIFMapSysToProj( int MapSys, int nZone );
-int CPL_DLL   GTIFPCSToMapSys( int PCSCode, int * pDatum, int * pZone );
-int CPL_DLL   GTIFProjToMapSys( int ProjCode, int * pZone );
-
-/*
- * These are only useful if using libgeotiff with libproj (PROJ.4+).
- */
-char CPL_DLL *GTIFGetProj4Defn( GTIFDefn * );
-int  CPL_DLL  GTIFProj4ToLatLong( GTIFDefn *, int, double *, double * );
-int  CPL_DLL  GTIFProj4FromLatLong( GTIFDefn *, int, double *, double * );
-
-#if defined(HAVE_LIBPROJ) && defined(HAVE_PROJECTS_H)
-#  define HAVE_GTIFPROJ4
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-    
-#endif /* ndef GEO_NORMALIZE_H_INCLUDED */
diff --git a/src/tiff/geo_print.c b/src/tiff/geo_print.c
deleted file mode 100644
index 0964a4b..0000000
--- a/src/tiff/geo_print.c
+++ /dev/null
@@ -1,496 +0,0 @@
-/**********************************************************************
- *
- *  geo_print.c  -- Key-dumping routines for GEOTIFF files.
- *
- *    Written By: Niles D. Ritter.
- *
- *  copyright (c) 1995   Niles D. Ritter
- *
- *  Permission granted to use this software, so long as this copyright
- *  notice accompanies any products derived therefrom.
- *
- *  Revision History;
- *
- *    20 June,  1995      Niles D. Ritter      New
- *     7 July,  1995      NDR                  Fix indexing
- *    27 July,  1995      NDR                  Added Import utils
- *    28 July,  1995      NDR                  Made parser more strict.
- *    29  Sep,  1995      NDR                  Fixed matrix printing.
- *
- * $Log: geo_print.c,v $
- * Revision 1.2  2004/03/19 11:51:24  lubia
- * Atualizada as bibliotecas Tif e GeoTif
- *
- * Revision 1.4  2002/05/31 14:27:26  warmerda
- * added escaping in metadata for string key values
- *
- * Revision 1.3  1999/05/04 03:14:35  warmerda
- * avoid warnings
- *
- * Revision 1.2  1999/05/03 17:50:31  warmerda
- * avoid warnings on IRIX
- *
- *
- **********************************************************************/
-
-#include "geotiff.h"   /* public interface        */
-#include "geo_tiffp.h" /* external TIFF interface */
-#include "geo_keyp.h"  /* private interface       */
-#include "geokeys.h"
-
-#include <stdio.h>     /* for sprintf             */
-
-#define FMT_GEOTIFF "Geotiff_Information:"
-#define FMT_VERSION "Version: %hd"
-#define FMT_REV     "Key_Revision: %1hd.%hd"
-#define FMT_TAGS    "Tagged_Information:"
-#define FMT_TAGEND  "End_Of_Tags."
-#define FMT_KEYS    "Keyed_Information:"
-#define FMT_KEYEND  "End_Of_Keys."
-#define FMT_GEOEND  "End_Of_Geotiff."
-#define FMT_DOUBLE  "%-17.9g"
-#define FMT_SHORT   "%-11hd"
-
-static void DefaultPrint(char *string, void *aux);
-static void PrintKey(GeoKey *key, GTIFPrintMethod print,void *aux);
-static void PrintGeoTags(GTIF *gtif,GTIFReadMethod scan,void *aux);
-static void PrintTag(int tag, int nrows, double *data, int ncols, 
-					GTIFPrintMethod print,void *aux);
-static void DefaultRead(char *string, void *aux);
-static int  ReadKey(GTIF *gt, GTIFReadMethod scan, void *aux);
-static int  ReadTag(GTIF *gt,GTIFReadMethod scan,void *aux);
-
-/*
- * Print off the directory info, using whatever method is specified
- * (defaults to fprintf if null). The "aux" parameter is provided for user
- * defined method for passing parameters or whatever.
- *
- * The output format is a "GeoTIFF meta-data" file, which may be
- * used to import information with the GTIFFImport() routine.
- */
- 
-void GTIFPrint(GTIF *gtif, GTIFPrintMethod print,void *aux)
-{
-    int i;
-    int numkeys = gtif->gt_num_keys;
-    GeoKey *key = gtif->gt_keys;
-    char message[1024];
-	
-    if (!print) print = (GTIFPrintMethod) &DefaultPrint;
-    if (!aux) aux=stdout;	
-
-    sprintf(message,FMT_GEOTIFF "\n"); 
-    print(message,aux);
-    sprintf(message, "Version: %hd" ,gtif->gt_version);
-    sprintf(message, FMT_VERSION,gtif->gt_version);
-    print("   ",aux); print(message,aux); print("\n",aux);
-    sprintf(message, FMT_REV,gtif->gt_rev_major,
-            gtif->gt_rev_minor); 
-    print("   ",aux); print(message,aux); print("\n",aux);
-
-    sprintf(message,"   %s\n",FMT_TAGS); print(message,aux);
-    PrintGeoTags(gtif,print,aux);
-    sprintf(message,"      %s\n",FMT_TAGEND); print(message,aux);
-
-    sprintf(message,"   %s\n",FMT_KEYS); print(message,aux);
-    for (i=0; i<numkeys; i++)
-        PrintKey(++key,print,aux);
-    sprintf(message,"      %s\n",FMT_KEYEND); print(message,aux);
-
-    sprintf(message,"   %s\n",FMT_GEOEND); print(message,aux);
-}
-
-static void PrintGeoTags(GTIF *gt, GTIFPrintMethod print,void *aux)
-{
-	double *data;
-	int count;
-	tiff_t *tif=gt->gt_tif;
-
-	if ((gt->gt_methods.get)(tif, GTIFF_TIEPOINTS, &count, &data ))
-		PrintTag(GTIFF_TIEPOINTS,count/3, data, 3, print, aux);
-	if ((gt->gt_methods.get)(tif, GTIFF_PIXELSCALE, &count, &data ))
-		PrintTag(GTIFF_PIXELSCALE,count/3, data, 3, print, aux);
-	if ((gt->gt_methods.get)(tif, GTIFF_TRANSMATRIX, &count, &data ))
-		PrintTag(GTIFF_TRANSMATRIX,count/4, data, 4, print, aux);
-}
-
-static void PrintTag(int tag, int nrows, double *dptr, int ncols, 
-					GTIFPrintMethod print,void *aux)
-{
-	int i,j;
-	double *data=dptr;
-        char message[1024];
-
-	print("      ",aux);
-	print(GTIFTagName(tag),aux);
-	sprintf(message," (%d,%d):\n",nrows,ncols);
-	print(message,aux);
-	for (i=0;i<nrows;i++)
-	{
-		print("         ",aux);
-		for (j=0;j<ncols;j++)
-		{
-			sprintf(message,FMT_DOUBLE,*data++);
-			print(message,aux);
-		}
-		print("\n",aux);
-	}
-	_GTIFFree(dptr); /* free up the allocated memory */
-}
-
-
-static void PrintKey(GeoKey *key, GTIFPrintMethod print, void *aux)
-{
-    char *data;
-    geokey_t keyid = (geokey_t) key->gk_key;
-    int count = key->gk_count;
-    int vals_now,i;
-    pinfo_t *sptr;
-    double *dptr;
-    char message[40];
-
-    print("      ",aux);
-    print(GTIFKeyName(keyid),aux);
-	
-    sprintf(message," (%s,%d): ",GTIFTypeName(key->gk_type),count);
-    print(message,aux);
-	
-    if (key->gk_type==TYPE_SHORT && count==1)
-        data = (char *)&key->gk_data;
-    else
-        data = key->gk_data;
-		
-    switch (key->gk_type)
-    {
-      case TYPE_ASCII: 
-      {
-          int  in_char, out_char;
-
-          print("\"",aux);
-
-          in_char = 0;
-          out_char = 0;
-          while( in_char < count-1 )
-          {
-              char ch = ((char *) data)[in_char++];
-
-              if( ch == '\n' )
-              {
-                  message[out_char++] = '\\';
-                  message[out_char++] = 'n';
-              }
-              else if( ch == '\\' )
-              {
-                  message[out_char++] = '\\';
-                  message[out_char++] = '\\';
-              }
-              else
-                  message[out_char++] = ch;
-
-              /* flush message if buffer full */
-              if( out_char == sizeof(message)-3 )
-              {
-                  message[out_char] = '\0';
-                  print(message,aux);
-                  out_char = 0;
-              }
-          }
-
-          message[out_char]='\0';
-          print(message,aux);
-
-          print("\"\n",aux);
-      }
-      break;
-        
-      case TYPE_DOUBLE: 
-        for (dptr = (double *)data; count > 0; count-= vals_now)
-        {
-            vals_now = count > 3? 3: count;
-            for (i=0; i<vals_now; i++,dptr++)
-            {
-                sprintf(message,FMT_DOUBLE ,*dptr);
-                print(message,aux);
-            }
-            print("\n",aux);
-        }
-        break;
-        
-      case TYPE_SHORT: 
-        sptr = (pinfo_t *)data;
-        if (count==1)
-        {
-            sprintf(message,"%s\n",GTIFValueName(keyid,*sptr));
-            print(message,aux);
-        }
-        else
-            for (; count > 0; count-= vals_now)
-            {
-                vals_now = count > 3? 3: count;
-                for (i=0; i<vals_now; i++,sptr++)
-                {
-                    sprintf(message,FMT_SHORT,*sptr);
-                    print(message,aux);
-                }
-                print("\n",aux);
-            }
-        break;
-        
-      default: 
-        sprintf(message, "Unknown Type (%d)\n",key->gk_type);
-        print(message,aux);
-        break;
-    }
-}
-
-static void DefaultPrint(char *string, void *aux)
-{
-    /* Pretty boring */
-    fprintf((FILE *)aux,string);
-}
-
-
-/*
- *  Importing metadata file
- */
-
-/*
- * Import the directory info, using whatever method is specified
- * (defaults to fscanf if null). The "aux" parameter is provided for user
- * defined method for passing file or whatever.
- *
- * The input format is a "GeoTIFF meta-data" file, which may be
- * generated by the GTIFFPrint() routine.
- */
- 
-int GTIFImport(GTIF *gtif, GTIFReadMethod scan,void *aux)
-{
-    int status;
-    char message[1024];
-	
-    if (!scan) scan = (GTIFReadMethod) &DefaultRead;
-    if (!aux) aux=stdin;	
-	
-    scan(message,aux);
-    if (strncmp(message,FMT_GEOTIFF,8)) return 0; 
-    scan(message,aux);
-    if (!sscanf(message,FMT_VERSION,&gtif->gt_version)) return 0;
-    scan(message,aux);
-    if (sscanf(message,FMT_REV,&gtif->gt_rev_major,
-               &gtif->gt_rev_minor) !=2) return 0;
-
-    scan(message,aux);
-    if (strncmp(message,FMT_TAGS,8)) return 0;
-    while ((status=ReadTag(gtif,scan,aux))>0);
-    if (status < 0) return 0;
-
-    scan(message,aux);
-    if (strncmp(message,FMT_KEYS,8)) return 0;
-    while ((status=ReadKey(gtif,scan,aux))>0);
-	
-    return (status==0); /* success */
-}
-
-static int StringError(char *string)
-{
-    fprintf(stderr,"Parsing Error at \'%s\'\n",string);
-    return -1;
-}
-
-#define SKIPWHITE(vptr) \
-  while (*vptr && (*vptr==' '||*vptr=='\t')) vptr++
-#define FINDCHAR(vptr,c) \
-  while (*vptr && *vptr!=(c)) vptr++
-
-static int ReadTag(GTIF *gt,GTIFReadMethod scan,void *aux)
-{
-    int i,j,tag;
-    char *vptr;
-    char tagname[100];
-    double data[100],*dptr=data;
-    int count,nrows,ncols,num;
-    char message[1024];
-
-    scan(message,aux);
-    if (!strncmp(message,FMT_TAGEND,8)) return 0;
-
-    num=sscanf(message,"%[^( ] (%d,%d):\n",tagname,&nrows,&ncols);
-    if (num!=3) return StringError(message);
-	
-    tag = GTIFTagCode(tagname);
-    if (tag < 0) return StringError(tagname);
-	
-    count = nrows*ncols;
-    for (i=0;i<nrows;i++)
-    {
-        scan(message,aux);
-        vptr = message;
-        for (j=0;j<ncols;j++)
-        {
-            if (!sscanf(vptr,"%lg",dptr++))
-                return StringError(vptr);
-            FINDCHAR(vptr,' ');
-            SKIPWHITE(vptr);
-        }
-    }	
-    (gt->gt_methods.set)(gt->gt_tif, tag, count, data );	
-
-    return 1;
-}
-
-
-static int ReadKey(GTIF *gt, GTIFReadMethod scan, void *aux)
-{
-    tagtype_t ktype;
-    int count,outcount;
-    int vals_now,i;
-    geokey_t key;
-    int icode;
-    pinfo_t code;
-    short  *sptr;
-    char name[1000];
-    char type[20];
-    double data[100];
-    double *dptr;
-    char *vptr;
-    int num;
-    char message[2048];
-
-    scan(message,aux); 
-    if (!strncmp(message,FMT_KEYEND,8)) return 0;
-
-    num=sscanf(message,"%[^( ] (%[^,],%d):\n",name,type,&count);
-    if (num!=3) return StringError(message);
-
-    vptr = message;
-    FINDCHAR(vptr,':'); 
-    if (!*vptr) return StringError(message);
-    vptr+=2;
-
-    if( GTIFKeyCode(name) < 0 )
-        return StringError(name);
-    else
-        key = (geokey_t) GTIFKeyCode(name);
-
-    if( GTIFTypeCode(type) < 0 )
-        return StringError(type);
-    else
-        ktype = (tagtype_t) GTIFTypeCode(type);
-
-    /* skip white space */
-    SKIPWHITE(vptr);
-    if (!*vptr) return StringError(message);
-			
-    switch (ktype)
-    {
-      case TYPE_ASCII: 
-      {
-          char *cdata;
-          int out_char = 0;
-
-          FINDCHAR(vptr,'"');
-          if (!*vptr) return StringError(message);
-
-          cdata = (char *) _GTIFcalloc( count+1 );
-
-          vptr++;
-          while( out_char < count-1 )
-          {
-              if( *vptr == '\0' )
-                  break;
-
-              else if( vptr[0] == '\\' && vptr[1] == 'n' )
-              {
-                  cdata[out_char++] = '\n';
-                  vptr += 2;
-              }
-              else if( vptr[0] == '\\' && vptr[1] == '\\' )
-              {
-                  cdata[out_char++] = '\\';
-                  vptr += 2;
-              }
-              else
-                  cdata[out_char++] = *(vptr++);
-          }
-
-          if( out_char < count-1 ) return StringError(message);
-          if( *vptr != '"' ) return StringError(message);
-
-          cdata[count-1] = '\0';
-          GTIFKeySet(gt,key,ktype,count,cdata);
-
-          _GTIFFree( cdata );
-      }
-      break;
-        
-      case TYPE_DOUBLE: 
-        outcount = count;
-        for (dptr = data; count > 0; count-= vals_now)
-        {
-            vals_now = count > 3? 3: count;
-            for (i=0; i<vals_now; i++,dptr++)
-            {
-                if (!sscanf(vptr,"%lg" ,dptr))
-                    StringError(vptr);
-                FINDCHAR(vptr,' ');
-                SKIPWHITE(vptr);
-            }
-            if (vals_now<count)
-            {
-                scan(message,aux);
-                vptr = message;
-            }
-        }
-        if (outcount==1)
-            GTIFKeySet(gt,key,ktype,outcount,data[0]);
-        else
-            GTIFKeySet(gt,key,ktype,outcount,data);
-        break;
-        
-      case TYPE_SHORT: 
-        if (count==1)
-        {
-            icode = GTIFValueCode(key,vptr);
-            if (icode < 0) return StringError(vptr);
-            code = icode;
-            GTIFKeySet(gt,key,ktype,count,code);
-        }
-        else  /* multi-valued short - no such thing yet */
-        {
-            sptr = (short *)data;
-            outcount = count;
-            for (; count > 0; count-= vals_now)
-            {
-                vals_now = count > 3? 3: count;
-                for (i=0; i<vals_now; i++,sptr++)
-                {
-                    int		work_int;
-
-                    /* note: FMT_SHORT (%11hd) not supported on IRIX */
-                    sscanf(message,"%11d",&work_int);
-                    *sptr = work_int;
-                    scan(message,aux);
-                }
-                if (vals_now<count)
-                {
-                    scan(message,aux);
-                    vptr = message;
-                }
-            }
-            GTIFKeySet(gt,key,ktype,outcount,sptr);			
-        }
-        break;
-        
-      default: 
-        return -1;
-    }
-    return 1;
-}
-
-
-static void DefaultRead(char *string, void *aux)
-{
-	/* Pretty boring */
-	fscanf((FILE *)aux,"%[^\n]\n",string);
-}
-
diff --git a/src/tiff/geo_set.c b/src/tiff/geo_set.c
deleted file mode 100644
index 61cb3d4..0000000
--- a/src/tiff/geo_set.c
+++ /dev/null
@@ -1,259 +0,0 @@
-/**********************************************************************
- *
- *  geo_set.c  -- Public routines for GEOTIFF GeoKey access.
- *
- *    Written By: Niles D. Ritter.
- *
- *  copyright (c) 1995   Niles D. Ritter
- *
- *  Permission granted to use this software, so long as this copyright
- *  notice accompanies any products derived therefrom.
- *
- * $Log: geo_set.c,v $
- * Revision 1.2  2004/03/19 11:51:24  lubia
- * Atualizada as bibliotecas Tif e GeoTif
- *
- * Revision 1.9  2003/01/15 03:37:19  warmerda
- * avoid warning
- *
- * Revision 1.8  2002/09/27 13:05:33  warmerda
- * allow dynamic set/delete of ASCII tags. ASCIIPARAMS now kept split
- *
- * Revision 1.7  2001/05/02 16:48:22  warmerda
- * fixed a couple bugs in delete code
- *
- * Revision 1.6  2001/05/02 13:54:34  warmerda
- * updated geo_set.c to support deleting tags
- *
- * Revision 1.5  1999/05/04 03:09:33  warmerda
- * avoid warnings
- *
- * Revision 1.4  1999/05/03 17:50:31  warmerda
- * avoid warnings on IRIX
- *
- * Revision 1.3  1999/04/28 19:59:38  warmerda
- * added some doxygen style documentation
- *
- * Revision 1.2  1999/03/11 17:39:38  geotiff
- * Added fix for case where a key is being overwritten.
- *
- **********************************************************************/
-
-#include "geotiff.h"   /* public interface        */
-#include "geo_tiffp.h" /* external TIFF interface */
-#include "geo_keyp.h"  /* private interface       */
-
-#include <assert.h>
-
-/**
-This function writes a geokey_t value to a GeoTIFF file.
-
- at param gtif The geotiff information handle from GTIFNew().
-
- at param keyID The geokey_t name (such as ProjectedCSTypeGeoKey).
-This must come from the list of legal geokey_t values
-(an enumeration) listed below.
-
- at param val The <b>val</b> argument is a pointer to the
-variable into which the value should be read.  The type of the variable
-varies depending on the geokey_t given.  While there is no ready mapping
-of geokey_t values onto types, in general code values are of type <i>short</i>,
-citations are strings, and everything else is of type <i>double</i>.  Note
-that pointer's to <i>int</i> should never be passed to GTIFKeyGet() for
-integer values as they will be shorts, and the int's may not be properly
-initialized (and will be grossly wrong on MSB systems).
-
- at param index Indicates how far into the list of values
-for this geokey to offset. Should normally be zero.
-
- at param count Indicates how many values
-to read.  At this time all keys except for strings have only one value,
-so <b>index</b> should be zero, and <b>count</b> should be one.<p>
-
-The <b>key</b> indicates the key name to be written to the
-file and should from the geokey_t enumeration 
-(eg. <tt>ProjectedCSTypeGeoKey</tt>).  The full list of possible geokey_t
-values can be found in geokeys.inc, or in the online documentation for
-GTIFKeyGet().<p>
-
-The <b>type</b> should be one of TYPE_SHORT, TYPE_ASCII, or TYPE_DOUBLE and
-will indicate the type of value being passed at the end of the argument
-list (the key value).  The <b>count</b> should be one except for strings
-when it should be the length of the string (or zero to for this to be
-computed internally).  As a special case a <b>count</b> of -1 can be
-used to request an existing key be deleted, in which no value is passed.<p>
-
-The actual value is passed at the end of the argument list, and should be
-a short, a double, or a char * value.  Note that short and double values
-are passed as is, not as pointers.<p>
-
-Note that key values aren't actually flushed to the file until
-GTIFWriteKeys() is called.  Till then 
-the new values are just kept with the GTIF structure.<p>
-
-<b>Example:</b><p>
-
-<pre>
-    GTIFKeySet(gtif, GTRasterTypeGeoKey, TYPE_SHORT, 1, 
-               RasterPixelIsArea);
-    GTIFKeySet(gtif, GTCitationGeoKey, TYPE_ASCII, 0, 
-               "UTM 11 North / NAD27" );
-</pre>
-
- */
-
-int GTIFKeySet(GTIF *gtif, geokey_t keyID, tagtype_t type, int count,...)
-{
-    va_list ap;
-    int index = gtif->gt_keyindex[ keyID ];
-    int newvalues = 0;
-    GeoKey *key;
-    char *data = NULL;
-    char *val;
-    pinfo_t sval;
-    double dval;
-
-    va_start(ap, count);
-    /* pass singleton keys by value */
-    if (count>1 && type!=TYPE_ASCII) 
-    {
-        val = va_arg(ap, char*);
-    }
-    else if( count == -1 )
-    {
-        /* delete the indicated tag */
-        va_end(ap);
-
-        if( index < 1 )
-            return 0;
-
-        if (gtif->gt_keys[index].gk_type == TYPE_ASCII)
-        {
-            _GTIFFree (gtif->gt_keys[index].gk_data);
-        }
-
-        while( index < gtif->gt_num_keys )
-        {
-            _GTIFmemcpy( gtif->gt_keys + index, 
-                         gtif->gt_keys + index + 1, 
-                         sizeof(GeoKey) );
-            gtif->gt_keyindex[gtif->gt_keys[index].gk_key] = index;
-            index++;
-        }
-
-        gtif->gt_num_keys--;
-        gtif->gt_nshorts -= sizeof(KeyEntry)/sizeof(pinfo_t);
-        gtif->gt_keyindex[keyID] = 0;
-        gtif->gt_flags |= FLAG_FILE_MODIFIED;
-
-        return 1;
-    }
-    else switch (type)
-    {
-        case TYPE_SHORT:  sval=va_arg(ap, int); val=(char *)&sval;     break;
-        case TYPE_DOUBLE: dval=va_arg(ap, dblparam_t); val=(char *)&dval;  break;
-        case TYPE_ASCII: 
-            val=va_arg(ap, char*);
-            count = strlen(val) + 1; /* force = string length */
-            break;
-        default:
-            assert( FALSE );
-            break;
-    }
-    va_end(ap);
-    
-    /* We assume here that there are no multi-valued SHORTS ! */
-    if (index)
-    {
-        /* Key already exists */
-        key = gtif->gt_keys+index;
-        if (type!=key->gk_type || count > key->gk_count)
-        {
-            /* need to reset data pointer */
-            key->gk_type = type;
-            key->gk_count = count;
-            key->gk_size = _gtiff_size[ type ];
-            newvalues = 1;
-        }
-    }
-    else
-    {
-        /* We need to create the key */
-        if (gtif->gt_num_keys == MAX_KEYS) return 0;
-        key = gtif->gt_keys + ++gtif->gt_num_keys;
-        index = gtif->gt_num_keys;
-        gtif->gt_keyindex[ keyID ] = index;
-        key->gk_key = keyID;
-        key->gk_type = type;
-        key->gk_count = count;
-        key->gk_size = _gtiff_size[ type ];
-        if (gtif->gt_keymin > keyID)  gtif->gt_keymin=keyID;
-        if (gtif->gt_keymax < keyID)  gtif->gt_keymax=keyID;
-        newvalues = 1;
-    }
-
-    if (newvalues)
-    {
-        switch (type)
-        {
-        case TYPE_SHORT:  
-            if (count > 1) return 0;
-            data = (char *)&key->gk_data; /* store value *in* data */
-            break;
-        case TYPE_DOUBLE:
-            key->gk_data = (char *)(gtif->gt_double + gtif->gt_ndoubles);
-            data = key->gk_data;
-            gtif->gt_ndoubles += count;
-            break;
-        case TYPE_ASCII:
-            break;
-        default:
-            va_end(ap);
-            return 0;
-        }
-        gtif->gt_nshorts += sizeof(KeyEntry)/sizeof(pinfo_t);
-    }
-
-        /* this fixes a bug where if a request is made to write a duplicate
-           key, we must initialize the data to a valid value.
-           Bryan Wells (bryan at athena.bangor.autometric.com) */
-        
-        else /* no new values, but still have something to write */
-        {
-            switch (type)
-            {
-            case TYPE_SHORT:  
-                if (count > 1) return 0;
-                data = (char *)&key->gk_data; /* store value *in* data */
-                break;
-            case TYPE_DOUBLE:
-                data = key->gk_data;
-                break;
-            case TYPE_ASCII:
-                break;
-            default:
-                return 0;
-            }
-        }
-        
-    switch (type)
-    {
-    case TYPE_ASCII:
-        /* throw away existing data and allocate room for new data */
-        if (key->gk_data != 0)
-        {
-            _GTIFFree(key->gk_data);
-        }
-        key->gk_data = (char *)_GTIFcalloc(count);
-        key->gk_count = count;
-        data = key->gk_data;
-        break;
-    default:
-        break;
-    }
-
-    _GTIFmemcpy(data, val, count*key->gk_size);
-    
-    gtif->gt_flags |= FLAG_FILE_MODIFIED;
-    return 1;
-}
diff --git a/src/tiff/geo_tiffp.c b/src/tiff/geo_tiffp.c
deleted file mode 100644
index 895486d..0000000
--- a/src/tiff/geo_tiffp.c
+++ /dev/null
@@ -1,140 +0,0 @@
-/**********************************************************************
- *
- *  geo_tiffp.c  Private TIFF interface module for GEOTIFF
- *
- *    This module implements the interface between the GEOTIFF
- *    tag parser and the TIFF i/o module. The current setup
- *    relies on the "libtiff" code, but if you use your own
- *    TIFF reader software, you may replace the module implementations
- *    here with your own calls. No "libtiff" dependencies occur
- *    anywhere else in this code.
- *
- **********************************************************************/
- 
-#include "geotiff.h"    /* public GTIFF interface */
-
-#include "geo_tiffp.h"  /* Private TIFF interface */
-#include "geo_keyp.h"   /* Private GTIFF interface */
-
-/* tiff size array global */
-gsize_t _gtiff_size[] = { 0, 1, 2, 4, 8, 1, 4, 8, 1, 2, 4, 1 };
-
-static int        _GTIFGetField (tiff_t *tif, pinfo_t tag, int *count, void *value );
-static int        _GTIFSetField (tiff_t *tif, pinfo_t tag, int  count, void *value );
-static tagtype_t  _GTIFTagType  (tiff_t *tif, pinfo_t tag);
-
-/*
- * Set up default TIFF handlers. 
- */
-void _GTIFSetDefaultTIFF(TIFFMethod *method)
-{
-	if (!method) return;
-	
-	method->get = _GTIFGetField;
-	method->set = _GTIFSetField;
-	method->type = _GTIFTagType;
-}
-
-gdata_t _GTIFcalloc(gsize_t size)
-{
-    gdata_t data=(gdata_t)_TIFFmalloc((tsize_t)size);
-	if (data) _TIFFmemset((tdata_t)data,0,(tsize_t)size);
-	return data;
-}
-
-gdata_t _GTIFrealloc(gdata_t ptr, gsize_t size)
-{
-    return( _TIFFrealloc((tdata_t)ptr, (tsize_t) size) );
-}
-
-void _GTIFmemcpy(gdata_t out,gdata_t in,gsize_t size)
-{
-	_TIFFmemcpy((tdata_t)out,(tdata_t)in,(tsize_t)size);
-}
-
-void _GTIFFree(gdata_t data)
-{
-	if (data) _TIFFfree((tdata_t)data);
-}
-
-
-
-/* returns the value of TIFF tag <tag>, or if
- * the value is an array, returns an allocated buffer
- * containing the values. Allocate a copy of the actual
- * buffer, sized up for updating.
- */
-static int _GTIFGetField (tiff_t *tif, pinfo_t tag, int *count, void *val )
-{
-	int status;
-	unsigned short scount=0;
-	char *tmp;
-	char *value;
-	gsize_t size = _gtiff_size[_GTIFTagType (tif,tag)];
-	
-	if (_GTIFTagType(tif,  tag) == TYPE_ASCII)
-	{
-		status = TIFFGetField((TIFF *)tif,tag,&tmp);
-		if (!status) return status;
-		scount = strlen(tmp)+1;
-	}
-	else status = TIFFGetField((TIFF *)tif,tag,&scount,&tmp);
-	if (!status) return status;
-	
-	*count = scount;
-
-	value = (char *)_GTIFcalloc( (scount+MAX_VALUES)*size);
-	if (!value) return 0;
-	
-	_TIFFmemcpy( value, tmp,  size * scount);
-	
-	*(char **)val = value;
-	return status;
-}
-
-/* 
- * Set a GeoTIFF TIFF field.
- */
-static int _GTIFSetField (tiff_t *tif, pinfo_t tag, int count, void *value )
-{
-	int status;
-	unsigned short scount = count;
-
-	/* libtiff ASCII uses null-delimiter */
-	if (_GTIFTagType(tif,  tag) == TYPE_ASCII)
-		status = TIFFSetField((TIFF *)tif,tag,value);
-	else 
-		status = TIFFSetField((TIFF *)tif,tag,scount,value);
-	return status;
-}
-
-
-/*
- *  This routine is supposed to return the TagType of the <tag>
- *  TIFF tag. Unfortunately, "libtiff" does not provide this
- *  service by default, so we just have to "know" what type of tags
- *  we've got, and how many. We only define the ones Geotiff
- *  uses here, and others return UNKNOWN. The "tif" parameter
- *  is provided for those TIFF implementations that provide
- *  for tag-type queries.
- */
-static tagtype_t  _GTIFTagType  (tiff_t *tif, pinfo_t tag)
-{
-	tagtype_t ttype;
-
-	(void) tif; /* dummy reference */
-	
-	switch (tag)
-	{
-		case GTIFF_ASCIIPARAMS:    ttype=TYPE_ASCII; break;
-		case GTIFF_PIXELSCALE:
-		case GTIFF_TRANSMATRIX:
-		case GTIFF_TIEPOINTS:
-		case GTIFF_DOUBLEPARAMS:   ttype=TYPE_DOUBLE; break;
-		case GTIFF_GEOKEYDIRECTORY: ttype=TYPE_SHORT; break;
-		default: ttype = TYPE_UNKNOWN;
-	}
-	
-	return ttype;
-}
-
diff --git a/src/tiff/geo_tiffp.h b/src/tiff/geo_tiffp.h
deleted file mode 100644
index 4cf2ec8..0000000
--- a/src/tiff/geo_tiffp.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/**********************************************************************
- *
- *  geo_tiffp.h - Private interface for TIFF tag parsing.
- *
- *   Written by: Niles D. Ritter
- *
- *   This interface file encapsulates the interface to external TIFF
- *   file-io routines and definitions. The current configuration
- *   assumes that the "libtiff" module is used, but if you have your
- *   own TIFF reader, you may replace the definitions with your own
- *   here, and replace the implementations in geo_tiffp.c. No other
- *   modules have any explicit dependence on external TIFF modules.
- *
- *  Revision History;
- *
- *    20 June, 1995      Niles D. Ritter         New
- *    6 July,  1995      Niles D. Ritter         Fix prototypes
- *
- **********************************************************************/
-
-#ifndef __geo_tiffp_h_
-#define __geo_tiffp_h_
-
-/**********************************************************************
- *
- *                        Private includes
- *
- *   If you are not using libtiff and XTIFF, replace this include file
- *    with the appropriate one for your own TIFF parsing routines.
- *
- *   Revision History
- * 
- *      19 September 1995   ndr    Demoted Intergraph trans matrix.
- *
- **********************************************************************/
-
-#include "geotiff.h"
-#include "xtiffio.h"
-
-/*
- * dblparam_t is the type that a double precision
- * floating point value will have on the parameter
- * stack (when coerced by the compiler). You shouldn't
- * have to change this.
- */
-#ifdef applec
-typedef extended dblparam_t;
-#else
-typedef double dblparam_t;
-#endif
-
-
-/**********************************************************************
- *
- *                        Private defines
- *
- *   If you are not using "libtiff"/LIBXTIFF, replace these definitions
- *   with the appropriate definitions to access the geo-tags
- *
- **********************************************************************/
- 
-typedef unsigned short pinfo_t;    /* SHORT ProjectionInfo tag type */
-typedef TIFF    tiff_t;            /* TIFF file descriptor          */
-typedef tdata_t  gdata_t;          /* pointer to data */
-typedef tsize_t  gsize_t;          /* data allocation size */
- 
-#define GTIFF_GEOKEYDIRECTORY   TIFFTAG_GEOKEYDIRECTORY /* from xtiffio.h */
-#define GTIFF_DOUBLEPARAMS      TIFFTAG_GEODOUBLEPARAMS
-#define GTIFF_ASCIIPARAMS       TIFFTAG_GEOASCIIPARAMS
-#define GTIFF_PIXELSCALE        TIFFTAG_GEOPIXELSCALE
-#define GTIFF_TRANSMATRIX       TIFFTAG_GEOTRANSMATRIX
-#define GTIFF_INTERGRAPH_MATRIX TIFFTAG_INTERGRAPH_MATRIX
-#define GTIFF_TIEPOINTS         TIFFTAG_GEOTIEPOINTS
-#define GTIFF_LOCAL          0
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-/*
- * Method function pointer types
- */
-typedef int        (*GTGetFunction) (tiff_t *tif, pinfo_t tag, int *count, void *value );
-typedef int        (*GTSetFunction) (tiff_t *tif, pinfo_t tag, int  count, void *value );
-typedef tagtype_t  (*GTTypeFunction) (tiff_t *tif, pinfo_t tag);
-typedef struct     _TIFFMethod {
-	GTGetFunction get;
-	GTSetFunction set;
-	GTTypeFunction type;
-} TIFFMethod;
-
-/**********************************************************************
- *
- *               Protected Function Declarations  
- *
- *   These routines are exposed implementations, and should not
- *   be used by external GEOTIFF client programs.
- *
- **********************************************************************/
-
-extern gsize_t _gtiff_size[]; /* TIFF data sizes */
-extern void _GTIFSetDefaultTIFF(TIFFMethod *method);
-extern gdata_t _GTIFcalloc(gsize_t);
-extern gdata_t _GTIFrealloc(gdata_t,gsize_t);
-extern void _GTIFFree(gdata_t data);
-extern void _GTIFmemcpy(gdata_t out,gdata_t in,gsize_t size);
-
-#if defined(__cplusplus)
-} 
-#endif
-
-
-#endif /* __geo_tiffp_h_ */
diff --git a/src/tiff/geo_trans.c b/src/tiff/geo_trans.c
deleted file mode 100644
index 3d5b6eb..0000000
--- a/src/tiff/geo_trans.c
+++ /dev/null
@@ -1,326 +0,0 @@
-/******************************************************************************
- * $Id: geo_trans.c,v 1.3 2004/03/19 11:51:24 lubia Exp $
- *
- * Project:  libgeotiff
- * Purpose:  Code to abstract translation between pixel/line and PCS
- *           coordinates.
- * Author:   Frank Warmerdam, warmerda at home.com
- *
- ******************************************************************************
- * Copyright (c) 1999, Frank Warmerdam
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- ******************************************************************************
- *
- * $Log: geo_trans.c,v $
- * Revision 1.3  2004/03/19 11:51:24  lubia
- * Atualizada as bibliotecas Tif e GeoTif
- *
- * Revision 1.9  2001/11/28 14:20:30  warmerda
- * fixed transform memory leak in GTIFPCSToImage
- *
- * Revision 1.8  2001/04/06 16:56:22  warmerda
- * added support for PCSToImage with matrix
- *
- * Revision 1.7  2001/03/05 03:25:23  warmerda
- * restructure cleanup, and apply to GTIFPCSToImage()
- *
- * Revision 1.6  2001/03/04 22:37:39  warmerda
- * fixed memory leak for fields fetched with gt_methods.get - Alan Gray
- *
- * Revision 1.5  2000/08/22 03:32:46  warmerda
- * removed GTIFTiepointTranslate code
- *
- * Revision 1.4  1999/09/17 01:19:51  warmerda
- * Fixed bug in use of transform matrix.
- *
- * Revision 1.3  1999/09/16 21:25:40  warmerda
- * Added tiepoint, and transformation matrix based translation.  Note
- * that we don't try to invert the transformation matrix for
- * GTIFPCSToImage().
- *
- * Revision 1.2  1999/09/07 20:00:40  warmerda
- * Fixed count/tiepoint_count bug in GTIFPCSToImage().
- *
- * Revision 1.1  1999/05/04 03:07:57  warmerda
- * New
- *
- */
- 
-#include "geotiff.h"
-#include "geo_tiffp.h" /* external TIFF interface */
-#include "geo_keyp.h"  /* private interface       */
-#include "geokeys.h"
-
-/************************************************************************/
-/*                          inv_geotransform()                          */
-/*                                                                      */
-/*      Invert a 6 term geotransform style matrix.                      */
-/************************************************************************/
-
-static int inv_geotransform( double *gt_in, double *gt_out )
-
-{
-    double	det, inv_det;
-
-    /* we assume a 3rd row that is [0 0 1] */
-
-    /* Compute determinate */
-
-    det = gt_in[0] * gt_in[4] - gt_in[1] * gt_in[3];
-
-    if( fabs(det) < 0.000000000000001 )
-        return 0;
-
-    inv_det = 1.0 / det;
-
-    /* compute adjoint, and devide by determinate */
-
-    gt_out[0] =  gt_in[4] * inv_det;
-    gt_out[3] = -gt_in[3] * inv_det;
-
-    gt_out[1] = -gt_in[1] * inv_det;
-    gt_out[4] =  gt_in[0] * inv_det;
-
-    gt_out[2] = ( gt_in[1] * gt_in[5] - gt_in[2] * gt_in[4]) * inv_det;
-    gt_out[5] = (-gt_in[0] * gt_in[5] + gt_in[2] * gt_in[3]) * inv_det;
-
-    return 1;
-}
-
-/************************************************************************/
-/*                       GTIFTiepointTranslate()                        */
-/************************************************************************/
-
-int GTIFTiepointTranslate( int gcp_count, double * gcps_in, double * gcps_out,
-                           double x_in, double y_in,
-                           double *x_out, double *y_out )
-
-{
-    /* I would appreciate a _brief_ block of code for doing second order
-       polynomial regression here! */
-    return FALSE;
-}
-
-
-/************************************************************************/
-/*                           GTIFImageToPCS()                           */
-/************************************************************************/
-
-/**
- * Translate a pixel/line coordinate to projection coordinates.
- *
- * At this time this function does not support image to PCS translations for
- * tiepoints-only definitions,  only pixelscale and transformation matrix
- * formulations.
- *
- * @param gtif The handle from GTIFNew() indicating the target file.
- * @param x A pointer to the double containing the pixel offset on input,
- * and into which the easting/longitude will be put on completion.
- * @param y A pointer to the double containing the line offset on input,
- * and into which the northing/latitude will be put on completion.
- *
- * @return TRUE if the transformation succeeds, or FALSE if it fails.  It may
- * fail if the file doesn't have properly setup transformation information,
- * or it is in a form unsupported by this function.
- */
-
-int GTIFImageToPCS( GTIF *gtif, double *x, double *y )
-
-{
-    int     res = FALSE;
-    int     tiepoint_count, count, transform_count;
-    tiff_t *tif=gtif->gt_tif;
-    double *tiepoints   = 0;
-    double *pixel_scale = 0;
-    double *transform   = 0;
-
-
-    if (!(gtif->gt_methods.get)(tif, GTIFF_TIEPOINTS,
-                              &tiepoint_count, &tiepoints ))
-        tiepoint_count = 0;
-
-    if (!(gtif->gt_methods.get)(tif, GTIFF_PIXELSCALE, &count, &pixel_scale ))
-        count = 0;
-
-    if (!(gtif->gt_methods.get)(tif, GTIFF_TRANSMATRIX,
-                                &transform_count, &transform ))
-        transform_count = 0;
-
-/* -------------------------------------------------------------------- */
-/*      If the pixelscale count is zero, but we have tiepoints use      */
-/*      the tiepoint based approach.                                    */
-/* -------------------------------------------------------------------- */
-    if( tiepoint_count > 6 && count == 0 ) 
-    {
-        res = GTIFTiepointTranslate( tiepoint_count / 6,
-                                     tiepoints, tiepoints + 3,
-                                     *x, *y, x, y );
-    }
-
-/* -------------------------------------------------------------------- */
-/*	If we have a transformation matrix, use it. 			*/
-/* -------------------------------------------------------------------- */
-    else if( transform_count == 16 ) 
-    {
-        double x_in = *x, y_in = *y;
-
-        *x = x_in * transform[0] + y_in * transform[1] + transform[3];
-        *y = x_in * transform[4] + y_in * transform[5] + transform[7];
-        
-        res = TRUE;
-    } 
-
-/* -------------------------------------------------------------------- */
-/*      For now we require one tie point, and a valid pixel scale.      */
-/* -------------------------------------------------------------------- */
-    else if( count < 3 || tiepoint_count < 6 ) 
-    {
-        res = FALSE;
-    } 
-
-    else 
-    {
-        *x = (*x - tiepoints[0]) * pixel_scale[0] + tiepoints[3];
-        *y = (*y - tiepoints[1]) * (-1 * pixel_scale[1]) + tiepoints[4];
-
-        res = TRUE;
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Cleanup                                                         */
-/* -------------------------------------------------------------------- */
-    if(tiepoints)   
-        _GTIFFree(tiepoints);
-    if(pixel_scale)
-        _GTIFFree(pixel_scale);
-    if(transform)  
-        _GTIFFree(transform);
-
-    return res;
-}
-
-/************************************************************************/
-/*                           GTIFPCSToImage()                           */
-/************************************************************************/
-
-/**
- * Translate a projection coordinate to pixel/line coordinates.
- *
- * At this time this function does not support PCS to image translations for
- * tiepoints-only based definitions, only matrix and pixelscale/tiepoints 
- * formulations are supposed.
- *
- * @param gtif The handle from GTIFNew() indicating the target file.
- * @param x A pointer to the double containing the pixel offset on input,
- * and into which the easting/longitude will be put on completion.
- * @param y A pointer to the double containing the line offset on input,
- * and into which the northing/latitude will be put on completion.
- *
- * @return TRUE if the transformation succeeds, or FALSE if it fails.  It may
- * fail if the file doesn't have properly setup transformation information,
- * or it is in a form unsupported by this function.
- */
-
-int GTIFPCSToImage( GTIF *gtif, double *x, double *y )
-
-{
-    double 	*tiepoints = NULL;
-    int 	tiepoint_count, count, transform_count = 0;
-    double	*pixel_scale = NULL;
-    double 	*transform   = NULL;
-    tiff_t 	*tif=gtif->gt_tif;
-    int		result = FALSE;
-
-/* -------------------------------------------------------------------- */
-/*      Fetch tiepoints and pixel scale.                                */
-/* -------------------------------------------------------------------- */
-    if (!(gtif->gt_methods.get)(tif, GTIFF_TIEPOINTS,
-                              &tiepoint_count, &tiepoints ))
-        tiepoint_count = 0;
-
-    if (!(gtif->gt_methods.get)(tif, GTIFF_PIXELSCALE, &count, &pixel_scale ))
-        count = 0;
-
-    if (!(gtif->gt_methods.get)(tif, GTIFF_TRANSMATRIX,
-                                &transform_count, &transform ))
-        transform_count = 0;
-
-/* -------------------------------------------------------------------- */
-/*      If the pixelscale count is zero, but we have tiepoints use      */
-/*      the tiepoint based approach.                                    */
-/* -------------------------------------------------------------------- */
-    if( tiepoint_count > 6 && count == 0 )
-    {
-        result = GTIFTiepointTranslate( tiepoint_count / 6,
-                                        tiepoints + 3, tiepoints,
-                                        *x, *y, x, y );
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Handle matrix - convert to "geotransform" format, invert and    */
-/*      apply.                                                          */
-/* -------------------------------------------------------------------- */
-    else if( transform_count == 16 )
-    {
-        double  x_in = *x, y_in = *y;
-        double	gt_in[6], gt_out[6];
-        
-        gt_in[0] = transform[0];
-        gt_in[1] = transform[1];
-        gt_in[2] = transform[3];
-        gt_in[3] = transform[4];
-        gt_in[4] = transform[5];
-        gt_in[5] = transform[7];
-
-        if( !inv_geotransform( gt_in, gt_out ) )
-            result = FALSE;
-        else
-        {
-            *x = x_in * gt_out[0] + y_in * gt_out[1] + gt_out[2];
-            *y = x_in * gt_out[3] + y_in * gt_out[4] + gt_out[5];
-            
-            result = TRUE;
-        }
-    }
-
-/* -------------------------------------------------------------------- */
-/*      For now we require one tie point, and a valid pixel scale.      */
-/* -------------------------------------------------------------------- */
-    else if( count >= 3 && tiepoint_count >= 6 )
-    {
-        *x = (*x - tiepoints[3]) / pixel_scale[0] + tiepoints[0];
-        *y = (*y - tiepoints[4]) / (-1 * pixel_scale[1]) + tiepoints[1];
-
-        result = TRUE;
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Cleanup.                                                        */
-/* -------------------------------------------------------------------- */
-    if(tiepoints)   
-        _GTIFFree(tiepoints);
-    if(pixel_scale)
-        _GTIFFree(pixel_scale);
-    if(transform)  
-        _GTIFFree(transform);
-
-    return result;
-}
-
diff --git a/src/tiff/geo_write.c b/src/tiff/geo_write.c
deleted file mode 100644
index 4eedda2..0000000
--- a/src/tiff/geo_write.c
+++ /dev/null
@@ -1,190 +0,0 @@
-/**********************************************************************
- *
- *  geo_write.c  -- Public routines for GEOTIFF GeoKey access.
- *
- *    Written By: Niles D. Ritter.
- *
- *  copyright (c) 1995   Niles D. Ritter
- *
- *  Permission granted to use this software, so long as this copyright
- *  notice accompanies any source code derived therefrom.
- *
- **********************************************************************/
-
-#include "geotiffio.h"   /* public interface        */
-#include "geo_tiffp.h" /* external TIFF interface */
-#include "geo_keyp.h"  /* private interface       */
-
-static int WriteKey(GTIF* gt, TempKeyData* tempData,
-                    KeyEntry* entptr, GeoKey* keyptr);
-static int SortKeys(GTIF* gt,int *sortkeys);
-
-
-/**
-This function flushes all the GeoTIFF keys that have been set with the 
-GTIFKeySet() function into the associated 
-TIFF file.
-
- at param gt The GeoTIFF handle returned by GTIFNew.
-
-GTIFKeySet() should be called before 
-GTIFFree() is used to deallocate a GeoTIFF access handle.
- */
-
-int GTIFWriteKeys(GTIF *gt)
-{
-    int i;
-    GeoKey *keyptr;
-    KeyEntry *entptr;
-    KeyHeader *header;
-    TempKeyData tempData;
-    int sortkeys[MAX_KEYS];
-	
-    if (!(gt->gt_flags & FLAG_FILE_MODIFIED)) return 1;
-	
-    tempData.tk_asciiParams = 0;
-    tempData.tk_asciiParamsLength = 0;
-    tempData.tk_asciiParamsOffset = 0;
-
-    /*  Sort the Keys into numerical order */
-    if (!SortKeys(gt,sortkeys))
-    {
-        /* XXX error: a key was not recognized */
-    }
-	
-    /* Set up header of ProjectionInfo tag */
-    header = (KeyHeader *)gt->gt_short;
-    header->hdr_num_keys = gt->gt_num_keys;
-    header->hdr_version  = GvCurrentVersion;
-    header->hdr_rev_major  = GvCurrentRevision;
-    header->hdr_rev_minor  = GvCurrentMinorRev;
-	
-    /* Sum up the ASCII tag lengths */
-    for (i = 0; i < gt->gt_num_keys; i++)
-    {
-        keyptr = gt->gt_keys + sortkeys[i];
-        if (keyptr->gk_type == TYPE_ASCII)
-        {
-            tempData.tk_asciiParamsLength += keyptr->gk_count;
-        }
-    }
-    if (tempData.tk_asciiParamsLength > 0)
-    {
-        tempData.tk_asciiParams =
-            (char *)_GTIFcalloc(tempData.tk_asciiParamsLength + 1);
-        tempData.tk_asciiParams[tempData.tk_asciiParamsLength] = '\0';
-    }
-
-    /* Set up the rest of SHORT array properly */
-    keyptr = gt->gt_keys;
-    entptr = (KeyEntry*)(gt->gt_short + 4);
-    for (i=0; i< gt->gt_num_keys; i++,entptr++)
-    {
-        if (!WriteKey(gt,&tempData,entptr,keyptr+sortkeys[i])) return 0;
-    }	
-	
-    /* Write out the Key Directory */
-    (gt->gt_methods.set)(gt->gt_tif, GTIFF_GEOKEYDIRECTORY, gt->gt_nshorts, gt->gt_short );	
-	
-    /* Write out the params directories */
-    if (gt->gt_ndoubles)
-        (gt->gt_methods.set)(gt->gt_tif, GTIFF_DOUBLEPARAMS, gt->gt_ndoubles, gt->gt_double );
-    if (tempData.tk_asciiParamsLength > 0)
-    {
-        /* just to be safe */
-        tempData.tk_asciiParams[tempData.tk_asciiParamsLength] = '\0';
-        (gt->gt_methods.set)(gt->gt_tif,
-                             GTIFF_ASCIIPARAMS, 0, tempData.tk_asciiParams);
-    }
-	
-    gt->gt_flags &= ~FLAG_FILE_MODIFIED;
-
-    if (tempData.tk_asciiParamsLength > 0)
-    {
-        _GTIFFree (tempData.tk_asciiParams);
-    }
-    return 1;
-}
-
-/**********************************************************************
- *
- *                        Private Routines
- *
- **********************************************************************/
- 
-/*
- * Given GeoKey, write out the KeyEntry entries, returning 0 if failure.
- *  This is the exact complement of ReadKey().
- */
-
-static int WriteKey(GTIF* gt, TempKeyData* tempData,
-                    KeyEntry* entptr, GeoKey* keyptr)
-{
-    int count;
-	
-    entptr->ent_key = keyptr->gk_key;
-    entptr->ent_count = keyptr->gk_count;
-    count = entptr->ent_count;
-	
-    if (count==1 && keyptr->gk_type==TYPE_SHORT)
-    {
-        entptr->ent_location = GTIFF_LOCAL;
-        entptr->ent_val_offset = *(pinfo_t*)&keyptr->gk_data;
-        return 1;
-    }
-		  
-    switch (keyptr->gk_type)
-    {
-      case TYPE_SHORT:
-        entptr->ent_location = GTIFF_GEOKEYDIRECTORY;
-        entptr->ent_val_offset = 
-            (pinfo_t*)keyptr->gk_data - gt->gt_short;
-        break;
-      case TYPE_DOUBLE:
-        entptr->ent_location = GTIFF_DOUBLEPARAMS;
-        entptr->ent_val_offset = 
-            (double*)keyptr->gk_data - gt->gt_double;
-        break;
-      case TYPE_ASCII:
-        entptr->ent_location = GTIFF_ASCIIPARAMS;
-        entptr->ent_val_offset = tempData->tk_asciiParamsOffset;
-        _GTIFmemcpy (tempData->tk_asciiParams + tempData->tk_asciiParamsOffset
-                     , keyptr->gk_data, keyptr->gk_count);
-        tempData->tk_asciiParams[tempData->tk_asciiParamsOffset+keyptr->gk_count-1] = '|';
-        tempData->tk_asciiParamsOffset += keyptr->gk_count;
-        break;
-      default:
-        return 0; /* failure */
-    }
-	
-    return 1; /* success */
-}
-
-
-/* 
- * Numerically sort the GeoKeys.
- * We just do a linear search through
- * the list and pull out the keys that were set.
- */
-
-static int SortKeys(GTIF* gt,int *sortkeys)
-{
-    int loc;
-    int nkeys=0;
-    geokey_t key,kmin,kmax;
-    int *index = gt->gt_keyindex;
-	
-    kmin = (geokey_t) gt->gt_keymin;
-    kmax = (geokey_t) gt->gt_keymax;
-    for (key=kmin; key<=kmax; key++)
-    {
-        if ( (loc=index[key]) != 0 )
-        {
-            sortkeys[nkeys] = loc;
-            nkeys++;
-        }
-    }
-	
-    return nkeys==gt->gt_num_keys;
-}
-
diff --git a/src/tiff/geokeys.h b/src/tiff/geokeys.h
deleted file mode 100644
index f3e47c1..0000000
--- a/src/tiff/geokeys.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/**********************************************************************
- *
- *  geokeys.h - Public registry for valid GEOTIFF GeoKeys.
- *
- *   Written By: Niles D. Ritter
- *
- *  Revision History:
- *
- *     Rev.#  Author  M/D/Y Date     Key Changes/Additions
- *     -----  ------  ----------  -------------------------------------
- *       0      ndr    06/10/95      Inital Beta Release
- *       1      ndr    09/18/95      Final 1.0 Release
- *
- **********************************************************************/
-
-#ifndef __geokeys_h_
-#define __geokeys_h_
-
-/* The GvCurrentRevision number should be incremented whenever a 
- * new set of Keys are defined or modified in "geokeys.inc", and comments 
- * added to the "Revision History" section above. If only code
- * _values_ are augmented, the "GvCurrentMinorRev" number should
- * be incremented instead (see "geovalues.h"). Whenever the 
- * GvCurrentRevision is incremented, the GvCurrentMinorRev should
- * be reset to zero.
- *
- *
- * The Section Numbers below refer to the GeoTIFF Spec sections
- * in which these values are documented.
- *
- */
-#define GvCurrentRevision  1  /* Final 1.0 Release */
-
-#ifdef ValuePair
-#  undef ValuePair
-#endif
-#define ValuePair(name,value)    name = value,
-
-typedef enum {
-   BaseGeoKey   =  1024,               /* First valid code */
-
-#  include "geokeys.inc"         /* geokey database */
-
-   ReservedEndGeoKey  =  32767,
-   
-   /* Key space available for Private or internal use */
-   PrivateBaseGeoKey = 32768,    /* Consistent with TIFF Private tags */
-   PrivateEndGeoKey  = 65535,    
-   
-   EndGeoKey = 65535             /* Largest Possible GeoKey ID */
-} geokey_t;
-
-
-#endif /* __geokeys_h_ */
diff --git a/src/tiff/geokeys.inc b/src/tiff/geokeys.inc
deleted file mode 100644
index 286c23c..0000000
--- a/src/tiff/geokeys.inc
+++ /dev/null
@@ -1,76 +0,0 @@
-/* GeoTIFF GeoKey Database */
-
-/* Note: Any changes/additions to this database require */
-/* a change in the revision value in geokeys.h          */
-
-/* C database for Geotiff include files.   */
-/* the macro ValuePair() must be defined   */
-/* by the enclosing include file           */
-
-/*  Revised 28 Sep 1995   NDR -- Added Rev. 1.0 aliases. */
-
-/* 6.2.1 GeoTIFF Configuration Keys */
-
-ValuePair(  GTModelTypeGeoKey,	1024) /* Section 6.3.1.1 Codes       */
-ValuePair(  GTRasterTypeGeoKey,	1025) /* Section 6.3.1.2 Codes       */
-ValuePair(  GTCitationGeoKey,	1026) /* documentation */
-
-/* 6.2.2 Geographic CS Parameter Keys */
-
-ValuePair(  GeographicTypeGeoKey,	2048) /* Section 6.3.2.1 Codes     */
-ValuePair(  GeogCitationGeoKey,	2049) /* documentation             */
-ValuePair(  GeogGeodeticDatumGeoKey,	2050) /* Section 6.3.2.2 Codes     */
-ValuePair(  GeogPrimeMeridianGeoKey,	2051) /* Section 6.3.2.4 codes     */
-ValuePair(  GeogLinearUnitsGeoKey,	2052) /* Section 6.3.1.3 Codes     */
-ValuePair(  GeogLinearUnitSizeGeoKey,	2053) /* meters                    */
-ValuePair(  GeogAngularUnitsGeoKey,	2054) /* Section 6.3.1.4 Codes     */
-ValuePair(  GeogAngularUnitSizeGeoKey,	2055) /* radians                   */
-ValuePair(  GeogEllipsoidGeoKey,	2056) /* Section 6.3.2.3 Codes     */
-ValuePair(  GeogSemiMajorAxisGeoKey,	2057) /* GeogLinearUnits           */
-ValuePair(  GeogSemiMinorAxisGeoKey,	2058) /* GeogLinearUnits           */
-ValuePair(  GeogInvFlatteningGeoKey,	2059) /* ratio                     */
-ValuePair(  GeogAzimuthUnitsGeoKey,	2060) /* Section 6.3.1.4 Codes     */
-ValuePair(  GeogPrimeMeridianLongGeoKey,	2061) /* GeoAngularUnit            */
-
-/* 6.2.3 Projected CS Parameter Keys */
-/*    Several keys have been renamed,*/
-/*    and the deprecated names aliased for backward compatibility */
-
-ValuePair(  ProjectedCSTypeGeoKey,	3072)     /* Section 6.3.3.1 codes   */
-ValuePair(  PCSCitationGeoKey,	3073)     /* documentation           */
-ValuePair(  ProjectionGeoKey,	3074)     /* Section 6.3.3.2 codes   */
-ValuePair(  ProjCoordTransGeoKey,	3075)     /* Section 6.3.3.3 codes   */
-ValuePair(  ProjLinearUnitsGeoKey,	3076)     /* Section 6.3.1.3 codes   */
-ValuePair(  ProjLinearUnitSizeGeoKey,	3077)     /* meters                  */
-ValuePair(  ProjStdParallel1GeoKey,	3078)     /* GeogAngularUnit */
-ValuePair(  ProjStdParallelGeoKey,ProjStdParallel1GeoKey) /* ** alias **   */
-ValuePair(  ProjStdParallel2GeoKey,	3079)     /* GeogAngularUnit */
-ValuePair(  ProjNatOriginLongGeoKey,	3080)     /* GeogAngularUnit */
-ValuePair(  ProjOriginLongGeoKey,ProjNatOriginLongGeoKey) /* ** alias **     */
-ValuePair(  ProjNatOriginLatGeoKey,	3081)     /* GeogAngularUnit */
-ValuePair(  ProjOriginLatGeoKey,ProjNatOriginLatGeoKey)   /* ** alias **     */
-ValuePair(  ProjFalseEastingGeoKey,	3082)     /* ProjLinearUnits */
-ValuePair(  ProjFalseNorthingGeoKey,	3083)     /* ProjLinearUnits */
-ValuePair(  ProjFalseOriginLongGeoKey,	3084)     /* GeogAngularUnit */
-ValuePair(  ProjFalseOriginLatGeoKey,	3085)     /* GeogAngularUnit */
-ValuePair(  ProjFalseOriginEastingGeoKey,	3086)     /* ProjLinearUnits */
-ValuePair(  ProjFalseOriginNorthingGeoKey,	3087)     /* ProjLinearUnits */
-ValuePair(  ProjCenterLongGeoKey,	3088)     /* GeogAngularUnit */
-ValuePair(  ProjCenterLatGeoKey,	3089)     /* GeogAngularUnit */
-ValuePair(  ProjCenterEastingGeoKey,	3090)     /* ProjLinearUnits */
-ValuePair(  ProjCenterNorthingGeoKey,	3091)     /* ProjLinearUnits */
-ValuePair(  ProjScaleAtNatOriginGeoKey,	3092)     /* ratio   */
-ValuePair(  ProjScaleAtOriginGeoKey,ProjScaleAtNatOriginGeoKey)  /* ** alias **   */
-ValuePair(  ProjScaleAtCenterGeoKey,	3093)     /* ratio   */
-ValuePair(  ProjAzimuthAngleGeoKey,	3094)     /* GeogAzimuthUnit */
-ValuePair(  ProjStraightVertPoleLongGeoKey, 3095) /* GeogAngularUnit */
-ValuePair(  ProjRectifiedGridAngleGeoKey, 3096)   /* GeogAngularUnit */
-
-/* 6.2.4 Vertical CS Keys */
-   
-ValuePair(  VerticalCSTypeGeoKey,	4096)  /* Section 6.3.4.1 codes   */
-ValuePair(  VerticalCitationGeoKey,	4097)  /* documentation */
-ValuePair(  VerticalDatumGeoKey,	4098)  /* Section 6.3.4.2 codes   */
-ValuePair(  VerticalUnitsGeoKey,	4099)  /* Section 6.3.1 (.x) codes   */
-
-/* End of Data base */
diff --git a/src/tiff/geonames.h b/src/tiff/geonames.h
deleted file mode 100644
index ccedc7d..0000000
--- a/src/tiff/geonames.h
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
- * geonames.h
- *
- *  This encapsulates all of the value-naming mechanism of 
- *  libgeotiff. 
- *
- *  Written By: Niles Ritter
- *
- *  Revision History:
- *
- *      Author     Date     Key Changes/Additions
- *      ------  ----------  -------------------------------------
- *      ndr    10 Jun 95     Inital Beta Release
- *      ndr    28 Jul 95     Added ModelType aliases, Kv aliases.
- */
-
-#ifndef __geonames_h
-#define __geonames_h
-
-struct _KeyInfo {
-	int ki_key;
-	char *ki_name;
-};
-typedef struct _KeyInfo KeyInfo;
-
-/* If memory is a premium, then omitting the 
- * long name lists may save some space; simply 
- * #define OMIT_GEOTIFF_NAMES in the compile statement
- * to remove all key->string translation.
- */
-#ifdef ValuePair
-#  undef ValuePair
-#endif
-
-#ifndef OMIT_GEOTIFF_NAMES
-#define ValuePair(token,value)  {token,#token},
-#else
-#define ValuePair(token,value)
-#endif
-
-#define END_LIST { -1, (char *)0}
-
-/************************************************************
- *         6.2.x GeoTIFF Keys
- ************************************************************/
-
-static KeyInfo _keyInfo[] =  {
-#   include "geokeys.inc"   /* geokey database */
-    END_LIST
-};
-
-#define COMMON_VALUES \
-   {KvUndefined, "Undefined"}, \
-   {KvUserDefined,"User-Defined"}, \
-   ValuePair(KvUndefined,KvUndefined) \
-   ValuePair(KvUserDefined,KvUserDefined) 
-
-static KeyInfo _csdefaultValue[] = {
-   COMMON_VALUES
-   END_LIST  
-};
-
-/************************************************************
- *         6.3.x GeoTIFF Key Values
- ************************************************************/
-
-static KeyInfo _modeltypeValue[] = {
-   COMMON_VALUES
-    ValuePair(ModelTypeProjected,1)
-    ValuePair(ModelTypeGeographic,2)
-    ValuePair(ModelTypeGeocentric,3)
-    ValuePair(ModelProjected,1)     /* aliases */
-    ValuePair(ModelGeographic,2)    /* aliases */
-    ValuePair(ModelGeocentric,3)    /* aliases */
-   END_LIST  
-};
-
-static KeyInfo _rastertypeValue[] = {
-   COMMON_VALUES
-    ValuePair(RasterPixelIsArea,1)
-    ValuePair(RasterPixelIsPoint,2)
-   END_LIST  
-};
-
-static KeyInfo _geounitsValue[] = {
-   COMMON_VALUES
-#  include "epsg_units.inc"
-   END_LIST  
-};
-
-static KeyInfo _geographicValue[] = {
-   COMMON_VALUES
-#  include "epsg_gcs.inc"
-   END_LIST  
-};
-
-static KeyInfo _geodeticdatumValue[] = {
-   COMMON_VALUES
-#  include "epsg_datum.inc"
-   END_LIST  
-};
-
-static KeyInfo _ellipsoidValue[] = {
-   COMMON_VALUES
-#  include "epsg_ellipse.inc"
-   END_LIST  
-};
-
-static KeyInfo _primemeridianValue[] = {
-   COMMON_VALUES
-#  include "epsg_pm.inc"
-   END_LIST  
-};
-
-static KeyInfo _pcstypeValue[] = {
-   COMMON_VALUES
-#  include "epsg_pcs.inc"
-   END_LIST  
-};
-
-static KeyInfo _projectionValue[] = {
-   COMMON_VALUES
-#  include "epsg_proj.inc"
-   END_LIST  
-};
-
-static KeyInfo _coordtransValue[] = {
-   COMMON_VALUES
-#  include "geo_ctrans.inc"
-   END_LIST  
-};
-
-static KeyInfo _vertcstypeValue[] = {
-   COMMON_VALUES
-#  include "epsg_vertcs.inc"
-   END_LIST  
-};
-
-static KeyInfo _vdatumValue[] = {
-   COMMON_VALUES
-    ValuePair(VDatumBase,1)
-   END_LIST  
-};
-
-#endif /* __geonames_h */
-
diff --git a/src/tiff/geotiff.h b/src/tiff/geotiff.h
deleted file mode 100644
index dc57caf..0000000
--- a/src/tiff/geotiff.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/**********************************************************************
- *
- *  geotiff.h - Public interface for Geotiff tag parsing.
- *
- *
- *   Written By: Niles D. Ritter
- *
- **********************************************************************/
-
-#ifndef __geotiff_h_
-#define __geotiff_h_
-
-/**
- * \file geotiff.h
- *
- * Primary libgeotiff include file.
- *
- * This is the defacto registry for valid GEOTIFF GeoKeys
- * and their associated symbolic values. This is also the only file
- * of the GeoTIFF library which needs to be included in client source
- * code.
- */
-
-/* This Version code should only change if a drastic
- * alteration is made to the GeoTIFF key structure. Readers
- * encountering a larger value should give up gracefully.
- */
-#define GvCurrentVersion   1
-
-#define LIBGEOTIFF_VERSION 1210
-
-#include "geo_config.h"
-#include "geokeys.h"
-
-/**********************************************************************
- * Do we want to build as a DLL on windows?
- **********************************************************************/
-#if !defined(CPL_DLL)
-#  if defined(_WIN32) && defined(BUILD_AS_DLL)
-#    define CPL_DLL     __declspec(dllexport)
-#  else
-#    define CPL_DLL
-#  endif
-#endif
-
-/**********************************************************************
- *
- *                 Public Structures & Definitions
- *
- **********************************************************************/
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-typedef struct gtiff GTIF;   /* struct gtiff is private */
-typedef unsigned short tifftag_t;
-typedef unsigned short geocode_t;
-typedef int (*GTIFPrintMethod)(char *string, void *aux);
-typedef int (*GTIFReadMethod)(char *string, void *aux);
-
-typedef enum {
-   TYPE_BYTE=1,
-   TYPE_SHORT=2,
-   TYPE_LONG=3,
-   TYPE_RATIONAL=4,
-   TYPE_ASCII=5,
-   TYPE_FLOAT=6,
-   TYPE_DOUBLE=7,
-   TYPE_SBYTE=8,
-   TYPE_SSHORT=9,
-   TYPE_SLONG=10,
-   TYPE_UNKNOWN=11
-} tagtype_t;
-
-
-/**********************************************************************
- *
- *                 Public Function Declarations
- *
- **********************************************************************/
-
-/* TIFF-level interface */
-GTIF CPL_DLL *GTIFNew(void *tif);
-void CPL_DLL  GTIFFree(GTIF *gtif);
-int  CPL_DLL  GTIFWriteKeys(GTIF *gtif);
-void CPL_DLL  GTIFDirectoryInfo(GTIF *gtif, int *versions, int *keycount);
-
-/* GeoKey Access */
-int  CPL_DLL  GTIFKeyInfo(GTIF *gtif, geokey_t key, int *size, tagtype_t* type);
-int  CPL_DLL  GTIFKeyGet(GTIF *gtif, geokey_t key, void *val, int index,
-                         int count);
-int  CPL_DLL  GTIFKeySet(GTIF *gtif, geokey_t keyID, tagtype_t type,
-                         int count,...);
-
-/* Metadata Import-Export utilities */
-void  CPL_DLL  GTIFPrint(GTIF *gtif, GTIFPrintMethod print, void *aux);
-int   CPL_DLL  GTIFImport(GTIF *gtif, GTIFReadMethod scan, void *aux);
-char  CPL_DLL *GTIFKeyName(geokey_t key);
-char  CPL_DLL *GTIFValueName(geokey_t key,int value);
-char  CPL_DLL *GTIFTypeName(tagtype_t type);
-char  CPL_DLL *GTIFTagName(int tag);
-int   CPL_DLL  GTIFKeyCode(char * key);
-int   CPL_DLL  GTIFValueCode(geokey_t key,char *value);
-int   CPL_DLL  GTIFTypeCode(char *type);
-int   CPL_DLL  GTIFTagCode(char *tag);
-
-/* Translation between image/PCS space */
-
-int CPL_DLL    GTIFImageToPCS( GTIF *gtif, double *x, double *y );
-int CPL_DLL    GTIFPCSToImage( GTIF *gtif, double *x, double *y );
-
-#if defined(__cplusplus)
-}
-#endif
-
-#endif /* __geotiff_h_ */
diff --git a/src/tiff/geotiff_proj4.c b/src/tiff/geotiff_proj4.c
deleted file mode 100644
index 1778d73..0000000
--- a/src/tiff/geotiff_proj4.c
+++ /dev/null
@@ -1,679 +0,0 @@
-/******************************************************************************
- * $Id: geotiff_proj4.c,v 1.3 2004/03/19 11:51:24 lubia Exp $
- *
- * Project:  libgeotiff
- * Purpose:  Code to convert a normalized GeoTIFF definition into a PROJ.4
- *           (OGDI) compatible projection string.
- * Author:   Frank Warmerdam, warmerda at home.com
- *
- ******************************************************************************
- * Copyright (c) 1999, Frank Warmerdam
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- ******************************************************************************
- *
- * $Log: geotiff_proj4.c,v $
- * Revision 1.3  2004/03/19 11:51:24  lubia
- * Atualizada as bibliotecas Tif e GeoTif
- *
- * Revision 1.19  2002/11/29 20:57:09  warmerda
- * added LCC1SP mapping
- *
- * Revision 1.18  2002/07/09 14:47:53  warmerda
- * fixed translation of polar stereographic
- *
- * Revision 1.17  2001/11/23 19:53:56  warmerda
- * free PROJ.4 definitions after use
- *
- * Revision 1.16  2000/12/05 19:21:45  warmerda
- * added cassini support
- *
- * Revision 1.15  2000/12/05 17:44:41  warmerda
- * Use +R_A for Miller and VanDerGrinten
- *
- * Revision 1.14  2000/10/13 18:06:51  warmerda
- * added econic support for PROJ.4 translation
- *
- * Revision 1.13  2000/09/15 19:30:48  warmerda
- * *** empty log message ***
- *
- * Revision 1.12  2000/09/15 18:21:07  warmerda
- * Fixed order of parameters for LCC 2SP.  When parameters
- * were read from EPSG CSV files the standard parallels and origin
- * were mixed up.  This affects alot of state plane zones!
- *
- * Revision 1.11  2000/06/06 17:39:45  warmerda
- * Modify to work with projUV version of library.
- *
- * Revision 1.10  1999/07/06 15:05:51  warmerda
- * Fixed up LCC_1SP notes.
- *
- * Revision 1.9  1999/05/04 16:24:49  warmerda
- * Fixed projection string formating with zones.
- *
- * Revision 1.8  1999/05/04 12:27:01  geotiff
- * only emit proj unsupported warning if DEBUG defined
- *
- * Revision 1.7  1999/05/04 03:14:59  warmerda
- * fixed use of foot instead of ft for units
- *
- * Revision 1.6  1999/05/03 17:50:31  warmerda
- * avoid warnings on IRIX
- *
- * Revision 1.5  1999/04/29 23:02:24  warmerda
- * added mapsys utm test.
- *
- * Revision 1.4  1999/03/18 21:35:42  geotiff
- * Added reprojection functions
- *
- * Revision 1.3  1999/03/10 18:11:17  geotiff
- * Removed comment about this not being the master ... now it is.
- *
- * Revision 1.2  1999/03/10 18:10:27  geotiff
- * Avoid use of cpl_serv.h and CPLStrdup().
- *
- * Revision 1.1  1999/03/10 15:20:43  geotiff
- * New
- *
- */
-
-#include "cpl_serv.h"
-#include "geotiff.h"
-#include "geo_normalize.h"
-#include "geovalues.h"
-
-/************************************************************************/
-/*                          GTIFGetProj4Defn()                          */
-/************************************************************************/
-
-char * GTIFGetProj4Defn( GTIFDefn * psDefn )
-
-{
-    char	szProjection[512];
-    char	szUnits[24];
-    double      dfFalseEasting, dfFalseNorthing;
-
-    szProjection[0] = '\0';
-    
-/* ==================================================================== */
-/*      Translate the units of measure.                                 */
-/*                                                                      */
-/*      Note that even with a +units, or +to_meter in effect, it is     */
-/*      still assumed that all the projection parameters are in         */
-/*      meters.                                                         */
-/* ==================================================================== */
-    if( psDefn->UOMLength == Linear_Meter )
-    {
-        strcpy( szUnits, "+units=m " ); 
-    }
-    else if( psDefn->UOMLength == Linear_Foot )
-    {
-        strcpy( szUnits, "+units=ft " );
-    }
-    else if( psDefn->UOMLength == Linear_Foot_US_Survey )
-    {
-        strcpy( szUnits, "+units=us-ft " );
-    }
-    else if( psDefn->UOMLength == Linear_Foot_Indian )
-    {
-        strcpy( szUnits, "+units=ind-ft " );
-    }
-    else if( psDefn->UOMLength == Linear_Link )
-    {
-        strcpy( szUnits, "+units=link " );
-    }
-    else if( psDefn->UOMLength == Linear_Yard_Indian)
-    {
-        strcpy( szUnits, "+units=ind-yd " );
-    }
-    else if( psDefn->UOMLength == Linear_Fathom )
-    {
-        strcpy( szUnits, "+units=fath " );
-    }
-    else if( psDefn->UOMLength == Linear_Mile_International_Nautical )
-    {
-        strcpy( szUnits, "+units=kmi " );
-    }
-    else
-    {
-        sprintf( szUnits, "+to_meter=%.10f", psDefn->UOMLengthInMeters );
-    }
-
-/* -------------------------------------------------------------------- */
-/*      false easting and northing are in meters and that is what       */
-/*      PROJ.4 wants regardless of the linear units.                    */
-/* -------------------------------------------------------------------- */
-    dfFalseEasting = psDefn->ProjParm[5];
-    dfFalseNorthing = psDefn->ProjParm[6];
-    
-/* ==================================================================== */
-/*      Handle general projection methods.                              */
-/* ==================================================================== */
-
-/* -------------------------------------------------------------------- */
-/*      UTM - special case override on transverse mercator so things    */
-/*      will be more meaningful to the user.                            */
-/* -------------------------------------------------------------------- */
-    if( psDefn->MapSys == MapSys_UTM_North )
-    {
-        sprintf( szProjection+strlen(szProjection),
-                 "+proj=utm +zone=%d ",
-                 psDefn->Zone );
-    }
-    
-/* -------------------------------------------------------------------- */
-/*      Transverse Mercator                                             */
-/* -------------------------------------------------------------------- */
-    else if( psDefn->CTProjection == CT_TransverseMercator )
-    {
-        sprintf( szProjection+strlen(szProjection),
-           "+proj=tmerc +lat_0=%.9f +lon_0=%.9f +k=%f +x_0=%.3f +y_0=%.3f ",
-                 psDefn->ProjParm[0],
-                 psDefn->ProjParm[1],
-                 psDefn->ProjParm[4],
-                 dfFalseEasting,
-                 dfFalseNorthing );
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Mercator							*/
-/* -------------------------------------------------------------------- */
-    else if( psDefn->CTProjection == CT_Mercator )
-    {
-        sprintf( szProjection+strlen(szProjection),
-           "+proj=merc +lat_ts=%.9f +lon_0=%.9f +k=%f +x_0=%.3f +y_0=%.3f ",
-                 psDefn->ProjParm[0],
-                 psDefn->ProjParm[1],
-                 psDefn->ProjParm[4],
-                 dfFalseEasting,
-                 dfFalseNorthing );
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Cassini/Soldner                                                 */
-/* -------------------------------------------------------------------- */
-    else if( psDefn->CTProjection == CT_CassiniSoldner )
-    {
-        sprintf( szProjection+strlen(szProjection),
-                 "+proj=cass +lat_0=%.9f +lon_0=%.9f +x_0=%.3f +y_0=%.3f ",
-                 psDefn->ProjParm[0],
-                 psDefn->ProjParm[1],
-                 dfFalseEasting,
-                 dfFalseNorthing );
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Oblique Stereographic - Should this really map onto             */
-/*      Stereographic?                                                  */
-/* -------------------------------------------------------------------- */
-    else if( psDefn->CTProjection == CT_ObliqueStereographic )
-    {
-        sprintf( szProjection+strlen(szProjection),
-           "+proj=stere +lat_0=%.9f +lon_0=%.9f +k=%f +x_0=%.3f +y_0=%.3f ",
-                 psDefn->ProjParm[0],
-                 psDefn->ProjParm[1],
-                 psDefn->ProjParm[4],
-                 dfFalseEasting,
-                 dfFalseNorthing );
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Stereographic                                                   */
-/* -------------------------------------------------------------------- */
-    else if( psDefn->CTProjection == CT_Stereographic )
-    {
-        sprintf( szProjection+strlen(szProjection),
-           "+proj=stere +lat_0=%.9f +lon_0=%.9f +x_0=%.3f +y_0=%.3f ",
-                 psDefn->ProjParm[0],
-                 psDefn->ProjParm[1],
-                 dfFalseEasting,
-                 dfFalseNorthing );
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Polar Stereographic                                             */
-/* -------------------------------------------------------------------- */
-    else if( psDefn->CTProjection == CT_PolarStereographic )
-    {
-        if( psDefn->ProjParm[0] > 0.0 )
-            sprintf( szProjection+strlen(szProjection),
-                     "+proj=stere +lat_0=90 +lat_ts=%.9f +lon_0=%.9f "
-                     "+k=%.9f +x_0=%.3f +y_0=%.3f ",
-                     psDefn->ProjParm[0],
-                     psDefn->ProjParm[1],
-                     psDefn->ProjParm[4],
-                     dfFalseEasting,
-                     dfFalseNorthing );
-        else
-            sprintf( szProjection+strlen(szProjection),
-                     "+proj=stere +lat_0=-90 +lat_ts=%.9f +lon_0=%.9f "
-                     "+k=%.9f +x_0=%.3f +y_0=%.3f ",
-                     psDefn->ProjParm[0],
-                     psDefn->ProjParm[1],
-                     psDefn->ProjParm[4],
-                     dfFalseEasting,
-                     dfFalseNorthing );
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Equirectangular                                                 */
-/* -------------------------------------------------------------------- */
-    else if( psDefn->CTProjection == CT_Equirectangular )
-    {
-        sprintf( szProjection+strlen(szProjection),
-                 "+proj=eqc +lat_ts=%.9f +lon_0=%.9f +x_0=%.3f +y_0=%.3f ",
-                 psDefn->ProjParm[0],
-                 psDefn->ProjParm[1],
-                 dfFalseEasting,
-                 dfFalseNorthing );
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Gnomonic                                                        */
-/* -------------------------------------------------------------------- */
-    else if( psDefn->CTProjection == CT_Gnomonic )
-    {
-        sprintf( szProjection+strlen(szProjection),
-                 "+proj=gnom +lat_0=%.9f +lon_0=%.9f +x_0=%.3f +y_0=%.3f ",
-                 psDefn->ProjParm[0],
-                 psDefn->ProjParm[1],
-                 dfFalseEasting,
-                 dfFalseNorthing );
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Orthographic                                                    */
-/* -------------------------------------------------------------------- */
-    else if( psDefn->CTProjection == CT_Orthographic )
-    {
-        sprintf( szProjection+strlen(szProjection),
-                 "+proj=ortho +lat_0=%.9f +lon_0=%.9f +x_0=%.3f +y_0=%.3f ",
-                 psDefn->ProjParm[0],
-                 psDefn->ProjParm[1],
-                 dfFalseEasting,
-                 dfFalseNorthing );
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Lambert Azimuthal Equal Area                                    */
-/* -------------------------------------------------------------------- */
-    else if( psDefn->CTProjection == CT_LambertAzimEqualArea )
-    {
-        sprintf( szProjection+strlen(szProjection),
-                 "+proj=laea +lat_0=%.9f +lon_0=%.9f +x_0=%.3f +y_0=%.3f ",
-                 psDefn->ProjParm[0],
-                 psDefn->ProjParm[1],
-                 dfFalseEasting,
-                 dfFalseNorthing );
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Azimuthal Equidistant                                           */
-/* -------------------------------------------------------------------- */
-    else if( psDefn->CTProjection == CT_AzimuthalEquidistant )
-    {
-        sprintf( szProjection+strlen(szProjection),
-           "+proj=aeqd +lat_0=%.9f +lon_0=%.9f +x_0=%.3f +y_0=%.3f ",
-                 psDefn->ProjParm[0],
-                 psDefn->ProjParm[1],
-                 dfFalseEasting,
-                 dfFalseNorthing );
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Miller Cylindrical                                              */
-/* -------------------------------------------------------------------- */
-    else if( psDefn->CTProjection == CT_MillerCylindrical )
-    {
-        sprintf( szProjection+strlen(szProjection),
-           "+proj=mill +lat_0=%.9f +lon_0=%.9f +x_0=%.3f +y_0=%.3f +R_A ",
-                 psDefn->ProjParm[0],
-                 psDefn->ProjParm[1],
-                 dfFalseEasting,
-                 dfFalseNorthing );
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Polyconic                                                       */
-/* -------------------------------------------------------------------- */
-    else if( psDefn->CTProjection == CT_Polyconic )
-    {
-        sprintf( szProjection+strlen(szProjection),
-           "+proj=poly +lat_0=%.9f +lon_0=%.9f +x_0=%.3f +y_0=%.3f ",
-                 psDefn->ProjParm[0],
-                 psDefn->ProjParm[1],
-                 dfFalseEasting,
-                 dfFalseNorthing );
-    }
-
-/* -------------------------------------------------------------------- */
-/*      AlbersEqualArea                                                 */
-/* -------------------------------------------------------------------- */
-    else if( psDefn->CTProjection == CT_AlbersEqualArea )
-    {
-        sprintf( szProjection+strlen(szProjection),
-                 "+proj=aea +lat_1=%.9f +lat_2=%.9f +lat_0=%.9f +lon_0=%.9f"
-                 " +x_0=%.3f +y_0=%.3f ",
-                 psDefn->ProjParm[0],
-                 psDefn->ProjParm[1],
-                 psDefn->ProjParm[2],
-                 psDefn->ProjParm[3],
-                 dfFalseEasting,
-                 dfFalseNorthing );
-    }
-    
-/* -------------------------------------------------------------------- */
-/*      EquidistantConic                                                */
-/* -------------------------------------------------------------------- */
-    else if( psDefn->CTProjection == CT_EquidistantConic )
-    {
-        sprintf( szProjection+strlen(szProjection),
-                 "+proj=eqdc +lat_1=%.9f +lat_2=%.9f +lat_0=%.9f +lon_0=%.9f"
-                 " +x_0=%.3f +y_0=%.3f ",
-                 psDefn->ProjParm[0],
-                 psDefn->ProjParm[1],
-                 psDefn->ProjParm[2],
-                 psDefn->ProjParm[3],
-                 dfFalseEasting,
-                 dfFalseNorthing );
-    }
-    
-/* -------------------------------------------------------------------- */
-/*      Robinson                                                        */
-/* -------------------------------------------------------------------- */
-    else if( psDefn->CTProjection == CT_Robinson )
-    {
-        sprintf( szProjection+strlen(szProjection),
-                 "+proj=robin +lon_0=%.9f +x_0=%.3f +y_0=%.3f ",
-                 psDefn->ProjParm[1],
-                 dfFalseEasting,
-                 dfFalseNorthing );
-    }
-    
-/* -------------------------------------------------------------------- */
-/*      VanDerGrinten                                                   */
-/* -------------------------------------------------------------------- */
-    else if( psDefn->CTProjection == CT_VanDerGrinten )
-    {
-        sprintf( szProjection+strlen(szProjection),
-                 "+proj=vandg +lon_0=%.9f +x_0=%.3f +y_0=%.3f +R_A ",
-                 psDefn->ProjParm[1],
-                 dfFalseEasting,
-                 dfFalseNorthing );
-    }
-    
-/* -------------------------------------------------------------------- */
-/*      Sinusoidal                                                      */
-/* -------------------------------------------------------------------- */
-    else if( psDefn->CTProjection == CT_Sinusoidal )
-    {
-        sprintf( szProjection+strlen(szProjection),
-                 "+proj=sinu +lon_0=%.9f +x_0=%.3f +y_0=%.3f ",
-                 psDefn->ProjParm[1],
-                 dfFalseEasting,
-                 dfFalseNorthing );
-    }
-    
-/* -------------------------------------------------------------------- */
-/*      LambertConfConic_2SP                                            */
-/* -------------------------------------------------------------------- */
-    else if( psDefn->CTProjection == CT_LambertConfConic_2SP )
-    {
-        sprintf( szProjection+strlen(szProjection),
-                 "+proj=lcc +lat_0=%.9f +lon_0=%.9f +lat_1=%.9f +lat_2=%.9f "
-                 " +x_0=%.3f +y_0=%.3f ",
-                 psDefn->ProjParm[0],
-                 psDefn->ProjParm[1],
-                 psDefn->ProjParm[2],
-                 psDefn->ProjParm[3],
-                 dfFalseEasting,
-                 dfFalseNorthing );
-    }
-    
-/* -------------------------------------------------------------------- */
-/*      LambertConfConic_1SP                                            */
-/* -------------------------------------------------------------------- */
-    else if( psDefn->CTProjection == CT_LambertConfConic_1SP )
-    {
-        sprintf( szProjection+strlen(szProjection),
-                 "+proj=lcc +lat_0=%.9f +lat_1=%.9f +lon_0=%.9f"
-                 " +k_0=%.9f +x_0=%.3f +y_0=%.3f ",
-                 psDefn->ProjParm[0],
-                 psDefn->ProjParm[0],
-                 psDefn->ProjParm[1],
-                 psDefn->ProjParm[4],
-                 psDefn->ProjParm[5],
-                 psDefn->ProjParm[6] );
-    }
-    
-/* -------------------------------------------------------------------- */
-/*      NewZealandMapGrid                                               */
-/* -------------------------------------------------------------------- */
-    else if( psDefn->CTProjection == CT_NewZealandMapGrid )
-    {
-        /* this appears to be an unsupported formulation with PROJ.4 */
-    }
-    
-/* -------------------------------------------------------------------- */
-/*      Transverse Mercator - south oriented.                           */
-/* -------------------------------------------------------------------- */
-    else if( psDefn->CTProjection == CT_TransvMercator_SouthOriented )
-    {
-        /* this appears to be an unsupported formulation with PROJ.4 */
-    }
-    
-/* -------------------------------------------------------------------- */
-/*      ObliqueMercator (Hotine)                                        */
-/* -------------------------------------------------------------------- */
-    else if( psDefn->CTProjection == CT_ObliqueMercator )
-    {
-        /* not clear how ProjParm[3] - angle from rectified to skewed grid -
-           should be applied ... see the +not_rot flag for PROJ.4.
-           Just ignoring for now. */
-
-        sprintf( szProjection+strlen(szProjection),
-                 "+proj=omerc +lat_0=%.9f +lonc=%.9f +alpha=%.9f"
-                 " +k=%.9f +x_0=%.3f +y_0=%.3f ",
-                 psDefn->ProjParm[0],
-                 psDefn->ProjParm[1],
-                 psDefn->ProjParm[2],
-                 psDefn->ProjParm[4],
-                 psDefn->ProjParm[5],
-                 psDefn->ProjParm[6] );
-    }
-
-/* ==================================================================== */
-/*      Handle ellipsoid information.                                   */
-/* ==================================================================== */
-    if( psDefn->Ellipsoid == Ellipse_WGS_84 )
-        strcat( szProjection, "+ellps=WGS84 " );
-    else if( psDefn->Ellipsoid == Ellipse_Clarke_1866 )
-        strcat( szProjection, "+ellps=clrk66 " );
-    else if( psDefn->Ellipsoid == Ellipse_Clarke_1880 )
-        strcat( szProjection, "+ellps=clrk80 " );
-    else if( psDefn->Ellipsoid == Ellipse_GRS_1980 )
-        strcat( szProjection, "+ellps=GRS80 " );
-    else
-    {
-        if( psDefn->SemiMajor != 0.0 && psDefn->SemiMinor != 0.0 )
-        {
-            sprintf( szProjection+strlen(szProjection),
-                     "+a=%.3f +b=%.3f ",
-                     psDefn->SemiMajor,
-                     psDefn->SemiMinor );
-        }
-    }
-
-    strcat( szProjection, szUnits );
-
-    return( strdup( szProjection ) );
-}
-
-#if !defined(HAVE_LIBPROJ) || !defined(HAVE_PROJECTS_H)
-
-int GTIFProj4ToLatLong( GTIFDefn * psDefn, int nPoints,
-                        double *padfX, double *padfY )
-{
-#ifdef DEBUG    
-    fprintf( stderr,
-             "GTIFProj4ToLatLong() - PROJ.4 support not compiled in.\n" );
-#endif    
-    return FALSE;
-}
-
-int GTIFProj4FromLatLong( GTIFDefn * psDefn, int nPoints,
-                          double *padfX, double *padfY )
-{
-#ifdef DEBUG    
-    fprintf( stderr,
-             "GTIFProj4FromLatLong() - PROJ.4 support not compiled in.\n" );
-#endif    
-    return FALSE;
-}
-#else
-
-#include "projects.h"
-
-#ifdef USE_PROJUV
-#  define UV projUV
-#endif
-
-/************************************************************************/
-/*                        GTIFProj4FromLatLong()                        */
-/*                                                                      */
-/*      Convert lat/long values to projected coordinate for a           */
-/*      particular definition.                                          */
-/************************************************************************/
-
-int GTIFProj4FromLatLong( GTIFDefn * psDefn, int nPoints,
-                          double *padfX, double *padfY )
-
-{
-    char	*pszProjection, **papszArgs;
-    PJ		*psPJ;
-    int		i;
-    
-/* -------------------------------------------------------------------- */
-/*      Get a projection definition.                                    */
-/* -------------------------------------------------------------------- */
-    pszProjection = GTIFGetProj4Defn( psDefn );
-
-    if( pszProjection == NULL )
-        return FALSE;
-
-/* -------------------------------------------------------------------- */
-/*      Parse into tokens for pj_init(), and initialize the projection. */
-/* -------------------------------------------------------------------- */
-    
-    papszArgs = CSLTokenizeStringComplex( pszProjection, " +", TRUE, FALSE );
-    free( pszProjection );
-
-    psPJ = pj_init( CSLCount(papszArgs), papszArgs );
-
-    CSLDestroy( papszArgs );
-
-    if( psPJ == NULL )
-    {
-        return FALSE;
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Process each of the points.                                     */
-/* -------------------------------------------------------------------- */
-    for( i = 0; i < nPoints; i++ )
-    {
-        UV	sUV;
-
-        sUV.u = padfX[i] * DEG_TO_RAD;
-        sUV.v = padfY[i] * DEG_TO_RAD;
-
-        sUV = pj_fwd( sUV, psPJ );
-
-        padfX[i] = sUV.u;
-        padfY[i] = sUV.v;
-    }
-
-    pj_free( psPJ );
-
-    return TRUE;
-}
-
-/************************************************************************/
-/*                         GTIFProj4ToLatLong()                         */
-/*                                                                      */
-/*      Convert projection coordinates to lat/long for a particular     */
-/*      definition.                                                     */
-/************************************************************************/
-
-int GTIFProj4ToLatLong( GTIFDefn * psDefn, int nPoints,
-                        double *padfX, double *padfY )
-
-{
-    char	*pszProjection, **papszArgs;
-    PJ		*psPJ;
-    int		i;
-    
-/* -------------------------------------------------------------------- */
-/*      Get a projection definition.                                    */
-/* -------------------------------------------------------------------- */
-    pszProjection = GTIFGetProj4Defn( psDefn );
-
-    if( pszProjection == NULL )
-        return FALSE;
-
-/* -------------------------------------------------------------------- */
-/*      Parse into tokens for pj_init(), and initialize the projection. */
-/* -------------------------------------------------------------------- */
-    
-    papszArgs = CSLTokenizeStringComplex( pszProjection, " +", TRUE, FALSE );
-    free( pszProjection );
-
-    psPJ = pj_init( CSLCount(papszArgs), papszArgs );
-
-    CSLDestroy( papszArgs );
-
-    if( psPJ == NULL )
-    {
-        return FALSE;
-    }
-
-/* -------------------------------------------------------------------- */
-/*      Process each of the points.                                     */
-/* -------------------------------------------------------------------- */
-    for( i = 0; i < nPoints; i++ )
-    {
-        UV	sUV;
-
-        sUV.u = padfX[i];
-        sUV.v = padfY[i];
-
-        sUV = pj_inv( sUV, psPJ );
-
-        padfX[i] = sUV.u * RAD_TO_DEG;
-        padfY[i] = sUV.v * RAD_TO_DEG;
-    }
-
-    pj_free( psPJ );
-
-    return TRUE;
-}
-
-
-#endif /* has projects.h and -lproj */
-
diff --git a/src/tiff/geotiffio.h b/src/tiff/geotiffio.h
deleted file mode 100644
index 72442b4..0000000
--- a/src/tiff/geotiffio.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/* 
- * geotiffio.h
- * 
- * Standard include file for geotiff, including all
- *  key and code definitions.
- */
-
-
-#ifndef __geotiffio_h
-#define __geotiffio_h
-
-#include "geotiff.h"  /* public key interface */
-#include "geovalues.h" /* key code definitions */
-
-#endif /* __geotiffio_h */
-
diff --git a/src/tiff/geovalues.h b/src/tiff/geovalues.h
deleted file mode 100644
index 625d33a..0000000
--- a/src/tiff/geovalues.h
+++ /dev/null
@@ -1,120 +0,0 @@
-/**********************************************************************
- *
- *  geovalues.h - Public registry for valid GEOTIFF  key-values.
- *
- *   Written By: Niles D. Ritter
- *
- *  Revision History:
- *
- *     Rev.#  Author     Date     Key Changes/Additions
- *     -----  ------  ----------  -------------------------------------
- *      0.1     ndr    10 Jun 95     Inital Beta Release
- *      0.2     ndr    12 Jul 95     New EPSG Tables installed.
- *      0.2.1   ndr    28 Jul 95     Added ModelType aliases to Model's
- *      1.0     ndr    18 Sep 95     Promoted to Revision 1.0
- *
- **********************************************************************/
-
-#ifndef __geovalues_h_
-#define __geovalues_h_
-
-/* If code values are added or modified, the "GvCurrentMinorRev" 
- * number should be incremented here. If new Keys are added, then the
- * GvCurrentRevision number should be incremented instead, and the
- * GvCurrentMinorRev should be reset to zero (see "geokeys.h").
- *
- * In addition, any changes here should be reflected in "geo_names.c"
- *
- */
- 
-#define GvCurrentMinorRev  0  /* First Major Rev EPSG Code Release  */
-
-
-/*
- * Universal key values -- defined for consistency
- */
-#define KvUndefined         0
-#define KvUserDefined   32767
-
-#ifdef ValuePair
-#  undef ValuePair
-#endif
-#define ValuePair(name,value)    name = value,
-
-/*
- * The section numbers refer to the GeoTIFF Specification section
- * in which the code values are documented.
- */
- 
-/************************************************************
- *         6.3.1 GeoTIFF General Codes
- ************************************************************/
-
-/* 6.3.1.1 Model Type Codes */
-typedef enum {
-	ModelTypeProjected  = 1,  /* Projection Coordinate System */
-	ModelTypeGeographic = 2,  /* Geographic latitude-longitude System */
-	ModelTypeGeocentric = 3,   /* Geocentric (X,Y,Z) Coordinate System */
-	ModelProjected  = ModelTypeProjected,   /* alias */
-	ModelGeographic = ModelTypeGeographic,  /* alias */
-	ModelGeocentric = ModelTypeGeocentric   /* alias */
-} modeltype_t;
-
-/* 6.3.1.2 Raster Type Codes */
-typedef enum {
-	RasterPixelIsArea   = 1,  /* Standard pixel-fills-grid-cell */
-	RasterPixelIsPoint  = 2   /* Pixel-at-grid-vertex */
-} rastertype_t;
-
-typedef enum {
-#  include "epsg_gcs.inc"
-  geographic_end
-} geographic_t;
-
-typedef enum {
-#  include "epsg_datum.inc"
-   geodeticdatum_end
-} geodeticdatum_t;
-
-typedef enum {
-#  include "epsg_units.inc"
-   Unit_End
-} geounits_t;
-
-typedef enum {
-#  include "epsg_ellipse.inc"
-    ellipsoid_end
-} ellipsoid_t;
-
-typedef enum {
-#  include "epsg_pm.inc"
-   primemeridian_end
-} primemeridian_t;
-
-typedef enum {
-#  include "epsg_pcs.inc"
-   pcstype_end
-} pcstype_t;
-
-typedef enum {
-#  include "epsg_proj.inc"
-   projection_end
-} projection_t;
-
-typedef enum {
-#  include "geo_ctrans.inc"
-   coordtrans_end
-} coordtrans_t;
-
-typedef enum {
-#  include "epsg_vertcs.inc"
-   vertcs_end
-} vertcstype_t;
-
-
-typedef enum {
-	VDatumBase = 1
-} vdatum_t;
-
-#endif /* __geovalues_h_ */
-
diff --git a/src/tiff/port.h b/src/tiff/port.h
deleted file mode 100644
index 50dafd7..0000000
--- a/src/tiff/port.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Warning, this file was automatically created by the TIFF configure script
- * VERSION:	 v3.4033
- * DATE:	 Fri Dec 12 17:10:08 EDT 1997
- * TARGET:	 sparc-sun-solaris2.5.1
- * CCOMPILER:	 /usr/local/bin/gcc-2.7.2
- */
-#ifndef _PORT_
-#define _PORT_ 1
-#ifdef __cplusplus
-extern "C" {
-#endif
-#include <sys/types.h>
-#define HOST_FILLORDER FILLORDER_LSB2MSB
-#define HOST_BIGENDIAN	0
-#define HAVE_MMAP 1
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdlib.h>
-#include <fcntl.h>
-typedef double dblparam_t;
-#ifdef __STRICT_ANSI__
-#define	INLINE	__inline__
-#else
-#define	INLINE	inline
-#endif
-#define GLOBALDATA(TYPE,NAME)	extern TYPE NAME
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/src/tiff/t4.h b/src/tiff/t4.h
deleted file mode 100644
index 2fb12a2..0000000
--- a/src/tiff/t4.h
+++ /dev/null
@@ -1,285 +0,0 @@
-/* $Id: t4.h,v 1.3 2004/03/19 11:51:24 lubia Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#ifndef _T4_
-#define	_T4_
-/*
- * CCITT T.4 1D Huffman runlength codes and
- * related definitions.  Given the small sizes
- * of these tables it does not seem
- * worthwhile to make code & length 8 bits.
- */
-typedef struct tableentry {
-    unsigned short length;	/* bit length of g3 code */
-    unsigned short code;	/* g3 code */
-    short	runlen;		/* run length in bits */
-} tableentry;
-
-#define	EOL	0x001	/* EOL code value - 0000 0000 0000 1 */
-
-/* status values returned instead of a run length */
-#define	G3CODE_EOL	-1	/* NB: ACT_EOL - ACT_WRUNT */
-#define	G3CODE_INVALID	-2	/* NB: ACT_INVALID - ACT_WRUNT */
-#define	G3CODE_EOF	-3	/* end of input data */
-#define	G3CODE_INCOMP	-4	/* incomplete run code */
-
-/*
- * Note that these tables are ordered such that the
- * index into the table is known to be either the
- * run length, or (run length / 64) + a fixed offset.
- *
- * NB: The G3CODE_INVALID entries are only used
- *     during state generation (see mkg3states.c).
- */
-#ifdef G3CODES
-const tableentry TIFFFaxWhiteCodes[] = {
-    { 8, 0x35, 0 },	/* 0011 0101 */
-    { 6, 0x7, 1 },	/* 0001 11 */
-    { 4, 0x7, 2 },	/* 0111 */
-    { 4, 0x8, 3 },	/* 1000 */
-    { 4, 0xB, 4 },	/* 1011 */
-    { 4, 0xC, 5 },	/* 1100 */
-    { 4, 0xE, 6 },	/* 1110 */
-    { 4, 0xF, 7 },	/* 1111 */
-    { 5, 0x13, 8 },	/* 1001 1 */
-    { 5, 0x14, 9 },	/* 1010 0 */
-    { 5, 0x7, 10 },	/* 0011 1 */
-    { 5, 0x8, 11 },	/* 0100 0 */
-    { 6, 0x8, 12 },	/* 0010 00 */
-    { 6, 0x3, 13 },	/* 0000 11 */
-    { 6, 0x34, 14 },	/* 1101 00 */
-    { 6, 0x35, 15 },	/* 1101 01 */
-    { 6, 0x2A, 16 },	/* 1010 10 */
-    { 6, 0x2B, 17 },	/* 1010 11 */
-    { 7, 0x27, 18 },	/* 0100 111 */
-    { 7, 0xC, 19 },	/* 0001 100 */
-    { 7, 0x8, 20 },	/* 0001 000 */
-    { 7, 0x17, 21 },	/* 0010 111 */
-    { 7, 0x3, 22 },	/* 0000 011 */
-    { 7, 0x4, 23 },	/* 0000 100 */
-    { 7, 0x28, 24 },	/* 0101 000 */
-    { 7, 0x2B, 25 },	/* 0101 011 */
-    { 7, 0x13, 26 },	/* 0010 011 */
-    { 7, 0x24, 27 },	/* 0100 100 */
-    { 7, 0x18, 28 },	/* 0011 000 */
-    { 8, 0x2, 29 },	/* 0000 0010 */
-    { 8, 0x3, 30 },	/* 0000 0011 */
-    { 8, 0x1A, 31 },	/* 0001 1010 */
-    { 8, 0x1B, 32 },	/* 0001 1011 */
-    { 8, 0x12, 33 },	/* 0001 0010 */
-    { 8, 0x13, 34 },	/* 0001 0011 */
-    { 8, 0x14, 35 },	/* 0001 0100 */
-    { 8, 0x15, 36 },	/* 0001 0101 */
-    { 8, 0x16, 37 },	/* 0001 0110 */
-    { 8, 0x17, 38 },	/* 0001 0111 */
-    { 8, 0x28, 39 },	/* 0010 1000 */
-    { 8, 0x29, 40 },	/* 0010 1001 */
-    { 8, 0x2A, 41 },	/* 0010 1010 */
-    { 8, 0x2B, 42 },	/* 0010 1011 */
-    { 8, 0x2C, 43 },	/* 0010 1100 */
-    { 8, 0x2D, 44 },	/* 0010 1101 */
-    { 8, 0x4, 45 },	/* 0000 0100 */
-    { 8, 0x5, 46 },	/* 0000 0101 */
-    { 8, 0xA, 47 },	/* 0000 1010 */
-    { 8, 0xB, 48 },	/* 0000 1011 */
-    { 8, 0x52, 49 },	/* 0101 0010 */
-    { 8, 0x53, 50 },	/* 0101 0011 */
-    { 8, 0x54, 51 },	/* 0101 0100 */
-    { 8, 0x55, 52 },	/* 0101 0101 */
-    { 8, 0x24, 53 },	/* 0010 0100 */
-    { 8, 0x25, 54 },	/* 0010 0101 */
-    { 8, 0x58, 55 },	/* 0101 1000 */
-    { 8, 0x59, 56 },	/* 0101 1001 */
-    { 8, 0x5A, 57 },	/* 0101 1010 */
-    { 8, 0x5B, 58 },	/* 0101 1011 */
-    { 8, 0x4A, 59 },	/* 0100 1010 */
-    { 8, 0x4B, 60 },	/* 0100 1011 */
-    { 8, 0x32, 61 },	/* 0011 0010 */
-    { 8, 0x33, 62 },	/* 0011 0011 */
-    { 8, 0x34, 63 },	/* 0011 0100 */
-    { 5, 0x1B, 64 },	/* 1101 1 */
-    { 5, 0x12, 128 },	/* 1001 0 */
-    { 6, 0x17, 192 },	/* 0101 11 */
-    { 7, 0x37, 256 },	/* 0110 111 */
-    { 8, 0x36, 320 },	/* 0011 0110 */
-    { 8, 0x37, 384 },	/* 0011 0111 */
-    { 8, 0x64, 448 },	/* 0110 0100 */
-    { 8, 0x65, 512 },	/* 0110 0101 */
-    { 8, 0x68, 576 },	/* 0110 1000 */
-    { 8, 0x67, 640 },	/* 0110 0111 */
-    { 9, 0xCC, 704 },	/* 0110 0110 0 */
-    { 9, 0xCD, 768 },	/* 0110 0110 1 */
-    { 9, 0xD2, 832 },	/* 0110 1001 0 */
-    { 9, 0xD3, 896 },	/* 0110 1001 1 */
-    { 9, 0xD4, 960 },	/* 0110 1010 0 */
-    { 9, 0xD5, 1024 },	/* 0110 1010 1 */
-    { 9, 0xD6, 1088 },	/* 0110 1011 0 */
-    { 9, 0xD7, 1152 },	/* 0110 1011 1 */
-    { 9, 0xD8, 1216 },	/* 0110 1100 0 */
-    { 9, 0xD9, 1280 },	/* 0110 1100 1 */
-    { 9, 0xDA, 1344 },	/* 0110 1101 0 */
-    { 9, 0xDB, 1408 },	/* 0110 1101 1 */
-    { 9, 0x98, 1472 },	/* 0100 1100 0 */
-    { 9, 0x99, 1536 },	/* 0100 1100 1 */
-    { 9, 0x9A, 1600 },	/* 0100 1101 0 */
-    { 6, 0x18, 1664 },	/* 0110 00 */
-    { 9, 0x9B, 1728 },	/* 0100 1101 1 */
-    { 11, 0x8, 1792 },	/* 0000 0001 000 */
-    { 11, 0xC, 1856 },	/* 0000 0001 100 */
-    { 11, 0xD, 1920 },	/* 0000 0001 101 */
-    { 12, 0x12, 1984 },	/* 0000 0001 0010 */
-    { 12, 0x13, 2048 },	/* 0000 0001 0011 */
-    { 12, 0x14, 2112 },	/* 0000 0001 0100 */
-    { 12, 0x15, 2176 },	/* 0000 0001 0101 */
-    { 12, 0x16, 2240 },	/* 0000 0001 0110 */
-    { 12, 0x17, 2304 },	/* 0000 0001 0111 */
-    { 12, 0x1C, 2368 },	/* 0000 0001 1100 */
-    { 12, 0x1D, 2432 },	/* 0000 0001 1101 */
-    { 12, 0x1E, 2496 },	/* 0000 0001 1110 */
-    { 12, 0x1F, 2560 },	/* 0000 0001 1111 */
-    { 12, 0x1, G3CODE_EOL },	/* 0000 0000 0001 */
-    { 9, 0x1, G3CODE_INVALID },	/* 0000 0000 1 */
-    { 10, 0x1, G3CODE_INVALID },	/* 0000 0000 01 */
-    { 11, 0x1, G3CODE_INVALID },	/* 0000 0000 001 */
-    { 12, 0x0, G3CODE_INVALID },	/* 0000 0000 0000 */
-};
-
-const tableentry TIFFFaxBlackCodes[] = {
-    { 10, 0x37, 0 },	/* 0000 1101 11 */
-    { 3, 0x2, 1 },	/* 010 */
-    { 2, 0x3, 2 },	/* 11 */
-    { 2, 0x2, 3 },	/* 10 */
-    { 3, 0x3, 4 },	/* 011 */
-    { 4, 0x3, 5 },	/* 0011 */
-    { 4, 0x2, 6 },	/* 0010 */
-    { 5, 0x3, 7 },	/* 0001 1 */
-    { 6, 0x5, 8 },	/* 0001 01 */
-    { 6, 0x4, 9 },	/* 0001 00 */
-    { 7, 0x4, 10 },	/* 0000 100 */
-    { 7, 0x5, 11 },	/* 0000 101 */
-    { 7, 0x7, 12 },	/* 0000 111 */
-    { 8, 0x4, 13 },	/* 0000 0100 */
-    { 8, 0x7, 14 },	/* 0000 0111 */
-    { 9, 0x18, 15 },	/* 0000 1100 0 */
-    { 10, 0x17, 16 },	/* 0000 0101 11 */
-    { 10, 0x18, 17 },	/* 0000 0110 00 */
-    { 10, 0x8, 18 },	/* 0000 0010 00 */
-    { 11, 0x67, 19 },	/* 0000 1100 111 */
-    { 11, 0x68, 20 },	/* 0000 1101 000 */
-    { 11, 0x6C, 21 },	/* 0000 1101 100 */
-    { 11, 0x37, 22 },	/* 0000 0110 111 */
-    { 11, 0x28, 23 },	/* 0000 0101 000 */
-    { 11, 0x17, 24 },	/* 0000 0010 111 */
-    { 11, 0x18, 25 },	/* 0000 0011 000 */
-    { 12, 0xCA, 26 },	/* 0000 1100 1010 */
-    { 12, 0xCB, 27 },	/* 0000 1100 1011 */
-    { 12, 0xCC, 28 },	/* 0000 1100 1100 */
-    { 12, 0xCD, 29 },	/* 0000 1100 1101 */
-    { 12, 0x68, 30 },	/* 0000 0110 1000 */
-    { 12, 0x69, 31 },	/* 0000 0110 1001 */
-    { 12, 0x6A, 32 },	/* 0000 0110 1010 */
-    { 12, 0x6B, 33 },	/* 0000 0110 1011 */
-    { 12, 0xD2, 34 },	/* 0000 1101 0010 */
-    { 12, 0xD3, 35 },	/* 0000 1101 0011 */
-    { 12, 0xD4, 36 },	/* 0000 1101 0100 */
-    { 12, 0xD5, 37 },	/* 0000 1101 0101 */
-    { 12, 0xD6, 38 },	/* 0000 1101 0110 */
-    { 12, 0xD7, 39 },	/* 0000 1101 0111 */
-    { 12, 0x6C, 40 },	/* 0000 0110 1100 */
-    { 12, 0x6D, 41 },	/* 0000 0110 1101 */
-    { 12, 0xDA, 42 },	/* 0000 1101 1010 */
-    { 12, 0xDB, 43 },	/* 0000 1101 1011 */
-    { 12, 0x54, 44 },	/* 0000 0101 0100 */
-    { 12, 0x55, 45 },	/* 0000 0101 0101 */
-    { 12, 0x56, 46 },	/* 0000 0101 0110 */
-    { 12, 0x57, 47 },	/* 0000 0101 0111 */
-    { 12, 0x64, 48 },	/* 0000 0110 0100 */
-    { 12, 0x65, 49 },	/* 0000 0110 0101 */
-    { 12, 0x52, 50 },	/* 0000 0101 0010 */
-    { 12, 0x53, 51 },	/* 0000 0101 0011 */
-    { 12, 0x24, 52 },	/* 0000 0010 0100 */
-    { 12, 0x37, 53 },	/* 0000 0011 0111 */
-    { 12, 0x38, 54 },	/* 0000 0011 1000 */
-    { 12, 0x27, 55 },	/* 0000 0010 0111 */
-    { 12, 0x28, 56 },	/* 0000 0010 1000 */
-    { 12, 0x58, 57 },	/* 0000 0101 1000 */
-    { 12, 0x59, 58 },	/* 0000 0101 1001 */
-    { 12, 0x2B, 59 },	/* 0000 0010 1011 */
-    { 12, 0x2C, 60 },	/* 0000 0010 1100 */
-    { 12, 0x5A, 61 },	/* 0000 0101 1010 */
-    { 12, 0x66, 62 },	/* 0000 0110 0110 */
-    { 12, 0x67, 63 },	/* 0000 0110 0111 */
-    { 10, 0xF, 64 },	/* 0000 0011 11 */
-    { 12, 0xC8, 128 },	/* 0000 1100 1000 */
-    { 12, 0xC9, 192 },	/* 0000 1100 1001 */
-    { 12, 0x5B, 256 },	/* 0000 0101 1011 */
-    { 12, 0x33, 320 },	/* 0000 0011 0011 */
-    { 12, 0x34, 384 },	/* 0000 0011 0100 */
-    { 12, 0x35, 448 },	/* 0000 0011 0101 */
-    { 13, 0x6C, 512 },	/* 0000 0011 0110 0 */
-    { 13, 0x6D, 576 },	/* 0000 0011 0110 1 */
-    { 13, 0x4A, 640 },	/* 0000 0010 0101 0 */
-    { 13, 0x4B, 704 },	/* 0000 0010 0101 1 */
-    { 13, 0x4C, 768 },	/* 0000 0010 0110 0 */
-    { 13, 0x4D, 832 },	/* 0000 0010 0110 1 */
-    { 13, 0x72, 896 },	/* 0000 0011 1001 0 */
-    { 13, 0x73, 960 },	/* 0000 0011 1001 1 */
-    { 13, 0x74, 1024 },	/* 0000 0011 1010 0 */
-    { 13, 0x75, 1088 },	/* 0000 0011 1010 1 */
-    { 13, 0x76, 1152 },	/* 0000 0011 1011 0 */
-    { 13, 0x77, 1216 },	/* 0000 0011 1011 1 */
-    { 13, 0x52, 1280 },	/* 0000 0010 1001 0 */
-    { 13, 0x53, 1344 },	/* 0000 0010 1001 1 */
-    { 13, 0x54, 1408 },	/* 0000 0010 1010 0 */
-    { 13, 0x55, 1472 },	/* 0000 0010 1010 1 */
-    { 13, 0x5A, 1536 },	/* 0000 0010 1101 0 */
-    { 13, 0x5B, 1600 },	/* 0000 0010 1101 1 */
-    { 13, 0x64, 1664 },	/* 0000 0011 0010 0 */
-    { 13, 0x65, 1728 },	/* 0000 0011 0010 1 */
-    { 11, 0x8, 1792 },	/* 0000 0001 000 */
-    { 11, 0xC, 1856 },	/* 0000 0001 100 */
-    { 11, 0xD, 1920 },	/* 0000 0001 101 */
-    { 12, 0x12, 1984 },	/* 0000 0001 0010 */
-    { 12, 0x13, 2048 },	/* 0000 0001 0011 */
-    { 12, 0x14, 2112 },	/* 0000 0001 0100 */
-    { 12, 0x15, 2176 },	/* 0000 0001 0101 */
-    { 12, 0x16, 2240 },	/* 0000 0001 0110 */
-    { 12, 0x17, 2304 },	/* 0000 0001 0111 */
-    { 12, 0x1C, 2368 },	/* 0000 0001 1100 */
-    { 12, 0x1D, 2432 },	/* 0000 0001 1101 */
-    { 12, 0x1E, 2496 },	/* 0000 0001 1110 */
-    { 12, 0x1F, 2560 },	/* 0000 0001 1111 */
-    { 12, 0x1, G3CODE_EOL },	/* 0000 0000 0001 */
-    { 9, 0x1, G3CODE_INVALID },	/* 0000 0000 1 */
-    { 10, 0x1, G3CODE_INVALID },	/* 0000 0000 01 */
-    { 11, 0x1, G3CODE_INVALID },	/* 0000 0000 001 */
-    { 12, 0x0, G3CODE_INVALID },	/* 0000 0000 0000 */
-};
-#else
-extern	const tableentry TIFFFaxWhiteCodes[];
-extern	const tableentry TIFFFaxBlackCodes[];
-#endif
-#endif /* _T4_ */
diff --git a/src/tiff/tif_aux.c b/src/tiff/tif_aux.c
deleted file mode 100644
index 8e8fecf..0000000
--- a/src/tiff/tif_aux.c
+++ /dev/null
@@ -1,218 +0,0 @@
-/* $Header: /home/terralib/src/tiff/tif_aux.c,v 1.3 2004/03/19 11:51:24 lubia Exp $ */
-
-/*
- * Copyright (c) 1991-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library.
- *
- * Auxiliary Support Routines.
- */
-#include "tiffiop.h"
-#include "tif_predict.h"
-#include <math.h>
-
-static void
-TIFFDefaultTransferFunction(TIFFDirectory* td)
-{
-	uint16 **tf = td->td_transferfunction;
-	long i, n = 1<<td->td_bitspersample;
-
-	tf[0] = (uint16 *)_TIFFmalloc(n * sizeof (uint16));
-	tf[0][0] = 0;
-	for (i = 1; i < n; i++) {
-		double t = (double)i/((double) n-1.);
-		tf[0][i] = (uint16)floor(65535.*pow(t, 2.2) + .5);
-	}
-	if (td->td_samplesperpixel - td->td_extrasamples > 1) {
-		tf[1] = (uint16 *)_TIFFmalloc(n * sizeof (uint16));
-		_TIFFmemcpy(tf[1], tf[0], n * sizeof (uint16));
-		tf[2] = (uint16 *)_TIFFmalloc(n * sizeof (uint16));
-		_TIFFmemcpy(tf[2], tf[0], n * sizeof (uint16));
-	}
-}
-
-static void
-TIFFDefaultRefBlackWhite(TIFFDirectory* td)
-{
-	int i;
-
-	td->td_refblackwhite = (float *)_TIFFmalloc(6*sizeof (float));
-	for (i = 0; i < 3; i++) {
-	    td->td_refblackwhite[2*i+0] = 0;
-	    td->td_refblackwhite[2*i+1] = (float)((1L<<td->td_bitspersample)-1L);
-	}
-}
-
-/*
- * Like TIFFGetField, but return any default
- * value if the tag is not present in the directory.
- *
- * NB:	We use the value in the directory, rather than
- *	explcit values so that defaults exist only one
- *	place in the library -- in TIFFDefaultDirectory.
- */
-int
-TIFFVGetFieldDefaulted(TIFF* tif, ttag_t tag, va_list ap)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-
-	if (TIFFVGetField(tif, tag, ap))
-		return (1);
-	switch (tag) {
-	case TIFFTAG_SUBFILETYPE:
-		*va_arg(ap, uint32 *) = td->td_subfiletype;
-		return (1);
-	case TIFFTAG_BITSPERSAMPLE:
-		*va_arg(ap, uint16 *) = td->td_bitspersample;
-		return (1);
-	case TIFFTAG_THRESHHOLDING:
-		*va_arg(ap, uint16 *) = td->td_threshholding;
-		return (1);
-	case TIFFTAG_FILLORDER:
-		*va_arg(ap, uint16 *) = td->td_fillorder;
-		return (1);
-	case TIFFTAG_ORIENTATION:
-		*va_arg(ap, uint16 *) = td->td_orientation;
-		return (1);
-	case TIFFTAG_SAMPLESPERPIXEL:
-		*va_arg(ap, uint16 *) = td->td_samplesperpixel;
-		return (1);
-	case TIFFTAG_ROWSPERSTRIP:
-		*va_arg(ap, uint32 *) = td->td_rowsperstrip;
-		return (1);
-	case TIFFTAG_MINSAMPLEVALUE:
-		*va_arg(ap, uint16 *) = td->td_minsamplevalue;
-		return (1);
-	case TIFFTAG_MAXSAMPLEVALUE:
-		*va_arg(ap, uint16 *) = td->td_maxsamplevalue;
-		return (1);
-	case TIFFTAG_PLANARCONFIG:
-		*va_arg(ap, uint16 *) = td->td_planarconfig;
-		return (1);
-	case TIFFTAG_RESOLUTIONUNIT:
-		*va_arg(ap, uint16 *) = td->td_resolutionunit;
-		return (1);
-	case TIFFTAG_PREDICTOR:
-                {
-			TIFFPredictorState* sp = (TIFFPredictorState*) tif->tif_data;
-			*va_arg(ap, uint16*) = (uint16) sp->predictor;
-			return (1);
-                }
-	case TIFFTAG_DOTRANGE:
-		*va_arg(ap, uint16 *) = 0;
-		*va_arg(ap, uint16 *) = (1<<td->td_bitspersample)-1;
-		return (1);
-	case TIFFTAG_INKSET:
-		*va_arg(ap, uint16 *) = td->td_inkset;
-		return (1);
-	case TIFFTAG_NUMBEROFINKS:
-		*va_arg(ap, uint16 *) = td->td_ninks;
-		return (1);
-	case TIFFTAG_EXTRASAMPLES:
-		*va_arg(ap, uint16 *) = td->td_extrasamples;
-		*va_arg(ap, uint16 **) = td->td_sampleinfo;
-		return (1);
-	case TIFFTAG_MATTEING:
-		*va_arg(ap, uint16 *) =
-		    (td->td_extrasamples == 1 &&
-		     td->td_sampleinfo[0] == EXTRASAMPLE_ASSOCALPHA);
-		return (1);
-	case TIFFTAG_TILEDEPTH:
-		*va_arg(ap, uint32 *) = td->td_tiledepth;
-		return (1);
-	case TIFFTAG_DATATYPE:
-		*va_arg(ap, uint16 *) = td->td_sampleformat-1;
-		return (1);
-	case TIFFTAG_SAMPLEFORMAT:
-		*va_arg(ap, uint16 *) = td->td_sampleformat;
-                return(1);
-	case TIFFTAG_IMAGEDEPTH:
-		*va_arg(ap, uint32 *) = td->td_imagedepth;
-		return (1);
-	case TIFFTAG_YCBCRCOEFFICIENTS:
-		if (!td->td_ycbcrcoeffs) {
-			td->td_ycbcrcoeffs = (float *)
-			    _TIFFmalloc(3*sizeof (float));
-			/* defaults are from CCIR Recommendation 601-1 */
-			td->td_ycbcrcoeffs[0] = 0.299f;
-			td->td_ycbcrcoeffs[1] = 0.587f;
-			td->td_ycbcrcoeffs[2] = 0.114f;
-		}
-		*va_arg(ap, float **) = td->td_ycbcrcoeffs;
-		return (1);
-	case TIFFTAG_YCBCRSUBSAMPLING:
-		*va_arg(ap, uint16 *) = td->td_ycbcrsubsampling[0];
-		*va_arg(ap, uint16 *) = td->td_ycbcrsubsampling[1];
-		return (1);
-	case TIFFTAG_YCBCRPOSITIONING:
-		*va_arg(ap, uint16 *) = td->td_ycbcrpositioning;
-		return (1);
-	case TIFFTAG_WHITEPOINT:
-		if (!td->td_whitepoint) {
-			td->td_whitepoint = (float *)
-				_TIFFmalloc(2 * sizeof (float));
-			/* TIFF 6.0 specification says that it is no default
-			   value for the WhitePoint, but AdobePhotoshop TIFF
-			   Technical Note tells that it should be CIE D50. */
-			td->td_whitepoint[0] =
-				D50_X0 / (D50_X0 + D50_Y0 + D50_Z0);
-			td->td_whitepoint[1] =
-				D50_Y0 / (D50_X0 + D50_Y0 + D50_Z0);
-		}
-		*va_arg(ap, float **) = td->td_whitepoint;
-		return (1);
-	case TIFFTAG_TRANSFERFUNCTION:
-		if (!td->td_transferfunction[0])
-			TIFFDefaultTransferFunction(td);
-		*va_arg(ap, uint16 **) = td->td_transferfunction[0];
-		if (td->td_samplesperpixel - td->td_extrasamples > 1) {
-			*va_arg(ap, uint16 **) = td->td_transferfunction[1];
-			*va_arg(ap, uint16 **) = td->td_transferfunction[2];
-		}
-		return (1);
-	case TIFFTAG_REFERENCEBLACKWHITE:
-		if (!td->td_refblackwhite)
-			TIFFDefaultRefBlackWhite(td);
-		*va_arg(ap, float **) = td->td_refblackwhite;
-		return (1);
-	}
-	return (0);
-}
-
-/*
- * Like TIFFGetField, but return any default
- * value if the tag is not present in the directory.
- */
-int
-TIFFGetFieldDefaulted(TIFF* tif, ttag_t tag, ...)
-{
-	int ok;
-	va_list ap;
-
-	va_start(ap, tag);
-	ok =  TIFFVGetFieldDefaulted(tif, tag, ap);
-	va_end(ap);
-	return (ok);
-}
diff --git a/src/tiff/tif_close.c b/src/tiff/tif_close.c
deleted file mode 100644
index 87acd32..0000000
--- a/src/tiff/tif_close.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/* $Header: /home/terralib/src/tiff/tif_close.c,v 1.3 2004/03/19 11:51:24 lubia Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library.
- */
-#include "tiffiop.h"
-
-void
-TIFFClose(TIFF* tif)
-{
-    if (tif->tif_mode != O_RDONLY)
-        /*
-         * Flush buffered data and directory (if dirty).
-         */
-        TIFFFlush(tif);
-    (*tif->tif_cleanup)(tif);
-    TIFFFreeDirectory(tif);
-
-    if (tif->tif_dirlist)
-        _TIFFfree(tif->tif_dirlist);
-        
-    /* Clean up client info links */
-    while( tif->tif_clientinfo )
-    {
-        TIFFClientInfoLink *link = tif->tif_clientinfo;
-
-        tif->tif_clientinfo = link->next;
-        _TIFFfree( link->name );
-        _TIFFfree( link );
-    }
-
-    if (tif->tif_rawdata && (tif->tif_flags&TIFF_MYBUFFER))
-        _TIFFfree(tif->tif_rawdata);
-    if (isMapped(tif))
-        TIFFUnmapFileContents(tif, tif->tif_base, tif->tif_size);
-    (void) TIFFCloseFile(tif);
-    if (tif->tif_nfields > 0) 
-    {
-        int  i;
-
-        for (i = 0; i < tif->tif_nfields; i++) 
-	{
-	    TIFFFieldInfo *fld = tif->tif_fieldinfo[i];
- 	    if (fld->field_bit == FIELD_CUSTOM && 
-		strncmp("Tag ", fld->field_name, 4) == 0) 
-	    {
-                _TIFFfree(fld->field_name);
-                _TIFFfree(fld);
-	    }
-        }   
-      
-        _TIFFfree(tif->tif_fieldinfo);
-    }
-
-    _TIFFfree(tif);
-}
diff --git a/src/tiff/tif_codec.c b/src/tiff/tif_codec.c
deleted file mode 100644
index 3486d93..0000000
--- a/src/tiff/tif_codec.c
+++ /dev/null
@@ -1,150 +0,0 @@
-/* $Header: /home/terralib/src/tiff/tif_codec.c,v 1.3 2004/03/19 11:51:24 lubia Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library
- *
- * Builtin Compression Scheme Configuration Support.
- */
-#include "tiffiop.h"
-
-static	int NotConfigured(TIFF*, int);
-
-#ifndef	LZW_SUPPORT
-#define	TIFFInitLZW		NotConfigured
-#endif
-#ifndef	PACKBITS_SUPPORT
-#define	TIFFInitPackbits	NotConfigured
-#endif
-#ifndef	THUNDER_SUPPORT
-#define	TIFFInitThunderScan	NotConfigured
-#endif
-#ifndef	NEXT_SUPPORT
-#define	TIFFInitNeXT		NotConfigured
-#endif
-#ifndef	JPEG_SUPPORT
-#define	TIFFInitJPEG		NotConfigured
-#endif
-#ifndef	OJPEG_SUPPORT
-#define	TIFFInitOJPEG		NotConfigured
-#endif
-#ifndef	CCITT_SUPPORT
-#define	TIFFInitCCITTRLE	NotConfigured
-#define	TIFFInitCCITTRLEW	NotConfigured
-#define	TIFFInitCCITTFax3	NotConfigured
-#define	TIFFInitCCITTFax4	NotConfigured
-#endif
-#ifndef JBIG_SUPPORT
-#define	TIFFInitJBIG		NotConfigured
-#endif
-#ifndef	ZIP_SUPPORT
-#define	TIFFInitZIP		NotConfigured
-#endif
-#ifndef	PIXARLOG_SUPPORT
-#define	TIFFInitPixarLog	NotConfigured
-#endif
-#ifndef LOGLUV_SUPPORT
-#define TIFFInitSGILog		NotConfigured
-#endif
-
-/*
- * Compression schemes statically built into the library.
- */
-#ifdef VMS
-const TIFFCodec _TIFFBuiltinCODECS[] = {
-#else
-TIFFCodec _TIFFBuiltinCODECS[] = {
-#endif
-    { "None",		COMPRESSION_NONE,	TIFFInitDumpMode },
-    { "LZW",		COMPRESSION_LZW,	TIFFInitLZW },
-    { "PackBits",	COMPRESSION_PACKBITS,	TIFFInitPackBits },
-    { "ThunderScan",	COMPRESSION_THUNDERSCAN,TIFFInitThunderScan },
-    { "NeXT",		COMPRESSION_NEXT,	TIFFInitNeXT },
-    { "JPEG",		COMPRESSION_JPEG,	TIFFInitJPEG },
-    { "Old-style JPEG",	COMPRESSION_OJPEG,	TIFFInitOJPEG },
-    { "CCITT RLE",	COMPRESSION_CCITTRLE,	TIFFInitCCITTRLE },
-    { "CCITT RLE/W",	COMPRESSION_CCITTRLEW,	TIFFInitCCITTRLEW },
-    { "CCITT Group 3",	COMPRESSION_CCITTFAX3,	TIFFInitCCITTFax3 },
-    { "CCITT Group 4",	COMPRESSION_CCITTFAX4,	TIFFInitCCITTFax4 },
-    { "ISO JBIG",	COMPRESSION_JBIG,	TIFFInitJBIG },
-    { "Deflate",	COMPRESSION_DEFLATE,	TIFFInitZIP },
-    { "AdobeDeflate",   COMPRESSION_ADOBE_DEFLATE , TIFFInitZIP }, 
-    { "PixarLog",	COMPRESSION_PIXARLOG,	TIFFInitPixarLog },
-    { "SGILog",		COMPRESSION_SGILOG,	TIFFInitSGILog },
-    { "SGILog24",	COMPRESSION_SGILOG24,	TIFFInitSGILog },
-    { NULL }
-};
-
-static int
-_notConfigured(TIFF* tif)
-{
-	const TIFFCodec* c = TIFFFindCODEC(tif->tif_dir.td_compression);
-
-	TIFFError(tif->tif_name,
-	    "%s compression support is not configured", c->name);
-	return (0);
-}
-
-static int
-NotConfigured(TIFF* tif, int scheme)
-{
-    (void) scheme;
-    
-    tif->tif_decodestatus = FALSE;
-    tif->tif_setupdecode = _notConfigured;
-    tif->tif_encodestatus = FALSE;
-    tif->tif_setupencode = _notConfigured;
-    return (1);
-}
-
-/************************************************************************/
-/*                       TIFFIsCODECConfigured()                        */
-/************************************************************************/
-
-/**
- * Check whether we have working codec for the specific coding scheme.
- * 
- * @return returns 1 if the codec is configured and working. Otherwise
- * 0 will be returned.
- */
-
-int
-TIFFIsCODECConfigured(uint16 scheme)
-{
-	const TIFFCodec* codec = TIFFFindCODEC(scheme);
-
-	if(codec == NULL) {
-            return 0;
-        }
-        if(codec->init == NULL) {
-            return 0;
-        }
-	if(codec->init != NotConfigured){
-            return 1;
-        }
-	return 0;
-}
-
diff --git a/src/tiff/tif_color.c b/src/tiff/tif_color.c
deleted file mode 100644
index c4d85bb..0000000
--- a/src/tiff/tif_color.c
+++ /dev/null
@@ -1,268 +0,0 @@
-/* $Header: /home/terralib/src/tiff/tif_color.c,v 1.1 2004/04/12 13:48:53 juan Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * CIE L*a*b* to CIE XYZ and CIE XYZ to RGB conversion routines are taken
- * from the VIPS library (http://www.vips.ecs.soton.ac.uk) with
- * the permission of John Cupitt, the VIPS author.
- */
-
-/*
- * TIFF Library.
- *
- * Color space conversion routines.
- */
-
-#include "tiffiop.h"
-#include <math.h>
-
-/*
- * Convert color value from the CIE L*a*b* 1976 space to CIE XYZ.
- */
-void
-TIFFCIELabToXYZ(TIFFCIELabToRGB *cielab, uint32 l, int32 a, int32 b,
-		float *X, float *Y, float *Z)
-{
-	float L = (float)l * 100.0F / 255.0F;
-	float cby, tmp;
-
-	if( L < 8.856F ) {
-		*Y = (L * cielab->Y0) / 903.292F;
-		cby = 7.787F * (*Y / cielab->Y0) + 16.0F / 116.0F;
-	} else {
-		cby = (L + 16.0F) / 116.0F;
-		*Y = cielab->Y0 * cby * cby * cby;
-	}
-
-	tmp = (float)a / 500.0F + cby;
-	if( tmp < 0.2069F )
-		*X = cielab->X0 * (tmp - 0.13793F) / 7.787F;
-	else    
-		*X = cielab->X0 * tmp * tmp * tmp;
-
-	tmp = cby - (float)b / 200.0F;
-	if( tmp < 0.2069F )
-		*Z = cielab->Z0 * (tmp - 0.13793F) / 7.787F;
-	else    
-		*Z = cielab->Z0 * tmp * tmp * tmp;
-}
-
-#define RINT(R) ((uint32)((R)>0?((R)+0.5):((R)-0.5)))
-/*
- * Convert color value from the XYZ space to RGB.
- */
-void
-TIFFXYZToRGB(TIFFCIELabToRGB *cielab, float X, float Y, float Z,
-	     uint32 *r, uint32 *g, uint32 *b)
-{
-	int i;
-	float Yr, Yg, Yb;
-	float *matrix = &cielab->display.d_mat[0][0];
-
-	/* Multiply through the matrix to get luminosity values. */
-	Yr =  matrix[0] * X + matrix[1] * Y + matrix[2] * Z;
-	Yg =  matrix[3] * X + matrix[4] * Y + matrix[5] * Z;
-	Yb =  matrix[6] * X + matrix[7] * Y + matrix[8] * Z;
-
-	/* Clip input */
-	Yr = TIFFmax( Yr, cielab->display.d_Y0R );
-	Yg = TIFFmax( Yg, cielab->display.d_Y0G );
-	Yb = TIFFmax( Yb, cielab->display.d_Y0B );
-
-	/* Turn luminosity to colour value. */
-	i = TIFFmin(cielab->range,
-		    (int)((Yr - cielab->display.d_Y0R) / cielab->rstep));
-	*r = RINT(cielab->Yr2r[i]);
-
-	i = TIFFmin(cielab->range,
-		    (int)((Yg - cielab->display.d_Y0G) / cielab->gstep));
-	*g = RINT(cielab->Yg2g[i]);
-
-	i = TIFFmin(cielab->range,
-		    (int)((Yb - cielab->display.d_Y0B) / cielab->bstep));
-	*b = RINT(cielab->Yb2b[i]);
-
-	/* Clip output. */
-	*r = TIFFmin( *r, cielab->display.d_Vrwr );
-	*g = TIFFmin( *g, cielab->display.d_Vrwg );
-	*b = TIFFmin( *b, cielab->display.d_Vrwb );
-}
-#undef RINT
-
-/* 
- * Allocate conversion state structures and make look_up tables for
- * the Yr,Yb,Yg <=> r,g,b conversions.
- */
-int
-TIFFCIELabToRGBInit(TIFFCIELabToRGB* cielab,
-		    TIFFDisplay *display, float *refWhite)
-{
-	int i;
-	float gamma;
-
-	cielab->range = CIELABTORGB_TABLE_RANGE;
-
-	_TIFFmemcpy(&cielab->display, display, sizeof(TIFFDisplay));
-
-	/* Red */
-	gamma = 1.0F / cielab->display.d_gammaR ;
-	cielab->rstep =
-		(cielab->display.d_YCR - cielab->display.d_Y0R)	/ cielab->range;
-	for(i = 0; i <= cielab->range; i++) {
-		cielab->Yr2r[i] = cielab->display.d_Vrwr
-		    * ((float)pow((double)i / cielab->range, gamma));
-	}
-
-	/* Green */
-	gamma = 1.0F / cielab->display.d_gammaG ;
-	cielab->gstep =
-	    (cielab->display.d_YCR - cielab->display.d_Y0R) / cielab->range;
-	for(i = 0; i <= cielab->range; i++) {
-		cielab->Yg2g[i] = cielab->display.d_Vrwg
-		    * ((float)pow((double)i / cielab->range, gamma));
-	}
-
-	/* Blue */
-	gamma = 1.0F / cielab->display.d_gammaB ;
-	cielab->bstep =
-	    (cielab->display.d_YCR - cielab->display.d_Y0R) / cielab->range;
-	for(i = 0; i <= cielab->range; i++) {
-		cielab->Yb2b[i] = cielab->display.d_Vrwb
-		    * ((float)pow((double)i / cielab->range, gamma));
-	}
-
-	/* Init reference white point */
-	cielab->X0 = refWhite[0];
-	cielab->Y0 = refWhite[1];
-	cielab->Z0 = refWhite[2];
-
-	return 0;
-}
-
-/* 
- * Convert color value from the YCbCr space to CIE XYZ.
- * The colorspace conversion algorithm comes from the IJG v5a code;
- * see below for more information on how it works.
- */
-#define	SHIFT			16
-#define	FIX(x)			((int32)((x) * (1L<<SHIFT) + 0.5))
-#define	ONE_HALF		((int32)(1<<(SHIFT-1)))
-#define	Code2V(c, RB, RW, CR)	((((c)-(int32)(RB))*(float)(CR))/(float)((RW)-(RB)))
-#define	CLAMP(f,min,max)	((f)<(min)?(min):(f)>(max)?(max):(f))
-
-void
-TIFFYCbCrtoRGB(TIFFYCbCrToRGB *ycbcr, uint32 Y, int32 Cb, int32 Cr,
-	       uint32 *r, uint32 *g, uint32 *b)
-{
-	/* XXX: Only 8-bit YCbCr input supported for now */
-	Y = CLAMP(Y, 0, 255), Cb = CLAMP(Cb, 0, 255), Cr = CLAMP(Cr, 0, 255);
-
-	*r = ycbcr->clamptab[ycbcr->Y_tab[Y] + ycbcr->Cr_r_tab[Cr]];
-	*g = ycbcr->clamptab[ycbcr->Y_tab[Y]
-	    + (int)((ycbcr->Cb_g_tab[Cb] + ycbcr->Cr_g_tab[Cr]) >> SHIFT)];
-	*b = ycbcr->clamptab[ycbcr->Y_tab[Y] + ycbcr->Cb_b_tab[Cb]];
-}
-
-/*
- * Initialize the YCbCr->RGB conversion tables.  The conversion
- * is done according to the 6.0 spec:
- *
- *    R = Y + Cr*(2 - 2*LumaRed)
- *    B = Y + Cb*(2 - 2*LumaBlue)
- *    G =   Y
- *        - LumaBlue*Cb*(2-2*LumaBlue)/LumaGreen
- *        - LumaRed*Cr*(2-2*LumaRed)/LumaGreen
- *
- * To avoid floating point arithmetic the fractional constants that
- * come out of the equations are represented as fixed point values
- * in the range 0...2^16.  We also eliminate multiplications by
- * pre-calculating possible values indexed by Cb and Cr (this code
- * assumes conversion is being done for 8-bit samples).
- */
-int
-TIFFYCbCrToRGBInit(TIFFYCbCrToRGB* ycbcr, float *luma, float *refBlackWhite)
-{
-    TIFFRGBValue* clamptab;
-    int i;
-    
-#define LumaRed	    luma[0]
-#define LumaGreen   luma[1]
-#define LumaBlue    luma[2]
-
-    clamptab = (TIFFRGBValue*)(
-	(tidata_t) ycbcr+TIFFroundup(sizeof (TIFFYCbCrToRGB), sizeof (long)));
-    _TIFFmemset(clamptab, 0, 256);		/* v < 0 => 0 */
-    ycbcr->clamptab = (clamptab += 256);
-    for (i = 0; i < 256; i++)
-	clamptab[i] = (TIFFRGBValue) i;
-    _TIFFmemset(clamptab+256, 255, 2*256);	/* v > 255 => 255 */
-    ycbcr->Cr_r_tab = (int*) (clamptab + 3*256);
-    ycbcr->Cb_b_tab = ycbcr->Cr_r_tab + 256;
-    ycbcr->Cr_g_tab = (int32*) (ycbcr->Cb_b_tab + 256);
-    ycbcr->Cb_g_tab = ycbcr->Cr_g_tab + 256;
-    ycbcr->Y_tab = ycbcr->Cb_g_tab + 256;
-
-    { float f1 = 2-2*LumaRed;		int32 D1 = FIX(f1);
-      float f2 = LumaRed*f1/LumaGreen;	int32 D2 = -FIX(f2);
-      float f3 = 2-2*LumaBlue;		int32 D3 = FIX(f3);
-      float f4 = LumaBlue*f3/LumaGreen;	int32 D4 = -FIX(f4);
-      int x;
-
-#undef LumaBlue
-#undef LumaGreen
-#undef LumaRed
-      
-      /*
-       * i is the actual input pixel value in the range 0..255
-       * Cb and Cr values are in the range -128..127 (actually
-       * they are in a range defined by the ReferenceBlackWhite
-       * tag) so there is some range shifting to do here when
-       * constructing tables indexed by the raw pixel data.
-       */
-      for (i = 0, x = -128; i < 256; i++, x++) {
-	    int32 Cr = (int32)Code2V(x, refBlackWhite[4] - 128.0F,
-			    refBlackWhite[5] - 128.0F, 127);
-	    int32 Cb = (int32)Code2V(x, refBlackWhite[2] - 128.0F,
-			    refBlackWhite[3] - 128.0F, 127);
-
-	    ycbcr->Cr_r_tab[i] = (int32)((D1*Cr + ONE_HALF)>>SHIFT);
-	    ycbcr->Cb_b_tab[i] = (int32)((D3*Cb + ONE_HALF)>>SHIFT);
-	    ycbcr->Cr_g_tab[i] = D2*Cr;
-	    ycbcr->Cb_g_tab[i] = D4*Cb + ONE_HALF;
-	    ycbcr->Y_tab[i] =
-		    (int32)Code2V(x + 128, refBlackWhite[0], refBlackWhite[1], 255);
-      }
-    }
-
-    return 0;
-}
-#undef	CLAMP
-#undef	Code2V
-#undef	SHIFT
-#undef	ONE_HALF
-#undef	FIX
-
-
diff --git a/src/tiff/tif_compress.c b/src/tiff/tif_compress.c
deleted file mode 100644
index d3c2379..0000000
--- a/src/tiff/tif_compress.c
+++ /dev/null
@@ -1,233 +0,0 @@
-/* $Header: /home/terralib/src/tiff/tif_compress.c,v 1.3 2004/03/19 11:51:24 lubia Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library
- *
- * Compression Scheme Configuration Support.
- */
-#include "tiffiop.h"
-
-static int
-TIFFNoEncode(TIFF* tif, char* method)
-{
-	const TIFFCodec* c = TIFFFindCODEC(tif->tif_dir.td_compression);
-
-	if (c) { 
-	  if (! strncmp(c->name, "LZW", 3) ){ 
-	    TIFFError(tif->tif_name, 
-		      "%s %s encoding is no longer implemented due to Unisys patent enforcement", 
-		      c->name, method); 
-	  } else { 
-	    TIFFError(tif->tif_name, "%s %s encoding is not implemented",
-		      c->name, method);
-	  }
-	}
-	else { 
-		TIFFError(tif->tif_name,
-			  "Compression scheme %u %s encoding is not implemented",
-		    tif->tif_dir.td_compression, method);
-	}
-	return (-1);
-}
-
-int
-_TIFFNoRowEncode(TIFF* tif, tidata_t pp, tsize_t cc, tsample_t s)
-{
-	(void) pp; (void) cc; (void) s;
-	return (TIFFNoEncode(tif, "scanline"));
-}
-
-int
-_TIFFNoStripEncode(TIFF* tif, tidata_t pp, tsize_t cc, tsample_t s)
-{
-	(void) pp; (void) cc; (void) s;
-	return (TIFFNoEncode(tif, "strip"));
-}
-
-int
-_TIFFNoTileEncode(TIFF* tif, tidata_t pp, tsize_t cc, tsample_t s)
-{
-	(void) pp; (void) cc; (void) s;
-	return (TIFFNoEncode(tif, "tile"));
-}
-
-static int
-TIFFNoDecode(TIFF* tif, char* method)
-{
-	const TIFFCodec* c = TIFFFindCODEC(tif->tif_dir.td_compression);
-
-	if (c)
-		TIFFError(tif->tif_name, "%s %s decoding is not implemented",
-		    c->name, method);
-	else
-		TIFFError(tif->tif_name,
-		    "Compression scheme %u %s decoding is not implemented",
-		    tif->tif_dir.td_compression, method);
-	return (-1);
-}
-
-int
-_TIFFNoRowDecode(TIFF* tif, tidata_t pp, tsize_t cc, tsample_t s)
-{
-	(void) pp; (void) cc; (void) s;
-	return (TIFFNoDecode(tif, "scanline"));
-}
-
-int
-_TIFFNoStripDecode(TIFF* tif, tidata_t pp, tsize_t cc, tsample_t s)
-{
-	(void) pp; (void) cc; (void) s;
-	return (TIFFNoDecode(tif, "strip"));
-}
-
-int
-_TIFFNoTileDecode(TIFF* tif, tidata_t pp, tsize_t cc, tsample_t s)
-{
-	(void) pp; (void) cc; (void) s;
-	return (TIFFNoDecode(tif, "tile"));
-}
-
-int
-_TIFFNoSeek(TIFF* tif, uint32 off)
-{
-	(void) off;
-	TIFFError(tif->tif_name,
-	    "Compression algorithm does not support random access");
-	return (0);
-}
-
-int
-_TIFFNoPreCode(TIFF* tif, tsample_t s)
-{
-	(void) tif; (void) s;
-	return (1);
-}
-
-static int _TIFFtrue(TIFF* tif) { (void) tif; return (1); }
-static void _TIFFvoid(TIFF* tif) { (void) tif; }
-
-void
-_TIFFSetDefaultCompressionState(TIFF* tif)
-{
-	tif->tif_decodestatus = TRUE;
-	tif->tif_setupdecode = _TIFFtrue;
-	tif->tif_predecode = _TIFFNoPreCode;
-	tif->tif_decoderow = _TIFFNoRowDecode;
-	tif->tif_decodestrip = _TIFFNoStripDecode;
-	tif->tif_decodetile = _TIFFNoTileDecode;
-	tif->tif_encodestatus = TRUE;
-	tif->tif_setupencode = _TIFFtrue;
-	tif->tif_preencode = _TIFFNoPreCode;
-	tif->tif_postencode = _TIFFtrue;
-	tif->tif_encoderow = _TIFFNoRowEncode;
-	tif->tif_encodestrip = _TIFFNoStripEncode;
-	tif->tif_encodetile = _TIFFNoTileEncode;
-	tif->tif_close = _TIFFvoid;
-	tif->tif_seek = _TIFFNoSeek;
-	tif->tif_cleanup = _TIFFvoid;
-	tif->tif_defstripsize = _TIFFDefaultStripSize;
-	tif->tif_deftilesize = _TIFFDefaultTileSize;
-	tif->tif_flags &= ~TIFF_NOBITREV;
-}
-
-int
-TIFFSetCompressionScheme(TIFF* tif, int scheme)
-{
-	const TIFFCodec *c = TIFFFindCODEC((uint16) scheme);
-
-	_TIFFSetDefaultCompressionState(tif);
-	/*
-	 * Don't treat an unknown compression scheme as an error.
-	 * This permits applications to open files with data that
-	 * the library does not have builtin support for, but which
-	 * may still be meaningful.
-	 */
-	return (c ? (*c->init)(tif, scheme) : 1);
-}
-
-/*
- * Other compression schemes may be registered.  Registered
- * schemes can also override the builtin versions provided
- * by this library.
- */
-typedef struct _codec {
-	struct _codec*	next;
-	TIFFCodec*	info;
-} codec_t;
-static	codec_t* registeredCODECS = NULL;
-
-const TIFFCodec*
-TIFFFindCODEC(uint16 scheme)
-{
-	const TIFFCodec* c;
-	codec_t* cd;
-
-	for (cd = registeredCODECS; cd; cd = cd->next)
-		if (cd->info->scheme == scheme)
-			return ((const TIFFCodec*) cd->info);
-	for (c = _TIFFBuiltinCODECS; c->name; c++)
-		if (c->scheme == scheme)
-			return (c);
-	return ((const TIFFCodec*) 0);
-}
-
-TIFFCodec*
-TIFFRegisterCODEC(uint16 scheme, const char* name, TIFFInitMethod init)
-{
-	codec_t* cd = (codec_t*)
-	    _TIFFmalloc(sizeof (codec_t) + sizeof (TIFFCodec) + strlen(name)+1);
-
-	if (cd != NULL) {
-		cd->info = (TIFFCodec*) ((tidata_t) cd + sizeof (codec_t));
-		cd->info->name = (char*)
-		    ((tidata_t) cd->info + sizeof (TIFFCodec));
-		strcpy(cd->info->name, name);
-		cd->info->scheme = scheme;
-		cd->info->init = init;
-		cd->next = registeredCODECS;
-		registeredCODECS = cd;
-	} else
-		TIFFError("TIFFRegisterCODEC",
-		    "No space to register compression scheme %s", name);
-	return (cd->info);
-}
-
-void
-TIFFUnRegisterCODEC(TIFFCodec* c)
-{
-	codec_t* cd;
-	codec_t** pcd;
-
-	for (pcd = ®isteredCODECS; (cd = *pcd); pcd = &cd->next)
-		if (cd->info == c) {
-			*pcd = cd->next;
-			_TIFFfree(cd);
-			return;
-		}
-	TIFFError("TIFFUnRegisterCODEC",
-	    "Cannot remove compression scheme %s; not registered", c->name);
-}
diff --git a/src/tiff/tif_dir.c b/src/tiff/tif_dir.c
deleted file mode 100644
index 44e6c2a..0000000
--- a/src/tiff/tif_dir.c
+++ /dev/null
@@ -1,1419 +0,0 @@
-/* $Header: /home/terralib/src/tiff/tif_dir.c,v 1.3 2004/03/19 11:51:24 lubia Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library.
- *
- * Directory Tag Get & Set Routines.
- * (and also some miscellaneous stuff)
- */
-#include "tiffiop.h"
-
-/*
- * These are used in the backwards compatibility code...
- */
-#define DATATYPE_VOID		0       /* !untyped data */
-#define DATATYPE_INT		1       /* !signed integer data */
-#define DATATYPE_UINT		2       /* !unsigned integer data */
-#define DATATYPE_IEEEFP		3       /* !IEEE floating point data */
-
-void
-_TIFFsetByteArray(void** vpp, void* vp, long n)
-{
-	if (*vpp)
-		_TIFFfree(*vpp), *vpp = 0;
-	if (vp && (*vpp = (void*) _TIFFmalloc(n)))
-		_TIFFmemcpy(*vpp, vp, n);
-}
-void _TIFFsetString(char** cpp, char* cp)
-    { _TIFFsetByteArray((void**) cpp, (void*) cp, (long) (strlen(cp)+1)); }
-void _TIFFsetNString(char** cpp, char* cp, long n)
-    { _TIFFsetByteArray((void**) cpp, (void*) cp, n); }
-void _TIFFsetShortArray(uint16** wpp, uint16* wp, long n)
-    { _TIFFsetByteArray((void**) wpp, (void*) wp, n*sizeof (uint16)); }
-void _TIFFsetLongArray(uint32** lpp, uint32* lp, long n)
-    { _TIFFsetByteArray((void**) lpp, (void*) lp, n*sizeof (uint32)); }
-void _TIFFsetFloatArray(float** fpp, float* fp, long n)
-    { _TIFFsetByteArray((void**) fpp, (void*) fp, n*sizeof (float)); }
-void _TIFFsetDoubleArray(double** dpp, double* dp, long n)
-    { _TIFFsetByteArray((void**) dpp, (void*) dp, n*sizeof (double)); }
-
-/*
- * Install extra samples information.
- */
-static int
-setExtraSamples(TIFFDirectory* td, va_list ap, int* v)
-{
-	uint16* va;
-	int i;
-
-	*v = va_arg(ap, int);
-	if ((uint16) *v > td->td_samplesperpixel)
-		return (0);
-	va = va_arg(ap, uint16*);
-	if (*v > 0 && va == NULL)		/* typically missing param */
-		return (0);
-	for (i = 0; i < *v; i++)
-		if (va[i] > EXTRASAMPLE_UNASSALPHA)
-			return (0);
-	td->td_extrasamples = (uint16) *v;
-	_TIFFsetShortArray(&td->td_sampleinfo, va, td->td_extrasamples);
-	return (1);
-}
-
-static int
-checkInkNamesString(TIFF* tif, int slen, const char* s)
-{
-	TIFFDirectory* td = &tif->tif_dir;
-	int i = td->td_samplesperpixel;
-
-	if (slen > 0) {
-		const char* ep = s+slen;
-		const char* cp = s;
-		for (; i > 0; i--) {
-			for (; *cp != '\0'; cp++)
-				if (cp >= ep)
-					goto bad;
-			cp++;				/* skip \0 */
-		}
-		return (cp-s);
-	}
-bad:
-	TIFFError("TIFFSetField",
-	    "%s: Invalid InkNames value; expecting %d names, found %d",
-	    tif->tif_name,
-	    td->td_samplesperpixel,
-	    td->td_samplesperpixel-i);
-	return (0);
-}
-
-static int
-_TIFFVSetField(TIFF* tif, ttag_t tag, va_list ap)
-{
-	static const char module[] = "_TIFFVSetField";
-	
-	TIFFDirectory* td = &tif->tif_dir;
-	int status = 1;
-	uint32 v32;
-	int i, v;
-	double d;
-	char* s;
-
-	switch (tag) {
-	case TIFFTAG_SUBFILETYPE:
-		td->td_subfiletype = va_arg(ap, uint32);
-		break;
-	case TIFFTAG_IMAGEWIDTH:
-		td->td_imagewidth = va_arg(ap, uint32);
-		break;
-	case TIFFTAG_IMAGELENGTH:
-		td->td_imagelength = va_arg(ap, uint32);
-		break;
-	case TIFFTAG_BITSPERSAMPLE:
-		td->td_bitspersample = (uint16) va_arg(ap, int);
-		/*
-		 * If the data require post-decoding processing
-		 * to byte-swap samples, set it up here.  Note
-		 * that since tags are required to be ordered,
-		 * compression code can override this behaviour
-		 * in the setup method if it wants to roll the
-		 * post decoding work in with its normal work.
-		 */
-		if (tif->tif_flags & TIFF_SWAB) {
-			if (td->td_bitspersample == 16)
-				tif->tif_postdecode = _TIFFSwab16BitData;
-			else if (td->td_bitspersample == 32)
-				tif->tif_postdecode = _TIFFSwab32BitData;
-			else if (td->td_bitspersample == 64)
-				tif->tif_postdecode = _TIFFSwab64BitData;
-		}
-		break;
-	case TIFFTAG_COMPRESSION:
-		v = va_arg(ap, int) & 0xffff;
-		/*
-		 * If we're changing the compression scheme,
-		 * the notify the previous module so that it
-		 * can cleanup any state it's setup.
-		 */
-		if (TIFFFieldSet(tif, FIELD_COMPRESSION)) {
-			if (td->td_compression == v)
-				break;
-			(*tif->tif_cleanup)(tif);
-			tif->tif_flags &= ~TIFF_CODERSETUP;
-		}
-		/*
-		 * Setup new compression routine state.
-		 */
-		if( (status = TIFFSetCompressionScheme(tif, v)) != 0 )
-                    td->td_compression = (uint16) v;
-                else
-                    status = 0;
-		break;
-	case TIFFTAG_PHOTOMETRIC:
-		td->td_photometric = (uint16) va_arg(ap, int);
-		break;
-	case TIFFTAG_THRESHHOLDING:
-		td->td_threshholding = (uint16) va_arg(ap, int);
-		break;
-	case TIFFTAG_FILLORDER:
-		v = va_arg(ap, int);
-		if (v != FILLORDER_LSB2MSB && v != FILLORDER_MSB2LSB)
-			goto badvalue;
-		td->td_fillorder = (uint16) v;
-		break;
-	case TIFFTAG_DOCUMENTNAME:
-		_TIFFsetString(&td->td_documentname, va_arg(ap, char*));
-		break;
-	case TIFFTAG_ARTIST:
-		_TIFFsetString(&td->td_artist, va_arg(ap, char*));
-		break;
-	case TIFFTAG_DATETIME:
-		_TIFFsetString(&td->td_datetime, va_arg(ap, char*));
-		break;
-	case TIFFTAG_HOSTCOMPUTER:
-		_TIFFsetString(&td->td_hostcomputer, va_arg(ap, char*));
-		break;
-	case TIFFTAG_IMAGEDESCRIPTION:
-		_TIFFsetString(&td->td_imagedescription, va_arg(ap, char*));
-		break;
-	case TIFFTAG_MAKE:
-		_TIFFsetString(&td->td_make, va_arg(ap, char*));
-		break;
-	case TIFFTAG_MODEL:
-		_TIFFsetString(&td->td_model, va_arg(ap, char*));
-		break;
-	case TIFFTAG_COPYRIGHT:
-		_TIFFsetString(&td->td_copyright, va_arg(ap, char*));
-		break;
-	case TIFFTAG_ORIENTATION:
-		v = va_arg(ap, int);
-		if (v < ORIENTATION_TOPLEFT || ORIENTATION_LEFTBOT < v) {
-			TIFFWarning(tif->tif_name,
-			    "Bad value %ld for \"%s\" tag ignored",
-			    v, _TIFFFieldWithTag(tif, tag)->field_name);
-		} else
-			td->td_orientation = (uint16) v;
-		break;
-	case TIFFTAG_SAMPLESPERPIXEL:
-		/* XXX should cross check -- e.g. if pallette, then 1 */
-		v = va_arg(ap, int);
-		if (v == 0)
-			goto badvalue;
-		td->td_samplesperpixel = (uint16) v;
-		break;
-	case TIFFTAG_ROWSPERSTRIP:
-		v32 = va_arg(ap, uint32);
-		if (v32 == 0)
-			goto badvalue32;
-		td->td_rowsperstrip = v32;
-		if (!TIFFFieldSet(tif, FIELD_TILEDIMENSIONS)) {
-			td->td_tilelength = v32;
-			td->td_tilewidth = td->td_imagewidth;
-		}
-		break;
-	case TIFFTAG_MINSAMPLEVALUE:
-		td->td_minsamplevalue = (uint16) va_arg(ap, int);
-		break;
-	case TIFFTAG_MAXSAMPLEVALUE:
-		td->td_maxsamplevalue = (uint16) va_arg(ap, int);
-		break;
-	case TIFFTAG_SMINSAMPLEVALUE:
-		td->td_sminsamplevalue = (double) va_arg(ap, dblparam_t);
-		break;
-	case TIFFTAG_SMAXSAMPLEVALUE:
-		td->td_smaxsamplevalue = (double) va_arg(ap, dblparam_t);
-		break;
-	case TIFFTAG_XRESOLUTION:
-		td->td_xresolution = (float) va_arg(ap, dblparam_t);
-		break;
-	case TIFFTAG_YRESOLUTION:
-		td->td_yresolution = (float) va_arg(ap, dblparam_t);
-		break;
-	case TIFFTAG_PLANARCONFIG:
-		v = va_arg(ap, int);
-		if (v != PLANARCONFIG_CONTIG && v != PLANARCONFIG_SEPARATE)
-			goto badvalue;
-		td->td_planarconfig = (uint16) v;
-		break;
-	case TIFFTAG_PAGENAME:
-		_TIFFsetString(&td->td_pagename, va_arg(ap, char*));
-		break;
-	case TIFFTAG_XPOSITION:
-		td->td_xposition = (float) va_arg(ap, dblparam_t);
-		break;
-	case TIFFTAG_YPOSITION:
-		td->td_yposition = (float) va_arg(ap, dblparam_t);
-		break;
-	case TIFFTAG_RESOLUTIONUNIT:
-		v = va_arg(ap, int);
-		if (v < RESUNIT_NONE || RESUNIT_CENTIMETER < v)
-			goto badvalue;
-		td->td_resolutionunit = (uint16) v;
-		break;
-	case TIFFTAG_PAGENUMBER:
-		td->td_pagenumber[0] = (uint16) va_arg(ap, int);
-		td->td_pagenumber[1] = (uint16) va_arg(ap, int);
-		break;
-	case TIFFTAG_HALFTONEHINTS:
-		td->td_halftonehints[0] = (uint16) va_arg(ap, int);
-		td->td_halftonehints[1] = (uint16) va_arg(ap, int);
-		break;
-	case TIFFTAG_COLORMAP:
-		v32 = (uint32)(1L<<td->td_bitspersample);
-		_TIFFsetShortArray(&td->td_colormap[0], va_arg(ap, uint16*), v32);
-		_TIFFsetShortArray(&td->td_colormap[1], va_arg(ap, uint16*), v32);
-		_TIFFsetShortArray(&td->td_colormap[2], va_arg(ap, uint16*), v32);
-		break;
-	case TIFFTAG_EXTRASAMPLES:
-		if (!setExtraSamples(td, ap, &v))
-			goto badvalue;
-		break;
-	case TIFFTAG_MATTEING:
-		td->td_extrasamples = (uint16) (va_arg(ap, int) != 0);
-		if (td->td_extrasamples) {
-			uint16 sv = EXTRASAMPLE_ASSOCALPHA;
-			_TIFFsetShortArray(&td->td_sampleinfo, &sv, 1);
-		}
-		break;
-	case TIFFTAG_TILEWIDTH:
-		v32 = va_arg(ap, uint32);
-		if (v32 % 16) {
-			if (tif->tif_mode != O_RDONLY)
-				goto badvalue32;
-			TIFFWarning(tif->tif_name,
-			    "Nonstandard tile width %d, convert file", v32);
-		}
-		td->td_tilewidth = v32;
-		tif->tif_flags |= TIFF_ISTILED;
-		break;
-	case TIFFTAG_TILELENGTH:
-		v32 = va_arg(ap, uint32);
-		if (v32 % 16) {
-			if (tif->tif_mode != O_RDONLY)
-				goto badvalue32;
-			TIFFWarning(tif->tif_name,
-			    "Nonstandard tile length %d, convert file", v32);
-		}
-		td->td_tilelength = v32;
-		tif->tif_flags |= TIFF_ISTILED;
-		break;
-	case TIFFTAG_TILEDEPTH:
-		v32 = va_arg(ap, uint32);
-		if (v32 == 0)
-			goto badvalue32;
-		td->td_tiledepth = v32;
-		break;
-	case TIFFTAG_DATATYPE:
-		v = va_arg(ap, int);
-		switch (v) {
-		case DATATYPE_VOID:	v = SAMPLEFORMAT_VOID;	break;
-		case DATATYPE_INT:	v = SAMPLEFORMAT_INT;	break;
-		case DATATYPE_UINT:	v = SAMPLEFORMAT_UINT;	break;
-		case DATATYPE_IEEEFP:	v = SAMPLEFORMAT_IEEEFP;break;
-		default:		goto badvalue;
-		}
-		td->td_sampleformat = (uint16) v;
-		break;
-	case TIFFTAG_SAMPLEFORMAT:
-		v = va_arg(ap, int);
-		if (v < SAMPLEFORMAT_UINT || SAMPLEFORMAT_COMPLEXIEEEFP < v)
-			goto badvalue;
-		td->td_sampleformat = (uint16) v;
-
-                /*  Try to fix up the SWAB function for complex data. */
-                if( td->td_sampleformat == SAMPLEFORMAT_COMPLEXINT 
-                    && td->td_bitspersample == 32
-                    && tif->tif_postdecode == _TIFFSwab32BitData )
-                    tif->tif_postdecode = _TIFFSwab16BitData;
-                else if( (td->td_sampleformat == SAMPLEFORMAT_COMPLEXINT 
-                          || td->td_sampleformat == SAMPLEFORMAT_COMPLEXIEEEFP)
-                         && td->td_bitspersample == 64
-                         && tif->tif_postdecode == _TIFFSwab64BitData )
-                    tif->tif_postdecode = _TIFFSwab32BitData;
-                else if( td->td_sampleformat == SAMPLEFORMAT_COMPLEXIEEEFP
-                         && td->td_bitspersample == 128
-                         && tif->tif_postdecode == NULL )
-                    tif->tif_postdecode = _TIFFSwab64BitData;
-		break;
-	case TIFFTAG_IMAGEDEPTH:
-		td->td_imagedepth = va_arg(ap, uint32);
-		break;
-	case TIFFTAG_STONITS:
-		d = va_arg(ap, dblparam_t);
-		if (d <= 0.)
-			goto badvaluedbl;
-		td->td_stonits = d;
-		break;
-	/* Begin Pixar Tags */
- 	case TIFFTAG_PIXAR_IMAGEFULLWIDTH:
- 		td->td_imagefullwidth = va_arg(ap, uint32);
- 		break;
- 	case TIFFTAG_PIXAR_IMAGEFULLLENGTH:
- 		td->td_imagefulllength = va_arg(ap, uint32);
- 		break;
- 	case TIFFTAG_PIXAR_TEXTUREFORMAT:
- 		_TIFFsetString(&td->td_textureformat, va_arg(ap, char*));
- 		break;
- 	case TIFFTAG_PIXAR_WRAPMODES:
- 		_TIFFsetString(&td->td_wrapmodes, va_arg(ap, char*));
- 		break;
- 	case TIFFTAG_PIXAR_FOVCOT:
- 		td->td_fovcot = (float) va_arg(ap, dblparam_t);
- 		break;
- 	case TIFFTAG_PIXAR_MATRIX_WORLDTOSCREEN:
- 		_TIFFsetFloatArray(&td->td_matrixWorldToScreen,
- 			va_arg(ap, float*), 16);
- 		break;
- 	case TIFFTAG_PIXAR_MATRIX_WORLDTOCAMERA:
- 		_TIFFsetFloatArray(&td->td_matrixWorldToCamera,
- 			va_arg(ap, float*), 16);
- 		break;
- 	/* End Pixar Tags */	       
-
-	case TIFFTAG_SUBIFD:
-		if ((tif->tif_flags & TIFF_INSUBIFD) == 0) {
-			td->td_nsubifd = (uint16) va_arg(ap, int);
-			_TIFFsetLongArray(&td->td_subifd, va_arg(ap, uint32*),
-			    (long) td->td_nsubifd);
-		} else {
-			TIFFError(module, "%s: Sorry, cannot nest SubIFDs",
-				  tif->tif_name);
-			status = 0;
-		}
-		break;
-	case TIFFTAG_YCBCRCOEFFICIENTS:
-		_TIFFsetFloatArray(&td->td_ycbcrcoeffs, va_arg(ap, float*), 3);
-		break;
-	case TIFFTAG_YCBCRPOSITIONING:
-		td->td_ycbcrpositioning = (uint16) va_arg(ap, int);
-		break;
-	case TIFFTAG_YCBCRSUBSAMPLING:
-		td->td_ycbcrsubsampling[0] = (uint16) va_arg(ap, int);
-		td->td_ycbcrsubsampling[1] = (uint16) va_arg(ap, int);
-		break;
-	case TIFFTAG_WHITEPOINT:
-		_TIFFsetFloatArray(&td->td_whitepoint, va_arg(ap, float*), 2);
-		break;
-	case TIFFTAG_PRIMARYCHROMATICITIES:
-		_TIFFsetFloatArray(&td->td_primarychromas, va_arg(ap, float*), 6);
-		break;
-	case TIFFTAG_TRANSFERFUNCTION:
-		v = (td->td_samplesperpixel - td->td_extrasamples) > 1 ? 3 : 1;
-		for (i = 0; i < v; i++)
-			_TIFFsetShortArray(&td->td_transferfunction[i],
-			    va_arg(ap, uint16*), 1L<<td->td_bitspersample);
-		break;
-	case TIFFTAG_REFERENCEBLACKWHITE:
-		/* XXX should check for null range */
-		_TIFFsetFloatArray(&td->td_refblackwhite, va_arg(ap, float*), 6);
-		break;
-	case TIFFTAG_INKSET:
-		td->td_inkset = (uint16) va_arg(ap, int);
-		break;
-	case TIFFTAG_DOTRANGE:
-		/* XXX should check for null range */
-		td->td_dotrange[0] = (uint16) va_arg(ap, int);
-		td->td_dotrange[1] = (uint16) va_arg(ap, int);
-		break;
-	case TIFFTAG_INKNAMES:
-		i = va_arg(ap, int);
-		s = va_arg(ap, char*);
-		i = checkInkNamesString(tif, i, s);
-                status = i > 0;
-		if( i > 0 ) {
-			_TIFFsetNString(&td->td_inknames, s, i);
-			td->td_inknameslen = i;
-		}
-		break;
-	case TIFFTAG_NUMBEROFINKS:
-		td->td_ninks = (uint16) va_arg(ap, int);
-		break;
-	case TIFFTAG_TARGETPRINTER:
-		_TIFFsetString(&td->td_targetprinter, va_arg(ap, char*));
-		break;
-	case TIFFTAG_ICCPROFILE:
-		td->td_profileLength = (uint32) va_arg(ap, uint32);
-		_TIFFsetByteArray(&td->td_profileData, va_arg(ap, void*),
-		    td->td_profileLength);
-		break;
- 	case TIFFTAG_PHOTOSHOP:
-  		td->td_photoshopLength = (uint32) va_arg(ap, uint32);
-  		_TIFFsetByteArray (&td->td_photoshopData, va_arg(ap, void*),
- 			td->td_photoshopLength);
- 		break;
-	case TIFFTAG_RICHTIFFIPTC: 
-  		td->td_richtiffiptcLength = (uint32) va_arg(ap, uint32);
-  		_TIFFsetLongArray ((uint32**)&td->td_richtiffiptcData,
-				   va_arg(ap, uint32*),
-				   td->td_richtiffiptcLength);
- 		break;
-	case TIFFTAG_XMLPACKET:
-		td->td_xmlpacketLength = (uint32) va_arg(ap, uint32);
-		_TIFFsetByteArray(&td->td_xmlpacketData, va_arg(ap, void*),
-		    td->td_xmlpacketLength);
-		break;
-        default: {
-            const TIFFFieldInfo* fip = _TIFFFindFieldInfo(tif, tag, TIFF_ANY);
-            TIFFTagValue *tv;
-            int           tv_size, iCustom;
-
-            /*
-             * This can happen if multiple images are open with
-             * different codecs which have private tags.  The
-             * global tag information table may then have tags
-             * that are valid for one file but not the other. 
-             * If the client tries to set a tag that is not valid
-             * for the image's codec then we'll arrive here.  This
-             * happens, for example, when tiffcp is used to convert
-             * between compression schemes and codec-specific tags
-             * are blindly copied.
-             */
-            if( fip == NULL || fip->field_bit != FIELD_CUSTOM )
-            {
-		TIFFError(module,
-		    "%s: Invalid %stag \"%s\" (not supported by codec)",
-		    tif->tif_name, isPseudoTag(tag) ? "pseudo-" : "",
-		    _TIFFFieldWithTag(tif, tag)->field_name);
-		status = 0;
-		break;
-            }
-
-            /*
-             * Find the existing entry for this custom value.
-             */
-            tv = NULL;
-            for( iCustom = 0; iCustom < td->td_customValueCount; iCustom++ )
-            {
-                if( td->td_customValues[iCustom].info == fip )
-                {
-                    tv = td->td_customValues + iCustom;
-                    if( tv->value != NULL )
-                        _TIFFfree( tv->value );
-                    break;
-                }
-            }
-
-            /*
-             * Grow the custom list if the entry was not found.
-             */
-            if( tv == NULL )
-            {
-                td->td_customValueCount++;
-                if( td->td_customValueCount > 1 )
-                    td->td_customValues = (TIFFTagValue *)
-                        _TIFFrealloc(td->td_customValues,
-                                     sizeof(TIFFTagValue) * td->td_customValueCount);
-                else
-                    td->td_customValues = (TIFFTagValue *)
-                        _TIFFmalloc(sizeof(TIFFTagValue));
-
-                tv = td->td_customValues + (td->td_customValueCount-1);
-                tv->info = fip;
-                tv->value = NULL;
-                tv->count = 0;
-            }
-
-            /*
-             * Set custom value ... save a copy of the custom tag value.
-             */
-            tv_size = TIFFDataWidth(fip->field_type);
-            if( fip->field_passcount )
-                tv->count = (int) va_arg(ap, int);
-            else
-                tv->count = 1;
-            if( fip->field_passcount )
-            {
-                tv->value = _TIFFmalloc(tv_size * tv->count);
-		if ( !tv->value ) {
-			va_end(ap);
-			return 0;
-		}
-                _TIFFmemcpy( tv->value, (void *) va_arg(ap,void*),
-                             tv->count * tv_size );
-            }
-            else if( fip->field_type == TIFF_ASCII )
-            {
-                const char *value = (const char *) va_arg(ap,const char *);
-                tv->count = strlen(value)+1;
-                tv->value = _TIFFmalloc(tv->count);
-		if ( !tv->value ) {
-			va_end(ap);
-			return 0;
-		}
-                strcpy( tv->value, value );
-            }
-            else
-            {
-                /* not supporting "pass by value" types yet */
-		TIFFWarning(module, " ... pass by value not implemented.");
-
-                tv->value = _TIFFmalloc(tv_size * tv->count);
-		if ( !tv->value ) {
-			va_end(ap);
-			return 0;
-		}
-                _TIFFmemset( tv->value, 0, tv->count * tv_size );
-                status = 0;
-            }
-          }
-	}
-	if (status) {
-            TIFFSetFieldBit(tif, _TIFFFieldWithTag(tif, tag)->field_bit);
-            tif->tif_flags |= TIFF_DIRTYDIRECT;
-	}
-	va_end(ap);
-	return (status);
-badvalue:
-	TIFFError(module, "%.1000s: Bad value %d for \"%s\"",
-		  tif->tif_name, v, _TIFFFieldWithTag(tif, tag)->field_name);
-	va_end(ap);
-	return (0);
-badvalue32:
-	TIFFError(module, "%.1000s: Bad value %ld for \"%s\"",
-		   tif->tif_name, v32, _TIFFFieldWithTag(tif, tag)->field_name);
-	va_end(ap);
-	return (0);
-badvaluedbl:
-	TIFFError(module, "%.1000s: Bad value %f for \"%s\"",
-		  tif->tif_name, d, _TIFFFieldWithTag(tif, tag)->field_name);
-	va_end(ap);
-	return (0);
-}
-
-/*
- * Return 1/0 according to whether or not
- * it is permissible to set the tag's value.
- * Note that we allow ImageLength to be changed
- * so that we can append and extend to images.
- * Any other tag may not be altered once writing
- * has commenced, unless its value has no effect
- * on the format of the data that is written.
- */
-static int
-OkToChangeTag(TIFF* tif, ttag_t tag)
-{
-	const TIFFFieldInfo* fip = _TIFFFindFieldInfo(tif, tag, TIFF_ANY);
-	if (!fip) {			/* unknown tag */
-		TIFFError("TIFFSetField", "%s: Unknown %stag %u",
-		    tif->tif_name, isPseudoTag(tag) ? "pseudo-" : "", tag);
-		return (0);
-	}
-	if (tag != TIFFTAG_IMAGELENGTH && (tif->tif_flags & TIFF_BEENWRITING) &&
-	    !fip->field_oktochange) {
-		/*
-		 * Consult info table to see if tag can be changed
-		 * after we've started writing.  We only allow changes
-		 * to those tags that don't/shouldn't affect the
-		 * compression and/or format of the data.
-		 */
-		TIFFError("TIFFSetField",
-		    "%s: Cannot modify tag \"%s\" while writing",
-		    tif->tif_name, fip->field_name);
-		return (0);
-	}
-	return (1);
-}
-
-/*
- * Record the value of a field in the
- * internal directory structure.  The
- * field will be written to the file
- * when/if the directory structure is
- * updated.
- */
-int
-TIFFSetField(TIFF* tif, ttag_t tag, ...)
-{
-	va_list ap;
-	int status;
-
-	va_start(ap, tag);
-	status = TIFFVSetField(tif, tag, ap);
-	va_end(ap);
-	return (status);
-}
-
-/*
- * Like TIFFSetField, but taking a varargs
- * parameter list.  This routine is useful
- * for building higher-level interfaces on
- * top of the library.
- */
-int
-TIFFVSetField(TIFF* tif, ttag_t tag, va_list ap)
-{
-	return OkToChangeTag(tif, tag) ?
-	    (*tif->tif_tagmethods.vsetfield)(tif, tag, ap) : 0;
-}
-
-static int
-_TIFFVGetField(TIFF* tif, ttag_t tag, va_list ap)
-{
-    TIFFDirectory* td = &tif->tif_dir;
-    int            ret_val = 1;
-
-    switch (tag) {
-	case TIFFTAG_SUBFILETYPE:
-            *va_arg(ap, uint32*) = td->td_subfiletype;
-            break;
-	case TIFFTAG_IMAGEWIDTH:
-            *va_arg(ap, uint32*) = td->td_imagewidth;
-            break;
-	case TIFFTAG_IMAGELENGTH:
-            *va_arg(ap, uint32*) = td->td_imagelength;
-            break;
-	case TIFFTAG_BITSPERSAMPLE:
-            *va_arg(ap, uint16*) = td->td_bitspersample;
-            break;
-	case TIFFTAG_COMPRESSION:
-            *va_arg(ap, uint16*) = td->td_compression;
-            break;
-	case TIFFTAG_PHOTOMETRIC:
-            *va_arg(ap, uint16*) = td->td_photometric;
-            break;
-	case TIFFTAG_THRESHHOLDING:
-            *va_arg(ap, uint16*) = td->td_threshholding;
-            break;
-	case TIFFTAG_FILLORDER:
-            *va_arg(ap, uint16*) = td->td_fillorder;
-            break;
-	case TIFFTAG_DOCUMENTNAME:
-            *va_arg(ap, char**) = td->td_documentname;
-            break;
-	case TIFFTAG_ARTIST:
-            *va_arg(ap, char**) = td->td_artist;
-            break;
-	case TIFFTAG_DATETIME:
-            *va_arg(ap, char**) = td->td_datetime;
-            break;
-	case TIFFTAG_HOSTCOMPUTER:
-            *va_arg(ap, char**) = td->td_hostcomputer;
-            break;
-	case TIFFTAG_IMAGEDESCRIPTION:
-            *va_arg(ap, char**) = td->td_imagedescription;
-            break;
-	case TIFFTAG_MAKE:
-            *va_arg(ap, char**) = td->td_make;
-            break;
-	case TIFFTAG_MODEL:
-            *va_arg(ap, char**) = td->td_model;
-            break;
-	case TIFFTAG_COPYRIGHT:
-            *va_arg(ap, char**) = td->td_copyright;
-            break;
-	case TIFFTAG_ORIENTATION:
-            *va_arg(ap, uint16*) = td->td_orientation;
-            break;
-	case TIFFTAG_SAMPLESPERPIXEL:
-            *va_arg(ap, uint16*) = td->td_samplesperpixel;
-            break;
-	case TIFFTAG_ROWSPERSTRIP:
-            *va_arg(ap, uint32*) = td->td_rowsperstrip;
-            break;
-	case TIFFTAG_MINSAMPLEVALUE:
-            *va_arg(ap, uint16*) = td->td_minsamplevalue;
-            break;
-	case TIFFTAG_MAXSAMPLEVALUE:
-            *va_arg(ap, uint16*) = td->td_maxsamplevalue;
-            break;
-	case TIFFTAG_SMINSAMPLEVALUE:
-            *va_arg(ap, double*) = td->td_sminsamplevalue;
-            break;
-	case TIFFTAG_SMAXSAMPLEVALUE:
-            *va_arg(ap, double*) = td->td_smaxsamplevalue;
-            break;
-	case TIFFTAG_XRESOLUTION:
-            *va_arg(ap, float*) = td->td_xresolution;
-            break;
-	case TIFFTAG_YRESOLUTION:
-            *va_arg(ap, float*) = td->td_yresolution;
-            break;
-	case TIFFTAG_PLANARCONFIG:
-            *va_arg(ap, uint16*) = td->td_planarconfig;
-            break;
-	case TIFFTAG_XPOSITION:
-            *va_arg(ap, float*) = td->td_xposition;
-            break;
-	case TIFFTAG_YPOSITION:
-            *va_arg(ap, float*) = td->td_yposition;
-            break;
-	case TIFFTAG_PAGENAME:
-            *va_arg(ap, char**) = td->td_pagename;
-            break;
-	case TIFFTAG_RESOLUTIONUNIT:
-            *va_arg(ap, uint16*) = td->td_resolutionunit;
-            break;
-	case TIFFTAG_PAGENUMBER:
-            *va_arg(ap, uint16*) = td->td_pagenumber[0];
-            *va_arg(ap, uint16*) = td->td_pagenumber[1];
-            break;
-	case TIFFTAG_HALFTONEHINTS:
-            *va_arg(ap, uint16*) = td->td_halftonehints[0];
-            *va_arg(ap, uint16*) = td->td_halftonehints[1];
-            break;
-	case TIFFTAG_COLORMAP:
-            *va_arg(ap, uint16**) = td->td_colormap[0];
-            *va_arg(ap, uint16**) = td->td_colormap[1];
-            *va_arg(ap, uint16**) = td->td_colormap[2];
-            break;
-	case TIFFTAG_STRIPOFFSETS:
-	case TIFFTAG_TILEOFFSETS:
-            *va_arg(ap, uint32**) = td->td_stripoffset;
-            break;
-	case TIFFTAG_STRIPBYTECOUNTS:
-	case TIFFTAG_TILEBYTECOUNTS:
-            *va_arg(ap, uint32**) = td->td_stripbytecount;
-            break;
-	case TIFFTAG_MATTEING:
-            *va_arg(ap, uint16*) =
-                (td->td_extrasamples == 1 &&
-                 td->td_sampleinfo[0] == EXTRASAMPLE_ASSOCALPHA);
-            break;
-	case TIFFTAG_EXTRASAMPLES:
-            *va_arg(ap, uint16*) = td->td_extrasamples;
-            *va_arg(ap, uint16**) = td->td_sampleinfo;
-            break;
-	case TIFFTAG_TILEWIDTH:
-            *va_arg(ap, uint32*) = td->td_tilewidth;
-            break;
-	case TIFFTAG_TILELENGTH:
-            *va_arg(ap, uint32*) = td->td_tilelength;
-            break;
-	case TIFFTAG_TILEDEPTH:
-            *va_arg(ap, uint32*) = td->td_tiledepth;
-            break;
-	case TIFFTAG_DATATYPE:
-            switch (td->td_sampleformat) {
-		case SAMPLEFORMAT_UINT:
-                    *va_arg(ap, uint16*) = DATATYPE_UINT;
-                    break;
-		case SAMPLEFORMAT_INT:
-                    *va_arg(ap, uint16*) = DATATYPE_INT;
-                    break;
-		case SAMPLEFORMAT_IEEEFP:
-                    *va_arg(ap, uint16*) = DATATYPE_IEEEFP;
-                    break;
-		case SAMPLEFORMAT_VOID:
-                    *va_arg(ap, uint16*) = DATATYPE_VOID;
-                    break;
-            }
-            break;
-	case TIFFTAG_SAMPLEFORMAT:
-            *va_arg(ap, uint16*) = td->td_sampleformat;
-            break;
-	case TIFFTAG_IMAGEDEPTH:
-            *va_arg(ap, uint32*) = td->td_imagedepth;
-            break;
-	case TIFFTAG_STONITS:
-            *va_arg(ap, double*) = td->td_stonits;
-            break;
-	case TIFFTAG_SUBIFD:
-            *va_arg(ap, uint16*) = td->td_nsubifd;
-            *va_arg(ap, uint32**) = td->td_subifd;
-            break;
-	case TIFFTAG_YCBCRCOEFFICIENTS:
-            *va_arg(ap, float**) = td->td_ycbcrcoeffs;
-            break;
-	case TIFFTAG_YCBCRPOSITIONING:
-            *va_arg(ap, uint16*) = td->td_ycbcrpositioning;
-            break;
-	case TIFFTAG_YCBCRSUBSAMPLING:
-            *va_arg(ap, uint16*) = td->td_ycbcrsubsampling[0];
-            *va_arg(ap, uint16*) = td->td_ycbcrsubsampling[1];
-            break;
-	case TIFFTAG_WHITEPOINT:
-            *va_arg(ap, float**) = td->td_whitepoint;
-            break;
-	case TIFFTAG_PRIMARYCHROMATICITIES:
-            *va_arg(ap, float**) = td->td_primarychromas;
-            break;
-	case TIFFTAG_TRANSFERFUNCTION:
-            *va_arg(ap, uint16**) = td->td_transferfunction[0];
-            if (td->td_samplesperpixel - td->td_extrasamples > 1) {
-                *va_arg(ap, uint16**) = td->td_transferfunction[1];
-                *va_arg(ap, uint16**) = td->td_transferfunction[2];
-            }
-            break;
-	case TIFFTAG_REFERENCEBLACKWHITE:
-            *va_arg(ap, float**) = td->td_refblackwhite;
-            break;
-	case TIFFTAG_INKSET:
-            *va_arg(ap, uint16*) = td->td_inkset;
-            break;
-	case TIFFTAG_DOTRANGE:
-            *va_arg(ap, uint16*) = td->td_dotrange[0];
-            *va_arg(ap, uint16*) = td->td_dotrange[1];
-            break;
-	case TIFFTAG_INKNAMES:
-            *va_arg(ap, char**) = td->td_inknames;
-            break;
-	case TIFFTAG_NUMBEROFINKS:
-            *va_arg(ap, uint16*) = td->td_ninks;
-            break;
-	case TIFFTAG_TARGETPRINTER:
-            *va_arg(ap, char**) = td->td_targetprinter;
-            break;
-	case TIFFTAG_ICCPROFILE:
-            *va_arg(ap, uint32*) = td->td_profileLength;
-            *va_arg(ap, void**) = td->td_profileData;
-            break;
- 	case TIFFTAG_PHOTOSHOP:
-            *va_arg(ap, uint32*) = td->td_photoshopLength;
-            *va_arg(ap, void**) = td->td_photoshopData;
-            break;
- 	case TIFFTAG_RICHTIFFIPTC:
-            *va_arg(ap, uint32*) = td->td_richtiffiptcLength;
-            *va_arg(ap, void**) = td->td_richtiffiptcData;
-            break;
-	case TIFFTAG_XMLPACKET:
-            *va_arg(ap, uint32*) = td->td_xmlpacketLength;
-            *va_arg(ap, void**) = td->td_xmlpacketData;
-            break;
-            /* Begin Pixar Tags */
- 	case TIFFTAG_PIXAR_IMAGEFULLWIDTH:
-            *va_arg(ap, uint32*) = td->td_imagefullwidth;
-            break;
- 	case TIFFTAG_PIXAR_IMAGEFULLLENGTH:
-            *va_arg(ap, uint32*) = td->td_imagefulllength;
-            break;
- 	case TIFFTAG_PIXAR_TEXTUREFORMAT:
-            *va_arg(ap, char**) = td->td_textureformat;
-            break;
- 	case TIFFTAG_PIXAR_WRAPMODES:
-            *va_arg(ap, char**) = td->td_wrapmodes;
-            break;
- 	case TIFFTAG_PIXAR_FOVCOT:
-            *va_arg(ap, float*) = td->td_fovcot;
-            break;
- 	case TIFFTAG_PIXAR_MATRIX_WORLDTOSCREEN:
-            *va_arg(ap, float**) = td->td_matrixWorldToScreen;
-            break;
- 	case TIFFTAG_PIXAR_MATRIX_WORLDTOCAMERA:
-            *va_arg(ap, float**) = td->td_matrixWorldToCamera;
-            break;
-            /* End Pixar Tags */
-
-        default:
-        {
-            const TIFFFieldInfo* fip = _TIFFFindFieldInfo(tif, tag, TIFF_ANY);
-            int           i;
-            
-            /*
-             * This can happen if multiple images are open with
-             * different codecs which have private tags.  The
-             * global tag information table may then have tags
-             * that are valid for one file but not the other. 
-             * If the client tries to get a tag that is not valid
-             * for the image's codec then we'll arrive here.
-             */
-            if( fip == NULL || fip->field_bit != FIELD_CUSTOM )
-            {
-                TIFFError("_TIFFVGetField",
-                          "%s: Invalid %stag \"%s\" (not supported by codec)",
-                          tif->tif_name, isPseudoTag(tag) ? "pseudo-" : "",
-                          _TIFFFieldWithTag(tif, tag)->field_name);
-                ret_val = 0;
-                break;
-            }
-
-            /*
-            ** Do we have a custom value?
-            */
-            ret_val = 0;
-            for( i = 0; i < td->td_customValueCount; i++ )
-            {
-                TIFFTagValue *tv = td->td_customValues + i;
-
-                if( tv->info->field_tag != tag )
-                    continue;
-                
-                if( fip->field_passcount )
-                {
-                    *va_arg(ap, u_short *) = (u_short) tv->count;
-                    *va_arg(ap, void **) = tv->value;
-                    ret_val = 1;
-                    break;
-                }
-                else if( fip->field_type == TIFF_ASCII )
-                {
-                    *va_arg(ap, void **) = tv->value;
-                    ret_val = 1;
-                    break;
-                }
-                else
-                {
-                    printf( "TIFFVGetField ... pass by value not imp.\n" );
-                    break;
-                }
-            }
-        }
-    }
-    return( ret_val );
-}
-
-/*
- * Return the value of a field in the
- * internal directory structure.
- */
-int
-TIFFGetField(TIFF* tif, ttag_t tag, ...)
-{
-	int status;
-	va_list ap;
-
-	va_start(ap, tag);
-	status = TIFFVGetField(tif, tag, ap);
-	va_end(ap);
-	return (status);
-}
-
-/*
- * Like TIFFGetField, but taking a varargs
- * parameter list.  This routine is useful
- * for building higher-level interfaces on
- * top of the library.
- */
-int
-TIFFVGetField(TIFF* tif, ttag_t tag, va_list ap)
-{
-	const TIFFFieldInfo* fip = _TIFFFindFieldInfo(tif, tag, TIFF_ANY);
-	return (fip && (isPseudoTag(tag) || TIFFFieldSet(tif, fip->field_bit)) ?
-	    (*tif->tif_tagmethods.vgetfield)(tif, tag, ap) : 0);
-}
-
-#define	CleanupField(member) {		\
-    if (td->member) {			\
-	_TIFFfree(td->member);		\
-	td->member = 0;			\
-    }					\
-}
-
-/*
- * Release storage associated with a directory.
- */
-void
-TIFFFreeDirectory(TIFF* tif)
-{
-    TIFFDirectory *td = &tif->tif_dir;
-    int            i;
-
-    CleanupField(td_colormap[0]);
-    CleanupField(td_colormap[1]);
-    CleanupField(td_colormap[2]);
-    CleanupField(td_documentname);
-    CleanupField(td_artist);
-    CleanupField(td_datetime);
-    CleanupField(td_hostcomputer);
-    CleanupField(td_imagedescription);
-    CleanupField(td_make);
-    CleanupField(td_model);
-    CleanupField(td_copyright);
-    CleanupField(td_pagename);
-    CleanupField(td_sampleinfo);
-    CleanupField(td_subifd);
-    CleanupField(td_ycbcrcoeffs);
-    CleanupField(td_inknames);
-    CleanupField(td_targetprinter);
-    CleanupField(td_whitepoint);
-    CleanupField(td_primarychromas);
-    CleanupField(td_refblackwhite);
-    CleanupField(td_transferfunction[0]);
-    CleanupField(td_transferfunction[1]);
-    CleanupField(td_transferfunction[2]);
-    CleanupField(td_profileData);
-    CleanupField(td_photoshopData);
-    CleanupField(td_richtiffiptcData);
-    CleanupField(td_xmlpacketData);
-    CleanupField(td_stripoffset);
-    CleanupField(td_stripbytecount);
-    /* Begin Pixar Tags */
-    CleanupField(td_textureformat);
-    CleanupField(td_wrapmodes);
-    CleanupField(td_matrixWorldToScreen);
-    CleanupField(td_matrixWorldToCamera);
-    /* End Pixar Tags */
-
-    /* Cleanup custom tag values */
-    for( i = 0; i < td->td_customValueCount; i++ )
-        _TIFFfree( td->td_customValues[i].value );
-
-    if( td->td_customValues != NULL )
-        _TIFFfree( td->td_customValues );
-          
-}
-#undef CleanupField
-
-/*
- * Client Tag extension support (from Niles Ritter).
- */
-static TIFFExtendProc _TIFFextender = (TIFFExtendProc) NULL;
-
-TIFFExtendProc
-TIFFSetTagExtender(TIFFExtendProc extender)
-{
-	TIFFExtendProc prev = _TIFFextender;
-	_TIFFextender = extender;
-	return (prev);
-}
-
-/*
- * Setup for a new directory.  Should we automatically call
- * TIFFWriteDirectory() if the current one is dirty?
- *
- * The newly created directory will not exist on the file till
- * TIFFWriteDirectory(), TIFFFlush() or TIFFClose() is called.
- */
-int
-TIFFCreateDirectory(TIFF* tif)
-{
-    TIFFDefaultDirectory(tif);
-    tif->tif_diroff = 0;
-    tif->tif_nextdiroff = 0;
-    tif->tif_curoff = 0;
-    tif->tif_row = (uint32) -1;
-    tif->tif_curstrip = (tstrip_t) -1;
-
-    return 0;
-}
-
-/*
- * Setup a default directory structure.
- */
-int
-TIFFDefaultDirectory(TIFF* tif)
-{
-	register TIFFDirectory* td = &tif->tif_dir;
-
-	_TIFFSetupFieldInfo(tif);
-	_TIFFmemset(td, 0, sizeof (*td));
-	td->td_fillorder = FILLORDER_MSB2LSB;
-	td->td_bitspersample = 1;
-	td->td_threshholding = THRESHHOLD_BILEVEL;
-	td->td_orientation = ORIENTATION_TOPLEFT;
-	td->td_samplesperpixel = 1;
-	td->td_rowsperstrip = (uint32) -1;
-	td->td_tilewidth = (uint32) -1;
-	td->td_tilelength = (uint32) -1;
-	td->td_tiledepth = 1;
-	td->td_resolutionunit = RESUNIT_INCH;
-	td->td_sampleformat = SAMPLEFORMAT_UINT;
-	td->td_imagedepth = 1;
-	td->td_ycbcrsubsampling[0] = 2;
-	td->td_ycbcrsubsampling[1] = 2;
-	td->td_ycbcrpositioning = YCBCRPOSITION_CENTERED;
-	td->td_inkset = INKSET_CMYK;
-	td->td_ninks = 4;
-	tif->tif_postdecode = _TIFFNoPostDecode;
-	tif->tif_tagmethods.vsetfield = _TIFFVSetField;
-	tif->tif_tagmethods.vgetfield = _TIFFVGetField;
-	tif->tif_tagmethods.printdir = NULL;
-	/*
-	 *  Give client code a chance to install their own
-	 *  tag extensions & methods, prior to compression overloads.
-	 */
-	if (_TIFFextender)
-		(*_TIFFextender)(tif);
-	(void) TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE);
-	/*
-	 * NB: The directory is marked dirty as a result of setting
-	 * up the default compression scheme.  However, this really
-	 * isn't correct -- we want TIFF_DIRTYDIRECT to be set only
-	 * if the user does something.  We could just do the setup
-	 * by hand, but it seems better to use the normal mechanism
-	 * (i.e. TIFFSetField).
-	 */
-	tif->tif_flags &= ~TIFF_DIRTYDIRECT;
-
-        /*
-         * As per http://bugzilla.remotesensing.org/show_bug.cgi?id=19
-         * we clear the ISTILED flag when setting up a new directory.
-         * Should we also be clearing stuff like INSUBIFD?
-         */
-        tif->tif_flags &= ~TIFF_ISTILED;
-
-	return (1);
-}
-
-static int
-TIFFAdvanceDirectory(TIFF* tif, uint32* nextdir, toff_t* off)
-{
-    static const char module[] = "TIFFAdvanceDirectory";
-    uint16 dircount;
-    if (isMapped(tif))
-    {
-        toff_t poff=*nextdir;
-        if (poff+sizeof(uint16) > tif->tif_size)
-        {
-            TIFFError(module, "%s: Error fetching directory count",
-                      tif->tif_name);
-            return (0);
-        }
-        _TIFFmemcpy(&dircount, tif->tif_base+poff, sizeof (uint16));
-        if (tif->tif_flags & TIFF_SWAB)
-            TIFFSwabShort(&dircount);
-        poff+=sizeof (uint16)+dircount*sizeof (TIFFDirEntry);
-        if (off != NULL)
-            *off = poff;
-        if (((toff_t) (poff+sizeof (uint32))) > tif->tif_size)
-        {
-            TIFFError(module, "%s: Error fetching directory link",
-                      tif->tif_name);
-            return (0);
-        }
-        _TIFFmemcpy(nextdir, tif->tif_base+poff, sizeof (uint32));
-        if (tif->tif_flags & TIFF_SWAB)
-            TIFFSwabLong(nextdir);
-        return (1);
-    }
-    else
-    {
-        if (!SeekOK(tif, *nextdir) ||
-            !ReadOK(tif, &dircount, sizeof (uint16))) {
-            TIFFError(module, "%s: Error fetching directory count",
-                      tif->tif_name);
-            return (0);
-        }
-        if (tif->tif_flags & TIFF_SWAB)
-            TIFFSwabShort(&dircount);
-        if (off != NULL)
-            *off = TIFFSeekFile(tif,
-                                dircount*sizeof (TIFFDirEntry), SEEK_CUR);
-        else
-            (void) TIFFSeekFile(tif,
-                                dircount*sizeof (TIFFDirEntry), SEEK_CUR);
-        if (!ReadOK(tif, nextdir, sizeof (uint32))) {
-            TIFFError(module, "%s: Error fetching directory link",
-                      tif->tif_name);
-            return (0);
-        }
-        if (tif->tif_flags & TIFF_SWAB)
-            TIFFSwabLong(nextdir);
-        return (1);
-    }
-}
-
-/*
- * Count the number of directories in a file.
- */
-tdir_t
-TIFFNumberOfDirectories(TIFF* tif)
-{
-    toff_t nextdir = tif->tif_header.tiff_diroff;
-    tdir_t n = 0;
-    
-    while (nextdir != 0 && TIFFAdvanceDirectory(tif, &nextdir, NULL))
-        n++;
-    return (n);
-}
-
-/*
- * Set the n-th directory as the current directory.
- * NB: Directories are numbered starting at 0.
- */
-int
-TIFFSetDirectory(TIFF* tif, tdir_t dirn)
-{
-	toff_t nextdir;
-	tdir_t n;
-
-	nextdir = tif->tif_header.tiff_diroff;
-	for (n = dirn; n > 0 && nextdir != 0; n--)
-		if (!TIFFAdvanceDirectory(tif, &nextdir, NULL))
-			return (0);
-	tif->tif_nextdiroff = nextdir;
-	/*
-	 * Set curdir to the actual directory index.  The
-	 * -1 is because TIFFReadDirectory will increment
-	 * tif_curdir after successfully reading the directory.
-	 */
-	tif->tif_curdir = (dirn - n) - 1;
-	/*
-	 * Reset tif_dirnumber counter nad start new list of seen directories.
-	 * We need this in order to prevent IFD loops.
-	 */
-	tif->tif_dirnumber = 0;
-	return (TIFFReadDirectory(tif));
-}
-
-/*
- * Set the current directory to be the directory
- * located at the specified file offset.  This interface
- * is used mainly to access directories linked with
- * the SubIFD tag (e.g. thumbnail images).
- */
-int
-TIFFSetSubDirectory(TIFF* tif, uint32 diroff)
-{
-	tif->tif_nextdiroff = diroff;
-	/*
-	 * Reset tif_dirnumber counter nad start new list of seen directories.
-	 * We need this in order to prevent IFD loops.
-	 */
-	tif->tif_dirnumber = 0;
-	return (TIFFReadDirectory(tif));
-}
-
-/*
- * Return file offset of the current directory.
- */
-uint32
-TIFFCurrentDirOffset(TIFF* tif)
-{
-	return (tif->tif_diroff);
-}
-
-/*
- * Return an indication of whether or not we are
- * at the last directory in the file.
- */
-int
-TIFFLastDirectory(TIFF* tif)
-{
-	return (tif->tif_nextdiroff == 0);
-}
-
-/*
- * Unlink the specified directory from the directory chain.
- */
-int
-TIFFUnlinkDirectory(TIFF* tif, tdir_t dirn)
-{
-	static const char module[] = "TIFFUnlinkDirectory";
-	toff_t nextdir;
-	toff_t off;
-	tdir_t n;
-
-	if (tif->tif_mode == O_RDONLY) {
-		TIFFError(module, "Can not unlink directory in read-only file");
-		return (0);
-	}
-	/*
-	 * Go to the directory before the one we want
-	 * to unlink and nab the offset of the link
-	 * field we'll need to patch.
-	 */
-	nextdir = tif->tif_header.tiff_diroff;
-	off = sizeof (uint16) + sizeof (uint16);
-	for (n = dirn-1; n > 0; n--) {
-		if (nextdir == 0) {
-			TIFFError(module, "Directory %d does not exist", dirn);
-			return (0);
-		}
-		if (!TIFFAdvanceDirectory(tif, &nextdir, &off))
-			return (0);
-	}
-	/*
-	 * Advance to the directory to be unlinked and fetch
-	 * the offset of the directory that follows.
-	 */
-	if (!TIFFAdvanceDirectory(tif, &nextdir, NULL))
-		return (0);
-	/*
-	 * Go back and patch the link field of the preceding
-	 * directory to point to the offset of the directory
-	 * that follows.
-	 */
-	(void) TIFFSeekFile(tif, off, SEEK_SET);
-	if (tif->tif_flags & TIFF_SWAB)
-		TIFFSwabLong(&nextdir);
-	if (!WriteOK(tif, &nextdir, sizeof (uint32))) {
-		TIFFError(module, "Error writing directory link");
-		return (0);
-	}
-	/*
-	 * Leave directory state setup safely.  We don't have
-	 * facilities for doing inserting and removing directories,
-	 * so it's safest to just invalidate everything.  This
-	 * means that the caller can only append to the directory
-	 * chain.
-	 */
-	(*tif->tif_cleanup)(tif);
-	if ((tif->tif_flags & TIFF_MYBUFFER) && tif->tif_rawdata) {
-		_TIFFfree(tif->tif_rawdata);
-		tif->tif_rawdata = NULL;
-		tif->tif_rawcc = 0;
-	}
-	tif->tif_flags &= ~(TIFF_BEENWRITING|TIFF_BUFFERSETUP|TIFF_POSTENCODE);
-	TIFFFreeDirectory(tif);
-	TIFFDefaultDirectory(tif);
-	tif->tif_diroff = 0;			/* force link on next write */
-	tif->tif_nextdiroff = 0;		/* next write must be at end */
-	tif->tif_curoff = 0;
-	tif->tif_row = (uint32) -1;
-	tif->tif_curstrip = (tstrip_t) -1;
-	return (1);
-}
-
-/*			[BFC]
- *
- * Author: Bruce Cameron <cameron at petris.com>
- *
- * Set a table of tags that are to be replaced during directory process by the
- * 'IGNORE' state - or return TRUE/FALSE for the requested tag such that
- * 'ReadDirectory' can use the stored information.
- */
-int
-TIFFReassignTagToIgnore (enum TIFFIgnoreSense task, int TIFFtagID)
-{
-    static int TIFFignoretags [FIELD_LAST];
-    static int tagcount = 0 ;
-    int		i;					/* Loop index */
-    int		j;					/* Loop index */
-
-    switch (task)
-    {
-      case TIS_STORE:
-        if ( tagcount < (FIELD_LAST - 1) )
-        {
-            for ( j = 0 ; j < tagcount ; ++j )
-            {					/* Do not add duplicate tag */
-                if ( TIFFignoretags [j] == TIFFtagID )
-                    return (TRUE) ;
-            }
-            TIFFignoretags [tagcount++] = TIFFtagID ;
-            return (TRUE) ;
-        }
-        break ;
-        
-      case TIS_EXTRACT:
-        for ( i = 0 ; i < tagcount ; ++i )
-        {
-            if ( TIFFignoretags [i] == TIFFtagID )
-                return (TRUE) ;
-        }
-        break;
-        
-      case TIS_EMPTY:
-        tagcount = 0 ;			/* Clear the list */
-        return (TRUE) ;
-        
-      default:
-        break;
-    }
-    
-    return (FALSE);
-}
-
diff --git a/src/tiff/tif_dir.h b/src/tiff/tif_dir.h
deleted file mode 100644
index 9b5cf55..0000000
--- a/src/tiff/tif_dir.h
+++ /dev/null
@@ -1,267 +0,0 @@
-/* $Header: /home/terralib/src/tiff/tif_dir.h,v 1.3 2004/03/19 11:51:24 lubia Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#ifndef _TIFFDIR_
-#define	_TIFFDIR_
-/*
- * ``Library-private'' Directory-related Definitions.
- */
-
-/*
- * Internal format of a TIFF directory entry.
- */
-typedef	struct {
-#define	FIELD_SETLONGS	4
-	/* bit vector of fields that are set */
-	u_long	td_fieldsset[FIELD_SETLONGS];
-
-	uint32	td_imagewidth, td_imagelength, td_imagedepth;
-	uint32	td_tilewidth, td_tilelength, td_tiledepth;
-	uint32	td_subfiletype;
-	uint16	td_bitspersample;
-	uint16	td_sampleformat;
-	uint16	td_compression;
-	uint16	td_photometric;
-	uint16	td_threshholding;
-	uint16	td_fillorder;
-	uint16	td_orientation;
-	uint16	td_samplesperpixel;
-	uint32	td_rowsperstrip;
-	uint16	td_minsamplevalue, td_maxsamplevalue;
-	double	td_sminsamplevalue, td_smaxsamplevalue;
-	float	td_xresolution, td_yresolution;
-	uint16	td_resolutionunit;
-	uint16	td_planarconfig;
-	float	td_xposition, td_yposition;
-	uint16	td_pagenumber[2];
-	uint16*	td_colormap[3];
-	uint16	td_halftonehints[2];
-	uint16	td_extrasamples;
-	uint16*	td_sampleinfo;
-	double	td_stonits;
-	char*	td_documentname;
-	char*	td_artist;
-	char*	td_datetime;
-	char*	td_hostcomputer;
-	char*	td_imagedescription;
-	char*	td_make;
-	char*	td_model;
-        char*   td_copyright;
-	char*	td_pagename;
-	tstrip_t td_stripsperimage;
-	tstrip_t td_nstrips;		/* size of offset & bytecount arrays */
-	uint32*	td_stripoffset;
-	uint32*	td_stripbytecount;
-#if SUBIFD_SUPPORT
-	uint16	td_nsubifd;
-	uint32*	td_subifd;
-#endif
-#ifdef YCBCR_SUPPORT
-	float*	td_ycbcrcoeffs;
-	uint16	td_ycbcrsubsampling[2];
-	uint16	td_ycbcrpositioning;
-#endif
-#ifdef COLORIMETRY_SUPPORT
-	float*	td_whitepoint;
-	float*	td_primarychromas;
-	float*	td_refblackwhite;
-	uint16*	td_transferfunction[3];
-#endif
-#ifdef CMYK_SUPPORT
-	uint16	td_inkset;
-	uint16	td_ninks;
-	uint16	td_dotrange[2];
-	int	td_inknameslen;
-	char*	td_inknames;
-	char*	td_targetprinter;
-#endif
-#ifdef ICC_SUPPORT
-	uint32	td_profileLength;
-	void	*td_profileData;
-#endif
-#ifdef PHOTOSHOP_SUPPORT
-	uint32	td_photoshopLength;
-	void	*td_photoshopData;
-#endif
-#ifdef IPTC_SUPPORT
-	uint32	td_richtiffiptcLength;
-	void	*td_richtiffiptcData;
-#endif
-        /* Begin Pixar Tag values. */
-        uint32	td_imagefullwidth, td_imagefulllength;
- 	char*	td_textureformat;
- 	char*	td_wrapmodes;
- 	float	td_fovcot;
- 	float*	td_matrixWorldToScreen;
- 	float*	td_matrixWorldToCamera;
- 	/* End Pixar Tag Values. */
-	uint32	td_xmlpacketLength;
-	void	*td_xmlpacketData;
-		int     td_customValueCount;
-        TIFFTagValue *td_customValues;
-} TIFFDirectory;
-
-/*
- * Field flags used to indicate fields that have
- * been set in a directory, and to reference fields
- * when manipulating a directory.
- */
-
-/*
- * FIELD_IGNORE is used to signify tags that are to
- * be processed but otherwise ignored.  This permits
- * antiquated tags to be quietly read and discarded.
- * Note that a bit *is* allocated for ignored tags;
- * this is understood by the directory reading logic
- * which uses this fact to avoid special-case handling
- */ 
-#define	FIELD_IGNORE			0
-
-/* multi-item fields */
-#define	FIELD_IMAGEDIMENSIONS		1
-#define FIELD_TILEDIMENSIONS		2
-#define	FIELD_RESOLUTION		3
-#define	FIELD_POSITION			4
-
-/* single-item fields */
-#define	FIELD_SUBFILETYPE		5
-#define	FIELD_BITSPERSAMPLE		6
-#define	FIELD_COMPRESSION		7
-#define	FIELD_PHOTOMETRIC		8
-#define	FIELD_THRESHHOLDING		9
-#define	FIELD_FILLORDER			10
-#define	FIELD_DOCUMENTNAME		11
-#define	FIELD_IMAGEDESCRIPTION		12
-#define	FIELD_MAKE			13
-#define	FIELD_MODEL			14
-#define	FIELD_ORIENTATION		15
-#define	FIELD_SAMPLESPERPIXEL		16
-#define	FIELD_ROWSPERSTRIP		17
-#define	FIELD_MINSAMPLEVALUE		18
-#define	FIELD_MAXSAMPLEVALUE		19
-#define	FIELD_PLANARCONFIG		20
-#define	FIELD_PAGENAME			21
-#define	FIELD_RESOLUTIONUNIT		22
-#define	FIELD_PAGENUMBER		23
-#define	FIELD_STRIPBYTECOUNTS		24
-#define	FIELD_STRIPOFFSETS		25
-#define	FIELD_COLORMAP			26
-#define FIELD_ARTIST			27
-#define FIELD_DATETIME			28
-#define FIELD_HOSTCOMPUTER		29
-/* unused - was FIELD_SOFTWARE          30 */
-#define	FIELD_EXTRASAMPLES		31
-#define FIELD_SAMPLEFORMAT		32
-#define	FIELD_SMINSAMPLEVALUE		33
-#define	FIELD_SMAXSAMPLEVALUE		34
-#define FIELD_IMAGEDEPTH		35
-#define FIELD_TILEDEPTH			36
-#define	FIELD_HALFTONEHINTS		37
-#define FIELD_YCBCRCOEFFICIENTS		38
-#define FIELD_YCBCRSUBSAMPLING		39
-#define FIELD_YCBCRPOSITIONING		40
-#define	FIELD_REFBLACKWHITE		41
-#define	FIELD_WHITEPOINT		42
-#define	FIELD_PRIMARYCHROMAS		43
-#define	FIELD_TRANSFERFUNCTION		44
-#define	FIELD_INKSET			45
-#define	FIELD_INKNAMES			46
-#define	FIELD_DOTRANGE			47
-#define	FIELD_TARGETPRINTER		48
-#define	FIELD_SUBIFD			49
-#define	FIELD_NUMBEROFINKS		50
-#define FIELD_ICCPROFILE		51
-#define FIELD_PHOTOSHOP			52
-#define FIELD_RICHTIFFIPTC		53
-#define FIELD_STONITS			54
-/* Begin PIXAR */
-#define	FIELD_IMAGEFULLWIDTH		55
-#define	FIELD_IMAGEFULLLENGTH		56
-#define FIELD_TEXTUREFORMAT		57
-#define FIELD_WRAPMODES			58
-#define FIELD_FOVCOT			59
-#define FIELD_MATRIX_WORLDTOSCREEN	60
-#define FIELD_MATRIX_WORLDTOCAMERA	61
-#define FIELD_COPYRIGHT			62
-#define FIELD_XMLPACKET			63
-/*      FIELD_CUSTOM (see tiffio.h)     65 */
-/* end of support for well-known tags; codec-private tags follow */
-#define	FIELD_CODEC			66	/* base of codec-private tags */
-
-
-/*
- * Pseudo-tags don't normally need field bits since they
- * are not written to an output file (by definition).
- * The library also has express logic to always query a
- * codec for a pseudo-tag so allocating a field bit for
- * one is a waste.   If codec wants to promote the notion
- * of a pseudo-tag being ``set'' or ``unset'' then it can
- * do using internal state flags without polluting the
- * field bit space defined for real tags.
- */
-#define	FIELD_PSEUDO			0
-
-#define	FIELD_LAST			(32*FIELD_SETLONGS-1)
-
-#define	TIFFExtractData(tif, type, v) \
-    ((uint32) ((tif)->tif_header.tiff_magic == TIFF_BIGENDIAN ? \
-        ((v) >> (tif)->tif_typeshift[type]) & (tif)->tif_typemask[type] : \
-	(v) & (tif)->tif_typemask[type]))
-#define	TIFFInsertData(tif, type, v) \
-    ((uint32) ((tif)->tif_header.tiff_magic == TIFF_BIGENDIAN ? \
-        ((v) & (tif)->tif_typemask[type]) << (tif)->tif_typeshift[type] : \
-	(v) & (tif)->tif_typemask[type]))
-
-
-#define BITn(n)				(((u_long)1L)<<((n)&0x1f)) 
-#define BITFIELDn(tif, n)		((tif)->tif_dir.td_fieldsset[(n)/32]) 
-#define TIFFFieldSet(tif, field)	(BITFIELDn(tif, field) & BITn(field)) 
-#define TIFFSetFieldBit(tif, field)	(BITFIELDn(tif, field) |= BITn(field))
-#define TIFFClrFieldBit(tif, field)	(BITFIELDn(tif, field) &= ~BITn(field))
-
-#define	FieldSet(fields, f)		(fields[(f)/32] & BITn(f))
-#define	ResetFieldBit(fields, f)	(fields[(f)/32] &= ~BITn(f))
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-extern	void _TIFFSetupFieldInfo(TIFF*);
-extern	void _TIFFPrintFieldInfo(TIFF*, FILE*);
-extern	TIFFDataType _TIFFSampleToTagType(TIFF*);
-extern  const TIFFFieldInfo* _TIFFFindOrRegisterFieldInfo( TIFF *tif,
-							   ttag_t tag,
-							   TIFFDataType dt );
-extern  TIFFFieldInfo* _TIFFCreateAnonFieldInfo( TIFF *tif, ttag_t tag,
-                                                 TIFFDataType dt );
-
-#define _TIFFMergeFieldInfo TIFFMergeFieldInfo
-#define _TIFFFindFieldInfo  TIFFFindFieldInfo
-#define _TIFFFieldWithTag   TIFFFieldWithTag
-    
-#if defined(__cplusplus)
-}
-#endif
-#endif /* _TIFFDIR_ */
diff --git a/src/tiff/tif_dirinfo.c b/src/tiff/tif_dirinfo.c
deleted file mode 100644
index fe085c1..0000000
--- a/src/tiff/tif_dirinfo.c
+++ /dev/null
@@ -1,480 +0,0 @@
-/* $Header: /home/terralib/src/tiff/tif_dirinfo.c,v 1.3 2004/03/19 11:51:24 lubia Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library.
- *
- * Core Directory Tag Support.
- */
-#include "tiffiop.h"
-#include <stdlib.h>
-
-/*
- * NB: NB: THIS ARRAY IS ASSUMED TO BE SORTED BY TAG.
- *     If a tag can have both LONG and SHORT types
- *     then the LONG must be placed before the SHORT for
- *     writing to work properly.
- *
- * NOTE: The second field (field_readcount) and third field (field_writecount)
- *       sometimes use the values TIFF_VARIABLE (-1), TIFF_VARIABLE2 (-3)
- *       and TIFFTAG_SPP (-2). The macros should be used but would throw off 
- *       the formatting of the code, so please interprete the -1, -2 and -3 
- *       values accordingly.
- */
-#ifndef VMS
-static 
-#endif
-const TIFFFieldInfo tiffFieldInfo[] = {
-    { TIFFTAG_SUBFILETYPE,	 1, 1, TIFF_LONG,	FIELD_SUBFILETYPE,
-      TRUE,	FALSE,	"SubfileType" },
-/* XXX SHORT for compatibility w/ old versions of the library */
-    { TIFFTAG_SUBFILETYPE,	 1, 1, TIFF_SHORT,	FIELD_SUBFILETYPE,
-      TRUE,	FALSE,	"SubfileType" },
-    { TIFFTAG_OSUBFILETYPE,	 1, 1, TIFF_SHORT,	FIELD_SUBFILETYPE,
-      TRUE,	FALSE,	"OldSubfileType" },
-    { TIFFTAG_IMAGEWIDTH,	 1, 1, TIFF_LONG,	FIELD_IMAGEDIMENSIONS,
-      FALSE,	FALSE,	"ImageWidth" },
-    { TIFFTAG_IMAGEWIDTH,	 1, 1, TIFF_SHORT,	FIELD_IMAGEDIMENSIONS,
-      FALSE,	FALSE,	"ImageWidth" },
-    { TIFFTAG_IMAGELENGTH,	 1, 1, TIFF_LONG,	FIELD_IMAGEDIMENSIONS,
-      TRUE,	FALSE,	"ImageLength" },
-    { TIFFTAG_IMAGELENGTH,	 1, 1, TIFF_SHORT,	FIELD_IMAGEDIMENSIONS,
-      TRUE,	FALSE,	"ImageLength" },
-/* XXX LONG for compatibility with some broken TIFF writers */
-    { TIFFTAG_BITSPERSAMPLE,	-1,-1, TIFF_LONG,	FIELD_BITSPERSAMPLE,
-      FALSE,	FALSE,	"BitsPerSample" },
-    { TIFFTAG_BITSPERSAMPLE,	-1,-1, TIFF_SHORT,	FIELD_BITSPERSAMPLE,
-      FALSE,	FALSE,	"BitsPerSample" },
-/* XXX LONG for compatibility with some broken TIFF writers */
-    { TIFFTAG_COMPRESSION,	-1, 1, TIFF_LONG,	FIELD_COMPRESSION,
-      FALSE,	FALSE,	"Compression" },
-    { TIFFTAG_COMPRESSION,	-1, 1, TIFF_SHORT,	FIELD_COMPRESSION,
-      FALSE,	FALSE,	"Compression" },
-/* XXX LONG for compatibility with some broken TIFF writers */
-    { TIFFTAG_PHOTOMETRIC,	 1, 1, TIFF_LONG,	FIELD_PHOTOMETRIC,
-      FALSE,	FALSE,	"PhotometricInterpretation" },
-    { TIFFTAG_PHOTOMETRIC,	 1, 1, TIFF_SHORT,	FIELD_PHOTOMETRIC,
-      FALSE,	FALSE,	"PhotometricInterpretation" },
-    { TIFFTAG_THRESHHOLDING,	 1, 1, TIFF_SHORT,	FIELD_THRESHHOLDING,
-      TRUE,	FALSE,	"Threshholding" },
-    { TIFFTAG_CELLWIDTH,	 1, 1, TIFF_SHORT,	FIELD_IGNORE,
-      TRUE,	FALSE,	"CellWidth" },
-    { TIFFTAG_CELLLENGTH,	 1, 1, TIFF_SHORT,	FIELD_IGNORE,
-      TRUE,	FALSE,	"CellLength" },
-    { TIFFTAG_FILLORDER,	 1, 1, TIFF_SHORT,	FIELD_FILLORDER,
-      FALSE,	FALSE,	"FillOrder" },
-    { TIFFTAG_DOCUMENTNAME,	-1,-1, TIFF_ASCII,	FIELD_DOCUMENTNAME,
-      TRUE,	FALSE,	"DocumentName" },
-    { TIFFTAG_IMAGEDESCRIPTION,	-1,-1, TIFF_ASCII,	FIELD_IMAGEDESCRIPTION,
-      TRUE,	FALSE,	"ImageDescription" },
-    { TIFFTAG_MAKE,		-1,-1, TIFF_ASCII,	FIELD_MAKE,
-      TRUE,	FALSE,	"Make" },
-    { TIFFTAG_MODEL,		-1,-1, TIFF_ASCII,	FIELD_MODEL,
-      TRUE,	FALSE,	"Model" },
-    { TIFFTAG_STRIPOFFSETS,	-1,-1, TIFF_LONG,	FIELD_STRIPOFFSETS,
-      FALSE,	FALSE,	"StripOffsets" },
-    { TIFFTAG_STRIPOFFSETS,	-1,-1, TIFF_SHORT,	FIELD_STRIPOFFSETS,
-      FALSE,	FALSE,	"StripOffsets" },
-    { TIFFTAG_ORIENTATION,	 1, 1, TIFF_SHORT,	FIELD_ORIENTATION,
-      FALSE,	FALSE,	"Orientation" },
-    { TIFFTAG_SAMPLESPERPIXEL,	 1, 1, TIFF_SHORT,	FIELD_SAMPLESPERPIXEL,
-      FALSE,	FALSE,	"SamplesPerPixel" },
-    { TIFFTAG_ROWSPERSTRIP,	 1, 1, TIFF_LONG,	FIELD_ROWSPERSTRIP,
-      FALSE,	FALSE,	"RowsPerStrip" },
-    { TIFFTAG_ROWSPERSTRIP,	 1, 1, TIFF_SHORT,	FIELD_ROWSPERSTRIP,
-      FALSE,	FALSE,	"RowsPerStrip" },
-    { TIFFTAG_STRIPBYTECOUNTS,	-1,-1, TIFF_LONG,	FIELD_STRIPBYTECOUNTS,
-      FALSE,	FALSE,	"StripByteCounts" },
-    { TIFFTAG_STRIPBYTECOUNTS,	-1,-1, TIFF_SHORT,	FIELD_STRIPBYTECOUNTS,
-      FALSE,	FALSE,	"StripByteCounts" },
-    { TIFFTAG_MINSAMPLEVALUE,	-2,-1, TIFF_SHORT,	FIELD_MINSAMPLEVALUE,
-      TRUE,	FALSE,	"MinSampleValue" },
-    { TIFFTAG_MAXSAMPLEVALUE,	-2,-1, TIFF_SHORT,	FIELD_MAXSAMPLEVALUE,
-      TRUE,	FALSE,	"MaxSampleValue" },
-    { TIFFTAG_XRESOLUTION,	 1, 1, TIFF_RATIONAL,	FIELD_RESOLUTION,
-      FALSE,	FALSE,	"XResolution" },
-    { TIFFTAG_YRESOLUTION,	 1, 1, TIFF_RATIONAL,	FIELD_RESOLUTION,
-      FALSE,	FALSE,	"YResolution" },
-    { TIFFTAG_PLANARCONFIG,	 1, 1, TIFF_SHORT,	FIELD_PLANARCONFIG,
-      FALSE,	FALSE,	"PlanarConfiguration" },
-    { TIFFTAG_PAGENAME,		-1,-1, TIFF_ASCII,	FIELD_PAGENAME,
-      TRUE,	FALSE,	"PageName" },
-    { TIFFTAG_XPOSITION,	 1, 1, TIFF_RATIONAL,	FIELD_POSITION,
-      TRUE,	FALSE,	"XPosition" },
-    { TIFFTAG_YPOSITION,	 1, 1, TIFF_RATIONAL,	FIELD_POSITION,
-      TRUE,	FALSE,	"YPosition" },
-    { TIFFTAG_FREEOFFSETS,	-1,-1, TIFF_LONG,	FIELD_IGNORE,
-      FALSE,	FALSE,	"FreeOffsets" },
-    { TIFFTAG_FREEBYTECOUNTS,	-1,-1, TIFF_LONG,	FIELD_IGNORE,
-      FALSE,	FALSE,	"FreeByteCounts" },
-    { TIFFTAG_GRAYRESPONSEUNIT,	 1, 1, TIFF_SHORT,	FIELD_IGNORE,
-      TRUE,	FALSE,	"GrayResponseUnit" },
-    { TIFFTAG_GRAYRESPONSECURVE,-1,-1, TIFF_SHORT,	FIELD_IGNORE,
-      TRUE,	FALSE,	"GrayResponseCurve" },
-    { TIFFTAG_RESOLUTIONUNIT,	 1, 1, TIFF_SHORT,	FIELD_RESOLUTIONUNIT,
-      FALSE,	FALSE,	"ResolutionUnit" },
-    { TIFFTAG_PAGENUMBER,	 2, 2, TIFF_SHORT,	FIELD_PAGENUMBER,
-      TRUE,	FALSE,	"PageNumber" },
-    { TIFFTAG_COLORRESPONSEUNIT, 1, 1, TIFF_SHORT,	FIELD_IGNORE,
-      TRUE,	FALSE,	"ColorResponseUnit" },
-    { TIFFTAG_TRANSFERFUNCTION,	-1,-1, TIFF_SHORT,	FIELD_TRANSFERFUNCTION,
-      TRUE,	FALSE,	"TransferFunction" },
-    { TIFFTAG_SOFTWARE,		-1,-1, TIFF_ASCII,	FIELD_CUSTOM,
-      TRUE,	FALSE,	"Software" },
-    { TIFFTAG_DATETIME,		20,20, TIFF_ASCII,	FIELD_DATETIME,
-      TRUE,	FALSE,	"DateTime" },
-    { TIFFTAG_ARTIST,		-1,-1, TIFF_ASCII,	FIELD_ARTIST,
-      TRUE,	FALSE,	"Artist" },
-    { TIFFTAG_HOSTCOMPUTER,	-1,-1, TIFF_ASCII,	FIELD_HOSTCOMPUTER,
-      TRUE,	FALSE,	"HostComputer" },
-    { TIFFTAG_WHITEPOINT,	 2, 2, TIFF_RATIONAL,FIELD_WHITEPOINT,
-      TRUE,	FALSE,	"WhitePoint" },
-    { TIFFTAG_PRIMARYCHROMATICITIES,6,6,TIFF_RATIONAL,FIELD_PRIMARYCHROMAS,
-      TRUE,	FALSE,	"PrimaryChromaticities" },
-    { TIFFTAG_COLORMAP,		-1,-1, TIFF_SHORT,	FIELD_COLORMAP,
-      TRUE,	FALSE,	"ColorMap" },
-    { TIFFTAG_HALFTONEHINTS,	 2, 2, TIFF_SHORT,	FIELD_HALFTONEHINTS,
-      TRUE,	FALSE,	"HalftoneHints" },
-    { TIFFTAG_TILEWIDTH,	 1, 1, TIFF_LONG,	FIELD_TILEDIMENSIONS,
-      FALSE,	FALSE,	"TileWidth" },
-    { TIFFTAG_TILEWIDTH,	 1, 1, TIFF_SHORT,	FIELD_TILEDIMENSIONS,
-      FALSE,	FALSE,	"TileWidth" },
-    { TIFFTAG_TILELENGTH,	 1, 1, TIFF_LONG,	FIELD_TILEDIMENSIONS,
-      FALSE,	FALSE,	"TileLength" },
-    { TIFFTAG_TILELENGTH,	 1, 1, TIFF_SHORT,	FIELD_TILEDIMENSIONS,
-      FALSE,	FALSE,	"TileLength" },
-    { TIFFTAG_TILEOFFSETS,	-1, 1, TIFF_LONG,	FIELD_STRIPOFFSETS,
-      FALSE,	FALSE,	"TileOffsets" },
-    { TIFFTAG_TILEBYTECOUNTS,	-1, 1, TIFF_LONG,	FIELD_STRIPBYTECOUNTS,
-      FALSE,	FALSE,	"TileByteCounts" },
-    { TIFFTAG_TILEBYTECOUNTS,	-1, 1, TIFF_SHORT,	FIELD_STRIPBYTECOUNTS,
-      FALSE,	FALSE,	"TileByteCounts" },
-    { TIFFTAG_SUBIFD,		-1,-1, TIFF_LONG,	FIELD_SUBIFD,
-      TRUE,	TRUE,	"SubIFD" },
-    { TIFFTAG_INKSET,		 1, 1, TIFF_SHORT,	FIELD_INKSET,
-      FALSE,	FALSE,	"InkSet" },
-    { TIFFTAG_INKNAMES,		-1,-1, TIFF_ASCII,	FIELD_INKNAMES,
-      TRUE,	TRUE,	"InkNames" },
-    { TIFFTAG_NUMBEROFINKS,	 1, 1, TIFF_SHORT,	FIELD_NUMBEROFINKS,
-      TRUE,	FALSE,	"NumberOfInks" },
-    { TIFFTAG_DOTRANGE,		 2, 2, TIFF_SHORT,	FIELD_DOTRANGE,
-      FALSE,	FALSE,	"DotRange" },
-    { TIFFTAG_DOTRANGE,		 2, 2, TIFF_BYTE,	FIELD_DOTRANGE,
-      FALSE,	FALSE,	"DotRange" },
-    { TIFFTAG_TARGETPRINTER,	-1,-1, TIFF_ASCII,	FIELD_TARGETPRINTER,
-      TRUE,	FALSE,	"TargetPrinter" },
-    { TIFFTAG_EXTRASAMPLES,	-1,-1, TIFF_SHORT,	FIELD_EXTRASAMPLES,
-      FALSE,	FALSE,	"ExtraSamples" },
-/* XXX for bogus Adobe Photoshop v2.5 files */
-    { TIFFTAG_EXTRASAMPLES,	-1,-1, TIFF_BYTE,	FIELD_EXTRASAMPLES,
-      FALSE,	FALSE,	"ExtraSamples" },
-    { TIFFTAG_SAMPLEFORMAT,	-1,-1, TIFF_SHORT,	FIELD_SAMPLEFORMAT,
-      FALSE,	FALSE,	"SampleFormat" },
-    { TIFFTAG_SMINSAMPLEVALUE,	-2,-1, TIFF_ANY,	FIELD_SMINSAMPLEVALUE,
-      TRUE,	FALSE,	"SMinSampleValue" },
-    { TIFFTAG_SMAXSAMPLEVALUE,	-2,-1, TIFF_ANY,	FIELD_SMAXSAMPLEVALUE,
-      TRUE,	FALSE,	"SMaxSampleValue" },
-    { TIFFTAG_YCBCRCOEFFICIENTS, 3, 3, TIFF_RATIONAL,	FIELD_YCBCRCOEFFICIENTS,
-      FALSE,	FALSE,	"YCbCrCoefficients" },
-    { TIFFTAG_YCBCRSUBSAMPLING,	 2, 2, TIFF_SHORT,	FIELD_YCBCRSUBSAMPLING,
-      FALSE,	FALSE,	"YCbCrSubsampling" },
-    { TIFFTAG_YCBCRPOSITIONING,	 1, 1, TIFF_SHORT,	FIELD_YCBCRPOSITIONING,
-      FALSE,	FALSE,	"YCbCrPositioning" },
-    { TIFFTAG_REFERENCEBLACKWHITE,6,6,TIFF_RATIONAL,	FIELD_REFBLACKWHITE,
-      TRUE,	FALSE,	"ReferenceBlackWhite" },
-/* XXX temporarily accept LONG for backwards compatibility */
-    { TIFFTAG_REFERENCEBLACKWHITE,6,6,TIFF_LONG,	FIELD_REFBLACKWHITE,
-      TRUE,	FALSE,	"ReferenceBlackWhite" },
-    { TIFFTAG_XMLPACKET,	-1,-3, TIFF_UNDEFINED,	FIELD_XMLPACKET,
-      FALSE,	TRUE,	"XMLPacket" },
-/* begin SGI tags */
-    { TIFFTAG_MATTEING,		 1, 1, TIFF_SHORT,	FIELD_EXTRASAMPLES,
-      FALSE,	FALSE,	"Matteing" },
-    { TIFFTAG_DATATYPE,		-2,-1, TIFF_SHORT,	FIELD_SAMPLEFORMAT,
-      FALSE,	FALSE,	"DataType" },
-    { TIFFTAG_IMAGEDEPTH,	 1, 1, TIFF_LONG,	FIELD_IMAGEDEPTH,
-      FALSE,	FALSE,	"ImageDepth" },
-    { TIFFTAG_IMAGEDEPTH,	 1, 1, TIFF_SHORT,	FIELD_IMAGEDEPTH,
-      FALSE,	FALSE,	"ImageDepth" },
-    { TIFFTAG_TILEDEPTH,	 1, 1, TIFF_LONG,	FIELD_TILEDEPTH,
-      FALSE,	FALSE,	"TileDepth" },
-    { TIFFTAG_TILEDEPTH,	 1, 1, TIFF_SHORT,	FIELD_TILEDEPTH,
-      FALSE,	FALSE,	"TileDepth" },
-/* end SGI tags */
-/* begin Pixar tags */
-    { TIFFTAG_PIXAR_IMAGEFULLWIDTH,  1, 1, TIFF_LONG,	FIELD_IMAGEFULLWIDTH,
-      TRUE,	FALSE,	"ImageFullWidth" },
-    { TIFFTAG_PIXAR_IMAGEFULLLENGTH, 1, 1, TIFF_LONG,	FIELD_IMAGEFULLLENGTH,
-      TRUE,	FALSE,	"ImageFullLength" },
-    { TIFFTAG_PIXAR_TEXTUREFORMAT,  -1,-1, TIFF_ASCII,	FIELD_TEXTUREFORMAT,
-      TRUE,	FALSE,	"TextureFormat" },
-    { TIFFTAG_PIXAR_WRAPMODES,	    -1,-1, TIFF_ASCII,	FIELD_WRAPMODES,
-      TRUE,	FALSE,	"TextureWrapModes" },
-    { TIFFTAG_PIXAR_FOVCOT,	     1, 1, TIFF_FLOAT,	FIELD_FOVCOT,
-      TRUE,	FALSE,	"FieldOfViewCotan" },
-    { TIFFTAG_PIXAR_MATRIX_WORLDTOSCREEN,	16,16,	TIFF_FLOAT,
-      FIELD_MATRIX_WORLDTOSCREEN,	TRUE,	FALSE,	"MatrixWorldToScreen" },
-    { TIFFTAG_PIXAR_MATRIX_WORLDTOCAMERA,	16,16,	TIFF_FLOAT,
-       FIELD_MATRIX_WORLDTOCAMERA,	TRUE,	FALSE,	"MatrixWorldToCamera" },
-    { TIFFTAG_COPYRIGHT,	-1,-1, TIFF_ASCII,	FIELD_COPYRIGHT,
-      TRUE,	FALSE,	"Copyright" },
-/* end Pixar tags */
-#ifdef IPTC_SUPPORT
-#ifdef PHOTOSHOP_SUPPORT
-    { TIFFTAG_RICHTIFFIPTC, -1,-1, TIFF_LONG,   FIELD_RICHTIFFIPTC, 
-      FALSE,    TRUE,   "RichTIFFIPTC" },
-#else
-    { TIFFTAG_RICHTIFFIPTC, -1,-3, TIFF_UNDEFINED, FIELD_RICHTIFFIPTC, 
-      FALSE,    TRUE,   "RichTIFFIPTC" },
-#endif
-#endif
-    { TIFFTAG_PHOTOSHOP,    -1,-3, TIFF_BYTE,   FIELD_PHOTOSHOP, 
-      FALSE,    TRUE,   "Photoshop" },
-    { TIFFTAG_ICCPROFILE,	-1,-3, TIFF_UNDEFINED,	FIELD_ICCPROFILE,
-      FALSE,	TRUE,	"ICC Profile" },
-    { TIFFTAG_STONITS,		 1, 1, TIFF_DOUBLE,	FIELD_STONITS,
-      FALSE,	FALSE,	"StoNits" },
-};
-#define	N(a)	(sizeof (a) / sizeof (a[0]))
-
-void
-_TIFFSetupFieldInfo(TIFF* tif)
-{
-	if (tif->tif_fieldinfo) {
-		int  i;
-
-		for (i = 0; i < tif->tif_nfields; i++) 
-		{
-			TIFFFieldInfo *fld = tif->tif_fieldinfo[i];
-			if (fld->field_bit == FIELD_CUSTOM && 
-				strncmp("Tag ", fld->field_name, 4) == 0) 
-				{
-				_TIFFfree(fld->field_name);
-				_TIFFfree(fld);
-				}
-		}   
-      
-		_TIFFfree(tif->tif_fieldinfo);
-		tif->tif_nfields = 0;
-	}
-	_TIFFMergeFieldInfo(tif, tiffFieldInfo, N(tiffFieldInfo));
-}
-
-static int
-tagCompare(const void* a, const void* b)
-{
-	const TIFFFieldInfo* ta = *(const TIFFFieldInfo**) a;
-	const TIFFFieldInfo* tb = *(const TIFFFieldInfo**) b;
-	/* NB: be careful of return values for 16-bit platforms */
-	if (ta->field_tag != tb->field_tag)
-		return (ta->field_tag < tb->field_tag ? -1 : 1);
-	else
-		return ((int)tb->field_type - (int)ta->field_type);
-}
-
-void
-_TIFFMergeFieldInfo(TIFF* tif, const TIFFFieldInfo info[], int n)
-{
-	TIFFFieldInfo** tp;
-	int i;
-
-	if (tif->tif_nfields > 0) {
-		tif->tif_fieldinfo = (TIFFFieldInfo**)
-		    _TIFFrealloc(tif->tif_fieldinfo,
-			(tif->tif_nfields+n) * sizeof (TIFFFieldInfo*));
-	} else {
-		tif->tif_fieldinfo = (TIFFFieldInfo**)
-		    _TIFFmalloc(n * sizeof (TIFFFieldInfo*));
-	}
-	tp = &tif->tif_fieldinfo[tif->tif_nfields];
-	for (i = 0; i < n; i++)
-		tp[i] = (TIFFFieldInfo*) &info[i];	/* XXX */
-
-        /* Sort the field info by tag number */
-        qsort(tif->tif_fieldinfo, (size_t) (tif->tif_nfields += n),
-              sizeof (TIFFFieldInfo*), tagCompare);
-}
-
-void
-_TIFFPrintFieldInfo(TIFF* tif, FILE* fd)
-{
-	int i;
-
-	fprintf(fd, "%s: \n", tif->tif_name);
-	for (i = 0; i < tif->tif_nfields; i++) {
-		const TIFFFieldInfo* fip = tif->tif_fieldinfo[i];
-		fprintf(fd, "field[%2d] %5lu, %2d, %2d, %d, %2d, %5s, %5s, %s\n"
-			, i
-			, (unsigned long) fip->field_tag
-			, fip->field_readcount, fip->field_writecount
-			, fip->field_type
-			, fip->field_bit
-			, fip->field_oktochange ? "TRUE" : "FALSE"
-			, fip->field_passcount ? "TRUE" : "FALSE"
-			, fip->field_name
-		);
-	}
-}
-
-/*
- * Return size of TIFFDataType in bytes
- */
-int
-TIFFDataWidth(TIFFDataType type)
-{
-	switch(type)
-	{
-	case 0:  /* nothing */
-	case 1:  /* TIFF_BYTE */
-	case 2:  /* TIFF_ASCII */
-	case 6:  /* TIFF_SBYTE */
-	case 7:  /* TIFF_UNDEFINED */
-		return 1;
-	case 3:  /* TIFF_SHORT */
-	case 8:  /* TIFF_SSHORT */
-		return 2;
-	case 4:  /* TIFF_LONG */
-	case 9:  /* TIFF_SLONG */
-	case 11: /* TIFF_FLOAT */
-        case 13: /* TIFF_IFD */
-		return 4;
-	case 5:  /* TIFF_RATIONAL */
-	case 10: /* TIFF_SRATIONAL */
-	case 12: /* TIFF_DOUBLE */
-		return 8;
-	default:
-		return 0; /* will return 0 for unknown types */
-	}
-}
-
-/*
- * Return nearest TIFFDataType to the sample type of an image.
- */
-TIFFDataType
-_TIFFSampleToTagType(TIFF* tif)
-{
-	int bps = (int) TIFFhowmany(tif->tif_dir.td_bitspersample, 8);
-
-	switch (tif->tif_dir.td_sampleformat) {
-	case SAMPLEFORMAT_IEEEFP:
-		return (bps == 4 ? TIFF_FLOAT : TIFF_DOUBLE);
-	case SAMPLEFORMAT_INT:
-		return (bps <= 1 ? TIFF_SBYTE :
-		    bps <= 2 ? TIFF_SSHORT : TIFF_SLONG);
-	case SAMPLEFORMAT_UINT:
-		return (bps <= 1 ? TIFF_BYTE :
-		    bps <= 2 ? TIFF_SHORT : TIFF_LONG);
-	case SAMPLEFORMAT_VOID:
-		return (TIFF_UNDEFINED);
-	}
-	/*NOTREACHED*/
-	return (TIFF_UNDEFINED);
-}
-
-const TIFFFieldInfo*
-_TIFFFindFieldInfo(TIFF* tif, ttag_t tag, TIFFDataType dt)
-{
-	static const TIFFFieldInfo *last = NULL;
-	int i, n;
-
-	if (last && last->field_tag == tag &&
-	    (dt == TIFF_ANY || dt == last->field_type))
-		return (last);
-	/* NB: if table gets big, use sorted search (e.g. binary search) */
-	if(dt != TIFF_ANY) {
-            TIFFFieldInfo key = {0, 0, 0, 0, 0, 0, 0, 0};
-            key.field_tag = tag;
-            key.field_type = dt;
-            return((const TIFFFieldInfo *) bsearch(&key, 
-						   tif->tif_fieldinfo, 
-						   tif->tif_nfields,
-						   sizeof(TIFFFieldInfo), 
-						   tagCompare));
-        } else for (i = 0, n = tif->tif_nfields; i < n; i++) {
-		const TIFFFieldInfo* fip = tif->tif_fieldinfo[i];
-		if (fip->field_tag == tag &&
-		    (dt == TIFF_ANY || fip->field_type == dt))
-			return (last = fip);
-	}
-	return ((const TIFFFieldInfo *)0);
-}
-
-#include <assert.h>
-#include <stdio.h>
-
-const TIFFFieldInfo*
-_TIFFFieldWithTag(TIFF* tif, ttag_t tag)
-{
-	const TIFFFieldInfo* fip = _TIFFFindFieldInfo(tif, tag, TIFF_ANY);
-	if (!fip) {
-		TIFFError("TIFFFieldWithTag",
-		    "Internal error, unknown tag 0x%x", (u_int) tag);
-		assert(fip != NULL);
-		/*NOTREACHED*/
-	}
-	return (fip);
-}
-
-const TIFFFieldInfo*
-_TIFFFindOrRegisterFieldInfo( TIFF *tif, ttag_t tag, TIFFDataType dt )
-
-{
-    const TIFFFieldInfo *fld;
-
-    fld = _TIFFFindFieldInfo( tif, tag, dt );
-    if( fld == NULL )
-    {
-        fld = _TIFFCreateAnonFieldInfo( tif, tag, dt );
-        _TIFFMergeFieldInfo( tif, fld, 1 );
-    }
-
-    return fld;
-}
-
-TIFFFieldInfo*
-_TIFFCreateAnonFieldInfo(TIFF *tif, ttag_t tag, TIFFDataType field_type)
-{
-    TIFFFieldInfo *fld;
-
-    fld = (TIFFFieldInfo *) _TIFFmalloc(sizeof (TIFFFieldInfo));
-    _TIFFmemset( fld, 0, sizeof(TIFFFieldInfo) );
-
-    fld->field_tag = tag;
-    fld->field_readcount = TIFF_VARIABLE;
-    fld->field_writecount = TIFF_VARIABLE;
-    fld->field_type = field_type;
-    fld->field_bit = FIELD_CUSTOM;
-    fld->field_oktochange = TRUE;
-    fld->field_passcount = TRUE;
-    fld->field_name = (char *) _TIFFmalloc(32);
-
-    /* note that this name is a special sign to TIFFClose() and
-     * _TIFFSetupFieldInfo() to free the field
-     */
-    sprintf(fld->field_name, "Tag %d", (int) tag);
-
-    return fld;    
-}
diff --git a/src/tiff/tif_dirread.c b/src/tiff/tif_dirread.c
deleted file mode 100644
index cd41347..0000000
--- a/src/tiff/tif_dirread.c
+++ /dev/null
@@ -1,1485 +0,0 @@
-/* $Header: /home/terralib/src/tiff/tif_dirread.c,v 1.3 2004/03/19 11:51:24 lubia Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library.
- *
- * Directory Read Support Routines.
- */
-#include "tiffiop.h"
-
-#define	IGNORE	0		/* tag placeholder used below */
-
-#if HAVE_IEEEFP
-#define	TIFFCvtIEEEFloatToNative(tif, n, fp)
-#define	TIFFCvtIEEEDoubleToNative(tif, n, dp)
-#else
-extern	void TIFFCvtIEEEFloatToNative(TIFF*, uint32, float*);
-extern	void TIFFCvtIEEEDoubleToNative(TIFF*, uint32, double*);
-#endif
-
-static	int EstimateStripByteCounts(TIFF*, TIFFDirEntry*, uint16);
-static	void MissingRequired(TIFF*, const char*);
-static	int CheckDirCount(TIFF*, TIFFDirEntry*, uint32);
-static	tsize_t TIFFFetchData(TIFF*, TIFFDirEntry*, char*);
-static	tsize_t TIFFFetchString(TIFF*, TIFFDirEntry*, char*);
-static	float TIFFFetchRational(TIFF*, TIFFDirEntry*);
-static	int TIFFFetchNormalTag(TIFF*, TIFFDirEntry*);
-static	int TIFFFetchPerSampleShorts(TIFF*, TIFFDirEntry*, int*);
-static	int TIFFFetchPerSampleAnys(TIFF*, TIFFDirEntry*, double*);
-static	int TIFFFetchShortArray(TIFF*, TIFFDirEntry*, uint16*);
-static	int TIFFFetchStripThing(TIFF*, TIFFDirEntry*, long, uint32**);
-static	int TIFFFetchExtraSamples(TIFF*, TIFFDirEntry*);
-static	int TIFFFetchRefBlackWhite(TIFF*, TIFFDirEntry*);
-static	float TIFFFetchFloat(TIFF*, TIFFDirEntry*);
-static	int TIFFFetchFloatArray(TIFF*, TIFFDirEntry*, float*);
-static	int TIFFFetchDoubleArray(TIFF*, TIFFDirEntry*, double*);
-static	int TIFFFetchAnyArray(TIFF*, TIFFDirEntry*, double*);
-static	int TIFFFetchShortPair(TIFF*, TIFFDirEntry*);
-static	void ChopUpSingleUncompressedStrip(TIFF*);
-
-static char *
-CheckMalloc(TIFF* tif, tsize_t n, const char* what)
-{
-	char *cp = (char*)_TIFFmalloc(n);
-	if (cp == NULL)
-		TIFFError(tif->tif_name, "No space %s", what);
-	return (cp);
-}
-
-/*
- * Read the next TIFF directory from a file
- * and convert it to the internal format.
- * We read directories sequentially.
- */
-int
-TIFFReadDirectory(TIFF* tif)
-{
-	static const char module[] = "TIFFReadDirectory";
-
-	register TIFFDirEntry* dp;
-	register int n;
-	register TIFFDirectory* td;
-	TIFFDirEntry* dir;
-	int iv;
-	long v;
-	double dv;
-	const TIFFFieldInfo* fip;
-	int fix;
-	uint16 dircount;
-	toff_t nextdiroff;
-	char* cp;
-	int diroutoforderwarning = 0;
-
-	tif->tif_diroff = tif->tif_nextdiroff;
-	if (tif->tif_diroff == 0)		/* no more directories */
-		return (0);
-
-	/*
-	 * XXX: Trick to prevent IFD looping. The one can create TIFF file
-	 * with looped directory pointers. We will maintain a list of already
-	 * seen directories and check every IFD offset against this list.
-	 */
-	for (n = 0; n < tif->tif_dirnumber; n++) {
-		if (tif->tif_dirlist[n] == tif->tif_diroff)
-			return (0);
-	}
-	tif->tif_dirnumber++;
-	tif->tif_dirlist = _TIFFrealloc(tif->tif_dirlist,
-					tif->tif_dirnumber * sizeof(toff_t));
-	if (!tif->tif_dirlist) {
-		TIFFError(module,
-			  "%.1000s: Failed to allocate space for IFD list",
-			  tif->tif_name);
-		return (0);
-	}
-	tif->tif_dirlist[tif->tif_dirnumber - 1] = tif->tif_diroff;
-
-	/*
-	 * Cleanup any previous compression state.
-	 */
-	(*tif->tif_cleanup)(tif);
-	tif->tif_curdir++;
-	nextdiroff = 0;
-	if (!isMapped(tif)) {
-		if (!SeekOK(tif, tif->tif_diroff)) {
-			TIFFError(module,
-			    "%.1000s: Seek error accessing TIFF directory",
-                            tif->tif_name);
-			return (0);
-		}
-		if (!ReadOK(tif, &dircount, sizeof (uint16))) {
-			TIFFError(module,
-			    "%.1000s: Can not read TIFF directory count",
-                            tif->tif_name);
-			return (0);
-		}
-		if (tif->tif_flags & TIFF_SWAB)
-			TIFFSwabShort(&dircount);
-		dir = (TIFFDirEntry *)CheckMalloc(tif,
-		    dircount * sizeof (TIFFDirEntry), "to read TIFF directory");
-		if (dir == NULL)
-			return (0);
-		if (!ReadOK(tif, dir, dircount*sizeof (TIFFDirEntry))) {
-			TIFFError(module,
-                                  "%.100s: Can not read TIFF directory",
-                                  tif->tif_name);
-			goto bad;
-		}
-		/*
-		 * Read offset to next directory for sequential scans.
-		 */
-		(void) ReadOK(tif, &nextdiroff, sizeof (uint32));
-	} else {
-		toff_t off = tif->tif_diroff;
-
-		if (off + sizeof (uint16) > tif->tif_size) {
-			TIFFError(module,
-			    "%.1000s: Can not read TIFF directory count",
-                            tif->tif_name);
-			return (0);
-		} else
-			_TIFFmemcpy(&dircount, tif->tif_base + off, sizeof (uint16));
-		off += sizeof (uint16);
-		if (tif->tif_flags & TIFF_SWAB)
-			TIFFSwabShort(&dircount);
-		dir = (TIFFDirEntry *)CheckMalloc(tif,
-		    dircount * sizeof (TIFFDirEntry), "to read TIFF directory");
-		if (dir == NULL)
-			return (0);
-		if (off + dircount*sizeof (TIFFDirEntry) > tif->tif_size) {
-			TIFFError(module,
-                                  "%.1000s: Can not read TIFF directory",
-                                  tif->tif_name);
-			goto bad;
-		} else
-			_TIFFmemcpy(dir, tif->tif_base + off,
-			    dircount*sizeof (TIFFDirEntry));
-		off += dircount* sizeof (TIFFDirEntry);
-		if (off + sizeof (uint32) <= tif->tif_size)
-			_TIFFmemcpy(&nextdiroff, tif->tif_base+off, sizeof (uint32));
-	}
-	if (tif->tif_flags & TIFF_SWAB)
-		TIFFSwabLong(&nextdiroff);
-	tif->tif_nextdiroff = nextdiroff;
-
-	tif->tif_flags &= ~TIFF_BEENWRITING;	/* reset before new dir */
-	/*
-	 * Setup default value and then make a pass over
-	 * the fields to check type and tag information,
-	 * and to extract info required to size data
-	 * structures.  A second pass is made afterwards
-	 * to read in everthing not taken in the first pass.
-	 */
-	td = &tif->tif_dir;
-	/* free any old stuff and reinit */
-	TIFFFreeDirectory(tif);
-	TIFFDefaultDirectory(tif);
-	/*
-	 * Electronic Arts writes gray-scale TIFF files
-	 * without a PlanarConfiguration directory entry.
-	 * Thus we setup a default value here, even though
-	 * the TIFF spec says there is no default value.
-	 */
-	TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
-
-	/*
-	 * Sigh, we must make a separate pass through the
-	 * directory for the following reason:
-	 *
-	 * We must process the Compression tag in the first pass
-	 * in order to merge in codec-private tag definitions (otherwise
-	 * we may get complaints about unknown tags).  However, the
-	 * Compression tag may be dependent on the SamplesPerPixel
-	 * tag value because older TIFF specs permited Compression
-	 * to be written as a SamplesPerPixel-count tag entry.
-	 * Thus if we don't first figure out the correct SamplesPerPixel
-	 * tag value then we may end up ignoring the Compression tag
-	 * value because it has an incorrect count value (if the
-	 * true value of SamplesPerPixel is not 1).
-	 *
-	 * It sure would have been nice if Aldus had really thought
-	 * this stuff through carefully.
-	 */ 
-	for (dp = dir, n = dircount; n > 0; n--, dp++) {
-		if (tif->tif_flags & TIFF_SWAB) {
-			TIFFSwabArrayOfShort(&dp->tdir_tag, 2);
-			TIFFSwabArrayOfLong(&dp->tdir_count, 2);
-		}
-		if (dp->tdir_tag == TIFFTAG_SAMPLESPERPIXEL) {
-			if (!TIFFFetchNormalTag(tif, dp))
-				goto bad;
-			dp->tdir_tag = IGNORE;
-		}
-	}
-	/*
-	 * First real pass over the directory.
-	 */
-	fix = 0;
-	for (dp = dir, n = dircount; n > 0; n--, dp++) {
-
-                /*
-                 * Find the field information entry for this tag.
-		 * Added check for tags to ignore ... [BFC]
-                 */
-		if( TIFFReassignTagToIgnore(TIS_EXTRACT, dp->tdir_tag) )
-                    dp->tdir_tag = IGNORE;
-
-		if (fix >= tif->tif_nfields || dp->tdir_tag == IGNORE)
-			continue;
-               
-		/*
-		 * Silicon Beach (at least) writes unordered
-		 * directory tags (violating the spec).  Handle
-		 * it here, but be obnoxious (maybe they'll fix it?).
-		 */
-		if (dp->tdir_tag < tif->tif_fieldinfo[fix]->field_tag) {
-			if (!diroutoforderwarning) {
-				TIFFWarning(module,
-"%.1000s: invalid TIFF directory; tags are not sorted in ascending order",
-                                            tif->tif_name);
-				diroutoforderwarning = 1;
-			}
-			fix = 0;			/* O(n^2) */
-		}
-		while (fix < tif->tif_nfields &&
-		       tif->tif_fieldinfo[fix]->field_tag < dp->tdir_tag)
-			fix++;
-		if (fix >= tif->tif_nfields ||
-		    tif->tif_fieldinfo[fix]->field_tag != dp->tdir_tag) {
-
-                    TIFFWarning(module,
-			"%.1000s: unknown field with tag %d (0x%x) encountered",
-                                tif->tif_name, dp->tdir_tag,  dp->tdir_tag);
-
-                    TIFFMergeFieldInfo( tif,
-                                        _TIFFCreateAnonFieldInfo( tif,
-                                              dp->tdir_tag,
-					      (TIFFDataType) dp->tdir_type ),
-                                        1 );
-                    fix = 0;
-                    while (fix < tif->tif_nfields &&
-                           tif->tif_fieldinfo[fix]->field_tag < dp->tdir_tag)
-			fix++;
-		}
-		/*
-		 * Null out old tags that we ignore.
-		 */
-		if (tif->tif_fieldinfo[fix]->field_bit == FIELD_IGNORE) {
-	ignore:
-			dp->tdir_tag = IGNORE;
-			continue;
-		}
-		/*
-		 * Check data type.
-		 */
-		fip = tif->tif_fieldinfo[fix];
-		while (dp->tdir_type != (u_short) fip->field_type) {
-			if (fip->field_type == TIFF_ANY)	/* wildcard */
-				break;
-			fip++, fix++;
-			if (fix == tif->tif_nfields ||
-			    fip->field_tag != dp->tdir_tag) {
-				TIFFWarning(module,
-			"%.1000s: wrong data type %d for \"%s\"; tag ignored",
-					    tif->tif_name, dp->tdir_type,
-					    fip[-1].field_name);
-				goto ignore;
-			}
-		}
-		/*
-		 * Check count if known in advance.
-		 */
-		if (fip->field_readcount != TIFF_VARIABLE) {
-			uint32 expected = (fip->field_readcount == TIFF_SPP) ?
-			    (uint32) td->td_samplesperpixel :
-			    (uint32) fip->field_readcount;
-			if (!CheckDirCount(tif, dp, expected))
-				goto ignore;
-		}
-
-		switch (dp->tdir_tag) {
-		case TIFFTAG_COMPRESSION:
-			/*
-			 * The 5.0 spec says the Compression tag has
-			 * one value, while earlier specs say it has
-			 * one value per sample.  Because of this, we
-			 * accept the tag if one value is supplied.
-			 */
-			if (dp->tdir_count == 1) {
-				v = TIFFExtractData(tif,
-				    dp->tdir_type, dp->tdir_offset);
-				if (!TIFFSetField(tif, dp->tdir_tag, (int)v))
-					goto bad;
-				break;
-			}
-			if (!TIFFFetchPerSampleShorts(tif, dp, &iv) ||
-			    !TIFFSetField(tif, dp->tdir_tag, iv))
-				goto bad;
-			dp->tdir_tag = IGNORE;
-			break;
-		case TIFFTAG_STRIPOFFSETS:
-		case TIFFTAG_STRIPBYTECOUNTS:
-		case TIFFTAG_TILEOFFSETS:
-		case TIFFTAG_TILEBYTECOUNTS:
-			TIFFSetFieldBit(tif, fip->field_bit);
-			break;
-		case TIFFTAG_IMAGEWIDTH:
-		case TIFFTAG_IMAGELENGTH:
-		case TIFFTAG_IMAGEDEPTH:
-		case TIFFTAG_TILELENGTH:
-		case TIFFTAG_TILEWIDTH:
-		case TIFFTAG_TILEDEPTH:
-		case TIFFTAG_PLANARCONFIG:
-		case TIFFTAG_ROWSPERSTRIP:
-			if (!TIFFFetchNormalTag(tif, dp))
-				goto bad;
-			dp->tdir_tag = IGNORE;
-			break;
-		case TIFFTAG_EXTRASAMPLES:
-			(void) TIFFFetchExtraSamples(tif, dp);
-			dp->tdir_tag = IGNORE;
-			break;
-		}
-	}
-
-	/*
-	 * Allocate directory structure and setup defaults.
-	 */
-	if (!TIFFFieldSet(tif, FIELD_IMAGEDIMENSIONS)) {
-		MissingRequired(tif, "ImageLength");
-		goto bad;
-	}
-	if (!TIFFFieldSet(tif, FIELD_PLANARCONFIG)) {
-		MissingRequired(tif, "PlanarConfiguration");
-		goto bad;
-	}
-	/* 
- 	 * Setup appropriate structures (by strip or by tile)
-	 */
-	if (!TIFFFieldSet(tif, FIELD_TILEDIMENSIONS)) {
-		td->td_nstrips = TIFFNumberOfStrips(tif);
-		td->td_tilewidth = td->td_imagewidth;
-		td->td_tilelength = td->td_rowsperstrip;
-		td->td_tiledepth = td->td_imagedepth;
-		tif->tif_flags &= ~TIFF_ISTILED;
-	} else {
-		td->td_nstrips = TIFFNumberOfTiles(tif);
-		tif->tif_flags |= TIFF_ISTILED;
-	}
-	td->td_stripsperimage = td->td_nstrips;
-	if (td->td_planarconfig == PLANARCONFIG_SEPARATE)
-		td->td_stripsperimage /= td->td_samplesperpixel;
-	if (!TIFFFieldSet(tif, FIELD_STRIPOFFSETS)) {
-		MissingRequired(tif,
-		    isTiled(tif) ? "TileOffsets" : "StripOffsets");
-		goto bad;
-	}
-
-	/*
-	 * Second pass: extract other information.
-	 */
-	for (dp = dir, n = dircount; n > 0; n--, dp++) {
-		if (dp->tdir_tag == IGNORE)
-			continue;
-		switch (dp->tdir_tag) {
-		case TIFFTAG_MINSAMPLEVALUE:
-		case TIFFTAG_MAXSAMPLEVALUE:
-		case TIFFTAG_BITSPERSAMPLE:
-			/*
-			 * The 5.0 spec says the Compression tag has
-			 * one value, while earlier specs say it has
-			 * one value per sample.  Because of this, we
-			 * accept the tag if one value is supplied.
-			 *
-			 * The MinSampleValue, MaxSampleValue and
-			 * BitsPerSample tags are supposed to be written
-			 * as one value/sample, but some vendors incorrectly
-			 * write one value only -- so we accept that
-			 * as well (yech).
-			 */
-			if (dp->tdir_count == 1) {
-				v = TIFFExtractData(tif,
-				    dp->tdir_type, dp->tdir_offset);
-				if (!TIFFSetField(tif, dp->tdir_tag, (int)v))
-					goto bad;
-				break;
-			}
-			/* fall thru... */
-		case TIFFTAG_DATATYPE:
-		case TIFFTAG_SAMPLEFORMAT:
-			if (!TIFFFetchPerSampleShorts(tif, dp, &iv) ||
-			    !TIFFSetField(tif, dp->tdir_tag, iv))
-				goto bad;
-			break;
-		case TIFFTAG_SMINSAMPLEVALUE:
-		case TIFFTAG_SMAXSAMPLEVALUE:
-			if (!TIFFFetchPerSampleAnys(tif, dp, &dv) ||
-			    !TIFFSetField(tif, dp->tdir_tag, dv))
-				goto bad;
-			break;
-		case TIFFTAG_STRIPOFFSETS:
-		case TIFFTAG_TILEOFFSETS:
-			if (!TIFFFetchStripThing(tif, dp,
-			    td->td_nstrips, &td->td_stripoffset))
-				goto bad;
-			break;
-		case TIFFTAG_STRIPBYTECOUNTS:
-		case TIFFTAG_TILEBYTECOUNTS:
-			if (!TIFFFetchStripThing(tif, dp,
-			    td->td_nstrips, &td->td_stripbytecount))
-				goto bad;
-			break;
-		case TIFFTAG_COLORMAP:
-		case TIFFTAG_TRANSFERFUNCTION:
-			/*
-			 * TransferFunction can have either 1x or 3x data
-			 * values; Colormap can have only 3x items.
-			 */
-			v = 1L<<td->td_bitspersample;
-			if (dp->tdir_tag == TIFFTAG_COLORMAP ||
-			    dp->tdir_count != (uint32) v) {
-				if (!CheckDirCount(tif, dp, (uint32)(3*v)))
-					break;
-			}
-			v *= sizeof (uint16);
-			cp = CheckMalloc(tif, dp->tdir_count * sizeof (uint16),
-			    "to read \"TransferFunction\" tag");
-			if (cp != NULL) {
-				if (TIFFFetchData(tif, dp, cp)) {
-					/*
-					 * This deals with there being only
-					 * one array to apply to all samples.
-					 */
-					uint32 c =
-					    (uint32)1 << td->td_bitspersample;
-					if (dp->tdir_count == c)
-						v = 0;
-					TIFFSetField(tif, dp->tdir_tag,
-					    cp, cp+v, cp+2*v);
-				}
-				_TIFFfree(cp);
-			}
-			break;
-		case TIFFTAG_PAGENUMBER:
-		case TIFFTAG_HALFTONEHINTS:
-		case TIFFTAG_YCBCRSUBSAMPLING:
-		case TIFFTAG_DOTRANGE:
-			(void) TIFFFetchShortPair(tif, dp);
-			break;
-#ifdef COLORIMETRY_SUPPORT
-		case TIFFTAG_REFERENCEBLACKWHITE:
-			(void) TIFFFetchRefBlackWhite(tif, dp);
-			break;
-#endif
-/* BEGIN REV 4.0 COMPATIBILITY */
-		case TIFFTAG_OSUBFILETYPE:
-			v = 0;
-			switch (TIFFExtractData(tif, dp->tdir_type,
-			    dp->tdir_offset)) {
-			case OFILETYPE_REDUCEDIMAGE:
-				v = FILETYPE_REDUCEDIMAGE;
-				break;
-			case OFILETYPE_PAGE:
-				v = FILETYPE_PAGE;
-				break;
-			}
-			if (v)
-				(void) TIFFSetField(tif,
-				    TIFFTAG_SUBFILETYPE, (int)v);
-			break;
-/* END REV 4.0 COMPATIBILITY */
-		default:
-			(void) TIFFFetchNormalTag(tif, dp);
-			break;
-		}
-	}
-	/*
-	 * Verify Palette image has a Colormap.
-	 */
-	if (td->td_photometric == PHOTOMETRIC_PALETTE &&
-	    !TIFFFieldSet(tif, FIELD_COLORMAP)) {
-		MissingRequired(tif, "Colormap");
-		goto bad;
-	}
-	/*
-	 * Attempt to deal with a missing StripByteCounts tag.
-	 */
-	if (!TIFFFieldSet(tif, FIELD_STRIPBYTECOUNTS)) {
-		/*
-		 * Some manufacturers violate the spec by not giving
-		 * the size of the strips.  In this case, assume there
-		 * is one uncompressed strip of data.
-		 */
-		if ((td->td_planarconfig == PLANARCONFIG_CONTIG &&
-		    td->td_nstrips > 1) ||
-		    (td->td_planarconfig == PLANARCONFIG_SEPARATE &&
-		     td->td_nstrips != td->td_samplesperpixel)) {
-		    MissingRequired(tif, "StripByteCounts");
-		    goto bad;
-		}
-		TIFFWarning(module,
-			"%.1000s: TIFF directory is missing required "
-			"\"%s\" field, calculating from imagelength",
-			tif->tif_name,
-		        _TIFFFieldWithTag(tif,TIFFTAG_STRIPBYTECOUNTS)->field_name);
-		if (EstimateStripByteCounts(tif, dir, dircount) < 0)
-		    goto bad;
-/* 
- * Assume we have wrong StripByteCount value (in case of single strip) in
- * following cases:
- *   - it is equal to zero along with StripOffset;
- *   - it is larger than file itself (in case of uncompressed image).
- */
-#define	BYTECOUNTLOOKSBAD \
-    ( (td->td_stripbytecount[0] == 0 && td->td_stripoffset[0] != 0) || \
-      (td->td_compression == COMPRESSION_NONE && \
-       td->td_stripbytecount[0] > TIFFGetFileSize(tif) - td->td_stripoffset[0]) )
-	} else if (td->td_nstrips == 1 && BYTECOUNTLOOKSBAD) {
-		/*
-		 * Plexus (and others) sometimes give a value
-		 * of zero for a tag when they don't know what
-		 * the correct value is!  Try and handle the
-		 * simple case of estimating the size of a one
-		 * strip image.
-		 */
-		TIFFWarning(module,
-	"%.1000s: Bogus \"%s\" field, ignoring and calculating from imagelength",
-                            tif->tif_name,
-		            _TIFFFieldWithTag(tif,TIFFTAG_STRIPBYTECOUNTS)->field_name);
-		if(EstimateStripByteCounts(tif, dir, dircount) < 0)
-		    goto bad;
-	}
-	if (dir)
-		_TIFFfree((char *)dir);
-	if (!TIFFFieldSet(tif, FIELD_MAXSAMPLEVALUE))
-		td->td_maxsamplevalue = (uint16)((1L<<td->td_bitspersample)-1);
-	/*
-	 * Setup default compression scheme.
-	 */
-	if (!TIFFFieldSet(tif, FIELD_COMPRESSION))
-		TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE);
-        /*
-         * Some manufacturers make life difficult by writing
-	 * large amounts of uncompressed data as a single strip.
-	 * This is contrary to the recommendations of the spec.
-         * The following makes an attempt at breaking such images
-	 * into strips closer to the recommended 8k bytes.  A
-	 * side effect, however, is that the RowsPerStrip tag
-	 * value may be changed.
-         */
-	if (td->td_nstrips == 1 && td->td_compression == COMPRESSION_NONE &&
-	    (tif->tif_flags & (TIFF_STRIPCHOP|TIFF_ISTILED)) == TIFF_STRIPCHOP)
-		ChopUpSingleUncompressedStrip(tif);
-	/*
-	 * Reinitialize i/o since we are starting on a new directory.
-	 */
-	tif->tif_row = (uint32) -1;
-	tif->tif_curstrip = (tstrip_t) -1;
-	tif->tif_col = (uint32) -1;
-	tif->tif_curtile = (ttile_t) -1;
-	tif->tif_tilesize = TIFFTileSize(tif);
-	tif->tif_scanlinesize = TIFFScanlineSize(tif);
-	return (1);
-bad:
-	if (dir)
-		_TIFFfree(dir);
-	return (0);
-}
-
-static int
-EstimateStripByteCounts(TIFF* tif, TIFFDirEntry* dir, uint16 dircount)
-{
-	static const char module[] = "EstimateStripByteCounts";
-
-	register TIFFDirEntry *dp;
-	register TIFFDirectory *td = &tif->tif_dir;
-	uint16 i;
-
-	if (td->td_stripbytecount)
-		_TIFFfree(td->td_stripbytecount);
-	td->td_stripbytecount = (uint32*)
-	    CheckMalloc(tif, td->td_nstrips * sizeof (uint32),
-		"for \"StripByteCounts\" array");
-	if (td->td_compression != COMPRESSION_NONE) {
-		uint32 space = (uint32)(sizeof (TIFFHeader)
-		    + sizeof (uint16)
-		    + (dircount * sizeof (TIFFDirEntry))
-		    + sizeof (uint32));
-		toff_t filesize = TIFFGetFileSize(tif);
-		uint16 n;
-
-		/* calculate amount of space used by indirect values */
-		for (dp = dir, n = dircount; n > 0; n--, dp++)
-		{
-			uint32 cc = TIFFDataWidth((TIFFDataType) dp->tdir_type);
-			if (cc == 0) {
-				TIFFError(module,
-			"%.1000s: Cannot determine size of unknown tag type %d",
-					  tif->tif_name, dp->tdir_type);
-				return -1;
-			}
-			cc = cc * dp->tdir_count;
-			if (cc > sizeof (uint32))
-				space += cc;
-		}
-		space = filesize - space;
-		if (td->td_planarconfig == PLANARCONFIG_SEPARATE)
-			space /= td->td_samplesperpixel;
-		for (i = 0; i < td->td_nstrips; i++)
-			td->td_stripbytecount[i] = space;
-		/*
-		 * This gross hack handles the case were the offset to
-		 * the last strip is past the place where we think the strip
-		 * should begin.  Since a strip of data must be contiguous,
-		 * it's safe to assume that we've overestimated the amount
-		 * of data in the strip and trim this number back accordingly.
-		 */ 
-		i--;
-		if (((toff_t)(td->td_stripoffset[i]+td->td_stripbytecount[i]))
-                                                               > filesize)
-			td->td_stripbytecount[i] =
-			    filesize - td->td_stripoffset[i];
-	} else {
-		uint32 rowbytes = TIFFScanlineSize(tif);
-		uint32 rowsperstrip = td->td_imagelength/td->td_stripsperimage;
-		for (i = 0; i < td->td_nstrips; i++)
-			td->td_stripbytecount[i] = rowbytes*rowsperstrip;
-	}
-	TIFFSetFieldBit(tif, FIELD_STRIPBYTECOUNTS);
-	if (!TIFFFieldSet(tif, FIELD_ROWSPERSTRIP))
-		td->td_rowsperstrip = td->td_imagelength;
-	return 1;
-}
-
-static void
-MissingRequired(TIFF* tif, const char* tagname)
-{
-	static const char module[] = "MissingRequired";
-
-	TIFFError(module,
-		  "%.1000s: TIFF directory is missing required \"%s\" field",
-		  tif->tif_name, tagname);
-}
-
-/*
- * Check the count field of a directory
- * entry against a known value.  The caller
- * is expected to skip/ignore the tag if
- * there is a mismatch.
- */
-static int
-CheckDirCount(TIFF* tif, TIFFDirEntry* dir, uint32 count)
-{
-	if (count != dir->tdir_count) {
-		TIFFWarning(tif->tif_name,
-	"incorrect count for field \"%s\" (%lu, expecting %lu); tag ignored",
-		    _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name,
-		    dir->tdir_count, count);
-		return (0);
-	}
-	return (1);
-}
-
-/*
- * Fetch a contiguous directory item.
- */
-static tsize_t
-TIFFFetchData(TIFF* tif, TIFFDirEntry* dir, char* cp)
-{
-	int w = TIFFDataWidth((TIFFDataType) dir->tdir_type);
-	tsize_t cc = dir->tdir_count * w;
-
-	if (!isMapped(tif)) {
-		if (!SeekOK(tif, dir->tdir_offset))
-			goto bad;
-		if (!ReadOK(tif, cp, cc))
-			goto bad;
-	} else {
-		if (dir->tdir_offset + cc > tif->tif_size)
-			goto bad;
-		_TIFFmemcpy(cp, tif->tif_base + dir->tdir_offset, cc);
-	}
-	if (tif->tif_flags & TIFF_SWAB) {
-		switch (dir->tdir_type) {
-		case TIFF_SHORT:
-		case TIFF_SSHORT:
-			TIFFSwabArrayOfShort((uint16*) cp, dir->tdir_count);
-			break;
-		case TIFF_LONG:
-		case TIFF_SLONG:
-		case TIFF_FLOAT:
-			TIFFSwabArrayOfLong((uint32*) cp, dir->tdir_count);
-			break;
-		case TIFF_RATIONAL:
-		case TIFF_SRATIONAL:
-			TIFFSwabArrayOfLong((uint32*) cp, 2*dir->tdir_count);
-			break;
-		case TIFF_DOUBLE:
-			TIFFSwabArrayOfDouble((double*) cp, dir->tdir_count);
-			break;
-		}
-	}
-	return (cc);
-bad:
-	TIFFError(tif->tif_name, "Error fetching data for field \"%s\"",
-	    _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name);
-	return ((tsize_t) 0);
-}
-
-/*
- * Fetch an ASCII item from the file.
- */
-static tsize_t
-TIFFFetchString(TIFF* tif, TIFFDirEntry* dir, char* cp)
-{
-	if (dir->tdir_count <= 4) {
-		uint32 l = dir->tdir_offset;
-		if (tif->tif_flags & TIFF_SWAB)
-			TIFFSwabLong(&l);
-		_TIFFmemcpy(cp, &l, dir->tdir_count);
-		return (1);
-	}
-	return (TIFFFetchData(tif, dir, cp));
-}
-
-/*
- * Convert numerator+denominator to float.
- */
-static int
-cvtRational(TIFF* tif, TIFFDirEntry* dir, uint32 num, uint32 denom, float* rv)
-{
-	if (denom == 0) {
-		TIFFError(tif->tif_name,
-		    "%s: Rational with zero denominator (num = %lu)",
-		    _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name, num);
-		return (0);
-	} else {
-		if (dir->tdir_type == TIFF_RATIONAL)
-			*rv = ((float)num / (float)denom);
-		else
-			*rv = ((float)(int32)num / (float)(int32)denom);
-		return (1);
-	}
-}
-
-/*
- * Fetch a rational item from the file
- * at offset off and return the value
- * as a floating point number.
- */
-static float
-TIFFFetchRational(TIFF* tif, TIFFDirEntry* dir)
-{
-	uint32 l[2];
-	float v;
-
-	return (!TIFFFetchData(tif, dir, (char *)l) ||
-	    !cvtRational(tif, dir, l[0], l[1], &v) ? 1.0f : v);
-}
-
-/*
- * Fetch a single floating point value
- * from the offset field and return it
- * as a native float.
- */
-static float
-TIFFFetchFloat(TIFF* tif, TIFFDirEntry* dir)
-{
-	long l = TIFFExtractData(tif, dir->tdir_type, dir->tdir_offset);
-	float v = *(float*) &l;
-	TIFFCvtIEEEFloatToNative(tif, 1, &v);
-	return (v);
-}
-
-/*
- * Fetch an array of BYTE or SBYTE values.
- */
-static int
-TIFFFetchByteArray(TIFF* tif, TIFFDirEntry* dir, uint16* v)
-{
-    if (dir->tdir_count <= 4) {
-        /*
-         * Extract data from offset field.
-         */
-        if (tif->tif_header.tiff_magic == TIFF_BIGENDIAN) {
-	    if (dir->tdir_type == TIFF_SBYTE)
-                switch (dir->tdir_count) {
-                    case 4: v[3] = (signed char)(dir->tdir_offset & 0xff);
-                    case 3: v[2] = (signed char)((dir->tdir_offset >> 8) & 0xff);
-                    case 2: v[1] = (signed char)((dir->tdir_offset >> 16) & 0xff);
-		    case 1: v[0] = (signed char)(dir->tdir_offset >> 24);	
-                }
-	    else
-                switch (dir->tdir_count) {
-                    case 4: v[3] = (uint16)(dir->tdir_offset & 0xff);
-                    case 3: v[2] = (uint16)((dir->tdir_offset >> 8) & 0xff);
-                    case 2: v[1] = (uint16)((dir->tdir_offset >> 16) & 0xff);
-		    case 1: v[0] = (uint16)(dir->tdir_offset >> 24);	
-                }
-	} else {
-	    if (dir->tdir_type == TIFF_SBYTE)
-                switch (dir->tdir_count) {
-                    case 4: v[3] = (signed char)(dir->tdir_offset >> 24);
-                    case 3: v[2] = (signed char)((dir->tdir_offset >> 16) & 0xff);
-                    case 2: v[1] = (signed char)((dir->tdir_offset >> 8) & 0xff);
-                    case 1: v[0] = (signed char)(dir->tdir_offset & 0xff);
-		}
-	    else
-                switch (dir->tdir_count) {
-                    case 4: v[3] = (uint16)(dir->tdir_offset >> 24);
-                    case 3: v[2] = (uint16)((dir->tdir_offset >> 16) & 0xff);
-                    case 2: v[1] = (uint16)((dir->tdir_offset >> 8) & 0xff);
-                    case 1: v[0] = (uint16)(dir->tdir_offset & 0xff);
-		}
-	}
-        return (1);
-    } else
-        return (TIFFFetchData(tif, dir, (char*) v) != 0);	/* XXX */
-}
-
-/*
- * Fetch an array of SHORT or SSHORT values.
- */
-static int
-TIFFFetchShortArray(TIFF* tif, TIFFDirEntry* dir, uint16* v)
-{
-	if (dir->tdir_count <= 2) {
-		if (tif->tif_header.tiff_magic == TIFF_BIGENDIAN) {
-			switch (dir->tdir_count) {
-			case 2: v[1] = (uint16) (dir->tdir_offset & 0xffff);
-			case 1: v[0] = (uint16) (dir->tdir_offset >> 16);
-			}
-		} else {
-			switch (dir->tdir_count) {
-			case 2: v[1] = (uint16) (dir->tdir_offset >> 16);
-			case 1: v[0] = (uint16) (dir->tdir_offset & 0xffff);
-			}
-		}
-		return (1);
-	} else
-		return (TIFFFetchData(tif, dir, (char *)v) != 0);
-}
-
-/*
- * Fetch a pair of SHORT or BYTE values.
- */
-static int
-TIFFFetchShortPair(TIFF* tif, TIFFDirEntry* dir)
-{
-	uint16 v[4];
-	int ok = 0;
-
-	switch (dir->tdir_type) {
-	case TIFF_SHORT:
-	case TIFF_SSHORT:
-		ok = TIFFFetchShortArray(tif, dir, v);
-		break;
-	case TIFF_BYTE:
-	case TIFF_SBYTE:
-		ok  = TIFFFetchByteArray(tif, dir, v);
-		break;
-	}
-	if (ok)
-		TIFFSetField(tif, dir->tdir_tag, v[0], v[1]);
-	return (ok);
-}
-
-/*
- * Fetch an array of LONG or SLONG values.
- */
-static int
-TIFFFetchLongArray(TIFF* tif, TIFFDirEntry* dir, uint32* v)
-{
-	if (dir->tdir_count == 1) {
-		v[0] = dir->tdir_offset;
-		return (1);
-	} else
-		return (TIFFFetchData(tif, dir, (char*) v) != 0);
-}
-
-/*
- * Fetch an array of RATIONAL or SRATIONAL values.
- */
-static int
-TIFFFetchRationalArray(TIFF* tif, TIFFDirEntry* dir, float* v)
-{
-	int ok = 0;
-	uint32* l;
-
-	l = (uint32*)CheckMalloc(tif,
-	    dir->tdir_count*TIFFDataWidth((TIFFDataType) dir->tdir_type),
-	    "to fetch array of rationals");
-	if (l) {
-		if (TIFFFetchData(tif, dir, (char *)l)) {
-			uint32 i;
-			for (i = 0; i < dir->tdir_count; i++) {
-				ok = cvtRational(tif, dir,
-				    l[2*i+0], l[2*i+1], &v[i]);
-				if (!ok)
-					break;
-			}
-		}
-		_TIFFfree((char *)l);
-	}
-	return (ok);
-}
-
-/*
- * Fetch an array of FLOAT values.
- */
-static int
-TIFFFetchFloatArray(TIFF* tif, TIFFDirEntry* dir, float* v)
-{
-
-	if (dir->tdir_count == 1) {
-		v[0] = *(float*) &dir->tdir_offset;
-		TIFFCvtIEEEFloatToNative(tif, dir->tdir_count, v);
-		return (1);
-	} else	if (TIFFFetchData(tif, dir, (char*) v)) {
-		TIFFCvtIEEEFloatToNative(tif, dir->tdir_count, v);
-		return (1);
-	} else
-		return (0);
-}
-
-/*
- * Fetch an array of DOUBLE values.
- */
-static int
-TIFFFetchDoubleArray(TIFF* tif, TIFFDirEntry* dir, double* v)
-{
-	if (TIFFFetchData(tif, dir, (char*) v)) {
-		TIFFCvtIEEEDoubleToNative(tif, dir->tdir_count, v);
-		return (1);
-	} else
-		return (0);
-}
-
-/*
- * Fetch an array of ANY values.  The actual values are
- * returned as doubles which should be able hold all the
- * types.  Yes, there really should be an tany_t to avoid
- * this potential non-portability ...  Note in particular
- * that we assume that the double return value vector is
- * large enough to read in any fundamental type.  We use
- * that vector as a buffer to read in the base type vector
- * and then convert it in place to double (from end
- * to front of course).
- */
-static int
-TIFFFetchAnyArray(TIFF* tif, TIFFDirEntry* dir, double* v)
-{
-	int i;
-
-	switch (dir->tdir_type) {
-	case TIFF_BYTE:
-	case TIFF_SBYTE:
-		if (!TIFFFetchByteArray(tif, dir, (uint16*) v))
-			return (0);
-		if (dir->tdir_type == TIFF_BYTE) {
-			uint16* vp = (uint16*) v;
-			for (i = dir->tdir_count-1; i >= 0; i--)
-				v[i] = vp[i];
-		} else {
-			int16* vp = (int16*) v;
-			for (i = dir->tdir_count-1; i >= 0; i--)
-				v[i] = vp[i];
-		}
-		break;
-	case TIFF_SHORT:
-	case TIFF_SSHORT:
-		if (!TIFFFetchShortArray(tif, dir, (uint16*) v))
-			return (0);
-		if (dir->tdir_type == TIFF_SHORT) {
-			uint16* vp = (uint16*) v;
-			for (i = dir->tdir_count-1; i >= 0; i--)
-				v[i] = vp[i];
-		} else {
-			int16* vp = (int16*) v;
-			for (i = dir->tdir_count-1; i >= 0; i--)
-				v[i] = vp[i];
-		}
-		break;
-	case TIFF_LONG:
-	case TIFF_SLONG:
-		if (!TIFFFetchLongArray(tif, dir, (uint32*) v))
-			return (0);
-		if (dir->tdir_type == TIFF_LONG) {
-			uint32* vp = (uint32*) v;
-			for (i = dir->tdir_count-1; i >= 0; i--)
-				v[i] = vp[i];
-		} else {
-			int32* vp = (int32*) v;
-			for (i = dir->tdir_count-1; i >= 0; i--)
-				v[i] = vp[i];
-		}
-		break;
-	case TIFF_RATIONAL:
-	case TIFF_SRATIONAL:
-		if (!TIFFFetchRationalArray(tif, dir, (float*) v))
-			return (0);
-		{ float* vp = (float*) v;
-		  for (i = dir->tdir_count-1; i >= 0; i--)
-			v[i] = vp[i];
-		}
-		break;
-	case TIFF_FLOAT:
-		if (!TIFFFetchFloatArray(tif, dir, (float*) v))
-			return (0);
-		{ float* vp = (float*) v;
-		  for (i = dir->tdir_count-1; i >= 0; i--)
-			v[i] = vp[i];
-		}
-		break;
-	case TIFF_DOUBLE:
-		return (TIFFFetchDoubleArray(tif, dir, (double*) v));
-	default:
-		/* TIFF_NOTYPE */
-		/* TIFF_ASCII */
-		/* TIFF_UNDEFINED */
-		TIFFError(tif->tif_name,
-		    "cannot read TIFF_ANY type %d for field \"%s\"",
-		    _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name);
-		return (0);
-	}
-	return (1);
-}
-
-/*
- * Fetch a tag that is not handled by special case code.
- */
-static int
-TIFFFetchNormalTag(TIFF* tif, TIFFDirEntry* dp)
-{
-	static const char mesg[] = "to fetch tag value";
-	int ok = 0;
-	const TIFFFieldInfo* fip = _TIFFFieldWithTag(tif, dp->tdir_tag);
-
-	if (dp->tdir_count > 1) {		/* array of values */
-		char* cp = NULL;
-
-		switch (dp->tdir_type) {
-		case TIFF_BYTE:
-		case TIFF_SBYTE:
-			/* NB: always expand BYTE values to shorts */
-			cp = CheckMalloc(tif,
-			    dp->tdir_count * sizeof (uint16), mesg);
-			ok = cp && TIFFFetchByteArray(tif, dp, (uint16*) cp);
-			break;
-		case TIFF_SHORT:
-		case TIFF_SSHORT:
-			cp = CheckMalloc(tif,
-			    dp->tdir_count * sizeof (uint16), mesg);
-			ok = cp && TIFFFetchShortArray(tif, dp, (uint16*) cp);
-			break;
-		case TIFF_LONG:
-		case TIFF_SLONG:
-			cp = CheckMalloc(tif,
-			    dp->tdir_count * sizeof (uint32), mesg);
-			ok = cp && TIFFFetchLongArray(tif, dp, (uint32*) cp);
-			break;
-		case TIFF_RATIONAL:
-		case TIFF_SRATIONAL:
-			cp = CheckMalloc(tif,
-			    dp->tdir_count * sizeof (float), mesg);
-			ok = cp && TIFFFetchRationalArray(tif, dp, (float*) cp);
-			break;
-		case TIFF_FLOAT:
-			cp = CheckMalloc(tif,
-			    dp->tdir_count * sizeof (float), mesg);
-			ok = cp && TIFFFetchFloatArray(tif, dp, (float*) cp);
-			break;
-		case TIFF_DOUBLE:
-			cp = CheckMalloc(tif,
-			    dp->tdir_count * sizeof (double), mesg);
-			ok = cp && TIFFFetchDoubleArray(tif, dp, (double*) cp);
-			break;
-		case TIFF_ASCII:
-		case TIFF_UNDEFINED:		/* bit of a cheat... */
-			/*
-			 * Some vendors write strings w/o the trailing
-			 * NULL byte, so always append one just in case.
-			 */
-			cp = CheckMalloc(tif, dp->tdir_count+1, mesg);
-			if( (ok = (cp && TIFFFetchString(tif, dp, cp))) != 0 )
-				cp[dp->tdir_count] = '\0';	/* XXX */
-			break;
-		}
-		if (ok) {
-			ok = (fip->field_passcount ?
-			    TIFFSetField(tif, dp->tdir_tag, dp->tdir_count, cp)
-			  : TIFFSetField(tif, dp->tdir_tag, cp));
-		}
-		if (cp != NULL)
-			_TIFFfree(cp);
-	} else if (CheckDirCount(tif, dp, 1)) {	/* singleton value */
-		switch (dp->tdir_type) {
-		case TIFF_BYTE:
-		case TIFF_SBYTE:
-		case TIFF_SHORT:
-		case TIFF_SSHORT:
-			/*
-			 * If the tag is also acceptable as a LONG or SLONG
-			 * then TIFFSetField will expect an uint32 parameter
-			 * passed to it (through varargs).  Thus, for machines
-			 * where sizeof (int) != sizeof (uint32) we must do
-			 * a careful check here.  It's hard to say if this
-			 * is worth optimizing.
-			 *
-			 * NB: We use TIFFFieldWithTag here knowing that
-			 *     it returns us the first entry in the table
-			 *     for the tag and that that entry is for the
-			 *     widest potential data type the tag may have.
-			 */
-			{ TIFFDataType type = fip->field_type;
-			  if (type != TIFF_LONG && type != TIFF_SLONG) {
-				uint16 v = (uint16)
-			   TIFFExtractData(tif, dp->tdir_type, dp->tdir_offset);
-				ok = (fip->field_passcount ?
-				    TIFFSetField(tif, dp->tdir_tag, 1, &v)
-				  : TIFFSetField(tif, dp->tdir_tag, v));
-				break;
-			  }
-			}
-			/* fall thru... */
-		case TIFF_LONG:
-		case TIFF_SLONG:
-			{ uint32 v32 =
-		    TIFFExtractData(tif, dp->tdir_type, dp->tdir_offset);
-			  ok = (fip->field_passcount ? 
-			      TIFFSetField(tif, dp->tdir_tag, 1, &v32)
-			    : TIFFSetField(tif, dp->tdir_tag, v32));
-			}
-			break;
-		case TIFF_RATIONAL:
-		case TIFF_SRATIONAL:
-		case TIFF_FLOAT:
-			{ float v = (dp->tdir_type == TIFF_FLOAT ? 
-			      TIFFFetchFloat(tif, dp)
-			    : TIFFFetchRational(tif, dp));
-			  ok = (fip->field_passcount ?
-			      TIFFSetField(tif, dp->tdir_tag, 1, &v)
-			    : TIFFSetField(tif, dp->tdir_tag, v));
-			}
-			break;
-		case TIFF_DOUBLE:
-			{ double v;
-			  ok = (TIFFFetchDoubleArray(tif, dp, &v) &&
-			    (fip->field_passcount ?
-			      TIFFSetField(tif, dp->tdir_tag, 1, &v)
-			    : TIFFSetField(tif, dp->tdir_tag, v))
-			  );
-			}
-			break;
-		case TIFF_ASCII:
-		case TIFF_UNDEFINED:		/* bit of a cheat... */
-			{ char c[2];
-			  if( (ok = (TIFFFetchString(tif, dp, c) != 0)) != 0 ){
-				c[1] = '\0';		/* XXX paranoid */
-				ok = TIFFSetField(tif, dp->tdir_tag, c);
-			  }
-			}
-			break;
-		}
-	}
-	return (ok);
-}
-
-#define	NITEMS(x)	(sizeof (x) / sizeof (x[0]))
-/*
- * Fetch samples/pixel short values for 
- * the specified tag and verify that
- * all values are the same.
- */
-static int
-TIFFFetchPerSampleShorts(TIFF* tif, TIFFDirEntry* dir, int* pl)
-{
-	int samples = tif->tif_dir.td_samplesperpixel;
-	int status = 0;
-
-	if (CheckDirCount(tif, dir, (uint32) samples)) {
-		uint16 buf[10];
-		uint16* v = buf;
-
-		if (samples > NITEMS(buf))
-			v = (uint16*) _TIFFmalloc(samples * sizeof (uint16));
-		if (TIFFFetchShortArray(tif, dir, v)) {
-			int i;
-			for (i = 1; i < samples; i++)
-				if (v[i] != v[0]) {
-					TIFFError(tif->tif_name,
-		"Cannot handle different per-sample values for field \"%s\"",
-			   _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name);
-					goto bad;
-				}
-			*pl = v[0];
-			status = 1;
-		}
-	bad:
-		if (v != buf)
-			_TIFFfree((char*) v);
-	}
-	return (status);
-}
-
-/*
- * Fetch samples/pixel ANY values for 
- * the specified tag and verify that
- * all values are the same.
- */
-static int
-TIFFFetchPerSampleAnys(TIFF* tif, TIFFDirEntry* dir, double* pl)
-{
-	int samples = (int) tif->tif_dir.td_samplesperpixel;
-	int status = 0;
-
-	if (CheckDirCount(tif, dir, (uint32) samples)) {
-		double buf[10];
-		double* v = buf;
-
-		if (samples > NITEMS(buf))
-			v = (double*) _TIFFmalloc(samples * sizeof (double));
-		if (TIFFFetchAnyArray(tif, dir, v)) {
-			int i;
-			for (i = 1; i < samples; i++)
-				if (v[i] != v[0]) {
-					TIFFError(tif->tif_name,
-		"Cannot handle different per-sample values for field \"%s\"",
-			   _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name);
-					goto bad;
-				}
-			*pl = v[0];
-			status = 1;
-		}
-	bad:
-		if (v != buf)
-			_TIFFfree(v);
-	}
-	return (status);
-}
-#undef NITEMS
-
-/*
- * Fetch a set of offsets or lengths.
- * While this routine says "strips",
- * in fact it's also used for tiles.
- */
-static int
-TIFFFetchStripThing(TIFF* tif, TIFFDirEntry* dir, long nstrips, uint32** lpp)
-{
-	register uint32* lp;
-	int status;
-
-        CheckDirCount(tif, dir, (uint32) nstrips);
-
-	/*
-	 * Allocate space for strip information.
-	 */
-	if (*lpp == NULL &&
-	    (*lpp = (uint32 *)CheckMalloc(tif,
-	      nstrips * sizeof (uint32), "for strip array")) == NULL)
-		return (0);
-	lp = *lpp;
-        memset( lp, 0, sizeof(uint32) * nstrips );
-
-	if (dir->tdir_type == (int)TIFF_SHORT) {
-		/*
-		 * Handle uint16->uint32 expansion.
-		 */
-		uint16* dp = (uint16*) CheckMalloc(tif,
-		    dir->tdir_count* sizeof (uint16), "to fetch strip tag");
-		if (dp == NULL)
-			return (0);
-		if( (status = TIFFFetchShortArray(tif, dir, dp)) != 0 ) {
-                    int i;
-                    
-                    for( i = 0; i < nstrips && i < (int) dir->tdir_count; i++ )
-                    {
-                        lp[i] = dp[i];
-                    }
-		}
-		_TIFFfree((char*) dp);
-
-        } else if( nstrips != (int) dir->tdir_count ) {
-            /* Special case to correct length */
-
-            uint32* dp = (uint32*) CheckMalloc(tif,
-		    dir->tdir_count* sizeof (uint32), "to fetch strip tag");
-            if (dp == NULL)
-                return (0);
-
-            status = TIFFFetchLongArray(tif, dir, dp);
-            if( status != 0 ) {
-                int i;
-
-                for( i = 0; i < nstrips && i < (int) dir->tdir_count; i++ )
-                {
-                    lp[i] = dp[i];
-                }
-            }
-
-            _TIFFfree( (char *) dp );
-	} else
-            status = TIFFFetchLongArray(tif, dir, lp);
-        
-	return (status);
-}
-
-#define	NITEMS(x)	(sizeof (x) / sizeof (x[0]))
-/*
- * Fetch and set the ExtraSamples tag.
- */
-static int
-TIFFFetchExtraSamples(TIFF* tif, TIFFDirEntry* dir)
-{
-	uint16 buf[10];
-	uint16* v = buf;
-	int status;
-
-	if (dir->tdir_count > NITEMS(buf))
-		v = (uint16*) _TIFFmalloc(dir->tdir_count * sizeof (uint16));
-	if (dir->tdir_type == TIFF_BYTE)
-		status = TIFFFetchByteArray(tif, dir, v);
-	else
-		status = TIFFFetchShortArray(tif, dir, v);
-	if (status)
-		status = TIFFSetField(tif, dir->tdir_tag, dir->tdir_count, v);
-	if (v != buf)
-		_TIFFfree((char*) v);
-	return (status);
-}
-#undef NITEMS
-
-#ifdef COLORIMETRY_SUPPORT
-/*
- * Fetch and set the RefBlackWhite tag.
- */
-static int
-TIFFFetchRefBlackWhite(TIFF* tif, TIFFDirEntry* dir)
-{
-	static const char mesg[] = "for \"ReferenceBlackWhite\" array";
-	char* cp;
-	int ok;
-
-	if (dir->tdir_type == TIFF_RATIONAL)
-		return (TIFFFetchNormalTag(tif, dir));
-	/*
-	 * Handle LONG's for backward compatibility.
-	 */
-	cp = CheckMalloc(tif, dir->tdir_count * sizeof (uint32), mesg);
-	if( (ok = (cp && TIFFFetchLongArray(tif, dir, (uint32*) cp))) != 0) {
-		float* fp = (float*)
-		    CheckMalloc(tif, dir->tdir_count * sizeof (float), mesg);
-		if( (ok = (fp != NULL)) != 0 ) {
-			uint32 i;
-			for (i = 0; i < dir->tdir_count; i++)
-				fp[i] = (float)((uint32*) cp)[i];
-			ok = TIFFSetField(tif, dir->tdir_tag, fp);
-			_TIFFfree((char*) fp);
-		}
-	}
-	if (cp)
-		_TIFFfree(cp);
-	return (ok);
-}
-#endif
-
-/*
- * Replace a single strip (tile) of uncompressed data by
- * multiple strips (tiles), each approximately 8Kbytes.
- * This is useful for dealing with large images or
- * for dealing with machines with a limited amount
- * memory.
- */
-static void
-ChopUpSingleUncompressedStrip(TIFF* tif)
-{
-	register TIFFDirectory *td = &tif->tif_dir;
-	uint32 bytecount = td->td_stripbytecount[0];
-	uint32 offset = td->td_stripoffset[0];
-	tsize_t rowbytes = TIFFVTileSize(tif, 1), stripbytes;
-	tstrip_t strip, nstrips, rowsperstrip;
-	uint32* newcounts;
-	uint32* newoffsets;
-
-	/*
-	 * Make the rows hold at least one
-	 * scanline, but fill 8k if possible.
-	 */
-	if (rowbytes > 8192) {
-		stripbytes = rowbytes;
-		rowsperstrip = 1;
-	} else if (rowbytes > 0 ) {
-		rowsperstrip = 8192 / rowbytes;
-		stripbytes = rowbytes * rowsperstrip;
-	}
-        else
-            return;
-
-	/* never increase the number of strips in an image */
-	if (rowsperstrip >= td->td_rowsperstrip)
-		return;
-	nstrips = (tstrip_t) TIFFhowmany(bytecount, stripbytes);
-	newcounts = (uint32*) CheckMalloc(tif, nstrips * sizeof (uint32),
-				"for chopped \"StripByteCounts\" array");
-	newoffsets = (uint32*) CheckMalloc(tif, nstrips * sizeof (uint32),
-				"for chopped \"StripOffsets\" array");
-	if (newcounts == NULL || newoffsets == NULL) {
-	        /*
-		 * Unable to allocate new strip information, give
-		 * up and use the original one strip information.
-		 */
-		if (newcounts != NULL)
-			_TIFFfree(newcounts);
-		if (newoffsets != NULL)
-			_TIFFfree(newoffsets);
-		return;
-	}
-	/*
-	 * Fill the strip information arrays with
-	 * new bytecounts and offsets that reflect
-	 * the broken-up format.
-	 */
-	for (strip = 0; strip < nstrips; strip++) {
-		if (stripbytes > (tsize_t) bytecount)
-			stripbytes = bytecount;
-		newcounts[strip] = stripbytes;
-		newoffsets[strip] = offset;
-		offset += stripbytes;
-		bytecount -= stripbytes;
-	}
-	/*
-	 * Replace old single strip info with multi-strip info.
-	 */
-	td->td_stripsperimage = td->td_nstrips = nstrips;
-	TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, rowsperstrip);
-
-	_TIFFfree(td->td_stripbytecount);
-	_TIFFfree(td->td_stripoffset);
-	td->td_stripbytecount = newcounts;
-	td->td_stripoffset = newoffsets;
-}
diff --git a/src/tiff/tif_dirwrite.c b/src/tiff/tif_dirwrite.c
deleted file mode 100644
index 9a17e85..0000000
--- a/src/tiff/tif_dirwrite.c
+++ /dev/null
@@ -1,1233 +0,0 @@
-/* $Header: /home/terralib/src/tiff/tif_dirwrite.c,v 1.3 2004/03/19 11:51:24 lubia Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library.
- *
- * Directory Write Support Routines.
- */
-#include "tiffiop.h"
-
-#if HAVE_IEEEFP
-#define	TIFFCvtNativeToIEEEFloat(tif, n, fp)
-#define	TIFFCvtNativeToIEEEDouble(tif, n, dp)
-#else
-extern	void TIFFCvtNativeToIEEEFloat(TIFF*, uint32, float*);
-extern	void TIFFCvtNativeToIEEEDouble(TIFF*, uint32, double*);
-#endif
-
-static	int TIFFWriteNormalTag(TIFF*, TIFFDirEntry*, const TIFFFieldInfo*);
-static	void TIFFSetupShortLong(TIFF*, ttag_t, TIFFDirEntry*, uint32);
-static	void TIFFSetupShort(TIFF*, ttag_t, TIFFDirEntry*, uint16);
-static	int TIFFSetupShortPair(TIFF*, ttag_t, TIFFDirEntry*);
-static	int TIFFWritePerSampleShorts(TIFF*, ttag_t, TIFFDirEntry*);
-static	int TIFFWritePerSampleAnys(TIFF*, TIFFDataType, ttag_t, TIFFDirEntry*);
-static	int TIFFWriteShortTable(TIFF*, ttag_t, TIFFDirEntry*, uint32, uint16**);
-static	int TIFFWriteShortArray(TIFF*,
-	    TIFFDataType, ttag_t, TIFFDirEntry*, uint32, uint16*);
-static	int TIFFWriteLongArray(TIFF *,
-	    TIFFDataType, ttag_t, TIFFDirEntry*, uint32, uint32*);
-static	int TIFFWriteRationalArray(TIFF *,
-	    TIFFDataType, ttag_t, TIFFDirEntry*, uint32, float*);
-static	int TIFFWriteFloatArray(TIFF *,
-	    TIFFDataType, ttag_t, TIFFDirEntry*, uint32, float*);
-static	int TIFFWriteDoubleArray(TIFF *,
-	    TIFFDataType, ttag_t, TIFFDirEntry*, uint32, double*);
-static	int TIFFWriteByteArray(TIFF*, TIFFDirEntry*, char*);
-static	int TIFFWriteAnyArray(TIFF*,
-	    TIFFDataType, ttag_t, TIFFDirEntry*, uint32, double*);
-#ifdef COLORIMETRY_SUPPORT
-static	int TIFFWriteTransferFunction(TIFF*, TIFFDirEntry*);
-#endif
-#ifdef CMYK_SUPPORT
-static	int TIFFWriteInkNames(TIFF*, TIFFDirEntry*);
-#endif
-static	int TIFFWriteData(TIFF*, TIFFDirEntry*, char*);
-static	int TIFFLinkDirectory(TIFF*);
-
-#define	WriteRationalPair(type, tag1, v1, tag2, v2) {		\
-	if (!TIFFWriteRational(tif, type, tag1, dir, v1))	\
-		goto bad;					\
-	if (!TIFFWriteRational(tif, type, tag2, dir+1, v2))	\
-		goto bad;					\
-	dir++;							\
-}
-#define	TIFFWriteRational(tif, type, tag, dir, v) \
-	TIFFWriteRationalArray((tif), (type), (tag), (dir), 1, &(v))
-#ifndef TIFFWriteRational
-static	int TIFFWriteRational(TIFF*,
-	    TIFFDataType, ttag_t, TIFFDirEntry*, float);
-#endif
-
-/*
- * Write the contents of the current directory
- * to the specified file.  This routine doesn't
- * handle overwriting a directory with auxiliary
- * storage that's been changed.
- */
-static int
-_TIFFWriteDirectory(TIFF* tif, int done)
-{
-	uint16 dircount;
-	toff_t diroff;
-	ttag_t tag;
-	uint32 nfields;
-	tsize_t dirsize;
-	char* data;
-	TIFFDirEntry* dir;
-	TIFFDirectory* td;
-	u_long b, fields[FIELD_SETLONGS];
-	int fi, nfi;
-
-	if (tif->tif_mode == O_RDONLY)
-		return (1);
-	/*
-	 * Clear write state so that subsequent images with
-	 * different characteristics get the right buffers
-	 * setup for them.
-	 */
-	if (done)
-	{
-	    if (tif->tif_flags & TIFF_POSTENCODE) {
-		    tif->tif_flags &= ~TIFF_POSTENCODE;
-		    if (!(*tif->tif_postencode)(tif)) {
-			    TIFFError(tif->tif_name,
-				"Error post-encoding before directory write");
-			    return (0);
-		    }
-	    }
-	    (*tif->tif_close)(tif);		/* shutdown encoder */
-	    /*
-	     * Flush any data that might have been written
-	     * by the compression close+cleanup routines.
-	     */
-	    if (tif->tif_rawcc > 0 && !TIFFFlushData1(tif)) {
-		    TIFFError(tif->tif_name,
-			"Error flushing data before directory write");
-		    return (0);
-	    }
-	    if ((tif->tif_flags & TIFF_MYBUFFER) && tif->tif_rawdata) {
-		    _TIFFfree(tif->tif_rawdata);
-		    tif->tif_rawdata = NULL;
-		    tif->tif_rawcc = 0;
-		    tif->tif_rawdatasize = 0;
-	    }
-	    tif->tif_flags &= ~(TIFF_BEENWRITING|TIFF_BUFFERSETUP);
-	}
-
-	td = &tif->tif_dir;
-	/*
-	 * Size the directory so that we can calculate
-	 * offsets for the data items that aren't kept
-	 * in-place in each field.
-	 */
-	nfields = 0;
-	for (b = 0; b <= FIELD_LAST; b++)
-		if (TIFFFieldSet(tif, b) && b != FIELD_CUSTOM)
-			nfields += (b < FIELD_SUBFILETYPE ? 2 : 1);
-        nfields += td->td_customValueCount;
-	dirsize = nfields * sizeof (TIFFDirEntry);
-	data = (char*) _TIFFmalloc(dirsize);
-	if (data == NULL) {
-		TIFFError(tif->tif_name,
-		    "Cannot write directory, out of space");
-		return (0);
-	}
-	/*
-	 * Directory hasn't been placed yet, put
-	 * it at the end of the file and link it
-	 * into the existing directory structure.
-	 */
-	if (tif->tif_diroff == 0 && !TIFFLinkDirectory(tif))
-		goto bad;
-	tif->tif_dataoff = (toff_t)(
-	    tif->tif_diroff + sizeof (uint16) + dirsize + sizeof (toff_t));
-	if (tif->tif_dataoff & 1)
-		tif->tif_dataoff++;
-	(void) TIFFSeekFile(tif, tif->tif_dataoff, SEEK_SET);
-	tif->tif_curdir++;
-	dir = (TIFFDirEntry*) data;
-	/*
-	 * Setup external form of directory
-	 * entries and write data items.
-	 */
-	_TIFFmemcpy(fields, td->td_fieldsset, sizeof (fields));
-	/*
-	 * Write out ExtraSamples tag only if
-	 * extra samples are present in the data.
-	 */
-	if (FieldSet(fields, FIELD_EXTRASAMPLES) && !td->td_extrasamples) {
-		ResetFieldBit(fields, FIELD_EXTRASAMPLES);
-		nfields--;
-		dirsize -= sizeof (TIFFDirEntry);
-	}								/*XXX*/
-	for (fi = 0, nfi = tif->tif_nfields; nfi > 0; nfi--, fi++) {
-		const TIFFFieldInfo* fip = tif->tif_fieldinfo[fi];
-
-                /*
-                ** For custom fields, we test to see if the custom field
-                ** is set or not.  For normal fields, we just use the
-                ** FieldSet test. 
-                */
-                if( fip->field_bit == FIELD_CUSTOM )
-                {
-                    int ci, is_set = FALSE;
-
-                    for( ci = 0; ci < td->td_customValueCount; ci++ )
-                        is_set |= (td->td_customValues[ci].info == fip);
-
-                    if( !is_set )
-                        continue;
-                }
-		else if (!FieldSet(fields, fip->field_bit))
-                    continue;
-
-
-                /*
-                ** Handle other fields.
-                */
-		switch (fip->field_bit)
-                {
-		case FIELD_STRIPOFFSETS:
-			/*
-			 * We use one field bit for both strip and tile
-
-			 * offsets, and so must be careful in selecting
-			 * the appropriate field descriptor (so that tags
-			 * are written in sorted order).
-			 */
-			tag = isTiled(tif) ?
-			    TIFFTAG_TILEOFFSETS : TIFFTAG_STRIPOFFSETS;
-			if (tag != fip->field_tag)
-				continue;
-			if (!TIFFWriteLongArray(tif, TIFF_LONG, tag, dir,
-			    (uint32) td->td_nstrips, td->td_stripoffset))
-				goto bad;
-			break;
-		case FIELD_STRIPBYTECOUNTS:
-			/*
-			 * We use one field bit for both strip and tile
-			 * byte counts, and so must be careful in selecting
-			 * the appropriate field descriptor (so that tags
-			 * are written in sorted order).
-			 */
-			tag = isTiled(tif) ?
-			    TIFFTAG_TILEBYTECOUNTS : TIFFTAG_STRIPBYTECOUNTS;
-			if (tag != fip->field_tag)
-				continue;
-			if (!TIFFWriteLongArray(tif, TIFF_LONG, tag, dir,
-			    (uint32) td->td_nstrips, td->td_stripbytecount))
-				goto bad;
-			break;
-		case FIELD_ROWSPERSTRIP:
-			TIFFSetupShortLong(tif, TIFFTAG_ROWSPERSTRIP,
-			    dir, td->td_rowsperstrip);
-			break;
-		case FIELD_COLORMAP:
-			if (!TIFFWriteShortTable(tif, TIFFTAG_COLORMAP, dir,
-			    3, td->td_colormap))
-				goto bad;
-			break;
-		case FIELD_IMAGEDIMENSIONS:
-			TIFFSetupShortLong(tif, TIFFTAG_IMAGEWIDTH,
-			    dir++, td->td_imagewidth);
-			TIFFSetupShortLong(tif, TIFFTAG_IMAGELENGTH,
-			    dir, td->td_imagelength);
-			break;
-		case FIELD_TILEDIMENSIONS:
-			TIFFSetupShortLong(tif, TIFFTAG_TILEWIDTH,
-			    dir++, td->td_tilewidth);
-			TIFFSetupShortLong(tif, TIFFTAG_TILELENGTH,
-			    dir, td->td_tilelength);
-			break;
-		case FIELD_COMPRESSION:
-			TIFFSetupShort(tif, TIFFTAG_COMPRESSION,
-			    dir, td->td_compression);
-			break;
-		case FIELD_PHOTOMETRIC:
-			TIFFSetupShort(tif, TIFFTAG_PHOTOMETRIC,
-			    dir, td->td_photometric);
-			break;
-		case FIELD_POSITION:
-			WriteRationalPair(TIFF_RATIONAL,
-			    TIFFTAG_XPOSITION, td->td_xposition,
-			    TIFFTAG_YPOSITION, td->td_yposition);
-			break;
-		case FIELD_RESOLUTION:
-			WriteRationalPair(TIFF_RATIONAL,
-			    TIFFTAG_XRESOLUTION, td->td_xresolution,
-			    TIFFTAG_YRESOLUTION, td->td_yresolution);
-			break;
-		case FIELD_BITSPERSAMPLE:
-		case FIELD_MINSAMPLEVALUE:
-		case FIELD_MAXSAMPLEVALUE:
-		case FIELD_SAMPLEFORMAT:
-			if (!TIFFWritePerSampleShorts(tif, fip->field_tag, dir))
-				goto bad;
-			break;
-		case FIELD_SMINSAMPLEVALUE:
-		case FIELD_SMAXSAMPLEVALUE:
-			if (!TIFFWritePerSampleAnys(tif,
-			    _TIFFSampleToTagType(tif), fip->field_tag, dir))
-				goto bad;
-			break;
-		case FIELD_PAGENUMBER:
-		case FIELD_HALFTONEHINTS:
-#ifdef YCBCR_SUPPORT
-		case FIELD_YCBCRSUBSAMPLING:
-#endif
-#ifdef CMYK_SUPPORT
-		case FIELD_DOTRANGE:
-#endif
-			if (!TIFFSetupShortPair(tif, fip->field_tag, dir))
-				goto bad;
-			break;
-#ifdef CMYK_SUPPORT
-		case FIELD_INKNAMES:
-			if (!TIFFWriteInkNames(tif, dir))
-				goto bad;
-			break;
-#endif
-#ifdef COLORIMETRY_SUPPORT
-		case FIELD_TRANSFERFUNCTION:
-			if (!TIFFWriteTransferFunction(tif, dir))
-				goto bad;
-			break;
-#endif
-#if SUBIFD_SUPPORT
-		case FIELD_SUBIFD:
-			if (!TIFFWriteNormalTag(tif, dir, fip))
-				goto bad;
-			/*
-			 * Total hack: if this directory includes a SubIFD
-			 * tag then force the next <n> directories to be
-			 * written as ``sub directories'' of this one.  This
-			 * is used to write things like thumbnails and
-			 * image masks that one wants to keep out of the
-			 * normal directory linkage access mechanism.
-			 */
-			if (dir->tdir_count > 0) {
-				tif->tif_flags |= TIFF_INSUBIFD;
-				tif->tif_nsubifd = (uint16) dir->tdir_count;
-				if (dir->tdir_count > 1)
-					tif->tif_subifdoff = dir->tdir_offset;
-				else
-					tif->tif_subifdoff = (uint32)(
-					      tif->tif_diroff
-					    + sizeof (uint16)
-					    + ((char*)&dir->tdir_offset-data));
-			}
-			break;
-#endif
-		default:
-			if (!TIFFWriteNormalTag(tif, dir, fip))
-				goto bad;
-			break;
-		}
-		dir++;
-                
-                if( fip->field_bit != FIELD_CUSTOM )
-                    ResetFieldBit(fields, fip->field_bit);
-	}
-
-	/*
-	 * Write directory.
-	 */
-	dircount = (uint16) nfields;
-	diroff = (uint32) tif->tif_nextdiroff;
-	if (tif->tif_flags & TIFF_SWAB) {
-		/*
-		 * The file's byte order is opposite to the
-		 * native machine architecture.  We overwrite
-		 * the directory information with impunity
-		 * because it'll be released below after we
-		 * write it to the file.  Note that all the
-		 * other tag construction routines assume that
-		 * we do this byte-swapping; i.e. they only
-		 * byte-swap indirect data.
-		 */
-		for (dir = (TIFFDirEntry*) data; dircount; dir++, dircount--) {
-			TIFFSwabArrayOfShort(&dir->tdir_tag, 2);
-			TIFFSwabArrayOfLong(&dir->tdir_count, 2);
-		}
-		dircount = (uint16) nfields;
-		TIFFSwabShort(&dircount);
-		TIFFSwabLong(&diroff);
-	}
-	(void) TIFFSeekFile(tif, tif->tif_diroff, SEEK_SET);
-	if (!WriteOK(tif, &dircount, sizeof (dircount))) {
-		TIFFError(tif->tif_name, "Error writing directory count");
-		goto bad;
-	}
-	if (!WriteOK(tif, data, dirsize)) {
-		TIFFError(tif->tif_name, "Error writing directory contents");
-		goto bad;
-	}
-	if (!WriteOK(tif, &diroff, sizeof (diroff))) {
-		TIFFError(tif->tif_name, "Error writing directory link");
-		goto bad;
-	}
-	if (done) {
-		TIFFFreeDirectory(tif);
-		tif->tif_flags &= ~TIFF_DIRTYDIRECT;
-		(*tif->tif_cleanup)(tif);
-
-		/*
-		* Reset directory-related state for subsequent
-		* directories.
-		*/
-		TIFFCreateDirectory(tif);
-	}
-	_TIFFfree(data);
-	return (1);
-bad:
-	_TIFFfree(data);
-	return (0);
-}
-#undef WriteRationalPair
-
-int
-TIFFWriteDirectory(TIFF* tif)
-{
-	return _TIFFWriteDirectory(tif, TRUE);
-}
-
-/*
- * Similar to TIFFWriteDirectory(), writes the directory out
- * but leaves all data structures in memory so that it can be
- * written again.  This will make a partially written TIFF file
- * readable before it is successfully completed/closed.
- */ 
-int
-TIFFCheckpointDirectory(TIFF* tif)
-{
-	int rc;
-	/* Setup the strips arrays, if they haven't already been. */
-	if (tif->tif_dir.td_stripoffset == NULL)
-	    (void) TIFFSetupStrips(tif);
-	rc = _TIFFWriteDirectory(tif, FALSE);
-	(void) TIFFSetWriteOffset(tif, TIFFSeekFile(tif, 0, SEEK_END));
-	return rc;
-}
-
-/*
- * Process tags that are not special cased.
- */
-static int
-TIFFWriteNormalTag(TIFF* tif, TIFFDirEntry* dir, const TIFFFieldInfo* fip)
-{
-	u_short wc = (u_short) fip->field_writecount;
-	uint32 wc2;
-
-	dir->tdir_tag = (uint16) fip->field_tag;
-	dir->tdir_type = (u_short) fip->field_type;
-	dir->tdir_count = wc;
-#define	WRITEF(x,y)	x(tif, fip->field_type, fip->field_tag, dir, wc, y)
-	switch (fip->field_type) {
-	case TIFF_SHORT:
-	case TIFF_SSHORT:
-		if (wc > 1) {
-			uint16* wp;
-			if (wc == (u_short) TIFF_VARIABLE
-			    || fip->field_passcount)
-				TIFFGetField(tif, fip->field_tag, &wc, &wp);
-			else
-				TIFFGetField(tif, fip->field_tag, &wp);
-			if (!WRITEF(TIFFWriteShortArray, wp))
-				return (0);
-		} else {
-			if (fip->field_passcount) {
-				uint16* wp;
-				TIFFGetField(tif, fip->field_tag, &wc, &wp);
-				if (!WRITEF(TIFFWriteShortArray, wp))
-					return 0;
-			} else {
-				uint16 sv;
-				TIFFGetField(tif, fip->field_tag, &sv);
-				dir->tdir_offset =
-					TIFFInsertData(tif, dir->tdir_type, sv);
-			}
-		}
-		break;
-	case TIFF_LONG:
-	case TIFF_SLONG:
-	case TIFF_IFD:
-		if (wc > 1) {
-			uint32* lp;
-			if (wc == (u_short) TIFF_VARIABLE
-			    || fip->field_passcount)
-				TIFFGetField(tif, fip->field_tag, &wc, &lp);
-			else
-				TIFFGetField(tif, fip->field_tag, &lp);
-			if (!WRITEF(TIFFWriteLongArray, lp))
-				return (0);
-		} else {
-			if (fip->field_passcount) {
-				uint32* lp;
-				TIFFGetField(tif, fip->field_tag, &wc, &lp);
-				if (!WRITEF(TIFFWriteLongArray, lp))
-					return 0;
-			} else {
-				/* XXX handle LONG->SHORT conversion */
-				TIFFGetField(tif, fip->field_tag,
-					     &dir->tdir_offset);
-			}
-		}
-		break;
-	case TIFF_RATIONAL:
-	case TIFF_SRATIONAL:
-		if (wc > 1) {
-			float* fp;
-			if (wc == (u_short) TIFF_VARIABLE
-			    || fip->field_passcount)
-				TIFFGetField(tif, fip->field_tag, &wc, &fp);
-			else
-				TIFFGetField(tif, fip->field_tag, &fp);
-			if (!WRITEF(TIFFWriteRationalArray, fp))
-				return (0);
-		} else {
-			if (fip->field_passcount) {
-				float* fp;
-				TIFFGetField(tif, fip->field_tag, &wc, &fp);
-				if (!WRITEF(TIFFWriteRationalArray, fp))
-					return 0;
-			} else {
-				float fv;
-				TIFFGetField(tif, fip->field_tag, &fv);
-				if (!WRITEF(TIFFWriteRationalArray, &fv))
-					return (0);
-			}
-		}
-		break;
-	case TIFF_FLOAT:
-		if (wc > 1) {
-			float* fp;
-			if (wc == (u_short) TIFF_VARIABLE
-			    || fip->field_passcount)
-				TIFFGetField(tif, fip->field_tag, &wc, &fp);
-			else
-				TIFFGetField(tif, fip->field_tag, &fp);
-			if (!WRITEF(TIFFWriteFloatArray, fp))
-				return (0);
-		} else {
-			if (fip->field_passcount) {
-				float* fp;
-				TIFFGetField(tif, fip->field_tag, &wc, &fp);
-				if (!WRITEF(TIFFWriteFloatArray, fp))
-					return 0;
-			} else {
-				float fv;
-				TIFFGetField(tif, fip->field_tag, &fv);
-				if (!WRITEF(TIFFWriteFloatArray, &fv))
-					return (0);
-			}
-		}
-		break;
-	case TIFF_DOUBLE:
-		if (wc > 1) {
-			double* dp;
-			if (wc == (u_short) TIFF_VARIABLE
-			    || fip->field_passcount)
-				TIFFGetField(tif, fip->field_tag, &wc, &dp);
-			else
-				TIFFGetField(tif, fip->field_tag, &dp);
-			if (!WRITEF(TIFFWriteDoubleArray, dp))
-				return (0);
-		} else {
-			if (fip->field_passcount) {
-				double* dp;
-				TIFFGetField(tif, fip->field_tag, &wc, &dp);
-				if (!WRITEF(TIFFWriteDoubleArray, dp))
-					return 0;
-			} else {
-				double dv;
-				TIFFGetField(tif, fip->field_tag, &dv);
-				if (!WRITEF(TIFFWriteDoubleArray, &dv))
-					return (0);
-			}
-		}
-		break;
-	case TIFF_ASCII:
-		{ char* cp;
-		  TIFFGetField(tif, fip->field_tag, &cp);
-		  dir->tdir_count = (uint32) (strlen(cp) + 1);
-		  if (!TIFFWriteByteArray(tif, dir, cp))
-			return (0);
-		}
-		break;
-
-        /* added based on patch request from MARTIN.MCBRIDE.MM at agfa.co.uk,
-           correctness not verified (FW, 99/08) */
-        case TIFF_BYTE:
-        case TIFF_SBYTE:          
-		if (wc > 1) {
-			char* cp;
-			if (wc == (u_short) TIFF_VARIABLE
-			    || fip->field_passcount) {
-				TIFFGetField(tif, fip->field_tag, &wc, &cp);
-				dir->tdir_count = wc;
-			} else if (wc == (u_short) TIFF_VARIABLE2) {
-				TIFFGetField(tif, fip->field_tag, &wc2, &cp);
-				dir->tdir_count = wc2;
-			} else
-				TIFFGetField(tif, fip->field_tag, &cp);
-			if (!TIFFWriteByteArray(tif, dir, cp))
-				return (0);
-                } else {
-			if (fip->field_passcount) {
-				char* cp;
-				TIFFGetField(tif, fip->field_tag, &wc, &cp);
-				dir->tdir_count = wc;
-				if (!TIFFWriteByteArray(tif, dir, cp))
-					return 0;
-			} else {
-				char cv;
-				TIFFGetField(tif, fip->field_tag, &cv);
-				if (!TIFFWriteByteArray(tif, dir, &cv))
-					return (0);
-			}
-                }
-                break;
-
-	case TIFF_UNDEFINED:
-		{ char* cp;
-		  if (wc == (u_short) TIFF_VARIABLE) {
-			TIFFGetField(tif, fip->field_tag, &wc, &cp);
-			dir->tdir_count = wc;
-		  } else if (wc == (u_short) TIFF_VARIABLE2) {
-			TIFFGetField(tif, fip->field_tag, &wc2, &cp);
-			dir->tdir_count = wc2;
-		  } else 
-			TIFFGetField(tif, fip->field_tag, &cp);
-		  if (!TIFFWriteByteArray(tif, dir, cp))
-			return (0);
-		}
-		break;
-
-        case TIFF_NOTYPE:
-                break;
-	}
-	return (1);
-}
-#undef WRITEF
-
-/*
- * Setup a directory entry with either a SHORT
- * or LONG type according to the value.
- */
-static void
-TIFFSetupShortLong(TIFF* tif, ttag_t tag, TIFFDirEntry* dir, uint32 v)
-{
-	dir->tdir_tag = (uint16) tag;
-	dir->tdir_count = 1;
-	if (v > 0xffffL) {
-		dir->tdir_type = (short) TIFF_LONG;
-		dir->tdir_offset = v;
-	} else {
-		dir->tdir_type = (short) TIFF_SHORT;
-		dir->tdir_offset = TIFFInsertData(tif, (int) TIFF_SHORT, v);
-	}
-}
-
-/*
- * Setup a SHORT directory entry
- */
-static void
-TIFFSetupShort(TIFF* tif, ttag_t tag, TIFFDirEntry* dir, uint16 v)
-{
-	dir->tdir_tag = (uint16) tag;
-	dir->tdir_count = 1;
-	dir->tdir_type = (short) TIFF_SHORT;
-	dir->tdir_offset = TIFFInsertData(tif, (int) TIFF_SHORT, v);
-}
-#undef MakeShortDirent
-
-#ifndef TIFFWriteRational
-/*
- * Setup a RATIONAL directory entry and
- * write the associated indirect value.
- */
-static int
-TIFFWriteRational(TIFF* tif,
-    TIFFDataType type, ttag_t tag, TIFFDirEntry* dir, float v)
-{
-	return (TIFFWriteRationalArray(tif, type, tag, dir, 1, &v));
-}
-#endif
-
-#define	NITEMS(x)	(sizeof (x) / sizeof (x[0]))
-/*
- * Setup a directory entry that references a
- * samples/pixel array of SHORT values and
- * (potentially) write the associated indirect
- * values.
- */
-static int
-TIFFWritePerSampleShorts(TIFF* tif, ttag_t tag, TIFFDirEntry* dir)
-{
-	uint16 buf[10], v;
-	uint16* w = buf;
-	int i, status, samples = tif->tif_dir.td_samplesperpixel;
-
-	if (samples > NITEMS(buf))
-		w = (uint16*) _TIFFmalloc(samples * sizeof (uint16));
-	TIFFGetField(tif, tag, &v);
-	for (i = 0; i < samples; i++)
-		w[i] = v;
-	status = TIFFWriteShortArray(tif, TIFF_SHORT, tag, dir, samples, w);
-	if (w != buf)
-		_TIFFfree((char*) w);
-	return (status);
-}
-
-/*
- * Setup a directory entry that references a samples/pixel array of ``type''
- * values and (potentially) write the associated indirect values.  The source
- * data from TIFFGetField() for the specified tag must be returned as double.
- */
-static int
-TIFFWritePerSampleAnys(TIFF* tif,
-    TIFFDataType type, ttag_t tag, TIFFDirEntry* dir)
-{
-	double buf[10], v;
-	double* w = buf;
-	int i, status;
-	int samples = (int) tif->tif_dir.td_samplesperpixel;
-
-	if (samples > NITEMS(buf))
-		w = (double*) _TIFFmalloc(samples * sizeof (double));
-	TIFFGetField(tif, tag, &v);
-	for (i = 0; i < samples; i++)
-		w[i] = v;
-	status = TIFFWriteAnyArray(tif, type, tag, dir, samples, w);
-	if (w != buf)
-		_TIFFfree(w);
-	return (status);
-}
-#undef NITEMS
-
-/*
- * Setup a pair of shorts that are returned by
- * value, rather than as a reference to an array.
- */
-static int
-TIFFSetupShortPair(TIFF* tif, ttag_t tag, TIFFDirEntry* dir)
-{
-	uint16 v[2];
-
-	TIFFGetField(tif, tag, &v[0], &v[1]);
-	return (TIFFWriteShortArray(tif, TIFF_SHORT, tag, dir, 2, v));
-}
-
-/*
- * Setup a directory entry for an NxM table of shorts,
- * where M is known to be 2**bitspersample, and write
- * the associated indirect data.
- */
-static int
-TIFFWriteShortTable(TIFF* tif,
-    ttag_t tag, TIFFDirEntry* dir, uint32 n, uint16** table)
-{
-	uint32 i, off;
-
-	dir->tdir_tag = (uint16) tag;
-	dir->tdir_type = (short) TIFF_SHORT;
-	/* XXX -- yech, fool TIFFWriteData */
-	dir->tdir_count = (uint32) (1L<<tif->tif_dir.td_bitspersample);
-	off = tif->tif_dataoff;
-	for (i = 0; i < n; i++)
-		if (!TIFFWriteData(tif, dir, (char *)table[i]))
-			return (0);
-	dir->tdir_count *= n;
-	dir->tdir_offset = off;
-	return (1);
-}
-
-/*
- * Write/copy data associated with an ASCII or opaque tag value.
- */
-static int
-TIFFWriteByteArray(TIFF* tif, TIFFDirEntry* dir, char* cp)
-{
-	if (dir->tdir_count > 4) {
-		if (!TIFFWriteData(tif, dir, cp))
-			return (0);
-	} else
-		_TIFFmemcpy(&dir->tdir_offset, cp, dir->tdir_count);
-	return (1);
-}
-
-/*
- * Setup a directory entry of an array of SHORT
- * or SSHORT and write the associated indirect values.
- */
-static int
-TIFFWriteShortArray(TIFF* tif,
-    TIFFDataType type, ttag_t tag, TIFFDirEntry* dir, uint32 n, uint16* v)
-{
-	dir->tdir_tag = (uint16) tag;
-	dir->tdir_type = (short) type;
-	dir->tdir_count = n;
-	if (n <= 2) {
-		if (tif->tif_header.tiff_magic == TIFF_BIGENDIAN) {
-			dir->tdir_offset = (uint32) ((long) v[0] << 16);
-			if (n == 2)
-				dir->tdir_offset |= v[1] & 0xffff;
-		} else {
-			dir->tdir_offset = v[0] & 0xffff;
-			if (n == 2)
-				dir->tdir_offset |= (long) v[1] << 16;
-		}
-		return (1);
-	} else
-		return (TIFFWriteData(tif, dir, (char*) v));
-}
-
-/*
- * Setup a directory entry of an array of LONG
- * or SLONG and write the associated indirect values.
- */
-static int
-TIFFWriteLongArray(TIFF* tif,
-    TIFFDataType type, ttag_t tag, TIFFDirEntry* dir, uint32 n, uint32* v)
-{
-	dir->tdir_tag = (uint16) tag;
-	dir->tdir_type = (short) type;
-	dir->tdir_count = n;
-	if (n == 1) {
-		dir->tdir_offset = v[0];
-		return (1);
-	} else
-		return (TIFFWriteData(tif, dir, (char*) v));
-}
-
-/*
- * Setup a directory entry of an array of RATIONAL
- * or SRATIONAL and write the associated indirect values.
- */
-static int
-TIFFWriteRationalArray(TIFF* tif,
-    TIFFDataType type, ttag_t tag, TIFFDirEntry* dir, uint32 n, float* v)
-{
-	uint32 i;
-	uint32* t;
-	int status;
-
-	dir->tdir_tag = (uint16) tag;
-	dir->tdir_type = (short) type;
-	dir->tdir_count = n;
-	t = (uint32*) _TIFFmalloc(2*n * sizeof (uint32));
-	for (i = 0; i < n; i++) {
-		float fv = v[i];
-		int sign = 1;
-		uint32 den;
-
-		if (fv < 0) {
-			if (type == TIFF_RATIONAL) {
-				TIFFWarning(tif->tif_name,
-	"\"%s\": Information lost writing value (%g) as (unsigned) RATIONAL",
-				_TIFFFieldWithTag(tif,tag)->field_name, fv);
-				fv = 0;
-			} else
-				fv = -fv, sign = -1;
-		}
-		den = 1L;
-		if (fv > 0) {
-			while (fv < 1L<<(31-3) && den < 1L<<(31-3))
-				fv *= 1<<3, den *= 1L<<3;
-		}
-		t[2*i+0] = (uint32) (sign * (fv + 0.5));
-		t[2*i+1] = den;
-	}
-	status = TIFFWriteData(tif, dir, (char *)t);
-	_TIFFfree((char*) t);
-	return (status);
-}
-
-static int
-TIFFWriteFloatArray(TIFF* tif,
-    TIFFDataType type, ttag_t tag, TIFFDirEntry* dir, uint32 n, float* v)
-{
-	dir->tdir_tag = (uint16) tag;
-	dir->tdir_type = (short) type;
-	dir->tdir_count = n;
-	TIFFCvtNativeToIEEEFloat(tif, n, v);
-	if (n == 1) {
-		dir->tdir_offset = *(uint32*) &v[0];
-		return (1);
-	} else
-		return (TIFFWriteData(tif, dir, (char*) v));
-}
-
-static int
-TIFFWriteDoubleArray(TIFF* tif,
-    TIFFDataType type, ttag_t tag, TIFFDirEntry* dir, uint32 n, double* v)
-{
-	dir->tdir_tag = (uint16) tag;
-	dir->tdir_type = (short) type;
-	dir->tdir_count = n;
-	TIFFCvtNativeToIEEEDouble(tif, n, v);
-	return (TIFFWriteData(tif, dir, (char*) v));
-}
-
-/*
- * Write an array of ``type'' values for a specified tag (i.e. this is a tag
- * which is allowed to have different types, e.g. SMaxSampleType).
- * Internally the data values are represented as double since a double can
- * hold any of the TIFF tag types (yes, this should really be an abstract
- * type tany_t for portability).  The data is converted into the specified
- * type in a temporary buffer and then handed off to the appropriate array
- * writer.
- */
-static int
-TIFFWriteAnyArray(TIFF* tif,
-    TIFFDataType type, ttag_t tag, TIFFDirEntry* dir, uint32 n, double* v)
-{
-	char buf[10 * sizeof(double)];
-	char* w = buf;
-	int i, status = 0;
-
-	if (n * TIFFDataWidth(type) > sizeof buf)
-		w = (char*) _TIFFmalloc(n * TIFFDataWidth(type));
-	switch (type) {
-	case TIFF_BYTE:
-		{ uint8* bp = (uint8*) w;
-		  for (i = 0; i < (int) n; i++)
-			bp[i] = (uint8) v[i];
-		  dir->tdir_tag = (uint16) tag;
-		  dir->tdir_type = (short) type;
-		  dir->tdir_count = n;
-		  if (!TIFFWriteByteArray(tif, dir, (char*) bp))
-			goto out;
-		}
-		break;
-	case TIFF_SBYTE:
-		{ int8* bp = (int8*) w;
-		  for (i = 0; i < (int) n; i++)
-			bp[i] = (int8) v[i];
-		  dir->tdir_tag = (uint16) tag;
-		  dir->tdir_type = (short) type;
-		  dir->tdir_count = n;
-		  if (!TIFFWriteByteArray(tif, dir, (char*) bp))
-			goto out;
-		}
-		break;
-	case TIFF_SHORT:
-		{ uint16* bp = (uint16*) w;
-		  for (i = 0; i < (int) n; i++)
-			bp[i] = (uint16) v[i];
-		  if (!TIFFWriteShortArray(tif, type, tag, dir, n, (uint16*)bp))
-				goto out;
-		}
-		break;
-	case TIFF_SSHORT:
-		{ int16* bp = (int16*) w;
-		  for (i = 0; i < (int) n; i++)
-			bp[i] = (int16) v[i];
-		  if (!TIFFWriteShortArray(tif, type, tag, dir, n, (uint16*)bp))
-			goto out;
-		}
-		break;
-	case TIFF_LONG:
-		{ uint32* bp = (uint32*) w;
-		  for (i = 0; i < (int) n; i++)
-			bp[i] = (uint32) v[i];
-		  if (!TIFFWriteLongArray(tif, type, tag, dir, n, bp))
-			goto out;
-		}
-		break;
-	case TIFF_SLONG:
-		{ int32* bp = (int32*) w;
-		  for (i = 0; i < (int) n; i++)
-			bp[i] = (int32) v[i];
-		  if (!TIFFWriteLongArray(tif, type, tag, dir, n, (uint32*) bp))
-			goto out;
-		}
-		break;
-	case TIFF_FLOAT:
-		{ float* bp = (float*) w;
-		  for (i = 0; i < (int) n; i++)
-			bp[i] = (float) v[i];
-		  if (!TIFFWriteFloatArray(tif, type, tag, dir, n, bp))
-			goto out;
-		}
-		break;
-	case TIFF_DOUBLE:
-		return (TIFFWriteDoubleArray(tif, type, tag, dir, n, v));
-	default:
-		/* TIFF_NOTYPE */
-		/* TIFF_ASCII */
-		/* TIFF_UNDEFINED */
-		/* TIFF_RATIONAL */
-		/* TIFF_SRATIONAL */
-		goto out;
-	}
-	status = 1;
- out:
-	if (w != buf)
-		_TIFFfree(w);
-	return (status);
-}
-
-#ifdef COLORIMETRY_SUPPORT
-static int
-TIFFWriteTransferFunction(TIFF* tif, TIFFDirEntry* dir)
-{
-	TIFFDirectory* td = &tif->tif_dir;
-	tsize_t n = (1L<<td->td_bitspersample) * sizeof (uint16);
-	uint16** tf = td->td_transferfunction;
-	int ncols;
-
-	/*
-	 * Check if the table can be written as a single column,
-	 * or if it must be written as 3 columns.  Note that we
-	 * write a 3-column tag if there are 2 samples/pixel and
-	 * a single column of data won't suffice--hmm.
-	 */
-	switch (td->td_samplesperpixel - td->td_extrasamples) {
-	default:	if (_TIFFmemcmp(tf[0], tf[2], n)) { ncols = 3; break; }
-	case 2:		if (_TIFFmemcmp(tf[0], tf[1], n)) { ncols = 3; break; }
-	case 1: case 0:	ncols = 1;
-	}
-	return (TIFFWriteShortTable(tif,
-	    TIFFTAG_TRANSFERFUNCTION, dir, ncols, tf));
-}
-#endif
-
-#ifdef CMYK_SUPPORT
-static int
-TIFFWriteInkNames(TIFF* tif, TIFFDirEntry* dir)
-{
-	TIFFDirectory* td = &tif->tif_dir;
-
-	dir->tdir_tag = TIFFTAG_INKNAMES;
-	dir->tdir_type = (short) TIFF_ASCII;
-	dir->tdir_count = td->td_inknameslen;
-	return (TIFFWriteByteArray(tif, dir, td->td_inknames));
-}
-#endif
-
-/*
- * Write a contiguous directory item.
- */
-static int
-TIFFWriteData(TIFF* tif, TIFFDirEntry* dir, char* cp)
-{
-	tsize_t cc;
-
-	if (tif->tif_flags & TIFF_SWAB) {
-		switch (dir->tdir_type) {
-		case TIFF_SHORT:
-		case TIFF_SSHORT:
-			TIFFSwabArrayOfShort((uint16*) cp, dir->tdir_count);
-			break;
-		case TIFF_LONG:
-		case TIFF_SLONG:
-		case TIFF_FLOAT:
-			TIFFSwabArrayOfLong((uint32*) cp, dir->tdir_count);
-			break;
-		case TIFF_RATIONAL:
-		case TIFF_SRATIONAL:
-			TIFFSwabArrayOfLong((uint32*) cp, 2*dir->tdir_count);
-			break;
-		case TIFF_DOUBLE:
-			TIFFSwabArrayOfDouble((double*) cp, dir->tdir_count);
-			break;
-		}
-	}
-	dir->tdir_offset = tif->tif_dataoff;
-	cc = dir->tdir_count * TIFFDataWidth((TIFFDataType) dir->tdir_type);
-	if (SeekOK(tif, dir->tdir_offset) &&
-	    WriteOK(tif, cp, cc)) {
-		tif->tif_dataoff += (cc + 1) & ~1;
-		return (1);
-	}
-	TIFFError(tif->tif_name, "Error writing data for field \"%s\"",
-	    _TIFFFieldWithTag(tif, dir->tdir_tag)->field_name);
-	return (0);
-}
-
-/*
- * Similar to TIFFWriteDirectory(), but if the directory has already
- * been written once, it is relocated to the end of the file, in case it
- * has changed in size.  Note that this will result in the loss of the 
- * previously used directory space. 
- */ 
-
-int 
-TIFFRewriteDirectory( TIFF *tif )
-{
-    static const char module[] = "TIFFRewriteDirectory";
-
-    /* We don't need to do anything special if it hasn't been written. */
-    if( tif->tif_diroff == 0 )
-        return TIFFWriteDirectory( tif );
-
-    /*
-    ** Find and zero the pointer to this directory, so that TIFFLinkDirectory
-    ** will cause it to be added after this directories current pre-link.
-    */
-    
-    /* Is it the first directory in the file? */
-    if (tif->tif_header.tiff_diroff == tif->tif_diroff) 
-    {
-        tif->tif_header.tiff_diroff = 0;
-        tif->tif_diroff = 0;
-
-#if defined(__hpux) && defined(__LP64__)
-#define HDROFF(f) ((toff_t)(unsigned long) &(((TIFFHeader*) 0)->f))
-#else
-#define	HDROFF(f)	((toff_t) &(((TIFFHeader*) 0)->f))
-#endif
-        TIFFSeekFile(tif, HDROFF(tiff_diroff), SEEK_SET);
-        if (!WriteOK(tif, &(tif->tif_header.tiff_diroff), 
-                     sizeof (tif->tif_diroff))) 
-        {
-            TIFFError(tif->tif_name, "Error updating TIFF header");
-            return (0);
-        }
-    }
-    else
-    {
-        toff_t  nextdir, off;
-
-	nextdir = tif->tif_header.tiff_diroff;
-	do {
-		uint16 dircount;
-
-		if (!SeekOK(tif, nextdir) ||
-		    !ReadOK(tif, &dircount, sizeof (dircount))) {
-			TIFFError(module, "Error fetching directory count");
-			return (0);
-		}
-		if (tif->tif_flags & TIFF_SWAB)
-			TIFFSwabShort(&dircount);
-		(void) TIFFSeekFile(tif,
-		    dircount * sizeof (TIFFDirEntry), SEEK_CUR);
-		if (!ReadOK(tif, &nextdir, sizeof (nextdir))) {
-			TIFFError(module, "Error fetching directory link");
-			return (0);
-		}
-		if (tif->tif_flags & TIFF_SWAB)
-			TIFFSwabLong(&nextdir);
-	} while (nextdir != tif->tif_diroff && nextdir != 0);
-        off = TIFFSeekFile(tif, 0, SEEK_CUR); /* get current offset */
-        (void) TIFFSeekFile(tif, off - (toff_t)sizeof(nextdir), SEEK_SET);
-        tif->tif_diroff = 0;
-	if (!WriteOK(tif, &(tif->tif_diroff), sizeof (nextdir))) {
-		TIFFError(module, "Error writing directory link");
-		return (0);
-	}
-    }
-
-    /*
-    ** Now use TIFFWriteDirectory() normally.
-    */
-
-    return TIFFWriteDirectory( tif );
-}
-
-
-/*
- * Link the current directory into the
- * directory chain for the file.
- */
-static int
-TIFFLinkDirectory(TIFF* tif)
-{
-	static const char module[] = "TIFFLinkDirectory";
-	toff_t nextdir;
-	toff_t diroff, off;
-
-	tif->tif_diroff = (TIFFSeekFile(tif, (toff_t) 0, SEEK_END)+1) &~ 1;
-	diroff = tif->tif_diroff;
-	if (tif->tif_flags & TIFF_SWAB)
-		TIFFSwabLong(&diroff);
-#if SUBIFD_SUPPORT
-	if (tif->tif_flags & TIFF_INSUBIFD) {
-		(void) TIFFSeekFile(tif, tif->tif_subifdoff, SEEK_SET);
-		if (!WriteOK(tif, &diroff, sizeof (diroff))) {
-			TIFFError(module,
-			    "%s: Error writing SubIFD directory link",
-			    tif->tif_name);
-			return (0);
-		}
-		/*
-		 * Advance to the next SubIFD or, if this is
-		 * the last one configured, revert back to the
-		 * normal directory linkage.
-		 */
-		if (--tif->tif_nsubifd)
-			tif->tif_subifdoff += sizeof (diroff);
-		else
-			tif->tif_flags &= ~TIFF_INSUBIFD;
-		return (1);
-	}
-#endif
-	if (tif->tif_header.tiff_diroff == 0) {
-		/*
-		 * First directory, overwrite offset in header.
-		 */
-		tif->tif_header.tiff_diroff = tif->tif_diroff;
-#define	HDROFF(f)	((toff_t) &(((TIFFHeader*) 0)->f))
-		(void) TIFFSeekFile(tif, HDROFF(tiff_diroff), SEEK_SET);
-		if (!WriteOK(tif, &diroff, sizeof (diroff))) {
-			TIFFError(tif->tif_name, "Error writing TIFF header");
-			return (0);
-		}
-		return (1);
-	}
-	/*
-	 * Not the first directory, search to the last and append.
-	 */
-	nextdir = tif->tif_header.tiff_diroff;
-	do {
-		uint16 dircount;
-
-		if (!SeekOK(tif, nextdir) ||
-		    !ReadOK(tif, &dircount, sizeof (dircount))) {
-			TIFFError(module, "Error fetching directory count");
-			return (0);
-		}
-		if (tif->tif_flags & TIFF_SWAB)
-			TIFFSwabShort(&dircount);
-		(void) TIFFSeekFile(tif,
-		    dircount * sizeof (TIFFDirEntry), SEEK_CUR);
-		if (!ReadOK(tif, &nextdir, sizeof (nextdir))) {
-			TIFFError(module, "Error fetching directory link");
-			return (0);
-		}
-		if (tif->tif_flags & TIFF_SWAB)
-			TIFFSwabLong(&nextdir);
-	} while (nextdir != 0);
-        off = TIFFSeekFile(tif, 0, SEEK_CUR); /* get current offset */
-        (void) TIFFSeekFile(tif, off - (toff_t)sizeof(nextdir), SEEK_SET);
-	if (!WriteOK(tif, &diroff, sizeof (diroff))) {
-		TIFFError(module, "Error writing directory link");
-		return (0);
-	}
-	return (1);
-}
diff --git a/src/tiff/tif_dumpmode.c b/src/tiff/tif_dumpmode.c
deleted file mode 100644
index 4f8f38a..0000000
--- a/src/tiff/tif_dumpmode.c
+++ /dev/null
@@ -1,118 +0,0 @@
-/* $Header: /home/terralib/src/tiff/tif_dumpmode.c,v 1.3 2004/03/19 11:51:24 lubia Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library.
- *
- * "Null" Compression Algorithm Support.
- */
-#include "tiffiop.h"
-#include <assert.h>
-
-/*
- * Encode a hunk of pixels.
- */
-static int
-DumpModeEncode(TIFF* tif, tidata_t pp, tsize_t cc, tsample_t s)
-{
-	(void) s;
-	while (cc > 0) {
-		tsize_t n;
-
-		n = cc;
-		if (tif->tif_rawcc + n > tif->tif_rawdatasize)
-			n = tif->tif_rawdatasize - tif->tif_rawcc;
-
-                assert( n > 0 );
-                
-		/*
-		 * Avoid copy if client has setup raw
-		 * data buffer to avoid extra copy.
-		 */
-		if (tif->tif_rawcp != pp)
-			_TIFFmemcpy(tif->tif_rawcp, pp, n);
-		tif->tif_rawcp += n;
-		tif->tif_rawcc += n;
-		pp += n;
-		cc -= n;
-		if (tif->tif_rawcc >= tif->tif_rawdatasize &&
-		    !TIFFFlushData1(tif))
-			return (-1);
-	}
-	return (1);
-}
-
-/*
- * Decode a hunk of pixels.
- */
-static int
-DumpModeDecode(TIFF* tif, tidata_t buf, tsize_t cc, tsample_t s)
-{
-	(void) s;
-	if (tif->tif_rawcc < cc) {
-		TIFFError(tif->tif_name,
-		    "DumpModeDecode: Not enough data for scanline %d",
-		    tif->tif_row);
-		return (0);
-	}
-	/*
-	 * Avoid copy if client has setup raw
-	 * data buffer to avoid extra copy.
-	 */
-	if (tif->tif_rawcp != buf)
-		_TIFFmemcpy(buf, tif->tif_rawcp, cc);
-	tif->tif_rawcp += cc;
-	tif->tif_rawcc -= cc;
-	return (1);
-}
-
-/*
- * Seek forwards nrows in the current strip.
- */
-static int
-DumpModeSeek(TIFF* tif, uint32 nrows)
-{
-	tif->tif_rawcp += nrows * tif->tif_scanlinesize;
-	tif->tif_rawcc -= nrows * tif->tif_scanlinesize;
-	return (1);
-}
-
-/*
- * Initialize dump mode.
- */
-int
-TIFFInitDumpMode(TIFF* tif, int scheme)
-{
-	(void) scheme;
-	tif->tif_decoderow = DumpModeDecode;
-	tif->tif_decodestrip = DumpModeDecode;
-	tif->tif_decodetile = DumpModeDecode;
-	tif->tif_encoderow = DumpModeEncode;
-	tif->tif_encodestrip = DumpModeEncode;
-	tif->tif_encodetile = DumpModeEncode;
-	tif->tif_seek = DumpModeSeek;
-	return (1);
-}
diff --git a/src/tiff/tif_error.c b/src/tiff/tif_error.c
deleted file mode 100644
index d9100eb..0000000
--- a/src/tiff/tif_error.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/* $Header: /home/terralib/src/tiff/tif_error.c,v 1.3 2004/03/19 11:51:24 lubia Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library.
- */
-#include "tiffiop.h"
-
-TIFFErrorHandler
-TIFFSetErrorHandler(TIFFErrorHandler handler)
-{
-	TIFFErrorHandler prev = _TIFFerrorHandler;
-	_TIFFerrorHandler = handler;
-	return (prev);
-}
-
-void
-TIFFError(const char* module, const char* fmt, ...)
-{
-	if (_TIFFerrorHandler) {
-		va_list ap;
-		va_start(ap, fmt);
-		(*_TIFFerrorHandler)(module, fmt, ap);
-		va_end(ap);
-	}
-}
diff --git a/src/tiff/tif_extension.c b/src/tiff/tif_extension.c
deleted file mode 100644
index 95fc409..0000000
--- a/src/tiff/tif_extension.c
+++ /dev/null
@@ -1,109 +0,0 @@
-/* $Header: /home/terralib/src/tiff/tif_extension.c,v 1.1 2004/03/19 11:52:52 lubia Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library.
- *
- * Various routines support external extension of the tag set, and other
- * application extension capabilities. 
- */
-
-#include "tiffiop.h"
-
-int TIFFGetTagListCount( TIFF *tif )
-
-{
-    TIFFDirectory* td = &tif->tif_dir;
-    
-    return td->td_customValueCount;
-}
-
-ttag_t TIFFGetTagListEntry( TIFF *tif, int tag_index )
-
-{
-    TIFFDirectory* td = &tif->tif_dir;
-
-    if( tag_index < 0 || tag_index >= td->td_customValueCount )
-        return (ttag_t) -1;
-    else
-        return td->td_customValues[tag_index].info->field_tag;
-}
-
-/*
-** This provides read/write access to the TIFFTagMethods within the TIFF
-** structure to application code without giving access to the private
-** TIFF structure.
-*/
-TIFFTagMethods *TIFFAccessTagMethods( TIFF *tif )
-
-{
-    return &(tif->tif_tagmethods);
-}
-
-void *TIFFGetClientInfo( TIFF *tif, const char *name )
-
-{
-    TIFFClientInfoLink *link = tif->tif_clientinfo;
-
-    while( link != NULL && strcmp(link->name,name) != 0 )
-        link = link->next;
-
-    if( link != NULL )
-        return link->data;
-    else
-        return NULL;
-}
-
-void TIFFSetClientInfo( TIFF *tif, void *data, const char *name )
-
-{
-    TIFFClientInfoLink *link = tif->tif_clientinfo;
-
-    /*
-    ** Do we have an existing link with this name?  If so, just
-    ** set it.
-    */
-    while( link != NULL && strcmp(link->name,name) != 0 )
-        link = link->next;
-
-    if( link != NULL )
-    {
-        link->data = data;
-        return;
-    }
-
-    /*
-    ** Create a new link.
-    */
-
-    link = (TIFFClientInfoLink *) _TIFFmalloc(sizeof(TIFFClientInfoLink));
-    link->next = tif->tif_clientinfo;
-    link->name = (char *) _TIFFmalloc(strlen(name)+1);
-    strcpy(link->name, name);
-    link->data = data;
-
-    tif->tif_clientinfo = link;
-}
diff --git a/src/tiff/tif_fax3.c b/src/tiff/tif_fax3.c
deleted file mode 100644
index 3f98c86..0000000
--- a/src/tiff/tif_fax3.c
+++ /dev/null
@@ -1,1515 +0,0 @@
-/* $Header: /home/terralib/src/tiff/tif_fax3.c,v 1.3 2004/03/19 11:51:24 lubia Exp $ */
-
-/*
- * Copyright (c) 1990-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#include "tiffiop.h"
-#ifdef CCITT_SUPPORT
-/*
- * TIFF Library.
- *
- * CCITT Group 3 (T.4) and Group 4 (T.6) Compression Support.
- *
- * This file contains support for decoding and encoding TIFF
- * compression algorithms 2, 3, 4, and 32771.
- *
- * Decoder support is derived, with permission, from the code
- * in Frank Cringle's viewfax program;
- *      Copyright (C) 1990, 1995  Frank D. Cringle.
- */
-#include "tif_fax3.h"
-#define	G3CODES
-#include "t4.h"
-#include <assert.h>
-#include <stdio.h>
-
-/*
- * Compression+decompression state blocks are
- * derived from this ``base state'' block.
- */
-typedef struct {
-        int     rw_mode;                /* O_RDONLY for decode, else encode */
-	int	mode;			/* operating mode */
-	uint32	rowbytes;		/* bytes in a decoded scanline */
-	uint32	rowpixels;		/* pixels in a scanline */
-
-	uint16	cleanfaxdata;		/* CleanFaxData tag */
-	uint32	badfaxrun;		/* BadFaxRun tag */
-	uint32	badfaxlines;		/* BadFaxLines tag */
-	uint32	groupoptions;		/* Group 3/4 options tag */
-	uint32	recvparams;		/* encoded Class 2 session params */
-	char*	subaddress;		/* subaddress string */
-	uint32	recvtime;		/* time spent receiving (secs) */
-	TIFFVGetMethod vgetparent;	/* super-class method */
-	TIFFVSetMethod vsetparent;	/* super-class method */
-} Fax3BaseState;
-#define	Fax3State(tif)		((Fax3BaseState*) (tif)->tif_data)
-
-typedef enum { G3_1D, G3_2D } Ttag;
-typedef struct {
-	Fax3BaseState b;
-
-	/* Decoder state info */
-	const u_char* bitmap;		/* bit reversal table */
-	uint32	data;			/* current i/o byte/word */
-	int	bit;			/* current i/o bit in byte */
-	int	EOLcnt;			/* count of EOL codes recognized */
-	TIFFFaxFillFunc fill;		/* fill routine */
-	uint32*	runs;			/* b&w runs for current/previous row */
-	uint32*	refruns;		/* runs for reference line */
-	uint32*	curruns;		/* runs for current line */
-
-	/* Encoder state info */
-	Ttag    tag;	                /* encoding state */
-	u_char*	refline;		/* reference line for 2d decoding */
-	int	k;			/* #rows left that can be 2d encoded */
-	int	maxk;			/* max #rows that can be 2d encoded */
-} Fax3CodecState;
-#define	DecoderState(tif)	((Fax3CodecState*) Fax3State(tif))
-#define	EncoderState(tif)	((Fax3CodecState*) Fax3State(tif))
-
-#define	is2DEncoding(sp) \
-	(sp->b.groupoptions & GROUP3OPT_2DENCODING)
-#define	isAligned(p,t)	((((u_long)(p)) & (sizeof (t)-1)) == 0)
-
-/*
- * Group 3 and Group 4 Decoding.
- */
-
-/*
- * These macros glue the TIFF library state to
- * the state expected by Frank's decoder.
- */
-#define	DECLARE_STATE(tif, sp, mod)					\
-    static const char module[] = mod;					\
-    Fax3CodecState* sp = DecoderState(tif);				\
-    int a0;				/* reference element */		\
-    int lastx = sp->b.rowpixels;	/* last element in row */	\
-    uint32 BitAcc;			/* bit accumulator */		\
-    int BitsAvail;			/* # valid bits in BitAcc */	\
-    int RunLength;			/* length of current run */	\
-    u_char* cp;				/* next byte of input data */	\
-    u_char* ep;				/* end of input data */		\
-    uint32* pa;				/* place to stuff next run */	\
-    uint32* thisrun;			/* current row's run array */	\
-    int EOLcnt;				/* # EOL codes recognized */	\
-    const u_char* bitmap = sp->bitmap;	/* input data bit reverser */	\
-    const TIFFFaxTabEnt* TabEnt
-#define	DECLARE_STATE_2D(tif, sp, mod)					\
-    DECLARE_STATE(tif, sp, mod);					\
-    int b1;				/* next change on prev line */	\
-    uint32* pb				/* next run in reference line */\
-/*
- * Load any state that may be changed during decoding.
- */
-#define	CACHE_STATE(tif, sp) do {					\
-    BitAcc = sp->data;							\
-    BitsAvail = sp->bit;						\
-    EOLcnt = sp->EOLcnt;						\
-    cp = (unsigned char*) tif->tif_rawcp;				\
-    ep = cp + tif->tif_rawcc;						\
-} while (0)
-/*
- * Save state possibly changed during decoding.
- */
-#define	UNCACHE_STATE(tif, sp) do {					\
-    sp->bit = BitsAvail;						\
-    sp->data = BitAcc;							\
-    sp->EOLcnt = EOLcnt;						\
-    tif->tif_rawcc -= (tidata_t) cp - tif->tif_rawcp;			\
-    tif->tif_rawcp = (tidata_t) cp;					\
-} while (0)
-
-/*
- * Setup state for decoding a strip.
- */
-static int
-Fax3PreDecode(TIFF* tif, tsample_t s)
-{
-	Fax3CodecState* sp = DecoderState(tif);
-
-	(void) s;
-	assert(sp != NULL);
-	sp->bit = 0;			/* force initial read */
-	sp->data = 0;
-	sp->EOLcnt = 0;			/* force initial scan for EOL */
-	/*
-	 * Decoder assumes lsb-to-msb bit order.  Note that we select
-	 * this here rather than in Fax3SetupState so that viewers can
-	 * hold the image open, fiddle with the FillOrder tag value,
-	 * and then re-decode the image.  Otherwise they'd need to close
-	 * and open the image to get the state reset.
-	 */
-	sp->bitmap =
-	    TIFFGetBitRevTable(tif->tif_dir.td_fillorder != FILLORDER_LSB2MSB);
-	if (sp->refruns) {		/* init reference line to white */
-		sp->refruns[0] = (uint32) sp->b.rowpixels;
-		sp->refruns[1] = 0;
-	}
-	return (1);
-}
-
-/*
- * Routine for handling various errors/conditions.
- * Note how they are "glued into the decoder" by
- * overriding the definitions used by the decoder.
- */
-
-static void
-Fax3Unexpected(const char* module, TIFF* tif, uint32 a0)
-{
-	TIFFError(module, "%s: Bad code word at scanline %d (x %lu)",
-	    tif->tif_name, tif->tif_row, (u_long) a0);
-}
-#define	unexpected(table, a0)	Fax3Unexpected(module, tif, a0)
-
-static void
-Fax3Extension(const char* module, TIFF* tif, uint32 a0)
-{
-	TIFFError(module,
-	    "%s: Uncompressed data (not supported) at scanline %d (x %lu)",
-	    tif->tif_name, tif->tif_row, (u_long) a0);
-}
-#define	extension(a0)	Fax3Extension(module, tif, a0)
-
-static void
-Fax3BadLength(const char* module, TIFF* tif, uint32 a0, uint32 lastx)
-{
-	TIFFWarning(module, "%s: %s at scanline %d (got %lu, expected %lu)",
-	    tif->tif_name,
-	    a0 < lastx ? "Premature EOL" : "Line length mismatch",
-	    tif->tif_row, (u_long) a0, (u_long) lastx);
-}
-#define	badlength(a0,lastx)	Fax3BadLength(module, tif, a0, lastx)
-
-static void
-Fax3PrematureEOF(const char* module, TIFF* tif, uint32 a0)
-{
-	TIFFWarning(module, "%s: Premature EOF at scanline %d (x %lu)",
-	    tif->tif_name, tif->tif_row, (u_long) a0);
-}
-#define	prematureEOF(a0)	Fax3PrematureEOF(module, tif, a0)
-
-#define	Nop
-
-/*
- * Decode the requested amount of G3 1D-encoded data.
- */
-static int
-Fax3Decode1D(TIFF* tif, tidata_t buf, tsize_t occ, tsample_t s)
-{
-	DECLARE_STATE(tif, sp, "Fax3Decode1D");
-
-	(void) s;
-	CACHE_STATE(tif, sp);
-	thisrun = sp->curruns;
-	while ((long)occ > 0) {
-		a0 = 0;
-		RunLength = 0;
-		pa = thisrun;
-#ifdef FAX3_DEBUG
-		printf("\nBitAcc=%08X, BitsAvail = %d\n", BitAcc, BitsAvail);
-		printf("-------------------- %d\n", tif->tif_row);
-		fflush(stdout);
-#endif
-		SYNC_EOL(EOF1D);
-		EXPAND1D(EOF1Da);
-		(*sp->fill)(buf, thisrun, pa, lastx);
-		buf += sp->b.rowbytes;
-		occ -= sp->b.rowbytes;
-		continue;
-	EOF1D:				/* premature EOF */
-		CLEANUP_RUNS();
-	EOF1Da:				/* premature EOF */
-		(*sp->fill)(buf, thisrun, pa, lastx);
-		UNCACHE_STATE(tif, sp);
-		return (-1);
-	}
-	UNCACHE_STATE(tif, sp);
-	return (1);
-}
-
-#define	SWAP(t,a,b)	{ t x; x = (a); (a) = (b); (b) = x; }
-/*
- * Decode the requested amount of G3 2D-encoded data.
- */
-static int
-Fax3Decode2D(TIFF* tif, tidata_t buf, tsize_t occ, tsample_t s)
-{
-	DECLARE_STATE_2D(tif, sp, "Fax3Decode2D");
-	int is1D;			/* current line is 1d/2d-encoded */
-
-	(void) s;
-	CACHE_STATE(tif, sp);
-	while ((long)occ > 0) {
-		a0 = 0;
-		RunLength = 0;
-		pa = thisrun = sp->curruns;
-#ifdef FAX3_DEBUG
-		printf("\nBitAcc=%08X, BitsAvail = %d EOLcnt = %d",
-		    BitAcc, BitsAvail, EOLcnt);
-#endif
-		SYNC_EOL(EOF2D);
-		NeedBits8(1, EOF2D);
-		is1D = GetBits(1);	/* 1D/2D-encoding tag bit */
-		ClrBits(1);
-#ifdef FAX3_DEBUG
-		printf(" %s\n-------------------- %d\n",
-		    is1D ? "1D" : "2D", tif->tif_row);
-		fflush(stdout);
-#endif
-		pb = sp->refruns;
-		b1 = *pb++;
-		if (is1D)
-			EXPAND1D(EOF2Da);
-		else
-			EXPAND2D(EOF2Da);
-		(*sp->fill)(buf, thisrun, pa, lastx);
-		SETVAL(0);		/* imaginary change for reference */
-		SWAP(uint32*, sp->curruns, sp->refruns);
-		buf += sp->b.rowbytes;
-		occ -= sp->b.rowbytes;
-		continue;
-	EOF2D:				/* premature EOF */
-		CLEANUP_RUNS();
-	EOF2Da:				/* premature EOF */
-		(*sp->fill)(buf, thisrun, pa, lastx);
-		UNCACHE_STATE(tif, sp);
-		return (-1);
-	}
-	UNCACHE_STATE(tif, sp);
-	return (1);
-}
-#undef SWAP
-
-/*
- * The ZERO & FILL macros must handle spans < 2*sizeof(long) bytes.
- * For machines with 64-bit longs this is <16 bytes; otherwise
- * this is <8 bytes.  We optimize the code here to reflect the
- * machine characteristics.
- */
-#if defined(__alpha) || _MIPS_SZLONG == 64 || defined(__LP64__) || defined(__arch64__)
-#define FILL(n, cp)							    \
-    switch (n) {							    \
-    case 15:(cp)[14] = 0xff; case 14:(cp)[13] = 0xff; case 13: (cp)[12] = 0xff;\
-    case 12:(cp)[11] = 0xff; case 11:(cp)[10] = 0xff; case 10: (cp)[9] = 0xff;\
-    case  9: (cp)[8] = 0xff; case  8: (cp)[7] = 0xff; case  7: (cp)[6] = 0xff;\
-    case  6: (cp)[5] = 0xff; case  5: (cp)[4] = 0xff; case  4: (cp)[3] = 0xff;\
-    case  3: (cp)[2] = 0xff; case  2: (cp)[1] = 0xff;			      \
-    case  1: (cp)[0] = 0xff; (cp) += (n); case 0:  ;			      \
-    }
-#define ZERO(n, cp)							\
-    switch (n) {							\
-    case 15:(cp)[14] = 0; case 14:(cp)[13] = 0; case 13: (cp)[12] = 0;	\
-    case 12:(cp)[11] = 0; case 11:(cp)[10] = 0; case 10: (cp)[9] = 0;	\
-    case  9: (cp)[8] = 0; case  8: (cp)[7] = 0; case  7: (cp)[6] = 0;	\
-    case  6: (cp)[5] = 0; case  5: (cp)[4] = 0; case  4: (cp)[3] = 0;	\
-    case  3: (cp)[2] = 0; case  2: (cp)[1] = 0;			      	\
-    case  1: (cp)[0] = 0; (cp) += (n); case 0:  ;			\
-    }
-#else
-#define FILL(n, cp)							    \
-    switch (n) {							    \
-    case 7: (cp)[6] = 0xff; case 6: (cp)[5] = 0xff; case 5: (cp)[4] = 0xff; \
-    case 4: (cp)[3] = 0xff; case 3: (cp)[2] = 0xff; case 2: (cp)[1] = 0xff; \
-    case 1: (cp)[0] = 0xff; (cp) += (n); case 0:  ;			    \
-    }
-#define ZERO(n, cp)							\
-    switch (n) {							\
-    case 7: (cp)[6] = 0; case 6: (cp)[5] = 0; case 5: (cp)[4] = 0;	\
-    case 4: (cp)[3] = 0; case 3: (cp)[2] = 0; case 2: (cp)[1] = 0;	\
-    case 1: (cp)[0] = 0; (cp) += (n); case 0:  ;			\
-    }
-#endif
-
-/*
- * Bit-fill a row according to the white/black
- * runs generated during G3/G4 decoding.
- */
-void
-_TIFFFax3fillruns(u_char* buf, uint32* runs, uint32* erun, uint32 lastx)
-{
-	static const unsigned char _fillmasks[] =
-	    { 0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xff };
-	u_char* cp;
-	uint32 x, bx, run;
-	int32 n, nw;
-	long* lp;
-
-	if ((erun-runs)&1)
-	    *erun++ = 0;
-	x = 0;
-	for (; runs < erun; runs += 2) {
-	    run = runs[0];
-	    if (x+run > lastx || run > lastx )
-		run = runs[0] = (uint32) (lastx - x);
-	    if (run) {
-		cp = buf + (x>>3);
-		bx = x&7;
-		if (run > 8-bx) {
-		    if (bx) {			/* align to byte boundary */
-			*cp++ &= 0xff << (8-bx);
-			run -= 8-bx;
-		    }
-		    if( (n = run >> 3) != 0 ) {	/* multiple bytes to fill */
-			if ((n/sizeof (long)) > 1) {
-			    /*
-			     * Align to longword boundary and fill.
-			     */
-			    for (; n && !isAligned(cp, long); n--)
-				    *cp++ = 0x00;
-			    lp = (long*) cp;
-			    nw = (int32)(n / sizeof (long));
-			    n -= nw * sizeof (long);
-			    do {
-				    *lp++ = 0L;
-			    } while (--nw);
-			    cp = (u_char*) lp;
-			}
-			ZERO(n, cp);
-			run &= 7;
-		    }
-		    if (run)
-			cp[0] &= 0xff >> run;
-		} else
-		    cp[0] &= ~(_fillmasks[run]>>bx);
-		x += runs[0];
-	    }
-	    run = runs[1];
-	    if (x+run > lastx || run > lastx )
-		run = runs[1] = lastx - x;
-	    if (run) {
-		cp = buf + (x>>3);
-		bx = x&7;
-		if (run > 8-bx) {
-		    if (bx) {			/* align to byte boundary */
-			*cp++ |= 0xff >> bx;
-			run -= 8-bx;
-		    }
-		    if( (n = run>>3) != 0 ) {	/* multiple bytes to fill */
-			if ((n/sizeof (long)) > 1) {
-			    /*
-			     * Align to longword boundary and fill.
-			     */
-			    for (; n && !isAligned(cp, long); n--)
-				*cp++ = 0xff;
-			    lp = (long*) cp;
-			    nw = (int32)(n / sizeof (long));
-			    n -= nw * sizeof (long);
-			    do {
-				*lp++ = -1L;
-			    } while (--nw);
-			    cp = (u_char*) lp;
-			}
-			FILL(n, cp);
-			run &= 7;
-		    }
-		    if (run)
-			cp[0] |= 0xff00 >> run;
-		} else
-		    cp[0] |= _fillmasks[run]>>bx;
-		x += runs[1];
-	    }
-	}
-	assert(x == lastx);
-}
-#undef	ZERO
-#undef	FILL
-
-/*
- * Setup G3/G4-related compression/decompression state
- * before data is processed.  This routine is called once
- * per image -- it sets up different state based on whether
- * or not decoding or encoding is being done and whether
- * 1D- or 2D-encoded data is involved.
- */
-static int
-Fax3SetupState(TIFF* tif)
-{
-	TIFFDirectory* td = &tif->tif_dir;
-	Fax3BaseState* sp = Fax3State(tif);
-	long rowbytes, rowpixels;
-	int needsRefLine;
-	Fax3CodecState* dsp = DecoderState(tif);
-	uint32 nruns;
-
-	if (td->td_bitspersample != 1) {
-		TIFFError(tif->tif_name,
-		    "Bits/sample must be 1 for Group 3/4 encoding/decoding");
-		return (0);
-	}
-	/*
-	 * Calculate the scanline/tile widths.
-	 */
-	if (isTiled(tif)) {
-		rowbytes = TIFFTileRowSize(tif);
-		rowpixels = td->td_tilewidth;
-	} else {
-		rowbytes = TIFFScanlineSize(tif);
-		rowpixels = td->td_imagewidth;
-	}
-	sp->rowbytes = (uint32) rowbytes;
-	sp->rowpixels = (uint32) rowpixels;
-	/*
-	 * Allocate any additional space required for decoding/encoding.
-	 */
-	needsRefLine = (
-	    (sp->groupoptions & GROUP3OPT_2DENCODING) ||
-	    td->td_compression == COMPRESSION_CCITTFAX4
-	);
-
-	nruns = needsRefLine ? 2*TIFFroundup(rowpixels,32) : rowpixels;
-
-	dsp->runs = (uint32*) _TIFFmalloc((2*nruns+3)*sizeof (uint32));
-	if (dsp->runs == NULL) {
-		TIFFError("Fax3SetupState",
-		    "%s: No space for Group 3/4 run arrays",
-		    tif->tif_name);
-		return (0);
-	}
-	dsp->curruns = dsp->runs;
-	if (needsRefLine)
-		dsp->refruns = dsp->runs + (nruns>>1);
-	else
-		dsp->refruns = NULL;
-	if (is2DEncoding(dsp)) {	/* NB: default is 1D routine */
-		tif->tif_decoderow = Fax3Decode2D;
-		tif->tif_decodestrip = Fax3Decode2D;
-		tif->tif_decodetile = Fax3Decode2D;
-	}
-
-	if (needsRefLine) {		/* 2d encoding */
-		Fax3CodecState* esp = EncoderState(tif);
-		/*
-		 * 2d encoding requires a scanline
-		 * buffer for the ``reference line''; the
-		 * scanline against which delta encoding
-		 * is referenced.  The reference line must
-		 * be initialized to be ``white'' (done elsewhere).
-		 */
-		esp->refline = (u_char*) _TIFFmalloc(rowbytes);
-		if (esp->refline == NULL) {
-			TIFFError("Fax3SetupState",
-			    "%s: No space for Group 3/4 reference line",
-			    tif->tif_name);
-			return (0);
-		}
-	} else					/* 1d encoding */
-		EncoderState(tif)->refline = NULL;
-	return (1);
-}
-
-/*
- * CCITT Group 3 FAX Encoding.
- */
-
-#define	Fax3FlushBits(tif, sp) {				\
-	if ((tif)->tif_rawcc >= (tif)->tif_rawdatasize)		\
-		(void) TIFFFlushData1(tif);			\
-	*(tif)->tif_rawcp++ = (tidataval_t) (sp)->data;		\
-	(tif)->tif_rawcc++;					\
-	(sp)->data = 0, (sp)->bit = 8;				\
-}
-#define	_FlushBits(tif) {					\
-	if ((tif)->tif_rawcc >= (tif)->tif_rawdatasize)		\
-		(void) TIFFFlushData1(tif);			\
-	*(tif)->tif_rawcp++ = (tidataval_t) data;		\
-	(tif)->tif_rawcc++;					\
-	data = 0, bit = 8;					\
-}
-static const int _msbmask[9] =
-    { 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff };
-#define	_PutBits(tif, bits, length) {				\
-	while (length > bit) {					\
-		data |= bits >> (length - bit);			\
-		length -= bit;					\
-		_FlushBits(tif);				\
-	}							\
-	data |= (bits & _msbmask[length]) << (bit - length);	\
-	bit -= length;						\
-	if (bit == 0)						\
-		_FlushBits(tif);				\
-}
-	
-/*
- * Write a variable-length bit-value to
- * the output stream.  Values are
- * assumed to be at most 16 bits.
- */
-static void
-Fax3PutBits(TIFF* tif, u_int bits, u_int length)
-{
-	Fax3CodecState* sp = EncoderState(tif);
-	u_int bit = sp->bit;
-	int data = sp->data;
-
-	_PutBits(tif, bits, length);
-
-	sp->data = data;
-	sp->bit = bit;
-}
-
-/*
- * Write a code to the output stream.
- */
-#define putcode(tif, te)	Fax3PutBits(tif, (te)->code, (te)->length)
-
-#ifdef FAX3_DEBUG
-#define	DEBUG_COLOR(w) (tab == TIFFFaxWhiteCodes ? w "W" : w "B")
-#define	DEBUG_PRINT(what,len) {						\
-    int t;								\
-    printf("%08X/%-2d: %s%5d\t", data, bit, DEBUG_COLOR(what), len);	\
-    for (t = length-1; t >= 0; t--)					\
-	putchar(code & (1<<t) ? '1' : '0');				\
-    putchar('\n');							\
-}
-#endif
-
-/*
- * Write the sequence of codes that describes
- * the specified span of zero's or one's.  The
- * appropriate table that holds the make-up and
- * terminating codes is supplied.
- */
-static void
-putspan(TIFF* tif, int32 span, const tableentry* tab)
-{
-	Fax3CodecState* sp = EncoderState(tif);
-	u_int bit = sp->bit;
-	int data = sp->data;
-	u_int code, length;
-
-	while (span >= 2624) {
-		const tableentry* te = &tab[63 + (2560>>6)];
-		code = te->code, length = te->length;
-#ifdef FAX3_DEBUG
-		DEBUG_PRINT("MakeUp", te->runlen);
-#endif
-		_PutBits(tif, code, length);
-		span -= te->runlen;
-	}
-	if (span >= 64) {
-		const tableentry* te = &tab[63 + (span>>6)];
-		assert(te->runlen == 64*(span>>6));
-		code = te->code, length = te->length;
-#ifdef FAX3_DEBUG
-		DEBUG_PRINT("MakeUp", te->runlen);
-#endif
-		_PutBits(tif, code, length);
-		span -= te->runlen;
-	}
-	code = tab[span].code, length = tab[span].length;
-#ifdef FAX3_DEBUG
-	DEBUG_PRINT("  Term", tab[span].runlen);
-#endif
-	_PutBits(tif, code, length);
-
-	sp->data = data;
-	sp->bit = bit;
-}
-
-/*
- * Write an EOL code to the output stream.  The zero-fill
- * logic for byte-aligning encoded scanlines is handled
- * here.  We also handle writing the tag bit for the next
- * scanline when doing 2d encoding.
- */
-static void
-Fax3PutEOL(TIFF* tif)
-{
-	Fax3CodecState* sp = EncoderState(tif);
-	u_int bit = sp->bit;
-	int data = sp->data;
-	u_int code, length, tparm;
-
-	if (sp->b.groupoptions & GROUP3OPT_FILLBITS) {
-		/*
-		 * Force bit alignment so EOL will terminate on
-		 * a byte boundary.  That is, force the bit alignment
-		 * to 16-12 = 4 before putting out the EOL code.
-		 */
-		int align = 8 - 4;
-		if (align != sp->bit) {
-			if (align > sp->bit)
-				align = sp->bit + (8 - align);
-			else
-				align = sp->bit - align;
-			code = 0;
-			tparm=align; 
-			_PutBits(tif, 0, tparm);
-		}
-	}
-	code = EOL, length = 12;
-	if (is2DEncoding(sp))
-		code = (code<<1) | (sp->tag == G3_1D), length++;
-	_PutBits(tif, code, length);
-
-	sp->data = data;
-	sp->bit = bit;
-}
-
-/*
- * Reset encoding state at the start of a strip.
- */
-static int
-Fax3PreEncode(TIFF* tif, tsample_t s)
-{
-	Fax3CodecState* sp = EncoderState(tif);
-
-	(void) s;
-	assert(sp != NULL);
-	sp->bit = 8;
-	sp->data = 0;
-	sp->tag = G3_1D;
-	/*
-	 * This is necessary for Group 4; otherwise it isn't
-	 * needed because the first scanline of each strip ends
-	 * up being copied into the refline.
-	 */
-	if (sp->refline)
-		_TIFFmemset(sp->refline, 0x00, sp->b.rowbytes);
-	if (is2DEncoding(sp)) {
-		float res = tif->tif_dir.td_yresolution;
-		/*
-		 * The CCITT spec says that when doing 2d encoding, you
-		 * should only do it on K consecutive scanlines, where K
-		 * depends on the resolution of the image being encoded
-		 * (2 for <= 200 lpi, 4 for > 200 lpi).  Since the directory
-		 * code initializes td_yresolution to 0, this code will
-		 * select a K of 2 unless the YResolution tag is set
-		 * appropriately.  (Note also that we fudge a little here
-		 * and use 150 lpi to avoid problems with units conversion.)
-		 */
-		if (tif->tif_dir.td_resolutionunit == RESUNIT_CENTIMETER)
-			res *= 2.54f;		/* convert to inches */
-		sp->maxk = (res > 150 ? 4 : 2);
-		sp->k = sp->maxk-1;
-	} else
-		sp->k = sp->maxk = 0;
-	return (1);
-}
-
-static const u_char zeroruns[256] = {
-    8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4,	/* 0x00 - 0x0f */
-    3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,	/* 0x10 - 0x1f */
-    2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,	/* 0x20 - 0x2f */
-    2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,	/* 0x30 - 0x3f */
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,	/* 0x40 - 0x4f */
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,	/* 0x50 - 0x5f */
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,	/* 0x60 - 0x6f */
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,	/* 0x70 - 0x7f */
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/* 0x80 - 0x8f */
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/* 0x90 - 0x9f */
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/* 0xa0 - 0xaf */
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/* 0xb0 - 0xbf */
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/* 0xc0 - 0xcf */
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/* 0xd0 - 0xdf */
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/* 0xe0 - 0xef */
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/* 0xf0 - 0xff */
-};
-static const u_char oneruns[256] = {
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/* 0x00 - 0x0f */
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/* 0x10 - 0x1f */
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/* 0x20 - 0x2f */
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/* 0x30 - 0x3f */
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/* 0x40 - 0x4f */
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/* 0x50 - 0x5f */
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/* 0x60 - 0x6f */
-    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,	/* 0x70 - 0x7f */
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,	/* 0x80 - 0x8f */
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,	/* 0x90 - 0x9f */
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,	/* 0xa0 - 0xaf */
-    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,	/* 0xb0 - 0xbf */
-    2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,	/* 0xc0 - 0xcf */
-    2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,	/* 0xd0 - 0xdf */
-    3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,	/* 0xe0 - 0xef */
-    4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 7, 8,	/* 0xf0 - 0xff */
-};
-
-/*
- * On certain systems it pays to inline
- * the routines that find pixel spans.
- */
-#ifdef VAXC
-static	int32 find0span(u_char*, int32, int32);
-static	int32 find1span(u_char*, int32, int32);
-#pragma inline(find0span,find1span)
-#endif
-
-/*
- * Find a span of ones or zeros using the supplied
- * table.  The ``base'' of the bit string is supplied
- * along with the start+end bit indices.
- */
-INLINE static int32
-find0span(u_char* bp, int32 bs, int32 be)
-{
-	int32 bits = be - bs;
-	int32 n, span;
-
-	bp += bs>>3;
-	/*
-	 * Check partial byte on lhs.
-	 */
-	if (bits > 0 && (n = (bs & 7))) {
-		span = zeroruns[(*bp << n) & 0xff];
-		if (span > 8-n)		/* table value too generous */
-			span = 8-n;
-		if (span > bits)	/* constrain span to bit range */
-			span = bits;
-		if (n+span < 8)		/* doesn't extend to edge of byte */
-			return (span);
-		bits -= span;
-		bp++;
-	} else
-		span = 0;
-	if (bits >= 2*8*sizeof (long)) {
-		long* lp;
-		/*
-		 * Align to longword boundary and check longwords.
-		 */
-		while (!isAligned(bp, long)) {
-			if (*bp != 0x00)
-				return (span + zeroruns[*bp]);
-			span += 8, bits -= 8;
-			bp++;
-		}
-		lp = (long*) bp;
-		while (bits >= 8*sizeof (long) && *lp == 0) {
-			span += 8*sizeof (long), bits -= 8*sizeof (long);
-			lp++;
-		}
-		bp = (u_char*) lp;
-	}
-	/*
-	 * Scan full bytes for all 0's.
-	 */
-	while (bits >= 8) {
-		if (*bp != 0x00)	/* end of run */
-			return (span + zeroruns[*bp]);
-		span += 8, bits -= 8;
-		bp++;
-	}
-	/*
-	 * Check partial byte on rhs.
-	 */
-	if (bits > 0) {
-		n = zeroruns[*bp];
-		span += (n > bits ? bits : n);
-	}
-	return (span);
-}
-
-INLINE static int32
-find1span(u_char* bp, int32 bs, int32 be)
-{
-	int32 bits = be - bs;
-	int32 n, span;
-
-	bp += bs>>3;
-	/*
-	 * Check partial byte on lhs.
-	 */
-	if (bits > 0 && (n = (bs & 7))) {
-		span = oneruns[(*bp << n) & 0xff];
-		if (span > 8-n)		/* table value too generous */
-			span = 8-n;
-		if (span > bits)	/* constrain span to bit range */
-			span = bits;
-		if (n+span < 8)		/* doesn't extend to edge of byte */
-			return (span);
-		bits -= span;
-		bp++;
-	} else
-		span = 0;
-	if (bits >= 2*8*sizeof (long)) {
-		long* lp;
-		/*
-		 * Align to longword boundary and check longwords.
-		 */
-		while (!isAligned(bp, long)) {
-			if (*bp != 0xff)
-				return (span + oneruns[*bp]);
-			span += 8, bits -= 8;
-			bp++;
-		}
-		lp = (long*) bp;
-		while (bits >= 8*sizeof (long) && *lp == ~0) {
-			span += 8*sizeof (long), bits -= 8*sizeof (long);
-			lp++;
-		}
-		bp = (u_char*) lp;
-	}
-	/*
-	 * Scan full bytes for all 1's.
-	 */
-	while (bits >= 8) {
-		if (*bp != 0xff)	/* end of run */
-			return (span + oneruns[*bp]);
-		span += 8, bits -= 8;
-		bp++;
-	}
-	/*
-	 * Check partial byte on rhs.
-	 */
-	if (bits > 0) {
-		n = oneruns[*bp];
-		span += (n > bits ? bits : n);
-	}
-	return (span);
-}
-
-/*
- * Return the offset of the next bit in the range
- * [bs..be] that is different from the specified
- * color.  The end, be, is returned if no such bit
- * exists.
- */
-#define	finddiff(_cp, _bs, _be, _color)	\
-	(_bs + (_color ? find1span(_cp,_bs,_be) : find0span(_cp,_bs,_be)))
-/*
- * Like finddiff, but also check the starting bit
- * against the end in case start > end.
- */
-#define	finddiff2(_cp, _bs, _be, _color) \
-	(_bs < _be ? finddiff(_cp,_bs,_be,_color) : _be)
-
-/*
- * 1d-encode a row of pixels.  The encoding is
- * a sequence of all-white or all-black spans
- * of pixels encoded with Huffman codes.
- */
-static int
-Fax3Encode1DRow(TIFF* tif, u_char* bp, uint32 bits)
-{
-	Fax3CodecState* sp = EncoderState(tif);
-	int32 span;
-        uint32 bs = 0;
-
-	for (;;) {
-		span = find0span(bp, bs, bits);		/* white span */
-		putspan(tif, span, TIFFFaxWhiteCodes);
-		bs += span;
-		if (bs >= bits)
-			break;
-		span = find1span(bp, bs, bits);		/* black span */
-		putspan(tif, span, TIFFFaxBlackCodes);
-		bs += span;
-		if (bs >= bits)
-			break;
-	}
-	if (sp->b.mode & (FAXMODE_BYTEALIGN|FAXMODE_WORDALIGN)) {
-		if (sp->bit != 8)			/* byte-align */
-			Fax3FlushBits(tif, sp);
-		if ((sp->b.mode&FAXMODE_WORDALIGN) &&
-		    !isAligned(tif->tif_rawcp, uint16))
-			Fax3FlushBits(tif, sp);
-	}
-	return (1);
-}
-
-static const tableentry horizcode =
-    { 3, 0x1 };		/* 001 */
-static const tableentry passcode =
-    { 4, 0x1 };		/* 0001 */
-static const tableentry vcodes[7] = {
-    { 7, 0x03 },	/* 0000 011 */
-    { 6, 0x03 },	/* 0000 11 */
-    { 3, 0x03 },	/* 011 */
-    { 1, 0x1 },		/* 1 */
-    { 3, 0x2 },		/* 010 */
-    { 6, 0x02 },	/* 0000 10 */
-    { 7, 0x02 }		/* 0000 010 */
-};
-
-/*
- * 2d-encode a row of pixels.  Consult the CCITT
- * documentation for the algorithm.
- */
-static int
-Fax3Encode2DRow(TIFF* tif, u_char* bp, u_char* rp, uint32 bits)
-{
-#define	PIXEL(buf,ix)	((((buf)[(ix)>>3]) >> (7-((ix)&7))) & 1)
-        uint32 a0 = 0;
-	uint32 a1 = (PIXEL(bp, 0) != 0 ? 0 : finddiff(bp, 0, bits, 0));
-	uint32 b1 = (PIXEL(rp, 0) != 0 ? 0 : finddiff(rp, 0, bits, 0));
-	uint32 a2, b2;
-
-	for (;;) {
-		b2 = finddiff2(rp, b1, bits, PIXEL(rp,b1));
-		if (b2 >= a1) {
-			int32 d = b1 - a1;
-			if (!(-3 <= d && d <= 3)) {	/* horizontal mode */
-				a2 = finddiff2(bp, a1, bits, PIXEL(bp,a1));
-				putcode(tif, &horizcode);
-				if (a0+a1 == 0 || PIXEL(bp, a0) == 0) {
-					putspan(tif, a1-a0, TIFFFaxWhiteCodes);
-					putspan(tif, a2-a1, TIFFFaxBlackCodes);
-				} else {
-					putspan(tif, a1-a0, TIFFFaxBlackCodes);
-					putspan(tif, a2-a1, TIFFFaxWhiteCodes);
-				}
-				a0 = a2;
-			} else {			/* vertical mode */
-				putcode(tif, &vcodes[d+3]);
-				a0 = a1;
-			}
-		} else {				/* pass mode */
-			putcode(tif, &passcode);
-			a0 = b2;
-		}
-		if (a0 >= bits)
-			break;
-		a1 = finddiff(bp, a0, bits, PIXEL(bp,a0));
-		b1 = finddiff(rp, a0, bits, !PIXEL(bp,a0));
-		b1 = finddiff(rp, b1, bits, PIXEL(bp,a0));
-	}
-	return (1);
-#undef PIXEL
-}
-
-/*
- * Encode a buffer of pixels.
- */
-static int
-Fax3Encode(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
-{
-	Fax3CodecState* sp = EncoderState(tif);
-
-	(void) s;
-	while ((long)cc > 0) {
-		if ((sp->b.mode & FAXMODE_NOEOL) == 0)
-			Fax3PutEOL(tif);
-		if (is2DEncoding(sp)) {
-			if (sp->tag == G3_1D) {
-				if (!Fax3Encode1DRow(tif, bp, sp->b.rowpixels))
-					return (0);
-				sp->tag = G3_2D;
-			} else {
-				if (!Fax3Encode2DRow(tif, bp, sp->refline, sp->b.rowpixels))
-					return (0);
-				sp->k--;
-			}
-			if (sp->k == 0) {
-				sp->tag = G3_1D;
-				sp->k = sp->maxk-1;
-			} else
-				_TIFFmemcpy(sp->refline, bp, sp->b.rowbytes);
-		} else {
-			if (!Fax3Encode1DRow(tif, bp, sp->b.rowpixels))
-				return (0);
-		}
-		bp += sp->b.rowbytes;
-		cc -= sp->b.rowbytes;
-	}
-	return (1);
-}
-
-static int
-Fax3PostEncode(TIFF* tif)
-{
-	Fax3CodecState* sp = EncoderState(tif);
-
-	if (sp->bit != 8)
-		Fax3FlushBits(tif, sp);
-	return (1);
-}
-
-static void
-Fax3Close(TIFF* tif)
-{
-	if ((Fax3State(tif)->mode & FAXMODE_NORTC) == 0) {
-		Fax3CodecState* sp = EncoderState(tif);
-		u_int code = EOL;
-		u_int length = 12;
-		int i;
-
-		if (is2DEncoding(sp))
-			code = (code<<1) | (sp->tag == G3_1D), length++;
-		for (i = 0; i < 6; i++)
-			Fax3PutBits(tif, code, length);
-		Fax3FlushBits(tif, sp);
-	}
-}
-
-static void
-Fax3Cleanup(TIFF* tif)
-{
-	if (tif->tif_data) {
-		Fax3CodecState* sp = DecoderState(tif);
-
-		if (sp->runs)
-			_TIFFfree(sp->runs);
-		if (sp->refline)
-			_TIFFfree(sp->refline);
-
-		if (Fax3State(tif)->subaddress)
-			_TIFFfree(Fax3State(tif)->subaddress);
-		_TIFFfree(tif->tif_data);
-		tif->tif_data = NULL;
-	}
-}
-
-#define	FIELD_BADFAXLINES	(FIELD_CODEC+0)
-#define	FIELD_CLEANFAXDATA	(FIELD_CODEC+1)
-#define	FIELD_BADFAXRUN		(FIELD_CODEC+2)
-#define	FIELD_RECVPARAMS	(FIELD_CODEC+3)
-#define	FIELD_SUBADDRESS	(FIELD_CODEC+4)
-#define	FIELD_RECVTIME		(FIELD_CODEC+5)
-
-#define	FIELD_OPTIONS		(FIELD_CODEC+6)
-
-static const TIFFFieldInfo faxFieldInfo[] = {
-    { TIFFTAG_FAXMODE,		 0, 0,	TIFF_ANY,	FIELD_PSEUDO,
-      FALSE,	FALSE,	"FaxMode" },
-    { TIFFTAG_FAXFILLFUNC,	 0, 0,	TIFF_ANY,	FIELD_PSEUDO,
-      FALSE,	FALSE,	"FaxFillFunc" },
-    { TIFFTAG_BADFAXLINES,	 1, 1,	TIFF_LONG,	FIELD_BADFAXLINES,
-      TRUE,	FALSE,	"BadFaxLines" },
-    { TIFFTAG_BADFAXLINES,	 1, 1,	TIFF_SHORT,	FIELD_BADFAXLINES,
-      TRUE,	FALSE,	"BadFaxLines" },
-    { TIFFTAG_CLEANFAXDATA,	 1, 1,	TIFF_SHORT,	FIELD_CLEANFAXDATA,
-      TRUE,	FALSE,	"CleanFaxData" },
-    { TIFFTAG_CONSECUTIVEBADFAXLINES,1,1, TIFF_LONG,	FIELD_BADFAXRUN,
-      TRUE,	FALSE,	"ConsecutiveBadFaxLines" },
-    { TIFFTAG_CONSECUTIVEBADFAXLINES,1,1, TIFF_SHORT,	FIELD_BADFAXRUN,
-      TRUE,	FALSE,	"ConsecutiveBadFaxLines" },
-    { TIFFTAG_FAXRECVPARAMS,	 1, 1, TIFF_LONG,	FIELD_RECVPARAMS,
-      TRUE,	FALSE,	"FaxRecvParams" },
-    { TIFFTAG_FAXSUBADDRESS,	-1,-1, TIFF_ASCII,	FIELD_SUBADDRESS,
-      TRUE,	FALSE,	"FaxSubAddress" },
-    { TIFFTAG_FAXRECVTIME,	 1, 1, TIFF_LONG,	FIELD_RECVTIME,
-      TRUE,	FALSE,	"FaxRecvTime" },
-};
-static const TIFFFieldInfo fax3FieldInfo[] = {
-    { TIFFTAG_GROUP3OPTIONS,	 1, 1,	TIFF_LONG,	FIELD_OPTIONS,
-      FALSE,	FALSE,	"Group3Options" },
-};
-static const TIFFFieldInfo fax4FieldInfo[] = {
-    { TIFFTAG_GROUP4OPTIONS,	 1, 1,	TIFF_LONG,	FIELD_OPTIONS,
-      FALSE,	FALSE,	"Group4Options" },
-};
-#define	N(a)	(sizeof (a) / sizeof (a[0]))
-
-static int
-Fax3VSetField(TIFF* tif, ttag_t tag, va_list ap)
-{
-	Fax3BaseState* sp = Fax3State(tif);
-
-	switch (tag) {
-	case TIFFTAG_FAXMODE:
-		sp->mode = va_arg(ap, int);
-		return (1);			/* NB: pseudo tag */
-	case TIFFTAG_FAXFILLFUNC:
-		DecoderState(tif)->fill = va_arg(ap, TIFFFaxFillFunc);
-		return (1);			/* NB: pseudo tag */
-	case TIFFTAG_GROUP3OPTIONS:
-	case TIFFTAG_GROUP4OPTIONS:
-		sp->groupoptions = va_arg(ap, uint32);
-		break;
-	case TIFFTAG_BADFAXLINES:
-		sp->badfaxlines = va_arg(ap, uint32);
-		break;
-	case TIFFTAG_CLEANFAXDATA:
-		sp->cleanfaxdata = (uint16) va_arg(ap, int);
-		break;
-	case TIFFTAG_CONSECUTIVEBADFAXLINES:
-		sp->badfaxrun = va_arg(ap, uint32);
-		break;
-	case TIFFTAG_FAXRECVPARAMS:
-		sp->recvparams = va_arg(ap, uint32);
-		break;
-	case TIFFTAG_FAXSUBADDRESS:
-		_TIFFsetString(&sp->subaddress, va_arg(ap, char*));
-		break;
-	case TIFFTAG_FAXRECVTIME:
-		sp->recvtime = va_arg(ap, uint32);
-		break;
-	default:
-		return (*sp->vsetparent)(tif, tag, ap);
-	}
-	TIFFSetFieldBit(tif, _TIFFFieldWithTag(tif, tag)->field_bit);
-	tif->tif_flags |= TIFF_DIRTYDIRECT;
-	return (1);
-}
-
-static int
-Fax3VGetField(TIFF* tif, ttag_t tag, va_list ap)
-{
-	Fax3BaseState* sp = Fax3State(tif);
-
-	switch (tag) {
-	case TIFFTAG_FAXMODE:
-		*va_arg(ap, int*) = sp->mode;
-		break;
-	case TIFFTAG_FAXFILLFUNC:
-		*va_arg(ap, TIFFFaxFillFunc*) = DecoderState(tif)->fill;
-		break;
-	case TIFFTAG_GROUP3OPTIONS:
-	case TIFFTAG_GROUP4OPTIONS:
-		*va_arg(ap, uint32*) = sp->groupoptions;
-		break;
-	case TIFFTAG_BADFAXLINES:
-		*va_arg(ap, uint32*) = sp->badfaxlines;
-		break;
-	case TIFFTAG_CLEANFAXDATA:
-		*va_arg(ap, uint16*) = sp->cleanfaxdata;
-		break;
-	case TIFFTAG_CONSECUTIVEBADFAXLINES:
-		*va_arg(ap, uint32*) = sp->badfaxrun;
-		break;
-	case TIFFTAG_FAXRECVPARAMS:
-		*va_arg(ap, uint32*) = sp->recvparams;
-		break;
-	case TIFFTAG_FAXSUBADDRESS:
-		*va_arg(ap, char**) = sp->subaddress;
-		break;
-	case TIFFTAG_FAXRECVTIME:
-		*va_arg(ap, uint32*) = sp->recvtime;
-		break;
-	default:
-		return (*sp->vgetparent)(tif, tag, ap);
-	}
-	return (1);
-}
-
-static void
-Fax3PrintDir(TIFF* tif, FILE* fd, long flags)
-{
-	Fax3BaseState* sp = Fax3State(tif);
-
-	(void) flags;
-	if (TIFFFieldSet(tif,FIELD_OPTIONS)) {
-		const char* sep = " ";
-		if (tif->tif_dir.td_compression == COMPRESSION_CCITTFAX4) {
-			fprintf(fd, "  Group 4 Options:");
-			if (sp->groupoptions & GROUP4OPT_UNCOMPRESSED)
-				fprintf(fd, "%suncompressed data", sep);
-		} else {
-
-			fprintf(fd, "  Group 3 Options:");
-			if (sp->groupoptions & GROUP3OPT_2DENCODING)
-				fprintf(fd, "%s2-d encoding", sep), sep = "+";
-			if (sp->groupoptions & GROUP3OPT_FILLBITS)
-				fprintf(fd, "%sEOL padding", sep), sep = "+";
-			if (sp->groupoptions & GROUP3OPT_UNCOMPRESSED)
-				fprintf(fd, "%suncompressed data", sep);
-		}
-		fprintf(fd, " (%lu = 0x%lx)\n",
-		    (u_long) sp->groupoptions, (u_long) sp->groupoptions);
-	}
-	if (TIFFFieldSet(tif,FIELD_CLEANFAXDATA)) {
-		fprintf(fd, "  Fax Data:");
-		switch (sp->cleanfaxdata) {
-		case CLEANFAXDATA_CLEAN:
-			fprintf(fd, " clean");
-			break;
-		case CLEANFAXDATA_REGENERATED:
-			fprintf(fd, " receiver regenerated");
-			break;
-		case CLEANFAXDATA_UNCLEAN:
-			fprintf(fd, " uncorrected errors");
-			break;
-		}
-		fprintf(fd, " (%u = 0x%x)\n",
-		    sp->cleanfaxdata, sp->cleanfaxdata);
-	}
-	if (TIFFFieldSet(tif,FIELD_BADFAXLINES))
-		fprintf(fd, "  Bad Fax Lines: %lu\n", (u_long) sp->badfaxlines);
-	if (TIFFFieldSet(tif,FIELD_BADFAXRUN))
-		fprintf(fd, "  Consecutive Bad Fax Lines: %lu\n",
-		    (u_long) sp->badfaxrun);
-	if (TIFFFieldSet(tif,FIELD_RECVPARAMS))
-		fprintf(fd, "  Fax Receive Parameters: %08lx\n",
-		   (u_long) sp->recvparams);
-	if (TIFFFieldSet(tif,FIELD_SUBADDRESS))
-		fprintf(fd, "  Fax SubAddress: %s\n", sp->subaddress);
-	if (TIFFFieldSet(tif,FIELD_RECVTIME))
-		fprintf(fd, "  Fax Receive Time: %lu secs\n",
-		    (u_long) sp->recvtime);
-}
-
-static int
-InitCCITTFax3(TIFF* tif)
-{
-	Fax3BaseState* sp;
-
-	/*
-	 * Allocate state block so tag methods have storage to record values.
-	 */
-	tif->tif_data = (tidata_t)
-		_TIFFmalloc(sizeof (Fax3CodecState));
-
-	if (tif->tif_data == NULL) {
-		TIFFError("TIFFInitCCITTFax3",
-		    "%s: No space for state block", tif->tif_name);
-		return (0);
-	}
-
-	sp = Fax3State(tif);
-        sp->rw_mode = tif->tif_mode;
-
-	/*
-	 * Merge codec-specific tag information and
-	 * override parent get/set field methods.
-	 */
-	_TIFFMergeFieldInfo(tif, faxFieldInfo, N(faxFieldInfo));
-	sp->vgetparent = tif->tif_tagmethods.vgetfield;
-	tif->tif_tagmethods.vgetfield = Fax3VGetField;	/* hook for codec tags */
-	sp->vsetparent = tif->tif_tagmethods.vsetfield;
-	tif->tif_tagmethods.vsetfield = Fax3VSetField;	/* hook for codec tags */
-	tif->tif_tagmethods.printdir = Fax3PrintDir;	/* hook for codec tags */
-	sp->groupoptions = 0;	
-	sp->recvparams = 0;
-	sp->subaddress = NULL;
-
-	tif->tif_flags |= TIFF_NOBITREV;	/* decoder does bit reversal */
-	DecoderState(tif)->runs = NULL;
-	TIFFSetField(tif, TIFFTAG_FAXFILLFUNC, _TIFFFax3fillruns);
-	EncoderState(tif)->refline = NULL;
-
-	/*
-	 * Install codec methods.
-	 */
-	tif->tif_setupdecode = Fax3SetupState;
-	tif->tif_predecode = Fax3PreDecode;
-	tif->tif_decoderow = Fax3Decode1D;
-	tif->tif_decodestrip = Fax3Decode1D;
-	tif->tif_decodetile = Fax3Decode1D;
-	tif->tif_setupencode = Fax3SetupState;
-	tif->tif_preencode = Fax3PreEncode;
-	tif->tif_postencode = Fax3PostEncode;
-	tif->tif_encoderow = Fax3Encode;
-	tif->tif_encodestrip = Fax3Encode;
-	tif->tif_encodetile = Fax3Encode;
-	tif->tif_close = Fax3Close;
-	tif->tif_cleanup = Fax3Cleanup;
-
-	return (1);
-}
-
-int
-TIFFInitCCITTFax3(TIFF* tif, int scheme)
-{
-	if (InitCCITTFax3(tif)) {
-		_TIFFMergeFieldInfo(tif, fax3FieldInfo, N(fax3FieldInfo));
-
-		/*
-		 * The default format is Class/F-style w/o RTC.
-		 */
-		return TIFFSetField(tif, TIFFTAG_FAXMODE, FAXMODE_CLASSF);
-	} else
-		return (0);
-}
-
-/*
- * CCITT Group 4 (T.6) Facsimile-compatible
- * Compression Scheme Support.
- */
-
-#define	SWAP(t,a,b)	{ t x; x = (a); (a) = (b); (b) = x; }
-/*
- * Decode the requested amount of G4-encoded data.
- */
-static int
-Fax4Decode(TIFF* tif, tidata_t buf, tsize_t occ, tsample_t s)
-{
-	DECLARE_STATE_2D(tif, sp, "Fax4Decode");
-
-	(void) s;
-	CACHE_STATE(tif, sp);
-	while ((long)occ > 0) {
-		a0 = 0;
-		RunLength = 0;
-		pa = thisrun = sp->curruns;
-		pb = sp->refruns;
-		b1 = *pb++;
-#ifdef FAX3_DEBUG
-		printf("\nBitAcc=%08X, BitsAvail = %d\n", BitAcc, BitsAvail);
-		printf("-------------------- %d\n", tif->tif_row);
-		fflush(stdout);
-#endif
-		EXPAND2D(EOFG4);
-                if (EOLcnt)
-                    goto EOFG4;
-		(*sp->fill)(buf, thisrun, pa, lastx);
-		SETVAL(0);		/* imaginary change for reference */
-		SWAP(uint32*, sp->curruns, sp->refruns);
-		buf += sp->b.rowbytes;
-		occ -= sp->b.rowbytes;
-		continue;
-	EOFG4:
-                NeedBits16( 13, BADG4 );
-        BADG4:
-#ifdef FAX3_DEBUG
-                if( GetBits(13) != 0x1001 )
-                    fputs( "Bad RTC\n", stderr );
-#endif                
-                ClrBits( 13 );
-		(*sp->fill)(buf, thisrun, pa, lastx);
-		UNCACHE_STATE(tif, sp);
-		return (-1);
-	}
-	UNCACHE_STATE(tif, sp);
-	return (1);
-}
-#undef	SWAP
-
-/*
- * Encode the requested amount of data.
- */
-static int
-Fax4Encode(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
-{
-	Fax3CodecState *sp = EncoderState(tif);
-
-	(void) s;
-	while ((long)cc > 0) {
-		if (!Fax3Encode2DRow(tif, bp, sp->refline, sp->b.rowpixels))
-			return (0);
-		_TIFFmemcpy(sp->refline, bp, sp->b.rowbytes);
-		bp += sp->b.rowbytes;
-		cc -= sp->b.rowbytes;
-	}
-	return (1);
-}
-
-static int
-Fax4PostEncode(TIFF* tif)
-{
-	Fax3CodecState *sp = EncoderState(tif);
-
-	/* terminate strip w/ EOFB */
-	Fax3PutBits(tif, EOL, 12);
-	Fax3PutBits(tif, EOL, 12);
-	if (sp->bit != 8)
-		Fax3FlushBits(tif, sp);
-	return (1);
-}
-
-int
-TIFFInitCCITTFax4(TIFF* tif, int scheme)
-{
-	if (InitCCITTFax3(tif)) {		/* reuse G3 support */
-		_TIFFMergeFieldInfo(tif, fax4FieldInfo, N(fax4FieldInfo));
-
-		tif->tif_decoderow = Fax4Decode;
-		tif->tif_decodestrip = Fax4Decode;
-		tif->tif_decodetile = Fax4Decode;
-		tif->tif_encoderow = Fax4Encode;
-		tif->tif_encodestrip = Fax4Encode;
-		tif->tif_encodetile = Fax4Encode;
-		tif->tif_postencode = Fax4PostEncode;
-		/*
-		 * Suppress RTC at the end of each strip.
-		 */
-		return TIFFSetField(tif, TIFFTAG_FAXMODE, FAXMODE_NORTC);
-	} else
-		return (0);
-}
-
-/*
- * CCITT Group 3 1-D Modified Huffman RLE Compression Support.
- * (Compression algorithms 2 and 32771)
- */
-
-/*
- * Decode the requested amount of RLE-encoded data.
- */
-static int
-Fax3DecodeRLE(TIFF* tif, tidata_t buf, tsize_t occ, tsample_t s)
-{
-	DECLARE_STATE(tif, sp, "Fax3DecodeRLE");
-	int mode = sp->b.mode;
-
-	(void) s;
-	CACHE_STATE(tif, sp);
-	thisrun = sp->curruns;
-	while ((long)occ > 0) {
-		a0 = 0;
-		RunLength = 0;
-		pa = thisrun;
-#ifdef FAX3_DEBUG
-		printf("\nBitAcc=%08X, BitsAvail = %d\n", BitAcc, BitsAvail);
-		printf("-------------------- %d\n", tif->tif_row);
-		fflush(stdout);
-#endif
-		EXPAND1D(EOFRLE);
-		(*sp->fill)(buf, thisrun, pa, lastx);
-		/*
-		 * Cleanup at the end of the row.
-		 */
-		if (mode & FAXMODE_BYTEALIGN) {
-			int n = BitsAvail - (BitsAvail &~ 7);
-			ClrBits(n);
-		} else if (mode & FAXMODE_WORDALIGN) {
-			int n = BitsAvail - (BitsAvail &~ 15);
-			ClrBits(n);
-			if (BitsAvail == 0 && !isAligned(cp, uint16))
-			    cp++;
-		}
-		buf += sp->b.rowbytes;
-		occ -= sp->b.rowbytes;
-		continue;
-	EOFRLE:				/* premature EOF */
-		(*sp->fill)(buf, thisrun, pa, lastx);
-		UNCACHE_STATE(tif, sp);
-		return (-1);
-	}
-	UNCACHE_STATE(tif, sp);
-	return (1);
-}
-
-int
-TIFFInitCCITTRLE(TIFF* tif, int scheme)
-{
-	if (InitCCITTFax3(tif)) {		/* reuse G3 support */
-		tif->tif_decoderow = Fax3DecodeRLE;
-		tif->tif_decodestrip = Fax3DecodeRLE;
-		tif->tif_decodetile = Fax3DecodeRLE;
-		/*
-		 * Suppress RTC+EOLs when encoding and byte-align data.
-		 */
-		return TIFFSetField(tif, TIFFTAG_FAXMODE,
-		    FAXMODE_NORTC|FAXMODE_NOEOL|FAXMODE_BYTEALIGN);
-	} else
-		return (0);
-}
-
-int
-TIFFInitCCITTRLEW(TIFF* tif, int scheme)
-{
-	if (InitCCITTFax3(tif)) {		/* reuse G3 support */
-		tif->tif_decoderow = Fax3DecodeRLE;
-		tif->tif_decodestrip = Fax3DecodeRLE;
-		tif->tif_decodetile = Fax3DecodeRLE;
-		/*
-		 * Suppress RTC+EOLs when encoding and word-align data.
-		 */
-		return TIFFSetField(tif, TIFFTAG_FAXMODE,
-		    FAXMODE_NORTC|FAXMODE_NOEOL|FAXMODE_WORDALIGN);
-	} else
-		return (0);
-}
-#endif /* CCITT_SUPPORT */
diff --git a/src/tiff/tif_fax3.h b/src/tiff/tif_fax3.h
deleted file mode 100644
index b1f078c..0000000
--- a/src/tiff/tif_fax3.h
+++ /dev/null
@@ -1,525 +0,0 @@
-/* $Id: tif_fax3.h,v 1.3 2004/03/19 11:51:24 lubia Exp $ */
-
-/*
- * Copyright (c) 1990-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#ifndef _FAX3_
-#define	_FAX3_
-/*
- * TIFF Library.
- *
- * CCITT Group 3 (T.4) and Group 4 (T.6) Decompression Support.
- *
- * Decoder support is derived, with permission, from the code
- * in Frank Cringle's viewfax program;
- *      Copyright (C) 1990, 1995  Frank D. Cringle.
- */
-#include "tiff.h"
-
-/*
- * To override the default routine used to image decoded
- * spans one can use the pseduo tag TIFFTAG_FAXFILLFUNC.
- * The routine must have the type signature given below;
- * for example:
- *
- * fillruns(unsigned char* buf, uint32* runs, uint32* erun, uint32 lastx)
- *
- * where buf is place to set the bits, runs is the array of b&w run
- * lengths (white then black), erun is the last run in the array, and
- * lastx is the width of the row in pixels.  Fill routines can assume
- * the run array has room for at least lastx runs and can overwrite
- * data in the run array as needed (e.g. to append zero runs to bring
- * the count up to a nice multiple).
- */
-typedef	void (*TIFFFaxFillFunc)(unsigned char*, uint32*, uint32*, uint32);
-
-/*
- * The default run filler; made external for other decoders.
- */
-#if defined(__cplusplus)
-extern "C" {
-#endif
-extern	void _TIFFFax3fillruns(unsigned char*, uint32*, uint32*, uint32);
-#if defined(__cplusplus)
-}
-#endif
-
-
-/* finite state machine codes */
-#define S_Null		0
-#define S_Pass		1
-#define S_Horiz		2
-#define S_V0		3
-#define S_VR		4
-#define S_VL		5
-#define S_Ext		6
-#define S_TermW		7
-#define S_TermB		8
-#define S_MakeUpW	9
-#define S_MakeUpB	10
-#define S_MakeUp	11
-#define S_EOL		12
-
-typedef struct {		/* state table entry */
-	unsigned char State;	/* see above */
-	unsigned char Width;	/* width of code in bits */
-	uint32	Param;		/* unsigned 32-bit run length in bits */
-} TIFFFaxTabEnt;
-
-extern	const TIFFFaxTabEnt TIFFFaxMainTable[];
-extern	const TIFFFaxTabEnt TIFFFaxWhiteTable[];
-extern	const TIFFFaxTabEnt TIFFFaxBlackTable[];
-
-/*
- * The following macros define the majority of the G3/G4 decoder
- * algorithm using the state tables defined elsewhere.  To build
- * a decoder you need some setup code and some glue code. Note
- * that you may also need/want to change the way the NeedBits*
- * macros get input data if, for example, you know the data to be
- * decoded is properly aligned and oriented (doing so before running
- * the decoder can be a big performance win).
- *
- * Consult the decoder in the TIFF library for an idea of what you
- * need to define and setup to make use of these definitions.
- *
- * NB: to enable a debugging version of these macros define FAX3_DEBUG
- *     before including this file.  Trace output goes to stdout.
- */
-
-#ifndef EndOfData
-#define EndOfData()	(cp >= ep)
-#endif
-/*
- * Need <=8 or <=16 bits of input data.  Unlike viewfax we
- * cannot use/assume a word-aligned, properly bit swizzled
- * input data set because data may come from an arbitrarily
- * aligned, read-only source such as a memory-mapped file.
- * Note also that the viewfax decoder does not check for
- * running off the end of the input data buffer.  This is
- * possible for G3-encoded data because it prescans the input
- * data to count EOL markers, but can cause problems for G4
- * data.  In any event, we don't prescan and must watch for
- * running out of data since we can't permit the library to
- * scan past the end of the input data buffer.
- *
- * Finally, note that we must handle remaindered data at the end
- * of a strip specially.  The coder asks for a fixed number of
- * bits when scanning for the next code.  This may be more bits
- * than are actually present in the data stream.  If we appear
- * to run out of data but still have some number of valid bits
- * remaining then we makeup the requested amount with zeros and
- * return successfully.  If the returned data is incorrect then
- * we should be called again and get a premature EOF error;
- * otherwise we should get the right answer.
- */
-#ifndef NeedBits8
-#define NeedBits8(n,eoflab) do {					\
-    if (BitsAvail < (n)) {						\
-	if (EndOfData()) {						\
-	    if (BitsAvail == 0)			/* no valid bits */	\
-		goto eoflab;						\
-	    BitsAvail = (n);			/* pad with zeros */	\
-	} else {							\
-	    BitAcc |= ((uint32) bitmap[*cp++])<<BitsAvail;		\
-	    BitsAvail += 8;						\
-	}								\
-    }									\
-} while (0)
-#endif
-#ifndef NeedBits16
-#define NeedBits16(n,eoflab) do {					\
-    if (BitsAvail < (n)) {						\
-	if (EndOfData()) {						\
-	    if (BitsAvail == 0)			/* no valid bits */	\
-		goto eoflab;						\
-	    BitsAvail = (n);			/* pad with zeros */	\
-	} else {							\
-	    BitAcc |= ((uint32) bitmap[*cp++])<<BitsAvail;		\
-	    if ((BitsAvail += 8) < (n)) {				\
-		if (EndOfData()) {					\
-		    /* NB: we know BitsAvail is non-zero here */	\
-		    BitsAvail = (n);		/* pad with zeros */	\
-		} else {						\
-		    BitAcc |= ((uint32) bitmap[*cp++])<<BitsAvail;	\
-		    BitsAvail += 8;					\
-		}							\
-	    }								\
-	}								\
-    }									\
-} while (0)
-#endif
-#define GetBits(n)	(BitAcc & ((1<<(n))-1))
-#define ClrBits(n) do {							\
-    BitsAvail -= (n);							\
-    BitAcc >>= (n);							\
-} while (0)
-
-#ifdef FAX3_DEBUG
-static const char* StateNames[] = {
-    "Null   ",
-    "Pass   ",
-    "Horiz  ",
-    "V0     ",
-    "VR     ",
-    "VL     ",
-    "Ext    ",
-    "TermW  ",
-    "TermB  ",
-    "MakeUpW",
-    "MakeUpB",
-    "MakeUp ",
-    "EOL    ",
-};
-#define DEBUG_SHOW putchar(BitAcc & (1 << t) ? '1' : '0')
-#define LOOKUP8(wid,tab,eoflab) do {					\
-    int t;								\
-    NeedBits8(wid,eoflab);						\
-    TabEnt = tab + GetBits(wid);					\
-    printf("%08lX/%d: %s%5d\t", (long) BitAcc, BitsAvail,		\
-	   StateNames[TabEnt->State], TabEnt->Param);			\
-    for (t = 0; t < TabEnt->Width; t++)					\
-	DEBUG_SHOW;							\
-    putchar('\n');							\
-    fflush(stdout);							\
-    ClrBits(TabEnt->Width);						\
-} while (0)
-#define LOOKUP16(wid,tab,eoflab) do {					\
-    int t;								\
-    NeedBits16(wid,eoflab);						\
-    TabEnt = tab + GetBits(wid);					\
-    printf("%08lX/%d: %s%5d\t", (long) BitAcc, BitsAvail,		\
-	   StateNames[TabEnt->State], TabEnt->Param);			\
-    for (t = 0; t < TabEnt->Width; t++)					\
-	DEBUG_SHOW;							\
-    putchar('\n');							\
-    fflush(stdout);							\
-    ClrBits(TabEnt->Width);						\
-} while (0)
-
-#define SETVAL(x) do {							\
-    *pa++ = RunLength + (x);						\
-    printf("SETVAL: %d\t%d\n", RunLength + (x), a0);			\
-    a0 += x;								\
-    RunLength = 0;							\
-} while (0)
-#else
-#define LOOKUP8(wid,tab,eoflab) do {					\
-    NeedBits8(wid,eoflab);						\
-    TabEnt = tab + GetBits(wid);					\
-    ClrBits(TabEnt->Width);						\
-} while (0)
-#define LOOKUP16(wid,tab,eoflab) do {					\
-    NeedBits16(wid,eoflab);						\
-    TabEnt = tab + GetBits(wid);					\
-    ClrBits(TabEnt->Width);						\
-} while (0)
-
-/*
- * Append a run to the run length array for the
- * current row and reset decoding state.
- */
-#define SETVAL(x) do {							\
-    *pa++ = RunLength + (x);						\
-    a0 += (x);								\
-    RunLength = 0;							\
-} while (0)
-#endif
-
-/*
- * Synchronize input decoding at the start of each
- * row by scanning for an EOL (if appropriate) and
- * skipping any trash data that might be present
- * after a decoding error.  Note that the decoding
- * done elsewhere that recognizes an EOL only consumes
- * 11 consecutive zero bits.  This means that if EOLcnt
- * is non-zero then we still need to scan for the final flag
- * bit that is part of the EOL code.
- */
-#define	SYNC_EOL(eoflab) do {						\
-    if (EOLcnt == 0) {							\
-	for (;;) {							\
-	    NeedBits16(11,eoflab);					\
-	    if (GetBits(11) == 0)					\
-		break;							\
-	    ClrBits(1);							\
-	}								\
-    }									\
-    for (;;) {								\
-	NeedBits8(8,eoflab);						\
-	if (GetBits(8))							\
-	    break;							\
-	ClrBits(8);							\
-    }									\
-    while (GetBits(1) == 0)						\
-	ClrBits(1);							\
-    ClrBits(1);				/* EOL bit */			\
-    EOLcnt = 0;				/* reset EOL counter/flag */	\
-} while (0)
-
-/*
- * Cleanup the array of runs after decoding a row.
- * We adjust final runs to insure the user buffer is not
- * overwritten and/or undecoded area is white filled.
- */
-#define	CLEANUP_RUNS() do {						\
-    if (RunLength)							\
-	SETVAL(0);							\
-    if (a0 != lastx) {							\
-	badlength(a0, lastx);						\
-	while (a0 > lastx && pa > thisrun)				\
-	    a0 -= *--pa;						\
-	if (a0 < lastx) {						\
-	    if (a0 < 0)							\
-		a0 = 0;							\
-	    if ((pa-thisrun)&1)						\
-		SETVAL(0);						\
-	    SETVAL(lastx - a0);						\
-	} else if (a0 > lastx) {					\
-	    SETVAL(lastx);						\
-	    SETVAL(0);							\
-	}								\
-    }									\
-} while (0)
-
-/*
- * Decode a line of 1D-encoded data.
- *
- * The line expanders are written as macros so that they can be reused
- * but still have direct access to the local variables of the "calling"
- * function.
- *
- * Note that unlike the original version we have to explicitly test for
- * a0 >= lastx after each black/white run is decoded.  This is because
- * the original code depended on the input data being zero-padded to
- * insure the decoder recognized an EOL before running out of data.
- */
-#define EXPAND1D(eoflab) do {						\
-    for (;;) {								\
-	for (;;) {							\
-	    LOOKUP16(12, TIFFFaxWhiteTable, eof1d);			\
-	    switch (TabEnt->State) {					\
-	    case S_EOL:							\
-		EOLcnt = 1;						\
-		goto done1d;						\
-	    case S_TermW:						\
-		SETVAL(TabEnt->Param);					\
-		goto doneWhite1d;					\
-	    case S_MakeUpW:						\
-	    case S_MakeUp:						\
-		a0 += TabEnt->Param;					\
-		RunLength += TabEnt->Param;				\
-		break;							\
-	    default:							\
-		unexpected("WhiteTable", a0);				\
-		goto done1d;						\
-	    }								\
-	}								\
-    doneWhite1d:							\
-	if (a0 >= lastx)						\
-	    goto done1d;						\
-	for (;;) {							\
-	    LOOKUP16(13, TIFFFaxBlackTable, eof1d);			\
-	    switch (TabEnt->State) {					\
-	    case S_EOL:							\
-		EOLcnt = 1;						\
-		goto done1d;						\
-	    case S_TermB:						\
-		SETVAL(TabEnt->Param);					\
-		goto doneBlack1d;					\
-	    case S_MakeUpB:						\
-	    case S_MakeUp:						\
-		a0 += TabEnt->Param;					\
-		RunLength += TabEnt->Param;				\
-		break;							\
-	    default:							\
-		unexpected("BlackTable", a0);				\
-		goto done1d;						\
-	    }								\
-	}								\
-    doneBlack1d:							\
-	if (a0 >= lastx)						\
-	    goto done1d;						\
-        if( *(pa-1) == 0 && *(pa-2) == 0 )				\
-            pa -= 2;                                                    \
-    }									\
-eof1d:									\
-    prematureEOF(a0);							\
-    CLEANUP_RUNS();							\
-    goto eoflab;							\
-done1d:									\
-    CLEANUP_RUNS();							\
-} while (0)
-
-/*
- * Update the value of b1 using the array
- * of runs for the reference line.
- */
-#define CHECK_b1 do {							\
-    if (pa != thisrun) while (b1 <= a0 && b1 < lastx) {			\
-	b1 += pb[0] + pb[1];						\
-	pb += 2;							\
-    }									\
-} while (0)
-
-/*
- * Expand a row of 2D-encoded data.
- */
-#define EXPAND2D(eoflab) do {						\
-    while (a0 < lastx) {						\
-	LOOKUP8(7, TIFFFaxMainTable, eof2d);				\
-	switch (TabEnt->State) {					\
-	case S_Pass:							\
-	    CHECK_b1;							\
-	    b1 += *pb++;						\
-	    RunLength += b1 - a0;					\
-	    a0 = b1;							\
-	    b1 += *pb++;						\
-	    break;							\
-	case S_Horiz:							\
-	    if ((pa-thisrun)&1) {					\
-		for (;;) {	/* black first */			\
-		    LOOKUP16(13, TIFFFaxBlackTable, eof2d);		\
-		    switch (TabEnt->State) {				\
-		    case S_TermB:					\
-			SETVAL(TabEnt->Param);				\
-			goto doneWhite2da;				\
-		    case S_MakeUpB:					\
-		    case S_MakeUp:					\
-			a0 += TabEnt->Param;				\
-			RunLength += TabEnt->Param;			\
-			break;						\
-		    default:						\
-			goto badBlack2d;				\
-		    }							\
-		}							\
-	    doneWhite2da:;						\
-		for (;;) {	/* then white */			\
-		    LOOKUP16(12, TIFFFaxWhiteTable, eof2d);		\
-		    switch (TabEnt->State) {				\
-		    case S_TermW:					\
-			SETVAL(TabEnt->Param);				\
-			goto doneBlack2da;				\
-		    case S_MakeUpW:					\
-		    case S_MakeUp:					\
-			a0 += TabEnt->Param;				\
-			RunLength += TabEnt->Param;			\
-			break;						\
-		    default:						\
-			goto badWhite2d;				\
-		    }							\
-		}							\
-	    doneBlack2da:;						\
-	    } else {							\
-		for (;;) {	/* white first */			\
-		    LOOKUP16(12, TIFFFaxWhiteTable, eof2d);		\
-		    switch (TabEnt->State) {				\
-		    case S_TermW:					\
-			SETVAL(TabEnt->Param);				\
-			goto doneWhite2db;				\
-		    case S_MakeUpW:					\
-		    case S_MakeUp:					\
-			a0 += TabEnt->Param;				\
-			RunLength += TabEnt->Param;			\
-			break;						\
-		    default:						\
-			goto badWhite2d;				\
-		    }							\
-		}							\
-	    doneWhite2db:;						\
-		for (;;) {	/* then black */			\
-		    LOOKUP16(13, TIFFFaxBlackTable, eof2d);		\
-		    switch (TabEnt->State) {				\
-		    case S_TermB:					\
-			SETVAL(TabEnt->Param);				\
-			goto doneBlack2db;				\
-		    case S_MakeUpB:					\
-		    case S_MakeUp:					\
-			a0 += TabEnt->Param;				\
-			RunLength += TabEnt->Param;			\
-			break;						\
-		    default:						\
-			goto badBlack2d;				\
-		    }							\
-		}							\
-	    doneBlack2db:;						\
-	    }								\
-	    CHECK_b1;							\
-	    break;							\
-	case S_V0:							\
-	    CHECK_b1;							\
-	    SETVAL(b1 - a0);						\
-	    b1 += *pb++;						\
-	    break;							\
-	case S_VR:							\
-	    CHECK_b1;							\
-	    SETVAL(b1 - a0 + TabEnt->Param);				\
-	    b1 += *pb++;						\
-	    break;							\
-	case S_VL:							\
-	    CHECK_b1;							\
-	    SETVAL(b1 - a0 - TabEnt->Param);				\
-	    b1 -= *--pb;						\
-	    break;							\
-	case S_Ext:							\
-	    *pa++ = lastx - a0;						\
-	    extension(a0);						\
-	    goto eol2d;							\
-	case S_EOL:							\
-	    *pa++ = lastx - a0;						\
-	    NeedBits8(4,eof2d);						\
-	    if (GetBits(4))						\
-		unexpected("EOL", a0);					\
-            ClrBits(4);                                                 \
-	    EOLcnt = 1;							\
-	    goto eol2d;							\
-	default:							\
-	badMain2d:							\
-	    unexpected("MainTable", a0);				\
-	    goto eol2d;							\
-	badBlack2d:							\
-	    unexpected("BlackTable", a0);				\
-	    goto eol2d;							\
-	badWhite2d:							\
-	    unexpected("WhiteTable", a0);				\
-	    goto eol2d;							\
-	eof2d:								\
-	    prematureEOF(a0);						\
-	    CLEANUP_RUNS();						\
-	    goto eoflab;						\
-	}								\
-    }									\
-    if (RunLength) {							\
-	if (RunLength + a0 < lastx) {					\
-	    /* expect a final V0 */					\
-	    NeedBits8(1,eof2d);						\
-	    if (!GetBits(1))						\
-		goto badMain2d;						\
-	    ClrBits(1);							\
-	}								\
-	SETVAL(0);							\
-    }									\
-eol2d:									\
-    CLEANUP_RUNS();							\
-} while (0)
-#endif /* _FAX3_ */
diff --git a/src/tiff/tif_flush.c b/src/tiff/tif_flush.c
deleted file mode 100644
index a89b096..0000000
--- a/src/tiff/tif_flush.c
+++ /dev/null
@@ -1,67 +0,0 @@
-/* $Header: /home/terralib/src/tiff/tif_flush.c,v 1.3 2004/03/19 11:51:24 lubia Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library.
- */
-#include "tiffiop.h"
-
-int
-TIFFFlush(TIFF* tif)
-{
-
-	if (tif->tif_mode != O_RDONLY) {
-		if (!TIFFFlushData(tif))
-			return (0);
-		if ((tif->tif_flags & TIFF_DIRTYDIRECT) &&
-		    !TIFFWriteDirectory(tif))
-			return (0);
-	}
-	return (1);
-}
-
-/*
- * Flush buffered data to the file.
- *
- * Frank Warmerdam'2000: I modified this to return 1 if TIFF_BEENWRITING
- * is not set, so that TIFFFlush() will proceed to write out the directory.
- * The documentation says returning 1 is an error indicator, but not having
- * been writing isn't exactly a an error.  Hopefully this doesn't cause
- * problems for other people. 
- */
-int
-TIFFFlushData(TIFF* tif)
-{
-	if ((tif->tif_flags & TIFF_BEENWRITING) == 0)
-		return (0);
-	if (tif->tif_flags & TIFF_POSTENCODE) {
-		tif->tif_flags &= ~TIFF_POSTENCODE;
-		if (!(*tif->tif_postencode)(tif))
-			return (0);
-	}
-	return (TIFFFlushData1(tif));
-}
-
diff --git a/src/tiff/tif_getimage.c b/src/tiff/tif_getimage.c
deleted file mode 100644
index 5abfd60..0000000
--- a/src/tiff/tif_getimage.c
+++ /dev/null
@@ -1,2584 +0,0 @@
-/* $Header: /home/terralib/src/tiff/tif_getimage.c,v 1.3 2004/03/19 11:51:24 lubia Exp $ */
-
-/*
- * Copyright (c) 1991-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library
- *
- * Read and return a packed RGBA image.
- */
-#include "tiffiop.h"
-#include <assert.h>
-#include <stdio.h>
-
-static	int gtTileContig(TIFFRGBAImage*, uint32*, uint32, uint32);
-static	int gtTileSeparate(TIFFRGBAImage*, uint32*, uint32, uint32);
-static	int gtStripContig(TIFFRGBAImage*, uint32*, uint32, uint32);
-static	int gtStripSeparate(TIFFRGBAImage*, uint32*, uint32, uint32);
-static	int pickTileContigCase(TIFFRGBAImage*);
-static	int pickTileSeparateCase(TIFFRGBAImage*);
-
-static	const char photoTag[] = "PhotometricInterpretation";
-
-/* 
- * Helper constants used in Orientation tag handling
- */
-#define FLIP_VERTICALLY 0x01
-#define FLIP_HORIZONTALLY 0x02
-
-/*
- * Color conversion constants. We will define display types here.
- */
-
-TIFFDisplay display_sRGB = {
-	{			/* XYZ -> luminance matrix */
-		{  3.2410F, -1.5374F, -0.4986F },
-		{  -0.9692F, 1.8760F, 0.0416F },
-		{  0.0556F, -0.2040F, 1.0570F }
-	},	
-	100.0F, 100.0F, 100.0F,	/* Light o/p for reference white */
-	255, 255, 255,		/* Pixel values for ref. white */
-	1.0F, 1.0F, 1.0F,	/* Residual light o/p for black pixel */
-	2.4F, 2.4F, 2.4F,	/* Gamma values for the three guns */
-};
-
-/*
- * Check the image to see if TIFFReadRGBAImage can deal with it.
- * 1/0 is returned according to whether or not the image can
- * be handled.  If 0 is returned, emsg contains the reason
- * why it is being rejected.
- */
-int
-TIFFRGBAImageOK(TIFF* tif, char emsg[1024])
-{
-    TIFFDirectory* td = &tif->tif_dir;
-    uint16 photometric;
-    int colorchannels;
-
-    if (!tif->tif_decodestatus) {
-	sprintf(emsg, "Sorry, requested compression method is not configured");
-	return (0);
-    }
-    switch (td->td_bitspersample) {
-    case 1: case 2: case 4:
-    case 8: case 16:
-	break;
-    default:
-	sprintf(emsg, "Sorry, can not handle images with %d-bit samples",
-	    td->td_bitspersample);
-	return (0);
-    }
-    colorchannels = td->td_samplesperpixel - td->td_extrasamples;
-    if (!TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &photometric)) {
-	switch (colorchannels) {
-	case 1:
-	    photometric = PHOTOMETRIC_MINISBLACK;
-	    break;
-	case 3:
-	    photometric = PHOTOMETRIC_RGB;
-	    break;
-	default:
-	    sprintf(emsg, "Missing needed %s tag", photoTag);
-	    return (0);
-	}
-    }
-    switch (photometric) {
-    case PHOTOMETRIC_MINISWHITE:
-    case PHOTOMETRIC_MINISBLACK:
-    case PHOTOMETRIC_PALETTE:
-	if (td->td_planarconfig == PLANARCONFIG_CONTIG 
-            && td->td_samplesperpixel != 1
-            && td->td_bitspersample < 8 ) {
-	    sprintf(emsg,
-                    "Sorry, can not handle contiguous data with %s=%d, "
-                    "and %s=%d and Bits/Sample=%d",
-                    photoTag, photometric,
-                    "Samples/pixel", td->td_samplesperpixel,
-                    td->td_bitspersample);
-	    return (0);
-	}
-        /*
-        ** We should likely validate that any extra samples are either
-        ** to be ignored, or are alpha, and if alpha we should try to use
-        ** them.  But for now we won't bother with this. 
-        */
-	break;
-    case PHOTOMETRIC_YCBCR:
-	if (td->td_planarconfig != PLANARCONFIG_CONTIG) {
-	    sprintf(emsg, "Sorry, can not handle YCbCr images with %s=%d",
-		"Planarconfiguration", td->td_planarconfig);
-	    return (0);
-	}
-	break;
-    case PHOTOMETRIC_RGB: 
-	if (colorchannels < 3) {
-	    sprintf(emsg, "Sorry, can not handle RGB image with %s=%d",
-		"Color channels", colorchannels);
-	    return (0);
-	}
-	break;
-    case PHOTOMETRIC_SEPARATED:
-	if (td->td_inkset != INKSET_CMYK) {
-	    sprintf(emsg, "Sorry, can not handle separated image with %s=%d",
-		"InkSet", td->td_inkset);
-	    return (0);
-	}
-	if (td->td_samplesperpixel < 4) {
-	    sprintf(emsg, "Sorry, can not handle separated image with %s=%d",
-		"Samples/pixel", td->td_samplesperpixel);
-	    return (0);
-	}
-	break;
-    case PHOTOMETRIC_LOGL:
-	if (td->td_compression != COMPRESSION_SGILOG) {
-	    sprintf(emsg, "Sorry, LogL data must have %s=%d",
-		"Compression", COMPRESSION_SGILOG);
-	    return (0);
-	}
-	break;
-    case PHOTOMETRIC_LOGLUV:
-	if (td->td_compression != COMPRESSION_SGILOG &&
-		td->td_compression != COMPRESSION_SGILOG24) {
-	    sprintf(emsg, "Sorry, LogLuv data must have %s=%d or %d",
-		"Compression", COMPRESSION_SGILOG, COMPRESSION_SGILOG24);
-	    return (0);
-	}
-	if (td->td_planarconfig != PLANARCONFIG_CONTIG) {
-	    sprintf(emsg, "Sorry, can not handle LogLuv images with %s=%d",
-		"Planarconfiguration", td->td_planarconfig);
-	    return (0);
-	}
-	break;
-    case PHOTOMETRIC_CIELAB:
-	break;
-    default:
-	sprintf(emsg, "Sorry, can not handle image with %s=%d",
-	    photoTag, photometric);
-	return (0);
-    }
-    return (1);
-}
-
-void
-TIFFRGBAImageEnd(TIFFRGBAImage* img)
-{
-	if (img->Map)
-		_TIFFfree(img->Map), img->Map = NULL;
-	if (img->BWmap)
-		_TIFFfree(img->BWmap), img->BWmap = NULL;
-	if (img->PALmap)
-		_TIFFfree(img->PALmap), img->PALmap = NULL;
-	if (img->ycbcr)
-		_TIFFfree(img->ycbcr), img->ycbcr = NULL;
-	if (img->cielab)
-		_TIFFfree(img->cielab), img->cielab = NULL;
-
-	if( img->redcmap ) {
-		_TIFFfree( img->redcmap );
-		_TIFFfree( img->greencmap );
-		_TIFFfree( img->bluecmap );
-	}
-}
-
-static int
-isCCITTCompression(TIFF* tif)
-{
-    uint16 compress;
-    TIFFGetField(tif, TIFFTAG_COMPRESSION, &compress);
-    return (compress == COMPRESSION_CCITTFAX3 ||
-	    compress == COMPRESSION_CCITTFAX4 ||
-	    compress == COMPRESSION_CCITTRLE ||
-	    compress == COMPRESSION_CCITTRLEW);
-}
-
-int
-TIFFRGBAImageBegin(TIFFRGBAImage* img, TIFF* tif, int stop, char emsg[1024])
-{
-    uint16* sampleinfo;
-    uint16 extrasamples;
-    uint16 planarconfig;
-    uint16 compress;
-    int colorchannels;
-    uint16	*red_orig, *green_orig, *blue_orig;
-    int		n_color;
-
-    /* Initialize to normal values */
-    img->row_offset = 0;
-    img->col_offset = 0;
-    img->redcmap = NULL;
-    img->greencmap = NULL;
-    img->bluecmap = NULL;
-    img->req_orientation = ORIENTATION_BOTLEFT;	    /* It is the default */
-    
-    img->tif = tif;
-    img->stoponerr = stop;
-    TIFFGetFieldDefaulted(tif, TIFFTAG_BITSPERSAMPLE, &img->bitspersample);
-    switch (img->bitspersample) {
-    case 1: case 2: case 4:
-    case 8: case 16:
-	break;
-    default:
-	sprintf(emsg, "Sorry, can not handle images with %d-bit samples",
-	    img->bitspersample);
-	return (0);
-    }
-    img->alpha = 0;
-    TIFFGetFieldDefaulted(tif, TIFFTAG_SAMPLESPERPIXEL, &img->samplesperpixel);
-    TIFFGetFieldDefaulted(tif, TIFFTAG_EXTRASAMPLES,
-	&extrasamples, &sampleinfo);
-    if (extrasamples == 1)
-    {
-	switch (sampleinfo[0]) {
-	case EXTRASAMPLE_UNSPECIFIED:	/* Workaround for some images without */
-		if (img->samplesperpixel == 4)	/* correct info about alpha channel */
-			img->alpha = EXTRASAMPLE_ASSOCALPHA;
-		break;
-	case EXTRASAMPLE_ASSOCALPHA:	/* data is pre-multiplied */
-	case EXTRASAMPLE_UNASSALPHA:	/* data is not pre-multiplied */
-		img->alpha = sampleinfo[0];
-		break;
-	}
-    }
-
-#if DEFAULT_EXTRASAMPLE_AS_ALPHA == 1
-    if( !TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &img->photometric))
-        img->photometric = PHOTOMETRIC_MINISWHITE;
-
-    if( extrasamples == 0 
-        && img->samplesperpixel == 4 
-        && img->photometric == PHOTOMETRIC_RGB )
-    {
-        img->alpha = EXTRASAMPLE_ASSOCALPHA;
-        extrasamples = 1;
-    }
-#endif
-
-    colorchannels = img->samplesperpixel - extrasamples;
-    TIFFGetFieldDefaulted(tif, TIFFTAG_COMPRESSION, &compress);
-    TIFFGetFieldDefaulted(tif, TIFFTAG_PLANARCONFIG, &planarconfig);
-    if (!TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &img->photometric)) {
-	switch (colorchannels) {
-	case 1:
-	    if (isCCITTCompression(tif))
-		img->photometric = PHOTOMETRIC_MINISWHITE;
-	    else
-		img->photometric = PHOTOMETRIC_MINISBLACK;
-	    break;
-	case 3:
-	    img->photometric = PHOTOMETRIC_RGB;
-	    break;
-	default:
-	    sprintf(emsg, "Missing needed %s tag", photoTag);
-	    return (0);
-	}
-    }
-    switch (img->photometric) {
-    case PHOTOMETRIC_PALETTE:
-	if (!TIFFGetField(tif, TIFFTAG_COLORMAP,
-	    &red_orig, &green_orig, &blue_orig)) {
-	    TIFFError(TIFFFileName(tif), "Missing required \"Colormap\" tag");
-	    return (0);
-	}
-
-        /* copy the colormaps so we can modify them */
-        n_color = (1L << img->bitspersample);
-        img->redcmap = (uint16 *) _TIFFmalloc(sizeof(uint16)*n_color);
-        img->greencmap = (uint16 *) _TIFFmalloc(sizeof(uint16)*n_color);
-        img->bluecmap = (uint16 *) _TIFFmalloc(sizeof(uint16)*n_color);
-        if( !img->redcmap || !img->greencmap || !img->bluecmap ) {
-	    TIFFError(TIFFFileName(tif), "Out of memory for colormap copy");
-	    return (0);
-        }
-
-        memcpy( img->redcmap, red_orig, n_color * 2 );
-        memcpy( img->greencmap, green_orig, n_color * 2 );
-        memcpy( img->bluecmap, blue_orig, n_color * 2 );
-        
-	/* fall thru... */
-    case PHOTOMETRIC_MINISWHITE:
-    case PHOTOMETRIC_MINISBLACK:
-	if (planarconfig == PLANARCONFIG_CONTIG 
-            && img->samplesperpixel != 1
-            && img->bitspersample < 8 ) {
-	    sprintf(emsg,
-                    "Sorry, can not handle contiguous data with %s=%d, "
-                    "and %s=%d and Bits/Sample=%d",
-                    photoTag, img->photometric,
-                    "Samples/pixel", img->samplesperpixel,
-                    img->bitspersample);
-	    return (0);
-	}
-	break;
-    case PHOTOMETRIC_YCBCR:
-	if (planarconfig != PLANARCONFIG_CONTIG) {
-	    sprintf(emsg, "Sorry, can not handle YCbCr images with %s=%d",
-		"Planarconfiguration", planarconfig);
-	    return (0);
-	}
-	/* It would probably be nice to have a reality check here. */
-	if (planarconfig == PLANARCONFIG_CONTIG)
-	    /* can rely on libjpeg to convert to RGB */
-	    /* XXX should restore current state on exit */
-	    switch (compress) {
-		case COMPRESSION_OJPEG:
-		case COMPRESSION_JPEG:
-		    TIFFSetField(tif, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RGB);
-		    img->photometric = PHOTOMETRIC_RGB;
-                    break;
-
-                default:
-                    /* do nothing */;
-                    break;
-	    }
-	break;
-    case PHOTOMETRIC_RGB: 
-	if (colorchannels < 3) {
-	    sprintf(emsg, "Sorry, can not handle RGB image with %s=%d",
-		"Color channels", colorchannels);
-	    return (0);
-	}
-	break;
-    case PHOTOMETRIC_SEPARATED: {
-	uint16 inkset;
-	TIFFGetFieldDefaulted(tif, TIFFTAG_INKSET, &inkset);
-	if (inkset != INKSET_CMYK) {
-	    sprintf(emsg, "Sorry, can not handle separated image with %s=%d",
-		"InkSet", inkset);
-	    return (0);
-	}
-	if (img->samplesperpixel < 4) {
-	    sprintf(emsg, "Sorry, can not handle separated image with %s=%d",
-		"Samples/pixel", img->samplesperpixel);
-	    return (0);
-	}
-	break;
-    }
-    case PHOTOMETRIC_LOGL:
-	if (compress != COMPRESSION_SGILOG) {
-	    sprintf(emsg, "Sorry, LogL data must have %s=%d",
-		"Compression", COMPRESSION_SGILOG);
-	    return (0);
-	}
-	TIFFSetField(tif, TIFFTAG_SGILOGDATAFMT, SGILOGDATAFMT_8BIT);
-	img->photometric = PHOTOMETRIC_MINISBLACK;	/* little white lie */
-	img->bitspersample = 8;
-	break;
-    case PHOTOMETRIC_LOGLUV:
-	if (compress != COMPRESSION_SGILOG && compress != COMPRESSION_SGILOG24) {
-	    sprintf(emsg, "Sorry, LogLuv data must have %s=%d or %d",
-		"Compression", COMPRESSION_SGILOG, COMPRESSION_SGILOG24);
-	    return (0);
-	}
-	if (planarconfig != PLANARCONFIG_CONTIG) {
-	    sprintf(emsg, "Sorry, can not handle LogLuv images with %s=%d",
-		"Planarconfiguration", planarconfig);
-	    return (0);
-	}
-	TIFFSetField(tif, TIFFTAG_SGILOGDATAFMT, SGILOGDATAFMT_8BIT);
-	img->photometric = PHOTOMETRIC_RGB;		/* little white lie */
-	img->bitspersample = 8;
-	break;
-    case PHOTOMETRIC_CIELAB:
-	break;
-    default:
-	sprintf(emsg, "Sorry, can not handle image with %s=%d",
-	    photoTag, img->photometric);
-	return (0);
-    }
-    img->Map = NULL;
-    img->BWmap = NULL;
-    img->PALmap = NULL;
-    img->ycbcr = NULL;
-    img->cielab = NULL;
-    TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &img->width);
-    TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &img->height);
-    TIFFGetFieldDefaulted(tif, TIFFTAG_ORIENTATION, &img->orientation);
-    img->isContig =
-	!(planarconfig == PLANARCONFIG_SEPARATE && colorchannels > 1);
-    if (img->isContig) {
-	img->get = TIFFIsTiled(tif) ? gtTileContig : gtStripContig;
-	return pickTileContigCase(img);
-    } else {
-	img->get = TIFFIsTiled(tif) ? gtTileSeparate : gtStripSeparate;
-	return pickTileSeparateCase(img);
-    }
-}
-
-int
-TIFFRGBAImageGet(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
-{
-    if (img->get == NULL) {
-	TIFFError(TIFFFileName(img->tif), "No \"get\" routine setup");
-	return (0);
-    }
-    if (img->put.any == NULL) {
-	TIFFError(TIFFFileName(img->tif),
-	    "No \"put\" routine setupl; probably can not handle image format");
-	return (0);
-    }
-    return (*img->get)(img, raster, w, h);
-}
-
-/*
- * Read the specified image into an ABGR-format rastertaking in account
- * specified orientation.
- */
-int
-TIFFReadRGBAImageOriented(TIFF* tif,
-			  uint32 rwidth, uint32 rheight, uint32* raster,
-			  int orientation, int stop)
-{
-    char emsg[1024];
-    TIFFRGBAImage img;
-    int ok;
-
-    if (TIFFRGBAImageOK(tif, emsg) &&
-	TIFFRGBAImageBegin(&img, tif, stop, emsg)) {
-	img.req_orientation = orientation;
-	/* XXX verify rwidth and rheight against width and height */
-	ok = TIFFRGBAImageGet(&img, raster+(rheight-img.height)*rwidth,
-	    rwidth, img.height);
-	TIFFRGBAImageEnd(&img);
-    } else {
-	TIFFError(TIFFFileName(tif), emsg);
-	ok = 0;
-    }
-    return (ok);
-}
-
-/*
- * Read the specified image into an ABGR-format raster. Use bottom left
- * origin for raster by default.
- */
-int
-TIFFReadRGBAImage(TIFF* tif,
-		  uint32 rwidth, uint32 rheight, uint32* raster, int stop)
-{
-	return TIFFReadRGBAImageOriented(tif, rwidth, rheight, raster,
-					 ORIENTATION_BOTLEFT, stop);
-}
-
-static int 
-setorientation(TIFFRGBAImage* img)
-{
-	switch (img->orientation) {
-		case ORIENTATION_TOPLEFT:
-		case ORIENTATION_LEFTTOP:
-			if (img->req_orientation == ORIENTATION_TOPRIGHT ||
-			    img->req_orientation == ORIENTATION_RIGHTTOP)
-				return FLIP_HORIZONTALLY;
-			else if (img->req_orientation == ORIENTATION_BOTRIGHT ||
-			    img->req_orientation == ORIENTATION_RIGHTBOT)
-				return FLIP_HORIZONTALLY | FLIP_VERTICALLY;
-			else if (img->req_orientation == ORIENTATION_BOTLEFT ||
-			    img->req_orientation == ORIENTATION_LEFTBOT)
-				return FLIP_VERTICALLY;
-			else
-				return 0;
-		case ORIENTATION_TOPRIGHT:
-		case ORIENTATION_RIGHTTOP:
-			if (img->req_orientation == ORIENTATION_TOPLEFT ||
-			    img->req_orientation == ORIENTATION_LEFTTOP)
-				return FLIP_HORIZONTALLY;
-			else if (img->req_orientation == ORIENTATION_BOTRIGHT ||
-			    img->req_orientation == ORIENTATION_RIGHTBOT)
-				return FLIP_VERTICALLY;
-			else if (img->req_orientation == ORIENTATION_BOTLEFT ||
-			    img->req_orientation == ORIENTATION_LEFTBOT)
-				return FLIP_HORIZONTALLY | FLIP_VERTICALLY;
-			else
-				return 0;
-		case ORIENTATION_BOTRIGHT:
-		case ORIENTATION_RIGHTBOT:
-			if (img->req_orientation == ORIENTATION_TOPLEFT ||
-			    img->req_orientation == ORIENTATION_LEFTTOP)
-				return FLIP_HORIZONTALLY | FLIP_VERTICALLY;
-			else if (img->req_orientation == ORIENTATION_TOPRIGHT ||
-			    img->req_orientation == ORIENTATION_RIGHTTOP)
-				return FLIP_VERTICALLY;
-			else if (img->req_orientation == ORIENTATION_BOTLEFT ||
-			    img->req_orientation == ORIENTATION_LEFTBOT)
-				return FLIP_HORIZONTALLY;
-			else
-				return 0;
-		case ORIENTATION_BOTLEFT:
-		case ORIENTATION_LEFTBOT:
-			if (img->req_orientation == ORIENTATION_TOPLEFT ||
-			    img->req_orientation == ORIENTATION_LEFTTOP)
-				return FLIP_VERTICALLY;
-			else if (img->req_orientation == ORIENTATION_TOPRIGHT ||
-			    img->req_orientation == ORIENTATION_RIGHTTOP)
-				return FLIP_HORIZONTALLY | FLIP_VERTICALLY;
-			else if (img->req_orientation == ORIENTATION_BOTRIGHT ||
-			    img->req_orientation == ORIENTATION_RIGHTBOT)
-				return FLIP_HORIZONTALLY;
-			else
-				return 0;
-		default:	/* NOTREACHED */
-			return 0;
-	}
-}
-
-/*
- * Get an tile-organized image that has
- *	PlanarConfiguration contiguous if SamplesPerPixel > 1
- * or
- *	SamplesPerPixel == 1
- */	
-static int
-gtTileContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
-{
-    TIFF* tif = img->tif;
-    tileContigRoutine put = img->put.contig;
-    uint32 col, row, y, rowstoread;
-    uint32 pos;
-    uint32 tw, th;
-    u_char* buf;
-    int32 fromskew, toskew;
-    uint32 nrow;
-    int ret = 1, flip;
-
-    buf = (u_char*) _TIFFmalloc(TIFFTileSize(tif));
-    if (buf == 0) {
-	TIFFError(TIFFFileName(tif), "No space for tile buffer");
-	return (0);
-    }
-    TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tw);
-    TIFFGetField(tif, TIFFTAG_TILELENGTH, &th);
-
-    flip = setorientation(img);
-    if (flip & FLIP_VERTICALLY) {
-	    y = h - 1;
-	    toskew = -(int32)(tw + w);
-    }
-    else {
-	    y = 0;
-	    toskew = -(int32)(tw - w);
-    }
-     
-    for (row = 0; row < h; row += nrow)
-    {
-        rowstoread = th - (row + img->row_offset) % th;
-    	nrow = (row + rowstoread > h ? h - row : rowstoread);
-	for (col = 0; col < w; col += tw) 
-        {
-            if (TIFFReadTile(tif, buf, col+img->col_offset,
-                             row+img->row_offset, 0, 0) < 0 && img->stoponerr)
-            {
-                ret = 0;
-                break;
-            }
-	    
-            pos = ((row+img->row_offset) % th) * TIFFTileRowSize(tif);
-
-    	    if (col + tw > w) 
-            {
-                /*
-                 * Tile is clipped horizontally.  Calculate
-                 * visible portion and skewing factors.
-                 */
-                uint32 npix = w - col;
-                fromskew = tw - npix;
-                (*put)(img, raster+y*w+col, col, y,
-                       npix, nrow, fromskew, toskew + fromskew, buf + pos);
-            }
-            else 
-            {
-                (*put)(img, raster+y*w+col, col, y, tw, nrow, 0, toskew, buf + pos);
-            }
-        }
-
-        y += (flip & FLIP_VERTICALLY ? -(int32) nrow : (int32) nrow);
-    }
-    _TIFFfree(buf);
-
-    if (flip & FLIP_HORIZONTALLY) {
-	    uint32 line;
-
-	    for (line = 0; line < h; line++) {
-		    uint32 *left = raster + (line * w);
-		    uint32 *right = left + w - 1;
-		    
-		    while ( left < right ) {
-			    uint32 temp = *left;
-			    *left = *right;
-			    *right = temp;
-			    left++, right--;
-		    }
-	    }
-    }
-
-    return (ret);
-}
-
-/*
- * Get an tile-organized image that has
- *	 SamplesPerPixel > 1
- *	 PlanarConfiguration separated
- * We assume that all such images are RGB.
- */	
-static int
-gtTileSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
-{
-    TIFF* tif = img->tif;
-    tileSeparateRoutine put = img->put.separate;
-    uint32 col, row, y, rowstoread;
-    uint32 pos;
-    uint32 tw, th;
-    u_char* buf;
-    u_char* r;
-    u_char* g;
-    u_char* b;
-    u_char* a;
-    tsize_t tilesize;
-    int32 fromskew, toskew;
-    int alpha = img->alpha;
-    uint32 nrow;
-    int ret = 1, flip;
-
-    tilesize = TIFFTileSize(tif);
-    buf = (u_char*) _TIFFmalloc(4*tilesize);
-    if (buf == 0) {
-	TIFFError(TIFFFileName(tif), "No space for tile buffer");
-	return (0);
-    }
-    r = buf;
-    g = r + tilesize;
-    b = g + tilesize;
-    a = b + tilesize;
-    if (!alpha)
-	memset(a, 0xff, tilesize);
-    TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tw);
-    TIFFGetField(tif, TIFFTAG_TILELENGTH, &th);
-
-    flip = setorientation(img);
-    if (flip & FLIP_VERTICALLY) {
-	    y = h - 1;
-	    toskew = -(int32)(tw + w);
-    }
-    else {
-	    y = 0;
-	    toskew = -(int32)(tw - w);
-    }
-
-    for (row = 0; row < h; row += nrow) 
-    {
-        rowstoread = th - (row + img->row_offset) % th;
-    	nrow = (row + rowstoread > h ? h - row : rowstoread);
-        for (col = 0; col < w; col += tw) 
-        {
-            if (TIFFReadTile(tif, r, col+img->col_offset,
-                             row+img->row_offset,0,0) < 0 && img->stoponerr)
-            {
-                ret = 0;
-                break;
-            }
-            if (TIFFReadTile(tif, g, col+img->col_offset,
-                             row+img->row_offset,0,1) < 0 && img->stoponerr)
-            {
-                ret = 0;
-                break;
-            }
-            if (TIFFReadTile(tif, b, col+img->col_offset,
-                             row+img->row_offset,0,2) < 0 && img->stoponerr)
-            {
-                ret = 0;
-                break;
-            }
-            if (alpha && TIFFReadTile(tif,a,col+img->col_offset,
-                                      row+img->row_offset,0,3) < 0 && img->stoponerr)
-            {
-                ret = 0;
-                break;
-            }
-
-            pos = ((row+img->row_offset) % th) * TIFFTileRowSize(tif);
-
-            if (col + tw > w) 
-            {
-                /*
-                 * Tile is clipped horizontally.  Calculate
-                 * visible portion and skewing factors.
-                 */
-                uint32 npix = w - col;
-                fromskew = tw - npix;
-                (*put)(img, raster+y*w+col, col, y,
-                       npix, nrow, fromskew, toskew + fromskew, 
-                       r + pos, g + pos, b + pos, a + pos);
-            } 
-            else 
-            {
-                (*put)(img, raster+y*w+col, col, y,
-                       tw, nrow, 0, toskew, r + pos, g + pos, b + pos, a + pos);
-            }
-        }
-
-        y += (flip & FLIP_VERTICALLY ?-(int32) nrow : (int32) nrow);
-    }
-
-    if (flip & FLIP_HORIZONTALLY) {
-	    uint32 line;
-
-	    for (line = 0; line < h; line++) {
-		    uint32 *left = raster + (line * w);
-		    uint32 *right = left + w - 1;
-		    
-		    while ( left < right ) {
-			    uint32 temp = *left;
-			    *left = *right;
-			    *right = temp;
-			    left++, right--;
-		    }
-	    }
-    }
-
-    _TIFFfree(buf);
-    return (ret);
-}
-
-/*
- * Get a strip-organized image that has
- *	PlanarConfiguration contiguous if SamplesPerPixel > 1
- * or
- *	SamplesPerPixel == 1
- */	
-static int
-gtStripContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
-{
-    TIFF* tif = img->tif;
-    tileContigRoutine put = img->put.contig;
-    uint32 row, y, nrow, rowstoread;
-    uint32 pos;
-    u_char* buf;
-    uint32 rowsperstrip;
-    uint32 imagewidth = img->width;
-    tsize_t scanline;
-    int32 fromskew, toskew;
-    int ret = 1, flip;
-
-    buf = (u_char*) _TIFFmalloc(TIFFStripSize(tif));
-    if (buf == 0) {
-	TIFFError(TIFFFileName(tif), "No space for strip buffer");
-	return (0);
-    }
-
-    flip = setorientation(img);
-    if (flip & FLIP_VERTICALLY) {
-	    y = h - 1;
-	    toskew = -(int32)(w + w);
-    }
-    else {
-	    y = 0;
-	    toskew = -(int32)(w - w);
-    }
-
-    TIFFGetFieldDefaulted(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip);
-    scanline = TIFFScanlineSize(tif);
-    fromskew = (w < imagewidth ? imagewidth - w : 0);
-    for (row = 0; row < h; row += nrow) 
-    {
-        rowstoread = rowsperstrip - (row + img->row_offset) % rowsperstrip;
-        nrow = (row + rowstoread > h ? h - row : rowstoread);
-        if (TIFFReadEncodedStrip(tif,
-                                 TIFFComputeStrip(tif,row+img->row_offset, 0),
-                                 buf, 
-                                 ((row + img->row_offset)%rowsperstrip + nrow) * scanline) < 0
-            && img->stoponerr)
-        {
-            ret = 0;
-            break;
-        }
-
-        pos = ((row + img->row_offset) % rowsperstrip) * scanline;
-        (*put)(img, raster+y*w, 0, y, w, nrow, fromskew, toskew, buf + pos);
-        y += (flip & FLIP_VERTICALLY ? -(int32) nrow : (int32) nrow);
-    }
-
-    if (flip & FLIP_HORIZONTALLY) {
-	    uint32 line;
-
-	    for (line = 0; line < h; line++) {
-		    uint32 *left = raster + (line * w);
-		    uint32 *right = left + w - 1;
-		    
-		    while ( left < right ) {
-			    uint32 temp = *left;
-			    *left = *right;
-			    *right = temp;
-			    left++, right--;
-		    }
-	    }
-    }
-
-    _TIFFfree(buf);
-    return (ret);
-}
-
-/*
- * Get a strip-organized image with
- *	 SamplesPerPixel > 1
- *	 PlanarConfiguration separated
- * We assume that all such images are RGB.
- */
-static int
-gtStripSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
-{
-    TIFF* tif = img->tif;
-    tileSeparateRoutine put = img->put.separate;
-    u_char *buf;
-    u_char *r, *g, *b, *a;
-    uint32 row, y, nrow, rowstoread;
-    uint32 pos;
-    tsize_t scanline;
-    uint32 rowsperstrip, offset_row;
-    uint32 imagewidth = img->width;
-    tsize_t stripsize;
-    int32 fromskew, toskew;
-    int alpha = img->alpha;
-    int	ret = 1, flip;
-
-    stripsize = TIFFStripSize(tif);
-    r = buf = (u_char *)_TIFFmalloc(4*stripsize);
-    if (buf == 0) {
-	TIFFError(TIFFFileName(tif), "No space for tile buffer");
-	return (0);
-    }
-    g = r + stripsize;
-    b = g + stripsize;
-    a = b + stripsize;
-    if (!alpha)
-	memset(a, 0xff, stripsize);
-
-    flip = setorientation(img);
-    if (flip & FLIP_VERTICALLY) {
-	    y = h - 1;
-	    toskew = -(int32)(w + w);
-    }
-    else {
-	    y = 0;
-	    toskew = -(int32)(w - w);
-    }
-
-    TIFFGetFieldDefaulted(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip);
-    scanline = TIFFScanlineSize(tif);
-    fromskew = (w < imagewidth ? imagewidth - w : 0);
-    for (row = 0; row < h; row += nrow) 
-    {
-        rowstoread = rowsperstrip - (row + img->row_offset) % rowsperstrip;    	
-        nrow = (row + rowstoread > h ? h - row : rowstoread);
-        offset_row = row + img->row_offset;
-    	if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 0),
-                                 r, ((row + img->row_offset)%rowsperstrip + nrow) * scanline) < 0 
-            && img->stoponerr)
-        {
-            ret = 0;
-            break;
-        }
-        if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 1),
-                                 g, ((row + img->row_offset)%rowsperstrip + nrow) * scanline) < 0 
-            && img->stoponerr)
-        {
-            ret = 0;
-            break;
-        }
-        if (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 2),
-                                 b, ((row + img->row_offset)%rowsperstrip + nrow) * scanline) < 0 
-            && img->stoponerr)
-        {
-            ret = 0;
-            break;
-        }
-        if (alpha &&
-            (TIFFReadEncodedStrip(tif, TIFFComputeStrip(tif, offset_row, 3),
-                                  a, ((row + img->row_offset)%rowsperstrip + nrow) * scanline) < 0 
-             && img->stoponerr))
-        {
-            ret = 0;
-            break;
-        }
-
-        pos = ((row + img->row_offset) % rowsperstrip) * scanline;
-        (*put)(img, raster+y*w, 0, y, w, nrow, fromskew, toskew, r + pos, g + pos, 
-               b + pos, a + pos);
-        y += (flip & FLIP_VERTICALLY ? -(int32) nrow : (int32) nrow);
-    }
-
-    if (flip & FLIP_HORIZONTALLY) {
-	    uint32 line;
-
-	    for (line = 0; line < h; line++) {
-		    uint32 *left = raster + (line * w);
-		    uint32 *right = left + w - 1;
-		    
-		    while ( left < right ) {
-			    uint32 temp = *left;
-			    *left = *right;
-			    *right = temp;
-			    left++, right--;
-		    }
-	    }
-    }
-
-    _TIFFfree(buf);
-    return (ret);
-}
-
-/*
- * The following routines move decoded data returned
- * from the TIFF library into rasters filled with packed
- * ABGR pixels (i.e. suitable for passing to lrecwrite.)
- *
- * The routines have been created according to the most
- * important cases and optimized.  pickTileContigCase and
- * pickTileSeparateCase analyze the parameters and select
- * the appropriate "put" routine to use.
- */
-#define	REPEAT8(op)	REPEAT4(op); REPEAT4(op)
-#define	REPEAT4(op)	REPEAT2(op); REPEAT2(op)
-#define	REPEAT2(op)	op; op
-#define	CASE8(x,op)			\
-    switch (x) {			\
-    case 7: op; case 6: op; case 5: op;	\
-    case 4: op; case 3: op; case 2: op;	\
-    case 1: op;				\
-    }
-#define	CASE4(x,op)	switch (x) { case 3: op; case 2: op; case 1: op; }
-#define	NOP
-
-#define	UNROLL8(w, op1, op2) {		\
-    uint32 _x;				\
-    for (_x = w; _x >= 8; _x -= 8) {	\
-	op1;				\
-	REPEAT8(op2);			\
-    }					\
-    if (_x > 0) {			\
-	op1;				\
-	CASE8(_x,op2);			\
-    }					\
-}
-#define	UNROLL4(w, op1, op2) {		\
-    uint32 _x;				\
-    for (_x = w; _x >= 4; _x -= 4) {	\
-	op1;				\
-	REPEAT4(op2);			\
-    }					\
-    if (_x > 0) {			\
-	op1;				\
-	CASE4(_x,op2);			\
-    }					\
-}
-#define	UNROLL2(w, op1, op2) {		\
-    uint32 _x;				\
-    for (_x = w; _x >= 2; _x -= 2) {	\
-	op1;				\
-	REPEAT2(op2);			\
-    }					\
-    if (_x) {				\
-	op1;				\
-	op2;				\
-    }					\
-}
-    
-#define	SKEW(r,g,b,skew)	{ r += skew; g += skew; b += skew; }
-#define	SKEW4(r,g,b,a,skew)	{ r += skew; g += skew; b += skew; a+= skew; }
-
-#define A1 ((uint32)(0xffL<<24))
-#define	PACK(r,g,b)	\
-	((uint32)(r)|((uint32)(g)<<8)|((uint32)(b)<<16)|A1)
-#define	PACK4(r,g,b,a)	\
-	((uint32)(r)|((uint32)(g)<<8)|((uint32)(b)<<16)|((uint32)(a)<<24))
-#define W2B(v) (((v)>>8)&0xff)
-#define	PACKW(r,g,b)	\
-	((uint32)W2B(r)|((uint32)W2B(g)<<8)|((uint32)W2B(b)<<16)|A1)
-#define	PACKW4(r,g,b,a)	\
-	((uint32)W2B(r)|((uint32)W2B(g)<<8)|((uint32)W2B(b)<<16)|((uint32)W2B(a)<<24))
-
-#define	DECLAREContigPutFunc(name) \
-static void name(\
-    TIFFRGBAImage* img, \
-    uint32* cp, \
-    uint32 x, uint32 y, \
-    uint32 w, uint32 h, \
-    int32 fromskew, int32 toskew, \
-    u_char* pp \
-)
-
-/*
- * 8-bit palette => colormap/RGB
- */
-DECLAREContigPutFunc(put8bitcmaptile)
-{
-    uint32** PALmap = img->PALmap;
-    int samplesperpixel = img->samplesperpixel;
-
-    (void) y;
-    while (h-- > 0) {
-	for (x = w; x-- > 0;)
-        {
-	    *cp++ = PALmap[*pp][0];
-            pp += samplesperpixel;
-        }
-	cp += toskew;
-	pp += fromskew;
-    }
-}
-
-/*
- * 4-bit palette => colormap/RGB
- */
-DECLAREContigPutFunc(put4bitcmaptile)
-{
-    uint32** PALmap = img->PALmap;
-
-    (void) x; (void) y;
-    fromskew /= 2;
-    while (h-- > 0) {
-	uint32* bw;
-	UNROLL2(w, bw = PALmap[*pp++], *cp++ = *bw++);
-	cp += toskew;
-	pp += fromskew;
-    }
-}
-
-/*
- * 2-bit palette => colormap/RGB
- */
-DECLAREContigPutFunc(put2bitcmaptile)
-{
-    uint32** PALmap = img->PALmap;
-
-    (void) x; (void) y;
-    fromskew /= 4;
-    while (h-- > 0) {
-	uint32* bw;
-	UNROLL4(w, bw = PALmap[*pp++], *cp++ = *bw++);
-	cp += toskew;
-	pp += fromskew;
-    }
-}
-
-/*
- * 1-bit palette => colormap/RGB
- */
-DECLAREContigPutFunc(put1bitcmaptile)
-{
-    uint32** PALmap = img->PALmap;
-
-    (void) x; (void) y;
-    fromskew /= 8;
-    while (h-- > 0) {
-	uint32* bw;
-	UNROLL8(w, bw = PALmap[*pp++], *cp++ = *bw++);
-	cp += toskew;
-	pp += fromskew;
-    }
-}
-
-/*
- * 8-bit greyscale => colormap/RGB
- */
-DECLAREContigPutFunc(putgreytile)
-{
-    int samplesperpixel = img->samplesperpixel;
-    uint32** BWmap = img->BWmap;
-
-    (void) y;
-    while (h-- > 0) {
-	for (x = w; x-- > 0;)
-        {
-	    *cp++ = BWmap[*pp][0];
-            pp += samplesperpixel;
-        }
-	cp += toskew;
-	pp += fromskew;
-    }
-}
-
-/*
- * 16-bit greyscale => colormap/RGB
- */
-DECLAREContigPutFunc(put16bitbwtile)
-{
-    int samplesperpixel = img->samplesperpixel;
-    uint32** BWmap = img->BWmap;
-
-    (void) y;
-    while (h-- > 0) {
-        uint16 *wp = (uint16 *) pp;
-
-	for (x = w; x-- > 0;)
-        {
-            /* use high order byte of 16bit value */
-
-	    *cp++ = BWmap[*wp >> 8][0];
-            pp += 2 * samplesperpixel;
-            wp += samplesperpixel;
-        }
-	cp += toskew;
-	pp += fromskew;
-    }
-}
-
-/*
- * 1-bit bilevel => colormap/RGB
- */
-DECLAREContigPutFunc(put1bitbwtile)
-{
-    uint32** BWmap = img->BWmap;
-
-    (void) x; (void) y;
-    fromskew /= 8;
-    while (h-- > 0) {
-	uint32* bw;
-	UNROLL8(w, bw = BWmap[*pp++], *cp++ = *bw++);
-	cp += toskew;
-	pp += fromskew;
-    }
-}
-
-/*
- * 2-bit greyscale => colormap/RGB
- */
-DECLAREContigPutFunc(put2bitbwtile)
-{
-    uint32** BWmap = img->BWmap;
-
-    (void) x; (void) y;
-    fromskew /= 4;
-    while (h-- > 0) {
-	uint32* bw;
-	UNROLL4(w, bw = BWmap[*pp++], *cp++ = *bw++);
-	cp += toskew;
-	pp += fromskew;
-    }
-}
-
-/*
- * 4-bit greyscale => colormap/RGB
- */
-DECLAREContigPutFunc(put4bitbwtile)
-{
-    uint32** BWmap = img->BWmap;
-
-    (void) x; (void) y;
-    fromskew /= 2;
-    while (h-- > 0) {
-	uint32* bw;
-	UNROLL2(w, bw = BWmap[*pp++], *cp++ = *bw++);
-	cp += toskew;
-	pp += fromskew;
-    }
-}
-
-/*
- * 8-bit packed samples, no Map => RGB
- */
-DECLAREContigPutFunc(putRGBcontig8bittile)
-{
-    int samplesperpixel = img->samplesperpixel;
-
-    (void) x; (void) y;
-    fromskew *= samplesperpixel;
-    while (h-- > 0) {
-	UNROLL8(w, NOP,
-	    *cp++ = PACK(pp[0], pp[1], pp[2]);
-	    pp += samplesperpixel);
-	cp += toskew;
-	pp += fromskew;
-    }
-}
-
-/*
- * 8-bit packed samples, w/ Map => RGB
- */
-DECLAREContigPutFunc(putRGBcontig8bitMaptile)
-{
-    TIFFRGBValue* Map = img->Map;
-    int samplesperpixel = img->samplesperpixel;
-
-    (void) y;
-    fromskew *= samplesperpixel;
-    while (h-- > 0) {
-	for (x = w; x-- > 0;) {
-	    *cp++ = PACK(Map[pp[0]], Map[pp[1]], Map[pp[2]]);
-	    pp += samplesperpixel;
-	}
-	pp += fromskew;
-	cp += toskew;
-    }
-}
-
-/*
- * 8-bit packed samples => RGBA w/ associated alpha
- * (known to have Map == NULL)
- */
-DECLAREContigPutFunc(putRGBAAcontig8bittile)
-{
-    int samplesperpixel = img->samplesperpixel;
-
-    (void) x; (void) y;
-    fromskew *= samplesperpixel;
-    while (h-- > 0) {
-	UNROLL8(w, NOP,
-	    *cp++ = PACK4(pp[0], pp[1], pp[2], pp[3]);
-	    pp += samplesperpixel);
-	cp += toskew;
-	pp += fromskew;
-    }
-}
-
-/*
- * 8-bit packed samples => RGBA w/ unassociated alpha
- * (known to have Map == NULL)
- */
-DECLAREContigPutFunc(putRGBUAcontig8bittile)
-{
-    int samplesperpixel = img->samplesperpixel;
-
-    (void) y;
-    fromskew *= samplesperpixel;
-    while (h-- > 0) {
-	uint32 r, g, b, a;
-	for (x = w; x-- > 0;) {
-	    a = pp[3];
-	    r = (pp[0] * a) / 255;
-	    g = (pp[1] * a) / 255;
-	    b = (pp[2] * a) / 255;
-	    *cp++ = PACK4(r,g,b,a);
-	    pp += samplesperpixel;
-	}
-	cp += toskew;
-	pp += fromskew;
-    }
-}
-
-/*
- * 16-bit packed samples => RGB
- */
-DECLAREContigPutFunc(putRGBcontig16bittile)
-{
-    int samplesperpixel = img->samplesperpixel;
-    uint16 *wp = (uint16 *)pp;
-
-    (void) y;
-    fromskew *= samplesperpixel;
-    while (h-- > 0) {
-	for (x = w; x-- > 0;) {
-	    *cp++ = PACKW(wp[0], wp[1], wp[2]);
-	    wp += samplesperpixel;
-	}
-	cp += toskew;
-	wp += fromskew;
-    }
-}
-
-/*
- * 16-bit packed samples => RGBA w/ associated alpha
- * (known to have Map == NULL)
- */
-DECLAREContigPutFunc(putRGBAAcontig16bittile)
-{
-    int samplesperpixel = img->samplesperpixel;
-    uint16 *wp = (uint16 *)pp;
-
-    (void) y;
-    fromskew *= samplesperpixel;
-    while (h-- > 0) {
-	for (x = w; x-- > 0;) {
-	    *cp++ = PACKW4(wp[0], wp[1], wp[2], wp[3]);
-	    wp += samplesperpixel;
-	}
-	cp += toskew;
-	wp += fromskew;
-    }
-}
-
-/*
- * 16-bit packed samples => RGBA w/ unassociated alpha
- * (known to have Map == NULL)
- */
-DECLAREContigPutFunc(putRGBUAcontig16bittile)
-{
-    int samplesperpixel = img->samplesperpixel;
-    uint16 *wp = (uint16 *)pp;
-
-    (void) y;
-    fromskew *= samplesperpixel;
-    while (h-- > 0) {
-	uint32 r,g,b,a;
-	/*
-	 * We shift alpha down four bits just in case unsigned
-	 * arithmetic doesn't handle the full range.
-	 * We still have plenty of accuracy, since the output is 8 bits.
-	 * So we have (r * 0xffff) * (a * 0xfff)) = r*a * (0xffff*0xfff)
-	 * Since we want r*a * 0xff for eight bit output,
-	 * we divide by (0xffff * 0xfff) / 0xff == 0x10eff.
-	 */
-	for (x = w; x-- > 0;) {
-	    a = wp[3] >> 4; 
-	    r = (wp[0] * a) / 0x10eff;
-	    g = (wp[1] * a) / 0x10eff;
-	    b = (wp[2] * a) / 0x10eff;
-	    *cp++ = PACK4(r,g,b,a);
-	    wp += samplesperpixel;
-	}
-	cp += toskew;
-	wp += fromskew;
-    }
-}
-
-/*
- * 8-bit packed CMYK samples w/o Map => RGB
- *
- * NB: The conversion of CMYK->RGB is *very* crude.
- */
-DECLAREContigPutFunc(putRGBcontig8bitCMYKtile)
-{
-    int samplesperpixel = img->samplesperpixel;
-    uint16 r, g, b, k;
-
-    (void) x; (void) y;
-    fromskew *= samplesperpixel;
-    while (h-- > 0) {
-	UNROLL8(w, NOP,
-	    k = 255 - pp[3];
-	    r = (k*(255-pp[0]))/255;
-	    g = (k*(255-pp[1]))/255;
-	    b = (k*(255-pp[2]))/255;
-	    *cp++ = PACK(r, g, b);
-	    pp += samplesperpixel);
-	cp += toskew;
-	pp += fromskew;
-    }
-}
-
-/*
- * 8-bit packed CMYK samples w/Map => RGB
- *
- * NB: The conversion of CMYK->RGB is *very* crude.
- */
-DECLAREContigPutFunc(putRGBcontig8bitCMYKMaptile)
-{
-    int samplesperpixel = img->samplesperpixel;
-    TIFFRGBValue* Map = img->Map;
-    uint16 r, g, b, k;
-
-    (void) y;
-    fromskew *= samplesperpixel;
-    while (h-- > 0) {
-	for (x = w; x-- > 0;) {
-	    k = 255 - pp[3];
-	    r = (k*(255-pp[0]))/255;
-	    g = (k*(255-pp[1]))/255;
-	    b = (k*(255-pp[2]))/255;
-	    *cp++ = PACK(Map[r], Map[g], Map[b]);
-	    pp += samplesperpixel;
-	}
-	pp += fromskew;
-	cp += toskew;
-    }
-}
-
-#define	DECLARESepPutFunc(name) \
-static void name(\
-    TIFFRGBAImage* img,\
-    uint32* cp,\
-    uint32 x, uint32 y, \
-    uint32 w, uint32 h,\
-    int32 fromskew, int32 toskew,\
-    u_char* r, u_char* g, u_char* b, u_char* a\
-)
-
-/*
- * 8-bit unpacked samples => RGB
- */
-DECLARESepPutFunc(putRGBseparate8bittile)
-{
-    (void) img; (void) x; (void) y; (void) a;
-    while (h-- > 0) {
-	UNROLL8(w, NOP, *cp++ = PACK(*r++, *g++, *b++));
-	SKEW(r, g, b, fromskew);
-	cp += toskew;
-    }
-}
-
-/*
- * 8-bit unpacked samples => RGB
- */
-DECLARESepPutFunc(putRGBseparate8bitMaptile)
-{
-    TIFFRGBValue* Map = img->Map;
-
-    (void) y; (void) a;
-    while (h-- > 0) {
-	for (x = w; x > 0; x--)
-	    *cp++ = PACK(Map[*r++], Map[*g++], Map[*b++]);
-	SKEW(r, g, b, fromskew);
-	cp += toskew;
-    }
-}
-
-/*
- * 8-bit unpacked samples => RGBA w/ associated alpha
- */
-DECLARESepPutFunc(putRGBAAseparate8bittile)
-{
-    (void) img; (void) x; (void) y;
-    while (h-- > 0) {
-	UNROLL8(w, NOP, *cp++ = PACK4(*r++, *g++, *b++, *a++));
-	SKEW4(r, g, b, a, fromskew);
-	cp += toskew;
-    }
-}
-
-/*
- * 8-bit unpacked samples => RGBA w/ unassociated alpha
- */
-DECLARESepPutFunc(putRGBUAseparate8bittile)
-{
-    (void) img; (void) y;
-    while (h-- > 0) {
-	uint32 rv, gv, bv, av;
-	for (x = w; x-- > 0;) {
-	    av = *a++;
-	    rv = (*r++ * av) / 255;
-	    gv = (*g++ * av) / 255;
-	    bv = (*b++ * av) / 255;
-	    *cp++ = PACK4(rv,gv,bv,av);
-	}
-	SKEW4(r, g, b, a, fromskew);
-	cp += toskew;
-    }
-}
-
-/*
- * 16-bit unpacked samples => RGB
- */
-DECLARESepPutFunc(putRGBseparate16bittile)
-{
-    uint16 *wr = (uint16*) r;
-    uint16 *wg = (uint16*) g;
-    uint16 *wb = (uint16*) b;
-
-    (void) img; (void) y; (void) a;
-    while (h-- > 0) {
-	for (x = 0; x < w; x++)
-	    *cp++ = PACKW(*wr++, *wg++, *wb++);
-	SKEW(wr, wg, wb, fromskew);
-	cp += toskew;
-    }
-}
-
-/*
- * 16-bit unpacked samples => RGBA w/ associated alpha
- */
-DECLARESepPutFunc(putRGBAAseparate16bittile)
-{
-    uint16 *wr = (uint16*) r;
-    uint16 *wg = (uint16*) g;
-    uint16 *wb = (uint16*) b;
-    uint16 *wa = (uint16*) a;
-
-    (void) img; (void) y;
-    while (h-- > 0) {
-	for (x = 0; x < w; x++)
-	    *cp++ = PACKW4(*wr++, *wg++, *wb++, *wa++);
-	SKEW4(wr, wg, wb, wa, fromskew);
-	cp += toskew;
-    }
-}
-
-/*
- * 16-bit unpacked samples => RGBA w/ unassociated alpha
- */
-DECLARESepPutFunc(putRGBUAseparate16bittile)
-{
-    uint16 *wr = (uint16*) r;
-    uint16 *wg = (uint16*) g;
-    uint16 *wb = (uint16*) b;
-    uint16 *wa = (uint16*) a;
-
-    (void) img; (void) y;
-    while (h-- > 0) {
-	uint32 r,g,b,a;
-	/*
-	 * We shift alpha down four bits just in case unsigned
-	 * arithmetic doesn't handle the full range.
-	 * We still have plenty of accuracy, since the output is 8 bits.
-	 * So we have (r * 0xffff) * (a * 0xfff)) = r*a * (0xffff*0xfff)
-	 * Since we want r*a * 0xff for eight bit output,
-	 * we divide by (0xffff * 0xfff) / 0xff == 0x10eff.
-	 */
-	for (x = w; x-- > 0;) {
-	    a = *wa++ >> 4; 
-	    r = (*wr++ * a) / 0x10eff;
-	    g = (*wg++ * a) / 0x10eff;
-	    b = (*wb++ * a) / 0x10eff;
-	    *cp++ = PACK4(r,g,b,a);
-	}
-	SKEW4(wr, wg, wb, wa, fromskew);
-	cp += toskew;
-    }
-}
-
-/*
- * 8-bit packed CIE L*a*b 1976 samples => RGB
- */
-DECLAREContigPutFunc(putcontig8bitCIELab)
-{
-	float X, Y, Z;
-	uint32 r, g, b;
-	(void) y;
-	fromskew *= 3;
-	while (h-- > 0) {
-		for (x = w; x-- > 0;) {
-			TIFFCIELabToXYZ(img->cielab,
-					(u_char)pp[0],
-					(signed char)pp[1],
-					(signed char)pp[2],
-					&X, &Y, &Z);
-			TIFFXYZToRGB(img->cielab, X, Y, Z, &r, &g, &b);
-			*cp++ = PACK(r, g, b);
-			pp += 3;
-		}
-		cp += toskew;
-		pp += fromskew;
-	}
-}
-
-/*
- * YCbCr -> RGB conversion and packing routines.
- */
-
-#define	YCbCrtoRGB(dst, Y) {						\
-	uint32 r, g, b;							\
-	TIFFYCbCrtoRGB(img->ycbcr, (Y), Cb, Cr, &r, &g, &b);		\
-	dst = PACK(r, g, b);						\
-}
-
-/*
- * 8-bit packed YCbCr samples => RGB 
- * This function is generic for different sampling sizes, 
- * and can handle blocks sizes that aren't multiples of the
- * sampling size.  However, it is substantially less optimized
- * than the specific sampling cases.  It is used as a fallback
- * for difficult blocks.
- */
-#ifdef notdef
-static void putcontig8bitYCbCrGenericTile( 
-    TIFFRGBAImage* img, 
-    uint32* cp, 
-    uint32 x, uint32 y, 
-    uint32 w, uint32 h, 
-    int32 fromskew, int32 toskew, 
-    u_char* pp,
-    int h_group, 
-    int v_group )
-
-{
-    uint32* cp1 = cp+w+toskew;
-    uint32* cp2 = cp1+w+toskew;
-    uint32* cp3 = cp2+w+toskew;
-    int32 incr = 3*w+4*toskew;
-    int32   Cb, Cr;
-    int     group_size = v_group * h_group + 2;
-
-    (void) y;
-    fromskew = (fromskew * group_size) / h_group;
-
-    for( yy = 0; yy < h; yy++ )
-    {
-        u_char *pp_line;
-        int     y_line_group = yy / v_group;
-        int     y_remainder = yy - y_line_group * v_group;
-
-        pp_line = pp + v_line_group * 
-
-        
-        for( xx = 0; xx < w; xx++ )
-        {
-            Cb = pp
-        }
-    }
-    for (; h >= 4; h -= 4) {
-	x = w>>2;
-	do {
-	    Cb = pp[16];
-	    Cr = pp[17];
-
-	    YCbCrtoRGB(cp [0], pp[ 0]);
-	    YCbCrtoRGB(cp [1], pp[ 1]);
-	    YCbCrtoRGB(cp [2], pp[ 2]);
-	    YCbCrtoRGB(cp [3], pp[ 3]);
-	    YCbCrtoRGB(cp1[0], pp[ 4]);
-	    YCbCrtoRGB(cp1[1], pp[ 5]);
-	    YCbCrtoRGB(cp1[2], pp[ 6]);
-	    YCbCrtoRGB(cp1[3], pp[ 7]);
-	    YCbCrtoRGB(cp2[0], pp[ 8]);
-	    YCbCrtoRGB(cp2[1], pp[ 9]);
-	    YCbCrtoRGB(cp2[2], pp[10]);
-	    YCbCrtoRGB(cp2[3], pp[11]);
-	    YCbCrtoRGB(cp3[0], pp[12]);
-	    YCbCrtoRGB(cp3[1], pp[13]);
-	    YCbCrtoRGB(cp3[2], pp[14]);
-	    YCbCrtoRGB(cp3[3], pp[15]);
-
-	    cp += 4, cp1 += 4, cp2 += 4, cp3 += 4;
-	    pp += 18;
-	} while (--x);
-	cp += incr, cp1 += incr, cp2 += incr, cp3 += incr;
-	pp += fromskew;
-    }
-}
-#endif
-
-/*
- * 8-bit packed YCbCr samples w/ 4,4 subsampling => RGB
- */
-DECLAREContigPutFunc(putcontig8bitYCbCr44tile)
-{
-    uint32* cp1 = cp+w+toskew;
-    uint32* cp2 = cp1+w+toskew;
-    uint32* cp3 = cp2+w+toskew;
-    int32 incr = 3*w+4*toskew;
-
-    (void) y;
-    /* adjust fromskew */
-    fromskew = (fromskew * 18) / 4;
-    if ((h & 3) == 0 && (w & 3) == 0) {				        
-        for (; h >= 4; h -= 4) {
-            x = w>>2;
-            do {
-                int32 Cb = pp[16];
-                int32 Cr = pp[17];
-
-                YCbCrtoRGB(cp [0], pp[ 0]);
-                YCbCrtoRGB(cp [1], pp[ 1]);
-                YCbCrtoRGB(cp [2], pp[ 2]);
-                YCbCrtoRGB(cp [3], pp[ 3]);
-                YCbCrtoRGB(cp1[0], pp[ 4]);
-                YCbCrtoRGB(cp1[1], pp[ 5]);
-                YCbCrtoRGB(cp1[2], pp[ 6]);
-                YCbCrtoRGB(cp1[3], pp[ 7]);
-                YCbCrtoRGB(cp2[0], pp[ 8]);
-                YCbCrtoRGB(cp2[1], pp[ 9]);
-                YCbCrtoRGB(cp2[2], pp[10]);
-                YCbCrtoRGB(cp2[3], pp[11]);
-                YCbCrtoRGB(cp3[0], pp[12]);
-                YCbCrtoRGB(cp3[1], pp[13]);
-                YCbCrtoRGB(cp3[2], pp[14]);
-                YCbCrtoRGB(cp3[3], pp[15]);
-
-                cp += 4, cp1 += 4, cp2 += 4, cp3 += 4;
-                pp += 18;
-            } while (--x);
-            cp += incr, cp1 += incr, cp2 += incr, cp3 += incr;
-            pp += fromskew;
-        }
-    } else {
-        while (h > 0) {
-            for (x = w; x > 0;) {
-                int32 Cb = pp[16];
-                int32 Cr = pp[17];
-                switch (x) {
-                default:
-                    switch (h) {
-                    default: YCbCrtoRGB(cp3[3], pp[15]); /* FALLTHROUGH */
-                    case 3:  YCbCrtoRGB(cp2[3], pp[11]); /* FALLTHROUGH */
-                    case 2:  YCbCrtoRGB(cp1[3], pp[ 7]); /* FALLTHROUGH */
-                    case 1:  YCbCrtoRGB(cp [3], pp[ 3]); /* FALLTHROUGH */
-                    }                                    /* FALLTHROUGH */
-                case 3:
-                    switch (h) {
-                    default: YCbCrtoRGB(cp3[2], pp[14]); /* FALLTHROUGH */
-                    case 3:  YCbCrtoRGB(cp2[2], pp[10]); /* FALLTHROUGH */
-                    case 2:  YCbCrtoRGB(cp1[2], pp[ 6]); /* FALLTHROUGH */
-                    case 1:  YCbCrtoRGB(cp [2], pp[ 2]); /* FALLTHROUGH */
-                    }                                    /* FALLTHROUGH */
-                case 2:
-                    switch (h) {
-                    default: YCbCrtoRGB(cp3[1], pp[13]); /* FALLTHROUGH */
-                    case 3:  YCbCrtoRGB(cp2[1], pp[ 9]); /* FALLTHROUGH */
-                    case 2:  YCbCrtoRGB(cp1[1], pp[ 5]); /* FALLTHROUGH */
-                    case 1:  YCbCrtoRGB(cp [1], pp[ 1]); /* FALLTHROUGH */
-                    }                                    /* FALLTHROUGH */
-                case 1:
-                    switch (h) {
-                    default: YCbCrtoRGB(cp3[0], pp[12]); /* FALLTHROUGH */
-                    case 3:  YCbCrtoRGB(cp2[0], pp[ 8]); /* FALLTHROUGH */
-                    case 2:  YCbCrtoRGB(cp1[0], pp[ 4]); /* FALLTHROUGH */
-                    case 1:  YCbCrtoRGB(cp [0], pp[ 0]); /* FALLTHROUGH */
-                    }                                    /* FALLTHROUGH */
-                }
-                if (x < 4) {
-                    cp += x; cp1 += x; cp2 += x; cp3 += x;
-                    x = 0;
-                }
-                else {
-                    cp += 4; cp1 += 4; cp2 += 4; cp3 += 4;
-                    x -= 4;
-                }
-                pp += 18;
-            }
-            if (h <= 4)
-                break;
-            h -= 4;
-            cp += incr, cp1 += incr, cp2 += incr, cp3 += incr;
-            pp += fromskew;
-        }
-    }
-}
-
-/*
- * 8-bit packed YCbCr samples w/ 4,2 subsampling => RGB
- */
-DECLAREContigPutFunc(putcontig8bitYCbCr42tile)
-{
-    uint32* cp1 = cp+w+toskew;
-    int32 incr = 2*toskew+w;
-
-    (void) y;
-    fromskew = (fromskew * 10) / 4;
-    if ((h & 3) == 0 && (w & 1) == 0) {
-        for (; h >= 2; h -= 2) {
-            x = w>>2;
-            do {
-                int32 Cb = pp[8];
-                int32 Cr = pp[9];
-                
-                YCbCrtoRGB(cp [0], pp[0]);
-                YCbCrtoRGB(cp [1], pp[1]);
-                YCbCrtoRGB(cp [2], pp[2]);
-                YCbCrtoRGB(cp [3], pp[3]);
-                YCbCrtoRGB(cp1[0], pp[4]);
-                YCbCrtoRGB(cp1[1], pp[5]);
-                YCbCrtoRGB(cp1[2], pp[6]);
-                YCbCrtoRGB(cp1[3], pp[7]);
-                
-                cp += 4, cp1 += 4;
-                pp += 10;
-            } while (--x);
-            cp += incr, cp1 += incr;
-            pp += fromskew;
-        }
-    } else {
-        while (h > 0) {
-            for (x = w; x > 0;) {
-                int32 Cb = pp[8];
-                int32 Cr = pp[9];
-                switch (x) {
-                default:
-                    switch (h) {
-                    default: YCbCrtoRGB(cp1[3], pp[ 7]); /* FALLTHROUGH */
-                    case 1:  YCbCrtoRGB(cp [3], pp[ 3]); /* FALLTHROUGH */
-                    }                                    /* FALLTHROUGH */
-                case 3:
-                    switch (h) {
-                    default: YCbCrtoRGB(cp1[2], pp[ 6]); /* FALLTHROUGH */
-                    case 1:  YCbCrtoRGB(cp [2], pp[ 2]); /* FALLTHROUGH */
-                    }                                    /* FALLTHROUGH */
-                case 2:
-                    switch (h) {
-                    default: YCbCrtoRGB(cp1[1], pp[ 5]); /* FALLTHROUGH */
-                    case 1:  YCbCrtoRGB(cp [1], pp[ 1]); /* FALLTHROUGH */
-                    }                                    /* FALLTHROUGH */
-                case 1:
-                    switch (h) {
-                    default: YCbCrtoRGB(cp1[0], pp[ 4]); /* FALLTHROUGH */
-                    case 1:  YCbCrtoRGB(cp [0], pp[ 0]); /* FALLTHROUGH */
-                    }                                    /* FALLTHROUGH */
-                }
-                if (x < 4) {
-                    cp += x; cp1 += x;
-                    x = 0;
-                }
-                else {
-                    cp += 4; cp1 += 4;
-                    x -= 4;
-                }
-                pp += 10;
-            }
-            if (h <= 2)
-                break;
-            h -= 2;
-            cp += incr, cp1 += incr;
-            pp += fromskew;
-        }
-    }
-}
-
-/*
- * 8-bit packed YCbCr samples w/ 4,1 subsampling => RGB
- */
-DECLAREContigPutFunc(putcontig8bitYCbCr41tile)
-{
-    (void) y;
-    /* XXX adjust fromskew */
-    do {
-	x = w>>2;
-	do {
-	    int32 Cb = pp[4];
-	    int32 Cr = pp[5];
-
-	    YCbCrtoRGB(cp [0], pp[0]);
-	    YCbCrtoRGB(cp [1], pp[1]);
-	    YCbCrtoRGB(cp [2], pp[2]);
-	    YCbCrtoRGB(cp [3], pp[3]);
-
-	    cp += 4;
-	    pp += 6;
-	} while (--x);
-
-        if( (w&3) != 0 )
-        {
-	    int32 Cb = pp[4];
-	    int32 Cr = pp[5];
-
-            switch( (w&3) ) {
-              case 3: YCbCrtoRGB(cp [2], pp[2]);
-              case 2: YCbCrtoRGB(cp [1], pp[1]);
-              case 1: YCbCrtoRGB(cp [0], pp[0]);
-              case 0: break;
-            }
-
-            cp += (w&3);
-            pp += 6;
-        }
-
-	cp += toskew;
-	pp += fromskew;
-    } while (--h);
-
-}
-
-/*
- * 8-bit packed YCbCr samples w/ 2,2 subsampling => RGB
- */
-DECLAREContigPutFunc(putcontig8bitYCbCr22tile)
-{
-    uint32* cp1 = cp+w+toskew;
-    int32 incr = 2*toskew+w;
-
-    (void) y;
-    fromskew = (fromskew * 6) / 2;
-    if ((h & 1) == 0 && (w & 1) == 0) {
-        for (; h >= 2; h -= 2) {
-            x = w>>1;
-            do {
-                int32 Cb = pp[4];
-                int32 Cr = pp[5];
-
-                YCbCrtoRGB(cp [0], pp[0]);
-                YCbCrtoRGB(cp [1], pp[1]);
-                YCbCrtoRGB(cp1[0], pp[2]);
-                YCbCrtoRGB(cp1[1], pp[3]);
-
-                cp += 2, cp1 += 2;
-                pp += 6;
-            } while (--x);
-            cp += incr, cp1 += incr;
-            pp += fromskew;
-        }
-    } else {
-        while (h > 0) {
-            for (x = w; x > 0;) {
-                int32 Cb = pp[4];
-                int32 Cr = pp[5];
-                switch (x) {
-                default:
-                    switch (h) {
-                    default: YCbCrtoRGB(cp1[1], pp[ 3]); /* FALLTHROUGH */
-                    case 1:  YCbCrtoRGB(cp [1], pp[ 1]); /* FALLTHROUGH */
-                    }                                    /* FALLTHROUGH */
-                case 1:
-                    switch (h) {
-                    default: YCbCrtoRGB(cp1[0], pp[ 2]); /* FALLTHROUGH */
-                    case 1:  YCbCrtoRGB(cp [0], pp[ 0]); /* FALLTHROUGH */
-                    }                                    /* FALLTHROUGH */
-                }
-                if (x < 2) {
-                    cp += x; cp1 += x;
-                    x = 0;
-                }
-                else {
-                    cp += 2; cp1 += 2;
-                    x -= 2;
-                }
-                pp += 6;
-            }
-            if (h <= 2)
-                break;
-            h -= 2;
-            cp += incr, cp1 += incr;
-            pp += fromskew;
-        }
-    }
-}
-
-/*
- * 8-bit packed YCbCr samples w/ 2,1 subsampling => RGB
- */
-DECLAREContigPutFunc(putcontig8bitYCbCr21tile)
-{
-    (void) y;
-    fromskew = (fromskew * 4) / 2;
-    do {
-	x = w>>1;
-	do {
-	    int32 Cb = pp[2];
-	    int32 Cr = pp[3];
-
-	    YCbCrtoRGB(cp[0], pp[0]); 
-	    YCbCrtoRGB(cp[1], pp[1]);
-
-	    cp += 2;
-	    pp += 4;
-	} while (--x);
-
-        if( (w&1) != 0 )
-        {
-	    int32 Cb = pp[2];
-	    int32 Cr = pp[3];
-            
-            YCbCrtoRGB(cp [0], pp[0]);
-
-	    cp += 1;
-	    pp += 4;
-        }
-
-	cp += toskew;
-	pp += fromskew;
-    } while (--h);
-}
-
-/*
- * 8-bit packed YCbCr samples w/ no subsampling => RGB
- */
-DECLAREContigPutFunc(putcontig8bitYCbCr11tile)
-{
-    (void) y;
-    fromskew *= 3;
-    do {
-        x = w; /* was x = w>>1; patched 2000/09/25 warmerda at home.com */ 
-	do {
-	    int32 Cb = pp[1];
-	    int32 Cr = pp[2];
-
-	    YCbCrtoRGB(*cp++, pp[0]);
-
-	    pp += 3;
-	} while (--x);
-	cp += toskew;
-	pp += fromskew;
-    } while (--h);
-}
-#undef	YCbCrtoRGB
-
-static tileContigRoutine
-initYCbCrConversion(TIFFRGBAImage* img)
-{
-	static char module[] = "initCIELabConversion";
-
-	float *luma, *refBlackWhite;
-	uint16 hs, vs;
-
-	if (img->ycbcr == NULL) {
-	    img->ycbcr = (TIFFYCbCrToRGB*) _TIFFmalloc(
-		    TIFFroundup(sizeof (TIFFYCbCrToRGB), sizeof (long))
-		    + 4*256*sizeof (TIFFRGBValue)
-		    + 2*256*sizeof (int)
-		    + 3*256*sizeof (int32)
-	    );
-	    if (img->ycbcr == NULL) {
-		    TIFFError(module,
-			      "No space for YCbCr->RGB conversion state");
-		    return (NULL);
-	    }
-	}
-
-	TIFFGetFieldDefaulted(img->tif, TIFFTAG_YCBCRCOEFFICIENTS, &luma);
-	TIFFGetFieldDefaulted(img->tif, TIFFTAG_REFERENCEBLACKWHITE,
-			      &refBlackWhite);
-	if (TIFFYCbCrToRGBInit(img->ycbcr, luma, refBlackWhite) < 0)
-		return NULL;
-
-	/*
-	 * The 6.0 spec says that subsampling must be
-	 * one of 1, 2, or 4, and that vertical subsampling
-	 * must always be <= horizontal subsampling; so
-	 * there are only a few possibilities and we just
-	 * enumerate the cases.
-	 */
-	TIFFGetFieldDefaulted(img->tif, TIFFTAG_YCBCRSUBSAMPLING, &hs, &vs);
-	switch ((hs<<4)|vs) {
-		case 0x44: return (putcontig8bitYCbCr44tile);
-		case 0x42: return (putcontig8bitYCbCr42tile);
-		case 0x41: return (putcontig8bitYCbCr41tile);
-		case 0x22: return (putcontig8bitYCbCr22tile);
-		case 0x21: return (putcontig8bitYCbCr21tile);
-		case 0x11: return (putcontig8bitYCbCr11tile);
-	}
-
-	return (NULL);
-}
-
-static tileContigRoutine
-initCIELabConversion(TIFFRGBAImage* img)
-{
-	static char module[] = "initCIELabConversion";
-
-	float   *whitePoint;
-	float   refWhite[3];
-
-	if (!img->cielab) {
-		img->cielab = (TIFFCIELabToRGB *)
-			_TIFFmalloc(sizeof(TIFFCIELabToRGB));
-		if (!img->cielab) {
-			TIFFError(module,
-			    "No space for CIE L*a*b*->RGB conversion state.");
-			return NULL;
-		}
-	}
-
-	TIFFGetFieldDefaulted(img->tif, TIFFTAG_WHITEPOINT, &whitePoint);
-	refWhite[1] = 100.0F;
-	refWhite[0] = whitePoint[0] / whitePoint[1] * refWhite[1];
-	refWhite[2] = (1.0F - whitePoint[0] - whitePoint[1])
-		      / whitePoint[1] * refWhite[1];
-	if (TIFFCIELabToRGBInit(img->cielab, &display_sRGB, refWhite) < 0) {
-		TIFFError(module,
-		    "Failed to initialize CIE L*a*b*->RGB conversion state.");
-		_TIFFfree(img->cielab);
-		return NULL;
-	}
-
-	return putcontig8bitCIELab;
-}
-
-/*
- * Greyscale images with less than 8 bits/sample are handled
- * with a table to avoid lots of shifts and masks.  The table
- * is setup so that put*bwtile (below) can retrieve 8/bitspersample
- * pixel values simply by indexing into the table with one
- * number.
- */
-static int
-makebwmap(TIFFRGBAImage* img)
-{
-    TIFFRGBValue* Map = img->Map;
-    int bitspersample = img->bitspersample;
-    int nsamples = 8 / bitspersample;
-    int i;
-    uint32* p;
-
-    if( nsamples == 0 )
-        nsamples = 1;
-
-    img->BWmap = (uint32**) _TIFFmalloc(
-	256*sizeof (uint32 *)+(256*nsamples*sizeof(uint32)));
-    if (img->BWmap == NULL) {
-	TIFFError(TIFFFileName(img->tif), "No space for B&W mapping table");
-	return (0);
-    }
-    p = (uint32*)(img->BWmap + 256);
-    for (i = 0; i < 256; i++) {
-	TIFFRGBValue c;
-	img->BWmap[i] = p;
-	switch (bitspersample) {
-#define	GREY(x)	c = Map[x]; *p++ = PACK(c,c,c);
-	case 1:
-	    GREY(i>>7);
-	    GREY((i>>6)&1);
-	    GREY((i>>5)&1);
-	    GREY((i>>4)&1);
-	    GREY((i>>3)&1);
-	    GREY((i>>2)&1);
-	    GREY((i>>1)&1);
-	    GREY(i&1);
-	    break;
-	case 2:
-	    GREY(i>>6);
-	    GREY((i>>4)&3);
-	    GREY((i>>2)&3);
-	    GREY(i&3);
-	    break;
-	case 4:
-	    GREY(i>>4);
-	    GREY(i&0xf);
-	    break;
-	case 8:
-        case 16:
-	    GREY(i);
-	    break;
-	}
-#undef	GREY
-    }
-    return (1);
-}
-
-/*
- * Construct a mapping table to convert from the range
- * of the data samples to [0,255] --for display.  This
- * process also handles inverting B&W images when needed.
- */ 
-static int
-setupMap(TIFFRGBAImage* img)
-{
-    int32 x, range;
-
-    range = (int32)((1L<<img->bitspersample)-1);
-    
-    /* treat 16 bit the same as eight bit */
-    if( img->bitspersample == 16 )
-        range = (int32) 255;
-
-    img->Map = (TIFFRGBValue*) _TIFFmalloc((range+1) * sizeof (TIFFRGBValue));
-    if (img->Map == NULL) {
-	TIFFError(TIFFFileName(img->tif),
-	    "No space for photometric conversion table");
-	return (0);
-    }
-    if (img->photometric == PHOTOMETRIC_MINISWHITE) {
-	for (x = 0; x <= range; x++)
-	    img->Map[x] = (TIFFRGBValue) (((range - x) * 255) / range);
-    } else {
-	for (x = 0; x <= range; x++)
-	    img->Map[x] = (TIFFRGBValue) ((x * 255) / range);
-    }
-    if (img->bitspersample <= 16 &&
-	(img->photometric == PHOTOMETRIC_MINISBLACK ||
-	 img->photometric == PHOTOMETRIC_MINISWHITE)) {
-	/*
-	 * Use photometric mapping table to construct
-	 * unpacking tables for samples <= 8 bits.
-	 */
-	if (!makebwmap(img))
-	    return (0);
-	/* no longer need Map, free it */
-	_TIFFfree(img->Map), img->Map = NULL;
-    }
-    return (1);
-}
-
-static int
-checkcmap(TIFFRGBAImage* img)
-{
-    uint16* r = img->redcmap;
-    uint16* g = img->greencmap;
-    uint16* b = img->bluecmap;
-    long n = 1L<<img->bitspersample;
-
-    while (n-- > 0)
-	if (*r++ >= 256 || *g++ >= 256 || *b++ >= 256)
-	    return (16);
-    return (8);
-}
-
-static void
-cvtcmap(TIFFRGBAImage* img)
-{
-    uint16* r = img->redcmap;
-    uint16* g = img->greencmap;
-    uint16* b = img->bluecmap;
-    long i;
-
-    for (i = (1L<<img->bitspersample)-1; i >= 0; i--) {
-#define	CVT(x)		((uint16)((x)>>8))
-	r[i] = CVT(r[i]);
-	g[i] = CVT(g[i]);
-	b[i] = CVT(b[i]);
-#undef	CVT
-    }
-}
-
-/*
- * Palette images with <= 8 bits/sample are handled
- * with a table to avoid lots of shifts and masks.  The table
- * is setup so that put*cmaptile (below) can retrieve 8/bitspersample
- * pixel values simply by indexing into the table with one
- * number.
- */
-static int
-makecmap(TIFFRGBAImage* img)
-{
-    int bitspersample = img->bitspersample;
-    int nsamples = 8 / bitspersample;
-    uint16* r = img->redcmap;
-    uint16* g = img->greencmap;
-    uint16* b = img->bluecmap;
-    uint32 *p;
-    int i;
-
-    img->PALmap = (uint32**) _TIFFmalloc(
-	256*sizeof (uint32 *)+(256*nsamples*sizeof(uint32)));
-    if (img->PALmap == NULL) {
-	TIFFError(TIFFFileName(img->tif), "No space for Palette mapping table");
-	return (0);
-    }
-    p = (uint32*)(img->PALmap + 256);
-    for (i = 0; i < 256; i++) {
-	TIFFRGBValue c;
-	img->PALmap[i] = p;
-#define	CMAP(x)	c = (TIFFRGBValue) x; *p++ = PACK(r[c]&0xff, g[c]&0xff, b[c]&0xff);
-	switch (bitspersample) {
-	case 1:
-	    CMAP(i>>7);
-	    CMAP((i>>6)&1);
-	    CMAP((i>>5)&1);
-	    CMAP((i>>4)&1);
-	    CMAP((i>>3)&1);
-	    CMAP((i>>2)&1);
-	    CMAP((i>>1)&1);
-	    CMAP(i&1);
-	    break;
-	case 2:
-	    CMAP(i>>6);
-	    CMAP((i>>4)&3);
-	    CMAP((i>>2)&3);
-	    CMAP(i&3);
-	    break;
-	case 4:
-	    CMAP(i>>4);
-	    CMAP(i&0xf);
-	    break;
-	case 8:
-	    CMAP(i);
-	    break;
-	}
-#undef CMAP
-    }
-    return (1);
-}
-
-/* 
- * Construct any mapping table used
- * by the associated put routine.
- */
-static int
-buildMap(TIFFRGBAImage* img)
-{
-    switch (img->photometric) {
-    case PHOTOMETRIC_RGB:
-    case PHOTOMETRIC_YCBCR:
-    case PHOTOMETRIC_SEPARATED:
-	if (img->bitspersample == 8)
-	    break;
-	/* fall thru... */
-    case PHOTOMETRIC_MINISBLACK:
-    case PHOTOMETRIC_MINISWHITE:
-	if (!setupMap(img))
-	    return (0);
-	break;
-    case PHOTOMETRIC_PALETTE:
-	/*
-	 * Convert 16-bit colormap to 8-bit (unless it looks
-	 * like an old-style 8-bit colormap).
-	 */
-	if (checkcmap(img) == 16)
-	    cvtcmap(img);
-	else
-	    TIFFWarning(TIFFFileName(img->tif), "Assuming 8-bit colormap");
-	/*
-	 * Use mapping table and colormap to construct
-	 * unpacking tables for samples < 8 bits.
-	 */
-	if (img->bitspersample <= 8 && !makecmap(img))
-	    return (0);
-	break;
-    }
-    return (1);
-}
-
-/*
- * Select the appropriate conversion routine for packed data.
- */
-static int
-pickTileContigCase(TIFFRGBAImage* img)
-{
-    tileContigRoutine put = 0;
-
-    if (buildMap(img)) {
-	switch (img->photometric) {
-	case PHOTOMETRIC_RGB:
-	    switch (img->bitspersample) {
-	    case 8:
-		if (!img->Map) {
-		    if (img->alpha == EXTRASAMPLE_ASSOCALPHA)
-			put = putRGBAAcontig8bittile;
-		    else if (img->alpha == EXTRASAMPLE_UNASSALPHA)
-			put = putRGBUAcontig8bittile;
-		    else
-			put = putRGBcontig8bittile;
-		} else
-		    put = putRGBcontig8bitMaptile;
-		break;
-	    case 16:
-		put = putRGBcontig16bittile;
-		if (!img->Map) {
-		    if (img->alpha == EXTRASAMPLE_ASSOCALPHA)
-			put = putRGBAAcontig16bittile;
-		    else if (img->alpha == EXTRASAMPLE_UNASSALPHA)
-			put = putRGBUAcontig16bittile;
-		}
-		break;
-	    }
-	    break;
-	case PHOTOMETRIC_SEPARATED:
-	    if (img->bitspersample == 8) {
-		if (!img->Map)
-		    put = putRGBcontig8bitCMYKtile;
-		else
-		    put = putRGBcontig8bitCMYKMaptile;
-	    }
-	    break;
-	case PHOTOMETRIC_PALETTE:
-	    switch (img->bitspersample) {
-	    case 8:	put = put8bitcmaptile; break;
-	    case 4: put = put4bitcmaptile; break;
-	    case 2: put = put2bitcmaptile; break;
-	    case 1: put = put1bitcmaptile; break;
-	    }
-	    break;
-	case PHOTOMETRIC_MINISWHITE:
-	case PHOTOMETRIC_MINISBLACK:
-	    switch (img->bitspersample) {
-            case 16: put = put16bitbwtile; break;
-	    case 8:  put = putgreytile; break;
-	    case 4:  put = put4bitbwtile; break;
-	    case 2:  put = put2bitbwtile; break;
-	    case 1:  put = put1bitbwtile; break;
-	    }
-	    break;
-	case PHOTOMETRIC_YCBCR:
-	    if (img->bitspersample == 8)
-		put = initYCbCrConversion(img);
-	    break;
-	case PHOTOMETRIC_CIELAB:
-	    if (img->bitspersample == 8)
-		put = initCIELabConversion(img);
-	    break;
-	}
-    }
-    return ((img->put.contig = put) != 0);
-}
-
-/*
- * Select the appropriate conversion routine for unpacked data.
- *
- * NB: we assume that unpacked single channel data is directed
- *	 to the "packed routines.
- */
-static int
-pickTileSeparateCase(TIFFRGBAImage* img)
-{
-    tileSeparateRoutine put = 0;
-
-    if (buildMap(img)) {
-	switch (img->photometric) {
-	case PHOTOMETRIC_RGB:
-	    switch (img->bitspersample) {
-	    case 8:
-		if (!img->Map) {
-		    if (img->alpha == EXTRASAMPLE_ASSOCALPHA)
-			put = putRGBAAseparate8bittile;
-		    else if (img->alpha == EXTRASAMPLE_UNASSALPHA)
-			put = putRGBUAseparate8bittile;
-		    else
-			put = putRGBseparate8bittile;
-		} else
-		    put = putRGBseparate8bitMaptile;
-		break;
-	    case 16:
-		put = putRGBseparate16bittile;
-		if (!img->Map) {
-		    if (img->alpha == EXTRASAMPLE_ASSOCALPHA)
-			put = putRGBAAseparate16bittile;
-		    else if (img->alpha == EXTRASAMPLE_UNASSALPHA)
-			put = putRGBUAseparate16bittile;
-		}
-		break;
-	    }
-	    break;
-	}
-    }
-    return ((img->put.separate = put) != 0);
-}
-
-/*
- * Read a whole strip off data from the file, and convert to RGBA form.
- * If this is the last strip, then it will only contain the portion of
- * the strip that is actually within the image space.  The result is
- * organized in bottom to top form.
- */
-
-
-int
-TIFFReadRGBAStrip(TIFF* tif, uint32 row, uint32 * raster )
-
-{
-    char 	emsg[1024];
-    TIFFRGBAImage img;
-    int 	ok;
-    uint32	rowsperstrip, rows_to_read;
-
-    if( TIFFIsTiled( tif ) )
-    {
-        TIFFError(TIFFFileName(tif),
-                  "Can't use TIFFReadRGBAStrip() with tiled file.");
-	return (0);
-    }
-    
-    TIFFGetFieldDefaulted(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip);
-    if( (row % rowsperstrip) != 0 )
-    {
-        TIFFError(TIFFFileName(tif),
-                "Row passed to TIFFReadRGBAStrip() must be first in a strip.");
-	return (0);
-    }
-
-    if (TIFFRGBAImageOK(tif, emsg) && TIFFRGBAImageBegin(&img, tif, 0, emsg)) {
-
-        img.row_offset = row;
-        img.col_offset = 0;
-
-        if( row + rowsperstrip > img.height )
-            rows_to_read = img.height - row;
-        else
-            rows_to_read = rowsperstrip;
-        
-	ok = TIFFRGBAImageGet(&img, raster, img.width, rows_to_read );
-        
-	TIFFRGBAImageEnd(&img);
-    } else {
-	TIFFError(TIFFFileName(tif), emsg);
-	ok = 0;
-    }
-    
-    return (ok);
-}
-
-/*
- * Read a whole tile off data from the file, and convert to RGBA form.
- * The returned RGBA data is organized from bottom to top of tile,
- * and may include zeroed areas if the tile extends off the image.
- */
-
-int
-TIFFReadRGBATile(TIFF* tif, uint32 col, uint32 row, uint32 * raster)
-
-{
-    char 	emsg[1024];
-    TIFFRGBAImage img;
-    int 	ok;
-    uint32	tile_xsize, tile_ysize;
-    uint32	read_xsize, read_ysize;
-    uint32	i_row;
-
-    /*
-     * Verify that our request is legal - on a tile file, and on a
-     * tile boundary.
-     */
-    
-    if( !TIFFIsTiled( tif ) )
-    {
-        TIFFError(TIFFFileName(tif),
-                  "Can't use TIFFReadRGBATile() with stripped file.");
-	return (0);
-    }
-    
-    TIFFGetFieldDefaulted(tif, TIFFTAG_TILEWIDTH, &tile_xsize);
-    TIFFGetFieldDefaulted(tif, TIFFTAG_TILELENGTH, &tile_ysize);
-    if( (col % tile_xsize) != 0 || (row % tile_ysize) != 0 )
-    {
-        TIFFError(TIFFFileName(tif),
-                  "Row/col passed to TIFFReadRGBATile() must be top"
-                  "left corner of a tile.");
-	return (0);
-    }
-
-    /*
-     * Setup the RGBA reader.
-     */
-    
-    if (!TIFFRGBAImageOK(tif, emsg) 
-	|| !TIFFRGBAImageBegin(&img, tif, 0, emsg)) {
-	    TIFFError(TIFFFileName(tif), emsg);
-	    return( 0 );
-    }
-
-    /*
-     * The TIFFRGBAImageGet() function doesn't allow us to get off the
-     * edge of the image, even to fill an otherwise valid tile.  So we
-     * figure out how much we can read, and fix up the tile buffer to
-     * a full tile configuration afterwards.
-     */
-
-    if( row + tile_ysize > img.height )
-        read_ysize = img.height - row;
-    else
-        read_ysize = tile_ysize;
-    
-    if( col + tile_xsize > img.width )
-        read_xsize = img.width - col;
-    else
-        read_xsize = tile_xsize;
-
-    /*
-     * Read the chunk of imagery.
-     */
-    
-    img.row_offset = row;
-    img.col_offset = col;
-
-    ok = TIFFRGBAImageGet(&img, raster, read_xsize, read_ysize );
-        
-    TIFFRGBAImageEnd(&img);
-
-    /*
-     * If our read was incomplete we will need to fix up the tile by
-     * shifting the data around as if a full tile of data is being returned.
-     *
-     * This is all the more complicated because the image is organized in
-     * bottom to top format. 
-     */
-
-    if( read_xsize == tile_xsize && read_ysize == tile_ysize )
-        return( ok );
-
-    for( i_row = 0; i_row < read_ysize; i_row++ ) {
-        memmove( raster + (tile_ysize - i_row - 1) * tile_xsize,
-                 raster + (read_ysize - i_row - 1) * read_xsize,
-                 read_xsize * sizeof(uint32) );
-        _TIFFmemset( raster + (tile_ysize - i_row - 1) * tile_xsize+read_xsize,
-                     0, sizeof(uint32) * (tile_xsize - read_xsize) );
-    }
-
-    for( i_row = read_ysize; i_row < tile_ysize; i_row++ ) {
-        _TIFFmemset( raster + (tile_ysize - i_row - 1) * tile_xsize,
-                     0, sizeof(uint32) * tile_xsize );
-    }
-
-    return (ok);
-}
diff --git a/src/tiff/tif_jpeg.c b/src/tiff/tif_jpeg.c
deleted file mode 100644
index 46f4d20..0000000
--- a/src/tiff/tif_jpeg.c
+++ /dev/null
@@ -1,1667 +0,0 @@
-/* $Header: /home/terralib/src/tiff/tif_jpeg.c,v 1.3 2004/03/19 11:51:24 lubia Exp $ */
-
-/*
- * Copyright (c) 1994-1997 Sam Leffler
- * Copyright (c) 1994-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#include "tiffiop.h"
-#ifdef JPEG_SUPPORT
-/*
- * TIFF Library
- *
- * JPEG Compression support per TIFF Technical Note #2
- * (*not* per the original TIFF 6.0 spec).
- *
- * This file is simply an interface to the libjpeg library written by
- * the Independent JPEG Group.  You need release 5 or later of the IJG
- * code, which you can find on the Internet at ftp.uu.net:/graphics/jpeg/.
- *
- * Contributed by Tom Lane <tgl at sss.pgh.pa.us>.
- */
-#include <assert.h>
-#include <stdio.h>
-#include <setjmp.h>
-
-int TIFFFillStrip(TIFF*, tstrip_t);
-int TIFFFillTile(TIFF*, ttile_t);
-
-/* We undefine FAR to avoid conflict with JPEG definition */
-
-#ifdef FAR
-#undef FAR
-#endif
-
-/*
-   The windows RPCNDR.H file defines boolean, but defines it with the
-   wrong size.  So we declare HAVE_BOOLEAN so that the jpeg include file
-   won't try to typedef boolean, but #define it to override the rpcndr.h
-   definition.
-
-   http://bugzilla.remotesensing.org/show_bug.cgi?id=188
-*/
-#if defined(__RPCNDR_H__)
-#define HAVE_BOOLEAN
-#define boolean unsigned int
-#endif
-
-#include "jpeglib.h"
-#include "jerror.h"
-
-/*
- * On some machines it may be worthwhile to use _setjmp or sigsetjmp
- * in place of plain setjmp.  These macros will make it easier.
- */
-#define SETJMP(jbuf)		setjmp(jbuf)
-#define LONGJMP(jbuf,code)	longjmp(jbuf,code)
-#define JMP_BUF			jmp_buf
-
-typedef struct jpeg_destination_mgr jpeg_destination_mgr;
-typedef struct jpeg_source_mgr jpeg_source_mgr;
-typedef	struct jpeg_error_mgr jpeg_error_mgr;
-
-/*
- * State block for each open TIFF file using
- * libjpeg to do JPEG compression/decompression.
- *
- * libjpeg's visible state is either a jpeg_compress_struct
- * or jpeg_decompress_struct depending on which way we
- * are going.  comm can be used to refer to the fields
- * which are common to both.
- *
- * NB: cinfo is required to be the first member of JPEGState,
- *     so we can safely cast JPEGState* -> jpeg_xxx_struct*
- *     and vice versa!
- */
-typedef	struct {
-	union {
-		struct jpeg_compress_struct c;
-		struct jpeg_decompress_struct d;
-		struct jpeg_common_struct comm;
-	} cinfo;			/* NB: must be first */
-        int             cinfo_initialized;
-
-	jpeg_error_mgr	err;		/* libjpeg error manager */
-	JMP_BUF		exit_jmpbuf;	/* for catching libjpeg failures */
-	/*
-	 * The following two members could be a union, but
-	 * they're small enough that it's not worth the effort.
-	 */
-	jpeg_destination_mgr dest;	/* data dest for compression */
-	jpeg_source_mgr	src;		/* data source for decompression */
-					/* private state */
-	TIFF*		tif;		/* back link needed by some code */
-	uint16		photometric;	/* copy of PhotometricInterpretation */
-	uint16		h_sampling;	/* luminance sampling factors */
-	uint16		v_sampling;
-	tsize_t		bytesperline;	/* decompressed bytes per scanline */
-	/* pointers to intermediate buffers when processing downsampled data */
-	JSAMPARRAY	ds_buffer[MAX_COMPONENTS];
-	int		scancount;	/* number of "scanlines" accumulated */
-	int		samplesperclump;
-
-	TIFFVGetMethod	vgetparent;	/* super-class method */
-	TIFFVSetMethod	vsetparent;	/* super-class method */
-	TIFFStripMethod	defsparent;	/* super-class method */
-	TIFFTileMethod	deftparent;	/* super-class method */
-					/* pseudo-tag fields */
-	void*		jpegtables;	/* JPEGTables tag value, or NULL */
-	uint32		jpegtables_length; /* number of bytes in same */
-	int		jpegquality;	/* Compression quality level */
-	int		jpegcolormode;	/* Auto RGB<=>YCbCr convert? */
-	int		jpegtablesmode;	/* What to put in JPEGTables */
-
-        int             ycbcrsampling_fetched;
-} JPEGState;
-
-#define	JState(tif)	((JPEGState*)(tif)->tif_data)
-
-static	int JPEGDecode(TIFF*, tidata_t, tsize_t, tsample_t);
-static	int JPEGDecodeRaw(TIFF*, tidata_t, tsize_t, tsample_t);
-static	int JPEGEncode(TIFF*, tidata_t, tsize_t, tsample_t);
-static	int JPEGEncodeRaw(TIFF*, tidata_t, tsize_t, tsample_t);
-static  int JPEGInitializeLibJPEG( TIFF * tif );
-
-#define	FIELD_JPEGTABLES	(FIELD_CODEC+0)
-
-static const TIFFFieldInfo jpegFieldInfo[] = {
-    { TIFFTAG_JPEGTABLES,	 -1,-1,	TIFF_UNDEFINED,	FIELD_JPEGTABLES,
-      FALSE,	TRUE,	"JPEGTables" },
-    { TIFFTAG_JPEGQUALITY,	 0, 0,	TIFF_ANY,	FIELD_PSEUDO,
-      TRUE,	FALSE,	"" },
-    { TIFFTAG_JPEGCOLORMODE,	 0, 0,	TIFF_ANY,	FIELD_PSEUDO,
-      FALSE,	FALSE,	"" },
-    { TIFFTAG_JPEGTABLESMODE,	 0, 0,	TIFF_ANY,	FIELD_PSEUDO,
-      FALSE,	FALSE,	"" },
-};
-#define	N(a)	(sizeof (a) / sizeof (a[0]))
-
-/*
- * libjpeg interface layer.
- *
- * We use setjmp/longjmp to return control to libtiff
- * when a fatal error is encountered within the JPEG
- * library.  We also direct libjpeg error and warning
- * messages through the appropriate libtiff handlers.
- */
-
-/*
- * Error handling routines (these replace corresponding
- * IJG routines from jerror.c).  These are used for both
- * compression and decompression.
- */
-static void
-TIFFjpeg_error_exit(j_common_ptr cinfo)
-{
-	JPEGState *sp = (JPEGState *) cinfo;	/* NB: cinfo assumed first */
-	char buffer[JMSG_LENGTH_MAX];
-
-	(*cinfo->err->format_message) (cinfo, buffer);
-	TIFFError("JPEGLib", buffer);		/* display the error message */
-	jpeg_abort(cinfo);			/* clean up libjpeg state */
-	LONGJMP(sp->exit_jmpbuf, 1);		/* return to libtiff caller */
-}
-
-/*
- * This routine is invoked only for warning messages,
- * since error_exit does its own thing and trace_level
- * is never set > 0.
- */
-static void
-TIFFjpeg_output_message(j_common_ptr cinfo)
-{
-	char buffer[JMSG_LENGTH_MAX];
-
-	(*cinfo->err->format_message) (cinfo, buffer);
-	TIFFWarning("JPEGLib", buffer);
-}
-
-/*
- * Interface routines.  This layer of routines exists
- * primarily to limit side-effects from using setjmp.
- * Also, normal/error returns are converted into return
- * values per libtiff practice.
- */
-#define	CALLJPEG(sp, fail, op)	(SETJMP((sp)->exit_jmpbuf) ? (fail) : (op))
-#define	CALLVJPEG(sp, op)	CALLJPEG(sp, 0, ((op),1))
-
-static int
-TIFFjpeg_create_compress(JPEGState* sp)
-{
-	/* initialize JPEG error handling */
-	sp->cinfo.c.err = jpeg_std_error(&sp->err);
-	sp->err.error_exit = TIFFjpeg_error_exit;
-	sp->err.output_message = TIFFjpeg_output_message;
-
-	return CALLVJPEG(sp, jpeg_create_compress(&sp->cinfo.c));
-}
-
-static int
-TIFFjpeg_create_decompress(JPEGState* sp)
-{
-	/* initialize JPEG error handling */
-	sp->cinfo.d.err = jpeg_std_error(&sp->err);
-	sp->err.error_exit = TIFFjpeg_error_exit;
-	sp->err.output_message = TIFFjpeg_output_message;
-
-	return CALLVJPEG(sp, jpeg_create_decompress(&sp->cinfo.d));
-}
-
-static int
-TIFFjpeg_set_defaults(JPEGState* sp)
-{
-	return CALLVJPEG(sp, jpeg_set_defaults(&sp->cinfo.c));
-}
-
-static int
-TIFFjpeg_set_colorspace(JPEGState* sp, J_COLOR_SPACE colorspace)
-{
-	return CALLVJPEG(sp, jpeg_set_colorspace(&sp->cinfo.c, colorspace));
-}
-
-static int
-TIFFjpeg_set_quality(JPEGState* sp, int quality, boolean force_baseline)
-{
-	return CALLVJPEG(sp,
-	    jpeg_set_quality(&sp->cinfo.c, quality, force_baseline));
-}
-
-static int
-TIFFjpeg_suppress_tables(JPEGState* sp, boolean suppress)
-{
-	return CALLVJPEG(sp, jpeg_suppress_tables(&sp->cinfo.c, suppress));
-}
-
-static int
-TIFFjpeg_start_compress(JPEGState* sp, boolean write_all_tables)
-{
-	return CALLVJPEG(sp,
-	    jpeg_start_compress(&sp->cinfo.c, write_all_tables));
-}
-
-static int
-TIFFjpeg_write_scanlines(JPEGState* sp, JSAMPARRAY scanlines, int num_lines)
-{
-	return CALLJPEG(sp, -1, (int) jpeg_write_scanlines(&sp->cinfo.c,
-	    scanlines, (JDIMENSION) num_lines));
-}
-
-static int
-TIFFjpeg_write_raw_data(JPEGState* sp, JSAMPIMAGE data, int num_lines)
-{
-	return CALLJPEG(sp, -1, (int) jpeg_write_raw_data(&sp->cinfo.c,
-	    data, (JDIMENSION) num_lines));
-}
-
-static int
-TIFFjpeg_finish_compress(JPEGState* sp)
-{
-	return CALLVJPEG(sp, jpeg_finish_compress(&sp->cinfo.c));
-}
-
-static int
-TIFFjpeg_write_tables(JPEGState* sp)
-{
-	return CALLVJPEG(sp, jpeg_write_tables(&sp->cinfo.c));
-}
-
-static int
-TIFFjpeg_read_header(JPEGState* sp, boolean require_image)
-{
-	return CALLJPEG(sp, -1, jpeg_read_header(&sp->cinfo.d, require_image));
-}
-
-static int
-TIFFjpeg_start_decompress(JPEGState* sp)
-{
-	return CALLVJPEG(sp, jpeg_start_decompress(&sp->cinfo.d));
-}
-
-static int
-TIFFjpeg_read_scanlines(JPEGState* sp, JSAMPARRAY scanlines, int max_lines)
-{
-	return CALLJPEG(sp, -1, (int) jpeg_read_scanlines(&sp->cinfo.d,
-	    scanlines, (JDIMENSION) max_lines));
-}
-
-static int
-TIFFjpeg_read_raw_data(JPEGState* sp, JSAMPIMAGE data, int max_lines)
-{
-	return CALLJPEG(sp, -1, (int) jpeg_read_raw_data(&sp->cinfo.d,
-	    data, (JDIMENSION) max_lines));
-}
-
-static int
-TIFFjpeg_finish_decompress(JPEGState* sp)
-{
-	return CALLJPEG(sp, -1, (int) jpeg_finish_decompress(&sp->cinfo.d));
-}
-
-static int
-TIFFjpeg_abort(JPEGState* sp)
-{
-	return CALLVJPEG(sp, jpeg_abort(&sp->cinfo.comm));
-}
-
-static int
-TIFFjpeg_destroy(JPEGState* sp)
-{
-	return CALLVJPEG(sp, jpeg_destroy(&sp->cinfo.comm));
-}
-
-static JSAMPARRAY
-TIFFjpeg_alloc_sarray(JPEGState* sp, int pool_id,
-		      JDIMENSION samplesperrow, JDIMENSION numrows)
-{
-	return CALLJPEG(sp, (JSAMPARRAY) NULL,
-	    (*sp->cinfo.comm.mem->alloc_sarray)
-		(&sp->cinfo.comm, pool_id, samplesperrow, numrows));
-}
-
-/*
- * JPEG library destination data manager.
- * These routines direct compressed data from libjpeg into the
- * libtiff output buffer.
- */
-
-static void
-std_init_destination(j_compress_ptr cinfo)
-{
-	JPEGState* sp = (JPEGState*) cinfo;
-	TIFF* tif = sp->tif;
-
-	sp->dest.next_output_byte = (JOCTET*) tif->tif_rawdata;
-	sp->dest.free_in_buffer = (size_t) tif->tif_rawdatasize;
-}
-
-static boolean
-std_empty_output_buffer(j_compress_ptr cinfo)
-{
-	JPEGState* sp = (JPEGState*) cinfo;
-	TIFF* tif = sp->tif;
-
-	/* the entire buffer has been filled */
-	tif->tif_rawcc = tif->tif_rawdatasize;
-	TIFFFlushData1(tif);
-	sp->dest.next_output_byte = (JOCTET*) tif->tif_rawdata;
-	sp->dest.free_in_buffer = (size_t) tif->tif_rawdatasize;
-
-	return (TRUE);
-}
-
-static void
-std_term_destination(j_compress_ptr cinfo)
-{
-	JPEGState* sp = (JPEGState*) cinfo;
-	TIFF* tif = sp->tif;
-
-	tif->tif_rawcp = (tidata_t) sp->dest.next_output_byte;
-	tif->tif_rawcc =
-	    tif->tif_rawdatasize - (tsize_t) sp->dest.free_in_buffer;
-	/* NB: libtiff does the final buffer flush */
-}
-
-static void
-TIFFjpeg_data_dest(JPEGState* sp, TIFF* tif)
-{
-	(void) tif;
-	sp->cinfo.c.dest = &sp->dest;
-	sp->dest.init_destination = std_init_destination;
-	sp->dest.empty_output_buffer = std_empty_output_buffer;
-	sp->dest.term_destination = std_term_destination;
-}
-
-/*
- * Alternate destination manager for outputting to JPEGTables field.
- */
-
-static void
-tables_init_destination(j_compress_ptr cinfo)
-{
-	JPEGState* sp = (JPEGState*) cinfo;
-
-	/* while building, jpegtables_length is allocated buffer size */
-	sp->dest.next_output_byte = (JOCTET*) sp->jpegtables;
-	sp->dest.free_in_buffer = (size_t) sp->jpegtables_length;
-}
-
-static boolean
-tables_empty_output_buffer(j_compress_ptr cinfo)
-{
-	JPEGState* sp = (JPEGState*) cinfo;
-	void* newbuf;
-
-	/* the entire buffer has been filled; enlarge it by 1000 bytes */
-	newbuf = _TIFFrealloc((tdata_t) sp->jpegtables,
-			      (tsize_t) (sp->jpegtables_length + 1000));
-	if (newbuf == NULL)
-		ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, 100);
-	sp->dest.next_output_byte = (JOCTET*) newbuf + sp->jpegtables_length;
-	sp->dest.free_in_buffer = (size_t) 1000;
-	sp->jpegtables = newbuf;
-	sp->jpegtables_length += 1000;
-	return (TRUE);
-}
-
-static void
-tables_term_destination(j_compress_ptr cinfo)
-{
-	JPEGState* sp = (JPEGState*) cinfo;
-
-	/* set tables length to number of bytes actually emitted */
-	sp->jpegtables_length -= sp->dest.free_in_buffer;
-}
-
-static int
-TIFFjpeg_tables_dest(JPEGState* sp, TIFF* tif)
-{
-	(void) tif;
-	/*
-	 * Allocate a working buffer for building tables.
-	 * Initial size is 1000 bytes, which is usually adequate.
-	 */
-	if (sp->jpegtables)
-		_TIFFfree(sp->jpegtables);
-	sp->jpegtables_length = 1000;
-	sp->jpegtables = (void*) _TIFFmalloc((tsize_t) sp->jpegtables_length);
-	if (sp->jpegtables == NULL) {
-		sp->jpegtables_length = 0;
-		TIFFError("TIFFjpeg_tables_dest", "No space for JPEGTables");
-		return (0);
-	}
-	sp->cinfo.c.dest = &sp->dest;
-	sp->dest.init_destination = tables_init_destination;
-	sp->dest.empty_output_buffer = tables_empty_output_buffer;
-	sp->dest.term_destination = tables_term_destination;
-	return (1);
-}
-
-/*
- * JPEG library source data manager.
- * These routines supply compressed data to libjpeg.
- */
-
-static void
-std_init_source(j_decompress_ptr cinfo)
-{
-	JPEGState* sp = (JPEGState*) cinfo;
-	TIFF* tif = sp->tif;
-
-	sp->src.next_input_byte = (const JOCTET*) tif->tif_rawdata;
-	sp->src.bytes_in_buffer = (size_t) tif->tif_rawcc;
-}
-
-static boolean
-std_fill_input_buffer(j_decompress_ptr cinfo)
-{
-	JPEGState* sp = (JPEGState* ) cinfo;
-	static const JOCTET dummy_EOI[2] = { 0xFF, JPEG_EOI };
-
-	/*
-	 * Should never get here since entire strip/tile is
-	 * read into memory before the decompressor is called,
-	 * and thus was supplied by init_source.
-	 */
-	WARNMS(cinfo, JWRN_JPEG_EOF);
-	/* insert a fake EOI marker */
-	sp->src.next_input_byte = dummy_EOI;
-	sp->src.bytes_in_buffer = 2;
-	return (TRUE);
-}
-
-static void
-std_skip_input_data(j_decompress_ptr cinfo, long num_bytes)
-{
-	JPEGState* sp = (JPEGState*) cinfo;
-
-	if (num_bytes > 0) {
-		if (num_bytes > (long) sp->src.bytes_in_buffer) {
-			/* oops, buffer overrun */
-			(void) std_fill_input_buffer(cinfo);
-		} else {
-			sp->src.next_input_byte += (size_t) num_bytes;
-			sp->src.bytes_in_buffer -= (size_t) num_bytes;
-		}
-	}
-}
-
-static void
-std_term_source(j_decompress_ptr cinfo)
-{
-	/* No work necessary here */
-	/* Or must we update tif->tif_rawcp, tif->tif_rawcc ??? */
-	/* (if so, need empty tables_term_source!) */
-	(void) cinfo;
-}
-
-static void
-TIFFjpeg_data_src(JPEGState* sp, TIFF* tif)
-{
-	(void) tif;
-	sp->cinfo.d.src = &sp->src;
-	sp->src.init_source = std_init_source;
-	sp->src.fill_input_buffer = std_fill_input_buffer;
-	sp->src.skip_input_data = std_skip_input_data;
-	sp->src.resync_to_restart = jpeg_resync_to_restart;
-	sp->src.term_source = std_term_source;
-	sp->src.bytes_in_buffer = 0;		/* for safety */
-	sp->src.next_input_byte = NULL;
-}
-
-/*
- * Alternate source manager for reading from JPEGTables.
- * We can share all the code except for the init routine.
- */
-
-static void
-tables_init_source(j_decompress_ptr cinfo)
-{
-	JPEGState* sp = (JPEGState*) cinfo;
-
-	sp->src.next_input_byte = (const JOCTET*) sp->jpegtables;
-	sp->src.bytes_in_buffer = (size_t) sp->jpegtables_length;
-}
-
-static void
-TIFFjpeg_tables_src(JPEGState* sp, TIFF* tif)
-{
-	TIFFjpeg_data_src(sp, tif);
-	sp->src.init_source = tables_init_source;
-}
-
-/*
- * Allocate downsampled-data buffers needed for downsampled I/O.
- * We use values computed in jpeg_start_compress or jpeg_start_decompress.
- * We use libjpeg's allocator so that buffers will be released automatically
- * when done with strip/tile.
- * This is also a handy place to compute samplesperclump, bytesperline.
- */
-static int
-alloc_downsampled_buffers(TIFF* tif, jpeg_component_info* comp_info,
-			  int num_components)
-{
-	JPEGState* sp = JState(tif);
-	int ci;
-	jpeg_component_info* compptr;
-	JSAMPARRAY buf;
-	int samples_per_clump = 0;
-
-	for (ci = 0, compptr = comp_info; ci < num_components;
-	     ci++, compptr++) {
-		samples_per_clump += compptr->h_samp_factor *
-			compptr->v_samp_factor;
-		buf = TIFFjpeg_alloc_sarray(sp, JPOOL_IMAGE,
-				compptr->width_in_blocks * DCTSIZE,
-				(JDIMENSION) (compptr->v_samp_factor*DCTSIZE));
-		if (buf == NULL)
-			return (0);
-		sp->ds_buffer[ci] = buf;
-	}
-	sp->samplesperclump = samples_per_clump;
-	return (1);
-}
-
-
-/*
- * JPEG Decoding.
- */
-
-static int
-JPEGSetupDecode(TIFF* tif)
-{
-	JPEGState* sp = JState(tif);
-	TIFFDirectory *td = &tif->tif_dir;
-
-        JPEGInitializeLibJPEG( tif );
-
-	assert(sp != NULL);
-	assert(sp->cinfo.comm.is_decompressor);
-
-	/* Read JPEGTables if it is present */
-	if (TIFFFieldSet(tif,FIELD_JPEGTABLES)) {
-		TIFFjpeg_tables_src(sp, tif);
-		if(TIFFjpeg_read_header(sp,FALSE) != JPEG_HEADER_TABLES_ONLY) {
-			TIFFError("JPEGSetupDecode", "Bogus JPEGTables field");
-			return (0);
-		}
-	}
-
-	/* Grab parameters that are same for all strips/tiles */
-	sp->photometric = td->td_photometric;
-	switch (sp->photometric) {
-	case PHOTOMETRIC_YCBCR:
-		sp->h_sampling = td->td_ycbcrsubsampling[0];
-		sp->v_sampling = td->td_ycbcrsubsampling[1];
-		break;
-	default:
-		/* TIFF 6.0 forbids subsampling of all other color spaces */
-		sp->h_sampling = 1;
-		sp->v_sampling = 1;
-		break;
-	}
-
-	/* Set up for reading normal data */
-	TIFFjpeg_data_src(sp, tif);
-	tif->tif_postdecode = _TIFFNoPostDecode; /* override byte swapping */
-	return (1);
-}
-
-/*
- * Set up for decoding a strip or tile.
- */
-static int
-JPEGPreDecode(TIFF* tif, tsample_t s)
-{
-	JPEGState *sp = JState(tif);
-	TIFFDirectory *td = &tif->tif_dir;
-	static const char module[] = "JPEGPreDecode";
-	uint32 segment_width, segment_height;
-	int downsampled_output;
-	int ci;
-
-	assert(sp != NULL);
-	assert(sp->cinfo.comm.is_decompressor);
-	/*
-	 * Reset decoder state from any previous strip/tile,
-	 * in case application didn't read the whole strip.
-	 */
-	if (!TIFFjpeg_abort(sp))
-		return (0);
-	/*
-	 * Read the header for this strip/tile.
-	 */
-	if (TIFFjpeg_read_header(sp, TRUE) != JPEG_HEADER_OK)
-		return (0);
-	/*
-	 * Check image parameters and set decompression parameters.
-	 */
-	segment_width = td->td_imagewidth;
-	segment_height = td->td_imagelength - tif->tif_row;
-	if (isTiled(tif)) {
-                segment_width = td->td_tilewidth;
-                segment_height = td->td_tilelength;
-		sp->bytesperline = TIFFTileRowSize(tif);
-	} else {
-		if (segment_height > td->td_rowsperstrip)
-			segment_height = td->td_rowsperstrip;
-		sp->bytesperline = TIFFScanlineSize(tif);
-	}
-	if (td->td_planarconfig == PLANARCONFIG_SEPARATE && s > 0) {
-		/*
-		 * For PC 2, scale down the expected strip/tile size
-		 * to match a downsampled component
-		 */
-		segment_width = TIFFhowmany(segment_width, sp->h_sampling);
-		segment_height = TIFFhowmany(segment_height, sp->v_sampling);
-	}
-	if (sp->cinfo.d.image_width != segment_width ||
-	    sp->cinfo.d.image_height != segment_height) {
-		TIFFWarning(module, 
-                 "Improper JPEG strip/tile size, expected %dx%d, got %dx%d",
-                          segment_width, 
-                          segment_height,
-                          sp->cinfo.d.image_width, 
-                          sp->cinfo.d.image_height);
-	}
-	if (sp->cinfo.d.num_components !=
-	    (td->td_planarconfig == PLANARCONFIG_CONTIG ?
-	     td->td_samplesperpixel : 1)) {
-		TIFFError(module, "Improper JPEG component count");
-		return (0);
-	}
-	if (sp->cinfo.d.data_precision != td->td_bitspersample) {
-		TIFFError(module, "Improper JPEG data precision");
-		return (0);
-	}
-	if (td->td_planarconfig == PLANARCONFIG_CONTIG) {
-		/* Component 0 should have expected sampling factors */
-		if (sp->cinfo.d.comp_info[0].h_samp_factor != sp->h_sampling ||
-		    sp->cinfo.d.comp_info[0].v_samp_factor != sp->v_sampling) {
-			TIFFWarning(module, 
-                                    "Improper JPEG sampling factors %d,%d\n"
-                                    "Apparently should be %d,%d, "
-                                    "decompressor will try reading with "
-                                    "sampling %d,%d",
-                                    sp->cinfo.d.comp_info[0].h_samp_factor,
-                                    sp->cinfo.d.comp_info[0].v_samp_factor,
-                                    sp->h_sampling, 
-                                    sp->v_sampling,
-                                    sp->cinfo.d.comp_info[0].h_samp_factor,
-                                    sp->cinfo.d.comp_info[0].v_samp_factor );
-
-                        sp->h_sampling = (uint16)
-                            sp->cinfo.d.comp_info[0].h_samp_factor;
-                        sp->v_sampling = (uint16)
-                            sp->cinfo.d.comp_info[0].v_samp_factor;
-		}
-		/* Rest should have sampling factors 1,1 */
-		for (ci = 1; ci < sp->cinfo.d.num_components; ci++) {
-			if (sp->cinfo.d.comp_info[ci].h_samp_factor != 1 ||
-			    sp->cinfo.d.comp_info[ci].v_samp_factor != 1) {
-				TIFFError(module, "Improper JPEG sampling factors");
-				return (0);
-			}
-		}
-	} else {
-		/* PC 2's single component should have sampling factors 1,1 */
-		if (sp->cinfo.d.comp_info[0].h_samp_factor != 1 ||
-		    sp->cinfo.d.comp_info[0].v_samp_factor != 1) {
-			TIFFError(module, "Improper JPEG sampling factors");
-			return (0);
-		}
-	}
-	downsampled_output = FALSE;
-	if (td->td_planarconfig == PLANARCONFIG_CONTIG &&
-	    sp->photometric == PHOTOMETRIC_YCBCR &&
-	    sp->jpegcolormode == JPEGCOLORMODE_RGB) {
-    	/* Convert YCbCr to RGB */
-		sp->cinfo.d.jpeg_color_space = JCS_YCbCr;
-		sp->cinfo.d.out_color_space = JCS_RGB;
-	} else {
-			/* Suppress colorspace handling */
-		sp->cinfo.d.jpeg_color_space = JCS_UNKNOWN;
-		sp->cinfo.d.out_color_space = JCS_UNKNOWN;
-		if (td->td_planarconfig == PLANARCONFIG_CONTIG &&
-		    (sp->h_sampling != 1 || sp->v_sampling != 1))
-			downsampled_output = TRUE;
-		/* XXX what about up-sampling? */
-	}
-	if (downsampled_output) {
-		/* Need to use raw-data interface to libjpeg */
-		sp->cinfo.d.raw_data_out = TRUE;
-		tif->tif_decoderow = JPEGDecodeRaw;
-		tif->tif_decodestrip = JPEGDecodeRaw;
-		tif->tif_decodetile = JPEGDecodeRaw;
-	} else {
-		/* Use normal interface to libjpeg */
-		sp->cinfo.d.raw_data_out = FALSE;
-		tif->tif_decoderow = JPEGDecode;
-		tif->tif_decodestrip = JPEGDecode;
-		tif->tif_decodetile = JPEGDecode;
-	}
-	/* Start JPEG decompressor */
-	if (!TIFFjpeg_start_decompress(sp))
-		return (0);
-	/* Allocate downsampled-data buffers if needed */
-	if (downsampled_output) {
-		if (!alloc_downsampled_buffers(tif, sp->cinfo.d.comp_info,
-					       sp->cinfo.d.num_components))
-			return (0);
-		sp->scancount = DCTSIZE;	/* mark buffer empty */
-	}
-	return (1);
-}
-
-/*
- * Decode a chunk of pixels.
- * "Standard" case: returned data is not downsampled.
- */
-/*ARGSUSED*/ static int
-JPEGDecode(TIFF* tif, tidata_t buf, tsize_t cc, tsample_t s)
-{
-    JPEGState *sp = JState(tif);
-    tsize_t nrows;
-
-    nrows = cc / sp->bytesperline;
-    if (cc % sp->bytesperline)
-        TIFFWarning(tif->tif_name, "fractional scanline not read");
-
-    if( nrows > (int) sp->cinfo.d.image_height )
-        nrows = sp->cinfo.d.image_height;
-
-    /* data is expected to be read in multiples of a scanline */
-    if (nrows)
-    {
-        do {
-            JSAMPROW bufptr = (JSAMPROW)buf;
-
-            if (TIFFjpeg_read_scanlines(sp, &bufptr, 1) != 1)
-                return (0);
-            ++tif->tif_row;
-            buf += sp->bytesperline;
-            cc -= sp->bytesperline;
-        } while (--nrows > 0);
-    }
-    /* Close down the decompressor if we've finished the strip or tile. */
-    return sp->cinfo.d.output_scanline < sp->cinfo.d.output_height
-        || TIFFjpeg_finish_decompress(sp);
-}
-
-/*
- * Decode a chunk of pixels.
- * Returned data is downsampled per sampling factors.
- */
-/*ARGSUSED*/ static int
-JPEGDecodeRaw(TIFF* tif, tidata_t buf, tsize_t cc, tsample_t s)
-{
-	JPEGState *sp = JState(tif);
-	tsize_t nrows;
-
-	/* data is expected to be read in multiples of a scanline */
-	if ( (nrows = sp->cinfo.d.image_height) ) {
-		/* Cb,Cr both have sampling factors 1, so this is correct */
-		JDIMENSION clumps_per_line = sp->cinfo.d.comp_info[1].downsampled_width;
-		int samples_per_clump = sp->samplesperclump;
-	
-		do {
-			jpeg_component_info *compptr;
-			int ci, clumpoffset;
-
-			/* Reload downsampled-data buffer if needed */
-			if (sp->scancount >= DCTSIZE) {
-				int n = sp->cinfo.d.max_v_samp_factor * DCTSIZE;
-
-				if (TIFFjpeg_read_raw_data(sp, sp->ds_buffer, n)
-					!= n)
-					return (0);
-				sp->scancount = 0;
-			}
-			/*
-			 * Fastest way to unseparate data is to make one pass
-			 * over the scanline for each row of each component.
-			 */
-			clumpoffset = 0;	/* first sample in clump */
-			for (ci = 0, compptr = sp->cinfo.d.comp_info;
-			     ci < sp->cinfo.d.num_components;
-			     ci++, compptr++) {
-			    int hsamp = compptr->h_samp_factor;
-			    int vsamp = compptr->v_samp_factor;
-			    int ypos;
-
-			    for (ypos = 0; ypos < vsamp; ypos++) {
-				JSAMPLE *inptr = sp->ds_buffer[ci][sp->scancount*vsamp + ypos];
-				JSAMPLE *outptr = (JSAMPLE*)buf + clumpoffset;
-				JDIMENSION nclump;
-
-				if (hsamp == 1) {
-				    /* fast path for at least Cb and Cr */
-				    for (nclump = clumps_per_line; nclump-- > 0; ) {
-					outptr[0] = *inptr++;
-					outptr += samples_per_clump;
-				    }
-				} else {
-					int xpos;
-
-				    /* general case */
-				    for (nclump = clumps_per_line; nclump-- > 0; ) {
-					for (xpos = 0; xpos < hsamp; xpos++)
-					    outptr[xpos] = *inptr++;
-					outptr += samples_per_clump;
-				    }
-				}
-				clumpoffset += hsamp;
-			    }
-			}
-			++sp->scancount;
-			++tif->tif_row;
-			buf += sp->bytesperline;
-			cc -= sp->bytesperline;
-		} while (--nrows > 0);
-	}
-
-        /* Close down the decompressor if done. */
-        return sp->cinfo.d.output_scanline < sp->cinfo.d.output_height
-       	    || TIFFjpeg_finish_decompress(sp);
-}
-
-
-/*
- * JPEG Encoding.
- */
-
-static void
-unsuppress_quant_table (JPEGState* sp, int tblno)
-{
-	JQUANT_TBL* qtbl;
-
-	if ((qtbl = sp->cinfo.c.quant_tbl_ptrs[tblno]) != NULL)
-		qtbl->sent_table = FALSE;
-}
-
-static void
-unsuppress_huff_table (JPEGState* sp, int tblno)
-{
-	JHUFF_TBL* htbl;
-
-	if ((htbl = sp->cinfo.c.dc_huff_tbl_ptrs[tblno]) != NULL)
-		htbl->sent_table = FALSE;
-	if ((htbl = sp->cinfo.c.ac_huff_tbl_ptrs[tblno]) != NULL)
-		htbl->sent_table = FALSE;
-}
-
-static int
-prepare_JPEGTables(TIFF* tif)
-{
-	JPEGState* sp = JState(tif);
-
-        JPEGInitializeLibJPEG( tif );
-
-	/* Initialize quant tables for current quality setting */
-	if (!TIFFjpeg_set_quality(sp, sp->jpegquality, FALSE))
-		return (0);
-	/* Mark only the tables we want for output */
-	/* NB: chrominance tables are currently used only with YCbCr */
-	if (!TIFFjpeg_suppress_tables(sp, TRUE))
-		return (0);
-	if (sp->jpegtablesmode & JPEGTABLESMODE_QUANT) {
-		unsuppress_quant_table(sp, 0);
-		if (sp->photometric == PHOTOMETRIC_YCBCR)
-			unsuppress_quant_table(sp, 1);
-	}
-	if (sp->jpegtablesmode & JPEGTABLESMODE_HUFF) {
-		unsuppress_huff_table(sp, 0);
-		if (sp->photometric == PHOTOMETRIC_YCBCR)
-			unsuppress_huff_table(sp, 1);
-	}
-	/* Direct libjpeg output into jpegtables */
-	if (!TIFFjpeg_tables_dest(sp, tif))
-		return (0);
-	/* Emit tables-only datastream */
-	if (!TIFFjpeg_write_tables(sp))
-		return (0);
-
-	return (1);
-}
-
-static int
-JPEGSetupEncode(TIFF* tif)
-{
-	JPEGState* sp = JState(tif);
-	TIFFDirectory *td = &tif->tif_dir;
-	static const char module[] = "JPEGSetupEncode";
-
-        JPEGInitializeLibJPEG( tif );
-
-	assert(sp != NULL);
-	assert(!sp->cinfo.comm.is_decompressor);
-
-	/*
-	 * Initialize all JPEG parameters to default values.
-	 * Note that jpeg_set_defaults needs legal values for
-	 * in_color_space and input_components.
-	 */
-	sp->cinfo.c.in_color_space = JCS_UNKNOWN;
-	sp->cinfo.c.input_components = 1;
-	if (!TIFFjpeg_set_defaults(sp))
-		return (0);
-	/* Set per-file parameters */
-	sp->photometric = td->td_photometric;
-	switch (sp->photometric) {
-	case PHOTOMETRIC_YCBCR:
-		sp->h_sampling = td->td_ycbcrsubsampling[0];
-		sp->v_sampling = td->td_ycbcrsubsampling[1];
-		/*
-		 * A ReferenceBlackWhite field *must* be present since the
-		 * default value is inappropriate for YCbCr.  Fill in the
-		 * proper value if application didn't set it.
-		 */
-		if (!TIFFFieldSet(tif, FIELD_REFBLACKWHITE)) {
-			float refbw[6];
-			long top = 1L << td->td_bitspersample;
-			refbw[0] = 0;
-			refbw[1] = (float)(top-1L);
-			refbw[2] = (float)(top>>1);
-			refbw[3] = refbw[1];
-			refbw[4] = refbw[2];
-			refbw[5] = refbw[1];
-			TIFFSetField(tif, TIFFTAG_REFERENCEBLACKWHITE, refbw);
-		}
-		break;
-	case PHOTOMETRIC_PALETTE:		/* disallowed by Tech Note */
-	case PHOTOMETRIC_MASK:
-		TIFFError(module,
-			  "PhotometricInterpretation %d not allowed for JPEG",
-			  (int) sp->photometric);
-		return (0);
-	default:
-		/* TIFF 6.0 forbids subsampling of all other color spaces */
-		sp->h_sampling = 1;
-		sp->v_sampling = 1;
-		break;
-	}
-	
-	/* Verify miscellaneous parameters */
-
-	/*
-	 * This would need work if libtiff ever supports different
-	 * depths for different components, or if libjpeg ever supports
-	 * run-time selection of depth.  Neither is imminent.
-	 */
-	if (td->td_bitspersample != BITS_IN_JSAMPLE) {
-		TIFFError(module, "BitsPerSample %d not allowed for JPEG",
-			  (int) td->td_bitspersample);
-		return (0);
-	}
-	sp->cinfo.c.data_precision = td->td_bitspersample;
-	if (isTiled(tif)) {
-		if ((td->td_tilelength % (sp->v_sampling * DCTSIZE)) != 0) {
-			TIFFError(module,
-				  "JPEG tile height must be multiple of %d",
-				  sp->v_sampling * DCTSIZE);
-			return (0);
-		}
-		if ((td->td_tilewidth % (sp->h_sampling * DCTSIZE)) != 0) {
-			TIFFError(module,
-				  "JPEG tile width must be multiple of %d",
-				  sp->h_sampling * DCTSIZE);
-			return (0);
-		}
-	} else {
-		if (td->td_rowsperstrip < td->td_imagelength &&
-		    (td->td_rowsperstrip % (sp->v_sampling * DCTSIZE)) != 0) {
-			TIFFError(module,
-				  "RowsPerStrip must be multiple of %d for JPEG",
-				  sp->v_sampling * DCTSIZE);
-			return (0);
-		}
-	}
-
-	/* Create a JPEGTables field if appropriate */
-	if (sp->jpegtablesmode & (JPEGTABLESMODE_QUANT|JPEGTABLESMODE_HUFF)) {
-		if (!prepare_JPEGTables(tif))
-			return (0);
-		/* Mark the field present */
-		/* Can't use TIFFSetField since BEENWRITING is already set! */
-		TIFFSetFieldBit(tif, FIELD_JPEGTABLES);
-		tif->tif_flags |= TIFF_DIRTYDIRECT;
-	} else {
-		/* We do not support application-supplied JPEGTables, */
-		/* so mark the field not present */
-		TIFFClrFieldBit(tif, FIELD_JPEGTABLES);
-	}
-
-	/* Direct libjpeg output to libtiff's output buffer */
-	TIFFjpeg_data_dest(sp, tif);
-
-	return (1);
-}
-
-/*
- * Set encoding state at the start of a strip or tile.
- */
-static int
-JPEGPreEncode(TIFF* tif, tsample_t s)
-{
-	JPEGState *sp = JState(tif);
-	TIFFDirectory *td = &tif->tif_dir;
-	static const char module[] = "JPEGPreEncode";
-	uint32 segment_width, segment_height;
-	int downsampled_input;
-
-	assert(sp != NULL);
-	assert(!sp->cinfo.comm.is_decompressor);
-	/*
-	 * Set encoding parameters for this strip/tile.
-	 */
-	if (isTiled(tif)) {
-		segment_width = td->td_tilewidth;
-		segment_height = td->td_tilelength;
-		sp->bytesperline = TIFFTileRowSize(tif);
-	} else {
-		segment_width = td->td_imagewidth;
-		segment_height = td->td_imagelength - tif->tif_row;
-		if (segment_height > td->td_rowsperstrip)
-			segment_height = td->td_rowsperstrip;
-		sp->bytesperline = TIFFScanlineSize(tif);
-	}
-	if (td->td_planarconfig == PLANARCONFIG_SEPARATE && s > 0) {
-		/* for PC 2, scale down the strip/tile size
-		 * to match a downsampled component
-		 */
-		segment_width = TIFFhowmany(segment_width, sp->h_sampling);
-		segment_height = TIFFhowmany(segment_height, sp->v_sampling);
-	}
-	if (segment_width > 65535 || segment_height > 65535) {
-		TIFFError(module, "Strip/tile too large for JPEG");
-		return (0);
-	}
-	sp->cinfo.c.image_width = segment_width;
-	sp->cinfo.c.image_height = segment_height;
-	downsampled_input = FALSE;
-	if (td->td_planarconfig == PLANARCONFIG_CONTIG) {
-		sp->cinfo.c.input_components = td->td_samplesperpixel;
-		if (sp->photometric == PHOTOMETRIC_YCBCR) {
-			if (sp->jpegcolormode == JPEGCOLORMODE_RGB) {
-				sp->cinfo.c.in_color_space = JCS_RGB;
-			} else {
-				sp->cinfo.c.in_color_space = JCS_YCbCr;
-				if (sp->h_sampling != 1 || sp->v_sampling != 1)
-					downsampled_input = TRUE;
-			}
-			if (!TIFFjpeg_set_colorspace(sp, JCS_YCbCr))
-				return (0);
-			/*
-			 * Set Y sampling factors;
-			 * we assume jpeg_set_colorspace() set the rest to 1
-			 */
-			sp->cinfo.c.comp_info[0].h_samp_factor = sp->h_sampling;
-			sp->cinfo.c.comp_info[0].v_samp_factor = sp->v_sampling;
-		} else {
-			sp->cinfo.c.in_color_space = JCS_UNKNOWN;
-			if (!TIFFjpeg_set_colorspace(sp, JCS_UNKNOWN))
-				return (0);
-			/* jpeg_set_colorspace set all sampling factors to 1 */
-		}
-	} else {
-		sp->cinfo.c.input_components = 1;
-		sp->cinfo.c.in_color_space = JCS_UNKNOWN;
-		if (!TIFFjpeg_set_colorspace(sp, JCS_UNKNOWN))
-			return (0);
-		sp->cinfo.c.comp_info[0].component_id = s;
-		/* jpeg_set_colorspace() set sampling factors to 1 */
-		if (sp->photometric == PHOTOMETRIC_YCBCR && s > 0) {
-			sp->cinfo.c.comp_info[0].quant_tbl_no = 1;
-			sp->cinfo.c.comp_info[0].dc_tbl_no = 1;
-			sp->cinfo.c.comp_info[0].ac_tbl_no = 1;
-		}
-	}
-	/* ensure libjpeg won't write any extraneous markers */
-	sp->cinfo.c.write_JFIF_header = FALSE;
-	sp->cinfo.c.write_Adobe_marker = FALSE;
-	/* set up table handling correctly */
-	if (! (sp->jpegtablesmode & JPEGTABLESMODE_QUANT)) {
-		if (!TIFFjpeg_set_quality(sp, sp->jpegquality, FALSE))
-			return (0);
-		unsuppress_quant_table(sp, 0);
-		unsuppress_quant_table(sp, 1);
-	}
-	if (sp->jpegtablesmode & JPEGTABLESMODE_HUFF)
-		sp->cinfo.c.optimize_coding = FALSE;
-	else
-		sp->cinfo.c.optimize_coding = TRUE;
-	if (downsampled_input) {
-		/* Need to use raw-data interface to libjpeg */
-		sp->cinfo.c.raw_data_in = TRUE;
-		tif->tif_encoderow = JPEGEncodeRaw;
-		tif->tif_encodestrip = JPEGEncodeRaw;
-		tif->tif_encodetile = JPEGEncodeRaw;
-	} else {
-		/* Use normal interface to libjpeg */
-		sp->cinfo.c.raw_data_in = FALSE;
-		tif->tif_encoderow = JPEGEncode;
-		tif->tif_encodestrip = JPEGEncode;
-		tif->tif_encodetile = JPEGEncode;
-	}
-	/* Start JPEG compressor */
-	if (!TIFFjpeg_start_compress(sp, FALSE))
-		return (0);
-	/* Allocate downsampled-data buffers if needed */
-	if (downsampled_input) {
-		if (!alloc_downsampled_buffers(tif, sp->cinfo.c.comp_info,
-					       sp->cinfo.c.num_components))
-			return (0);
-	}
-	sp->scancount = 0;
-
-	return (1);
-}
-
-/*
- * Encode a chunk of pixels.
- * "Standard" case: incoming data is not downsampled.
- */
-static int
-JPEGEncode(TIFF* tif, tidata_t buf, tsize_t cc, tsample_t s)
-{
-	JPEGState *sp = JState(tif);
-	tsize_t nrows;
-	JSAMPROW bufptr[1];
-
-	(void) s;
-	assert(sp != NULL);
-	/* data is expected to be supplied in multiples of a scanline */
-	nrows = cc / sp->bytesperline;
-	if (cc % sp->bytesperline)
-		TIFFWarning(tif->tif_name, "fractional scanline discarded");
-
-	while (nrows-- > 0) {
-		bufptr[0] = (JSAMPROW) buf;
-		if (TIFFjpeg_write_scanlines(sp, bufptr, 1) != 1)
-			return (0);
-		if (nrows > 0)
-			tif->tif_row++;
-		buf += sp->bytesperline;
-	}
-	return (1);
-}
-
-/*
- * Encode a chunk of pixels.
- * Incoming data is expected to be downsampled per sampling factors.
- */
-static int
-JPEGEncodeRaw(TIFF* tif, tidata_t buf, tsize_t cc, tsample_t s)
-{
-	JPEGState *sp = JState(tif);
-	JSAMPLE* inptr;
-	JSAMPLE* outptr;
-	tsize_t nrows;
-	JDIMENSION clumps_per_line, nclump;
-	int clumpoffset, ci, xpos, ypos;
-	jpeg_component_info* compptr;
-	int samples_per_clump = sp->samplesperclump;
-
-	(void) s;
-	assert(sp != NULL);
-	/* data is expected to be supplied in multiples of a scanline */
-	nrows = cc / sp->bytesperline;
-	if (cc % sp->bytesperline)
-		TIFFWarning(tif->tif_name, "fractional scanline discarded");
-
-	/* Cb,Cr both have sampling factors 1, so this is correct */
-	clumps_per_line = sp->cinfo.c.comp_info[1].downsampled_width;
-
-	while (nrows-- > 0) {
-		/*
-		 * Fastest way to separate the data is to make one pass
-		 * over the scanline for each row of each component.
-		 */
-		clumpoffset = 0;		/* first sample in clump */
-		for (ci = 0, compptr = sp->cinfo.c.comp_info;
-		     ci < sp->cinfo.c.num_components;
-		     ci++, compptr++) {
-		    int hsamp = compptr->h_samp_factor;
-		    int vsamp = compptr->v_samp_factor;
-		    int padding = (int) (compptr->width_in_blocks * DCTSIZE -
-					 clumps_per_line * hsamp);
-		    for (ypos = 0; ypos < vsamp; ypos++) {
-			inptr = ((JSAMPLE*) buf) + clumpoffset;
-			outptr = sp->ds_buffer[ci][sp->scancount*vsamp + ypos];
-			if (hsamp == 1) {
-			    /* fast path for at least Cb and Cr */
-			    for (nclump = clumps_per_line; nclump-- > 0; ) {
-				*outptr++ = inptr[0];
-				inptr += samples_per_clump;
-			    }
-			} else {
-			    /* general case */
-			    for (nclump = clumps_per_line; nclump-- > 0; ) {
-				for (xpos = 0; xpos < hsamp; xpos++)
-				    *outptr++ = inptr[xpos];
-				inptr += samples_per_clump;
-			    }
-			}
-			/* pad each scanline as needed */
-			for (xpos = 0; xpos < padding; xpos++) {
-			    *outptr = outptr[-1];
-			    outptr++;
-			}
-			clumpoffset += hsamp;
-		    }
-		}
-		sp->scancount++;
-		if (sp->scancount >= DCTSIZE) {
-			int n = sp->cinfo.c.max_v_samp_factor * DCTSIZE;
-			if (TIFFjpeg_write_raw_data(sp, sp->ds_buffer, n) != n)
-				return (0);
-			sp->scancount = 0;
-		}
-		if (nrows > 0)
-			tif->tif_row++;
-		buf += sp->bytesperline;
-	}
-	return (1);
-}
-
-/*
- * Finish up at the end of a strip or tile.
- */
-static int
-JPEGPostEncode(TIFF* tif)
-{
-	JPEGState *sp = JState(tif);
-
-	if (sp->scancount > 0) {
-		/*
-		 * Need to emit a partial bufferload of downsampled data.
-		 * Pad the data vertically.
-		 */
-		int ci, ypos, n;
-		jpeg_component_info* compptr;
-
-		for (ci = 0, compptr = sp->cinfo.c.comp_info;
-		     ci < sp->cinfo.c.num_components;
-		     ci++, compptr++) {
-			int vsamp = compptr->v_samp_factor;
-			tsize_t row_width = compptr->width_in_blocks * DCTSIZE
-				* sizeof(JSAMPLE);
-			for (ypos = sp->scancount * vsamp;
-			     ypos < DCTSIZE * vsamp; ypos++) {
-				_TIFFmemcpy((tdata_t)sp->ds_buffer[ci][ypos],
-					    (tdata_t)sp->ds_buffer[ci][ypos-1],
-					    row_width);
-
-			}
-		}
-		n = sp->cinfo.c.max_v_samp_factor * DCTSIZE;
-		if (TIFFjpeg_write_raw_data(sp, sp->ds_buffer, n) != n)
-			return (0);
-	}
-
-	return (TIFFjpeg_finish_compress(JState(tif)));
-}
-
-static void
-JPEGCleanup(TIFF* tif)
-{
-	if (tif->tif_data) {
-		JPEGState *sp = JState(tif);
-                if( sp->cinfo_initialized )
-                    TIFFjpeg_destroy(sp);	/* release libjpeg resources */
-		if (sp->jpegtables)		/* tag value */
-			_TIFFfree(sp->jpegtables);
-		_TIFFfree(tif->tif_data);	/* release local state */
-		tif->tif_data = NULL;
-	}
-}
-
-static int
-JPEGVSetField(TIFF* tif, ttag_t tag, va_list ap)
-{
-	JPEGState* sp = JState(tif);
-	TIFFDirectory* td = &tif->tif_dir;
-	uint32 v32;
-
-	switch (tag) {
-	case TIFFTAG_JPEGTABLES:
-		v32 = va_arg(ap, uint32);
-		if (v32 == 0) {
-			/* XXX */
-			return (0);
-		}
-		_TIFFsetByteArray(&sp->jpegtables, va_arg(ap, void*),
-		    (long) v32);
-		sp->jpegtables_length = v32;
-		TIFFSetFieldBit(tif, FIELD_JPEGTABLES);
-		break;
-	case TIFFTAG_JPEGQUALITY:
-		sp->jpegquality = va_arg(ap, int);
-		return (1);			/* pseudo tag */
-	case TIFFTAG_JPEGCOLORMODE:
-		sp->jpegcolormode = va_arg(ap, int);
-		/*
-		 * Mark whether returned data is up-sampled or not
-		 * so TIFFStripSize and TIFFTileSize return values
-		 * that reflect the true amount of data.
-		 */
-		tif->tif_flags &= ~TIFF_UPSAMPLED;
-		if (td->td_planarconfig == PLANARCONFIG_CONTIG) {
-		    if (td->td_photometric == PHOTOMETRIC_YCBCR &&
-		      sp->jpegcolormode == JPEGCOLORMODE_RGB) {
-			tif->tif_flags |= TIFF_UPSAMPLED;
-		    } else {
-			if (td->td_ycbcrsubsampling[0] != 1 ||
-			    td->td_ycbcrsubsampling[1] != 1)
-			    ; /* XXX what about up-sampling? */
-		    }
-		}
-		/*
-		 * Must recalculate cached tile size
-		 * in case sampling state changed.
-		 */
-		tif->tif_tilesize = TIFFTileSize(tif);
-		return (1);			/* pseudo tag */
-	case TIFFTAG_JPEGTABLESMODE:
-		sp->jpegtablesmode = va_arg(ap, int);
-		return (1);			/* pseudo tag */
-	case TIFFTAG_YCBCRSUBSAMPLING:
-                /* mark the fact that we have a real ycbcrsubsampling! */
-		sp->ycbcrsampling_fetched = 1;
-		return (*sp->vsetparent)(tif, tag, ap);
-	default:
-		return (*sp->vsetparent)(tif, tag, ap);
-	}
-	tif->tif_flags |= TIFF_DIRTYDIRECT;
-	return (1);
-}
-
-/*
- * Some JPEG-in-TIFF produces do not emit the YCBCRSUBSAMPLING values in
- * the TIFF tags, but still use non-default (2,2) values within the jpeg
- * data stream itself.  In order for TIFF applications to work properly
- * - for instance to get the strip buffer size right - it is imperative
- * that the subsampling be available before we start reading the image
- * data normally.  This function will attempt to load the first strip in
- * order to get the sampling values from the jpeg data stream.  Various
- * hacks are various places are done to ensure this function gets called
- * before the td_ycbcrsubsampling values are used from the directory structure,
- * including calling TIFFGetField() for the YCBCRSUBSAMPLING field from 
- * TIFFStripSize(), and the printing code in tif_print.c. 
- *
- * Note that JPEGPreDeocode() will produce a fairly loud warning when the
- * discovered sampling does not match the default sampling (2,2) or whatever
- * was actually in the tiff tags. 
- *
- * Problems:
- *  o This code will cause one whole strip/tile of compressed data to be
- *    loaded just to get the tags right, even if the imagery is never read.
- *    It would be more efficient to just load a bit of the header, and
- *    initialize things from that. 
- *
- * See the bug in bugzilla for details:
- *
- * http://bugzilla.remotesensing.org/show_bug.cgi?id=168
- *
- * Frank Warmerdam, July 2002
- */
-
-static void 
-JPEGFixupTestSubsampling( TIFF * tif )
-{
-#if CHECK_JPEG_YCBCR_SUBSAMPLING == 1
-    JPEGState *sp = JState(tif);
-    TIFFDirectory *td = &tif->tif_dir;
-
-    JPEGInitializeLibJPEG( tif );
-
-    /*
-     * Some JPEG-in-TIFF files don't provide the ycbcrsampling tags, 
-     * and use a sampling schema other than the default 2,2.  To handle
-     * this we actually have to scan the header of a strip or tile of
-     * jpeg data to get the sampling.  
-     */
-    if( !sp->cinfo.comm.is_decompressor 
-        || sp->ycbcrsampling_fetched  
-        || td->td_photometric != PHOTOMETRIC_YCBCR )
-        return;
-
-    sp->ycbcrsampling_fetched = 1;
-    if( TIFFIsTiled( tif ) )
-    {
-        if( !TIFFFillTile( tif, 0 ) )
-            return;
-    }
-    else
-    {
-        if( !TIFFFillStrip( tif, 0 ) )
-            return;
-    }
-
-    TIFFSetField( tif, TIFFTAG_YCBCRSUBSAMPLING, 
-                  (uint16) sp->h_sampling, (uint16) sp->v_sampling );
-#endif /* CHECK_JPEG_YCBCR_SUBSAMPLING == 1 */
-}
-
-static int
-JPEGVGetField(TIFF* tif, ttag_t tag, va_list ap)
-{
-	JPEGState* sp = JState(tif);
-
-	switch (tag) {
-	case TIFFTAG_JPEGTABLES:
-		/* u_short is bogus --- should be uint32 ??? */
-		/* TIFFWriteNormalTag needs fixed  XXX */
-		*va_arg(ap, u_short*) = (u_short) sp->jpegtables_length;
-		*va_arg(ap, void**) = sp->jpegtables;
-		break;
-	case TIFFTAG_JPEGQUALITY:
-		*va_arg(ap, int*) = sp->jpegquality;
-		break;
-	case TIFFTAG_JPEGCOLORMODE:
-		*va_arg(ap, int*) = sp->jpegcolormode;
-		break;
-	case TIFFTAG_JPEGTABLESMODE:
-		*va_arg(ap, int*) = sp->jpegtablesmode;
-		break;
-	case TIFFTAG_YCBCRSUBSAMPLING:
-                JPEGFixupTestSubsampling( tif );
-		return (*sp->vgetparent)(tif, tag, ap);
-		break;
-	default:
-		return (*sp->vgetparent)(tif, tag, ap);
-	}
-	return (1);
-}
-
-static void
-JPEGPrintDir(TIFF* tif, FILE* fd, long flags)
-{
-	JPEGState* sp = JState(tif);
-
-	(void) flags;
-	if (TIFFFieldSet(tif,FIELD_JPEGTABLES))
-		fprintf(fd, "  JPEG Tables: (%lu bytes)\n",
-			(u_long) sp->jpegtables_length);
-}
-
-static uint32
-JPEGDefaultStripSize(TIFF* tif, uint32 s)
-{
-	JPEGState* sp = JState(tif);
-	TIFFDirectory *td = &tif->tif_dir;
-
-	s = (*sp->defsparent)(tif, s);
-	if (s < td->td_imagelength)
-		s = TIFFroundup(s, td->td_ycbcrsubsampling[1] * DCTSIZE);
-	return (s);
-}
-
-static void
-JPEGDefaultTileSize(TIFF* tif, uint32* tw, uint32* th)
-{
-	JPEGState* sp = JState(tif);
-	TIFFDirectory *td = &tif->tif_dir;
-
-	(*sp->deftparent)(tif, tw, th);
-	*tw = TIFFroundup(*tw, td->td_ycbcrsubsampling[0] * DCTSIZE);
-	*th = TIFFroundup(*th, td->td_ycbcrsubsampling[1] * DCTSIZE);
-}
-
-/*
- * The JPEG library initialized used to be done in TIFFInitJPEG(), but
- * now that we allow a TIFF file to be opened in update mode it is necessary
- * to have some way of deciding whether compression or decompression is
- * desired other than looking at tif->tif_mode.  We accomplish this by 
- * examining {TILE/STRIP}BYTECOUNTS to see if there is a non-zero entry.
- * If so, we assume decompression is desired. 
- *
- * This is tricky, because TIFFInitJPEG() is called while the directory is
- * being read, and generally speaking the BYTECOUNTS tag won't have been read
- * at that point.  So we try to defer jpeg library initialization till we
- * do have that tag ... basically any access that might require the compressor
- * or decompressor that occurs after the reading of the directory. 
- *
- * In an ideal world compressors or decompressors would be setup
- * at the point where a single tile or strip was accessed (for read or write)
- * so that stuff like update of missing tiles, or replacement of tiles could
- * be done. However, we aren't trying to crack that nut just yet ...
- *
- * NFW, Feb 3rd, 2003.
- */
-
-static int JPEGInitializeLibJPEG( TIFF * tif )
-{
-    JPEGState* sp = JState(tif);
-    uint32 *byte_counts = NULL;
-    int     data_is_empty = TRUE;
-
-    if( sp->cinfo_initialized )
-        return 1;
-
-    /*
-     * Do we have tile data already?  Make sure we initialize the
-     * the state in decompressor mode if we have tile data, even if we
-     * are not in read-only file access mode. 
-     */
-    if( TIFFIsTiled( tif ) 
-        && TIFFGetField( tif, TIFFTAG_TILEBYTECOUNTS, &byte_counts ) 
-        && byte_counts != NULL )
-    {
-        data_is_empty = byte_counts[0] == 0;
-    }
-    if( !TIFFIsTiled( tif ) 
-        && TIFFGetField( tif, TIFFTAG_STRIPBYTECOUNTS, &byte_counts) 
-        && byte_counts != NULL )
-    {
-        data_is_empty = byte_counts[0] == 0;
-    }
-
-    /*
-     * Initialize libjpeg.
-     */
-    if (tif->tif_mode == O_RDONLY || !data_is_empty ) {
-        if (!TIFFjpeg_create_decompress(sp))
-            return (0);
-
-    } else {
-        if (!TIFFjpeg_create_compress(sp))
-            return (0);
-    }
-
-    sp->cinfo_initialized = TRUE;
-
-    return 1;
-}
-
-int
-TIFFInitJPEG(TIFF* tif, int scheme)
-{
-	JPEGState* sp;
-
-	assert(scheme == COMPRESSION_JPEG);
-
-	/*
-	 * Allocate state block so tag methods have storage to record values.
-	 */
-	tif->tif_data = (tidata_t) _TIFFmalloc(sizeof (JPEGState));
-
-	if (tif->tif_data == NULL) {
-		TIFFError("TIFFInitJPEG", "No space for JPEG state block");
-		return (0);
-	}
-        memset( tif->tif_data, 0, sizeof(JPEGState));
-
-	sp = JState(tif);
-	sp->tif = tif;				/* back link */
-
-	/*
-	 * Merge codec-specific tag information and
-	 * override parent get/set field methods.
-	 */
-	_TIFFMergeFieldInfo(tif, jpegFieldInfo, N(jpegFieldInfo));
-	sp->vgetparent = tif->tif_tagmethods.vgetfield;
-	tif->tif_tagmethods.vgetfield = JPEGVGetField;	/* hook for codec tags */
-	sp->vsetparent = tif->tif_tagmethods.vsetfield;
-	tif->tif_tagmethods.vsetfield = JPEGVSetField;	/* hook for codec tags */
-	tif->tif_tagmethods.printdir = JPEGPrintDir;	/* hook for codec tags */
-
-	/* Default values for codec-specific fields */
-	sp->jpegtables = NULL;
-	sp->jpegtables_length = 0;
-	sp->jpegquality = 75;			/* Default IJG quality */
-	sp->jpegcolormode = JPEGCOLORMODE_RAW;
-	sp->jpegtablesmode = JPEGTABLESMODE_QUANT | JPEGTABLESMODE_HUFF;
-
-        sp->ycbcrsampling_fetched = 0;
-
-	/*
-	 * Install codec methods.
-	 */
-	tif->tif_setupdecode = JPEGSetupDecode;
-	tif->tif_predecode = JPEGPreDecode;
-	tif->tif_decoderow = JPEGDecode;
-	tif->tif_decodestrip = JPEGDecode;
-	tif->tif_decodetile = JPEGDecode;
-	tif->tif_setupencode = JPEGSetupEncode;
-	tif->tif_preencode = JPEGPreEncode;
-	tif->tif_postencode = JPEGPostEncode;
-	tif->tif_encoderow = JPEGEncode;
-	tif->tif_encodestrip = JPEGEncode;
-	tif->tif_encodetile = JPEGEncode;
-	tif->tif_cleanup = JPEGCleanup;
-	sp->defsparent = tif->tif_defstripsize;
-	tif->tif_defstripsize = JPEGDefaultStripSize;
-	sp->deftparent = tif->tif_deftilesize;
-	tif->tif_deftilesize = JPEGDefaultTileSize;
-	tif->tif_flags |= TIFF_NOBITREV;	/* no bit reversal, please */
-
-        sp->cinfo_initialized = FALSE;
-
-        /*
-         * Mark the TIFFTAG_YCBCRSAMPLES as present even if it is not
-         * see: JPEGFixupTestSubsampling().
-         */
-        TIFFSetFieldBit( tif, FIELD_YCBCRSUBSAMPLING );
-
-	return (1);
-}
-#endif /* JPEG_SUPPORT */
diff --git a/src/tiff/tif_luv.c b/src/tiff/tif_luv.c
deleted file mode 100644
index b6011f3..0000000
--- a/src/tiff/tif_luv.c
+++ /dev/null
@@ -1,1586 +0,0 @@
-/*
- * Copyright (c) 1997 Greg Ward Larson
- * Copyright (c) 1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler, Greg Larson and Silicon Graphics may not be used in any
- * advertising or publicity relating to the software without the specific,
- * prior written permission of Sam Leffler, Greg Larson and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER, GREG LARSON OR SILICON GRAPHICS BE LIABLE
- * FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#include "tiffiop.h"
-#ifdef LOGLUV_SUPPORT
-
-/*
- * TIFF Library.
- * LogLuv compression support for high dynamic range images.
- *
- * Contributed by Greg Larson.
- *
- * LogLuv image support uses the TIFF library to store 16 or 10-bit
- * log luminance values with 8 bits each of u and v or a 14-bit index.
- *
- * The codec can take as input and produce as output 32-bit IEEE float values 
- * as well as 16-bit integer values.  A 16-bit luminance is interpreted
- * as a sign bit followed by a 15-bit integer that is converted
- * to and from a linear magnitude using the transformation:
- *
- *	L = 2^( (Le+.5)/256 - 64 )		# real from 15-bit
- *
- *	Le = floor( 256*(log2(L) + 64) )	# 15-bit from real
- *
- * The actual conversion to world luminance units in candelas per sq. meter
- * requires an additional multiplier, which is stored in the TIFFTAG_STONITS.
- * This value is usually set such that a reasonable exposure comes from
- * clamping decoded luminances above 1 to 1 in the displayed image.
- *
- * The 16-bit values for u and v may be converted to real values by dividing
- * each by 32768.  (This allows for negative values, which aren't useful as
- * far as we know, but are left in case of future improvements in human
- * color vision.)
- *
- * Conversion from (u,v), which is actually the CIE (u',v') system for
- * you color scientists, is accomplished by the following transformation:
- *
- *	u = 4*x / (-2*x + 12*y + 3)
- *	v = 9*y / (-2*x + 12*y + 3)
- *
- *	x = 9*u / (6*u - 16*v + 12)
- *	y = 4*v / (6*u - 16*v + 12)
- *
- * This process is greatly simplified by passing 32-bit IEEE floats
- * for each of three CIE XYZ coordinates.  The codec then takes care
- * of conversion to and from LogLuv, though the application is still
- * responsible for interpreting the TIFFTAG_STONITS calibration factor.
- *
- * By definition, a CIE XYZ vector of [1 1 1] corresponds to a neutral white
- * point of (x,y)=(1/3,1/3).  However, most color systems assume some other
- * white point, such as D65, and an absolute color conversion to XYZ then
- * to another color space with a different white point may introduce an
- * unwanted color cast to the image.  It is often desirable, therefore, to
- * perform a white point conversion that maps the input white to [1 1 1]
- * in XYZ, then record the original white point using the TIFFTAG_WHITEPOINT
- * tag value.  A decoder that demands absolute color calibration may use
- * this white point tag to get back the original colors, but usually it
- * will be ignored and the new white point will be used instead that
- * matches the output color space.
- *
- * Pixel information is compressed into one of two basic encodings, depending
- * on the setting of the compression tag, which is one of COMPRESSION_SGILOG
- * or COMPRESSION_SGILOG24.  For COMPRESSION_SGILOG, greyscale data is
- * stored as:
- *
- *	 1       15
- *	|-+---------------|
- *
- * COMPRESSION_SGILOG color data is stored as:
- *
- *	 1       15           8        8
- *	|-+---------------|--------+--------|
- *	 S       Le           ue       ve
- *
- * For the 24-bit COMPRESSION_SGILOG24 color format, the data is stored as:
- *
- *	     10           14
- *	|----------|--------------|
- *	     Le'          Ce
- *
- * There is no sign bit in the 24-bit case, and the (u,v) chromaticity is
- * encoded as an index for optimal color resolution.  The 10 log bits are
- * defined by the following conversions:
- *
- *	L = 2^((Le'+.5)/64 - 12)		# real from 10-bit
- *
- *	Le' = floor( 64*(log2(L) + 12) )	# 10-bit from real
- *
- * The 10 bits of the smaller format may be converted into the 15 bits of
- * the larger format by multiplying by 4 and adding 13314.  Obviously,
- * a smaller range of magnitudes is covered (about 5 orders of magnitude
- * instead of 38), and the lack of a sign bit means that negative luminances
- * are not allowed.  (Well, they aren't allowed in the real world, either,
- * but they are useful for certain types of image processing.)
- *
- * The desired user format is controlled by the setting the internal
- * pseudo tag TIFFTAG_SGILOGDATAFMT to one of:
- *  SGILOGDATAFMT_FLOAT       = IEEE 32-bit float XYZ values
- *  SGILOGDATAFMT_16BIT	      = 16-bit integer encodings of logL, u and v
- * Raw data i/o is also possible using:
- *  SGILOGDATAFMT_RAW         = 32-bit unsigned integer with encoded pixel
- * In addition, the following decoding is provided for ease of display:
- *  SGILOGDATAFMT_8BIT        = 8-bit default RGB gamma-corrected values
- *
- * For grayscale images, we provide the following data formats:
- *  SGILOGDATAFMT_FLOAT       = IEEE 32-bit float Y values
- *  SGILOGDATAFMT_16BIT       = 16-bit integer w/ encoded luminance
- *  SGILOGDATAFMT_8BIT        = 8-bit gray monitor values
- *
- * Note that the COMPRESSION_SGILOG applies a simple run-length encoding
- * scheme by separating the logL, u and v bytes for each row and applying
- * a PackBits type of compression.  Since the 24-bit encoding is not
- * adaptive, the 32-bit color format takes less space in many cases.
- *
- * Further control is provided over the conversion from higher-resolution
- * formats to final encoded values through the pseudo tag
- * TIFFTAG_SGILOGENCODE:
- *  SGILOGENCODE_NODITHER     = do not dither encoded values
- *  SGILOGENCODE_RANDITHER    = apply random dithering during encoding
- *
- * The default value of this tag is SGILOGENCODE_NODITHER for
- * COMPRESSION_SGILOG to maximize run-length encoding and
- * SGILOGENCODE_RANDITHER for COMPRESSION_SGILOG24 to turn
- * quantization errors into noise.
- */
-
-#include <stdio.h>
-#include <assert.h>
-#include <stdlib.h>
-#include <math.h>
-
-/*
- * State block for each open TIFF
- * file using LogLuv compression/decompression.
- */
-typedef	struct logLuvState LogLuvState;
-
-struct logLuvState {
-	int			user_datafmt;	/* user data format */
-	int			encode_meth;	/* encoding method */
-	int			pixel_size;	/* bytes per pixel */
-
-	tidata_t*		tbuf;		/* translation buffer */
-	int			tbuflen;	/* buffer length */
-	void (*tfunc)(LogLuvState*, tidata_t, int);
-
-	TIFFVSetMethod		vgetparent;	/* super-class method */
-	TIFFVSetMethod		vsetparent;	/* super-class method */
-};
-
-#define	DecoderState(tif)	((LogLuvState*) (tif)->tif_data)
-#define	EncoderState(tif)	((LogLuvState*) (tif)->tif_data)
-
-#define N(a)   (sizeof(a)/sizeof(a[0]))
-#define SGILOGDATAFMT_UNKNOWN	-1
-
-#define MINRUN		4	/* minimum run length */
-
-/*
- * Decode a string of 16-bit gray pixels.
- */
-static int
-LogL16Decode(TIFF* tif, tidata_t op, tsize_t occ, tsample_t s)
-{
-	LogLuvState* sp = DecoderState(tif);
-	int shft, i, npixels;
-	u_char* bp;
-	int16* tp;
-	int16 b;
-	int cc, rc;
-
-	assert(s == 0);
-	assert(sp != NULL);
-
-	npixels = occ / sp->pixel_size;
-
-	if (sp->user_datafmt == SGILOGDATAFMT_16BIT)
-		tp = (int16*) op;
-	else {
-		assert(sp->tbuflen >= npixels);
-		tp = (int16*) sp->tbuf;
-	}
-	_TIFFmemset((tdata_t) tp, 0, npixels*sizeof (tp[0]));
-
-	bp = (u_char*) tif->tif_rawcp;
-	cc = tif->tif_rawcc;
-					/* get each byte string */
-	for (shft = 2*8; (shft -= 8) >= 0; ) {
-		for (i = 0; i < npixels && cc > 0; )
-			if (*bp >= 128) {		/* run */
-				rc = *bp++ + (2-128);
-				b = (int16)(*bp++ << shft);
-				cc -= 2;
-				while (rc--)
-					tp[i++] |= b;
-			} else {			/* non-run */
-				rc = *bp++;		/* nul is noop */
-				while (--cc && rc--)
-					tp[i++] |= (int16)*bp++ << shft;
-			}
-		if (i != npixels) {
-			TIFFError(tif->tif_name,
-		"LogL16Decode: Not enough data at row %d (short %d pixels)",
-			    tif->tif_row, npixels - i);
-			tif->tif_rawcp = (tidata_t) bp;
-			tif->tif_rawcc = cc;
-			return (0);
-		}
-	}
-	(*sp->tfunc)(sp, op, npixels);
-	tif->tif_rawcp = (tidata_t) bp;
-	tif->tif_rawcc = cc;
-	return (1);
-}
-
-/*
- * Decode a string of 24-bit pixels.
- */
-static int
-LogLuvDecode24(TIFF* tif, tidata_t op, tsize_t occ, tsample_t s)
-{
-	LogLuvState* sp = DecoderState(tif);
-	int cc, i, npixels;
-	u_char* bp;
-	uint32* tp;
-
-	assert(s == 0);
-	assert(sp != NULL);
-
-	npixels = occ / sp->pixel_size;
-
-	if (sp->user_datafmt == SGILOGDATAFMT_RAW)
-		tp = (uint32 *)op;
-	else {
-		assert(sp->tbuflen >= npixels);
-		tp = (uint32 *) sp->tbuf;
-	}
-					/* copy to array of uint32 */
-	bp = (u_char*) tif->tif_rawcp;
-	cc = tif->tif_rawcc;
-	for (i = 0; i < npixels && cc > 0; i++) {
-		tp[i] = bp[0] << 16 | bp[1] << 8 | bp[2];
-		bp += 3;
-		cc -= 3;
-	}
-	tif->tif_rawcp = (tidata_t) bp;
-	tif->tif_rawcc = cc;
-	if (i != npixels) {
-		TIFFError(tif->tif_name,
-	    "LogLuvDecode24: Not enough data at row %d (short %d pixels)",
-		    tif->tif_row, npixels - i);
-		return (0);
-	}
-	(*sp->tfunc)(sp, op, npixels);
-	return (1);
-}
-
-/*
- * Decode a string of 32-bit pixels.
- */
-static int
-LogLuvDecode32(TIFF* tif, tidata_t op, tsize_t occ, tsample_t s)
-{
-	LogLuvState* sp;
-	int shft, i, npixels;
-	u_char* bp;
-	uint32* tp;
-	uint32 b;
-	int cc, rc;
-
-	assert(s == 0);
-	sp = DecoderState(tif);
-	assert(sp != NULL);
-
-	npixels = occ / sp->pixel_size;
-
-	if (sp->user_datafmt == SGILOGDATAFMT_RAW)
-		tp = (uint32*) op;
-	else {
-		assert(sp->tbuflen >= npixels);
-		tp = (uint32*) sp->tbuf;
-	}
-	_TIFFmemset((tdata_t) tp, 0, npixels*sizeof (tp[0]));
-
-	bp = (u_char*) tif->tif_rawcp;
-	cc = tif->tif_rawcc;
-					/* get each byte string */
-	for (shft = 4*8; (shft -= 8) >= 0; ) {
-		for (i = 0; i < npixels && cc > 0; )
-			if (*bp >= 128) {		/* run */
-				rc = *bp++ + (2-128);
-				b = (uint32)*bp++ << shft;
-				cc -= 2;
-				while (rc--)
-					tp[i++] |= b;
-			} else {			/* non-run */
-				rc = *bp++;		/* nul is noop */
-				while (--cc && rc--)
-					tp[i++] |= (uint32)*bp++ << shft;
-			}
-		if (i != npixels) {
-			TIFFError(tif->tif_name,
-		"LogLuvDecode32: Not enough data at row %d (short %d pixels)",
-			    tif->tif_row, npixels - i);
-			tif->tif_rawcp = (tidata_t) bp;
-			tif->tif_rawcc = cc;
-			return (0);
-		}
-	}
-	(*sp->tfunc)(sp, op, npixels);
-	tif->tif_rawcp = (tidata_t) bp;
-	tif->tif_rawcc = cc;
-	return (1);
-}
-
-/*
- * Decode a strip of pixels.  We break it into rows to
- * maintain synchrony with the encode algorithm, which
- * is row by row.
- */
-static int
-LogLuvDecodeStrip(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
-{
-	tsize_t rowlen = TIFFScanlineSize(tif);
-
-	assert(cc%rowlen == 0);
-	while (cc && (*tif->tif_decoderow)(tif, bp, rowlen, s))
-		bp += rowlen, cc -= rowlen;
-	return (cc == 0);
-}
-
-/*
- * Decode a tile of pixels.  We break it into rows to
- * maintain synchrony with the encode algorithm, which
- * is row by row.
- */
-static int
-LogLuvDecodeTile(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
-{
-	tsize_t rowlen = TIFFTileRowSize(tif);
-
-	assert(cc%rowlen == 0);
-	while (cc && (*tif->tif_decoderow)(tif, bp, rowlen, s))
-		bp += rowlen, cc -= rowlen;
-	return (cc == 0);
-}
-
-/*
- * Encode a row of 16-bit pixels.
- */
-static int
-LogL16Encode(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
-{
-	LogLuvState* sp = EncoderState(tif);
-	int shft, i, j, npixels;
-	tidata_t op;
-	int16* tp;
-	int16 b;
-	int occ, rc=0, mask, beg;
-
-	assert(s == 0);
-	assert(sp != NULL);
-	npixels = cc / sp->pixel_size;
-
-	if (sp->user_datafmt == SGILOGDATAFMT_16BIT)
-		tp = (int16*) bp;
-	else {
-		tp = (int16*) sp->tbuf;
-		assert(sp->tbuflen >= npixels);
-		(*sp->tfunc)(sp, bp, npixels);
-	}
-					/* compress each byte string */
-	op = tif->tif_rawcp;
-	occ = tif->tif_rawdatasize - tif->tif_rawcc;
-	for (shft = 2*8; (shft -= 8) >= 0; )
-		for (i = 0; i < npixels; i += rc) {
-			if (occ < 4) {
-				tif->tif_rawcp = op;
-				tif->tif_rawcc = tif->tif_rawdatasize - occ;
-				if (!TIFFFlushData1(tif))
-					return (-1);
-				op = tif->tif_rawcp;
-				occ = tif->tif_rawdatasize - tif->tif_rawcc;
-			}
-			mask = 0xff << shft;		/* find next run */
-			for (beg = i; beg < npixels; beg += rc) {
-				b = (int16) (tp[beg] & mask);
-				rc = 1;
-				while (rc < 127+2 && beg+rc < npixels &&
-						(tp[beg+rc] & mask) == b)
-					rc++;
-				if (rc >= MINRUN)
-					break;		/* long enough */
-			}
-			if (beg-i > 1 && beg-i < MINRUN) {
-				b = (int16) (tp[i] & mask);/*check short run */
-				j = i+1;
-				while ((tp[j++] & mask) == b)
-                                    if (j == beg) {
-                                        *op++ = (tidataval_t)(128-2+j-i);
-                                        *op++ = (tidataval_t) (b >> shft);
-                                        occ -= 2;
-                                        i = beg;
-                                        break;
-                                    }
-			}
-			while (i < beg) {		/* write out non-run */
-				if ((j = beg-i) > 127) j = 127;
-				if (occ < j+3) {
-                                    tif->tif_rawcp = op;
-                                    tif->tif_rawcc = tif->tif_rawdatasize - occ;
-                                    if (!TIFFFlushData1(tif))
-                                        return (-1);
-                                    op = tif->tif_rawcp;
-                                    occ = tif->tif_rawdatasize - tif->tif_rawcc;
-				}
-				*op++ = (tidataval_t) j; occ--;
-				while (j--) {
-					*op++ = (tidataval_t) (tp[i++] >> shft & 0xff);
-					occ--;
-				}
-			}
-			if (rc >= MINRUN) {		/* write out run */
-				*op++ = (tidataval_t) (128-2+rc);
-				*op++ = (tidataval_t) (tp[beg] >> shft & 0xff);
-				occ -= 2;
-			} else
-				rc = 0;
-		}
-	tif->tif_rawcp = op;
-	tif->tif_rawcc = tif->tif_rawdatasize - occ;
-
-	return (0);
-}
-
-/*
- * Encode a row of 24-bit pixels.
- */
-static int
-LogLuvEncode24(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
-{
-	LogLuvState* sp = EncoderState(tif);
-	int i, npixels, occ;
-	tidata_t op;
-	uint32* tp;
-
-	assert(s == 0);
-	assert(sp != NULL);
-	npixels = cc / sp->pixel_size;
-
-	if (sp->user_datafmt == SGILOGDATAFMT_RAW)
-		tp = (uint32*) bp;
-	else {
-		tp = (uint32*) sp->tbuf;
-		assert(sp->tbuflen >= npixels);
-		(*sp->tfunc)(sp, bp, npixels);
-	}
-					/* write out encoded pixels */
-	op = tif->tif_rawcp;
-	occ = tif->tif_rawdatasize - tif->tif_rawcc;
-	for (i = npixels; i--; ) {
-		if (occ < 3) {
-			tif->tif_rawcp = op;
-			tif->tif_rawcc = tif->tif_rawdatasize - occ;
-			if (!TIFFFlushData1(tif))
-				return (-1);
-			op = tif->tif_rawcp;
-			occ = tif->tif_rawdatasize - tif->tif_rawcc;
-		}
-		*op++ = (tidataval_t)(*tp >> 16);
-		*op++ = (tidataval_t)(*tp >> 8 & 0xff);
-		*op++ = (tidataval_t)(*tp++ & 0xff);
-		occ -= 3;
-	}
-	tif->tif_rawcp = op;
-	tif->tif_rawcc = tif->tif_rawdatasize - occ;
-
-	return (0);
-}
-
-/*
- * Encode a row of 32-bit pixels.
- */
-static int
-LogLuvEncode32(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
-{
-	LogLuvState* sp = EncoderState(tif);
-	int shft, i, j, npixels;
-	tidata_t op;
-	uint32* tp;
-	uint32 b;
-	int occ, rc=0, mask, beg;
-
-	assert(s == 0);
-	assert(sp != NULL);
-
-	npixels = cc / sp->pixel_size;
-
-	if (sp->user_datafmt == SGILOGDATAFMT_RAW)
-		tp = (uint32*) bp;
-	else {
-		tp = (uint32*) sp->tbuf;
-		assert(sp->tbuflen >= npixels);
-		(*sp->tfunc)(sp, bp, npixels);
-	}
-					/* compress each byte string */
-	op = tif->tif_rawcp;
-	occ = tif->tif_rawdatasize - tif->tif_rawcc;
-	for (shft = 4*8; (shft -= 8) >= 0; )
-		for (i = 0; i < npixels; i += rc) {
-			if (occ < 4) {
-				tif->tif_rawcp = op;
-				tif->tif_rawcc = tif->tif_rawdatasize - occ;
-				if (!TIFFFlushData1(tif))
-					return (-1);
-				op = tif->tif_rawcp;
-				occ = tif->tif_rawdatasize - tif->tif_rawcc;
-			}
-			mask = 0xff << shft;		/* find next run */
-			for (beg = i; beg < npixels; beg += rc) {
-				b = tp[beg] & mask;
-				rc = 1;
-				while (rc < 127+2 && beg+rc < npixels &&
-						(tp[beg+rc] & mask) == b)
-					rc++;
-				if (rc >= MINRUN)
-					break;		/* long enough */
-			}
-			if (beg-i > 1 && beg-i < MINRUN) {
-				b = tp[i] & mask;	/* check short run */
-				j = i+1;
-				while ((tp[j++] & mask) == b)
-					if (j == beg) {
-						*op++ = (tidataval_t)(128-2+j-i);
-						*op++ = (tidataval_t)(b >> shft);
-						occ -= 2;
-						i = beg;
-						break;
-					}
-			}
-			while (i < beg) {		/* write out non-run */
-				if ((j = beg-i) > 127) j = 127;
-				if (occ < j+3) {
-					tif->tif_rawcp = op;
-					tif->tif_rawcc = tif->tif_rawdatasize - occ;
-					if (!TIFFFlushData1(tif))
-						return (-1);
-					op = tif->tif_rawcp;
-					occ = tif->tif_rawdatasize - tif->tif_rawcc;
-				}
-				*op++ = (tidataval_t) j; occ--;
-				while (j--) {
-					*op++ = (tidataval_t)(tp[i++] >> shft & 0xff);
-					occ--;
-				}
-			}
-			if (rc >= MINRUN) {		/* write out run */
-				*op++ = (tidataval_t) (128-2+rc);
-				*op++ = (tidataval_t)(tp[beg] >> shft & 0xff);
-				occ -= 2;
-			} else
-				rc = 0;
-		}
-	tif->tif_rawcp = op;
-	tif->tif_rawcc = tif->tif_rawdatasize - occ;
-
-	return (0);
-}
-
-/*
- * Encode a strip of pixels.  We break it into rows to
- * avoid encoding runs across row boundaries.
- */
-static int
-LogLuvEncodeStrip(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
-{
-	tsize_t rowlen = TIFFScanlineSize(tif);
-
-	assert(cc%rowlen == 0);
-	while (cc && (*tif->tif_encoderow)(tif, bp, rowlen, s) == 0)
-		bp += rowlen, cc -= rowlen;
-	return (cc == 0);
-}
-
-/*
- * Encode a tile of pixels.  We break it into rows to
- * avoid encoding runs across row boundaries.
- */
-static int
-LogLuvEncodeTile(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
-{
-	tsize_t rowlen = TIFFTileRowSize(tif);
-
-	assert(cc%rowlen == 0);
-	while (cc && (*tif->tif_encoderow)(tif, bp, rowlen, s) == 0)
-		bp += rowlen, cc -= rowlen;
-	return (cc == 0);
-}
-
-/*
- * Encode/Decode functions for converting to and from user formats.
- */
-
-#include "uvcode.h"
-
-#ifndef UVSCALE
-#define U_NEU		0.210526316
-#define V_NEU		0.473684211
-#define UVSCALE		410.
-#endif
-
-#ifndef	M_LN2
-#define M_LN2		0.69314718055994530942
-#endif
-#ifndef M_PI
-#define M_PI		3.14159265358979323846
-#endif
-#define log2(x)		((1./M_LN2)*log(x))
-#define exp2(x)		exp(M_LN2*(x))
-
-#define itrunc(x,m)	((m)==SGILOGENCODE_NODITHER ? \
-				(int)(x) : \
-				(int)((x) + rand()*(1./RAND_MAX) - .5))
-
-#if !LOGLUV_PUBLIC
-static
-#endif
-double
-LogL16toY(int p16)		/* compute luminance from 16-bit LogL */
-{
-	int	Le = p16 & 0x7fff;
-	double	Y;
-
-	if (!Le)
-		return (0.);
-	Y = exp(M_LN2/256.*(Le+.5) - M_LN2*64.);
-	return (!(p16 & 0x8000) ? Y : -Y);
-}
-
-#if !LOGLUV_PUBLIC
-static
-#endif
-int
-LogL16fromY(double Y, int em)	/* get 16-bit LogL from Y */
-{
-	if (Y >= 1.8371976e19)
-		return (0x7fff);
-	if (Y <= -1.8371976e19)
-		return (0xffff);
-	if (Y > 5.4136769e-20)
-		return itrunc(256.*(log2(Y) + 64.), em);
-	if (Y < -5.4136769e-20)
-		return (~0x7fff | itrunc(256.*(log2(-Y) + 64.), em));
-	return (0);
-}
-
-static void
-L16toY(LogLuvState* sp, tidata_t op, int n)
-{
-	int16* l16 = (int16*) sp->tbuf;
-	float* yp = (float*) op;
-
-	while (n-- > 0)
-		*yp++ = (float)LogL16toY(*l16++);
-}
-
-static void
-L16toGry(LogLuvState* sp, tidata_t op, int n)
-{
-	int16* l16 = (int16*) sp->tbuf;
-	uint8* gp = (uint8*) op;
-
-	while (n-- > 0) {
-		double Y = LogL16toY(*l16++);
-		*gp++ = (uint8) ((Y <= 0.) ? 0 : (Y >= 1.) ? 255 : (int)(256.*sqrt(Y)));
-	}
-}
-
-static void
-L16fromY(LogLuvState* sp, tidata_t op, int n)
-{
-	int16* l16 = (int16*) sp->tbuf;
-	float* yp = (float*) op;
-
-	while (n-- > 0)
-		*l16++ = (int16) (LogL16fromY(*yp++, sp->encode_meth));
-}
-
-#if !LOGLUV_PUBLIC
-static
-#endif
-void
-XYZtoRGB24(float xyz[3], uint8 rgb[3])
-{
-	double	r, g, b;
-					/* assume CCIR-709 primaries */
-	r =  2.690*xyz[0] + -1.276*xyz[1] + -0.414*xyz[2];
-	g = -1.022*xyz[0] +  1.978*xyz[1] +  0.044*xyz[2];
-	b =  0.061*xyz[0] + -0.224*xyz[1] +  1.163*xyz[2];
-					/* assume 2.0 gamma for speed */
-	/* could use integer sqrt approx., but this is probably faster */
-	rgb[0] = (uint8)((r<=0.) ? 0 : (r >= 1.) ? 255 : (int)(256.*sqrt(r)));
-	rgb[1] = (uint8)((g<=0.) ? 0 : (g >= 1.) ? 255 : (int)(256.*sqrt(g)));
-	rgb[2] = (uint8)((b<=0.) ? 0 : (b >= 1.) ? 255 : (int)(256.*sqrt(b)));
-}
-
-#if !LOGLUV_PUBLIC
-static
-#endif
-double
-LogL10toY(int p10)		/* compute luminance from 10-bit LogL */
-{
-	if (p10 == 0)
-		return (0.);
-	return (exp(M_LN2/64.*(p10+.5) - M_LN2*12.));
-}
-
-#if !LOGLUV_PUBLIC
-static
-#endif
-int
-LogL10fromY(double Y, int em)	/* get 10-bit LogL from Y */
-{
-	if (Y >= 15.742)
-		return (0x3ff);
-	else if (Y <= .00024283)
-		return (0);
-	else
-		return itrunc(64.*(log2(Y) + 12.), em);
-}
-
-#define NANGLES		100
-#define uv2ang(u, v)	( (NANGLES*.499999999/M_PI) \
-				* atan2((v)-V_NEU,(u)-U_NEU) + .5*NANGLES )
-
-static int
-oog_encode(double u, double v)		/* encode out-of-gamut chroma */
-{
-	static int	oog_table[NANGLES];
-	static int	initialized = 0;
-	register int	i;
-	
-	if (!initialized) {		/* set up perimeter table */
-		double	eps[NANGLES], ua, va, ang, epsa;
-		int	ui, vi, ustep;
-		for (i = NANGLES; i--; )
-			eps[i] = 2.;
-		for (vi = UV_NVS; vi--; ) {
-			va = UV_VSTART + (vi+.5)*UV_SQSIZ;
-			ustep = uv_row[vi].nus-1;
-			if (vi == UV_NVS-1 || vi == 0 || ustep <= 0)
-				ustep = 1;
-			for (ui = uv_row[vi].nus-1; ui >= 0; ui -= ustep) {
-				ua = uv_row[vi].ustart + (ui+.5)*UV_SQSIZ;
-				ang = uv2ang(ua, va);
-                                i = (int) ang;
-				epsa = fabs(ang - (i+.5));
-				if (epsa < eps[i]) {
-					oog_table[i] = uv_row[vi].ncum + ui;
-					eps[i] = epsa;
-				}
-			}
-		}
-		for (i = NANGLES; i--; )	/* fill any holes */
-			if (eps[i] > 1.5) {
-				int	i1, i2;
-				for (i1 = 1; i1 < NANGLES/2; i1++)
-					if (eps[(i+i1)%NANGLES] < 1.5)
-						break;
-				for (i2 = 1; i2 < NANGLES/2; i2++)
-					if (eps[(i+NANGLES-i2)%NANGLES] < 1.5)
-						break;
-				if (i1 < i2)
-					oog_table[i] =
-						oog_table[(i+i1)%NANGLES];
-				else
-					oog_table[i] =
-						oog_table[(i+NANGLES-i2)%NANGLES];
-			}
-		initialized = 1;
-	}
-	i = (int) uv2ang(u, v);		/* look up hue angle */
-	return (oog_table[i]);
-}
-
-#undef uv2ang
-#undef NANGLES
-
-#if !LOGLUV_PUBLIC
-static
-#endif
-int
-uv_encode(double u, double v, int em)	/* encode (u',v') coordinates */
-{
-	register int	vi, ui;
-
-	if (v < UV_VSTART)
-		return oog_encode(u, v);
-	vi = itrunc((v - UV_VSTART)*(1./UV_SQSIZ), em);
-	if (vi >= UV_NVS)
-		return oog_encode(u, v);
-	if (u < uv_row[vi].ustart)
-		return oog_encode(u, v);
-	ui = itrunc((u - uv_row[vi].ustart)*(1./UV_SQSIZ), em);
-	if (ui >= uv_row[vi].nus)
-		return oog_encode(u, v);
-
-	return (uv_row[vi].ncum + ui);
-}
-
-#if !LOGLUV_PUBLIC
-static
-#endif
-int
-uv_decode(double *up, double *vp, int c)	/* decode (u',v') index */
-{
-	int	upper, lower;
-	register int	ui, vi;
-
-	if (c < 0 || c >= UV_NDIVS)
-		return (-1);
-	lower = 0;				/* binary search */
-	upper = UV_NVS;
-	while (upper - lower > 1) {
-		vi = (lower + upper) >> 1;
-		ui = c - uv_row[vi].ncum;
-		if (ui > 0)
-			lower = vi;
-		else if (ui < 0)
-			upper = vi;
-		else {
-			lower = vi;
-			break;
-		}
-	}
-	vi = lower;
-	ui = c - uv_row[vi].ncum;
-	*up = uv_row[vi].ustart + (ui+.5)*UV_SQSIZ;
-	*vp = UV_VSTART + (vi+.5)*UV_SQSIZ;
-	return (0);
-}
-
-#if !LOGLUV_PUBLIC
-static
-#endif
-void
-LogLuv24toXYZ(uint32 p, float XYZ[3])
-{
-	int	Ce;
-	double	L, u, v, s, x, y;
-					/* decode luminance */
-	L = LogL10toY(p>>14 & 0x3ff);
-	if (L <= 0.) {
-		XYZ[0] = XYZ[1] = XYZ[2] = 0.;
-		return;
-	}
-					/* decode color */
-	Ce = p & 0x3fff;
-	if (uv_decode(&u, &v, Ce) < 0) {
-		u = U_NEU; v = V_NEU;
-	}
-	s = 1./(6.*u - 16.*v + 12.);
-	x = 9.*u * s;
-	y = 4.*v * s;
-					/* convert to XYZ */
-	XYZ[0] = (float)(x/y * L);
-	XYZ[1] = (float)L;
-	XYZ[2] = (float)((1.-x-y)/y * L);
-}
-
-#if !LOGLUV_PUBLIC
-static
-#endif
-uint32
-LogLuv24fromXYZ(float XYZ[3], int em)
-{
-	int	Le, Ce;
-	double	u, v, s;
-					/* encode luminance */
-	Le = LogL10fromY(XYZ[1], em);
-					/* encode color */
-	s = XYZ[0] + 15.*XYZ[1] + 3.*XYZ[2];
-	if (!Le || s <= 0.) {
-		u = U_NEU;
-		v = V_NEU;
-	} else {
-		u = 4.*XYZ[0] / s;
-		v = 9.*XYZ[1] / s;
-	}
-	Ce = uv_encode(u, v, em);
-	if (Ce < 0)			/* never happens */
-		Ce = uv_encode(U_NEU, V_NEU, SGILOGENCODE_NODITHER);
-					/* combine encodings */
-	return (Le << 14 | Ce);
-}
-
-static void
-Luv24toXYZ(LogLuvState* sp, tidata_t op, int n)
-{
-	uint32* luv = (uint32*) sp->tbuf;
-	float* xyz = (float*) op;
-
-	while (n-- > 0) {
-		LogLuv24toXYZ(*luv, xyz);
-		xyz += 3;
-		luv++;
-	}
-}
-
-static void
-Luv24toLuv48(LogLuvState* sp, tidata_t op, int n)
-{
-	uint32* luv = (uint32*) sp->tbuf;
-	int16* luv3 = (int16*) op;
-
-	while (n-- > 0) {
-		double u, v;
-
-		*luv3++ = (int16)((*luv >> 12 & 0xffd) + 13314);
-		if (uv_decode(&u, &v, *luv&0x3fff) < 0) {
-			u = U_NEU;
-			v = V_NEU;
-		}
-		*luv3++ = (int16)(u * (1L<<15));
-		*luv3++ = (int16)(v * (1L<<15));
-		luv++;
-	}
-}
-
-static void
-Luv24toRGB(LogLuvState* sp, tidata_t op, int n)
-{
-	uint32* luv = (uint32*) sp->tbuf;
-	uint8* rgb = (uint8*) op;
-
-	while (n-- > 0) {
-		float xyz[3];
-
-		LogLuv24toXYZ(*luv++, xyz);
-		XYZtoRGB24(xyz, rgb);
-		rgb += 3;
-	}
-}
-
-static void
-Luv24fromXYZ(LogLuvState* sp, tidata_t op, int n)
-{
-	uint32* luv = (uint32*) sp->tbuf;
-	float* xyz = (float*) op;
-
-	while (n-- > 0) {
-		*luv++ = LogLuv24fromXYZ(xyz, sp->encode_meth);
-		xyz += 3;
-	}
-}
-
-static void
-Luv24fromLuv48(LogLuvState* sp, tidata_t op, int n)
-{
-	uint32* luv = (uint32*) sp->tbuf;
-	int16* luv3 = (int16*) op;
-
-	while (n-- > 0) {
-		int Le, Ce;
-
-		if (luv3[0] <= 0)
-			Le = 0;
-		else if (luv3[0] >= (1<<12)+3314)
-			Le = (1<<10) - 1;
-		else if (sp->encode_meth == SGILOGENCODE_NODITHER)
-			Le = (luv3[0]-3314) >> 2;
-		else
-			Le = itrunc(.25*(luv3[0]-3314.), sp->encode_meth);
-
-		Ce = uv_encode((luv3[1]+.5)/(1<<15), (luv3[2]+.5)/(1<<15),
-					sp->encode_meth);
-		if (Ce < 0)	/* never happens */
-			Ce = uv_encode(U_NEU, V_NEU, SGILOGENCODE_NODITHER);
-		*luv++ = (uint32)Le << 14 | Ce;
-		luv3 += 3;
-	}
-}
-
-#if !LOGLUV_PUBLIC
-static
-#endif
-void
-LogLuv32toXYZ(uint32 p, float XYZ[3])
-{
-	double	L, u, v, s, x, y;
-					/* decode luminance */
-	L = LogL16toY((int)p >> 16);
-	if (L <= 0.) {
-		XYZ[0] = XYZ[1] = XYZ[2] = 0.;
-		return;
-	}
-					/* decode color */
-	u = 1./UVSCALE * ((p>>8 & 0xff) + .5);
-	v = 1./UVSCALE * ((p & 0xff) + .5);
-	s = 1./(6.*u - 16.*v + 12.);
-	x = 9.*u * s;
-	y = 4.*v * s;
-					/* convert to XYZ */
-	XYZ[0] = (float)(x/y * L);
-	XYZ[1] = (float)L;
-	XYZ[2] = (float)((1.-x-y)/y * L);
-}
-
-#if !LOGLUV_PUBLIC
-static
-#endif
-uint32
-LogLuv32fromXYZ(float XYZ[3], int em)
-{
-	unsigned int	Le, ue, ve;
-	double	u, v, s;
-					/* encode luminance */
-	Le = (unsigned int)LogL16fromY(XYZ[1], em);
-					/* encode color */
-	s = XYZ[0] + 15.*XYZ[1] + 3.*XYZ[2];
-	if (!Le || s <= 0.) {
-		u = U_NEU;
-		v = V_NEU;
-	} else {
-		u = 4.*XYZ[0] / s;
-		v = 9.*XYZ[1] / s;
-	}
-	if (u <= 0.) ue = 0;
-	else ue = itrunc(UVSCALE*u, em);
-	if (ue > 255) ue = 255;
-	if (v <= 0.) ve = 0;
-	else ve = itrunc(UVSCALE*v, em);
-	if (ve > 255) ve = 255;
-					/* combine encodings */
-	return (Le << 16 | ue << 8 | ve);
-}
-
-static void
-Luv32toXYZ(LogLuvState* sp, tidata_t op, int n)
-{
-	uint32* luv = (uint32*) sp->tbuf;
-	float* xyz = (float*) op;
-
-	while (n-- > 0) {
-		LogLuv32toXYZ(*luv++, xyz);
-		xyz += 3;
-	}
-}
-
-static void
-Luv32toLuv48(LogLuvState* sp, tidata_t op, int n)
-{
-	uint32* luv = (uint32*) sp->tbuf;
-	int16* luv3 = (int16*) op;
-
-	while (n-- > 0) {
-		double u, v;
-
-		*luv3++ = (int16)(*luv >> 16);
-		u = 1./UVSCALE * ((*luv>>8 & 0xff) + .5);
-		v = 1./UVSCALE * ((*luv & 0xff) + .5);
-		*luv3++ = (int16)(u * (1L<<15));
-		*luv3++ = (int16)(v * (1L<<15));
-		luv++;
-	}
-}
-
-static void
-Luv32toRGB(LogLuvState* sp, tidata_t op, int n)
-{
-	uint32* luv = (uint32*) sp->tbuf;
-	uint8* rgb = (uint8*) op;
-
-	while (n-- > 0) {
-		float xyz[3];
-
-		LogLuv32toXYZ(*luv++, xyz);
-		XYZtoRGB24(xyz, rgb);
-		rgb += 3;
-	}
-}
-
-static void
-Luv32fromXYZ(LogLuvState* sp, tidata_t op, int n)
-{
-	uint32* luv = (uint32*) sp->tbuf;
-	float* xyz = (float*) op;
-
-	while (n-- > 0) {
-		*luv++ = LogLuv32fromXYZ(xyz, sp->encode_meth);
-		xyz += 3;
-	}
-}
-
-static void
-Luv32fromLuv48(LogLuvState* sp, tidata_t op, int n)
-{
-	uint32* luv = (uint32*) sp->tbuf;
-	int16* luv3 = (int16*) op;
-
-	if (sp->encode_meth == SGILOGENCODE_NODITHER) {
-		while (n-- > 0) {
-			*luv++ = (uint32)luv3[0] << 16 |
-				(luv3[1]*(uint32)(UVSCALE+.5) >> 7 & 0xff00) |
-				(luv3[2]*(uint32)(UVSCALE+.5) >> 15 & 0xff);
-			luv3 += 3;
-		}
-		return;
-	}
-	while (n-- > 0) {
-		*luv++ = (uint32)luv3[0] << 16 |
-	(itrunc(luv3[1]*(UVSCALE/(1<<15)), sp->encode_meth) << 8 & 0xff00) |
-		(itrunc(luv3[2]*(UVSCALE/(1<<15)), sp->encode_meth) & 0xff);
-		luv3 += 3;
-	}
-}
-
-static void
-_logLuvNop(LogLuvState* sp, tidata_t op, int n)
-{
-	(void) sp; (void) op; (void) n;
-}
-
-static int
-LogL16GuessDataFmt(TIFFDirectory *td)
-{
-#define	PACK(s,b,f)	(((b)<<6)|((s)<<3)|(f))
-	switch (PACK(td->td_samplesperpixel, td->td_bitspersample, td->td_sampleformat)) {
-	case PACK(1, 32, SAMPLEFORMAT_IEEEFP):
-		return (SGILOGDATAFMT_FLOAT);
-	case PACK(1, 16, SAMPLEFORMAT_VOID):
-	case PACK(1, 16, SAMPLEFORMAT_INT):
-	case PACK(1, 16, SAMPLEFORMAT_UINT):
-		return (SGILOGDATAFMT_16BIT);
-	case PACK(1,  8, SAMPLEFORMAT_VOID):
-	case PACK(1,  8, SAMPLEFORMAT_UINT):
-		return (SGILOGDATAFMT_8BIT);
-	}
-#undef PACK
-	return (SGILOGDATAFMT_UNKNOWN);
-}
-
-static int
-LogL16InitState(TIFF* tif)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-	LogLuvState* sp = DecoderState(tif);
-	static const char module[] = "LogL16InitState";
-
-	assert(sp != NULL);
-	assert(td->td_photometric == PHOTOMETRIC_LOGL);
-
-	/* for some reason, we can't do this in TIFFInitLogL16 */
-	if (sp->user_datafmt == SGILOGDATAFMT_UNKNOWN)
-		sp->user_datafmt = LogL16GuessDataFmt(td);
-	switch (sp->user_datafmt) {
-	case SGILOGDATAFMT_FLOAT:
-		sp->pixel_size = sizeof (float);
-		break;
-	case SGILOGDATAFMT_16BIT:
-		sp->pixel_size = sizeof (int16);
-		break;
-	case SGILOGDATAFMT_8BIT:
-		sp->pixel_size = sizeof (uint8);
-		break;
-	default:
-		TIFFError(tif->tif_name,
-		    "No support for converting user data format to LogL");
-		return (0);
-	}
-	sp->tbuflen = td->td_imagewidth * td->td_rowsperstrip;
-	sp->tbuf = (tidata_t*) _TIFFmalloc(sp->tbuflen * sizeof (int16));
-	if (sp->tbuf == NULL) {
-		TIFFError(module, "%s: No space for SGILog translation buffer",
-		    tif->tif_name);
-		return (0);
-	}
-	return (1);
-}
-
-static int
-LogLuvGuessDataFmt(TIFFDirectory *td)
-{
-	int guess;
-
-	/*
-	 * If the user didn't tell us their datafmt,
-	 * take our best guess from the bitspersample.
-	 */
-#define	PACK(a,b)	(((a)<<3)|(b))
-	switch (PACK(td->td_bitspersample, td->td_sampleformat)) {
-	case PACK(32, SAMPLEFORMAT_IEEEFP):
-		guess = SGILOGDATAFMT_FLOAT;
-		break;
-	case PACK(32, SAMPLEFORMAT_VOID):
-	case PACK(32, SAMPLEFORMAT_UINT):
-	case PACK(32, SAMPLEFORMAT_INT):
-		guess = SGILOGDATAFMT_RAW;
-		break;
-	case PACK(16, SAMPLEFORMAT_VOID):
-	case PACK(16, SAMPLEFORMAT_INT):
-	case PACK(16, SAMPLEFORMAT_UINT):
-		guess = SGILOGDATAFMT_16BIT;
-		break;
-	case PACK( 8, SAMPLEFORMAT_VOID):
-	case PACK( 8, SAMPLEFORMAT_UINT):
-		guess = SGILOGDATAFMT_8BIT;
-		break;
-	default:
-		guess = SGILOGDATAFMT_UNKNOWN;
-		break;
-#undef PACK
-	}
-	/*
-	 * Double-check samples per pixel.
-	 */
-	switch (td->td_samplesperpixel) {
-	case 1:
-		if (guess != SGILOGDATAFMT_RAW)
-			guess = SGILOGDATAFMT_UNKNOWN;
-		break;
-	case 3:
-		if (guess == SGILOGDATAFMT_RAW)
-			guess = SGILOGDATAFMT_UNKNOWN;
-		break;
-	default:
-		guess = SGILOGDATAFMT_UNKNOWN;
-		break;
-	}
-	return (guess);
-}
-
-static int
-LogLuvInitState(TIFF* tif)
-{
-	TIFFDirectory* td = &tif->tif_dir;
-	LogLuvState* sp = DecoderState(tif);
-	static const char module[] = "LogLuvInitState";
-
-	assert(sp != NULL);
-	assert(td->td_photometric == PHOTOMETRIC_LOGLUV);
-
-	/* for some reason, we can't do this in TIFFInitLogLuv */
-	if (td->td_planarconfig != PLANARCONFIG_CONTIG) {
-		TIFFError(module,
-		    "SGILog compression cannot handle non-contiguous data");
-		return (0);
-	}
-	if (sp->user_datafmt == SGILOGDATAFMT_UNKNOWN)
-		sp->user_datafmt = LogLuvGuessDataFmt(td);
-	switch (sp->user_datafmt) {
-	case SGILOGDATAFMT_FLOAT:
-		sp->pixel_size = 3*sizeof (float);
-		break;
-	case SGILOGDATAFMT_16BIT:
-		sp->pixel_size = 3*sizeof (int16);
-		break;
-	case SGILOGDATAFMT_RAW:
-		sp->pixel_size = sizeof (uint32);
-		break;
-	case SGILOGDATAFMT_8BIT:
-		sp->pixel_size = 3*sizeof (uint8);
-		break;
-	default:
-		TIFFError(tif->tif_name,
-		    "No support for converting user data format to LogLuv");
-		return (0);
-	}
-	sp->tbuflen = td->td_imagewidth * td->td_rowsperstrip;
-	sp->tbuf = (tidata_t*) _TIFFmalloc(sp->tbuflen * sizeof (uint32));
-	if (sp->tbuf == NULL) {
-		TIFFError(module, "%s: No space for SGILog translation buffer",
-		    tif->tif_name);
-		return (0);
-	}
-	return (1);
-}
-
-static int
-LogLuvSetupDecode(TIFF* tif)
-{
-	LogLuvState* sp = DecoderState(tif);
-	TIFFDirectory* td = &tif->tif_dir;
-
-	tif->tif_postdecode = _TIFFNoPostDecode;
-	switch (td->td_photometric) {
-	case PHOTOMETRIC_LOGLUV:
-		if (!LogLuvInitState(tif))
-			break;
-		if (td->td_compression == COMPRESSION_SGILOG24) {
-			tif->tif_decoderow = LogLuvDecode24;
-			switch (sp->user_datafmt) {
-			case SGILOGDATAFMT_FLOAT:
-				sp->tfunc = Luv24toXYZ;
-				break;
-			case SGILOGDATAFMT_16BIT:
-				sp->tfunc = Luv24toLuv48;
-				break;
-			case SGILOGDATAFMT_8BIT:
-				sp->tfunc = Luv24toRGB;
-				break;
-			}
-		} else {
-			tif->tif_decoderow = LogLuvDecode32;
-			switch (sp->user_datafmt) {
-			case SGILOGDATAFMT_FLOAT:
-				sp->tfunc = Luv32toXYZ;
-				break;
-			case SGILOGDATAFMT_16BIT:
-				sp->tfunc = Luv32toLuv48;
-				break;
-			case SGILOGDATAFMT_8BIT:
-				sp->tfunc = Luv32toRGB;
-				break;
-			}
-		}
-		return (1);
-	case PHOTOMETRIC_LOGL:
-		if (!LogL16InitState(tif))
-			break;
-		tif->tif_decoderow = LogL16Decode;
-		switch (sp->user_datafmt) {
-		case SGILOGDATAFMT_FLOAT:
-			sp->tfunc = L16toY;
-			break;
-		case SGILOGDATAFMT_8BIT:
-			sp->tfunc = L16toGry;
-			break;
-		}
-		return (1);
-	default:
-		TIFFError(tif->tif_name,
-    "Inappropriate photometric interpretation %d for SGILog compression; %s",
-		    td->td_photometric, "must be either LogLUV or LogL");
-		break;
-	}
-	return (0);
-}
-
-static int
-LogLuvSetupEncode(TIFF* tif)
-{
-	LogLuvState* sp = EncoderState(tif);
-	TIFFDirectory* td = &tif->tif_dir;
-
-	switch (td->td_photometric) {
-	case PHOTOMETRIC_LOGLUV:
-		if (!LogLuvInitState(tif))
-			break;
-		if (td->td_compression == COMPRESSION_SGILOG24) {
-			tif->tif_encoderow = LogLuvEncode24;
-			switch (sp->user_datafmt) {
-			case SGILOGDATAFMT_FLOAT:
-				sp->tfunc = Luv24fromXYZ;
-				break;
-			case SGILOGDATAFMT_16BIT:
-				sp->tfunc = Luv24fromLuv48;
-				break;
-			case SGILOGDATAFMT_RAW:
-				break;
-			default:
-				goto notsupported;
-			}
-		} else {
-			tif->tif_encoderow = LogLuvEncode32;
-			switch (sp->user_datafmt) {
-			case SGILOGDATAFMT_FLOAT:
-				sp->tfunc = Luv32fromXYZ;
-				break;
-			case SGILOGDATAFMT_16BIT:
-				sp->tfunc = Luv32fromLuv48;
-				break;
-			case SGILOGDATAFMT_RAW:
-				break;
-			default:
-				goto notsupported;
-			}
-		}
-		break;
-	case PHOTOMETRIC_LOGL:
-		if (!LogL16InitState(tif))
-			break;
-		tif->tif_encoderow = LogL16Encode;
-		switch (sp->user_datafmt) {
-		case SGILOGDATAFMT_FLOAT:
-			sp->tfunc = L16fromY;
-			break;
-		case SGILOGDATAFMT_16BIT:
-			break;
-		default:
-			goto notsupported;
-		}
-		break;
-	default:
-		TIFFError(tif->tif_name,
-    "Inappropriate photometric interpretation %d for SGILog compression; %s",
-    		    td->td_photometric, "must be either LogLUV or LogL");
-		break;
-	}
-	return (1);
-notsupported:
-	TIFFError(tif->tif_name,
-	    "SGILog compression supported only for %s, or raw data",
-	    td->td_photometric == PHOTOMETRIC_LOGL ? "Y, L" : "XYZ, Luv");
-	return (0);
-}
-
-static void
-LogLuvClose(TIFF* tif)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-
-	/*
-	 * For consistency, we always want to write out the same
-	 * bitspersample and sampleformat for our TIFF file,
-	 * regardless of the data format being used by the application.
-	 * Since this routine is called after tags have been set but
-	 * before they have been recorded in the file, we reset them here.
-	 */
-	td->td_samplesperpixel =
-	    (td->td_photometric == PHOTOMETRIC_LOGL) ? 1 : 3;
-	td->td_bitspersample = 16;
-	td->td_sampleformat = SAMPLEFORMAT_INT;
-}
-
-static void
-LogLuvCleanup(TIFF* tif)
-{
-	LogLuvState* sp = (LogLuvState *)tif->tif_data;
-
-	if (sp) {
-		if (sp->tbuf)
-			_TIFFfree(sp->tbuf);
-		_TIFFfree(sp);
-		tif->tif_data = NULL;
-	}
-}
-
-static int
-LogLuvVSetField(TIFF* tif, ttag_t tag, va_list ap)
-{
-	LogLuvState* sp = DecoderState(tif);
-	int bps, fmt;
-
-	switch (tag) {
-	case TIFFTAG_SGILOGDATAFMT:
-		sp->user_datafmt = va_arg(ap, int);
-		/*
-		 * Tweak the TIFF header so that the rest of libtiff knows what
-		 * size of data will be passed between app and library, and
-		 * assume that the app knows what it is doing and is not
-		 * confused by these header manipulations...
-		 */
-		switch (sp->user_datafmt) {
-		case SGILOGDATAFMT_FLOAT:
-			bps = 32, fmt = SAMPLEFORMAT_IEEEFP;
-			break;
-		case SGILOGDATAFMT_16BIT:
-			bps = 16, fmt = SAMPLEFORMAT_INT;
-			break;
-		case SGILOGDATAFMT_RAW:
-			bps = 32, fmt = SAMPLEFORMAT_UINT;
-			TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1);
-			break;
-		case SGILOGDATAFMT_8BIT:
-			bps = 8, fmt = SAMPLEFORMAT_UINT;
-			break;
-		default:
-			TIFFError(tif->tif_name,
-			    "Unknown data format %d for LogLuv compression",
-			    sp->user_datafmt);
-			return (0);
-		}
-		TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bps);
-		TIFFSetField(tif, TIFFTAG_SAMPLEFORMAT, fmt);
-		/*
-		 * Must recalculate sizes should bits/sample change.
-		 */
-		tif->tif_tilesize = TIFFTileSize(tif);
-		tif->tif_scanlinesize = TIFFScanlineSize(tif);
-		return (1);
-	case TIFFTAG_SGILOGENCODE:
-		sp->encode_meth = va_arg(ap, int);
-		if (sp->encode_meth != SGILOGENCODE_NODITHER &&
-				sp->encode_meth != SGILOGENCODE_RANDITHER) {
-			TIFFError(tif->tif_name,
-				"Unknown encoding %d for LogLuv compression",
-				sp->encode_meth);
-			return (0);
-		}
-		return (1);
-	default:
-		return (*sp->vsetparent)(tif, tag, ap);
-	}
-}
-
-static int
-LogLuvVGetField(TIFF* tif, ttag_t tag, va_list ap)
-{
-	LogLuvState *sp = (LogLuvState *)tif->tif_data;
-
-	switch (tag) {
-	case TIFFTAG_SGILOGDATAFMT:
-		*va_arg(ap, int*) = sp->user_datafmt;
-		return (1);
-	default:
-		return (*sp->vgetparent)(tif, tag, ap);
-	}
-}
-
-static const TIFFFieldInfo LogLuvFieldInfo[] = {
-    { TIFFTAG_SGILOGDATAFMT,	  0, 0,	TIFF_SHORT,	FIELD_PSEUDO,
-      TRUE,	FALSE,	"SGILogDataFmt"},
-    { TIFFTAG_SGILOGENCODE,	  0, 0, TIFF_SHORT,	FIELD_PSEUDO,
-      TRUE,	FALSE,	"SGILogEncode"}
-};
-
-int
-TIFFInitSGILog(TIFF* tif, int scheme)
-{
-	static const char module[] = "TIFFInitSGILog";
-	LogLuvState* sp;
-
-	assert(scheme == COMPRESSION_SGILOG24 || scheme == COMPRESSION_SGILOG);
-
-	/*
-	 * Allocate state block so tag methods have storage to record values.
-	 */
-	tif->tif_data = (tidata_t) _TIFFmalloc(sizeof (LogLuvState));
-	if (tif->tif_data == NULL)
-		goto bad;
-	sp = (LogLuvState*) tif->tif_data;
-	_TIFFmemset((tdata_t)sp, 0, sizeof (*sp));
-	sp->user_datafmt = SGILOGDATAFMT_UNKNOWN;
-	sp->encode_meth = (scheme == COMPRESSION_SGILOG24) ?
-				SGILOGENCODE_RANDITHER : SGILOGENCODE_NODITHER;
-	sp->tfunc = _logLuvNop;
-
-	/*
-	 * Install codec methods.
-	 * NB: tif_decoderow & tif_encoderow are filled
-	 *     in at setup time.
-	 */
-	tif->tif_setupdecode = LogLuvSetupDecode;
-	tif->tif_decodestrip = LogLuvDecodeStrip;
-	tif->tif_decodetile = LogLuvDecodeTile;
-	tif->tif_setupencode = LogLuvSetupEncode;
-	tif->tif_encodestrip = LogLuvEncodeStrip;
-	tif->tif_encodetile = LogLuvEncodeTile;
-	tif->tif_close = LogLuvClose;
-	tif->tif_cleanup = LogLuvCleanup;
-
-	/* override SetField so we can handle our private pseudo-tag */
-	_TIFFMergeFieldInfo(tif, LogLuvFieldInfo, N(LogLuvFieldInfo));
-	sp->vgetparent = tif->tif_tagmethods.vgetfield;
-	tif->tif_tagmethods.vgetfield = LogLuvVGetField;   /* hook for codec tags */
-	sp->vsetparent = tif->tif_tagmethods.vsetfield;
-	tif->tif_tagmethods.vsetfield = LogLuvVSetField;   /* hook for codec tags */
-
-	return (1);
-bad:
-	TIFFError(module, "%s: No space for LogLuv state block", tif->tif_name);
-	return (0);
-}
-#endif /* LOGLUV_SUPPORT */
diff --git a/src/tiff/tif_lzw.c b/src/tiff/tif_lzw.c
deleted file mode 100644
index 9acea7a..0000000
--- a/src/tiff/tif_lzw.c
+++ /dev/null
@@ -1,745 +0,0 @@
-/* $Header: /home/terralib/src/tiff/tif_lzw.c,v 1.3 2004/03/19 11:51:24 lubia Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#include "tiffiop.h"
-#ifdef LZW_SUPPORT
-/*
- * TIFF Library.
- * Rev 5.0 Lempel-Ziv & Welch Compression Support
- *
- * This code is derived from the compress program whose code is
- * derived from software contributed to Berkeley by James A. Woods,
- * derived from original work by Spencer Thomas and Joseph Orost.
- *
- * The original Berkeley copyright notice appears below in its entirety.
- */
-#include "tif_predict.h"
-
-#include <assert.h>
-#include <stdio.h>
-
-/*
- * NB: The 5.0 spec describes a different algorithm than Aldus
- *     implements.  Specifically, Aldus does code length transitions
- *     one code earlier than should be done (for real LZW).
- *     Earlier versions of this library implemented the correct
- *     LZW algorithm, but emitted codes in a bit order opposite
- *     to the TIFF spec.  Thus, to maintain compatibility w/ Aldus
- *     we interpret MSB-LSB ordered codes to be images written w/
- *     old versions of this library, but otherwise adhere to the
- *     Aldus "off by one" algorithm.
- *
- * Future revisions to the TIFF spec are expected to "clarify this issue".
- */
-#define	LZW_COMPAT		/* include backwards compatibility code */
-/*
- * Each strip of data is supposed to be terminated by a CODE_EOI.
- * If the following #define is included, the decoder will also
- * check for end-of-strip w/o seeing this code.  This makes the
- * library more robust, but also slower.
- */
-#define	LZW_CHECKEOS		/* include checks for strips w/o EOI code */
-
-#define MAXCODE(n)	((1L<<(n))-1)
-/*
- * The TIFF spec specifies that encoded bit
- * strings range from 9 to 12 bits.
- */
-#define	BITS_MIN	9		/* start with 9 bits */
-#define	BITS_MAX	12		/* max of 12 bit strings */
-/* predefined codes */
-#define	CODE_CLEAR	256		/* code to clear string table */
-#define	CODE_EOI	257		/* end-of-information code */
-#define CODE_FIRST	258		/* first free code entry */
-#define	CODE_MAX	MAXCODE(BITS_MAX)
-#define	HSIZE		9001L		/* 91% occupancy */
-#define	HSHIFT		(13-8)
-#ifdef LZW_COMPAT
-/* NB: +1024 is for compatibility with old files */
-#define	CSIZE		(MAXCODE(BITS_MAX)+1024L)
-#else
-#define	CSIZE		(MAXCODE(BITS_MAX)+1L)
-#endif
-
-/*
- * State block for each open TIFF file using LZW
- * compression/decompression.  Note that the predictor
- * state block must be first in this data structure.
- */
-typedef	struct {
-	TIFFPredictorState predict;	/* predictor super class */
-
-	u_short		nbits;		/* # of bits/code */
-	u_short		maxcode;	/* maximum code for lzw_nbits */
-	u_short		free_ent;	/* next free entry in hash table */
-	long		nextdata;	/* next bits of i/o */
-	long		nextbits;	/* # of valid bits in lzw_nextdata */
-} LZWBaseState;
-
-#define	lzw_nbits	base.nbits
-#define	lzw_maxcode	base.maxcode
-#define	lzw_free_ent	base.free_ent
-#define	lzw_nextdata	base.nextdata
-#define	lzw_nextbits	base.nextbits
-
-/*
- * Encoding-specific state.
- */
-typedef uint16 hcode_t;			/* codes fit in 16 bits */
-
-/*
- * Decoding-specific state.
- */
-typedef struct code_ent {
-	struct code_ent *next;
-	u_short	length;			/* string len, including this token */
-	u_char	value;			/* data value */
-	u_char	firstchar;		/* first token of string */
-} code_t;
-
-typedef	int (*decodeFunc)(TIFF*, tidata_t, tsize_t, tsample_t);
-
-typedef struct {
-	LZWBaseState base;
-
-        /* Decoding specific data */
-	long	dec_nbitsmask;		/* lzw_nbits 1 bits, right adjusted */
-	long	dec_restart;		/* restart count */
-#ifdef LZW_CHECKEOS
-	long	dec_bitsleft;		/* available bits in raw data */
-#endif
-	decodeFunc dec_decode;		/* regular or backwards compatible */
-	code_t*	dec_codep;		/* current recognized code */
-	code_t*	dec_oldcodep;		/* previously recognized code */
-	code_t*	dec_free_entp;		/* next free entry */
-	code_t*	dec_maxcodep;		/* max available entry */
-	code_t*	dec_codetab;		/* kept separate for small machines */
-} LZWCodecState;
-
-#define	LZWState(tif)		((LZWBaseState*) (tif)->tif_data)
-#define	DecoderState(tif)	((LZWCodecState*) LZWState(tif))
-
-static	int LZWDecode(TIFF*, tidata_t, tsize_t, tsample_t);
-#ifdef LZW_COMPAT
-static	int LZWDecodeCompat(TIFF*, tidata_t, tsize_t, tsample_t);
-#endif
-
-/*
- * LZW Decoder.
- */
-
-#ifdef LZW_CHECKEOS
-/*
- * This check shouldn't be necessary because each
- * strip is suppose to be terminated with CODE_EOI.
- */
-#define	NextCode(_tif, _sp, _bp, _code, _get) {				\
-	if ((_sp)->dec_bitsleft < nbits) {				\
-		TIFFWarning(_tif->tif_name,				\
-		    "LZWDecode: Strip %d not terminated with EOI code", \
-		    _tif->tif_curstrip);				\
-		_code = CODE_EOI;					\
-	} else {							\
-		_get(_sp,_bp,_code);					\
-		(_sp)->dec_bitsleft -= nbits;				\
-	}								\
-}
-#else
-#define	NextCode(tif, sp, bp, code, get) get(sp, bp, code)
-#endif
-
-static int
-LZWSetupDecode(TIFF* tif)
-{
-	LZWCodecState* sp = DecoderState(tif);
-	static const char module[] = "LZWSetupDecode";
-	int code;
-
-	assert(sp != NULL);
-
-	if (sp->dec_codetab == NULL) {
-		sp->dec_codetab = (code_t*)_TIFFmalloc(CSIZE*sizeof (code_t));
-		if (sp->dec_codetab == NULL) {
-			TIFFError(module, "No space for LZW code table");
-			return (0);
-		}
-		/*
-		 * Pre-load the table.
-		 */
-                code = 255;
-                do {
-                    sp->dec_codetab[code].value = (u_char) code;
-                    sp->dec_codetab[code].firstchar = (u_char) code;
-                    sp->dec_codetab[code].length = 1;
-                    sp->dec_codetab[code].next = NULL;
-                } while (code--);
-	}
-	return (1);
-}
-
-/*
- * Setup state for decoding a strip.
- */
-static int
-LZWPreDecode(TIFF* tif, tsample_t s)
-{
-	LZWCodecState *sp = DecoderState(tif);
-
-	(void) s;
-	assert(sp != NULL);
-	/*
-	 * Check for old bit-reversed codes.
-	 */
-	if (tif->tif_rawdata[0] == 0 && (tif->tif_rawdata[1] & 0x1)) {
-#ifdef LZW_COMPAT
-		if (!sp->dec_decode) {
-			TIFFWarning(tif->tif_name,
-			    "Old-style LZW codes, convert file");
-			/*
-			 * Override default decoding methods with
-			 * ones that deal with the old coding.
-			 * Otherwise the predictor versions set
-			 * above will call the compatibility routines
-			 * through the dec_decode method.
-			 */
-			tif->tif_decoderow = LZWDecodeCompat;
-			tif->tif_decodestrip = LZWDecodeCompat;
-			tif->tif_decodetile = LZWDecodeCompat;
-			/*
-			 * If doing horizontal differencing, must
-			 * re-setup the predictor logic since we
-			 * switched the basic decoder methods...
-			 */
-			(*tif->tif_setupdecode)(tif);
-			sp->dec_decode = LZWDecodeCompat;
-		}
-		sp->lzw_maxcode = MAXCODE(BITS_MIN);
-#else /* !LZW_COMPAT */
-		if (!sp->dec_decode) {
-			TIFFError(tif->tif_name,
-			    "Old-style LZW codes not supported");
-			sp->dec_decode = LZWDecode;
-		}
-		return (0);
-#endif/* !LZW_COMPAT */
-	} else {
-		sp->lzw_maxcode = MAXCODE(BITS_MIN)-1;
-		sp->dec_decode = LZWDecode;
-	}
-	sp->lzw_nbits = BITS_MIN;
-	sp->lzw_nextbits = 0;
-	sp->lzw_nextdata = 0;
-
-	sp->dec_restart = 0;
-	sp->dec_nbitsmask = MAXCODE(BITS_MIN);
-#ifdef LZW_CHECKEOS
-	sp->dec_bitsleft = tif->tif_rawcc << 3;
-#endif
-	sp->dec_free_entp = sp->dec_codetab + CODE_FIRST;
-	/*
-	 * Zero entries that are not yet filled in.  We do
-	 * this to guard against bogus input data that causes
-	 * us to index into undefined entries.  If you can
-	 * come up with a way to safely bounds-check input codes
-	 * while decoding then you can remove this operation.
-	 */
-	_TIFFmemset(sp->dec_free_entp, 0, (CSIZE-CODE_FIRST)*sizeof (code_t));
-	sp->dec_oldcodep = &sp->dec_codetab[-1];
-	sp->dec_maxcodep = &sp->dec_codetab[sp->dec_nbitsmask-1];
-	return (1);
-}
-
-/*
- * Decode a "hunk of data".
- */
-#define	GetNextCode(sp, bp, code) {				\
-	nextdata = (nextdata<<8) | *(bp)++;			\
-	nextbits += 8;						\
-	if (nextbits < nbits) {					\
-		nextdata = (nextdata<<8) | *(bp)++;		\
-		nextbits += 8;					\
-	}							\
-	code = (hcode_t)((nextdata >> (nextbits-nbits)) & nbitsmask);	\
-	nextbits -= nbits;					\
-}
-
-static void
-codeLoop(TIFF* tif)
-{
-	TIFFError(tif->tif_name,
-	    "LZWDecode: Bogus encoding, loop in the code table; scanline %d",
-	    tif->tif_row);
-}
-
-static int
-LZWDecode(TIFF* tif, tidata_t op0, tsize_t occ0, tsample_t s)
-{
-	LZWCodecState *sp = DecoderState(tif);
-	char *op = (char*) op0;
-	long occ = (long) occ0;
-	char *tp;
-	u_char *bp;
-	hcode_t code;
-	int len;
-	long nbits, nextbits, nextdata, nbitsmask;
-	code_t *codep, *free_entp, *maxcodep, *oldcodep;
-
-	(void) s;
-	assert(sp != NULL);
-	/*
-	 * Restart interrupted output operation.
-	 */
-	if (sp->dec_restart) {
-		long residue;
-
-		codep = sp->dec_codep;
-		residue = codep->length - sp->dec_restart;
-		if (residue > occ) {
-			/*
-			 * Residue from previous decode is sufficient
-			 * to satisfy decode request.  Skip to the
-			 * start of the decoded string, place decoded
-			 * values in the output buffer, and return.
-			 */
-			sp->dec_restart += occ;
-			do {
-				codep = codep->next;
-			} while (--residue > occ && codep);
-			if (codep) {
-				tp = op + occ;
-				do {
-					*--tp = codep->value;
-					codep = codep->next;
-				} while (--occ && codep);
-			}
-			return (1);
-		}
-		/*
-		 * Residue satisfies only part of the decode request.
-		 */
-		op += residue, occ -= residue;
-		tp = op;
-		do {
-			int t;
-			--tp;
-			t = codep->value;
-			codep = codep->next;
-			*tp = (char) t;
-		} while (--residue && codep);
-		sp->dec_restart = 0;
-	}
-
-	bp = (u_char *)tif->tif_rawcp;
-	nbits = sp->lzw_nbits;
-	nextdata = sp->lzw_nextdata;
-	nextbits = sp->lzw_nextbits;
-	nbitsmask = sp->dec_nbitsmask;
-	oldcodep = sp->dec_oldcodep;
-	free_entp = sp->dec_free_entp;
-	maxcodep = sp->dec_maxcodep;
-
-	while (occ > 0) {
-		NextCode(tif, sp, bp, code, GetNextCode);
-		if (code == CODE_EOI)
-			break;
-		if (code == CODE_CLEAR) {
-			free_entp = sp->dec_codetab + CODE_FIRST;
-			nbits = BITS_MIN;
-			nbitsmask = MAXCODE(BITS_MIN);
-			maxcodep = sp->dec_codetab + nbitsmask-1;
-			NextCode(tif, sp, bp, code, GetNextCode);
-			if (code == CODE_EOI)
-				break;
-			*op++ = (char)code, occ--;
-			oldcodep = sp->dec_codetab + code;
-			continue;
-		}
-		codep = sp->dec_codetab + code;
-
-		/*
-	 	 * Add the new entry to the code table.
-	 	 */
-		if (free_entp < &sp->dec_codetab[0] ||
-			free_entp >= &sp->dec_codetab[CSIZE]) {
-			TIFFError(tif->tif_name,
-			"LZWDecode: Corrupted LZW table at scanline %d",
-			tif->tif_row);
-			return (0);
-		}
-
-		free_entp->next = oldcodep;
-		if (free_entp->next < &sp->dec_codetab[0] ||
-			free_entp->next >= &sp->dec_codetab[CSIZE]) {
-			TIFFError(tif->tif_name,
-			"LZWDecode: Corrupted LZW table at scanline %d",
-			tif->tif_row);
-			return (0);
-		}
-		free_entp->firstchar = free_entp->next->firstchar;
-		free_entp->length = free_entp->next->length+1;
-		free_entp->value = (codep < free_entp) ?
-		    codep->firstchar : free_entp->firstchar;
-		if (++free_entp > maxcodep) {
-			if (++nbits > BITS_MAX)		/* should not happen */
-				nbits = BITS_MAX;
-			nbitsmask = MAXCODE(nbits);
-			maxcodep = sp->dec_codetab + nbitsmask-1;
-		}
-		oldcodep = codep;
-		if (code >= 256) {
-			/*
-		 	 * Code maps to a string, copy string
-			 * value to output (written in reverse).
-		 	 */
-			if(codep->length == 0) {
-			    TIFFError(tif->tif_name,
-	    		    "LZWDecode: Wrong length of decoded string: "
-			    "data probably corrupted at scanline %d",
-			    tif->tif_row);	
-			    return (0);
-			}
-			if (codep->length > occ) {
-				/*
-				 * String is too long for decode buffer,
-				 * locate portion that will fit, copy to
-				 * the decode buffer, and setup restart
-				 * logic for the next decoding call.
-				 */
-				sp->dec_codep = codep;
-				do {
-					codep = codep->next;
-				} while (codep && codep->length > occ);
-				if (codep) {
-					sp->dec_restart = occ;
-					tp = op + occ;
-					do  {
-						*--tp = codep->value;
-						codep = codep->next;
-					}  while (--occ && codep);
-					if (codep)
-						codeLoop(tif);
-				}
-				break;
-			}
-			len = codep->length;
-			tp = op + len;
-			do {
-				int t;
-				--tp;
-				t = codep->value;
-				codep = codep->next;
-				*tp = (char) t;
-			} while (codep && tp > op);
-			if (codep) {
-			    codeLoop(tif);
-			    break;
-			}
-			op += len, occ -= len;
-		} else
-			*op++ = (char)code, occ--;
-	}
-
-	tif->tif_rawcp = (tidata_t) bp;
-	sp->lzw_nbits = (u_short) nbits;
-	sp->lzw_nextdata = nextdata;
-	sp->lzw_nextbits = nextbits;
-	sp->dec_nbitsmask = nbitsmask;
-	sp->dec_oldcodep = oldcodep;
-	sp->dec_free_entp = free_entp;
-	sp->dec_maxcodep = maxcodep;
-
-	if (occ > 0) {
-		TIFFError(tif->tif_name,
-		"LZWDecode: Not enough data at scanline %d (short %d bytes)",
-		    tif->tif_row, occ);
-		return (0);
-	}
-	return (1);
-}
-
-#ifdef LZW_COMPAT
-/*
- * Decode a "hunk of data" for old images.
- */
-#define	GetNextCodeCompat(sp, bp, code) {			\
-	nextdata |= (u_long) *(bp)++ << nextbits;		\
-	nextbits += 8;						\
-	if (nextbits < nbits) {					\
-		nextdata |= (u_long) *(bp)++ << nextbits;	\
-		nextbits += 8;					\
-	}							\
-	code = (hcode_t)(nextdata & nbitsmask);			\
-	nextdata >>= nbits;					\
-	nextbits -= nbits;					\
-}
-
-static int
-LZWDecodeCompat(TIFF* tif, tidata_t op0, tsize_t occ0, tsample_t s)
-{
-	LZWCodecState *sp = DecoderState(tif);
-	char *op = (char*) op0;
-	long occ = (long) occ0;
-	char *tp;
-	u_char *bp;
-	int code, nbits;
-	long nextbits, nextdata, nbitsmask;
-	code_t *codep, *free_entp, *maxcodep, *oldcodep;
-
-	(void) s;
-	assert(sp != NULL);
-	/*
-	 * Restart interrupted output operation.
-	 */
-	if (sp->dec_restart) {
-		long residue;
-
-		codep = sp->dec_codep;
-		residue = codep->length - sp->dec_restart;
-		if (residue > occ) {
-			/*
-			 * Residue from previous decode is sufficient
-			 * to satisfy decode request.  Skip to the
-			 * start of the decoded string, place decoded
-			 * values in the output buffer, and return.
-			 */
-			sp->dec_restart += occ;
-			do {
-				codep = codep->next;
-			} while (--residue > occ);
-			tp = op + occ;
-			do {
-				*--tp = codep->value;
-				codep = codep->next;
-			} while (--occ);
-			return (1);
-		}
-		/*
-		 * Residue satisfies only part of the decode request.
-		 */
-		op += residue, occ -= residue;
-		tp = op;
-		do {
-			*--tp = codep->value;
-			codep = codep->next;
-		} while (--residue);
-		sp->dec_restart = 0;
-	}
-
-	bp = (u_char *)tif->tif_rawcp;
-	nbits = sp->lzw_nbits;
-	nextdata = sp->lzw_nextdata;
-	nextbits = sp->lzw_nextbits;
-	nbitsmask = sp->dec_nbitsmask;
-	oldcodep = sp->dec_oldcodep;
-	free_entp = sp->dec_free_entp;
-	maxcodep = sp->dec_maxcodep;
-
-	while (occ > 0) {
-		NextCode(tif, sp, bp, code, GetNextCodeCompat);
-		if (code == CODE_EOI)
-			break;
-		if (code == CODE_CLEAR) {
-			free_entp = sp->dec_codetab + CODE_FIRST;
-			nbits = BITS_MIN;
-			nbitsmask = MAXCODE(BITS_MIN);
-			maxcodep = sp->dec_codetab + nbitsmask;
-			NextCode(tif, sp, bp, code, GetNextCodeCompat);
-			if (code == CODE_EOI)
-				break;
-			*op++ = (char) code, occ--;
-			oldcodep = sp->dec_codetab + code;
-			continue;
-		}
-		codep = sp->dec_codetab + code;
-
-		/*
-	 	 * Add the new entry to the code table.
-	 	 */
-		if (free_entp < &sp->dec_codetab[0] ||
-			free_entp >= &sp->dec_codetab[CSIZE]) {
-			TIFFError(tif->tif_name,
-			"LZWDecodeCompat: Corrupted LZW table at scanline %d",
-			tif->tif_row);
-			return (0);
-		}
-
-		free_entp->next = oldcodep;
-		if (free_entp->next < &sp->dec_codetab[0] ||
-			free_entp->next >= &sp->dec_codetab[CSIZE]) {
-			TIFFError(tif->tif_name,
-			"LZWDecodeCompat: Corrupted LZW table at scanline %d",
-			tif->tif_row);
-			return (0);
-		}
-		free_entp->firstchar = free_entp->next->firstchar;
-		free_entp->length = free_entp->next->length+1;
-		free_entp->value = (codep < free_entp) ?
-		    codep->firstchar : free_entp->firstchar;
-		if (++free_entp > maxcodep) {
-			if (++nbits > BITS_MAX)		/* should not happen */
-				nbits = BITS_MAX;
-			nbitsmask = MAXCODE(nbits);
-			maxcodep = sp->dec_codetab + nbitsmask;
-		}
-		oldcodep = codep;
-		if (code >= 256) {
-			/*
-		 	 * Code maps to a string, copy string
-			 * value to output (written in reverse).
-		 	 */
-			if(codep->length == 0) {
-			    TIFFError(tif->tif_name,
-	    		    "LZWDecodeCompat: Wrong length of decoded "
-			    "string: data probably corrupted at scanline %d",
-			    tif->tif_row);	
-			    return (0);
-			}
-			if (codep->length > occ) {
-				/*
-				 * String is too long for decode buffer,
-				 * locate portion that will fit, copy to
-				 * the decode buffer, and setup restart
-				 * logic for the next decoding call.
-				 */
-				sp->dec_codep = codep;
-				do {
-					codep = codep->next;
-				} while (codep->length > occ);
-				sp->dec_restart = occ;
-				tp = op + occ;
-				do  {
-					*--tp = codep->value;
-					codep = codep->next;
-				}  while (--occ);
-				break;
-			}
-			op += codep->length, occ -= codep->length;
-			tp = op;
-			do {
-				*--tp = codep->value;
-			} while( (codep = codep->next) != NULL);
-		} else
-			*op++ = (char) code, occ--;
-	}
-
-	tif->tif_rawcp = (tidata_t) bp;
-	sp->lzw_nbits = (u_short) nbits;
-	sp->lzw_nextdata = nextdata;
-	sp->lzw_nextbits = nextbits;
-	sp->dec_nbitsmask = nbitsmask;
-	sp->dec_oldcodep = oldcodep;
-	sp->dec_free_entp = free_entp;
-	sp->dec_maxcodep = maxcodep;
-
-	if (occ > 0) {
-		TIFFError(tif->tif_name,
-	    "LZWDecodeCompat: Not enough data at scanline %d (short %d bytes)",
-		    tif->tif_row, occ);
-		return (0);
-	}
-	return (1);
-}
-#endif /* LZW_COMPAT */
-
-
-
-static void
-LZWCleanup(TIFF* tif)
-{
-    if (tif->tif_data) {
-        if (DecoderState(tif)->dec_codetab)
-            _TIFFfree(DecoderState(tif)->dec_codetab);
-        _TIFFfree(tif->tif_data);
-        tif->tif_data = NULL;
-    }
-}
-
-static int
-LZWSetupEncode(TIFF* tif)
-{
-    TIFFError(tif->tif_name,
-              "LZW compression is not available to due to Unisys patent enforcement");
-    return (0);
-}
-
-int
-TIFFInitLZW(TIFF* tif, int scheme)
-{
-	assert(scheme == COMPRESSION_LZW);
-
-	/*
-	 * Allocate state block so tag methods have storage to record values.
-	 */
-	tif->tif_data = (tidata_t) _TIFFmalloc(sizeof (LZWCodecState));
-	if (tif->tif_data == NULL)
-		goto bad;
-	DecoderState(tif)->dec_codetab = NULL;
-	DecoderState(tif)->dec_decode = NULL;
-
-	/*
-	 * Install codec methods.
-	 */
-	tif->tif_setupencode = LZWSetupEncode;
-	tif->tif_setupdecode = LZWSetupDecode;
-	tif->tif_predecode = LZWPreDecode;
-	tif->tif_decoderow = LZWDecode;
-	tif->tif_decodestrip = LZWDecode;
-	tif->tif_decodetile = LZWDecode;
-	tif->tif_cleanup = LZWCleanup;
-
-	/*
-	 * Setup predictor setup.
-	 */
-	(void) TIFFPredictorInit(tif);
-
-	return (1);
-
-bad:
-	TIFFError("TIFFInitLZW", "No space for LZW state block");
-	return (0);
-}
-
-/*
- * Copyright (c) 1985, 1986 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * James A. Woods, derived from original work by Spencer Thomas
- * and Joseph Orost.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that the above copyright notice and this paragraph are
- * duplicated in all such forms and that any documentation,
- * advertising materials, and other materials related to such
- * distribution and use acknowledge that the software was developed
- * by the University of California, Berkeley.  The name of the
- * University may not be used to endorse or promote products derived
- * from this software without specific prior written permission.
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
- * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- */
-#endif /* LZW_SUPPORT */
diff --git a/src/tiff/tif_machdep.c b/src/tiff/tif_machdep.c
deleted file mode 100644
index d685faf..0000000
--- a/src/tiff/tif_machdep.c
+++ /dev/null
@@ -1,186 +0,0 @@
-#ifndef lint
-static char rcsid[] = "$Header: /home/terralib/src/tiff/tif_machdep.c,v 1.1 2002/07/30 19:57:54 juan Exp $";
-#endif
-
-/*
- * Copyright (c) 1992 Sam Leffler
- * Copyright (c) 1992 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library Machine Dependent Routines.
- */
-#include "tiffiop.h"
-
-#ifdef tahoe
-typedef	struct ieeedouble {
-	u_long	sign	: 1,
-		exp	: 11,
-		mant	: 20;
-	u_long	mant2;
-} ieeedouble;
-typedef	struct ieeefloat {
-	u_long	sign	: 1,
-		exp	: 8,
-		mant	: 23;
-} ieeefloat;
-
-typedef	struct {
-	u_long	sign	: 1,
-		exp	: 8,
-		mant	: 23;
-	u_long	mant2;
-} nativedouble;
-typedef	struct {
-	u_long	sign	: 1,
-		exp	: 8,
-		mant	: 23;
-} nativefloat;
-/*
- * Beware, over/under-flow in conversions will
- * result in garbage values -- handling it would
- * require a subroutine call or lots more code.
- */
-#define	NATIVE2IEEEFLOAT(fp) { \
-    if ((fp)->native.exp) \
-        (fp)->ieee.exp = (fp)->native.exp - 129 + 127;	/* alter bias */\
-}
-#define	IEEEFLOAT2NATIVE(fp) { \
-    if ((fp)->ieee.exp) \
-        (fp)->native.exp = (fp)->ieee.exp - 127 + 129; 	/* alter bias */\
-}
-#define	IEEEDOUBLE2NATIVE(dp) { \
-    if ((dp)->native.exp = (dp)->ieee.exp) \
-	(dp)->native.exp += -1023 + 129; \
-    (dp)->native.mant = ((dp)->ieee.mant<<3)|((dp)->native.mant2>>29); \
-    (dp)->native.mant2 <<= 3; \
-}
-#endif /* tahoe */
-
-#ifdef vax
-typedef	struct ieeedouble {
-	u_long	mant	: 20,
-		exp	: 11,
-		sign	: 1;
-	u_long	mant2;
-} ieeedouble;
-typedef	struct ieeefloat {
-	u_long	mant	: 23,
-		exp	: 8,
-		sign	: 1;
-} ieeefloat;
-
-typedef	struct {
-	u_long	mant1	: 7,
-		exp	: 8,
-		sign	: 1,
-		mant2	: 16;
-	u_long	mant3;
-} nativedouble;
-typedef	struct {
-	u_long	mant1	: 7,
-		exp	: 8,
-		sign	: 1,
-		mant2	: 16;
-} nativefloat;
-/*
- * Beware, these do not handle over/under-flow
- * during conversion from ieee to native format.
- */
-#define	NATIVE2IEEEFLOAT(fp) { \
-    float_t t; \
-    if (t.ieee.exp = (fp)->native.exp) \
-	t.ieee.exp += -129 + 127; \
-    t.ieee.sign = (fp)->native.sign; \
-    t.ieee.mant = ((fp)->native.mant1<<16)|(fp)->native.mant2; \
-    *(fp) = t; \
-}
-#define	IEEEFLOAT2NATIVE(fp) { \
-    float_t t; int v = (fp)->ieee.exp; \
-    if (v) v += -127 + 129;		/* alter bias of exponent */\
-    t.native.exp = v;			/* implicit truncation of exponent */\
-    t.native.sign = (fp)->ieee.sign; \
-    v = (fp)->ieee.mant; \
-    t.native.mant1 = v >> 16; \
-    t.native.mant2 = v;\
-    *(fp) = t; \
-}
-#define	IEEEDOUBLE2NATIVE(dp) { \
-    double_t t; int v = (dp)->ieee.exp; \
-    if (v) v += -1023 + 1025; 		/* if can alter bias of exponent */\
-    t.native.exp = v;			/* implicit truncation of exponent */\
-    v = (dp)->ieee.mant; \
-    t.native.sign = (dp)->ieee.sign; \
-    t.native.mant1 = v >> 16; \
-    t.native.mant2 = v;\
-    t.native.mant3 = (dp)->mant2; \
-    *(dp) = t; \
-}
-#endif /* vax */
-
-#if !HAVE_IEEEFP
-#if !defined(IEEEFLOAT2NATIVE) || !defined(NATIVE2IEEEFLOAT)
-"Help, you've configured the library to not have IEEE floating point,\
-but not defined how to convert between IEEE and native formats!"
-#endif
-
-/*
- * These unions are used during floating point
- * conversions.  The above macros define the
- * conversion operations.
- */
-typedef	union {
-	ieeedouble	ieee;
-	nativedouble	native;
-	char		b[8];
-	double		d;
-} double_t;
-
-typedef	union {
-	ieeefloat	ieee;
-	nativefloat	native;
-	char		b[4];
-	float		f;
-} float_t;
-
-void
-TIFFCvtIEEEFloatToNative(TIFF* tif, u_int n, float* f)
-{
-	float_t *fp = (float_t *)f;
-
-	while (n-- > 0) {
-		IEEEFLOAT2NATIVE(fp);
-		fp++;
-	}
-}
-
-void
-TIFFCvtNativeToIEEEFloat(TIFF* tif, u_int n, float* f)
-{
-	float_t *fp = (float_t *)f;
-
-	while (n-- > 0) {
-		NATIVE2IEEEFLOAT(fp);
-		fp++;
-	}
-}
-#endif
diff --git a/src/tiff/tif_next.c b/src/tiff/tif_next.c
deleted file mode 100644
index bb7eeab..0000000
--- a/src/tiff/tif_next.c
+++ /dev/null
@@ -1,142 +0,0 @@
-/* $Header: /home/terralib/src/tiff/tif_next.c,v 1.3 2004/03/19 11:51:24 lubia Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#include "tiffiop.h"
-#ifdef NEXT_SUPPORT
-/*
- * TIFF Library.
- *
- * NeXT 2-bit Grey Scale Compression Algorithm Support
- */
-
-#define SETPIXEL(op, v) {			\
-	switch (npixels++ & 3) {		\
-	case 0:	op[0]  = (u_char) ((v) << 6); break;	\
-	case 1:	op[0] |= (v) << 4; break;	\
-	case 2:	op[0] |= (v) << 2; break;	\
-	case 3:	*op++ |= (v);	   break;	\
-	}					\
-}
-
-#define LITERALROW	0x00
-#define LITERALSPAN	0x40
-#define WHITE   	((1<<2)-1)
-
-static int
-NeXTDecode(TIFF* tif, tidata_t buf, tsize_t occ, tsample_t s)
-{
-	register u_char *bp, *op;
-	register tsize_t cc;
-	register int n;
-	tidata_t row;
-	tsize_t scanline;
-
-	(void) s;
-	/*
-	 * Each scanline is assumed to start off as all
-	 * white (we assume a PhotometricInterpretation
-	 * of ``min-is-black'').
-	 */
-	for (op = buf, cc = occ; cc-- > 0;)
-		*op++ = 0xff;
-
-	bp = (u_char *)tif->tif_rawcp;
-	cc = tif->tif_rawcc;
-	scanline = tif->tif_scanlinesize;
-	for (row = buf; (long)occ > 0; occ -= scanline, row += scanline) {
-		n = *bp++, cc--;
-		switch (n) {
-		case LITERALROW:
-			/*
-			 * The entire scanline is given as literal values.
-			 */
-			if (cc < scanline)
-				goto bad;
-			_TIFFmemcpy(row, bp, scanline);
-			bp += scanline;
-			cc -= scanline;
-			break;
-		case LITERALSPAN: {
-			int off;
-			/*
-			 * The scanline has a literal span
-			 * that begins at some offset.
-			 */
-			off = (bp[0] * 256) + bp[1];
-			n = (bp[2] * 256) + bp[3];
-			if (cc < 4+n)
-				goto bad;
-			_TIFFmemcpy(row+off, bp+4, n);
-			bp += 4+n;
-			cc -= 4+n;
-			break;
-		}
-		default: {
-			register int npixels = 0, grey;
-			u_long imagewidth = tif->tif_dir.td_imagewidth;
-
-			/*
-			 * The scanline is composed of a sequence
-			 * of constant color ``runs''.  We shift
-			 * into ``run mode'' and interpret bytes
-			 * as codes of the form <color><npixels>
-			 * until we've filled the scanline.
-			 */
-			op = row;
-			for (;;) {
-				grey = (n>>6) & 0x3;
-				n &= 0x3f;
-				while (n-- > 0)
-					SETPIXEL(op, grey);
-				if (npixels >= (int) imagewidth)
-					break;
-				if (cc == 0)
-					goto bad;
-				n = *bp++, cc--;
-			}
-			break;
-		}
-		}
-	}
-	tif->tif_rawcp = (tidata_t) bp;
-	tif->tif_rawcc = cc;
-	return (1);
-bad:
-	TIFFError(tif->tif_name, "NeXTDecode: Not enough data for scanline %ld",
-	    (long) tif->tif_row);
-	return (0);
-}
-
-int
-TIFFInitNeXT(TIFF* tif, int scheme)
-{
-	(void) scheme;
-	tif->tif_decoderow = NeXTDecode;
-	tif->tif_decodestrip = NeXTDecode;
-	tif->tif_decodetile = NeXTDecode;
-	return (1);
-}
-#endif /* NEXT_SUPPORT */
diff --git a/src/tiff/tif_open.c b/src/tiff/tif_open.c
deleted file mode 100644
index 91ed9db..0000000
--- a/src/tiff/tif_open.c
+++ /dev/null
@@ -1,495 +0,0 @@
-/* $Header: /home/terralib/src/tiff/tif_open.c,v 1.3 2004/03/19 11:51:24 lubia Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library.
- */
-#include "tiffiop.h"
-
-void _TIFFSetDefaultCompressionState(TIFF* tif);
-
-static const long typemask[13] = {
-	(long)0L,		/* TIFF_NOTYPE */
-	(long)0x000000ffL,	/* TIFF_BYTE */
-	(long)0xffffffffL,	/* TIFF_ASCII */
-	(long)0x0000ffffL,	/* TIFF_SHORT */
-	(long)0xffffffffL,	/* TIFF_LONG */
-	(long)0xffffffffL,	/* TIFF_RATIONAL */
-	(long)0x000000ffL,	/* TIFF_SBYTE */
-	(long)0x000000ffL,	/* TIFF_UNDEFINED */
-	(long)0x0000ffffL,	/* TIFF_SSHORT */
-	(long)0xffffffffL,	/* TIFF_SLONG */
-	(long)0xffffffffL,	/* TIFF_SRATIONAL */
-	(long)0xffffffffL,	/* TIFF_FLOAT */
-	(long)0xffffffffL,	/* TIFF_DOUBLE */
-};
-static const int bigTypeshift[13] = {
-	0,		/* TIFF_NOTYPE */
-	24,		/* TIFF_BYTE */
-	0,		/* TIFF_ASCII */
-	16,		/* TIFF_SHORT */
-	0,		/* TIFF_LONG */
-	0,		/* TIFF_RATIONAL */
-	24,		/* TIFF_SBYTE */
-	24,		/* TIFF_UNDEFINED */
-	16,		/* TIFF_SSHORT */
-	0,		/* TIFF_SLONG */
-	0,		/* TIFF_SRATIONAL */
-	0,		/* TIFF_FLOAT */
-	0,		/* TIFF_DOUBLE */
-};
-static const int litTypeshift[13] = {
-	0,		/* TIFF_NOTYPE */
-	0,		/* TIFF_BYTE */
-	0,		/* TIFF_ASCII */
-	0,		/* TIFF_SHORT */
-	0,		/* TIFF_LONG */
-	0,		/* TIFF_RATIONAL */
-	0,		/* TIFF_SBYTE */
-	0,		/* TIFF_UNDEFINED */
-	0,		/* TIFF_SSHORT */
-	0,		/* TIFF_SLONG */
-	0,		/* TIFF_SRATIONAL */
-	0,		/* TIFF_FLOAT */
-	0,		/* TIFF_DOUBLE */
-};
-
-/*
- * Initialize the shift & mask tables, and the
- * byte swapping state according to the file
- * contents and the machine architecture.
- */
-static void
-TIFFInitOrder(TIFF* tif, int magic, int bigendian)
-{
-	tif->tif_typemask = typemask;
-	if (magic == TIFF_BIGENDIAN) {
-		tif->tif_typeshift = bigTypeshift;
-		if (!bigendian)
-			tif->tif_flags |= TIFF_SWAB;
-	} else {
-		tif->tif_typeshift = litTypeshift;
-		if (bigendian)
-			tif->tif_flags |= TIFF_SWAB;
-	}
-}
-
-int
-_TIFFgetMode(const char* mode, const char* module)
-{
-	int m = -1;
-
-	switch (mode[0]) {
-	case 'r':
-		m = O_RDONLY;
-		if (mode[1] == '+')
-			m = O_RDWR;
-		break;
-	case 'w':
-	case 'a':
-		m = O_RDWR|O_CREAT;
-		if (mode[0] == 'w')
-			m |= O_TRUNC;
-		break;
-	default:
-		TIFFError(module, "\"%s\": Bad mode", mode);
-		break;
-	}
-	return (m);
-}
-
-TIFF*
-TIFFClientOpen(
-	const char* name, const char* mode,
-	thandle_t clientdata,
-	TIFFReadWriteProc readproc,
-	TIFFReadWriteProc writeproc,
-	TIFFSeekProc seekproc,
-	TIFFCloseProc closeproc,
-	TIFFSizeProc sizeproc,
-	TIFFMapFileProc mapproc,
-	TIFFUnmapFileProc unmapproc
-)
-{
-	static const char module[] = "TIFFClientOpen";
-	TIFF *tif;
-	int m, bigendian;
-	const char* cp;
-
-	m = _TIFFgetMode(mode, module);
-	if (m == -1)
-		goto bad2;
-	tif = (TIFF *)_TIFFmalloc(sizeof (TIFF) + strlen(name) + 1);
-	if (tif == NULL) {
-		TIFFError(module, "%s: Out of memory (TIFF structure)", name);
-		goto bad2;
-	}
-	_TIFFmemset(tif, 0, sizeof (*tif));
-	tif->tif_name = (char *)tif + sizeof (TIFF);
-	strcpy(tif->tif_name, name);
-	tif->tif_mode = m &~ (O_CREAT|O_TRUNC);
-	tif->tif_curdir = (tdir_t) -1;		/* non-existent directory */
-	tif->tif_curoff = 0;
-	tif->tif_curstrip = (tstrip_t) -1;	/* invalid strip */
-	tif->tif_row = (uint32) -1;		/* read/write pre-increment */
-	tif->tif_clientdata = clientdata;
-	if (!readproc || !writeproc || !seekproc || !closeproc
-			|| !sizeproc || !mapproc || !unmapproc) {
-		TIFFError(module, "One of the client procedures are NULL pointer");
-		goto bad3;
-	}
-	tif->tif_readproc = readproc;
-	tif->tif_writeproc = writeproc;
-	tif->tif_seekproc = seekproc;
-	tif->tif_closeproc = closeproc;
-	tif->tif_sizeproc = sizeproc;
-	tif->tif_mapproc = mapproc;
-	tif->tif_unmapproc = unmapproc;
-	_TIFFSetDefaultCompressionState(tif);	/* setup default state */
-	/*
-	 * Default is to return data MSB2LSB and enable the
-	 * use of memory-mapped files and strip chopping when
-	 * a file is opened read-only.
-	 */
-	tif->tif_flags = FILLORDER_MSB2LSB;
-	if (m == O_RDONLY )
-            tif->tif_flags |= TIFF_MAPPED;
-
-#ifdef STRIPCHOP_DEFAULT
-	if (m == O_RDONLY || m == O_RDWR)
-		tif->tif_flags |= STRIPCHOP_DEFAULT;
-#endif
-
-	{ union { int32 i; char c[4]; } u; u.i = 1; bigendian = u.c[0] == 0; }
-	/*
-	 * Process library-specific flags in the open mode string.
-	 * The following flags may be used to control intrinsic library
-	 * behaviour that may or may not be desirable (usually for
-	 * compatibility with some application that claims to support
-	 * TIFF but only supports some braindead idea of what the
-	 * vendor thinks TIFF is):
-	 *
-	 * 'l'		use little-endian byte order for creating a file
-	 * 'b'		use big-endian byte order for creating a file
-	 * 'L'		read/write information using LSB2MSB bit order
-	 * 'B'		read/write information using MSB2LSB bit order
-	 * 'H'		read/write information using host bit order
-	 * 'M'		enable use of memory-mapped files when supported
-	 * 'm'		disable use of memory-mapped files
-	 * 'C'		enable strip chopping support when reading
-	 * 'c'		disable strip chopping support
-	 *
-	 * The use of the 'l' and 'b' flags is strongly discouraged.
-	 * These flags are provided solely because numerous vendors,
-	 * typically on the PC, do not correctly support TIFF; they
-	 * only support the Intel little-endian byte order.  This
-	 * support is not configured by default because it supports
-	 * the violation of the TIFF spec that says that readers *MUST*
-	 * support both byte orders.  It is strongly recommended that
-	 * you not use this feature except to deal with busted apps
-	 * that write invalid TIFF.  And even in those cases you should
-	 * bang on the vendors to fix their software.
-	 *
-	 * The 'L', 'B', and 'H' flags are intended for applications
-	 * that can optimize operations on data by using a particular
-	 * bit order.  By default the library returns data in MSB2LSB
-	 * bit order for compatibiltiy with older versions of this
-	 * library.  Returning data in the bit order of the native cpu
-	 * makes the most sense but also requires applications to check
-	 * the value of the FillOrder tag; something they probabyl do
-	 * not do right now.
-	 *
-	 * The 'M' and 'm' flags are provided because some virtual memory
-	 * systems exhibit poor behaviour when large images are mapped.
-	 * These options permit clients to control the use of memory-mapped
-	 * files on a per-file basis.
-	 *
-	 * The 'C' and 'c' flags are provided because the library support
-	 * for chopping up large strips into multiple smaller strips is not
-	 * application-transparent and as such can cause problems.  The 'c'
-	 * option permits applications that only want to look at the tags,
-	 * for example, to get the unadulterated TIFF tag information.
-	 */
-	for (cp = mode; *cp; cp++)
-		switch (*cp) {
-		case 'b':
-			if ((m&O_CREAT) && !bigendian)
-				tif->tif_flags |= TIFF_SWAB;
-			break;
-		case 'l':
-			if ((m&O_CREAT) && bigendian)
-				tif->tif_flags |= TIFF_SWAB;
-			break;
-		case 'B':
-			tif->tif_flags = (tif->tif_flags &~ TIFF_FILLORDER) |
-			    FILLORDER_MSB2LSB;
-			break;
-		case 'L':
-			tif->tif_flags = (tif->tif_flags &~ TIFF_FILLORDER) |
-			    FILLORDER_LSB2MSB;
-			break;
-		case 'H':
-			tif->tif_flags = (tif->tif_flags &~ TIFF_FILLORDER) |
-			    HOST_FILLORDER;
-			break;
-		case 'M':
-			if (m == O_RDONLY)
-				tif->tif_flags |= TIFF_MAPPED;
-			break;
-		case 'm':
-			if (m == O_RDONLY)
-				tif->tif_flags &= ~TIFF_MAPPED;
-			break;
-		case 'C':
-			if (m == O_RDONLY)
-				tif->tif_flags |= TIFF_STRIPCHOP;
-			break;
-		case 'c':
-			if (m == O_RDONLY)
-				tif->tif_flags &= ~TIFF_STRIPCHOP;
-			break;
-		}
-	/*
-	 * Read in TIFF header.
-	 */
-	if (!ReadOK(tif, &tif->tif_header, sizeof (TIFFHeader))) {
-		if (tif->tif_mode == O_RDONLY) {
-			TIFFError(name, "Cannot read TIFF header");
-			goto bad;
-		}
-		/*
-		 * Setup header and write.
-		 */
-		tif->tif_header.tiff_magic = tif->tif_flags & TIFF_SWAB
-		    ? (bigendian ? TIFF_LITTLEENDIAN : TIFF_BIGENDIAN)
-		    : (bigendian ? TIFF_BIGENDIAN : TIFF_LITTLEENDIAN);
-		tif->tif_header.tiff_version = TIFF_VERSION;
-		if (tif->tif_flags & TIFF_SWAB)
-			TIFFSwabShort(&tif->tif_header.tiff_version);
-		tif->tif_header.tiff_diroff = 0;	/* filled in later */
-
-                /*
-                 * This seek shouldn't be necessary, but I have had some
-                 * crazy problems with a failed fseek() on Solaris leaving
-                 * the current file pointer out of whack when an fwrite()
-                 * is done. 
-                 */
-                TIFFSeekFile( tif, 0, SEEK_SET );
-
-		if (!WriteOK(tif, &tif->tif_header, sizeof (TIFFHeader))) {
-			TIFFError(name, "Error writing TIFF header");
-			goto bad;
-		}
-		/*
-		 * Setup the byte order handling.
-		 */
-		TIFFInitOrder(tif, tif->tif_header.tiff_magic, bigendian);
-		/*
-		 * Setup default directory.
-		 */
-		if (!TIFFDefaultDirectory(tif))
-			goto bad;
-		tif->tif_diroff = 0;
-		tif->tif_dirlist = NULL;
-		tif->tif_dirnumber = 0;
-		return (tif);
-	}
-	/*
-	 * Setup the byte order handling.
-	 */
-	if (tif->tif_header.tiff_magic != TIFF_BIGENDIAN &&
-	    tif->tif_header.tiff_magic != TIFF_LITTLEENDIAN) {
-		TIFFError(name,  "Not a TIFF file, bad magic number %d (0x%x)",
-		    tif->tif_header.tiff_magic,
-		    tif->tif_header.tiff_magic);
-		goto bad;
-	}
-	TIFFInitOrder(tif, tif->tif_header.tiff_magic, bigendian);
-	/*
-	 * Swap header if required.
-	 */
-	if (tif->tif_flags & TIFF_SWAB) {
-		TIFFSwabShort(&tif->tif_header.tiff_version);
-		TIFFSwabLong(&tif->tif_header.tiff_diroff);
-	}
-	/*
-	 * Now check version (if needed, it's been byte-swapped).
-	 * Note that this isn't actually a version number, it's a
-	 * magic number that doesn't change (stupid).
-	 */
-	if (tif->tif_header.tiff_version != TIFF_VERSION) {
-		TIFFError(name,
-		    "Not a TIFF file, bad version number %d (0x%x)",
-		    tif->tif_header.tiff_version,
-		    tif->tif_header.tiff_version); 
-		goto bad;
-	}
-	tif->tif_flags |= TIFF_MYBUFFER;
-	tif->tif_rawcp = tif->tif_rawdata = 0;
-	tif->tif_rawdatasize = 0;
-	/*
-	 * Setup initial directory.
-	 */
-	switch (mode[0]) {
-	case 'r':
-		tif->tif_nextdiroff = tif->tif_header.tiff_diroff;
-		/*
-		 * Try to use a memory-mapped file if the client
-		 * has not explicitly suppressed usage with the
-		 * 'm' flag in the open mode (see above).
-		 */
-		if ((tif->tif_flags & TIFF_MAPPED) &&
-	!TIFFMapFileContents(tif, (tdata_t*) &tif->tif_base, &tif->tif_size))
-			tif->tif_flags &= ~TIFF_MAPPED;
-		if (TIFFReadDirectory(tif)) {
-			tif->tif_rawcc = -1;
-			tif->tif_flags |= TIFF_BUFFERSETUP;
-			return (tif);
-		}
-		break;
-	case 'a':
-		/*
-		 * New directories are automatically append
-		 * to the end of the directory chain when they
-		 * are written out (see TIFFWriteDirectory).
-		 */
-		if (!TIFFDefaultDirectory(tif))
-			goto bad;
-		return (tif);
-	}
-bad:
-	tif->tif_mode = O_RDONLY;	/* XXX avoid flush */
-	TIFFClose(tif);
-	return ((TIFF*)0);
-bad2:
-	(void) (*closeproc)(clientdata);
-bad3:
-	return ((TIFF*)0);
-}
-
-/*
- * Query functions to access private data.
- */
-
-/*
- * Return open file's name.
- */
-const char *
-TIFFFileName(TIFF* tif)
-{
-	return (tif->tif_name);
-}
-
-/*
- * Return open file's I/O descriptor.
- */
-int
-TIFFFileno(TIFF* tif)
-{
-	return (tif->tif_fd);
-}
-
-/*
- * Return read/write mode.
- */
-int
-TIFFGetMode(TIFF* tif)
-{
-	return (tif->tif_mode);
-}
-
-/*
- * Return nonzero if file is organized in
- * tiles; zero if organized as strips.
- */
-int
-TIFFIsTiled(TIFF* tif)
-{
-	return (isTiled(tif));
-}
-
-/*
- * Return current row being read/written.
- */
-uint32
-TIFFCurrentRow(TIFF* tif)
-{
-	return (tif->tif_row);
-}
-
-/*
- * Return index of the current directory.
- */
-tdir_t
-TIFFCurrentDirectory(TIFF* tif)
-{
-	return (tif->tif_curdir);
-}
-
-/*
- * Return current strip.
- */
-tstrip_t
-TIFFCurrentStrip(TIFF* tif)
-{
-	return (tif->tif_curstrip);
-}
-
-/*
- * Return current tile.
- */
-ttile_t
-TIFFCurrentTile(TIFF* tif)
-{
-	return (tif->tif_curtile);
-}
-
-/*
- * Return nonzero if the file has byte-swapped data.
- */
-int
-TIFFIsByteSwapped(TIFF* tif)
-{
-	return ((tif->tif_flags & TIFF_SWAB) != 0);
-}
-
-/*
- * Return nonzero if the data is returned up-sampled.
- */
-int
-TIFFIsUpSampled(TIFF* tif)
-{
-	return (isUpSampled(tif));
-}
-
-/*
- * Return nonzero if the data is returned in MSB-to-LSB bit order.
- */
-int
-TIFFIsMSB2LSB(TIFF* tif)
-{
-	return (isFillOrder(tif, FILLORDER_MSB2LSB));
-}
diff --git a/src/tiff/tif_packbits.c b/src/tiff/tif_packbits.c
deleted file mode 100644
index fbba87e..0000000
--- a/src/tiff/tif_packbits.c
+++ /dev/null
@@ -1,300 +0,0 @@
-/* $Header: /home/terralib/src/tiff/tif_packbits.c,v 1.3 2004/03/19 11:51:24 lubia Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#include "tiffiop.h"
-#ifdef PACKBITS_SUPPORT
-/*
- * TIFF Library.
- *
- * PackBits Compression Algorithm Support
- */
-#include <assert.h>
-#include <stdio.h>
-
-static int
-PackBitsPreEncode(TIFF* tif, tsample_t s)
-{
-	(void) s;
-	/*
-	 * Calculate the scanline/tile-width size in bytes.
-	 */
-	if (isTiled(tif))
-		tif->tif_data = (tidata_t) TIFFTileRowSize(tif);
-	else
-		tif->tif_data = (tidata_t) TIFFScanlineSize(tif);
-	return (1);
-}
-
-/*
- * NB: tidata is the type representing *(tidata_t);
- *     if tidata_t is made signed then this type must
- *     be adjusted accordingly.
- */
-typedef unsigned char tidata;
-
-/*
- * Encode a run of pixels.
- */
-static int
-PackBitsEncode(TIFF* tif, tidata_t buf, tsize_t cc, tsample_t s)
-{
-	u_char* bp = (u_char*) buf;
-	tidata_t op, ep, lastliteral;
-	long n, slop;
-	int b;
-	enum { BASE, LITERAL, RUN, LITERAL_RUN } state;
-
-	(void) s;
-	op = tif->tif_rawcp;
-	ep = tif->tif_rawdata + tif->tif_rawdatasize;
-	state = BASE;
-	lastliteral = 0;
-	while (cc > 0) {
-		/*
-		 * Find the longest string of identical bytes.
-		 */
-		b = *bp++, cc--, n = 1;
-		for (; cc > 0 && b == *bp; cc--, bp++)
-			n++;
-	again:
-		if (op + 2 >= ep) {		/* insure space for new data */
-			/*
-			 * Be careful about writing the last
-			 * literal.  Must write up to that point
-			 * and then copy the remainder to the
-			 * front of the buffer.
-			 */
-			if (state == LITERAL || state == LITERAL_RUN) {
-				slop = op - lastliteral;
-				tif->tif_rawcc += lastliteral - tif->tif_rawcp;
-				if (!TIFFFlushData1(tif))
-					return (-1);
-				op = tif->tif_rawcp;
-				while (slop-- > 0)
-					*op++ = *lastliteral++;
-				lastliteral = tif->tif_rawcp;
-			} else {
-				tif->tif_rawcc += op - tif->tif_rawcp;
-				if (!TIFFFlushData1(tif))
-					return (-1);
-				op = tif->tif_rawcp;
-			}
-		}
-		switch (state) {
-		case BASE:		/* initial state, set run/literal */
-			if (n > 1) {
-				state = RUN;
-				if (n > 128) {
-					*op++ = (tidata) -127;
-					*op++ = (tidataval_t) b;
-					n -= 128;
-					goto again;
-				}
-				*op++ = (tidataval_t)(-(n-1));
-				*op++ = (tidataval_t) b;
-			} else {
-				lastliteral = op;
-				*op++ = 0;
-				*op++ = (tidataval_t) b;
-				state = LITERAL;
-			}
-			break;
-		case LITERAL:		/* last object was literal string */
-			if (n > 1) {
-				state = LITERAL_RUN;
-				if (n > 128) {
-					*op++ = (tidata) -127;
-					*op++ = (tidataval_t) b;
-					n -= 128;
-					goto again;
-				}
-				*op++ = (tidataval_t)(-(n-1));	/* encode run */
-				*op++ = (tidataval_t) b;
-			} else {			/* extend literal */
-				if (++(*lastliteral) == 127)
-					state = BASE;
-				*op++ = (tidataval_t) b;
-			}
-			break;
-		case RUN:		/* last object was run */
-			if (n > 1) {
-				if (n > 128) {
-					*op++ = (tidata) -127;
-					*op++ = (tidataval_t) b;
-					n -= 128;
-					goto again;
-				}
-				*op++ = (tidataval_t)(-(n-1));
-				*op++ = (tidataval_t) b;
-			} else {
-				lastliteral = op;
-				*op++ = 0;
-				*op++ = (tidataval_t) b;
-				state = LITERAL;
-			}
-			break;
-		case LITERAL_RUN:	/* literal followed by a run */
-			/*
-			 * Check to see if previous run should
-			 * be converted to a literal, in which
-			 * case we convert literal-run-literal
-			 * to a single literal.
-			 */
-			if (n == 1 && op[-2] == (tidata) -1 &&
-			    *lastliteral < 126) {
-				state = (((*lastliteral) += 2) == 127 ?
-				    BASE : LITERAL);
-				op[-2] = op[-1];	/* replicate */
-			} else
-				state = RUN;
-			goto again;
-		}
-	}
-	tif->tif_rawcc += op - tif->tif_rawcp;
-	tif->tif_rawcp = op;
-	return (1);
-}
-
-/*
- * Encode a rectangular chunk of pixels.  We break it up
- * into row-sized pieces to insure that encoded runs do
- * not span rows.  Otherwise, there can be problems with
- * the decoder if data is read, for example, by scanlines
- * when it was encoded by strips.
- */
-static int
-PackBitsEncodeChunk(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
-{
-#if defined(__hpux) && defined(__LP64__)
-	tsize_t rowsize = (tsize_t)(unsigned long) tif->tif_data;
-#else
-	tsize_t rowsize = (tsize_t) tif->tif_data;
-#endif
-
-	assert(rowsize > 0);
-    
-#ifdef YCBCR_SUPPORT
-	/* 
-	 * YCBCR data isn't really separable into rows, so we
-	 * might as well encode the whole tile/strip as one chunk.
-	 */
-	if( tif->tif_dir.td_photometric == PHOTOMETRIC_YCBCR ) {
-#if defined(__hpux) && defined(__LP64__)
-		rowsize = (tsize_t)(unsigned long) tif->tif_data;
-#else
-		rowsize = (tsize_t) tif->tif_data;
-#endif
-	}
-#endif
-
-	while ((long)cc > 0) {
-		int	chunk = rowsize;
-		
-		if( cc < chunk )
-		    chunk = cc;
-
-		if (PackBitsEncode(tif, bp, chunk, s) < 0)
-		    return (-1);
-		bp += chunk;
-		cc -= chunk;
-	}
-	return (1);
-}
-
-static int
-PackBitsDecode(TIFF* tif, tidata_t op, tsize_t occ, tsample_t s)
-{
-	char *bp;
-	tsize_t cc;
-	long n;
-	int b;
-
-	(void) s;
-	bp = (char*) tif->tif_rawcp;
-	cc = tif->tif_rawcc;
-	while (cc > 0 && (long)occ > 0) {
-		n = (long) *bp++, cc--;
-		/*
-		 * Watch out for compilers that
-		 * don't sign extend chars...
-		 */
-		if (n >= 128)
-			n -= 256;
-		if (n < 0) {		/* replicate next byte -n+1 times */
-			if (n == -128)	/* nop */
-				continue;
-                        n = -n + 1;
-                        if( occ < n )
-                        {
-                            TIFFWarning(tif->tif_name,
-                                        "PackBitsDecode: discarding %d bytes "
-                                        "to avoid buffer overrun",
-                                        n - occ);
-                            n = occ;
-                        }
-			occ -= n;
-			b = *bp++, cc--;
-			while (n-- > 0)
-				*op++ = (tidataval_t) b;
-		} else {		/* copy next n+1 bytes literally */
-			if (occ < n + 1)
-                        {
-                            TIFFWarning(tif->tif_name,
-                                        "PackBitsDecode: discarding %d bytes "
-                                        "to avoid buffer overrun",
-                                        n - occ + 1);
-                            n = occ - 1;
-                        }
-                        _TIFFmemcpy(op, bp, ++n);
-			op += n; occ -= n;
-			bp += n; cc -= n;
-		}
-	}
-	tif->tif_rawcp = (tidata_t) bp;
-	tif->tif_rawcc = cc;
-	if (occ > 0) {
-		TIFFError(tif->tif_name,
-		    "PackBitsDecode: Not enough data for scanline %ld",
-		    (long) tif->tif_row);
-		return (0);
-	}
-	return (1);
-}
-
-int
-TIFFInitPackBits(TIFF* tif, int scheme)
-{
-	(void) scheme;
-	tif->tif_decoderow = PackBitsDecode;
-	tif->tif_decodestrip = PackBitsDecode;
-	tif->tif_decodetile = PackBitsDecode;
-	tif->tif_preencode = PackBitsPreEncode;
-	tif->tif_encoderow = PackBitsEncode;
-	tif->tif_encodestrip = PackBitsEncodeChunk;
-	tif->tif_encodetile = PackBitsEncodeChunk;
-	return (1);
-}
-#endif /* PACKBITS_SUPPORT */
diff --git a/src/tiff/tif_pixarlog.c b/src/tiff/tif_pixarlog.c
deleted file mode 100644
index f1664bc..0000000
--- a/src/tiff/tif_pixarlog.c
+++ /dev/null
@@ -1,1305 +0,0 @@
-/*
- * Copyright (c) 1996-1997 Sam Leffler
- * Copyright (c) 1996 Pixar
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Pixar, Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Pixar, Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL PIXAR, SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#include "tiffiop.h"
-#ifdef PIXARLOG_SUPPORT
-
-/*
- * TIFF Library.
- * PixarLog Compression Support
- *
- * Contributed by Dan McCoy.
- *
- * PixarLog film support uses the TIFF library to store companded
- * 11 bit values into a tiff file, which are compressed using the 
- * zip compressor.  
- *
- * The codec can take as input and produce as output 32-bit IEEE float values 
- * as well as 16-bit or 8-bit unsigned integer values.
- *
- * On writing any of the above are converted into the internal
- * 11-bit log format.   In the case of  8 and 16 bit values, the
- * input is assumed to be unsigned linear color values that represent
- * the range 0-1.  In the case of IEEE values, the 0-1 range is assumed to
- * be the normal linear color range, in addition over 1 values are
- * accepted up to a value of about 25.0 to encode "hot" hightlights and such.
- * The encoding is lossless for 8-bit values, slightly lossy for the
- * other bit depths.  The actual color precision should be better
- * than the human eye can perceive with extra room to allow for
- * error introduced by further image computation.  As with any quantized
- * color format, it is possible to perform image calculations which
- * expose the quantization error. This format should certainly be less 
- * susceptable to such errors than standard 8-bit encodings, but more
- * susceptable than straight 16-bit or 32-bit encodings.
- *
- * On reading the internal format is converted to the desired output format.
- * The program can request which format it desires by setting the internal
- * pseudo tag TIFFTAG_PIXARLOGDATAFMT to one of these possible values:
- *  PIXARLOGDATAFMT_FLOAT     = provide IEEE float values.
- *  PIXARLOGDATAFMT_16BIT     = provide unsigned 16-bit integer values
- *  PIXARLOGDATAFMT_8BIT      = provide unsigned 8-bit integer values
- *
- * alternately PIXARLOGDATAFMT_8BITABGR provides unsigned 8-bit integer
- * values with the difference that if there are exactly three or four channels
- * (rgb or rgba) it swaps the channel order (bgr or abgr).
- *
- * PIXARLOGDATAFMT_11BITLOG provides the internal encoding directly
- * packed in 16-bit values.   However no tools are supplied for interpreting
- * these values.
- *
- * "hot" (over 1.0) areas written in floating point get clamped to
- * 1.0 in the integer data types.
- *
- * When the file is closed after writing, the bit depth and sample format
- * are set always to appear as if 8-bit data has been written into it.
- * That way a naive program unaware of the particulars of the encoding
- * gets the format it is most likely able to handle.
- *
- * The codec does it's own horizontal differencing step on the coded
- * values so the libraries predictor stuff should be turned off.
- * The codec also handle byte swapping the encoded values as necessary
- * since the library does not have the information necessary
- * to know the bit depth of the raw unencoded buffer.
- * 
- */
-
-#include "tif_predict.h"
-#include "zlib.h"
-
-#include <stdio.h>
-#include <assert.h>
-#include <stdlib.h>
-#include <math.h>
-
-/* Tables for converting to/from 11 bit coded values */
-
-#define  TSIZE	 2048		/* decode table size (11-bit tokens) */
-#define  TSIZEP1 2049		/* Plus one for slop */
-#define  ONE	 1250		/* token value of 1.0 exactly */
-#define  RATIO	 1.004		/* nominal ratio for log part */
-
-#define CODE_MASK 0x7ff         /* 11 bits. */
-
-static float  Fltsize;
-static float  LogK1, LogK2;
-
-#define REPEAT(n, op)   { int i; i=n; do { i--; op; } while (i>0); }
-
-static void
-horizontalAccumulateF(uint16 *wp, int n, int stride, float *op, 
-	float *ToLinearF)
-{
-    register unsigned int  cr, cg, cb, ca, mask;
-    register float  t0, t1, t2, t3;
-
-    if (n >= stride) {
-	mask = CODE_MASK;
-	if (stride == 3) {
-	    t0 = ToLinearF[cr = wp[0]];
-	    t1 = ToLinearF[cg = wp[1]];
-	    t2 = ToLinearF[cb = wp[2]];
-	    op[0] = t0;
-	    op[1] = t1;
-	    op[2] = t2;
-	    n -= 3;
-	    while (n > 0) {
-		wp += 3;
-		op += 3;
-		n -= 3;
-		t0 = ToLinearF[(cr += wp[0]) & mask];
-		t1 = ToLinearF[(cg += wp[1]) & mask];
-		t2 = ToLinearF[(cb += wp[2]) & mask];
-		op[0] = t0;
-		op[1] = t1;
-		op[2] = t2;
-	    }
-	} else if (stride == 4) {
-	    t0 = ToLinearF[cr = wp[0]];
-	    t1 = ToLinearF[cg = wp[1]];
-	    t2 = ToLinearF[cb = wp[2]];
-	    t3 = ToLinearF[ca = wp[3]];
-	    op[0] = t0;
-	    op[1] = t1;
-	    op[2] = t2;
-	    op[3] = t3;
-	    n -= 4;
-	    while (n > 0) {
-		wp += 4;
-		op += 4;
-		n -= 4;
-		t0 = ToLinearF[(cr += wp[0]) & mask];
-		t1 = ToLinearF[(cg += wp[1]) & mask];
-		t2 = ToLinearF[(cb += wp[2]) & mask];
-		t3 = ToLinearF[(ca += wp[3]) & mask];
-		op[0] = t0;
-		op[1] = t1;
-		op[2] = t2;
-		op[3] = t3;
-	    }
-	} else {
-	    REPEAT(stride, *op = ToLinearF[*wp&mask]; wp++; op++)
-	    n -= stride;
-	    while (n > 0) {
-		REPEAT(stride,
-		    wp[stride] += *wp; *op = ToLinearF[*wp&mask]; wp++; op++)
-		n -= stride;
-	    }
-	}
-    }
-}
-
-static void
-horizontalAccumulate12(uint16 *wp, int n, int stride, int16 *op,
-	float *ToLinearF)
-{
-    register unsigned int  cr, cg, cb, ca, mask;
-    register float  t0, t1, t2, t3;
-
-#define SCALE12 2048.0
-#define CLAMP12(t) (((t) < 3071) ? (uint16) (t) : 3071)
-
-    if (n >= stride) {
-	mask = CODE_MASK;
-	if (stride == 3) {
-	    t0 = ToLinearF[cr = wp[0]] * SCALE12;
-	    t1 = ToLinearF[cg = wp[1]] * SCALE12;
-	    t2 = ToLinearF[cb = wp[2]] * SCALE12;
-	    op[0] = CLAMP12(t0);
-	    op[1] = CLAMP12(t1);
-	    op[2] = CLAMP12(t2);
-	    n -= 3;
-	    while (n > 0) {
-		wp += 3;
-		op += 3;
-		n -= 3;
-		t0 = ToLinearF[(cr += wp[0]) & mask] * SCALE12;
-		t1 = ToLinearF[(cg += wp[1]) & mask] * SCALE12;
-		t2 = ToLinearF[(cb += wp[2]) & mask] * SCALE12;
-		op[0] = CLAMP12(t0);
-		op[1] = CLAMP12(t1);
-		op[2] = CLAMP12(t2);
-	    }
-	} else if (stride == 4) {
-	    t0 = ToLinearF[cr = wp[0]] * SCALE12;
-	    t1 = ToLinearF[cg = wp[1]] * SCALE12;
-	    t2 = ToLinearF[cb = wp[2]] * SCALE12;
-	    t3 = ToLinearF[ca = wp[3]] * SCALE12;
-	    op[0] = CLAMP12(t0);
-	    op[1] = CLAMP12(t1);
-	    op[2] = CLAMP12(t2);
-	    op[3] = CLAMP12(t3);
-	    n -= 4;
-	    while (n > 0) {
-		wp += 4;
-		op += 4;
-		n -= 4;
-		t0 = ToLinearF[(cr += wp[0]) & mask] * SCALE12;
-		t1 = ToLinearF[(cg += wp[1]) & mask] * SCALE12;
-		t2 = ToLinearF[(cb += wp[2]) & mask] * SCALE12;
-		t3 = ToLinearF[(ca += wp[3]) & mask] * SCALE12;
-		op[0] = CLAMP12(t0);
-		op[1] = CLAMP12(t1);
-		op[2] = CLAMP12(t2);
-		op[3] = CLAMP12(t3);
-	    }
-	} else {
-	    REPEAT(stride, t0 = ToLinearF[*wp&mask] * SCALE12;
-                           *op = CLAMP12(t0); wp++; op++)
-	    n -= stride;
-	    while (n > 0) {
-		REPEAT(stride,
-		    wp[stride] += *wp; t0 = ToLinearF[wp[stride]&mask]*SCALE12;
-		    *op = CLAMP12(t0);  wp++; op++)
-		n -= stride;
-	    }
-	}
-    }
-}
-
-static void
-horizontalAccumulate16(uint16 *wp, int n, int stride, uint16 *op,
-	uint16 *ToLinear16)
-{
-    register unsigned int  cr, cg, cb, ca, mask;
-
-    if (n >= stride) {
-	mask = CODE_MASK;
-	if (stride == 3) {
-	    op[0] = ToLinear16[cr = wp[0]];
-	    op[1] = ToLinear16[cg = wp[1]];
-	    op[2] = ToLinear16[cb = wp[2]];
-	    n -= 3;
-	    while (n > 0) {
-		wp += 3;
-		op += 3;
-		n -= 3;
-		op[0] = ToLinear16[(cr += wp[0]) & mask];
-		op[1] = ToLinear16[(cg += wp[1]) & mask];
-		op[2] = ToLinear16[(cb += wp[2]) & mask];
-	    }
-	} else if (stride == 4) {
-	    op[0] = ToLinear16[cr = wp[0]];
-	    op[1] = ToLinear16[cg = wp[1]];
-	    op[2] = ToLinear16[cb = wp[2]];
-	    op[3] = ToLinear16[ca = wp[3]];
-	    n -= 4;
-	    while (n > 0) {
-		wp += 4;
-		op += 4;
-		n -= 4;
-		op[0] = ToLinear16[(cr += wp[0]) & mask];
-		op[1] = ToLinear16[(cg += wp[1]) & mask];
-		op[2] = ToLinear16[(cb += wp[2]) & mask];
-		op[3] = ToLinear16[(ca += wp[3]) & mask];
-	    }
-	} else {
-	    REPEAT(stride, *op = ToLinear16[*wp&mask]; wp++; op++)
-	    n -= stride;
-	    while (n > 0) {
-		REPEAT(stride,
-		    wp[stride] += *wp; *op = ToLinear16[*wp&mask]; wp++; op++)
-		n -= stride;
-	    }
-	}
-    }
-}
-
-/* 
- * Returns the log encoded 11-bit values with the horizontal
- * differencing undone.
- */
-static void
-horizontalAccumulate11(uint16 *wp, int n, int stride, uint16 *op)
-{
-    register unsigned int  cr, cg, cb, ca, mask;
-
-    if (n >= stride) {
-	mask = CODE_MASK;
-	if (stride == 3) {
-	    op[0] = cr = wp[0];  op[1] = cg = wp[1];  op[2] = cb = wp[2];
-	    n -= 3;
-	    while (n > 0) {
-		wp += 3;
-		op += 3;
-		n -= 3;
-		op[0] = (cr += wp[0]) & mask;
-		op[1] = (cg += wp[1]) & mask;
-		op[2] = (cb += wp[2]) & mask;
-	    }
-	} else if (stride == 4) {
-	    op[0] = cr = wp[0];  op[1] = cg = wp[1];
-	    op[2] = cb = wp[2];  op[3] = ca = wp[3];
-	    n -= 4;
-	    while (n > 0) {
-		wp += 4;
-		op += 4;
-		n -= 4;
-		op[0] = (cr += wp[0]) & mask;
-		op[1] = (cg += wp[1]) & mask;
-		op[2] = (cb += wp[2]) & mask;
-		op[3] = (ca += wp[3]) & mask;
-	    } 
-	} else {
-	    REPEAT(stride, *op = *wp&mask; wp++; op++)
-	    n -= stride;
-	    while (n > 0) {
-		REPEAT(stride,
-		    wp[stride] += *wp; *op = *wp&mask; wp++; op++)
-	    	n -= stride;
-	    }
-	}
-    }
-}
-
-static void
-horizontalAccumulate8(uint16 *wp, int n, int stride, unsigned char *op,
-	unsigned char *ToLinear8)
-{
-    register unsigned int  cr, cg, cb, ca, mask;
-
-    if (n >= stride) {
-	mask = CODE_MASK;
-	if (stride == 3) {
-	    op[0] = ToLinear8[cr = wp[0]];
-	    op[1] = ToLinear8[cg = wp[1]];
-	    op[2] = ToLinear8[cb = wp[2]];
-	    n -= 3;
-	    while (n > 0) {
-		n -= 3;
-		wp += 3;
-		op += 3;
-		op[0] = ToLinear8[(cr += wp[0]) & mask];
-		op[1] = ToLinear8[(cg += wp[1]) & mask];
-		op[2] = ToLinear8[(cb += wp[2]) & mask];
-	    }
-	} else if (stride == 4) {
-	    op[0] = ToLinear8[cr = wp[0]];
-	    op[1] = ToLinear8[cg = wp[1]];
-	    op[2] = ToLinear8[cb = wp[2]];
-	    op[3] = ToLinear8[ca = wp[3]];
-	    n -= 4;
-	    while (n > 0) {
-		n -= 4;
-		wp += 4;
-		op += 4;
-		op[0] = ToLinear8[(cr += wp[0]) & mask];
-		op[1] = ToLinear8[(cg += wp[1]) & mask];
-		op[2] = ToLinear8[(cb += wp[2]) & mask];
-		op[3] = ToLinear8[(ca += wp[3]) & mask];
-	    }
-	} else {
-	    REPEAT(stride, *op = ToLinear8[*wp&mask]; wp++; op++)
-	    n -= stride;
-	    while (n > 0) {
-		REPEAT(stride,
-		    wp[stride] += *wp; *op = ToLinear8[*wp&mask]; wp++; op++)
-		n -= stride;
-	    }
-	}
-    }
-}
-
-
-static void
-horizontalAccumulate8abgr(uint16 *wp, int n, int stride, unsigned char *op,
-	unsigned char *ToLinear8)
-{
-    register unsigned int  cr, cg, cb, ca, mask;
-    register unsigned char  t0, t1, t2, t3;
-
-    if (n >= stride) {
-	mask = CODE_MASK;
-	if (stride == 3) {
-	    op[0] = 0;
-	    t1 = ToLinear8[cb = wp[2]];
-	    t2 = ToLinear8[cg = wp[1]];
-	    t3 = ToLinear8[cr = wp[0]];
-	    op[1] = t1;
-	    op[2] = t2;
-	    op[3] = t3;
-	    n -= 3;
-	    while (n > 0) {
-		n -= 3;
-		wp += 3;
-		op += 4;
-		op[0] = 0;
-		t1 = ToLinear8[(cb += wp[2]) & mask];
-		t2 = ToLinear8[(cg += wp[1]) & mask];
-		t3 = ToLinear8[(cr += wp[0]) & mask];
-		op[1] = t1;
-		op[2] = t2;
-		op[3] = t3;
-	    }
-	} else if (stride == 4) {
-	    t0 = ToLinear8[ca = wp[3]];
-	    t1 = ToLinear8[cb = wp[2]];
-	    t2 = ToLinear8[cg = wp[1]];
-	    t3 = ToLinear8[cr = wp[0]];
-	    op[0] = t0;
-	    op[1] = t1;
-	    op[2] = t2;
-	    op[3] = t3;
-	    n -= 4;
-	    while (n > 0) {
-		n -= 4;
-		wp += 4;
-		op += 4;
-		t0 = ToLinear8[(ca += wp[3]) & mask];
-		t1 = ToLinear8[(cb += wp[2]) & mask];
-		t2 = ToLinear8[(cg += wp[1]) & mask];
-		t3 = ToLinear8[(cr += wp[0]) & mask];
-		op[0] = t0;
-		op[1] = t1;
-		op[2] = t2;
-		op[3] = t3;
-	    }
-	} else {
-	    REPEAT(stride, *op = ToLinear8[*wp&mask]; wp++; op++)
-	    n -= stride;
-	    while (n > 0) {
-		REPEAT(stride,
-		    wp[stride] += *wp; *op = ToLinear8[*wp&mask]; wp++; op++)
-		n -= stride;
-	    }
-	}
-    }
-}
-
-/*
- * State block for each open TIFF
- * file using PixarLog compression/decompression.
- */
-typedef	struct {
-	TIFFPredictorState	predict;
-	z_stream		stream;
-	uint16			*tbuf; 
-	uint16			stride;
-	int			state;
-	int			user_datafmt;
-	int			quality;
-#define PLSTATE_INIT 1
-
-	TIFFVSetMethod		vgetparent;	/* super-class method */
-	TIFFVSetMethod		vsetparent;	/* super-class method */
-
-	float *ToLinearF;
-	uint16 *ToLinear16;
-	unsigned char *ToLinear8;
-	uint16  *FromLT2;
-	uint16  *From14; /* Really for 16-bit data, but we shift down 2 */
-	uint16  *From8;
-	
-} PixarLogState;
-
-static int
-PixarLogMakeTables(PixarLogState *sp)
-{
-
-/*
- *    We make several tables here to convert between various external
- *    representations (float, 16-bit, and 8-bit) and the internal
- *    11-bit companded representation.  The 11-bit representation has two
- *    distinct regions.  A linear bottom end up through .018316 in steps
- *    of about .000073, and a region of constant ratio up to about 25.
- *    These floating point numbers are stored in the main table ToLinearF. 
- *    All other tables are derived from this one.  The tables (and the
- *    ratios) are continuous at the internal seam.
- */
-
-    int  nlin, lt2size;
-    int  i, j;
-    double  b, c, linstep, v;
-    float *ToLinearF;
-    uint16 *ToLinear16;
-    unsigned char *ToLinear8;
-    uint16  *FromLT2;
-    uint16  *From14; /* Really for 16-bit data, but we shift down 2 */
-    uint16  *From8;
-
-    c = log(RATIO);	
-    nlin = (int)1./c;	/* nlin must be an integer */
-    c = 1./nlin;
-    b = exp(-c*ONE);	/* multiplicative scale factor [b*exp(c*ONE) = 1] */
-    linstep = b*c*exp(1.);
-
-    LogK1 = 1./c;	/* if (v >= 2)  token = k1*log(v*k2) */
-    LogK2 = 1./b;
-    lt2size = (int)(2./linstep) + 1;
-    FromLT2 = (uint16 *)_TIFFmalloc(lt2size*sizeof(uint16));
-    From14 = (uint16 *)_TIFFmalloc(16384*sizeof(uint16));
-    From8 = (uint16 *)_TIFFmalloc(256*sizeof(uint16));
-    ToLinearF = (float *)_TIFFmalloc(TSIZEP1 * sizeof(float));
-    ToLinear16 = (uint16 *)_TIFFmalloc(TSIZEP1 * sizeof(uint16));
-    ToLinear8 = (unsigned char *)_TIFFmalloc(TSIZEP1 * sizeof(unsigned char));
-    if (FromLT2 == NULL || From14  == NULL || From8   == NULL ||
-	 ToLinearF == NULL || ToLinear16 == NULL || ToLinear8 == NULL) {
-	if (FromLT2) _TIFFfree(FromLT2);
-	if (From14) _TIFFfree(From14);
-	if (From8) _TIFFfree(From8);
-	if (ToLinearF) _TIFFfree(ToLinearF);
-	if (ToLinear16) _TIFFfree(ToLinear16);
-	if (ToLinear8) _TIFFfree(ToLinear8);
-	sp->FromLT2 = NULL;
-	sp->From14 = NULL;
-	sp->From8 = NULL;
-	sp->ToLinearF = NULL;
-	sp->ToLinear16 = NULL;
-	sp->ToLinear8 = NULL;
-	return 0;
-    }
-
-    j = 0;
-
-    for (i = 0; i < nlin; i++)  {
-	v = i * linstep;
-	ToLinearF[j++] = v;
-    }
-
-    for (i = nlin; i < TSIZE; i++)
-	ToLinearF[j++] = b*exp(c*i);
-
-    ToLinearF[2048] = ToLinearF[2047];
-
-    for (i = 0; i < TSIZEP1; i++)  {
-	v = ToLinearF[i]*65535.0 + 0.5;
-	ToLinear16[i] = (v > 65535.0) ? 65535 : (uint16)v;
-	v = ToLinearF[i]*255.0  + 0.5;
-	ToLinear8[i]  = (v > 255.0) ? 255 : (unsigned char)v;
-    }
-
-    j = 0;
-    for (i = 0; i < lt2size; i++)  {
-	if ((i*linstep)*(i*linstep) > ToLinearF[j]*ToLinearF[j+1])
-	    j++;
-	FromLT2[i] = j;
-    }
-
-    /*
-     * Since we lose info anyway on 16-bit data, we set up a 14-bit
-     * table and shift 16-bit values down two bits on input.
-     * saves a little table space.
-     */
-    j = 0;
-    for (i = 0; i < 16384; i++)  {
-	while ((i/16383.)*(i/16383.) > ToLinearF[j]*ToLinearF[j+1])
-	    j++;
-	From14[i] = j;
-    }
-
-    j = 0;
-    for (i = 0; i < 256; i++)  {
-	while ((i/255.)*(i/255.) > ToLinearF[j]*ToLinearF[j+1])
-	    j++;
-	From8[i] = j;
-    }
-
-    Fltsize = lt2size/2;
-
-    sp->ToLinearF = ToLinearF;
-    sp->ToLinear16 = ToLinear16;
-    sp->ToLinear8 = ToLinear8;
-    sp->FromLT2 = FromLT2;
-    sp->From14 = From14;
-    sp->From8 = From8;
-
-    return 1;
-}
-
-#define	DecoderState(tif)	((PixarLogState*) (tif)->tif_data)
-#define	EncoderState(tif)	((PixarLogState*) (tif)->tif_data)
-
-static	int PixarLogEncode(TIFF*, tidata_t, tsize_t, tsample_t);
-static	int PixarLogDecode(TIFF*, tidata_t, tsize_t, tsample_t);
-
-#define N(a)   (sizeof(a)/sizeof(a[0]))
-#define PIXARLOGDATAFMT_UNKNOWN	-1
-
-static int
-PixarLogGuessDataFmt(TIFFDirectory *td)
-{
-	int guess = PIXARLOGDATAFMT_UNKNOWN;
-	int format = td->td_sampleformat;
-
-	/* If the user didn't tell us his datafmt,
-	 * take our best guess from the bitspersample.
-	 */
-	switch (td->td_bitspersample) {
-	 case 32:
-		if (format == SAMPLEFORMAT_IEEEFP)
-			guess = PIXARLOGDATAFMT_FLOAT;
-		break;
-	 case 16:
-		if (format == SAMPLEFORMAT_VOID || format == SAMPLEFORMAT_UINT)
-			guess = PIXARLOGDATAFMT_16BIT;
-		break;
-	 case 12:
-		if (format == SAMPLEFORMAT_VOID || format == SAMPLEFORMAT_INT)
-			guess = PIXARLOGDATAFMT_12BITPICIO;
-		break;
-	 case 11:
-		if (format == SAMPLEFORMAT_VOID || format == SAMPLEFORMAT_UINT)
-			guess = PIXARLOGDATAFMT_11BITLOG;
-		break;
-	 case 8:
-		if (format == SAMPLEFORMAT_VOID || format == SAMPLEFORMAT_UINT)
-			guess = PIXARLOGDATAFMT_8BIT;
-		break;
-	}
-
-	return guess;
-}
-
-static int
-PixarLogSetupDecode(TIFF* tif)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-	PixarLogState* sp = DecoderState(tif);
-	static const char module[] = "PixarLogSetupDecode";
-
-	assert(sp != NULL);
-
-	/* Make sure no byte swapping happens on the data
-	 * after decompression. */
-	tif->tif_postdecode = _TIFFNoPostDecode;
-
-	/* for some reason, we can't do this in TIFFInitPixarLog */
-
-	sp->stride = (td->td_planarconfig == PLANARCONFIG_CONTIG ?
-	    td->td_samplesperpixel : 1);
-	sp->tbuf = (uint16 *) _TIFFmalloc(sp->stride * 
-		td->td_imagewidth * td->td_rowsperstrip * sizeof(uint16));
-	if (sp->user_datafmt == PIXARLOGDATAFMT_UNKNOWN)
-		sp->user_datafmt = PixarLogGuessDataFmt(td);
-	if (sp->user_datafmt == PIXARLOGDATAFMT_UNKNOWN) {
-		TIFFError(module, 
-			"PixarLog compression can't handle bits depth/data format combination (depth: %d)", 
-			td->td_bitspersample);
-		return (0);
-	}
-
-	if (inflateInit(&sp->stream) != Z_OK) {
-		TIFFError(module, "%s: %s", tif->tif_name, sp->stream.msg);
-		return (0);
-	} else {
-		sp->state |= PLSTATE_INIT;
-		return (1);
-	}
-}
-
-/*
- * Setup state for decoding a strip.
- */
-static int
-PixarLogPreDecode(TIFF* tif, tsample_t s)
-{
-	PixarLogState* sp = DecoderState(tif);
-
-	(void) s;
-	assert(sp != NULL);
-	sp->stream.next_in = tif->tif_rawdata;
-	sp->stream.avail_in = tif->tif_rawcc;
-	return (inflateReset(&sp->stream) == Z_OK);
-}
-
-static int
-PixarLogDecode(TIFF* tif, tidata_t op, tsize_t occ, tsample_t s)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-	PixarLogState* sp = DecoderState(tif);
-	static const char module[] = "PixarLogDecode";
-	int i, nsamples, llen;
-	uint16 *up;
-
-	switch (sp->user_datafmt) {
-	case PIXARLOGDATAFMT_FLOAT:
-		nsamples = occ / sizeof(float);	/* XXX float == 32 bits */
-		break;
-	case PIXARLOGDATAFMT_16BIT:
-	case PIXARLOGDATAFMT_12BITPICIO:
-	case PIXARLOGDATAFMT_11BITLOG:
-		nsamples = occ / sizeof(uint16); /* XXX uint16 == 16 bits */
-		break;
-	case PIXARLOGDATAFMT_8BIT:
-	case PIXARLOGDATAFMT_8BITABGR:
-		nsamples = occ;
-		break;
-	default:
-		TIFFError(tif->tif_name,
-			"%d bit input not supported in PixarLog",
-			td->td_bitspersample);
-		return 0;
-	}
-
-	llen = sp->stride * td->td_imagewidth;
-
-	(void) s;
-	assert(sp != NULL);
-	sp->stream.next_out = (unsigned char *) sp->tbuf;
-	sp->stream.avail_out = nsamples * sizeof(uint16);
-	do {
-		int state = inflate(&sp->stream, Z_PARTIAL_FLUSH);
-		if (state == Z_STREAM_END) {
-			break;			/* XXX */
-		}
-		if (state == Z_DATA_ERROR) {
-			TIFFError(module,
-			    "%s: Decoding error at scanline %d, %s",
-			    tif->tif_name, tif->tif_row, sp->stream.msg);
-			if (inflateSync(&sp->stream) != Z_OK)
-				return (0);
-			continue;
-		}
-		if (state != Z_OK) {
-			TIFFError(module, "%s: zlib error: %s",
-			    tif->tif_name, sp->stream.msg);
-			return (0);
-		}
-	} while (sp->stream.avail_out > 0);
-
-	/* hopefully, we got all the bytes we needed */
-	if (sp->stream.avail_out != 0) {
-		TIFFError(module,
-		    "%s: Not enough data at scanline %d (short %d bytes)",
-		    tif->tif_name, tif->tif_row, sp->stream.avail_out);
-		return (0);
-	}
-
-	up = sp->tbuf;
-	/* Swap bytes in the data if from a different endian machine. */
-	if (tif->tif_flags & TIFF_SWAB)
-		TIFFSwabArrayOfShort(up, nsamples);
-
-	for (i = 0; i < nsamples; i += llen, up += llen) {
-		switch (sp->user_datafmt)  {
-		case PIXARLOGDATAFMT_FLOAT:
-			horizontalAccumulateF(up, llen, sp->stride,
-					(float *)op, sp->ToLinearF);
-			op += llen * sizeof(float);
-			break;
-		case PIXARLOGDATAFMT_16BIT:
-			horizontalAccumulate16(up, llen, sp->stride,
-					(uint16 *)op, sp->ToLinear16);
-			op += llen * sizeof(uint16);
-			break;
-		case PIXARLOGDATAFMT_12BITPICIO:
-			horizontalAccumulate12(up, llen, sp->stride,
-					(int16 *)op, sp->ToLinearF);
-			op += llen * sizeof(int16);
-			break;
-		case PIXARLOGDATAFMT_11BITLOG:
-			horizontalAccumulate11(up, llen, sp->stride,
-					(uint16 *)op);
-			op += llen * sizeof(uint16);
-			break;
-		case PIXARLOGDATAFMT_8BIT:
-			horizontalAccumulate8(up, llen, sp->stride,
-					(unsigned char *)op, sp->ToLinear8);
-			op += llen * sizeof(unsigned char);
-			break;
-		case PIXARLOGDATAFMT_8BITABGR:
-			horizontalAccumulate8abgr(up, llen, sp->stride,
-					(unsigned char *)op, sp->ToLinear8);
-			op += llen * sizeof(unsigned char);
-			break;
-		default:
-			TIFFError(tif->tif_name,
-				  "PixarLogDecode: unsupported bits/sample: %d", 
-				  td->td_bitspersample);
-			return (0);
-		}
-	}
-
-	return (1);
-}
-
-static int
-PixarLogSetupEncode(TIFF* tif)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-	PixarLogState* sp = EncoderState(tif);
-	static const char module[] = "PixarLogSetupEncode";
-
-	assert(sp != NULL);
-
-	/* for some reason, we can't do this in TIFFInitPixarLog */
-
-	sp->stride = (td->td_planarconfig == PLANARCONFIG_CONTIG ?
-	    td->td_samplesperpixel : 1);
-	sp->tbuf = (uint16 *) _TIFFmalloc(sp->stride * 
-		td->td_imagewidth * td->td_rowsperstrip * sizeof(uint16));
-	if (sp->user_datafmt == PIXARLOGDATAFMT_UNKNOWN)
-		sp->user_datafmt = PixarLogGuessDataFmt(td);
-	if (sp->user_datafmt == PIXARLOGDATAFMT_UNKNOWN) {
-		TIFFError(module, "PixarLog compression can't handle %d bit linear encodings", td->td_bitspersample);
-		return (0);
-	}
-
-	if (deflateInit(&sp->stream, sp->quality) != Z_OK) {
-		TIFFError(module, "%s: %s", tif->tif_name, sp->stream.msg);
-		return (0);
-	} else {
-		sp->state |= PLSTATE_INIT;
-		return (1);
-	}
-}
-
-/*
- * Reset encoding state at the start of a strip.
- */
-static int
-PixarLogPreEncode(TIFF* tif, tsample_t s)
-{
-	PixarLogState *sp = EncoderState(tif);
-
-	(void) s;
-	assert(sp != NULL);
-	sp->stream.next_out = tif->tif_rawdata;
-	sp->stream.avail_out = tif->tif_rawdatasize;
-	return (deflateReset(&sp->stream) == Z_OK);
-}
-
-static void
-horizontalDifferenceF(float *ip, int n, int stride, uint16 *wp, uint16 *FromLT2)
-{
-
-    register int  r1, g1, b1, a1, r2, g2, b2, a2, mask;
-    register float  fltsize = Fltsize;
-
-#define  CLAMP(v) ( (v<(float)0.)   ? 0				\
-		  : (v<(float)2.)   ? FromLT2[(int)(v*fltsize)]	\
-		  : (v>(float)24.2) ? 2047			\
-		  : LogK1*log(v*LogK2) + 0.5 )
-
-    mask = CODE_MASK;
-    if (n >= stride) {
-	if (stride == 3) {
-	    r2 = wp[0] = CLAMP(ip[0]);  g2 = wp[1] = CLAMP(ip[1]);
-	    b2 = wp[2] = CLAMP(ip[2]);
-	    n -= 3;
-	    while (n > 0) {
-		n -= 3;
-		wp += 3;
-		ip += 3;
-		r1 = CLAMP(ip[0]); wp[0] = (r1-r2) & mask; r2 = r1;
-		g1 = CLAMP(ip[1]); wp[1] = (g1-g2) & mask; g2 = g1;
-		b1 = CLAMP(ip[2]); wp[2] = (b1-b2) & mask; b2 = b1;
-	    }
-	} else if (stride == 4) {
-	    r2 = wp[0] = CLAMP(ip[0]);  g2 = wp[1] = CLAMP(ip[1]);
-	    b2 = wp[2] = CLAMP(ip[2]);  a2 = wp[3] = CLAMP(ip[3]);
-	    n -= 4;
-	    while (n > 0) {
-		n -= 4;
-		wp += 4;
-		ip += 4;
-		r1 = CLAMP(ip[0]); wp[0] = (r1-r2) & mask; r2 = r1;
-		g1 = CLAMP(ip[1]); wp[1] = (g1-g2) & mask; g2 = g1;
-		b1 = CLAMP(ip[2]); wp[2] = (b1-b2) & mask; b2 = b1;
-		a1 = CLAMP(ip[3]); wp[3] = (a1-a2) & mask; a2 = a1;
-	    }
-	} else {
-	    ip += n - 1;	/* point to last one */
-	    wp += n - 1;	/* point to last one */
-	    n -= stride;
-	    while (n > 0) {
-		REPEAT(stride, wp[0] = CLAMP(ip[0]);
-				wp[stride] -= wp[0];
-				wp[stride] &= mask;
-				wp--; ip--)
-		n -= stride;
-	    }
-	    REPEAT(stride, wp[0] = CLAMP(ip[0]); wp--; ip--)
-	}
-    }
-}
-
-static void
-horizontalDifference16(unsigned short *ip, int n, int stride, 
-	unsigned short *wp, uint16 *From14)
-{
-    register int  r1, g1, b1, a1, r2, g2, b2, a2, mask;
-
-/* assumption is unsigned pixel values */
-#undef   CLAMP
-#define  CLAMP(v) From14[(v) >> 2]
-
-    mask = CODE_MASK;
-    if (n >= stride) {
-	if (stride == 3) {
-	    r2 = wp[0] = CLAMP(ip[0]);  g2 = wp[1] = CLAMP(ip[1]);
-	    b2 = wp[2] = CLAMP(ip[2]);
-	    n -= 3;
-	    while (n > 0) {
-		n -= 3;
-		wp += 3;
-		ip += 3;
-		r1 = CLAMP(ip[0]); wp[0] = (r1-r2) & mask; r2 = r1;
-		g1 = CLAMP(ip[1]); wp[1] = (g1-g2) & mask; g2 = g1;
-		b1 = CLAMP(ip[2]); wp[2] = (b1-b2) & mask; b2 = b1;
-	    }
-	} else if (stride == 4) {
-	    r2 = wp[0] = CLAMP(ip[0]);  g2 = wp[1] = CLAMP(ip[1]);
-	    b2 = wp[2] = CLAMP(ip[2]);  a2 = wp[3] = CLAMP(ip[3]);
-	    n -= 4;
-	    while (n > 0) {
-		n -= 4;
-		wp += 4;
-		ip += 4;
-		r1 = CLAMP(ip[0]); wp[0] = (r1-r2) & mask; r2 = r1;
-		g1 = CLAMP(ip[1]); wp[1] = (g1-g2) & mask; g2 = g1;
-		b1 = CLAMP(ip[2]); wp[2] = (b1-b2) & mask; b2 = b1;
-		a1 = CLAMP(ip[3]); wp[3] = (a1-a2) & mask; a2 = a1;
-	    }
-	} else {
-	    ip += n - 1;	/* point to last one */
-	    wp += n - 1;	/* point to last one */
-	    n -= stride;
-	    while (n > 0) {
-		REPEAT(stride, wp[0] = CLAMP(ip[0]);
-				wp[stride] -= wp[0];
-				wp[stride] &= mask;
-				wp--; ip--)
-		n -= stride;
-	    }
-	    REPEAT(stride, wp[0] = CLAMP(ip[0]); wp--; ip--)
-	}
-    }
-}
-
-
-static void
-horizontalDifference8(unsigned char *ip, int n, int stride, 
-	unsigned short *wp, uint16 *From8)
-{
-    register int  r1, g1, b1, a1, r2, g2, b2, a2, mask;
-
-#undef	 CLAMP
-#define  CLAMP(v) (From8[(v)])
-
-    mask = CODE_MASK;
-    if (n >= stride) {
-	if (stride == 3) {
-	    r2 = wp[0] = CLAMP(ip[0]);  g2 = wp[1] = CLAMP(ip[1]);
-	    b2 = wp[2] = CLAMP(ip[2]);
-	    n -= 3;
-	    while (n > 0) {
-		n -= 3;
-		r1 = CLAMP(ip[3]); wp[3] = (r1-r2) & mask; r2 = r1;
-		g1 = CLAMP(ip[4]); wp[4] = (g1-g2) & mask; g2 = g1;
-		b1 = CLAMP(ip[5]); wp[5] = (b1-b2) & mask; b2 = b1;
-		wp += 3;
-		ip += 3;
-	    }
-	} else if (stride == 4) {
-	    r2 = wp[0] = CLAMP(ip[0]);  g2 = wp[1] = CLAMP(ip[1]);
-	    b2 = wp[2] = CLAMP(ip[2]);  a2 = wp[3] = CLAMP(ip[3]);
-	    n -= 4;
-	    while (n > 0) {
-		n -= 4;
-		r1 = CLAMP(ip[4]); wp[4] = (r1-r2) & mask; r2 = r1;
-		g1 = CLAMP(ip[5]); wp[5] = (g1-g2) & mask; g2 = g1;
-		b1 = CLAMP(ip[6]); wp[6] = (b1-b2) & mask; b2 = b1;
-		a1 = CLAMP(ip[7]); wp[7] = (a1-a2) & mask; a2 = a1;
-		wp += 4;
-		ip += 4;
-	    }
-	} else {
-	    wp += n + stride - 1;	/* point to last one */
-	    ip += n + stride - 1;	/* point to last one */
-	    n -= stride;
-	    while (n > 0) {
-		REPEAT(stride, wp[0] = CLAMP(ip[0]);
-				wp[stride] -= wp[0];
-				wp[stride] &= mask;
-				wp--; ip--)
-		n -= stride;
-	    }
-	    REPEAT(stride, wp[0] = CLAMP(ip[0]); wp--; ip--)
-	}
-    }
-}
-
-/*
- * Encode a chunk of pixels.
- */
-static int
-PixarLogEncode(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-	PixarLogState *sp = EncoderState(tif);
-	static const char module[] = "PixarLogEncode";
-	int 	i, n, llen;
-	unsigned short * up;
-
-	(void) s;
-
-	switch (sp->user_datafmt) {
-	case PIXARLOGDATAFMT_FLOAT:
-		n = cc / sizeof(float);		/* XXX float == 32 bits */
-		break;
-	case PIXARLOGDATAFMT_16BIT:
-	case PIXARLOGDATAFMT_12BITPICIO:
-	case PIXARLOGDATAFMT_11BITLOG:
-		n = cc / sizeof(uint16);	/* XXX uint16 == 16 bits */
-		break;
-	case PIXARLOGDATAFMT_8BIT:
-	case PIXARLOGDATAFMT_8BITABGR:
-		n = cc;
-		break;
-	default:
-		TIFFError(tif->tif_name,
-			"%d bit input not supported in PixarLog",
-			td->td_bitspersample);
-		return 0;
-	}
-
-	llen = sp->stride * td->td_imagewidth;
-
-	for (i = 0, up = sp->tbuf; i < n; i += llen, up += llen) {
-		switch (sp->user_datafmt)  {
-		case PIXARLOGDATAFMT_FLOAT:
-			horizontalDifferenceF((float *)bp, llen, 
-				sp->stride, up, sp->FromLT2);
-			bp += llen * sizeof(float);
-			break;
-		case PIXARLOGDATAFMT_16BIT:
-			horizontalDifference16((uint16 *)bp, llen, 
-				sp->stride, up, sp->From14);
-			bp += llen * sizeof(uint16);
-			break;
-		case PIXARLOGDATAFMT_8BIT:
-			horizontalDifference8((unsigned char *)bp, llen, 
-				sp->stride, up, sp->From8);
-			bp += llen * sizeof(unsigned char);
-			break;
-		default:
-			TIFFError(tif->tif_name,
-				"%d bit input not supported in PixarLog",
-				td->td_bitspersample);
-			return 0;
-		}
-	}
- 
-	sp->stream.next_in = (unsigned char *) sp->tbuf;
-	sp->stream.avail_in = n * sizeof(uint16);
-
-	do {
-		if (deflate(&sp->stream, Z_NO_FLUSH) != Z_OK) {
-			TIFFError(module, "%s: Encoder error: %s",
-			    tif->tif_name, sp->stream.msg);
-			return (0);
-		}
-		if (sp->stream.avail_out == 0) {
-			tif->tif_rawcc = tif->tif_rawdatasize;
-			TIFFFlushData1(tif);
-			sp->stream.next_out = tif->tif_rawdata;
-			sp->stream.avail_out = tif->tif_rawdatasize;
-		}
-	} while (sp->stream.avail_in > 0);
-	return (1);
-}
-
-/*
- * Finish off an encoded strip by flushing the last
- * string and tacking on an End Of Information code.
- */
-
-static int
-PixarLogPostEncode(TIFF* tif)
-{
-	PixarLogState *sp = EncoderState(tif);
-	static const char module[] = "PixarLogPostEncode";
-	int state;
-
-	sp->stream.avail_in = 0;
-
-	do {
-		state = deflate(&sp->stream, Z_FINISH);
-		switch (state) {
-		case Z_STREAM_END:
-		case Z_OK:
-		    if (sp->stream.avail_out != tif->tif_rawdatasize) {
-			    tif->tif_rawcc =
-				tif->tif_rawdatasize - sp->stream.avail_out;
-			    TIFFFlushData1(tif);
-			    sp->stream.next_out = tif->tif_rawdata;
-			    sp->stream.avail_out = tif->tif_rawdatasize;
-		    }
-		    break;
-		default:
-		    TIFFError(module, "%s: zlib error: %s",
-			tif->tif_name, sp->stream.msg);
-		    return (0);
-		}
-	} while (state != Z_STREAM_END);
-	return (1);
-}
-
-static void
-PixarLogClose(TIFF* tif)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-
-	/* In a really sneaky maneuver, on close, we covertly modify both
-	 * bitspersample and sampleformat in the directory to indicate
-	 * 8-bit linear.  This way, the decode "just works" even for
-	 * readers that don't know about PixarLog, or how to set
-	 * the PIXARLOGDATFMT pseudo-tag.
-	 */
-	td->td_bitspersample = 8;
-	td->td_sampleformat = SAMPLEFORMAT_UINT;
-}
-
-static void
-PixarLogCleanup(TIFF* tif)
-{
-	PixarLogState* sp = (PixarLogState*) tif->tif_data;
-
-	if (sp) {
-		if (sp->FromLT2) _TIFFfree(sp->FromLT2);
-		if (sp->From14) _TIFFfree(sp->From14);
-		if (sp->From8) _TIFFfree(sp->From8);
-		if (sp->ToLinearF) _TIFFfree(sp->ToLinearF);
-		if (sp->ToLinear16) _TIFFfree(sp->ToLinear16);
-		if (sp->ToLinear8) _TIFFfree(sp->ToLinear8);
-		if (sp->state&PLSTATE_INIT) {
-			if (tif->tif_mode == O_RDONLY)
-				inflateEnd(&sp->stream);
-			else
-				deflateEnd(&sp->stream);
-		}
-		if (sp->tbuf)
-			_TIFFfree(sp->tbuf);
-		_TIFFfree(sp);
-		tif->tif_data = NULL;
-	}
-}
-
-static int
-PixarLogVSetField(TIFF* tif, ttag_t tag, va_list ap)
-{
-    PixarLogState *sp = (PixarLogState *)tif->tif_data;
-    int result;
-    static const char module[] = "PixarLogVSetField";
-
-    switch (tag) {
-     case TIFFTAG_PIXARLOGQUALITY:
-		sp->quality = va_arg(ap, int);
-		if (tif->tif_mode != O_RDONLY && (sp->state&PLSTATE_INIT)) {
-			if (deflateParams(&sp->stream,
-			    sp->quality, Z_DEFAULT_STRATEGY) != Z_OK) {
-				TIFFError(module, "%s: zlib error: %s",
-					tif->tif_name, sp->stream.msg);
-				return (0);
-			}
-		}
-		return (1);
-     case TIFFTAG_PIXARLOGDATAFMT:
-	sp->user_datafmt = va_arg(ap, int);
-	/* Tweak the TIFF header so that the rest of libtiff knows what
-	 * size of data will be passed between app and library, and
-	 * assume that the app knows what it is doing and is not
-	 * confused by these header manipulations...
-	 */
-	switch (sp->user_datafmt) {
-	 case PIXARLOGDATAFMT_8BIT:
-	 case PIXARLOGDATAFMT_8BITABGR:
-	    TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8);
-	    TIFFSetField(tif, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_UINT);
-	    break;
-	 case PIXARLOGDATAFMT_11BITLOG:
-	    TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 16);
-	    TIFFSetField(tif, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_UINT);
-	    break;
-	 case PIXARLOGDATAFMT_12BITPICIO:
-	    TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 16);
-	    TIFFSetField(tif, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_INT);
-	    break;
-	 case PIXARLOGDATAFMT_16BIT:
-	    TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 16);
-	    TIFFSetField(tif, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_UINT);
-	    break;
-	 case PIXARLOGDATAFMT_FLOAT:
-	    TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 32);
-	    TIFFSetField(tif, TIFFTAG_SAMPLEFORMAT, SAMPLEFORMAT_IEEEFP);
-	    break;
-	}
-	/*
-	 * Must recalculate sizes should bits/sample change.
-	 */
-	tif->tif_tilesize = TIFFTileSize(tif);
-	tif->tif_scanlinesize = TIFFScanlineSize(tif);
-	result = 1;		/* NB: pseudo tag */
-	break;
-     default:
-	result = (*sp->vsetparent)(tif, tag, ap);
-    }
-    return (result);
-}
-
-static int
-PixarLogVGetField(TIFF* tif, ttag_t tag, va_list ap)
-{
-    PixarLogState *sp = (PixarLogState *)tif->tif_data;
-
-    switch (tag) {
-     case TIFFTAG_PIXARLOGQUALITY:
-	*va_arg(ap, int*) = sp->quality;
-	break;
-     case TIFFTAG_PIXARLOGDATAFMT:
-	*va_arg(ap, int*) = sp->user_datafmt;
-	break;
-     default:
-	return (*sp->vgetparent)(tif, tag, ap);
-    }
-    return (1);
-}
-
-static const TIFFFieldInfo pixarlogFieldInfo[] = {
-    {TIFFTAG_PIXARLOGDATAFMT,0,0,TIFF_ANY,  FIELD_PSEUDO,FALSE,FALSE,""},
-    {TIFFTAG_PIXARLOGQUALITY,0,0,TIFF_ANY,  FIELD_PSEUDO,FALSE,FALSE,""}
-};
-
-int
-TIFFInitPixarLog(TIFF* tif, int scheme)
-{
-	PixarLogState* sp;
-
-	assert(scheme == COMPRESSION_PIXARLOG);
-
-	/*
-	 * Allocate state block so tag methods have storage to record values.
-	 */
-	tif->tif_data = (tidata_t) _TIFFmalloc(sizeof (PixarLogState));
-	if (tif->tif_data == NULL)
-		goto bad;
-	sp = (PixarLogState*) tif->tif_data;
-	memset(sp, 0, sizeof (*sp));
-	sp->stream.data_type = Z_BINARY;
-	sp->user_datafmt = PIXARLOGDATAFMT_UNKNOWN;
-
-	/*
-	 * Install codec methods.
-	 */
-	tif->tif_setupdecode = PixarLogSetupDecode;
-	tif->tif_predecode = PixarLogPreDecode;
-	tif->tif_decoderow = PixarLogDecode;
-	tif->tif_decodestrip = PixarLogDecode;
-	tif->tif_decodetile = PixarLogDecode;
-	tif->tif_setupencode = PixarLogSetupEncode;
-	tif->tif_preencode = PixarLogPreEncode;
-	tif->tif_postencode = PixarLogPostEncode;
-	tif->tif_encoderow = PixarLogEncode;
-	tif->tif_encodestrip = PixarLogEncode;
-	tif->tif_encodetile = PixarLogEncode;
-	tif->tif_close = PixarLogClose;
-	tif->tif_cleanup = PixarLogCleanup;
-
-	/* Override SetField so we can handle our private pseudo-tag */
-	_TIFFMergeFieldInfo(tif, pixarlogFieldInfo, N(pixarlogFieldInfo));
-	sp->vgetparent = tif->tif_tagmethods.vgetfield;
-	tif->tif_tagmethods.vgetfield = PixarLogVGetField;   /* hook for codec tags */
-	sp->vsetparent = tif->tif_tagmethods.vsetfield;
-	tif->tif_tagmethods.vsetfield = PixarLogVSetField;   /* hook for codec tags */
-
-	/* Default values for codec-specific fields */
-	sp->quality = Z_DEFAULT_COMPRESSION; /* default comp. level */
-	sp->state = 0;
-
-	/* we don't wish to use the predictor, 
-	 * the default is none, which predictor value 1
-	 */
-	(void) TIFFPredictorInit(tif);
-
-	/*
-	 * build the companding tables 
-	 */
-	PixarLogMakeTables(sp);
-
-	return (1);
-bad:
-	TIFFError("TIFFInitPixarLog", "No space for PixarLog state block");
-	return (0);
-}
-#endif /* PIXARLOG_SUPPORT */
diff --git a/src/tiff/tif_predict.c b/src/tiff/tif_predict.c
deleted file mode 100644
index 670c28b..0000000
--- a/src/tiff/tif_predict.c
+++ /dev/null
@@ -1,464 +0,0 @@
-/* $Header: /home/terralib/src/tiff/tif_predict.c,v 1.3 2004/03/19 11:51:25 lubia Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library.
- *
- * Predictor Tag Support (used by multiple codecs).
- */
-#include "tiffiop.h"
-#include "tif_predict.h"
-
-#include <assert.h>
-
-#define	PredictorState(tif)	((TIFFPredictorState*) (tif)->tif_data)
-
-static	void horAcc8(TIFF*, tidata_t, tsize_t);
-static	void horAcc16(TIFF*, tidata_t, tsize_t);
-static	void swabHorAcc16(TIFF*, tidata_t, tsize_t);
-static	void horDiff8(TIFF*, tidata_t, tsize_t);
-static	void horDiff16(TIFF*, tidata_t, tsize_t);
-static	int PredictorDecodeRow(TIFF*, tidata_t, tsize_t, tsample_t);
-static	int PredictorDecodeTile(TIFF*, tidata_t, tsize_t, tsample_t);
-static	int PredictorEncodeRow(TIFF*, tidata_t, tsize_t, tsample_t);
-static	int PredictorEncodeTile(TIFF*, tidata_t, tsize_t, tsample_t);
-
-static int
-PredictorSetup(TIFF* tif)
-{
-	TIFFPredictorState* sp = PredictorState(tif);
-	TIFFDirectory* td = &tif->tif_dir;
-
-	if (sp->predictor == 1)		/* no differencing */
-		return (1);
-	if (sp->predictor != 2) {
-		TIFFError(tif->tif_name, "\"Predictor\" value %d not supported",
-		    sp->predictor);
-		return (0);
-	}
-	if (td->td_bitspersample != 8 && td->td_bitspersample != 16) {
-		TIFFError(tif->tif_name,
-    "Horizontal differencing \"Predictor\" not supported with %d-bit samples",
-		    td->td_bitspersample);
-		return (0);
-	}
-	sp->stride = (td->td_planarconfig == PLANARCONFIG_CONTIG ?
-	    td->td_samplesperpixel : 1);
-	/*
-	 * Calculate the scanline/tile-width size in bytes.
-	 */
-	if (isTiled(tif))
-		sp->rowsize = TIFFTileRowSize(tif);
-	else
-		sp->rowsize = TIFFScanlineSize(tif);
-	return (1);
-}
-
-static int
-PredictorSetupDecode(TIFF* tif)
-{
-	TIFFPredictorState* sp = PredictorState(tif);
-	TIFFDirectory* td = &tif->tif_dir;
-
-	if (!(*sp->setupdecode)(tif) || !PredictorSetup(tif))
-		return (0);
-	if (sp->predictor == 2) {
-		switch (td->td_bitspersample) {
-		case 8:  sp->pfunc = horAcc8; break;
-		case 16: sp->pfunc = horAcc16; break;
-		}
-		/*
-		 * Override default decoding method with
-		 * one that does the predictor stuff.
-		 */
-		sp->coderow = tif->tif_decoderow;
-		tif->tif_decoderow = PredictorDecodeRow;
-		sp->codestrip = tif->tif_decodestrip;
-		tif->tif_decodestrip = PredictorDecodeTile;
-		sp->codetile = tif->tif_decodetile;
-		tif->tif_decodetile = PredictorDecodeTile;
-		/*
-		 * If the data is horizontally differenced
-		 * 16-bit data that requires byte-swapping,
-		 * then it must be byte swapped before the
-		 * accumulation step.  We do this with a
-		 * special-purpose routine and override the
-		 * normal post decoding logic that the library
-		 * setup when the directory was read.
-		 */
-		if (tif->tif_flags&TIFF_SWAB) {
-			if (sp->pfunc == horAcc16) {
-				sp->pfunc = swabHorAcc16;
-				tif->tif_postdecode = _TIFFNoPostDecode;
-			} /* else handle 32-bit case... */
-		}
-	}
-	return (1);
-}
-
-static int
-PredictorSetupEncode(TIFF* tif)
-{
-	TIFFPredictorState* sp = PredictorState(tif);
-	TIFFDirectory* td = &tif->tif_dir;
-
-	if (!(*sp->setupencode)(tif) || !PredictorSetup(tif))
-		return (0);
-	if (sp->predictor == 2) {
-		switch (td->td_bitspersample) {
-		case 8:  sp->pfunc = horDiff8; break;
-		case 16: sp->pfunc = horDiff16; break;
-		}
-		/*
-		 * Override default encoding method with
-		 * one that does the predictor stuff.
-		 */
-		sp->coderow = tif->tif_encoderow;
-		tif->tif_encoderow = PredictorEncodeRow;
-		sp->codestrip = tif->tif_encodestrip;
-		tif->tif_encodestrip = PredictorEncodeTile;
-		sp->codetile = tif->tif_encodetile;
-		tif->tif_encodetile = PredictorEncodeTile;
-	}
-	return (1);
-}
-
-#define REPEAT4(n, op)		\
-    switch (n) {		\
-    default: { int i; for (i = n-4; i > 0; i--) { op; } } \
-    case 4:  op;		\
-    case 3:  op;		\
-    case 2:  op;		\
-    case 1:  op;		\
-    case 0:  ;			\
-    }
-
-static void
-horAcc8(TIFF* tif, tidata_t cp0, tsize_t cc)
-{
-	TIFFPredictorState* sp = PredictorState(tif);
-	tsize_t stride = sp->stride;
-
-	char* cp = (char*) cp0;
-	if (cc > stride) {
-		cc -= stride;
-		/*
-		 * Pipeline the most common cases.
-		 */
-		if (stride == 3)  {
-			u_int cr = cp[0];
-			u_int cg = cp[1];
-			u_int cb = cp[2];
-			do {
-				cc -= 3, cp += 3;
-				cp[0] = (char) (cr += cp[0]);
-				cp[1] = (char) (cg += cp[1]);
-				cp[2] = (char) (cb += cp[2]);
-			} while ((int32) cc > 0);
-		} else if (stride == 4)  {
-			u_int cr = cp[0];
-			u_int cg = cp[1];
-			u_int cb = cp[2];
-			u_int ca = cp[3];
-			do {
-				cc -= 4, cp += 4;
-				cp[0] = (char) (cr += cp[0]);
-				cp[1] = (char) (cg += cp[1]);
-				cp[2] = (char) (cb += cp[2]);
-				cp[3] = (char) (ca += cp[3]);
-			} while ((int32) cc > 0);
-		} else  {
-			do {
-				REPEAT4(stride, cp[stride] = (char) (cp[stride] + *cp); cp++)
-				cc -= stride;
-			} while ((int32) cc > 0);
-		}
-	}
-}
-
-static void
-swabHorAcc16(TIFF* tif, tidata_t cp0, tsize_t cc)
-{
-	TIFFPredictorState* sp = PredictorState(tif);
-	tsize_t stride = sp->stride;
-	uint16* wp = (uint16*) cp0;
-	tsize_t wc = cc / 2;
-
-	if (wc > stride) {
-		TIFFSwabArrayOfShort(wp, wc);
-		wc -= stride;
-		do {
-			REPEAT4(stride, wp[stride] += wp[0]; wp++)
-			wc -= stride;
-		} while ((int32) wc > 0);
-	}
-}
-
-static void
-horAcc16(TIFF* tif, tidata_t cp0, tsize_t cc)
-{
-	tsize_t stride = PredictorState(tif)->stride;
-	uint16* wp = (uint16*) cp0;
-	tsize_t wc = cc / 2;
-
-	if (wc > stride) {
-		wc -= stride;
-		do {
-			REPEAT4(stride, wp[stride] += wp[0]; wp++)
-			wc -= stride;
-		} while ((int32) wc > 0);
-	}
-}
-
-/*
- * Decode a scanline and apply the predictor routine.
- */
-static int
-PredictorDecodeRow(TIFF* tif, tidata_t op0, tsize_t occ0, tsample_t s)
-{
-	TIFFPredictorState *sp = PredictorState(tif);
-
-	assert(sp != NULL);
-	assert(sp->coderow != NULL);
-	assert(sp->pfunc != NULL);
-	if ((*sp->coderow)(tif, op0, occ0, s)) {
-		(*sp->pfunc)(tif, op0, occ0);
-		return (1);
-	} else
-		return (0);
-}
-
-/*
- * Decode a tile/strip and apply the predictor routine.
- * Note that horizontal differencing must be done on a
- * row-by-row basis.  The width of a "row" has already
- * been calculated at pre-decode time according to the
- * strip/tile dimensions.
- */
-static int
-PredictorDecodeTile(TIFF* tif, tidata_t op0, tsize_t occ0, tsample_t s)
-{
-	TIFFPredictorState *sp = PredictorState(tif);
-
-	assert(sp != NULL);
-	assert(sp->codetile != NULL);
-	if ((*sp->codetile)(tif, op0, occ0, s)) {
-		tsize_t rowsize = sp->rowsize;
-		assert(rowsize > 0);
-		assert(sp->pfunc != NULL);
-		while ((long)occ0 > 0) {
-			(*sp->pfunc)(tif, op0, (tsize_t) rowsize);
-			occ0 -= rowsize;
-			op0 += rowsize;
-		}
-		return (1);
-	} else
-		return (0);
-}
-
-static void
-horDiff8(TIFF* tif, tidata_t cp0, tsize_t cc)
-{
-	TIFFPredictorState* sp = PredictorState(tif);
-	tsize_t stride = sp->stride;
-	char* cp = (char*) cp0;
-
-	if (cc > stride) {
-		cc -= stride;
-		/*
-		 * Pipeline the most common cases.
-		 */
-		if (stride == 3) {
-			int r1, g1, b1;
-			int r2 = cp[0];
-			int g2 = cp[1];
-			int b2 = cp[2];
-			do {
-				r1 = cp[3]; cp[3] = r1-r2; r2 = r1;
-				g1 = cp[4]; cp[4] = g1-g2; g2 = g1;
-				b1 = cp[5]; cp[5] = b1-b2; b2 = b1;
-				cp += 3;
-			} while ((int32)(cc -= 3) > 0);
-		} else if (stride == 4) {
-			int r1, g1, b1, a1;
-			int r2 = cp[0];
-			int g2 = cp[1];
-			int b2 = cp[2];
-			int a2 = cp[3];
-			do {
-				r1 = cp[4]; cp[4] = r1-r2; r2 = r1;
-				g1 = cp[5]; cp[5] = g1-g2; g2 = g1;
-				b1 = cp[6]; cp[6] = b1-b2; b2 = b1;
-				a1 = cp[7]; cp[7] = a1-a2; a2 = a1;
-				cp += 4;
-			} while ((int32)(cc -= 4) > 0);
-		} else {
-			cp += cc - 1;
-			do {
-				REPEAT4(stride, cp[stride] -= cp[0]; cp--)
-			} while ((int32)(cc -= stride) > 0);
-		}
-	}
-}
-
-static void
-horDiff16(TIFF* tif, tidata_t cp0, tsize_t cc)
-{
-	TIFFPredictorState* sp = PredictorState(tif);
-	tsize_t stride = sp->stride;
-	int16 *wp = (int16*) cp0;
-	tsize_t wc = cc/2;
-
-	if (wc > stride) {
-		wc -= stride;
-		wp += wc - 1;
-		do {
-			REPEAT4(stride, wp[stride] -= wp[0]; wp--)
-			wc -= stride;
-		} while ((int32) wc > 0);
-	}
-}
-
-static int
-PredictorEncodeRow(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
-{
-	TIFFPredictorState *sp = PredictorState(tif);
-
-	assert(sp != NULL);
-	assert(sp->pfunc != NULL);
-	assert(sp->coderow != NULL);
-/* XXX horizontal differencing alters user's data XXX */
-	(*sp->pfunc)(tif, bp, cc);
-	return ((*sp->coderow)(tif, bp, cc, s));
-}
-
-static int
-PredictorEncodeTile(TIFF* tif, tidata_t bp0, tsize_t cc0, tsample_t s)
-{
-	TIFFPredictorState *sp = PredictorState(tif);
-	tsize_t cc = cc0, rowsize;
-	u_char* bp = bp0;
-
-	assert(sp != NULL);
-	assert(sp->pfunc != NULL);
-	assert(sp->codetile != NULL);
-	rowsize = sp->rowsize;
-	assert(rowsize > 0);
-	while ((long)cc > 0) {
-		(*sp->pfunc)(tif, bp, (tsize_t) rowsize);
-		cc -= rowsize;
-		bp += rowsize;
-	}
-	return ((*sp->codetile)(tif, bp0, cc0, s));
-}
-
-#define	FIELD_PREDICTOR	(FIELD_CODEC+0)		/* XXX */
-
-static const TIFFFieldInfo predictFieldInfo[] = {
-    { TIFFTAG_PREDICTOR,	 1, 1, TIFF_SHORT,	FIELD_PREDICTOR,
-      FALSE,	FALSE,	"Predictor" },
-};
-#define	N(a)	(sizeof (a) / sizeof (a[0]))
-
-static int
-PredictorVSetField(TIFF* tif, ttag_t tag, va_list ap)
-{
-	TIFFPredictorState *sp = PredictorState(tif);
-
-	switch (tag) {
-	case TIFFTAG_PREDICTOR:
-		sp->predictor = (uint16) va_arg(ap, int);
-		TIFFSetFieldBit(tif, FIELD_PREDICTOR);
-		break;
-	default:
-		return (*sp->vsetparent)(tif, tag, ap);
-	}
-	tif->tif_flags |= TIFF_DIRTYDIRECT;
-	return (1);
-}
-
-static int
-PredictorVGetField(TIFF* tif, ttag_t tag, va_list ap)
-{
-	TIFFPredictorState *sp = PredictorState(tif);
-
-	switch (tag) {
-	case TIFFTAG_PREDICTOR:
-		*va_arg(ap, uint16*) = sp->predictor;
-		break;
-	default:
-		return (*sp->vgetparent)(tif, tag, ap);
-	}
-	return (1);
-}
-
-static void
-PredictorPrintDir(TIFF* tif, FILE* fd, long flags)
-{
-	TIFFPredictorState* sp = PredictorState(tif);
-
-	(void) flags;
-	if (TIFFFieldSet(tif,FIELD_PREDICTOR)) {
-		fprintf(fd, "  Predictor: ");
-		switch (sp->predictor) {
-		case 1: fprintf(fd, "none "); break;
-		case 2: fprintf(fd, "horizontal differencing "); break;
-		}
-		fprintf(fd, "%u (0x%x)\n", sp->predictor, sp->predictor);
-	}
-	if (sp->printdir)
-		(*sp->printdir)(tif, fd, flags);
-}
-
-int
-TIFFPredictorInit(TIFF* tif)
-{
-	TIFFPredictorState* sp = PredictorState(tif);
-
-	/*
-	 * Merge codec-specific tag information and
-	 * override parent get/set field methods.
-	 */
-	_TIFFMergeFieldInfo(tif, predictFieldInfo, N(predictFieldInfo));
-	sp->vgetparent = tif->tif_tagmethods.vgetfield;
-	tif->tif_tagmethods.vgetfield =
-            PredictorVGetField;/* hook for predictor tag */
-	sp->vsetparent = tif->tif_tagmethods.vsetfield;
-	tif->tif_tagmethods.vsetfield =
-            PredictorVSetField;/* hook for predictor tag */
-	sp->printdir = tif->tif_tagmethods.printdir;
-	tif->tif_tagmethods.printdir =
-            PredictorPrintDir;	/* hook for predictor tag */
-
-	sp->setupdecode = tif->tif_setupdecode;
-	tif->tif_setupdecode = PredictorSetupDecode;
-	sp->setupencode = tif->tif_setupencode;
-	tif->tif_setupencode = PredictorSetupEncode;
-
-	sp->predictor = 1;			/* default value */
-	sp->pfunc = NULL;			/* no predictor routine */
-	return (1);
-}
diff --git a/src/tiff/tif_predict.h b/src/tiff/tif_predict.h
deleted file mode 100644
index b40fb76..0000000
--- a/src/tiff/tif_predict.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* $Header: /home/terralib/src/tiff/tif_predict.h,v 1.3 2004/03/19 11:51:25 lubia Exp $ */
-
-/*
- * Copyright (c) 1995-1997 Sam Leffler
- * Copyright (c) 1995-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#ifndef _TIFFPREDICT_
-#define	_TIFFPREDICT_
-/*
- * ``Library-private'' Support for the Predictor Tag
- */
-
-/*
- * Codecs that want to support the Predictor tag must place
- * this structure first in their private state block so that
- * the predictor code can cast tif_data to find its state.
- */
-typedef struct {
-	int	predictor;		/* predictor tag value */
-	int	stride;			/* sample stride over data */
-	tsize_t	rowsize;		/* tile/strip row size */
-
-	TIFFPostMethod	pfunc;		/* horizontal differencer/accumulator */
-	TIFFCodeMethod	coderow;	/* parent codec encode/decode row */
-	TIFFCodeMethod	codestrip;	/* parent codec encode/decode strip */
-	TIFFCodeMethod	codetile;	/* parent codec encode/decode tile */
-	TIFFVGetMethod	vgetparent;	/* super-class method */
-	TIFFVSetMethod	vsetparent;	/* super-class method */
-	TIFFPrintMethod	printdir;	/* super-class method */
-	TIFFBoolMethod	setupdecode;	/* super-class method */
-	TIFFBoolMethod	setupencode;	/* super-class method */
-} TIFFPredictorState;
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-extern	int TIFFPredictorInit(TIFF*);
-#if defined(__cplusplus)
-}
-#endif
-#endif /* _TIFFPREDICT_ */
diff --git a/src/tiff/tif_print.c b/src/tiff/tif_print.c
deleted file mode 100644
index 087e565..0000000
--- a/src/tiff/tif_print.c
+++ /dev/null
@@ -1,613 +0,0 @@
-/* $Header: /home/terralib/src/tiff/tif_print.c,v 1.3 2004/03/19 11:51:25 lubia Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library.
- *
- * Directory Printing Support
- */
-#include "tiffiop.h"
-#include <stdio.h>
-
-#include <ctype.h>
-
-static const char *photoNames[] = {
-    "min-is-white",				/* PHOTOMETRIC_MINISWHITE */
-    "min-is-black",				/* PHOTOMETRIC_MINISBLACK */
-    "RGB color",				/* PHOTOMETRIC_RGB */
-    "palette color (RGB from colormap)",	/* PHOTOMETRIC_PALETTE */
-    "transparency mask",			/* PHOTOMETRIC_MASK */
-    "separated",				/* PHOTOMETRIC_SEPARATED */
-    "YCbCr",					/* PHOTOMETRIC_YCBCR */
-    "7 (0x7)",
-    "CIE L*a*b*",				/* PHOTOMETRIC_CIELAB */
-};
-#define	NPHOTONAMES	(sizeof (photoNames) / sizeof (photoNames[0]))
-
-static const char *orientNames[] = {
-    "0 (0x0)",
-    "row 0 top, col 0 lhs",			/* ORIENTATION_TOPLEFT */
-    "row 0 top, col 0 rhs",			/* ORIENTATION_TOPRIGHT */
-    "row 0 bottom, col 0 rhs",			/* ORIENTATION_BOTRIGHT */
-    "row 0 bottom, col 0 lhs",			/* ORIENTATION_BOTLEFT */
-    "row 0 lhs, col 0 top",			/* ORIENTATION_LEFTTOP */
-    "row 0 rhs, col 0 top",			/* ORIENTATION_RIGHTTOP */
-    "row 0 rhs, col 0 bottom",			/* ORIENTATION_RIGHTBOT */
-    "row 0 lhs, col 0 bottom",			/* ORIENTATION_LEFTBOT */
-};
-#define	NORIENTNAMES	(sizeof (orientNames) / sizeof (orientNames[0]))
-
-/*
- * Print the contents of the current directory
- * to the specified stdio file stream.
- */
-void
-TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags)
-{
-	register TIFFDirectory *td;
-	char *sep;
-	uint16 i;
-	long l, n;
-
-	fprintf(fd, "TIFF Directory at offset 0x%lx\n", tif->tif_diroff);
-	td = &tif->tif_dir;
-	if (TIFFFieldSet(tif,FIELD_SUBFILETYPE)) {
-		fprintf(fd, "  Subfile Type:");
-		sep = " ";
-		if (td->td_subfiletype & FILETYPE_REDUCEDIMAGE) {
-			fprintf(fd, "%sreduced-resolution image", sep);
-			sep = "/";
-		}
-		if (td->td_subfiletype & FILETYPE_PAGE) {
-			fprintf(fd, "%smulti-page document", sep);
-			sep = "/";
-		}
-		if (td->td_subfiletype & FILETYPE_MASK)
-			fprintf(fd, "%stransparency mask", sep);
-		fprintf(fd, " (%lu = 0x%lx)\n",
-		    (long) td->td_subfiletype, (long) td->td_subfiletype);
-	}
-	if (TIFFFieldSet(tif,FIELD_IMAGEDIMENSIONS)) {
-		fprintf(fd, "  Image Width: %lu Image Length: %lu",
-		    (u_long) td->td_imagewidth, (u_long) td->td_imagelength);
-		if (TIFFFieldSet(tif,FIELD_IMAGEDEPTH))
-			fprintf(fd, " Image Depth: %lu",
-			    (u_long) td->td_imagedepth);
-		fprintf(fd, "\n");
-	}
-
- 	/* Begin Pixar */
- 	if (TIFFFieldSet(tif,FIELD_IMAGEFULLWIDTH) ||
- 	    TIFFFieldSet(tif,FIELD_IMAGEFULLLENGTH)) {
-	  fprintf(fd, "  Pixar Full Image Width: %lu Full Image Length: %lu\n",
-		  (u_long) td->td_imagefullwidth,
-		  (u_long) td->td_imagefulllength);
- 	}
- 	if (TIFFFieldSet(tif,FIELD_TEXTUREFORMAT))
-	  _TIFFprintAsciiTag(fd, "Texture Format", td->td_textureformat);
- 	if (TIFFFieldSet(tif,FIELD_WRAPMODES))
-	  _TIFFprintAsciiTag(fd, "Texture Wrap Modes", td->td_wrapmodes);
- 	if (TIFFFieldSet(tif,FIELD_FOVCOT))
-	  fprintf(fd, "  Field of View Cotangent: %g\n", td->td_fovcot);
-	if (TIFFFieldSet(tif,FIELD_MATRIX_WORLDTOSCREEN)) {
-	  typedef float	Matrix[4][4];
-	  Matrix*		m = (Matrix*)td->td_matrixWorldToScreen;
-	  
-	  fprintf(fd, "  Matrix NP:\n\t%g %g %g %g\n\t%g %g %g %g\n\t%g %g %g %g\n\t%g %g %g %g\n",
-		  (*m)[0][0], (*m)[0][1], (*m)[0][2], (*m)[0][3],
-		  (*m)[1][0], (*m)[1][1], (*m)[1][2], (*m)[1][3],
-		  (*m)[2][0], (*m)[2][1], (*m)[2][2], (*m)[2][3],
-		  (*m)[3][0], (*m)[3][1], (*m)[3][2], (*m)[3][3]);
- 	}
- 	if (TIFFFieldSet(tif,FIELD_MATRIX_WORLDTOCAMERA)) {
-	  typedef float	Matrix[4][4];
-	  Matrix*		m = (Matrix*)td->td_matrixWorldToCamera;
-	  
-	  fprintf(fd, "  Matrix Nl:\n\t%g %g %g %g\n\t%g %g %g %g\n\t%g %g %g %g\n\t%g %g %g %g\n",
-		  (*m)[0][0], (*m)[0][1], (*m)[0][2], (*m)[0][3],
-		  (*m)[1][0], (*m)[1][1], (*m)[1][2], (*m)[1][3],
-		  (*m)[2][0], (*m)[2][1], (*m)[2][2], (*m)[2][3],
-		  (*m)[3][0], (*m)[3][1], (*m)[3][2], (*m)[3][3]);
- 	}
- 	/* End Pixar */
-	
-	if (TIFFFieldSet(tif,FIELD_TILEDIMENSIONS)) {
-		fprintf(fd, "  Tile Width: %lu Tile Length: %lu",
-		    (u_long) td->td_tilewidth, (u_long) td->td_tilelength);
-		if (TIFFFieldSet(tif,FIELD_TILEDEPTH))
-			fprintf(fd, " Tile Depth: %lu",
-			    (u_long) td->td_tiledepth);
-		fprintf(fd, "\n");
-	}
-	if (TIFFFieldSet(tif,FIELD_RESOLUTION)) {
-		fprintf(fd, "  Resolution: %g, %g",
-		    td->td_xresolution, td->td_yresolution);
-		if (TIFFFieldSet(tif,FIELD_RESOLUTIONUNIT)) {
-			switch (td->td_resolutionunit) {
-			case RESUNIT_NONE:
-				fprintf(fd, " (unitless)");
-				break;
-			case RESUNIT_INCH:
-				fprintf(fd, " pixels/inch");
-				break;
-			case RESUNIT_CENTIMETER:
-				fprintf(fd, " pixels/cm");
-				break;
-			default:
-				fprintf(fd, " (unit %u = 0x%x)",
-				    td->td_resolutionunit,
-				    td->td_resolutionunit);
-				break;
-			}
-		}
-		fprintf(fd, "\n");
-	}
-	if (TIFFFieldSet(tif,FIELD_POSITION))
-		fprintf(fd, "  Position: %g, %g\n",
-		    td->td_xposition, td->td_yposition);
-	if (TIFFFieldSet(tif,FIELD_BITSPERSAMPLE))
-		fprintf(fd, "  Bits/Sample: %u\n", td->td_bitspersample);
-	if (TIFFFieldSet(tif,FIELD_SAMPLEFORMAT)) {
-		fprintf(fd, "  Sample Format: ");
-		switch (td->td_sampleformat) {
-		case SAMPLEFORMAT_VOID:
-			fprintf(fd, "void\n");
-			break;
-		case SAMPLEFORMAT_INT:
-			fprintf(fd, "signed integer\n");
-			break;
-		case SAMPLEFORMAT_UINT:
-			fprintf(fd, "unsigned integer\n");
-			break;
-		case SAMPLEFORMAT_IEEEFP:
-			fprintf(fd, "IEEE floating point\n");
-			break;
-		case SAMPLEFORMAT_COMPLEXINT:
-			fprintf(fd, "complex signed integer\n");
-			break;
-		case SAMPLEFORMAT_COMPLEXIEEEFP:
-			fprintf(fd, "complex IEEE floating point\n");
-			break;
-		default:
-			fprintf(fd, "%u (0x%x)\n",
-			    td->td_sampleformat, td->td_sampleformat);
-			break;
-		}
-	}
-	if (TIFFFieldSet(tif,FIELD_COMPRESSION)) {
-		const TIFFCodec* c = TIFFFindCODEC(td->td_compression);
-		fprintf(fd, "  Compression Scheme: ");
-		if (c)
-			fprintf(fd, "%s\n", c->name);
-		else
-			fprintf(fd, "%u (0x%x)\n",
-			    td->td_compression, td->td_compression);
-	}
-	if (TIFFFieldSet(tif,FIELD_PHOTOMETRIC)) {
-		fprintf(fd, "  Photometric Interpretation: ");
-		if (td->td_photometric < NPHOTONAMES)
-			fprintf(fd, "%s\n", photoNames[td->td_photometric]);
-		else {
-			switch (td->td_photometric) {
-			case PHOTOMETRIC_LOGL:
-				fprintf(fd, "CIE Log2(L)\n");
-				break;
-			case PHOTOMETRIC_LOGLUV:
-				fprintf(fd, "CIE Log2(L) (u',v')\n");
-				break;
-			default:
-				fprintf(fd, "%u (0x%x)\n",
-				    td->td_photometric, td->td_photometric);
-				break;
-			}
-		}
-	}
-	if (TIFFFieldSet(tif,FIELD_EXTRASAMPLES) && td->td_extrasamples) {
-		fprintf(fd, "  Extra Samples: %u<", td->td_extrasamples);
-		sep = "";
-		for (i = 0; i < td->td_extrasamples; i++) {
-			switch (td->td_sampleinfo[i]) {
-			case EXTRASAMPLE_UNSPECIFIED:
-				fprintf(fd, "%sunspecified", sep);
-				break;
-			case EXTRASAMPLE_ASSOCALPHA:
-				fprintf(fd, "%sassoc-alpha", sep);
-				break;
-			case EXTRASAMPLE_UNASSALPHA:
-				fprintf(fd, "%sunassoc-alpha", sep);
-				break;
-			default:
-				fprintf(fd, "%s%u (0x%x)", sep,
-				    td->td_sampleinfo[i], td->td_sampleinfo[i]);
-				break;
-			}
-			sep = ", ";
-		}
-		fprintf(fd, ">\n");
-	}
-	if (TIFFFieldSet(tif,FIELD_STONITS)) {
-		fprintf(fd, "  Sample to Nits conversion factor: %.4e\n",
-				td->td_stonits);
-	}
-#ifdef CMYK_SUPPORT
-	if (TIFFFieldSet(tif,FIELD_INKSET)) {
-		fprintf(fd, "  Ink Set: ");
-		switch (td->td_inkset) {
-		case INKSET_CMYK:
-			fprintf(fd, "CMYK\n");
-			break;
-		default:
-			fprintf(fd, "%u (0x%x)\n",
-			    td->td_inkset, td->td_inkset);
-			break;
-		}
-	}
-	if (TIFFFieldSet(tif,FIELD_INKNAMES)) {
-		char* cp;
-		fprintf(fd, "  Ink Names: ");
-		i = td->td_samplesperpixel;
-		sep = "";
-		for (cp = td->td_inknames; i > 0; cp = strchr(cp,'\0')+1, i--) {
-			fprintf(fd, "%s", sep);
-			_TIFFprintAscii(fd, cp);
-			sep = ", ";
-		}
-	}
-	if (TIFFFieldSet(tif,FIELD_NUMBEROFINKS))
-		fprintf(fd, " Number of Inks: %u\n", td->td_ninks);
-	if (TIFFFieldSet(tif,FIELD_DOTRANGE))
-		fprintf(fd, "  Dot Range: %u-%u\n",
-		    td->td_dotrange[0], td->td_dotrange[1]);
-	if (TIFFFieldSet(tif,FIELD_TARGETPRINTER))
-		_TIFFprintAsciiTag(fd, "Target Printer", td->td_targetprinter);
-#endif
-	if (TIFFFieldSet(tif,FIELD_THRESHHOLDING)) {
-		fprintf(fd, "  Thresholding: ");
-		switch (td->td_threshholding) {
-		case THRESHHOLD_BILEVEL:
-			fprintf(fd, "bilevel art scan\n");
-			break;
-		case THRESHHOLD_HALFTONE:
-			fprintf(fd, "halftone or dithered scan\n");
-			break;
-		case THRESHHOLD_ERRORDIFFUSE:
-			fprintf(fd, "error diffused\n");
-			break;
-		default:
-			fprintf(fd, "%u (0x%x)\n",
-			    td->td_threshholding, td->td_threshholding);
-			break;
-		}
-	}
-	if (TIFFFieldSet(tif,FIELD_FILLORDER)) {
-		fprintf(fd, "  FillOrder: ");
-		switch (td->td_fillorder) {
-		case FILLORDER_MSB2LSB:
-			fprintf(fd, "msb-to-lsb\n");
-			break;
-		case FILLORDER_LSB2MSB:
-			fprintf(fd, "lsb-to-msb\n");
-			break;
-		default:
-			fprintf(fd, "%u (0x%x)\n",
-			    td->td_fillorder, td->td_fillorder);
-			break;
-		}
-	}
-#ifdef YCBCR_SUPPORT
-	if (TIFFFieldSet(tif,FIELD_YCBCRSUBSAMPLING))
-        {
-            /*
-             * For hacky reasons (see tif_jpeg.c - JPEGFixupTestSubsampling),
-             * we need to fetch this rather than trust what is in our
-             * structures.
-             */
-            uint16 subsampling[2];
-
-            TIFFGetField( tif, TIFFTAG_YCBCRSUBSAMPLING, 
-                          subsampling + 0, subsampling + 1 );
-		fprintf(fd, "  YCbCr Subsampling: %u, %u\n",
-                        subsampling[0], subsampling[1] );
-        }
-	if (TIFFFieldSet(tif,FIELD_YCBCRPOSITIONING)) {
-		fprintf(fd, "  YCbCr Positioning: ");
-		switch (td->td_ycbcrpositioning) {
-		case YCBCRPOSITION_CENTERED:
-			fprintf(fd, "centered\n");
-			break;
-		case YCBCRPOSITION_COSITED:
-			fprintf(fd, "cosited\n");
-			break;
-		default:
-			fprintf(fd, "%u (0x%x)\n",
-			    td->td_ycbcrpositioning, td->td_ycbcrpositioning);
-			break;
-		}
-	}
-	if (TIFFFieldSet(tif,FIELD_YCBCRCOEFFICIENTS))
-		fprintf(fd, "  YCbCr Coefficients: %g, %g, %g\n",
-		    td->td_ycbcrcoeffs[0],
-		    td->td_ycbcrcoeffs[1],
-		    td->td_ycbcrcoeffs[2]);
-#endif
-	if (TIFFFieldSet(tif,FIELD_HALFTONEHINTS))
-		fprintf(fd, "  Halftone Hints: light %u dark %u\n",
-		    td->td_halftonehints[0], td->td_halftonehints[1]);
-	if (TIFFFieldSet(tif,FIELD_ARTIST))
-		_TIFFprintAsciiTag(fd, "Artist", td->td_artist);
-	if (TIFFFieldSet(tif,FIELD_DATETIME))
-		_TIFFprintAsciiTag(fd, "Date & Time", td->td_datetime);
-	if (TIFFFieldSet(tif,FIELD_HOSTCOMPUTER))
-		_TIFFprintAsciiTag(fd, "Host Computer", td->td_hostcomputer);
-	if (TIFFFieldSet(tif,FIELD_COPYRIGHT))
-		_TIFFprintAsciiTag(fd, "Copyright", td->td_copyright);
-	if (TIFFFieldSet(tif,FIELD_DOCUMENTNAME))
-		_TIFFprintAsciiTag(fd, "Document Name", td->td_documentname);
-	if (TIFFFieldSet(tif,FIELD_IMAGEDESCRIPTION))
-		_TIFFprintAsciiTag(fd, "Image Description", td->td_imagedescription);
-	if (TIFFFieldSet(tif,FIELD_MAKE))
-		_TIFFprintAsciiTag(fd, "Make", td->td_make);
-	if (TIFFFieldSet(tif,FIELD_MODEL))
-		_TIFFprintAsciiTag(fd, "Model", td->td_model);
-	if (TIFFFieldSet(tif,FIELD_ORIENTATION)) {
-		fprintf(fd, "  Orientation: ");
-		if (td->td_orientation < NORIENTNAMES)
-			fprintf(fd, "%s\n", orientNames[td->td_orientation]);
-		else
-			fprintf(fd, "%u (0x%x)\n",
-			    td->td_orientation, td->td_orientation);
-	}
-	if (TIFFFieldSet(tif,FIELD_SAMPLESPERPIXEL))
-		fprintf(fd, "  Samples/Pixel: %u\n", td->td_samplesperpixel);
-	if (TIFFFieldSet(tif,FIELD_ROWSPERSTRIP)) {
-		fprintf(fd, "  Rows/Strip: ");
-		if (td->td_rowsperstrip == (uint32) -1)
-			fprintf(fd, "(infinite)\n");
-		else
-			fprintf(fd, "%lu\n", (u_long) td->td_rowsperstrip);
-	}
-	if (TIFFFieldSet(tif,FIELD_MINSAMPLEVALUE))
-		fprintf(fd, "  Min Sample Value: %u\n", td->td_minsamplevalue);
-	if (TIFFFieldSet(tif,FIELD_MAXSAMPLEVALUE))
-		fprintf(fd, "  Max Sample Value: %u\n", td->td_maxsamplevalue);
-	if (TIFFFieldSet(tif,FIELD_SMINSAMPLEVALUE))
-		fprintf(fd, "  SMin Sample Value: %g\n",
-		    td->td_sminsamplevalue);
-	if (TIFFFieldSet(tif,FIELD_SMAXSAMPLEVALUE))
-		fprintf(fd, "  SMax Sample Value: %g\n",
-		    td->td_smaxsamplevalue);
-	if (TIFFFieldSet(tif,FIELD_PLANARCONFIG)) {
-		fprintf(fd, "  Planar Configuration: ");
-		switch (td->td_planarconfig) {
-		case PLANARCONFIG_CONTIG:
-			fprintf(fd, "single image plane\n");
-			break;
-		case PLANARCONFIG_SEPARATE:
-			fprintf(fd, "separate image planes\n");
-			break;
-		default:
-			fprintf(fd, "%u (0x%x)\n",
-			    td->td_planarconfig, td->td_planarconfig);
-			break;
-		}
-	}
-	if (TIFFFieldSet(tif,FIELD_PAGENAME))
-		_TIFFprintAsciiTag(fd, "Page Name", td->td_pagename);
-	if (TIFFFieldSet(tif,FIELD_PAGENUMBER))
-		fprintf(fd, "  Page Number: %u-%u\n",
-		    td->td_pagenumber[0], td->td_pagenumber[1]);
-	if (TIFFFieldSet(tif,FIELD_COLORMAP)) {
-		fprintf(fd, "  Color Map: ");
-		if (flags & TIFFPRINT_COLORMAP) {
-			fprintf(fd, "\n");
-			n = 1L<<td->td_bitspersample;
-			for (l = 0; l < n; l++)
-				fprintf(fd, "   %5lu: %5u %5u %5u\n",
-				    l,
-				    td->td_colormap[0][l],
-				    td->td_colormap[1][l],
-				    td->td_colormap[2][l]);
-		} else
-			fprintf(fd, "(present)\n");
-	}
-#ifdef COLORIMETRY_SUPPORT
-	if (TIFFFieldSet(tif,FIELD_WHITEPOINT))
-		fprintf(fd, "  White Point: %g-%g\n",
-		    td->td_whitepoint[0], td->td_whitepoint[1]);
-	if (TIFFFieldSet(tif,FIELD_PRIMARYCHROMAS))
-		fprintf(fd, "  Primary Chromaticities: %g,%g %g,%g %g,%g\n",
-		    td->td_primarychromas[0], td->td_primarychromas[1],
-		    td->td_primarychromas[2], td->td_primarychromas[3],
-		    td->td_primarychromas[4], td->td_primarychromas[5]);
-	if (TIFFFieldSet(tif,FIELD_REFBLACKWHITE)) {
-		fprintf(fd, "  Reference Black/White:\n");
-		for (i = 0; i < td->td_samplesperpixel; i++)
-			fprintf(fd, "    %2d: %5g %5g\n",
-			    i,
-			    td->td_refblackwhite[2*i+0],
-			    td->td_refblackwhite[2*i+1]);
-	}
-	if (TIFFFieldSet(tif,FIELD_TRANSFERFUNCTION)) {
-		fprintf(fd, "  Transfer Function: ");
-		if (flags & TIFFPRINT_CURVES) {
-			fprintf(fd, "\n");
-			n = 1L<<td->td_bitspersample;
-			for (l = 0; l < n; l++) {
-				fprintf(fd, "    %2lu: %5u",
-				    l, td->td_transferfunction[0][l]);
-				for (i = 1; i < td->td_samplesperpixel; i++)
-					fprintf(fd, " %5u",
-					    td->td_transferfunction[i][l]);
-				fputc('\n', fd);
-			}
-		} else
-			fprintf(fd, "(present)\n");
-	}
-#endif
-#ifdef ICC_SUPPORT
-	if (TIFFFieldSet(tif,FIELD_ICCPROFILE))
-		fprintf(fd, "  ICC Profile: <present>, %lu bytes\n",
-		    (u_long) td->td_profileLength);
-#endif
-#ifdef PHOTOSHOP_SUPPORT
- 	if (TIFFFieldSet(tif,FIELD_PHOTOSHOP))
- 		fprintf(fd, "  Photoshop Data: <present>, %lu bytes\n",
- 		    (u_long) td->td_photoshopLength);
-#endif
-#ifdef IPTC_SUPPORT
- 	if (TIFFFieldSet(tif,FIELD_RICHTIFFIPTC))
- 		fprintf(fd, "  RichTIFFIPTC Data: <present>, %lu bytes\n",
- 		    (u_long) td->td_richtiffiptcLength);
-#endif
-#if SUBIFD_SUPPORT
-	if (TIFFFieldSet(tif, FIELD_SUBIFD)) {
-		fprintf(fd, "  SubIFD Offsets:");
-		for (i = 0; i < td->td_nsubifd; i++)
-			fprintf(fd, " %5lu", (long) td->td_subifd[i]);
-		fputc('\n', fd);
-	}
-#endif
-        /*
-        ** Custom tag support.
-        */
-        {
-            int  i;
-            short count;
-
-            count = (short) TIFFGetTagListCount( tif );
-            for( i = 0; i < count; i++ )
-            {
-                ttag_t  tag = TIFFGetTagListEntry( tif, i );
-                const TIFFFieldInfo *fld;
-
-                fld = TIFFFieldWithTag( tif, tag );
-                if( fld == NULL )
-                    continue;
-
-                if( fld->field_passcount )
-                {
-                    short value_count;
-                    int j;
-                    void *raw_data;
-                    
-                    if( TIFFGetField( tif, tag, &value_count, &raw_data ) != 1 )
-                        continue;
-
-                    fprintf(fd, "  %s: ", fld->field_name );
-
-                    for( j = 0; j < value_count; j++ )
-                    {
-			if( fld->field_type == TIFF_BYTE )
-                            fprintf( fd, "%d",
-                                     (int) ((char *) raw_data)[j] );
-			else if( fld->field_type == TIFF_SHORT )
-                            fprintf( fd, "%d",
-                                     (int) ((short *) raw_data)[j] );
-                        else if( fld->field_type == TIFF_LONG )
-                            fprintf( fd, "%d",
-                                     (int) ((long *) raw_data)[j] );
-			else if( fld->field_type == TIFF_RATIONAL )
-			    fprintf( fd, "%f",
-				     ((float *) raw_data)[j] );
-                        else if( fld->field_type == TIFF_ASCII )
-                        {
-                            fprintf( fd, "%s",
-                                     (char *) raw_data );
-                            break;
-                        }
-                        else if( fld->field_type == TIFF_DOUBLE )
-                            fprintf( fd, "%f",
-                                     ((double *) raw_data)[j] );
-                        else if( fld->field_type == TIFF_FLOAT )
-                            fprintf( fd, "%f",
-                                     ((float *) raw_data)[j] );
-                        else
-                        {
-                            fprintf( fd,
-                                     "<unsupported data type in TIFFPrint>" );
-                            break;
-                        }
-
-                        if( j < value_count-1 )
-                            fprintf( fd, "," );
-                    }
-                    fprintf( fd, "\n" );
-                } 
-                else if( !fld->field_passcount
-                         && fld->field_type == TIFF_ASCII )
-                {
-                    char *data;
-                    
-                    if( TIFFGetField( tif, tag, &data ) )
-                        fprintf(fd, "  %s: %s\n", fld->field_name, data );
-                }
-            }
-        }
-        
-	if (tif->tif_tagmethods.printdir)
-		(*tif->tif_tagmethods.printdir)(tif, fd, flags);
-	if ((flags & TIFFPRINT_STRIPS) &&
-	    TIFFFieldSet(tif,FIELD_STRIPOFFSETS)) {
-		tstrip_t s;
-
-		fprintf(fd, "  %lu %s:\n",
-		    (long) td->td_nstrips,
-		    isTiled(tif) ? "Tiles" : "Strips");
-		for (s = 0; s < td->td_nstrips; s++)
-			fprintf(fd, "    %3lu: [%8lu, %8lu]\n",
-			    (u_long) s,
-			    (u_long) td->td_stripoffset[s],
-			    (u_long) td->td_stripbytecount[s]);
-	}
-}
-
-void
-_TIFFprintAscii(FILE* fd, const char* cp)
-{
-	for (; *cp != '\0'; cp++) {
-		const char* tp;
-
-		if (isprint(*cp)) {
-			fputc(*cp, fd);
-			continue;
-		}
-		for (tp = "\tt\bb\rr\nn\vv"; *tp; tp++)
-			if (*tp++ == *cp)
-				break;
-		if (*tp)
-			fprintf(fd, "\\%c", *tp);
-		else
-			fprintf(fd, "\\%03o", *cp & 0xff);
-	}
-}
-
-void
-_TIFFprintAsciiTag(FILE* fd, const char* name, const char* value)
-{
-	fprintf(fd, "  %s: \"", name);
-	_TIFFprintAscii(fd, value);
-	fprintf(fd, "\"\n");
-}
diff --git a/src/tiff/tif_read.c b/src/tiff/tif_read.c
deleted file mode 100644
index 4017d64..0000000
--- a/src/tiff/tif_read.c
+++ /dev/null
@@ -1,637 +0,0 @@
-/* $Header: /home/terralib/src/tiff/tif_read.c,v 1.3 2004/03/19 11:51:25 lubia Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library.
- * Scanline-oriented Read Support
- */
-#include "tiffiop.h"
-#include <stdio.h>
-#include <assert.h>
-
-	int TIFFFillStrip(TIFF*, tstrip_t);
-	int TIFFFillTile(TIFF*, ttile_t);
-static	int TIFFStartStrip(TIFF*, tstrip_t);
-static	int TIFFStartTile(TIFF*, ttile_t);
-static	int TIFFCheckRead(TIFF*, int);
-
-#define	NOSTRIP	((tstrip_t) -1)			/* undefined state */
-#define	NOTILE	((ttile_t) -1)			/* undefined state */
-
-/*
- * Seek to a random row+sample in a file.
- */
-static int
-TIFFSeek(TIFF* tif, uint32 row, tsample_t sample)
-{
-	register TIFFDirectory *td = &tif->tif_dir;
-	tstrip_t strip;
-
-	if (row >= td->td_imagelength) {	/* out of range */
-		TIFFError(tif->tif_name, "%lu: Row out of range, max %lu",
-		    (u_long) row, (u_long) td->td_imagelength);
-		return (0);
-	}
-	if (td->td_planarconfig == PLANARCONFIG_SEPARATE) {
-		if (sample >= td->td_samplesperpixel) {
-			TIFFError(tif->tif_name,
-			    "%lu: Sample out of range, max %lu",
-			    (u_long) sample, (u_long) td->td_samplesperpixel);
-			return (0);
-		}
-		strip = sample*td->td_stripsperimage + row/td->td_rowsperstrip;
-	} else
-		strip = row / td->td_rowsperstrip;
-	if (strip != tif->tif_curstrip) { 	/* different strip, refill */
-		if (!TIFFFillStrip(tif, strip))
-			return (0);
-	} else if (row < tif->tif_row) {
-		/*
-		 * Moving backwards within the same strip: backup
-		 * to the start and then decode forward (below).
-		 *
-		 * NB: If you're planning on lots of random access within a
-		 * strip, it's better to just read and decode the entire
-		 * strip, and then access the decoded data in a random fashion.
-		 */
-		if (!TIFFStartStrip(tif, strip))
-			return (0);
-	}
-	if (row != tif->tif_row) {
-		/*
-		 * Seek forward to the desired row.
-		 */
-		if (!(*tif->tif_seek)(tif, row - tif->tif_row))
-			return (0);
-		tif->tif_row = row;
-	}
-	return (1);
-}
-
-int
-TIFFReadScanline(TIFF* tif, tdata_t buf, uint32 row, tsample_t sample)
-{
-	int e;
-
-	if (!TIFFCheckRead(tif, 0))
-		return (-1);
-	if( (e = TIFFSeek(tif, row, sample)) != 0) {
-		/*
-		 * Decompress desired row into user buffer.
-		 */
-		e = (*tif->tif_decoderow)
-		    (tif, (tidata_t) buf, tif->tif_scanlinesize, sample);
-
-                /* we are now poised at the beginning of the next row */
-                tif->tif_row = row + 1;
-
-		if (e)
-			(*tif->tif_postdecode)(tif, (tidata_t) buf,
-			    tif->tif_scanlinesize);
-	}
-	return (e > 0 ? 1 : -1);
-}
-
-/*
- * Read a strip of data and decompress the specified
- * amount into the user-supplied buffer.
- */
-tsize_t
-TIFFReadEncodedStrip(TIFF* tif, tstrip_t strip, tdata_t buf, tsize_t size)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-	uint32 nrows;
-	tsize_t stripsize;
-        tstrip_t sep_strip, strips_per_sep;
-
-	if (!TIFFCheckRead(tif, 0))
-		return (-1);
-	if (strip >= td->td_nstrips) {
-		TIFFError(tif->tif_name, "%ld: Strip out of range, max %ld",
-		    (long) strip, (long) td->td_nstrips);
-		return (-1);
-	}
-	/*
-	 * Calculate the strip size according to the number of
-	 * rows in the strip (check for truncated last strip on any
-         * of the separations).
-	 */
-        if( td->td_rowsperstrip >= td->td_imagelength )
-            strips_per_sep = 1;
-        else
-            strips_per_sep = (td->td_imagelength+td->td_rowsperstrip-1)
-                / td->td_rowsperstrip;
-
-        sep_strip = strip % strips_per_sep;
-
-	if (sep_strip != strips_per_sep-1 ||
-	    (nrows = td->td_imagelength % td->td_rowsperstrip) == 0)
-		nrows = td->td_rowsperstrip;
-
-	stripsize = TIFFVStripSize(tif, nrows);
-	if (size == (tsize_t) -1)
-		size = stripsize;
-	else if (size > stripsize)
-		size = stripsize;
-	if (TIFFFillStrip(tif, strip) 
-            && (*tif->tif_decodestrip)(tif, (tidata_t) buf, size, 
-                         (tsample_t)(strip / td->td_stripsperimage)) > 0 ) {
-		(*tif->tif_postdecode)(tif, (tidata_t) buf, size);
-		return (size);
-	} else
-		return ((tsize_t) -1);
-}
-
-static tsize_t
-TIFFReadRawStrip1(TIFF* tif,
-    tstrip_t strip, tdata_t buf, tsize_t size, const char* module)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-
-	if (!isMapped(tif)) {
-		tsize_t cc;
-
-		if (!SeekOK(tif, td->td_stripoffset[strip])) {
-			TIFFError(module,
-			    "%s: Seek error at scanline %lu, strip %lu",
-			    tif->tif_name,
-			    (u_long) tif->tif_row, (u_long) strip);
-			return (-1);
-		}
-		cc = TIFFReadFile(tif, buf, size);
-		if (cc != size) {
-			TIFFError(module,
-		"%s: Read error at scanline %lu; got %lu bytes, expected %lu",
-			    tif->tif_name,
-			    (u_long) tif->tif_row,
-			    (u_long) cc,
-			    (u_long) size);
-			return (-1);
-		}
-	} else {
-		if (td->td_stripoffset[strip] + size > tif->tif_size) {
-			TIFFError(module,
-    "%s: Read error at scanline %lu, strip %lu; got %lu bytes, expected %lu",
-			    tif->tif_name,
-			    (u_long) tif->tif_row,
-			    (u_long) strip,
-			    (u_long) tif->tif_size - td->td_stripoffset[strip],
-			    (u_long) size);
-			return (-1);
-		}
-		_TIFFmemcpy(buf, tif->tif_base + td->td_stripoffset[strip], size);
-	}
-	return (size);
-}
-
-/*
- * Read a strip of data from the file.
- */
-tsize_t
-TIFFReadRawStrip(TIFF* tif, tstrip_t strip, tdata_t buf, tsize_t size)
-{
-	static const char module[] = "TIFFReadRawStrip";
-	TIFFDirectory *td = &tif->tif_dir;
-	tsize_t bytecount;
-
-	if (!TIFFCheckRead(tif, 0))
-		return ((tsize_t) -1);
-	if (strip >= td->td_nstrips) {
-		TIFFError(tif->tif_name, "%lu: Strip out of range, max %lu",
-		    (u_long) strip, (u_long) td->td_nstrips);
-		return ((tsize_t) -1);
-	}
-	bytecount = td->td_stripbytecount[strip];
-	if (bytecount <= 0) {
-		TIFFError(tif->tif_name,
-		    "%lu: Invalid strip byte count, strip %lu",
-		    (u_long) bytecount, (u_long) strip);
-		return ((tsize_t) -1);
-	}
-	if (size != (tsize_t)-1 && size < bytecount)
-		bytecount = size;
-	return (TIFFReadRawStrip1(tif, strip, buf, bytecount, module));
-}
-
-/*
- * Read the specified strip and setup for decoding. 
- * The data buffer is expanded, as necessary, to
- * hold the strip's data.
- */
-int
-TIFFFillStrip(TIFF* tif, tstrip_t strip)
-{
-	static const char module[] = "TIFFFillStrip";
-	TIFFDirectory *td = &tif->tif_dir;
-	tsize_t bytecount;
-
-	bytecount = td->td_stripbytecount[strip];
-	if (bytecount <= 0) {
-		TIFFError(tif->tif_name,
-		    "%lu: Invalid strip byte count, strip %lu",
-		    (u_long) bytecount, (u_long) strip);
-		return (0);
-	}
-	if (isMapped(tif) &&
-	    (isFillOrder(tif, td->td_fillorder) || (tif->tif_flags & TIFF_NOBITREV))) {
-		/*
-		 * The image is mapped into memory and we either don't
-		 * need to flip bits or the compression routine is going
-		 * to handle this operation itself.  In this case, avoid
-		 * copying the raw data and instead just reference the
-		 * data from the memory mapped file image.  This assumes
-		 * that the decompression routines do not modify the
-		 * contents of the raw data buffer (if they try to,
-		 * the application will get a fault since the file is
-		 * mapped read-only).
-		 */
-		if ((tif->tif_flags & TIFF_MYBUFFER) && tif->tif_rawdata)
-			_TIFFfree(tif->tif_rawdata);
-		tif->tif_flags &= ~TIFF_MYBUFFER;
-		if ( td->td_stripoffset[strip] + bytecount > tif->tif_size) {
-			/*
-			 * This error message might seem strange, but it's
-			 * what would happen if a read were done instead.
-			 */
-			TIFFError(module,
-		    "%s: Read error on strip %lu; got %lu bytes, expected %lu",
-			    tif->tif_name,
-			    (u_long) strip,
-			    (u_long) tif->tif_size - td->td_stripoffset[strip],
-			    (u_long) bytecount);
-			tif->tif_curstrip = NOSTRIP;
-			return (0);
-		}
-		tif->tif_rawdatasize = bytecount;
-		tif->tif_rawdata = tif->tif_base + td->td_stripoffset[strip];
-	} else {
-		/*
-		 * Expand raw data buffer, if needed, to
-		 * hold data strip coming from file
-		 * (perhaps should set upper bound on
-		 *  the size of a buffer we'll use?).
-		 */
-		if (bytecount > tif->tif_rawdatasize) {
-			tif->tif_curstrip = NOSTRIP;
-			if ((tif->tif_flags & TIFF_MYBUFFER) == 0) {
-				TIFFError(module,
-				"%s: Data buffer too small to hold strip %lu",
-				    tif->tif_name, (u_long) strip);
-				return (0);
-			}
-			if (!TIFFReadBufferSetup(tif, 0,
-			    TIFFroundup(bytecount, 1024)))
-				return (0);
-		}
-		if (TIFFReadRawStrip1(tif, strip, (u_char *)tif->tif_rawdata,
-		    bytecount, module) != bytecount)
-			return (0);
-		if (!isFillOrder(tif, td->td_fillorder) &&
-		    (tif->tif_flags & TIFF_NOBITREV) == 0)
-			TIFFReverseBits(tif->tif_rawdata, bytecount);
-	}
-	return (TIFFStartStrip(tif, strip));
-}
-
-/*
- * Tile-oriented Read Support
- * Contributed by Nancy Cam (Silicon Graphics).
- */
-
-/*
- * Read and decompress a tile of data.  The
- * tile is selected by the (x,y,z,s) coordinates.
- */
-tsize_t
-TIFFReadTile(TIFF* tif,
-    tdata_t buf, uint32 x, uint32 y, uint32 z, tsample_t s)
-{
-	if (!TIFFCheckRead(tif, 1) || !TIFFCheckTile(tif, x, y, z, s))
-		return (-1);
-	return (TIFFReadEncodedTile(tif,
-	    TIFFComputeTile(tif, x, y, z, s), buf, (tsize_t) -1));
-}
-
-/*
- * Read a tile of data and decompress the specified
- * amount into the user-supplied buffer.
- */
-tsize_t
-TIFFReadEncodedTile(TIFF* tif, ttile_t tile, tdata_t buf, tsize_t size)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-	tsize_t tilesize = tif->tif_tilesize;
-
-	if (!TIFFCheckRead(tif, 1))
-		return (-1);
-	if (tile >= td->td_nstrips) {
-		TIFFError(tif->tif_name, "%ld: Tile out of range, max %ld",
-		    (long) tile, (u_long) td->td_nstrips);
-		return (-1);
-	}
-	if (size == (tsize_t) -1)
-		size = tilesize;
-	else if (size > tilesize)
-		size = tilesize;
-	if (TIFFFillTile(tif, tile) && (*tif->tif_decodetile)(tif,
-	    (tidata_t) buf, size, (tsample_t)(tile/td->td_stripsperimage))) {
-		(*tif->tif_postdecode)(tif, (tidata_t) buf, size);
-		return (size);
-	} else
-		return (-1);
-}
-
-static tsize_t
-TIFFReadRawTile1(TIFF* tif,
-    ttile_t tile, tdata_t buf, tsize_t size, const char* module)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-
-	if (!isMapped(tif)) {
-		tsize_t cc;
-
-		if (!SeekOK(tif, td->td_stripoffset[tile])) {
-			TIFFError(module,
-			    "%s: Seek error at row %ld, col %ld, tile %ld",
-			    tif->tif_name,
-			    (long) tif->tif_row,
-			    (long) tif->tif_col,
-			    (long) tile);
-			return ((tsize_t) -1);
-		}
-		cc = TIFFReadFile(tif, buf, size);
-		if (cc != size) {
-			TIFFError(module,
-	    "%s: Read error at row %ld, col %ld; got %lu bytes, expected %lu",
-			    tif->tif_name,
-			    (long) tif->tif_row,
-			    (long) tif->tif_col,
-			    (u_long) cc,
-			    (u_long) size);
-			return ((tsize_t) -1);
-		}
-	} else {
-		if (td->td_stripoffset[tile] + size > tif->tif_size) {
-			TIFFError(module,
-    "%s: Read error at row %ld, col %ld, tile %ld; got %lu bytes, expected %lu",
-			    tif->tif_name,
-			    (long) tif->tif_row,
-			    (long) tif->tif_col,
-			    (long) tile,
-			    (u_long) tif->tif_size - td->td_stripoffset[tile],
-			    (u_long) size);
-			return ((tsize_t) -1);
-		}
-		_TIFFmemcpy(buf, tif->tif_base + td->td_stripoffset[tile], size);
-	}
-	return (size);
-}
-
-/*
- * Read a tile of data from the file.
- */
-tsize_t
-TIFFReadRawTile(TIFF* tif, ttile_t tile, tdata_t buf, tsize_t size)
-{
-	static const char module[] = "TIFFReadRawTile";
-	TIFFDirectory *td = &tif->tif_dir;
-	tsize_t bytecount;
-
-	if (!TIFFCheckRead(tif, 1))
-		return ((tsize_t) -1);
-	if (tile >= td->td_nstrips) {
-		TIFFError(tif->tif_name, "%lu: Tile out of range, max %lu",
-		    (u_long) tile, (u_long) td->td_nstrips);
-		return ((tsize_t) -1);
-	}
-	bytecount = td->td_stripbytecount[tile];
-	if (size != (tsize_t) -1 && size < bytecount)
-		bytecount = size;
-	return (TIFFReadRawTile1(tif, tile, buf, bytecount, module));
-}
-
-/*
- * Read the specified tile and setup for decoding. 
- * The data buffer is expanded, as necessary, to
- * hold the tile's data.
- */
-int
-TIFFFillTile(TIFF* tif, ttile_t tile)
-{
-	static const char module[] = "TIFFFillTile";
-	TIFFDirectory *td = &tif->tif_dir;
-	tsize_t bytecount;
-
-	bytecount = td->td_stripbytecount[tile];
-	if (bytecount <= 0) {
-		TIFFError(tif->tif_name,
-		    "%lu: Invalid tile byte count, tile %lu",
-		    (u_long) bytecount, (u_long) tile);
-		return (0);
-	}
-	if (isMapped(tif) &&
-	    (isFillOrder(tif, td->td_fillorder) || (tif->tif_flags & TIFF_NOBITREV))) {
-		/*
-		 * The image is mapped into memory and we either don't
-		 * need to flip bits or the compression routine is going
-		 * to handle this operation itself.  In this case, avoid
-		 * copying the raw data and instead just reference the
-		 * data from the memory mapped file image.  This assumes
-		 * that the decompression routines do not modify the
-		 * contents of the raw data buffer (if they try to,
-		 * the application will get a fault since the file is
-		 * mapped read-only).
-		 */
-		if ((tif->tif_flags & TIFF_MYBUFFER) && tif->tif_rawdata)
-			_TIFFfree(tif->tif_rawdata);
-		tif->tif_flags &= ~TIFF_MYBUFFER;
-		if ( td->td_stripoffset[tile] + bytecount > tif->tif_size) {
-			tif->tif_curtile = NOTILE;
-			return (0);
-		}
-		tif->tif_rawdatasize = bytecount;
-		tif->tif_rawdata = tif->tif_base + td->td_stripoffset[tile];
-	} else {
-		/*
-		 * Expand raw data buffer, if needed, to
-		 * hold data tile coming from file
-		 * (perhaps should set upper bound on
-		 *  the size of a buffer we'll use?).
-		 */
-		if (bytecount > tif->tif_rawdatasize) {
-			tif->tif_curtile = NOTILE;
-			if ((tif->tif_flags & TIFF_MYBUFFER) == 0) {
-				TIFFError(module,
-				"%s: Data buffer too small to hold tile %ld",
-				    tif->tif_name, (long) tile);
-				return (0);
-			}
-			if (!TIFFReadBufferSetup(tif, 0,
-			    TIFFroundup(bytecount, 1024)))
-				return (0);
-		}
-		if (TIFFReadRawTile1(tif, tile, (u_char *)tif->tif_rawdata,
-		    bytecount, module) != bytecount)
-			return (0);
-		if (!isFillOrder(tif, td->td_fillorder) &&
-		    (tif->tif_flags & TIFF_NOBITREV) == 0)
-			TIFFReverseBits(tif->tif_rawdata, bytecount);
-	}
-	return (TIFFStartTile(tif, tile));
-}
-
-/*
- * Setup the raw data buffer in preparation for
- * reading a strip of raw data.  If the buffer
- * is specified as zero, then a buffer of appropriate
- * size is allocated by the library.  Otherwise,
- * the client must guarantee that the buffer is
- * large enough to hold any individual strip of
- * raw data.
- */
-int
-TIFFReadBufferSetup(TIFF* tif, tdata_t bp, tsize_t size)
-{
-	static const char module[] = "TIFFReadBufferSetup";
-
-	if (tif->tif_rawdata) {
-		if (tif->tif_flags & TIFF_MYBUFFER)
-			_TIFFfree(tif->tif_rawdata);
-		tif->tif_rawdata = NULL;
-	}
-	if (bp) {
-		tif->tif_rawdatasize = size;
-		tif->tif_rawdata = (tidata_t) bp;
-		tif->tif_flags &= ~TIFF_MYBUFFER;
-	} else {
-		tif->tif_rawdatasize = TIFFroundup(size, 1024);
-		tif->tif_rawdata = (tidata_t) _TIFFmalloc(tif->tif_rawdatasize);
-		tif->tif_flags |= TIFF_MYBUFFER;
-	}
-	if (tif->tif_rawdata == NULL) {
-		TIFFError(module,
-		    "%s: No space for data buffer at scanline %ld",
-		    tif->tif_name, (long) tif->tif_row);
-		tif->tif_rawdatasize = 0;
-		return (0);
-	}
-	return (1);
-}
-
-/*
- * Set state to appear as if a
- * strip has just been read in.
- */
-static int
-TIFFStartStrip(TIFF* tif, tstrip_t strip)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-
-	if ((tif->tif_flags & TIFF_CODERSETUP) == 0) {
-		if (!(*tif->tif_setupdecode)(tif))
-			return (0);
-		tif->tif_flags |= TIFF_CODERSETUP;
-	}
-	tif->tif_curstrip = strip;
-	tif->tif_row = (strip % td->td_stripsperimage) * td->td_rowsperstrip;
-	tif->tif_rawcp = tif->tif_rawdata;
-	tif->tif_rawcc = td->td_stripbytecount[strip];
-	return ((*tif->tif_predecode)(tif,
-			(tsample_t)(strip / td->td_stripsperimage)));
-}
-
-/*
- * Set state to appear as if a
- * tile has just been read in.
- */
-static int
-TIFFStartTile(TIFF* tif, ttile_t tile)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-
-	if ((tif->tif_flags & TIFF_CODERSETUP) == 0) {
-		if (!(*tif->tif_setupdecode)(tif))
-			return (0);
-		tif->tif_flags |= TIFF_CODERSETUP;
-	}
-	tif->tif_curtile = tile;
-	tif->tif_row =
-	    (tile % TIFFhowmany(td->td_imagewidth, td->td_tilewidth)) *
-		td->td_tilelength;
-	tif->tif_col =
-	    (tile % TIFFhowmany(td->td_imagelength, td->td_tilelength)) *
-		td->td_tilewidth;
-	tif->tif_rawcp = tif->tif_rawdata;
-	tif->tif_rawcc = td->td_stripbytecount[tile];
-	return ((*tif->tif_predecode)(tif,
-			(tsample_t)(tile/td->td_stripsperimage)));
-}
-
-static int
-TIFFCheckRead(TIFF* tif, int tiles)
-{
-	if (tif->tif_mode == O_WRONLY) {
-		TIFFError(tif->tif_name, "File not open for reading");
-		return (0);
-	}
-	if (tiles ^ isTiled(tif)) {
-		TIFFError(tif->tif_name, tiles ?
-		    "Can not read tiles from a stripped image" :
-		    "Can not read scanlines from a tiled image");
-		return (0);
-	}
-	return (1);
-}
-
-void
-_TIFFNoPostDecode(TIFF* tif, tidata_t buf, tsize_t cc)
-{
-    (void) tif; (void) buf; (void) cc;
-}
-
-void
-_TIFFSwab16BitData(TIFF* tif, tidata_t buf, tsize_t cc)
-{
-    (void) tif;
-    assert((cc & 1) == 0);
-    TIFFSwabArrayOfShort((uint16*) buf, cc/2);
-}
-
-void
-_TIFFSwab32BitData(TIFF* tif, tidata_t buf, tsize_t cc)
-{
-    (void) tif;
-    assert((cc & 3) == 0);
-    TIFFSwabArrayOfLong((uint32*) buf, cc/4);
-}
-
-void
-_TIFFSwab64BitData(TIFF* tif, tidata_t buf, tsize_t cc)
-{
-    (void) tif;
-    assert((cc & 7) == 0);
-    TIFFSwabArrayOfDouble((double*) buf, cc/8);
-}
diff --git a/src/tiff/tif_strip.c b/src/tiff/tif_strip.c
deleted file mode 100644
index e1e299b..0000000
--- a/src/tiff/tif_strip.c
+++ /dev/null
@@ -1,217 +0,0 @@
-/* $Header: /home/terralib/src/tiff/tif_strip.c,v 1.3 2004/03/19 11:51:25 lubia Exp $ */
-
-/*
- * Copyright (c) 1991-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library.
- *
- * Strip-organized Image Support Routines.
- */
-#include "tiffiop.h"
-
-/*
- * Compute which strip a (row,sample) value is in.
- */
-tstrip_t
-TIFFComputeStrip(TIFF* tif, uint32 row, tsample_t sample)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-	tstrip_t strip;
-
-	strip = row / td->td_rowsperstrip;
-	if (td->td_planarconfig == PLANARCONFIG_SEPARATE) {
-		if (sample >= td->td_samplesperpixel) {
-			TIFFError(tif->tif_name,
-			    "%u: Sample out of range, max %u",
-			    sample, td->td_samplesperpixel);
-			return ((tstrip_t) 0);
-		}
-		strip += sample*td->td_stripsperimage;
-	}
-	return (strip);
-}
-
-/*
- * Compute how many strips are in an image.
- */
-tstrip_t
-TIFFNumberOfStrips(TIFF* tif)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-	tstrip_t nstrips;
-
-	nstrips = (td->td_rowsperstrip == (uint32) -1 ?
-	     (td->td_imagelength != 0 ? 1 : 0) :
-	     TIFFhowmany(td->td_imagelength, td->td_rowsperstrip));
-	if (td->td_planarconfig == PLANARCONFIG_SEPARATE)
-		nstrips *= td->td_samplesperpixel;
-	return (nstrips);
-}
-
-/*
- * Compute the # bytes in a variable height, row-aligned strip.
- */
-tsize_t
-TIFFVStripSize(TIFF* tif, uint32 nrows)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-
-	if (nrows == (uint32) -1)
-		nrows = td->td_imagelength;
-#ifdef YCBCR_SUPPORT
-	if (td->td_planarconfig == PLANARCONFIG_CONTIG &&
-	    td->td_photometric == PHOTOMETRIC_YCBCR &&
-	    !isUpSampled(tif)) {
-		/*
-		 * Packed YCbCr data contain one Cb+Cr for every
-		 * HorizontalSampling*VerticalSampling Y values.
-		 * Must also roundup width and height when calculating
-		 * since images that are not a multiple of the
-		 * horizontal/vertical subsampling area include
-		 * YCbCr data for the extended image.
-		 */
-                uint16 ycbcrsubsampling[2];
-                tsize_t w, scanline, samplingarea;
-
-                TIFFGetField( tif, TIFFTAG_YCBCRSUBSAMPLING, 
-                              ycbcrsubsampling + 0, 
-                              ycbcrsubsampling + 1 );
-
-		w = TIFFroundup(td->td_imagewidth, ycbcrsubsampling[0]);
-		scanline = TIFFhowmany(w*td->td_bitspersample, 8);
-		samplingarea = ycbcrsubsampling[0]*ycbcrsubsampling[1];
-		nrows = TIFFroundup(nrows, ycbcrsubsampling[1]);
-		/* NB: don't need TIFFhowmany here 'cuz everything is rounded */
-		return ((tsize_t)
-		    (nrows*scanline + 2*(nrows*scanline / samplingarea)));
-	} else
-#endif
-		return ((tsize_t)(nrows * TIFFScanlineSize(tif)));
-}
-
-
-/*
- * Compute the # bytes in a raw strip.
- */
-tsize_t
-TIFFRawStripSize(TIFF* tif, tstrip_t strip)
-{
-	TIFFDirectory* td = &tif->tif_dir;
-	tsize_t bytecount = td->td_stripbytecount[strip];
-
-	if (bytecount <= 0) {
-		TIFFError(tif->tif_name,
-			  "%lu: Invalid strip byte count, strip %lu",
-			  (u_long) bytecount, (u_long) strip);
-		bytecount = (tsize_t) -1;
-	}
-
-	return bytecount;
-}
-
-/*
- * Compute the # bytes in a (row-aligned) strip.
- *
- * Note that if RowsPerStrip is larger than the
- * recorded ImageLength, then the strip size is
- * truncated to reflect the actual space required
- * to hold the strip.
- */
-tsize_t
-TIFFStripSize(TIFF* tif)
-{
-	TIFFDirectory* td = &tif->tif_dir;
-	uint32 rps = td->td_rowsperstrip;
-	if (rps > td->td_imagelength)
-		rps = td->td_imagelength;
-	return (TIFFVStripSize(tif, rps));
-}
-
-/*
- * Compute a default strip size based on the image
- * characteristics and a requested value.  If the
- * request is <1 then we choose a strip size according
- * to certain heuristics.
- */
-uint32
-TIFFDefaultStripSize(TIFF* tif, uint32 request)
-{
-	return (*tif->tif_defstripsize)(tif, request);
-}
-
-uint32
-_TIFFDefaultStripSize(TIFF* tif, uint32 s)
-{
-	if ((int32) s < 1) {
-		/*
-		 * If RowsPerStrip is unspecified, try to break the
-		 * image up into strips that are approximately 8Kbytes.
-		 */
-		tsize_t scanline = TIFFScanlineSize(tif);
-		s = (uint32)(8*1024) / (scanline == 0 ? 1 : scanline);
-		if (s == 0)		/* very wide images */
-			s = 1;
-	}
-	return (s);
-}
-
-/*
- * Return the number of bytes to read/write in a call to
- * one of the scanline-oriented i/o routines.  Note that
- * this number may be 1/samples-per-pixel if data is
- * stored as separate planes.
- */
-tsize_t
-TIFFScanlineSize(TIFF* tif)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-	tsize_t scanline;
-	
-	scanline = td->td_bitspersample * td->td_imagewidth;
-	if (td->td_planarconfig == PLANARCONFIG_CONTIG)
-		scanline *= td->td_samplesperpixel;
-	return ((tsize_t) TIFFhowmany(scanline, 8));
-}
-
-/*
- * Return the number of bytes required to store a complete
- * decoded and packed raster scanline (as opposed to the
- * I/O size returned by TIFFScanlineSize which may be less
- * if data is store as separate planes).
- */
-tsize_t
-TIFFRasterScanlineSize(TIFF* tif)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-	tsize_t scanline;
-	
-	scanline = td->td_bitspersample * td->td_imagewidth;
-	if (td->td_planarconfig == PLANARCONFIG_CONTIG) {
-		scanline *= td->td_samplesperpixel;
-		return ((tsize_t) TIFFhowmany(scanline, 8));
-	} else
-		return ((tsize_t)
-		    TIFFhowmany(scanline, 8)*td->td_samplesperpixel);
-}
diff --git a/src/tiff/tif_swab.c b/src/tiff/tif_swab.c
deleted file mode 100644
index 2128c8a..0000000
--- a/src/tiff/tif_swab.c
+++ /dev/null
@@ -1,217 +0,0 @@
-/* $Header: /home/terralib/src/tiff/tif_swab.c,v 1.3 2004/03/19 11:51:25 lubia Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library Bit & Byte Swapping Support.
- *
- * XXX We assume short = 16-bits and long = 32-bits XXX
- */
-#include "tiffiop.h"
-
-#ifndef TIFFSwabShort
-void
-TIFFSwabShort(uint16* wp)
-{
-	register u_char* cp = (u_char*) wp;
-	u_char t;
-
-	t = cp[1]; cp[1] = cp[0]; cp[0] = t;
-}
-#endif
-
-#ifndef TIFFSwabLong
-void
-TIFFSwabLong(uint32* lp)
-{
-	register u_char* cp = (u_char*) lp;
-	u_char t;
-
-	t = cp[3]; cp[3] = cp[0]; cp[0] = t;
-	t = cp[2]; cp[2] = cp[1]; cp[1] = t;
-}
-#endif
-
-#ifndef TIFFSwabArrayOfShort
-void
-TIFFSwabArrayOfShort(uint16* wp, register u_long n)
-{
-	register u_char* cp;
-	register u_char t;
-
-	/* XXX unroll loop some */
-	while (n-- > 0) {
-		cp = (u_char*) wp;
-		t = cp[1]; cp[1] = cp[0]; cp[0] = t;
-		wp++;
-	}
-}
-#endif
-
-#ifndef TIFFSwabArrayOfLong
-void
-TIFFSwabArrayOfLong(register uint32* lp, register u_long n)
-{
-	register unsigned char *cp;
-	register unsigned char t;
-
-	/* XXX unroll loop some */
-	while (n-- > 0) {
-		cp = (unsigned char *)lp;
-		t = cp[3]; cp[3] = cp[0]; cp[0] = t;
-		t = cp[2]; cp[2] = cp[1]; cp[1] = t;
-		lp++;
-	}
-}
-#endif
-
-#ifndef TIFFSwabDouble
-void
-TIFFSwabDouble(double *dp)
-{
-        register uint32* lp = (uint32*) dp;
-        uint32 t;
-
-	TIFFSwabArrayOfLong(lp, 2);
-	t = lp[0]; lp[0] = lp[1]; lp[1] = t;
-}
-#endif
-
-#ifndef TIFFSwabArrayOfDouble
-void
-TIFFSwabArrayOfDouble(double* dp, register u_long n)
-{
-	register uint32* lp = (uint32*) dp;
-        register uint32 t;
-
-	TIFFSwabArrayOfLong(lp, n + n);
-        while (n-- > 0) {
-		t = lp[0]; lp[0] = lp[1]; lp[1] = t;
-                lp += 2;
-        }
-}
-#endif
-
-/*
- * Bit reversal tables.  TIFFBitRevTable[<byte>] gives
- * the bit reversed value of <byte>.  Used in various
- * places in the library when the FillOrder requires
- * bit reversal of byte values (e.g. CCITT Fax 3
- * encoding/decoding).  TIFFNoBitRevTable is provided
- * for algorithms that want an equivalent table that
- * do not reverse bit values.
- */
-static const unsigned char TIFFBitRevTable[256] = {
-    0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0,
-    0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0,
-    0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8,
-    0x18, 0x98, 0x58, 0xd8, 0x38, 0xb8, 0x78, 0xf8,
-    0x04, 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64, 0xe4,
-    0x14, 0x94, 0x54, 0xd4, 0x34, 0xb4, 0x74, 0xf4,
-    0x0c, 0x8c, 0x4c, 0xcc, 0x2c, 0xac, 0x6c, 0xec,
-    0x1c, 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c, 0xfc,
-    0x02, 0x82, 0x42, 0xc2, 0x22, 0xa2, 0x62, 0xe2,
-    0x12, 0x92, 0x52, 0xd2, 0x32, 0xb2, 0x72, 0xf2,
-    0x0a, 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a, 0xea,
-    0x1a, 0x9a, 0x5a, 0xda, 0x3a, 0xba, 0x7a, 0xfa,
-    0x06, 0x86, 0x46, 0xc6, 0x26, 0xa6, 0x66, 0xe6,
-    0x16, 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76, 0xf6,
-    0x0e, 0x8e, 0x4e, 0xce, 0x2e, 0xae, 0x6e, 0xee,
-    0x1e, 0x9e, 0x5e, 0xde, 0x3e, 0xbe, 0x7e, 0xfe,
-    0x01, 0x81, 0x41, 0xc1, 0x21, 0xa1, 0x61, 0xe1,
-    0x11, 0x91, 0x51, 0xd1, 0x31, 0xb1, 0x71, 0xf1,
-    0x09, 0x89, 0x49, 0xc9, 0x29, 0xa9, 0x69, 0xe9,
-    0x19, 0x99, 0x59, 0xd9, 0x39, 0xb9, 0x79, 0xf9,
-    0x05, 0x85, 0x45, 0xc5, 0x25, 0xa5, 0x65, 0xe5,
-    0x15, 0x95, 0x55, 0xd5, 0x35, 0xb5, 0x75, 0xf5,
-    0x0d, 0x8d, 0x4d, 0xcd, 0x2d, 0xad, 0x6d, 0xed,
-    0x1d, 0x9d, 0x5d, 0xdd, 0x3d, 0xbd, 0x7d, 0xfd,
-    0x03, 0x83, 0x43, 0xc3, 0x23, 0xa3, 0x63, 0xe3,
-    0x13, 0x93, 0x53, 0xd3, 0x33, 0xb3, 0x73, 0xf3,
-    0x0b, 0x8b, 0x4b, 0xcb, 0x2b, 0xab, 0x6b, 0xeb,
-    0x1b, 0x9b, 0x5b, 0xdb, 0x3b, 0xbb, 0x7b, 0xfb,
-    0x07, 0x87, 0x47, 0xc7, 0x27, 0xa7, 0x67, 0xe7,
-    0x17, 0x97, 0x57, 0xd7, 0x37, 0xb7, 0x77, 0xf7,
-    0x0f, 0x8f, 0x4f, 0xcf, 0x2f, 0xaf, 0x6f, 0xef,
-    0x1f, 0x9f, 0x5f, 0xdf, 0x3f, 0xbf, 0x7f, 0xff
-};
-static const unsigned char TIFFNoBitRevTable[256] = {
-    0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 
-    0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 
-    0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 
-    0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 
-    0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 
-    0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 
-    0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 
-    0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 
-    0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 
-    0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 
-    0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 
-    0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, 
-    0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 
-    0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, 
-    0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 
-    0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 
-    0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 
-    0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 
-    0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 
-    0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, 
-    0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 
-    0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 
-    0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 
-    0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, 
-    0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 
-    0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 
-    0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 
-    0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 
-    0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 
-    0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 
-    0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 
-    0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff, 
-};
-
-const unsigned char*
-TIFFGetBitRevTable(int reversed)
-{
-	return (reversed ? TIFFBitRevTable : TIFFNoBitRevTable);
-}
-
-void
-TIFFReverseBits(register u_char* cp, register u_long n)
-{
-	for (; n > 8; n -= 8) {
-		cp[0] = TIFFBitRevTable[cp[0]];
-		cp[1] = TIFFBitRevTable[cp[1]];
-		cp[2] = TIFFBitRevTable[cp[2]];
-		cp[3] = TIFFBitRevTable[cp[3]];
-		cp[4] = TIFFBitRevTable[cp[4]];
-		cp[5] = TIFFBitRevTable[cp[5]];
-		cp[6] = TIFFBitRevTable[cp[6]];
-		cp[7] = TIFFBitRevTable[cp[7]];
-		cp += 8;
-	}
-	while (n-- > 0)
-		*cp = TIFFBitRevTable[*cp], cp++;
-}
diff --git a/src/tiff/tif_thunder.c b/src/tiff/tif_thunder.c
deleted file mode 100644
index 1608e62..0000000
--- a/src/tiff/tif_thunder.c
+++ /dev/null
@@ -1,154 +0,0 @@
-/* $Header: /home/terralib/src/tiff/tif_thunder.c,v 1.3 2004/03/19 11:51:25 lubia Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#include "tiffiop.h"
-#ifdef THUNDER_SUPPORT
-/*
- * TIFF Library.
- *
- * ThunderScan 4-bit Compression Algorithm Support
- */
-
-/*
- * ThunderScan uses an encoding scheme designed for
- * 4-bit pixel values.  Data is encoded in bytes, with
- * each byte split into a 2-bit code word and a 6-bit
- * data value.  The encoding gives raw data, runs of
- * pixels, or pixel values encoded as a delta from the
- * previous pixel value.  For the latter, either 2-bit
- * or 3-bit delta values are used, with the deltas packed
- * into a single byte.
- */
-#define	THUNDER_DATA		0x3f	/* mask for 6-bit data */
-#define	THUNDER_CODE		0xc0	/* mask for 2-bit code word */
-/* code values */
-#define	THUNDER_RUN		0x00	/* run of pixels w/ encoded count */
-#define	THUNDER_2BITDELTAS	0x40	/* 3 pixels w/ encoded 2-bit deltas */
-#define	    DELTA2_SKIP		2	/* skip code for 2-bit deltas */
-#define	THUNDER_3BITDELTAS	0x80	/* 2 pixels w/ encoded 3-bit deltas */
-#define	    DELTA3_SKIP		4	/* skip code for 3-bit deltas */
-#define	THUNDER_RAW		0xc0	/* raw data encoded */
-
-static const int twobitdeltas[4] = { 0, 1, 0, -1 };
-static const int threebitdeltas[8] = { 0, 1, 2, 3, 0, -3, -2, -1 };
-
-#define	SETPIXEL(op, v) { \
-	lastpixel = (v) & 0xf; \
-	if (npixels++ & 1) \
-	    *op++ |= lastpixel; \
-	else \
-	    op[0] = (tidataval_t) (lastpixel << 4); \
-}
-
-static int
-ThunderDecode(TIFF* tif, tidata_t op, tsize_t maxpixels)
-{
-	register u_char *bp;
-	register tsize_t cc;
-	u_int lastpixel;
-	tsize_t npixels;
-
-	bp = (u_char *)tif->tif_rawcp;
-	cc = tif->tif_rawcc;
-	lastpixel = 0;
-	npixels = 0;
-	while (cc > 0 && npixels < maxpixels) {
-		int n, delta;
-
-		n = *bp++, cc--;
-		switch (n & THUNDER_CODE) {
-		case THUNDER_RUN:		/* pixel run */
-			/*
-			 * Replicate the last pixel n times,
-			 * where n is the lower-order 6 bits.
-			 */
-			if (npixels & 1) {
-				op[0] |= lastpixel;
-				lastpixel = *op++; npixels++; n--;
-			} else
-				lastpixel |= lastpixel << 4;
-			npixels += n;
-			for (; n > 0; n -= 2)
-				*op++ = (tidataval_t) lastpixel;
-			if (n == -1)
-				*--op &= 0xf0;
-			lastpixel &= 0xf;
-			break;
-		case THUNDER_2BITDELTAS:	/* 2-bit deltas */
-			if ((delta = ((n >> 4) & 3)) != DELTA2_SKIP)
-				SETPIXEL(op, lastpixel + twobitdeltas[delta]);
-			if ((delta = ((n >> 2) & 3)) != DELTA2_SKIP)
-				SETPIXEL(op, lastpixel + twobitdeltas[delta]);
-			if ((delta = (n & 3)) != DELTA2_SKIP)
-				SETPIXEL(op, lastpixel + twobitdeltas[delta]);
-			break;
-		case THUNDER_3BITDELTAS:	/* 3-bit deltas */
-			if ((delta = ((n >> 3) & 7)) != DELTA3_SKIP)
-				SETPIXEL(op, lastpixel + threebitdeltas[delta]);
-			if ((delta = (n & 7)) != DELTA3_SKIP)
-				SETPIXEL(op, lastpixel + threebitdeltas[delta]);
-			break;
-		case THUNDER_RAW:		/* raw data */
-			SETPIXEL(op, n);
-			break;
-		}
-	}
-	tif->tif_rawcp = (tidata_t) bp;
-	tif->tif_rawcc = cc;
-	if (npixels != maxpixels) {
-		TIFFError(tif->tif_name,
-		    "ThunderDecode: %s data at scanline %ld (%lu != %lu)",
-		    npixels < maxpixels ? "Not enough" : "Too much",
-		    (long) tif->tif_row, (long) npixels, (long) maxpixels);
-		return (0);
-	}
-	return (1);
-}
-
-static int
-ThunderDecodeRow(TIFF* tif, tidata_t buf, tsize_t occ, tsample_t s)
-{
-	tidata_t row = buf;
-	
-	(void) s;
-	while ((long)occ > 0) {
-		if (!ThunderDecode(tif, row, tif->tif_dir.td_imagewidth))
-			return (0);
-		occ -= tif->tif_scanlinesize;
-		row += tif->tif_scanlinesize;
-	}
-	return (1);
-}
-
-int
-TIFFInitThunderScan(TIFF* tif, int scheme)
-{
-	(void) scheme;
-	tif->tif_decoderow = ThunderDecodeRow;
-	tif->tif_decodestrip = ThunderDecodeRow;
-	return (1);
-}
-#endif /* THUNDER_SUPPORT */
diff --git a/src/tiff/tif_tile.c b/src/tiff/tif_tile.c
deleted file mode 100644
index 1512dec..0000000
--- a/src/tiff/tif_tile.c
+++ /dev/null
@@ -1,219 +0,0 @@
-/* $Header: /home/terralib/src/tiff/tif_tile.c,v 1.3 2004/03/19 11:51:25 lubia Exp $ */
-
-/*
- * Copyright (c) 1991-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library.
- *
- * Tiled Image Support Routines.
- */
-#include "tiffiop.h"
-
-/*
- * Compute which tile an (x,y,z,s) value is in.
- */
-ttile_t
-TIFFComputeTile(TIFF* tif, uint32 x, uint32 y, uint32 z, tsample_t s)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-	uint32 dx = td->td_tilewidth;
-	uint32 dy = td->td_tilelength;
-	uint32 dz = td->td_tiledepth;
-	ttile_t tile = 1;
-
-	if (td->td_imagedepth == 1)
-		z = 0;
-	if (dx == (uint32) -1)
-		dx = td->td_imagewidth;
-	if (dy == (uint32) -1)
-		dy = td->td_imagelength;
-	if (dz == (uint32) -1)
-		dz = td->td_imagedepth;
-	if (dx != 0 && dy != 0 && dz != 0) {
-		uint32 xpt = TIFFhowmany(td->td_imagewidth, dx); 
-		uint32 ypt = TIFFhowmany(td->td_imagelength, dy); 
-		uint32 zpt = TIFFhowmany(td->td_imagedepth, dz); 
-
-		if (td->td_planarconfig == PLANARCONFIG_SEPARATE) 
-			tile = (xpt*ypt*zpt)*s +
-			     (xpt*ypt)*(z/dz) +
-			     xpt*(y/dy) +
-			     x/dx;
-		else
-			tile = (xpt*ypt)*(z/dz) + xpt*(y/dy) + x/dx;
-	}
-	return (tile);
-}
-
-/*
- * Check an (x,y,z,s) coordinate
- * against the image bounds.
- */
-int
-TIFFCheckTile(TIFF* tif, uint32 x, uint32 y, uint32 z, tsample_t s)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-
-	if (x >= td->td_imagewidth) {
-		TIFFError(tif->tif_name, "Col %ld out of range, max %lu",
-		    (long) x, (u_long) td->td_imagewidth);
-		return (0);
-	}
-	if (y >= td->td_imagelength) {
-		TIFFError(tif->tif_name, "Row %ld out of range, max %lu",
-		    (long) y, (u_long) td->td_imagelength);
-		return (0);
-	}
-	if (z >= td->td_imagedepth) {
-		TIFFError(tif->tif_name, "Depth %ld out of range, max %lu",
-		    (long) z, (u_long) td->td_imagedepth);
-		return (0);
-	}
-	if (td->td_planarconfig == PLANARCONFIG_SEPARATE &&
-	    s >= td->td_samplesperpixel) {
-		TIFFError(tif->tif_name, "Sample %d out of range, max %u",
-		    (int) s, td->td_samplesperpixel);
-		return (0);
-	}
-	return (1);
-}
-
-/*
- * Compute how many tiles are in an image.
- */
-ttile_t
-TIFFNumberOfTiles(TIFF* tif)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-	uint32 dx = td->td_tilewidth;
-	uint32 dy = td->td_tilelength;
-	uint32 dz = td->td_tiledepth;
-	ttile_t ntiles;
-
-	if (dx == (uint32) -1)
-		dx = td->td_imagewidth;
-	if (dy == (uint32) -1)
-		dy = td->td_imagelength;
-	if (dz == (uint32) -1)
-		dz = td->td_imagedepth;
-	ntiles = (dx == 0 || dy == 0 || dz == 0) ? 0 :
-	    (TIFFhowmany(td->td_imagewidth, dx) *
-	     TIFFhowmany(td->td_imagelength, dy) *
-	     TIFFhowmany(td->td_imagedepth, dz));
-	if (td->td_planarconfig == PLANARCONFIG_SEPARATE)
-		ntiles *= td->td_samplesperpixel;
-	return (ntiles);
-}
-
-/*
- * Compute the # bytes in each row of a tile.
- */
-tsize_t
-TIFFTileRowSize(TIFF* tif)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-	tsize_t rowsize;
-	
-	if (td->td_tilelength == 0 || td->td_tilewidth == 0)
-		return ((tsize_t) 0);
-	rowsize = td->td_bitspersample * td->td_tilewidth;
-	if (td->td_planarconfig == PLANARCONFIG_CONTIG)
-		rowsize *= td->td_samplesperpixel;
-	return ((tsize_t) TIFFhowmany(rowsize, 8));
-}
-
-/*
- * Compute the # bytes in a variable length, row-aligned tile.
- */
-tsize_t
-TIFFVTileSize(TIFF* tif, uint32 nrows)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-	tsize_t tilesize;
-
-	if (td->td_tilelength == 0 || td->td_tilewidth == 0 ||
-	    td->td_tiledepth == 0)
-		return ((tsize_t) 0);
-#ifdef YCBCR_SUPPORT
-	if (td->td_planarconfig == PLANARCONFIG_CONTIG &&
-	    td->td_photometric == PHOTOMETRIC_YCBCR &&
-	    !isUpSampled(tif)) {
-		/*
-		 * Packed YCbCr data contain one Cb+Cr for every
-		 * HorizontalSampling*VerticalSampling Y values.
-		 * Must also roundup width and height when calculating
-		 * since images that are not a multiple of the
-		 * horizontal/vertical subsampling area include
-		 * YCbCr data for the extended image.
-		 */
-		tsize_t w =
-		    TIFFroundup(td->td_tilewidth, td->td_ycbcrsubsampling[0]);
-		tsize_t rowsize = TIFFhowmany(w*td->td_bitspersample, 8);
-		tsize_t samplingarea =
-		    td->td_ycbcrsubsampling[0]*td->td_ycbcrsubsampling[1];
-		nrows = TIFFroundup(nrows, td->td_ycbcrsubsampling[1]);
-		/* NB: don't need TIFFhowmany here 'cuz everything is rounded */
-		tilesize = nrows*rowsize + 2*(nrows*rowsize / samplingarea);
-	} else
-#endif
-		tilesize = nrows * TIFFTileRowSize(tif);
-	return ((tsize_t)(tilesize * td->td_tiledepth));
-}
-
-/*
- * Compute the # bytes in a row-aligned tile.
- */
-tsize_t
-TIFFTileSize(TIFF* tif)
-{
-	return (TIFFVTileSize(tif, tif->tif_dir.td_tilelength));
-}
-
-/*
- * Compute a default tile size based on the image
- * characteristics and a requested value.  If a
- * request is <1 then we choose a size according
- * to certain heuristics.
- */
-void
-TIFFDefaultTileSize(TIFF* tif, uint32* tw, uint32* th)
-{
-	(*tif->tif_deftilesize)(tif, tw, th);
-}
-
-void
-_TIFFDefaultTileSize(TIFF* tif, uint32* tw, uint32* th)
-{
-	(void) tif;
-	if (*(int32*) tw < 1)
-		*tw = 256;
-	if (*(int32*) th < 1)
-		*th = 256;
-	/* roundup to a multiple of 16 per the spec */
-	if (*tw & 0xf)
-		*tw = TIFFroundup(*tw, 16);
-	if (*th & 0xf)
-		*th = TIFFroundup(*th, 16);
-}
diff --git a/src/tiff/tif_unix.c b/src/tiff/tif_unix.c
deleted file mode 100644
index 6a3c874..0000000
--- a/src/tiff/tif_unix.c
+++ /dev/null
@@ -1,228 +0,0 @@
-/* $Header: /home/terralib/src/tiff/tif_unix.c,v 1.3 2004/03/19 11:51:25 lubia Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library UNIX-specific Routines.
- */
-#include "tiffiop.h"
-#include <sys/types.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-static tsize_t
-_tiffReadProc(thandle_t fd, tdata_t buf, tsize_t size)
-{
-	return ((tsize_t) read((int) fd, buf, (size_t) size));
-}
-
-static tsize_t
-_tiffWriteProc(thandle_t fd, tdata_t buf, tsize_t size)
-{
-	return ((tsize_t) write((int) fd, buf, (size_t) size));
-}
-
-static toff_t
-_tiffSeekProc(thandle_t fd, toff_t off, int whence)
-{
-#if USE_64BIT_API == 1
-	return ((toff_t) lseek64((int) fd, (off64_t) off, whence));
-#else
-	return ((toff_t) lseek((int) fd, (off_t) off, whence));
-#endif
-}
-
-static int
-_tiffCloseProc(thandle_t fd)
-{
-	return (close((int) fd));
-}
-
-#include <sys/stat.h>
-
-static toff_t
-_tiffSizeProc(thandle_t fd)
-{
-#ifdef _AM29K
-	long fsize;
-	return ((fsize = lseek((int) fd, 0, SEEK_END)) < 0 ? 0 : fsize);
-#else
-#if USE_64BIT_API == 1
-	struct stat64 sb;
-	return (toff_t) (fstat64((int) fd, &sb) < 0 ? 0 : sb.st_size);
-#else
-	struct stat sb;
-	return (toff_t) (fstat((int) fd, &sb) < 0 ? 0 : sb.st_size);
-#endif
-#endif
-}
-
-#ifdef HAVE_MMAP
-#include <sys/mman.h>
-
-static int
-_tiffMapProc(thandle_t fd, tdata_t* pbase, toff_t* psize)
-{
-	toff_t size = _tiffSizeProc(fd);
-	if (size != (toff_t) -1) {
-		*pbase = (tdata_t)
-		    mmap(0, size, PROT_READ, MAP_SHARED, (int) fd, 0);
-		if (*pbase != (tdata_t) -1) {
-			*psize = size;
-			return (1);
-		}
-	}
-	return (0);
-}
-
-static void
-_tiffUnmapProc(thandle_t fd, tdata_t base, toff_t size)
-{
-	(void) fd;
-	(void) munmap(base, (off_t) size);
-}
-#else /* !HAVE_MMAP */
-static int
-_tiffMapProc(thandle_t fd, tdata_t* pbase, toff_t* psize)
-{
-	(void) fd; (void) pbase; (void) psize;
-	return (0);
-}
-
-static void
-_tiffUnmapProc(thandle_t fd, tdata_t base, toff_t size)
-{
-	(void) fd; (void) base; (void) size;
-}
-#endif /* !HAVE_MMAP */
-
-/*
- * Open a TIFF file descriptor for read/writing.
- */
-TIFF*
-TIFFFdOpen(int fd, const char* name, const char* mode)
-{
-	TIFF* tif;
-
-	tif = TIFFClientOpen(name, mode,
-	    (thandle_t) fd,
-	    _tiffReadProc, _tiffWriteProc,
-	    _tiffSeekProc, _tiffCloseProc, _tiffSizeProc,
-	    _tiffMapProc, _tiffUnmapProc);
-	if (tif)
-		tif->tif_fd = fd;
-	return (tif);
-}
-
-/*
- * Open a TIFF file for read/writing.
- */
-TIFF*
-TIFFOpen(const char* name, const char* mode)
-{
-	static const char module[] = "TIFFOpen";
-	int m, fd;
-
-	m = _TIFFgetMode(mode, module);
-	if (m == -1)
-		return ((TIFF*)0);
-
-/* for cygwin */        
-#ifdef O_BINARY
-        m |= O_BINARY;
-#endif        
-        
-#ifdef _AM29K
-	fd = open(name, m);
-#else
-#if USE_64BIT_API == 1
-	fd = open(name, m | O_LARGEFILE, 0666);
-#else
-	fd = open(name, m, 0666);
-#endif
-#endif
-	if (fd < 0) {
-		TIFFError(module, "%s: Cannot open", name);
-		return ((TIFF *)0);
-	}
-	return (TIFFFdOpen(fd, name, mode));
-}
-
-void*
-_TIFFmalloc(tsize_t s)
-{
-	return (malloc((size_t) s));
-}
-
-void
-_TIFFfree(tdata_t p)
-{
-	free(p);
-}
-
-void*
-_TIFFrealloc(tdata_t p, tsize_t s)
-{
-	return (realloc(p, (size_t) s));
-}
-
-void
-_TIFFmemset(tdata_t p, int v, tsize_t c)
-{
-	memset(p, v, (size_t) c);
-}
-
-void
-_TIFFmemcpy(tdata_t d, const tdata_t s, tsize_t c)
-{
-	memcpy(d, s, (size_t) c);
-}
-
-int
-_TIFFmemcmp(const tdata_t p1, const tdata_t p2, tsize_t c)
-{
-	return (memcmp(p1, p2, (size_t) c));
-}
-
-static void
-unixWarningHandler(const char* module, const char* fmt, va_list ap)
-{
-	if (module != NULL)
-		fprintf(stderr, "%s: ", module);
-	fprintf(stderr, "Warning, ");
-	vfprintf(stderr, fmt, ap);
-	fprintf(stderr, ".\n");
-}
-TIFFErrorHandler _TIFFwarningHandler = unixWarningHandler;
-
-static void
-unixErrorHandler(const char* module, const char* fmt, va_list ap)
-{
-	if (module != NULL)
-		fprintf(stderr, "%s: ", module);
-	vfprintf(stderr, fmt, ap);
-	fprintf(stderr, ".\n");
-}
-TIFFErrorHandler _TIFFerrorHandler = unixErrorHandler;
diff --git a/src/tiff/tif_version.c b/src/tiff/tif_version.c
deleted file mode 100644
index 6c60313..0000000
--- a/src/tiff/tif_version.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* $Header: /home/terralib/src/tiff/tif_version.c,v 1.3 2004/03/19 11:51:25 lubia Exp $ */
-/*
- * Copyright (c) 1992-1997 Sam Leffler
- * Copyright (c) 1992-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-#include "tiffiop.h"
-
-static const char TIFFVersion[] = TIFFLIB_VERSION_STR;
-
-const char*
-TIFFGetVersion(void)
-{
-	return (TIFFVersion);
-}
diff --git a/src/tiff/tif_warning.c b/src/tiff/tif_warning.c
deleted file mode 100644
index faf7e67..0000000
--- a/src/tiff/tif_warning.c
+++ /dev/null
@@ -1,49 +0,0 @@
-/* $Header: /home/terralib/src/tiff/tif_warning.c,v 1.3 2004/03/19 11:51:25 lubia Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library.
- */
-#include "tiffiop.h"
-
-TIFFErrorHandler
-TIFFSetWarningHandler(TIFFErrorHandler handler)
-{
-	TIFFErrorHandler prev = _TIFFwarningHandler;
-	_TIFFwarningHandler = handler;
-	return (prev);
-}
-
-void
-TIFFWarning(const char* module, const char* fmt, ...)
-{
-	if (_TIFFwarningHandler) {
-		va_list ap;
-		va_start(ap, fmt);
-		(*_TIFFwarningHandler)(module, fmt, ap);
-		va_end(ap);
-	}
-}
diff --git a/src/tiff/tif_win32.c b/src/tiff/tif_win32.c
deleted file mode 100644
index 5b86505..0000000
--- a/src/tiff/tif_win32.c
+++ /dev/null
@@ -1,323 +0,0 @@
-/* $Header: /home/terralib/src/tiff/tif_win32.c,v 1.5 2005/04/07 18:25:16 juan Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library Win32-specific Routines.  Adapted from tif_unix.c 4/5/95 by
- * Scott Wagner (wagner at itek.com), Itek Graphix, Rochester, NY USA
- */
-#include <windows.h>
-#include "tiffiop.h"
-
-static tsize_t
-_tiffReadProc(thandle_t fd, tdata_t buf, tsize_t size)
-{
-	DWORD dwSizeRead;
-	if (!ReadFile(fd, buf, size, &dwSizeRead, NULL))
-		return(0);
-	return ((tsize_t) dwSizeRead);
-}
-
-static tsize_t
-_tiffWriteProc(thandle_t fd, tdata_t buf, tsize_t size)
-{
-	DWORD dwSizeWritten;
-	if (!WriteFile(fd, buf, size, &dwSizeWritten, NULL))
-		return(0);
-	return ((tsize_t) dwSizeWritten);
-}
-
-static toff_t
-_tiffSeekProc(thandle_t fd, toff_t off, int whence)
-{
-	DWORD dwMoveMethod, dwMoveHigh;
-
-        /* we use this as a special code, so avoid accepting it */
-        if( off == 0xFFFFFFFF )
-            return 0xFFFFFFFF;
-        
-	switch(whence)
-	{
-	case SEEK_SET:
-		dwMoveMethod = FILE_BEGIN;
-		break;
-	case SEEK_CUR:
-		dwMoveMethod = FILE_CURRENT;
-		break;
-	case SEEK_END:
-		dwMoveMethod = FILE_END;
-		break;
-	default:
-		dwMoveMethod = FILE_BEGIN;
-		break;
-	}
-        dwMoveHigh = 0;
-	return ((toff_t)SetFilePointer(fd, (LONG) off, (PLONG)&dwMoveHigh,
-                                       dwMoveMethod));
-}
-
-static int
-_tiffCloseProc(thandle_t fd)
-{
-	return (CloseHandle(fd) ? 0 : -1);
-}
-
-static toff_t
-_tiffSizeProc(thandle_t fd)
-{
-	return ((toff_t)GetFileSize(fd, NULL));
-}
-
-#ifdef __BORLANDC__
-#pragma argsused
-#endif
-static int
-_tiffDummyMapProc(thandle_t fd, tdata_t* pbase, toff_t* psize)
-{
-	return (0);
-}
-
-/*
- * From "Hermann Josef Hill" <lhill at rhein-zeitung.de>:
- *
- * Windows uses both a handle and a pointer for file mapping,
- * but according to the SDK documentation and Richter's book
- * "Advanced Windows Programming" it is safe to free the handle
- * after obtaining the file mapping pointer
- *
- * This removes a nasty OS dependency and cures a problem
- * with Visual C++ 5.0
- */
-static int
-_tiffMapProc(thandle_t fd, tdata_t* pbase, toff_t* psize)
-{
-	toff_t size;
-	HANDLE hMapFile;
-
-	if ((size = _tiffSizeProc(fd)) == 0xFFFFFFFF)
-		return (0);
-	hMapFile = CreateFileMapping(fd, NULL, PAGE_READONLY, 0, size, NULL);
-	if (hMapFile == NULL)
-		return (0);
-	*pbase = MapViewOfFile(hMapFile, FILE_MAP_READ, 0, 0, 0);
-	CloseHandle(hMapFile);
-	if (*pbase == NULL)
-		return (0);
-	*psize = size;
-	return(1);
-}
-
-#ifdef __BORLANDC__
-#pragma argsused
-#endif
-static void
-_tiffDummyUnmapProc(thandle_t fd, tdata_t base, toff_t size)
-{
-}
-
-static void
-_tiffUnmapProc(thandle_t fd, tdata_t base, toff_t size)
-{
-	UnmapViewOfFile(base);
-}
-
-/*
- * Open a TIFF file descriptor for read/writing.
- * Note that TIFFFdOpen and TIFFOpen recognise the character 'u' in the mode
- * string, which forces the file to be opened unmapped.
- */
-TIFF*
-TIFFFdOpen(int ifd, const char* name, const char* mode)
-{
-	TIFF* tif;
-	BOOL fSuppressMap = (mode[1] == 'u' || (mode[1]!=0 && mode[2] == 'u'));
-
-	tif = TIFFClientOpen(name, mode,
-		 (thandle_t)ifd,
-	    _tiffReadProc, _tiffWriteProc,
-	    _tiffSeekProc, _tiffCloseProc, _tiffSizeProc,
-		 fSuppressMap ? _tiffDummyMapProc : _tiffMapProc,
-		 fSuppressMap ? _tiffDummyUnmapProc : _tiffUnmapProc);
-	if (tif)
-		tif->tif_fd = ifd;
-	return (tif);
-}
-
-/*
- * Open a TIFF file for read/writing.
- */
-TIFF*
-TIFFOpen(const char* name, const char* mode)
-{
-	static const char module[] = "TIFFOpen";
-	thandle_t fd;
-	int m;
-	DWORD dwMode;
-
-	m = _TIFFgetMode(mode, module);
-
-	switch(m)
-	{
-	case O_RDONLY:
-		dwMode = OPEN_EXISTING;
-		break;
-	case O_RDWR:
-		dwMode = OPEN_ALWAYS;
-		break;
-	case O_RDWR|O_CREAT:
-		dwMode = OPEN_ALWAYS;
-		break;
-	case O_RDWR|O_TRUNC:
-		dwMode = CREATE_ALWAYS;
-		break;
-	case O_RDWR|O_CREAT|O_TRUNC:
-		dwMode = CREATE_ALWAYS;
-		break;
-	default:
-		return ((TIFF*)0);
-	}
-	fd = (thandle_t)CreateFile(name, (m == O_RDONLY) ? GENERIC_READ :
-			(GENERIC_READ | GENERIC_WRITE), FILE_SHARE_READ, NULL, dwMode,
-			(m == O_RDONLY) ? FILE_ATTRIBUTE_READONLY : FILE_ATTRIBUTE_NORMAL, NULL);
-	if (fd == INVALID_HANDLE_VALUE) {
-		TIFFError(module, "%s: Cannot open", name);
-		return ((TIFF *)0);
-	}
-	return (TIFFFdOpen((int)fd, name, mode));
-}
-
-tdata_t
-_TIFFmalloc(tsize_t s)
-{
-	return ((tdata_t)GlobalAlloc(GMEM_FIXED, s));
-}
-
-void
-_TIFFfree(tdata_t p)
-{
-	GlobalFree(p);
-	return;
-}
-
-tdata_t
-_TIFFrealloc(tdata_t p, tsize_t s)
-{
-  void* pvTmp;
-  tsize_t old=GlobalSize(p);
-  if (old>=s)
-    {
-      if ((pvTmp = GlobalAlloc(GMEM_FIXED, s)) != NULL) {
-	CopyMemory(pvTmp, p, s);
-	GlobalFree(p);
-      }
-    }
-  else
-    {
-      if ((pvTmp = GlobalAlloc(GMEM_FIXED, s)) != NULL) {
-	CopyMemory(pvTmp, p, old);
-	GlobalFree(p);
-      }
-    }
-  return ((tdata_t)pvTmp);
-}
-
-void
-_TIFFmemset(void* p, int v, tsize_t c)
-{
-	FillMemory(p, c, (BYTE)v);
-}
-
-void
-_TIFFmemcpy(void* d, const tdata_t s, tsize_t c)
-{
-	CopyMemory(d, s, c);
-}
-
-int
-_TIFFmemcmp(const tdata_t p1, const tdata_t p2, tsize_t c)
-{
-	register const BYTE *pb1 = (const BYTE *) p1;
-	register const BYTE *pb2 = (const BYTE *) p2;
-	register DWORD dwTmp = c;
-	register int iTmp;
-	for (iTmp = 0; dwTmp-- && !iTmp; iTmp = (int)*pb1++ - (int)*pb2++)
-		;
-	return (iTmp);
-}
-
-static void
-Win32WarningHandler(const char* module, const char* fmt, va_list ap)
-{
-#ifndef TIF_PLATFORM_CONSOLE
-	LPTSTR szTitle;
-	LPTSTR szTmp;
-	LPCTSTR szTitleText = "%s Warning";
-	LPCTSTR szDefaultModule = "TIFFLIB";
-	szTmp = (module == NULL) ? (LPTSTR)szDefaultModule : (LPTSTR)module;
-	if ((szTitle = (LPTSTR)LocalAlloc(LMEM_FIXED, (lstrlen(szTmp) +
-			lstrlen(szTitleText) + lstrlen(fmt) + 128)*sizeof(TCHAR))) == NULL)
-		return;
-	wsprintf(szTitle, szTitleText, szTmp);
-	szTmp = szTitle + (lstrlen(szTitle)+2)*sizeof(TCHAR);
-	wvsprintf(szTmp, fmt, ap);
-	MessageBox(GetFocus(), szTmp, szTitle, MB_OK | MB_ICONINFORMATION);
-	LocalFree(szTitle);
-	return;
-#else
-	if (module != NULL)
-		fprintf(stderr, "%s: ", module);
-	fprintf(stderr, "Warning, ");
-	vfprintf(stderr, fmt, ap);
-	fprintf(stderr, ".\n");
-#endif        
-}
-TIFFErrorHandler _TIFFwarningHandler = Win32WarningHandler;
-
-static void
-Win32ErrorHandler(const char* module, const char* fmt, va_list ap)
-{
-#ifndef TIF_PLATFORM_CONSOLE
-	LPTSTR szTitle;
-	LPTSTR szTmp;
-	LPCTSTR szTitleText = "%s Error";
-	LPCTSTR szDefaultModule = "TIFFLIB";
-	szTmp = (module == NULL) ? (LPTSTR)szDefaultModule : (LPTSTR)module;
-	if ((szTitle = (LPTSTR)LocalAlloc(LMEM_FIXED, (lstrlen(szTmp) +
-			lstrlen(szTitleText) + lstrlen(fmt) + 128)*sizeof(TCHAR))) == NULL)
-		return;
-	wsprintf(szTitle, szTitleText, szTmp);
-	szTmp = szTitle + (lstrlen(szTitle)+2)*sizeof(TCHAR);
-	wvsprintf(szTmp, fmt, ap);
-	MessageBox(GetFocus(), szTmp, szTitle, MB_OK | MB_ICONEXCLAMATION);
-	LocalFree(szTitle);
-	return;
-#else
-	if (module != NULL)
-		fprintf(stderr, "%s: ", module);
-	vfprintf(stderr, fmt, ap);
-	fprintf(stderr, ".\n");
-#endif        
-}
-TIFFErrorHandler _TIFFerrorHandler = Win32ErrorHandler;
diff --git a/src/tiff/tif_write.c b/src/tiff/tif_write.c
deleted file mode 100644
index e5cc00f..0000000
--- a/src/tiff/tif_write.c
+++ /dev/null
@@ -1,726 +0,0 @@
-/* $Header: /home/terralib/src/tiff/tif_write.c,v 1.4 2004/04/12 13:52:41 juan Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-/*
- * TIFF Library.
- *
- * Scanline-oriented Write Support
- */
-#include "tiffiop.h"
-#include <assert.h>
-#include <stdio.h>
-
-#define REWRITE_HACK
-
-#define	STRIPINCR	20		/* expansion factor on strip array */
-
-#define	WRITECHECKSTRIPS(tif, module)				\
-	(((tif)->tif_flags&TIFF_BEENWRITING) || TIFFWriteCheck((tif),0,module))
-#define	WRITECHECKTILES(tif, module)				\
-	(((tif)->tif_flags&TIFF_BEENWRITING) || TIFFWriteCheck((tif),1,module))
-#define	BUFFERCHECK(tif)					\
-	((((tif)->tif_flags & TIFF_BUFFERSETUP) && tif->tif_rawdata) ||	\
-	    TIFFWriteBufferSetup((tif), NULL, (tsize_t) -1))
-
-static	int TIFFGrowStrips(TIFF*, int, const char*);
-static	int TIFFAppendToStrip(TIFF*, tstrip_t, tidata_t, tsize_t);
-
-int
-TIFFWriteScanline(TIFF* tif, tdata_t buf, uint32 row, tsample_t sample)
-{
-	static const char module[] = "TIFFWriteScanline";
-	register TIFFDirectory *td;
-	int status, imagegrew = 0;
-	tstrip_t strip;
-
-	if (!WRITECHECKSTRIPS(tif, module))
-		return (-1);
-	/*
-	 * Handle delayed allocation of data buffer.  This
-	 * permits it to be sized more intelligently (using
-	 * directory information).
-	 */
-	if (!BUFFERCHECK(tif))
-		return (-1);
-	td = &tif->tif_dir;
-	/*
-	 * Extend image length if needed
-	 * (but only for PlanarConfig=1).
-	 */
-	if (row >= td->td_imagelength) {	/* extend image */
-		if (td->td_planarconfig == PLANARCONFIG_SEPARATE) {
-			TIFFError(tif->tif_name,
-		"Can not change \"ImageLength\" when using separate planes");
-			return (-1);
-		}
-		td->td_imagelength = row+1;
-		imagegrew = 1;
-	}
-	/*
-	 * Calculate strip and check for crossings.
-	 */
-	if (td->td_planarconfig == PLANARCONFIG_SEPARATE) {
-		if (sample >= td->td_samplesperpixel) {
-			TIFFError(tif->tif_name,
-			    "%d: Sample out of range, max %d",
-			    sample, td->td_samplesperpixel);
-			return (-1);
-		}
-		strip = sample*td->td_stripsperimage + row/td->td_rowsperstrip;
-	} else
-		strip = row / td->td_rowsperstrip;
-	if (strip != tif->tif_curstrip) {
-		/*
-		 * Changing strips -- flush any data present.
-		 */
-		if (!TIFFFlushData(tif))
-			return (-1);
-		tif->tif_curstrip = strip;
-		/*
-		 * Watch out for a growing image.  The value of
-		 * strips/image will initially be 1 (since it
-		 * can't be deduced until the imagelength is known).
-		 */
-		if (strip >= td->td_stripsperimage && imagegrew)
-			td->td_stripsperimage =
-			    TIFFhowmany(td->td_imagelength,td->td_rowsperstrip);
-		tif->tif_row =
-		    (strip % td->td_stripsperimage) * td->td_rowsperstrip;
-		if ((tif->tif_flags & TIFF_CODERSETUP) == 0) {
-			if (!(*tif->tif_setupencode)(tif))
-				return (-1);
-			tif->tif_flags |= TIFF_CODERSETUP;
-		}
-		if (!(*tif->tif_preencode)(tif, sample))
-			return (-1);
-		tif->tif_flags |= TIFF_POSTENCODE;
-	}
-	/*
-	 * Check strip array to make sure there's space.
-	 * We don't support dynamically growing files that
-	 * have data organized in separate bitplanes because
-	 * it's too painful.  In that case we require that
-	 * the imagelength be set properly before the first
-	 * write (so that the strips array will be fully
-	 * allocated above).
-	 */
-	if (strip >= td->td_nstrips && !TIFFGrowStrips(tif, 1, module))
-		return (-1);
-	/*
-	 * Ensure the write is either sequential or at the
-	 * beginning of a strip (or that we can randomly
-	 * access the data -- i.e. no encoding).
-	 */
-	if (row != tif->tif_row) {
-		if (row < tif->tif_row) {
-			/*
-			 * Moving backwards within the same strip:
-			 * backup to the start and then decode
-			 * forward (below).
-			 */
-			tif->tif_row = (strip % td->td_stripsperimage) *
-			    td->td_rowsperstrip;
-			tif->tif_rawcp = tif->tif_rawdata;
-		}
-		/*
-		 * Seek forward to the desired row.
-		 */
-		if (!(*tif->tif_seek)(tif, row - tif->tif_row))
-			return (-1);
-		tif->tif_row = row;
-	}
-
-        /* swab if needed - note that source buffer will be altered */
-        tif->tif_postdecode( tif, (tidata_t) buf, tif->tif_scanlinesize );
-
-	status = (*tif->tif_encoderow)(tif, (tidata_t) buf,
-	    tif->tif_scanlinesize, sample);
-
-        /* we are now poised at the beginning of the next row */
-	tif->tif_row = row + 1;
-	return (status);
-}
-
-/*
- * Encode the supplied data and write it to the
- * specified strip.  There must be space for the
- * data; we don't check if strips overlap!
- *
- * NB: Image length must be setup before writing.
- */
-tsize_t
-TIFFWriteEncodedStrip(TIFF* tif, tstrip_t strip, tdata_t data, tsize_t cc)
-{
-	static const char module[] = "TIFFWriteEncodedStrip";
-	TIFFDirectory *td = &tif->tif_dir;
-	tsample_t sample;
-
-	if (!WRITECHECKSTRIPS(tif, module))
-		return ((tsize_t) -1);
-	/*
-	 * Check strip array to make sure there's space.
-	 * We don't support dynamically growing files that
-	 * have data organized in separate bitplanes because
-	 * it's too painful.  In that case we require that
-	 * the imagelength be set properly before the first
-	 * write (so that the strips array will be fully
-	 * allocated above).
-	 */
-	if (strip >= td->td_nstrips) {
-		if (td->td_planarconfig == PLANARCONFIG_SEPARATE) {
-			TIFFError(tif->tif_name,
-		"Can not grow image by strips when using separate planes");
-			return ((tsize_t) -1);
-		}
-		if (!TIFFGrowStrips(tif, 1, module))
-			return ((tsize_t) -1);
-		td->td_stripsperimage =
-		    TIFFhowmany(td->td_imagelength, td->td_rowsperstrip);
-	}
-	/*
-	 * Handle delayed allocation of data buffer.  This
-	 * permits it to be sized according to the directory
-	 * info.
-	 */
-	if (!BUFFERCHECK(tif))
-		return ((tsize_t) -1);
-	tif->tif_curstrip = strip;
-	tif->tif_row = (strip % td->td_stripsperimage) * td->td_rowsperstrip;
-	if ((tif->tif_flags & TIFF_CODERSETUP) == 0) {
-		if (!(*tif->tif_setupencode)(tif))
-			return ((tsize_t) -1);
-		tif->tif_flags |= TIFF_CODERSETUP;
-	}
-        
-#ifdef REWRITE_HACK        
-	tif->tif_rawcc = 0;
-	tif->tif_rawcp = tif->tif_rawdata;
-
-        if( td->td_stripbytecount[strip] > 0 )
-        {
-            /* if we are writing over existing tiles, zero length. */
-            td->td_stripbytecount[strip] = 0;
-
-            /* this forces TIFFAppendToStrip() to do a seek */
-            tif->tif_curoff = 0;
-        }
-#endif
-        
-	tif->tif_flags &= ~TIFF_POSTENCODE;
-	sample = (tsample_t)(strip / td->td_stripsperimage);
-	if (!(*tif->tif_preencode)(tif, sample))
-		return ((tsize_t) -1);
-
-        /* swab if needed - note that source buffer will be altered */
-        tif->tif_postdecode( tif, (tidata_t) data, cc );
-
-	if (!(*tif->tif_encodestrip)(tif, (tidata_t) data, cc, sample))
-		return ((tsize_t) 0);
-	if (!(*tif->tif_postencode)(tif))
-		return ((tsize_t) -1);
-	if (!isFillOrder(tif, td->td_fillorder) &&
-	    (tif->tif_flags & TIFF_NOBITREV) == 0)
-		TIFFReverseBits(tif->tif_rawdata, tif->tif_rawcc);
-	if (tif->tif_rawcc > 0 &&
-	    !TIFFAppendToStrip(tif, strip, tif->tif_rawdata, tif->tif_rawcc))
-		return ((tsize_t) -1);
-	tif->tif_rawcc = 0;
-	tif->tif_rawcp = tif->tif_rawdata;
-	return (cc);
-}
-
-/*
- * Write the supplied data to the specified strip.
- * There must be space for the data; we don't check
- * if strips overlap!
- *
- * NB: Image length must be setup before writing.
- */
-tsize_t
-TIFFWriteRawStrip(TIFF* tif, tstrip_t strip, tdata_t data, tsize_t cc)
-{
-	static const char module[] = "TIFFWriteRawStrip";
-	TIFFDirectory *td = &tif->tif_dir;
-
-	if (!WRITECHECKSTRIPS(tif, module))
-		return ((tsize_t) -1);
-	/*
-	 * Check strip array to make sure there's space.
-	 * We don't support dynamically growing files that
-	 * have data organized in separate bitplanes because
-	 * it's too painful.  In that case we require that
-	 * the imagelength be set properly before the first
-	 * write (so that the strips array will be fully
-	 * allocated above).
-	 */
-	if (strip >= td->td_nstrips) {
-		if (td->td_planarconfig == PLANARCONFIG_SEPARATE) {
-			TIFFError(tif->tif_name,
-		"Can not grow image by strips when using separate planes");
-			return ((tsize_t) -1);
-		}
-		/*
-		 * Watch out for a growing image.  The value of
-		 * strips/image will initially be 1 (since it
-		 * can't be deduced until the imagelength is known).
-		 */
-		if (strip >= td->td_stripsperimage)
-			td->td_stripsperimage =
-			    TIFFhowmany(td->td_imagelength,td->td_rowsperstrip);
-		if (!TIFFGrowStrips(tif, 1, module))
-			return ((tsize_t) -1);
-	}
-	tif->tif_curstrip = strip;
-	tif->tif_row = (strip % td->td_stripsperimage) * td->td_rowsperstrip;
-	return (TIFFAppendToStrip(tif, strip, (tidata_t) data, cc) ?
-	    cc : (tsize_t) -1);
-}
-
-/*
- * Write and compress a tile of data.  The
- * tile is selected by the (x,y,z,s) coordinates.
- */
-tsize_t
-TIFFWriteTile(TIFF* tif,
-    tdata_t buf, uint32 x, uint32 y, uint32 z, tsample_t s)
-{
-	if (!TIFFCheckTile(tif, x, y, z, s))
-		return (-1);
-	/*
-	 * NB: A tile size of -1 is used instead of tif_tilesize knowing
-	 *     that TIFFWriteEncodedTile will clamp this to the tile size.
-	 *     This is done because the tile size may not be defined until
-	 *     after the output buffer is setup in TIFFWriteBufferSetup.
-	 */
-	return (TIFFWriteEncodedTile(tif,
-	    TIFFComputeTile(tif, x, y, z, s), buf, (tsize_t) -1));
-}
-
-/*
- * Encode the supplied data and write it to the
- * specified tile.  There must be space for the
- * data.  The function clamps individual writes
- * to a tile to the tile size, but does not (and
- * can not) check that multiple writes to the same
- * tile do not write more than tile size data.
- *
- * NB: Image length must be setup before writing; this
- *     interface does not support automatically growing
- *     the image on each write (as TIFFWriteScanline does).
- */
-tsize_t
-TIFFWriteEncodedTile(TIFF* tif, ttile_t tile, tdata_t data, tsize_t cc)
-{
-	static const char module[] = "TIFFWriteEncodedTile";
-	TIFFDirectory *td;
-	tsample_t sample;
-
-	if (!WRITECHECKTILES(tif, module))
-		return ((tsize_t) -1);
-	td = &tif->tif_dir;
-	if (tile >= td->td_nstrips) {
-		TIFFError(module, "%s: Tile %lu out of range, max %lu",
-		    tif->tif_name, (u_long) tile, (u_long) td->td_nstrips);
-		return ((tsize_t) -1);
-	}
-	/*
-	 * Handle delayed allocation of data buffer.  This
-	 * permits it to be sized more intelligently (using
-	 * directory information).
-	 */
-	if (!BUFFERCHECK(tif))
-		return ((tsize_t) -1);
-	tif->tif_curtile = tile;
-
-#ifdef REWRITE_HACK        
-	tif->tif_rawcc = 0;
-	tif->tif_rawcp = tif->tif_rawdata;
-
-        if( td->td_stripbytecount[tile] > 0 )
-        {
-            /* if we are writing over existing tiles, zero length. */
-            td->td_stripbytecount[tile] = 0;
-
-            /* this forces TIFFAppendToStrip() to do a seek */
-            tif->tif_curoff = 0;
-        }
-#endif
-        
-	/* 
-	 * Compute tiles per row & per column to compute
-	 * current row and column
-	 */
-	tif->tif_row = (tile % TIFFhowmany(td->td_imagelength, td->td_tilelength))
-		* td->td_tilelength;
-	tif->tif_col = (tile % TIFFhowmany(td->td_imagewidth, td->td_tilewidth))
-		* td->td_tilewidth;
-
-	if ((tif->tif_flags & TIFF_CODERSETUP) == 0) {
-		if (!(*tif->tif_setupencode)(tif))
-			return ((tsize_t) -1);
-		tif->tif_flags |= TIFF_CODERSETUP;
-	}
-	tif->tif_flags &= ~TIFF_POSTENCODE;
-	sample = (tsample_t)(tile/td->td_stripsperimage);
-	if (!(*tif->tif_preencode)(tif, sample))
-		return ((tsize_t) -1);
-	/*
-	 * Clamp write amount to the tile size.  This is mostly
-	 * done so that callers can pass in some large number
-	 * (e.g. -1) and have the tile size used instead.
-	 */
-	if ( cc < 1 || cc > tif->tif_tilesize)
-		cc = tif->tif_tilesize;
-
-        /* swab if needed - note that source buffer will be altered */
-        tif->tif_postdecode( tif, (tidata_t) data, cc );
-
-	if (!(*tif->tif_encodetile)(tif, (tidata_t) data, cc, sample))
-		return ((tsize_t) 0);
-	if (!(*tif->tif_postencode)(tif))
-		return ((tsize_t) -1);
-	if (!isFillOrder(tif, td->td_fillorder) &&
-	    (tif->tif_flags & TIFF_NOBITREV) == 0)
-		TIFFReverseBits((u_char *)tif->tif_rawdata, tif->tif_rawcc);
-	if (tif->tif_rawcc > 0 && !TIFFAppendToStrip(tif, tile,
-	    tif->tif_rawdata, tif->tif_rawcc))
-		return ((tsize_t) -1);
-	tif->tif_rawcc = 0;
-	tif->tif_rawcp = tif->tif_rawdata;
-	return (cc);
-}
-
-/*
- * Write the supplied data to the specified strip.
- * There must be space for the data; we don't check
- * if strips overlap!
- *
- * NB: Image length must be setup before writing; this
- *     interface does not support automatically growing
- *     the image on each write (as TIFFWriteScanline does).
- */
-tsize_t
-TIFFWriteRawTile(TIFF* tif, ttile_t tile, tdata_t data, tsize_t cc)
-{
-	static const char module[] = "TIFFWriteRawTile";
-
-	if (!WRITECHECKTILES(tif, module))
-		return ((tsize_t) -1);
-	if (tile >= tif->tif_dir.td_nstrips) {
-		TIFFError(module, "%s: Tile %lu out of range, max %lu",
-		    tif->tif_name, (u_long) tile,
-		    (u_long) tif->tif_dir.td_nstrips);
-		return ((tsize_t) -1);
-	}
-	return (TIFFAppendToStrip(tif, tile, (tidata_t) data, cc) ?
-	    cc : (tsize_t) -1);
-}
-
-#define	isUnspecified(tif, f) \
-    (TIFFFieldSet(tif,f) && (tif)->tif_dir.td_imagelength == 0)
-
-int
-TIFFSetupStrips(TIFF* tif)
-{
-	TIFFDirectory* td = &tif->tif_dir;
-
-	if (isTiled(tif))
-		td->td_stripsperimage =
-		    isUnspecified(tif, FIELD_TILEDIMENSIONS) ?
-			td->td_samplesperpixel : TIFFNumberOfTiles(tif);
-	else
-		td->td_stripsperimage =
-		    isUnspecified(tif, FIELD_ROWSPERSTRIP) ?
-			td->td_samplesperpixel : TIFFNumberOfStrips(tif);
-	td->td_nstrips = td->td_stripsperimage;
-	if (td->td_planarconfig == PLANARCONFIG_SEPARATE)
-		td->td_stripsperimage /= td->td_samplesperpixel;
-	td->td_stripoffset = (uint32 *)
-	    _TIFFmalloc(td->td_nstrips * sizeof (uint32));
-	td->td_stripbytecount = (uint32 *)
-	    _TIFFmalloc(td->td_nstrips * sizeof (uint32));
-	if (td->td_stripoffset == NULL || td->td_stripbytecount == NULL)
-		return (0);
-	/*
-	 * Place data at the end-of-file
-	 * (by setting offsets to zero).
-	 */
-	_TIFFmemset(td->td_stripoffset, 0, td->td_nstrips*sizeof (uint32));
-	_TIFFmemset(td->td_stripbytecount, 0, td->td_nstrips*sizeof (uint32));
-	TIFFSetFieldBit(tif, FIELD_STRIPOFFSETS);
-	TIFFSetFieldBit(tif, FIELD_STRIPBYTECOUNTS);
-	return (1);
-}
-#undef isUnspecified
-
-/*
- * Verify file is writable and that the directory
- * information is setup properly.  In doing the latter
- * we also "freeze" the state of the directory so
- * that important information is not changed.
- */
-int
-TIFFWriteCheck(TIFF* tif, int tiles, const char* module)
-{
-	if (tif->tif_mode == O_RDONLY) {
-		TIFFError(module, "%s: File not open for writing",
-		    tif->tif_name);
-		return (0);
-	}
-	if (tiles ^ isTiled(tif)) {
-		TIFFError(tif->tif_name, tiles ?
-		    "Can not write tiles to a stripped image" :
-		    "Can not write scanlines to a tiled image");
-		return (0);
-	}
-        
-        /*
-         * While we allow compressed TIFF files to be opened in update mode,
-         * we don't allow writing any image blocks in an existing compressed
-         * image.  Eventually we could do so, by moving blocks that grow
-         * to the end of the file, but we don't for now. 
-         */
-	if (tif->tif_dir.td_stripoffset != NULL 
-            && tif->tif_dir.td_compression != COMPRESSION_NONE )
-        {
-            TIFFError( module,
-                       "%s:\n"
-                       "In place update to compressed TIFF images not "
-                       "supported.",
-                       tif->tif_name );
-            return (0);
-        }
-
-	/*
-	 * On the first write verify all the required information
-	 * has been setup and initialize any data structures that
-	 * had to wait until directory information was set.
-	 * Note that a lot of our work is assumed to remain valid
-	 * because we disallow any of the important parameters
-	 * from changing after we start writing (i.e. once
-	 * TIFF_BEENWRITING is set, TIFFSetField will only allow
-	 * the image's length to be changed).
-	 */
-	if (!TIFFFieldSet(tif, FIELD_IMAGEDIMENSIONS)) {
-		TIFFError(module,
-		    "%s: Must set \"ImageWidth\" before writing data",
-		    tif->tif_name);
-		return (0);
-	}
-	if (!TIFFFieldSet(tif, FIELD_PLANARCONFIG)) {
-		TIFFError(module,
-	    "%s: Must set \"PlanarConfiguration\" before writing data",
-		    tif->tif_name);
-		return (0);
-	}
-	if (tif->tif_dir.td_stripoffset == NULL && !TIFFSetupStrips(tif)) {
-		tif->tif_dir.td_nstrips = 0;
-		TIFFError(module, "%s: No space for %s arrays",
-		    tif->tif_name, isTiled(tif) ? "tile" : "strip");
-		return (0);
-	}
-	tif->tif_tilesize = TIFFTileSize(tif);
-	tif->tif_scanlinesize = TIFFScanlineSize(tif);
-	tif->tif_flags |= TIFF_BEENWRITING;
-	return (1);
-}
-
-/*
- * Setup the raw data buffer used for encoding.
- */
-int
-TIFFWriteBufferSetup(TIFF* tif, tdata_t bp, tsize_t size)
-{
-	static const char module[] = "TIFFWriteBufferSetup";
-
-	if (tif->tif_rawdata) {
-		if (tif->tif_flags & TIFF_MYBUFFER) {
-			_TIFFfree(tif->tif_rawdata);
-			tif->tif_flags &= ~TIFF_MYBUFFER;
-		}
-		tif->tif_rawdata = NULL;
-	}
-	if (size == (tsize_t) -1) {
-		size = (isTiled(tif) ?
-		    tif->tif_tilesize : tif->tif_scanlinesize);
-		/*
-		 * Make raw data buffer at least 8K
-		 */
-		if (size < 8*1024)
-			size = 8*1024;
-		bp = NULL;			/* NB: force malloc */
-	}
-	if (bp == NULL) {
-		bp = _TIFFmalloc(size);
-		if (bp == NULL) {
-			TIFFError(module, "%s: No space for output buffer",
-			    tif->tif_name);
-			return (0);
-		}
-		tif->tif_flags |= TIFF_MYBUFFER;
-	} else
-		tif->tif_flags &= ~TIFF_MYBUFFER;
-	tif->tif_rawdata = (tidata_t) bp;
-	tif->tif_rawdatasize = size;
-	tif->tif_rawcc = 0;
-	tif->tif_rawcp = tif->tif_rawdata;
-	tif->tif_flags |= TIFF_BUFFERSETUP;
-	return (1);
-}
-
-/*
- * Grow the strip data structures by delta strips.
- */
-static int
-TIFFGrowStrips(TIFF* tif, int delta, const char* module)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-
-	assert(td->td_planarconfig == PLANARCONFIG_CONTIG);
-	td->td_stripoffset = (uint32*)_TIFFrealloc(td->td_stripoffset,
-	    (td->td_nstrips + delta) * sizeof (uint32));
-	td->td_stripbytecount = (uint32*)_TIFFrealloc(td->td_stripbytecount,
-	    (td->td_nstrips + delta) * sizeof (uint32));
-	if (td->td_stripoffset == NULL || td->td_stripbytecount == NULL) {
-		td->td_nstrips = 0;
-		TIFFError(module, "%s: No space to expand strip arrays",
-		    tif->tif_name);
-		return (0);
-	}
-	_TIFFmemset(td->td_stripoffset+td->td_nstrips, 0, delta*sizeof (uint32));
-	_TIFFmemset(td->td_stripbytecount+td->td_nstrips, 0, delta*sizeof (uint32));
-	td->td_nstrips += delta;
-	return (1);
-}
-
-/*
- * Append the data to the specified strip.
- *
- * NB: We don't check that there's space in the
- *     file (i.e. that strips do not overlap).
- */
-static int
-TIFFAppendToStrip(TIFF* tif, tstrip_t strip, tidata_t data, tsize_t cc)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-	static const char module[] = "TIFFAppendToStrip";
-
-	if (td->td_stripoffset[strip] == 0 || tif->tif_curoff == 0) {
-		/*
-		 * No current offset, set the current strip.
-
-		 */
-		if (td->td_stripoffset[strip] != 0) {
-			if (!SeekOK(tif, td->td_stripoffset[strip])) {
-				TIFFError(module,
-				    "%s: Seek error at scanline %lu",
-				    tif->tif_name, (u_long) tif->tif_row);
-				return (0);
-			}
-		} else
-			td->td_stripoffset[strip] =
-			    TIFFSeekFile(tif, (toff_t) 0, SEEK_END);
-		tif->tif_curoff = td->td_stripoffset[strip];
-	}
-	if (!WriteOK(tif, data, cc)) {
-		TIFFError(module, "%s: Write error at scanline %lu",
-		    tif->tif_name, (u_long) tif->tif_row);
-		return (0);
-	}
-	tif->tif_curoff += cc;
-	td->td_stripbytecount[strip] += cc;
-	return (1);
-}
-
-/*
- * Internal version of TIFFFlushData that can be
- * called by ``encodestrip routines'' w/o concern
- * for infinite recursion.
- */
-int
-TIFFFlushData1(TIFF* tif)
-{
-	if (tif->tif_rawcc > 0) {
-		if (!isFillOrder(tif, tif->tif_dir.td_fillorder) &&
-		    (tif->tif_flags & TIFF_NOBITREV) == 0)
-			TIFFReverseBits((u_char *)tif->tif_rawdata,
-			    tif->tif_rawcc);
-		if (!TIFFAppendToStrip(tif,
-		    isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip,
-		    tif->tif_rawdata, tif->tif_rawcc))
-			return (0);
-		tif->tif_rawcc = 0;
-		tif->tif_rawcp = tif->tif_rawdata;
-	}
-	return (1);
-}
-
-/*
- * Set the current write offset.  This should only be
- * used to set the offset to a known previous location
- * (very carefully), or to 0 so that the next write gets
- * appended to the end of the file.
- */
-void
-TIFFSetWriteOffset(TIFF* tif, toff_t off)
-{
-	tif->tif_curoff = off;
-}
-
-
-/*
- * Rewrite the specified strip.
- */
-
-tsize_t
-TIFFWriteStrip(TIFF* tif, tstrip_t strip, tdata_t data, tsize_t cc)
-{
-	TIFFDirectory *td = &tif->tif_dir;
-	static const char module[] = "TIFFWriteStrip";
-
-	if (td->td_stripoffset[strip] == 0 || tif->tif_curoff == 0) {
-		/*
-		 * No current offset, set the current strip.
-		 */
-		if (td->td_stripoffset[strip] != 0) {
-			if (!SeekOK(tif, td->td_stripoffset[strip])) {
-				TIFFError(module,
-				    "%s: Seek error at scanline %lu",
-				    tif->tif_name, (u_long) tif->tif_row);
-				return (0);
-			}
-		} else
-			td->td_stripoffset[strip] =
-			    TIFFSeekFile(tif, (toff_t) 0, SEEK_END);
-		tif->tif_curoff = td->td_stripoffset[strip];
-	}
-	if (!WriteOK(tif, data, cc)) {
-		TIFFError(module, "%s: Write error at scanline %lu",
-		    tif->tif_name, (u_long) tif->tif_row);
-		return (0);
-	}
-	return (1);
-}
\ No newline at end of file
diff --git a/src/tiff/tif_zip.c b/src/tiff/tif_zip.c
deleted file mode 100644
index 71e4062..0000000
--- a/src/tiff/tif_zip.c
+++ /dev/null
@@ -1,368 +0,0 @@
-/* $Header: /home/terralib/src/tiff/tif_zip.c,v 1.3 2004/03/19 11:51:25 lubia Exp $ */
-
-/*
- * Copyright (c) 1995-1997 Sam Leffler
- * Copyright (c) 1995-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#include "tiffiop.h"
-#ifdef ZIP_SUPPORT
-/*
- * TIFF Library.
- *
- * ZIP (aka Deflate) Compression Support
- *
- * This file is simply an interface to the zlib library written by
- * Jean-loup Gailly and Mark Adler.  You must use version 1.0 or later
- * of the library: this code assumes the 1.0 API and also depends on
- * the ability to write the zlib header multiple times (one per strip)
- * which was not possible with versions prior to 0.95.  Note also that
- * older versions of this codec avoided this bug by supressing the header
- * entirely.  This means that files written with the old library cannot
- * be read; they should be converted to a different compression scheme
- * and then reconverted.
- *
- * The data format used by the zlib library is described in the files
- * zlib-3.1.doc, deflate-1.1.doc and gzip-4.1.doc, available in the
- * directory ftp://ftp.uu.net/pub/archiving/zip/doc.  The library was
- * last found at ftp://ftp.uu.net/pub/archiving/zip/zlib/zlib-0.99.tar.gz.
- */
-#include "tif_predict.h"
-#include "zlib.h"
-
-#include <stdio.h>
-#include <assert.h>
-
-/*
- * Sigh, ZLIB_VERSION is defined as a string so there's no
- * way to do a proper check here.  Instead we guess based
- * on the presence of #defines that were added between the
- * 0.95 and 1.0 distributions.
- */
-#if !defined(Z_NO_COMPRESSION) || !defined(Z_DEFLATED)
-#error "Antiquated ZLIB software; you must use version 1.0 or later"
-#endif
-
-/*
- * State block for each open TIFF
- * file using ZIP compression/decompression.
- */
-typedef	struct {
-	TIFFPredictorState predict;
-	z_stream	stream;
-	int		zipquality;		/* compression level */
-	int		state;			/* state flags */
-#define	ZSTATE_INIT	0x1		/* zlib setup successfully */
-
-	TIFFVGetMethod	vgetparent;		/* super-class method */
-	TIFFVSetMethod	vsetparent;		/* super-class method */
-} ZIPState;
-
-#define	ZState(tif)		((ZIPState*) (tif)->tif_data)
-#define	DecoderState(tif)	ZState(tif)
-#define	EncoderState(tif)	ZState(tif)
-
-static	int ZIPEncode(TIFF*, tidata_t, tsize_t, tsample_t);
-static	int ZIPDecode(TIFF*, tidata_t, tsize_t, tsample_t);
-
-static int
-ZIPSetupDecode(TIFF* tif)
-{
-	ZIPState* sp = DecoderState(tif);
-	static const char module[] = "ZIPSetupDecode";
-
-	assert(sp != NULL);
-	if (inflateInit(&sp->stream) != Z_OK) {
-		TIFFError(module, "%s: %s", tif->tif_name, sp->stream.msg);
-		return (0);
-	} else {
-		sp->state |= ZSTATE_INIT;
-		return (1);
-	}
-}
-
-/*
- * Setup state for decoding a strip.
- */
-static int
-ZIPPreDecode(TIFF* tif, tsample_t s)
-{
-	ZIPState* sp = DecoderState(tif);
-
-	(void) s;
-	assert(sp != NULL);
-	sp->stream.next_in = tif->tif_rawdata;
-	sp->stream.avail_in = tif->tif_rawcc;
-	return (inflateReset(&sp->stream) == Z_OK);
-}
-
-static int
-ZIPDecode(TIFF* tif, tidata_t op, tsize_t occ, tsample_t s)
-{
-	ZIPState* sp = DecoderState(tif);
-	static const char module[] = "ZIPDecode";
-
-	(void) s;
-	assert(sp != NULL);
-	sp->stream.next_out = op;
-	sp->stream.avail_out = occ;
-	do {
-		int state = inflate(&sp->stream, Z_PARTIAL_FLUSH);
-		if (state == Z_STREAM_END)
-			break;
-		if (state == Z_DATA_ERROR) {
-			TIFFError(module,
-			    "%s: Decoding error at scanline %d, %s",
-			    tif->tif_name, tif->tif_row, sp->stream.msg);
-			if (inflateSync(&sp->stream) != Z_OK)
-				return (0);
-			continue;
-		}
-		if (state != Z_OK) {
-			TIFFError(module, "%s: zlib error: %s",
-			    tif->tif_name, sp->stream.msg);
-			return (0);
-		}
-	} while (sp->stream.avail_out > 0);
-	if (sp->stream.avail_out != 0) {
-		TIFFError(module,
-		    "%s: Not enough data at scanline %d (short %d bytes)",
-		    tif->tif_name, tif->tif_row, sp->stream.avail_out);
-		return (0);
-	}
-	return (1);
-}
-
-static int
-ZIPSetupEncode(TIFF* tif)
-{
-	ZIPState* sp = EncoderState(tif);
-	static const char module[] = "ZIPSetupEncode";
-
-	assert(sp != NULL);
-	if (deflateInit(&sp->stream, sp->zipquality) != Z_OK) {
-		TIFFError(module, "%s: %s", tif->tif_name, sp->stream.msg);
-		return (0);
-	} else {
-		sp->state |= ZSTATE_INIT;
-		return (1);
-	}
-}
-
-/*
- * Reset encoding state at the start of a strip.
- */
-static int
-ZIPPreEncode(TIFF* tif, tsample_t s)
-{
-	ZIPState *sp = EncoderState(tif);
-
-	(void) s;
-	assert(sp != NULL);
-	sp->stream.next_out = tif->tif_rawdata;
-	sp->stream.avail_out = tif->tif_rawdatasize;
-	return (deflateReset(&sp->stream) == Z_OK);
-}
-
-/*
- * Encode a chunk of pixels.
- */
-static int
-ZIPEncode(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
-{
-	ZIPState *sp = EncoderState(tif);
-	static const char module[] = "ZIPEncode";
-
-	(void) s;
-	sp->stream.next_in = bp;
-	sp->stream.avail_in = cc;
-	do {
-		if (deflate(&sp->stream, Z_NO_FLUSH) != Z_OK) {
-			TIFFError(module, "%s: Encoder error: %s",
-			    tif->tif_name, sp->stream.msg);
-			return (0);
-		}
-		if (sp->stream.avail_out == 0) {
-			tif->tif_rawcc = tif->tif_rawdatasize;
-			TIFFFlushData1(tif);
-			sp->stream.next_out = tif->tif_rawdata;
-			sp->stream.avail_out = tif->tif_rawdatasize;
-		}
-	} while (sp->stream.avail_in > 0);
-	return (1);
-}
-
-/*
- * Finish off an encoded strip by flushing the last
- * string and tacking on an End Of Information code.
- */
-static int
-ZIPPostEncode(TIFF* tif)
-{
-	ZIPState *sp = EncoderState(tif);
-	static const char module[] = "ZIPPostEncode";
-	int state;
-
-	sp->stream.avail_in = 0;
-	do {
-		state = deflate(&sp->stream, Z_FINISH);
-		switch (state) {
-		case Z_STREAM_END:
-		case Z_OK:
-		    if ((int)sp->stream.avail_out != (int)tif->tif_rawdatasize)
-                    {
-			    tif->tif_rawcc =
-				tif->tif_rawdatasize - sp->stream.avail_out;
-			    TIFFFlushData1(tif);
-			    sp->stream.next_out = tif->tif_rawdata;
-			    sp->stream.avail_out = tif->tif_rawdatasize;
-		    }
-		    break;
-		default:
-		    TIFFError(module, "%s: zlib error: %s",
-			tif->tif_name, sp->stream.msg);
-		    return (0);
-		}
-	} while (state != Z_STREAM_END);
-	return (1);
-}
-
-static void
-ZIPCleanup(TIFF* tif)
-{
-	ZIPState* sp = ZState(tif);
-	if (sp) {
-		if (sp->state&ZSTATE_INIT) {
-			/* NB: avoid problems in the library */
-			if (tif->tif_mode == O_RDONLY)
-				inflateEnd(&sp->stream);
-			else
-				deflateEnd(&sp->stream);
-		}
-		_TIFFfree(sp);
-		tif->tif_data = NULL;
-	}
-}
-
-static int
-ZIPVSetField(TIFF* tif, ttag_t tag, va_list ap)
-{
-	ZIPState* sp = ZState(tif);
-	static const char module[] = "ZIPVSetField";
-
-	switch (tag) {
-	case TIFFTAG_ZIPQUALITY:
-		sp->zipquality = va_arg(ap, int);
-		if (tif->tif_mode != O_RDONLY && (sp->state&ZSTATE_INIT)) {
-			if (deflateParams(&sp->stream,
-			    sp->zipquality, Z_DEFAULT_STRATEGY) != Z_OK) {
-				TIFFError(module, "%s: zlib error: %s",
-				    tif->tif_name, sp->stream.msg);
-				return (0);
-			}
-		}
-		return (1);
-	default:
-		return (*sp->vsetparent)(tif, tag, ap);
-	}
-	/*NOTREACHED*/
-}
-
-static int
-ZIPVGetField(TIFF* tif, ttag_t tag, va_list ap)
-{
-	ZIPState* sp = ZState(tif);
-
-	switch (tag) {
-	case TIFFTAG_ZIPQUALITY:
-		*va_arg(ap, int*) = sp->zipquality;
-		break;
-	default:
-		return (*sp->vgetparent)(tif, tag, ap);
-	}
-	return (1);
-}
-
-static const TIFFFieldInfo zipFieldInfo[] = {
-    { TIFFTAG_ZIPQUALITY,	 0, 0,	TIFF_ANY,	FIELD_PSEUDO,
-      TRUE,	FALSE,	"" },
-};
-#define	N(a)	(sizeof (a) / sizeof (a[0]))
-
-int
-TIFFInitZIP(TIFF* tif, int scheme)
-{
-	ZIPState* sp;
-
-	assert( (scheme == COMPRESSION_DEFLATE) || (scheme == COMPRESSION_ADOBE_DEFLATE));
-
-	/*
-	 * Allocate state block so tag methods have storage to record values.
-	 */
-	tif->tif_data = (tidata_t) _TIFFmalloc(sizeof (ZIPState));
-	if (tif->tif_data == NULL)
-		goto bad;
-	sp = ZState(tif);
-	sp->stream.zalloc = NULL;
-	sp->stream.zfree = NULL;
-	sp->stream.opaque = NULL;
-	sp->stream.data_type = Z_BINARY;
-
-	/*
-	 * Merge codec-specific tag information and
-	 * override parent get/set field methods.
-	 */
-	_TIFFMergeFieldInfo(tif, zipFieldInfo, N(zipFieldInfo));
-	sp->vgetparent = tif->tif_tagmethods.vgetfield;
-	tif->tif_tagmethods.vgetfield = ZIPVGetField;	/* hook for codec tags */
-	sp->vsetparent = tif->tif_tagmethods.vsetfield;
-	tif->tif_tagmethods.vsetfield = ZIPVSetField;	/* hook for codec tags */
-
-	/* Default values for codec-specific fields */
-	sp->zipquality = Z_DEFAULT_COMPRESSION;	/* default comp. level */
-	sp->state = 0;
-
-	/*
-	 * Install codec methods.
-	 */
-	tif->tif_setupdecode = ZIPSetupDecode;
-	tif->tif_predecode = ZIPPreDecode;
-	tif->tif_decoderow = ZIPDecode;
-	tif->tif_decodestrip = ZIPDecode;
-	tif->tif_decodetile = ZIPDecode;
-	tif->tif_setupencode = ZIPSetupEncode;
-	tif->tif_preencode = ZIPPreEncode;
-	tif->tif_postencode = ZIPPostEncode;
-	tif->tif_encoderow = ZIPEncode;
-	tif->tif_encodestrip = ZIPEncode;
-	tif->tif_encodetile = ZIPEncode;
-	tif->tif_cleanup = ZIPCleanup;
-	/*
-	 * Setup predictor setup.
-	 */
-	(void) TIFFPredictorInit(tif);
-	return (1);
-bad:
-	TIFFError("TIFFInitZIP", "No space for ZIP state block");
-	return (0);
-}
-#endif /* ZIP_SUPORT */
diff --git a/src/tiff/tiff.h b/src/tiff/tiff.h
deleted file mode 100644
index 312c411..0000000
--- a/src/tiff/tiff.h
+++ /dev/null
@@ -1,482 +0,0 @@
-/* $Header: /home/terralib/src/tiff/tiff.h,v 1.3 2004/03/19 11:51:25 lubia Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#ifndef _TIFF_
-#define	_TIFF_
-/*
- * Tag Image File Format (TIFF)
- *
- * Based on Rev 6.0 from:
- *    Developer's Desk
- *    Aldus Corporation
- *    411 First Ave. South
- *    Suite 200
- *    Seattle, WA  98104
- *    206-622-5500
- */
-#define	TIFF_VERSION	42
-
-#define	TIFF_BIGENDIAN		0x4d4d
-#define	TIFF_LITTLEENDIAN	0x4949
-
-/*
- * The so called TIFF types conflict with definitions from inttypes.h 
- * included from sys/types.h on AIX (at least using VisualAge compiler). 
- * We try to work around this by detecting this case.  Defining 
- * _TIFF_DATA_TYPEDEFS_ short circuits the later definitions in tiff.h, and
- * we will in the holes not provided for by inttypes.h. 
- *
- * See http://bugzilla.remotesensing.org/show_bug.cgi?id=39
- */
-#if defined(_H_INTTYPES) && defined(_ALL_SOURCE) && defined(USING_VISUALAGE)
-
-#define _TIFF_DATA_TYPEDEFS_
-typedef unsigned char uint8;
-typedef unsigned short uint16;
-typedef unsigned int uint32;
-
-#endif
-
-/*
- * Intrinsic data types required by the file format:
- *
- * 8-bit quantities	int8/uint8
- * 16-bit quantities	int16/uint16
- * 32-bit quantities	int32/uint32
- * strings		unsigned char*
- */
-#ifndef _TIFF_DATA_TYPEDEFS_
-#define _TIFF_DATA_TYPEDEFS_
-
-#ifdef __STDC__
-typedef	signed char int8;	/* NB: non-ANSI compilers may not grok */
-#else
-typedef	char int8;
-#endif
-typedef	unsigned char uint8;
-typedef	short int16;
-typedef	unsigned short uint16;	/* sizeof (uint16) must == 2 */
-#if defined(__alpha) || (defined(_MIPS_SZLONG) && _MIPS_SZLONG == 64) || defined(__LP64__) || defined(__arch64__)
-typedef	int int32;
-typedef	unsigned int uint32;	/* sizeof (uint32) must == 4 */
-#else
-typedef	long int32;
-typedef	unsigned long uint32;	/* sizeof (uint32) must == 4 */
-#endif
-#endif /* _TIFF_DATA_TYPEDEFS_ */
-
-/*	For TIFFReassignTagToIgnore */
-enum TIFFIgnoreSense /* IGNORE tag table */
-{
-	TIS_STORE,
-	TIS_EXTRACT,
-	TIS_EMPTY
-};
-
-typedef	struct {
-	uint16	tiff_magic;	/* magic number (defines byte order) */
-	uint16	tiff_version;	/* TIFF version number */
-	uint32	tiff_diroff;	/* byte offset to first directory */
-} TIFFHeader;
-
-/*
- * TIFF Image File Directories are comprised of
- * a table of field descriptors of the form shown
- * below.  The table is sorted in ascending order
- * by tag.  The values associated with each entry
- * are disjoint and may appear anywhere in the file
- * (so long as they are placed on a word boundary).
- *
- * If the value is 4 bytes or less, then it is placed
- * in the offset field to save space.  If the value
- * is less than 4 bytes, it is left-justified in the
- * offset field.
- */
-typedef	struct {
-	uint16		tdir_tag;	/* see below */
-	uint16		tdir_type;	/* data type; see below */
-	uint32		tdir_count;	/* number of items; length in spec */
-	uint32		tdir_offset;	/* byte offset to field data */
-} TIFFDirEntry;
-
-/*
- * NB: In the comments below,
- *  - items marked with a + are obsoleted by revision 5.0,
- *  - items marked with a ! are introduced in revision 6.0.
- *  - items marked with a % are introduced post revision 6.0.
- *  - items marked with a $ are obsoleted by revision 6.0.
- */
-
-/*
- * Tag data type information.
- *
- * Note: RATIONALs are the ratio of two 32-bit integer values.
- */
-typedef	enum {
-	TIFF_NOTYPE	= 0,	/* placeholder */
-	TIFF_BYTE	= 1,	/* 8-bit unsigned integer */
-	TIFF_ASCII	= 2,	/* 8-bit bytes w/ last byte null */
-	TIFF_SHORT	= 3,	/* 16-bit unsigned integer */
-	TIFF_LONG	= 4,	/* 32-bit unsigned integer */
-	TIFF_RATIONAL	= 5,	/* 64-bit unsigned fraction */
-	TIFF_SBYTE	= 6,	/* !8-bit signed integer */
-	TIFF_UNDEFINED	= 7,	/* !8-bit untyped data */
-	TIFF_SSHORT	= 8,	/* !16-bit signed integer */
-	TIFF_SLONG	= 9,	/* !32-bit signed integer */
-	TIFF_SRATIONAL	= 10,	/* !64-bit signed fraction */
-	TIFF_FLOAT	= 11,	/* !32-bit IEEE floating point */
-	TIFF_DOUBLE	= 12,	/* !64-bit IEEE floating point */
-	TIFF_IFD	= 13	/* %32-bit unsigned integer (offset) */
-} TIFFDataType;
-
-/*
- * TIFF Tag Definitions.
- */
-#define	TIFFTAG_SUBFILETYPE		254	/* subfile data descriptor */
-#define	    FILETYPE_REDUCEDIMAGE	0x1	/* reduced resolution version */
-#define	    FILETYPE_PAGE		0x2	/* one page of many */
-#define	    FILETYPE_MASK		0x4	/* transparency mask */
-#define	TIFFTAG_OSUBFILETYPE		255	/* +kind of data in subfile */
-#define	    OFILETYPE_IMAGE		1	/* full resolution image data */
-#define	    OFILETYPE_REDUCEDIMAGE	2	/* reduced size image data */
-#define	    OFILETYPE_PAGE		3	/* one page of many */
-#define	TIFFTAG_IMAGEWIDTH		256	/* image width in pixels */
-#define	TIFFTAG_IMAGELENGTH		257	/* image height in pixels */
-#define	TIFFTAG_BITSPERSAMPLE		258	/* bits per channel (sample) */
-#define	TIFFTAG_COMPRESSION		259	/* data compression technique */
-#define	    COMPRESSION_NONE		1	/* dump mode */
-#define	    COMPRESSION_CCITTRLE	2	/* CCITT modified Huffman RLE */
-#define	    COMPRESSION_CCITTFAX3	3	/* CCITT Group 3 fax encoding */
-#define     COMPRESSION_CCITT_T4        3       /* CCITT T.4 (TIFF 6 name) */
-#define	    COMPRESSION_CCITTFAX4	4	/* CCITT Group 4 fax encoding */
-#define     COMPRESSION_CCITT_T6        4       /* CCITT T.6 (TIFF 6 name) */
-#define	    COMPRESSION_LZW		5       /* Lempel-Ziv  & Welch */
-#define	    COMPRESSION_OJPEG		6	/* !6.0 JPEG */
-#define	    COMPRESSION_JPEG		7	/* %JPEG DCT compression */
-#define	    COMPRESSION_NEXT		32766	/* NeXT 2-bit RLE */
-#define	    COMPRESSION_CCITTRLEW	32771	/* #1 w/ word alignment */
-#define	    COMPRESSION_PACKBITS	32773	/* Macintosh RLE */
-#define	    COMPRESSION_THUNDERSCAN	32809	/* ThunderScan RLE */
-/* codes 32895-32898 are reserved for ANSI IT8 TIFF/IT <dkelly at apago.com) */
-#define	    COMPRESSION_IT8CTPAD	32895   /* IT8 CT w/padding */
-#define	    COMPRESSION_IT8LW		32896   /* IT8 Linework RLE */
-#define	    COMPRESSION_IT8MP		32897   /* IT8 Monochrome picture */
-#define	    COMPRESSION_IT8BL		32898   /* IT8 Binary line art */
-/* compression codes 32908-32911 are reserved for Pixar */
-#define     COMPRESSION_PIXARFILM	32908   /* Pixar companded 10bit LZW */
-#define	    COMPRESSION_PIXARLOG	32909   /* Pixar companded 11bit ZIP */
-#define	    COMPRESSION_DEFLATE		32946	/* Deflate compression */
-#define     COMPRESSION_ADOBE_DEFLATE   8       /* Deflate compression, as recognized by Adobe */
-/* compression code 32947 is reserved for Oceana Matrix <dev at oceana.com> */
-#define     COMPRESSION_DCS             32947   /* Kodak DCS encoding */
-#define	    COMPRESSION_JBIG		34661	/* ISO JBIG */
-#define     COMPRESSION_SGILOG		34676	/* SGI Log Luminance RLE */
-#define     COMPRESSION_SGILOG24	34677	/* SGI Log 24-bit packed */
-#define     COMPRESSION_JP2000          34712   /* Leadtools JPEG2000 */
-#define	TIFFTAG_PHOTOMETRIC		262	/* photometric interpretation */
-#define	    PHOTOMETRIC_MINISWHITE	0	/* min value is white */
-#define	    PHOTOMETRIC_MINISBLACK	1	/* min value is black */
-#define	    PHOTOMETRIC_RGB		2	/* RGB color model */
-#define	    PHOTOMETRIC_PALETTE		3	/* color map indexed */
-#define	    PHOTOMETRIC_MASK		4	/* $holdout mask */
-#define	    PHOTOMETRIC_SEPARATED	5	/* !color separations */
-#define	    PHOTOMETRIC_YCBCR		6	/* !CCIR 601 */
-#define	    PHOTOMETRIC_CIELAB		8	/* !1976 CIE L*a*b* */
-#define	    PHOTOMETRIC_ICCLAB		9	/* ICC L*a*b* [Adobe TIFF Technote 4] */
-#define	    PHOTOMETRIC_ITULAB		10	/* ITU L*a*b* */
-#define     PHOTOMETRIC_LOGL		32844	/* CIE Log2(L) */
-#define     PHOTOMETRIC_LOGLUV		32845	/* CIE Log2(L) (u',v') */
-#define	TIFFTAG_THRESHHOLDING		263	/* +thresholding used on data */
-#define	    THRESHHOLD_BILEVEL		1	/* b&w art scan */
-#define	    THRESHHOLD_HALFTONE		2	/* or dithered scan */
-#define	    THRESHHOLD_ERRORDIFFUSE	3	/* usually floyd-steinberg */
-#define	TIFFTAG_CELLWIDTH		264	/* +dithering matrix width */
-#define	TIFFTAG_CELLLENGTH		265	/* +dithering matrix height */
-#define	TIFFTAG_FILLORDER		266	/* data order within a byte */
-#define	    FILLORDER_MSB2LSB		1	/* most significant -> least */
-#define	    FILLORDER_LSB2MSB		2	/* least significant -> most */
-#define	TIFFTAG_DOCUMENTNAME		269	/* name of doc. image is from */
-#define	TIFFTAG_IMAGEDESCRIPTION	270	/* info about image */
-#define	TIFFTAG_MAKE			271	/* scanner manufacturer name */
-#define	TIFFTAG_MODEL			272	/* scanner model name/number */
-#define	TIFFTAG_STRIPOFFSETS		273	/* offsets to data strips */
-#define	TIFFTAG_ORIENTATION		274	/* +image orientation */
-#define	    ORIENTATION_TOPLEFT		1	/* row 0 top, col 0 lhs */
-#define	    ORIENTATION_TOPRIGHT	2	/* row 0 top, col 0 rhs */
-#define	    ORIENTATION_BOTRIGHT	3	/* row 0 bottom, col 0 rhs */
-#define	    ORIENTATION_BOTLEFT		4	/* row 0 bottom, col 0 lhs */
-#define	    ORIENTATION_LEFTTOP		5	/* row 0 lhs, col 0 top */
-#define	    ORIENTATION_RIGHTTOP	6	/* row 0 rhs, col 0 top */
-#define	    ORIENTATION_RIGHTBOT	7	/* row 0 rhs, col 0 bottom */
-#define	    ORIENTATION_LEFTBOT		8	/* row 0 lhs, col 0 bottom */
-#define	TIFFTAG_SAMPLESPERPIXEL		277	/* samples per pixel */
-#define	TIFFTAG_ROWSPERSTRIP		278	/* rows per strip of data */
-#define	TIFFTAG_STRIPBYTECOUNTS		279	/* bytes counts for strips */
-#define	TIFFTAG_MINSAMPLEVALUE		280	/* +minimum sample value */
-#define	TIFFTAG_MAXSAMPLEVALUE		281	/* +maximum sample value */
-#define	TIFFTAG_XRESOLUTION		282	/* pixels/resolution in x */
-#define	TIFFTAG_YRESOLUTION		283	/* pixels/resolution in y */
-#define	TIFFTAG_PLANARCONFIG		284	/* storage organization */
-#define	    PLANARCONFIG_CONTIG		1	/* single image plane */
-#define	    PLANARCONFIG_SEPARATE	2	/* separate planes of data */
-#define	TIFFTAG_PAGENAME		285	/* page name image is from */
-#define	TIFFTAG_XPOSITION		286	/* x page offset of image lhs */
-#define	TIFFTAG_YPOSITION		287	/* y page offset of image lhs */
-#define	TIFFTAG_FREEOFFSETS		288	/* +byte offset to free block */
-#define	TIFFTAG_FREEBYTECOUNTS		289	/* +sizes of free blocks */
-#define	TIFFTAG_GRAYRESPONSEUNIT	290	/* $gray scale curve accuracy */
-#define	    GRAYRESPONSEUNIT_10S	1	/* tenths of a unit */
-#define	    GRAYRESPONSEUNIT_100S	2	/* hundredths of a unit */
-#define	    GRAYRESPONSEUNIT_1000S	3	/* thousandths of a unit */
-#define	    GRAYRESPONSEUNIT_10000S	4	/* ten-thousandths of a unit */
-#define	    GRAYRESPONSEUNIT_100000S	5	/* hundred-thousandths */
-#define	TIFFTAG_GRAYRESPONSECURVE	291	/* $gray scale response curve */
-#define	TIFFTAG_GROUP3OPTIONS		292	/* 32 flag bits */
-#define	TIFFTAG_T4OPTIONS		292	/* TIFF 6.0 proper name alias */
-#define	    GROUP3OPT_2DENCODING	0x1	/* 2-dimensional coding */
-#define	    GROUP3OPT_UNCOMPRESSED	0x2	/* data not compressed */
-#define	    GROUP3OPT_FILLBITS		0x4	/* fill to byte boundary */
-#define	TIFFTAG_GROUP4OPTIONS		293	/* 32 flag bits */
-#define TIFFTAG_T6OPTIONS               293     /* TIFF 6.0 proper name */
-#define	    GROUP4OPT_UNCOMPRESSED	0x2	/* data not compressed */
-#define	TIFFTAG_RESOLUTIONUNIT		296	/* units of resolutions */
-#define	    RESUNIT_NONE		1	/* no meaningful units */
-#define	    RESUNIT_INCH		2	/* english */
-#define	    RESUNIT_CENTIMETER		3	/* metric */
-#define	TIFFTAG_PAGENUMBER		297	/* page numbers of multi-page */
-#define	TIFFTAG_COLORRESPONSEUNIT	300	/* $color curve accuracy */
-#define	    COLORRESPONSEUNIT_10S	1	/* tenths of a unit */
-#define	    COLORRESPONSEUNIT_100S	2	/* hundredths of a unit */
-#define	    COLORRESPONSEUNIT_1000S	3	/* thousandths of a unit */
-#define	    COLORRESPONSEUNIT_10000S	4	/* ten-thousandths of a unit */
-#define	    COLORRESPONSEUNIT_100000S	5	/* hundred-thousandths */
-#define	TIFFTAG_TRANSFERFUNCTION	301	/* !colorimetry info */
-#define	TIFFTAG_SOFTWARE		305	/* name & release */
-#define	TIFFTAG_DATETIME		306	/* creation date and time */
-#define	TIFFTAG_ARTIST			315	/* creator of image */
-#define	TIFFTAG_HOSTCOMPUTER		316	/* machine where created */
-#define	TIFFTAG_PREDICTOR		317	/* prediction scheme w/ LZW */
-#define	TIFFTAG_WHITEPOINT		318	/* image white point */
-#define	TIFFTAG_PRIMARYCHROMATICITIES	319	/* !primary chromaticities */
-#define	TIFFTAG_COLORMAP		320	/* RGB map for pallette image */
-#define	TIFFTAG_HALFTONEHINTS		321	/* !highlight+shadow info */
-#define	TIFFTAG_TILEWIDTH		322	/* !rows/data tile */
-#define	TIFFTAG_TILELENGTH		323	/* !cols/data tile */
-#define TIFFTAG_TILEOFFSETS		324	/* !offsets to data tiles */
-#define TIFFTAG_TILEBYTECOUNTS		325	/* !byte counts for tiles */
-#define	TIFFTAG_BADFAXLINES		326	/* lines w/ wrong pixel count */
-#define	TIFFTAG_CLEANFAXDATA		327	/* regenerated line info */
-#define	    CLEANFAXDATA_CLEAN		0	/* no errors detected */
-#define	    CLEANFAXDATA_REGENERATED	1	/* receiver regenerated lines */
-#define	    CLEANFAXDATA_UNCLEAN	2	/* uncorrected errors exist */
-#define	TIFFTAG_CONSECUTIVEBADFAXLINES	328	/* max consecutive bad lines */
-#define	TIFFTAG_SUBIFD			330	/* subimage descriptors */
-#define	TIFFTAG_INKSET			332	/* !inks in separated image */
-#define	    INKSET_CMYK			1	/* !cyan-magenta-yellow-black color */
-#define	    INKSET_MULTIINK		2	/* !multi-ink or hi-fi color */
-#define	TIFFTAG_INKNAMES		333	/* !ascii names of inks */
-#define	TIFFTAG_NUMBEROFINKS		334	/* !number of inks */
-#define	TIFFTAG_DOTRANGE		336	/* !0% and 100% dot codes */
-#define	TIFFTAG_TARGETPRINTER		337	/* !separation target */
-#define	TIFFTAG_EXTRASAMPLES		338	/* !info about extra samples */
-#define	    EXTRASAMPLE_UNSPECIFIED	0	/* !unspecified data */
-#define	    EXTRASAMPLE_ASSOCALPHA	1	/* !associated alpha data */
-#define	    EXTRASAMPLE_UNASSALPHA	2	/* !unassociated alpha data */
-#define	TIFFTAG_SAMPLEFORMAT		339	/* !data sample format */
-#define	    SAMPLEFORMAT_UINT		1	/* !unsigned integer data */
-#define	    SAMPLEFORMAT_INT		2	/* !signed integer data */
-#define	    SAMPLEFORMAT_IEEEFP		3	/* !IEEE floating point data */
-#define	    SAMPLEFORMAT_VOID		4	/* !untyped data */
-#define	    SAMPLEFORMAT_COMPLEXINT	5	/* !complex signed int */
-#define	    SAMPLEFORMAT_COMPLEXIEEEFP	6	/* !complex ieee floating */
-#define	TIFFTAG_SMINSAMPLEVALUE		340	/* !variable MinSampleValue */
-#define	TIFFTAG_SMAXSAMPLEVALUE		341	/* !variable MaxSampleValue */
-#define	TIFFTAG_CLIPPATH		343	/* %ClipPath [Adobe TIFF technote 2] */
-#define	TIFFTAG_XCLIPPATHUNITS	344	/* %XClipPathUnits [Adobe TIFF technote 2] */
-#define	TIFFTAG_YCLIPPATHUNITS	344	/* %YClipPathUnits [Adobe TIFF technote 2] */
-#define	TIFFTAG_INDEXED			345	/* %Indexed [Adobe TIFF Technote 3] */
-#define	TIFFTAG_JPEGTABLES		347	/* %JPEG table stream */
-#define	TIFFTAG_OPIPROXY		351	/* %OPI Proxy [Adobe TIFF technote] */
-/*
- * Tags 512-521 are obsoleted by Technical Note #2
- * which specifies a revised JPEG-in-TIFF scheme.
- */
-#define	TIFFTAG_JPEGPROC		512	/* !JPEG processing algorithm */
-#define	    JPEGPROC_BASELINE		1	/* !baseline sequential */
-#define	    JPEGPROC_LOSSLESS		14	/* !Huffman coded lossless */
-#define	TIFFTAG_JPEGIFOFFSET		513	/* !pointer to SOI marker */
-#define	TIFFTAG_JPEGIFBYTECOUNT		514	/* !JFIF stream length */
-#define	TIFFTAG_JPEGRESTARTINTERVAL	515	/* !restart interval length */
-#define	TIFFTAG_JPEGLOSSLESSPREDICTORS	517	/* !lossless proc predictor */
-#define	TIFFTAG_JPEGPOINTTRANSFORM	518	/* !lossless point transform */
-#define	TIFFTAG_JPEGQTABLES		519	/* !Q matrice offsets */
-#define	TIFFTAG_JPEGDCTABLES		520	/* !DCT table offsets */
-#define	TIFFTAG_JPEGACTABLES		521	/* !AC coefficient offsets */
-#define	TIFFTAG_YCBCRCOEFFICIENTS	529	/* !RGB -> YCbCr transform */
-#define	TIFFTAG_YCBCRSUBSAMPLING	530	/* !YCbCr subsampling factors */
-#define	TIFFTAG_YCBCRPOSITIONING	531	/* !subsample positioning */
-#define	    YCBCRPOSITION_CENTERED	1	/* !as in PostScript Level 2 */
-#define	    YCBCRPOSITION_COSITED	2	/* !as in CCIR 601-1 */
-#define	TIFFTAG_REFERENCEBLACKWHITE	532	/* !colorimetry info */
-#define	TIFFTAG_XMLPACKET		700		/* %XML packet [Adobe XMP technote 9-14-02] (dkelly at apago.com) */
-#define TIFFTAG_OPIIMAGEID		32781	/* %OPI ImageID [Adobe TIFF technote] */
-/* tags 32952-32956 are private tags registered to Island Graphics */
-#define TIFFTAG_REFPTS			32953	/* image reference points */
-#define TIFFTAG_REGIONTACKPOINT		32954	/* region-xform tack point */
-#define TIFFTAG_REGIONWARPCORNERS	32955	/* warp quadrilateral */
-#define TIFFTAG_REGIONAFFINE		32956	/* affine transformation mat */
-/* tags 32995-32999 are private tags registered to SGI */
-#define	TIFFTAG_MATTEING		32995	/* $use ExtraSamples */
-#define	TIFFTAG_DATATYPE		32996	/* $use SampleFormat */
-#define	TIFFTAG_IMAGEDEPTH		32997	/* z depth of image */
-#define	TIFFTAG_TILEDEPTH		32998	/* z depth/data tile */
-/* tags 33300-33309 are private tags registered to Pixar */
-/*
- * TIFFTAG_PIXAR_IMAGEFULLWIDTH and TIFFTAG_PIXAR_IMAGEFULLLENGTH
- * are set when an image has been cropped out of a larger image.  
- * They reflect the size of the original uncropped image.
- * The TIFFTAG_XPOSITION and TIFFTAG_YPOSITION can be used
- * to determine the position of the smaller image in the larger one.
- */
-#define TIFFTAG_PIXAR_IMAGEFULLWIDTH    33300   /* full image size in x */
-#define TIFFTAG_PIXAR_IMAGEFULLLENGTH   33301   /* full image size in y */
- /* Tags 33302-33306 are used to identify special image modes and data
-  * used by Pixar's texture formats.
-  */
-#define TIFFTAG_PIXAR_TEXTUREFORMAT	33302	/* texture map format */
-#define TIFFTAG_PIXAR_WRAPMODES		33303	/* s & t wrap modes */
-#define TIFFTAG_PIXAR_FOVCOT		33304	/* cotan(fov) for env. maps */
-#define TIFFTAG_PIXAR_MATRIX_WORLDTOSCREEN 33305
-#define TIFFTAG_PIXAR_MATRIX_WORLDTOCAMERA 33306
-/* tag 33405 is a private tag registered to Eastman Kodak */
-#define TIFFTAG_WRITERSERIALNUMBER      33405   /* device serial number */
-/* tag 33432 is listed in the 6.0 spec w/ unknown ownership */
-#define	TIFFTAG_COPYRIGHT		33432	/* copyright string */
-/* IPTC TAG from RichTIFF specifications */
-#define TIFFTAG_RICHTIFFIPTC    33723
-/* 34016-34029 are reserved for ANSI IT8 TIFF/IT <dkelly at apago.com) */
-#define TIFFTAG_IT8SITE			34016	/* site name */
-#define TIFFTAG_IT8COLORSEQUENCE	34017	/* color seq. [RGB,CMYK,etc] */
-#define TIFFTAG_IT8HEADER		34018	/* DDES Header */
-#define TIFFTAG_IT8RASTERPADDING	34019	/* raster scanline padding */
-#define TIFFTAG_IT8BITSPERRUNLENGTH	34020	/* # of bits in short run */
-#define TIFFTAG_IT8BITSPEREXTENDEDRUNLENGTH 34021/* # of bits in long run */
-#define TIFFTAG_IT8COLORTABLE		34022	/* LW colortable */
-#define TIFFTAG_IT8IMAGECOLORINDICATOR	34023	/* BP/BL image color switch */
-#define TIFFTAG_IT8BKGCOLORINDICATOR	34024	/* BP/BL bg color switch */
-#define TIFFTAG_IT8IMAGECOLORVALUE	34025	/* BP/BL image color value */
-#define TIFFTAG_IT8BKGCOLORVALUE	34026	/* BP/BL bg color value */
-#define TIFFTAG_IT8PIXELINTENSITYRANGE	34027	/* MP pixel intensity value */
-#define TIFFTAG_IT8TRANSPARENCYINDICATOR 34028	/* HC transparency switch */
-#define TIFFTAG_IT8COLORCHARACTERIZATION 34029	/* color character. table */
-#define TIFFTAG_IT8HCUSAGE			34030	/* HC usage indicator */
-#define TIFFTAG_IT8TRAPINDICATOR	34031	/* Trapping indicator (untrapped=0, trapped=1) */
-#define TIFFTAG_IT8CMYKEQUIVALENT	34032	/* CMYK color equivalents */
-/* tags 34232-34236 are private tags registered to Texas Instruments */
-#define TIFFTAG_FRAMECOUNT              34232   /* Sequence Frame Count */
-/* tag 34750 is a private tag registered to Adobe? */
-#define TIFFTAG_ICCPROFILE		34675	/* ICC profile data */
-/* tag 34377 is private tag registered to Adobe for PhotoShop */
-#define TIFFTAG_PHOTOSHOP				34377 
-/* tag 34750 is a private tag registered to Pixel Magic */
-#define	TIFFTAG_JBIGOPTIONS		34750	/* JBIG options */
-/* tags 34908-34914 are private tags registered to SGI */
-#define	TIFFTAG_FAXRECVPARAMS		34908	/* encoded Class 2 ses. parms */
-#define	TIFFTAG_FAXSUBADDRESS		34909	/* received SubAddr string */
-#define	TIFFTAG_FAXRECVTIME		34910	/* receive time (secs) */
-/* tags 37439-37443 are registered to SGI <gregl at sgi.com> */
-#define TIFFTAG_STONITS			37439	/* Sample value to Nits */
-/* tag 34929 is a private tag registered to FedEx */
-#define	TIFFTAG_FEDEX_EDR		34929	/* unknown use */
-/* tag 65535 is an undefined tag used by Eastman Kodak */
-#define TIFFTAG_DCSHUESHIFTVALUES       65535   /* hue shift correction data */
-
-/*
- * The following are ``pseudo tags'' that can be
- * used to control codec-specific functionality.
- * These tags are not written to file.  Note that
- * these values start at 0xffff+1 so that they'll
- * never collide with Aldus-assigned tags.
- *
- * If you want your private pseudo tags ``registered''
- * (i.e. added to this file), send mail to sam at sgi.com
- * with the appropriate C definitions to add.
- */
-#define	TIFFTAG_FAXMODE			65536	/* Group 3/4 format control */
-#define	    FAXMODE_CLASSIC	0x0000		/* default, include RTC */
-#define	    FAXMODE_NORTC	0x0001		/* no RTC at end of data */
-#define	    FAXMODE_NOEOL	0x0002		/* no EOL code at end of row */
-#define	    FAXMODE_BYTEALIGN	0x0004		/* byte align row */
-#define	    FAXMODE_WORDALIGN	0x0008		/* word align row */
-#define	    FAXMODE_CLASSF	FAXMODE_NORTC	/* TIFF Class F */
-#define	TIFFTAG_JPEGQUALITY		65537	/* Compression quality level */
-/* Note: quality level is on the IJG 0-100 scale.  Default value is 75 */
-#define	TIFFTAG_JPEGCOLORMODE		65538	/* Auto RGB<=>YCbCr convert? */
-#define	    JPEGCOLORMODE_RAW	0x0000		/* no conversion (default) */
-#define	    JPEGCOLORMODE_RGB	0x0001		/* do auto conversion */
-#define	TIFFTAG_JPEGTABLESMODE		65539	/* What to put in JPEGTables */
-#define	    JPEGTABLESMODE_QUANT 0x0001		/* include quantization tbls */
-#define	    JPEGTABLESMODE_HUFF	0x0002		/* include Huffman tbls */
-/* Note: default is JPEGTABLESMODE_QUANT | JPEGTABLESMODE_HUFF */
-#define	TIFFTAG_FAXFILLFUNC		65540	/* G3/G4 fill function */
-#define	TIFFTAG_PIXARLOGDATAFMT		65549	/* PixarLogCodec I/O data sz */
-#define	    PIXARLOGDATAFMT_8BIT	0	/* regular u_char samples */
-#define	    PIXARLOGDATAFMT_8BITABGR	1	/* ABGR-order u_chars */
-#define	    PIXARLOGDATAFMT_11BITLOG	2	/* 11-bit log-encoded (raw) */
-#define	    PIXARLOGDATAFMT_12BITPICIO	3	/* as per PICIO (1.0==2048) */
-#define	    PIXARLOGDATAFMT_16BIT	4	/* signed short samples */
-#define	    PIXARLOGDATAFMT_FLOAT	5	/* IEEE float samples */
-/* 65550-65556 are allocated to Oceana Matrix <dev at oceana.com> */
-#define TIFFTAG_DCSIMAGERTYPE           65550   /* imager model & filter */
-#define     DCSIMAGERMODEL_M3           0       /* M3 chip (1280 x 1024) */
-#define     DCSIMAGERMODEL_M5           1       /* M5 chip (1536 x 1024) */
-#define     DCSIMAGERMODEL_M6           2       /* M6 chip (3072 x 2048) */
-#define     DCSIMAGERFILTER_IR          0       /* infrared filter */
-#define     DCSIMAGERFILTER_MONO        1       /* monochrome filter */
-#define     DCSIMAGERFILTER_CFA         2       /* color filter array */
-#define     DCSIMAGERFILTER_OTHER       3       /* other filter */
-#define TIFFTAG_DCSINTERPMODE           65551   /* interpolation mode */
-#define     DCSINTERPMODE_NORMAL        0x0     /* whole image, default */
-#define     DCSINTERPMODE_PREVIEW       0x1     /* preview of image (384x256) */
-#define TIFFTAG_DCSBALANCEARRAY         65552   /* color balance values */
-#define TIFFTAG_DCSCORRECTMATRIX        65553   /* color correction values */
-#define TIFFTAG_DCSGAMMA                65554   /* gamma value */
-#define TIFFTAG_DCSTOESHOULDERPTS       65555   /* toe & shoulder points */
-#define TIFFTAG_DCSCALIBRATIONFD        65556   /* calibration file desc */
-/* Note: quality level is on the ZLIB 1-9 scale. Default value is -1 */
-#define	TIFFTAG_ZIPQUALITY		65557	/* compression quality level */
-#define	TIFFTAG_PIXARLOGQUALITY		65558	/* PixarLog uses same scale */
-/* 65559 is allocated to Oceana Matrix <dev at oceana.com> */
-#define TIFFTAG_DCSCLIPRECTANGLE	65559	/* area of image to acquire */
-#define TIFFTAG_SGILOGDATAFMT		65560	/* SGILog user data format */
-#define     SGILOGDATAFMT_FLOAT		0	/* IEEE float samples */
-#define     SGILOGDATAFMT_16BIT		1	/* 16-bit samples */
-#define     SGILOGDATAFMT_RAW		2	/* uninterpreted data */
-#define     SGILOGDATAFMT_8BIT		3	/* 8-bit RGB monitor values */
-#define TIFFTAG_SGILOGENCODE		65561 /* SGILog data encoding control*/
-#define     SGILOGENCODE_NODITHER	0     /* do not dither encoded values*/
-#define     SGILOGENCODE_RANDITHER	1     /* randomly dither encd values */
-#endif /* _TIFF_ */
diff --git a/src/tiff/tiffcomp.h b/src/tiff/tiffcomp.h
deleted file mode 100644
index a8f80e8..0000000
--- a/src/tiff/tiffcomp.h
+++ /dev/null
@@ -1,220 +0,0 @@
-/* $Header: /home/terralib/src/tiff/tiffcomp.h,v 1.3 2004/03/19 11:51:25 lubia Exp $ */
-
-/*
- * Copyright (c) 1990-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#ifndef _COMPAT_
-#define	_COMPAT_
-/*
- * This file contains a hodgepodge of definitions and
- * declarations that are needed to provide compatibility
- * between the native system and the base implementation
- * that the library assumes.
- *
- * NB: This file is a mess.
- */
-
-/*
- * Setup basic type definitions and function declaratations.
- */
-
-/*
- * Simplify Acorn RISC OS identifier (to avoid confusion with Acorn RISC iX
- * and with defunct Unix Risc OS)
- * No need to specify __arm - hey, Acorn might port the OS, no problem here!
- */
-#ifdef __acornriscos
-#undef __acornriscos
-#endif
-#if defined(__acorn) && defined(__riscos)
-#define __acornriscos
-#endif
-
-#if defined(__MWERKS__) || defined(THINK_C)
-#include <unix.h>
-#include <math.h>
-#endif
-
-#include <stdio.h>
-
-#if defined(__PPCC__) || defined(__SC__) || defined(__MRC__)
-#include <types.h>
-#elif !defined(__MWERKS__) && !defined(THINK_C) && !defined(__acornriscos) && !defined(applec)
-#include <sys/types.h>
-#endif
-
-#if defined(VMS)
-#include <file.h>
-#include <unixio.h>
-#elif !defined(__acornriscos)
-#include <fcntl.h>
-#endif
-
-/*
- * This maze of checks controls defines or not the
- * target system has BSD-style typdedefs declared in
- * an include file and/or whether or not to include
- * <unistd.h> to get the SEEK_* definitions.  Some
- * additional includes are also done to pull in the
- * appropriate definitions we're looking for.
- */
-#if defined(__MWERKS__) || defined(THINK_C) || defined(__PPCC__) || defined(__SC__) || defined(__MRC__)
-#include <stdlib.h>
-#define	BSDTYPES
-#define	HAVE_UNISTD_H	0
-#elif (defined(_WINDOWS) || defined(__WIN32__) || defined(_Windows) || defined(_WIN32)) && !defined(unix)
-#define	BSDTYPES
-#elif defined(OS2_16) || defined(OS2_32)
-#define	BSDTYPES
-#elif defined(__acornriscos)
-#include <stdlib.h>
-#define	BSDTYPES
-#define	HAVE_UNISTD_H	0
-#elif defined(VMS)
-#define	HAVE_UNISTD_H	0
-#else
-#define	HAVE_UNISTD_H	1
-#endif
-
-/*
- * The library uses the ANSI C/POSIX SEEK_*
- * definitions that should be defined in unistd.h
- * (except on system where they are in stdio.h and
- * there is no unistd.h).
- */
-#if !defined(SEEK_SET) && HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-/*
- * The library uses memset, memcpy, and memcmp.
- * ANSI C and System V define these in string.h.
- */
-#include <string.h>
-
-/*
- * The BSD typedefs are used throughout the library.
- * If your system doesn't have them in <sys/types.h>,
- * then define BSDTYPES in your Makefile.
- */
-#if defined(BSDTYPES)
-# ifndef _BSDTYPES_DEFINED
-#  ifndef __u_char_defined
-typedef	unsigned char u_char;
-typedef	unsigned short u_short;
-typedef	unsigned int u_int;
-typedef	unsigned long u_long;
-#   define __u_char_defined
-#  endif /* __u_char_defined */
-#  define _BSDTYPES_DEFINED
-# endif /* _BSDTYPES_DEFINED */
-#endif /* BSDTYPES */
-
-/*
- * dblparam_t is the type that a double precision
- * floating point value will have on the parameter
- * stack (when coerced by the compiler).
- */
-/* Note: on MacPowerPC "extended" is undefined. So only use it for 68K-Macs */
-#if defined(__SC__) || defined(THINK_C)
-typedef extended dblparam_t;
-#else
-typedef double dblparam_t;
-#endif
-
-/*
- * If your compiler supports inline functions, then
- * set INLINE appropriately to get the known hotspots
- * in the library expanded inline.
- */
-#if defined(__GNUC__)
-#if defined(__STRICT_ANSI__)
-#define	INLINE	__inline__
-#else
-#define	INLINE	inline
-#endif
-#else /* !__GNUC__ */
-#define	INLINE
-#endif
-
-/*
- * GLOBALDATA is a macro that is used to define global variables
- * private to the library.  We use this indirection to hide
- * brain-damage in VAXC (and GCC) under VAX/VMS.  In these
- * environments the macro places the variable in a non-shareable
- * program section, which ought to be done by default (sigh!)
- *
- * Apparently DEC are aware of the problem as this behaviour is the
- * default under VMS on AXP.
- *
- * The GNU C variant is untested.
- */
-#if defined(VAX) && defined(VMS)
-#if defined(VAXC)
-#define GLOBALDATA(TYPE,NAME)	extern noshare TYPE NAME
-#endif
-#if defined(__GNUC__)
-#define GLOBALDATA(TYPE,NAME)	extern TYPE NAME \
-	asm("_$$PsectAttributes_NOSHR$$" #NAME)
-#endif
-#else	/* !VAX/VMS */
-#define GLOBALDATA(TYPE,NAME)	extern TYPE NAME
-#endif
-
-#if defined(__acornriscos)
-/*
- * osfcn.h is part of C++Lib on Acorn C/C++, and as such can't be used
- * on C alone. For that reason, the relevant functions are
- * implemented in tif_acorn.c, and the elements from the header
- * file are included here.
- */
-#if defined(__cplusplus)
-#include <osfcn.h>
-#else
-#define	O_RDONLY	0
-#define	O_WRONLY	1
-#define	O_RDWR		2
-#define	O_APPEND	8
-#define	O_CREAT		0x200
-#define	O_TRUNC		0x400
-typedef long off_t;
-extern int open(const char *name, int flags, int mode);
-extern int close(int fd);
-extern int write(int fd, const char *buf, int nbytes);
-extern int read(int fd, char *buf, int nbytes);
-extern off_t lseek(int fd, off_t offset, int whence);
-extern int creat(const char *path, int mode);
-#endif /* __cplusplus */
-#endif /* __acornriscos */
-
-/* Bit and byte order, the default is MSB to LSB */
-#ifdef VMS
-#undef HOST_FILLORDER
-#undef HOST_BIGENDIAN
-#define HOST_FILLORDER FILLORDER_LSB2MSB
-#define HOST_BIGENDIAN	0
-#endif
-
-
-#endif /* _COMPAT_ */
diff --git a/src/tiff/tiffconf.h b/src/tiff/tiffconf.h
deleted file mode 100644
index b2b3c93..0000000
--- a/src/tiff/tiffconf.h
+++ /dev/null
@@ -1,153 +0,0 @@
-/* $Header: /home/terralib/src/tiff/tiffconf.h,v 1.3 2004/03/19 11:51:25 lubia Exp $ */
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#ifndef _TIFFCONF_
-#define	_TIFFCONF_
-/*
- * Library Configuration Definitions.
- *
- * This file defines the default configuration for the library.
- * If the target system does not have make or a way to specify
- * #defines on the command line, this file can be edited to
- * configure the library.  Otherwise, one can override portability
- * and configuration-related definitions from a Makefile or command
- * line by defining COMPRESSION_SUPPORT (see below).
- */
-
-/*
- * General portability-related defines:
- *
- * HAVE_IEEEFP		define as 0 or 1 according to the floating point
- *			format suported by the machine
- * BSDTYPES		define this if your system does NOT define the
- *			usual 4BSD typedefs u_int et. al.
- * HAVE_MMAP		enable support for memory mapping read-only files;
- *			this is typically deduced by the configure script
- * HOST_FILLORDER	native cpu bit order: one of FILLORDER_MSB2LSB
- *			or FILLODER_LSB2MSB; this is typically set by the
- *			configure script
- * HOST_BIGENDIAN	native cpu byte order: 1 if big-endian (Motorola)
- *			or 0 if little-endian (Intel); this may be used
- *			in codecs to optimize code
- * USE_64BIT_API	set to 1 if tif_unix.c should use lseek64(),
- *                      fstat64() and stat64 allowing 2-4GB files.
- */
-#ifndef HAVE_IEEEFP
-#define	HAVE_IEEEFP	1
-#endif
-#ifndef HOST_FILLORDER
-#define	HOST_FILLORDER	FILLORDER_MSB2LSB
-#endif
-#ifndef	HOST_BIGENDIAN
-#define	HOST_BIGENDIAN	1
-#endif
-
-#ifndef USE_64BIT_API
-#  define USE_64BIT_API	0
-#endif
-
-#ifndef COMPRESSION_SUPPORT
-/*
- * Compression support defines:
- *
- *    CCITT_SUPPORT	enable support for CCITT Group 3 & 4 algorithms
- *    PACKBITS_SUPPORT	enable support for Macintosh PackBits algorithm
- *    LZW_SUPPORT	enable support for LZW algorithm
- *    THUNDER_SUPPORT	enable support for ThunderScan 4-bit RLE algorithm
- *    NEXT_SUPPORT	enable support for NeXT 2-bit RLE algorithm
- *    OJPEG_SUPPORT	enable support for 6.0-style JPEG DCT algorithms
- *			(requires IJG software)
- *    JPEG_SUPPORT	enable support for post-6.0-style JPEG DCT algorithms
- *			(requires freely available IJG software, see tif_jpeg.c)
- *    ZIP_SUPPORT	enable support for Deflate algorithm
- *			(requires freely available zlib software, see tif_zip.c)
- *    PIXARLOG_SUPPORT	enable support for Pixar log-format algorithm
- *    LOGLUV_SUPPORT	enable support for LogLuv high dynamic range encoding
- */
-#define	CCITT_SUPPORT
-#define	PACKBITS_SUPPORT
-#define	LZW_SUPPORT
-#define	THUNDER_SUPPORT
-#define	NEXT_SUPPORT
-#define LOGLUV_SUPPORT
-#endif /* COMPRESSION_SUPPORT */
-
-/*
- * If JPEG compression is enabled then we must also include
- * support for the colorimetry and YCbCr-related tags.
- */
-#ifdef JPEG_SUPPORT
-#ifndef YCBCR_SUPPORT
-#define	YCBCR_SUPPORT
-#endif
-#ifndef COLORIMETRY_SUPPORT
-#define	COLORIMETRY_SUPPORT
-#endif
-#endif /* JPEG_SUPPORT */
-
-/*
- * ``Orthogonal Features''
- *
- * STRIPCHOP_DEFAULT	default handling of strip chopping support (whether
- *			or not to convert single-strip uncompressed images
- *			to mutiple strips of ~8Kb--to reduce memory use)
- * SUBIFD_SUPPORT	enable support for SubIFD tag (thumbnails and such)
- * DEFAULT_EXTRASAMPLE_AS_ALPHA
- *                      The RGBA interface will treat a fourth sample with
- *                      no EXTRASAMPLE_ value as being ASSOCALPHA.  Many
- *                      packages produce RGBA files but don't mark the alpha
- *                      properly.
- * CHECK_JPEG_YCBCR_SUBSAMPLING
- *                      Enable picking up YCbCr subsampling info from the
- *                      JPEG data stream to support files lacking the tag.
- *                      See Bug 168 in Bugzilla, and JPEGFixupTestSubsampling()
- *                      for details. 
- */
-#ifndef STRIPCHOP_DEFAULT
-#define	STRIPCHOP_DEFAULT	TIFF_STRIPCHOP	/* default is to enable */
-#endif
-#ifndef SUBIFD_SUPPORT
-#define	SUBIFD_SUPPORT		1	/* enable SubIFD tag (330) support */
-#endif
-#ifndef DEFAULT_EXTRASAMPLE_AS_ALPHA
-#define DEFAULT_EXTRASAMPLE_AS_ALPHA 1
-#endif
-#ifndef CHECK_JPEG_YCBCR_SUBSAMPLING
-#define CHECK_JPEG_YCBCR_SUBSAMPLING 1
-#endif
-
-/*
- * Feature support definitions.
- * XXX: These macros are obsoleted. Don't use them in your apps!
- * Macros stays here for backward compatibility and should be always defined.
- */
-#define	COLORIMETRY_SUPPORT
-#define	YCBCR_SUPPORT
-#define	CMYK_SUPPORT
-#define	ICC_SUPPORT
-#define PHOTOSHOP_SUPPORT
-#define IPTC_SUPPORT
-
-#endif /* _TIFFCONF_ */
diff --git a/src/tiff/tiffio.h b/src/tiff/tiffio.h
deleted file mode 100644
index be79679..0000000
--- a/src/tiff/tiffio.h
+++ /dev/null
@@ -1,479 +0,0 @@
-/* $Header: /home/terralib/src/tiff/tiffio.h,v 1.4 2004/04/12 13:52:41 juan Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#ifndef _TIFFIO_
-#define	_TIFFIO_
-
-/*
- * TIFF I/O Library Definitions.
- */
-#include "tiff.h"
-#include "tiffvers.h"
-
-/*
- * TIFF is defined as an incomplete type to hide the
- * library's internal data structures from clients.
- */
-typedef	struct tiff TIFF;
-
-/*
- * The following typedefs define the intrinsic size of
- * data types used in the *exported* interfaces.  These
- * definitions depend on the proper definition of types
- * in tiff.h.  Note also that the varargs interface used
- * to pass tag types and values uses the types defined in
- * tiff.h directly.
- *
- * NB: ttag_t is unsigned int and not unsigned short because
- *     ANSI C requires that the type before the ellipsis be a
- *     promoted type (i.e. one of int, unsigned int, pointer,
- *     or double) and because we defined pseudo-tags that are
- *     outside the range of legal Aldus-assigned tags.
- * NB: tsize_t is int32 and not uint32 because some functions
- *     return -1.
- * NB: toff_t is not off_t for many reasons; TIFFs max out at
- *     32-bit file offsets being the most important, and to ensure
- *     that it is unsigned, rather than signed.
- */
-typedef	uint32 ttag_t;		/* directory tag */
-typedef	uint16 tdir_t;		/* directory index */
-typedef	uint16 tsample_t;	/* sample number */
-typedef	uint32 tstrip_t;	/* strip number */
-typedef uint32 ttile_t;		/* tile number */
-typedef	int32 tsize_t;		/* i/o size in bytes */
-typedef	void* tdata_t;		/* image data ref */
-typedef	uint32 toff_t;		/* file offset */
-
-#if !defined(__WIN32__) && (defined(_WIN32) || defined(WIN32))
-#define __WIN32__
-#endif
-
-/*
- * On windows you should define USE_WIN32_FILEIO if you are using tif_win32.c
- * or AVOID_WIN32_FILEIO if you are using something else (like tif_unix.c).
- *
- * By default tif_win32.c is assumed on windows if not using the cygwin
- * environment.
- */
-
-#if defined(_WINDOWS) || defined(__WIN32__) || defined(_Windows)
-#  if !defined(__CYGWIN) && !defined(AVOID_WIN32_FILEIO) && !defined(USE_WIN32_FILIO)
-#    define USE_WIN32_FILEIO
-#  endif
-#endif
-
-#if defined(USE_WIN32_FILEIO)
-#include <windows.h>
-#ifdef __WIN32__
-DECLARE_HANDLE(thandle_t);	/* Win32 file handle */
-#else
-typedef	HFILE thandle_t;	/* client data handle */
-#endif
-#else
-typedef	void* thandle_t;	/* client data handle */
-#endif
-
-#ifndef NULL
-#define	NULL	0
-#endif
-
-/*
- * Flags to pass to TIFFPrintDirectory to control
- * printing of data structures that are potentially
- * very large.   Bit-or these flags to enable printing
- * multiple items.
- */
-#define	TIFFPRINT_NONE		0x0		/* no extra info */
-#define	TIFFPRINT_STRIPS	0x1		/* strips/tiles info */
-#define	TIFFPRINT_CURVES	0x2		/* color/gray response curves */
-#define	TIFFPRINT_COLORMAP	0x4		/* colormap */
-#define	TIFFPRINT_JPEGQTABLES	0x100		/* JPEG Q matrices */
-#define	TIFFPRINT_JPEGACTABLES	0x200		/* JPEG AC tables */
-#define	TIFFPRINT_JPEGDCTABLES	0x200		/* JPEG DC tables */
-
-/* 
- * Colour conversion stuff
- */
-
-/* reference white */
-#define D65_X0 (95.0470F)
-#define D65_Y0 (100.0F)
-#define D65_Z0 (108.8827F)
-
-#define D50_X0 (96.4250F)
-#define D50_Y0 (100.0F)
-#define D50_Z0 (82.4680F)
-
-/* Structure for holding information about a display device. */
-
-typedef	unsigned char TIFFRGBValue;		/* 8-bit samples */
-
-typedef struct {
-	float d_mat[3][3]; 		/* XYZ -> luminance matrix */
-	float d_YCR;			/* Light o/p for reference white */
-	float d_YCG;
-	float d_YCB;
-	uint32 d_Vrwr;			/* Pixel values for ref. white */
-	uint32 d_Vrwg;
-	uint32 d_Vrwb;
-	float d_Y0R;			/* Residual light for black pixel */
-	float d_Y0G;
-	float d_Y0B;
-	float d_gammaR;			/* Gamma values for the three guns */
-	float d_gammaG;
-	float d_gammaB;
-} TIFFDisplay;
-
-typedef struct {				/* YCbCr->RGB support */
-	TIFFRGBValue* clamptab;			/* range clamping table */
-	int*	Cr_r_tab;
-	int*	Cb_b_tab;
-	int32*	Cr_g_tab;
-	int32*	Cb_g_tab;
-        int32*  Y_tab;
-} TIFFYCbCrToRGB;
-
-typedef struct {				/* CIE Lab 1976->RGB support */
-	int	range;				/* Size of conversion table */
-#define CIELABTORGB_TABLE_RANGE 1500
-	float	rstep, gstep, bstep;
-	float	X0, Y0, Z0;			/* Reference white point */
-	TIFFDisplay display;
-	float	Yr2r[CIELABTORGB_TABLE_RANGE + 1];  /* Conversion of Yr to r */
-	float	Yg2g[CIELABTORGB_TABLE_RANGE + 1];  /* Conversion of Yg to g */
-	float	Yb2b[CIELABTORGB_TABLE_RANGE + 1];  /* Conversion of Yb to b */
-} TIFFCIELabToRGB;
-
-extern int TIFFCIELabToRGBInit(TIFFCIELabToRGB*, TIFFDisplay *, float*);
-extern void TIFFCIELabToXYZ(TIFFCIELabToRGB *, uint32, int32, int32,
-			    float *, float *, float *);
-extern void TIFFXYZToRGB(TIFFCIELabToRGB *, float, float, float,
-			 uint32 *, uint32 *, uint32 *);
-
-extern int TIFFYCbCrToRGBInit(TIFFYCbCrToRGB*, float*, float*);
-extern void TIFFYCbCrtoRGB(TIFFYCbCrToRGB *, uint32, int32, int32,
-			   uint32 *, uint32 *, uint32 *);
-
-/*
- * RGBA-style image support.
- */
-typedef struct _TIFFRGBAImage TIFFRGBAImage;
-/*
- * The image reading and conversion routines invoke
- * ``put routines'' to copy/image/whatever tiles of
- * raw image data.  A default set of routines are 
- * provided to convert/copy raw image data to 8-bit
- * packed ABGR format rasters.  Applications can supply
- * alternate routines that unpack the data into a
- * different format or, for example, unpack the data
- * and draw the unpacked raster on the display.
- */
-typedef void (*tileContigRoutine)
-    (TIFFRGBAImage*, uint32*, uint32, uint32, uint32, uint32, int32, int32,
-	unsigned char*);
-typedef void (*tileSeparateRoutine)
-    (TIFFRGBAImage*, uint32*, uint32, uint32, uint32, uint32, int32, int32,
-	unsigned char*, unsigned char*, unsigned char*, unsigned char*);
-/*
- * RGBA-reader state.
- */
-struct _TIFFRGBAImage {
-	TIFF*	tif;				/* image handle */
-	int	stoponerr;			/* stop on read error */
-	int	isContig;			/* data is packed/separate */
-	int	alpha;				/* type of alpha data present */
-	uint32	width;				/* image width */
-	uint32	height;				/* image height */
-	uint16	bitspersample;			/* image bits/sample */
-	uint16	samplesperpixel;		/* image samples/pixel */
-	uint16	orientation;			/* image orientation */
-	uint16	req_orientation;		/* requested orientation */
-	uint16	photometric;			/* image photometric interp */
-	uint16*	redcmap;			/* colormap pallete */
-	uint16*	greencmap;
-	uint16*	bluecmap;
-						/* get image data routine */
-	int	(*get)(TIFFRGBAImage*, uint32*, uint32, uint32);
-	union {
-	    void (*any)(TIFFRGBAImage*);
-	    tileContigRoutine	contig;
-	    tileSeparateRoutine	separate;
-	} put;					/* put decoded strip/tile */
-	TIFFRGBValue* Map;			/* sample mapping array */
-	uint32** BWmap;				/* black&white map */
-	uint32** PALmap;			/* palette image map */
-	TIFFYCbCrToRGB* ycbcr;			/* YCbCr conversion state */
-        TIFFCIELabToRGB* cielab;		/* CIE L*a*b conversion state */
-
-        int	row_offset;
-        int     col_offset;
-};
-
-/*
- * Macros for extracting components from the
- * packed ABGR form returned by TIFFReadRGBAImage.
- */
-#define	TIFFGetR(abgr)	((abgr) & 0xff)
-#define	TIFFGetG(abgr)	(((abgr) >> 8) & 0xff)
-#define	TIFFGetB(abgr)	(((abgr) >> 16) & 0xff)
-#define	TIFFGetA(abgr)	(((abgr) >> 24) & 0xff)
-
-/*
- * A CODEC is a software package that implements decoding,
- * encoding, or decoding+encoding of a compression algorithm.
- * The library provides a collection of builtin codecs.
- * More codecs may be registered through calls to the library
- * and/or the builtin implementations may be overridden.
- */
-typedef	int (*TIFFInitMethod)(TIFF*, int);
-typedef struct {
-	char*		name;
-	uint16		scheme;
-	TIFFInitMethod	init;
-} TIFFCodec;
-
-#include <stdio.h>
-#include <stdarg.h>
-
-/* share internal LogLuv conversion routines? */
-#ifndef LOGLUV_PUBLIC
-#define LOGLUV_PUBLIC		1	
-#endif
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-typedef	void (*TIFFErrorHandler)(const char*, const char*, va_list);
-typedef	tsize_t (*TIFFReadWriteProc)(thandle_t, tdata_t, tsize_t);
-typedef	toff_t (*TIFFSeekProc)(thandle_t, toff_t, int);
-typedef	int (*TIFFCloseProc)(thandle_t);
-typedef	toff_t (*TIFFSizeProc)(thandle_t);
-typedef	int (*TIFFMapFileProc)(thandle_t, tdata_t*, toff_t*);
-typedef	void (*TIFFUnmapFileProc)(thandle_t, tdata_t, toff_t);
-typedef	void (*TIFFExtendProc)(TIFF*); 
-
-extern	const char* TIFFGetVersion(void);
-
-extern	const TIFFCodec* TIFFFindCODEC(uint16);
-extern	TIFFCodec* TIFFRegisterCODEC(uint16, const char*, TIFFInitMethod);
-extern	void TIFFUnRegisterCODEC(TIFFCodec*);
-extern  int TIFFIsCODECConfigured(uint16);
-
-extern	tdata_t _TIFFmalloc(tsize_t);
-extern	tdata_t _TIFFrealloc(tdata_t, tsize_t);
-extern	void _TIFFmemset(tdata_t, int, tsize_t);
-extern	void _TIFFmemcpy(tdata_t, const tdata_t, tsize_t);
-extern	int _TIFFmemcmp(const tdata_t, const tdata_t, tsize_t);
-extern	void _TIFFfree(tdata_t);
-
-extern	void TIFFClose(TIFF*);
-extern	int TIFFFlush(TIFF*);
-extern	int TIFFFlushData(TIFF*);
-extern	int TIFFGetField(TIFF*, ttag_t, ...);
-extern	int TIFFVGetField(TIFF*, ttag_t, va_list);
-extern	int TIFFGetFieldDefaulted(TIFF*, ttag_t, ...);
-extern	int TIFFVGetFieldDefaulted(TIFF*, ttag_t, va_list);
-extern	int TIFFReadDirectory(TIFF*);
-extern	tsize_t TIFFScanlineSize(TIFF*);
-extern	tsize_t TIFFRasterScanlineSize(TIFF*);
-extern	tsize_t TIFFStripSize(TIFF*);
-extern	tsize_t TIFFRawStripSize(TIFF*, tstrip_t);
-extern	tsize_t TIFFVStripSize(TIFF*, uint32);
-extern	tsize_t TIFFTileRowSize(TIFF*);
-extern	tsize_t TIFFTileSize(TIFF*);
-extern	tsize_t TIFFVTileSize(TIFF*, uint32);
-extern	uint32 TIFFDefaultStripSize(TIFF*, uint32);
-extern	void TIFFDefaultTileSize(TIFF*, uint32*, uint32*);
-extern	int TIFFFileno(TIFF*);
-extern	int TIFFGetMode(TIFF*);
-extern	int TIFFIsTiled(TIFF*);
-extern	int TIFFIsByteSwapped(TIFF*);
-extern	int TIFFIsUpSampled(TIFF*);
-extern	int TIFFIsMSB2LSB(TIFF*);
-extern	uint32 TIFFCurrentRow(TIFF*);
-extern	tdir_t TIFFCurrentDirectory(TIFF*);
-extern	tdir_t TIFFNumberOfDirectories(TIFF*);
-extern	uint32 TIFFCurrentDirOffset(TIFF*);
-extern	tstrip_t TIFFCurrentStrip(TIFF*);
-extern	ttile_t TIFFCurrentTile(TIFF*);
-extern	int TIFFReadBufferSetup(TIFF*, tdata_t, tsize_t);
-extern	int TIFFWriteBufferSetup(TIFF*, tdata_t, tsize_t);
-extern	int TIFFSetupStrips(TIFF *);
-extern  int TIFFWriteCheck(TIFF*, int, const char *);
-extern  int TIFFCreateDirectory(TIFF*);
-extern	int TIFFLastDirectory(TIFF*);
-extern	int TIFFSetDirectory(TIFF*, tdir_t);
-extern	int TIFFSetSubDirectory(TIFF*, uint32);
-extern	int TIFFUnlinkDirectory(TIFF*, tdir_t);
-extern	int TIFFSetField(TIFF*, ttag_t, ...);
-extern	int TIFFVSetField(TIFF*, ttag_t, va_list);
-extern	int TIFFWriteDirectory(TIFF *);
-extern	int TIFFCheckpointDirectory(TIFF *);
-extern	int TIFFRewriteDirectory(TIFF *);
-extern	int TIFFReassignTagToIgnore(enum TIFFIgnoreSense, int);
-
-#if defined(c_plusplus) || defined(__cplusplus)
-extern	void TIFFPrintDirectory(TIFF*, FILE*, long = 0);
-extern	int TIFFReadScanline(TIFF*, tdata_t, uint32, tsample_t = 0);
-extern	int TIFFWriteScanline(TIFF*, tdata_t, uint32, tsample_t = 0);
-extern	int TIFFReadRGBAImage(TIFF*, uint32, uint32, uint32*, int = 0);
-extern	int TIFFReadRGBAImageOriented(TIFF*, uint32, uint32, uint32*,
-				      int = ORIENTATION_BOTLEFT, int = 0);
-#else
-extern	void TIFFPrintDirectory(TIFF*, FILE*, long);
-extern	int TIFFReadScanline(TIFF*, tdata_t, uint32, tsample_t);
-extern	int TIFFWriteScanline(TIFF*, tdata_t, uint32, tsample_t);
-extern	int TIFFReadRGBAImage(TIFF*, uint32, uint32, uint32*, int);
-extern	int TIFFReadRGBAImageOriented(TIFF*, uint32, uint32, uint32*, int, int);
-#endif
-
-extern	int TIFFReadRGBAStrip(TIFF*, tstrip_t, uint32 * );
-extern	int TIFFReadRGBATile(TIFF*, uint32, uint32, uint32 * );
-extern	int TIFFRGBAImageOK(TIFF*, char [1024]);
-extern	int TIFFRGBAImageBegin(TIFFRGBAImage*, TIFF*, int, char [1024]);
-extern	int TIFFRGBAImageGet(TIFFRGBAImage*, uint32*, uint32, uint32);
-extern	void TIFFRGBAImageEnd(TIFFRGBAImage*);
-extern	TIFF* TIFFOpen(const char*, const char*);
-extern	TIFF* TIFFFdOpen(int, const char*, const char*);
-extern	TIFF* TIFFClientOpen(const char*, const char*,
-	    thandle_t,
-	    TIFFReadWriteProc, TIFFReadWriteProc,
-	    TIFFSeekProc, TIFFCloseProc,
-	    TIFFSizeProc,
-	    TIFFMapFileProc, TIFFUnmapFileProc);
-extern	const char* TIFFFileName(TIFF*);
-extern	void TIFFError(const char*, const char*, ...);
-extern	void TIFFWarning(const char*, const char*, ...);
-extern	TIFFErrorHandler TIFFSetErrorHandler(TIFFErrorHandler);
-extern	TIFFErrorHandler TIFFSetWarningHandler(TIFFErrorHandler);
-extern	TIFFExtendProc TIFFSetTagExtender(TIFFExtendProc);
-extern	ttile_t TIFFComputeTile(TIFF*, uint32, uint32, uint32, tsample_t);
-extern	int TIFFCheckTile(TIFF*, uint32, uint32, uint32, tsample_t);
-extern	ttile_t TIFFNumberOfTiles(TIFF*);
-extern	tsize_t TIFFReadTile(TIFF*,
-	    tdata_t, uint32, uint32, uint32, tsample_t);
-extern	tsize_t TIFFWriteTile(TIFF*,
-	    tdata_t, uint32, uint32, uint32, tsample_t);
-extern	tstrip_t TIFFComputeStrip(TIFF*, uint32, tsample_t);
-extern	tstrip_t TIFFNumberOfStrips(TIFF*);
-extern	tsize_t TIFFReadEncodedStrip(TIFF*, tstrip_t, tdata_t, tsize_t);
-extern	tsize_t TIFFReadRawStrip(TIFF*, tstrip_t, tdata_t, tsize_t);
-extern	tsize_t TIFFReadEncodedTile(TIFF*, ttile_t, tdata_t, tsize_t);
-extern	tsize_t TIFFReadRawTile(TIFF*, ttile_t, tdata_t, tsize_t);
-extern	tsize_t TIFFWriteEncodedStrip(TIFF*, tstrip_t, tdata_t, tsize_t);
-extern	tsize_t TIFFWriteRawStrip(TIFF*, tstrip_t, tdata_t, tsize_t);
-extern  tsize_t TIFFWriteStrip(TIFF*, tstrip_t, tdata_t, tsize_t);
-extern	tsize_t TIFFWriteEncodedTile(TIFF*, ttile_t, tdata_t, tsize_t);
-extern	tsize_t TIFFWriteRawTile(TIFF*, ttile_t, tdata_t, tsize_t);
-extern	int TIFFDataWidth(TIFFDataType);    /* table of tag datatype widths */
-extern	void TIFFSetWriteOffset(TIFF*, toff_t);
-extern	void TIFFSwabShort(uint16*);
-extern	void TIFFSwabLong(uint32*);
-extern	void TIFFSwabDouble(double*);
-extern	void TIFFSwabArrayOfShort(uint16*, unsigned long);
-extern	void TIFFSwabArrayOfLong(uint32*, unsigned long);
-extern	void TIFFSwabArrayOfDouble(double*, unsigned long);
-extern	void TIFFReverseBits(unsigned char *, unsigned long);
-extern	const unsigned char* TIFFGetBitRevTable(int);
-
-
-#ifdef LOGLUV_PUBLIC
-#define U_NEU		0.210526316
-#define V_NEU		0.473684211
-#define UVSCALE		410.
-extern	double LogL16toY(int);
-extern	double LogL10toY(int);
-extern	void XYZtoRGB24(float*, uint8*);
-extern	int uv_decode(double*, double*, int);
-extern	void LogLuv24toXYZ(uint32, float*);
-extern	void LogLuv32toXYZ(uint32, float*);
-#if defined(c_plusplus) || defined(__cplusplus)
-extern	int LogL16fromY(double, int = SGILOGENCODE_NODITHER);
-extern	int LogL10fromY(double, int = SGILOGENCODE_NODITHER);
-extern	int uv_encode(double, double, int = SGILOGENCODE_NODITHER);
-extern	uint32 LogLuv24fromXYZ(float*, int = SGILOGENCODE_NODITHER);
-extern	uint32 LogLuv32fromXYZ(float*, int = SGILOGENCODE_NODITHER);
-#else
-extern	int LogL16fromY(double, int);
-extern	int LogL10fromY(double, int);
-extern	int uv_encode(double, double, int);
-extern	uint32 LogLuv24fromXYZ(float*, int);
-extern	uint32 LogLuv32fromXYZ(float*, int);
-#endif
-#endif /* LOGLUV_PUBLIC */
-
-/*
-** New stuff going public in 3.6.x.
-*/
-extern  int  TIFFGetTagListCount( TIFF * );
-extern  ttag_t TIFFGetTagListEntry( TIFF *, int tag_index );
-    
-#define	TIFF_ANY	TIFF_NOTYPE	/* for field descriptor searching */
-#define	TIFF_VARIABLE	-1		/* marker for variable length tags */
-#define	TIFF_SPP	-2		/* marker for SamplesPerPixel tags */
-#define	TIFF_VARIABLE2	-3		/* marker for uint32 var-length tags */
-
-#define FIELD_CUSTOM    65    
-
-typedef	struct {
-	ttag_t	field_tag;		/* field's tag */
-	short	field_readcount;	/* read count/TIFF_VARIABLE/TIFF_SPP */
-	short	field_writecount;	/* write count/TIFF_VARIABLE */
-	TIFFDataType field_type;	/* type of associated data */
-        unsigned short field_bit;	/* bit in fieldsset bit vector */
-	unsigned char field_oktochange;	/* if true, can change while writing */
-	unsigned char field_passcount;	/* if true, pass dir count on set */
-	char	*field_name;		/* ASCII name */
-} TIFFFieldInfo;
-
-typedef struct _TIFFTagValue {
-    const TIFFFieldInfo  *info;
-    int             count;
-    void           *value;
-} TIFFTagValue;
-
-extern	void TIFFMergeFieldInfo(TIFF*, const TIFFFieldInfo[], int);
-extern	const TIFFFieldInfo* TIFFFindFieldInfo(TIFF*, ttag_t, TIFFDataType);
-extern	const TIFFFieldInfo* TIFFFieldWithTag(TIFF*, ttag_t);
-
-typedef	int (*TIFFVSetMethod)(TIFF*, ttag_t, va_list);
-typedef	int (*TIFFVGetMethod)(TIFF*, ttag_t, va_list);
-typedef	void (*TIFFPrintMethod)(TIFF*, FILE*, long);
-    
-typedef struct {
-    TIFFVSetMethod	vsetfield;	/* tag set routine */
-    TIFFVGetMethod	vgetfield;	/* tag get routine */
-    TIFFPrintMethod	printdir;	/* directory print routine */
-} TIFFTagMethods;
-        
-extern  TIFFTagMethods *TIFFAccessTagMethods( TIFF * );
-extern  void *TIFFGetClientInfo( TIFF *, const char * );
-extern  void TIFFSetClientInfo( TIFF *, void *, const char * );
-    
-#if defined(__cplusplus)
-}
-#endif
-#endif /* _TIFFIO_ */
diff --git a/src/tiff/tiffiop.h b/src/tiff/tiffiop.h
deleted file mode 100644
index b36cbeb..0000000
--- a/src/tiff/tiffiop.h
+++ /dev/null
@@ -1,289 +0,0 @@
-/* $Header: /home/terralib/src/tiff/tiffiop.h,v 1.3 2004/03/19 11:51:25 lubia Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 Silicon Graphics, Inc.
- *
- * Permission to use, copy, modify, distribute, and sell this software and 
- * its documentation for any purpose is hereby granted without fee, provided
- * that (i) the above copyright notices and this permission notice appear in
- * all copies of the software and related documentation, and (ii) the names of
- * Sam Leffler and Silicon Graphics may not be used in any advertising or
- * publicity relating to the software without the specific, prior written
- * permission of Sam Leffler and Silicon Graphics.
- * 
- * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
- * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
- * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
- * 
- * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
- * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
- * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
- * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
- * OF THIS SOFTWARE.
- */
-
-#ifndef _TIFFIOP_
-#define	_TIFFIOP_
-/*
- * ``Library-private'' definitions.
- */
-/*
- * UNIX systems should run the configure script to generate
- * a port.h file that reflects the system capabilities.
- * Doing this obviates all the dreck done in tiffcomp.h.
- */
-#if defined(unix) || defined(__unix)
-#include "port.h"
-#include "tiffconf.h"
-#else
-#include "tiffconf.h"
-#include "tiffcomp.h"
-#endif
-#include "tiffio.h"
-#include "tif_dir.h"
-
-#ifndef TRUE
-#define	TRUE	1
-#define	FALSE	0
-#endif
-
-typedef struct client_info {
-    struct client_info *next;
-    void      *data;
-    char      *name;
-} TIFFClientInfoLink;
-
-/*
- * Typedefs for ``method pointers'' used internally.
- */
-typedef	unsigned char tidataval_t;	/* internal image data value type */
-typedef	tidataval_t* tidata_t;		/* reference to internal image data */
-
-typedef	void (*TIFFVoidMethod)(TIFF*);
-typedef	int (*TIFFBoolMethod)(TIFF*);
-typedef	int (*TIFFPreMethod)(TIFF*, tsample_t);
-typedef	int (*TIFFCodeMethod)(TIFF*, tidata_t, tsize_t, tsample_t);
-typedef	int (*TIFFSeekMethod)(TIFF*, uint32);
-typedef	void (*TIFFPostMethod)(TIFF*, tidata_t, tsize_t);
-typedef	uint32 (*TIFFStripMethod)(TIFF*, uint32);
-typedef	void (*TIFFTileMethod)(TIFF*, uint32*, uint32*);
-
-struct tiff {
-	char*		tif_name;	/* name of open file */
-	int		tif_fd;		/* open file descriptor */
-	int		tif_mode;	/* open mode (O_*) */
-	uint32		tif_flags;
-#define	TIFF_FILLORDER		0x0003	/* natural bit fill order for machine */
-#define	TIFF_DIRTYHEADER	0x0004	/* header must be written on close */
-#define	TIFF_DIRTYDIRECT	0x0008	/* current directory must be written */
-#define	TIFF_BUFFERSETUP	0x0010	/* data buffers setup */
-#define	TIFF_CODERSETUP		0x0020	/* encoder/decoder setup done */
-#define	TIFF_BEENWRITING	0x0040	/* written 1+ scanlines to file */
-#define	TIFF_SWAB			0x0080	/* byte swap file information */
-#define	TIFF_NOBITREV		0x0100	/* inhibit bit reversal logic */
-#define	TIFF_MYBUFFER		0x0200	/* my raw data buffer; free on close */
-#define	TIFF_ISTILED		0x0400	/* file is tile, not strip- based */
-#define	TIFF_MAPPED			0x0800	/* file is mapped into memory */
-#define	TIFF_POSTENCODE		0x1000	/* need call to postencode routine */
-#define	TIFF_INSUBIFD		0x2000	/* currently writing a subifd */
-#define	TIFF_UPSAMPLED		0x4000	/* library is doing data up-sampling */ 
-#define	TIFF_STRIPCHOP		0x8000	/* enable strip chopping support */
-	toff_t		tif_diroff;	/* file offset of current directory */
-	toff_t		tif_nextdiroff;	/* file offset of following directory */
-	toff_t*		tif_dirlist;	/* list of offsets to already seen */
-					/* directories to prevent IFD looping */
-	uint16		tif_dirnumber;  /* number of already seen directories */
-	TIFFDirectory	tif_dir;	/* internal rep of current directory */
-	TIFFHeader	tif_header;	/* file's header block */
-	const int*	tif_typeshift;	/* data type shift counts */
-	const long*	tif_typemask;	/* data type masks */
-	uint32		tif_row;	/* current scanline */
-	tdir_t		tif_curdir;	/* current directory (index) */
-	tstrip_t	tif_curstrip;	/* current strip for read/write */
-	toff_t		tif_curoff;	/* current offset for read/write */
-	toff_t		tif_dataoff;	/* current offset for writing dir */
-#if SUBIFD_SUPPORT
-	uint16		tif_nsubifd;	/* remaining subifds to write */
-	toff_t		tif_subifdoff;	/* offset for patching SubIFD link */
-#endif
-/* tiling support */
-	uint32 		tif_col;	/* current column (offset by row too) */
-	ttile_t		tif_curtile;	/* current tile for read/write */
-	tsize_t		tif_tilesize;	/* # of bytes in a tile */
-/* compression scheme hooks */
-	int		tif_decodestatus;
-	TIFFBoolMethod	tif_setupdecode;/* called once before predecode */
-	TIFFPreMethod	tif_predecode;	/* pre- row/strip/tile decoding */
-	TIFFBoolMethod	tif_setupencode;/* called once before preencode */
-	int		tif_encodestatus;
-	TIFFPreMethod	tif_preencode;	/* pre- row/strip/tile encoding */
-	TIFFBoolMethod	tif_postencode;	/* post- row/strip/tile encoding */
-	TIFFCodeMethod	tif_decoderow;	/* scanline decoding routine */
-	TIFFCodeMethod	tif_encoderow;	/* scanline encoding routine */
-	TIFFCodeMethod	tif_decodestrip;/* strip decoding routine */
-	TIFFCodeMethod	tif_encodestrip;/* strip encoding routine */
-	TIFFCodeMethod	tif_decodetile;	/* tile decoding routine */
-	TIFFCodeMethod	tif_encodetile;	/* tile encoding routine */
-	TIFFVoidMethod	tif_close;	/* cleanup-on-close routine */
-	TIFFSeekMethod	tif_seek;	/* position within a strip routine */
-	TIFFVoidMethod	tif_cleanup;	/* cleanup state routine */
-	TIFFStripMethod	tif_defstripsize;/* calculate/constrain strip size */
-	TIFFTileMethod	tif_deftilesize;/* calculate/constrain tile size */
-	tidata_t	tif_data;	/* compression scheme private data */
-/* input/output buffering */
-	tsize_t		tif_scanlinesize;/* # of bytes in a scanline */
-	tsize_t		tif_scanlineskew;/* scanline skew for reading strips */
-	tidata_t	tif_rawdata;	/* raw data buffer */
-	tsize_t		tif_rawdatasize;/* # of bytes in raw data buffer */
-	tidata_t	tif_rawcp;	/* current spot in raw buffer */
-	tsize_t		tif_rawcc;	/* bytes unread from raw buffer */
-
-/* memory-mapped file support */
-	tidata_t	tif_base;	/* base of mapped file */
-	toff_t		tif_size;	/* size of mapped file region (bytes) */
-	TIFFMapFileProc	tif_mapproc;	/* map file method */
-	TIFFUnmapFileProc tif_unmapproc;/* unmap file method */
-/* input/output callback methods */
-	thandle_t	tif_clientdata;	/* callback parameter */
-	TIFFReadWriteProc tif_readproc;	/* read method */
-	TIFFReadWriteProc tif_writeproc;/* write method */
-	TIFFSeekProc	tif_seekproc;	/* lseek method */
-	TIFFCloseProc	tif_closeproc;	/* close method */
-	TIFFSizeProc	tif_sizeproc;	/* filesize method */
-/* post-decoding support */
-	TIFFPostMethod	tif_postdecode;	/* post decoding routine */
-/* tag support */
-	TIFFFieldInfo**	tif_fieldinfo;	/* sorted table of registered tags */
-	int		tif_nfields;	/* # entries in registered tag table */
-        TIFFTagMethods  tif_tagmethods; /* tag get/set/print routines */
-        TIFFClientInfoLink *tif_clientinfo; /* extra client information. */
-};
-
-#define	isPseudoTag(t)	(t > 0xffff)	/* is tag value normal or pseudo */
-
-#define	isTiled(tif)	(((tif)->tif_flags & TIFF_ISTILED) != 0)
-#define	isMapped(tif)	(((tif)->tif_flags & TIFF_MAPPED) != 0)
-#define	isFillOrder(tif, o)	(((tif)->tif_flags & (o)) != 0)
-#define	isUpSampled(tif)	(((tif)->tif_flags & TIFF_UPSAMPLED) != 0)
-#define	TIFFReadFile(tif, buf, size) \
-	((*(tif)->tif_readproc)((tif)->tif_clientdata,buf,size))
-#define	TIFFWriteFile(tif, buf, size) \
-	((*(tif)->tif_writeproc)((tif)->tif_clientdata,buf,size))
-#define	TIFFSeekFile(tif, off, whence) \
-	((*(tif)->tif_seekproc)((tif)->tif_clientdata,(toff_t)(off),whence))
-#define	TIFFCloseFile(tif) \
-	((*(tif)->tif_closeproc)((tif)->tif_clientdata))
-#define	TIFFGetFileSize(tif) \
-	((*(tif)->tif_sizeproc)((tif)->tif_clientdata))
-#define	TIFFMapFileContents(tif, paddr, psize) \
-	((*(tif)->tif_mapproc)((tif)->tif_clientdata,paddr,psize))
-#define	TIFFUnmapFileContents(tif, addr, size) \
-	((*(tif)->tif_unmapproc)((tif)->tif_clientdata,addr,size))
-
-/*
- * Default Read/Seek/Write definitions.
- */
-#ifndef ReadOK
-#define	ReadOK(tif, buf, size) \
-	(TIFFReadFile(tif, (tdata_t) buf, (tsize_t)(size)) == (tsize_t)(size))
-#endif
-#ifndef SeekOK
-#define	SeekOK(tif, off) \
-	(TIFFSeekFile(tif, (toff_t) off, SEEK_SET) == (toff_t) off)
-#endif
-#ifndef WriteOK
-#define	WriteOK(tif, buf, size) \
-	(TIFFWriteFile(tif, (tdata_t) buf, (tsize_t) size) == (tsize_t) size)
-#endif
-
-/* NB: the uint32 casts are to silence certain ANSI-C compilers */
-#define	TIFFhowmany(x, y) ((((uint32)(x))+(((uint32)(y))-1))/((uint32)(y)))
-#define	TIFFroundup(x, y) (TIFFhowmany(x,y)*((uint32)(y)))
-
-#define TIFFmax(A,B) ((A)>(B)?(A):(B))
-#define TIFFmin(A,B) ((A)<(B)?(A):(B))
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-extern	int _TIFFgetMode(const char*, const char*);
-extern	int _TIFFNoRowEncode(TIFF*, tidata_t, tsize_t, tsample_t);
-extern	int _TIFFNoStripEncode(TIFF*, tidata_t, tsize_t, tsample_t);
-extern	int _TIFFNoTileEncode(TIFF*, tidata_t, tsize_t, tsample_t);
-extern	int _TIFFNoRowDecode(TIFF*, tidata_t, tsize_t, tsample_t);
-extern	int _TIFFNoStripDecode(TIFF*, tidata_t, tsize_t, tsample_t);
-extern	int _TIFFNoTileDecode(TIFF*, tidata_t, tsize_t, tsample_t);
-extern	void _TIFFNoPostDecode(TIFF*, tidata_t, tsize_t);
-extern  int  _TIFFNoPreCode (TIFF*, tsample_t); 
-extern	int _TIFFNoSeek(TIFF*, uint32);
-extern	void _TIFFSwab16BitData(TIFF*, tidata_t, tsize_t);
-extern	void _TIFFSwab32BitData(TIFF*, tidata_t, tsize_t);
-extern	void _TIFFSwab64BitData(TIFF*, tidata_t, tsize_t);
-extern	int TIFFFlushData1(TIFF*);
-extern	void TIFFFreeDirectory(TIFF*);
-extern	int TIFFDefaultDirectory(TIFF*);
-extern	int TIFFSetCompressionScheme(TIFF*, int);
-extern	int TIFFSetDefaultCompressionState(TIFF*);
-extern	uint32 _TIFFDefaultStripSize(TIFF*, uint32);
-extern	void _TIFFDefaultTileSize(TIFF*, uint32*, uint32*);
-
-extern	void _TIFFsetByteArray(void**, void*, long);
-extern	void _TIFFsetString(char**, char*);
-extern	void _TIFFsetShortArray(uint16**, uint16*, long);
-extern	void _TIFFsetLongArray(uint32**, uint32*, long);
-extern	void _TIFFsetFloatArray(float**, float*, long);
-extern	void _TIFFsetDoubleArray(double**, double*, long);
-
-extern	void _TIFFprintAscii(FILE*, const char*);
-extern	void _TIFFprintAsciiTag(FILE*, const char*, const char*);
-
-GLOBALDATA(TIFFErrorHandler,_TIFFwarningHandler);
-GLOBALDATA(TIFFErrorHandler,_TIFFerrorHandler);
-
-extern	int TIFFInitDumpMode(TIFF*, int);
-#ifdef PACKBITS_SUPPORT
-extern	int TIFFInitPackBits(TIFF*, int);
-#endif
-#ifdef CCITT_SUPPORT
-extern	int TIFFInitCCITTRLE(TIFF*, int), TIFFInitCCITTRLEW(TIFF*, int);
-extern	int TIFFInitCCITTFax3(TIFF*, int), TIFFInitCCITTFax4(TIFF*, int);
-#endif
-#ifdef THUNDER_SUPPORT
-extern	int TIFFInitThunderScan(TIFF*, int);
-#endif
-#ifdef NEXT_SUPPORT
-extern	int TIFFInitNeXT(TIFF*, int);
-#endif
-#ifdef LZW_SUPPORT
-extern	int TIFFInitLZW(TIFF*, int);
-#endif
-#ifdef OJPEG_SUPPORT
-extern	int TIFFInitOJPEG(TIFF*, int);
-#endif
-#ifdef JPEG_SUPPORT
-extern	int TIFFInitJPEG(TIFF*, int);
-#endif
-#ifdef JBIG_SUPPORT
-extern	int TIFFInitJBIG(TIFF*, int);
-#endif
-#ifdef ZIP_SUPPORT
-extern	int TIFFInitZIP(TIFF*, int);
-#endif
-#ifdef PIXARLOG_SUPPORT
-extern	int TIFFInitPixarLog(TIFF*, int);
-#endif
-#ifdef LOGLUV_SUPPORT
-extern	int TIFFInitSGILog(TIFF*, int);
-#endif
-#ifdef VMS
-extern	const TIFFCodec _TIFFBuiltinCODECS[];
-#else
-extern	TIFFCodec _TIFFBuiltinCODECS[];
-#endif
-
-#if defined(__cplusplus)
-}
-#endif
-#endif /* _TIFFIOP_ */
diff --git a/src/tiff/tiffvers.h b/src/tiff/tiffvers.h
deleted file mode 100644
index 3d24f9a..0000000
--- a/src/tiff/tiffvers.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#define TIFFLIB_VERSION_STR "LIBTIFF, Version 3.6.1\nCopyright (c) 1988-1996 Sam Leffler\nCopyright (c) 1991-1996 Silicon Graphics, Inc."
-/*
- * This define can be used in code that requires
- * compilation-related definitions specific to a
- * version or versions of the library.  Runtime
- * version checking should be done based on the
- * string returned by TIFFGetVersion.
- */
-#define TIFFLIB_VERSION 20031226
diff --git a/src/tiff/uvcode.h b/src/tiff/uvcode.h
deleted file mode 100644
index 8d96e44..0000000
--- a/src/tiff/uvcode.h
+++ /dev/null
@@ -1,173 +0,0 @@
-/* Version 1.0 generated April 7, 1997 by Greg Ward Larson, SGI */
-#define UV_SQSIZ	(float)0.003500
-#define UV_NDIVS	16289
-#define UV_VSTART	(float)0.016940
-#define UV_NVS		163
-static struct {
-	float	ustart;
-	short	nus, ncum;
-}	uv_row[UV_NVS] = {
-	(float)0.247663,	4,	0,
-	(float)0.243779,	6,	4,
-	(float)0.241684,	7,	10,
-	(float)0.237874,	9,	17,
-	(float)0.235906,	10,	26,
-	(float)0.232153,	12,	36,
-	(float)0.228352,	14,	48,
-	(float)0.226259,	15,	62,
-	(float)0.222371,	17,	77,
-	(float)0.220410,	18,	94,
-	(float)0.214710,	21,	112,
-	(float)0.212714,	22,	133,
-	(float)0.210721,	23,	155,
-	(float)0.204976,	26,	178,
-	(float)0.202986,	27,	204,
-	(float)0.199245,	29,	231,
-	(float)0.195525,	31,	260,
-	(float)0.193560,	32,	291,
-	(float)0.189878,	34,	323,
-	(float)0.186216,	36,	357,
-	(float)0.186216,	36,	393,
-	(float)0.182592,	38,	429,
-	(float)0.179003,	40,	467,
-	(float)0.175466,	42,	507,
-	(float)0.172001,	44,	549,
-	(float)0.172001,	44,	593,
-	(float)0.168612,	46,	637,
-	(float)0.168612,	46,	683,
-	(float)0.163575,	49,	729,
-	(float)0.158642,	52,	778,
-	(float)0.158642,	52,	830,
-	(float)0.158642,	52,	882,
-	(float)0.153815,	55,	934,
-	(float)0.153815,	55,	989,
-	(float)0.149097,	58,	1044,
-	(float)0.149097,	58,	1102,
-	(float)0.142746,	62,	1160,
-	(float)0.142746,	62,	1222,
-	(float)0.142746,	62,	1284,
-	(float)0.138270,	65,	1346,
-	(float)0.138270,	65,	1411,
-	(float)0.138270,	65,	1476,
-	(float)0.132166,	69,	1541,
-	(float)0.132166,	69,	1610,
-	(float)0.126204,	73,	1679,
-	(float)0.126204,	73,	1752,
-	(float)0.126204,	73,	1825,
-	(float)0.120381,	77,	1898,
-	(float)0.120381,	77,	1975,
-	(float)0.120381,	77,	2052,
-	(float)0.120381,	77,	2129,
-	(float)0.112962,	82,	2206,
-	(float)0.112962,	82,	2288,
-	(float)0.112962,	82,	2370,
-	(float)0.107450,	86,	2452,
-	(float)0.107450,	86,	2538,
-	(float)0.107450,	86,	2624,
-	(float)0.107450,	86,	2710,
-	(float)0.100343,	91,	2796,
-	(float)0.100343,	91,	2887,
-	(float)0.100343,	91,	2978,
-	(float)0.095126,	95,	3069,
-	(float)0.095126,	95,	3164,
-	(float)0.095126,	95,	3259,
-	(float)0.095126,	95,	3354,
-	(float)0.088276,	100,	3449,
-	(float)0.088276,	100,	3549,
-	(float)0.088276,	100,	3649,
-	(float)0.088276,	100,	3749,
-	(float)0.081523,	105,	3849,
-	(float)0.081523,	105,	3954,
-	(float)0.081523,	105,	4059,
-	(float)0.081523,	105,	4164,
-	(float)0.074861,	110,	4269,
-	(float)0.074861,	110,	4379,
-	(float)0.074861,	110,	4489,
-	(float)0.074861,	110,	4599,
-	(float)0.068290,	115,	4709,
-	(float)0.068290,	115,	4824,
-	(float)0.068290,	115,	4939,
-	(float)0.068290,	115,	5054,
-	(float)0.063573,	119,	5169,
-	(float)0.063573,	119,	5288,
-	(float)0.063573,	119,	5407,
-	(float)0.063573,	119,	5526,
-	(float)0.057219,	124,	5645,
-	(float)0.057219,	124,	5769,
-	(float)0.057219,	124,	5893,
-	(float)0.057219,	124,	6017,
-	(float)0.050985,	129,	6141,
-	(float)0.050985,	129,	6270,
-	(float)0.050985,	129,	6399,
-	(float)0.050985,	129,	6528,
-	(float)0.050985,	129,	6657,
-	(float)0.044859,	134,	6786,
-	(float)0.044859,	134,	6920,
-	(float)0.044859,	134,	7054,
-	(float)0.044859,	134,	7188,
-	(float)0.040571,	138,	7322,
-	(float)0.040571,	138,	7460,
-	(float)0.040571,	138,	7598,
-	(float)0.040571,	138,	7736,
-	(float)0.036339,	142,	7874,
-	(float)0.036339,	142,	8016,
-	(float)0.036339,	142,	8158,
-	(float)0.036339,	142,	8300,
-	(float)0.032139,	146,	8442,
-	(float)0.032139,	146,	8588,
-	(float)0.032139,	146,	8734,
-	(float)0.032139,	146,	8880,
-	(float)0.027947,	150,	9026,
-	(float)0.027947,	150,	9176,
-	(float)0.027947,	150,	9326,
-	(float)0.023739,	154,	9476,
-	(float)0.023739,	154,	9630,
-	(float)0.023739,	154,	9784,
-	(float)0.023739,	154,	9938,
-	(float)0.019504,	158,	10092,
-	(float)0.019504,	158,	10250,
-	(float)0.019504,	158,	10408,
-	(float)0.016976,	161,	10566,
-	(float)0.016976,	161,	10727,
-	(float)0.016976,	161,	10888,
-	(float)0.016976,	161,	11049,
-	(float)0.012639,	165,	11210,
-	(float)0.012639,	165,	11375,
-	(float)0.012639,	165,	11540,
-	(float)0.009991,	168,	11705,
-	(float)0.009991,	168,	11873,
-	(float)0.009991,	168,	12041,
-	(float)0.009016,	170,	12209,
-	(float)0.009016,	170,	12379,
-	(float)0.009016,	170,	12549,
-	(float)0.006217,	173,	12719,
-	(float)0.006217,	173,	12892,
-	(float)0.005097,	175,	13065,
-	(float)0.005097,	175,	13240,
-	(float)0.005097,	175,	13415,
-	(float)0.003909,	177,	13590,
-	(float)0.003909,	177,	13767,
-	(float)0.002340,	177,	13944,
-	(float)0.002389,	170,	14121,
-	(float)0.001068,	164,	14291,
-	(float)0.001653,	157,	14455,
-	(float)0.000717,	150,	14612,
-	(float)0.001614,	143,	14762,
-	(float)0.000270,	136,	14905,
-	(float)0.000484,	129,	15041,
-	(float)0.001103,	123,	15170,
-	(float)0.001242,	115,	15293,
-	(float)0.001188,	109,	15408,
-	(float)0.001011,	103,	15517,
-	(float)0.000709,	97,	15620,
-	(float)0.000301,	89,	15717,
-	(float)0.002416,	82,	15806,
-	(float)0.003251,	76,	15888,
-	(float)0.003246,	69,	15964,
-	(float)0.004141,	62,	16033,
-	(float)0.005963,	55,	16095,
-	(float)0.008839,	47,	16150,
-	(float)0.010490,	40,	16197,
-	(float)0.016994,	31,	16237,
-	(float)0.023659,	21,	16268,
-};
diff --git a/src/tiff/version.h b/src/tiff/version.h
deleted file mode 100644
index 49f72b0..0000000
--- a/src/tiff/version.h
+++ /dev/null
@@ -1 +0,0 @@
-#define VERSION "LIBTIFF, Version 3.4beta024\nCopyright (c) 1988-1995 Sam Leffler\nCopyright (c) 1991-1995 Silicon Graphics, Inc."
diff --git a/src/tiff/xtiff.c b/src/tiff/xtiff.c
deleted file mode 100644
index d15031e..0000000
--- a/src/tiff/xtiff.c
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
- * xtiff.c
- *
- * Extended TIFF Directory GEO Tag Support.
- *
- *  You may use this file as a template to add your own
- *  extended tags to the library. Only the parts of the code
- *  marked with "XXX" require modification.
- *
- *  Author: Niles D. Ritter
- *
- *  Revisions:
- *    18 Sep 1995   -- Deprecated Integraph Matrix tag with new one.
- *                     Backward compatible support provided.  --NDR.
- */
- 
-#include "xtiffio.h"
-#include <stdio.h>
-
-/*  Tiff info structure.
- *
- *     Entry format:
- *        { TAGNUMBER, ReadCount, WriteCount, DataType, FIELDNUM, 
- *          OkToChange, PassDirCountOnSet, AsciiName }
- *
- *     For ReadCount, WriteCount, -1 = unknown.
- */
-
-static const TIFFFieldInfo xtiffFieldInfo[] = {
-  
-  /* XXX Insert Your tags here */
-    { TIFFTAG_GEOPIXELSCALE,	-1,-1, TIFF_DOUBLE,	FIELD_CUSTOM,
-      TRUE,	TRUE,	"GeoPixelScale" },
-    { TIFFTAG_INTERGRAPH_MATRIX,-1,-1, TIFF_DOUBLE,	FIELD_CUSTOM,
-      TRUE,	TRUE,	"Intergraph TransformationMatrix" },
-    { TIFFTAG_GEOTRANSMATRIX,	-1,-1, TIFF_DOUBLE,	FIELD_CUSTOM,
-      TRUE,	TRUE,	"GeoTransformationMatrix" },
-    { TIFFTAG_GEOTIEPOINTS,	-1,-1, TIFF_DOUBLE,	FIELD_CUSTOM,
-      TRUE,	TRUE,	"GeoTiePoints" },
-    { TIFFTAG_GEOKEYDIRECTORY,-1,-1, TIFF_SHORT,	FIELD_CUSTOM,
-      TRUE,	TRUE,	"GeoKeyDirectory" },
-    { TIFFTAG_GEODOUBLEPARAMS,	-1,-1, TIFF_DOUBLE,	FIELD_CUSTOM,
-      TRUE,	TRUE,	"GeoDoubleParams" },
-    { TIFFTAG_GEOASCIIPARAMS,	-1,-1, TIFF_ASCII,	FIELD_CUSTOM,
-      TRUE,	FALSE,	"GeoASCIIParams" },
-#ifdef JPL_TAG_SUPPORT
-    { TIFFTAG_JPL_CARTO_IFD,	 1, 1, TIFF_LONG,	FIELD_CUSTOM,
-      TRUE,	TRUE,	"JPL Carto IFD offset" },  /** Don't use this! **/
-#endif
-};
-
-#define	N(a)	(sizeof (a) / sizeof (a[0]))
-static void _XTIFFLocalDefaultDirectory(TIFF *tif)
-{
-    /* Install the extended Tag field info */
-    TIFFMergeFieldInfo(tif, xtiffFieldInfo, N(xtiffFieldInfo));
-}
-
-
-/**********************************************************************
- *    Nothing below this line should need to be changed.
- **********************************************************************/
-
-static TIFFExtendProc _ParentExtender;
-
-/*
- *  This is the callback procedure, and is
- *  called by the DefaultDirectory method
- *  every time a new TIFF directory is opened.
- */
-
-static void
-_XTIFFDefaultDirectory(TIFF *tif)
-{
-    /* set up our own defaults */
-    _XTIFFLocalDefaultDirectory(tif);
-
-    /* Since an XTIFF client module may have overridden
-     * the default directory method, we call it now to
-     * allow it to set up the rest of its own methods.
-     */
-
-    if (_ParentExtender) 
-        (*_ParentExtender)(tif);
-}
-
-/*
- *  XTIFF Initializer -- sets up the callback
- *   procedure for the TIFF module.
- */
-
-static
-void _XTIFFInitialize(void)
-{
-    static int first_time=1;
-	
-    if (! first_time) return; /* Been there. Done that. */
-    first_time = 0;
-	
-    /* Grab the inherited method and install */
-    _ParentExtender = TIFFSetTagExtender(_XTIFFDefaultDirectory);
-}
-
-
-/**
- * GeoTIFF compatible TIFF file open function.
- *
- * @param name The filename of a TIFF file to open.
- * @param mode The open mode ("r", "w" or "a").
- *
- * @return a TIFF * for the file, or NULL if the open failed.
- *
-This function is used to open GeoTIFF files instead of TIFFOpen() from
-libtiff.  Internally it calls TIFFOpen(), but sets up some extra hooks
-so that GeoTIFF tags can be extracted from the file.  If XTIFFOpen() isn't
-used, GTIFNew() won't work properly.  Files opened
-with XTIFFOpen() should be closed with XTIFFClose().
-
-The name of the file to be opened should be passed as <b>name</b>, and an
-opening mode ("r", "w" or "a") acceptable to TIFFOpen() should be passed as the
-<b>mode</b>.<p>
-
-If XTIFFOpen() fails it will return NULL.  Otherwise, normal TIFFOpen()
-error reporting steps will have already taken place.<p>
- */
-
-TIFF*
-XTIFFOpen(const char* name, const char* mode)
-{
-    TIFF *tif;
-
-    /* Set up the callback */
-    _XTIFFInitialize();	
-	
-    /* Open the file; the callback will set everything up
-     */
-    tif = TIFFOpen(name, mode);
-    if (!tif) return tif;
-	
-    return tif;
-}
-
-TIFF*
-XTIFFFdOpen(int fd, const char* name, const char* mode)
-{
-    TIFF *tif;
-
-    /* Set up the callback */
-    _XTIFFInitialize();	
-
-    /* Open the file; the callback will set everything up
-     */
-    tif = TIFFFdOpen(fd, name, mode);
-    if (!tif) return tif;
-	
-    return tif;
-}
-
-TIFF*
-XTIFFClientOpen(const char* name, const char* mode, thandle_t thehandle,
-	    TIFFReadWriteProc RWProc, TIFFReadWriteProc RWProc2,
-	    TIFFSeekProc SProc, TIFFCloseProc CProc,
-	    TIFFSizeProc SzProc,
-	    TIFFMapFileProc MFProvc, TIFFUnmapFileProc UMFProc )
-{
-    TIFF *tif;
-    
-    /* Set up the callback */
-    _XTIFFInitialize();	
-    
-    /* Open the file; the callback will set everything up
-     */
-    tif = TIFFClientOpen(name, mode, thehandle,
-                         RWProc, RWProc2,
-                         SProc, CProc,
-                         SzProc,
-                         MFProvc, UMFProc);
-    
-    if (!tif) return tif;
-    
-    return tif;
-}
-
-/**
- * Close a file opened with XTIFFOpen().
- *
- * @param tif The file handle returned by XTIFFOpen().
- * 
- * If a GTIF structure was created with GTIFNew()
- * for this file, it should be freed with GTIFFree()
- * <i>before</i> calling XTIFFClose().
-*/
-
-void
-XTIFFClose(TIFF *tif)
-{
-    TIFFClose(tif);
-}
diff --git a/src/tiff/xtiffio.h b/src/tiff/xtiffio.h
deleted file mode 100644
index c4f10e8..0000000
--- a/src/tiff/xtiffio.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- *  xtiffio.h -- Public interface to Extended GEO TIFF tags
- *
- *    written by: Niles D. Ritter
- */
-
-#ifndef __xtiffio_h
-#define __xtiffio_h
-
-#include "cpl_serv.h"
-#include "tiffio.h"
-
-/**
- * \file xtiffio.h
- *
- * Definitions relating GeoTIFF functions from geotiff.h to the TIFF
- * library (usually libtiff).
- */
-
-/* 
- *  Define public Tag names and values here 
- */
-
-/* tags 33550 is a private tag registered to SoftDesk, Inc */
-#define TIFFTAG_GEOPIXELSCALE       33550
-/* tags 33920-33921 are private tags registered to Intergraph, Inc */
-#define TIFFTAG_INTERGRAPH_MATRIX    33920   /* $use TIFFTAG_GEOTRANSMATRIX ! */
-#define TIFFTAG_GEOTIEPOINTS         33922
-/* tags 34263-34264 are private tags registered to NASA-JPL Carto Group */
-#ifdef JPL_TAG_SUPPORT
-#define TIFFTAG_JPL_CARTO_IFD        34263    /* $use GeoProjectionInfo ! */
-#endif
-#define TIFFTAG_GEOTRANSMATRIX       34264    /* New Matrix Tag replaces 33920 */
-/* tags 34735-3438 are private tags registered to SPOT Image, Inc */
-#define TIFFTAG_GEOKEYDIRECTORY      34735
-#define TIFFTAG_GEODOUBLEPARAMS      34736
-#define TIFFTAG_GEOASCIIPARAMS       34737
-
-/* 
- *  Define Printing method flags. These
- *  flags may be passed in to TIFFPrintDirectory() to
- *  indicate that those particular field values should
- *  be printed out in full, rather than just an indicator
- *  of whether they are present or not.
- */
-#define	TIFFPRINT_GEOKEYDIRECTORY	0x80000000
-#define	TIFFPRINT_GEOKEYPARAMS		0x40000000
-
-/**********************************************************************
- *    Nothing below this line should need to be changed by the user.
- **********************************************************************/
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-
-extern TIFF CPL_DLL * XTIFFOpen(const char* name, const char* mode);
-extern TIFF CPL_DLL * XTIFFFdOpen(int fd, const char* name, const char* mode);
-extern void CPL_DLL XTIFFClose(TIFF *tif);
-
-extern TIFF CPL_DLL * XTIFFClientOpen(const char* name, const char* mode, 
-                                      thandle_t thehandle,
-                                      TIFFReadWriteProc, TIFFReadWriteProc,
-                                      TIFFSeekProc, TIFFCloseProc,
-                                      TIFFSizeProc,
-                                      TIFFMapFileProc, TIFFUnmapFileProc);
-#if defined(__cplusplus)
-}
-#endif
-
-#endif /* __xtiffio_h */
-
diff --git a/src/tiff/xtiffiop.h b/src/tiff/xtiffiop.h
deleted file mode 100644
index e3b3134..0000000
--- a/src/tiff/xtiffiop.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Private Extended TIFF library interface.
- *
- *  uses private LIBTIFF interface.
- *
- *  written by: Niles D. Ritter
- *
- *  Revisions:
- *    18 Sep 1995   -- Deprecated Integraph Matrix tag with new one.
- *                     Backward compatible support provided.  --NDR.
- *
- */
-
-#ifndef __xtiffiop_h
-#define __xtiffiop_h
-
-#include "tiffiop.h"
-#include "xtiffio.h"
-
-/**********************************************************************
- *               User Configuration
- **********************************************************************/
-
-/* Define number of extended tags here */
-#define NUM_XFIELD 8
-#define XFIELD_BASE (FIELD_LAST-NUM_XFIELD)
-
-/*  Define Fields here  */
-#define	FIELD_GEOPIXELSCALE     (XFIELD_BASE+0)
-#define	FIELD_INTERGRAPH_MATRIX (XFIELD_BASE+1)
-#define	FIELD_GEOTRANSMATRIX    (XFIELD_BASE+2)
-#define	FIELD_GEOTIEPOINTS      (XFIELD_BASE+3)
-#define	FIELD_GEOASCIIPARAMS    (XFIELD_BASE+4)
-#define	FIELD_GEOKEYDIRECTORY   (XFIELD_BASE+5)
-#define	FIELD_GEODOUBLEPARAMS   (XFIELD_BASE+6)
-#ifdef JPL_TAG_SUPPORT
-#define	FIELD_JPL_CARTO_IFD     (XFIELD_BASE+7)   /* unsupported */
-#endif
-
-/* Used for GEO tags having variable counts */
-typedef enum {
-	GEO_NUM_DIR=0,
-	GEO_NUM_DOUBLE,
-	GEO_NUM_TIEPOINT,
-	GEO_NUM_PIXELSCALE,
-	GEO_NUM_MATRIX,
-	GEO_NUM_IG_MATRIX,
-	GEO_NUM_TAGS
-} geo_count_t;
-
-/* Define Private directory structure here */
-struct XTIFFDirectory {
-	uint16	 xd_geodimensions[GEO_NUM_TAGS]; /* dir-count for the geo tags */
-	uint16*  xd_geokeydirectory;
-	double*  xd_geodoubleparams;
-	char*    xd_geoasciiparams;
-	double*  xd_geotiepoints;
-	double*  xd_geopixelscale;
-	double*  xd_geomatrix;
-	double*  xd_intergraph_matrix;
-#ifdef JPL_TAG_SUPPORT
-	uint32   xd_jpl_ifd_offset; /* dont use */
-#endif
-};
-typedef struct XTIFFDirectory XTIFFDirectory;
-
-/**********************************************************************
- *    Nothing below this line should need to be changed by the user.
- **********************************************************************/
-
-struct xtiff {
-	TIFF 		*xtif_tif;	/* parent TIFF pointer */
-	uint32		xtif_flags;
-#define       XTIFFP_PRINT   0x00000001
-	XTIFFDirectory	xtif_dir;	/* internal rep of current directory */
-	TIFFVSetMethod	xtif_vsetfield;	/* inherited tag set routine */
-	TIFFVGetMethod	xtif_vgetfield;	/* inherited tag get routine */
-	TIFFPrintMethod	xtif_printdir;  /* inherited dir print method */
-};
-typedef struct xtiff xtiff;
-
-
-#define PARENT(xt,pmember) ((xt)->xtif_ ## pmember) 
-#define TIFFMEMBER(tf,pmember) ((tf)->tif_ ## pmember) 
-#define XTIFFDIR(tif) ((xtiff *)TIFFMEMBER(tif,clientdir))
-	
-/* Extended TIFF flags */
-#define XTIFF_INITIALIZED 0x80000000
-	
-#endif /* __xtiffiop_h */
diff --git a/src/zlib/ChangeLog b/src/zlib/ChangeLog
deleted file mode 100644
index 8012afc..0000000
--- a/src/zlib/ChangeLog
+++ /dev/null
@@ -1,471 +0,0 @@
-
-		ChangeLog file for zlib
-
-Changes in 1.1.3 (9 July 1998)
-- fix "an inflate input buffer bug that shows up on rare but persistent
-  occasions" (Mark)
-- fix gzread and gztell for concatenated .gz files (Didier Le Botlan)
-- fix gzseek(..., SEEK_SET) in write mode
-- fix crc check after a gzeek (Frank Faubert)
-- fix miniunzip when the last entry in a zip file is itself a zip file
-  (J Lillge)
-- add contrib/asm586 and contrib/asm686 (Brian Raiter)
-  See http://www.muppetlabs.com/~breadbox/software/assembly.html
-- add support for Delphi 3 in contrib/delphi (Bob Dellaca)
-- add support for C++Builder 3 and Delphi 3 in contrib/delphi2 (Davide Moretti)
-- do not exit prematurely in untgz if 0 at start of block (Magnus Holmgren)
-- use macro EXTERN instead of extern to support DLL for BeOS (Sander Stoks)
-- added a FAQ file
-
-- Support gzdopen on Mac with Metrowerks (Jason Linhart)
-- Do not redefine Byte on Mac (Brad Pettit & Jason Linhart)
-- define SEEK_END too if SEEK_SET is not defined (Albert Chin-A-Young)
-- avoid some warnings with Borland C (Tom Tanner)
-- fix a problem in contrib/minizip/zip.c for 16-bit MSDOS (Gilles Vollant)
-- emulate utime() for WIN32 in contrib/untgz  (Gilles Vollant)
-- allow several arguments to configure (Tim Mooney, Frodo Looijaard)
-- use libdir and includedir in Makefile.in (Tim Mooney)
-- support shared libraries on OSF1 V4 (Tim Mooney)
-- remove so_locations in "make clean"  (Tim Mooney)
-- fix maketree.c compilation error (Glenn, Mark)
-- Python interface to zlib now in Python 1.5 (Jeremy Hylton)
-- new Makefile.riscos (Rich Walker)
-- initialize static descriptors in trees.c for embedded targets (Nick Smith)
-- use "foo-gz" in example.c for RISCOS and VMS (Nick Smith)
-- add the OS/2 files in Makefile.in too (Andrew Zabolotny)
-- fix fdopen and halloc macros for Microsoft C 6.0 (Tom Lane)
-- fix maketree.c to allow clean compilation of inffixed.h (Mark)
-- fix parameter check in deflateCopy (Gunther Nikl)
-- cleanup trees.c, use compressed_len only in debug mode (Christian Spieler)
-- Many portability patches by Christian Spieler:
-  . zutil.c, zutil.h: added "const" for zmem*
-  . Make_vms.com: fixed some typos
-  . Make_vms.com: msdos/Makefile.*: removed zutil.h from some dependency lists
-  . msdos/Makefile.msc: remove "default rtl link library" info from obj files
-  . msdos/Makefile.*: use model-dependent name for the built zlib library
-  . msdos/Makefile.emx, nt/Makefile.emx, nt/Makefile.gcc:
-     new makefiles, for emx (DOS/OS2), emx&rsxnt and mingw32 (Windows 9x / NT)
-- use define instead of typedef for Bytef also for MSC small/medium (Tom Lane)
-- replace __far with _far for better portability (Christian Spieler, Tom Lane)
-- fix test for errno.h in configure (Tim Newsham)
-
-Changes in 1.1.2 (19 March 98)
-- added contrib/minzip, mini zip and unzip based on zlib (Gilles Vollant)
-  See http://www.winimage.com/zLibDll/unzip.html
-- preinitialize the inflate tables for fixed codes, to make the code
-  completely thread safe (Mark)
-- some simplifications and slight speed-up to the inflate code (Mark)
-- fix gzeof on non-compressed files (Allan Schrum)
-- add -std1 option in configure for OSF1 to fix gzprintf (Martin Mokrejs)
-- use default value of 4K for Z_BUFSIZE for 16-bit MSDOS (Tim Wegner + Glenn)
-- added os2/Makefile.def and os2/zlib.def (Andrew Zabolotny)
-- add shared lib support for UNIX_SV4.2MP (MATSUURA Takanori)
-- do not wrap extern "C" around system includes (Tom Lane)
-- mention zlib binding for TCL in README (Andreas Kupries)
-- added amiga/Makefile.pup for Amiga powerUP SAS/C PPC (Andreas Kleinert)
-- allow "make install prefix=..." even after configure (Glenn Randers-Pehrson)
-- allow "configure --prefix $HOME" (Tim Mooney)
-- remove warnings in example.c and gzio.c (Glenn Randers-Pehrson)
-- move Makefile.sas to amiga/Makefile.sas
-
-Changes in 1.1.1 (27 Feb 98)
-- fix macros _tr_tally_* in deflate.h for debug mode  (Glenn Randers-Pehrson)
-- remove block truncation heuristic which had very marginal effect for zlib
-  (smaller lit_bufsize than in gzip 1.2.4) and degraded a little the
-  compression ratio on some files. This also allows inlining _tr_tally for
-  matches in deflate_slow.
-- added msdos/Makefile.w32 for WIN32 Microsoft Visual C++ (Bob Frazier)
-
-Changes in 1.1.0 (24 Feb 98)
-- do not return STREAM_END prematurely in inflate (John Bowler)
-- revert to the zlib 1.0.8 inflate to avoid the gcc 2.8.0 bug (Jeremy Buhler)
-- compile with -DFASTEST to get compression code optimized for speed only
-- in minigzip, try mmap'ing the input file first (Miguel Albrecht)
-- increase size of I/O buffers in minigzip.c and gzio.c (not a big gain
-  on Sun but significant on HP)
-
-- add a pointer to experimental unzip library in README (Gilles Vollant)
-- initialize variable gcc in configure (Chris Herborth)
-
-Changes in 1.0.9 (17 Feb 1998)
-- added gzputs and gzgets functions
-- do not clear eof flag in gzseek (Mark Diekhans)
-- fix gzseek for files in transparent mode (Mark Diekhans)
-- do not assume that vsprintf returns the number of bytes written (Jens Krinke)
-- replace EXPORT with ZEXPORT to avoid conflict with other programs
-- added compress2 in zconf.h, zlib.def, zlib.dnt
-- new asm code from Gilles Vollant in contrib/asm386
-- simplify the inflate code (Mark):
- . Replace ZALLOC's in huft_build() with single ZALLOC in inflate_blocks_new()
- . ZALLOC the length list in inflate_trees_fixed() instead of using stack
- . ZALLOC the value area for huft_build() instead of using stack
- . Simplify Z_FINISH check in inflate()
-
-- Avoid gcc 2.8.0 comparison bug a little differently than zlib 1.0.8
-- in inftrees.c, avoid cc -O bug on HP (Farshid Elahi)
-- in zconf.h move the ZLIB_DLL stuff earlier to avoid problems with
-  the declaration of FAR (Gilles VOllant)
-- install libz.so* with mode 755 (executable) instead of 644 (Marc Lehmann)
-- read_buf buf parameter of type Bytef* instead of charf*
-- zmemcpy parameters are of type Bytef*, not charf* (Joseph Strout)
-- do not redeclare unlink in minigzip.c for WIN32 (John Bowler)
-- fix check for presence of directories in "make install" (Ian Willis)
-
-Changes in 1.0.8 (27 Jan 1998)
-- fixed offsets in contrib/asm386/gvmat32.asm (Gilles Vollant)
-- fix gzgetc and gzputc for big endian systems (Markus Oberhumer)
-- added compress2() to allow setting the compression level
-- include sys/types.h to get off_t on some systems (Marc Lehmann & QingLong)
-- use constant arrays for the static trees in trees.c instead of computing
-  them at run time (thanks to Ken Raeburn for this suggestion). To create
-  trees.h, compile with GEN_TREES_H and run "make test".
-- check return code of example in "make test" and display result
-- pass minigzip command line options to file_compress
-- simplifying code of inflateSync to avoid gcc 2.8 bug
-
-- support CC="gcc -Wall" in configure -s (QingLong)
-- avoid a flush caused by ftell in gzopen for write mode (Ken Raeburn)
-- fix test for shared library support to avoid compiler warnings
-- zlib.lib -> zlib.dll in msdos/zlib.rc (Gilles Vollant)
-- check for TARGET_OS_MAC in addition to MACOS (Brad Pettit)
-- do not use fdopen for Metrowerks on Mac (Brad Pettit))
-- add checks for gzputc and gzputc in example.c
-- avoid warnings in gzio.c and deflate.c (Andreas Kleinert)
-- use const for the CRC table (Ken Raeburn)
-- fixed "make uninstall" for shared libraries
-- use Tracev instead of Trace in infblock.c
-- in example.c use correct compressed length for test_sync
-- suppress +vnocompatwarnings in configure for HPUX (not always supported)
-
-Changes in 1.0.7 (20 Jan 1998)
-- fix gzseek which was broken in write mode
-- return error for gzseek to negative absolute position
-- fix configure for Linux (Chun-Chung Chen)
-- increase stack space for MSC (Tim Wegner)
-- get_crc_table and inflateSyncPoint are EXPORTed (Gilles Vollant)
-- define EXPORTVA for gzprintf (Gilles Vollant)
-- added man page zlib.3 (Rick Rodgers)
-- for contrib/untgz, fix makedir() and improve Makefile
-
-- check gzseek in write mode in example.c
-- allocate extra buffer for seeks only if gzseek is actually called
-- avoid signed/unsigned comparisons (Tim Wegner, Gilles Vollant)
-- add inflateSyncPoint in zconf.h
-- fix list of exported functions in nt/zlib.dnt and mdsos/zlib.def
-
-Changes in 1.0.6 (19 Jan 1998)
-- add functions gzprintf, gzputc, gzgetc, gztell, gzeof, gzseek, gzrewind and
-  gzsetparams (thanks to Roland Giersig and Kevin Ruland for some of this code)
-- Fix a deflate bug occuring only with compression level 0 (thanks to
-  Andy Buckler for finding this one).
-- In minigzip, pass transparently also the first byte for .Z files.
-- return Z_BUF_ERROR instead of Z_OK if output buffer full in uncompress()
-- check Z_FINISH in inflate (thanks to Marc Schluper)
-- Implement deflateCopy (thanks to Adam Costello)
-- make static libraries by default in configure, add --shared option.
-- move MSDOS or Windows specific files to directory msdos
-- suppress the notion of partial flush to simplify the interface
-  (but the symbol Z_PARTIAL_FLUSH is kept for compatibility with 1.0.4)
-- suppress history buffer provided by application to simplify the interface
-  (this feature was not implemented anyway in 1.0.4)
-- next_in and avail_in must be initialized before calling inflateInit or
-  inflateInit2
-- add EXPORT in all exported functions (for Windows DLL)
-- added Makefile.nt (thanks to Stephen Williams)
-- added the unsupported "contrib" directory:
-   contrib/asm386/ by Gilles Vollant <info at winimage.com>
-	386 asm code replacing longest_match().
-   contrib/iostream/ by Kevin Ruland <kevin at rodin.wustl.edu>
-        A C++ I/O streams interface to the zlib gz* functions
-   contrib/iostream2/  by Tyge L�vset <Tyge.Lovset at cmr.no>
-	Another C++ I/O streams interface
-   contrib/untgz/  by "Pedro A. Aranda Guti\irrez" <paag at tid.es>
-	A very simple tar.gz file extractor using zlib
-   contrib/visual-basic.txt by Carlos Rios <c_rios at sonda.cl>
-        How to use compress(), uncompress() and the gz* functions from VB.
-- pass params -f (filtered data), -h (huffman only), -1 to -9 (compression
-  level) in minigzip (thanks to Tom Lane)
-
-- use const for rommable constants in deflate
-- added test for gzseek and gztell in example.c
-- add undocumented function inflateSyncPoint() (hack for Paul Mackerras)
-- add undocumented function zError to convert error code to string
-  (for Tim Smithers)
-- Allow compilation of gzio with -DNO_DEFLATE to avoid the compression code.
-- Use default memcpy for Symantec MSDOS compiler.
-- Add EXPORT keyword for check_func (needed for Windows DLL)
-- add current directory to LD_LIBRARY_PATH for "make test"
-- create also a link for libz.so.1
-- added support for FUJITSU UXP/DS (thanks to Toshiaki Nomura)
-- use $(SHAREDLIB) instead of libz.so in Makefile.in (for HPUX)
-- added -soname for Linux in configure (Chun-Chung Chen,
-- assign numbers to the exported functions in zlib.def (for Windows DLL)
-- add advice in zlib.h for best usage of deflateSetDictionary
-- work around compiler bug on Atari (cast Z_NULL in call of s->checkfn)
-- allow compilation with ANSI keywords only enabled for TurboC in large model
-- avoid "versionString"[0] (Borland bug)
-- add NEED_DUMMY_RETURN for Borland
-- use variable z_verbose for tracing in debug mode (L. Peter Deutsch).
-- allow compilation with CC
-- defined STDC for OS/2 (David Charlap)	
-- limit external names to 8 chars for MVS (Thomas Lund)
-- in minigzip.c, use static buffers only for 16-bit systems
-- fix suffix check for "minigzip -d foo.gz"
-- do not return an error for the 2nd of two consecutive gzflush() (Felix Lee)
-- use _fdopen instead of fdopen for MSC >= 6.0 (Thomas Fanslau)
-- added makelcc.bat for lcc-win32 (Tom St Denis)
-- in Makefile.dj2, use copy and del instead of install and rm (Frank Donahoe)
-- Avoid expanded $Id: ChangeLog,v 1.1 2002/07/30 20:02:47 juan Exp $. Use "rcs -kb" or "cvs admin -kb" to avoid Id expansion.
-- check for unistd.h in configure (for off_t)
-- remove useless check parameter in inflate_blocks_free
-- avoid useless assignment of s->check to itself in inflate_blocks_new
-- do not flush twice in gzclose (thanks to Ken Raeburn)
-- rename FOPEN as F_OPEN to avoid clash with /usr/include/sys/file.h
-- use NO_ERRNO_H instead of enumeration of operating systems with errno.h
-- work around buggy fclose on pipes for HP/UX
-- support zlib DLL with BORLAND C++ 5.0 (thanks to Glenn Randers-Pehrson)
-- fix configure if CC is already equal to gcc
-
-Changes in 1.0.5 (3 Jan 98)
-- Fix inflate to terminate gracefully when fed corrupted or invalid data
-- Use const for rommable constants in inflate
-- Eliminate memory leaks on error conditions in inflate
-- Removed some vestigial code in inflate
-- Update web address in README
-  
-Changes in 1.0.4 (24 Jul 96)
-- In very rare conditions, deflate(s, Z_FINISH) could fail to produce an EOF
-  bit, so the decompressor could decompress all the correct data but went
-  on to attempt decompressing extra garbage data. This affected minigzip too.
-- zlibVersion and gzerror return const char* (needed for DLL)
-- port to RISCOS (no fdopen, no multiple dots, no unlink, no fileno)
-- use z_error only for DEBUG (avoid problem with DLLs)
-
-Changes in 1.0.3 (2 Jul 96)
-- use z_streamp instead of z_stream *, which is now a far pointer in MSDOS
-  small and medium models; this makes the library incompatible with previous
-  versions for these models. (No effect in large model or on other systems.)
-- return OK instead of BUF_ERROR if previous deflate call returned with
-  avail_out as zero but there is nothing to do
-- added memcmp for non STDC compilers
-- define NO_DUMMY_DECL for more Mac compilers (.h files merged incorrectly)
-- define __32BIT__ if __386__ or i386 is defined (pb. with Watcom and SCO)
-- better check for 16-bit mode MSC (avoids problem with Symantec)
-
-Changes in 1.0.2 (23 May 96)
-- added Windows DLL support
-- added a function zlibVersion (for the DLL support)
-- fixed declarations using Bytef in infutil.c (pb with MSDOS medium model)
-- Bytef is define's instead of typedef'd only for Borland C
-- avoid reading uninitialized memory in example.c
-- mention in README that the zlib format is now RFC1950
-- updated Makefile.dj2
-- added algorithm.doc
-
-Changes in 1.0.1 (20 May 96) [1.0 skipped to avoid confusion]
-- fix array overlay in deflate.c which sometimes caused bad compressed data
-- fix inflate bug with empty stored block
-- fix MSDOS medium model which was broken in 0.99
-- fix deflateParams() which could generated bad compressed data.
-- Bytef is define'd instead of typedef'ed (work around Borland bug)
-- added an INDEX file
-- new makefiles for DJGPP (Makefile.dj2), 32-bit Borland (Makefile.b32),
-  Watcom (Makefile.wat), Amiga SAS/C (Makefile.sas)
-- speed up adler32 for modern machines without auto-increment
-- added -ansi for IRIX in configure
-- static_init_done in trees.c is an int
-- define unlink as delete for VMS
-- fix configure for QNX
-- add configure branch for SCO and HPUX
-- avoid many warnings (unused variables, dead assignments, etc...)
-- no fdopen for BeOS
-- fix the Watcom fix for 32 bit mode (define FAR as empty)
-- removed redefinition of Byte for MKWERKS
-- work around an MWKERKS bug (incorrect merge of all .h files)
-
-Changes in 0.99 (27 Jan 96)
-- allow preset dictionary shared between compressor and decompressor
-- allow compression level 0 (no compression)
-- add deflateParams in zlib.h: allow dynamic change of compression level
-  and compression strategy.
-- test large buffers and deflateParams in example.c
-- add optional "configure" to build zlib as a shared library
-- suppress Makefile.qnx, use configure instead
-- fixed deflate for 64-bit systems (detected on Cray)
-- fixed inflate_blocks for 64-bit systems (detected on Alpha)
-- declare Z_DEFLATED in zlib.h (possible parameter for deflateInit2)
-- always return Z_BUF_ERROR when deflate() has nothing to do
-- deflateInit and inflateInit are now macros to allow version checking
-- prefix all global functions and types with z_ with -DZ_PREFIX
-- make falloc completely reentrant (inftrees.c)
-- fixed very unlikely race condition in ct_static_init
-- free in reverse order of allocation to help memory manager
-- use zlib-1.0/* instead of zlib/* inside the tar.gz
-- make zlib warning-free with "gcc -O3 -Wall -Wwrite-strings -Wpointer-arith
-  -Wconversion -Wstrict-prototypes -Wmissing-prototypes"
-- allow gzread on concatenated .gz files
-- deflateEnd now returns Z_DATA_ERROR if it was premature
-- deflate is finally (?) fully deterministic (no matches beyond end of input)
-- Document Z_SYNC_FLUSH
-- add uninstall in Makefile
-- Check for __cpluplus in zlib.h
-- Better test in ct_align for partial flush
-- avoid harmless warnings for Borland C++
-- initialize hash_head in deflate.c
-- avoid warning on fdopen (gzio.c) for HP cc -Aa
-- include stdlib.h for STDC compilers
-- include errno.h for Cray
-- ignore error if ranlib doesn't exist
-- call ranlib twice for NeXTSTEP
-- use exec_prefix instead of prefix for libz.a
-- renamed ct_* as _tr_* to avoid conflict with applications
-- clear z->msg in inflateInit2 before any error return
-- initialize opaque in example.c, gzio.c, deflate.c and inflate.c
-- fixed typo in zconf.h (_GNUC__ => __GNUC__)
-- check for WIN32 in zconf.h and zutil.c (avoid farmalloc in 32-bit mode)
-- fix typo in Make_vms.com (f$trnlnm -> f$getsyi)
-- in fcalloc, normalize pointer if size > 65520 bytes
-- don't use special fcalloc for 32 bit Borland C++
-- use STDC instead of __GO32__ to avoid redeclaring exit, calloc, etc...
-- use Z_BINARY instead of BINARY
-- document that gzclose after gzdopen will close the file
-- allow "a" as mode in gzopen.
-- fix error checking in gzread
-- allow skipping .gz extra-field on pipes
-- added reference to Perl interface in README
-- put the crc table in FAR data (I dislike more and more the medium model :)
-- added get_crc_table
-- added a dimension to all arrays (Borland C can't count).
-- workaround Borland C bug in declaration of inflate_codes_new & inflate_fast
-- guard against multiple inclusion of *.h (for precompiled header on Mac)
-- Watcom C pretends to be Microsoft C small model even in 32 bit mode.
-- don't use unsized arrays to avoid silly warnings by Visual C++:
-     warning C4746: 'inflate_mask' : unsized array treated as  '__far'
-     (what's wrong with far data in far model?).
-- define enum out of inflate_blocks_state to allow compilation with C++
-
-Changes in 0.95 (16 Aug 95)
-- fix MSDOS small and medium model (now easier to adapt to any compiler)
-- inlined send_bits
-- fix the final (:-) bug for deflate with flush (output was correct but
-  not completely flushed in rare occasions).
-- default window size is same for compression and decompression
-  (it's now sufficient to set MAX_WBITS in zconf.h).
-- voidp -> voidpf and voidnp -> voidp (for consistency with other
-  typedefs and because voidnp was not near in large model).
-
-Changes in 0.94 (13 Aug 95)
-- support MSDOS medium model
-- fix deflate with flush (could sometimes generate bad output)
-- fix deflateReset (zlib header was incorrectly suppressed)
-- added support for VMS
-- allow a compression level in gzopen()
-- gzflush now calls fflush
-- For deflate with flush, flush even if no more input is provided.
-- rename libgz.a as libz.a
-- avoid complex expression in infcodes.c triggering Turbo C bug
-- work around a problem with gcc on Alpha (in INSERT_STRING)
-- don't use inline functions (problem with some gcc versions)
-- allow renaming of Byte, uInt, etc... with #define.
-- avoid warning about (unused) pointer before start of array in deflate.c
-- avoid various warnings in gzio.c, example.c, infblock.c, adler32.c, zutil.c
-- avoid reserved word 'new' in trees.c
-
-Changes in 0.93 (25 June 95)
-- temporarily disable inline functions
-- make deflate deterministic
-- give enough lookahead for PARTIAL_FLUSH
-- Set binary mode for stdin/stdout in minigzip.c for OS/2
-- don't even use signed char in inflate (not portable enough)
-- fix inflate memory leak for segmented architectures
-
-Changes in 0.92 (3 May 95)
-- don't assume that char is signed (problem on SGI)
-- Clear bit buffer when starting a stored block
-- no memcpy on Pyramid
-- suppressed inftest.c
-- optimized fill_window, put longest_match inline for gcc
-- optimized inflate on stored blocks.
-- untabify all sources to simplify patches
-
-Changes in 0.91 (2 May 95)
-- Default MEM_LEVEL is 8 (not 9 for Unix) as documented in zlib.h
-- Document the memory requirements in zconf.h
-- added "make install"
-- fix sync search logic in inflateSync
-- deflate(Z_FULL_FLUSH) now works even if output buffer too short
-- after inflateSync, don't scare people with just "lo world"
-- added support for DJGPP
-
-Changes in 0.9 (1 May 95)
-- don't assume that zalloc clears the allocated memory (the TurboC bug
-  was Mark's bug after all :)
-- let again gzread copy uncompressed data unchanged (was working in 0.71)
-- deflate(Z_FULL_FLUSH), inflateReset and inflateSync are now fully implemented
-- added a test of inflateSync in example.c
-- moved MAX_WBITS to zconf.h because users might want to change that.
-- document explicitly that zalloc(64K) on MSDOS must return a normalized
-  pointer (zero offset)
-- added Makefiles for Microsoft C, Turbo C, Borland C++
-- faster crc32()
-
-Changes in 0.8 (29 April 95)
-- added fast inflate (inffast.c)
-- deflate(Z_FINISH) now returns Z_STREAM_END when done. Warning: this
-  is incompatible with previous versions of zlib which returned Z_OK.
-- work around a TurboC compiler bug (bad code for b << 0, see infutil.h)
-  (actually that was not a compiler bug, see 0.81 above)
-- gzread no longer reads one extra byte in certain cases
-- In gzio destroy(), don't reference a freed structure
-- avoid many warnings for MSDOS
-- avoid the ERROR symbol which is used by MS Windows
-
-Changes in 0.71 (14 April 95)
-- Fixed more MSDOS compilation problems :( There is still a bug with
-  TurboC large model.
-
-Changes in 0.7 (14 April 95)
-- Added full inflate support.
-- Simplified the crc32() interface. The pre- and post-conditioning
-  (one's complement) is now done inside crc32(). WARNING: this is
-  incompatible with previous versions; see zlib.h for the new usage.
-
-Changes in 0.61 (12 April 95)
-- workaround for a bug in TurboC. example and minigzip now work on MSDOS.
-
-Changes in 0.6 (11 April 95)
-- added minigzip.c
-- added gzdopen to reopen a file descriptor as gzFile
-- added transparent reading of non-gziped files in gzread.
-- fixed bug in gzread (don't read crc as data)
-- fixed bug in destroy (gzio.c) (don't return Z_STREAM_END for gzclose).
-- don't allocate big arrays in the stack (for MSDOS)
-- fix some MSDOS compilation problems
-
-Changes in 0.5:
-- do real compression in deflate.c. Z_PARTIAL_FLUSH is supported but
-  not yet Z_FULL_FLUSH.
-- support decompression but only in a single step (forced Z_FINISH)
-- added opaque object for zalloc and zfree.
-- added deflateReset and inflateReset
-- added a variable zlib_version for consistency checking.
-- renamed the 'filter' parameter of deflateInit2 as 'strategy'.
-  Added Z_FILTERED and Z_HUFFMAN_ONLY constants.
-
-Changes in 0.4:
-- avoid "zip" everywhere, use zlib instead of ziplib.
-- suppress Z_BLOCK_FLUSH, interpret Z_PARTIAL_FLUSH as block flush
-  if compression method == 8.
-- added adler32 and crc32
-- renamed deflateOptions as deflateInit2, call one or the other but not both
-- added the method parameter for deflateInit2.
-- added inflateInit2
-- simplied considerably deflateInit and inflateInit by not supporting
-  user-provided history buffer. This is supported only in deflateInit2
-  and inflateInit2.
-
-Changes in 0.3:
-- prefix all macro names with Z_
-- use Z_FINISH instead of deflateEnd to finish compression.
-- added Z_HUFFMAN_ONLY
-- added gzerror()
diff --git a/src/zlib/FAQ b/src/zlib/FAQ
deleted file mode 100644
index 0feb6d3..0000000
--- a/src/zlib/FAQ
+++ /dev/null
@@ -1,72 +0,0 @@
-
-		Frequently Asked Questions about zlib
-
-
-If your question is not there, please check the zlib home page 
-http://www.cdrom.com/pub/infozip/zlib/ which may have more recent information.
-
-
-1) I need a Windows DLL
-2) I need a Visual Basic interface to zlib
-3) compress() returns Z_BUF_ERROR
-4) deflate or inflate returns Z_BUF_ERROR
-5) Where is the zlib documentation (man pages, etc...)?
-6) Why don't you use GNU autoconf, libtool, etc...?
-7) There is a bug in zlib.
-8) I get "undefined reference to gzputc"
-
-
-
-1) I need a Windows DLL
-
-  The zlib sources can be compiled without change to produce a DLL.
-  If you want a precompiled DLL, see http://www.winimage.com/zLibDll
-
-
-2) I need a Visual Basic interface to zlib
-
-  See http://www.tcfb.com/dowseware/cmp-z-it.zip
-      http://web2.airmail.net/markn/articles/zlibtool/zlibtool.htm
-  and contrib/visual-basic.txt
-
-3) compress() returns Z_BUF_ERROR
-
-  Make sure that before the call of compress, the length of the
-  compressed buffer is equal to the total size of the compressed buffer
-  and not zero.  For Visual Basic, check that this parameter is passed
-  by reference ("as any"), not by value ("as long").
-
-
-4) deflate or inflate returns Z_BUF_ERROR
-
-  Make sure that before the call avail_in and avail_out are not zero.
-
-
-5) Where is the zlib documentation (man pages, etc...)?
-
-  It's in zlib.h for the moment. Volunteers to transform this
-  to man pages, please contact jloup at gzip.org. Examples of zlib usage
-  are in the files example.c and minigzip.c.
-
-
-6) Why don't you use GNU autoconf, libtool, etc...?
-
-  Because we would like to keep zlib as a very small and simple package.
-  zlib is rather portable and doesn't need much configuration.
-
-
-7) There is a bug in zlib.
-
-  Most of the time, such problems are due to an incorrect usage
-  of zlib. Please try to reproduce the problem with a small
-  program and send us the corresponding source at zlib at quest.jpl.nasa.gov
-  Do not send multi-megabyte data files without prior agreement.
-
-
-8) I get "undefined reference to gzputc"
-
-  If "make test" produces something like
-     example.o(.text+0x174): 
-  check that you don't have old files libz.* in /usr/lib, /usr/local/lib
-  or /usr/X11R6/lib. Remove old versions then do "make install".
-
diff --git a/src/zlib/Makefile b/src/zlib/Makefile
deleted file mode 100644
index 8212584..0000000
--- a/src/zlib/Makefile
+++ /dev/null
@@ -1,99 +0,0 @@
-# Makefile for zlib (MSVC + NMAKE; others?)
-#
-# GRR 1998.10.21:  This makefile now builds both shared (DLL) and static
-#   libraries.  Objects ending in ".obj" are the static ones; those ending
-#   in ".objdll" are "position-independent" DLL objects.  Since cl.exe
-#   doesn't seem to honor the -out: option, the .objdll flavor are renamed
-#   using what is probably an NMAKE-specific feature:  %|xF, where "x" is
-#   some combo of d (drive), p (path, including drive), f (file basename)
-#   and e (extension).  The useful output is zlibstat.lib (the static version),
-#   zlibdll.lib (the DLL import or stub library with which one links), and
-#   zlib.dll (the DLL itself, required at runtime).  To build only one or the
-#   other, remove either zlib.dll or zlibstat.lib from the "all:" target.
-#
-#   SUMMARY:  Link programs with either zlibstat.lib or zlibdll.lib.  If the
-#             latter, be sure to distribute zlib.dll with the executable(s).
-
-!include <ntwin32.mak>
-
-CC=cl
-LD=link
-CFLAGS=-nologo -O
-LDFLAGS=
-O=.obj
-OD=.objdll
-
-# variables
-OBJ1 = adler32$(O) compress$(O) crc32$(O) gzio$(O) uncompr$(O)
-OBJ2 = deflate$(O) trees$(O) zutil$(O) inflate$(O) infblock$(O)
-OBJ3 = inftrees$(O) infcodes$(O) infutil$(O) inffast$(O)
-OBJS = $(OBJ1) $(OBJ2) $(OBJ3)
-
-OBJD1 = adler32$(OD) compress$(OD) crc32$(OD) gzio$(OD) uncompr$(OD)
-OBJD2 = deflate$(OD) trees$(OD) zutil$(OD) inflate$(OD) infblock$(OD)
-OBJD3 = inftrees$(OD) infcodes$(OD) infutil$(OD) inffast$(OD)
-OBJSDLL = $(OBJD1) $(OBJD2) $(OBJD3)
-
-.SUFFIXES: .objdll
-
-# [see %devstudio%\vc\include\win32.mak for macro definitions]
-.c.obj:
-	$(CC) -c $(CFLAGS) $(cvars) $<
-
-# -out: doesn't work with cl.exe (some other option? RTFM, I suppose...)
-.c.objdll:
-#	$(CC) -c $(CFLAGS) $(cvarsdll) -out:$@ $<
-	$(CC) -c $(CFLAGS) $(cvarsdll) $<
-	ren %|fF.obj $@
-
-all:  zlib.dll zlibstat.lib example.exe minigzip.exe
-
-adler32$(O) adler32$(OD):	adler32.c zutil.h zlib.h zconf.h
-compress$(O) compress$(OD):	compress.c zlib.h zconf.h
-crc32$(O) crc32$(OD):		crc32.c zutil.h zlib.h zconf.h
-deflate$(O) deflate$(OD):	deflate.c deflate.h zutil.h zlib.h zconf.h
-gzio$(O) gzio$(OD):		gzio.c zutil.h zlib.h zconf.h
-infblock$(O) infblock$(OD):	infblock.c zutil.h zlib.h zconf.h inftrees.h \
-  infutil.h infcodes.h infblock.h
-infcodes$(O) infcodes$(OD):	infcodes.c zutil.h zlib.h zconf.h inftrees.h \
-  infutil.h infcodes.h inffast.h
-inflate$(O) inflate$(OD):	inflate.c zutil.h zlib.h zconf.h infblock.h
-inftrees$(O) inftrees$(OD):	inftrees.c zutil.h zlib.h zconf.h inftrees.h
-infutil$(O) infutil$(OD):	infutil.c zutil.h zlib.h zconf.h inftrees.h \
-  infutil.h
-inffast$(O) inffast$(OD):	inffast.c zutil.h zlib.h zconf.h inftrees.h \
-  infutil.h inffast.h
-trees$(O) trees$(OD):		trees.c deflate.h zutil.h zlib.h zconf.h
-uncompr$(O) uncompr$(OD):	uncompr.c zlib.h zconf.h
-zutil$(O) zutil$(OD):		zutil.c zutil.h zlib.h zconf.h
-
-example$(O): example.c zlib.h zconf.h
-minigzip$(O): minigzip.c zlib.h zconf.h
-
-zlib.dll: $(OBJSDLL) nt/zlib.dnt
-	link $(dlllflags) -out:$@ -def:nt/zlib.dnt $(OBJSDLL) $(guilibsdll)
-	-ren zlib.lib zlibdll.lib
-
-zlibstat.lib: $(OBJS)
-	lib -nologo -out:$@ $(OBJS)
-
-zlibdll.lib: zlib.dll
-
-example.exe: example.obj zlibdll.lib
-	$(LD) $(LDFLAGS) example.obj zlibdll.lib
-
-minigzip.exe: minigzip.obj zlibdll.lib
-	$(LD) $(LDFLAGS) minigzip.obj zlibdll.lib 
-
-test: example.exe minigzip.exe
-	example
-	echo hello world | minigzip | minigzip -d 
-
-clean:
-	del *.objdll
-	del *.obj
-	del *.exe
-	del *.dll
-	del *.lib
-	del zlib.exp
-	del foo.gz
diff --git a/src/zlib/README b/src/zlib/README
deleted file mode 100644
index 8ff4587..0000000
--- a/src/zlib/README
+++ /dev/null
@@ -1,148 +0,0 @@
-zlib 1.1.3 is a general purpose data compression library.  All the code
-is thread safe.  The data format used by the zlib library
-is described by RFCs (Request for Comments) 1950 to 1952 in the files 
-ftp://ds.internic.net/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate
-format) and rfc1952.txt (gzip format). These documents are also available in
-other formats from ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html
-
-All functions of the compression library are documented in the file zlib.h
-(volunteer to write man pages welcome, contact jloup at gzip.org). A usage
-example of the library is given in the file example.c which also tests that
-the library is working correctly. Another example is given in the file
-minigzip.c. The compression library itself is composed of all source files
-except example.c and minigzip.c.
-
-To compile all files and run the test program, follow the instructions
-given at the top of Makefile. In short "make test; make install"
-should work for most machines. For Unix: "configure; make test; make install"
-For MSDOS, use one of the special makefiles such as Makefile.msc.
-For VMS, use Make_vms.com or descrip.mms.
-
-Questions about zlib should be sent to <zlib at quest.jpl.nasa.gov>, or to
-Gilles Vollant <info at winimage.com> for the Windows DLL version.
-The zlib home page is http://www.cdrom.com/pub/infozip/zlib/
-The official zlib ftp site is ftp://ftp.cdrom.com/pub/infozip/zlib/
-Before reporting a problem, please check those sites to verify that
-you have the latest version of zlib; otherwise get the latest version and
-check whether the problem still exists or not.
-
-Mark Nelson <markn at tiny.com> wrote an article about zlib for the Jan. 1997
-issue of  Dr. Dobb's Journal; a copy of the article is available in
-http://web2.airmail.net/markn/articles/zlibtool/zlibtool.htm
-
-The changes made in version 1.1.3 are documented in the file ChangeLog.
-The main changes since 1.1.2 are:
-
-- fix "an inflate input buffer bug that shows up on rare but persistent
-  occasions" (Mark)
-- fix gzread and gztell for concatenated .gz files (Didier Le Botlan)
-- fix gzseek(..., SEEK_SET) in write mode
-- fix crc check after a gzeek (Frank Faubert)
-- fix miniunzip when the last entry in a zip file is itself a zip file
-  (J Lillge)
-- add contrib/asm586 and contrib/asm686 (Brian Raiter)
-  See http://www.muppetlabs.com/~breadbox/software/assembly.html
-- add support for Delphi 3 in contrib/delphi (Bob Dellaca)
-- add support for C++Builder 3 and Delphi 3 in contrib/delphi2 (Davide Moretti)
-- do not exit prematurely in untgz if 0 at start of block (Magnus Holmgren)
-- use macro EXTERN instead of extern to support DLL for BeOS (Sander Stoks)
-- added a FAQ file
-
-plus many changes for portability.
-
-Unsupported third party contributions are provided in directory "contrib".
-
-A Java implementation of zlib is available in the Java Development Kit 1.1
-http://www.javasoft.com/products/JDK/1.1/docs/api/Package-java.util.zip.html
-See the zlib home page http://www.cdrom.com/pub/infozip/zlib/ for details.
-
-A Perl interface to zlib written by Paul Marquess <pmarquess at bfsec.bt.co.uk>
-is in the CPAN (Comprehensive Perl Archive Network) sites, such as:
-ftp://ftp.cis.ufl.edu/pub/perl/CPAN/modules/by-module/Compress/Compress-Zlib*
-
-A Python interface to zlib written by A.M. Kuchling <amk at magnet.com>
-is available in Python 1.5 and later versions, see
-http://www.python.org/doc/lib/module-zlib.html
-
-A zlib binding for TCL written by Andreas Kupries <a.kupries at westend.com>
-is availlable at http://www.westend.com/~kupries/doc/trf/man/man.html
-
-An experimental package to read and write files in .zip format,
-written on top of zlib by Gilles Vollant <info at winimage.com>, is
-available at http://www.winimage.com/zLibDll/unzip.html
-and also in the contrib/minizip directory of zlib.
-
-
-Notes for some targets:
-
-- To build a Windows DLL version, include in a DLL project zlib.def, zlib.rc
-  and all .c files except example.c and minigzip.c; compile with -DZLIB_DLL
-  The zlib DLL support was initially done by Alessandro Iacopetti and is
-  now maintained by Gilles Vollant <info at winimage.com>. Check the zlib DLL
-  home page at http://www.winimage.com/zLibDll
-
-  From Visual Basic, you can call the DLL functions which do not take
-  a structure as argument: compress, uncompress and all gz* functions.
-  See contrib/visual-basic.txt for more information, or get
-  http://www.tcfb.com/dowseware/cmp-z-it.zip
-
-- For 64-bit Irix, deflate.c must be compiled without any optimization.
-  With -O, one libpng test fails. The test works in 32 bit mode (with
-  the -n32 compiler flag). The compiler bug has been reported to SGI.
-
-- zlib doesn't work with gcc 2.6.3 on a DEC 3000/300LX under OSF/1 2.1   
-  it works when compiled with cc.
-
-- on Digital Unix 4.0D (formely OSF/1) on AlphaServer, the cc option -std1
-  is necessary to get gzprintf working correctly. This is done by configure.
-
-- zlib doesn't work on HP-UX 9.05 with some versions of /bin/cc. It works
-  with other compilers. Use "make test" to check your compiler.
-
-- gzdopen is not supported on RISCOS, BEOS and by some Mac compilers.
-
-- For Turbo C the small model is supported only with reduced performance to
-  avoid any far allocation; it was tested with -DMAX_WBITS=11 -DMAX_MEM_LEVEL=3
-
-- For PalmOs, see http://www.cs.uit.no/~perm/PASTA/pilot/software.html
-  Per Harald Myrvang <perm at stud.cs.uit.no>
-
-
-Acknowledgments:
-
-  The deflate format used by zlib was defined by Phil Katz. The deflate
-  and zlib specifications were written by L. Peter Deutsch. Thanks to all the
-  people who reported problems and suggested various improvements in zlib;
-  they are too numerous to cite here.
-
-Copyright notice:
-
- (C) 1995-1998 Jean-loup Gailly and Mark Adler
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-
-  Jean-loup Gailly        Mark Adler
-  jloup at gzip.org          madler at alumni.caltech.edu
-
-If you use the zlib library in a product, we would appreciate *not*
-receiving lengthy legal documents to sign. The sources are provided
-for free but without warranty of any kind.  The library has been
-entirely written by Jean-loup Gailly and Mark Adler; it does not
-include third-party code.
-
-If you redistribute modified sources, we would appreciate that you include
-in the file ChangeLog history information documenting your changes.
diff --git a/src/zlib/algorithm.txt b/src/zlib/algorithm.txt
deleted file mode 100644
index f488cd1..0000000
--- a/src/zlib/algorithm.txt
+++ /dev/null
@@ -1,213 +0,0 @@
-1. Compression algorithm (deflate)
-
-The deflation algorithm used by gzip (also zip and zlib) is a variation of
-LZ77 (Lempel-Ziv 1977, see reference below). It finds duplicated strings in
-the input data.  The second occurrence of a string is replaced by a
-pointer to the previous string, in the form of a pair (distance,
-length).  Distances are limited to 32K bytes, and lengths are limited
-to 258 bytes. When a string does not occur anywhere in the previous
-32K bytes, it is emitted as a sequence of literal bytes.  (In this
-description, `string' must be taken as an arbitrary sequence of bytes,
-and is not restricted to printable characters.)
-
-Literals or match lengths are compressed with one Huffman tree, and
-match distances are compressed with another tree. The trees are stored
-in a compact form at the start of each block. The blocks can have any
-size (except that the compressed data for one block must fit in
-available memory). A block is terminated when deflate() determines that
-it would be useful to start another block with fresh trees. (This is
-somewhat similar to the behavior of LZW-based _compress_.)
-
-Duplicated strings are found using a hash table. All input strings of
-length 3 are inserted in the hash table. A hash index is computed for
-the next 3 bytes. If the hash chain for this index is not empty, all
-strings in the chain are compared with the current input string, and
-the longest match is selected.
-
-The hash chains are searched starting with the most recent strings, to
-favor small distances and thus take advantage of the Huffman encoding.
-The hash chains are singly linked. There are no deletions from the
-hash chains, the algorithm simply discards matches that are too old.
-
-To avoid a worst-case situation, very long hash chains are arbitrarily
-truncated at a certain length, determined by a runtime option (level
-parameter of deflateInit). So deflate() does not always find the longest
-possible match but generally finds a match which is long enough.
-
-deflate() also defers the selection of matches with a lazy evaluation
-mechanism. After a match of length N has been found, deflate() searches for
-a longer match at the next input byte. If a longer match is found, the
-previous match is truncated to a length of one (thus producing a single
-literal byte) and the process of lazy evaluation begins again. Otherwise,
-the original match is kept, and the next match search is attempted only N
-steps later.
-
-The lazy match evaluation is also subject to a runtime parameter. If
-the current match is long enough, deflate() reduces the search for a longer
-match, thus speeding up the whole process. If compression ratio is more
-important than speed, deflate() attempts a complete second search even if
-the first match is already long enough.
-
-The lazy match evaluation is not performed for the fastest compression
-modes (level parameter 1 to 3). For these fast modes, new strings
-are inserted in the hash table only when no match was found, or
-when the match is not too long. This degrades the compression ratio
-but saves time since there are both fewer insertions and fewer searches.
-
-
-2. Decompression algorithm (inflate)
-
-2.1 Introduction
-
-The real question is, given a Huffman tree, how to decode fast.  The most
-important realization is that shorter codes are much more common than
-longer codes, so pay attention to decoding the short codes fast, and let
-the long codes take longer to decode.
-
-inflate() sets up a first level table that covers some number of bits of
-input less than the length of longest code.  It gets that many bits from the
-stream, and looks it up in the table.  The table will tell if the next
-code is that many bits or less and how many, and if it is, it will tell
-the value, else it will point to the next level table for which inflate()
-grabs more bits and tries to decode a longer code.
-
-How many bits to make the first lookup is a tradeoff between the time it
-takes to decode and the time it takes to build the table.  If building the
-table took no time (and if you had infinite memory), then there would only
-be a first level table to cover all the way to the longest code.  However,
-building the table ends up taking a lot longer for more bits since short
-codes are replicated many times in such a table.  What inflate() does is
-simply to make the number of bits in the first table a variable, and set it
-for the maximum speed.
-
-inflate() sends new trees relatively often, so it is possibly set for a
-smaller first level table than an application that has only one tree for
-all the data.  For inflate, which has 286 possible codes for the
-literal/length tree, the size of the first table is nine bits.  Also the
-distance trees have 30 possible values, and the size of the first table is
-six bits.  Note that for each of those cases, the table ended up one bit
-longer than the ``average'' code length, i.e. the code length of an
-approximately flat code which would be a little more than eight bits for
-286 symbols and a little less than five bits for 30 symbols.  It would be
-interesting to see if optimizing the first level table for other
-applications gave values within a bit or two of the flat code size.
-
-
-2.2 More details on the inflate table lookup
-
-Ok, you want to know what this cleverly obfuscated inflate tree actually  
-looks like.  You are correct that it's not a Huffman tree.  It is simply a  
-lookup table for the first, let's say, nine bits of a Huffman symbol.  The  
-symbol could be as short as one bit or as long as 15 bits.  If a particular  
-symbol is shorter than nine bits, then that symbol's translation is duplicated
-in all those entries that start with that symbol's bits.  For example, if the  
-symbol is four bits, then it's duplicated 32 times in a nine-bit table.  If a  
-symbol is nine bits long, it appears in the table once.
-
-If the symbol is longer than nine bits, then that entry in the table points  
-to another similar table for the remaining bits.  Again, there are duplicated  
-entries as needed.  The idea is that most of the time the symbol will be short
-and there will only be one table look up.  (That's whole idea behind data  
-compression in the first place.)  For the less frequent long symbols, there  
-will be two lookups.  If you had a compression method with really long  
-symbols, you could have as many levels of lookups as is efficient.  For  
-inflate, two is enough.
-
-So a table entry either points to another table (in which case nine bits in  
-the above example are gobbled), or it contains the translation for the symbol  
-and the number of bits to gobble.  Then you start again with the next  
-ungobbled bit.
-
-You may wonder: why not just have one lookup table for how ever many bits the  
-longest symbol is?  The reason is that if you do that, you end up spending  
-more time filling in duplicate symbol entries than you do actually decoding.   
-At least for deflate's output that generates new trees every several 10's of  
-kbytes.  You can imagine that filling in a 2^15 entry table for a 15-bit code  
-would take too long if you're only decoding several thousand symbols.  At the  
-other extreme, you could make a new table for every bit in the code.  In fact,
-that's essentially a Huffman tree.  But then you spend two much time  
-traversing the tree while decoding, even for short symbols.
-
-So the number of bits for the first lookup table is a trade of the time to  
-fill out the table vs. the time spent looking at the second level and above of
-the table.
-
-Here is an example, scaled down:
-
-The code being decoded, with 10 symbols, from 1 to 6 bits long:
-
-A: 0
-B: 10
-C: 1100
-D: 11010
-E: 11011
-F: 11100
-G: 11101
-H: 11110
-I: 111110
-J: 111111
-
-Let's make the first table three bits long (eight entries):
-
-000: A,1
-001: A,1
-010: A,1
-011: A,1
-100: B,2
-101: B,2
-110: -> table X (gobble 3 bits)
-111: -> table Y (gobble 3 bits)
-
-Each entry is what the bits decode to and how many bits that is, i.e. how  
-many bits to gobble.  Or the entry points to another table, with the number of
-bits to gobble implicit in the size of the table.
-
-Table X is two bits long since the longest code starting with 110 is five bits
-long:
-
-00: C,1
-01: C,1
-10: D,2
-11: E,2
-
-Table Y is three bits long since the longest code starting with 111 is six  
-bits long:
-
-000: F,2
-001: F,2
-010: G,2
-011: G,2
-100: H,2
-101: H,2
-110: I,3
-111: J,3
-
-So what we have here are three tables with a total of 20 entries that had to  
-be constructed.  That's compared to 64 entries for a single table.  Or  
-compared to 16 entries for a Huffman tree (six two entry tables and one four  
-entry table).  Assuming that the code ideally represents the probability of  
-the symbols, it takes on the average 1.25 lookups per symbol.  That's compared
-to one lookup for the single table, or 1.66 lookups per symbol for the  
-Huffman tree.
-
-There, I think that gives you a picture of what's going on.  For inflate, the  
-meaning of a particular symbol is often more than just a letter.  It can be a  
-byte (a "literal"), or it can be either a length or a distance which  
-indicates a base value and a number of bits to fetch after the code that is  
-added to the base value.  Or it might be the special end-of-block code.  The  
-data structures created in inftrees.c try to encode all that information  
-compactly in the tables.
-
-
-Jean-loup Gailly        Mark Adler
-jloup at gzip.org          madler at alumni.caltech.edu
-
-
-References:
-
-[LZ77] Ziv J., Lempel A., ``A Universal Algorithm for Sequential Data
-Compression,'' IEEE Transactions on Information Theory, Vol. 23, No. 3,
-pp. 337-343.
-
-``DEFLATE Compressed Data Format Specification'' available in
-ftp://ds.internic.net/rfc/rfc1951.txt
diff --git a/src/zlib/zconf.h b/src/zlib/zconf.h
deleted file mode 100644
index c54ceff..0000000
--- a/src/zlib/zconf.h
+++ /dev/null
@@ -1,279 +0,0 @@
-/* zconf.h -- configuration of the zlib compression library
- * Copyright (C) 1995-1998 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h 
- */
-
-/* @(#) $Id: zconf.h,v 1.1 2002/07/30 20:02:48 juan Exp $ */
-
-#ifndef _ZCONF_H
-#define _ZCONF_H
-
-/*
- * If you *really* need a unique prefix for all types and library functions,
- * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
- */
-#ifdef Z_PREFIX
-#  define deflateInit_	z_deflateInit_
-#  define deflate	z_deflate
-#  define deflateEnd	z_deflateEnd
-#  define inflateInit_ 	z_inflateInit_
-#  define inflate	z_inflate
-#  define inflateEnd	z_inflateEnd
-#  define deflateInit2_	z_deflateInit2_
-#  define deflateSetDictionary z_deflateSetDictionary
-#  define deflateCopy	z_deflateCopy
-#  define deflateReset	z_deflateReset
-#  define deflateParams	z_deflateParams
-#  define inflateInit2_	z_inflateInit2_
-#  define inflateSetDictionary z_inflateSetDictionary
-#  define inflateSync	z_inflateSync
-#  define inflateSyncPoint z_inflateSyncPoint
-#  define inflateReset	z_inflateReset
-#  define compress	z_compress
-#  define compress2	z_compress2
-#  define uncompress	z_uncompress
-#  define adler32	z_adler32
-#  define crc32		z_crc32
-#  define get_crc_table z_get_crc_table
-
-#  define Byte		z_Byte
-#  define uInt		z_uInt
-#  define uLong		z_uLong
-#  define Bytef	        z_Bytef
-#  define charf		z_charf
-#  define intf		z_intf
-#  define uIntf		z_uIntf
-#  define uLongf	z_uLongf
-#  define voidpf	z_voidpf
-#  define voidp		z_voidp
-#endif
-
-#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32)
-#  define WIN32
-#endif
-#if defined(__GNUC__) || defined(WIN32) || defined(__386__) || defined(i386)
-#  ifndef __32BIT__
-#    define __32BIT__
-#  endif
-#endif
-#if defined(__MSDOS__) && !defined(MSDOS)
-#  define MSDOS
-#endif
-
-/*
- * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
- * than 64k bytes at a time (needed on systems with 16-bit int).
- */
-#if defined(MSDOS) && !defined(__32BIT__)
-#  define MAXSEG_64K
-#endif
-#ifdef MSDOS
-#  define UNALIGNED_OK
-#endif
-
-#if (defined(MSDOS) || defined(_WINDOWS) || defined(WIN32))  && !defined(STDC)
-#  define STDC
-#endif
-#if defined(__STDC__) || defined(__cplusplus) || defined(__OS2__)
-#  ifndef STDC
-#    define STDC
-#  endif
-#endif
-
-#ifndef STDC
-#  ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
-#    define const
-#  endif
-#endif
-
-/* Some Mac compilers merge all .h files incorrectly: */
-#if defined(__MWERKS__) || defined(applec) ||defined(THINK_C) ||defined(__SC__)
-#  define NO_DUMMY_DECL
-#endif
-
-/* Old Borland C incorrectly complains about missing returns: */
-#if defined(__BORLANDC__) && (__BORLANDC__ < 0x500)
-#  define NEED_DUMMY_RETURN
-#endif
-
-
-/* Maximum value for memLevel in deflateInit2 */
-#ifndef MAX_MEM_LEVEL
-#  ifdef MAXSEG_64K
-#    define MAX_MEM_LEVEL 8
-#  else
-#    define MAX_MEM_LEVEL 9
-#  endif
-#endif
-
-/* Maximum value for windowBits in deflateInit2 and inflateInit2.
- * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
- * created by gzip. (Files created by minigzip can still be extracted by
- * gzip.)
- */
-#ifndef MAX_WBITS
-#  define MAX_WBITS   15 /* 32K LZ77 window */
-#endif
-
-/* The memory requirements for deflate are (in bytes):
-            (1 << (windowBits+2)) +  (1 << (memLevel+9))
- that is: 128K for windowBits=15  +  128K for memLevel = 8  (default values)
- plus a few kilobytes for small objects. For example, if you want to reduce
- the default memory requirements from 256K to 128K, compile with
-     make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
- Of course this will generally degrade compression (there's no free lunch).
-
-   The memory requirements for inflate are (in bytes) 1 << windowBits
- that is, 32K for windowBits=15 (default value) plus a few kilobytes
- for small objects.
-*/
-
-                        /* Type declarations */
-
-#ifndef OF /* function prototypes */
-#  ifdef STDC
-#    define OF(args)  args
-#  else
-#    define OF(args)  ()
-#  endif
-#endif
-
-/* The following definitions for FAR are needed only for MSDOS mixed
- * model programming (small or medium model with some far allocations).
- * This was tested only with MSC; for other MSDOS compilers you may have
- * to define NO_MEMCPY in zutil.h.  If you don't need the mixed model,
- * just define FAR to be empty.
- */
-#if (defined(M_I86SM) || defined(M_I86MM)) && !defined(__32BIT__)
-   /* MSC small or medium model */
-#  define SMALL_MEDIUM
-#  ifdef _MSC_VER
-#    define FAR _far
-#  else
-#    define FAR far
-#  endif
-#endif
-#if defined(__BORLANDC__) && (defined(__SMALL__) || defined(__MEDIUM__))
-#  ifndef __32BIT__
-#    define SMALL_MEDIUM
-#    define FAR _far
-#  endif
-#endif
-
-/* Compile with -DZLIB_DLL for Windows DLL support */
-#if defined(ZLIB_DLL)
-#  if defined(_WINDOWS) || defined(WINDOWS)
-#    ifdef FAR
-#      undef FAR
-#    endif
-#    include <windows.h>
-#    define ZEXPORT  WINAPI
-#    ifdef WIN32
-#      define ZEXPORTVA  WINAPIV
-#    else
-#      define ZEXPORTVA  FAR _cdecl _export
-#    endif
-#  endif
-#  if defined (__BORLANDC__)
-#    if (__BORLANDC__ >= 0x0500) && defined (WIN32)
-#      include <windows.h>
-#      define ZEXPORT __declspec(dllexport) WINAPI
-#      define ZEXPORTRVA __declspec(dllexport) WINAPIV
-#    else
-#      if defined (_Windows) && defined (__DLL__)
-#        define ZEXPORT _export
-#        define ZEXPORTVA _export
-#      endif
-#    endif
-#  endif
-#endif
-
-#if defined (__BEOS__)
-#  if defined (ZLIB_DLL)
-#    define ZEXTERN extern __declspec(dllexport)
-#  else
-#    define ZEXTERN extern __declspec(dllimport)
-#  endif
-#endif
-
-#ifndef ZEXPORT
-#  define ZEXPORT
-#endif
-#ifndef ZEXPORTVA
-#  define ZEXPORTVA
-#endif
-#ifndef ZEXTERN
-#  define ZEXTERN extern
-#endif
-
-#ifndef FAR
-#   define FAR
-#endif
-
-#if !defined(MACOS) && !defined(TARGET_OS_MAC)
-typedef unsigned char  Byte;  /* 8 bits */
-#endif
-typedef unsigned int   uInt;  /* 16 bits or more */
-typedef unsigned long  uLong; /* 32 bits or more */
-
-#ifdef SMALL_MEDIUM
-   /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
-#  define Bytef Byte FAR
-#else
-   typedef Byte  FAR Bytef;
-#endif
-typedef char  FAR charf;
-typedef int   FAR intf;
-typedef uInt  FAR uIntf;
-typedef uLong FAR uLongf;
-
-#ifdef STDC
-   typedef void FAR *voidpf;
-   typedef void     *voidp;
-#else
-   typedef Byte FAR *voidpf;
-   typedef Byte     *voidp;
-#endif
-
-#ifdef HAVE_UNISTD_H
-#  include <sys/types.h> /* for off_t */
-#  include <unistd.h>    /* for SEEK_* and off_t */
-#  define z_off_t  off_t
-#endif
-#ifndef SEEK_SET
-#  define SEEK_SET        0       /* Seek from beginning of file.  */
-#  define SEEK_CUR        1       /* Seek from current position.  */
-#  define SEEK_END        2       /* Set file pointer to EOF plus "offset" */
-#endif
-#ifndef z_off_t
-#  define  z_off_t long
-#endif
-
-/* MVS linker does not support external names larger than 8 bytes */
-#if defined(__MVS__)
-#   pragma map(deflateInit_,"DEIN")
-#   pragma map(deflateInit2_,"DEIN2")
-#   pragma map(deflateEnd,"DEEND")
-#   pragma map(inflateInit_,"ININ")
-#   pragma map(inflateInit2_,"ININ2")
-#   pragma map(inflateEnd,"INEND")
-#   pragma map(inflateSync,"INSY")
-#   pragma map(inflateSetDictionary,"INSEDI")
-#   pragma map(inflate_blocks,"INBL")
-#   pragma map(inflate_blocks_new,"INBLNE")
-#   pragma map(inflate_blocks_free,"INBLFR")
-#   pragma map(inflate_blocks_reset,"INBLRE")
-#   pragma map(inflate_codes_free,"INCOFR")
-#   pragma map(inflate_codes,"INCO")
-#   pragma map(inflate_fast,"INFA")
-#   pragma map(inflate_flush,"INFLU")
-#   pragma map(inflate_mask,"INMA")
-#   pragma map(inflate_set_dictionary,"INSEDI2")
-#   pragma map(inflate_copyright,"INCOPY")
-#   pragma map(inflate_trees_bits,"INTRBI")
-#   pragma map(inflate_trees_dynamic,"INTRDY")
-#   pragma map(inflate_trees_fixed,"INTRFI")
-#   pragma map(inflate_trees_free,"INTRFR")
-#endif
-
-#endif /* _ZCONF_H */
diff --git a/src/zlib/zlib.h b/src/zlib/zlib.h
deleted file mode 100644
index 49f56b4..0000000
--- a/src/zlib/zlib.h
+++ /dev/null
@@ -1,893 +0,0 @@
-/* zlib.h -- interface of the 'zlib' general purpose compression library
-  version 1.1.3, July 9th, 1998
-
-  Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler
-
-  This software is provided 'as-is', without any express or implied
-  warranty.  In no event will the authors be held liable for any damages
-  arising from the use of this software.
-
-  Permission is granted to anyone to use this software for any purpose,
-  including commercial applications, and to alter it and redistribute it
-  freely, subject to the following restrictions:
-
-  1. The origin of this software must not be misrepresented; you must not
-     claim that you wrote the original software. If you use this software
-     in a product, an acknowledgment in the product documentation would be
-     appreciated but is not required.
-  2. Altered source versions must be plainly marked as such, and must not be
-     misrepresented as being the original software.
-  3. This notice may not be removed or altered from any source distribution.
-
-  Jean-loup Gailly        Mark Adler
-  jloup at gzip.org          madler at alumni.caltech.edu
-
-
-  The data format used by the zlib library is described by RFCs (Request for
-  Comments) 1950 to 1952 in the files ftp://ds.internic.net/rfc/rfc1950.txt
-  (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
-*/
-
-#ifndef _ZLIB_H
-#define _ZLIB_H
-
-#include "zconf.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define ZLIB_VERSION "1.1.3"
-
-/* 
-     The 'zlib' compression library provides in-memory compression and
-  decompression functions, including integrity checks of the uncompressed
-  data.  This version of the library supports only one compression method
-  (deflation) but other algorithms will be added later and will have the same
-  stream interface.
-
-     Compression can be done in a single step if the buffers are large
-  enough (for example if an input file is mmap'ed), or can be done by
-  repeated calls of the compression function.  In the latter case, the
-  application must provide more input and/or consume the output
-  (providing more output space) before each call.
-
-     The library also supports reading and writing files in gzip (.gz) format
-  with an interface similar to that of stdio.
-
-     The library does not install any signal handler. The decoder checks
-  the consistency of the compressed data, so the library should never
-  crash even in case of corrupted input.
-*/
-
-typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
-typedef void   (*free_func)  OF((voidpf opaque, voidpf address));
-
-struct internal_state;
-
-typedef struct z_stream_s {
-    Bytef    *next_in;  /* next input byte */
-    uInt     avail_in;  /* number of bytes available at next_in */
-    uLong    total_in;  /* total nb of input bytes read so far */
-
-    Bytef    *next_out; /* next output byte should be put there */
-    uInt     avail_out; /* remaining free space at next_out */
-    uLong    total_out; /* total nb of bytes output so far */
-
-    char     *msg;      /* last error message, NULL if no error */
-    struct internal_state FAR *state; /* not visible by applications */
-
-    alloc_func zalloc;  /* used to allocate the internal state */
-    free_func  zfree;   /* used to free the internal state */
-    voidpf     opaque;  /* private data object passed to zalloc and zfree */
-
-    int     data_type;  /* best guess about the data type: ascii or binary */
-    uLong   adler;      /* adler32 value of the uncompressed data */
-    uLong   reserved;   /* reserved for future use */
-} z_stream;
-
-typedef z_stream FAR *z_streamp;
-
-/*
-   The application must update next_in and avail_in when avail_in has
-   dropped to zero. It must update next_out and avail_out when avail_out
-   has dropped to zero. The application must initialize zalloc, zfree and
-   opaque before calling the init function. All other fields are set by the
-   compression library and must not be updated by the application.
-
-   The opaque value provided by the application will be passed as the first
-   parameter for calls of zalloc and zfree. This can be useful for custom
-   memory management. The compression library attaches no meaning to the
-   opaque value.
-
-   zalloc must return Z_NULL if there is not enough memory for the object.
-   If zlib is used in a multi-threaded application, zalloc and zfree must be
-   thread safe.
-
-   On 16-bit systems, the functions zalloc and zfree must be able to allocate
-   exactly 65536 bytes, but will not be required to allocate more than this
-   if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS,
-   pointers returned by zalloc for objects of exactly 65536 bytes *must*
-   have their offset normalized to zero. The default allocation function
-   provided by this library ensures this (see zutil.c). To reduce memory
-   requirements and avoid any allocation of 64K objects, at the expense of
-   compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h).
-
-   The fields total_in and total_out can be used for statistics or
-   progress reports. After compression, total_in holds the total size of
-   the uncompressed data and may be saved for use in the decompressor
-   (particularly if the decompressor wants to decompress everything in
-   a single step).
-*/
-
-                        /* constants */
-
-#define Z_NO_FLUSH      0
-#define Z_PARTIAL_FLUSH 1 /* will be removed, use Z_SYNC_FLUSH instead */
-#define Z_SYNC_FLUSH    2
-#define Z_FULL_FLUSH    3
-#define Z_FINISH        4
-/* Allowed flush values; see deflate() below for details */
-
-#define Z_OK            0
-#define Z_STREAM_END    1
-#define Z_NEED_DICT     2
-#define Z_ERRNO        (-1)
-#define Z_STREAM_ERROR (-2)
-#define Z_DATA_ERROR   (-3)
-#define Z_MEM_ERROR    (-4)
-#define Z_BUF_ERROR    (-5)
-#define Z_VERSION_ERROR (-6)
-/* Return codes for the compression/decompression functions. Negative
- * values are errors, positive values are used for special but normal events.
- */
-
-#define Z_NO_COMPRESSION         0
-#define Z_BEST_SPEED             1
-#define Z_BEST_COMPRESSION       9
-#define Z_DEFAULT_COMPRESSION  (-1)
-/* compression levels */
-
-#define Z_FILTERED            1
-#define Z_HUFFMAN_ONLY        2
-#define Z_DEFAULT_STRATEGY    0
-/* compression strategy; see deflateInit2() below for details */
-
-#define Z_BINARY   0
-#define Z_ASCII    1
-#define Z_UNKNOWN  2
-/* Possible values of the data_type field */
-
-#define Z_DEFLATED   8
-/* The deflate compression method (the only one supported in this version) */
-
-#define Z_NULL  0  /* for initializing zalloc, zfree, opaque */
-
-#define zlib_version zlibVersion()
-/* for compatibility with versions < 1.0.2 */
-
-                        /* basic functions */
-
-ZEXTERN const char * ZEXPORT zlibVersion OF((void));
-/* The application can compare zlibVersion and ZLIB_VERSION for consistency.
-   If the first character differs, the library code actually used is
-   not compatible with the zlib.h header file used by the application.
-   This check is automatically made by deflateInit and inflateInit.
- */
-
-/* 
-ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level));
-
-     Initializes the internal stream state for compression. The fields
-   zalloc, zfree and opaque must be initialized before by the caller.
-   If zalloc and zfree are set to Z_NULL, deflateInit updates them to
-   use default allocation functions.
-
-     The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:
-   1 gives best speed, 9 gives best compression, 0 gives no compression at
-   all (the input data is simply copied a block at a time).
-   Z_DEFAULT_COMPRESSION requests a default compromise between speed and
-   compression (currently equivalent to level 6).
-
-     deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_STREAM_ERROR if level is not a valid compression level,
-   Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible
-   with the version assumed by the caller (ZLIB_VERSION).
-   msg is set to null if there is no error message.  deflateInit does not
-   perform any compression: this will be done by deflate().
-*/
-
-
-ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
-/*
-    deflate compresses as much data as possible, and stops when the input
-  buffer becomes empty or the output buffer becomes full. It may introduce some
-  output latency (reading input without producing any output) except when
-  forced to flush.
-
-    The detailed semantics are as follows. deflate performs one or both of the
-  following actions:
-
-  - Compress more input starting at next_in and update next_in and avail_in
-    accordingly. If not all input can be processed (because there is not
-    enough room in the output buffer), next_in and avail_in are updated and
-    processing will resume at this point for the next call of deflate().
-
-  - Provide more output starting at next_out and update next_out and avail_out
-    accordingly. This action is forced if the parameter flush is non zero.
-    Forcing flush frequently degrades the compression ratio, so this parameter
-    should be set only when necessary (in interactive applications).
-    Some output may be provided even if flush is not set.
-
-  Before the call of deflate(), the application should ensure that at least
-  one of the actions is possible, by providing more input and/or consuming
-  more output, and updating avail_in or avail_out accordingly; avail_out
-  should never be zero before the call. The application can consume the
-  compressed output when it wants, for example when the output buffer is full
-  (avail_out == 0), or after each call of deflate(). If deflate returns Z_OK
-  and with zero avail_out, it must be called again after making room in the
-  output buffer because there might be more output pending.
-
-    If the parameter flush is set to Z_SYNC_FLUSH, all pending output is
-  flushed to the output buffer and the output is aligned on a byte boundary, so
-  that the decompressor can get all input data available so far. (In particular
-  avail_in is zero after the call if enough output space has been provided
-  before the call.)  Flushing may degrade compression for some compression
-  algorithms and so it should be used only when necessary.
-
-    If flush is set to Z_FULL_FLUSH, all output is flushed as with
-  Z_SYNC_FLUSH, and the compression state is reset so that decompression can
-  restart from this point if previous compressed data has been damaged or if
-  random access is desired. Using Z_FULL_FLUSH too often can seriously degrade
-  the compression.
-
-    If deflate returns with avail_out == 0, this function must be called again
-  with the same value of the flush parameter and more output space (updated
-  avail_out), until the flush is complete (deflate returns with non-zero
-  avail_out).
-
-    If the parameter flush is set to Z_FINISH, pending input is processed,
-  pending output is flushed and deflate returns with Z_STREAM_END if there
-  was enough output space; if deflate returns with Z_OK, this function must be
-  called again with Z_FINISH and more output space (updated avail_out) but no
-  more input data, until it returns with Z_STREAM_END or an error. After
-  deflate has returned Z_STREAM_END, the only possible operations on the
-  stream are deflateReset or deflateEnd.
-  
-    Z_FINISH can be used immediately after deflateInit if all the compression
-  is to be done in a single step. In this case, avail_out must be at least
-  0.1% larger than avail_in plus 12 bytes.  If deflate does not return
-  Z_STREAM_END, then it must be called again as described above.
-
-    deflate() sets strm->adler to the adler32 checksum of all input read
-  so far (that is, total_in bytes).
-
-    deflate() may update data_type if it can make a good guess about
-  the input data type (Z_ASCII or Z_BINARY). In doubt, the data is considered
-  binary. This field is only for information purposes and does not affect
-  the compression algorithm in any manner.
-
-    deflate() returns Z_OK if some progress has been made (more input
-  processed or more output produced), Z_STREAM_END if all input has been
-  consumed and all output has been produced (only when flush is set to
-  Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example
-  if next_in or next_out was NULL), Z_BUF_ERROR if no progress is possible
-  (for example avail_in or avail_out was zero).
-*/
-
-
-ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
-/*
-     All dynamically allocated data structures for this stream are freed.
-   This function discards any unprocessed input and does not flush any
-   pending output.
-
-     deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the
-   stream state was inconsistent, Z_DATA_ERROR if the stream was freed
-   prematurely (some input or output was discarded). In the error case,
-   msg may be set but then points to a static string (which must not be
-   deallocated).
-*/
-
-
-/* 
-ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
-
-     Initializes the internal stream state for decompression. The fields
-   next_in, avail_in, zalloc, zfree and opaque must be initialized before by
-   the caller. If next_in is not Z_NULL and avail_in is large enough (the exact
-   value depends on the compression method), inflateInit determines the
-   compression method from the zlib header and allocates all data structures
-   accordingly; otherwise the allocation will be deferred to the first call of
-   inflate.  If zalloc and zfree are set to Z_NULL, inflateInit updates them to
-   use default allocation functions.
-
-     inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
-   version assumed by the caller.  msg is set to null if there is no error
-   message. inflateInit does not perform any decompression apart from reading
-   the zlib header if present: this will be done by inflate().  (So next_in and
-   avail_in may be modified, but next_out and avail_out are unchanged.)
-*/
-
-
-ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
-/*
-    inflate decompresses as much data as possible, and stops when the input
-  buffer becomes empty or the output buffer becomes full. It may some
-  introduce some output latency (reading input without producing any output)
-  except when forced to flush.
-
-  The detailed semantics are as follows. inflate performs one or both of the
-  following actions:
-
-  - Decompress more input starting at next_in and update next_in and avail_in
-    accordingly. If not all input can be processed (because there is not
-    enough room in the output buffer), next_in is updated and processing
-    will resume at this point for the next call of inflate().
-
-  - Provide more output starting at next_out and update next_out and avail_out
-    accordingly.  inflate() provides as much output as possible, until there
-    is no more input data or no more space in the output buffer (see below
-    about the flush parameter).
-
-  Before the call of inflate(), the application should ensure that at least
-  one of the actions is possible, by providing more input and/or consuming
-  more output, and updating the next_* and avail_* values accordingly.
-  The application can consume the uncompressed output when it wants, for
-  example when the output buffer is full (avail_out == 0), or after each
-  call of inflate(). If inflate returns Z_OK and with zero avail_out, it
-  must be called again after making room in the output buffer because there
-  might be more output pending.
-
-    If the parameter flush is set to Z_SYNC_FLUSH, inflate flushes as much
-  output as possible to the output buffer. The flushing behavior of inflate is
-  not specified for values of the flush parameter other than Z_SYNC_FLUSH
-  and Z_FINISH, but the current implementation actually flushes as much output
-  as possible anyway.
-
-    inflate() should normally be called until it returns Z_STREAM_END or an
-  error. However if all decompression is to be performed in a single step
-  (a single call of inflate), the parameter flush should be set to
-  Z_FINISH. In this case all pending input is processed and all pending
-  output is flushed; avail_out must be large enough to hold all the
-  uncompressed data. (The size of the uncompressed data may have been saved
-  by the compressor for this purpose.) The next operation on this stream must
-  be inflateEnd to deallocate the decompression state. The use of Z_FINISH
-  is never required, but can be used to inform inflate that a faster routine
-  may be used for the single inflate() call.
-
-     If a preset dictionary is needed at this point (see inflateSetDictionary
-  below), inflate sets strm-adler to the adler32 checksum of the
-  dictionary chosen by the compressor and returns Z_NEED_DICT; otherwise 
-  it sets strm->adler to the adler32 checksum of all output produced
-  so far (that is, total_out bytes) and returns Z_OK, Z_STREAM_END or
-  an error code as described below. At the end of the stream, inflate()
-  checks that its computed adler32 checksum is equal to that saved by the
-  compressor and returns Z_STREAM_END only if the checksum is correct.
-
-    inflate() returns Z_OK if some progress has been made (more input processed
-  or more output produced), Z_STREAM_END if the end of the compressed data has
-  been reached and all uncompressed output has been produced, Z_NEED_DICT if a
-  preset dictionary is needed at this point, Z_DATA_ERROR if the input data was
-  corrupted (input stream not conforming to the zlib format or incorrect
-  adler32 checksum), Z_STREAM_ERROR if the stream structure was inconsistent
-  (for example if next_in or next_out was NULL), Z_MEM_ERROR if there was not
-  enough memory, Z_BUF_ERROR if no progress is possible or if there was not
-  enough room in the output buffer when Z_FINISH is used. In the Z_DATA_ERROR
-  case, the application may then call inflateSync to look for a good
-  compression block.
-*/
-
-
-ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
-/*
-     All dynamically allocated data structures for this stream are freed.
-   This function discards any unprocessed input and does not flush any
-   pending output.
-
-     inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state
-   was inconsistent. In the error case, msg may be set but then points to a
-   static string (which must not be deallocated).
-*/
-
-                        /* Advanced functions */
-
-/*
-    The following functions are needed only in some special applications.
-*/
-
-/*   
-ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
-                                     int  level,
-                                     int  method,
-                                     int  windowBits,
-                                     int  memLevel,
-                                     int  strategy));
-
-     This is another version of deflateInit with more compression options. The
-   fields next_in, zalloc, zfree and opaque must be initialized before by
-   the caller.
-
-     The method parameter is the compression method. It must be Z_DEFLATED in
-   this version of the library.
-
-     The windowBits parameter is the base two logarithm of the window size
-   (the size of the history buffer).  It should be in the range 8..15 for this
-   version of the library. Larger values of this parameter result in better
-   compression at the expense of memory usage. The default value is 15 if
-   deflateInit is used instead.
-
-     The memLevel parameter specifies how much memory should be allocated
-   for the internal compression state. memLevel=1 uses minimum memory but
-   is slow and reduces compression ratio; memLevel=9 uses maximum memory
-   for optimal speed. The default value is 8. See zconf.h for total memory
-   usage as a function of windowBits and memLevel.
-
-     The strategy parameter is used to tune the compression algorithm. Use the
-   value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a
-   filter (or predictor), or Z_HUFFMAN_ONLY to force Huffman encoding only (no
-   string match).  Filtered data consists mostly of small values with a
-   somewhat random distribution. In this case, the compression algorithm is
-   tuned to compress them better. The effect of Z_FILTERED is to force more
-   Huffman coding and less string matching; it is somewhat intermediate
-   between Z_DEFAULT and Z_HUFFMAN_ONLY. The strategy parameter only affects
-   the compression ratio but not the correctness of the compressed output even
-   if it is not set appropriately.
-
-      deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_STREAM_ERROR if a parameter is invalid (such as an invalid
-   method). msg is set to null if there is no error message.  deflateInit2 does
-   not perform any compression: this will be done by deflate().
-*/
-                            
-ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
-                                             const Bytef *dictionary,
-                                             uInt  dictLength));
-/*
-     Initializes the compression dictionary from the given byte sequence
-   without producing any compressed output. This function must be called
-   immediately after deflateInit, deflateInit2 or deflateReset, before any
-   call of deflate. The compressor and decompressor must use exactly the same
-   dictionary (see inflateSetDictionary).
-
-     The dictionary should consist of strings (byte sequences) that are likely
-   to be encountered later in the data to be compressed, with the most commonly
-   used strings preferably put towards the end of the dictionary. Using a
-   dictionary is most useful when the data to be compressed is short and can be
-   predicted with good accuracy; the data can then be compressed better than
-   with the default empty dictionary.
-
-     Depending on the size of the compression data structures selected by
-   deflateInit or deflateInit2, a part of the dictionary may in effect be
-   discarded, for example if the dictionary is larger than the window size in
-   deflate or deflate2. Thus the strings most likely to be useful should be
-   put at the end of the dictionary, not at the front.
-
-     Upon return of this function, strm->adler is set to the Adler32 value
-   of the dictionary; the decompressor may later use this value to determine
-   which dictionary has been used by the compressor. (The Adler32 value
-   applies to the whole dictionary even if only a subset of the dictionary is
-   actually used by the compressor.)
-
-     deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a
-   parameter is invalid (such as NULL dictionary) or the stream state is
-   inconsistent (for example if deflate has already been called for this stream
-   or if the compression method is bsort). deflateSetDictionary does not
-   perform any compression: this will be done by deflate().
-*/
-
-ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
-                                    z_streamp source));
-/*
-     Sets the destination stream as a complete copy of the source stream.
-
-     This function can be useful when several compression strategies will be
-   tried, for example when there are several ways of pre-processing the input
-   data with a filter. The streams that will be discarded should then be freed
-   by calling deflateEnd.  Note that deflateCopy duplicates the internal
-   compression state which can be quite large, so this strategy is slow and
-   can consume lots of memory.
-
-     deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
-   (such as zalloc being NULL). msg is left unchanged in both source and
-   destination.
-*/
-
-ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
-/*
-     This function is equivalent to deflateEnd followed by deflateInit,
-   but does not free and reallocate all the internal compression state.
-   The stream will keep the same compression level and any other attributes
-   that may have been set by deflateInit2.
-
-      deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent (such as zalloc or state being NULL).
-*/
-
-ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
-				      int level,
-				      int strategy));
-/*
-     Dynamically update the compression level and compression strategy.  The
-   interpretation of level and strategy is as in deflateInit2.  This can be
-   used to switch between compression and straight copy of the input data, or
-   to switch to a different kind of input data requiring a different
-   strategy. If the compression level is changed, the input available so far
-   is compressed with the old level (and may be flushed); the new level will
-   take effect only at the next call of deflate().
-
-     Before the call of deflateParams, the stream state must be set as for
-   a call of deflate(), since the currently available input may have to
-   be compressed and flushed. In particular, strm->avail_out must be non-zero.
-
-     deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source
-   stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR
-   if strm->avail_out was zero.
-*/
-
-/*   
-ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
-                                     int  windowBits));
-
-     This is another version of inflateInit with an extra parameter. The
-   fields next_in, avail_in, zalloc, zfree and opaque must be initialized
-   before by the caller.
-
-     The windowBits parameter is the base two logarithm of the maximum window
-   size (the size of the history buffer).  It should be in the range 8..15 for
-   this version of the library. The default value is 15 if inflateInit is used
-   instead. If a compressed stream with a larger window size is given as
-   input, inflate() will return with the error code Z_DATA_ERROR instead of
-   trying to allocate a larger window.
-
-      inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_STREAM_ERROR if a parameter is invalid (such as a negative
-   memLevel). msg is set to null if there is no error message.  inflateInit2
-   does not perform any decompression apart from reading the zlib header if
-   present: this will be done by inflate(). (So next_in and avail_in may be
-   modified, but next_out and avail_out are unchanged.)
-*/
-
-ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
-                                             const Bytef *dictionary,
-                                             uInt  dictLength));
-/*
-     Initializes the decompression dictionary from the given uncompressed byte
-   sequence. This function must be called immediately after a call of inflate
-   if this call returned Z_NEED_DICT. The dictionary chosen by the compressor
-   can be determined from the Adler32 value returned by this call of
-   inflate. The compressor and decompressor must use exactly the same
-   dictionary (see deflateSetDictionary).
-
-     inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a
-   parameter is invalid (such as NULL dictionary) or the stream state is
-   inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the
-   expected one (incorrect Adler32 value). inflateSetDictionary does not
-   perform any decompression: this will be done by subsequent calls of
-   inflate().
-*/
-
-ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
-/* 
-    Skips invalid compressed data until a full flush point (see above the
-  description of deflate with Z_FULL_FLUSH) can be found, or until all
-  available input is skipped. No output is provided.
-
-    inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR
-  if no more input was provided, Z_DATA_ERROR if no flush point has been found,
-  or Z_STREAM_ERROR if the stream structure was inconsistent. In the success
-  case, the application may save the current current value of total_in which
-  indicates where valid compressed data was found. In the error case, the
-  application may repeatedly call inflateSync, providing more input each time,
-  until success or end of the input data.
-*/
-
-ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
-/*
-     This function is equivalent to inflateEnd followed by inflateInit,
-   but does not free and reallocate all the internal decompression state.
-   The stream will keep attributes that may have been set by inflateInit2.
-
-      inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
-   stream state was inconsistent (such as zalloc or state being NULL).
-*/
-
-
-                        /* utility functions */
-
-/*
-     The following utility functions are implemented on top of the
-   basic stream-oriented functions. To simplify the interface, some
-   default options are assumed (compression level and memory usage,
-   standard memory allocation functions). The source code of these
-   utility functions can easily be modified if you need special options.
-*/
-
-ZEXTERN int ZEXPORT compress OF((Bytef *dest,   uLongf *destLen,
-                                 const Bytef *source, uLong sourceLen));
-/*
-     Compresses the source buffer into the destination buffer.  sourceLen is
-   the byte length of the source buffer. Upon entry, destLen is the total
-   size of the destination buffer, which must be at least 0.1% larger than
-   sourceLen plus 12 bytes. Upon exit, destLen is the actual size of the
-   compressed buffer.
-     This function can be used to compress a whole file at once if the
-   input file is mmap'ed.
-     compress returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_BUF_ERROR if there was not enough room in the output
-   buffer.
-*/
-
-ZEXTERN int ZEXPORT compress2 OF((Bytef *dest,   uLongf *destLen,
-                                  const Bytef *source, uLong sourceLen,
-                                  int level));
-/*
-     Compresses the source buffer into the destination buffer. The level
-   parameter has the same meaning as in deflateInit.  sourceLen is the byte
-   length of the source buffer. Upon entry, destLen is the total size of the
-   destination buffer, which must be at least 0.1% larger than sourceLen plus
-   12 bytes. Upon exit, destLen is the actual size of the compressed buffer.
-
-     compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
-   memory, Z_BUF_ERROR if there was not enough room in the output buffer,
-   Z_STREAM_ERROR if the level parameter is invalid.
-*/
-
-ZEXTERN int ZEXPORT uncompress OF((Bytef *dest,   uLongf *destLen,
-                                   const Bytef *source, uLong sourceLen));
-/*
-     Decompresses the source buffer into the destination buffer.  sourceLen is
-   the byte length of the source buffer. Upon entry, destLen is the total
-   size of the destination buffer, which must be large enough to hold the
-   entire uncompressed data. (The size of the uncompressed data must have
-   been saved previously by the compressor and transmitted to the decompressor
-   by some mechanism outside the scope of this compression library.)
-   Upon exit, destLen is the actual size of the compressed buffer.
-     This function can be used to decompress a whole file at once if the
-   input file is mmap'ed.
-
-     uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
-   enough memory, Z_BUF_ERROR if there was not enough room in the output
-   buffer, or Z_DATA_ERROR if the input data was corrupted.
-*/
-
-
-typedef voidp gzFile;
-
-ZEXTERN gzFile ZEXPORT gzopen  OF((const char *path, const char *mode));
-/*
-     Opens a gzip (.gz) file for reading or writing. The mode parameter
-   is as in fopen ("rb" or "wb") but can also include a compression level
-   ("wb9") or a strategy: 'f' for filtered data as in "wb6f", 'h' for
-   Huffman only compression as in "wb1h". (See the description
-   of deflateInit2 for more information about the strategy parameter.)
-
-     gzopen can be used to read a file which is not in gzip format; in this
-   case gzread will directly read from the file without decompression.
-
-     gzopen returns NULL if the file could not be opened or if there was
-   insufficient memory to allocate the (de)compression state; errno
-   can be checked to distinguish the two cases (if errno is zero, the
-   zlib error is Z_MEM_ERROR).  */
-
-ZEXTERN gzFile ZEXPORT gzdopen  OF((int fd, const char *mode));
-/*
-     gzdopen() associates a gzFile with the file descriptor fd.  File
-   descriptors are obtained from calls like open, dup, creat, pipe or
-   fileno (in the file has been previously opened with fopen).
-   The mode parameter is as in gzopen.
-     The next call of gzclose on the returned gzFile will also close the
-   file descriptor fd, just like fclose(fdopen(fd), mode) closes the file
-   descriptor fd. If you want to keep fd open, use gzdopen(dup(fd), mode).
-     gzdopen returns NULL if there was insufficient memory to allocate
-   the (de)compression state.
-*/
-
-ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
-/*
-     Dynamically update the compression level or strategy. See the description
-   of deflateInit2 for the meaning of these parameters.
-     gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not
-   opened for writing.
-*/
-
-ZEXTERN int ZEXPORT    gzread  OF((gzFile file, voidp buf, unsigned len));
-/*
-     Reads the given number of uncompressed bytes from the compressed file.
-   If the input file was not in gzip format, gzread copies the given number
-   of bytes into the buffer.
-     gzread returns the number of uncompressed bytes actually read (0 for
-   end of file, -1 for error). */
-
-ZEXTERN int ZEXPORT    gzwrite OF((gzFile file, 
-				   const voidp buf, unsigned len));
-/*
-     Writes the given number of uncompressed bytes into the compressed file.
-   gzwrite returns the number of uncompressed bytes actually written
-   (0 in case of error).
-*/
-
-ZEXTERN int ZEXPORTVA   gzprintf OF((gzFile file, const char *format, ...));
-/*
-     Converts, formats, and writes the args to the compressed file under
-   control of the format string, as in fprintf. gzprintf returns the number of
-   uncompressed bytes actually written (0 in case of error).
-*/
-
-ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
-/*
-      Writes the given null-terminated string to the compressed file, excluding
-   the terminating null character.
-      gzputs returns the number of characters written, or -1 in case of error.
-*/
-
-ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
-/*
-      Reads bytes from the compressed file until len-1 characters are read, or
-   a newline character is read and transferred to buf, or an end-of-file
-   condition is encountered.  The string is then terminated with a null
-   character.
-      gzgets returns buf, or Z_NULL in case of error.
-*/
-
-ZEXTERN int ZEXPORT    gzputc OF((gzFile file, int c));
-/*
-      Writes c, converted to an unsigned char, into the compressed file.
-   gzputc returns the value that was written, or -1 in case of error.
-*/
-
-ZEXTERN int ZEXPORT    gzgetc OF((gzFile file));
-/*
-      Reads one byte from the compressed file. gzgetc returns this byte
-   or -1 in case of end of file or error.
-*/
-
-ZEXTERN int ZEXPORT    gzflush OF((gzFile file, int flush));
-/*
-     Flushes all pending output into the compressed file. The parameter
-   flush is as in the deflate() function. The return value is the zlib
-   error number (see function gzerror below). gzflush returns Z_OK if
-   the flush parameter is Z_FINISH and all output could be flushed.
-     gzflush should be called only when strictly necessary because it can
-   degrade compression.
-*/
-
-ZEXTERN z_off_t ZEXPORT    gzseek OF((gzFile file,
-				      z_off_t offset, int whence));
-/* 
-      Sets the starting position for the next gzread or gzwrite on the
-   given compressed file. The offset represents a number of bytes in the
-   uncompressed data stream. The whence parameter is defined as in lseek(2);
-   the value SEEK_END is not supported.
-     If the file is opened for reading, this function is emulated but can be
-   extremely slow. If the file is opened for writing, only forward seeks are
-   supported; gzseek then compresses a sequence of zeroes up to the new
-   starting position.
-
-      gzseek returns the resulting offset location as measured in bytes from
-   the beginning of the uncompressed stream, or -1 in case of error, in
-   particular if the file is opened for writing and the new starting position
-   would be before the current position.
-*/
-
-ZEXTERN int ZEXPORT    gzrewind OF((gzFile file));
-/*
-     Rewinds the given file. This function is supported only for reading.
-
-   gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET)
-*/
-
-ZEXTERN z_off_t ZEXPORT    gztell OF((gzFile file));
-/*
-     Returns the starting position for the next gzread or gzwrite on the
-   given compressed file. This position represents a number of bytes in the
-   uncompressed data stream.
-
-   gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
-*/
-
-ZEXTERN int ZEXPORT gzeof OF((gzFile file));
-/*
-     Returns 1 when EOF has previously been detected reading the given
-   input stream, otherwise zero.
-*/
-
-ZEXTERN int ZEXPORT    gzclose OF((gzFile file));
-/*
-     Flushes all pending output if necessary, closes the compressed file
-   and deallocates all the (de)compression state. The return value is the zlib
-   error number (see function gzerror below).
-*/
-
-ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
-/*
-     Returns the error message for the last error which occurred on the
-   given compressed file. errnum is set to zlib error number. If an
-   error occurred in the file system and not in the compression library,
-   errnum is set to Z_ERRNO and the application may consult errno
-   to get the exact error code.
-*/
-
-                        /* checksum functions */
-
-/*
-     These functions are not related to compression but are exported
-   anyway because they might be useful in applications using the
-   compression library.
-*/
-
-ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
-
-/*
-     Update a running Adler-32 checksum with the bytes buf[0..len-1] and
-   return the updated checksum. If buf is NULL, this function returns
-   the required initial value for the checksum.
-   An Adler-32 checksum is almost as reliable as a CRC32 but can be computed
-   much faster. Usage example:
-
-     uLong adler = adler32(0L, Z_NULL, 0);
-
-     while (read_buffer(buffer, length) != EOF) {
-       adler = adler32(adler, buffer, length);
-     }
-     if (adler != original_adler) error();
-*/
-
-ZEXTERN uLong ZEXPORT crc32   OF((uLong crc, const Bytef *buf, uInt len));
-/*
-     Update a running crc with the bytes buf[0..len-1] and return the updated
-   crc. If buf is NULL, this function returns the required initial value
-   for the crc. Pre- and post-conditioning (one's complement) is performed
-   within this function so it shouldn't be done by the application.
-   Usage example:
-
-     uLong crc = crc32(0L, Z_NULL, 0);
-
-     while (read_buffer(buffer, length) != EOF) {
-       crc = crc32(crc, buffer, length);
-     }
-     if (crc != original_crc) error();
-*/
-
-
-                        /* various hacks, don't look :) */
-
-/* deflateInit and inflateInit are macros to allow checking the zlib version
- * and the compiler's view of z_stream:
- */
-ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level,
-                                     const char *version, int stream_size));
-ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm,
-                                     const char *version, int stream_size));
-ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int  level, int  method,
-                                      int windowBits, int memLevel,
-                                      int strategy, const char *version,
-                                      int stream_size));
-ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int  windowBits,
-                                      const char *version, int stream_size));
-#define deflateInit(strm, level) \
-        deflateInit_((strm), (level),       ZLIB_VERSION, sizeof(z_stream))
-#define inflateInit(strm) \
-        inflateInit_((strm),                ZLIB_VERSION, sizeof(z_stream))
-#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
-        deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
-                      (strategy),           ZLIB_VERSION, sizeof(z_stream))
-#define inflateInit2(strm, windowBits) \
-        inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream))
-
-
-#if !defined(_Z_UTIL_H) && !defined(NO_DUMMY_DECL)
-    struct internal_state {int dummy;}; /* hack for buggy compilers */
-#endif
-
-ZEXTERN const char   * ZEXPORT zError           OF((int err));
-ZEXTERN int            ZEXPORT inflateSyncPoint OF((z_streamp z));
-ZEXTERN const uLongf * ZEXPORT get_crc_table    OF((void));
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _ZLIB_H */
diff --git a/terralibx/PostgreSQL/libpq.a b/terralibx/PostgreSQL/libpq.a
deleted file mode 100644
index 185da7d..0000000
Binary files a/terralibx/PostgreSQL/libpq.a and /dev/null differ
diff --git a/terralibx/image_processing/Makefile b/terralibx/image_processing/Makefile
new file mode 100755
index 0000000..12869e4
--- /dev/null
+++ b/terralibx/image_processing/Makefile
@@ -0,0 +1,21 @@
+all: terralibpdi
+
+terralibpdi:
+	qmake -o makepdi terralibpdi.pro; make -f makepdi
+
+debug:
+	qmake -o makepdi.debug terralibpdi.pro TE_PROJECT_TYPE=DEBUG; make -f makepdi.debug
+
+clean:
+	if \
+	 test -f makepdi; \
+	then \
+		make -f makepdi distclean; rm -f makepdi; \
+	fi
+
+clean_debug:
+	if \
+	 test -f makepdi.debug; \
+	then \
+		make -f makepdi.debug distclean; rm -f makepdi.debug; \
+	fi
diff --git a/terralibx/image_processing/terralibpdi.pro b/terralibx/image_processing/terralibpdi.pro
new file mode 100755
index 0000000..cc6e7f9
--- /dev/null
+++ b/terralibx/image_processing/terralibpdi.pro
@@ -0,0 +1,264 @@
+TEMPLATE = lib
+CONFIG = warn_on rtti exceptions dll
+TARGET  = terralibpdi
+
+TERRALIB_SRC_DIR = ../../src/
+LIBPDI_SRC_DIR = $$TERRALIB_SRC_DIR/terralib/image_processing/
+DEFINES += PDI_AS_DLL
+
+isEmpty(TE_PROJECT_TYPE) {
+  TE_PROJECT_TYPE=RELEASE
+}
+
+contains(TE_PROJECT_TYPE , DEBUG) {
+  CONFIG += debug
+}
+
+contains(TE_PROJECT_TYPE , RELEASE) {
+  CONFIG += release
+}
+
+unix {
+  release {
+    DEFINES += NDEBUG
+    OBJECTS_DIR = ../Release/.obj/libpdi
+    DESTDIR = ../Release
+    LIBS += -L../Release
+  }
+
+  debug {
+    DEFINES += _DEBUG
+    OBJECTS_DIR = ../Debug/.obj/libpdi
+    DESTDIR = ../Debug
+    LIBS += -L../Debug
+  }
+
+  LIBS += -lz -ljpeg -lterralibtiff -lpthread
+}
+
+INCLUDEPATH = \
+  $$TERRALIB_SRC_DIR/terralib/kernel \
+  $$TERRALIB_SRC_DIR/terralib/functions \
+  $$TERRALIB_SRC_DIR/tiff \
+  $$LIBPDI_SRC_DIR \
+  $$LIBPDI_SRC_DIR/data_structs
+
+HEADERS = \
+          $$LIBPDI_SRC_DIR/TePDIMatrix.hpp \
+          $$LIBPDI_SRC_DIR/TePDIMatrixFunctions.hpp \
+          $$LIBPDI_SRC_DIR/TePDIMathFunctions.hpp \
+          $$LIBPDI_SRC_DIR/TePDIUtils.hpp \
+          $$LIBPDI_SRC_DIR/TePDITypes.hpp \
+          $$LIBPDI_SRC_DIR/TePDIPIManager.hpp \
+          $$LIBPDI_SRC_DIR/TePDIHistogram.hpp \
+          $$LIBPDI_SRC_DIR/TePDIRgbPaletteNode.hpp \
+          $$LIBPDI_SRC_DIR/TePDIRgbPalette.hpp \
+          $$LIBPDI_SRC_DIR/TePDIRgbPaletteFunctions.hpp \
+          $$LIBPDI_SRC_DIR/TePDIParameters.hpp \
+          $$LIBPDI_SRC_DIR/TePDIAlgorithm.hpp \
+          $$LIBPDI_SRC_DIR/TePDIAlgorithmFactory.hpp \
+          $$LIBPDI_SRC_DIR/TePDIStatistic.hpp \
+          $$LIBPDI_SRC_DIR/TePDILevelRemap.hpp \
+          $$LIBPDI_SRC_DIR/TePDIContrast.hpp \
+          $$LIBPDI_SRC_DIR/TePDIContrastFactory.hpp \
+          $$LIBPDI_SRC_DIR/TePDIFilterMask.hpp \
+          $$LIBPDI_SRC_DIR/TePDIBufferedFilter.hpp \
+          $$LIBPDI_SRC_DIR/TePDILinearFilter.hpp \
+          $$LIBPDI_SRC_DIR/TePDILinearFilterFactory.hpp \
+          $$LIBPDI_SRC_DIR/TePDIBDFilter.hpp \
+          $$LIBPDI_SRC_DIR/TePDIBDFilterFactory.hpp \
+          $$LIBPDI_SRC_DIR/TePDIMorfFilter.hpp \
+          $$LIBPDI_SRC_DIR/TePDIMorfFilterFactory.hpp \
+          $$LIBPDI_SRC_DIR/TePDIRadarFilter.hpp \
+          $$LIBPDI_SRC_DIR/TePDIRadarLeeFilter.hpp \
+          $$LIBPDI_SRC_DIR/TePDIRadarLeeFilterFactory.hpp \
+          $$LIBPDI_SRC_DIR/TePDIRadarKuanFilter.hpp \
+          $$LIBPDI_SRC_DIR/TePDIRadarKuanFilterFactory.hpp \
+          $$LIBPDI_SRC_DIR/TePDIRadarFrostFilter.hpp \
+          $$LIBPDI_SRC_DIR/TePDIRadarFrostFilterFactory.hpp \
+          $$LIBPDI_SRC_DIR/TePDIArithmetic.hpp \
+          $$LIBPDI_SRC_DIR/TePDIArithmeticFactory.hpp \
+          $$LIBPDI_SRC_DIR/TePDIRaster2Vector.hpp \
+          $$LIBPDI_SRC_DIR/TePDIRaster2VectorFactory.hpp \
+          $$LIBPDI_SRC_DIR/TePDIColorTransform.hpp \
+          $$LIBPDI_SRC_DIR/TePDIColorTransformFactory.hpp \
+          $$LIBPDI_SRC_DIR/TePDIPrincipalComponents.hpp \
+          $$LIBPDI_SRC_DIR/TePDIPrincipalComponentsFactory.hpp \
+          $$LIBPDI_SRC_DIR/TePDIMallatWavelets.hpp \
+          $$LIBPDI_SRC_DIR/TePDIFusion.hpp \
+          $$LIBPDI_SRC_DIR/TePDIFusionFactory.hpp \
+          $$LIBPDI_SRC_DIR/TePDIGeoMosaic.hpp \
+          $$LIBPDI_SRC_DIR/TePDIGeoMosaicFactory.hpp \
+          $$LIBPDI_SRC_DIR/TePDIBatchGeoMosaic.hpp \
+          $$LIBPDI_SRC_DIR/TePDIBatchGeoMosaicFactory.hpp \
+          $$LIBPDI_SRC_DIR/TePDIStrategy.hpp \
+          $$LIBPDI_SRC_DIR/TePDIStrategyFactory.hpp \
+          $$LIBPDI_SRC_DIR/TePDIBlendingStrategy.hpp \
+          $$LIBPDI_SRC_DIR/TePDIBlendStratFactory.hpp \
+          $$LIBPDI_SRC_DIR/TePDIEuclidianBlendStrategy.hpp \
+          $$LIBPDI_SRC_DIR/TePDIEuclidianBlendSF.hpp \
+          $$LIBPDI_SRC_DIR/TePDINoBlendStrategy.hpp \
+          $$LIBPDI_SRC_DIR/TePDINoBlendSF.hpp \
+          $$LIBPDI_SRC_DIR/TePDIGarguetFusionSF.hpp \
+          $$LIBPDI_SRC_DIR/TePDIGarguetFusionStrategy.hpp \
+          $$LIBPDI_SRC_DIR/TePDIVenturaFusionSF.hpp \
+          $$LIBPDI_SRC_DIR/TePDIVenturaFusionStrategy.hpp \
+          $$LIBPDI_SRC_DIR/TePDIIHSFusionSF.hpp \
+          $$LIBPDI_SRC_DIR/TePDIIHSFusionStrategy.hpp \
+          $$LIBPDI_SRC_DIR/TePDIRegGrowSeg.hpp \
+          $$LIBPDI_SRC_DIR/TePDIRegGrowSegFactory.hpp \
+          $$LIBPDI_SRC_DIR/TePDIRegister.hpp \
+          $$LIBPDI_SRC_DIR/TePDIRegisterFactory.hpp \
+          $$LIBPDI_SRC_DIR/TePDIInterpolator.hpp \
+          $$LIBPDI_SRC_DIR/TePDIBlendingFactory.hpp \
+          $$LIBPDI_SRC_DIR/TePDIBlending.hpp \
+          $$LIBPDI_SRC_DIR/TePDIEspecData.hpp \
+          $$LIBPDI_SRC_DIR/TePDIRegion.hpp \
+          $$LIBPDI_SRC_DIR/TePDICluster.hpp \
+          $$LIBPDI_SRC_DIR/TePDIIsosegClas.hpp \
+          $$LIBPDI_SRC_DIR/TePDIIsosegClasFactory.hpp \
+          $$LIBPDI_SRC_DIR/TePDIHaralick.hpp \
+          $$LIBPDI_SRC_DIR/TePDIMixModelComponent.hpp \
+          $$LIBPDI_SRC_DIR/TePDIMixModelComponentList.hpp \
+          $$LIBPDI_SRC_DIR/TePDIMixModelFactory.hpp \
+          $$LIBPDI_SRC_DIR/TePDIMixModel.hpp \
+          $$LIBPDI_SRC_DIR/TePDIMixModelSpectralBand.hpp \
+          $$LIBPDI_SRC_DIR/TePDIMixModelSpectralBandList.hpp \
+          $$LIBPDI_SRC_DIR/TePDIPrincoMixModelSF.hpp \
+          $$LIBPDI_SRC_DIR/TePDIPrincoMixModelStrategy.hpp \
+          $$LIBPDI_SRC_DIR/TePDIMixModelStrategy.hpp \
+          $$LIBPDI_SRC_DIR/TePDIMixModelStratFactory.hpp \
+          $$LIBPDI_SRC_DIR/TePDIKMeansClas.hpp \
+          $$LIBPDI_SRC_DIR/TePDIKMeansClasFactory.hpp \
+          $$LIBPDI_SRC_DIR/TePDIEMClas.hpp \
+          $$LIBPDI_SRC_DIR/TePDIEMClasFactory.hpp \
+          $$LIBPDI_SRC_DIR/TePDISensorSimulatorFactory.hpp \
+          $$LIBPDI_SRC_DIR/TePDISensorSimulator.hpp \
+          $$LIBPDI_SRC_DIR/TePDIPIManagerGlobalSettings.hpp \
+          $$LIBPDI_SRC_DIR/TePDIOFMatching.hpp \
+          $$LIBPDI_SRC_DIR/TePDIPrincipalComponentsFusion.hpp \
+          $$LIBPDI_SRC_DIR/TePDIDecorrelationEnhancement.hpp \
+          $$LIBPDI_SRC_DIR/TePDICorrelationMatching.hpp \
+          $$LIBPDI_SRC_DIR/TePDIBaatz.hpp \
+          $$LIBPDI_SRC_DIR/TePDIMIMatching.hpp \
+          $$LIBPDI_SRC_DIR/TePDIJointHistogram.hpp \
+          $$LIBPDI_SRC_DIR/TePDIMtxDoubleAdpt.hpp \
+          $$LIBPDI_SRC_DIR/TePDIMMIOMatching.hpp
+
+SOURCES = \
+          $$LIBPDI_SRC_DIR/TePDIMathFunctions.cpp \
+          $$LIBPDI_SRC_DIR/TePDIUtils.cpp \
+          $$LIBPDI_SRC_DIR/TePDIMatrixFunctions.cpp \
+          $$LIBPDI_SRC_DIR/TePDIPIManager.cpp \
+          $$LIBPDI_SRC_DIR/TePDIHistogram.cpp \
+          $$LIBPDI_SRC_DIR/TePDIRgbPalette.cpp \
+          $$LIBPDI_SRC_DIR/TePDIRgbPaletteFunctions.cpp \
+          $$LIBPDI_SRC_DIR/TePDIParameters.cpp \
+          $$LIBPDI_SRC_DIR/TePDIAlgorithm.cpp \
+          $$LIBPDI_SRC_DIR/TePDIAlgorithmFactory.cpp \
+          $$LIBPDI_SRC_DIR/TePDIStatistic.cpp \
+          $$LIBPDI_SRC_DIR/TePDILevelRemap.cpp \
+          $$LIBPDI_SRC_DIR/TePDIContrast.cpp \
+          $$LIBPDI_SRC_DIR/TePDIContrastFactory.cpp \
+          $$LIBPDI_SRC_DIR/TePDIFilterMask.cpp \
+          $$LIBPDI_SRC_DIR/TePDIBufferedFilter.cpp \
+          $$LIBPDI_SRC_DIR/TePDILinearFilter.cpp \
+          $$LIBPDI_SRC_DIR/TePDILinearFilterFactory.cpp \
+          $$LIBPDI_SRC_DIR/TePDIBDFilter.cpp \
+          $$LIBPDI_SRC_DIR/TePDIBDFilterFactory.cpp \
+          $$LIBPDI_SRC_DIR/TePDIMorfFilter.cpp \
+          $$LIBPDI_SRC_DIR/TePDIMorfFilterFactory.cpp \
+          $$LIBPDI_SRC_DIR/TePDIRadarFilter.cpp \
+          $$LIBPDI_SRC_DIR/TePDIRadarLeeFilter.cpp \
+          $$LIBPDI_SRC_DIR/TePDIRadarLeeFilterFactory.cpp \
+          $$LIBPDI_SRC_DIR/TePDIRadarKuanFilter.cpp \
+          $$LIBPDI_SRC_DIR/TePDIRadarKuanFilterFactory.cpp \
+          $$LIBPDI_SRC_DIR/TePDIRadarFrostFilter.cpp \
+          $$LIBPDI_SRC_DIR/TePDIRadarFrostFilterFactory.cpp \
+          $$LIBPDI_SRC_DIR/TePDIArithmetic.cpp \
+          $$LIBPDI_SRC_DIR/TePDIArithmeticFactory.cpp \
+          $$LIBPDI_SRC_DIR/TePDIRaster2Vector.cpp \
+          $$LIBPDI_SRC_DIR/TePDIRaster2VectorFactory.cpp \
+          $$LIBPDI_SRC_DIR/TePDIColorTransform.cpp \
+          $$LIBPDI_SRC_DIR/TePDIColorTransformFactory.cpp \
+          $$LIBPDI_SRC_DIR/TePDIPrincipalComponents.cpp \
+          $$LIBPDI_SRC_DIR/TePDIPrincipalComponentsFactory.cpp \
+          $$LIBPDI_SRC_DIR/TePDIMallatWavelets.cpp \
+          $$LIBPDI_SRC_DIR/TePDIFusion.cpp \
+          $$LIBPDI_SRC_DIR/TePDIFusionFactory.cpp \
+          $$LIBPDI_SRC_DIR/TePDIGeoMosaic.cpp \
+          $$LIBPDI_SRC_DIR/TePDIGeoMosaicFactory.cpp \
+          $$LIBPDI_SRC_DIR/TePDIBatchGeoMosaic.cpp \
+          $$LIBPDI_SRC_DIR/TePDIBatchGeoMosaicFactory.cpp \
+          $$LIBPDI_SRC_DIR/TePDIStrategy.cpp \
+          $$LIBPDI_SRC_DIR/TePDIStrategyFactory.cpp \
+          $$LIBPDI_SRC_DIR/TePDIBlendingStrategy.cpp \
+          $$LIBPDI_SRC_DIR/TePDIBlendStratFactory.cpp \
+          $$LIBPDI_SRC_DIR/TePDIEuclidianBlendStrategy.cpp \
+          $$LIBPDI_SRC_DIR/TePDIEuclidianBlendSF.cpp \
+          $$LIBPDI_SRC_DIR/TePDINoBlendStrategy.cpp \
+          $$LIBPDI_SRC_DIR/TePDINoBlendSF.cpp \
+          $$LIBPDI_SRC_DIR/TePDIGarguetFusionSF.cpp \
+          $$LIBPDI_SRC_DIR/TePDIGarguetFusionStrategy.cpp \
+          $$LIBPDI_SRC_DIR/TePDIVenturaFusionSF.cpp \
+          $$LIBPDI_SRC_DIR/TePDIVenturaFusionStrategy.cpp \
+          $$LIBPDI_SRC_DIR/TePDIIHSFusionSF.cpp \
+          $$LIBPDI_SRC_DIR/TePDIIHSFusionStrategy.cpp \
+          $$LIBPDI_SRC_DIR/TePDIRegGrowSeg.cpp \
+          $$LIBPDI_SRC_DIR/TePDIRegGrowSegFactory.cpp \
+          $$LIBPDI_SRC_DIR/TePDIRegister.cpp \
+          $$LIBPDI_SRC_DIR/TePDIRegisterFactory.cpp \
+          $$LIBPDI_SRC_DIR/TePDIInterpolator.cpp \
+          $$LIBPDI_SRC_DIR/TePDIBlending.cpp \
+          $$LIBPDI_SRC_DIR/TePDIBlendingFactory.cpp \
+          $$LIBPDI_SRC_DIR/TePDIEspecData.cpp \
+          $$LIBPDI_SRC_DIR/TePDIRegion.cpp \
+          $$LIBPDI_SRC_DIR/TePDICluster.cpp \
+          $$LIBPDI_SRC_DIR/TePDIIsosegClas.cpp \
+          $$LIBPDI_SRC_DIR/TePDIIsosegClasFactory.cpp \
+          $$LIBPDI_SRC_DIR/TePDIHaralick.cpp \
+          $$LIBPDI_SRC_DIR/TePDIMixModelComponent.cpp \
+          $$LIBPDI_SRC_DIR/TePDIMixModelComponentList.cpp \
+          $$LIBPDI_SRC_DIR/TePDIMixModelFactory.cpp \
+          $$LIBPDI_SRC_DIR/TePDIMixModel.cpp \
+          $$LIBPDI_SRC_DIR/TePDIMixModelSpectralBand.cpp \
+          $$LIBPDI_SRC_DIR/TePDIMixModelSpectralBandList.cpp \
+          $$LIBPDI_SRC_DIR/TePDIPrincoMixModelSF.cpp \
+          $$LIBPDI_SRC_DIR/TePDIPrincoMixModelStrategy.cpp \
+          $$LIBPDI_SRC_DIR/TePDIMixModelStrategy.cpp \
+          $$LIBPDI_SRC_DIR/TePDIMixModelStratFactory.cpp \
+          $$LIBPDI_SRC_DIR/TePDIKMeansClas.cpp \
+          $$LIBPDI_SRC_DIR/TePDIKMeansClasFactory.cpp \
+          $$LIBPDI_SRC_DIR/TePDIEMClas.cpp \
+          $$LIBPDI_SRC_DIR/TePDIEMClasFactory.cpp \
+          $$LIBPDI_SRC_DIR/TePDISensorSimulatorFactory.cpp \
+          $$LIBPDI_SRC_DIR/TePDISensorSimulator.cpp \
+          $$LIBPDI_SRC_DIR/TePDIOFMatching.cpp \
+          $$LIBPDI_SRC_DIR/TePDIPrincipalComponentsFusion.cpp \
+          $$LIBPDI_SRC_DIR/TePDIDecorrelationEnhancement.cpp \
+          $$LIBPDI_SRC_DIR/TePDICorrelationMatching.cpp \
+          $$LIBPDI_SRC_DIR/TePDIBaatz.cpp \
+          $$LIBPDI_SRC_DIR/TePDIMIMatching.cpp \
+          $$LIBPDI_SRC_DIR/TePDIJointHistogram.cpp \
+          $$LIBPDI_SRC_DIR/TePDIMMIOMatching.cpp
+
+win32 {
+  CONFIG += staticlib console
+
+  DEFINES += WIN32 __WIN32__
+
+  TEMPLATE = vclib
+  
+  LIBS =
+  
+  USE_TERRALIB_STL = yes
+  contains( QMAKESPEC , win32-msvc.net ) {
+    USE_TERRALIB_STL = no
+  }
+  equals( USE_TERRALIB_STL , yes ) {
+    INCLUDEPATH = $$TERRALIB_SRC_DIR/STLport $$INCLUDEPATH
+    message( "TerraLib internal STL will be used" )
+  }    
+}
+
+
diff --git a/terralibx/shapelib/Makefile b/terralibx/shapelib/Makefile
deleted file mode 100644
index e15d343..0000000
--- a/terralibx/shapelib/Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
-all: shapelib
-
-shapelib:
-	qmake -o makeShapelib shapelib.pro; make -f makeShapelib
-
-clean:
-	if \
-	 test -f makeShapelib; \
-	then \
-		make -f makeShapelib distclean; rm -f makeShapelib; \
-	fi
diff --git a/terralibx/shapelib/shapelib.pro b/terralibx/shapelib/shapelib.pro
deleted file mode 100755
index 5bb0f3c..0000000
--- a/terralibx/shapelib/shapelib.pro
+++ /dev/null
@@ -1,18 +0,0 @@
-TEMPLATE = lib
-CONFIG  += warn_off  debug
-TARGET  += shapelib
-
-unix {
-  OBJECTS_DIR = .obj
-}
-
-
-SOURCES =  \
-    ../../src/shapelib/dbfopen.c \
-    ../../src/shapelib/shpopen.c
-
-HEADERS =  \
-    ../../src/shapelib/shapefil.h
-
-
-
diff --git a/terralibx/stat/Makefile b/terralibx/stat/Makefile
old mode 100644
new mode 100755
index 1ffdad1..641518f
--- a/terralibx/stat/Makefile
+++ b/terralibx/stat/Makefile
@@ -3,9 +3,19 @@ all: stat
 stat:
 	qmake -o makeStat stat.pro; make -f makeStat
 
+debug:
+	qmake -o makeStat.debug stat.pro TE_PROJECT_TYPE=DEBUG; make -f makeStat.debug
+
 clean:
 	if \
 	 test -f makeStat; \
 	then \
 		make -f makeStat distclean; rm -f makeStat; \
 	fi
+
+clean_debug:
+	if \
+	 test -f makeStat.debug; \
+	then \
+		make -f makeStat.debug distclean; rm -f makeStat.debug; \
+	fi
diff --git a/terralibx/stat/stat.pro b/terralibx/stat/stat.pro
old mode 100644
new mode 100755
index d2395ae..2a379a2
--- a/terralibx/stat/stat.pro
+++ b/terralibx/stat/stat.pro
@@ -1,16 +1,40 @@
 TEMPLATE = lib
-TARGET  += stat
-CONFIG	+= warn_on debug
+CONFIG	= warn_on dll
 
-LANGUAGE = C++
+isEmpty(TE_PROJECT_TYPE) {
+  TE_PROJECT_TYPE=RELEASE
+}
 
-OBJECTS_DIR = .obj
+contains(TE_PROJECT_TYPE , DEBUG) {
+  CONFIG += debug
+}
+
+contains(TE_PROJECT_TYPE , RELEASE) {
+  CONFIG += release
+}
+
+unix {
+  release {
+    DEFINES += NDEBUG
+    OBJECTS_DIR = ../Release/.obj/stat
+    DESTDIR = ../Release
+    LIBS += -L../Release
+  }
+
+  debug {
+    DEFINES += _DEBUG
+    OBJECTS_DIR = ../Debug/.obj/stat
+    DESTDIR = ../Debug
+    LIBS += -L../Debug
+  }
+
+  LIBS += -lterralib
+}
 
 SOURCES	+=	\
 			../../src/terralib/stat/filaDouble.cpp \
 			../../src/terralib/stat/filaInt.cpp \
 			../../src/terralib/stat/filaR.cpp \
-			../../src/terralib/stat/hash.cpp \
 			../../src/terralib/stat/heap.cpp \
 			../../src/terralib/stat/lista.cpp \
 			../../src/terralib/stat/TeBayesFunctions.cpp \
@@ -18,7 +42,6 @@ SOURCES	+=	\
 			../../src/terralib/stat/TeSkaterArvore.cpp \
 			../../src/terralib/stat/TeSkaterFunctions.cpp \
 			../../src/terralib/stat/TeSkaterGrafo.cpp \
-			../../src/terralib/stat/TeSpatialStatistics.cpp \
 			../../src/terralib/stat/TeStatDataStructures.cpp
 
 HEADERS	+= 	\
@@ -26,7 +49,6 @@ HEADERS	+= 	\
 			../../src/terralib/stat/filaDouble.h \
 			../../src/terralib/stat/filaInt.h \
 			../../src/terralib/stat/filaR.h \
-			../../src/terralib/stat/hash.h \
 			../../src/terralib/stat/heap.h \
 			../../src/terralib/stat/lista.h \
 			../../src/terralib/stat/TeBayesFunctions.h \
diff --git a/terralibx/terralib/Makefile b/terralibx/terralib/Makefile
old mode 100644
new mode 100755
index dc79ef6..fc13f5e
--- a/terralibx/terralib/Makefile
+++ b/terralibx/terralib/Makefile
@@ -3,12 +3,42 @@ all: terralib
 tiff:
 	cd ../tiff; make
 
-terralib: tiff
+tiff_debug:
+	cd ../tiff; make debug
+
+debug: tiff_debug te_debug copy_dlls
+
+terralib: tiff te_release copy_dlls
+
+te_release:
 	qmake -o makeTerralib terralib.pro; make -f makeTerralib
 
+te_debug:
+	qmake -o makeTerralib.debug terralib.pro TE_PROJECT_TYPE=DEBUG; make -f makeTerralib.debug
+
+copy_dlls:
+	rm -f ../Oracle/libclntsh.so ../Oracle/libclntsh.so.1 ../Oracle/libclntsh.so.1.0
+	rm -f ../Oracle/libnnz10.so.1 ../Oracle/libnnz10.so.1.0
+	ln -s ../Oracle/libclntsh.so.10.1 ../Oracle/libclntsh.so
+	ln -s ../Oracle/libclntsh.so.10.1 ../Oracle/libclntsh.so.1
+	ln -s ../Oracle/libclntsh.so.10.1 ../Oracle/libclntsh.so.1.0
+	ln -s ../Oracle/libnnz10.so ../Oracle/libnnz10.so.1
+	ln -s ../Oracle/libnnz10.so ../Oracle/libnnz10.so.1.0	
+
 clean:
+	rm -f ../Oracle/libclntsh.so ../Oracle/libclntsh.so.1 ../Oracle/libclntsh.so.1.0
+	rm -f ../Oracle/libnnz10.so.1 ../Oracle/libnnz10.so.1.0
 	if \
 	 test -f makeTerralib; \
 	then \
 		make -f makeTerralib distclean; rm -f makeTerralib; \
 	fi
+
+clean_debug:
+	rm -f ../Oracle/libclntsh.so ../Oracle/libclntsh.so.1 ../Oracle/libclntsh.so.1.0
+	rm -f ../Oracle/libnnz10.so.1 ../Oracle/libnnz10.so.1.0
+	if \
+	 test -f makeTerralib.debug; \
+	then \
+		make -f makeTerralib.debug distclean; rm -f makeTerralib.debug; \
+	fi
diff --git a/terralibx/terralib/terralib.kdevprj b/terralibx/terralib/terralib.kdevprj
deleted file mode 100644
index 34fd5e3..0000000
--- a/terralibx/terralib/terralib.kdevprj
+++ /dev/null
@@ -1,795 +0,0 @@
-[Config for BinMakefileAm]
-bin_program=terralib
-cxxflags=-O0 -g3 -Wall
-ldflags=\s
-
-[General]
-AMChanged=false
-author=
-configure_args=
-email=
-kdevprj_version=1.3
-lfv_open_groups=
-make_options=-j1
-makefiles=Makefile.am,terralib/Makefile.am,terralib/docs/Makefile.am,terralib/docs/en/Makefile.am
-project_name=Terralib
-project_type=normal_empty
-showNonProjectFiles=true
-sub_dir=terralib/
-version=0.1
-version_control=None
-workspace=1
-
-[Gra_algo.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[LFV Groups]
-Headers=*.h,*.hh,*.hxx,*.hpp,*.H
-Others=*
-Sources=*.cpp,*.c,*.cc,*.C,*.cxx,*.ec,*.ecpp,*.lxx,*.l++,*.ll,*.l
-User Interface=*.kdevdlg,*.ui,*.rc,*.dlg
-groups=Headers,Sources,User Interface,Others
-
-[Makefile]
-dist=true
-install=false
-install_location=
-type=DATA
-
-[Makefile.am]
-files=TeAsciiFile.cpp,TeAsciiFile.h,TeBox.cpp,TeBox.h,TeCentroid.cpp,TeConsoleErrorMessage.cpp,TeDatabase.cpp,TeDatum.cpp,TeDecoder.cpp,TeDecoderDatabase.cpp,TeDecoderFile.cpp,TeDecoderMemory.cpp,TeDecoderMemoryMap.cpp,TeDecoderTIFF.cpp,TeDecoderVirtualMemory.cpp,TeErrorLog.cpp,TeErrorMessage.cpp,TeEvent.cpp,TeException.cpp,TeGeneralizedProxMatrix.cpp,TeGeometry.cpp,TeGeometryAlgorithms.cpp,TeGraph.cpp,TeImportRaster.cpp,TeInitRasterDecoders.cpp,TeKernelParams.cpp,TeLayer.cpp,TeLineInter [...]
-sub_dirs=terralib
-type=static_library
-
-[TeAsciiFile.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeAsciiFile.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeAttribute.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeBox.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeBox.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeCellAlgorithms.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeCellAlgorithms.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeCentroid.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeComposite.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeConsoleErrorMessage.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeConsoleErrorMessage.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeCoord2D.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeCounted.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeDataTypes.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeDatabase.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeDatabase.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeDatum.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeDatum.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeDecoder.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeDecoder.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeDecoderDatabase.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeDecoderDatabase.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeDecoderFile.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeDecoderFile.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeDecoderMemory.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeDecoderMemory.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeDecoderMemoryMap.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeDecoderMemoryMap.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeDecoderTIFF.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeDecoderTIFF.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeDecoderVirtualMemory.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeDecoderVirtualMemory.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeDefines.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeErrorLog.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeErrorLog.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeErrorMessage.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeErrorMessage.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeEvent.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeException.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeException.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeFactory.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeGeneralizedProxMatrix.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeGeneralizedProxMatrix.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeGeometry.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeGeometry.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeGeometryAlgorithms.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeGeometryAlgorithms.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeGraph.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeGraph.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeGroupingAlgorithms.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeImportRaster.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeInitRasterDecoders.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeKernelParams.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeKernelParams.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeLayer.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeLayer.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeLegendEntry.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeLineIntersector.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeLineIntersector.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeLineIntersectorUtils.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeMatrix.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeMatrix.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeMeasure.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeNeighbours.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeNeighbours.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeNetwork.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeNetwork.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TePrecision.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeProgress.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeProgress.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeProgressBase.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeProjection.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeProjection.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TePrototype.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeProxMatrixConstructionStrategy.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeProxMatrixImplementation.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeProxMatrixImplementation.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeProxMatrixSlicingStrategy.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeProxMatrixStrategies.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeProxMatrixWeightsStrategy.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeRaster.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeRaster.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeRasterAlgorithms.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeRasterAlgorithms.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeRasterParams.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeRasterParams.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeRasterRemap.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeRasterRemap.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeRasterTransform.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeRedBlackTree.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeRepresentation.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeRepresentation.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeSTObject.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeSTObject.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeSetOperation.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeSetOperation.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeSimilarity.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeSingleton.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeSlice.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeSparseMatrix.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeSpatialOperations.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeSpatialOperations.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeStdFile.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeStdFile.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeTable.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeTable.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeTheme.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeTheme.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeTime.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeTime.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeTimeInterval.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeTimeInterval.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeTin.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeTin.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeUtils.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[TeUtils.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeView.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeViewNode.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[TeVisual.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[checkvec.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[dynpq.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[graph.cpp]
-dist=true
-install=false
-install_location=
-type=SOURCE
-
-[graph.h]
-dist=true
-install=false
-install_location=
-type=HEADER
-
-[terralib/Makefile.am]
-sub_dirs=
-type=prog_main
-
-[terralib/docs/Makefile.am]
-sub_dirs=
-type=normal
-
-[terralib/docs/en/Makefile.am]
-sub_dirs=
-type=normal
diff --git a/terralibx/terralib/terralib.pro b/terralibx/terralib/terralib.pro
index 3371947..2ead349 100755
--- a/terralibx/terralib/terralib.pro
+++ b/terralibx/terralib/terralib.pro
@@ -1,51 +1,91 @@
 TEMPLATE = lib
-TARGET  += terralib
-CONFIG	+= warn_on debug
+TARGET  = terralib
+CONFIG	= warn_on dll rtti
 
-LANGUAGE = C++
+isEmpty(TE_PROJECT_TYPE) {
+  TE_PROJECT_TYPE=RELEASE
+}
 
-OBJECTS_DIR = .obj
+contains(TE_PROJECT_TYPE , DEBUG) {
+  CONFIG += debug
+}
+
+contains(TE_PROJECT_TYPE , RELEASE) {
+  CONFIG += release
+}
+
+unix {
+  release {
+    DEFINES += NDEBUG
+    OBJECTS_DIR = ../Release/.obj/terralib
+    DESTDIR = ../Release
+    LIBS += -L../Release
+  }
+
+  debug {
+    DEFINES += _DEBUG
+    OBJECTS_DIR = ../Debug/.obj/terralib
+    DESTDIR = ../Debug
+    LIBS += -L../Debug
+  }
+
+  LIBS += -lpthread -lz -ljpeg -lterralibtiff
+}
 
 SOURCES	+=	\
-#			../../src/terralib/kernel/jpeg.cpp \
 			../../src/terralib/kernel/lexTemporal.cpp \
+			../../src/terralib/kernel/TeAbstractTheme.cpp \
+			../../src/terralib/kernel/TeAffineGT.cpp \
+			../../src/terralib/kernel/TeAffineGTFactory.cpp \
+			../../src/terralib/kernel/TeAgnostic.cpp \
 			../../src/terralib/kernel/TeAsciiFile.cpp \
 			../../src/terralib/kernel/TeBox.cpp \
 			../../src/terralib/kernel/TeBufferRegion.cpp \
 			../../src/terralib/kernel/TeCentroid.cpp \
 			../../src/terralib/kernel/TeComputeAttributeStrategies.cpp \
 			../../src/terralib/kernel/TeDatabase.cpp \
+			../../src/terralib/kernel/TeDatabaseFactory.cpp \
 			../../src/terralib/kernel/TeDatum.cpp \
+			../../src/terralib/kernel/TeDBConnectionsPool.cpp \
 			../../src/terralib/kernel/TeDecoderASCIIGrid.cpp \
 			../../src/terralib/kernel/TeDecoderDatabase.cpp \
 			../../src/terralib/kernel/TeDecoderFile.cpp \
-#			../../src/terralib/kernel/TeDecoderJPEG.cpp \
+			../../src/terralib/kernel/TeDecoderJPEG.cpp \
 			../../src/terralib/kernel/TeDecoderMemory.cpp \
 			../../src/terralib/kernel/TeDecoderMemoryMap.cpp \
 			../../src/terralib/kernel/TeDecoderSPR.cpp \
 			../../src/terralib/kernel/TeDecoderTIFF.cpp \
 			../../src/terralib/kernel/TeDecoderVirtualMemory.cpp \
+			../../src/terralib/kernel/TeDecoderSmartMem.cpp \
 			../../src/terralib/kernel/TeErrorLog.cpp \
 			../../src/terralib/kernel/TeErrorMessage.cpp \
 			../../src/terralib/kernel/TeException.cpp \
+			../../src/terralib/kernel/TeExternalTheme.cpp \
 			../../src/terralib/kernel/TeFragmentation.cpp \
-			../../src/terralib/kernel/TeGeneralizedProxMatrix.cpp \
+			../../src/terralib/kernel/TeFileTheme.cpp \	
+			../../src/terralib/kernel/TeGeometricTransformation.cpp \
 			../../src/terralib/kernel/TeGeometry.cpp \
 			../../src/terralib/kernel/TeGeometryAlgorithms.cpp \
-			../../src/terralib/kernel/TeGraph.cpp \
+			../../src/terralib/kernel/TeGTParams.cpp \
+			../../src/terralib/kernel/TeGTFactory.cpp \
 			../../src/terralib/kernel/TeGroupingAlgorithms.cpp \
 			../../src/terralib/kernel/TeImportRaster.cpp \
-			../../src/terralib/kernel/TeInitQuerierStrategy.cpp \
 			../../src/terralib/kernel/TeInitRasterDecoders.cpp \
 			../../src/terralib/kernel/TeIntersector.cpp \
 			../../src/terralib/kernel/TeLayer.cpp \
+			../../src/terralib/kernel/TeLegendEntry.cpp \
 			../../src/terralib/kernel/TeMatrix.cpp \
+			../../src/terralib/kernel/TeMetaModelCache.cpp \
 			../../src/terralib/kernel/TeMultiGeometry.cpp \
 			../../src/terralib/kernel/TeNeighbours.cpp \
 			../../src/terralib/kernel/TeNetwork.cpp \
 			../../src/terralib/kernel/TeOverlay.cpp \
+			../../src/terralib/kernel/TeOverlayUtils.cpp \
 			../../src/terralib/kernel/TeProgress.cpp \
+			../../src/terralib/kernel/TeProject.cpp \
 			../../src/terralib/kernel/TeProjection.cpp \
+			../../src/terralib/kernel/TeProjectiveGT.cpp \
+			../../src/terralib/kernel/TeProjectiveGTFactory.cpp \
 			../../src/terralib/kernel/TeProxMatrixConstructionStrategy.cpp \
 			../../src/terralib/kernel/TeProxMatrixImplementation.cpp \
 			../../src/terralib/kernel/TeProxMatrixStrategies.cpp \
@@ -63,8 +103,6 @@ SOURCES	+=	\
 			../../src/terralib/kernel/TeRepresentation.cpp \
 			../../src/terralib/kernel/TeSpatialOperations.cpp \
 			../../src/terralib/kernel/TeStdFile.cpp \
-			../../src/terralib/kernel/TeSTEFunctionsDB.cpp \
-			../../src/terralib/kernel/TeSTElement.cpp \
 			../../src/terralib/kernel/TeSTElementSet.cpp \
 			../../src/terralib/kernel/TeSTEvent.cpp \
 			../../src/terralib/kernel/TeSTInstance.cpp \
@@ -76,61 +114,92 @@ SOURCES	+=	\
 			../../src/terralib/kernel/TeTin.cpp \
 			../../src/terralib/kernel/TeUtils.cpp \
 			../../src/terralib/kernel/TeVectorRemap.cpp \
-			../../src/terralib/kernel/yyTemporal.cpp
+			../../src/terralib/kernel/TeViewNode.cpp \
+			../../src/terralib/kernel/TeVisual.cpp \
+			../../src/terralib/kernel/yyTemporal.cpp \
+			../../src/terralib/kernel/TeDatabaseFactoryParams.cpp \
+			../../src/terralib/kernel/TeMappedMemory.cpp \
+			../../src/terralib/kernel/TeRasterMemManager.cpp \
+			../../src/terralib/kernel/TeMutex.cpp \
+			../../src/terralib/kernel/TeThread.cpp \
+      ../../src/terralib/kernel/TeThreadFunctor.cpp \   
+      ../../src/terralib/kernel/TeThreadSignal.cpp \
+			../../src/terralib/drivers/libjpeg/TeLibJpegWrapper.cpp \
+			../../src/terralib/drivers/libjpeg/jmemdst.c \
+			../../src/terralib/drivers/libjpeg/jmemsrc.c \
+      ../../src/terralib/kernel/TeStdIOProgress.cpp \
+      ../../src/terralib/kernel/TeThreadJobsManager.cpp \
+      ../../src/terralib/kernel/TeThreadJob.cpp \
+      ../../src/terralib/kernel/TeFunctionCallThreadJob.cpp \
+      ../../src/terralib/kernel/TeTempFilesRemover.cpp
 
 HEADERS	+= 	../../src/terralib/kernel/checkvec.h \
 			../../src/terralib/kernel/dynpq.h \
 			../../src/terralib/kernel/Gra_algo.h \
 			../../src/terralib/kernel/graph.h \
-#			../../src/terralib/kernel/ijl.h \
-#			../../src/terralib/kernel/jpeg.h \
+			../../src/terralib/kernel/TeAbstractFactory.h \
+			../../src/terralib/kernel/TeAbstractTheme.h \
+			../../src/terralib/kernel/TeAffineGT.h \
+			../../src/terralib/kernel/TeAffineGTFactory.h \
+			../../src/terralib/kernel/TeAgnostic.h \
 			../../src/terralib/kernel/TeAsciiFile.h \
 			../../src/terralib/kernel/TeAttribute.h \
 			../../src/terralib/kernel/TeBox.h \
 			../../src/terralib/kernel/TeBufferRegion.h \
 			../../src/terralib/kernel/TeComposite.h \
+			../../src/terralib/kernel/TeCommunicator.h \      
 			../../src/terralib/kernel/TeComputeAttributeStrategies.h \
 			../../src/terralib/kernel/TeCoord2D.h \
 			../../src/terralib/kernel/TeCounted.h \
 			../../src/terralib/kernel/TeDatabase.h \
 			../../src/terralib/kernel/TeDataTypes.h \
 			../../src/terralib/kernel/TeDatum.h \
+			../../src/terralib/kernel/TeDBConnectionsPool.h \
 			../../src/terralib/kernel/TeDecoder.h \
 			../../src/terralib/kernel/TeDecoderASCIIGrid.h \
 			../../src/terralib/kernel/TeDecoderDatabase.h \
 			../../src/terralib/kernel/TeDecoderFile.h \
-#			../../src/terralib/kernel/TeDecoderJPEG.h \
+			../../src/terralib/kernel/TeDecoderJPEG.h \
 			../../src/terralib/kernel/TeDecoderMemory.h \
 			../../src/terralib/kernel/TeDecoderMemoryMap.h \
 			../../src/terralib/kernel/TeDecoderSPR.h \
 			../../src/terralib/kernel/TeDecoderTIFF.h \
 			../../src/terralib/kernel/TeDecoderVirtualMemory.h \
+			../../src/terralib/kernel/TeDecoderSmartMem.h \
 			../../src/terralib/kernel/TeDefines.h \
 			../../src/terralib/kernel/TeErrorLog.h \
 			../../src/terralib/kernel/TeErrorMessage.h \
 			../../src/terralib/kernel/TeException.h \
+			../../src/terralib/kernel/TeExternalTheme.h \
 			../../src/terralib/kernel/TeFactory.h \
 			../../src/terralib/kernel/TeFragmentation.h \
+			../../src/terralib/kernel/TeFileTheme.h \	
 			../../src/terralib/kernel/TeGeneralizedProxMatrix.h \
+			 ../../src/terralib/kernel/TeGeometricTransformation.h \
 			../../src/terralib/kernel/TeGeometry.h \
 			../../src/terralib/kernel/TeGeometryAlgorithms.h \
-			../../src/terralib/kernel/TeGraph.h \
+			../../src/terralib/kernel/TeGTParams.h \
+			../../src/terralib/kernel/TeGTFactory.h \
 			../../src/terralib/kernel/TeGroupingAlgorithms.h \
 			../../src/terralib/kernel/TeImportRaster.h \
-			../../src/terralib/kernel/TeInitQuerierStrategy.h \
 			../../src/terralib/kernel/TeIntersector.h \
 			../../src/terralib/kernel/TeLayer.h \
 			../../src/terralib/kernel/TeLegendEntry.h \
 			../../src/terralib/kernel/TeMatrix.h \
 			../../src/terralib/kernel/TeMeasure.h \
+			../../src/terralib/kernel/TeMetaModelCache.h \
 			../../src/terralib/kernel/TeMultiGeometry.h \
 			../../src/terralib/kernel/TeNeighbours.h \
 			../../src/terralib/kernel/TeNetwork.h \
 			../../src/terralib/kernel/TeOverlay.h \
+			../../src/terralib/kernel/TeOverlayUtils.h \
 			../../src/terralib/kernel/TePrecision.h \
 			../../src/terralib/kernel/TeProgress.h \
 			../../src/terralib/kernel/TeProgressBase.h \
+			../../src/terralib/kernel/TeProject.h \
 			../../src/terralib/kernel/TeProjection.h \
+			../../src/terralib/kernel/TeProjectiveGT.h \
+			../../src/terralib/kernel/TeProjectiveGTFactory.h \
 			../../src/terralib/kernel/TePrototype.h \
 			../../src/terralib/kernel/TeProxMatrixConstructionStrategy.h \
 			../../src/terralib/kernel/TeProxMatrixImplementation.h \
@@ -143,20 +212,21 @@ HEADERS	+= 	../../src/terralib/kernel/checkvec.h \
 			../../src/terralib/kernel/TeQuerierDBStr3.h \
 			../../src/terralib/kernel/TeQuerierImpl.h\
 			../../src/terralib/kernel/TeQuerierParams.h\
-			../../src/terralib/kernel/TeQuerierSHP.h\
 			../../src/terralib/kernel/TeRaster.h \
 			../../src/terralib/kernel/TeRasterParams.h \
 			../../src/terralib/kernel/TeRasterRemap.h \
 			../../src/terralib/kernel/TeRasterTransform.h \
 			../../src/terralib/kernel/TeRedBlackTree.h \
 			../../src/terralib/kernel/TeRepresentation.h \
+			../../src/terralib/kernel/TeSharedPtr.h \      
 			../../src/terralib/kernel/TeSingleton.h \
 			../../src/terralib/kernel/TeSlice.h \
 			../../src/terralib/kernel/TeSpatialOperations.h \
 			../../src/terralib/kernel/TeStatistics.h \
 			../../src/terralib/kernel/TeStdFile.h \
 			../../src/terralib/kernel/TeSTEFunctionsDB.h \
-			../../src/terralib/kernel/TeSTElement.h \
+			../../src/terralib/kernel/TeBaseSTInstance.h \
+			../../src/terralib/kernel/TeBaseSTInstanceSet.h \
 			../../src/terralib/kernel/TeSTElementSet.h \
 			../../src/terralib/kernel/TeSTEvent.h \
 			../../src/terralib/kernel/TeSTInstance.h\
@@ -171,11 +241,30 @@ HEADERS	+= 	../../src/terralib/kernel/checkvec.h \
 			../../src/terralib/kernel/TeView.h \
 			../../src/terralib/kernel/TeViewNode.h \
 			../../src/terralib/kernel/TeVisual.h \
-			../../src/terralib/kernel/yyTemporal.h
+			../../src/terralib/kernel/yyTemporal.h \
+			../../src/terralib/kernel/TeRasterMemManager.h \
+			../../src/terralib/kernel/TeMutex.h \
+			../../src/terralib/kernel/TeThreadParameters.h \
+			../../src/terralib/kernel/TeThread.h \
+      ../../src/terralib/kernel/TeThreadFunctor.h \   
+      ../../src/terralib/kernel/TeThreadSignal.h \
+			../../src/terralib/kernel/TeDatabaseFactoryParams.h \
+			../../src/terralib/kernel/TeMappedMemory.h \
+			../../src/terralib/drivers/libjpeg/TeLibJpegWrapper.h \
+			../../src/terralib/drivers/libjpeg/jmemdstsrc.h \
+			../../src/terralib/kernel/TeMultiContainer.h \
+      ../../src/terralib/kernel/TeStdIOProgress.h \
+      ../../src/terralib/kernel/TeThreadJobsManager.h \
+      ../../src/terralib/kernel/TeThreadJob.h \
+      ../../src/terralib/kernel/TeFunctionCallThreadJob.h \
+      ../../src/terralib/kernel/TeTempFilesRemover.h          
 
-INCLUDEPATH	+=	../../src/terralib/kernel \
-				../../src/terralib/functions \
-				../../src/tiff \
-				../../src/zlib
+INCLUDEPATH	= \
+      ../../src/terralib/kernel \
+			../../src/terralib/functions \
+			../../src/terralib/utils \
+			../../src/tiff \
+			../../src/zlib \
+			../../src/terralib/drivers/libjpeg \
+      $$INCLUDEPATH
 
-LIBS += -L../tiff -ltiff
diff --git a/terralibx/tiff/Makefile b/terralibx/tiff/Makefile
deleted file mode 100644
index 7e1c8a9..0000000
--- a/terralibx/tiff/Makefile
+++ /dev/null
@@ -1,13 +0,0 @@
-all: tiff
-
-tiff:
-	qmake -o makeTiff tiff.pro; make -f makeTiff
-
-clean:
-	if \
-	 test -f makeTiff; \
-	then \
-		make -f makeTiff distclean; rm -f makeTiff; \
-	fi
-
-
diff --git a/terralibx/tiff/tiff.pro b/terralibx/tiff/tiff.pro
deleted file mode 100755
index 26ef517..0000000
--- a/terralibx/tiff/tiff.pro
+++ /dev/null
@@ -1,61 +0,0 @@
-TEMPLATE = lib
-CONFIG  += warn_off  debug
-TARGET  += tiff
-
-unix {
-  OBJECTS_DIR = .obj
-}
-
-SOURCES =  \
-		../../src/tiff/cpl_csv.c \
-		../../src/tiff/cpl_serv.c \
-		../../src/tiff/fax3sm.c \
-		../../src/tiff/geo_extra.c \
-		../../src/tiff/geo_free.c \
-		../../src/tiff/geo_get.c \
-		../../src/tiff/geo_names.c \
-		../../src/tiff/geo_new.c \
-		../../src/tiff/geo_normalize.c \
-		../../src/tiff/geo_print.c \
-		../../src/tiff/geo_set.c \
-		../../src/tiff/geo_tiffp.c \
-		../../src/tiff/geo_trans.c \
-		../../src/tiff/geo_write.c \
-		../../src/tiff/geotiff_proj4.c \
-		../../src/tiff/tif_aux.c \
-		../../src/tiff/tif_close.c \
-		../../src/tiff/tif_codec.c \
-		../../src/tiff/tif_color.c \
-		../../src/tiff/tif_compress.c \
-		../../src/tiff/tif_dir.c \
-		../../src/tiff/tif_dirinfo.c \
-		../../src/tiff/tif_dirread.c \
-		../../src/tiff/tif_dirwrite.c \
-		../../src/tiff/tif_dumpmode.c \
-		../../src/tiff/tif_error.c \
-		../../src/tiff/tif_extension.c \    
-		../../src/tiff/tif_fax3.c \
-		../../src/tiff/tif_flush.c \
-		../../src/tiff/tif_getimage.c \
-		../../src/tiff/tif_jpeg.c \
-		../../src/tiff/tif_luv.c \
-		../../src/tiff/tif_lzw.c \
-		../../src/tiff/tif_machdep.c \
-		../../src/tiff/tif_next.c \
-		../../src/tiff/tif_open.c \
-		../../src/tiff/tif_packbits.c \
-		../../src/tiff/tif_pixarlog.c \
-		../../src/tiff/tif_predict.c \
-		../../src/tiff/tif_print.c \
-		../../src/tiff/tif_read.c \
-		../../src/tiff/tif_strip.c \
-		../../src/tiff/tif_swab.c \
-		../../src/tiff/tif_thunder.c \
-		../../src/tiff/tif_tile.c \
-		../../src/tiff/tif_unix.c \
-		../../src/tiff/tif_version.c \
-		../../src/tiff/tif_warning.c \
-		../../src/tiff/tif_write.c \
-		../../src/tiff/tif_zip.c \
-		../../src/tiff/xtiff.c
-

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/libterralib.git



More information about the Pkg-grass-devel mailing list